From 04fc574229baa756ffee9413395438c889cd95bf Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 28 Mar 2013 17:30:09 +0100 Subject: [PATCH 001/415] Replacement of classes BOX2 and VECTOR2 with their extended versions include/vector2d.h: Removed old version include/math/math_util.h: rescale() for VECTOR2 include/math/vector2d.h: New version of VECTOR2 include/math/box2.h: New version of BOX2 common/drawframe.cpp: Refactorization of code, so it is compatible with new classes include/plot_common.h, pcbnew/basepcbframe.cpp: Changed header inclusion path CMakeLists.txt: Added definition to turn on WX_COMPATIBILITY for replacement classes --- CMakeLists.txt | 3 + common/drawframe.cpp | 54 ++-- include/math/box2.h | 483 ++++++++++++++++++++++++++++++ include/math/math_util.h | 97 ++++++ include/math/vector2d.h | 624 +++++++++++++++++++++++++++++++++++++++ include/plot_common.h | 2 +- include/vector2d.h | 414 -------------------------- pcbnew/basepcbframe.cpp | 2 +- 8 files changed, 1236 insertions(+), 443 deletions(-) create mode 100644 include/math/box2.h create mode 100644 include/math/math_util.h create mode 100644 include/math/vector2d.h delete mode 100644 include/vector2d.h diff --git a/CMakeLists.txt b/CMakeLists.txt index e3c6ae22a0..cb3fd9589e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -248,6 +248,9 @@ include(Functions) #================================================ include(CheckFindPackageResult) +# Turn on wxWidgets compatibility mode for some classes +add_definitions(-DWX_COMPATIBILITY) + ####################### # Find OpenGL library # ####################### diff --git a/common/drawframe.cpp b/common/drawframe.cpp index e67d5996ff..e2b86f57c5 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include @@ -753,7 +753,7 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU ) DSIZE clientSizeIU( clientSizeDU.x / scale, clientSizeDU.y / scale ); // Full drawing or "page" rectangle in internal units - DBOX pageRectIU( 0, 0, GetPageSizeIU().x, GetPageSizeIU().y ); + DBOX pageRectIU( wxPoint( 0, 0 ), wxSize( GetPageSizeIU().x, GetPageSizeIU().y ) ); // The upper left corner of the client rectangle in internal units. double xIU = aCenterPositionIU.x - clientSizeIU.x / 2.0; @@ -763,11 +763,11 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU ) if( screen->m_Center ) { // half page offset. - xIU += pageRectIU.width / 2.0; - yIU += pageRectIU.height / 2.0; + xIU += pageRectIU.GetWidth() / 2.0; + yIU += pageRectIU.GetHeight() / 2.0; } - DBOX clientRectIU( xIU, yIU, clientSizeIU.x, clientSizeIU.y ); + DBOX clientRectIU( wxPoint( xIU, yIU ), wxSize( clientSizeIU.x, clientSizeIU.y ) ); wxPoint centerPositionIU; #if 1 || defined( USE_PCBNEW_NANOMETRES ) @@ -782,13 +782,13 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU ) clientRectIU.MoveBottomTo( VIRT_MAX ); #endif - centerPositionIU.x = KiROUND( clientRectIU.x + clientRectIU.width/2 ); - centerPositionIU.y = KiROUND( clientRectIU.y + clientRectIU.height/2 ); + centerPositionIU.x = KiROUND( clientRectIU.GetX() + clientRectIU.GetWidth() / 2 ); + centerPositionIU.y = KiROUND( clientRectIU.GetY() + clientRectIU.GetHeight() / 2 ); if( screen->m_Center ) { - centerPositionIU.x -= KiROUND( pageRectIU.width / 2.0 ); - centerPositionIU.y -= KiROUND( pageRectIU.height / 2.0 ); + centerPositionIU.x -= KiROUND( pageRectIU.GetWidth() / 2.0 ); + centerPositionIU.y -= KiROUND( pageRectIU.GetHeight() / 2.0 ); } DSIZE virtualSizeIU; @@ -799,26 +799,26 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU ) } else { - double pageCenterX = pageRectIU.x + ( pageRectIU.width / 2 ); - double clientCenterX = clientRectIU.x + ( clientRectIU.width / 2 ); + double pageCenterX = pageRectIU.GetX() + ( pageRectIU.GetWidth() / 2 ); + double clientCenterX = clientRectIU.GetX() + ( clientRectIU.GetWidth() / 2 ); - if( clientRectIU.width > pageRectIU.width ) + if( clientRectIU.GetWidth() > pageRectIU.GetWidth() ) { if( pageCenterX > clientCenterX ) virtualSizeIU.x = ( pageCenterX - clientRectIU.GetLeft() ) * 2; else if( pageCenterX < clientCenterX ) virtualSizeIU.x = ( clientRectIU.GetRight() - pageCenterX ) * 2; else - virtualSizeIU.x = clientRectIU.width; + virtualSizeIU.x = clientRectIU.GetWidth(); } else { if( pageCenterX > clientCenterX ) - virtualSizeIU.x = pageRectIU.width + ( (pageRectIU.GetLeft() - clientRectIU.GetLeft() ) * 2 ); + virtualSizeIU.x = pageRectIU.GetWidth() + ( (pageRectIU.GetLeft() - clientRectIU.GetLeft() ) * 2 ); else if( pageCenterX < clientCenterX ) - virtualSizeIU.x = pageRectIU.width + ( (clientRectIU.GetRight() - pageRectIU.GetRight() ) * 2 ); + virtualSizeIU.x = pageRectIU.GetWidth() + ( (clientRectIU.GetRight() - pageRectIU.GetRight() ) * 2 ); else - virtualSizeIU.x = pageRectIU.width; + virtualSizeIU.x = pageRectIU.GetWidth(); } } @@ -828,28 +828,28 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU ) } else { - double pageCenterY = pageRectIU.y + ( pageRectIU.height / 2 ); - double clientCenterY = clientRectIU.y + ( clientRectIU.height / 2 ); + double pageCenterY = pageRectIU.GetY() + ( pageRectIU.GetHeight() / 2 ); + double clientCenterY = clientRectIU.GetY() + ( clientRectIU.GetHeight() / 2 ); - if( clientRectIU.height > pageRectIU.height ) + if( clientRectIU.GetHeight() > pageRectIU.GetHeight() ) { if( pageCenterY > clientCenterY ) virtualSizeIU.y = ( pageCenterY - clientRectIU.GetTop() ) * 2; else if( pageCenterY < clientCenterY ) virtualSizeIU.y = ( clientRectIU.GetBottom() - pageCenterY ) * 2; else - virtualSizeIU.y = clientRectIU.height; + virtualSizeIU.y = clientRectIU.GetHeight(); } else { if( pageCenterY > clientCenterY ) - virtualSizeIU.y = pageRectIU.height + + virtualSizeIU.y = pageRectIU.GetHeight() + ( ( pageRectIU.GetTop() - clientRectIU.GetTop() ) * 2 ); else if( pageCenterY < clientCenterY ) - virtualSizeIU.y = pageRectIU.height + + virtualSizeIU.y = pageRectIU.GetHeight() + ( ( clientRectIU.GetBottom() - pageRectIU.GetBottom() ) * 2 ); else - virtualSizeIU.y = pageRectIU.height; + virtualSizeIU.y = pageRectIU.GetHeight(); } } @@ -866,8 +866,8 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU ) } else { - screen->m_DrawOrg.x = -KiROUND( ( virtualSizeIU.x - pageRectIU.width ) / 2.0 ); - screen->m_DrawOrg.y = -KiROUND( ( virtualSizeIU.y - pageRectIU.height ) / 2.0 ); + screen->m_DrawOrg.x = -KiROUND( ( virtualSizeIU.x - pageRectIU.GetWidth() ) / 2.0 ); + screen->m_DrawOrg.y = -KiROUND( ( virtualSizeIU.y - pageRectIU.GetHeight() ) / 2.0 ); } /* Always set scrollbar pixels per unit to 1 unless you want the zoom @@ -886,8 +886,8 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU ) // center position at the center of client rectangle. screen->SetScrollCenterPosition( centerPositionIU ); - double posX = centerPositionIU.x - clientRectIU.width /2.0 - screen->m_DrawOrg.x; - double posY = centerPositionIU.y - clientRectIU.height/2.0 - screen->m_DrawOrg.y; + double posX = centerPositionIU.x - clientRectIU.GetWidth() / 2.0 - screen->m_DrawOrg.x; + double posY = centerPositionIU.y - clientRectIU.GetHeight() / 2.0 - screen->m_DrawOrg.y; // Convert scroll bar position to device units. posX = KiROUND( posX * scale ); diff --git a/include/math/box2.h b/include/math/box2.h new file mode 100644 index 0000000000..470fa6ac88 --- /dev/null +++ b/include/math/box2.h @@ -0,0 +1,483 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com + * Copyright (C) 2008-2011 Wayne Stambaugh + * Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2013 CERN + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __BOX2_H +#define __BOX2_H + +#include + + +template +class BOX2_TRAITS +{ +}; + +template <> +class BOX2_TRAITS +{ +public: + enum { + c_max_size = INT_MAX - 1, + c_min_coord_value = INT_MIN / 2 + 1 + }; +}; + +/** + * Class BOX2 + * handles a 2-D bounding box, built on top of an origin point + * and size vector, both of templated class Vec + */ +template +class BOX2 +{ +private: + Vec m_Pos; // Rectangle Origin + Vec m_Size; // Rectangle Size + +public: + typedef typename Vec::coord_type coord_type; + typedef typename Vec::extended_type ecoord_type; + + BOX2() { }; + + BOX2( const Vec& aPos, const Vec& aSize ) : + m_Pos( aPos ), + m_Size( aSize ) + { } + + void SetMaximum() + { + m_Pos.x = m_Pos.y = BOX2_TRAITS().c_min_coord_value; + m_Size.x = m_Size.y = BOX2_TRAITS().c_max_size; + } + + Vec Centre() const + { + return Vec( m_Pos.x + ( m_Size.x / 2 ), + m_Pos.y + ( m_Size.y / 2 ) ); + } + + /** + * @brief Compute the bounding box from a given list of points. + * + * @param aPointList is the list points of the object. + */ + template + void Compute( const Container& aPointList ) + { + Vec vmin, vmax; + typename Container::const_iterator i; + + if( !aPointList.size() ) + return; + + vmin = vmax = aPointList[0]; + + for( i = aPointList.begin(); i != aPointList.end(); ++i ) + { + Vec p( *i ); + vmin.x = std::min( vmin.x, p.x ); + vmin.y = std::min( vmin.y, p.y ); + vmax.x = std::max( vmax.x, p.x ); + vmax.y = std::max( vmax.y, p.y ); + } + + SetOrigin( vmin ); + SetSize( vmax - vmin ); + } + + /** + * Function Move + * moves the rectangle by the \a aMoveVector. + * @param aMoveVector A point that is the value to move this rectangle + */ + void Move( const Vec& aMoveVector ) + { + m_Pos += aMoveVector; + } + + /** + * Function Normalize + * ensures that the height ant width are positive. + */ + BOX2& Normalize() + { + if( m_Size.y < 0 ) + { + m_Size.y = -m_Size.y; + m_Pos.y -= m_Size.y; + } + + if( m_Size.x < 0 ) + { + m_Size.x = -m_Size.x; + m_Pos.x -= m_Size.x; + } + + return *this; + } + + /** + * Function Contains + * @param aPoint = the point to test + * @return true if aPoint is inside the boundary box. A point on a edge is seen as inside + */ + bool Contains( const Vec& aPoint ) const + { + Vec rel_pos = aPoint - m_Pos; + Vec size = m_Size; + + if( size.x < 0 ) + { + size.x = -size.x; + rel_pos.x += size.x; + } + + if( size.y < 0 ) + { + size.y = -size.y; + rel_pos.y += size.y; + } + + return (rel_pos.x >= 0) && (rel_pos.y >= 0) && ( rel_pos.y <= size.y) && ( rel_pos.x <= size.x); + } + + /** + * Function Contains + * @param x = the x coordinate of the point to test + * @param y = the x coordinate of the point to test + * @return true if point is inside the boundary box. A point on a edge is seen as inside + */ + bool Contains( coord_type x, coord_type y ) const { return Contains( Vec( x, y ) ); } + + /** + * Function Contains + * @param aRect = the BOX2 to test + * @return true if aRect is Contained. A common edge is seen as contained + */ + bool Contains( const BOX2& aRect ) const + { + return Contains( aRect.GetOrigin() ) && Contains( aRect.GetEnd() ); + } + + const Vec& GetSize() const { return m_Size; } + coord_type GetX() const { return m_Pos.x; } + coord_type GetY() const { return m_Pos.y; } + + const Vec& GetOrigin() const { return m_Pos; } + const Vec& GetPosition() const { return m_Pos; } + const Vec GetEnd() const { return Vec( GetRight(), GetBottom() ); } + + coord_type GetWidth() const { return m_Size.x; } + coord_type GetHeight() const { return m_Size.y; } + coord_type GetRight() const { return m_Pos.x + m_Size.x; } + coord_type GetBottom() const { return m_Pos.y + m_Size.y; } + + // Compatibility aliases + coord_type GetLeft() const { return GetX(); } + coord_type GetTop() const { return GetY(); } + void MoveTopTo( coord_type aTop ) { m_Pos.y = aTop; } + void MoveBottomTo( coord_type aBottom ) { m_Size.y = aBottom - m_Pos.y; } + void MoveLeftTo( coord_type aLeft ) { m_Pos.x = aLeft; } + void MoveRightTo( coord_type aRight ) { m_Size.x = aRight - m_Pos.x; } + + void SetOrigin( const Vec& pos ) { m_Pos = pos; } + void SetOrigin( coord_type x, coord_type y ) { m_Pos.x = x; m_Pos.y = y; } + void SetSize( const Vec& size ) { m_Size = size; } + void SetSize( coord_type w, coord_type h ) { m_Size.x = w; m_Size.y = h; } + void Offset( coord_type dx, coord_type dy ) { m_Pos.x += dx; m_Pos.y += dy; } + void Offset( const Vec& offset ) + { + m_Pos.x += offset.x; m_Pos.y += + offset.y; + } + + void SetX( coord_type val ) { m_Pos.x = val; } + void SetY( coord_type val ) { m_Pos.y = val; } + void SetWidth( coord_type val ) { m_Size.x = val; } + void SetHeight( coord_type val ) { m_Size.y = val; } + void SetEnd( coord_type x, coord_type y ) { SetEnd( Vec( x, y ) ); } + void SetEnd( const Vec& pos ) + { + m_Size.x = pos.x - m_Pos.x; m_Size.y = pos.y - m_Pos.y; + } + + /** + * Function Intersects + * @return bool - true if the argument rectangle intersects this rectangle. + * (i.e. if the 2 rectangles have at least a common point) + */ + bool Intersects( const BOX2& aRect ) const + { + // this logic taken from wxWidgets' geometry.cpp file: + bool rc; + + BOX2 me( *this ); + BOX2 rect( aRect ); + me.Normalize(); // ensure size is >= 0 + rect.Normalize(); // ensure size is >= 0 + + // calculate the left common area coordinate: + int left = std::max( me.m_Pos.x, rect.m_Pos.x ); + // calculate the right common area coordinate: + int right = std::min( me.m_Pos.x + me.m_Size.x, rect.m_Pos.x + rect.m_Size.x ); + // calculate the upper common area coordinate: + int top = std::max( me.m_Pos.y, aRect.m_Pos.y ); + // calculate the lower common area coordinate: + int bottom = std::min( me.m_Pos.y + me.m_Size.y, rect.m_Pos.y + rect.m_Size.y ); + + // if a common area exists, it must have a positive (null accepted) size + if( left <= right && top <= bottom ) + rc = true; + else + rc = false; + + return rc; + } + + const std::string Format() const + { + std::stringstream ss; + + ss << "( box corner " << m_Pos.Format() << " w " << m_Size.x << " h " << m_Size.y << " )"; + + return ss.str(); + } + + /** + * Function Inflate + * inflates the rectangle horizontally by \a dx and vertically by \a dy. If \a dx + * and/or \a dy is negative the rectangle is deflated. + */ + BOX2& Inflate( coord_type dx, coord_type dy ) + { + if( m_Size.x >= 0 ) + { + if( m_Size.x < -2 * dx ) + { + // Don't allow deflate to eat more width than we have, + m_Pos.x += m_Size.x / 2; + m_Size.x = 0; + } + else + { + // The inflate is valid. + m_Pos.x -= dx; + m_Size.x += 2 * dx; + } + } + else // size.x < 0: + { + if( m_Size.x > -2 * dx ) + { + // Don't allow deflate to eat more width than we have, + m_Pos.x -= m_Size.x / 2; + m_Size.x = 0; + } + else + { + // The inflate is valid. + m_Pos.x += dx; + m_Size.x -= 2 * dx; // m_Size.x <0: inflate when dx > 0 + } + } + + if( m_Size.y >= 0 ) + { + if( m_Size.y < -2 * dy ) + { + // Don't allow deflate to eat more height than we have, + m_Pos.y += m_Size.y / 2; + m_Size.y = 0; + } + else + { + // The inflate is valid. + m_Pos.y -= dy; + m_Size.y += 2 * dy; + } + } + else // size.y < 0: + { + if( m_Size.y > 2 * dy ) + { + // Don't allow deflate to eat more height than we have, + m_Pos.y -= m_Size.y / 2; + m_Size.y = 0; + } + else + { + // The inflate is valid. + m_Pos.y += dy; + m_Size.y -= 2 * dy; // m_Size.y <0: inflate when dy > 0 + } + } + + return *this; + } + + /** + * Function Inflate + * inflates the rectangle horizontally and vertically by \a aDelta. If \a aDelta + * is negative the rectangle is deflated. + */ + BOX2& Inflate( int aDelta ) + { + Inflate( aDelta, aDelta ); + return *this; + } + + /** + * Function Merge + * modifies the position and size of the rectangle in order to contain \a aRect. It is + * mainly used to calculate bounding boxes. + * @param aRect The rectangle to merge with this rectangle. + */ + BOX2& Merge( const BOX2& aRect ) + { + Normalize(); // ensure width and height >= 0 + BOX2 rect = aRect; + rect.Normalize(); // ensure width and height >= 0 + Vec end = GetEnd(); + Vec rect_end = rect.GetEnd(); + + // Change origin and size in order to contain the given rect + m_Pos.x = std::min( m_Pos.x, rect.m_Pos.x ); + m_Pos.y = std::min( m_Pos.y, rect.m_Pos.y ); + end.x = std::max( end.x, rect_end.x ); + end.y = std::max( end.y, rect_end.y ); + SetEnd( end ); + return *this; + } + + /** + * Function Merge + * modifies the position and size of the rectangle in order to contain the given point. + * @param aPoint The point to merge with the rectangle. + */ + BOX2& Merge( const Vec& aPoint ) + { + Normalize(); // ensure width and height >= 0 + + Vec end = GetEnd(); + // Change origin and size in order to contain the given rect + m_Pos.x = std::min( m_Pos.x, aPoint.x ); + m_Pos.y = std::min( m_Pos.y, aPoint.y ); + end.x = std::max( end.x, aPoint.x ); + end.y = std::max( end.y, aPoint.y ); + SetEnd( end ); + return *this; + } + + /** + * Function GetArea + * returns the area of the rectangle. + * @return The area of the rectangle. + */ + ecoord_type GetArea() const + { + return (ecoord_type) GetWidth() * (ecoord_type) GetHeight(); + } + + /** + * Function GetArea + * returns the length of the diagonal of the rectangle. + * @return The area of the diagonal. + */ + ecoord_type Diagonal() const + { + return m_Size.EuclideanNorm(); + } + + ecoord_type SquaredDistance( const Vec& aP ) const + { + ecoord_type x2 = m_Pos.x + m_Size.x; + ecoord_type y2 = m_Pos.y + m_Size.y; + ecoord_type xdiff = std::max( aP.x < m_Pos.x ? m_Pos.x - aP.x : m_Pos.x - x2, 0 ); + ecoord_type ydiff = std::max( aP.y < m_Pos.y ? m_Pos.y - aP.y : m_Pos.y - y2, 0 ); + return xdiff * xdiff + ydiff * ydiff; + } + + ecoord_type Distance( const Vec& aP ) const + { + return sqrt( SquaredDistance( aP ) ); + } + + /** + * Function SquaredDistance + * returns the square of the minimum distance between self and box aBox + * @param aBox: the other box + * @return The distance, squared + */ + ecoord_type SquaredDistance( const BOX2& aBox ) const + { + ecoord_type s = 0; + + if( aBox.m_Pos.x + aBox.m_Size.x < m_Pos.x ) + { + ecoord_type d = aBox.m_Pos.x + aBox.m_Size.x - m_Pos.x; + s += d * d; + } + else if( aBox.m_Pos.x > m_Pos.x + m_Size.x ) + { + ecoord_type d = aBox.m_Pos.x - m_Size.x - m_Pos.x; + s += d * d; + } + + if( aBox.m_Pos.y + aBox.m_Size.y < m_Pos.y ) + { + ecoord_type d = aBox.m_Pos.y + aBox.m_Size.y - m_Pos.y; + s += d * d; + } + else if( aBox.m_Pos.y > m_Pos.y + m_Size.y ) + { + ecoord_type d = aBox.m_Pos.y - m_Size.y - m_Pos.y; + s += d * d; + } + + return s; + } + + /** + * Function Distance + * returns the minimum distance between self and box aBox + * @param aBox: the other box + * @return The distance + */ + ecoord_type Distance( const BOX2& aBox ) const + { + return sqrt( SquaredDistance( aBox ) ); + } +}; + +/* Default specializations */ +typedef BOX2 BOX2I; +typedef BOX2 BOX2D; + +// FIXME should be removed to avoid multiple typedefs for the same type +typedef BOX2D DBOX; + +#endif diff --git a/include/math/math_util.h b/include/math/math_util.h new file mode 100644 index 0000000000..3a4049ae29 --- /dev/null +++ b/include/math/math_util.h @@ -0,0 +1,97 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (c) 2005 Michael Niedermayer + * Copyright (C) 2013 Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __MATH_UTIL_H +#define __MATH_UTIL_H + +#include +#include +#include + +/** + * Function rescale() + * + * Scales a number (value) by rational (numerator/denominator). Numerator must be <= denominator. + */ + +template static T rescale( T numerator, T value, T denominator ) +{ + return numerator * value / denominator; +} + + +// explicit specializations for integer types, taking care of overflow. +template<> int rescale( int numerator, int value, int denominator ) +{ + return (int) ( (int64_t) numerator * (int64_t) value / (int64_t) denominator ); +} + +template<> int64_t rescale( int64_t numerator, int64_t value, int64_t denominator ) +{ + uint64_t r = 0; + int64_t sign = ( ( numerator < 0) ? -1 : 1 ) * ( denominator < 0 ? - 1: 1 ) * (value < 0 ? - 1 : 1); + + uint64_t a = abs( numerator ); + uint64_t b = abs( value ); + uint64_t c = abs( denominator ); + + r = c / 2; + + if( b <= INT_MAX && c <= INT_MAX ) + { + if( a <= INT_MAX ) + return sign * ( (a * b + r ) / c ); + else + return sign * (a / c * b + (a % c * b + r) / c); + } else { + uint64_t a0 = a & 0xFFFFFFFF; + uint64_t a1 = a >> 32; + uint64_t b0 = b & 0xFFFFFFFF; + uint64_t b1 = b >> 32; + uint64_t t1 = a0 * b1 + a1 * b0; + uint64_t t1a = t1 << 32; + int i; + + a0 = a0 * b0 + t1a; + a1 = a1 * b1 + (t1 >> 32) + (a0 < t1a); + a0 += r; + a1 += a0 < r; + + for( i = 63; i >= 0; i-- ) + { + a1 += a1 + ( (a0 >> i) & 1 ); + t1 += t1; + + if( c <= a1 ) + { + a1 -= c; + t1++; + } + } + + return t1 * sign; + } +}; + +#endif // __MATH_UTIL_H diff --git a/include/math/vector2d.h b/include/math/vector2d.h new file mode 100644 index 0000000000..e8f4172f9f --- /dev/null +++ b/include/math/vector2d.h @@ -0,0 +1,624 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2010 Virtenio GmbH, Torsten Hueter, torsten.hueter virtenio.de + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * Copyright (C) 2013 Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef VECTOR2D_H_ +#define VECTOR2D_H_ + +#include +#include +#include + +#include + +#ifdef WX_COMPATIBILITY + #include +#endif + +/** + * Class VECTOR2_TRAITS + * traits class for VECTOR2. + */ +template +struct VECTOR2_TRAITS +{ + ///> extended range/precision types used by operations involving multiple + ///> multiplications to prevent overflow. + typedef T extended_type; +}; + +template <> +struct VECTOR2_TRAITS +{ + typedef int64_t extended_type; +}; + +// Forward declarations for template friends +template +class VECTOR2; +template +std::ostream& operator<<( std::ostream& stream, const VECTOR2& vector ); + +/** + * Class VECTOR2 + * defines a general 2D-vector/point. + * + * This class uses templates to be universal. Several operators are provided to help easy implementing + * of linear algebra equations. + * + */ +template +class VECTOR2 : public VECTOR2_TRAITS +{ +public: + typedef typename VECTOR2_TRAITS::extended_type extended_type; + typedef T coord_type; + + T x, y; + + // Constructors + + /// Construct a 2D-vector with x, y = 0 + VECTOR2(); + +#ifdef WX_COMPATIBILITY + /// Constructor with a wxPoint as argument + VECTOR2( const wxPoint& aPoint ); + + /// Constructor with a wxSize as argument + VECTOR2( const wxSize& aSize ); +#endif + + /// Construct a vector with given components x, y + VECTOR2( T x, T y ); + + /// Initializes a vector from another specialization. Beware of rouding + /// issues. + template + VECTOR2( const VECTOR2& aVec ) + { + x = (T) aVec.x; + y = (T) aVec.y; + } + + /// Casts a vector to another specialized subclass. Beware of rouding + /// issues. + template + VECTOR2 operator()() const + { + return VECTOR2( (CastedType) x, (CastedType) y ); + } + + /// Destructor + // virtual ~VECTOR2(); + + /** + * Function Euclidean Norm + * computes the Euclidean norm of the vector, which is defined as sqrt(x ** 2 + y ** 2). + * It is used to calculate the length of the vector. + * @return Scalar, the euclidean norm + */ + T EuclideanNorm() const; + + /** + * Function Perpendicular + * computes the perpendicular vector + * @return Perpendicular vector + */ + VECTOR2 Perpendicular() const; + + /** + * Function LineProjection + * computes the perpendicular projection point of self on a line + * going through aA and aB points. + * @return Projected point + */ + VECTOR2 LineProjection( const VECTOR2& aA, const VECTOR2& aB ) const; + + /** + * Function LineSide + * determines on which side of directed line passing via points aEnd + * and a start aStart we are. + * @return: < 0: left, 0 : on the line, > 0 : right + */ + int LineSide( const VECTOR2& aStart, const VECTOR2& aEnd ) const; + + /** + * Function LineDistance + * returns the closest Euclidean distance to a line defined by points + * aStart and aEnd. + * @param aDetermineSide: when true, the sign of the returned value indicates + * the side of the line at which we are (negative = left) + * @return the distance + */ + T LineDistance( const VECTOR2& aStart, const VECTOR2& aEnd, bool aDetermineSide = false ) const; + + /** + * Function ClosestSegmentPoint + * returns the closest point on a line segment defined by aStart and aEnd. + * @return: our point + */ + VECTOR2 ClosestSegmentPoint( const VECTOR2& aStart, const VECTOR2& aEnd ) const; + + /** + * Function Resize + * returns a vector of the same direction, but length specified in aNewLength + * @param aNewLength: length of the rescaled vector + * @return rescaled vector + */ + VECTOR2 Resize( T aNewLength ) const; + + /** + * Function Angle + * computes the angle of the vector + * @return vector angle, in radians + */ + double Angle() const; + + /** + * Function Rotate + * rotates the vector by a given angle + * @param aAngle rotation angle in radians + * @return rotated vector + */ + VECTOR2 Rotate( double aAngle ) const; + + /** + * Function Format + * returns the vector formatted as a string + * @return the formatted string + */ + const std::string Format() const; + + /** + * Function Cross() + * computes cross product of self with aVector + */ + extended_type Cross( const VECTOR2& aVector ) const; + + /** + * Function Dot() + * computes dot product of self with aVector + */ + extended_type Dot( const VECTOR2& aVector ) const; + + + // Operators + + /// Assignment operator + VECTOR2& operator=( const VECTOR2& aVector ); + + /// Vector addition operator + VECTOR2 operator+( const VECTOR2& aVector ) const; + + /// Compound assignment operator + VECTOR2& operator+=( const VECTOR2& aVector ); + + /// Vector subtraction operator + VECTOR2 operator-( const VECTOR2& aVector ) const; + + /// Compound assignment operator + VECTOR2& operator-=( const VECTOR2& aVector ); + + /// Negate Vector operator + VECTOR2 operator-(); + + /// Scalar product operator + extended_type operator*( const VECTOR2& aVector ) const; + + /// Multiplication with a factor + VECTOR2 operator*( const T& aFactor ) const; + + /// Division with a factor + VECTOR2 operator/( const T& aFactor ) const; + + /// Equality operator + const bool operator==( const VECTOR2& aVector ) const; + + /// Not equality operator + const bool operator!=( const VECTOR2& aVector ) const; + + /// Smaller than operator + bool operator<( const VECTOR2& aVector ) const; + bool operator<=( const VECTOR2& aVector ) const; + + /// Greater than operator + bool operator>( const VECTOR2& aVector ) const; + bool operator>=( const VECTOR2& aVector ) const; + + friend std::ostream & operator<< ( std::ostream & stream, const VECTOR2 &vector ); +}; + + +// ---------------------- +// --- Implementation --- +// ---------------------- + +template +VECTOR2::VECTOR2() +{ + x = y = 0.0; +} + + +#ifdef WX_COMPATIBILITY +template +VECTOR2::VECTOR2( wxPoint const& aPoint ) +{ + x = T( aPoint.x ); + y = T( aPoint.y ); +} + + +template +VECTOR2::VECTOR2( wxSize const& aSize ) +{ + x = T( aSize.x ); + y = T( aSize.y ); +} +#endif + +template +VECTOR2::VECTOR2( T aX, T aY ) +{ + x = aX; + y = aY; +} + + +template +T VECTOR2::EuclideanNorm() const +{ + return sqrt( (extended_type) x * x + (extended_type) y * y ); +} + + +template +double VECTOR2::Angle() const +{ + return atan2( y, x ); +} + + +template +VECTOR2 VECTOR2::Perpendicular() const +{ + VECTOR2 perpendicular( -y, x ); + return perpendicular; +} + + +template +VECTOR2& VECTOR2::operator=( const VECTOR2& aVector ) +{ + x = aVector.x; + y = aVector.y; + return *this; +} + + +template +VECTOR2& VECTOR2::operator+=( const VECTOR2& aVector ) +{ + x += aVector.x; + y += aVector.y; + return *this; +} + + +template +VECTOR2& VECTOR2::operator-=( const VECTOR2& aVector ) +{ + x -= aVector.x; + y -= aVector.y; + return *this; +} + + +template +int VECTOR2::LineSide( const VECTOR2& aStart, const VECTOR2& aEnd ) const +{ + VECTOR2 d = aEnd - aStart; + VECTOR2 ap = *this - aStart; + + extended_type det = (extended_type) d.x * (extended_type) ap.y + - (extended_type) d.y * (extended_type) ap.x; + + return det < 0 ? -1 : (det > 0 ? 1 : 0); +} + + +template +VECTOR2 VECTOR2::LineProjection( const VECTOR2& aA, const VECTOR2& aB ) const +{ + const VECTOR2 d = aB - aA; + extended_type det = (extended_type) d.x * d.x + d.y * (extended_type) d.y; + extended_type dxdy = (extended_type) d.x * d.y; + extended_type qx = + ( (extended_type) aA.x * d.y * d.y + (extended_type) d.x * d.x * x - dxdy * + (aA.y - y) ) / det; + extended_type qy = + ( (extended_type) aA.y * d.x * d.x + (extended_type) d.y * d.y * y - dxdy * + (aA.x - x) ) / det; + + return VECTOR2 ( (T) qx, (T) qy ); +} + + +template +T VECTOR2::LineDistance( const VECTOR2& aStart, const VECTOR2& aEnd, bool aDetermineSide ) const +{ + extended_type a = aStart.y - aEnd.y; + extended_type b = aEnd.x - aStart.x; + extended_type c = -a * aStart.x - b * aStart.y; + + T dist = ( a * x + b * y + c ) / sqrt( a * a + b * b ); + return aDetermineSide ? dist : abs(dist); +} + + +template +VECTOR2 VECTOR2::ClosestSegmentPoint( const VECTOR2& aStart, const VECTOR2& aEnd ) const +{ + VECTOR2 d = (aEnd - aStart); + extended_type l_squared = (extended_type) d.x * d.x + (extended_type) d.y * d.y; + + + if( l_squared == 0 ) + { + return aStart; + } + + extended_type t = + (extended_type) (x - aStart.x) * (extended_type) d.x + + (extended_type) (y - aStart.y) * (extended_type) d.y; + + if( t < 0 ) + { + return aStart; + } + else if( t > l_squared ) + { + return aEnd; + } + + double xp = (double) t * (double) d.x / (double) l_squared; + double yp = (double) t * (double) d.y / (double) l_squared; + + /*VECTOR2 proj = aStart + VECTOR2 ( ( t * (extended_type) d.x / l_squared ), + ( t * ( extended_type) d.y / l_squared ) );*/ + + VECTOR2 proj = aStart + VECTOR2 ( (T)xp, (T) yp ); + + return proj; +} + + +template +VECTOR2 VECTOR2::Rotate( double aAngle ) const +{ + double sa = sin( aAngle ); + double ca = cos( aAngle ); + + return VECTOR2 ( T( (double) x * ca - (double) y * sa ), + T( (double) x * sa + (double) y * ca ) ); +} + + +template +VECTOR2 VECTOR2::Resize( T aNewLength ) const +{ + if( x == 0 && y == 0 ) + return VECTOR2 ( 0, 0 ); + + T l = this->EuclideanNorm(); + + return VECTOR2 ( + rescale( aNewLength, x, l ), + rescale( aNewLength, y, l ) ); +} + + +template +const std::string VECTOR2::Format() const +{ + std::stringstream ss; + + ss << "( xy " << x << " " << y << " )"; + + return ss.str(); +} + + +template +VECTOR2 VECTOR2::operator+( const VECTOR2& aVector ) const +{ + return VECTOR2 ( x + aVector.x, y + aVector.y ); +} + + +template +VECTOR2 VECTOR2::operator-( const VECTOR2& aVector ) const +{ + return VECTOR2 ( x - aVector.x, y - aVector.y ); +} + + +template +VECTOR2 VECTOR2::operator-() +{ + return VECTOR2 ( -x, -y ); +} + + +template +typename VECTOR2::extended_type VECTOR2::operator*( const VECTOR2& aVector ) const +{ + return aVector.x * x + aVector.y * y; +} + + +template +VECTOR2 VECTOR2::operator*( const T& aFactor ) const +{ + VECTOR2 vector( x * aFactor, y * aFactor ); + return vector; +} + + +template +VECTOR2 VECTOR2::operator/( const T& aFactor ) const +{ + VECTOR2 vector( x / aFactor, y / aFactor ); + return vector; +} + + +template +VECTOR2 operator*( const T& aFactor, const VECTOR2& aVector ) +{ + VECTOR2 vector( aVector.x * aFactor, aVector.y * aFactor ); + return vector; +} + + +template +typename VECTOR2::extended_type VECTOR2::Cross( const VECTOR2& aVector ) const +{ + return (extended_type) x * (extended_type) aVector.y - + (extended_type) y * (extended_type) aVector.x; +} + + +template +typename VECTOR2::extended_type VECTOR2::Dot( const VECTOR2& aVector ) const +{ + return (extended_type) x * (extended_type) aVector.x + + (extended_type) y * (extended_type) aVector.y; +} + + +template +bool VECTOR2::operator<( const VECTOR2& aVector ) const +{ + return ( *this * *this ) < ( aVector * aVector ); +} + + +template +bool VECTOR2::operator<=( const VECTOR2& aVector ) const +{ + return ( *this * *this ) <= ( aVector * aVector ); +} + + +template +bool VECTOR2::operator>( const VECTOR2& aVector ) const +{ + return ( *this * *this ) > ( aVector * aVector ); +} + + +template +bool VECTOR2::operator>=( const VECTOR2& aVector ) const +{ + return ( *this * *this ) >= ( aVector * aVector ); +} + + +template +bool const VECTOR2::operator==( VECTOR2 const& aVector ) const +{ + return ( aVector.x == x ) && ( aVector.y == y ); +} + + +template +bool const VECTOR2::operator!=( VECTOR2 const& aVector ) const +{ + return ( aVector.x != x ) || ( aVector.y != y ); +} + + +template +const VECTOR2 LexicographicalMax( const VECTOR2& aA, const VECTOR2& aB ) +{ + if( aA.x > aB.x ) + return aA; + else if( aA.x == aB.x && aA.y > aB.y ) + return aA; + + return aB; +} + + +template +const VECTOR2 LexicographicalMin( const VECTOR2& aA, const VECTOR2& aB ) +{ + if( aA.x < aB.x ) + return aA; + else if( aA.x == aB.x && aA.y < aB.y ) + return aA; + + return aB; +} + + +template +const int LexicographicalCompare( const VECTOR2& aA, const VECTOR2& aB ) +{ + if( aA.x < aB.x ) + return -1; + else if( aA.x > aB.x ) + return 1; + else // aA.x == aB.x + { + if( aA.y < aB.y ) + return -1; + else if( aA.y > aB.y ) + return 1; + else + return 0; + } +} + + +template +std::ostream& operator<<( std::ostream& aStream, const VECTOR2& aVector ) +{ + aStream << "[ " << aVector.x << " | " << aVector.y << " ]"; + return aStream; +} + +/* Default specializations */ +typedef VECTOR2 VECTOR2D; +typedef VECTOR2 VECTOR2I; + +/* Compatibility typedefs */ +// FIXME should be removed to avoid multiple typedefs for the same type +typedef VECTOR2 DPOINT; +typedef DPOINT DSIZE; + +#endif // VECTOR2D_H_ diff --git a/include/plot_common.h b/include/plot_common.h index 437c676d8d..66005c1fe1 100644 --- a/include/plot_common.h +++ b/include/plot_common.h @@ -9,7 +9,7 @@ #define PLOT_COMMON_H_ #include -#include +#include #include #include // PAGE_INFO #include // FILL_T diff --git a/include/vector2d.h b/include/vector2d.h deleted file mode 100644 index 3968984df1..0000000000 --- a/include/vector2d.h +++ /dev/null @@ -1,414 +0,0 @@ -/* - * This program source code file is part of KICAD, a free EDA CAD application. - * - * Copyright (C) 2010 Virtenio GmbH, Torsten Hueter, torsten.hueter virtenio.de - * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck - * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, you may find one here: - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * or you may search the http://www.gnu.org website for the version 2 license, - * or you may write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef VECTOR2D_H_ -#define VECTOR2D_H_ - -#include -#include - - -/// Forward declaration for template friends -//template class VECTOR2; - - -/** - * Class VECTOR2 - * defines a general 2D-vector. - * - * This class uses templates to be universal. Several operators are provided to help easy implementing - * of linear algebra equations. - * - */ -template class VECTOR2 -{ -public: - T x, y; - - // Constructors - - /// Construct a 2D-vector with x, y = 0 - VECTOR2(); - - /// Constructor with a wxPoint as argument - VECTOR2( const wxPoint& aPoint ); - - /// Constructor with a wxSize as argument - VECTOR2( const wxSize& aSize ); - - /// Construct a vector with given components x, y - VECTOR2( T x, T y ); - - /// Destructor - // virtual ~VECTOR2(); - - /** - * Function Euclidean Norm - * computes the Euclidean norm of the vector, which is defined as sqrt(x ** 2 + y ** 2). - * It is used to calculate the length of the vector. - * @return Scalar, the euclidean norm - */ - T EuclideanNorm(); - - /** - * Function Perpendicular - * computes the perpendicular vector - * @return Perpendicular vector - */ - VECTOR2 Perpendicular(); - - /** - * Function Angle - * computes the angle of the vector - * @return vector angle - */ - T Angle(); - - // Operators - - /// Assignment operator - VECTOR2& operator=( const VECTOR2& aVector ); - - /// Vector addition operator - VECTOR2 operator+( const VECTOR2& aVector ); - - /// Compound assignment operator - VECTOR2& operator+=( const VECTOR2& aVector ); - - /// Vector subtraction operator - VECTOR2 operator-( const VECTOR2& aVector ); - - /// Compound assignment operator - VECTOR2& operator-=( const VECTOR2& aVector ); - - /// Negate Vector operator - VECTOR2 operator-(); - - /// Scalar product operator - T operator*( const VECTOR2& aVector ); - - /// Multiplication with a factor - VECTOR2 operator*( const T& aFactor ); - - /// Cross product operator - T operator^( const VECTOR2& aVector ); - - /// Equality operator - const bool operator==( const VECTOR2& aVector ); - - /// Not equality operator - const bool operator!=( const VECTOR2& aVector ); - - /// Smaller than operator - bool operator<( const VECTOR2& aVector ); - bool operator<=( const VECTOR2& aVector ); - - /// Greater than operator - bool operator>( const VECTOR2& aVector ); - bool operator>=( const VECTOR2& aVector ); - - /// Casting to int vector - // operator VECTOR2(); - - /// Type casting operator for the class wxPoint - //operator wxPoint(); - - // friend ostream& operator<< ( ostream &stream, const VECTOR2& vector ); -}; - - -// ---------------------- -// --- Implementation --- -// ---------------------- - -template VECTOR2::VECTOR2() -{ - x = y = 0.0; -} - -template VECTOR2::VECTOR2( wxPoint const& aPoint ) -{ - x = T( aPoint.x ); - y = T( aPoint.y ); -} - -template VECTOR2::VECTOR2( wxSize const& aSize ) -{ - x = T( aSize.x ); - y = T( aSize.y ); -} - -template VECTOR2::VECTOR2( T aX, T aY ) -{ - x = aX; - y = aY; -} - -// Not required at the moment for this class -//template VECTOR2::~VECTOR2() -//{ -// // TODO Auto-generated destructor stub -//} - -template T VECTOR2::EuclideanNorm() -{ - return sqrt( ( *this ) * ( *this ) ); -} - -template T VECTOR2::Angle() -{ - return atan2(y, x); -} - -template VECTOR2 VECTOR2::Perpendicular() -{ - VECTOR2 perpendicular(-y, x); - return perpendicular; -} - -/* -template ostream &operator<<( ostream &aStream, const VECTOR2& aVector ) -{ - aStream << "[ " << aVector.x << " | " << aVector.y << " ]"; - return aStream; -} -*/ - -template VECTOR2 &VECTOR2::operator=( const VECTOR2& aVector ) -{ - x = aVector.x; - y = aVector.y; - return *this; -} - -template VECTOR2 &VECTOR2::operator+=( const VECTOR2& aVector ) -{ - x += aVector.x; - y += aVector.y; - return *this; -} - -template VECTOR2& VECTOR2::operator-=( const VECTOR2& aVector ) -{ - x -= aVector.x; - y -= aVector.y; - return *this; -} - -//template VECTOR2::operator wxPoint() -//{ -// wxPoint point; -// point.x = (int) x; -// point.y = (int) y; -// return point; -//} -// - -//// Use correct rounding for casting to wxPoint -//template<> VECTOR2::operator wxPoint() -//{ -// wxPoint point; -// point.x = point.x >= 0 ? (int) ( x + 0.5 ) : (int) ( x - 0.5 ); -// point.y = point.y >= 0 ? (int) ( y + 0.5 ) : (int) ( y - 0.5 ); -// return point; -//} - -// Use correct rounding for casting double->int -//template<> VECTOR2::operator VECTOR2() -//{ -// VECTOR2 vector; -// vector.x = vector.x >= 0 ? (int) ( x + 0.5 ) : (int) ( x - 0.5 ); -// vector.y = vector.y >= 0 ? (int) ( y + 0.5 ) : (int) ( y - 0.5 ); -// return vector; -//} - -template VECTOR2 VECTOR2::operator+( const VECTOR2& aVector ) -{ - return VECTOR2 ( x + aVector.x, y + aVector.y ); -} - -template VECTOR2 VECTOR2::operator-( const VECTOR2& aVector ) -{ - return VECTOR2 ( x - aVector.x, y - aVector.y ); -} - -template VECTOR2 VECTOR2::operator-() -{ - return VECTOR2 ( -x, -y ); -} - -template T VECTOR2::operator*( const VECTOR2& aVector ) -{ - return aVector.x * x + aVector.y * y; -} - -template VECTOR2 VECTOR2::operator*( const T& aFactor ) -{ - VECTOR2 vector( x * aFactor, y * aFactor ); - return vector; -} - -template VECTOR2 operator*( const T& aFactor, const VECTOR2& aVector){ - VECTOR2 vector( aVector.x * aFactor, aVector.y * aFactor ); - return vector; -} - -template T VECTOR2::operator^( const VECTOR2& aVector ) -{ - return x * aVector.y - y * aVector.x; -} - -template bool VECTOR2::operator<( const VECTOR2& aVector ) -{ - // VECTOR2 vector( aVector ); - // need a specialization for T = int because of overflow: - // return (double( x ) * x + double( y ) * y) < (double( o.x ) * o.x + double( o.y ) * y); - return ( *this * *this ) < ( aVector * aVector ); -} - -template bool VECTOR2::operator<=( const VECTOR2& aVector ) -{ - return ( *this * *this ) <= ( aVector * aVector ); -} - -template bool VECTOR2::operator>( const VECTOR2& aVector ) -{ - return ( *this * *this ) > ( aVector * aVector ); -} - -template bool VECTOR2::operator>=( const VECTOR2& aVector ) -{ - return ( *this * *this ) >= ( aVector * aVector ); -} - -template bool const VECTOR2::operator==( VECTOR2 const& aVector ) -{ - return ( aVector.x == x ) && ( aVector.y == y ); -} - -template bool const VECTOR2::operator!=( VECTOR2 const& aVector ) -{ - return ( aVector.x != x ) || ( aVector.y != y ); -} - - -/** - * Class BOX2 - * is a description of a rectangle in a cartesion coordinate system. - */ -template class BOX2 -{ -public: - BOX2() : x(0), y(0), width(0), height(0) {} - - BOX2( T aX, T aY, T aWidth, T aHeight ): - x( aX ), y( aY ), width( aWidth ), height( aHeight ) - {} - - BOX2( const VECTOR2& aPos, const VECTOR2& aSize ) : - x( aPos.x ), y( aPos.y ), width( aSize.x ), height( aSize.y ) - {} - - BOX2( const wxPoint& aPos, const wxSize& aSize ) : - x( aPos.x ), y( aPos.y ), width( aSize.x ), height( aSize.y ) - {} - - /* - BOX2( const EDA_RECT& aRect ): - x( aRect.x ), y( aRect.y ), width( aRect.width ), height( aRect.height ) - {} - */ - - /// Constructor with a wxPoint as argument? - - VECTOR2 GetSize() const { return VECTOR2 ( width, height ); } - VECTOR2 GetPosition() const { return VECTOR2 ( x, y ); } - - T GetLeft() const { return x; } - void SetLeft( T n ) { width += x - n; x = n; } - void MoveLeftTo( T n ) { x = n; } - - T GetTop() const { return y; } - void SetTop( T n ) { height += y - n; y = n; } - void MoveTopTo( T n ) { y = n; } - - T GetBottom() const { return y + height; } - void SetBottom( T n ) { height += n - ( y + height ); } - void MoveBottomTo( T n ) { y = n - height; } - - T GetRight() const { return x + width; } - void SetRight( T n ) { width += n - ( x + width ); } - void MoveRightTo( T n ) { x = n - width; } - - VECTOR2 GetLeftTop() const { return VECTOR2( x , y ); } - void SetLeftTop( const VECTOR2& pt ) { width += x - pt.x; height += y - pt.y; x = pt.x; y = pt.y; } - void MoveLeftTopTo( const VECTOR2 &pt ) { x = pt.x; y = pt.y; } - - VECTOR2 GetLeftBottom() const { return VECTOR2( x, y + height ); } - void SetLeftBottom( const VECTOR2& pt ) { width += x - pt.x; height += pt.y - (y + height); x = pt.x; } - void MoveLeftBottomTo( const VECTOR2& pt ) { x = pt.x; y = pt.y - height; } - - VECTOR2 GetRightTop() const { return VECTOR2( x + width, y ); } - void SetRightTop( const VECTOR2& pt ) { width += pt.x - ( x + width ); height += y - pt.y; y = pt.y; } - void MoveRightTopTo( const VECTOR2& pt ) { x = pt.x - width; y = pt.y; } - - VECTOR2 GetRightBottom() const { return VECTOR2( x + width, y + height ); } - void SetRightBottom( const VECTOR2& pt ) { width += pt.x - ( x + width ); height += pt.y - ( y + height); } - void MoveRightBottomTo( const VECTOR2& pt ) { x = pt.x - width; y = pt.y - height; } - - VECTOR2 GetCentre() const { return VECTOR2( x + width/2, y + height/2 ); } - void SetCentre( const VECTOR2& pt ) { MoveCentreTo( pt ); } - void MoveCentreTo( const VECTOR2& pt ) { x += pt.x - (x + width/2), y += pt.y - (y + height/2); } - - /** - * Function Normalize - * ensures that the height ant width are positive. - */ - void Normalize() - { - if( height < 0 ) - { - height = -height; - y -= height; - } - - if( width < 0 ) - { - width = -width; - x -= width; - } - } - - T x, y, width, height; -}; - - -typedef VECTOR2 DPOINT; -typedef DPOINT DSIZE; - -typedef BOX2 DBOX; - - -#endif // VECTOR2D_H_ diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index c35d951f86..b68f1cc42a 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -45,7 +45,7 @@ #include #include -#include +#include // Configuration entry names. From c5e9b187aecf965b1fb8cb0b26b876944da4b639 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 28 Mar 2013 17:38:33 +0100 Subject: [PATCH 002/415] Added template MATRIX3x3 for handling general 3x3 matrices (for future usage in GAL) --- include/math/matrix3x3.h | 383 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 383 insertions(+) create mode 100644 include/math/matrix3x3.h diff --git a/include/math/matrix3x3.h b/include/math/matrix3x3.h new file mode 100644 index 0000000000..597d049405 --- /dev/null +++ b/include/math/matrix3x3.h @@ -0,0 +1,383 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * + * Matrix class (3x3) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + *- + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef MATRIX3X3_H_ +#define MATRIX3X3_H_ + +#include + +/** + * Class MATRIX3x3 describes a general 3x3 matrix. + * + * Any linear transformation in 2D can be represented + * by a homogeneous 3x3 transformation matrix. Given a vector x, the linear transformation + * with the transformation matrix M is given as + * + * x' = M * x + * + * To represent an affine transformation, homogeneous coordinates have to be used. That means + * the 2D-vector (x, y) has to be extended to a 3D-vector by a third component (x, y, 1). + * + * Transformations can be easily combined by matrix multiplication. + * + * A * (B * x ) = (A * B) * x + * ( A, B: transformation matrices, x: vector ) + * + * This class was implemented using templates, so flexible type combinations are possible. + * + */ + +// Forward declaration for template friends +template class MATRIX3x3; +template std::ostream& operator<<( std::ostream& stream, const MATRIX3x3& matrix ); + +template +class MATRIX3x3 +{ +public: + T m_data[3][3]; + + /** + * @brief Constructor + * + * Initialize all matrix members to zero. + */ + MATRIX3x3(); + + /** + * @brief Constructor + * + * Initialize with given matrix members + * + * @param a00 is the component [0,0]. + * @param a01 is the component [0,1]. + * @param a02 is the component [0,2]. + * @param a11 is the component [1,1]. + * @param a12 is the component [1,2]. + * @param a13 is the component [1,3]. + * @param a20 is the component [2,0]. + * @param a21 is the component [2,1]. + * @param a00 is the component [2,2]. + */ + MATRIX3x3( T a00, T a01, T a02, T a10, T a11, T a12, T a20, T a21, T a22 ); + + /** + * @brief Set the matrix to the identity matrix. + * + * The diagonal components of the matrix are set to 1. + */ + void SetIdentity( void ); + + /** + * @brief Set the translation components of the matrix. + * + * @param aTranslation is the translation, specified as 2D-vector. + */ + void SetTranslation( VECTOR2 aTranslation ); + + /** + * @brief Get the translation components of the matrix. + * + * @return is the translation (2D-vector). + */ + VECTOR2 GetTranslation( void ) const; + + /** + * @brief Set the rotation components of the matrix. + * + * The angle needs to have a positive value for an anti-clockwise rotation. + * + * @param aAngle is the rotation angle in [rad]. + */ + void SetRotation( T aAngle ); + + /** + * @brief Set the scale components of the matrix. + * + * @param aScale contains the scale factors, specified as 2D-vector. + */ + void SetScale( VECTOR2 aScale ); + + /** + * @brief Get the scale components of the matrix. + * + * @return the scale factors, specified as 2D-vector. + */ + VECTOR2 GetScale( void ) const; + + /** + * @brief Compute the determinant of the matrix. + * + * @return the determinant value. + */ + T Determinant( void ) const; + + /** + * @brief Determine the inverse of the matrix. + * + * The inverse of a transformation matrix can be used to revert a transformation. + * + * x = Minv * ( M * x ) + * ( M: transformation matrix, Minv: inverse transformation matrix, x: vector) + * + * @return the inverse matrix. + */ + MATRIX3x3 Inverse( void ) const; + + /** + * @brief Get the transpose of the matrix. + * + * @return the transpose matrix. + */ + MATRIX3x3 Transpose( void ) const; + + /** + * @brief Output to a stream. + */ + friend std::ostream& operator<<( std::ostream& stream, const MATRIX3x3& matrix ); + +}; + +// Operators + +//! @brief Matrix multiplication +template MATRIX3x3 const operator*( MATRIX3x3 const& a, MATRIX3x3 const& b ); + +//! @brief Multiplication with a 2D vector, the 3rd z-component is assumed to be 1 +template VECTOR2 const operator*( MATRIX3x3 const& a, VECTOR2 const& b ); + +//! @brief Multiplication with a scalar +template MATRIX3x3 const operator*( MATRIX3x3 const& a, T scalar ); +template MATRIX3x3 const operator*( T scalar, MATRIX3x3 const& matrix ); + +// ---------------------- +// --- Implementation --- +// ---------------------- + +template MATRIX3x3::MATRIX3x3() +{ + for( int j = 0; j < 3; j++ ) + { + for( int i = 0; i < 3; i++ ) + { + m_data[i][j] = 0.0; + } + } +} + + +template MATRIX3x3::MATRIX3x3( T a00, T a01, T a02, T a10, T a11, T a12, T a20, T a21, + T a22 ) +{ + m_data[0][0] = a00; + m_data[0][1] = a01; + m_data[0][2] = a02; + + m_data[1][0] = a10; + m_data[1][1] = a11; + m_data[1][2] = a12; + + m_data[2][0] = a20; + m_data[2][1] = a21; + m_data[2][2] = a22; +} + + +template void MATRIX3x3::SetIdentity( void ) +{ + for( int j = 0; j < 3; j++ ) + { + for( int i = 0; i < 3; i++ ) + { + if( i == j ) + m_data[i][j] = 1.0; + else + m_data[i][j] = 0.0; + } + } +} + + +template void MATRIX3x3::SetTranslation( VECTOR2 aTranslation ) +{ + m_data[0][2] = aTranslation.x; + m_data[1][2] = aTranslation.y; +} + + +template VECTOR2 MATRIX3x3::GetTranslation( void ) const +{ + VECTOR2 result; + result.x = m_data[0][2]; + result.y = m_data[1][2]; + return result; +} + + +template void MATRIX3x3::SetRotation( T aAngle ) +{ + T cosValue = cos( aAngle ); + T sinValue = sin( aAngle ); + m_data[0][0] = cosValue; + m_data[0][1] = -sinValue; + m_data[1][0] = sinValue; + m_data[1][1] = cosValue; +} + + +template void MATRIX3x3::SetScale( VECTOR2 aScale ) +{ + m_data[0][0] = aScale.x; + m_data[1][1] = aScale.y; +} + + +template VECTOR2 MATRIX3x3::GetScale( void ) const +{ + VECTOR2 result( m_data[0][0], m_data[1][1] ); + return result; +} + + +template MATRIX3x3 const operator*( MATRIX3x3 const& a, MATRIX3x3 const& b ) +{ + MATRIX3x3 result; + + for( int i = 0; i < 3; i++ ) + { + for( int j = 0; j < 3; j++ ) + { + result.m_data[i][j] = a.m_data[i][0] * b.m_data[0][j] + a.m_data[i][1] * b.m_data[1][j] + + a.m_data[i][2] * b.m_data[2][j]; + } + } + + return result; +} + + +template VECTOR2 const operator*( MATRIX3x3 const& matrix, + VECTOR2 const& vector ) +{ + VECTOR2 result( 0, 0 ); + result.x = matrix.m_data[0][0] * vector.x + matrix.m_data[0][1] * vector.y + + matrix.m_data[0][2]; + result.y = matrix.m_data[1][0] * vector.x + matrix.m_data[1][1] * vector.y + + matrix.m_data[1][2]; + + return result; +} + + +template T MATRIX3x3::Determinant( void ) const +{ + return m_data[0][0] * ( m_data[1][1] * m_data[2][2] - m_data[1][2] * m_data[2][1] ) + - m_data[0][1] * ( m_data[1][0] * m_data[2][2] - m_data[1][2] * m_data[2][0] ) + + m_data[0][2] * ( m_data[1][0] * m_data[2][1] - m_data[1][1] * m_data[2][0] ); +} + + +template MATRIX3x3 const operator*( MATRIX3x3 const& matrix, S scalar ) +{ + MATRIX3x3 result; + + for( int i = 0; i < 3; i++ ) + { + for( int j = 0; j < 3; j++ ) + { + result.m_data[i][j] = matrix.m_data[i][j] * scalar; + } + } + + return result; +} + + +template MATRIX3x3 const operator*( S scalar, MATRIX3x3 const& matrix ) +{ + return matrix * scalar; +} + + +template MATRIX3x3 MATRIX3x3::Inverse( void ) const +{ + MATRIX3x3 result; + + result.m_data[0][0] = m_data[1][1] * m_data[2][2] - m_data[2][1] * m_data[1][2]; + result.m_data[0][1] = m_data[0][2] * m_data[2][1] - m_data[2][2] * m_data[0][1]; + result.m_data[0][2] = m_data[0][1] * m_data[1][2] - m_data[1][1] * m_data[0][2]; + + result.m_data[1][0] = m_data[1][2] * m_data[2][0] - m_data[2][2] * m_data[1][0]; + result.m_data[1][1] = m_data[0][0] * m_data[2][2] - m_data[2][0] * m_data[0][2]; + result.m_data[1][2] = m_data[0][2] * m_data[1][0] - m_data[1][2] * m_data[0][0]; + + result.m_data[2][0] = m_data[1][0] * m_data[2][1] - m_data[2][0] * m_data[1][1]; + result.m_data[2][1] = m_data[0][1] * m_data[2][0] - m_data[2][1] * m_data[0][0]; + result.m_data[2][2] = m_data[0][0] * m_data[1][1] - m_data[1][0] * m_data[0][1]; + + return result * ( 1.0 / Determinant() ); +} + + +template MATRIX3x3 MATRIX3x3::Transpose( void ) const +{ + MATRIX3x3 result; + + for( int i = 0; i < 3; i++ ) + { + for( int j = 0; j < 3; j++ ) + { + result.m_data[j][i] = m_data[i][j]; + } + } + + return result; +} + + +template std::ostream& operator<<( std::ostream& aStream, const MATRIX3x3& aMatrix ) +{ + for( int i = 0; i < 3; i++ ) + { + aStream << "| "; + + for( int j = 0; j < 3; j++ ) + { + aStream << aMatrix.m_data[i][j]; + aStream << " "; + } + + aStream << "|"; + aStream << "\n"; + } + + return aStream; +} + +/* Default specializations */ +typedef MATRIX3x3 MATRIX3x3D; + +#endif /* MATRIX3X3_H_ */ From 4b11862ecc85f28adf77158b45cc9a95d1c890e5 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 28 Mar 2013 17:42:15 +0100 Subject: [PATCH 003/415] Added class COLOR4D that contains color representation with 4 components (RGBA) (for future usage in GAL) --- common/gal/color4d.cpp | 40 +++++++++++++ include/gal/color4d.h | 130 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 170 insertions(+) create mode 100644 common/gal/color4d.cpp create mode 100644 include/gal/color4d.h diff --git a/common/gal/color4d.cpp b/common/gal/color4d.cpp new file mode 100644 index 0000000000..d5c50cc843 --- /dev/null +++ b/common/gal/color4d.cpp @@ -0,0 +1,40 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * + * Color class + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +using namespace KiGfx; + +const bool COLOR4D::operator==( const COLOR4D& aColor ) +{ + return a == aColor.a && r == aColor.r && g == aColor.g && b == aColor.b; +} + + +const bool COLOR4D::operator!=( const COLOR4D& aColor ) +{ + return a != aColor.a || r != aColor.r || g != aColor.g || b != aColor.b; +} diff --git a/include/gal/color4d.h b/include/gal/color4d.h new file mode 100644 index 0000000000..4914829c33 --- /dev/null +++ b/include/gal/color4d.h @@ -0,0 +1,130 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * + * Color class + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef COLOR4D_H_ +#define COLOR4D_H_ + +namespace KiGfx +{ +/** + * Class COLOR4D + * is the color representation with 4 components: red, green, blue, alpha. + */ +class COLOR4D +{ +public: + // Constructor (creates the Color 0,0,0,0) + COLOR4D() : + r( 0 ), g( 0 ), b( 0 ), a( 1 ) + { + } + + /** + * @brief Constructor + * + * @param aRed is the red component [0.0 .. 1.0]. + * @param aGreen is the green component [0.0 .. 1.0]. + * @param aBlue is the blue component [0.0 .. 1.0]. + * @param aAlpha is the alpha value [0.0 .. 1.0]. + */ + COLOR4D( double aRed, double aGreen, double aBlue, double aAlpha ) : + r( aRed ), g( aGreen ), b( aBlue ), a( aAlpha ) + { + } + + /** + * Function Highlight + * Makes the color brighter by a given factor. + * @param aFactor Specifies how bright the color should become (valid values: 0.0 .. 1.0). + * @return COLOR4D& Brightened color. + */ + COLOR4D& Highlight( double aFactor ) + { + r = (double) r * (1.0 - aFactor) + aFactor; + g = (double) g * (1.0 - aFactor) + aFactor; + b = (double) b * (1.0 - aFactor) + aFactor; + + return *this; + } + + /** + * Function Darken + * Makes the color darker by a given factor. + * @param aFactor Specifies how dark the color should become (valid values: 0.0 .. 1.0). + * @return COLOR4D& Darkened color. + */ + COLOR4D& Darken( double aFactor ) + { + r = (double) r * (1.0 - aFactor); + g = (double) g * (1.0 - aFactor); + b = (double) b * (1.0 - aFactor); + + return *this; + } + + /** + * Function Highlighted + * Returns a color that is brighter by a given factor, without modifying object. + * @param aFactor Specifies how bright the color should become (valid values: 0.0 .. 1.0). + * @return COLOR4D Highlightedd color. + */ + COLOR4D Highlighted( double aFactor ) const + { + return COLOR4D( r * (1.0 - aFactor) + aFactor, + g * (1.0 - aFactor) + aFactor, + b * (1.0 - aFactor) + aFactor, + a ); + } + + /** + * Function Darkened + * Returns a color that is darker by a given factor, without modifying object. + * @param aFactor Specifies how dark the color should become (valid values: 0.0 .. 1.0). + * @return COLOR4D Darkened color. + */ + COLOR4D Darkened( double aFactor ) const + { + return COLOR4D( r * (1.0 - aFactor), + g * (1.0 - aFactor), + b * (1.0 - aFactor), + a ); + } + + /// @brief Equality operator, are two colors equal + const bool operator==( const COLOR4D& aColor ); + + /// @brief Not equality operator, are two colors not equal + const bool operator!=( const COLOR4D& aColor ); + + // Color components: red, green, blue, alpha + double r; ///< Red component + double g; ///< Green component + double b; ///< Blue component + double a; ///< Alpha component +}; +} // namespace KiGfx + +#endif /* COLOR4D_H_ */ From 3efdcb95cd216c5f707f5a21f6265629d563e7fb Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 28 Mar 2013 17:48:29 +0100 Subject: [PATCH 004/415] Added template RTREE and class VIEW_RTREE (R-tree for fast spatial indexing of VIEW items; for future usage in GAL) --- include/rtree.h | 1758 +++++++++++++++++++++++++++++++++++++ include/view/view_rtree.h | 92 ++ 2 files changed, 1850 insertions(+) create mode 100644 include/rtree.h create mode 100644 include/view/view_rtree.h diff --git a/include/rtree.h b/include/rtree.h new file mode 100644 index 0000000000..d507f84e11 --- /dev/null +++ b/include/rtree.h @@ -0,0 +1,1758 @@ +/* + * R-Tree index + * + * from http://www.superliminal.com/ + * + * LICENSE : Entirely free for all uses. Enjoy! + * + * AUTORS + * - 1983 Original algorithm and test code by Antonin Guttman and Michael Stonebraker, UC Berkely + * - 1994 ANCI C ported from original test code by Melinda Green - melinda@superliminal.com + * - 1995 Sphere volume fix for degeneracy problem submitted by Paul Brook + * - 2004 Templated C++ port by Greg Douglas + * - 2008 Portability issues fixed by Maxence Laurent + */ + +#ifndef RTREE_H +#define RTREE_H + +// NOTE This file compiles under MSVC 6 SP5 and MSVC .Net 2003 it may not work on other compilers without modification. + +// NOTE These next few lines may be win32 specific, you may need to modify them to compile on other platform +#include +#include +#include +#include + +#define ASSERT assert // RTree uses ASSERT( condition ) +#ifndef Min + #define Min std::min +#endif // Min +#ifndef Max + #define Max std::max +#endif // Max + +// +// RTree.h +// + +#define RTREE_TEMPLATE template +#define RTREE_SEARCH_TEMPLATE template +#define RTREE_QUAL RTree +#define RTREE_SEARCH_QUAL RTree + +#define RTREE_DONT_USE_MEMPOOLS // This version does not contain a fixed memory allocator, fill in lines with EXAMPLE to implement one. +#define RTREE_USE_SPHERICAL_VOLUME // Better split classification, may be slower on some systems + +// Fwd decl +class RTFileStream; // File I/O helper class, look below for implementation and notes. + + +/// \class RTree +/// Implementation of RTree, a multidimensional bounding rectangle tree. +/// Example usage: For a 3-dimensional tree use RTree myTree; +/// +/// This modified, templated C++ version by Greg Douglas at Auran (http://www.auran.com) +/// +/// DATATYPE Referenced data, should be int, void*, obj* etc. no larger than sizeof and simple type +/// ELEMTYPE Type of element such as int or float +/// NUMDIMS Number of dimensions such as 2 or 3 +/// ELEMTYPEREAL Type of element that allows fractional and large values such as float or double, for use in volume calcs +/// +/// NOTES: Inserting and removing data requires the knowledge of its constant Minimal Bounding Rectangle. +/// This version uses new/delete for nodes, I recommend using a fixed size allocator for efficiency. +/// Instead of using a callback function for returned results, I recommend and efficient pre-sized, grow-only memory +/// array similar to MFC CArray or STL Vector for returning search query result. +/// +template +class RTree +{ +protected: + + struct Node; // Fwd decl. Used by other internal structs and iterator +public: + + // These constant must be declared after Branch and before Node struct + // Stuck up here for MSVC 6 compiler. NSVC .NET 2003 is much happier. + enum { + MAXNODES = TMAXNODES, ///< Max elements in node + MINNODES = TMINNODES, ///< Min elements in node + }; +public: + + RTree(); + virtual ~RTree(); + + /// Insert entry + /// \param a_min Min of bounding rect + /// \param a_max Max of bounding rect + /// \param a_dataId Positive Id of data. Maybe zero, but negative numbers not allowed. + void Insert( const ELEMTYPE a_min[NUMDIMS], + const ELEMTYPE a_max[NUMDIMS], + const DATATYPE& a_dataId ); + + /// Remove entry + /// \param a_min Min of bounding rect + /// \param a_max Max of bounding rect + /// \param a_dataId Positive Id of data. Maybe zero, but negative numbers not allowed. + void Remove( const ELEMTYPE a_min[NUMDIMS], + const ELEMTYPE a_max[NUMDIMS], + const DATATYPE& a_dataId ); + + /// Find all within search rectangle + /// \param a_min Min of search bounding rect + /// \param a_max Max of search bounding rect + /// \param a_searchResult Search result array. Caller should set grow size. Function will reset, not append to array. + /// \param a_resultCallback Callback function to return result. Callback should return 'true' to continue searching + /// \param a_context User context to pass as parameter to a_resultCallback + /// \return Returns the number of entries found + int Search( const ELEMTYPE a_min[NUMDIMS], + const ELEMTYPE a_max[NUMDIMS], + bool a_resultCallback( DATATYPE a_data, void* a_context ), + void* a_context ); + + template + int Search( const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], VISITOR& a_visitor ) + { + #ifdef _DEBUG + + for( int index = 0; index 0; } + + /// Access the current data element. Caller must be sure iterator is not NULL first. + DATATYPE& operator*() + { + ASSERT( IsNotNull() ); + StackElement& curTos = m_stack[m_tos - 1]; + return curTos.m_node->m_branch[curTos.m_branchIndex].m_data; + } + + /// Access the current data element. Caller must be sure iterator is not NULL first. + const DATATYPE& operator*() const + { + ASSERT( IsNotNull() ); + StackElement& curTos = m_stack[m_tos - 1]; + return curTos.m_node->m_branch[curTos.m_branchIndex].m_data; + } + + /// Find the next data element + bool operator++() { return FindNextData(); } + + /// Get the bounds for this node + void GetBounds( ELEMTYPE a_min[NUMDIMS], ELEMTYPE a_max[NUMDIMS] ) + { + ASSERT( IsNotNull() ); + StackElement& curTos = m_stack[m_tos - 1]; + Branch& curBranch = curTos.m_node->m_branch[curTos.m_branchIndex]; + + for( int index = 0; index < NUMDIMS; ++index ) + { + a_min[index] = curBranch.m_rect.m_min[index]; + a_max[index] = curBranch.m_rect.m_max[index]; + } + } + +private: + + /// Reset iterator + void Init() { m_tos = 0; } + + /// Find the next data element in the tree (For internal use only) + bool FindNextData() + { + for( ; ; ) + { + if( m_tos <= 0 ) + { + return false; + } + + StackElement curTos = Pop(); // Copy stack top cause it may change as we use it + + if( curTos.m_node->IsLeaf() ) + { + // Keep walking through data while we can + if( curTos.m_branchIndex + 1 < curTos.m_node->m_count ) + { + // There is more data, just point to the next one + Push( curTos.m_node, curTos.m_branchIndex + 1 ); + return true; + } + + // No more data, so it will fall back to previous level + } + else + { + if( curTos.m_branchIndex + 1 < curTos.m_node->m_count ) + { + // Push sibling on for future tree walk + // This is the 'fall back' node when we finish with the current level + Push( curTos.m_node, curTos.m_branchIndex + 1 ); + } + + // Since cur node is not a leaf, push first of next level to get deeper into the tree + Node* nextLevelnode = curTos.m_node->m_branch[curTos.m_branchIndex].m_child; + Push( nextLevelnode, 0 ); + + // If we pushed on a new leaf, exit as the data is ready at TOS + if( nextLevelnode->IsLeaf() ) + { + return true; + } + } + } + } + + /// Push node and branch onto iteration stack (For internal use only) + void Push( Node* a_node, int a_branchIndex ) + { + m_stack[m_tos].m_node = a_node; + m_stack[m_tos].m_branchIndex = a_branchIndex; + ++m_tos; + ASSERT( m_tos <= MAX_STACK ); + } + + /// Pop element off iteration stack (For internal use only) + StackElement& Pop() + { + ASSERT( m_tos > 0 ); + --m_tos; + return m_stack[m_tos]; + } + + StackElement m_stack[MAX_STACK]; ///< Stack as we are doing iteration instead of recursion + int m_tos; ///< Top Of Stack index + + friend class RTree; // Allow hiding of non-public functions while allowing manipulation by logical owner + }; + + + /// Get 'first' for iteration + void GetFirst( Iterator& a_it ) + { + a_it.Init(); + Node* first = m_root; + + while( first ) + { + if( first->IsInternalNode() && first->m_count > 1 ) + { + a_it.Push( first, 1 ); // Descend sibling branch later + } + else if( first->IsLeaf() ) + { + if( first->m_count ) + { + a_it.Push( first, 0 ); + } + + break; + } + + first = first->m_branch[0].m_child; + } + } + + /// Get Next for iteration + void GetNext( Iterator& a_it ) { ++a_it; } + + /// Is iterator NULL, or at end? + bool IsNull( Iterator& a_it ) { return a_it.IsNull(); } + + /// Get object at iterator position + DATATYPE& GetAt( Iterator& a_it ) { return *a_it; } +protected: + + /// Minimal bounding rectangle (n-dimensional) + struct Rect + { + ELEMTYPE m_min[NUMDIMS]; ///< Min dimensions of bounding box + ELEMTYPE m_max[NUMDIMS]; ///< Max dimensions of bounding box + }; + + /// May be data or may be another subtree + /// The parents level determines this. + /// If the parents level is 0, then this is data + struct Branch + { + Rect m_rect; ///< Bounds + union + { + Node* m_child; ///< Child node + DATATYPE m_data; ///< Data Id or Ptr + }; + }; + + /// Node for each branch level + struct Node + { + bool IsInternalNode() { return m_level > 0; } // Not a leaf, but a internal node + bool IsLeaf() { return m_level == 0; } // A leaf, contains data + + int m_count; ///< Count + int m_level; ///< Leaf is zero, others positive + Branch m_branch[MAXNODES]; ///< Branch + }; + + /// A link list of nodes for reinsertion after a delete operation + struct ListNode + { + ListNode* m_next; ///< Next in list + Node* m_node; ///< Node + }; + + /// Variables for finding a split partition + struct PartitionVars + { + int m_partition[MAXNODES + 1]; + int m_total; + int m_minFill; + int m_taken[MAXNODES + 1]; + int m_count[2]; + Rect m_cover[2]; + ELEMTYPEREAL m_area[2]; + + Branch m_branchBuf[MAXNODES + 1]; + int m_branchCount; + Rect m_coverSplit; + ELEMTYPEREAL m_coverSplitArea; + }; + + Node* AllocNode(); + void FreeNode( Node* a_node ); + void InitNode( Node* a_node ); + void InitRect( Rect* a_rect ); + bool InsertRectRec( Rect* a_rect, + const DATATYPE& a_id, + Node* a_node, + Node** a_newNode, + int a_level ); + bool InsertRect( Rect* a_rect, const DATATYPE& a_id, Node** a_root, int a_level ); + Rect NodeCover( Node* a_node ); + bool AddBranch( Branch* a_branch, Node* a_node, Node** a_newNode ); + void DisconnectBranch( Node* a_node, int a_index ); + int PickBranch( Rect* a_rect, Node* a_node ); + Rect CombineRect( Rect* a_rectA, Rect* a_rectB ); + void SplitNode( Node* a_node, Branch* a_branch, Node** a_newNode ); + ELEMTYPEREAL RectSphericalVolume( Rect* a_rect ); + ELEMTYPEREAL RectVolume( Rect* a_rect ); + ELEMTYPEREAL CalcRectVolume( Rect* a_rect ); + void GetBranches( Node* a_node, Branch* a_branch, PartitionVars* a_parVars ); + void ChoosePartition( PartitionVars* a_parVars, int a_minFill ); + void LoadNodes( Node* a_nodeA, Node* a_nodeB, PartitionVars* a_parVars ); + void InitParVars( PartitionVars* a_parVars, int a_maxRects, int a_minFill ); + void PickSeeds( PartitionVars* a_parVars ); + void Classify( int a_index, int a_group, PartitionVars* a_parVars ); + bool RemoveRect( Rect* a_rect, const DATATYPE& a_id, Node** a_root ); + bool RemoveRectRec( Rect* a_rect, + const DATATYPE& a_id, + Node* a_node, + ListNode** a_listNode ); + ListNode* AllocListNode(); + void FreeListNode( ListNode* a_listNode ); + bool Overlap( Rect* a_rectA, Rect* a_rectB ); + void ReInsert( Node* a_node, ListNode** a_listNode ); + + bool Search( Node * a_node, Rect * a_rect, int& a_foundCount, bool a_resultCallback( + DATATYPE a_data, + void* a_context ), void* a_context ); + + template + bool Search( Node* a_node, Rect* a_rect, VISITOR& a_visitor ) + { + ASSERT( a_node ); + ASSERT( a_node->m_level >= 0 ); + ASSERT( a_rect ); + + if( a_node->IsInternalNode() ) // This is an internal node in the tree + { + for( int index = 0; index < a_node->m_count; ++index ) + { + if( Overlap( a_rect, &a_node->m_branch[index].m_rect ) ) + { + if( !Search( a_node->m_branch[index].m_child, a_rect, a_visitor ) ) + { + return false; // Don't continue searching + } + } + } + } + else // This is a leaf node + { + for( int index = 0; index < a_node->m_count; ++index ) + { + if( Overlap( a_rect, &a_node->m_branch[index].m_rect ) ) + { + DATATYPE& id = a_node->m_branch[index].m_data; + + a_visitor( id ); + } + } + } + + return true; // Continue searching + } + + void RemoveAllRec( Node* a_node ); + void Reset(); + void CountRec( Node* a_node, int& a_count ); + + bool SaveRec( Node* a_node, RTFileStream& a_stream ); + bool LoadRec( Node* a_node, RTFileStream& a_stream ); + + Node* m_root; ///< Root of tree + ELEMTYPEREAL m_unitSphereVolume; ///< Unit sphere constant for required number of dimensions +}; + + +// Because there is not stream support, this is a quick and dirty file I/O helper. +// Users will likely replace its usage with a Stream implementation from their favorite API. +class RTFileStream +{ + FILE* m_file; +public: + + + RTFileStream() + { + m_file = NULL; + } + + ~RTFileStream() + { + Close(); + } + + bool OpenRead( const char* a_fileName ) + { + m_file = fopen( a_fileName, "rb" ); + + if( !m_file ) + { + return false; + } + + return true; + } + + bool OpenWrite( const char* a_fileName ) + { + m_file = fopen( a_fileName, "wb" ); + + if( !m_file ) + { + return false; + } + + return true; + } + + void Close() + { + if( m_file ) + { + fclose( m_file ); + m_file = NULL; + } + } + + template + size_t Write( const TYPE& a_value ) + { + ASSERT( m_file ); + return fwrite( (void*) &a_value, sizeof(a_value), 1, m_file ); + } + + template + size_t WriteArray( const TYPE* a_array, int a_count ) + { + ASSERT( m_file ); + return fwrite( (void*) a_array, sizeof(TYPE) * a_count, 1, m_file ); + } + + template + size_t Read( TYPE& a_value ) + { + ASSERT( m_file ); + return fread( (void*) &a_value, sizeof(a_value), 1, m_file ); + } + + template + size_t ReadArray( TYPE* a_array, int a_count ) + { + ASSERT( m_file ); + return fread( (void*) a_array, sizeof(TYPE) * a_count, 1, m_file ); + } +}; + + +RTREE_TEMPLATE RTREE_QUAL::RTree() +{ + ASSERT( MAXNODES > MINNODES ); + ASSERT( MINNODES > 0 ); + + + // We only support machine word size simple data type eg. integer index or object pointer. + // Since we are storing as union with non data branch + ASSERT( sizeof(DATATYPE) == sizeof(void*) || sizeof(DATATYPE) == sizeof(int) ); + + // Precomputed volumes of the unit spheres for the first few dimensions + const float UNIT_SPHERE_VOLUMES[] = + { + 0.000000f, 2.000000f, 3.141593f, // Dimension 0,1,2 + 4.188790f, 4.934802f, 5.263789f, // Dimension 3,4,5 + 5.167713f, 4.724766f, 4.058712f, // Dimension 6,7,8 + 3.298509f, 2.550164f, 1.884104f, // Dimension 9,10,11 + 1.335263f, 0.910629f, 0.599265f, // Dimension 12,13,14 + 0.381443f, 0.235331f, 0.140981f, // Dimension 15,16,17 + 0.082146f, 0.046622f, 0.025807f, // Dimension 18,19,20 + }; + + m_root = AllocNode(); + m_root->m_level = 0; + m_unitSphereVolume = (ELEMTYPEREAL) UNIT_SPHERE_VOLUMES[NUMDIMS]; +} + + +RTREE_TEMPLATE +RTREE_QUAL::~RTree() { + Reset(); // Free, or reset node memory +} + + +RTREE_TEMPLATE +void RTREE_QUAL::Insert( const ELEMTYPE a_min[NUMDIMS], + const ELEMTYPE a_max[NUMDIMS], + const DATATYPE& a_dataId ) +{ +#ifdef _DEBUG + + for( int index = 0; indexIsInternalNode() ) // not a leaf node + { + for( int index = 0; index < a_node->m_count; ++index ) + { + CountRec( a_node->m_branch[index].m_child, a_count ); + } + } + else // A leaf node + { + a_count += a_node->m_count; + } +} + + +RTREE_TEMPLATE +bool RTREE_QUAL::Load( const char* a_fileName ) +{ + RemoveAll(); // Clear existing tree + + RTFileStream stream; + + if( !stream.OpenRead( a_fileName ) ) + { + return false; + } + + bool result = Load( stream ); + + stream.Close(); + + return result; +}; + + +RTREE_TEMPLATE +bool RTREE_QUAL::Load( RTFileStream& a_stream ) +{ + // Write some kind of header + int _dataFileId = ('R' << 0) | ('T' << 8) | ('R' << 16) | ('E' << 24); + int _dataSize = sizeof(DATATYPE); + int _dataNumDims = NUMDIMS; + int _dataElemSize = sizeof(ELEMTYPE); + int _dataElemRealSize = sizeof(ELEMTYPEREAL); + int _dataMaxNodes = TMAXNODES; + int _dataMinNodes = TMINNODES; + + int dataFileId = 0; + int dataSize = 0; + int dataNumDims = 0; + int dataElemSize = 0; + int dataElemRealSize = 0; + int dataMaxNodes = 0; + int dataMinNodes = 0; + + a_stream.Read( dataFileId ); + a_stream.Read( dataSize ); + a_stream.Read( dataNumDims ); + a_stream.Read( dataElemSize ); + a_stream.Read( dataElemRealSize ); + a_stream.Read( dataMaxNodes ); + a_stream.Read( dataMinNodes ); + + bool result = false; + + // Test if header was valid and compatible + if( (dataFileId == _dataFileId) + && (dataSize == _dataSize) + && (dataNumDims == _dataNumDims) + && (dataElemSize == _dataElemSize) + && (dataElemRealSize == _dataElemRealSize) + && (dataMaxNodes == _dataMaxNodes) + && (dataMinNodes == _dataMinNodes) + ) + { + // Recursively load tree + result = LoadRec( m_root, a_stream ); + } + + return result; +} + + +RTREE_TEMPLATE +bool RTREE_QUAL::LoadRec( Node* a_node, RTFileStream& a_stream ) +{ + a_stream.Read( a_node->m_level ); + a_stream.Read( a_node->m_count ); + + if( a_node->IsInternalNode() ) // not a leaf node + { + for( int index = 0; index < a_node->m_count; ++index ) + { + Branch* curBranch = &a_node->m_branch[index]; + + a_stream.ReadArray( curBranch->m_rect.m_min, NUMDIMS ); + a_stream.ReadArray( curBranch->m_rect.m_max, NUMDIMS ); + + curBranch->m_child = AllocNode(); + LoadRec( curBranch->m_child, a_stream ); + } + } + else // A leaf node + { + for( int index = 0; index < a_node->m_count; ++index ) + { + Branch* curBranch = &a_node->m_branch[index]; + + a_stream.ReadArray( curBranch->m_rect.m_min, NUMDIMS ); + a_stream.ReadArray( curBranch->m_rect.m_max, NUMDIMS ); + + a_stream.Read( curBranch->m_data ); + } + } + + return true; // Should do more error checking on I/O operations +} + + +RTREE_TEMPLATE +bool RTREE_QUAL::Save( const char* a_fileName ) +{ + RTFileStream stream; + + if( !stream.OpenWrite( a_fileName ) ) + { + return false; + } + + bool result = Save( stream ); + + stream.Close(); + + return result; +} + + +RTREE_TEMPLATE +bool RTREE_QUAL::Save( RTFileStream& a_stream ) +{ + // Write some kind of header + int dataFileId = ('R' << 0) | ('T' << 8) | ('R' << 16) | ('E' << 24); + int dataSize = sizeof(DATATYPE); + int dataNumDims = NUMDIMS; + int dataElemSize = sizeof(ELEMTYPE); + int dataElemRealSize = sizeof(ELEMTYPEREAL); + int dataMaxNodes = TMAXNODES; + int dataMinNodes = TMINNODES; + + a_stream.Write( dataFileId ); + a_stream.Write( dataSize ); + a_stream.Write( dataNumDims ); + a_stream.Write( dataElemSize ); + a_stream.Write( dataElemRealSize ); + a_stream.Write( dataMaxNodes ); + a_stream.Write( dataMinNodes ); + + // Recursively save tree + bool result = SaveRec( m_root, a_stream ); + + return result; +} + + +RTREE_TEMPLATE +bool RTREE_QUAL::SaveRec( Node* a_node, RTFileStream& a_stream ) +{ + a_stream.Write( a_node->m_level ); + a_stream.Write( a_node->m_count ); + + if( a_node->IsInternalNode() ) // not a leaf node + { + for( int index = 0; index < a_node->m_count; ++index ) + { + Branch* curBranch = &a_node->m_branch[index]; + + a_stream.WriteArray( curBranch->m_rect.m_min, NUMDIMS ); + a_stream.WriteArray( curBranch->m_rect.m_max, NUMDIMS ); + + SaveRec( curBranch->m_child, a_stream ); + } + } + else // A leaf node + { + for( int index = 0; index < a_node->m_count; ++index ) + { + Branch* curBranch = &a_node->m_branch[index]; + + a_stream.WriteArray( curBranch->m_rect.m_min, NUMDIMS ); + a_stream.WriteArray( curBranch->m_rect.m_max, NUMDIMS ); + + a_stream.Write( curBranch->m_data ); + } + } + + return true; // Should do more error checking on I/O operations +} + + +RTREE_TEMPLATE +void RTREE_QUAL::RemoveAll() +{ + // Delete all existing nodes + Reset(); + + m_root = AllocNode(); + m_root->m_level = 0; +} + + +RTREE_TEMPLATE +void RTREE_QUAL::Reset() +{ +#ifdef RTREE_DONT_USE_MEMPOOLS + // Delete all existing nodes + RemoveAllRec( m_root ); +#else // RTREE_DONT_USE_MEMPOOLS + // Just reset memory pools. We are not using complex types + // EXAMPLE +#endif // RTREE_DONT_USE_MEMPOOLS +} + + +RTREE_TEMPLATE +void RTREE_QUAL::RemoveAllRec( Node* a_node ) +{ + ASSERT( a_node ); + ASSERT( a_node->m_level >= 0 ); + + if( a_node->IsInternalNode() ) // This is an internal node in the tree + { + for( int index = 0; index < a_node->m_count; ++index ) + { + RemoveAllRec( a_node->m_branch[index].m_child ); + } + } + + FreeNode( a_node ); +} + + +RTREE_TEMPLATE +typename RTREE_QUAL::Node* RTREE_QUAL::AllocNode() +{ + Node* newNode; + +#ifdef RTREE_DONT_USE_MEMPOOLS + newNode = new Node; +#else // RTREE_DONT_USE_MEMPOOLS + // EXAMPLE +#endif // RTREE_DONT_USE_MEMPOOLS + InitNode( newNode ); + return newNode; +} + + +RTREE_TEMPLATE +void RTREE_QUAL::FreeNode( Node* a_node ) +{ + ASSERT( a_node ); + +#ifdef RTREE_DONT_USE_MEMPOOLS + delete a_node; +#else // RTREE_DONT_USE_MEMPOOLS + // EXAMPLE +#endif // RTREE_DONT_USE_MEMPOOLS +} + + +// Allocate space for a node in the list used in DeletRect to +// store Nodes that are too empty. +RTREE_TEMPLATE +typename RTREE_QUAL::ListNode* RTREE_QUAL::AllocListNode() +{ +#ifdef RTREE_DONT_USE_MEMPOOLS + return new ListNode; +#else // RTREE_DONT_USE_MEMPOOLS + // EXAMPLE +#endif // RTREE_DONT_USE_MEMPOOLS +} + + +RTREE_TEMPLATE +void RTREE_QUAL::FreeListNode( ListNode* a_listNode ) +{ +#ifdef RTREE_DONT_USE_MEMPOOLS + delete a_listNode; +#else // RTREE_DONT_USE_MEMPOOLS + // EXAMPLE +#endif // RTREE_DONT_USE_MEMPOOLS +} + + +RTREE_TEMPLATE +void RTREE_QUAL::InitNode( Node* a_node ) +{ + a_node->m_count = 0; + a_node->m_level = -1; +} + + +RTREE_TEMPLATE +void RTREE_QUAL::InitRect( Rect* a_rect ) +{ + for( int index = 0; index < NUMDIMS; ++index ) + { + a_rect->m_min[index] = (ELEMTYPE) 0; + a_rect->m_max[index] = (ELEMTYPE) 0; + } +} + + +// Inserts a new data rectangle into the index structure. +// Recursively descends tree, propagates splits back up. +// Returns 0 if node was not split. Old node updated. +// If node was split, returns 1 and sets the pointer pointed to by +// new_node to point to the new node. Old node updated to become one of two. +// The level argument specifies the number of steps up from the leaf +// level to insert; e.g. a data rectangle goes in at level = 0. +RTREE_TEMPLATE +bool RTREE_QUAL::InsertRectRec( Rect* a_rect, + const DATATYPE& a_id, + Node* a_node, + Node** a_newNode, + int a_level ) +{ + ASSERT( a_rect && a_node && a_newNode ); + ASSERT( a_level >= 0 && a_level <= a_node->m_level ); + + int index; + Branch branch; + Node* otherNode; + + // Still above level for insertion, go down tree recursively + if( a_node->m_level > a_level ) + { + index = PickBranch( a_rect, a_node ); + + if( !InsertRectRec( a_rect, a_id, a_node->m_branch[index].m_child, &otherNode, a_level ) ) + { + // Child was not split + a_node->m_branch[index].m_rect = + CombineRect( a_rect, &(a_node->m_branch[index].m_rect) ); + return false; + } + else // Child was split + { + a_node->m_branch[index].m_rect = NodeCover( a_node->m_branch[index].m_child ); + branch.m_child = otherNode; + branch.m_rect = NodeCover( otherNode ); + return AddBranch( &branch, a_node, a_newNode ); + } + } + else if( a_node->m_level == a_level ) // Have reached level for insertion. Add rect, split if necessary + { + branch.m_rect = *a_rect; + branch.m_child = (Node*) a_id; + // Child field of leaves contains id of data record + return AddBranch( &branch, a_node, a_newNode ); + } + else + { + // Should never occur + ASSERT( 0 ); + return false; + } +} + + +// Insert a data rectangle into an index structure. +// InsertRect provides for splitting the root; +// returns 1 if root was split, 0 if it was not. +// The level argument specifies the number of steps up from the leaf +// level to insert; e.g. a data rectangle goes in at level = 0. +// InsertRect2 does the recursion. +// +RTREE_TEMPLATE +bool RTREE_QUAL::InsertRect( Rect* a_rect, const DATATYPE& a_id, Node** a_root, int a_level ) +{ + ASSERT( a_rect && a_root ); + ASSERT( a_level >= 0 && a_level <= (*a_root)->m_level ); +#ifdef _DEBUG + + for( int index = 0; index < NUMDIMS; ++index ) + { + ASSERT( a_rect->m_min[index] <= a_rect->m_max[index] ); + } + +#endif // _DEBUG + + Node* newRoot; + Node* newNode; + Branch branch; + + if( InsertRectRec( a_rect, a_id, *a_root, &newNode, a_level ) ) // Root split + { + newRoot = AllocNode(); // Grow tree taller and new root + newRoot->m_level = (*a_root)->m_level + 1; + branch.m_rect = NodeCover( *a_root ); + branch.m_child = *a_root; + AddBranch( &branch, newRoot, NULL ); + branch.m_rect = NodeCover( newNode ); + branch.m_child = newNode; + AddBranch( &branch, newRoot, NULL ); + *a_root = newRoot; + return true; + } + + return false; +} + + +// Find the smallest rectangle that includes all rectangles in branches of a node. +RTREE_TEMPLATE +typename RTREE_QUAL::Rect RTREE_QUAL::NodeCover( Node* a_node ) +{ + ASSERT( a_node ); + + int firstTime = true; + Rect rect; + InitRect( &rect ); + + for( int index = 0; index < a_node->m_count; ++index ) + { + if( firstTime ) + { + rect = a_node->m_branch[index].m_rect; + firstTime = false; + } + else + { + rect = CombineRect( &rect, &(a_node->m_branch[index].m_rect) ); + } + } + + return rect; +} + + +// Add a branch to a node. Split the node if necessary. +// Returns 0 if node not split. Old node updated. +// Returns 1 if node split, sets *new_node to address of new node. +// Old node updated, becomes one of two. +RTREE_TEMPLATE +bool RTREE_QUAL::AddBranch( Branch* a_branch, Node* a_node, Node** a_newNode ) +{ + ASSERT( a_branch ); + ASSERT( a_node ); + + if( a_node->m_count < MAXNODES ) // Split won't be necessary + { + a_node->m_branch[a_node->m_count] = *a_branch; + ++a_node->m_count; + + return false; + } + else + { + ASSERT( a_newNode ); + + SplitNode( a_node, a_branch, a_newNode ); + return true; + } +} + + +// Disconnect a dependent node. +// Caller must return (or stop using iteration index) after this as count has changed +RTREE_TEMPLATE +void RTREE_QUAL::DisconnectBranch( Node* a_node, int a_index ) +{ + ASSERT( a_node && (a_index >= 0) && (a_index < MAXNODES) ); + ASSERT( a_node->m_count > 0 ); + + // Remove element by swapping with the last element to prevent gaps in array + a_node->m_branch[a_index] = a_node->m_branch[a_node->m_count - 1]; + + --a_node->m_count; +} + + +// Pick a branch. Pick the one that will need the smallest increase +// in area to accomodate the new rectangle. This will result in the +// least total area for the covering rectangles in the current node. +// In case of a tie, pick the one which was smaller before, to get +// the best resolution when searching. +RTREE_TEMPLATE +int RTREE_QUAL::PickBranch( Rect* a_rect, Node* a_node ) +{ + ASSERT( a_rect && a_node ); + + bool firstTime = true; + ELEMTYPEREAL increase; + ELEMTYPEREAL bestIncr = (ELEMTYPEREAL) -1; + ELEMTYPEREAL area; + ELEMTYPEREAL bestArea; + int best; + Rect tempRect; + + for( int index = 0; index < a_node->m_count; ++index ) + { + Rect* curRect = &a_node->m_branch[index].m_rect; + area = CalcRectVolume( curRect ); + tempRect = CombineRect( a_rect, curRect ); + increase = CalcRectVolume( &tempRect ) - area; + + if( (increase < bestIncr) || firstTime ) + { + best = index; + bestArea = area; + bestIncr = increase; + firstTime = false; + } + else if( (increase == bestIncr) && (area < bestArea) ) + { + best = index; + bestArea = area; + bestIncr = increase; + } + } + + return best; +} + + +// Combine two rectangles into larger one containing both +RTREE_TEMPLATE +typename RTREE_QUAL::Rect RTREE_QUAL::CombineRect( Rect* a_rectA, Rect* a_rectB ) +{ + ASSERT( a_rectA && a_rectB ); + + Rect newRect; + + for( int index = 0; index < NUMDIMS; ++index ) + { + newRect.m_min[index] = Min( a_rectA->m_min[index], a_rectB->m_min[index] ); + newRect.m_max[index] = Max( a_rectA->m_max[index], a_rectB->m_max[index] ); + } + + return newRect; +} + + +// Split a node. +// Divides the nodes branches and the extra one between two nodes. +// Old node is one of the new ones, and one really new one is created. +// Tries more than one method for choosing a partition, uses best result. +RTREE_TEMPLATE +void RTREE_QUAL::SplitNode( Node* a_node, Branch* a_branch, Node** a_newNode ) +{ + ASSERT( a_node ); + ASSERT( a_branch ); + + // Could just use local here, but member or external is faster since it is reused + PartitionVars localVars; + PartitionVars* parVars = &localVars; + int level; + + // Load all the branches into a buffer, initialize old node + level = a_node->m_level; + GetBranches( a_node, a_branch, parVars ); + + // Find partition + ChoosePartition( parVars, MINNODES ); + + // Put branches from buffer into 2 nodes according to chosen partition + *a_newNode = AllocNode(); + (*a_newNode)->m_level = a_node->m_level = level; + LoadNodes( a_node, *a_newNode, parVars ); + + ASSERT( (a_node->m_count + (*a_newNode)->m_count) == parVars->m_total ); +} + + +// Calculate the n-dimensional volume of a rectangle +RTREE_TEMPLATE +ELEMTYPEREAL RTREE_QUAL::RectVolume( Rect* a_rect ) +{ + ASSERT( a_rect ); + + ELEMTYPEREAL volume = (ELEMTYPEREAL) 1; + + for( int index = 0; indexm_max[index] - a_rect->m_min[index]; + } + + ASSERT( volume >= (ELEMTYPEREAL) 0 ); + + return volume; +} + + +// The exact volume of the bounding sphere for the given Rect +RTREE_TEMPLATE +ELEMTYPEREAL RTREE_QUAL::RectSphericalVolume( Rect* a_rect ) +{ + ASSERT( a_rect ); + + ELEMTYPEREAL sumOfSquares = (ELEMTYPEREAL) 0; + ELEMTYPEREAL radius; + + for( int index = 0; index < NUMDIMS; ++index ) + { + ELEMTYPEREAL halfExtent = + ( (ELEMTYPEREAL) a_rect->m_max[index] - (ELEMTYPEREAL) a_rect->m_min[index] ) * 0.5f; + sumOfSquares += halfExtent * halfExtent; + } + + radius = (ELEMTYPEREAL) sqrt( sumOfSquares ); + + // Pow maybe slow, so test for common dims like 2,3 and just use x*x, x*x*x. + if( NUMDIMS == 3 ) + { + return radius * radius * radius * m_unitSphereVolume; + } + else if( NUMDIMS == 2 ) + { + return radius * radius * m_unitSphereVolume; + } + else + { + return (ELEMTYPEREAL) (pow( radius, NUMDIMS ) * m_unitSphereVolume); + } +} + + +// Use one of the methods to calculate retangle volume +RTREE_TEMPLATE +ELEMTYPEREAL RTREE_QUAL::CalcRectVolume( Rect* a_rect ) +{ +#ifdef RTREE_USE_SPHERICAL_VOLUME + return RectSphericalVolume( a_rect ); // Slower but helps certain merge cases +#else // RTREE_USE_SPHERICAL_VOLUME + return RectVolume( a_rect ); // Faster but can cause poor merges +#endif // RTREE_USE_SPHERICAL_VOLUME +} + + +// Load branch buffer with branches from full node plus the extra branch. +RTREE_TEMPLATE +void RTREE_QUAL::GetBranches( Node* a_node, Branch* a_branch, PartitionVars* a_parVars ) +{ + ASSERT( a_node ); + ASSERT( a_branch ); + + ASSERT( a_node->m_count == MAXNODES ); + + // Load the branch buffer + for( int index = 0; index < MAXNODES; ++index ) + { + a_parVars->m_branchBuf[index] = a_node->m_branch[index]; + } + + a_parVars->m_branchBuf[MAXNODES] = *a_branch; + a_parVars->m_branchCount = MAXNODES + 1; + + // Calculate rect containing all in the set + a_parVars->m_coverSplit = a_parVars->m_branchBuf[0].m_rect; + + for( int index = 1; index < MAXNODES + 1; ++index ) + { + a_parVars->m_coverSplit = + CombineRect( &a_parVars->m_coverSplit, &a_parVars->m_branchBuf[index].m_rect ); + } + + a_parVars->m_coverSplitArea = CalcRectVolume( &a_parVars->m_coverSplit ); + + InitNode( a_node ); +} + + +// Method #0 for choosing a partition: +// As the seeds for the two groups, pick the two rects that would waste the +// most area if covered by a single rectangle, i.e. evidently the worst pair +// to have in the same group. +// Of the remaining, one at a time is chosen to be put in one of the two groups. +// The one chosen is the one with the greatest difference in area expansion +// depending on which group - the rect most strongly attracted to one group +// and repelled from the other. +// If one group gets too full (more would force other group to violate min +// fill requirement) then other group gets the rest. +// These last are the ones that can go in either group most easily. +RTREE_TEMPLATE +void RTREE_QUAL::ChoosePartition( PartitionVars* a_parVars, int a_minFill ) +{ + ASSERT( a_parVars ); + + ELEMTYPEREAL biggestDiff; + int group, chosen, betterGroup; + + InitParVars( a_parVars, a_parVars->m_branchCount, a_minFill ); + PickSeeds( a_parVars ); + + while( ( (a_parVars->m_count[0] + a_parVars->m_count[1]) < a_parVars->m_total ) + && ( a_parVars->m_count[0] < (a_parVars->m_total - a_parVars->m_minFill) ) + && ( a_parVars->m_count[1] < (a_parVars->m_total - a_parVars->m_minFill) ) ) + { + biggestDiff = (ELEMTYPEREAL) -1; + + for( int index = 0; indexm_total; ++index ) + { + if( !a_parVars->m_taken[index] ) + { + Rect* curRect = &a_parVars->m_branchBuf[index].m_rect; + Rect rect0 = CombineRect( curRect, &a_parVars->m_cover[0] ); + Rect rect1 = CombineRect( curRect, &a_parVars->m_cover[1] ); + ELEMTYPEREAL growth0 = CalcRectVolume( &rect0 ) - a_parVars->m_area[0]; + ELEMTYPEREAL growth1 = CalcRectVolume( &rect1 ) - a_parVars->m_area[1]; + ELEMTYPEREAL diff = growth1 - growth0; + + if( diff >= 0 ) + { + group = 0; + } + else + { + group = 1; + diff = -diff; + } + + if( diff > biggestDiff ) + { + biggestDiff = diff; + chosen = index; + betterGroup = group; + } + else if( (diff == biggestDiff) + && (a_parVars->m_count[group] < a_parVars->m_count[betterGroup]) ) + { + chosen = index; + betterGroup = group; + } + } + } + + Classify( chosen, betterGroup, a_parVars ); + } + + // If one group too full, put remaining rects in the other + if( (a_parVars->m_count[0] + a_parVars->m_count[1]) < a_parVars->m_total ) + { + if( a_parVars->m_count[0] >= a_parVars->m_total - a_parVars->m_minFill ) + { + group = 1; + } + else + { + group = 0; + } + + for( int index = 0; indexm_total; ++index ) + { + if( !a_parVars->m_taken[index] ) + { + Classify( index, group, a_parVars ); + } + } + } + + ASSERT( (a_parVars->m_count[0] + a_parVars->m_count[1]) == a_parVars->m_total ); + ASSERT( (a_parVars->m_count[0] >= a_parVars->m_minFill) + && (a_parVars->m_count[1] >= a_parVars->m_minFill) ); +} + + +// Copy branches from the buffer into two nodes according to the partition. +RTREE_TEMPLATE +void RTREE_QUAL::LoadNodes( Node* a_nodeA, Node* a_nodeB, PartitionVars* a_parVars ) +{ + ASSERT( a_nodeA ); + ASSERT( a_nodeB ); + ASSERT( a_parVars ); + + for( int index = 0; index < a_parVars->m_total; ++index ) + { + ASSERT( a_parVars->m_partition[index] == 0 || a_parVars->m_partition[index] == 1 ); + + if( a_parVars->m_partition[index] == 0 ) + { + AddBranch( &a_parVars->m_branchBuf[index], a_nodeA, NULL ); + } + else if( a_parVars->m_partition[index] == 1 ) + { + AddBranch( &a_parVars->m_branchBuf[index], a_nodeB, NULL ); + } + } +} + + +// Initialize a PartitionVars structure. +RTREE_TEMPLATE +void RTREE_QUAL::InitParVars( PartitionVars* a_parVars, int a_maxRects, int a_minFill ) +{ + ASSERT( a_parVars ); + + a_parVars->m_count[0] = a_parVars->m_count[1] = 0; + a_parVars->m_area[0] = a_parVars->m_area[1] = (ELEMTYPEREAL) 0; + a_parVars->m_total = a_maxRects; + a_parVars->m_minFill = a_minFill; + + for( int index = 0; index < a_maxRects; ++index ) + { + a_parVars->m_taken[index] = false; + a_parVars->m_partition[index] = -1; + } +} + + +RTREE_TEMPLATE +void RTREE_QUAL::PickSeeds( PartitionVars* a_parVars ) +{ + int seed0, seed1; + ELEMTYPEREAL worst, waste; + ELEMTYPEREAL area[MAXNODES + 1]; + + for( int index = 0; indexm_total; ++index ) + { + area[index] = CalcRectVolume( &a_parVars->m_branchBuf[index].m_rect ); + } + + worst = -a_parVars->m_coverSplitArea - 1; + + for( int indexA = 0; indexA < a_parVars->m_total - 1; ++indexA ) + { + for( int indexB = indexA + 1; indexB < a_parVars->m_total; ++indexB ) + { + Rect oneRect = CombineRect( &a_parVars->m_branchBuf[indexA].m_rect, + &a_parVars->m_branchBuf[indexB].m_rect ); + waste = CalcRectVolume( &oneRect ) - area[indexA] - area[indexB]; + + if( waste > worst ) + { + worst = waste; + seed0 = indexA; + seed1 = indexB; + } + } + } + + Classify( seed0, 0, a_parVars ); + Classify( seed1, 1, a_parVars ); +} + + +// Put a branch in one of the groups. +RTREE_TEMPLATE +void RTREE_QUAL::Classify( int a_index, int a_group, PartitionVars* a_parVars ) +{ + ASSERT( a_parVars ); + ASSERT( !a_parVars->m_taken[a_index] ); + + a_parVars->m_partition[a_index] = a_group; + a_parVars->m_taken[a_index] = true; + + if( a_parVars->m_count[a_group] == 0 ) + { + a_parVars->m_cover[a_group] = a_parVars->m_branchBuf[a_index].m_rect; + } + else + { + a_parVars->m_cover[a_group] = CombineRect( &a_parVars->m_branchBuf[a_index].m_rect, + &a_parVars->m_cover[a_group] ); + } + + a_parVars->m_area[a_group] = CalcRectVolume( &a_parVars->m_cover[a_group] ); + ++a_parVars->m_count[a_group]; +} + + +// Delete a data rectangle from an index structure. +// Pass in a pointer to a Rect, the tid of the record, ptr to ptr to root node. +// Returns 1 if record not found, 0 if success. +// RemoveRect provides for eliminating the root. +RTREE_TEMPLATE +bool RTREE_QUAL::RemoveRect( Rect* a_rect, const DATATYPE& a_id, Node** a_root ) +{ + ASSERT( a_rect && a_root ); + ASSERT( *a_root ); + + Node* tempNode; + ListNode* reInsertList = NULL; + + if( !RemoveRectRec( a_rect, a_id, *a_root, &reInsertList ) ) + { + // Found and deleted a data item + // Reinsert any branches from eliminated nodes + while( reInsertList ) + { + tempNode = reInsertList->m_node; + + for( int index = 0; index < tempNode->m_count; ++index ) + { + InsertRect( &(tempNode->m_branch[index].m_rect), + tempNode->m_branch[index].m_data, + a_root, + tempNode->m_level ); + } + + ListNode* remLNode = reInsertList; + reInsertList = reInsertList->m_next; + + FreeNode( remLNode->m_node ); + FreeListNode( remLNode ); + } + + // Check for redundant root (not leaf, 1 child) and eliminate + if( (*a_root)->m_count == 1 && (*a_root)->IsInternalNode() ) + { + tempNode = (*a_root)->m_branch[0].m_child; + + ASSERT( tempNode ); + FreeNode( *a_root ); + *a_root = tempNode; + } + + return false; + } + else + { + return true; + } +} + + +// Delete a rectangle from non-root part of an index structure. +// Called by RemoveRect. Descends tree recursively, +// merges branches on the way back up. +// Returns 1 if record not found, 0 if success. +RTREE_TEMPLATE +bool RTREE_QUAL::RemoveRectRec( Rect* a_rect, + const DATATYPE& a_id, + Node* a_node, + ListNode** a_listNode ) +{ + ASSERT( a_rect && a_node && a_listNode ); + ASSERT( a_node->m_level >= 0 ); + + if( a_node->IsInternalNode() ) // not a leaf node + { + for( int index = 0; index < a_node->m_count; ++index ) + { + if( Overlap( a_rect, &(a_node->m_branch[index].m_rect) ) ) + { + if( !RemoveRectRec( a_rect, a_id, a_node->m_branch[index].m_child, a_listNode ) ) + { + if( a_node->m_branch[index].m_child->m_count >= MINNODES ) + { + // child removed, just resize parent rect + a_node->m_branch[index].m_rect = + NodeCover( a_node->m_branch[index].m_child ); + } + else + { + // child removed, not enough entries in node, eliminate node + ReInsert( a_node->m_branch[index].m_child, a_listNode ); + DisconnectBranch( a_node, index ); // Must return after this call as count has changed + } + + return false; + } + } + } + + return true; + } + else // A leaf node + { + for( int index = 0; index < a_node->m_count; ++index ) + { + if( a_node->m_branch[index].m_child == (Node*) a_id ) + { + DisconnectBranch( a_node, index ); // Must return after this call as count has changed + return false; + } + } + + return true; + } +} + + +// Decide whether two rectangles overlap. +RTREE_TEMPLATE +bool RTREE_QUAL::Overlap( Rect* a_rectA, Rect* a_rectB ) +{ + ASSERT( a_rectA && a_rectB ); + + for( int index = 0; index < NUMDIMS; ++index ) + { + if( a_rectA->m_min[index] > a_rectB->m_max[index] + || a_rectB->m_min[index] > a_rectA->m_max[index] ) + { + return false; + } + } + + return true; +} + + +// Add a node to the reinsertion list. All its branches will later +// be reinserted into the index structure. +RTREE_TEMPLATE +void RTREE_QUAL::ReInsert( Node* a_node, ListNode** a_listNode ) +{ + ListNode* newListNode; + + newListNode = AllocListNode(); + newListNode->m_node = a_node; + newListNode->m_next = *a_listNode; + *a_listNode = newListNode; +} + + +// Search in an index tree or subtree for all data retangles that overlap the argument rectangle. +RTREE_TEMPLATE +bool RTREE_QUAL::Search( Node* a_node, Rect* a_rect, int& a_foundCount, bool a_resultCallback( + DATATYPE a_data, + void* a_context ), void* a_context ) +{ + ASSERT( a_node ); + ASSERT( a_node->m_level >= 0 ); + ASSERT( a_rect ); + + if( a_node->IsInternalNode() ) // This is an internal node in the tree + { + for( int index = 0; index < a_node->m_count; ++index ) + { + if( Overlap( a_rect, &a_node->m_branch[index].m_rect ) ) + { + if( !Search( a_node->m_branch[index].m_child, a_rect, a_foundCount, + a_resultCallback, a_context ) ) + { + return false; // Don't continue searching + } + } + } + } + else // This is a leaf node + { + for( int index = 0; index < a_node->m_count; ++index ) + { + if( Overlap( a_rect, &a_node->m_branch[index].m_rect ) ) + { + DATATYPE& id = a_node->m_branch[index].m_data; + + // NOTE: There are different ways to return results. Here's where to modify + if( &a_resultCallback ) + { + ++a_foundCount; + + if( !a_resultCallback( id, a_context ) ) + { + return false; // Don't continue searching + } + } + } + } + } + + return true; // Continue searching +} + + +#undef RTREE_TEMPLATE +#undef RTREE_QUAL +#undef RTREE_SEARCH_TEMPLATE +#undef RTREE_SEARCH_QUAL + +#endif // RTREE_H diff --git a/include/view/view_rtree.h b/include/view/view_rtree.h new file mode 100644 index 0000000000..4762dfc691 --- /dev/null +++ b/include/view/view_rtree.h @@ -0,0 +1,92 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __VIEW_RTREE_H +#define __VIEW_RTREE_H + +#include + +#include + +namespace KiGfx +{ +typedef RTree VIEW_RTREE_BASE; + +/** + * Class VIEW_RTREE - + * Implements an R-tree for fast spatial indexing of VIEW items. + * Non-owning. + */ +class VIEW_RTREE : public VIEW_RTREE_BASE +{ +public: + + /** + * Function Insert() + * Inserts an item into the tree. Item's bounding box is taken via its ViewBBox() method. + */ + void Insert( VIEW_ITEM* aItem ) + { + const BOX2I& bbox = aItem->ViewBBox(); + const int mmin[2] = { bbox.GetX(), bbox.GetY() }; + const int mmax[2] = { bbox.GetRight(), bbox.GetBottom() }; + + VIEW_RTREE_BASE::Insert( mmin, mmax, aItem ); + } + + /** + * Function Remove() + * Removes an item from the tree. Removal is done by comparing pointers, attepmting to remove a copy + * of the item will fail. + */ + void Remove( VIEW_ITEM* aItem ) + { + // const BOX2I& bbox = aItem->ViewBBox(); + + // FIXME: use cached bbox or ptr_map to speed up pointer <-> node lookups. + const int mmin[2] = { INT_MIN, INT_MIN }; + const int mmax[2] = { INT_MAX, INT_MAX }; + + VIEW_RTREE_BASE::Remove( mmin, mmax, aItem ); + } + + /** + * Function Query() + * Executes a function object aVisitor for each item whose bounding box intersects + * with aBounds. + */ + + template + void Query( const BOX2I& aBounds, Visitor& aVisitor ) // const + { + const int mmin[2] = { aBounds.GetX(), aBounds.GetY() }; + const int mmax[2] = { aBounds.GetRight(), aBounds.GetBottom() }; + + VIEW_RTREE_BASE::Search( mmin, mmax, aVisitor ); + } + +private: +}; +} // namespace KiGfx + +#endif From c20de314ccc06779b3ea9f4a5ad6a2359da58f53 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 2 Apr 2013 08:54:03 +0200 Subject: [PATCH 005/415] Introduction of Graphics Abstraction Layer based rendering for pcbnew. New classes: - VIEW - represents view that is seen by user, takes care of layer ordering & visibility and how it is displayed (which location, how much zoomed, etc.) - VIEW_ITEM - Base class for every item that can be displayed on VIEW (the biggest change is that now it may be necessary to override ViewBBox & ViewGetLayers method for derived classes). - EDA_DRAW_PANEL_GAL - Inherits after EDA_DRAW_PANEL, displays VIEW output, right now it is not editable (in opposite to usual EDA_DRAW_PANEL). - GAL/OPENGL_GAL/CAIRO_GAL - Base Graphics Abstraction Layer class + two different flavours (Cairo is not fully supported yet), that offers methods to draw primitives using different libraries. - WX_VIEW_CONTROLS - Controller for VIEW, handles user events, allows zooming, panning, etc. - PAINTER/PCB_PAINTER - Classes that uses GAL interface to draw items (as you may have already guessed - PCB_PAINTER is a class for drawing PCB specific object, PAINTER is an abstract class). Its methods are invoked by VIEW, when an item has to be drawn. To display a new type of item - you need to implement draw(ITEM_TYPE*) method that draws it using GAL methods. - STROKE_FONT - Implements stroke font drawing using GAL methods. Most important changes to Kicad original code: * EDA_ITEM now inherits from VIEW_ITEM, which is a base class for all drawable objects. * EDA_DRAW_FRAME contains both usual EDA_DRAW_PANEL and new EDA_DRAW_PANEL_GAL, that can be switched anytime. * There are some new layers for displaying multilayer pads, vias & pads holes (these are not shown yet on the right sidebar in pcbnew) * Display order of layers is different than in previous versions (if you are curious - you may check m_galLayerOrder@pcbnew/basepcbframe.cpp). Preserving usual order would result in not very natural display, such as showing silkscreen texts on the bottom. * Introduced new hotkey (Alt+F12) and new menu option (View->Switch canvas) for switching canvas during runtime. * Some of classes (mostly derived from BOARD_ITEM) now includes ViewBBox & ViewGetLayers methods. * Removed tools/class_painter.h, as now it is extended and included in source code. Build changes: * GAL-based rendering option is turned on by a new compilation CMake option KICAD_GAL. * When compiling with CMake option KICAD_GAL=ON, GLEW and Cairo libraries are required. * GAL-related code is compiled into a static library (common/libgal). * Build with KICAD_GAL=OFF should not need any new libraries and should come out as a standard version of Kicad Currently most of items in pcbnew can be displayed using OpenGL (to be done are DIMENSIONS and MARKERS). More details about GAL can be found in: http://www.ohwr.org/attachments/1884/view-spec.pdf --- CMakeLists.txt | 22 + common/CMakeLists.txt | 31 + common/base_struct.cpp | 16 + common/drawframe.cpp | 28 + common/drawpanel.cpp | 16 + common/drawpanel_gal.cpp | 150 ++ common/gal/cairo/cairo_gal.cpp | 968 +++++++++++++ common/gal/graphics_abstraction_layer.cpp | 157 ++ common/gal/opengl/opengl_gal.cpp | 1591 +++++++++++++++++++++ common/gal/opengl/shader.cpp | 217 +++ common/gal/opengl/shader/circle.frag | 60 + common/gal/opengl/shader/circle.geom | 115 ++ common/gal/opengl/shader/circle.vert | 35 + common/gal/opengl/shader/line.frag | 37 + common/gal/opengl/shader/line.geom | 123 ++ common/gal/opengl/shader/line.vert | 35 + common/gal/opengl/shader/round.frag | 41 + common/gal/opengl/shader/round.vert | 37 + common/gal/stroke_font.cpp | 276 ++++ common/painter.cpp | 82 ++ common/profile.h | 159 ++ common/view/view.cpp | 486 +++++++ common/view/view_item.cpp | 68 + common/view/wx_view_controls.cpp | 137 ++ common/zoom.cpp | 41 +- cvpcb/CMakeLists.txt | 7 + include/base_struct.h | 11 + include/class_board_item.h | 3 + include/class_drawpanel.h | 3 + include/class_drawpanel_gal.h | 99 ++ include/gal/cairo/cairo_gal.h | 411 ++++++ include/gal/definitions.h | 34 + include/gal/graphics_abstraction_layer.h | 694 +++++++++ include/gal/opengl/opengl_gal.h | 547 +++++++ include/gal/opengl/shader.h | 153 ++ include/gal/stroke_font.h | 185 +++ include/id.h | 1 + include/layers_id_colors_and_visibility.h | 10 + include/painter.h | 216 +++ include/view/view.h | 361 +++++ include/view/view_controls.h | 117 ++ include/view/view_item.h | 180 +++ include/view/wx_view_controls.h | 85 ++ include/wxstruct.h | 29 + pcbnew/CMakeLists.txt | 7 + pcbnew/basepcbframe.cpp | 110 ++ pcbnew/class_board_item.cpp | 8 + pcbnew/class_pad.cpp | 18 + pcbnew/class_pad.h | 3 + pcbnew/class_text_mod.cpp | 17 + pcbnew/class_text_mod.h | 3 + pcbnew/class_track.cpp | 19 + pcbnew/class_track.h | 3 + pcbnew/hotkeys.cpp | 6 + pcbnew/hotkeys.h | 3 + pcbnew/menubar_pcbframe.cpp | 11 + pcbnew/pcb_painter.cpp | 421 ++++++ pcbnew/pcb_painter.h | 143 ++ tools/class_painter.h | 172 --- 59 files changed, 8844 insertions(+), 174 deletions(-) create mode 100644 common/drawpanel_gal.cpp create mode 100644 common/gal/cairo/cairo_gal.cpp create mode 100644 common/gal/graphics_abstraction_layer.cpp create mode 100644 common/gal/opengl/opengl_gal.cpp create mode 100644 common/gal/opengl/shader.cpp create mode 100644 common/gal/opengl/shader/circle.frag create mode 100644 common/gal/opengl/shader/circle.geom create mode 100644 common/gal/opengl/shader/circle.vert create mode 100644 common/gal/opengl/shader/line.frag create mode 100644 common/gal/opengl/shader/line.geom create mode 100644 common/gal/opengl/shader/line.vert create mode 100644 common/gal/opengl/shader/round.frag create mode 100644 common/gal/opengl/shader/round.vert create mode 100644 common/gal/stroke_font.cpp create mode 100644 common/painter.cpp create mode 100644 common/profile.h create mode 100644 common/view/view.cpp create mode 100644 common/view/view_item.cpp create mode 100644 common/view/wx_view_controls.cpp create mode 100644 include/class_drawpanel_gal.h create mode 100644 include/gal/cairo/cairo_gal.h create mode 100644 include/gal/definitions.h create mode 100644 include/gal/graphics_abstraction_layer.h create mode 100644 include/gal/opengl/opengl_gal.h create mode 100644 include/gal/opengl/shader.h create mode 100644 include/gal/stroke_font.h create mode 100644 include/painter.h create mode 100644 include/view/view.h create mode 100644 include/view/view_controls.h create mode 100644 include/view/view_item.h create mode 100644 include/view/wx_view_controls.h create mode 100644 pcbnew/pcb_painter.cpp create mode 100644 pcbnew/pcb_painter.h delete mode 100644 tools/class_painter.h diff --git a/CMakeLists.txt b/CMakeLists.txt index cb3fd9589e..7d2fbf142a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,6 +56,10 @@ option(KICAD_SCRIPTING_MODULES option(KICAD_SCRIPTING_WXPYTHON "set this option ON to build wxpython implementation for wx interface building in python and py.shell" ) + +option(KICAD_GAL + "set this option ON to build KICAD using Graphics Abstraction Layer as a rendering backend" + ) # when option KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES is enabled: # PYTHON_EXECUTABLE can be defined when invoking cmake @@ -189,6 +193,10 @@ if(USE_WX_GRAPHICS_CONTEXT) add_definitions(-DUSE_WX_GRAPHICS_CONTEXT) endif() +if(KICAD_GAL) + add_definitions(-DKICAD_GAL) +endif() + # Allow user to override the default settings for adding images to menu items. By default # images in menu items are enabled on all platforms except OSX. This can be over ridden by # defining -DUSE_IMAGES_IN_MENUS=ON/OFF to force the preferred behavior. @@ -257,6 +265,20 @@ add_definitions(-DWX_COMPATIBILITY) find_package(OpenGL QUIET) check_find_package_result(OPENGL_FOUND "OpenGL") +if(KICAD_GAL) +##################### +# Find GLEW library # +##################### +find_package(GLEW) +check_find_package_result(GLEW_FOUND "GLEW") + +###################### +# Find Cairo library # +###################### +find_package(Cairo 1.8.1 QUIET) +check_find_package_result(CAIRO_FOUND "Cairo") +endif(KICAD_GAL) + ###################### # Find Boost library # ###################### diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 8961793ec1..8c320220bd 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -4,12 +4,29 @@ include_directories( ./dialogs ./dialog_about ${Boost_INCLUDE_DIR} + ${CAIRO_INCLUDE_DIR} ../3d-viewer ../pcbnew ../polygon ${INC_AFTER} ) +if(KICAD_GAL) +set(GAL_SRCS + drawpanel_gal.cpp + painter.cpp + gal/graphics_abstraction_layer.cpp + gal/stroke_font.cpp + gal/color4d.cpp + gal/opengl/opengl_gal.cpp + gal/opengl/shader.cpp + gal/cairo/cairo_gal.cpp + view/wx_view_controls.cpp + ) + +add_library(gal STATIC ${GAL_SRCS}) +endif(KICAD_GAL) + set(COMMON_ABOUT_DLG_SRCS dialog_about/AboutDialog_main.cpp dialog_about/dialog_about.cpp @@ -82,6 +99,14 @@ set(COMMON_SRCS zoom.cpp ) +if(KICAD_GAL) +set(COMMON_SRCS + ${COMMON_SRCS} + view/view.cpp + view/view_item.cpp + ) +endif(KICAD_GAL) + add_library(common STATIC ${COMMON_SRCS}) set(PCB_COMMON_SRCS @@ -131,6 +156,12 @@ set(PCB_COMMON_SRCS fp_lib_table.cpp ) +if(KICAD_GAL) +set(PCB_COMMON_SRCS + ${PCB_COMMON_SRCS} + ../pcbnew/pcb_painter.cpp + ) +endif(KICAD_GAL) # add -DPCBNEW to compilation of these PCBNEW sources set_source_files_properties( ${PCB_COMMON_SRCS} PROPERTIES diff --git a/common/base_struct.cpp b/common/base_struct.cpp index 3b9cb8d3e6..4e72427c7a 100644 --- a/common/base_struct.cpp +++ b/common/base_struct.cpp @@ -222,6 +222,22 @@ EDA_ITEM& EDA_ITEM::operator=( const EDA_ITEM& aItem ) } +const BOX2I EDA_ITEM::ViewBBox() const +{ + // Basic fallback + return BOX2I( VECTOR2I( GetBoundingBox().GetOrigin() ), + VECTOR2I( GetBoundingBox().GetSize() ) ); +} + + +void EDA_ITEM::ViewGetLayers( int aLayers[], int& aCount ) const +{ + // Basic fallback + aCount = 1; + aLayers[0] = 0; +} + + #if defined(DEBUG) // A function that should have been in wxWidgets diff --git a/common/drawframe.cpp b/common/drawframe.cpp index e2b86f57c5..391041d343 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -66,6 +67,7 @@ BEGIN_EVENT_TABLE( EDA_DRAW_FRAME, EDA_BASE_FRAME ) EVT_MENU_OPEN( EDA_DRAW_FRAME::OnMenuOpen ) EVT_ACTIVATE( EDA_DRAW_FRAME::OnActivate ) EVT_MENU_RANGE( ID_ZOOM_IN, ID_ZOOM_REDRAW, EDA_DRAW_FRAME::OnZoom ) + EVT_MENU( ID_SWITCH_CANVAS, EDA_DRAW_FRAME::OnZoom ) EVT_MENU_RANGE( ID_OFFCENTER_ZOOM_IN, ID_OFFCENTER_ZOOM_OUT, EDA_DRAW_FRAME::OnZoom ) EVT_MENU_RANGE( ID_POPUP_ZOOM_START_RANGE, ID_POPUP_ZOOM_END_RANGE, EDA_DRAW_FRAME::OnZoom ) @@ -100,6 +102,8 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( wxWindow* aParent, m_HotkeysZoomAndGridList = NULL; m_canvas = NULL; + m_galCanvas = NULL; + m_galCanvasActive = false; m_messagePanel = NULL; m_currentScreen = NULL; m_toolId = ID_NO_TOOL_SELECTED; @@ -937,3 +941,27 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU ) screen->m_ScrollbarPos.x, screen->m_ScrollbarPos.y, noRefresh ); } + + +void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) +{ + if( !( aEnable ^ m_galCanvasActive ) ) + return; + + if( aEnable ) + { + m_canvas->Hide(); + m_galCanvas->Show(); + m_galCanvas->Raise(); + m_galCanvas->Refresh(); + } + else + { + m_galCanvas->Hide(); + m_canvas->Show(); + m_canvas->Raise(); + m_canvas->Refresh(); + } + + m_galCanvasActive = aEnable; +} diff --git a/common/drawpanel.cpp b/common/drawpanel.cpp index 47c2996935..cdb2db0dfe 100644 --- a/common/drawpanel.cpp +++ b/common/drawpanel.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -74,6 +75,9 @@ BEGIN_EVENT_TABLE( EDA_DRAW_PANEL, wxScrolledWindow ) EVT_ERASE_BACKGROUND( EDA_DRAW_PANEL::OnEraseBackground ) EVT_SCROLLWIN( EDA_DRAW_PANEL::OnScroll ) EVT_ACTIVATE( EDA_DRAW_PANEL::OnActivate ) +#ifdef KICAD_GAL + EVT_SIZE( EDA_DRAW_PANEL::OnSize ) +#endif EVT_MENU_RANGE( ID_PAN_UP, ID_PAN_RIGHT, EDA_DRAW_PANEL::OnPan ) END_EVENT_TABLE() @@ -1377,6 +1381,18 @@ void EDA_DRAW_PANEL::OnPan( wxCommandEvent& event ) } +#ifdef KICAD_GAL +void EDA_DRAW_PANEL::OnSize( wxSizeEvent& SizeEv ) +{ + if( GetParent()->GetGalCanvas() != NULL ) + { + GetParent()->GetGalCanvas()->SetPosition( GetPosition() ); + GetParent()->GetGalCanvas()->SetSize( GetSize() ); + } +} +#endif + + void EDA_DRAW_PANEL::EndMouseCapture( int id, int cursor, const wxString& title, bool aCallEndFunc ) { diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp new file mode 100644 index 0000000000..6a09411c7d --- /dev/null +++ b/common/drawpanel_gal.cpp @@ -0,0 +1,150 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +#define METRIC_UNIT_LENGTH (1e9) + +void EDA_DRAW_PANEL_GAL::onPaint( wxEvent& event ) +{ + m_gal->BeginDrawing(); + m_gal->SetBackgroundColor( KiGfx::COLOR4D( 0, 0, 0, 1.0 ) ); + m_gal->ClearScreen(); + m_gal->SetGridOrigin( VECTOR2D( 0, 0 ) ); + m_gal->SetGridOriginMarkerSize( 15 ); + m_gal->SetGridSize( VECTOR2D( METRIC_UNIT_LENGTH / 10000.0, METRIC_UNIT_LENGTH / 10000.0 ) ); + m_gal->SetGridDrawThreshold( 10 ); + m_gal->SetLayerDepth( 0 ); + + m_gal->DrawGrid(); + m_view->Redraw(); + + m_gal->EndDrawing(); + m_gal->Flush(); +} + + +void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent ) +{ + m_gal->ResizeScreen( aEvent.GetSize().x, aEvent.GetSize().y ); +} + + +EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWindowId, + const wxPoint& aPosition, const wxSize& aSize, + GalType aGalType ) : + wxWindow( aParentWindow, aWindowId, aPosition, aSize ), + m_screenSize( aSize.x, aSize.y ), m_parentFrame( aParentWindow ) +{ + m_gal = NULL; + m_view = NULL; + + m_galShaderPath = std::string( ::wxGetCwd().mb_str() ) + "/../../gal/opengl/shader/"; + + SwitchBackend( aGalType, false ); + SetBackgroundStyle( wxBG_STYLE_CUSTOM ); + + // Initial display settings + m_gal->SetLookAtPoint( VECTOR2D( 0, 0 ) ); + m_gal->SetZoomFactor( 1.0 ); + m_gal->ComputeWorldScreenMatrix(); + + m_view = new KiGfx::VIEW( true ); + m_view->SetGAL( m_gal ); + + // View uses layers to display EDA_ITEMs (item may be displayed on several layers, for example + // pad may be shown on pad, pad hole nad solder paste layers). There are usual copper layers + // (eg. F.Cu, B.Cu, internal and so on) and layers for displaying objects such as texts, + // silkscreen, pads, vias, etc. + for( int i = 0; i < TOTAL_LAYER_COUNT; i++ ) + { + m_view->AddLayer( i ); + } + + m_viewControls = new KiGfx::WX_VIEW_CONTROLS( m_view, this ); + + m_painter = new KiGfx::PCB_PAINTER( m_gal ); + m_view->SetPainter( m_painter ); + + // FIXME Cairo needs this to be uncommented to remove blinking on refreshing + // Connect( wxEVT_PAINT, wxEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); + Connect(KiGfx::EVT_GAL_REDRAW, wxEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); + Connect(wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this ); +} + + +EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL() +{ + if( m_painter ) + delete m_painter; + + if( m_viewControls ) + delete m_viewControls; + + if( m_view ) + delete m_view; + + if( m_gal ) + delete m_gal; +} + + +void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) +{ + if( m_gal ) + delete m_gal; + + switch( aGalType ) + { + case GAL_TYPE_OPENGL: + m_gal = new KiGfx::OPENGL_GAL( this, this, this, aUseShaders ); + static_cast (m_gal)->SetShaderPath( m_galShaderPath ); + break; + + case GAL_TYPE_CAIRO: + m_gal = new KiGfx::CAIRO_GAL( this, this, this ); + break; + } + + m_gal->SetWorldUnitLength( 1.0 / METRIC_UNIT_LENGTH * 2.54 ); // 1 inch in nanometers + m_gal->SetScreenDPI( 106 ); // Display resolution setting + m_gal->ComputeWorldScreenMatrix(); + + if( m_view ) + m_view->SetGAL( m_gal ); +} diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp new file mode 100644 index 0000000000..3b7d7e8fa8 --- /dev/null +++ b/common/gal/cairo/cairo_gal.cpp @@ -0,0 +1,968 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * + * CAIRO_GAL - Graphics Abstraction Layer for Cairo + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include + +#include + +using namespace KiGfx; + +CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, + wxEvtHandler* aPaintListener, const wxString& aName ) : + wxWindow( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxEXPAND, aName ) +{ + // Default values + fillColor = COLOR4D( 0, 0, 0, 1 ); + strokeColor = COLOR4D( 1, 1, 1, 1 ); + screenSize = VECTOR2D( 20, 20 ); // window will be soon resized + + parentWindow = aParent; + mouseListener = aMouseListener; + paintListener = aPaintListener; + + isGrouping = false; + zoomFactor = 1.0; + + SetSize( aParent->GetSize() ); + + // Connecting the event handlers + // Mouse events are skipped to the parent + this->Connect( wxEVT_SIZE, wxSizeEventHandler( CAIRO_GAL::onSize ) ); + this->Connect( wxEVT_PAINT, wxPaintEventHandler( CAIRO_GAL::onPaint ) ); + this->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( CAIRO_GAL::onEraseBackground ) ); + aParent->Connect( wxEVT_ERASE_BACKGROUND, + wxEraseEventHandler( CAIRO_GAL::onEraseBackground ) ); + aParent->GetParent()->Connect( wxEVT_ERASE_BACKGROUND, + wxEraseEventHandler( CAIRO_GAL::onEraseBackground ) ); + + SetBackgroundStyle( wxBG_STYLE_CUSTOM ); + aParent->SetBackgroundStyle( wxBG_STYLE_CUSTOM ); + aParent->GetParent()->SetBackgroundStyle( wxBG_STYLE_CUSTOM ); + + this->Connect( wxEVT_MOTION, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + this->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + this->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + this->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + this->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + this->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + + // Initialize line attributes map + lineCapMap[LINE_CAP_BUTT] = CAIRO_LINE_CAP_BUTT; + lineCapMap[LINE_CAP_ROUND] = CAIRO_LINE_CAP_ROUND; + lineCapMap[LINE_CAP_SQUARED] = CAIRO_LINE_CAP_SQUARE; + + lineJoinMap[LINE_JOIN_BEVEL] = CAIRO_LINE_JOIN_BEVEL; + lineJoinMap[LINE_JOIN_ROUND] = CAIRO_LINE_JOIN_ROUND; + lineJoinMap[LINE_JOIN_MITER] = CAIRO_LINE_JOIN_MITER; + + isDeleteSavedPixels = false; + + isGrouping = false; + + // Initialize the cursor shape + SetCursorColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); + initCursor( 21 ); + + screenSizeY = screenSize.y; + + // Allocate memory + allocateBitmaps(); + + // Set grid defaults + SetGridColor( COLOR4D( 0.5, 0.5, 0.5, 0.3 ) ); + SetCoarseGrid( 10 ); + SetGridLineWidth( 0.5 ); + + Refresh(); +} + + +CAIRO_GAL::~CAIRO_GAL() +{ + // TODO Deleting of list contents like groups and paths + delete[] bitmapBuffer; + delete[] bitmapBufferBackup; + delete wxBitmap_; +} + + +void CAIRO_GAL::onPaint( wxPaintEvent& aEvent ) +{ + PostPaint(); +} + + +void CAIRO_GAL::onEraseBackground( wxEraseEvent& aEvent ) +{ + // FIXME +} + + +void CAIRO_GAL::ResizeScreen( int aWidth, int aHeight ) +{ + deleteBitmaps(); + + screenSizeY = aHeight; + screenSize = VECTOR2D( aWidth, aHeight ); + + // Recreate the bitmaps + allocateBitmaps(); + + SetSize( wxSize( aWidth, aHeight ) ); + + PostPaint(); +} + + +void CAIRO_GAL::onSize( wxSizeEvent& aEvent ) +{ + wxSize newSize = aEvent.GetSize(); + + ResizeScreen( newSize.x, newSize.y ); +} + + +void CAIRO_GAL::skipMouseEvent( wxMouseEvent& aEvent ) +{ + // Post the mouse event to the event listener registered in constructor, if any + if( mouseListener ) + wxPostEvent( mouseListener, aEvent ); +} + + +void CAIRO_GAL::BeginDrawing() throw( int ) +{ + // The size of the client area needs to be greater than zero + clientRectangle = parentWindow->GetClientRect(); + + if( clientRectangle.width == 0 || clientRectangle.height == 0 ) + throw EXCEPTION_ZERO_CLIENT_RECTANGLE; + + // clientDC = new wxClientDC( this ); + + // Create the CAIRO surface + cairoSurface = cairo_image_surface_create_for_data( (unsigned char*) bitmapBuffer, + CAIRO_FORMAT_RGB24, clientRectangle.width, + clientRectangle.height, stride ); + cairoImage = cairo_create( cairoSurface ); + + // ----------------------------------------------------------------- + + cairo_set_antialias( cairoImage, CAIRO_ANTIALIAS_SUBPIXEL ); + + // Clear the screen + ClearScreen(); + + // Compute the world <-> screen transformations + ComputeWorldScreenMatrix(); + + cairo_matrix_init( &cairoWorldScreenMatrix, worldScreenMatrix.m_data[0][0], + worldScreenMatrix.m_data[1][0], worldScreenMatrix.m_data[0][1], + worldScreenMatrix.m_data[1][1], worldScreenMatrix.m_data[0][2], + worldScreenMatrix.m_data[1][2] ); + + cairo_set_matrix( cairoImage, &cairoWorldScreenMatrix ); + + isSetAttributes = false; + + // Start drawing with a new path + cairo_new_path( cairoImage ); + isElementAdded = true; + + cairo_set_line_join( cairoImage, lineJoinMap[lineJoin] ); + cairo_set_line_cap( cairoImage, lineCapMap[lineCap] ); + + lineWidth = 0; + + isDeleteSavedPixels = true; +} + + +void CAIRO_GAL::EndDrawing() +{ + // Force remaining objects to be drawn + Flush(); + + // FIXME Accelerate support for wxWidgets 2.8.10 + +#if wxCHECK_VERSION( 2, 9, 0 ) + // Copy the cairo image contents to the wxBitmap + wxNativePixelData pixelData( *wxBitmap_ ); + + if( !pixelData ) + { + wxLogError( wxString::FromUTF8( "Can't access pixel data!" ) ); + return; + } + + wxNativePixelData::Iterator pixelIterator( pixelData ); + + int offset = 0; + + // Copy the cairo image to the wxDC bitmap + for( int j = 0; j < screenSizeY; j++ ) + { + offset = j * (int) screenSize.x; + + for( int column = 0; column < clientRectangle.width; column++ ) + { + unsigned int value = bitmapBuffer[offset + column]; + pixelIterator.Red() = value >> 16; + pixelIterator.Green() = value >> 8; + pixelIterator.Blue() = value >> 0; + pixelIterator++; + } + + pixelIterator.MoveTo( pixelData, 0, j ); + } + + // Blit the contents to the screen + wxClientDC client_dc( this ); + wxBufferedDC dc( &client_dc ); + dc.DrawBitmap( *wxBitmap_, 0, 0 ); + +#elif wxCHECK_VERSION( 2, 8, 0 ) + + // This code was taken from the wxCairo example - it's not the most efficient one + // Here is a good place for optimizations + + // Now translate the raw image data from the format stored + // by cairo into a format understood by wxImage. + unsigned char* wxOutputPtr = wxOutput; + for( size_t count = 0; count < bufferSize; count++ ) + { + unsigned int value = bitmapBuffer[count]; + // Red pixel + *wxOutputPtr++ = (value >> 16) & 0xff; + // Green pixel + *wxOutputPtr++ = (value >> 8) & 0xff; + // Blue pixel + *wxOutputPtr++ = (value >> 0) & 0xff; + } + + wxImage img( (int) screenSize.x, (int) screenSize.y, (unsigned char*) wxOutput, true); + wxBitmap bmp( img ); + wxClientDC client_dc( this ); + wxBufferedDC dc; + // client_dc.DrawBitmap(bmp, 0, 0, false); + dc.Init( &client_dc, bmp ); + +#else +#error "need wxWidgets-2.8 as a minimum" +#endif + + // Destroy Cairo objects + cairo_destroy( cairoImage ); + cairo_surface_destroy( cairoSurface ); +} + + +void CAIRO_GAL::SaveScreen() +{ + // Copy the current bitmap to the backup buffer + int offset = 0; + + for( int j = 0; j < screenSizeY; j++ ) + { + for( int i = 0; i < stride; i++ ) + { + bitmapBufferBackup[offset + i] = bitmapBuffer[offset + i]; + offset += stride; + } + } +} + + +void CAIRO_GAL::RestoreScreen() +{ + int offset = 0; + + for( int j = 0; j < screenSizeY; j++ ) + { + for( int i = 0; i < stride; i++ ) + { + bitmapBuffer[offset + i] = bitmapBufferBackup[offset + i]; + offset += stride; + } + } +} + + +void CAIRO_GAL::DrawLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) +{ + cairo_move_to( cairoImage, aStartPoint.x, aStartPoint.y ); + cairo_line_to( cairoImage, aEndPoint.x, aEndPoint.y ); + isElementAdded = true; +} + + +void CAIRO_GAL::DrawCircle( VECTOR2D aCenterPoint, double aRadius ) +{ + // A circle is drawn using an arc + cairo_new_sub_path( cairoImage ); + cairo_arc( cairoImage, aCenterPoint.x, aCenterPoint.y, aRadius, 0.0, 2 * M_PI ); + isElementAdded = true; +} + + +void CAIRO_GAL::DrawArc( VECTOR2D aCenterPoint, double aRadius, double aStartAngle, + double aEndAngle ) +{ + cairo_new_sub_path( cairoImage ); + cairo_arc( cairoImage, aCenterPoint.x, aCenterPoint.y, aRadius, aStartAngle, aEndAngle ); + isElementAdded = true; +} + + +void CAIRO_GAL::DrawPolyline( std::deque& aPointList ) +{ + bool isFirstPoint = true; + + // Iterate over the point list and draw the segments + for( std::deque::iterator it = aPointList.begin(); it != aPointList.end(); ++it ) + { + if( isFirstPoint ) + { + cairo_move_to( cairoImage, it->x, it->y ); + isFirstPoint = false; + } + else + { + cairo_line_to( cairoImage, it->x, it->y ); + } + } + + isElementAdded = true; +} + + +void CAIRO_GAL::DrawPolygon( const std::deque& aPointList ) +{ + bool isFirstPoint = true; + + // Iterate over the point list and draw the polygon + for( std::deque::const_iterator it = aPointList.begin(); it != aPointList.end(); ++it ) + { + if( isFirstPoint ) + { + cairo_move_to( cairoImage, it->x, it->y ); + isFirstPoint = false; + } + else + { + cairo_line_to( cairoImage, it->x, it->y ); + } + } + + isElementAdded = true; +} + + +void CAIRO_GAL::DrawRectangle( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) +{ + // Calculate the diagonal points + VECTOR2D diagonalPointA( aEndPoint.x, aStartPoint.y ); + VECTOR2D diagonalPointB( aStartPoint.x, aEndPoint.y ); + + // The path is composed from 4 segments + cairo_move_to( cairoImage, aStartPoint.x, aStartPoint.y ); + cairo_line_to( cairoImage, diagonalPointA.x, diagonalPointA.y ); + cairo_line_to( cairoImage, aEndPoint.x, aEndPoint.y ); + cairo_line_to( cairoImage, diagonalPointB.x, diagonalPointB.y ); + cairo_close_path( cairoImage ); + + isElementAdded = true; +} + + +void CAIRO_GAL::DrawCurve( VECTOR2D aStartPoint, VECTOR2D aControlPointA, + VECTOR2D aControlPointB, VECTOR2D aEndPoint ) +{ + cairo_move_to( cairoImage, aStartPoint.x, aStartPoint.y ); + cairo_curve_to( cairoImage, aControlPointA.x, aControlPointA.y, aControlPointB.x, + aControlPointB.y, aEndPoint.x, aEndPoint.y ); + cairo_line_to( cairoImage, aEndPoint.x, aEndPoint.y ); + isElementAdded = true; +} + + +void CAIRO_GAL::SetBackgroundColor( COLOR4D aColor ) +{ + backgroundColor = aColor; +} + + +void CAIRO_GAL::SetIsFill( bool aIsFillEnabled ) +{ + storePath(); + isFillEnabled = aIsFillEnabled; + + if( isGrouping ) + { + GroupElement groupElement; + groupElement.command = CMD_SET_FILL; + groupElement.boolArgument = aIsFillEnabled; + groups.back().push_back( groupElement ); + } +} + + +void CAIRO_GAL::SetIsStroke( bool aIsStrokeEnabled ) +{ + storePath(); + isStrokeEnabled = aIsStrokeEnabled; + + if( isGrouping ) + { + GroupElement groupElement; + groupElement.command = CMD_SET_STROKE; + groupElement.boolArgument = aIsStrokeEnabled; + groups.back().push_back( groupElement ); + } +} + + +void CAIRO_GAL::SetStrokeColor( COLOR4D aColor ) +{ + storePath(); + + strokeColor = aColor; + + if( isGrouping ) + { + GroupElement groupElement; + groupElement.command = CMD_SET_STROKECOLOR; + groupElement.arguments[0] = strokeColor.r; + groupElement.arguments[1] = strokeColor.g; + groupElement.arguments[2] = strokeColor.b; + groupElement.arguments[3] = strokeColor.a; + groups.back().push_back( groupElement ); + } +} + + +void CAIRO_GAL::SetFillColor( COLOR4D aColor ) +{ + storePath(); + fillColor = aColor; + + if( isGrouping ) + { + GroupElement groupElement; + groupElement.command = CMD_SET_FILLCOLOR; + groupElement.arguments[0] = fillColor.r; + groupElement.arguments[1] = fillColor.g; + groupElement.arguments[2] = fillColor.b; + groupElement.arguments[3] = fillColor.a; + groups.back().push_back( groupElement ); + } +} + + +void CAIRO_GAL::SetLineWidth( double aLineWidth ) +{ + storePath(); + + lineWidth = aLineWidth; + cairo_set_line_width( cairoImage, aLineWidth ); + + if( isGrouping ) + { + GroupElement groupElement; + groupElement.command = CMD_SET_LINE_WIDTH; + groupElement.arguments[0] = aLineWidth; + groups.back().push_back( groupElement ); + } +} + + +void CAIRO_GAL::SetLineCap( LineCap aLineCap ) +{ + storePath(); + + lineCap = aLineCap; + + cairo_set_line_cap( cairoImage, lineCapMap[aLineCap] ); + + if( isGrouping ) + { + GroupElement groupElement; + groupElement.command = CMD_SET_LINE_CAP; + groupElement.intArgument = (int) aLineCap; + groups.back().push_back( groupElement ); + } +} + + +void CAIRO_GAL::SetLineJoin( LineJoin aLineJoin ) +{ + storePath(); + + lineJoin = aLineJoin; + + cairo_set_line_join( cairoImage, lineJoinMap[aLineJoin] ); + + if( isGrouping ) + { + GroupElement groupElement; + groupElement.command = CMD_SET_LINE_JOIN; + groupElement.intArgument = (int) aLineJoin; + groups.back().push_back( groupElement ); + } +} + + +void CAIRO_GAL::ClearScreen() +{ + // Clear screen + cairo_set_source_rgba( cairoImage, + backgroundColor.r, backgroundColor.g, backgroundColor.b, 1.0 ); + cairo_rectangle( cairoImage, 0.0, 0.0, screenSize.x, screenSize.y ); + cairo_fill( cairoImage ); +} + + +void CAIRO_GAL::Transform( MATRIX3x3D aTransformation ) +{ + cairo_matrix_t cairoTransformation; + + cairo_matrix_init( &cairoTransformation, + aTransformation.m_data[0][0], + aTransformation.m_data[1][0], + aTransformation.m_data[0][1], + aTransformation.m_data[1][1], + aTransformation.m_data[0][2], + aTransformation.m_data[1][2] ); + + cairo_transform( cairoImage, &cairoTransformation ); +} + + +void CAIRO_GAL::Rotate( double aAngle ) +{ + storePath(); + + cairo_rotate( cairoImage, aAngle ); + + if( isGrouping ) + { + GroupElement groupElement; + groupElement.command = CMD_ROTATE; + groupElement.arguments[0] = aAngle; + groups.back().push_back( groupElement ); + } +} + + +void CAIRO_GAL::Translate( VECTOR2D aTranslation ) +{ + storePath(); + + cairo_translate( cairoImage, aTranslation.x, aTranslation.y ); + + if( isGrouping ) + { + GroupElement groupElement; + groupElement.command = CMD_TRANSLATE; + groupElement.arguments[0] = aTranslation.x; + groupElement.arguments[1] = aTranslation.y; + groups.back().push_back( groupElement ); + } +} + + +void CAIRO_GAL::Scale( VECTOR2D aScale ) +{ + storePath(); + + cairo_scale( cairoImage, aScale.x, aScale.y ); + + if( isGrouping ) + { + GroupElement groupElement; + groupElement.command = CMD_SCALE; + groupElement.arguments[0] = aScale.x; + groupElement.arguments[1] = aScale.y; + groups.back().push_back( groupElement ); + } +} + + +void CAIRO_GAL::Save() +{ + storePath(); + + cairo_save( cairoImage ); + + if( isGrouping ) + { + GroupElement groupElement; + groupElement.command = CMD_SAVE; + groups.back().push_back( groupElement ); + } +} + + +void CAIRO_GAL::Restore() +{ + storePath(); + + cairo_restore( cairoImage ); + + if( isGrouping ) + { + GroupElement groupElement; + groupElement.command = CMD_RESTORE; + groups.back().push_back( groupElement ); + } +} + + +int CAIRO_GAL::BeginGroup() +{ + // If the grouping is started: the actual path is stored in the group, when + // a attribute was changed or when grouping stops with the end group method. + storePath(); + Group group; + groups.push_back( group ); + isGrouping = true; + return groups.size() - 1; +} + + +void CAIRO_GAL::EndGroup() +{ + storePath(); + isGrouping = false; +} + + +void CAIRO_GAL::DeleteGroup( int aGroupNumber ) +{ + storePath(); + + // Delete the Cairo paths + for( std::deque::iterator it = groups[aGroupNumber].begin(); + it != groups[aGroupNumber].end(); ++it ) + { + if( it->command == CMD_FILL_PATH || it->command == CMD_STROKE_PATH ) + { + cairo_path_destroy( it->cairoPath ); + } + } + + // Delete the group + groups.erase( groups.begin() + aGroupNumber ); +} + + +void CAIRO_GAL::DrawGroup( int aGroupNumber ) +{ + // This method implements a small Virtual Machine - all stored commands + // are executed; nested calling is also possible + + storePath(); + + for( Group::iterator it = groups[aGroupNumber].begin(); + it != groups[aGroupNumber].end(); ++it ) + { + switch( it->command ) + { + case CMD_SET_FILL: + isFillEnabled = it->boolArgument; + break; + + case CMD_SET_STROKE: + isStrokeEnabled = it->boolArgument; + break; + + case CMD_SET_FILLCOLOR: + fillColor = COLOR4D( it->arguments[0], it->arguments[1], it->arguments[2], + it->arguments[3] ); + break; + + case CMD_SET_STROKECOLOR: + strokeColor = COLOR4D( it->arguments[0], it->arguments[1], it->arguments[2], + it->arguments[3] ); + break; + + case CMD_SET_LINE_WIDTH: + cairo_set_line_width( cairoImage, it->arguments[0] ); + break; + + case CMD_SET_LINE_JOIN: + cairo_set_line_join( cairoImage, lineJoinMap[(LineJoin) ( it->intArgument )] ); + break; + + case CMD_SET_LINE_CAP: + cairo_set_line_cap( cairoImage, lineCapMap[(LineCap) ( it->intArgument )] ); + break; + + case CMD_STROKE_PATH: + cairo_set_source_rgba( cairoImage, strokeColor.r, strokeColor.g, strokeColor.b, + strokeColor.a ); + cairo_append_path( cairoImage, it->cairoPath ); + cairo_stroke( cairoImage ); + break; + + case CMD_FILL_PATH: + cairo_set_source_rgba( cairoImage, fillColor.r, fillColor.g, fillColor.b, + fillColor.a ); + cairo_append_path( cairoImage, it->cairoPath ); + cairo_fill( cairoImage ); + break; + + case CMD_TRANSFORM: + cairo_matrix_t matrix; + cairo_matrix_init( &matrix, it->arguments[0], it->arguments[1], it->arguments[2], + it->arguments[3], it->arguments[4], it->arguments[5] ); + cairo_transform( cairoImage, &matrix ); + break; + + case CMD_ROTATE: + cairo_rotate( cairoImage, it->arguments[0] ); + break; + + case CMD_TRANSLATE: + cairo_translate( cairoImage, it->arguments[0], it->arguments[1] ); + break; + + case CMD_SCALE: + cairo_scale( cairoImage, it->arguments[0], it->arguments[1] ); + break; + + case CMD_SAVE: + cairo_save( cairoImage ); + break; + + case CMD_RESTORE: + cairo_restore( cairoImage ); + break; + + case CMD_CALL_GROUP: + DrawGroup( it->intArgument ); + break; + } + } +} + + +void CAIRO_GAL::Flush() +{ + storePath(); +} + + +void CAIRO_GAL::ComputeWorldScreenMatrix() +{ + ComputeWorldScale(); + + worldScreenMatrix.SetIdentity(); + + MATRIX3x3D translation; + translation.SetIdentity(); + translation.SetTranslation( 0.5 * VECTOR2D( screenSize.x, screenSize.y ) ); + + MATRIX3x3D scale; + scale.SetIdentity(); + scale.SetScale( VECTOR2D( worldScale, -worldScale ) ); + + MATRIX3x3D lookat; + lookat.SetIdentity(); + lookat.SetTranslation( -lookAtPoint ); + + worldScreenMatrix = translation * scale * lookat * worldScreenMatrix; +} + + +void CAIRO_GAL::storePath() +{ + if( isElementAdded ) + { + isElementAdded = false; + + if( !isGrouping ) + { + if( isFillEnabled ) + { + cairo_set_source_rgba( cairoImage, fillColor.r, fillColor.g, fillColor.b, + fillColor.a ); + cairo_fill_preserve( cairoImage ); + } + + if( isStrokeEnabled ) + { + cairo_set_source_rgba( cairoImage, strokeColor.r, strokeColor.g, strokeColor.b, + strokeColor.a ); + cairo_stroke_preserve( cairoImage ); + } + } + else + { + // Copy the actual path, append it to the global path list + // then check, if the path needs to be stroked/filled and + // add this command to the group list; + + cairo_path_t* path = cairo_copy_path( cairoImage ); + pathList.push_back( path ); + + if( isStrokeEnabled ) + { + GroupElement groupElement; + groupElement.cairoPath = path; + groupElement.command = CMD_STROKE_PATH; + groups.back().push_back( groupElement ); + } + + if( isFillEnabled ) + { + GroupElement groupElement; + groupElement.cairoPath = path; + groupElement.command = CMD_FILL_PATH; + groups.back().push_back( groupElement ); + } + } + + cairo_new_path( cairoImage ); + } +} + + +// --------------- +// Cursor handling +// --------------- + + +void CAIRO_GAL::initCursor( int aCursorSize ) +{ + cursorPixels = new wxBitmap( aCursorSize, aCursorSize ); + cursorPixelsSaved = new wxBitmap( aCursorSize, aCursorSize ); + cursorSize = aCursorSize; + + wxMemoryDC cursorShape( *cursorPixels ); + + cursorShape.SetBackground( *wxTRANSPARENT_BRUSH ); + wxColour color( cursorColor.r * cursorColor.a * 255, cursorColor.g * cursorColor.a * 255, + cursorColor.b * cursorColor.a * 255, 255 ); + wxPen pen = wxPen( color ); + cursorShape.SetPen( pen ); + cursorShape.Clear(); + + cursorShape.DrawLine( 0, aCursorSize / 2, aCursorSize, aCursorSize / 2 ); + cursorShape.DrawLine( aCursorSize / 2, 0, aCursorSize / 2, aCursorSize ); +} + + +VECTOR2D CAIRO_GAL::ComputeCursorToWorld( VECTOR2D aCursorPosition ) +{ + + MATRIX3x3D inverseMatrix = worldScreenMatrix.Inverse(); + VECTOR2D cursorPositionWorld = inverseMatrix * aCursorPosition; + + return cursorPositionWorld; +} + + +void CAIRO_GAL::DrawCursor( VECTOR2D aCursorPosition ) +{ + if( !IsShownOnScreen() ) + return; + + wxClientDC clientDC( this ); + wxMemoryDC cursorSave( *cursorPixelsSaved ); + wxMemoryDC cursorShape( *cursorPixels ); + + // Snap to grid + VECTOR2D cursorPositionWorld = ComputeCursorToWorld( aCursorPosition ); + + cursorPositionWorld.x = round( cursorPositionWorld.x / gridSize.x ) * gridSize.x; + cursorPositionWorld.y = round( cursorPositionWorld.y / gridSize.y ) * gridSize.y; + aCursorPosition = worldScreenMatrix * cursorPositionWorld; + aCursorPosition = aCursorPosition - VECTOR2D( cursorSize / 2, cursorSize / 2 ); + + if( !isDeleteSavedPixels ) + { + clientDC.Blit( savedCursorPosition.x, savedCursorPosition.y, cursorSize, cursorSize, + &cursorSave, 0, 0 ); + } + else + { + isDeleteSavedPixels = false; + } + + cursorSave.Blit( 0, 0, cursorSize, cursorSize, &clientDC, aCursorPosition.x, + aCursorPosition.y ); + + clientDC.Blit( aCursorPosition.x, aCursorPosition.y, cursorSize, cursorSize, &cursorShape, 0, + 0, wxOR ); + + savedCursorPosition.x = (wxCoord) aCursorPosition.x; + savedCursorPosition.y = (wxCoord) aCursorPosition.y; +} + + +void CAIRO_GAL::DrawGridLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) +{ + cairo_move_to( cairoImage, aStartPoint.x, aStartPoint.y ); + cairo_line_to( cairoImage, aEndPoint.x, aEndPoint.y ); + cairo_set_source_rgba( cairoImage, gridColor.r, gridColor.g, gridColor.b, gridColor.a ); + cairo_stroke( cairoImage ); +} + + +void CAIRO_GAL::allocateBitmaps() +{ + // Create buffer, use the system independent CAIRO image back end + stride = cairo_format_stride_for_width( CAIRO_FORMAT_RGB24, screenSize.x ); + bufferSize = stride * screenSize.y; + + bitmapBuffer = new unsigned int[bufferSize]; + bitmapBufferBackup = new unsigned int[bufferSize]; + wxOutput = new unsigned char[bufferSize * 4]; + wxBitmap_ = new wxBitmap( screenSize.x, screenSize.y, SCREEN_DEPTH ); +} + + +void CAIRO_GAL::deleteBitmaps() +{ + delete[] bitmapBuffer; + delete[] bitmapBufferBackup; + delete[] wxOutput; + delete wxBitmap_; +} + + +bool CAIRO_GAL::Show( bool aShow ) +{ + bool s = wxWindow::Show( aShow ); + + if( aShow ) + wxWindow::Raise(); + + return s; +} diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp new file mode 100644 index 0000000000..e34efb2cba --- /dev/null +++ b/common/gal/graphics_abstraction_layer.cpp @@ -0,0 +1,157 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * + * Graphics Abstraction Layer (GAL) - base class + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +#include +#include +#include + + +using namespace KiGfx; + +const wxEventType KiGfx::EVT_GAL_REDRAW = wxNewEventType(); + +GAL::GAL() +{ + // Set the default values for the internal variables + SetIsFill( false ); + SetIsStroke( true ); + SetLineJoin( LINE_JOIN_ROUND ); + SetLineCap( LINE_CAP_ROUND ); + SetIsCursorEnabled( false ); + SetZoomFactor( 1.0 ); + SetFillColor( COLOR4D( 0.0, 0.0, 0.0, 0.0 ) ); + SetStrokeColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); + SetGridColor( COLOR4D( 1, 1, 1, 0.1 ) ); + SetCoarseGrid( 5 ); + SetLineWidth( 1.0 ); + SetDepthRange( VECTOR2D( -2048, 2047 ) ); +} + + +GAL::~GAL() +{ +} + + +void GAL::DrawGrid() +{ + // The grid consists of lines + // For the drawing the start points, end points and increments have to be calculated in world coordinates + VECTOR2D screenStartPoint( 0, 0 ); + VECTOR2D screenEndPoint( screenSize.x, screenSize.y ); + MATRIX3x3D inverseMatrix = worldScreenMatrix.Inverse(); + VECTOR2D worldStartPoint = inverseMatrix * screenStartPoint; + VECTOR2D worldEndPoint = inverseMatrix * screenEndPoint; + + // Compute grid variables + int gridStartX = round( worldStartPoint.x / gridSize.x ); + int gridEndX = round( worldEndPoint.x / gridSize.x ); + int gridStartY = round( worldStartPoint.y / gridSize.y ); + int gridEndY = round( worldEndPoint.y / gridSize.y ); + + int gridScreenSizeDense = round( gridSize.x * worldScale ); + int gridScreenSizeCoarse = round( gridSize.x * (double) gridTick * worldScale ); + + // Swap the coordinates, if they have not the right order + SWAP( gridEndX, <, gridStartX ); + SWAP( gridEndY, <, gridStartY ); + + // Correct the index, else some lines are not correctly painted + gridStartX -= 1; + gridStartY -= 1; + gridEndX += 1; + gridEndY += 1; + + double savedLineWidth = GetLineWidth(); + COLOR4D savedColor = GetStrokeColor(); + + // Compute the line width of the grid + ComputeWorldScale(); + double width = gridLineWidth / worldScale; + double doubleWidth = 2 * width; + + // Set line width & color + SetLineWidth( width ); + + double origSize = (double) gridOriginMarkerSize / worldScale; + + SetStrokeColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); + SetIsFill( false ); + DrawLine( gridOrigin + VECTOR2D( -origSize, -origSize ), gridOrigin + VECTOR2D( origSize, origSize ) ); + DrawLine( gridOrigin + VECTOR2D( -origSize, origSize ), gridOrigin + VECTOR2D( origSize, -origSize ) ); + DrawCircle( gridOrigin, origSize * 0.7 ); + + SetStrokeColor( gridColor ); + + if( std::max( gridScreenSizeDense, gridScreenSizeCoarse ) < gridDrawThreshold ) + return; + + // Now draw the grid, every coarse grid line gets the double width + for( int j = gridStartY; j < gridEndY; j += 1 ) + { + if( j % gridTick == 0 && gridScreenSizeDense > gridDrawThreshold ) + { + SetLineWidth( doubleWidth ); + } + else + { + SetLineWidth( width ); + } + + if( ( j % gridTick == 0 && gridScreenSizeCoarse > gridDrawThreshold ) + || gridScreenSizeDense > gridDrawThreshold ) + { + DrawGridLine( VECTOR2D( gridStartX * gridSize.x, j * gridSize.y ), + VECTOR2D( gridEndX * gridSize.x, j * gridSize.y ) ); + } + } + + for( int i = gridStartX; i < gridEndX; i += 1 ) + { + if( i % gridTick == 0 && gridScreenSizeDense > gridDrawThreshold ) + { + SetLineWidth( doubleWidth ); + } + else + { + SetLineWidth( width ); + } + + if( ( i % gridTick == 0 && gridScreenSizeCoarse > gridDrawThreshold ) + || gridScreenSizeDense > gridDrawThreshold ) + { + DrawGridLine( VECTOR2D( i * gridSize.x, gridStartY * gridSize.y ), + VECTOR2D( i * gridSize.x, gridEndY * gridSize.y ) ); + } + } + + // Restore old values + SetLineWidth( savedLineWidth ); + SetStrokeColor( savedColor ); +} + diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp new file mode 100644 index 0000000000..853c69d5d4 --- /dev/null +++ b/common/gal/opengl/opengl_gal.cpp @@ -0,0 +1,1591 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * + * Graphics Abstraction Layer (GAL) for OpenGL + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include + +#include + +#ifndef CALLBACK +#define CALLBACK +#endif + +using namespace KiGfx; + +// Prototypes +void InitTesselatorCallbacks( GLUtesselator* aTesselator ); + +// FIXME Checking of attributes + +// #if defined(__WXGTK__) +const int glAttributes[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 16, 0 }; +// #elif defined(__WXMSW__) +// #define glAttributes NULL +// #endif + + +OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, + wxEvtHandler* aPaintListener, bool isUseShaders, const wxString& aName ) : + wxGLCanvas( aParent, wxID_ANY, (int*) glAttributes, wxDefaultPosition, wxDefaultSize, + wxEXPAND, aName ) +{ + // Create the OpenGL-Context + glContext = new wxGLContext( this ); + parentWindow = aParent; + mouseListener = aMouseListener; + paintListener = aPaintListener; + + // Set the cursor size + initCursor( 20 ); + SetCursorColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); + + // Initialize the flags + isCreated = false; + isDeleteSavedPixels = true; + isGlewInitialized = false; + isFrameBufferInitialized = false; + isUseShader = isUseShaders; + isShaderInitialized = false; + isGroupStarted = false; + shaderPath = "../../../gal/opengl/shader/"; + wxSize parentSize = aParent->GetSize(); + + SetSize( parentSize ); + + screenSize.x = parentSize.x; + screenSize.y = parentSize.y; + + currentShader = -1; + + // Set grid defaults + SetGridColor( COLOR4D( 0.3, 0.3, 0.3, 0.3 ) ); + SetCoarseGrid( 10 ); + SetGridLineWidth( 1.0 ); + + // Connecting the event handlers. + this->Connect( wxEVT_SIZE, wxSizeEventHandler( OPENGL_GAL::onSize ) ); + this->Connect( wxEVT_PAINT, wxPaintEventHandler( OPENGL_GAL::onPaint ) ); + + // Mouse events are skipped to the parent + this->Connect( wxEVT_MOTION, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + this->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + this->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + this->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + this->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + this->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); +} + + +OPENGL_GAL::~OPENGL_GAL() +{ + glFlush(); + + // Delete the stored display lists + for( std::deque::iterator group = displayListsGroup.begin(); + group != displayListsGroup.end(); group++ ) + { + glDeleteLists( *group, 1 ); + } + + // Delete the buffers + if( isFrameBufferInitialized ) + { + deleteFrameBuffer( &frameBuffer, &depthBuffer, &texture ); + deleteFrameBuffer( &frameBufferBackup, &depthBufferBackup, &textureBackup ); + } + + delete glContext; +} + + +void OPENGL_GAL::onPaint( wxPaintEvent& aEvent ) +{ + PostPaint(); +} + + +void OPENGL_GAL::ResizeScreen( int aWidth, int aHeight ) +{ + screenSize = VECTOR2D( aWidth, aHeight ); + + // Delete old buffers for resizing + if( isFrameBufferInitialized ) + { + deleteFrameBuffer( &frameBuffer, &depthBuffer, &texture ); + deleteFrameBuffer( &frameBufferBackup, &depthBufferBackup, &textureBackup ); + + // This flag is used for recreating the buffers + isFrameBufferInitialized = false; + } + + wxGLCanvas::SetSize( aWidth, aHeight ); +} + + +void OPENGL_GAL::onSize( wxSizeEvent& aEvent ) +{ + ResizeScreen( aEvent.GetSize().x, aEvent.GetSize().y ); + PostPaint(); +} + + +void OPENGL_GAL::skipMouseEvent( wxMouseEvent& aEvent ) +{ + // Post the mouse event to the event listener registered in constructor, if any + if( mouseListener ) + wxPostEvent( mouseListener, aEvent ); +} + + +void OPENGL_GAL::generateFrameBuffer( GLuint* aFrameBuffer, GLuint* aDepthBuffer, + GLuint* aTexture ) +{ + // We need frame buffer objects for drawing the screen contents + + // Generate frame buffer and a depth buffer + glGenFramebuffersEXT( 1, aFrameBuffer ); + glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, *aFrameBuffer ); + + // Allocate memory for the depth buffer + // Attach the depth buffer to the frame buffer + glGenRenderbuffersEXT( 1, aDepthBuffer ); + glBindRenderbufferEXT( GL_RENDERBUFFER_EXT, *aDepthBuffer ); + + // Use here a size of 24 bits for the depth buffer, 8 bits for the stencil buffer + // this is required later for anti-aliasing + glRenderbufferStorageEXT( GL_RENDERBUFFER_EXT, GL_DEPTH_STENCIL_EXT, screenSize.x, + screenSize.y ); + glFramebufferRenderbufferEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, + *aDepthBuffer ); + glFramebufferRenderbufferEXT( GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT, + GL_RENDERBUFFER_EXT, *aDepthBuffer ); + + // Generate the texture for the pixel storage + // Attach the texture to the frame buffer + glGenTextures( 1, aTexture ); + glBindTexture( GL_TEXTURE_2D, *aTexture ); + glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, screenSize.x, screenSize.y, 0, GL_RGBA, + GL_UNSIGNED_BYTE, NULL ); + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); + glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, + *aTexture, 0 ); + + // Check the status, exit if the frame buffer can't be created + GLenum status = glCheckFramebufferStatusEXT( GL_FRAMEBUFFER_EXT ); + + if( status != GL_FRAMEBUFFER_COMPLETE_EXT ) + { + wxLogError( wxT( "Can't create the frame buffer." ) ); + exit( 1 ); + } + + isFrameBufferInitialized = true; +} + + +void OPENGL_GAL::deleteFrameBuffer( GLuint* aFrameBuffer, GLuint* aDepthBuffer, GLuint* aTexture ) +{ + glDeleteFramebuffers( 1, aFrameBuffer ); + glDeleteRenderbuffers( 1, aDepthBuffer ); + glDeleteTextures( 1, aTexture ); +} + + +void OPENGL_GAL::initFrameBuffers() +{ + generateFrameBuffer( &frameBuffer, &depthBuffer, &texture ); + generateFrameBuffer( &frameBufferBackup, &depthBufferBackup, &textureBackup ); +} + + +void OPENGL_GAL::SaveScreen() +{ + glBindFramebuffer( GL_DRAW_FRAMEBUFFER, frameBufferBackup ); + glBindFramebuffer( GL_READ_FRAMEBUFFER, frameBuffer ); + glBlitFramebuffer( 0, 0, screenSize.x, screenSize.y, 0, 0, screenSize.x, screenSize.y, + GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, + GL_NEAREST ); + glBindFramebuffer( GL_DRAW_FRAMEBUFFER, frameBuffer ); +} + + +void OPENGL_GAL::RestoreScreen() +{ + glBindFramebuffer( GL_DRAW_FRAMEBUFFER, frameBuffer ); + glBindFramebuffer( GL_READ_FRAMEBUFFER, frameBufferBackup ); + glBlitFramebuffer( 0, 0, screenSize.x, screenSize.y, 0, 0, screenSize.x, screenSize.y, + GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, + GL_NEAREST ); +} + + +void OPENGL_GAL::initGlew() +{ + // Initialize GLEW library + GLenum err = glewInit(); + + if( GLEW_OK != err ) + { + wxLogError( wxString::FromUTF8( (char*) glewGetErrorString( err ) ) ); + exit( 1 ); + } + else + { + wxLogDebug( wxString( "Status: Using GLEW " ) + + wxString::FromUTF8( (char*) glewGetString( GLEW_VERSION ) ) ); + } + + // Check the OpenGL version (minimum 2.1 is required) + if( GLEW_VERSION_2_1 ) + { + wxLogInfo( wxT( "OpenGL Version 2.1 supported." ) ); + } + else + { + wxLogError( wxT( "OpenGL Version 2.1 is not supported!" ) ); + exit( 1 ); + } + + // Frame buffers have to be supported + if( !GLEW_ARB_framebuffer_object ) + { + wxLogError( wxT( "Framebuffer objects are not supported!" ) ); + exit( 1 ); + } + + // Compute the unit circles, used for speed up of the circle drawing + computeUnitCircle(); + computeUnitSemiCircle(); + computeUnitArcs(); + + isGlewInitialized = true; +} + + +void OPENGL_GAL::BeginDrawing() +{ + SetCurrent( *glContext ); + + clientDC = new wxClientDC( this ); + + // Initialize GLEW & FBOs + if( !isGlewInitialized ) + { + initGlew(); + } + + if( !isFrameBufferInitialized ) + { + initFrameBuffers(); + } + + // Compile the shaders + if( !isShaderInitialized && isUseShader ) + { + std::string shaderNames[SHADER_NUMBER] = { std::string( "round" ) }; + + for( int i = 0; i < 1; i++ ) + { + shaderList.push_back( SHADER() ); + + shaderList[i].AddSource( shaderPath + std::string( "/" ) + shaderNames[i] + + std::string( ".frag" ), SHADER_TYPE_FRAGMENT ); + shaderList[i].AddSource( shaderPath + std::string( "/" ) + shaderNames[i] + + std::string( ".vert" ), SHADER_TYPE_VERTEX ); + + shaderList[i].Link(); + } + + isShaderInitialized = true; + } + + // Bind the main frame buffer object - all contents are drawn there + glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, frameBuffer ); + + // Disable 2D Textures + glDisable( GL_TEXTURE_2D ); + + // Enable the depth buffer + glEnable( GL_DEPTH_TEST ); + glDepthFunc( GL_LESS ); + // Setup blending, required for transparent objects + glEnable( GL_BLEND ); + glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); + + // Enable smooth lines + glEnable( GL_LINE_SMOOTH ); + + // Set up the view port + glMatrixMode( GL_PROJECTION ); + glLoadIdentity(); + glViewport( 0, 0, (GLsizei) screenSize.x, (GLsizei) screenSize.y ); + + // Create the screen transformation + glOrtho( 0, (GLint) screenSize.x, 0, (GLsizei) screenSize.y, -depthRange.x, -depthRange.y ); + + glMatrixMode( GL_MODELVIEW ); + + // Set up the world <-> screen transformation + ComputeWorldScreenMatrix(); + GLdouble matrixData[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 }; + matrixData[0] = worldScreenMatrix.m_data[0][0]; + matrixData[1] = worldScreenMatrix.m_data[1][0]; + matrixData[2] = worldScreenMatrix.m_data[2][0]; + matrixData[4] = worldScreenMatrix.m_data[0][1]; + matrixData[5] = worldScreenMatrix.m_data[1][1]; + matrixData[6] = worldScreenMatrix.m_data[2][1]; + matrixData[12] = worldScreenMatrix.m_data[0][2]; + matrixData[13] = worldScreenMatrix.m_data[1][2]; + matrixData[14] = worldScreenMatrix.m_data[2][2]; + glLoadMatrixd( matrixData ); + + // Set defaults + SetFillColor( fillColor ); + SetStrokeColor( strokeColor ); + isDeleteSavedPixels = true; +} + + +void OPENGL_GAL::blitMainTexture( bool aIsClearFrameBuffer ) +{ + selectShader( -1 ); + // Don't use blending for the final blitting + glDisable( GL_BLEND ); + + glColor4d( 1.0, 1.0, 1.0, 1.0 ); + + // Switch to the main frame buffer and blit the scene + glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, 0 ); + + if( aIsClearFrameBuffer ) + glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT ); + + // Enable texturing and bind the main texture + glEnable( GL_TEXTURE_2D ); + glBindTexture( GL_TEXTURE_2D, texture ); + + // Draw a full screen quad with the texture + glMatrixMode( GL_MODELVIEW ); + glPushMatrix(); + glLoadIdentity(); + glMatrixMode( GL_PROJECTION ); + glPushMatrix(); + glLoadIdentity(); + glBegin( GL_QUADS ); + glTexCoord2i( 0, 1 ); + glVertex3i( -1, -1, 0 ); + glTexCoord2i( 1, 1 ); + glVertex3i( 1, -1, 0 ); + glTexCoord2i( 1, 0 ); + glVertex3i( 1, 1, 0 ); + glTexCoord2i( 0, 0 ); + glVertex3i( -1, 1, 0 ); + glEnd(); + glPopMatrix(); + glMatrixMode( GL_MODELVIEW ); + glPopMatrix(); +} + + +void OPENGL_GAL::EndDrawing() +{ + // Draw the remaining contents, blit the main texture to the screen, swap the buffers + glFlush(); + blitMainTexture( true ); + SwapBuffers(); + + delete clientDC; +} + + +inline void OPENGL_GAL::selectShader( int aIndex ) +{ + if( currentShader != aIndex ) + { + if( currentShader >= 0 ) + shaderList[currentShader].Deactivate(); + + if( aIndex >= 0 ) + shaderList[aIndex].Use(); + + currentShader = aIndex; + } +} + +void OPENGL_GAL::drawRoundedSegment( VECTOR2D aStartPoint, VECTOR2D aEndPoint, + double aWidth, bool aStroke, bool aGlBegin ) +{ + VECTOR2D l = (aEndPoint - aStartPoint); + double lnorm = l.EuclideanNorm(); + double aspect; + + if( l.x == 0 && l.y == 0 ) + { + l = VECTOR2D( aWidth / 2.0, 0.0 ); + aspect = 0.0; + } + else + { + l = l.Resize( aWidth / 2.0 ); + aspect = lnorm / (lnorm + aWidth); + } + + VECTOR2D p = l.Perpendicular(); + VECTOR2D corners[4] = { aStartPoint - l - p, aEndPoint + l - p, + aEndPoint + l + p, aStartPoint - l + p }; + + if( aStroke ) + { + glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + } + else + { + glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + } + + selectShader( 0 ); + + if( aGlBegin ) + glBegin( GL_QUADS ); + + glNormal3d( aspect, 0, 0 ); + glTexCoord2f( 0.0, 0.0 ); + glVertex3d( corners[0].x, corners[0].y, layerDepth ); + glNormal3d( aspect, 0, 0 ); + glTexCoord2f( 1.0, 0.0 ); + glVertex3d( corners[1].x, corners[1].y, layerDepth ); + glNormal3d( aspect, 0, 0 ); + glTexCoord2f( 1.0, 1.0 ); + glVertex3d( corners[2].x, corners[2].y, layerDepth ); + glNormal3d( aspect, 0, 0 ); + glTexCoord2f( 0.0, 1.0 ); + glVertex3d( corners[3].x, corners[3].y, layerDepth ); + + if( aGlBegin ) + glEnd(); +} + + +inline void OPENGL_GAL::drawLineQuad( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) +{ + VECTOR2D startEndVector = aEndPoint - aStartPoint; + double lineLength = startEndVector.EuclideanNorm(); + + // Limit the width of the line to a minimum of one pixel + // this looks best without anti-aliasing + // XXX Should be improved later. + double scale = 0.5 * lineWidth / lineLength; + double scale1pix = 0.5001 / worldScale / lineLength; + if( lineWidth * worldScale < 1.0002 && !isGroupStarted ) + { + scale = scale1pix; + } + + VECTOR2D perpendicularVector( -startEndVector.y * scale, startEndVector.x * scale ); + + // Compute the edge points of the line + VECTOR2D point1 = aStartPoint + perpendicularVector; + VECTOR2D point2 = aStartPoint - perpendicularVector; + VECTOR2D point3 = aEndPoint + perpendicularVector; + VECTOR2D point4 = aEndPoint - perpendicularVector; + + glBegin( GL_QUADS ); + glVertex3d( point1.x, point1.y, layerDepth ); + glVertex3d( point2.x, point2.y, layerDepth ); + glVertex3d( point4.x, point4.y, layerDepth ); + glVertex3d( point3.x, point3.y, layerDepth ); + glEnd(); +} + + +inline void OPENGL_GAL::drawLineCap( VECTOR2D aStartPoint, VECTOR2D aEndPoint, double aDepthOffset ) +{ + VECTOR2D startEndVector = aEndPoint - aStartPoint; + double lineLength = startEndVector.EuclideanNorm(); + double lineAngle = atan2( startEndVector.y, startEndVector.x ); + + switch( lineCap ) + { + case LINE_CAP_BUTT: + // TODO + break; + + case LINE_CAP_ROUND: + // Add a semicircle at the line end + drawSemiCircle( aStartPoint, lineWidth / 2, lineAngle + M_PI / 2, aDepthOffset ); + break; + + case LINE_CAP_SQUARED: + VECTOR2D offset; + offset = startEndVector * ( lineWidth / lineLength / 2.0 ); + aStartPoint = aStartPoint - offset; + aEndPoint = aEndPoint + offset; + break; + } +} + + +void OPENGL_GAL::DrawLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) +{ + if( isUseShader ) + { + drawRoundedSegment( aStartPoint, aEndPoint, lineWidth, true, true ); + } + else + { + VECTOR2D startEndVector = aEndPoint - aStartPoint; + double lineLength = startEndVector.EuclideanNorm(); + if( lineLength > 0.0 ) + { + glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + + drawLineCap( aStartPoint, aEndPoint, layerDepth ); + drawLineCap( aEndPoint, aStartPoint, layerDepth ); + drawLineQuad( aStartPoint, aEndPoint ); + } + } +} + + +void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) +{ + LineCap savedLineCap = lineCap; + + bool isFirstPoint = true; + bool isFirstLine = true; + VECTOR2D startEndVector; + VECTOR2D lastStartEndVector; + VECTOR2D lastPoint; + + unsigned int i = 0; + + // Draw for each segment a line + for( std::deque::const_iterator it = aPointList.begin(); it != aPointList.end(); it++ ) + { + // First point + if( it == aPointList.begin() ) + { + isFirstPoint = false; + lastPoint = *it; + } + else + { + VECTOR2D actualPoint = *it; + startEndVector = actualPoint - lastPoint; + + if( isFirstLine ) + { + drawLineCap( lastPoint, actualPoint, layerDepth ); + isFirstLine = false; + } + else + { + // Compute some variables for the joints + double lineLengthA = lastStartEndVector.EuclideanNorm(); + double scale = 0.5 * lineWidth / lineLengthA; + VECTOR2D perpendicularVector1( -lastStartEndVector.y * scale, + lastStartEndVector.x * scale ); + double lineLengthB = startEndVector.EuclideanNorm(); + scale = 0.5 * lineWidth / lineLengthB; + VECTOR2D perpendicularVector2( -startEndVector.y * scale, + startEndVector.x * scale ); + + switch( lineJoin ) + { + case LINE_JOIN_ROUND: + { + // Insert a triangle fan at the line joint + // Compute the start and end angle for the triangle fan + double angle1 = startEndVector.Angle(); + double angle2 = lastStartEndVector.Angle(); + double angleDiff = angle1 - angle2; + // Determines the side of the triangle fan + double adjust = angleDiff < 0 ? -0.5 * lineWidth : 0.5 * lineWidth; + + // Angle correction for some special cases + if( angleDiff < -M_PI ) + { + if( angle1 < 0 ) + { + angle1 += 2 * M_PI; + } + if( angle2 < 0 ) + { + angle2 += 2 * M_PI; + } + adjust = -adjust; + } + else if( angleDiff > M_PI ) + { + if( angle1 > 0 ) + { + angle1 -= 2 * M_PI; + + } + if( angle2 > 0 ) + { + angle2 -= 2 * M_PI; + } + adjust = -adjust; + } + + // Now draw the fan + glBegin( GL_TRIANGLE_FAN ); + glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); + + SWAP( angle1, >, angle2 ); + + glVertex3d( lastPoint.x + adjust * sin( angle1 ), + lastPoint.y - adjust * cos( angle1 ), layerDepth ); + for( double a = angle1 + M_PI / 32; a < angle2; a += M_PI / 32 ) + { + glVertex3d( lastPoint.x + adjust * sin( a ), + lastPoint.y - adjust * cos( a ), layerDepth ); + } + glVertex3d( lastPoint.x + adjust * sin( angle2 ), + lastPoint.y - adjust * cos( angle2 ), layerDepth ); + + glEnd(); + break; + } + case LINE_JOIN_BEVEL: + { + // We compute the edge points of the line segments at the joint + VECTOR2D edgePoint1; + VECTOR2D edgePoint2; + // Determine the correct side + if( lastStartEndVector.x * startEndVector.y + - lastStartEndVector.y * startEndVector.x + < 0 ) + { + edgePoint1 = lastPoint + perpendicularVector1; + edgePoint2 = lastPoint + perpendicularVector2; + } + else + { + edgePoint1 = lastPoint - perpendicularVector1; + edgePoint2 = lastPoint - perpendicularVector2; + } + + // Insert a triangle at the joint to close the gap + glBegin( GL_TRIANGLES ); + glVertex3d( edgePoint1.x, edgePoint1.y, layerDepth ); + glVertex3d( edgePoint2.x, edgePoint2.y, layerDepth ); + glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); + glEnd(); + + break; + } + case LINE_JOIN_MITER: + { + // Compute points of the outer edges + VECTOR2D point1 = lastPoint - perpendicularVector1; + VECTOR2D point3 = lastPoint - perpendicularVector2; + if( lastStartEndVector.x * startEndVector.y + - lastStartEndVector.y * startEndVector.x + < 0 ) + { + point1 = lastPoint + perpendicularVector1; + point3 = lastPoint + perpendicularVector2; + + } + + VECTOR2D point2 = point1 - lastStartEndVector; + VECTOR2D point4 = point3 + startEndVector; + + // Now compute the intersection point of the edges + double c1 = point1.Cross( point2 ); + double c2 = point3.Cross( point4 ); + double quot = startEndVector.Cross( lastStartEndVector ); + + VECTOR2D miterPoint( -c1 * startEndVector.x - c2 * lastStartEndVector.x, + -c1 * startEndVector.y - c2 * lastStartEndVector.y ); + + miterPoint = ( 1 / quot ) * miterPoint; + + // Check if the point is outside the limit + if( ( lastPoint - miterPoint ).EuclideanNorm() > 2 * lineWidth ) + { + // if it's outside cut the edge and insert three triangles + double limit = MITER_LIMIT * lineWidth; + VECTOR2D mp1 = point1 + ( limit / lineLengthA ) * lastStartEndVector; + VECTOR2D mp2 = point3 - ( limit / lineLengthB ) * startEndVector; + glBegin( GL_TRIANGLE_FAN ); + glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); + glVertex3d( point1.x, point1.y, layerDepth ); + glVertex3d( mp1.x, mp1.y, layerDepth ); + glVertex3d( mp2.x, mp2.y, layerDepth ); + glVertex3d( point3.x, point3.y, layerDepth ); + glEnd(); + } + else + { + // Insert two triangles for the mitered edge + glBegin( GL_TRIANGLE_FAN ); + glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); + glVertex3d( point1.x, point1.y, layerDepth ); + glVertex3d( miterPoint.x, miterPoint.y, layerDepth ); + glVertex3d( point3.x, point3.y, layerDepth ); + glEnd(); + } + break; + } + } + } + + if( it == aPointList.end() - 1 ) + { + drawLineCap( actualPoint, lastPoint, layerDepth ); + } + + drawLineQuad( lastPoint, *it ); + lastPoint = *it; + lastStartEndVector = startEndVector; + } + + i++; + } + + lineCap = savedLineCap; +} + + +void OPENGL_GAL::DrawRectangle( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) +{ + // Compute the diagonal points of the rectangle + VECTOR2D diagonalPointA( aEndPoint.x, aStartPoint.y ); + VECTOR2D diagonalPointB( aStartPoint.x, aEndPoint.y ); + + if( isUseShader ) + { + if( isFillEnabled ) + { + selectShader( 0 ); + glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + glBegin( GL_QUADS ); + glNormal3d( 1.0, 0, 0); + glTexCoord2f(0.0, 0.0); + glVertex3d( aStartPoint.x, aStartPoint.y, layerDepth ); + glNormal3d( 1.0, 0, 0); + glTexCoord2f(1.0, 0.0); + glVertex3d( diagonalPointA.x, diagonalPointA.y, layerDepth ); + glNormal3d( 1.0, 0, 0); + glTexCoord2f(1.0, 1.0); + glVertex3d( aEndPoint.x, aEndPoint.y, layerDepth ); + glNormal3d( 1.0, 0, 0); + glTexCoord2f(0.0, 1.0); + glVertex3d( diagonalPointB.x, diagonalPointB.y, layerDepth ); + glEnd(); + } + if(isStrokeEnabled) + { + glBegin(GL_QUADS); + + drawRoundedSegment(aStartPoint, diagonalPointA, lineWidth, true, false ); + drawRoundedSegment(aEndPoint, diagonalPointA, lineWidth, true, false ); + drawRoundedSegment(aStartPoint, diagonalPointB, lineWidth, true, false ); + drawRoundedSegment(aEndPoint, diagonalPointB, lineWidth, true, false ); + + glEnd(); + } + + return; + } + + selectShader( -1 ); + + glPushMatrix(); + + glTranslated( 0, 0, layerDepth ); + + // Stroke the outline + if( isStrokeEnabled ) + { + glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + std::deque pointList; + pointList.push_back( aStartPoint ); + pointList.push_back( diagonalPointA ); + pointList.push_back( aEndPoint ); + pointList.push_back( diagonalPointB ); + pointList.push_back( aStartPoint ); + DrawPolyline( pointList ); + } + + // Fill the rectangle + if( isFillEnabled ) + { + glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + glBegin( GL_QUADS ); + glVertex2d( aStartPoint.x, aStartPoint.y ); + glVertex2d( diagonalPointA.x, diagonalPointA.y ); + glVertex2d( aEndPoint.x, aEndPoint.y ); + glVertex2d( diagonalPointB.x, diagonalPointB.y ); + glEnd(); + } + + glPopMatrix(); + + // Restore the stroke color + glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); +} + + +void OPENGL_GAL::DrawCircle( VECTOR2D aCenterPoint, double aRadius ) +{ + // We need a minimum radius, else simply don't draw the circle + if( aRadius <= 0.0 ) + { + return; + } + + if( isUseShader ) + { + drawRoundedSegment( aCenterPoint, aCenterPoint, aRadius * 2.0, false, true ); + return; + } + + switch( m_drawMode ) + { + // Draw the middle of the circle (not anti-aliased) + case DRAW_MODE_NORMAL: + { + // Compute the factors for the unit circle + double outerScale = lineWidth / aRadius / 2; + double innerScale = -outerScale; + outerScale += 1.0; + innerScale += 1.0; + + if( isUseShader ) + { + innerScale *= 1.0 / cos( M_PI / CIRCLE_POINTS ); + } + + if( isStrokeEnabled ) + { + if( innerScale < outerScale ) + { + // Draw the outline + glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + + glPushMatrix(); + + glTranslated( aCenterPoint.x, aCenterPoint.y, 0.0 ); + glScaled( aRadius, aRadius, 1.0 ); + + glBegin( GL_QUAD_STRIP ); + for( std::deque::const_iterator it = unitCirclePoints.begin(); + it != unitCirclePoints.end(); it++ ) + { + glVertex3d( it->x * innerScale, it->y * innerScale, layerDepth ); + glVertex3d( it->x * outerScale, it->y * outerScale, layerDepth ); + } + glEnd(); + + glPopMatrix(); + } + } + + // Filled circles are easy to draw by using the stored display list, scaling and translating + if( isFillEnabled ) + { + glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + + glPushMatrix(); + + glTranslated( aCenterPoint.x, aCenterPoint.y, layerDepth ); + glScaled( aRadius, aRadius, 1.0 ); + + glBegin( GL_TRIANGLE_FAN ); + glVertex3d( 0, 0, 0 ); + glCallList( displayListCircle ); + glEnd(); + + glPopMatrix(); + } + + glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + } + break; + + // Prepare / draw anti-aliased edges + case DRAW_MODE_PREPARE_EDGES: + case DRAW_MODE_DRAW_EDGES: + if( isUseShader ) + { + // Set the color + // Now we enable the shader program for the circle + // the shader requires the screen size as uniform argument + shaderList[0].Use(); + shaderList[0].SetParameter( 0, screenSize.x / 2 ); + shaderList[0].SetParameter( 1, screenSize.y / 2 ); + glBegin( GL_LINES ); + if( isStrokeEnabled ) + { + glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + glVertex3d( aCenterPoint.x, aCenterPoint.y, layerDepth ); + glVertex3d( aRadius - lineWidth / 2, aRadius + lineWidth / 2, 0 ); + } + else + { + glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + glVertex3d( aCenterPoint.x, aCenterPoint.y, layerDepth ); + glVertex3d( 0, aRadius, 0 ); + } + glEnd(); + shaderList[0].Deactivate(); + } + break; + default: + break; + } +} + + +// This method is used for round line caps +void OPENGL_GAL::drawSemiCircle( VECTOR2D aCenterPoint, double aRadius, double aAngle, + double aDepthOffset ) +{ + // XXX Depth seems to be buggy + glPushMatrix(); + glTranslated( aCenterPoint.x, aCenterPoint.y, aDepthOffset ); + glScaled( aRadius, aRadius, 1.0 ); + glRotated( aAngle * 360.0 / ( 2 * M_PI ), 0, 0, 1 ); + + glBegin( GL_TRIANGLE_FAN ); + glCallList( displayListSemiCircle ); + glEnd(); + + glPopMatrix(); +} + + +// FIXME Optimize +void OPENGL_GAL::DrawArc( VECTOR2D aCenterPoint, double aRadius, double aStartAngle, + double aEndAngle ) +{ + if( aRadius <= 0 ) + { + return; + } + + double outerScale = lineWidth / aRadius / 2; + double innerScale = -outerScale; + + outerScale += 1.0; + innerScale += 1.0; + + // Swap the angles, if start angle is greater than end angle + SWAP( aStartAngle, >, aEndAngle ); + + VECTOR2D startPoint( cos( aStartAngle ), sin( aStartAngle ) ); + VECTOR2D endPoint( cos( aEndAngle ), sin( aEndAngle ) ); + VECTOR2D startEndPoint = startPoint + endPoint; + VECTOR2D middlePoint = 0.5 * startEndPoint; + + + glPushMatrix(); + glTranslated( aCenterPoint.x, aCenterPoint.y, layerDepth ); + glScaled( aRadius, aRadius, 1.0 ); + + if( isStrokeEnabled ) + { + if( isUseShader ) + { + int n_points_s = (int) ( aRadius * worldScale ); + int n_points_a = (int) ( ( aEndAngle - aStartAngle ) / (double) ( 2.0 * M_PI / CIRCLE_POINTS )); + + if( n_points_s < 4 ) + n_points_s = 4; + + int n_points = std::min( n_points_s, n_points_a ); + + if( n_points > CIRCLE_POINTS ) + n_points = CIRCLE_POINTS; + + double alphaIncrement = ( aEndAngle - aStartAngle ) / n_points; + + double cosI = cos( alphaIncrement ); + double sinI = sin( alphaIncrement ); + + VECTOR2D p( cos( aStartAngle ), sin( aStartAngle ) ); + + glBegin( GL_QUADS ); + for( int i = 0; i < n_points; i++ ) + { + VECTOR2D p_next( p.x * cosI - p.y * sinI, p.x * sinI + p.y * cosI ); + + drawRoundedSegment( p, p_next, lineWidth / aRadius, true, false ); + p = p_next; + } + glEnd(); + } + else + { + glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + + glBegin( GL_QUAD_STRIP ); + + double alphaIncrement = 2 * M_PI / CIRCLE_POINTS; + + for( double alpha = aStartAngle; alpha < aEndAngle; alpha += alphaIncrement ) + { + glVertex2d( cos( alpha ) * innerScale, sin( alpha ) * innerScale ); + glVertex2d( cos( alpha ) * outerScale, sin( alpha ) * outerScale ); + } + + glVertex2d( cos( aEndAngle ) * innerScale, sin( aEndAngle ) * innerScale ); + glVertex2d( cos( aEndAngle ) * outerScale, sin( aEndAngle ) * outerScale ); + + glEnd(); + + if( lineCap == LINE_CAP_ROUND ) + { + drawSemiCircle( startPoint, lineWidth / aRadius / 2, aStartAngle + M_PI, 0 ); + drawSemiCircle( endPoint, lineWidth / aRadius / 2, aEndAngle, 0 ); + } + } + } + + if( isFillEnabled ) + { + glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + + glBegin( GL_TRIANGLE_FAN ); + + glVertex2d( middlePoint.x, middlePoint.y ); + + double alphaIncrement = 2 * M_PI / CIRCLE_POINTS; + + for( double alpha = aStartAngle; alpha < aEndAngle; alpha += alphaIncrement ) + { + glVertex2d( cos( alpha ), sin( alpha ) ); + } + + glVertex2d( endPoint.x, endPoint.y ); + + glEnd(); + } + + glPopMatrix(); +} + + +struct OGLPOINT +{ + OGLPOINT() : + x( 0.0 ), y( 0.0 ), z( 0.0 ) + { + } + + OGLPOINT( const char* fastest ) + { + // do nothing for fastest speed, and keep inline + } + + OGLPOINT( const VECTOR2D& aPoint ) : + x( aPoint.x ), y( aPoint.y ), z( 0.0 ) + { + } + + OGLPOINT& operator=( const VECTOR2D& aPoint ) + { + x = aPoint.x; + y = aPoint.y; + z = 0.0; + return *this; + } + + GLdouble x; + GLdouble y; + GLdouble z; +}; + + +void OPENGL_GAL::DrawPolygon( const std::deque& aPointList ) +{ + // Any non convex polygon needs to be tesselated + // for this purpose the GLU standard functions are used + + GLUtesselator* tesselator = gluNewTess(); + + typedef std::vector OGLPOINTS; + + // Do only one heap allocation, can do because we know size in advance. + // std::vector is then fastest + OGLPOINTS vertexList( aPointList.size(), OGLPOINT( "fastest" ) ); + + InitTesselatorCallbacks( tesselator ); + + gluTessProperty( tesselator, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_POSITIVE ); + + glNormal3d( 0.0, 0.0, 1.0 ); + glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + + glShadeModel( GL_FLAT ); + gluTessBeginPolygon( tesselator, NULL ); + gluTessBeginContour( tesselator ); + + // use operator=( const POINTS& ) + copy( aPointList.begin(), aPointList.end(), vertexList.begin() ); + + for( OGLPOINTS::iterator it = vertexList.begin(); it != vertexList.end(); it++ ) + { + it->z = layerDepth; + gluTessVertex( tesselator, &it->x, &it->x ); + } + + gluTessEndContour( tesselator ); + gluTessEndPolygon( tesselator ); + + gluDeleteTess( tesselator ); + + // vertexList destroyed here +} + + +void OPENGL_GAL::DrawCurve( VECTOR2D aStartPoint, VECTOR2D aControlPointA, + VECTOR2D aControlPointB, VECTOR2D aEndPoint ) +{ + // FIXME The drawing quality needs to be improved + // FIXME Perhaps choose a quad/triangle strip instead? + // FIXME Brute force method, use a better (recursive?) algorithm + + std::deque pointList; + + double t = 0.0; + double dt = 1.0 / (double)CURVE_POINTS; + + for( int i = 0; i <= CURVE_POINTS; i++ ) + { + double omt = 1.0 - t; + double omt2 = omt * omt; + double omt3 = omt * omt2; + double t2 = t * t; + double t3 = t * t2; + + VECTOR2D vertex = omt3 * aStartPoint + 3.0 * t * omt2 * aControlPointA + + 3.0 * t2 * omt * aControlPointB + t3 * aEndPoint; + + pointList.push_back( vertex ); + + t += dt; + } + + DrawPolyline( pointList ); +} + + +void OPENGL_GAL::SetStrokeColor( COLOR4D aColor ) +{ + if( strokeColor != aColor ) + { + isSetAttributes = true; + strokeColor = aColor; + + // This is the default drawing color + glColor4d( aColor.r, aColor.g, aColor.b, aColor.a ); + } +} + + +void OPENGL_GAL::SetFillColor( COLOR4D aColor ) +{ + if( fillColor != aColor ) + { + isSetAttributes = true; + fillColor = aColor; + } +} + + +void OPENGL_GAL::SetBackgroundColor( COLOR4D aColor ) +{ + if( backgroundColor != aColor ) + { + isSetAttributes = true; + backgroundColor = aColor; + } +} + + +void OPENGL_GAL::SetLineWidth( double aLineWidth ) +{ + if( lineWidth != aLineWidth ) + { + isSetAttributes = true; + lineWidth = aLineWidth; + } +} + + +void OPENGL_GAL::ClearScreen() +{ + // Clear screen + glClearColor( backgroundColor.r, backgroundColor.g, backgroundColor.b, backgroundColor.a ); + + glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT ); +} + + +void OPENGL_GAL::Transform( MATRIX3x3D aTransformation ) +{ + GLdouble matrixData[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 }; + + matrixData[0] = aTransformation.m_data[0][0]; + matrixData[1] = aTransformation.m_data[1][0]; + matrixData[2] = aTransformation.m_data[2][0]; + matrixData[4] = aTransformation.m_data[0][1]; + matrixData[5] = aTransformation.m_data[1][1]; + matrixData[6] = aTransformation.m_data[2][1]; + matrixData[12] = aTransformation.m_data[0][2]; + matrixData[13] = aTransformation.m_data[1][2]; + matrixData[14] = aTransformation.m_data[2][2]; + + glMultMatrixd( matrixData ); +} + + +void OPENGL_GAL::Rotate( double aAngle ) +{ + glRotated( aAngle * ( 360 / ( 2 * M_PI ) ), 0, 0, 1 ); +} + + +void OPENGL_GAL::Translate( VECTOR2D aVector ) +{ + glTranslated( aVector.x, aVector.y, 0 ); +} + + +void OPENGL_GAL::Scale( VECTOR2D aScale ) +{ + // TODO: Check method + glScaled( aScale.x, aScale.y, 0 ); +} + + +void OPENGL_GAL::Flush() +{ + glFlush(); +} + + +void OPENGL_GAL::Save() +{ + glPushMatrix(); +} + + +void OPENGL_GAL::Restore() +{ + glPopMatrix(); +} + + +// TODO Error handling +int OPENGL_GAL::BeginGroup() +{ + isGroupStarted = true; + GLint displayList = glGenLists( 1 ); + glNewList( displayList, GL_COMPILE ); + displayListsGroup.push_back( displayList ); + + return (int) displayList; +} + + +void OPENGL_GAL::EndGroup() +{ + isGroupStarted = false; + glEndList(); + glCallList( displayListsGroup.back() ); +} + + +void OPENGL_GAL::DeleteGroup( int aGroupNumber ) +{ + std::deque::iterator it = displayListsGroup.begin(); + std::advance( it, aGroupNumber ); + + displayListsGroup.erase( it ); + + glDeleteLists( (GLint) aGroupNumber, 1 ); +} + + +void OPENGL_GAL::DrawGroup( int aGroupNumber ) +{ + glCallList( (GLint) aGroupNumber ); +} + + +void OPENGL_GAL::computeUnitArcs() +{ + displayListsArcs = glGenLists( CIRCLE_POINTS + 1 ); + + // Create an individual display list for each arc in with an angle [0 .. 2pi] + for( int j = 0; j < CIRCLE_POINTS + 1; j++ ) + { + glNewList( displayListsArcs + j, GL_COMPILE ); + + for( int i = 0; i < j; i++ ) + { + glVertex2d( cos( 2 * M_PI / CIRCLE_POINTS * i ), sin( 2 * M_PI / CIRCLE_POINTS * i ) ); + } + + glEndList(); + } +} + + +void OPENGL_GAL::computeUnitCircle() +{ + displayListCircle = glGenLists( 1 ); + glNewList( displayListCircle, GL_COMPILE ); + + // Compute the circle points for a given number of segments + // Insert in a display list and a vector + for( int i = 0; i < CIRCLE_POINTS + 1; i++ ) + { + double valueX = cos( 2 * M_PI / CIRCLE_POINTS * i ); + double valueY = sin( 2 * M_PI / CIRCLE_POINTS * i ); + glVertex3d( valueX, valueY, 0 ); + unitCirclePoints.push_back( VECTOR2D( valueX, valueY ) ); + } + + glEndList(); +} + + +void OPENGL_GAL::computeUnitSemiCircle() +{ + displayListSemiCircle = glGenLists( 1 ); + glNewList( displayListSemiCircle, GL_COMPILE ); + + for( int i = 0; i < CIRCLE_POINTS / 2 + 1; i++ ) + { + glVertex3d( cos( 2 * M_PI / CIRCLE_POINTS * i ), sin( 2 * M_PI / CIRCLE_POINTS * i ), 0 ); + } + + glEndList(); +} + + +void OPENGL_GAL::ComputeWorldScreenMatrix() +{ + ComputeWorldScale(); + + worldScreenMatrix.SetIdentity(); + + MATRIX3x3D translation; + translation.SetIdentity(); + translation.SetTranslation( 0.5 * screenSize ); + + MATRIX3x3D scale; + scale.SetIdentity(); + scale.SetScale( VECTOR2D( worldScale, worldScale ) ); + + MATRIX3x3D flip; + flip.SetIdentity(); + flip.SetScale( VECTOR2D( 1.0, 1.0 ) ); + + MATRIX3x3D lookat; + lookat.SetIdentity(); + lookat.SetTranslation( -lookAtPoint ); + + worldScreenMatrix = translation * flip * scale * lookat * worldScreenMatrix; +} + + +// ------------------------------------- +// Callback functions for the tesselator +// ------------------------------------- + +// Compare Redbook Chapter 11 + + +void CALLBACK VertexCallback( GLvoid* aVertexPtr ) +{ + GLdouble* vertex = (GLdouble*) aVertexPtr; + + glVertex3dv( vertex ); +} + + +void CALLBACK BeginCallback( GLenum aWhich ) +{ + glBegin( aWhich ); +} + + +void CALLBACK EndCallback() +{ + glEnd(); +} + + +void CALLBACK ErrorCallback( GLenum aErrorCode ) +{ + const GLubyte* estring; + + estring = gluErrorString( aErrorCode ); + wxLogError( wxT( "Tessellation Error: %s" ), (char*) estring ); +} + + +void InitTesselatorCallbacks( GLUtesselator* aTesselator ) +{ + gluTessCallback( aTesselator, GLU_TESS_VERTEX, ( void (CALLBACK*)() )VertexCallback ); + gluTessCallback( aTesselator, GLU_TESS_BEGIN, ( void (CALLBACK*)() )BeginCallback ); + gluTessCallback( aTesselator, GLU_TESS_END, ( void (CALLBACK*)() )EndCallback ); + gluTessCallback( aTesselator, GLU_TESS_ERROR, ( void (CALLBACK*)() )ErrorCallback ); +} + + +// --------------- +// Cursor handling +// --------------- + + +void OPENGL_GAL::initCursor( int aCursorSize ) +{ + cursorSize = aCursorSize; +} + + +VECTOR2D OPENGL_GAL::ComputeCursorToWorld( VECTOR2D aCursorPosition ) +{ + aCursorPosition.y = screenSize.y - aCursorPosition.y; + MATRIX3x3D inverseMatrix = worldScreenMatrix.Inverse(); + VECTOR2D cursorPositionWorld = inverseMatrix * aCursorPosition; + + return cursorPositionWorld; +} + + +void OPENGL_GAL::DrawCursor( VECTOR2D aCursorPosition ) +{ + SetCurrent( *glContext ); + + // Draw the cursor on the surface + VECTOR2D cursorPositionWorld = ComputeCursorToWorld( aCursorPosition ); + + cursorPositionWorld.x = round( cursorPositionWorld.x / gridSize.x ) * gridSize.x; + cursorPositionWorld.y = round( cursorPositionWorld.y / gridSize.y ) * gridSize.y; + + aCursorPosition = worldScreenMatrix * cursorPositionWorld; + + // Switch to the main frame buffer and blit the scene + glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, 0 ); + glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); + + glLoadIdentity(); + + blitMainTexture( false ); + + glDisable( GL_TEXTURE_2D ); + glColor4d( cursorColor.r, cursorColor.g, cursorColor.b, cursorColor.a ); + + glBegin( GL_QUADS ); + + glVertex3f( (int) ( aCursorPosition.x - cursorSize / 2 ) + 1, + (int) ( aCursorPosition.y ), depthRange.x ); + + glVertex3f( (int) ( aCursorPosition.x + cursorSize / 2 ) + 1, + (int) ( aCursorPosition.y ), depthRange.x ); + + glVertex3f( (int) ( aCursorPosition.x + cursorSize / 2 ) + 1, + (int) ( aCursorPosition.y + 1 ), depthRange.x ); + + glVertex3f( (int) ( aCursorPosition.x - cursorSize / 2 ) + 1, + (int) ( aCursorPosition.y + 1), depthRange.x ); + + glVertex3f( (int) ( aCursorPosition.x ), + (int) ( aCursorPosition.y - cursorSize / 2 ) + 1, depthRange.x ); + + glVertex3f( (int) ( aCursorPosition.x ), + (int) ( aCursorPosition.y + cursorSize / 2 ) + 1, depthRange.x ); + + glVertex3f( (int) ( aCursorPosition.x ) + 1, + (int) ( aCursorPosition.y + cursorSize / 2 ) + 1, depthRange.x ); + + glVertex3f( (int) ( aCursorPosition.x ) + 1, + (int) ( aCursorPosition.y - cursorSize / 2 ) + 1, depthRange.x ); + glEnd(); + + // Blit the current screen contents + SwapBuffers(); +} + + +void OPENGL_GAL::DrawGridLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) +{ + // We check, if we got a horizontal or a vertical grid line and compute the offset + VECTOR2D perpendicularVector; + + if( aStartPoint.x == aEndPoint.x ) + { + perpendicularVector = VECTOR2D( 0.5 * lineWidth, 0 ); + } + else + { + perpendicularVector = VECTOR2D( 0, 0.5 * lineWidth ); + } + + // Now we compute the edge points of the quad + VECTOR2D point1 = aStartPoint + perpendicularVector; + VECTOR2D point2 = aStartPoint - perpendicularVector; + VECTOR2D point3 = aEndPoint + perpendicularVector; + VECTOR2D point4 = aEndPoint - perpendicularVector; + + if( isUseShader ) + selectShader( -1 ); + + // Set color + glColor4d( gridColor.r, gridColor.g, gridColor.b, gridColor.a ); + + // Draw the quad for the grid line + glBegin( GL_QUADS ); + double gridDepth = depthRange.y * 0.75; + glVertex3d( point1.x, point1.y, gridDepth ); + glVertex3d( point2.x, point2.y, gridDepth ); + glVertex3d( point4.x, point4.y, gridDepth ); + glVertex3d( point3.x, point3.y, gridDepth ); + glEnd(); +} + + +bool OPENGL_GAL::Show( bool aShow ) +{ + bool s = wxGLCanvas::Show( aShow ); + + if( aShow ) + wxGLCanvas::Raise(); + + return s; +} diff --git a/common/gal/opengl/shader.cpp b/common/gal/opengl/shader.cpp new file mode 100644 index 0000000000..e38fbe1995 --- /dev/null +++ b/common/gal/opengl/shader.cpp @@ -0,0 +1,217 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * + * Graphics Abstraction Layer (GAL) for OpenGL + * + * Shader class + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include + +#include + +#include + +using namespace KiGfx; + +SHADER::SHADER() +{ + isProgramCreated = false; + isShaderLinked = false; + maximumVertices = 4; + geomInputType = GL_LINES; + geomOutputType = GL_LINES; +} + + +SHADER::~SHADER() +{ + if( isProgramCreated ) + { + // Delete the shaders and the program + for( std::deque::iterator it = shaderNumbers.begin(); it != shaderNumbers.end(); + it++ ) + { + glDeleteShader( *it ); + } + + glDeleteProgram( programNumber ); + } +} + + +void SHADER::ProgramInfo( GLuint aProgram ) +{ + GLint glInfoLogLength = 0; + GLint writtenChars = 0; + + // Get the length of the info string + glGetProgramiv( aProgram, GL_INFO_LOG_LENGTH, &glInfoLogLength ); + + // Print the information + if( glInfoLogLength > 2 ) + { + GLchar* glInfoLog = new GLchar[glInfoLogLength]; + glGetProgramInfoLog( aProgram, glInfoLogLength, &writtenChars, glInfoLog ); + + wxLogInfo( wxString::FromUTF8( (char*) glInfoLog ) ); + + delete glInfoLog; + } +} + + +std::string SHADER::ReadSource( std::string aShaderSourceName ) +{ + // Open the shader source for reading + std::ifstream inputFile( aShaderSourceName.c_str(), std::ifstream::in ); + std::string shaderSource; + + if( !inputFile ) + { + wxLogError( wxString::FromUTF8( "Can't read the shader source: " ) + + wxString( aShaderSourceName.c_str(), wxConvUTF8 ) ); + exit( 1 ); + } + + std::string shaderSourceLine; + + // Read all lines from the text file + while( getline( inputFile, shaderSourceLine ) ) + { + shaderSource += shaderSourceLine; + shaderSource += "\n"; + } + + return shaderSource; +} + + +void SHADER::AddSource( std::string aShaderSourceName, ShaderType aShaderType ) +{ + if( isShaderLinked ) + { + wxLogError( wxString::FromUTF8( "Shader is already linked!" ) ); + } + + // Create the program + if( !isProgramCreated ) + { + programNumber = glCreateProgram(); + isProgramCreated = true; + } + + // Load shader sources + std::string shaderSource = ReadSource( aShaderSourceName ); + + // Create a shader + GLuint shaderNumber = glCreateShader( aShaderType ); + shaderNumbers.push_back( shaderNumber ); + + // Get the program info + ProgramInfo( programNumber ); + + // Copy to char array + char* source = new char[shaderSource.size() + 1]; + strcpy( source, shaderSource.c_str() ); + const char** source_ = (const char**) ( &source ); + + // Attach the source + glShaderSource( shaderNumber, 1, source_, NULL ); + ProgramInfo( programNumber ); + + // Compile and attach shader to the program + glCompileShader( shaderNumber ); + glAttachShader( programNumber, shaderNumber ); + ProgramInfo( programNumber ); + + // Special handling for the geometry shader + if( aShaderType == SHADER_TYPE_GEOMETRY ) + { + glProgramParameteriEXT( programNumber, GL_GEOMETRY_VERTICES_OUT_EXT, maximumVertices ); + glProgramParameteriEXT( programNumber, GL_GEOMETRY_INPUT_TYPE_EXT, geomInputType ); + glProgramParameteriEXT( programNumber, GL_GEOMETRY_OUTPUT_TYPE_EXT, geomOutputType ); + } + + // Delete the allocated char array + delete[] source; +} + + +void SHADER::ConfigureGeometryShader( GLuint maxVertices, GLuint geometryInputType, + GLuint geometryOutputType ) +{ + maximumVertices = maxVertices; + geomInputType = geometryInputType; + geomOutputType = geometryOutputType; +} + + +void SHADER::Link() +{ + // Shader linking + glLinkProgram( programNumber ); + ProgramInfo( programNumber ); + + // Check the Link state + GLint linkStatus = 0; + glGetObjectParameterivARB( programNumber, GL_OBJECT_LINK_STATUS_ARB, &linkStatus ); + + if( !linkStatus ) + { + wxLogError( wxString::FromUTF8( "Can't link the shaders!" ) ); + exit( 1 ); + } + + isShaderLinked = true; +} + + +void SHADER::Use() +{ + glUseProgram( programNumber ); +} + + +void SHADER::Deactivate() +{ + glUseProgram( 0 ); +} + + +void SHADER::AddParameter( std::string aParameterName ) +{ + GLint location = glGetUniformLocation( programNumber, aParameterName.c_str() ); + + if( location != -1 ) + { + parameterLocation.push_back( location ); + } +} + + +void SHADER::SetParameter( int parameterNumber, float value ) +{ + glUniform1f( parameterLocation[parameterNumber], value ); +} diff --git a/common/gal/opengl/shader/circle.frag b/common/gal/opengl/shader/circle.frag new file mode 100644 index 0000000000..142952c878 --- /dev/null +++ b/common/gal/opengl/shader/circle.frag @@ -0,0 +1,60 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * + * Fragment shader + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +// This shader requires GLSL 1.2 +#version 120 + +// Input variables +flat varying vec4 center_; +flat varying vec2 radius_; +flat varying vec4 colorA_; +flat varying vec4 colorB_; + +void main( void ) +{ + // Compute the distance from the circle edge + float distA = distance( center_, gl_FragCoord ) - radius_.y; + float distB = radius_.x - distance( center_, gl_FragCoord ); + + // Limit the range to [ 0 .. 1 ] + if( distA < 0 ) distA = 0; + if( distA > 1 ) distA = 1; + if( distB < 0 ) distB = 0; + if( distB > 1 ) distB = 1; + + // Points with a larger distance from the edge are set deeper + gl_FragDepth = gl_FragCoord.z + distA * 0.001 + distB * 0.001; + + // Compute the color + vec4 color; + color.r = colorA_.r; + color.g = colorA_.g; + color.b = colorA_.b; + color.a = colorA_.a * ( 1 - distA ) * ( 1 - distB ); + + // Now output the edge fragment color + gl_FragColor = color; +} diff --git a/common/gal/opengl/shader/circle.geom b/common/gal/opengl/shader/circle.geom new file mode 100644 index 0000000000..e908e458b6 --- /dev/null +++ b/common/gal/opengl/shader/circle.geom @@ -0,0 +1,115 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * + * Geometry shader + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +// This shader requires GLSL 1.2 +#version 120 +#extension GL_EXT_geometry_shader4: enable +#extension GL_EXT_gpu_shader4: enable + +uniform float viewPortX2; +uniform float viewPortY2; + +flat varying vec4 center_; +flat varying vec2 radius_; +flat varying vec4 colorA_; + +const float PI = 3.141592654; +const float EPSILON = 0.01; +const float smallestValue = 1.175494351e-38; +const int SEGMENTS = 16; + +const float PIXEL_EXTEND = 1.5; + +void main() +{ + vec4 center = gl_PositionIn[0]; + vec4 radius = gl_PositionIn[1]; + + center_ = gl_ModelViewProjectionMatrix * center; + + // Compute the outer and inner radius in screen coordinates + // This could be further optimized + radius_.x = ( gl_ModelViewProjectionMatrix * vec4(radius.x, 0, 0, 1) ).x; + radius_.x = abs( radius_.x - (gl_ModelViewProjectionMatrix * vec4(0, 0, 0, 1) ).x ) * viewPortX2; + radius_.y = ( gl_ModelViewProjectionMatrix * vec4(radius.y, 0, 0, 1) ).x; + radius_.y = abs( radius_.y - (gl_ModelViewProjectionMatrix * vec4(0, 0, 0, 1) ).x ) * viewPortX2; + + // Compute the center point in screen coordinates + center_.x = center_.x * viewPortX2 + viewPortX2; + center_.y = center_.y * viewPortY2 + viewPortY2; + + // Compute the extend value, first make sure that the outline is inside the triangles and second add + // a margin for one pixel for smooth edges + float extendInner = 1.0; + float extendOuter = 0; + if( radius_.y > smallestValue ) + { + extendOuter += PIXEL_EXTEND / radius_.y; + } + extendOuter += 1.0 / cos( PI / SEGMENTS ); + + colorA_ = gl_FrontColorIn[0]; + + // Create a quad strip for the outer circle edge + for( float alpha = 0, inc = 2 * PI / SEGMENTS, limit = 2 * PI + EPSILON; + alpha < limit; alpha += inc ) + { + gl_Position = gl_ModelViewProjectionMatrix * + vec4( center.x + extendInner * radius.y * cos( alpha ), + center.y + extendInner * radius.y * sin( alpha ), center.zw ); + EmitVertex(); + gl_Position = gl_ModelViewProjectionMatrix * + vec4( center.x + extendOuter * radius.y * cos( alpha ), + center.y + extendOuter * radius.y * sin( alpha ), center.zw ); + EmitVertex(); + } + EndPrimitive(); + + if( radius.x > 0 ) + { + extendInner = cos( PI / SEGMENTS ) - PIXEL_EXTEND / radius_.x; + if( extendInner < 0.0 ) + { + extendInner = 0; + } + extendOuter = 1.0 / cos( PI / SEGMENTS); + + // Create a quad strip for the inner circle edge + for( float alpha = 0, inc = 2 * PI / SEGMENTS, limit = 2 * PI + EPSILON; + alpha < limit; alpha += inc ) + { + gl_Position = gl_ModelViewProjectionMatrix * + vec4( center.x + extendOuter * radius.x * cos( alpha ), + center.y + extendOuter * radius.x * sin( alpha ), center.zw ); + EmitVertex(); + gl_Position = gl_ModelViewProjectionMatrix * + vec4( center.x + extendInner * radius.x * cos( alpha ), + center.y + extendInner * radius.x * sin( alpha ), center.zw ); + EmitVertex(); + } + EndPrimitive(); + } +} diff --git a/common/gal/opengl/shader/circle.vert b/common/gal/opengl/shader/circle.vert new file mode 100644 index 0000000000..2e16c5d08f --- /dev/null +++ b/common/gal/opengl/shader/circle.vert @@ -0,0 +1,35 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * + * Vertex shader + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +// This shader requires GLSL 1.2 +#version 120 + +void main() +{ + // Simple pass-through + gl_Position = gl_Vertex; + gl_FrontColor = gl_Color; +} diff --git a/common/gal/opengl/shader/line.frag b/common/gal/opengl/shader/line.frag new file mode 100644 index 0000000000..63d0f0bf2c --- /dev/null +++ b/common/gal/opengl/shader/line.frag @@ -0,0 +1,37 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * + * Fragment shader + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#version 120 +#extension GL_EXT_gpu_shader4: enable + +varying float dist; + +void main() +{ + float d = dist; + gl_FragDepth = gl_FragCoord.z + d * 0.001; + gl_FragColor = vec4( gl_Color.rgb, gl_Color.a * ( 1 - d ) ); +} diff --git a/common/gal/opengl/shader/line.geom b/common/gal/opengl/shader/line.geom new file mode 100644 index 0000000000..8000a791cd --- /dev/null +++ b/common/gal/opengl/shader/line.geom @@ -0,0 +1,123 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * + * Geometry shader + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#version 120 +#extension GL_EXT_geometry_shader4: enable +#extension GL_EXT_gpu_shader4: enable + +uniform float viewPortX2; +uniform float viewPortY2; +varying float dist; + +void main() +{ + // Compute the transformed start and end points + vec2 startPoint = gl_PositionIn[0].xy; + vec2 endPoint = gl_PositionIn[1].xy; + float lineWidth = gl_PositionIn[1].z; + + // Compute vector start -> end + vec2 startEndVector = endPoint.xy - startPoint.xy; + float lineLength = distance( startPoint, endPoint ); + float scale = 0.0; + + if( lineLength > 0.0 ) + { + scale = 0.5 * lineWidth / lineLength; + } + else + { + scale = 0.0; + } + + // Compute the edge points of the line + vec2 perpendicularVector = scale * vec2( -startEndVector.y, startEndVector.x ); + vec2 point1 = startPoint + perpendicularVector; + vec2 point2 = startPoint - perpendicularVector; + vec2 point3 = endPoint + perpendicularVector; + vec2 point4 = endPoint - perpendicularVector; + + vec4 point1T = gl_ModelViewProjectionMatrix * vec4( point1, gl_PositionIn[0].zw ); + vec4 point2T = gl_ModelViewProjectionMatrix * vec4( point2, gl_PositionIn[0].zw ); + vec4 point3T = gl_ModelViewProjectionMatrix * vec4( point3, gl_PositionIn[0].zw ); + vec4 point4T = gl_ModelViewProjectionMatrix * vec4( point4, gl_PositionIn[0].zw ); + + // Construct the quad for the middle + gl_FrontColor = gl_FrontColorIn[0]; + dist = 0; + gl_Position = point1T; + EmitVertex(); + dist = 0; + gl_Position = point2T; + EmitVertex(); + dist = 0; + gl_Position = point3T; + EmitVertex(); + dist = 0; + gl_Position = point4T; + EmitVertex(); + + EndPrimitive(); + + // Compute the perpendicular vector with 1 pixel width + vec2 v = point1T.xy - point3T.xy; + vec4 onePix = 0.5 * vec4( -v.y, v.x, 0, 0 ); + onePix *= 1.0 / sqrt( dot( onePix, onePix ) ); + onePix.x *= 1.0 / viewPortX2; + onePix.y *= 1.0 / viewPortY2; + + gl_FrontColor = gl_FrontColorIn[0]; + + dist = 1; + gl_Position = point1T + onePix; + EmitVertex(); + dist = 1; + gl_Position = point3T + onePix; + EmitVertex(); + dist = 0; + gl_Position = point1T; + EmitVertex(); + dist = 0; + gl_Position = point3T; + EmitVertex(); + + EndPrimitive(); + + dist = 1; + gl_Position = point2T - onePix; + EmitVertex(); + dist = 1; + gl_Position = point4T - onePix; + EmitVertex(); + dist = 0; + gl_Position = point2T; + EmitVertex(); + dist = 0; + gl_Position = point4T; + EmitVertex(); + + EndPrimitive(); +} diff --git a/common/gal/opengl/shader/line.vert b/common/gal/opengl/shader/line.vert new file mode 100644 index 0000000000..2e16c5d08f --- /dev/null +++ b/common/gal/opengl/shader/line.vert @@ -0,0 +1,35 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * + * Vertex shader + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +// This shader requires GLSL 1.2 +#version 120 + +void main() +{ + // Simple pass-through + gl_Position = gl_Vertex; + gl_FrontColor = gl_Color; +} diff --git a/common/gal/opengl/shader/round.frag b/common/gal/opengl/shader/round.frag new file mode 100644 index 0000000000..3d615db8c0 --- /dev/null +++ b/common/gal/opengl/shader/round.frag @@ -0,0 +1,41 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2013 Tomasz Wlostowski + * + * Fragment shader + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#version 120 + +varying float aspect; + +void main() +{ + vec2 v = abs( gl_TexCoord[0].xy - vec2( 0.5, 0.5 ) ) * 2.0 - vec2( aspect, 0.0 ); + vec2 d = vec2( v.x / ( 1.0 - aspect ), v.y ); + + if( v.x <= 0.0 || (dot( d, d ) < 1.0 ) ) + gl_FragColor = gl_Color; + else + discard; + + // gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); +} diff --git a/common/gal/opengl/shader/round.vert b/common/gal/opengl/shader/round.vert new file mode 100644 index 0000000000..21410a6063 --- /dev/null +++ b/common/gal/opengl/shader/round.vert @@ -0,0 +1,37 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2013 Tomasz Wlostowski + * + * Vertex shader + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#version 120 + +varying float aspect; + +void main() +{ + gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; + gl_FrontColor = gl_Color; + gl_TexCoord[0] = gl_MultiTexCoord0; + + aspect = gl_Normal.x; +} diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp new file mode 100644 index 0000000000..a82021dc30 --- /dev/null +++ b/common/gal/stroke_font.cpp @@ -0,0 +1,276 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * + * Stroke font class + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include + +using namespace KiGfx; + +STROKE_FONT::STROKE_FONT( GAL* aGal ) : + m_gal( aGal ), + m_bold( false ), + m_italic( false ), + m_mirrored( false ) +{ + // Default values + m_scaleFactor = 1.0 / 21.0; + m_glyphSize = VECTOR2D( 10.0, 10.0 ); + m_verticalJustify = GR_TEXT_VJUSTIFY_BOTTOM; + m_horizontalJustify = GR_TEXT_HJUSTIFY_LEFT; +} + + +STROKE_FONT::~STROKE_FONT() +{ +} + + +bool STROKE_FONT::LoadNewStrokeFont( const char* const aNewStrokeFont[], int aNewStrokeFontSize ) +{ + m_glyphs.clear(); + m_glyphBoundingBoxes.clear(); + + for( int j = 0; j < aNewStrokeFontSize; j++ ) + { + Glyph glyph; + double glyphStartX; + double glyphEndX; + VECTOR2D glyphBoundingX; + + std::deque pointList; + + int i = 0; + + while( aNewStrokeFont[j][i] ) + { + VECTOR2D point; + char coordinate[2]; + + for( int k = 0; k < 2; k++ ) + { + coordinate[k] = aNewStrokeFont[j][i + k]; + } + + if( i < 2 ) + { + // The first two values contain the width of the char + glyphStartX = coordinate[0] - 'R'; + glyphEndX = coordinate[1] - 'R'; + glyphBoundingX = VECTOR2D( 0, glyphEndX - glyphStartX ); + } + else if( ( coordinate[0] == ' ' ) && ( coordinate[1] == 'R' ) ) + { + // Raise pen + if( pointList.size() > 0 ) + glyph.push_back( pointList ); + + pointList.clear(); + } + else + { + // Every coordinate description of the Hershey format has an offset, + // it has to be subtracted + point.x = (double) ( coordinate[0] - 'R' ) - glyphStartX; + point.y = (double) ( coordinate[1] - 'R' ) - 11.0; + pointList.push_back( point ); + } + + i += 2; + } + + if( pointList.size() > 0 ) + glyph.push_back( pointList ); + + m_glyphs.push_back( glyph ); + + // Compute the bounding box of the glyph + m_glyphBoundingBoxes.push_back( computeBoundingBox( glyph, glyphBoundingX ) ); + } + + return true; +} + + +void STROKE_FONT::LoadAttributes( const EDA_TEXT* aText ) +{ + SetGlyphSize( VECTOR2D( aText->GetSize() ) ); + SetHorizontalJustify( aText->GetHorizJustify() ); + SetVerticalJustify( aText->GetVertJustify() ); + SetBold( aText->IsBold() ); + SetItalic( aText->IsItalic() ); + SetMirrored( aText->IsMirrored() ); +} + + +BOX2D STROKE_FONT::computeBoundingBox( Glyph aGlyph, VECTOR2D aGlyphBoundingX ) +{ + BOX2D boundingBox; + + std::deque boundingPoints; + + boundingPoints.push_back( VECTOR2D( aGlyphBoundingX.x, 0 ) ); + boundingPoints.push_back( VECTOR2D( aGlyphBoundingX.y, 0 ) ); + + for( Glyph::iterator pointListIt = aGlyph.begin(); pointListIt != aGlyph.end(); ++pointListIt ) + { + for( std::deque::iterator pointIt = pointListIt->begin(); + pointIt != pointListIt->end(); ++pointIt ) + { + boundingPoints.push_back( VECTOR2D( aGlyphBoundingX.x, pointIt->y ) ); + } + } + + boundingBox.Compute( boundingPoints ); + + return boundingBox; +} + + +void STROKE_FONT::Draw( std::string aText, VECTOR2D aPosition, double aRotationAngle ) +{ + // Compute the text size + VECTOR2D textsize = computeTextSize( aText ); + + // Context needs to be saved before any transformations + m_gal->Save(); + + m_gal->Translate( aPosition ); + m_gal->Rotate( -aRotationAngle ); + + // Adjust the text position to the given alignment + switch( m_horizontalJustify ) + { + case GR_TEXT_HJUSTIFY_CENTER: + m_gal->Translate( VECTOR2D( -textsize.x / 2, 0 ) ); + break; + + case GR_TEXT_HJUSTIFY_RIGHT: + m_gal->Translate( VECTOR2D( -textsize.x, 0 ) ); + break; + + case GR_TEXT_HJUSTIFY_LEFT: + break; + + default: + break; + } + + switch( m_verticalJustify ) + { + case GR_TEXT_VJUSTIFY_CENTER: + m_gal->Translate( VECTOR2D( 0, textsize.y / 2 ) ); + break; + + case GR_TEXT_VJUSTIFY_TOP: + m_gal->Translate( VECTOR2D( 0, textsize.y ) ); + break; + + case GR_TEXT_VJUSTIFY_BOTTOM: + break; + + default: + break; + } + + double xOffset, glyphSizeX; + + if( m_mirrored ) + { + // In case of mirrored text invert the X scale of points and their X direction + // (m_glyphSize.x) and start drawing from the position where text normally should end + // (textsize.x) + xOffset = textsize.x; + glyphSizeX = -m_glyphSize.x; + } + else + { + xOffset = 0.0; + glyphSizeX = m_glyphSize.x; + } + double scaleY = m_scaleFactor * m_glyphSize.y; + double scaleX = m_scaleFactor * glyphSizeX; + + if( m_bold ) + { + m_gal->SetLineWidth( m_gal->GetLineWidth() * 1.3 ); + } + + for( std::string::iterator chIt = aText.begin(); chIt != aText.end(); chIt++ ) + { + GlyphList::iterator glyphIt = m_glyphs.begin(); + std::deque::iterator bbIt = m_glyphBoundingBoxes.begin(); + + advance( glyphIt, (int) ( *chIt ) - (int) ' ' ); + advance( bbIt, (int) ( *chIt ) - (int) ' ' ); + + Glyph glyph = *glyphIt; + + for( Glyph::iterator pointListIt = glyph.begin(); pointListIt != glyph.end(); + pointListIt++ ) + { + std::deque pointListScaled; + + for( std::deque::iterator pointIt = pointListIt->begin(); + pointIt != pointListIt->end(); pointIt++ ) + { + VECTOR2D pointPos( pointIt->x * scaleX + xOffset, pointIt->y * scaleY ); + + if( m_italic ) + { + // FIXME should be done other way - referring to the lowest Y value of point + // because now italic fonts are translated a bit + pointPos.x += pointPos.y * 0.1; + } + + pointListScaled.push_back( pointPos ); + } + + m_gal->DrawPolyline( pointListScaled ); + } + + xOffset += m_scaleFactor * glyphSizeX * + ( bbIt->GetEnd().x - bbIt->GetOrigin().x ); + } + + m_gal->Restore(); +} + + +VECTOR2D STROKE_FONT::computeTextSize( std::string aText ) +{ + VECTOR2D result = VECTOR2D( 0.0, 0.0 ); + + for( std::string::iterator chIt = aText.begin(); chIt != aText.end(); chIt++ ) + { + std::deque::iterator bbIt = m_glyphBoundingBoxes.begin(); + advance( bbIt, (int) ( *chIt ) - (int) ' ' ); + result.x += m_scaleFactor * m_glyphSize.x * ( bbIt->GetEnd().x - bbIt->GetOrigin().x ); + } + + result.y = m_glyphSize.y; + + return result; +} diff --git a/common/painter.cpp b/common/painter.cpp new file mode 100644 index 0000000000..46c8a15d20 --- /dev/null +++ b/common/painter.cpp @@ -0,0 +1,82 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include +#include + +using namespace KiGfx; + +RENDER_SETTINGS::RENDER_SETTINGS() +{ + // Set the default initial values + m_selectionBorderColor = COLOR4D( 1.0, 1.0, 1.0, 1.0 ); + m_netLabelColor = COLOR4D( 1.0, 1.0, 1.0, 0.7 ); + + m_highlightFactor = 0.5; + m_selectFactor = 0.5; + m_layerOpacity = 0.8; + m_highlightEnabled = false; + m_hiContrastEnabled = false; + m_hiContrastFactor = 0.2; + + // Store the predefined colors used in KiCad in format used by GAL + for( int i = 0; i < NBCOLOR; i++ ) + { + m_legacyColorMap[ColorRefs[i].m_Numcolor] = COLOR4D( (double) ColorRefs[i].m_Red / 255.0, + (double) ColorRefs[i].m_Green / 255.0, + (double) ColorRefs[i].m_Blue / 255.0, + m_layerOpacity ); + } +} + + +RENDER_SETTINGS::~RENDER_SETTINGS() +{ +} + + +void RENDER_SETTINGS::Update() +{ + m_hiContrastColor = COLOR4D( m_hiContrastFactor, m_hiContrastFactor, m_highlightFactor, + m_layerOpacity ); +} + + +PAINTER::PAINTER( GAL* aGal ) : + m_gal( aGal ), m_settings( NULL ) +{ + m_stroke_font = new STROKE_FONT( aGal ); + m_stroke_font->LoadNewStrokeFont( newstroke_font, newstroke_font_bufsize ); +} + + +PAINTER::~PAINTER() +{ + delete m_stroke_font; +} diff --git a/common/profile.h b/common/profile.h new file mode 100644 index 0000000000..d224152a89 --- /dev/null +++ b/common/profile.h @@ -0,0 +1,159 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file profile.h: + * @brief Simple profiling functions for measuring code execution time. Currently only Linux is + * supported. + */ + +#ifndef __PROFILE_H +#define __PROFILE_H + +#ifdef __linux__ + #include +#endif + +#include + +/** + * Function rdtsc + * Returns processor's time-stamp counter. Main purpose is precise time measuring of code + * execution time. + * @return unsigned long long - Value of time-stamp counter. + */ +#if defined(__i386__) +static __inline__ unsigned long long rdtsc() +{ + unsigned long long int x; + __asm__ volatile ( ".byte 0x0f, 0x31" : "=A" ( x ) ); + + return x; +} + + +#elif defined(__x86_64__) +static __inline__ unsigned long long rdtsc() +{ + unsigned hi, lo; + __asm__ __volatile__ ( "rdtsc" : "=a" ( lo ), "=d" ( hi ) ); + + return ( (unsigned long long) lo ) | ( ( (unsigned long long) hi ) << 32 ); +} + + +#elif defined(__powerpc__) +static __inline__ unsigned long long rdtsc() +{ + unsigned long long int result = 0; + unsigned long int upper, lower, tmp; + __asm__ volatile ( + "0: \n" + "\tmftbu %0 \n" + "\tmftb %1 \n" + "\tmftbu %2 \n" + "\tcmpw %2,%0 \n" + "\tbne 0b \n" + : "=r" ( upper ), "=r" ( lower ), "=r" ( tmp ) + ); + + result = upper; + result = result << 32; + result = result | lower; + + return result; +} + + +#endif /* __powerpc__ */ + +// Fixme: OS X version +/** + * Function get_tics + * Returns the number of milliseconds that have elapsed since the system was started. + * @return uint64_t Number of milliseconds. + */ +static inline uint64_t get_tics() +{ +#if defined(__linux__) + struct timezone tz = { 0, 0 }; + struct timeval tv; + gettimeofday( &tv, &tz ); + + return (uint64_t) tv.tv_sec * 1000000ULL + (uint64_t) tv.tv_usec; +#elif defined _WIN32 || defined _WIN64 + // TODO to be tested + return GetTickCount(); +#else + return 0; +#endif +} + + +/** + * Structure for storing data related to profiling counters. + */ +struct prof_counter +{ + uint64_t value; /// Stored timer value + bool use_rdtsc; /// Method of time measuring (rdtsc or tics) +}; + +/** + * Function prof_start + * Begins code execution time counting for a given profiling counter. + * @param cnt is the counter which should be started. + * @param use_rdtsc tells if processor's time-stamp counter should be used for time counting. + * Otherwise is system tics method will be used. + */ +static inline void prof_start( prof_counter* cnt, bool use_rdtsc ) +{ + cnt->use_rdtsc = use_rdtsc; + + if( use_rdtsc ) + { + cnt->value = rdtsc(); + } + else + { + cnt->value = get_tics(); + } +} + + +/** + * Function prof_stop + * Ends code execution time counting for a given profiling counter. + * @param cnt is the counter which should be stopped. + */ +static inline void prof_end( prof_counter* cnt ) +{ + if( cnt->use_rdtsc ) + cnt->value = rdtsc() - cnt->value; + else + cnt->value = get_tics() - cnt->value; +} + + +#endif diff --git a/common/view/view.cpp b/common/view/view.cpp new file mode 100644 index 0000000000..0e78e23eb7 --- /dev/null +++ b/common/view/view.cpp @@ -0,0 +1,486 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include + +using namespace KiGfx; + +const unsigned int VIEW::VIEW_MAX_LAYERS = 64; + +void VIEW::AddLayer( int aLayer, bool aDisplayOnly ) +{ + if( m_layers.find( aLayer ) == m_layers.end() ) + { + m_layers[aLayer] = VIEW_LAYER(); + m_layers[aLayer].id = aLayer; + m_layers[aLayer].items = new VIEW_RTREE(); + m_layers[aLayer].renderingOrder = aLayer; + m_layers[aLayer].enabled = true; + m_layers[aLayer].isDirty = false; + m_layers[aLayer].displayOnly = aDisplayOnly; + } + + sortLayers(); +} + + +void VIEW::Add( VIEW_ITEM* aItem ) +{ + int layers[VIEW_MAX_LAYERS], layers_count; + + aItem->ViewGetLayers( layers, layers_count ); + + for( int i = 0; i < layers_count; i++ ) + { + VIEW_LAYER* l = &m_layers[layers[i]]; + l->items->Insert( aItem ); + l->dirtyExtents.Merge( aItem->ViewBBox() ); + } + + if( m_dynamic ) + aItem->viewAssign( this ); +} + + +void VIEW::Remove( VIEW_ITEM* aItem ) +{ + if( m_dynamic ) + aItem->m_view = NULL; + +// fixme: this is so sloooow! + for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) + { + VIEW_LAYER* l = & ( ( *i ).second ); + l->items->Remove( aItem ); + } +} + + +// stupid C++... python lamda would do this in one line +template +struct queryVisitor +{ + typedef typename Container::value_type item_type; + + queryVisitor( Container& aCont, int aLayer ) : + m_cont( aCont ), m_layer( aLayer ) + { + } + + void operator()( VIEW_ITEM* aItem ) + { + if( aItem->ViewIsVisible() ) + m_cont.push_back( VIEW::LayerItemPair( aItem, m_layer ) ); + } + + Container& m_cont; + int m_layer; +}; + + +int VIEW::Query( const BOX2I& aRect, std::vector& aResult ) +{ + if( m_orderedLayers.empty() ) + return 0; + + std::vector::reverse_iterator i; + + // execute queries in reverse direction, so that items that are on the top of + // the rendering stack are returned first. + for( i = m_orderedLayers.rbegin(); i != m_orderedLayers.rend(); ++i ) + { + // ignore layers that do not contain actual items (i.e. the selection box, menus, floats) + if( ( *i )->displayOnly ) + continue; + + queryVisitor > visitor( aResult, ( *i )->id ); + ( *i )->items->Query( aRect, visitor ); + } + + return aResult.size(); +} + + +VIEW::VIEW( bool aIsDynamic, bool aUseGroups ) : + m_scale ( 1.0 ), + m_painter( NULL ), + m_gal( NULL ), + m_dynamic( aIsDynamic ), + m_useGroups( aUseGroups ) +{ +} + + +VIEW::~VIEW() +{ +} + + +VECTOR2D VIEW::ToWorld( const VECTOR2D& aCoord, bool aAbsolute ) const +{ + MATRIX3x3D matrix = m_gal->GetWorldScreenMatrix().Inverse(); + + if( aAbsolute ) + { + return VECTOR2D( matrix * aCoord ); + } + else + { + return VECTOR2D( matrix.GetScale().x * aCoord.x, matrix.GetScale().y * aCoord.y ); + } +} + + +VECTOR2D VIEW::ToScreen( const VECTOR2D& aCoord, bool aAbsolute ) const +{ + MATRIX3x3D matrix = m_gal->GetWorldScreenMatrix(); + + if( aAbsolute ) + { + return VECTOR2D( matrix * aCoord ); + } + else + { + return VECTOR2D( matrix.GetScale().x * aCoord.x, matrix.GetScale().y * aCoord.y ); + } +} + + +double VIEW::ToScreen( double aCoord, bool aAbsolute ) const +{ + VECTOR2D t( aCoord, 0 ); + + return ToScreen( t, aAbsolute ).x; +} + + +void VIEW::CopySettings( const VIEW* aOtherView ) +{ + // FIXME +} + + +void VIEW::SetGAL( GAL* aGal ) +{ + m_gal = aGal; + + // force the new GAL to display the current viewport. + SetCenter( m_center ); + SetScale( m_scale ); +} + + +void VIEW::SetPainter( PAINTER* aPainter ) +{ + m_painter = aPainter; +} + + +BOX2D VIEW::GetViewport() const +{ + BOX2D rect; + VECTOR2D screenSize = m_gal->GetScreenPixelSize(); + + rect.SetOrigin( ToWorld( VECTOR2D( 0, 0 ) ) ); + rect.SetEnd( ToWorld( screenSize ) ); + + return rect.Normalize(); +} + + +void VIEW::SetViewport( const BOX2D& aViewport, bool aKeepAspect ) +{ + VECTOR2D ssize = ToWorld( m_gal->GetScreenPixelSize(), false ); + VECTOR2D centre = aViewport.Centre(); + VECTOR2D vsize = aViewport.GetSize(); + double zoom = 1.0 / std::min( fabs( vsize.x / ssize.x ), fabs( vsize.y / ssize.y ) ); + + SetCenter( centre ); + SetScale( GetScale() * zoom ); +} + + +void VIEW::SetMirror( bool aMirrorX, bool aMirrorY ) +{ + // FIXME +} + + +void VIEW::SetScale( double aScale ) +{ + SetScale( aScale, m_center ); +} + + +void VIEW::SetScale( double aScale, const VECTOR2D& aAnchor ) +{ + VECTOR2D a = ToScreen( aAnchor ); + + m_gal->SetZoomFactor( aScale ); + m_gal->ComputeWorldScreenMatrix(); + + VECTOR2D delta = ToWorld( a ) - aAnchor; + + SetCenter( m_center - delta ); + m_scale = aScale; +} + + +void VIEW::SetCenter( const VECTOR2D& aCenter ) +{ + m_center = aCenter; + m_gal->SetLookAtPoint( m_center ); + m_gal->ComputeWorldScreenMatrix(); +} + + +void VIEW::SetLayerVisible( int aLayer, bool aVisible ) +{ + // FIXME +} + + +void VIEW::sortLayers() +{ + int n = 0; + + m_orderedLayers.resize( m_layers.size() ); + + for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) + m_orderedLayers[n++] = &i->second; + + sort( m_orderedLayers.begin(), m_orderedLayers.end(), compareRenderingOrder ); +} + + +void VIEW::SetLayerOrder( int aLayer, int aRenderingOrder ) +{ + m_layers[aLayer].renderingOrder = aRenderingOrder; + sortLayers(); +} + + +struct VIEW::drawItem +{ + drawItem( VIEW* aView, int aCurrentLayer ) : + count( 0 ), countCached( 0 ), currentLayer( aCurrentLayer ), time( 0 ), view( aView ) + { + } + + void operator()( VIEW_ITEM* aItem ) + { + BOX2I tmp; + uint64_t ts = rdtsc(); + GAL* gal = view->GetGAL(); + + if( view->m_useGroups ) + { + int group = aItem->m_cachedGroup; + + if( group >= 0 && aItem->ViewIsVisible() ) + { + gal->DrawGroup( group ); + countCached++; + } + else + { + group = gal->BeginGroup(); + aItem->m_cachedGroup = group; + aItem->ViewDraw( 0, gal, tmp ); + gal->EndGroup(); + gal->DrawGroup( group ); + } + } + else if( aItem->ViewIsVisible() ) + { + if( !( view->m_painter + && view->m_painter->Draw( static_cast( aItem ), currentLayer ) ) ) + { + // Fallback, if there is no painter or painter does not know how to draw aItem + aItem->ViewDraw( currentLayer, gal, tmp ); + } + } + + time += rdtsc() - ts; + count++; + } + + int count; + int countCached; + int currentLayer; + uint64_t time; + VIEW* view; +}; + +void VIEW::redrawRect( const BOX2I& aRect ) +{ + int totalItems = 0, totalCached = 0; + uint64_t totalDrawTime = 0; + prof_counter totalCycles, totalRealTime; + + prof_start( &totalRealTime, false ); + prof_start( &totalCycles, true ); + + BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers ) + { + drawItem drawFunc( this, l->id ); + + m_gal->SetLayerDepth( (double) l->renderingOrder ); + l->items->Query( aRect, drawFunc ); + l->isDirty = false; + + totalItems += drawFunc.count; + totalDrawTime += drawFunc.time; + totalCached += drawFunc.countCached; + } + + prof_end( &totalCycles ); + prof_end( &totalRealTime ); + + wxLogDebug( "Redraw::items %d (%d cached), %.1f ms/frame (%.0f FPS), draw/geometry ratio: %.1f%%", + totalItems, totalCached, (double) totalRealTime.value / 1000.0, + 1000000.0 / (double) totalRealTime.value, + (double) totalDrawTime / (double) totalCycles.value * 100.0 ); +} + + +struct VIEW::unlinkItem +{ + void operator()( VIEW_ITEM* aItem ) + { + aItem->m_view = NULL; + } +}; + + +void VIEW::Clear() +{ + BOX2I r; + + r.SetMaximum(); + + for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) + { + VIEW_LAYER* l = &( ( *i ).second ); + unlinkItem v; + if( m_dynamic ) + l->items->Query( r, v ); + + l->items->RemoveAll(); + }; +} + + +void VIEW::Redraw() +{ + VECTOR2D screenSize = m_gal->GetScreenPixelSize(); + BOX2I rect( ToWorld( VECTOR2D( 0, 0 ) ), + ToWorld( screenSize ) - ToWorld( VECTOR2D( 0, 0 ) ) ); + + rect.Normalize(); + redrawRect( rect ); +} + + +VECTOR2D VIEW::GetScreenPixelSize() const +{ + return m_gal->GetScreenPixelSize(); +} + + +void VIEW::invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ) +{ + int layer_indices[VIEW_MAX_LAYERS], layer_count; + + aItem->ViewGetLayers( layer_indices, layer_count ); + + for( int i = 0; i < layer_count; i++ ) + { + VIEW_LAYER* l = &m_layers[layer_indices[i]]; + + l->dirtyExtents = + l->isDirty ? aItem->ViewBBox() : l->dirtyExtents.Merge( aItem->ViewBBox() ); + + if( aUpdateFlags & VIEW_ITEM::GEOMETRY ) + { + l->items->Remove( aItem ); + l->items->Insert( aItem ); /* reinsert */ + + if( m_useGroups ) + aItem->m_cachedGroup = -1; + } + } + + if( m_useGroups && aItem->m_cachedGroup >= 0 ) + { + m_gal->DeleteGroup( aItem->m_cachedGroup ); + aItem->m_cachedGroup = -1; + } +} + + +struct VIEW::clearItemCache +{ + clearItemCache( VIEW* aView ) : + view( aView ) + { + } + + void operator()( VIEW_ITEM* aItem ) + { + if( aItem->m_cachedGroup >= 0 ) + { + view->GetGAL()->DeleteGroup( aItem->m_cachedGroup ); + aItem->m_cachedGroup = -1; + } + } + + VIEW* view; +}; + + +void VIEW::clearGroupCache() +{ + BOX2I r; + + r.SetMaximum(); + + for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) + { + VIEW_LAYER* l = & ( ( *i ).second ); + clearItemCache visitor( this ); + l->items->Query( r, visitor ); + }; +} diff --git a/common/view/view_item.cpp b/common/view/view_item.cpp new file mode 100644 index 0000000000..dce0120882 --- /dev/null +++ b/common/view/view_item.cpp @@ -0,0 +1,68 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +#include +#include + +using namespace KiGfx; + +void VIEW_ITEM::ViewSetVisible( bool aIsVisible ) +{ + bool update = false; + + if( m_viewVisible != aIsVisible ) + { + update = true; + } + + m_viewVisible = aIsVisible; + + // update only if the visibility has really changed + if( update ) + { + ViewUpdate( APPEARANCE ); + } +} + + +void VIEW_ITEM::ViewUpdate( int aUpdateFlags, bool aForceImmediateRedraw ) +{ + m_view->invalidateItem( this, aUpdateFlags ); + + if( aForceImmediateRedraw ) + { + m_view->Redraw(); + } +} + + +void VIEW_ITEM::ViewRelease() +{ + if( m_view && m_view->IsDynamic() ) + { + m_view->Remove( this ); + } +} diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp new file mode 100644 index 0000000000..67b5cf603d --- /dev/null +++ b/common/view/wx_view_controls.cpp @@ -0,0 +1,137 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include + +#include +#include + +using namespace KiGfx; + +WX_VIEW_CONTROLS::WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ) : + VIEW_CONTROLS( aView ), + m_autoPanMargin( 0.1 ), + m_autoPanSpeed( 0.15 ), + m_autoPanCornerRatio( 0.1 ), + m_parentPanel( aParentPanel ) +{ + m_parentPanel->Connect( wxEVT_MOTION, wxMouseEventHandler( + WX_VIEW_CONTROLS::onMotion ), NULL, this ); + m_parentPanel->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( + WX_VIEW_CONTROLS::onWheel ), NULL, this ); + m_parentPanel->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( + WX_VIEW_CONTROLS::onButton ), NULL, this ); + m_parentPanel->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( + WX_VIEW_CONTROLS::onButton ), NULL, this ); +} + + +void WX_VIEW_CONTROLS::onMotion( wxMouseEvent& event ) +{ + VECTOR2D mousePoint( event.GetX(), event.GetY() ); + + if( event.Dragging() ) + { + if( m_isDragPanning ) + { + VECTOR2D d = m_dragStartPoint - mousePoint; + VECTOR2D delta = m_view->ToWorld( d, false ); + + m_view->SetCenter( m_lookStartPoint + delta ); + m_parentPanel->Refresh(); + } + else + { + event.Skip(); + } + } +} + + +void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& event ) +{ + const double wheelPanSpeed = 0.001; + + if( event.ControlDown() ) + { + wxLongLong timeStamp = wxGetLocalTimeMillis(); + double timeDiff = timeStamp.ToDouble() - m_timeStamp.ToDouble(); + + m_timeStamp = timeStamp; + double zoomScale; + + // Set scaling speed depending on scroll wheel event interval + if( timeDiff < 500 && timeDiff > 0 ) + { + zoomScale = ( event.GetWheelRotation() > 0.0 ) ? 2.05 - timeDiff / 500 : + 1.0 / ( 2.05 - timeDiff / 500 ); + } + else + { + zoomScale = ( event.GetWheelRotation() > 0.0 ) ? 1.05 : 0.95; + } + + + VECTOR2D anchor = m_view->ToWorld( VECTOR2D( event.GetX(), event.GetY() ) ); + m_view->SetScale( m_view->GetScale() * zoomScale, anchor ); + m_parentPanel->Refresh(); + } + else + { + VECTOR2D scrollVec = m_view->ToWorld( m_view->GetScreenPixelSize() * + ( (double) event.GetWheelRotation() * wheelPanSpeed ), false ); + double scrollSpeed; + + if( abs( scrollVec.x ) > abs( scrollVec.y ) ) + scrollSpeed = scrollVec.x; + else + scrollSpeed = scrollVec.y; + + VECTOR2D t = m_view->GetScreenPixelSize(); + VECTOR2D delta( event.ShiftDown() ? scrollSpeed : 0.0, + !event.ShiftDown() ? scrollSpeed : 0.0 ); + + m_view->SetCenter( m_view->GetCenter() + delta ); + m_parentPanel->Refresh(); + } +} + + +void WX_VIEW_CONTROLS::onButton( wxMouseEvent& event ) +{ + if( event.RightDown() ) + { + m_isDragPanning = true; + m_dragStartPoint = VECTOR2D( event.GetX(), event.GetY() ); + m_lookStartPoint = m_view->GetCenter(); // ookAtPoint(); + } + else if( event.RightUp() ) + { + m_isDragPanning = false; + } + + event.Skip(); +} diff --git a/common/zoom.cpp b/common/zoom.cpp index 2c25c7a19f..6d3dac3ee9 100644 --- a/common/zoom.cpp +++ b/common/zoom.cpp @@ -39,7 +39,11 @@ #include #include #include - +#ifdef KICAD_GAL +#include +#include +#include +#endif void EDA_DRAW_FRAME::RedrawScreen( const wxPoint& aCenterPoint, bool aWarpPointer ) @@ -82,7 +86,10 @@ void EDA_DRAW_FRAME::Zoom_Automatique( bool aWarpPointer ) if( screen->m_FirstRedraw ) screen->SetCrossHairPosition( screen->GetScrollCenterPosition() ); - RedrawScreen( screen->GetScrollCenterPosition(), aWarpPointer ); + if( !m_galCanvasActive ) + RedrawScreen( screen->GetScrollCenterPosition(), aWarpPointer ); + else + m_canvas->Hide(); } @@ -160,6 +167,36 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event ) m_canvas->Refresh(); break; +#ifdef KICAD_GAL + // Switch canvas between standard and GAL-based + case ID_SWITCH_CANVAS: + { + UseGalCanvas( !m_galCanvasActive ); + + KiGfx::VIEW* view = m_galCanvas->GetView(); + KiGfx::GAL* gal = m_galCanvas->GetGAL(); + double zoomFactor = gal->GetWorldScale() / gal->GetZoomFactor(); + + // Display the same view after canvas switching + if( m_galCanvasActive ) + { + double zoom = 1 / ( zoomFactor * m_canvas->GetZoom() ); + view->SetScale( zoom ); + + view->SetCenter( VECTOR2D( m_canvas->GetScreenCenterLogicalPosition() ) ); + } + else + { + double zoom = 1 / ( zoomFactor * view->GetScale() ); + m_canvas->SetZoom( zoom ); + + VECTOR2D center = view->GetCenter(); + RedrawScreen( wxPoint( center.x, center.y ), false ); + } + } + break; +#endif + case ID_POPUP_ZOOM_CENTER: center = screen->GetCrossHairPosition(); RedrawScreen( center, true ); diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index f154c169d4..c7922c58d6 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -104,6 +104,13 @@ target_link_libraries(cvpcb ${GDI_PLUS_LIBRARIES} ) +if(KICAD_GAL) +target_link_libraries(cvpcb + gal + ${GLEW_LIBRARIES} + ) +endif(KICAD_GAL) + ### # Add cvpcb as install target ### diff --git a/include/base_struct.h b/include/base_struct.h index c258b17d47..487fea0eb9 100644 --- a/include/base_struct.h +++ b/include/base_struct.h @@ -35,6 +35,7 @@ #include #include #include +#include #include @@ -389,7 +390,11 @@ public: * is a base class for most all the KiCad significant classes, used in * schematics and boards. */ +#ifdef KICAD_GAL +class EDA_ITEM : public KiGfx::VIEW_ITEM +#else class EDA_ITEM +#endif { private: @@ -740,6 +745,12 @@ public: */ virtual EDA_ITEM& operator=( const EDA_ITEM& aItem ); + /// @copydoc VIEW_ITEM::ViewBBox() + virtual const BOX2I ViewBBox() const; + + /// @copydoc VIEW_ITEM::ViewGetLayers() + virtual void ViewGetLayers( int aLayers[], int& aCount ) const; + #if defined(DEBUG) /** diff --git a/include/class_board_item.h b/include/class_board_item.h index 2c64957d48..a0077a19c6 100644 --- a/include/class_board_item.h +++ b/include/class_board_item.h @@ -248,6 +248,9 @@ public: static std::string FormatInternalUnits( const wxPoint& aPoint ); static std::string FormatInternalUnits( const wxSize& aSize ); + + /// @copydoc VIEW_ITEM::ViewGetLayers() + virtual void ViewGetLayers( int aLayers[], int& aCount ) const; }; #endif /* BOARD_ITEM_STRUCT_H */ diff --git a/include/class_drawpanel.h b/include/class_drawpanel.h index 0e3fe4cf22..dcca64cb88 100644 --- a/include/class_drawpanel.h +++ b/include/class_drawpanel.h @@ -258,6 +258,9 @@ public: void OnCharHook( wxKeyEvent& event ); void OnPan( wxCommandEvent& event ); +#ifdef KICAD_GAL + void OnSize( wxSizeEvent& event ); +#endif void EraseScreen( wxDC* DC ); void OnScrollWin( wxCommandEvent& event ); diff --git a/include/class_drawpanel_gal.h b/include/class_drawpanel_gal.h new file mode 100644 index 0000000000..206d88a5ff --- /dev/null +++ b/include/class_drawpanel_gal.h @@ -0,0 +1,99 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file class_drawpanel_gal.h: + * @brief EDA_DRAW_PANEL_GAL class definition. + */ + +#ifndef PANELGAL_WXSTRUCT_H +#define PANELGAL_WXSTRUCT_H + +#include +#include + +#include + +class BOARD; + +namespace KiGfx +{ +class GAL; +class VIEW; +class WX_VIEW_CONTROLS; +class PAINTER; +}; + + +class EDA_DRAW_PANEL_GAL : public wxWindow +{ +public: + enum GalType { + GAL_TYPE_OPENGL, ///< OpenGL implementation + GAL_TYPE_CAIRO, ///< Cairo implementation + GAL_TYPE_WXDC ///< WXDC implementation + }; + + EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWindowId, const wxPoint& aPosition, + const wxSize& aSize, GalType aGalType = GAL_TYPE_OPENGL ); + ~EDA_DRAW_PANEL_GAL(); + + /** + * Function SwitchBackend + * Switches method of rendering graphics. + * @param aGalType is a type of rendering engine that you want to use. + */ + void SwitchBackend( GalType aGalType, bool aUseShaders = false ); + + /** + * Function GetGAL + * Returns a pointer to the GAL instance used in the panel. + * @return KiGfx::GAL* Instance of GAL. + */ + KiGfx::GAL* GetGAL() { return m_gal; } + + void SetView( KiGfx::VIEW* aView ) { m_view = aView; } + KiGfx::VIEW* GetView() const { return m_view; } + +protected: + void onPaint( wxEvent& event ); + void onSize( wxSizeEvent& aEvent ); + void onMotion( wxMouseEvent& event ); + void onButton( wxMouseEvent& event ); + void onEraseBackground( wxEvent& event ); + + KiGfx::GAL* m_gal; ///< Interface for drawing objects on a 2D-surface + KiGfx::VIEW* m_view; ///< Stores view settings (scale, center, etc.) + ///< and items to be drawn + KiGfx::PAINTER* m_painter; ///< Contains information about how to draw items + ///< using GAL + KiGfx::WX_VIEW_CONTROLS* m_viewControls; ///< Control for VIEW (moving, zooming, etc.) + + VECTOR2D m_screenSize; ///< Stores current screen size + wxWindow* m_parentFrame; ///< Pointer to the parent frame + + std::string m_galShaderPath; ///< Path to shader files, used in OpenGL mode +}; + +#endif diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h new file mode 100644 index 0000000000..002622296d --- /dev/null +++ b/include/gal/cairo/cairo_gal.h @@ -0,0 +1,411 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * + * CairoGal - Graphics Abstraction Layer for Cairo + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef CAIROGAL_H_ +#define CAIROGAL_H_ + +#include +#include + +#include + +#include + + +#if defined(__WXMSW__) +#define SCREEN_DEPTH 24 +#else +#if wxCHECK_VERSION( 2, 9, 0 ) +#define SCREEN_DEPTH wxBITMAP_SCREEN_DEPTH +#else +#define SCREEN_DEPTH 32 +#endif +#endif + +#define EXCEPTION_ZERO_CLIENT_RECTANGLE 0 +#define EXCEPTION_ZERO_CONTEXT 1 + +/** + * @brief Class CAIRO_GAL is the cairo implementation of the graphics abstraction layer. + * + * Quote from Wikipedia: + * " Cairo is a software library used to provide a vector graphics-based, device-independent + * API for software developers. It is designed to provide primitives for 2-dimensional + * drawing across a number of different backends. " + *
+ * Cairo offers also backends for Postscript and PDF surfaces. So it can be used for printing + * of KiCad graphics surfaces as well. + * + */ +namespace KiGfx +{ +class CAIRO_GAL : public GAL, public wxWindow +{ +public: + /** + * Constructor CAIRO_GAL + * + * @param aParent is the wxWidgets immediate wxWindow parent of this object. + * + * @param aMouseListener is the wxEvtHandler that should receive the mouse events, + * this can be can be any wxWindow, but is often a wxFrame container. + * + * @param aPaintListener is the wxEvtHandler that should receive the paint + * event. This can be any wxWindow, but is often a derived instance + * of this class or a containing wxFrame. The "paint event" here is + * a wxCommandEvent holding EVT_GAL_REDRAW, as sent by PostPaint(). + * + * @param aName is the name of this window for use by wxWindow::FindWindowByName() + */ + CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener = NULL, + wxEvtHandler* aPaintListener = NULL, const wxString& aName = wxT("CairoCanvas") ); + + virtual ~CAIRO_GAL(); + + // --------------- + // Drawing methods + // --------------- + + /// @copydoc GAL::BeginDrawing() + virtual void BeginDrawing() throw (int); + + /// @copydoc GAL::EndDrawing() + virtual void EndDrawing(); + + /// @copydoc GAL::DrawLine() + virtual void DrawLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ); + + /// @copydoc GAL::DrawPolyline() + virtual void DrawPolyline( std::deque& aPointList ); + + /// @copydoc GAL::DrawCircle() + virtual void DrawCircle( VECTOR2D aCenterPoint, double aRadius ); + + /// @copydoc GAL::DrawArc() + virtual void + DrawArc( VECTOR2D aCenterPoint, double aRadius, double aStartAngle, double aEndAngle ); + + /// @copydoc GAL::DrawRectangle() + virtual void DrawRectangle( VECTOR2D aStartPoint, VECTOR2D aEndPoint ); + + /// @copydoc GAL::DrawPolygon() + virtual void DrawPolygon( const std::deque& aPointList ); + + /// @copydoc GAL::DrawCurve() + virtual void DrawCurve( VECTOR2D startPoint, VECTOR2D controlPointA, VECTOR2D controlPointB, + VECTOR2D endPoint ); + + // -------------- + // Screen methods + // -------------- + + /// @brief Resizes the canvas. + virtual void ResizeScreen ( int aWidth, int aHeight ); + + /// @brief Shows/hides the GAL canvas + virtual bool Show( bool aShow ); + + /// @copydoc GAL::Flush() + virtual void Flush(); + + /// @copydoc GAL::ClearScreen() + virtual void ClearScreen(); + + // ----------------- + // Attribute setting + // ----------------- + + /// @copydoc GAL::SetIsFill() + virtual void SetIsFill( bool aIsFillEnabled ); + + /// @copydoc GAL::SetIsStroke() + virtual void SetIsStroke( bool aIsStrokeEnabled ); + + /// @copydoc GAL::SetFillColor() + virtual void SetFillColor( COLOR4D aColor ); + + /// @copydoc GAL::SetStrokeColor() + virtual void SetStrokeColor( COLOR4D aColor ); + + /// @copydoc GAL::GetStrokeColor() + COLOR4D GetStrokeColor(); + + /// @copydoc GAL::SetBackgroundColor() + virtual void SetBackgroundColor( COLOR4D aColor ); + + /// @copydoc GAL::SetLineCap() + virtual void SetLineCap( LineCap aLineCap ); + + /// @copydoc GAL::SetLineJoin() + virtual void SetLineJoin( LineJoin aLineJoin ); + + /// @copydoc GAL::SetLineWidth() + virtual void SetLineWidth( double aLineWidth ); + + /// @copydoc GAL::GetLineWidth() + double GetLineWidth(); + + /// @copydoc GAL::SetLayerDepth() + virtual void SetLayerDepth( double aLayerDepth ) + { + super::SetLayerDepth( aLayerDepth ); + } + + // -------------- + // Transformation + // -------------- + + /// @copydoc GAL::Transform() + virtual void Transform( MATRIX3x3D aTransformation ); + + /// @copydoc GAL::Rotate() + virtual void Rotate( double aAngle ); + + /// @copydoc GAL::Translate() + virtual void Translate( VECTOR2D aTranslation ); + + /// @copydoc GAL::Scale() + virtual void Scale( VECTOR2D aScale ); + + /// @copydoc GAL::Save() + virtual void Save(); + + /// @copydoc GAL::Restore() + virtual void Restore(); + + // -------------------------------------------- + // Group methods + // --------------------------------------------- + + /// @copydoc GAL::BeginGroup() + virtual int BeginGroup(); + + /// @copydoc GAL::EndGroup() + virtual void EndGroup(); + + /// @copydoc GAL::DrawGroup() + virtual void DrawGroup( int aGroupNumber ); + + /// @copydoc GAL::DeleteGroup() + virtual void DeleteGroup( int aGroupNumber ); + + // -------------------------------------------------------- + // Handling the world <-> screen transformation + // -------------------------------------------------------- + + /// @copydoc GAL::ComputeWorldScreenMatrix() + virtual void ComputeWorldScreenMatrix(); + + /// @copydoc GAL::GetWorldScreenMatrix() + MATRIX3x3D GetWorldScreenMatrix(); + + /// @copydoc GAL::SetWorldScreenMatrix() + void SetWorldScreenMatrix( MATRIX3x3D aMatrix ); + + /// @copydoc GAL::SetWorldUnitLength() + void SetWorldUnitLength( double aWorldUnitLength ); + + /// @copydoc GAL::SetScreenDPI() + void SetScreenDPI( double aScreenDPI ); + + /// @copydoc GAL::SetLookAtPoint() + void SetLookAtPoint( VECTOR2D aPoint ); + + /// @copydoc GAL::GetLookAtPoint() + VECTOR2D GetLookAtPoint(); + + /// @copydoc GAL::SetZoomFactor() + void SetZoomFactor( double aZoomFactor ); + + /// @copydoc GAL::GetZoomFactor() + double GetZoomFactor(); + + /// @copydoc GAL::SaveScreen() + virtual void SaveScreen(); + + /// @copydoc GAL::RestoreScreen() + virtual void RestoreScreen(); + + // ------- + // Cursor + // ------- + + /// @copydoc GAL::ComputeCursorToWorld() + virtual VECTOR2D ComputeCursorToWorld( VECTOR2D aCursorPosition ); + + /// @copydoc GAL::SetIsCursorEnabled() + void SetIsCursorEnabled( bool aIsCursorEnabled ); + + /// @copydoc GAL::DrawCursor() + virtual void DrawCursor( VECTOR2D aCursorPosition ); + + /** + * Function PostPaint + * posts an event to m_paint_listener. A post is used so that the actual drawing + * function can use a device context type that is not specific to the wxEVT_PAINT event. + */ + void PostPaint() + { + if( paintListener ) + { + wxCommandEvent redrawEvent( EVT_GAL_REDRAW ); + wxPostEvent( paintListener, redrawEvent ); + } + } + + void SetMouseListener( wxEvtHandler* aMouseListener ) + { + mouseListener = aMouseListener; + } + + void SetPaintListener( wxEvtHandler* aPaintListener ) + { + paintListener = aPaintListener; + } + +protected: + virtual void DrawGridLine(VECTOR2D aStartPoint, VECTOR2D aEndPoint); + +private: + /// Super class definition + typedef GAL super; + + // Variables related to wxWidgets + wxWindow* parentWindow; ///< Parent window + wxEvtHandler* mouseListener; ///< Mouse listener + wxEvtHandler* paintListener; ///< Paint listener + wxRect clientRectangle; ///< Area definition of the surface + unsigned int bufferSize; ///< Size of buffers cairoOutput, bitmapBuffers + unsigned char* wxOutput; ///< wxImage comaptible buffer + + // Cursor variables + std::deque savedCursorPixels; ///< Saved pixels of the cursor + bool isDeleteSavedPixels; ///< True, if the saved pixels can be discarded + wxPoint savedCursorPosition; ///< The last cursor position + wxBitmap* cursorPixels; ///< Cursor pixels + wxBitmap* cursorPixelsSaved; ///< Saved cursor pixels + int cursorSize; ///< Cursor size + + // Variables for the grouping function + int actualGroupIndex; ///< The index of the actual group + bool isGrouping; ///< Is grouping enabled ? + bool isElementAdded; ///< Was an graphic element added ? + std::deque pathList; ///< List of stored paths + + /// Maximum number of arguments for one command + static const int MAX_CAIRO_ARGUMENTS = 6; + + /// Definitions for the command recorder + enum GraphicsCommand + { + CMD_SET_FILL, ///< Enable/disable filling + CMD_SET_STROKE, ///< Enable/disable stroking + CMD_SET_FILLCOLOR, ///< Set the fill color + CMD_SET_STROKECOLOR, ///< Set the stroke color + CMD_SET_LINE_WIDTH, ///< Set the line width + CMD_SET_LINE_CAP, ///< Set the line cap style + CMD_SET_LINE_JOIN, ///< Set the line join style + CMD_STROKE_PATH, ///< Set the stroke path + CMD_FILL_PATH, ///< Set the fill path + CMD_TRANSFORM, ///< Transform the actual context + CMD_ROTATE, ///< Rotate the context + CMD_TRANSLATE, ///< Translate the context + CMD_SCALE, ///< Scale the context + CMD_SAVE, ///< Save the transformation matrix + CMD_RESTORE, ///< Restore the transformation matrix + CMD_CALL_GROUP ///< Call a group + }; + + /// Type definition for an graphics group element + typedef struct + { + GraphicsCommand command; ///< Command to execute + double arguments[MAX_CAIRO_ARGUMENTS]; ///< Arguments for Cairo commands + bool boolArgument; ///< A bool argument + int intArgument; ///< An int argument + cairo_path_t* cairoPath; ///< Pointer to a Cairo path + } GroupElement; + + typedef std::deque Group; ///< A graphic group type definition + std::deque groups; ///< List of graphic groups + + // Variables related to Cairo <-> wxWidgets + cairo_matrix_t cairoWorldScreenMatrix; ///< Cairo world to screen transformation matrix + cairo_t* cairoImage; ///< Cairo image + cairo_surface_t* cairoSurface; ///< Cairo surface + unsigned int* bitmapBuffer; ///< Storage of the cairo image + unsigned int* bitmapBufferBackup; ///< Backup storage of the cairo image + wxBitmap* wxBitmap_; ///< Pointer to the wxWidgets bitmap + int stride; ///< Stride value for Cairo + // wxClientDC* clientDC; ///< Pointer to the clientDC + int screenSizeY; ///< Vertical size of the actual surface + + // Mapping between Cairo and GAL line attributes + std::map lineCapMap; ///< Line cap style mapping + std::map lineJoinMap; ///< Line join style mapping + + // Methods + void storePath(); ///< Store the actual path + + // Event handlers + /** + * @brief Paint event handler. + * + * @param aEvent is the paint event. + */ + void onPaint( wxPaintEvent& aEvent ); + void onEraseBackground( wxEraseEvent& aEvent ); + + /** + * @brief Window resizing event handler. + * + * @param aEvent is the resizing event. + */ + void onSize( wxSizeEvent& aEvent ); + + /** + * @brief Mouse event handler, forwards the event to the child. + * + * @param aEvent is the mouse event to be forwarded. + */ + void skipMouseEvent( wxMouseEvent& aEvent ); + + /** + * @brief Initialize the cursor. + * + * @param aCursorSize is the size of the cursor. + */ + void initCursor( int aCursorSize ); + + /// Allocate the bitmaps for drawing + void allocateBitmaps(); + + /// Allocate the bitmaps for drawing + void deleteBitmaps(); +}; +} // namespace KiGfx + +#endif // CAIROGAL_H_ diff --git a/include/gal/definitions.h b/include/gal/definitions.h new file mode 100644 index 0000000000..b6a66c584c --- /dev/null +++ b/include/gal/definitions.h @@ -0,0 +1,34 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * + * Macro definitions + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef DEFINITIONS_H_ +#define DEFINITIONS_H_ + +/// Swap the variables if a condition is met. +#define SWAP( varA, condition, varB ) if( varA condition varB ) { double tmp = varA; varA = varB; \ + varB = tmp; } + +#endif /* DEFINITIONS_H_ */ diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h new file mode 100644 index 0000000000..85f686d165 --- /dev/null +++ b/include/gal/graphics_abstraction_layer.h @@ -0,0 +1,694 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * + * Graphics Abstraction Layer (GAL) - base class + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef GRAPHICSABSTRACTIONLAYER_H_ +#define GRAPHICSABSTRACTIONLAYER_H_ + +#include +#include + +#include + +#include +#include + + +namespace KiGfx +{ +// Event declaration +extern const wxEventType EVT_GAL_REDRAW; + +/** + * LineCap: Type definition of the line end point style + */ +enum LineCap +{ + LINE_CAP_BUTT, ///< Stop line at the end point + LINE_CAP_ROUND, ///< Draw a circle at the end point + LINE_CAP_SQUARED ///< Draw a square at the end point +}; + +/** + * LineJoin: Type definition of the line joint style + */ +enum LineJoin +{ + LINE_JOIN_MITER, ///< Use sharp corners + LINE_JOIN_ROUND, ///< Insert a circle at the joints + LINE_JOIN_BEVEL ///< Diagonal corner +}; + +/** + * GridStyle: Type definition of the grid style + */ +enum GridStyle +{ + GRID_STYLE_LINES, ///< Use lines for the grid + GRID_STYLE_DOTS ///< Use dots for the grid +}; + +/** + * @brief Class GAL is the abstract interface for drawing on a 2D-surface. + * + * The functions are optimized for drawing shapes of an EDA-program such as KiCad. Most methods + * are abstract and need to be implemented by a lower layer, for example by a cairo or OpenGL implementation. + *
+ * Almost all methods use world coordinates as arguments. The board design is defined in world space units; + * for drawing purposes these are transformed to screen units with this layer. So zooming is handled here as well. + * + */ +class GAL +{ +public: + // Constructor / Destructor + GAL(); + virtual ~GAL(); + + // --------------- + // Drawing methods + // --------------- + + /// @brief Begin the drawing, needs to be called for every new frame. + virtual void BeginDrawing() = 0; + + /// @brief End the drawing, needs to be called for every new frame. + virtual void EndDrawing() = 0; + + /** + * @brief Draw a line. + * + * Start and end points are defined as 2D-Vectors. + * + * @param aStartPoint is the start point of the line. + * @param aEndPoint is the end point of the line. + */ + virtual void DrawLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) = 0; + + /** + * @brief Draw a polyline + * + * @param aPointList is a list of 2D-Vectors containing the polyline points. + */ + virtual void DrawPolyline( std::deque& aPointList ) = 0; + + /** + * @brief Draw a circle using world coordinates. + * + * @param aCenterPoint is the center point of the circle. + * @param aRadius is the radius of the circle. + */ + virtual void DrawCircle( VECTOR2D aCenterPoint, double aRadius ) = 0; + + /** + * @brief Draw an arc. + * + * @param aCenterPoint is the center point of the arc. + * @param aRadius is the arc radius. + * @param aStartAngle is the start angle of the arc. + * @param aEndAngle is the end angle of the arc. + */ + virtual void + DrawArc( VECTOR2D aCenterPoint, double aRadius, double aStartAngle, double aEndAngle ) = 0; + + /** + * @brief Draw a rectangle. + * + * @param aStartPoint is the start point of the rectangle. + * @param aEndPoint is the end point of the rectangle. + */ + virtual void DrawRectangle( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) = 0; + + /** + * @brief Draw a polygon. + * + * @param aPointList is the list of the polygon points. + */ + virtual void DrawPolygon( const std::deque& aPointList ) = 0; + + /** + * @brief Draw a cubic bezier spline. + * + * @param startPoint is the start point of the spline. + * @param controlPointA is the first control point. + * @param controlPointB is the second control point. + * @param endPoint is the end point of the spline. + */ + virtual void DrawCurve( VECTOR2D startPoint, VECTOR2D controlPointA, + VECTOR2D controlPointB, VECTOR2D endPoint ) = 0; + + // -------------- + // Screen methods + // -------------- + + /// @brief Resizes the canvas. + virtual void ResizeScreen( int aWidth, int aHeight ) = 0; + + /// @brief Shows/hides the GAL canvas + virtual bool Show( bool aShow ) = 0; + + /// @brief Returns GAL canvas size in pixels + VECTOR2D GetScreenPixelSize() const + { + return screenSize; + } + + /// @brief Force all remaining objects to be drawn. + virtual void Flush() = 0; + + /// @brief Clear the screen. + virtual void ClearScreen() = 0; + + // ----------------- + // Attribute setting + // ----------------- + + /** + * @brief Enable/disable fill. + * + * @param aIsFillEnabled is true, when the graphics objects should be filled, else false. + */ + inline virtual void SetIsFill( bool aIsFillEnabled ) + { + isFillEnabled = aIsFillEnabled; + } + + /** + * @brief Enable/disable stroked outlines. + * + * @param aIsStrokeEnabled is true, if the outline of an object should be stroked. + */ + inline virtual void SetIsStroke( bool aIsStrokeEnabled ) + { + isStrokeEnabled = aIsStrokeEnabled; + } + + /** + * @brief Set the fill color. + * + * @param aColor is the color for filling. + */ + inline virtual void SetFillColor( COLOR4D aColor ) + { + fillColor = aColor; + } + + /** + * @brief Set the stroke color. + * + * @param aColor is the color for stroking the outline. + */ + inline virtual void SetStrokeColor( COLOR4D aColor ) + { + strokeColor = aColor; + } + + /** + * @brief Get the stroke color. + * + * @return the color for stroking the outline. + */ + inline COLOR4D GetStrokeColor() + { + return strokeColor; + } + + /** + * @brief Set the background color. + * + * @param aColor is the color for background filling. + */ + virtual void SetBackgroundColor( COLOR4D aColor ) = 0; + + /** + * @brief Set the style of the line caps. + * + * @param aLineCap is the line cap style. + */ + inline virtual void SetLineCap( LineCap aLineCap ) + { + lineCap = aLineCap; + } + + /** + * @brief Set the line join style. + * + * @param aLineJoin is the line join style. + */ + inline virtual void SetLineJoin( LineJoin aLineJoin ) + { + lineJoin = aLineJoin; + } + + /** + * @brief Set the line width. + * + * @param aLineWidth is the line width. + */ + inline virtual void SetLineWidth( double aLineWidth ) + { + lineWidth = aLineWidth; + } + + /** + * @brief Get the line width. + * + * @return the actual line width. + */ + inline double GetLineWidth() + { + return lineWidth; + } + + /** + * @brief Set the depth of the layer (position on the z-axis) + * + * @param aLayerDepth the layer depth for the objects. + */ + inline virtual void SetLayerDepth( double aLayerDepth ) + { + layerDepth = aLayerDepth; + } + + // -------------- + // Transformation + // -------------- + + /** + * @brief Transform the context. + * + * @param aTransformation is the ransformation matrix. + */ + virtual void Transform( MATRIX3x3D aTransformation ) = 0; + + /** + * @brief Rotate the context. + * + * @param aAngle is the rotation angle in radians. + */ + virtual void Rotate( double aAngle ) = 0; + + /** + * @brief Translate the context. + * + * @param aTranslation is the translation vector. + */ + virtual void Translate( VECTOR2D aTranslation ) = 0; + + /** + * @brief Scale the context. + * + * @param aScale is the scale factor for the x- and y-axis. + */ + virtual void Scale( VECTOR2D aScale ) = 0; + + /// @brief Save the context. + virtual void Save() = 0; + + /// @brief Restore the context. + virtual void Restore() = 0; + + // -------------------------------------------- + // Group methods + // --------------------------------------------- + + /** + * @brief Begin a group. + * + * A group is a collection of graphic items. + * Hierarchical groups are possible, attributes and transformations can be used. + * + * @return the number of the group. + */ + virtual int BeginGroup() = 0; + + /// @brief End the group. + virtual void EndGroup() = 0; + + /** + * @brief Draw the stored group. + * + * @param aGroupNumber is the group number. + */ + virtual void DrawGroup( int aGroupNumber ) = 0; + + /** + * @brief Delete the group from the memory. + * + * @param aGroupNumber is the group number. + */ + virtual void DeleteGroup( int aGroupNumber ) = 0; + + // -------------------------------------------------------- + // Handling the world <-> screen transformation + // -------------------------------------------------------- + + /// @brief Compute the world <-> screen transformation matrix + virtual void ComputeWorldScreenMatrix() = 0; + + /** + * @brief Get the world <-> screen transformation matrix. + * + * @return the transformation matrix. + */ + MATRIX3x3D GetWorldScreenMatrix() + { + return worldScreenMatrix; + } + + /** + * @brief Set the world <-> screen transformation matrix. + * + * @param aMatrix is the 3x3 world <-> screen transformation matrix. + */ + inline void SetWorldScreenMatrix( const MATRIX3x3D& aMatrix ) + { + worldScreenMatrix = aMatrix; + } + + /** + * @brief Set the unit length. + * + * This defines the length [inch] per one integer. For instance a value 0.001 means + * that the coordinate [1000, 1000] corresponds with a point at (1 inch, 1 inch) or + * 1 mil resolution per integer. + * + * @param aWorldUnitLength is the world Unit length. + */ + inline void SetWorldUnitLength( double aWorldUnitLength ) + { + worldUnitLength = aWorldUnitLength; + } + + /** + * @brief Set the dots per inch of the screen. + * + * This value depends on the user screen, it should be configurable by the application. + * For instance a typical notebook with HD+ resolution (1600x900) has 106 DPI. + * + * @param aScreenDPI are the screen DPI. + */ + inline void SetScreenDPI( double aScreenDPI ) + { + screenDPI = aScreenDPI; + } + + /** + * @brief Set the Point in world space to look at. + * + * This point corresponds with the center of the actual drawing area. + * + * @param aPoint is the look at point (center of the actual drawing area). + */ + inline void SetLookAtPoint( const VECTOR2D& aPoint ) + { + lookAtPoint = aPoint; + } + + /** + * @brief Get the look at point. + * + * @return the look at point. + */ + inline VECTOR2D GetLookAtPoint() + { + return lookAtPoint; + } + + /** + * @brief Set the zoom factor of the scene. + * + * @param aZoomFactor is the zoom factor. + */ + inline void SetZoomFactor( double aZoomFactor ) + { + zoomFactor = aZoomFactor; + } + + /** + * @brief Get the zoom factor + * + * @return the zoom factor. + */ + inline double GetZoomFactor() + { + return zoomFactor; + } + + /** + * @brief Set the range of the layer depth. + * + * Usually required for the OpenGL implementation, any object outside this range is not drawn. + * + * @param aDepthRange is the depth range where component x is the near clipping plane and y + * is the far clipping plane. + */ + inline void SetDepthRange( VECTOR2D aDepthRange ) + { + depthRange = aDepthRange; + } + + /** + * @brief Get the world scale. + * + * @return the actual world scale factor. + */ + inline double GetWorldScale() + { + return worldScale; + } + + /** + * @brief Save the screen contents. + */ + virtual void SaveScreen() = 0; + + /** + * @brief Save the screen contents. + */ + virtual void RestoreScreen() = 0; + + // ------------- + // Grid methods + // ------------- + + /** + * @brief Set the origin point for the grid. + * + * @param aGridOrigin is a vector containing the grid origin point, in world coordinates. + */ + inline void SetGridOrigin( const VECTOR2D& aGridOrigin ) + { + gridOrigin = aGridOrigin; + } + + /** + * @brief Sets the screen size of the grid origin marker + * + * @param aSize is the radius of the origin marker, in pixels. + */ + inline void SetGridOriginMarkerSize( int aSize ) + { + gridOriginMarkerSize = aSize; + } + + /** + * @brief Set the threshold for grid drawing. + * + * @param aThreshold is the minimum grid cell size (in pixels) for which the grid is drawn. + */ + inline void SetGridDrawThreshold( int aThreshold ) + { + gridDrawThreshold = aThreshold; + } + + /** + * @brief Set the grid size. + * + * @param aGridSize is a vector containing the grid size in x- and y direction. + */ + inline void SetGridSize( const VECTOR2D& aGridSize ) + { + gridSize = aGridSize; + } + + /** + * @brief Set the grid color. + * + * @param aGridColor is the grid color, it should have a low alpha value for the best effect. + */ + inline void SetGridColor( COLOR4D aGridColor ) + { + gridColor = aGridColor; + } + + /** + * @brief Draw every tick line wider. + * + * @param aInterval increase the width of every aInterval line, if 0 do not use this feature. + */ + inline void SetCoarseGrid( int aInterval ) + { + gridTick = aInterval; + } + + /** + * @brief Get the grid line width. + * + * @return the grid line width + */ + inline double GetGridLineWidth() + { + return gridLineWidth; + } + + /** + * @brief Set the grid line width. + * + * @param aGridLineWidth is the rid line width. + */ + inline void SetGridLineWidth( double aGridLineWidth ) + { + gridLineWidth = aGridLineWidth; + } + + /// @brief Draw the grid + void DrawGrid(); + + // TODO Not yet implemented + // virtual void SetGridStyle(GridStyle gridStyle); + + // ------- + // Cursor + // ------- + + /** + * @brief Compute the cursor position in world coordinates from given screen coordinates. + * + * @param aCursorPosition is the cursor position in screen coordinates. + * @return the cursor position in world coordinates. + */ + virtual VECTOR2D ComputeCursorToWorld( VECTOR2D aCursorPosition ) = 0; + + /** + * @brief Enable/Disable cursor. + * + * @param aIsCursorEnabled is true if the cursor should be enabled, else false. + */ + inline void SetIsCursorEnabled( bool aIsCursorEnabled ) + { + isCursorEnabled = aIsCursorEnabled; + } + + /** + * @brief Set the cursor color. + * + * @param aCursorColor is the color of the cursor. + */ + inline void SetCursorColor( COLOR4D aCursorColor ) + { + cursorColor = aCursorColor; + } + + /** + * @brief Draw the cursor. + * + * @param aCursorPosition is the cursor position in screen coordinates. + */ + virtual void DrawCursor( VECTOR2D aCursorPosition ) = 0; + + void AdvanceDepth() + { + layerDepth -= 0.1; // fixme: there should be a minimum step + } + + void PushDepth() + { + depthStack.push( layerDepth ); + } + + void PopDepth() + { + layerDepth = depthStack.top(); + depthStack.pop(); + } + +protected: + std::stack depthStack; ///< Stored depth values + VECTOR2D screenSize; ///< Screen size in screen coordinates + + double worldUnitLength; ///< The unit length of the world coordinates [inch] + double screenDPI; ///< The dots per inch of the screen + VECTOR2D lookAtPoint; ///< Point to be looked at in world space + + double zoomFactor; ///< The zoom factor + MATRIX3x3D worldScreenMatrix; ///< World transformation + double worldScale; ///< The scale factor world->screen + + double lineWidth; ///< The line width + LineCap lineCap; ///< Line end style + LineJoin lineJoin; ///< Style of the line joints + + bool isFillEnabled; ///< Is filling of graphic objects enabled ? + bool isStrokeEnabled; ///< Are the outlines stroked ? + bool isSetAttributes; ///< True, if the attributes have been set + + COLOR4D backgroundColor; ///< The background color + COLOR4D fillColor; ///< The fill color + COLOR4D strokeColor; ///< The color of the outlines + + double layerDepth; ///< The actual layer depth + VECTOR2D depthRange; ///< Range of the depth + + VECTOR2D gridSize; ///< The grid size + VECTOR2D gridOrigin; ///< The grid origin + COLOR4D gridColor; ///< Color of the grid + int gridTick; ///< Every tick line gets the double width + double gridLineWidth; ///< Line width of the grid + int gridDrawThreshold; ///< Minimum screen size of the grid (pixels) + ///< below which the grid is not drawn + int gridOriginMarkerSize; ///< Grid origin indicator size (pixels) + + bool isCursorEnabled; ///< Is the cursor enabled? + VECTOR2D cursorPosition; ///< The cursor position + COLOR4D cursorColor; ///< Cursor color + + /// Compute the scaling factor for the world->screen matrix + inline void ComputeWorldScale() + { + worldScale = screenDPI * worldUnitLength * zoomFactor; + } + + /** + * @brief Draw a grid line (usually a simplified line function). + * + * @param aStartPoint is the start point of the line. + * @param aEndPoint is the end point of the line. + */ + virtual void DrawGridLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) = 0; +}; +} // namespace KiGfx + +#endif /* GRAPHICSABSTRACTIONLAYER_H_ */ diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h new file mode 100644 index 0000000000..4606698e35 --- /dev/null +++ b/include/gal/opengl/opengl_gal.h @@ -0,0 +1,547 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * + * Graphics Abstraction Layer (GAL) for OpenGL + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef OPENGLGAL_H_ +#define OPENGLGAL_H_ + +// GAL imports +#include +#include + +// wxWidgets imports +#include +#include + +// STL imports +#include +#include +#include +#include + +#include +#include +#include + + +#if defined(DEBUG) +#define D(x) x +#else +#define D(x) +#endif + +namespace KiGfx +{ +class SHADER; + +/** + * @brief Class OpenGL_GAL is the OpenGL implementation of the Graphics Abstraction Layer. + * + * This is a direct OpenGL-implementation and uses low-level graphics primitives like triangles + * and quads. The purpuse is to provide a fast graphics interface, that takes advantage of modern + * graphics card GPUs. All methods here benefit thus from the hardware acceleration. + */ +class OPENGL_GAL : public GAL, public wxGLCanvas +{ +public: + + /// Current drawing mode + enum DrawMode { + DRAW_MODE_NORMAL, ///< Normal drawing mode + DRAW_MODE_PREPARE_EDGES, ///< Prepare the object edges + DRAW_MODE_DRAW_EDGES ///< Draw anti-aliased object edges + }; + + /** + * @brief Constructor OPENGL_GAL + * + * @param aParent is the wxWidgets immediate wxWindow parent of this object. + * + * @param aMouseListener is the wxEvtHandler that should receive the mouse events, + * this can be can be any wxWindow, but is often a wxFrame container. + * + * @param aPaintListener is the wxEvtHandler that should receive the paint + * event. This can be any wxWindow, but is often a derived instance + * of this class or a containing wxFrame. The "paint event" here is + * a wxCommandEvent holding EVT_GAL_REDRAW, as sent by PostPaint(). + * + * @param aName is the name of this window for use by wxWindow::FindWindowByName() + * + * @param isUseShaders is a flag, that indicates, if shaders should be used + * for higher quality rendering. + * + */ + OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener = NULL, + wxEvtHandler* aPaintListener = NULL, bool isUseShaders = false, + const wxString& aName = wxT("GLCanvas") ); + + virtual ~OPENGL_GAL(); + + // --------------- + // Drawing methods + // --------------- + + /// @copydoc GAL::BeginDrawing() + virtual void BeginDrawing(); + + /// @copydoc GAL::EndDrawing() + virtual void EndDrawing(); + + /// @copydoc GAL::DrawLine() + virtual void DrawLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ); + + /// @copydoc GAL::DrawPolyline() + virtual void DrawPolyline( std::deque& aPointList ); + + /// @copydoc GAL::DrawCircle() + virtual void DrawCircle( VECTOR2D aCenterPoint, double aRadius ); + + /// @copydoc GAL::DrawArc() + virtual void + DrawArc( VECTOR2D aCenterPoint, double aRadius, double aStartAngle, double aEndAngle ); + + /// @copydoc GAL::DrawRectangle() + virtual void DrawRectangle( VECTOR2D aStartPoint, VECTOR2D aEndPoint ); + + /// @copydoc GAL::DrawPolygon() + virtual void DrawPolygon( const std::deque& aPointList ); + + /// @copydoc GAL::DrawCurve() + virtual void DrawCurve( VECTOR2D startPoint, VECTOR2D controlPointA, VECTOR2D controlPointB, + VECTOR2D endPoint ); + + // -------------- + // Screen methods + // -------------- + +/// @brief Resizes the canvas. + virtual void ResizeScreen ( int aWidth, int aHeight ); + + /// @brief Shows/hides the GAL canvas + virtual bool Show( bool aShow ); + + /// @copydoc GAL::Flush() + virtual void Flush(); + + /// @copydoc GAL::ClearScreen() + virtual void ClearScreen(); + + // ----------------- + // Attribute setting + // ----------------- + + /// @copydoc GAL::SetIsFill() + virtual void SetIsFill( bool aIsFillEnabled ) + { + isFillEnabled = aIsFillEnabled; + } + + /// @copydoc GAL::SetIsStroke() + virtual void SetIsStroke( bool aIsStrokeEnabled ) + { + isStrokeEnabled = aIsStrokeEnabled; + } + + /// @copydoc GAL::SetFillColor() + virtual void SetFillColor( COLOR4D aColor ); + + /// @copydoc GAL::SetStrokeColor() + virtual void SetStrokeColor( COLOR4D aColor ); + + /// @copydoc GAL::GetStrokeColor() + COLOR4D GetStrokeColor(); + + /// @copydoc GAL::SetBackgroundColor() + virtual void SetBackgroundColor( COLOR4D aColor ); + + /// @copydoc GAL::SetLineCap() + virtual void SetLineCap( LineCap aLineCap ) + { + lineCap = aLineCap; + } + + /// @copydoc GAL::SetLineJoin() + virtual void SetLineJoin( LineJoin aLineJoin ) + { + lineJoin = aLineJoin; + } + + /// @copydoc GAL::SetLineWidth() + virtual void SetLineWidth( double aLineWidth ); + + /// @copydoc GAL::GetLineWidth() + double GetLineWidth(); + + /// @copydoc GAL::SetLayerDepth() + virtual void SetLayerDepth( double aLayerDepth ){ + super::SetLayerDepth( aLayerDepth ); + } + + // -------------- + // Transformation + // -------------- + + /// @copydoc GAL::Transform() + virtual void Transform( MATRIX3x3D aTransformation ); + + /// @copydoc GAL::Rotate() + virtual void Rotate( double aAngle ); + + /// @copydoc GAL::Translate() + virtual void Translate( VECTOR2D aTranslation ); + + /// @copydoc GAL::Scale() + virtual void Scale( VECTOR2D aScale ); + + /// @copydoc GAL::Save() + virtual void Save(); + + /// @copydoc GAL::Restore() + virtual void Restore(); + + // -------------------------------------------- + // Group methods + // --------------------------------------------- + + /// @copydoc GAL::BeginGroup() + virtual int BeginGroup(); + + /// @copydoc GAL::EndGroup() + virtual void EndGroup(); + + /// @copydoc GAL::DrawGroup() + virtual void DrawGroup( int aGroupNumber ); + + /// @copydoc GAL::DeleteGroup() + virtual void DeleteGroup( int aGroupNumber ); + + // -------------------------------------------------------- + // Handling the world <-> screen transformation + // -------------------------------------------------------- + + /// @copydoc GAL::ComputeWorldScreenMatrix() + virtual void ComputeWorldScreenMatrix(); + + /// @copydoc GAL::GetWorldScreenMatrix() + MATRIX3x3D GetWorldScreenMatrix(); + + /// @copydoc GAL::SetWorldScreenMatrix() + void SetWorldScreenMatrix( MATRIX3x3D aMatrix ); + + /// @copydoc GAL::SetWorldUnitLength() + void SetWorldUnitLength( double aWorldUnitLength ); + + /// @copydoc GAL::SetScreenDPI() + void SetScreenDPI( double aScreenDPI ); + + /// @copydoc GAL::SetLookAtPoint() + void SetLookAtPoint( VECTOR2D aPoint ); + + /// @copydoc GAL::GetLookAtPoint() + VECTOR2D GetLookAtPoint(); + + /// @copydoc GAL::SetZoomFactor() + void SetZoomFactor( double aZoomFactor ); + + /// @copydoc GAL::GetZoomFactor() + double GetZoomFactor(); + + /// @copydoc GAL::SaveScreen() + virtual void SaveScreen(); + + /// @copydoc GAL::RestoreScreen() + virtual void RestoreScreen(); + + // ------- + // Cursor + // ------- + + /// @copydoc GAL::ComputeCursorToWorld() + virtual VECTOR2D ComputeCursorToWorld( VECTOR2D aCursorPosition ); + + /// @copydoc GAL::SetIsCursorEnabled() + void SetIsCursorEnabled( bool aIsCursorEnabled ); + + /// @copydoc GAL::DrawCursor() + virtual void DrawCursor( VECTOR2D aCursorPosition ); + + /** + * @brief Function PostPaint + * posts an event to m_paint_listener. A post is used so that the actual drawing + * function can use a device context type that is not specific to the wxEVT_PAINT event. + */ + void PostPaint() + { + if( paintListener ) + { + wxCommandEvent redrawEvent( EVT_GAL_REDRAW ); + wxPostEvent( paintListener, redrawEvent ); + } + } + + void SetMouseListener( wxEvtHandler* aMouseListener ) + { + mouseListener = aMouseListener; + } + + void SetPaintListener( wxEvtHandler* aPaintListener ) + { + paintListener = aPaintListener; + } + + // Special methods for OpenGL only + void SetDrawMode( DrawMode aDrawMode ) + { + m_drawMode = aDrawMode; + + switch( aDrawMode ) + { + case DRAW_MODE_NORMAL: + glColorMask( true, true, true, true ); + glEnable( GL_DEPTH_TEST ); + glDepthFunc( GL_LESS ); + break; + + case DRAW_MODE_PREPARE_EDGES: + // We just manipulate the Z-buffer in this mode + glColorMask( false, false, false, false ); + glEnable( GL_DEPTH_TEST ); + glDepthFunc( GL_LESS ); + // Shift the depth of the edge points a very small value deeper + // this way we prevent that overlapping edge points are not drawn twice + // and brighter, if we have used transparency. + glTranslated( 0, 0, (depthRange.y - depthRange.x) * DEPTH_ADJUST_FACTOR ); + break; + + case DRAW_MODE_DRAW_EDGES: + glColorMask( true, true, true, true ); + glEnable( GL_DEPTH_TEST ); + glDepthFunc( GL_LESS ); + // Restore the shifted position + glTranslated( 0, 0, -(depthRange.y - depthRange.x) * DEPTH_ADJUST_FACTOR ); + break; + + default: + break; + } + } + + void SetShaderPath( const std::string& aPath ) + { + shaderPath = aPath; + } + + /** + * @brief Get the current drawing mode. + * + * @return the current drawing mode. + */ + DrawMode GetDrawMode() + { + return m_drawMode; + } + +protected: + virtual void DrawGridLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ); + +private: + /// Super class definition + typedef GAL super; + + DrawMode m_drawMode; ///< Current drawing mode + + static const int CIRCLE_POINTS = 64; ///< The number of points for circle approximation + static const int CURVE_POINTS = 32; ///< The number of points for curve approximation + static const int SHADER_NUMBER = 2; ///< Number of the used shaders + static const double MITER_LIMIT = 1.5; ///< Limit for mitered edges ( * lineWidth ) + + /// This factor is used to for correct merging of antialiased edges, + /// a very small value is required + static const double DEPTH_ADJUST_FACTOR = ( 1.0 / (1 << 23) ); + + wxClientDC* clientDC; ///< Drawing context + wxGLContext* glContext; ///< OpenGL context of wxWidgets + wxWindow* parentWindow; ///< Parent window + wxEvtHandler* mouseListener; + wxEvtHandler* paintListener; + + // Display lists + GLuint displayListsArcs; ///< Arc display list + GLuint displayListCircle; ///< Circle display list + GLuint displayListSemiCircle; ///< Semi circle display list + std::deque displayListsGroup; ///< List of display lists used for groups + + double curvePoints[12]; ///< Coefficients for curves + std::deque unitCirclePoints; ///< List of the points on a unit circle + + // Polygon tesselation + GLUtesselator* tesselator; ///< Pointer to the tesselator + + // Shader + std::deque shaderList; ///< List of the shaders + + // Cursor + int cursorSize; ///< Size of the cursor in pixels + GLubyte* cursorShape; ///< Cursor pixel storage + GLubyte* cursorSave; ///< Saved cursor pixels + bool isDeleteSavedPixels; ///< Flag for deleting saved pixels + VECTOR2D savedCursorPosition; ///< Last saved cursor position + + // Frame buffer + GLuint frameBuffer; ///< Main FBO handle + GLuint depthBuffer; ///< Depth buffer handle + GLuint texture; ///< Main texture handle + GLuint frameBufferBackup; ///< Backup FBO handle + GLuint depthBufferBackup; ///< Backup depth buffer handle + GLuint textureBackup; ///< Backup texture handle + + // Internal flags + bool isCreated; + bool isGlewInitialized; ///< Is GLEW initialized? + bool isFrameBufferInitialized; ///< Are the frame buffers initialized? + bool isShaderInitialized; ///< Was the shader initialized? + bool isShaderEnabled; ///< Are the shaders enabled? + bool isUseShader; ///< Should the shaders be used? + bool isGroupStarted; ///< Was a group started? + int currentShader; ///< ID of the shader currently in use + std::string shaderPath; + + /** + * @brief Draw a semi circle (used for line caps). + * + * @param aCenterPoint is the center point. + * @param aRadius is the radius of the semi-circle. + * @param aAngle is the angle of the semi-circle. + * @param ADepthOffset is the relative depth of the semi-circle. + * + */ + void drawSemiCircle( VECTOR2D aCenterPoint, double aRadius, double aAngle, + double aDepthOffset ); + + /// Compute the points of a unit circle. + void computeUnitCircle(); + + /// Compute the points of a unit semi circle. + void computeUnitSemiCircle(); + + /// Compute the points of a unit arc. + void computeUnitArcs(); + + // Event handling + /** + * @brief This is the window creation event handler. + * + * @param aEvent is the window creation event. + */ + void onCreate( wxWindowCreateEvent& aEvent ); + + /** + * @brief This is the OnPaint event handler. + * + * @param aEvent is the OnPaint event. + */ + void onPaint( wxPaintEvent& aEvent ); + + /** + * @brief Window resizing event handler. + * + * @param aEvent is the window resizing event. + */ + void onSize( wxSizeEvent& aEvent ); + + /** + * @brief Skip the mouse event to the parent. + * + * @param aEvent is the mouse event. + */ + void skipMouseEvent( wxMouseEvent& aEvent ); + + /// Initialize GLEW. + void initGlew(); + + /** + * @brief Initialize the cursor. + * + * @param aCursorSize is the cursor size in pixels (screen coordinates). + */ + void initCursor( int aCursorSize ); + + /** + * @brief Blit the main texture to the screen. + * + * @param aIsClearFrameBuffer if true, the frame buffer is cleared as well. + * + */ + void blitMainTexture( bool aIsClearFrameBuffer ); + + /// @brief Initialize the frame buffers for main contents and backup storage. + void initFrameBuffers(); + + /** + * @brief Generate a frame buffer for the screen contents. + * + * @param aFrameBuffer is the pointer to the frame buffer handle. + * @param aDepthBuffer is the pointer to the depth buffer handle. + * @param aTexture is the pointer to the texture handle. + */ + void generateFrameBuffer( GLuint* aFrameBuffer, GLuint* aDepthBuffer, GLuint* aTexture ); + + /** + * @brief Delete the frame buffer for the screen contents. + * + * @param aFrameBuffer is the pointer to the frame buffer handle. + * @param aDepthBuffer is the pointer to the depth buffer handle. + * @param aTexture is the pointer to the texture handle. + */ + void deleteFrameBuffer( GLuint* aFrameBuffer, GLuint* aDepthBuffer, GLuint* aTexture ); + + /** + * @brief Draw a quad for the line. + * + * @param aStartPoint is the start point of the line. + * @param aEndPoint is the end point of the line. + */ + inline void drawLineQuad( VECTOR2D aStartPoint, VECTOR2D aEndPoint ); + + /** + * @brief Draw the line cap + * + * @param aStartPoint is the start point of the line. + * @param aEndPoint is the end point of the line. + * @param aDepthOffset is the relative depth of the line cap. + */ + inline void drawLineCap( VECTOR2D aStartPoint, VECTOR2D aEndPoint, double aDepthOffset ); + + inline void selectShader( int aIndex ); + + /// @copydoc GAL::DrawRoundedSegment() + void drawRoundedSegment( VECTOR2D aStartPoint, VECTOR2D aEndPoint, double aWidth, + bool aStroke = false, bool aGlBegin = false ); + + +}; +} // namespace KiGfx + +#endif // OPENGLGAL_H_ diff --git a/include/gal/opengl/shader.h b/include/gal/opengl/shader.h new file mode 100644 index 0000000000..97852c27d4 --- /dev/null +++ b/include/gal/opengl/shader.h @@ -0,0 +1,153 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * + * Graphics Abstraction Layer (GAL) for OpenGL + * + * Shader class + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef SHADER_H_ +#define SHADER_H_ + +#include + +#include +#include + +namespace KiGfx +{ +class OPENGL_GAL; + +/// Type definition for the shader +enum ShaderType +{ + SHADER_TYPE_VERTEX = GL_VERTEX_SHADER, ///< Vertex shader + SHADER_TYPE_FRAGMENT = GL_FRAGMENT_SHADER, ///< Fragment shader + SHADER_TYPE_GEOMETRY = GL_GEOMETRY_SHADER ///< Geometry shader +}; + +/** + * @brief Class SHADER provides the access to the OpenGL shaders. + * + * The purpose of this class is advanced drawing with OpenGL. One example is using the pixel + * shader for drawing exact circles or for anti-aliasing. This class supports vertex, geometry + * and fragment shaders. + *
+ * Make sure that the hardware supports these features. This can be identified with the "GLEW" + * library. + */ +class SHADER +{ +public: + + /** + * @brief Constructor + */ + SHADER(); + + /** + * @brief Destructor + */ + virtual ~SHADER(); + + /** + * @brief Add a shader and compile the shader sources. + * + * @param aShaderSourceName is the shader source file name. + * @param aShaderType is the type of the shader. + */ + void AddSource( std::string aShaderSourceName, ShaderType aShaderType ); + + /** + * Link the shaders. + */ + void Link(); + + /** + * Use the shader. + */ + void Use(); + + /** + * @brief Deactivate the shader and use the default OpenGL program. + */ + void Deactivate(); + + /** + * @brief Configure the geometry shader - has to be done before linking! + * + * @param maxVertices is the maximum of vertices to be generated. + * @param geometryInputType is the input type [e.g. GL_LINES, GL_TRIANGLES, GL_QUADS etc.] + * @param geometryOutputType is the output type [e.g. GL_LINES, GL_TRIANGLES, GL_QUADS etc.] + */ + void ConfigureGeometryShader( GLuint maxVertices, GLuint geometryInputType, + GLuint geometryOutputType ); + + /** + * @brief Add a parameter to the parameter queue. + * + * To communicate with the shader use this function to set up the names for the uniform + * variables. These are queued in a list and can be assigned with the SetParameter(..) + * method using the queue position. + * + * @param aParameterName is the name of the parameter. + */ + void AddParameter( std::string aParameterName ); + + /** + * @brief Set a parameter of the shader. + * + * @param aParameterNumber is the number of the parameter. + * @param aValue is the value of the parameter. + */ + void SetParameter( int aParameterNumber, float aValue ); + +private: + + /** + * @brief Get the shader program information. + * + * @param aProgram is the program number. + */ + void ProgramInfo( GLuint aProgram ); + + /** + * @brief Read the shader source file + * + * @param aShaderSourceName is the shader source file name. + * @return the source as string + */ + std::string ReadSource( std::string aShaderSourceName ); + + std::deque shaderNumbers; ///< Shader number list + GLuint programNumber; ///< Shader program number + bool isProgramCreated; ///< Flag for program creation + bool isShaderLinked; ///< Is the shader linked? + GLuint maximumVertices; ///< The maximum of vertices to be generated + GLuint geomInputType; ///< Input type [e.g. GL_LINES, GL_TRIANGLES, GL_QUADS etc.] + GLuint geomOutputType; ///< Output type [e.g. GL_LINES, GL_TRIANGLES, GL_QUADS etc.] + std::deque parameterLocation; ///< Location of the parameter +}; +} // namespace KiGfx + +#endif /* SHADER_H_ */ diff --git a/include/gal/stroke_font.h b/include/gal/stroke_font.h new file mode 100644 index 0000000000..a94aace854 --- /dev/null +++ b/include/gal/stroke_font.h @@ -0,0 +1,185 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * + * Stroke font class + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef STROKE_FONT_H_ +#define STROKE_FONT_H_ + +#include +#include + +#include + +#include + +namespace KiGfx +{ +class GAL; + +typedef std::deque< std::deque > Glyph; +typedef std::deque GlyphList; + +/** + * @brief Class STROKE_FONT implements stroke font drawing. + * + * A stroke font is composed of lines. + */ +class STROKE_FONT +{ +public: + /// Constructor + STROKE_FONT( GAL* aGal ); + + /// Destructor + ~STROKE_FONT(); + + // TODO Load font from a text file + + /** + * @brief Load the new stroke font. + * + * @param aNewStrokeFont is the pointer to the font data. + * @param aNewStrokeFontSize is the size of the font data. + * @return True, if the font was successfully loaded, else false. + */ + bool LoadNewStrokeFont( const char* const aNewStrokeFont[], int aNewStrokeFontSize ); + + /** + * @brief Load attributes of a given text, in order to be used during drawing. + * + * @param aText is the text string. + */ + void LoadAttributes( const EDA_TEXT* aText ); + + /** + * @brief Draw a string. + * + * @param aText is the text to be drawn. + * @param aPosition is the text position in world coordinates. + * @param aRotationAngle is the text rotation angle. + */ + void Draw( std::string aText, VECTOR2D aPosition, double aRotationAngle ); + + /** + * @brief Set the scale factor of the font for the glyph size. + * + * @param aScaleFactor is the scale factor of the font. + */ + inline void SetScaleFactor( const double aScaleFactor ) + { + m_scaleFactor = aScaleFactor; + } + + /** + * @brief Set the glyph size. + * + * @param aGlyphSize is the glyph size. + */ + inline void SetGlyphSize( const VECTOR2D aGlyphSize ) + { + m_glyphSize = aGlyphSize; + } + + /** + * @brief Set a bold property of current font. + * + * @param aBold tells if the font should be bold or not. + */ + inline void SetBold( const bool aBold ) + { + m_bold = aBold; + } + + /** + * @brief Set an italic property of current font. + * + * @param aItalic tells if the font should be italic or not. + */ + inline void SetItalic( const bool aItalic ) + { + m_italic = aItalic; + } + + /** + * @brief Set a mirrored property of text. + * + * @param aMirrored tells if the text should be mirrored or not. + */ + inline void SetMirrored( const bool aMirrored ) + { + m_mirrored = aMirrored; + } + + /** + * @brief Set the horizontal justify for text drawing. + * + * @param aHorizontalJustify is the horizontal justify value. + */ + inline void SetHorizontalJustify( const EDA_TEXT_HJUSTIFY_T aHorizontalJustify ) + { + m_horizontalJustify = aHorizontalJustify; + } + + /** + * @brief Set the vertical justify for text drawing. + * + * @param aVerticalJustify is the vertical justify value. + */ + inline void SetVerticalJustify( const EDA_TEXT_VJUSTIFY_T aVerticalJustify ) + { + m_verticalJustify = aVerticalJustify; + } + +private: + GAL* m_gal; ///< Pointer to the GAL + + GlyphList m_glyphs; ///< Glyph list + std::deque m_glyphBoundingBoxes; ///< Bounding boxes of the glyphs + double m_scaleFactor; ///< Scale factor for the glyph + VECTOR2D m_glyphSize; ///< Size of the glyphs + EDA_TEXT_HJUSTIFY_T m_horizontalJustify; ///< Horizontal justification + EDA_TEXT_VJUSTIFY_T m_verticalJustify; ///< Vertical justification + bool m_bold, m_italic, m_mirrored; ///< Properties of text + + /** + * @brief Compute the bounding box of a given glyph. + * + * @param aGlyph is the glyph. + * @param aGlyphBoundingX is the x-component of the bounding box size. + * @return is the complete bounding box size. + */ + BOX2D computeBoundingBox( Glyph aGlyph, VECTOR2D aGlyphBoundingX ); + + /** + * @brief Compute the size of a given text. + * + * @param aText is the text string. + * @return is the text size. + */ + VECTOR2D computeTextSize( const std::string aText ); +}; +} // namespace KiGfx + +#endif /* STROKE_FONT_H_ */ diff --git a/include/id.h b/include/id.h index 4d517474af..eb9eec91b0 100644 --- a/include/id.h +++ b/include/id.h @@ -213,6 +213,7 @@ enum main_id ID_ZOOM_OUT, ID_ZOOM_PAGE, ID_ZOOM_REDRAW, + ID_SWITCH_CANVAS, /* Panning command event IDs. */ ID_PAN_UP, diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index 6b7fd7ef38..77f2e87f0c 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -143,9 +143,19 @@ enum PCB_VISIBLE MOD_VALUES_VISIBLE, ///< show modules values (when texts are visibles) MOD_REFERENCES_VISIBLE, ///< show modules references (when texts are visibles) + TRACKS_VISIBLE, + PADS_VISIBLE, + VIA_HOLES_VISIBLE, + PAD_HOLES_VISIBLE, + END_PCB_VISIBLE_LIST // sentinel }; +/// macro for obtaining layer number for specific item (eg. pad or text) +#define ITEM_GAL_LAYER(layer) (LAYER_COUNT + layer) + +/// number of *all* layers including PCB and item layers +#define TOTAL_LAYER_COUNT (LAYER_COUNT + END_PCB_VISIBLE_LIST) /** * Function IsValidLayerIndex diff --git a/include/painter.h b/include/painter.h new file mode 100644 index 0000000000..2c4412408f --- /dev/null +++ b/include/painter.h @@ -0,0 +1,216 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __CLASS_PAINTER_H +#define __CLASS_PAINTER_H + +#include +#include + +#include +#include + + +class EDA_ITEM; +class COLORS_DESIGN_SETTINGS; + +namespace KiGfx +{ +class GAL; +class STROKE_FONT; + +/** + * Class RENDER_SETTINGS + * Contains all the knowledge about how graphical objects are drawn on + * any output surface/device. This includes: + * - color/transparency settings + * - highlighting and high contrast mode control + * - drawing quality control (sketch/outline mode) + * The class acts as an interface between the PAINTER object and the GUI (i.e. Layers/Items + * widget or display options dialog). + * + * Todo: properties/introspection + */ +class RENDER_SETTINGS +{ +public: + + RENDER_SETTINGS(); + virtual ~RENDER_SETTINGS(); + + /** + * Function Update + * Precalculates extra colors for layers (eg. highlighted, darkened and any needed version + * of base colors). + */ + virtual void Update(); + + /** + * Function ImportLegacyColors + * Loads a list of color settings for layers. + * @param aSettings is a list of color settings. + */ + virtual void ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings ) = 0; + + /** + * Function SetActiveLayer + * Sets the specified layer as active - it means that it can be drawn in a specific mode + * (eg. highlighted, so it differs from other layers). + * @param aLayerId is a layer number that should be displayed in a specific mode. + */ + void SetActiveLayer( int aLayerId ) + { + m_activeLayer = aLayerId; + } + + /** + * Function SetHighlight + * Turns on/off highlighting - it may be done for the active layer or the specified net. + * @param aEnabled tells if highlighting should be enabled. + * @param aNetCode is optional and if specified, turns on higlighting only for the net with + * number given as the parameter. + */ + void SetHighlight( bool aEnabled, int aNetcode = -1 ) + { + m_highlightEnabled = aEnabled; + + if( aNetcode > 0 ) + m_highlightNetcode = aNetcode; + } + + /** + * Function SetHighContrast + * Turns on/off high contrast display mode. + * @param aEnabled determines if high contrast display mode should be enabled or not. + */ + void SetHighContrast( bool aEnabled ) + { + m_hiContrastEnabled = aEnabled; + } + +protected: + + int m_activeLayer; /// Stores active layer number + + /// Parameters for display modes + bool m_hiContrastEnabled; /// High contrast display mode on/off + COLOR4D m_hiContrastColor; /// Color used for high contrast display mode + float m_hiContrastFactor; /// Factor used for computing high contrast color + + bool m_highlightEnabled; /// Highlight display mode on/off + int m_highlightNetcode; /// Net number that is displayed in highlight + /// -1 means that there is no specific net, and whole active + /// layer is highlighted + float m_highlightFactor; /// Factor used for computing hightlight color + + COLOR4D m_selectionBorderColor; /// Color of selection box border + COLOR4D m_netLabelColor; /// Color of net labels + + float m_selectFactor; /// Specifies how color of selected items is changed + float m_layerOpacity; /// Determines opacity of all layers, so every can be seen + /// at the same time + + /// Map of colors that were usually used for display + std::map m_legacyColorMap; +}; + + +/** + * Class PAINTER + * contains all the knowledge about how to draw graphical object onto + * any particular output device. + * This knowledge is held outside the individual graphical objects so that + * alternative output devices may be used, and so that the graphical objects + * themselves to not contain drawing routines. Drawing routines in the objects + * cause problems with usages of the objects as simple container objects in + * DLL/DSOs. + * PAINTER is an abstract layer, because every module (pcbnew, eeschema, etc.) + * has to draw different kinds of objects. + */ +class PAINTER +{ +public: + + /* + * Constructor PAINTER( GAL* ) + * initializes this object for painting on any of the polymorphic + * GRAPHICS_ABSTRACTION_LAYER* derivatives. + * + * @param aGal is a pointer to a polymorphic GAL device on which + * to draw (i.e. Cairo, OpenGL, wxDC) + * No ownership is given to this PAINTER of aGal. + */ + PAINTER( GAL* aGal ); + virtual ~PAINTER(); + + /** + * Function ApplySettings + * Loads colors and display modes settings that are going to be used when drawing items. + * @param aSettings are settings to be applied. + */ + virtual void ApplySettings( RENDER_SETTINGS* aSettings ) + { + if( m_settings ) + delete m_settings; + + m_settings = aSettings; + } + + /** + * Function Draw + * Takes an instance of EDA_ITEM and passes it to a function that know how to draw the item. + * @param aItem is an item to be drawn. + * @param aLayer tells which layer is currently rendered so that draw functions + * may know what to draw (eg. for pads there are separate layers for holes, because they + * have other dimensions then the pad itself. + */ + virtual bool Draw( const EDA_ITEM* aItem, int aLayer ) = 0; + +protected: + + /** + * Function getLayerColor + * is used for obtaining color that should be used for specific layer/net + * combination using stored color settings. + * @param aLayer is the layer number that is being drawn. + * @param aNetCode is a number of the net that is being drawn. + */ + virtual const COLOR4D& getLayerColor( int aLayer, int aNetCode ) const = 0; + + /// Instance of graphic abstraction layer that gives an interface to call + /// commands used to draw (eg. DrawLine, DrawCircle, etc.) + GAL* m_gal; + + /// Instance of object that stores information about how to draw texts (including different + /// font display modes [bold/italic/mirror]). + STROKE_FONT* m_stroke_font; + + /// Colors and display modes settings that are going to be used when drawing items. + RENDER_SETTINGS* m_settings; +}; +} // namespace KiGfx + +#endif /* __CLASS_PAINTER_H */ diff --git a/include/view/view.h b/include/view/view.h new file mode 100644 index 0000000000..ef89d8ee6a --- /dev/null +++ b/include/view/view.h @@ -0,0 +1,361 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __VIEW_H +#define __VIEW_H + +#include +#include + +#include + +namespace KiGfx +{ +class PAINTER; +class GAL; +class VIEW_ITEM; +class VIEW_RTREE; + +/** + * Class VIEW. + * Holds a (potentially large) number of VIEW_ITEMs and renders them on a graphics device + * provided by the GAL. VIEWs can exist in two flavors: + * - dynamic - where items can be added, removed or changed anytime, intended for the main + * editing panel. Each VIEW_ITEM can be added to a single dynamic view. + * - static - where items are added once at the startup and are not linked with the VIEW. + * Foreseen for preview windows and printing. + * Items in a view are grouped in layers (not to be confused with Kicad's PCB layers). Each layer is + * identified by an integer number. Visibility and rendering order can be set individually for each + * of the layers. Future versions of the VIEW will also allow to assign different layers to different + * rendering targets, which will be composited at the final stage by the GAL. + * The VIEW class also provides fast methods for finding all visible objects that are within a given + * rectangular area, useful for object selection/hit testing. + */ +class VIEW +{ +public: + friend class VIEW_ITEM; + + typedef std::pair LayerItemPair; + + /** + * Constructor. + * @param aIsDynamic: decides whether we are creating a static or a dynamic VIEW. + * @param aUseGroups: fixme + */ + VIEW( bool aIsDynamic = true, bool aUseGroups = false ); + + ~VIEW(); + + /** + * Function Add() + * Adds a VIEW_ITEM to the view. + * @param aItem: item to be added. No ownership is given + */ + void Add( VIEW_ITEM* aItem ); + + /** + * Function Remove() + * Removes a VIEW_ITEM from the view. + * @param aItem: item to be removed. Caller must dispose the removed item if necessary + */ + void Remove( VIEW_ITEM* aItem ); + + /** Function Query() + * Finds all visible items that touch or are within the rectangle aRect. + * @param aRect area to search for items + * @param aResult result of the search, containing VIEW_ITEMs associated with their layers. + * Sorted according to the rendering order (items that are on top of the rendering stack as first). + * @return Number of found items. + */ + int Query( const BOX2I& aRect, std::vector& aResult ); + + /** + * Function CopySettings() + * Copies layers and visibility settings from another view. + * @param aOtherView: view from which settings will be copied. + */ + void CopySettings( const VIEW* aOtherView ); + + /* + * Convenience wrappers for adding multiple items + * template void AddItems( const T& aItems ); + * template void RemoveItems( const T& aItems ); + */ + + /** + * Function SetGAL() + * Assigns a rendering device for the VIEW. + * @param aGal: pointer to the GAL output device + */ + void SetGAL( GAL* aGal ); + + /** + * Function GetGAL() + * Returns the GAL this view is using to draw graphical primitives. + * @return Pointer to the currently used GAL instance. + */ + GAL* GetGAL() const { return m_gal; } + + /** + * Function SetPainter() + * Sets the painter object used by the view for drawing VIEW_ITEMS. + */ + void SetPainter( PAINTER* aPainter ); + + /** + * Function GetPainter() + * Returns the painter object used by the view for drawing VIEW_ITEMS. + * @return Pointer to the currently used Painter instance. + */ + PAINTER* GetPainter() const { return m_painter; }; + + /** + * Function SetViewport() + * Sets the visible area of the VIEW. + * @param aViewport: desired visible area, in world space coordinates. + * @param aKeepProportions: when true, the X/Y size proportions are kept. + */ + void SetViewport( const BOX2D& aViewport, bool aKeepProportions = true ); + + /** + * Function GetViewport() + * Returns the current viewport visible area rectangle. + * @return Current viewport rectangle + */ + BOX2D GetViewport() const; + + /** + * Function SetMirror() + * Controls the mirroring of the VIEW. + * @param aMirrorX: when true, the X axis is mirrored + * @param aMirrorY: when true, the Y axis is mirrored. + */ + void SetMirror( bool aMirrorX, bool aMirrorY ); + + /** + * Function SetScale() + * Sets the scaling factor. Scale = 1 corresponds to the real world size of the objects + * (depending on correct GAL unit length & DPI settings). + * @param aScale: the scalefactor + */ + void SetScale( double aScale ); + + /** + * Function SetScale() + * Sets the scaling factor, zooming around a given anchor point. + * (depending on correct GAL unit length & DPI settings). + * @param aScale: the scale factor + */ + void SetScale( double aScale, const VECTOR2D& aAnchor ); + + /** + * Function GetScale() + * @return Current scalefactor of this VIEW + */ + double GetScale() const { return m_scale; } + + /** + * Function SetCenter() + * Sets the center point of the VIEW (i.e. the point in world space that will be drawn in the middle + * of the screen). + * @param aCenter: the new center point, in world space coordinates. + */ + void SetCenter( const VECTOR2D& aCenter ); + + /** + * Function GetCenter() + * Returns the center point of this VIEW (in world space coordinates) + * @return center point of the view + */ + const VECTOR2D& GetCenter() const { return m_center; } + + /** + * Function ToWorld() + * Converts a screen space point/vector to a point/vector in world space coordinates. + * @param aCoord: the point/vector to be converted + * @param aAbsolute: when true, aCoord is treated as a point, otherwise - as a direction (vector) + */ + VECTOR2D ToWorld( const VECTOR2D& aCoord, bool aAbsolute = true ) const; + + /** + * Function ToScreen() + * Converts a world space point/vector to a point/vector in screen space coordinates. + * @param aCoord: the point/vector to be converted + * @param aAbsolute: when true, aCoord is treated as a point, otherwise - as a direction (vector) + */ + VECTOR2D ToScreen( const VECTOR2D& aCoord, bool aAbsolute = true ) const; + + /** + * Function ToScreen() + * Converts a world space coordinate to a coordinate in screen space coordinates. + * @param aCoord: the coordinate to be transformed. + * @param aAbsolute: when true, aCoord is treated as a point, otherwise - as a direction (vector) + */ + double ToScreen( double aCoord, bool aAbsolute = true ) const; + + + /** + * Function GetScreenPixelSize() + * Returns the size of the our rendering area, in pixels. + * @return viewport screen size + */ + VECTOR2D GetScreenPixelSize() const; + + /** + * Function AddLayer() + * Adds a new layer to the view. + * @param aLayer: unique ID of the layer to be added. + * @param aDisplayOnly: layer is display-only (example: selection boxes, floating hints/menus). + * Objects belonging to this layer are not taken into account by Query() method. + */ + void AddLayer( int aLayer, bool aDisplayOnly = false ); + + + /** + * Function ClearLayer() + * Removes all items from a given layer. + * @param aLayer: ID of the layer to be cleared + */ + void ClearLayer( int aLayer ); + + /** + * Function Clear() + * Removes all items from the view. + */ + void Clear(); + + /** + * Function SetLayerVisible() + * Controls the visibility of a particular layer. + * @param aLayer: the layer to show/hide. When ALL_LAYERS constant is given, all layers' + * visibility is updated + * @param aVisible: the obivous + */ + void SetLayerVisible( int aLayer, bool aVisible = true ); + + /** + * Function SetLayerOrder() + * Sets rendering order of a particular layer. + * @param aLayer: the layer + * @param aRenderingOrder: arbitrary number denoting the rendering order. + * Lower values are rendered first. + */ + void SetLayerOrder( int aLayer, int aRenderingOrder ); + + /** + * Function Redraw() + * Immediately redraws the whole view. + */ + void Redraw(); + + /** + * Function PartialRedraw() + * Redraws only the parts of the view that have been affected by items + * for which ViewUpdate() function has been called since last redraw. + */ + void PartialRedraw(); + + /** + * Function IsDynamic() + * Tells if the VIEW is dynamic (ie. can be changed, for example displaying PCBs in a window) + * or static (that cannot be modified, eg. displaying image/PDF). + */ + bool IsDynamic() const { return m_dynamic; } + + static const unsigned int VIEW_MAX_LAYERS; ///* maximum number of layers that may be shown + +private: + + struct VIEW_LAYER + { + bool enabled; ///* is the layer to be rendered? + bool isDirty; ///* does it contain any dirty items (updated since last redraw) + bool displayOnly; ///* is the layer display only? + VIEW_RTREE* items; ///* R-tree indexing all items on this layer. + std::vector dirtyItems; ///* set of dirty items collected since last redraw + int renderingOrder; ///* rendering order of this layer + int id; ///* layer ID + BOX2I extents; ///* sum of bboxes of all items on the layer + BOX2I dirtyExtents; ///* sum of bboxes of all dirty items on the layer + }; + + // Convenience typedefs + typedef boost::unordered_map LayerMap; + typedef LayerMap::iterator LayerMapIter; + typedef std::vector LayerOrder; + typedef std::vector::iterator LayerOrderIter; + + // Function objects that need to access VIEW/VIEW_ITEM private/protected members + struct clearItemCache; + struct unlinkItem; + struct drawItem; + + ///* Redraws contents within rect aRect + void redrawRect( const BOX2I& aRect ); + + ///* Manages dirty flags & redraw queueing when updating an item. Called internally + /// via VIEW_ITEM::ViewUpdate() + void invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ); + + ///* Sorts m_orderedLayers when layer rendering order has changed + void sortLayers(); + + ///* Clears cached GAL display lists + void clearGroupCache(); + + /// Determines rendering order of layers. Used in display order sorting function. + static bool compareRenderingOrder( VIEW_LAYER* i, VIEW_LAYER* j ) + { + return i->renderingOrder > j->renderingOrder; + }; + + /// Contains set of possible displayed layers and its properties + LayerMap m_layers; + + /// Sorted list of pointers to members of m_layers. + LayerOrder m_orderedLayers; + + /// Center point of the VIEW (the point at which we are looking at) + VECTOR2D m_center; + + /// Scale of displayed VIEW_ITEMs + double m_scale; + + /// PAINTER contains information how do draw items + PAINTER* m_painter; + + /// Gives interface to PAINTER, that is used to draw items + GAL* m_gal; + + /// Dynamic VIEW (eg. display PCB in window) allows changes once it is built, + /// static (eg. image/PDF) - does not. + bool m_dynamic; + + /// Determines whether to use cached groups of objects for displaying. + bool m_useGroups; +}; +} // namespace KiGfx + +#endif diff --git a/include/view/view_controls.h b/include/view/view_controls.h new file mode 100644 index 0000000000..695530d73e --- /dev/null +++ b/include/view/view_controls.h @@ -0,0 +1,117 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +/** + * @file view_controls.h + * @brief VIEW_CONTROLS class definition. + */ + +#ifndef __VIEW_CONTROLS_H +#define __VIEW_CONTROLS_H + +#include + +namespace KiGfx +{ +class VIEW; + +/** + * Class VIEW_CONTROLS + * is an interface for classes handling user events controlling the view behaviour + * (such as zooming, panning, mouse grab, etc.) + */ +class VIEW_CONTROLS +{ +public: + /** + * Possible modes for panning (JUMP means that view is updated less often, resulting in + * not so responsive user interface). + */ + enum PanMode { + SMOOTH = 1, + JUMP = 2 + }; + + VIEW_CONTROLS( VIEW* aView ) : m_view( aView ) {}; + virtual ~VIEW_CONTROLS() {}; + + /** + * Function Activate + * Determines if all view related events (mouse wheel, right click panning, etc.), should be + * handled or not. If not - they can be processed by the legacy view. + * @param aEnabled tells if events should be handled. + */ + virtual void Activate( bool aEnabled ) {}; + + /** + * Function SetGrabMouse + * Turns on/off mouse grabbing. When the mouse is grabbed, it cannot go outside the VIEW. + * @param aEnabled tells if mouse should be grabbed or not. + */ + virtual void SetGrabMouse( bool aEnabled ) {}; + + /** + * Function SetGrabMouse + * Turns on/off auto panning (this feature is used when there is a tool active (eg. drawing a + * track) and user moves mouse to the VIEW edge - then the view can be translated or not). + * @param aEnabled tells if the autopanning should be active. + */ + virtual void SetAutoPan( bool aEnabled ) {} + + /** + * Function SetPanSpeed + * Sets speed of panning. + * @param aSpeed is a new speed for panning. + */ + virtual void SetPanSpeed( float aSpeed ) {}; + + /** + * Function SetPanMode + * Enables specified mode for panning. + * @param aMode is a new mode used for VIEW panning. + */ + virtual void SetPanMode( PanMode aMode ) {}; + + /** + * Function SetZoomSpeed + * Determines how much zoom factor should be affected on one zoom event (eg. mouse wheel). + * @param aSpeed is a new zooming speed. + */ + virtual void SetZoomSpeed( float aSpeed ) {}; + + /** + * Function AnimatedZoom + * // TODO + */ + virtual void AnimatedZoom( const BOX2I& aExtents ) {}; + +protected: + /// Pointer to controlled VIEW. + VIEW* m_view; +}; +} // namespace KiGfx + +#endif diff --git a/include/view/view_item.h b/include/view/view_item.h new file mode 100644 index 0000000000..36643c0a92 --- /dev/null +++ b/include/view/view_item.h @@ -0,0 +1,180 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file view_item.h + * @brief VIEW_ITEM class definition. + */ + +#ifndef __VIEW_ITEM_H +#define __VIEW_ITEM_H + +#include + +namespace KiGfx +{ +// Forward declarations +class GAL; +class PAINTER; +class VIEW; + +/** + * Class VIEW_ITEM - + * is an abstract base class for deriving all objects that can be added to a VIEW. + * It's role is to: + * - communicte geometry, appearance and visibility updates to the associated dynamic VIEW, + * - provide a bounding box for redraw area calculation, + * - (optional) draw the object using the GAL API functions for PAINTER-less implementations. + * VIEW_ITEM objects are never owned by a VIEW. A single VIEW_ITEM can belong to any number of + * static VIEWs, but only one dynamic VIEW due to storage of only one VIEW reference. + */ +class VIEW_ITEM +{ +public: + + /** + * Enum ViewUpdateFlags. + * Defines the how severely the shape/appearance of the item has been changed: + * - APPEARANCE: shape or layer set of the item have not been affected, + * only colors or visibility. + * - GEOMETRY: shape or layer set of the item have changed, VIEW may need to reindex it. + * - ALL: all flags above */ + + enum ViewUpdateFlags { + APPEARANCE = 0x1, + GEOMETRY = 0x2, + ALL = 0xff + }; + + VIEW_ITEM() : m_view( NULL ), m_viewVisible( true ), m_cachedGroup( -1 ) {} + + /** + * Destructor. For dynamic views, removes the item from the view. + */ + virtual ~VIEW_ITEM() + { + ViewRelease(); + }; + + /** + * Function ViewBBox() + * returns the bounding box of the item covering all its layers. + * @return BOX2I - the current bounding box + */ + virtual const BOX2I ViewBBox() const = 0; + + /** + * Function ViewDraw() + * Draws the parts of the object belonging to layer aLayer. + * viewDraw() is an alternative way for drawing objects if + * if there is no PAINTER assigned for the view or if the PAINTER + * doesn't know how to paint this particular implementation of + * VIEW_ITEM. The preferred way of drawing is to design an + * appropriate PAINTER object, the method below is intended only + * for quick hacks and debugging purposes. + * + * @param aLayer: current drawing layer + * @param aGal: pointer to the GAL device we are drawing on + * @param aVisibleArea: area (in world space coordinates) that is relevant for drawing. For + * example, when drawing a bitmap, one can clip the blitting area to aVisibleArea, reducing + * drawing time. + */ + virtual void ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const { }; + + /** + * Function ViewGetLayers() + * Returns the all the layers within the VIEW the object is painted on. For instance, a D_PAD + * spans one or more copper layers and a few technical layers. ViewDraw() or PAINTER::Draw() is + * repeatedly called for each of the layers returned by ViewGetLayers(), depending on the + * rendering order. + * @param aLayers[]: output layer index array + * @param aCount: number of layer indices in aLayers[] + */ + + virtual void ViewGetLayers( int aLayers[], int& aCount ) const = 0; + + /** + * Function ViewSetVisible() + * Sets the item visibility. + * + * @param aIsVisible: whether the item is visible (on all layers), or not. + */ + void ViewSetVisible( bool aIsVisible = true ); + + + /** + * Function ViewIsVisible() + * Returns if the item is visible (or not). + * + * @return when true, the item is visible (i.e. to be displayed, not visible in the + * *current* viewport) + */ + bool ViewIsVisible() const + { + return m_viewVisible; + } + + /** + * Function ViewUpdate() + * For dynamic VIEWs, informs the associated VIEW that the graphical representation of + * this item has changed. For static views calling has no effect. + * + * @param aUpdateFlags: how much the object has changed + * @param aForceImmediateRedraw: when true, the VIEW is redrawn immediately, + * otherwise, it will be redrawn upon next call of VIEW::Update() + */ + virtual void ViewUpdate( int aUpdateFlags = ALL, bool aForceImmediateRedraw = false ); + + /** + * Function ViewRelease() + * Releases the item from an associated dynamic VIEW. For static views calling has no effect. + */ + void ViewRelease(); + +protected: + friend class VIEW; + + /** + * Function viewAssign() + * Assigns the item to a given dynamic VIEW. Called internally by the VIEW. + * + * @param aView[]: dynamic VIEW instance the item is being added to. + */ + + void viewAssign( VIEW* aView ) + { + // release the item from a previously assigned dynamic view (if there is any) + ViewRelease(); + m_view = aView; + m_cachedGroup = -1; + } + + VIEW* m_view; ///* Current dynamic view the item is assigned to. + bool m_viewVisible; ///* Are we visible in the current dynamic VIEW. +private: + int m_cachedGroup; ///* Index of cached GAL display list corresponding to the item +}; +} // namespace KiGfx + +#endif diff --git a/include/view/wx_view_controls.h b/include/view/wx_view_controls.h new file mode 100644 index 0000000000..0848f0c10b --- /dev/null +++ b/include/view/wx_view_controls.h @@ -0,0 +1,85 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file wx_view_controls.h + * @brief WX_VIEW_CONTROLS class definition. + */ + +#ifndef __WX_VIEW_CONTROLS_H +#define __WX_VIEW_CONTROLS_H + +#include +#include + +#include + +class EDA_DRAW_PANEL_GAL; + +namespace KiGfx +{ +/** + * Class WX_VIEW_CONTROLS + * is a specific implementation of class VIEW_CONTROLS for wxWidgets library. + */ +class WX_VIEW_CONTROLS : public VIEW_CONTROLS, public wxEvtHandler +{ +public: + + WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ); + ~WX_VIEW_CONTROLS() {}; + + void onWheel( wxMouseEvent& event ); + void onMotion( wxMouseEvent& event ); + void onButton( wxMouseEvent& event ); + +private: + + /// Options for WX_VIEW_CONTROLS + bool m_isDragPanning; + bool m_isAutoPanning; + bool m_autoPanEnabled; + bool m_needRedraw; + + /// Distance from cursor to VIEW edge when panning is active. + double m_autoPanMargin; + /// How fast is panning when in auto mode. + double m_autoPanSpeed; + /// TODO + double m_autoPanCornerRatio; + + /// Panel that is affected by VIEW_CONTROLS + wxWindow* m_parentPanel; + + /// Stores information about point where event started. + VECTOR2D m_dragStartPoint; + VECTOR2D m_lookStartPoint; + + /// Used for determining time intervals between events. + wxLongLong m_timeStamp; +}; +} // namespace KiGfx + +#endif diff --git a/include/wxstruct.h b/include/wxstruct.h index a359981191..20407a702a 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -68,6 +68,7 @@ class EDA_ITEM; class EDA_RECT; class EDA_DRAW_PANEL; +class EDA_DRAW_PANEL_GAL; class EDA_MSG_PANEL; class BASE_SCREEN; class PARAM_CFG_BASE; @@ -391,11 +392,15 @@ protected: EDA_HOTKEY_CONFIG* m_HotkeysZoomAndGridList; int m_LastGridSizeId; bool m_DrawGrid; // hide/Show grid + bool m_galCanvasActive; // whether to use new GAL engine EDA_COLOR_T m_GridColor; // Grid color /// The area to draw on. EDA_DRAW_PANEL* m_canvas; + /// New type of area (GAL-based) to draw on. + EDA_DRAW_PANEL_GAL* m_galCanvas; + /// Tool ID of previously active draw tool bar button. int m_lastDrawToolId; @@ -904,6 +909,30 @@ public: */ wxString LengthDoubleToString( double aValue, bool aConvertToMils = false ) const; + /** + * Function UseGalCanvas + * used to switch between standard and GAL-based canvas. + * + * @param aEnable True for GAL-based canvas, false for standard canvas. + */ + void UseGalCanvas( bool aEnable ); + + /** + * Function IsNewCanvasActive + * is used to check which canvas (GAL-based or standard) is currently in use. + * + * @return True for GAL-based canvas, false for standard canvas. + */ + bool IsGalCanvasActive() { return m_galCanvasActive; } + + /** + * Function GetCalCanvas + * returns a pointer to GAL-based canvas of given EDA draw frame. + * + * @return Pointer to GAL-based canvas. + */ + EDA_DRAW_PANEL_GAL* GetGalCanvas() { return m_galCanvas; } + DECLARE_EVENT_TABLE() }; diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index ba68add0c8..d65bd84a56 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -426,6 +426,13 @@ target_link_libraries(pcbnew ${PCBNEW_EXTRA_LIBS} ) +if(KICAD_GAL) +target_link_libraries(pcbnew + gal + ${GLEW_LIBRARIES} + ) +endif(KICAD_GAL) + ### # Add pcbnew as install target ### diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index b68f1cc42a..2cd72ee990 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -42,10 +42,18 @@ #include #include #include +#include +#include +#include #include #include +#include +#include #include +#ifdef KICAD_GAL +#include +#endif // Configuration entry names. @@ -77,6 +85,27 @@ BEGIN_EVENT_TABLE( PCB_BASE_FRAME, EDA_DRAW_FRAME ) END_EVENT_TABLE() +/// Rendering order of layers on GAL-based canvas (lower index in the array +/// means that layer is displayed closer to the user, ie. on the top). +const int m_galLayerOrder[] = +{ + DRAW_N, COMMENT_N, ECO1_N, ECO2_N, EDGE_N, + UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31, + ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ), + SILKSCREEN_N_FRONT, SOLDERPASTE_N_FRONT, ADHESIVE_N_FRONT, SOLDERMASK_N_FRONT, + + ITEM_GAL_LAYER( VIA_HOLES_VISIBLE ), ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ), + ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), + + LAYER_N_FRONT, LAYER_N_15, LAYER_N_14, LAYER_N_13, LAYER_N_12, LAYER_N_11, + LAYER_N_10, LAYER_N_9, LAYER_N_8, LAYER_N_7, LAYER_N_6, LAYER_N_5, LAYER_N_4, + LAYER_N_3, LAYER_N_2, LAYER_N_BACK, + + SOLDERMASK_N_BACK, ADHESIVE_N_BACK, SOLDERPASTE_N_BACK, SILKSCREEN_N_BACK, + ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ) +}; + + PCB_BASE_FRAME::PCB_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, @@ -101,6 +130,12 @@ PCB_BASE_FRAME::PCB_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, m_FastGrid1 = 0; m_FastGrid2 = 0; +#ifdef KICAD_GAL + m_galCanvas = new EDA_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize, + EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL ); + m_galCanvas->Hide(); +#endif /* KICAD_GAL */ + m_auxiliaryToolBar = NULL; } @@ -110,6 +145,9 @@ PCB_BASE_FRAME::~PCB_BASE_FRAME() delete m_Collector; delete m_Pcb; // is already NULL for FOOTPRINT_EDIT_FRAME +#ifdef KICAD_GAL + delete m_galCanvas; +#endif /* KICAD_GAL */ } @@ -117,6 +155,78 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) { delete m_Pcb; m_Pcb = aBoard; + +#ifdef KICAD_GAL + if( m_galCanvas ) + { + KiGfx::VIEW* view = m_galCanvas->GetView(); + view->Clear(); + + // All of PCB drawing elements should be added to the VIEW + // in order to be displayed + + // Load zones + for( int i = 0; i < m_Pcb->GetAreaCount(); ++i ) + { + view->Add( (KiGfx::VIEW_ITEM*) ( m_Pcb->GetArea( i ) ) ); + } + + // Load drawings + for( BOARD_ITEM* drawing = m_Pcb->m_Drawings; drawing; drawing = drawing->Next() ) + { + view->Add( drawing ); + } + + // Load tracks + for( TRACK* track = m_Pcb->m_Track; track; track = track->Next() ) + { + view->Add( track ); + } + + // Load modules and its additional elements + for( MODULE* module = m_Pcb->m_Modules; module; module = module->Next() ) + { + // Load module's pads + for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) + { + view->Add( pad ); + } + + // Load module's drawing (mostly silkscreen) + for( BOARD_ITEM* drawing = module->GraphicalItems().GetFirst(); drawing; + drawing = drawing->Next() ) + { + view->Add( drawing ); + } + + // Load module's texts (name and value) + view->Add( &module->Reference() ); + view->Add( &module->Value() ); + } + + // Segzones (equivalent of ZONE_CONTAINER for legacy boards) + for( SEGZONE* zone = m_Pcb->m_Zone; zone; zone = zone->Next() ) + { + view->Add( zone ); + } + + // Apply layer coloring scheme + if( view->GetPainter() ) + { + KiGfx::PCB_RENDER_SETTINGS* colorSettings = new KiGfx::PCB_RENDER_SETTINGS(); + + // Load layers' colors from PCB data + colorSettings->ImportLegacyColors( m_Pcb->GetColorsSettings() ); + view->GetPainter()->ApplySettings( colorSettings ); + } + + // Set rendering order of layers (check m_galLayerOrder to see the order) + for( unsigned int i = 0; i < sizeof( m_galLayerOrder ) / sizeof( int ); ++i ) + { + view->SetLayerOrder( m_galLayerOrder[i], i ); + } + } +#endif } diff --git a/pcbnew/class_board_item.cpp b/pcbnew/class_board_item.cpp index 9b2bb8a972..b79e7f6760 100644 --- a/pcbnew/class_board_item.cpp +++ b/pcbnew/class_board_item.cpp @@ -132,3 +132,11 @@ std::string BOARD_ITEM::FormatInternalUnits( const wxSize& aSize ) { return FormatInternalUnits( aSize.GetWidth() ) + " " + FormatInternalUnits( aSize.GetHeight() ); } + + +void BOARD_ITEM::ViewGetLayers( int aLayers[], int& aCount ) const +{ + // Basic fallback + aCount = 1; + aLayers[0] = m_Layer; +} diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index a2762e1b5c..6ed89c4efd 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -850,6 +850,24 @@ EDA_ITEM* D_PAD::Clone() const } +void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const +{ + if( m_Attribute == PAD_SMD || m_Attribute == PAD_CONN) + { + // Single layer pad (smd) without hole + aLayers[0] = GetParent()->GetLayer(); + aCount = 1; + } + else + { + // Multi layer pad with hole - pad is shown on one common layer, hole on the other + aLayers[0] = ITEM_GAL_LAYER( PADS_VISIBLE ); + aLayers[1] = ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ); + aCount = 2; + } +} + + #if defined(DEBUG) void D_PAD::Show( int nestLevel, std::ostream& os ) const diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 2a58543ec6..529a49577a 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -395,6 +395,9 @@ public: EDA_ITEM* Clone() const; + /// @copydoc VIEW_ITEM::ViewGetLayers() + virtual void ViewGetLayers( int aLayers[], int& aCount ) const; + #if defined(DEBUG) void Show( int nestLevel, std::ostream& os ) const; // overload #endif diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index 419a779faf..56de7e3c5f 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -488,6 +488,23 @@ EDA_ITEM* TEXTE_MODULE::Clone() const } +void TEXTE_MODULE::ViewGetLayers( int aLayers[], int& aCount ) const +{ + switch( GetParent()->GetLayer() ) + { + case LAYER_N_BACK: + aLayers[0] = ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ); // how about SILKSCREEN_N_BACK? + break; + + case LAYER_N_FRONT: + aLayers[0] = ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ); // how about SILKSCREEN_N_FRONT? + break; + } + + aCount = 1; +} + + #if defined(DEBUG) void TEXTE_MODULE::Show( int nestLevel, std::ostream& os ) const diff --git a/pcbnew/class_text_mod.h b/pcbnew/class_text_mod.h index 5042b27875..ba0e7b2087 100644 --- a/pcbnew/class_text_mod.h +++ b/pcbnew/class_text_mod.h @@ -156,6 +156,9 @@ public: EDA_ITEM* Clone() const; + /// @copydoc VIEW_ITEM::ViewGetLayers() + virtual void ViewGetLayers( int aLayers[], int& aCount ) const; + #if defined(DEBUG) void Show( int nestLevel, std::ostream& os ) const; // overload #endif diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index dc80db4d1c..9992b13edc 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -958,6 +958,25 @@ void SEGVIA::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, GR_DRAWMODE draw_mode, } +void SEGVIA::ViewGetLayers( int aLayers[], int& aCount ) const +{ + /*int top_layer, bottom_layer; + ReturnLayerPair( &top_layer, &bottom_layer ); + + // We can add vias to all layers they belong, but then they are drawn this many times + aCount = 0; + for( int i = bottom_layer; i <= top_layer; ++i ) + { + aLayers[aCount++] = i; + }*/ + + // Just show it on common via & via holes layers + aLayers[0] = ITEM_GAL_LAYER( VIAS_VISIBLE ); + aLayers[1] = ITEM_GAL_LAYER( VIA_HOLES_VISIBLE ); + aCount = 2; +} + + // see class_track.h void TRACK::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) { diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index df6aed9c37..0690a207c9 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -414,6 +414,9 @@ public: EDA_ITEM* Clone() const; + /// @copydoc VIEW_ITEM::ViewGetLayers() + virtual void ViewGetLayers( int aLayers[], int& aCount ) const; + #if defined (DEBUG) void Show( int nestLevel, std::ostream& os ) const; // overload #endif diff --git a/pcbnew/hotkeys.cpp b/pcbnew/hotkeys.cpp index 5487510c30..c0fbfb006a 100644 --- a/pcbnew/hotkeys.cpp +++ b/pcbnew/hotkeys.cpp @@ -82,6 +82,9 @@ static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ), HK_RESET_LOCAL_COORD, ' ' ); static EDA_HOTKEY HkSwitchHighContrastMode( wxT("Switch Highcontrast mode"), HK_SWITCH_HIGHCONTRAST_MODE,'H'); +#ifdef KICAD_GAL +static EDA_HOTKEY HkSwitchCanvas( wxT( "Switch canvas" ), HK_SWITCH_CANVAS, WXK_F12 ); +#endif /* Fit on Screen */ #if !defined( __WXMAC__ ) static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME ); @@ -228,6 +231,9 @@ EDA_HOTKEY* board_edit_Hotkey_List[] = &HkRecordMacros6, &HkCallMacros6, &HkRecordMacros7, &HkCallMacros7, &HkRecordMacros8, &HkCallMacros8, &HkRecordMacros9, &HkCallMacros9, &HkSwitchHighContrastMode, +#ifdef KICAD_GAL + &HkSwitchCanvas, +#endif NULL }; diff --git a/pcbnew/hotkeys.h b/pcbnew/hotkeys.h index 98e18fb565..5c24b43ea0 100644 --- a/pcbnew/hotkeys.h +++ b/pcbnew/hotkeys.h @@ -82,6 +82,9 @@ enum hotkey_id_commnand { HK_CALL_MACROS_9, HK_MACRO_ID_END, HK_SWITCH_HIGHCONTRAST_MODE, +#ifdef KICAD_GAL + HK_SWITCH_CANVAS, +#endif }; // Full list of hotkey descriptors for board editor and footprint editor diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index 722bece58d..c3e1cd2301 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -348,6 +348,17 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() _( "&List Nets" ), _( "View a list of nets with names and id's" ), KiBitmap( tools_xpm ) ); +#ifdef KICAD_GAL + // Switching GAL-based canvas on/off + viewMenu->AppendSeparator(); + + text = AddHotkeyName( _( "&Switch canvas" ), g_Pcbnew_Editor_Hokeys_Descr, HK_SWITCH_CANVAS, IS_ACCELERATOR ); + + AddMenuItem( viewMenu, ID_SWITCH_CANVAS, + text, _( "Switch the canvas implementation between old (XOR-based) and new (GAL-based)" ), + KiBitmap( tools_xpm ) ); +#endif + /** Create Place Menu **/ wxMenu* placeMenu = new wxMenu; diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp new file mode 100644 index 0000000000..cf34a162ad --- /dev/null +++ b/pcbnew/pcb_painter.cpp @@ -0,0 +1,421 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +using namespace KiGfx; + +PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS() +{ + Update(); +} + + +void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings ) +{ + for( int i = 0; i < LAYER_COUNT; i++ ) + { + m_layerColors[i] = m_legacyColorMap[aSettings->GetLayerColor( i )]; + } + + for( int i = 0; i < END_PCB_VISIBLE_LIST; i++ ) + { + m_itemColors[i] = m_legacyColorMap[aSettings->GetItemColor( i )]; + } + + m_itemColors[VIA_HOLES_VISIBLE] = COLOR4D( 0.5f, 0.4f, 0.0f, 1.0f ); + m_itemColors[PAD_HOLES_VISIBLE] = COLOR4D( 0.0f, 0.5f, 0.5f, 1.0f ); + m_itemColors[VIAS_VISIBLE] = COLOR4D( 0.7f, 0.7f, 0.7f, 1.0f ); + m_itemColors[PADS_VISIBLE] = COLOR4D( 0.7f, 0.7f, 0.7f, 1.0f ); + + Update(); +} + + +void PCB_RENDER_SETTINGS::Update() +{ + // Calculate darkened/highlighted variants of layer colors + for( int i = 0; i < LAYER_COUNT; i++ ) + { + m_layerColors[i].a = m_layerOpacity; + m_layerColorsHi[i] = m_layerColors[i].Highlighted( m_highlightFactor ); + m_layerColorsDark[i] = m_layerColors[i].Darkened( 1.0 - m_highlightFactor ); + m_layerColorsSel[i] = m_layerColors[i].Highlighted( m_selectFactor ); + } + + for( int i = 0; i < END_PCB_VISIBLE_LIST; i++ ) + { + m_itemColors[i].a = m_layerOpacity; + m_itemColorsHi[i] = m_itemColors[i].Highlighted( m_highlightFactor ); + m_itemColorsDark[i] = m_itemColors[i].Darkened( 1.0 - m_highlightFactor ); + m_itemColorsSel[i] = m_itemColors[i].Highlighted( m_selectFactor ); + } + + m_hiContrastColor = COLOR4D( m_hiContrastFactor, m_hiContrastFactor, m_highlightFactor, + m_layerOpacity ); +} + + +PCB_PAINTER::PCB_PAINTER( GAL* aGal ) : + PAINTER( aGal ) +{ +} + + +const COLOR4D& PCB_PAINTER::getLayerColor( int aLayer, int aNetCode ) const +{ + // For item layers (vias, texts, and so on) + if( aLayer >= LAYER_COUNT ) + return getItemColor( aLayer - LAYER_COUNT, aNetCode ); + + if( m_pcbSettings->m_hiContrastEnabled && m_pcbSettings->m_activeLayer != aLayer ) + { + return m_pcbSettings->m_hiContrastColor; + } + else if( m_pcbSettings->m_highlightEnabled ) + { + if( aNetCode == m_pcbSettings->m_highlightNetcode ) + { + return m_pcbSettings->m_layerColorsHi[aLayer]; + } + else + { + return m_pcbSettings->m_layerColorsDark[aLayer]; + } + } + else + { + return m_pcbSettings->m_layerColors[aLayer]; + } +} + + +const COLOR4D& PCB_PAINTER::getItemColor( int aItemType, int aNetCode ) const +{ + // if(aNetCode == m_settings->m_hiContrastEnabled) + // return m_settings->m_itemColorsHi[ aItemType ]; + if( m_pcbSettings->m_highlightEnabled ) + { + if( aNetCode == m_pcbSettings->m_highlightNetcode ) + { + return m_pcbSettings->m_itemColorsHi[aItemType]; + } + else + { + return m_pcbSettings->m_itemColorsDark[aItemType]; + } + } + else + { + return m_pcbSettings->m_itemColors[aItemType]; + } +} + + +bool PCB_PAINTER::Draw( const EDA_ITEM* aItem, int aLayer ) +{ + // the "cast" applied in here clarifies which overloaded draw() is called + switch( aItem->Type() ) + { + case PCB_ZONE_T: + case PCB_TRACE_T: + draw( (TRACK*) aItem ); + break; + + case PCB_VIA_T: + draw( (SEGVIA*) aItem, aLayer ); + break; + + case PCB_PAD_T: + draw( (D_PAD*) aItem, aLayer ); + break; + + case PCB_LINE_T: + case PCB_MODULE_EDGE_T: + draw( (DRAWSEGMENT*) aItem ); + break; + + case PCB_TEXT_T: + draw( (TEXTE_PCB*) aItem ); + break; + + case PCB_MODULE_TEXT_T: + draw( (TEXTE_MODULE*) aItem, aLayer ); + break; + + case PCB_ZONE_AREA_T: + draw( (ZONE_CONTAINER*) aItem ); + break; + + default: + // Painter does not know how to draw the object + return false; + break; + } + + return true; +} + + +void PCB_PAINTER::draw( const TRACK* aTrack ) +{ + VECTOR2D start( aTrack->GetStart() ); + VECTOR2D end( aTrack->GetEnd() ); + COLOR4D strokeColor = getLayerColor( aTrack->GetLayer(), aTrack->GetNet() ); + + m_gal->SetLineCap( LINE_CAP_ROUND ); + m_gal->SetLineJoin( LINE_JOIN_ROUND ); + m_gal->SetLineWidth( aTrack->GetWidth() ); + m_gal->SetStrokeColor( strokeColor ); + m_gal->DrawLine( start, end ); +} + + +void PCB_PAINTER::draw( const SEGVIA* aVia, int aLayer ) +{ + VECTOR2D center( aVia->GetStart() ); + double radius; + COLOR4D fillColor; + + // Choose drawing settings depending on if we are drawing via's pad or hole + if( aLayer == ITEM_GAL_LAYER( VIAS_VISIBLE ) ) + { + radius = aVia->GetWidth() / 2.0f; + } + else if( aLayer == ITEM_GAL_LAYER( VIA_HOLES_VISIBLE ) ) + { + radius = aVia->GetDrillValue() / 2.0f; + } + else + return; + + fillColor = getLayerColor( aLayer, aVia->GetNet() ); + + m_gal->SetIsStroke( false ); + m_gal->SetIsFill( true ); + m_gal->SetFillColor( fillColor ); + m_gal->DrawCircle( center, radius ); +} + + +void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) +{ + COLOR4D fillColor; + VECTOR2D size; + PAD_SHAPE_T shape; + double m, n; + + m_gal->Save(); + m_gal->Translate( VECTOR2D( aPad->GetPosition() ) ); + m_gal->Rotate( -aPad->GetOrientation() * M_PI / 1800.0 ); // orientation is in tenths of degree + + // Choose drawing settings depending on if we are drawing a pad itself or a hole + if( aLayer == ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ) ) + { + // Drawing hole + size = VECTOR2D( aPad->GetDrillSize() ) / 2.0f; + shape = aPad->GetDrillShape(); + } + else + { + // Drawing every kind of pad + m_gal->Translate( VECTOR2D( aPad->GetOffset() ) ); + size = VECTOR2D( aPad->GetSize() ) / 2.0f; + shape = aPad->GetShape(); + } + + fillColor = getLayerColor( aLayer, aPad->GetNet() ); + + m_gal->SetIsFill( true ); + m_gal->SetIsStroke( false ); + m_gal->SetFillColor( fillColor ); + + switch( shape ) + { + case PAD_OVAL: + if( size.y >= size.x ) + { + m = ( size.y - size.x ); + n = size.x; + + m_gal->DrawCircle( VECTOR2D( 0, -m ), n ); + m_gal->DrawCircle( VECTOR2D( 0, m ), n ); + m_gal->DrawRectangle( VECTOR2D( -n, -m ), VECTOR2D( n, m ) ); + } + else + { + m = ( size.x - size.y ); + n = size.y; + + m_gal->DrawCircle( VECTOR2D( -m, 0 ), n ); + m_gal->DrawCircle( VECTOR2D( m, 0 ), n ); + m_gal->DrawRectangle( VECTOR2D( -m, -n ), VECTOR2D( m, n ) ); + } + break; + + case PAD_RECT: + case PAD_TRAPEZOID: + m_gal->DrawRectangle( VECTOR2D( -size.x, -size.y ), VECTOR2D( size.x, size.y ) ); + break; + + case PAD_CIRCLE: + m_gal->DrawCircle( VECTOR2D( 0.0, 0.0 ), size.x ); + break; + + case PAD_OCTAGON: // it is not used anywhere, neither you can set it using pcbnew.. + case PAD_NONE: + break; + } + + m_gal->Restore(); +} + + +void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment ) +{ + COLOR4D strokeColor = getLayerColor( aSegment->GetLayer(), 0 ); + std::deque pointsList; + + m_gal->SetIsFill( false ); + m_gal->SetIsStroke( true ); + m_gal->SetStrokeColor( strokeColor ); + m_gal->SetLineWidth( aSegment->GetWidth() ); + m_gal->SetLineCap( LINE_CAP_ROUND ); + m_gal->SetLineJoin( LINE_JOIN_ROUND ); + + switch( aSegment->GetShape() ) + { + case S_SEGMENT: + m_gal->DrawLine( VECTOR2D( aSegment->GetStart() ), VECTOR2D( aSegment->GetEnd() ) ); + break; + + case S_RECT: + m_gal->SetLineCap( LINE_CAP_SQUARED ); + m_gal->SetLineJoin( LINE_JOIN_BEVEL ); + m_gal->DrawLine( VECTOR2D( aSegment->GetStart() ), VECTOR2D( aSegment->GetEnd() ) ); + break; + + case S_ARC: + m_gal->DrawArc( VECTOR2D( aSegment->GetCenter() ), aSegment->GetRadius(), + aSegment->GetArcAngleStart() * M_PI / 1800.0, + ( aSegment->GetArcAngleStart() + aSegment->GetAngle() ) * M_PI / 1800.0 ); + break; + + case S_CIRCLE: + m_gal->DrawCircle( VECTOR2D( aSegment->GetCenter() ), aSegment->GetRadius() ); + break; + + case S_POLYGON: + std::copy( aSegment->GetPolyPoints().begin(), aSegment->GetPolyPoints().end(), + std::back_inserter( pointsList ) ); + m_gal->DrawPolygon( pointsList ); + break; + + case S_CURVE: + m_gal->DrawCurve( VECTOR2D( aSegment->GetStart() ), + VECTOR2D( aSegment->GetBezControl1() ), + VECTOR2D( aSegment->GetBezControl2() ), + VECTOR2D( aSegment->GetEnd() ) ); + break; + + case S_LAST: + break; + } +} + + +void PCB_PAINTER::draw( const TEXTE_PCB* aText ) +{ + COLOR4D strokeColor = getLayerColor( aText->GetLayer(), 0 ); + VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y ); + double orientation = aText->GetOrientation() * M_PI / 1800.0; + + m_gal->SetStrokeColor( strokeColor ); + m_gal->SetLineWidth( aText->GetThickness() ); + m_stroke_font->LoadAttributes( aText ); + m_stroke_font->Draw( std::string( aText->GetText().mb_str() ), position, orientation ); +} + + +void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) +{ + COLOR4D strokeColor = getLayerColor( aLayer, 0 ); + + m_gal->SetStrokeColor( strokeColor ); + m_gal->SetLineWidth( aText->GetThickness() ); + m_stroke_font->LoadAttributes( aText ); + m_stroke_font->Draw( std::string( aText->GetText().mb_str() ), + VECTOR2D( aText->GetTextPosition().x, aText->GetTextPosition().y), + aText->GetDrawRotation() * M_PI / 1800.0 ); +} + + +void PCB_PAINTER::draw( const ZONE_CONTAINER* aContainer ) +{ + COLOR4D fillColor = getLayerColor( aContainer->GetLayer(), aContainer->GetNet() ); + std::vector::iterator polyIterator; + std::vector polyPoints = aContainer->GetFilledPolysList(); + std::deque corners; + + m_gal->SetLineCap( LINE_CAP_ROUND ); + m_gal->SetLineJoin( LINE_JOIN_ROUND ); + m_gal->SetFillColor( fillColor ); + m_gal->SetStrokeColor( fillColor ); + m_gal->SetIsFill( aContainer->IsFilled() ); + m_gal->SetIsStroke( true ); + m_gal->SetLineWidth( aContainer->GetThermalReliefCopperBridge() / 2.0 ); + + // FIXME implement hatch mode + + for( polyIterator = polyPoints.begin(); polyIterator != polyPoints.end(); polyIterator++ ) + { + // Find out all of polygons and then draw them + if( !polyIterator->end_contour ) + { + corners.push_back( VECTOR2D( *polyIterator ) ); + } + else + { + m_gal->DrawPolygon( corners ); + m_gal->DrawPolyline( corners ); + corners.clear(); + } + } +} diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h new file mode 100644 index 0000000000..80e2f78694 --- /dev/null +++ b/pcbnew/pcb_painter.h @@ -0,0 +1,143 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __CLASS_PCB_PAINTER_H +#define __CLASS_PCB_PAINTER_H + +#include + +#include + + +class EDA_ITEM; +class COLORS_DESIGN_SETTINGS; +class BOARD_ITEM; +class BOARD; +class SEGVIA; +class TRACK; +class D_PAD; +class DRAWSEGMENT; +class MODULE; +class SEGZONE; +class ZONE_CONTAINER; +class TEXTE_PCB; +class TEXTE_MODULE; + +namespace KiGfx +{ +class GAL; +class STROKE_FONT; + +/** + * Class PCB_RENDER_SETTINGS + * Stores PCB specific render settings. + */ +class PCB_RENDER_SETTINGS : public RENDER_SETTINGS +{ +public: + + friend class PCB_PAINTER; + + enum ClearanceMode { + CL_VIAS = 0x1, + CL_PADS = 0x2, + CL_TRACKS = 0x4 + }; + + PCB_RENDER_SETTINGS(); + + /// @copydoc RENDER_SETTINGS::Update() + void Update(); + + /// @copydoc RENDER_SETTINGS::ImportLegacyColors() + void ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings ); + +protected: + + /// Colors for all layers (including special, highlighted & darkened versions) + COLOR4D m_layerColors [LAYER_COUNT]; + COLOR4D m_layerColorsHi [LAYER_COUNT]; + COLOR4D m_layerColorsSel [LAYER_COUNT]; + COLOR4D m_layerColorsDark[LAYER_COUNT]; + COLOR4D m_itemColors [END_PCB_VISIBLE_LIST]; + COLOR4D m_itemColorsHi [END_PCB_VISIBLE_LIST]; + COLOR4D m_itemColorsSel [END_PCB_VISIBLE_LIST]; + COLOR4D m_itemColorsDark [END_PCB_VISIBLE_LIST]; + + bool m_sketchModeSelect[END_PCB_VISIBLE_LIST]; + bool m_visibleLayers [LAYER_COUNT]; + bool m_visibleItems [END_PCB_VISIBLE_LIST]; +}; + + +/** + * Class PCB_PAINTER + * Contains methods for drawing PCB-specific items. + */ +class PCB_PAINTER : public PAINTER +{ +public: + + PCB_PAINTER( GAL* aGal ); + + /// @copydoc PAINTER::Draw() + virtual bool Draw( const EDA_ITEM*, int ); + + /// @copydoc PAINTER::ApplySettings() + virtual void ApplySettings( RENDER_SETTINGS* aSettings ) + { + PAINTER::ApplySettings( aSettings ); + + // Store PCB specific render settings + m_pcbSettings = dynamic_cast ( aSettings ); + } + +protected: + + PCB_RENDER_SETTINGS* m_pcbSettings; + + /// @copydoc PAINTER::getLayerColor() + const COLOR4D& getLayerColor( int aLayer, int aNetCode ) const; + + /** + * Function getItemColor + * Returns color for a special layer (eg. vias/pads holes, texts on front/bottom layer, etc.) + * @param aItemType Layer number of the item to be drawn. + * @param aNetCode Net number of the item to be drawn. + */ + const COLOR4D& getItemColor( int aItemType, int aNetCode ) const; + + // Drawing functions for various types of PCB-specific items + void draw( const TRACK* ); + void draw( const SEGVIA*, int ); + void draw( const D_PAD*, int ); + void draw( const DRAWSEGMENT* ); + void draw( const TEXTE_PCB* ); + void draw( const TEXTE_MODULE*, int ); + void draw( const ZONE_CONTAINER* ); +}; +} // namespace KiGfx + +#endif /* __CLASS_PAINTER_H */ diff --git a/tools/class_painter.h b/tools/class_painter.h deleted file mode 100644 index ee201c1c50..0000000000 --- a/tools/class_painter.h +++ /dev/null @@ -1,172 +0,0 @@ - - -#if defined(PCBNEW) - -class BOARD; -class TRACK; -class ZONE_CONTAINER; - -//: - -#elif defined(EESCHEMA) - -class SCH_SHEET; -//: - -#endif - - -/** - * Class PAINTER - * contains all the knowledge about how to draw any graphical object onto - * any particular output device. - * This knowledge is held outside the individual graphical objects so that - * alternative output devices may be used, and so that the graphical objects - * themselves to not contain drawing routines. Drawing routines in the objects - * cause problems with usages of the objects as simple container objects in - * DLL/DSOs. - */ -class PAINTER -{ -public: - - - /** - * Constructor PAINTER( wxDC& ) - * initializes this object for painting on any of the polymorphic - * wxDC derivatives. - * - * @param aDC is a reference to a polymorphic wx device context on which - * to draw. It can be any of the wxDC derivatives. - * No ownership is given to this PAINTER of aDC. - */ - PAINTER( wxDC& aDC ) : - m_dc( aDC ), - m_highlight( false ), - m_grayed( false ) - { - } - - - -#if defined(PCBNEW) - - void Draw( const BOARD_ITEM* ); - -#elif defined(EESCHEMA) - - void Draw( const SCH_ITEM* ); - -#endif - - -private: - - wxDC& m_dc; - - // drawing state information. - bool m_highlite; - bool m_grayed; - - -#if defined(PCBNEW) - - void draw( const TRACK* ); - void draw( const MODULE* ); - void draw( const EDGE_MODULE* ); - // : - -#elif defined(EESCHEMA) - void draw( const SCH_WIRE* ); - // : - -#endif -} - - -#if defined(PCBNEW) - -void PAINTER::Draw( const BOARD_ITEM* aItem ) -{ - // the "cast" applied in here clarifies which overloaded draw() is called - - switch( aItem->Type() ) - { - case PCB_MODULE_T: - draw( (MODULE*) aItem ); - break; - - case PCB_PAD_T: - draw( (D_PAD*) aItem ); - break; - - case PCB_LINE_T: - draw( (TEXTE_PCB*) aItem ); - break; - - case PCB_TEXT_T: - draw( (TEXTE_PCB*) aItem ); - break; - - case PCB_MODULE_TEXT_T: - draw( (TEXTE_PCB*) aItem ); - break; - - case PCB_MODULE_EDGE_T: - draw( (EDGE_MODULE*) aItem ); - break; - - case PCB_TRACE_T: - draw( (TRACKE*) aItem ); - break; - - case PCB_VIA_T: - draw( (VIA*) aItem ); - break; - - case PCB_ZONE_T: - draw( (SEGZONE*) aItem ); - break; - - case PCB_MARKER_T: - draw( (MARKER_PCB*) aItem ); - break; - - case PCB_DIMENSION_T: - draw( (DIMENSION*) aItem ); - break; - - case PCB_TARGET_T: - draw( (TARGET*) aItem ); - break; - - - case PCB_ZONE_AREA_T: - draw( (ZONE_CONTAINER*) aItem ); - break; - - /* not used - case PCB_ITEM_LIST_T: - draw( (BOARD_ITEM_LIST*) aItem ); - break; - */ - - default: - ; // nothing - } -} - -#elif defined(EESCHEMA) - -void PAINTER::Draw( const SCH_ITEM* aItem ) -{ - // the "cast" applied in here clarifies which overloaded draw() is called - - switch( aItem->Type() ) - { - //: - } -} - - -#endif \ No newline at end of file From 395c5fc9221ebdb5964a9b5d29d0af9b5ef1d1d4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 2 Apr 2013 11:02:35 +0200 Subject: [PATCH 006/415] Added possibility to show/hide layers using right sidebar (PCB layer widget) in the GAL rendered view. --- common/view/view.cpp | 21 +++++++++++--------- pcbnew/class_pcb_layer_widget.cpp | 32 +++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 9 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 0e78e23eb7..59ff028cef 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -268,7 +268,7 @@ void VIEW::SetCenter( const VECTOR2D& aCenter ) void VIEW::SetLayerVisible( int aLayer, bool aVisible ) { - // FIXME + m_layers[aLayer].enabled = aVisible; } @@ -355,15 +355,18 @@ void VIEW::redrawRect( const BOX2I& aRect ) BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers ) { - drawItem drawFunc( this, l->id ); + if( l->enabled ) + { + drawItem drawFunc( this, l->id ); - m_gal->SetLayerDepth( (double) l->renderingOrder ); - l->items->Query( aRect, drawFunc ); - l->isDirty = false; + m_gal->SetLayerDepth( (double) l->renderingOrder ); + l->items->Query( aRect, drawFunc ); + l->isDirty = false; - totalItems += drawFunc.count; - totalDrawTime += drawFunc.time; - totalCached += drawFunc.countCached; + totalItems += drawFunc.count; + totalDrawTime += drawFunc.time; + totalCached += drawFunc.countCached; + } } prof_end( &totalCycles ); @@ -399,7 +402,7 @@ void VIEW::Clear() l->items->Query( r, v ); l->items->RemoveAll(); - }; + } } diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index 819a589f20..ab82861afa 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -31,6 +31,10 @@ #include #include #include +#ifdef KICAD_GAL +#include +#include +#endif #include #include #include // enum PCB_VISIBLE @@ -358,6 +362,20 @@ void PCB_LAYER_WIDGET::OnLayerVisible( int aLayer, bool isVisible, bool isFinal brd->SetVisibleLayers( visibleLayers ); +#ifdef KICAD_GAL + EDA_DRAW_PANEL_GAL *galCanvas = myframe->GetGalCanvas(); + if( galCanvas ) + { + KiGfx::VIEW* view = galCanvas->GetView(); + view->SetLayerVisible( aLayer, isVisible ); + + if( myframe->IsGalCanvasActive() ) + { + galCanvas->Refresh(); + } + } +#endif /* KICAD_GAL */ + if( isFinal ) myframe->GetCanvas()->Refresh(); } @@ -394,6 +412,20 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled ) brd->SetElementVisibility( aId, isEnabled ); } +#ifdef KICAD_GAL + EDA_DRAW_PANEL_GAL *galCanvas = myframe->GetGalCanvas(); + if( galCanvas ) + { + KiGfx::VIEW* view = galCanvas->GetView(); + view->SetLayerVisible( ITEM_GAL_LAYER( aId ), isEnabled ); + + if( myframe->IsGalCanvasActive() ) + { + galCanvas->Refresh(); + } + } +#endif /* KICAD_GAL */ + myframe->GetCanvas()->Refresh(); } From d3004fc8336502a5c02775362f5dddc665cd4dab Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 2 Apr 2013 11:03:15 +0200 Subject: [PATCH 007/415] Showing module's value and reference text on proper layers. --- pcbnew/basepcbframe.cpp | 1 + pcbnew/class_text_mod.cpp | 23 ++++++++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 2cd72ee990..57947a7585 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -92,6 +92,7 @@ const int m_galLayerOrder[] = DRAW_N, COMMENT_N, ECO1_N, ECO2_N, EDGE_N, UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31, ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ), + ITEM_GAL_LAYER( MOD_REFERENCES_VISIBLE), ITEM_GAL_LAYER( MOD_VALUES_VISIBLE ), SILKSCREEN_N_FRONT, SOLDERPASTE_N_FRONT, ADHESIVE_N_FRONT, SOLDERMASK_N_FRONT, ITEM_GAL_LAYER( VIA_HOLES_VISIBLE ), ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ), diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index 56de7e3c5f..f909ee8099 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -490,14 +490,27 @@ EDA_ITEM* TEXTE_MODULE::Clone() const void TEXTE_MODULE::ViewGetLayers( int aLayers[], int& aCount ) const { - switch( GetParent()->GetLayer() ) + switch( m_Type ) { - case LAYER_N_BACK: - aLayers[0] = ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ); // how about SILKSCREEN_N_BACK? + case TEXT_is_REFERENCE: + aLayers[0] = ITEM_GAL_LAYER( MOD_REFERENCES_VISIBLE ); break; - case LAYER_N_FRONT: - aLayers[0] = ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ); // how about SILKSCREEN_N_FRONT? + case TEXT_is_VALUE: + aLayers[0] = ITEM_GAL_LAYER( MOD_VALUES_VISIBLE ); + break; + + default: + switch( GetParent()->GetLayer() ) + { + case LAYER_N_BACK: + aLayers[0] = ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ); // how about SILKSCREEN_N_BACK? + break; + + case LAYER_N_FRONT: + aLayers[0] = ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ); // how about SILKSCREEN_N_FRONT? + break; + } break; } From 84ee9591d140669bd8204af8fabf6a79a4b57df6 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 3 Apr 2013 11:19:08 +0200 Subject: [PATCH 008/415] Added loading layer visibility settings when loading a board. Minor code cleaning. --- pcbnew/basepcbframe.cpp | 11 +++++++++++ pcbnew/class_pcb_layer_widget.cpp | 26 +++++++++++++------------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 57947a7585..04a5686eeb 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -226,6 +226,17 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) { view->SetLayerOrder( m_galLayerOrder[i], i ); } + + // Load layer & elements visibility settings + for( unsigned int i = 0; i < LAYER_COUNT; ++i ) + { + view->SetLayerVisible( i, m_Pcb->IsLayerVisible( i ) ); + } + + for( unsigned int i = 0; i < END_PCB_VISIBLE_LIST; ++i ) + { + view->SetLayerVisible( ITEM_GAL_LAYER( i ), m_Pcb->IsElementVisible( i ) ); + } } #endif } diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index ab82861afa..731d6051f4 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -368,16 +368,18 @@ void PCB_LAYER_WIDGET::OnLayerVisible( int aLayer, bool isVisible, bool isFinal { KiGfx::VIEW* view = galCanvas->GetView(); view->SetLayerVisible( aLayer, isVisible ); - - if( myframe->IsGalCanvasActive() ) - { - galCanvas->Refresh(); - } } #endif /* KICAD_GAL */ if( isFinal ) - myframe->GetCanvas()->Refresh(); + { +#ifdef KICAD_GAL + if( myframe->IsGalCanvasActive() ) + galCanvas->Refresh(); + else +#endif /* KICAD_GAL */ + myframe->GetCanvas()->Refresh(); + } } void PCB_LAYER_WIDGET::OnRenderColorChange( int aId, EDA_COLOR_T aColor ) @@ -418,15 +420,13 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled ) { KiGfx::VIEW* view = galCanvas->GetView(); view->SetLayerVisible( ITEM_GAL_LAYER( aId ), isEnabled ); - - if( myframe->IsGalCanvasActive() ) - { - galCanvas->Refresh(); - } } -#endif /* KICAD_GAL */ - myframe->GetCanvas()->Refresh(); + if( myframe->IsGalCanvasActive() ) + galCanvas->Refresh(); + else +#endif /* KICAD_GAL */ + myframe->GetCanvas()->Refresh(); } //----------------------------------------------- From bd2c878b3514ca217b9b74dd281b4a4e6e28afad Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 3 Apr 2013 11:19:13 +0200 Subject: [PATCH 009/415] Added painting of DIMENSION & PCB_TARGET items. Removed unnecessary header inclusion. --- pcbnew/pcb_painter.cpp | 63 ++++++++++++++++++++++++++++++++++++++---- pcbnew/pcb_painter.h | 4 +++ 2 files changed, 62 insertions(+), 5 deletions(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index cf34a162ad..a9eea19e46 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include @@ -184,6 +184,14 @@ bool PCB_PAINTER::Draw( const EDA_ITEM* aItem, int aLayer ) draw( (ZONE_CONTAINER*) aItem ); break; + case PCB_DIMENSION_T: + draw( (DIMENSION*) aItem ); + break; + + case PCB_TARGET_T: + draw( (PCB_TARGET*) aItem ); + break; + default: // Painter does not know how to draw the object return false; @@ -376,14 +384,14 @@ void PCB_PAINTER::draw( const TEXTE_PCB* aText ) void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) { - COLOR4D strokeColor = getLayerColor( aLayer, 0 ); + COLOR4D strokeColor = getLayerColor( aLayer, 0 ); + VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y); + double orientation = aText->GetDrawRotation() * M_PI / 1800.0; m_gal->SetStrokeColor( strokeColor ); m_gal->SetLineWidth( aText->GetThickness() ); m_stroke_font->LoadAttributes( aText ); - m_stroke_font->Draw( std::string( aText->GetText().mb_str() ), - VECTOR2D( aText->GetTextPosition().x, aText->GetTextPosition().y), - aText->GetDrawRotation() * M_PI / 1800.0 ); + m_stroke_font->Draw( std::string( aText->GetText().mb_str() ), position, orientation ); } @@ -419,3 +427,48 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aContainer ) } } } + + +void PCB_PAINTER::draw( const DIMENSION* aDimension ) +{ + COLOR4D strokeColor = getLayerColor( aDimension->GetLayer(), 0 ); + + m_gal->SetStrokeColor( strokeColor ); + m_gal->SetIsFill( false ); + m_gal->SetIsStroke( true ); + m_gal->SetLineWidth( aDimension->GetWidth() ); + + // Draw an arrow + m_gal->DrawLine( VECTOR2D( aDimension->m_crossBarO ), VECTOR2D( aDimension->m_crossBarF ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_featureLineGO ), VECTOR2D( aDimension->m_featureLineGF ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_featureLineDO ), VECTOR2D( aDimension->m_featureLineDF ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_arrowD1O ), VECTOR2D( aDimension->m_arrowD1F ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_arrowD2O ), VECTOR2D( aDimension->m_arrowD2F ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_arrowG1O ), VECTOR2D( aDimension->m_arrowG1F ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_arrowG2O ), VECTOR2D( aDimension->m_arrowG2F ) ); + + // Draw text + draw( &aDimension->Text() ); +} + + +void PCB_PAINTER::draw( const PCB_TARGET* aTarget ) +{ + COLOR4D strokeColor = getLayerColor( aTarget->GetLayer(), 0 ); + double radius; + + // according to PCB_TARGET::Draw() (class_mire.cpp) + if( aTarget->GetShape() ) // shape X + { + radius = aTarget->GetSize() / 2; + } + else + { + radius = aTarget->GetSize() / 3; + } + + m_gal->SetStrokeColor( strokeColor ); + m_gal->SetIsFill( true ); + m_gal->SetIsStroke( true ); + m_gal->DrawCircle( VECTOR2D( aTarget->GetPosition() ), radius ); +} diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 80e2f78694..537fae5e63 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -44,6 +44,8 @@ class SEGZONE; class ZONE_CONTAINER; class TEXTE_PCB; class TEXTE_MODULE; +class DIMENSION; +class PCB_TARGET; namespace KiGfx { @@ -137,6 +139,8 @@ protected: void draw( const TEXTE_PCB* ); void draw( const TEXTE_MODULE*, int ); void draw( const ZONE_CONTAINER* ); + void draw( const DIMENSION* ); + void draw( const PCB_TARGET* ); }; } // namespace KiGfx From 46b731b2d3cc00027637bb0b8932bba5d70f35f1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 4 Apr 2013 11:18:47 +0200 Subject: [PATCH 010/415] common/painter.cpp: Removed unnecessary header inclusion, added variable initialization common/view/view.cpp: Added line to comply with coding style --- common/painter.cpp | 3 +-- common/view/view.cpp | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/painter.cpp b/common/painter.cpp index 46c8a15d20..75986a04a3 100644 --- a/common/painter.cpp +++ b/common/painter.cpp @@ -24,8 +24,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include #include #include #include @@ -44,6 +42,7 @@ RENDER_SETTINGS::RENDER_SETTINGS() m_highlightEnabled = false; m_hiContrastEnabled = false; m_hiContrastFactor = 0.2; + m_activeLayer = 0; // Store the predefined colors used in KiCad in format used by GAL for( int i = 0; i < NBCOLOR; i++ ) diff --git a/common/view/view.cpp b/common/view/view.cpp index 59ff028cef..79ea771df2 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -344,6 +344,7 @@ struct VIEW::drawItem VIEW* view; }; + void VIEW::redrawRect( const BOX2I& aRect ) { int totalItems = 0, totalCached = 0; From 7c4ac2e3a46e1b8108a811ed00bdc8f3f65b6c3a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 4 Apr 2013 11:21:35 +0200 Subject: [PATCH 011/415] Added GetMinDepth()/GetMaxDepth() methods (useful for displaying things on the top or on the bottom). --- include/gal/graphics_abstraction_layer.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 85f686d165..e5ea3c344f 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -470,6 +470,22 @@ public: depthRange = aDepthRange; } + /** + * @brief Returns the minimum depth in the currently used range (the top). + */ + inline double GetMinDepth() + { + return depthRange.x; + } + + /** + * @brief Returns the maximum depth in the currently used range (the bottom). + */ + inline double GetMaxDepth() + { + return depthRange.y; + } + /** * @brief Get the world scale. * @@ -624,11 +640,17 @@ public: layerDepth -= 0.1; // fixme: there should be a minimum step } + /** + * @brief Stores current drawing depth on the depth stack. + */ void PushDepth() { depthStack.push( layerDepth ); } + /** + * @brief Restores previously stored drawing depth for the depth stack. + */ void PopDepth() { layerDepth = depthStack.top(); From 141252b73f3de42cfaa52d95edb40626df9becb5 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 4 Apr 2013 11:23:23 +0200 Subject: [PATCH 012/415] Added GetSettings() method for obtaining current rendering settings used by PAINTER class. --- include/painter.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/painter.h b/include/painter.h index 2c4412408f..0a3cb1d6b5 100644 --- a/include/painter.h +++ b/include/painter.h @@ -179,6 +179,16 @@ public: m_settings = aSettings; } + /** + * Function GetSettings + * Returns pointer to current settings that are going to be used when drawing items. + * @return Current rendering settings. + */ + virtual RENDER_SETTINGS* GetSettings() + { + return m_settings; + } + /** * Function Draw * Takes an instance of EDA_ITEM and passes it to a function that know how to draw the item. From b2270b2f4f9188afc3624043c63176d228d7bf0b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 4 Apr 2013 11:52:16 +0200 Subject: [PATCH 013/415] Added missing CMakeModules (Cairo & GLEW). --- CMakeModules/FindCairo.cmake | 168 +++++++++++++++++++++++++++++++++++ CMakeModules/FindGLEW.cmake | 105 ++++++++++++++++++++++ 2 files changed, 273 insertions(+) create mode 100644 CMakeModules/FindCairo.cmake create mode 100644 CMakeModules/FindGLEW.cmake diff --git a/CMakeModules/FindCairo.cmake b/CMakeModules/FindCairo.cmake new file mode 100644 index 0000000000..bc23028e94 --- /dev/null +++ b/CMakeModules/FindCairo.cmake @@ -0,0 +1,168 @@ +# - Try to find the CAIRO library +# Once done this will define +# +# CAIRO_ROOT_DIR - Set this variable to the root installation of CAIRO +# +# Read-Only variables: +# CAIRO_FOUND - system has the CAIRO library +# CAIRO_INCLUDE_DIR - the CAIRO include directory +# CAIRO_LIBRARIES - The libraries needed to use CAIRO +# CAIRO_VERSION - This is set to $major.$minor.$revision (eg. 0.9.8) + +#============================================================================= +# Copyright 2012 Dmitry Baryshnikov +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +if (UNIX) + find_package(PkgConfig) + if (PKG_CONFIG_FOUND) + pkg_check_modules(_CAIRO cairo) + endif (PKG_CONFIG_FOUND) +endif (UNIX) + +SET(_CAIRO_ROOT_HINTS + $ENV{CAIRO} + ${CAIRO_ROOT_DIR} + ) +SET(_CAIRO_ROOT_PATHS + $ENV{CAIRO}/src + /usr + /usr/local + ) +SET(_CAIRO_ROOT_HINTS_AND_PATHS + HINTS ${_CAIRO_ROOT_HINTS} + PATHS ${_CAIRO_ROOT_PATHS} + ) + +FIND_PATH(CAIRO_INCLUDE_DIR + NAMES + cairo.h + HINTS + ${_CAIRO_INCLUDEDIR} + ${_CAIRO_ROOT_HINTS_AND_PATHS} + PATH_SUFFIXES + include + "include/cairo" +) + +IF(WIN32 AND NOT CYGWIN) + # MINGW should go here too + IF(MSVC) + # Implementation details: + # We are using the libraries located in the VC subdir instead of the parent directory eventhough : + FIND_LIBRARY(CAIRO_DEBUG + NAMES + cairod + ${_CAIRO_ROOT_HINTS_AND_PATHS} + PATH_SUFFIXES + "lib" + "VC" + "lib/VC" + ) + + FIND_LIBRARY(CAIRO_RELEASE + NAMES + cairo + ${_CAIRO_ROOT_HINTS_AND_PATHS} + PATH_SUFFIXES + "lib" + "VC" + "lib/VC" + ) + + if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) + if(NOT CAIRO_DEBUG) + set(CAIRO_DEBUG ${CAIRO_RELEASE}) + endif(NOT CAIRO_DEBUG) + set( CAIRO_LIBRARIES + optimized ${CAIRO_RELEASE} debug ${CAIRO_DEBUG} + ) + else() + set( CAIRO_LIBRARIES ${CAIRO_RELEASE}) + endif() + MARK_AS_ADVANCED(CAIRO_DEBUG CAIRO_RELEASE) + ELSEIF(MINGW) + # same player, for MingW + FIND_LIBRARY(CAIRO + NAMES + cairo + ${_CAIRO_ROOT_HINTS_AND_PATHS} + PATH_SUFFIXES + "lib" + "lib/MinGW" + ) + + MARK_AS_ADVANCED(CAIRO) + set( CAIRO_LIBRARIES ${CAIRO}) + ELSE(MSVC) + # Not sure what to pick for -say- intel, let's use the toplevel ones and hope someone report issues: + FIND_LIBRARY(CAIRO + NAMES + cairo + HINTS + ${_CAIRO_LIBDIR} + ${_CAIRO_ROOT_HINTS_AND_PATHS} + PATH_SUFFIXES + lib + ) + + MARK_AS_ADVANCED(CAIRO) + set( CAIRO_LIBRARIES ${CAIRO} ) + ENDIF(MSVC) +ELSE(WIN32 AND NOT CYGWIN) + + FIND_LIBRARY(CAIRO_LIBRARY + NAMES + cairo + HINTS + ${_CAIRO_LIBDIR} + ${_CAIRO_ROOT_HINTS_AND_PATHS} + PATH_SUFFIXES + "lib" + "local/lib" + ) + + MARK_AS_ADVANCED(CAIRO_LIBRARY) + + # compat defines + SET(CAIRO_LIBRARIES ${CAIRO_LIBRARY}) + +ENDIF(WIN32 AND NOT CYGWIN) + + # if (CAIRO_INCLUDE_DIR) + # file(READ "${CAIRO_INCLUDE_DIR}/gcore/gdal_version.h" _wxgisgdal_VERSION_H_CONTENTS) + # string(REGEX REPLACE ".*# define[ \t]+GDAL_RELEASE_NAME[ \t]+\"([0-9A-Za-z.]+)\".*" + # "\\1" CAIRO_VERSION ${_wxgisgdal_VERSION_H_CONTENTS}) + # set(CAIRO_VERSION ${CAIRO_VERSION} CACHE INTERNAL "The version number for wxgisgdal libraries") + # endif (CAIRO_INCLUDE_DIR) + +include(FindPackageHandleStandardArgs) + +# if (CAIRO_VERSION) + # find_package_handle_standard_args(CAIRO + # REQUIRED_VARS + # CAIRO_LIBRARIES + # CAIRO_INCLUDE_DIR + # VERSION_VAR + # CAIRO_VERSION + # FAIL_MESSAGE + # "Could NOT find CAIRO, try to set the path to CAIRO root folder in the system variable CAIRO_ROOT_DIR" + # ) +# else (CAIRO_VERSION) + find_package_handle_standard_args(CAIRO "Could NOT find CAIRO, try to set the path to CAIRO root folder in the system variable CAIRO" + CAIRO_LIBRARIES + CAIRO_INCLUDE_DIR + ) +# endif (CAIRO_VERSION) + +MARK_AS_ADVANCED(CAIRO_INCLUDE_DIR CAIRO_LIBRARIES) + diff --git a/CMakeModules/FindGLEW.cmake b/CMakeModules/FindGLEW.cmake new file mode 100644 index 0000000000..5b9b814872 --- /dev/null +++ b/CMakeModules/FindGLEW.cmake @@ -0,0 +1,105 @@ +# Copyright (c) 2009 Boudewijn Rempt +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# +# - try to find glew library and include files +# GLEW_INCLUDE_DIR, where to find GL/glew.h, etc. +# GLEW_LIBRARIES, the libraries to link against +# GLEW_FOUND, If false, do not try to use GLEW. +# Also defined, but not for general use are: +# GLEW_GLEW_LIBRARY = the full path to the glew library. + +IF (WIN32) + + IF(CYGWIN) + + FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h) + + FIND_LIBRARY( GLEW_GLEW_LIBRARY glew32 + ${OPENGL_LIBRARY_DIR} + /usr/lib/w32api + /usr/X11R6/lib + ) + + + ELSE(CYGWIN) + + FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h + $ENV{GLEW_ROOT_PATH}/include + ) + + FIND_LIBRARY( GLEW_GLEW_LIBRARY + NAMES glew glew32 glew32s + PATHS + $ENV{GLEW_ROOT_PATH}/lib + ${OPENGL_LIBRARY_DIR} + ) + + ENDIF(CYGWIN) + +ELSE (WIN32) + + IF (APPLE) +# These values for Apple could probably do with improvement. + FIND_PATH( GLEW_INCLUDE_DIR glew.h + /System/Library/Frameworks/GLEW.framework/Versions/A/Headers + ${OPENGL_LIBRARY_DIR} + ) + SET(GLEW_GLEW_LIBRARY "-framework GLEW" CACHE STRING "GLEW library for OSX") + SET(GLEW_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX") + ELSE (APPLE) + + FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h + /usr/include/GL + /usr/openwin/share/include + /usr/openwin/include + /usr/X11R6/include + /usr/include/X11 + /opt/graphics/OpenGL/include + /opt/graphics/OpenGL/contrib/libglew + ) + + FIND_LIBRARY( GLEW_GLEW_LIBRARY GLEW + /usr/openwin/lib + /usr/X11R6/lib + ) + + ENDIF (APPLE) + +ENDIF (WIN32) + +SET( GLEW_FOUND "NO" ) +IF(GLEW_INCLUDE_DIR) + IF(GLEW_GLEW_LIBRARY) + # Is -lXi and -lXmu required on all platforms that have it? + # If not, we need some way to figure out what platform we are on. + SET( GLEW_LIBRARIES + ${GLEW_GLEW_LIBRARY} + ${GLEW_cocoa_LIBRARY} + ) + SET( GLEW_FOUND "YES" ) + +#The following deprecated settings are for backwards compatibility with CMake1.4 + SET (GLEW_LIBRARY ${GLEW_LIBRARIES}) + SET (GLEW_INCLUDE_PATH ${GLEW_INCLUDE_DIR}) + + ENDIF(GLEW_GLEW_LIBRARY) +ENDIF(GLEW_INCLUDE_DIR) + +IF(GLEW_FOUND) + IF(NOT GLEW_FIND_QUIETLY) + MESSAGE(STATUS "Found Glew: ${GLEW_LIBRARIES}") + ENDIF(NOT GLEW_FIND_QUIETLY) +ELSE(GLEW_FOUND) + IF(GLEW_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find Glew") + ENDIF(GLEW_FIND_REQUIRED) +ENDIF(GLEW_FOUND) + +MARK_AS_ADVANCED( + GLEW_INCLUDE_DIR + GLEW_GLEW_LIBRARY + GLEW_Xmu_LIBRARY + GLEW_Xi_LIBRARY +) From ee0fe85cd0a16ef0dcce3907d5071d3f5f07cb6b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 4 Apr 2013 14:17:40 +0200 Subject: [PATCH 014/415] Added setting active layer in PAINTER's render settings according to the PCB layer widget. --- pcbnew/class_pcb_layer_widget.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index 731d6051f4..8d5613e0b0 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -34,6 +34,7 @@ #ifdef KICAD_GAL #include #include +#include #endif #include #include @@ -342,8 +343,19 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( int aLayer ) // false from this function. myframe->setActiveLayer( aLayer, false ); +#ifdef KICAD_GAL + myframe->GetGalCanvas()->GetView()->GetPainter()->GetSettings()->SetActiveLayer( aLayer ); +#endif /* KICAD_GAL */ + if(DisplayOpt.ContrastModeDisplay) - myframe->GetCanvas()->Refresh(); + { +#ifdef KICAD_GAL + if( myframe->IsGalCanvasActive() ) + myframe->GetGalCanvas()->Refresh(); + else +#endif + myframe->GetCanvas()->Refresh(); + } return true; } From 83e693c78a727f095dff1f2606b4a898a12feee7 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 5 Apr 2013 15:10:31 +0200 Subject: [PATCH 015/415] Fixed code formatting. --- include/math/vector2d.h | 96 +++++++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 46 deletions(-) diff --git a/include/math/vector2d.h b/include/math/vector2d.h index e8f4172f9f..583043f5b5 100644 --- a/include/math/vector2d.h +++ b/include/math/vector2d.h @@ -65,8 +65,8 @@ std::ostream& operator<<( std::ostream& stream, const VECTOR2& vector ); * Class VECTOR2 * defines a general 2D-vector/point. * - * This class uses templates to be universal. Several operators are provided to help easy implementing - * of linear algebra equations. + * This class uses templates to be universal. Several operators are provided to help + * easy implementing of linear algebra equations. * */ template @@ -120,14 +120,14 @@ public: * It is used to calculate the length of the vector. * @return Scalar, the euclidean norm */ - T EuclideanNorm() const; + T EuclideanNorm() const; /** * Function Perpendicular * computes the perpendicular vector * @return Perpendicular vector */ - VECTOR2 Perpendicular() const; + VECTOR2 Perpendicular() const; /** * Function LineProjection @@ -135,7 +135,7 @@ public: * going through aA and aB points. * @return Projected point */ - VECTOR2 LineProjection( const VECTOR2& aA, const VECTOR2& aB ) const; + VECTOR2 LineProjection( const VECTOR2& aA, const VECTOR2& aB ) const; /** * Function LineSide @@ -143,7 +143,7 @@ public: * and a start aStart we are. * @return: < 0: left, 0 : on the line, > 0 : right */ - int LineSide( const VECTOR2& aStart, const VECTOR2& aEnd ) const; + int LineSide( const VECTOR2& aStart, const VECTOR2& aEnd ) const; /** * Function LineDistance @@ -153,14 +153,15 @@ public: * the side of the line at which we are (negative = left) * @return the distance */ - T LineDistance( const VECTOR2& aStart, const VECTOR2& aEnd, bool aDetermineSide = false ) const; + T LineDistance( const VECTOR2& aStart, const VECTOR2& aEnd, + bool aDetermineSide = false ) const; /** * Function ClosestSegmentPoint * returns the closest point on a line segment defined by aStart and aEnd. * @return: our point */ - VECTOR2 ClosestSegmentPoint( const VECTOR2& aStart, const VECTOR2& aEnd ) const; + VECTOR2 ClosestSegmentPoint( const VECTOR2& aStart, const VECTOR2& aEnd ) const; /** * Function Resize @@ -168,14 +169,14 @@ public: * @param aNewLength: length of the rescaled vector * @return rescaled vector */ - VECTOR2 Resize( T aNewLength ) const; + VECTOR2 Resize( T aNewLength ) const; /** * Function Angle * computes the angle of the vector * @return vector angle, in radians */ - double Angle() const; + double Angle() const; /** * Function Rotate @@ -183,70 +184,70 @@ public: * @param aAngle rotation angle in radians * @return rotated vector */ - VECTOR2 Rotate( double aAngle ) const; + VECTOR2 Rotate( double aAngle ) const; /** * Function Format * returns the vector formatted as a string * @return the formatted string */ - const std::string Format() const; + const std::string Format() const; /** * Function Cross() * computes cross product of self with aVector */ - extended_type Cross( const VECTOR2& aVector ) const; + extended_type Cross( const VECTOR2& aVector ) const; /** * Function Dot() * computes dot product of self with aVector */ - extended_type Dot( const VECTOR2& aVector ) const; + extended_type Dot( const VECTOR2& aVector ) const; // Operators /// Assignment operator - VECTOR2& operator=( const VECTOR2& aVector ); + VECTOR2& operator=( const VECTOR2& aVector ); /// Vector addition operator - VECTOR2 operator+( const VECTOR2& aVector ) const; + VECTOR2 operator+( const VECTOR2& aVector ) const; /// Compound assignment operator - VECTOR2& operator+=( const VECTOR2& aVector ); + VECTOR2& operator+=( const VECTOR2& aVector ); /// Vector subtraction operator - VECTOR2 operator-( const VECTOR2& aVector ) const; + VECTOR2 operator-( const VECTOR2& aVector ) const; /// Compound assignment operator - VECTOR2& operator-=( const VECTOR2& aVector ); + VECTOR2& operator-=( const VECTOR2& aVector ); /// Negate Vector operator - VECTOR2 operator-(); + VECTOR2 operator-(); /// Scalar product operator - extended_type operator*( const VECTOR2& aVector ) const; + extended_type operator*( const VECTOR2& aVector ) const; /// Multiplication with a factor - VECTOR2 operator*( const T& aFactor ) const; + VECTOR2 operator*( const T& aFactor ) const; /// Division with a factor - VECTOR2 operator/( const T& aFactor ) const; + VECTOR2 operator/( const T& aFactor ) const; /// Equality operator - const bool operator==( const VECTOR2& aVector ) const; + const bool operator==( const VECTOR2& aVector ) const; /// Not equality operator - const bool operator!=( const VECTOR2& aVector ) const; + const bool operator!=( const VECTOR2& aVector ) const; /// Smaller than operator - bool operator<( const VECTOR2& aVector ) const; - bool operator<=( const VECTOR2& aVector ) const; + bool operator<( const VECTOR2& aVector ) const; + bool operator<=( const VECTOR2& aVector ) const; /// Greater than operator - bool operator>( const VECTOR2& aVector ) const; - bool operator>=( const VECTOR2& aVector ) const; + bool operator>( const VECTOR2& aVector ) const; + bool operator>=( const VECTOR2& aVector ) const; friend std::ostream & operator<< ( std::ostream & stream, const VECTOR2 &vector ); }; @@ -353,13 +354,13 @@ int VECTOR2::LineSide( const VECTOR2& aStart, const VECTOR2& aEnd ) con template VECTOR2 VECTOR2::LineProjection( const VECTOR2& aA, const VECTOR2& aB ) const { - const VECTOR2 d = aB - aA; - extended_type det = (extended_type) d.x * d.x + d.y * (extended_type) d.y; - extended_type dxdy = (extended_type) d.x * d.y; - extended_type qx = + const VECTOR2 d = aB - aA; + extended_type det = (extended_type) d.x * d.x + d.y * (extended_type) d.y; + extended_type dxdy = (extended_type) d.x * d.y; + extended_type qx = ( (extended_type) aA.x * d.y * d.y + (extended_type) d.x * d.x * x - dxdy * (aA.y - y) ) / det; - extended_type qy = + extended_type qy = ( (extended_type) aA.y * d.x * d.x + (extended_type) d.y * d.y * y - dxdy * (aA.x - x) ) / det; @@ -368,21 +369,23 @@ VECTOR2 VECTOR2::LineProjection( const VECTOR2& aA, const VECTOR2& a template -T VECTOR2::LineDistance( const VECTOR2& aStart, const VECTOR2& aEnd, bool aDetermineSide ) const +T VECTOR2::LineDistance( const VECTOR2& aStart, const VECTOR2& aEnd, + bool aDetermineSide ) const { extended_type a = aStart.y - aEnd.y; extended_type b = aEnd.x - aStart.x; extended_type c = -a * aStart.x - b * aStart.y; T dist = ( a * x + b * y + c ) / sqrt( a * a + b * b ); - return aDetermineSide ? dist : abs(dist); + return aDetermineSide ? dist : abs( dist ); } template -VECTOR2 VECTOR2::ClosestSegmentPoint( const VECTOR2& aStart, const VECTOR2& aEnd ) const +VECTOR2 VECTOR2::ClosestSegmentPoint( const VECTOR2& aStart, + const VECTOR2& aEnd ) const { - VECTOR2 d = (aEnd - aStart); + VECTOR2 d = (aEnd - aStart); extended_type l_squared = (extended_type) d.x * d.x + (extended_type) d.y * d.y; @@ -410,7 +413,7 @@ VECTOR2 VECTOR2::ClosestSegmentPoint( const VECTOR2& aStart, const VECT /*VECTOR2 proj = aStart + VECTOR2 ( ( t * (extended_type) d.x / l_squared ), ( t * ( extended_type) d.y / l_squared ) );*/ - VECTOR2 proj = aStart + VECTOR2 ( (T)xp, (T) yp ); + VECTOR2 proj = aStart + VECTOR2 ( (T) xp, (T) yp ); return proj; } @@ -423,7 +426,7 @@ VECTOR2 VECTOR2::Rotate( double aAngle ) const double ca = cos( aAngle ); return VECTOR2 ( T( (double) x * ca - (double) y * sa ), - T( (double) x * sa + (double) y * ca ) ); + T( (double) x * sa + (double) y * ca ) ); } @@ -507,7 +510,7 @@ VECTOR2 operator*( const T& aFactor, const VECTOR2& aVector ) template typename VECTOR2::extended_type VECTOR2::Cross( const VECTOR2& aVector ) const { - return (extended_type) x * (extended_type) aVector.y - + return (extended_type) x * (extended_type) aVector.y - (extended_type) y * (extended_type) aVector.x; } @@ -515,7 +518,7 @@ typename VECTOR2::extended_type VECTOR2::Cross( const VECTOR2& aVector template typename VECTOR2::extended_type VECTOR2::Dot( const VECTOR2& aVector ) const { - return (extended_type) x * (extended_type) aVector.x + + return (extended_type) x * (extended_type) aVector.x + (extended_type) y * (extended_type) aVector.y; } @@ -612,13 +615,14 @@ std::ostream& operator<<( std::ostream& aStream, const VECTOR2& aVector ) return aStream; } + /* Default specializations */ -typedef VECTOR2 VECTOR2D; -typedef VECTOR2 VECTOR2I; +typedef VECTOR2 VECTOR2D; +typedef VECTOR2 VECTOR2I; /* Compatibility typedefs */ // FIXME should be removed to avoid multiple typedefs for the same type -typedef VECTOR2 DPOINT; -typedef DPOINT DSIZE; +typedef VECTOR2 DPOINT; +typedef DPOINT DSIZE; #endif // VECTOR2D_H_ From 221cb6d5b2c872fcd882183c88a3861301bda9ce Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 5 Apr 2013 15:10:58 +0200 Subject: [PATCH 016/415] Fixed bug of displaying stroked rectangles on wrong layer depth. --- common/gal/opengl/opengl_gal.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 853c69d5d4..33ef29e86e 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -819,10 +819,6 @@ void OPENGL_GAL::DrawRectangle( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) selectShader( -1 ); - glPushMatrix(); - - glTranslated( 0, 0, layerDepth ); - // Stroke the outline if( isStrokeEnabled ) { @@ -841,15 +837,13 @@ void OPENGL_GAL::DrawRectangle( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) { glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); glBegin( GL_QUADS ); - glVertex2d( aStartPoint.x, aStartPoint.y ); - glVertex2d( diagonalPointA.x, diagonalPointA.y ); - glVertex2d( aEndPoint.x, aEndPoint.y ); - glVertex2d( diagonalPointB.x, diagonalPointB.y ); + glVertex3d( aStartPoint.x, aStartPoint.y, layerDepth ); + glVertex3d( diagonalPointA.x, diagonalPointA.y, layerDepth ); + glVertex3d( aEndPoint.x, aEndPoint.y, layerDepth ); + glVertex3d( diagonalPointB.x, diagonalPointB.y, layerDepth ); glEnd(); } - glPopMatrix(); - // Restore the stroke color glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); } From d1695d340827882abb1b3c8a3a1fdebd1e27423c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 8 Apr 2013 10:50:47 +0200 Subject: [PATCH 017/415] Added high contrast display mode using GAL rendering. New methods in VIEW class: SetTopLayer(), EnableTopLayer() for managing the top layer display. New method in PCB_RENDER_SETTINGS class: LoadDisplayOptions() for applying display settings like high-contrast, outline display of items, etc. --- common/view/view.cpp | 56 +++++++++++++++++++++++ include/view/view.h | 24 ++++++++++ pcbnew/basepcbframe.cpp | 2 + pcbnew/class_pcb_layer_widget.cpp | 7 ++- pcbnew/dialogs/dialog_general_options.cpp | 23 +++++++++- pcbnew/pcb_painter.cpp | 17 +++++-- pcbnew/pcb_painter.h | 10 ++++ 7 files changed, 131 insertions(+), 8 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 79ea771df2..51b3e18dea 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -37,7 +37,9 @@ using namespace KiGfx; +// Static constants const unsigned int VIEW::VIEW_MAX_LAYERS = 64; +const int VIEW::TOP_LAYER = -1; void VIEW::AddLayer( int aLayer, bool aDisplayOnly ) { @@ -134,12 +136,15 @@ int VIEW::Query( const BOX2I& aRect, std::vector& aResult ) VIEW::VIEW( bool aIsDynamic, bool aUseGroups ) : + m_enableTopLayer( false ), m_scale ( 1.0 ), m_painter( NULL ), m_gal( NULL ), m_dynamic( aIsDynamic ), m_useGroups( aUseGroups ) { + // By default there is not layer on the top + m_topLayer.enabled = false; } @@ -292,6 +297,57 @@ void VIEW::SetLayerOrder( int aLayer, int aRenderingOrder ) } +void VIEW::SetTopLayer( int aLayer ) +{ + // Restore previous order + if( m_topLayer.enabled ) + m_layers[m_topLayer.id].renderingOrder = m_topLayer.renderingOrder; + + if( aLayer >= 0 && aLayer < VIEW_MAX_LAYERS ) + { + // Save settings, so it can be restored later + m_topLayer.renderingOrder = m_layers[aLayer].renderingOrder; + m_topLayer.id = m_layers[aLayer].id; + + // Apply new settings only if the option is enabled + if( m_enableTopLayer ) + m_layers[aLayer].renderingOrder = TOP_LAYER; + + // Set the flag saying that settings stored in m_topLayer are valid + m_topLayer.enabled = true; + } + else + { + // There are no valid settings in m_topLayer + m_topLayer.enabled = false; + } + + sortLayers(); +} + + +void VIEW::EnableTopLayer( bool aEnable ) +{ + if( aEnable == m_enableTopLayer ) return; + + // Use stored settings only if applicable + // (topLayer.enabled == false means there are no valid settings stored) + if( m_topLayer.enabled ) + { + if( aEnable ) + { + m_layers[m_topLayer.id].renderingOrder = TOP_LAYER; + } + else + { + m_layers[m_topLayer.id].renderingOrder = m_topLayer.renderingOrder; + } + } + + m_enableTopLayer = aEnable; +} + + struct VIEW::drawItem { drawItem( VIEW* aView, int aCurrentLayer ) : diff --git a/include/view/view.h b/include/view/view.h index ef89d8ee6a..8f25f45081 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -264,6 +264,23 @@ public: */ void SetLayerOrder( int aLayer, int aRenderingOrder ); + /** + * Function SetTopLayer() + * Sets given layer to be displayed on the top or sets back the default order of layers. + * @param aLayer: the layer or -1 in case when no particular layer should + * be displayed on the top. + */ + void SetTopLayer( int aLayer ); + + /** + * Function EnableTopLayer() + * Enables or disables display of the top layer. When disabled - layers are rendered as usual + * with no influence from SetTopLayer function. Otherwise on the top there is displayed the + * layer set previously with SetTopLayer function. + * @param aEnabled: whether to enable or disable display of the top layer. + */ + void EnableTopLayer( bool aEnable ); + /** * Function Redraw() * Immediately redraws the whole view. @@ -285,6 +302,7 @@ public: bool IsDynamic() const { return m_dynamic; } static const unsigned int VIEW_MAX_LAYERS; ///* maximum number of layers that may be shown + static const int TOP_LAYER; ///* layer number for displaying items on the top private: @@ -312,6 +330,12 @@ private: struct unlinkItem; struct drawItem; + ///* Saves current top layer settings in order to restore it when it's not top anymore + VIEW_LAYER m_topLayer; + + ///* Whether to use top layer settings or not + bool m_enableTopLayer; + ///* Redraws contents within rect aRect void redrawRect( const BOX2I& aRect ); diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 04a5686eeb..c565c2cc72 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -237,6 +237,8 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) { view->SetLayerVisible( ITEM_GAL_LAYER( i ), m_Pcb->IsElementVisible( i ) ); } + + view->SetTopLayer( m_Pcb->GetLayer() ); } #endif } diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index 8d5613e0b0..6e3295b4a6 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -344,7 +344,10 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( int aLayer ) myframe->setActiveLayer( aLayer, false ); #ifdef KICAD_GAL - myframe->GetGalCanvas()->GetView()->GetPainter()->GetSettings()->SetActiveLayer( aLayer ); + // Set display settings for high contrast mode + KiGfx::VIEW* view = myframe->GetGalCanvas()->GetView(); + view->GetPainter()->GetSettings()->SetActiveLayer( aLayer ); + view->SetTopLayer( aLayer ); #endif /* KICAD_GAL */ if(DisplayOpt.ContrastModeDisplay) @@ -353,7 +356,7 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( int aLayer ) if( myframe->IsGalCanvasActive() ) myframe->GetGalCanvas()->Refresh(); else -#endif +#endif /* KICAD_GAL */ myframe->GetCanvas()->Refresh(); } diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index 329c9fae3d..129f10b1cb 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -42,7 +42,11 @@ #include #include - +#ifdef KICAD_GAL +#include +#include +#include +#endif /* KICAD_GAL */ DIALOG_GENERALOPTIONS::DIALOG_GENERALOPTIONS( PCB_EDIT_FRAME* parent ) : DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE( parent ) @@ -217,6 +221,9 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) case ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE: DisplayOpt.ContrastModeDisplay = state; +#ifdef KICAD_GAL + m_galCanvas->GetView()->EnableTopLayer( state ); +#endif /* KICAD_GAL */ m_canvas->Refresh(); break; @@ -242,4 +249,18 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) wxT( "PCB_EDIT_FRAME::OnSelectOptionToolbar error \n (event not handled!)" ) ); break; } + +#ifdef KICAD_GAL + // Apply new display options to the GAL canvas + KiGfx::PCB_PAINTER* painter = + static_cast ( m_galCanvas->GetView()->GetPainter() ); + KiGfx::PCB_RENDER_SETTINGS* settings = + static_cast ( painter->GetSettings() ); + settings->LoadDisplayOptions( DisplayOpt ); + + if( IsGalCanvasActive() ) + { + m_galCanvas->Refresh(); + } +#endif } diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index a9eea19e46..6d62b11492 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -69,6 +70,12 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings } +void PCB_RENDER_SETTINGS::LoadDisplayOptions( const DISPLAY_OPTIONS& aOptions ) +{ + m_hiContrastEnabled = aOptions.ContrastModeDisplay; +} + + void PCB_RENDER_SETTINGS::Update() { // Calculate darkened/highlighted variants of layer colors @@ -88,7 +95,7 @@ void PCB_RENDER_SETTINGS::Update() m_itemColorsSel[i] = m_itemColors[i].Highlighted( m_selectFactor ); } - m_hiContrastColor = COLOR4D( m_hiContrastFactor, m_hiContrastFactor, m_highlightFactor, + m_hiContrastColor = COLOR4D( m_hiContrastFactor, m_hiContrastFactor, m_hiContrastFactor, m_layerOpacity ); } @@ -101,10 +108,6 @@ PCB_PAINTER::PCB_PAINTER( GAL* aGal ) : const COLOR4D& PCB_PAINTER::getLayerColor( int aLayer, int aNetCode ) const { - // For item layers (vias, texts, and so on) - if( aLayer >= LAYER_COUNT ) - return getItemColor( aLayer - LAYER_COUNT, aNetCode ); - if( m_pcbSettings->m_hiContrastEnabled && m_pcbSettings->m_activeLayer != aLayer ) { return m_pcbSettings->m_hiContrastColor; @@ -122,6 +125,10 @@ const COLOR4D& PCB_PAINTER::getLayerColor( int aLayer, int aNetCode ) const } else { + // For item layers (vias, texts, and so on) + if( aLayer >= LAYER_COUNT ) + return getItemColor( aLayer - LAYER_COUNT, aNetCode ); + return m_pcbSettings->m_layerColors[aLayer]; } } diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 537fae5e63..d66f3c6ed4 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -33,6 +33,8 @@ class EDA_ITEM; class COLORS_DESIGN_SETTINGS; +class DISPLAY_OPTIONS; + class BOARD_ITEM; class BOARD; class SEGVIA; @@ -76,6 +78,14 @@ public: /// @copydoc RENDER_SETTINGS::ImportLegacyColors() void ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings ); + /** + * Function LoadDisplayOptions + * Loads settings related to display options (high-contrast mode, full or outline modes + * for vias/pads/tracks and so on). + * @param aOptions are settings that you want to use for displaying items. + */ + void LoadDisplayOptions( const DISPLAY_OPTIONS& aOptions ); + protected: /// Colors for all layers (including special, highlighted & darkened versions) From 56ad7642c95ea844deab2454132e9b090573f53a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 8 Apr 2013 10:54:31 +0200 Subject: [PATCH 018/415] Added outline display mode for pads, vias & tracks --- common/painter.cpp | 1 + include/painter.h | 1 + pcbnew/basepcbframe.cpp | 26 +++++-- pcbnew/pcb_painter.cpp | 149 ++++++++++++++++++++++++++++++++-------- 4 files changed, 143 insertions(+), 34 deletions(-) diff --git a/common/painter.cpp b/common/painter.cpp index 75986a04a3..fcbadc4df3 100644 --- a/common/painter.cpp +++ b/common/painter.cpp @@ -43,6 +43,7 @@ RENDER_SETTINGS::RENDER_SETTINGS() m_hiContrastEnabled = false; m_hiContrastFactor = 0.2; m_activeLayer = 0; + m_outlineWidth = 60000; // Store the predefined colors used in KiCad in format used by GAL for( int i = 0; i < NBCOLOR; i++ ) diff --git a/include/painter.h b/include/painter.h index 0a3cb1d6b5..a90c8026c5 100644 --- a/include/painter.h +++ b/include/painter.h @@ -132,6 +132,7 @@ protected: float m_selectFactor; /// Specifies how color of selected items is changed float m_layerOpacity; /// Determines opacity of all layers, so every can be seen /// at the same time + float m_outlineWidth; /// Line width used when drawing outlines /// Map of colors that were usually used for display std::map m_legacyColorMap; diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index c565c2cc72..165f6644ab 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -211,14 +211,17 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) view->Add( zone ); } - // Apply layer coloring scheme + // Apply layer coloring scheme & display options if( view->GetPainter() ) { - KiGfx::PCB_RENDER_SETTINGS* colorSettings = new KiGfx::PCB_RENDER_SETTINGS(); + KiGfx::PCB_RENDER_SETTINGS* settings = new KiGfx::PCB_RENDER_SETTINGS(); // Load layers' colors from PCB data - colorSettings->ImportLegacyColors( m_Pcb->GetColorsSettings() ); - view->GetPainter()->ApplySettings( colorSettings ); + settings->ImportLegacyColors( m_Pcb->GetColorsSettings() ); + view->GetPainter()->ApplySettings( settings ); + + // Load display options (such as filled/outline display of items) + settings->LoadDisplayOptions( DisplayOpt ); } // Set rendering order of layers (check m_galLayerOrder to see the order) @@ -489,7 +492,20 @@ void PCB_BASE_FRAME::OnTogglePolarCoords( wxCommandEvent& aEvent ) void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent ) { m_DisplayPadFill = DisplayOpt.DisplayPadFill = !m_DisplayPadFill; - m_canvas->Refresh(); + +#ifdef KICAD_GAL + // Apply new display options to the GAL canvas + KiGfx::PCB_PAINTER* painter = + static_cast ( m_galCanvas->GetView()->GetPainter() ); + KiGfx::PCB_RENDER_SETTINGS* settings = + static_cast ( painter->GetSettings() ); + settings->LoadDisplayOptions( DisplayOpt ); + + if( IsGalCanvasActive() ) + m_galCanvas->Refresh(); + else +#endif + m_canvas->Refresh(); } diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 6d62b11492..3f37e26d6e 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -45,6 +45,12 @@ using namespace KiGfx; PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS() { + // By default everything should be displayed as filled + for( unsigned int i = 0; i < END_PCB_VISIBLE_LIST; ++i ) + { + m_sketchModeSelect[i] = false; + } + Update(); } @@ -61,10 +67,10 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings m_itemColors[i] = m_legacyColorMap[aSettings->GetItemColor( i )]; } - m_itemColors[VIA_HOLES_VISIBLE] = COLOR4D( 0.5f, 0.4f, 0.0f, 1.0f ); - m_itemColors[PAD_HOLES_VISIBLE] = COLOR4D( 0.0f, 0.5f, 0.5f, 1.0f ); - m_itemColors[VIAS_VISIBLE] = COLOR4D( 0.7f, 0.7f, 0.7f, 1.0f ); - m_itemColors[PADS_VISIBLE] = COLOR4D( 0.7f, 0.7f, 0.7f, 1.0f ); + m_itemColors[VIA_HOLES_VISIBLE] = COLOR4D( 0.5, 0.4, 0.0, 1.0 ); + m_itemColors[PAD_HOLES_VISIBLE] = COLOR4D( 0.0, 0.5, 0.5, 1.0 ); + m_itemColors[VIAS_VISIBLE] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); + m_itemColors[PADS_VISIBLE] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); Update(); } @@ -73,6 +79,11 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings void PCB_RENDER_SETTINGS::LoadDisplayOptions( const DISPLAY_OPTIONS& aOptions ) { m_hiContrastEnabled = aOptions.ContrastModeDisplay; + + // Whether to draw tracks, vias & pads filled or as outlines + m_sketchModeSelect[PADS_VISIBLE] = !aOptions.DisplayPadFill; + m_sketchModeSelect[VIAS_VISIBLE] = !aOptions.DisplayViaFill; + m_sketchModeSelect[TRACKS_VISIBLE] = !aOptions.DisplayPcbTrackFill; } @@ -217,9 +228,38 @@ void PCB_PAINTER::draw( const TRACK* aTrack ) m_gal->SetLineCap( LINE_CAP_ROUND ); m_gal->SetLineJoin( LINE_JOIN_ROUND ); - m_gal->SetLineWidth( aTrack->GetWidth() ); m_gal->SetStrokeColor( strokeColor ); - m_gal->DrawLine( start, end ); + if( m_pcbSettings->m_sketchModeSelect[TRACKS_VISIBLE] ) + { + // Outline mode + VECTOR2D line = end - start; + double length = line.EuclideanNorm(); + int width = aTrack->GetWidth(); + + m_gal->SetLineWidth( m_pcbSettings->m_outlineWidth ); + m_gal->SetIsFill( false ); + m_gal->SetIsStroke( true ); + m_gal->Save(); + + m_gal->Translate( start ); + m_gal->Rotate( line.Angle() ); + m_gal->DrawLine( VECTOR2D( 0, width / 2 ), + VECTOR2D( length, width / 2 ) ); + m_gal->DrawLine( VECTOR2D( 0, -width / 2 ), + VECTOR2D( length, -width / 2 ) ); + m_gal->DrawArc( VECTOR2D( 0, 0 ), width / 2, M_PI / 2, 3 * M_PI / 2 ); + m_gal->DrawArc( VECTOR2D( length, 0 ), width / 2, M_PI / 2, -M_PI / 2 ); + + m_gal->Restore(); + } + else + { + // Filled mode + m_gal->SetIsFill( true ); + m_gal->SetIsStroke( false ); + m_gal->SetLineWidth( aTrack->GetWidth() ); + m_gal->DrawLine( start, end ); + } } @@ -227,36 +267,69 @@ void PCB_PAINTER::draw( const SEGVIA* aVia, int aLayer ) { VECTOR2D center( aVia->GetStart() ); double radius; - COLOR4D fillColor; + COLOR4D color; // Choose drawing settings depending on if we are drawing via's pad or hole if( aLayer == ITEM_GAL_LAYER( VIAS_VISIBLE ) ) { - radius = aVia->GetWidth() / 2.0f; + radius = aVia->GetWidth() / 2.0; } else if( aLayer == ITEM_GAL_LAYER( VIA_HOLES_VISIBLE ) ) { - radius = aVia->GetDrillValue() / 2.0f; + radius = aVia->GetDrillValue() / 2.0; } else return; - fillColor = getLayerColor( aLayer, aVia->GetNet() ); + color = getLayerColor( aLayer, aVia->GetNet() ); - m_gal->SetIsStroke( false ); - m_gal->SetIsFill( true ); - m_gal->SetFillColor( fillColor ); - m_gal->DrawCircle( center, radius ); + if( m_pcbSettings->m_sketchModeSelect[VIAS_VISIBLE] ) + { + // Outline mode + m_gal->SetIsFill( false ); + m_gal->SetIsStroke( true ); + m_gal->SetLineWidth( m_pcbSettings->m_outlineWidth ); + m_gal->SetStrokeColor( color ); + m_gal->DrawCircle( center, radius ); + } + else + { + // Filled mode + m_gal->SetIsFill( true ); + m_gal->SetIsStroke( false ); + m_gal->SetFillColor( color ); + m_gal->DrawCircle( center, radius ); + } } void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) { - COLOR4D fillColor; + COLOR4D color; VECTOR2D size; PAD_SHAPE_T shape; double m, n; + color = getLayerColor( aLayer, aPad->GetNet() ); + + if( m_pcbSettings->m_sketchModeSelect[PADS_VISIBLE] ) + { + // Outline mode + m_gal->SetIsFill( false ); + m_gal->SetIsStroke( true ); + m_gal->SetLineCap( LINE_CAP_ROUND ); + m_gal->SetLineJoin( LINE_JOIN_MITER ); + m_gal->SetLineWidth( m_pcbSettings->m_outlineWidth ); + m_gal->SetStrokeColor( color ); + } + else + { + // Filled mode + m_gal->SetIsFill( true ); + m_gal->SetIsStroke( false ); + m_gal->SetFillColor( color ); + } + m_gal->Save(); m_gal->Translate( VECTOR2D( aPad->GetPosition() ) ); m_gal->Rotate( -aPad->GetOrientation() * M_PI / 1800.0 ); // orientation is in tenths of degree @@ -265,23 +338,17 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) if( aLayer == ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ) ) { // Drawing hole - size = VECTOR2D( aPad->GetDrillSize() ) / 2.0f; + size = VECTOR2D( aPad->GetDrillSize() ) / 2.0; shape = aPad->GetDrillShape(); } else { // Drawing every kind of pad m_gal->Translate( VECTOR2D( aPad->GetOffset() ) ); - size = VECTOR2D( aPad->GetSize() ) / 2.0f; + size = VECTOR2D( aPad->GetSize() ) / 2.0; shape = aPad->GetShape(); } - fillColor = getLayerColor( aLayer, aPad->GetNet() ); - - m_gal->SetIsFill( true ); - m_gal->SetIsStroke( false ); - m_gal->SetFillColor( fillColor ); - switch( shape ) { case PAD_OVAL: @@ -290,18 +357,42 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) m = ( size.y - size.x ); n = size.x; - m_gal->DrawCircle( VECTOR2D( 0, -m ), n ); - m_gal->DrawCircle( VECTOR2D( 0, m ), n ); - m_gal->DrawRectangle( VECTOR2D( -n, -m ), VECTOR2D( n, m ) ); + if( m_pcbSettings->m_sketchModeSelect[PADS_VISIBLE] ) + { + // Outline mode + m_gal->DrawArc( VECTOR2D( 0, -m ), n, -M_PI, 0 ); + m_gal->DrawArc( VECTOR2D( 0, m ), n, M_PI, 0 ); + m_gal->DrawLine( VECTOR2D( -n, -m ), VECTOR2D( -n, m ) ); + m_gal->DrawLine( VECTOR2D( n, -m ), VECTOR2D( n, m ) ); + } + else + { + // Filled mode + m_gal->DrawCircle( VECTOR2D( 0, -m ), n ); + m_gal->DrawCircle( VECTOR2D( 0, m ), n ); + m_gal->DrawRectangle( VECTOR2D( -n, -m ), VECTOR2D( n, m ) ); + } } else { m = ( size.x - size.y ); n = size.y; - m_gal->DrawCircle( VECTOR2D( -m, 0 ), n ); - m_gal->DrawCircle( VECTOR2D( m, 0 ), n ); - m_gal->DrawRectangle( VECTOR2D( -m, -n ), VECTOR2D( m, n ) ); + if( m_pcbSettings->m_sketchModeSelect[PADS_VISIBLE] ) + { + // Outline mode + m_gal->DrawArc( VECTOR2D( -m, 0 ), n, M_PI / 2, 3 * M_PI / 2 ); + m_gal->DrawArc( VECTOR2D( m, 0 ), n, M_PI / 2, -M_PI / 2 ); + m_gal->DrawLine( VECTOR2D( -m, -n ), VECTOR2D( m, -n ) ); + m_gal->DrawLine( VECTOR2D( -m, n ), VECTOR2D( m, n ) ); + } + else + { + // Filled mode + m_gal->DrawCircle( VECTOR2D( -m, 0 ), n ); + m_gal->DrawCircle( VECTOR2D( m, 0 ), n ); + m_gal->DrawRectangle( VECTOR2D( -m, -n ), VECTOR2D( m, n ) ); + } } break; From cadcc20ea631012978d1ca3cc82f46ecebe5b4a4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 8 Apr 2013 11:01:49 +0200 Subject: [PATCH 019/415] Fixed distorted polygons' corner display --- pcbnew/pcb_painter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 3f37e26d6e..2eea8002e0 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -500,7 +500,7 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aContainer ) std::vector polyPoints = aContainer->GetFilledPolysList(); std::deque corners; - m_gal->SetLineCap( LINE_CAP_ROUND ); + m_gal->SetLineCap( LINE_CAP_BUTT ); m_gal->SetLineJoin( LINE_JOIN_ROUND ); m_gal->SetFillColor( fillColor ); m_gal->SetStrokeColor( fillColor ); From 157cbc2f6822db693e880635aeb6a70fed9679eb Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 9 Apr 2013 16:12:16 +0200 Subject: [PATCH 020/415] Fixed drawing of circles in certain circumstances using OpenGL. --- common/gal/opengl/opengl_gal.cpp | 130 +++++++++++-------------------- 1 file changed, 46 insertions(+), 84 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 33ef29e86e..e3c3850999 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -437,6 +437,7 @@ inline void OPENGL_GAL::selectShader( int aIndex ) } } + void OPENGL_GAL::drawRoundedSegment( VECTOR2D aStartPoint, VECTOR2D aEndPoint, double aWidth, bool aStroke, bool aGlBegin ) { @@ -863,99 +864,56 @@ void OPENGL_GAL::DrawCircle( VECTOR2D aCenterPoint, double aRadius ) return; } - switch( m_drawMode ) - { // Draw the middle of the circle (not anti-aliased) - case DRAW_MODE_NORMAL: + // Compute the factors for the unit circle + double outerScale = lineWidth / aRadius / 2; + double innerScale = -outerScale; + outerScale += 1.0; + innerScale += 1.0; + + if( isUseShader ) { - // Compute the factors for the unit circle - double outerScale = lineWidth / aRadius / 2; - double innerScale = -outerScale; - outerScale += 1.0; - innerScale += 1.0; + innerScale *= 1.0 / cos( M_PI / CIRCLE_POINTS ); + } - if( isUseShader ) + if( isStrokeEnabled ) + { + if( innerScale < outerScale ) { - innerScale *= 1.0 / cos( M_PI / CIRCLE_POINTS ); - } - - if( isStrokeEnabled ) - { - if( innerScale < outerScale ) - { - // Draw the outline - glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); - - glPushMatrix(); - - glTranslated( aCenterPoint.x, aCenterPoint.y, 0.0 ); - glScaled( aRadius, aRadius, 1.0 ); - - glBegin( GL_QUAD_STRIP ); - for( std::deque::const_iterator it = unitCirclePoints.begin(); - it != unitCirclePoints.end(); it++ ) - { - glVertex3d( it->x * innerScale, it->y * innerScale, layerDepth ); - glVertex3d( it->x * outerScale, it->y * outerScale, layerDepth ); - } - glEnd(); - - glPopMatrix(); - } - } - - // Filled circles are easy to draw by using the stored display list, scaling and translating - if( isFillEnabled ) - { - glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + // Draw the outline + glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); glPushMatrix(); - glTranslated( aCenterPoint.x, aCenterPoint.y, layerDepth ); + glTranslated( aCenterPoint.x, aCenterPoint.y, 0.0 ); glScaled( aRadius, aRadius, 1.0 ); - glBegin( GL_TRIANGLE_FAN ); - glVertex3d( 0, 0, 0 ); - glCallList( displayListCircle ); + glBegin( GL_QUAD_STRIP ); + for( std::deque::const_iterator it = unitCirclePoints.begin(); + it != unitCirclePoints.end(); it++ ) + { + glVertex3d( it->x * innerScale, it->y * innerScale, layerDepth ); + glVertex3d( it->x * outerScale, it->y * outerScale, layerDepth ); + } glEnd(); glPopMatrix(); } - - glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); } - break; - // Prepare / draw anti-aliased edges - case DRAW_MODE_PREPARE_EDGES: - case DRAW_MODE_DRAW_EDGES: - if( isUseShader ) - { - // Set the color - // Now we enable the shader program for the circle - // the shader requires the screen size as uniform argument - shaderList[0].Use(); - shaderList[0].SetParameter( 0, screenSize.x / 2 ); - shaderList[0].SetParameter( 1, screenSize.y / 2 ); - glBegin( GL_LINES ); - if( isStrokeEnabled ) - { - glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); - glVertex3d( aCenterPoint.x, aCenterPoint.y, layerDepth ); - glVertex3d( aRadius - lineWidth / 2, aRadius + lineWidth / 2, 0 ); - } - else - { - glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - glVertex3d( aCenterPoint.x, aCenterPoint.y, layerDepth ); - glVertex3d( 0, aRadius, 0 ); - } - glEnd(); - shaderList[0].Deactivate(); - } - break; - default: - break; + // Filled circles are easy to draw by using the stored display list, scaling and translating + if( isFillEnabled ) + { + glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + + glPushMatrix(); + + glTranslated( aCenterPoint.x, aCenterPoint.y, layerDepth ); + glScaled( aRadius, aRadius, 1.0 ); + + glCallList( displayListCircle ); + + glPopMatrix(); } } @@ -970,9 +928,7 @@ void OPENGL_GAL::drawSemiCircle( VECTOR2D aCenterPoint, double aRadius, double a glScaled( aRadius, aRadius, 1.0 ); glRotated( aAngle * 360.0 / ( 2 * M_PI ), 0, 0, 1 ); - glBegin( GL_TRIANGLE_FAN ); glCallList( displayListSemiCircle ); - glEnd(); glPopMatrix(); } @@ -1362,15 +1318,18 @@ void OPENGL_GAL::computeUnitCircle() displayListCircle = glGenLists( 1 ); glNewList( displayListCircle, GL_COMPILE ); + glBegin( GL_TRIANGLE_FAN ); + glVertex2d( 0, 0 ); // Compute the circle points for a given number of segments // Insert in a display list and a vector for( int i = 0; i < CIRCLE_POINTS + 1; i++ ) { - double valueX = cos( 2 * M_PI / CIRCLE_POINTS * i ); - double valueY = sin( 2 * M_PI / CIRCLE_POINTS * i ); - glVertex3d( valueX, valueY, 0 ); + double valueX = cos( 2.0 * M_PI / CIRCLE_POINTS * i ); + double valueY = sin( 2.0 * M_PI / CIRCLE_POINTS * i ); + glVertex2d( valueX, valueY ); unitCirclePoints.push_back( VECTOR2D( valueX, valueY ) ); } + glEnd(); glEndList(); } @@ -1381,10 +1340,13 @@ void OPENGL_GAL::computeUnitSemiCircle() displayListSemiCircle = glGenLists( 1 ); glNewList( displayListSemiCircle, GL_COMPILE ); + glBegin( GL_TRIANGLE_FAN ); + glVertex2d( 0, 0 ); for( int i = 0; i < CIRCLE_POINTS / 2 + 1; i++ ) { - glVertex3d( cos( 2 * M_PI / CIRCLE_POINTS * i ), sin( 2 * M_PI / CIRCLE_POINTS * i ), 0 ); + glVertex2d( cos( 2.0 * M_PI / CIRCLE_POINTS * i ), sin( 2.0 * M_PI / CIRCLE_POINTS * i ) ); } + glEnd(); glEndList(); } From 10d8275962ed3eb70ae5ac52b38b8d1ece3964f0 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 9 Apr 2013 16:12:17 +0200 Subject: [PATCH 021/415] Fixed line style used for displaying texts. --- common/gal/stroke_font.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp index a82021dc30..8c22dcdda4 100644 --- a/common/gal/stroke_font.cpp +++ b/common/gal/stroke_font.cpp @@ -213,6 +213,9 @@ void STROKE_FONT::Draw( std::string aText, VECTOR2D aPosition, double aRotationA double scaleY = m_scaleFactor * m_glyphSize.y; double scaleX = m_scaleFactor * glyphSizeX; + m_gal->SetLineCap( LINE_CAP_ROUND ); + m_gal->SetLineJoin( LINE_JOIN_ROUND ); + if( m_bold ) { m_gal->SetLineWidth( m_gal->GetLineWidth() * 1.3 ); From 4e0d54fe2131954821ee4ad81a06a8ab5a5ea68a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 9 Apr 2013 16:12:18 +0200 Subject: [PATCH 022/415] Modified CMakeLists.txt in order to compile Kicad with KICAD_GAL=ON for Windows Added settings that allow to use M cross environment (http://mxe.cc) to crosscompile Kicad for Windows. --- common/CMakeLists.txt | 4 ++++ cvpcb/CMakeLists.txt | 16 ++++++++++++++-- pcbnew/CMakeLists.txt | 16 ++++++++++++++-- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 8c320220bd..77904ee9ee 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -25,6 +25,10 @@ set(GAL_SRCS ) add_library(gal STATIC ${GAL_SRCS}) + +if(WIN32) +add_definitions(-DGLEW_STATIC) +endif(WIN32) endif(KICAD_GAL) set(COMMON_ABOUT_DLG_SRCS diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index c7922c58d6..2851747337 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -106,9 +106,21 @@ target_link_libraries(cvpcb if(KICAD_GAL) target_link_libraries(cvpcb - gal - ${GLEW_LIBRARIES} + gal + ${GLEW_LIBRARIES} + ${CAIRO_LIBRARIES} ) + +if(WIN32) +target_link_libraries(cvpcb + opengl32 + glu32 + pixman-1 + fontconfig + freetype + bz2 + ) +endif(WIN32) endif(KICAD_GAL) ### diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index d65bd84a56..3d2226f6e6 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -428,9 +428,21 @@ target_link_libraries(pcbnew if(KICAD_GAL) target_link_libraries(pcbnew - gal - ${GLEW_LIBRARIES} + gal + ${GLEW_LIBRARIES} + ${CAIRO_LIBRARIES} ) + +if(WIN32) +target_link_libraries(pcbnew + opengl32 + glu32 + pixman-1 + fontconfig + freetype + bz2 + ) +endif(WIN32) endif(KICAD_GAL) ### From 7448116f377eb0de4e8d56bb0b4765bd1b25fc2f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 9 Apr 2013 16:12:20 +0200 Subject: [PATCH 023/415] Netnames and pad numbers are displayed on pads (using GAL) --- include/layers_id_colors_and_visibility.h | 1 + pcbnew/basepcbframe.cpp | 1 + pcbnew/class_pad.cpp | 13 ++-- pcbnew/pcb_painter.cpp | 74 +++++++++++++++++++++-- pcbnew/pcb_painter.h | 3 + 5 files changed, 83 insertions(+), 9 deletions(-) diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index 77f2e87f0c..7149519b9b 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -147,6 +147,7 @@ enum PCB_VISIBLE PADS_VISIBLE, VIA_HOLES_VISIBLE, PAD_HOLES_VISIBLE, + NETNAME_VISIBLE, END_PCB_VISIBLE_LIST // sentinel }; diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 165f6644ab..8b926fa0de 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -95,6 +95,7 @@ const int m_galLayerOrder[] = ITEM_GAL_LAYER( MOD_REFERENCES_VISIBLE), ITEM_GAL_LAYER( MOD_VALUES_VISIBLE ), SILKSCREEN_N_FRONT, SOLDERPASTE_N_FRONT, ADHESIVE_N_FRONT, SOLDERMASK_N_FRONT, + ITEM_GAL_LAYER( NETNAME_VISIBLE ), ITEM_GAL_LAYER( VIA_HOLES_VISIBLE ), ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 6ed89c4efd..01c40a9119 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -852,18 +852,21 @@ EDA_ITEM* D_PAD::Clone() const void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const { + // Pad description layer (number / net) + aLayers[0] = ITEM_GAL_LAYER( NETNAME_VISIBLE ); + if( m_Attribute == PAD_SMD || m_Attribute == PAD_CONN) { // Single layer pad (smd) without hole - aLayers[0] = GetParent()->GetLayer(); - aCount = 1; + aLayers[1] = GetParent()->GetLayer(); + aCount = 2; } else { // Multi layer pad with hole - pad is shown on one common layer, hole on the other - aLayers[0] = ITEM_GAL_LAYER( PADS_VISIBLE ); - aLayers[1] = ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ); - aCount = 2; + aLayers[1] = ITEM_GAL_LAYER( PADS_VISIBLE ); + aLayers[2] = ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ); + aCount = 3; } } diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 2eea8002e0..24e4c393da 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -71,6 +71,7 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings m_itemColors[PAD_HOLES_VISIBLE] = COLOR4D( 0.0, 0.5, 0.5, 1.0 ); m_itemColors[VIAS_VISIBLE] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); m_itemColors[PADS_VISIBLE] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); + m_itemColors[NETNAME_VISIBLE] = COLOR4D( 0.9, 0.9, 0.9, 1.0 ); Update(); } @@ -111,6 +112,8 @@ void PCB_RENDER_SETTINGS::Update() } +const double PCB_PAINTER::MAX_FONT_SIZE = 1500000; + PCB_PAINTER::PCB_PAINTER( GAL* aGal ) : PAINTER( aGal ) { @@ -307,11 +310,78 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) { COLOR4D color; VECTOR2D size; + VECTOR2D position( aPad->GetPosition() ); PAD_SHAPE_T shape; double m, n; + double orientation = aPad->GetOrientation(); + NORMALIZE_ANGLE_90( orientation ); // do not display descriptions upside down + orientation = orientation * M_PI / 1800.0; color = getLayerColor( aLayer, aPad->GetNet() ); + // Draw description layer + if( aLayer == ITEM_GAL_LAYER( NETNAME_VISIBLE ) ) + { + size = VECTOR2D( aPad->GetSize() / 2 ); + + // Font size limits + if( size.x > MAX_FONT_SIZE ) + size.x = MAX_FONT_SIZE; + if( size.y > MAX_FONT_SIZE ) + size.y = MAX_FONT_SIZE; + + // Keep the size ratio for the font, but make it smaller + if( size.x < size.y ) + { + orientation -= M_PI / 2; + size.y = size.x * 4.0 / 3.0; + } + else + { + size.x = size.y * 3.0 / 4.0; + } + + m_gal->Save(); + m_gal->Translate( position ); + m_gal->Rotate( -orientation ); + + // Default font settings + m_stroke_font->SetHorizontalJustify( GR_TEXT_HJUSTIFY_CENTER ); + m_stroke_font->SetVerticalJustify( GR_TEXT_VJUSTIFY_CENTER ); + m_stroke_font->SetBold( false ); + m_stroke_font->SetItalic( false ); + m_stroke_font->SetMirrored( false ); + m_gal->SetStrokeColor( color ); + + // Let's make some space for a netname too, if there's one to display + if( !aPad->GetNetname().empty() ) + { + size = size / 2.0; + m_stroke_font->SetGlyphSize( size ); + m_gal->SetLineWidth( size.y / 10.0 ); + + m_stroke_font->Draw( std::string( aPad->GetNetname().mb_str() ), + VECTOR2D( 0, size.y ), 0.0 ); + m_gal->Translate( VECTOR2D( 0.0, -size.y / 2.0 ) ); + } + else + { + // In case when there's no netname assigned + m_stroke_font->SetGlyphSize( size ); + m_gal->SetLineWidth( size.y / 10.0 ); + } + + m_stroke_font->Draw( std::string( aPad->GetPadName().mb_str() ), VECTOR2D( 0, 0 ), 0.0 ); + + m_gal->Restore(); + return; + } + + // Pad/hole drawing + m_gal->Save(); + m_gal->Translate( position ); + m_gal->Rotate( -orientation ); + if( m_pcbSettings->m_sketchModeSelect[PADS_VISIBLE] ) { // Outline mode @@ -330,10 +400,6 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) m_gal->SetFillColor( color ); } - m_gal->Save(); - m_gal->Translate( VECTOR2D( aPad->GetPosition() ) ); - m_gal->Rotate( -aPad->GetOrientation() * M_PI / 1800.0 ); // orientation is in tenths of degree - // Choose drawing settings depending on if we are drawing a pad itself or a hole if( aLayer == ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ) ) { diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index d66f3c6ed4..c48ed8b64f 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -151,6 +151,9 @@ protected: void draw( const ZONE_CONTAINER* ); void draw( const DIMENSION* ); void draw( const PCB_TARGET* ); + + /// Maximum font size for drawing descriptions + static const double MAX_FONT_SIZE; }; } // namespace KiGfx From 7326c9cb73bf6d147b23f846cec4f78d498948d8 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 10 Apr 2013 09:09:48 +0200 Subject: [PATCH 024/415] Removed OpenGL different drawing modes, as they were not used. Removed DRAW_MODE_NORMAL, DRAW_MODE_PREPARE_EDGES, DRAW_MODE_DRAW_EDGES modes. --- include/gal/opengl/opengl_gal.h | 56 --------------------------------- 1 file changed, 56 deletions(-) diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 4606698e35..d3539cc19d 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -67,13 +67,6 @@ class OPENGL_GAL : public GAL, public wxGLCanvas { public: - /// Current drawing mode - enum DrawMode { - DRAW_MODE_NORMAL, ///< Normal drawing mode - DRAW_MODE_PREPARE_EDGES, ///< Prepare the object edges - DRAW_MODE_DRAW_EDGES ///< Draw anti-aliased object edges - }; - /** * @brief Constructor OPENGL_GAL * @@ -311,58 +304,11 @@ public: paintListener = aPaintListener; } - // Special methods for OpenGL only - void SetDrawMode( DrawMode aDrawMode ) - { - m_drawMode = aDrawMode; - - switch( aDrawMode ) - { - case DRAW_MODE_NORMAL: - glColorMask( true, true, true, true ); - glEnable( GL_DEPTH_TEST ); - glDepthFunc( GL_LESS ); - break; - - case DRAW_MODE_PREPARE_EDGES: - // We just manipulate the Z-buffer in this mode - glColorMask( false, false, false, false ); - glEnable( GL_DEPTH_TEST ); - glDepthFunc( GL_LESS ); - // Shift the depth of the edge points a very small value deeper - // this way we prevent that overlapping edge points are not drawn twice - // and brighter, if we have used transparency. - glTranslated( 0, 0, (depthRange.y - depthRange.x) * DEPTH_ADJUST_FACTOR ); - break; - - case DRAW_MODE_DRAW_EDGES: - glColorMask( true, true, true, true ); - glEnable( GL_DEPTH_TEST ); - glDepthFunc( GL_LESS ); - // Restore the shifted position - glTranslated( 0, 0, -(depthRange.y - depthRange.x) * DEPTH_ADJUST_FACTOR ); - break; - - default: - break; - } - } - void SetShaderPath( const std::string& aPath ) { shaderPath = aPath; } - /** - * @brief Get the current drawing mode. - * - * @return the current drawing mode. - */ - DrawMode GetDrawMode() - { - return m_drawMode; - } - protected: virtual void DrawGridLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ); @@ -370,8 +316,6 @@ private: /// Super class definition typedef GAL super; - DrawMode m_drawMode; ///< Current drawing mode - static const int CIRCLE_POINTS = 64; ///< The number of points for circle approximation static const int CURVE_POINTS = 32; ///< The number of points for curve approximation static const int SHADER_NUMBER = 2; ///< Number of the used shaders From 3a4ad03492a2c86fd9696cfb1a75a5185aee12e0 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 10 Apr 2013 10:09:23 +0200 Subject: [PATCH 025/415] Fix for compatibility with wxWidgets 2.8 & 2.9 at the same time. --- common/drawpanel_gal.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 6a09411c7d..bc8c5224b4 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -101,10 +101,13 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin m_painter = new KiGfx::PCB_PAINTER( m_gal ); m_view->SetPainter( m_painter ); +#if wxCHECK_VERSION( 2, 9, 0 ) + Connect( KiGfx::EVT_GAL_REDRAW, wxEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); +#elif wxCHECK_VERSION( 2, 8, 0 ) // FIXME Cairo needs this to be uncommented to remove blinking on refreshing - // Connect( wxEVT_PAINT, wxEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); - Connect(KiGfx::EVT_GAL_REDRAW, wxEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); - Connect(wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this ); + Connect( wxEVT_PAINT, wxEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); +#endif + Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this ); } From 7792364e8ce40f8fb48877f868c8331c031536fc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 10 Apr 2013 13:47:19 +0200 Subject: [PATCH 026/415] Temporarily disabled display of netlabels on pads due to performance drop. --- include/layers_id_colors_and_visibility.h | 1 - pcbnew/basepcbframe.cpp | 1 - pcbnew/class_pad.cpp | 13 ++-- pcbnew/pcb_painter.cpp | 74 ++--------------------- pcbnew/pcb_painter.h | 3 - 5 files changed, 9 insertions(+), 83 deletions(-) diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index 7149519b9b..77f2e87f0c 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -147,7 +147,6 @@ enum PCB_VISIBLE PADS_VISIBLE, VIA_HOLES_VISIBLE, PAD_HOLES_VISIBLE, - NETNAME_VISIBLE, END_PCB_VISIBLE_LIST // sentinel }; diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 8b926fa0de..165f6644ab 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -95,7 +95,6 @@ const int m_galLayerOrder[] = ITEM_GAL_LAYER( MOD_REFERENCES_VISIBLE), ITEM_GAL_LAYER( MOD_VALUES_VISIBLE ), SILKSCREEN_N_FRONT, SOLDERPASTE_N_FRONT, ADHESIVE_N_FRONT, SOLDERMASK_N_FRONT, - ITEM_GAL_LAYER( NETNAME_VISIBLE ), ITEM_GAL_LAYER( VIA_HOLES_VISIBLE ), ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 01c40a9119..6ed89c4efd 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -852,21 +852,18 @@ EDA_ITEM* D_PAD::Clone() const void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const { - // Pad description layer (number / net) - aLayers[0] = ITEM_GAL_LAYER( NETNAME_VISIBLE ); - if( m_Attribute == PAD_SMD || m_Attribute == PAD_CONN) { // Single layer pad (smd) without hole - aLayers[1] = GetParent()->GetLayer(); - aCount = 2; + aLayers[0] = GetParent()->GetLayer(); + aCount = 1; } else { // Multi layer pad with hole - pad is shown on one common layer, hole on the other - aLayers[1] = ITEM_GAL_LAYER( PADS_VISIBLE ); - aLayers[2] = ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ); - aCount = 3; + aLayers[0] = ITEM_GAL_LAYER( PADS_VISIBLE ); + aLayers[1] = ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ); + aCount = 2; } } diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 24e4c393da..2eea8002e0 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -71,7 +71,6 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings m_itemColors[PAD_HOLES_VISIBLE] = COLOR4D( 0.0, 0.5, 0.5, 1.0 ); m_itemColors[VIAS_VISIBLE] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); m_itemColors[PADS_VISIBLE] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); - m_itemColors[NETNAME_VISIBLE] = COLOR4D( 0.9, 0.9, 0.9, 1.0 ); Update(); } @@ -112,8 +111,6 @@ void PCB_RENDER_SETTINGS::Update() } -const double PCB_PAINTER::MAX_FONT_SIZE = 1500000; - PCB_PAINTER::PCB_PAINTER( GAL* aGal ) : PAINTER( aGal ) { @@ -310,78 +307,11 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) { COLOR4D color; VECTOR2D size; - VECTOR2D position( aPad->GetPosition() ); PAD_SHAPE_T shape; double m, n; - double orientation = aPad->GetOrientation(); - NORMALIZE_ANGLE_90( orientation ); // do not display descriptions upside down - orientation = orientation * M_PI / 1800.0; color = getLayerColor( aLayer, aPad->GetNet() ); - // Draw description layer - if( aLayer == ITEM_GAL_LAYER( NETNAME_VISIBLE ) ) - { - size = VECTOR2D( aPad->GetSize() / 2 ); - - // Font size limits - if( size.x > MAX_FONT_SIZE ) - size.x = MAX_FONT_SIZE; - if( size.y > MAX_FONT_SIZE ) - size.y = MAX_FONT_SIZE; - - // Keep the size ratio for the font, but make it smaller - if( size.x < size.y ) - { - orientation -= M_PI / 2; - size.y = size.x * 4.0 / 3.0; - } - else - { - size.x = size.y * 3.0 / 4.0; - } - - m_gal->Save(); - m_gal->Translate( position ); - m_gal->Rotate( -orientation ); - - // Default font settings - m_stroke_font->SetHorizontalJustify( GR_TEXT_HJUSTIFY_CENTER ); - m_stroke_font->SetVerticalJustify( GR_TEXT_VJUSTIFY_CENTER ); - m_stroke_font->SetBold( false ); - m_stroke_font->SetItalic( false ); - m_stroke_font->SetMirrored( false ); - m_gal->SetStrokeColor( color ); - - // Let's make some space for a netname too, if there's one to display - if( !aPad->GetNetname().empty() ) - { - size = size / 2.0; - m_stroke_font->SetGlyphSize( size ); - m_gal->SetLineWidth( size.y / 10.0 ); - - m_stroke_font->Draw( std::string( aPad->GetNetname().mb_str() ), - VECTOR2D( 0, size.y ), 0.0 ); - m_gal->Translate( VECTOR2D( 0.0, -size.y / 2.0 ) ); - } - else - { - // In case when there's no netname assigned - m_stroke_font->SetGlyphSize( size ); - m_gal->SetLineWidth( size.y / 10.0 ); - } - - m_stroke_font->Draw( std::string( aPad->GetPadName().mb_str() ), VECTOR2D( 0, 0 ), 0.0 ); - - m_gal->Restore(); - return; - } - - // Pad/hole drawing - m_gal->Save(); - m_gal->Translate( position ); - m_gal->Rotate( -orientation ); - if( m_pcbSettings->m_sketchModeSelect[PADS_VISIBLE] ) { // Outline mode @@ -400,6 +330,10 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) m_gal->SetFillColor( color ); } + m_gal->Save(); + m_gal->Translate( VECTOR2D( aPad->GetPosition() ) ); + m_gal->Rotate( -aPad->GetOrientation() * M_PI / 1800.0 ); // orientation is in tenths of degree + // Choose drawing settings depending on if we are drawing a pad itself or a hole if( aLayer == ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ) ) { diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index c48ed8b64f..d66f3c6ed4 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -151,9 +151,6 @@ protected: void draw( const ZONE_CONTAINER* ); void draw( const DIMENSION* ); void draw( const PCB_TARGET* ); - - /// Maximum font size for drawing descriptions - static const double MAX_FONT_SIZE; }; } // namespace KiGfx From 079edee146686f044a4641c67dfff56d69f7ce57 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 11 Apr 2013 10:04:38 +0200 Subject: [PATCH 027/415] Copyright notices fix. --- include/math/box2.h | 7 ++++--- include/math/math_util.h | 3 ++- include/math/vector2d.h | 3 ++- include/view/view_rtree.h | 1 + 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/math/box2.h b/include/math/box2.h index 470fa6ac88..d52b79b69b 100644 --- a/include/math/box2.h +++ b/include/math/box2.h @@ -1,10 +1,11 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2008-2011 Wayne Stambaugh - * Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2010 Virtenio GmbH, Torsten Hueter, torsten.hueter virtenio.de + * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/include/math/math_util.h b/include/math/math_util.h index 3a4049ae29..2a3ff3fa17 100644 --- a/include/math/math_util.h +++ b/include/math/math_util.h @@ -2,7 +2,8 @@ * This program source code file is part of KICAD, a free EDA CAD application. * * Copyright (c) 2005 Michael Niedermayer - * Copyright (C) 2013 Tomasz Wlostowski + * Copyright (C) CERN + * @author Tomasz Wlostowski * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/include/math/vector2d.h b/include/math/vector2d.h index 583043f5b5..675e74d15f 100644 --- a/include/math/vector2d.h +++ b/include/math/vector2d.h @@ -4,7 +4,8 @@ * Copyright (C) 2010 Virtenio GmbH, Torsten Hueter, torsten.hueter virtenio.de * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. - * Copyright (C) 2013 Tomasz Wlostowski + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/include/view/view_rtree.h b/include/view/view_rtree.h index 4762dfc691..168cf280dc 100644 --- a/include/view/view_rtree.h +++ b/include/view/view_rtree.h @@ -2,6 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License From ebbd7c48d399cfa6e9505b87025f9f27663971cf Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 11 Apr 2013 14:21:59 +0200 Subject: [PATCH 028/415] Added multiline strings and text overbars rendering using GAL. --- common/gal/stroke_font.cpp | 59 ++++++++++++++++++++++++++++---------- include/gal/stroke_font.h | 23 +++++++-------- 2 files changed, 55 insertions(+), 27 deletions(-) diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp index 8c22dcdda4..a38966b2d1 100644 --- a/common/gal/stroke_font.cpp +++ b/common/gal/stroke_font.cpp @@ -125,7 +125,7 @@ void STROKE_FONT::LoadAttributes( const EDA_TEXT* aText ) } -BOX2D STROKE_FONT::computeBoundingBox( Glyph aGlyph, VECTOR2D aGlyphBoundingX ) +BOX2D STROKE_FONT::computeBoundingBox( const Glyph& aGlyph, const VECTOR2D& aGlyphBoundingX ) const { BOX2D boundingBox; @@ -134,9 +134,9 @@ BOX2D STROKE_FONT::computeBoundingBox( Glyph aGlyph, VECTOR2D aGlyphBoundingX ) boundingPoints.push_back( VECTOR2D( aGlyphBoundingX.x, 0 ) ); boundingPoints.push_back( VECTOR2D( aGlyphBoundingX.y, 0 ) ); - for( Glyph::iterator pointListIt = aGlyph.begin(); pointListIt != aGlyph.end(); ++pointListIt ) + for( Glyph::const_iterator pointListIt = aGlyph.begin(); pointListIt != aGlyph.end(); ++pointListIt ) { - for( std::deque::iterator pointIt = pointListIt->begin(); + for( std::deque::const_iterator pointIt = pointListIt->begin(); pointIt != pointListIt->end(); ++pointIt ) { boundingPoints.push_back( VECTOR2D( aGlyphBoundingX.x, pointIt->y ) ); @@ -149,11 +149,26 @@ BOX2D STROKE_FONT::computeBoundingBox( Glyph aGlyph, VECTOR2D aGlyphBoundingX ) } -void STROKE_FONT::Draw( std::string aText, VECTOR2D aPosition, double aRotationAngle ) +void STROKE_FONT::Draw( std::string aText, const VECTOR2D& aPosition, double aRotationAngle ) { + // Split multiline strings into separate ones and draw line by line + size_t newlinePos = aText.find( '\n' ); + + if( newlinePos != std::string::npos ) + { + VECTOR2D nextlinePosition( aPosition ); + nextlinePosition += VECTOR2D( 0.0, m_glyphSize.y * 1.6 ); // FIXME remove magic number + + Draw( aText.substr( newlinePos + 1 ), nextlinePosition, aRotationAngle ); + aText = aText.substr( 0, newlinePos ); + } + // Compute the text size VECTOR2D textsize = computeTextSize( aText ); + // By default overbar is turned off + m_overbar = false; + // Context needs to be saved before any transformations m_gal->Save(); @@ -221,8 +236,14 @@ void STROKE_FONT::Draw( std::string aText, VECTOR2D aPosition, double aRotationA m_gal->SetLineWidth( m_gal->GetLineWidth() * 1.3 ); } - for( std::string::iterator chIt = aText.begin(); chIt != aText.end(); chIt++ ) + for( std::string::const_iterator chIt = aText.begin(); chIt != aText.end(); chIt++ ) { + if( *chIt == '~' ) + { + m_overbar = !m_overbar; + continue; + } + GlyphList::iterator glyphIt = m_glyphs.begin(); std::deque::iterator bbIt = m_glyphBoundingBoxes.begin(); @@ -254,26 +275,34 @@ void STROKE_FONT::Draw( std::string aText, VECTOR2D aPosition, double aRotationA m_gal->DrawPolyline( pointListScaled ); } - xOffset += m_scaleFactor * glyphSizeX * - ( bbIt->GetEnd().x - bbIt->GetOrigin().x ); + if( m_overbar ) + { + VECTOR2D startOverbar( xOffset, -textsize.y * 1.2 ); + VECTOR2D endOverbar( xOffset + m_scaleFactor * glyphSizeX * bbIt->GetEnd().x, + -textsize.y * 1.2 ); + m_gal->DrawLine( startOverbar, endOverbar ); + } + + xOffset += m_scaleFactor * glyphSizeX * bbIt->GetEnd().x; } m_gal->Restore(); } -VECTOR2D STROKE_FONT::computeTextSize( std::string aText ) +VECTOR2D STROKE_FONT::computeTextSize( const std::string& aText ) const { - VECTOR2D result = VECTOR2D( 0.0, 0.0 ); + VECTOR2D result = VECTOR2D( 0.0, m_glyphSize.y ); - for( std::string::iterator chIt = aText.begin(); chIt != aText.end(); chIt++ ) + for( std::string::const_iterator chIt = aText.begin(); chIt != aText.end(); chIt++ ) { - std::deque::iterator bbIt = m_glyphBoundingBoxes.begin(); - advance( bbIt, (int) ( *chIt ) - (int) ' ' ); - result.x += m_scaleFactor * m_glyphSize.x * ( bbIt->GetEnd().x - bbIt->GetOrigin().x ); - } + if( *chIt == '~' ) + continue; - result.y = m_glyphSize.y; + std::deque::const_iterator bbIt = m_glyphBoundingBoxes.begin(); + advance( bbIt, (int) ( *chIt ) - (int) ' ' ); + result.x += m_scaleFactor * m_glyphSize.x * bbIt->GetEnd().x; + } return result; } diff --git a/include/gal/stroke_font.h b/include/gal/stroke_font.h index a94aace854..96aa5647b5 100644 --- a/include/gal/stroke_font.h +++ b/include/gal/stroke_font.h @@ -80,7 +80,7 @@ public: * @param aPosition is the text position in world coordinates. * @param aRotationAngle is the text rotation angle. */ - void Draw( std::string aText, VECTOR2D aPosition, double aRotationAngle ); + void Draw( std::string aText, const VECTOR2D& aPosition, double aRotationAngle ); /** * @brief Set the scale factor of the font for the glyph size. @@ -153,15 +153,14 @@ public: } private: - GAL* m_gal; ///< Pointer to the GAL - - GlyphList m_glyphs; ///< Glyph list - std::deque m_glyphBoundingBoxes; ///< Bounding boxes of the glyphs - double m_scaleFactor; ///< Scale factor for the glyph - VECTOR2D m_glyphSize; ///< Size of the glyphs - EDA_TEXT_HJUSTIFY_T m_horizontalJustify; ///< Horizontal justification - EDA_TEXT_VJUSTIFY_T m_verticalJustify; ///< Vertical justification - bool m_bold, m_italic, m_mirrored; ///< Properties of text + GAL* m_gal; ///< Pointer to the GAL + GlyphList m_glyphs; ///< Glyph list + std::deque m_glyphBoundingBoxes; ///< Bounding boxes of the glyphs + double m_scaleFactor; ///< Scale factor for the glyph + VECTOR2D m_glyphSize; ///< Size of the glyphs + EDA_TEXT_HJUSTIFY_T m_horizontalJustify; ///< Horizontal justification + EDA_TEXT_VJUSTIFY_T m_verticalJustify; ///< Vertical justification + bool m_bold, m_italic, m_mirrored, m_overbar; ///< Properties of text /** * @brief Compute the bounding box of a given glyph. @@ -170,7 +169,7 @@ private: * @param aGlyphBoundingX is the x-component of the bounding box size. * @return is the complete bounding box size. */ - BOX2D computeBoundingBox( Glyph aGlyph, VECTOR2D aGlyphBoundingX ); + BOX2D computeBoundingBox( const Glyph& aGlyph, const VECTOR2D& aGlyphBoundingX ) const; /** * @brief Compute the size of a given text. @@ -178,7 +177,7 @@ private: * @param aText is the text string. * @return is the text size. */ - VECTOR2D computeTextSize( const std::string aText ); + VECTOR2D computeTextSize( const std::string& aText ) const; }; } // namespace KiGfx From 21733e7bdafbfc6e34a8eac9e54d90eb7588e5ab Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 12 Apr 2013 09:16:52 +0200 Subject: [PATCH 029/415] Copyright change --- include/math/box2.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/math/box2.h b/include/math/box2.h index d52b79b69b..3a6368590e 100644 --- a/include/math/box2.h +++ b/include/math/box2.h @@ -1,7 +1,6 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2010 Virtenio GmbH, Torsten Hueter, torsten.hueter virtenio.de * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. * Copyright (C) 2013 CERN From 3ff7ddbea73800ac5ad1c30dc7d0c8070dfa2ce8 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Fri, 12 Apr 2013 09:30:18 +0200 Subject: [PATCH 030/415] wxWidgets 2.8.12 build fix --- common/gal/opengl/opengl_gal.cpp | 5 +++-- common/view/view.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index e3c3850999..0005035212 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -29,6 +29,7 @@ #include #include +#include #ifndef CALLBACK #define CALLBACK @@ -256,8 +257,8 @@ void OPENGL_GAL::initGlew() } else { - wxLogDebug( wxString( "Status: Using GLEW " ) + - wxString::FromUTF8( (char*) glewGetString( GLEW_VERSION ) ) ); + wxLogDebug( wxString( wxT( "Status: Using GLEW " ) ) + + FROM_UTF8( (char*) glewGetString( GLEW_VERSION ) ) ); } // Check the OpenGL version (minimum 2.1 is required) diff --git a/common/view/view.cpp b/common/view/view.cpp index 51b3e18dea..339ac77e6e 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -429,7 +429,7 @@ void VIEW::redrawRect( const BOX2I& aRect ) prof_end( &totalCycles ); prof_end( &totalRealTime ); - wxLogDebug( "Redraw::items %d (%d cached), %.1f ms/frame (%.0f FPS), draw/geometry ratio: %.1f%%", + wxLogDebug( wxT( "Redraw::items %d (%d cached), %.1f ms/frame (%.0f FPS), draw/geometry ratio: %.1f%%" ), totalItems, totalCached, (double) totalRealTime.value / 1000.0, 1000000.0 / (double) totalRealTime.value, (double) totalDrawTime / (double) totalCycles.value * 100.0 ); From 63c2af4fa43b256c444147bea7e108b7e11d9903 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 12 Apr 2013 10:37:06 +0200 Subject: [PATCH 031/415] Tesselation error fix. Added missing callback function (combine callback). --- common/gal/opengl/opengl_gal.cpp | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 0005035212..301fc26021 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -1394,6 +1394,18 @@ void CALLBACK VertexCallback( GLvoid* aVertexPtr ) } +void CALLBACK CombineCallback( GLdouble coords[3], + GLdouble* vertex_data[4], + GLfloat weight[4], GLdouble** dataOut ) +{ + GLdouble* vertex = new GLdouble[3]; + + memcpy( vertex, coords, 3 * sizeof(GLdouble) ); + + *dataOut = vertex; +} + + void CALLBACK BeginCallback( GLenum aWhich ) { glBegin( aWhich ); @@ -1417,10 +1429,11 @@ void CALLBACK ErrorCallback( GLenum aErrorCode ) void InitTesselatorCallbacks( GLUtesselator* aTesselator ) { - gluTessCallback( aTesselator, GLU_TESS_VERTEX, ( void (CALLBACK*)() )VertexCallback ); - gluTessCallback( aTesselator, GLU_TESS_BEGIN, ( void (CALLBACK*)() )BeginCallback ); - gluTessCallback( aTesselator, GLU_TESS_END, ( void (CALLBACK*)() )EndCallback ); - gluTessCallback( aTesselator, GLU_TESS_ERROR, ( void (CALLBACK*)() )ErrorCallback ); + gluTessCallback( aTesselator, GLU_TESS_VERTEX, ( void (CALLBACK*)() )VertexCallback ); + gluTessCallback( aTesselator, GLU_TESS_COMBINE, ( void (CALLBACK*)() )CombineCallback ); + gluTessCallback( aTesselator, GLU_TESS_BEGIN, ( void (CALLBACK*)() )BeginCallback ); + gluTessCallback( aTesselator, GLU_TESS_END, ( void (CALLBACK*)() )EndCallback ); + gluTessCallback( aTesselator, GLU_TESS_ERROR, ( void (CALLBACK*)() )ErrorCallback ); } From 0fef63956fadab854a40ccd852c487c433e34601 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 12 Apr 2013 16:41:31 +0200 Subject: [PATCH 032/415] Fixed text display using Cairo. --- common/gal/stroke_font.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp index a38966b2d1..8125b73a04 100644 --- a/common/gal/stroke_font.cpp +++ b/common/gal/stroke_font.cpp @@ -228,6 +228,8 @@ void STROKE_FONT::Draw( std::string aText, const VECTOR2D& aPosition, double aRo double scaleY = m_scaleFactor * m_glyphSize.y; double scaleX = m_scaleFactor * glyphSizeX; + m_gal->SetIsStroke( true ); + m_gal->SetIsFill( false ); m_gal->SetLineCap( LINE_CAP_ROUND ); m_gal->SetLineJoin( LINE_JOIN_ROUND ); From f996d6cc7a368a236c2b87ced096600632e089f8 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 15 Apr 2013 16:03:05 +0200 Subject: [PATCH 033/415] Introduced SetGAL() functions that will allow changing GAL backend for rendering on the fly. --- common/painter.cpp | 7 +++++++ include/gal/stroke_font.h | 10 ++++++++++ include/painter.h | 7 +++++++ 3 files changed, 24 insertions(+) diff --git a/common/painter.cpp b/common/painter.cpp index 5d24210aa7..fa28295158 100644 --- a/common/painter.cpp +++ b/common/painter.cpp @@ -80,3 +80,10 @@ PAINTER::~PAINTER() { delete m_stroke_font; } + + +void PAINTER::SetGAL( GAL* aGal ) +{ + m_gal = aGal; + m_stroke_font->SetGAL( aGal ); +} diff --git a/include/gal/stroke_font.h b/include/gal/stroke_font.h index 96aa5647b5..0d394ba613 100644 --- a/include/gal/stroke_font.h +++ b/include/gal/stroke_font.h @@ -152,6 +152,16 @@ public: m_verticalJustify = aVerticalJustify; } + /** + * Function SetGAL + * Changes Graphics Abstraction Layer used for drawing items for a new one. + * @param aGal is the new GAL instance. + */ + void SetGAL( GAL* aGal ) + { + m_gal = aGal; + } + private: GAL* m_gal; ///< Pointer to the GAL GlyphList m_glyphs; ///< Glyph list diff --git a/include/painter.h b/include/painter.h index a90c8026c5..a9e9dc947a 100644 --- a/include/painter.h +++ b/include/painter.h @@ -180,6 +180,13 @@ public: m_settings = aSettings; } + /** + * Function SetGAL + * Changes Graphics Abstraction Layer used for drawing items for a new one. + * @param aGal is the new GAL instance. + */ + void SetGAL( GAL* aGal ); + /** * Function GetSettings * Returns pointer to current settings that are going to be used when drawing items. From f2c4fa2b4665657e481bff564ca5515c53faecc0 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 15 Apr 2013 17:57:03 +0200 Subject: [PATCH 034/415] Introduced Cairo-based rendering backend using GAL. Moved switching canvas routines to pcbnew, as they are used only there right now (otherwise libgal would have to be linked to every Kicad application). --- common/drawframe.cpp | 33 +++++++++++++++++++++++++++------ common/drawpanel_gal.cpp | 10 ++++++++++ common/zoom.cpp | 35 ----------------------------------- include/class_drawpanel_gal.h | 1 - include/id.h | 1 - include/wxPcbStruct.h | 7 +++++++ pcbnew/hotkeys.cpp | 6 ++++-- pcbnew/hotkeys.h | 4 +++- pcbnew/menubar_pcbframe.cpp | 21 ++++++++++++++++++--- pcbnew/pcbframe.cpp | 35 +++++++++++++++++++++++++++++++++++ pcbnew/pcbnew_id.h | 3 +++ 11 files changed, 107 insertions(+), 49 deletions(-) diff --git a/common/drawframe.cpp b/common/drawframe.cpp index 9bf7fde793..c723a30cd0 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -46,7 +46,10 @@ #include #include - +#ifdef KICAD_GAL +#include +#include +#endif /* KICAD_GAL */ /** * Definition for enabling and disabling scroll bar setting trace output. See the @@ -67,7 +70,6 @@ BEGIN_EVENT_TABLE( EDA_DRAW_FRAME, EDA_BASE_FRAME ) EVT_MENU_OPEN( EDA_DRAW_FRAME::OnMenuOpen ) EVT_ACTIVATE( EDA_DRAW_FRAME::OnActivate ) EVT_MENU_RANGE( ID_ZOOM_IN, ID_ZOOM_REDRAW, EDA_DRAW_FRAME::OnZoom ) - EVT_MENU( ID_SWITCH_CANVAS, EDA_DRAW_FRAME::OnZoom ) EVT_MENU_RANGE( ID_OFFCENTER_ZOOM_IN, ID_OFFCENTER_ZOOM_OUT, EDA_DRAW_FRAME::OnZoom ) EVT_MENU_RANGE( ID_POPUP_ZOOM_START_RANGE, ID_POPUP_ZOOM_END_RANGE, EDA_DRAW_FRAME::OnZoom ) @@ -943,22 +945,41 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU ) void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) { + if( aEnable && m_galCanvasActive ) + { + // When we switch between GAL based canvases, all we need is a refresh + m_galCanvas->Refresh(); + } + if( !( aEnable ^ m_galCanvasActive ) ) return; + KiGfx::VIEW* view = m_galCanvas->GetView(); + KiGfx::GAL* gal = m_galCanvas->GetGAL(); + double zoomFactor = gal->GetWorldScale() / gal->GetZoomFactor(); + + // Display the same view after canvas switching if( aEnable ) { - m_canvas->Hide(); + double zoom = 1 / ( zoomFactor * m_canvas->GetZoom() ); + view->SetScale( zoom ); + + view->SetCenter( VECTOR2D( m_canvas->GetScreenCenterLogicalPosition() ) ); + m_galCanvas->Show(); - m_galCanvas->Raise(); m_galCanvas->Refresh(); } else { m_galCanvas->Hide(); + + double zoom = 1 / ( zoomFactor * view->GetScale() ); + m_canvas->SetZoom( zoom ); + + VECTOR2D center = view->GetCenter(); + RedrawScreen( wxPoint( center.x, center.y ), false ); + m_canvas->Show(); - m_canvas->Raise(); - m_canvas->Refresh(); } m_galCanvasActive = aEnable; diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index bc8c5224b4..483bac5fc4 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -84,7 +84,11 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin m_gal->SetZoomFactor( 1.0 ); m_gal->ComputeWorldScreenMatrix(); + m_painter = new KiGfx::PCB_PAINTER( m_gal ); + m_painter->SetGAL( m_gal ); + m_view = new KiGfx::VIEW( true ); + m_view->SetPainter( m_painter ); m_view->SetGAL( m_gal ); // View uses layers to display EDA_ITEMs (item may be displayed on several layers, for example @@ -150,4 +154,10 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) if( m_view ) m_view->SetGAL( m_gal ); + + if( m_painter ) + m_painter->SetGAL( m_gal ); + + wxSize size = GetClientSize(); + m_gal->ResizeScreen( size.GetX(), size.GetY() ); } diff --git a/common/zoom.cpp b/common/zoom.cpp index 6d3dac3ee9..e8e07b5f90 100644 --- a/common/zoom.cpp +++ b/common/zoom.cpp @@ -39,11 +39,6 @@ #include #include #include -#ifdef KICAD_GAL -#include -#include -#include -#endif void EDA_DRAW_FRAME::RedrawScreen( const wxPoint& aCenterPoint, bool aWarpPointer ) @@ -167,36 +162,6 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event ) m_canvas->Refresh(); break; -#ifdef KICAD_GAL - // Switch canvas between standard and GAL-based - case ID_SWITCH_CANVAS: - { - UseGalCanvas( !m_galCanvasActive ); - - KiGfx::VIEW* view = m_galCanvas->GetView(); - KiGfx::GAL* gal = m_galCanvas->GetGAL(); - double zoomFactor = gal->GetWorldScale() / gal->GetZoomFactor(); - - // Display the same view after canvas switching - if( m_galCanvasActive ) - { - double zoom = 1 / ( zoomFactor * m_canvas->GetZoom() ); - view->SetScale( zoom ); - - view->SetCenter( VECTOR2D( m_canvas->GetScreenCenterLogicalPosition() ) ); - } - else - { - double zoom = 1 / ( zoomFactor * view->GetScale() ); - m_canvas->SetZoom( zoom ); - - VECTOR2D center = view->GetCenter(); - RedrawScreen( wxPoint( center.x, center.y ), false ); - } - } - break; -#endif - case ID_POPUP_ZOOM_CENTER: center = screen->GetCrossHairPosition(); RedrawScreen( center, true ); diff --git a/include/class_drawpanel_gal.h b/include/class_drawpanel_gal.h index 206d88a5ff..63ed0cc6a1 100644 --- a/include/class_drawpanel_gal.h +++ b/include/class_drawpanel_gal.h @@ -52,7 +52,6 @@ public: enum GalType { GAL_TYPE_OPENGL, ///< OpenGL implementation GAL_TYPE_CAIRO, ///< Cairo implementation - GAL_TYPE_WXDC ///< WXDC implementation }; EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWindowId, const wxPoint& aPosition, diff --git a/include/id.h b/include/id.h index eb9eec91b0..4d517474af 100644 --- a/include/id.h +++ b/include/id.h @@ -213,7 +213,6 @@ enum main_id ID_ZOOM_OUT, ID_ZOOM_PAGE, ID_ZOOM_REDRAW, - ID_SWITCH_CANVAS, /* Panning command event IDs. */ ID_PAN_UP, diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 5ba16dc3e6..dabdb2ece0 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -581,6 +581,13 @@ public: * displays the 3D view of current printed circuit board. */ void Show3D_Frame( wxCommandEvent& event ); + + /** + * Function ChangeCanvas + * switches currently used canvas (default / Cairo / OpenGL). + */ + void SwitchCanvas( wxCommandEvent& aEvent ); + void GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey = 0 ); /** diff --git a/pcbnew/hotkeys.cpp b/pcbnew/hotkeys.cpp index c0fbfb006a..95715d7af9 100644 --- a/pcbnew/hotkeys.cpp +++ b/pcbnew/hotkeys.cpp @@ -83,7 +83,9 @@ static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ), static EDA_HOTKEY HkSwitchHighContrastMode( wxT("Switch Highcontrast mode"), HK_SWITCH_HIGHCONTRAST_MODE,'H'); #ifdef KICAD_GAL -static EDA_HOTKEY HkSwitchCanvas( wxT( "Switch canvas" ), HK_SWITCH_CANVAS, WXK_F12 ); +static EDA_HOTKEY HkCanvasDefault( wxT( "Switch to default canvas" ), HK_CANVAS_DEFAULT, WXK_F10 ); +static EDA_HOTKEY HkCanvasCairo( wxT( "Switch to OpenGL canvas" ), HK_CANVAS_OPENGL, WXK_F11 ); +static EDA_HOTKEY HkCanvasOpenGL( wxT( "Switch to Cairo canvas" ), HK_CANVAS_CAIRO, WXK_F12 ); #endif /* Fit on Screen */ #if !defined( __WXMAC__ ) @@ -232,7 +234,7 @@ EDA_HOTKEY* board_edit_Hotkey_List[] = &HkRecordMacros8, &HkCallMacros8, &HkRecordMacros9, &HkCallMacros9, &HkSwitchHighContrastMode, #ifdef KICAD_GAL - &HkSwitchCanvas, + &HkCanvasDefault, &HkCanvasCairo, &HkCanvasOpenGL, #endif NULL }; diff --git a/pcbnew/hotkeys.h b/pcbnew/hotkeys.h index 5c24b43ea0..d504e99887 100644 --- a/pcbnew/hotkeys.h +++ b/pcbnew/hotkeys.h @@ -83,7 +83,9 @@ enum hotkey_id_commnand { HK_MACRO_ID_END, HK_SWITCH_HIGHCONTRAST_MODE, #ifdef KICAD_GAL - HK_SWITCH_CANVAS, + HK_CANVAS_DEFAULT, + HK_CANVAS_OPENGL, + HK_CANVAS_CAIRO, #endif }; diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index c3e1cd2301..35babf398f 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -352,10 +352,25 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() // Switching GAL-based canvas on/off viewMenu->AppendSeparator(); - text = AddHotkeyName( _( "&Switch canvas" ), g_Pcbnew_Editor_Hokeys_Descr, HK_SWITCH_CANVAS, IS_ACCELERATOR ); + text = AddHotkeyName( _( "&Switch canvas to default" ), g_Pcbnew_Editor_Hokeys_Descr, + HK_CANVAS_DEFAULT, IS_ACCELERATOR ); - AddMenuItem( viewMenu, ID_SWITCH_CANVAS, - text, _( "Switch the canvas implementation between old (XOR-based) and new (GAL-based)" ), + AddMenuItem( viewMenu, ID_MENU_CANVAS_DEFAULT, + text, _( "Switch the canvas implementation to default" ), + KiBitmap( tools_xpm ) ); + + text = AddHotkeyName( _( "&Switch canvas to OpenGL" ), g_Pcbnew_Editor_Hokeys_Descr, + HK_CANVAS_OPENGL, IS_ACCELERATOR ); + + AddMenuItem( viewMenu, ID_MENU_CANVAS_OPENGL, + text, _( "Switch the canvas implementation to OpenGL" ), + KiBitmap( tools_xpm ) ); + + text = AddHotkeyName( _( "&Switch canvas to Cairo" ), g_Pcbnew_Editor_Hokeys_Descr, + HK_CANVAS_CAIRO, IS_ACCELERATOR ); + + AddMenuItem( viewMenu, ID_MENU_CANVAS_CAIRO, + text, _( "Switch the canvas implementation to Cairo" ), KiBitmap( tools_xpm ) ); #endif diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index db8e6f4127..439105b92b 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -59,6 +59,10 @@ #include #endif +#if defined(KICAD_GAL) +#include +#endif + // Keys used in read/write config #define OPTKEY_DEFAULT_LINEWIDTH_VALUE wxT( "PlotLineWidth_mm" ) #define PCB_SHOW_FULL_RATSNET_OPT wxT( "PcbFullRatsnest" ) @@ -152,6 +156,11 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) // Menu 3D Frame EVT_MENU( ID_MENU_PCB_SHOW_3D_FRAME, PCB_EDIT_FRAME::Show3D_Frame ) + // Switching canvases + EVT_MENU( ID_MENU_CANVAS_DEFAULT, PCB_EDIT_FRAME::SwitchCanvas ) + EVT_MENU( ID_MENU_CANVAS_CAIRO, PCB_EDIT_FRAME::SwitchCanvas ) + EVT_MENU( ID_MENU_CANVAS_OPENGL, PCB_EDIT_FRAME::SwitchCanvas ) + // Menu Get Design Rules Editor EVT_MENU( ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG, PCB_EDIT_FRAME::ShowDesignRulesEditor ) @@ -557,6 +566,32 @@ void PCB_EDIT_FRAME::Show3D_Frame( wxCommandEvent& event ) } +void PCB_EDIT_FRAME::SwitchCanvas( wxCommandEvent& aEvent ) +{ +#ifdef KICAD_GAL + int id = aEvent.GetId(); + + switch( id ) + { + case ID_MENU_CANVAS_DEFAULT: + UseGalCanvas( false ); + break; + + case ID_MENU_CANVAS_CAIRO: + m_galCanvas->SwitchBackend( EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO, false ); + UseGalCanvas( true ); + break; + + case ID_MENU_CANVAS_OPENGL: + m_galCanvas->SwitchBackend( EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL, false ); + UseGalCanvas( true ); + break; + } +#endif +} + + + void PCB_EDIT_FRAME::ShowDesignRulesEditor( wxCommandEvent& event ) { DIALOG_DESIGN_RULES dR_editor( this ); diff --git a/pcbnew/pcbnew_id.h b/pcbnew/pcbnew_id.h index a579b9ecbe..d6580786fb 100644 --- a/pcbnew/pcbnew_id.h +++ b/pcbnew/pcbnew_id.h @@ -266,6 +266,9 @@ enum pcbnew_ids ID_PCB_GEN_CMP_FILE, ID_MENU_PCB_SHOW_3D_FRAME, + ID_MENU_CANVAS_DEFAULT, + ID_MENU_CANVAS_OPENGL, + ID_MENU_CANVAS_CAIRO, ID_PCB_USER_GRID_SETUP, ID_PCB_GEN_BOM_FILE_FROM_BOARD, ID_PCB_LIB_TABLE_EDIT, From 48a7a863ae07a23d8c934ac3a526fced2f45a243 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 15 Apr 2013 17:59:38 +0200 Subject: [PATCH 035/415] Inverted Y display axis while using Cairo-based rendering backend. --- common/gal/cairo/cairo_gal.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 3b7d7e8fa8..abd215f1a9 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -786,11 +786,11 @@ void CAIRO_GAL::ComputeWorldScreenMatrix() MATRIX3x3D translation; translation.SetIdentity(); - translation.SetTranslation( 0.5 * VECTOR2D( screenSize.x, screenSize.y ) ); + translation.SetTranslation( 0.5 * screenSize ); MATRIX3x3D scale; scale.SetIdentity(); - scale.SetScale( VECTOR2D( worldScale, -worldScale ) ); + scale.SetScale( VECTOR2D( worldScale, worldScale ) ); MATRIX3x3D lookat; lookat.SetIdentity(); From 698bc0cdac64ace5426c802897f3fe7de5822d86 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 16 Apr 2013 11:16:27 +0200 Subject: [PATCH 036/415] Cleanup --- common/drawpanel_gal.cpp | 55 +++++++++++++++----------------- common/gal/cairo/cairo_gal.cpp | 53 ++++++++++-------------------- common/gal/opengl/opengl_gal.cpp | 16 +++++----- include/class_drawpanel_gal.h | 9 +++--- include/gal/cairo/cairo_gal.h | 1 - 5 files changed, 54 insertions(+), 80 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 483bac5fc4..74d95866a8 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -40,30 +40,6 @@ #define METRIC_UNIT_LENGTH (1e9) -void EDA_DRAW_PANEL_GAL::onPaint( wxEvent& event ) -{ - m_gal->BeginDrawing(); - m_gal->SetBackgroundColor( KiGfx::COLOR4D( 0, 0, 0, 1.0 ) ); - m_gal->ClearScreen(); - m_gal->SetGridOrigin( VECTOR2D( 0, 0 ) ); - m_gal->SetGridOriginMarkerSize( 15 ); - m_gal->SetGridSize( VECTOR2D( METRIC_UNIT_LENGTH / 10000.0, METRIC_UNIT_LENGTH / 10000.0 ) ); - m_gal->SetGridDrawThreshold( 10 ); - m_gal->SetLayerDepth( 0 ); - - m_gal->DrawGrid(); - m_view->Redraw(); - - m_gal->EndDrawing(); - m_gal->Flush(); -} - - -void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent ) -{ - m_gal->ResizeScreen( aEvent.GetSize().x, aEvent.GetSize().y ); -} - EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWindowId, const wxPoint& aPosition, const wxSize& aSize, @@ -102,14 +78,11 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin m_viewControls = new KiGfx::WX_VIEW_CONTROLS( m_view, this ); - m_painter = new KiGfx::PCB_PAINTER( m_gal ); - m_view->SetPainter( m_painter ); - #if wxCHECK_VERSION( 2, 9, 0 ) - Connect( KiGfx::EVT_GAL_REDRAW, wxEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); + Connect( KiGfx::EVT_GAL_REDRAW, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); #elif wxCHECK_VERSION( 2, 8, 0 ) // FIXME Cairo needs this to be uncommented to remove blinking on refreshing - Connect( wxEVT_PAINT, wxEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); + Connect( wxEVT_PAINT, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); #endif Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this ); } @@ -131,6 +104,30 @@ EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL() } +void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& aEvent ) +{ + m_gal->BeginDrawing(); + m_gal->SetBackgroundColor( KiGfx::COLOR4D( 0, 0, 0, 1.0 ) ); + m_gal->ClearScreen(); + m_gal->SetGridOrigin( VECTOR2D( 0, 0 ) ); + m_gal->SetGridOriginMarkerSize( 15 ); + m_gal->SetGridSize( VECTOR2D( METRIC_UNIT_LENGTH / 10000.0, METRIC_UNIT_LENGTH / 10000.0 ) ); + m_gal->SetGridDrawThreshold( 10 ); + m_gal->SetLayerDepth( 0 ); + + m_gal->DrawGrid(); + m_view->Redraw(); + + m_gal->EndDrawing(); +} + + +void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent ) +{ + m_gal->ResizeScreen( aEvent.GetSize().x, aEvent.GetSize().y ); +} + + void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) { if( m_gal ) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index abd215f1a9..0d3b892748 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -51,25 +51,16 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, SetSize( aParent->GetSize() ); // Connecting the event handlers + Connect( wxEVT_SIZE, wxSizeEventHandler( CAIRO_GAL::onSize ) ); + Connect( wxEVT_PAINT, wxPaintEventHandler( CAIRO_GAL::onPaint ) ); + // Mouse events are skipped to the parent - this->Connect( wxEVT_SIZE, wxSizeEventHandler( CAIRO_GAL::onSize ) ); - this->Connect( wxEVT_PAINT, wxPaintEventHandler( CAIRO_GAL::onPaint ) ); - this->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( CAIRO_GAL::onEraseBackground ) ); - aParent->Connect( wxEVT_ERASE_BACKGROUND, - wxEraseEventHandler( CAIRO_GAL::onEraseBackground ) ); - aParent->GetParent()->Connect( wxEVT_ERASE_BACKGROUND, - wxEraseEventHandler( CAIRO_GAL::onEraseBackground ) ); - - SetBackgroundStyle( wxBG_STYLE_CUSTOM ); - aParent->SetBackgroundStyle( wxBG_STYLE_CUSTOM ); - aParent->GetParent()->SetBackgroundStyle( wxBG_STYLE_CUSTOM ); - - this->Connect( wxEVT_MOTION, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); - this->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); - this->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); - this->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); - this->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); - this->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_MOTION, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_LEFT_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); // Initialize line attributes map lineCapMap[LINE_CAP_BUTT] = CAIRO_LINE_CAP_BUTT; @@ -88,8 +79,6 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, SetCursorColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); initCursor( 21 ); - screenSizeY = screenSize.y; - // Allocate memory allocateBitmaps(); @@ -105,9 +94,7 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, CAIRO_GAL::~CAIRO_GAL() { // TODO Deleting of list contents like groups and paths - delete[] bitmapBuffer; - delete[] bitmapBufferBackup; - delete wxBitmap_; + deleteBitmaps(); } @@ -117,17 +104,10 @@ void CAIRO_GAL::onPaint( wxPaintEvent& aEvent ) } -void CAIRO_GAL::onEraseBackground( wxEraseEvent& aEvent ) -{ - // FIXME -} - - void CAIRO_GAL::ResizeScreen( int aWidth, int aHeight ) { deleteBitmaps(); - screenSizeY = aHeight; screenSize = VECTOR2D( aWidth, aHeight ); // Recreate the bitmaps @@ -141,9 +121,8 @@ void CAIRO_GAL::ResizeScreen( int aWidth, int aHeight ) void CAIRO_GAL::onSize( wxSizeEvent& aEvent ) { - wxSize newSize = aEvent.GetSize(); - - ResizeScreen( newSize.x, newSize.y ); + ResizeScreen( aEvent.GetSize().x, aEvent.GetSize().y ); + PostPaint(); } @@ -225,7 +204,7 @@ void CAIRO_GAL::EndDrawing() int offset = 0; // Copy the cairo image to the wxDC bitmap - for( int j = 0; j < screenSizeY; j++ ) + for( int j = 0; j < screenSize.y; j++ ) { offset = j * (int) screenSize.x; @@ -234,7 +213,7 @@ void CAIRO_GAL::EndDrawing() unsigned int value = bitmapBuffer[offset + column]; pixelIterator.Red() = value >> 16; pixelIterator.Green() = value >> 8; - pixelIterator.Blue() = value >> 0; + pixelIterator.Blue() = value; pixelIterator++; } @@ -287,7 +266,7 @@ void CAIRO_GAL::SaveScreen() // Copy the current bitmap to the backup buffer int offset = 0; - for( int j = 0; j < screenSizeY; j++ ) + for( int j = 0; j < screenSize.y; j++ ) { for( int i = 0; i < stride; i++ ) { @@ -302,7 +281,7 @@ void CAIRO_GAL::RestoreScreen() { int offset = 0; - for( int j = 0; j < screenSizeY; j++ ) + for( int j = 0; j < screenSize.y; j++ ) { for( int i = 0; i < stride; i++ ) { diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 301fc26021..c839cb62f0 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -88,16 +88,16 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, SetGridLineWidth( 1.0 ); // Connecting the event handlers. - this->Connect( wxEVT_SIZE, wxSizeEventHandler( OPENGL_GAL::onSize ) ); - this->Connect( wxEVT_PAINT, wxPaintEventHandler( OPENGL_GAL::onPaint ) ); + Connect( wxEVT_SIZE, wxSizeEventHandler( OPENGL_GAL::onSize ) ); + Connect( wxEVT_PAINT, wxPaintEventHandler( OPENGL_GAL::onPaint ) ); // Mouse events are skipped to the parent - this->Connect( wxEVT_MOTION, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); - this->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); - this->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); - this->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); - this->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); - this->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_MOTION, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_LEFT_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); } diff --git a/include/class_drawpanel_gal.h b/include/class_drawpanel_gal.h index 63ed0cc6a1..e0b88da421 100644 --- a/include/class_drawpanel_gal.h +++ b/include/class_drawpanel_gal.h @@ -75,12 +75,11 @@ public: void SetView( KiGfx::VIEW* aView ) { m_view = aView; } KiGfx::VIEW* GetView() const { return m_view; } + //void Refresh( bool eraseBackground = true, const wxRect* rect = NULL ); + protected: - void onPaint( wxEvent& event ); + void onPaint( wxPaintEvent& aEvent ); void onSize( wxSizeEvent& aEvent ); - void onMotion( wxMouseEvent& event ); - void onButton( wxMouseEvent& event ); - void onEraseBackground( wxEvent& event ); KiGfx::GAL* m_gal; ///< Interface for drawing objects on a 2D-surface KiGfx::VIEW* m_view; ///< Stores view settings (scale, center, etc.) @@ -92,7 +91,7 @@ protected: VECTOR2D m_screenSize; ///< Stores current screen size wxWindow* m_parentFrame; ///< Pointer to the parent frame - std::string m_galShaderPath; ///< Path to shader files, used in OpenGL mode + std::string m_galShaderPath; ///< Path to shader files, used in OpenGL mode }; #endif diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 002622296d..87100c6016 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -377,7 +377,6 @@ private: * @param aEvent is the paint event. */ void onPaint( wxPaintEvent& aEvent ); - void onEraseBackground( wxEraseEvent& aEvent ); /** * @brief Window resizing event handler. From b8d88f0dc593b2e295dbd72fe9717d09652c0fa0 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 16 Apr 2013 11:43:13 +0200 Subject: [PATCH 037/415] Removed flickering in Cairo-based rendering backend. --- common/drawpanel_gal.cpp | 23 ++++++++++++----------- include/class_drawpanel_gal.h | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 74d95866a8..480713012c 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -78,12 +78,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin m_viewControls = new KiGfx::WX_VIEW_CONTROLS( m_view, this ); -#if wxCHECK_VERSION( 2, 9, 0 ) Connect( KiGfx::EVT_GAL_REDRAW, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); -#elif wxCHECK_VERSION( 2, 8, 0 ) - // FIXME Cairo needs this to be uncommented to remove blinking on refreshing - Connect( wxEVT_PAINT, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); -#endif Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this ); } @@ -105,6 +100,18 @@ EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL() void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& aEvent ) +{ + Refresh(); +} + + +void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent ) +{ + m_gal->ResizeScreen( aEvent.GetSize().x, aEvent.GetSize().y ); +} + + +void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) { m_gal->BeginDrawing(); m_gal->SetBackgroundColor( KiGfx::COLOR4D( 0, 0, 0, 1.0 ) ); @@ -122,12 +129,6 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& aEvent ) } -void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent ) -{ - m_gal->ResizeScreen( aEvent.GetSize().x, aEvent.GetSize().y ); -} - - void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) { if( m_gal ) diff --git a/include/class_drawpanel_gal.h b/include/class_drawpanel_gal.h index e0b88da421..acde693b9a 100644 --- a/include/class_drawpanel_gal.h +++ b/include/class_drawpanel_gal.h @@ -75,7 +75,7 @@ public: void SetView( KiGfx::VIEW* aView ) { m_view = aView; } KiGfx::VIEW* GetView() const { return m_view; } - //void Refresh( bool eraseBackground = true, const wxRect* rect = NULL ); + virtual void Refresh( bool eraseBackground = true, const wxRect* rect = NULL ); protected: void onPaint( wxPaintEvent& aEvent ); From cf01f1a264f2aef8d271a586537fb456853b9b98 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 16 Apr 2013 14:55:21 +0200 Subject: [PATCH 038/415] Fixed drawing polygons using Cairo-based GAL. --- common/gal/cairo/cairo_gal.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 0d3b892748..7d42ffff01 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -305,6 +305,7 @@ void CAIRO_GAL::DrawCircle( VECTOR2D aCenterPoint, double aRadius ) // A circle is drawn using an arc cairo_new_sub_path( cairoImage ); cairo_arc( cairoImage, aCenterPoint.x, aCenterPoint.y, aRadius, 0.0, 2 * M_PI ); + isElementAdded = true; } @@ -314,6 +315,7 @@ void CAIRO_GAL::DrawArc( VECTOR2D aCenterPoint, double aRadius, double aStartAng { cairo_new_sub_path( cairoImage ); cairo_arc( cairoImage, aCenterPoint.x, aCenterPoint.y, aRadius, aStartAngle, aEndAngle ); + isElementAdded = true; } @@ -358,6 +360,9 @@ void CAIRO_GAL::DrawPolygon( const std::deque& aPointList ) } } + cairo_set_source_rgba( cairoImage, fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + cairo_fill_preserve( cairoImage ); + isElementAdded = true; } From 568e6c809311784c7611f52692414e2a11bb273d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 17 Apr 2013 12:30:21 +0200 Subject: [PATCH 039/415] More accurate rendering display of ZONE_CONTAINERs. --- pcbnew/pcb_painter.cpp | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 3effc25d75..17664e814f 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -495,33 +495,47 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) void PCB_PAINTER::draw( const ZONE_CONTAINER* aContainer ) { + std::vector polyPoints = aContainer->GetFilledPolysList(); + if( polyPoints.size() == 0 ) // Nothing to draw + return; + COLOR4D fillColor = getLayerColor( aContainer->GetLayer(), aContainer->GetNet() ); std::vector::iterator polyIterator; - std::vector polyPoints = aContainer->GetFilledPolysList(); std::deque corners; + VECTOR2D startPoint; + int fillMode = aContainer->GetFillMode(); - m_gal->SetLineCap( LINE_CAP_BUTT ); - m_gal->SetLineJoin( LINE_JOIN_ROUND ); m_gal->SetFillColor( fillColor ); m_gal->SetStrokeColor( fillColor ); - m_gal->SetIsFill( aContainer->IsFilled() ); + m_gal->SetIsFill( !fillMode ); m_gal->SetIsStroke( true ); m_gal->SetLineWidth( aContainer->GetThermalReliefCopperBridge() / 2.0 ); + m_gal->SetLineCap( LINE_CAP_ROUND ); + m_gal->SetLineJoin( LINE_JOIN_ROUND ); // FIXME implement hatch mode - for( polyIterator = polyPoints.begin(); polyIterator != polyPoints.end(); polyIterator++ ) + if( fillMode == 0 ) { - // Find out all of polygons and then draw them - if( !polyIterator->end_contour ) + startPoint = VECTOR2D( polyPoints.front() ); + for( polyIterator = polyPoints.begin(); polyIterator != polyPoints.end(); polyIterator++ ) { - corners.push_back( VECTOR2D( *polyIterator ) ); - } - else - { - m_gal->DrawPolygon( corners ); - m_gal->DrawPolyline( corners ); - corners.clear(); + // Find out all of polygons and then draw them + if( !polyIterator->end_contour ) + { + corners.push_back( VECTOR2D( *polyIterator ) ); + } + else + { + m_gal->DrawPolygon( corners ); + + // Closing point for polyline + corners.push_back( VECTOR2D( startPoint ) ); + m_gal->DrawPolyline( corners ); + startPoint = VECTOR2D( *( polyIterator + 1 ) ); + + corners.clear(); + } } } } From e5e60c6bed1c30fc8e69f4529b2bdb1f9d2d802b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 17 Apr 2013 12:33:11 +0200 Subject: [PATCH 040/415] Fixed drawing arcs in Cairo GAL. --- common/gal/cairo/cairo_gal.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 7d42ffff01..9070098c81 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -29,6 +29,7 @@ #include #include +#include using namespace KiGfx; @@ -313,6 +314,8 @@ void CAIRO_GAL::DrawCircle( VECTOR2D aCenterPoint, double aRadius ) void CAIRO_GAL::DrawArc( VECTOR2D aCenterPoint, double aRadius, double aStartAngle, double aEndAngle ) { + SWAP( aStartAngle, >, aEndAngle ); + cairo_new_sub_path( cairoImage ); cairo_arc( cairoImage, aCenterPoint.x, aCenterPoint.y, aRadius, aStartAngle, aEndAngle ); From 895d265603255199046cffed8d799f05742f605e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 17 Apr 2013 12:38:00 +0200 Subject: [PATCH 041/415] Added GAL::DrawSegment for drawing rounded segments (used for drawing tracks). --- common/gal/cairo/cairo_gal.cpp | 40 ++++++++++++++++++++++++ common/gal/opengl/opengl_gal.cpp | 39 +++++++++++++++++++++++ include/gal/cairo/cairo_gal.h | 3 ++ include/gal/graphics_abstraction_layer.h | 11 +++++++ include/gal/opengl/opengl_gal.h | 3 ++ pcbnew/pcb_painter.cpp | 32 +++++-------------- 6 files changed, 104 insertions(+), 24 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 9070098c81..741fad0761 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -301,6 +301,46 @@ void CAIRO_GAL::DrawLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) } +void CAIRO_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aWidth ) +{ + cairo_set_line_cap( cairoImage, CAIRO_LINE_CAP_ROUND ); + cairo_set_line_join( cairoImage, CAIRO_LINE_JOIN_ROUND ); + + if( isFillEnabled ) + { + cairo_set_line_width( cairoImage, aWidth ); + + cairo_move_to( cairoImage, (double) aStartPoint.x, (double) aStartPoint.y ); + cairo_line_to( cairoImage, (double) aEndPoint.x, (double) aEndPoint.y ); + } + else + { + VECTOR2D startEndVector = aEndPoint - aStartPoint; + double lineAngle = atan2( startEndVector.y, startEndVector.x ); + double lineLength = startEndVector.EuclideanNorm(); + + cairo_save( cairoImage ); + + cairo_translate( cairoImage, aStartPoint.x, aStartPoint.y ); + cairo_rotate( cairoImage, lineAngle ); + + cairo_arc( cairoImage, 0.0, 0.0, aWidth / 2.0, M_PI / 2.0, 3.0 * M_PI / 2.0 ); + cairo_arc( cairoImage, lineLength, 0.0, aWidth / 2.0, -M_PI / 2.0, M_PI / 2.0 ); + + cairo_move_to( cairoImage, 0.0, aWidth / 2.0 ); + cairo_line_to( cairoImage, lineLength, aWidth / 2.0 ); + + cairo_move_to( cairoImage, 0.0, -aWidth / 2.0 ); + cairo_line_to( cairoImage, lineLength, -aWidth / 2.0 ); + + cairo_restore( cairoImage ); + + } + + isElementAdded = true; +} + + void CAIRO_GAL::DrawCircle( VECTOR2D aCenterPoint, double aRadius ) { // A circle is drawn using an arc diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index c839cb62f0..e3747bca24 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -525,6 +525,45 @@ inline void OPENGL_GAL::drawLineQuad( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) } +void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aWidth ) +{ + VECTOR2D startEndVector = aEndPoint - aStartPoint; + double lineAngle = atan2( startEndVector.y, startEndVector.x ); + + if( isFillEnabled ) + { + glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + + SetLineWidth( aWidth ); + drawSemiCircle( aStartPoint, aWidth / 2, lineAngle + M_PI / 2, layerDepth ); + drawSemiCircle( aEndPoint, aWidth / 2, lineAngle - M_PI / 2, layerDepth ); + drawLineQuad( aStartPoint, aEndPoint ); + } + else + { + double lineLength = startEndVector.EuclideanNorm(); + + glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + + glPushMatrix(); + + glTranslated( aStartPoint.x, aStartPoint.y, 0.0 ); + glRotated( lineAngle * ( 360 / ( 2 * M_PI ) ), 0, 0, 1 ); + + drawLineQuad( VECTOR2D( 0.0, aWidth / 2.0 ), + VECTOR2D( lineLength, aWidth / 2.0 ) ); + + drawLineQuad( VECTOR2D( 0.0, -aWidth / 2.0 ), + VECTOR2D( lineLength, -aWidth / 2.0 ) ); + + DrawArc( VECTOR2D( 0.0, 0.0 ), aWidth / 2.0, M_PI / 2.0, 3.0 * M_PI / 2.0 ); + DrawArc( VECTOR2D( lineLength, 0.0 ), aWidth / 2.0, M_PI / 2.0, -M_PI / 2.0 ); + + glPopMatrix(); + } +} + + inline void OPENGL_GAL::drawLineCap( VECTOR2D aStartPoint, VECTOR2D aEndPoint, double aDepthOffset ) { VECTOR2D startEndVector = aEndPoint - aStartPoint; diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 87100c6016..7e69bd7c16 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -98,6 +98,9 @@ public: /// @copydoc GAL::DrawLine() virtual void DrawLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ); + /// @copydoc GAL::DrawSegment() + virtual void DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aWidth ); + /// @copydoc GAL::DrawPolyline() virtual void DrawPolyline( std::deque& aPointList ); diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index e5ea3c344f..b06cfef9f7 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -107,6 +107,17 @@ public: */ virtual void DrawLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) = 0; + /** + * @brief Draw a rounded segment. + * + * Start and end points are defined as 2D-Vectors. + * + * @param aStartPoint is the start point of the segment. + * @param aEndPoint is the end point of the segment. + * @param aWidth is a width of the segment + */ + virtual void DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aWidth ) = 0; + /** * @brief Draw a polyline * diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index d3539cc19d..2a8194144b 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -105,6 +105,9 @@ public: /// @copydoc GAL::DrawLine() virtual void DrawLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ); + /// @copydoc GAL::DrawSegment() + virtual void DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aWidth ); + /// @copydoc GAL::DrawPolyline() virtual void DrawPolyline( std::deque& aPointList ); diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 17664e814f..a46fd45531 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -224,42 +224,26 @@ void PCB_PAINTER::draw( const TRACK* aTrack ) { VECTOR2D start( aTrack->GetStart() ); VECTOR2D end( aTrack->GetEnd() ); - COLOR4D strokeColor = getLayerColor( aTrack->GetLayer(), aTrack->GetNet() ); + int width = aTrack->GetWidth(); + COLOR4D color = getLayerColor( aTrack->GetLayer(), aTrack->GetNet() ); + + m_gal->SetStrokeColor( color ); + m_gal->SetIsStroke( true ); - m_gal->SetLineCap( LINE_CAP_ROUND ); - m_gal->SetLineJoin( LINE_JOIN_ROUND ); - m_gal->SetStrokeColor( strokeColor ); if( m_pcbSettings->m_sketchModeSelect[TRACKS_VISIBLE] ) { // Outline mode - VECTOR2D line = end - start; - double length = line.EuclideanNorm(); - int width = aTrack->GetWidth(); - m_gal->SetLineWidth( m_pcbSettings->m_outlineWidth ); m_gal->SetIsFill( false ); - m_gal->SetIsStroke( true ); - m_gal->Save(); - - m_gal->Translate( start ); - m_gal->Rotate( line.Angle() ); - m_gal->DrawLine( VECTOR2D( 0, width / 2 ), - VECTOR2D( length, width / 2 ) ); - m_gal->DrawLine( VECTOR2D( 0, -width / 2 ), - VECTOR2D( length, -width / 2 ) ); - m_gal->DrawArc( VECTOR2D( 0, 0 ), width / 2, M_PI / 2, 3 * M_PI / 2 ); - m_gal->DrawArc( VECTOR2D( length, 0 ), width / 2, M_PI / 2, -M_PI / 2 ); - - m_gal->Restore(); } else { // Filled mode + m_gal->SetFillColor( color ); m_gal->SetIsFill( true ); - m_gal->SetIsStroke( false ); - m_gal->SetLineWidth( aTrack->GetWidth() ); - m_gal->DrawLine( start, end ); } + + m_gal->DrawSegment( start, end, width ); } From 869505a659ff074c4c8b573089ffeaa61fb32ad3 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 17 Apr 2013 12:48:37 +0200 Subject: [PATCH 042/415] Added const(..)& in GAL methods' parameters and change iterators to constant iterators. --- common/gal/cairo/cairo_gal.cpp | 23 ++++++------- common/gal/opengl/opengl_gal.cpp | 44 +++++++++++++----------- include/gal/cairo/cairo_gal.h | 22 ++++++------ include/gal/graphics_abstraction_layer.h | 22 ++++++------ include/gal/opengl/opengl_gal.h | 31 +++++++++-------- 5 files changed, 72 insertions(+), 70 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 741fad0761..48354070b1 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -293,7 +293,7 @@ void CAIRO_GAL::RestoreScreen() } -void CAIRO_GAL::DrawLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) +void CAIRO_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { cairo_move_to( cairoImage, aStartPoint.x, aStartPoint.y ); cairo_line_to( cairoImage, aEndPoint.x, aEndPoint.y ); @@ -341,7 +341,7 @@ void CAIRO_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPo } -void CAIRO_GAL::DrawCircle( VECTOR2D aCenterPoint, double aRadius ) +void CAIRO_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) { // A circle is drawn using an arc cairo_new_sub_path( cairoImage ); @@ -351,7 +351,7 @@ void CAIRO_GAL::DrawCircle( VECTOR2D aCenterPoint, double aRadius ) } -void CAIRO_GAL::DrawArc( VECTOR2D aCenterPoint, double aRadius, double aStartAngle, +void CAIRO_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double aStartAngle, double aEndAngle ) { SWAP( aStartAngle, >, aEndAngle ); @@ -368,7 +368,7 @@ void CAIRO_GAL::DrawPolyline( std::deque& aPointList ) bool isFirstPoint = true; // Iterate over the point list and draw the segments - for( std::deque::iterator it = aPointList.begin(); it != aPointList.end(); ++it ) + for( std::deque::const_iterator it = aPointList.begin(); it != aPointList.end(); ++it ) { if( isFirstPoint ) { @@ -410,7 +410,7 @@ void CAIRO_GAL::DrawPolygon( const std::deque& aPointList ) } -void CAIRO_GAL::DrawRectangle( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) +void CAIRO_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { // Calculate the diagonal points VECTOR2D diagonalPointA( aEndPoint.x, aStartPoint.y ); @@ -427,8 +427,8 @@ void CAIRO_GAL::DrawRectangle( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) } -void CAIRO_GAL::DrawCurve( VECTOR2D aStartPoint, VECTOR2D aControlPointA, - VECTOR2D aControlPointB, VECTOR2D aEndPoint ) +void CAIRO_GAL::DrawCurve( const VECTOR2D& aStartPoint, const VECTOR2D& aControlPointA, + const VECTOR2D& aControlPointB, const VECTOR2D& aEndPoint ) { cairo_move_to( cairoImage, aStartPoint.x, aStartPoint.y ); cairo_curve_to( cairoImage, aControlPointA.x, aControlPointA.y, aControlPointB.x, @@ -606,7 +606,7 @@ void CAIRO_GAL::Rotate( double aAngle ) } -void CAIRO_GAL::Translate( VECTOR2D aTranslation ) +void CAIRO_GAL::Translate( const VECTOR2D& aTranslation ) { storePath(); @@ -623,7 +623,7 @@ void CAIRO_GAL::Translate( VECTOR2D aTranslation ) } -void CAIRO_GAL::Scale( VECTOR2D aScale ) +void CAIRO_GAL::Scale( const VECTOR2D& aScale ) { storePath(); @@ -905,9 +905,8 @@ void CAIRO_GAL::initCursor( int aCursorSize ) } -VECTOR2D CAIRO_GAL::ComputeCursorToWorld( VECTOR2D aCursorPosition ) +VECTOR2D CAIRO_GAL::ComputeCursorToWorld( const VECTOR2D& aCursorPosition ) { - MATRIX3x3D inverseMatrix = worldScreenMatrix.Inverse(); VECTOR2D cursorPositionWorld = inverseMatrix * aCursorPosition; @@ -953,7 +952,7 @@ void CAIRO_GAL::DrawCursor( VECTOR2D aCursorPosition ) } -void CAIRO_GAL::DrawGridLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) +void CAIRO_GAL::DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { cairo_move_to( cairoImage, aStartPoint.x, aStartPoint.y ); cairo_line_to( cairoImage, aEndPoint.x, aEndPoint.y ); diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index e3747bca24..e0f5270342 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -439,7 +439,7 @@ inline void OPENGL_GAL::selectShader( int aIndex ) } -void OPENGL_GAL::drawRoundedSegment( VECTOR2D aStartPoint, VECTOR2D aEndPoint, +void OPENGL_GAL::drawRoundedSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aWidth, bool aStroke, bool aGlBegin ) { VECTOR2D l = (aEndPoint - aStartPoint); @@ -493,7 +493,7 @@ void OPENGL_GAL::drawRoundedSegment( VECTOR2D aStartPoint, VECTOR2D aEndPoint, } -inline void OPENGL_GAL::drawLineQuad( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) +inline void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { VECTOR2D startEndVector = aEndPoint - aStartPoint; double lineLength = startEndVector.EuclideanNorm(); @@ -564,10 +564,11 @@ void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndP } -inline void OPENGL_GAL::drawLineCap( VECTOR2D aStartPoint, VECTOR2D aEndPoint, double aDepthOffset ) +inline void OPENGL_GAL::drawLineCap( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, + double aDepthOffset ) { VECTOR2D startEndVector = aEndPoint - aStartPoint; - double lineLength = startEndVector.EuclideanNorm(); + // double lineLength = startEndVector.EuclideanNorm(); double lineAngle = atan2( startEndVector.y, startEndVector.x ); switch( lineCap ) @@ -582,16 +583,16 @@ inline void OPENGL_GAL::drawLineCap( VECTOR2D aStartPoint, VECTOR2D aEndPoint, d break; case LINE_CAP_SQUARED: - VECTOR2D offset; - offset = startEndVector * ( lineWidth / lineLength / 2.0 ); - aStartPoint = aStartPoint - offset; - aEndPoint = aEndPoint + offset; + // FIXME? VECTOR2D offset; + // offset = startEndVector * ( lineWidth / lineLength / 2.0 ); + // aStartPoint = aStartPoint - offset; + // aEndPoint = aEndPoint + offset; break; } } -void OPENGL_GAL::DrawLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) +void OPENGL_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { if( isUseShader ) { @@ -816,7 +817,7 @@ void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) } -void OPENGL_GAL::DrawRectangle( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) +void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { // Compute the diagonal points of the rectangle VECTOR2D diagonalPointA( aEndPoint.x, aStartPoint.y ); @@ -890,7 +891,7 @@ void OPENGL_GAL::DrawRectangle( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) } -void OPENGL_GAL::DrawCircle( VECTOR2D aCenterPoint, double aRadius ) +void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) { // We need a minimum radius, else simply don't draw the circle if( aRadius <= 0.0 ) @@ -959,7 +960,7 @@ void OPENGL_GAL::DrawCircle( VECTOR2D aCenterPoint, double aRadius ) // This method is used for round line caps -void OPENGL_GAL::drawSemiCircle( VECTOR2D aCenterPoint, double aRadius, double aAngle, +void OPENGL_GAL::drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle, double aDepthOffset ) { // XXX Depth seems to be buggy @@ -975,7 +976,7 @@ void OPENGL_GAL::drawSemiCircle( VECTOR2D aCenterPoint, double aRadius, double a // FIXME Optimize -void OPENGL_GAL::DrawArc( VECTOR2D aCenterPoint, double aRadius, double aStartAngle, +void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double aStartAngle, double aEndAngle ) { if( aRadius <= 0 ) @@ -1158,8 +1159,8 @@ void OPENGL_GAL::DrawPolygon( const std::deque& aPointList ) } -void OPENGL_GAL::DrawCurve( VECTOR2D aStartPoint, VECTOR2D aControlPointA, - VECTOR2D aControlPointB, VECTOR2D aEndPoint ) +void OPENGL_GAL::DrawCurve( const VECTOR2D& aStartPoint, const VECTOR2D& aControlPointA, + const VECTOR2D& aControlPointB, const VECTOR2D& aEndPoint ) { // FIXME The drawing quality needs to be improved // FIXME Perhaps choose a quad/triangle strip instead? @@ -1266,13 +1267,13 @@ void OPENGL_GAL::Rotate( double aAngle ) } -void OPENGL_GAL::Translate( VECTOR2D aVector ) +void OPENGL_GAL::Translate( const VECTOR2D& aVector ) { glTranslated( aVector.x, aVector.y, 0 ); } -void OPENGL_GAL::Scale( VECTOR2D aScale ) +void OPENGL_GAL::Scale( const VECTOR2D& aScale ) { // TODO: Check method glScaled( aScale.x, aScale.y, 0 ); @@ -1487,11 +1488,12 @@ void OPENGL_GAL::initCursor( int aCursorSize ) } -VECTOR2D OPENGL_GAL::ComputeCursorToWorld( VECTOR2D aCursorPosition ) +VECTOR2D OPENGL_GAL::ComputeCursorToWorld( const VECTOR2D& aCursorPosition ) { - aCursorPosition.y = screenSize.y - aCursorPosition.y; + VECTOR2D cursorPosition = aCursorPosition; + cursorPosition.y = screenSize.y - aCursorPosition.y; MATRIX3x3D inverseMatrix = worldScreenMatrix.Inverse(); - VECTOR2D cursorPositionWorld = inverseMatrix * aCursorPosition; + VECTOR2D cursorPositionWorld = inverseMatrix * cursorPosition; return cursorPositionWorld; } @@ -1552,7 +1554,7 @@ void OPENGL_GAL::DrawCursor( VECTOR2D aCursorPosition ) } -void OPENGL_GAL::DrawGridLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) +void OPENGL_GAL::DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { // We check, if we got a horizontal or a vertical grid line and compute the offset VECTOR2D perpendicularVector; diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 7e69bd7c16..767f5a2701 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -96,7 +96,7 @@ public: virtual void EndDrawing(); /// @copydoc GAL::DrawLine() - virtual void DrawLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ); + virtual void DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); /// @copydoc GAL::DrawSegment() virtual void DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aWidth ); @@ -105,21 +105,21 @@ public: virtual void DrawPolyline( std::deque& aPointList ); /// @copydoc GAL::DrawCircle() - virtual void DrawCircle( VECTOR2D aCenterPoint, double aRadius ); + virtual void DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ); /// @copydoc GAL::DrawArc() virtual void - DrawArc( VECTOR2D aCenterPoint, double aRadius, double aStartAngle, double aEndAngle ); + DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double aStartAngle, double aEndAngle ); /// @copydoc GAL::DrawRectangle() - virtual void DrawRectangle( VECTOR2D aStartPoint, VECTOR2D aEndPoint ); + virtual void DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); /// @copydoc GAL::DrawPolygon() virtual void DrawPolygon( const std::deque& aPointList ); /// @copydoc GAL::DrawCurve() - virtual void DrawCurve( VECTOR2D startPoint, VECTOR2D controlPointA, VECTOR2D controlPointB, - VECTOR2D endPoint ); + virtual void DrawCurve( const VECTOR2D& startPoint, const VECTOR2D& controlPointA, + const VECTOR2D& controlPointB, const VECTOR2D& endPoint ); // -------------- // Screen methods @@ -188,10 +188,10 @@ public: virtual void Rotate( double aAngle ); /// @copydoc GAL::Translate() - virtual void Translate( VECTOR2D aTranslation ); + virtual void Translate( const VECTOR2D& aTranslation ); /// @copydoc GAL::Scale() - virtual void Scale( VECTOR2D aScale ); + virtual void Scale( const VECTOR2D& aScale ); /// @copydoc GAL::Save() virtual void Save(); @@ -235,7 +235,7 @@ public: void SetScreenDPI( double aScreenDPI ); /// @copydoc GAL::SetLookAtPoint() - void SetLookAtPoint( VECTOR2D aPoint ); + void SetLookAtPoint( const VECTOR2D& aPoint ); /// @copydoc GAL::GetLookAtPoint() VECTOR2D GetLookAtPoint(); @@ -257,7 +257,7 @@ public: // ------- /// @copydoc GAL::ComputeCursorToWorld() - virtual VECTOR2D ComputeCursorToWorld( VECTOR2D aCursorPosition ); + virtual VECTOR2D ComputeCursorToWorld( const VECTOR2D& aCursorPosition ); /// @copydoc GAL::SetIsCursorEnabled() void SetIsCursorEnabled( bool aIsCursorEnabled ); @@ -290,7 +290,7 @@ public: } protected: - virtual void DrawGridLine(VECTOR2D aStartPoint, VECTOR2D aEndPoint); + virtual void DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); private: /// Super class definition diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index b06cfef9f7..40bf33b5c8 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -105,7 +105,7 @@ public: * @param aStartPoint is the start point of the line. * @param aEndPoint is the end point of the line. */ - virtual void DrawLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) = 0; + virtual void DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) = 0; /** * @brief Draw a rounded segment. @@ -131,7 +131,7 @@ public: * @param aCenterPoint is the center point of the circle. * @param aRadius is the radius of the circle. */ - virtual void DrawCircle( VECTOR2D aCenterPoint, double aRadius ) = 0; + virtual void DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) = 0; /** * @brief Draw an arc. @@ -142,7 +142,7 @@ public: * @param aEndAngle is the end angle of the arc. */ virtual void - DrawArc( VECTOR2D aCenterPoint, double aRadius, double aStartAngle, double aEndAngle ) = 0; + DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double aStartAngle, double aEndAngle ) = 0; /** * @brief Draw a rectangle. @@ -150,7 +150,7 @@ public: * @param aStartPoint is the start point of the rectangle. * @param aEndPoint is the end point of the rectangle. */ - virtual void DrawRectangle( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) = 0; + virtual void DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) = 0; /** * @brief Draw a polygon. @@ -167,8 +167,8 @@ public: * @param controlPointB is the second control point. * @param endPoint is the end point of the spline. */ - virtual void DrawCurve( VECTOR2D startPoint, VECTOR2D controlPointA, - VECTOR2D controlPointB, VECTOR2D endPoint ) = 0; + virtual void DrawCurve( const VECTOR2D& startPoint, const VECTOR2D& controlPointA, + const VECTOR2D& controlPointB, const VECTOR2D& endPoint ) = 0; // -------------- // Screen methods @@ -326,14 +326,14 @@ public: * * @param aTranslation is the translation vector. */ - virtual void Translate( VECTOR2D aTranslation ) = 0; + virtual void Translate( const VECTOR2D& aTranslation ) = 0; /** * @brief Scale the context. * * @param aScale is the scale factor for the x- and y-axis. */ - virtual void Scale( VECTOR2D aScale ) = 0; + virtual void Scale( const VECTOR2D& aScale ) = 0; /// @brief Save the context. virtual void Save() = 0; @@ -476,7 +476,7 @@ public: * @param aDepthRange is the depth range where component x is the near clipping plane and y * is the far clipping plane. */ - inline void SetDepthRange( VECTOR2D aDepthRange ) + inline void SetDepthRange( const VECTOR2D& aDepthRange ) { depthRange = aDepthRange; } @@ -617,7 +617,7 @@ public: * @param aCursorPosition is the cursor position in screen coordinates. * @return the cursor position in world coordinates. */ - virtual VECTOR2D ComputeCursorToWorld( VECTOR2D aCursorPosition ) = 0; + virtual VECTOR2D ComputeCursorToWorld( const VECTOR2D& aCursorPosition ) = 0; /** * @brief Enable/Disable cursor. @@ -720,7 +720,7 @@ protected: * @param aStartPoint is the start point of the line. * @param aEndPoint is the end point of the line. */ - virtual void DrawGridLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ) = 0; + virtual void DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) = 0; }; } // namespace KiGfx diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 2a8194144b..bf967c2060 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -103,7 +103,7 @@ public: virtual void EndDrawing(); /// @copydoc GAL::DrawLine() - virtual void DrawLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ); + virtual void DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); /// @copydoc GAL::DrawSegment() virtual void DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aWidth ); @@ -112,21 +112,21 @@ public: virtual void DrawPolyline( std::deque& aPointList ); /// @copydoc GAL::DrawCircle() - virtual void DrawCircle( VECTOR2D aCenterPoint, double aRadius ); + virtual void DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ); /// @copydoc GAL::DrawArc() virtual void - DrawArc( VECTOR2D aCenterPoint, double aRadius, double aStartAngle, double aEndAngle ); + DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double aStartAngle, double aEndAngle ); /// @copydoc GAL::DrawRectangle() - virtual void DrawRectangle( VECTOR2D aStartPoint, VECTOR2D aEndPoint ); + virtual void DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); /// @copydoc GAL::DrawPolygon() virtual void DrawPolygon( const std::deque& aPointList ); /// @copydoc GAL::DrawCurve() - virtual void DrawCurve( VECTOR2D startPoint, VECTOR2D controlPointA, VECTOR2D controlPointB, - VECTOR2D endPoint ); + virtual void DrawCurve( const VECTOR2D& startPoint, const VECTOR2D& controlPointA, + const VECTOR2D& controlPointB, const VECTOR2D& endPoint ); // -------------- // Screen methods @@ -206,10 +206,10 @@ public: virtual void Rotate( double aAngle ); /// @copydoc GAL::Translate() - virtual void Translate( VECTOR2D aTranslation ); + virtual void Translate( const VECTOR2D& aTranslation ); /// @copydoc GAL::Scale() - virtual void Scale( VECTOR2D aScale ); + virtual void Scale( const VECTOR2D& aScale ); /// @copydoc GAL::Save() virtual void Save(); @@ -253,7 +253,7 @@ public: void SetScreenDPI( double aScreenDPI ); /// @copydoc GAL::SetLookAtPoint() - void SetLookAtPoint( VECTOR2D aPoint ); + void SetLookAtPoint( const VECTOR2D& aPoint ); /// @copydoc GAL::GetLookAtPoint() VECTOR2D GetLookAtPoint(); @@ -275,7 +275,7 @@ public: // ------- /// @copydoc GAL::ComputeCursorToWorld() - virtual VECTOR2D ComputeCursorToWorld( VECTOR2D aCursorPosition ); + virtual VECTOR2D ComputeCursorToWorld( const VECTOR2D& aCursorPosition ); /// @copydoc GAL::SetIsCursorEnabled() void SetIsCursorEnabled( bool aIsCursorEnabled ); @@ -313,7 +313,7 @@ public: } protected: - virtual void DrawGridLine( VECTOR2D aStartPoint, VECTOR2D aEndPoint ); + virtual void DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); private: /// Super class definition @@ -384,7 +384,7 @@ private: * @param ADepthOffset is the relative depth of the semi-circle. * */ - void drawSemiCircle( VECTOR2D aCenterPoint, double aRadius, double aAngle, + void drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle, double aDepthOffset ); /// Compute the points of a unit circle. @@ -470,7 +470,7 @@ private: * @param aStartPoint is the start point of the line. * @param aEndPoint is the end point of the line. */ - inline void drawLineQuad( VECTOR2D aStartPoint, VECTOR2D aEndPoint ); + inline void drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); /** * @brief Draw the line cap @@ -479,12 +479,13 @@ private: * @param aEndPoint is the end point of the line. * @param aDepthOffset is the relative depth of the line cap. */ - inline void drawLineCap( VECTOR2D aStartPoint, VECTOR2D aEndPoint, double aDepthOffset ); + inline void drawLineCap( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, + double aDepthOffset ); inline void selectShader( int aIndex ); /// @copydoc GAL::DrawRoundedSegment() - void drawRoundedSegment( VECTOR2D aStartPoint, VECTOR2D aEndPoint, double aWidth, + void drawRoundedSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aWidth, bool aStroke = false, bool aGlBegin = false ); From f9e5881b45aba2466c0f1f2f1fd738f0c5eabb6c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 17 Apr 2013 12:50:38 +0200 Subject: [PATCH 043/415] Removed unnecessary calls to cairo drawing functions. --- common/gal/cairo/cairo_gal.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 48354070b1..410d4d829a 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -403,9 +403,6 @@ void CAIRO_GAL::DrawPolygon( const std::deque& aPointList ) } } - cairo_set_source_rgba( cairoImage, fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - cairo_fill_preserve( cairoImage ); - isElementAdded = true; } From d1635e17f6e1e5ea532e50e236893a5c8c1b19b2 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 17 Apr 2013 13:12:54 +0200 Subject: [PATCH 044/415] Fixed drawing of PCB_TARGET items. --- pcbnew/pcb_painter.cpp | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index a46fd45531..b8385f661b 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -550,21 +550,37 @@ void PCB_PAINTER::draw( const DIMENSION* aDimension ) void PCB_PAINTER::draw( const PCB_TARGET* aTarget ) { - COLOR4D strokeColor = getLayerColor( aTarget->GetLayer(), 0 ); - double radius; + COLOR4D strokeColor = getLayerColor( aTarget->GetLayer(), 0 ); + VECTOR2D position( aTarget->GetPosition() ); + double size, radius; - // according to PCB_TARGET::Draw() (class_mire.cpp) - if( aTarget->GetShape() ) // shape X + m_gal->SetLineWidth( aTarget->GetWidth() ); + m_gal->SetStrokeColor( strokeColor ); + m_gal->SetIsFill( false ); + m_gal->SetIsStroke( true ); + + m_gal->Save(); + m_gal->Translate( position ); + + if( aTarget->GetShape() ) { - radius = aTarget->GetSize() / 2; + // shape x + m_gal->Rotate( M_PI / 4.0 ); + size = 2.0 * aTarget->GetSize() / 3.0; + radius = aTarget->GetSize() / 2.0; } else { - radius = aTarget->GetSize() / 3; + // shape + + size = aTarget->GetSize() / 2.0; + radius = aTarget->GetSize() / 3.0; } - m_gal->SetStrokeColor( strokeColor ); - m_gal->SetIsFill( true ); - m_gal->SetIsStroke( true ); - m_gal->DrawCircle( VECTOR2D( aTarget->GetPosition() ), radius ); + m_gal->DrawLine( VECTOR2D( -size, 0.0 ), + VECTOR2D( size, 0.0 ) ); + m_gal->DrawLine( VECTOR2D( 0.0, -size ), + VECTOR2D( 0.0, size ) ); + m_gal->DrawCircle( VECTOR2D( 0.0, 0.0 ), radius ); + + m_gal->Restore(); } From 6c745e6e9be36649e23e0781d05668091a853e15 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 17 Apr 2013 13:59:46 +0200 Subject: [PATCH 045/415] Fix for drawing polygons. --- pcbnew/pcb_painter.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index b8385f661b..c2af819618 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -486,7 +486,6 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aContainer ) COLOR4D fillColor = getLayerColor( aContainer->GetLayer(), aContainer->GetNet() ); std::vector::iterator polyIterator; std::deque corners; - VECTOR2D startPoint; int fillMode = aContainer->GetFillMode(); m_gal->SetFillColor( fillColor ); @@ -501,23 +500,15 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aContainer ) if( fillMode == 0 ) { - startPoint = VECTOR2D( polyPoints.front() ); for( polyIterator = polyPoints.begin(); polyIterator != polyPoints.end(); polyIterator++ ) { // Find out all of polygons and then draw them - if( !polyIterator->end_contour ) - { - corners.push_back( VECTOR2D( *polyIterator ) ); - } - else + corners.push_back( VECTOR2D( *polyIterator ) ); + + if( polyIterator->end_contour ) { m_gal->DrawPolygon( corners ); - - // Closing point for polyline - corners.push_back( VECTOR2D( startPoint ) ); m_gal->DrawPolyline( corners ); - startPoint = VECTOR2D( *( polyIterator + 1 ) ); - corners.clear(); } } From ec9e283d34519fc65893eb1aeb8df412a086adf4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 18 Apr 2013 11:20:19 +0200 Subject: [PATCH 046/415] Fixed resize issue (moved GAL panel into pane). Tidied up event handlers. --- common/drawframe.cpp | 13 +++-- common/drawpanel.cpp | 15 ------ common/drawpanel_gal.cpp | 5 +- common/gal/cairo/cairo_gal.cpp | 65 ++--------------------- common/gal/graphics_abstraction_layer.cpp | 2 - common/gal/opengl/opengl_gal.cpp | 8 --- include/class_drawpanel.h | 3 -- include/class_drawpanel_gal.h | 3 -- include/gal/cairo/cairo_gal.h | 11 +--- include/gal/graphics_abstraction_layer.h | 2 - include/gal/opengl/opengl_gal.h | 9 +--- pcbnew/basepcbframe.cpp | 4 +- pcbnew/pcbframe.cpp | 4 ++ 13 files changed, 22 insertions(+), 122 deletions(-) diff --git a/common/drawframe.cpp b/common/drawframe.cpp index c723a30cd0..d2eb982f47 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -966,20 +966,23 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) view->SetCenter( VECTOR2D( m_canvas->GetScreenCenterLogicalPosition() ) ); - m_galCanvas->Show(); - m_galCanvas->Refresh(); + // Switch panes + m_auimgr.GetPane( wxT( "DrawFrame" ) ).Hide(); + m_auimgr.GetPane( wxT( "DrawFrameGal" ) ).Show(); + m_auimgr.Update(); } else { - m_galCanvas->Hide(); - double zoom = 1 / ( zoomFactor * view->GetScale() ); m_canvas->SetZoom( zoom ); VECTOR2D center = view->GetCenter(); RedrawScreen( wxPoint( center.x, center.y ), false ); - m_canvas->Show(); + // Switch panes + m_auimgr.GetPane( wxT( "DrawFrameGal" ) ).Hide(); + m_auimgr.GetPane( wxT( "DrawFrame" ) ).Show(); + m_auimgr.Update(); } m_galCanvasActive = aEnable; diff --git a/common/drawpanel.cpp b/common/drawpanel.cpp index cdb2db0dfe..2b8b6d4fd1 100644 --- a/common/drawpanel.cpp +++ b/common/drawpanel.cpp @@ -75,9 +75,6 @@ BEGIN_EVENT_TABLE( EDA_DRAW_PANEL, wxScrolledWindow ) EVT_ERASE_BACKGROUND( EDA_DRAW_PANEL::OnEraseBackground ) EVT_SCROLLWIN( EDA_DRAW_PANEL::OnScroll ) EVT_ACTIVATE( EDA_DRAW_PANEL::OnActivate ) -#ifdef KICAD_GAL - EVT_SIZE( EDA_DRAW_PANEL::OnSize ) -#endif EVT_MENU_RANGE( ID_PAN_UP, ID_PAN_RIGHT, EDA_DRAW_PANEL::OnPan ) END_EVENT_TABLE() @@ -1381,18 +1378,6 @@ void EDA_DRAW_PANEL::OnPan( wxCommandEvent& event ) } -#ifdef KICAD_GAL -void EDA_DRAW_PANEL::OnSize( wxSizeEvent& SizeEv ) -{ - if( GetParent()->GetGalCanvas() != NULL ) - { - GetParent()->GetGalCanvas()->SetPosition( GetPosition() ); - GetParent()->GetGalCanvas()->SetSize( GetSize() ); - } -} -#endif - - void EDA_DRAW_PANEL::EndMouseCapture( int id, int cursor, const wxString& title, bool aCallEndFunc ) { diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 480713012c..77d8faf8fd 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -44,8 +44,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWindowId, const wxPoint& aPosition, const wxSize& aSize, GalType aGalType ) : - wxWindow( aParentWindow, aWindowId, aPosition, aSize ), - m_screenSize( aSize.x, aSize.y ), m_parentFrame( aParentWindow ) + wxWindow( aParentWindow, aWindowId, aPosition, aSize ) { m_gal = NULL; m_view = NULL; @@ -78,7 +77,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin m_viewControls = new KiGfx::WX_VIEW_CONTROLS( m_view, this ); - Connect( KiGfx::EVT_GAL_REDRAW, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); + Connect( wxEVT_PAINT, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this ); } diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 410d4d829a..1a6accc113 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -52,7 +52,6 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, SetSize( aParent->GetSize() ); // Connecting the event handlers - Connect( wxEVT_SIZE, wxSizeEventHandler( CAIRO_GAL::onSize ) ); Connect( wxEVT_PAINT, wxPaintEventHandler( CAIRO_GAL::onPaint ) ); // Mouse events are skipped to the parent @@ -115,15 +114,6 @@ void CAIRO_GAL::ResizeScreen( int aWidth, int aHeight ) allocateBitmaps(); SetSize( wxSize( aWidth, aHeight ) ); - - PostPaint(); -} - - -void CAIRO_GAL::onSize( wxSizeEvent& aEvent ) -{ - ResizeScreen( aEvent.GetSize().x, aEvent.GetSize().y ); - PostPaint(); } @@ -188,46 +178,6 @@ void CAIRO_GAL::EndDrawing() // Force remaining objects to be drawn Flush(); - // FIXME Accelerate support for wxWidgets 2.8.10 - -#if wxCHECK_VERSION( 2, 9, 0 ) - // Copy the cairo image contents to the wxBitmap - wxNativePixelData pixelData( *wxBitmap_ ); - - if( !pixelData ) - { - wxLogError( wxString::FromUTF8( "Can't access pixel data!" ) ); - return; - } - - wxNativePixelData::Iterator pixelIterator( pixelData ); - - int offset = 0; - - // Copy the cairo image to the wxDC bitmap - for( int j = 0; j < screenSize.y; j++ ) - { - offset = j * (int) screenSize.x; - - for( int column = 0; column < clientRectangle.width; column++ ) - { - unsigned int value = bitmapBuffer[offset + column]; - pixelIterator.Red() = value >> 16; - pixelIterator.Green() = value >> 8; - pixelIterator.Blue() = value; - pixelIterator++; - } - - pixelIterator.MoveTo( pixelData, 0, j ); - } - - // Blit the contents to the screen - wxClientDC client_dc( this ); - wxBufferedDC dc( &client_dc ); - dc.DrawBitmap( *wxBitmap_, 0, 0 ); - -#elif wxCHECK_VERSION( 2, 8, 0 ) - // This code was taken from the wxCairo example - it's not the most efficient one // Here is a good place for optimizations @@ -237,12 +187,9 @@ void CAIRO_GAL::EndDrawing() for( size_t count = 0; count < bufferSize; count++ ) { unsigned int value = bitmapBuffer[count]; - // Red pixel - *wxOutputPtr++ = (value >> 16) & 0xff; - // Green pixel - *wxOutputPtr++ = (value >> 8) & 0xff; - // Blue pixel - *wxOutputPtr++ = (value >> 0) & 0xff; + *wxOutputPtr++ = (value >> 16) & 0xff; // Red pixel + *wxOutputPtr++ = (value >> 8) & 0xff; // Green pixel + *wxOutputPtr++ = value & 0xff; // Blue pixel } wxImage img( (int) screenSize.x, (int) screenSize.y, (unsigned char*) wxOutput, true); @@ -252,10 +199,6 @@ void CAIRO_GAL::EndDrawing() // client_dc.DrawBitmap(bmp, 0, 0, false); dc.Init( &client_dc, bmp ); -#else -#error "need wxWidgets-2.8 as a minimum" -#endif - // Destroy Cairo objects cairo_destroy( cairoImage ); cairo_surface_destroy( cairoSurface ); @@ -967,7 +910,6 @@ void CAIRO_GAL::allocateBitmaps() bitmapBuffer = new unsigned int[bufferSize]; bitmapBufferBackup = new unsigned int[bufferSize]; wxOutput = new unsigned char[bufferSize * 4]; - wxBitmap_ = new wxBitmap( screenSize.x, screenSize.y, SCREEN_DEPTH ); } @@ -976,7 +918,6 @@ void CAIRO_GAL::deleteBitmaps() delete[] bitmapBuffer; delete[] bitmapBufferBackup; delete[] wxOutput; - delete wxBitmap_; } diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index e34efb2cba..a996fcbafb 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -33,8 +33,6 @@ using namespace KiGfx; -const wxEventType KiGfx::EVT_GAL_REDRAW = wxNewEventType(); - GAL::GAL() { // Set the default values for the internal variables diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index e0f5270342..1bb9bb3c33 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -88,7 +88,6 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, SetGridLineWidth( 1.0 ); // Connecting the event handlers. - Connect( wxEVT_SIZE, wxSizeEventHandler( OPENGL_GAL::onSize ) ); Connect( wxEVT_PAINT, wxPaintEventHandler( OPENGL_GAL::onPaint ) ); // Mouse events are skipped to the parent @@ -147,13 +146,6 @@ void OPENGL_GAL::ResizeScreen( int aWidth, int aHeight ) } -void OPENGL_GAL::onSize( wxSizeEvent& aEvent ) -{ - ResizeScreen( aEvent.GetSize().x, aEvent.GetSize().y ); - PostPaint(); -} - - void OPENGL_GAL::skipMouseEvent( wxMouseEvent& aEvent ) { // Post the mouse event to the event listener registered in constructor, if any diff --git a/include/class_drawpanel.h b/include/class_drawpanel.h index dcca64cb88..0e3fe4cf22 100644 --- a/include/class_drawpanel.h +++ b/include/class_drawpanel.h @@ -258,9 +258,6 @@ public: void OnCharHook( wxKeyEvent& event ); void OnPan( wxCommandEvent& event ); -#ifdef KICAD_GAL - void OnSize( wxSizeEvent& event ); -#endif void EraseScreen( wxDC* DC ); void OnScrollWin( wxCommandEvent& event ); diff --git a/include/class_drawpanel_gal.h b/include/class_drawpanel_gal.h index acde693b9a..6629908a3a 100644 --- a/include/class_drawpanel_gal.h +++ b/include/class_drawpanel_gal.h @@ -88,9 +88,6 @@ protected: ///< using GAL KiGfx::WX_VIEW_CONTROLS* m_viewControls; ///< Control for VIEW (moving, zooming, etc.) - VECTOR2D m_screenSize; ///< Stores current screen size - wxWindow* m_parentFrame; ///< Pointer to the parent frame - std::string m_galShaderPath; ///< Path to shader files, used in OpenGL mode }; diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 767f5a2701..06db9f1f28 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -274,7 +274,7 @@ public: { if( paintListener ) { - wxCommandEvent redrawEvent( EVT_GAL_REDRAW ); + wxPaintEvent redrawEvent; wxPostEvent( paintListener, redrawEvent ); } } @@ -361,10 +361,8 @@ private: cairo_surface_t* cairoSurface; ///< Cairo surface unsigned int* bitmapBuffer; ///< Storage of the cairo image unsigned int* bitmapBufferBackup; ///< Backup storage of the cairo image - wxBitmap* wxBitmap_; ///< Pointer to the wxWidgets bitmap int stride; ///< Stride value for Cairo // wxClientDC* clientDC; ///< Pointer to the clientDC - int screenSizeY; ///< Vertical size of the actual surface // Mapping between Cairo and GAL line attributes std::map lineCapMap; ///< Line cap style mapping @@ -381,13 +379,6 @@ private: */ void onPaint( wxPaintEvent& aEvent ); - /** - * @brief Window resizing event handler. - * - * @param aEvent is the resizing event. - */ - void onSize( wxSizeEvent& aEvent ); - /** * @brief Mouse event handler, forwards the event to the child. * diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 40bf33b5c8..b6a114ca3c 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -38,8 +38,6 @@ namespace KiGfx { -// Event declaration -extern const wxEventType EVT_GAL_REDRAW; /** * LineCap: Type definition of the line end point style diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index bf967c2060..ce4ff73c39 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -292,7 +292,7 @@ public: { if( paintListener ) { - wxCommandEvent redrawEvent( EVT_GAL_REDRAW ); + wxPaintEvent redrawEvent; wxPostEvent( paintListener, redrawEvent ); } } @@ -411,13 +411,6 @@ private: */ void onPaint( wxPaintEvent& aEvent ); - /** - * @brief Window resizing event handler. - * - * @param aEvent is the window resizing event. - */ - void onSize( wxSizeEvent& aEvent ); - /** * @brief Skip the mouse event to the parent. * diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index a2b641508c..6b48ea89ac 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -134,7 +134,6 @@ PCB_BASE_FRAME::PCB_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, #ifdef KICAD_GAL m_galCanvas = new EDA_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize, EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL ); - m_galCanvas->Hide(); #endif /* KICAD_GAL */ m_auxiliaryToolBar = NULL; @@ -242,6 +241,9 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) } view->SetTopLayer( m_Pcb->GetLayer() ); + + if( m_galCanvasActive ) + m_galCanvas->Refresh(); } #endif } diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 439105b92b..b28b743e5e 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -416,6 +416,10 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title, m_auimgr.AddPane( m_canvas, wxAuiPaneInfo().Name( wxT( "DrawFrame" ) ).CentrePane() ); + if( m_galCanvas ) + m_auimgr.AddPane( m_galCanvas, + wxAuiPaneInfo().Name( wxT( "DrawFrameGal" ) ).CentrePane().Hide() ); + if( m_messagePanel ) m_auimgr.AddPane( m_messagePanel, wxAuiPaneInfo( mesg ).Name( wxT( "MsgPanel" ) ).Bottom().Layer(10) ); From 1e9088f7d235a13b0a4309a1e874bf7568843ef2 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 18 Apr 2013 11:46:23 +0200 Subject: [PATCH 047/415] Fixed non-GAL build. --- common/drawframe.cpp | 2 ++ pcbnew/pcbframe.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/common/drawframe.cpp b/common/drawframe.cpp index d2eb982f47..92f7a495eb 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -945,6 +945,7 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU ) void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) { +#ifdef KICAD_GAL if( aEnable && m_galCanvasActive ) { // When we switch between GAL based canvases, all we need is a refresh @@ -986,4 +987,5 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) } m_galCanvasActive = aEnable; +#endif /* KICAD_GAL */ } diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index b28b743e5e..bfbfe9d2fe 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -417,7 +417,7 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title, wxAuiPaneInfo().Name( wxT( "DrawFrame" ) ).CentrePane() ); if( m_galCanvas ) - m_auimgr.AddPane( m_galCanvas, + m_auimgr.AddPane( (wxWindow*) m_galCanvas, wxAuiPaneInfo().Name( wxT( "DrawFrameGal" ) ).CentrePane().Hide() ); if( m_messagePanel ) From 2b0c4ba2158c880bcc4fb5a74d550de0abe266fe Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 18 Apr 2013 17:10:02 +0200 Subject: [PATCH 048/415] Turned on group recaching on GAL change. --- common/view/view.cpp | 39 +++++++++++++++++++++++++++++++-------- include/view/view.h | 4 ++++ 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 339ac77e6e..7616f5397c 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -143,7 +143,7 @@ VIEW::VIEW( bool aIsDynamic, bool aUseGroups ) : m_dynamic( aIsDynamic ), m_useGroups( aUseGroups ) { - // By default there is not layer on the top + // By default there is no layer on the top m_topLayer.enabled = false; } @@ -201,6 +201,10 @@ void VIEW::SetGAL( GAL* aGal ) { m_gal = aGal; + // items need to be recached after changing GAL + if( m_useGroups ) + itemsRecache(); + // force the new GAL to display the current viewport. SetCenter( m_center ); SetScale( m_scale ); @@ -374,19 +378,14 @@ struct VIEW::drawItem { group = gal->BeginGroup(); aItem->m_cachedGroup = group; - aItem->ViewDraw( 0, gal, tmp ); + view->m_painter->Draw( static_cast( aItem ), currentLayer ); gal->EndGroup(); gal->DrawGroup( group ); } } else if( aItem->ViewIsVisible() ) { - if( !( view->m_painter - && view->m_painter->Draw( static_cast( aItem ), currentLayer ) ) ) - { - // Fallback, if there is no painter or painter does not know how to draw aItem - aItem->ViewDraw( currentLayer, gal, tmp ); - } + view->m_painter->Draw( static_cast( aItem ), currentLayer ); } time += rdtsc() - ts; @@ -445,6 +444,15 @@ struct VIEW::unlinkItem }; +struct VIEW::recacheItem +{ + void operator()( VIEW_ITEM* aItem ) + { + aItem->m_cachedGroup = -1; + } +}; + + void VIEW::Clear() { BOX2I r; @@ -544,3 +552,18 @@ void VIEW::clearGroupCache() l->items->Query( r, visitor ); }; } + + +void VIEW::itemsRecache() +{ + BOX2I r; + + r.SetMaximum(); + + for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) + { + VIEW_LAYER* l = & ( ( *i ).second ); + recacheItem visitor; + l->items->Query( r, visitor ); + }; +} diff --git a/include/view/view.h b/include/view/view.h index 8f25f45081..d7c879ee47 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -328,6 +328,7 @@ private: // Function objects that need to access VIEW/VIEW_ITEM private/protected members struct clearItemCache; struct unlinkItem; + struct recacheItem; struct drawItem; ///* Saves current top layer settings in order to restore it when it's not top anymore @@ -349,6 +350,9 @@ private: ///* Clears cached GAL display lists void clearGroupCache(); + ///* Rebuilds GAL display lists + void itemsRecache(); + /// Determines rendering order of layers. Used in display order sorting function. static bool compareRenderingOrder( VIEW_LAYER* i, VIEW_LAYER* j ) { From 98addf78b49ba35da2df6febb47741d3cac691ea Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 19 Apr 2013 18:19:20 +0200 Subject: [PATCH 049/415] Some cleanup. --- common/drawpanel_gal.cpp | 5 +++-- common/gal/cairo/cairo_gal.cpp | 10 ++++++---- common/gal/opengl/opengl_gal.cpp | 7 ------- common/view/view.cpp | 4 ++++ common/view/wx_view_controls.cpp | 2 +- include/gal/graphics_abstraction_layer.h | 6 +++--- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 77d8faf8fd..107e8ff543 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -46,8 +46,9 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin GalType aGalType ) : wxWindow( aParentWindow, aWindowId, aPosition, aSize ) { - m_gal = NULL; - m_view = NULL; + m_gal = NULL; + m_view = NULL; + m_painter = NULL; m_galShaderPath = std::string( ::wxGetCwd().mb_str() ) + "/../../gal/opengl/shader/"; diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 1a6accc113..ff0fb47b39 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -25,7 +25,7 @@ */ #include -#include +#include #include #include @@ -93,6 +93,9 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, CAIRO_GAL::~CAIRO_GAL() { + delete cursorPixels; + delete cursorPixelsSaved; + // TODO Deleting of list contents like groups and paths deleteBitmaps(); } @@ -192,11 +195,10 @@ void CAIRO_GAL::EndDrawing() *wxOutputPtr++ = value & 0xff; // Blue pixel } - wxImage img( (int) screenSize.x, (int) screenSize.y, (unsigned char*) wxOutput, true); + wxImage img( (int) screenSize.x, (int) screenSize.y, (unsigned char*) wxOutput, true ); wxBitmap bmp( img ); wxClientDC client_dc( this ); wxBufferedDC dc; - // client_dc.DrawBitmap(bmp, 0, 0, false); dc.Init( &client_dc, bmp ); // Destroy Cairo objects @@ -909,7 +911,7 @@ void CAIRO_GAL::allocateBitmaps() bitmapBuffer = new unsigned int[bufferSize]; bitmapBufferBackup = new unsigned int[bufferSize]; - wxOutput = new unsigned char[bufferSize * 4]; + wxOutput = new unsigned char[bufferSize * 3]; } diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 1bb9bb3c33..e75b8265bd 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -40,14 +40,7 @@ using namespace KiGfx; // Prototypes void InitTesselatorCallbacks( GLUtesselator* aTesselator ); -// FIXME Checking of attributes - -// #if defined(__WXGTK__) const int glAttributes[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 16, 0 }; -// #elif defined(__WXMSW__) -// #define glAttributes NULL -// #endif - OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, wxEvtHandler* aPaintListener, bool isUseShaders, const wxString& aName ) : diff --git a/common/view/view.cpp b/common/view/view.cpp index 7616f5397c..d91036cd30 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -150,6 +150,10 @@ VIEW::VIEW( bool aIsDynamic, bool aUseGroups ) : VIEW::~VIEW() { + BOOST_FOREACH( LayerMap::value_type& l, m_layers ) + { + delete l.second.items; + } } diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 67b5cf603d..f24a71aa50 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -126,7 +126,7 @@ void WX_VIEW_CONTROLS::onButton( wxMouseEvent& event ) { m_isDragPanning = true; m_dragStartPoint = VECTOR2D( event.GetX(), event.GetY() ); - m_lookStartPoint = m_view->GetCenter(); // ookAtPoint(); + m_lookStartPoint = m_view->GetCenter(); } else if( event.RightUp() ) { diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index b6a114ca3c..245508b7a2 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -644,7 +644,7 @@ public: */ virtual void DrawCursor( VECTOR2D aCursorPosition ) = 0; - void AdvanceDepth() + inline void AdvanceDepth() { layerDepth -= 0.1; // fixme: there should be a minimum step } @@ -652,7 +652,7 @@ public: /** * @brief Stores current drawing depth on the depth stack. */ - void PushDepth() + inline void PushDepth() { depthStack.push( layerDepth ); } @@ -660,7 +660,7 @@ public: /** * @brief Restores previously stored drawing depth for the depth stack. */ - void PopDepth() + inline void PopDepth() { layerDepth = depthStack.top(); depthStack.pop(); From 55f7a99d1bab20b408c8595bb52df2af10c90cae Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 19 Apr 2013 18:19:50 +0200 Subject: [PATCH 050/415] Cairo now renders layers properly (colors are not saturated after layer composition), but slower. --- common/gal/cairo/cairo_gal.cpp | 27 +++++++++++++++++------- common/gal/opengl/opengl_gal.cpp | 9 ++++++++ common/view/view.cpp | 2 ++ include/gal/cairo/cairo_gal.h | 6 ++++++ include/gal/graphics_abstraction_layer.h | 6 ++++++ include/gal/opengl/opengl_gal.h | 6 ++++++ 6 files changed, 48 insertions(+), 8 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index ff0fb47b39..5d72954acb 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -612,6 +612,21 @@ void CAIRO_GAL::Restore() } +void CAIRO_GAL::BeginLayer() +{ + cairo_push_group( cairoImage ); +} + + +void CAIRO_GAL::EndLayer() +{ + storePath(); + + cairo_pop_group_to_source( cairoImage ); + cairo_paint_with_alpha( cairoImage, fillColor.a ); +} + + int CAIRO_GAL::BeginGroup() { // If the grouping is started: the actual path is stored in the group, when @@ -693,15 +708,13 @@ void CAIRO_GAL::DrawGroup( int aGroupNumber ) break; case CMD_STROKE_PATH: - cairo_set_source_rgba( cairoImage, strokeColor.r, strokeColor.g, strokeColor.b, - strokeColor.a ); + cairo_set_source_rgb( cairoImage, strokeColor.r, strokeColor.g, strokeColor.b ); cairo_append_path( cairoImage, it->cairoPath ); cairo_stroke( cairoImage ); break; case CMD_FILL_PATH: - cairo_set_source_rgba( cairoImage, fillColor.r, fillColor.g, fillColor.b, - fillColor.a ); + cairo_set_source_rgb( cairoImage, fillColor.r, fillColor.g, fillColor.b ); cairo_append_path( cairoImage, it->cairoPath ); cairo_fill( cairoImage ); break; @@ -779,15 +792,13 @@ void CAIRO_GAL::storePath() { if( isFillEnabled ) { - cairo_set_source_rgba( cairoImage, fillColor.r, fillColor.g, fillColor.b, - fillColor.a ); + cairo_set_source_rgb( cairoImage, fillColor.r, fillColor.g, fillColor.b ); cairo_fill_preserve( cairoImage ); } if( isStrokeEnabled ) { - cairo_set_source_rgba( cairoImage, strokeColor.r, strokeColor.g, strokeColor.b, - strokeColor.a ); + cairo_set_source_rgb( cairoImage, strokeColor.r, strokeColor.g, strokeColor.b ); cairo_stroke_preserve( cairoImage ); } } diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index e75b8265bd..6a23f844d4 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -1283,6 +1283,15 @@ void OPENGL_GAL::Restore() } +void OPENGL_GAL::BeginLayer() +{ +} + +void OPENGL_GAL::EndLayer() +{ +} + + // TODO Error handling int OPENGL_GAL::BeginGroup() { diff --git a/common/view/view.cpp b/common/view/view.cpp index d91036cd30..4fc6d92968 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -419,9 +419,11 @@ void VIEW::redrawRect( const BOX2I& aRect ) { drawItem drawFunc( this, l->id ); + m_gal->BeginLayer(); m_gal->SetLayerDepth( (double) l->renderingOrder ); l->items->Query( aRect, drawFunc ); l->isDirty = false; + m_gal->EndLayer(); totalItems += drawFunc.count; totalDrawTime += drawFunc.time; diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 06db9f1f28..36cae06c6e 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -95,6 +95,12 @@ public: /// @copydoc GAL::EndDrawing() virtual void EndDrawing(); + /// @copydoc GAL::BeginLayer() + virtual void BeginLayer(); + + /// @copydoc GAL::EndLayer() + virtual void EndLayer(); + /// @copydoc GAL::DrawLine() virtual void DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 245508b7a2..1940b047ab 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -95,6 +95,12 @@ public: /// @brief End the drawing, needs to be called for every new frame. virtual void EndDrawing() = 0; + /// @brief Begin the layer drawing, needs to be called for every new layer. + virtual void BeginLayer() = 0; + + /// @brief Finish the layer drawing, needs to be called for every new layer. + virtual void EndLayer() = 0; + /** * @brief Draw a line. * diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index ce4ff73c39..d01028112b 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -102,6 +102,12 @@ public: /// @copydoc GAL::EndDrawing() virtual void EndDrawing(); + /// @copydoc GAL::BeginLayer() + virtual void BeginLayer(); + + /// @copydoc GAL::EndLayer() + virtual void EndLayer(); + /// @copydoc GAL::DrawLine() virtual void DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); From 8312497d6c71362fca1cdb735d18f73fc860d857 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 22 Apr 2013 11:07:38 +0200 Subject: [PATCH 051/415] Modified way of switching canvas --- common/drawframe.cpp | 18 ++++++++---------- pcbnew/pcbframe.cpp | 1 - 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/common/drawframe.cpp b/common/drawframe.cpp index 92f7a495eb..52a4e42057 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -966,11 +966,6 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) view->SetScale( zoom ); view->SetCenter( VECTOR2D( m_canvas->GetScreenCenterLogicalPosition() ) ); - - // Switch panes - m_auimgr.GetPane( wxT( "DrawFrame" ) ).Hide(); - m_auimgr.GetPane( wxT( "DrawFrameGal" ) ).Show(); - m_auimgr.Update(); } else { @@ -979,13 +974,16 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) VECTOR2D center = view->GetCenter(); RedrawScreen( wxPoint( center.x, center.y ), false ); - - // Switch panes - m_auimgr.GetPane( wxT( "DrawFrameGal" ) ).Hide(); - m_auimgr.GetPane( wxT( "DrawFrame" ) ).Show(); - m_auimgr.Update(); } + m_canvas->SetEvtHandlerEnabled( !aEnable ); + m_galCanvas->SetEvtHandlerEnabled( aEnable ); + + // Switch panes + m_auimgr.GetPane( wxT( "DrawFrame" ) ).Show( !aEnable ); + m_auimgr.GetPane( wxT( "DrawFrameGal" ) ).Show( aEnable ); + m_auimgr.Update(); + m_galCanvasActive = aEnable; #endif /* KICAD_GAL */ } diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index bfbfe9d2fe..58aeaf1724 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -595,7 +595,6 @@ void PCB_EDIT_FRAME::SwitchCanvas( wxCommandEvent& aEvent ) } - void PCB_EDIT_FRAME::ShowDesignRulesEditor( wxCommandEvent& event ) { DIALOG_DESIGN_RULES dR_editor( this ); From 07545ba49cddcfc42ac109f1e032b23e2789515c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 22 Apr 2013 11:08:02 +0200 Subject: [PATCH 052/415] Fixed wheel scroll event on Windows --- common/gal/cairo/cairo_gal.cpp | 3 +++ common/gal/opengl/opengl_gal.cpp | 3 +++ common/view/wx_view_controls.cpp | 36 ++++++++++++++++++++------------ include/view/wx_view_controls.h | 1 + 4 files changed, 30 insertions(+), 13 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 5d72954acb..1c68aa54a6 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -61,6 +61,9 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); Connect( wxEVT_LEFT_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); +#if defined _WIN32 || defined _WIN64 + Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); +#endif // Initialize line attributes map lineCapMap[LINE_CAP_BUTT] = CAIRO_LINE_CAP_BUTT; diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 6a23f844d4..c97d5f307a 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -90,6 +90,9 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); Connect( wxEVT_LEFT_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); +#if defined _WIN32 || defined _WIN64 + Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); +#endif } diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index f24a71aa50..e3b75799b2 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -46,28 +46,30 @@ WX_VIEW_CONTROLS::WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ) : WX_VIEW_CONTROLS::onButton ), NULL, this ); m_parentPanel->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( WX_VIEW_CONTROLS::onButton ), NULL, this ); +#if defined _WIN32 || defined _WIN64 + m_parentPanel->Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( + WX_VIEW_CONTROLS::onEnter ), NULL, this ); +#endif } void WX_VIEW_CONTROLS::onMotion( wxMouseEvent& event ) { - VECTOR2D mousePoint( event.GetX(), event.GetY() ); + // workaround for wxmsw.. + //if( event.Entering() ) + //m_parentPanel->SetFocus(); - if( event.Dragging() ) + if( event.Dragging() && m_isDragPanning ) { - if( m_isDragPanning ) - { - VECTOR2D d = m_dragStartPoint - mousePoint; - VECTOR2D delta = m_view->ToWorld( d, false ); + VECTOR2D mousePoint( event.GetX(), event.GetY() ); + VECTOR2D d = m_dragStartPoint - mousePoint; + VECTOR2D delta = m_view->ToWorld( d, false ); - m_view->SetCenter( m_lookStartPoint + delta ); - m_parentPanel->Refresh(); - } - else - { - event.Skip(); - } + m_view->SetCenter( m_lookStartPoint + delta ); + m_parentPanel->Refresh(); } + + event.Skip(); } @@ -117,6 +119,8 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& event ) m_view->SetCenter( m_view->GetCenter() + delta ); m_parentPanel->Refresh(); } + + event.Skip(); } @@ -135,3 +139,9 @@ void WX_VIEW_CONTROLS::onButton( wxMouseEvent& event ) event.Skip(); } + + +void WX_VIEW_CONTROLS::onEnter( wxMouseEvent& event ) +{ + m_parentPanel->SetFocus(); +} diff --git a/include/view/wx_view_controls.h b/include/view/wx_view_controls.h index 0848f0c10b..df7b2f7bb7 100644 --- a/include/view/wx_view_controls.h +++ b/include/view/wx_view_controls.h @@ -54,6 +54,7 @@ public: void onWheel( wxMouseEvent& event ); void onMotion( wxMouseEvent& event ); void onButton( wxMouseEvent& event ); + void onEnter( wxMouseEvent& event ); private: From 206c8e11894d80f7502043434512ba9aa349f336 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 22 Apr 2013 12:13:48 +0200 Subject: [PATCH 053/415] Drawing SMD pads with colors defined by "Pads Front"/"Pads Back" color settings. --- pcbnew/basepcbframe.cpp | 6 +++--- pcbnew/class_pad.cpp | 17 ++++++++++++++--- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 6b48ea89ac..68b9a6d234 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -98,9 +98,9 @@ const int m_galLayerOrder[] = ITEM_GAL_LAYER( VIA_HOLES_VISIBLE ), ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), - LAYER_N_FRONT, LAYER_N_15, LAYER_N_14, LAYER_N_13, LAYER_N_12, LAYER_N_11, - LAYER_N_10, LAYER_N_9, LAYER_N_8, LAYER_N_7, LAYER_N_6, LAYER_N_5, LAYER_N_4, - LAYER_N_3, LAYER_N_2, LAYER_N_BACK, + ITEM_GAL_LAYER( PAD_FR_VISIBLE ), LAYER_N_FRONT, LAYER_N_15, LAYER_N_14, LAYER_N_13, + LAYER_N_12, LAYER_N_11, LAYER_N_10, LAYER_N_9, LAYER_N_8, LAYER_N_7, LAYER_N_6, + LAYER_N_5, LAYER_N_4, LAYER_N_3, LAYER_N_2, ITEM_GAL_LAYER( PAD_BK_VISIBLE ), LAYER_N_BACK, SOLDERMASK_N_BACK, ADHESIVE_N_BACK, SOLDERPASTE_N_BACK, SILKSCREEN_N_BACK, ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ) diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index a974bfcb08..379001647e 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -765,15 +765,26 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const if( m_Attribute == PAD_SMD || m_Attribute == PAD_CONN) { // Single layer pad (smd) without hole - aLayers[0] = GetParent()->GetLayer(); - aCount = 1; + if( IsOnLayer( LAYER_N_FRONT ) ) + aLayers[0] = ITEM_GAL_LAYER( PAD_FR_VISIBLE ); + else if( IsOnLayer( LAYER_N_BACK ) ) + aLayers[0] = ITEM_GAL_LAYER( PAD_BK_VISIBLE ); +#ifdef __WXDEBUG__ + else // Should not occur + { + wxLogWarning( wxT("D_PAD::ViewGetLayers():PAD on layer different than FRONT/BACK") ); + } +#endif + + aCount = 1; } else { // Multi layer pad with hole - pad is shown on one common layer, hole on the other aLayers[0] = ITEM_GAL_LAYER( PADS_VISIBLE ); aLayers[1] = ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ); - aCount = 2; + + aCount = 2; } } From 3289c6c3053f0693b8f68c3eb2de8f773f02022a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 23 Apr 2013 09:52:51 +0200 Subject: [PATCH 054/415] Modified shaders' source path. --- common/drawpanel_gal.cpp | 7 +++++-- common/gal/opengl/opengl_gal.cpp | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 107e8ff543..4f028531c4 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -27,7 +27,8 @@ #include #include #include -#include +#include +#include #include #include @@ -50,7 +51,9 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin m_view = NULL; m_painter = NULL; - m_galShaderPath = std::string( ::wxGetCwd().mb_str() ) + "/../../gal/opengl/shader/"; + wxStandardPaths paths; + wxFileName executableFile( paths.GetExecutablePath() ); + m_galShaderPath = std::string( executableFile.GetPath() + "/../../common/gal/opengl/shader/" ); SwitchBackend( aGalType, false ); SetBackgroundStyle( wxBG_STYLE_CUSTOM ); diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index c97d5f307a..39cd64adb6 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -65,7 +65,7 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, isUseShader = isUseShaders; isShaderInitialized = false; isGroupStarted = false; - shaderPath = "../../../gal/opengl/shader/"; + shaderPath = "../../common/gal/opengl/shader/"; wxSize parentSize = aParent->GetSize(); SetSize( parentSize ); From d9b489d4715aa0375cfd809c715e5f7c5f32410e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 23 Apr 2013 12:07:14 +0200 Subject: [PATCH 055/415] Changed view control settings to KiCad default (panning, zooming, etc.) --- common/gal/cairo/cairo_gal.cpp | 2 ++ common/gal/opengl/opengl_gal.cpp | 2 ++ common/view/wx_view_controls.cpp | 53 +++++++++++++++----------------- 3 files changed, 29 insertions(+), 28 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 1c68aa54a6..bc97df090c 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -61,6 +61,8 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); Connect( wxEVT_LEFT_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_MIDDLE_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); #if defined _WIN32 || defined _WIN64 Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); #endif diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 39cd64adb6..710730785a 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -90,6 +90,8 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); Connect( wxEVT_LEFT_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_MIDDLE_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); #if defined _WIN32 || defined _WIN64 Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); #endif diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index e3b75799b2..a4b56d0052 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -42,9 +42,9 @@ WX_VIEW_CONTROLS::WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ) : WX_VIEW_CONTROLS::onMotion ), NULL, this ); m_parentPanel->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( WX_VIEW_CONTROLS::onWheel ), NULL, this ); - m_parentPanel->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( + m_parentPanel->Connect( wxEVT_MIDDLE_UP, wxMouseEventHandler( WX_VIEW_CONTROLS::onButton ), NULL, this ); - m_parentPanel->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( + m_parentPanel->Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( WX_VIEW_CONTROLS::onButton ), NULL, this ); #if defined _WIN32 || defined _WIN64 m_parentPanel->Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( @@ -55,10 +55,6 @@ WX_VIEW_CONTROLS::WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ) : void WX_VIEW_CONTROLS::onMotion( wxMouseEvent& event ) { - // workaround for wxmsw.. - //if( event.Entering() ) - //m_parentPanel->SetFocus(); - if( event.Dragging() && m_isDragPanning ) { VECTOR2D mousePoint( event.GetX(), event.GetY() ); @@ -77,8 +73,28 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& event ) { const double wheelPanSpeed = 0.001; - if( event.ControlDown() ) + if( event.ControlDown() || event.ShiftDown() ) { + // Scrolling + VECTOR2D scrollVec = m_view->ToWorld( m_view->GetScreenPixelSize() * + ( (double) event.GetWheelRotation() * wheelPanSpeed ), false ); + double scrollSpeed; + + if( abs( scrollVec.x ) > abs( scrollVec.y ) ) + scrollSpeed = scrollVec.x; + else + scrollSpeed = scrollVec.y; + + VECTOR2D t = m_view->GetScreenPixelSize(); + VECTOR2D delta( event.ControlDown() ? -scrollSpeed : 0.0, + event.ShiftDown() ? -scrollSpeed : 0.0 ); + + m_view->SetCenter( m_view->GetCenter() + delta ); + m_parentPanel->Refresh(); + } + else + { + // Zooming wxLongLong timeStamp = wxGetLocalTimeMillis(); double timeDiff = timeStamp.ToDouble() - m_timeStamp.ToDouble(); @@ -96,29 +112,10 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& event ) zoomScale = ( event.GetWheelRotation() > 0.0 ) ? 1.05 : 0.95; } - VECTOR2D anchor = m_view->ToWorld( VECTOR2D( event.GetX(), event.GetY() ) ); m_view->SetScale( m_view->GetScale() * zoomScale, anchor ); m_parentPanel->Refresh(); } - else - { - VECTOR2D scrollVec = m_view->ToWorld( m_view->GetScreenPixelSize() * - ( (double) event.GetWheelRotation() * wheelPanSpeed ), false ); - double scrollSpeed; - - if( abs( scrollVec.x ) > abs( scrollVec.y ) ) - scrollSpeed = scrollVec.x; - else - scrollSpeed = scrollVec.y; - - VECTOR2D t = m_view->GetScreenPixelSize(); - VECTOR2D delta( event.ShiftDown() ? scrollSpeed : 0.0, - !event.ShiftDown() ? scrollSpeed : 0.0 ); - - m_view->SetCenter( m_view->GetCenter() + delta ); - m_parentPanel->Refresh(); - } event.Skip(); } @@ -126,13 +123,13 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& event ) void WX_VIEW_CONTROLS::onButton( wxMouseEvent& event ) { - if( event.RightDown() ) + if( event.MiddleDown() ) { m_isDragPanning = true; m_dragStartPoint = VECTOR2D( event.GetX(), event.GetY() ); m_lookStartPoint = m_view->GetCenter(); } - else if( event.RightUp() ) + else if( event.MiddleUp() ) { m_isDragPanning = false; } From 85a3b72c71c03a7e8dc84a1258c935259629c588 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 23 Apr 2013 18:20:45 +0200 Subject: [PATCH 056/415] wxWidgets 2.8 compatibility fix. --- common/drawpanel_gal.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 4f028531c4..d1231291b6 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -53,7 +53,8 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin wxStandardPaths paths; wxFileName executableFile( paths.GetExecutablePath() ); - m_galShaderPath = std::string( executableFile.GetPath() + "/../../common/gal/opengl/shader/" ); + m_galShaderPath = std::string( ( executableFile.GetPath() + + wxT( "/../../common/gal/opengl/shader/" ) ).mb_str() ); SwitchBackend( aGalType, false ); SetBackgroundStyle( wxBG_STYLE_CUSTOM ); From b6ec124ceb326912a896a35d7ba272dd1d5bf2f7 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 24 Apr 2013 09:48:34 +0200 Subject: [PATCH 057/415] Removed BeginLayer and EndLayer functions. Resolved Cairo layers drawing problem in a different way. --- common/gal/cairo/cairo_gal.cpp | 33 +++++++++++++----------- common/gal/opengl/opengl_gal.cpp | 9 ------- include/gal/cairo/cairo_gal.h | 11 +------- include/gal/graphics_abstraction_layer.h | 6 ----- include/gal/opengl/opengl_gal.h | 6 ----- 5 files changed, 19 insertions(+), 46 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index bc97df090c..09c460034d 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -178,6 +178,8 @@ void CAIRO_GAL::BeginDrawing() throw( int ) lineWidth = 0; isDeleteSavedPixels = true; + + cairo_push_group( cairoImage ); } @@ -186,6 +188,9 @@ void CAIRO_GAL::EndDrawing() // Force remaining objects to be drawn Flush(); + cairo_pop_group_to_source( cairoImage ); + cairo_paint_with_alpha( cairoImage, fillColor.a ); + // This code was taken from the wxCairo example - it's not the most efficient one // Here is a good place for optimizations @@ -521,6 +526,19 @@ void CAIRO_GAL::ClearScreen() } +void CAIRO_GAL::SetLayerDepth( double aLayerDepth ) +{ + super::SetLayerDepth( aLayerDepth ); + + storePath(); + + cairo_pop_group_to_source( cairoImage ); + cairo_paint_with_alpha( cairoImage, fillColor.a ); + + cairo_push_group( cairoImage ); +} + + void CAIRO_GAL::Transform( MATRIX3x3D aTransformation ) { cairo_matrix_t cairoTransformation; @@ -617,21 +635,6 @@ void CAIRO_GAL::Restore() } -void CAIRO_GAL::BeginLayer() -{ - cairo_push_group( cairoImage ); -} - - -void CAIRO_GAL::EndLayer() -{ - storePath(); - - cairo_pop_group_to_source( cairoImage ); - cairo_paint_with_alpha( cairoImage, fillColor.a ); -} - - int CAIRO_GAL::BeginGroup() { // If the grouping is started: the actual path is stored in the group, when diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 710730785a..77bab85e86 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -1288,15 +1288,6 @@ void OPENGL_GAL::Restore() } -void OPENGL_GAL::BeginLayer() -{ -} - -void OPENGL_GAL::EndLayer() -{ -} - - // TODO Error handling int OPENGL_GAL::BeginGroup() { diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 36cae06c6e..5eb425e81e 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -95,12 +95,6 @@ public: /// @copydoc GAL::EndDrawing() virtual void EndDrawing(); - /// @copydoc GAL::BeginLayer() - virtual void BeginLayer(); - - /// @copydoc GAL::EndLayer() - virtual void EndLayer(); - /// @copydoc GAL::DrawLine() virtual void DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); @@ -178,10 +172,7 @@ public: double GetLineWidth(); /// @copydoc GAL::SetLayerDepth() - virtual void SetLayerDepth( double aLayerDepth ) - { - super::SetLayerDepth( aLayerDepth ); - } + virtual void SetLayerDepth( double aLayerDepth ); // -------------- // Transformation diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 1940b047ab..245508b7a2 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -95,12 +95,6 @@ public: /// @brief End the drawing, needs to be called for every new frame. virtual void EndDrawing() = 0; - /// @brief Begin the layer drawing, needs to be called for every new layer. - virtual void BeginLayer() = 0; - - /// @brief Finish the layer drawing, needs to be called for every new layer. - virtual void EndLayer() = 0; - /** * @brief Draw a line. * diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index d01028112b..ce4ff73c39 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -102,12 +102,6 @@ public: /// @copydoc GAL::EndDrawing() virtual void EndDrawing(); - /// @copydoc GAL::BeginLayer() - virtual void BeginLayer(); - - /// @copydoc GAL::EndLayer() - virtual void EndLayer(); - /// @copydoc GAL::DrawLine() virtual void DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); From 8663a6c7a0bef354b3192f6e354136b051cce5b3 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 24 Apr 2013 11:28:11 +0200 Subject: [PATCH 058/415] Added caching of multilayer items (storing multiple group ids for items). --- common/view/view.cpp | 36 +++++++++++++-------- common/view/view_item.cpp | 67 +++++++++++++++++++++++++++++++++++++++ include/view/view.h | 2 +- include/view/view_item.h | 55 +++++++++++++++++++++++++++++--- 4 files changed, 141 insertions(+), 19 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 4fc6d92968..c185430d3e 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -207,7 +207,7 @@ void VIEW::SetGAL( GAL* aGal ) // items need to be recached after changing GAL if( m_useGroups ) - itemsRecache(); + recacheAllItems(); // force the new GAL to display the current viewport. SetCenter( m_center ); @@ -371,7 +371,7 @@ struct VIEW::drawItem if( view->m_useGroups ) { - int group = aItem->m_cachedGroup; + int group = aItem->getGroup( currentLayer ); if( group >= 0 && aItem->ViewIsVisible() ) { @@ -381,7 +381,7 @@ struct VIEW::drawItem else { group = gal->BeginGroup(); - aItem->m_cachedGroup = group; + aItem->setGroup( currentLayer, group ); view->m_painter->Draw( static_cast( aItem ), currentLayer ); gal->EndGroup(); gal->DrawGroup( group ); @@ -419,11 +419,9 @@ void VIEW::redrawRect( const BOX2I& aRect ) { drawItem drawFunc( this, l->id ); - m_gal->BeginLayer(); m_gal->SetLayerDepth( (double) l->renderingOrder ); l->items->Query( aRect, drawFunc ); l->isDirty = false; - m_gal->EndLayer(); totalItems += drawFunc.count; totalDrawTime += drawFunc.time; @@ -454,7 +452,7 @@ struct VIEW::recacheItem { void operator()( VIEW_ITEM* aItem ) { - aItem->m_cachedGroup = -1; + aItem->deleteGroups(); } }; @@ -513,14 +511,19 @@ void VIEW::invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ) l->items->Insert( aItem ); /* reinsert */ if( m_useGroups ) - aItem->m_cachedGroup = -1; + aItem->deleteGroups(); } } - if( m_useGroups && aItem->m_cachedGroup >= 0 ) + if( m_useGroups && aItem->storesGroups() ) { - m_gal->DeleteGroup( aItem->m_cachedGroup ); - aItem->m_cachedGroup = -1; + std::vector groups = aItem->getAllGroups(); + for(std::vector::iterator i = groups.begin(); i != groups.end(); i++ ) + { + m_gal->DeleteGroup( *i ); + } + + aItem->deleteGroups(); } } @@ -534,10 +537,15 @@ struct VIEW::clearItemCache void operator()( VIEW_ITEM* aItem ) { - if( aItem->m_cachedGroup >= 0 ) + if( aItem->storesGroups() ) { - view->GetGAL()->DeleteGroup( aItem->m_cachedGroup ); - aItem->m_cachedGroup = -1; + std::vector groups = aItem->getAllGroups(); + for(std::vector::iterator i = groups.begin(); i != groups.end(); i++ ) + { + view->GetGAL()->DeleteGroup( *i ); + } + + aItem->deleteGroups(); } } @@ -560,7 +568,7 @@ void VIEW::clearGroupCache() } -void VIEW::itemsRecache() +void VIEW::recacheAllItems() { BOX2I r; diff --git a/common/view/view_item.cpp b/common/view/view_item.cpp index dce0120882..b7f680252d 100644 --- a/common/view/view_item.cpp +++ b/common/view/view_item.cpp @@ -66,3 +66,70 @@ void VIEW_ITEM::ViewRelease() m_view->Remove( this ); } } + + +int VIEW_ITEM::getGroup( int aLayer ) const +{ + for( int i = 0; i < m_groupsSize; ++i ) + { + if( m_groups[i].first == aLayer ) + return m_groups[i].second; + } + + return -1; +} + + +std::vector VIEW_ITEM::getAllGroups() const +{ + std::vector groups( m_groupsSize ); + + for( int i = 0; i < m_groupsSize; ++i ) + { + groups[i] = m_groups[i].second; + } + + return groups; +} + + +void VIEW_ITEM::setGroup( int aLayer, int aId ) +{ + // Look if there is already an entry for the layer + for( int i = 0; i < m_groupsSize; ++i ) + { + if( m_groups[i].first == aLayer ) + { + m_groups[i].second = aId; + return; + } + } + + // If there was no entry for the given layer - create one + GroupPair* newGroups = new GroupPair[m_groupsSize + 1]; + + if( m_groupsSize > 0 ) + { + std::copy( m_groups, m_groups + m_groupsSize, newGroups ); + delete m_groups; + } + + m_groups = newGroups; + newGroups[m_groupsSize++] = GroupPair( aLayer, aId ); +} + + +void VIEW_ITEM::deleteGroups() +{ + if( m_groupsSize > 0 ) + { + delete m_groups; + m_groupsSize = 0; + } +} + + +bool VIEW_ITEM::storesGroups() const +{ + return ( m_groupsSize > 0 ); +} diff --git a/include/view/view.h b/include/view/view.h index d7c879ee47..4cf09cc5c2 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -351,7 +351,7 @@ private: void clearGroupCache(); ///* Rebuilds GAL display lists - void itemsRecache(); + void recacheAllItems(); /// Determines rendering order of layers. Used in display order sorting function. static bool compareRenderingOrder( VIEW_LAYER* i, VIEW_LAYER* j ) diff --git a/include/view/view_item.h b/include/view/view_item.h index 36643c0a92..019b00fb72 100644 --- a/include/view/view_item.h +++ b/include/view/view_item.h @@ -30,6 +30,8 @@ #ifndef __VIEW_ITEM_H #define __VIEW_ITEM_H +#include + #include namespace KiGfx @@ -52,7 +54,6 @@ class VIEW; class VIEW_ITEM { public: - /** * Enum ViewUpdateFlags. * Defines the how severely the shape/appearance of the item has been changed: @@ -67,7 +68,7 @@ public: ALL = 0xff }; - VIEW_ITEM() : m_view( NULL ), m_viewVisible( true ), m_cachedGroup( -1 ) {} + VIEW_ITEM() : m_view( NULL ), m_viewVisible( true ), m_groupsSize( 0 ) {} /** * Destructor. For dynamic views, removes the item from the view. @@ -167,13 +168,59 @@ protected: // release the item from a previously assigned dynamic view (if there is any) ViewRelease(); m_view = aView; - m_cachedGroup = -1; + deleteGroups(); } VIEW* m_view; ///* Current dynamic view the item is assigned to. bool m_viewVisible; ///* Are we visible in the current dynamic VIEW. private: - int m_cachedGroup; ///* Index of cached GAL display list corresponding to the item + ///* Helper for storing cached items group ids + typedef std::pair GroupPair; + + ///* Indexes of cached GAL display lists corresponding to the item (for every layer it occupies). + ///* (in the std::pair "first" stores layer number, "second" stores group id). + GroupPair* m_groups; + int m_groupsSize; + + /** + * Function getGroup() + * Returns number of the group id for the given layer, or -1 in case it was not cached before. + * + * @param aLayer is the layer number for which group id is queried. + * @return group id or -1 in case there is no group id (ie. item is not cached). + */ + int getGroup( int aLayer ) const; + + /** + * Function getAllGroups() + * Returns all group ids for the item (collected from all layers the item occupies). + * + * @return vector of group ids. + */ + std::vector getAllGroups() const; + + /** + * Function setGroup() + * Sets a group id for the item and the layer combination. + * + * @param aLayer is the layer numbe. + * @param aGroup is the group id. + */ + void setGroup( int aLayer, int aGroup ); + + /** + * Function deleteGroups() + * Removes all of the stored group ids. Forces recaching of the item. + */ + void deleteGroups(); + + /** + * Function storesGroups() + * Returns information if the item uses at least one group id (ie. if it is cached at all). + * + * @returns true in case it is cached at least for one layer. + */ + bool storesGroups() const; }; } // namespace KiGfx From 1e0f1b39b0f12d4e5784b5df049317e888a4733c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 25 Apr 2013 10:00:25 +0200 Subject: [PATCH 059/415] Fixed color issue for stroked fonts with OpenGL backend and caching turned on. --- common/gal/opengl/opengl_gal.cpp | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 77bab85e86..9e8bf09f62 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -1183,44 +1183,32 @@ void OPENGL_GAL::DrawCurve( const VECTOR2D& aStartPoint, const VECTOR2D& aContro void OPENGL_GAL::SetStrokeColor( COLOR4D aColor ) { - if( strokeColor != aColor ) - { - isSetAttributes = true; - strokeColor = aColor; + isSetAttributes = true; + strokeColor = aColor; - // This is the default drawing color - glColor4d( aColor.r, aColor.g, aColor.b, aColor.a ); - } + // This is the default drawing color + glColor4d( aColor.r, aColor.g, aColor.b, aColor.a ); } void OPENGL_GAL::SetFillColor( COLOR4D aColor ) { - if( fillColor != aColor ) - { - isSetAttributes = true; - fillColor = aColor; - } + isSetAttributes = true; + fillColor = aColor; } void OPENGL_GAL::SetBackgroundColor( COLOR4D aColor ) { - if( backgroundColor != aColor ) - { - isSetAttributes = true; - backgroundColor = aColor; - } + isSetAttributes = true; + backgroundColor = aColor; } void OPENGL_GAL::SetLineWidth( double aLineWidth ) { - if( lineWidth != aLineWidth ) - { - isSetAttributes = true; - lineWidth = aLineWidth; - } + isSetAttributes = true; + lineWidth = aLineWidth; } From 857b02706e2b065154ff1a11e4abfdf159cb22e2 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 25 Apr 2013 10:26:32 +0200 Subject: [PATCH 060/415] Fixed tracks drawing using Cairo backend with caching turned on. --- common/gal/cairo/cairo_gal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 09c460034d..48fb12326d 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -263,7 +263,7 @@ void CAIRO_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPo if( isFillEnabled ) { - cairo_set_line_width( cairoImage, aWidth ); + SetLineWidth( aWidth ); cairo_move_to( cairoImage, (double) aStartPoint.x, (double) aStartPoint.y ); cairo_line_to( cairoImage, (double) aEndPoint.x, (double) aEndPoint.y ); From af8b256a00169720d85c3ca6722bbbce1ac50fc3 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 25 Apr 2013 18:30:53 +0200 Subject: [PATCH 061/415] Changed non-shader primitives to GL_TRIANGLES. --- common/gal/opengl/opengl_gal.cpp | 185 ++++++++++++++++++++----------- 1 file changed, 120 insertions(+), 65 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 9e8bf09f62..9fc59158c9 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -387,13 +387,18 @@ void OPENGL_GAL::blitMainTexture( bool aIsClearFrameBuffer ) glMatrixMode( GL_PROJECTION ); glPushMatrix(); glLoadIdentity(); - glBegin( GL_QUADS ); + glBegin( GL_TRIANGLES ); glTexCoord2i( 0, 1 ); glVertex3i( -1, -1, 0 ); glTexCoord2i( 1, 1 ); glVertex3i( 1, -1, 0 ); glTexCoord2i( 1, 0 ); glVertex3i( 1, 1, 0 ); + + glTexCoord2i( 0, 1 ); + glVertex3i( -1, -1, 0 ); + glTexCoord2i( 1, 0 ); + glVertex3i( 1, 1, 0 ); glTexCoord2i( 0, 0 ); glVertex3i( -1, 1, 0 ); glEnd(); @@ -432,7 +437,7 @@ inline void OPENGL_GAL::selectShader( int aIndex ) void OPENGL_GAL::drawRoundedSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aWidth, bool aStroke, bool aGlBegin ) { - VECTOR2D l = (aEndPoint - aStartPoint); + VECTOR2D l = ( aEndPoint - aStartPoint ); double lnorm = l.EuclideanNorm(); double aspect; @@ -463,7 +468,7 @@ void OPENGL_GAL::drawRoundedSegment( const VECTOR2D& aStartPoint, const VECTOR2D selectShader( 0 ); if( aGlBegin ) - glBegin( GL_QUADS ); + glBegin( GL_QUADS ); // shader glNormal3d( aspect, 0, 0 ); glTexCoord2f( 0.0, 0.0 ); @@ -506,10 +511,13 @@ inline void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2 VECTOR2D point3 = aEndPoint + perpendicularVector; VECTOR2D point4 = aEndPoint - perpendicularVector; - glBegin( GL_QUADS ); + glBegin( GL_TRIANGLES ); glVertex3d( point1.x, point1.y, layerDepth ); glVertex3d( point2.x, point2.y, layerDepth ); glVertex3d( point4.x, point4.y, layerDepth ); + + glVertex3d( point1.x, point1.y, layerDepth ); + glVertex3d( point4.x, point4.y, layerDepth ); glVertex3d( point3.x, point3.y, layerDepth ); glEnd(); } @@ -687,21 +695,21 @@ void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) } // Now draw the fan - glBegin( GL_TRIANGLE_FAN ); - glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); - + glBegin( GL_TRIANGLES ); SWAP( angle1, >, angle2 ); - - glVertex3d( lastPoint.x + adjust * sin( angle1 ), - lastPoint.y - adjust * cos( angle1 ), layerDepth ); - for( double a = angle1 + M_PI / 32; a < angle2; a += M_PI / 32 ) + for( double a = angle1; a < angle2; ) { + glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); + glVertex3d( lastPoint.x + adjust * sin( a ), + lastPoint.y - adjust * cos( a ), layerDepth ); + + a += M_PI / 32; + if(a > angle2) + a = angle2; + glVertex3d( lastPoint.x + adjust * sin( a ), lastPoint.y - adjust * cos( a ), layerDepth ); } - glVertex3d( lastPoint.x + adjust * sin( angle2 ), - lastPoint.y - adjust * cos( angle2 ), layerDepth ); - glEnd(); break; } @@ -744,7 +752,6 @@ void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) { point1 = lastPoint + perpendicularVector1; point3 = lastPoint + perpendicularVector2; - } VECTOR2D point2 = point1 - lastStartEndVector; @@ -767,10 +774,17 @@ void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) double limit = MITER_LIMIT * lineWidth; VECTOR2D mp1 = point1 + ( limit / lineLengthA ) * lastStartEndVector; VECTOR2D mp2 = point3 - ( limit / lineLengthB ) * startEndVector; - glBegin( GL_TRIANGLE_FAN ); + + glBegin( GL_TRIANGLES ); glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); glVertex3d( point1.x, point1.y, layerDepth ); glVertex3d( mp1.x, mp1.y, layerDepth ); + + glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); + glVertex3d( mp1.x, mp1.y, layerDepth ); + glVertex3d( mp2.x, mp2.y, layerDepth ); + + glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); glVertex3d( mp2.x, mp2.y, layerDepth ); glVertex3d( point3.x, point3.y, layerDepth ); glEnd(); @@ -778,10 +792,13 @@ void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) else { // Insert two triangles for the mitered edge - glBegin( GL_TRIANGLE_FAN ); + glBegin( GL_TRIANGLES ); glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); glVertex3d( point1.x, point1.y, layerDepth ); glVertex3d( miterPoint.x, miterPoint.y, layerDepth ); + + glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); + glVertex3d( miterPoint.x, miterPoint.y, layerDepth ); glVertex3d( point3.x, point3.y, layerDepth ); glEnd(); } @@ -819,7 +836,7 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn { selectShader( 0 ); glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - glBegin( GL_QUADS ); + glBegin( GL_QUADS ); // shader glNormal3d( 1.0, 0, 0); glTexCoord2f(0.0, 0.0); glVertex3d( aStartPoint.x, aStartPoint.y, layerDepth ); @@ -834,15 +851,14 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn glVertex3d( diagonalPointB.x, diagonalPointB.y, layerDepth ); glEnd(); } + if(isStrokeEnabled) { - glBegin(GL_QUADS); - + glBegin( GL_QUADS ); // shader drawRoundedSegment(aStartPoint, diagonalPointA, lineWidth, true, false ); drawRoundedSegment(aEndPoint, diagonalPointA, lineWidth, true, false ); drawRoundedSegment(aStartPoint, diagonalPointB, lineWidth, true, false ); drawRoundedSegment(aEndPoint, diagonalPointB, lineWidth, true, false ); - glEnd(); } @@ -868,10 +884,13 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn if( isFillEnabled ) { glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - glBegin( GL_QUADS ); + glBegin( GL_TRIANGLES ); glVertex3d( aStartPoint.x, aStartPoint.y, layerDepth ); glVertex3d( diagonalPointA.x, diagonalPointA.y, layerDepth ); glVertex3d( aEndPoint.x, aEndPoint.y, layerDepth ); + + glVertex3d( aStartPoint.x, aStartPoint.y, layerDepth ); + glVertex3d( aEndPoint.x, aEndPoint.y, layerDepth ); glVertex3d( diagonalPointB.x, diagonalPointB.y, layerDepth ); glEnd(); } @@ -919,12 +938,22 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) glTranslated( aCenterPoint.x, aCenterPoint.y, 0.0 ); glScaled( aRadius, aRadius, 1.0 ); - glBegin( GL_QUAD_STRIP ); + glBegin( GL_TRIANGLES ); for( std::deque::const_iterator it = unitCirclePoints.begin(); it != unitCirclePoints.end(); it++ ) { - glVertex3d( it->x * innerScale, it->y * innerScale, layerDepth ); - glVertex3d( it->x * outerScale, it->y * outerScale, layerDepth ); + double v0[] = { it->x * innerScale, it->y * innerScale }; + double v1[] = { it->x * outerScale, it->y * outerScale }; + double v2[] = { ( it + 1 )->x * innerScale, ( it + 1 )->y * innerScale }; + double v3[] = { ( it + 1 )->x * outerScale, ( it + 1 )->y * outerScale }; + + glVertex3d( v0[0], v0[1], layerDepth ); + glVertex3d( v1[0], v1[1], layerDepth ); + glVertex3d( v2[0], v2[1], layerDepth ); + + glVertex3d( v1[0], v1[1], layerDepth ); + glVertex3d( v3[0], v3[1], layerDepth ); + glVertex3d( v2[0], v2[1], layerDepth ); } glEnd(); @@ -988,7 +1017,6 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a VECTOR2D startEndPoint = startPoint + endPoint; VECTOR2D middlePoint = 0.5 * startEndPoint; - glPushMatrix(); glTranslated( aCenterPoint.x, aCenterPoint.y, layerDepth ); glScaled( aRadius, aRadius, 1.0 ); @@ -1015,7 +1043,7 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a VECTOR2D p( cos( aStartAngle ), sin( aStartAngle ) ); - glBegin( GL_QUADS ); + glBegin( GL_QUADS ); // shader for( int i = 0; i < n_points; i++ ) { VECTOR2D p_next( p.x * cosI - p.y * sinI, p.x * sinI + p.y * cosI ); @@ -1027,20 +1055,30 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a } else { + double alphaIncrement = 2 * M_PI / CIRCLE_POINTS; glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); - glBegin( GL_QUAD_STRIP ); - - double alphaIncrement = 2 * M_PI / CIRCLE_POINTS; - - for( double alpha = aStartAngle; alpha < aEndAngle; alpha += alphaIncrement ) + glBegin( GL_TRIANGLES ); + for( double alpha = aStartAngle; alpha < aEndAngle; ) { - glVertex2d( cos( alpha ) * innerScale, sin( alpha ) * innerScale ); - glVertex2d( cos( alpha ) * outerScale, sin( alpha ) * outerScale ); - } + double v0[] = { cos( alpha ) * innerScale, sin( alpha ) * innerScale }; + double v1[] = { cos( alpha ) * outerScale, sin( alpha ) * outerScale }; - glVertex2d( cos( aEndAngle ) * innerScale, sin( aEndAngle ) * innerScale ); - glVertex2d( cos( aEndAngle ) * outerScale, sin( aEndAngle ) * outerScale ); + alpha += alphaIncrement; + if( alpha > aEndAngle ) + alpha = aEndAngle; + + double v2[] = { cos( alpha ) * innerScale, sin( alpha ) * innerScale }; + double v3[] = { cos( alpha ) * outerScale, sin( alpha ) * outerScale }; + + glVertex3d( v0[0], v0[1], layerDepth ); + glVertex3d( v1[0], v1[1], layerDepth ); + glVertex3d( v2[0], v2[1], layerDepth ); + + glVertex3d( v1[0], v1[1], layerDepth ); + glVertex3d( v3[0], v3[1], layerDepth ); + glVertex3d( v2[0], v2[1], layerDepth ); + } glEnd(); @@ -1054,21 +1092,22 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a if( isFillEnabled ) { + double alphaIncrement = 2 * M_PI / CIRCLE_POINTS; + double alpha; glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - glBegin( GL_TRIANGLE_FAN ); - - glVertex2d( middlePoint.x, middlePoint.y ); - - double alphaIncrement = 2 * M_PI / CIRCLE_POINTS; - - for( double alpha = aStartAngle; alpha < aEndAngle; alpha += alphaIncrement ) + glBegin( GL_TRIANGLES ); + for( alpha = aStartAngle; ( alpha + alphaIncrement ) < aEndAngle; ) { + glVertex2d( middlePoint.x, middlePoint.y ); + glVertex2d( cos( alpha ), sin( alpha ) ); + alpha += alphaIncrement; glVertex2d( cos( alpha ), sin( alpha ) ); } + glVertex2d( middlePoint.x, middlePoint.y ); + glVertex2d( cos( alpha ), sin( alpha ) ); glVertex2d( endPoint.x, endPoint.y ); - glEnd(); } @@ -1080,8 +1119,7 @@ struct OGLPOINT { OGLPOINT() : x( 0.0 ), y( 0.0 ), z( 0.0 ) - { - } + {} OGLPOINT( const char* fastest ) { @@ -1090,8 +1128,7 @@ struct OGLPOINT OGLPOINT( const VECTOR2D& aPoint ) : x( aPoint.x ), y( aPoint.y ), z( 0.0 ) - { - } + {} OGLPOINT& operator=( const VECTOR2D& aPoint ) { @@ -1159,7 +1196,7 @@ void OPENGL_GAL::DrawCurve( const VECTOR2D& aStartPoint, const VECTOR2D& aContro std::deque pointList; double t = 0.0; - double dt = 1.0 / (double)CURVE_POINTS; + double dt = 1.0 / (double) CURVE_POINTS; for( int i = 0; i <= CURVE_POINTS; i++ ) { @@ -1334,17 +1371,25 @@ void OPENGL_GAL::computeUnitArcs() void OPENGL_GAL::computeUnitCircle() { + double valueX, valueY; + displayListCircle = glGenLists( 1 ); glNewList( displayListCircle, GL_COMPILE ); - glBegin( GL_TRIANGLE_FAN ); - glVertex2d( 0, 0 ); + glBegin( GL_TRIANGLES ); // Compute the circle points for a given number of segments // Insert in a display list and a vector - for( int i = 0; i < CIRCLE_POINTS + 1; i++ ) + for( int i = 0; i < CIRCLE_POINTS; i++ ) { - double valueX = cos( 2.0 * M_PI / CIRCLE_POINTS * i ); - double valueY = sin( 2.0 * M_PI / CIRCLE_POINTS * i ); + glVertex2d( 0, 0 ); + + valueX = cos( 2.0 * M_PI / CIRCLE_POINTS * i ); + valueY = sin( 2.0 * M_PI / CIRCLE_POINTS * i ); + glVertex2d( valueX, valueY ); + unitCirclePoints.push_back( VECTOR2D( valueX, valueY ) ); + + valueX = cos( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ); + valueY = sin( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ); glVertex2d( valueX, valueY ); unitCirclePoints.push_back( VECTOR2D( valueX, valueY ) ); } @@ -1359,11 +1404,14 @@ void OPENGL_GAL::computeUnitSemiCircle() displayListSemiCircle = glGenLists( 1 ); glNewList( displayListSemiCircle, GL_COMPILE ); - glBegin( GL_TRIANGLE_FAN ); - glVertex2d( 0, 0 ); - for( int i = 0; i < CIRCLE_POINTS / 2 + 1; i++ ) + glBegin( GL_TRIANGLES ); + for( int i = 0; i < CIRCLE_POINTS / 2; i++ ) { - glVertex2d( cos( 2.0 * M_PI / CIRCLE_POINTS * i ), sin( 2.0 * M_PI / CIRCLE_POINTS * i ) ); + glVertex2d( 0, 0 ); + glVertex2d( cos( 2.0 * M_PI / CIRCLE_POINTS * i ), + sin( 2.0 * M_PI / CIRCLE_POINTS * i ) ); + glVertex2d( cos( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), + sin( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ) ); } glEnd(); @@ -1500,31 +1548,35 @@ void OPENGL_GAL::DrawCursor( VECTOR2D aCursorPosition ) glDisable( GL_TEXTURE_2D ); glColor4d( cursorColor.r, cursorColor.g, cursorColor.b, cursorColor.a ); - glBegin( GL_QUADS ); + glBegin( GL_TRIANGLES ); glVertex3f( (int) ( aCursorPosition.x - cursorSize / 2 ) + 1, (int) ( aCursorPosition.y ), depthRange.x ); - glVertex3f( (int) ( aCursorPosition.x + cursorSize / 2 ) + 1, (int) ( aCursorPosition.y ), depthRange.x ); - glVertex3f( (int) ( aCursorPosition.x + cursorSize / 2 ) + 1, (int) ( aCursorPosition.y + 1 ), depthRange.x ); + glVertex3f( (int) ( aCursorPosition.x - cursorSize / 2 ) + 1, + (int) ( aCursorPosition.y ), depthRange.x ); glVertex3f( (int) ( aCursorPosition.x - cursorSize / 2 ) + 1, (int) ( aCursorPosition.y + 1), depthRange.x ); + glVertex3f( (int) ( aCursorPosition.x + cursorSize / 2 ) + 1, + (int) ( aCursorPosition.y + 1 ), depthRange.x ); glVertex3f( (int) ( aCursorPosition.x ), (int) ( aCursorPosition.y - cursorSize / 2 ) + 1, depthRange.x ); - glVertex3f( (int) ( aCursorPosition.x ), (int) ( aCursorPosition.y + cursorSize / 2 ) + 1, depthRange.x ); - glVertex3f( (int) ( aCursorPosition.x ) + 1, (int) ( aCursorPosition.y + cursorSize / 2 ) + 1, depthRange.x ); + glVertex3f( (int) ( aCursorPosition.x ), + (int) ( aCursorPosition.y - cursorSize / 2 ) + 1, depthRange.x ); glVertex3f( (int) ( aCursorPosition.x ) + 1, (int) ( aCursorPosition.y - cursorSize / 2 ) + 1, depthRange.x ); + glVertex3f( (int) ( aCursorPosition.x ) + 1, + (int) ( aCursorPosition.y + cursorSize / 2 ) + 1, depthRange.x ); glEnd(); // Blit the current screen contents @@ -1559,11 +1611,14 @@ void OPENGL_GAL::DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEnd glColor4d( gridColor.r, gridColor.g, gridColor.b, gridColor.a ); // Draw the quad for the grid line - glBegin( GL_QUADS ); + glBegin( GL_TRIANGLES ); double gridDepth = depthRange.y * 0.75; glVertex3d( point1.x, point1.y, gridDepth ); glVertex3d( point2.x, point2.y, gridDepth ); glVertex3d( point4.x, point4.y, gridDepth ); + + glVertex3d( point1.x, point1.y, gridDepth ); + glVertex3d( point4.x, point4.y, gridDepth ); glVertex3d( point3.x, point3.y, gridDepth ); glEnd(); } From 56aabe20bcd805d3c97a75a79afebe5fdb1fd702 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 30 Apr 2013 15:59:32 +0200 Subject: [PATCH 062/415] Introduction of VBO. Now only tracks are rendered in a very simple way. --- common/CMakeLists.txt | 1 + common/drawpanel_gal.cpp | 6 +- common/gal/opengl/opengl_gal.cpp | 208 +++++++++++++++++++++++++++++-- common/gal/opengl/vbo_item.cpp | 134 ++++++++++++++++++++ common/view/view.cpp | 3 + include/gal/opengl/opengl_gal.h | 40 ++++-- include/gal/opengl/vbo_item.h | 114 +++++++++++++++++ pcbnew/basepcbframe.cpp | 8 +- 8 files changed, 483 insertions(+), 31 deletions(-) create mode 100644 common/gal/opengl/vbo_item.cpp create mode 100644 include/gal/opengl/vbo_item.h diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 26880e0c56..5acb45b1da 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -20,6 +20,7 @@ set(GAL_SRCS gal/color4d.cpp gal/opengl/opengl_gal.cpp gal/opengl/shader.cpp + gal/opengl/vbo_item.cpp gal/cairo/cairo_gal.cpp view/wx_view_controls.cpp ) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index d1231291b6..bd9fe02b44 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -65,9 +65,8 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin m_gal->ComputeWorldScreenMatrix(); m_painter = new KiGfx::PCB_PAINTER( m_gal ); - m_painter->SetGAL( m_gal ); - m_view = new KiGfx::VIEW( true ); + m_view = new KiGfx::VIEW( true, true ); m_view->SetPainter( m_painter ); m_view->SetGAL( m_gal ); @@ -157,9 +156,6 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) if( m_view ) m_view->SetGAL( m_gal ); - if( m_painter ) - m_painter->SetGAL( m_gal ); - wxSize size = GetClientSize(); m_gal->ResizeScreen( size.GetX(), size.GetY() ); } diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 9fc59158c9..6ae5d37f1d 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -26,10 +26,14 @@ #include #include +#include #include #include #include +#ifdef __WXDEBUG__ +#include +#endif /* __WXDEBUG__ */ #ifndef CALLBACK #define CALLBACK @@ -68,6 +72,10 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, shaderPath = "../../common/gal/opengl/shader/"; wxSize parentSize = aParent->GetSize(); + isVboInitialized = false; + curVboItem = NULL; + vboSize = 0; + SetSize( parentSize ); screenSize.x = parentSize.x; @@ -116,6 +124,11 @@ OPENGL_GAL::~OPENGL_GAL() deleteFrameBuffer( &frameBufferBackup, &depthBufferBackup, &textureBackup ); } + if( isVboInitialized ) + { + deleteVertexBufferObjects(); + } + delete glContext; } @@ -214,6 +227,28 @@ void OPENGL_GAL::initFrameBuffers() } +void OPENGL_GAL::initVertexBufferObjects() +{ + // Generate buffers for vertices and indices + glGenBuffers( 1, &curVboVertId ); + glGenBuffers( 1, &curVboIndId ); + + isVboInitialized = true; +} + + +void OPENGL_GAL::deleteVertexBufferObjects() +{ + glBindBuffer( GL_ARRAY_BUFFER, 0 ); + glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 ); + + glDeleteBuffers( 1, &curVboVertId ); + glDeleteBuffers( 1, &curVboIndId ); + + isVboInitialized = false; +} + + void OPENGL_GAL::SaveScreen() { glBindFramebuffer( GL_DRAW_FRAMEBUFFER, frameBufferBackup ); @@ -269,6 +304,15 @@ void OPENGL_GAL::initGlew() exit( 1 ); } + // Vertex buffer have to be supported + if ( !GLEW_ARB_vertex_buffer_object ) + { + wxLogError( wxT( "Vertex buffer objects are not supported!" ) ); + exit( 1 ); + } + + initVertexBufferObjects(); + // Compute the unit circles, used for speed up of the circle drawing computeUnitCircle(); computeUnitSemiCircle(); @@ -284,7 +328,7 @@ void OPENGL_GAL::BeginDrawing() clientDC = new wxClientDC( this ); - // Initialize GLEW & FBOs + // Initialize GLEW, FBOs & VBOs if( !isGlewInitialized ) { initGlew(); @@ -359,6 +403,7 @@ void OPENGL_GAL::BeginDrawing() SetFillColor( fillColor ); SetStrokeColor( strokeColor ); isDeleteSavedPixels = true; + vboNeedsUpdate = false; } @@ -410,6 +455,13 @@ void OPENGL_GAL::blitMainTexture( bool aIsClearFrameBuffer ) void OPENGL_GAL::EndDrawing() { + // If any of VBO items is dirty - recache everything + if( vboNeedsUpdate ) + { + rebuildVbo(); + vboNeedsUpdate = false; + } + // Draw the remaining contents, blit the main texture to the screen, swap the buffers glFlush(); blitMainTexture( true ); @@ -419,6 +471,65 @@ void OPENGL_GAL::EndDrawing() } +void OPENGL_GAL::rebuildVbo() +{ + /* FIXME should be done less naively, maybe sth like: + float *ptr = (float*)glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_READ_WRITE_ARB); + if(ptr) + { + updateVertices(....); + glUnmapBufferARB(GL_ARRAY_BUFFER_ARB); // release pointer to mapping buffer + }*/ + +#ifdef __WXDEBUG__ + prof_counter totalTime; + prof_start( &totalTime, false ); +#endif /* __WXDEBUG__ */ + + // Buffers for storing cached items data + GLfloat* verticesBuffer = new GLfloat[VBO_ITEM::VertStride * vboSize]; + GLuint* indicesBuffer = new GLuint[vboSize]; + + // Pointers for easier usage with memcpy + GLfloat* verticesBufferPtr = verticesBuffer; + GLuint* indicesBufferPtr = indicesBuffer; + + // Fill out buffers with data + for( std::deque::iterator vboItem = vboItems.begin(); + vboItem != vboItems.end(); vboItem++ ) + { + int size = (*vboItem)->GetSize(); + + memcpy( verticesBufferPtr, (*vboItem)->GetVertices(), size * VBO_ITEM::VertSize ); + verticesBufferPtr += size * VBO_ITEM::VertStride; + + memcpy( indicesBufferPtr, (*vboItem)->GetIndices(), size * VBO_ITEM::IndSize ); + indicesBufferPtr += size * VBO_ITEM::IndStride; + } + + deleteVertexBufferObjects(); + initVertexBufferObjects(); + + glBindBuffer( GL_ARRAY_BUFFER, curVboVertId ); + glBufferData( GL_ARRAY_BUFFER, vboSize * VBO_ITEM::VertSize, verticesBuffer, GL_DYNAMIC_DRAW ); + glBindBuffer( GL_ARRAY_BUFFER, 0 ); + + glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, curVboIndId ); + glBufferData( GL_ELEMENT_ARRAY_BUFFER, vboSize * VBO_ITEM::IndSize, indicesBuffer, GL_DYNAMIC_DRAW ); + glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 ); + + delete verticesBuffer; + delete indicesBuffer; + +#ifdef __WXDEBUG__ + prof_end( &totalTime ); + + wxLogDebug( wxT( "Rebuilding VBO::items %d / %.1f ms" ), + vboSize, (double) totalTime.value / 1000.0 ); +#endif /* __WXDEBUG__ */ +} + + inline void OPENGL_GAL::selectShader( int aIndex ) { if( currentShader != aIndex ) @@ -528,6 +639,44 @@ void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndP VECTOR2D startEndVector = aEndPoint - aStartPoint; double lineAngle = atan2( startEndVector.y, startEndVector.x ); + if ( isGroupStarted ) + { + // Angle of a line perpendicular to the segment being drawn + double beta = ( M_PI / 2.0 ) - lineAngle; + + VECTOR2D v0( aStartPoint.x - ( aWidth * cos( beta ) / 2.0 ), + aStartPoint.y + ( aWidth * sin( beta ) / 2.0 ) ); + VECTOR2D v1( aStartPoint.x + ( aWidth * cos( beta ) / 2.0 ), + aStartPoint.y - ( aWidth * sin( beta ) / 2.0 ) ); + VECTOR2D v2( aEndPoint.x + ( aWidth * cos( beta ) / 2.0 ), + aEndPoint.y - ( aWidth * sin( beta ) / 2.0 ) ); + VECTOR2D v3( aEndPoint.x - ( aWidth * cos( beta ) / 2.0 ), + aEndPoint.y + ( aWidth * sin( beta ) / 2.0 ) ); + + // First triangle + GLfloat newVertex1[] = { v0.x, v0.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a }; + GLfloat newVertex2[] = { v1.x, v1.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a }; + GLfloat newVertex3[] = { v2.x, v2.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a }; + + // Second triangle + GLfloat newVertex4[] = { v0.x, v0.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a }; + GLfloat newVertex5[] = { v2.x, v2.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a }; + GLfloat newVertex6[] = { v3.x, v3.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a }; + + curVboItem->PushVertex( newVertex1 ); + curVboItem->PushVertex( newVertex2 ); + curVboItem->PushVertex( newVertex3 ); + curVboItem->PushVertex( newVertex4 ); + curVboItem->PushVertex( newVertex5 ); + curVboItem->PushVertex( newVertex6 ); + } + if( isFillEnabled ) { glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); @@ -713,6 +862,7 @@ void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) glEnd(); break; } + case LINE_JOIN_BEVEL: { // We compute the edge points of the line segments at the joint @@ -741,6 +891,7 @@ void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) break; } + case LINE_JOIN_MITER: { // Compute points of the outer edges @@ -1313,40 +1464,73 @@ void OPENGL_GAL::Restore() } -// TODO Error handling int OPENGL_GAL::BeginGroup() { isGroupStarted = true; - GLint displayList = glGenLists( 1 ); - glNewList( displayList, GL_COMPILE ); - displayListsGroup.push_back( displayList ); - return (int) displayList; + // There is a new group that is not in VBO yet + vboNeedsUpdate = true; + + // Save the pointer for usage with the current item + curVboItem = new VBO_ITEM; + curVboItem->SetOffset( vboSize ); + vboItems.push_back( curVboItem ); + + return vboItems.size() - 1; } void OPENGL_GAL::EndGroup() { + vboSize += curVboItem->GetSize(); + + // TODO this has to be removed in final version + rebuildVbo(); + isGroupStarted = false; - glEndList(); - glCallList( displayListsGroup.back() ); } void OPENGL_GAL::DeleteGroup( int aGroupNumber ) { - std::deque::iterator it = displayListsGroup.begin(); + std::deque::iterator it = vboItems.begin(); std::advance( it, aGroupNumber ); - displayListsGroup.erase( it ); + delete *it; + vboItems.erase( it ); - glDeleteLists( (GLint) aGroupNumber, 1 ); + vboNeedsUpdate = true; } void OPENGL_GAL::DrawGroup( int aGroupNumber ) { - glCallList( (GLint) aGroupNumber ); + std::deque::iterator it = vboItems.begin(); + std::advance( it, aGroupNumber ); + + // TODO Checking if we are using right VBOs, in other case do the binding. + // Right now there is only one VBO, so there is no problem. + + glEnableClientState( GL_VERTEX_ARRAY ); + glEnableClientState( GL_COLOR_ARRAY ); + + // Bind vertices data buffer and point to the data + glBindBuffer( GL_ARRAY_BUFFER, curVboVertId ); + glVertexPointer( 3, GL_FLOAT, VBO_ITEM::VertSize, 0 ); + glColorPointer( 4, GL_FLOAT, VBO_ITEM::VertSize, (GLvoid*) VBO_ITEM::ColorOffset ); + glBindBuffer( GL_ARRAY_BUFFER, 0 ); + + // Bind indices data buffer + int size = (*it)->GetSize(); + int offset = (*it)->GetOffset(); + glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, curVboIndId ); + glDrawRangeElements( GL_TRIANGLES, 0, vboSize - 1, size, + GL_UNSIGNED_INT, (GLvoid*) ( offset * VBO_ITEM::IndSize ) ); + glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 ); + + // Deactivate vertex array + glDisableClientState( GL_COLOR_ARRAY ); + glDisableClientState( GL_VERTEX_ARRAY ); } diff --git a/common/gal/opengl/vbo_item.cpp b/common/gal/opengl/vbo_item.cpp new file mode 100644 index 0000000000..f853a8cae0 --- /dev/null +++ b/common/gal/opengl/vbo_item.cpp @@ -0,0 +1,134 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file vbo_item.cpp + * @brief Class to handle an item held in a Vertex Buffer Object. + */ + +#include +#include + +using namespace KiGfx; + +VBO_ITEM::VBO_ITEM() : + m_vertices( NULL ), + m_indices( NULL ), + m_offset( 0 ), + m_size( 0 ), + m_isDirty( true ) +{ +} + + +VBO_ITEM::~VBO_ITEM() +{ + if( m_vertices ) + delete m_vertices; +} + + +void VBO_ITEM::PushVertex( const GLfloat* aVertex ) +{ + GLfloat* newVertices = new GLfloat[( m_size + 1 ) * VertStride]; + GLuint* newIndices = new GLuint[( m_size + 1 ) * IndStride]; + + // Handle a new vertex + if( m_vertices ) + { + // Copy all previous vertices data + memcpy( newVertices, m_vertices, ( m_size ) * VertSize ); + delete m_vertices; + } + m_vertices = newVertices; + + // Add the new vertex + memcpy( &newVertices[m_size * VertStride], aVertex, VertSize ); + + // Handle a new index + if( m_indices ) + { + // Copy all previous vertices data + memcpy( newIndices, m_indices, ( m_size ) * IndSize ); + delete m_indices; + } + m_indices = newIndices; + + // Add the new vertex + newIndices[m_size] = m_offset + m_size; + + m_size++; + m_isDirty = true; +} + + +void VBO_ITEM::PushVertices( const GLfloat* aVertex, GLuint aSize ) +{ + // FIXME to be done + m_isDirty = true; +} + + +GLfloat* VBO_ITEM::GetVertices() const +{ + return m_vertices; +} + + +GLuint* VBO_ITEM::GetIndices() const +{ + return m_indices; +} + + +int VBO_ITEM::GetSize() const +{ + return m_size; +} + + +void VBO_ITEM::SetOffset( int aOffset ) +{ + m_offset = aOffset; + // TODO change offset for all the vertices? +} + + +int VBO_ITEM::GetOffset() const +{ + return m_offset; +} + + +/* +// TODO +void SetVbo( int aVboId ) +{ +} + + +int GetVbo() +{ +} +*/ diff --git a/common/view/view.cpp b/common/view/view.cpp index c185430d3e..a81e117e6b 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -205,6 +205,9 @@ void VIEW::SetGAL( GAL* aGal ) { m_gal = aGal; + if( m_painter ) + m_painter->SetGAL( m_gal ); + // items need to be recached after changing GAL if( m_useGroups ) recacheAllItems(); diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index ce4ff73c39..b18051a8d4 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -55,6 +55,7 @@ namespace KiGfx { class SHADER; +class VBO_ITEM; /** * @brief Class OpenGL_GAL is the OpenGL implementation of the Graphics Abstraction Layer. @@ -88,7 +89,7 @@ public: */ OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener = NULL, wxEvtHandler* aPaintListener = NULL, bool isUseShaders = false, - const wxString& aName = wxT("GLCanvas") ); + const wxString& aName = wxT( "GLCanvas" ) ); virtual ~OPENGL_GAL(); @@ -132,7 +133,7 @@ public: // Screen methods // -------------- -/// @brief Resizes the canvas. + /// @brief Resizes the canvas. virtual void ResizeScreen ( int aWidth, int aHeight ); /// @brief Shows/hides the GAL canvas @@ -335,19 +336,28 @@ private: wxEvtHandler* paintListener; // Display lists - GLuint displayListsArcs; ///< Arc display list - GLuint displayListCircle; ///< Circle display list - GLuint displayListSemiCircle; ///< Semi circle display list - std::deque displayListsGroup; ///< List of display lists used for groups + GLuint displayListsArcs; ///< Arc display list + GLuint displayListCircle; ///< Circle display list + GLuint displayListSemiCircle; ///< Semi circle display list + std::deque displayListsGroup; ///< List of display lists used for groups - double curvePoints[12]; ///< Coefficients for curves - std::deque unitCirclePoints; ///< List of the points on a unit circle + // Vertex buffer objects related fields + std::deque vboItems; ///< Stores informations about VBO objects + VBO_ITEM* curVboItem; + GLuint curVboVertId; + GLuint curVboIndId; + + int vboSize; + bool vboNeedsUpdate; + + double curvePoints[12]; ///< Coefficients for curves + std::deque unitCirclePoints; ///< List of the points on a unit circle // Polygon tesselation - GLUtesselator* tesselator; ///< Pointer to the tesselator + GLUtesselator* tesselator; ///< Pointer to the tesselator // Shader - std::deque shaderList; ///< List of the shaders + std::deque shaderList; ///< List of the shaders // Cursor int cursorSize; ///< Size of the cursor in pixels @@ -368,6 +378,7 @@ private: bool isCreated; bool isGlewInitialized; ///< Is GLEW initialized? bool isFrameBufferInitialized; ///< Are the frame buffers initialized? + bool isVboInitialized; bool isShaderInitialized; ///< Was the shader initialized? bool isShaderEnabled; ///< Are the shaders enabled? bool isUseShader; ///< Should the shaders be used? @@ -457,6 +468,15 @@ private: */ void deleteFrameBuffer( GLuint* aFrameBuffer, GLuint* aDepthBuffer, GLuint* aTexture ); + // TODO comment + void initVertexBufferObjects(); + + // TODO comment + void deleteVertexBufferObjects(); + + // TODO comment + void rebuildVbo(); + /** * @brief Draw a quad for the line. * diff --git a/include/gal/opengl/vbo_item.h b/include/gal/opengl/vbo_item.h new file mode 100644 index 0000000000..cc6c629d60 --- /dev/null +++ b/include/gal/opengl/vbo_item.h @@ -0,0 +1,114 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file vbo_item.h + * @brief Class to handle an item held in a Vertex Buffer Object. + */ + +// TODO comments + +#ifndef VBO_ITEM_H_ +#define VBO_ITEM_H_ + +#include + +namespace KiGfx +{ + +class VBO_ITEM +{ +public: + VBO_ITEM(); + ~VBO_ITEM(); + + // TODO comments + void PushVertex( const GLfloat* aVertex ); + void PushVertices( const GLfloat* aVertex, GLuint aSize ); + + /** + * Function GetVertices() + * Returns a pointer to the array containing all vertices. + * @return Pointer to vertices packed in format {X, Y, Z, R, G, B, A}. + */ + GLfloat* GetVertices() const; + + GLuint* GetIndices() const; + + /** + * Function GetSize() + * Returns information about number of vertices stored. + * @param Amount of vertices. + */ + int GetSize() const; + + /** + * Function SetOffset() + * Sets data offset in the VBO. + * @param aOffset is the offset expressed as a number of vertices. + */ + void SetOffset( int aOffset ); + + /** + * Function GetOffset() + * Returns data offset in the VBO. + * @return Data offset expressed as a number of vertices. + */ + int GetOffset() const; + + ///< Functions for getting VBO ids. + //void SetVbo( int aVboId ); + //int GetVbo(); + + ///< Data organization information for vertices. + static const int VertStride = 7; + static const int VertSize = VertStride * sizeof(GLfloat); + static const int IndStride = 1; + static const int IndSize = IndStride * sizeof(GLuint); + static const int ColorOffset = 3 * sizeof(GLfloat); + +private: + ///< VBO ids in which the item is stored. + //int m_vboId; // not used yet + + ///< Contains vertices coordinates and colors. + ///< Packed by 7 floats for each vertex: {X, Y, Z, R, G, B, A} + GLfloat* m_vertices; + + GLuint* m_indices; + + ///< Offset and size of data in VBO. + int m_offset; + int m_size; + + ///< Shader data used for rendering. + int m_shader; + int m_shaderAttrib; + + ///< Flag telling if the item should be recached in VBO or not. + bool m_isDirty; +}; +} // namespace KiGfx + +#endif /* VBO_ITEM_H_ */ diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 68b9a6d234..8de801efa9 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -166,7 +166,7 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) // in order to be displayed // Load zones - for( int i = 0; i < m_Pcb->GetAreaCount(); ++i ) + /*for( int i = 0; i < m_Pcb->GetAreaCount(); ++i ) { view->Add( (KiGfx::VIEW_ITEM*) ( m_Pcb->GetArea( i ) ) ); } @@ -175,7 +175,7 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) for( BOARD_ITEM* drawing = m_Pcb->m_Drawings; drawing; drawing = drawing->Next() ) { view->Add( drawing ); - } + }*/ // Load tracks for( TRACK* track = m_Pcb->m_Track; track; track = track->Next() ) @@ -184,7 +184,7 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) } // Load modules and its additional elements - for( MODULE* module = m_Pcb->m_Modules; module; module = module->Next() ) + /*for( MODULE* module = m_Pcb->m_Modules; module; module = module->Next() ) { // Load module's pads for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) @@ -208,7 +208,7 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) for( SEGZONE* zone = m_Pcb->m_Zone; zone; zone = zone->Next() ) { view->Add( zone ); - } + }*/ // Apply layer coloring scheme & display options if( view->GetPainter() ) From fb65f5d1aea047639457c49179f7f060e3d1cf2f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 30 Apr 2013 17:55:24 +0200 Subject: [PATCH 063/415] Improved recaching (all items when a board is loaded), still needs some fixing (mem leak). --- common/drawframe.cpp | 9 +++++-- common/gal/opengl/opengl_gal.cpp | 17 +++++-------- common/view/view.cpp | 43 +++++++++++++++++++++++++++----- include/view/view.h | 11 +++++--- pcbnew/basepcbframe.cpp | 3 +++ 5 files changed, 61 insertions(+), 22 deletions(-) diff --git a/common/drawframe.cpp b/common/drawframe.cpp index f3b8263f33..f992f43d3d 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -941,17 +941,19 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU ) void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) { #ifdef KICAD_GAL + KiGfx::VIEW* view = m_galCanvas->GetView(); + KiGfx::GAL* gal = m_galCanvas->GetGAL(); + if( aEnable && m_galCanvasActive ) { // When we switch between GAL based canvases, all we need is a refresh + view->RecacheAllItems( true ); m_galCanvas->Refresh(); } if( !( aEnable ^ m_galCanvasActive ) ) return; - KiGfx::VIEW* view = m_galCanvas->GetView(); - KiGfx::GAL* gal = m_galCanvas->GetGAL(); double zoomFactor = gal->GetWorldScale() / gal->GetZoomFactor(); // Display the same view after canvas switching @@ -979,6 +981,9 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) m_auimgr.GetPane( wxT( "DrawFrameGal" ) ).Show( aEnable ); m_auimgr.Update(); + if( aEnable ) + view->RecacheAllItems( true ); + m_galCanvasActive = aEnable; #endif /* KICAD_GAL */ } diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 6ae5d37f1d..45034592b2 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -403,7 +403,10 @@ void OPENGL_GAL::BeginDrawing() SetFillColor( fillColor ); SetStrokeColor( strokeColor ); isDeleteSavedPixels = true; - vboNeedsUpdate = false; + + // If any of VBO items is dirty - recache everything + if( vboNeedsUpdate ) + rebuildVbo(); } @@ -455,13 +458,6 @@ void OPENGL_GAL::blitMainTexture( bool aIsClearFrameBuffer ) void OPENGL_GAL::EndDrawing() { - // If any of VBO items is dirty - recache everything - if( vboNeedsUpdate ) - { - rebuildVbo(); - vboNeedsUpdate = false; - } - // Draw the remaining contents, blit the main texture to the screen, swap the buffers glFlush(); blitMainTexture( true ); @@ -521,6 +517,8 @@ void OPENGL_GAL::rebuildVbo() delete verticesBuffer; delete indicesBuffer; + vboNeedsUpdate = false; + #ifdef __WXDEBUG__ prof_end( &totalTime ); @@ -1484,9 +1482,6 @@ void OPENGL_GAL::EndGroup() { vboSize += curVboItem->GetSize(); - // TODO this has to be removed in final version - rebuildVbo(); - isGroupStarted = false; } diff --git a/common/view/view.cpp b/common/view/view.cpp index a81e117e6b..050481e5a6 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -209,8 +209,8 @@ void VIEW::SetGAL( GAL* aGal ) m_painter->SetGAL( m_gal ); // items need to be recached after changing GAL - if( m_useGroups ) - recacheAllItems(); + //if( m_useGroups ) + //RecacheAllItems(); // force the new GAL to display the current viewport. SetCenter( m_center ); @@ -387,7 +387,7 @@ struct VIEW::drawItem aItem->setGroup( currentLayer, group ); view->m_painter->Draw( static_cast( aItem ), currentLayer ); gal->EndGroup(); - gal->DrawGroup( group ); + //gal->DrawGroup( group ); } } else if( aItem->ViewIsVisible() ) @@ -453,10 +453,33 @@ struct VIEW::unlinkItem struct VIEW::recacheItem { + recacheItem( VIEW* aView, GAL* aGal, int aLayer, bool aImmediately ) : + view( aView ), gal( aGal ), layer( aLayer ), immediately( aImmediately ) + { + } + void operator()( VIEW_ITEM* aItem ) { - aItem->deleteGroups(); + //aItem->deleteGroups(); + /*int prevGroup = aItem->getGroup( layer ); + if( prevGroup != -1 ) + { + gal->DeleteGroup( prevGroup ); + }*/ + + if( immediately ) + { + int group = gal->BeginGroup(); + aItem->setGroup( layer, group ); + view->m_painter->Draw( static_cast( aItem ), layer ); + gal->EndGroup(); + } } + + VIEW* view; + GAL* gal; + int layer; + bool immediately; }; @@ -571,16 +594,24 @@ void VIEW::clearGroupCache() } -void VIEW::recacheAllItems() +void VIEW::RecacheAllItems( bool aImmediately ) { BOX2I r; r.SetMaximum(); + wxLogDebug( wxT( "RecacheAllItems::immediately: %u" ), aImmediately ); + + if( aImmediately ) + m_gal->BeginDrawing(); + for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) { VIEW_LAYER* l = & ( ( *i ).second ); - recacheItem visitor; + recacheItem visitor( this, m_gal, l->id, aImmediately ); l->items->Query( r, visitor ); }; + + if( aImmediately ) + m_gal->EndDrawing(); } diff --git a/include/view/view.h b/include/view/view.h index 4cf09cc5c2..bc30b28a59 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -294,6 +294,14 @@ public: */ void PartialRedraw(); + /** + * Function RecacheAllItems() + * Rebuilds GAL display lists. + * @param aForceNow decides if every item should be instantly recached. Otherwise items are + * going to be recached when they become visible. + */ + void RecacheAllItems( bool aForceNow = false ); + /** * Function IsDynamic() * Tells if the VIEW is dynamic (ie. can be changed, for example displaying PCBs in a window) @@ -350,9 +358,6 @@ private: ///* Clears cached GAL display lists void clearGroupCache(); - ///* Rebuilds GAL display lists - void recacheAllItems(); - /// Determines rendering order of layers. Used in display order sorting function. static bool compareRenderingOrder( VIEW_LAYER* i, VIEW_LAYER* j ) { diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 8de801efa9..e85b87db33 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -243,7 +243,10 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) view->SetTopLayer( m_Pcb->GetLayer() ); if( m_galCanvasActive ) + { + view->RecacheAllItems( true ); m_galCanvas->Refresh(); + } } #endif } From 7b426e8103f1b1fc7c1bff757e41d795413ebcaa Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 10 May 2013 16:05:40 +0200 Subject: [PATCH 064/415] Fixed memleak, removed excessive recaching, still there is a problem with Cairo caching --- common/drawframe.cpp | 4 --- common/drawpanel_gal.cpp | 5 +++- common/gal/opengl/opengl_gal.cpp | 40 +++++++++++++++++------------ common/gal/opengl/vbo_item.cpp | 5 +++- common/view/view.cpp | 43 +++++++++++++++++--------------- include/gal/opengl/opengl_gal.h | 3 +-- include/view/view.h | 5 ++-- 7 files changed, 59 insertions(+), 46 deletions(-) diff --git a/common/drawframe.cpp b/common/drawframe.cpp index f992f43d3d..eafdf65f41 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -947,7 +947,6 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) if( aEnable && m_galCanvasActive ) { // When we switch between GAL based canvases, all we need is a refresh - view->RecacheAllItems( true ); m_galCanvas->Refresh(); } @@ -981,9 +980,6 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) m_auimgr.GetPane( wxT( "DrawFrameGal" ) ).Show( aEnable ); m_auimgr.Update(); - if( aEnable ) - view->RecacheAllItems( true ); - m_galCanvasActive = aEnable; #endif /* KICAD_GAL */ } diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index bd9fe02b44..0403d60dc6 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -71,7 +71,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin m_view->SetGAL( m_gal ); // View uses layers to display EDA_ITEMs (item may be displayed on several layers, for example - // pad may be shown on pad, pad hole nad solder paste layers). There are usual copper layers + // pad may be shown on pad, pad hole and solder paste layers). There are usual copper layers // (eg. F.Cu, B.Cu, internal and so on) and layers for displaying objects such as texts, // silkscreen, pads, vias, etc. for( int i = 0; i < TOTAL_LAYER_COUNT; i++ ) @@ -154,7 +154,10 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) m_gal->ComputeWorldScreenMatrix(); if( m_view ) + { m_view->SetGAL( m_gal ); + m_view->RecacheAllItems( true ); + } wxSize size = GetClientSize(); m_gal->ResizeScreen( size.GetX(), size.GetY() ); diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 45034592b2..bde328fdf6 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -52,7 +52,7 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, wxEXPAND, aName ) { // Create the OpenGL-Context - glContext = new wxGLContext( this ); + glContext = new wxGLContext( this ); parentWindow = aParent; mouseListener = aMouseListener; paintListener = aPaintListener; @@ -68,11 +68,12 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, isFrameBufferInitialized = false; isUseShader = isUseShaders; isShaderInitialized = false; - isGroupStarted = false; + isGrouping = false; shaderPath = "../../common/gal/opengl/shader/"; wxSize parentSize = aParent->GetSize(); isVboInitialized = false; + vboNeedsUpdate = false; curVboItem = NULL; vboSize = 0; @@ -110,13 +111,6 @@ OPENGL_GAL::~OPENGL_GAL() { glFlush(); - // Delete the stored display lists - for( std::deque::iterator group = displayListsGroup.begin(); - group != displayListsGroup.end(); group++ ) - { - glDeleteLists( *group, 1 ); - } - // Delete the buffers if( isFrameBufferInitialized ) { @@ -126,6 +120,12 @@ OPENGL_GAL::~OPENGL_GAL() if( isVboInitialized ) { + std::deque::iterator it, end; + for( it = vboItems.begin(), end = vboItems.end(); it != end; it++ ) + { + delete *it; + } + deleteVertexBufferObjects(); } @@ -514,8 +514,8 @@ void OPENGL_GAL::rebuildVbo() glBufferData( GL_ELEMENT_ARRAY_BUFFER, vboSize * VBO_ITEM::IndSize, indicesBuffer, GL_DYNAMIC_DRAW ); glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 ); - delete verticesBuffer; - delete indicesBuffer; + delete[] verticesBuffer; + delete[] indicesBuffer; vboNeedsUpdate = false; @@ -607,7 +607,7 @@ inline void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2 // XXX Should be improved later. double scale = 0.5 * lineWidth / lineLength; double scale1pix = 0.5001 / worldScale / lineLength; - if( lineWidth * worldScale < 1.0002 && !isGroupStarted ) + if( lineWidth * worldScale < 1.0002 && !isGrouping ) { scale = scale1pix; } @@ -637,7 +637,7 @@ void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndP VECTOR2D startEndVector = aEndPoint - aStartPoint; double lineAngle = atan2( startEndVector.y, startEndVector.x ); - if ( isGroupStarted ) + if ( isGrouping ) { // Angle of a line perpendicular to the segment being drawn double beta = ( M_PI / 2.0 ) - lineAngle; @@ -1464,7 +1464,7 @@ void OPENGL_GAL::Restore() int OPENGL_GAL::BeginGroup() { - isGroupStarted = true; + isGrouping = true; // There is a new group that is not in VBO yet vboNeedsUpdate = true; @@ -1482,17 +1482,25 @@ void OPENGL_GAL::EndGroup() { vboSize += curVboItem->GetSize(); - isGroupStarted = false; + isGrouping = false; } void OPENGL_GAL::DeleteGroup( int aGroupNumber ) { + if( aGroupNumber >= vboItems.size() ) + { + // This should not happen + wxLogDebug( wxT( "Tried to delete not existing group" ) ); + return; + } + std::deque::iterator it = vboItems.begin(); std::advance( it, aGroupNumber ); + //vboSize -= it->GetSize(); // FIXME? delete *it; - vboItems.erase( it ); + //vboItems.erase( it ); vboNeedsUpdate = true; } diff --git a/common/gal/opengl/vbo_item.cpp b/common/gal/opengl/vbo_item.cpp index f853a8cae0..ba6a27c147 100644 --- a/common/gal/opengl/vbo_item.cpp +++ b/common/gal/opengl/vbo_item.cpp @@ -46,6 +46,9 @@ VBO_ITEM::~VBO_ITEM() { if( m_vertices ) delete m_vertices; + + if( m_indices ) + delete m_indices; } @@ -76,7 +79,7 @@ void VBO_ITEM::PushVertex( const GLfloat* aVertex ) m_indices = newIndices; // Add the new vertex - newIndices[m_size] = m_offset + m_size; + m_indices[m_size] = m_offset + m_size; m_size++; m_isDirty = true; diff --git a/common/view/view.cpp b/common/view/view.cpp index 050481e5a6..9302fc1e6d 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -208,9 +208,9 @@ void VIEW::SetGAL( GAL* aGal ) if( m_painter ) m_painter->SetGAL( m_gal ); - // items need to be recached after changing GAL - //if( m_useGroups ) - //RecacheAllItems(); + // clear group numbers, so everything is going to be recached + if( m_useGroups ) + clearGroupCache(); // force the new GAL to display the current viewport. SetCenter( m_center ); @@ -387,7 +387,6 @@ struct VIEW::drawItem aItem->setGroup( currentLayer, group ); view->m_painter->Draw( static_cast( aItem ), currentLayer ); gal->EndGroup(); - //gal->DrawGroup( group ); } } else if( aItem->ViewIsVisible() ) @@ -460,20 +459,24 @@ struct VIEW::recacheItem void operator()( VIEW_ITEM* aItem ) { - //aItem->deleteGroups(); - /*int prevGroup = aItem->getGroup( layer ); - if( prevGroup != -1 ) + // Remove previously cached group + int prevGroup = aItem->getGroup( layer ); + if( prevGroup >= 0 ) { gal->DeleteGroup( prevGroup ); - }*/ + } if( immediately ) { int group = gal->BeginGroup(); - aItem->setGroup( layer, group ); view->m_painter->Draw( static_cast( aItem ), layer ); + aItem->setGroup( layer, group ); gal->EndGroup(); } + else + { + aItem->setGroup( layer, -1 ); + } } VIEW* view; @@ -565,12 +568,6 @@ struct VIEW::clearItemCache { if( aItem->storesGroups() ) { - std::vector groups = aItem->getAllGroups(); - for(std::vector::iterator i = groups.begin(); i != groups.end(); i++ ) - { - view->GetGAL()->DeleteGroup( *i ); - } - aItem->deleteGroups(); } } @@ -581,6 +578,9 @@ struct VIEW::clearItemCache void VIEW::clearGroupCache() { + if( !m_useGroups ) + return; + BOX2I r; r.SetMaximum(); @@ -596,22 +596,25 @@ void VIEW::clearGroupCache() void VIEW::RecacheAllItems( bool aImmediately ) { + if( !m_useGroups ) + return; + BOX2I r; r.SetMaximum(); - wxLogDebug( wxT( "RecacheAllItems::immediately: %u" ), aImmediately ); - - if( aImmediately ) + //if( aImmediately ) m_gal->BeginDrawing(); + wxLogDebug( wxT( "RecacheAllItems::immediately: %u" ), aImmediately ); + for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) { VIEW_LAYER* l = & ( ( *i ).second ); recacheItem visitor( this, m_gal, l->id, aImmediately ); l->items->Query( r, visitor ); - }; + } - if( aImmediately ) + //if( aImmediately ) m_gal->EndDrawing(); } diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index b18051a8d4..75941ecacf 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -339,7 +339,6 @@ private: GLuint displayListsArcs; ///< Arc display list GLuint displayListCircle; ///< Circle display list GLuint displayListSemiCircle; ///< Semi circle display list - std::deque displayListsGroup; ///< List of display lists used for groups // Vertex buffer objects related fields std::deque vboItems; ///< Stores informations about VBO objects @@ -382,7 +381,7 @@ private: bool isShaderInitialized; ///< Was the shader initialized? bool isShaderEnabled; ///< Are the shaders enabled? bool isUseShader; ///< Should the shaders be used? - bool isGroupStarted; ///< Was a group started? + bool isGrouping; ///< Was a group started? int currentShader; ///< ID of the shader currently in use std::string shaderPath; diff --git a/include/view/view.h b/include/view/view.h index bc30b28a59..45e7645671 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -355,14 +355,15 @@ private: ///* Sorts m_orderedLayers when layer rendering order has changed void sortLayers(); - ///* Clears cached GAL display lists + ///* Clears cached GAL group numbers (*ONLY* numbers stored in VIEW_ITEMs, not group objects + ///* used by GAL) void clearGroupCache(); /// Determines rendering order of layers. Used in display order sorting function. static bool compareRenderingOrder( VIEW_LAYER* i, VIEW_LAYER* j ) { return i->renderingOrder > j->renderingOrder; - }; + } /// Contains set of possible displayed layers and its properties LayerMap m_layers; From 9f711724377fd3d4735c1927a8d3f43f66994b81 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 13 May 2013 10:55:35 +0200 Subject: [PATCH 065/415] Fixed Cairo issues and some possible memory leaks --- common/gal/cairo/cairo_gal.cpp | 53 +++++++++++++++++++++++--------- common/gal/opengl/opengl_gal.cpp | 10 ++---- common/view/view.cpp | 8 +---- include/gal/cairo/cairo_gal.h | 9 ++++-- 4 files changed, 49 insertions(+), 31 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 48fb12326d..cd52bcf94f 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -40,7 +40,7 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, // Default values fillColor = COLOR4D( 0, 0, 0, 1 ); strokeColor = COLOR4D( 1, 1, 1, 1 ); - screenSize = VECTOR2D( 20, 20 ); // window will be soon resized + screenSize = VECTOR2D( aParent->GetSize() ); parentWindow = aParent; mouseListener = aMouseListener; @@ -101,7 +101,11 @@ CAIRO_GAL::~CAIRO_GAL() delete cursorPixels; delete cursorPixelsSaved; - // TODO Deleting of list contents like groups and paths + for( int i = groups.size() - 1; i >= 0; --i ) + { + DeleteGroup( i ); + } + deleteBitmaps(); } @@ -133,7 +137,7 @@ void CAIRO_GAL::skipMouseEvent( wxMouseEvent& aEvent ) } -void CAIRO_GAL::BeginDrawing() throw( int ) +void CAIRO_GAL::initSurface() { // The size of the client area needs to be greater than zero clientRectangle = parentWindow->GetClientRect(); @@ -141,13 +145,15 @@ void CAIRO_GAL::BeginDrawing() throw( int ) if( clientRectangle.width == 0 || clientRectangle.height == 0 ) throw EXCEPTION_ZERO_CLIENT_RECTANGLE; - // clientDC = new wxClientDC( this ); - - // Create the CAIRO surface + // Create the Cairo surface cairoSurface = cairo_image_surface_create_for_data( (unsigned char*) bitmapBuffer, CAIRO_FORMAT_RGB24, clientRectangle.width, clientRectangle.height, stride ); - cairoImage = cairo_create( cairoSurface ); + cairoImage = cairo_create ( cairoSurface ); +#ifdef __WXDEBUG__ + cairo_status_t status = cairo_status( cairoImage ); + wxASSERT_MSG( status == CAIRO_STATUS_SUCCESS, "Cairo context creation error" ); +#endif /* __WXDEBUG__ */ // ----------------------------------------------------------------- @@ -178,6 +184,20 @@ void CAIRO_GAL::BeginDrawing() throw( int ) lineWidth = 0; isDeleteSavedPixels = true; +} + + +void CAIRO_GAL::deinitSurface() +{ + // Destroy Cairo objects + cairo_destroy( cairoImage ); + cairo_surface_destroy( cairoSurface ); +} + + +void CAIRO_GAL::BeginDrawing() throw( int ) +{ + initSurface(); cairo_push_group( cairoImage ); } @@ -211,9 +231,7 @@ void CAIRO_GAL::EndDrawing() wxBufferedDC dc; dc.Init( &client_dc, bmp ); - // Destroy Cairo objects - cairo_destroy( cairoImage ); - cairo_surface_destroy( cairoSurface ); + deinitSurface(); } @@ -637,6 +655,8 @@ void CAIRO_GAL::Restore() int CAIRO_GAL::BeginGroup() { + initSurface(); + // If the grouping is started: the actual path is stored in the group, when // a attribute was changed or when grouping stops with the end group method. storePath(); @@ -651,6 +671,8 @@ void CAIRO_GAL::EndGroup() { storePath(); isGrouping = false; + + deinitSurface(); } @@ -659,12 +681,13 @@ void CAIRO_GAL::DeleteGroup( int aGroupNumber ) storePath(); // Delete the Cairo paths - for( std::deque::iterator it = groups[aGroupNumber].begin(); - it != groups[aGroupNumber].end(); ++it ) + for( std::deque::iterator it = groups[aGroupNumber].begin(), end = groups[aGroupNumber].end(); + it != end; ++it ) { if( it->command == CMD_FILL_PATH || it->command == CMD_STROKE_PATH ) { - cairo_path_destroy( it->cairoPath ); + if( it->cairoPath->status == CAIRO_STATUS_SUCCESS ) + cairo_path_destroy( it->cairoPath ); } } @@ -817,7 +840,7 @@ void CAIRO_GAL::storePath() // add this command to the group list; cairo_path_t* path = cairo_copy_path( cairoImage ); - pathList.push_back( path ); + // pathList.push_back( path ); // FIXME: it's not used anywhere else? if( isStrokeEnabled ) { @@ -924,7 +947,7 @@ void CAIRO_GAL::DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndP void CAIRO_GAL::allocateBitmaps() { - // Create buffer, use the system independent CAIRO image back end + // Create buffer, use the system independent Cairo image backend stride = cairo_format_stride_for_width( CAIRO_FORMAT_RGB24, screenSize.x ); bufferSize = stride * screenSize.y; diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index bde328fdf6..f454b2ccdb 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -1488,19 +1488,15 @@ void OPENGL_GAL::EndGroup() void OPENGL_GAL::DeleteGroup( int aGroupNumber ) { - if( aGroupNumber >= vboItems.size() ) - { - // This should not happen - wxLogDebug( wxT( "Tried to delete not existing group" ) ); - return; - } + wxASSERT_MSG( aGroupNumber < vboItems.size(), + "OPENGL_GAL: Tried to delete not existing group" ); std::deque::iterator it = vboItems.begin(); std::advance( it, aGroupNumber ); //vboSize -= it->GetSize(); // FIXME? delete *it; - //vboItems.erase( it ); + //vboItems.erase( it ); // makes change to group numbers - that's veeery bad vboNeedsUpdate = true; } diff --git a/common/view/view.cpp b/common/view/view.cpp index 9302fc1e6d..0b04449aac 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -469,8 +469,8 @@ struct VIEW::recacheItem if( immediately ) { int group = gal->BeginGroup(); - view->m_painter->Draw( static_cast( aItem ), layer ); aItem->setGroup( layer, group ); + view->m_painter->Draw( static_cast( aItem ), layer ); gal->EndGroup(); } else @@ -603,9 +603,6 @@ void VIEW::RecacheAllItems( bool aImmediately ) r.SetMaximum(); - //if( aImmediately ) - m_gal->BeginDrawing(); - wxLogDebug( wxT( "RecacheAllItems::immediately: %u" ), aImmediately ); for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) @@ -614,7 +611,4 @@ void VIEW::RecacheAllItems( bool aImmediately ) recacheItem visitor( this, m_gal, l->id, aImmediately ); l->items->Query( r, visitor ); } - - //if( aImmediately ) - m_gal->EndDrawing(); } diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 5eb425e81e..16343cd077 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -359,14 +359,13 @@ private: unsigned int* bitmapBuffer; ///< Storage of the cairo image unsigned int* bitmapBufferBackup; ///< Backup storage of the cairo image int stride; ///< Stride value for Cairo - // wxClientDC* clientDC; ///< Pointer to the clientDC // Mapping between Cairo and GAL line attributes std::map lineCapMap; ///< Line cap style mapping std::map lineJoinMap; ///< Line join style mapping // Methods - void storePath(); ///< Store the actual path + void storePath(); ///< Store the actual path // Event handlers /** @@ -395,6 +394,12 @@ private: /// Allocate the bitmaps for drawing void deleteBitmaps(); + + /// Prepare Cairo surfaces for drawing + void initSurface(); + + // Destroy Cairo surfaces when are not needed anymore + void deinitSurface(); }; } // namespace KiGfx From 918231795b15af1790675d0e14b45345d987aa5f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 13 May 2013 11:14:35 +0200 Subject: [PATCH 066/415] Added possibility of adding multiple vertices to VBO_ITEM at once --- common/gal/opengl/opengl_gal.cpp | 32 +++++++++-------------------- common/gal/opengl/vbo_item.cpp | 35 +++++++++++++++++++++++++++++--- include/gal/opengl/vbo_item.h | 1 + 3 files changed, 43 insertions(+), 25 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index f454b2ccdb..08d1c03a9f 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -651,28 +651,16 @@ void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndP VECTOR2D v3( aEndPoint.x - ( aWidth * cos( beta ) / 2.0 ), aEndPoint.y + ( aWidth * sin( beta ) / 2.0 ) ); - // First triangle - GLfloat newVertex1[] = { v0.x, v0.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a }; - GLfloat newVertex2[] = { v1.x, v1.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a }; - GLfloat newVertex3[] = { v2.x, v2.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a }; - - // Second triangle - GLfloat newVertex4[] = { v0.x, v0.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a }; - GLfloat newVertex5[] = { v2.x, v2.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a }; - GLfloat newVertex6[] = { v3.x, v3.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a }; - - curVboItem->PushVertex( newVertex1 ); - curVboItem->PushVertex( newVertex2 ); - curVboItem->PushVertex( newVertex3 ); - curVboItem->PushVertex( newVertex4 ); - curVboItem->PushVertex( newVertex5 ); - curVboItem->PushVertex( newVertex6 ); + // Two triangles + GLfloat newVertices[] = { + v0.x, v0.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + v1.x, v1.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + v2.x, v2.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + v0.x, v0.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + v2.x, v2.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + v3.x, v3.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a + }; + curVboItem->PushVertices( newVertices, 6 ); } if( isFillEnabled ) diff --git a/common/gal/opengl/vbo_item.cpp b/common/gal/opengl/vbo_item.cpp index ba6a27c147..fc9a8df53d 100644 --- a/common/gal/opengl/vbo_item.cpp +++ b/common/gal/opengl/vbo_item.cpp @@ -61,7 +61,7 @@ void VBO_ITEM::PushVertex( const GLfloat* aVertex ) if( m_vertices ) { // Copy all previous vertices data - memcpy( newVertices, m_vertices, ( m_size ) * VertSize ); + memcpy( newVertices, m_vertices, m_size * VertSize ); delete m_vertices; } m_vertices = newVertices; @@ -73,7 +73,7 @@ void VBO_ITEM::PushVertex( const GLfloat* aVertex ) if( m_indices ) { // Copy all previous vertices data - memcpy( newIndices, m_indices, ( m_size ) * IndSize ); + memcpy( newIndices, m_indices, m_size * IndSize ); delete m_indices; } m_indices = newIndices; @@ -88,7 +88,36 @@ void VBO_ITEM::PushVertex( const GLfloat* aVertex ) void VBO_ITEM::PushVertices( const GLfloat* aVertex, GLuint aSize ) { - // FIXME to be done + int newSize = m_size + aSize; + GLfloat* newVertices = new GLfloat[newSize * VertStride]; + GLuint* newIndices = new GLuint[newSize * IndStride]; + + // Handle new vertices + if( m_vertices ) + { + // Copy all previous vertices data + memcpy( newVertices, m_vertices, ( m_size ) * VertSize ); + delete m_vertices; + } + m_vertices = newVertices; + + // Add the new vertex + memcpy( &newVertices[m_size * VertStride], aVertex, aSize * VertSize ); + + // Handle new indices + if( m_indices ) + { + // Copy all previous vertices data + memcpy( newIndices, m_indices, ( m_size ) * IndSize ); + delete m_indices; + } + m_indices = newIndices; + + // Add the new vertex + for( int i = m_size; i < newSize; ++i ) + m_indices[i] = m_offset + i; + + m_size += aSize; m_isDirty = true; } diff --git a/include/gal/opengl/vbo_item.h b/include/gal/opengl/vbo_item.h index cc6c629d60..80ed663bd9 100644 --- a/include/gal/opengl/vbo_item.h +++ b/include/gal/opengl/vbo_item.h @@ -96,6 +96,7 @@ private: ///< Packed by 7 floats for each vertex: {X, Y, Z, R, G, B, A} GLfloat* m_vertices; + ///< Indices of vertices GLuint* m_indices; ///< Offset and size of data in VBO. From 66d257f6207ee37c34e13066cec94b378f66bacd Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 14 May 2013 10:38:25 +0200 Subject: [PATCH 067/415] Drawing tracks using PushVertices, added some comments, fixed formatting. --- common/gal/opengl/opengl_gal.cpp | 90 +++++++++++++++++------------ common/gal/opengl/shader/round.vert | 2 +- common/gal/opengl/vbo_item.cpp | 8 +-- include/gal/opengl/vbo_item.h | 34 +++++++---- 4 files changed, 83 insertions(+), 51 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 08d1c03a9f..ce691a06e3 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -68,7 +68,7 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, isFrameBufferInitialized = false; isUseShader = isUseShaders; isShaderInitialized = false; - isGrouping = false; + isGrouping = false; shaderPath = "../../common/gal/opengl/shader/"; wxSize parentSize = aParent->GetSize(); @@ -615,20 +615,35 @@ inline void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2 VECTOR2D perpendicularVector( -startEndVector.y * scale, startEndVector.x * scale ); // Compute the edge points of the line - VECTOR2D point1 = aStartPoint + perpendicularVector; - VECTOR2D point2 = aStartPoint - perpendicularVector; - VECTOR2D point3 = aEndPoint + perpendicularVector; - VECTOR2D point4 = aEndPoint - perpendicularVector; + VECTOR2D v0 = aStartPoint + perpendicularVector; + VECTOR2D v1 = aStartPoint - perpendicularVector; + VECTOR2D v2 = aEndPoint + perpendicularVector; + VECTOR2D v3 = aEndPoint - perpendicularVector; - glBegin( GL_TRIANGLES ); - glVertex3d( point1.x, point1.y, layerDepth ); - glVertex3d( point2.x, point2.y, layerDepth ); - glVertex3d( point4.x, point4.y, layerDepth ); + if( isGrouping ) + { + GLfloat newVertices[] = { + v0.x, v0.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + v1.x, v1.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + v3.x, v3.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + v0.x, v0.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + v3.x, v3.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + v2.x, v2.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a + }; + curVboItem->PushVertices( newVertices, 6 ); + } + else + { + glBegin( GL_TRIANGLES ); + glVertex3d( v0.x, v0.y, layerDepth ); + glVertex3d( v1.x, v1.y, layerDepth ); + glVertex3d( v3.x, v3.y, layerDepth ); - glVertex3d( point1.x, point1.y, layerDepth ); - glVertex3d( point4.x, point4.y, layerDepth ); - glVertex3d( point3.x, point3.y, layerDepth ); - glEnd(); + glVertex3d( v0.x, v0.y, layerDepth ); + glVertex3d( v3.x, v3.y, layerDepth ); + glVertex3d( v2.x, v2.y, layerDepth ); + glEnd(); + } } @@ -637,7 +652,7 @@ void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndP VECTOR2D startEndVector = aEndPoint - aStartPoint; double lineAngle = atan2( startEndVector.y, startEndVector.x ); - if ( isGrouping ) + /*if ( isGrouping ) { // Angle of a line perpendicular to the segment being drawn double beta = ( M_PI / 2.0 ) - lineAngle; @@ -662,37 +677,40 @@ void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndP }; curVboItem->PushVertices( newVertices, 6 ); } - - if( isFillEnabled ) + else*/ { - glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + if( isFillEnabled ) + { + if( !isGrouping ) + glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - SetLineWidth( aWidth ); - drawSemiCircle( aStartPoint, aWidth / 2, lineAngle + M_PI / 2, layerDepth ); - drawSemiCircle( aEndPoint, aWidth / 2, lineAngle - M_PI / 2, layerDepth ); - drawLineQuad( aStartPoint, aEndPoint ); - } - else - { - double lineLength = startEndVector.EuclideanNorm(); + SetLineWidth( aWidth ); + drawSemiCircle( aStartPoint, aWidth / 2, lineAngle + M_PI / 2, layerDepth ); + drawSemiCircle( aEndPoint, aWidth / 2, lineAngle - M_PI / 2, layerDepth ); + drawLineQuad( aStartPoint, aEndPoint ); + } + else + { + double lineLength = startEndVector.EuclideanNorm(); - glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); - glPushMatrix(); + glPushMatrix(); - glTranslated( aStartPoint.x, aStartPoint.y, 0.0 ); - glRotated( lineAngle * ( 360 / ( 2 * M_PI ) ), 0, 0, 1 ); + glTranslated( aStartPoint.x, aStartPoint.y, 0.0 ); + glRotated( lineAngle * ( 360 / ( 2 * M_PI ) ), 0, 0, 1 ); - drawLineQuad( VECTOR2D( 0.0, aWidth / 2.0 ), - VECTOR2D( lineLength, aWidth / 2.0 ) ); + drawLineQuad( VECTOR2D( 0.0, aWidth / 2.0 ), + VECTOR2D( lineLength, aWidth / 2.0 ) ); - drawLineQuad( VECTOR2D( 0.0, -aWidth / 2.0 ), - VECTOR2D( lineLength, -aWidth / 2.0 ) ); + drawLineQuad( VECTOR2D( 0.0, -aWidth / 2.0 ), + VECTOR2D( lineLength, -aWidth / 2.0 ) ); - DrawArc( VECTOR2D( 0.0, 0.0 ), aWidth / 2.0, M_PI / 2.0, 3.0 * M_PI / 2.0 ); - DrawArc( VECTOR2D( lineLength, 0.0 ), aWidth / 2.0, M_PI / 2.0, -M_PI / 2.0 ); + DrawArc( VECTOR2D( 0.0, 0.0 ), aWidth / 2.0, M_PI / 2.0, 3.0 * M_PI / 2.0 ); + DrawArc( VECTOR2D( lineLength, 0.0 ), aWidth / 2.0, M_PI / 2.0, -M_PI / 2.0 ); - glPopMatrix(); + glPopMatrix(); + } } } diff --git a/common/gal/opengl/shader/round.vert b/common/gal/opengl/shader/round.vert index 21410a6063..c42f2be8f5 100644 --- a/common/gal/opengl/shader/round.vert +++ b/common/gal/opengl/shader/round.vert @@ -25,7 +25,7 @@ #version 120 -varying float aspect; +varying float aspect; void main() { diff --git a/common/gal/opengl/vbo_item.cpp b/common/gal/opengl/vbo_item.cpp index fc9a8df53d..2ef84ccf5a 100644 --- a/common/gal/opengl/vbo_item.cpp +++ b/common/gal/opengl/vbo_item.cpp @@ -86,7 +86,7 @@ void VBO_ITEM::PushVertex( const GLfloat* aVertex ) } -void VBO_ITEM::PushVertices( const GLfloat* aVertex, GLuint aSize ) +void VBO_ITEM::PushVertices( const GLfloat* aVertices, GLuint aSize ) { int newSize = m_size + aSize; GLfloat* newVertices = new GLfloat[newSize * VertStride]; @@ -101,8 +101,8 @@ void VBO_ITEM::PushVertices( const GLfloat* aVertex, GLuint aSize ) } m_vertices = newVertices; - // Add the new vertex - memcpy( &newVertices[m_size * VertStride], aVertex, aSize * VertSize ); + // Add new vertices + memcpy( &newVertices[m_size * VertStride], aVertices, aSize * VertSize ); // Handle new indices if( m_indices ) @@ -160,7 +160,7 @@ void SetVbo( int aVboId ) } -int GetVbo() +int GetVbo() const { } */ diff --git a/include/gal/opengl/vbo_item.h b/include/gal/opengl/vbo_item.h index 80ed663bd9..ca0f229c99 100644 --- a/include/gal/opengl/vbo_item.h +++ b/include/gal/opengl/vbo_item.h @@ -43,9 +43,23 @@ public: VBO_ITEM(); ~VBO_ITEM(); - // TODO comments + /** + * Function PushVertex() + * Adds a single vertex to the VBO_ITEM. Vertex contains information about coordinates and + * colors and has to follow the specified format {X,Y,Z,R,G,B,A}. + * @param aVertex is a vertex to be added. + */ void PushVertex( const GLfloat* aVertex ); - void PushVertices( const GLfloat* aVertex, GLuint aSize ); + + /** + * Function PushVertices() + * Adds multiple vertices to the VBO_ITEM. This function is recommended over multiple calls to + * PushVertex, as it does less memory reallocations. Vertices contain information about + * coordinates and colors and has to follow the specified format {X,Y,Z,R,G,B,A}. + * @param aVertices are vertices to be added. + * @param aSize is an amount of vertices to be added. + */ + void PushVertices( const GLfloat* aVertices, GLuint aSize ); /** * Function GetVertices() @@ -79,7 +93,7 @@ public: ///< Functions for getting VBO ids. //void SetVbo( int aVboId ); - //int GetVbo(); + //int GetVbo() const; ///< Data organization information for vertices. static const int VertStride = 7; @@ -94,21 +108,21 @@ private: ///< Contains vertices coordinates and colors. ///< Packed by 7 floats for each vertex: {X, Y, Z, R, G, B, A} - GLfloat* m_vertices; + GLfloat* m_vertices; ///< Indices of vertices - GLuint* m_indices; + GLuint* m_indices; ///< Offset and size of data in VBO. - int m_offset; - int m_size; + int m_offset; + int m_size; ///< Shader data used for rendering. - int m_shader; - int m_shaderAttrib; + int m_shader; + int m_shaderAttrib; ///< Flag telling if the item should be recached in VBO or not. - bool m_isDirty; + bool m_isDirty; }; } // namespace KiGfx From 48b288cdc205911e3720247d68983adf652ab983 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 14 May 2013 10:41:05 +0200 Subject: [PATCH 068/415] Modified SetOffset (VBO_ITEM/OpenGL GAL) function. --- common/gal/opengl/vbo_item.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/common/gal/opengl/vbo_item.cpp b/common/gal/opengl/vbo_item.cpp index 2ef84ccf5a..4663dada19 100644 --- a/common/gal/opengl/vbo_item.cpp +++ b/common/gal/opengl/vbo_item.cpp @@ -142,8 +142,18 @@ int VBO_ITEM::GetSize() const void VBO_ITEM::SetOffset( int aOffset ) { + if( m_offset == aOffset ) + return; + + int delta = aOffset - m_offset; + + // Change offset for all the stored indices + for( int i = 0; i < m_size; ++i ) + { + m_indices += delta; + } + m_offset = aOffset; - // TODO change offset for all the vertices? } From aec00ab96f7e35f33f81dd84e5cb58a7366b78a0 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 14 May 2013 10:42:56 +0200 Subject: [PATCH 069/415] Removed double freeing of some of Cairo paths. --- common/gal/cairo/cairo_gal.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index cd52bcf94f..797c69805f 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -686,8 +686,7 @@ void CAIRO_GAL::DeleteGroup( int aGroupNumber ) { if( it->command == CMD_FILL_PATH || it->command == CMD_STROKE_PATH ) { - if( it->cairoPath->status == CAIRO_STATUS_SUCCESS ) - cairo_path_destroy( it->cairoPath ); + cairo_path_destroy( it->cairoPath ); } } @@ -839,13 +838,12 @@ void CAIRO_GAL::storePath() // then check, if the path needs to be stroked/filled and // add this command to the group list; - cairo_path_t* path = cairo_copy_path( cairoImage ); // pathList.push_back( path ); // FIXME: it's not used anywhere else? if( isStrokeEnabled ) { GroupElement groupElement; - groupElement.cairoPath = path; + groupElement.cairoPath = cairo_copy_path( cairoImage ); groupElement.command = CMD_STROKE_PATH; groups.back().push_back( groupElement ); } @@ -853,7 +851,7 @@ void CAIRO_GAL::storePath() if( isFillEnabled ) { GroupElement groupElement; - groupElement.cairoPath = path; + groupElement.cairoPath = cairo_copy_path( cairoImage ); groupElement.command = CMD_FILL_PATH; groups.back().push_back( groupElement ); } From 817cf192c8af5d45f42683c24c11f13c5afe9abc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 14 May 2013 10:46:43 +0200 Subject: [PATCH 070/415] Fixed build for eeschema. --- common/drawpanel_gal.cpp | 3 +++ common/view/view.cpp | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 0403d60dc6..4f97c941d5 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -153,6 +153,9 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) m_gal->SetScreenDPI( 106 ); // Display resolution setting m_gal->ComputeWorldScreenMatrix(); + if( m_painter ) + m_painter->SetGAL( m_gal ); + if( m_view ) { m_view->SetGAL( m_gal ); diff --git a/common/view/view.cpp b/common/view/view.cpp index 0b04449aac..834bce3048 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -205,9 +205,6 @@ void VIEW::SetGAL( GAL* aGal ) { m_gal = aGal; - if( m_painter ) - m_painter->SetGAL( m_gal ); - // clear group numbers, so everything is going to be recached if( m_useGroups ) clearGroupCache(); From ea094a4fbc0ed998f282553be2d32a754ccaf707 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 15 May 2013 09:17:36 +0200 Subject: [PATCH 071/415] Added some debug informations. --- common/view/view.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/common/view/view.cpp b/common/view/view.cpp index 834bce3048..ea746b1d82 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -407,10 +407,12 @@ void VIEW::redrawRect( const BOX2I& aRect ) { int totalItems = 0, totalCached = 0; uint64_t totalDrawTime = 0; +#ifdef __WXDEBUG__ prof_counter totalCycles, totalRealTime; prof_start( &totalRealTime, false ); prof_start( &totalCycles, true ); +#endif /* __WXDEBUG__ */ BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers ) { @@ -428,6 +430,7 @@ void VIEW::redrawRect( const BOX2I& aRect ) } } +#ifdef __WXDEBUG__ prof_end( &totalCycles ); prof_end( &totalRealTime ); @@ -435,6 +438,7 @@ void VIEW::redrawRect( const BOX2I& aRect ) totalItems, totalCached, (double) totalRealTime.value / 1000.0, 1000000.0 / (double) totalRealTime.value, (double) totalDrawTime / (double) totalCycles.value * 100.0 ); +#endif /* __WXDEBUG__ */ } @@ -600,12 +604,23 @@ void VIEW::RecacheAllItems( bool aImmediately ) r.SetMaximum(); +#ifdef __WXDEBUG__ wxLogDebug( wxT( "RecacheAllItems::immediately: %u" ), aImmediately ); + prof_counter totalRealTime; + prof_start( &totalRealTime, false ); +#endif /* __WXDEBUG__ */ + for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) { VIEW_LAYER* l = & ( ( *i ).second ); recacheItem visitor( this, m_gal, l->id, aImmediately ); l->items->Query( r, visitor ); } + +#ifdef __WXDEBUG__ + prof_end( &totalRealTime ); + + wxLogDebug( wxT( "RecacheAllItems::%.1f ms" ), (double) totalRealTime.value / 1000.0 ); +#endif /* __WXDEBUG__ */ } From d76671a6017d5b5a627904bc57b2a53d604268ff Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 15 May 2013 09:17:42 +0200 Subject: [PATCH 072/415] Items are not recached until GAL is changed (earlier it was done on every rendering backend switch). --- common/drawpanel_gal.cpp | 5 +++++ include/class_drawpanel_gal.h | 1 + 2 files changed, 6 insertions(+) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 4f97c941d5..7e8cf7acf6 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -134,6 +134,9 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) { + if( aGalType == m_currentGal && m_gal != NULL ) + return; + if( m_gal ) delete m_gal; @@ -164,4 +167,6 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) wxSize size = GetClientSize(); m_gal->ResizeScreen( size.GetX(), size.GetY() ); + + m_currentGal = aGalType; } diff --git a/include/class_drawpanel_gal.h b/include/class_drawpanel_gal.h index 6629908a3a..6587f91044 100644 --- a/include/class_drawpanel_gal.h +++ b/include/class_drawpanel_gal.h @@ -87,6 +87,7 @@ protected: KiGfx::PAINTER* m_painter; ///< Contains information about how to draw items ///< using GAL KiGfx::WX_VIEW_CONTROLS* m_viewControls; ///< Control for VIEW (moving, zooming, etc.) + GalType m_currentGal; ///< Currently used GAL std::string m_galShaderPath; ///< Path to shader files, used in OpenGL mode }; From 4ad9af71f5a39473ec6a7fddfa24dc03a9cac4af Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 15 May 2013 09:17:48 +0200 Subject: [PATCH 073/415] All kind of items are loaded on SetBoard() again. --- pcbnew/basepcbframe.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index e85b87db33..f8f7418a78 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -166,7 +166,7 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) // in order to be displayed // Load zones - /*for( int i = 0; i < m_Pcb->GetAreaCount(); ++i ) + for( int i = 0; i < m_Pcb->GetAreaCount(); ++i ) { view->Add( (KiGfx::VIEW_ITEM*) ( m_Pcb->GetArea( i ) ) ); } @@ -175,7 +175,7 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) for( BOARD_ITEM* drawing = m_Pcb->m_Drawings; drawing; drawing = drawing->Next() ) { view->Add( drawing ); - }*/ + } // Load tracks for( TRACK* track = m_Pcb->m_Track; track; track = track->Next() ) @@ -184,7 +184,7 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) } // Load modules and its additional elements - /*for( MODULE* module = m_Pcb->m_Modules; module; module = module->Next() ) + for( MODULE* module = m_Pcb->m_Modules; module; module = module->Next() ) { // Load module's pads for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) @@ -208,7 +208,7 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) for( SEGZONE* zone = m_Pcb->m_Zone; zone; zone = zone->Next() ) { view->Add( zone ); - }*/ + } // Apply layer coloring scheme & display options if( view->GetPainter() ) From 5dd7ef6895cb6a31cfa4886fb272f4751646b6d8 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 15 May 2013 16:47:01 +0200 Subject: [PATCH 074/415] Assured that there are no excessive initializations --- common/gal/cairo/cairo_gal.cpp | 35 ++++++++++++++++++++++------------ include/gal/cairo/cairo_gal.h | 1 + 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 797c69805f..c2be24ce53 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -46,8 +46,10 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, mouseListener = aMouseListener; paintListener = aPaintListener; - isGrouping = false; - zoomFactor = 1.0; + isGrouping = false; + isInitialized = false; + isDeleteSavedPixels = false; + zoomFactor = 1.0; SetSize( aParent->GetSize() ); @@ -76,10 +78,6 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, lineJoinMap[LINE_JOIN_ROUND] = CAIRO_LINE_JOIN_ROUND; lineJoinMap[LINE_JOIN_MITER] = CAIRO_LINE_JOIN_MITER; - isDeleteSavedPixels = false; - - isGrouping = false; - // Initialize the cursor shape SetCursorColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); initCursor( 21 ); @@ -91,13 +89,13 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, SetGridColor( COLOR4D( 0.5, 0.5, 0.5, 0.3 ) ); SetCoarseGrid( 10 ); SetGridLineWidth( 0.5 ); - - Refresh(); } CAIRO_GAL::~CAIRO_GAL() { + deinitSurface(); + delete cursorPixels; delete cursorPixelsSaved; @@ -139,6 +137,9 @@ void CAIRO_GAL::skipMouseEvent( wxMouseEvent& aEvent ) void CAIRO_GAL::initSurface() { + if( isInitialized ) + return; + // The size of the client area needs to be greater than zero clientRectangle = parentWindow->GetClientRect(); @@ -184,14 +185,21 @@ void CAIRO_GAL::initSurface() lineWidth = 0; isDeleteSavedPixels = true; + + isInitialized = true; } void CAIRO_GAL::deinitSurface() { + if( !isInitialized ) + return; + // Destroy Cairo objects cairo_destroy( cairoImage ); cairo_surface_destroy( cairoSurface ); + + isInitialized = false; } @@ -548,12 +556,15 @@ void CAIRO_GAL::SetLayerDepth( double aLayerDepth ) { super::SetLayerDepth( aLayerDepth ); - storePath(); + if( isInitialized ) + { + storePath(); - cairo_pop_group_to_source( cairoImage ); - cairo_paint_with_alpha( cairoImage, fillColor.a ); + cairo_pop_group_to_source( cairoImage ); + cairo_paint_with_alpha( cairoImage, fillColor.a ); - cairo_push_group( cairoImage ); + cairo_push_group( cairoImage ); + } } diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 16343cd077..f70dd3e7c2 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -359,6 +359,7 @@ private: unsigned int* bitmapBuffer; ///< Storage of the cairo image unsigned int* bitmapBufferBackup; ///< Backup storage of the cairo image int stride; ///< Stride value for Cairo + bool isInitialized; ///< Are Cairo image & surface ready to use // Mapping between Cairo and GAL line attributes std::map lineCapMap; ///< Line cap style mapping From 541568e09f9905f89419d81b93a0381cabf9a2ab Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 15 May 2013 16:47:17 +0200 Subject: [PATCH 075/415] Layer depth is set during items caching (so now they are rendered on proper layers). --- common/view/view.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index ea746b1d82..5e250373fe 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -420,7 +420,8 @@ void VIEW::redrawRect( const BOX2I& aRect ) { drawItem drawFunc( this, l->id ); - m_gal->SetLayerDepth( (double) l->renderingOrder ); + if( !m_useGroups ) + m_gal->SetLayerDepth( (double) l->renderingOrder ); l->items->Query( aRect, drawFunc ); l->isDirty = false; @@ -614,6 +615,7 @@ void VIEW::RecacheAllItems( bool aImmediately ) for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) { VIEW_LAYER* l = & ( ( *i ).second ); + m_gal->SetLayerDepth( (double) l->renderingOrder ); recacheItem visitor( this, m_gal, l->id, aImmediately ); l->items->Query( r, visitor ); } From 787fe28fd0e2cf430a519413db4e243e5d855dc9 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 15 May 2013 16:48:10 +0200 Subject: [PATCH 076/415] Added functionality for transformation of VBO vertices, extended functions like translate, rotate, scale using glm library. Removed D() macro, as it was not used, but in conflict with glm library. Added VBO_ITEMs for circles, semicircles. Now almost everything is drawn using VBO (besides polygons and grid). --- common/gal/opengl/opengl_gal.cpp | 781 +++++++--- common/gal/opengl/vbo_item.cpp | 65 +- include/gal/opengl/glm/core/_detail.hpp | 475 ++++++ include/gal/opengl/glm/core/_fixes.hpp | 55 + include/gal/opengl/glm/core/_swizzle.hpp | 836 ++++++++++ include/gal/opengl/glm/core/_swizzle_func.hpp | 787 ++++++++++ include/gal/opengl/glm/core/_vectorize.hpp | 159 ++ include/gal/opengl/glm/core/dummy.cpp | 40 + include/gal/opengl/glm/core/func_common.hpp | 430 +++++ include/gal/opengl/glm/core/func_common.inl | 1197 ++++++++++++++ .../gal/opengl/glm/core/func_exponential.hpp | 123 ++ .../gal/opengl/glm/core/func_exponential.inl | 155 ++ .../gal/opengl/glm/core/func_geometric.hpp | 138 ++ .../gal/opengl/glm/core/func_geometric.inl | 322 ++++ include/gal/opengl/glm/core/func_integer.hpp | 201 +++ include/gal/opengl/glm/core/func_integer.inl | 646 ++++++++ include/gal/opengl/glm/core/func_matrix.hpp | 150 ++ include/gal/opengl/glm/core/func_matrix.inl | 582 +++++++ include/gal/opengl/glm/core/func_noise.hpp | 87 ++ include/gal/opengl/glm/core/func_noise.inl | 364 +++++ include/gal/opengl/glm/core/func_packing.hpp | 193 +++ include/gal/opengl/glm/core/func_packing.inl | 178 +++ .../opengl/glm/core/func_trigonometric.hpp | 203 +++ .../opengl/glm/core/func_trigonometric.inl | 244 +++ .../glm/core/func_vector_relational.hpp | 138 ++ .../glm/core/func_vector_relational.inl | 178 +++ include/gal/opengl/glm/core/hint.hpp | 40 + .../gal/opengl/glm/core/intrinsic_common.hpp | 89 ++ .../gal/opengl/glm/core/intrinsic_common.inl | 313 ++++ .../opengl/glm/core/intrinsic_exponential.hpp | 79 + .../opengl/glm/core/intrinsic_exponential.inl | 27 + .../opengl/glm/core/intrinsic_geometric.hpp | 76 + .../opengl/glm/core/intrinsic_geometric.inl | 146 ++ .../gal/opengl/glm/core/intrinsic_matrix.hpp | 69 + .../gal/opengl/glm/core/intrinsic_matrix.inl | 1070 +++++++++++++ .../glm/core/intrinsic_trigonometric.hpp | 48 + .../glm/core/intrinsic_trigonometric.inl | 27 + .../glm/core/intrinsic_vector_relational.hpp | 48 + .../glm/core/intrinsic_vector_relational.inl | 366 +++++ include/gal/opengl/glm/core/setup.hpp | 696 +++++++++ include/gal/opengl/glm/core/type.hpp | 341 ++++ include/gal/opengl/glm/core/type_float.hpp | 84 + include/gal/opengl/glm/core/type_gentype.hpp | 169 ++ include/gal/opengl/glm/core/type_gentype.inl | 366 +++++ include/gal/opengl/glm/core/type_half.hpp | 118 ++ include/gal/opengl/glm/core/type_half.inl | 421 +++++ include/gal/opengl/glm/core/type_int.hpp | 136 ++ include/gal/opengl/glm/core/type_mat.hpp | 75 + include/gal/opengl/glm/core/type_mat.inl | 27 + include/gal/opengl/glm/core/type_mat2x2.hpp | 314 ++++ include/gal/opengl/glm/core/type_mat2x2.inl | 700 +++++++++ include/gal/opengl/glm/core/type_mat2x3.hpp | 258 +++ include/gal/opengl/glm/core/type_mat2x3.inl | 645 ++++++++ include/gal/opengl/glm/core/type_mat2x4.hpp | 260 ++++ include/gal/opengl/glm/core/type_mat2x4.inl | 664 ++++++++ include/gal/opengl/glm/core/type_mat3x2.hpp | 265 ++++ include/gal/opengl/glm/core/type_mat3x2.inl | 682 ++++++++ include/gal/opengl/glm/core/type_mat3x3.hpp | 318 ++++ include/gal/opengl/glm/core/type_mat3x3.inl | 812 ++++++++++ include/gal/opengl/glm/core/type_mat3x4.hpp | 266 ++++ include/gal/opengl/glm/core/type_mat3x4.inl | 712 +++++++++ include/gal/opengl/glm/core/type_mat4x2.hpp | 270 ++++ include/gal/opengl/glm/core/type_mat4x2.inl | 728 +++++++++ include/gal/opengl/glm/core/type_mat4x3.hpp | 268 ++++ include/gal/opengl/glm/core/type_mat4x3.inl | 737 +++++++++ include/gal/opengl/glm/core/type_mat4x4.hpp | 320 ++++ include/gal/opengl/glm/core/type_mat4x4.inl | 905 +++++++++++ include/gal/opengl/glm/core/type_size.hpp | 43 + include/gal/opengl/glm/core/type_vec.hpp | 41 + include/gal/opengl/glm/core/type_vec.inl | 27 + include/gal/opengl/glm/core/type_vec1.hpp | 212 +++ include/gal/opengl/glm/core/type_vec1.inl | 928 +++++++++++ include/gal/opengl/glm/core/type_vec2.hpp | 317 ++++ include/gal/opengl/glm/core/type_vec2.inl | 1028 ++++++++++++ include/gal/opengl/glm/core/type_vec3.hpp | 342 ++++ include/gal/opengl/glm/core/type_vec3.inl | 1152 ++++++++++++++ include/gal/opengl/glm/core/type_vec4.hpp | 399 +++++ include/gal/opengl/glm/core/type_vec4.inl | 1378 +++++++++++++++++ include/gal/opengl/glm/ext.hpp | 145 ++ include/gal/opengl/glm/glm.hpp | 129 ++ include/gal/opengl/glm/gtc/constants.hpp | 186 +++ include/gal/opengl/glm/gtc/constants.inl | 186 +++ include/gal/opengl/glm/gtc/epsilon.hpp | 94 ++ include/gal/opengl/glm/gtc/epsilon.inl | 286 ++++ include/gal/opengl/glm/gtc/half_float.hpp | 440 ++++++ include/gal/opengl/glm/gtc/half_float.inl | 1039 +++++++++++++ include/gal/opengl/glm/gtc/matrix_access.hpp | 87 ++ include/gal/opengl/glm/gtc/matrix_access.inl | 80 + include/gal/opengl/glm/gtc/matrix_integer.hpp | 506 ++++++ include/gal/opengl/glm/gtc/matrix_inverse.hpp | 74 + include/gal/opengl/glm/gtc/matrix_inverse.inl | 159 ++ .../gal/opengl/glm/gtc/matrix_transform.hpp | 291 ++++ .../gal/opengl/glm/gtc/matrix_transform.inl | 430 +++++ include/gal/opengl/glm/gtc/noise.hpp | 80 + include/gal/opengl/glm/gtc/noise.inl | 867 +++++++++++ include/gal/opengl/glm/gtc/quaternion.hpp | 381 +++++ include/gal/opengl/glm/gtc/quaternion.inl | 788 ++++++++++ include/gal/opengl/glm/gtc/random.hpp | 114 ++ include/gal/opengl/glm/gtc/random.inl | 170 ++ include/gal/opengl/glm/gtc/reciprocal.hpp | 133 ++ include/gal/opengl/glm/gtc/reciprocal.inl | 199 +++ include/gal/opengl/glm/gtc/swizzle.hpp | 375 +++++ include/gal/opengl/glm/gtc/swizzle.inl | 116 ++ include/gal/opengl/glm/gtc/type_precision.hpp | 669 ++++++++ include/gal/opengl/glm/gtc/type_precision.inl | 32 + include/gal/opengl/glm/gtc/type_ptr.hpp | 169 ++ include/gal/opengl/glm/gtc/type_ptr.inl | 462 ++++++ include/gal/opengl/glm/gtc/ulp.hpp | 90 ++ include/gal/opengl/glm/gtc/ulp.inl | 314 ++++ .../gal/opengl/glm/gtx/associated_min_max.hpp | 106 ++ .../gal/opengl/glm/gtx/associated_min_max.inl | 912 +++++++++++ include/gal/opengl/glm/gtx/bit.hpp | 140 ++ include/gal/opengl/glm/gtx/bit.inl | 600 +++++++ include/gal/opengl/glm/gtx/closest_point.hpp | 66 + include/gal/opengl/glm/gtx/closest_point.inl | 36 + include/gal/opengl/glm/gtx/color_cast.hpp | 124 ++ include/gal/opengl/glm/gtx/color_cast.inl | 733 +++++++++ include/gal/opengl/glm/gtx/color_space.hpp | 96 ++ include/gal/opengl/glm/gtx/color_space.inl | 149 ++ .../gal/opengl/glm/gtx/color_space_YCoCg.hpp | 84 + .../gal/opengl/glm/gtx/color_space_YCoCg.inl | 64 + include/gal/opengl/glm/gtx/compatibility.hpp | 176 +++ include/gal/opengl/glm/gtx/compatibility.inl | 60 + include/gal/opengl/glm/gtx/component_wise.hpp | 82 + include/gal/opengl/glm/gtx/component_wise.inl | 47 + include/gal/opengl/glm/gtx/constants.hpp | 33 + include/gal/opengl/glm/gtx/epsilon.hpp | 29 + include/gal/opengl/glm/gtx/euler_angles.hpp | 156 ++ include/gal/opengl/glm/gtx/euler_angles.inl | 244 +++ include/gal/opengl/glm/gtx/extend.hpp | 66 + include/gal/opengl/glm/gtx/extend.inl | 55 + .../gal/opengl/glm/gtx/extented_min_max.hpp | 194 +++ .../gal/opengl/glm/gtx/extented_min_max.inl | 178 +++ .../gal/opengl/glm/gtx/fast_exponential.hpp | 99 ++ .../gal/opengl/glm/gtx/fast_exponential.inl | 148 ++ .../gal/opengl/glm/gtx/fast_square_root.hpp | 85 + .../gal/opengl/glm/gtx/fast_square_root.inl | 136 ++ .../gal/opengl/glm/gtx/fast_trigonometry.hpp | 100 ++ .../gal/opengl/glm/gtx/fast_trigonometry.inl | 75 + include/gal/opengl/glm/gtx/gradient_paint.hpp | 76 + include/gal/opengl/glm/gtx/gradient_paint.inl | 43 + .../glm/gtx/handed_coordinate_space.hpp | 74 + .../glm/gtx/handed_coordinate_space.inl | 33 + include/gal/opengl/glm/gtx/inertia.hpp | 115 ++ include/gal/opengl/glm/gtx/inertia.inl | 114 ++ include/gal/opengl/glm/gtx/int_10_10_10_2.hpp | 64 + include/gal/opengl/glm/gtx/int_10_10_10_2.inl | 19 + include/gal/opengl/glm/gtx/integer.hpp | 104 ++ include/gal/opengl/glm/gtx/integer.inl | 203 +++ include/gal/opengl/glm/gtx/intersect.hpp | 102 ++ include/gal/opengl/glm/gtx/intersect.inl | 196 +++ include/gal/opengl/glm/gtx/log_base.hpp | 65 + include/gal/opengl/glm/gtx/log_base.inl | 24 + .../opengl/glm/gtx/matrix_cross_product.hpp | 71 + .../opengl/glm/gtx/matrix_cross_product.inl | 44 + .../opengl/glm/gtx/matrix_interpolation.hpp | 88 ++ .../opengl/glm/gtx/matrix_interpolation.inl | 130 ++ .../opengl/glm/gtx/matrix_major_storage.hpp | 143 ++ .../opengl/glm/gtx/matrix_major_storage.inl | 173 +++ .../gal/opengl/glm/gtx/matrix_operation.hpp | 112 ++ .../gal/opengl/glm/gtx/matrix_operation.inl | 124 ++ include/gal/opengl/glm/gtx/matrix_query.hpp | 117 ++ include/gal/opengl/glm/gtx/matrix_query.inl | 154 ++ include/gal/opengl/glm/gtx/mixed_product.hpp | 65 + include/gal/opengl/glm/gtx/mixed_product.inl | 22 + include/gal/opengl/glm/gtx/multiple.hpp | 73 + include/gal/opengl/glm/gtx/multiple.inl | 118 ++ include/gal/opengl/glm/gtx/noise.hpp | 29 + include/gal/opengl/glm/gtx/norm.hpp | 133 ++ include/gal/opengl/glm/gtx/norm.inl | 156 ++ include/gal/opengl/glm/gtx/normal.hpp | 67 + include/gal/opengl/glm/gtx/normal.inl | 22 + include/gal/opengl/glm/gtx/normalize_dot.hpp | 76 + include/gal/opengl/glm/gtx/normalize_dot.inl | 115 ++ .../gal/opengl/glm/gtx/number_precision.hpp | 88 ++ .../gal/opengl/glm/gtx/number_precision.inl | 13 + include/gal/opengl/glm/gtx/ocl_type.hpp | 132 ++ include/gal/opengl/glm/gtx/ocl_type.inl | 0 include/gal/opengl/glm/gtx/optimum_pow.hpp | 91 ++ include/gal/opengl/glm/gtx/optimum_pow.inl | 58 + include/gal/opengl/glm/gtx/orthonormalize.hpp | 72 + include/gal/opengl/glm/gtx/orthonormalize.inl | 43 + include/gal/opengl/glm/gtx/perpendicular.hpp | 67 + include/gal/opengl/glm/gtx/perpendicular.inl | 21 + .../gal/opengl/glm/gtx/polar_coordinates.hpp | 70 + .../gal/opengl/glm/gtx/polar_coordinates.inl | 55 + include/gal/opengl/glm/gtx/projection.hpp | 65 + include/gal/opengl/glm/gtx/projection.inl | 21 + include/gal/opengl/glm/gtx/quaternion.hpp | 196 +++ include/gal/opengl/glm/gtx/quaternion.inl | 209 +++ include/gal/opengl/glm/gtx/random.hpp | 29 + include/gal/opengl/glm/gtx/raw_data.hpp | 75 + include/gal/opengl/glm/gtx/raw_data.inl | 11 + include/gal/opengl/glm/gtx/reciprocal.hpp | 26 + include/gal/opengl/glm/gtx/rotate_vector.hpp | 132 ++ include/gal/opengl/glm/gtx/rotate_vector.inl | 211 +++ include/gal/opengl/glm/gtx/simd_mat4.hpp | 206 +++ include/gal/opengl/glm/gtx/simd_mat4.inl | 590 +++++++ include/gal/opengl/glm/gtx/simd_vec4.hpp | 517 +++++++ include/gal/opengl/glm/gtx/simd_vec4.inl | 727 +++++++++ include/gal/opengl/glm/gtx/spline.hpp | 90 ++ include/gal/opengl/glm/gtx/spline.inl | 70 + include/gal/opengl/glm/gtx/std_based_type.hpp | 83 + include/gal/opengl/glm/gtx/std_based_type.inl | 13 + include/gal/opengl/glm/gtx/string_cast.hpp | 70 + include/gal/opengl/glm/gtx/string_cast.inl | 588 +++++++ include/gal/opengl/glm/gtx/transform.hpp | 131 ++ include/gal/opengl/glm/gtx/transform.inl | 90 ++ include/gal/opengl/glm/gtx/transform2.hpp | 135 ++ include/gal/opengl/glm/gtx/transform2.inl | 154 ++ include/gal/opengl/glm/gtx/ulp.hpp | 29 + include/gal/opengl/glm/gtx/unsigned_int.hpp | 26 + include/gal/opengl/glm/gtx/unsigned_int.inl | 13 + include/gal/opengl/glm/gtx/vec1.hpp | 137 ++ include/gal/opengl/glm/gtx/vec1.inl | 0 include/gal/opengl/glm/gtx/vector_access.hpp | 85 + include/gal/opengl/glm/gtx/vector_access.inl | 53 + include/gal/opengl/glm/gtx/vector_angle.hpp | 88 ++ include/gal/opengl/glm/gtx/vector_angle.inl | 57 + include/gal/opengl/glm/gtx/vector_query.hpp | 112 ++ include/gal/opengl/glm/gtx/vector_query.inl | 164 ++ .../gal/opengl/glm/gtx/verbose_operator.hpp | 83 + .../gal/opengl/glm/gtx/verbose_operator.inl | 124 ++ include/gal/opengl/glm/gtx/wrap.hpp | 73 + include/gal/opengl/glm/gtx/wrap.inl | 165 ++ include/gal/opengl/glm/virtrev/xstream.hpp | 166 ++ include/gal/opengl/opengl_gal.h | 75 +- include/gal/opengl/vbo_item.h | 50 +- pcbnew/basepcbframe.cpp | 4 +- 229 files changed, 52391 insertions(+), 239 deletions(-) create mode 100644 include/gal/opengl/glm/core/_detail.hpp create mode 100644 include/gal/opengl/glm/core/_fixes.hpp create mode 100644 include/gal/opengl/glm/core/_swizzle.hpp create mode 100644 include/gal/opengl/glm/core/_swizzle_func.hpp create mode 100644 include/gal/opengl/glm/core/_vectorize.hpp create mode 100644 include/gal/opengl/glm/core/dummy.cpp create mode 100644 include/gal/opengl/glm/core/func_common.hpp create mode 100644 include/gal/opengl/glm/core/func_common.inl create mode 100644 include/gal/opengl/glm/core/func_exponential.hpp create mode 100644 include/gal/opengl/glm/core/func_exponential.inl create mode 100644 include/gal/opengl/glm/core/func_geometric.hpp create mode 100644 include/gal/opengl/glm/core/func_geometric.inl create mode 100644 include/gal/opengl/glm/core/func_integer.hpp create mode 100644 include/gal/opengl/glm/core/func_integer.inl create mode 100644 include/gal/opengl/glm/core/func_matrix.hpp create mode 100644 include/gal/opengl/glm/core/func_matrix.inl create mode 100644 include/gal/opengl/glm/core/func_noise.hpp create mode 100644 include/gal/opengl/glm/core/func_noise.inl create mode 100644 include/gal/opengl/glm/core/func_packing.hpp create mode 100644 include/gal/opengl/glm/core/func_packing.inl create mode 100644 include/gal/opengl/glm/core/func_trigonometric.hpp create mode 100644 include/gal/opengl/glm/core/func_trigonometric.inl create mode 100644 include/gal/opengl/glm/core/func_vector_relational.hpp create mode 100644 include/gal/opengl/glm/core/func_vector_relational.inl create mode 100644 include/gal/opengl/glm/core/hint.hpp create mode 100644 include/gal/opengl/glm/core/intrinsic_common.hpp create mode 100644 include/gal/opengl/glm/core/intrinsic_common.inl create mode 100644 include/gal/opengl/glm/core/intrinsic_exponential.hpp create mode 100644 include/gal/opengl/glm/core/intrinsic_exponential.inl create mode 100644 include/gal/opengl/glm/core/intrinsic_geometric.hpp create mode 100644 include/gal/opengl/glm/core/intrinsic_geometric.inl create mode 100644 include/gal/opengl/glm/core/intrinsic_matrix.hpp create mode 100644 include/gal/opengl/glm/core/intrinsic_matrix.inl create mode 100644 include/gal/opengl/glm/core/intrinsic_trigonometric.hpp create mode 100644 include/gal/opengl/glm/core/intrinsic_trigonometric.inl create mode 100644 include/gal/opengl/glm/core/intrinsic_vector_relational.hpp create mode 100644 include/gal/opengl/glm/core/intrinsic_vector_relational.inl create mode 100644 include/gal/opengl/glm/core/setup.hpp create mode 100644 include/gal/opengl/glm/core/type.hpp create mode 100644 include/gal/opengl/glm/core/type_float.hpp create mode 100644 include/gal/opengl/glm/core/type_gentype.hpp create mode 100644 include/gal/opengl/glm/core/type_gentype.inl create mode 100644 include/gal/opengl/glm/core/type_half.hpp create mode 100644 include/gal/opengl/glm/core/type_half.inl create mode 100644 include/gal/opengl/glm/core/type_int.hpp create mode 100644 include/gal/opengl/glm/core/type_mat.hpp create mode 100644 include/gal/opengl/glm/core/type_mat.inl create mode 100644 include/gal/opengl/glm/core/type_mat2x2.hpp create mode 100644 include/gal/opengl/glm/core/type_mat2x2.inl create mode 100644 include/gal/opengl/glm/core/type_mat2x3.hpp create mode 100644 include/gal/opengl/glm/core/type_mat2x3.inl create mode 100644 include/gal/opengl/glm/core/type_mat2x4.hpp create mode 100644 include/gal/opengl/glm/core/type_mat2x4.inl create mode 100644 include/gal/opengl/glm/core/type_mat3x2.hpp create mode 100644 include/gal/opengl/glm/core/type_mat3x2.inl create mode 100644 include/gal/opengl/glm/core/type_mat3x3.hpp create mode 100644 include/gal/opengl/glm/core/type_mat3x3.inl create mode 100644 include/gal/opengl/glm/core/type_mat3x4.hpp create mode 100644 include/gal/opengl/glm/core/type_mat3x4.inl create mode 100644 include/gal/opengl/glm/core/type_mat4x2.hpp create mode 100644 include/gal/opengl/glm/core/type_mat4x2.inl create mode 100644 include/gal/opengl/glm/core/type_mat4x3.hpp create mode 100644 include/gal/opengl/glm/core/type_mat4x3.inl create mode 100644 include/gal/opengl/glm/core/type_mat4x4.hpp create mode 100644 include/gal/opengl/glm/core/type_mat4x4.inl create mode 100644 include/gal/opengl/glm/core/type_size.hpp create mode 100644 include/gal/opengl/glm/core/type_vec.hpp create mode 100644 include/gal/opengl/glm/core/type_vec.inl create mode 100644 include/gal/opengl/glm/core/type_vec1.hpp create mode 100644 include/gal/opengl/glm/core/type_vec1.inl create mode 100644 include/gal/opengl/glm/core/type_vec2.hpp create mode 100644 include/gal/opengl/glm/core/type_vec2.inl create mode 100644 include/gal/opengl/glm/core/type_vec3.hpp create mode 100644 include/gal/opengl/glm/core/type_vec3.inl create mode 100644 include/gal/opengl/glm/core/type_vec4.hpp create mode 100644 include/gal/opengl/glm/core/type_vec4.inl create mode 100644 include/gal/opengl/glm/ext.hpp create mode 100644 include/gal/opengl/glm/glm.hpp create mode 100644 include/gal/opengl/glm/gtc/constants.hpp create mode 100644 include/gal/opengl/glm/gtc/constants.inl create mode 100644 include/gal/opengl/glm/gtc/epsilon.hpp create mode 100644 include/gal/opengl/glm/gtc/epsilon.inl create mode 100644 include/gal/opengl/glm/gtc/half_float.hpp create mode 100644 include/gal/opengl/glm/gtc/half_float.inl create mode 100644 include/gal/opengl/glm/gtc/matrix_access.hpp create mode 100644 include/gal/opengl/glm/gtc/matrix_access.inl create mode 100644 include/gal/opengl/glm/gtc/matrix_integer.hpp create mode 100644 include/gal/opengl/glm/gtc/matrix_inverse.hpp create mode 100644 include/gal/opengl/glm/gtc/matrix_inverse.inl create mode 100644 include/gal/opengl/glm/gtc/matrix_transform.hpp create mode 100644 include/gal/opengl/glm/gtc/matrix_transform.inl create mode 100644 include/gal/opengl/glm/gtc/noise.hpp create mode 100644 include/gal/opengl/glm/gtc/noise.inl create mode 100644 include/gal/opengl/glm/gtc/quaternion.hpp create mode 100644 include/gal/opengl/glm/gtc/quaternion.inl create mode 100644 include/gal/opengl/glm/gtc/random.hpp create mode 100644 include/gal/opengl/glm/gtc/random.inl create mode 100644 include/gal/opengl/glm/gtc/reciprocal.hpp create mode 100644 include/gal/opengl/glm/gtc/reciprocal.inl create mode 100644 include/gal/opengl/glm/gtc/swizzle.hpp create mode 100644 include/gal/opengl/glm/gtc/swizzle.inl create mode 100644 include/gal/opengl/glm/gtc/type_precision.hpp create mode 100644 include/gal/opengl/glm/gtc/type_precision.inl create mode 100644 include/gal/opengl/glm/gtc/type_ptr.hpp create mode 100644 include/gal/opengl/glm/gtc/type_ptr.inl create mode 100644 include/gal/opengl/glm/gtc/ulp.hpp create mode 100644 include/gal/opengl/glm/gtc/ulp.inl create mode 100644 include/gal/opengl/glm/gtx/associated_min_max.hpp create mode 100644 include/gal/opengl/glm/gtx/associated_min_max.inl create mode 100644 include/gal/opengl/glm/gtx/bit.hpp create mode 100644 include/gal/opengl/glm/gtx/bit.inl create mode 100644 include/gal/opengl/glm/gtx/closest_point.hpp create mode 100644 include/gal/opengl/glm/gtx/closest_point.inl create mode 100644 include/gal/opengl/glm/gtx/color_cast.hpp create mode 100644 include/gal/opengl/glm/gtx/color_cast.inl create mode 100644 include/gal/opengl/glm/gtx/color_space.hpp create mode 100644 include/gal/opengl/glm/gtx/color_space.inl create mode 100644 include/gal/opengl/glm/gtx/color_space_YCoCg.hpp create mode 100644 include/gal/opengl/glm/gtx/color_space_YCoCg.inl create mode 100644 include/gal/opengl/glm/gtx/compatibility.hpp create mode 100644 include/gal/opengl/glm/gtx/compatibility.inl create mode 100644 include/gal/opengl/glm/gtx/component_wise.hpp create mode 100644 include/gal/opengl/glm/gtx/component_wise.inl create mode 100644 include/gal/opengl/glm/gtx/constants.hpp create mode 100644 include/gal/opengl/glm/gtx/epsilon.hpp create mode 100644 include/gal/opengl/glm/gtx/euler_angles.hpp create mode 100644 include/gal/opengl/glm/gtx/euler_angles.inl create mode 100644 include/gal/opengl/glm/gtx/extend.hpp create mode 100644 include/gal/opengl/glm/gtx/extend.inl create mode 100644 include/gal/opengl/glm/gtx/extented_min_max.hpp create mode 100644 include/gal/opengl/glm/gtx/extented_min_max.inl create mode 100644 include/gal/opengl/glm/gtx/fast_exponential.hpp create mode 100644 include/gal/opengl/glm/gtx/fast_exponential.inl create mode 100644 include/gal/opengl/glm/gtx/fast_square_root.hpp create mode 100644 include/gal/opengl/glm/gtx/fast_square_root.inl create mode 100644 include/gal/opengl/glm/gtx/fast_trigonometry.hpp create mode 100644 include/gal/opengl/glm/gtx/fast_trigonometry.inl create mode 100644 include/gal/opengl/glm/gtx/gradient_paint.hpp create mode 100644 include/gal/opengl/glm/gtx/gradient_paint.inl create mode 100644 include/gal/opengl/glm/gtx/handed_coordinate_space.hpp create mode 100644 include/gal/opengl/glm/gtx/handed_coordinate_space.inl create mode 100644 include/gal/opengl/glm/gtx/inertia.hpp create mode 100644 include/gal/opengl/glm/gtx/inertia.inl create mode 100644 include/gal/opengl/glm/gtx/int_10_10_10_2.hpp create mode 100644 include/gal/opengl/glm/gtx/int_10_10_10_2.inl create mode 100644 include/gal/opengl/glm/gtx/integer.hpp create mode 100644 include/gal/opengl/glm/gtx/integer.inl create mode 100644 include/gal/opengl/glm/gtx/intersect.hpp create mode 100644 include/gal/opengl/glm/gtx/intersect.inl create mode 100644 include/gal/opengl/glm/gtx/log_base.hpp create mode 100644 include/gal/opengl/glm/gtx/log_base.inl create mode 100644 include/gal/opengl/glm/gtx/matrix_cross_product.hpp create mode 100644 include/gal/opengl/glm/gtx/matrix_cross_product.inl create mode 100644 include/gal/opengl/glm/gtx/matrix_interpolation.hpp create mode 100644 include/gal/opengl/glm/gtx/matrix_interpolation.inl create mode 100644 include/gal/opengl/glm/gtx/matrix_major_storage.hpp create mode 100644 include/gal/opengl/glm/gtx/matrix_major_storage.inl create mode 100644 include/gal/opengl/glm/gtx/matrix_operation.hpp create mode 100644 include/gal/opengl/glm/gtx/matrix_operation.inl create mode 100644 include/gal/opengl/glm/gtx/matrix_query.hpp create mode 100644 include/gal/opengl/glm/gtx/matrix_query.inl create mode 100644 include/gal/opengl/glm/gtx/mixed_product.hpp create mode 100644 include/gal/opengl/glm/gtx/mixed_product.inl create mode 100644 include/gal/opengl/glm/gtx/multiple.hpp create mode 100644 include/gal/opengl/glm/gtx/multiple.inl create mode 100644 include/gal/opengl/glm/gtx/noise.hpp create mode 100644 include/gal/opengl/glm/gtx/norm.hpp create mode 100644 include/gal/opengl/glm/gtx/norm.inl create mode 100644 include/gal/opengl/glm/gtx/normal.hpp create mode 100644 include/gal/opengl/glm/gtx/normal.inl create mode 100644 include/gal/opengl/glm/gtx/normalize_dot.hpp create mode 100644 include/gal/opengl/glm/gtx/normalize_dot.inl create mode 100644 include/gal/opengl/glm/gtx/number_precision.hpp create mode 100644 include/gal/opengl/glm/gtx/number_precision.inl create mode 100644 include/gal/opengl/glm/gtx/ocl_type.hpp create mode 100644 include/gal/opengl/glm/gtx/ocl_type.inl create mode 100644 include/gal/opengl/glm/gtx/optimum_pow.hpp create mode 100644 include/gal/opengl/glm/gtx/optimum_pow.inl create mode 100644 include/gal/opengl/glm/gtx/orthonormalize.hpp create mode 100644 include/gal/opengl/glm/gtx/orthonormalize.inl create mode 100644 include/gal/opengl/glm/gtx/perpendicular.hpp create mode 100644 include/gal/opengl/glm/gtx/perpendicular.inl create mode 100644 include/gal/opengl/glm/gtx/polar_coordinates.hpp create mode 100644 include/gal/opengl/glm/gtx/polar_coordinates.inl create mode 100644 include/gal/opengl/glm/gtx/projection.hpp create mode 100644 include/gal/opengl/glm/gtx/projection.inl create mode 100644 include/gal/opengl/glm/gtx/quaternion.hpp create mode 100644 include/gal/opengl/glm/gtx/quaternion.inl create mode 100644 include/gal/opengl/glm/gtx/random.hpp create mode 100644 include/gal/opengl/glm/gtx/raw_data.hpp create mode 100644 include/gal/opengl/glm/gtx/raw_data.inl create mode 100644 include/gal/opengl/glm/gtx/reciprocal.hpp create mode 100644 include/gal/opengl/glm/gtx/rotate_vector.hpp create mode 100644 include/gal/opengl/glm/gtx/rotate_vector.inl create mode 100644 include/gal/opengl/glm/gtx/simd_mat4.hpp create mode 100644 include/gal/opengl/glm/gtx/simd_mat4.inl create mode 100644 include/gal/opengl/glm/gtx/simd_vec4.hpp create mode 100644 include/gal/opengl/glm/gtx/simd_vec4.inl create mode 100644 include/gal/opengl/glm/gtx/spline.hpp create mode 100644 include/gal/opengl/glm/gtx/spline.inl create mode 100644 include/gal/opengl/glm/gtx/std_based_type.hpp create mode 100644 include/gal/opengl/glm/gtx/std_based_type.inl create mode 100644 include/gal/opengl/glm/gtx/string_cast.hpp create mode 100644 include/gal/opengl/glm/gtx/string_cast.inl create mode 100644 include/gal/opengl/glm/gtx/transform.hpp create mode 100644 include/gal/opengl/glm/gtx/transform.inl create mode 100644 include/gal/opengl/glm/gtx/transform2.hpp create mode 100644 include/gal/opengl/glm/gtx/transform2.inl create mode 100644 include/gal/opengl/glm/gtx/ulp.hpp create mode 100644 include/gal/opengl/glm/gtx/unsigned_int.hpp create mode 100644 include/gal/opengl/glm/gtx/unsigned_int.inl create mode 100644 include/gal/opengl/glm/gtx/vec1.hpp create mode 100644 include/gal/opengl/glm/gtx/vec1.inl create mode 100644 include/gal/opengl/glm/gtx/vector_access.hpp create mode 100644 include/gal/opengl/glm/gtx/vector_access.inl create mode 100644 include/gal/opengl/glm/gtx/vector_angle.hpp create mode 100644 include/gal/opengl/glm/gtx/vector_angle.inl create mode 100644 include/gal/opengl/glm/gtx/vector_query.hpp create mode 100644 include/gal/opengl/glm/gtx/vector_query.inl create mode 100644 include/gal/opengl/glm/gtx/verbose_operator.hpp create mode 100644 include/gal/opengl/glm/gtx/verbose_operator.inl create mode 100644 include/gal/opengl/glm/gtx/wrap.hpp create mode 100644 include/gal/opengl/glm/gtx/wrap.inl create mode 100644 include/gal/opengl/glm/virtrev/xstream.hpp diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index ce691a06e3..c66397b78f 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -3,6 +3,8 @@ * * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * Copyright (C) 2013 CERN + * @author Maciej Suminski * * Graphics Abstraction Layer (GAL) for OpenGL * @@ -26,8 +28,8 @@ #include #include -#include #include +#include #include #include @@ -76,6 +78,7 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, vboNeedsUpdate = false; curVboItem = NULL; vboSize = 0; + transform = glm::mat4( 1.0f ); SetSize( parentSize ); @@ -104,6 +107,11 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, #if defined _WIN32 || defined _WIN64 Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); #endif + + // Compute the unit circles, used for speed up of the circle drawing + computeUnitCircle(); + computeUnitSemiCircle(); + // computeUnitArcs(); // TODO it is not used anywhere } @@ -121,6 +129,7 @@ OPENGL_GAL::~OPENGL_GAL() if( isVboInitialized ) { std::deque::iterator it, end; + for( it = vboItems.begin(), end = vboItems.end(); it != end; it++ ) { delete *it; @@ -283,7 +292,7 @@ void OPENGL_GAL::initGlew() else { wxLogDebug( wxString( wxT( "Status: Using GLEW " ) ) + - FROM_UTF8( (char*) glewGetString( GLEW_VERSION ) ) ); + FROM_UTF8( (char*) glewGetString( GLEW_VERSION ) ) ); } // Check the OpenGL version (minimum 2.1 is required) @@ -305,7 +314,7 @@ void OPENGL_GAL::initGlew() } // Vertex buffer have to be supported - if ( !GLEW_ARB_vertex_buffer_object ) + if( !GLEW_ARB_vertex_buffer_object ) { wxLogError( wxT( "Vertex buffer objects are not supported!" ) ); exit( 1 ); @@ -313,11 +322,6 @@ void OPENGL_GAL::initGlew() initVertexBufferObjects(); - // Compute the unit circles, used for speed up of the circle drawing - computeUnitCircle(); - computeUnitSemiCircle(); - computeUnitArcs(); - isGlewInitialized = true; } @@ -435,6 +439,7 @@ void OPENGL_GAL::blitMainTexture( bool aIsClearFrameBuffer ) glMatrixMode( GL_PROJECTION ); glPushMatrix(); glLoadIdentity(); + glBegin( GL_TRIANGLES ); glTexCoord2i( 0, 1 ); glVertex3i( -1, -1, 0 ); @@ -503,17 +508,16 @@ void OPENGL_GAL::rebuildVbo() indicesBufferPtr += size * VBO_ITEM::IndStride; } - deleteVertexBufferObjects(); - initVertexBufferObjects(); - + // Upload vertices coordinates and indices to GPU memory glBindBuffer( GL_ARRAY_BUFFER, curVboVertId ); glBufferData( GL_ARRAY_BUFFER, vboSize * VBO_ITEM::VertSize, verticesBuffer, GL_DYNAMIC_DRAW ); - glBindBuffer( GL_ARRAY_BUFFER, 0 ); glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, curVboIndId ); - glBufferData( GL_ELEMENT_ARRAY_BUFFER, vboSize * VBO_ITEM::IndSize, indicesBuffer, GL_DYNAMIC_DRAW ); + glBufferData( GL_ELEMENT_ARRAY_BUFFER, vboSize * VBO_ITEM::IndSize, + indicesBuffer, GL_DYNAMIC_DRAW ); glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 ); + // Remove temporary buffers delete[] verticesBuffer; delete[] indicesBuffer; @@ -567,11 +571,11 @@ void OPENGL_GAL::drawRoundedSegment( const VECTOR2D& aStartPoint, const VECTOR2D if( aStroke ) { - glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); } else { - glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); } selectShader( 0 ); @@ -622,7 +626,8 @@ inline void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2 if( isGrouping ) { - GLfloat newVertices[] = { + const GLfloat newVertices[] = + { v0.x, v0.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, v1.x, v1.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, v3.x, v3.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, @@ -647,70 +652,42 @@ inline void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2 } -void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aWidth ) +void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, + double aWidth ) { VECTOR2D startEndVector = aEndPoint - aStartPoint; double lineAngle = atan2( startEndVector.y, startEndVector.x ); - /*if ( isGrouping ) + if( isFillEnabled ) { - // Angle of a line perpendicular to the segment being drawn - double beta = ( M_PI / 2.0 ) - lineAngle; + color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - VECTOR2D v0( aStartPoint.x - ( aWidth * cos( beta ) / 2.0 ), - aStartPoint.y + ( aWidth * sin( beta ) / 2.0 ) ); - VECTOR2D v1( aStartPoint.x + ( aWidth * cos( beta ) / 2.0 ), - aStartPoint.y - ( aWidth * sin( beta ) / 2.0 ) ); - VECTOR2D v2( aEndPoint.x + ( aWidth * cos( beta ) / 2.0 ), - aEndPoint.y - ( aWidth * sin( beta ) / 2.0 ) ); - VECTOR2D v3( aEndPoint.x - ( aWidth * cos( beta ) / 2.0 ), - aEndPoint.y + ( aWidth * sin( beta ) / 2.0 ) ); - - // Two triangles - GLfloat newVertices[] = { - v0.x, v0.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - v1.x, v1.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - v2.x, v2.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - v0.x, v0.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - v2.x, v2.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - v3.x, v3.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a - }; - curVboItem->PushVertices( newVertices, 6 ); + SetLineWidth( aWidth ); + drawSemiCircle( aStartPoint, aWidth / 2, lineAngle + M_PI / 2, layerDepth ); + drawSemiCircle( aEndPoint, aWidth / 2, lineAngle - M_PI / 2, layerDepth ); + drawLineQuad( aStartPoint, aEndPoint ); } - else*/ + else { - if( isFillEnabled ) - { - if( !isGrouping ) - glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + double lineLength = startEndVector.EuclideanNorm(); - SetLineWidth( aWidth ); - drawSemiCircle( aStartPoint, aWidth / 2, lineAngle + M_PI / 2, layerDepth ); - drawSemiCircle( aEndPoint, aWidth / 2, lineAngle - M_PI / 2, layerDepth ); - drawLineQuad( aStartPoint, aEndPoint ); - } - else - { - double lineLength = startEndVector.EuclideanNorm(); + color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); - glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + Save(); - glPushMatrix(); + translate3( aStartPoint.x, aStartPoint.y, 0.0 ); + Rotate( lineAngle ); - glTranslated( aStartPoint.x, aStartPoint.y, 0.0 ); - glRotated( lineAngle * ( 360 / ( 2 * M_PI ) ), 0, 0, 1 ); + drawLineQuad( VECTOR2D( 0.0, aWidth / 2.0 ), + VECTOR2D( lineLength, aWidth / 2.0 ) ); - drawLineQuad( VECTOR2D( 0.0, aWidth / 2.0 ), - VECTOR2D( lineLength, aWidth / 2.0 ) ); + drawLineQuad( VECTOR2D( 0.0, -aWidth / 2.0 ), + VECTOR2D( lineLength, -aWidth / 2.0 ) ); - drawLineQuad( VECTOR2D( 0.0, -aWidth / 2.0 ), - VECTOR2D( lineLength, -aWidth / 2.0 ) ); + DrawArc( VECTOR2D( 0.0, 0.0 ), aWidth / 2.0, M_PI / 2.0, 3.0 * M_PI / 2.0 ); + DrawArc( VECTOR2D( lineLength, 0.0 ), aWidth / 2.0, M_PI / 2.0, -M_PI / 2.0 ); - DrawArc( VECTOR2D( 0.0, 0.0 ), aWidth / 2.0, M_PI / 2.0, 3.0 * M_PI / 2.0 ); - DrawArc( VECTOR2D( lineLength, 0.0 ), aWidth / 2.0, M_PI / 2.0, -M_PI / 2.0 ); - - glPopMatrix(); - } + Restore(); } } @@ -743,6 +720,47 @@ inline void OPENGL_GAL::drawLineCap( const VECTOR2D& aStartPoint, const VECTOR2D } +void OPENGL_GAL::translate3( double aX, double aY, double aZ ) +{ + if( isGrouping ) + { + transform = glm::translate( transform, glm::vec3( aX, aY, aZ ) ); + } + else + { + glTranslated( aX, aY, aZ ); + } +} + + +void OPENGL_GAL::color4( double aRed, double aGreen, double aBlue, double aAlpha ) +{ + if( isGrouping ) + { +// TODO not used - may be it is not useful at all, to be checked +// curVboItem->UseColor( COLOR4D( aRed, aGreen, aBlue, aAlpha ) ); + } + else + { + glColor4d( aRed, aGreen, aBlue, aAlpha ); + } +} + + +void OPENGL_GAL::color4( const COLOR4D& aColor ) +{ + if( isGrouping ) + { +// TODO not used - may be it is not useful at all, to be checked +// curVboItem->UseColor( aColor ); + } + else + { + glColor4d( aColor.r, aColor.g, aColor.b, aColor.a); + } +} + + void OPENGL_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { if( isUseShader ) @@ -755,7 +773,7 @@ void OPENGL_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoin double lineLength = startEndVector.EuclideanNorm(); if( lineLength > 0.0 ) { - glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); drawLineCap( aStartPoint, aEndPoint, layerDepth ); drawLineCap( aEndPoint, aStartPoint, layerDepth ); @@ -778,7 +796,8 @@ void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) unsigned int i = 0; // Draw for each segment a line - for( std::deque::const_iterator it = aPointList.begin(); it != aPointList.end(); it++ ) + for( std::deque::const_iterator it = aPointList.begin(); + it != aPointList.end(); it++ ) { // First point if( it == aPointList.begin() ) @@ -827,6 +846,7 @@ void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) { angle1 += 2 * M_PI; } + if( angle2 < 0 ) { angle2 += 2 * M_PI; @@ -838,8 +858,8 @@ void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) if( angle1 > 0 ) { angle1 -= 2 * M_PI; - } + if( angle2 > 0 ) { angle2 -= 2 * M_PI; @@ -848,22 +868,56 @@ void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) } // Now draw the fan - glBegin( GL_TRIANGLES ); SWAP( angle1, >, angle2 ); + + if( !isGrouping ) + glBegin( GL_TRIANGLES ); + for( double a = angle1; a < angle2; ) { - glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); - glVertex3d( lastPoint.x + adjust * sin( a ), - lastPoint.y - adjust * cos( a ), layerDepth ); + // Compute vertices + double v0[] = { lastPoint.x, lastPoint.y }; + double v1[] = + { + lastPoint.x + adjust * sin( a ), + lastPoint.y - adjust * cos( a ) + }; a += M_PI / 32; if(a > angle2) a = angle2; - glVertex3d( lastPoint.x + adjust * sin( a ), - lastPoint.y - adjust * cos( a ), layerDepth ); + double v2[] = + { + lastPoint.x + adjust * sin( a ), + lastPoint.y - adjust * cos( a ) + }; + + if( isGrouping ) + { + const GLfloat newVertices[] = + { + v0[0], v0[1], layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + + v1[0], v1[1], layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + + v2[0], v2[1], layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + }; + curVboItem->PushVertices( newVertices, 3 ); + } + else + { + glVertex3d( v0[0], v0[1], layerDepth ); + glVertex3d( v1[0], v1[1], layerDepth ); + glVertex3d( v2[0], v2[1], layerDepth ); + } } - glEnd(); + + if( !isGrouping ) + glEnd(); break; } @@ -887,11 +941,29 @@ void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) } // Insert a triangle at the joint to close the gap - glBegin( GL_TRIANGLES ); - glVertex3d( edgePoint1.x, edgePoint1.y, layerDepth ); - glVertex3d( edgePoint2.x, edgePoint2.y, layerDepth ); - glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); - glEnd(); + if( isGrouping ) + { + const GLfloat newVertices[] = + { + edgePoint1.x, edgePoint1.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + + edgePoint2.x, edgePoint2.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + + lastPoint.x, lastPoint.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + }; + curVboItem->PushVertices( newVertices, 3 ); + } + else + { + glBegin( GL_TRIANGLES ); + glVertex3d( edgePoint1.x, edgePoint1.y, layerDepth ); + glVertex3d( edgePoint2.x, edgePoint2.y, layerDepth ); + glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); + glEnd(); + } break; } @@ -902,8 +974,7 @@ void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) VECTOR2D point1 = lastPoint - perpendicularVector1; VECTOR2D point3 = lastPoint - perpendicularVector2; if( lastStartEndVector.x * startEndVector.y - - lastStartEndVector.y * startEndVector.x - < 0 ) + - lastStartEndVector.y * startEndVector.x < 0 ) { point1 = lastPoint + perpendicularVector1; point3 = lastPoint + perpendicularVector2; @@ -930,32 +1001,95 @@ void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) VECTOR2D mp1 = point1 + ( limit / lineLengthA ) * lastStartEndVector; VECTOR2D mp2 = point3 - ( limit / lineLengthB ) * startEndVector; - glBegin( GL_TRIANGLES ); - glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); - glVertex3d( point1.x, point1.y, layerDepth ); - glVertex3d( mp1.x, mp1.y, layerDepth ); + if( isGrouping ) + { + const GLfloat newVertices[] = + { + lastPoint.x, lastPoint.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); - glVertex3d( mp1.x, mp1.y, layerDepth ); - glVertex3d( mp2.x, mp2.y, layerDepth ); + point1.x, point1.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); - glVertex3d( mp2.x, mp2.y, layerDepth ); - glVertex3d( point3.x, point3.y, layerDepth ); - glEnd(); + mp1.x, mp1.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + + lastPoint.x, lastPoint.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + + mp1.x, mp1.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + + mp2.x, mp2.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + + lastPoint.x, lastPoint.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + + mp2.x, mp2.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + + point3.x, point3.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a + }; + curVboItem->PushVertices( newVertices, 9 ); + } + else + { + glBegin( GL_TRIANGLES ); + glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); + glVertex3d( point1.x, point1.y, layerDepth ); + glVertex3d( mp1.x, mp1.y, layerDepth ); + + glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); + glVertex3d( mp1.x, mp1.y, layerDepth ); + glVertex3d( mp2.x, mp2.y, layerDepth ); + + glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); + glVertex3d( mp2.x, mp2.y, layerDepth ); + glVertex3d( point3.x, point3.y, layerDepth ); + glEnd(); + } } else { - // Insert two triangles for the mitered edge - glBegin( GL_TRIANGLES ); - glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); - glVertex3d( point1.x, point1.y, layerDepth ); - glVertex3d( miterPoint.x, miterPoint.y, layerDepth ); + if( isGrouping ) + { + const GLfloat newVertices[] = + { + lastPoint.x, lastPoint.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); - glVertex3d( miterPoint.x, miterPoint.y, layerDepth ); - glVertex3d( point3.x, point3.y, layerDepth ); - glEnd(); + point1.x, point1.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + + miterPoint.x, miterPoint.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + + lastPoint.x, lastPoint.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + + miterPoint.x, miterPoint.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + + point3.x, point3.y, layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a + }; + curVboItem->PushVertices( newVertices, 6 ); + } + else + { + // Insert two triangles for the mitered edge + glBegin( GL_TRIANGLES ); + glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); + glVertex3d( point1.x, point1.y, layerDepth ); + glVertex3d( miterPoint.x, miterPoint.y, layerDepth ); + + glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); + glVertex3d( miterPoint.x, miterPoint.y, layerDepth ); + glVertex3d( point3.x, point3.y, layerDepth ); + glEnd(); + } } break; } @@ -992,28 +1126,28 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn selectShader( 0 ); glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); glBegin( GL_QUADS ); // shader - glNormal3d( 1.0, 0, 0); - glTexCoord2f(0.0, 0.0); + glNormal3d( 1.0, 0, 0 ); + glTexCoord2f( 0.0, 0.0 ); glVertex3d( aStartPoint.x, aStartPoint.y, layerDepth ); - glNormal3d( 1.0, 0, 0); - glTexCoord2f(1.0, 0.0); + glNormal3d( 1.0, 0, 0 ); + glTexCoord2f( 1.0, 0.0 ); glVertex3d( diagonalPointA.x, diagonalPointA.y, layerDepth ); - glNormal3d( 1.0, 0, 0); - glTexCoord2f(1.0, 1.0); + glNormal3d( 1.0, 0, 0 ); + glTexCoord2f( 1.0, 1.0 ); glVertex3d( aEndPoint.x, aEndPoint.y, layerDepth ); - glNormal3d( 1.0, 0, 0); - glTexCoord2f(0.0, 1.0); + glNormal3d( 1.0, 0, 0 ); + glTexCoord2f( 0.0, 1.0 ); glVertex3d( diagonalPointB.x, diagonalPointB.y, layerDepth ); glEnd(); } - if(isStrokeEnabled) + if( isStrokeEnabled ) { glBegin( GL_QUADS ); // shader - drawRoundedSegment(aStartPoint, diagonalPointA, lineWidth, true, false ); - drawRoundedSegment(aEndPoint, diagonalPointA, lineWidth, true, false ); - drawRoundedSegment(aStartPoint, diagonalPointB, lineWidth, true, false ); - drawRoundedSegment(aEndPoint, diagonalPointB, lineWidth, true, false ); + drawRoundedSegment( aStartPoint, diagonalPointA, lineWidth, true, false ); + drawRoundedSegment( aEndPoint, diagonalPointA, lineWidth, true, false ); + drawRoundedSegment( aStartPoint, diagonalPointB, lineWidth, true, false ); + drawRoundedSegment( aEndPoint, diagonalPointB, lineWidth, true, false ); glEnd(); } @@ -1025,7 +1159,7 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn // Stroke the outline if( isStrokeEnabled ) { - glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); std::deque pointList; pointList.push_back( aStartPoint ); pointList.push_back( diagonalPointA ); @@ -1038,20 +1172,48 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn // Fill the rectangle if( isFillEnabled ) { - glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - glBegin( GL_TRIANGLES ); - glVertex3d( aStartPoint.x, aStartPoint.y, layerDepth ); - glVertex3d( diagonalPointA.x, diagonalPointA.y, layerDepth ); - glVertex3d( aEndPoint.x, aEndPoint.y, layerDepth ); + color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - glVertex3d( aStartPoint.x, aStartPoint.y, layerDepth ); - glVertex3d( aEndPoint.x, aEndPoint.y, layerDepth ); - glVertex3d( diagonalPointB.x, diagonalPointB.y, layerDepth ); - glEnd(); + if( isGrouping ) + { + const GLfloat newVertices[] = + { + aStartPoint.x, aStartPoint.y, layerDepth, + fillColor.r, fillColor.g, fillColor.b, fillColor.a, + + diagonalPointA.x, diagonalPointA.y, layerDepth, + fillColor.r, fillColor.g, fillColor.b, fillColor.a, + + aEndPoint.x, aEndPoint.y, layerDepth, + fillColor.r, fillColor.g, fillColor.b, fillColor.a, + + aStartPoint.x, aStartPoint.y, layerDepth, + fillColor.r, fillColor.g, fillColor.b, fillColor.a, + + aEndPoint.x, aEndPoint.y, layerDepth, + fillColor.r, fillColor.g, fillColor.b, fillColor.a, + + diagonalPointB.x, diagonalPointB.y, layerDepth, + fillColor.r, fillColor.g, fillColor.b, fillColor.a + }; + curVboItem->PushVertices( newVertices, 6 ); + } + else + { + glBegin( GL_TRIANGLES ); + glVertex3d( aStartPoint.x, aStartPoint.y, layerDepth ); + glVertex3d( diagonalPointA.x, diagonalPointA.y, layerDepth ); + glVertex3d( aEndPoint.x, aEndPoint.y, layerDepth ); + + glVertex3d( aStartPoint.x, aStartPoint.y, layerDepth ); + glVertex3d( aEndPoint.x, aEndPoint.y, layerDepth ); + glVertex3d( diagonalPointB.x, diagonalPointB.y, layerDepth ); + glEnd(); + } } // Restore the stroke color - glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); } @@ -1078,6 +1240,7 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) if( isUseShader ) { + // TODO is it ever reached? innerScale *= 1.0 / cos( M_PI / CIRCLE_POINTS ); } @@ -1086,14 +1249,16 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) if( innerScale < outerScale ) { // Draw the outline - glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); - glPushMatrix(); + Save(); - glTranslated( aCenterPoint.x, aCenterPoint.y, 0.0 ); - glScaled( aRadius, aRadius, 1.0 ); + translate3( aCenterPoint.x, aCenterPoint.y, 0.0 ); + Scale( VECTOR2D( aRadius, aRadius ) ); + + if( !isGrouping ) + glBegin( GL_TRIANGLES ); - glBegin( GL_TRIANGLES ); for( std::deque::const_iterator it = unitCirclePoints.begin(); it != unitCirclePoints.end(); it++ ) { @@ -1102,33 +1267,70 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) double v2[] = { ( it + 1 )->x * innerScale, ( it + 1 )->y * innerScale }; double v3[] = { ( it + 1 )->x * outerScale, ( it + 1 )->y * outerScale }; - glVertex3d( v0[0], v0[1], layerDepth ); - glVertex3d( v1[0], v1[1], layerDepth ); - glVertex3d( v2[0], v2[1], layerDepth ); + if( isGrouping ) + { + const GLfloat newVertices[] = + { + v0[0], v0[1], layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - glVertex3d( v1[0], v1[1], layerDepth ); - glVertex3d( v3[0], v3[1], layerDepth ); - glVertex3d( v2[0], v2[1], layerDepth ); + v1[0], v1[1], layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + + v2[0], v2[1], layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + + v1[0], v1[1], layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + + v3[0], v3[1], layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + + v2[0], v2[1], layerDepth, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a + }; + curVboItem->PushVertices( newVertices, 6 ); + } + else + { + glVertex3d( v0[0], v0[1], layerDepth ); + glVertex3d( v1[0], v1[1], layerDepth ); + glVertex3d( v2[0], v2[1], layerDepth ); + + glVertex3d( v1[0], v1[1], layerDepth ); + glVertex3d( v3[0], v3[1], layerDepth ); + glVertex3d( v2[0], v2[1], layerDepth ); + } } - glEnd(); - glPopMatrix(); + if( !isGrouping ) + glEnd(); + + Restore(); } } // Filled circles are easy to draw by using the stored display list, scaling and translating if( isFillEnabled ) { - glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - glPushMatrix(); + Save(); - glTranslated( aCenterPoint.x, aCenterPoint.y, layerDepth ); - glScaled( aRadius, aRadius, 1.0 ); + translate3( aCenterPoint.x, aCenterPoint.y, layerDepth ); + Scale( VECTOR2D( aRadius, aRadius ) ); - glCallList( displayListCircle ); + if( isGrouping ) + { + verticesCircle.ChangeColor( fillColor ); + curVboItem->PushVertices( verticesCircle.GetVertices(), verticesCircle.GetSize() ); + } + else + { + glCallList( displayListCircle ); + } - glPopMatrix(); + Restore(); } } @@ -1137,15 +1339,23 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) void OPENGL_GAL::drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle, double aDepthOffset ) { - // XXX Depth seems to be buggy - glPushMatrix(); - glTranslated( aCenterPoint.x, aCenterPoint.y, aDepthOffset ); - glScaled( aRadius, aRadius, 1.0 ); - glRotated( aAngle * 360.0 / ( 2 * M_PI ), 0, 0, 1 ); + Save(); + translate3( aCenterPoint.x, aCenterPoint.y, aDepthOffset ); + Scale( VECTOR2D( aRadius, aRadius ) ); + Rotate( aAngle ); - glCallList( displayListSemiCircle ); + if( isGrouping ) + { + // Add vertices with a proper color + verticesSemiCircle.ChangeColor( strokeColor ); + curVboItem->PushVertices( verticesSemiCircle.GetVertices(), verticesSemiCircle.GetSize() ); + } + else + { + glCallList( displayListSemiCircle ); + } - glPopMatrix(); + Restore(); } @@ -1170,18 +1380,19 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a VECTOR2D startPoint( cos( aStartAngle ), sin( aStartAngle ) ); VECTOR2D endPoint( cos( aEndAngle ), sin( aEndAngle ) ); VECTOR2D startEndPoint = startPoint + endPoint; - VECTOR2D middlePoint = 0.5 * startEndPoint; + VECTOR2D middlePoint = 0.5 * startEndPoint; - glPushMatrix(); - glTranslated( aCenterPoint.x, aCenterPoint.y, layerDepth ); - glScaled( aRadius, aRadius, 1.0 ); + Save(); + translate3( aCenterPoint.x, aCenterPoint.y, layerDepth ); + Scale( VECTOR2D( aRadius, aRadius ) ); if( isStrokeEnabled ) { if( isUseShader ) { int n_points_s = (int) ( aRadius * worldScale ); - int n_points_a = (int) ( ( aEndAngle - aStartAngle ) / (double) ( 2.0 * M_PI / CIRCLE_POINTS )); + int n_points_a = (int) ( ( aEndAngle - aStartAngle ) / + (double) ( 2.0 * M_PI / CIRCLE_POINTS ) ); if( n_points_s < 4 ) n_points_s = 4; @@ -1199,6 +1410,7 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a VECTOR2D p( cos( aStartAngle ), sin( aStartAngle ) ); glBegin( GL_QUADS ); // shader + for( int i = 0; i < n_points; i++ ) { VECTOR2D p_next( p.x * cosI - p.y * sinI, p.x * sinI + p.y * cosI ); @@ -1206,41 +1418,73 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a drawRoundedSegment( p, p_next, lineWidth / aRadius, true, false ); p = p_next; } + glEnd(); } else { double alphaIncrement = 2 * M_PI / CIRCLE_POINTS; - glColor4d( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + + if( !isGrouping ) + glBegin( GL_TRIANGLES ); - glBegin( GL_TRIANGLES ); for( double alpha = aStartAngle; alpha < aEndAngle; ) { double v0[] = { cos( alpha ) * innerScale, sin( alpha ) * innerScale }; double v1[] = { cos( alpha ) * outerScale, sin( alpha ) * outerScale }; alpha += alphaIncrement; + if( alpha > aEndAngle ) alpha = aEndAngle; double v2[] = { cos( alpha ) * innerScale, sin( alpha ) * innerScale }; double v3[] = { cos( alpha ) * outerScale, sin( alpha ) * outerScale }; - glVertex3d( v0[0], v0[1], layerDepth ); - glVertex3d( v1[0], v1[1], layerDepth ); - glVertex3d( v2[0], v2[1], layerDepth ); + if( isGrouping ) + { + const GLfloat newVertices[] = + { + v0[0], v0[1], 0.0f, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - glVertex3d( v1[0], v1[1], layerDepth ); - glVertex3d( v3[0], v3[1], layerDepth ); - glVertex3d( v2[0], v2[1], layerDepth ); + v1[0], v1[1], 0.0f, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + + v2[0], v2[1], 0.0f, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + + v1[0], v1[1], 0.0f, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + + v3[0], v3[1], 0.0f, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + + v2[0], v2[1], 0.0f, + strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a + }; + curVboItem->PushVertices( newVertices, 6 ); + } + else + { + glVertex2d( v0[0], v0[1] ); + glVertex2d( v1[0], v1[1] ); + glVertex2d( v2[0], v2[1] ); + + glVertex2d( v1[0], v1[1] ); + glVertex2d( v3[0], v3[1] ); + glVertex2d( v2[0], v2[1] ); + } } - glEnd(); + if( !isGrouping ) + glEnd(); if( lineCap == LINE_CAP_ROUND ) { - drawSemiCircle( startPoint, lineWidth / aRadius / 2, aStartAngle + M_PI, 0 ); - drawSemiCircle( endPoint, lineWidth / aRadius / 2, aEndAngle, 0 ); + drawSemiCircle( startPoint, lineWidth / aRadius / 2.0, aStartAngle + M_PI, 0 ); + drawSemiCircle( endPoint, lineWidth / aRadius / 2.0, aEndAngle, 0 ); } } } @@ -1249,24 +1493,62 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a { double alphaIncrement = 2 * M_PI / CIRCLE_POINTS; double alpha; - glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - glBegin( GL_TRIANGLES ); - for( alpha = aStartAngle; ( alpha + alphaIncrement ) < aEndAngle; ) + if( !isGrouping ) { + glBegin( GL_TRIANGLES ); + + for( alpha = aStartAngle; ( alpha + alphaIncrement ) < aEndAngle; ) + { + glVertex2d( middlePoint.x, middlePoint.y ); + glVertex2d( cos( alpha ), sin( alpha ) ); + alpha += alphaIncrement; + glVertex2d( cos( alpha ), sin( alpha ) ); + } + glVertex2d( middlePoint.x, middlePoint.y ); glVertex2d( cos( alpha ), sin( alpha ) ); - alpha += alphaIncrement; - glVertex2d( cos( alpha ), sin( alpha ) ); + glVertex2d( endPoint.x, endPoint.y ); + glEnd(); } + else + { + for( alpha = aStartAngle; ( alpha + alphaIncrement ) < aEndAngle; ) + { + const GLfloat v0[] = + { + middlePoint.x, middlePoint.y, 0.0f, fillColor.r, fillColor.g, fillColor.b, + fillColor.a + }; + const GLfloat v1[] = + { + cos( alpha ), sin( alpha ), 0.0f, fillColor.r, fillColor.g, fillColor.b, + fillColor.a + }; + alpha += alphaIncrement; + const GLfloat v2[] = + { + cos( alpha ), sin( alpha ), 0.0f, fillColor.r, fillColor.g, fillColor.b, + fillColor.a + }; - glVertex2d( middlePoint.x, middlePoint.y ); - glVertex2d( cos( alpha ), sin( alpha ) ); - glVertex2d( endPoint.x, endPoint.y ); - glEnd(); + curVboItem->PushVertex( v0 ); + curVboItem->PushVertex( v1 ); + curVboItem->PushVertex( v2 ); + } + + const GLfloat newVertices[] = + { + middlePoint.x, middlePoint.y, 0.0f, fillColor.r, fillColor.g, fillColor.b, fillColor.a, + cos( alpha ), sin( alpha ), 0.0f, fillColor.r, fillColor.g, fillColor.b, fillColor.a, + endPoint.x, endPoint.y, 0.0f, fillColor.r, fillColor.g, fillColor.b, fillColor.a + }; + curVboItem->PushVertices( newVertices, 3 ); + } } - glPopMatrix(); + Restore(); } @@ -1379,7 +1661,7 @@ void OPENGL_GAL::SetStrokeColor( COLOR4D aColor ) strokeColor = aColor; // This is the default drawing color - glColor4d( aColor.r, aColor.g, aColor.b, aColor.a ); + color4( aColor.r, aColor.g, aColor.b, aColor.a ); } @@ -1433,20 +1715,40 @@ void OPENGL_GAL::Transform( MATRIX3x3D aTransformation ) void OPENGL_GAL::Rotate( double aAngle ) { - glRotated( aAngle * ( 360 / ( 2 * M_PI ) ), 0, 0, 1 ); + if( isGrouping ) + { + transform = glm::rotate( transform, (float) aAngle, glm::vec3( 0, 0, 1 ) ); + } + else + { + glRotated( aAngle * ( 360 / ( 2 * M_PI ) ), 0, 0, 1 ); + } } void OPENGL_GAL::Translate( const VECTOR2D& aVector ) { - glTranslated( aVector.x, aVector.y, 0 ); + if( isGrouping ) + { + transform = glm::translate( transform, glm::vec3( aVector.x, aVector.y, 0 ) ); + } + else + { + glTranslated( aVector.x, aVector.y, 0 ); + } } void OPENGL_GAL::Scale( const VECTOR2D& aScale ) { - // TODO: Check method - glScaled( aScale.x, aScale.y, 0 ); + if( isGrouping ) + { + transform = glm::scale( transform, glm::vec3( aScale.x, aScale.y, 0 ) ); + } + else + { + glScaled( aScale.x, aScale.y, 0 ); + } } @@ -1458,13 +1760,35 @@ void OPENGL_GAL::Flush() void OPENGL_GAL::Save() { - glPushMatrix(); + if( isGrouping ) + { + transformStack.push( transform ); + curVboItem->SetTransformMatrix( &transform ); + } + else + { + glPushMatrix(); + } } void OPENGL_GAL::Restore() { - glPopMatrix(); + if( isGrouping ) + { + transform = transformStack.top(); + transformStack.pop(); + + if( transformStack.empty() ) + { + // Disable transforming, as the selected matrix is identity + curVboItem->SetTransformMatrix( NULL ); + } + } + else + { + glPopMatrix(); + } } @@ -1475,7 +1799,7 @@ int OPENGL_GAL::BeginGroup() // There is a new group that is not in VBO yet vboNeedsUpdate = true; - // Save the pointer for usage with the current item + // Save the pointer for caching the current item curVboItem = new VBO_ITEM; curVboItem->SetOffset( vboSize ); vboItems.push_back( curVboItem ); @@ -1486,8 +1810,10 @@ int OPENGL_GAL::BeginGroup() void OPENGL_GAL::EndGroup() { - vboSize += curVboItem->GetSize(); + wxASSERT_MSG( curVboItem->GetSize() != 0, + "OPENGL_GAL::EndGroup: Tried to add group that contains nothing" ); + vboSize += curVboItem->GetSize(); isGrouping = false; } @@ -1495,14 +1821,14 @@ void OPENGL_GAL::EndGroup() void OPENGL_GAL::DeleteGroup( int aGroupNumber ) { wxASSERT_MSG( aGroupNumber < vboItems.size(), - "OPENGL_GAL: Tried to delete not existing group" ); + "OPENGL_GAL::DeleteGroup: Tried to delete not existing group" ); std::deque::iterator it = vboItems.begin(); std::advance( it, aGroupNumber ); - //vboSize -= it->GetSize(); // FIXME? + // vboSize -= it->GetSize(); // FIXME? delete *it; - //vboItems.erase( it ); // makes change to group numbers - that's veeery bad + // vboItems.erase( it ); // makes change to group numbers - that's veeery bad vboNeedsUpdate = true; } @@ -1522,7 +1848,7 @@ void OPENGL_GAL::DrawGroup( int aGroupNumber ) // Bind vertices data buffer and point to the data glBindBuffer( GL_ARRAY_BUFFER, curVboVertId ); glVertexPointer( 3, GL_FLOAT, VBO_ITEM::VertSize, 0 ); - glColorPointer( 4, GL_FLOAT, VBO_ITEM::VertSize, (GLvoid*) VBO_ITEM::ColorOffset ); + glColorPointer( 4, GL_FLOAT, VBO_ITEM::VertSize, (GLvoid*) VBO_ITEM::ColorByteOffset ); glBindBuffer( GL_ARRAY_BUFFER, 0 ); // Bind indices data buffer @@ -1539,7 +1865,8 @@ void OPENGL_GAL::DrawGroup( int aGroupNumber ) } -void OPENGL_GAL::computeUnitArcs() +// TODO it is not used anywhere +/*void OPENGL_GAL::computeUnitArcs() { displayListsArcs = glGenLists( CIRCLE_POINTS + 1 ); @@ -1555,33 +1882,46 @@ void OPENGL_GAL::computeUnitArcs() glEndList(); } -} +}*/ void OPENGL_GAL::computeUnitCircle() { - double valueX, valueY; - displayListCircle = glGenLists( 1 ); glNewList( displayListCircle, GL_COMPILE ); glBegin( GL_TRIANGLES ); + // Compute the circle points for a given number of segments // Insert in a display list and a vector for( int i = 0; i < CIRCLE_POINTS; i++ ) { + GLfloat v0[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; + GLfloat v1[] = + { + cos( 2.0 * M_PI / CIRCLE_POINTS * i ), // x + sin( 2.0 * M_PI / CIRCLE_POINTS * i ), // y + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f // z & color + }; + GLfloat v2[] = + { + cos( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), // x + sin( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), // y + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f // z & color + }; + glVertex2d( 0, 0 ); + verticesCircle.PushVertex( v0 ); - valueX = cos( 2.0 * M_PI / CIRCLE_POINTS * i ); - valueY = sin( 2.0 * M_PI / CIRCLE_POINTS * i ); - glVertex2d( valueX, valueY ); - unitCirclePoints.push_back( VECTOR2D( valueX, valueY ) ); + glVertex2d( v1[0], v1[1] ); + verticesCircle.PushVertex( v1 ); + unitCirclePoints.push_back( VECTOR2D( v1[0], v1[1] ) ); // TODO remove - valueX = cos( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ); - valueY = sin( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ); - glVertex2d( valueX, valueY ); - unitCirclePoints.push_back( VECTOR2D( valueX, valueY ) ); + glVertex2d( v2[0], v2[1] ); + verticesCircle.PushVertex( v2 ); + unitCirclePoints.push_back( VECTOR2D( v2[0], v2[1] ) ); // TODO remove } + glEnd(); glEndList(); @@ -1594,14 +1934,33 @@ void OPENGL_GAL::computeUnitSemiCircle() glNewList( displayListSemiCircle, GL_COMPILE ); glBegin( GL_TRIANGLES ); - for( int i = 0; i < CIRCLE_POINTS / 2; i++ ) + + for( int i = 0; i < CIRCLE_POINTS / 2; ++i ) { + GLfloat v0[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; + GLfloat v1[] = + { + cos( 2.0 * M_PI / CIRCLE_POINTS * i ), // x + sin( 2.0 * M_PI / CIRCLE_POINTS * i ), // y + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f // z & color + }; + GLfloat v2[] = + { + cos( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), // x + sin( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), // y + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f // z & color + }; + glVertex2d( 0, 0 ); - glVertex2d( cos( 2.0 * M_PI / CIRCLE_POINTS * i ), - sin( 2.0 * M_PI / CIRCLE_POINTS * i ) ); - glVertex2d( cos( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), - sin( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ) ); + verticesSemiCircle.PushVertex( v0 ); + + glVertex2d( v1[0], v1[1] ); + verticesSemiCircle.PushVertex( v1 ); + + glVertex2d( v2[0], v2[1] ); + verticesSemiCircle.PushVertex( v2 ); } + glEnd(); glEndList(); @@ -1653,11 +2012,11 @@ void CALLBACK CombineCallback( GLdouble coords[3], GLdouble* vertex_data[4], GLfloat weight[4], GLdouble** dataOut ) { - GLdouble* vertex = new GLdouble[3]; + GLdouble* vertex = new GLdouble[3]; - memcpy( vertex, coords, 3 * sizeof(GLdouble) ); + memcpy( vertex, coords, 3 * sizeof(GLdouble) ); - *dataOut = vertex; + *dataOut = vertex; } diff --git a/common/gal/opengl/vbo_item.cpp b/common/gal/opengl/vbo_item.cpp index 4663dada19..c44e32a056 100644 --- a/common/gal/opengl/vbo_item.cpp +++ b/common/gal/opengl/vbo_item.cpp @@ -37,7 +37,8 @@ VBO_ITEM::VBO_ITEM() : m_indices( NULL ), m_offset( 0 ), m_size( 0 ), - m_isDirty( true ) + m_isDirty( true ), + m_transform( NULL ) { } @@ -69,6 +70,17 @@ void VBO_ITEM::PushVertex( const GLfloat* aVertex ) // Add the new vertex memcpy( &newVertices[m_size * VertStride], aVertex, VertSize ); + if( m_transform != NULL ) + { + // Apply transformations + // X, Y, Z coordinates + glm::vec4 origVertex( aVertex[0], aVertex[1], aVertex[2], 1.0f ); + glm::vec4 transVertex = *m_transform * origVertex; + + // Replace only coordinates, leave color as it is + memcpy( &newVertices[m_size * VertStride], &transVertex[0], 3 * sizeof(GLfloat) ); + } + // Handle a new index if( m_indices ) { @@ -104,6 +116,25 @@ void VBO_ITEM::PushVertices( const GLfloat* aVertices, GLuint aSize ) // Add new vertices memcpy( &newVertices[m_size * VertStride], aVertices, aSize * VertSize ); + if( m_transform != NULL ) + { + const GLfloat* vertexPtr = aVertices; + + for( unsigned int i = 0; i < aSize; ++i ) + { + // Apply transformations + // X, Y, Z coordinates + glm::vec4 origVertex( vertexPtr[0], vertexPtr[1], vertexPtr[2], 1.0f ); + glm::vec4 transVertex = *m_transform * origVertex; + + // Replace only coordinates, leave color as it is + memcpy( &newVertices[(m_size + i) * VertStride], &transVertex[0], 3 * sizeof(GLfloat) ); + + // Move on to the next vertex + vertexPtr += VertStride; + } + } + // Handle new indices if( m_indices ) { @@ -163,6 +194,38 @@ int VBO_ITEM::GetOffset() const } +void VBO_ITEM::SetTransformMatrix( const glm::mat4* aMatrix ) +{ + m_transform = aMatrix; +} + + +void VBO_ITEM::ChangeColor( const COLOR4D& aColor ) +{ + // Point to color of vertices + GLfloat* vertexPtr = m_vertices + ColorOffset; + const GLfloat newColor[] = { aColor.r, aColor.g, aColor.b, aColor.a }; + + for( int i = 0; i < m_size; ++i ) + { + memcpy( vertexPtr, newColor, ColorSize ); + + // Move on to the next vertex + vertexPtr += VertStride; + } +} + + +// TODO it is not used yet +void VBO_ITEM::UseColor( const COLOR4D& aColor ) +{ + m_color[0] = aColor.r; + m_color[1] = aColor.g; + m_color[2] = aColor.b; + m_color[3] = aColor.a; +} + + /* // TODO void SetVbo( int aVboId ) diff --git a/include/gal/opengl/glm/core/_detail.hpp b/include/gal/opengl/glm/core/_detail.hpp new file mode 100644 index 0000000000..00c29253e3 --- /dev/null +++ b/include/gal/opengl/glm/core/_detail.hpp @@ -0,0 +1,475 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/_detail.hpp +/// @date 2008-07-24 / 2011-06-14 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_detail +#define glm_core_detail + +#include "setup.hpp" +#include +#if(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) +#include +#endif + +namespace glm{ +namespace detail +{ + class half; + +#if(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) // C99 detected, 64 bit types available + typedef int64_t sint64; + typedef uint64_t uint64; +#elif(GLM_COMPILER & GLM_COMPILER_VC) + typedef signed __int64 sint64; + typedef unsigned __int64 uint64; +#elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC | GLM_COMPILER_CLANG)) + __extension__ typedef signed long long sint64; + __extension__ typedef unsigned long long uint64; +#elif(GLM_COMPILER & GLM_COMPILER_BC) + typedef Int64 sint64; + typedef Uint64 uint64; +#else//unknown compiler + typedef signed long long sint64; + typedef unsigned long long uint64; +#endif//GLM_COMPILER + + template + struct If + { + template + static GLM_FUNC_QUALIFIER T apply(F functor, const T& val) + { + return functor(val); + } + }; + + template<> + struct If + { + template + static GLM_FUNC_QUALIFIER T apply(F, const T& val) + { + return val; + } + }; + + //template + //struct traits + //{ + // static const bool is_signed = false; + // static const bool is_float = false; + // static const bool is_vector = false; + // static const bool is_matrix = false; + // static const bool is_genType = false; + // static const bool is_genIType = false; + // static const bool is_genUType = false; + //}; + + //template <> + //struct traits + //{ + // static const bool is_float = true; + // static const bool is_genType = true; + //}; + + //template <> + //struct traits + //{ + // static const bool is_float = true; + // static const bool is_genType = true; + //}; + + //template <> + //struct traits + //{ + // static const bool is_float = true; + // static const bool is_genType = true; + //}; + + //template + //struct desc + //{ + // typedef genType type; + // typedef genType * pointer; + // typedef genType const* const_pointer; + // typedef genType const *const const_pointer_const; + // typedef genType *const pointer_const; + // typedef genType & reference; + // typedef genType const& const_reference; + // typedef genType const& param_type; + + // typedef typename genType::value_type value_type; + // typedef typename genType::size_type size_type; + // static const typename size_type value_size; + //}; + + //template + //const typename desc::size_type desc::value_size = genType::value_size(); + + union uif32 + { + GLM_FUNC_QUALIFIER uif32() : + i(0) + {} + + GLM_FUNC_QUALIFIER uif32(float f) : + f(f) + {} + + GLM_FUNC_QUALIFIER uif32(unsigned int i) : + i(i) + {} + + float f; + unsigned int i; + }; + + union uif64 + { + GLM_FUNC_QUALIFIER uif64() : + i(0) + {} + + GLM_FUNC_QUALIFIER uif64(double f) : + f(f) + {} + + GLM_FUNC_QUALIFIER uif64(uint64 i) : + i(i) + {} + + double f; + uint64 i; + }; + + typedef uif32 uif; + + ////////////////// + // int + + template + struct is_int + { + enum is_int_enum + { + _YES = 0, + _NO = 1 + }; + }; + +#define GLM_DETAIL_IS_INT(T) \ + template <> \ + struct is_int \ + { \ + enum is_int_enum \ + { \ + _YES = 1, \ + _NO = 0 \ + }; \ + } + + ////////////////// + // uint + + template + struct is_uint + { + enum is_uint_enum + { + _YES = 0, + _NO = 1 + }; + }; + +#define GLM_DETAIL_IS_UINT(T) \ + template <> \ + struct is_uint \ + { \ + enum is_uint_enum \ + { \ + _YES = 1, \ + _NO = 0 \ + }; \ + } + + //GLM_DETAIL_IS_UINT(unsigned long long) + + ////////////////// + // float + + template + struct is_float + { + enum is_float_enum + { + _YES = 0, + _NO = 1 + }; + }; + +#define GLM_DETAIL_IS_FLOAT(T) \ + template <> \ + struct is_float \ + { \ + enum is_float_enum \ + { \ + _YES = 1, \ + _NO = 0 \ + }; \ + } + + GLM_DETAIL_IS_FLOAT(detail::half); + GLM_DETAIL_IS_FLOAT(float); + GLM_DETAIL_IS_FLOAT(double); + GLM_DETAIL_IS_FLOAT(long double); + + ////////////////// + // bool + + template + struct is_bool + { + enum is_bool_enum + { + _YES = 0, + _NO = 1 + }; + }; + + template <> + struct is_bool + { + enum is_bool_enum + { + _YES = 1, + _NO = 0 + }; + }; + + ////////////////// + // vector + + template + struct is_vector + { + enum is_vector_enum + { + _YES = 0, + _NO = 1 + }; + }; + +# define GLM_DETAIL_IS_VECTOR(TYPE) \ + template \ + struct is_vector > \ + { \ + enum is_vector_enum \ + { \ + _YES = 1, \ + _NO = 0 \ + }; \ + } + + ////////////////// + // matrix + + template + struct is_matrix + { + enum is_matrix_enum + { + _YES = 0, + _NO = 1 + }; + }; + +#define GLM_DETAIL_IS_MATRIX(T) \ + template <> \ + struct is_matrix \ + { \ + enum is_matrix_enum \ + { \ + _YES = 1, \ + _NO = 0 \ + }; \ + } + + ////////////////// + // type + + template + struct type + { + enum type_enum + { + is_float = is_float::_YES, + is_int = is_int::_YES, + is_uint = is_uint::_YES, + is_bool = is_bool::_YES + }; + }; + + ////////////////// + // type + + typedef signed char int8; + typedef signed short int16; + typedef signed int int32; + typedef detail::sint64 int64; + + typedef unsigned char uint8; + typedef unsigned short uint16; + typedef unsigned int uint32; + typedef detail::uint64 uint64; + + typedef detail::half float16; + typedef float float32; + typedef double float64; + + ////////////////// + // float_or_int_trait + + struct float_or_int_value + { + enum + { + GLM_ERROR, + GLM_FLOAT, + GLM_INT + }; + }; + + template + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_ERROR}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_FLOAT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_FLOAT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_FLOAT}; + }; + +}//namespace detail +}//namespace glm + +#if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005)) +# define GLM_DEPRECATED __declspec(deprecated) +# define GLM_ALIGN(x) __declspec(align(x)) +# define GLM_ALIGNED_STRUCT(x) __declspec(align(x)) struct +# define GLM_RESTRICT __declspec(restrict) +# define GLM_RESTRICT_VAR __restrict +# define GLM_CONSTEXPR +#elif((GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC)) && (GLM_COMPILER >= GLM_COMPILER_GCC31)) +# define GLM_DEPRECATED __attribute__((__deprecated__)) +# define GLM_ALIGN(x) __attribute__((aligned(x))) +# define GLM_ALIGNED_STRUCT(x) struct __attribute__((aligned(x))) +# if(GLM_COMPILER >= GLM_COMPILER_GCC33) +# define GLM_RESTRICT __restrict__ +# define GLM_RESTRICT_VAR __restrict__ +# else +# define GLM_RESTRICT +# define GLM_RESTRICT_VAR +# endif +# define GLM_RESTRICT __restrict__ +# define GLM_RESTRICT_VAR __restrict__ +# if((GLM_COMPILER >= GLM_COMPILER_GCC47) && ((GLM_LANG & GLM_LANG_CXX0X) == GLM_LANG_CXX0X)) +# define GLM_CONSTEXPR constexpr +# else +# define GLM_CONSTEXPR +# endif +#else +# define GLM_DEPRECATED +# define GLM_ALIGN +# define GLM_ALIGNED_STRUCT(x) +# define GLM_RESTRICT +# define GLM_RESTRICT_VAR +# define GLM_CONSTEXPR +#endif//GLM_COMPILER + +#endif//glm_core_detail diff --git a/include/gal/opengl/glm/core/_fixes.hpp b/include/gal/opengl/glm/core/_fixes.hpp new file mode 100644 index 0000000000..420a3225b3 --- /dev/null +++ b/include/gal/opengl/glm/core/_fixes.hpp @@ -0,0 +1,55 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/_fixes.hpp +/// @date 2011-02-21 / 2011-11-22 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#include + +//! Workaround for compatibility with other libraries +#ifdef max +#undef max +#endif + +//! Workaround for compatibility with other libraries +#ifdef min +#undef min +#endif + +//! Workaround for Android +#ifdef isnan +#undef isnan +#endif + +//! Workaround for Android +#ifdef isinf +#undef isinf +#endif + +//! Workaround for Chrone Native Client +#ifdef log2 +#undef log2 +#endif + diff --git a/include/gal/opengl/glm/core/_swizzle.hpp b/include/gal/opengl/glm/core/_swizzle.hpp new file mode 100644 index 0000000000..65443b1614 --- /dev/null +++ b/include/gal/opengl/glm/core/_swizzle.hpp @@ -0,0 +1,836 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/_swizzle.hpp +/// @date 2006-04-20 / 2011-02-16 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_swizzle +#define glm_core_swizzle + +#include "_swizzle_func.hpp" + +namespace glm +{ + enum comp + { + X = 0, + R = 0, + S = 0, + Y = 1, + G = 1, + T = 1, + Z = 2, + B = 2, + P = 2, + W = 3, + A = 3, + Q = 3 + }; +}//namespace glm + +namespace glm{ +namespace detail +{ + // Internal class for implementing swizzle operators + template + struct _swizzle_base0 + { + typedef T value_type; + + protected: + value_type& elem (size_t i) { return (reinterpret_cast(_buffer))[i]; } + const value_type& elem (size_t i) const { return (reinterpret_cast(_buffer))[i]; } + + // Use an opaque buffer to *ensure* the compiler doesn't call a constructor. + // The size 1 buffer is assumed to aligned to the actual members so that the + // elem() + char _buffer[1]; + }; + + template + struct _swizzle_base1 : public _swizzle_base0 + { + }; + + template + struct _swizzle_base1 : public _swizzle_base0 + { + V operator ()() const { return V(this->elem(E0), this->elem(E1)); } + }; + + template + struct _swizzle_base1 : public _swizzle_base0 + { + V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2)); } + }; + + template + struct _swizzle_base1 : public _swizzle_base0 + { + V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2), this->elem(E3)); } + }; + + // Internal class for implementing swizzle operators + /* + Template parameters: + + ValueType = type of scalar values (e.g. float, double) + VecType = class the swizzle is applies to (e.g. tvec3) + N = number of components in the vector (e.g. 3) + E0...3 = what index the n-th element of this swizzle refers to in the unswizzled vec + + DUPLICATE_ELEMENTS = 1 if there is a repeated element, 0 otherwise (used to specialize swizzles + containing duplicate elements so that they cannot be used as r-values). + */ + template + struct _swizzle_base2 : public _swizzle_base1 + { + typedef VecType vec_type; + typedef ValueType value_type; + + _swizzle_base2& operator= (const ValueType& t) + { + for (int i = 0; i < N; ++i) + (*this)[i] = t; + return *this; + } + + _swizzle_base2& operator= (const VecType& that) + { + struct op { + void operator() (value_type& e, value_type& t) { e = t; } + }; + _apply_op(that, op()); + return *this; + } + + void operator -= (const VecType& that) + { + struct op { + void operator() (value_type& e, value_type& t) { e -= t; } + }; + _apply_op(that, op()); + } + + void operator += (const VecType& that) + { + struct op { + void operator() (value_type& e, value_type& t) { e += t; } + }; + _apply_op(that, op()); + } + + void operator *= (const VecType& that) + { + struct op { + void operator() (value_type& e, value_type& t) { e *= t; } + }; + _apply_op(that, op()); + } + + void operator /= (const VecType& that) + { + struct op { + void operator() (value_type& e, value_type& t) { e /= t; } + }; + _apply_op(that, op()); + } + + value_type& operator[] (size_t i) + { + static const int offset_dst[4] = { E0, E1, E2, E3 }; + return this->elem(offset_dst[i]); + } + value_type operator[] (size_t i) const + { + static const int offset_dst[4] = { E0, E1, E2, E3 }; + return this->elem(offset_dst[i]); + } + protected: + template + void _apply_op(const VecType& that, T op) + { + // Make a copy of the data in this == &that. + // The copier should optimize out the copy in cases where the function is + // properly inlined and the copy is not necessary. + ValueType t[N]; + for (int i = 0; i < N; ++i) + t[i] = that[i]; + for (int i = 0; i < N; ++i) + op( (*this)[i], t[i] ); + } + }; + + // Specialization for swizzles containing duplicate elements. These cannot be modified. + template + struct _swizzle_base2 : public _swizzle_base1 + { + typedef VecType vec_type; + typedef ValueType value_type; + + struct Stub {}; + _swizzle_base2& operator= (Stub const &) {} + + value_type operator[] (size_t i) const + { + static const int offset_dst[4] = { E0, E1, E2, E3 }; + return this->elem(offset_dst[i]); + } + }; + + template + struct swizzle : public _swizzle_base2 + { + typedef _swizzle_base2 base_type; + + using base_type::operator=; + + operator VecType () const { return (*this)(); } + }; + +// +// To prevent the C++ syntax from getting entirely overwhelming, define some alias macros +// +#define _GLM_SWIZZLE_TEMPLATE1 template +#define _GLM_SWIZZLE_TEMPLATE2 template +#define _GLM_SWIZZLE_TYPE1 glm::detail::swizzle +#define _GLM_SWIZZLE_TYPE2 glm::detail::swizzle + +// +// Wrapper for a binary operator (e.g. u.yy + v.zy) +// +#define _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND) \ + _GLM_SWIZZLE_TEMPLATE2 \ + V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \ + { \ + return a() OPERAND b(); \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const V& b) \ + { \ + return a() OPERAND b; \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + V operator OPERAND ( const V& a, const _GLM_SWIZZLE_TYPE1& b) \ + { \ + return a OPERAND b(); \ + } + +// +// Wrapper for a operand between a swizzle and a binary (e.g. 1.0f - u.xyz) +// +#define _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND) \ + _GLM_SWIZZLE_TEMPLATE1 \ + V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const T& b) \ + { \ + return a() OPERAND b; \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + V operator OPERAND ( const T& a, const _GLM_SWIZZLE_TYPE1& b) \ + { \ + return a OPERAND b(); \ + } + +// +// Macro for wrapping a function taking one argument (e.g. abs()) +// +#define _GLM_SWIZZLE_FUNCTION_1_ARGS(RETURN_TYPE,FUNCTION) \ + _GLM_SWIZZLE_TEMPLATE1 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a) \ + { \ + return FUNCTION(a()); \ + } + +// +// Macro for wrapping a function taking two vector arguments (e.g. dot()). +// +#define _GLM_SWIZZLE_FUNCTION_2_ARGS(RETURN_TYPE,FUNCTION) \ + _GLM_SWIZZLE_TEMPLATE2 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \ + { \ + return FUNCTION(a(), b()); \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b) \ + { \ + return FUNCTION(a(), b()); \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename V& b) \ + { \ + return FUNCTION(a(), b); \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const V& a, const _GLM_SWIZZLE_TYPE1& b) \ + { \ + return FUNCTION(a, b()); \ + } + +// +// Macro for wrapping a function take 2 vec arguments followed by a scalar (e.g. mix()). +// +#define _GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(RETURN_TYPE,FUNCTION) \ + _GLM_SWIZZLE_TEMPLATE2 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b, const T& c) \ + { \ + return FUNCTION(a(), b(), c); \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \ + { \ + return FUNCTION(a(), b(), c); \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename S0::vec_type& b, const T& c)\ + { \ + return FUNCTION(a(), b, c); \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const typename V& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \ + { \ + return FUNCTION(a, b(), c); \ + } + +}//namespace detail +}//namespace glm + +namespace glm +{ + namespace detail + { + _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(-) + _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(*) + _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(+) + _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(-) + _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(*) + _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(/) + } + + // + // Swizzles are distinct types from the unswizzled type. The below macros will + // provide template specializations for the swizzle types for the given functions + // so that the compiler does not have any ambiguity to choosing how to handle + // the function. + // + // The alternative is to use the operator()() when calling the function in order + // to explicitly convert the swizzled type to the unswizzled type. + // + + //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, abs); + //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, acos); + //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, acosh); + //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, all); + //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, any); + + //_GLM_SWIZZLE_FUNCTION_2_ARGS(value_type, dot); + //_GLM_SWIZZLE_FUNCTION_2_ARGS(vec_type, cross); + //_GLM_SWIZZLE_FUNCTION_2_ARGS(vec_type, step); + //_GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(vec_type, mix); +} + +#define _GLM_SWIZZLE2_2_MEMBERS(T,P,E0,E1) \ + struct { glm::detail::swizzle<2,T,P,0,0,-1,-2> E0 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P,0,1,-1,-2> E0 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P,1,0,-1,-2> E1 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P,1,1,-1,-2> E1 ## E1; }; + +#define _GLM_SWIZZLE2_3_MEMBERS(T,P2,E0,E1) \ + struct { glm::detail::swizzle<3,T,P2,0,0,0,-1> E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P2,0,0,1,-1> E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P2,0,1,0,-1> E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P2,0,1,1,-1> E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P2,1,0,0,-1> E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P2,1,0,1,-1> E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P2,1,1,0,-1> E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P2,1,1,1,-1> E1 ## E1 ## E1; }; + +#define _GLM_SWIZZLE2_4_MEMBERS(T,P2,E0,E1) \ + struct { glm::detail::swizzle<4,T,P2,0,0,0,0> E0 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,0,1> E0 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,1,0> E0 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,1,1> E0 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,0,0> E0 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,0,1> E0 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,1,0> E0 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,1,1> E0 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,0,0> E1 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,0,1> E1 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,1,0> E1 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,1,1> E1 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,0,0> E1 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,0,1> E1 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,1,0> E1 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,1,1> E1 ## E1 ## E1 ## E1; }; + +#define _GLM_SWIZZLE3_2_MEMBERS(T,P2,E0,E1,E2) \ + struct { glm::detail::swizzle<2,T,P2,0,0,-1,-2> E0 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P2,0,1,-1,-2> E0 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P2,0,2,-1,-2> E0 ## E2; }; \ + struct { glm::detail::swizzle<2,T,P2,1,0,-1,-2> E1 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P2,1,1,-1,-2> E1 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P2,1,2,-1,-2> E1 ## E2; }; \ + struct { glm::detail::swizzle<2,T,P2,2,0,-1,-2> E2 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P2,2,1,-1,-2> E2 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P2,2,2,-1,-2> E2 ## E2; }; + +#define _GLM_SWIZZLE3_3_MEMBERS(T,P,E0,E1,E2) \ + struct { glm::detail::swizzle<3,T,P,0,0,0,-1> E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,0,0,1,-1> E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,0,0,2,-1> E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,0,1,0,-1> E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,0,1,1,-1> E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,0,1,2,-1> E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,0,2,0,-1> E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,0,2,1,-1> E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,0,2,2,-1> E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,1,0,0,-1> E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,1,0,1,-1> E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,1,0,2,-1> E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,1,1,0,-1> E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,1,1,1,-1> E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,1,1,2,-1> E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,1,2,0,-1> E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,1,2,1,-1> E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,1,2,2,-1> E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,2,0,0,-1> E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,2,0,1,-1> E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,2,0,2,-1> E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,2,1,0,-1> E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,2,1,1,-1> E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,2,1,2,-1> E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,2,2,0,-1> E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,2,2,1,-1> E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,2,2,2,-1> E2 ## E2 ## E2; }; + +#define _GLM_SWIZZLE3_4_MEMBERS(T,P2,E0,E1,E2) \ + struct { glm::detail::swizzle<4,T,P2,0,0,0,0> E0 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,0,1> E0 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,0,2> E0 ## E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,1,0> E0 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,1,1> E0 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,1,2> E0 ## E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,2,0> E0 ## E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,2,1> E0 ## E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,2,2> E0 ## E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,0,0> E0 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,0,1> E0 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,0,2> E0 ## E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,1,0> E0 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,1,1> E0 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,1,2> E0 ## E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,2,0> E0 ## E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,2,1> E0 ## E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,2,2> E0 ## E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,0,0> E0 ## E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,0,1> E0 ## E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,0,2> E0 ## E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,1,0> E0 ## E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,1,1> E0 ## E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,1,2> E0 ## E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,2,0> E0 ## E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,2,1> E0 ## E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,2,2> E0 ## E2 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,0,0> E1 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,0,1> E1 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,0,2> E1 ## E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,1,0> E1 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,1,1> E1 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,1,2> E1 ## E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,2,0> E1 ## E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,2,1> E1 ## E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,2,2> E1 ## E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,0,0> E1 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,0,1> E1 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,0,2> E1 ## E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,1,0> E1 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,1,1> E1 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,1,2> E1 ## E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,2,0> E1 ## E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,2,1> E1 ## E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,2,2> E1 ## E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,0,0> E1 ## E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,0,1> E1 ## E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,0,2> E1 ## E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,1,0> E1 ## E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,1,1> E1 ## E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,1,2> E1 ## E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,2,0> E1 ## E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,2,1> E1 ## E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,2,2> E1 ## E2 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,0,0> E2 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,0,1> E2 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,0,2> E2 ## E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,1,0> E2 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,1,1> E2 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,1,2> E2 ## E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,2,0> E2 ## E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,2,1> E2 ## E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,2,2> E2 ## E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,0,0> E2 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,0,1> E2 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,0,2> E2 ## E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,1,0> E2 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,1,1> E2 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,1,2> E2 ## E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,2,0> E2 ## E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,2,1> E2 ## E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,2,2> E2 ## E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,0,0> E2 ## E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,0,1> E2 ## E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,0,2> E2 ## E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,1,0> E2 ## E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,1,1> E2 ## E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,1,2> E2 ## E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,2,0> E2 ## E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,2,1> E2 ## E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,2,2> E2 ## E2 ## E2 ## E2; }; + +#define _GLM_SWIZZLE4_2_MEMBERS(T,P,E0,E1,E2,E3) \ + struct { glm::detail::swizzle<2,T,P,0,0,-1,-2> E0 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P,0,1,-1,-2> E0 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P,0,2,-1,-2> E0 ## E2; }; \ + struct { glm::detail::swizzle<2,T,P,0,3,-1,-2> E0 ## E3; }; \ + struct { glm::detail::swizzle<2,T,P,1,0,-1,-2> E1 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P,1,1,-1,-2> E1 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P,1,2,-1,-2> E1 ## E2; }; \ + struct { glm::detail::swizzle<2,T,P,1,3,-1,-2> E1 ## E3; }; \ + struct { glm::detail::swizzle<2,T,P,2,0,-1,-2> E2 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P,2,1,-1,-2> E2 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P,2,2,-1,-2> E2 ## E2; }; \ + struct { glm::detail::swizzle<2,T,P,2,3,-1,-2> E2 ## E3; }; \ + struct { glm::detail::swizzle<2,T,P,3,0,-1,-2> E3 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P,3,1,-1,-2> E3 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P,3,2,-1,-2> E3 ## E2; }; \ + struct { glm::detail::swizzle<2,T,P,3,3,-1,-2> E3 ## E3; }; + +#define _GLM_SWIZZLE4_3_MEMBERS(T,P,E0,E1,E2,E3) \ + struct { glm::detail::swizzle<3,T,P,0,0,0,-1> E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,0,0,1,-1> E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,0,0,2,-1> E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,0,0,3,-1> E0 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,0,1,0,-1> E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,0,1,1,-1> E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,0,1,2,-1> E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,0,1,3,-1> E0 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,0,2,0,-1> E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,0,2,1,-1> E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,0,2,2,-1> E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,0,2,3,-1> E0 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,0,3,0,-1> E0 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,0,3,1,-1> E0 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,0,3,2,-1> E0 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,0,3,3,-1> E0 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,1,0,0,-1> E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,1,0,1,-1> E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,1,0,2,-1> E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,1,0,3,-1> E1 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,1,1,0,-1> E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,1,1,1,-1> E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,1,1,2,-1> E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,1,1,3,-1> E1 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,1,2,0,-1> E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,1,2,1,-1> E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,1,2,2,-1> E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,1,2,3,-1> E1 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,1,3,0,-1> E1 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,1,3,1,-1> E1 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,1,3,2,-1> E1 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,1,3,3,-1> E1 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,2,0,0,-1> E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,2,0,1,-1> E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,2,0,2,-1> E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,2,0,3,-1> E2 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,2,1,0,-1> E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,2,1,1,-1> E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,2,1,2,-1> E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,2,1,3,-1> E2 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,2,2,0,-1> E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,2,2,1,-1> E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,2,2,2,-1> E2 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,2,2,3,-1> E2 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,2,3,0,-1> E2 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,2,3,1,-1> E2 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,2,3,2,-1> E2 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,2,3,3,-1> E2 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,3,0,0,-1> E3 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,3,0,1,-1> E3 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,3,0,2,-1> E3 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,3,0,3,-1> E3 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,3,1,0,-1> E3 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,3,1,1,-1> E3 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,3,1,2,-1> E3 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,3,1,3,-1> E3 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,3,2,0,-1> E3 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,3,2,1,-1> E3 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,3,2,2,-1> E3 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,3,2,3,-1> E3 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,3,3,0,-1> E3 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,3,3,1,-1> E3 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,3,3,2,-1> E3 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,3,3,3,-1> E3 ## E3 ## E3; }; + +#define _GLM_SWIZZLE4_4_MEMBERS(T,P,E0,E1,E2,E3) \ + struct { glm::detail::swizzle<4,T,P,0,0,0,0> E0 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,0,1> E0 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,0,2> E0 ## E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,0,3> E0 ## E0 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,1,0> E0 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,1,1> E0 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,1,2> E0 ## E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,1,3> E0 ## E0 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,2,0> E0 ## E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,2,1> E0 ## E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,2,2> E0 ## E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,2,3> E0 ## E0 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,3,0> E0 ## E0 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,3,1> E0 ## E0 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,3,2> E0 ## E0 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,3,3> E0 ## E0 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,0,0> E0 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,0,1> E0 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,0,2> E0 ## E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,0,3> E0 ## E1 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,1,0> E0 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,1,1> E0 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,1,2> E0 ## E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,1,3> E0 ## E1 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,2,0> E0 ## E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,2,1> E0 ## E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,2,2> E0 ## E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,2,3> E0 ## E1 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,3,0> E0 ## E1 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,3,1> E0 ## E1 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,3,2> E0 ## E1 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,3,3> E0 ## E1 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,0,0> E0 ## E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,0,1> E0 ## E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,0,2> E0 ## E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,0,3> E0 ## E2 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,1,0> E0 ## E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,1,1> E0 ## E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,1,2> E0 ## E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,1,3> E0 ## E2 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,2,0> E0 ## E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,2,1> E0 ## E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,2,2> E0 ## E2 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,2,3> E0 ## E2 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,3,0> E0 ## E2 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,3,1> E0 ## E2 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,3,2> E0 ## E2 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,3,3> E0 ## E2 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,0,0> E1 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,0,1> E1 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,0,2> E1 ## E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,0,3> E1 ## E0 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,1,0> E1 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,1,1> E1 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,1,2> E1 ## E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,1,3> E1 ## E0 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,2,0> E1 ## E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,2,1> E1 ## E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,2,2> E1 ## E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,2,3> E1 ## E0 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,3,0> E1 ## E0 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,3,1> E1 ## E0 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,3,2> E1 ## E0 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,3,3> E1 ## E0 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,0,0> E1 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,0,1> E1 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,0,2> E1 ## E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,0,3> E1 ## E1 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,1,0> E1 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,1,1> E1 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,1,2> E1 ## E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,1,3> E1 ## E1 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,2,0> E1 ## E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,2,1> E1 ## E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,2,2> E1 ## E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,2,3> E1 ## E1 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,3,0> E1 ## E1 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,3,1> E1 ## E1 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,3,2> E1 ## E1 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,3,3> E1 ## E1 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,0,0> E1 ## E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,0,1> E1 ## E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,0,2> E1 ## E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,0,3> E1 ## E2 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,1,0> E1 ## E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,1,1> E1 ## E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,1,2> E1 ## E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,1,3> E1 ## E2 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,2,0> E1 ## E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,2,1> E1 ## E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,2,2> E1 ## E2 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,2,3> E1 ## E2 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,3,0> E1 ## E2 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,3,1> E1 ## E2 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,3,2> E1 ## E2 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,3,3> E1 ## E2 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,0,0> E1 ## E3 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,0,1> E1 ## E3 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,0,2> E1 ## E3 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,0,3> E1 ## E3 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,1,0> E1 ## E3 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,1,1> E1 ## E3 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,1,2> E1 ## E3 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,1,3> E1 ## E3 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,2,0> E1 ## E3 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,2,1> E1 ## E3 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,2,2> E1 ## E3 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,2,3> E1 ## E3 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,3,0> E1 ## E3 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,3,1> E1 ## E3 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,3,2> E1 ## E3 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,3,3> E1 ## E3 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,0,0> E2 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,0,1> E2 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,0,2> E2 ## E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,0,3> E2 ## E0 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,1,0> E2 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,1,1> E2 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,1,2> E2 ## E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,1,3> E2 ## E0 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,2,0> E2 ## E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,2,1> E2 ## E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,2,2> E2 ## E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,2,3> E2 ## E0 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,3,0> E2 ## E0 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,3,1> E2 ## E0 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,3,2> E2 ## E0 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,3,3> E2 ## E0 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,0,0> E2 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,0,1> E2 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,0,2> E2 ## E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,0,3> E2 ## E1 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,1,0> E2 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,1,1> E2 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,1,2> E2 ## E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,1,3> E2 ## E1 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,2,0> E2 ## E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,2,1> E2 ## E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,2,2> E2 ## E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,2,3> E2 ## E1 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,3,0> E2 ## E1 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,3,1> E2 ## E1 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,3,2> E2 ## E1 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,3,3> E2 ## E1 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,0,0> E2 ## E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,0,1> E2 ## E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,0,2> E2 ## E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,0,3> E2 ## E2 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,1,0> E2 ## E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,1,1> E2 ## E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,1,2> E2 ## E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,1,3> E2 ## E2 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,2,0> E2 ## E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,2,1> E2 ## E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,2,2> E2 ## E2 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,2,3> E2 ## E2 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,3,0> E2 ## E2 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,3,1> E2 ## E2 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,3,2> E2 ## E2 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,3,3> E2 ## E2 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,0,0> E2 ## E3 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,0,1> E2 ## E3 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,0,2> E2 ## E3 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,0,3> E2 ## E3 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,1,0> E2 ## E3 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,1,1> E2 ## E3 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,1,2> E2 ## E3 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,1,3> E2 ## E3 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,2,0> E2 ## E3 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,2,1> E2 ## E3 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,2,2> E2 ## E3 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,2,3> E2 ## E3 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,3,0> E2 ## E3 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,3,1> E2 ## E3 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,3,2> E2 ## E3 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,3,3> E2 ## E3 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,0,0> E3 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,0,1> E3 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,0,2> E3 ## E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,0,3> E3 ## E0 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,1,0> E3 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,1,1> E3 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,1,2> E3 ## E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,1,3> E3 ## E0 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,2,0> E3 ## E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,2,1> E3 ## E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,2,2> E3 ## E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,2,3> E3 ## E0 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,3,0> E3 ## E0 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,3,1> E3 ## E0 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,3,2> E3 ## E0 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,3,3> E3 ## E0 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,0,0> E3 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,0,1> E3 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,0,2> E3 ## E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,0,3> E3 ## E1 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,1,0> E3 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,1,1> E3 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,1,2> E3 ## E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,1,3> E3 ## E1 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,2,0> E3 ## E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,2,1> E3 ## E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,2,2> E3 ## E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,2,3> E3 ## E1 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,3,0> E3 ## E1 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,3,1> E3 ## E1 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,3,2> E3 ## E1 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,3,3> E3 ## E1 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,0,0> E3 ## E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,0,1> E3 ## E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,0,2> E3 ## E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,0,3> E3 ## E2 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,1,0> E3 ## E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,1,1> E3 ## E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,1,2> E3 ## E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,1,3> E3 ## E2 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,2,0> E3 ## E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,2,1> E3 ## E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,2,2> E3 ## E2 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,2,3> E3 ## E2 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,3,0> E3 ## E2 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,3,1> E3 ## E2 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,3,2> E3 ## E2 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,3,3> E3 ## E2 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,0,0> E3 ## E3 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,0,1> E3 ## E3 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,0,2> E3 ## E3 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,0,3> E3 ## E3 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,1,0> E3 ## E3 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,1,1> E3 ## E3 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,1,2> E3 ## E3 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,1,3> E3 ## E3 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,2,0> E3 ## E3 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,2,1> E3 ## E3 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,2,2> E3 ## E3 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,2,3> E3 ## E3 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,3,0> E3 ## E3 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,3,1> E3 ## E3 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,3,2> E3 ## E3 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,3,3> E3 ## E3 ## E3 ## E3; }; + +#endif//glm_core_swizzle diff --git a/include/gal/opengl/glm/core/_swizzle_func.hpp b/include/gal/opengl/glm/core/_swizzle_func.hpp new file mode 100644 index 0000000000..90a895d63d --- /dev/null +++ b/include/gal/opengl/glm/core/_swizzle_func.hpp @@ -0,0 +1,787 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/_swizzle_func.hpp +/// @date 2011-10-16 / 2011-10-16 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_swizzle_func +#define glm_core_swizzle_func + +#define GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B) \ + SWIZZLED_TYPE A ## B() CONST \ + { \ + return SWIZZLED_TYPE(this->A, this->B); \ + } + +#define GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C) \ + SWIZZLED_TYPE A ## B ## C() CONST \ + { \ + return SWIZZLED_TYPE(this->A, this->B, this->C); \ + } + +#define GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C, D) \ + SWIZZLED_TYPE A ## B ## C ## D() CONST \ + { \ + return SWIZZLED_TYPE(this->A, this->B, this->C, this->D); \ + } + +#define GLM_SWIZZLE_GEN_VEC2_ENTRY_DEF(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B) \ + template \ + SWIZZLED_TYPE CLASS_TYPE::A ## B() CONST \ + { \ + return SWIZZLED_TYPE(this->A, this->B); \ + } + +#define GLM_SWIZZLE_GEN_VEC3_ENTRY_DEF(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C) \ + template \ + SWIZZLED_TYPE CLASS_TYPE::A ## B ## C() CONST \ + { \ + return SWIZZLED_TYPE(this->A, this->B, this->C); \ + } + +#define GLM_SWIZZLE_GEN_VEC4_ENTRY_DEF(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C, D) \ + template \ + SWIZZLED_TYPE CLASS_TYPE::A ## B ## C ## D() CONST \ + { \ + return SWIZZLED_TYPE(this->A, this->B, this->C, this->D); \ + } + +#define GLM_MUTABLE + +#define GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) + +#define GLM_SWIZZLE_GEN_REF_FROM_VEC2(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE) \ + GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, x, y) \ + GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, r, g) \ + GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, s, t) + +//GLM_SWIZZLE_GEN_REF_FROM_VEC2(valType, detail::vec2, detail::ref2) + +#define GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B) + +#define GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B, A) + +#define GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C) + +#define GLM_SWIZZLE_GEN_REF_FROM_VEC3(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, x, y, z) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, r, g, b) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, s, t, q) + +//GLM_SWIZZLE_GEN_REF_FROM_VEC3(valType, detail::vec3, detail::ref2, detail::ref3) + +#define GLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, C) + +#define GLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, C, B) + +#define GLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, C, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, C, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, B, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, C, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, C, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, A, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, A, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, B, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, B, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, A, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, A, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, B, C, A) + +#define GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) + +#define GLM_SWIZZLE_GEN_REF_FROM_VEC4(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z, w) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b, a) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, q, p) + +//GLM_SWIZZLE_GEN_REF_FROM_VEC4(valType, detail::vec4, detail::ref2, detail::ref3, detail::ref4) + +#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) + +#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) + +#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) + +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B) \ + GLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B) \ + GLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B) \ + GLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B) + +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC2(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t) + +//GLM_SWIZZLE_GEN_VEC_FROM_VEC2(valType, detail::vec2, detail::vec2, detail::vec3, detail::vec4) + +#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C) + +#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C) + +#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, C) + +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C) + +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC3(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, q) + +//GLM_SWIZZLE_GEN_VEC_FROM_VEC3(valType, detail::vec3, detail::vec2, detail::vec3, detail::vec4) + +#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D) + +#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D) + +#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, D) + +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) + +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC4(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z, w) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b, a) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, q, p) + +//GLM_SWIZZLE_GEN_VEC_FROM_VEC4(valType, detail::vec4, detail::vec2, detail::vec3, detail::vec4) + +#endif//glm_core_swizzle_func diff --git a/include/gal/opengl/glm/core/_vectorize.hpp b/include/gal/opengl/glm/core/_vectorize.hpp new file mode 100644 index 0000000000..e8ced04d24 --- /dev/null +++ b/include/gal/opengl/glm/core/_vectorize.hpp @@ -0,0 +1,159 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/_vectorize.hpp +/// @date 2011-10-14 / 2011-10-14 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#define VECTORIZE2_VEC(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec2 func( \ + detail::tvec2 const & v) \ + { \ + return detail::tvec2( \ + func(v.x), \ + func(v.y)); \ + } + +#define VECTORIZE3_VEC(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec3 func( \ + detail::tvec3 const & v) \ + { \ + return detail::tvec3( \ + func(v.x), \ + func(v.y), \ + func(v.z)); \ + } + +#define VECTORIZE4_VEC(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec4 func( \ + detail::tvec4 const & v) \ + { \ + return detail::tvec4( \ + func(v.x), \ + func(v.y), \ + func(v.z), \ + func(v.w)); \ + } + +#define VECTORIZE_VEC(func) \ + VECTORIZE2_VEC(func) \ + VECTORIZE3_VEC(func) \ + VECTORIZE4_VEC(func) + +#define VECTORIZE2_VEC_SCA(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec2 func \ + ( \ + detail::tvec2 const & x, \ + typename detail::tvec2::value_type const & y \ + ) \ + { \ + return detail::tvec2( \ + func(x.x, y), \ + func(x.y, y)); \ + } + +#define VECTORIZE3_VEC_SCA(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec3 func \ + ( \ + detail::tvec3 const & x, \ + typename detail::tvec3::value_type const & y \ + ) \ + { \ + return detail::tvec3( \ + func(x.x, y), \ + func(x.y, y), \ + func(x.z, y)); \ + } + +#define VECTORIZE4_VEC_SCA(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec4 func \ + ( \ + detail::tvec4 const & x, \ + typename detail::tvec4::value_type const & y \ + ) \ + { \ + return detail::tvec4( \ + func(x.x, y), \ + func(x.y, y), \ + func(x.z, y), \ + func(x.w, y)); \ + } + +#define VECTORIZE_VEC_SCA(func) \ + VECTORIZE2_VEC_SCA(func) \ + VECTORIZE3_VEC_SCA(func) \ + VECTORIZE4_VEC_SCA(func) + +#define VECTORIZE2_VEC_VEC(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec2 func \ + ( \ + detail::tvec2 const & x, \ + detail::tvec2 const & y \ + ) \ + { \ + return detail::tvec2( \ + func(x.x, y.x), \ + func(x.y, y.y)); \ + } + +#define VECTORIZE3_VEC_VEC(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec3 func \ + ( \ + detail::tvec3 const & x, \ + detail::tvec3 const & y \ + ) \ + { \ + return detail::tvec3( \ + func(x.x, y.x), \ + func(x.y, y.y), \ + func(x.z, y.z)); \ + } + +#define VECTORIZE4_VEC_VEC(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec4 func \ + ( \ + detail::tvec4 const & x, \ + detail::tvec4 const & y \ + ) \ + { \ + return detail::tvec4( \ + func(x.x, y.x), \ + func(x.y, y.y), \ + func(x.z, y.z), \ + func(x.w, y.w)); \ + } + +#define VECTORIZE_VEC_VEC(func) \ + VECTORIZE2_VEC_VEC(func) \ + VECTORIZE3_VEC_VEC(func) \ + VECTORIZE4_VEC_VEC(func) diff --git a/include/gal/opengl/glm/core/dummy.cpp b/include/gal/opengl/glm/core/dummy.cpp new file mode 100644 index 0000000000..c69977bd56 --- /dev/null +++ b/include/gal/opengl/glm/core/dummy.cpp @@ -0,0 +1,40 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/dummy.cpp +/// @date 2011-01-19 / 2011-06-15 +/// @author Christophe Riccio +/// +/// GLM is a header only library. There is nothing to compile. +/// dummy.cpp exist only a wordaround for CMake file. +/////////////////////////////////////////////////////////////////////////////////// + +#define GLM_MESSAGES +#include "../glm.hpp" + +//#error "GLM is a header only library" + +int main() +{ + +} diff --git a/include/gal/opengl/glm/core/func_common.hpp b/include/gal/opengl/glm/core/func_common.hpp new file mode 100644 index 0000000000..c524948a71 --- /dev/null +++ b/include/gal/opengl/glm/core/func_common.hpp @@ -0,0 +1,430 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_common.hpp +/// @date 2008-03-08 / 2010-01-26 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.3 Common Functions +/// +/// @defgroup core_func_common Common functions +/// @ingroup core +/// +/// These all operate component-wise. The description is per component. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_CORE_func_common +#define GLM_CORE_func_common GLM_VERSION + +#include "_fixes.hpp" + +namespace glm +{ + /// @addtogroup core_func_common + /// @{ + + /// Returns x if x >= 0; otherwise, it returns -x. + /// + /// @tparam genType floating-point or signed integer; scalar or vector types. + /// + /// @see GLSL abs man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType abs(genType const & x); + + /// Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0. + /// + /// @tparam genType Floating-point or signed integer; scalar or vector types. + /// + /// @see GLSL sign man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType sign(genType const & x); + + /// Returns a value equal to the nearest integer that is less then or equal to x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL floor man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType floor(genType const & x); + + /// Returns a value equal to the nearest integer to x + /// whose absolute value is not larger than the absolute value of x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL trunc man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType trunc(genType const & x); + + /// Returns a value equal to the nearest integer to x. + /// The fraction 0.5 will round in a direction chosen by the + /// implementation, presumably the direction that is fastest. + /// This includes the possibility that round(x) returns the + /// same value as roundEven(x) for all values of x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL round man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType round(genType const & x); + + /// Returns a value equal to the nearest integer to x. + /// A fractional part of 0.5 will round toward the nearest even + /// integer. (Both 3.5 and 4.5 for x will return 4.0.) + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL roundEven man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + /// @see New round to even technique + template + genType roundEven(genType const & x); + + /// Returns a value equal to the nearest integer + /// that is greater than or equal to x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL ceil man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType ceil(genType const & x); + + /// Return x - floor(x). + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL fract man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType fract(genType const & x); + + /// Modulus. Returns x - y * floor(x / y) + /// for each component in x using the floating point value y. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL mod man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType mod( + genType const & x, + genType const & y); + + /// Modulus. Returns x - y * floor(x / y) + /// for each component in x using the floating point value y. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL mod man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType mod( + genType const & x, + typename genType::value_type const & y); + + /// Returns the fractional part of x and sets i to the integer + /// part (as a whole number floating point value). Both the + /// return value and the output parameter will have the same + /// sign as x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL modf man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType modf( + genType const & x, + genType & i); + + /// Returns y if y < x; otherwise, it returns x. + /// + /// @tparam genType Floating-point or integer; scalar or vector types. + /// + /// @see GLSL min man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType min( + genType const & x, + genType const & y); + + template + genType min( + genType const & x, + typename genType::value_type const & y); + + /// Returns y if x < y; otherwise, it returns x. + /// + /// @tparam genType Floating-point or integer; scalar or vector types. + /// + /// @see GLSL max man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType max( + genType const & x, + genType const & y); + + template + genType max( + genType const & x, + typename genType::value_type const & y); + + /// Returns min(max(x, minVal), maxVal) for each component in x + /// using the floating-point values minVal and maxVal. + /// + /// @tparam genType Floating-point or integer; scalar or vector types. + /// + /// @see GLSL clamp man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType clamp( + genType const & x, + genType const & minVal, + genType const & maxVal); + + template + genType clamp( + genType const & x, + typename genType::value_type const & minVal, + typename genType::value_type const & maxVal); + + //! @return If genTypeU is a floating scalar or vector: + //! Returns x * (1.0 - a) + y * a, i.e., the linear blend of + //! x and y using the floating-point value a. + //! The value for a is not restricted to the range [0, 1]. + //! + //! @return If genTypeU is a boolean scalar or vector: + //! Selects which vector each returned component comes + //! from. For a component of a that is false, the + //! corresponding component of x is returned. For a + //! component of a that is true, the corresponding + //! component of y is returned. Components of x and y that + //! are not selected are allowed to be invalid floating point + //! values and will have no effect on the results. Thus, this + //! provides different functionality than + //! genType mix(genType x, genType y, genType(a)) + //! where a is a Boolean vector. + /// + /// @see GLSL mix man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + /// + /// @param[in] x Value to interpolate. + /// @param[in] y Value to interpolate. + /// @param[in] a Interpolant. + /// + /// @tparam genTypeT Floating point scalar or vector. + /// @tparam genTypeU Floating point or boolean scalar or vector. It can't be a vector if it is the length of genTypeT. + /// + /// @code + /// #include + /// ... + /// float a; + /// bool b; + /// glm::dvec3 e; + /// glm::dvec3 f; + /// glm::vec4 g; + /// glm::vec4 h; + /// ... + /// glm::vec4 r = glm::mix(g, h, a); // Interpolate with a floating-point scalar two vectors. + /// glm::vec4 s = glm::mix(g, h, b); // Teturns g or h; + /// glm::dvec3 t = glm::mix(e, f, a); // Types of the third parameter is not required to match with the first and the second. + /// glm::vec4 u = glm::mix(g, h, r); // Interpolations can be perform per component with a vector for the last parameter. + /// @endcode + template + genTypeT mix(genTypeT const & x, genTypeT const & y, genTypeU const & a); + + //! Returns 0.0 if x < edge, otherwise it returns 1.0. + //! + /// @see GLSL step man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType step( + genType const & edge, + genType const & x); + + template + genType step( + typename genType::value_type const & edge, + genType const & x); + + /// Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and + /// performs smooth Hermite interpolation between 0 and 1 + /// when edge0 < x < edge1. This is useful in cases where + /// you would want a threshold function with a smooth + /// transition. This is equivalent to: + /// genType t; + /// t = clamp ((x – edge0) / (edge1 – edge0), 0, 1); + /// return t * t * (3 – 2 * t); + /// Results are undefined if edge0 >= edge1. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL smoothstep man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType smoothstep( + genType const & edge0, + genType const & edge1, + genType const & x); + + template + genType smoothstep( + typename genType::value_type const & edge0, + typename genType::value_type const & edge1, + genType const & x); + + /// Returns true if x holds a NaN (not a number) + /// representation in the underlying implementation's set of + /// floating point representations. Returns false otherwise, + /// including for implementations with no NaN + /// representations. + /// + /// /!\ When using compiler fast math, this function may fail. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL isnan man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + typename genType::bool_type isnan(genType const & x); + + /// Returns true if x holds a positive infinity or negative + /// infinity representation in the underlying implementation's + /// set of floating point representations. Returns false + /// otherwise, including for implementations with no infinity + /// representations. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL isinf man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + typename genType::bool_type isinf(genType const & x); + + /// Returns a signed integer value representing + /// the encoding of a floating-point value. The floatingpoint + /// value's bit-level representation is preserved. + /// + /// @tparam genType Single-precision floating-point scalar or vector types. + /// @tparam genIType Signed integer scalar or vector types. + /// + /// @see GLSL floatBitsToInt man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genIType floatBitsToInt(genType const & value); + + /// Returns a unsigned integer value representing + /// the encoding of a floating-point value. The floatingpoint + /// value's bit-level representation is preserved. + /// + /// @tparam genType Single-precision floating-point scalar or vector types. + /// @tparam genUType Unsigned integer scalar or vector types. + /// + /// @see GLSL floatBitsToUint man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genUType floatBitsToUint(genType const & value); + + /// Returns a floating-point value corresponding to a signed + /// integer encoding of a floating-point value. + /// If an inf or NaN is passed in, it will not signal, and the + /// resulting floating point value is unspecified. Otherwise, + /// the bit-level representation is preserved. + /// + /// @tparam genType Single-precision floating-point scalar or vector types. + /// @tparam genIType Signed integer scalar or vector types. + /// + /// @see GLSL intBitsToFloat man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + /// + /// @todo Clarify this declaration, we don't need to actually specify the return type + template + genType intBitsToFloat(genIType const & value); + + /// Returns a floating-point value corresponding to a + /// unsigned integer encoding of a floating-point value. + /// If an inf or NaN is passed in, it will not signal, and the + /// resulting floating point value is unspecified. Otherwise, + /// the bit-level representation is preserved. + /// + /// @tparam genType Single-precision floating-point scalar or vector types. + /// @tparam genUType Unsigned integer scalar or vector types. + /// + /// @see GLSL uintBitsToFloat man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + /// + /// @todo Clarify this declaration, we don't need to actually specify the return type + template + genType uintBitsToFloat(genUType const & value); + + /// Computes and returns a * b + c. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL fma man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType fma(genType const & a, genType const & b, genType const & c); + + /// Splits x into a floating-point significand in the range + /// [0.5, 1.0) and an integral exponent of two, such that: + /// x = significand * exp(2, exponent) + /// + /// The significand is returned by the function and the + /// exponent is returned in the parameter exp. For a + /// floating-point value of zero, the significant and exponent + /// are both zero. For a floating-point value that is an + /// infinity or is not a number, the results are undefined. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL frexp man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType frexp(genType const & x, genIType & exp); + + /// Builds a floating-point number from x and the + /// corresponding integral exponent of two in exp, returning: + /// significand * exp(2, exponent) + /// + /// If this product is too large to be represented in the + /// floating-point type, the result is undefined. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL ldexp man page; + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType ldexp(genType const & x, genIType const & exp); + + /// @} +}//namespace glm + +#include "func_common.inl" + +#endif//GLM_CORE_func_common diff --git a/include/gal/opengl/glm/core/func_common.inl b/include/gal/opengl/glm/core/func_common.inl new file mode 100644 index 0000000000..febe1bf7fd --- /dev/null +++ b/include/gal/opengl/glm/core/func_common.inl @@ -0,0 +1,1197 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_common.inl +/// @date 2008-08-03 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + struct Abs_ + {}; + + template + struct Abs_ + { + static genFIType get(genFIType const & x) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int, "'abs' only accept floating-point and integer inputs"); + return x >= genFIType(0) ? x : -x; + // TODO, perf comp with: *(((int *) &x) + 1) &= 0x7fffffff; + } + }; + + template + struct Abs_ + { + static genFIType get(genFIType const & x) + { + GLM_STATIC_ASSERT( + detail::type::is_uint, "'abs' only accept floating-point and integer inputs"); + return x; + } + }; +}//namespace detail + + // abs + template + GLM_FUNC_QUALIFIER genFIType abs + ( + genFIType const & x + ) + { + return detail::Abs_::is_signed>::get(x); + } + + VECTORIZE_VEC(abs) + + // sign + //Try something like based on x >> 31 to get the sign bit + template + GLM_FUNC_QUALIFIER genFIType sign + ( + genFIType const & x + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int, "'sign' only accept signed inputs"); + + genFIType result; + if(x > genFIType(0)) + result = genFIType(1); + else if(x < genFIType(0)) + result = genFIType(-1); + else + result = genFIType(0); + return result; + } + + VECTORIZE_VEC(sign) + + // floor + template <> + GLM_FUNC_QUALIFIER detail::half floor(detail::half const & x) + { + return detail::half(::std::floor(float(x))); + } + + template + GLM_FUNC_QUALIFIER genType floor(genType const & x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'floor' only accept floating-point inputs"); + + return ::std::floor(x); + } + + VECTORIZE_VEC(floor) + + // trunc + template + GLM_FUNC_QUALIFIER genType trunc(genType const & x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'trunc' only accept floating-point inputs"); + return x < 0 ? -floor(-x) : floor(x); + } + + VECTORIZE_VEC(trunc) + + // round + template + GLM_FUNC_QUALIFIER genType round(genType const& x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'round' only accept floating-point inputs"); + + if(x < 0) + return genType(int(x - genType(0.5))); + return genType(int(x + genType(0.5))); + } + + VECTORIZE_VEC(round) + +/* + // roundEven + template + GLM_FUNC_QUALIFIER genType roundEven(genType const& x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'roundEven' only accept floating-point inputs"); + + return genType(int(x + genType(int(x) % 2))); + } +*/ + + // roundEven + template + GLM_FUNC_QUALIFIER genType roundEven(genType const & x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'roundEven' only accept floating-point inputs"); + + int Integer = int(x); + genType IntegerPart = genType(Integer); + genType FractionalPart = fract(x); + + if(FractionalPart > genType(0.5) || FractionalPart < genType(0.5)) + { + return round(x); + } + else if((Integer % 2) == 0) + { + return IntegerPart; + } + else if(x <= genType(0)) // Work around... + { + return IntegerPart - 1; + } + else + { + return IntegerPart + 1; + } + //else // Bug on MinGW 4.5.2 + //{ + // return mix(IntegerPart + genType(-1), IntegerPart + genType(1), x <= genType(0)); + //} + } + + VECTORIZE_VEC(roundEven) + + // ceil + template + GLM_FUNC_QUALIFIER genType ceil(genType const & x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'ceil' only accept floating-point inputs"); + + return ::std::ceil(x); + } + + VECTORIZE_VEC(ceil) + + // fract + template + GLM_FUNC_QUALIFIER genType fract + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'fract' only accept floating-point inputs"); + + return x - ::std::floor(x); + } + + VECTORIZE_VEC(fract) + + // mod + template + GLM_FUNC_QUALIFIER genType mod + ( + genType const & x, + genType const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mod' only accept floating-point inputs"); + + return x - y * floor(x / y); + } + + VECTORIZE_VEC_SCA(mod) + VECTORIZE_VEC_VEC(mod) + + // modf + template + GLM_FUNC_QUALIFIER genType modf + ( + genType const & x, + genType & i + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'modf' only accept floating-point inputs"); + + return std::modf(x, &i); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 modf + ( + detail::tvec2 const & x, + detail::tvec2 & i + ) + { + return detail::tvec2( + modf(x.x, i.x), + modf(x.y, i.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 modf + ( + detail::tvec3 const & x, + detail::tvec3 & i + ) + { + return detail::tvec3( + modf(x.x, i.x), + modf(x.y, i.y), + modf(x.z, i.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 modf + ( + detail::tvec4 const & x, + detail::tvec4 & i + ) + { + return detail::tvec4( + modf(x.x, i.x), + modf(x.y, i.y), + modf(x.z, i.z), + modf(x.w, i.w)); + } + + //// Only valid if (INT_MIN <= x-y <= INT_MAX) + //// min(x,y) + //r = y + ((x - y) & ((x - y) >> (sizeof(int) * + //CHAR_BIT – 1))); + //// max(x,y) + //r = x - ((x - y) & ((x - y) >> (sizeof(int) * + //CHAR_BIT - 1))); + + // min + template + GLM_FUNC_QUALIFIER genType min + ( + genType const & x, + genType const & y + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int || + detail::type::is_uint, "'min' only accept numbers"); + + return x < y ? x : y; + } + + VECTORIZE_VEC_SCA(min) + VECTORIZE_VEC_VEC(min) + + // max + template + GLM_FUNC_QUALIFIER genType max + ( + genType const & x, + genType const & y + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int || + detail::type::is_uint, "'max' only accept numbers"); + + return x > y ? x : y; + } + + VECTORIZE_VEC_SCA(max) + VECTORIZE_VEC_VEC(max) + + // clamp + template + GLM_FUNC_QUALIFIER valType clamp + ( + valType const & x, + valType const & minVal, + valType const & maxVal + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int || + detail::type::is_uint, "'clamp' only accept numbers"); + + return min(maxVal, max(minVal, x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 clamp + ( + detail::tvec2 const & x, + typename detail::tvec2::value_type const & minVal, + typename detail::tvec2::value_type const & maxVal + ) + { + return detail::tvec2( + clamp(x.x, minVal, maxVal), + clamp(x.y, minVal, maxVal)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 clamp + ( + detail::tvec3 const & x, + typename detail::tvec3::value_type const & minVal, + typename detail::tvec3::value_type const & maxVal + ) + { + return detail::tvec3( + clamp(x.x, minVal, maxVal), + clamp(x.y, minVal, maxVal), + clamp(x.z, minVal, maxVal)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 clamp + ( + detail::tvec4 const & x, + typename detail::tvec4::value_type const & minVal, + typename detail::tvec4::value_type const & maxVal + ) + { + return detail::tvec4( + clamp(x.x, minVal, maxVal), + clamp(x.y, minVal, maxVal), + clamp(x.z, minVal, maxVal), + clamp(x.w, minVal, maxVal)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 clamp + ( + detail::tvec2 const & x, + detail::tvec2 const & minVal, + detail::tvec2 const & maxVal + ) + { + return detail::tvec2( + clamp(x.x, minVal.x, maxVal.x), + clamp(x.y, minVal.y, maxVal.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 clamp + ( + detail::tvec3 const & x, + detail::tvec3 const & minVal, + detail::tvec3 const & maxVal + ) + { + return detail::tvec3( + clamp(x.x, minVal.x, maxVal.x), + clamp(x.y, minVal.y, maxVal.y), + clamp(x.z, minVal.z, maxVal.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 clamp + ( + detail::tvec4 const & x, + detail::tvec4 const & minVal, + detail::tvec4 const & maxVal + ) + { + return detail::tvec4( + clamp(x.x, minVal.x, maxVal.x), + clamp(x.y, minVal.y, maxVal.y), + clamp(x.z, minVal.z, maxVal.z), + clamp(x.w, minVal.w, maxVal.w)); + } + + // mix + template + GLM_FUNC_QUALIFIER genTypeT mix + ( + genTypeT const & x, + genTypeT const & y, + genTypeU const & a + ) + { + // It could be a vector too + //GLM_STATIC_ASSERT( + // detail::type::is_float && + // detail::type::is_float); + + //return x + a * (y - x); + return genTypeT(genTypeU(x) + a * genTypeU(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 mix + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + valTypeB const & a + ) + { + return detail::tvec2( + detail::tvec2(x) + a * detail::tvec2(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 mix + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + valTypeB const & a + ) + { + return detail::tvec3( + detail::tvec3(x) + a * detail::tvec3(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 mix + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + valTypeB const & a + ) + { + return detail::tvec4( + detail::tvec4(x) + a * detail::tvec4(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 mix + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 const & a + ) + { + return detail::tvec2( + detail::tvec2(x) + a * detail::tvec2(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 mix + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 const & a + ) + { + return detail::tvec3( + detail::tvec3(x) + a * detail::tvec3(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 mix + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 const & a + ) + { + return detail::tvec4( + detail::tvec4(x) + a * detail::tvec4(y - x)); + } + + //template + //GLM_FUNC_QUALIFIER genTypeT mix + //( + // genTypeT const & x, + // genTypeT const & y, + // float const & a + //) + //{ + // // It could be a vector too + // //GLM_STATIC_ASSERT( + // // detail::type::is_float && + // // detail::type::is_float); + + // return x + a * (y - x); + //} + + template + GLM_FUNC_QUALIFIER genType mix + ( + genType const & x, + genType const & y, + bool const & a + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); + + return a ? y : x; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 mix + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + typename detail::tvec2::bool_type a + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); + + detail::tvec2 result; + for + ( + typename detail::tvec2::size_type i = 0; + i < detail::tvec2::value_size(); + ++i + ) + { + result[i] = a[i] ? y[i] : x[i]; + } + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 mix + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + typename detail::tvec3::bool_type a + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); + + detail::tvec3 result; + for + ( + typename detail::tvec3::size_type i = 0; + i < detail::tvec3::value_size(); + ++i + ) + { + result[i] = a[i] ? y[i] : x[i]; + } + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 mix + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + typename detail::tvec4::bool_type a + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); + + detail::tvec4 result; + for + ( + typename detail::tvec4::size_type i = 0; + i < detail::tvec4::value_size(); + ++i + ) + { + result[i] = a[i] ? y[i] : x[i]; + } + return result; + } + + // step + template + GLM_FUNC_QUALIFIER genType step + ( + genType const & edge, + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'step' only accept floating-point inputs"); + + return x < edge ? genType(0) : genType(1); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 step + ( + typename detail::tvec2::value_type const & edge, + detail::tvec2 const & x + ) + { + return detail::tvec2( + x.x < edge ? T(0) : T(1), + x.y < edge ? T(0) : T(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 step + ( + typename detail::tvec3::value_type const & edge, + detail::tvec3 const & x + ) + { + return detail::tvec3( + x.x < edge ? T(0) : T(1), + x.y < edge ? T(0) : T(1), + x.z < edge ? T(0) : T(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 step + ( + typename detail::tvec4::value_type const & edge, + detail::tvec4 const & x + ) + { + return detail::tvec4( + x.x < edge ? T(0) : T(1), + x.y < edge ? T(0) : T(1), + x.z < edge ? T(0) : T(1), + x.w < edge ? T(0) : T(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 step + ( + detail::tvec2 const & edge, + detail::tvec2 const & x + ) + { + return detail::tvec2( + x.x < edge.x ? T(0) : T(1), + x.y < edge.y ? T(0) : T(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 step + ( + detail::tvec3 const & edge, + detail::tvec3 const & x + ) + { + return detail::tvec3( + x.x < edge.x ? T(0) : T(1), + x.y < edge.y ? T(0) : T(1), + x.z < edge.z ? T(0) : T(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 step + ( + detail::tvec4 const & edge, + detail::tvec4 const & x + ) + { + return detail::tvec4( + x.x < edge.x ? T(0) : T(1), + x.y < edge.y ? T(0) : T(1), + x.z < edge.z ? T(0) : T(1), + x.w < edge.w ? T(0) : T(1)); + } + + // smoothstep + template + GLM_FUNC_QUALIFIER genType smoothstep + ( + genType const & edge0, + genType const & edge1, + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'smoothstep' only accept floating-point inputs"); + + genType tmp = clamp((x - edge0) / (edge1 - edge0), genType(0), genType(1)); + return tmp * tmp * (genType(3) - genType(2) * tmp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 smoothstep + ( + typename detail::tvec2::value_type const & edge0, + typename detail::tvec2::value_type const & edge1, + detail::tvec2 const & x + ) + { + return detail::tvec2( + smoothstep(edge0, edge1, x.x), + smoothstep(edge0, edge1, x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 smoothstep + ( + typename detail::tvec3::value_type const & edge0, + typename detail::tvec3::value_type const & edge1, + detail::tvec3 const & x + ) + { + return detail::tvec3( + smoothstep(edge0, edge1, x.x), + smoothstep(edge0, edge1, x.y), + smoothstep(edge0, edge1, x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 smoothstep + ( + typename detail::tvec4::value_type const & edge0, + typename detail::tvec4::value_type const & edge1, + detail::tvec4 const & x + ) + { + return detail::tvec4( + smoothstep(edge0, edge1, x.x), + smoothstep(edge0, edge1, x.y), + smoothstep(edge0, edge1, x.z), + smoothstep(edge0, edge1, x.w)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 smoothstep + ( + detail::tvec2 const & edge0, + detail::tvec2 const & edge1, + detail::tvec2 const & x + ) + { + return detail::tvec2( + smoothstep(edge0.x, edge1.x, x.x), + smoothstep(edge0.y, edge1.y, x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 smoothstep + ( + detail::tvec3 const & edge0, + detail::tvec3 const & edge1, + detail::tvec3 const & x + ) + { + return detail::tvec3( + smoothstep(edge0.x, edge1.x, x.x), + smoothstep(edge0.y, edge1.y, x.y), + smoothstep(edge0.z, edge1.z, x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 smoothstep + ( + detail::tvec4 const & edge0, + detail::tvec4 const & edge1, + detail::tvec4 const & x + ) + { + return detail::tvec4( + smoothstep(edge0.x, edge1.x, x.x), + smoothstep(edge0.y, edge1.y, x.y), + smoothstep(edge0.z, edge1.z, x.z), + smoothstep(edge0.w, edge1.w, x.w)); + } + + // TODO: Not working on MinGW... + template + GLM_FUNC_QUALIFIER bool isnan(genType const & x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'isnan' only accept floating-point inputs"); + +# if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL)) + return _isnan(x) != 0; +# elif(GLM_COMPILER & GLM_COMPILER_GCC) +# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) + return _isnan(x) != 0; +# else + return std::isnan(x); +# endif +# else + return std::isnan(x); +# endif + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec2::bool_type isnan + ( + detail::tvec2 const & x + ) + { + return typename detail::tvec2::bool_type( + isnan(x.x), + isnan(x.y)); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec3::bool_type isnan + ( + detail::tvec3 const & x + ) + { + return typename detail::tvec3::bool_type( + isnan(x.x), + isnan(x.y), + isnan(x.z)); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec4::bool_type isnan + ( + detail::tvec4 const & x + ) + { + return typename detail::tvec4::bool_type( + isnan(x.x), + isnan(x.y), + isnan(x.z), + isnan(x.w)); + } + + template + GLM_FUNC_QUALIFIER bool isinf( + genType const & x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'isinf' only accept floating-point inputs"); + +# if(GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC)) + return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF; +# elif(GLM_COMPILER & GLM_COMPILER_GCC) +# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) + return _isinf(x) != 0; +# else + return std::isinf(x); +# endif +# else + return std::isinf(x); +# endif +/* +# if(GLM_COMPILER & GLM_COMPILER_VC) + return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF; +# elif(GLM_COMPILER & GLM_COMPILER_GCC) +# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) + return _isinf(x) != 0; +# else + return std::isinf(x); +# endif +# elif(GLM_COMPILER & GLM_COMPILER_INTEL) + return isinf(x) != 0; +# else + return std::isinf(x); +# endif +*/ + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec2::bool_type isinf + ( + detail::tvec2 const & x + ) + { + return typename detail::tvec2::bool_type( + isinf(x.x), + isinf(x.y)); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec3::bool_type isinf + ( + detail::tvec3 const & x + ) + { + return typename detail::tvec3::bool_type( + isinf(x.x), + isinf(x.y), + isinf(x.z)); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec4::bool_type isinf + ( + detail::tvec4 const & x + ) + { + return typename detail::tvec4::bool_type( + isinf(x.x), + isinf(x.y), + isinf(x.z), + isinf(x.w)); + } + + GLM_FUNC_QUALIFIER int floatBitsToInt(float const & value) + { + union + { + float f; + int i; + } fi; + + fi.f = value; + return fi.i; + } + + GLM_FUNC_QUALIFIER detail::tvec2 floatBitsToInt + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + floatBitsToInt(value.x), + floatBitsToInt(value.y)); + } + + GLM_FUNC_QUALIFIER detail::tvec3 floatBitsToInt + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + floatBitsToInt(value.x), + floatBitsToInt(value.y), + floatBitsToInt(value.z)); + } + + GLM_FUNC_QUALIFIER detail::tvec4 floatBitsToInt + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + floatBitsToInt(value.x), + floatBitsToInt(value.y), + floatBitsToInt(value.z), + floatBitsToInt(value.w)); + } + + GLM_FUNC_QUALIFIER uint floatBitsToUint(float const & value) + { + union + { + float f; + uint u; + } fu; + + fu.f = value; + return fu.u; + } + + GLM_FUNC_QUALIFIER detail::tvec2 floatBitsToUint + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + floatBitsToUint(value.x), + floatBitsToUint(value.y)); + } + + GLM_FUNC_QUALIFIER detail::tvec3 floatBitsToUint + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + floatBitsToUint(value.x), + floatBitsToUint(value.y), + floatBitsToUint(value.z)); + } + + GLM_FUNC_QUALIFIER detail::tvec4 floatBitsToUint + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + floatBitsToUint(value.x), + floatBitsToUint(value.y), + floatBitsToUint(value.z), + floatBitsToUint(value.w)); + } + + GLM_FUNC_QUALIFIER float intBitsToFloat(int const & value) + { + union + { + float f; + int i; + } fi; + + fi.i = value; + return fi.f; + } + + GLM_FUNC_QUALIFIER detail::tvec2 intBitsToFloat + + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + intBitsToFloat(value.x), + intBitsToFloat(value.y)); + } + + GLM_FUNC_QUALIFIER detail::tvec3 intBitsToFloat + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + intBitsToFloat(value.x), + intBitsToFloat(value.y), + intBitsToFloat(value.z)); + } + + GLM_FUNC_QUALIFIER detail::tvec4 intBitsToFloat + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + intBitsToFloat(value.x), + intBitsToFloat(value.y), + intBitsToFloat(value.z), + intBitsToFloat(value.w)); + } + + GLM_FUNC_QUALIFIER float uintBitsToFloat(uint const & value) + { + union + { + float f; + uint u; + } fu; + + fu.u = value; + return fu.f; + } + + GLM_FUNC_QUALIFIER detail::tvec2 uintBitsToFloat + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + uintBitsToFloat(value.x), + uintBitsToFloat(value.y)); + } + + GLM_FUNC_QUALIFIER detail::tvec3 uintBitsToFloat + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + uintBitsToFloat(value.x), + uintBitsToFloat(value.y), + uintBitsToFloat(value.z)); + } + + GLM_FUNC_QUALIFIER detail::tvec4 uintBitsToFloat + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + uintBitsToFloat(value.x), + uintBitsToFloat(value.y), + uintBitsToFloat(value.z), + uintBitsToFloat(value.w)); + } + + template + GLM_FUNC_QUALIFIER genType fma + ( + genType const & a, + genType const & b, + genType const & c + ) + { + return a * b + c; + } + + template + GLM_FUNC_QUALIFIER genType frexp + ( + genType const & x, + int & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 frexp + ( + detail::tvec2 const & x, + detail::tvec2 & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 frexp + ( + detail::tvec3 const & x, + detail::tvec3 & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 frexp + ( + detail::tvec4 const & x, + detail::tvec4 & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER genType ldexp + ( + genType const & x, + int const & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 ldexp + ( + detail::tvec2 const & x, + detail::tvec2 const & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 ldexp + ( + detail::tvec3 const & x, + detail::tvec3 const & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 ldexp + ( + detail::tvec4 const & x, + detail::tvec4 const & exp + ) + { + return std::frexp(x, exp); + } + +}//namespace glm diff --git a/include/gal/opengl/glm/core/func_exponential.hpp b/include/gal/opengl/glm/core/func_exponential.hpp new file mode 100644 index 0000000000..37910aded2 --- /dev/null +++ b/include/gal/opengl/glm/core/func_exponential.hpp @@ -0,0 +1,123 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_exponential.hpp +/// @date 2008-08-08 / 2011-06-14 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions +/// +/// @defgroup core_func_exponential Exponential functions +/// @ingroup core +/// +/// These all operate component-wise. The description is per component. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_exponential +#define glm_core_func_exponential GLM_VERSION + +namespace glm +{ + /// @addtogroup core_func_exponential + /// @{ + + /// Returns x raised to the y power. + /// + /// @param x pow function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision. + /// @param y + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL pow man page + /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions + template + genType pow(genType const & x, genType const & y); + + /// Returns the natural exponentiation of x, i.e., e^x. + /// + /// @param x exp function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision. + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL exp man page + /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions + template + genType exp(genType const & x); + + /// Returns the natural logarithm of x, i.e., + /// returns the value y which satisfies the equation x = e^y. + /// Results are undefined if x <= 0. + /// + /// @param x log function is defined for input values of x defined in the range (0, inf+) in the limit of the type precision. + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL log man page + /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions + template + genType log(genType const & x); + + /// Returns 2 raised to the x power. + /// + /// @param x exp2 function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision. + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL exp2 man page + /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions + template + genType exp2(genType const & x); + + /// Returns the base 2 log of x, i.e., returns the value y, + /// which satisfies the equation x = 2 ^ y. + /// + /// @param x log2 function is defined for input values of x defined in the range (0, inf+) in the limit of the type precision. + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL log2 man page + /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions + template + genType log2(genType const & x); + + /// Returns the positive square root of x. + /// + /// @param x sqrt function is defined for input values of x defined in the range [0, inf+) in the limit of the type precision. + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL sqrt man page + /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions + template + genType sqrt(genType const & x); + + /// Returns the reciprocal of the positive square root of x. + /// + /// @param x inversesqrt function is defined for input values of x defined in the range [0, inf+) in the limit of the type precision. + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL inversesqrt man page + /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions + template + genType inversesqrt(genType const & x); + + /// @} +}//namespace glm + +#include "func_exponential.inl" + +#endif//glm_core_func_exponential diff --git a/include/gal/opengl/glm/core/func_exponential.inl b/include/gal/opengl/glm/core/func_exponential.inl new file mode 100644 index 0000000000..9b87b9c1d5 --- /dev/null +++ b/include/gal/opengl/glm/core/func_exponential.inl @@ -0,0 +1,155 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_exponential.inl +/// @date 2008-08-03 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + // pow + template + GLM_FUNC_QUALIFIER genType pow + ( + genType const & x, + genType const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'pow' only accept floating-point input"); + + return genType(::std::pow(x, y)); + } + + VECTORIZE_VEC_VEC(pow) + + // exp + template + GLM_FUNC_QUALIFIER genType exp + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'exp' only accept floating-point input"); + + return genType(::std::exp(x)); + } + + VECTORIZE_VEC(exp) + + // log + template + GLM_FUNC_QUALIFIER genType log + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'log' only accept floating-point input"); + + return genType(::std::log(x)); + } + + VECTORIZE_VEC(log) + + //exp2, ln2 = 0.69314718055994530941723212145818f + template + GLM_FUNC_QUALIFIER genType exp2 + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'exp2' only accept floating-point input"); + + return genType(::std::exp(genType(0.69314718055994530941723212145818) * x)); + } + + VECTORIZE_VEC(exp2) + +namespace _detail +{ + template + struct _compute_log2 + { + template + T operator() (T const & Value) const; +/* + { + GLM_STATIC_ASSERT(0, "'log2' parameter has an invalid template parameter type. GLM core features only supports floating-point types, include for integer types support. Others types are not supported."); + return Value; + } +*/ + }; + + template <> + struct _compute_log2 + { + template + T operator() (T const & Value) const + { + return T(::std::log(Value)) / T(0.69314718055994530941723212145818); + } + }; + +}//namespace _detail + + // log2, ln2 = 0.69314718055994530941723212145818f + template + GLM_FUNC_QUALIFIER genType log2 + ( + genType const & x + ) + { + assert(x > genType(0)); // log2 is only defined on the range (0, inf] + return _detail::_compute_log2::ID>()(x); + } + + VECTORIZE_VEC(log2) + + // sqrt + template + GLM_FUNC_QUALIFIER genType sqrt + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'sqrt' only accept floating-point input"); + + return genType(::std::sqrt(x)); + } + + VECTORIZE_VEC(sqrt) + + template + GLM_FUNC_QUALIFIER genType inversesqrt + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'inversesqrt' only accept floating-point input"); + + return genType(1) / ::std::sqrt(x); + } + + VECTORIZE_VEC(inversesqrt) + +}//namespace glm diff --git a/include/gal/opengl/glm/core/func_geometric.hpp b/include/gal/opengl/glm/core/func_geometric.hpp new file mode 100644 index 0000000000..53757da910 --- /dev/null +++ b/include/gal/opengl/glm/core/func_geometric.hpp @@ -0,0 +1,138 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_geometric.hpp +/// @date 2008-08-03 / 2011-06-14 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions +/// +/// @defgroup core_func_geometric Geometric functions +/// @ingroup core +/// +/// These operate on vectors as vectors, not component-wise. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_geometric +#define glm_core_func_geometric GLM_VERSION + +namespace glm +{ + /// @addtogroup core_func_geometric + /// @{ + + /// Returns the length of x, i.e., sqrt(x * x). + /// + /// @tparam genType Floating-point vector types. + /// + /// @see GLSL length man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + typename genType::value_type length( + genType const & x); + + /// Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). + /// + /// @tparam genType Floating-point vector types. + /// + /// @see GLSL distance man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + typename genType::value_type distance( + genType const & p0, + genType const & p1); + + /// Returns the dot product of x and y, i.e., result = x * y. + /// + /// @tparam genType Floating-point vector types. + /// + /// @see GLSL dot man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + typename genType::value_type dot( + genType const & x, + genType const & y); + + /// Returns the cross product of x and y. + /// + /// @tparam valType Floating-point scalar types. + /// + /// @see GLSL cross man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + detail::tvec3 cross( + detail::tvec3 const & x, + detail::tvec3 const & y); + + /// Returns a vector in the same direction as x but with length of 1. + /// + /// @see GLSL normalize man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + genType normalize( + genType const & x); + + /// If dot(Nref, I) < 0.0, return N, otherwise, return -N. + /// + /// @tparam genType Floating-point vector types. + /// + /// @see GLSL faceforward man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + genType faceforward( + genType const & N, + genType const & I, + genType const & Nref); + + /// For the incident vector I and surface orientation N, + /// returns the reflection direction : result = I - 2.0 * dot(N, I) * N. + /// + /// @tparam genType Floating-point vector types. + /// + /// @see GLSL reflect man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + genType reflect( + genType const & I, + genType const & N); + + /// For the incident vector I and surface normal N, + /// and the ratio of indices of refraction eta, + /// return the refraction vector. + /// + /// @tparam genType Floating-point vector types. + /// + /// @see GLSL refract man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + genType refract( + genType const & I, + genType const & N, + typename genType::value_type const & eta); + + /// @} +}//namespace glm + +#include "func_geometric.inl" + +#endif//glm_core_func_geometric diff --git a/include/gal/opengl/glm/core/func_geometric.inl b/include/gal/opengl/glm/core/func_geometric.inl new file mode 100644 index 0000000000..9ae20f0d69 --- /dev/null +++ b/include/gal/opengl/glm/core/func_geometric.inl @@ -0,0 +1,322 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_geometric.inl +/// @date 2008-08-03 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + // length + template + GLM_FUNC_QUALIFIER genType length + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'length' only accept floating-point inputs"); + + genType sqr = x * x; + return sqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec2::value_type length + ( + detail::tvec2 const & v + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'length' only accept floating-point inputs"); + + typename detail::tvec2::value_type sqr = v.x * v.x + v.y * v.y; + return sqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec3::value_type length + ( + detail::tvec3 const & v + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'length' only accept floating-point inputs"); + + typename detail::tvec3::value_type sqr = v.x * v.x + v.y * v.y + v.z * v.z; + return sqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec4::value_type length + ( + detail::tvec4 const & v + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'length' only accept floating-point inputs"); + + typename detail::tvec4::value_type sqr = v.x * v.x + v.y * v.y + v.z * v.z + v.w * v.w; + return sqrt(sqr); + } + + // distance + template + GLM_FUNC_QUALIFIER genType distance + ( + genType const & p0, + genType const & p1 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'distance' only accept floating-point inputs"); + + return length(p1 - p0); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec2::value_type distance + ( + detail::tvec2 const & p0, + detail::tvec2 const & p1 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'distance' only accept floating-point inputs"); + + return length(p1 - p0); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec3::value_type distance + ( + detail::tvec3 const & p0, + detail::tvec3 const & p1 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'distance' only accept floating-point inputs"); + + return length(p1 - p0); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec4::value_type distance + ( + detail::tvec4 const & p0, + detail::tvec4 const & p1 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'distance' only accept floating-point inputs"); + + return length(p1 - p0); + } + + // dot + template + GLM_FUNC_QUALIFIER genType dot + ( + genType const & x, + genType const & y + + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'dot' only accept floating-point inputs"); + + return x * y; + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec2::value_type dot + ( + detail::tvec2 const & x, + detail::tvec2 const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'dot' only accept floating-point inputs"); + + return x.x * y.x + x.y * y.y; + } + + template + GLM_FUNC_QUALIFIER T dot + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'dot' only accept floating-point inputs"); + + return x.x * y.x + x.y * y.y + x.z * y.z; + } +/* // SSE3 + GLM_FUNC_QUALIFIER float dot(const tvec4& x, const tvec4& y) + { + float Result; + __asm + { + mov esi, x + mov edi, y + movaps xmm0, [esi] + mulps xmm0, [edi] + haddps( _xmm0, _xmm0 ) + haddps( _xmm0, _xmm0 ) + movss Result, xmm0 + } + return Result; + } +*/ + template + GLM_FUNC_QUALIFIER T dot + ( + detail::tvec4 const & x, + detail::tvec4 const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'dot' only accept floating-point inputs"); + + return x.x * y.x + x.y * y.y + x.z * y.z + x.w * y.w; + } + + // cross + template + GLM_FUNC_QUALIFIER detail::tvec3 cross + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'cross' only accept floating-point inputs"); + + return detail::tvec3( + x.y * y.z - y.y * x.z, + x.z * y.x - y.z * x.x, + x.x * y.y - y.x * x.y); + } + + // normalize + template + GLM_FUNC_QUALIFIER genType normalize + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'normalize' only accept floating-point inputs"); + + return x < genType(0) ? genType(-1) : genType(1); + } + + // According to issue 10 GLSL 1.10 specification, if length(x) == 0 then result is undefine and generate an error + template + GLM_FUNC_QUALIFIER detail::tvec2 normalize + ( + detail::tvec2 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'normalize' only accept floating-point inputs"); + + typename detail::tvec2::value_type sqr = x.x * x.x + x.y * x.y; + return x * inversesqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 normalize + ( + detail::tvec3 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'normalize' only accept floating-point inputs"); + + typename detail::tvec3::value_type sqr = x.x * x.x + x.y * x.y + x.z * x.z; + return x * inversesqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 normalize + ( + detail::tvec4 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'normalize' only accept floating-point inputs"); + + typename detail::tvec4::value_type sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w; + return x * inversesqrt(sqr); + } + + // faceforward + template + GLM_FUNC_QUALIFIER genType faceforward + ( + genType const & N, + genType const & I, + genType const & Nref + ) + { + return dot(Nref, I) < 0 ? N : -N; + } + + // reflect + template + genType reflect + ( + genType const & I, + genType const & N + ) + { + return I - N * dot(N, I) * genType(2); + } + + // refract + template + GLM_FUNC_QUALIFIER genType refract + ( + genType const & I, + genType const & N, + genType const & eta + ) + { + //It could be a vector + //GLM_STATIC_ASSERT(detail::type::is_float); + + genType dotValue = dot(N, I); + genType k = genType(1) - eta * eta * (genType(1) - dotValue * dotValue); + if(k < genType(0)) + return genType(0); + else + return eta * I - (eta * dotValue + sqrt(k)) * N; + } + + template + GLM_FUNC_QUALIFIER genType refract + ( + genType const & I, + genType const & N, + typename genType::value_type const & eta + ) + { + //It could be a vector + //GLM_STATIC_ASSERT(detail::type::is_float); + + typename genType::value_type dotValue = dot(N, I); + typename genType::value_type k = typename genType::value_type(1) - eta * eta * (typename genType::value_type(1) - dotValue * dotValue); + if(k < typename genType::value_type(0)) + return genType(0); + else + return eta * I - (eta * dotValue + sqrt(k)) * N; + } + +}//namespace glm diff --git a/include/gal/opengl/glm/core/func_integer.hpp b/include/gal/opengl/glm/core/func_integer.hpp new file mode 100644 index 0000000000..9541f7f3c1 --- /dev/null +++ b/include/gal/opengl/glm/core/func_integer.hpp @@ -0,0 +1,201 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_integer.hpp +/// @date 2010-03-17 / 2011-06-18 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.8 Integer Functions +/// +/// @defgroup core_func_integer Integer functions +/// @ingroup core +/// +/// These all operate component-wise. The description is per component. +/// The notation [a, b] means the set of bits from bit-number a through bit-number +/// b, inclusive. The lowest-order bit is bit 0. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_integer +#define glm_core_func_integer GLM_VERSION + +namespace glm +{ + /// @addtogroup core_func_integer + /// @{ + + /// Adds 32-bit unsigned integer x and y, returning the sum + /// modulo pow(2, 32). The value carry is set to 0 if the sum was + /// less than pow(2, 32), or to 1 otherwise. + /// + /// @tparam genUType Unsigned integer scalar or vector types. + /// + /// @see GLSL uaddCarry man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + template + genUType uaddCarry( + genUType const & x, + genUType const & y, + genUType & carry); + + /// Subtracts the 32-bit unsigned integer y from x, returning + /// the difference if non-negative, or pow(2, 32) plus the difference + /// otherwise. The value borrow is set to 0 if x >= y, or to 1 otherwise. + /// + /// @tparam genUType Unsigned integer scalar or vector types. + /// + /// @see GLSL usubBorrow man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + template + genUType usubBorrow( + genUType const & x, + genUType const & y, + genUType & borrow); + + /// Multiplies 32-bit integers x and y, producing a 64-bit + /// result. The 32 least-significant bits are returned in lsb. + /// The 32 most-significant bits are returned in msb. + /// + /// @tparam genUType Unsigned integer scalar or vector types. + /// + /// @see GLSL umulExtended man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + template + void umulExtended( + genUType const & x, + genUType const & y, + genUType & msb, + genUType & lsb); + + /// Multiplies 32-bit integers x and y, producing a 64-bit + /// result. The 32 least-significant bits are returned in lsb. + /// The 32 most-significant bits are returned in msb. + /// + /// @tparam genIType Signed integer scalar or vector types. + /// + /// @see GLSL imulExtended man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + template + void imulExtended( + genIType const & x, + genIType const & y, + genIType & msb, + genIType & lsb); + + /// Extracts bits [offset, offset + bits - 1] from value, + /// returning them in the least significant bits of the result. + /// For unsigned data types, the most significant bits of the + /// result will be set to zero. For signed data types, the + /// most significant bits will be set to the value of bit offset + base – 1. + /// + /// If bits is zero, the result will be zero. The result will be + /// undefined if offset or bits is negative, or if the sum of + /// offset and bits is greater than the number of bits used + /// to store the operand. + /// + /// @tparam genIUType Signed or unsigned integer scalar or vector types. + /// + /// @see GLSL bitfieldExtract man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + template + genIUType bitfieldExtract( + genIUType const & Value, + int const & Offset, + int const & Bits); + + /// Returns the insertion the bits least-significant bits of insert into base. + /// + /// The result will have bits [offset, offset + bits - 1] taken + /// from bits [0, bits – 1] of insert, and all other bits taken + /// directly from the corresponding bits of base. If bits is + /// zero, the result will simply be base. The result will be + /// undefined if offset or bits is negative, or if the sum of + /// offset and bits is greater than the number of bits used to + /// store the operand. + /// + /// @tparam genIUType Signed or unsigned integer scalar or vector types. + /// + /// @see GLSL bitfieldInsert man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + template + genIUType bitfieldInsert( + genIUType const & Base, + genIUType const & Insert, + int const & Offset, + int const & Bits); + + /// Returns the reversal of the bits of value. + /// The bit numbered n of the result will be taken from bit (bits - 1) - n of value, + /// where bits is the total number of bits used to represent value. + /// + /// @tparam genIUType Signed or unsigned integer scalar or vector types. + /// + /// @see GLSL bitfieldReverse man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + template + genIUType bitfieldReverse(genIUType const & Value); + + /// Returns the number of bits set to 1 in the binary representation of value. + /// + /// @tparam genIUType Signed or unsigned integer scalar or vector types. + /// + /// @see GLSL bitCount man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + /// + /// @todo Clarify the declaration to specify that scalars are suported. + template class genIUType> + typename genIUType::signed_type bitCount(genIUType const & Value); + + /// Returns the bit number of the least significant bit set to + /// 1 in the binary representation of value. + /// If value is zero, -1 will be returned. + /// + /// @tparam genIUType Signed or unsigned integer scalar or vector types. + /// + /// @see GLSL findLSB man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + /// + /// @todo Clarify the declaration to specify that scalars are suported. + template class genIUType> + typename genIUType::signed_type findLSB(genIUType const & Value); + + /// Returns the bit number of the most significant bit in the binary representation of value. + /// For positive integers, the result will be the bit number of the most significant bit set to 1. + /// For negative integers, the result will be the bit number of the most significant + /// bit set to 0. For a value of zero or negative one, -1 will be returned. + /// + /// @tparam genIUType Signed or unsigned integer scalar or vector types. + /// + /// @see GLSL findMSB man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + /// + /// @todo Clarify the declaration to specify that scalars are suported. + template class genIUType> + typename genIUType::signed_type findMSB(genIUType const & Value); + + /// @} +}//namespace glm + +#include "func_integer.inl" + +#endif//glm_core_func_integer + diff --git a/include/gal/opengl/glm/core/func_integer.inl b/include/gal/opengl/glm/core/func_integer.inl new file mode 100644 index 0000000000..4964526e9e --- /dev/null +++ b/include/gal/opengl/glm/core/func_integer.inl @@ -0,0 +1,646 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_integer.inl +/// @date 2010-03-17 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#if(GLM_COMPILER & GLM_COMPILER_VC) +#include +#pragma intrinsic(_BitScanReverse) +#endif + +namespace glm +{ + // uaddCarry + template + GLM_FUNC_QUALIFIER genUType uaddCarry + ( + genUType const & x, + genUType const & y, + genUType & Carry + ) + { + detail::highp_uint_t Value64 = detail::highp_uint_t(x) + detail::highp_uint_t(y); + genUType Result = genUType(Value64 % (detail::highp_uint_t(1) << detail::highp_uint_t(32))); + Carry = (Value64 % (detail::highp_uint_t(1) << detail::highp_uint_t(32))) > 1 ? 1 : 0; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 uaddCarry + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 & Carry + ) + { + return detail::tvec2( + uaddCarry(x[0], y[0], Carry[0]), + uaddCarry(x[1], y[1], Carry[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 uaddCarry + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 & Carry + ) + { + return detail::tvec3( + uaddCarry(x[0], y[0], Carry[0]), + uaddCarry(x[1], y[1], Carry[1]), + uaddCarry(x[2], y[2], Carry[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 uaddCarry + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 & Carry + ) + { + return detail::tvec4( + uaddCarry(x[0], y[0], Carry[0]), + uaddCarry(x[1], y[1], Carry[1]), + uaddCarry(x[2], y[2], Carry[2]), + uaddCarry(x[3], y[3], Carry[3])); + } + + // usubBorrow + template + GLM_FUNC_QUALIFIER genUType usubBorrow + ( + genUType const & x, + genUType const & y, + genUType & Borrow + ) + { + Borrow = x >= y ? 0 : 1; + if(x > y) + return genUType(detail::highp_int_t(x) - detail::highp_int_t(y)); + else + return genUType(detail::highp_int_t(1) << detail::highp_int_t(32) + detail::highp_int_t(x) - detail::highp_int_t(y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 usubBorrow + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 & Borrow + ) + { + return detail::tvec2( + usubBorrow(x[0], y[0], Borrow[0]), + usubBorrow(x[1], y[1], Borrow[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 usubBorrow + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 & Borrow + ) + { + return detail::tvec3( + usubBorrow(x[0], y[0], Borrow[0]), + usubBorrow(x[1], y[1], Borrow[1]), + usubBorrow(x[2], y[2], Borrow[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 usubBorrow + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 & Borrow + ) + { + return detail::tvec4( + usubBorrow(x[0], y[0], Borrow[0]), + usubBorrow(x[1], y[1], Borrow[1]), + usubBorrow(x[2], y[2], Borrow[2]), + usubBorrow(x[3], y[3], Borrow[3])); + } + + // umulExtended + template + GLM_FUNC_QUALIFIER void umulExtended + ( + genUType const & x, + genUType const & y, + genUType & msb, + genUType & lsb + ) + { + detail::highp_uint_t ValueX64 = x; + detail::highp_uint_t ValueY64 = y; + detail::highp_uint_t Value64 = ValueX64 * ValueY64; + msb = *(genUType*)&genUType(Value64 & ((detail::highp_uint_t(1) << detail::highp_uint_t(32)) - detail::highp_uint_t(1))); + lsb = *(genUType*)&genUType(Value64 >> detail::highp_uint_t(32)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 umulExtended + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 & msb, + detail::tvec2 & lsb + ) + { + return detail::tvec2( + umulExtended(x[0], y[0], msb, lsb), + umulExtended(x[1], y[1], msb, lsb)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 umulExtended + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 & msb, + detail::tvec3 & lsb + ) + { + return detail::tvec3( + umulExtended(x[0], y[0], msb, lsb), + umulExtended(x[1], y[1], msb, lsb), + umulExtended(x[2], y[2], msb, lsb)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 umulExtended + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 & msb, + detail::tvec4 & lsb + ) + { + return detail::tvec4( + umulExtended(x[0], y[0], msb, lsb), + umulExtended(x[1], y[1], msb, lsb), + umulExtended(x[2], y[2], msb, lsb), + umulExtended(x[3], y[3], msb, lsb)); + } + + // imulExtended + template + GLM_FUNC_QUALIFIER void imulExtended + ( + genIType const & x, + genIType const & y, + genIType & msb, + genIType & lsb + ) + { + detail::highp_int_t ValueX64 = x; + detail::highp_int_t ValueY64 = y; + detail::highp_int_t Value64 = ValueX64 * ValueY64; + msb = *(genIType*)&genIType(Value64 & ((detail::highp_uint_t(1) << detail::highp_uint_t(32)) - detail::highp_uint_t(1))); + lsb = *(genIType*)&genIType(Value64 >> detail::highp_uint_t(32)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 imulExtended + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 & msb, + detail::tvec2 & lsb + ) + { + return detail::tvec2( + imulExtended(x[0], y[0], msb, lsb), + imulExtended(x[1], y[1], msb, lsb)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 imulExtended + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 & msb, + detail::tvec3 & lsb + ) + { + return detail::tvec3( + imulExtended(x[0], y[0], msb, lsb), + imulExtended(x[1], y[1], msb, lsb), + imulExtended(x[2], y[2], msb, lsb)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 imulExtended + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 & msb, + detail::tvec4 & lsb + ) + { + return detail::tvec4( + imulExtended(x[0], y[0], msb, lsb), + imulExtended(x[1], y[1], msb, lsb), + imulExtended(x[2], y[2], msb, lsb), + imulExtended(x[3], y[3], msb, lsb)); + } + + // bitfieldExtract + template + GLM_FUNC_QUALIFIER genIUType bitfieldExtract + ( + genIUType const & Value, + int const & Offset, + int const & Bits + ) + { + int GenSize = int(sizeof(genIUType)) << int(3); + + assert(Offset + Bits <= GenSize); + + genIUType ShiftLeft = Bits ? Value << (GenSize - (Bits + Offset)) : genIUType(0); + genIUType ShiftBack = ShiftLeft >> genIUType(GenSize - Bits); + + return ShiftBack; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 bitfieldExtract + ( + detail::tvec2 const & Value, + int const & Offset, + int const & Bits + ) + { + return detail::tvec2( + bitfieldExtract(Value[0], Offset, Bits), + bitfieldExtract(Value[1], Offset, Bits)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 bitfieldExtract + ( + detail::tvec3 const & Value, + int const & Offset, + int const & Bits + ) + { + return detail::tvec3( + bitfieldExtract(Value[0], Offset, Bits), + bitfieldExtract(Value[1], Offset, Bits), + bitfieldExtract(Value[2], Offset, Bits)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 bitfieldExtract + ( + detail::tvec4 const & Value, + int const & Offset, + int const & Bits + ) + { + return detail::tvec4( + bitfieldExtract(Value[0], Offset, Bits), + bitfieldExtract(Value[1], Offset, Bits), + bitfieldExtract(Value[2], Offset, Bits), + bitfieldExtract(Value[3], Offset, Bits)); + } + + // bitfieldInsert + template + GLM_FUNC_QUALIFIER genIUType bitfieldInsert + ( + genIUType const & Base, + genIUType const & Insert, + int const & Offset, + int const & Bits + ) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitfieldInsert' only accept integer values"); + assert(Offset + Bits <= sizeof(genIUType)); + + if(Bits == 0) + return Base; + + genIUType Mask = 0; + for(int Bit = Offset; Bit < Offset + Bits; ++Bit) + Mask |= (1 << Bit); + + return (Base & ~Mask) | (Insert & Mask); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 bitfieldInsert + ( + detail::tvec2 const & Base, + detail::tvec2 const & Insert, + int const & Offset, + int const & Bits + ) + { + return detail::tvec2( + bitfieldInsert(Base[0], Insert[0], Offset, Bits), + bitfieldInsert(Base[1], Insert[1], Offset, Bits)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 bitfieldInsert + ( + detail::tvec3 const & Base, + detail::tvec3 const & Insert, + int const & Offset, + int const & Bits + ) + { + return detail::tvec3( + bitfieldInsert(Base[0], Insert[0], Offset, Bits), + bitfieldInsert(Base[1], Insert[1], Offset, Bits), + bitfieldInsert(Base[2], Insert[2], Offset, Bits)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 bitfieldInsert + ( + detail::tvec4 const & Base, + detail::tvec4 const & Insert, + int const & Offset, + int const & Bits + ) + { + return detail::tvec4( + bitfieldInsert(Base[0], Insert[0], Offset, Bits), + bitfieldInsert(Base[1], Insert[1], Offset, Bits), + bitfieldInsert(Base[2], Insert[2], Offset, Bits), + bitfieldInsert(Base[3], Insert[3], Offset, Bits)); + } + + // bitfieldReverse + template + GLM_FUNC_QUALIFIER genIUType bitfieldReverse(genIUType const & Value) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitfieldReverse' only accept integer values"); + + genIUType Out = 0; + std::size_t BitSize = sizeof(genIUType) * 8; + for(std::size_t i = 0; i < BitSize; ++i) + if(Value & (genIUType(1) << i)) + Out |= genIUType(1) << (BitSize - 1 - i); + return Out; + } + + VECTORIZE_VEC(bitfieldReverse) + + // bitCount + template + GLM_FUNC_QUALIFIER int bitCount(genIUType const & Value) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitCount' only accept integer values"); + + int Count = 0; + for(std::size_t i = 0; i < sizeof(genIUType) * std::size_t(8); ++i) + { + if(Value & (1 << i)) + ++Count; + } + return Count; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 bitCount + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + bitCount(value[0]), + bitCount(value[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 bitCount + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + bitCount(value[0]), + bitCount(value[1]), + bitCount(value[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 bitCount + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + bitCount(value[0]), + bitCount(value[1]), + bitCount(value[2]), + bitCount(value[3])); + } + + // findLSB + template + GLM_FUNC_QUALIFIER int findLSB + ( + genIUType const & Value + ) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'findLSB' only accept integer values"); + if(Value == 0) + return -1; + + genIUType Bit; + for(Bit = genIUType(0); !(Value & (1 << Bit)); ++Bit){} + return Bit; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 findLSB + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + findLSB(value[0]), + findLSB(value[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 findLSB + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + findLSB(value[0]), + findLSB(value[1]), + findLSB(value[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 findLSB + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + findLSB(value[0]), + findLSB(value[1]), + findLSB(value[2]), + findLSB(value[3])); + } + + // findMSB +/* +#if((GLM_ARCH != GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_VC)) + + template + GLM_FUNC_QUALIFIER int findMSB + ( + genIUType const & Value + ) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'findMSB' only accept integer values"); + if(Value == 0) + return -1; + + unsigned long Result(0); + _BitScanReverse(&Result, Value); + return int(Result); + } + +// __builtin_clz seems to be buggy as it crasks for some values, from 0x00200000 to 80000000 +#elif((GLM_ARCH != GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC40)) + + template + GLM_FUNC_QUALIFIER int findMSB + ( + genIUType const & Value + ) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'findMSB' only accept integer values"); + if(Value == 0) + return -1; + + // clz returns the number or trailing 0-bits; see + // http://gcc.gnu.org/onlinedocs/gcc-4.7.1/gcc/Other-Builtins.html + // + // NoteBecause __builtin_clz only works for unsigned ints, this + // implementation will not work for 64-bit integers. + // + return 31 - __builtin_clzl(Value); + } +#else +*/ +/* SSE implementation idea + + __m128i const Zero = _mm_set_epi32( 0, 0, 0, 0); + __m128i const One = _mm_set_epi32( 1, 1, 1, 1); + __m128i Bit = _mm_set_epi32(-1, -1, -1, -1); + __m128i Tmp = _mm_set_epi32(Value, Value, Value, Value); + __m128i Mmi = Zero; + for(int i = 0; i < 32; ++i) + { + __m128i Shilt = _mm_and_si128(_mm_cmpgt_epi32(Tmp, One), One); + Tmp = _mm_srai_epi32(Tmp, One); + Bit = _mm_add_epi32(Bit, _mm_and_si128(Shilt, i)); + Mmi = _mm_and_si128(Mmi, One); + } + return Bit; + +*/ + + template + GLM_FUNC_QUALIFIER int findMSB + ( + genIUType const & Value + ) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'findMSB' only accept integer values"); + + if(Value == genIUType(0) || Value == genIUType(-1)) + return -1; + else if(Value > 0) + { + genIUType Bit = genIUType(-1); + for(genIUType tmp = Value; tmp > 0; tmp >>= 1, ++Bit){} + return Bit; + } + else //if(Value < 0) + { + int const BitCount(sizeof(genIUType) * 8); + int MostSignificantBit(-1); + for(int BitIndex(0); BitIndex < BitCount; ++BitIndex) + MostSignificantBit = (Value & (1 << BitIndex)) ? MostSignificantBit : BitIndex; + assert(MostSignificantBit >= 0); + return MostSignificantBit; + } + } +//#endif//(GLM_COMPILER) + + template + GLM_FUNC_QUALIFIER detail::tvec2 findMSB + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + findMSB(value[0]), + findMSB(value[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 findMSB + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + findMSB(value[0]), + findMSB(value[1]), + findMSB(value[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 findMSB + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + findMSB(value[0]), + findMSB(value[1]), + findMSB(value[2]), + findMSB(value[3])); + } +}//namespace glm diff --git a/include/gal/opengl/glm/core/func_matrix.hpp b/include/gal/opengl/glm/core/func_matrix.hpp new file mode 100644 index 0000000000..c0338aa07d --- /dev/null +++ b/include/gal/opengl/glm/core/func_matrix.hpp @@ -0,0 +1,150 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_matrix.hpp +/// @date 2008-08-03 / 2011-06-15 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions +/// +/// @defgroup core_func_matrix Matrix functions +/// @ingroup core +/// +/// For each of the following built-in matrix functions, there is both a +/// single-precision floating point version, where all arguments and return values +/// are single precision, and a double-precision floating version, where all +/// arguments and return values are double precision. Only the single-precision +/// floating point version is shown. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_CORE_func_matrix +#define GLM_CORE_func_matrix GLM_VERSION + +namespace glm +{ + /// @addtogroup core_func_matrix + /// @{ + + /// Multiply matrix x by matrix y component-wise, i.e., + /// result[i][j] is the scalar product of x[i][j] and y[i][j]. + /// + /// @tparam matType Floating-point matrix types. + /// + /// @see GLSL matrixCompMult man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + matType matrixCompMult( + matType const & x, + matType const & y); + + /// Treats the first parameter c as a column vector + /// and the second parameter r as a row vector + /// and does a linear algebraic matrix multiply c * r. + /// + /// @tparam matType Floating-point matrix types. + /// + /// @see GLSL outerProduct man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + /// + /// @todo Clarify the declaration to specify that matType doesn't have to be provided when used. + template + matType outerProduct( + vecType const & c, + vecType const & r); + + /// Returns the transposed matrix of x + /// + /// @tparam matType Floating-point matrix types. + /// + /// @see GLSL transpose man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + typename matType::transpose_type transpose( + matType const & x); + + /// Return the determinant of a mat2 matrix. + /// + /// @tparam valType Floating-point scalar types. + /// + /// @see GLSL determinant man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + typename detail::tmat2x2::value_type determinant( + detail::tmat2x2 const & m); + + /// Return the determinant of a mat3 matrix. + /// + /// @tparam valType Floating-point scalar types. + /// + /// @see GLSL determinant man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + typename detail::tmat3x3::value_type determinant( + detail::tmat3x3 const & m); + + /// Return the determinant of a mat4 matrix. + /// + /// @tparam valType Floating-point scalar types. + /// + /// @see GLSL determinant man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + typename detail::tmat4x4::value_type determinant( + detail::tmat4x4 const & m); + + /// Return the inverse of a mat2 matrix. + /// + /// @tparam valType Floating-point scalar types. + /// + /// @see GLSL inverse man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + detail::tmat2x2 inverse( + detail::tmat2x2 const & m); + + /// Return the inverse of a mat3 matrix. + /// + /// @tparam valType Floating-point scalar types. + /// + /// @see GLSL inverse man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + detail::tmat3x3 inverse( + detail::tmat3x3 const & m); + + /// Return the inverse of a mat4 matrix. + /// + /// @tparam valType Floating-point scalar types. + /// + /// @see GLSL inverse man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + detail::tmat4x4 inverse( + detail::tmat4x4 const & m); + + /// @} +}//namespace glm + +#include "func_matrix.inl" + +#endif//GLM_CORE_func_matrix diff --git a/include/gal/opengl/glm/core/func_matrix.inl b/include/gal/opengl/glm/core/func_matrix.inl new file mode 100644 index 0000000000..528379dd5f --- /dev/null +++ b/include/gal/opengl/glm/core/func_matrix.inl @@ -0,0 +1,582 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_matrix.inl +/// @date 2008-03-08 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + // matrixCompMult + template + GLM_FUNC_QUALIFIER matType matrixCompMult + ( + matType const & x, + matType const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'matrixCompMult' only accept floating-point inputs"); + + matType result(matType::null); + for(typename matType::size_type i = 0; i < matType::row_size(); ++i) + result[i] = x[i] * y[i]; + return result; + } + + // outerProduct + template + GLM_FUNC_QUALIFIER detail::tmat2x2 outerProduct + ( + detail::tvec2 const & c, + detail::tvec2 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat2x2 m(detail::tmat2x2::null); + m[0][0] = c[0] * r[0]; + m[0][1] = c[1] * r[0]; + m[1][0] = c[0] * r[1]; + m[1][1] = c[1] * r[1]; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 outerProduct + ( + detail::tvec3 const & c, + detail::tvec3 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat3x3 m(detail::tmat3x3::null); + for(typename detail::tmat3x3::size_type i(0); i < m.length(); ++i) + m[i] = c * r[i]; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 outerProduct + ( + detail::tvec4 const & c, + detail::tvec4 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat4x4 m(detail::tmat4x4::null); + for(typename detail::tmat4x4::size_type i(0); i < m.length(); ++i) + m[i] = c * r[i]; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x3 outerProduct + ( + detail::tvec3 const & c, + detail::tvec2 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat2x3 m(detail::tmat2x3::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[0][2] = c.z * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[1][2] = c.z * r.y; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x2 outerProduct + ( + detail::tvec2 const & c, + detail::tvec3 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat3x2 m(detail::tmat3x2::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[2][0] = c.x * r.z; + m[2][1] = c.y * r.z; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x4 outerProduct + ( + detail::tvec4 const & c, + detail::tvec2 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat2x4 m(detail::tmat2x4::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[0][2] = c.z * r.x; + m[0][3] = c.w * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[1][2] = c.z * r.y; + m[1][3] = c.w * r.y; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x2 outerProduct + ( + detail::tvec2 const & c, + detail::tvec4 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat4x2 m(detail::tmat4x2::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[2][0] = c.x * r.z; + m[2][1] = c.y * r.z; + m[3][0] = c.x * r.w; + m[3][1] = c.y * r.w; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x4 outerProduct + ( + detail::tvec4 const & c, + detail::tvec3 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat3x4 m(detail::tmat3x4::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[0][2] = c.z * r.x; + m[0][3] = c.w * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[1][2] = c.z * r.y; + m[1][3] = c.w * r.y; + m[2][0] = c.x * r.z; + m[2][1] = c.y * r.z; + m[2][2] = c.z * r.z; + m[2][3] = c.w * r.z; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x3 outerProduct + ( + detail::tvec3 const & c, + detail::tvec4 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat4x3 m(detail::tmat4x3::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[0][2] = c.z * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[1][2] = c.z * r.y; + m[2][0] = c.x * r.z; + m[2][1] = c.y * r.z; + m[2][2] = c.z * r.z; + m[3][0] = c.x * r.w; + m[3][1] = c.y * r.w; + m[3][2] = c.z * r.w; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x2 transpose + ( + detail::tmat2x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat2x2 result(detail::tmat2x2::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 transpose + ( + detail::tmat3x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat3x3 result(detail::tmat3x3::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[2][2] = m[2][2]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 transpose + ( + detail::tmat4x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat4x4 result(detail::tmat4x4::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[0][3] = m[3][0]; + + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + result[1][3] = m[3][1]; + + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[2][2] = m[2][2]; + result[2][3] = m[3][2]; + + result[3][0] = m[0][3]; + result[3][1] = m[1][3]; + result[3][2] = m[2][3]; + result[3][3] = m[3][3]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x3 transpose + ( + detail::tmat3x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat2x3 result(detail::tmat2x3::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x2 transpose + ( + detail::tmat2x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat3x2 result(detail::tmat3x2::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x4 transpose + ( + detail::tmat4x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat2x4 result(detail::tmat2x4::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[0][3] = m[3][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + result[1][3] = m[3][1]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x2 transpose + ( + detail::tmat2x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat4x2 result(detail::tmat4x2::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[3][0] = m[0][3]; + result[3][1] = m[1][3]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x4 transpose + ( + detail::tmat4x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat3x4 result(detail::tmat3x4::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[0][3] = m[3][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + result[1][3] = m[3][1]; + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[2][2] = m[2][2]; + result[2][3] = m[3][2]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x3 transpose + ( + detail::tmat3x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat4x3 result(detail::tmat4x3::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[2][2] = m[2][2]; + result[3][0] = m[0][3]; + result[3][1] = m[1][3]; + result[3][2] = m[2][3]; + return result; + } + + template + GLM_FUNC_QUALIFIER typename detail::tmat2x2::value_type determinant + ( + detail::tmat2x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'determinant' only accept floating-point inputs"); + + return m[0][0] * m[1][1] - m[1][0] * m[0][1]; + } + + template + GLM_FUNC_QUALIFIER typename detail::tmat3x3::value_type determinant + ( + detail::tmat3x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'determinant' only accept floating-point inputs"); + + return + + m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2]) + - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2]) + + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]); + } + + template + GLM_FUNC_QUALIFIER typename detail::tmat4x4::value_type determinant + ( + detail::tmat4x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'determinant' only accept floating-point inputs"); + + T SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3]; + T SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3]; + T SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2]; + T SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3]; + T SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2]; + T SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1]; + + detail::tvec4 DetCof( + + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02), + - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04), + + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05), + - (m[1][0] * SubFactor02 - m[1][1] * SubFactor04 + m[1][2] * SubFactor05)); + + return m[0][0] * DetCof[0] + + m[0][1] * DetCof[1] + + m[0][2] * DetCof[2] + + m[0][3] * DetCof[3]; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x2 inverse + ( + detail::tmat2x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'inverse' only accept floating-point inputs"); + + //valType Determinant = m[0][0] * m[1][1] - m[1][0] * m[0][1]; + T Determinant = determinant(m); + + detail::tmat2x2 Inverse( + + m[1][1] / Determinant, + - m[0][1] / Determinant, + - m[1][0] / Determinant, + + m[0][0] / Determinant); + + return Inverse; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 inverse + ( + detail::tmat3x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'inverse' only accept floating-point inputs"); + + //valType Determinant = m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2]) + // - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2]) + // + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]); + + T Determinant = determinant(m); + + detail::tmat3x3 Inverse(detail::tmat3x3::null); + Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]); + Inverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]); + Inverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]); + Inverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]); + Inverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]); + Inverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]); + Inverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]); + Inverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]); + Inverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]); + Inverse /= Determinant; + + return Inverse; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 inverse + ( + detail::tmat4x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'inverse' only accept floating-point inputs"); + + T Coef00 = m[2][2] * m[3][3] - m[3][2] * m[2][3]; + T Coef02 = m[1][2] * m[3][3] - m[3][2] * m[1][3]; + T Coef03 = m[1][2] * m[2][3] - m[2][2] * m[1][3]; + + T Coef04 = m[2][1] * m[3][3] - m[3][1] * m[2][3]; + T Coef06 = m[1][1] * m[3][3] - m[3][1] * m[1][3]; + T Coef07 = m[1][1] * m[2][3] - m[2][1] * m[1][3]; + + T Coef08 = m[2][1] * m[3][2] - m[3][1] * m[2][2]; + T Coef10 = m[1][1] * m[3][2] - m[3][1] * m[1][2]; + T Coef11 = m[1][1] * m[2][2] - m[2][1] * m[1][2]; + + T Coef12 = m[2][0] * m[3][3] - m[3][0] * m[2][3]; + T Coef14 = m[1][0] * m[3][3] - m[3][0] * m[1][3]; + T Coef15 = m[1][0] * m[2][3] - m[2][0] * m[1][3]; + + T Coef16 = m[2][0] * m[3][2] - m[3][0] * m[2][2]; + T Coef18 = m[1][0] * m[3][2] - m[3][0] * m[1][2]; + T Coef19 = m[1][0] * m[2][2] - m[2][0] * m[1][2]; + + T Coef20 = m[2][0] * m[3][1] - m[3][0] * m[2][1]; + T Coef22 = m[1][0] * m[3][1] - m[3][0] * m[1][1]; + T Coef23 = m[1][0] * m[2][1] - m[2][0] * m[1][1]; + + detail::tvec4 const SignA(+1, -1, +1, -1); + detail::tvec4 const SignB(-1, +1, -1, +1); + + detail::tvec4 Fac0(Coef00, Coef00, Coef02, Coef03); + detail::tvec4 Fac1(Coef04, Coef04, Coef06, Coef07); + detail::tvec4 Fac2(Coef08, Coef08, Coef10, Coef11); + detail::tvec4 Fac3(Coef12, Coef12, Coef14, Coef15); + detail::tvec4 Fac4(Coef16, Coef16, Coef18, Coef19); + detail::tvec4 Fac5(Coef20, Coef20, Coef22, Coef23); + + detail::tvec4 Vec0(m[1][0], m[0][0], m[0][0], m[0][0]); + detail::tvec4 Vec1(m[1][1], m[0][1], m[0][1], m[0][1]); + detail::tvec4 Vec2(m[1][2], m[0][2], m[0][2], m[0][2]); + detail::tvec4 Vec3(m[1][3], m[0][3], m[0][3], m[0][3]); + + detail::tvec4 Inv0 = SignA * (Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2); + detail::tvec4 Inv1 = SignB * (Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4); + detail::tvec4 Inv2 = SignA * (Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5); + detail::tvec4 Inv3 = SignB * (Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5); + + detail::tmat4x4 Inverse(Inv0, Inv1, Inv2, Inv3); + + detail::tvec4 Row0(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]); + + T Determinant = glm::dot(m[0], Row0); + + Inverse /= Determinant; + + return Inverse; + } +}//namespace glm diff --git a/include/gal/opengl/glm/core/func_noise.hpp b/include/gal/opengl/glm/core/func_noise.hpp new file mode 100644 index 0000000000..e583475305 --- /dev/null +++ b/include/gal/opengl/glm/core/func_noise.hpp @@ -0,0 +1,87 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_noise.hpp +/// @date 2008-08-01 / 2011-06-18 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.13 Noise Functions +/// +/// @defgroup core_func_noise Noise functions +/// @ingroup core +/// +/// Noise functions are stochastic functions that can be used to increase visual +/// complexity. Values returned by the following noise functions give the +/// appearance of randomness, but are not truly random. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_noise +#define glm_core_func_noise GLM_VERSION + +namespace glm +{ + /// @addtogroup core_func_noise + /// @{ + + /// Returns a 1D noise value based on the input value x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL noise1 man page + /// @see GLSL 4.20.8 specification, section 8.13 Noise Functions + template + typename genType::value_type noise1(genType const & x); + + /// Returns a 2D noise value based on the input value x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL noise2 man page + /// @see GLSL 4.20.8 specification, section 8.13 Noise Functions + template + detail::tvec2 noise2(genType const & x); + + /// Returns a 3D noise value based on the input value x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL noise3 man page + /// @see GLSL 4.20.8 specification, section 8.13 Noise Functions + template + detail::tvec3 noise3(genType const & x); + + /// Returns a 4D noise value based on the input value x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL noise4 man page + /// @see GLSL 4.20.8 specification, section 8.13 Noise Functions + template + detail::tvec4 noise4(genType const & x); + + /// @} +}//namespace glm + +#include "func_noise.inl" + +#endif//glm_core_func_noise diff --git a/include/gal/opengl/glm/core/func_noise.inl b/include/gal/opengl/glm/core/func_noise.inl new file mode 100644 index 0000000000..7a0b374817 --- /dev/null +++ b/include/gal/opengl/glm/core/func_noise.inl @@ -0,0 +1,364 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_noise.inl +/// @date 2008-08-01 / 2011-09-27 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER T noise1(T const & x) + { + return noise1(glm::detail::tvec2(x, T(0))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec2 noise2(T const & x) + { + return glm::detail::tvec2( + noise1(x + T(0.0)), + noise1(x + T(1.0))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec3 noise3(T const & x) + { + return glm::detail::tvec3( + noise1(x - T(1.0)), + noise1(x + T(0.0)), + noise1(x + T(1.0))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec4 noise4(T const & x) + { + return glm::detail::tvec4( + noise1(x - T(1.0)), + noise1(x + T(0.0)), + noise1(x + T(1.0)), + noise1(x + T(2.0))); + } + + template + GLM_FUNC_QUALIFIER T noise1(glm::detail::tvec2 const & v) + { + detail::tvec4 const C = detail::tvec4( + T( 0.211324865405187), // (3.0 - sqrt(3.0)) / 6.0 + T( 0.366025403784439), // 0.5 * (sqrt(3.0) - 1.0) + T(-0.577350269189626), // -1.0 + 2.0 * C.x + T( 0.024390243902439)); // 1.0 / 41.0 + + // First corner + detail::tvec2 i = floor(v + dot(v, detail::tvec2(C[1]))); + detail::tvec2 x0 = v - i + dot(i, detail::tvec2(C[0])); + + // Other corners + //i1.x = step( x0.y, x0.x ); // x0.x > x0.y ? 1.0 : 0.0 + //i1.y = 1.0 - i1.x; + detail::tvec2 i1 = (x0.x > x0.y) ? detail::tvec2(1, 0) : detail::tvec2(0, 1); + // x0 = x0 - 0.0 + 0.0 * C.xx ; + // x1 = x0 - i1 + 1.0 * C.xx ; + // x2 = x0 - 1.0 + 2.0 * C.xx ; + detail::tvec4 x12 = detail::tvec4(x0.x, x0.y, x0.x, x0.y) + detail::tvec4(C.x, C.x, C.z, C.z); + x12 = detail::tvec4(detail::tvec2(x12) - i1, x12.z, x12.w); + + // Permutations + i = mod(i, T(289)); // Avoid truncation effects in permutation + detail::tvec3 p = permute( + permute(i.y + detail::tvec3(T(0), i1.y, T(1))) + + i.x + detail::tvec3(T(0), i1.x, T(1))); + + detail::tvec3 m = max(T(0.5) - detail::tvec3( + dot(x0, x0), + dot(detail::tvec2(x12.x, x12.y), detail::tvec2(x12.x, x12.y)), + dot(detail::tvec2(x12.z, x12.w), detail::tvec2(x12.z, x12.w))), T(0)); + m = m * m ; + m = m * m ; + + // Gradients: 41 points uniformly over a line, mapped onto a diamond. + // The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287) + + detail::tvec3 x = T(2) * fract(p * C.w) - T(1); + detail::tvec3 h = abs(x) - T(0.5); + detail::tvec3 ox = floor(x + T(0.5)); + detail::tvec3 a0 = x - ox; + + // Normalise gradients implicitly by scaling m + // Inlined for speed: m *= taylorInvSqrt( a0*a0 + h*h ); + m *= T(1.79284291400159) - T(0.85373472095314) * (a0 * a0 + h * h); + + // Compute final noise value at P + detail::tvec3 g; + g.x = a0.x * x0.x + h.x * x0.y; + //g.yz = a0.yz * x12.xz + h.yz * x12.yw; + g.y = a0.y * x12.x + h.y * x12.y; + g.z = a0.z * x12.z + h.z * x12.w; + return T(130) * dot(m, g); + } + + template + GLM_FUNC_QUALIFIER T noise1(detail::tvec3 const & v) + { + detail::tvec2 const C(1.0 / 6.0, 1.0 / 3.0); + detail::tvec4 const D(0.0, 0.5, 1.0, 2.0); + + // First corner + detail::tvec3 i(floor(v + dot(v, detail::tvec3(C.y)))); + detail::tvec3 x0(v - i + dot(i, detail::tvec3(C.x))); + + // Other corners + detail::tvec3 g(step(detail::tvec3(x0.y, x0.z, x0.x), x0)); + detail::tvec3 l(T(1) - g); + detail::tvec3 i1(min(g, detail::tvec3(l.z, l.x, l.y))); + detail::tvec3 i2(max(g, detail::tvec3(l.z, l.x, l.y))); + + // x0 = x0 - 0.0 + 0.0 * C.xxx; + // x1 = x0 - i1 + 1.0 * C.xxx; + // x2 = x0 - i2 + 2.0 * C.xxx; + // x3 = x0 - 1.0 + 3.0 * C.xxx; + detail::tvec3 x1(x0 - i1 + C.x); + detail::tvec3 x2(x0 - i2 + C.y); // 2.0*C.x = 1/3 = C.y + detail::tvec3 x3(x0 - D.y); // -1.0+3.0*C.x = -0.5 = -D.y + + // Permutations + i = mod289(i); + detail::tvec4 p(permute(permute(permute( + i.z + detail::tvec4(T(0), i1.z, i2.z, T(1))) + + i.y + detail::tvec4(T(0), i1.y, i2.y, T(1))) + + i.x + detail::tvec4(T(0), i1.x, i2.x, T(1)))); + + // Gradients: 7x7 points over a square, mapped onto an octahedron. + // The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294) + T n_ = T(0.142857142857); // 1.0/7.0 + detail::tvec3 ns(n_ * detail::tvec3(D.w, D.y, D.z) - detail::tvec3(D.x, D.z, D.x)); + + detail::tvec4 j(p - T(49) * floor(p * ns.z * ns.z)); // mod(p,7*7) + + detail::tvec4 x_(floor(j * ns.z)); + detail::tvec4 y_(floor(j - T(7) * x_)); // mod(j,N) + + detail::tvec4 x(x_ * ns.x + ns.y); + detail::tvec4 y(y_ * ns.x + ns.y); + detail::tvec4 h(T(1) - abs(x) - abs(y)); + + detail::tvec4 b0(x.x, x.y, y.x, y.y); + detail::tvec4 b1(x.z, x.w, y.z, y.w); + + // vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0; + // vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0; + detail::tvec4 s0(floor(b0) * T(2) + T(1)); + detail::tvec4 s1(floor(b1) * T(2) + T(1)); + detail::tvec4 sh(-step(h, detail::tvec4(0.0))); + + detail::tvec4 a0 = detail::tvec4(b0.x, b0.z, b0.y, b0.w) + detail::tvec4(s0.x, s0.z, s0.y, s0.w) * detail::tvec4(sh.x, sh.x, sh.y, sh.y); + detail::tvec4 a1 = detail::tvec4(b1.x, b1.z, b1.y, b1.w) + detail::tvec4(s1.x, s1.z, s1.y, s1.w) * detail::tvec4(sh.z, sh.z, sh.w, sh.w); + + detail::tvec3 p0(a0.x, a0.y, h.x); + detail::tvec3 p1(a0.z, a0.w, h.y); + detail::tvec3 p2(a1.x, a1.y, h.z); + detail::tvec3 p3(a1.z, a1.w, h.w); + + // Normalise gradients + detail::tvec4 norm = taylorInvSqrt(detail::tvec4(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3))); + p0 *= norm.x; + p1 *= norm.y; + p2 *= norm.z; + p3 *= norm.w; + + // Mix final noise value + detail::tvec4 m = max(T(0.6) - detail::tvec4(dot(x0, x0), dot(x1, x1), dot(x2, x2), dot(x3, x3)), T(0)); + m = m * m; + return T(42) * dot(m * m, detail::tvec4(dot(p0, x0), dot(p1, x1), dot(p2, x2), dot(p3, x3))); + } + + template + GLM_FUNC_QUALIFIER T noise1(detail::tvec4 const & v) + { + detail::tvec4 const C( + 0.138196601125011, // (5 - sqrt(5))/20 G4 + 0.276393202250021, // 2 * G4 + 0.414589803375032, // 3 * G4 + -0.447213595499958); // -1 + 4 * G4 + + // (sqrt(5) - 1)/4 = F4, used once below + T const F4 = T(0.309016994374947451); + + // First corner + detail::tvec4 i = floor(v + dot(v, vec4(F4))); + detail::tvec4 x0 = v - i + dot(i, vec4(C.x)); + + // Other corners + + // Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI) + detail::tvec4 i0; + detail::tvec3 isX = step(detail::tvec3(x0.y, x0.z, x0.w), detail::tvec3(x0.x)); + detail::tvec3 isYZ = step(detail::tvec3(x0.z, x0.w, x0.w), detail::tvec3(x0.y, x0.y, x0.z)); + // i0.x = dot(isX, vec3(1.0)); + //i0.x = isX.x + isX.y + isX.z; + //i0.yzw = T(1) - isX; + i0 = detail::tvec4(isX.x + isX.y + isX.z, T(1) - isX); + // i0.y += dot(isYZ.xy, vec2(1.0)); + i0.y += isYZ.x + isYZ.y; + //i0.zw += 1.0 - detail::tvec2(isYZ.x, isYZ.y); + i0.z += T(1) - isYZ.x; + i0.w += T(1) - isYZ.y; + i0.z += isYZ.z; + i0.w += T(1) - isYZ.z; + + // i0 now contains the unique values 0,1,2,3 in each channel + detail::tvec4 i3 = clamp(i0, 0.0, 1.0); + detail::tvec4 i2 = clamp(i0 - 1.0, 0.0, 1.0); + detail::tvec4 i1 = clamp(i0 - 2.0, 0.0, 1.0); + + // x0 = x0 - 0.0 + 0.0 * C.xxxx + // x1 = x0 - i1 + 0.0 * C.xxxx + // x2 = x0 - i2 + 0.0 * C.xxxx + // x3 = x0 - i3 + 0.0 * C.xxxx + // x4 = x0 - 1.0 + 4.0 * C.xxxx + detail::tvec4 x1 = x0 - i1 + C.x; + detail::tvec4 x2 = x0 - i2 + C.y; + detail::tvec4 x3 = x0 - i3 + C.z; + detail::tvec4 x4 = x0 + C.w; + + // Permutations + i = mod(i, T(289)); + T j0 = permute(permute(permute(permute(i.w) + i.z) + i.y) + i.x); + detail::tvec4 j1 = permute(permute(permute(permute( + i.w + detail::tvec4(i1.w, i2.w, i3.w, T(1))) + + i.z + detail::tvec4(i1.z, i2.z, i3.z, T(1))) + + i.y + detail::tvec4(i1.y, i2.y, i3.y, T(1))) + + i.x + detail::tvec4(i1.x, i2.x, i3.x, T(1))); + + // Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope + // 7*7*6 = 294, which is close to the ring size 17*17 = 289. + detail::tvec4 ip = detail::tvec4(T(1) / T(294), T(1) / T(49), T(1) / T(7), T(0)); + + detail::tvec4 p0 = grad4(j0, ip); + detail::tvec4 p1 = grad4(j1.x, ip); + detail::tvec4 p2 = grad4(j1.y, ip); + detail::tvec4 p3 = grad4(j1.z, ip); + detail::tvec4 p4 = grad4(j1.w, ip); + + // Normalise gradients + detail::tvec4 norm = taylorInvSqrt(detail::tvec4(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3))); + p0 *= norm.x; + p1 *= norm.y; + p2 *= norm.z; + p3 *= norm.w; + p4 *= taylorInvSqrt(dot(p4, p4)); + + // Mix contributions from the five corners + detail::tvec3 m0 = max(T(0.6) - detail::tvec3(dot(x0, x0), dot(x1, x1), dot(x2, x2)), T(0)); + detail::tvec2 m1 = max(T(0.6) - detail::tvec2(dot(x3, x3), dot(x4, x4) ), T(0)); + m0 = m0 * m0; + m1 = m1 * m1; + return T(49) * + (dot(m0 * m0, detail::tvec3(dot(p0, x0), dot(p1, x1), dot(p2, x2))) + + dot(m1 * m1, detail::tvec2(dot(p3, x3), dot(p4, x4)))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec2 noise2(glm::detail::tvec2 const & x) + { + return glm::detail::tvec2( + noise1(x + glm::detail::tvec2(0.0)), + noise1(glm::detail::tvec2(0.0) - x)); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec2 noise2(glm::detail::tvec3 const & x) + { + return glm::detail::tvec2( + noise1(x + glm::detail::tvec3(0.0)), + noise1(glm::detail::tvec3(0.0) - x)); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec2 noise2(glm::detail::tvec4 const & x) + { + return glm::detail::tvec2( + noise1(x + glm::detail::tvec4(0.0)), + noise1(glm::detail::tvec4(0.0) - x)); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec3 noise3(glm::detail::tvec2 const & x) + { + return glm::detail::tvec3( + noise1(x - glm::detail::tvec2(1.0)), + noise1(x + glm::detail::tvec2(0.0)), + noise1(x + glm::detail::tvec2(1.0))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec3 noise3(glm::detail::tvec3 const & x) + { + return glm::detail::tvec3( + noise1(x - glm::detail::tvec3(1.0)), + noise1(x + glm::detail::tvec3(0.0)), + noise1(x + glm::detail::tvec3(1.0))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec3 noise3(glm::detail::tvec4 const & x) + { + return glm::detail::tvec3( + noise1(x - glm::detail::tvec4(1.0)), + noise1(x + glm::detail::tvec4(0.0)), + noise1(x + glm::detail::tvec4(1.0))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec4 noise4(glm::detail::tvec2 const & x) + { + return glm::detail::tvec4( + noise1(x - glm::detail::tvec2(1.0)), + noise1(x + glm::detail::tvec2(0.0)), + noise1(x + glm::detail::tvec2(1.0)), + noise1(x + glm::detail::tvec2(2.0))); + } + + + template + GLM_FUNC_QUALIFIER glm::detail::tvec4 noise4(glm::detail::tvec3 const & x) + { + return glm::detail::tvec4( + noise1(x - glm::detail::tvec3(1.0)), + noise1(x + glm::detail::tvec3(0.0)), + noise1(x + glm::detail::tvec3(1.0)), + noise1(x + glm::detail::tvec3(2.0))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec4 noise4(glm::detail::tvec4 const & x) + { + return glm::detail::tvec4( + noise1(x - glm::detail::tvec4(1.0)), + noise1(x + glm::detail::tvec4(0.0)), + noise1(x + glm::detail::tvec4(1.0)), + noise1(x + glm::detail::tvec4(2.0))); + } + +}//namespace glm diff --git a/include/gal/opengl/glm/core/func_packing.hpp b/include/gal/opengl/glm/core/func_packing.hpp new file mode 100644 index 0000000000..b196095e7a --- /dev/null +++ b/include/gal/opengl/glm/core/func_packing.hpp @@ -0,0 +1,193 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_packing.hpp +/// @date 2010-03-17 / 2011-06-15 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions +/// +/// @defgroup core_func_packing Floating-Point Pack and Unpack Functions +/// @ingroup core +/// +/// These functions do not operate component-wise, rather as described in each case. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_CORE_func_packing +#define GLM_CORE_func_packing GLM_VERSION + +namespace glm +{ + /// @addtogroup core_func_packing + /// @{ + + //! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. + //! Then, the results are packed into the returned 32-bit unsigned integer. + //! + //! The conversion for component c of v to fixed point is done as follows: + //! packUnorm2x16: round(clamp(c, 0, +1) * 65535.0) + //! + //! The first component of the vector will be written to the least significant bits of the output; + //! the last component will be written to the most significant bits. + //! + /// @see GLSL packUnorm2x16 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::uint32 packUnorm2x16(detail::tvec2 const & v); + + //! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. + //! Then, the results are packed into the returned 32-bit unsigned integer. + //! + //! The conversion for component c of v to fixed point is done as follows: + //! packSnorm2x16: round(clamp(v, -1, +1) * 32767.0) + //! + //! The first component of the vector will be written to the least significant bits of the output; + //! the last component will be written to the most significant bits. + //! + /// @see GLSL packSnorm2x16 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::uint32 packSnorm2x16(detail::tvec2 const & v); + + //! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. + //! Then, the results are packed into the returned 32-bit unsigned integer. + //! + //! The conversion for component c of v to fixed point is done as follows: + //! packUnorm4x8: round(clamp(c, 0, +1) * 255.0) + //! + //! The first component of the vector will be written to the least significant bits of the output; + //! the last component will be written to the most significant bits. + //! + /// @see GLSL packUnorm4x8 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::uint32 packUnorm4x8(detail::tvec4 const & v); + + //! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. + //! Then, the results are packed into the returned 32-bit unsigned integer. + //! + //! The conversion for component c of v to fixed point is done as follows: + //! packSnorm4x8: round(clamp(c, -1, +1) * 127.0) + //! + //! The first component of the vector will be written to the least significant bits of the output; + //! the last component will be written to the most significant bits. + //! + /// @see GLSL packSnorm4x8 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::uint32 packSnorm4x8(detail::tvec4 const & v); + + //! First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. + //! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. + //! + //! The conversion for unpacked fixed-point value f to floating point is done as follows: + //! unpackUnorm2x16: f / 65535.0 + //! + //! The first component of the returned vector will be extracted from the least significant bits of the input; + //! the last component will be extracted from the most significant bits. + //! + /// @see GLSL unpackUnorm2x16 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::tvec2 unpackUnorm2x16(detail::uint32 const & p); + + //! First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. + //! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. + //! + //! The conversion for unpacked fixed-point value f to floating point is done as follows: + //! unpackSnorm2x16: clamp(f / 32767.0, -1, +1) + //! + //! The first component of the returned vector will be extracted from the least significant bits of the input; + //! the last component will be extracted from the most significant bits. + //! + /// @see GLSL unpackSnorm2x16 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::tvec2 unpackSnorm2x16(detail::uint32 const & p); + + /// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. + /// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. + /// + /// The conversion for unpacked fixed-point value f to floating point is done as follows: + /// unpackUnorm4x8: f / 255.0 + /// + /// The first component of the returned vector will be extracted from the least significant bits of the input; + /// the last component will be extracted from the most significant bits. + /// + /// @see GLSL unpackUnorm4x8 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::tvec4 unpackUnorm4x8(detail::uint32 const & p); + + /// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. + /// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. + /// + /// The conversion for unpacked fixed-point value f to floating point is done as follows: + /// unpackSnorm4x8: clamp(f / 127.0, -1, +1) + /// + /// The first component of the returned vector will be extracted from the least significant bits of the input; + /// the last component will be extracted from the most significant bits. + /// + /// @see GLSL unpackSnorm4x8 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::tvec4 unpackSnorm4x8(detail::uint32 const & p); + + /// Returns a double-precision value obtained by packing the components of v into a 64-bit value. + /// If an IEEE 754 Inf or NaN is created, it will not signal, and the resulting floating point value is unspecified. + /// Otherwise, the bit- level representation of v is preserved. + /// The first vector component specifies the 32 least significant bits; + /// the second component specifies the 32 most significant bits. + /// + /// @see GLSL packDouble2x32 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + double packDouble2x32(detail::tvec2 const & v); + + /// Returns a two-component unsigned integer vector representation of v. + /// The bit-level representation of v is preserved. + /// The first component of the vector contains the 32 least significant bits of the double; + /// the second component consists the 32 most significant bits. + /// + /// @see GLSL unpackDouble2x32 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::tvec2 unpackDouble2x32(double const & v); + + /// Returns an unsigned integer obtained by converting the components of a two-component floating-point vector + /// to the 16-bit floating-point representation found in the OpenGL Specification, + /// and then packing these two 16- bit integers into a 32-bit unsigned integer. + /// The first vector component specifies the 16 least-significant bits of the result; + /// the second component specifies the 16 most-significant bits. + /// + /// @see GLSL packHalf2x16 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + uint packHalf2x16(vec2 const & v); + + /// Returns a two-component floating-point vector with components obtained by unpacking a 32-bit unsigned integer into a pair of 16-bit values, + /// interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification, + /// and converting them to 32-bit floating-point values. + /// The first component of the vector is obtained from the 16 least-significant bits of v; + /// the second component is obtained from the 16 most-significant bits of v. + /// + /// @see GLSL unpackHalf2x16 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + vec2 unpackHalf2x16(uint const & v); + + /// @} +}//namespace glm + +#include "func_packing.inl" + +#endif//GLM_CORE_func_packing + diff --git a/include/gal/opengl/glm/core/func_packing.inl b/include/gal/opengl/glm/core/func_packing.inl new file mode 100644 index 0000000000..260acf29b4 --- /dev/null +++ b/include/gal/opengl/glm/core/func_packing.inl @@ -0,0 +1,178 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_packing.inl +/// @date 2010-03-17 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + GLM_FUNC_QUALIFIER detail::uint32 packUnorm2x16(detail::tvec2 const & v) + { + detail::uint16 A(detail::uint16(round(clamp(v.x, 0.0f, 1.0f) * 65535.0f))); + detail::uint16 B(detail::uint16(round(clamp(v.y, 0.0f, 1.0f) * 65535.0f))); + return detail::uint32((B << 16) | A); + } + + GLM_FUNC_QUALIFIER detail::tvec2 unpackUnorm2x16(detail::uint32 const & p) + { + detail::uint32 Mask16((1 << 16) - 1); + detail::uint32 A((p >> 0) & Mask16); + detail::uint32 B((p >> 16) & Mask16); + return detail::tvec2( + A * 1.0f / 65535.0f, + B * 1.0f / 65535.0f); + } + + GLM_FUNC_QUALIFIER detail::uint32 packSnorm2x16(detail::tvec2 const & v) + { + union iu + { + detail::int16 i; + detail::uint16 u; + } A, B; + + detail::tvec2 Unpack = clamp(v ,-1.0f, 1.0f) * 32767.0f; + A.i = detail::int16(round(Unpack.x)); + B.i = detail::int16(round(Unpack.y)); + detail::uint32 Pack = (detail::uint32(B.u) << 16) | (detail::uint32(A.u) << 0); + return Pack; + } + + GLM_FUNC_QUALIFIER detail::tvec2 unpackSnorm2x16(detail::uint32 const & p) + { + union iu + { + detail::int16 i; + detail::uint16 u; + } A, B; + + detail::uint32 Mask16((1 << 16) - 1); + A.u = detail::uint16((p >> 0) & Mask16); + B.u = detail::uint16((p >> 16) & Mask16); + detail::tvec2 Pack(A.i, B.i); + + return clamp(Pack * 1.0f / 32767.0f, -1.0f, 1.0f); + } + + GLM_FUNC_QUALIFIER detail::uint32 packUnorm4x8(detail::tvec4 const & v) + { + detail::uint8 A((detail::uint8)round(clamp(v.x, 0.0f, 1.0f) * 255.0f)); + detail::uint8 B((detail::uint8)round(clamp(v.y, 0.0f, 1.0f) * 255.0f)); + detail::uint8 C((detail::uint8)round(clamp(v.z, 0.0f, 1.0f) * 255.0f)); + detail::uint8 D((detail::uint8)round(clamp(v.w, 0.0f, 1.0f) * 255.0f)); + return detail::uint32((D << 24) | (C << 16) | (B << 8) | A); + } + + GLM_FUNC_QUALIFIER detail::tvec4 unpackUnorm4x8(detail::uint32 const & p) + { + detail::uint32 Mask8((1 << 8) - 1); + detail::uint32 A((p >> 0) & Mask8); + detail::uint32 B((p >> 8) & Mask8); + detail::uint32 C((p >> 16) & Mask8); + detail::uint32 D((p >> 24) & Mask8); + return detail::tvec4( + A * 1.0f / 255.0f, + B * 1.0f / 255.0f, + C * 1.0f / 255.0f, + D * 1.0f / 255.0f); + } + + GLM_FUNC_QUALIFIER detail::uint32 packSnorm4x8(detail::tvec4 const & v) + { + union iu + { + detail::int8 i; + detail::uint8 u; + } A, B, C, D; + + detail::tvec4 Unpack = clamp(v ,-1.0f, 1.0f) * 127.0f; + A.i = detail::int8(round(Unpack.x)); + B.i = detail::int8(round(Unpack.y)); + C.i = detail::int8(round(Unpack.z)); + D.i = detail::int8(round(Unpack.w)); + detail::uint32 Pack = (detail::uint32(D.u) << 24) | (detail::uint32(C.u) << 16) | (detail::uint32(B.u) << 8) | (detail::uint32(A.u) << 0); + return Pack; + } + + GLM_FUNC_QUALIFIER detail::tvec4 unpackSnorm4x8(detail::uint32 const & p) + { + union iu + { + detail::int8 i; + detail::uint8 u; + } A, B, C, D; + + detail::uint32 Mask8((1 << 8) - 1); + A.u = detail::uint8((p >> 0) & Mask8); + B.u = detail::uint8((p >> 8) & Mask8); + C.u = detail::uint8((p >> 16) & Mask8); + D.u = detail::uint8((p >> 24) & Mask8); + detail::tvec4 Pack(A.i, B.i, C.i, D.i); + + return clamp(Pack * 1.0f / 127.0f, -1.0f, 1.0f); + } + + GLM_FUNC_QUALIFIER double packDouble2x32(detail::tvec2 const & v) + { + return *(double*)&v; + } + + GLM_FUNC_QUALIFIER detail::tvec2 unpackDouble2x32(double const & v) + { + return *(detail::tvec2*)&v; + } + + GLM_FUNC_QUALIFIER uint packHalf2x16(detail::tvec2 const & v) + { + union helper + { + uint other; + struct + { + detail::hdata a, b; + } orig; + } Pack; + + Pack.orig.a = detail::toFloat16(v.x); + Pack.orig.b = detail::toFloat16(v.y); + return *(uint*)&Pack; + } + + GLM_FUNC_QUALIFIER vec2 unpackHalf2x16(uint const & v) + { + union helper + { + uint other; + struct + { + detail::hdata a, b; + } orig; + } Unpack; + Unpack.other = v; + + return vec2(detail::toFloat32(Unpack.orig.a), detail::toFloat32(Unpack.orig.b)); + } +}//namespace glm + diff --git a/include/gal/opengl/glm/core/func_trigonometric.hpp b/include/gal/opengl/glm/core/func_trigonometric.hpp new file mode 100644 index 0000000000..d8b87e368e --- /dev/null +++ b/include/gal/opengl/glm/core/func_trigonometric.hpp @@ -0,0 +1,203 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_trigonometric.hpp +/// @date 2008-08-01 / 2011-06-15 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions +/// +/// @defgroup core_func_trigonometric Angle and Trigonometry Functions +/// @ingroup core +/// +/// Function parameters specified as angle are assumed to be in units of radians. +/// In no case will any of these functions result in a divide by zero error. If +/// the divisor of a ratio is 0, then results will be undefined. +/// +/// These all operate component-wise. The description is per component. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_CORE_func_trigonometric +#define GLM_CORE_func_trigonometric GLM_VERSION + +namespace glm +{ + /// @addtogroup core_func_trigonometric + /// @{ + + /// Converts degrees to radians and returns the result. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL radians man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType radians(genType const & degrees); + + /// Converts radians to degrees and returns the result. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL degrees man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType degrees(genType const & radians); + + /// The standard trigonometric sine function. + /// The values returned by this function will range from [-1, 1]. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL sin man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType sin(genType const & angle); + + /// The standard trigonometric cosine function. + /// The values returned by this function will range from [-1, 1]. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL cos man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType cos(genType const & angle); + + /// The standard trigonometric tangent function. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL tan man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType tan(genType const & angle); + + /// Arc sine. Returns an angle whose sine is x. + /// The range of values returned by this function is [-PI/2, PI/2]. + /// Results are undefined if |x| > 1. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL asin man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType asin(genType const & x); + + /// Arc cosine. Returns an angle whose sine is x. + /// The range of values returned by this function is [0, PI]. + /// Results are undefined if |x| > 1. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL acos man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType acos(genType const & x); + + /// Arc tangent. Returns an angle whose tangent is y/x. + /// The signs of x and y are used to determine what + /// quadrant the angle is in. The range of values returned + /// by this function is [-PI, PI]. Results are undefined + /// if x and y are both 0. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL atan man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType atan(genType const & y, genType const & x); + + /// Arc tangent. Returns an angle whose tangent is y_over_x. + /// The range of values returned by this function is [-PI/2, PI/2]. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL atan man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType atan(genType const & y_over_x); + + /// Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2 + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL sinh man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType sinh(genType const & angle); + + /// Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2 + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL cosh man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType cosh(genType const & angle); + + /// Returns the hyperbolic tangent function, sinh(angle) / cosh(angle) + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL tanh man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType tanh(genType const & angle); + + /// Arc hyperbolic sine; returns the inverse of sinh. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL asinh man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType asinh(genType const & x); + + /// Arc hyperbolic cosine; returns the non-negative inverse + /// of cosh. Results are undefined if x < 1. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL acosh man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType acosh(genType const & x); + + /// Arc hyperbolic tangent; returns the inverse of tanh. + /// Results are undefined if abs(x) >= 1. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL atanh man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType atanh(genType const & x); + + /// @} +}//namespace glm + +#include "func_trigonometric.inl" + +#endif//GLM_CORE_func_trigonometric + + diff --git a/include/gal/opengl/glm/core/func_trigonometric.inl b/include/gal/opengl/glm/core/func_trigonometric.inl new file mode 100644 index 0000000000..75204f967f --- /dev/null +++ b/include/gal/opengl/glm/core/func_trigonometric.inl @@ -0,0 +1,244 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_trigonometric.inl +/// @date 2008-08-03 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + // radians + template + GLM_FUNC_QUALIFIER genType radians + ( + genType const & degrees + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'radians' only accept floating-point input"); + + genType const pi = genType(3.1415926535897932384626433832795); + return degrees * (pi / genType(180)); + } + + VECTORIZE_VEC(radians) + + // degrees + template + GLM_FUNC_QUALIFIER genType degrees + ( + genType const & radians + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'degrees' only accept floating-point input"); + + const genType pi = genType(3.1415926535897932384626433832795); + return radians * (genType(180) / pi); + } + + VECTORIZE_VEC(degrees) + + // sin + template + GLM_FUNC_QUALIFIER genType sin + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'sin' only accept floating-point input"); + + return genType(::std::sin(angle)); + } + + VECTORIZE_VEC(sin) + + // cos + template + GLM_FUNC_QUALIFIER genType cos(genType const & angle) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'cos' only accept floating-point input"); + + return genType(::std::cos(angle)); + } + + VECTORIZE_VEC(cos) + + // tan + template + GLM_FUNC_QUALIFIER genType tan + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'tan' only accept floating-point input"); + + return genType(::std::tan(angle)); + } + + VECTORIZE_VEC(tan) + + // asin + template + GLM_FUNC_QUALIFIER genType asin + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'asin' only accept floating-point input"); + + return genType(::std::asin(x)); + } + + VECTORIZE_VEC(asin) + + // acos + template + GLM_FUNC_QUALIFIER genType acos + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'acos' only accept floating-point input"); + + return genType(::std::acos(x)); + } + + VECTORIZE_VEC(acos) + + // atan + template + GLM_FUNC_QUALIFIER genType atan + ( + genType const & y, + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'atan' only accept floating-point input"); + + return genType(::std::atan2(y, x)); + } + + VECTORIZE_VEC_VEC(atan) + + template + GLM_FUNC_QUALIFIER genType atan + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'atan' only accept floating-point input"); + + return genType(::std::atan(x)); + } + + VECTORIZE_VEC(atan) + + // sinh + template + GLM_FUNC_QUALIFIER genType sinh + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'sinh' only accept floating-point input"); + + return genType(std::sinh(angle)); + } + + VECTORIZE_VEC(sinh) + + // cosh + template + GLM_FUNC_QUALIFIER genType cosh + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'cosh' only accept floating-point input"); + + return genType(std::cosh(angle)); + } + + VECTORIZE_VEC(cosh) + + // tanh + template + GLM_FUNC_QUALIFIER genType tanh + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'tanh' only accept floating-point input"); + + return genType(std::tanh(angle)); + } + + VECTORIZE_VEC(tanh) + + // asinh + template + GLM_FUNC_QUALIFIER genType asinh + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'asinh' only accept floating-point input"); + + return (x < genType(0) ? genType(-1) : (x > genType(0) ? genType(1) : genType(0))) * log(abs(x) + sqrt(genType(1) + x * x)); + } + + VECTORIZE_VEC(asinh) + + // acosh + template + GLM_FUNC_QUALIFIER genType acosh + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'acosh' only accept floating-point input"); + + if(x < genType(1)) + return genType(0); + return log(x + sqrt(x * x - genType(1))); + } + + VECTORIZE_VEC(acosh) + + // atanh + template + GLM_FUNC_QUALIFIER genType atanh + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'atanh' only accept floating-point input"); + + if(abs(x) >= genType(1)) + return 0; + return genType(0.5) * log((genType(1) + x) / (genType(1) - x)); + } + + VECTORIZE_VEC(atanh) + +}//namespace glm diff --git a/include/gal/opengl/glm/core/func_vector_relational.hpp b/include/gal/opengl/glm/core/func_vector_relational.hpp new file mode 100644 index 0000000000..d24e46514c --- /dev/null +++ b/include/gal/opengl/glm/core/func_vector_relational.hpp @@ -0,0 +1,138 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_vector_relational.hpp +/// @date 2008-08-03 / 2011-06-15 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions +/// +/// @defgroup core_func_vector_relational Vector Relational Functions +/// @ingroup core +/// +/// Relational and equality operators (<, <=, >, >=, ==, !=) are defined to +/// operate on scalars and produce scalar Boolean results. For vector results, +/// use the following built-in functions. +/// +/// In all cases, the sizes of all the input and return vectors for any particular +/// call must match. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_CORE_func_vector_relational +#define GLM_CORE_func_vector_relational GLM_VERSION + +#include "_detail.hpp" + +namespace glm +{ + /// @addtogroup core_func_vector_relational + /// @{ + + /// Returns the component-wise comparison result of x < y. + /// + /// @tparam vecType Floating-point or integer vector types. + /// + /// @see GLSL lessThan man page + /// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions + template + typename vecType::bool_type lessThan(vecType const & x, vecType const & y); + + /// Returns the component-wise comparison of result x <= y. + /// + /// @tparam vecType Floating-point or integer vector types. + /// + /// @see GLSL lessThanEqual man page + /// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions + template + typename vecType::bool_type lessThanEqual(vecType const & x, vecType const & y); + + /// Returns the component-wise comparison of result x > y. + /// + /// @tparam vecType Floating-point or integer vector types. + /// + /// @see GLSL greaterThan man page + /// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions + template + typename vecType::bool_type greaterThan(vecType const & x, vecType const & y); + + /// Returns the component-wise comparison of result x >= y. + /// + /// @tparam vecType Floating-point or integer vector types. + /// + /// @see GLSL greaterThanEqual man page + /// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions + template + typename vecType::bool_type greaterThanEqual(vecType const & x, vecType const & y); + + /// Returns the component-wise comparison of result x == y. + /// + /// @tparam vecType Floating-point, integer or boolean vector types. + /// + /// @see GLSL equal man page + /// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions + template + typename vecType::bool_type equal(vecType const & x, vecType const & y); + + /// Returns the component-wise comparison of result x != y. + /// + /// @tparam vecType Floating-point, integer or boolean vector types. + /// + /// @see GLSL notEqual man page + /// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions + template + typename vecType::bool_type notEqual(vecType const & x, vecType const & y); + + /// Returns true if any component of x is true. + /// + /// @tparam vecType Boolean vector types. + /// + /// @see GLSL any man page + /// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions + template (toFloat32(this->data)); + } +*/ + + GLM_FUNC_QUALIFIER half::operator float() const + { + return toFloat32(this->data); + } + + // Unary updatable operators + GLM_FUNC_QUALIFIER half& half::operator= (half const & s) + { + data = s.data; + return *this; + } + + GLM_FUNC_QUALIFIER half& half::operator+=(half const & s) + { + data = toFloat16(toFloat32(data) + toFloat32(s.data)); + return *this; + } + + GLM_FUNC_QUALIFIER half& half::operator-=(half const & s) + { + data = toFloat16(toFloat32(data) - toFloat32(s.data)); + return *this; + } + + GLM_FUNC_QUALIFIER half& half::operator*=(half const & s) + { + data = toFloat16(toFloat32(data) * toFloat32(s.data)); + return *this; + } + + GLM_FUNC_QUALIFIER half& half::operator/=(half const & s) + { + data = toFloat16(toFloat32(data) / toFloat32(s.data)); + return *this; + } + + GLM_FUNC_QUALIFIER half& half::operator++() + { + float Casted = toFloat32(data); + this->data = toFloat16(++Casted); + return *this; + } + + GLM_FUNC_QUALIFIER half& half::operator--() + { + float Casted = toFloat32(data); + this->data = toFloat16(--Casted); + return *this; + } + + ////////////////////////////////////// + // Binary arithmetic operators + + GLM_FUNC_QUALIFIER detail::half operator+ (detail::half const & s1, detail::half const & s2) + { + return detail::half(float(s1) + float(s2)); + } + + GLM_FUNC_QUALIFIER detail::half operator- (detail::half const & s1, detail::half const & s2) + { + return detail::half(float(s1) - float(s2)); + } + + GLM_FUNC_QUALIFIER detail::half operator* (detail::half const & s1, detail::half const & s2) + { + return detail::half(float(s1) * float(s2)); + } + + GLM_FUNC_QUALIFIER detail::half operator/ (detail::half const & s1, detail::half const & s2) + { + return detail::half(float(s1) / float(s2)); + } + + // Unary constant operators + GLM_FUNC_QUALIFIER detail::half operator- (detail::half const & s) + { + return detail::half(-float(s)); + } + + GLM_FUNC_QUALIFIER detail::half operator-- (detail::half const & s, int) + { + return detail::half(float(s) - 1.0f); + } + + GLM_FUNC_QUALIFIER detail::half operator++ (detail::half const & s, int) + { + return detail::half(float(s) + 1.0f); + } + + GLM_FUNC_QUALIFIER bool operator== + ( + detail::half const & x, + detail::half const & y + ) + { + return x._data() == y._data(); + } + + GLM_FUNC_QUALIFIER bool operator!= + ( + detail::half const & x, + detail::half const & y + ) + { + return x._data() != y._data(); + } + + GLM_FUNC_QUALIFIER bool operator< + ( + detail::half const & x, + detail::half const & y + ) + { + return float(x) < float(y); + } + + GLM_FUNC_QUALIFIER bool operator<= + ( + detail::half const & x, + detail::half const & y + ) + { + return float(x) <= float(y); + } + + GLM_FUNC_QUALIFIER bool operator> + ( + detail::half const & x, + detail::half const & y + ) + { + return float(x) > float(y); + } + + GLM_FUNC_QUALIFIER bool operator>= + ( + detail::half const & x, + detail::half const & y + ) + { + return float(x) >= float(y); + } + +}//namespace detail +}//namespace glm diff --git a/include/gal/opengl/glm/core/type_int.hpp b/include/gal/opengl/glm/core/type_int.hpp new file mode 100644 index 0000000000..3ebb16c285 --- /dev/null +++ b/include/gal/opengl/glm/core/type_int.hpp @@ -0,0 +1,136 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_int.hpp +/// @date 2008-08-22 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_int +#define glm_core_type_int + +#include "setup.hpp" +#include "_detail.hpp" + +namespace glm{ +namespace detail +{ + typedef signed short lowp_int_t; + typedef signed int mediump_int_t; + typedef sint64 highp_int_t; + + typedef unsigned short lowp_uint_t; + typedef unsigned int mediump_uint_t; + typedef uint64 highp_uint_t; + + GLM_DETAIL_IS_INT(signed char); + GLM_DETAIL_IS_INT(signed short); + GLM_DETAIL_IS_INT(signed int); + GLM_DETAIL_IS_INT(signed long); + GLM_DETAIL_IS_INT(highp_int_t); + + GLM_DETAIL_IS_UINT(unsigned char); + GLM_DETAIL_IS_UINT(unsigned short); + GLM_DETAIL_IS_UINT(unsigned int); + GLM_DETAIL_IS_UINT(unsigned long); + GLM_DETAIL_IS_UINT(highp_uint_t); +}//namespace detail + + /// @addtogroup core_precision + /// @{ + + /// Low precision signed integer. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.3 Integers + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::lowp_int_t lowp_int; + + /// Medium precision signed integer. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.3 Integers + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::mediump_int_t mediump_int; + + /// High precision signed integer. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.3 Integers + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::highp_int_t highp_int; + + /// Low precision unsigned integer. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.3 Integers + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::lowp_uint_t lowp_uint; + + /// Medium precision unsigned integer. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.3 Integers + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::mediump_uint_t mediump_uint; + + /// High precision unsigned integer. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.3 Integers + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::highp_uint_t highp_uint; + +#if(!defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT)) + typedef mediump_int int_t; +#elif(defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT)) + typedef highp_int int_t; +#elif(!defined(GLM_PRECISION_HIGHP_INT) && defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT)) + typedef mediump_int int_t; +#elif(!defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && defined(GLM_PRECISION_LOWP_INT)) + typedef lowp_int int_t; +#else +# error "GLM error: multiple default precision requested for signed interger types" +#endif + +#if(!defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT)) + typedef mediump_uint uint_t; +#elif(defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT)) + typedef highp_uint uint_t; +#elif(!defined(GLM_PRECISION_HIGHP_UINT) && defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT)) + typedef mediump_uint uint_t; +#elif(!defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && defined(GLM_PRECISION_LOWP_UINT)) + typedef lowp_uint uint_t; +#else +# error "GLM error: multiple default precision requested for unsigned interger types" +#endif + + /// Unsigned integer type. + /// + /// @see GLSL 4.20.8 specification, section 4.1.3 Integers + typedef uint_t uint; + + /// @} +}//namespace glm + +#endif//glm_core_type_int diff --git a/include/gal/opengl/glm/core/type_mat.hpp b/include/gal/opengl/glm/core/type_mat.hpp new file mode 100644 index 0000000000..fcf94a04b6 --- /dev/null +++ b/include/gal/opengl/glm/core/type_mat.hpp @@ -0,0 +1,75 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat.hpp +/// @date 2010-01-26 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_mat +#define glm_core_type_mat + +#include "type_gentype.hpp" + +namespace glm{ +namespace detail +{ + //template + //< + // typename T, + // template class C, + // template class R + //> + //struct matType + //{ + // enum ctor{null}; + // typedef T value_type; + // typedef std::size_t size_type; + // typedef C col_type; + // typedef R row_type; + // static size_type const col_size; + // static size_type const row_size; + //}; + + //template + //< + // typename T, + // template class C, + // template class R + //> + //typename matType::size_type const + //matType::col_size = matType::col_type::value_size; + + //template + //< + // typename T, + // template class C, + // template class R + //> + //typename matType::size_type const + //matType::row_size = matType::row_type::value_size; + +}//namespace detail +}//namespace glm + +#endif//glm_core_type_mat diff --git a/include/gal/opengl/glm/core/type_mat.inl b/include/gal/opengl/glm/core/type_mat.inl new file mode 100644 index 0000000000..b6da6aea22 --- /dev/null +++ b/include/gal/opengl/glm/core/type_mat.inl @@ -0,0 +1,27 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat.inl +/// @date 2011-06-15 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// diff --git a/include/gal/opengl/glm/core/type_mat2x2.hpp b/include/gal/opengl/glm/core/type_mat2x2.hpp new file mode 100644 index 0000000000..e3bef1b26d --- /dev/null +++ b/include/gal/opengl/glm/core/type_mat2x2.hpp @@ -0,0 +1,314 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat2x2.hpp +/// @date 2005-01-27 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_mat2x2 +#define glm_core_type_mat2x2 + +#include "type_mat.hpp" + +namespace glm{ +namespace detail +{ + template struct tvec1; + template struct tvec2; + template struct tvec3; + template struct tvec4; + template struct tmat2x2; + template struct tmat2x3; + template struct tmat2x4; + template struct tmat3x2; + template struct tmat3x3; + template struct tmat3x4; + template struct tmat4x2; + template struct tmat4x3; + template struct tmat4x4; + + template + struct tmat2x2 + { + // Implementation detail + enum ctor{null}; + typedef T value_type; + typedef std::size_t size_type; + typedef tvec2 col_type; + typedef tvec2 row_type; + typedef tmat2x2 type; + typedef tmat2x2 transpose_type; + + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + public: + // Implementation detail + GLM_FUNC_DECL tmat2x2 _inverse() const; + + private: + ////////////////////////////////////// + // Implementation detail + col_type value[2]; + + public: + ////////////////////////////////////// + // Constructors + GLM_FUNC_DECL tmat2x2(); + GLM_FUNC_DECL tmat2x2( + tmat2x2 const & m); + + GLM_FUNC_DECL explicit tmat2x2( + ctor Null); + GLM_FUNC_DECL explicit tmat2x2( + value_type const & x); + GLM_FUNC_DECL explicit tmat2x2( + value_type const & x1, value_type const & y1, + value_type const & x2, value_type const & y2); + GLM_FUNC_DECL explicit tmat2x2( + col_type const & v1, + col_type const & v2); + + ////////////////////////////////////// + // Conversions + template + GLM_FUNC_DECL explicit tmat2x2( + U const & x); + + template + GLM_FUNC_DECL explicit tmat2x2( + U const & x1, V const & y1, + M const & x2, N const & y2); + + template + GLM_FUNC_DECL explicit tmat2x2( + tvec2 const & v1, + tvec2 const & v2); + + ////////////////////////////////////// + // Matrix conversions + template + GLM_FUNC_DECL explicit tmat2x2(tmat2x2 const & m); + + GLM_FUNC_DECL explicit tmat2x2(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat4x3 const & x); + + ////////////////////////////////////// + // Accesses + + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; + + // Unary updatable operators + GLM_FUNC_DECL tmat2x2 & operator=(tmat2x2 const & m); + template + GLM_FUNC_DECL tmat2x2 & operator=(tmat2x2 const & m); + template + GLM_FUNC_DECL tmat2x2 & operator+=(U const & s); + template + GLM_FUNC_DECL tmat2x2 & operator+=(tmat2x2 const & m); + template + GLM_FUNC_DECL tmat2x2 & operator-=(U const & s); + template + GLM_FUNC_DECL tmat2x2 & operator-=(tmat2x2 const & m); + template + GLM_FUNC_DECL tmat2x2 & operator*=(U const & s); + template + GLM_FUNC_DECL tmat2x2 & operator*=(tmat2x2 const & m); + template + GLM_FUNC_DECL tmat2x2 & operator/=(U const & s); + template + GLM_FUNC_DECL tmat2x2 & operator/=(tmat2x2 const & m); + GLM_FUNC_DECL tmat2x2 & operator++(); + GLM_FUNC_DECL tmat2x2 & operator--(); + }; + + // Binary operators + template + tmat2x2 operator+ ( + tmat2x2 const & m, + typename tmat2x2::value_type const & s); + + template + tmat2x2 operator+ ( + typename tmat2x2::value_type const & s, + tmat2x2 const & m); + + template + tmat2x2 operator+ ( + tmat2x2 const & m1, + tmat2x2 const & m2); + + template + tmat2x2 operator- ( + tmat2x2 const & m, + typename tmat2x2::value_type const & s); + + template + tmat2x2 operator- ( + typename tmat2x2::value_type const & s, + tmat2x2 const & m); + + template + tmat2x2 operator- ( + tmat2x2 const & m1, + tmat2x2 const & m2); + + template + tmat2x2 operator* ( + tmat2x2 const & m, + typename tmat2x2::value_type const & s); + + template + tmat2x2 operator* ( + typename tmat2x2::value_type const & s, + tmat2x2 const & m); + + template + typename tmat2x2::col_type operator* ( + tmat2x2 const & m, + typename tmat2x2::row_type const & v); + + template + typename tmat2x2::row_type operator* ( + typename tmat2x2::col_type const & v, + tmat2x2 const & m); + + template + tmat2x2 operator* ( + tmat2x2 const & m1, + tmat2x2 const & m2); + + template + tmat3x2 operator* ( + tmat2x2 const & m1, + tmat3x2 const & m2); + + template + tmat4x2 operator* ( + tmat2x2 const & m1, + tmat4x2 const & m2); + + template + tmat2x2 operator/ ( + tmat2x2 const & m, + typename tmat2x2::value_type const & s); + + template + tmat2x2 operator/ ( + typename tmat2x2::value_type const & s, + tmat2x2 const & m); + + template + typename tmat2x2::col_type operator/ ( + tmat2x2 const & m, + typename tmat2x2::row_type const & v); + + template + typename tmat2x2::row_type operator/ ( + typename tmat2x2::col_type const & v, + tmat2x2 const & m); + + template + tmat2x2 operator/ ( + tmat2x2 const & m1, + tmat2x2 const & m2); + + // Unary constant operators + template + tmat2x2 const operator- ( + tmat2x2 const & m); + + template + tmat2x2 const operator-- ( + tmat2x2 const & m, + int); + + template + tmat2x2 const operator++ ( + tmat2x2 const & m, + int); +} //namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 2 columns of 2 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x2 lowp_mat2; + + /// 2 columns of 2 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x2 mediump_mat2; + + /// 2 columns of 2 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x2 highp_mat2; + + /// 2 columns of 2 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x2 lowp_mat2x2; + + /// 2 columns of 2 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x2 mediump_mat2x2; + + /// 2 columns of 2 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x2 highp_mat2x2; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_mat2x2.inl" +#endif + +#endif //glm_core_type_mat2x2 diff --git a/include/gal/opengl/glm/core/type_mat2x2.inl b/include/gal/opengl/glm/core/type_mat2x2.inl new file mode 100644 index 0000000000..987577d7a5 --- /dev/null +++ b/include/gal/opengl/glm/core/type_mat2x2.inl @@ -0,0 +1,700 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat2x2.inl +/// @date 2005-01-16 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x2::size_type tmat2x2::length() const + { + return 2; + } + + template + GLM_FUNC_QUALIFIER typename tmat2x2::size_type tmat2x2::col_size() + { + return 2; + } + + template + GLM_FUNC_QUALIFIER typename tmat2x2::size_type tmat2x2::row_size() + { + return 2; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tmat2x2::col_type & + tmat2x2::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return this->value[i]; + } + + template + GLM_FUNC_QUALIFIER typename tmat2x2::col_type const & + tmat2x2::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return this->value[i]; + } + + ////////////////////////////////////////////////////////////// + // Constructors + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2() + { + this->value[0] = col_type(1, 0); + this->value[1] = col_type(0, 1); + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + tmat2x2 const & m + ) + { + this->value[0] = m.value[0]; + this->value[1] = m.value[1]; + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + value_type const & s + ) + { + value_type const Zero(0); + this->value[0] = col_type(s, Zero); + this->value[1] = col_type(Zero, s); + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + value_type const & x0, value_type const & y0, + value_type const & x1, value_type const & y1 + ) + { + this->value[0] = col_type(x0, y0); + this->value[1] = col_type(x1, y1); + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + col_type const & v0, + col_type const & v1 + ) + { + this->value[0] = v0; + this->value[1] = v1; + } + + ////////////////////////////////////// + // Convertion constructors + template + template + GLM_FUNC_DECL tmat2x2::tmat2x2 + ( + U const & s + ) + { + value_type const Zero(0); + this->value[0] = tvec2(value_type(s), Zero); + this->value[1] = tvec2(Zero, value_type(s)); + } + + template + template + GLM_FUNC_DECL tmat2x2::tmat2x2 + ( + X1 const & x1, Y1 const & y1, + X2 const & x2, Y2 const & y2 + ) + { + this->value[0] = col_type(value_type(x1), value_type(y1)); + this->value[1] = col_type(value_type(x2), value_type(y2)); + } + + template + template + GLM_FUNC_DECL tmat2x2::tmat2x2 + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + this->value[0] = col_type(v1); + this->value[1] = col_type(v2); + } + + ////////////////////////////////////////////////////////////// + // mat2x2 matrix conversions + + template + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + tmat2x2 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + tmat3x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + tmat4x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + tmat2x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + tmat3x2 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + tmat2x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + tmat4x2 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + tmat3x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + tmat4x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 tmat2x2::_inverse() const + { + typename tmat2x2::value_type Determinant = this->value[0][0] * this->value[1][1] - this->value[1][0] * this->value[0][1]; + + tmat2x2 Inverse( + + this->value[1][1] / Determinant, + - this->value[0][1] / Determinant, + - this->value[1][0] / Determinant, + + this->value[0][0] / Determinant); + return Inverse; + } + + ////////////////////////////////////////////////////////////// + // mat2x2 operators + + // This function shouldn't required but it seems that VC7.1 have an optimisation bug if this operator wasn't declared + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator= + ( + tmat2x2 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator= + ( + tmat2x2 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator+= + ( + U const & s + ) + { + this->value[0] += s; + this->value[1] += s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator+= + ( + tmat2x2 const & m + ) + { + this->value[0] += m[0]; + this->value[1] += m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator-= + ( + U const & s + ) + { + this->value[0] -= s; + this->value[1] -= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator-= + ( + tmat2x2 const & m + ) + { + this->value[0] -= m[0]; + this->value[1] -= m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator*= + ( + U const & s + ) + { + this->value[0] *= s; + this->value[1] *= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator*= + ( + tmat2x2 const & m + ) + { + return (*this = *this * m); + } + + template + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator/= + ( + U const & s + ) + { + this->value[0] /= s; + this->value[1] /= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator/= + ( + tmat2x2 const & m + ) + { + return (*this = *this / m); + } + + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator++ () + { + ++this->value[0]; + ++this->value[1]; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator-- () + { + --this->value[0]; + --this->value[1]; + return *this; + } + + ////////////////////////////////////////////////////////////// + // Binary operators + + template + GLM_FUNC_QUALIFIER tmat2x2 operator+ + ( + tmat2x2 const & m, + typename tmat2x2::value_type const & s + ) + { + return tmat2x2( + m[0] + s, + m[1] + s); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator+ + ( + typename tmat2x2::value_type const & s, + tmat2x2 const & m + ) + { + return tmat2x2( + m[0] + s, + m[1] + s); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator+ + ( + tmat2x2 const & m1, + tmat2x2 const & m2 + ) + { + return tmat2x2( + m1[0] + m2[0], + m1[1] + m2[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator- + ( + tmat2x2 const & m, + typename tmat2x2::value_type const & s + ) + { + return tmat2x2( + m[0] - s, + m[1] - s); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator- + ( + typename tmat2x2::value_type const & s, + tmat2x2 const & m + ) + { + return tmat2x2( + s - m[0], + s - m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator- + ( + tmat2x2 const & m1, + tmat2x2 const & m2 + ) + { + return tmat2x2( + m1[0] - m2[0], + m1[1] - m2[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator* + ( + tmat2x2 const & m, + typename tmat2x2::value_type const & s + ) + { + return tmat2x2( + m[0] * s, + m[1] * s); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator* + ( + typename tmat2x2::value_type const & s, + tmat2x2 const & m + ) + { + return tmat2x2( + m[0] * s, + m[1] * s); + } + + template + GLM_FUNC_QUALIFIER typename tmat2x2::col_type operator* + ( + tmat2x2 const & m, + typename tmat2x2::row_type const & v + ) + { + return detail::tvec2( + m[0][0] * v.x + m[1][0] * v.y, + m[0][1] * v.x + m[1][1] * v.y); + } + + template + GLM_FUNC_QUALIFIER typename tmat2x2::row_type operator* + ( + typename tmat2x2::col_type const & v, + tmat2x2 const & m + ) + { + return detail::tvec2( + v.x * m[0][0] + v.y * m[0][1], + v.x * m[1][0] + v.y * m[1][1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator* + ( + tmat2x2 const & m1, + tmat2x2 const & m2 + ) + { + return tmat2x2( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1]); + } + + template + GLM_FUNC_QUALIFIER tmat3x2 operator* + ( + tmat2x2 const & m1, + tmat3x2 const & m2 + ) + { + return tmat3x2( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1]); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 operator* + ( + tmat2x2 const & m1, + tmat4x2 const & m2 + ) + { + return tmat4x2( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1], + m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1], + m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator/ + ( + tmat2x2 const & m, + typename tmat2x2::value_type const & s + ) + { + return tmat2x2( + m[0] / s, + m[1] / s); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator/ + ( + typename tmat2x2::value_type const & s, + tmat2x2 const & m + ) + { + return tmat2x2( + s / m[0], + s / m[1]); + } + + template + GLM_FUNC_QUALIFIER typename tmat2x2::col_type operator/ + ( + tmat2x2 const & m, + typename tmat2x2::row_type & v + ) + { + return m._inverse() * v; + } + + template + GLM_FUNC_QUALIFIER typename tmat2x2::row_type operator/ + ( + typename tmat2x2::col_type const & v, + tmat2x2 const & m + ) + { + return v * m._inverse(); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator/ + ( + tmat2x2 const & m1, + tmat2x2 const & m2 + ) + { + return m1 * m2._inverse(); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tmat2x2 const operator- + ( + tmat2x2 const & m + ) + { + return tmat2x2( + -m[0], + -m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 const operator++ + ( + tmat2x2 const & m, + int + ) + { + return tmat2x2( + m[0] + T(1), + m[1] + T(1)); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 const operator-- + ( + tmat2x2 const & m, + int + ) + { + return tmat2x2( + m[0] - T(1), + m[1] - T(1)); + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tmat2x2 const & m1, + tmat2x2 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tmat2x2 const & m1, + tmat2x2 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]); + } + +} //namespace detail +} //namespace glm diff --git a/include/gal/opengl/glm/core/type_mat2x3.hpp b/include/gal/opengl/glm/core/type_mat2x3.hpp new file mode 100644 index 0000000000..b079f46e99 --- /dev/null +++ b/include/gal/opengl/glm/core/type_mat2x3.hpp @@ -0,0 +1,258 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat2x3.hpp +/// @date 2006-10-01 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_mat2x3 +#define glm_core_type_mat2x3 + +#include "type_mat.hpp" + +namespace glm{ +namespace detail +{ + template struct tvec1; + template struct tvec2; + template struct tvec3; + template struct tvec4; + template struct tmat2x2; + template struct tmat2x3; + template struct tmat2x4; + template struct tmat3x2; + template struct tmat3x3; + template struct tmat3x4; + template struct tmat4x2; + template struct tmat4x3; + template struct tmat4x4; + + template + struct tmat2x3 + { + enum ctor{null}; + typedef T value_type; + typedef std::size_t size_type; + typedef tvec3 col_type; + typedef tvec2 row_type; + typedef tmat2x3 type; + typedef tmat3x2 transpose_type; + + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + private: + // Data + col_type value[2]; + + public: + // Constructors + GLM_FUNC_DECL tmat2x3(); + GLM_FUNC_DECL tmat2x3(tmat2x3 const & m); + + GLM_FUNC_DECL explicit tmat2x3( + ctor); + GLM_FUNC_DECL explicit tmat2x3( + value_type const & s); + GLM_FUNC_DECL explicit tmat2x3( + value_type const & x0, value_type const & y0, value_type const & z0, + value_type const & x1, value_type const & y1, value_type const & z1); + GLM_FUNC_DECL explicit tmat2x3( + col_type const & v0, + col_type const & v1); + + ////////////////////////////////////// + // Conversions + template + GLM_FUNC_DECL explicit tmat2x3( + U const & x); + + template + GLM_FUNC_DECL explicit tmat2x3( + X1 const & x1, Y1 const & y1, Z1 const & z1, + X2 const & x2, Y2 const & y2, Z2 const & z2); + + template + GLM_FUNC_DECL explicit tmat2x3( + tvec3 const & v1, + tvec3 const & v2); + + ////////////////////////////////////// + // Matrix conversion + template + GLM_FUNC_DECL explicit tmat2x3(tmat2x3 const & m); + + GLM_FUNC_DECL explicit tmat2x3(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat4x3 const & x); + + // Accesses + col_type & operator[](size_type i); + col_type const & operator[](size_type i) const; + + // Unary updatable operators + GLM_FUNC_DECL tmat2x3 & operator= (tmat2x3 const & m); + template + GLM_FUNC_DECL tmat2x3 & operator= (tmat2x3 const & m); + template + GLM_FUNC_DECL tmat2x3 & operator+= (U const & s); + template + GLM_FUNC_DECL tmat2x3 & operator+= (tmat2x3 const & m); + template + GLM_FUNC_DECL tmat2x3 & operator-= (U const & s); + template + GLM_FUNC_DECL tmat2x3 & operator-= (tmat2x3 const & m); + template + GLM_FUNC_DECL tmat2x3 & operator*= (U const & s); + template + GLM_FUNC_DECL tmat2x3 & operator*= (tmat2x3 const & m); + template + GLM_FUNC_DECL tmat2x3 & operator/= (U const & s); + + GLM_FUNC_DECL tmat2x3 & operator++ (); + GLM_FUNC_DECL tmat2x3 & operator-- (); + }; + + // Binary operators + template + tmat2x3 operator+ ( + tmat2x3 const & m, + typename tmat2x3::value_type const & s); + + template + tmat2x3 operator+ ( + tmat2x3 const & m1, + tmat2x3 const & m2); + + template + tmat2x3 operator- ( + tmat2x3 const & m, + typename tmat2x3::value_type const & s); + + template + tmat2x3 operator- ( + tmat2x3 const & m1, + tmat2x3 const & m2); + + template + tmat2x3 operator* ( + tmat2x3 const & m, + typename tmat2x3::value_type const & s); + + template + tmat2x3 operator* ( + typename tmat2x3::value_type const & s, + tmat2x3 const & m); + + template + typename tmat2x3::col_type operator* ( + tmat2x3 const & m, + typename tmat2x3::row_type const & v); + + template + typename tmat2x3::row_type operator* ( + typename tmat2x3::col_type const & v, + tmat2x3 const & m); + + template + tmat2x3 operator* ( + tmat2x3 const & m1, + tmat2x2 const & m2); + + template + tmat3x3 operator* ( + tmat2x3 const & m1, + tmat3x2 const & m2); + + template + tmat4x3 operator* ( + tmat2x3 const & m1, + tmat4x2 const & m2); + + template + tmat2x3 operator/ ( + tmat2x3 const & m, + typename tmat2x3::value_type const & s); + + template + tmat2x3 operator/ ( + typename tmat2x3::value_type const & s, + tmat2x3 const & m); + + // Unary constant operators + template + tmat2x3 const operator- ( + tmat2x3 const & m); + + template + tmat2x3 const operator-- ( + tmat2x3 const & m, + int); + + template + tmat2x3 const operator++ ( + tmat2x3 const & m, + int); + +} //namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 2 columns of 3 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x3 lowp_mat2x3; + + /// 2 columns of 3 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x3 mediump_mat2x3; + + /// 2 columns of 3 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x3 highp_mat2x3; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_mat2x3.inl" +#endif + +#endif //glm_core_type_mat2x3 diff --git a/include/gal/opengl/glm/core/type_mat2x3.inl b/include/gal/opengl/glm/core/type_mat2x3.inl new file mode 100644 index 0000000000..012edce3da --- /dev/null +++ b/include/gal/opengl/glm/core/type_mat2x3.inl @@ -0,0 +1,645 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat2x3.inl +/// @date 2006-08-05 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x3::size_type tmat2x3::length() const + { + return 2; + } + + template + GLM_FUNC_QUALIFIER typename tmat2x3::size_type tmat2x3::col_size() + { + return 3; + } + + template + GLM_FUNC_QUALIFIER typename tmat2x3::size_type tmat2x3::row_size() + { + return 2; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tmat2x3::col_type & + tmat2x3::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return this->value[i]; + } + + template + GLM_FUNC_QUALIFIER typename tmat2x3::col_type const & + tmat2x3::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return this->value[i]; + } + + ////////////////////////////////////////////////////////////// + // Constructors + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3() + { + this->value[0] = col_type(T(1), T(0), T(0)); + this->value[1] = col_type(T(0), T(1), T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + tmat2x3 const & m + ) + { + this->value[0] = m.value[0]; + this->value[1] = m.value[1]; + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + value_type const & s + ) + { + this->value[0] = col_type(s, T(0), T(0)); + this->value[1] = col_type(T(0), s, T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + value_type const & x0, value_type const & y0, value_type const & z0, + value_type const & x1, value_type const & y1, value_type const & z1 + ) + { + this->value[0] = col_type(x0, y0, z0); + this->value[1] = col_type(x1, y1, z1); + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + col_type const & v0, + col_type const & v1 + ) + { + this->value[0] = v0; + this->value[1] = v1; + } + + ////////////////////////////////////// + // Convertion constructors + template + template + GLM_FUNC_DECL tmat2x3::tmat2x3 + ( + U const & s + ) + { + value_type const Zero(0); + this->value[0] = tvec3(value_type(s), Zero, Zero); + this->value[1] = tvec3(Zero, value_type(s), Zero); + } + + template + template < + typename X1, typename Y1, typename Z1, + typename X2, typename Y2, typename Z2> + GLM_FUNC_DECL tmat2x3::tmat2x3 + ( + X1 const & x1, Y1 const & y1, Z1 const & z1, + X2 const & x2, Y2 const & y2, Z2 const & z2 + ) + { + this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1)); + this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2)); + } + + template + template + GLM_FUNC_DECL tmat2x3::tmat2x3 + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + this->value[0] = col_type(v1); + this->value[1] = col_type(v2); + } + + ////////////////////////////////////// + // Matrix conversions + + template + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + tmat2x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + tmat2x2 const & m + ) + { + this->value[0] = col_type(m[0], T(0)); + this->value[1] = col_type(m[1], T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + tmat3x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + tmat4x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + tmat2x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + tmat3x2 const & m + ) + { + this->value[0] = col_type(m[0], T(0)); + this->value[1] = col_type(m[1], T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + tmat3x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + tmat4x2 const & m + ) + { + this->value[0] = col_type(m[0], T(0)); + this->value[1] = col_type(m[1], T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + tmat4x3 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + } + + ////////////////////////////////////////////////////////////// + // Unary updatable operators + + template + GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator= + ( + tmat2x3 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator= + ( + tmat2x3 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator+= + ( + U const & s + ) + { + this->value[0] += s; + this->value[1] += s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator+= + ( + tmat2x3 const & m + ) + { + this->value[0] += m[0]; + this->value[1] += m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator-= + ( + U const & s + ) + { + this->value[0] -= s; + this->value[1] -= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator-= + ( + tmat2x3 const & m + ) + { + this->value[0] -= m[0]; + this->value[1] -= m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator*= + ( + U const & s + ) + { + this->value[0] *= s; + this->value[1] *= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator*= + ( + tmat2x3 const & m + ) + { + return (*this = tmat2x3(*this * m)); + } + + template + template + GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator/= + ( + U const & s + ) + { + this->value[0] /= s; + this->value[1] /= s; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator++ () + { + ++this->value[0]; + ++this->value[1]; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator-- () + { + --this->value[0]; + --this->value[1]; + return *this; + } + + ////////////////////////////////////////////////////////////// + // Binary operators + + template + GLM_FUNC_QUALIFIER tmat2x3 operator+ + ( + tmat2x3 const & m, + typename tmat2x3::value_type const & s + ) + { + return tmat2x3( + m[0] + s, + m[1] + s); + } + + template + GLM_FUNC_QUALIFIER tmat2x3 operator+ + ( + tmat2x3 const & m1, + tmat2x3 const & m2 + ) + { + return tmat2x3( + m1[0] + m2[0], + m1[1] + m2[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x3 operator- + ( + tmat2x3 const & m, + typename tmat2x3::value_type const & s + ) + { + return tmat2x3( + m[0] - s, + m[1] - s); + } + + template + GLM_FUNC_QUALIFIER tmat2x3 operator- + ( + tmat2x3 const & m1, + tmat2x3 const & m2 + ) + { + return tmat2x3( + m1[0] - m2[0], + m1[1] - m2[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x3 operator* + ( + tmat2x3 const & m, + typename tmat2x3::value_type const & s + ) + { + return tmat2x3( + m[0] * s, + m[1] * s); + } + + template + GLM_FUNC_QUALIFIER tmat2x3 operator* + ( + typename tmat2x3::value_type const & s, + tmat2x3 const & m + ) + { + return tmat2x3( + m[0] * s, + m[1] * s); + } + + template + GLM_FUNC_QUALIFIER typename tmat2x3::col_type operator* + ( + tmat2x3 const & m, + typename tmat2x3::row_type const & v) + { + return typename tmat2x3::col_type( + m[0][0] * v.x + m[1][0] * v.y, + m[0][1] * v.x + m[1][1] * v.y, + m[0][2] * v.x + m[1][2] * v.y); + } + + template + GLM_FUNC_QUALIFIER typename tmat2x3::row_type operator* + ( + typename tmat2x3::col_type const & v, + tmat2x3 const & m) + { + return typename tmat2x3::row_type( + v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2], + v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2]); + } + + template + GLM_FUNC_QUALIFIER tmat2x3 operator* + ( + tmat2x3 const & m1, + tmat2x2 const & m2 + ) + { + return tmat2x3( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1]); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator* + ( + tmat2x3 const & m1, + tmat3x2 const & m2 + ) + { + typename tmat2x3::value_type SrcA00 = m1[0][0]; + typename tmat2x3::value_type SrcA01 = m1[0][1]; + typename tmat2x3::value_type SrcA02 = m1[0][2]; + typename tmat2x3::value_type SrcA10 = m1[1][0]; + typename tmat2x3::value_type SrcA11 = m1[1][1]; + typename tmat2x3::value_type SrcA12 = m1[1][2]; + + typename tmat2x3::value_type SrcB00 = m2[0][0]; + typename tmat2x3::value_type SrcB01 = m2[0][1]; + typename tmat2x3::value_type SrcB10 = m2[1][0]; + typename tmat2x3::value_type SrcB11 = m2[1][1]; + typename tmat2x3::value_type SrcB20 = m2[2][0]; + typename tmat2x3::value_type SrcB21 = m2[2][1]; + + tmat3x3 Result(tmat3x3::null); + Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01; + Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01; + Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01; + Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11; + Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11; + Result[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11; + Result[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21; + Result[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21; + Result[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21; + return Result; + } + + template + GLM_FUNC_QUALIFIER tmat4x3 operator* + ( + tmat2x3 const & m1, + tmat4x2 const & m2 + ) + { + return tmat4x3( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1], + m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1], + m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1], + m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1], + m1[0][2] * m2[3][0] + m1[1][2] * m2[3][1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x3 operator/ + ( + tmat2x3 const & m, + typename tmat2x3::value_type const & s + ) + { + return tmat2x3( + m[0] / s, + m[1] / s); + } + + template + GLM_FUNC_QUALIFIER tmat2x3 operator/ + ( + typename tmat2x3::value_type const & s, + tmat2x3 const & m + ) + { + return tmat2x3( + s / m[0], + s / m[1]); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tmat2x3 const operator- + ( + tmat2x3 const & m + ) + { + return tmat2x3( + -m[0], + -m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x3 const operator++ + ( + tmat2x3 const & m, + int + ) + { + return tmat2x3( + m[0] + typename tmat2x3::value_type(1), + m[1] + typename tmat2x3::value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat2x3 const operator-- + ( + tmat2x3 const & m, + int + ) + { + return tmat2x3( + m[0] - typename tmat2x3::value_type(1), + m[1] - typename tmat2x3::value_type(1)); + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tmat2x3 const & m1, + tmat2x3 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tmat2x3 const & m1, + tmat2x3 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]); + } +} //namespace detail +} //namespace glm diff --git a/include/gal/opengl/glm/core/type_mat2x4.hpp b/include/gal/opengl/glm/core/type_mat2x4.hpp new file mode 100644 index 0000000000..cc6e2458db --- /dev/null +++ b/include/gal/opengl/glm/core/type_mat2x4.hpp @@ -0,0 +1,260 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat2x4.hpp +/// @date 2006-08-05 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_mat2x4 +#define glm_core_type_mat2x4 + +#include "type_mat.hpp" + +namespace glm{ +namespace detail +{ + template struct tvec1; + template struct tvec2; + template struct tvec3; + template struct tvec4; + template struct tmat2x2; + template struct tmat2x3; + template struct tmat2x4; + template struct tmat3x2; + template struct tmat3x3; + template struct tmat3x4; + template struct tmat4x2; + template struct tmat4x3; + template struct tmat4x4; + + template + struct tmat2x4 + { + enum ctor{null}; + typedef T value_type; + typedef std::size_t size_type; + typedef tvec4 col_type; + typedef tvec2 row_type; + typedef tmat2x4 type; + typedef tmat4x2 transpose_type; + + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + private: + // Data + col_type value[2]; + + public: + // Constructors + GLM_FUNC_DECL tmat2x4(); + GLM_FUNC_DECL tmat2x4(tmat2x4 const & m); + + GLM_FUNC_DECL explicit tmat2x4( + ctor); + GLM_FUNC_DECL explicit tmat2x4( + value_type const & s); + GLM_FUNC_DECL explicit tmat2x4( + value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, + value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1); + GLM_FUNC_DECL explicit tmat2x4( + col_type const & v0, + col_type const & v1); + + ////////////////////////////////////// + // Conversions + template + GLM_FUNC_DECL explicit tmat2x4( + U const & x); + + template < + typename X1, typename Y1, typename Z1, typename W1, + typename X2, typename Y2, typename Z2, typename W2> + GLM_FUNC_DECL explicit tmat2x4( + X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, + X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2); + + template + GLM_FUNC_DECL explicit tmat2x4( + tvec4 const & v1, + tvec4 const & v2); + + ////////////////////////////////////// + // Matrix conversions + template + GLM_FUNC_DECL explicit tmat2x4(tmat2x4 const & m); + + GLM_FUNC_DECL explicit tmat2x4(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat4x3 const & x); + + // Accesses + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; + + // Unary updatable operators + GLM_FUNC_DECL tmat2x4& operator= (tmat2x4 const & m); + template + GLM_FUNC_DECL tmat2x4& operator= (tmat2x4 const & m); + template + GLM_FUNC_DECL tmat2x4& operator+= (U const & s); + template + GLM_FUNC_DECL tmat2x4& operator+= (tmat2x4 const & m); + template + GLM_FUNC_DECL tmat2x4& operator-= (U const & s); + template + GLM_FUNC_DECL tmat2x4& operator-= (tmat2x4 const & m); + template + GLM_FUNC_DECL tmat2x4& operator*= (U const & s); + template + GLM_FUNC_DECL tmat2x4& operator*= (tmat2x4 const & m); + template + GLM_FUNC_DECL tmat2x4& operator/= (U const & s); + + GLM_FUNC_DECL tmat2x4& operator++ (); + GLM_FUNC_DECL tmat2x4& operator-- (); + }; + + // Binary operators + template + tmat2x4 operator+ ( + tmat2x4 const & m, + typename tmat2x4::value_type const & s); + + template + tmat2x4 operator+ ( + tmat2x4 const & m1, + tmat2x4 const & m2); + + template + tmat2x4 operator- ( + tmat2x4 const & m, + typename tmat2x4::value_type const & s); + + template + tmat2x4 operator- ( + tmat2x4 const & m1, + tmat2x4 const & m2); + + template + tmat2x4 operator* ( + tmat2x4 const & m, + typename tmat2x4::value_type const & s); + + template + tmat2x4 operator* ( + typename tmat2x4::value_type const & s, + tmat2x4 const & m); + + template + typename tmat2x4::col_type operator* ( + tmat2x4 const & m, + typename tmat2x4::row_type const & v); + + template + typename tmat2x4::row_type operator* ( + typename tmat2x4::col_type const & v, + tmat2x4 const & m); + + template + tmat4x4 operator* ( + tmat2x4 const & m1, + tmat4x2 const & m2); + + template + tmat2x4 operator* ( + tmat2x4 const & m1, + tmat2x2 const & m2); + + template + tmat3x4 operator* ( + tmat2x4 const & m1, + tmat3x2 const & m2); + + template + tmat2x4 operator/ ( + tmat2x4 const & m, + typename tmat2x4::value_type const & s); + + template + tmat2x4 operator/ ( + typename tmat2x4::value_type const & s, + tmat2x4 const & m); + + // Unary constant operators + template + tmat2x4 const operator- ( + tmat2x4 const & m); + + template + tmat2x4 const operator-- ( + tmat2x4 const & m, + int); + + template + tmat2x4 const operator++ ( + tmat2x4 const & m, + int); + +} //namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 2 columns of 4 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x4 lowp_mat2x4; + + /// 2 columns of 4 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x4 mediump_mat2x4; + + /// 2 columns of 4 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x4 highp_mat2x4; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_mat2x4.inl" +#endif + +#endif //glm_core_type_mat2x4 diff --git a/include/gal/opengl/glm/core/type_mat2x4.inl b/include/gal/opengl/glm/core/type_mat2x4.inl new file mode 100644 index 0000000000..efcf77d9a5 --- /dev/null +++ b/include/gal/opengl/glm/core/type_mat2x4.inl @@ -0,0 +1,664 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat2x4.inl +/// @date 2006-08-05 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x4::size_type tmat2x4::length() const + { + return 2; + } + + template + GLM_FUNC_QUALIFIER typename tmat2x4::size_type tmat2x4::col_size() + { + return 4; + } + + template + GLM_FUNC_QUALIFIER typename tmat2x4::size_type tmat2x4::row_size() + { + return 2; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tmat2x4::col_type & + tmat2x4::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return this->value[i]; + } + + template + GLM_FUNC_QUALIFIER typename tmat2x4::col_type const & + tmat2x4::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return this->value[i]; + } + + ////////////////////////////////////////////////////////////// + // Constructors + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4() + { + value_type const Zero(0); + value_type const One(1); + this->value[0] = col_type(One, Zero, Zero, Zero); + this->value[1] = col_type(Zero, One, Zero, Zero); + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + tmat2x4 const & m + ) + { + this->value[0] = m.value[0]; + this->value[1] = m.value[1]; + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + value_type const & s + ) + { + value_type const Zero(0); + this->value[0] = col_type(s, Zero, Zero, Zero); + this->value[1] = col_type(Zero, Zero, Zero, Zero); + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, + value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1 + ) + { + this->value[0] = col_type(x0, y0, z0, w0); + this->value[1] = col_type(x1, y1, z1, w1); + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + col_type const & v0, + col_type const & v1 + ) + { + this->value[0] = v0; + this->value[1] = v1; + } + + ////////////////////////////////////// + // Convertion constructors + template + template + GLM_FUNC_DECL tmat2x4::tmat2x4 + ( + U const & s + ) + { + value_type const Zero(0); + this->value[0] = tvec4(value_type(s), Zero, Zero, Zero); + this->value[1] = tvec4(Zero, value_type(s), Zero, Zero); + } + + template + template < + typename X1, typename Y1, typename Z1, typename W1, + typename X2, typename Y2, typename Z2, typename W2> + GLM_FUNC_DECL tmat2x4::tmat2x4 + ( + X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, + X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2 + ) + { + this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1), value_type(w1)); + this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2), value_type(w2)); + } + + template + template + GLM_FUNC_DECL tmat2x4::tmat2x4 + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + this->value[0] = col_type(v1); + this->value[1] = col_type(v2); + } + + ////////////////////////////////////// + // Matrix conversions + + template + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + tmat2x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + tmat2x2 const & m + ) + { + this->value[0] = col_type(m[0], detail::tvec2(0)); + this->value[1] = col_type(m[1], detail::tvec2(0)); + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + tmat3x3 const & m + ) + { + this->value[0] = col_type(m[0], T(0)); + this->value[1] = col_type(m[1], T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + tmat4x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + tmat2x3 const & m + ) + { + this->value[0] = col_type(m[0], T(0)); + this->value[1] = col_type(m[1], T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + tmat3x2 const & m + ) + { + this->value[0] = col_type(m[0], detail::tvec2(0)); + this->value[1] = col_type(m[1], detail::tvec2(0)); + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + tmat3x4 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + tmat4x2 const & m + ) + { + this->value[0] = col_type(m[0], detail::tvec2(T(0))); + this->value[1] = col_type(m[1], detail::tvec2(T(0))); + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + tmat4x3 const & m + ) + { + this->value[0] = col_type(m[0], T(0)); + this->value[1] = col_type(m[1], T(0)); + } + + ////////////////////////////////////////////////////////////// + // Unary updatable operators + + template + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator= + ( + tmat2x4 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator= + ( + tmat2x4 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator+= + ( + U const & s + ) + { + this->value[0] += s; + this->value[1] += s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator+= + ( + tmat2x4 const & m + ) + { + this->value[0] += m[0]; + this->value[1] += m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator-= + ( + U const & s + ) + { + this->value[0] -= s; + this->value[1] -= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator-= + ( + tmat2x4 const & m + ) + { + this->value[0] -= m[0]; + this->value[1] -= m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator*= + ( + U const & s + ) + { + this->value[0] *= s; + this->value[1] *= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator*= + ( + tmat2x4 const & m + ) + { + return (*this = tmat2x4(*this * m)); + } + + template + template + GLM_FUNC_QUALIFIER tmat2x4 & tmat2x4::operator/= + ( + U const & s + ) + { + this->value[0] /= s; + this->value[1] /= s; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator++ () + { + ++this->value[0]; + ++this->value[1]; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator-- () + { + --this->value[0]; + --this->value[1]; + return *this; + } + + ////////////////////////////////////////////////////////////// + // Binary operators + + template + GLM_FUNC_QUALIFIER tmat2x4 operator+ + ( + tmat2x4 const & m, + typename tmat2x4::value_type const & s + ) + { + return tmat2x4( + m[0] + s, + m[1] + s); + } + + template + GLM_FUNC_QUALIFIER tmat2x4 operator+ + ( + tmat2x4 const & m1, + tmat2x4 const & m2 + ) + { + return tmat2x4( + m1[0] + m2[0], + m1[1] + m2[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x4 operator- + ( + tmat2x4 const & m, + typename tmat2x4::value_type const & s + ) + { + return tmat2x4( + m[0] - s, + m[1] - s); + } + + template + GLM_FUNC_QUALIFIER tmat2x4 operator- + ( + tmat2x4 const & m1, + tmat2x4 const & m2 + ) + { + return tmat2x4( + m1[0] - m2[0], + m1[1] - m2[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x4 operator* + ( + tmat2x4 const & m, + typename tmat2x4::value_type const & s + ) + { + return tmat2x4( + m[0] * s, + m[1] * s); + } + + template + GLM_FUNC_QUALIFIER tmat2x4 operator* + ( + typename tmat2x4::value_type const & s, + tmat2x4 const & m + ) + { + return tmat2x4( + m[0] * s, + m[1] * s); + } + + template + GLM_FUNC_QUALIFIER typename tmat2x4::col_type operator* + ( + tmat2x4 const & m, + typename tmat2x4::row_type const & v + ) + { + return typename tmat2x4::col_type( + m[0][0] * v.x + m[1][0] * v.y, + m[0][1] * v.x + m[1][1] * v.y, + m[0][2] * v.x + m[1][2] * v.y, + m[0][3] * v.x + m[1][3] * v.y); + } + + template + GLM_FUNC_QUALIFIER typename tmat2x4::row_type operator* + ( + typename tmat2x4::col_type const & v, + tmat2x4 const & m + ) + { + return typename tmat2x4::row_type( + v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2] + v.w * m[0][3], + v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2] + v.w * m[1][3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator* + ( + tmat2x4 const & m1, + tmat4x2 const & m2 + ) + { + typename tmat2x4::value_type SrcA00 = m1[0][0]; + typename tmat2x4::value_type SrcA01 = m1[0][1]; + typename tmat2x4::value_type SrcA02 = m1[0][2]; + typename tmat2x4::value_type SrcA03 = m1[0][3]; + typename tmat2x4::value_type SrcA10 = m1[1][0]; + typename tmat2x4::value_type SrcA11 = m1[1][1]; + typename tmat2x4::value_type SrcA12 = m1[1][2]; + typename tmat2x4::value_type SrcA13 = m1[1][3]; + + typename tmat2x4::value_type SrcB00 = m2[0][0]; + typename tmat2x4::value_type SrcB01 = m2[0][1]; + typename tmat2x4::value_type SrcB10 = m2[1][0]; + typename tmat2x4::value_type SrcB11 = m2[1][1]; + typename tmat2x4::value_type SrcB20 = m2[2][0]; + typename tmat2x4::value_type SrcB21 = m2[2][1]; + typename tmat2x4::value_type SrcB30 = m2[3][0]; + typename tmat2x4::value_type SrcB31 = m2[3][1]; + + tmat4x4 Result(tmat4x4::null); + Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01; + Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01; + Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01; + Result[0][3] = SrcA03 * SrcB00 + SrcA13 * SrcB01; + Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11; + Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11; + Result[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11; + Result[1][3] = SrcA03 * SrcB10 + SrcA13 * SrcB11; + Result[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21; + Result[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21; + Result[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21; + Result[2][3] = SrcA03 * SrcB20 + SrcA13 * SrcB21; + Result[3][0] = SrcA00 * SrcB30 + SrcA10 * SrcB31; + Result[3][1] = SrcA01 * SrcB30 + SrcA11 * SrcB31; + Result[3][2] = SrcA02 * SrcB30 + SrcA12 * SrcB31; + Result[3][3] = SrcA03 * SrcB30 + SrcA13 * SrcB31; + return Result; + } + + template + GLM_FUNC_QUALIFIER tmat2x4 operator* + ( + tmat2x4 const & m1, + tmat2x2 const & m2 + ) + { + return tmat2x4( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1], + m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1], + m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1]); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 operator* + ( + tmat2x4 const & m1, + tmat3x2 const & m2 + ) + { + return tmat3x4( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1], + m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1], + m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1], + m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1], + m1[0][3] * m2[2][0] + m1[1][3] * m2[2][1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x4 operator/ + ( + tmat2x4 const & m, + typename tmat2x4::value_type const & s + ) + { + return tmat2x4( + m[0] / s, + m[1] / s); + } + + template + GLM_FUNC_QUALIFIER tmat2x4 operator/ + ( + typename tmat2x4::value_type const & s, + tmat2x4 const & m + ) + { + return tmat2x4( + s / m[0], + s / m[1]); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tmat2x4 const operator- + ( + tmat2x4 const & m + ) + { + return tmat2x4( + -m[0], + -m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x4 const operator++ + ( + tmat2x4 const & m, + int + ) + { + return tmat2x4( + m[0] + typename tmat2x4::value_type(1), + m[1] + typename tmat2x4::value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat2x4 const operator-- + ( + tmat2x4 const & m, + int + ) + { + return tmat2x4( + m[0] - typename tmat2x4::value_type(1), + m[1] - typename tmat2x4::value_type(1)); + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tmat2x4 const & m1, + tmat2x4 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tmat2x4 const & m1, + tmat2x4 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]); + } +} //namespace detail +} //namespace glm diff --git a/include/gal/opengl/glm/core/type_mat3x2.hpp b/include/gal/opengl/glm/core/type_mat3x2.hpp new file mode 100644 index 0000000000..d96b104e51 --- /dev/null +++ b/include/gal/opengl/glm/core/type_mat3x2.hpp @@ -0,0 +1,265 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat3x2.hpp +/// @date 2006-08-05 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_mat3x2 +#define glm_core_type_mat3x2 + +#include "type_mat.hpp" + +namespace glm{ +namespace detail +{ + template struct tvec1; + template struct tvec2; + template struct tvec3; + template struct tvec4; + template struct tmat2x2; + template struct tmat2x3; + template struct tmat2x4; + template struct tmat3x2; + template struct tmat3x3; + template struct tmat3x4; + template struct tmat4x2; + template struct tmat4x3; + template struct tmat4x4; + + template + struct tmat3x2 + { + enum ctor{null}; + typedef T value_type; + typedef std::size_t size_type; + typedef tvec2 col_type; + typedef tvec3 row_type; + typedef tmat3x2 type; + typedef tmat2x3 transpose_type; + + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + private: + // Data + col_type value[3]; + + public: + // Constructors + GLM_FUNC_DECL tmat3x2(); + GLM_FUNC_DECL tmat3x2(tmat3x2 const & m); + + GLM_FUNC_DECL explicit tmat3x2( + ctor); + GLM_FUNC_DECL explicit tmat3x2( + value_type const & s); + GLM_FUNC_DECL explicit tmat3x2( + value_type const & x0, value_type const & y0, + value_type const & x1, value_type const & y1, + value_type const & x2, value_type const & y2); + GLM_FUNC_DECL explicit tmat3x2( + col_type const & v0, + col_type const & v1, + col_type const & v2); + + ////////////////////////////////////// + // Conversions + template + GLM_FUNC_DECL explicit tmat3x2( + U const & x); + + template + < + typename X1, typename Y1, + typename X2, typename Y2, + typename X3, typename Y3 + > + GLM_FUNC_DECL explicit tmat3x2( + X1 const & x1, Y1 const & y1, + X2 const & x2, Y2 const & y2, + X3 const & x3, Y3 const & y3); + + template + GLM_FUNC_DECL explicit tmat3x2( + tvec2 const & v1, + tvec2 const & v2, + tvec2 const & v3); + + // Matrix conversions + template + GLM_FUNC_DECL explicit tmat3x2(tmat3x2 const & m); + + GLM_FUNC_DECL explicit tmat3x2(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat4x3 const & x); + + // Accesses + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; + + // Unary updatable operators + GLM_FUNC_DECL tmat3x2 & operator= (tmat3x2 const & m); + template + GLM_FUNC_DECL tmat3x2 & operator= (tmat3x2 const & m); + template + GLM_FUNC_DECL tmat3x2 & operator+= (U const & s); + template + GLM_FUNC_DECL tmat3x2 & operator+= (tmat3x2 const & m); + template + GLM_FUNC_DECL tmat3x2 & operator-= (U const & s); + template + GLM_FUNC_DECL tmat3x2 & operator-= (tmat3x2 const & m); + template + GLM_FUNC_DECL tmat3x2 & operator*= (U const & s); + template + GLM_FUNC_DECL tmat3x2 & operator*= (tmat3x2 const & m); + template + GLM_FUNC_DECL tmat3x2 & operator/= (U const & s); + + GLM_FUNC_DECL tmat3x2 & operator++ (); + GLM_FUNC_DECL tmat3x2 & operator-- (); + }; + + // Binary operators + template + tmat3x2 operator+ ( + tmat3x2 const & m, + typename tmat3x2::value_type const & s); + + template + tmat3x2 operator+ ( + tmat3x2 const & m1, + tmat3x2 const & m2); + + template + tmat3x2 operator- ( + tmat3x2 const & m, + typename tmat3x2::value_type const & s); + + template + tmat3x2 operator- ( + tmat3x2 const & m1, + tmat3x2 const & m2); + + template + tmat3x2 operator* ( + tmat3x2 const & m, + typename tmat3x2::value_type const & s); + + template + tmat3x2 operator* ( + typename tmat3x2::value_type const & s, + tmat3x2 const & m); + + template + typename tmat3x2::col_type operator* ( + tmat3x2 const & m, + typename tmat3x2::row_type const & v); + + template + typename tmat3x2::row_type operator* ( + typename tmat3x2::col_type const & v, + tmat3x2 const & m); + + template + tmat2x2 operator* ( + tmat3x2 const & m1, + tmat2x3 const & m2); + + template + tmat3x2 operator* ( + tmat3x2 const & m1, + tmat3x3 const & m2); + + template + tmat4x2 operator* ( + tmat3x2 const & m1, + tmat4x3 const & m2); + + template + tmat3x2 operator/ ( + tmat3x2 const & m, + typename tmat3x2::value_type const & s); + + template + tmat3x2 operator/ ( + typename tmat3x2::value_type const & s, + tmat3x2 const & m); + + // Unary constant operators + template + tmat3x2 const operator- ( + tmat3x2 const & m); + + template + tmat3x2 const operator-- ( + tmat3x2 const & m, + int); + + template + tmat3x2 const operator++ ( + tmat3x2 const & m, + int); +} //namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 3 columns of 2 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x2 lowp_mat3x2; + + /// 3 columns of 2 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x2 mediump_mat3x2; + + /// 3 columns of 2 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x2 highp_mat3x2; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_mat3x2.inl" +#endif + +#endif //glm_core_type_mat3x2 diff --git a/include/gal/opengl/glm/core/type_mat3x2.inl b/include/gal/opengl/glm/core/type_mat3x2.inl new file mode 100644 index 0000000000..6366d49633 --- /dev/null +++ b/include/gal/opengl/glm/core/type_mat3x2.inl @@ -0,0 +1,682 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat3x2.inl +/// @date 2006-08-05 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x2::size_type tmat3x2::length() const + { + return 3; + } + + template + GLM_FUNC_QUALIFIER typename tmat3x2::size_type tmat3x2::col_size() + { + return 2; + } + + template + GLM_FUNC_QUALIFIER typename tmat3x2::size_type tmat3x2::row_size() + { + return 3; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tmat3x2::col_type & + tmat3x2::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return this->value[i]; + } + + template + GLM_FUNC_QUALIFIER typename tmat3x2::col_type const & + tmat3x2::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return this->value[i]; + } + + ////////////////////////////////////////////////////////////// + // Constructors + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2() + { + this->value[0] = col_type(1, 0); + this->value[1] = col_type(0, 1); + this->value[2] = col_type(0, 0); + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + tmat3x2 const & m + ) + { + this->value[0] = m.value[0]; + this->value[1] = m.value[1]; + this->value[2] = m.value[2]; + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + value_type const & s + ) + { + this->value[0] = col_type(s, 0); + this->value[1] = col_type(0, s); + this->value[2] = col_type(0, 0); + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + value_type const & x0, value_type const & y0, + value_type const & x1, value_type const & y1, + value_type const & x2, value_type const & y2 + ) + { + this->value[0] = col_type(x0, y0); + this->value[1] = col_type(x1, y1); + this->value[2] = col_type(x2, y2); + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + col_type const & v0, + col_type const & v1, + col_type const & v2 + ) + { + this->value[0] = v0; + this->value[1] = v1; + this->value[2] = v2; + } + + ////////////////////////////////////// + // Convertion constructors + template + template + GLM_FUNC_DECL tmat3x2::tmat3x2 + ( + U const & s + ) + { + value_type const Zero(0); + this->value[0] = tvec2(value_type(s), Zero); + this->value[1] = tvec2(Zero, value_type(s)); + this->value[2] = tvec2(Zero); + } + + template + template < + typename X1, typename Y1, + typename X2, typename Y2, + typename X3, typename Y3> + GLM_FUNC_DECL tmat3x2::tmat3x2 + ( + X1 const & x1, Y1 const & y1, + X2 const & x2, Y2 const & y2, + X3 const & x3, Y3 const & y3 + ) + { + this->value[0] = col_type(value_type(x1), value_type(y1)); + this->value[1] = col_type(value_type(x2), value_type(y2)); + this->value[2] = col_type(value_type(x3), value_type(y3)); + } + + template + template + GLM_FUNC_DECL tmat3x2::tmat3x2 + ( + tvec2 const & v1, + tvec2 const & v2, + tvec2 const & v3 + ) + { + this->value[0] = col_type(v1); + this->value[1] = col_type(v2); + this->value[2] = col_type(v3); + } + + ////////////////////////////////////////////////////////////// + // mat3x2 matrix conversions + + template + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + tmat3x2 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + tmat2x2 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = col_type(T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + tmat3x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + tmat4x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + tmat2x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + tmat2x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + tmat3x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + tmat4x2 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + tmat4x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + } + + ////////////////////////////////////////////////////////////// + // Unary updatable operators + + template + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator= + ( + tmat3x2 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator= + ( + tmat3x2 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator+= + ( + U const & s + ) + { + this->value[0] += s; + this->value[1] += s; + this->value[2] += s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator+= + ( + tmat3x2 const & m + ) + { + this->value[0] += m[0]; + this->value[1] += m[1]; + this->value[2] += m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator-= + ( + U const & s + ) + { + this->value[0] -= s; + this->value[1] -= s; + this->value[2] -= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator-= + ( + tmat3x2 const & m + ) + { + this->value[0] -= m[0]; + this->value[1] -= m[1]; + this->value[2] -= m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator*= + ( + U const & s + ) + { + this->value[0] *= s; + this->value[1] *= s; + this->value[2] *= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator*= + ( + tmat3x2 const & m + ) + { + return (*this = tmat3x2(*this * m)); + } + + template + template + GLM_FUNC_QUALIFIER tmat3x2 & tmat3x2::operator/= + ( + U const & s + ) + { + this->value[0] /= s; + this->value[1] /= s; + this->value[2] /= s; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator++ () + { + ++this->value[0]; + ++this->value[1]; + ++this->value[2]; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator-- () + { + --this->value[0]; + --this->value[1]; + --this->value[2]; + return *this; + } + + ////////////////////////////////////////////////////////////// + // Binary operators + + template + GLM_FUNC_QUALIFIER tmat3x2 operator+ + ( + tmat3x2 const & m, + typename tmat3x2::value_type const & s + ) + { + return tmat3x2( + m[0] + s, + m[1] + s, + m[2] + s); + } + + template + GLM_FUNC_QUALIFIER tmat3x2 operator+ + ( + tmat3x2 const & m1, + tmat3x2 const & m2 + ) + { + return tmat3x2( + m1[0] + m2[0], + m1[1] + m2[1], + m1[2] + m2[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x2 operator- + ( + tmat3x2 const & m, + typename tmat3x2::value_type const & s + ) + { + return tmat3x2( + m[0] - s, + m[1] - s, + m[2] - s); + } + + template + GLM_FUNC_QUALIFIER tmat3x2 operator- + ( + tmat3x2 const & m1, + tmat3x2 const & m2 + ) + { + return tmat3x2( + m1[0] - m2[0], + m1[1] - m2[1], + m1[2] - m2[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x2 operator* + ( + tmat3x2 const & m, + typename tmat3x2::value_type const & s + ) + { + return tmat3x2( + m[0] * s, + m[1] * s, + m[2] * s); + } + + template + GLM_FUNC_QUALIFIER tmat3x2 operator* + ( + typename tmat3x2::value_type const & s, + tmat3x2 const & m + ) + { + return tmat3x2( + m[0] * s, + m[1] * s, + m[2] * s); + } + + template + GLM_FUNC_QUALIFIER typename tmat3x2::col_type operator* + ( + tmat3x2 const & m, + typename tmat3x2::row_type const & v) + { + return typename tmat3x2::col_type( + m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z, + m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z); + } + + template + GLM_FUNC_QUALIFIER typename tmat3x2::row_type operator* + ( + typename tmat3x2::col_type const & v, + tmat3x2 const & m) + { + return typename tmat3x2::row_type( + v.x * m[0][0] + v.y * m[0][1], + v.x * m[1][0] + v.y * m[1][1], + v.x * m[2][0] + v.y * m[2][1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator* + ( + tmat3x2 const & m1, + tmat2x3 const & m2 + ) + { + const T SrcA00 = m1[0][0]; + const T SrcA01 = m1[0][1]; + const T SrcA10 = m1[1][0]; + const T SrcA11 = m1[1][1]; + const T SrcA20 = m1[2][0]; + const T SrcA21 = m1[2][1]; + + const T SrcB00 = m2[0][0]; + const T SrcB01 = m2[0][1]; + const T SrcB02 = m2[0][2]; + const T SrcB10 = m2[1][0]; + const T SrcB11 = m2[1][1]; + const T SrcB12 = m2[1][2]; + + tmat2x2 Result(tmat2x2::null); + Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02; + Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02; + Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12; + Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12; + return Result; + } + + template + GLM_FUNC_QUALIFIER tmat3x2 operator* + ( + tmat3x2 const & m1, + tmat3x3 const & m2 + ) + { + return tmat3x2( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2]); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 operator* + ( + tmat3x2 const & m1, + tmat4x3 const & m2 + ) + { + return tmat4x2( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2], + m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2], + m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x2 operator/ + ( + tmat3x2 const & m, + typename tmat3x2::value_type const & s + ) + { + return tmat3x2( + m[0] / s, + m[1] / s, + m[2] / s); + } + + template + GLM_FUNC_QUALIFIER tmat3x2 operator/ + ( + typename tmat3x2::value_type const & s, + tmat3x2 const & m + ) + { + return tmat3x2( + s / m[0], + s / m[1], + s / m[2]); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tmat3x2 const operator- + ( + tmat3x2 const & m + ) + { + return tmat3x2( + -m[0], + -m[1], + -m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x2 const operator++ + ( + tmat3x2 const & m, + int + ) + { + typename tmat3x2::value_type One(1); + return tmat3x2( + m[0] + One, + m[1] + One, + m[2] + One); + } + + template + GLM_FUNC_QUALIFIER tmat3x2 const operator-- + ( + tmat3x2 const & m, + int + ) + { + typename tmat3x2::value_type One(1); + return tmat3x2( + m[0] - One, + m[1] - One, + m[2] - One); + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tmat3x2 const & m1, + tmat3x2 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tmat3x2 const & m1, + tmat3x2 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]); + } + +} //namespace detail +} //namespace glm diff --git a/include/gal/opengl/glm/core/type_mat3x3.hpp b/include/gal/opengl/glm/core/type_mat3x3.hpp new file mode 100644 index 0000000000..2df7e8fcd9 --- /dev/null +++ b/include/gal/opengl/glm/core/type_mat3x3.hpp @@ -0,0 +1,318 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat3x3.hpp +/// @date 2005-01-27 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_mat3x3 +#define glm_core_type_mat3x3 + +#include "type_mat.hpp" + +namespace glm{ +namespace detail +{ + template struct tvec1; + template struct tvec2; + template struct tvec3; + template struct tvec4; + template struct tmat2x2; + template struct tmat2x3; + template struct tmat2x4; + template struct tmat3x2; + template struct tmat3x3; + template struct tmat3x4; + template struct tmat4x2; + template struct tmat4x3; + template struct tmat4x4; + + template + struct tmat3x3 + { + enum ctor{null}; + typedef T value_type; + typedef std::size_t size_type; + typedef tvec3 col_type; + typedef tvec3 row_type; + typedef tmat3x3 type; + typedef tmat3x3 transpose_type; + + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + public: + /// Implementation detail + /// @cond DETAIL + GLM_FUNC_DECL tmat3x3 _inverse() const; + /// @endcond + + private: + // Data + col_type value[3]; + + public: + // Constructors + GLM_FUNC_DECL tmat3x3(); + GLM_FUNC_DECL tmat3x3(tmat3x3 const & m); + + GLM_FUNC_DECL explicit tmat3x3( + ctor Null); + GLM_FUNC_DECL explicit tmat3x3( + value_type const & s); + GLM_FUNC_DECL explicit tmat3x3( + value_type const & x0, value_type const & y0, value_type const & z0, + value_type const & x1, value_type const & y1, value_type const & z1, + value_type const & x2, value_type const & y2, value_type const & z2); + GLM_FUNC_DECL explicit tmat3x3( + col_type const & v0, + col_type const & v1, + col_type const & v2); + + ////////////////////////////////////// + // Conversions + template + GLM_FUNC_DECL explicit tmat3x3( + U const & x); + + template + < + typename X1, typename Y1, typename Z1, + typename X2, typename Y2, typename Z2, + typename X3, typename Y3, typename Z3 + > + GLM_FUNC_DECL explicit tmat3x3( + X1 const & x1, Y1 const & y1, Z1 const & z1, + X2 const & x2, Y2 const & y2, Z2 const & z2, + X3 const & x3, Y3 const & y3, Z3 const & z3); + + template + GLM_FUNC_DECL explicit tmat3x3( + tvec3 const & v1, + tvec3 const & v2, + tvec3 const & v3); + + // Matrix conversions + template + GLM_FUNC_DECL explicit tmat3x3(tmat3x3 const & m); + + GLM_FUNC_DECL explicit tmat3x3(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat4x3 const & x); + + // Accesses + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; + + // Unary updatable operators + GLM_FUNC_DECL tmat3x3& operator= (tmat3x3 const & m); + template + GLM_FUNC_DECL tmat3x3& operator= (tmat3x3 const & m); + template + GLM_FUNC_DECL tmat3x3& operator+= (U const & s); + template + GLM_FUNC_DECL tmat3x3& operator+= (tmat3x3 const & m); + template + GLM_FUNC_DECL tmat3x3& operator-= (U const & s); + template + GLM_FUNC_DECL tmat3x3& operator-= (tmat3x3 const & m); + template + GLM_FUNC_DECL tmat3x3& operator*= (U const & s); + template + GLM_FUNC_DECL tmat3x3& operator*= (tmat3x3 const & m); + template + GLM_FUNC_DECL tmat3x3& operator/= (U const & s); + template + GLM_FUNC_DECL tmat3x3& operator/= (tmat3x3 const & m); + GLM_FUNC_DECL tmat3x3& operator++ (); + GLM_FUNC_DECL tmat3x3& operator-- (); + }; + + // Binary operators + template + tmat3x3 operator+ ( + tmat3x3 const & m, + typename tmat3x3::value_type const & s); + + template + tmat3x3 operator+ ( + typename tmat3x3::value_type const & s, + tmat3x3 const & m); + + template + tmat3x3 operator+ ( + tmat3x3 const & m1, + tmat3x3 const & m2); + + template + tmat3x3 operator- ( + tmat3x3 const & m, + typename tmat3x3::value_type const & s); + + template + tmat3x3 operator- ( + typename tmat3x3::value_type const & s, + tmat3x3 const & m); + + template + tmat3x3 operator- ( + tmat3x3 const & m1, + tmat3x3 const & m2); + + template + tmat3x3 operator* ( + tmat3x3 const & m, + typename tmat3x3::value_type const & s); + + template + tmat3x3 operator* ( + typename tmat3x3::value_type const & s, + tmat3x3 const & m); + + template + typename tmat3x3::col_type operator* ( + tmat3x3 const & m, + typename tmat3x3::row_type const & v); + + template + typename tmat3x3::row_type operator* ( + typename tmat3x3::col_type const & v, + tmat3x3 const & m); + + template + tmat3x3 operator* ( + tmat3x3 const & m1, + tmat3x3 const & m2); + + template + tmat2x3 operator* ( + tmat3x3 const & m1, + tmat2x3 const & m2); + + template + tmat4x3 operator* ( + tmat3x3 const & m1, + tmat4x3 const & m2); + + template + tmat3x3 operator/ ( + tmat3x3 const & m, + typename tmat3x3::value_type const & s); + + template + tmat3x3 operator/ ( + typename tmat3x3::value_type const & s, + tmat3x3 const & m); + + template + typename tmat3x3::col_type operator/ ( + tmat3x3 const & m, + typename tmat3x3::row_type const & v); + + template + typename tmat3x3::row_type operator/ ( + typename tmat3x3::col_type const & v, + tmat3x3 const & m); + + template + tmat3x3 operator/ ( + tmat3x3 const & m1, + tmat3x3 const & m2); + + // Unary constant operators + template + tmat3x3 const operator- ( + tmat3x3 const & m); + + template + tmat3x3 const operator-- ( + tmat3x3 const & m, + int); + + template + tmat3x3 const operator++ ( + tmat3x3 const & m, + int); +} //namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 3 columns of 3 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x3 lowp_mat3; + + /// 3 columns of 3 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x3 mediump_mat3; + + /// 3 columns of 3 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x3 highp_mat3; + + /// 3 columns of 3 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x3 lowp_mat3x3; + + /// 3 columns of 3 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x3 mediump_mat3x3; + + /// 3 columns of 3 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x3 highp_mat3x3; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_mat3x3.inl" +#endif + +#endif //glm_core_type_mat3x3 diff --git a/include/gal/opengl/glm/core/type_mat3x3.inl b/include/gal/opengl/glm/core/type_mat3x3.inl new file mode 100644 index 0000000000..9a62d11f43 --- /dev/null +++ b/include/gal/opengl/glm/core/type_mat3x3.inl @@ -0,0 +1,812 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat3x3.inl +/// @date 2005-01-27 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x3::size_type tmat3x3::length() const + { + return 3; + } + + template + GLM_FUNC_QUALIFIER typename tmat3x3::size_type tmat3x3::col_size() + { + return 3; + } + + template + GLM_FUNC_QUALIFIER typename tmat3x3::size_type tmat3x3::row_size() + { + return 3; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tmat3x3::col_type & + tmat3x3::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return this->value[i]; + } + + template + GLM_FUNC_QUALIFIER typename tmat3x3::col_type const & + tmat3x3::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return this->value[i]; + } + + ////////////////////////////////////////////////////////////// + // Constructors + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3() + { + value_type const Zero(0); + value_type const One(1); + this->value[0] = col_type(One, Zero, Zero); + this->value[1] = col_type(Zero, One, Zero); + this->value[2] = col_type(Zero, Zero, One); + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + tmat3x3 const & m + ) + { + this->value[0] = m.value[0]; + this->value[1] = m.value[1]; + this->value[2] = m.value[2]; + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + value_type const & s + ) + { + value_type const Zero(0); + this->value[0] = col_type(s, Zero, Zero); + this->value[1] = col_type(Zero, s, Zero); + this->value[2] = col_type(Zero, Zero, s); + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + value_type const & x0, value_type const & y0, value_type const & z0, + value_type const & x1, value_type const & y1, value_type const & z1, + value_type const & x2, value_type const & y2, value_type const & z2 + ) + { + this->value[0] = col_type(x0, y0, z0); + this->value[1] = col_type(x1, y1, z1); + this->value[2] = col_type(x2, y2, z2); + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + col_type const & v0, + col_type const & v1, + col_type const & v2 + ) + { + this->value[0] = v0; + this->value[1] = v1; + this->value[2] = v2; + } + + ////////////////////////////////////// + // Convertion constructors + template + template + GLM_FUNC_DECL tmat3x3::tmat3x3 + ( + U const & s + ) + { + value_type const Zero(0); + this->value[0] = tvec3(value_type(s), Zero, Zero); + this->value[1] = tvec3(Zero, value_type(s), Zero); + this->value[2] = tvec3(Zero, Zero, value_type(s)); + } + + template + template < + typename X1, typename Y1, typename Z1, + typename X2, typename Y2, typename Z2, + typename X3, typename Y3, typename Z3> + GLM_FUNC_DECL tmat3x3::tmat3x3 + ( + X1 const & x1, Y1 const & y1, Z1 const & z1, + X2 const & x2, Y2 const & y2, Z2 const & z2, + X3 const & x3, Y3 const & y3, Z3 const & z3 + ) + { + this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1)); + this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2)); + this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3)); + } + + template + template + GLM_FUNC_DECL tmat3x3::tmat3x3 + ( + tvec3 const & v1, + tvec3 const & v2, + tvec3 const & v3 + ) + { + this->value[0] = col_type(v1); + this->value[1] = col_type(v2); + this->value[2] = col_type(v3); + } + + ////////////////////////////////////////////////////////////// + // Conversions + + template + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + tmat3x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + tmat2x2 const & m + ) + { + this->value[0] = col_type(m[0], value_type(0)); + this->value[1] = col_type(m[1], value_type(0)); + this->value[2] = col_type(detail::tvec2(0), value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + tmat4x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + tmat2x3 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = col_type(detail::tvec2(0), value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + tmat3x2 const & m + ) + { + this->value[0] = col_type(m[0], value_type(0)); + this->value[1] = col_type(m[1], value_type(0)); + this->value[2] = col_type(m[2], value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + tmat2x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(detail::tvec2(0), value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + tmat4x2 const & m + ) + { + this->value[0] = col_type(m[0], value_type(0)); + this->value[1] = col_type(m[1], value_type(0)); + this->value[2] = col_type(m[2], value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + tmat3x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + tmat4x3 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + } + + ////////////////////////////////////////////////////////////// + // Operators + + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator= + ( + tmat3x3 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator= + ( + tmat3x3 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator+= + ( + U const & s + ) + { + this->value[0] += s; + this->value[1] += s; + this->value[2] += s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator+= + ( + tmat3x3 const & m + ) + { + this->value[0] += m[0]; + this->value[1] += m[1]; + this->value[2] += m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator-= + ( + U const & s + ) + { + this->value[0] -= s; + this->value[1] -= s; + this->value[2] -= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator-= + ( + tmat3x3 const & m + ) + { + this->value[0] -= m[0]; + this->value[1] -= m[1]; + this->value[2] -= m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator*= + ( + U const & s + ) + { + this->value[0] *= s; + this->value[1] *= s; + this->value[2] *= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator*= + ( + tmat3x3 const & m + ) + { + return (*this = *this * m); + } + + template + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator/= + ( + U const & s + ) + { + this->value[0] /= s; + this->value[1] /= s; + this->value[2] /= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator/= + ( + tmat3x3 const & m + ) + { + return (*this = *this / m); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator++ () + { + ++this->value[0]; + ++this->value[1]; + ++this->value[2]; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator-- () + { + --this->value[0]; + --this->value[1]; + --this->value[2]; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat3x3 tmat3x3::_inverse() const + { + T S00 = value[0][0]; + T S01 = value[0][1]; + T S02 = value[0][2]; + + T S10 = value[1][0]; + T S11 = value[1][1]; + T S12 = value[1][2]; + + T S20 = value[2][0]; + T S21 = value[2][1]; + T S22 = value[2][2]; +/* + tmat3x3 Inverse( + + (S11 * S22 - S21 * S12), + - (S10 * S22 - S20 * S12), + + (S10 * S21 - S20 * S11), + - (S01 * S22 - S21 * S02), + + (S00 * S22 - S20 * S02), + - (S00 * S21 - S20 * S01), + + (S01 * S12 - S11 * S02), + - (S00 * S12 - S10 * S02), + + (S00 * S11 - S10 * S01)); +*/ + tmat3x3 Inverse( + S11 * S22 - S21 * S12, + S12 * S20 - S22 * S10, + S10 * S21 - S20 * S11, + S02 * S21 - S01 * S22, + S00 * S22 - S02 * S20, + S01 * S20 - S00 * S21, + S12 * S01 - S11 * S02, + S10 * S02 - S12 * S00, + S11 * S00 - S10 * S01); + + T Determinant = S00 * (S11 * S22 - S21 * S12) + - S10 * (S01 * S22 - S21 * S02) + + S20 * (S01 * S12 - S11 * S02); + + Inverse /= Determinant; + return Inverse; + } + + ////////////////////////////////////////////////////////////// + // Binary operators + + template + GLM_FUNC_QUALIFIER tmat3x3 operator+ + ( + tmat3x3 const & m, + typename tmat3x3::value_type const & s + ) + { + return tmat3x3( + m[0] + s, + m[1] + s, + m[2] + s); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator+ + ( + typename tmat3x3::value_type const & s, + tmat3x3 const & m + ) + { + return tmat3x3( + m[0] + s, + m[1] + s, + m[2] + s); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator+ + ( + tmat3x3 const & m1, + tmat3x3 const & m2 + ) + { + return tmat3x3( + m1[0] + m2[0], + m1[1] + m2[1], + m1[2] + m2[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator- + ( + tmat3x3 const & m, + typename tmat3x3::value_type const & s + ) + { + return tmat3x3( + m[0] - s, + m[1] - s, + m[2] - s); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator- + ( + typename tmat3x3::value_type const & s, + tmat3x3 const & m + ) + { + return tmat3x3( + s - m[0], + s - m[1], + s - m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator- + ( + tmat3x3 const & m1, + tmat3x3 const & m2 + ) + { + return tmat3x3( + m1[0] - m2[0], + m1[1] - m2[1], + m1[2] - m2[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator* + ( + tmat3x3 const & m, + typename tmat3x3::value_type const & s + ) + { + return tmat3x3( + m[0] * s, + m[1] * s, + m[2] * s); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator* + ( + typename tmat3x3::value_type const & s, + tmat3x3 const & m + ) + { + return tmat3x3( + m[0] * s, + m[1] * s, + m[2] * s); + } + + template + GLM_FUNC_QUALIFIER typename tmat3x3::col_type operator* + ( + tmat3x3 const & m, + typename tmat3x3::row_type const & v + ) + { + return typename tmat3x3::col_type( + m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z, + m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z, + m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z); + } + + template + GLM_FUNC_QUALIFIER typename tmat3x3::row_type operator* + ( + typename tmat3x3::col_type const & v, + tmat3x3 const & m + ) + { + return typename tmat3x3::row_type( + m[0][0] * v.x + m[0][1] * v.y + m[0][2] * v.z, + m[1][0] * v.x + m[1][1] * v.y + m[1][2] * v.z, + m[2][0] * v.x + m[2][1] * v.y + m[2][2] * v.z); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator* + ( + tmat3x3 const & m1, + tmat3x3 const & m2 + ) + { + typename tmat3x3::value_type const SrcA00 = m1[0][0]; + typename tmat3x3::value_type const SrcA01 = m1[0][1]; + typename tmat3x3::value_type const SrcA02 = m1[0][2]; + typename tmat3x3::value_type const SrcA10 = m1[1][0]; + typename tmat3x3::value_type const SrcA11 = m1[1][1]; + typename tmat3x3::value_type const SrcA12 = m1[1][2]; + typename tmat3x3::value_type const SrcA20 = m1[2][0]; + typename tmat3x3::value_type const SrcA21 = m1[2][1]; + typename tmat3x3::value_type const SrcA22 = m1[2][2]; + + typename tmat3x3::value_type const SrcB00 = m2[0][0]; + typename tmat3x3::value_type const SrcB01 = m2[0][1]; + typename tmat3x3::value_type const SrcB02 = m2[0][2]; + typename tmat3x3::value_type const SrcB10 = m2[1][0]; + typename tmat3x3::value_type const SrcB11 = m2[1][1]; + typename tmat3x3::value_type const SrcB12 = m2[1][2]; + typename tmat3x3::value_type const SrcB20 = m2[2][0]; + typename tmat3x3::value_type const SrcB21 = m2[2][1]; + typename tmat3x3::value_type const SrcB22 = m2[2][2]; + + tmat3x3 Result(tmat3x3::null); + Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02; + Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02; + Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02; + Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12; + Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12; + Result[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11 + SrcA22 * SrcB12; + Result[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21 + SrcA20 * SrcB22; + Result[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21 + SrcA21 * SrcB22; + Result[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21 + SrcA22 * SrcB22; + return Result; + } + + template + GLM_FUNC_QUALIFIER tmat2x3 operator* + ( + tmat3x3 const & m1, + tmat2x3 const & m2 + ) + { + return tmat2x3( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2]); + } + + template + GLM_FUNC_QUALIFIER tmat4x3 operator* + ( + tmat3x3 const & m1, + tmat4x3 const & m2 + ) + { + return tmat4x3( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2], + m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2], + m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2], + m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2], + m1[0][2] * m2[3][0] + m1[1][2] * m2[3][1] + m1[2][2] * m2[3][2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator/ + ( + tmat3x3 const & m, + typename tmat3x3::value_type const & s + ) + { + return tmat3x3( + m[0] / s, + m[1] / s, + m[2] / s); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator/ + ( + typename tmat3x3::value_type const & s, + tmat3x3 const & m + ) + { + return tmat3x3( + s / m[0], + s / m[1], + s / m[2]); + } + + template + GLM_FUNC_QUALIFIER typename tmat3x3::col_type operator/ + ( + tmat3x3 const & m, + typename tmat3x3::row_type const & v + ) + { + return m._inverse() * v; + } + + template + GLM_FUNC_QUALIFIER typename tmat3x3::row_type operator/ + ( + typename tmat3x3::col_type const & v, + tmat3x3 const & m + ) + { + return v * m._inverse(); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator/ + ( + tmat3x3 const & m1, + tmat3x3 const & m2 + ) + { + return m1 * m2._inverse(); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tmat3x3 const operator- + ( + tmat3x3 const & m + ) + { + return tmat3x3( + -m[0], + -m[1], + -m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 const operator++ + ( + tmat3x3 const & m, + int + ) + { + return tmat3x3( + m[0] + T(1), + m[1] + T(1), + m[2] + T(1)); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 const operator-- + ( + tmat3x3 const & m, + int + ) + { + return tmat3x3( + m[0] - T(1), + m[1] - T(1), + m[2] - T(1)); + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tmat3x3 const & m1, + tmat3x3 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tmat3x3 const & m1, + tmat3x3 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]); + } + +} //namespace detail +} //namespace glm diff --git a/include/gal/opengl/glm/core/type_mat3x4.hpp b/include/gal/opengl/glm/core/type_mat3x4.hpp new file mode 100644 index 0000000000..093630993d --- /dev/null +++ b/include/gal/opengl/glm/core/type_mat3x4.hpp @@ -0,0 +1,266 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat3x4.hpp +/// @date 2006-08-05 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_mat3x4 +#define glm_core_type_mat3x4 + +#include "type_mat.hpp" + +namespace glm{ +namespace detail +{ + template struct tvec1; + template struct tvec2; + template struct tvec3; + template struct tvec4; + template struct tmat2x2; + template struct tmat2x3; + template struct tmat2x4; + template struct tmat3x2; + template struct tmat3x3; + template struct tmat3x4; + template struct tmat4x2; + template struct tmat4x3; + template struct tmat4x4; + + template + struct tmat3x4 + { + enum ctor{null}; + typedef T value_type; + typedef std::size_t size_type; + typedef tvec4 col_type; + typedef tvec3 row_type; + typedef tmat3x4 type; + typedef tmat4x3 transpose_type; + + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + private: + // Data + col_type value[3]; + + public: + // Constructors + GLM_FUNC_DECL tmat3x4(); + GLM_FUNC_DECL tmat3x4(tmat3x4 const & m); + + GLM_FUNC_DECL explicit tmat3x4( + ctor Null); + GLM_FUNC_DECL explicit tmat3x4( + value_type const & s); + GLM_FUNC_DECL explicit tmat3x4( + value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, + value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1, + value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2); + GLM_FUNC_DECL explicit tmat3x4( + col_type const & v0, + col_type const & v1, + col_type const & v2); + + ////////////////////////////////////// + // Conversions + template + GLM_FUNC_DECL explicit tmat3x4( + U const & x); + + template + < + typename X1, typename Y1, typename Z1, typename W1, + typename X2, typename Y2, typename Z2, typename W2, + typename X3, typename Y3, typename Z3, typename W3 + > + GLM_FUNC_DECL explicit tmat3x4( + X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, + X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, + X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3); + + template + GLM_FUNC_DECL explicit tmat3x4( + tvec4 const & v1, + tvec4 const & v2, + tvec4 const & v3); + + // Matrix conversion + template + GLM_FUNC_DECL explicit tmat3x4(tmat3x4 const & m); + + GLM_FUNC_DECL explicit tmat3x4(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat4x3 const & x); + + // Accesses + col_type & operator[](size_type i); + col_type const & operator[](size_type i) const; + + // Unary updatable operators + GLM_FUNC_DECL tmat3x4 & operator= (tmat3x4 const & m); + template + GLM_FUNC_DECL tmat3x4 & operator= (tmat3x4 const & m); + template + GLM_FUNC_DECL tmat3x4 & operator+= (U const & s); + template + GLM_FUNC_DECL tmat3x4 & operator+= (tmat3x4 const & m); + template + GLM_FUNC_DECL tmat3x4 & operator-= (U const & s); + template + GLM_FUNC_DECL tmat3x4 & operator-= (tmat3x4 const & m); + template + GLM_FUNC_DECL tmat3x4 & operator*= (U const & s); + template + GLM_FUNC_DECL tmat3x4 & operator*= (tmat3x4 const & m); + template + GLM_FUNC_DECL tmat3x4 & operator/= (U const & s); + + GLM_FUNC_DECL tmat3x4 & operator++ (); + GLM_FUNC_DECL tmat3x4 & operator-- (); + }; + + // Binary operators + template + tmat3x4 operator+ ( + tmat3x4 const & m, + typename tmat3x4::value_type const & s); + + template + tmat3x4 operator+ ( + tmat3x4 const & m1, + tmat3x4 const & m2); + + template + tmat3x4 operator- ( + tmat3x4 const & m, + typename tmat3x4::value_type const & s); + + template + tmat3x4 operator- ( + tmat3x4 const & m1, + tmat3x4 const & m2); + + template + tmat3x4 operator* ( + tmat3x4 const & m, + typename tmat3x4::value_type const & s); + + template + tmat3x4 operator* ( + typename tmat3x4::value_type const & s, + tmat3x4 const & m); + + template + typename tmat3x4::col_type operator* ( + tmat3x4 const & m, + typename tmat3x4::row_type const & v); + + template + typename tmat3x4::row_type operator* ( + typename tmat3x4::col_type const & v, + tmat3x4 const & m); + + template + tmat4x4 operator* ( + tmat3x4 const & m1, + tmat4x3 const & m2); + + template + tmat2x4 operator* ( + tmat3x4 const & m1, + tmat2x3 const & m2); + + template + tmat3x4 operator* ( + tmat3x4 const & m1, + tmat3x3 const & m2); + + template + tmat3x4 operator/ ( + tmat3x4 const & m, + typename tmat3x4::value_type const & s); + + template + tmat3x4 operator/ ( + typename tmat3x4::value_type const & s, + tmat3x4 const & m); + + // Unary constant operators + template + tmat3x4 const operator- ( + tmat3x4 const & m); + + template + tmat3x4 const operator-- ( + tmat3x4 const & m, + int); + + template + tmat3x4 const operator++ ( + tmat3x4 const & m, + int); + +}//namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 3 columns of 4 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x4 lowp_mat3x4; + + /// 3 columns of 4 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x4 mediump_mat3x4; + + /// 3 columns of 4 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x4 highp_mat3x4; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_mat3x4.inl" +#endif + +#endif //glm_core_type_mat3x4 diff --git a/include/gal/opengl/glm/core/type_mat3x4.inl b/include/gal/opengl/glm/core/type_mat3x4.inl new file mode 100644 index 0000000000..c42311c4d0 --- /dev/null +++ b/include/gal/opengl/glm/core/type_mat3x4.inl @@ -0,0 +1,712 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat3x4.inl +/// @date 2006-08-05 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x4::size_type tmat3x4::length() const + { + return 3; + } + + template + GLM_FUNC_QUALIFIER typename tmat3x4::size_type tmat3x4::col_size() + { + return 4; + } + + template + GLM_FUNC_QUALIFIER typename tmat3x4::size_type tmat3x4::row_size() + { + return 3; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tmat3x4::col_type & + tmat3x4::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return this->value[i]; + } + + template + GLM_FUNC_QUALIFIER typename tmat3x4::col_type const & + tmat3x4::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return this->value[i]; + } + + ////////////////////////////////////////////////////////////// + // Constructors + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4() + { + this->value[0] = col_type(1, 0, 0, 0); + this->value[1] = col_type(0, 1, 0, 0); + this->value[2] = col_type(0, 0, 1, 0); + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + tmat3x4 const & m + ) + { + this->value[0] = m.value[0]; + this->value[1] = m.value[1]; + this->value[2] = m.value[2]; + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + value_type const & s + ) + { + value_type const Zero(0); + this->value[0] = col_type(s, Zero, Zero, Zero); + this->value[1] = col_type(Zero, s, Zero, Zero); + this->value[2] = col_type(Zero, Zero, s, Zero); + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, + value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1, + value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2 + ) + { + this->value[0] = col_type(x0, y0, z0, w0); + this->value[1] = col_type(x1, y1, z1, w1); + this->value[2] = col_type(x2, y2, z2, w2); + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + col_type const & v0, + col_type const & v1, + col_type const & v2 + ) + { + this->value[0] = v0; + this->value[1] = v1; + this->value[2] = v2; + } + + ////////////////////////////////////// + // Convertion constructors + template + template + GLM_FUNC_DECL tmat3x4::tmat3x4 + ( + U const & s + ) + { + value_type const Zero(0); + this->value[0] = tvec4(value_type(s), Zero, Zero, Zero); + this->value[1] = tvec4(Zero, value_type(s), Zero, Zero); + this->value[2] = tvec4(Zero, Zero, value_type(s), Zero); + } + + template + template < + typename X1, typename Y1, typename Z1, typename W1, + typename X2, typename Y2, typename Z2, typename W2, + typename X3, typename Y3, typename Z3, typename W3> + GLM_FUNC_DECL tmat3x4::tmat3x4 + ( + X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, + X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, + X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3 + ) + { + this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1), value_type(w1)); + this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2), value_type(w2)); + this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3), value_type(w3)); + } + + template + template + GLM_FUNC_DECL tmat3x4::tmat3x4 + ( + tvec4 const & v1, + tvec4 const & v2, + tvec4 const & v3 + ) + { + this->value[0] = col_type(v1); + this->value[1] = col_type(v2); + this->value[2] = col_type(v3); + } + + // Conversion + template + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + tmat3x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + tmat2x2 const & m + ) + { + this->value[0] = col_type(m[0], detail::tvec2(0)); + this->value[1] = col_type(m[1], detail::tvec2(0)); + this->value[2] = col_type(T(0), T(0), T(1), T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + tmat3x3 const & m + ) + { + this->value[0] = col_type(m[0], T(0)); + this->value[1] = col_type(m[1], T(0)); + this->value[2] = col_type(m[2], T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + tmat4x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + tmat2x3 const & m + ) + { + this->value[0] = col_type(m[0], T(0)); + this->value[1] = col_type(m[1], T(0)); + this->value[2] = col_type(T(0), T(0), T(1), T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + tmat3x2 const & m + ) + { + this->value[0] = col_type(m[0], detail::tvec2(0)); + this->value[1] = col_type(m[1], detail::tvec2(0)); + this->value[2] = col_type(m[2], T(0), T(1)); + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + tmat2x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(T(0), T(0), T(1), T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + tmat4x2 const & m + ) + { + this->value[0] = col_type(m[0], detail::tvec2(T(0))); + this->value[1] = col_type(m[1], detail::tvec2(T(0))); + this->value[2] = col_type(m[2], detail::tvec2(T(1), T(0))); + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + tmat4x3 const & m + ) + { + this->value[0] = col_type(m[0], T(0)); + this->value[1] = col_type(m[1], T(0)); + this->value[2] = col_type(m[2], T(0)); + } + + ////////////////////////////////////////////////////////////// + // Unary updatable operators + + template + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator= + ( + tmat3x4 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator= + ( + tmat3x4 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator+= + ( + U const & s + ) + { + this->value[0] += s; + this->value[1] += s; + this->value[2] += s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator+= + ( + tmat3x4 const & m + ) + { + this->value[0] += m[0]; + this->value[1] += m[1]; + this->value[2] += m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator-= + ( + U const & s + ) + { + this->value[0] -= s; + this->value[1] -= s; + this->value[2] -= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator-= + ( + tmat3x4 const & m + ) + { + this->value[0] -= m[0]; + this->value[1] -= m[1]; + this->value[2] -= m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator*= + ( + U const & s + ) + { + this->value[0] *= s; + this->value[1] *= s; + this->value[2] *= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator*= + ( + tmat3x4 const & m + ) + { + return (*this = tmat3x4(*this * m)); + } + + template + template + GLM_FUNC_QUALIFIER tmat3x4 & tmat3x4::operator/= + ( + U const & s + ) + { + this->value[0] /= s; + this->value[1] /= s; + this->value[2] /= s; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator++ () + { + ++this->value[0]; + ++this->value[1]; + ++this->value[2]; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator-- () + { + --this->value[0]; + --this->value[1]; + --this->value[2]; + return *this; + } + + ////////////////////////////////////////////////////////////// + // Binary operators + + template + GLM_FUNC_QUALIFIER tmat3x4 operator+ + ( + tmat3x4 const & m, + typename tmat3x4::value_type const & s + ) + { + return tmat3x4( + m[0] + s, + m[1] + s, + m[2] + s); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 operator+ + ( + tmat3x4 const & m1, + tmat3x4 const & m2 + ) + { + return tmat3x4( + m1[0] + m2[0], + m1[1] + m2[1], + m1[2] + m2[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 operator- + ( + tmat3x4 const & m, + typename tmat3x4::value_type const & s + ) + { + return tmat3x4( + m[0] - s, + m[1] - s, + m[2] - s); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 operator- + ( + tmat3x4 const & m1, + tmat3x4 const & m2 + ) + { + return tmat3x4( + m1[0] - m2[0], + m1[1] - m2[1], + m1[2] - m2[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 operator* + ( + tmat3x4 const & m, + typename tmat3x4::value_type const & s + ) + { + return tmat3x4( + m[0] * s, + m[1] * s, + m[2] * s); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 operator* + ( + typename tmat3x4::value_type const & s, + tmat3x4 const & m + ) + { + return tmat3x4( + m[0] * s, + m[1] * s, + m[2] * s); + } + + template + GLM_FUNC_QUALIFIER typename tmat3x4::col_type operator* + ( + tmat3x4 const & m, + typename tmat3x4::row_type const & v + ) + { + return typename tmat3x4::col_type( + m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z, + m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z, + m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z, + m[0][3] * v.x + m[1][3] * v.y + m[2][3] * v.z); + } + + template + GLM_FUNC_QUALIFIER typename tmat3x4::row_type operator* + ( + typename tmat3x4::col_type const & v, + tmat3x4 const & m + ) + { + return typename tmat3x4::row_type( + v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2] + v.w * m[0][3], + v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2] + v.w * m[1][3], + v.x * m[2][0] + v.y * m[2][1] + v.z * m[2][2] + v.w * m[2][3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator* + ( + tmat3x4 const & m1, + tmat4x3 const & m2 + ) + { + const T SrcA00 = m1[0][0]; + const T SrcA01 = m1[0][1]; + const T SrcA02 = m1[0][2]; + const T SrcA03 = m1[0][3]; + const T SrcA10 = m1[1][0]; + const T SrcA11 = m1[1][1]; + const T SrcA12 = m1[1][2]; + const T SrcA13 = m1[1][3]; + const T SrcA20 = m1[2][0]; + const T SrcA21 = m1[2][1]; + const T SrcA22 = m1[2][2]; + const T SrcA23 = m1[2][3]; + + const T SrcB00 = m2[0][0]; + const T SrcB01 = m2[0][1]; + const T SrcB02 = m2[0][2]; + const T SrcB10 = m2[1][0]; + const T SrcB11 = m2[1][1]; + const T SrcB12 = m2[1][2]; + const T SrcB20 = m2[2][0]; + const T SrcB21 = m2[2][1]; + const T SrcB22 = m2[2][2]; + const T SrcB30 = m2[3][0]; + const T SrcB31 = m2[3][1]; + const T SrcB32 = m2[3][2]; + + tmat4x4 Result(tmat4x4::null); + Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02; + Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02; + Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02; + Result[0][3] = SrcA03 * SrcB00 + SrcA13 * SrcB01 + SrcA23 * SrcB02; + Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12; + Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12; + Result[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11 + SrcA22 * SrcB12; + Result[1][3] = SrcA03 * SrcB10 + SrcA13 * SrcB11 + SrcA23 * SrcB12; + Result[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21 + SrcA20 * SrcB22; + Result[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21 + SrcA21 * SrcB22; + Result[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21 + SrcA22 * SrcB22; + Result[2][3] = SrcA03 * SrcB20 + SrcA13 * SrcB21 + SrcA23 * SrcB22; + Result[3][0] = SrcA00 * SrcB30 + SrcA10 * SrcB31 + SrcA20 * SrcB32; + Result[3][1] = SrcA01 * SrcB30 + SrcA11 * SrcB31 + SrcA21 * SrcB32; + Result[3][2] = SrcA02 * SrcB30 + SrcA12 * SrcB31 + SrcA22 * SrcB32; + Result[3][3] = SrcA03 * SrcB30 + SrcA13 * SrcB31 + SrcA23 * SrcB32; + return Result; + } + + template + GLM_FUNC_QUALIFIER tmat2x4 operator* + ( + tmat3x4 const & m1, + tmat2x3 const & m2 + ) + { + return tmat2x4( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2], + m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2], + m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 operator* + ( + tmat3x4 const & m1, + tmat3x3 const & m2 + ) + { + return tmat3x4( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2], + m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2], + m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2], + m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2], + m1[0][3] * m2[2][0] + m1[1][3] * m2[2][1] + m1[2][3] * m2[2][2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 operator/ + ( + tmat3x4 const & m, + typename tmat3x4::value_type const & s + ) + { + return tmat3x4( + m[0] / s, + m[1] / s, + m[2] / s); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 operator/ + ( + typename tmat3x4::value_type const & s, + tmat3x4 const & m + ) + { + return tmat3x4( + s / m[0], + s / m[1], + s / m[2]); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tmat3x4 const operator- + ( + tmat3x4 const & m + ) + { + return tmat3x4( + -m[0], + -m[1], + -m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 const operator++ + ( + tmat3x4 const & m, + int + ) + { + return tmat3x4( + m[0] + T(1), + m[1] + T(1), + m[2] + T(1)); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 const operator-- + ( + tmat3x4 const & m, + int + ) + { + return tmat3x4( + m[0] - T(1), + m[1] - T(1), + m[2] - T(1)); + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tmat3x4 const & m1, + tmat3x4 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tmat3x4 const & m1, + tmat3x4 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]); + } +} //namespace detail +} //namespace glm diff --git a/include/gal/opengl/glm/core/type_mat4x2.hpp b/include/gal/opengl/glm/core/type_mat4x2.hpp new file mode 100644 index 0000000000..9b0d2a32d1 --- /dev/null +++ b/include/gal/opengl/glm/core/type_mat4x2.hpp @@ -0,0 +1,270 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat4x2.hpp +/// @date 2006-10-01 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_mat4x2 +#define glm_core_type_mat4x2 + +#include "type_mat.hpp" + +namespace glm{ +namespace detail +{ + template struct tvec1; + template struct tvec2; + template struct tvec3; + template struct tvec4; + template struct tmat2x2; + template struct tmat2x3; + template struct tmat2x4; + template struct tmat3x2; + template struct tmat3x3; + template struct tmat3x4; + template struct tmat4x2; + template struct tmat4x3; + template struct tmat4x4; + + template + struct tmat4x2 + { + enum ctor{null}; + typedef T value_type; + typedef std::size_t size_type; + typedef tvec2 col_type; + typedef tvec4 row_type; + typedef tmat4x2 type; + typedef tmat2x4 transpose_type; + + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + private: + // Data + col_type value[4]; + + public: + // Constructors + GLM_FUNC_DECL tmat4x2(); + GLM_FUNC_DECL tmat4x2(tmat4x2 const & m); + + GLM_FUNC_DECL explicit tmat4x2( + ctor Null); + GLM_FUNC_DECL explicit tmat4x2( + value_type const & x); + GLM_FUNC_DECL explicit tmat4x2( + value_type const & x0, value_type const & y0, + value_type const & x1, value_type const & y1, + value_type const & x2, value_type const & y2, + value_type const & x3, value_type const & y3); + GLM_FUNC_DECL explicit tmat4x2( + col_type const & v0, + col_type const & v1, + col_type const & v2, + col_type const & v3); + + ////////////////////////////////////// + // Conversions + template + GLM_FUNC_DECL explicit tmat4x2( + U const & x); + + template + < + typename X1, typename Y1, + typename X2, typename Y2, + typename X3, typename Y3, + typename X4, typename Y4 + > + GLM_FUNC_DECL explicit tmat4x2( + X1 const & x1, Y1 const & y1, + X2 const & x2, Y2 const & y2, + X3 const & x3, Y3 const & y3, + X4 const & x4, Y4 const & y4); + + template + GLM_FUNC_DECL explicit tmat4x2( + tvec2 const & v1, + tvec2 const & v2, + tvec2 const & v3, + tvec2 const & v4); + + // Matrix conversions + template + GLM_FUNC_DECL explicit tmat4x2(tmat4x2 const & m); + + GLM_FUNC_DECL explicit tmat4x2(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat4x3 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat3x4 const & x); + + // Accesses + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; + + // Unary updatable operators + GLM_FUNC_DECL tmat4x2& operator= (tmat4x2 const & m); + template + GLM_FUNC_DECL tmat4x2& operator= (tmat4x2 const & m); + template + GLM_FUNC_DECL tmat4x2& operator+= (U const & s); + template + GLM_FUNC_DECL tmat4x2& operator+= (tmat4x2 const & m); + template + GLM_FUNC_DECL tmat4x2& operator-= (U const & s); + template + GLM_FUNC_DECL tmat4x2& operator-= (tmat4x2 const & m); + template + GLM_FUNC_DECL tmat4x2& operator*= (U const & s); + template + GLM_FUNC_DECL tmat4x2& operator*= (tmat4x2 const & m); + template + GLM_FUNC_DECL tmat4x2& operator/= (U const & s); + + GLM_FUNC_DECL tmat4x2& operator++ (); + GLM_FUNC_DECL tmat4x2& operator-- (); + }; + + // Binary operators + template + tmat4x2 operator+ ( + tmat4x2 const & m, + typename tmat4x2::value_type const & s); + + template + tmat4x2 operator+ ( + tmat4x2 const & m1, + tmat4x2 const & m2); + + template + tmat4x2 operator- ( + tmat4x2 const & m, + typename tmat4x2::value_type const & s); + + template + tmat4x2 operator- ( + tmat4x2 const & m1, + tmat4x2 const & m2); + + template + tmat4x2 operator* ( + tmat4x2 const & m, + typename tmat4x2::value_type const & s); + + template + tmat4x2 operator* ( + typename tmat4x2::value_type const & s, + tmat4x2 const & m); + + template + typename tmat4x2::col_type operator* ( + tmat4x2 const & m, + typename tmat4x2::row_type const & v); + + template + typename tmat4x2::row_type operator* ( + typename tmat4x2::col_type const & v, + tmat4x2 const & m); + + template + tmat3x2 operator* ( + tmat4x2 const & m1, + tmat3x4 const & m2); + + template + tmat4x2 operator* ( + tmat4x2 const & m1, + tmat4x4 const & m2); + + template + tmat2x3 operator* ( + tmat4x3 const & m1, + tmat2x4 const & m2); + + template + tmat4x2 operator/ ( + tmat4x2 const & m, + typename tmat4x2::value_type const & s); + + template + tmat4x2 operator/ ( + typename tmat4x2::value_type const & s, + tmat4x2 const & m); + + // Unary constant operators + template + tmat4x2 const operator- ( + tmat4x2 const & m); + + template + tmat4x2 const operator-- ( + tmat4x2 const & m, + int); + + template + tmat4x2 const operator++ ( + tmat4x2 const & m, + int); +} //namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 4 columns of 2 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x2 lowp_mat4x2; + + /// 4 columns of 2 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x2 mediump_mat4x2; + + /// 4 columns of 2 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x2 highp_mat4x2; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_mat4x2.inl" +#endif + +#endif //glm_core_type_mat4x2 diff --git a/include/gal/opengl/glm/core/type_mat4x2.inl b/include/gal/opengl/glm/core/type_mat4x2.inl new file mode 100644 index 0000000000..3c4cd240f0 --- /dev/null +++ b/include/gal/opengl/glm/core/type_mat4x2.inl @@ -0,0 +1,728 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat4x2.inl +/// @date 2006-10-01 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x2::size_type tmat4x2::length() const + { + return 4; + } + + template + GLM_FUNC_QUALIFIER typename tmat4x2::size_type tmat4x2::col_size() + { + return 2; + } + + template + GLM_FUNC_QUALIFIER typename tmat4x2::size_type tmat4x2::row_size() + { + return 4; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tmat4x2::col_type & + tmat4x2::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return this->value[i]; + } + + template + GLM_FUNC_QUALIFIER typename tmat4x2::col_type const & + tmat4x2::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return this->value[i]; + } + + ////////////////////////////////////////////////////////////// + // Constructors + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2() + { + value_type const Zero(0); + value_type const One(1); + this->value[0] = col_type(One, Zero); + this->value[1] = col_type(Zero, One); + this->value[2] = col_type(Zero, Zero); + this->value[3] = col_type(Zero, Zero); + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + tmat4x2 const & m + ) + { + this->value[0] = m.value[0]; + this->value[1] = m.value[1]; + this->value[2] = m.value[2]; + this->value[3] = m.value[3]; + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + value_type const & s + ) + { + value_type const Zero(0); + this->value[0] = col_type(s, Zero); + this->value[1] = col_type(Zero, s); + this->value[2] = col_type(Zero, Zero); + this->value[3] = col_type(Zero, Zero); + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + value_type const & x0, value_type const & y0, + value_type const & x1, value_type const & y1, + value_type const & x2, value_type const & y2, + value_type const & x3, value_type const & y3 + ) + { + this->value[0] = col_type(x0, y0); + this->value[1] = col_type(x1, y1); + this->value[2] = col_type(x2, y2); + this->value[3] = col_type(x3, y3); + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + col_type const & v0, + col_type const & v1, + col_type const & v2, + col_type const & v3 + ) + { + this->value[0] = v0; + this->value[1] = v1; + this->value[2] = v2; + this->value[3] = v3; + } + + ////////////////////////////////////// + // Convertion constructors + template + template + GLM_FUNC_DECL tmat4x2::tmat4x2 + ( + U const & s + ) + { + value_type const Zero(0); + this->value[0] = tvec2(value_type(s), Zero); + this->value[1] = tvec2(Zero, value_type(s)); + this->value[2] = tvec2(Zero, Zero); + this->value[3] = tvec2(Zero, Zero); + } + + template + template < + typename X1, typename Y1, + typename X2, typename Y2, + typename X3, typename Y3, + typename X4, typename Y4> + GLM_FUNC_DECL tmat4x2::tmat4x2 + ( + X1 const & x1, Y1 const & y1, + X2 const & x2, Y2 const & y2, + X3 const & x3, Y3 const & y3, + X4 const & x4, Y4 const & y4 + ) + { + this->value[0] = col_type(value_type(x1), value_type(y1)); + this->value[1] = col_type(value_type(x2), value_type(y2)); + this->value[2] = col_type(value_type(x3), value_type(y3)); + this->value[3] = col_type(value_type(x4), value_type(y4)); + } + + template + template + GLM_FUNC_DECL tmat4x2::tmat4x2 + ( + tvec2 const & v1, + tvec2 const & v2, + tvec2 const & v3, + tvec2 const & v4 + ) + { + this->value[0] = col_type(v1); + this->value[1] = col_type(v2); + this->value[2] = col_type(v3); + this->value[3] = col_type(v4); + } + + // Conversion + template + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + tmat4x2 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + this->value[3] = col_type(m[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + tmat2x2 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(value_type(0)); + this->value[3] = col_type(value_type(0)); + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + tmat3x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + this->value[3] = col_type(value_type(0)); + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + tmat4x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + this->value[3] = col_type(m[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + tmat2x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(value_type(0)); + this->value[3] = col_type(value_type(0)); + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + tmat3x2 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + this->value[3] = col_type(value_type(0)); + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + tmat2x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(value_type(0)); + this->value[3] = col_type(value_type(0)); + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + tmat4x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + this->value[3] = col_type(m[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + tmat3x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + this->value[3] = col_type(value_type(0)); + } + + ////////////////////////////////////////////////////////////// + // Unary updatable operators + + template + GLM_FUNC_QUALIFIER tmat4x2& tmat4x2::operator= + ( + tmat4x2 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + this->value[3] = m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x2& tmat4x2::operator= + ( + tmat4x2 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + this->value[3] = m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator+= + ( + U const & s + ) + { + this->value[0] += s; + this->value[1] += s; + this->value[2] += s; + this->value[3] += s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator+= + ( + tmat4x2 const & m + ) + { + this->value[0] += m[0]; + this->value[1] += m[1]; + this->value[2] += m[2]; + this->value[3] += m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator-= + ( + U const & s + ) + { + this->value[0] -= s; + this->value[1] -= s; + this->value[2] -= s; + this->value[3] -= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator-= + ( + tmat4x2 const & m + ) + { + this->value[0] -= m[0]; + this->value[1] -= m[1]; + this->value[2] -= m[2]; + this->value[3] -= m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator*= + ( + U const & s + ) + { + this->value[0] *= s; + this->value[1] *= s; + this->value[2] *= s; + this->value[3] *= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator*= + ( + tmat4x2 const & m + ) + { + return (*this = tmat4x2(*this * m)); + } + + template + template + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator/= + ( + U const & s + ) + { + this->value[0] /= s; + this->value[1] /= s; + this->value[2] /= s; + this->value[3] /= s; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator++ () + { + ++this->value[0]; + ++this->value[1]; + ++this->value[2]; + ++this->value[3]; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator-- () + { + --this->value[0]; + --this->value[1]; + --this->value[2]; + --this->value[3]; + return *this; + } + + ////////////////////////////////////////////////////////////// + // Binary operators + + template + GLM_FUNC_QUALIFIER tmat4x2 operator+ + ( + tmat4x2 const & m, + typename tmat4x2::value_type const & s + ) + { + return tmat4x2( + m[0] + s, + m[1] + s, + m[2] + s, + m[3] + s); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 operator+ + ( + tmat4x2 const & m1, + tmat4x2 const & m2 + ) + { + return tmat4x2( + m1[0] + m2[0], + m1[1] + m2[1], + m1[2] + m2[2], + m1[3] + m2[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 operator- + ( + tmat4x2 const & m, + typename tmat4x2::value_type const & s + ) + { + return tmat4x2( + m[0] - s, + m[1] - s, + m[2] - s, + m[3] - s); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 operator- + ( + tmat4x2 const & m1, + tmat4x2 const & m2 + ) + { + return tmat4x2( + m1[0] - m2[0], + m1[1] - m2[1], + m1[2] - m2[2], + m1[3] - m2[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 operator* + ( + tmat4x2 const & m, + typename tmat4x2::value_type const & s + ) + { + return tmat4x2( + m[0] * s, + m[1] * s, + m[2] * s, + m[3] * s); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 operator* + ( + typename tmat4x2::value_type const & s, + tmat4x2 const & m + ) + { + return tmat4x2( + m[0] * s, + m[1] * s, + m[2] * s, + m[3] * s); + } + + template + GLM_FUNC_QUALIFIER typename tmat4x2::col_type operator* + ( + tmat4x2 const & m, + typename tmat4x2::row_type const & v) + { + return typename tmat4x2::col_type( + m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w, + m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * v.w); + } + + template + GLM_FUNC_QUALIFIER typename tmat4x2::row_type operator* + ( + typename tmat4x2::col_type const & v, + tmat4x2 const & m) + { + return typename tmat4x2::row_type( + v.x * m[0][0] + v.y * m[0][1], + v.x * m[1][0] + v.y * m[1][1], + v.x * m[2][0] + v.y * m[2][1], + v.x * m[3][0] + v.y * m[3][1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator* + ( + tmat4x2 const & m1, + tmat2x4 const & m2 + ) + { + T const SrcA00 = m1[0][0]; + T const SrcA01 = m1[0][1]; + T const SrcA10 = m1[1][0]; + T const SrcA11 = m1[1][1]; + T const SrcA20 = m1[2][0]; + T const SrcA21 = m1[2][1]; + T const SrcA30 = m1[3][0]; + T const SrcA31 = m1[3][1]; + + T const SrcB00 = m2[0][0]; + T const SrcB01 = m2[0][1]; + T const SrcB02 = m2[0][2]; + T const SrcB03 = m2[0][3]; + T const SrcB10 = m2[1][0]; + T const SrcB11 = m2[1][1]; + T const SrcB12 = m2[1][2]; + T const SrcB13 = m2[1][3]; + + tmat2x2 Result(tmat2x2::null); + Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02 + SrcA30 * SrcB03; + Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02 + SrcA31 * SrcB03; + Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12 + SrcA30 * SrcB13; + Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12 + SrcA31 * SrcB13; + return Result; + } + + template + GLM_FUNC_QUALIFIER tmat3x2 operator* + ( + tmat4x2 const & m1, + tmat3x4 const & m2 + ) + { + return tmat3x2( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 operator* + ( + tmat4x2 const & m1, + tmat4x4 const & m2 + ) + { + return tmat4x2( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3], + m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2] + m1[3][0] * m2[3][3], + m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2] + m1[3][1] * m2[3][3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 operator/ + ( + tmat4x2 const & m, + typename tmat4x2::value_type const & s + ) + { + return tmat4x2( + m[0] / s, + m[1] / s, + m[2] / s, + m[3] / s); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 operator/ + ( + typename tmat4x2::value_type const & s, + tmat4x2 const & m + ) + { + return tmat4x2( + s / m[0], + s / m[1], + s / m[2], + s / m[3]); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tmat4x2 const operator- + ( + tmat4x2 const & m + ) + { + return tmat4x2( + -m[0], + -m[1], + -m[2], + -m[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 const operator++ + ( + tmat4x2 const & m, + int + ) + { + return tmat4x2( + m[0] + typename tmat4x2::value_type(1), + m[1] + typename tmat4x2::value_type(1), + m[2] + typename tmat4x2::value_type(1), + m[3] + typename tmat4x2::value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 const operator-- + ( + tmat4x2 const & m, + int + ) + { + return tmat4x2( + m[0] - typename tmat4x2::value_type(1), + m[1] - typename tmat4x2::value_type(1), + m[2] - typename tmat4x2::value_type(1), + m[3] - typename tmat4x2::value_type(1)); + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tmat4x2 const & m1, + tmat4x2 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tmat4x2 const & m1, + tmat4x2 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]); + } +} //namespace detail +} //namespace glm diff --git a/include/gal/opengl/glm/core/type_mat4x3.hpp b/include/gal/opengl/glm/core/type_mat4x3.hpp new file mode 100644 index 0000000000..b878cbeb13 --- /dev/null +++ b/include/gal/opengl/glm/core/type_mat4x3.hpp @@ -0,0 +1,268 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat4x3.hpp +/// @date 2006-08-04 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_mat4x3 +#define glm_core_type_mat4x3 + +#include "type_mat.hpp" + +namespace glm{ +namespace detail +{ + template struct tvec1; + template struct tvec2; + template struct tvec3; + template struct tvec4; + template struct tmat2x2; + template struct tmat2x3; + template struct tmat2x4; + template struct tmat3x2; + template struct tmat3x3; + template struct tmat3x4; + template struct tmat4x2; + template struct tmat4x3; + template struct tmat4x4; + + template + struct tmat4x3 + { + enum ctor{null}; + typedef T value_type; + typedef std::size_t size_type; + typedef tvec3 col_type; + typedef tvec4 row_type; + typedef tmat4x3 type; + typedef tmat3x4 transpose_type; + + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + private: + // Data + col_type value[4]; + + public: + // Constructors + GLM_FUNC_DECL tmat4x3(); + GLM_FUNC_DECL tmat4x3(tmat4x3 const & m); + + GLM_FUNC_DECL explicit tmat4x3( + ctor Null); + GLM_FUNC_DECL explicit tmat4x3( + value_type const & x); + GLM_FUNC_DECL explicit tmat4x3( + value_type const & x0, value_type const & y0, value_type const & z0, + value_type const & x1, value_type const & y1, value_type const & z1, + value_type const & x2, value_type const & y2, value_type const & z2, + value_type const & x3, value_type const & y3, value_type const & z3); + GLM_FUNC_DECL explicit tmat4x3( + col_type const & v0, + col_type const & v1, + col_type const & v2, + col_type const & v3); + + ////////////////////////////////////// + // Conversions + template + GLM_FUNC_DECL explicit tmat4x3( + U const & x); + + template < + typename X1, typename Y1, typename Z1, + typename X2, typename Y2, typename Z2, + typename X3, typename Y3, typename Z3, + typename X4, typename Y4, typename Z4> + GLM_FUNC_DECL explicit tmat4x3( + X1 const & x1, Y1 const & y1, Z1 const & z1, + X2 const & x2, Y2 const & y2, Z2 const & z2, + X3 const & x3, Y3 const & y3, Z3 const & z3, + X4 const & x4, Y4 const & y4, Z4 const & z4); + + template + GLM_FUNC_DECL explicit tmat4x3( + tvec3 const & v1, + tvec3 const & v2, + tvec3 const & v3, + tvec3 const & v4); + + // Matrix conversions + template + GLM_FUNC_DECL explicit tmat4x3(tmat4x3 const & m); + + GLM_FUNC_DECL explicit tmat4x3(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat3x4 const & x); + + // Accesses + col_type & operator[](size_type i); + col_type const & operator[](size_type i) const; + + // Unary updatable operators + GLM_FUNC_DECL tmat4x3 & operator= (tmat4x3 const & m); + template + GLM_FUNC_DECL tmat4x3 & operator= (tmat4x3 const & m); + template + GLM_FUNC_DECL tmat4x3 & operator+= (U const & s); + template + GLM_FUNC_DECL tmat4x3 & operator+= (tmat4x3 const & m); + template + GLM_FUNC_DECL tmat4x3 & operator-= (U const & s); + template + GLM_FUNC_DECL tmat4x3 & operator-= (tmat4x3 const & m); + template + GLM_FUNC_DECL tmat4x3 & operator*= (U const & s); + template + GLM_FUNC_DECL tmat4x3 & operator*= (tmat4x3 const & m); + template + GLM_FUNC_DECL tmat4x3 & operator/= (U const & s); + + GLM_FUNC_DECL tmat4x3 & operator++ (); + GLM_FUNC_DECL tmat4x3 & operator-- (); + }; + + // Binary operators + template + tmat4x3 operator+ ( + tmat4x3 const & m, + typename tmat4x3::value_type const & s); + + template + tmat4x3 operator+ ( + tmat4x3 const & m1, + tmat4x3 const & m2); + + template + tmat4x3 operator- ( + tmat4x3 const & m, + typename tmat4x3::value_type const & s); + + template + tmat4x3 operator- ( + tmat4x3 const & m1, + tmat4x3 const & m2); + + template + tmat4x3 operator* ( + tmat4x3 const & m, + typename tmat4x3::value_type const & s); + + template + tmat4x3 operator* ( + typename tmat4x3::value_type const & s, + tmat4x3 const & m); + + template + typename tmat4x3::col_type operator* ( + tmat4x3 const & m, + typename tmat4x3::row_type const & v); + + template + typename tmat4x3::row_type operator* ( + typename tmat4x3::col_type const & v, + tmat4x3 const & m); + + template + tmat2x3 operator* ( + tmat4x3 const & m1, + tmat2x4 const & m2); + + template + tmat3x3 operator* ( + tmat4x3 const & m1, + tmat3x4 const & m2); + + template + tmat4x3 operator* ( + tmat4x3 const & m1, + tmat4x4 const & m2); + + template + tmat4x3 operator/ ( + tmat4x3 const & m, + typename tmat4x3::value_type const & s); + + template + tmat4x3 operator/ ( + typename tmat4x3::value_type const & s, + tmat4x3 const & m); + + // Unary constant operators + template + tmat4x3 const operator- ( + tmat4x3 const & m); + + template + tmat4x3 const operator-- ( + tmat4x3 const & m, + int); + + template + tmat4x3 const operator++ ( + tmat4x3 const & m, + int); +}//namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 4 columns of 3 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x3 lowp_mat4x3; + + /// 4 columns of 3 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x3 mediump_mat4x3; + + /// 4 columns of 3 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x3 highp_mat4x3; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_mat4x3.inl" +#endif //GLM_EXTERNAL_TEMPLATE + +#endif//glm_core_type_mat4x3 diff --git a/include/gal/opengl/glm/core/type_mat4x3.inl b/include/gal/opengl/glm/core/type_mat4x3.inl new file mode 100644 index 0000000000..e451ee726a --- /dev/null +++ b/include/gal/opengl/glm/core/type_mat4x3.inl @@ -0,0 +1,737 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat4x3.inl +/// @date 2006-04-17 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x3::size_type tmat4x3::length() const + { + return 4; + } + + template + GLM_FUNC_QUALIFIER typename tmat4x3::size_type tmat4x3::col_size() + { + return 3; + } + + template + GLM_FUNC_QUALIFIER typename tmat4x3::size_type tmat4x3::row_size() + { + return 4; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tmat4x3::col_type & + tmat4x3::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return this->value[i]; + } + + template + GLM_FUNC_QUALIFIER typename tmat4x3::col_type const & + tmat4x3::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return this->value[i]; + } + + ////////////////////////////////////////////////////////////// + // Constructors + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3() + { + value_type const Zero(0); + value_type const One(1); + this->value[0] = col_type(One, Zero, Zero); + this->value[1] = col_type(Zero, One, Zero); + this->value[2] = col_type(Zero, Zero, One); + this->value[3] = col_type(Zero, Zero, Zero); + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + tmat4x3 const & m + ) + { + this->value[0] = m.value[0]; + this->value[1] = m.value[1]; + this->value[2] = m.value[2]; + this->value[3] = m.value[3]; + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + value_type const & s + ) + { + value_type const Zero(0); + this->value[0] = col_type(s, Zero, Zero); + this->value[1] = col_type(Zero, s, Zero); + this->value[2] = col_type(Zero, Zero, s); + this->value[3] = col_type(Zero, Zero, Zero); + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + value_type const & x0, value_type const & y0, value_type const & z0, + value_type const & x1, value_type const & y1, value_type const & z1, + value_type const & x2, value_type const & y2, value_type const & z2, + value_type const & x3, value_type const & y3, value_type const & z3 + ) + { + this->value[0] = col_type(x0, y0, z0); + this->value[1] = col_type(x1, y1, z1); + this->value[2] = col_type(x2, y2, z2); + this->value[3] = col_type(x3, y3, z3); + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + col_type const & v0, + col_type const & v1, + col_type const & v2, + col_type const & v3 + ) + { + this->value[0] = v0; + this->value[1] = v1; + this->value[2] = v2; + this->value[3] = v3; + } + + ////////////////////////////////////// + // Convertion constructors + template + template + GLM_FUNC_DECL tmat4x3::tmat4x3 + ( + U const & s + ) + { + value_type const Zero(0); + this->value[0] = tvec3(value_type(s), Zero, Zero); + this->value[1] = tvec3(Zero, value_type(s), Zero); + this->value[2] = tvec3(Zero, Zero, value_type(s)); + this->value[3] = tvec3(Zero, Zero, Zero); + } + + template + template < + typename X1, typename Y1, typename Z1, + typename X2, typename Y2, typename Z2, + typename X3, typename Y3, typename Z3, + typename X4, typename Y4, typename Z4> + GLM_FUNC_DECL tmat4x3::tmat4x3 + ( + X1 const & x1, Y1 const & y1, Z1 const & z1, + X2 const & x2, Y2 const & y2, Z2 const & z2, + X3 const & x3, Y3 const & y3, Z3 const & z3, + X4 const & x4, Y4 const & y4, Z4 const & z4 + ) + { + this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1)); + this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2)); + this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3)); + this->value[3] = col_type(value_type(x4), value_type(y4), value_type(z4)); + } + + template + template + GLM_FUNC_DECL tmat4x3::tmat4x3 + ( + tvec3 const & v1, + tvec3 const & v2, + tvec3 const & v3, + tvec3 const & v4 + ) + { + this->value[0] = col_type(v1); + this->value[1] = col_type(v2); + this->value[2] = col_type(v3); + this->value[3] = col_type(v4); + } + + ////////////////////////////////////////////////////////////// + // Matrix conversions + + template + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + tmat4x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + this->value[3] = col_type(m[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + tmat2x2 const & m + ) + { + this->value[0] = col_type(m[0], value_type(0)); + this->value[1] = col_type(m[1], value_type(0)); + this->value[2] = col_type(m[2], value_type(1)); + this->value[3] = col_type(value_type(0)); + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + tmat3x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + this->value[3] = col_type(value_type(0)); + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + tmat4x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + this->value[3] = col_type(m[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + tmat2x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(value_type(0), value_type(0), value_type(1)); + this->value[3] = col_type(value_type(0)); + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + tmat3x2 const & m + ) + { + this->value[0] = col_type(m[0], value_type(0)); + this->value[1] = col_type(m[1], value_type(0)); + this->value[2] = col_type(m[2], value_type(1)); + this->value[3] = col_type(value_type(0)); + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + tmat2x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(value_type(0), value_type(0), value_type(1)); + this->value[3] = col_type(value_type(0)); + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + tmat4x2 const & m + ) + { + this->value[0] = col_type(m[0], value_type(0)); + this->value[1] = col_type(m[1], value_type(0)); + this->value[2] = col_type(m[2], value_type(1)); + this->value[3] = col_type(m[3], value_type(0)); + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + tmat3x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + this->value[3] = col_type(value_type(0)); + } + + ////////////////////////////////////////////////////////////// + // Unary updatable operators + + template + GLM_FUNC_QUALIFIER tmat4x3& tmat4x3::operator= + ( + tmat4x3 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + this->value[3] = m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x3& tmat4x3::operator= + ( + tmat4x3 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + this->value[3] = m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator+= + ( + U const & s + ) + { + this->value[0] += s; + this->value[1] += s; + this->value[2] += s; + this->value[3] += s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator+= + ( + tmat4x3 const & m + ) + { + this->value[0] += m[0]; + this->value[1] += m[1]; + this->value[2] += m[2]; + this->value[3] += m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator-= + ( + U const & s + ) + { + this->value[0] -= s; + this->value[1] -= s; + this->value[2] -= s; + this->value[3] -= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator-= + ( + tmat4x3 const & m + ) + { + this->value[0] -= m[0]; + this->value[1] -= m[1]; + this->value[2] -= m[2]; + this->value[3] -= m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator*= + ( + U const & s + ) + { + this->value[0] *= s; + this->value[1] *= s; + this->value[2] *= s; + this->value[3] *= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator*= + ( + tmat4x3 const & m + ) + { + return (*this = tmat4x3(*this * m)); + } + + template + template + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator/= + ( + U const & s + ) + { + this->value[0] /= s; + this->value[1] /= s; + this->value[2] /= s; + this->value[3] /= s; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator++ () + { + ++this->value[0]; + ++this->value[1]; + ++this->value[2]; + ++this->value[3]; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator-- () + { + --this->value[0]; + --this->value[1]; + --this->value[2]; + --this->value[3]; + return *this; + } + + ////////////////////////////////////////////////////////////// + // Binary operators + + template + GLM_FUNC_QUALIFIER tmat4x3 operator+ ( + tmat4x3 const & m, + typename tmat4x3::value_type const & s) + { + return tmat4x3( + m[0] + s, + m[1] + s, + m[2] + s, + m[3] + s); + } + + template + GLM_FUNC_QUALIFIER tmat4x3 operator+ ( + tmat4x3 const & m1, + tmat4x3 const & m2) + { + return tmat4x3( + m1[0] + m2[0], + m1[1] + m2[1], + m1[2] + m2[2], + m1[3] + m2[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x3 operator- ( + tmat4x3 const & m, + typename tmat4x3::value_type const & s) + { + return tmat4x3( + m[0] - s, + m[1] - s, + m[2] - s, + m[3] - s); + } + + template + GLM_FUNC_QUALIFIER tmat4x3 operator- ( + tmat4x3 const & m1, + tmat4x3 const & m2) + { + return tmat4x3( + m1[0] - m2[0], + m1[1] - m2[1], + m1[2] - m2[2], + m1[3] - m2[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x3 operator* ( + tmat4x3 const & m, + typename tmat4x3::value_type const & s) + { + return tmat4x3( + m[0] * s, + m[1] * s, + m[2] * s, + m[3] * s); + } + + template + GLM_FUNC_QUALIFIER tmat4x3 operator* ( + typename tmat4x3::value_type const & s, + tmat4x3 const & m) + { + return tmat4x3( + m[0] * s, + m[1] * s, + m[2] * s, + m[3] * s); + } + + template + GLM_FUNC_QUALIFIER typename tmat4x3::col_type operator* + ( + tmat4x3 const & m, + typename tmat4x3::row_type const & v) + { + return typename tmat4x3::col_type( + m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w, + m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * v.w, + m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z + m[3][2] * v.w); + } + + template + GLM_FUNC_QUALIFIER typename tmat4x3::row_type operator* + ( + typename tmat4x3::col_type const & v, + tmat4x3 const & m) + { + return typename tmat4x3::row_type( + v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2], + v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2], + v.x * m[2][0] + v.y * m[2][1] + v.z * m[2][2], + v.x * m[3][0] + v.y * m[3][1] + v.z * m[3][2]); + } + + template + GLM_FUNC_QUALIFIER tmat2x3 operator* + ( + tmat4x3 const & m1, + tmat2x4 const & m2 + ) + { + return tmat2x3( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3]); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator* + ( + tmat4x3 const & m1, + tmat3x4 const & m2 + ) + { + T const SrcA00 = m1[0][0]; + T const SrcA01 = m1[0][1]; + T const SrcA02 = m1[0][2]; + T const SrcA10 = m1[1][0]; + T const SrcA11 = m1[1][1]; + T const SrcA12 = m1[1][2]; + T const SrcA20 = m1[2][0]; + T const SrcA21 = m1[2][1]; + T const SrcA22 = m1[2][2]; + T const SrcA30 = m1[3][0]; + T const SrcA31 = m1[3][1]; + T const SrcA32 = m1[3][2]; + + T const SrcB00 = m2[0][0]; + T const SrcB01 = m2[0][1]; + T const SrcB02 = m2[0][2]; + T const SrcB03 = m2[0][3]; + T const SrcB10 = m2[1][0]; + T const SrcB11 = m2[1][1]; + T const SrcB12 = m2[1][2]; + T const SrcB13 = m2[1][3]; + T const SrcB20 = m2[2][0]; + T const SrcB21 = m2[2][1]; + T const SrcB22 = m2[2][2]; + T const SrcB23 = m2[2][3]; + + tmat3x3 Result(tmat3x3::null); + Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02 + SrcA30 * SrcB03; + Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02 + SrcA31 * SrcB03; + Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02 + SrcA32 * SrcB03; + Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12 + SrcA30 * SrcB13; + Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12 + SrcA31 * SrcB13; + Result[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11 + SrcA22 * SrcB12 + SrcA32 * SrcB13; + Result[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21 + SrcA20 * SrcB22 + SrcA30 * SrcB23; + Result[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21 + SrcA21 * SrcB22 + SrcA31 * SrcB23; + Result[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21 + SrcA22 * SrcB22 + SrcA32 * SrcB23; + return Result; + } + + template + GLM_FUNC_QUALIFIER tmat4x3 operator* + ( + tmat4x3 const & m1, + tmat4x4 const & m2 + ) + { + return tmat4x3( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3], + m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2] + m1[3][2] * m2[2][3], + m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2] + m1[3][0] * m2[3][3], + m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2] + m1[3][1] * m2[3][3], + m1[0][2] * m2[3][0] + m1[1][2] * m2[3][1] + m1[2][2] * m2[3][2] + m1[3][2] * m2[3][3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x3 operator/ + ( + tmat4x3 const & m, + typename tmat4x3::value_type const & s + ) + { + return tmat4x3( + m[0] / s, + m[1] / s, + m[2] / s, + m[3] / s); + } + + template + GLM_FUNC_QUALIFIER tmat4x3 operator/ + ( + typename tmat4x3::value_type const & s, + tmat4x3 const & m + ) + { + return tmat4x3( + s / m[0], + s / m[1], + s / m[2], + s / m[3]); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tmat4x3 const operator- + ( + tmat4x3 const & m + ) + { + return tmat4x3( + -m[0], + -m[1], + -m[2], + -m[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x3 const operator++ + ( + tmat4x3 const & m, + int + ) + { + return tmat4x3( + m[0] + T(1), + m[1] + T(1), + m[2] + T(1), + m[3] + T(1)); + } + + template + GLM_FUNC_QUALIFIER tmat4x3 const operator-- + ( + tmat4x3 const & m, + int + ) + { + return tmat4x3( + m[0] - T(1), + m[1] - T(1), + m[2] - T(1), + m[3] - T(1)); + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tmat4x3 const & m1, + tmat4x3 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tmat4x3 const & m1, + tmat4x3 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]); + } +} //namespace detail +} //namespace glm + diff --git a/include/gal/opengl/glm/core/type_mat4x4.hpp b/include/gal/opengl/glm/core/type_mat4x4.hpp new file mode 100644 index 0000000000..2e911bc837 --- /dev/null +++ b/include/gal/opengl/glm/core/type_mat4x4.hpp @@ -0,0 +1,320 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat4x4.hpp +/// @date 2005-01-27 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_mat4x4 +#define glm_core_type_mat4x4 + +#include "type_mat.hpp" + +namespace glm{ +namespace detail +{ + template struct tvec1; + template struct tvec2; + template struct tvec3; + template struct tvec4; + template struct tmat2x2; + template struct tmat2x3; + template struct tmat2x4; + template struct tmat3x2; + template struct tmat3x3; + template struct tmat3x4; + template struct tmat4x2; + template struct tmat4x3; + template struct tmat4x4; + + template + struct tmat4x4 + { + enum ctor{null}; + typedef T value_type; + typedef std::size_t size_type; + typedef tvec4 col_type; + typedef tvec4 row_type; + typedef tmat4x4 type; + typedef tmat4x4 transpose_type; + + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + public: + /// Implementation detail + /// @cond DETAIL + GLM_FUNC_DECL tmat4x4 _inverse() const; + /// @endcond + + private: + // Data + col_type value[4]; + + public: + // Constructors + GLM_FUNC_DECL tmat4x4(); + GLM_FUNC_DECL tmat4x4(tmat4x4 const & m); + + GLM_FUNC_DECL explicit tmat4x4( + ctor Null); + GLM_FUNC_DECL explicit tmat4x4( + value_type const & x); + GLM_FUNC_DECL explicit tmat4x4( + value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, + value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1, + value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2, + value_type const & x3, value_type const & y3, value_type const & z3, value_type const & w3); + GLM_FUNC_DECL explicit tmat4x4( + col_type const & v0, + col_type const & v1, + col_type const & v2, + col_type const & v3); + + ////////////////////////////////////// + // Conversions + template + GLM_FUNC_DECL explicit tmat4x4( + U const & x); + + template < + typename X1, typename Y1, typename Z1, typename W1, + typename X2, typename Y2, typename Z2, typename W2, + typename X3, typename Y3, typename Z3, typename W3, + typename X4, typename Y4, typename Z4, typename W4> + GLM_FUNC_DECL explicit tmat4x4( + X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, + X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, + X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3, + X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4); + + template + GLM_FUNC_DECL explicit tmat4x4( + tvec4 const & v1, + tvec4 const & v2, + tvec4 const & v3, + tvec4 const & v4); + + // Matrix conversions + template + GLM_FUNC_DECL explicit tmat4x4(tmat4x4 const & m); + + GLM_FUNC_DECL explicit tmat4x4(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat4x3 const & x); + + // Accesses + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; + + // Unary updatable operators + GLM_FUNC_DECL tmat4x4 & operator= (tmat4x4 const & m); + template + GLM_FUNC_DECL tmat4x4 & operator= (tmat4x4 const & m); + template + GLM_FUNC_DECL tmat4x4 & operator+= (U const & s); + template + GLM_FUNC_DECL tmat4x4 & operator+= (tmat4x4 const & m); + template + GLM_FUNC_DECL tmat4x4 & operator-= (U const & s); + template + GLM_FUNC_DECL tmat4x4 & operator-= (tmat4x4 const & m); + template + GLM_FUNC_DECL tmat4x4 & operator*= (U const & s); + template + GLM_FUNC_DECL tmat4x4 & operator*= (tmat4x4 const & m); + template + GLM_FUNC_DECL tmat4x4 & operator/= (U const & s); + template + GLM_FUNC_DECL tmat4x4 & operator/= (tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 & operator++ (); + GLM_FUNC_DECL tmat4x4 & operator-- (); + }; + + // Binary operators + template + tmat4x4 operator+ ( + tmat4x4 const & m, + typename tmat4x4::value_type const & s); + + template + tmat4x4 operator+ ( + typename tmat4x4::value_type const & s, + tmat4x4 const & m); + + template + tmat4x4 operator+ ( + tmat4x4 const & m1, + tmat4x4 const & m2); + + template + tmat4x4 operator- ( + tmat4x4 const & m, + typename tmat4x4::value_type const & s); + + template + tmat4x4 operator- ( + typename tmat4x4::value_type const & s, + tmat4x4 const & m); + + template + tmat4x4 operator- ( + tmat4x4 const & m1, + tmat4x4 const & m2); + + template + tmat4x4 operator* ( + tmat4x4 const & m, + typename tmat4x4::value_type const & s); + + template + tmat4x4 operator* ( + typename tmat4x4::value_type const & s, + tmat4x4 const & m); + + template + typename tmat4x4::col_type operator* ( + tmat4x4 const & m, + typename tmat4x4::row_type const & v); + + template + typename tmat4x4::row_type operator* ( + typename tmat4x4::col_type const & v, + tmat4x4 const & m); + + template + tmat2x4 operator* ( + tmat4x4 const & m1, + tmat2x4 const & m2); + + template + tmat3x4 operator* ( + tmat4x4 const & m1, + tmat3x4 const & m2); + + template + tmat4x4 operator* ( + tmat4x4 const & m1, + tmat4x4 const & m2); + + template + tmat4x4 operator/ ( + tmat4x4 const & m, + typename tmat4x4::value_type const & s); + + template + tmat4x4 operator/ ( + typename tmat4x4::value_type const & s, + tmat4x4 const & m); + + template + typename tmat4x4::col_type operator/ ( + tmat4x4 const & m, + typename tmat4x4::row_type const & v); + + template + typename tmat4x4::row_type operator/ ( + typename tmat4x4::col_type & v, + tmat4x4 const & m); + + template + tmat4x4 operator/ ( + tmat4x4 const & m1, + tmat4x4 const & m2); + + // Unary constant operators + template + tmat4x4 const operator- ( + tmat4x4 const & m); + + template + tmat4x4 const operator-- ( + tmat4x4 const & m, int); + + template + tmat4x4 const operator++ ( + tmat4x4 const & m, int); + +} //namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 4 columns of 4 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x4 lowp_mat4; + + /// 4 columns of 4 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x4 mediump_mat4; + + /// 4 columns of 4 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x4 highp_mat4; + + /// 4 columns of 4 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x4 lowp_mat4x4; + + /// 4 columns of 4 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x4 mediump_mat4x4; + + /// 4 columns of 4 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x4 highp_mat4x4; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_mat4x4.inl" +#endif//GLM_EXTERNAL_TEMPLATE + +#endif//glm_core_type_mat4x4 diff --git a/include/gal/opengl/glm/core/type_mat4x4.inl b/include/gal/opengl/glm/core/type_mat4x4.inl new file mode 100644 index 0000000000..71aa484dc3 --- /dev/null +++ b/include/gal/opengl/glm/core/type_mat4x4.inl @@ -0,0 +1,905 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat4x4.inl +/// @date 2005-01-27 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x4::size_type tmat4x4::length() const + { + return 4; + } + + template + GLM_FUNC_QUALIFIER typename tmat4x4::size_type tmat4x4::col_size() + { + return 4; + } + + template + GLM_FUNC_QUALIFIER typename tmat4x4::size_type tmat4x4::row_size() + { + return 4; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tmat4x4::col_type & + tmat4x4::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return this->value[i]; + } + + template + GLM_FUNC_QUALIFIER typename tmat4x4::col_type const & + tmat4x4::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return this->value[i]; + } + + ////////////////////////////////////////////////////////////// + // Constructors + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4() + { + value_type Zero(0); + value_type One(1); + this->value[0] = col_type(One, Zero, Zero, Zero); + this->value[1] = col_type(Zero, One, Zero, Zero); + this->value[2] = col_type(Zero, Zero, One, Zero); + this->value[3] = col_type(Zero, Zero, Zero, One); + } + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + tmat4x4 const & m + ) + { + this->value[0] = m.value[0]; + this->value[1] = m.value[1]; + this->value[2] = m.value[2]; + this->value[3] = m.value[3]; + } + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + value_type const & s + ) + { + value_type const Zero(0); + this->value[0] = col_type(s, Zero, Zero, Zero); + this->value[1] = col_type(Zero, s, Zero, Zero); + this->value[2] = col_type(Zero, Zero, s, Zero); + this->value[3] = col_type(Zero, Zero, Zero, s); + } + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, + value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1, + value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2, + value_type const & x3, value_type const & y3, value_type const & z3, value_type const & w3 + ) + { + this->value[0] = col_type(x0, y0, z0, w0); + this->value[1] = col_type(x1, y1, z1, w1); + this->value[2] = col_type(x2, y2, z2, w2); + this->value[3] = col_type(x3, y3, z3, w3); + } + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + col_type const & v0, + col_type const & v1, + col_type const & v2, + col_type const & v3 + ) + { + this->value[0] = v0; + this->value[1] = v1; + this->value[2] = v2; + this->value[3] = v3; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + tmat4x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + this->value[3] = col_type(m[3]); + } + + ////////////////////////////////////// + // Convertion constructors + template + template + GLM_FUNC_DECL tmat4x4::tmat4x4 + ( + U const & s + ) + { + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types"); + + value_type const Zero(0); + this->value[0] = tvec4(value_type(s), Zero, Zero, Zero); + this->value[1] = tvec4(Zero, value_type(s), Zero, Zero); + this->value[2] = tvec4(Zero, Zero, value_type(s), Zero); + this->value[3] = tvec4(Zero, Zero, Zero, value_type(s)); + } + + template + template < + typename X1, typename Y1, typename Z1, typename W1, + typename X2, typename Y2, typename Z2, typename W2, + typename X3, typename Y3, typename Z3, typename W3, + typename X4, typename Y4, typename Z4, typename W4> + GLM_FUNC_DECL tmat4x4::tmat4x4 + ( + X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, + X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, + X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3, + X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 4th parameter type invalid."); + + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 5th parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 6th parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 7th parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 8th parameter type invalid."); + + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 9th parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 10th parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 11th parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 12th parameter type invalid."); + + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 13th parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 14th parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 15th parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 16th parameter type invalid."); + + this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1), value_type(w1)); + this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2), value_type(w2)); + this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3), value_type(w3)); + this->value[3] = col_type(value_type(x4), value_type(y4), value_type(z4), value_type(w4)); + } + + template + template + GLM_FUNC_DECL tmat4x4::tmat4x4 + ( + tvec4 const & v1, + tvec4 const & v2, + tvec4 const & v3, + tvec4 const & v4 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 4th parameter type invalid."); + + this->value[0] = col_type(v1); + this->value[1] = col_type(v2); + this->value[2] = col_type(v3); + this->value[3] = col_type(v4); + } + + ////////////////////////////////////// + // Matrix convertion constructors + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + tmat2x2 const & m + ) + { + this->value[0] = col_type(m[0], detail::tvec2(0)); + this->value[1] = col_type(m[1], detail::tvec2(0)); + this->value[2] = col_type(value_type(0)); + this->value[3] = col_type(value_type(0), value_type(0), value_type(0), value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + tmat3x3 const & m + ) + { + this->value[0] = col_type(m[0], value_type(0)); + this->value[1] = col_type(m[1], value_type(0)); + this->value[2] = col_type(m[2], value_type(0)); + this->value[3] = col_type(value_type(0), value_type(0), value_type(0), value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + tmat2x3 const & m + ) + { + this->value[0] = col_type(m[0], value_type(0)); + this->value[1] = col_type(m[1], value_type(0)); + this->value[2] = col_type(value_type(0)); + this->value[3] = col_type(value_type(0), value_type(0), value_type(0), value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + tmat3x2 const & m + ) + { + this->value[0] = col_type(m[0], detail::tvec2(0)); + this->value[1] = col_type(m[1], detail::tvec2(0)); + this->value[2] = col_type(m[2], detail::tvec2(0)); + this->value[3] = col_type(value_type(0), value_type(0), value_type(0), value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + tmat2x4 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = col_type(T(0)); + this->value[3] = col_type(T(0), T(0), T(0), T(1)); + } + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + tmat4x2 const & m + ) + { + this->value[0] = col_type(m[0], detail::tvec2(0)); + this->value[1] = col_type(m[1], detail::tvec2(0)); + this->value[2] = col_type(T(0)); + this->value[3] = col_type(T(0), T(0), T(0), T(1)); + } + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + tmat3x4 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + this->value[3] = col_type(T(0), T(0), T(0), T(1)); + } + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + tmat4x3 const & m + ) + { + this->value[0] = col_type(m[0], T(0)); + this->value[1] = col_type(m[1], T(0)); + this->value[2] = col_type(m[2], T(0)); + this->value[3] = col_type(m[3], T(1)); + } + + ////////////////////////////////////////////////////////////// + // Operators + + template + GLM_FUNC_QUALIFIER tmat4x4& tmat4x4::operator= + ( + tmat4x4 const & m + ) + { + //memcpy could be faster + //memcpy(&this->value, &m.value, 16 * sizeof(valType)); + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + this->value[3] = m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x4& tmat4x4::operator= + ( + tmat4x4 const & m + ) + { + //memcpy could be faster + //memcpy(&this->value, &m.value, 16 * sizeof(valType)); + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + this->value[3] = m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x4& tmat4x4::operator+= + ( + U const & s + ) + { + this->value[0] += s; + this->value[1] += s; + this->value[2] += s; + this->value[3] += s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x4& tmat4x4::operator+= + ( + tmat4x4 const & m + ) + { + this->value[0] += m[0]; + this->value[1] += m[1]; + this->value[2] += m[2]; + this->value[3] += m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator-= + ( + U const & s + ) + { + this->value[0] -= s; + this->value[1] -= s; + this->value[2] -= s; + this->value[3] -= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator-= + ( + tmat4x4 const & m + ) + { + this->value[0] -= m[0]; + this->value[1] -= m[1]; + this->value[2] -= m[2]; + this->value[3] -= m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator*= + ( + U const & s + ) + { + this->value[0] *= s; + this->value[1] *= s; + this->value[2] *= s; + this->value[3] *= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator*= + ( + tmat4x4 const & m + ) + { + return (*this = *this * m); + } + + template + template + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator/= + ( + U const & s + ) + { + this->value[0] /= s; + this->value[1] /= s; + this->value[2] /= s; + this->value[3] /= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator/= + ( + tmat4x4 const & m + ) + { + return (*this = *this / m); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator++ () + { + ++this->value[0]; + ++this->value[1]; + ++this->value[2]; + ++this->value[3]; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator-- () + { + --this->value[0]; + --this->value[1]; + --this->value[2]; + --this->value[3]; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat4x4 tmat4x4::_inverse() const + { + // Calculate all mat2 determinants + value_type SubFactor00 = this->value[2][2] * this->value[3][3] - this->value[3][2] * this->value[2][3]; + value_type SubFactor01 = this->value[2][1] * this->value[3][3] - this->value[3][1] * this->value[2][3]; + value_type SubFactor02 = this->value[2][1] * this->value[3][2] - this->value[3][1] * this->value[2][2]; + value_type SubFactor03 = this->value[2][0] * this->value[3][3] - this->value[3][0] * this->value[2][3]; + value_type SubFactor04 = this->value[2][0] * this->value[3][2] - this->value[3][0] * this->value[2][2]; + value_type SubFactor05 = this->value[2][0] * this->value[3][1] - this->value[3][0] * this->value[2][1]; + value_type SubFactor06 = this->value[1][2] * this->value[3][3] - this->value[3][2] * this->value[1][3]; + value_type SubFactor07 = this->value[1][1] * this->value[3][3] - this->value[3][1] * this->value[1][3]; + value_type SubFactor08 = this->value[1][1] * this->value[3][2] - this->value[3][1] * this->value[1][2]; + value_type SubFactor09 = this->value[1][0] * this->value[3][3] - this->value[3][0] * this->value[1][3]; + value_type SubFactor10 = this->value[1][0] * this->value[3][2] - this->value[3][0] * this->value[1][2]; + value_type SubFactor11 = this->value[1][1] * this->value[3][3] - this->value[3][1] * this->value[1][3]; + value_type SubFactor12 = this->value[1][0] * this->value[3][1] - this->value[3][0] * this->value[1][1]; + value_type SubFactor13 = this->value[1][2] * this->value[2][3] - this->value[2][2] * this->value[1][3]; + value_type SubFactor14 = this->value[1][1] * this->value[2][3] - this->value[2][1] * this->value[1][3]; + value_type SubFactor15 = this->value[1][1] * this->value[2][2] - this->value[2][1] * this->value[1][2]; + value_type SubFactor16 = this->value[1][0] * this->value[2][3] - this->value[2][0] * this->value[1][3]; + value_type SubFactor17 = this->value[1][0] * this->value[2][2] - this->value[2][0] * this->value[1][2]; + value_type SubFactor18 = this->value[1][0] * this->value[2][1] - this->value[2][0] * this->value[1][1]; +/* + tmat4x4 Inverse( + + (this->value[1][1] * SubFactor00 - this->value[1][2] * SubFactor01 + this->value[1][3] * SubFactor02), + - (this->value[1][0] * SubFactor00 - this->value[1][2] * SubFactor03 + this->value[1][3] * SubFactor04), + + (this->value[1][0] * SubFactor01 - this->value[1][1] * SubFactor03 + this->value[1][3] * SubFactor05), + - (this->value[1][0] * SubFactor02 - this->value[1][1] * SubFactor04 + this->value[1][2] * SubFactor05), + + - (this->value[0][1] * SubFactor00 - this->value[0][2] * SubFactor01 + this->value[0][3] * SubFactor02), + + (this->value[0][0] * SubFactor00 - this->value[0][2] * SubFactor03 + this->value[0][3] * SubFactor04), + - (this->value[0][0] * SubFactor01 - this->value[0][1] * SubFactor03 + this->value[0][3] * SubFactor05), + + (this->value[0][0] * SubFactor02 - this->value[0][1] * SubFactor04 + this->value[0][2] * SubFactor05), + + + (this->value[0][1] * SubFactor06 - this->value[0][2] * SubFactor07 + this->value[0][3] * SubFactor08), + - (this->value[0][0] * SubFactor06 - this->value[0][2] * SubFactor09 + this->value[0][3] * SubFactor10), + + (this->value[0][0] * SubFactor11 - this->value[0][1] * SubFactor09 + this->value[0][3] * SubFactor12), + - (this->value[0][0] * SubFactor08 - this->value[0][1] * SubFactor10 + this->value[0][2] * SubFactor12), + + - (this->value[0][1] * SubFactor13 - this->value[0][2] * SubFactor14 + this->value[0][3] * SubFactor15), + + (this->value[0][0] * SubFactor13 - this->value[0][2] * SubFactor16 + this->value[0][3] * SubFactor17), + - (this->value[0][0] * SubFactor14 - this->value[0][1] * SubFactor16 + this->value[0][3] * SubFactor18), + + (this->value[0][0] * SubFactor15 - this->value[0][1] * SubFactor17 + this->value[0][2] * SubFactor18)); +*/ + tmat4x4 Inverse( + + this->value[1][1] * SubFactor00 - this->value[1][2] * SubFactor01 + this->value[1][3] * SubFactor02, + - this->value[1][0] * SubFactor00 + this->value[1][2] * SubFactor03 - this->value[1][3] * SubFactor04, + + this->value[1][0] * SubFactor01 - this->value[1][1] * SubFactor03 + this->value[1][3] * SubFactor05, + - this->value[1][0] * SubFactor02 + this->value[1][1] * SubFactor04 - this->value[1][2] * SubFactor05, + + - this->value[0][1] * SubFactor00 + this->value[0][2] * SubFactor01 - this->value[0][3] * SubFactor02, + + this->value[0][0] * SubFactor00 - this->value[0][2] * SubFactor03 + this->value[0][3] * SubFactor04, + - this->value[0][0] * SubFactor01 + this->value[0][1] * SubFactor03 - this->value[0][3] * SubFactor05, + + this->value[0][0] * SubFactor02 - this->value[0][1] * SubFactor04 + this->value[0][2] * SubFactor05, + + + this->value[0][1] * SubFactor06 - this->value[0][2] * SubFactor07 + this->value[0][3] * SubFactor08, + - this->value[0][0] * SubFactor06 + this->value[0][2] * SubFactor09 - this->value[0][3] * SubFactor10, + + this->value[0][0] * SubFactor11 - this->value[0][1] * SubFactor09 + this->value[0][3] * SubFactor12, + - this->value[0][0] * SubFactor08 + this->value[0][1] * SubFactor10 - this->value[0][2] * SubFactor12, + + - this->value[0][1] * SubFactor13 + this->value[0][2] * SubFactor14 - this->value[0][3] * SubFactor15, + + this->value[0][0] * SubFactor13 - this->value[0][2] * SubFactor16 + this->value[0][3] * SubFactor17, + - this->value[0][0] * SubFactor14 + this->value[0][1] * SubFactor16 - this->value[0][3] * SubFactor18, + + this->value[0][0] * SubFactor15 - this->value[0][1] * SubFactor17 + this->value[0][2] * SubFactor18); + + value_type Determinant = + + this->value[0][0] * Inverse[0][0] + + this->value[0][1] * Inverse[1][0] + + this->value[0][2] * Inverse[2][0] + + this->value[0][3] * Inverse[3][0]; + + Inverse /= Determinant; + return Inverse; + } + + // Binary operators + template + GLM_FUNC_QUALIFIER tmat4x4 operator+ + ( + tmat4x4 const & m, + typename tmat4x4::value_type const & s + ) + { + return tmat4x4( + m[0] + s, + m[1] + s, + m[2] + s, + m[3] + s); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator+ + ( + typename tmat4x4::value_type const & s, + tmat4x4 const & m + ) + { + return tmat4x4( + m[0] + s, + m[1] + s, + m[2] + s, + m[3] + s); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator+ + ( + tmat4x4 const & m1, + tmat4x4 const & m2 + ) + { + return tmat4x4( + m1[0] + m2[0], + m1[1] + m2[1], + m1[2] + m2[2], + m1[3] + m2[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator- + ( + tmat4x4 const & m, + typename tmat4x4::value_type const & s + ) + { + return tmat4x4( + m[0] - s, + m[1] - s, + m[2] - s, + m[3] - s); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator- + ( + typename tmat4x4::value_type const & s, + tmat4x4 const & m + ) + { + return tmat4x4( + s - m[0], + s - m[1], + s - m[2], + s - m[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator- + ( + tmat4x4 const & m1, + tmat4x4 const & m2 + ) + { + return tmat4x4( + m1[0] - m2[0], + m1[1] - m2[1], + m1[2] - m2[2], + m1[3] - m2[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator* + ( + tmat4x4 const & m, + typename tmat4x4::value_type const & s + ) + { + return tmat4x4( + m[0] * s, + m[1] * s, + m[2] * s, + m[3] * s); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator* + ( + typename tmat4x4::value_type const & s, + tmat4x4 const & m + ) + { + return tmat4x4( + m[0] * s, + m[1] * s, + m[2] * s, + m[3] * s); + } + + template + GLM_FUNC_QUALIFIER typename tmat4x4::col_type operator* + ( + tmat4x4 const & m, + typename tmat4x4::row_type const & v + ) + { + return typename tmat4x4::col_type( + m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w, + m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * v.w, + m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z + m[3][2] * v.w, + m[0][3] * v.x + m[1][3] * v.y + m[2][3] * v.z + m[3][3] * v.w); + } + + template + GLM_FUNC_QUALIFIER typename tmat4x4::row_type operator* + ( + typename tmat4x4::col_type const & v, + tmat4x4 const & m + ) + { + return typename tmat4x4::row_type( + m[0][0] * v.x + m[0][1] * v.y + m[0][2] * v.z + m[0][3] * v.w, + m[1][0] * v.x + m[1][1] * v.y + m[1][2] * v.z + m[1][3] * v.w, + m[2][0] * v.x + m[2][1] * v.y + m[2][2] * v.z + m[2][3] * v.w, + m[3][0] * v.x + m[3][1] * v.y + m[3][2] * v.z + m[3][3] * v.w); + } + + template + GLM_FUNC_QUALIFIER tmat2x4 operator* + ( + tmat4x4 const & m1, + tmat2x4 const & m2 + ) + { + return tmat2x4( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3], + m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2] + m1[3][3] * m2[0][3], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3], + m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2] + m1[3][3] * m2[1][3]); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 operator* + ( + tmat4x4 const & m1, + tmat3x4 const & m2 + ) + { + return tmat3x4( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3], + m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2] + m1[3][3] * m2[0][3], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3], + m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2] + m1[3][3] * m2[1][3], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3], + m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2] + m1[3][2] * m2[2][3], + m1[0][3] * m2[2][0] + m1[1][3] * m2[2][1] + m1[2][3] * m2[2][2] + m1[3][3] * m2[2][3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator* + ( + tmat4x4 const & m1, + tmat4x4 const & m2 + ) + { + typename tmat4x4::col_type const SrcA0 = m1[0]; + typename tmat4x4::col_type const SrcA1 = m1[1]; + typename tmat4x4::col_type const SrcA2 = m1[2]; + typename tmat4x4::col_type const SrcA3 = m1[3]; + + typename tmat4x4::col_type const SrcB0 = m2[0]; + typename tmat4x4::col_type const SrcB1 = m2[1]; + typename tmat4x4::col_type const SrcB2 = m2[2]; + typename tmat4x4::col_type const SrcB3 = m2[3]; + + tmat4x4 Result(tmat4x4::null); + Result[0] = SrcA0 * SrcB0[0] + SrcA1 * SrcB0[1] + SrcA2 * SrcB0[2] + SrcA3 * SrcB0[3]; + Result[1] = SrcA0 * SrcB1[0] + SrcA1 * SrcB1[1] + SrcA2 * SrcB1[2] + SrcA3 * SrcB1[3]; + Result[2] = SrcA0 * SrcB2[0] + SrcA1 * SrcB2[1] + SrcA2 * SrcB2[2] + SrcA3 * SrcB2[3]; + Result[3] = SrcA0 * SrcB3[0] + SrcA1 * SrcB3[1] + SrcA2 * SrcB3[2] + SrcA3 * SrcB3[3]; + return Result; + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator/ + ( + tmat4x4 const & m, + typename tmat4x4::value_type const & s + ) + { + return tmat4x4( + m[0] / s, + m[1] / s, + m[2] / s, + m[3] / s); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator/ + ( + typename tmat4x4::value_type const & s, + tmat4x4 const & m + ) + { + return tmat4x4( + s / m[0], + s / m[1], + s / m[2], + s / m[3]); + } + + template + GLM_FUNC_QUALIFIER typename tmat4x4::col_type operator/ + ( + tmat4x4 const & m, + typename tmat4x4::row_type const & v + ) + { + return m._inverse() * v; + } + + template + GLM_FUNC_QUALIFIER typename tmat4x4::row_type operator/ + ( + typename tmat4x4::col_type const & v, + tmat4x4 const & m + ) + { + return v * m._inverse(); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator/ + ( + tmat4x4 const & m1, + tmat4x4 const & m2 + ) + { + return m1 * m2._inverse(); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tmat4x4 const operator- + ( + tmat4x4 const & m + ) + { + return tmat4x4( + -m[0], + -m[1], + -m[2], + -m[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 const operator++ + ( + tmat4x4 const & m, + int + ) + { + return tmat4x4( + m[0] + typename tmat4x4::value_type(1), + m[1] + typename tmat4x4::value_type(1), + m[2] + typename tmat4x4::value_type(1), + m[3] + typename tmat4x4::value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 const operator-- + ( + tmat4x4 const & m, + int + ) + { + return tmat4x4( + m[0] - typename tmat4x4::value_type(1), + m[1] - typename tmat4x4::value_type(1), + m[2] - typename tmat4x4::value_type(1), + m[3] - typename tmat4x4::value_type(1)); + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tmat4x4 const & m1, + tmat4x4 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tmat4x4 const & m1, + tmat4x4 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]); + } + +} //namespace detail +} //namespace glm diff --git a/include/gal/opengl/glm/core/type_size.hpp b/include/gal/opengl/glm/core/type_size.hpp new file mode 100644 index 0000000000..29d420dd71 --- /dev/null +++ b/include/gal/opengl/glm/core/type_size.hpp @@ -0,0 +1,43 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_size.hpp +/// @date 2008-10-05 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_size +#define glm_core_type_size + +#include + +namespace glm{ +namespace detail +{ + //typedef std::size_t size_t; + typedef int sizeType; + +}//namespace detail +}//namespace glm + +#endif//glm_core_type_size diff --git a/include/gal/opengl/glm/core/type_vec.hpp b/include/gal/opengl/glm/core/type_vec.hpp new file mode 100644 index 0000000000..0afa7db51f --- /dev/null +++ b/include/gal/opengl/glm/core/type_vec.hpp @@ -0,0 +1,41 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_vec.hpp +/// @date 2010-01-26 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_vec +#define glm_core_type_vec + +#include "type_gentype.hpp" + +namespace glm{ +namespace detail +{ + +}//namespace detail +}//namespace glm + +#endif//glm_core_type_vec diff --git a/include/gal/opengl/glm/core/type_vec.inl b/include/gal/opengl/glm/core/type_vec.inl new file mode 100644 index 0000000000..5368dd5f7c --- /dev/null +++ b/include/gal/opengl/glm/core/type_vec.inl @@ -0,0 +1,27 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_vec.inl +/// @date 2011-06-15 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// diff --git a/include/gal/opengl/glm/core/type_vec1.hpp b/include/gal/opengl/glm/core/type_vec1.hpp new file mode 100644 index 0000000000..76c18e7878 --- /dev/null +++ b/include/gal/opengl/glm/core/type_vec1.hpp @@ -0,0 +1,212 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_vec1.hpp +/// @date 2008-08-25 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_gentype1 +#define glm_core_type_gentype1 + +#include "type_vec.hpp" +#include "type_float.hpp" +#include "type_int.hpp" +#include "type_size.hpp" +#include "_swizzle.hpp" + +namespace glm{ +namespace detail +{ + template struct tref1; + template struct tref2; + template struct tref3; + template struct tref4; + template struct tvec1; + template struct tvec2; + template struct tvec3; + template struct tvec4; + + template + struct tvec1 + { + enum ctor{null}; + + typedef T value_type; + typedef std::size_t size_type; + typedef tvec1 type; + typedef tvec1 bool_type; + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + ////////////////////////////////////// + // Data + +# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW) + value_type x; +# else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES) + union {value_type x, r, s;}; +# endif//GLM_COMPONENT + + ////////////////////////////////////// + // Accesses + + GLM_FUNC_DECL value_type & operator[](size_type i); + GLM_FUNC_DECL value_type const & operator[](size_type i) const; + + ////////////////////////////////////// + // Implicit basic constructors + + GLM_FUNC_DECL tvec1(); + GLM_FUNC_DECL tvec1(tvec1 const & v); + + ////////////////////////////////////// + // Explicit basic constructors + + GLM_FUNC_DECL explicit tvec1( + ctor); + GLM_FUNC_DECL explicit tvec1( + value_type const & s); + + ////////////////////////////////////// + // Swizzle constructors + + GLM_FUNC_DECL tvec1(tref1 const & r); + + ////////////////////////////////////// + // Convertion scalar constructors + + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec1(U const & s); + + ////////////////////////////////////// + // Convertion vector constructors + + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec1(tvec2 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec1(tvec3 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec1(tvec4 const & v); + + ////////////////////////////////////// + // Unary arithmetic operators + + GLM_FUNC_DECL tvec1 & operator= (tvec1 const & v); + template + GLM_FUNC_DECL tvec1 & operator= (tvec1 const & v); + + template + GLM_FUNC_DECL tvec1 & operator+=(U const & s); + template + GLM_FUNC_DECL tvec1 & operator+=(tvec1 const & v); + template + GLM_FUNC_DECL tvec1 & operator-=(U const & s); + template + GLM_FUNC_DECL tvec1 & operator-=(tvec1 const & v); + template + GLM_FUNC_DECL tvec1 & operator*=(U const & s); + template + GLM_FUNC_DECL tvec1 & operator*=(tvec1 const & v); + template + GLM_FUNC_DECL tvec1 & operator/=(U const & s); + template + GLM_FUNC_DECL tvec1 & operator/=(tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator++(); + GLM_FUNC_DECL tvec1 & operator--(); + + ////////////////////////////////////// + // Unary bit operators + + template + GLM_FUNC_DECL tvec1 & operator%=(U const & s); + template + GLM_FUNC_DECL tvec1 & operator%=(tvec1 const & v); + template + GLM_FUNC_DECL tvec1 & operator&=(U const & s); + template + GLM_FUNC_DECL tvec1 & operator&=(tvec1 const & v); + template + GLM_FUNC_DECL tvec1 & operator|=(U const & s); + template + GLM_FUNC_DECL tvec1 & operator|=(tvec1 const & v); + template + GLM_FUNC_DECL tvec1 & operator^=(U const & s); + template + GLM_FUNC_DECL tvec1 & operator^=(tvec1 const & v); + template + GLM_FUNC_DECL tvec1 & operator<<=(U const & s); + template + GLM_FUNC_DECL tvec1 & operator<<=(tvec1 const & v); + template + GLM_FUNC_DECL tvec1 & operator>>=(U const & s); + template + GLM_FUNC_DECL tvec1 & operator>>=(tvec1 const & v); + + ////////////////////////////////////// + // Swizzle operators + + GLM_FUNC_DECL value_type swizzle(comp X) const; + GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; + GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; + GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + GLM_FUNC_DECL tref1 swizzle(comp X); + }; + + template + struct tref1 + { + GLM_FUNC_DECL tref1(T & x); + GLM_FUNC_DECL tref1(tref1 const & r); + GLM_FUNC_DECL tref1(tvec1 const & v); + + GLM_FUNC_DECL tref1 & operator= (tref1 const & r); + GLM_FUNC_DECL tref1 & operator= (tvec1 const & v); + + T& x; + }; + + GLM_DETAIL_IS_VECTOR(tvec1); + + typedef detail::tvec1 highp_vec1_t; + typedef detail::tvec1 mediump_vec1_t; + typedef detail::tvec1 lowp_vec1_t; + typedef detail::tvec1 highp_ivec1_t; + typedef detail::tvec1 mediump_ivec1_t; + typedef detail::tvec1 lowp_ivec1_t; + typedef detail::tvec1 highp_uvec1_t; + typedef detail::tvec1 mediump_uvec1_t; + typedef detail::tvec1 lowp_uvec1_t; + +}//namespace detail +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_vec1.inl" +#endif//GLM_EXTERNAL_TEMPLATE + +#endif//glm_core_type_gentype1 diff --git a/include/gal/opengl/glm/core/type_vec1.inl b/include/gal/opengl/glm/core/type_vec1.inl new file mode 100644 index 0000000000..aacd9103df --- /dev/null +++ b/include/gal/opengl/glm/core/type_vec1.inl @@ -0,0 +1,928 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_vec1.inl +/// @date 2008-08-25 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec1::size_type tvec1::length() const + { + return 1; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tvec1::value_type & tvec1::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return (&x)[i]; + } + + template + GLM_FUNC_QUALIFIER typename tvec1::value_type const & tvec1::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return (&x)[i]; + } + + ////////////////////////////////////// + // Implicit basic constructors + + template + GLM_FUNC_QUALIFIER tvec1::tvec1() : + x(value_type(0)) + {} + + template + GLM_FUNC_QUALIFIER tvec1::tvec1 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tvec1::tvec1 + ( + tvec1 const & v + ) : + x(v.x) + {} + + ////////////////////////////////////// + // Explicit basic constructors + + template + GLM_FUNC_QUALIFIER tvec1::tvec1 + ( + value_type const & s + ) : + x(s) + {} + + ////////////////////////////////////// + // Swizzle constructors + + template + GLM_FUNC_QUALIFIER tvec1::tvec1 + ( + tref1 const & r + ) : + x(r.x) + {} + + ////////////////////////////////////// + // Convertion scalar constructors + + template + template + GLM_FUNC_QUALIFIER tvec1::tvec1 + ( + U const & s + ) : + x(value_type(s)) + {} + + ////////////////////////////////////// + // Convertion vector constructors + + template + template + GLM_FUNC_QUALIFIER tvec1::tvec1 + ( + tvec2 const & v + ) : + x(value_type(v.x)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec1::tvec1 + ( + tvec3 const & v + ) : + x(value_type(v.x)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec1::tvec1 + ( + tvec4 const & v + ) : + x(value_type(v.x)) + {} + + ////////////////////////////////////// + // Unary arithmetic operators + + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator= + ( + tvec1 const & v + ) + { + this->x = v.x; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator= + ( + tvec1 const & v + ) + { + this->x = T(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator+= + ( + U const & s + ) + { + this->x += T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator+= + ( + tvec1 const & v + ) + { + this->x += T(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator-= + ( + U const & s + ) + { + this->x -= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator-= + ( + tvec1 const & v + ) + { + this->x -= T(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator*= + ( + U const & s + ) + { + this->x *= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator*= + ( + tvec1 const & v + ) + { + this->x *= T(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator/= + ( + U const & s + ) + { + this->x /= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator/= + ( + tvec1 const & v + ) + { + this->x /= T(v.x); + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator++() + { + ++this->x; + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator--() + { + --this->x; + return *this; + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return (v1.x == v2.x); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return (v1.x != v2.x); + } + + ////////////////////////////////////// + // Unary bit operators + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator%= + ( + U const & s + ) + { + this->x %= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator%= + ( + tvec1 const & v + ) + { + this->x %= T(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator&= + ( + U const & s + ) + { + this->x &= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator&= + ( + tvec1 const & v + ) + { + this->x &= T(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator|= + ( + U const & s + ) + { + this->x |= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator|= + ( + tvec1 const & v + ) + { + this->x |= U(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator^= + ( + U const & s + ) + { + this->x ^= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator^= + ( + tvec1 const & v + ) + { + this->x ^= T(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator<<= + ( + U const & s + ) + { + this->x <<= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator<<= + ( + tvec1 const & v + ) + { + this->x <<= T(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator>>= + ( + U const & s + ) + { + this->x >>= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator>>= + ( + tvec1 const & v + ) + { + this->x >>= T(v.x); + return *this; + } + + ////////////////////////////////////// + // Swizzle operators + + template + GLM_FUNC_QUALIFIER T + tvec1::swizzle(comp x) const + { + return (*this)[x]; + } + + template + GLM_FUNC_QUALIFIER tvec2 + tvec1::swizzle + ( + comp x, + comp y + ) const + { + return tvec2( + (*this)[x], + (*this)[y]); + } + + template + GLM_FUNC_QUALIFIER tvec3 + tvec1::swizzle + ( + comp x, + comp y, + comp z + ) const + { + return tvec3( + (*this)[x], + (*this)[y], + (*this)[z]); + } + + template + GLM_FUNC_QUALIFIER tvec4 + tvec1::swizzle + ( + comp x, + comp y, + comp z, + comp w + ) const + { + return tvec4( + (*this)[x], + (*this)[y], + (*this)[z], + (*this)[w]); + } + + template + GLM_FUNC_QUALIFIER tref1 + tvec1::swizzle + ( + comp x + ) + { + return tref1( + (*this)[x]); + } + + ////////////////////////////////////// + // Binary arithmetic operators + + template + GLM_FUNC_QUALIFIER tvec1 operator+ + ( + tvec1 const & v, + typename tvec1::value_type const & s + ) + { + return tvec1( + v.x + s); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator+ + ( + typename tvec1::value_type const & s, + tvec1 const & v + ) + { + return tvec1( + s + v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator+ + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return tvec1( + v1.x + v2.x); + } + + //operator- + template + GLM_FUNC_QUALIFIER tvec1 operator- + ( + tvec1 const & v, + typename tvec1::value_type const & s + ) + { + return tvec1( + v.x - s); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator- + ( + typename tvec1::value_type const & s, + tvec1 const & v + ) + { + return tvec1( + s - v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator- + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return tvec1( + v1.x - v2.x); + } + + //operator* + template + GLM_FUNC_QUALIFIER tvec1 operator* + ( + tvec1 const & v, + typename tvec1::value_type const & s + ) + { + return tvec1( + v.x * s); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator* + ( + typename tvec1::value_type const & s, + tvec1 const & v + ) + { + return tvec1( + s * v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator* + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return tvec1( + v1.x * v2.x); + } + + //operator/ + template + GLM_FUNC_QUALIFIER tvec1 operator/ + ( + tvec1 const & v, + typename tvec1::value_type const & s + ) + { + return tvec1( + v.x / s); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator/ + ( + typename tvec1::value_type const & s, + tvec1 const & v + ) + { + return tvec1( + s / v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator/ + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return tvec1( + v1.x / v2.x); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tvec1 operator- + ( + tvec1 const & v + ) + { + return tvec1( + -v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator++ + ( + tvec1 const & v, + int + ) + { + return tvec1( + v.x + T(1)); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator-- + ( + tvec1 const & v, + int + ) + { + return tvec1( + v.x - T(1)); + } + + ////////////////////////////////////// + // Binary bit operators + + template + GLM_FUNC_QUALIFIER tvec1 operator% + ( + tvec1 const & v, + typename tvec1::value_type const & s + ) + { + return tvec1( + v.x % s); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator% + ( + typename tvec1::value_type const & s, + tvec1 const & v + ) + { + return tvec1( + s % v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator% + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return tvec1( + v1.x % v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator& + ( + tvec1 const & v, + typename tvec1::value_type const & s + ) + { + return tvec1( + v.x & s); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator& + ( + typename tvec1::value_type const & s, + tvec1 const & v + ) + { + return tvec1( + s & v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator& + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return tvec1( + v1.x & v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator| + ( + tvec1 const & v, + typename tvec1::value_type const & s + ) + { + return tvec1( + v.x | s); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator| + ( + typename tvec1::value_type const & s, + tvec1 const & v + ) + { + return tvec1( + s | v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator| + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return tvec1( + v1.x | v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator^ + ( + tvec1 const & v, + typename tvec1::value_type const & s + ) + { + return tvec1( + v.x ^ s); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator^ + ( + typename tvec1::value_type const & s, + tvec1 const & v + ) + { + return tvec1( + s ^ v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator^ + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return tvec1( + v1.x ^ v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator<< + ( + tvec1 const & v, + typename tvec1::value_type const & s + ) + { + return tvec1( + v.x << s); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator<< + ( + typename tvec1::value_type const & s, + tvec1 const & v + ) + { + return tvec1( + s << v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator<< + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return tvec1( + v1.x << v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator>> + ( + tvec1 const & v, + typename tvec1::value_type const & s + ) + { + return tvec1( + v.x >> s); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator>> + ( + typename tvec1::value_type const & s, + tvec1 const & v + ) + { + return tvec1( + s >> v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator>> + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return tvec1( + v1.x >> v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator~ + ( + tvec1 const & v + ) + { + return tvec1( + ~v.x); + } + + ////////////////////////////////////// + // tref definition + + template + GLM_FUNC_QUALIFIER tref1::tref1 + ( + T & x + ) : + x(x) + {} + + template + GLM_FUNC_QUALIFIER tref1::tref1 + ( + tref1 const & r + ) : + x(r.x) + {} + + template + GLM_FUNC_QUALIFIER tref1::tref1 + ( + tvec1 const & v + ) : + x(v.x) + {} + + template + GLM_FUNC_QUALIFIER tref1 & tref1::operator= + ( + tref1 const & r + ) + { + x = r.x; + return *this; + } + + template + GLM_FUNC_QUALIFIER tref1 & tref1::operator= + ( + tvec1 const & v + ) + { + x = v.x; + return *this; + } + +}//namespace detail +}//namespace glm diff --git a/include/gal/opengl/glm/core/type_vec2.hpp b/include/gal/opengl/glm/core/type_vec2.hpp new file mode 100644 index 0000000000..8aa1bca5e3 --- /dev/null +++ b/include/gal/opengl/glm/core/type_vec2.hpp @@ -0,0 +1,317 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_vec2.hpp +/// @date 2008-08-18 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_gentype2 +#define glm_core_type_gentype2 + +#include "type_vec.hpp" +#include "type_float.hpp" +#include "type_int.hpp" +#include "type_size.hpp" +#include "_swizzle.hpp" + +namespace glm{ +namespace detail +{ + template struct tref2; + template struct tref3; + template struct tref4; + template struct tvec3; + template struct tvec4; + + template + struct tvec2 + { + enum ctor{null}; + + typedef T value_type; + typedef std::size_t size_type; + typedef tvec2 type; + typedef tvec2 bool_type; + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + ////////////////////////////////////// + // Data + +# if(GLM_COMPONENT == GLM_COMPONENT_CXX11) + union + { +# if(defined(GLM_SWIZZLE)) + _GLM_SWIZZLE2_2_MEMBERS(value_type, glm::detail::tvec2, x, y) + _GLM_SWIZZLE2_2_MEMBERS(value_type, glm::detail::tvec2, r, g) + _GLM_SWIZZLE2_2_MEMBERS(value_type, glm::detail::tvec2, s, t) + _GLM_SWIZZLE2_3_MEMBERS(value_type, glm::detail::tvec3, x, y) + _GLM_SWIZZLE2_3_MEMBERS(value_type, glm::detail::tvec3, r, g) + _GLM_SWIZZLE2_3_MEMBERS(value_type, glm::detail::tvec3, s, t) + _GLM_SWIZZLE2_4_MEMBERS(value_type, glm::detail::tvec4, x, y) + _GLM_SWIZZLE2_4_MEMBERS(value_type, glm::detail::tvec4, r, g) + _GLM_SWIZZLE2_4_MEMBERS(value_type, glm::detail::tvec4, s, t) +# endif//(defined(GLM_SWIZZLE)) + + struct{value_type r, g;}; + struct{value_type s, t;}; + struct{value_type x, y;}; + }; +# elif(GLM_COMPONENT == GLM_COMPONENT_CXX98) + union {value_type x, r, s;}; + union {value_type y, g, t;}; + +# if(defined(GLM_SWIZZLE)) + // Defines all he swizzle operator as functions + GLM_SWIZZLE_GEN_REF_FROM_VEC2(value_type, detail::tvec2, detail::tref2) + GLM_SWIZZLE_GEN_VEC_FROM_VEC2(value_type, detail::tvec2, detail::tvec2, detail::tvec3, detail::tvec4) +# endif//(defined(GLM_SWIZZLE)) +# else //(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW) + value_type x, y; + +# if(defined(GLM_SWIZZLE)) + // Defines all he swizzle operator as functions + GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(value_type, detail::tvec2, detail::tref2, x, y) + GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(value_type, detail::tvec2, detail::tvec2, detail::tvec3, detail::tvec4, x, y) +# endif//(defined(GLM_SWIZZLE)) +# endif//GLM_COMPONENT + + ////////////////////////////////////// + // Accesses + + GLM_FUNC_DECL value_type & operator[](size_type i); + GLM_FUNC_DECL value_type const & operator[](size_type i) const; + + ////////////////////////////////////// + // Implicit basic constructors + + GLM_FUNC_DECL tvec2(); + GLM_FUNC_DECL tvec2(tvec2 const & v); + + ////////////////////////////////////// + // Explicit basic constructors + + GLM_FUNC_DECL explicit tvec2( + ctor); + GLM_FUNC_DECL explicit tvec2( + value_type const & s); + GLM_FUNC_DECL explicit tvec2( + value_type const & s1, + value_type const & s2); + + ////////////////////////////////////// + // Swizzle constructors + + tvec2(tref2 const & r); + + template + GLM_FUNC_DECL tvec2(const glm::detail::swizzle<2,T,tvec2,E0,E1,-1,-2>& that) + { + *this = that(); + } + + ////////////////////////////////////// + // Convertion constructors + + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec2( + U const & x); + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec2( + U const & x, + V const & y); + + ////////////////////////////////////// + // Convertion vector constructors + + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec2(tvec2 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec2(tvec3 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec2(tvec4 const & v); + + ////////////////////////////////////// + // Unary arithmetic operators + + GLM_FUNC_DECL tvec2 & operator= (tvec2 const & v); + template + GLM_FUNC_DECL tvec2 & operator= (tvec2 const & v); + + template + GLM_FUNC_DECL tvec2 & operator+=(U const & s); + template + GLM_FUNC_DECL tvec2 & operator+=(tvec2 const & v); + template + GLM_FUNC_DECL tvec2 & operator-=(U const & s); + template + GLM_FUNC_DECL tvec2 & operator-=(tvec2 const & v); + template + GLM_FUNC_DECL tvec2 & operator*=(U const & s); + template + GLM_FUNC_DECL tvec2 & operator*=(tvec2 const & v); + template + GLM_FUNC_DECL tvec2 & operator/=(U const & s); + template + GLM_FUNC_DECL tvec2 & operator/=(tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator++(); + GLM_FUNC_DECL tvec2 & operator--(); + + ////////////////////////////////////// + // Unary bit operators + + template + GLM_FUNC_DECL tvec2 & operator%= (U const & s); + template + GLM_FUNC_DECL tvec2 & operator%= (tvec2 const & v); + template + GLM_FUNC_DECL tvec2 & operator&= (U const & s); + template + GLM_FUNC_DECL tvec2 & operator&= (tvec2 const & v); + template + GLM_FUNC_DECL tvec2 & operator|= (U const & s); + template + GLM_FUNC_DECL tvec2 & operator|= (tvec2 const & v); + template + GLM_FUNC_DECL tvec2 & operator^= (U const & s); + template + GLM_FUNC_DECL tvec2 & operator^= (tvec2 const & v); + template + GLM_FUNC_DECL tvec2 & operator<<=(U const & s); + template + GLM_FUNC_DECL tvec2 & operator<<=(tvec2 const & v); + template + GLM_FUNC_DECL tvec2 & operator>>=(U const & s); + template + GLM_FUNC_DECL tvec2 & operator>>=(tvec2 const & v); + + ////////////////////////////////////// + // Swizzle operators + + GLM_FUNC_DECL value_type swizzle(comp X) const; + GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; + GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; + GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + GLM_FUNC_DECL tref2 swizzle(comp X, comp Y); + }; + + template + struct tref2 + { + GLM_FUNC_DECL tref2(T & x, T & y); + GLM_FUNC_DECL tref2(tref2 const & r); + GLM_FUNC_DECL explicit tref2(tvec2 const & v); + + GLM_FUNC_DECL tref2 & operator= (tref2 const & r); + GLM_FUNC_DECL tref2 & operator= (tvec2 const & v); + + GLM_FUNC_DECL tvec2 operator() (); + + T & x; + T & y; + }; + + GLM_DETAIL_IS_VECTOR(tvec2); + +} //namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 2 components vector of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 highp_vec2; + + /// 2 components vector of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 mediump_vec2; + + /// 2 components vector of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 lowp_vec2; + + /// 2 components vector of high precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 highp_ivec2; + + /// 2 components vector of medium precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 mediump_ivec2; + + /// 2 components vector of low precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 lowp_ivec2; + + /// 2 components vector of high precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 highp_uvec2; + + /// 2 components vector of medium precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 mediump_uvec2; + + /// 2 components vector of low precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 lowp_uvec2; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_vec2.inl" +#endif//GLM_EXTERNAL_TEMPLATE + +#endif//glm_core_type_gentype2 diff --git a/include/gal/opengl/glm/core/type_vec2.inl b/include/gal/opengl/glm/core/type_vec2.inl new file mode 100644 index 0000000000..acb386df6b --- /dev/null +++ b/include/gal/opengl/glm/core/type_vec2.inl @@ -0,0 +1,1028 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_tvec2.inl +/// @date 2008-08-18 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec2::size_type tvec2::length() const + { + return 2; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tvec2::value_type & + tvec2::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return (&x)[i]; + } + + template + GLM_FUNC_QUALIFIER typename tvec2::value_type const & + tvec2::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return (&x)[i]; + } + + ////////////////////////////////////// + // Implicit basic constructors + + template + GLM_FUNC_QUALIFIER tvec2::tvec2() : + x(value_type(0)), + y(value_type(0)) + {} + + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + tvec2 const & v + ) : + x(v.x), + y(v.y) + {} + + ////////////////////////////////////// + // Explicit basic constructors + + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + value_type const & s + ) : + x(s), + y(s) + {} + + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + value_type const & s1, + value_type const & s2 + ) : + x(s1), + y(s2) + {} + + ////////////////////////////////////// + // Swizzle constructors + + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + tref2 const & r + ) : + x(r.x), + y(r.y) + {} + + ////////////////////////////////////// + // Convertion scalar constructors + + template + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + U const & x + ) : + x(value_type(x)), + y(value_type(x)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + U const & a, + V const & b + ) : + x(value_type(a)), + y(value_type(b)) + {} + + ////////////////////////////////////// + // Convertion vector constructors + + template + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + tvec2 const & v + ) : + x(value_type(v.x)), + y(value_type(v.y)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + tvec3 const & v + ) : + x(value_type(v.x)), + y(value_type(v.y)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + tvec4 const & v + ) : + x(value_type(v.x)), + y(value_type(v.y)) + {} + + ////////////////////////////////////// + // Unary arithmetic operators + + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator= + ( + tvec2 const & v + ) + { + this->x = v.x; + this->y = v.y; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator= + ( + tvec2 const & v + ) + { + this->x = T(v.x); + this->y = T(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator+= + ( + U const & s + ) + { + this->x += T(s); + this->y += T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator+= + ( + tvec2 const & v + ) + { + this->x += T(v.x); + this->y += T(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator-= + ( + U const & s + ) + { + this->x -= T(s); + this->y -= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator-= + ( + tvec2 const & v + ) + { + this->x -= T(v.x); + this->y -= T(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator*= + ( + U const & s + ) + { + this->x *= T(s); + this->y *= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator*= + ( + tvec2 const & v + ) + { + this->x *= T(v.x); + this->y *= T(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator/= + ( + U const & s + ) + { + this->x /= T(s); + this->y /= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator/= + ( + tvec2 const & v + ) + { + this->x /= T(v.x); + this->y /= T(v.y); + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator++() + { + ++this->x; + ++this->y; + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator--() + { + --this->x; + --this->y; + return *this; + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return (v1.x == v2.x) && (v1.y == v2.y); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return (v1.x != v2.x) || (v1.y != v2.y); + } + + ////////////////////////////////////// + // Unary bit operators + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator%= + ( + U const & s + ) + { + this->x %= T(s); + this->y %= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator%= + ( + tvec2 const & v + ) + { + this->x %= T(v.x); + this->y %= T(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator&= + ( + U const & s + ) + { + this->x &= T(s); + this->y &= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator&= + ( + tvec2 const & v + ) + { + this->x &= T(v.x); + this->y &= T(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator|= + ( + U const & s + ) + { + this->x |= T(s); + this->y |= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator|= + ( + tvec2 const & v + ) + { + this->x |= T(v.x); + this->y |= T(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator^= + ( + U const & s + ) + { + this->x ^= T(s); + this->y ^= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator^= + ( + tvec2 const & v + ) + { + this->x ^= T(v.x); + this->y ^= T(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator<<= + ( + U const & s + ) + { + this->x <<= T(s); + this->y <<= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator<<= + ( + tvec2 const & v + ) + { + this->x <<= T(v.x); + this->y <<= T(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator>>= + ( + U const & s + ) + { + this->x >>= T(s); + this->y >>= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator>>= + ( + tvec2 const & v + ) + { + this->x >>= T(v.x); + this->y >>= T(v.y); + return *this; + } + + ////////////////////////////////////// + // Swizzle operators + + template + GLM_FUNC_QUALIFIER typename tvec2::value_type tvec2::swizzle + ( + comp x + ) const + { + return (*this)[x]; + } + + template + GLM_FUNC_QUALIFIER tvec2 tvec2::swizzle + ( + comp x, + comp y + ) const + { + return tvec2( + (*this)[x], + (*this)[y]); + } + + template + GLM_FUNC_QUALIFIER tvec3 tvec2::swizzle + ( + comp x, + comp y, + comp z + ) const + { + return tvec3( + (*this)[x], + (*this)[y], + (*this)[z]); + } + + template + GLM_FUNC_QUALIFIER tvec4 tvec2::swizzle + ( + comp x, + comp y, + comp z, + comp w + ) const + { + return tvec4( + (*this)[x], + (*this)[y], + (*this)[z], + (*this)[w]); + } + + template + GLM_FUNC_QUALIFIER tref2 tvec2::swizzle + ( + comp x, + comp y + ) + { + return tref2( + (*this)[x], + (*this)[y]); + } + + ////////////////////////////////////// + // Binary arithmetic operators + + template + GLM_FUNC_QUALIFIER tvec2 operator+ + ( + tvec2 const & v, + T const & s + ) + { + return tvec2( + v.x + T(s), + v.y + T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator+ + ( + T const & s, + tvec2 const & v + ) + { + return tvec2( + T(s) + v.x, + T(s) + v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator+ + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return tvec2( + v1.x + T(v2.x), + v1.y + T(v2.y)); + } + + //operator- + template + GLM_FUNC_QUALIFIER tvec2 operator- + ( + tvec2 const & v, + T const & s + ) + { + return tvec2( + v.x - T(s), + v.y - T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator- + ( + T const & s, + tvec2 const & v + ) + { + return tvec2( + T(s) - v.x, + T(s) - v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator- + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return tvec2( + v1.x - T(v2.x), + v1.y - T(v2.y)); + } + + //operator* + template + GLM_FUNC_QUALIFIER tvec2 operator* + ( + tvec2 const & v, + T const & s + ) + { + return tvec2( + v.x * T(s), + v.y * T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator* + ( + T const & s, + tvec2 const & v + ) + { + return tvec2( + T(s) * v.x, + T(s) * v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator* + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return tvec2( + v1.x * T(v2.x), + v1.y * T(v2.y)); + } + + //operator/ + template + GLM_FUNC_QUALIFIER tvec2 operator/ + ( + tvec2 const & v, + T const & s + ) + { + return tvec2( + v.x / T(s), + v.y / T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator/ + ( + T const & s, + tvec2 const & v + ) + { + return tvec2( + T(s) / v.x, + T(s) / v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator/ + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return tvec2( + v1.x / T(v2.x), + v1.y / T(v2.y)); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tvec2 operator- + ( + tvec2 const & v + ) + { + return tvec2( + -v.x, + -v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator++ + ( + tvec2 const & v, + int + ) + { + return tvec2( + v.x + T(1), + v.y + T(1)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator-- + ( + tvec2 const & v, + int + ) + { + return tvec2( + v.x - T(1), + v.y - T(1)); + } + + ////////////////////////////////////// + // Binary bit operators + + template + GLM_FUNC_QUALIFIER tvec2 operator% + ( + tvec2 const & v, + T const & s + ) + { + return tvec2( + v.x % T(s), + v.y % T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator% + ( + T const & s, + tvec2 const & v + ) + { + return tvec2( + T(s) % v.x, + T(s) % v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator% + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return tvec2( + v1.x % T(v2.x), + v1.y % T(v2.y)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator& + ( + tvec2 const & v, + T const & s + ) + { + return tvec2( + v.x & T(s), + v.y & T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator& + ( + T const & s, + tvec2 const & v + ) + { + return tvec2( + T(s) & v.x, + T(s) & v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator& + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return tvec2( + v1.x & T(v2.x), + v1.y & T(v2.y)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator| + ( + tvec2 const & v, + T const & s + ) + { + return tvec2( + v.x | T(s), + v.y | T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator| + ( + T const & s, + tvec2 const & v + ) + { + return tvec2( + T(s) | v.x, + T(s) | v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator| + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return tvec2( + v1.x | T(v2.x), + v1.y | T(v2.y)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator^ + ( + tvec2 const & v, + T const & s + ) + { + return tvec2( + v.x ^ T(s), + v.y ^ T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator^ + ( + T const & s, + tvec2 const & v + ) + { + return tvec2( + T(s) ^ v.x, + T(s) ^ v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator^ + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return tvec2( + v1.x ^ T(v2.x), + v1.y ^ T(v2.y)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator<< + ( + tvec2 const & v, + T const & s + ) + { + return tvec2( + v.x << T(s), + v.y << T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator<< + ( + T const & s, + tvec2 const & v + ) + { + return tvec2( + s << T(v.x), + s << T(v.y)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator<< + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return tvec2( + v1.x << T(v2.x), + v1.y << T(v2.y)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator>> + ( + tvec2 const & v, + T const & s + ) + { + return tvec2( + v.x >> T(s), + v.y >> T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator>> + ( + T const & s, + tvec2 const & v + ) + { + return tvec2( + T(s) >> v.x, + T(s) >> v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator>> + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return tvec2( + v1.x >> T(v2.x), + v1.y >> T(v2.y)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator~ + ( + tvec2 const & v + ) + { + return tvec2( + ~v.x, + ~v.y); + } + + ////////////////////////////////////// + // tref definition + + template + tref2::tref2 + ( + T & x, + T & y + ) : + x(x), + y(y) + {} + + template + tref2::tref2 + ( + tref2 const & r + ) : + x(r.x), + y(r.y) + {} + + template + tref2::tref2 + ( + tvec2 const & v + ) : + x(v.x), + y(v.y) + {} + + template + tref2& tref2::operator= + ( + tref2 const & r + ) + { + x = r.x; + y = r.y; + return *this; + } + + template + tref2& tref2::operator= + ( + tvec2 const & v + ) + { + x = v.x; + y = v.y; + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec2 tref2::operator() () + { + return tvec2(this->x, this->y); + } +}//namespace detail +}//namespace glm diff --git a/include/gal/opengl/glm/core/type_vec3.hpp b/include/gal/opengl/glm/core/type_vec3.hpp new file mode 100644 index 0000000000..929145666b --- /dev/null +++ b/include/gal/opengl/glm/core/type_vec3.hpp @@ -0,0 +1,342 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_vec3.hpp +/// @date 2008-08-22 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_gentype3 +#define glm_core_type_gentype3 + +#include "type_vec.hpp" +#include "type_float.hpp" +#include "type_int.hpp" +#include "type_size.hpp" +#include "_swizzle.hpp" + +namespace glm{ +namespace detail +{ + template struct tref2; + template struct tref3; + template struct tref4; + template struct tvec2; + template struct tvec4; + + template + struct tvec3 + { + enum ctor{null}; + + typedef T value_type; + typedef std::size_t size_type; + typedef tvec3 type; + typedef tvec3 bool_type; + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + ////////////////////////////////////// + // Data + +# if(GLM_COMPONENT == GLM_COMPONENT_CXX11) + union + { +# if(defined(GLM_SWIZZLE)) + _GLM_SWIZZLE3_2_MEMBERS(value_type, glm::detail::tvec2, x, y, z) + _GLM_SWIZZLE3_2_MEMBERS(value_type, glm::detail::tvec2, r, g, b) + _GLM_SWIZZLE3_2_MEMBERS(value_type, glm::detail::tvec2, s, t, p) + _GLM_SWIZZLE3_3_MEMBERS(value_type, glm::detail::tvec3, x, y, z) + _GLM_SWIZZLE3_3_MEMBERS(value_type, glm::detail::tvec3, r, g, b) + _GLM_SWIZZLE3_3_MEMBERS(value_type, glm::detail::tvec3, s, t, p) + _GLM_SWIZZLE3_4_MEMBERS(value_type, glm::detail::tvec4, x, y, z) + _GLM_SWIZZLE3_4_MEMBERS(value_type, glm::detail::tvec4, r, g, b) + _GLM_SWIZZLE3_4_MEMBERS(value_type, glm::detail::tvec4, s, t, p) +# endif//(defined(GLM_SWIZZLE)) + + struct{value_type r, g, b;}; + struct{value_type s, t, p;}; + struct{value_type x, y, z;}; + }; +# elif(GLM_COMPONENT == GLM_COMPONENT_CXX98) + union {value_type x, r, s;}; + union {value_type y, g, t;}; + union {value_type z, b, p;}; + +# if(defined(GLM_SWIZZLE)) + // Defines all he swizzle operator as functions + GLM_SWIZZLE_GEN_REF_FROM_VEC3(T, detail::tvec3, detail::tref2, detail::tref3) + GLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, detail::tvec3, detail::tvec2, detail::tvec3, detail::tvec4) +# endif//(defined(GLM_SWIZZLE)) +# else //(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW) + value_type x, y, z; + +# if(defined(GLM_SWIZZLE)) + // Defines all he swizzle operator as functions + GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(T, detail::tvec3, detail::tref2, detail::tref3, x, y, z) + GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(T, detail::tvec3, detail::tvec2, detail::tvec3, detail::tvec4, x, y, z) +# endif//(defined(GLM_SWIZZLE)) +# endif//GLM_COMPONENT + + ////////////////////////////////////// + // Accesses + + GLM_FUNC_DECL value_type & operator[](size_type i); + GLM_FUNC_DECL value_type const & operator[](size_type i) const; + + ////////////////////////////////////// + // Implicit basic constructors + + GLM_FUNC_DECL tvec3(); + GLM_FUNC_DECL tvec3(tvec3 const & v); + + ////////////////////////////////////// + // Explicit basic constructors + + GLM_FUNC_DECL explicit tvec3( + ctor); + GLM_FUNC_DECL explicit tvec3( + value_type const & s); + GLM_FUNC_DECL explicit tvec3( + value_type const & s1, + value_type const & s2, + value_type const & s3); + + ////////////////////////////////////// + // Convertion scalar constructors + + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec3( + U const & x); + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec3( + U const & x, + V const & y, + W const & z); + + ////////////////////////////////////// + // Convertion vector constructors + + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec3(tvec2 const & v, B const & s); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec3(A const & s, tvec2 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec3(tvec3 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec3(tvec4 const & v); + + ////////////////////////////////////// + // Swizzle constructors + + GLM_FUNC_DECL tvec3(tref3 const & r); + + template + GLM_FUNC_DECL explicit tvec3(tref2 const & v, B const & s); + + template + GLM_FUNC_DECL explicit tvec3(A const & s, tref2 const & v); + + template + GLM_FUNC_DECL tvec3(glm::detail::swizzle<3, T, tvec3, E0, E1, E2, -1> const & that) + { + *this = that(); + } + + template + GLM_FUNC_DECL tvec3(glm::detail::swizzle<2, T, tvec2, E0, E1, -1, -2> const & v, T const & s) + { + *this = tvec3(v(), s); + } + + template + GLM_FUNC_DECL tvec3(T const & s, glm::detail::swizzle<2, T, tvec2, E0, E1, -1, -2> const & v) + { + *this = tvec3(s, v()); + } + + ////////////////////////////////////// + // Unary arithmetic operators + + GLM_FUNC_DECL tvec3 & operator= (tvec3 const & v); + template + GLM_FUNC_DECL tvec3 & operator= (tvec3 const & v); + + template + GLM_FUNC_DECL tvec3 & operator+=(U const & s); + template + GLM_FUNC_DECL tvec3 & operator+=(tvec3 const & v); + template + GLM_FUNC_DECL tvec3 & operator-=(U const & s); + template + GLM_FUNC_DECL tvec3 & operator-=(tvec3 const & v); + template + GLM_FUNC_DECL tvec3 & operator*=(U const & s); + template + GLM_FUNC_DECL tvec3 & operator*=(tvec3 const & v); + template + GLM_FUNC_DECL tvec3 & operator/=(U const & s); + template + GLM_FUNC_DECL tvec3 & operator/=(tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator++(); + GLM_FUNC_DECL tvec3 & operator--(); + + ////////////////////////////////////// + // Unary bit operators + + template + GLM_FUNC_DECL tvec3 & operator%= (U const & s); + template + GLM_FUNC_DECL tvec3 & operator%= (tvec3 const & v); + template + GLM_FUNC_DECL tvec3 & operator&= (U const & s); + template + GLM_FUNC_DECL tvec3 & operator&= (tvec3 const & v); + template + GLM_FUNC_DECL tvec3 & operator|= (U const & s); + template + GLM_FUNC_DECL tvec3 & operator|= (tvec3 const & v); + template + GLM_FUNC_DECL tvec3 & operator^= (U const & s); + template + GLM_FUNC_DECL tvec3 & operator^= (tvec3 const & v); + template + GLM_FUNC_DECL tvec3 & operator<<=(U const & s); + template + GLM_FUNC_DECL tvec3 & operator<<=(tvec3 const & v); + template + GLM_FUNC_DECL tvec3 & operator>>=(U const & s); + template + GLM_FUNC_DECL tvec3 & operator>>=(tvec3 const & v); + + ////////////////////////////////////// + // Swizzle operators + + GLM_FUNC_DECL value_type swizzle(comp X) const; + GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; + GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; + GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + GLM_FUNC_DECL tref2 swizzle(comp X, comp Y); + GLM_FUNC_DECL tref3 swizzle(comp X, comp Y, comp Z); + }; + + template + struct tref3 + { + GLM_FUNC_DECL tref3(T & x, T & y, T & z); + GLM_FUNC_DECL tref3(tref3 const & r); + GLM_FUNC_DECL explicit tref3(tvec3 const & v); + + GLM_FUNC_DECL tref3 & operator= (tref3 const & r); + GLM_FUNC_DECL tref3 & operator= (tvec3 const & v); + + GLM_FUNC_DECL tvec3 operator() (); + + T & x; + T & y; + T & z; + }; + + GLM_DETAIL_IS_VECTOR(tvec3); +} //namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 3 components vector of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 highp_vec3; + + /// 3 components vector of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 mediump_vec3; + + /// 3 components vector of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 lowp_vec3; + + /// 3 components vector of high precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 highp_ivec3; + + /// 3 components vector of medium precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 mediump_ivec3; + + /// 3 components vector of low precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 lowp_ivec3; + + /// 3 components vector of high precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 highp_uvec3; + + /// 3 components vector of medium precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 mediump_uvec3; + + /// 3 components vector of low precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 lowp_uvec3; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_vec3.inl" +#endif//GLM_EXTERNAL_TEMPLATE + +#endif//glm_core_type_gentype3 diff --git a/include/gal/opengl/glm/core/type_vec3.inl b/include/gal/opengl/glm/core/type_vec3.inl new file mode 100644 index 0000000000..3a1dd9433f --- /dev/null +++ b/include/gal/opengl/glm/core/type_vec3.inl @@ -0,0 +1,1152 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_tvec3.inl +/// @date 2008-08-22 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec3::size_type tvec3::length() const + { + return 3; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tvec3::value_type & + tvec3::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return (&x)[i]; + } + + template + GLM_FUNC_QUALIFIER typename tvec3::value_type const & + tvec3::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return (&x)[i]; + } + + ////////////////////////////////////// + // Implicit basic constructors + + template + GLM_FUNC_QUALIFIER tvec3::tvec3() : + x(value_type(0)), + y(value_type(0)), + z(value_type(0)) + {} + + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + tvec3 const & v + ) : + x(v.x), + y(v.y), + z(v.z) + {} + + ////////////////////////////////////// + // Explicit basic constructors + + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + value_type const & s + ) : + x(s), + y(s), + z(s) + {} + + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + value_type const & s0, + value_type const & s1, + value_type const & s2 + ) : + x(s0), + y(s1), + z(s2) + {} + + ////////////////////////////////////// + // Swizzle constructors + + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + tref3 const & r + ) : + x(r.x), + y(r.y), + z(r.z) + {} + + template + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + tref2 const & v, + B const & s + ) : + x(value_type(v.x)), + y(value_type(v.y)), + z(value_type(s)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + A const & s, + tref2 const & v + ) : + x(value_type(s)), + y(value_type(v.x)), + z(value_type(v.y)) + {} + + ////////////////////////////////////// + // Convertion scalar constructors + + template + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + U const & s + ) : + x(value_type(s)), + y(value_type(s)), + z(value_type(s)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + A const & x, + B const & y, + C const & z + ) : + x(value_type(x)), + y(value_type(y)), + z(value_type(z)) + {} + + ////////////////////////////////////// + // Convertion vector constructors + + template + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + tvec2 const & v, + B const & s + ) : + x(value_type(v.x)), + y(value_type(v.y)), + z(value_type(s)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + A const & s, + tvec2 const & v + ) : + x(value_type(s)), + y(value_type(v.x)), + z(value_type(v.y)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + tvec3 const & v + ) : + x(value_type(v.x)), + y(value_type(v.y)), + z(value_type(v.z)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + tvec4 const & v + ) : + x(value_type(v.x)), + y(value_type(v.y)), + z(value_type(v.z)) + {} + + ////////////////////////////////////// + // Unary arithmetic operators + + template + GLM_FUNC_QUALIFIER tvec3& tvec3::operator= + ( + tvec3 const & v + ) + { + this->x = v.x; + this->y = v.y; + this->z = v.z; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3& tvec3::operator= + ( + tvec3 const & v + ) + { + this->x = T(v.x); + this->y = T(v.y); + this->z = T(v.z); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator+= + ( + U const & s + ) + { + this->x += T(s); + this->y += T(s); + this->z += T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator+= + ( + tvec3 const & v + ) + { + this->x += T(v.x); + this->y += T(v.y); + this->z += T(v.z); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator-= + ( + U const & s + ) + { + this->x -= T(s); + this->y -= T(s); + this->z -= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator-= + ( + tvec3 const & v + ) + { + this->x -= T(v.x); + this->y -= T(v.y); + this->z -= T(v.z); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator*= + ( + U const & s + ) + { + this->x *= T(s); + this->y *= T(s); + this->z *= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator*= + ( + tvec3 const & v + ) + { + this->x *= T(v.x); + this->y *= T(v.y); + this->z *= T(v.z); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator/= + ( + U const & s + ) + { + this->x /= T(s); + this->y /= T(s); + this->z /= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator/= + ( + tvec3 const & v + ) + { + this->x /= T(v.x); + this->y /= T(v.y); + this->z /= T(v.z); + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator++() + { + ++this->x; + ++this->y; + ++this->z; + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator--() + { + --this->x; + --this->y; + --this->z; + return *this; + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return (v1.x == v2.x) && (v1.y == v2.y) && (v1.z == v2.z); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return (v1.x != v2.x) || (v1.y != v2.y) || (v1.z != v2.z); + } + + ////////////////////////////////////// + // Unary bit operators + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator%= + ( + U const & s + ) + { + this->x %= s; + this->y %= s; + this->z %= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator%= + ( + tvec3 const & v + ) + { + this->x %= v.x; + this->y %= v.y; + this->z %= v.z; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator&= + ( + U const & s + ) + { + this->x &= s; + this->y &= s; + this->z &= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator&= + ( + tvec3 const & v + ) + { + this->x &= v.x; + this->y &= v.y; + this->z &= v.z; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator|= + ( + U const & s + ) + { + this->x |= s; + this->y |= s; + this->z |= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator|= + ( + tvec3 const & v + ) + { + this->x |= v.x; + this->y |= v.y; + this->z |= v.z; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator^= + ( + U const & s + ) + { + this->x ^= s; + this->y ^= s; + this->z ^= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator^= + ( + tvec3 const & v + ) + { + this->x ^= v.x; + this->y ^= v.y; + this->z ^= v.z; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator<<= + ( + U const & s + ) + { + this->x <<= s; + this->y <<= s; + this->z <<= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator<<= + ( + tvec3 const & v + ) + { + this->x <<= T(v.x); + this->y <<= T(v.y); + this->z <<= T(v.z); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator>>= + ( + U const & s + ) + { + this->x >>= T(s); + this->y >>= T(s); + this->z >>= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator>>= + ( + tvec3 const & v + ) + { + this->x >>= T(v.x); + this->y >>= T(v.y); + this->z >>= T(v.z); + return *this; + } + + ////////////////////////////////////// + // Swizzle operators + + template + GLM_FUNC_QUALIFIER typename tvec3::value_type + tvec3::swizzle + ( + comp x + ) const + { + return (*this)[x]; + } + + template + GLM_FUNC_QUALIFIER tvec2 tvec3::swizzle + ( + comp x, + comp y + ) const + { + return tvec2( + (*this)[x], + (*this)[y]); + } + + template + GLM_FUNC_QUALIFIER tvec3 tvec3::swizzle + ( + comp x, + comp y, + comp z + ) const + { + return tvec3( + (*this)[x], + (*this)[y], + (*this)[z]); + } + + template + GLM_FUNC_QUALIFIER tvec4 tvec3::swizzle + ( + comp x, + comp y, + comp z, + comp w + ) const + { + return tvec4( + (*this)[x], + (*this)[y], + (*this)[z], + (*this)[w]); + } + + template + GLM_FUNC_QUALIFIER tref2 tvec3::swizzle + ( + comp x, + comp y + ) + { + return tref2( + (*this)[x], + (*this)[y]); + } + + template + GLM_FUNC_QUALIFIER tref3 tvec3::swizzle + ( + comp x, + comp y, + comp z + ) + { + return tref3( + (*this)[x], + (*this)[y], + (*this)[z]); + } + + ////////////////////////////////////// + // Binary arithmetic operators + + template + GLM_FUNC_QUALIFIER tvec3 operator+ + ( + tvec3 const & v, + T const & s + ) + { + return tvec3( + v.x + T(s), + v.y + T(s), + v.z + T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator+ + ( + T const & s, + tvec3 const & v + ) + { + return tvec3( + T(s) + v.x, + T(s) + v.y, + T(s) + v.z); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator+ + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return tvec3( + v1.x + T(v2.x), + v1.y + T(v2.y), + v1.z + T(v2.z)); + } + + //operator- + template + GLM_FUNC_QUALIFIER tvec3 operator- + ( + tvec3 const & v, + T const & s + ) + { + return tvec3( + v.x - T(s), + v.y - T(s), + v.z - T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator- + ( + T const & s, + tvec3 const & v + ) + { + return tvec3( + T(s) - v.x, + T(s) - v.y, + T(s) - v.z); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator- + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return tvec3( + v1.x - T(v2.x), + v1.y - T(v2.y), + v1.z - T(v2.z)); + } + + //operator* + template + GLM_FUNC_QUALIFIER tvec3 operator* + ( + tvec3 const & v, + T const & s + ) + { + return tvec3( + v.x * T(s), + v.y * T(s), + v.z * T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator* + ( + T const & s, + tvec3 const & v + ) + { + return tvec3( + T(s) * v.x, + T(s) * v.y, + T(s) * v.z); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator* + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return tvec3( + v1.x * T(v2.x), + v1.y * T(v2.y), + v1.z * T(v2.z)); + } + + //operator/ + template + GLM_FUNC_QUALIFIER tvec3 operator/ + ( + tvec3 const & v, + T const & s + ) + { + return tvec3( + v.x / T(s), + v.y / T(s), + v.z / T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator/ + ( + T const & s, + tvec3 const & v + ) + { + return tvec3( + T(s) / v.x, + T(s) / v.y, + T(s) / v.z); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator/ + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return tvec3( + v1.x / T(v2.x), + v1.y / T(v2.y), + v1.z / T(v2.z)); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tvec3 operator- + ( + tvec3 const & v + ) + { + return tvec3( + -v.x, + -v.y, + -v.z); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator++ + ( + tvec3 const & v, + int + ) + { + return tvec3( + v.x + T(1), + v.y + T(1), + v.z + T(1)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator-- + ( + tvec3 const & v, + int + ) + { + return tvec3( + v.x - T(1), + v.y - T(1), + v.z - T(1)); + } + + ////////////////////////////////////// + // Binary bit operators + + template + GLM_FUNC_QUALIFIER tvec3 operator% + ( + tvec3 const & v, + T const & s + ) + { + return tvec3( + v.x % T(s), + v.y % T(s), + v.z % T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator% + ( + T const & s, + tvec3 const & v + ) + { + return tvec3( + T(s) % v.x, + T(s) % v.y, + T(s) % v.z); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator% + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return tvec3( + v1.x % T(v2.x), + v1.y % T(v2.y), + v1.z % T(v2.z)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator& + ( + tvec3 const & v, + T const & s + ) + { + return tvec3( + v.x & T(s), + v.y & T(s), + v.z & T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator& + ( + T const & s, + tvec3 const & v + ) + { + return tvec3( + T(s) & v.x, + T(s) & v.y, + T(s) & v.z); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator& + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return tvec3( + v1.x & T(v2.x), + v1.y & T(v2.y), + v1.z & T(v2.z)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator| + ( + tvec3 const & v, + T const & s + ) + { + return tvec3( + v.x | T(s), + v.y | T(s), + v.z | T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator| + ( + T const & s, + tvec3 const & v + ) + { + return tvec3( + T(s) | v.x, + T(s) | v.y, + T(s) | v.z); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator| + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return tvec3( + v1.x | T(v2.x), + v1.y | T(v2.y), + v1.z | T(v2.z)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator^ + ( + tvec3 const & v, + T const & s + ) + { + return tvec3( + v.x ^ T(s), + v.y ^ T(s), + v.z ^ T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator^ + ( + T const & s, + tvec3 const & v + ) + { + return tvec3( + T(s) ^ v.x, + T(s) ^ v.y, + T(s) ^ v.z); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator^ + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return tvec3( + v1.x ^ T(v2.x), + v1.y ^ T(v2.y), + v1.z ^ T(v2.z)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator<< + ( + tvec3 const & v, + T const & s + ) + { + return tvec3( + v.x << T(s), + v.y << T(s), + v.z << T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator<< + ( + T const & s, + tvec3 const & v + ) + { + return tvec3( + T(s) << v.x, + T(s) << v.y, + T(s) << v.z); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator<< + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return tvec3( + v1.x << T(v2.x), + v1.y << T(v2.y), + v1.z << T(v2.z)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator>> + ( + tvec3 const & v, + T const & s + ) + { + return tvec3( + v.x >> T(s), + v.y >> T(s), + v.z >> T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator>> + ( + T const & s, + tvec3 const & v + ) + { + return tvec3( + s >> T(v.x), + s >> T(v.y), + s >> T(v.z)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator>> + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return tvec3( + v1.x >> T(v2.x), + v1.y >> T(v2.y), + v1.z >> T(v2.z)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator~ + ( + tvec3 const & v + ) + { + return tvec3( + ~v.x, + ~v.y, + ~v.z); + } + + ////////////////////////////////////// + // tref definition + + template + GLM_FUNC_QUALIFIER tref3::tref3(T & x, T & y, T & z) : + x(x), + y(y), + z(z) + {} + + template + GLM_FUNC_QUALIFIER tref3::tref3 + ( + tref3 const & r + ) : + x(r.x), + y(r.y), + z(r.z) + {} + + template + GLM_FUNC_QUALIFIER tref3::tref3 + ( + tvec3 const & v + ) : + x(v.x), + y(v.y), + z(v.z) + {} + + template + GLM_FUNC_QUALIFIER tref3 & tref3::operator= + ( + tref3 const & r + ) + { + x = r.x; + y = r.y; + z = r.z; + return *this; + } + + template + GLM_FUNC_QUALIFIER tref3 & tref3::operator= + ( + tvec3 const & v + ) + { + x = v.x; + y = v.y; + z = v.z; + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec3 tref3::operator() () + { + return tvec3(this->x, this->y, this->z); + } + +}//namespace detail +}//namespace glm diff --git a/include/gal/opengl/glm/core/type_vec4.hpp b/include/gal/opengl/glm/core/type_vec4.hpp new file mode 100644 index 0000000000..68c5cd34a0 --- /dev/null +++ b/include/gal/opengl/glm/core/type_vec4.hpp @@ -0,0 +1,399 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_vec4.hpp +/// @date 2008-08-22 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_gentype4 +#define glm_core_type_gentype4 + +#include "type_vec.hpp" +#include "type_float.hpp" +#include "type_int.hpp" +#include "type_size.hpp" +#include "_swizzle.hpp" + +namespace glm{ +namespace detail +{ + template struct tref2; + template struct tref3; + template struct tref4; + template struct tvec2; + template struct tvec3; + + template + struct tvec4 + { + enum ctor{null}; + + typedef T value_type; + typedef std::size_t size_type; + typedef tvec4 type; + typedef tvec4 bool_type; + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + ////////////////////////////////////// + // Data + +# if(GLM_COMPONENT == GLM_COMPONENT_CXX11) + union + { +# if(defined(GLM_SWIZZLE)) + _GLM_SWIZZLE4_2_MEMBERS(value_type, glm::detail::tvec2, x, y, z, w) + _GLM_SWIZZLE4_2_MEMBERS(value_type, glm::detail::tvec2, r, g, b, a) + _GLM_SWIZZLE4_2_MEMBERS(value_type, glm::detail::tvec2, s, t, p, q) + _GLM_SWIZZLE4_3_MEMBERS(value_type, glm::detail::tvec3, x, y, z, w) + _GLM_SWIZZLE4_3_MEMBERS(value_type, glm::detail::tvec3, r, g, b, a) + _GLM_SWIZZLE4_3_MEMBERS(value_type, glm::detail::tvec3, s, t, p, q) + _GLM_SWIZZLE4_4_MEMBERS(value_type, glm::detail::tvec4, x, y, z, w) + _GLM_SWIZZLE4_4_MEMBERS(value_type, glm::detail::tvec4, r, g, b, a) + _GLM_SWIZZLE4_4_MEMBERS(value_type, glm::detail::tvec4, s, t, p, q) +# endif//(defined(GLM_SWIZZLE)) + + struct{value_type r, g, b, a;}; + struct{value_type s, t, p, q;}; + struct{value_type x, y, z, w;}; + }; +# elif(GLM_COMPONENT == GLM_COMPONENT_CXX98) + union {value_type x, r, s;}; + union {value_type y, g, t;}; + union {value_type z, b, p;}; + union {value_type w, a, q;}; + +# if(defined(GLM_SWIZZLE)) + // Defines all he swizzle operator as functions + GLM_SWIZZLE_GEN_REF_FROM_VEC4(T, detail::tvec4, detail::tref2, detail::tref3, detail::tref4) + GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, detail::tvec4, detail::tvec2, detail::tvec3, detail::tvec4) +# endif//(defined(GLM_SWIZZLE)) +# else //(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW) + value_type x, y, z, w; + +# if(defined(GLM_SWIZZLE)) + // Defines all he swizzle operator as functions + GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(T, detail::tvec4, detail::tref2, detail::tref3, detail::tref4, x, y, z, w) + GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(T, detail::tvec4, detail::tvec2, detail::tvec3, detail::tvec4, x, y, z, w) +# endif//(defined(GLM_SWIZZLE)) +# endif//GLM_COMPONENT + + ////////////////////////////////////// + // Accesses + + GLM_FUNC_DECL value_type & operator[](size_type i); + GLM_FUNC_DECL value_type const & operator[](size_type i) const; + + ////////////////////////////////////// + // Implicit basic constructors + + GLM_FUNC_DECL tvec4(); + GLM_FUNC_DECL tvec4(type const & v); + + ////////////////////////////////////// + // Explicit basic constructors + + GLM_FUNC_DECL explicit tvec4( + ctor); + GLM_FUNC_DECL explicit tvec4( + value_type const & s); + GLM_FUNC_DECL explicit tvec4( + value_type const & s0, + value_type const & s1, + value_type const & s2, + value_type const & s3); + + ////////////////////////////////////// + // Convertion scalar constructors + + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4( + U const & x); + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4( + A const & x, + B const & y, + C const & z, + D const & w); + + ////////////////////////////////////// + // Convertion vector constructors + + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(tvec2 const & v, B const & s1, C const & s2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(A const & s1, tvec2 const & v, C const & s2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(A const & s1, B const & s2, tvec2 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(tvec3 const & v, B const & s); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(A const & s, tvec3 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(tvec2 const & v1, tvec2 const & v2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(tvec4 const & v); + + template + GLM_FUNC_DECL tvec4(glm::detail::swizzle<4, T, tvec4, E0, E1, E2, E3> const & that) + { + *this = that(); + } + + template + GLM_FUNC_DECL tvec4(glm::detail::swizzle<2, T, tvec2, E0, E1, -1, -2> const & v, glm::detail::swizzle<2, T, tvec2, F0, F1, -1, -2> const & u) + { + *this = tvec4(v(), u()); + } + + template + GLM_FUNC_DECL tvec4(T const & x, T const & y, glm::detail::swizzle<2, T, tvec2, E0, E1, -1, -2> const & v) + { + *this = tvec4(x, y, v()); + } + + template + GLM_FUNC_DECL tvec4(T const & x, glm::detail::swizzle<2, T, tvec2, E0, E1, -1, -2> const & v, T const & w) + { + *this = tvec4(x, v(), w); + } + + template + GLM_FUNC_DECL tvec4(glm::detail::swizzle<2, T, tvec2, E0, E1, -1, -2> const & v, T const & z, T const & w) + { + *this = tvec4(v(), z, w); + } + + template + GLM_FUNC_DECL tvec4(glm::detail::swizzle<3, T, tvec3, E0, E1, E2, -1> const & v, T const & w) + { + *this = tvec4(v(), w); + } + + template + GLM_FUNC_DECL tvec4(T const & x, glm::detail::swizzle<3, T, tvec3, E0, E1, E2, -1> const & v) + { + *this = tvec4(x, v()); + } + + ////////////////////////////////////// + // Swizzle constructors + + GLM_FUNC_DECL tvec4(tref4 const & r); + + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(tref2 const & v, B const & s1, C const & s2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(A const & s1, tref2 const & v, C const & s2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(A const & s1, B const & s2, tref2 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(tref3 const & v, B const & s); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(A const & s, tref3 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(tref2 const & v1, tref2 const & v2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(tvec2 const & v1, tref2 const & v2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(tref2 const & v1, tvec2 const & v2); + + ////////////////////////////////////// + // Unary arithmetic operators + + GLM_FUNC_DECL tvec4 & operator= (tvec4 const & v); + template + GLM_FUNC_DECL tvec4 & operator= (tvec4 const & v); + + template + GLM_FUNC_DECL tvec4 & operator+=(U const & s); + template + GLM_FUNC_DECL tvec4 & operator+=(tvec4 const & v); + template + GLM_FUNC_DECL tvec4 & operator-=(U const & s); + template + GLM_FUNC_DECL tvec4 & operator-=(tvec4 const & v); + template + GLM_FUNC_DECL tvec4 & operator*=(U const & s); + template + GLM_FUNC_DECL tvec4 & operator*=(tvec4 const & v); + template + GLM_FUNC_DECL tvec4 & operator/=(U const & s); + template + GLM_FUNC_DECL tvec4 & operator/=(tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator++(); + GLM_FUNC_DECL tvec4 & operator--(); + + ////////////////////////////////////// + // Unary bit operators + + template + GLM_FUNC_DECL tvec4 & operator%= (U const & s); + template + GLM_FUNC_DECL tvec4 & operator%= (tvec4 const & v); + template + GLM_FUNC_DECL tvec4 & operator&= (U const & s); + template + GLM_FUNC_DECL tvec4 & operator&= (tvec4 const & v); + template + GLM_FUNC_DECL tvec4 & operator|= (U const & s); + template + GLM_FUNC_DECL tvec4 & operator|= (tvec4 const & v); + template + GLM_FUNC_DECL tvec4 & operator^= (U const & s); + template + GLM_FUNC_DECL tvec4 & operator^= (tvec4 const & v); + template + GLM_FUNC_DECL tvec4 & operator<<=(U const & s); + template + GLM_FUNC_DECL tvec4 & operator<<=(tvec4 const & v); + template + GLM_FUNC_DECL tvec4 & operator>>=(U const & s); + template + GLM_FUNC_DECL tvec4 & operator>>=(tvec4 const & v); + + ////////////////////////////////////// + // Swizzle operators + + GLM_FUNC_DECL value_type swizzle(comp X) const; + GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; + GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; + GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + GLM_FUNC_DECL tref2 swizzle(comp X, comp Y); + GLM_FUNC_DECL tref3 swizzle(comp X, comp Y, comp Z); + GLM_FUNC_DECL tref4 swizzle(comp X, comp Y, comp Z, comp W); + }; + + template + struct tref4 + { + GLM_FUNC_DECL tref4(T & x, T & y, T & z, T & w); + GLM_FUNC_DECL tref4(tref4 const & r); + GLM_FUNC_DECL explicit tref4(tvec4 const & v); + + GLM_FUNC_DECL tref4 & operator= (tref4 const & r); + GLM_FUNC_DECL tref4 & operator= (tvec4 const & v); + + GLM_FUNC_DECL tvec4 operator() (); + + T & x; + T & y; + T & z; + T & w; + }; + + GLM_DETAIL_IS_VECTOR(tvec4); +}//namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 4 components vector of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 highp_vec4; + + /// 4 components vector of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 mediump_vec4; + + /// 4 components vector of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 lowp_vec4; + + /// 4 components vector of high precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 highp_ivec4; + + /// 4 components vector of medium precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 mediump_ivec4; + + /// 4 components vector of low precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 lowp_ivec4; + + /// 4 components vector of high precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 highp_uvec4; + + /// 4 components vector of medium precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 mediump_uvec4; + + /// 4 components vector of low precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 lowp_uvec4; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_vec4.inl" +#endif//GLM_EXTERNAL_TEMPLATE + +#endif//glm_core_type_gentype4 diff --git a/include/gal/opengl/glm/core/type_vec4.inl b/include/gal/opengl/glm/core/type_vec4.inl new file mode 100644 index 0000000000..07c7e89d6f --- /dev/null +++ b/include/gal/opengl/glm/core/type_vec4.inl @@ -0,0 +1,1378 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_tvec4.inl +/// @date 2008-08-23 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec4::size_type tvec4::length() const + { + return 4; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tvec4::value_type & + tvec4::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return (&x)[i]; + } + + template + GLM_FUNC_QUALIFIER typename tvec4::value_type const & + tvec4::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return (&x)[i]; + } + + ////////////////////////////////////// + // Implicit basic constructors + + template + GLM_FUNC_QUALIFIER tvec4::tvec4() : + x(value_type(0)), + y(value_type(0)), + z(value_type(0)), + w(value_type(0)) + {} + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + type const & v + ) : + x(v.x), + y(v.y), + z(v.z), + w(v.w) + {} + + ////////////////////////////////////// + // Explicit basic constructors + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + value_type const & s + ) : + x(s), + y(s), + z(s), + w(s) + {} + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + value_type const & s1, + value_type const & s2, + value_type const & s3, + value_type const & s4 + ) : + x(s1), + y(s2), + z(s3), + w(s4) + {} + + ////////////////////////////////////// + // Swizzle constructors + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tref4 const & r + ) : + x(r.x), + y(r.y), + z(r.z), + w(r.w) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tref2 const & v, + B const & s1, + C const & s2 + ) : + x(value_type(v.x)), + y(value_type(v.y)), + z(value_type(s1)), + w(value_type(s2)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + A const & s1, + tref2 const & v, + C const & s2 + ) : + x(value_type(s1)), + y(value_type(v.x)), + z(value_type(v.y)), + w(value_type(s2)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + A const & s1, + B const & s2, + tref2 const & v + ) : + x(value_type(s1)), + y(value_type(s2)), + z(value_type(v.x)), + w(value_type(v.y)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tref3 const & v, + B const & s + ) : + x(value_type(v.x)), + y(value_type(v.y)), + z(value_type(v.z)), + w(value_type(s)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + A const & s, + tref3 const & v + ) : + x(value_type(s)), + y(value_type(v.x)), + z(value_type(v.y)), + w(value_type(v.z)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tref2 const & v1, + tref2 const & v2 + ) : + x(value_type(v1.x)), + y(value_type(v1.y)), + z(value_type(v2.x)), + w(value_type(v2.y)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tvec2 const & v1, + tref2 const & v2 + ) : + x(value_type(v1.x)), + y(value_type(v1.y)), + z(value_type(v2.x)), + w(value_type(v2.y)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tref2 const & v1, + tvec2 const & v2 + ) : + x(value_type(v1.x)), + y(value_type(v1.y)), + z(value_type(v2.x)), + w(value_type(v2.y)) + {} + + ////////////////////////////////////// + // Convertion scalar constructors + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + U const & x + ) : + x(value_type(x)), + y(value_type(x)), + z(value_type(x)), + w(value_type(x)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + A const & x, + B const & y, + C const & z, + D const & w + ) : + x(value_type(x)), + y(value_type(y)), + z(value_type(z)), + w(value_type(w)) + {} + + ////////////////////////////////////// + // Convertion vector constructors + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tvec2 const & v, + B const & s1, + C const & s2 + ) : + x(value_type(v.x)), + y(value_type(v.y)), + z(value_type(s1)), + w(value_type(s2)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + A const & s1, + tvec2 const & v, + C const & s2 + ) : + x(value_type(s1)), + y(value_type(v.x)), + z(value_type(v.y)), + w(value_type(s2)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + A const & s1, + B const & s2, + tvec2 const & v + ) : + x(value_type(s1)), + y(value_type(s2)), + z(value_type(v.x)), + w(value_type(v.y)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tvec3 const & v, + B const & s + ) : + x(value_type(v.x)), + y(value_type(v.y)), + z(value_type(v.z)), + w(value_type(s)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + A const & s, + tvec3 const & v + ) : + x(value_type(s)), + y(value_type(v.x)), + z(value_type(v.y)), + w(value_type(v.z)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tvec2 const & v1, + tvec2 const & v2 + ) : + x(value_type(v1.x)), + y(value_type(v1.y)), + z(value_type(v2.x)), + w(value_type(v2.y)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tvec4 const & v + ) : + x(value_type(v.x)), + y(value_type(v.y)), + z(value_type(v.z)), + w(value_type(v.w)) + {} + + ////////////////////////////////////// + // Unary arithmetic operators + + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator= + ( + tvec4 const & v + ) + { + this->x = v.x; + this->y = v.y; + this->z = v.z; + this->w = v.w; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator= + ( + tvec4 const & v + ) + { + this->x = T(v.x); + this->y = T(v.y); + this->z = T(v.z); + this->w = T(v.w); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+= + ( + U const & s + ) + { + this->x += T(s); + this->y += T(s); + this->z += T(s); + this->w += T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+= + ( + tvec4 const & v + ) + { + this->x += T(v.x); + this->y += T(v.y); + this->z += T(v.z); + this->w += T(v.w); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator-= + ( + U const & s + ) + { + this->x -= T(s); + this->y -= T(s); + this->z -= T(s); + this->w -= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator-= + ( + tvec4 const & v + ) + { + this->x -= T(v.x); + this->y -= T(v.y); + this->z -= T(v.z); + this->w -= T(v.w); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator*= + ( + U const & s + ) + { + this->x *= T(s); + this->y *= T(s); + this->z *= T(s); + this->w *= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator*= + ( + tvec4 const & v + ) + { + this->x *= T(v.x); + this->y *= T(v.y); + this->z *= T(v.z); + this->w *= T(v.w); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator/= + ( + U const & s + ) + { + this->x /= T(s); + this->y /= T(s); + this->z /= T(s); + this->w /= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator/= + ( + tvec4 const & v + ) + { + this->x /= T(v.x); + this->y /= T(v.y); + this->z /= T(v.z); + this->w /= T(v.w); + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator++() + { + ++this->x; + ++this->y; + ++this->z; + ++this->w; + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator--() + { + --this->x; + --this->y; + --this->z; + --this->w; + return *this; + } + + ////////////////////////////////////// + // Unary bit operators + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator%= + ( + U const & s + ) + { + this->x %= T(s); + this->y %= T(s); + this->z %= T(s); + this->w %= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator%= + ( + tvec4 const & v + ) + { + this->x %= T(v.x); + this->y %= T(v.y); + this->z %= T(v.z); + this->w %= T(v.w); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator&= + ( + U const & s + ) + { + this->x &= T(s); + this->y &= T(s); + this->z &= T(s); + this->w &= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator&= + ( + tvec4 const & v + ) + { + this->x &= T(v.x); + this->y &= T(v.y); + this->z &= T(v.z); + this->w &= T(v.w); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator|= + ( + U const & s + ) + { + this->x |= T(s); + this->y |= T(s); + this->z |= T(s); + this->w |= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator|= + ( + tvec4 const & v + ) + { + this->x |= T(v.x); + this->y |= T(v.y); + this->z |= T(v.z); + this->w |= T(v.w); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator^= + ( + U const & s + ) + { + this->x ^= T(s); + this->y ^= T(s); + this->z ^= T(s); + this->w ^= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator^= + ( + tvec4 const & v + ) + { + this->x ^= T(v.x); + this->y ^= T(v.y); + this->z ^= T(v.z); + this->w ^= T(v.w); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator<<= + ( + U const & s + ) + { + this->x <<= T(s); + this->y <<= T(s); + this->z <<= T(s); + this->w <<= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator<<= + ( + tvec4 const & v + ) + { + this->x <<= T(v.x); + this->y <<= T(v.y); + this->z <<= T(v.z); + this->w <<= T(v.w); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator>>= + ( + U const & s + ) + { + this->x >>= T(s); + this->y >>= T(s); + this->z >>= T(s); + this->w >>= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator>>= + ( + tvec4 const & v + ) + { + this->x >>= T(v.x); + this->y >>= T(v.y); + this->z >>= T(v.z); + this->w >>= T(v.w); + return *this; + } + + ////////////////////////////////////// + // Swizzle operators + + template + GLM_FUNC_QUALIFIER typename tvec4::value_type + tvec4::swizzle + ( + comp x + ) const + { + return (*this)[x]; + } + + template + GLM_FUNC_QUALIFIER tvec2 tvec4::swizzle + ( + comp x, + comp y + ) const + { + return tvec2( + (*this)[x], + (*this)[y]); + } + + template + GLM_FUNC_QUALIFIER tvec3 tvec4::swizzle + ( + comp x, + comp y, + comp z + ) const + { + return tvec3( + (*this)[x], + (*this)[y], + (*this)[z]); + } + + template + GLM_FUNC_QUALIFIER tvec4 tvec4::swizzle + ( + comp x, + comp y, + comp z, + comp w + ) const + { + return tvec4( + (*this)[x], + (*this)[y], + (*this)[z], + (*this)[w]); + } + + template + GLM_FUNC_QUALIFIER tref2 tvec4::swizzle + ( + comp x, + comp y + ) + { + return tref2( + (*this)[x], + (*this)[y]); + } + + template + GLM_FUNC_QUALIFIER tref3 tvec4::swizzle + ( + comp x, + comp y, + comp z + ) + { + return tref3( + (*this)[x], + (*this)[y], + (*this)[z]); + } + + template + GLM_FUNC_QUALIFIER tref4 tvec4::swizzle + ( + comp x, + comp y, + comp z, + comp w + ) + { + return tref4( + (*this)[x], + (*this)[y], + (*this)[z], + (*this)[w]); + } + + ////////////////////////////////////// + // Binary arithmetic operators + + template + GLM_FUNC_QUALIFIER tvec4 operator+ + ( + tvec4 const & v, + typename tvec4::value_type const & s + ) + { + return tvec4( + v.x + s, + v.y + s, + v.z + s, + v.w + s); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator+ + ( + typename tvec4::value_type const & s, + tvec4 const & v + ) + { + return tvec4( + s + v.x, + s + v.y, + s + v.z, + s + v.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator+ + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return tvec4( + v1.x + v2.x, + v1.y + v2.y, + v1.z + v2.z, + v1.w + v2.w); + } + + //operator- + template + GLM_FUNC_QUALIFIER tvec4 operator- + ( + tvec4 const & v, + typename tvec4::value_type const & s + ) + { + return tvec4( + v.x - s, + v.y - s, + v.z - s, + v.w - s); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator- + ( + typename tvec4::value_type const & s, + tvec4 const & v + ) + { + return tvec4( + s - v.x, + s - v.y, + s - v.z, + s - v.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator- + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return tvec4( + v1.x - v2.x, + v1.y - v2.y, + v1.z - v2.z, + v1.w - v2.w); + } + + //operator* + template + GLM_FUNC_QUALIFIER tvec4 operator* + ( + tvec4 const & v, + typename tvec4::value_type const & s + ) + { + return tvec4( + v.x * s, + v.y * s, + v.z * s, + v.w * s); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator* + ( + typename tvec4::value_type const & s, + tvec4 const & v + ) + { + return tvec4( + s * v.x, + s * v.y, + s * v.z, + s * v.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator* + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return tvec4( + v1.x * v2.x, + v1.y * v2.y, + v1.z * v2.z, + v1.w * v2.w); + } + + //operator/ + template + GLM_FUNC_QUALIFIER tvec4 operator/ + ( + tvec4 const & v, + typename tvec4::value_type const & s + ) + { + return tvec4( + v.x / s, + v.y / s, + v.z / s, + v.w / s); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator/ + ( + typename tvec4::value_type const & s, + tvec4 const & v + ) + { + return tvec4( + s / v.x, + s / v.y, + s / v.z, + s / v.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator/ + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return tvec4( + v1.x / v2.x, + v1.y / v2.y, + v1.z / v2.z, + v1.w / v2.w); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tvec4 operator- + ( + tvec4 const & v + ) + { + return tvec4( + -v.x, + -v.y, + -v.z, + -v.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator++ + ( + tvec4 const & v, + int + ) + { + typename tvec4::value_type One(1); + return tvec4( + v.x + One, + v.y + One, + v.z + One, + v.w + One); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator-- + ( + tvec4 const & v, + int + ) + { + typename tvec4::value_type One(1); + return tvec4( + v.x - One, + v.y - One, + v.z - One, + v.w - One); + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return (v1.x == v2.x) && (v1.y == v2.y) && (v1.z == v2.z) && (v1.w == v2.w); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return (v1.x != v2.x) || (v1.y != v2.y) || (v1.z != v2.z) || (v1.w != v2.w); + } + + ////////////////////////////////////// + // Binary bit operators + + template + GLM_FUNC_QUALIFIER tvec4 operator% + ( + tvec4 const & v, + typename tvec4::value_type const & s + ) + { + return tvec4( + v.x % s, + v.y % s, + v.z % s, + v.w % s); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator% + ( + typename tvec4::value_type const & s, + tvec4 const & v + ) + { + return tvec4( + s % v.x, + s % v.y, + s % v.z, + s % v.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator% + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return tvec4( + v1.x % v2.x, + v1.y % v2.y, + v1.z % v2.z, + v1.w % v2.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator& + ( + tvec4 const & v, + typename tvec4::value_type const & s + ) + { + return tvec4( + v.x & s, + v.y & s, + v.z & s, + v.w & s); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator& + ( + typename tvec4::value_type const & s, + tvec4 const & v + ) + { + return tvec4( + s & v.x, + s & v.y, + s & v.z, + s & v.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator& + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return tvec4( + v1.x & v2.x, + v1.y & v2.y, + v1.z & v2.z, + v1.w & v2.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator| + ( + tvec4 const & v, + typename tvec4::value_type const & s + ) + { + return tvec4( + v.x | s, + v.y | s, + v.z | s, + v.w | s); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator| + ( + typename tvec4::value_type const & s, + tvec4 const & v + ) + { + return tvec4( + s | v.x, + s | v.y, + s | v.z, + s | v.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator| + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return tvec4( + v1.x | v2.x, + v1.y | v2.y, + v1.z | v2.z, + v1.w | v2.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator^ + ( + tvec4 const & v, + typename tvec4::value_type const & s + ) + { + return tvec4( + v.x ^ s, + v.y ^ s, + v.z ^ s, + v.w ^ s); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator^ + ( + typename tvec4::value_type const & s, + tvec4 const & v + ) + { + return tvec4( + s ^ v.x, + s ^ v.y, + s ^ v.z, + s ^ v.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator^ + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return tvec4( + v1.x ^ v2.x, + v1.y ^ v2.y, + v1.z ^ v2.z, + v1.w ^ v2.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator<< + ( + tvec4 const & v, + typename tvec4::value_type const & s + ) + { + return tvec4( + v.x << s, + v.y << s, + v.z << s, + v.w << s); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator<< + ( + typename tvec4::value_type const & s, + tvec4 const & v + ) + { + return tvec4( + s << v.x, + s << v.y, + s << v.z, + s << v.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator<< + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return tvec4( + v1.x << v2.x, + v1.y << v2.y, + v1.z << v2.z, + v1.w << v2.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator>> + ( + tvec4 const & v, + typename tvec4::value_type const & s + ) + { + return tvec4( + v.x >> s, + v.y >> s, + v.z >> s, + v.w >> s); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator>> + ( + typename tvec4::value_type const & s, + tvec4 const & v + ) + { + return tvec4( + s >> v.x, + s >> v.y, + s >> v.z, + s >> v.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator>> + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return tvec4( + v1.x >> v2.x, + v1.y >> v2.y, + v1.z >> v2.z, + v1.w >> v2.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator~ + ( + tvec4 const & v + ) + { + return tvec4( + ~v.x, + ~v.y, + ~v.z, + ~v.w); + } + + ////////////////////////////////////// + // tref definition + + template + tref4::tref4 + ( + T & x, + T & y, + T & z, + T & w + ) : + x(x), + y(y), + z(z), + w(w) + {} + + template + tref4::tref4 + ( + tref4 const & r + ) : + x(r.x), + y(r.y), + z(r.z), + w(r.w) + {} + + template + tref4::tref4 + ( + tvec4 const & v + ) : + x(v.x), + y(v.y), + z(v.z), + w(v.w) + {} + + template + tref4& tref4::operator= + ( + tref4 const & r + ) + { + x = r.x; + y = r.y; + z = r.z; + w = r.w; + return *this; + } + + template + tref4& tref4::operator= + ( + tvec4 const & v + ) + { + x = v.x; + y = v.y; + z = v.z; + w = v.w; + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec4 tref4::operator() () + { + return tvec4(this->x, this->y, this->z, this->w); + } + +}//namespace detail +}//namespace glm diff --git a/include/gal/opengl/glm/ext.hpp b/include/gal/opengl/glm/ext.hpp new file mode 100644 index 0000000000..19b2ea1b8d --- /dev/null +++ b/include/gal/opengl/glm/ext.hpp @@ -0,0 +1,145 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @file glm/glm.hpp +/// @date 2009-05-01 / 2011-05-16 +/// @author Christophe Riccio +/// +/// @ref core (Dependence) +/// +/// @defgroup gtc GTC Extensions (Stable) +/// +/// @brief Functions and types that the GLSL specification doesn't define, but useful to have for a C++ program. +/// +/// GTC extensions aim to be stable. +/// +/// Even if it's highly unrecommended, it's possible to include all the extensions at once by +/// including . Otherwise, each extension needs to be included a specific file. +/// +/// @defgroup gtx GTX Extensions (Experimental) +/// +/// @brief Functions and types that the GLSL specification doesn't define, but +/// useful to have for a C++ program. +/// +/// Experimental extensions are useful functions and types, but the development of +/// their API and functionality is not necessarily stable. They can change +/// substantially between versions. Backwards compatibility is not much of an issue +/// for them. +/// +/// Even if it's highly unrecommended, it's possible to include all the extensions +/// at once by including . Otherwise, each extension needs to be +/// included a specific file. +/// +/// @defgroup virtrev VIRTREV Extensions +/// +/// @brief Extensions develop and maintain by Mathieu [matrem] Roumillac +/// (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showprofile&User=22660). +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_ext +#define glm_ext + +#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_EXT_INCLUDED_DISPLAYED)) +# define GLM_MESSAGE_EXT_INCLUDED_DISPLAYED +# pragma message("GLM: All extensions included (not recommanded)") +#endif//GLM_MESSAGES + +#include "./gtc/constants.hpp" +#include "./gtc/epsilon.hpp" +#include "./gtc/half_float.hpp" +#include "./gtc/matrix_access.hpp" +#include "./gtc/matrix_integer.hpp" +#include "./gtc/matrix_inverse.hpp" +#include "./gtc/matrix_transform.hpp" +#include "./gtc/noise.hpp" +#include "./gtc/quaternion.hpp" +#include "./gtc/random.hpp" +#include "./gtc/reciprocal.hpp" +#include "./gtc/swizzle.hpp" +#include "./gtc/type_precision.hpp" +#include "./gtc/type_ptr.hpp" +#include "./gtc/ulp.hpp" + +#include "./gtx/associated_min_max.hpp" +#include "./gtx/bit.hpp" +#include "./gtx/closest_point.hpp" +#include "./gtx/color_cast.hpp" +#include "./gtx/color_space.hpp" +#include "./gtx/color_space_YCoCg.hpp" +#include "./gtx/compatibility.hpp" +#include "./gtx/component_wise.hpp" +#include "./gtx/euler_angles.hpp" +#include "./gtx/extend.hpp" +#include "./gtx/extented_min_max.hpp" +#include "./gtx/fast_exponential.hpp" +#include "./gtx/fast_square_root.hpp" +#include "./gtx/fast_trigonometry.hpp" +#include "./gtx/gradient_paint.hpp" +#include "./gtx/handed_coordinate_space.hpp" +#include "./gtx/inertia.hpp" +#include "./gtx/int_10_10_10_2.hpp" +#include "./gtx/integer.hpp" +#include "./gtx/intersect.hpp" +#include "./gtx/log_base.hpp" +#include "./gtx/matrix_cross_product.hpp" +#include "./gtx/matrix_interpolation.hpp" +#include "./gtx/matrix_major_storage.hpp" +#include "./gtx/matrix_operation.hpp" +#include "./gtx/matrix_query.hpp" +#include "./gtx/mixed_product.hpp" +#include "./gtx/multiple.hpp" +#include "./gtx/norm.hpp" +#include "./gtx/normal.hpp" +#include "./gtx/normalize_dot.hpp" +#include "./gtx/number_precision.hpp" +#include "./gtx/ocl_type.hpp" +#include "./gtx/optimum_pow.hpp" +#include "./gtx/orthonormalize.hpp" +#include "./gtx/perpendicular.hpp" +#include "./gtx/polar_coordinates.hpp" +#include "./gtx/projection.hpp" +#include "./gtx/quaternion.hpp" +#include "./gtx/raw_data.hpp" +#include "./gtx/rotate_vector.hpp" +#include "./gtx/spline.hpp" +#include "./gtx/std_based_type.hpp" +#include "./gtx/string_cast.hpp" +#include "./gtx/transform.hpp" +#include "./gtx/transform2.hpp" +#include "./gtx/vec1.hpp" +#include "./gtx/vector_access.hpp" +#include "./gtx/vector_angle.hpp" +#include "./gtx/vector_query.hpp" +#include "./gtx/verbose_operator.hpp" +#include "./gtx/wrap.hpp" + +#if(GLM_ARCH & GLM_ARCH_SSE2) +# include "./gtx/simd_vec4.hpp" +# include "./gtx/simd_mat4.hpp" +#endif + +#include "./virtrev/xstream.hpp" + +//const float goldenRatio = 1.618033988749894848f; +//const float pi = 3.141592653589793238f; + +#endif //glm_ext diff --git a/include/gal/opengl/glm/glm.hpp b/include/gal/opengl/glm/glm.hpp new file mode 100644 index 0000000000..880bce127a --- /dev/null +++ b/include/gal/opengl/glm/glm.hpp @@ -0,0 +1,129 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/glm.hpp +/// @date 2005-01-14 / 2011-10-24 +/// @author Christophe Riccio +/// +/// @defgroup core GLM Core +/// +/// @brief The core of GLM, which implements exactly and only the GLSL specification to the degree possible. +/// +/// The GLM core consists of @ref core_types "C++ types that mirror GLSL types" and +/// C++ functions that mirror the GLSL functions. It also includes +/// @ref core_precision "a set of precision-based types" that can be used in the appropriate +/// functions. The C++ types are all based on a basic set of @ref core_template "template types". +/// +/// The best documentation for GLM Core is the current GLSL specification, +/// version 4.2 +/// (pdf file). +/// There are a few @ref pg_differences "differences" between GLM core and GLSL. +/// +/// GLM core functionnalities require to be included to be used. +/// +/// @defgroup core_types Types +/// +/// @brief The standard types defined by the specification. +/// +/// These types are all typedefs of more generalized, template types. To see the definiton +/// of these template types, go to @ref core_template. +/// +/// @ingroup core +/// +/// @defgroup core_precision Precision types +/// +/// @brief Non-GLSL types that are used to define precision-based types. +/// +/// The GLSL language allows the user to define the precision of a particular variable. +/// In OpenGL's GLSL, these precision qualifiers have no effect; they are there for compatibility +/// with OpenGL ES's precision qualifiers, where they @em do have an effect. +/// +/// C++ has no language equivalent to precision qualifiers. So GLM provides the next-best thing: +/// a number of typedefs of the @ref core_template that use a particular precision. +/// +/// None of these types make any guarantees about the actual precision used. +/// +/// @ingroup core +/// +/// @defgroup core_template Template types +/// +/// @brief The generic template types used as the basis for the core types. +/// +/// These types are all templates used to define the actual @ref core_types. +/// These templetes are implementation details of GLM types and should not be used explicitly. +/// +/// @ingroup core +/////////////////////////////////////////////////////////////////////////////////// + +#include "core/_fixes.hpp" + +#ifndef glm_glm +#define glm_glm + +#include +#include +#include +#include +#include +//#include +#include "core/setup.hpp" + +#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_CORE_INCLUDED_DISPLAYED)) +# define GLM_MESSAGE_CORE_INCLUDED_DISPLAYED +# pragma message("GLM: Core library included") +#endif//GLM_MESSAGE + +#include "./core/_detail.hpp" +#include "./core/_vectorize.hpp" +#include "./core/type.hpp" + +#include "./core/func_trigonometric.hpp" +#include "./core/func_exponential.hpp" +#include "./core/func_common.hpp" +#include "./core/func_packing.hpp" +#include "./core/func_geometric.hpp" +#include "./core/func_matrix.hpp" +#include "./core/func_vector_relational.hpp" +#include "./core/func_integer.hpp" +#include "./core/func_noise.hpp" +#include "./core/_swizzle.hpp" + +//////////////////// +// check type sizes +#ifndef GLM_STATIC_ASSERT_NULL + GLM_STATIC_ASSERT(sizeof(glm::detail::int8) == 1, "int8 size isn't 1 byte on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::int16) == 2, "int16 size isn't 2 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::int32) == 4, "int32 size isn't 4 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::int64) == 8, "int64 size isn't 8 bytes on this platform"); + + GLM_STATIC_ASSERT(sizeof(glm::detail::uint8) == 1, "uint8 size isn't 1 byte on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::uint16) == 2, "uint16 size isn't 2 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::uint32) == 4, "uint32 size isn't 4 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::uint64) == 8, "uint64 size isn't 8 bytes on this platform"); + + GLM_STATIC_ASSERT(sizeof(glm::detail::float16) == 2, "float16 size isn't 2 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::float32) == 4, "float32 size isn't 4 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::float64) == 8, "float64 size isn't 8 bytes on this platform"); +#endif//GLM_STATIC_ASSERT_NULL + +#endif//glm_glm diff --git a/include/gal/opengl/glm/gtc/constants.hpp b/include/gal/opengl/glm/gtc/constants.hpp new file mode 100644 index 0000000000..3fcc22673e --- /dev/null +++ b/include/gal/opengl/glm/gtc/constants.hpp @@ -0,0 +1,186 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_constants +/// @file glm/gtc/constants.hpp +/// @date 2011-09-30 / 2012-01-25 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_half_float (dependence) +/// +/// @defgroup gtc_constants GLM_GTC_constants +/// @ingroup gtc +/// +/// @brief Allow to perform bit operations on integer values +/// +/// need to be included to use these features. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_constants +#define GLM_GTC_constants GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_constants extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_constants + /// @{ + + /// Return the epsilon constant for floating point types. + /// @todo Implement epsilon for half-precision floating point type. + /// @see gtc_constants + template + genType epsilon(); + + /// Return 0. + /// @see gtc_constants + template + genType zero(); + + /// Return 1. + /// @see gtc_constants + template + genType one(); + + /// Return the pi constant. + /// @see gtc_constants + template + genType pi(); + + /// Return square root of pi. + /// @see gtc_constants + template + genType root_pi(); + + /// Return pi / 2. + /// @see gtc_constants + template + genType half_pi(); + + /// Return pi / 4. + /// @see gtc_constants + template + genType quarter_pi(); + + /// Return 1 / pi. + /// @see gtc_constants + template + genType one_over_pi(); + + /// Return 2 / pi. + /// @see gtc_constants + template + genType two_over_pi(); + + /// Return 2 / sqrt(pi). + /// @see gtc_constants + template + genType two_over_root_pi(); + + /// Return 1 / sqrt(2). + /// @see gtc_constants + template + genType one_over_root_two(); + + /// Return sqrt(pi / 2). + /// @see gtc_constants + template + genType root_half_pi(); + + /// Return sqrt(2 * pi). + /// @see gtc_constants + template + genType root_two_pi(); + + /// Return sqrt(ln(4)). + /// @see gtc_constants + template + genType root_ln_four(); + + /// Return e constant. + /// @see gtc_constants + template + genType e(); + + /// Return Euler's constant. + /// @see gtc_constants + template + genType euler(); + + /// Return sqrt(2). + /// @see gtc_constants + template + genType root_two(); + + /// Return sqrt(3). + /// @see gtc_constants + template + genType root_three(); + + /// Return sqrt(5). + /// @see gtc_constants + template + genType root_five(); + + /// Return ln(2). + /// @see gtc_constants + template + genType ln_two(); + + /// Return ln(10). + /// @see gtc_constants + template + genType ln_ten(); + + /// Return ln(ln(2)). + /// @see gtc_constants + template + genType ln_ln_two(); + + /// Return 1 / 3. + /// @see gtc_constants + template + genType third(); + + /// Return 2 / 3. + /// @see gtc_constants + template + genType two_thirds(); + + /// Return the golden ratio constant. + /// @see gtc_constants + template + genType golden_ratio(); + + /// @} +} //namespace glm + +#include "constants.inl" + +#endif//GLM_GTC_constants diff --git a/include/gal/opengl/glm/gtc/constants.inl b/include/gal/opengl/glm/gtc/constants.inl new file mode 100644 index 0000000000..38abf26167 --- /dev/null +++ b/include/gal/opengl/glm/gtc/constants.inl @@ -0,0 +1,186 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_constants +/// @file glm/gtx/constants.inl +/// @date 2011-10-14 / 2012-01-25 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER genType epsilon() + { + return std::numeric_limits::epsilon(); + } + + template <> + GLM_FUNC_QUALIFIER half epsilon() + { + return half(1.19209290e-007); + } + + template + GLM_FUNC_QUALIFIER genType zero() + { + return genType(0); + } + + template + GLM_FUNC_QUALIFIER genType one() + { + return genType(1); + } + + template + GLM_FUNC_QUALIFIER genType pi() + { + return genType(3.14159265358979323846264338327950288); + } + + template + GLM_FUNC_QUALIFIER genType root_pi() + { + return genType(1.772453850905516027); + } + + template + GLM_FUNC_QUALIFIER genType half_pi() + { + return genType(1.57079632679489661923132169163975144); + } + + template + GLM_FUNC_QUALIFIER genType quarter_pi() + { + return genType(0.785398163397448309615660845819875721); + } + + template + GLM_FUNC_QUALIFIER genType one_over_pi() + { + return genType(0.318309886183790671537767526745028724); + } + + template + GLM_FUNC_QUALIFIER genType two_over_pi() + { + return genType(0.636619772367581343075535053490057448); + } + + template + GLM_FUNC_QUALIFIER genType two_over_root_pi() + { + return genType(1.12837916709551257389615890312154517); + } + + template + GLM_FUNC_QUALIFIER genType one_over_root_two() + { + return genType(0.707106781186547524400844362104849039); + } + + template + GLM_FUNC_QUALIFIER genType root_half_pi() + { + return genType(1.253314137315500251); + } + + template + GLM_FUNC_QUALIFIER genType root_two_pi() + { + return genType(2.506628274631000502); + } + + template + GLM_FUNC_QUALIFIER genType root_ln_four() + { + return genType(1.17741002251547469); + } + + template + GLM_FUNC_QUALIFIER genType e() + { + return genType(2.71828182845904523536); + } + + template + GLM_FUNC_QUALIFIER genType euler() + { + return genType(0.577215664901532860606); + } + + template + GLM_FUNC_QUALIFIER genType root_two() + { + return genType(1.41421356237309504880168872420969808); + } + + template + GLM_FUNC_QUALIFIER genType root_three() + { + return genType(1.73205080756887729352744634150587236); + } + + template + GLM_FUNC_QUALIFIER genType root_five() + { + return genType(2.23606797749978969640917366873127623); + } + + template + GLM_FUNC_QUALIFIER genType ln_two() + { + return genType(0.693147180559945309417232121458176568); + } + + template + GLM_FUNC_QUALIFIER genType ln_ten() + { + return genType(2.30258509299404568401799145468436421); + } + + template + GLM_FUNC_QUALIFIER genType ln_ln_two() + { + return genType(-0.3665129205816643); + } + + template + GLM_FUNC_QUALIFIER genType third() + { + return genType(0.3333333333333333333333333333333333333333); + } + + template + GLM_FUNC_QUALIFIER genType two_thirds() + { + return genType(0.666666666666666666666666666666666666667); + } + + template + GLM_FUNC_QUALIFIER genType golden_ratio() + { + return genType(1.61803398874989484820458683436563811); + } +} //namespace glm diff --git a/include/gal/opengl/glm/gtc/epsilon.hpp b/include/gal/opengl/glm/gtc/epsilon.hpp new file mode 100644 index 0000000000..57cbbbd55b --- /dev/null +++ b/include/gal/opengl/glm/gtc/epsilon.hpp @@ -0,0 +1,94 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_epsilon +/// @file glm/gtc/epsilon.hpp +/// @date 2012-04-07 / 2012-04-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_half_float (dependence) +/// @see gtc_quaternion (dependence) +/// +/// @defgroup gtc_epsilon GLM_GTC_epsilon +/// @ingroup gtc +/// +/// @brief Comparison functions for a user defined epsilon values. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_epsilon +#define GLM_GTC_epsilon GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" +#include "../gtc/quaternion.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_epsilon extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_epsilon + /// @{ + + /// Returns the component-wise compare of |x - y| < epsilon. + /// @see gtc_epsilon + template + typename genType::boolType epsilonEqual( + genType const & x, + genType const & y, + typename genType::value_type const & epsilon); + + /// Returns the component-wise compare of |x - y| < epsilon. + /// @see gtc_epsilon + template + typename genType::boolType epsilonEqual( + genType const & x, + genType const & y, + genType const & epsilon); + + /// Returns the component-wise compare of |x - y| < epsilon. + /// @see gtc_epsilon + template + typename genType::boolType epsilonNotEqual( + genType const & x, + genType const & y, + typename genType::value_type const & epsilon); + + /// Returns the component-wise compare of |x - y| >= epsilon. + /// @see gtc_epsilon + template + typename genType::boolType epsilonNotEqual( + genType const & x, + genType const & y, + genType const & epsilon); + + /// @} +}//namespace glm + +#include "epsilon.inl" + +#endif//GLM_GTC_epsilon diff --git a/include/gal/opengl/glm/gtc/epsilon.inl b/include/gal/opengl/glm/gtc/epsilon.inl new file mode 100644 index 0000000000..2a235553bc --- /dev/null +++ b/include/gal/opengl/glm/gtc/epsilon.inl @@ -0,0 +1,286 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_epsilon +/// @file glm/gtc/epsilon.inl +/// @date 2012-04-07 / 2012-04-07 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + GLM_FUNC_QUALIFIER bool epsilonEqual + ( + glm::half const & x, + glm::half const & y, + glm::half const & epsilon + ) + { + return abs(x - y) < epsilon; + } + + GLM_FUNC_QUALIFIER bool epsilonEqual + ( + float const & x, + float const & y, + float const & epsilon + ) + { + return abs(x - y) < epsilon; + } + + GLM_FUNC_QUALIFIER bool epsilonEqual + ( + double const & x, + double const & y, + double const & epsilon + ) + { + return abs(x - y) < epsilon; + } + + GLM_FUNC_QUALIFIER bool epsilonNotEqual + ( + glm::half const & x, + glm::half const & y, + glm::half const & epsilon + ) + { + return abs(x - y) >= epsilon; + } + + GLM_FUNC_QUALIFIER bool epsilonNotEqual + ( + float const & x, + float const & y, + float const & epsilon + ) + { + return abs(x - y) >= epsilon; + } + + GLM_FUNC_QUALIFIER bool epsilonNotEqual + ( + double const & x, + double const & y, + double const & epsilon + ) + { + return abs(x - y) >= epsilon; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 epsilonEqual + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + valType const & epsilon) + { + return detail::tvec2( + abs(x.x - y.x) < epsilon, + abs(x.y - y.y) < epsilon); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 epsilonEqual + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 const & epsilon + ) + { + return detail::tvec2( + abs(x.x - y.x) < epsilon.x, + abs(x.y - y.y) < epsilon.y); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 epsilonEqual + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + valType const & epsilon) + { + return detail::tvec3( + abs(x.x - y.x) < epsilon, + abs(x.y - y.y) < epsilon, + abs(x.z - y.z) < epsilon); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 epsilonEqual + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 const & epsilon + ) + { + return detail::tvec3( + abs(x.x - y.x) < epsilon.x, + abs(x.y - y.y) < epsilon.y, + abs(x.z - y.z) < epsilon.z); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 epsilonEqual + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + valType const & epsilon + ) + { + return detail::tvec4( + abs(x.x - y.x) < epsilon, + abs(x.y - y.y) < epsilon, + abs(x.z - y.z) < epsilon, + abs(x.w - y.w) < epsilon); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 epsilonEqual + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 const & epsilon + ) + { + return detail::tvec4( + abs(x.x - y.x) < epsilon.x, + abs(x.y - y.y) < epsilon.y, + abs(x.z - y.z) < epsilon.z, + abs(x.w - y.w) < epsilon.w); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 epsilonNotEqual + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + valType const & epsilon + ) + { + return detail::tvec2( + abs(x.x - y.x) >= epsilon, + abs(x.y - y.y) >= epsilon); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 epsilonNotEqual + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 const & epsilon + ) + { + return detail::tvec2( + abs(x.x - y.x) >= epsilon.x, + abs(x.y - y.y) >= epsilon.y); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 epsilonNotEqual + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + valType const & epsilon + ) + { + return detail::tvec3( + abs(x.x - y.x) >= epsilon, + abs(x.y - y.y) >= epsilon, + abs(x.z - y.z) >= epsilon); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 epsilonNotEqual + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 const & epsilon + ) + { + return detail::tvec3( + abs(x.x - y.x) >= epsilon.x, + abs(x.y - y.y) >= epsilon.y, + abs(x.z - y.z) >= epsilon.z); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 epsilonNotEqual + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + valType const & epsilon + ) + { + return detail::tvec4( + abs(x.x - y.x) >= epsilon, + abs(x.y - y.y) >= epsilon, + abs(x.z - y.z) >= epsilon, + abs(x.w - y.w) >= epsilon); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 epsilonNotEqual + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 const & epsilon + ) + { + return detail::tvec4( + abs(x.x - y.x) >= epsilon.x, + abs(x.y - y.y) >= epsilon.y, + abs(x.z - y.z) >= epsilon.z, + abs(x.w - y.w) >= epsilon.w); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 epsilonEqual + ( + detail::tquat const & x, + detail::tquat const & y, + valType const & epsilon + ) + { + return detail::tvec4( + abs(x.x - y.x) < epsilon, + abs(x.y - y.y) < epsilon, + abs(x.z - y.z) < epsilon, + abs(x.w - y.w) < epsilon); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 epsilonNotEqual + ( + detail::tquat const & x, + detail::tquat const & y, + valType const & epsilon + ) + { + return detail::tvec4( + abs(x.x - y.x) >= epsilon, + abs(x.y - y.y) >= epsilon, + abs(x.z - y.z) >= epsilon, + abs(x.w - y.w) >= epsilon); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtc/half_float.hpp b/include/gal/opengl/glm/gtc/half_float.hpp new file mode 100644 index 0000000000..32049769a2 --- /dev/null +++ b/include/gal/opengl/glm/gtc/half_float.hpp @@ -0,0 +1,440 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_half_float +/// @file glm/gtc/half_float.hpp +/// @date 2009-04-29 / 2012-11-06 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtc_half_float GLM_GTC_half_float +/// @ingroup gtc +/// +/// Defines the half-precision floating-point type, along with various typedefs for vectors and matrices. +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_half_float +#define GLM_GTC_half_float GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_half_float extension included") +#endif + +namespace glm{ +namespace detail +{ +#if(GLM_COMPONENT == GLM_COMPONENT_CXX98) + template <> + struct tvec2 + { + enum ctor{null}; + typedef half value_type; + typedef std::size_t size_type; + + GLM_FUNC_DECL size_type length() const; + static GLM_FUNC_DECL size_type value_size(); + + typedef tvec2 type; + typedef tvec2 bool_type; + + ////////////////////////////////////// + // Data + + half x, y; + + ////////////////////////////////////// + // Accesses + + half & operator[](size_type i); + half const & operator[](size_type i) const; + + ////////////////////////////////////// + // Implicit basic constructors + + tvec2(); + tvec2(tvec2 const & v); + + ////////////////////////////////////// + // Explicit basic constructors + + explicit tvec2(ctor); + explicit tvec2( + half const & s); + explicit tvec2( + half const & s1, + half const & s2); + + ////////////////////////////////////// + // Swizzle constructors + + tvec2(tref2 const & r); + + ////////////////////////////////////// + // Convertion scalar constructors + + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec2(U const & x); + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec2(U const & x, V const & y); + + ////////////////////////////////////// + // Convertion vector constructors + + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec2(tvec2 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec2(tvec3 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec2(tvec4 const & v); + + ////////////////////////////////////// + // Unary arithmetic operators + + tvec2& operator= (tvec2 const & v); + + tvec2& operator+=(half const & s); + tvec2& operator+=(tvec2 const & v); + tvec2& operator-=(half const & s); + tvec2& operator-=(tvec2 const & v); + tvec2& operator*=(half const & s); + tvec2& operator*=(tvec2 const & v); + tvec2& operator/=(half const & s); + tvec2& operator/=(tvec2 const & v); + tvec2& operator++(); + tvec2& operator--(); + + ////////////////////////////////////// + // Swizzle operators + + half swizzle(comp X) const; + tvec2 swizzle(comp X, comp Y) const; + tvec3 swizzle(comp X, comp Y, comp Z) const; + tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + tref2 swizzle(comp X, comp Y); + }; + + template <> + struct tvec3 + { + enum ctor{null}; + typedef half value_type; + typedef std::size_t size_type; + GLM_FUNC_DECL size_type length() const; + static GLM_FUNC_DECL size_type value_size(); + + typedef tvec3 type; + typedef tvec3 bool_type; + + ////////////////////////////////////// + // Data + + half x, y, z; + + ////////////////////////////////////// + // Accesses + + half & operator[](size_type i); + half const & operator[](size_type i) const; + + ////////////////////////////////////// + // Implicit basic constructors + + tvec3(); + tvec3(tvec3 const & v); + + ////////////////////////////////////// + // Explicit basic constructors + + explicit tvec3(ctor); + explicit tvec3( + half const & s); + explicit tvec3( + half const & s1, + half const & s2, + half const & s3); + + ////////////////////////////////////// + // Swizzle constructors + + tvec3(tref3 const & r); + + ////////////////////////////////////// + // Convertion scalar constructors + + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec3(U const & x); + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec3(U const & x, V const & y, W const & z); + + ////////////////////////////////////// + // Convertion vector constructors + + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec3(tvec2 const & v, B const & s); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec3(A const & s, tvec2 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec3(tvec3 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec3(tvec4 const & v); + + ////////////////////////////////////// + // Unary arithmetic operators + + tvec3& operator= (tvec3 const & v); + + tvec3& operator+=(half const & s); + tvec3& operator+=(tvec3 const & v); + tvec3& operator-=(half const & s); + tvec3& operator-=(tvec3 const & v); + tvec3& operator*=(half const & s); + tvec3& operator*=(tvec3 const & v); + tvec3& operator/=(half const & s); + tvec3& operator/=(tvec3 const & v); + tvec3& operator++(); + tvec3& operator--(); + + ////////////////////////////////////// + // Swizzle operators + + half swizzle(comp X) const; + tvec2 swizzle(comp X, comp Y) const; + tvec3 swizzle(comp X, comp Y, comp Z) const; + tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + tref3 swizzle(comp X, comp Y, comp Z); + }; + + template <> + struct tvec4 + { + enum ctor{null}; + typedef half value_type; + typedef std::size_t size_type; + GLM_FUNC_DECL size_type length() const; + static GLM_FUNC_DECL size_type value_size(); + + typedef tvec4 type; + typedef tvec4 bool_type; + + ////////////////////////////////////// + // Data + + half x, y, z, w; + + ////////////////////////////////////// + // Accesses + + half & operator[](size_type i); + half const & operator[](size_type i) const; + + ////////////////////////////////////// + // Implicit basic constructors + + tvec4(); + tvec4(tvec4 const & v); + + ////////////////////////////////////// + // Explicit basic constructors + + explicit tvec4(ctor); + explicit tvec4( + half const & s); + explicit tvec4( + half const & s0, + half const & s1, + half const & s2, + half const & s3); + + ////////////////////////////////////// + // Swizzle constructors + + tvec4(tref4 const & r); + + ////////////////////////////////////// + // Convertion scalar constructors + + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(U const & x); + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(A const & x, B const & y, C const & z, D const & w); + + ////////////////////////////////////// + // Convertion vector constructors + + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(tvec2 const & v, B const & s1, C const & s2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(A const & s1, tvec2 const & v, C const & s2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(A const & s1, B const & s2, tvec2 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(tvec3 const & v, B const & s); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(A const & s, tvec3 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(tvec2 const & v1, tvec2 const & v2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(tvec4 const & v); + + ////////////////////////////////////// + // Unary arithmetic operators + + tvec4& operator= (tvec4 const & v); + + tvec4& operator+=(half const & s); + tvec4& operator+=(tvec4 const & v); + tvec4& operator-=(half const & s); + tvec4& operator-=(tvec4 const & v); + tvec4& operator*=(half const & s); + tvec4& operator*=(tvec4 const & v); + tvec4& operator/=(half const & s); + tvec4& operator/=(tvec4 const & v); + tvec4& operator++(); + tvec4& operator--(); + + ////////////////////////////////////// + // Swizzle operators + + half swizzle(comp X) const; + tvec2 swizzle(comp X, comp Y) const; + tvec3 swizzle(comp X, comp Y, comp Z) const; + tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + tref4 swizzle(comp X, comp Y, comp Z, comp W); + }; +#endif//(GLM_COMPONENT == GLM_COMPONENT_CXX98) +} +//namespace detail + + /// @addtogroup gtc_half_float + /// @{ + + /// Type for half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::half half; + + /// Vector of 2 half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tvec2 hvec2; + + /// Vector of 3 half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tvec3 hvec3; + + /// Vector of 4 half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tvec4 hvec4; + + /// 2 * 2 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat2x2 hmat2; + + /// 3 * 3 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat3x3 hmat3; + + /// 4 * 4 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat4x4 hmat4; + + /// 2 * 2 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat2x2 hmat2x2; + + /// 2 * 3 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat2x3 hmat2x3; + + /// 2 * 4 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat2x4 hmat2x4; + + /// 3 * 2 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat3x2 hmat3x2; + + /// 3 * 3 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat3x3 hmat3x3; + + /// 3 * 4 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat3x4 hmat3x4; + + /// 4 * 2 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat4x2 hmat4x2; + + /// 4 * 3 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat4x3 hmat4x3; + + /// 4 * 4 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat4x4 hmat4x4; + + /// Returns the absolute value of a half-precision floating-point value + /// @see gtc_half_float + half abs(half const & x); + + /// Returns the absolute value of a half-precision floating-point two dimensional vector + /// @see gtc_half_float + hvec2 abs(hvec2 const & x); + + /// Returns the absolute value of a half-precision floating-point three dimensional vector + /// @see gtc_half_float + hvec3 abs(hvec3 const & x); + + /// Returns the absolute value of a half-precision floating-point four dimensional vector + /// @see gtc_half_float + hvec4 abs(hvec4 const & x); + + /// @} +}// namespace glm + +#include "half_float.inl" + +#endif//GLM_GTC_half_float diff --git a/include/gal/opengl/glm/gtc/half_float.inl b/include/gal/opengl/glm/gtc/half_float.inl new file mode 100644 index 0000000000..81baa8b49e --- /dev/null +++ b/include/gal/opengl/glm/gtc/half_float.inl @@ -0,0 +1,1039 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_half_float +/// @file glm/gtc/half_float.inl +/// @date 2009-04-29 / 2012-11-06 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ +#if(GLM_COMPONENT == GLM_COMPONENT_CXX98) + + ////////////////////////////////////// + // hvec2 + + GLM_FUNC_QUALIFIER tvec2::size_type tvec2::length() const + { + return 2; + } + + GLM_FUNC_QUALIFIER tvec2::size_type tvec2::value_size() + { + return 2; + } + + ////////////////////////////////////// + // Accesses + + GLM_FUNC_QUALIFIER half & tvec2::operator[](tvec2::size_type i) + { + assert(/*i >= tvec2::size_type(0) && */i < tvec2::value_size()); + return (&x)[i]; + } + + GLM_FUNC_QUALIFIER half const & tvec2::operator[](tvec2::size_type i) const + { + assert(/*i >= tvec2::size_type(0) && */i < tvec2::value_size()); + return (&x)[i]; + } + + ////////////////////////////////////// + // Implicit basic constructors + + GLM_FUNC_QUALIFIER tvec2::tvec2() : + x(half(0.f)), + y(half(0.f)) + {} + + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + tvec2 const & v + ) : + x(v.x), + y(v.y) + {} + + ////////////////////////////////////// + // Explicit basic constructors + + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + half const & s + ) : + x(s), + y(s) + {} + + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + half const & s1, + half const & s2 + ) : + x(s1), + y(s2) + {} + + ////////////////////////////////////// + // Swizzle constructors + + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + tref2 const & r + ) : + x(r.x), + y(r.y) + {} + + ////////////////////////////////////// + // Convertion scalar constructors + + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + U const & x + ) : + x(half(x)), + y(half(x)) + {} + + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + U const & x, + V const & y + ) : + x(half(x)), + y(half(y)) + {} + + ////////////////////////////////////// + // Convertion vector constructors + + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + tvec2 const & v + ) : + x(half(v.x)), + y(half(v.y)) + {} + + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + tvec3 const & v + ) : + x(half(v.x)), + y(half(v.y)) + {} + + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + tvec4 const & v + ) : + x(half(v.x)), + y(half(v.y)) + {} + + ////////////////////////////////////// + // Unary arithmetic operators + + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator= + ( + tvec2 const & v + ) + { + this->x = v.x; + this->y = v.y; + return *this; + } + + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator+= + ( + half const & s + ) + { + this->x += s; + this->y += s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator+= + ( + tvec2 const & v + ) + { + this->x += v.x; + this->y += v.y; + return *this; + } + + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator-= + ( + half const & s + ) + { + this->x -= s; + this->y -= s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator-= + ( + tvec2 const & v + ) + { + this->x -= v.x; + this->y -= v.y; + return *this; + } + + GLM_FUNC_QUALIFIER tvec2& tvec2::operator*= + ( + half const & s + ) + { + this->x *= s; + this->y *= s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator*= + ( + tvec2 const & v + ) + { + this->x *= v.x; + this->y *= v.y; + return *this; + } + + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator/= + ( + half const & s + ) + { + this->x /= s; + this->y /= s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator/= + ( + tvec2 const & v + ) + { + this->x /= v.x; + this->y /= v.y; + return *this; + } + + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator++() + { + ++this->x; + ++this->y; + return *this; + } + + GLM_FUNC_QUALIFIER tvec2& tvec2::operator--() + { + --this->x; + --this->y; + return *this; + } + + ////////////////////////////////////// + // Swizzle operators + + GLM_FUNC_QUALIFIER half tvec2::swizzle(comp x) const + { + return (*this)[x]; + } + + GLM_FUNC_QUALIFIER tvec2 tvec2::swizzle(comp x, comp y) const + { + return tvec2( + (*this)[x], + (*this)[y]); + } + + GLM_FUNC_QUALIFIER tvec3 tvec2::swizzle(comp x, comp y, comp z) const + { + return tvec3( + (*this)[x], + (*this)[y], + (*this)[z]); + } + + GLM_FUNC_QUALIFIER tvec4 tvec2::swizzle(comp x, comp y, comp z, comp w) const + { + return tvec4( + (*this)[x], + (*this)[y], + (*this)[z], + (*this)[w]); + } + + GLM_FUNC_QUALIFIER tref2 tvec2::swizzle(comp x, comp y) + { + return tref2( + (*this)[x], + (*this)[y]); + } + + ////////////////////////////////////// + // hvec3 + + GLM_FUNC_QUALIFIER tvec3::size_type tvec3::length() const + { + return 3; + } + + GLM_FUNC_QUALIFIER tvec3::size_type tvec3::value_size() + { + return 3; + } + + ////////////////////////////////////// + // Accesses + + GLM_FUNC_QUALIFIER half & tvec3::operator[] + ( + tvec3::size_type i + ) + { + assert(/*i >= tvec3::size_type(0) &&*/ i < tvec3::value_size()); + + return (&x)[i]; + } + + GLM_FUNC_QUALIFIER half const & tvec3::operator[] + ( + tvec3::size_type i + ) const + { + assert(/*i >= tvec3::size_type(0) &&*/ i < tvec3::value_size()); + + return (&x)[i]; + } + + ////////////////////////////////////// + // Implicit basic constructors + + GLM_FUNC_QUALIFIER tvec3::tvec3() : + x(half(0)), + y(half(0)), + z(half(0)) + {} + + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + tvec3 const & v + ) : + x(v.x), + y(v.y), + z(v.z) + {} + + ////////////////////////////////////// + // Explicit basic constructors + + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + half const & s + ) : + x(s), + y(s), + z(s) + {} + + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + half const & s0, + half const & s1, + half const & s2 + ) : + x(s0), + y(s1), + z(s2) + {} + + ////////////////////////////////////// + // Swizzle constructors + + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + tref3 const & r + ) : + x(r.x), + y(r.y), + z(r.z) + {} + + ////////////////////////////////////// + // Convertion scalar constructors + + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + U const & x + ) : + x(half(x)), + y(half(x)), + z(half(x)) + {} + + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + A const & x, + B const & y, + C const & z + ) : + x(half(x)), + y(half(y)), + z(half(z)) + {} + + ////////////////////////////////////// + // Convertion vector constructors + + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + tvec2 const & v, + B const & s + ) : + x(half(v.x)), + y(half(v.y)), + z(half(s)) + {} + + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + A const & s, + tvec2 const & v + ) : + x(half(s)), + y(half(v.x)), + z(half(v.y)) + {} + + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + tvec3 const & v + ) : + x(half(v.x)), + y(half(v.y)), + z(half(v.z)) + {} + + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + tvec4 const & v + ) : + x(half(v.x)), + y(half(v.y)), + z(half(v.z)) + {} + + ////////////////////////////////////// + // Unary arithmetic operators + + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator= + ( + tvec3 const & v + ) + { + this->x = v.x; + this->y = v.y; + this->z = v.z; + return *this; + } + + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator+= + ( + half const & s + ) + { + this->x += s; + this->y += s; + this->z += s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator+= + ( + tvec3 const & v + ) + { + this->x += v.x; + this->y += v.y; + this->z += v.z; + return *this; + } + + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator-= + ( + half const & s + ) + { + this->x -= s; + this->y -= s; + this->z -= s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator-= + ( + tvec3 const & v + ) + { + this->x -= v.x; + this->y -= v.y; + this->z -= v.z; + return *this; + } + + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator*= + ( + half const & s + ) + { + this->x *= s; + this->y *= s; + this->z *= s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator*= + ( + tvec3 const & v + ) + { + this->x *= v.x; + this->y *= v.y; + this->z *= v.z; + return *this; + } + + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator/= + ( + half const & s + ) + { + this->x /= s; + this->y /= s; + this->z /= s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator/= + ( + tvec3 const & v + ) + { + this->x /= v.x; + this->y /= v.y; + this->z /= v.z; + return *this; + } + + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator++() + { + ++this->x; + ++this->y; + ++this->z; + return *this; + } + + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator--() + { + --this->x; + --this->y; + --this->z; + return *this; + } + + ////////////////////////////////////// + // Swizzle operators + + GLM_FUNC_QUALIFIER half tvec3::swizzle(comp x) const + { + return (*this)[x]; + } + + GLM_FUNC_QUALIFIER tvec2 tvec3::swizzle(comp x, comp y) const + { + return tvec2( + (*this)[x], + (*this)[y]); + } + + GLM_FUNC_QUALIFIER tvec3 tvec3::swizzle(comp x, comp y, comp z) const + { + return tvec3( + (*this)[x], + (*this)[y], + (*this)[z]); + } + + GLM_FUNC_QUALIFIER tvec4 tvec3::swizzle(comp x, comp y, comp z, comp w) const + { + return tvec4( + (*this)[x], + (*this)[y], + (*this)[z], + (*this)[w]); + } + + GLM_FUNC_QUALIFIER tref3 tvec3::swizzle(comp x, comp y, comp z) + { + return tref3( + (*this)[x], + (*this)[y], + (*this)[z]); + } + + ////////////////////////////////////// + // hvec4 + + GLM_FUNC_QUALIFIER tvec4::size_type tvec4::length() const + { + return 4; + } + + GLM_FUNC_QUALIFIER tvec4::size_type tvec4::value_size() + { + return 4; + } + + ////////////////////////////////////// + // Accesses + + GLM_FUNC_QUALIFIER half & tvec4::operator[] + ( + tvec4::size_type i + ) + { + assert(/*i >= tvec4::size_type(0) && */i < tvec4::value_size()); + + return (&x)[i]; + } + + GLM_FUNC_QUALIFIER half const & tvec4::operator[] + ( + tvec4::size_type i + ) const + { + assert(/*i >= tvec4::size_type(0) && */i < tvec4::value_size()); + + return (&x)[i]; + } + + ////////////////////////////////////// + // Implicit basic constructors + + GLM_FUNC_QUALIFIER tvec4::tvec4() : + x(half(0)), + y(half(0)), + z(half(0)), + w(half(0)) + {} + + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tvec4 const & v + ) : + x(v.x), + y(v.y), + z(v.z), + w(v.w) + {} + + ////////////////////////////////////// + // Explicit basic constructors + + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + half const & s + ) : + x(s), + y(s), + z(s), + w(s) + {} + + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + half const & s1, + half const & s2, + half const & s3, + half const & s4 + ) : + x(s1), + y(s2), + z(s3), + w(s4) + {} + + ////////////////////////////////////// + // Swizzle constructors + + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tref4 const & r + ) : + x(r.x), + y(r.y), + z(r.z), + w(r.w) + {} + + ////////////////////////////////////// + // Convertion scalar constructors + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + U const & x + ) : + x(half(x)), + y(half(x)), + z(half(x)), + w(half(x)) + {} + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + A const & x, + B const & y, + C const & z, + D const & w + ) : + x(half(x)), + y(half(y)), + z(half(z)), + w(half(w)) + {} + + ////////////////////////////////////// + // Convertion vector constructors + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tvec2 const & v, + B const & s1, + C const & s2 + ) : + x(half(v.x)), + y(half(v.y)), + z(half(s1)), + w(half(s2)) + {} + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + A const & s1, + tvec2 const & v, + C const & s2 + ) : + x(half(s1)), + y(half(v.x)), + z(half(v.y)), + w(half(s2)) + {} + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + A const & s1, + B const & s2, + tvec2 const & v + ) : + x(half(s1)), + y(half(s2)), + z(half(v.x)), + w(half(v.y)) + {} + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tvec3 const & v, + B const & s + ) : + x(half(v.x)), + y(half(v.y)), + z(half(v.z)), + w(half(s)) + {} + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + A const & s, + tvec3 const & v + ) : + x(half(s)), + y(half(v.x)), + z(half(v.y)), + w(half(v.z)) + {} + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tvec2 const & v1, + tvec2 const & v2 + ) : + x(half(v1.x)), + y(half(v1.y)), + z(half(v2.x)), + w(half(v2.y)) + {} + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tvec4 const & v + ) : + x(half(v.x)), + y(half(v.y)), + z(half(v.z)), + w(half(v.w)) + {} + + ////////////////////////////////////// + // Unary arithmetic operators + + GLM_FUNC_QUALIFIER tvec4& tvec4::operator= + ( + tvec4 const & v + ) + { + this->x = v.x; + this->y = v.y; + this->z = v.z; + this->w = v.w; + return *this; + } + + GLM_FUNC_QUALIFIER tvec4& tvec4::operator+= + ( + half const & s + ) + { + this->x += s; + this->y += s; + this->z += s; + this->w += s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec4& tvec4::operator+= + ( + tvec4 const & v + ) + { + this->x += v.x; + this->y += v.y; + this->z += v.z; + this->w += v.w; + return *this; + } + + GLM_FUNC_QUALIFIER tvec4& tvec4::operator-= + ( + half const & s + ) + { + this->x -= s; + this->y -= s; + this->z -= s; + this->w -= s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec4& tvec4::operator-= + ( + tvec4 const & v + ) + { + this->x -= v.x; + this->y -= v.y; + this->z -= v.z; + this->w -= v.w; + return *this; + } + + GLM_FUNC_QUALIFIER tvec4& tvec4::operator*= + ( + half const & s + ) + { + this->x *= s; + this->y *= s; + this->z *= s; + this->w *= s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec4& tvec4::operator*= + ( + tvec4 const & v + ) + { + this->x *= v.x; + this->y *= v.y; + this->z *= v.z; + this->w *= v.w; + return *this; + } + + GLM_FUNC_QUALIFIER tvec4& tvec4::operator/= + ( + half const & s + ) + { + this->x /= s; + this->y /= s; + this->z /= s; + this->w /= s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec4& tvec4::operator/= + ( + tvec4 const & v + ) + { + this->x /= v.x; + this->y /= v.y; + this->z /= v.z; + this->w /= v.w; + return *this; + } + + GLM_FUNC_QUALIFIER tvec4& tvec4::operator++() + { + ++this->x; + ++this->y; + ++this->z; + ++this->w; + return *this; + } + + GLM_FUNC_QUALIFIER tvec4& tvec4::operator--() + { + --this->x; + --this->y; + --this->z; + --this->w; + return *this; + } + + ////////////////////////////////////// + // Swizzle operators + + GLM_FUNC_QUALIFIER half tvec4::swizzle(comp x) const + { + return (*this)[x]; + } + + GLM_FUNC_QUALIFIER tvec2 tvec4::swizzle(comp x, comp y) const + { + return tvec2( + (*this)[x], + (*this)[y]); + } + + GLM_FUNC_QUALIFIER tvec3 tvec4::swizzle(comp x, comp y, comp z) const + { + return tvec3( + (*this)[x], + (*this)[y], + (*this)[z]); + } + + GLM_FUNC_QUALIFIER tvec4 tvec4::swizzle(comp x, comp y, comp z, comp w) const + { + return tvec4( + (*this)[x], + (*this)[y], + (*this)[z], + (*this)[w]); + } + + GLM_FUNC_QUALIFIER tref4 tvec4::swizzle(comp x, comp y, comp z, comp w) + { + return tref4( + (*this)[x], + (*this)[y], + (*this)[z], + (*this)[w]); + } + +#endif//(GLM_COMPONENT == GLM_COMPONENT_CXX98) + +}//namespace detail + + GLM_FUNC_QUALIFIER half abs(half const & x) + { + return float(x) >= float(0) ? x : -x; + } + + GLM_FUNC_QUALIFIER hvec2 abs(hvec2 const & v) + { + return hvec2( + float(v.x) >= float(0) ? v.x : -v.x, + float(v.y) >= float(0) ? v.y : -v.y); + } + + GLM_FUNC_QUALIFIER hvec3 abs(hvec3 const & v) + { + return hvec3( + float(v.x) >= float(0) ? v.x : -v.x, + float(v.y) >= float(0) ? v.y : -v.y, + float(v.z) >= float(0) ? v.z : -v.z); + } + + GLM_FUNC_QUALIFIER hvec4 abs(hvec4 const & v) + { + return hvec4( + float(v.x) >= float(0) ? v.x : -v.x, + float(v.y) >= float(0) ? v.y : -v.y, + float(v.z) >= float(0) ? v.z : -v.z, + float(v.w) >= float(0) ? v.w : -v.w); + } + +}//namespace glm diff --git a/include/gal/opengl/glm/gtc/matrix_access.hpp b/include/gal/opengl/glm/gtc/matrix_access.hpp new file mode 100644 index 0000000000..b7351b22ec --- /dev/null +++ b/include/gal/opengl/glm/gtc/matrix_access.hpp @@ -0,0 +1,87 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_matrix_access +/// @file glm/gtc/matrix_access.hpp +/// @date 2005-12-27 / 2011-05-16 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtc_matrix_access GLM_GTC_matrix_access +/// @ingroup gtc +/// +/// Defines functions to access rows or columns of a matrix easily. +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_matrix_access +#define GLM_GTC_matrix_access GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_matrix_access extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_matrix_access + /// @{ + + /// Get a specific row of a matrix. + /// @see gtc_matrix_access + template + typename genType::row_type row( + genType const & m, + int index); + + /// Set a specific row to a matrix. + /// @see gtc_matrix_access + template + genType row( + genType const & m, + int index, + typename genType::row_type const & x); + + /// Get a specific column of a matrix. + /// @see gtc_matrix_access + template + typename genType::col_type column( + genType const & m, + int index); + + /// Set a specific column to a matrix. + /// @see gtc_matrix_access + template + genType column( + genType const & m, + int index, + typename genType::col_type const & x); + + /// @} +}//namespace glm + +#include "matrix_access.inl" + +#endif//GLM_GTC_matrix_access diff --git a/include/gal/opengl/glm/gtc/matrix_access.inl b/include/gal/opengl/glm/gtc/matrix_access.inl new file mode 100644 index 0000000000..e4e5ac3871 --- /dev/null +++ b/include/gal/opengl/glm/gtc/matrix_access.inl @@ -0,0 +1,80 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_matrix_access +/// @file glm/gtc/matrix_access.inl +/// @date 2005-12-27 / 2011-06-05 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER genType row + ( + genType const & m, + int index, + typename genType::row_type const & x + ) + { + genType Result = m; + for(typename genType::size_type i = 0; i < genType::row_size(); ++i) + Result[i][index] = x[i]; + return Result; + } + + template + GLM_FUNC_QUALIFIER typename genType::row_type row + ( + genType const & m, + int index + ) + { + typename genType::row_type Result; + for(typename genType::size_type i = 0; i < genType::row_size(); ++i) + Result[i] = m[i][index]; + return Result; + } + + template + GLM_FUNC_QUALIFIER genType column + ( + genType const & m, + int index, + typename genType::col_type const & x + ) + { + genType Result = m; + Result[index] = x; + return Result; + } + + template + GLM_FUNC_QUALIFIER typename genType::col_type column + ( + genType const & m, + int index + ) + { + return m[index]; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtc/matrix_integer.hpp b/include/gal/opengl/glm/gtc/matrix_integer.hpp new file mode 100644 index 0000000000..58f8981964 --- /dev/null +++ b/include/gal/opengl/glm/gtc/matrix_integer.hpp @@ -0,0 +1,506 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_matrix_integer +/// @file glm/gtc/matrix_integer.hpp +/// @date 2011-01-20 / 2011-06-05 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtc_matrix_integer GLM_GTC_matrix_integer +/// @ingroup gtc +/// +/// Defines a number of matrices with integer types. +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_matrix_integer +#define GLM_GTC_matrix_integer GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_matrix_integer extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_matrix_integer + /// @{ + + /// High-precision signed integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 highp_imat2; + + /// High-precision signed integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 highp_imat3; + + /// High-precision signed integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 highp_imat4; + + /// High-precision signed integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 highp_imat2x2; + + /// High-precision signed integer 2x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x3 highp_imat2x3; + + /// High-precision signed integer 2x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x4 highp_imat2x4; + + /// High-precision signed integer 3x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x2 highp_imat3x2; + + /// High-precision signed integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 highp_imat3x3; + + /// High-precision signed integer 3x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x4 highp_imat3x4; + + /// High-precision signed integer 4x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x2 highp_imat4x2; + + /// High-precision signed integer 4x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x3 highp_imat4x3; + + /// High-precision signed integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 highp_imat4x4; + + + /// Medium-precision signed integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 mediump_imat2; + + /// Medium-precision signed integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 mediump_imat3; + + /// Medium-precision signed integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 mediump_imat4; + + + /// Medium-precision signed integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 mediump_imat2x2; + + /// Medium-precision signed integer 2x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x3 mediump_imat2x3; + + /// Medium-precision signed integer 2x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x4 mediump_imat2x4; + + /// Medium-precision signed integer 3x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x2 mediump_imat3x2; + + /// Medium-precision signed integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 mediump_imat3x3; + + /// Medium-precision signed integer 3x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x4 mediump_imat3x4; + + /// Medium-precision signed integer 4x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x2 mediump_imat4x2; + + /// Medium-precision signed integer 4x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x3 mediump_imat4x3; + + /// Medium-precision signed integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 mediump_imat4x4; + + + /// Low-precision signed integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 lowp_imat2; + + /// Low-precision signed integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 lowp_imat3; + + /// Low-precision signed integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 lowp_imat4; + + + /// Low-precision signed integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 lowp_imat2x2; + + /// Low-precision signed integer 2x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x3 lowp_imat2x3; + + /// Low-precision signed integer 2x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x4 lowp_imat2x4; + + /// Low-precision signed integer 3x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x2 lowp_imat3x2; + + /// Low-precision signed integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 lowp_imat3x3; + + /// Low-precision signed integer 3x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x4 lowp_imat3x4; + + /// Low-precision signed integer 4x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x2 lowp_imat4x2; + + /// Low-precision signed integer 4x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x3 lowp_imat4x3; + + /// Low-precision signed integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 lowp_imat4x4; + + + /// High-precision unsigned integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 highp_umat2; + + /// High-precision unsigned integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 highp_umat3; + + /// High-precision unsigned integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 highp_umat4; + + /// High-precision unsigned integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 highp_umat2x2; + + /// High-precision unsigned integer 2x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x3 highp_umat2x3; + + /// High-precision unsigned integer 2x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x4 highp_umat2x4; + + /// High-precision unsigned integer 3x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x2 highp_umat3x2; + + /// High-precision unsigned integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 highp_umat3x3; + + /// High-precision unsigned integer 3x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x4 highp_umat3x4; + + /// High-precision unsigned integer 4x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x2 highp_umat4x2; + + /// High-precision unsigned integer 4x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x3 highp_umat4x3; + + /// High-precision unsigned integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 highp_umat4x4; + + + /// Medium-precision unsigned integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 mediump_umat2; + + /// Medium-precision unsigned integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 mediump_umat3; + + /// Medium-precision unsigned integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 mediump_umat4; + + + /// Medium-precision unsigned integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 mediump_umat2x2; + + /// Medium-precision unsigned integer 2x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x3 mediump_umat2x3; + + /// Medium-precision unsigned integer 2x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x4 mediump_umat2x4; + + /// Medium-precision unsigned integer 3x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x2 mediump_umat3x2; + + /// Medium-precision unsigned integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 mediump_umat3x3; + + /// Medium-precision unsigned integer 3x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x4 mediump_umat3x4; + + /// Medium-precision unsigned integer 4x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x2 mediump_umat4x2; + + /// Medium-precision unsigned integer 4x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x3 mediump_umat4x3; + + /// Medium-precision unsigned integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 mediump_umat4x4; + + + /// Low-precision unsigned integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 lowp_umat2; + + /// Low-precision unsigned integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 lowp_umat3; + + /// Low-precision unsigned integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 lowp_umat4; + + + /// Low-precision unsigned integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 lowp_umat2x2; + + /// Low-precision unsigned integer 2x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x3 lowp_umat2x3; + + /// Low-precision unsigned integer 2x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x4 lowp_umat2x4; + + /// Low-precision unsigned integer 3x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x2 lowp_umat3x2; + + /// Low-precision unsigned integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 lowp_umat3x3; + + /// Low-precision unsigned integer 3x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x4 lowp_umat3x4; + + /// Low-precision unsigned integer 4x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x2 lowp_umat4x2; + + /// Low-precision unsigned integer 4x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x3 lowp_umat4x3; + + /// Low-precision unsigned integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 lowp_umat4x4; + +#if(defined(GLM_PRECISION_HIGHP_INT)) + typedef highp_imat2 imat2; + typedef highp_imat3 imat3; + typedef highp_imat4 imat4; + typedef highp_imat2x2 imat2x2; + typedef highp_imat2x3 imat2x3; + typedef highp_imat2x4 imat2x4; + typedef highp_imat3x2 imat3x2; + typedef highp_imat3x3 imat3x3; + typedef highp_imat3x4 imat3x4; + typedef highp_imat4x2 imat4x2; + typedef highp_imat4x3 imat4x3; + typedef highp_imat4x4 imat4x4; +#elif(defined(GLM_PRECISION_LOWP_INT)) + typedef lowp_imat2 imat2; + typedef lowp_imat3 imat3; + typedef lowp_imat4 imat4; + typedef lowp_imat2x2 imat2x2; + typedef lowp_imat2x3 imat2x3; + typedef lowp_imat2x4 imat2x4; + typedef lowp_imat3x2 imat3x2; + typedef lowp_imat3x3 imat3x3; + typedef lowp_imat3x4 imat3x4; + typedef lowp_imat4x2 imat4x2; + typedef lowp_imat4x3 imat4x3; + typedef lowp_imat4x4 imat4x4; +#else //if(defined(GLM_PRECISION_MEDIUMP_INT)) + + /// Signed integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat2 imat2; + + /// Signed integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat3 imat3; + + /// Signed integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat4 imat4; + + /// Signed integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat2x2 imat2x2; + + /// Signed integer 2x3 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat2x3 imat2x3; + + /// Signed integer 2x4 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat2x4 imat2x4; + + /// Signed integer 3x2 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat3x2 imat3x2; + + /// Signed integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat3x3 imat3x3; + + /// Signed integer 3x4 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat3x4 imat3x4; + + /// Signed integer 4x2 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat4x2 imat4x2; + + /// Signed integer 4x3 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat4x3 imat4x3; + + /// Signed integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat4x4 imat4x4; +#endif//GLM_PRECISION + +#if(defined(GLM_PRECISION_HIGHP_UINT)) + typedef highp_umat2 umat2; + typedef highp_umat3 umat3; + typedef highp_umat4 umat4; + typedef highp_umat2x2 umat2x2; + typedef highp_umat2x3 umat2x3; + typedef highp_umat2x4 umat2x4; + typedef highp_umat3x2 umat3x2; + typedef highp_umat3x3 umat3x3; + typedef highp_umat3x4 umat3x4; + typedef highp_umat4x2 umat4x2; + typedef highp_umat4x3 umat4x3; + typedef highp_umat4x4 umat4x4; +#elif(defined(GLM_PRECISION_LOWP_UINT)) + typedef lowp_umat2 umat2; + typedef lowp_umat3 umat3; + typedef lowp_umat4 umat4; + typedef lowp_umat2x2 umat2x2; + typedef lowp_umat2x3 umat2x3; + typedef lowp_umat2x4 umat2x4; + typedef lowp_umat3x2 umat3x2; + typedef lowp_umat3x3 umat3x3; + typedef lowp_umat3x4 umat3x4; + typedef lowp_umat4x2 umat4x2; + typedef lowp_umat4x3 umat4x3; + typedef lowp_umat4x4 umat4x4; +#else //if(defined(GLM_PRECISION_MEDIUMP_UINT)) + + /// Unsigned integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat2 umat2; + + /// Unsigned integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat3 umat3; + + /// Unsigned integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat4 umat4; + + /// Unsigned integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat2x2 umat2x2; + + /// Unsigned integer 2x3 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat2x3 umat2x3; + + /// Unsigned integer 2x4 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat2x4 umat2x4; + + /// Unsigned integer 3x2 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat3x2 umat3x2; + + /// Unsigned integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat3x3 umat3x3; + + /// Unsigned integer 3x4 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat3x4 umat3x4; + + /// Unsigned integer 4x2 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat4x2 umat4x2; + + /// Unsigned integer 4x3 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat4x3 umat4x3; + + /// Unsigned integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat4x4 umat4x4; +#endif//GLM_PRECISION + + /// @} +}//namespace glm + +#endif//GLM_GTC_matrix_integer diff --git a/include/gal/opengl/glm/gtc/matrix_inverse.hpp b/include/gal/opengl/glm/gtc/matrix_inverse.hpp new file mode 100644 index 0000000000..92b41bf5b0 --- /dev/null +++ b/include/gal/opengl/glm/gtc/matrix_inverse.hpp @@ -0,0 +1,74 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_matrix_inverse +/// @file glm/gtc/matrix_inverse.hpp +/// @date 2005-12-21 / 2011-06-05 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtc_matrix_inverse GLM_GTC_matrix_inverse +/// @ingroup gtc +/// +/// Defines additional matrix inverting functions. +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_matrix_inverse +#define GLM_GTC_matrix_inverse GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_matrix_inverse extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_matrix_inverse + /// @{ + + /// Fast matrix inverse for affine matrix. + /// + /// @param m Input matrix to invert. + /// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-precision floating point value is highly innacurate. + /// @see gtc_matrix_inverse + template + genType affineInverse(genType const & m); + + /// Compute the inverse transpose of a matrix. + /// + /// @param m Input matrix to invert transpose. + /// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-precision floating point value is highly innacurate. + /// @see gtc_matrix_inverse + template + GLM_FUNC_QUALIFIER typename genType::value_type inverseTranspose( + genType const & m); + + /// @} +}//namespace glm + +#include "matrix_inverse.inl" + +#endif//GLM_GTC_matrix_inverse diff --git a/include/gal/opengl/glm/gtc/matrix_inverse.inl b/include/gal/opengl/glm/gtc/matrix_inverse.inl new file mode 100644 index 0000000000..5f5b067084 --- /dev/null +++ b/include/gal/opengl/glm/gtc/matrix_inverse.inl @@ -0,0 +1,159 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_matrix_inverse +/// @file glm/gtc/matrix_inverse.inl +/// @date 2005-12-21 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tmat3x3 affineInverse + ( + detail::tmat3x3 const & m + ) + { + detail::tmat3x3 Result(m); + Result[2] = detail::tvec3(0, 0, 1); + Result = transpose(Result); + detail::tvec3 Translation = Result * detail::tvec3(-detail::tvec2(m[2]), m[2][2]); + Result[2] = Translation; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 affineInverse + ( + detail::tmat4x4 const & m + ) + { + detail::tmat4x4 Result(m); + Result[3] = detail::tvec4(0, 0, 0, 1); + Result = transpose(Result); + detail::tvec4 Translation = Result * detail::tvec4(-detail::tvec3(m[3]), m[3][3]); + Result[3] = Translation; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x2 inverseTranspose + ( + detail::tmat2x2 const & m + ) + { + valType Determinant = m[0][0] * m[1][1] - m[1][0] * m[0][1]; + + detail::tmat2x2 Inverse( + + m[1][1] / Determinant, + - m[0][1] / Determinant, + - m[1][0] / Determinant, + + m[0][0] / Determinant); + + return Inverse; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 inverseTranspose + ( + detail::tmat3x3 const & m + ) + { + valType Determinant = + + m[0][0] * (m[1][1] * m[2][2] - m[1][2] * m[2][1]) + - m[0][1] * (m[1][0] * m[2][2] - m[1][2] * m[2][0]) + + m[0][2] * (m[1][0] * m[2][1] - m[1][1] * m[2][0]); + + detail::tmat3x3 Inverse; + Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]); + Inverse[0][1] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]); + Inverse[0][2] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]); + Inverse[1][0] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]); + Inverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]); + Inverse[1][2] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]); + Inverse[2][0] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]); + Inverse[2][1] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]); + Inverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]); + Inverse /= Determinant; + + return Inverse; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 inverseTranspose + ( + detail::tmat4x4 const & m + ) + { + valType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3]; + valType SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3]; + valType SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2]; + valType SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3]; + valType SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2]; + valType SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1]; + valType SubFactor06 = m[1][2] * m[3][3] - m[3][2] * m[1][3]; + valType SubFactor07 = m[1][1] * m[3][3] - m[3][1] * m[1][3]; + valType SubFactor08 = m[1][1] * m[3][2] - m[3][1] * m[1][2]; + valType SubFactor09 = m[1][0] * m[3][3] - m[3][0] * m[1][3]; + valType SubFactor10 = m[1][0] * m[3][2] - m[3][0] * m[1][2]; + valType SubFactor11 = m[1][1] * m[3][3] - m[3][1] * m[1][3]; + valType SubFactor12 = m[1][0] * m[3][1] - m[3][0] * m[1][1]; + valType SubFactor13 = m[1][2] * m[2][3] - m[2][2] * m[1][3]; + valType SubFactor14 = m[1][1] * m[2][3] - m[2][1] * m[1][3]; + valType SubFactor15 = m[1][1] * m[2][2] - m[2][1] * m[1][2]; + valType SubFactor16 = m[1][0] * m[2][3] - m[2][0] * m[1][3]; + valType SubFactor17 = m[1][0] * m[2][2] - m[2][0] * m[1][2]; + valType SubFactor18 = m[1][0] * m[2][1] - m[2][0] * m[1][1]; + + detail::tmat4x4 Inverse; + Inverse[0][0] = + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02); + Inverse[0][1] = - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04); + Inverse[0][2] = + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05); + Inverse[0][3] = - (m[1][0] * SubFactor02 - m[1][1] * SubFactor04 + m[1][2] * SubFactor05); + + Inverse[1][0] = - (m[0][1] * SubFactor00 - m[0][2] * SubFactor01 + m[0][3] * SubFactor02); + Inverse[1][1] = + (m[0][0] * SubFactor00 - m[0][2] * SubFactor03 + m[0][3] * SubFactor04); + Inverse[1][2] = - (m[0][0] * SubFactor01 - m[0][1] * SubFactor03 + m[0][3] * SubFactor05); + Inverse[1][3] = + (m[0][0] * SubFactor02 - m[0][1] * SubFactor04 + m[0][2] * SubFactor05); + + Inverse[2][0] = + (m[0][1] * SubFactor06 - m[0][2] * SubFactor07 + m[0][3] * SubFactor08); + Inverse[2][1] = - (m[0][0] * SubFactor06 - m[0][2] * SubFactor09 + m[0][3] * SubFactor10); + Inverse[2][2] = + (m[0][0] * SubFactor11 - m[0][1] * SubFactor09 + m[0][3] * SubFactor12); + Inverse[2][3] = - (m[0][0] * SubFactor08 - m[0][1] * SubFactor10 + m[0][2] * SubFactor12); + + Inverse[3][0] = - (m[0][1] * SubFactor13 - m[0][2] * SubFactor14 + m[0][3] * SubFactor15); + Inverse[3][1] = + (m[0][0] * SubFactor13 - m[0][2] * SubFactor16 + m[0][3] * SubFactor17); + Inverse[3][2] = - (m[0][0] * SubFactor14 - m[0][1] * SubFactor16 + m[0][3] * SubFactor18); + Inverse[3][3] = + (m[0][0] * SubFactor15 - m[0][1] * SubFactor17 + m[0][2] * SubFactor18); + + valType Determinant = + + m[0][0] * Inverse[0][0] + + m[0][1] * Inverse[0][1] + + m[0][2] * Inverse[0][2] + + m[0][3] * Inverse[0][3]; + + Inverse /= Determinant; + + return Inverse; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtc/matrix_transform.hpp b/include/gal/opengl/glm/gtc/matrix_transform.hpp new file mode 100644 index 0000000000..a8f894adf2 --- /dev/null +++ b/include/gal/opengl/glm/gtc/matrix_transform.hpp @@ -0,0 +1,291 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_matrix_transform +/// @file glm/gtc/matrix_transform.hpp +/// @date 2009-04-29 / 2011-05-16 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_transform +/// @see gtx_transform2 +/// +/// @defgroup gtc_matrix_transform GLM_GTC_matrix_transform +/// @ingroup gtc +/// +/// @brief Defines functions that generate common transformation matrices. +/// +/// The matrices generated by this extension use standard OpenGL fixed-function +/// conventions. For example, the lookAt function generates a transform from world +/// space into the specific eye space that the projective matrix functions +/// (perspective, ortho, etc) are designed to expect. The OpenGL compatibility +/// specifications defines the particular layout of this eye space. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_matrix_transform +#define GLM_GTC_matrix_transform GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_matrix_transform extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_matrix_transform + /// @{ + + /// Builds a translation 4 * 4 matrix created from a vector of 3 components. + /// + /// @param m Input matrix multiplied by this translation matrix. + /// @param v Coordinates of a translation vector. + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @code + /// #include + /// #include + /// ... + /// glm::mat4 m = glm::translate(glm::mat4(1.0f), glm::vec3(1.0f)); + /// // m[0][0] == 1.0f, m[0][1] == 0.0f, m[0][2] == 0.0f, m[0][3] == 0.0f + /// // m[1][0] == 0.0f, m[1][1] == 1.0f, m[1][2] == 0.0f, m[1][3] == 0.0f + /// // m[2][0] == 0.0f, m[2][1] == 0.0f, m[2][2] == 1.0f, m[2][3] == 0.0f + /// // m[3][0] == 1.0f, m[3][1] == 1.0f, m[3][2] == 1.0f, m[3][3] == 1.0f + /// @endcode + /// @see gtc_matrix_transform + /// @see gtx_transform + /// @see - translate(T x, T y, T z) + /// @see - translate(detail::tmat4x4 const & m, T x, T y, T z) + /// @see - translate(detail::tvec3 const & v) + template + detail::tmat4x4 translate( + detail::tmat4x4 const & m, + detail::tvec3 const & v); + + /// Builds a rotation 4 * 4 matrix created from an axis vector and an angle. + /// + /// @param m Input matrix multiplied by this rotation matrix. + /// @param angle Rotation angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. + /// @param axis Rotation axis, recommanded to be normalized. + /// @tparam T Value type used to build the matrix. Supported: half, float or double. + /// @see gtc_matrix_transform + /// @see gtx_transform + /// @see - rotate(T angle, T x, T y, T z) + /// @see - rotate(detail::tmat4x4 const & m, T angle, T x, T y, T z) + /// @see - rotate(T angle, detail::tvec3 const & v) + template + detail::tmat4x4 rotate( + detail::tmat4x4 const & m, + T const & angle, + detail::tvec3 const & axis); + + /// Builds a scale 4 * 4 matrix created from 3 scalars. + /// + /// @param m Input matrix multiplied by this scale matrix. + /// @param v Ratio of scaling for each axis. + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @see gtc_matrix_transform + /// @see gtx_transform + /// @see - scale(T x, T y, T z) scale(T const & x, T const & y, T const & z) + /// @see - scale(detail::tmat4x4 const & m, T x, T y, T z) + /// @see - scale(detail::tvec3 const & v) + template + detail::tmat4x4 scale( + detail::tmat4x4 const & m, + detail::tvec3 const & v); + + /// Creates a matrix for an orthographic parallel viewing volume. + /// + /// @param left + /// @param right + /// @param bottom + /// @param top + /// @param zNear + /// @param zFar + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @see gtc_matrix_transform + /// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top) + template + detail::tmat4x4 ortho( + T const & left, + T const & right, + T const & bottom, + T const & top, + T const & zNear, + T const & zFar); + + /// Creates a matrix for projecting two-dimensional coordinates onto the screen. + /// + /// @param left + /// @param right + /// @param bottom + /// @param top + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @see gtc_matrix_transform + /// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar) + template + detail::tmat4x4 ortho( + T const & left, + T const & right, + T const & bottom, + T const & top); + + /// Creates a frustum matrix. + /// + /// @param left + /// @param right + /// @param bottom + /// @param top + /// @param near + /// @param far + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @see gtc_matrix_transform + template + detail::tmat4x4 frustum( + T const & left, + T const & right, + T const & bottom, + T const & top, + T const & near, + T const & far); + + /// Creates a matrix for a symetric perspective-view frustum. + /// + /// @param fovy Expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. + /// @param aspect + /// @param near + /// @param far + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @see gtc_matrix_transform + template + detail::tmat4x4 perspective( + T const & fovy, + T const & aspect, + T const & near, + T const & far); + + /// Builds a perspective projection matrix based on a field of view. + /// + /// @param fov Expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. + /// @param width + /// @param height + /// @param near + /// @param far + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @see gtc_matrix_transform + template + detail::tmat4x4 perspectiveFov( + valType const & fov, + valType const & width, + valType const & height, + valType const & near, + valType const & far); + + /// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite. + /// + /// @param fovy Expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. + /// @param aspect + /// @param near + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @see gtc_matrix_transform + template + detail::tmat4x4 infinitePerspective( + T fovy, T aspect, T near); + + /// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping. + /// + /// @param fovy Expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. + /// @param aspect + /// @param near + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @see gtc_matrix_transform + template + detail::tmat4x4 tweakedInfinitePerspective( + T fovy, T aspect, T near); + + /// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates. + /// + /// @param obj + /// @param model + /// @param proj + /// @param viewport + /// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double. + /// @tparam U Currently supported: Floating-point types and integer types. + /// @see gtc_matrix_transform + template + detail::tvec3 project( + detail::tvec3 const & obj, + detail::tmat4x4 const & model, + detail::tmat4x4 const & proj, + detail::tvec4 const & viewport); + + /// Map the specified window coordinates (win.x, win.y, win.z) into object coordinates. + /// + /// @param win + /// @param model + /// @param proj + /// @param viewport + /// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double. + /// @tparam U Currently supported: Floating-point types and integer types. + /// @see gtc_matrix_transform + template + detail::tvec3 unProject( + detail::tvec3 const & win, + detail::tmat4x4 const & model, + detail::tmat4x4 const & proj, + detail::tvec4 const & viewport); + + /// Define a picking region + /// + /// @param center + /// @param delta + /// @param viewport + /// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double. + /// @tparam U Currently supported: Floating-point types and integer types. + /// @see gtc_matrix_transform + template + detail::tmat4x4 pickMatrix( + detail::tvec2 const & center, + detail::tvec2 const & delta, + detail::tvec4 const & viewport); + + /// Build a look at view matrix. + /// + /// @param eye Position of the camera + /// @param center Position where the camera is looking at + /// @param up Normalized up vector, how the camera is oriented. Typically (0, 0, 1) + /// @see gtc_matrix_transform + /// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) + template + detail::tmat4x4 lookAt( + detail::tvec3 const & eye, + detail::tvec3 const & center, + detail::tvec3 const & up); + + /// @} +}//namespace glm + +#include "matrix_transform.inl" + +#endif//GLM_GTC_matrix_transform diff --git a/include/gal/opengl/glm/gtc/matrix_transform.inl b/include/gal/opengl/glm/gtc/matrix_transform.inl new file mode 100644 index 0000000000..9fdb583736 --- /dev/null +++ b/include/gal/opengl/glm/gtc/matrix_transform.inl @@ -0,0 +1,430 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_matrix_transform +/// @file glm/gtc/matrix_transform.inl +/// @date 2009-04-29 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tmat4x4 translate + ( + detail::tmat4x4 const & m, + detail::tvec3 const & v + ) + { + detail::tmat4x4 Result(m); + Result[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 rotate + ( + detail::tmat4x4 const & m, + T const & angle, + detail::tvec3 const & v + ) + { +#ifdef GLM_FORCE_RADIANS + T a = angle; +#else + T a = radians(angle); +#endif + T c = cos(a); + T s = sin(a); + + detail::tvec3 axis = normalize(v); + + detail::tvec3 temp = (T(1) - c) * axis; + + detail::tmat4x4 Rotate(detail::tmat4x4::null); + Rotate[0][0] = c + temp[0] * axis[0]; + Rotate[0][1] = 0 + temp[0] * axis[1] + s * axis[2]; + Rotate[0][2] = 0 + temp[0] * axis[2] - s * axis[1]; + + Rotate[1][0] = 0 + temp[1] * axis[0] - s * axis[2]; + Rotate[1][1] = c + temp[1] * axis[1]; + Rotate[1][2] = 0 + temp[1] * axis[2] + s * axis[0]; + + Rotate[2][0] = 0 + temp[2] * axis[0] + s * axis[1]; + Rotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0]; + Rotate[2][2] = c + temp[2] * axis[2]; + + detail::tmat4x4 Result(detail::tmat4x4::null); + Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2]; + Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2]; + Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2]; + Result[3] = m[3]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 scale + ( + detail::tmat4x4 const & m, + detail::tvec3 const & v + ) + { + detail::tmat4x4 Result(detail::tmat4x4::null); + Result[0] = m[0] * v[0]; + Result[1] = m[1] * v[1]; + Result[2] = m[2] * v[2]; + Result[3] = m[3]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 translate_slow + ( + detail::tmat4x4 const & m, + detail::tvec3 const & v + ) + { + detail::tmat4x4 Result(T(1)); + Result[3] = detail::tvec4(v, T(1)); + return m * Result; + + //detail::tmat4x4 Result(m); + Result[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3]; + //Result[3][0] = m[0][0] * v[0] + m[1][0] * v[1] + m[2][0] * v[2] + m[3][0]; + //Result[3][1] = m[0][1] * v[0] + m[1][1] * v[1] + m[2][1] * v[2] + m[3][1]; + //Result[3][2] = m[0][2] * v[0] + m[1][2] * v[1] + m[2][2] * v[2] + m[3][2]; + //Result[3][3] = m[0][3] * v[0] + m[1][3] * v[1] + m[2][3] * v[2] + m[3][3]; + //return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 rotate_slow + ( + detail::tmat4x4 const & m, + T const & angle, + detail::tvec3 const & v + ) + { +#ifdef GLM_FORCE_RADIANS + T const a = angle; +#else + T const a = radians(angle); +#endif + T c = cos(a); + T s = sin(a); + detail::tmat4x4 Result; + + detail::tvec3 axis = normalize(v); + + Result[0][0] = c + (1 - c) * axis.x * axis.x; + Result[0][1] = (1 - c) * axis.x * axis.y + s * axis.z; + Result[0][2] = (1 - c) * axis.x * axis.z - s * axis.y; + Result[0][3] = 0; + + Result[1][0] = (1 - c) * axis.y * axis.x - s * axis.z; + Result[1][1] = c + (1 - c) * axis.y * axis.y; + Result[1][2] = (1 - c) * axis.y * axis.z + s * axis.x; + Result[1][3] = 0; + + Result[2][0] = (1 - c) * axis.z * axis.x + s * axis.y; + Result[2][1] = (1 - c) * axis.z * axis.y - s * axis.x; + Result[2][2] = c + (1 - c) * axis.z * axis.z; + Result[2][3] = 0; + + Result[3] = detail::tvec4(0, 0, 0, 1); + return m * Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 scale_slow + ( + detail::tmat4x4 const & m, + detail::tvec3 const & v + ) + { + detail::tmat4x4 Result(T(1)); + Result[0][0] = v.x; + Result[1][1] = v.y; + Result[2][2] = v.z; + return m * Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 ortho + ( + valType const & left, + valType const & right, + valType const & bottom, + valType const & top, + valType const & zNear, + valType const & zFar + ) + { + detail::tmat4x4 Result(1); + Result[0][0] = valType(2) / (right - left); + Result[1][1] = valType(2) / (top - bottom); + Result[2][2] = - valType(2) / (zFar - zNear); + Result[3][0] = - (right + left) / (right - left); + Result[3][1] = - (top + bottom) / (top - bottom); + Result[3][2] = - (zFar + zNear) / (zFar - zNear); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 ortho( + valType const & left, + valType const & right, + valType const & bottom, + valType const & top) + { + detail::tmat4x4 Result(1); + Result[0][0] = valType(2) / (right - left); + Result[1][1] = valType(2) / (top - bottom); + Result[2][2] = - valType(1); + Result[3][0] = - (right + left) / (right - left); + Result[3][1] = - (top + bottom) / (top - bottom); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 frustum + ( + valType const & left, + valType const & right, + valType const & bottom, + valType const & top, + valType const & nearVal, + valType const & farVal + ) + { + detail::tmat4x4 Result(0); + Result[0][0] = (valType(2) * nearVal) / (right - left); + Result[1][1] = (valType(2) * nearVal) / (top - bottom); + Result[2][0] = (right + left) / (right - left); + Result[2][1] = (top + bottom) / (top - bottom); + Result[2][2] = -(farVal + nearVal) / (farVal - nearVal); + Result[2][3] = valType(-1); + Result[3][2] = -(valType(2) * farVal * nearVal) / (farVal - nearVal); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 perspective + ( + valType const & fovy, + valType const & aspect, + valType const & zNear, + valType const & zFar + ) + { + valType range = tan(radians(fovy / valType(2))) * zNear; + valType left = -range * aspect; + valType right = range * aspect; + valType bottom = -range; + valType top = range; + + detail::tmat4x4 Result(valType(0)); + Result[0][0] = (valType(2) * zNear) / (right - left); + Result[1][1] = (valType(2) * zNear) / (top - bottom); + Result[2][2] = - (zFar + zNear) / (zFar - zNear); + Result[2][3] = - valType(1); + Result[3][2] = - (valType(2) * zFar * zNear) / (zFar - zNear); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 perspectiveFov + ( + valType const & fov, + valType const & width, + valType const & height, + valType const & zNear, + valType const & zFar + ) + { +#ifdef GLM_FORCE_RADIANS + valType rad = fov; +#else + valType rad = glm::radians(fov); +#endif + valType h = glm::cos(valType(0.5) * rad) / glm::sin(valType(0.5) * rad); + valType w = h * height / width; ///todo max(width , Height) / min(width , Height)? + + detail::tmat4x4 Result(valType(0)); + Result[0][0] = w; + Result[1][1] = h; + Result[2][2] = - (zFar + zNear) / (zFar - zNear); + Result[2][3] = - valType(1); + Result[3][2] = - (valType(2) * zFar * zNear) / (zFar - zNear); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 infinitePerspective + ( + T fovy, + T aspect, + T zNear + ) + { +#ifdef GLM_FORCE_RADIANS + T const range = tan(fovy / T(2)) * zNear; +#else + T const range = tan(radians(fovy / T(2))) * zNear; +#endif + T left = -range * aspect; + T right = range * aspect; + T bottom = -range; + T top = range; + + detail::tmat4x4 Result(T(0)); + Result[0][0] = (T(2) * zNear) / (right - left); + Result[1][1] = (T(2) * zNear) / (top - bottom); + Result[2][2] = - T(1); + Result[2][3] = - T(1); + Result[3][2] = - T(2) * zNear; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 tweakedInfinitePerspective + ( + T fovy, + T aspect, + T zNear + ) + { +#ifdef GLM_FORCE_RADIANS + T range = tan(fovy / T(2)) * zNear; +#else + T range = tan(radians(fovy / T(2))) * zNear; +#endif + T left = -range * aspect; + T right = range * aspect; + T bottom = -range; + T top = range; + + detail::tmat4x4 Result(T(0)); + Result[0][0] = (T(2) * zNear) / (right - left); + Result[1][1] = (T(2) * zNear) / (top - bottom); + Result[2][2] = T(0.0001) - T(1); + Result[2][3] = T(-1); + Result[3][2] = - (T(0.0001) - T(2)) * zNear; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 project + ( + detail::tvec3 const & obj, + detail::tmat4x4 const & model, + detail::tmat4x4 const & proj, + detail::tvec4 const & viewport + ) + { + detail::tvec4 tmp = detail::tvec4(obj, T(1)); + tmp = model * tmp; + tmp = proj * tmp; + + tmp /= tmp.w; + tmp = tmp * T(0.5) + T(0.5); + tmp[0] = tmp[0] * T(viewport[2]) + T(viewport[0]); + tmp[1] = tmp[1] * T(viewport[3]) + T(viewport[1]); + + return detail::tvec3(tmp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 unProject + ( + detail::tvec3 const & win, + detail::tmat4x4 const & model, + detail::tmat4x4 const & proj, + detail::tvec4 const & viewport + ) + { + detail::tmat4x4 inverse = glm::inverse(proj * model); + + detail::tvec4 tmp = detail::tvec4(win, T(1)); + tmp.x = (tmp.x - T(viewport[0])) / T(viewport[2]); + tmp.y = (tmp.y - T(viewport[1])) / T(viewport[3]); + tmp = tmp * T(2) - T(1); + + detail::tvec4 obj = inverse * tmp; + obj /= obj.w; + + return detail::tvec3(obj); + } + + template + detail::tmat4x4 pickMatrix + ( + detail::tvec2 const & center, + detail::tvec2 const & delta, + detail::tvec4 const & viewport + ) + { + assert(delta.x > T(0) && delta.y > T(0)); + detail::tmat4x4 Result(1.0f); + + if(!(delta.x > T(0) && delta.y > T(0))) + return Result; // Error + + detail::tvec3 Temp( + (T(viewport[2]) - T(2) * (center.x - T(viewport[0]))) / delta.x, + (T(viewport[3]) - T(2) * (center.y - T(viewport[1]))) / delta.y, + T(0)); + + // Translate and scale the picked region to the entire window + Result = translate(Result, Temp); + return scale(Result, detail::tvec3(T(viewport[2]) / delta.x, T(viewport[3]) / delta.y, T(1))); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 lookAt + ( + detail::tvec3 const & eye, + detail::tvec3 const & center, + detail::tvec3 const & up + ) + { + detail::tvec3 f = normalize(center - eye); + detail::tvec3 u = normalize(up); + detail::tvec3 s = normalize(cross(f, u)); + u = cross(s, f); + + detail::tmat4x4 Result(1); + Result[0][0] = s.x; + Result[1][0] = s.y; + Result[2][0] = s.z; + Result[0][1] = u.x; + Result[1][1] = u.y; + Result[2][1] = u.z; + Result[0][2] =-f.x; + Result[1][2] =-f.y; + Result[2][2] =-f.z; + Result[3][0] =-dot(s, eye); + Result[3][1] =-dot(u, eye); + Result[3][2] = dot(f, eye); + return Result; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtc/noise.hpp b/include/gal/opengl/glm/gtc/noise.hpp new file mode 100644 index 0000000000..4aca0704f1 --- /dev/null +++ b/include/gal/opengl/glm/gtc/noise.hpp @@ -0,0 +1,80 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_noise +/// @file glm/gtc/noise.hpp +/// @date 2011-04-21 / 2011-09-27 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtc_noise GLM_GTC_noise +/// @ingroup gtc +/// +/// Defines 2D, 3D and 4D procedural noise functions +/// Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise": +/// https://github.com/ashima/webgl-noise +/// Following Stefan Gustavson's paper "Simplex noise demystified": +/// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_noise +#define GLM_GTC_noise GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_noise extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_noise + /// @{ + + /// Classic perlin noise. + /// @see gtc_noise + template class vecType> + T perlin( + vecType const & p); + + /// Periodic perlin noise. + /// @see gtc_noise + template class vecType> + T perlin( + vecType const & p, + vecType const & rep); + + /// Simplex noise. + /// @see gtc_noise + template class vecType> + T simplex( + vecType const & p); + + /// @} +}//namespace glm + +#include "noise.inl" + +#endif//GLM_GTC_noise diff --git a/include/gal/opengl/glm/gtc/noise.inl b/include/gal/opengl/glm/gtc/noise.inl new file mode 100644 index 0000000000..57575dc814 --- /dev/null +++ b/include/gal/opengl/glm/gtc/noise.inl @@ -0,0 +1,867 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_noise +/// @file glm/gtc/noise.inl +/// @date 2011-04-21 / 2012-04-07 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// +// Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise": +// https://github.com/ashima/webgl-noise +// Following Stefan Gustavson's paper "Simplex noise demystified": +// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER T mod289(T const & x) + { + return x - floor(x * T(1.0 / 289.0)) * T(289.0); + } + + template + GLM_FUNC_QUALIFIER T permute(T const & x) + { + return mod289(((x * T(34)) + T(1)) * x); + } + + template class vecType> + GLM_FUNC_QUALIFIER vecType permute(vecType const & x) + { + return mod289(((x * T(34)) + T(1)) * x); + } + + template + GLM_FUNC_QUALIFIER T taylorInvSqrt(T const & r) + { + return T(1.79284291400159) - T(0.85373472095314) * r; + } + + template class vecType> + GLM_FUNC_QUALIFIER vecType taylorInvSqrt(vecType const & r) + { + return T(1.79284291400159) - T(0.85373472095314) * r; + } + + template class vecType> + GLM_FUNC_QUALIFIER vecType fade(vecType const & t) + { + return t * t * t * (t * (t * T(6) - T(15)) + T(10)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 grad4(T const & j, detail::tvec4 const & ip) + { + detail::tvec3 pXYZ = floor(fract(detail::tvec3(j) * detail::tvec3(ip)) * T(7)) * ip[2] - T(1); + T pW = T(1.5) - dot(abs(pXYZ), detail::tvec3(1)); + detail::tvec4 s = detail::tvec4(lessThan(detail::tvec4(pXYZ, pW), detail::tvec4(0.0))); + pXYZ = pXYZ + (detail::tvec3(s) * T(2) - T(1)) * s.w; + return detail::tvec4(pXYZ, pW); + } + + // Classic Perlin noise + template + GLM_FUNC_QUALIFIER T perlin(detail::tvec2 const & P) + { + detail::tvec4 Pi = glm::floor(detail::tvec4(P.x, P.y, P.x, P.y)) + detail::tvec4(0.0, 0.0, 1.0, 1.0); + detail::tvec4 Pf = glm::fract(detail::tvec4(P.x, P.y, P.x, P.y)) - detail::tvec4(0.0, 0.0, 1.0, 1.0); + Pi = mod(Pi, T(289)); // To avoid truncation effects in permutation + detail::tvec4 ix(Pi.x, Pi.z, Pi.x, Pi.z); + detail::tvec4 iy(Pi.y, Pi.y, Pi.w, Pi.w); + detail::tvec4 fx(Pf.x, Pf.z, Pf.x, Pf.z); + detail::tvec4 fy(Pf.y, Pf.y, Pf.w, Pf.w); + + detail::tvec4 i = glm::permute(glm::permute(ix) + iy); + + detail::tvec4 gx = T(2) * glm::fract(i / T(41)) - T(1); + detail::tvec4 gy = glm::abs(gx) - T(0.5); + detail::tvec4 tx = glm::floor(gx + T(0.5)); + gx = gx - tx; + + detail::tvec2 g00(gx.x, gy.x); + detail::tvec2 g10(gx.y, gy.y); + detail::tvec2 g01(gx.z, gy.z); + detail::tvec2 g11(gx.w, gy.w); + + detail::tvec4 norm = taylorInvSqrt(detail::tvec4(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11))); + g00 *= norm.x; + g01 *= norm.y; + g10 *= norm.z; + g11 *= norm.w; + + T n00 = dot(g00, detail::tvec2(fx.x, fy.x)); + T n10 = dot(g10, detail::tvec2(fx.y, fy.y)); + T n01 = dot(g01, detail::tvec2(fx.z, fy.z)); + T n11 = dot(g11, detail::tvec2(fx.w, fy.w)); + + detail::tvec2 fade_xy = fade(detail::tvec2(Pf.x, Pf.y)); + detail::tvec2 n_x = mix(detail::tvec2(n00, n01), detail::tvec2(n10, n11), fade_xy.x); + T n_xy = mix(n_x.x, n_x.y, fade_xy.y); + return T(2.3) * n_xy; + } + + // Classic Perlin noise + template + GLM_FUNC_QUALIFIER T perlin(detail::tvec3 const & P) + { + detail::tvec3 Pi0 = floor(P); // Integer part for indexing + detail::tvec3 Pi1 = Pi0 + T(1); // Integer part + 1 + Pi0 = mod289(Pi0); + Pi1 = mod289(Pi1); + detail::tvec3 Pf0 = fract(P); // Fractional part for interpolation + detail::tvec3 Pf1 = Pf0 - T(1); // Fractional part - 1.0 + detail::tvec4 ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x); + detail::tvec4 iy = detail::tvec4(detail::tvec2(Pi0.y), detail::tvec2(Pi1.y)); + detail::tvec4 iz0(Pi0.z); + detail::tvec4 iz1(Pi1.z); + + detail::tvec4 ixy = permute(permute(ix) + iy); + detail::tvec4 ixy0 = permute(ixy + iz0); + detail::tvec4 ixy1 = permute(ixy + iz1); + + detail::tvec4 gx0 = ixy0 * T(1.0 / 7.0); + detail::tvec4 gy0 = fract(floor(gx0) * T(1.0 / 7.0)) - T(0.5); + gx0 = fract(gx0); + detail::tvec4 gz0 = detail::tvec4(0.5) - abs(gx0) - abs(gy0); + detail::tvec4 sz0 = step(gz0, detail::tvec4(0.0)); + gx0 -= sz0 * (step(T(0), gx0) - T(0.5)); + gy0 -= sz0 * (step(T(0), gy0) - T(0.5)); + + detail::tvec4 gx1 = ixy1 * T(1.0 / 7.0); + detail::tvec4 gy1 = fract(floor(gx1) * T(1.0 / 7.0)) - T(0.5); + gx1 = fract(gx1); + detail::tvec4 gz1 = detail::tvec4(0.5) - abs(gx1) - abs(gy1); + detail::tvec4 sz1 = step(gz1, detail::tvec4(0.0)); + gx1 -= sz1 * (step(T(0), gx1) - T(0.5)); + gy1 -= sz1 * (step(T(0), gy1) - T(0.5)); + + detail::tvec3 g000(gx0.x, gy0.x, gz0.x); + detail::tvec3 g100(gx0.y, gy0.y, gz0.y); + detail::tvec3 g010(gx0.z, gy0.z, gz0.z); + detail::tvec3 g110(gx0.w, gy0.w, gz0.w); + detail::tvec3 g001(gx1.x, gy1.x, gz1.x); + detail::tvec3 g101(gx1.y, gy1.y, gz1.y); + detail::tvec3 g011(gx1.z, gy1.z, gz1.z); + detail::tvec3 g111(gx1.w, gy1.w, gz1.w); + + detail::tvec4 norm0 = taylorInvSqrt(detail::tvec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110))); + g000 *= norm0.x; + g010 *= norm0.y; + g100 *= norm0.z; + g110 *= norm0.w; + detail::tvec4 norm1 = taylorInvSqrt(detail::tvec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111))); + g001 *= norm1.x; + g011 *= norm1.y; + g101 *= norm1.z; + g111 *= norm1.w; + + T n000 = dot(g000, Pf0); + T n100 = dot(g100, detail::tvec3(Pf1.x, Pf0.y, Pf0.z)); + T n010 = dot(g010, detail::tvec3(Pf0.x, Pf1.y, Pf0.z)); + T n110 = dot(g110, detail::tvec3(Pf1.x, Pf1.y, Pf0.z)); + T n001 = dot(g001, detail::tvec3(Pf0.x, Pf0.y, Pf1.z)); + T n101 = dot(g101, detail::tvec3(Pf1.x, Pf0.y, Pf1.z)); + T n011 = dot(g011, detail::tvec3(Pf0.x, Pf1.y, Pf1.z)); + T n111 = dot(g111, Pf1); + + detail::tvec3 fade_xyz = fade(Pf0); + detail::tvec4 n_z = mix(detail::tvec4(n000, n100, n010, n110), detail::tvec4(n001, n101, n011, n111), fade_xyz.z); + detail::tvec2 n_yz = mix(detail::tvec2(n_z.x, n_z.y), detail::tvec2(n_z.z, n_z.w), fade_xyz.y); + T n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); + return T(2.2) * n_xyz; + } + /* + // Classic Perlin noise + template + GLM_FUNC_QUALIFIER T perlin(detail::tvec3 const & P) + { + detail::tvec3 Pi0 = floor(P); // Integer part for indexing + detail::tvec3 Pi1 = Pi0 + T(1); // Integer part + 1 + Pi0 = mod(Pi0, T(289)); + Pi1 = mod(Pi1, T(289)); + detail::tvec3 Pf0 = fract(P); // Fractional part for interpolation + detail::tvec3 Pf1 = Pf0 - T(1); // Fractional part - 1.0 + detail::tvec4 ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x); + detail::tvec4 iy(Pi0.y, Pi0.y, Pi1.y, Pi1.y); + detail::tvec4 iz0(Pi0.z); + detail::tvec4 iz1(Pi1.z); + + detail::tvec4 ixy = permute(permute(ix) + iy); + detail::tvec4 ixy0 = permute(ixy + iz0); + detail::tvec4 ixy1 = permute(ixy + iz1); + + detail::tvec4 gx0 = ixy0 / T(7); + detail::tvec4 gy0 = fract(floor(gx0) / T(7)) - T(0.5); + gx0 = fract(gx0); + detail::tvec4 gz0 = detail::tvec4(0.5) - abs(gx0) - abs(gy0); + detail::tvec4 sz0 = step(gz0, detail::tvec4(0.0)); + gx0 -= sz0 * (step(0.0, gx0) - T(0.5)); + gy0 -= sz0 * (step(0.0, gy0) - T(0.5)); + + detail::tvec4 gx1 = ixy1 / T(7); + detail::tvec4 gy1 = fract(floor(gx1) / T(7)) - T(0.5); + gx1 = fract(gx1); + detail::tvec4 gz1 = detail::tvec4(0.5) - abs(gx1) - abs(gy1); + detail::tvec4 sz1 = step(gz1, detail::tvec4(0.0)); + gx1 -= sz1 * (step(T(0), gx1) - T(0.5)); + gy1 -= sz1 * (step(T(0), gy1) - T(0.5)); + + detail::tvec3 g000(gx0.x, gy0.x, gz0.x); + detail::tvec3 g100(gx0.y, gy0.y, gz0.y); + detail::tvec3 g010(gx0.z, gy0.z, gz0.z); + detail::tvec3 g110(gx0.w, gy0.w, gz0.w); + detail::tvec3 g001(gx1.x, gy1.x, gz1.x); + detail::tvec3 g101(gx1.y, gy1.y, gz1.y); + detail::tvec3 g011(gx1.z, gy1.z, gz1.z); + detail::tvec3 g111(gx1.w, gy1.w, gz1.w); + + detail::tvec4 norm0 = taylorInvSqrt(detail::tvec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110))); + g000 *= norm0.x; + g010 *= norm0.y; + g100 *= norm0.z; + g110 *= norm0.w; + detail::tvec4 norm1 = taylorInvSqrt(detail::tvec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111))); + g001 *= norm1.x; + g011 *= norm1.y; + g101 *= norm1.z; + g111 *= norm1.w; + + T n000 = dot(g000, Pf0); + T n100 = dot(g100, detail::tvec3(Pf1.x, Pf0.y, Pf0.z)); + T n010 = dot(g010, detail::tvec3(Pf0.x, Pf1.y, Pf0.z)); + T n110 = dot(g110, detail::tvec3(Pf1.x, Pf1.y, Pf0.z)); + T n001 = dot(g001, detail::tvec3(Pf0.x, Pf0.y, Pf1.z)); + T n101 = dot(g101, detail::tvec3(Pf1.x, Pf0.y, Pf1.z)); + T n011 = dot(g011, detail::tvec3(Pf0.x, Pf1.y, Pf1.z)); + T n111 = dot(g111, Pf1); + + detail::tvec3 fade_xyz = fade(Pf0); + detail::tvec4 n_z = mix(detail::tvec4(n000, n100, n010, n110), detail::tvec4(n001, n101, n011, n111), fade_xyz.z); + detail::tvec2 n_yz = mix( + detail::tvec2(n_z.x, n_z.y), + detail::tvec2(n_z.z, n_z.w), fade_xyz.y); + T n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); + return T(2.2) * n_xyz; + } + */ + // Classic Perlin noise + template + GLM_FUNC_QUALIFIER T perlin(detail::tvec4 const & P) + { + detail::tvec4 Pi0 = floor(P); // Integer part for indexing + detail::tvec4 Pi1 = Pi0 + T(1); // Integer part + 1 + Pi0 = mod(Pi0, T(289)); + Pi1 = mod(Pi1, T(289)); + detail::tvec4 Pf0 = fract(P); // Fractional part for interpolation + detail::tvec4 Pf1 = Pf0 - T(1); // Fractional part - 1.0 + detail::tvec4 ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x); + detail::tvec4 iy(Pi0.y, Pi0.y, Pi1.y, Pi1.y); + detail::tvec4 iz0(Pi0.z); + detail::tvec4 iz1(Pi1.z); + detail::tvec4 iw0(Pi0.w); + detail::tvec4 iw1(Pi1.w); + + detail::tvec4 ixy = permute(permute(ix) + iy); + detail::tvec4 ixy0 = permute(ixy + iz0); + detail::tvec4 ixy1 = permute(ixy + iz1); + detail::tvec4 ixy00 = permute(ixy0 + iw0); + detail::tvec4 ixy01 = permute(ixy0 + iw1); + detail::tvec4 ixy10 = permute(ixy1 + iw0); + detail::tvec4 ixy11 = permute(ixy1 + iw1); + + detail::tvec4 gx00 = ixy00 / T(7); + detail::tvec4 gy00 = floor(gx00) / T(7); + detail::tvec4 gz00 = floor(gy00) / T(6); + gx00 = fract(gx00) - T(0.5); + gy00 = fract(gy00) - T(0.5); + gz00 = fract(gz00) - T(0.5); + detail::tvec4 gw00 = detail::tvec4(0.75) - abs(gx00) - abs(gy00) - abs(gz00); + detail::tvec4 sw00 = step(gw00, detail::tvec4(0.0)); + gx00 -= sw00 * (step(T(0), gx00) - T(0.5)); + gy00 -= sw00 * (step(T(0), gy00) - T(0.5)); + + detail::tvec4 gx01 = ixy01 / T(7); + detail::tvec4 gy01 = floor(gx01) / T(7); + detail::tvec4 gz01 = floor(gy01) / T(6); + gx01 = fract(gx01) - T(0.5); + gy01 = fract(gy01) - T(0.5); + gz01 = fract(gz01) - T(0.5); + detail::tvec4 gw01 = detail::tvec4(0.75) - abs(gx01) - abs(gy01) - abs(gz01); + detail::tvec4 sw01 = step(gw01, detail::tvec4(0.0)); + gx01 -= sw01 * (step(T(0), gx01) - T(0.5)); + gy01 -= sw01 * (step(T(0), gy01) - T(0.5)); + + detail::tvec4 gx10 = ixy10 / T(7); + detail::tvec4 gy10 = floor(gx10) / T(7); + detail::tvec4 gz10 = floor(gy10) / T(6); + gx10 = fract(gx10) - T(0.5); + gy10 = fract(gy10) - T(0.5); + gz10 = fract(gz10) - T(0.5); + detail::tvec4 gw10 = detail::tvec4(0.75) - abs(gx10) - abs(gy10) - abs(gz10); + detail::tvec4 sw10 = step(gw10, detail::tvec4(0)); + gx10 -= sw10 * (step(T(0), gx10) - T(0.5)); + gy10 -= sw10 * (step(T(0), gy10) - T(0.5)); + + detail::tvec4 gx11 = ixy11 / T(7); + detail::tvec4 gy11 = floor(gx11) / T(7); + detail::tvec4 gz11 = floor(gy11) / T(6); + gx11 = fract(gx11) - T(0.5); + gy11 = fract(gy11) - T(0.5); + gz11 = fract(gz11) - T(0.5); + detail::tvec4 gw11 = detail::tvec4(0.75) - abs(gx11) - abs(gy11) - abs(gz11); + detail::tvec4 sw11 = step(gw11, detail::tvec4(0.0)); + gx11 -= sw11 * (step(T(0), gx11) - T(0.5)); + gy11 -= sw11 * (step(T(0), gy11) - T(0.5)); + + detail::tvec4 g0000(gx00.x, gy00.x, gz00.x, gw00.x); + detail::tvec4 g1000(gx00.y, gy00.y, gz00.y, gw00.y); + detail::tvec4 g0100(gx00.z, gy00.z, gz00.z, gw00.z); + detail::tvec4 g1100(gx00.w, gy00.w, gz00.w, gw00.w); + detail::tvec4 g0010(gx10.x, gy10.x, gz10.x, gw10.x); + detail::tvec4 g1010(gx10.y, gy10.y, gz10.y, gw10.y); + detail::tvec4 g0110(gx10.z, gy10.z, gz10.z, gw10.z); + detail::tvec4 g1110(gx10.w, gy10.w, gz10.w, gw10.w); + detail::tvec4 g0001(gx01.x, gy01.x, gz01.x, gw01.x); + detail::tvec4 g1001(gx01.y, gy01.y, gz01.y, gw01.y); + detail::tvec4 g0101(gx01.z, gy01.z, gz01.z, gw01.z); + detail::tvec4 g1101(gx01.w, gy01.w, gz01.w, gw01.w); + detail::tvec4 g0011(gx11.x, gy11.x, gz11.x, gw11.x); + detail::tvec4 g1011(gx11.y, gy11.y, gz11.y, gw11.y); + detail::tvec4 g0111(gx11.z, gy11.z, gz11.z, gw11.z); + detail::tvec4 g1111(gx11.w, gy11.w, gz11.w, gw11.w); + + detail::tvec4 norm00 = taylorInvSqrt(detail::tvec4(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100))); + g0000 *= norm00.x; + g0100 *= norm00.y; + g1000 *= norm00.z; + g1100 *= norm00.w; + + detail::tvec4 norm01 = taylorInvSqrt(detail::tvec4(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101))); + g0001 *= norm01.x; + g0101 *= norm01.y; + g1001 *= norm01.z; + g1101 *= norm01.w; + + detail::tvec4 norm10 = taylorInvSqrt(detail::tvec4(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110))); + g0010 *= norm10.x; + g0110 *= norm10.y; + g1010 *= norm10.z; + g1110 *= norm10.w; + + detail::tvec4 norm11 = taylorInvSqrt(detail::tvec4(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111))); + g0011 *= norm11.x; + g0111 *= norm11.y; + g1011 *= norm11.z; + g1111 *= norm11.w; + + T n0000 = dot(g0000, Pf0); + T n1000 = dot(g1000, detail::tvec4(Pf1.x, Pf0.y, Pf0.z, Pf0.w)); + T n0100 = dot(g0100, detail::tvec4(Pf0.x, Pf1.y, Pf0.z, Pf0.w)); + T n1100 = dot(g1100, detail::tvec4(Pf1.x, Pf1.y, Pf0.z, Pf0.w)); + T n0010 = dot(g0010, detail::tvec4(Pf0.x, Pf0.y, Pf1.z, Pf0.w)); + T n1010 = dot(g1010, detail::tvec4(Pf1.x, Pf0.y, Pf1.z, Pf0.w)); + T n0110 = dot(g0110, detail::tvec4(Pf0.x, Pf1.y, Pf1.z, Pf0.w)); + T n1110 = dot(g1110, detail::tvec4(Pf1.x, Pf1.y, Pf1.z, Pf0.w)); + T n0001 = dot(g0001, detail::tvec4(Pf0.x, Pf0.y, Pf0.z, Pf1.w)); + T n1001 = dot(g1001, detail::tvec4(Pf1.x, Pf0.y, Pf0.z, Pf1.w)); + T n0101 = dot(g0101, detail::tvec4(Pf0.x, Pf1.y, Pf0.z, Pf1.w)); + T n1101 = dot(g1101, detail::tvec4(Pf1.x, Pf1.y, Pf0.z, Pf1.w)); + T n0011 = dot(g0011, detail::tvec4(Pf0.x, Pf0.y, Pf1.z, Pf1.w)); + T n1011 = dot(g1011, detail::tvec4(Pf1.x, Pf0.y, Pf1.z, Pf1.w)); + T n0111 = dot(g0111, detail::tvec4(Pf0.x, Pf1.y, Pf1.z, Pf1.w)); + T n1111 = dot(g1111, Pf1); + + detail::tvec4 fade_xyzw = fade(Pf0); + detail::tvec4 n_0w = mix(detail::tvec4(n0000, n1000, n0100, n1100), detail::tvec4(n0001, n1001, n0101, n1101), fade_xyzw.w); + detail::tvec4 n_1w = mix(detail::tvec4(n0010, n1010, n0110, n1110), detail::tvec4(n0011, n1011, n0111, n1111), fade_xyzw.w); + detail::tvec4 n_zw = mix(n_0w, n_1w, fade_xyzw.z); + detail::tvec2 n_yzw = mix(detail::tvec2(n_zw.x, n_zw.y), detail::tvec2(n_zw.z, n_zw.w), fade_xyzw.y); + T n_xyzw = mix(n_yzw.x, n_yzw.y, fade_xyzw.x); + return T(2.2) * n_xyzw; + } + + // Classic Perlin noise, periodic variant + template + GLM_FUNC_QUALIFIER T perlin(detail::tvec2 const & P, detail::tvec2 const & rep) + { + detail::tvec4 Pi = floor(detail::tvec4(P.x, P.y, P.x, P.y)) + detail::tvec4(0.0, 0.0, 1.0, 1.0); + detail::tvec4 Pf = fract(detail::tvec4(P.x, P.y, P.x, P.y)) - detail::tvec4(0.0, 0.0, 1.0, 1.0); + Pi = mod(Pi, detail::tvec4(rep.x, rep.y, rep.x, rep.y)); // To create noise with explicit period + Pi = mod(Pi, T(289)); // To avoid truncation effects in permutation + detail::tvec4 ix(Pi.x, Pi.z, Pi.x, Pi.z); + detail::tvec4 iy(Pi.y, Pi.y, Pi.w, Pi.w); + detail::tvec4 fx(Pf.x, Pf.z, Pf.x, Pf.z); + detail::tvec4 fy(Pf.y, Pf.y, Pf.w, Pf.w); + + detail::tvec4 i = permute(permute(ix) + iy); + + detail::tvec4 gx = T(2) * fract(i / T(41)) - T(1); + detail::tvec4 gy = abs(gx) - T(0.5); + detail::tvec4 tx = floor(gx + T(0.5)); + gx = gx - tx; + + detail::tvec2 g00(gx.x, gy.x); + detail::tvec2 g10(gx.y, gy.y); + detail::tvec2 g01(gx.z, gy.z); + detail::tvec2 g11(gx.w, gy.w); + + detail::tvec4 norm = taylorInvSqrt(detail::tvec4(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11))); + g00 *= norm.x; + g01 *= norm.y; + g10 *= norm.z; + g11 *= norm.w; + + T n00 = dot(g00, detail::tvec2(fx.x, fy.x)); + T n10 = dot(g10, detail::tvec2(fx.y, fy.y)); + T n01 = dot(g01, detail::tvec2(fx.z, fy.z)); + T n11 = dot(g11, detail::tvec2(fx.w, fy.w)); + + detail::tvec2 fade_xy = fade(detail::tvec2(Pf.x, Pf.y)); + detail::tvec2 n_x = mix(detail::tvec2(n00, n01), detail::tvec2(n10, n11), fade_xy.x); + T n_xy = mix(n_x.x, n_x.y, fade_xy.y); + return T(2.3) * n_xy; + } + + // Classic Perlin noise, periodic variant + template + GLM_FUNC_QUALIFIER T perlin(detail::tvec3 const & P, detail::tvec3 const & rep) + { + detail::tvec3 Pi0 = mod(floor(P), rep); // Integer part, modulo period + detail::tvec3 Pi1 = mod(Pi0 + detail::tvec3(1.0), rep); // Integer part + 1, mod period + Pi0 = mod(Pi0, T(289)); + Pi1 = mod(Pi1, T(289)); + detail::tvec3 Pf0 = fract(P); // Fractional part for interpolation + detail::tvec3 Pf1 = Pf0 - detail::tvec3(1.0); // Fractional part - 1.0 + detail::tvec4 ix = detail::tvec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x); + detail::tvec4 iy = detail::tvec4(Pi0.y, Pi0.y, Pi1.y, Pi1.y); + detail::tvec4 iz0(Pi0.z); + detail::tvec4 iz1(Pi1.z); + + detail::tvec4 ixy = permute(permute(ix) + iy); + detail::tvec4 ixy0 = permute(ixy + iz0); + detail::tvec4 ixy1 = permute(ixy + iz1); + + detail::tvec4 gx0 = ixy0 / T(7); + detail::tvec4 gy0 = fract(floor(gx0) / T(7)) - T(0.5); + gx0 = fract(gx0); + detail::tvec4 gz0 = detail::tvec4(0.5) - abs(gx0) - abs(gy0); + detail::tvec4 sz0 = step(gz0, detail::tvec4(0)); + gx0 -= sz0 * (step(0.0, gx0) - T(0.5)); + gy0 -= sz0 * (step(0.0, gy0) - T(0.5)); + + detail::tvec4 gx1 = ixy1 / T(7); + detail::tvec4 gy1 = fract(floor(gx1) / T(7)) - T(0.5); + gx1 = fract(gx1); + detail::tvec4 gz1 = detail::tvec4(0.5) - abs(gx1) - abs(gy1); + detail::tvec4 sz1 = step(gz1, detail::tvec4(0.0)); + gx1 -= sz1 * (step(0.0, gx1) - T(0.5)); + gy1 -= sz1 * (step(0.0, gy1) - T(0.5)); + + detail::tvec3 g000 = detail::tvec3(gx0.x, gy0.x, gz0.x); + detail::tvec3 g100 = detail::tvec3(gx0.y, gy0.y, gz0.y); + detail::tvec3 g010 = detail::tvec3(gx0.z, gy0.z, gz0.z); + detail::tvec3 g110 = detail::tvec3(gx0.w, gy0.w, gz0.w); + detail::tvec3 g001 = detail::tvec3(gx1.x, gy1.x, gz1.x); + detail::tvec3 g101 = detail::tvec3(gx1.y, gy1.y, gz1.y); + detail::tvec3 g011 = detail::tvec3(gx1.z, gy1.z, gz1.z); + detail::tvec3 g111 = detail::tvec3(gx1.w, gy1.w, gz1.w); + + detail::tvec4 norm0 = taylorInvSqrt(detail::tvec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110))); + g000 *= norm0.x; + g010 *= norm0.y; + g100 *= norm0.z; + g110 *= norm0.w; + detail::tvec4 norm1 = taylorInvSqrt(detail::tvec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111))); + g001 *= norm1.x; + g011 *= norm1.y; + g101 *= norm1.z; + g111 *= norm1.w; + + T n000 = dot(g000, Pf0); + T n100 = dot(g100, detail::tvec3(Pf1.x, Pf0.y, Pf0.z)); + T n010 = dot(g010, detail::tvec3(Pf0.x, Pf1.y, Pf0.z)); + T n110 = dot(g110, detail::tvec3(Pf1.x, Pf1.y, Pf0.z)); + T n001 = dot(g001, detail::tvec3(Pf0.x, Pf0.y, Pf1.z)); + T n101 = dot(g101, detail::tvec3(Pf1.x, Pf0.y, Pf1.z)); + T n011 = dot(g011, detail::tvec3(Pf0.x, Pf1.y, Pf1.z)); + T n111 = dot(g111, Pf1); + + detail::tvec3 fade_xyz = fade(Pf0); + detail::tvec4 n_z = mix(detail::tvec4(n000, n100, n010, n110), detail::tvec4(n001, n101, n011, n111), fade_xyz.z); + detail::tvec2 n_yz = mix(detail::tvec2(n_z.x, n_z.y), detail::tvec2(n_z.z, n_z.w), fade_xyz.y); + T n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); + return T(2.2) * n_xyz; + } + + // Classic Perlin noise, periodic version + template + GLM_FUNC_QUALIFIER T perlin(detail::tvec4 const & P, detail::tvec4 const & rep) + { + detail::tvec4 Pi0 = mod(floor(P), rep); // Integer part modulo rep + detail::tvec4 Pi1 = mod(Pi0 + T(1), rep); // Integer part + 1 mod rep + detail::tvec4 Pf0 = fract(P); // Fractional part for interpolation + detail::tvec4 Pf1 = Pf0 - T(1); // Fractional part - 1.0 + detail::tvec4 ix = detail::tvec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x); + detail::tvec4 iy = detail::tvec4(Pi0.y, Pi0.y, Pi1.y, Pi1.y); + detail::tvec4 iz0(Pi0.z); + detail::tvec4 iz1(Pi1.z); + detail::tvec4 iw0(Pi0.w); + detail::tvec4 iw1(Pi1.w); + + detail::tvec4 ixy = permute(permute(ix) + iy); + detail::tvec4 ixy0 = permute(ixy + iz0); + detail::tvec4 ixy1 = permute(ixy + iz1); + detail::tvec4 ixy00 = permute(ixy0 + iw0); + detail::tvec4 ixy01 = permute(ixy0 + iw1); + detail::tvec4 ixy10 = permute(ixy1 + iw0); + detail::tvec4 ixy11 = permute(ixy1 + iw1); + + detail::tvec4 gx00 = ixy00 / T(7); + detail::tvec4 gy00 = floor(gx00) / T(7); + detail::tvec4 gz00 = floor(gy00) / T(6); + gx00 = fract(gx00) - T(0.5); + gy00 = fract(gy00) - T(0.5); + gz00 = fract(gz00) - T(0.5); + detail::tvec4 gw00 = detail::tvec4(0.75) - abs(gx00) - abs(gy00) - abs(gz00); + detail::tvec4 sw00 = step(gw00, detail::tvec4(0)); + gx00 -= sw00 * (step(0.0, gx00) - T(0.5)); + gy00 -= sw00 * (step(0.0, gy00) - T(0.5)); + + detail::tvec4 gx01 = ixy01 / T(7); + detail::tvec4 gy01 = floor(gx01) / T(7); + detail::tvec4 gz01 = floor(gy01) / T(6); + gx01 = fract(gx01) - T(0.5); + gy01 = fract(gy01) - T(0.5); + gz01 = fract(gz01) - T(0.5); + detail::tvec4 gw01 = detail::tvec4(0.75) - abs(gx01) - abs(gy01) - abs(gz01); + detail::tvec4 sw01 = step(gw01, detail::tvec4(0.0)); + gx01 -= sw01 * (step(0.0, gx01) - T(0.5)); + gy01 -= sw01 * (step(0.0, gy01) - T(0.5)); + + detail::tvec4 gx10 = ixy10 / T(7); + detail::tvec4 gy10 = floor(gx10) / T(7); + detail::tvec4 gz10 = floor(gy10) / T(6); + gx10 = fract(gx10) - T(0.5); + gy10 = fract(gy10) - T(0.5); + gz10 = fract(gz10) - T(0.5); + detail::tvec4 gw10 = detail::tvec4(0.75) - abs(gx10) - abs(gy10) - abs(gz10); + detail::tvec4 sw10 = step(gw10, detail::tvec4(0.0)); + gx10 -= sw10 * (step(0.0, gx10) - T(0.5)); + gy10 -= sw10 * (step(0.0, gy10) - T(0.5)); + + detail::tvec4 gx11 = ixy11 / T(7); + detail::tvec4 gy11 = floor(gx11) / T(7); + detail::tvec4 gz11 = floor(gy11) / T(6); + gx11 = fract(gx11) - T(0.5); + gy11 = fract(gy11) - T(0.5); + gz11 = fract(gz11) - T(0.5); + detail::tvec4 gw11 = detail::tvec4(0.75) - abs(gx11) - abs(gy11) - abs(gz11); + detail::tvec4 sw11 = step(gw11, detail::tvec4(0.0)); + gx11 -= sw11 * (step(0.0, gx11) - T(0.5)); + gy11 -= sw11 * (step(0.0, gy11) - T(0.5)); + + detail::tvec4 g0000(gx00.x, gy00.x, gz00.x, gw00.x); + detail::tvec4 g1000(gx00.y, gy00.y, gz00.y, gw00.y); + detail::tvec4 g0100(gx00.z, gy00.z, gz00.z, gw00.z); + detail::tvec4 g1100(gx00.w, gy00.w, gz00.w, gw00.w); + detail::tvec4 g0010(gx10.x, gy10.x, gz10.x, gw10.x); + detail::tvec4 g1010(gx10.y, gy10.y, gz10.y, gw10.y); + detail::tvec4 g0110(gx10.z, gy10.z, gz10.z, gw10.z); + detail::tvec4 g1110(gx10.w, gy10.w, gz10.w, gw10.w); + detail::tvec4 g0001(gx01.x, gy01.x, gz01.x, gw01.x); + detail::tvec4 g1001(gx01.y, gy01.y, gz01.y, gw01.y); + detail::tvec4 g0101(gx01.z, gy01.z, gz01.z, gw01.z); + detail::tvec4 g1101(gx01.w, gy01.w, gz01.w, gw01.w); + detail::tvec4 g0011(gx11.x, gy11.x, gz11.x, gw11.x); + detail::tvec4 g1011(gx11.y, gy11.y, gz11.y, gw11.y); + detail::tvec4 g0111(gx11.z, gy11.z, gz11.z, gw11.z); + detail::tvec4 g1111(gx11.w, gy11.w, gz11.w, gw11.w); + + detail::tvec4 norm00 = taylorInvSqrt(detail::tvec4(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100))); + g0000 *= norm00.x; + g0100 *= norm00.y; + g1000 *= norm00.z; + g1100 *= norm00.w; + + detail::tvec4 norm01 = taylorInvSqrt(detail::tvec4(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101))); + g0001 *= norm01.x; + g0101 *= norm01.y; + g1001 *= norm01.z; + g1101 *= norm01.w; + + detail::tvec4 norm10 = taylorInvSqrt(detail::tvec4(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110))); + g0010 *= norm10.x; + g0110 *= norm10.y; + g1010 *= norm10.z; + g1110 *= norm10.w; + + detail::tvec4 norm11 = taylorInvSqrt(detail::tvec4(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111))); + g0011 *= norm11.x; + g0111 *= norm11.y; + g1011 *= norm11.z; + g1111 *= norm11.w; + + T n0000 = dot(g0000, Pf0); + T n1000 = dot(g1000, detail::tvec4(Pf1.x, Pf0.y, Pf0.z, Pf0.w)); + T n0100 = dot(g0100, detail::tvec4(Pf0.x, Pf1.y, Pf0.z, Pf0.w)); + T n1100 = dot(g1100, detail::tvec4(Pf1.x, Pf1.y, Pf0.z, Pf0.w)); + T n0010 = dot(g0010, detail::tvec4(Pf0.x, Pf0.y, Pf1.z, Pf0.w)); + T n1010 = dot(g1010, detail::tvec4(Pf1.x, Pf0.y, Pf1.z, Pf0.w)); + T n0110 = dot(g0110, detail::tvec4(Pf0.x, Pf1.y, Pf1.z, Pf0.w)); + T n1110 = dot(g1110, detail::tvec4(Pf1.x, Pf1.y, Pf1.z, Pf0.w)); + T n0001 = dot(g0001, detail::tvec4(Pf0.x, Pf0.y, Pf0.z, Pf1.w)); + T n1001 = dot(g1001, detail::tvec4(Pf1.x, Pf0.y, Pf0.z, Pf1.w)); + T n0101 = dot(g0101, detail::tvec4(Pf0.x, Pf1.y, Pf0.z, Pf1.w)); + T n1101 = dot(g1101, detail::tvec4(Pf1.x, Pf1.y, Pf0.z, Pf1.w)); + T n0011 = dot(g0011, detail::tvec4(Pf0.x, Pf0.y, Pf1.z, Pf1.w)); + T n1011 = dot(g1011, detail::tvec4(Pf1.x, Pf0.y, Pf1.z, Pf1.w)); + T n0111 = dot(g0111, detail::tvec4(Pf0.x, Pf1.y, Pf1.z, Pf1.w)); + T n1111 = dot(g1111, Pf1); + + detail::tvec4 fade_xyzw = fade(Pf0); + detail::tvec4 n_0w = mix(detail::tvec4(n0000, n1000, n0100, n1100), detail::tvec4(n0001, n1001, n0101, n1101), fade_xyzw.w); + detail::tvec4 n_1w = mix(detail::tvec4(n0010, n1010, n0110, n1110), detail::tvec4(n0011, n1011, n0111, n1111), fade_xyzw.w); + detail::tvec4 n_zw = mix(n_0w, n_1w, fade_xyzw.z); + detail::tvec2 n_yzw = mix(detail::tvec2(n_zw.x, n_zw.y), detail::tvec2(n_zw.z, n_zw.w), fade_xyzw.y); + T n_xyzw = mix(n_yzw.x, n_yzw.y, fade_xyzw.x); + return T(2.2) * n_xyzw; + } + + template + GLM_FUNC_QUALIFIER T simplex(glm::detail::tvec2 const & v) + { + detail::tvec4 const C = detail::tvec4( + T( 0.211324865405187), // (3.0 - sqrt(3.0)) / 6.0 + T( 0.366025403784439), // 0.5 * (sqrt(3.0) - 1.0) + T(-0.577350269189626), // -1.0 + 2.0 * C.x + T( 0.024390243902439)); // 1.0 / 41.0 + + // First corner + detail::tvec2 i = floor(v + dot(v, detail::tvec2(C[1]))); + detail::tvec2 x0 = v - i + dot(i, detail::tvec2(C[0])); + + // Other corners + //i1.x = step( x0.y, x0.x ); // x0.x > x0.y ? 1.0 : 0.0 + //i1.y = 1.0 - i1.x; + detail::tvec2 i1 = (x0.x > x0.y) ? detail::tvec2(1, 0) : detail::tvec2(0, 1); + // x0 = x0 - 0.0 + 0.0 * C.xx ; + // x1 = x0 - i1 + 1.0 * C.xx ; + // x2 = x0 - 1.0 + 2.0 * C.xx ; + detail::tvec4 x12 = detail::tvec4(x0.x, x0.y, x0.x, x0.y) + detail::tvec4(C.x, C.x, C.z, C.z); + x12 = detail::tvec4(detail::tvec2(x12) - i1, x12.z, x12.w); + + // Permutations + i = mod(i, T(289)); // Avoid truncation effects in permutation + detail::tvec3 p = permute( + permute(i.y + detail::tvec3(T(0), i1.y, T(1))) + + i.x + detail::tvec3(T(0), i1.x, T(1))); + + detail::tvec3 m = max(T(0.5) - detail::tvec3( + dot(x0, x0), + dot(detail::tvec2(x12.x, x12.y), detail::tvec2(x12.x, x12.y)), + dot(detail::tvec2(x12.z, x12.w), detail::tvec2(x12.z, x12.w))), T(0)); + m = m * m ; + m = m * m ; + + // Gradients: 41 points uniformly over a line, mapped onto a diamond. + // The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287) + + detail::tvec3 x = T(2) * fract(p * C.w) - T(1); + detail::tvec3 h = abs(x) - T(0.5); + detail::tvec3 ox = floor(x + T(0.5)); + detail::tvec3 a0 = x - ox; + + // Normalise gradients implicitly by scaling m + // Inlined for speed: m *= taylorInvSqrt( a0*a0 + h*h ); + m *= T(1.79284291400159) - T(0.85373472095314) * (a0 * a0 + h * h); + + // Compute final noise value at P + detail::tvec3 g; + g.x = a0.x * x0.x + h.x * x0.y; + //g.yz = a0.yz * x12.xz + h.yz * x12.yw; + g.y = a0.y * x12.x + h.y * x12.y; + g.z = a0.z * x12.z + h.z * x12.w; + return T(130) * dot(m, g); + } + + template + GLM_FUNC_QUALIFIER T simplex(detail::tvec3 const & v) + { + detail::tvec2 const C(1.0 / 6.0, 1.0 / 3.0); + detail::tvec4 const D(0.0, 0.5, 1.0, 2.0); + + // First corner + detail::tvec3 i(floor(v + dot(v, detail::tvec3(C.y)))); + detail::tvec3 x0(v - i + dot(i, detail::tvec3(C.x))); + + // Other corners + detail::tvec3 g(step(detail::tvec3(x0.y, x0.z, x0.x), x0)); + detail::tvec3 l(T(1) - g); + detail::tvec3 i1(min(g, detail::tvec3(l.z, l.x, l.y))); + detail::tvec3 i2(max(g, detail::tvec3(l.z, l.x, l.y))); + + // x0 = x0 - 0.0 + 0.0 * C.xxx; + // x1 = x0 - i1 + 1.0 * C.xxx; + // x2 = x0 - i2 + 2.0 * C.xxx; + // x3 = x0 - 1.0 + 3.0 * C.xxx; + detail::tvec3 x1(x0 - i1 + C.x); + detail::tvec3 x2(x0 - i2 + C.y); // 2.0*C.x = 1/3 = C.y + detail::tvec3 x3(x0 - D.y); // -1.0+3.0*C.x = -0.5 = -D.y + + // Permutations + i = mod289(i); + detail::tvec4 p(permute(permute(permute( + i.z + detail::tvec4(T(0), i1.z, i2.z, T(1))) + + i.y + detail::tvec4(T(0), i1.y, i2.y, T(1))) + + i.x + detail::tvec4(T(0), i1.x, i2.x, T(1)))); + + // Gradients: 7x7 points over a square, mapped onto an octahedron. + // The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294) + T n_ = T(0.142857142857); // 1.0/7.0 + detail::tvec3 ns(n_ * detail::tvec3(D.w, D.y, D.z) - detail::tvec3(D.x, D.z, D.x)); + + detail::tvec4 j(p - T(49) * floor(p * ns.z * ns.z)); // mod(p,7*7) + + detail::tvec4 x_(floor(j * ns.z)); + detail::tvec4 y_(floor(j - T(7) * x_)); // mod(j,N) + + detail::tvec4 x(x_ * ns.x + ns.y); + detail::tvec4 y(y_ * ns.x + ns.y); + detail::tvec4 h(T(1) - abs(x) - abs(y)); + + detail::tvec4 b0(x.x, x.y, y.x, y.y); + detail::tvec4 b1(x.z, x.w, y.z, y.w); + + // vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0; + // vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0; + detail::tvec4 s0(floor(b0) * T(2) + T(1)); + detail::tvec4 s1(floor(b1) * T(2) + T(1)); + detail::tvec4 sh(-step(h, detail::tvec4(0.0))); + + detail::tvec4 a0 = detail::tvec4(b0.x, b0.z, b0.y, b0.w) + detail::tvec4(s0.x, s0.z, s0.y, s0.w) * detail::tvec4(sh.x, sh.x, sh.y, sh.y); + detail::tvec4 a1 = detail::tvec4(b1.x, b1.z, b1.y, b1.w) + detail::tvec4(s1.x, s1.z, s1.y, s1.w) * detail::tvec4(sh.z, sh.z, sh.w, sh.w); + + detail::tvec3 p0(a0.x, a0.y, h.x); + detail::tvec3 p1(a0.z, a0.w, h.y); + detail::tvec3 p2(a1.x, a1.y, h.z); + detail::tvec3 p3(a1.z, a1.w, h.w); + + // Normalise gradients + detail::tvec4 norm = taylorInvSqrt(detail::tvec4(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3))); + p0 *= norm.x; + p1 *= norm.y; + p2 *= norm.z; + p3 *= norm.w; + + // Mix final noise value + detail::tvec4 m = max(T(0.6) - detail::tvec4(dot(x0, x0), dot(x1, x1), dot(x2, x2), dot(x3, x3)), T(0)); + m = m * m; + return T(42) * dot(m * m, detail::tvec4(dot(p0, x0), dot(p1, x1), dot(p2, x2), dot(p3, x3))); + } + + template + GLM_FUNC_QUALIFIER T simplex(detail::tvec4 const & v) + { + detail::tvec4 const C( + 0.138196601125011, // (5 - sqrt(5))/20 G4 + 0.276393202250021, // 2 * G4 + 0.414589803375032, // 3 * G4 + -0.447213595499958); // -1 + 4 * G4 + + // (sqrt(5) - 1)/4 = F4, used once below + T const F4 = T(0.309016994374947451); + + // First corner + detail::tvec4 i = floor(v + dot(v, vec4(F4))); + detail::tvec4 x0 = v - i + dot(i, vec4(C.x)); + + // Other corners + + // Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI) + detail::tvec4 i0; + detail::tvec3 isX = step(detail::tvec3(x0.y, x0.z, x0.w), detail::tvec3(x0.x)); + detail::tvec3 isYZ = step(detail::tvec3(x0.z, x0.w, x0.w), detail::tvec3(x0.y, x0.y, x0.z)); + // i0.x = dot(isX, vec3(1.0)); + //i0.x = isX.x + isX.y + isX.z; + //i0.yzw = T(1) - isX; + i0 = detail::tvec4(isX.x + isX.y + isX.z, T(1) - isX); + // i0.y += dot(isYZ.xy, vec2(1.0)); + i0.y += isYZ.x + isYZ.y; + //i0.zw += 1.0 - detail::tvec2(isYZ.x, isYZ.y); + i0.z += T(1) - isYZ.x; + i0.w += T(1) - isYZ.y; + i0.z += isYZ.z; + i0.w += T(1) - isYZ.z; + + // i0 now contains the unique values 0,1,2,3 in each channel + detail::tvec4 i3 = clamp(i0, 0.0, 1.0); + detail::tvec4 i2 = clamp(i0 - 1.0, 0.0, 1.0); + detail::tvec4 i1 = clamp(i0 - 2.0, 0.0, 1.0); + + // x0 = x0 - 0.0 + 0.0 * C.xxxx + // x1 = x0 - i1 + 0.0 * C.xxxx + // x2 = x0 - i2 + 0.0 * C.xxxx + // x3 = x0 - i3 + 0.0 * C.xxxx + // x4 = x0 - 1.0 + 4.0 * C.xxxx + detail::tvec4 x1 = x0 - i1 + C.x; + detail::tvec4 x2 = x0 - i2 + C.y; + detail::tvec4 x3 = x0 - i3 + C.z; + detail::tvec4 x4 = x0 + C.w; + + // Permutations + i = mod(i, T(289)); + T j0 = permute(permute(permute(permute(i.w) + i.z) + i.y) + i.x); + detail::tvec4 j1 = permute(permute(permute(permute( + i.w + detail::tvec4(i1.w, i2.w, i3.w, T(1))) + + i.z + detail::tvec4(i1.z, i2.z, i3.z, T(1))) + + i.y + detail::tvec4(i1.y, i2.y, i3.y, T(1))) + + i.x + detail::tvec4(i1.x, i2.x, i3.x, T(1))); + + // Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope + // 7*7*6 = 294, which is close to the ring size 17*17 = 289. + detail::tvec4 ip = detail::tvec4(T(1) / T(294), T(1) / T(49), T(1) / T(7), T(0)); + + detail::tvec4 p0 = grad4(j0, ip); + detail::tvec4 p1 = grad4(j1.x, ip); + detail::tvec4 p2 = grad4(j1.y, ip); + detail::tvec4 p3 = grad4(j1.z, ip); + detail::tvec4 p4 = grad4(j1.w, ip); + + // Normalise gradients + detail::tvec4 norm = taylorInvSqrt(detail::tvec4(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3))); + p0 *= norm.x; + p1 *= norm.y; + p2 *= norm.z; + p3 *= norm.w; + p4 *= taylorInvSqrt(dot(p4, p4)); + + // Mix contributions from the five corners + detail::tvec3 m0 = max(T(0.6) - detail::tvec3(dot(x0, x0), dot(x1, x1), dot(x2, x2)), T(0)); + detail::tvec2 m1 = max(T(0.6) - detail::tvec2(dot(x3, x3), dot(x4, x4) ), T(0)); + m0 = m0 * m0; + m1 = m1 * m1; + return T(49) * + (dot(m0 * m0, detail::tvec3(dot(p0, x0), dot(p1, x1), dot(p2, x2))) + + dot(m1 * m1, detail::tvec2(dot(p3, x3), dot(p4, x4)))); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtc/quaternion.hpp b/include/gal/opengl/glm/gtc/quaternion.hpp new file mode 100644 index 0000000000..c971b9f5be --- /dev/null +++ b/include/gal/opengl/glm/gtc/quaternion.hpp @@ -0,0 +1,381 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_quaternion +/// @file glm/gtc/quaternion.hpp +/// @date 2009-05-21 / 2012-12-20 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_half_float (dependence) +/// @see gtc_constants (dependence) +/// +/// @defgroup gtc_quaternion GLM_GTC_quaternion +/// @ingroup gtc +/// +/// @brief Defines a templated quaternion type and several quaternion operations. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_quaternion +#define GLM_GTC_quaternion GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" +#include "../gtc/constants.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_quaternion extension included") +#endif + +namespace glm{ +namespace detail +{ + template + struct tquat// : public genType + { + enum ctor{null}; + + typedef T value_type; + typedef std::size_t size_type; + + public: + value_type x, y, z, w; + + GLM_FUNC_DECL size_type length() const; + + // Constructors + tquat(); + explicit tquat( + value_type const & s, + glm::detail::tvec3 const & v); + explicit tquat( + value_type const & w, + value_type const & x, + value_type const & y, + value_type const & z); + + // Convertions + + /// Build a quaternion from euler angles (pitch, yaw, roll), in radians. + explicit tquat( + tvec3 const & eulerAngles); + explicit tquat( + tmat3x3 const & m); + explicit tquat( + tmat4x4 const & m); + + // Accesses + value_type & operator[](int i); + value_type const & operator[](int i) const; + + // Operators + tquat & operator*=(value_type const & s); + tquat & operator/=(value_type const & s); + }; + + template + detail::tquat operator- ( + detail::tquat const & q); + + template + detail::tquat operator+ ( + detail::tquat const & q, + detail::tquat const & p); + + template + detail::tquat operator* ( + detail::tquat const & q, + detail::tquat const & p); + + template + detail::tvec3 operator* ( + detail::tquat const & q, + detail::tvec3 const & v); + + template + detail::tvec3 operator* ( + detail::tvec3 const & v, + detail::tquat const & q); + + template + detail::tvec4 operator* ( + detail::tquat const & q, + detail::tvec4 const & v); + + template + detail::tvec4 operator* ( + detail::tvec4 const & v, + detail::tquat const & q); + + template + detail::tquat operator* ( + detail::tquat const & q, + typename detail::tquat::value_type const & s); + + template + detail::tquat operator* ( + typename detail::tquat::value_type const & s, + detail::tquat const & q); + + template + detail::tquat operator/ ( + detail::tquat const & q, + typename detail::tquat::value_type const & s); + +} //namespace detail + + /// @addtogroup gtc_quaternion + /// @{ + + /// Returns the length of the quaternion. + /// + /// @see gtc_quaternion + template + T length( + detail::tquat const & q); + + /// Returns the normalized quaternion. + /// + /// @see gtc_quaternion + template + detail::tquat normalize( + detail::tquat const & q); + + /// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ... + /// + /// @see gtc_quaternion + template + T dot( + detail::tquat const & q1, + detail::tquat const & q2); + + /// Spherical linear interpolation of two quaternions. + /// The interpolation is oriented and the rotation is performed at constant speed. + /// For short path spherical linear interpolation, use the slerp function. + /// + /// @param x A quaternion + /// @param y A quaternion + /// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1]. + /// @tparam T Value type used to build the quaternion. Supported: half, float or double. + /// @see gtc_quaternion + /// @see - slerp(detail::tquat const & x, detail::tquat const & y, T const & a) + template + detail::tquat mix( + detail::tquat const & x, + detail::tquat const & y, + T const & a); + + /// Linear interpolation of two quaternions. + /// The interpolation is oriented. + /// + /// @param x A quaternion + /// @param y A quaternion + /// @param a Interpolation factor. The interpolation is defined in the range [0, 1]. + /// @tparam T Value type used to build the quaternion. Supported: half, float or double. + /// @see gtc_quaternion + template + detail::tquat lerp( + detail::tquat const & x, + detail::tquat const & y, + T const & a); + + /// Spherical linear interpolation of two quaternions. + /// The interpolation always take the short path and the rotation is performed at constant speed. + /// + /// @param x A quaternion + /// @param y A quaternion + /// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1]. + /// @tparam T Value type used to build the quaternion. Supported: half, float or double. + /// @see gtc_quaternion + template + detail::tquat slerp( + detail::tquat const & x, + detail::tquat const & y, + T const & a); + + /// Returns the q conjugate. + /// + /// @see gtc_quaternion + template + detail::tquat conjugate( + detail::tquat const & q); + + /// Returns the q inverse. + /// + /// @see gtc_quaternion + template + detail::tquat inverse( + detail::tquat const & q); + + /// Rotates a quaternion from an vector of 3 components axis and an angle. + /// + /// @param q Source orientation + /// @param angle Angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. + /// @param axis Axis of the rotation, must be normalized. + /// + /// @see gtc_quaternion + template + detail::tquat rotate( + detail::tquat const & q, + typename detail::tquat::value_type const & angle, + detail::tvec3 const & axis); + + /// Returns euler angles, yitch as x, yaw as y, roll as z. + /// + /// @see gtc_quaternion + template + detail::tvec3 eulerAngles( + detail::tquat const & x); + + /// Returns roll value of euler angles expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. + /// + /// @see gtx_quaternion + template + valType roll( + detail::tquat const & x); + + /// Returns pitch value of euler angles expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. + /// + /// @see gtx_quaternion + template + valType pitch( + detail::tquat const & x); + + /// Returns yaw value of euler angles expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. + /// + /// @see gtx_quaternion + template + valType yaw( + detail::tquat const & x); + + /// Converts a quaternion to a 3 * 3 matrix. + /// + /// @see gtc_quaternion + template + detail::tmat3x3 mat3_cast( + detail::tquat const & x); + + /// Converts a quaternion to a 4 * 4 matrix. + /// + /// @see gtc_quaternion + template + detail::tmat4x4 mat4_cast( + detail::tquat const & x); + + /// Converts a 3 * 3 matrix to a quaternion. + /// + /// @see gtc_quaternion + template + detail::tquat quat_cast( + detail::tmat3x3 const & x); + + /// Converts a 4 * 4 matrix to a quaternion. + /// + /// @see gtc_quaternion + template + detail::tquat quat_cast( + detail::tmat4x4 const & x); + + /// Returns the quaternion rotation angle. + /// + /// @see gtc_quaternion + template + valType angle( + detail::tquat const & x); + + /// Returns the q rotation axis. + /// + /// @see gtc_quaternion + template + detail::tvec3 axis( + detail::tquat const & x); + + /// Build a quaternion from an angle and a normalized axis. + /// + /// @param angle Angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. + /// @param x x component of the x-axis, x, y, z must be a normalized axis + /// @param y y component of the y-axis, x, y, z must be a normalized axis + /// @param z z component of the z-axis, x, y, z must be a normalized axis + /// + /// @see gtc_quaternion + template + detail::tquat angleAxis( + valType const & angle, + valType const & x, + valType const & y, + valType const & z); + + /// Build a quaternion from an angle and a normalized axis. + /// + /// @param angle Angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. + /// @param axis Axis of the quaternion, must be normalized. + /// + /// @see gtc_quaternion + template + detail::tquat angleAxis( + valType const & angle, + detail::tvec3 const & axis); + + /// Quaternion of floating-point numbers. + /// + /// @see gtc_quaternion + typedef detail::tquat quat; + + /// Quaternion of half-precision floating-point numbers. + /// + /// @see gtc_quaternion + typedef detail::tquat hquat; + + /// Quaternion of single-precision floating-point numbers. + /// + /// @see gtc_quaternion + typedef detail::tquat fquat; + + /// Quaternion of double-precision floating-point numbers. + /// + /// @see gtc_quaternion + typedef detail::tquat dquat; + + /// Quaternion of low precision floating-point numbers. + /// + /// @see gtc_quaternion + typedef detail::tquat lowp_quat; + + /// Quaternion of medium precision floating-point numbers. + /// + /// @see gtc_quaternion + typedef detail::tquat mediump_quat; + + /// Quaternion of high precision floating-point numbers. + /// + /// @see gtc_quaternion + typedef detail::tquat highp_quat; + + /// @} +} //namespace glm + +#include "quaternion.inl" + +#endif//GLM_GTC_quaternion diff --git a/include/gal/opengl/glm/gtc/quaternion.inl b/include/gal/opengl/glm/gtc/quaternion.inl new file mode 100644 index 0000000000..0ed5887bba --- /dev/null +++ b/include/gal/opengl/glm/gtc/quaternion.inl @@ -0,0 +1,788 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_quaternion +/// @file glm/gtc/quaternion.inl +/// @date 2009-05-21 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#include + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER typename tquat::size_type tquat::length() const + { + return 4; + } + + template + GLM_FUNC_QUALIFIER tquat::tquat() : + x(0), + y(0), + z(0), + w(1) + {} + + template + GLM_FUNC_QUALIFIER tquat::tquat + ( + value_type const & s, + tvec3 const & v + ) : + x(v.x), + y(v.y), + z(v.z), + w(s) + {} + + template + GLM_FUNC_QUALIFIER tquat::tquat + ( + value_type const & w, + value_type const & x, + value_type const & y, + value_type const & z + ) : + x(x), + y(y), + z(z), + w(w) + {} + + ////////////////////////////////////////////////////////////// + // tquat conversions + + //template + //GLM_FUNC_QUALIFIER tquat::tquat + //( + // valType const & pitch, + // valType const & yaw, + // valType const & roll + //) + //{ + // tvec3 eulerAngle(pitch * valType(0.5), yaw * valType(0.5), roll * valType(0.5)); + // tvec3 c = glm::cos(eulerAngle * valType(0.5)); + // tvec3 s = glm::sin(eulerAngle * valType(0.5)); + // + // this->w = c.x * c.y * c.z + s.x * s.y * s.z; + // this->x = s.x * c.y * c.z - c.x * s.y * s.z; + // this->y = c.x * s.y * c.z + s.x * c.y * s.z; + // this->z = c.x * c.y * s.z - s.x * s.y * c.z; + //} + + template + GLM_FUNC_QUALIFIER tquat::tquat + ( + tvec3 const & eulerAngle + ) + { + tvec3 c = glm::cos(eulerAngle * value_type(0.5)); + tvec3 s = glm::sin(eulerAngle * value_type(0.5)); + + this->w = c.x * c.y * c.z + s.x * s.y * s.z; + this->x = s.x * c.y * c.z - c.x * s.y * s.z; + this->y = c.x * s.y * c.z + s.x * c.y * s.z; + this->z = c.x * c.y * s.z - s.x * s.y * c.z; + } + + template + GLM_FUNC_QUALIFIER tquat::tquat + ( + tmat3x3 const & m + ) + { + *this = quat_cast(m); + } + + template + GLM_FUNC_QUALIFIER tquat::tquat + ( + tmat4x4 const & m + ) + { + *this = quat_cast(m); + } + + ////////////////////////////////////////////////////////////// + // tquat accesses + + template + GLM_FUNC_QUALIFIER typename tquat::value_type & tquat::operator [] (int i) + { + return (&x)[i]; + } + + template + GLM_FUNC_QUALIFIER typename tquat::value_type const & tquat::operator [] (int i) const + { + return (&x)[i]; + } + + ////////////////////////////////////////////////////////////// + // tquat operators + + template + GLM_FUNC_QUALIFIER tquat & tquat::operator *= + ( + value_type const & s + ) + { + this->w *= s; + this->x *= s; + this->y *= s; + this->z *= s; + return *this; + } + + template + GLM_FUNC_QUALIFIER tquat & tquat::operator /= + ( + value_type const & s + ) + { + this->w /= s; + this->x /= s; + this->y /= s; + this->z /= s; + return *this; + } + + ////////////////////////////////////////////////////////////// + // tquat external operators + + template + GLM_FUNC_QUALIFIER detail::tquat operator- + ( + detail::tquat const & q + ) + { + return detail::tquat(-q.w, -q.x, -q.y, -q.z); + } + + template + GLM_FUNC_QUALIFIER detail::tquat operator+ + ( + detail::tquat const & q, + detail::tquat const & p + ) + { + return detail::tquat( + q.w + p.w, + q.x + p.x, + q.y + p.y, + q.z + p.z); + } + + template + GLM_FUNC_QUALIFIER detail::tquat operator* + ( + detail::tquat const & q, + detail::tquat const & p + ) + { + return detail::tquat( + q.w * p.w - q.x * p.x - q.y * p.y - q.z * p.z, + q.w * p.x + q.x * p.w + q.y * p.z - q.z * p.y, + q.w * p.y + q.y * p.w + q.z * p.x - q.x * p.z, + q.w * p.z + q.z * p.w + q.x * p.y - q.y * p.x); + } + + // Transformation + template + GLM_FUNC_QUALIFIER detail::tvec3 operator* + ( + detail::tquat const & q, + detail::tvec3 const & v + ) + { + typename detail::tquat::value_type Two(2); + + detail::tvec3 uv, uuv; + detail::tvec3 QuatVector(q.x, q.y, q.z); + uv = glm::cross(QuatVector, v); + uuv = glm::cross(QuatVector, uv); + uv *= (Two * q.w); + uuv *= Two; + + return v + uv + uuv; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 operator* + ( + detail::tvec3 const & v, + detail::tquat const & q + ) + { + return inverse(q) * v; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 operator* + ( + detail::tquat const & q, + detail::tvec4 const & v + ) + { + return detail::tvec4(q * detail::tvec3(v), v.w); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 operator* + ( + detail::tvec4 const & v, + detail::tquat const & q + ) + { + return inverse(q) * v; + } + + template + GLM_FUNC_QUALIFIER detail::tquat operator* + ( + detail::tquat const & q, + typename detail::tquat::value_type const & s + ) + { + return detail::tquat( + q.w * s, q.x * s, q.y * s, q.z * s); + } + + template + GLM_FUNC_QUALIFIER detail::tquat operator* + ( + typename detail::tquat::value_type const & s, + detail::tquat const & q + ) + { + return q * s; + } + + template + GLM_FUNC_QUALIFIER detail::tquat operator/ + ( + detail::tquat const & q, + typename detail::tquat::value_type const & s + ) + { + return detail::tquat( + q.w / s, q.x / s, q.y / s, q.z / s); + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + detail::tquat const & q1, + detail::tquat const & q2 + ) + { + return (q1.x == q2.x) && (q1.y == q2.y) && (q1.z == q2.z) && (q1.w == q2.w); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + detail::tquat const & q1, + detail::tquat const & q2 + ) + { + return (q1.x != q2.x) || (q1.y != q2.y) || (q1.z != q2.z) || (q1.w != q2.w); + } + +}//namespace detail + + //////////////////////////////////////////////////////// + template + GLM_FUNC_QUALIFIER T length + ( + detail::tquat const & q + ) + { + return glm::sqrt(dot(q, q)); + } + + template + GLM_FUNC_QUALIFIER detail::tquat normalize + ( + detail::tquat const & q + ) + { + typename detail::tquat::value_type len = length(q); + if(len <= typename detail::tquat::value_type(0)) // Problem + return detail::tquat(1, 0, 0, 0); + typename detail::tquat::value_type oneOverLen = typename detail::tquat::value_type(1) / len; + return detail::tquat(q.w * oneOverLen, q.x * oneOverLen, q.y * oneOverLen, q.z * oneOverLen); + } + + template + GLM_FUNC_QUALIFIER T dot + ( + detail::tquat const & q1, + detail::tquat const & q2 + ) + { + return q1.x * q2.x + q1.y * q2.y + q1.z * q2.z + q1.w * q2.w; + } + + template + GLM_FUNC_QUALIFIER detail::tquat cross + ( + detail::tquat const & q1, + detail::tquat const & q2 + ) + { + return detail::tquat( + q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z, + q1.w * q2.x + q1.x * q2.w + q1.y * q2.z - q1.z * q2.y, + q1.w * q2.y + q1.y * q2.w + q1.z * q2.x - q1.x * q2.z, + q1.w * q2.z + q1.z * q2.w + q1.x * q2.y - q1.y * q2.x); + } +/* + // (x * sin(1 - a) * angle / sin(angle)) + (y * sin(a) * angle / sin(angle)) + template + GLM_FUNC_QUALIFIER detail::tquat mix + ( + detail::tquat const & x, + detail::tquat const & y, + typename detail::tquat::value_type const & a + ) + { + if(a <= typename detail::tquat::value_type(0)) return x; + if(a >= typename detail::tquat::value_type(1)) return y; + + float fCos = dot(x, y); + detail::tquat y2(y); //BUG!!! tquat y2; + if(fCos < typename detail::tquat::value_type(0)) + { + y2 = -y; + fCos = -fCos; + } + + //if(fCos > 1.0f) // problem + float k0, k1; + if(fCos > typename detail::tquat::value_type(0.9999)) + { + k0 = typename detail::tquat::value_type(1) - a; + k1 = typename detail::tquat::value_type(0) + a; //BUG!!! 1.0f + a; + } + else + { + typename detail::tquat::value_type fSin = sqrt(T(1) - fCos * fCos); + typename detail::tquat::value_type fAngle = atan(fSin, fCos); + typename detail::tquat::value_type fOneOverSin = T(1) / fSin; + k0 = sin((typename detail::tquat::value_type(1) - a) * fAngle) * fOneOverSin; + k1 = sin((typename detail::tquat::value_type(0) + a) * fAngle) * fOneOverSin; + } + + return detail::tquat( + k0 * x.w + k1 * y2.w, + k0 * x.x + k1 * y2.x, + k0 * x.y + k1 * y2.y, + k0 * x.z + k1 * y2.z); + } + + template + GLM_FUNC_QUALIFIER detail::tquat mix2 + ( + detail::tquat const & x, + detail::tquat const & y, + T const & a + ) + { + bool flip = false; + if(a <= T(0)) return x; + if(a >= T(1)) return y; + + T cos_t = dot(x, y); + if(cos_t < T(0)) + { + cos_t = -cos_t; + flip = true; + } + + T alpha(0), beta(0); + + if(T(1) - cos_t < 1e-7) + beta = T(1) - alpha; + else + { + T theta = acos(cos_t); + T sin_t = sin(theta); + beta = sin(theta * (T(1) - alpha)) / sin_t; + alpha = sin(alpha * theta) / sin_t; + } + + if(flip) + alpha = -alpha; + + return normalize(beta * x + alpha * y); + } +*/ + + template + GLM_FUNC_QUALIFIER detail::tquat mix + ( + detail::tquat const & x, + detail::tquat const & y, + T const & a + ) + { + T cosTheta = dot(x, y); + + // Perform a linear interpolation when cosTheta is close to 1 to avoid side effect of sin(angle) becoming a zero denominator + if(cosTheta > T(1) - epsilon()) + { + // Linear interpolation + return detail::tquat( + mix(x.w, y.w, a), + mix(x.x, y.x, a), + mix(x.y, y.y, a), + mix(x.z, y.z, a)); + } + else + { + // Essential Mathematics, page 467 + T angle = acos(cosTheta); + return (sin((T(1) - a) * angle) * x + sin(a * angle) * y) / sin(angle); + } + } + + template + GLM_FUNC_QUALIFIER detail::tquat lerp + ( + detail::tquat const & x, + detail::tquat const & y, + T const & a + ) + { + return x * (T(1) - a) + (y * a); + } + + template + GLM_FUNC_QUALIFIER detail::tquat slerp + ( + detail::tquat const & x, + detail::tquat const & y, + T const & a + ) + { + detail::tquat z = y; + + T cosTheta = dot(x, y); + + // If cosTheta < 0, the interpolation will take the long way around the sphere. + // To fix this, one quat must be negated. + if (cosTheta < T(0)) + { + z = -y; + cosTheta = -cosTheta; + } + + // Perform a linear interpolation when cosTheta is close to 1 to avoid side effect of sin(angle) becoming a zero denominator + if(cosTheta > T(1) - epsilon()) + { + // Linear interpolation + return detail::tquat( + mix(x.w, y.w, a), + mix(x.x, y.x, a), + mix(x.y, y.y, a), + mix(x.z, y.z, a)); + } + else + { + // Essential Mathematics, page 467 + T angle = acos(cosTheta); + return (sin((T(1) - a) * angle) * x + sin(a * angle) * z) / sin(angle); + } + } + + template + GLM_FUNC_QUALIFIER detail::tquat conjugate + ( + detail::tquat const & q + ) + { + return detail::tquat(q.w, -q.x, -q.y, -q.z); + } + + template + GLM_FUNC_QUALIFIER detail::tquat inverse + ( + detail::tquat const & q + ) + { + return conjugate(q) / dot(q, q); + } + + template + GLM_FUNC_QUALIFIER detail::tquat rotate + ( + detail::tquat const & q, + typename detail::tquat::value_type const & angle, + detail::tvec3 const & v + ) + { + detail::tvec3 Tmp = v; + + // Axis of rotation must be normalised + typename detail::tquat::value_type len = glm::length(Tmp); + if(abs(len - T(1)) > T(0.001)) + { + T oneOverLen = T(1) / len; + Tmp.x *= oneOverLen; + Tmp.y *= oneOverLen; + Tmp.z *= oneOverLen; + } + +#ifdef GLM_FORCE_RADIANS + typename detail::tquat::value_type const AngleRad(angle); +#else + typename detail::tquat::value_type const AngleRad = radians(angle); +#endif + typename detail::tquat::value_type const Sin = sin(AngleRad * T(0.5)); + + return q * detail::tquat(cos(AngleRad * T(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin); + //return gtc::quaternion::cross(q, detail::tquat(cos(AngleRad * T(0.5)), Tmp.x * fSin, Tmp.y * fSin, Tmp.z * fSin)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 eulerAngles + ( + detail::tquat const & x + ) + { + return detail::tvec3(pitch(x), yaw(x), roll(x)); + } + + template + GLM_FUNC_QUALIFIER valType roll + ( + detail::tquat const & q + ) + { +#ifdef GLM_FORCE_RADIANS + return valType(atan2(valType(2) * (q.x * q.y + q.w * q.z), q.w * q.w + q.x * q.x - q.y * q.y - q.z * q.z)); +#else + return glm::degrees(atan(valType(2) * (q.x * q.y + q.w * q.z), q.w * q.w + q.x * q.x - q.y * q.y - q.z * q.z)); +#endif + } + + template + GLM_FUNC_QUALIFIER valType pitch + ( + detail::tquat const & q + ) + { +#ifdef GLM_FORCE_RADIANS + return valType(atan2(valType(2) * (q.y * q.z + q.w * q.x), q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z)); +#else + return glm::degrees(atan(valType(2) * (q.y * q.z + q.w * q.x), q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z)); +#endif + } + + template + GLM_FUNC_QUALIFIER valType yaw + ( + detail::tquat const & q + ) + { +#ifdef GLM_FORCE_RADIANS + return asin(valType(-2) * (q.x * q.z - q.w * q.y)); +#else + return glm::degrees(asin(valType(-2) * (q.x * q.z - q.w * q.y))); +#endif + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 mat3_cast + ( + detail::tquat const & q + ) + { + detail::tmat3x3 Result(T(1)); + Result[0][0] = 1 - 2 * q.y * q.y - 2 * q.z * q.z; + Result[0][1] = 2 * q.x * q.y + 2 * q.w * q.z; + Result[0][2] = 2 * q.x * q.z - 2 * q.w * q.y; + + Result[1][0] = 2 * q.x * q.y - 2 * q.w * q.z; + Result[1][1] = 1 - 2 * q.x * q.x - 2 * q.z * q.z; + Result[1][2] = 2 * q.y * q.z + 2 * q.w * q.x; + + Result[2][0] = 2 * q.x * q.z + 2 * q.w * q.y; + Result[2][1] = 2 * q.y * q.z - 2 * q.w * q.x; + Result[2][2] = 1 - 2 * q.x * q.x - 2 * q.y * q.y; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 mat4_cast + ( + detail::tquat const & q + ) + { + return detail::tmat4x4(mat3_cast(q)); + } + + template + GLM_FUNC_QUALIFIER detail::tquat quat_cast + ( + detail::tmat3x3 const & m + ) + { + typename detail::tquat::value_type fourXSquaredMinus1 = m[0][0] - m[1][1] - m[2][2]; + typename detail::tquat::value_type fourYSquaredMinus1 = m[1][1] - m[0][0] - m[2][2]; + typename detail::tquat::value_type fourZSquaredMinus1 = m[2][2] - m[0][0] - m[1][1]; + typename detail::tquat::value_type fourWSquaredMinus1 = m[0][0] + m[1][1] + m[2][2]; + + int biggestIndex = 0; + typename detail::tquat::value_type fourBiggestSquaredMinus1 = fourWSquaredMinus1; + if(fourXSquaredMinus1 > fourBiggestSquaredMinus1) + { + fourBiggestSquaredMinus1 = fourXSquaredMinus1; + biggestIndex = 1; + } + if(fourYSquaredMinus1 > fourBiggestSquaredMinus1) + { + fourBiggestSquaredMinus1 = fourYSquaredMinus1; + biggestIndex = 2; + } + if(fourZSquaredMinus1 > fourBiggestSquaredMinus1) + { + fourBiggestSquaredMinus1 = fourZSquaredMinus1; + biggestIndex = 3; + } + + typename detail::tquat::value_type biggestVal = sqrt(fourBiggestSquaredMinus1 + T(1)) * T(0.5); + typename detail::tquat::value_type mult = T(0.25) / biggestVal; + + detail::tquat Result; + switch(biggestIndex) + { + case 0: + Result.w = biggestVal; + Result.x = (m[1][2] - m[2][1]) * mult; + Result.y = (m[2][0] - m[0][2]) * mult; + Result.z = (m[0][1] - m[1][0]) * mult; + break; + case 1: + Result.w = (m[1][2] - m[2][1]) * mult; + Result.x = biggestVal; + Result.y = (m[0][1] + m[1][0]) * mult; + Result.z = (m[2][0] + m[0][2]) * mult; + break; + case 2: + Result.w = (m[2][0] - m[0][2]) * mult; + Result.x = (m[0][1] + m[1][0]) * mult; + Result.y = biggestVal; + Result.z = (m[1][2] + m[2][1]) * mult; + break; + case 3: + Result.w = (m[0][1] - m[1][0]) * mult; + Result.x = (m[2][0] + m[0][2]) * mult; + Result.y = (m[1][2] + m[2][1]) * mult; + Result.z = biggestVal; + break; + + default: // Silence a -Wswitch-default warning in GCC. Should never actually get here. Assert is just for sanity. + assert(false); + break; + } + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tquat quat_cast + ( + detail::tmat4x4 const & m4 + ) + { + return quat_cast(detail::tmat3x3(m4)); + } + + template + GLM_FUNC_QUALIFIER T angle + ( + detail::tquat const & x + ) + { +#ifdef GLM_FORCE_RADIANS + return acos(x.w) * T(2); +#else + return glm::degrees(acos(x.w) * T(2)); +#endif + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 axis + ( + detail::tquat const & x + ) + { + T tmp1 = T(1) - x.w * x.w; + if(tmp1 <= T(0)) + return detail::tvec3(0, 0, 1); + T tmp2 = T(1) / sqrt(tmp1); + return detail::tvec3(x.x * tmp2, x.y * tmp2, x.z * tmp2); + } + + template + GLM_FUNC_QUALIFIER detail::tquat angleAxis + ( + valType const & angle, + valType const & x, + valType const & y, + valType const & z + ) + { + return angleAxis(angle, detail::tvec3(x, y, z)); + } + + template + GLM_FUNC_QUALIFIER detail::tquat angleAxis + ( + valType const & angle, + detail::tvec3 const & v + ) + { + detail::tquat result; + +#ifdef GLM_FORCE_RADIANS + valType a(angle); +#else + valType a(glm::radians(angle)); +#endif + valType s = glm::sin(a * valType(0.5)); + + result.w = glm::cos(a * valType(0.5)); + result.x = v.x * s; + result.y = v.y * s; + result.z = v.z * s; + return result; + } + +}//namespace glm diff --git a/include/gal/opengl/glm/gtc/random.hpp b/include/gal/opengl/glm/gtc/random.hpp new file mode 100644 index 0000000000..58aa75e1a7 --- /dev/null +++ b/include/gal/opengl/glm/gtc/random.hpp @@ -0,0 +1,114 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_random +/// @file glm/gtc/random.hpp +/// @date 2011-09-18 / 2011-09-18 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_half_float (dependence) +/// @see gtx_random (extended) +/// +/// @defgroup gtc_random GLM_GTC_random +/// @ingroup gtc +/// +/// @brief Generate random number from various distribution methods. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_random +#define GLM_GTC_random GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_random extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_random + /// @{ + + /// Generate random numbers in the interval [Min, Max], according a linear distribution + /// + /// @param Min + /// @param Max + /// @tparam genType Value type. Currently supported: half (not recommanded), float or double scalars and vectors. + /// @see gtc_random + template + genType linearRand( + genType const & Min, + genType const & Max); + + /// Generate random numbers in the interval [Min, Max], according a gaussian distribution + /// + /// @param Mean + /// @param Deviation + /// @see gtc_random + template + genType gaussRand( + genType const & Mean, + genType const & Deviation); + + /// Generate a random 2D vector which coordinates are regulary distributed on a circle of a given radius + /// + /// @param Radius + /// @see gtc_random + template + detail::tvec2 circularRand( + T const & Radius); + + /// Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius + /// + /// @param Radius + /// @see gtc_random + template + detail::tvec3 sphericalRand( + T const & Radius); + + /// Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a given radius + /// + /// @param Radius + /// @see gtc_random + template + detail::tvec2 diskRand( + T const & Radius); + + /// Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of a given radius + /// + /// @param Radius + /// @see gtc_random + template + GLM_FUNC_QUALIFIER detail::tvec3 ballRand( + T const & Radius); + + /// @} +}//namespace glm + +#include "random.inl" + +#endif//GLM_GTC_random diff --git a/include/gal/opengl/glm/gtc/random.inl b/include/gal/opengl/glm/gtc/random.inl new file mode 100644 index 0000000000..70d7a19540 --- /dev/null +++ b/include/gal/opengl/glm/gtc/random.inl @@ -0,0 +1,170 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_random +/// @file glm/gtc/random.inl +/// @date 2011-09-19 / 2012-04-07 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#include +#include + +namespace glm{ +namespace detail +{ + struct compute_linearRand + { + template + GLM_FUNC_QUALIFIER T operator() (T const & Min, T const & Max) const; +/* + { + GLM_STATIC_ASSERT(0, "'linearRand' invalid template parameter type. GLM_GTC_random only supports floating-point template types."); + return Min; + } +*/ + }; + + template <> + GLM_FUNC_QUALIFIER half compute_linearRand::operator() (half const & Min, half const & Max) const + { + return half(float(std::rand()) / float(RAND_MAX) * (float(Max) - float(Min)) + float(Min)); + } + + template <> + GLM_FUNC_QUALIFIER float compute_linearRand::operator() (float const & Min, float const & Max) const + { + return float(std::rand()) / float(RAND_MAX) * (Max - Min) + Min; + } + + template <> + GLM_FUNC_QUALIFIER double compute_linearRand::operator() (double const & Min, double const & Max) const + { + return double(std::rand()) / double(RAND_MAX) * (Max - Min) + Min; + } + + template <> + GLM_FUNC_QUALIFIER long double compute_linearRand::operator() (long double const & Min, long double const & Max) const + { + return (long double)(std::rand()) / (long double)(RAND_MAX) * (Max - Min) + Min; + } +}//namespace detail + + template + GLM_FUNC_QUALIFIER genType linearRand + ( + genType const & Min, + genType const & Max + ) + { + return detail::compute_linearRand()(Min, Max); + } + + VECTORIZE_VEC_VEC(linearRand) + + template + GLM_FUNC_QUALIFIER genType gaussRand + ( + genType const & Mean, + genType const & Deviation + ) + { + genType w, x1, x2; + + do + { + x1 = linearRand(genType(-1), genType(1)); + x2 = linearRand(genType(-1), genType(1)); + + w = x1 * x1 + x2 * x2; + } while(w > genType(1)); + + return x2 * Deviation * Deviation * sqrt((genType(-2) * log(w)) / w) + Mean; + } + + VECTORIZE_VEC_VEC(gaussRand) + + template + GLM_FUNC_QUALIFIER detail::tvec2 diskRand + ( + T const & Radius + ) + { + detail::tvec2 Result(T(0)); + T LenRadius(T(0)); + + do + { + Result = linearRand(detail::tvec2(-Radius), detail::tvec2(Radius)); + LenRadius = length(Result); + } + while(LenRadius > Radius); + + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 ballRand + ( + T const & Radius + ) + { + detail::tvec3 Result(T(0)); + T LenRadius(T(0)); + + do + { + Result = linearRand(detail::tvec3(-Radius), detail::tvec3(Radius)); + LenRadius = length(Result); + } + while(LenRadius > Radius); + + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 circularRand + ( + T const & Radius + ) + { + T a = linearRand(T(0), T(6.283185307179586476925286766559f)); + return detail::tvec2(cos(a), sin(a)) * Radius; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 sphericalRand + ( + T const & Radius + ) + { + T z = linearRand(T(-1), T(1)); + T a = linearRand(T(0), T(6.283185307179586476925286766559f)); + + T r = sqrt(T(1) - z * z); + + T x = r * cos(a); + T y = r * sin(a); + + return detail::tvec3(x, y, z) * Radius; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtc/reciprocal.hpp b/include/gal/opengl/glm/gtc/reciprocal.hpp new file mode 100644 index 0000000000..9e18076bda --- /dev/null +++ b/include/gal/opengl/glm/gtc/reciprocal.hpp @@ -0,0 +1,133 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_reciprocal +/// @file glm/gtc/reciprocal.hpp +/// @date 2008-10-09 / 2012-01-25 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtc_reciprocal GLM_GTC_reciprocal +/// @ingroup gtc +/// +/// @brief Define secant, cosecant and cotangent functions. +/// +/// need to be included to use these features. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_reciprocal +#define GLM_GTC_reciprocal GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_reciprocal extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_reciprocal + /// @{ + + /// Secant function. + /// hypotenuse / adjacent or 1 / cos(x) + /// + /// @see gtc_reciprocal + template + genType sec(genType const & angle); + + /// Cosecant function. + /// hypotenuse / opposite or 1 / sin(x) + /// + /// @see gtc_reciprocal + template + genType csc(genType const & angle); + + /// Cotangent function. + /// adjacent / opposite or 1 / tan(x) + /// + /// @see gtc_reciprocal + template + genType cot(genType const & angle); + + /// Inverse secant function. + /// + /// @see gtc_reciprocal + template + genType asec(genType const & x); + + /// Inverse cosecant function. + /// + /// @see gtc_reciprocal + template + genType acsc(genType const & x); + + /// Inverse cotangent function. + /// + /// @see gtc_reciprocal + template + genType acot(genType const & x); + + /// Secant hyperbolic function. + /// + /// @see gtc_reciprocal + template + genType sech(genType const & angle); + + /// Cosecant hyperbolic function. + /// + /// @see gtc_reciprocal + template + genType csch(genType const & angle); + + /// Cotangent hyperbolic function. + /// + /// @see gtc_reciprocal + template + genType coth(genType const & angle); + + /// Inverse secant hyperbolic function. + /// + /// @see gtc_reciprocal + template + genType asech(genType const & x); + + /// Inverse cosecant hyperbolic function. + /// + /// @see gtc_reciprocal + template + genType acsch(genType const & x); + + /// Inverse cotangent hyperbolic function. + /// + /// @see gtc_reciprocal + template + genType acoth(genType const & x); + + /// @} +}//namespace glm + +#include "reciprocal.inl" + +#endif//GLM_GTC_reciprocal diff --git a/include/gal/opengl/glm/gtc/reciprocal.inl b/include/gal/opengl/glm/gtc/reciprocal.inl new file mode 100644 index 0000000000..146d49029e --- /dev/null +++ b/include/gal/opengl/glm/gtc/reciprocal.inl @@ -0,0 +1,199 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_reciprocal +/// @file glm/gtc/reciprocal.inl +/// @date 2008-10-09 / 2012-04-07 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + // sec + template + GLM_FUNC_QUALIFIER genType sec + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'sec' only accept floating-point values"); + + return genType(1) / glm::cos(angle); + } + + VECTORIZE_VEC(sec) + + // csc + template + GLM_FUNC_QUALIFIER genType csc + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'csc' only accept floating-point values"); + + return genType(1) / glm::sin(angle); + } + + VECTORIZE_VEC(csc) + + // cot + template + GLM_FUNC_QUALIFIER genType cot + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'cot' only accept floating-point values"); + + return genType(1) / glm::tan(angle); + } + + VECTORIZE_VEC(cot) + + // asec + template + GLM_FUNC_QUALIFIER genType asec + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'asec' only accept floating-point values"); + + return acos(genType(1) / x); + } + + VECTORIZE_VEC(asec) + + // acsc + template + GLM_FUNC_QUALIFIER genType acsc + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'acsc' only accept floating-point values"); + + return asin(genType(1) / x); + } + + VECTORIZE_VEC(acsc) + + // acot + template + GLM_FUNC_QUALIFIER genType acot + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'acot' only accept floating-point values"); + + genType const pi_over_2 = genType(3.1415926535897932384626433832795 / 2.0); + return pi_over_2 - atan(x); + } + + VECTORIZE_VEC(acot) + + // sech + template + GLM_FUNC_QUALIFIER genType sech + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'sech' only accept floating-point values"); + + return genType(1) / glm::cosh(angle); + } + + VECTORIZE_VEC(sech) + + // csch + template + GLM_FUNC_QUALIFIER genType csch + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'csch' only accept floating-point values"); + + return genType(1) / glm::sinh(angle); + } + + VECTORIZE_VEC(csch) + + // coth + template + GLM_FUNC_QUALIFIER genType coth + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'coth' only accept floating-point values"); + + return glm::cosh(angle) / glm::sinh(angle); + } + + VECTORIZE_VEC(coth) + + // asech + template + GLM_FUNC_QUALIFIER genType asech + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'asech' only accept floating-point values"); + + return acosh(genType(1) / x); + } + + VECTORIZE_VEC(asech) + + // acsch + template + GLM_FUNC_QUALIFIER genType acsch + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'acsch' only accept floating-point values"); + + return asinh(genType(1) / x); + } + + VECTORIZE_VEC(acsch) + + // acoth + template + GLM_FUNC_QUALIFIER genType acoth + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'acoth' only accept floating-point values"); + + return atanh(genType(1) / x); + } + + VECTORIZE_VEC(acoth) +}//namespace glm diff --git a/include/gal/opengl/glm/gtc/swizzle.hpp b/include/gal/opengl/glm/gtc/swizzle.hpp new file mode 100644 index 0000000000..aa77729c72 --- /dev/null +++ b/include/gal/opengl/glm/gtc/swizzle.hpp @@ -0,0 +1,375 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_swizzle +/// @file glm/gtc/swizzle.hpp +/// @date 2010-02-20 / 2011-06-05 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtc_swizzle GLM_GTC_swizzle +/// @ingroup gtc +/// +/// @brief Provide functions to emulate GLSL swizzle operator fonctionalities. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_swizzle +#define GLM_GTC_swizzle GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/type_precision.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_swizzle extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_swizzle + /// @{ + + template class vecType> + T const & swizzle( + vecType const & v, + comp x); + + template class vecType> + detail::tvec2 const & swizzle( + vecType const & v, + comp x, comp y); + + template class vecType> + detail::tvec3 const & swizzle( + vecType const & v, + comp x, comp y, comp z); + + template class vecType> + detail::tvec4 const & swizzle( + vecType const & v, + comp x, comp y, comp z, comp w); + + template class vecType> + T & swizzle( + vecType & v, + comp x); + + template class vecType> + detail::tref2 swizzle( + vecType & v, + comp x, comp y); + + template class vecType> + detail::tref3 swizzle( + vecType & v, + comp x, comp y, comp z); + + template class vecType> + detail::tref4 swizzle( + vecType & v, + comp x, comp y, comp z, comp w); + +# define static_swizzle1_const(TYPE, SIZE) \ + template \ + GLM_FUNC_QUALIFIER TYPE swizzle(detail::tvec##SIZE const & v) \ + {return v[x];} + +# define static_swizzle1_ref(TYPE, SIZE) \ + template \ + GLM_FUNC_QUALIFIER TYPE& swizzle(detail::tvec##SIZE & v) \ + {return v[x];} + + static_swizzle1_ref(detail::float16, 2) + static_swizzle1_ref(detail::float16, 3) + static_swizzle1_ref(detail::float16, 4) + static_swizzle1_ref(detail::float32, 2) + static_swizzle1_ref(detail::float32, 3) + static_swizzle1_ref(detail::float32, 4) + static_swizzle1_ref(detail::float64, 2) + static_swizzle1_ref(detail::float64, 3) + static_swizzle1_ref(detail::float64, 4) + + static_swizzle1_ref(detail::int8, 2) + static_swizzle1_ref(detail::int8, 3) + static_swizzle1_ref(detail::int8, 4) + static_swizzle1_ref(detail::int16, 2) + static_swizzle1_ref(detail::int16, 3) + static_swizzle1_ref(detail::int16, 4) + static_swizzle1_ref(detail::int32, 2) + static_swizzle1_ref(detail::int32, 3) + static_swizzle1_ref(detail::int32, 4) + static_swizzle1_ref(detail::int64, 2) + static_swizzle1_ref(detail::int64, 3) + static_swizzle1_ref(detail::int64, 4) + + static_swizzle1_ref(detail::uint8, 2) + static_swizzle1_ref(detail::uint8, 3) + static_swizzle1_ref(detail::uint8, 4) + static_swizzle1_ref(detail::uint16, 2) + static_swizzle1_ref(detail::uint16, 3) + static_swizzle1_ref(detail::uint16, 4) + static_swizzle1_ref(detail::uint32, 2) + static_swizzle1_ref(detail::uint32, 3) + static_swizzle1_ref(detail::uint32, 4) + static_swizzle1_ref(detail::uint64, 2) + static_swizzle1_ref(detail::uint64, 3) + static_swizzle1_ref(detail::uint64, 4) +/* +# define static_swizzle2_const(TYPE) \ + template \ + GLM_FUNC_QUALIFIER TYPE swizzle(TYPE const & v) \ + {return TYPE(v[x], v[y]);} + +# define static_swizzle3_const(TYPE) \ + template \ + GLM_FUNC_QUALIFIER TYPE swizzle(TYPE const & v) \ + {return TYPE(v[x], v[y], v[z]);} + +# define static_swizzle4_const(TYPE) \ + template \ + GLM_FUNC_QUALIFIER TYPE swizzle(TYPE const & v) \ + {return TYPE(v[x], v[y], v[z], v[w]);} +*/ + +# define static_swizzle2_const(TYPE, SIZE) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec2 swizzle(detail::tvec##SIZE const & v) \ + {return detail::tvec2(v[x], v[y]);} + +# define static_swizzle3_const(TYPE, SIZE) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec3 swizzle(detail::tvec##SIZE const & v) \ + {return detail::tvec3(v[x], v[y], v[z]);} + +# define static_swizzle4_const(TYPE, SIZE) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec4 swizzle(detail::tvec##SIZE const & v) \ + {return detail::tvec4(v[x], v[y], v[z], v[w]);} + + + static_swizzle2_const(glm::f16, 2) + static_swizzle2_const(glm::f16, 3) + static_swizzle2_const(glm::f16, 4) + static_swizzle2_const(glm::f32, 2) + static_swizzle2_const(glm::f32, 3) + static_swizzle2_const(glm::f32, 4) + static_swizzle2_const(glm::f64, 2) + static_swizzle2_const(glm::f64, 3) + static_swizzle2_const(glm::f64, 4) + + static_swizzle2_const(glm::i8, 2) + static_swizzle2_const(glm::i8, 3) + static_swizzle2_const(glm::i8, 4) + static_swizzle2_const(glm::i16, 2) + static_swizzle2_const(glm::i16, 3) + static_swizzle2_const(glm::i16, 4) + static_swizzle2_const(glm::i32, 2) + static_swizzle2_const(glm::i32, 3) + static_swizzle2_const(glm::i32, 4) + static_swizzle2_const(glm::i64, 2) + static_swizzle2_const(glm::i64, 3) + static_swizzle2_const(glm::i64, 4) + + static_swizzle2_const(glm::u8, 2) + static_swizzle2_const(glm::u8, 3) + static_swizzle2_const(glm::u8, 4) + static_swizzle2_const(glm::u16, 2) + static_swizzle2_const(glm::u16, 3) + static_swizzle2_const(glm::u16, 4) + static_swizzle2_const(glm::u32, 2) + static_swizzle2_const(glm::u32, 3) + static_swizzle2_const(glm::u32, 4) + static_swizzle2_const(glm::u64, 2) + static_swizzle2_const(glm::u64, 3) + static_swizzle2_const(glm::u64, 4) + + static_swizzle3_const(glm::f16, 2) + static_swizzle3_const(glm::f16, 3) + static_swizzle3_const(glm::f16, 4) + static_swizzle3_const(glm::f32, 2) + static_swizzle3_const(glm::f32, 3) + static_swizzle3_const(glm::f32, 4) + static_swizzle3_const(glm::f64, 2) + static_swizzle3_const(glm::f64, 3) + static_swizzle3_const(glm::f64, 4) + + static_swizzle3_const(glm::i8, 2) + static_swizzle3_const(glm::i8, 3) + static_swizzle3_const(glm::i8, 4) + static_swizzle3_const(glm::i16, 2) + static_swizzle3_const(glm::i16, 3) + static_swizzle3_const(glm::i16, 4) + static_swizzle3_const(glm::i32, 2) + static_swizzle3_const(glm::i32, 3) + static_swizzle3_const(glm::i32, 4) + static_swizzle3_const(glm::i64, 2) + static_swizzle3_const(glm::i64, 3) + static_swizzle3_const(glm::i64, 4) + + static_swizzle3_const(glm::u8, 2) + static_swizzle3_const(glm::u8, 3) + static_swizzle3_const(glm::u8, 4) + static_swizzle3_const(glm::u16, 2) + static_swizzle3_const(glm::u16, 3) + static_swizzle3_const(glm::u16, 4) + static_swizzle3_const(glm::u32, 2) + static_swizzle3_const(glm::u32, 3) + static_swizzle3_const(glm::u32, 4) + static_swizzle3_const(glm::u64, 2) + static_swizzle3_const(glm::u64, 3) + static_swizzle3_const(glm::u64, 4) + + static_swizzle4_const(glm::f16, 2) + static_swizzle4_const(glm::f16, 3) + static_swizzle4_const(glm::f16, 4) + static_swizzle4_const(glm::f32, 2) + static_swizzle4_const(glm::f32, 3) + static_swizzle4_const(glm::f32, 4) + static_swizzle4_const(glm::f64, 2) + static_swizzle4_const(glm::f64, 3) + static_swizzle4_const(glm::f64, 4) + + static_swizzle4_const(glm::i8, 2) + static_swizzle4_const(glm::i8, 3) + static_swizzle4_const(glm::i8, 4) + static_swizzle4_const(glm::i16, 2) + static_swizzle4_const(glm::i16, 3) + static_swizzle4_const(glm::i16, 4) + static_swizzle4_const(glm::i32, 2) + static_swizzle4_const(glm::i32, 3) + static_swizzle4_const(glm::i32, 4) + static_swizzle4_const(glm::i64, 2) + static_swizzle4_const(glm::i64, 3) + static_swizzle4_const(glm::i64, 4) + + static_swizzle4_const(glm::u8, 2) + static_swizzle4_const(glm::u8, 3) + static_swizzle4_const(glm::u8, 4) + static_swizzle4_const(glm::u16, 2) + static_swizzle4_const(glm::u16, 3) + static_swizzle4_const(glm::u16, 4) + static_swizzle4_const(glm::u32, 2) + static_swizzle4_const(glm::u32, 3) + static_swizzle4_const(glm::u32, 4) + static_swizzle4_const(glm::u64, 2) + static_swizzle4_const(glm::u64, 3) + static_swizzle4_const(glm::u64, 4) + +# define static_swizzle2_ref(TYPE, SIZE) \ + template \ + GLM_FUNC_QUALIFIER glm::detail::tref2 swizzle(detail::tvec##SIZE & v) \ + {return glm::detail::tref2(v[x], v[y]);} + +# define static_swizzle3_ref(TYPE, SIZE) \ + template \ + GLM_FUNC_QUALIFIER glm::detail::tref3 swizzle(detail::tvec##SIZE & v) \ + {return glm::detail::tref3(v[x], v[y], v[z]);} + +# define static_swizzle4_ref(TYPE, SIZE) \ + template \ + GLM_FUNC_QUALIFIER glm::detail::tref4 swizzle(detail::tvec##SIZE & v) \ + {return glm::detail::tref4(v[x], v[y], v[z], v[w]);} + + static_swizzle2_ref(glm::f16, 2) + static_swizzle2_ref(glm::f16, 3) + static_swizzle2_ref(glm::f16, 4) + static_swizzle2_ref(glm::f32, 2) + static_swizzle2_ref(glm::f32, 3) + static_swizzle2_ref(glm::f32, 4) + static_swizzle2_ref(glm::f64, 2) + static_swizzle2_ref(glm::f64, 3) + static_swizzle2_ref(glm::f64, 4) + + static_swizzle2_ref(glm::i8, 2) + static_swizzle2_ref(glm::i8, 3) + static_swizzle2_ref(glm::i8, 4) + static_swizzle2_ref(glm::i16, 2) + static_swizzle2_ref(glm::i16, 3) + static_swizzle2_ref(glm::i16, 4) + static_swizzle2_ref(glm::i32, 2) + static_swizzle2_ref(glm::i32, 3) + static_swizzle2_ref(glm::i32, 4) + static_swizzle2_ref(glm::i64, 2) + static_swizzle2_ref(glm::i64, 3) + static_swizzle2_ref(glm::i64, 4) + + static_swizzle2_ref(glm::u8, 2) + static_swizzle2_ref(glm::u8, 3) + static_swizzle2_ref(glm::u8, 4) + static_swizzle2_ref(glm::u16, 2) + static_swizzle2_ref(glm::u16, 3) + static_swizzle2_ref(glm::u16, 4) + static_swizzle2_ref(glm::u32, 2) + static_swizzle2_ref(glm::u32, 3) + static_swizzle2_ref(glm::u32, 4) + static_swizzle2_ref(glm::u64, 2) + static_swizzle2_ref(glm::u64, 3) + static_swizzle2_ref(glm::u64, 4) + + static_swizzle3_ref(glm::f16, 3) + static_swizzle3_ref(glm::f16, 4) + static_swizzle3_ref(glm::f32, 3) + static_swizzle3_ref(glm::f32, 4) + static_swizzle3_ref(glm::f64, 3) + static_swizzle3_ref(glm::f64, 4) + + static_swizzle3_ref(glm::i8, 3) + static_swizzle3_ref(glm::i8, 4) + static_swizzle3_ref(glm::i16, 3) + static_swizzle3_ref(glm::i16, 4) + static_swizzle3_ref(glm::i32, 3) + static_swizzle3_ref(glm::i32, 4) + static_swizzle3_ref(glm::i64, 3) + static_swizzle3_ref(glm::i64, 4) + + static_swizzle3_ref(glm::u8, 3) + static_swizzle3_ref(glm::u8, 4) + static_swizzle3_ref(glm::u16, 3) + static_swizzle3_ref(glm::u16, 4) + static_swizzle3_ref(glm::u32, 3) + static_swizzle3_ref(glm::u32, 4) + static_swizzle3_ref(glm::u64, 3) + static_swizzle3_ref(glm::u64, 4) + + static_swizzle4_ref(glm::f16, 4) + static_swizzle4_ref(glm::f32, 4) + static_swizzle4_ref(glm::f64, 4) + + static_swizzle4_ref(glm::i8, 4) + static_swizzle4_ref(glm::i16, 4) + static_swizzle4_ref(glm::i32, 4) + static_swizzle4_ref(glm::i64, 4) + + static_swizzle4_ref(glm::u8, 4) + static_swizzle4_ref(glm::u16, 4) + static_swizzle4_ref(glm::u32, 4) + static_swizzle4_ref(glm::u64, 4) + + /// @} +}//namespace glm + +#include "swizzle.inl" + +#endif//GLM_GTC_swizzle diff --git a/include/gal/opengl/glm/gtc/swizzle.inl b/include/gal/opengl/glm/gtc/swizzle.inl new file mode 100644 index 0000000000..856ff50bf5 --- /dev/null +++ b/include/gal/opengl/glm/gtc/swizzle.inl @@ -0,0 +1,116 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_swizzle +/// @file glm/gtc/swizzle.inl +/// @date 2011-01-15 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template class vecType> + GLM_FUNC_QUALIFIER T swizzle + ( + vecType const & v, + comp x + ) + { + assert(int(x) < int(vecType::value_size)); + return v[x]; + } + + template class vecType> + GLM_FUNC_QUALIFIER detail::tvec2 swizzle + ( + vecType const & v, + comp x, comp y + ) + { + return detail::tvec2( + v[x], + v[y]); + } + + template class vecType> + GLM_FUNC_QUALIFIER detail::tvec3 swizzle + ( + vecType const & v, + comp x, comp y, comp z + ) + { + return detail::tvec3( + v[x], + v[y], + v[z]); + } + + template class vecType> + GLM_FUNC_QUALIFIER detail::tvec4 swizzle + ( + vecType const & v, + comp x, comp y, comp z, comp w + ) + { + return detail::tvec4(v[x], v[y], v[z], v[w]); + } + + template + GLM_FUNC_QUALIFIER T& swizzle + ( + detail::tvec4 & v, + comp x + ) + { + return v[x]; + } + + template + GLM_FUNC_QUALIFIER detail::tref2 swizzle + ( + detail::tvec4 & v, + comp x, comp y + ) + { + return detail::tref2(v[x], v[y]); + } + + template + GLM_FUNC_QUALIFIER detail::tref3 swizzle + ( + detail::tvec4 & v, + comp x, comp y, comp z + ) + { + return detail::tref3(v[x], v[y], v[z]); + } + + template + GLM_FUNC_QUALIFIER detail::tref4 swizzle + ( + detail::tvec4 & v, + comp x, comp y, comp z, comp w + ) + { + return detail::tref4(v[x], v[y], v[z], v[w]); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtc/type_precision.hpp b/include/gal/opengl/glm/gtc/type_precision.hpp new file mode 100644 index 0000000000..6d7ffe7bb7 --- /dev/null +++ b/include/gal/opengl/glm/gtc/type_precision.hpp @@ -0,0 +1,669 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_type_precision +/// @file glm/gtc/type_precision.hpp +/// @date 2009-06-04 / 2011-12-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_half_float (dependence) +/// @see gtc_quaternion (dependence) +/// +/// @defgroup gtc_type_precision GLM_GTC_type_precision +/// @ingroup gtc +/// +/// @brief Defines specific C++-based precision types. +/// +/// @ref core_precision defines types based on GLSL's precision qualifiers. This +/// extension defines types based on explicitly-sized C++ data types. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_type_precision +#define GLM_GTC_type_precision GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" +#include "../gtc/quaternion.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_type_precision extension included") +#endif + +namespace glm +{ + /////////////////////////// + // Signed int vector types + + /// @addtogroup gtc_type_precision + /// @{ + + /// 8 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int8 int8; + + /// 16 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int16 int16; + + /// 32 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int32 int32; + + /// 64 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int64 int64; + + + /// 8 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int8 int8_t; + + /// 16 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int16 int16_t; + + /// 32 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int32 int32_t; + + /// 64 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int64 int64_t; + + + /// 8 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int8 i8; + + /// 16 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int16 i16; + + /// 32 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int32 i32; + + /// 64 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int64 i64; + + + /// 8 bit signed integer scalar type. + /// @see gtc_type_precision + typedef detail::tvec1 i8vec1; + + /// 8 bit signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef detail::tvec2 i8vec2; + + /// 8 bit signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef detail::tvec3 i8vec3; + + /// 8 bit signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef detail::tvec4 i8vec4; + + + /// 16 bit signed integer scalar type. + /// @see gtc_type_precision + typedef detail::tvec1 i16vec1; + + /// 16 bit signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef detail::tvec2 i16vec2; + + /// 16 bit signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef detail::tvec3 i16vec3; + + /// 16 bit signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef detail::tvec4 i16vec4; + + + /// 32 bit signed integer scalar type. + /// @see gtc_type_precision + typedef detail::tvec1 i32vec1; + + /// 32 bit signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef detail::tvec2 i32vec2; + + /// 32 bit signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef detail::tvec3 i32vec3; + + /// 32 bit signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef detail::tvec4 i32vec4; + + + /// 64 bit signed integer scalar type. + /// @see gtc_type_precision + typedef detail::tvec1 i64vec1; + + /// 64 bit signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef detail::tvec2 i64vec2; + + /// 64 bit signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef detail::tvec3 i64vec3; + + /// 64 bit signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef detail::tvec4 i64vec4; + + + ///////////////////////////// + // Unsigned int vector types + + /// 8 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint8 uint8; + + /// 16 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint16 uint16; + + /// 32 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint32 uint32; + + /// 64 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint64 uint64; + + + /// 8 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint8 uint8_t; + + /// 16 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint16 uint16_t; + + /// 32 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint32 uint32_t; + + /// 64 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint64 uint64_t; + + + /// 8 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint8 u8; + + /// 16 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint16 u16; + + /// 32 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint32 u32; + + /// 64 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint64 u64; + + + /// 8 bit unsigned integer scalar type. + /// @see gtc_type_precision + typedef detail::tvec1 u8vec1; + + /// 8 bit unsigned integer vector of 2 components type. + /// @see gtc_type_precision + typedef detail::tvec2 u8vec2; + + /// 8 bit unsigned integer vector of 3 components type. + /// @see gtc_type_precision + typedef detail::tvec3 u8vec3; + + /// 8 bit unsigned integer vector of 4 components type. + /// @see gtc_type_precision + typedef detail::tvec4 u8vec4; + + + /// 16 bit unsigned integer scalar type. + /// @see gtc_type_precision + typedef detail::tvec1 u16vec1; + + /// 16 bit unsigned integer vector of 2 components type. + /// @see gtc_type_precision + typedef detail::tvec2 u16vec2; + + /// 16 bit unsigned integer vector of 3 components type. + /// @see gtc_type_precision + typedef detail::tvec3 u16vec3; + + /// 16 bit unsigned integer vector of 4 components type. + /// @see gtc_type_precision + typedef detail::tvec4 u16vec4; + + + /// 32 bit unsigned integer scalar type. + /// @see gtc_type_precision + typedef detail::tvec1 u32vec1; + + /// 32 bit unsigned integer vector of 2 components type. + /// @see gtc_type_precision + typedef detail::tvec2 u32vec2; + + /// 32 bit unsigned integer vector of 3 components type. + /// @see gtc_type_precision + typedef detail::tvec3 u32vec3; + + /// 32 bit unsigned integer vector of 4 components type. + /// @see gtc_type_precision + typedef detail::tvec4 u32vec4; + + + /// 64 bit unsigned integer scalar type. + /// @see gtc_type_precision + typedef detail::tvec1 u64vec1; + + /// 64 bit unsigned integer vector of 2 components type. + /// @see gtc_type_precision + typedef detail::tvec2 u64vec2; + + /// 64 bit unsigned integer vector of 3 components type. + /// @see gtc_type_precision + typedef detail::tvec3 u64vec3; + + /// 64 bit unsigned integer vector of 4 components type. + /// @see gtc_type_precision + typedef detail::tvec4 u64vec4; + + + ////////////////////// + // Float vector types + + /// 16 bit half-precision floating-point scalar. + /// @see gtc_type_precision + typedef detail::float16 float16; + + /// 32 bit single-precision floating-point scalar. + /// @see gtc_type_precision + typedef detail::float32 float32; + + /// 64 bit double-precision floating-point scalar. + /// @see gtc_type_precision + typedef detail::float64 float64; + + + /// 16 bit half-precision floating-point scalar. + /// @see gtc_type_precision + typedef detail::float16 float16_t; + + /// 32 bit single-precision floating-point scalar. + /// @see gtc_type_precision + typedef detail::float32 float32_t; + + /// 64 bit double-precision floating-point scalar. + /// @see gtc_type_precision + typedef detail::float64 float64_t; + + + /// 16 bit half-precision floating-point scalar. + /// @see gtc_type_precision + typedef float16 f16; + + /// 32 bit single-precision floating-point scalar. + /// @see gtc_type_precision + typedef float32 f32; + + /// 64 bit double-precision floating-point scalar. + /// @see gtc_type_precision + typedef float64 f64; + + + /// Single-precision floating-point vector of 1 component. + /// @see gtc_type_precision + typedef detail::tvec1 fvec1; + + /// Single-precision floating-point vector of 2 components. + /// @see gtc_type_precision + typedef detail::tvec2 fvec2; + + /// Single-precision floating-point vector of 3 components. + /// @see gtc_type_precision + typedef detail::tvec3 fvec3; + + /// Single-precision floating-point vector of 4 components. + /// @see gtc_type_precision + typedef detail::tvec4 fvec4; + + + /// Half-precision floating-point vector of 1 component. + /// @see gtc_type_precision + typedef detail::tvec1 f16vec1; + + /// Half-precision floating-point vector of 2 components. + /// @see gtc_type_precision + typedef detail::tvec2 f16vec2; + + /// Half-precision floating-point vector of 3 components. + /// @see gtc_type_precision + typedef detail::tvec3 f16vec3; + + /// Half-precision floating-point vector of 4 components. + /// @see gtc_type_precision + typedef detail::tvec4 f16vec4; + + + /// Single-precision floating-point vector of 1 component. + /// @see gtc_type_precision + typedef detail::tvec1 f32vec1; + + /// Single-precision floating-point vector of 2 components. + /// @see gtc_type_precision + typedef detail::tvec2 f32vec2; + + /// Single-precision floating-point vector of 3 components. + /// @see gtc_type_precision + typedef detail::tvec3 f32vec3; + + /// Single-precision floating-point vector of 4 components. + /// @see gtc_type_precision + typedef detail::tvec4 f32vec4; + + + /// Double-precision floating-point vector of 1 component. + /// @see gtc_type_precision + typedef detail::tvec1 f64vec1; + + /// Double-precision floating-point vector of 2 components. + /// @see gtc_type_precision + typedef detail::tvec2 f64vec2; + + /// Double-precision floating-point vector of 3 components. + /// @see gtc_type_precision + typedef detail::tvec3 f64vec3; + + /// Double-precision floating-point vector of 4 components. + /// @see gtc_type_precision + typedef detail::tvec4 f64vec4; + + + ////////////////////// + // Float matrix types + + /// Single-precision floating-point 1x1 matrix. + /// @see gtc_type_precision + //typedef detail::tmat1x1 fmat1; + + /// Single-precision floating-point 2x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x2 fmat2; + + /// Single-precision floating-point 3x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x3 fmat3; + + /// Single-precision floating-point 4x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x4 fmat4; + + + /// Single-precision floating-point 1x1 matrix. + /// @see gtc_type_precision + //typedef f32 fmat1x1; + + /// Single-precision floating-point 2x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x2 fmat2x2; + + /// Single-precision floating-point 2x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x3 fmat2x3; + + /// Single-precision floating-point 2x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x4 fmat2x4; + + /// Single-precision floating-point 3x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x2 fmat3x2; + + /// Single-precision floating-point 3x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x3 fmat3x3; + + /// Single-precision floating-point 3x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x4 fmat3x4; + + /// Single-precision floating-point 4x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x2 fmat4x2; + + /// Single-precision floating-point 4x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x3 fmat4x3; + + /// Single-precision floating-point 4x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x4 fmat4x4; + + + /// Half-precision floating-point 1x1 matrix. + /// @see gtc_type_precision + //typedef detail::tmat1x1 f16mat1; + + /// Half-precision floating-point 2x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x2 f16mat2; + + /// Half-precision floating-point 3x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x3 f16mat3; + + /// Half-precision floating-point 4x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x4 f16mat4; + + + /// Half-precision floating-point 1x1 matrix. + /// @see gtc_type_precision + //typedef f16 f16mat1x1; + + /// Half-precision floating-point 2x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x2 f16mat2x2; + + /// Half-precision floating-point 2x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x3 f16mat2x3; + + /// Half-precision floating-point 2x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x4 f16mat2x4; + + /// Half-precision floating-point 3x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x2 f16mat3x2; + + /// Half-precision floating-point 3x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x3 f16mat3x3; + + /// Half-precision floating-point 3x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x4 f16mat3x4; + + /// Half-precision floating-point 4x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x2 f16mat4x2; + + /// Half-precision floating-point 4x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x3 f16mat4x3; + + /// Half-precision floating-point 4x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x4 f16mat4x4; + + + /// Single-precision floating-point 1x1 matrix. + /// @see gtc_type_precision + //typedef detail::tmat1x1 f32mat1; + + /// Single-precision floating-point 2x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x2 f32mat2; + + /// Single-precision floating-point 3x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x3 f32mat3; + + /// Single-precision floating-point 4x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x4 f32mat4; + + + /// Single-precision floating-point 1x1 matrix. + /// @see gtc_type_precision + //typedef f32 f32mat1x1; + + /// Single-precision floating-point 2x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x2 f32mat2x2; + + /// Single-precision floating-point 2x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x3 f32mat2x3; + + /// Single-precision floating-point 2x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x4 f32mat2x4; + + /// Single-precision floating-point 3x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x2 f32mat3x2; + + /// Single-precision floating-point 3x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x3 f32mat3x3; + + /// Single-precision floating-point 3x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x4 f32mat3x4; + + /// Single-precision floating-point 4x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x2 f32mat4x2; + + /// Single-precision floating-point 4x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x3 f32mat4x3; + + /// Single-precision floating-point 4x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x4 f32mat4x4; + + + /// Double-precision floating-point 1x1 matrix. + /// @see gtc_type_precision + //typedef detail::tmat1x1 f64mat1; + + /// Double-precision floating-point 2x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x2 f64mat2; + + /// Double-precision floating-point 3x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x3 f64mat3; + + /// Double-precision floating-point 4x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x4 f64mat4; + + + /// Double-precision floating-point 1x1 matrix. + /// @see gtc_type_precision + //typedef f64 f64mat1x1; + + /// Double-precision floating-point 2x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x2 f64mat2x2; + + /// Double-precision floating-point 2x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x3 f64mat2x3; + + /// Double-precision floating-point 2x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x4 f64mat2x4; + + /// Double-precision floating-point 3x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x2 f64mat3x2; + + /// Double-precision floating-point 3x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x3 f64mat3x3; + + /// Double-precision floating-point 3x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x4 f64mat3x4; + + /// Double-precision floating-point 4x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x2 f64mat4x2; + + /// Double-precision floating-point 4x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x3 f64mat4x3; + + /// Double-precision floating-point 4x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x4 f64mat4x4; + + + ////////////////////////// + // Quaternion types + + /// Half-precision floating-point quaternion. + /// @see gtc_type_precision + typedef detail::tquat f16quat; + + /// Single-precision floating-point quaternion. + /// @see gtc_type_precision + typedef detail::tquat f32quat; + + /// Double-precision floating-point quaternion. + /// @see gtc_type_precision + typedef detail::tquat f64quat; + + /// @} +}//namespace glm + +#include "type_precision.inl" + +#endif//GLM_GTC_type_precision diff --git a/include/gal/opengl/glm/gtc/type_precision.inl b/include/gal/opengl/glm/gtc/type_precision.inl new file mode 100644 index 0000000000..61577ee9e0 --- /dev/null +++ b/include/gal/opengl/glm/gtc/type_precision.inl @@ -0,0 +1,32 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_swizzle +/// @file glm/gtc/swizzle.inl +/// @date 2009-06-14 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + +} diff --git a/include/gal/opengl/glm/gtc/type_ptr.hpp b/include/gal/opengl/glm/gtc/type_ptr.hpp new file mode 100644 index 0000000000..ca2c0e42e4 --- /dev/null +++ b/include/gal/opengl/glm/gtc/type_ptr.hpp @@ -0,0 +1,169 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_type_ptr +/// @file glm/gtc/type_ptr.hpp +/// @date 2009-05-06 / 2011-06-05 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_half_float (dependence) +/// @see gtc_quaternion (dependence) +/// +/// @defgroup gtc_type_ptr GLM_GTC_type_ptr +/// @ingroup gtc +/// +/// @brief Handles the interaction between pointers and vector, matrix types. +/// +/// This extension defines an overloaded function, glm::value_ptr, which +/// takes any of the \ref core_template "core template types". It returns +/// a pointer to the memory layout of the object. Matrix types store their values +/// in column-major order. +/// +/// This is useful for uploading data to matrices or copying data to buffer objects. +/// +/// Example: +/// @code +/// #include +/// #include +/// +/// glm::vec3 aVector(3); +/// glm::mat4 someMatrix(1.0); +/// +/// glUniform3fv(uniformLoc, 1, glm::value_ptr(aVector)); +/// glUniformMatrix4fv(uniformMatrixLoc, 1, GL_FALSE, glm::value_ptr(someMatrix)); +/// @endcode +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_type_ptr +#define GLM_GTC_type_ptr GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" +#include "../gtc/quaternion.hpp" +#include + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_type_ptr extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_type_ptr + /// @{ + + /// Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + typename genType::value_type const * value_ptr(genType const & vec); + + /// Build a vector from a pointer. + /// @see gtc_type_ptr + template + detail::tvec2 make_vec2(T const * const ptr); + + /// Build a vector from a pointer. + /// @see gtc_type_ptr + template + detail::tvec3 make_vec3(T const * const ptr); + + /// Build a vector from a pointer. + /// @see gtc_type_ptr + template + detail::tvec4 make_vec4(T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat2x2 make_mat2x2(T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat2x3 make_mat2x3(T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat2x4 make_mat2x4(T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat3x2 make_mat3x2(T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat3x3 make_mat3x3(T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat3x4 make_mat3x4(T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat4x2 make_mat4x2( + T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat4x3 make_mat4x3(T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat4x4 make_mat4x4(T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat2x2 make_mat2(T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat3x3 make_mat3(T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat4x4 make_mat4(T const * const ptr); + + /// Build a quaternion from a pointer. + /// @see gtc_type_ptr + template + detail::tquat make_quat(T const * const ptr); + + /// @} +}//namespace glm + +#include "type_ptr.inl" + +#endif//GLM_GTC_type_ptr + diff --git a/include/gal/opengl/glm/gtc/type_ptr.inl b/include/gal/opengl/glm/gtc/type_ptr.inl new file mode 100644 index 0000000000..d5ff6befe9 --- /dev/null +++ b/include/gal/opengl/glm/gtc/type_ptr.inl @@ -0,0 +1,462 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_type_ptr +/// @file glm/gtc/type_ptr.inl +/// @date 2011-06-15 / 2011-12-07 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + /// @addtogroup gtc_type_ptr + /// @{ + + /// Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tvec2 const & vec + ) + { + return &(vec.x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tvec2 & vec + ) + { + return &(vec.x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tvec3 const & vec + ) + { + return &(vec.x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tvec3 & vec + ) + { + return &(vec.x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tvec4 const & vec + ) + { + return &(vec.x); + } + + //! Return the constant address to the data of the input parameter. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tvec4 & vec + ) + { + return &(vec.x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat2x2 const & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat2x2 & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat3x3 const & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat3x3 & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat4x4 const & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat4x4 & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat2x3 const & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat2x3 & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat3x2 const & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat3x2 & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat2x4 const & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat2x4 & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat4x2 const & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat4x2 & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat3x4 const & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat3x4 & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat4x3 const & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tquat const & q + ) + { + return &(q[0]); + } + + //! Get the address of the matrix content. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T * value_ptr(detail::tmat4x3 & mat) + { + return &(mat[0].x); + } + + //! Build a vector from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tvec2 make_vec2(T const * const ptr) + { + detail::tvec2 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tvec2)); + return Result; + } + + //! Build a vector from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tvec3 make_vec3(T const * const ptr) + { + detail::tvec3 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tvec3)); + return Result; + } + + //! Build a vector from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tvec4 make_vec4(T const * const ptr) + { + detail::tvec4 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tvec4)); + return Result; + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat2x2 make_mat2x2(T const * const ptr) + { + detail::tmat2x2 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x2)); + return Result; + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat2x3 make_mat2x3(T const * const ptr) + { + detail::tmat2x3 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x3)); + return Result; + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat2x4 make_mat2x4(T const * const ptr) + { + detail::tmat2x4 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x4)); + return Result; + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat3x2 make_mat3x2(T const * const ptr) + { + detail::tmat3x2 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x2)); + return Result; + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat3x3 make_mat3x3(T const * const ptr) + { + detail::tmat3x3 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x3)); + return Result; + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat3x4 make_mat3x4(T const * const ptr) + { + detail::tmat3x4 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x4)); + return Result; + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat4x2 make_mat4x2(T const * const ptr) + { + detail::tmat4x2 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x2)); + return Result; + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat4x3 make_mat4x3(T const * const ptr) + { + detail::tmat4x3 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x3)); + return Result; + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat4x4 make_mat4x4(T const * const ptr) + { + detail::tmat4x4 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x4)); + return Result; + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat2x2 make_mat2(T const * const ptr) + { + return make_mat2x2(ptr); + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat3x3 make_mat3(T const * const ptr) + { + return make_mat3x3(ptr); + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat4x4 make_mat4(T const * const ptr) + { + return make_mat4x4(ptr); + } + + //! Build a quaternion from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tquat make_quat(T const * const ptr) + { + detail::tquat Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tquat)); + return Result; + } + + /// @} +}//namespace glm + diff --git a/include/gal/opengl/glm/gtc/ulp.hpp b/include/gal/opengl/glm/gtc/ulp.hpp new file mode 100644 index 0000000000..9f79d57d52 --- /dev/null +++ b/include/gal/opengl/glm/gtc/ulp.hpp @@ -0,0 +1,90 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_ulp +/// @file glm/gtc/ulp.hpp +/// @date 2011-02-21 / 2011-12-12 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtc_ulp GLM_GTC_ulp +/// @ingroup gtc +/// +/// @brief Allow the measurement of the accuracy of a function against a reference +/// implementation. This extension works on floating-point data and provide results +/// in ULP. +/// need to be included to use these features. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_ulp +#define GLM_GTC_ulp GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_ulp extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_ulp + /// @{ + + /// Return the next ULP value(s) after the input value(s). + /// @see gtc_ulp + template + genType next_float(genType const & x); + + /// Return the previous ULP value(s) before the input value(s). + /// @see gtc_ulp + template + genType prev_float(genType const & x); + + /// Return the value(s) ULP distance after the input value(s). + /// @see gtc_ulp + template + genType next_float(genType const & x, uint const & Distance); + + /// Return the value(s) ULP distance before the input value(s). + /// @see gtc_ulp + template + genType prev_float(genType const & x, uint const & Distance); + + /// Return the distance in the number of ULP between 2 scalars. + /// @see gtc_ulp + template + uint float_distance(T const & x, T const & y); + + /// Return the distance in the number of ULP between 2 vectors. + /// @see gtc_ulp + template class vecType> + vecType float_distance(vecType const & x, vecType const & y); + + /// @} +}// namespace glm + +#include "ulp.inl" + +#endif//GLM_GTC_ulp + diff --git a/include/gal/opengl/glm/gtc/ulp.inl b/include/gal/opengl/glm/gtc/ulp.inl new file mode 100644 index 0000000000..b336349130 --- /dev/null +++ b/include/gal/opengl/glm/gtc/ulp.inl @@ -0,0 +1,314 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_ulp +/// @file glm/gtc/ulp.inl +/// @date 2011-03-07 / 2012-04-07 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// +/// Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +/// +/// Developed at SunPro, a Sun Microsystems, Inc. business. +/// Permission to use, copy, modify, and distribute this +/// software is freely granted, provided that this notice +/// is preserved. +/////////////////////////////////////////////////////////////////////////////////// + +#include +#include + +#pragma warning(push) +#pragma warning(disable : 4127) + +typedef union +{ + float value; + /* FIXME: Assumes 32 bit int. */ + unsigned int word; +} ieee_float_shape_type; + +typedef union +{ + double value; + struct + { + glm::detail::int32 lsw; + glm::detail::int32 msw; + } parts; +} ieee_double_shape_type; + +#define GLM_EXTRACT_WORDS(ix0,ix1,d) \ + do { \ + ieee_double_shape_type ew_u; \ + ew_u.value = (d); \ + (ix0) = ew_u.parts.msw; \ + (ix1) = ew_u.parts.lsw; \ + } while (0) + +#define GLM_GET_FLOAT_WORD(i,d) \ + do { \ + ieee_float_shape_type gf_u; \ + gf_u.value = (d); \ + (i) = gf_u.word; \ + } while (0) + +#define GLM_SET_FLOAT_WORD(d,i) \ + do { \ + ieee_float_shape_type sf_u; \ + sf_u.word = (i); \ + (d) = sf_u.value; \ + } while (0) + +#define GLM_INSERT_WORDS(d,ix0,ix1) \ + do { \ + ieee_double_shape_type iw_u; \ + iw_u.parts.msw = (ix0); \ + iw_u.parts.lsw = (ix1); \ + (d) = iw_u.value; \ + } while (0) + +namespace glm{ +namespace detail +{ + GLM_FUNC_QUALIFIER float nextafterf(float x, float y) + { + volatile float t; + glm::detail::int32 hx, hy, ix, iy; + + GLM_GET_FLOAT_WORD(hx, x); + GLM_GET_FLOAT_WORD(hy, y); + ix = hx&0x7fffffff; // |x| + iy = hy&0x7fffffff; // |y| + + if((ix>0x7f800000) || // x is nan + (iy>0x7f800000)) // y is nan + return x+y; + if(x==y) return y; // x=y, return y + if(ix==0) { // x == 0 + GLM_SET_FLOAT_WORD(x,(hy&0x80000000)|1);// return +-minsubnormal + t = x*x; + if(t==x) return t; else return x; // raise underflow flag + } + if(hx>=0) { // x > 0 + if(hx>hy) { // x > y, x -= ulp + hx -= 1; + } else { // x < y, x += ulp + hx += 1; + } + } else { // x < 0 + if(hy>=0||hx>hy){ // x < y, x -= ulp + hx -= 1; + } else { // x > y, x += ulp + hx += 1; + } + } + hy = hx&0x7f800000; + if(hy>=0x7f800000) return x+x; // overflow + if(hy<0x00800000) { // underflow + t = x*x; + if(t!=x) { // raise underflow flag + GLM_SET_FLOAT_WORD(y,hx); + return y; + } + } + GLM_SET_FLOAT_WORD(x,hx); + return x; + } + + GLM_FUNC_QUALIFIER double nextafter(double x, double y) + { + volatile double t; + glm::detail::int32 hx, hy, ix, iy; + glm::detail::uint32 lx, ly; + + GLM_EXTRACT_WORDS(hx, lx, x); + GLM_EXTRACT_WORDS(hy, ly, y); + ix = hx & 0x7fffffff; // |x| + iy = hy & 0x7fffffff; // |y| + + if(((ix>=0x7ff00000)&&((ix-0x7ff00000)|lx)!=0) || // x is nan + ((iy>=0x7ff00000)&&((iy-0x7ff00000)|ly)!=0)) // y is nan + return x+y; + if(x==y) return y; // x=y, return y + if((ix|lx)==0) { // x == 0 + GLM_INSERT_WORDS(x, hy & 0x80000000, 1); // return +-minsubnormal + t = x*x; + if(t==x) return t; else return x; // raise underflow flag + } + if(hx>=0) { // x > 0 + if(hx>hy||((hx==hy)&&(lx>ly))) { // x > y, x -= ulp + if(lx==0) hx -= 1; + lx -= 1; + } else { // x < y, x += ulp + lx += 1; + if(lx==0) hx += 1; + } + } else { // x < 0 + if(hy>=0||hx>hy||((hx==hy)&&(lx>ly))){// x < y, x -= ulp + if(lx==0) hx -= 1; + lx -= 1; + } else { // x > y, x += ulp + lx += 1; + if(lx==0) hx += 1; + } + } + hy = hx&0x7ff00000; + if(hy>=0x7ff00000) return x+x; // overflow + if(hy<0x00100000) { // underflow + t = x*x; + if(t!=x) { // raise underflow flag + GLM_INSERT_WORDS(y,hx,lx); + return y; + } + } + GLM_INSERT_WORDS(x,hx,lx); + return x; + } +}//namespace detail +}//namespace glm + +#pragma warning(pop) + +#if((GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS))) +# define GLM_NEXT_AFTER_FLT(x, toward) glm::detail::nextafterf((x), (toward)) +# define GLM_NEXT_AFTER_DBL(x, toward) _nextafter((x), (toward)) +#else +# define GLM_NEXT_AFTER_FLT(x, toward) nextafterf((x), (toward)) +# define GLM_NEXT_AFTER_DBL(x, toward) nextafter((x), (toward)) +#endif + +namespace glm +{ + GLM_FUNC_QUALIFIER float next_float(float const & x) + { + return GLM_NEXT_AFTER_FLT(x, std::numeric_limits::max()); + } + + GLM_FUNC_QUALIFIER double next_float(double const & x) + { + return GLM_NEXT_AFTER_DBL(x, std::numeric_limits::max()); + } + + template class vecType> + GLM_FUNC_QUALIFIER vecType next_float(vecType const & x) + { + vecType Result; + for(std::size_t i = 0; i < Result.length(); ++i) + Result[i] = next_float(x[i]); + return Result; + } + + GLM_FUNC_QUALIFIER float prev_float(float const & x) + { + return GLM_NEXT_AFTER_FLT(x, std::numeric_limits::min()); + } + + GLM_FUNC_QUALIFIER double prev_float(double const & x) + { + return GLM_NEXT_AFTER_DBL(x, std::numeric_limits::min()); + } + + template class vecType> + GLM_FUNC_QUALIFIER vecType prev_float(vecType const & x) + { + vecType Result; + for(std::size_t i = 0; i < Result.length(); ++i) + Result[i] = prev_float(x[i]); + return Result; + } + + template + GLM_FUNC_QUALIFIER T next_float(T const & x, uint const & ulps) + { + T temp = x; + for(std::size_t i = 0; i < ulps; ++i) + temp = next_float(temp); + return temp; + } + + template class vecType> + GLM_FUNC_QUALIFIER vecType next_float(vecType const & x, vecType const & ulps) + { + vecType Result; + for(std::size_t i = 0; i < Result.length(); ++i) + Result[i] = next_float(x[i], ulps[i]); + return Result; + } + + template + GLM_FUNC_QUALIFIER T prev_float(T const & x, uint const & ulps) + { + T temp = x; + for(std::size_t i = 0; i < ulps; ++i) + temp = prev_float(temp); + return temp; + } + + template class vecType> + GLM_FUNC_QUALIFIER vecType prev_float(vecType const & x, vecType const & ulps) + { + vecType Result; + for(std::size_t i = 0; i < Result.length(); ++i) + Result[i] = prev_float(x[i], ulps[i]); + return Result; + } + + template + GLM_FUNC_QUALIFIER uint float_distance(T const & x, T const & y) + { + uint ulp = 0; + + if(x < y) + { + T temp = x; + while(temp != y && ulp < std::numeric_limits::max()) + { + ++ulp; + temp = next_float(temp); + } + } + else if(y < x) + { + T temp = y; + while(temp != x && ulp < std::numeric_limits::max()) + { + ++ulp; + temp = next_float(temp); + } + } + else // == + { + + } + + return ulp; + } + + template class vecType> + GLM_FUNC_QUALIFIER vecType float_distance(vecType const & x, vecType const & y) + { + vecType Result; + for(std::size_t i = 0; i < Result.length(); ++i) + Result[i] = float_distance(x[i], y[i]); + return Result; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/associated_min_max.hpp b/include/gal/opengl/glm/gtx/associated_min_max.hpp new file mode 100644 index 0000000000..c6fc3757b1 --- /dev/null +++ b/include/gal/opengl/glm/gtx/associated_min_max.hpp @@ -0,0 +1,106 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_associated_min_max +/// @file glm/gtx/associated_min_max.hpp +/// @date 2008-03-10 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_extented_min_max (dependence) +/// +/// @defgroup gtx_associated_min_max GLM_GTX_associated_min_max +/// @ingroup gtx +/// +/// @brief Min and max functions that return associated values not the compared onces. +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_associated_min_max +#define GLM_GTX_associated_min_max GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_associated_min_max extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_associated_min_max + /// @{ + + /// Min comparison between 2 variables + /// @see gtx_associated_min_max + template + genTypeU associatedMin( + const genTypeT& x, const genTypeU& a, + const genTypeT& y, const genTypeU& b); + + /// Min comparison between 3 variables + /// @see gtx_associated_min_max + template + genTypeU associatedMin( + const genTypeT& x, const genTypeU& a, + const genTypeT& y, const genTypeU& b, + const genTypeT& z, const genTypeU& c); + + /// Min comparison between 4 variables + /// @see gtx_associated_min_max + template + genTypeU associatedMin( + const genTypeT& x, const genTypeU& a, + const genTypeT& y, const genTypeU& b, + const genTypeT& z, const genTypeU& c, + const genTypeT& w, const genTypeU& d); + + /// Max comparison between 2 variables + /// @see gtx_associated_min_max + template + genTypeU associatedMax( + const genTypeT& x, const genTypeU& a, + const genTypeT& y, const genTypeU& b); + + /// Max comparison between 3 variables + /// @see gtx_associated_min_max + template + genTypeU associatedMax( + const genTypeT& x, const genTypeU& a, + const genTypeT& y, const genTypeU& b, + const genTypeT& z, const genTypeU& c); + + /// Max comparison between 4 variables + /// @see gtx_associated_min_max + template + genTypeU associatedMax( + const genTypeT& x, const genTypeU& a, + const genTypeT& y, const genTypeU& b, + const genTypeT& z, const genTypeU& c, + const genTypeT& w, const genTypeU& d); + + /// @} +} //namespace glm + +#include "associated_min_max.inl" + +#endif//GLM_GTX_associated_min_max diff --git a/include/gal/opengl/glm/gtx/associated_min_max.inl b/include/gal/opengl/glm/gtx/associated_min_max.inl new file mode 100644 index 0000000000..f0e36f5edb --- /dev/null +++ b/include/gal/opengl/glm/gtx/associated_min_max.inl @@ -0,0 +1,912 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-03-10 +// Updated : 2008-03-15 +// Licence : This source is under MIT License +// File : gtx_associated_min_max.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ + +// Min comparison between 2 variables +template +GLM_FUNC_QUALIFIER U associatedMin(T x, U a, T y, U b) +{ + return x < y ? a : b; +} + +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMin +( + const detail::tvec2& x, const detail::tvec2& a, + const detail::tvec2& y, const detail::tvec2& b +) +{ + detail::tvec2 Result; + //Result.x = x[0] < y[0] ? a[0] : b[0]; + //Result.y = x[1] < y[1] ? a[1] : b[1]; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + Result[i] = x[i] < y[i] ? a[i] : b[i]; + return Result; +} + +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMin +( + const detail::tvec3& x, const detail::tvec3& a, + const detail::tvec3& y, const detail::tvec3& b +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + Result[i] = x[i] < y[i] ? a[i] : b[i]; + return Result; +} + +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMin +( + const detail::tvec4& x, const detail::tvec4& a, + const detail::tvec4& y, const detail::tvec4& b +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + Result[i] = x[i] < y[i] ? a[i] : b[i]; + return Result; +} + +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMin +( + T x, const detail::tvec2& a, + T y, const detail::tvec2& b +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + Result[i] = x < y ? a[i] : b[i]; + return Result; +} + +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMin +( + T x, const detail::tvec3& a, + T y, const detail::tvec3& b +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + Result[i] = x < y ? a[i] : b[i]; + return Result; +} + +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMin +( + T x, const detail::tvec4& a, + T y, const detail::tvec4& b +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + Result[i] = x < y ? a[i] : b[i]; + return Result; +} + +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMin +( + const detail::tvec2& x, U a, + const detail::tvec2& y, U b +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + Result[i] = x[i] < y[i] ? a : b; + return Result; +} + +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMin +( + const detail::tvec3& x, U a, + const detail::tvec3& y, U b +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + Result[i] = x[i] < y[i] ? a : b; + return Result; +} + +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMin +( + const detail::tvec4& x, U a, + const detail::tvec4& y, U b +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + Result[i] = x[i] < y[i] ? a : b; + return Result; +} + +// Min comparison between 3 variables +template +GLM_FUNC_QUALIFIER U associatedMin +( + T x, U a, + T y, U b, + T z, U c +) +{ + U Result = x < y ? (x < z ? a : c) : (y < z ? b : c); + return Result; +} + +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMin +( + const detail::tvec2& x, const detail::tvec2& a, + const detail::tvec2& y, const detail::tvec2& b, + const detail::tvec2& z, const detail::tvec2& c +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + Result[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]); + return Result; +} + +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMin +( + const detail::tvec3& x, const detail::tvec3& a, + const detail::tvec3& y, const detail::tvec3& b, + const detail::tvec3& z, const detail::tvec3& c +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + Result[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]); + return Result; +} + +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMin +( + const detail::tvec4& x, const detail::tvec4& a, + const detail::tvec4& y, const detail::tvec4& b, + const detail::tvec4& z, const detail::tvec4& c +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + Result[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]); + return Result; +} + +// Min comparison between 4 variables +template +GLM_FUNC_QUALIFIER U associatedMin +( + T x, U a, + T y, U b, + T z, U c, + T w, U d +) +{ + T Test1 = min(x, y); + T Test2 = min(z, w);; + U Result1 = x < y ? a : b; + U Result2 = z < w ? c : d; + U Result = Test1 < Test2 ? Result1 : Result2; + return Result; +} + +// Min comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMin +( + const detail::tvec2& x, const detail::tvec2& a, + const detail::tvec2& y, const detail::tvec2& b, + const detail::tvec2& z, const detail::tvec2& c, + const detail::tvec2& w, const detail::tvec2& d +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + { + T Test1 = min(x[i], y[i]); + T Test2 = min(z[i], w[i]); + U Result1 = x[i] < y[i] ? a[i] : b[i]; + U Result2 = z[i] < w[i] ? c[i] : d[i]; + Result[i] = Test1 < Test2 ? Result1 : Result2; + } + return Result; +} + +// Min comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMin +( + const detail::tvec3& x, const detail::tvec3& a, + const detail::tvec3& y, const detail::tvec3& b, + const detail::tvec3& z, const detail::tvec3& c, + const detail::tvec3& w, const detail::tvec3& d +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + { + T Test1 = min(x[i], y[i]); + T Test2 = min(z[i], w[i]); + U Result1 = x[i] < y[i] ? a[i] : b[i]; + U Result2 = z[i] < w[i] ? c[i] : d[i]; + Result[i] = Test1 < Test2 ? Result1 : Result2; + } + return Result; +} + +// Min comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMin +( + const detail::tvec4& x, const detail::tvec4& a, + const detail::tvec4& y, const detail::tvec4& b, + const detail::tvec4& z, const detail::tvec4& c, + const detail::tvec4& w, const detail::tvec4& d +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + { + T Test1 = min(x[i], y[i]); + T Test2 = min(z[i], w[i]); + U Result1 = x[i] < y[i] ? a[i] : b[i]; + U Result2 = z[i] < w[i] ? c[i] : d[i]; + Result[i] = Test1 < Test2 ? Result1 : Result2; + } + return Result; +} + +// Min comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMin +( + T x, const detail::tvec2& a, + T y, const detail::tvec2& b, + T z, const detail::tvec2& c, + T w, const detail::tvec2& d +) +{ + T Test1 = min(x, y); + T Test2 = min(z, w); + + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + { + U Result1 = x < y ? a[i] : b[i]; + U Result2 = z < w ? c[i] : d[i]; + Result[i] = Test1 < Test2 ? Result1 : Result2; + } + return Result; +} + +// Min comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMin +( + T x, const detail::tvec3& a, + T y, const detail::tvec3& b, + T z, const detail::tvec3& c, + T w, const detail::tvec3& d +) +{ + T Test1 = min(x, y); + T Test2 = min(z, w); + + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + { + U Result1 = x < y ? a[i] : b[i]; + U Result2 = z < w ? c[i] : d[i]; + Result[i] = Test1 < Test2 ? Result1 : Result2; + } + return Result; +} + +// Min comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMin +( + T x, const detail::tvec4& a, + T y, const detail::tvec4& b, + T z, const detail::tvec4& c, + T w, const detail::tvec4& d +) +{ + T Test1 = min(x, y); + T Test2 = min(z, w); + + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + { + U Result1 = x < y ? a[i] : b[i]; + U Result2 = z < w ? c[i] : d[i]; + Result[i] = Test1 < Test2 ? Result1 : Result2; + } + return Result; +} + +// Min comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMin +( + const detail::tvec2& x, U a, + const detail::tvec2& y, U b, + const detail::tvec2& z, U c, + const detail::tvec2& w, U d +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + { + T Test1 = min(x[i], y[i]); + T Test2 = min(z[i], w[i]);; + U Result1 = x[i] < y[i] ? a : b; + U Result2 = z[i] < w[i] ? c : d; + Result[i] = Test1 < Test2 ? Result1 : Result2; + } + return Result; +} + +// Min comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMin +( + const detail::tvec3& x, U a, + const detail::tvec3& y, U b, + const detail::tvec3& z, U c, + const detail::tvec3& w, U d +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + { + T Test1 = min(x[i], y[i]); + T Test2 = min(z[i], w[i]);; + U Result1 = x[i] < y[i] ? a : b; + U Result2 = z[i] < w[i] ? c : d; + Result[i] = Test1 < Test2 ? Result1 : Result2; + } + return Result; +} + +// Min comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMin +( + const detail::tvec4& x, U a, + const detail::tvec4& y, U b, + const detail::tvec4& z, U c, + const detail::tvec4& w, U d +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + { + T Test1 = min(x[i], y[i]); + T Test2 = min(z[i], w[i]);; + U Result1 = x[i] < y[i] ? a : b; + U Result2 = z[i] < w[i] ? c : d; + Result[i] = Test1 < Test2 ? Result1 : Result2; + } + return Result; +} + +// Max comparison between 2 variables +template +GLM_FUNC_QUALIFIER U associatedMax(T x, U a, T y, U b) +{ + return x > y ? a : b; +} + +// Max comparison between 2 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +( + const detail::tvec2& x, const detail::tvec2& a, + const detail::tvec2& y, const detail::tvec2& b +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + Result[i] = x[i] > y[i] ? a[i] : b[i]; + return Result; +} + +// Max comparison between 2 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +( + const detail::tvec3& x, const detail::tvec3& a, + const detail::tvec3& y, const detail::tvec3& b +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + Result[i] = x[i] > y[i] ? a[i] : b[i]; + return Result; +} + +// Max comparison between 2 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +( + const detail::tvec4& x, const detail::tvec4& a, + const detail::tvec4& y, const detail::tvec4& b +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + Result[i] = x[i] > y[i] ? a[i] : b[i]; + return Result; +} + +// Max comparison between 2 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +( + T x, const detail::tvec2& a, + T y, const detail::tvec2& b +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + Result[i] = x > y ? a[i] : b[i]; + return Result; +} + +// Max comparison between 2 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +( + T x, const detail::tvec3& a, + T y, const detail::tvec3& b +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + Result[i] = x > y ? a[i] : b[i]; + return Result; +} + +// Max comparison between 2 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +( + T x, const detail::tvec4& a, + T y, const detail::tvec4& b +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + Result[i] = x > y ? a[i] : b[i]; + return Result; +} + +// Max comparison between 2 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +( + const detail::tvec2& x, U a, + const detail::tvec2& y, U b +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + Result[i] = x[i] > y[i] ? a : b; + return Result; +} + +// Max comparison between 2 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +( + const detail::tvec3& x, U a, + const detail::tvec3& y, U b +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + Result[i] = x[i] > y[i] ? a : b; + return Result; +} + +// Max comparison between 2 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +( + const detail::tvec4& x, U a, + const detail::tvec4& y, U b +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + Result[i] = x[i] > y[i] ? a : b; + return Result; +} + +// Max comparison between 3 variables +template +GLM_FUNC_QUALIFIER U associatedMax +( + T x, U a, + T y, U b, + T z, U c +) +{ + U Result = x > y ? (x > z ? a : c) : (y > z ? b : c); + return Result; +} + +// Max comparison between 3 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +( + const detail::tvec2& x, const detail::tvec2& a, + const detail::tvec2& y, const detail::tvec2& b, + const detail::tvec2& z, const detail::tvec2& c +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]); + return Result; +} + +// Max comparison between 3 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +( + const detail::tvec3& x, const detail::tvec3& a, + const detail::tvec3& y, const detail::tvec3& b, + const detail::tvec3& z, const detail::tvec3& c +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]); + return Result; +} + +// Max comparison between 3 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +( + const detail::tvec4& x, const detail::tvec4& a, + const detail::tvec4& y, const detail::tvec4& b, + const detail::tvec4& z, const detail::tvec4& c +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]); + return Result; +} + +// Max comparison between 3 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +( + T x, const detail::tvec2& a, + T y, const detail::tvec2& b, + T z, const detail::tvec2& c +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + Result[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]); + return Result; +} + +// Max comparison between 3 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +( + T x, const detail::tvec3& a, + T y, const detail::tvec3& b, + T z, const detail::tvec3& c +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + Result[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]); + return Result; +} + +// Max comparison between 3 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +( + T x, const detail::tvec4& a, + T y, const detail::tvec4& b, + T z, const detail::tvec4& c +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + Result[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]); + return Result; +} + +// Max comparison between 3 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +( + const detail::tvec2& x, U a, + const detail::tvec2& y, U b, + const detail::tvec2& z, U c +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c); + return Result; +} + +// Max comparison between 3 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +( + const detail::tvec3& x, U a, + const detail::tvec3& y, U b, + const detail::tvec3& z, U c +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c); + return Result; +} + +// Max comparison between 3 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +( + const detail::tvec4& x, U a, + const detail::tvec4& y, U b, + const detail::tvec4& z, U c +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c); + return Result; +} + +// Max comparison between 4 variables +template +GLM_FUNC_QUALIFIER U associatedMax +( + T x, U a, + T y, U b, + T z, U c, + T w, U d +) +{ + T Test1 = max(x, y); + T Test2 = max(z, w);; + U Result1 = x > y ? a : b; + U Result2 = z > w ? c : d; + U Result = Test1 > Test2 ? Result1 : Result2; + return Result; +} + +// Max comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +( + const detail::tvec2& x, const detail::tvec2& a, + const detail::tvec2& y, const detail::tvec2& b, + const detail::tvec2& z, const detail::tvec2& c, + const detail::tvec2& w, const detail::tvec2& d +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + { + T Test1 = max(x[i], y[i]); + T Test2 = max(z[i], w[i]); + U Result1 = x[i] > y[i] ? a[i] : b[i]; + U Result2 = z[i] > w[i] ? c[i] : d[i]; + Result[i] = Test1 > Test2 ? Result1 : Result2; + } + return Result; +} + +// Max comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +( + const detail::tvec3& x, const detail::tvec3& a, + const detail::tvec3& y, const detail::tvec3& b, + const detail::tvec3& z, const detail::tvec3& c, + const detail::tvec3& w, const detail::tvec3& d +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + { + T Test1 = max(x[i], y[i]); + T Test2 = max(z[i], w[i]); + U Result1 = x[i] > y[i] ? a[i] : b[i]; + U Result2 = z[i] > w[i] ? c[i] : d[i]; + Result[i] = Test1 > Test2 ? Result1 : Result2; + } + return Result; +} + +// Max comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +( + const detail::tvec4& x, const detail::tvec4& a, + const detail::tvec4& y, const detail::tvec4& b, + const detail::tvec4& z, const detail::tvec4& c, + const detail::tvec4& w, const detail::tvec4& d +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + { + T Test1 = max(x[i], y[i]); + T Test2 = max(z[i], w[i]); + U Result1 = x[i] > y[i] ? a[i] : b[i]; + U Result2 = z[i] > w[i] ? c[i] : d[i]; + Result[i] = Test1 > Test2 ? Result1 : Result2; + } + return Result; +} + +// Max comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +( + T x, const detail::tvec2& a, + T y, const detail::tvec2& b, + T z, const detail::tvec2& c, + T w, const detail::tvec2& d +) +{ + T Test1 = max(x, y); + T Test2 = max(z, w); + + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + { + U Result1 = x > y ? a[i] : b[i]; + U Result2 = z > w ? c[i] : d[i]; + Result[i] = Test1 > Test2 ? Result1 : Result2; + } + return Result; +} + +// Max comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +( + T x, const detail::tvec3& a, + T y, const detail::tvec3& b, + T z, const detail::tvec3& c, + T w, const detail::tvec3& d +) +{ + T Test1 = max(x, y); + T Test2 = max(z, w); + + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + { + U Result1 = x > y ? a[i] : b[i]; + U Result2 = z > w ? c[i] : d[i]; + Result[i] = Test1 > Test2 ? Result1 : Result2; + } + return Result; +} + +// Max comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +( + T x, const detail::tvec4& a, + T y, const detail::tvec4& b, + T z, const detail::tvec4& c, + T w, const detail::tvec4& d +) +{ + T Test1 = max(x, y); + T Test2 = max(z, w); + + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + { + U Result1 = x > y ? a[i] : b[i]; + U Result2 = z > w ? c[i] : d[i]; + Result[i] = Test1 > Test2 ? Result1 : Result2; + } + return Result; +} + +// Max comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +( + const detail::tvec2& x, U a, + const detail::tvec2& y, U b, + const detail::tvec2& z, U c, + const detail::tvec2& w, U d +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + { + T Test1 = max(x[i], y[i]); + T Test2 = max(z[i], w[i]);; + U Result1 = x[i] > y[i] ? a : b; + U Result2 = z[i] > w[i] ? c : d; + Result[i] = Test1 > Test2 ? Result1 : Result2; + } + return Result; +} + +// Max comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +( + const detail::tvec3& x, U a, + const detail::tvec3& y, U b, + const detail::tvec3& z, U c, + const detail::tvec3& w, U d +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + { + T Test1 = max(x[i], y[i]); + T Test2 = max(z[i], w[i]);; + U Result1 = x[i] > y[i] ? a : b; + U Result2 = z[i] > w[i] ? c : d; + Result[i] = Test1 > Test2 ? Result1 : Result2; + } + return Result; +} + +// Max comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +( + const detail::tvec4& x, U a, + const detail::tvec4& y, U b, + const detail::tvec4& z, U c, + const detail::tvec4& w, U d +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + { + T Test1 = max(x[i], y[i]); + T Test2 = max(z[i], w[i]);; + U Result1 = x[i] > y[i] ? a : b; + U Result2 = z[i] > w[i] ? c : d; + Result[i] = Test1 > Test2 ? Result1 : Result2; + } + return Result; +} + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/bit.hpp b/include/gal/opengl/glm/gtx/bit.hpp new file mode 100644 index 0000000000..510a4609a6 --- /dev/null +++ b/include/gal/opengl/glm/gtx/bit.hpp @@ -0,0 +1,140 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_bit +/// @file glm/gtx/bit.hpp +/// @date 2007-03-14 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_half_float (dependence) +/// +/// @defgroup gtx_bit GLM_GTX_bit +/// @ingroup gtx +/// +/// @brief Allow to perform bit operations on integer values +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_bit +#define GLM_GTX_bit GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_bit extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_bit + /// @{ + + /// Build a mask of 'count' bits + /// @see gtx_bit + template + genIType mask(genIType const & count); + + /// Component wise extraction of bit fields. + /// genType and genIType could be a scalar or a vector. + /// @see gtx_bit + template + GLM_DEPRECATED genIUType extractField( + genIUType const & v, + sizeType const & first, + sizeType const & count); + + //! Find the lowest bit set to 1 in a integer variable. + /// @see gtx_bit + template + GLM_DEPRECATED int lowestBit(genType const & value); + + //! Find the highest bit set to 1 in a integer variable. + /// @see gtx_bit + template + GLM_DEPRECATED int highestBit(genType const & value); + + //! Find the highest bit set to 1 in a integer variable and return its value. + /// @see gtx_bit + template + genType highestBitValue(genType const & value); + + //! Return true if the value is a power of two number. + /// @see gtx_bit + template + bool isPowerOfTwo(genType const & value); + + //! Return the power of two number which value is just higher the input value. + /// @see gtx_bit + template + genType powerOfTwoAbove(genType const & value); + + //! Return the power of two number which value is just lower the input value. + /// @see gtx_bit + template + genType powerOfTwoBelow(genType const & value); + + //! Return the power of two number which value is the closet to the input value. + /// @see gtx_bit + template + genType powerOfTwoNearest(genType const & value); + + //! Revert all bits of any integer based type. + /// @see gtx_bit + template + GLM_DEPRECATED genType bitRevert(genType const & value); + + //! Rotate all bits to the right. + /// @see gtx_bit + template + genType bitRotateRight(genType const & In, std::size_t Shift); + + //! Rotate all bits to the left. + /// @see gtx_bit + template + genType bitRotateLeft(genType const & In, std::size_t Shift); + + //! Set to 1 a range of bits. + /// @see gtx_bit + template + genIUType fillBitfieldWithOne( + genIUType const & Value, + int const & FromBit, + int const & ToBit); + + //! Set to 0 a range of bits. + /// @see gtx_bit + template + genIUType fillBitfieldWithZero( + genIUType const & Value, + int const & FromBit, + int const & ToBit); + + /// @} +} //namespace glm + +#include "bit.inl" + +#endif//GLM_GTX_bit diff --git a/include/gal/opengl/glm/gtx/bit.inl b/include/gal/opengl/glm/gtx/bit.inl new file mode 100644 index 0000000000..5dbd0b5697 --- /dev/null +++ b/include/gal/opengl/glm/gtx/bit.inl @@ -0,0 +1,600 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-03-14 +// Updated : 2008-11-14 +// Licence : This source is under MIT License +// File : glm/gtx/bit.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER genIType mask + ( + genIType const & count + ) + { + return ((genIType(1) << (count)) - genIType(1)); + } + + VECTORIZE_VEC(mask) + + // extractField + template + GLM_FUNC_QUALIFIER genIType extractField + ( + half const & value, + genIType const & first, + genIType const & count + ) + { + assert(first + count < sizeof(half)); + return (value._data() << first) >> ((sizeof(half) << 3) - count); + } + + template + GLM_FUNC_QUALIFIER genIType extractField + ( + float const & value, + genIType const & first, + genIType const & count + ) + { + assert(first + count < sizeof(float)); + return (detail::uif32(value).i << first) >> ((sizeof(float) << 3) - count); + } + + template + GLM_FUNC_QUALIFIER genIType extractField + ( + double const & value, + genIType const & first, + genIType const & count + ) + { + assert(first + count < sizeof(double)); + return (detail::uif64(value).i << first) >> ((sizeof(double) << genIType(3)) - count); + } + + template + GLM_FUNC_QUALIFIER genIUType extractField + ( + genIUType const & Value, + sizeType const & First, + sizeType const & Count + ) + { + sizeType GenSize = sizeof(genIUType) << 3; + + assert(First + Count <= GenSize); + + genIUType ShiftLeft = Count ? Value << (GenSize - (Count + First)) : 0; + genIUType ShiftBack = ShiftLeft >> genIUType(GenSize - Count); + + return ShiftBack; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 extractField + ( + detail::tvec2 const & value, + sizeType const & first, + sizeType const & count + ) + { + return detail::tvec2( + extractField(value[0], first, count), + extractField(value[1], first, count)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 extractField + ( + detail::tvec3 const & value, + sizeType const & first, + sizeType const & count + ) + { + return detail::tvec3( + extractField(value[0], first, count), + extractField(value[1], first, count), + extractField(value[2], first, count)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 extractField + ( + detail::tvec4 const & value, + sizeType const & first, + sizeType const & count + ) + { + return detail::tvec4( + extractField(value[0], first, count), + extractField(value[1], first, count), + extractField(value[2], first, count), + extractField(value[3], first, count)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 extractField + ( + detail::tvec2 const & value, + detail::tvec2 const & first, + detail::tvec2 const & count + ) + { + return detail::tvec2( + extractField(value[0], first[0], count[0]), + extractField(value[1], first[1], count[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 extractField + ( + detail::tvec3 const & value, + detail::tvec3 const & first, + detail::tvec3 const & count + ) + { + return detail::tvec3( + extractField(value[0], first[0], count[0]), + extractField(value[1], first[1], count[1]), + extractField(value[2], first[2], count[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 extractField + ( + detail::tvec4 const & value, + detail::tvec4 const & first, + detail::tvec4 const & count + ) + { + return detail::tvec4( + extractField(value[0], first[0], count[0]), + extractField(value[1], first[1], count[1]), + extractField(value[2], first[2], count[2]), + extractField(value[3], first[3], count[3])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 extractField + ( + genIUType const & value, + detail::tvec2 const & first, + detail::tvec2 const & count + ) + { + return detail::tvec2( + extractField(value, first[0], count[0]), + extractField(value, first[1], count[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 extractField + ( + genIUType const & value, + detail::tvec3 const & first, + detail::tvec3 const & count + ) + { + return detail::tvec3( + extractField(value, first[0], count[0]), + extractField(value, first[1], count[1]), + extractField(value, first[2], count[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 extractField + ( + genIUType const & value, + detail::tvec4 const & first, + detail::tvec4 const & count + ) + { + return detail::tvec4( + extractField(value, first[0], count[0]), + extractField(value, first[1], count[1]), + extractField(value, first[2], count[2]), + extractField(value, first[3], count[3])); + } + + // lowestBit + template + GLM_FUNC_QUALIFIER int lowestBit + ( + genType const & Value + ) + { + assert(Value != genType(0)); // not valid call + + genType Bit; + for(Bit = genType(0); !(Value & (1 << Bit)); ++Bit){} + return Bit; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 lowestBit + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + lowestBit(value[0]), + lowestBit(value[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 lowestBit + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + lowestBit(value[0]), + lowestBit(value[1]), + lowestBit(value[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 lowestBit + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + lowestBit(value[0]), + lowestBit(value[1]), + lowestBit(value[2]), + lowestBit(value[3])); + } + + // highestBit + template + GLM_FUNC_QUALIFIER int highestBit + ( + genType const & value + ) + { + assert(value != genType(0)); // not valid call + + genType bit = genType(-1); + for(genType tmp = value; tmp; tmp >>= 1, ++bit){} + return bit; + } + + //template <> + //GLM_FUNC_QUALIFIER int highestBit + //( + // int value + //) + //{ + // int bit = -1; + // for(int tmp = value; tmp; tmp >>= 1, ++bit); + // return bit; + //} + + template + GLM_FUNC_QUALIFIER detail::tvec2 highestBit + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + highestBit(value[0]), + highestBit(value[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 highestBit + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + highestBit(value[0]), + highestBit(value[1]), + highestBit(value[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 highestBit + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + highestBit(value[0]), + highestBit(value[1]), + highestBit(value[2]), + highestBit(value[3])); + } + + // highestBitValue + template + GLM_FUNC_QUALIFIER genType highestBitValue + ( + genType const & value + ) + { + genType tmp = value; + genType result = genType(0); + while(tmp) + { + result = (tmp & (~tmp + 1)); // grab lowest bit + tmp &= ~result; // clear lowest bit + } + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 highestBitValue + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + highestBitValue(value[0]), + highestBitValue(value[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 highestBitValue + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + highestBitValue(value[0]), + highestBitValue(value[1]), + highestBitValue(value[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 highestBitValue + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + highestBitValue(value[0]), + highestBitValue(value[1]), + highestBitValue(value[2]), + highestBitValue(value[3])); + } + + // isPowerOfTwo + template + GLM_FUNC_QUALIFIER bool isPowerOfTwo(genType const & Value) + { + //detail::If::is_signed>::apply(abs, Value); + //return !(Value & (Value - 1)); + + // For old complier? + genType Result = Value; + if(std::numeric_limits::is_signed) + Result = abs(Result); + return !(Result & (Result - 1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 isPowerOfTwo + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + isPowerOfTwo(value[0]), + isPowerOfTwo(value[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 isPowerOfTwo + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + isPowerOfTwo(value[0]), + isPowerOfTwo(value[1]), + isPowerOfTwo(value[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 isPowerOfTwo + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + isPowerOfTwo(value[0]), + isPowerOfTwo(value[1]), + isPowerOfTwo(value[2]), + isPowerOfTwo(value[3])); + } + + // powerOfTwoAbove + template + GLM_FUNC_QUALIFIER genType powerOfTwoAbove(genType const & value) + { + return isPowerOfTwo(value) ? value : highestBitValue(value) << 1; + } + + VECTORIZE_VEC(powerOfTwoAbove) + + // powerOfTwoBelow + template + GLM_FUNC_QUALIFIER genType powerOfTwoBelow + ( + genType const & value + ) + { + return isPowerOfTwo(value) ? value : highestBitValue(value); + } + + VECTORIZE_VEC(powerOfTwoBelow) + + // powerOfTwoNearest + template + GLM_FUNC_QUALIFIER genType powerOfTwoNearest + ( + genType const & value + ) + { + if(isPowerOfTwo(value)) + return value; + + genType prev = highestBitValue(value); + genType next = prev << 1; + return (next - value) < (value - prev) ? next : prev; + } + + VECTORIZE_VEC(powerOfTwoNearest) + + template + GLM_FUNC_QUALIFIER genType bitRevert(genType const & In) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitRevert' only accept integer values"); + + genType Out = 0; + std::size_t BitSize = sizeof(genType) * 8; + for(std::size_t i = 0; i < BitSize; ++i) + if(In & (genType(1) << i)) + Out |= genType(1) << (BitSize - 1 - i); + return Out; + } + + VECTORIZE_VEC(bitRevert) + + template + GLM_FUNC_QUALIFIER genType bitRotateRight(genType const & In, std::size_t Shift) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitRotateRight' only accept integer values"); + + std::size_t BitSize = sizeof(genType) * 8; + return (In << Shift) | (In >> (BitSize - Shift)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 bitRotateRight + ( + detail::tvec2 const & Value, + std::size_t Shift + ) + { + return detail::tvec2( + bitRotateRight(Value[0], Shift), + bitRotateRight(Value[1], Shift)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 bitRotateRight + ( + detail::tvec3 const & Value, + std::size_t Shift + ) + { + return detail::tvec3( + bitRotateRight(Value[0], Shift), + bitRotateRight(Value[1], Shift), + bitRotateRight(Value[2], Shift)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 bitRotateRight + ( + detail::tvec4 const & Value, + std::size_t Shift + ) + { + return detail::tvec4( + bitRotateRight(Value[0], Shift), + bitRotateRight(Value[1], Shift), + bitRotateRight(Value[2], Shift), + bitRotateRight(Value[3], Shift)); + } + + template + GLM_FUNC_QUALIFIER genType bitRotateLeft(genType const & In, std::size_t Shift) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitRotateLeft' only accept integer values"); + + std::size_t BitSize = sizeof(genType) * 8; + return (In >> Shift) | (In << (BitSize - Shift)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 bitRotateLeft + ( + detail::tvec2 const & Value, + std::size_t Shift + ) + { + return detail::tvec2( + bitRotateLeft(Value[0], Shift), + bitRotateLeft(Value[1], Shift)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 bitRotateLeft + ( + detail::tvec3 const & Value, + std::size_t Shift + ) + { + return detail::tvec3( + bitRotateLeft(Value[0], Shift), + bitRotateLeft(Value[1], Shift), + bitRotateLeft(Value[2], Shift)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 bitRotateLeft + ( + detail::tvec4 const & Value, + std::size_t Shift + ) + { + return detail::tvec4( + bitRotateLeft(Value[0], Shift), + bitRotateLeft(Value[1], Shift), + bitRotateLeft(Value[2], Shift), + bitRotateLeft(Value[3], Shift)); + } + + template + GLM_FUNC_QUALIFIER genIUType fillBitfieldWithOne + ( + genIUType const & Value, + int const & FromBit, + int const & ToBit + ) + { + assert(FromBit <= ToBit); + assert(ToBit <= sizeof(genIUType) * std::size_t(8)); + + genIUType Result = Value; + for(std::size_t i = 0; i <= ToBit; ++i) + Result |= (1 << i); + return Result; + } + + template + GLM_FUNC_QUALIFIER genIUType fillBitfieldWithZero + ( + genIUType const & Value, + int const & FromBit, + int const & ToBit + ) + { + assert(FromBit <= ToBit); + assert(ToBit <= sizeof(genIUType) * std::size_t(8)); + + genIUType Result = Value; + for(std::size_t i = 0; i <= ToBit; ++i) + Result &= ~(1 << i); + return Result; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/closest_point.hpp b/include/gal/opengl/glm/gtx/closest_point.hpp new file mode 100644 index 0000000000..491e173bec --- /dev/null +++ b/include/gal/opengl/glm/gtx/closest_point.hpp @@ -0,0 +1,66 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_bit +/// @file glm/gtx/bit.hpp +/// @date 2005-12-30 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_closest_point GLM_GTX_closest_point +/// @ingroup gtx +/// +/// @brief Find the point on a straight line which is the closet of a point. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_closest_point +#define GLM_GTX_closest_point GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_closest_point extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_closest_point + /// @{ + + /// Find the point on a straight line which is the closet of a point. + /// @see gtx_closest_point + template + detail::tvec3 closestPointOnLine( + detail::tvec3 const & point, + detail::tvec3 const & a, + detail::tvec3 const & b); + + /// @} +}// namespace glm + +#include "closest_point.inl" + +#endif//GLM_GTX_closest_point diff --git a/include/gal/opengl/glm/gtx/closest_point.inl b/include/gal/opengl/glm/gtx/closest_point.inl new file mode 100644 index 0000000000..3050973fb4 --- /dev/null +++ b/include/gal/opengl/glm/gtx/closest_point.inl @@ -0,0 +1,36 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-30 +// Updated : 2008-10-05 +// Licence : This source is under MIT License +// File : glm/gtx/closest_point.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_gtx_closest_point +#define glm_gtx_closest_point + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tvec3 closestPointOnLine + ( + detail::tvec3 const & point, + detail::tvec3 const & a, + detail::tvec3 const & b + ) + { + valType LineLength = distance(a, b); + detail::tvec3 Vector = point - a; + detail::tvec3 LineDirection = (b - a) / LineLength; + + // Project Vector to LineDirection to get the distance of point from a + valType Distance = dot(Vector, LineDirection); + + if(Distance <= valType(0)) return a; + if(Distance >= LineLength) return b; + return a + LineDirection * Distance; + } +}//namespace glm + +#endif//glm_gtx_closest_point diff --git a/include/gal/opengl/glm/gtx/color_cast.hpp b/include/gal/opengl/glm/gtx/color_cast.hpp new file mode 100644 index 0000000000..5650155334 --- /dev/null +++ b/include/gal/opengl/glm/gtx/color_cast.hpp @@ -0,0 +1,124 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_color_cast +/// @file glm/gtx/color_cast.hpp +/// @date 2007-06-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_number_precision (dependence) +/// +/// @defgroup gtx_color_cast GLM_GTX_color_cast +/// @ingroup gtx +/// +/// @brief Conversion between two color types. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_color_cast +#define GLM_GTX_color_cast GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtx/number_precision.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_color_cast extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_color_cast + /// @{ + + //! Conversion of a floating value into a 8bit unsigned int value. + /// @see gtx_color_cast + template uint8 u8channel_cast(valType a); + + /// Conversion of a floating value into a 16bit unsigned int value. + /// @see gtx_color_cast + template uint16 u16channel_cast(valType a); + + template uint32 u32_rgbx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint32 u32_xrgb_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint32 u32_bgrx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint32 u32_xbgr_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + + template uint32 u32_rgba_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint32 u32_argb_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint32 u32_bgra_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint32 u32_abgr_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + + template uint64 u64_rgbx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint64 u64_xrgb_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint64 u64_bgrx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint64 u64_xbgr_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + + template uint64 u64_rgba_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint64 u64_argb_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint64 u64_bgra_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint64 u64_abgr_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + + template f16 f16_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension) + + template f16vec3 f16_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template f16vec3 f16_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template f16vec3 f16_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template f16vec3 f16_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + + template f16vec4 f16_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template f16vec4 f16_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template f16vec4 f16_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template f16vec4 f16_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + + template f32 f32_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension) + + template f32vec3 f32_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template f32vec3 f32_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template f32vec3 f32_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template f32vec3 f32_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + + template f32vec4 f32_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template f32vec4 f32_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template f32vec4 f32_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template f32vec4 f32_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + + template f64 f64_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension) + + template f64vec3 f64_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template f64vec3 f64_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template f64vec3 f64_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template f64vec3 f64_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + + template f64vec4 f64_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template f64vec4 f64_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template f64vec4 f64_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template f64vec4 f64_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + + /// @} +}//namespace glm + +#include "color_cast.inl" + +#endif//GLM_GTX_color_cast diff --git a/include/gal/opengl/glm/gtx/color_cast.inl b/include/gal/opengl/glm/gtx/color_cast.inl new file mode 100644 index 0000000000..a3a2ce2ea7 --- /dev/null +++ b/include/gal/opengl/glm/gtx/color_cast.inl @@ -0,0 +1,733 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-06-21 +// Updated : 2007-08-03 +// Licence : This source is under MIT License +// File : glm/gtx/color_cast.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER uint8 u8channel_cast(T a) + { + return static_cast(a * T(255)); + } + + template + GLM_FUNC_QUALIFIER uint16 u16channel_cast(T a) + { + return static_cast(a * T(65535)); + } + + template + GLM_FUNC_QUALIFIER uint32 u32_rgbx_cast(const detail::tvec3& c) + { + uint32 result = 0; + result += static_cast(c.x * detail::tvec3::value_type(255)) << 0; + result += static_cast(c.y * detail::tvec3::value_type(255)) << 8; + result += static_cast(c.z * detail::tvec3::value_type(255)) << 16; + return result; + } + + template + GLM_FUNC_QUALIFIER uint32 u32_xrgb_cast(const detail::tvec3& c) + { + uint32 result = 0; + result += static_cast(c.x * detail::tvec3::value_type(255)) << 8; + result += static_cast(c.y * detail::tvec3::value_type(255)) << 16; + result += static_cast(c.z * detail::tvec3::value_type(255)) << 24; + return result; + } + + template + GLM_FUNC_QUALIFIER uint32 u32_bgrx_cast(const detail::tvec3& c) + { + uint32 result = 0; + result += static_cast(c.x * detail::tvec3::value_type(255)) << 16; + result += static_cast(c.y * detail::tvec3::value_type(255)) << 8; + result += static_cast(c.z * detail::tvec3::value_type(255)) << 0; + return result; + } + + template + GLM_FUNC_QUALIFIER uint32 u32_xbgr_cast(const detail::tvec3& c) + { + uint32 result = 0; + result += static_cast(c.x * detail::tvec3::value_type(255)) << 24; + result += static_cast(c.y * detail::tvec3::value_type(255)) << 16; + result += static_cast(c.z * detail::tvec3::value_type(255)) << 8; + result += static_cast(c.w * detail::tvec3::value_type(255)) << 0; + return result; + } + + template + GLM_FUNC_QUALIFIER uint32 u32_rgba_cast(const detail::tvec4& c) + { + uint32 result = 0; + result += static_cast(c.x * detail::tvec4::value_type(255)) << 0; + result += static_cast(c.y * detail::tvec4::value_type(255)) << 8; + result += static_cast(c.z * detail::tvec4::value_type(255)) << 16; + result += static_cast(c.w * detail::tvec4::value_type(255)) << 24; + return result; + } + + template + GLM_FUNC_QUALIFIER uint32 u32_argb_cast(const detail::tvec4& c) + { + uint32 result = 0; + result += static_cast(c.x * detail::tvec4::value_type(255)) << 8; + result += static_cast(c.y * detail::tvec4::value_type(255)) << 16; + result += static_cast(c.z * detail::tvec4::value_type(255)) << 24; + result += static_cast(c.w * detail::tvec4::value_type(255)) << 0; + return result; + } + + template + GLM_FUNC_QUALIFIER uint32 u32_bgra_cast(const detail::tvec4& c) + { + uint32 result = 0; + result += static_cast(c.x * detail::tvec4::value_type(255)) << 16; + result += static_cast(c.y * detail::tvec4::value_type(255)) << 8; + result += static_cast(c.z * detail::tvec4::value_type(255)) << 0; + result += static_cast(c.w * detail::tvec4::value_type(255)) << 24; + return result; + } + + template + GLM_FUNC_QUALIFIER uint32 u32_abgr_cast(const detail::tvec4& c) + { + uint32 result = 0; + result += static_cast(c.x * detail::tvec4::value_type(255)) << 24; + result += static_cast(c.y * detail::tvec4::value_type(255)) << 16; + result += static_cast(c.z * detail::tvec4::value_type(255)) << 8; + result += static_cast(c.w * detail::tvec4::value_type(255)) << 0; + return result; + } + + template + GLM_FUNC_QUALIFIER uint64 u64_rgbx_cast(const detail::tvec3& c) + { + uint64 result = 0; + result += static_cast(c.x * detail::tvec3::value_type(65535)) << 0; + result += static_cast(c.y * detail::tvec3::value_type(65535)) << 16; + result += static_cast(c.z * detail::tvec3::value_type(65535)) << 32; + return result; + } + + template + GLM_FUNC_QUALIFIER uint64 u32_xrgb_cast(const detail::tvec3& c) + { + uint64 result = 0; + result += static_cast(c.x * detail::tvec3::value_type(65535)) << 16; + result += static_cast(c.y * detail::tvec3::value_type(65535)) << 32; + result += static_cast(c.z * detail::tvec3::value_type(65535)) << 48; + return result; + } + + template + GLM_FUNC_QUALIFIER uint64 u32_bgrx_cast(const detail::tvec3& c) + { + uint64 result = 0; + result += static_cast(c.x * detail::tvec3::value_type(65535)) << 32; + result += static_cast(c.y * detail::tvec3::value_type(65535)) << 16; + result += static_cast(c.z * detail::tvec3::value_type(65535)) << 0; + return result; + } + + template + GLM_FUNC_QUALIFIER uint64 u32_xbgr_cast(const detail::tvec3& c) + { + uint64 result = 0; + result += static_cast(c.x * detail::tvec3::value_type(65535)) << 48; + result += static_cast(c.y * detail::tvec3::value_type(65535)) << 32; + result += static_cast(c.z * detail::tvec3::value_type(65535)) << 16; + result += static_cast(c.w * detail::tvec3::value_type(65535)) << 0; + return result; + } + + template + GLM_FUNC_QUALIFIER uint64 u64_rgba_cast(const detail::tvec4& c) + { + uint64 result = 0; + result += static_cast(c.x * detail::tvec4::value_type(65535)) << 0; + result += static_cast(c.y * detail::tvec4::value_type(65535)) << 16; + result += static_cast(c.z * detail::tvec4::value_type(65535)) << 32; + result += static_cast(c.w * detail::tvec4::value_type(65535)) << 48; + return result; + } + + template + GLM_FUNC_QUALIFIER uint64 u64_argb_cast(const detail::tvec4& c) + { + uint64 result = 0; + result += static_cast(c.x * detail::tvec4::value_type(65535)) << 16; + result += static_cast(c.y * detail::tvec4::value_type(65535)) << 32; + result += static_cast(c.z * detail::tvec4::value_type(65535)) << 48; + result += static_cast(c.w * detail::tvec4::value_type(65535)) << 0; + return result; + } + + template + GLM_FUNC_QUALIFIER uint64 u64_bgra_cast(const detail::tvec4& c) + { + uint64 result = 0; + result += static_cast(c.x * detail::tvec4::value_type(65535)) << 32; + result += static_cast(c.y * detail::tvec4::value_type(65535)) << 16; + result += static_cast(c.z * detail::tvec4::value_type(65535)) << 0; + result += static_cast(c.w * detail::tvec4::value_type(65535)) << 48; + return result; + } + + template + GLM_FUNC_QUALIFIER uint64 u64_abgr_cast(const detail::tvec4& c) + { + uint64 result = 0; + result += static_cast(c.x * detail::tvec4::value_type(65535)) << 48; + result += static_cast(c.y * detail::tvec4::value_type(65535)) << 32; + result += static_cast(c.z * detail::tvec4::value_type(65535)) << 16; + result += static_cast(c.w * detail::tvec4::value_type(65535)) << 0; + return result; + } + + template <> + GLM_FUNC_QUALIFIER f16 f16_channel_cast(uint32 color) + { + return f16(static_cast(color >> 0) / static_cast(255)); + } + + template <> + GLM_FUNC_QUALIFIER f16vec3 f16_rgbx_cast(uint32 color) + { + f16vec3 result; + result.x = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); + result.y = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); + result.z = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER f16vec3 f16_xrgb_cast(uint32 color) + { + f16vec3 result; + result.x = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); + result.y = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); + result.z = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER f16vec3 f16_bgrx_cast(uint32 color) + { + f16vec3 result; + result.x = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); + result.y = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); + result.z = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER f16vec3 f16_xbgr_cast(uint32 color) + { + f16vec3 result; + result.x = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); + result.y = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); + result.z = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER f16vec4 f16_rgba_cast(uint32 color) + { + f16vec4 result; + result.x = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); + result.y = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); + result.z = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); + result.w = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER f16vec4 f16_argb_cast(uint32 color) + { + f16vec4 result; + result.x = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); + result.y = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); + result.z = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); + result.w = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER f16vec4 f16_bgra_cast(uint32 color) + { + f16vec4 result; + result.x = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); + result.y = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); + result.z = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); + result.w = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER f16vec4 f16_abgr_cast(uint32 color) + { + f16vec4 result; + result.x = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); + result.y = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); + result.z = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); + result.w = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER float f32_channel_cast(uint8 color) + { + return static_cast(color >> 0) / static_cast(255); + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f32_rgbx_cast(uint32 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 0) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 16) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f32_xrgb_cast(uint32 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 24) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f32_bgrx_cast(uint32 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 0) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f32_xbgr_cast(uint32 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 24) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 8) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f32_rgba_cast(uint32 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 0) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.w = static_cast((color >> 24) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f32_argb_cast(uint32 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 24) & 0xFF) / static_cast(255); + result.w = static_cast((color >> 0) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f32_bgra_cast(uint32 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 0) & 0xFF) / static_cast(255); + result.w = static_cast((color >> 24) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f32_abgr_cast(uint32 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 24) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.w = static_cast((color >> 0) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER double f64_channel_cast(uint8 color) + { + return static_cast(color >> 0) / static_cast(255); + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f64_rgbx_cast(uint32 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 0) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 16) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f64_xrgb_cast(uint32 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 24) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f64_bgrx_cast(uint32 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 0) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f64_xbgr_cast(uint32 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 24) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 8) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f64_rgba_cast(uint32 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 0) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.w = static_cast((color >> 24) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f64_argb_cast(uint32 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 24) & 0xFF) / static_cast(255); + result.w = static_cast((color >> 0) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f64_bgra_cast(uint32 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 0) & 0xFF) / static_cast(255); + result.w = static_cast((color >> 24) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f64_abgr_cast(uint32 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 24) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.w = static_cast((color >> 0) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::half f16_channel_cast(uint16 color) + { + return detail::half(static_cast(color >> 0) / static_cast(65535)); + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f16_rgbx_cast(uint64 color) + { + detail::tvec3 result; + result.x = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); + result.y = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); + result.z = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f16_xrgb_cast(uint64 color) + { + detail::tvec3 result; + result.x = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); + result.y = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); + result.z = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f16_bgrx_cast(uint64 color) + { + detail::tvec3 result; + result.x = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); + result.y = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); + result.z = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f16_xbgr_cast(uint64 color) + { + detail::tvec3 result; + result.x = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); + result.y = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); + result.z = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f16_rgba_cast(uint64 color) + { + detail::tvec4 result; + result.x = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); + result.y = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); + result.z = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); + result.w = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f16_argb_cast(uint64 color) + { + detail::tvec4 result; + result.x = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); + result.y = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); + result.z = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); + result.w = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f16_bgra_cast(uint64 color) + { + detail::tvec4 result; + result.x = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); + result.y = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); + result.z = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); + result.w = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f16_abgr_cast(uint64 color) + { + detail::tvec4 result; + result.x = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); + result.y = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); + result.z = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); + result.w = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER float f32_channel_cast(uint16 color) + { + return static_cast(color >> 0) / static_cast(65535); + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f32_rgbx_cast(uint64 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f32_xrgb_cast(uint64 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f32_bgrx_cast(uint64 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f32_xbgr_cast(uint64 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f32_rgba_cast(uint64 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.w = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f32_argb_cast(uint64 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + result.w = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f32_bgra_cast(uint64 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + result.w = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f32_abgr_cast(uint64 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.w = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER double f64_channel_cast(uint16 color) + { + return static_cast(color >> 0) / static_cast(65535); + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f64_rgbx_cast(uint64 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f64_xrgb_cast(uint64 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f64_bgrx_cast(uint64 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f64_xbgr_cast(uint64 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f64_rgba_cast(uint64 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.w = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f64_argb_cast(uint64 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + result.w = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f64_bgra_cast(uint64 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + result.w = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f64_abgr_cast(uint64 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.w = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + return result; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/color_space.hpp b/include/gal/opengl/glm/gtx/color_space.hpp new file mode 100644 index 0000000000..9c453ab442 --- /dev/null +++ b/include/gal/opengl/glm/gtx/color_space.hpp @@ -0,0 +1,96 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_color_space +/// @file glm/gtx/color_space.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_color_space GLM_GTX_color_space +/// @ingroup gtx +/// +/// @brief Related to RGB to HSV conversions and operations. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_color_space +#define GLM_GTX_color_space GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_color_space extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_color_space + /// @{ + + /// Converts a color from HSV color space to its color in RGB color space. + /// @see gtx_color_space + template + detail::tvec3 rgbColor( + detail::tvec3 const & hsvValue); + + /// Converts a color from RGB color space to its color in HSV color space. + /// @see gtx_color_space + template + detail::tvec3 hsvColor( + detail::tvec3 const & rgbValue); + + /// Build a saturation matrix. + /// @see gtx_color_space + template + detail::tmat4x4 saturation( + valType const s); + + /// Modify the saturation of a color. + /// @see gtx_color_space + template + detail::tvec3 saturation( + valType const s, + detail::tvec3 const & color); + + /// Modify the saturation of a color. + /// @see gtx_color_space + template + detail::tvec4 saturation( + valType const s, + detail::tvec4 const & color); + + /// Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals. + /// @see gtx_color_space + template + valType luminosity( + detail::tvec3 const & color); + + /// @} +}//namespace glm + +#include "color_space.inl" + +#endif//GLM_GTX_color_space diff --git a/include/gal/opengl/glm/gtx/color_space.inl b/include/gal/opengl/glm/gtx/color_space.inl new file mode 100644 index 0000000000..892270573d --- /dev/null +++ b/include/gal/opengl/glm/gtx/color_space.inl @@ -0,0 +1,149 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2007-02-22 +// Licence : This source is under MIT License +// File : glm/gtx/color_space.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tvec3 rgbColor(const detail::tvec3& hsvColor) + { + detail::tvec3 hsv = hsvColor; + detail::tvec3 rgbColor; + + if(hsv.y == T(0)) + // achromatic (grey) + rgbColor = detail::tvec3(hsv.z); + else + { + T sector = floor(hsv.x / T(60)); + T frac = (hsv.x / T(60)) - sector; + // factorial part of h + T o = hsv.z * (T(1) - hsv.y); + T p = hsv.z * (T(1) - hsv.y * frac); + T q = hsv.z * (T(1) - hsv.y * (T(1) - frac)); + + switch(int(sector)) + { + default: + case 0: + rgbColor.r = hsv.z; + rgbColor.g = q; + rgbColor.b = o; + break; + case 1: + rgbColor.r = p; + rgbColor.g = hsv.z; + rgbColor.b = o; + break; + case 2: + rgbColor.r = o; + rgbColor.g = hsv.z; + rgbColor.b = q; + break; + case 3: + rgbColor.r = o; + rgbColor.g = p; + rgbColor.b = hsv.z; + break; + case 4: + rgbColor.r = q; + rgbColor.g = o; + rgbColor.b = hsv.z; + break; + case 5: + rgbColor.r = hsv.z; + rgbColor.g = o; + rgbColor.b = p; + break; + } + } + + return rgbColor; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 hsvColor(const detail::tvec3& rgbColor) + { + detail::tvec3 hsv = rgbColor; + float Min = min(min(rgbColor.r, rgbColor.g), rgbColor.b); + float Max = max(max(rgbColor.r, rgbColor.g), rgbColor.b); + float Delta = Max - Min; + + hsv.z = Max; + + if(Max != T(0)) + { + hsv.y = Delta / hsv.z; + T h = T(0); + + if(rgbColor.r == Max) + // between yellow & magenta + h = T(0) + T(60) * (rgbColor.g - rgbColor.b) / Delta; + else if(rgbColor.g == Max) + // between cyan & yellow + h = T(120) + T(60) * (rgbColor.b - rgbColor.r) / Delta; + else + // between magenta & cyan + h = T(240) + T(60) * (rgbColor.r - rgbColor.g) / Delta; + + if(h < T(0)) + hsv.x = h + T(360); + else + hsv.x = h; + } + else + { + // If r = g = b = 0 then s = 0, h is undefined + hsv.y = T(0); + hsv.x = T(0); + } + + return hsv; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 saturation(const T s) + { + detail::tvec3 rgbw = detail::tvec3(T(0.2126), T(0.7152), T(0.0722)); + + T col0 = (T(1) - s) * rgbw.r; + T col1 = (T(1) - s) * rgbw.g; + T col2 = (T(1) - s) * rgbw.b; + + detail::tmat4x4 result(T(1)); + result[0][0] = col0 + s; + result[0][1] = col0; + result[0][2] = col0; + result[1][0] = col1; + result[1][1] = col1 + s; + result[1][2] = col1; + result[2][0] = col2; + result[2][1] = col2; + result[2][2] = col2 + s; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 saturation(const T s, const detail::tvec3& color) + { + return detail::tvec3(saturation(s) * detail::tvec4(color, T(0))); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 saturation(const T s, const detail::tvec4& color) + { + return saturation(s) * color; + } + + template + GLM_FUNC_QUALIFIER T luminosity(const detail::tvec3& color) + { + const detail::tvec3 tmp = detail::tvec3(0.33, 0.59, 0.11); + return dot(color, tmp); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/color_space_YCoCg.hpp b/include/gal/opengl/glm/gtx/color_space_YCoCg.hpp new file mode 100644 index 0000000000..2b3b23ec08 --- /dev/null +++ b/include/gal/opengl/glm/gtx/color_space_YCoCg.hpp @@ -0,0 +1,84 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_color_space_YCoCg +/// @file glm/gtx/color_space_YCoCg.hpp +/// @date 2008-10-28 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_color_space_YCoCg GLM_GTX_color_space_YCoCg +/// @ingroup gtx +/// +/// @brief RGB to YCoCg conversions and operations +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_gtx_color_space_YCoCg +#define glm_gtx_color_space_YCoCg GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_color_space_YCoCg extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_color_space_YCoCg + /// @{ + + /// Convert a color from RGB color space to YCoCg color space. + /// @see gtx_color_space_YCoCg + template + detail::tvec3 rgb2YCoCg( + detail::tvec3 const & rgbColor); + + /// Convert a color from YCoCg color space to RGB color space. + /// @see gtx_color_space_YCoCg + template + detail::tvec3 YCoCg2rgb( + detail::tvec3 const & YCoCgColor); + + /// Convert a color from RGB color space to YCoCgR color space. + /// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range" + /// @see gtx_color_space_YCoCg + template + detail::tvec3 rgb2YCoCgR( + detail::tvec3 const & rgbColor); + + /// Convert a color from YCoCgR color space to RGB color space. + /// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range" + /// @see gtx_color_space_YCoCg + template + detail::tvec3 YCoCgR2rgb( + detail::tvec3 const & YCoCgColor); + + /// @} +}//namespace glm + +#include "color_space_YCoCg.inl" + +#endif//glm_gtx_color_space_YCoCg diff --git a/include/gal/opengl/glm/gtx/color_space_YCoCg.inl b/include/gal/opengl/glm/gtx/color_space_YCoCg.inl new file mode 100644 index 0000000000..0ddceff82d --- /dev/null +++ b/include/gal/opengl/glm/gtx/color_space_YCoCg.inl @@ -0,0 +1,64 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-10-28 +// Updated : 2008-10-28 +// Licence : This source is under MIT License +// File : glm/gtx/color_space_YCoCg.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tvec3 rgb2YCoCg + ( + detail::tvec3 const & rgbColor + ) + { + detail::tvec3 result; + result.x/*Y */ = rgbColor.r / valType(4) + rgbColor.g / valType(2) + rgbColor.b / valType(4); + result.y/*Co*/ = rgbColor.r / valType(2) + rgbColor.g * valType(0) - rgbColor.b / valType(2); + result.z/*Cg*/ = - rgbColor.r / valType(4) + rgbColor.g / valType(2) - rgbColor.b / valType(4); + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 rgb2YCoCgR + ( + detail::tvec3 const & rgbColor + ) + { + detail::tvec3 result; + result.x/*Y */ = rgbColor.g / valType(2) + (rgbColor.r + rgbColor.b) / valType(4); + result.y/*Co*/ = rgbColor.r - rgbColor.b; + result.z/*Cg*/ = rgbColor.g - (rgbColor.r + rgbColor.b) / valType(2); + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 YCoCg2rgb + ( + detail::tvec3 const & YCoCgColor + ) + { + detail::tvec3 result; + result.r = YCoCgColor.x + YCoCgColor.y - YCoCgColor.z; + result.g = YCoCgColor.x + YCoCgColor.z; + result.b = YCoCgColor.x - YCoCgColor.y - YCoCgColor.z; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 YCoCgR2rgb + ( + detail::tvec3 const & YCoCgRColor + ) + { + detail::tvec3 result; + valType tmp = YCoCgRColor.x - (YCoCgRColor.z / valType(2)); + result.g = YCoCgRColor.z + tmp; + result.b = tmp - (YCoCgRColor.y / valType(2)); + result.r = result.b + YCoCgRColor.y; + return result; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/compatibility.hpp b/include/gal/opengl/glm/gtx/compatibility.hpp new file mode 100644 index 0000000000..05ea6e306c --- /dev/null +++ b/include/gal/opengl/glm/gtx/compatibility.hpp @@ -0,0 +1,176 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_compatibility +/// @file glm/gtx/compatibility.hpp +/// @date 2007-01-24 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_half_float (dependence) +/// +/// @defgroup gtx_compatibility GLM_GTX_compatibility +/// @ingroup gtx +/// +/// @brief Provide functions to increase the compatibility with Cg and HLSL languages +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_compatibility +#define GLM_GTX_compatibility GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" +#include "../gtc/quaternion.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_compatibility extension included") +#endif + +#if(GLM_COMPILER & GLM_COMPILER_VC) +# include +#elif(GLM_COMPILER & GLM_COMPILER_GCC) +# include +# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) +# undef isfinite +# endif +#endif//GLM_COMPILER + +namespace glm +{ + /// @addtogroup gtx_compatibility + /// @{ + + template GLM_FUNC_QUALIFIER T lerp(T x, T y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec2 lerp(const detail::tvec2& x, const detail::tvec2& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec3 lerp(const detail::tvec3& x, const detail::tvec3& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec4 lerp(const detail::tvec4& x, const detail::tvec4& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec2 lerp(const detail::tvec2& x, const detail::tvec2& y, const detail::tvec2& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec3 lerp(const detail::tvec3& x, const detail::tvec3& y, const detail::tvec3& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec4 lerp(const detail::tvec4& x, const detail::tvec4& y, const detail::tvec4& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + + template GLM_FUNC_QUALIFIER T slerp(detail::tquat const & x, detail::tquat const & y, T const & a){return mix(x, y, a);} //!< \brief Returns the slurp interpolation between two quaternions. + + template GLM_FUNC_QUALIFIER T saturate(T x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec2 saturate(const detail::tvec2& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec3 saturate(const detail::tvec3& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec4 saturate(const detail::tvec4& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) + + template GLM_FUNC_QUALIFIER T atan2(T x, T y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec2 atan2(const detail::tvec2& x, const detail::tvec2& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec3 atan2(const detail::tvec3& x, const detail::tvec3& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec4 atan2(const detail::tvec4& x, const detail::tvec4& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) + + template bool isfinite(genType const & x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template detail::tvec2 isfinite(const detail::tvec2& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template detail::tvec3 isfinite(const detail::tvec3& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template detail::tvec4 isfinite(const detail::tvec4& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + + typedef bool bool1; //!< \brief boolean type with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tvec2 bool2; //!< \brief boolean type with 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec3 bool3; //!< \brief boolean type with 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec4 bool4; //!< \brief boolean type with 4 components. (From GLM_GTX_compatibility extension) + + typedef bool bool1x1; //!< \brief boolean matrix with 1 x 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x2 bool2x2; //!< \brief boolean matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x3 bool2x3; //!< \brief boolean matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x4 bool2x4; //!< \brief boolean matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x2 bool3x2; //!< \brief boolean matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x3 bool3x3; //!< \brief boolean matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x4 bool3x4; //!< \brief boolean matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x2 bool4x2; //!< \brief boolean matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x3 bool4x3; //!< \brief boolean matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x4 bool4x4; //!< \brief boolean matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) + + typedef int int1; //!< \brief integer vector with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tvec2 int2; //!< \brief integer vector with 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec3 int3; //!< \brief integer vector with 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec4 int4; //!< \brief integer vector with 4 components. (From GLM_GTX_compatibility extension) + + typedef int int1x1; //!< \brief integer matrix with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x2 int2x2; //!< \brief integer matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x3 int2x3; //!< \brief integer matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x4 int2x4; //!< \brief integer matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x2 int3x2; //!< \brief integer matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x3 int3x3; //!< \brief integer matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x4 int3x4; //!< \brief integer matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x2 int4x2; //!< \brief integer matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x3 int4x3; //!< \brief integer matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x4 int4x4; //!< \brief integer matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) + + typedef detail::half half1; //!< \brief half-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tvec2 half2; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec3 half3; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec4 half4; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) + + typedef detail::half half1x1; //!< \brief half-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x2 half2x2; //!< \brief half-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x3 half2x3; //!< \brief half-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x4 half2x4; //!< \brief half-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x2 half3x2; //!< \brief half-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x3 half3x3; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x4 half3x4; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x2 half4x2; //!< \brief half-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x3 half4x3; //!< \brief half-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x4 half4x4; //!< \brief half-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) + + typedef float float1; //!< \brief single-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tvec2 float2; //!< \brief single-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec3 float3; //!< \brief single-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec4 float4; //!< \brief single-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension) + + typedef float float1x1; //!< \brief single-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x2 float2x2; //!< \brief single-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x3 float2x3; //!< \brief single-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x4 float2x4; //!< \brief single-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x2 float3x2; //!< \brief single-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x3 float3x3; //!< \brief single-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x4 float3x4; //!< \brief single-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x2 float4x2; //!< \brief single-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x3 float4x3; //!< \brief single-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x4 float4x4; //!< \brief single-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) + + typedef double double1; //!< \brief double-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tvec2 double2; //!< \brief double-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec3 double3; //!< \brief double-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec4 double4; //!< \brief double-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension) + + typedef double double1x1; //!< \brief double-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x2 double2x2; //!< \brief double-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x3 double2x3; //!< \brief double-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x4 double2x4; //!< \brief double-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x2 double3x2; //!< \brief double-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x3 double3x3; //!< \brief double-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x4 double3x4; //!< \brief double-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x2 double4x2; //!< \brief double-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x3 double4x3; //!< \brief double-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x4 double4x4; //!< \brief double-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) + + /// @} +}//namespace glm + +#include "compatibility.inl" + +#endif//GLM_GTX_compatibility + diff --git a/include/gal/opengl/glm/gtx/compatibility.inl b/include/gal/opengl/glm/gtx/compatibility.inl new file mode 100644 index 0000000000..d9ebd9c57c --- /dev/null +++ b/include/gal/opengl/glm/gtx/compatibility.inl @@ -0,0 +1,60 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-03-16 +// Updated : 2008-10-24 +// Licence : This source is under MIT License +// File : glm/gtx/compatibility.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + // isfinite + template + GLM_FUNC_QUALIFIER bool isfinite( + genType const & x) + { +# if(GLM_COMPILER & GLM_COMPILER_VC) + return _finite(x); +# elif(GLM_COMPILER & GLM_COMPILER_GCC) +# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) + return _isfinite(x) != 0; +# else + return std::isfinite(x) != 0; +# endif +# else + return std::isfinite(x) != 0; +# endif + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 isfinite( + detail::tvec2 const & x) + { + return detail::tvec2( + isfinite(x.x), + isfinite(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 isfinite( + detail::tvec3 const & x) + { + return detail::tvec3( + isfinite(x.x), + isfinite(x.y), + isfinite(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 isfinite( + detail::tvec4 const & x) + { + return detail::tvec4( + isfinite(x.x), + isfinite(x.y), + isfinite(x.z), + isfinite(x.w)); + } + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/component_wise.hpp b/include/gal/opengl/glm/gtx/component_wise.hpp new file mode 100644 index 0000000000..8477e8c298 --- /dev/null +++ b/include/gal/opengl/glm/gtx/component_wise.hpp @@ -0,0 +1,82 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_component_wise +/// @file glm/gtx/component_wise.hpp +/// @date 2007-05-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_component_wise GLM_GTX_component_wise +/// @ingroup gtx +/// +/// @brief Operations between components of a type +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_component_wise +#define GLM_GTX_component_wise GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_component_wise extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_component_wise + /// @{ + + /// Add all vector components together. + /// @see gtx_component_wise + template + typename genType::value_type compAdd( + genType const & v); + + /// Multiply all vector components together. + /// @see gtx_component_wise + template + typename genType::value_type compMul( + genType const & v); + + /// Find the minimum value between single vector components. + /// @see gtx_component_wise + template + typename genType::value_type compMin( + genType const & v); + + /// Find the maximum value between single vector components. + /// @see gtx_component_wise + template + typename genType::value_type compMax( + genType const & v); + + /// @} +}//namespace glm + +#include "component_wise.inl" + +#endif//GLM_GTX_component_wise diff --git a/include/gal/opengl/glm/gtx/component_wise.inl b/include/gal/opengl/glm/gtx/component_wise.inl new file mode 100644 index 0000000000..942df94fc0 --- /dev/null +++ b/include/gal/opengl/glm/gtx/component_wise.inl @@ -0,0 +1,47 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-05-21 +// Updated : 2010-02-12 +// Licence : This source is under MIT License +// File : gtx_component_wise.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER typename genType::value_type compAdd(genType const & v) + { + typename genType::size_type result = typename genType::value_type(0); + for(typename genType::size_type i = 0; i < v.length(); ++i) + result += v[i]; + return result; + } + + template + GLM_FUNC_QUALIFIER typename genType::value_type compMul(genType const & v) + { + typename genType::value_type result = typename genType::value_type(1); + for(typename genType::size_type i = 0; i < v.length(); ++i) + result *= v[i]; + return result; + } + + template + GLM_FUNC_QUALIFIER typename genType::value_type compMin(genType const & v) + { + typename genType::value_type result = typename genType::value_type(v[0]); + for(typename genType::size_type i = 1; i < v.length(); ++i) + result = min(result, v[i]); + return result; + } + + template + GLM_FUNC_QUALIFIER typename genType::value_type compMax(genType const & v) + { + typename genType::value_type result = typename genType::value_type(v[0]); + for(typename genType::size_type i = 1; i < v.length(); ++i) + result = max(result, v[i]); + return result; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/constants.hpp b/include/gal/opengl/glm/gtx/constants.hpp new file mode 100644 index 0000000000..592199195d --- /dev/null +++ b/include/gal/opengl/glm/gtx/constants.hpp @@ -0,0 +1,33 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_constants +#define GLM_GTX_constants GLM_VERSION + +#include "../gtc/constants.hpp" + +#if(defined(GLM_MESSAGES)) +# pragma message("GLM: GLM_GTX_constants extension is deprecated, include GLM_GTC_constants (glm/gtc/constants.hpp) instead") +#endif + +#endif//GLM_GTX_constants diff --git a/include/gal/opengl/glm/gtx/epsilon.hpp b/include/gal/opengl/glm/gtx/epsilon.hpp new file mode 100644 index 0000000000..6d8dae5ac4 --- /dev/null +++ b/include/gal/opengl/glm/gtx/epsilon.hpp @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/////////////////////////////////////////////////////////////////////////////////// + +#if(defined(GLM_MESSAGES)) +# pragma message("GLM: GLM_GTX_epsilon extension is deprecated, include GLM_GTC_epsilon (glm/gtc/epsilon) instead") +#endif + +// Promoted: +#include "../gtc/epsilon.hpp" diff --git a/include/gal/opengl/glm/gtx/euler_angles.hpp b/include/gal/opengl/glm/gtx/euler_angles.hpp new file mode 100644 index 0000000000..b2f0b3743f --- /dev/null +++ b/include/gal/opengl/glm/gtx/euler_angles.hpp @@ -0,0 +1,156 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_euler_angles +/// @file glm/gtx/euler_angles.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_half_float (dependence) +/// +/// @defgroup gtx_euler_angles GLM_GTX_euler_angles +/// @ingroup gtx +/// +/// @brief Build matrices from Euler angles. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_euler_angles +#define GLM_GTX_euler_angles GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_euler_angles extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_euler_angles + /// @{ + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X. + /// @see gtx_euler_angles + template + detail::tmat4x4 eulerAngleX( + valType const & angleX); + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y. + /// @see gtx_euler_angles + template + detail::tmat4x4 eulerAngleY( + valType const & angleY); + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z. + /// @see gtx_euler_angles + template + detail::tmat4x4 eulerAngleZ( + valType const & angleZ); + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y). + /// @see gtx_euler_angles + template + detail::tmat4x4 eulerAngleXY( + valType const & angleX, + valType const & angleY); + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X). + /// @see gtx_euler_angles + template + detail::tmat4x4 eulerAngleYX( + valType const & angleY, + valType const & angleX); + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z). + /// @see gtx_euler_angles + template + detail::tmat4x4 eulerAngleXZ( + valType const & angleX, + valType const & angleZ); + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X). + /// @see gtx_euler_angles + template + detail::tmat4x4 eulerAngleZX( + valType const & angleZ, + valType const & angleX); + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z). + /// @see gtx_euler_angles + template + detail::tmat4x4 eulerAngleYZ( + valType const & angleY, + valType const & angleZ); + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y). + /// @see gtx_euler_angles + template + detail::tmat4x4 eulerAngleZY( + valType const & angleZ, + valType const & angleY); + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). + /// @see gtx_euler_angles + template + detail::tmat4x4 eulerAngleYXZ( + valType const & yaw, + valType const & pitch, + valType const & roll); + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). + /// @see gtx_euler_angles + template + detail::tmat4x4 yawPitchRoll( + valType const & yaw, + valType const & pitch, + valType const & roll); + + /// Creates a 2D 2 * 2 rotation matrix from an euler angle. + /// @see gtx_euler_angles + template + detail::tmat2x2 orientate2(T const & angle); + + /// Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle. + /// @see gtx_euler_angles + template + detail::tmat3x3 orientate3(T const & angle); + + /// Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z). + /// @see gtx_euler_angles + template + detail::tmat3x3 orientate3(detail::tvec3 const & angles); + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). + /// @see gtx_euler_angles + template + detail::tmat4x4 orientate4(detail::tvec3 const & angles); + + /// @} +}//namespace glm + +#include "euler_angles.inl" + +#endif//GLM_GTX_euler_angles diff --git a/include/gal/opengl/glm/gtx/euler_angles.inl b/include/gal/opengl/glm/gtx/euler_angles.inl new file mode 100644 index 0000000000..dcde512836 --- /dev/null +++ b/include/gal/opengl/glm/gtx/euler_angles.inl @@ -0,0 +1,244 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2007-08-14 +// Licence : This source is under MIT License +// File : glm/gtx/euler_angles.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleX + ( + valType const & angleX + ) + { + valType cosX = glm::cos(angleX); + valType sinX = glm::sin(angleX); + + return detail::tmat4x4( + valType(1), valType(0), valType(0), valType(0), + valType(0), cosX, sinX, valType(0), + valType(0),-sinX, cosX, valType(0), + valType(0), valType(0), valType(0), valType(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleY + ( + valType const & angleY + ) + { + valType cosY = glm::cos(angleY); + valType sinY = glm::sin(angleY); + + return detail::tmat4x4( + cosY, valType(0), sinY, valType(0), + valType(0), valType(1), valType(0), valType(0), + -sinY, valType(0), cosY, valType(0), + valType(0), valType(0), valType(0), valType(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleZ + ( + valType const & angleZ + ) + { + valType cosZ = glm::cos(angleZ); + valType sinZ = glm::sin(angleZ); + + return detail::tmat4x4( + cosZ, sinZ, valType(0), valType(0), + -sinZ, cosZ, valType(0), valType(0), + valType(0), valType(0), valType(1), valType(0), + valType(0), valType(0), valType(0), valType(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleXY + ( + valType const & angleX, + valType const & angleY + ) + { + valType cosX = glm::cos(angleX); + valType sinX = glm::sin(angleX); + valType cosY = glm::cos(angleY); + valType sinY = glm::sin(angleY); + + return detail::tmat4x4( + cosY, -sinX * sinY, cosX * sinY, valType(0), + valType(0), cosX, sinX, valType(0), + -sinY , -sinX * cosY, cosX * cosY, valType(0), + valType(0), valType(0), valType(0), valType(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleYX + ( + valType const & angleY, + valType const & angleX + ) + { + valType cosX = glm::cos(angleX); + valType sinX = glm::sin(angleX); + valType cosY = glm::cos(angleY); + valType sinY = glm::sin(angleY); + + return detail::tmat4x4( + cosY, valType(0), sinY, valType(0), + -sinX * sinY, cosX, sinX * cosY, valType(0), + -cosX * sinY, -sinX, cosX * cosY, valType(0), + valType(0), valType(0), valType(0), valType(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleXZ + ( + valType const & angleX, + valType const & angleZ + ) + { + return eulerAngleX(angleX) * eulerAngleZ(angleZ); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleZX + ( + valType const & angleZ, + valType const & angleX + ) + { + return eulerAngleZ(angleZ) * eulerAngleX(angleX); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleYXZ + ( + valType const & yaw, + valType const & pitch, + valType const & roll + ) + { + valType tmp_ch = glm::cos(yaw); + valType tmp_sh = glm::sin(yaw); + valType tmp_cp = glm::cos(pitch); + valType tmp_sp = glm::sin(pitch); + valType tmp_cb = glm::cos(roll); + valType tmp_sb = glm::sin(roll); + + detail::tmat4x4 Result; + Result[0][0] = tmp_ch * tmp_cb + tmp_sh * tmp_sp * tmp_sb; + Result[0][1] = tmp_sb * tmp_cp; + Result[0][2] = -tmp_sh * tmp_cb + tmp_ch * tmp_sp * tmp_sb; + Result[0][3] = valType(0); + Result[1][0] = -tmp_ch * tmp_sb + tmp_sh * tmp_sp * tmp_cb; + Result[1][1] = tmp_cb * tmp_cp; + Result[1][2] = tmp_sb * tmp_sh + tmp_ch * tmp_sp * tmp_cb; + Result[1][3] = valType(0); + Result[2][0] = tmp_sh * tmp_cp; + Result[2][1] = -tmp_sp; + Result[2][2] = tmp_ch * tmp_cp; + Result[2][3] = valType(0); + Result[3][0] = valType(0); + Result[3][1] = valType(0); + Result[3][2] = valType(0); + Result[3][3] = valType(1); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 yawPitchRoll + ( + valType const & yaw, + valType const & pitch, + valType const & roll + ) + { + valType tmp_ch = glm::cos(yaw); + valType tmp_sh = glm::sin(yaw); + valType tmp_cp = glm::cos(pitch); + valType tmp_sp = glm::sin(pitch); + valType tmp_cb = glm::cos(roll); + valType tmp_sb = glm::sin(roll); + + detail::tmat4x4 Result; + Result[0][0] = tmp_ch * tmp_cb + tmp_sh * tmp_sp * tmp_sb; + Result[0][1] = tmp_sb * tmp_cp; + Result[0][2] = -tmp_sh * tmp_cb + tmp_ch * tmp_sp * tmp_sb; + Result[0][3] = valType(0); + Result[1][0] = -tmp_ch * tmp_sb + tmp_sh * tmp_sp * tmp_cb; + Result[1][1] = tmp_cb * tmp_cp; + Result[1][2] = tmp_sb * tmp_sh + tmp_ch * tmp_sp * tmp_cb; + Result[1][3] = valType(0); + Result[2][0] = tmp_sh * tmp_cp; + Result[2][1] = -tmp_sp; + Result[2][2] = tmp_ch * tmp_cp; + Result[2][3] = valType(0); + Result[3][0] = valType(0); + Result[3][1] = valType(0); + Result[3][2] = valType(0); + Result[3][3] = valType(1); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x2 orientate2 + ( + valType const & angle + ) + { + valType c = glm::cos(angle); + valType s = glm::sin(angle); + + detail::tmat2x2 Result; + Result[0][0] = c; + Result[0][1] = s; + Result[1][0] = -s; + Result[1][1] = c; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 orientate3 + ( + valType const & angle + ) + { + valType c = glm::cos(angle); + valType s = glm::sin(angle); + + detail::tmat3x3 Result; + Result[0][0] = c; + Result[0][1] = s; + Result[0][2] = 0.0f; + Result[1][0] = -s; + Result[1][1] = c; + Result[1][2] = 0.0f; + Result[2][0] = 0.0f; + Result[2][1] = 0.0f; + Result[2][2] = 1.0f; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 orientate3 + ( + detail::tvec3 const & angles + ) + { + return detail::tmat3x3(yawPitchRoll(angles.x, angles.y, angles.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 orientate4 + ( + detail::tvec3 const & angles + ) + { + return yawPitchRoll(angles.z, angles.x, angles.y); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/extend.hpp b/include/gal/opengl/glm/gtx/extend.hpp new file mode 100644 index 0000000000..908e8fec52 --- /dev/null +++ b/include/gal/opengl/glm/gtx/extend.hpp @@ -0,0 +1,66 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_extend +/// @file glm/gtx/extend.hpp +/// @date 2006-01-07 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_extend GLM_GTX_extend +/// @ingroup gtx +/// +/// @brief Extend a position from a source to a position at a defined length. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_extend +#define GLM_GTX_extend GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_extend extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_extend + /// @{ + + /// Extends of Length the Origin position using the (Source - Origin) direction. + /// @see gtx_extend + template + genType extend( + genType const & Origin, + genType const & Source, + typename genType::value_type const Length); + + /// @} +}//namespace glm + +#include "extend.inl" + +#endif//GLM_GTX_extend diff --git a/include/gal/opengl/glm/gtx/extend.inl b/include/gal/opengl/glm/gtx/extend.inl new file mode 100644 index 0000000000..0903549ba5 --- /dev/null +++ b/include/gal/opengl/glm/gtx/extend.inl @@ -0,0 +1,55 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2006-01-07 +// Updated : 2008-10-05 +// Licence : This source is under MIT License +// File : glm/gtx/extend.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + genType extend + ( + genType const & Origin, + genType const & Source, + genType const & Distance + ) + { + return Origin + (Source - Origin) * Distance; + } + + template + detail::tvec2 extend + ( + detail::tvec2 const & Origin, + detail::tvec2 const & Source, + valType const & Distance + ) + { + return Origin + (Source - Origin) * Distance; + } + + template + detail::tvec3 extend + ( + detail::tvec3 const & Origin, + detail::tvec3 const & Source, + valType const & Distance + ) + { + return Origin + (Source - Origin) * Distance; + } + + template + detail::tvec4 extend + ( + detail::tvec4 const & Origin, + detail::tvec4 const & Source, + valType const & Distance + ) + { + return Origin + (Source - Origin) * Distance; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/extented_min_max.hpp b/include/gal/opengl/glm/gtx/extented_min_max.hpp new file mode 100644 index 0000000000..a29b34f271 --- /dev/null +++ b/include/gal/opengl/glm/gtx/extented_min_max.hpp @@ -0,0 +1,194 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_extented_min_max +/// @file glm/gtx/extented_min_max.hpp +/// @date 2007-03-14 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_half_float (dependence) +/// +/// @defgroup gtx_extented_min_max GLM_GTX_extented_min_max +/// @ingroup gtx +/// +/// Min and max functions for 3 to 4 parameters. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_extented_min_max +#define GLM_GTX_extented_min_max GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_extented_min_max extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_extented_min_max + /// @{ + + /// Return the minimum component-wise values of 3 inputs + /// @see gtx_extented_min_max + template + T min( + T const & x, + T const & y, + T const & z); + + /// Return the minimum component-wise values of 3 inputs + /// @see gtx_extented_min_max + template + < + typename T, + template class C + > + C min( + C const & x, + typename C::value_type const & y, + typename C::value_type const & z); + + /// Return the minimum component-wise values of 3 inputs + /// @see gtx_extented_min_max + template + < + typename T, + template class C + > + C min( + C const & x, + C const & y, + C const & z); + + /// Return the minimum component-wise values of 4 inputs + /// @see gtx_extented_min_max + template + T min( + T const & x, + T const & y, + T const & z, + T const & w); + + /// Return the minimum component-wise values of 4 inputs + /// @see gtx_extented_min_max + template + < + typename T, + template class C + > + C min( + C const & x, + typename C::value_type const & y, + typename C::value_type const & z, + typename C::value_type const & w); + + /// Return the minimum component-wise values of 4 inputs + /// @see gtx_extented_min_max + template + < + typename T, + template class C + > + C min( + C const & x, + C const & y, + C const & z, + C const & w); + + /// Return the maximum component-wise values of 3 inputs + /// @see gtx_extented_min_max + template + T max( + T const & x, + T const & y, + T const & z); + + /// Return the maximum component-wise values of 3 inputs + /// @see gtx_extented_min_max + template + < + typename T, + template class C + > + C max( + C const & x, + typename C::value_type const & y, + typename C::value_type const & z); + + /// Return the maximum component-wise values of 3 inputs + /// @see gtx_extented_min_max + template + < + typename T, + template class C + > + C max( + C const & x, + C const & y, + C const & z); + + /// Return the maximum component-wise values of 4 inputs + /// @see gtx_extented_min_max + template + T max( + T const & x, + T const & y, + T const & z, + T const & w); + + /// Return the maximum component-wise values of 4 inputs + /// @see gtx_extented_min_max + template + < + typename T, + template class C + > + C max( + C const & x, + typename C::value_type const & y, + typename C::value_type const & z, + typename C::value_type const & w); + + /// Return the maximum component-wise values of 4 inputs + /// @see gtx_extented_min_max + template + < + typename T, + template class C + > + C max( + C const & x, + C const & y, + C const & z, + C const & w); + + /// @} +}//namespace glm + +#include "extented_min_max.inl" + +#endif//GLM_GTX_extented_min_max diff --git a/include/gal/opengl/glm/gtx/extented_min_max.inl b/include/gal/opengl/glm/gtx/extented_min_max.inl new file mode 100644 index 0000000000..a19ad9cff3 --- /dev/null +++ b/include/gal/opengl/glm/gtx/extented_min_max.inl @@ -0,0 +1,178 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-03-14 +// Updated : 2010-02-19 +// Licence : This source is under MIT License +// File : gtx_extented_min_max.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER T min( + T const & x, + T const & y, + T const & z) + { + return glm::min(glm::min(x, y), z); + } + + template + < + typename T, + template class C + > + GLM_FUNC_QUALIFIER C min + ( + C const & x, + typename C::value_type const & y, + typename C::value_type const & z + ) + { + return glm::min(glm::min(x, y), z); + } + + template + < + typename T, + template class C + > + GLM_FUNC_QUALIFIER C min + ( + C const & x, + C const & y, + C const & z + ) + { + return glm::min(glm::min(x, y), z); + } + + template + GLM_FUNC_QUALIFIER T min + ( + T const & x, + T const & y, + T const & z, + T const & w + ) + { + return glm::min(glm::min(x, y), glm::min(z, w)); + } + + template + < + typename T, + template class C + > + GLM_FUNC_QUALIFIER C min + ( + C const & x, + typename C::value_type const & y, + typename C::value_type const & z, + typename C::value_type const & w + ) + { + return glm::min(glm::min(x, y), glm::min(z, w)); + } + + template + < + typename T, + template class C + > + GLM_FUNC_QUALIFIER C min + ( + C const & x, + C const & y, + C const & z, + C const & w + ) + { + return glm::min(glm::min(x, y), glm::min(z, w)); + } + + template + GLM_FUNC_QUALIFIER T max( + T const & x, + T const & y, + T const & z) + { + return glm::max(glm::max(x, y), z); + } + + template + < + typename T, + template class C + > + GLM_FUNC_QUALIFIER C max + ( + C const & x, + typename C::value_type const & y, + typename C::value_type const & z + ) + { + return glm::max(glm::max(x, y), z); + } + + template + < + typename T, + template class C + > + GLM_FUNC_QUALIFIER C max + ( + C const & x, + C const & y, + C const & z + ) + { + return glm::max(glm::max(x, y), z); + } + + template + GLM_FUNC_QUALIFIER T max + ( + T const & x, + T const & y, + T const & z, + T const & w + ) + { + return glm::max(glm::max(x, y), glm::max(z, w)); + } + + template + < + typename T, + template class C + > + GLM_FUNC_QUALIFIER C max + ( + C const & x, + typename C::value_type const & y, + typename C::value_type const & z, + typename C::value_type const & w + ) + { + return glm::max(glm::max(x, y), glm::max(z, w)); + } + + template + < + typename T, + template class C + > + GLM_FUNC_QUALIFIER C max + ( + C const & x, + C const & y, + C const & z, + C const & w + ) + { + return glm::max(glm::max(x, y), glm::max(z, w)); + } + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/fast_exponential.hpp b/include/gal/opengl/glm/gtx/fast_exponential.hpp new file mode 100644 index 0000000000..6f37b31474 --- /dev/null +++ b/include/gal/opengl/glm/gtx/fast_exponential.hpp @@ -0,0 +1,99 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_fast_exponential +/// @file glm/gtx/fast_exponential.hpp +/// @date 2006-01-09 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_half_float (dependence) +/// +/// @defgroup gtx_fast_exponential GLM_GTX_fast_exponential +/// @ingroup gtx +/// +/// @brief Fast but less accurate implementations of exponential based functions. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_fast_exponential +#define GLM_GTX_fast_exponential GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_fast_exponential extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_fast_exponential + /// @{ + + /// Faster than the common pow function but less accurate. + /// @see gtx_fast_exponential + template + genType fastPow( + genType const & x, + genType const & y); + + /// Faster than the common pow function but less accurate. + /// @see gtx_fast_exponential + template + genTypeT fastPow( + genTypeT const & x, + genTypeU const & y); + + /// Faster than the common exp function but less accurate. + /// @see gtx_fast_exponential + template + T fastExp(const T& x); + + /// Faster than the common log function but less accurate. + /// @see gtx_fast_exponential + template + T fastLog(const T& x); + + /// Faster than the common exp2 function but less accurate. + /// @see gtx_fast_exponential + template + T fastExp2(const T& x); + + /// Faster than the common log2 function but less accurate. + /// @see gtx_fast_exponential + template + T fastLog2(const T& x); + + /// Faster than the common ln function but less accurate. + /// @see gtx_fast_exponential + template + T fastLn(const T& x); + + /// @} +}//namespace glm + +#include "fast_exponential.inl" + +#endif//GLM_GTX_fast_exponential diff --git a/include/gal/opengl/glm/gtx/fast_exponential.inl b/include/gal/opengl/glm/gtx/fast_exponential.inl new file mode 100644 index 0000000000..702a758fc8 --- /dev/null +++ b/include/gal/opengl/glm/gtx/fast_exponential.inl @@ -0,0 +1,148 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2006-01-09 +// Updated : 2006-01-09 +// Licence : This source is under MIT License +// File : glm/gtx/fast_exponential.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + // fastPow: + template + GLM_FUNC_QUALIFIER genType fastPow(genType const & x, genType const & y) + { + return exp(y * log(x)); + } + + VECTORIZE_VEC_VEC(fastPow) + + template + GLM_FUNC_QUALIFIER T fastPow(const T x, int y) + { + T f = T(1); + for(int i = 0; i < y; ++i) + f *= x; + return f; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 fastPow( + const detail::tvec2& x, + const detail::tvec2& y) + { + return detail::tvec2( + fastPow(x.x, y.x), + fastPow(x.y, y.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 fastPow( + const detail::tvec3& x, + const detail::tvec3& y) + { + return detail::tvec3( + fastPow(x.x, y.x), + fastPow(x.y, y.y), + fastPow(x.z, y.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 fastPow( + const detail::tvec4& x, + const detail::tvec4& y) + { + return detail::tvec4( + fastPow(x.x, y.x), + fastPow(x.y, y.y), + fastPow(x.z, y.z), + fastPow(x.w, y.w)); + } + + // fastExp + // Note: This function provides accurate results only for value between -1 and 1, else avoid it. + template + GLM_FUNC_QUALIFIER T fastExp(const T x) + { + // This has a better looking and same performance in release mode than the following code. However, in debug mode it's slower. + // return 1.0f + x * (1.0f + x * 0.5f * (1.0f + x * 0.3333333333f * (1.0f + x * 0.25 * (1.0f + x * 0.2f)))); + T x2 = x * x; + T x3 = x2 * x; + T x4 = x3 * x; + T x5 = x4 * x; + return T(1) + x + (x2 * T(0.5)) + (x3 * T(0.1666666667)) + (x4 * T(0.041666667)) + (x5 * T(0.008333333333)); + } + /* // Try to handle all values of float... but often shower than std::exp, glm::floor and the loop kill the performance + GLM_FUNC_QUALIFIER float fastExp(float x) + { + const float e = 2.718281828f; + const float IntegerPart = floor(x); + const float FloatPart = x - IntegerPart; + float z = 1.f; + + for(int i = 0; i < int(IntegerPart); ++i) + z *= e; + + const float x2 = FloatPart * FloatPart; + const float x3 = x2 * FloatPart; + const float x4 = x3 * FloatPart; + const float x5 = x4 * FloatPart; + return z * (1.0f + FloatPart + (x2 * 0.5f) + (x3 * 0.1666666667f) + (x4 * 0.041666667f) + (x5 * 0.008333333333f)); + } + + // Increase accuracy on number bigger that 1 and smaller than -1 but it's not enough for high and negative numbers + GLM_FUNC_QUALIFIER float fastExp(float x) + { + // This has a better looking and same performance in release mode than the following code. However, in debug mode it's slower. + // return 1.0f + x * (1.0f + x * 0.5f * (1.0f + x * 0.3333333333f * (1.0f + x * 0.25 * (1.0f + x * 0.2f)))); + float x2 = x * x; + float x3 = x2 * x; + float x4 = x3 * x; + float x5 = x4 * x; + float x6 = x5 * x; + float x7 = x6 * x; + float x8 = x7 * x; + return 1.0f + x + (x2 * 0.5f) + (x3 * 0.1666666667f) + (x4 * 0.041666667f) + (x5 * 0.008333333333f)+ (x6 * 0.00138888888888f) + (x7 * 0.000198412698f) + (x8 * 0.0000248015873f);; + } + */ + + VECTORIZE_VEC(fastExp) + + // fastLog + template + GLM_FUNC_QUALIFIER genType fastLog(genType const & x) + { + return std::log(x); + } + + /* Slower than the VC7.1 function... + GLM_FUNC_QUALIFIER float fastLog(float x) + { + float y1 = (x - 1.0f) / (x + 1.0f); + float y2 = y1 * y1; + return 2.0f * y1 * (1.0f + y2 * (0.3333333333f + y2 * (0.2f + y2 * 0.1428571429f))); + } + */ + + VECTORIZE_VEC(fastLog) + + //fastExp2, ln2 = 0.69314718055994530941723212145818f + template + GLM_FUNC_QUALIFIER genType fastExp2(genType const & x) + { + return fastExp(0.69314718055994530941723212145818f * x); + } + + VECTORIZE_VEC(fastExp2) + + // fastLog2, ln2 = 0.69314718055994530941723212145818f + template + GLM_FUNC_QUALIFIER genType fastLog2(genType const & x) + { + return fastLog(x) / 0.69314718055994530941723212145818f; + } + + VECTORIZE_VEC(fastLog2) + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/fast_square_root.hpp b/include/gal/opengl/glm/gtx/fast_square_root.hpp new file mode 100644 index 0000000000..2665f10d40 --- /dev/null +++ b/include/gal/opengl/glm/gtx/fast_square_root.hpp @@ -0,0 +1,85 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_fast_square_root +/// @file glm/gtx/fast_square_root.hpp +/// @date 2006-01-04 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_fast_square_root GLM_GTX_fast_square_root +/// @ingroup gtx +/// +/// @brief Fast but less accurate implementations of square root based functions. +/// - Sqrt optimisation based on Newton's method, +/// www.gamedev.net/community/forums/topic.asp?topic id=139956 +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_fast_square_root +#define GLM_GTX_fast_square_root GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_fast_square_root extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_fast_square_root + /// @{ + + //! Faster than the common sqrt function but less accurate. + //! From GLM_GTX_fast_square_root extension. + template + genType fastSqrt(genType const & x); + + //! Faster than the common inversesqrt function but less accurate. + //! From GLM_GTX_fast_square_root extension. + template + genType fastInverseSqrt(genType const & x); + + //! Faster than the common length function but less accurate. + //! From GLM_GTX_fast_square_root extension. + template + typename genType::value_type fastLength(genType const & x); + + //! Faster than the common distance function but less accurate. + //! From GLM_GTX_fast_square_root extension. + template + typename genType::value_type fastDistance(genType const & x, genType const & y); + + //! Faster than the common normalize function but less accurate. + //! From GLM_GTX_fast_square_root extension. + template + genType fastNormalize(genType const & x); + + /// @} +}// namespace glm + +#include "fast_square_root.inl" + +#endif//GLM_GTX_fast_square_root diff --git a/include/gal/opengl/glm/gtx/fast_square_root.inl b/include/gal/opengl/glm/gtx/fast_square_root.inl new file mode 100644 index 0000000000..fc6d5a493c --- /dev/null +++ b/include/gal/opengl/glm/gtx/fast_square_root.inl @@ -0,0 +1,136 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2006-01-04 +// Updated : 2011-10-14 +// Licence : This source is under MIT License +// File : glm/gtx/fast_square_root.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + // fastSqrt + template + GLM_FUNC_QUALIFIER genType fastSqrt + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'fastSqrt' only accept floating-point input"); + + return genType(1) / fastInverseSqrt(x); + } + + VECTORIZE_VEC(fastSqrt) + + // fastInversesqrt + template + GLM_FUNC_QUALIFIER genType fastInverseSqrt + ( + genType const & x + ) + { + genType tmp = x; + float xhalf = 0.5f * float(tmp); + uint i = *(uint*)&x; + i = 0x5f375a86 - (i >> 1); + //x = *(float*)&i; + //x = *((float*)(char*)&i); + tmp = detail::uif(i).f; + tmp = tmp * (1.5f - xhalf * tmp * tmp); + return genType(tmp); + } + + VECTORIZE_VEC(fastInverseSqrt) + + // fastLength + template + GLM_FUNC_QUALIFIER genType fastLength + ( + genType const & x + ) + { + return abs(x); + } + + template + GLM_FUNC_QUALIFIER valType fastLength + ( + detail::tvec2 const & x + ) + { + valType sqr = x.x * x.x + x.y * x.y; + return fastSqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER valType fastLength + ( + detail::tvec3 const & x + ) + { + valType sqr = x.x * x.x + x.y * x.y + x.z * x.z; + return fastSqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER valType fastLength + ( + detail::tvec4 const & x + ) + { + valType sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w; + return fastSqrt(sqr); + } + + // fastDistance + template + GLM_FUNC_QUALIFIER genType fastDistance + ( + genType const & x, + genType const & y + ) + { + return fastLength(y - x); + } + + // fastNormalize + template + GLM_FUNC_QUALIFIER genType fastNormalize + ( + genType const & x + ) + { + return x > genType(0) ? genType(1) : -genType(1); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 fastNormalize + ( + detail::tvec2 const & x + ) + { + valType sqr = x.x * x.x + x.y * x.y; + return x * fastInverseSqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 fastNormalize + ( + detail::tvec3 const & x + ) + { + valType sqr = x.x * x.x + x.y * x.y + x.z * x.z; + return x * fastInverseSqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 fastNormalize + ( + detail::tvec4 const & x + ) + { + valType sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w; + return x * fastInverseSqrt(sqr); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/fast_trigonometry.hpp b/include/gal/opengl/glm/gtx/fast_trigonometry.hpp new file mode 100644 index 0000000000..eed954fecd --- /dev/null +++ b/include/gal/opengl/glm/gtx/fast_trigonometry.hpp @@ -0,0 +1,100 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_fast_trigonometry +/// @file glm/gtx/fast_trigonometry.hpp +/// @date 2006-01-08 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_fast_trigonometry GLM_GTX_fast_trigonometry +/// @ingroup gtx +/// +/// @brief Fast but less accurate implementations of trigonometric functions. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_fast_trigonometry +#define GLM_GTX_fast_trigonometry GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_fast_trigonometry extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_fast_trigonometry + /// @{ + + //! Faster than the common sin function but less accurate. + //! Defined between -2pi and 2pi. + //! From GLM_GTX_fast_trigonometry extension. + template + T fastSin(const T& angle); + + //! Faster than the common cos function but less accurate. + //! Defined between -2pi and 2pi. + //! From GLM_GTX_fast_trigonometry extension. + template + T fastCos(const T& angle); + + //! Faster than the common tan function but less accurate. + //! Defined between -2pi and 2pi. + //! From GLM_GTX_fast_trigonometry extension. + template + T fastTan(const T& angle); + + //! Faster than the common asin function but less accurate. + //! Defined between -2pi and 2pi. + //! From GLM_GTX_fast_trigonometry extension. + template + T fastAsin(const T& angle); + + //! Faster than the common acos function but less accurate. + //! Defined between -2pi and 2pi. + //! From GLM_GTX_fast_trigonometry extension. + template + T fastAcos(const T& angle); + + //! Faster than the common atan function but less accurate. + //! Defined between -2pi and 2pi. + //! From GLM_GTX_fast_trigonometry extension. + template + T fastAtan(const T& y, const T& x); + + //! Faster than the common atan function but less accurate. + //! Defined between -2pi and 2pi. + //! From GLM_GTX_fast_trigonometry extension. + template + T fastAtan(const T& angle); + + /// @} +}//namespace glm + +#include "fast_trigonometry.inl" + +#endif//GLM_GTX_fast_trigonometry diff --git a/include/gal/opengl/glm/gtx/fast_trigonometry.inl b/include/gal/opengl/glm/gtx/fast_trigonometry.inl new file mode 100644 index 0000000000..caf677772e --- /dev/null +++ b/include/gal/opengl/glm/gtx/fast_trigonometry.inl @@ -0,0 +1,75 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2006-01-08 +// Updated : 2011-10-14 +// Licence : This source is under MIT License +// File : glm/gtx/fast_trigonometry.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + // sin + template + GLM_FUNC_QUALIFIER T fastSin(T const & x) + { + return x - ((x * x * x) / T(6)) + ((x * x * x * x * x) / T(120)) - ((x * x * x * x * x * x * x) / T(5040)); + } + + VECTORIZE_VEC(fastSin) + + // cos + template + GLM_FUNC_QUALIFIER T fastCos(T const & x) + { + return T(1) - (x * x * T(0.5)) + (x * x * x * x * T(0.041666666666)) - (x * x * x * x * x * x * T(0.00138888888888)); + } + + VECTORIZE_VEC(fastCos) + + // tan + template + GLM_FUNC_QUALIFIER T fastTan(T const & x) + { + return x + (x * x * x * T(0.3333333333)) + (x * x * x * x * x * T(0.1333333333333)) + (x * x * x * x * x * x * x * T(0.0539682539)); + } + + VECTORIZE_VEC(fastTan) + + // asin + template + GLM_FUNC_QUALIFIER T fastAsin(T const & x) + { + return x + (x * x * x * T(0.166666667)) + (x * x * x * x * x * T(0.075)) + (x * x * x * x * x * x * x * T(0.0446428571)) + (x * x * x * x * x * x * x * x * x * T(0.0303819444));// + (x * x * x * x * x * x * x * x * x * x * x * T(0.022372159)); + } + + VECTORIZE_VEC(fastAsin) + + // acos + template + GLM_FUNC_QUALIFIER T fastAcos(T const & x) + { + return T(1.5707963267948966192313216916398) - fastAsin(x); //(PI / 2) + } + + VECTORIZE_VEC(fastAcos) + + // atan + template + GLM_FUNC_QUALIFIER T fastAtan(T const & y, T const & x) + { + T sgn = sign(y) * sign(x); + return abs(fastAtan(y / x)) * sgn; + } + + VECTORIZE_VEC_VEC(fastAtan) + + template + GLM_FUNC_QUALIFIER T fastAtan(T const & x) + { + return x - (x * x * x * T(0.333333333333)) + (x * x * x * x * x * T(0.2)) - (x * x * x * x * x * x * x * T(0.1428571429)) + (x * x * x * x * x * x * x * x * x * T(0.111111111111)) - (x * x * x * x * x * x * x * x * x * x * x * T(0.0909090909)); + } + + VECTORIZE_VEC(fastAtan) + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/gradient_paint.hpp b/include/gal/opengl/glm/gtx/gradient_paint.hpp new file mode 100644 index 0000000000..16824a1f2f --- /dev/null +++ b/include/gal/opengl/glm/gtx/gradient_paint.hpp @@ -0,0 +1,76 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_gradient_paint +/// @file glm/gtx/gradient_paint.hpp +/// @date 2009-03-06 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_optimum_pow (dependence) +/// +/// @defgroup gtx_gradient_paint GLM_GTX_gradient_paint +/// @ingroup gtx +/// +/// @brief Functions that return the color of procedural gradient for specific coordinates. +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_gradient_paint +#define GLM_GTX_gradient_paint GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtx/optimum_pow.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_gradient_paint extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_gradient_paint + /// @{ + + /// Return a color from a radial gradient. + /// @see - gtx_gradient_paint + template + valType radialGradient( + detail::tvec2 const & Center, + valType const & Radius, + detail::tvec2 const & Focal, + detail::tvec2 const & Position); + + /// Return a color from a linear gradient. + /// @see - gtx_gradient_paint + template + valType linearGradient( + detail::tvec2 const & Point0, + detail::tvec2 const & Point1, + detail::tvec2 const & Position); + + /// @} +}// namespace glm + +#include "gradient_paint.inl" + +#endif//GLM_GTX_gradient_paint diff --git a/include/gal/opengl/glm/gtx/gradient_paint.inl b/include/gal/opengl/glm/gtx/gradient_paint.inl new file mode 100644 index 0000000000..16e84e024f --- /dev/null +++ b/include/gal/opengl/glm/gtx/gradient_paint.inl @@ -0,0 +1,43 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2009-03-06 +// Updated : 2009-03-09 +// Licence : This source is under MIT License +// File : glm/gtx/gradient_paint.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + valType radialGradient + ( + detail::tvec2 const & Center, + valType const & Radius, + detail::tvec2 const & Focal, + detail::tvec2 const & Position + ) + { + detail::tvec2 F = Focal - Center; + detail::tvec2 D = Position - Focal; + valType Radius2 = pow2(Radius); + valType Fx2 = pow2(F.x); + valType Fy2 = pow2(F.y); + + valType Numerator = (D.x * F.x + D.y * F.y) + sqrt(Radius2 * (pow2(D.x) + pow2(D.y)) - pow2(D.x * F.y - D.y * F.x)); + valType Denominator = Radius2 - (Fx2 + Fy2); + return Numerator / Denominator; + } + + template + valType linearGradient + ( + detail::tvec2 const & Point0, + detail::tvec2 const & Point1, + detail::tvec2 const & Position + ) + { + detail::tvec2 Dist = Point1 - Point0; + return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/handed_coordinate_space.hpp b/include/gal/opengl/glm/gtx/handed_coordinate_space.hpp new file mode 100644 index 0000000000..730a06e8ca --- /dev/null +++ b/include/gal/opengl/glm/gtx/handed_coordinate_space.hpp @@ -0,0 +1,74 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_handed_coordinate_space +/// @file glm/gtx/handed_coordinate_space.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_handed_coordinate_space GLM_GTX_handed_coordinate_space +/// @ingroup gtx +/// +/// @brief To know if a set of three basis vectors defines a right or left-handed coordinate system. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_handed_coordinate_space +#define GLM_GTX_handed_coordinate_space GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_handed_coordinate_space extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_handed_coordinate_space + /// @{ + + //! Return if a trihedron right handed or not. + //! From GLM_GTX_handed_coordinate_space extension. + template + bool rightHanded( + detail::tvec3 const & tangent, + detail::tvec3 const & binormal, + detail::tvec3 const & normal); + + //! Return if a trihedron left handed or not. + //! From GLM_GTX_handed_coordinate_space extension. + template + bool leftHanded( + detail::tvec3 const & tangent, + detail::tvec3 const & binormal, + detail::tvec3 const & normal); + + /// @} +}// namespace glm + +#include "handed_coordinate_space.inl" + +#endif//GLM_GTX_handed_coordinate_space diff --git a/include/gal/opengl/glm/gtx/handed_coordinate_space.inl b/include/gal/opengl/glm/gtx/handed_coordinate_space.inl new file mode 100644 index 0000000000..da7cf4e3bc --- /dev/null +++ b/include/gal/opengl/glm/gtx/handed_coordinate_space.inl @@ -0,0 +1,33 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2009-02-19 +// Licence : This source is under MIT License +// File : glm/gtx/handed_coordinate_space.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER bool rightHanded + ( + detail::tvec3 const & tangent, + detail::tvec3 const & binormal, + detail::tvec3 const & normal + ) + { + return dot(cross(normal, tangent), binormal) > T(0); + } + + template + GLM_FUNC_QUALIFIER bool leftHanded + ( + detail::tvec3 const & tangent, + detail::tvec3 const & binormal, + detail::tvec3 const & normal + ) + { + return dot(cross(normal, tangent), binormal) < T(0); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/inertia.hpp b/include/gal/opengl/glm/gtx/inertia.hpp new file mode 100644 index 0000000000..9d468fedb1 --- /dev/null +++ b/include/gal/opengl/glm/gtx/inertia.hpp @@ -0,0 +1,115 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_inertia +/// @file glm/gtx/inertia.hpp +/// @date 2006-04-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_extented_min_max (dependence) +/// +/// @defgroup gtx_inertia GLM_GTX_inertia +/// @ingroup gtx +/// +/// @brief Create inertia matrices +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_inertia +#define GLM_GTX_inertia GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_inertia extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_inertia + /// @{ + + //! Build an inertia matrix for a box. + //! From GLM_GTX_inertia extension. + template + detail::tmat3x3 boxInertia3( + T const & Mass, + detail::tvec3 const & Scale); + + //! Build an inertia matrix for a box. + //! From GLM_GTX_inertia extension. + template + detail::tmat4x4 boxInertia4( + T const & Mass, + detail::tvec3 const & Scale); + + //! Build an inertia matrix for a disk. + //! From GLM_GTX_inertia extension. + template + detail::tmat3x3 diskInertia3( + T const & Mass, + T const & Radius); + + //! Build an inertia matrix for a disk. + //! From GLM_GTX_inertia extension. + template + detail::tmat4x4 diskInertia4( + T const & Mass, + T const & Radius); + + //! Build an inertia matrix for a ball. + //! From GLM_GTX_inertia extension. + template + detail::tmat3x3 ballInertia3( + T const & Mass, + T const & Radius); + + //! Build an inertia matrix for a ball. + //! From GLM_GTX_inertia extension. + template + detail::tmat4x4 ballInertia4( + T const & Mass, + T const & Radius); + + //! Build an inertia matrix for a sphere. + //! From GLM_GTX_inertia extension. + template + detail::tmat3x3 sphereInertia3( + T const & Mass, + T const & Radius); + + //! Build an inertia matrix for a sphere. + //! From GLM_GTX_inertia extension. + template + detail::tmat4x4 sphereInertia4( + T const & Mass, + T const & Radius); + + /// @} +}// namespace glm + +#include "inertia.inl" + +#endif//GLM_GTX_inertia diff --git a/include/gal/opengl/glm/gtx/inertia.inl b/include/gal/opengl/glm/gtx/inertia.inl new file mode 100644 index 0000000000..e83be40dd8 --- /dev/null +++ b/include/gal/opengl/glm/gtx/inertia.inl @@ -0,0 +1,114 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2006-04-21 +// Updated : 2006-12-06 +// Licence : This source is under MIT License +// File : glm/gtx/inertia.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tmat3x3 boxInertia3 + ( + T const & Mass, + detail::tvec3 const & Scale + ) + { + detail::tmat3x3 Result(T(1)); + Result[0][0] = (Scale.y * Scale.y + Scale.z * Scale.z) * Mass / T(12); + Result[1][1] = (Scale.x * Scale.x + Scale.z * Scale.z) * Mass / T(12); + Result[2][2] = (Scale.x * Scale.x + Scale.y * Scale.y) * Mass / T(12); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 boxInertia4 + ( + T const & Mass, + detail::tvec3 const & Scale + ) + { + detail::tmat4x4 Result(T(1)); + Result[0][0] = (Scale.y * Scale.y + Scale.z * Scale.z) * Mass / T(12); + Result[1][1] = (Scale.x * Scale.x + Scale.z * Scale.z) * Mass / T(12); + Result[2][2] = (Scale.x * Scale.x + Scale.y * Scale.y) * Mass / T(12); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 diskInertia3 + ( + T const & Mass, + T const & Radius + ) + { + T a = Mass * Radius * Radius / T(2); + detail::tmat3x3 Result(a); + Result[2][2] *= T(2); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 diskInertia4 + ( + T const & Mass, + T const & Radius + ) + { + T a = Mass * Radius * Radius / T(2); + detail::tmat4x4 Result(a); + Result[2][2] *= T(2); + Result[3][3] = T(1); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 ballInertia3 + ( + T const & Mass, + T const & Radius + ) + { + T a = T(2) * Mass * Radius * Radius / T(5); + return detail::tmat3x3(a); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 ballInertia4 + ( + T const & Mass, + T const & Radius + ) + { + T a = T(2) * Mass * Radius * Radius / T(5); + detail::tmat4x4 Result(a); + Result[3][3] = T(1); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 sphereInertia3 + ( + T const & Mass, + T const & Radius + ) + { + T a = T(2) * Mass * Radius * Radius / T(3); + return detail::tmat3x3(a); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 sphereInertia4 + ( + T const & Mass, + T const & Radius + ) + { + T a = T(2) * Mass * Radius * Radius / T(3); + detail::tmat4x4 Result(a); + Result[3][3] = T(1); + return Result; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/int_10_10_10_2.hpp b/include/gal/opengl/glm/gtx/int_10_10_10_2.hpp new file mode 100644 index 0000000000..af5a40440d --- /dev/null +++ b/include/gal/opengl/glm/gtx/int_10_10_10_2.hpp @@ -0,0 +1,64 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_int_10_10_10_2 +/// @file glm/gtx/int_10_10_10_2.hpp +/// @date 2010-07-07 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_raw_data (dependence) +/// +/// @defgroup gtx_int_10_10_10_2 GLM_GTX_int_10_10_10_2 +/// @ingroup gtx +/// +/// @brief Pack vector to 1010102 integers. Storage only. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_int_10_10_10_2 +#define GLM_GTX_int_10_10_10_2 GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtx/raw_data.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_int_10_10_10_2 extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_int_10_10_10_2 + /// @{ + + //! From GLM_GTX_int_10_10_10_2 extension. + //! Cast a vec4 to an u_10_10_10_2. + dword uint10_10_10_2_cast(glm::vec4 const & v); + + /// @} +}//namespace glm + +#include "int_10_10_10_2.inl" + +#endif//GLM_GTX_int_10_10_10_2 diff --git a/include/gal/opengl/glm/gtx/int_10_10_10_2.inl b/include/gal/opengl/glm/gtx/int_10_10_10_2.inl new file mode 100644 index 0000000000..9ea3065ab6 --- /dev/null +++ b/include/gal/opengl/glm/gtx/int_10_10_10_2.inl @@ -0,0 +1,19 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2010-07-07 +// Updated : 2010-07-07 +// Licence : This source is under MIT License +// File : glm/gtx/int_10_10_10_2.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + GLM_FUNC_QUALIFIER dword uint10_10_10_2_cast + ( + glm::vec4 const & v + ) + { + return dword(uint(v.x * 2047.f) << 0 | uint(v.y * 2047.f) << 10 | uint(v.z * 2047.f) << 20 | uint(v.w * 3.f) << 30); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/integer.hpp b/include/gal/opengl/glm/gtx/integer.hpp new file mode 100644 index 0000000000..00875b2779 --- /dev/null +++ b/include/gal/opengl/glm/gtx/integer.hpp @@ -0,0 +1,104 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_integer +/// @file glm/gtx/integer.hpp +/// @date 2005-12-24 / 2011-10-13 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_integer GLM_GTX_integer +/// @ingroup gtx +/// +/// @brief Add support for integer for core functions +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_integer +#define GLM_GTX_integer GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_integer extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_integer + /// @{ + + //! Returns x raised to the y power. + //! From GLM_GTX_integer extension. + int pow(int x, int y); + + //! Returns the positive square root of x. + //! From GLM_GTX_integer extension. + int sqrt(int x); + + //! Returns the log2 of x. Can be reliably using to compute mipmap count from the texture size. + //! From GLM_GTX_integer extension. + template + genIUType log2(genIUType const & x); + + //! Returns the floor log2 of x. + //! From GLM_GTX_integer extension. + unsigned int floor_log2(unsigned int x); + + //! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y. + //! From GLM_GTX_integer extension. + int mod(int x, int y); + + //! Return the factorial value of a number (!12 max, integer only) + //! From GLM_GTX_integer extension. + template + genType factorial(genType const & x); + + //! 32bit signed integer. + //! From GLM_GTX_integer extension. + typedef signed int sint; + + //! Returns x raised to the y power. + //! From GLM_GTX_integer extension. + uint pow(uint x, uint y); + + //! Returns the positive square root of x. + //! From GLM_GTX_integer extension. + uint sqrt(uint x); + + //! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y. + //! From GLM_GTX_integer extension. + uint mod(uint x, uint y); + + //! Returns the number of leading zeros. + //! From GLM_GTX_integer extension. + uint nlz(uint x); + + /// @} +}//namespace glm + +#include "integer.inl" + +#endif//GLM_GTX_integer diff --git a/include/gal/opengl/glm/gtx/integer.inl b/include/gal/opengl/glm/gtx/integer.inl new file mode 100644 index 0000000000..fc25b8a790 --- /dev/null +++ b/include/gal/opengl/glm/gtx/integer.inl @@ -0,0 +1,203 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-24 +// Updated : 2011-10-13 +// Licence : This source is under MIT License +// File : glm/gtx/integer.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + // pow + GLM_FUNC_QUALIFIER int pow(int x, int y) + { + if(y == 0) + return 1; + int result = x; + for(int i = 1; i < y; ++i) + result *= x; + return result; + } + + // sqrt: From Christopher J. Musial, An integer square root, Graphics Gems, 1990, page 387 + GLM_FUNC_QUALIFIER int sqrt(int x) + { + if(x <= 1) return x; + + int NextTrial = x >> 1; + int CurrentAnswer; + + do + { + CurrentAnswer = NextTrial; + NextTrial = (NextTrial + x / NextTrial) >> 1; + } while(NextTrial < CurrentAnswer); + + return CurrentAnswer; + } + +// Henry Gordon Dietz: http://aggregate.org/MAGIC/ +namespace _detail +{ + GLM_FUNC_QUALIFIER unsigned int ones32(unsigned int x) + { + /* 32-bit recursive reduction using SWAR... + but first step is mapping 2-bit values + into sum of 2 1-bit values in sneaky way + */ + x -= ((x >> 1) & 0x55555555); + x = (((x >> 2) & 0x33333333) + (x & 0x33333333)); + x = (((x >> 4) + x) & 0x0f0f0f0f); + x += (x >> 8); + x += (x >> 16); + return(x & 0x0000003f); + } + + template <> + struct _compute_log2 + { + template + GLM_FUNC_QUALIFIER T operator() (T const & Value) const + { +#if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_GCC)) + return Value <= T(1) ? T(0) : T(32) - nlz(Value - T(1)); +#else + return T(32) - nlz(Value - T(1)); +#endif + } + }; + +}//namespace _detail + + // Henry Gordon Dietz: http://aggregate.org/MAGIC/ +/* + GLM_FUNC_QUALIFIER unsigned int floor_log2(unsigned int x) + { + x |= (x >> 1); + x |= (x >> 2); + x |= (x >> 4); + x |= (x >> 8); + x |= (x >> 16); + + return _detail::ones32(x) >> 1; + } +*/ + // mod + GLM_FUNC_QUALIFIER int mod(int x, int y) + { + return x - y * (x / y); + } + + // factorial (!12 max, integer only) + template + GLM_FUNC_QUALIFIER genType factorial(genType const & x) + { + genType Temp = x; + genType Result; + for(Result = 1; Temp > 1; --Temp) + Result *= Temp; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 factorial( + detail::tvec2 const & x) + { + return detail::tvec2( + factorial(x.x), + factorial(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 factorial( + detail::tvec3 const & x) + { + return detail::tvec3( + factorial(x.x), + factorial(x.y), + factorial(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 factorial( + detail::tvec4 const & x) + { + return detail::tvec4( + factorial(x.x), + factorial(x.y), + factorial(x.z), + factorial(x.w)); + } + + GLM_FUNC_QUALIFIER uint pow(uint x, uint y) + { + uint result = x; + for(uint i = 1; i < y; ++i) + result *= x; + return result; + } + + GLM_FUNC_QUALIFIER uint sqrt(uint x) + { + if(x <= 1) return x; + + uint NextTrial = x >> 1; + uint CurrentAnswer; + + do + { + CurrentAnswer = NextTrial; + NextTrial = (NextTrial + x / NextTrial) >> 1; + } while(NextTrial < CurrentAnswer); + + return CurrentAnswer; + } + + GLM_FUNC_QUALIFIER uint mod(uint x, uint y) + { + return x - y * (x / y); + } + +#if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_GCC)) + + GLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x) + { + return 31u - findMSB(x); + } + +#else + + // Hackers Delight: http://www.hackersdelight.org/HDcode/nlz.c.txt + GLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x) + { + int y, m, n; + + y = -int(x >> 16); // If left half of x is 0, + m = (y >> 16) & 16; // set n = 16. If left half + n = 16 - m; // is nonzero, set n = 0 and + x = x >> m; // shift x right 16. + // Now x is of the form 0000xxxx. + y = x - 0x100; // If positions 8-15 are 0, + m = (y >> 16) & 8; // add 8 to n and shift x left 8. + n = n + m; + x = x << m; + + y = x - 0x1000; // If positions 12-15 are 0, + m = (y >> 16) & 4; // add 4 to n and shift x left 4. + n = n + m; + x = x << m; + + y = x - 0x4000; // If positions 14-15 are 0, + m = (y >> 16) & 2; // add 2 to n and shift x left 2. + n = n + m; + x = x << m; + + y = x >> 14; // Set y = 0, 1, 2, or 3. + m = y & ~(y >> 1); // Set m = 0, 1, 2, or 2 resp. + return unsigned(n + 2 - m); + } + +#endif//(GLM_COMPILER) + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/intersect.hpp b/include/gal/opengl/glm/gtx/intersect.hpp new file mode 100644 index 0000000000..193aac0d54 --- /dev/null +++ b/include/gal/opengl/glm/gtx/intersect.hpp @@ -0,0 +1,102 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_intersect +/// @file glm/gtx/intersect.hpp +/// @date 2007-04-03 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_closest_point (dependence) +/// +/// @defgroup gtx_intersect GLM_GTX_intersect +/// @ingroup gtx +/// +/// @brief Add intersection functions +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_intersect +#define GLM_GTX_intersect GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtx/closest_point.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_closest_point extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_intersect + /// @{ + + //! Compute the intersection of a ray and a triangle. + //! From GLM_GTX_intersect extension. + template + bool intersectRayTriangle( + genType const & orig, genType const & dir, + genType const & vert0, genType const & vert1, genType const & vert2, + genType & baryPosition); + + //! Compute the intersection of a line and a triangle. + //! From GLM_GTX_intersect extension. + template + bool intersectLineTriangle( + genType const & orig, genType const & dir, + genType const & vert0, genType const & vert1, genType const & vert2, + genType & position); + + //! Compute the intersection distance of a ray and a sphere. + //! The ray direction vector is unit length. + //! From GLM_GTX_intersect extension. + template + bool intersectRaySphere( + genType const & rayStarting, genType const & rayNormalizedDirection, + genType const & sphereCenter, const typename genType::value_type sphereRadiusSquered, + typename genType::value_type & intersectionDistance); + + //! Compute the intersection of a ray and a sphere. + //! From GLM_GTX_intersect extension. + template + bool intersectRaySphere( + genType const & rayStarting, genType const & rayNormalizedDirection, + genType const & sphereCenter, const typename genType::value_type sphereRadius, + genType & intersectionPosition, genType & intersectionNormal); + + //! Compute the intersection of a line and a sphere. + //! From GLM_GTX_intersect extension + template + bool intersectLineSphere( + genType const & point0, genType const & point1, + genType const & sphereCenter, typename genType::value_type sphereRadius, + genType & intersectionPosition1, genType & intersectionNormal1, + genType & intersectionPosition2 = genType(), genType & intersectionNormal2 = genType()); + + /// @} +}//namespace glm + +#include "intersect.inl" + +#endif//GLM_GTX_intersect diff --git a/include/gal/opengl/glm/gtx/intersect.inl b/include/gal/opengl/glm/gtx/intersect.inl new file mode 100644 index 0000000000..00f0131950 --- /dev/null +++ b/include/gal/opengl/glm/gtx/intersect.inl @@ -0,0 +1,196 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-04-03 +// Updated : 2009-01-20 +// Licence : This source is under MIT licence +// File : glm/gtx/intersect.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include +#include + +namespace glm +{ + template + GLM_FUNC_QUALIFIER bool intersectRayTriangle + ( + genType const & orig, genType const & dir, + genType const & v0, genType const & v1, genType const & v2, + genType & baryPosition + ) + { + genType e1 = v1 - v0; + genType e2 = v2 - v0; + + genType p = glm::cross(dir, e2); + + typename genType::value_type a = glm::dot(e1, p); + + typename genType::value_type Epsilon = std::numeric_limits::epsilon(); + if(a < Epsilon) + return false; + + typename genType::value_type f = typename genType::value_type(1.0f) / a; + + genType s = orig - v0; + baryPosition.x = f * glm::dot(s, p); + if(baryPosition.x < typename genType::value_type(0.0f)) + return false; + if(baryPosition.x > typename genType::value_type(1.0f)) + return false; + + genType q = glm::cross(s, e1); + baryPosition.y = f * glm::dot(dir, q); + if(baryPosition.y < typename genType::value_type(0.0f)) + return false; + if(baryPosition.y + baryPosition.x > typename genType::value_type(1.0f)) + return false; + + baryPosition.z = f * glm::dot(e2, q); + + return baryPosition.z >= typename genType::value_type(0.0f); + } + + //template + //GLM_FUNC_QUALIFIER bool intersectRayTriangle + //( + // genType const & orig, genType const & dir, + // genType const & vert0, genType const & vert1, genType const & vert2, + // genType & position + //) + //{ + // typename genType::value_type Epsilon = std::numeric_limits::epsilon(); + // + // genType edge1 = vert1 - vert0; + // genType edge2 = vert2 - vert0; + // + // genType pvec = cross(dir, edge2); + // + // float det = dot(edge1, pvec); + // if(det < Epsilon) + // return false; + // + // genType tvec = orig - vert0; + // + // position.y = dot(tvec, pvec); + // if (position.y < typename genType::value_type(0) || position.y > det) + // return typename genType::value_type(0); + // + // genType qvec = cross(tvec, edge1); + // + // position.z = dot(dir, qvec); + // if (position.z < typename genType::value_type(0) || position.y + position.z > det) + // return typename genType::value_type(0); + // + // position.x = dot(edge2, qvec); + // position *= typename genType::value_type(1) / det; + // + // return typename genType::value_type(1); + //} + + template + GLM_FUNC_QUALIFIER bool intersectLineTriangle + ( + genType const & orig, genType const & dir, + genType const & vert0, genType const & vert1, genType const & vert2, + genType & position + ) + { + typename genType::value_type Epsilon = std::numeric_limits::epsilon(); + + genType edge1 = vert1 - vert0; + genType edge2 = vert2 - vert0; + + genType pvec = cross(dir, edge2); + + float det = dot(edge1, pvec); + + if (det > -Epsilon && det < Epsilon) + return false; + float inv_det = typename genType::value_type(1) / det; + + genType tvec = orig - vert0; + + position.y = dot(tvec, pvec) * inv_det; + if (position.y < typename genType::value_type(0) || position.y > typename genType::value_type(1)) + return false; + + genType qvec = cross(tvec, edge1); + + position.z = dot(dir, qvec) * inv_det; + if (position.z < typename genType::value_type(0) || position.y + position.z > typename genType::value_type(1)) + return false; + + position.x = dot(edge2, qvec) * inv_det; + + return true; + } + + template + GLM_FUNC_QUALIFIER bool intersectRaySphere + ( + genType const & rayStarting, genType const & rayNormalizedDirection, + genType const & sphereCenter, const typename genType::value_type sphereRadiusSquered, + typename genType::value_type & intersectionDistance + ) + { + typename genType::value_type Epsilon = std::numeric_limits::epsilon(); + genType diff = sphereCenter - rayStarting; + typename genType::value_type t0 = dot(diff, rayNormalizedDirection); + typename genType::value_type dSquared = dot(diff, diff) - t0 * t0; + if( dSquared > sphereRadiusSquered ) + { + return false; + } + typename genType::value_type t1 = sqrt( sphereRadiusSquered - dSquared ); + intersectionDistance = t0 > t1 + Epsilon ? t0 - t1 : t0 + t1; + return intersectionDistance > Epsilon; + } + + template + GLM_FUNC_QUALIFIER bool intersectRaySphere + ( + genType const & rayStarting, genType const & rayNormalizedDirection, + genType const & sphereCenter, const typename genType::value_type sphereRadius, + genType & intersectionPosition, genType & intersectionNormal + ) + { + typename genType::value_type distance; + if( intersectRaySphere( rayStarting, rayNormalizedDirection, sphereCenter, sphereRadius * sphereRadius, distance ) ) + { + intersectionPosition = rayStarting + rayNormalizedDirection * distance; + intersectionNormal = (intersectionPosition - sphereCenter) / sphereRadius; + return true; + } + return false; + } + + template + GLM_FUNC_QUALIFIER bool intersectLineSphere + ( + genType const & point0, genType const & point1, + genType const & sphereCenter, typename genType::value_type sphereRadius, + genType & intersectionPoint1, genType & intersectionNormal1, + genType & intersectionPoint2, genType & intersectionNormal2 + ) + { + typename genType::value_type Epsilon = std::numeric_limits::epsilon(); + genType dir = normalize(point1 - point0); + genType diff = sphereCenter - point0; + typename genType::value_type t0 = dot(diff, dir); + typename genType::value_type dSquared = dot(diff, diff) - t0 * t0; + if( dSquared > sphereRadius * sphereRadius ) + { + return false; + } + typename genType::value_type t1 = sqrt( sphereRadius * sphereRadius - dSquared ); + if( t0 < t1 + Epsilon ) + t1 = -t1; + intersectionPoint1 = point0 + dir * (t0 - t1); + intersectionNormal1 = (intersectionPoint1 - sphereCenter) / sphereRadius; + intersectionPoint2 = point0 + dir * (t0 + t1); + intersectionNormal2 = (intersectionPoint2 - sphereCenter) / sphereRadius; + return true; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/log_base.hpp b/include/gal/opengl/glm/gtx/log_base.hpp new file mode 100644 index 0000000000..08d6f061c4 --- /dev/null +++ b/include/gal/opengl/glm/gtx/log_base.hpp @@ -0,0 +1,65 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_log_base +/// @file glm/gtx/log_base.hpp +/// @date 2008-10-24 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_log_base GLM_GTX_log_base +/// @ingroup gtx +/// +/// @brief Logarithm for any base. base can be a vector or a scalar. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_log_base +#define GLM_GTX_log_base GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_log_base extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_log_base + /// @{ + + //! Logarithm for any base. + //! From GLM_GTX_log_base. + template + genType log( + genType const & x, + genType const & base); + + /// @} +}//namespace glm + +#include "log_base.inl" + +#endif//GLM_GTX_log_base diff --git a/include/gal/opengl/glm/gtx/log_base.inl b/include/gal/opengl/glm/gtx/log_base.inl new file mode 100644 index 0000000000..75c1537116 --- /dev/null +++ b/include/gal/opengl/glm/gtx/log_base.inl @@ -0,0 +1,24 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-10-24 +// Updated : 2008-10-24 +// Licence : This source is under MIT License +// File : glm/gtx/log_base.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER genType log( + genType const & x, + genType const & base) + { + assert(x != genType(0)); + + return glm::log(x) / glm::log(base); + } + + VECTORIZE_VEC_SCA(log) + VECTORIZE_VEC_VEC(log) +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/matrix_cross_product.hpp b/include/gal/opengl/glm/gtx/matrix_cross_product.hpp new file mode 100644 index 0000000000..bafb77925d --- /dev/null +++ b/include/gal/opengl/glm/gtx/matrix_cross_product.hpp @@ -0,0 +1,71 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_matrix_cross_product +/// @file glm/gtx/matrix_cross_product.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_extented_min_max (dependence) +/// +/// @defgroup gtx_matrix_cross_product GLM_GTX_matrix_cross_product +/// @ingroup gtx +/// +/// @brief Build cross product matrices +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_matrix_cross_product +#define GLM_GTX_matrix_cross_product GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_matrix_cross_product extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_matrix_cross_product + /// @{ + + //! Build a cross product matrix. + //! From GLM_GTX_matrix_cross_product extension. + template + detail::tmat3x3 matrixCross3( + detail::tvec3 const & x); + + //! Build a cross product matrix. + //! From GLM_GTX_matrix_cross_product extension. + template + detail::tmat4x4 matrixCross4( + detail::tvec3 const & x); + + /// @} +}//namespace glm + +#include "matrix_cross_product.inl" + +#endif//GLM_GTX_matrix_cross_product diff --git a/include/gal/opengl/glm/gtx/matrix_cross_product.inl b/include/gal/opengl/glm/gtx/matrix_cross_product.inl new file mode 100644 index 0000000000..9d5d69acfe --- /dev/null +++ b/include/gal/opengl/glm/gtx/matrix_cross_product.inl @@ -0,0 +1,44 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2005-12-21 +// Licence : This source is under MIT License +// File : glm/gtx/matrix_cross_product.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tmat3x3 matrixCross3 + ( + detail::tvec3 const & x + ) + { + detail::tmat3x3 Result(T(0)); + Result[0][1] = x.z; + Result[1][0] = -x.z; + Result[0][2] = -x.y; + Result[2][0] = x.y; + Result[1][2] = x.x; + Result[2][1] = -x.x; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 matrixCross4 + ( + detail::tvec3 const & x + ) + { + detail::tmat4x4 Result(T(0)); + Result[0][1] = x.z; + Result[1][0] = -x.z; + Result[0][2] = -x.y; + Result[2][0] = x.y; + Result[1][2] = x.x; + Result[2][1] = -x.x; + return Result; + } + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/matrix_interpolation.hpp b/include/gal/opengl/glm/gtx/matrix_interpolation.hpp new file mode 100644 index 0000000000..7b072e2eba --- /dev/null +++ b/include/gal/opengl/glm/gtx/matrix_interpolation.hpp @@ -0,0 +1,88 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_matrix_interpolation +/// @file glm/gtx/matrix_interpolation.hpp +/// @date 2011-03-05 / 2011-06-07 +/// @author Ghenadii Ursachi (the.asteroth@gmail.com) +/// +/// @see core (dependence) +/// +/// @defgroup gtx_matrix_interpolation GLM_GTX_matrix_interpolation +/// @ingroup gtx +/// +/// @brief Allows to directly interpolate two exiciting matrices. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_matrix_interpolation +#define GLM_GTX_matrix_interpolation GLM_VERSION + +// Dependency: +//#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_matrix_interpolation extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_matrix_interpolation + /// @{ + + //! Get the axis and angle of the rotation from a matrix. + //! From GLM_GTX_matrix_interpolation extension. + template + void axisAngle( + detail::tmat4x4 const & mat, + detail::tvec3 & axis, + T & angle); + + //! Build a matrix from axis and angle. + //! From GLM_GTX_matrix_interpolation extension. + template + detail::tmat4x4 axisAngleMatrix( + detail::tvec3 const & axis, + T const angle); + + //! Extracts the rotation part of a matrix. + //! From GLM_GTX_matrix_interpolation extension. + template + detail::tmat4x4 extractMatrixRotation( + detail::tmat4x4 const & mat); + + //! Build a interpolation of 4 * 4 matrixes. + //! From GLM_GTX_matrix_interpolation extension. + //! Warning! works only with rotation and/or translation matrixes, scale will generate unexpected results. + template + detail::tmat4x4 interpolate( + detail::tmat4x4 const & m1, + detail::tmat4x4 const & m2, + T const delta); + + /// @} +}//namespace glm + +#include "matrix_interpolation.inl" + +#endif//GLM_GTX_matrix_interpolation diff --git a/include/gal/opengl/glm/gtx/matrix_interpolation.inl b/include/gal/opengl/glm/gtx/matrix_interpolation.inl new file mode 100644 index 0000000000..1df9bca4fd --- /dev/null +++ b/include/gal/opengl/glm/gtx/matrix_interpolation.inl @@ -0,0 +1,130 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2011-03-05 +// Updated : 2011-03-05 +// Licence : This source is under MIT License +// File : glm/gtx/matrix_interpolation.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER void axisAngle + ( + detail::tmat4x4 const & mat, + detail::tvec3 & axis, + T & angle + ) + { + T epsilon = (T)0.01; + T epsilon2 = (T)0.1; + + if ((fabs(mat[1][0] - mat[0][1]) < epsilon) && (fabs(mat[2][0] - mat[0][2]) < epsilon) && (fabs(mat[2][1] - mat[1][2]) < epsilon)) { + if ((fabs(mat[1][0] + mat[0][1]) < epsilon2) && (fabs(mat[2][0] + mat[0][2]) < epsilon2) && (fabs(mat[2][1] + mat[1][2]) < epsilon2) && (fabs(mat[0][0] + mat[1][1] + mat[2][2] - (T)3.0) < epsilon2)) { + angle = (T)0.0; + axis.x = (T)1.0; + axis.y = (T)0.0; + axis.z = (T)0.0; + return; + } + angle = T(3.1415926535897932384626433832795); + T xx = (mat[0][0] + (T)1.0) / (T)2.0; + T yy = (mat[1][1] + (T)1.0) / (T)2.0; + T zz = (mat[2][2] + (T)1.0) / (T)2.0; + T xy = (mat[1][0] + mat[0][1]) / (T)4.0; + T xz = (mat[2][0] + mat[0][2]) / (T)4.0; + T yz = (mat[2][1] + mat[1][2]) / (T)4.0; + if ((xx > yy) && (xx > zz)) { + if (xx < epsilon) { + axis.x = (T)0.0; + axis.y = (T)0.7071; + axis.z = (T)0.7071; + } else { + axis.x = sqrt(xx); + axis.y = xy / axis.x; + axis.z = xz / axis.x; + } + } else if (yy > zz) { + if (yy < epsilon) { + axis.x = (T)0.7071; + axis.y = (T)0.0; + axis.z = (T)0.7071; + } else { + axis.y = sqrt(yy); + axis.x = xy / axis.y; + axis.z = yz / axis.y; + } + } else { + if (zz < epsilon) { + axis.x = (T)0.7071; + axis.y = (T)0.7071; + axis.z = (T)0.0; + } else { + axis.z = sqrt(zz); + axis.x = xz / axis.z; + axis.y = yz / axis.z; + } + } + return; + } + T s = sqrt((mat[2][1] - mat[1][2]) * (mat[2][1] - mat[1][2]) + (mat[2][0] - mat[0][2]) * (mat[2][0] - mat[0][2]) + (mat[1][0] - mat[0][1]) * (mat[1][0] - mat[0][1])); + if (glm::abs(s) < T(0.001)) + s = (T)1.0; + angle = acos((mat[0][0] + mat[1][1] + mat[2][2] - (T)1.0) / (T)2.0); + axis.x = (mat[1][2] - mat[2][1]) / s; + axis.y = (mat[2][0] - mat[0][2]) / s; + axis.z = (mat[0][1] - mat[1][0]) / s; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 axisAngleMatrix + ( + detail::tvec3 const & axis, + T const angle + ) + { + T c = cos(angle); + T s = sin(angle); + T t = T(1) - c; + detail::tvec3 n = normalize(axis); + + return detail::tmat4x4( + t * n.x * n.x + c, t * n.x * n.y + n.z * s, t * n.x * n.z - n.y * s, T(0), + t * n.x * n.y - n.z * s, t * n.y * n.y + c, t * n.y * n.z + n.x * s, T(0), + t * n.x * n.z + n.y * s, t * n.y * n.z - n.x * s, t * n.z * n.z + c, T(0), + T(0), T(0), T(0), T(1) + ); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 extractMatrixRotation( + detail::tmat4x4 const & mat) + { + return detail::tmat4x4( + mat[0][0], mat[0][1], mat[0][2], 0.0, + mat[1][0], mat[1][1], mat[1][2], 0.0, + mat[2][0], mat[2][1], mat[2][2], 0.0, + 0.0, 0.0, 0.0, 1.0 + ); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 interpolate + ( + detail::tmat4x4 const & m1, + detail::tmat4x4 const & m2, + T const delta + ) + { + detail::tmat4x4 dltRotation = m2 * transpose(m1); + detail::tvec3 dltAxis; + T dltAngle; + axisAngle(dltRotation, dltAxis, dltAngle); + detail::tmat4x4 out = axisAngleMatrix(dltAxis, dltAngle * delta) * extractMatrixRotation(m1); + out[3][0] = m1[3][0] + delta * (m2[3][0] - m1[3][0]); + out[3][1] = m1[3][1] + delta * (m2[3][1] - m1[3][1]); + out[3][2] = m1[3][2] + delta * (m2[3][2] - m1[3][2]); + return out; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/matrix_major_storage.hpp b/include/gal/opengl/glm/gtx/matrix_major_storage.hpp new file mode 100644 index 0000000000..973e2aeeeb --- /dev/null +++ b/include/gal/opengl/glm/gtx/matrix_major_storage.hpp @@ -0,0 +1,143 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_matrix_major_storage +/// @file glm/gtx/matrix_major_storage.hpp +/// @date 2006-04-19 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_extented_min_max (dependence) +/// +/// @defgroup gtx_matrix_major_storage GLM_GTX_matrix_major_storage +/// @ingroup gtx +/// +/// @brief Build matrices with specific matrix order, row or column +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_matrix_major_storage +#define GLM_GTX_matrix_major_storage GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_matrix_major_storage extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_matrix_major_storage + /// @{ + + //! Build a row major matrix from row vectors. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat2x2 rowMajor2( + detail::tvec2 const & v1, + detail::tvec2 const & v2); + + //! Build a row major matrix from other matrix. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat2x2 rowMajor2( + detail::tmat2x2 const & m); + + //! Build a row major matrix from row vectors. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat3x3 rowMajor3( + detail::tvec3 const & v1, + detail::tvec3 const & v2, + detail::tvec3 const & v3); + + //! Build a row major matrix from other matrix. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat3x3 rowMajor3( + detail::tmat3x3 const & m); + + //! Build a row major matrix from row vectors. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat4x4 rowMajor4( + detail::tvec4 const & v1, + detail::tvec4 const & v2, + detail::tvec4 const & v3, + detail::tvec4 const & v4); + + //! Build a row major matrix from other matrix. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat4x4 rowMajor4( + detail::tmat4x4 const & m); + + //! Build a column major matrix from column vectors. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat2x2 colMajor2( + detail::tvec2 const & v1, + detail::tvec2 const & v2); + + //! Build a column major matrix from other matrix. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat2x2 colMajor2( + detail::tmat2x2 const & m); + + //! Build a column major matrix from column vectors. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat3x3 colMajor3( + detail::tvec3 const & v1, + detail::tvec3 const & v2, + detail::tvec3 const & v3); + + //! Build a column major matrix from other matrix. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat3x3 colMajor3( + detail::tmat3x3 const & m); + + //! Build a column major matrix from column vectors. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat4x4 colMajor4( + detail::tvec4 const & v1, + detail::tvec4 const & v2, + detail::tvec4 const & v3, + detail::tvec4 const & v4); + + //! Build a column major matrix from other matrix. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat4x4 colMajor4( + detail::tmat4x4 const & m); + + /// @} +}//namespace glm + +#include "matrix_major_storage.inl" + +#endif//GLM_GTX_matrix_major_storage diff --git a/include/gal/opengl/glm/gtx/matrix_major_storage.inl b/include/gal/opengl/glm/gtx/matrix_major_storage.inl new file mode 100644 index 0000000000..4e5a9ff342 --- /dev/null +++ b/include/gal/opengl/glm/gtx/matrix_major_storage.inl @@ -0,0 +1,173 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2006-04-19 +// Updated : 2009-02-19 +// Licence : This source is under MIT License +// File : glm/gtx/matrix_major_storage.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tmat2x2 rowMajor2 + ( + detail::tvec2 const & v1, + detail::tvec2 const & v2 + ) + { + detail::tmat2x2 Result; + Result[0][0] = v1.x; + Result[1][0] = v1.y; + Result[0][1] = v2.x; + Result[1][1] = v2.y; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x2 rowMajor2( + const detail::tmat2x2& m) + { + detail::tmat2x2 Result; + Result[0][0] = m[0][0]; + Result[0][1] = m[1][0]; + Result[1][0] = m[0][1]; + Result[1][1] = m[1][1]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 rowMajor3( + const detail::tvec3& v1, + const detail::tvec3& v2, + const detail::tvec3& v3) + { + detail::tmat3x3 Result; + Result[0][0] = v1.x; + Result[1][0] = v1.y; + Result[2][0] = v1.z; + Result[0][1] = v2.x; + Result[1][1] = v2.y; + Result[2][1] = v2.z; + Result[0][2] = v3.x; + Result[1][2] = v3.y; + Result[2][2] = v3.z; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 rowMajor3( + const detail::tmat3x3& m) + { + detail::tmat3x3 Result; + Result[0][0] = m[0][0]; + Result[0][1] = m[1][0]; + Result[0][2] = m[2][0]; + Result[1][0] = m[0][1]; + Result[1][1] = m[1][1]; + Result[1][2] = m[2][1]; + Result[2][0] = m[0][2]; + Result[2][1] = m[1][2]; + Result[2][2] = m[2][2]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 rowMajor4( + const detail::tvec4& v1, + const detail::tvec4& v2, + const detail::tvec4& v3, + const detail::tvec4& v4) + { + detail::tmat4x4 Result; + Result[0][0] = v1.x; + Result[1][0] = v1.y; + Result[2][0] = v1.z; + Result[3][0] = v1.w; + Result[0][1] = v2.x; + Result[1][1] = v2.y; + Result[2][1] = v2.z; + Result[3][1] = v2.w; + Result[0][2] = v3.x; + Result[1][2] = v3.y; + Result[2][2] = v3.z; + Result[3][2] = v3.w; + Result[0][3] = v4.x; + Result[1][3] = v4.y; + Result[2][3] = v4.z; + Result[3][3] = v4.w; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 rowMajor4( + const detail::tmat4x4& m) + { + detail::tmat4x4 Result; + Result[0][0] = m[0][0]; + Result[0][1] = m[1][0]; + Result[0][2] = m[2][0]; + Result[0][3] = m[3][0]; + Result[1][0] = m[0][1]; + Result[1][1] = m[1][1]; + Result[1][2] = m[2][1]; + Result[1][3] = m[3][1]; + Result[2][0] = m[0][2]; + Result[2][1] = m[1][2]; + Result[2][2] = m[2][2]; + Result[2][3] = m[3][2]; + Result[3][0] = m[0][3]; + Result[3][1] = m[1][3]; + Result[3][2] = m[2][3]; + Result[3][3] = m[3][3]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x2 colMajor2( + const detail::tvec2& v1, + const detail::tvec2& v2) + { + return detail::tmat2x2(v1, v2); + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x2 colMajor2( + const detail::tmat2x2& m) + { + return detail::tmat2x2(m); + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 colMajor3( + const detail::tvec3& v1, + const detail::tvec3& v2, + const detail::tvec3& v3) + { + return detail::tmat3x3(v1, v2, v3); + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 colMajor3( + const detail::tmat3x3& m) + { + return detail::tmat3x3(m); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 colMajor4( + const detail::tvec4& v1, + const detail::tvec4& v2, + const detail::tvec4& v3, + const detail::tvec4& v4) + { + return detail::tmat4x4(v1, v2, v3, v4); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 colMajor4( + const detail::tmat4x4& m) + { + return detail::tmat4x4(m); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/matrix_operation.hpp b/include/gal/opengl/glm/gtx/matrix_operation.hpp new file mode 100644 index 0000000000..012ee1a050 --- /dev/null +++ b/include/gal/opengl/glm/gtx/matrix_operation.hpp @@ -0,0 +1,112 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_matrix_operation +/// @file glm/gtx/matrix_operation.hpp +/// @date 2009-08-29 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_matrix_operation GLM_GTX_matrix_operation +/// @ingroup gtx +/// +/// @brief Build diagonal matrices from vectors. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_matrix_operation +#define GLM_GTX_matrix_operation GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_matrix_operation extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_matrix_operation + /// @{ + + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat2x2 diagonal2x2( + detail::tvec2 const & v); + + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat2x3 diagonal2x3( + detail::tvec2 const & v); + + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat2x4 diagonal2x4( + detail::tvec2 const & v); + + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat3x2 diagonal3x2( + detail::tvec2 const & v); + + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat3x3 diagonal3x3( + detail::tvec3 const & v); + + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat3x4 diagonal3x4( + detail::tvec3 const & v); + + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat4x2 diagonal4x2( + detail::tvec2 const & v); + + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat4x3 diagonal4x3( + detail::tvec3 const & v); + + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat4x4 diagonal4x4( + detail::tvec4 const & v); + + /// @} +}//namespace glm + +#include "matrix_operation.inl" + +#endif//GLM_GTX_matrix_operation diff --git a/include/gal/opengl/glm/gtx/matrix_operation.inl b/include/gal/opengl/glm/gtx/matrix_operation.inl new file mode 100644 index 0000000000..2d5537af97 --- /dev/null +++ b/include/gal/opengl/glm/gtx/matrix_operation.inl @@ -0,0 +1,124 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2009-08-29 +// Updated : 2009-08-29 +// Licence : This source is under MIT License +// File : glm/gtx/matrix_operation.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tmat2x2 diagonal2x2 + ( + detail::tvec2 const & v + ) + { + detail::tmat2x2 Result(valType(1)); + Result[0][0] = v[0]; + Result[1][1] = v[1]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x3 diagonal2x3 + ( + detail::tvec2 const & v + ) + { + detail::tmat2x3 Result(valType(1)); + Result[0][0] = v[0]; + Result[1][1] = v[1]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x4 diagonal2x4 + ( + detail::tvec2 const & v + ) + { + detail::tmat2x4 Result(valType(1)); + Result[0][0] = v[0]; + Result[1][1] = v[1]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x2 diagonal3x2 + ( + detail::tvec2 const & v + ) + { + detail::tmat3x2 Result(valType(1)); + Result[0][0] = v[0]; + Result[1][1] = v[1]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 diagonal3x3 + ( + detail::tvec3 const & v + ) + { + detail::tmat3x3 Result(valType(1)); + Result[0][0] = v[0]; + Result[1][1] = v[1]; + Result[2][2] = v[2]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x4 diagonal3x4 + ( + detail::tvec3 const & v + ) + { + detail::tmat3x4 Result(valType(1)); + Result[0][0] = v[0]; + Result[1][1] = v[1]; + Result[2][2] = v[2]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 diagonal4x4 + ( + detail::tvec4 const & v + ) + { + detail::tmat4x4 Result(valType(1)); + Result[0][0] = v[0]; + Result[1][1] = v[1]; + Result[2][2] = v[2]; + Result[3][3] = v[3]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x3 diagonal4x3 + ( + detail::tvec3 const & v + ) + { + detail::tmat4x3 Result(valType(1)); + Result[0][0] = v[0]; + Result[1][1] = v[1]; + Result[2][2] = v[2]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x2 diagonal4x2 + ( + detail::tvec2 const & v + ) + { + detail::tmat4x2 Result(valType(1)); + Result[0][0] = v[0]; + Result[1][1] = v[1]; + return Result; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/matrix_query.hpp b/include/gal/opengl/glm/gtx/matrix_query.hpp new file mode 100644 index 0000000000..b02a06d659 --- /dev/null +++ b/include/gal/opengl/glm/gtx/matrix_query.hpp @@ -0,0 +1,117 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_matrix_query +/// @file glm/gtx/matrix_query.hpp +/// @date 2007-03-05 / 2011-08-28 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_vector_query (dependence) +/// +/// @defgroup gtx_matrix_query GLM_GTX_matrix_query +/// @ingroup gtx +/// +/// @brief Query to evaluate matrix properties +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_matrix_query +#define GLM_GTX_matrix_query GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtx/vector_query.hpp" +#include + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_matrix_query extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_matrix_query + /// @{ + + /// Return whether a matrix a null matrix. + /// From GLM_GTX_matrix_query extension. + template + bool isNull( + detail::tmat2x2 const & m, + T const & epsilon/* = std::numeric_limits::epsilon()*/); + + /// Return whether a matrix a null matrix. + /// From GLM_GTX_matrix_query extension. + template + bool isNull( + detail::tmat3x3 const & m, + T const & epsilon/* = std::numeric_limits::epsilon()*/); + + /// Return whether a matrix is a null matrix. + /// From GLM_GTX_matrix_query extension. + template + bool isNull( + detail::tmat4x4 const & m, + T const & epsilon/* = std::numeric_limits::epsilon()*/); + + /// Return whether a matrix is an identity matrix. + /// From GLM_GTX_matrix_query extension. + template + bool isIdentity( + genType const & m, + typename genType::value_type const & epsilon/* = std::numeric_limits::epsilon()*/); + + /// Return whether a matrix is a normalized matrix. + /// From GLM_GTX_matrix_query extension. + template + bool isNormalized( + detail::tmat2x2 const & m, + valType const & epsilon/* = std::numeric_limits::epsilon()*/); + + /// Return whether a matrix is a normalized matrix. + /// From GLM_GTX_matrix_query extension. + template + bool isNormalized( + detail::tmat3x3 const & m, + valType const & epsilon/* = std::numeric_limits::epsilon()*/); + + /// Return whether a matrix is a normalized matrix. + /// From GLM_GTX_matrix_query extension. + template + bool isNormalized( + detail::tmat4x4 const & m, + valType const & epsilon/* = std::numeric_limits::epsilon()*/); + + /// Return whether a matrix is an orthonormalized matrix. + /// From GLM_GTX_matrix_query extension. + template class matType> + bool isOrthogonal( + matType const & m, + valType const & epsilon/* = std::numeric_limits::epsilon()*/); + + /// @} +}//namespace glm + +#include "matrix_query.inl" + +#endif//GLM_GTX_matrix_query diff --git a/include/gal/opengl/glm/gtx/matrix_query.inl b/include/gal/opengl/glm/gtx/matrix_query.inl new file mode 100644 index 0000000000..27618b2763 --- /dev/null +++ b/include/gal/opengl/glm/gtx/matrix_query.inl @@ -0,0 +1,154 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-03-05 +// Updated : 2007-03-05 +// Licence : This source is under MIT License +// File : glm/gtx/matrix_query.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Dependency: +// - GLM core +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER bool isNull + ( + detail::tmat2x2 const & m, + T const & epsilon) + { + bool result = true; + for(int i = 0; result && i < 2 ; ++i) + result = isNull(m[i], epsilon); + return result; + } + + template + GLM_FUNC_QUALIFIER bool isNull + ( + detail::tmat3x3 const & m, + T const & epsilon + ) + { + bool result = true; + for(int i = 0; result && i < 3 ; ++i) + result = isNull(m[i], epsilon); + return result; + } + + template + GLM_FUNC_QUALIFIER bool isNull + ( + detail::tmat4x4 const & m, + T const & epsilon + ) + { + bool result = true; + for(int i = 0; result && i < 4 ; ++i) + result = isNull(m[i], epsilon); + return result; + } + + template + GLM_FUNC_QUALIFIER bool isIdentity + ( + genType const & m, + typename genType::value_type const & epsilon + ) + { + bool result = true; + for(typename genType::size_type i = typename genType::size_type(0); result && i < genType::col_size(); ++i) + { + for(typename genType::size_type j = typename genType::size_type(0); result && j < i ; ++j) + result = abs(m[i][j]) <= epsilon; + if(result) + result = abs(m[i][i] - typename genType::value_type(1)) <= epsilon; + for(typename genType::size_type j = i + typename genType::size_type(1); result && j < genType::row_size(); ++j) + result = abs(m[i][j]) <= epsilon; + } + return result; + } + + template + GLM_FUNC_QUALIFIER bool isNormalized + ( + detail::tmat2x2 const & m, + genType const & epsilon + ) + { + bool result(true); + for(typename detail::tmat2x2::size_type i(0); result && i < m.length(); ++i) + result = isNormalized(m[i], epsilon); + for(typename detail::tmat2x2::size_type i(0); result && i < m.length(); ++i) + { + typename detail::tmat2x2::col_type v; + for(typename detail::tmat2x2::size_type j(0); j < m.length(); ++j) + v[j] = m[j][i]; + result = isNormalized(v, epsilon); + } + return result; + } + + template + GLM_FUNC_QUALIFIER bool isNormalized + ( + detail::tmat3x3 const & m, + genType const & epsilon + ) + { + bool result(true); + for(typename detail::tmat3x3::size_type i(0); result && i < m.length(); ++i) + result = isNormalized(m[i], epsilon); + for(typename detail::tmat3x3::size_type i(0); result && i < m.length(); ++i) + { + typename detail::tmat3x3::col_type v; + for(typename detail::tmat3x3::size_type j(0); j < m.length(); ++j) + v[j] = m[j][i]; + result = isNormalized(v, epsilon); + } + return result; + } + + template + GLM_FUNC_QUALIFIER bool isNormalized + ( + detail::tmat4x4 const & m, + genType const & epsilon + ) + { + bool result(true); + for(typename detail::tmat4x4::size_type i(0); result && i < m.length(); ++i) + result = isNormalized(m[i], epsilon); + for(typename detail::tmat4x4::size_type i(0); result && i < m.length(); ++i) + { + typename detail::tmat4x4::col_type v; + for(typename detail::tmat4x4::size_type j(0); j < m.length(); ++j) + v[j] = m[j][i]; + result = isNormalized(v, epsilon); + } + return result; + } + + template class matType> + GLM_FUNC_QUALIFIER bool isOrthogonal + ( + matType const & m, + genType const & epsilon + ) + { + bool result(true); + for(typename matType::size_type i(0); result && i < m.length() - 1; ++i) + for(typename matType::size_type j(i + 1); result && j < m.length(); ++j) + result = areOrthogonal(m[i], m[j], epsilon); + + if(result) + { + matType tmp = transpose(m); + for(typename matType::size_type i(0); result && i < m.length() - 1 ; ++i) + for(typename matType::size_type j(i + 1); result && j < m.length(); ++j) + result = areOrthogonal(tmp[i], tmp[j], epsilon); + } + return result; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/mixed_product.hpp b/include/gal/opengl/glm/gtx/mixed_product.hpp new file mode 100644 index 0000000000..9752a05db1 --- /dev/null +++ b/include/gal/opengl/glm/gtx/mixed_product.hpp @@ -0,0 +1,65 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_mixed_product +/// @file glm/gtx/mixed_product.hpp +/// @date 2007-04-03 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_mixed_product GLM_GTX_mixed_producte +/// @ingroup gtx +/// +/// @brief Mixed product of 3 vectors. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_mixed_product +#define GLM_GTX_mixed_product GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_mixed_product extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_mixed_product + /// @{ + + /// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension) + template + valType mixedProduct( + detail::tvec3 const & v1, + detail::tvec3 const & v2, + detail::tvec3 const & v3); + + /// @} +}// namespace glm + +#include "mixed_product.inl" + +#endif//GLM_GTX_mixed_product diff --git a/include/gal/opengl/glm/gtx/mixed_product.inl b/include/gal/opengl/glm/gtx/mixed_product.inl new file mode 100644 index 0000000000..b34e0dcd42 --- /dev/null +++ b/include/gal/opengl/glm/gtx/mixed_product.inl @@ -0,0 +1,22 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-04-03 +// Updated : 2008-09-17 +// Licence : This source is under MIT License +// File : glm/gtx/mixed_product.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER valType mixedProduct + ( + detail::tvec3 const & v1, + detail::tvec3 const & v2, + detail::tvec3 const & v3 + ) + { + return dot(cross(v1, v2), v3); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/multiple.hpp b/include/gal/opengl/glm/gtx/multiple.hpp new file mode 100644 index 0000000000..3f9b8e392d --- /dev/null +++ b/include/gal/opengl/glm/gtx/multiple.hpp @@ -0,0 +1,73 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_multiple +/// @file glm/gtx/multiple.hpp +/// @date 2009-10-26 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_extented_min_max (dependence) +/// +/// @defgroup gtx_multiple GLM_GTX_multiple +/// @ingroup gtx +/// +/// @brief Find the closest number of a number multiple of other number. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_multiple +#define GLM_GTX_multiple GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_multiple extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_multiple + /// @{ + + //! Higher Multiple number of Source. + //! From GLM_GTX_multiple extension. + template + genType higherMultiple( + genType const & Source, + genType const & Multiple); + + //! Lower Multiple number of Source. + //! From GLM_GTX_multiple extension. + template + genType lowerMultiple( + genType const & Source, + genType const & Multiple); + + /// @} +}//namespace glm + +#include "multiple.inl" + +#endif//GLM_GTX_multiple diff --git a/include/gal/opengl/glm/gtx/multiple.inl b/include/gal/opengl/glm/gtx/multiple.inl new file mode 100644 index 0000000000..d344c68721 --- /dev/null +++ b/include/gal/opengl/glm/gtx/multiple.inl @@ -0,0 +1,118 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2009-10-26 +// Updated : 2011-06-07 +// Licence : This source is under MIT License +// File : glm/gtx/multiple.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Dependency: +// - GLM core +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + ////////////////////// + // higherMultiple + + template + GLM_FUNC_QUALIFIER genType higherMultiple + ( + genType const & Source, + genType const & Multiple + ) + { + genType Tmp = Source % Multiple; + return Tmp ? Source + Multiple - Tmp : Source; + } + + template <> + GLM_FUNC_QUALIFIER detail::half higherMultiple + ( + detail::half const & SourceH, + detail::half const & MultipleH + ) + { + float Source = SourceH.toFloat(); + float Multiple = MultipleH.toFloat(); + + int Tmp = int(float(Source)) % int(Multiple); + return detail::half(Tmp ? Source + Multiple - float(Tmp) : Source); + } + + template <> + GLM_FUNC_QUALIFIER float higherMultiple + ( + float const & Source, + float const & Multiple + ) + { + int Tmp = int(Source) % int(Multiple); + return Tmp ? Source + Multiple - float(Tmp) : Source; + } + + template <> + GLM_FUNC_QUALIFIER double higherMultiple + ( + double const & Source, + double const & Multiple + ) + { + long Tmp = long(Source) % long(Multiple); + return Tmp ? Source + Multiple - double(Tmp) : Source; + } + + VECTORIZE_VEC_VEC(higherMultiple) + + ////////////////////// + // lowerMultiple + + template + GLM_FUNC_QUALIFIER genType lowerMultiple + ( + genType const & Source, + genType const & Multiple + ) + { + genType Tmp = Source % Multiple; + return Tmp ? Source - Tmp : Source; + } + + template <> + GLM_FUNC_QUALIFIER detail::half lowerMultiple + ( + detail::half const & SourceH, + detail::half const & MultipleH + ) + { + float Source = SourceH.toFloat(); + float Multiple = MultipleH.toFloat(); + + int Tmp = int(float(Source)) % int(float(Multiple)); + return detail::half(Tmp ? Source - float(Tmp) : Source); + } + + template <> + GLM_FUNC_QUALIFIER float lowerMultiple + ( + float const & Source, + float const & Multiple + ) + { + int Tmp = int(Source) % int(Multiple); + return Tmp ? Source - float(Tmp) : Source; + } + + template <> + GLM_FUNC_QUALIFIER double lowerMultiple + ( + double const & Source, + double const & Multiple + ) + { + long Tmp = long(Source) % long(Multiple); + return Tmp ? Source - double(Tmp) : Source; + } + + VECTORIZE_VEC_VEC(lowerMultiple) +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/noise.hpp b/include/gal/opengl/glm/gtx/noise.hpp new file mode 100644 index 0000000000..43dc33c147 --- /dev/null +++ b/include/gal/opengl/glm/gtx/noise.hpp @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/////////////////////////////////////////////////////////////////////////////////// + +#if(defined(GLM_MESSAGES)) +# pragma message("GLM: GLM_GTX_random extension is deprecated, include GLM_GTC_random (glm/gtc/noise.hpp) instead") +#endif + +// Promoted: +#include "../gtc/noise.hpp" diff --git a/include/gal/opengl/glm/gtx/norm.hpp b/include/gal/opengl/glm/gtx/norm.hpp new file mode 100644 index 0000000000..b3906b62cb --- /dev/null +++ b/include/gal/opengl/glm/gtx/norm.hpp @@ -0,0 +1,133 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_norm +/// @file glm/gtx/norm.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_quaternion (dependence) +/// +/// @defgroup gtx_norm GLM_GTX_norm +/// @ingroup gtx +/// +/// @brief Various ways to compute vector norms. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_norm +#define GLM_GTX_norm GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtx/quaternion.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_norm extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_norm + /// @{ + + //! Returns the squared length of x. + //! From GLM_GTX_norm extension. + template + T length2( + T const & x); + + //! Returns the squared length of x. + //! From GLM_GTX_norm extension. + template + typename genType::value_type length2( + genType const & x); + + //! Returns the squared length of x. + //! From GLM_GTX_norm extension. + template + T length2( + detail::tquat const & q); + + //! Returns the squared distance between p0 and p1, i.e., length(p0 - p1). + //! From GLM_GTX_norm extension. + template + T distance2( + T const & p0, + T const & p1); + + //! Returns the squared distance between p0 and p1, i.e., length(p0 - p1). + //! From GLM_GTX_norm extension. + template + typename genType::value_type distance2( + genType const & p0, + genType const & p1); + + //! Returns the L1 norm between x and y. + //! From GLM_GTX_norm extension. + template + T l1Norm( + detail::tvec3 const & x, + detail::tvec3 const & y); + + //! Returns the L1 norm of v. + //! From GLM_GTX_norm extension. + template + T l1Norm( + detail::tvec3 const & v); + + //! Returns the L2 norm between x and y. + //! From GLM_GTX_norm extension. + template + T l2Norm( + detail::tvec3 const & x, + detail::tvec3 const & y); + + //! Returns the L2 norm of v. + //! From GLM_GTX_norm extension. + template + T l2Norm( + detail::tvec3 const & x); + + //! Returns the L norm between x and y. + //! From GLM_GTX_norm extension. + template + T lxNorm( + detail::tvec3 const & x, + detail::tvec3 const & y, + unsigned int Depth); + + //! Returns the L norm of v. + //! From GLM_GTX_norm extension. + template + T lxNorm( + detail::tvec3 const & x, + unsigned int Depth); + + /// @} +}//namespace glm + +#include "norm.inl" + +#endif//GLM_GTX_norm diff --git a/include/gal/opengl/glm/gtx/norm.inl b/include/gal/opengl/glm/gtx/norm.inl new file mode 100644 index 0000000000..7dde0aeb40 --- /dev/null +++ b/include/gal/opengl/glm/gtx/norm.inl @@ -0,0 +1,156 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2008-07-24 +// Licence : This source is under MIT License +// File : glm/gtx/norm.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER T length2 + ( + T const & x + ) + { + return x * x; + } + + template + GLM_FUNC_QUALIFIER T length2 + ( + detail::tvec2 const & x + ) + { + return dot(x, x); + } + + template + GLM_FUNC_QUALIFIER T length2 + ( + detail::tvec3 const & x + ) + { + return dot(x, x); + } + + template + GLM_FUNC_QUALIFIER T length2 + ( + detail::tvec4 const & x + ) + { + return dot(x, x); + } + + template + GLM_FUNC_QUALIFIER T length2 + ( + detail::tquat const & q + ) + { + return q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w; + } + + template + GLM_FUNC_QUALIFIER T distance2 + ( + T const & p0, + T const & p1 + ) + { + return length2(p1 - p0); + } + + template + GLM_FUNC_QUALIFIER T distance2 + ( + detail::tvec2 const & p0, + detail::tvec2 const & p1 + ) + { + return length2(p1 - p0); + } + + template + GLM_FUNC_QUALIFIER T distance2 + ( + detail::tvec3 const & p0, + detail::tvec3 const & p1 + ) + { + return length2(p1 - p0); + } + + template + GLM_FUNC_QUALIFIER T distance2 + ( + detail::tvec4 const & p0, + detail::tvec4 const & p1 + ) + { + return length2(p1 - p0); + } + + template + GLM_FUNC_QUALIFIER T l1Norm + ( + detail::tvec3 const & a, + detail::tvec3 const & b + ) + { + return abs(b.x - a.x) + abs(b.y - a.y) + abs(b.z - a.z); + } + + template + GLM_FUNC_QUALIFIER T l1Norm + ( + detail::tvec3 const & v + ) + { + return abs(v.x) + abs(v.y) + abs(v.z); + } + + template + GLM_FUNC_QUALIFIER T l2Norm + ( + detail::tvec3 const & a, + detail::tvec3 const & b + ) + { + return length(b - a); + } + + template + GLM_FUNC_QUALIFIER T l2Norm + ( + detail::tvec3 const & v + ) + { + return length(v); + } + + template + GLM_FUNC_QUALIFIER T lxNorm + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + unsigned int Depth + ) + { + return pow(pow(y.x - x.x, T(Depth)) + pow(y.y - x.y, T(Depth)) + pow(y.z - x.z, T(Depth)), T(1) / T(Depth)); + } + + template + GLM_FUNC_QUALIFIER T lxNorm + ( + detail::tvec3 const & v, + unsigned int Depth + ) + { + return pow(pow(v.x, T(Depth)) + pow(v.y, T(Depth)) + pow(v.z, T(Depth)), T(1) / T(Depth)); + } + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/normal.hpp b/include/gal/opengl/glm/gtx/normal.hpp new file mode 100644 index 0000000000..92c129cc34 --- /dev/null +++ b/include/gal/opengl/glm/gtx/normal.hpp @@ -0,0 +1,67 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_normal +/// @file glm/gtx/normal.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_extented_min_max (dependence) +/// +/// @defgroup gtx_normal GLM_GTX_normal +/// @ingroup gtx +/// +/// @brief Compute the normal of a triangle. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_normal +#define GLM_GTX_normal GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_normal extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_normal + /// @{ + + //! Computes triangle normal from triangle points. + //! From GLM_GTX_normal extension. + template + detail::tvec3 triangleNormal( + detail::tvec3 const & p1, + detail::tvec3 const & p2, + detail::tvec3 const & p3); + + /// @} +}//namespace glm + +#include "normal.inl" + +#endif//GLM_GTX_normal diff --git a/include/gal/opengl/glm/gtx/normal.inl b/include/gal/opengl/glm/gtx/normal.inl new file mode 100644 index 0000000000..c17e8180ed --- /dev/null +++ b/include/gal/opengl/glm/gtx/normal.inl @@ -0,0 +1,22 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2011-06-07 +// Licence : This source is under MIT License +// File : glm/gtx/normal.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tvec3 triangleNormal + ( + detail::tvec3 const & p1, + detail::tvec3 const & p2, + detail::tvec3 const & p3 + ) + { + return normalize(cross(p1 - p2, p1 - p3)); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/normalize_dot.hpp b/include/gal/opengl/glm/gtx/normalize_dot.hpp new file mode 100644 index 0000000000..7dae359fb6 --- /dev/null +++ b/include/gal/opengl/glm/gtx/normalize_dot.hpp @@ -0,0 +1,76 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_normalize_dot +/// @file glm/gtx/normalize_dot.hpp +/// @date 2007-09-28 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_fast_square_root (dependence) +/// +/// @defgroup gtx_normalize_dot GLM_GTX_normalize_dot +/// @ingroup gtx +/// +/// @brief Dot product of vectors that need to be normalize with a single square root. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_normalize_dot +#define GLM_GTX_normalize_dot GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtx/fast_square_root.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_normalize_dot extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_normalize_dot + /// @{ + + //! Normalize parameters and returns the dot product of x and y. + //! It's faster that dot(normalize(x), normalize(y)). + //! From GLM_GTX_normalize_dot extension. + template + typename genType::value_type normalizeDot( + genType const & x, + genType const & y); + + //! Normalize parameters and returns the dot product of x and y. + //! Faster that dot(fastNormalize(x), fastNormalize(y)). + //! From GLM_GTX_normalize_dot extension. + template + typename genType::value_type fastNormalizeDot( + genType const & x, + genType const & y); + + /// @} +}//namespace glm + +#include "normalize_dot.inl" + +#endif//GLM_GTX_normalize_dot diff --git a/include/gal/opengl/glm/gtx/normalize_dot.inl b/include/gal/opengl/glm/gtx/normalize_dot.inl new file mode 100644 index 0000000000..4d379e8055 --- /dev/null +++ b/include/gal/opengl/glm/gtx/normalize_dot.inl @@ -0,0 +1,115 @@ +////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-09-28 +// Updated : 2008-10-07 +// Licence : This source is under MIT License +// File : glm/gtx/normalize_dot.inl +////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER genType normalizeDot + ( + genType const & x, + genType const & y + ) + { + return + glm::dot(x, y) * + glm::inversesqrt(glm::dot(x, x) * + glm::dot(y, y)); + } + + template + GLM_FUNC_QUALIFIER valType normalizeDot + ( + detail::tvec2 const & x, + detail::tvec2 const & y + ) + { + return + glm::dot(x, y) * + glm::inversesqrt(glm::dot(x, x) * + glm::dot(y, y)); + } + + template + GLM_FUNC_QUALIFIER valType normalizeDot + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + return + glm::dot(x, y) * + glm::inversesqrt(glm::dot(x, x) * + glm::dot(y, y)); + } + + template + GLM_FUNC_QUALIFIER valType normalizeDot + ( + detail::tvec4 const & x, + detail::tvec4 const & y + ) + { + return + glm::dot(x, y) * + glm::inversesqrt(glm::dot(x, x) * + glm::dot(y, y)); + } + + template + GLM_FUNC_QUALIFIER genType fastNormalizeDot + ( + genType const & x, + genType const & y + ) + { + return + glm::dot(x, y) * + fastInverseSqrt(glm::dot(x, x) * + glm::dot(y, y)); + } + + template + GLM_FUNC_QUALIFIER valType fastNormalizeDot + ( + detail::tvec2 const & x, + detail::tvec2 const & y + ) + { + return + glm::dot(x, y) * + fastInverseSqrt(glm::dot(x, x) * + glm::dot(y, y)); + } + + template + GLM_FUNC_QUALIFIER valType fastNormalizeDot + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + return + glm::dot(x, y) * + fastInverseSqrt(glm::dot(x, x) * + glm::dot(y, y)); + } + + template + GLM_FUNC_QUALIFIER valType fastNormalizeDot + ( + detail::tvec4 const & x, + detail::tvec4 const & y + ) + { + return + glm::dot(x, y) * + fastInverseSqrt(glm::dot(x, x) * + glm::dot(y, y)); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/number_precision.hpp b/include/gal/opengl/glm/gtx/number_precision.hpp new file mode 100644 index 0000000000..06d0014f5b --- /dev/null +++ b/include/gal/opengl/glm/gtx/number_precision.hpp @@ -0,0 +1,88 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_number_precision +/// @file glm/gtx/number_precision.hpp +/// @date 2007-05-10 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_type_precision (dependence) +/// @see gtc_quaternion (dependence) +/// +/// @defgroup gtx_number_precision GLM_GTX_number_precision +/// @ingroup gtx +/// +/// @brief Defined size types. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_number_precision +#define GLM_GTX_number_precision GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/type_precision.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_number_precision extension included") +#endif + +namespace glm{ +namespace gtx +{ + ///////////////////////////// + // Unsigned int vector types + + /// @addtogroup gtx_number_precision + /// @{ + + typedef u8 u8vec1; //!< \brief 8bit unsigned integer scalar. (from GLM_GTX_number_precision extension) + typedef u16 u16vec1; //!< \brief 16bit unsigned integer scalar. (from GLM_GTX_number_precision extension) + typedef u32 u32vec1; //!< \brief 32bit unsigned integer scalar. (from GLM_GTX_number_precision extension) + typedef u64 u64vec1; //!< \brief 64bit unsigned integer scalar. (from GLM_GTX_number_precision extension) + + ////////////////////// + // Float vector types + + typedef f16 f16vec1; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_number_precision extension) + typedef f32 f32vec1; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension) + typedef f64 f64vec1; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension) + + ////////////////////// + // Float matrix types + + typedef f16 f16mat1; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_number_precision extension) + typedef f16 f16mat1x1; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_number_precision extension) + typedef f32 f32mat1; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension) + typedef f32 f32mat1x1; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension) + typedef f64 f64mat1; //!< \brief Double-precision floating-point scalar. (from GLM_GTX_number_precision extension) + typedef f64 f64mat1x1; //!< \brief Double-precision floating-point scalar. (from GLM_GTX_number_precision extension) + + /// @} +}//namespace gtx +}//namespace glm + +#include "number_precision.inl" + +#endif//GLM_GTX_number_precision diff --git a/include/gal/opengl/glm/gtx/number_precision.inl b/include/gal/opengl/glm/gtx/number_precision.inl new file mode 100644 index 0000000000..da9e81929a --- /dev/null +++ b/include/gal/opengl/glm/gtx/number_precision.inl @@ -0,0 +1,13 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-05-10 +// Updated : 2007-05-10 +// Licence : This source is under MIT License +// File : glm/gtx/number_precision.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + +} diff --git a/include/gal/opengl/glm/gtx/ocl_type.hpp b/include/gal/opengl/glm/gtx/ocl_type.hpp new file mode 100644 index 0000000000..084f6975c1 --- /dev/null +++ b/include/gal/opengl/glm/gtx/ocl_type.hpp @@ -0,0 +1,132 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_ocl_type +/// @file glm/gtx/ocl_type.hpp +/// @date 2009-05-07 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_extented_min_max (dependence) +/// +/// @defgroup gtx_ocl_type GLM_GTX_ocl_type +/// @ingroup gtx +/// +/// @brief OpenCL types. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_ocl_type +#define GLM_GTX_ocl_type GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_ocl_type extension included") +#endif + +namespace glm{ +namespace gtx +{ + /////////////////////////// + // Scalar types + + /// @addtogroup gtx_ocl_type + /// @{ + + typedef detail::int8 cl_char; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::int16 cl_short; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::int32 cl_int; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::int64 cl_long; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) + + typedef detail::uint8 cl_uchar; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::uint16 cl_ushort; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::uint32 cl_uint; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::uint64 cl_ulong; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) + + typedef detail::float16 cl_half; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + typedef detail::float32 cl_float; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + + + typedef detail::int8 cl_char1; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::int16 cl_short1; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::int32 cl_int1; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::int64 cl_long1; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) + + typedef detail::uint8 cl_uchar1; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::uint16 cl_ushort1; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::uint32 cl_uint1; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::uint64 cl_ulong1; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) + + //typedef detail::float16 cl_half1; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + typedef detail::float32 cl_float1; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + + + typedef detail::tvec2 cl_char2; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec2 cl_short2; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec2 cl_int2; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec2 cl_long2; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) + + typedef detail::tvec2 cl_uchar2; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec2 cl_ushort2; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec2 cl_uint2; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec2 cl_ulong2; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) + + //typedef detail::tvec2 cl_half2; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + typedef detail::tvec2 cl_float2; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + + + typedef detail::tvec3 cl_char3; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec3 cl_short3; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec3 cl_int3; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec3 cl_long3; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) + + typedef detail::tvec3 cl_uchar3; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec3 cl_ushort3; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec3 cl_uint3; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec3 cl_ulong3; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) + + //typedef detail::tvec3 cl_half3; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + typedef detail::tvec3 cl_float3; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + + + typedef detail::tvec4 cl_char4; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec4 cl_short4; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec4 cl_int4; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec4 cl_long4; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec4 cl_uchar4; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec4 cl_ushort4; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec4 cl_uint4; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec4 cl_ulong4; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) + + //typedef detail::tvec4 cl_half4; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + typedef detail::tvec4 cl_float4; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + + /// @} +}//namespace gtx +}//namespace glm + +#include "ocl_type.inl" + +#endif//GLM_GTX_ocl_type diff --git a/include/gal/opengl/glm/gtx/ocl_type.inl b/include/gal/opengl/glm/gtx/ocl_type.inl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/gal/opengl/glm/gtx/optimum_pow.hpp b/include/gal/opengl/glm/gtx/optimum_pow.hpp new file mode 100644 index 0000000000..a39a28648d --- /dev/null +++ b/include/gal/opengl/glm/gtx/optimum_pow.hpp @@ -0,0 +1,91 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_optimum_pow +/// @file glm/gtx/optimum_pow.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_optimum_pow GLM_GTX_optimum_pow +/// @ingroup gtx +/// +/// @brief Integer exponentiation of power functions. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_optimum_pow +#define GLM_GTX_optimum_pow GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_optimum_pow extension included") +#endif + +namespace glm{ +namespace gtx +{ + /// @addtogroup gtx_optimum_pow + /// @{ + + //! Returns x raised to the power of 2. + //! From GLM_GTX_optimum_pow extension. + template + genType pow2(const genType& x); + + //! Returns x raised to the power of 3. + //! From GLM_GTX_optimum_pow extension. + template + genType pow3(const genType& x); + + //! Returns x raised to the power of 4. + //! From GLM_GTX_optimum_pow extension. + template + genType pow4(const genType& x); + + //! Checks if the parameter is a power of 2 number. + //! From GLM_GTX_optimum_pow extension. + bool powOfTwo(int num); + + //! Checks to determine if the parameter component are power of 2 numbers. + //! From GLM_GTX_optimum_pow extension. + detail::tvec2 powOfTwo(const detail::tvec2& x); + + //! Checks to determine if the parameter component are power of 2 numbers. + //! From GLM_GTX_optimum_pow extension. + detail::tvec3 powOfTwo(const detail::tvec3& x); + + //! Checks to determine if the parameter component are power of 2 numbers. + //! From GLM_GTX_optimum_pow extension. + detail::tvec4 powOfTwo(const detail::tvec4& x); + + /// @} +}//namespace gtx +}//namespace glm + +#include "optimum_pow.inl" + +#endif//GLM_GTX_optimum_pow diff --git a/include/gal/opengl/glm/gtx/optimum_pow.inl b/include/gal/opengl/glm/gtx/optimum_pow.inl new file mode 100644 index 0000000000..069d515732 --- /dev/null +++ b/include/gal/opengl/glm/gtx/optimum_pow.inl @@ -0,0 +1,58 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2005-12-27 +// Licence : This source is under MIT License +// File : glm/gtx/optimum_pow.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER genType pow2(const genType& x) + { + return x * x; + } + + template + GLM_FUNC_QUALIFIER genType pow3(const genType& x) + { + return x * x * x; + } + + template + GLM_FUNC_QUALIFIER genType pow4(const genType& x) + { + return x * x * x * x; + } + + GLM_FUNC_QUALIFIER bool powOfTwo(int x) + { + return !(x & (x - 1)); + } + + GLM_FUNC_QUALIFIER detail::tvec2 powOfTwo(const detail::tvec2& x) + { + return detail::tvec2( + powOfTwo(x.x), + powOfTwo(x.y)); + } + + GLM_FUNC_QUALIFIER detail::tvec3 powOfTwo(const detail::tvec3& x) + { + return detail::tvec3( + powOfTwo(x.x), + powOfTwo(x.y), + powOfTwo(x.z)); + } + + GLM_FUNC_QUALIFIER detail::tvec4 powOfTwo(const detail::tvec4& x) + { + return detail::tvec4( + powOfTwo(x.x), + powOfTwo(x.y), + powOfTwo(x.z), + powOfTwo(x.w)); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/orthonormalize.hpp b/include/gal/opengl/glm/gtx/orthonormalize.hpp new file mode 100644 index 0000000000..44780dab13 --- /dev/null +++ b/include/gal/opengl/glm/gtx/orthonormalize.hpp @@ -0,0 +1,72 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_orthonormalize +/// @file glm/gtx/orthonormalize.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_extented_min_max (dependence) +/// +/// @defgroup gtx_orthonormalize GLM_GTX_orthonormalize +/// @ingroup gtx +/// +/// @brief Orthonormalize matrices. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_orthonormalize +#define GLM_GTX_orthonormalize GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_orthonormalize extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_orthonormalize + /// @{ + + //! Returns the orthonormalized matrix of m. + //! From GLM_GTX_orthonormalize extension. + template + detail::tmat3x3 orthonormalize( + const detail::tmat3x3& m); + + //! Orthonormalizes x according y. + //! From GLM_GTX_orthonormalize extension. + template + detail::tvec3 orthonormalize( + const detail::tvec3& x, + const detail::tvec3& y); + + /// @} +}//namespace glm + +#include "orthonormalize.inl" + +#endif//GLM_GTX_orthonormalize diff --git a/include/gal/opengl/glm/gtx/orthonormalize.inl b/include/gal/opengl/glm/gtx/orthonormalize.inl new file mode 100644 index 0000000000..a43e6808d9 --- /dev/null +++ b/include/gal/opengl/glm/gtx/orthonormalize.inl @@ -0,0 +1,43 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2005-12-21 +// Licence : This source is under MIT License +// File : glm/gtx/orthonormalize.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tmat3x3 orthonormalize + ( + const detail::tmat3x3& m + ) + { + detail::tmat3x3 r = m; + + r[0] = normalize(r[0]); + + float d0 = dot(r[0], r[1]); + r[1] -= r[0] * d0; + r[1] = normalize(r[1]); + + float d1 = dot(r[1], r[2]); + d0 = dot(r[0], r[2]); + r[2] -= r[0] * d0 + r[1] * d1; + r[2] = normalize(r[2]); + + return r; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 orthonormalize + ( + const detail::tvec3& x, + const detail::tvec3& y + ) + { + return normalize(x - y * dot(y, x)); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/perpendicular.hpp b/include/gal/opengl/glm/gtx/perpendicular.hpp new file mode 100644 index 0000000000..97982f7119 --- /dev/null +++ b/include/gal/opengl/glm/gtx/perpendicular.hpp @@ -0,0 +1,67 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_perpendicular +/// @file glm/gtx/perpendicular.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_projection (dependence) +/// +/// @defgroup gtx_perpendicular GLM_GTX_perpendicular +/// @ingroup gtx +/// +/// @brief Perpendicular of a vector from other one +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_perpendicular +#define GLM_GTX_perpendicular GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtx/projection.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_perpendicular extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_perpendicular + /// @{ + + //! Projects x a perpendicular axis of Normal. + //! From GLM_GTX_perpendicular extension. + template + vecType perp( + vecType const & x, + vecType const & Normal); + + /// @} +}//namespace glm + +#include "perpendicular.inl" + +#endif//GLM_GTX_perpendicular diff --git a/include/gal/opengl/glm/gtx/perpendicular.inl b/include/gal/opengl/glm/gtx/perpendicular.inl new file mode 100644 index 0000000000..2877508fec --- /dev/null +++ b/include/gal/opengl/glm/gtx/perpendicular.inl @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2009-03-06 +// Licence : This source is under MIT License +// File : glm/gtx/perpendicular.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER vecType perp + ( + vecType const & x, + vecType const & Normal + ) + { + return x - proj(x, Normal); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/polar_coordinates.hpp b/include/gal/opengl/glm/gtx/polar_coordinates.hpp new file mode 100644 index 0000000000..1b9c8de845 --- /dev/null +++ b/include/gal/opengl/glm/gtx/polar_coordinates.hpp @@ -0,0 +1,70 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_polar_coordinates +/// @file glm/gtx/polar_coordinates.hpp +/// @date 2007-03-06 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_polar_coordinates GLM_GTX_polar_coordinates +/// @ingroup gtx +/// +/// @brief Conversion from Euclidean space to polar space and revert. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_polar_coordinates +#define GLM_GTX_polar_coordinates GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_polar_coordinates extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_polar_coordinates + /// @{ + + //! Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude. + //! From GLM_GTX_polar_coordinates extension. + template + detail::tvec3 polar( + detail::tvec3 const & euclidean); + + //! Convert Polar to Euclidean coordinates. + //! From GLM_GTX_polar_coordinates extension. + template + detail::tvec3 euclidean( + detail::tvec3 const & polar); + + /// @} +}//namespace glm + +#include "polar_coordinates.inl" + +#endif//GLM_GTX_polar_coordinates diff --git a/include/gal/opengl/glm/gtx/polar_coordinates.inl b/include/gal/opengl/glm/gtx/polar_coordinates.inl new file mode 100644 index 0000000000..33c171f6ea --- /dev/null +++ b/include/gal/opengl/glm/gtx/polar_coordinates.inl @@ -0,0 +1,55 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-03-06 +// Updated : 2009-05-01 +// Licence : This source is under MIT License +// File : glm/gtx/polar_coordinates.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tvec3 polar + ( + detail::tvec3 const & euclidean + ) + { + T const Length(length(euclidean)); + detail::tvec3 const tmp(euclidean / Length); + T const xz_dist(sqrt(tmp.x * tmp.x + tmp.z * tmp.z)); + +#ifdef GLM_FORCE_RADIANS + return detail::tvec3( + atan(xz_dist, tmp.y), // latitude + atan(tmp.x, tmp.z), // longitude + xz_dist); // xz distance +#else + return detail::tvec3( + degrees(atan(xz_dist, tmp.y)), // latitude + degrees(atan(tmp.x, tmp.z)), // longitude + xz_dist); // xz distance +#endif + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 euclidean + ( + detail::tvec3 const & polar + ) + { +#ifdef GLM_FORCE_RADIANS + T const latitude(polar.x); + T const longitude(polar.y); +#else + T const latitude(radians(polar.x)); + T const longitude(radians(polar.y)); +#endif + + return detail::tvec3( + cos(latitude) * sin(longitude), + sin(latitude), + cos(latitude) * cos(longitude)); + } + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/projection.hpp b/include/gal/opengl/glm/gtx/projection.hpp new file mode 100644 index 0000000000..697f8e47a8 --- /dev/null +++ b/include/gal/opengl/glm/gtx/projection.hpp @@ -0,0 +1,65 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_projection +/// @file glm/gtx/projection.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_projection GLM_GTX_projection +/// @ingroup gtx +/// +/// @brief Projection of a vector to other one +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_projection +#define GLM_GTX_projection GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_projection extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_projection + /// @{ + + //! Projects x on Normal. + //! From GLM_GTX_projection extension. + template + vecType proj( + vecType const & x, + vecType const & Normal); + + /// @} +}//namespace glm + +#include "projection.inl" + +#endif//GLM_GTX_projection diff --git a/include/gal/opengl/glm/gtx/projection.inl b/include/gal/opengl/glm/gtx/projection.inl new file mode 100644 index 0000000000..2cb3044384 --- /dev/null +++ b/include/gal/opengl/glm/gtx/projection.inl @@ -0,0 +1,21 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2009-03-06 +// Licence : This source is under MIT License +// File : glm/gtx/projection.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER vecType proj + ( + vecType const & x, + vecType const & Normal + ) + { + return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/quaternion.hpp b/include/gal/opengl/glm/gtx/quaternion.hpp new file mode 100644 index 0000000000..abcc3cf0cc --- /dev/null +++ b/include/gal/opengl/glm/gtx/quaternion.hpp @@ -0,0 +1,196 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_quaternion +/// @file glm/gtx/quaternion.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_extented_min_max (dependence) +/// +/// @defgroup gtx_quaternion GLM_GTX_quaternion +/// @ingroup gtx +/// +/// @brief Extented quaternion types and functions +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_quaternion +#define GLM_GTX_quaternion GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/quaternion.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_quaternion extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_quaternion + /// @{ + + //! Compute a cross product between a quaternion and a vector. + /// + /// @see gtx_quaternion + template + detail::tvec3 cross( + detail::tquat const & q, + detail::tvec3 const & v); + + //! Compute a cross product between a vector and a quaternion. + /// + /// @see gtx_quaternion + template + detail::tvec3 cross( + detail::tvec3 const & v, + detail::tquat const & q); + + //! Compute a point on a path according squad equation. + //! q1 and q2 are control points; s1 and s2 are intermediate control points. + /// + /// @see gtx_quaternion + template + detail::tquat squad( + detail::tquat const & q1, + detail::tquat const & q2, + detail::tquat const & s1, + detail::tquat const & s2, + valType const & h); + + //! Returns an intermediate control point for squad interpolation. + /// + /// @see gtx_quaternion + template + detail::tquat intermediate( + detail::tquat const & prev, + detail::tquat const & curr, + detail::tquat const & next); + + //! Returns a exp of a quaternion. + /// + /// @see gtx_quaternion + template + detail::tquat exp( + detail::tquat const & q, + valType const & exponent); + + //! Returns a log of a quaternion. + /// + /// @see gtx_quaternion + template + detail::tquat log( + detail::tquat const & q); + + /// Returns x raised to the y power. + /// + /// @see gtx_quaternion + template + detail::tquat pow( + detail::tquat const & x, + valType const & y); + + //! Returns quarternion square root. + /// + /// @see gtx_quaternion + //template + //detail::tquat sqrt( + // detail::tquat const & q); + + //! Rotates a 3 components vector by a quaternion. + /// + /// @see gtx_quaternion + template + detail::tvec3 rotate( + detail::tquat const & q, + detail::tvec3 const & v); + + /// Rotates a 4 components vector by a quaternion. + /// + /// @see gtx_quaternion + template + detail::tvec4 rotate( + detail::tquat const & q, + detail::tvec4 const & v); + + /// Extract the real component of a quaternion. + /// + /// @see gtx_quaternion + template + valType extractRealComponent( + detail::tquat const & q); + + /// Converts a quaternion to a 3 * 3 matrix. + /// + /// @see gtx_quaternion + template + detail::tmat3x3 toMat3( + detail::tquat const & x){return mat3_cast(x);} + + /// Converts a quaternion to a 4 * 4 matrix. + /// + /// @see gtx_quaternion + template + detail::tmat4x4 toMat4( + detail::tquat const & x){return mat4_cast(x);} + + /// Converts a 3 * 3 matrix to a quaternion. + /// + /// @see gtx_quaternion + template + detail::tquat toQuat( + detail::tmat3x3 const & x){return quat_cast(x);} + + /// Converts a 4 * 4 matrix to a quaternion. + /// + /// @see gtx_quaternion + template + detail::tquat toQuat( + detail::tmat4x4 const & x){return quat_cast(x);} + + /// Quaternion interpolation using the rotation short path. + /// + /// @see gtx_quaternion + template + detail::tquat shortMix( + detail::tquat const & x, + detail::tquat const & y, + T const & a); + + /// Quaternion normalized linear interpolation. + /// + /// @see gtx_quaternion + template + detail::tquat fastMix( + detail::tquat const & x, + detail::tquat const & y, + T const & a); + + /// @} +}//namespace glm + +#include "quaternion.inl" + +#endif//GLM_GTX_quaternion diff --git a/include/gal/opengl/glm/gtx/quaternion.inl b/include/gal/opengl/glm/gtx/quaternion.inl new file mode 100644 index 0000000000..517d1700c3 --- /dev/null +++ b/include/gal/opengl/glm/gtx/quaternion.inl @@ -0,0 +1,209 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2008-11-27 +// Licence : This source is under MIT License +// File : glm/gtx/quaternion.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tvec3 cross + ( + detail::tvec3 const & v, + detail::tquat const & q + ) + { + return inverse(q) * v; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 cross + ( + detail::tquat const & q, + detail::tvec3 const & v + ) + { + return q * v; + } + + template + GLM_FUNC_QUALIFIER detail::tquat squad + ( + detail::tquat const & q1, + detail::tquat const & q2, + detail::tquat const & s1, + detail::tquat const & s2, + T const & h) + { + return mix(mix(q1, q2, h), mix(s1, s2, h), T(2) * h (T(1) - h)); + } + + template + GLM_FUNC_QUALIFIER detail::tquat intermediate + ( + detail::tquat const & prev, + detail::tquat const & curr, + detail::tquat const & next + ) + { + detail::tquat invQuat = inverse(curr); + return ext((log(next + invQuat) + log(prev + invQuat)) / T(-4)) * curr; + } + + template + GLM_FUNC_QUALIFIER detail::tquat exp + ( + detail::tquat const & q, + T const & exponent + ) + { + detail::tvec3 u(q.x, q.y, q.z); + float a = glm::length(u); + detail::tvec3 v(u / a); + return detail::tquat(cos(a), sin(a) * v); + } + + template + GLM_FUNC_QUALIFIER detail::tquat log + ( + detail::tquat const & q + ) + { + if((q.x == T(0)) && (q.y == T(0)) && (q.z == T(0))) + { + if(q.w > T(0)) + return detail::tquat(log(q.w), T(0), T(0), T(0)); + else if(q.w < T(0)) + return detail::tquat(log(-q.w), T(3.1415926535897932384626433832795), T(0),T(0)); + else + return detail::tquat(std::numeric_limits::infinity(), std::numeric_limits::infinity(), std::numeric_limits::infinity(), std::numeric_limits::infinity()); + } + else + { + T Vec3Len = sqrt(q.x * q.x + q.y * q.y + q.z * q.z); + T QuatLen = sqrt(Vec3Len * Vec3Len + q.w * q.w); + T t = atan(Vec3Len, T(q.w)) / Vec3Len; + return detail::tquat(t * q.x, t * q.y, t * q.z, log(QuatLen)); + } + } + + template + GLM_FUNC_QUALIFIER detail::tquat pow + ( + detail::tquat const & x, + T const & y + ) + { + if(abs(x.w) > T(0.9999)) + return x; + float Angle = acos(y); + float NewAngle = Angle * y; + float Div = sin(NewAngle) / sin(Angle); + return detail::tquat( + cos(NewAngle), + x.x * Div, + x.y * Div, + x.z * Div); + } + + //template + //GLM_FUNC_QUALIFIER detail::tquat sqrt + //( + // detail::tquat const & q + //) + //{ + // T q0 = T(1) - dot(q, q); + // return T(2) * (T(1) + q0) * q; + //} + + template + GLM_FUNC_QUALIFIER detail::tvec3 rotate + ( + detail::tquat const & q, + detail::tvec3 const & v + ) + { + return q * v; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 rotate + ( + detail::tquat const & q, + detail::tvec4 const & v + ) + { + return q * v; + } + + template + GLM_FUNC_QUALIFIER T extractRealComponent + ( + detail::tquat const & q + ) + { + T w = T(1.0) - q.x * q.x - q.y * q.y - q.z * q.z; + if(w < T(0)) + return T(0); + else + return -sqrt(w); + } + + template + GLM_FUNC_QUALIFIER detail::tquat shortMix + ( + detail::tquat const & x, + detail::tquat const & y, + T const & a + ) + { + if(a <= typename detail::tquat::value_type(0)) return x; + if(a >= typename detail::tquat::value_type(1)) return y; + + T fCos = dot(x, y); + detail::tquat y2(y); //BUG!!! tquat y2; + if(fCos < T(0)) + { + y2 = -y; + fCos = -fCos; + } + + //if(fCos > 1.0f) // problem + T k0, k1; + if(fCos > T(0.9999)) + { + k0 = T(1) - a; + k1 = T(0) + a; //BUG!!! 1.0f + a; + } + else + { + T fSin = sqrt(T(1) - fCos * fCos); + T fAngle = atan(fSin, fCos); + T fOneOverSin = T(1) / fSin; + k0 = sin((T(1) - a) * fAngle) * fOneOverSin; + k1 = sin((T(0) + a) * fAngle) * fOneOverSin; + } + + return detail::tquat( + k0 * x.w + k1 * y2.w, + k0 * x.x + k1 * y2.x, + k0 * x.y + k1 * y2.y, + k0 * x.z + k1 * y2.z); + } + + template + GLM_FUNC_QUALIFIER detail::tquat fastMix + ( + detail::tquat const & x, + detail::tquat const & y, + T const & a + ) + { + return glm::normalize(x * (T(1) - a) + (y * a)); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/random.hpp b/include/gal/opengl/glm/gtx/random.hpp new file mode 100644 index 0000000000..ade53464a4 --- /dev/null +++ b/include/gal/opengl/glm/gtx/random.hpp @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/////////////////////////////////////////////////////////////////////////////////// + +#if(defined(GLM_MESSAGES)) +# pragma message("GLM: GLM_GTX_random extension is deprecated, include GLM_GTC_random instead") +#endif + +// Promoted: +#include "../gtc/random.hpp" diff --git a/include/gal/opengl/glm/gtx/raw_data.hpp b/include/gal/opengl/glm/gtx/raw_data.hpp new file mode 100644 index 0000000000..16a1c08754 --- /dev/null +++ b/include/gal/opengl/glm/gtx/raw_data.hpp @@ -0,0 +1,75 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_raw_data +/// @file glm/gtx/raw_data.hpp +/// @date 2008-11-19 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_raw_data GLM_GTX_raw_data +/// @ingroup gtx +/// +/// @brief Projection of a vector to other one +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_raw_data +#define GLM_GTX_raw_data GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/type_precision.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_raw_data extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_raw_data + /// @{ + + //! Type for byte numbers. + //! From GLM_GTX_raw_data extension. + typedef uint8 byte; + + //! Type for word numbers. + //! From GLM_GTX_raw_data extension. + typedef uint16 word; + + //! Type for dword numbers. + //! From GLM_GTX_raw_data extension. + typedef uint32 dword; + + //! Type for qword numbers. + //! From GLM_GTX_raw_data extension. + typedef uint64 qword; + + /// @} +}// namespace glm + +#include "raw_data.inl" + +#endif//GLM_GTX_raw_data diff --git a/include/gal/opengl/glm/gtx/raw_data.inl b/include/gal/opengl/glm/gtx/raw_data.inl new file mode 100644 index 0000000000..6edaaea4bd --- /dev/null +++ b/include/gal/opengl/glm/gtx/raw_data.inl @@ -0,0 +1,11 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-11-19 +// Updated : 2008-11-19 +// Licence : This source is under MIT License +// File : glm/gtx/raw_data.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Dependency: +// - GLM core +/////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/include/gal/opengl/glm/gtx/reciprocal.hpp b/include/gal/opengl/glm/gtx/reciprocal.hpp new file mode 100644 index 0000000000..26e6e98d21 --- /dev/null +++ b/include/gal/opengl/glm/gtx/reciprocal.hpp @@ -0,0 +1,26 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/////////////////////////////////////////////////////////////////////////////////// + +#if(defined(GLM_MESSAGES)) +# pragma message("GLM: GLM_GTX_reciprocal extension is deprecated, include GLM_GTC_reciprocal instead") +#endif diff --git a/include/gal/opengl/glm/gtx/rotate_vector.hpp b/include/gal/opengl/glm/gtx/rotate_vector.hpp new file mode 100644 index 0000000000..a04edd3ac6 --- /dev/null +++ b/include/gal/opengl/glm/gtx/rotate_vector.hpp @@ -0,0 +1,132 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_rotate_vector +/// @file glm/gtx/rotate_vector.hpp +/// @date 2006-11-02 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_transform (dependence) +/// +/// @defgroup gtx_rotate_vector GLM_GTX_rotate_vector +/// @ingroup gtx +/// +/// @brief Function to directly rotate a vector +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_rotate_vector +#define GLM_GTX_rotate_vector GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtx/transform.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_rotate_vector extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_rotate_vector + /// @{ + + //! Rotate a two dimensional vector. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec2 rotate( + detail::tvec2 const & v, + T const & angle); + + //! Rotate a three dimensional vector around an axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec3 rotate( + detail::tvec3 const & v, + T const & angle, + detail::tvec3 const & normal); + + //! Rotate a four dimensional vector around an axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec4 rotate( + detail::tvec4 const & v, + T const & angle, + detail::tvec3 const & normal); + + //! Rotate a three dimensional vector around the X axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec3 rotateX( + detail::tvec3 const & v, + T const & angle); + + //! Rotate a three dimensional vector around the Y axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec3 rotateY( + detail::tvec3 const & v, + T const & angle); + + //! Rotate a three dimensional vector around the Z axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec3 rotateZ( + detail::tvec3 const & v, + T const & angle); + + //! Rotate a four dimentionnals vector around the X axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec4 rotateX( + detail::tvec4 const & v, + T const & angle); + + //! Rotate a four dimensional vector around the X axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec4 rotateY( + detail::tvec4 const & v, + T const & angle); + + //! Rotate a four dimensional vector around the X axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec4 rotateZ( + detail::tvec4 const & v, + T const & angle); + + //! Build a rotation matrix from a normal and a up vector. + //! From GLM_GTX_rotate_vector extension. + template + detail::tmat4x4 orientation( + detail::tvec3 const & Normal, + detail::tvec3 const & Up); + + /// @} +}//namespace glm + +#include "rotate_vector.inl" + +#endif//GLM_GTX_rotate_vector diff --git a/include/gal/opengl/glm/gtx/rotate_vector.inl b/include/gal/opengl/glm/gtx/rotate_vector.inl new file mode 100644 index 0000000000..2e0c1f5d00 --- /dev/null +++ b/include/gal/opengl/glm/gtx/rotate_vector.inl @@ -0,0 +1,211 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2006-11-02 +// Updated : 2009-02-19 +// Licence : This source is under MIT License +// File : glm/gtx/rotate_vector.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tvec2 rotate + ( + detail::tvec2 const & v, + T const & angle + ) + { + detail::tvec2 Result; +#ifdef GLM_FORCE_RADIANS + T const Cos(cos(angle)); + T const Sin(sin(angle)); +#else + T const Cos = cos(radians(angle)); + T const Sin = sin(radians(angle)); +#endif + Result.x = v.x * Cos - v.y * Sin; + Result.y = v.x * Sin + v.y * Cos; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 rotate + ( + detail::tvec3 const & v, + T const & angle, + detail::tvec3 const & normal + ) + { + return detail::tmat3x3(glm::rotate(angle, normal)) * v; + } + /* + template + GLM_FUNC_QUALIFIER detail::tvec3 rotateGTX( + const detail::tvec3& x, + T angle, + const detail::tvec3& normal) + { + const T Cos = cos(radians(angle)); + const T Sin = sin(radians(angle)); + return x * Cos + ((x * normal) * (T(1) - Cos)) * normal + cross(x, normal) * Sin; + } + */ + template + GLM_FUNC_QUALIFIER detail::tvec4 rotate + ( + detail::tvec4 const & v, + T const & angle, + detail::tvec3 const & normal + ) + { + return rotate(angle, normal) * v; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 rotateX + ( + detail::tvec3 const & v, + T const & angle + ) + { + detail::tvec3 Result(v); + +#ifdef GLM_FORCE_RADIANS + T const Cos(cos(angle)); + T const Sin(sin(angle)); +#else + T const Cos = cos(radians(angle)); + T const Sin = sin(radians(angle)); +#endif + + Result.y = v.y * Cos - v.z * Sin; + Result.z = v.y * Sin + v.z * Cos; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 rotateY + ( + detail::tvec3 const & v, + T const & angle + ) + { + detail::tvec3 Result = v; + +#ifdef GLM_FORCE_RADIANS + T const Cos(cos(angle)); + T const Sin(sin(angle)); +#else + T const Cos(cos(radians(angle))); + T const Sin(sin(radians(angle))); +#endif + + Result.x = v.x * Cos + v.z * Sin; + Result.z = -v.x * Sin + v.z * Cos; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 rotateZ + ( + detail::tvec3 const & v, + T const & angle + ) + { + detail::tvec3 Result = v; + +#ifdef GLM_FORCE_RADIANS + T const Cos(cos(angle)); + T const Sin(sin(angle)); +#else + T const Cos(cos(radians(angle))); + T const Sin(sin(radians(angle))); +#endif + + Result.x = v.x * Cos - v.y * Sin; + Result.y = v.x * Sin + v.y * Cos; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 rotateX + ( + detail::tvec4 const & v, + T const & angle + ) + { + detail::tvec4 Result = v; + +#ifdef GLM_FORCE_RADIANS + T const Cos(cos(angle)); + T const Sin(sin(angle)); +#else + T const Cos(cos(radians(angle))); + T const Sin(sin(radians(angle))); +#endif + + Result.y = v.y * Cos - v.z * Sin; + Result.z = v.y * Sin + v.z * Cos; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 rotateY + ( + detail::tvec4 const & v, + T const & angle + ) + { + detail::tvec4 Result = v; + +#ifdef GLM_FORCE_RADIANS + T const Cos(cos(angle)); + T const Sin(sin(angle)); +#else + T const Cos(cos(radians(angle))); + T const Sin(sin(radians(angle))); +#endif + + Result.x = v.x * Cos + v.z * Sin; + Result.z = -v.x * Sin + v.z * Cos; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 rotateZ + ( + detail::tvec4 const & v, + T const & angle + ) + { + detail::tvec4 Result = v; + +#ifdef GLM_FORCE_RADIANS + T const Cos(cos(angle)); + T const Sin(sin(angle)); +#else + T const Cos(cos(radians(angle))); + T const Sin(sin(radians(angle))); +#endif + + Result.x = v.x * Cos - v.y * Sin; + Result.y = v.x * Sin + v.y * Cos; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 orientation + ( + detail::tvec3 const & Normal, + detail::tvec3 const & Up + ) + { + if(all(equal(Normal, Up))) + return detail::tmat4x4(T(1)); + + detail::tvec3 RotationAxis = cross(Up, Normal); + T Angle = degrees(acos(dot(Normal, Up))); + return rotate(Angle, RotationAxis); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/simd_mat4.hpp b/include/gal/opengl/glm/gtx/simd_mat4.hpp new file mode 100644 index 0000000000..952fb9160e --- /dev/null +++ b/include/gal/opengl/glm/gtx/simd_mat4.hpp @@ -0,0 +1,206 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_simd_vec4 +/// @file glm/gtx/simd_vec4.hpp +/// @date 2009-05-07 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_simd_mat4 GLM_GTX_simd_mat4 +/// @ingroup gtx +/// +/// @brief SIMD implementation of mat4 type. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_simd_mat4 +#define GLM_GTX_simd_mat4 GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(GLM_ARCH != GLM_ARCH_PURE) + +#if(GLM_ARCH & GLM_ARCH_SSE2) +# include "../core/intrinsic_matrix.hpp" +# include "../gtx/simd_vec4.hpp" +#else +# error "GLM: GLM_GTX_simd_mat4 requires compiler support of SSE2 through intrinsics" +#endif + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_simd_mat4 extension included") +#endif + +namespace glm{ +namespace detail +{ + /// 4x4 Matrix implemented using SIMD SEE intrinsics. + /// \ingroup gtx_simd_mat4 + GLM_ALIGNED_STRUCT(16) fmat4x4SIMD + { + enum ctor{null}; + + typedef float value_type; + typedef fvec4SIMD col_type; + typedef fvec4SIMD row_type; + typedef std::size_t size_type; + static size_type value_size(); + static size_type col_size(); + static size_type row_size(); + static bool is_matrix(); + + fvec4SIMD Data[4]; + + ////////////////////////////////////// + // Constructors + + fmat4x4SIMD(); + explicit fmat4x4SIMD(float const & s); + explicit fmat4x4SIMD( + float const & x0, float const & y0, float const & z0, float const & w0, + float const & x1, float const & y1, float const & z1, float const & w1, + float const & x2, float const & y2, float const & z2, float const & w2, + float const & x3, float const & y3, float const & z3, float const & w3); + explicit fmat4x4SIMD( + fvec4SIMD const & v0, + fvec4SIMD const & v1, + fvec4SIMD const & v2, + fvec4SIMD const & v3); + explicit fmat4x4SIMD( + tmat4x4 const & m); + explicit fmat4x4SIMD( + __m128 const in[4]); + + // Conversions + //template + //explicit tmat4x4(tmat4x4 const & m); + + //explicit tmat4x4(tmat2x2 const & x); + //explicit tmat4x4(tmat3x3 const & x); + //explicit tmat4x4(tmat2x3 const & x); + //explicit tmat4x4(tmat3x2 const & x); + //explicit tmat4x4(tmat2x4 const & x); + //explicit tmat4x4(tmat4x2 const & x); + //explicit tmat4x4(tmat3x4 const & x); + //explicit tmat4x4(tmat4x3 const & x); + + // Accesses + fvec4SIMD & operator[](size_type i); + fvec4SIMD const & operator[](size_type i) const; + + // Unary updatable operators + fmat4x4SIMD & operator= (fmat4x4SIMD const & m); + fmat4x4SIMD & operator+= (float const & s); + fmat4x4SIMD & operator+= (fmat4x4SIMD const & m); + fmat4x4SIMD & operator-= (float const & s); + fmat4x4SIMD & operator-= (fmat4x4SIMD const & m); + fmat4x4SIMD & operator*= (float const & s); + fmat4x4SIMD & operator*= (fmat4x4SIMD const & m); + fmat4x4SIMD & operator/= (float const & s); + fmat4x4SIMD & operator/= (fmat4x4SIMD const & m); + fmat4x4SIMD & operator++ (); + fmat4x4SIMD & operator-- (); + }; + + // Binary operators + fmat4x4SIMD operator+ (fmat4x4SIMD const & m, float const & s); + fmat4x4SIMD operator+ (float const & s, fmat4x4SIMD const & m); + fmat4x4SIMD operator+ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); + + fmat4x4SIMD operator- (fmat4x4SIMD const & m, float const & s); + fmat4x4SIMD operator- (float const & s, fmat4x4SIMD const & m); + fmat4x4SIMD operator- (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); + + fmat4x4SIMD operator* (fmat4x4SIMD const & m, float const & s); + fmat4x4SIMD operator* (float const & s, fmat4x4SIMD const & m); + + fvec4SIMD operator* (fmat4x4SIMD const & m, fvec4SIMD const & v); + fvec4SIMD operator* (fvec4SIMD const & v, fmat4x4SIMD const & m); + + fmat4x4SIMD operator* (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); + + fmat4x4SIMD operator/ (fmat4x4SIMD const & m, float const & s); + fmat4x4SIMD operator/ (float const & s, fmat4x4SIMD const & m); + + fvec4SIMD operator/ (fmat4x4SIMD const & m, fvec4SIMD const & v); + fvec4SIMD operator/ (fvec4SIMD const & v, fmat4x4SIMD const & m); + + fmat4x4SIMD operator/ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); + + // Unary constant operators + fmat4x4SIMD const operator- (fmat4x4SIMD const & m); + fmat4x4SIMD const operator-- (fmat4x4SIMD const & m, int); + fmat4x4SIMD const operator++ (fmat4x4SIMD const & m, int); +}//namespace detail + + typedef detail::fmat4x4SIMD simdMat4; + + /// @addtogroup gtx_simd_mat4 + /// @{ + + //! Convert a simdMat4 to a mat4. + //! (From GLM_GTX_simd_mat4 extension) + detail::tmat4x4 mat4_cast( + detail::fmat4x4SIMD const & x); + + //! Multiply matrix x by matrix y component-wise, i.e., + //! result[i][j] is the scalar product of x[i][j] and y[i][j]. + //! (From GLM_GTX_simd_mat4 extension). + detail::fmat4x4SIMD matrixCompMult( + detail::fmat4x4SIMD const & x, + detail::fmat4x4SIMD const & y); + + //! Treats the first parameter c as a column vector + //! and the second parameter r as a row vector + //! and does a linear algebraic matrix multiply c * r. + //! (From GLM_GTX_simd_mat4 extension). + detail::fmat4x4SIMD outerProduct( + detail::fvec4SIMD const & c, + detail::fvec4SIMD const & r); + + //! Returns the transposed matrix of x + //! (From GLM_GTX_simd_mat4 extension). + detail::fmat4x4SIMD transpose( + detail::fmat4x4SIMD const & x); + + //! Return the determinant of a mat4 matrix. + //! (From GLM_GTX_simd_mat4 extension). + float determinant( + detail::fmat4x4SIMD const & m); + + //! Return the inverse of a mat4 matrix. + //! (From GLM_GTX_simd_mat4 extension). + detail::fmat4x4SIMD inverse( + detail::fmat4x4SIMD const & m); + + /// @} +}// namespace glm + +#include "simd_mat4.inl" + +#endif//(GLM_ARCH != GLM_ARCH_PURE) + +#endif//GLM_GTX_simd_mat4 diff --git a/include/gal/opengl/glm/gtx/simd_mat4.inl b/include/gal/opengl/glm/gtx/simd_mat4.inl new file mode 100644 index 0000000000..83b1948456 --- /dev/null +++ b/include/gal/opengl/glm/gtx/simd_mat4.inl @@ -0,0 +1,590 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2009-05-19 +// Updated : 2009-05-19 +// Licence : This source is under MIT License +// File : glm/gtx/simd_mat4.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail{ + +GLM_FUNC_QUALIFIER fmat4x4SIMD::size_type fmat4x4SIMD::value_size() +{ + return sizeof(value_type); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD::size_type fmat4x4SIMD::col_size() +{ + return 4; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD::size_type fmat4x4SIMD::row_size() +{ + return 4; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD() +{ +#ifndef GLM_SIMD_ENABLE_DEFAULT_INIT + this->Data[0] = fvec4SIMD(1.0f, 0, 0, 0); + this->Data[1] = fvec4SIMD(0, 1.0f, 0, 0); + this->Data[2] = fvec4SIMD(0, 0, 1.0f, 0); + this->Data[3] = fvec4SIMD(0, 0, 0, 1.0f); +#endif +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD(float const & s) +{ + this->Data[0] = fvec4SIMD(s, 0, 0, 0); + this->Data[1] = fvec4SIMD(0, s, 0, 0); + this->Data[2] = fvec4SIMD(0, 0, s, 0); + this->Data[3] = fvec4SIMD(0, 0, 0, s); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD +( + float const & x0, float const & y0, float const & z0, float const & w0, + float const & x1, float const & y1, float const & z1, float const & w1, + float const & x2, float const & y2, float const & z2, float const & w2, + float const & x3, float const & y3, float const & z3, float const & w3 +) +{ + this->Data[0] = fvec4SIMD(x0, y0, z0, w0); + this->Data[1] = fvec4SIMD(x1, y1, z1, w1); + this->Data[2] = fvec4SIMD(x2, y2, z2, w2); + this->Data[3] = fvec4SIMD(x3, y3, z3, w3); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD +( + fvec4SIMD const & v0, + fvec4SIMD const & v1, + fvec4SIMD const & v2, + fvec4SIMD const & v3 +) +{ + this->Data[0] = v0; + this->Data[1] = v1; + this->Data[2] = v2; + this->Data[3] = v3; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD +( + tmat4x4 const & m +) +{ + this->Data[0] = fvec4SIMD(m[0]); + this->Data[1] = fvec4SIMD(m[1]); + this->Data[2] = fvec4SIMD(m[2]); + this->Data[3] = fvec4SIMD(m[3]); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD +( + __m128 const in[4] +) +{ + this->Data[0] = in[0]; + this->Data[1] = in[1]; + this->Data[2] = in[2]; + this->Data[3] = in[3]; +} + +////////////////////////////////////// +// Accesses + +GLM_FUNC_QUALIFIER fvec4SIMD & fmat4x4SIMD::operator[] +( + fmat4x4SIMD::size_type i +) +{ + assert( + //i >= fmat4x4SIMD::size_type(0) && + i < fmat4x4SIMD::col_size()); + + return this->Data[i]; +} + +GLM_FUNC_QUALIFIER fvec4SIMD const & fmat4x4SIMD::operator[] +( + fmat4x4SIMD::size_type i +) const +{ + assert( + //i >= fmat4x4SIMD::size_type(0) && + i < fmat4x4SIMD::col_size()); + + return this->Data[i]; +} + +////////////////////////////////////////////////////////////// +// mat4 operators + +GLM_FUNC_QUALIFIER fmat4x4SIMD& fmat4x4SIMD::operator= +( + fmat4x4SIMD const & m +) +{ + this->Data[0] = m[0]; + this->Data[1] = m[1]; + this->Data[2] = m[2]; + this->Data[3] = m[3]; + return *this; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator+= +( + fmat4x4SIMD const & m +) +{ + this->Data[0].Data = _mm_add_ps(this->Data[0].Data, m[0].Data); + this->Data[1].Data = _mm_add_ps(this->Data[1].Data, m[1].Data); + this->Data[2].Data = _mm_add_ps(this->Data[2].Data, m[2].Data); + this->Data[3].Data = _mm_add_ps(this->Data[3].Data, m[3].Data); + return *this; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-= +( + fmat4x4SIMD const & m +) +{ + this->Data[0].Data = _mm_sub_ps(this->Data[0].Data, m[0].Data); + this->Data[1].Data = _mm_sub_ps(this->Data[1].Data, m[1].Data); + this->Data[2].Data = _mm_sub_ps(this->Data[2].Data, m[2].Data); + this->Data[3].Data = _mm_sub_ps(this->Data[3].Data, m[3].Data); + + return *this; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator*= +( + fmat4x4SIMD const & m +) +{ + sse_mul_ps(&this->Data[0].Data, &m.Data[0].Data, &this->Data[0].Data); + return *this; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator/= +( + fmat4x4SIMD const & m +) +{ + __m128 Inv[4]; + sse_inverse_ps(&m.Data[0].Data, Inv); + sse_mul_ps(&this->Data[0].Data, Inv, &this->Data[0].Data); + return *this; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator+= +( + float const & s +) +{ + __m128 Operand = _mm_set_ps1(s); + this->Data[0].Data = _mm_add_ps(this->Data[0].Data, Operand); + this->Data[1].Data = _mm_add_ps(this->Data[1].Data, Operand); + this->Data[2].Data = _mm_add_ps(this->Data[2].Data, Operand); + this->Data[3].Data = _mm_add_ps(this->Data[3].Data, Operand); + return *this; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-= +( + float const & s +) +{ + __m128 Operand = _mm_set_ps1(s); + this->Data[0].Data = _mm_sub_ps(this->Data[0].Data, Operand); + this->Data[1].Data = _mm_sub_ps(this->Data[1].Data, Operand); + this->Data[2].Data = _mm_sub_ps(this->Data[2].Data, Operand); + this->Data[3].Data = _mm_sub_ps(this->Data[3].Data, Operand); + return *this; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator*= +( + float const & s +) +{ + __m128 Operand = _mm_set_ps1(s); + this->Data[0].Data = _mm_mul_ps(this->Data[0].Data, Operand); + this->Data[1].Data = _mm_mul_ps(this->Data[1].Data, Operand); + this->Data[2].Data = _mm_mul_ps(this->Data[2].Data, Operand); + this->Data[3].Data = _mm_mul_ps(this->Data[3].Data, Operand); + return *this; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator/= +( + float const & s +) +{ + __m128 Operand = _mm_div_ps(one, _mm_set_ps1(s)); + this->Data[0].Data = _mm_mul_ps(this->Data[0].Data, Operand); + this->Data[1].Data = _mm_mul_ps(this->Data[1].Data, Operand); + this->Data[2].Data = _mm_mul_ps(this->Data[2].Data, Operand); + this->Data[3].Data = _mm_mul_ps(this->Data[3].Data, Operand); + return *this; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator++ () +{ + this->Data[0].Data = _mm_add_ps(this->Data[0].Data, one); + this->Data[1].Data = _mm_add_ps(this->Data[1].Data, one); + this->Data[2].Data = _mm_add_ps(this->Data[2].Data, one); + this->Data[3].Data = _mm_add_ps(this->Data[3].Data, one); + return *this; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-- () +{ + this->Data[0].Data = _mm_sub_ps(this->Data[0].Data, one); + this->Data[1].Data = _mm_sub_ps(this->Data[1].Data, one); + this->Data[2].Data = _mm_sub_ps(this->Data[2].Data, one); + this->Data[3].Data = _mm_sub_ps(this->Data[3].Data, one); + return *this; +} + + +////////////////////////////////////////////////////////////// +// Binary operators + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator+ +( + const fmat4x4SIMD &m, + float const & s +) +{ + return detail::fmat4x4SIMD + ( + m[0] + s, + m[1] + s, + m[2] + s, + m[3] + s + ); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator+ +( + float const & s, + const fmat4x4SIMD &m +) +{ + return detail::fmat4x4SIMD + ( + m[0] + s, + m[1] + s, + m[2] + s, + m[3] + s + ); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator+ +( + const fmat4x4SIMD &m1, + const fmat4x4SIMD &m2 +) +{ + return detail::fmat4x4SIMD + ( + m1[0] + m2[0], + m1[1] + m2[1], + m1[2] + m2[2], + m1[3] + m2[3] + ); +} + + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator- +( + const fmat4x4SIMD &m, + float const & s +) +{ + return detail::fmat4x4SIMD + ( + m[0] - s, + m[1] - s, + m[2] - s, + m[3] - s + ); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator- +( + float const & s, + const fmat4x4SIMD &m +) +{ + return detail::fmat4x4SIMD + ( + s - m[0], + s - m[1], + s - m[2], + s - m[3] + ); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator- +( + const fmat4x4SIMD &m1, + const fmat4x4SIMD &m2 +) +{ + return detail::fmat4x4SIMD + ( + m1[0] - m2[0], + m1[1] - m2[1], + m1[2] - m2[2], + m1[3] - m2[3] + ); +} + + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator* +( + const fmat4x4SIMD &m, + float const & s +) +{ + return detail::fmat4x4SIMD + ( + m[0] * s, + m[1] * s, + m[2] * s, + m[3] * s + ); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator* +( + float const & s, + const fmat4x4SIMD &m +) +{ + return detail::fmat4x4SIMD + ( + m[0] * s, + m[1] * s, + m[2] * s, + m[3] * s + ); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator* +( + const fmat4x4SIMD &m, + fvec4SIMD const & v +) +{ + return sse_mul_ps(&m.Data[0].Data, v.Data); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator* +( + fvec4SIMD const & v, + const fmat4x4SIMD &m +) +{ + return sse_mul_ps(v.Data, &m.Data[0].Data); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator* +( + const fmat4x4SIMD &m1, + const fmat4x4SIMD &m2 +) +{ + fmat4x4SIMD result; + sse_mul_ps(&m1.Data[0].Data, &m2.Data[0].Data, &result.Data[0].Data); + + return result; +} + + + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator/ +( + const fmat4x4SIMD &m, + float const & s +) +{ + return detail::fmat4x4SIMD + ( + m[0] / s, + m[1] / s, + m[2] / s, + m[3] / s + ); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator/ +( + float const & s, + const fmat4x4SIMD &m +) +{ + return detail::fmat4x4SIMD + ( + s / m[0], + s / m[1], + s / m[2], + s / m[3] + ); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator/ +( + const fmat4x4SIMD &m, + fvec4SIMD const & v +) +{ + return inverse(m) * v; +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator/ +( + fvec4SIMD const & v, + const fmat4x4SIMD &m +) +{ + return v * inverse(m); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator/ +( + const fmat4x4SIMD &m1, + const fmat4x4SIMD &m2 +) +{ + __m128 result[4]; + __m128 inv[4]; + + sse_inverse_ps(&m2.Data[0].Data, inv); + sse_mul_ps(&m1.Data[0].Data, inv, result); + + return fmat4x4SIMD(result); +} + + +////////////////////////////////////////////////////////////// +// Unary constant operators +GLM_FUNC_QUALIFIER fmat4x4SIMD const operator- +( + fmat4x4SIMD const & m +) +{ + return detail::fmat4x4SIMD + ( + -m[0], + -m[1], + -m[2], + -m[3] + ); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD const operator-- +( + fmat4x4SIMD const & m, + int +) +{ + return detail::fmat4x4SIMD + ( + m[0] - 1.0f, + m[1] - 1.0f, + m[2] - 1.0f, + m[3] - 1.0f + ); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD const operator++ +( + fmat4x4SIMD const & m, + int +) +{ + return detail::fmat4x4SIMD + ( + m[0] + 1.0f, + m[1] + 1.0f, + m[2] + 1.0f, + m[3] + 1.0f + ); +} + +}//namespace detail + +GLM_FUNC_QUALIFIER detail::tmat4x4 mat4_cast +( + detail::fmat4x4SIMD const & x +) +{ + GLM_ALIGN(16) detail::tmat4x4 Result; + _mm_store_ps(&Result[0][0], x.Data[0].Data); + _mm_store_ps(&Result[1][0], x.Data[1].Data); + _mm_store_ps(&Result[2][0], x.Data[2].Data); + _mm_store_ps(&Result[3][0], x.Data[3].Data); + return Result; +} + +GLM_FUNC_QUALIFIER detail::fmat4x4SIMD matrixCompMult +( + detail::fmat4x4SIMD const & x, + detail::fmat4x4SIMD const & y +) +{ + detail::fmat4x4SIMD result; + result[0] = x[0] * y[0]; + result[1] = x[1] * y[1]; + result[2] = x[2] * y[2]; + result[3] = x[3] * y[3]; + return result; +} + +GLM_FUNC_QUALIFIER detail::fmat4x4SIMD outerProduct +( + detail::fvec4SIMD const & c, + detail::fvec4SIMD const & r +) +{ + __m128 Shu0 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(0, 0, 0, 0)); + __m128 Shu1 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(1, 1, 1, 1)); + __m128 Shu2 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(2, 2, 2, 2)); + __m128 Shu3 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(3, 3, 3, 3)); + + detail::fmat4x4SIMD result(detail::fmat4x4SIMD::null); + result[0].Data = _mm_mul_ps(c.Data, Shu0); + result[1].Data = _mm_mul_ps(c.Data, Shu1); + result[2].Data = _mm_mul_ps(c.Data, Shu2); + result[3].Data = _mm_mul_ps(c.Data, Shu3); + return result; +} + +GLM_FUNC_QUALIFIER detail::fmat4x4SIMD transpose(detail::fmat4x4SIMD const & m) +{ + detail::fmat4x4SIMD result; + detail::sse_transpose_ps(&m[0].Data, &result[0].Data); + return result; +} + +GLM_FUNC_QUALIFIER float determinant(detail::fmat4x4SIMD const & m) +{ + float Result; + _mm_store_ss(&Result, detail::sse_det_ps(&m[0].Data)); + return Result; +} + +GLM_FUNC_QUALIFIER detail::fmat4x4SIMD inverse(detail::fmat4x4SIMD const & m) +{ + detail::fmat4x4SIMD result; + detail::sse_inverse_ps(&m[0].Data, &result[0].Data); + return result; +} + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/simd_vec4.hpp b/include/gal/opengl/glm/gtx/simd_vec4.hpp new file mode 100644 index 0000000000..793eac8028 --- /dev/null +++ b/include/gal/opengl/glm/gtx/simd_vec4.hpp @@ -0,0 +1,517 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_simd_vec4 +/// @file glm/gtx/simd_vec4.hpp +/// @date 2009-05-07 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_simd_vec4 GLM_GTX_simd_vec4 +/// @ingroup gtx +/// +/// @brief SIMD implementation of vec4 type. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_simd_vec4 +#define GLM_GTX_simd_vec4 GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(GLM_ARCH != GLM_ARCH_PURE) + +#if(GLM_ARCH & GLM_ARCH_SSE2) +# include "../core/intrinsic_common.hpp" +# include "../core/intrinsic_geometric.hpp" +#else +# error "GLM: GLM_GTX_simd_vec4 requires compiler support of SSE2 through intrinsics" +#endif + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_simd_vec4 extension included") +#endif + + +// Warning silencer for nameless struct/union. +#if (GLM_COMPILER & GLM_COMPILER_VC) +# pragma warning(push) +# pragma warning(disable:4201) // warning C4201: nonstandard extension used : nameless struct/union +#endif + + +namespace glm{ +namespace detail +{ + /// 4-dimensional vector implemented using SIMD SEE intrinsics. + /// \ingroup gtx_simd_vec4 + GLM_ALIGNED_STRUCT(16) fvec4SIMD + { + enum ctor{null}; + typedef __m128 value_type; + typedef std::size_t size_type; + static size_type value_size(); + + typedef fvec4SIMD type; + typedef tvec4 bool_type; + +#ifdef GLM_SIMD_ENABLE_XYZW_UNION + union + { + __m128 Data; + struct {float x, y, z, w;}; + }; +#else + __m128 Data; +#endif + + ////////////////////////////////////// + // Implicit basic constructors + + fvec4SIMD(); + fvec4SIMD(__m128 const & Data); + fvec4SIMD(fvec4SIMD const & v); + + ////////////////////////////////////// + // Explicit basic constructors + + explicit fvec4SIMD( + ctor); + explicit fvec4SIMD( + float const & s); + explicit fvec4SIMD( + float const & x, + float const & y, + float const & z, + float const & w); + explicit fvec4SIMD( + tvec4 const & v); + + //////////////////////////////////////// + //// Convertion vector constructors + + fvec4SIMD(vec2 const & v, float const & s1, float const & s2); + fvec4SIMD(float const & s1, vec2 const & v, float const & s2); + fvec4SIMD(float const & s1, float const & s2, vec2 const & v); + fvec4SIMD(vec3 const & v, float const & s); + fvec4SIMD(float const & s, vec3 const & v); + fvec4SIMD(vec2 const & v1, vec2 const & v2); + //fvec4SIMD(ivec4SIMD const & v); + + ////////////////////////////////////// + // Unary arithmetic operators + + fvec4SIMD& operator= (fvec4SIMD const & v); + fvec4SIMD& operator+=(fvec4SIMD const & v); + fvec4SIMD& operator-=(fvec4SIMD const & v); + fvec4SIMD& operator*=(fvec4SIMD const & v); + fvec4SIMD& operator/=(fvec4SIMD const & v); + + fvec4SIMD& operator+=(float const & s); + fvec4SIMD& operator-=(float const & s); + fvec4SIMD& operator*=(float const & s); + fvec4SIMD& operator/=(float const & s); + + fvec4SIMD& operator++(); + fvec4SIMD& operator--(); + + ////////////////////////////////////// + // Swizzle operators + + template + fvec4SIMD& swizzle(); + template + fvec4SIMD swizzle() const; + template + fvec4SIMD swizzle() const; + template + fvec4SIMD swizzle() const; + template + fvec4SIMD swizzle() const; + }; +}//namespace detail + + typedef glm::detail::fvec4SIMD simdVec4; + + /// @addtogroup gtx_simd_vec4 + /// @{ + + //! Convert a simdVec4 to a vec4. + //! (From GLM_GTX_simd_vec4 extension) + detail::tvec4 vec4_cast( + detail::fvec4SIMD const & x); + + //! Returns x if x >= 0; otherwise, it returns -x. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD abs(detail::fvec4SIMD const & x); + + //! Returns 1.0 if x > 0, 0.0 if x = 0, or -1.0 if x < 0. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD sign(detail::fvec4SIMD const & x); + + //! Returns a value equal to the nearest integer that is less then or equal to x. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD floor(detail::fvec4SIMD const & x); + + //! Returns a value equal to the nearest integer to x + //! whose absolute value is not larger than the absolute value of x. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD trunc(detail::fvec4SIMD const & x); + + //! Returns a value equal to the nearest integer to x. + //! The fraction 0.5 will round in a direction chosen by the + //! implementation, presumably the direction that is fastest. + //! This includes the possibility that round(x) returns the + //! same value as roundEven(x) for all values of x. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD round(detail::fvec4SIMD const & x); + + //! Returns a value equal to the nearest integer to x. + //! A fractional part of 0.5 will round toward the nearest even + //! integer. (Both 3.5 and 4.5 for x will return 4.0.) + //! (From GLM_GTX_simd_vec4 extension, common function) + //detail::fvec4SIMD roundEven(detail::fvec4SIMD const & x); + + //! Returns a value equal to the nearest integer + //! that is greater than or equal to x. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD ceil(detail::fvec4SIMD const & x); + + //! Return x - floor(x). + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD fract(detail::fvec4SIMD const & x); + + //! Modulus. Returns x - y * floor(x / y) + //! for each component in x using the floating point value y. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD mod( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y); + + //! Modulus. Returns x - y * floor(x / y) + //! for each component in x using the floating point value y. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD mod( + detail::fvec4SIMD const & x, + float const & y); + + //! Returns the fractional part of x and sets i to the integer + //! part (as a whole number floating point value). Both the + //! return value and the output parameter will have the same + //! sign as x. + //! (From GLM_GTX_simd_vec4 extension, common function) + //detail::fvec4SIMD modf( + // detail::fvec4SIMD const & x, + // detail::fvec4SIMD & i); + + //! Returns y if y < x; otherwise, it returns x. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD min( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y); + + detail::fvec4SIMD min( + detail::fvec4SIMD const & x, + float const & y); + + //! Returns y if x < y; otherwise, it returns x. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD max( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y); + + detail::fvec4SIMD max( + detail::fvec4SIMD const & x, + float const & y); + + //! Returns min(max(x, minVal), maxVal) for each component in x + //! using the floating-point values minVal and maxVal. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD clamp( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & minVal, + detail::fvec4SIMD const & maxVal); + + detail::fvec4SIMD clamp( + detail::fvec4SIMD const & x, + float const & minVal, + float const & maxVal); + + //! \return If genTypeU is a floating scalar or vector: + //! Returns x * (1.0 - a) + y * a, i.e., the linear blend of + //! x and y using the floating-point value a. + //! The value for a is not restricted to the range [0, 1]. + //! + //! \return If genTypeU is a boolean scalar or vector: + //! Selects which vector each returned component comes + //! from. For a component of a that is false, the + //! corresponding component of x is returned. For a + //! component of a that is true, the corresponding + //! component of y is returned. Components of x and y that + //! are not selected are allowed to be invalid floating point + //! values and will have no effect on the results. Thus, this + //! provides different functionality than + //! genType mix(genType x, genType y, genType(a)) + //! where a is a Boolean vector. + //! + //! From GLSL 1.30.08 specification, section 8.3 + //! + //! \param[in] x Floating point scalar or vector. + //! \param[in] y Floating point scalar or vector. + //! \param[in] a Floating point or boolean scalar or vector. + //! + // \todo Test when 'a' is a boolean. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD mix( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y, + detail::fvec4SIMD const & a); + + //! Returns 0.0 if x < edge, otherwise it returns 1.0. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD step( + detail::fvec4SIMD const & edge, + detail::fvec4SIMD const & x); + + detail::fvec4SIMD step( + float const & edge, + detail::fvec4SIMD const & x); + + //! Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and + //! performs smooth Hermite interpolation between 0 and 1 + //! when edge0 < x < edge1. This is useful in cases where + //! you would want a threshold function with a smooth + //! transition. This is equivalent to: + //! genType t; + //! t = clamp ((x – edge0) / (edge1 – edge0), 0, 1); + //! return t * t * (3 – 2 * t); + //! Results are undefined if edge0 >= edge1. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD smoothstep( + detail::fvec4SIMD const & edge0, + detail::fvec4SIMD const & edge1, + detail::fvec4SIMD const & x); + + detail::fvec4SIMD smoothstep( + float const & edge0, + float const & edge1, + detail::fvec4SIMD const & x); + + //! Returns true if x holds a NaN (not a number) + //! representation in the underlying implementation's set of + //! floating point representations. Returns false otherwise, + //! including for implementations with no NaN + //! representations. + //! (From GLM_GTX_simd_vec4 extension, common function) + //bvec4 isnan(detail::fvec4SIMD const & x); + + //! Returns true if x holds a positive infinity or negative + //! infinity representation in the underlying implementation's + //! set of floating point representations. Returns false + //! otherwise, including for implementations with no infinity + //! representations. + //! (From GLM_GTX_simd_vec4 extension, common function) + //bvec4 isinf(detail::fvec4SIMD const & x); + + //! Returns a signed or unsigned integer value representing + //! the encoding of a floating-point value. The floatingpoint + //! value's bit-level representation is preserved. + //! (From GLM_GTX_simd_vec4 extension, common function) + //detail::ivec4SIMD floatBitsToInt(detail::fvec4SIMD const & value); + + //! Returns a floating-point value corresponding to a signed + //! or unsigned integer encoding of a floating-point value. + //! If an inf or NaN is passed in, it will not signal, and the + //! resulting floating point value is unspecified. Otherwise, + //! the bit-level representation is preserved. + //! (From GLM_GTX_simd_vec4 extension, common function) + //detail::fvec4SIMD intBitsToFloat(detail::ivec4SIMD const & value); + + //! Computes and returns a * b + c. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD fma( + detail::fvec4SIMD const & a, + detail::fvec4SIMD const & b, + detail::fvec4SIMD const & c); + + //! Splits x into a floating-point significand in the range + //! [0.5, 1.0) and an integral exponent of two, such that: + //! x = significand * exp(2, exponent) + //! The significand is returned by the function and the + //! exponent is returned in the parameter exp. For a + //! floating-point value of zero, the significant and exponent + //! are both zero. For a floating-point value that is an + //! infinity or is not a number, the results are undefined. + //! (From GLM_GTX_simd_vec4 extension, common function) + //detail::fvec4SIMD frexp(detail::fvec4SIMD const & x, detail::ivec4SIMD & exp); + + //! Builds a floating-point number from x and the + //! corresponding integral exponent of two in exp, returning: + //! significand * exp(2, exponent) + //! If this product is too large to be represented in the + //! floating-point type, the result is undefined. + //! (From GLM_GTX_simd_vec4 extension, common function) + //detail::fvec4SIMD ldexp(detail::fvec4SIMD const & x, detail::ivec4SIMD const & exp); + + //! Returns the length of x, i.e., sqrt(x * x). + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + float length( + detail::fvec4SIMD const & x); + + //! Returns the length of x, i.e., sqrt(x * x). + //! Less accurate but much faster than simdLength. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + float fastLength( + detail::fvec4SIMD const & x); + + //! Returns the length of x, i.e., sqrt(x * x). + //! Slightly more accurate but much slower than simdLength. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + float niceLength( + detail::fvec4SIMD const & x); + + //! Returns the length of x, i.e., sqrt(x * x). + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD length4( + detail::fvec4SIMD const & x); + + //! Returns the length of x, i.e., sqrt(x * x). + //! Less accurate but much faster than simdLength4. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD fastLength4( + detail::fvec4SIMD const & x); + + //! Returns the length of x, i.e., sqrt(x * x). + //! Slightly more accurate but much slower than simdLength4. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD niceLength4( + detail::fvec4SIMD const & x); + + //! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + float distance( + detail::fvec4SIMD const & p0, + detail::fvec4SIMD const & p1); + + //! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD distance4( + detail::fvec4SIMD const & p0, + detail::fvec4SIMD const & p1); + + //! Returns the dot product of x and y, i.e., result = x * y. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + float simdDot( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y); + + //! Returns the dot product of x and y, i.e., result = x * y. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD dot4( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y); + + //! Returns the cross product of x and y. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD cross( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y); + + //! Returns a vector in the same direction as x but with length of 1. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD normalize( + detail::fvec4SIMD const & x); + + //! Returns a vector in the same direction as x but with length of 1. + //! Less accurate but much faster than simdNormalize. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD fastNormalize( + detail::fvec4SIMD const & x); + + //! If dot(Nref, I) < 0.0, return N, otherwise, return -N. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD simdFaceforward( + detail::fvec4SIMD const & N, + detail::fvec4SIMD const & I, + detail::fvec4SIMD const & Nref); + + //! For the incident vector I and surface orientation N, + //! returns the reflection direction : result = I - 2.0 * dot(N, I) * N. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD reflect( + detail::fvec4SIMD const & I, + detail::fvec4SIMD const & N); + + //! For the incident vector I and surface normal N, + //! and the ratio of indices of refraction eta, + //! return the refraction vector. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD refract( + detail::fvec4SIMD const & I, + detail::fvec4SIMD const & N, + float const & eta); + + //! Returns the positive square root of x. + //! (From GLM_GTX_simd_vec4 extension, exponential function) + detail::fvec4SIMD sqrt( + detail::fvec4SIMD const & x); + + //! Returns the positive square root of x with the nicest quality but very slow. + //! Slightly more accurate but much slower than simdSqrt. + //! (From GLM_GTX_simd_vec4 extension, exponential function) + detail::fvec4SIMD niceSqrt( + detail::fvec4SIMD const & x); + + //! Returns the positive square root of x + //! Less accurate but much faster than sqrt. + //! (From GLM_GTX_simd_vec4 extension, exponential function) + detail::fvec4SIMD fastSqrt( + detail::fvec4SIMD const & x); + + //! Returns the reciprocal of the positive square root of x. + //! (From GLM_GTX_simd_vec4 extension, exponential function) + detail::fvec4SIMD inversesqrt( + detail::fvec4SIMD const & x); + + //! Returns the reciprocal of the positive square root of x. + //! Faster than inversesqrt but less accurate. + //! (From GLM_GTX_simd_vec4 extension, exponential function) + detail::fvec4SIMD fastInversesqrt( + detail::fvec4SIMD const & x); + + /// @} +}//namespace glm + +#include "simd_vec4.inl" + + +#if (GLM_COMPILER & GLM_COMPILER_VC) +# pragma warning(pop) +#endif + + +#endif//(GLM_ARCH != GLM_ARCH_PURE) + +#endif//GLM_GTX_simd_vec4 diff --git a/include/gal/opengl/glm/gtx/simd_vec4.inl b/include/gal/opengl/glm/gtx/simd_vec4.inl new file mode 100644 index 0000000000..3043417852 --- /dev/null +++ b/include/gal/opengl/glm/gtx/simd_vec4.inl @@ -0,0 +1,727 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2009-05-07 +// Updated : 2009-05-07 +// Licence : This source is under MIT License +// File : glm/gtx/simd_vec4.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail{ + +template +struct mask +{ + enum{value = Value}; +}; + +////////////////////////////////////// +// Implicit basic constructors + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD() +#ifdef GLM_SIMD_ENABLE_DEFAULT_INIT + : Data(_mm_set_ps(0.0f, 0.0f, 0.0f, 0.0f)) +#endif +{} + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(__m128 const & Data) : + Data(Data) +{} + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(fvec4SIMD const & v) : + Data(v.Data) +{} + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(tvec4 const & v) : + Data(_mm_set_ps(v.w, v.z, v.y, v.x)) +{} + +////////////////////////////////////// +// Explicit basic constructors + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s) : + Data(_mm_set1_ps(s)) +{} + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & x, float const & y, float const & z, float const & w) : +// Data(_mm_setr_ps(x, y, z, w)) + Data(_mm_set_ps(w, z, y, x)) +{} +/* +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const v[4]) : + Data(_mm_load_ps(v)) +{} +*/ +////////////////////////////////////// +// Swizzle constructors + +//fvec4SIMD(ref4 const & r); + +////////////////////////////////////// +// Convertion vector constructors + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec2 const & v, float const & s1, float const & s2) : + Data(_mm_set_ps(s2, s1, v.y, v.x)) +{} + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s1, vec2 const & v, float const & s2) : + Data(_mm_set_ps(s2, v.y, v.x, s1)) +{} + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s1, float const & s2, vec2 const & v) : + Data(_mm_set_ps(v.y, v.x, s2, s1)) +{} + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec3 const & v, float const & s) : + Data(_mm_set_ps(s, v.z, v.y, v.x)) +{} + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s, vec3 const & v) : + Data(_mm_set_ps(v.z, v.y, v.x, s)) +{} + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec2 const & v1, vec2 const & v2) : + Data(_mm_set_ps(v2.y, v2.x, v1.y, v1.x)) +{} + +//GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(ivec4SIMD const & v) : +// Data(_mm_cvtepi32_ps(v.Data)) +//{} + +////////////////////////////////////// +// Unary arithmetic operators + +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator=(fvec4SIMD const & v) +{ + this->Data = v.Data; + return *this; +} + +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator+=(float const & s) +{ + this->Data = _mm_add_ps(Data, _mm_set_ps1(s)); + return *this; +} + +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator+=(fvec4SIMD const & v) +{ + this->Data = _mm_add_ps(this->Data , v.Data); + return *this; +} + +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator-=(float const & s) +{ + this->Data = _mm_sub_ps(Data, _mm_set_ps1(s)); + return *this; +} + +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator-=(fvec4SIMD const & v) +{ + this->Data = _mm_sub_ps(this->Data , v.Data); + return *this; +} + +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator*=(float const & s) +{ + this->Data = _mm_mul_ps(this->Data, _mm_set_ps1(s)); + return *this; +} + +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator*=(fvec4SIMD const & v) +{ + this->Data = _mm_mul_ps(this->Data , v.Data); + return *this; +} + +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator/=(float const & s) +{ + this->Data = _mm_div_ps(Data, _mm_set1_ps(s)); + return *this; +} + +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator/=(fvec4SIMD const & v) +{ + this->Data = _mm_div_ps(this->Data , v.Data); + return *this; +} + +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator++() +{ + this->Data = _mm_add_ps(this->Data , glm::detail::one); + return *this; +} + +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator--() +{ + this->Data = _mm_sub_ps(this->Data, glm::detail::one); + return *this; +} + +////////////////////////////////////// +// Swizzle operators + +template +GLM_FUNC_QUALIFIER fvec4SIMD fvec4SIMD::swizzle() const +{ + __m128 Data = _mm_shuffle_ps( + this->Data, this->Data, + mask<(W << 6) | (Z << 4) | (Y << 2) | (X << 0)>::value); + return fvec4SIMD(Data); +} + +template +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::swizzle() +{ + this->Data = _mm_shuffle_ps( + this->Data, this->Data, + mask<(W << 6) | (Z << 4) | (Y << 2) | (X << 0)>::value); + return *this; +} + +// operator+ +GLM_FUNC_QUALIFIER fvec4SIMD operator+ (fvec4SIMD const & v, float s) +{ + return fvec4SIMD(_mm_add_ps(v.Data, _mm_set1_ps(s))); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator+ (float s, fvec4SIMD const & v) +{ + return fvec4SIMD(_mm_add_ps(_mm_set1_ps(s), v.Data)); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator+ (fvec4SIMD const & v1, fvec4SIMD const & v2) +{ + return fvec4SIMD(_mm_add_ps(v1.Data, v2.Data)); +} + +//operator- +GLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v, float s) +{ + return fvec4SIMD(_mm_sub_ps(v.Data, _mm_set1_ps(s))); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator- (float s, fvec4SIMD const & v) +{ + return fvec4SIMD(_mm_sub_ps(_mm_set1_ps(s), v.Data)); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v1, fvec4SIMD const & v2) +{ + return fvec4SIMD(_mm_sub_ps(v1.Data, v2.Data)); +} + +//operator* +GLM_FUNC_QUALIFIER fvec4SIMD operator* (fvec4SIMD const & v, float s) +{ + __m128 par0 = v.Data; + __m128 par1 = _mm_set1_ps(s); + return fvec4SIMD(_mm_mul_ps(par0, par1)); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator* (float s, fvec4SIMD const & v) +{ + __m128 par0 = _mm_set1_ps(s); + __m128 par1 = v.Data; + return fvec4SIMD(_mm_mul_ps(par0, par1)); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator* (fvec4SIMD const & v1, fvec4SIMD const & v2) +{ + return fvec4SIMD(_mm_mul_ps(v1.Data, v2.Data)); +} + +//operator/ +GLM_FUNC_QUALIFIER fvec4SIMD operator/ (fvec4SIMD const & v, float s) +{ + __m128 par0 = v.Data; + __m128 par1 = _mm_set1_ps(s); + return fvec4SIMD(_mm_div_ps(par0, par1)); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator/ (float s, fvec4SIMD const & v) +{ + __m128 par0 = _mm_set1_ps(s); + __m128 par1 = v.Data; + return fvec4SIMD(_mm_div_ps(par0, par1)); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator/ (fvec4SIMD const & v1, fvec4SIMD const & v2) +{ + return fvec4SIMD(_mm_div_ps(v1.Data, v2.Data)); +} + +// Unary constant operators +GLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v) +{ + return fvec4SIMD(_mm_sub_ps(_mm_setzero_ps(), v.Data)); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator++ (fvec4SIMD const & v, int) +{ + return fvec4SIMD(_mm_add_ps(v.Data, glm::detail::one)); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator-- (fvec4SIMD const & v, int) +{ + return fvec4SIMD(_mm_sub_ps(v.Data, glm::detail::one)); +} + +}//namespace detail + +GLM_FUNC_QUALIFIER detail::tvec4 vec4_cast +( + detail::fvec4SIMD const & x +) +{ + GLM_ALIGN(16) detail::tvec4 Result; + _mm_store_ps(&Result[0], x.Data); + return Result; +} + +// Other possible implementation +//float abs(float a) +//{ +// return max(-a, a); +//} +GLM_FUNC_QUALIFIER detail::fvec4SIMD abs +( + detail::fvec4SIMD const & x +) +{ + return detail::sse_abs_ps(x.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD sign +( + detail::fvec4SIMD const & x +) +{ + return detail::sse_sgn_ps(x.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD floor +( + detail::fvec4SIMD const & x +) +{ + return detail::sse_flr_ps(x.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD trunc +( + detail::fvec4SIMD const & x +) +{ + //return x < 0 ? -floor(-x) : floor(x); + + __m128 Flr0 = detail::sse_flr_ps(_mm_sub_ps(_mm_setzero_ps(), x.Data)); + __m128 Sub0 = _mm_sub_ps(Flr0, x.Data); + __m128 Flr1 = detail::sse_flr_ps(x.Data); + + __m128 Cmp0 = _mm_cmplt_ps(x.Data, glm::detail::zero); + __m128 Cmp1 = _mm_cmpnlt_ps(x.Data, glm::detail::zero); + + __m128 And0 = _mm_and_ps(Sub0, Cmp0); + __m128 And1 = _mm_and_ps(Flr1, Cmp1); + + return _mm_or_ps(And0, And1); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD round +( + detail::fvec4SIMD const & x +) +{ + return detail::sse_rnd_ps(x.Data); +} + +//GLM_FUNC_QUALIFIER detail::fvec4SIMD roundEven +//( +// detail::fvec4SIMD const & x +//) +//{ + +//} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD ceil +( + detail::fvec4SIMD const & x +) +{ + return detail::sse_ceil_ps(x.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD fract +( + detail::fvec4SIMD const & x +) +{ + return detail::sse_frc_ps(x.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD mod +( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y +) +{ + return detail::sse_mod_ps(x.Data, y.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD mod +( + detail::fvec4SIMD const & x, + float const & y +) +{ + return detail::sse_mod_ps(x.Data, _mm_set1_ps(y)); +} + +//GLM_FUNC_QUALIFIER detail::fvec4SIMD modf +//( +// detail::fvec4SIMD const & x, +// detail::fvec4SIMD & i +//) +//{ + +//} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD min +( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y +) +{ + return _mm_min_ps(x.Data, y.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD min +( + detail::fvec4SIMD const & x, + float const & y +) +{ + return _mm_min_ps(x.Data, _mm_set1_ps(y)); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD max +( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y +) +{ + return _mm_max_ps(x.Data, y.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD max +( + detail::fvec4SIMD const & x, + float const & y +) +{ + return _mm_max_ps(x.Data, _mm_set1_ps(y)); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD clamp +( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & minVal, + detail::fvec4SIMD const & maxVal +) +{ + return detail::sse_clp_ps(x.Data, minVal.Data, maxVal.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD clamp +( + detail::fvec4SIMD const & x, + float const & minVal, + float const & maxVal +) +{ + return detail::sse_clp_ps(x.Data, _mm_set1_ps(minVal), _mm_set1_ps(maxVal)); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD mix +( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y, + detail::fvec4SIMD const & a +) +{ + __m128 Sub0 = _mm_sub_ps(y.Data, x.Data); + __m128 Mul0 = _mm_mul_ps(a.Data, Sub0); + return _mm_mul_ps(x.Data, Mul0); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD step +( + detail::fvec4SIMD const & edge, + detail::fvec4SIMD const & x +) +{ + __m128 cmp0 = _mm_cmpngt_ps(x.Data, edge.Data); + return _mm_max_ps(_mm_min_ps(cmp0, _mm_setzero_ps()), detail::one); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD step +( + float const & edge, + detail::fvec4SIMD const & x +) +{ + __m128 cmp0 = _mm_cmpngt_ps(x.Data, _mm_set1_ps(edge)); + return _mm_max_ps(_mm_min_ps(cmp0, _mm_setzero_ps()), detail::one); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD smoothstep +( + detail::fvec4SIMD const & edge0, + detail::fvec4SIMD const & edge1, + detail::fvec4SIMD const & x +) +{ + return detail::sse_ssp_ps(edge0.Data, edge1.Data, x.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD smoothstep +( + float const & edge0, + float const & edge1, + detail::fvec4SIMD const & x +) +{ + return detail::sse_ssp_ps(_mm_set1_ps(edge0), _mm_set1_ps(edge1), x.Data); +} + +//GLM_FUNC_QUALIFIER bvec4 isnan(detail::fvec4SIMD const & x) +//{ + +//} + +//GLM_FUNC_QUALIFIER bvec4 isinf(detail::fvec4SIMD const & x) +//{ + +//} + +//GLM_FUNC_QUALIFIER detail::ivec4SIMD floatBitsToInt +//( +// detail::fvec4SIMD const & value +//) +//{ + +//} + +//GLM_FUNC_QUALIFIER detail::fvec4SIMD intBitsToFloat +//( +// detail::ivec4SIMD const & value +//) +//{ + +//} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD fma +( + detail::fvec4SIMD const & a, + detail::fvec4SIMD const & b, + detail::fvec4SIMD const & c +) +{ + return _mm_add_ps(_mm_mul_ps(a.Data, b.Data), c.Data); +} + +GLM_FUNC_QUALIFIER float length +( + detail::fvec4SIMD const & x +) +{ + detail::fvec4SIMD dot0 = detail::sse_dot_ss(x.Data, x.Data); + detail::fvec4SIMD sqt0 = sqrt(dot0); + float Result = 0; + _mm_store_ss(&Result, sqt0.Data); + return Result; +} + +GLM_FUNC_QUALIFIER float fastLength +( + detail::fvec4SIMD const & x +) +{ + detail::fvec4SIMD dot0 = detail::sse_dot_ss(x.Data, x.Data); + detail::fvec4SIMD sqt0 = fastSqrt(dot0); + float Result = 0; + _mm_store_ss(&Result, sqt0.Data); + return Result; +} + +GLM_FUNC_QUALIFIER float niceLength +( + detail::fvec4SIMD const & x +) +{ + detail::fvec4SIMD dot0 = detail::sse_dot_ss(x.Data, x.Data); + detail::fvec4SIMD sqt0 = niceSqrt(dot0); + float Result = 0; + _mm_store_ss(&Result, sqt0.Data); + return Result; +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD length4 +( + detail::fvec4SIMD const & x +) +{ + return sqrt(dot4(x, x)); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD fastLength4 +( + detail::fvec4SIMD const & x +) +{ + return fastSqrt(dot4(x, x)); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD niceLength4 +( + detail::fvec4SIMD const & x +) +{ + return niceSqrt(dot4(x, x)); +} + +GLM_FUNC_QUALIFIER float distance +( + detail::fvec4SIMD const & p0, + detail::fvec4SIMD const & p1 +) +{ + float Result = 0; + _mm_store_ss(&Result, detail::sse_dst_ps(p0.Data, p1.Data)); + return Result; +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD distance4 +( + detail::fvec4SIMD const & p0, + detail::fvec4SIMD const & p1 +) +{ + return detail::sse_dst_ps(p0.Data, p1.Data); +} + +GLM_FUNC_QUALIFIER float dot +( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y +) +{ + float Result = 0; + _mm_store_ss(&Result, detail::sse_dot_ss(x.Data, y.Data)); + return Result; +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD dot4 +( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y +) +{ + return detail::sse_dot_ps(x.Data, y.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD cross +( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y +) +{ + return detail::sse_xpd_ps(x.Data, y.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD normalize +( + detail::fvec4SIMD const & x +) +{ + __m128 dot0 = detail::sse_dot_ps(x.Data, x.Data); + __m128 isr0 = inversesqrt(detail::fvec4SIMD(dot0)).Data; + __m128 mul0 = _mm_mul_ps(x.Data, isr0); + return mul0; +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD fastNormalize +( + detail::fvec4SIMD const & x +) +{ + __m128 dot0 = detail::sse_dot_ps(x.Data, x.Data); + __m128 isr0 = fastInversesqrt(dot0).Data; + __m128 mul0 = _mm_mul_ps(x.Data, isr0); + return mul0; +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD faceforward +( + detail::fvec4SIMD const & N, + detail::fvec4SIMD const & I, + detail::fvec4SIMD const & Nref +) +{ + return detail::sse_ffd_ps(N.Data, I.Data, Nref.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD reflect +( + detail::fvec4SIMD const & I, + detail::fvec4SIMD const & N +) +{ + return detail::sse_rfe_ps(I.Data, N.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD refract +( + detail::fvec4SIMD const & I, + detail::fvec4SIMD const & N, + float const & eta +) +{ + return detail::sse_rfa_ps(I.Data, N.Data, _mm_set1_ps(eta)); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD sqrt(detail::fvec4SIMD const & x) +{ + return _mm_mul_ps(inversesqrt(x).Data, x.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD niceSqrt(detail::fvec4SIMD const & x) +{ + return _mm_sqrt_ps(x.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD fastSqrt(detail::fvec4SIMD const & x) +{ + return _mm_mul_ps(fastInversesqrt(x.Data).Data, x.Data); +} + +// SSE scalar reciprocal sqrt using rsqrt op, plus one Newton-Rhaphson iteration +// By Elan Ruskin, http://assemblyrequired.crashworks.org/ +GLM_FUNC_QUALIFIER detail::fvec4SIMD inversesqrt(detail::fvec4SIMD const & x) +{ + GLM_ALIGN(4) static const __m128 three = {3, 3, 3, 3}; // aligned consts for fast load + GLM_ALIGN(4) static const __m128 half = {0.5,0.5,0.5,0.5}; + + __m128 recip = _mm_rsqrt_ps(x.Data); // "estimate" opcode + __m128 halfrecip = _mm_mul_ps(half, recip); + __m128 threeminus_xrr = _mm_sub_ps(three, _mm_mul_ps(x.Data, _mm_mul_ps(recip, recip))); + return _mm_mul_ps(halfrecip, threeminus_xrr); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD fastInversesqrt(detail::fvec4SIMD const & x) +{ + return _mm_rsqrt_ps(x.Data); +} + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/spline.hpp b/include/gal/opengl/glm/gtx/spline.hpp new file mode 100644 index 0000000000..35553e1326 --- /dev/null +++ b/include/gal/opengl/glm/gtx/spline.hpp @@ -0,0 +1,90 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_spline +/// @file glm/gtx/spline.hpp +/// @date 2007-01-25 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_spline GLM_GTX_spline +/// @ingroup gtx +/// +/// @brief Spline functions +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_spline +#define GLM_GTX_spline GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtx/optimum_pow.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_spline extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_spline + /// @{ + + //! Return a point from a catmull rom curve. + //! From GLM_GTX_spline extension. + template + genType catmullRom( + genType const & v1, + genType const & v2, + genType const & v3, + genType const & v4, + typename genType::value_type const & s); + + //! Return a point from a hermite curve. + //! From GLM_GTX_spline extension. + template + genType hermite( + genType const & v1, + genType const & t1, + genType const & v2, + genType const & t2, + typename genType::value_type const & s); + + //! Return a point from a cubic curve. + //! From GLM_GTX_spline extension. + template + genType cubic( + genType const & v1, + genType const & v2, + genType const & v3, + genType const & v4, + typename genType::value_type const & s); + + /// @} +}//namespace glm + +#include "spline.inl" + +#endif//GLM_GTX_spline + diff --git a/include/gal/opengl/glm/gtx/spline.inl b/include/gal/opengl/glm/gtx/spline.inl new file mode 100644 index 0000000000..166e9e4410 --- /dev/null +++ b/include/gal/opengl/glm/gtx/spline.inl @@ -0,0 +1,70 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-01-25 +// Updated : 2009-02-19 +// Licence : This source is under MIT License +// File : glm/gtx/spline.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ + +template +GLM_FUNC_QUALIFIER genType catmullRom +( + genType const & v1, + genType const & v2, + genType const & v3, + genType const & v4, + typename genType::value_type const & s +) +{ + typename genType::value_type s1 = s; + typename genType::value_type s2 = pow2(s); + typename genType::value_type s3 = pow3(s); + + typename genType::value_type f1 = -s3 + typename genType::value_type(2) * s2 - s; + typename genType::value_type f2 = typename genType::value_type(3) * s3 - typename genType::value_type(5) * s2 + typename genType::value_type(2); + typename genType::value_type f3 = typename genType::value_type(-3) * s3 + typename genType::value_type(4) * s2 + s; + typename genType::value_type f4 = s3 - s2; + + return (f1 * v1 + f2 * v2 + f3 * v3 + f4 * v4) / typename genType::value_type(2); + +} + +template +GLM_FUNC_QUALIFIER genType hermite +( + genType const & v1, + genType const & t1, + genType const & v2, + genType const & t2, + typename genType::value_type const & s +) +{ + typename genType::value_type s1 = s; + typename genType::value_type s2 = pow2(s); + typename genType::value_type s3 = pow3(s); + + typename genType::value_type f1 = typename genType::value_type(2) * s3 - typename genType::value_type(3) * s2 + typename genType::value_type(1); + typename genType::value_type f2 = typename genType::value_type(-2) * s3 + typename genType::value_type(3) * s2; + typename genType::value_type f3 = s3 - typename genType::value_type(2) * s2 + s; + typename genType::value_type f4 = s3 - s2; + + return f1 * v1 + f2 * v2 + f3 * t1 + f4 * t2; +} + +template +GLM_FUNC_QUALIFIER genType cubic +( + genType const & v1, + genType const & v2, + genType const & v3, + genType const & v4, + typename genType::value_type const & s +) +{ + return ((v1 * s + v2) * s + v3) * s + v4; +} + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/std_based_type.hpp b/include/gal/opengl/glm/gtx/std_based_type.hpp new file mode 100644 index 0000000000..7fac251bf2 --- /dev/null +++ b/include/gal/opengl/glm/gtx/std_based_type.hpp @@ -0,0 +1,83 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_std_based_type +/// @file glm/gtx/std_based_type.hpp +/// @date 2008-06-08 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_extented_min_max (dependence) +/// +/// @defgroup gtx_std_based_type GLM_GTX_std_based_type +/// @ingroup gtx +/// +/// @brief Adds vector types based on STL value types. +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_std_based_type +#define GLM_GTX_std_based_type GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_std_based_type extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_std_based_type + /// @{ + + /// Vector type based of two std::size_t components. + /// @see GLM_GTX_std_based_type + typedef detail::tvec2 size2; + + /// Vector type based of three std::size_t components. + /// @see GLM_GTX_std_based_type + typedef detail::tvec3 size3; + + /// Vector type based of four std::size_t components. + /// @see GLM_GTX_std_based_type + typedef detail::tvec4 size4; + + /// Vector type based of two std::size_t components. + /// @see GLM_GTX_std_based_type + typedef detail::tvec2 size2_t; + + /// Vector type based of three std::size_t components. + /// @see GLM_GTX_std_based_type + typedef detail::tvec3 size3_t; + + /// Vector type based of four std::size_t components. + /// @see GLM_GTX_std_based_type + typedef detail::tvec4 size4_t; + + /// @} +}//namespace glm + +#include "std_based_type.inl" + +#endif//GLM_GTX_std_based_type diff --git a/include/gal/opengl/glm/gtx/std_based_type.inl b/include/gal/opengl/glm/gtx/std_based_type.inl new file mode 100644 index 0000000000..a5589d5145 --- /dev/null +++ b/include/gal/opengl/glm/gtx/std_based_type.inl @@ -0,0 +1,13 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-06-08 +// Updated : 2008-06-08 +// Licence : This source is under MIT License +// File : glm/gtx/std_based_type.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + +} diff --git a/include/gal/opengl/glm/gtx/string_cast.hpp b/include/gal/opengl/glm/gtx/string_cast.hpp new file mode 100644 index 0000000000..c9fad94522 --- /dev/null +++ b/include/gal/opengl/glm/gtx/string_cast.hpp @@ -0,0 +1,70 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_string_cast +/// @file glm/gtx/string_cast.hpp +/// @date 2008-04-26 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_half_float (dependence) +/// @see gtx_integer (dependence) +/// @see gtx_quaternion (dependence) +/// +/// @defgroup gtx_string_cast GLM_GTX_string_cast +/// @ingroup gtx +/// +/// @brief Setup strings for GLM type values +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_string_cast +#define GLM_GTX_string_cast GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" +#include "../gtx/integer.hpp" +#include "../gtx/quaternion.hpp" +#include + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_string_cast extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_string_cast + /// @{ + + /// Create a string from a GLM type value. + /// From GLM_GTX_string_cast extension. + template + std::string to_string(genType const & x); + + /// @} +}//namespace glm + +#include "string_cast.inl" + +#endif//GLM_GTX_string_cast diff --git a/include/gal/opengl/glm/gtx/string_cast.inl b/include/gal/opengl/glm/gtx/string_cast.inl new file mode 100644 index 0000000000..6b4f815e4e --- /dev/null +++ b/include/gal/opengl/glm/gtx/string_cast.inl @@ -0,0 +1,588 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2006 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-04-27 +// Updated : 2008-05-24 +// Licence : This source is under MIT License +// File : glm/gtx/string_cast.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include +#include + +namespace glm{ +namespace detail +{ + GLM_FUNC_QUALIFIER std::string format(const char* msg, ...) + { + std::size_t const STRING_BUFFER(4096); + char text[STRING_BUFFER]; + va_list list; + + if(msg == 0) + return std::string(); + + va_start(list, msg); + +#if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005)) + vsprintf_s(text, STRING_BUFFER, msg, list); +#else// + vsprintf(text, msg, list); +#endif// + va_end(list); + + return std::string(text); + } + + static const char* True = "true"; + static const char* False = "false"; +}//namespace detail + + //////////////////////////////// + // Scalars + + GLM_FUNC_QUALIFIER std::string to_string(detail::half const & x) + { + return detail::format("half(%2.4f)", float(x)); + } + + GLM_FUNC_QUALIFIER std::string to_string(float x) + { + return detail::format("float(%f)", x); + } + + GLM_FUNC_QUALIFIER std::string to_string(double x) + { + return detail::format("double(%f)", x); + } + + GLM_FUNC_QUALIFIER std::string to_string(int x) + { + return detail::format("int(%d)", x); + } + + GLM_FUNC_QUALIFIER std::string to_string(unsigned int x) + { + return detail::format("uint(%d)", x); + } + + //////////////////////////////// + // Bool vectors + + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec2 const & v + ) + { + return detail::format("bvec2(%s, %s)", + v.x ? detail::True : detail::False, + v.y ? detail::True : detail::False); + } + + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec3 const & v + ) + { + return detail::format("bvec3(%s, %s, %s)", + v.x ? detail::True : detail::False, + v.y ? detail::True : detail::False, + v.z ? detail::True : detail::False); + } + + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec4 const & v + ) + { + return detail::format("bvec4(%s, %s, %s, %s)", + v.x ? detail::True : detail::False, + v.y ? detail::True : detail::False, + v.z ? detail::True : detail::False, + v.w ? detail::True : detail::False); + } + + //////////////////////////////// + // Half vectors + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec2 const & v + ) + { + return detail::format("hvec2(%2.4f, %2.4f)", v.x.toFloat(), v.y.toFloat()); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec3 const & v + ) + { + return detail::format("hvec3(%2.4f, %2.4f, %2.4f)", v.x.toFloat(), v.y.toFloat(), v.z.toFloat()); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec4 const & v + ) + { + return detail::format("hvec4(%2.4f, %2.4f, %2.4f, %2.4f)", v.x.toFloat(), v.y.toFloat(), v.z.toFloat(), v.w.toFloat()); + } + + //////////////////////////////// + // Float vectors + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec2 const & v + ) + { + return detail::format("fvec2(%f, %f)", v.x, v.y); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec3 const & v + ) + { + return detail::format("fvec3(%f, %f, %f)", v.x, v.y, v.z); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec4 const & v + ) + { + return detail::format("fvec4(%f, %f, %f, %f)", v.x, v.y, v.z, v.w); + } + + //////////////////////////////// + // Double vectors + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec2 const & v + ) + { + return detail::format("dvec2(%f, %f)", v.x, v.y); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec3 const & v + ) + { + return detail::format("dvec3(%f, %f, %f)", v.x, v.y, v.z); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec4 const & v + ) + { + return detail::format("dvec4(%f, %f, %f, %f)", v.x, v.y, v.z, v.w); + } + + //////////////////////////////// + // Int vectors + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec2 const & v + ) + { + return detail::format("ivec2(%d, %d)", v.x, v.y); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec3 const & v + ) + { + return detail::format("ivec3(%d, %d, %d)", v.x, v.y, v.z); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec4 const & v + ) + { + return detail::format("ivec4(%d, %d, %d, %d)", v.x, v.y, v.z, v.w); + } + + //////////////////////////////// + // Unsigned int vectors + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec2 const & v + ) + { + return detail::format("uvec2(%d, %d)", v.x, v.y); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec3 const & v + ) + { + return detail::format("uvec3(%d, %d, %d)", v.x, v.y, v.z); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec4 const & v + ) + { + return detail::format("uvec4(%d, %d, %d, %d)", v.x, v.y, v.z, v.w); + } + + //////////////////////////////// + // Half matrices + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat2x2 const & m + ) + { + return detail::format("hmat2x2((%f, %f), (%f, %f))", + m[0][0].toFloat(), m[0][1].toFloat(), + m[1][0].toFloat(), m[1][1].toFloat()); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat2x3 const & x + ) + { + return detail::format("hmat2x3((%f, %f, %f), (%f, %f, %f))", + x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(), + x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat()); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat2x4 const & x + ) + { + return detail::format("hmat2x4((%f, %f, %f, %f), (%f, %f, %f, %f))", + x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(), x[0][3].toFloat(), + x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat(), x[1][3].toFloat()); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat3x2 const & x + ) + { + return detail::format("hmat3x2((%f, %f), (%f, %f), (%f, %f))", + x[0][0].toFloat(), x[0][1].toFloat(), + x[1][0].toFloat(), x[1][1].toFloat(), + x[2][0].toFloat(), x[2][1].toFloat()); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat3x3 const & x + ) + { + return detail::format("hmat3x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f))", + x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(), + x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat(), + x[2][0].toFloat(), x[2][1].toFloat(), x[2][2].toFloat()); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat3x4 const & x + ) + { + return detail::format("hmat3x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))", + x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(), x[0][3].toFloat(), + x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat(), x[1][3].toFloat(), + x[2][0].toFloat(), x[2][1].toFloat(), x[2][2].toFloat(), x[2][3].toFloat()); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat4x2 const & x + ) + { + return detail::format("hmat4x2((%f, %f), (%f, %f), (%f, %f), (%f, %f))", + x[0][0].toFloat(), x[0][1].toFloat(), + x[1][0].toFloat(), x[1][1].toFloat(), + x[2][0].toFloat(), x[2][1].toFloat(), + x[3][0].toFloat(), x[3][1].toFloat()); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat4x3 const & x + ) + { + return detail::format("hmat4x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f), (%f, %f, %f))", + x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(), + x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat(), + x[2][0].toFloat(), x[2][1].toFloat(), x[2][2].toFloat(), + x[3][0].toFloat(), x[3][1].toFloat(), x[3][2].toFloat()); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat4x4 const & x + ) + { + return detail::format("hmat4x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))", + x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(), x[0][3].toFloat(), + x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat(), x[1][3].toFloat(), + x[2][0].toFloat(), x[2][1].toFloat(), x[2][2].toFloat(), x[2][3].toFloat(), + x[3][0].toFloat(), x[3][1].toFloat(), x[3][2].toFloat(), x[3][3].toFloat()); + } + + //////////////////////////////// + // Float matrices + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat2x2 const & x + ) + { + return detail::format("mat2x2((%f, %f), (%f, %f))", + x[0][0], x[0][1], + x[1][0], x[1][1]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat2x3 const & x + ) + { + return detail::format("mat2x3((%f, %f, %f), (%f, %f, %f))", + x[0][0], x[0][1], x[0][2], + x[1][0], x[1][1], x[1][2]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat2x4 const & x + ) + { + return detail::format("mat2x4((%f, %f, %f, %f), (%f, %f, %f, %f))", + x[0][0], x[0][1], x[0][2], x[0][3], + x[1][0], x[1][1], x[1][2], x[1][3]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat3x2 const & x + ) + { + return detail::format("mat3x2((%f, %f), (%f, %f), (%f, %f))", + x[0][0], x[0][1], + x[1][0], x[1][1], + x[2][0], x[2][1]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat3x3 const & x + ) + { + return detail::format("mat3x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f))", + x[0][0], x[0][1], x[0][2], + x[1][0], x[1][1], x[1][2], + x[2][0], x[2][1], x[2][2]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat3x4 const & x + ) + { + return detail::format("mat3x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))", + x[0][0], x[0][1], x[0][2], x[0][3], + x[1][0], x[1][1], x[1][2], x[1][3], + x[2][0], x[2][1], x[2][2], x[2][3]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat4x2 const & x + ) + { + return detail::format("mat4x2((%f, %f), (%f, %f), (%f, %f), (%f, %f))", + x[0][0], x[0][1], + x[1][0], x[1][1], + x[2][0], x[2][1], + x[3][0], x[3][1]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat4x3 const & x + ) + { + return detail::format("mat4x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f), (%f, %f, %f))", + x[0][0], x[0][1], x[0][2], + x[1][0], x[1][1], x[1][2], + x[2][0], x[2][1], x[2][2], + x[3][0], x[3][1], x[3][2]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat4x4 const & x + ) + { + return detail::format("mat4x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))", + x[0][0], x[0][1], x[0][2], x[0][3], + x[1][0], x[1][1], x[1][2], x[1][3], + x[2][0], x[2][1], x[2][2], x[2][3], + x[3][0], x[3][1], x[3][2], x[3][3]); + } + + //////////////////////////////// + // Double matrices + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat2x2 const & x + ) + { + return detail::format("dmat2x2((%f, %f), (%f, %f))", + x[0][0], x[0][1], + x[1][0], x[1][1]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat2x3 const & x + ) + { + return detail::format("dmat2x3((%f, %f, %f), (%f, %f, %f))", + x[0][0], x[0][1], x[0][2], + x[1][0], x[1][1], x[1][2]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat2x4 const & x + ) + { + return detail::format("dmat2x4((%f, %f, %f, %f), (%f, %f, %f, %f))", + x[0][0], x[0][1], x[0][2], x[0][3], + x[1][0], x[1][1], x[1][2], x[1][3]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat3x2 const & x + ) + { + return detail::format("dmat3x2((%f, %f), (%f, %f), (%f, %f))", + x[0][0], x[0][1], + x[1][0], x[1][1], + x[2][0], x[2][1]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat3x3 const & x + ) + { + return detail::format("dmat3x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f))", + x[0][0], x[0][1], x[0][2], + x[1][0], x[1][1], x[1][2], + x[2][0], x[2][1], x[2][2]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat3x4 const & x + ) + { + return detail::format("dmat3x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))", + x[0][0], x[0][1], x[0][2], x[0][3], + x[1][0], x[1][1], x[1][2], x[1][3], + x[2][0], x[2][1], x[2][2], x[2][3]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat4x2 const & x + ) + { + return detail::format("dmat4x2((%f, %f), (%f, %f), (%f, %f), (%f, %f))", + x[0][0], x[0][1], + x[1][0], x[1][1], + x[2][0], x[2][1], + x[3][0], x[3][1]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat4x3 const & x + ) + { + return detail::format("dmat4x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f), (%f, %f, %f))", + x[0][0], x[0][1], x[0][2], + x[1][0], x[1][1], x[1][2], + x[2][0], x[2][1], x[2][2], + x[3][0], x[3][1], x[3][2]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat4x4 const & x + ) + { + return detail::format("dmat4x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))", + x[0][0], x[0][1], x[0][2], x[0][3], + x[1][0], x[1][1], x[1][2], x[1][3], + x[2][0], x[2][1], x[2][2], x[2][3], + x[3][0], x[3][1], x[3][2], x[3][3]); + } + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/transform.hpp b/include/gal/opengl/glm/gtx/transform.hpp new file mode 100644 index 0000000000..17b85d9c83 --- /dev/null +++ b/include/gal/opengl/glm/gtx/transform.hpp @@ -0,0 +1,131 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_transform +/// @file glm/gtx/transform.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_matrix_transform (dependence) +/// @see gtx_transform +/// @see gtx_transform2 +/// +/// @defgroup gtx_transform GLM_GTX_transform +/// @ingroup gtx +/// +/// @brief Add transformation matrices +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_transform +#define GLM_GTX_transform GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/matrix_transform.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_transform extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_transform + /// @{ + + //! Builds a translation 4 * 4 matrix created from 3 scalars. + //! - From \link gtx_transform GLM_GTX_transform \endlink extension + // - See also: \link glm::translate GLM_GTC_matrix_transform \endlink + template + detail::tmat4x4 translate( + T x, T y, T z); + + //! Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars. + //! - From \link gtx_transform GLM_GTX_transform \endlink extension + // - See also: \link glm::translate GLM_GTC_matrix_transform \endlink + template + detail::tmat4x4 translate( + detail::tmat4x4 const & m, + T x, T y, T z); + + //! Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars. + //! - From \link gtx_transform GLM_GTX_transform \endlink extension + // - See also: \link glm::translate GLM_GTC_matrix_transform \endlink + template + detail::tmat4x4 translate( + detail::tvec3 const & v); + + //! Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. + //! - From \link gtx_transform GLM_GTX_transform \endlink extension + // - See also: \link glm::rotate GLM_GTC_matrix_transform \endlink + template + detail::tmat4x4 rotate( + T angle, + T x, T y, T z); + + //! Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. + //! - From \link gtx_transform GLM_GTX_transform \endlink extension + // - See also: \link glm::rotate GLM_GTC_matrix_transform \endlink + template + detail::tmat4x4 rotate( + T angle, + detail::tvec3 const & v); + + //! Transforms a matrix with a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. + //! - From \link gtx_transform GLM_GTX_transform \endlink extension + // - See also: \link glm::rotate GLM_GTC_matrix_transform \endlink + template + detail::tmat4x4 rotate( + detail::tmat4x4 const & m, + T angle, + T x, T y, T z); + + //! Builds a scale 4 * 4 matrix created from 3 scalars. + //! - From \link gtx_transform GLM_GTX_transform \endlink extension + // - See also: \link glm::scale GLM_GTC_matrix_transform \endlink + template + detail::tmat4x4 scale( + T x, T y, T z); + + //! Transforms a matrix with a scale 4 * 4 matrix created from 3 scalars. + //! - From \link gtx_transform GLM_GTX_transform \endlink extension + // - See also: \link glm::scale GLM_GTC_matrix_transform \endlink + template + detail::tmat4x4 scale( + detail::tmat4x4 const & m, + T x, T y, T z); + + //! Transforms a matrix with a scale 4 * 4 matrix created from a vector of 3 components. + //! - From \link gtx_transform GLM_GTX_transform \endlink extension + // - See also: \link glm::scale GLM_GTC_matrix_transform \endlink + template + detail::tmat4x4 scale( + detail::tvec3 const & v); + + /// @} +}// namespace glm + +#include "transform.inl" + +#endif//GLM_GTX_transform diff --git a/include/gal/opengl/glm/gtx/transform.inl b/include/gal/opengl/glm/gtx/transform.inl new file mode 100644 index 0000000000..f22a93d128 --- /dev/null +++ b/include/gal/opengl/glm/gtx/transform.inl @@ -0,0 +1,90 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2009-04-29 +// Licence : This source is under MIT License +// File : glm/gtx/transform.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tmat4x4 translate( + T x, T y, T z) + { + return translate( + detail::tmat4x4(1.0f), + detail::tvec3(x, y , z)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 translate( + detail::tmat4x4 const & m, + T x, T y, T z) + { + return translate( + m, detail::tvec3(x, y , z)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 translate( + detail::tvec3 const & v) + { + return translate( + detail::tmat4x4(1.0f), v); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 rotate( + T angle, + T x, T y, T z) + { + return rotate( + detail::tmat4x4(1), angle, detail::tvec3(x, y, z)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 rotate( + T angle, + detail::tvec3 const & v) + { + return rotate( + detail::tmat4x4(1), angle, v); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 rotate( + detail::tmat4x4 const & m, + T angle, + T x, T y, T z) + { + return rotate( + m, angle, detail::tvec3(x, y, z)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 scale(T x, T y, T z) + { + return scale( + detail::tmat4x4(1), detail::tvec3(x, y, z)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 scale( + detail::tmat4x4 const & m, + T x, T y, T z) + { + return scale( + m, detail::tvec3(x, y, z)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 scale( + detail::tvec3 const & v) + { + return scale( + detail::tmat4x4(1.0f), v); + } + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/transform2.hpp b/include/gal/opengl/glm/gtx/transform2.hpp new file mode 100644 index 0000000000..719349a20a --- /dev/null +++ b/include/gal/opengl/glm/gtx/transform2.hpp @@ -0,0 +1,135 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_transform2 +/// @file glm/gtx/transform2.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_transform (dependence) +/// +/// @defgroup gtx_transform2 GLM_GTX_transform2 +/// @ingroup gtx +/// +/// @brief Add extra transformation matrices +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_transform2 +#define GLM_GTX_transform2 GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtx/transform.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_transform2 extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_transform2 + /// @{ + + //! Transforms a matrix with a shearing on X axis. + //! From GLM_GTX_transform2 extension. + template + detail::tmat3x3 shearX2D( + detail::tmat3x3 const & m, + T y); + + //! Transforms a matrix with a shearing on Y axis. + //! From GLM_GTX_transform2 extension. + template + detail::tmat3x3 shearY2D( + detail::tmat3x3 const & m, + T x); + + //! Transforms a matrix with a shearing on X axis + //! From GLM_GTX_transform2 extension. + template + detail::tmat4x4 shearX3D( + const detail::tmat4x4 & m, + T y, + T z); + + //! Transforms a matrix with a shearing on Y axis. + //! From GLM_GTX_transform2 extension. + template + detail::tmat4x4 shearY3D( + const detail::tmat4x4 & m, + T x, + T z); + + //! Transforms a matrix with a shearing on Z axis. + //! From GLM_GTX_transform2 extension. + template + detail::tmat4x4 shearZ3D( + const detail::tmat4x4 & m, + T x, + T y); + + //template GLM_FUNC_QUALIFIER detail::tmat4x4 shear(const detail::tmat4x4 & m, shearPlane, planePoint, angle) + // Identity + tan(angle) * cross(Normal, OnPlaneVector) 0 + // - dot(PointOnPlane, normal) * OnPlaneVector 1 + + // Reflect functions seem to don't work + //template detail::tmat3x3 reflect2D(const detail::tmat3x3 & m, const detail::tvec3& normal){return reflect2DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension) + //template detail::tmat4x4 reflect3D(const detail::tmat4x4 & m, const detail::tvec3& normal){return reflect3DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension) + + //! Build planar projection matrix along normal axis. + //! From GLM_GTX_transform2 extension. + template + detail::tmat3x3 proj2D( + const detail::tmat3x3 & m, + const detail::tvec3& normal); + + //! Build planar projection matrix along normal axis. + //! From GLM_GTX_transform2 extension. + template + detail::tmat4x4 proj3D( + const detail::tmat4x4 & m, + const detail::tvec3& normal); + + //! Build a scale bias matrix. + //! From GLM_GTX_transform2 extension. + template + detail::tmat4x4 scaleBias( + valType scale, + valType bias); + + //! Build a scale bias matrix. + //! From GLM_GTX_transform2 extension. + template + detail::tmat4x4 scaleBias( + detail::tmat4x4 const & m, + valType scale, + valType bias); + + /// @} +}// namespace glm + +#include "transform2.inl" + +#endif//GLM_GTX_transform2 diff --git a/include/gal/opengl/glm/gtx/transform2.inl b/include/gal/opengl/glm/gtx/transform2.inl new file mode 100644 index 0000000000..b423f7e805 --- /dev/null +++ b/include/gal/opengl/glm/gtx/transform2.inl @@ -0,0 +1,154 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-02-28 +// Updated : 2005-04-23 +// Licence : This source is under MIT License +// File : glm/gtx/transform2.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tmat3x3 shearX2D( + const detail::tmat3x3& m, + T s) + { + detail::tmat3x3 r(1); + r[0][1] = s; + return m * r; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 shearY2D( + const detail::tmat3x3& m, + T s) + { + detail::tmat3x3 r(1); + r[1][0] = s; + return m * r; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 shearX3D( + const detail::tmat4x4& m, + T s, + T t) + { + detail::tmat4x4 r(1); + r[1][0] = s; + r[2][0] = t; + return m * r; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 shearY3D( + const detail::tmat4x4& m, + T s, + T t) + { + detail::tmat4x4 r(1); + r[0][1] = s; + r[2][1] = t; + return m * r; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 shearZ3D( + const detail::tmat4x4& m, + T s, + T t) + { + detail::tmat4x4 r(1); + r[0][2] = s; + r[1][2] = t; + return m * r; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 reflect2D( + const detail::tmat3x3& m, + const detail::tvec3& normal) + { + detail::tmat3x3 r(1); + r[0][0] = 1 - 2 * normal.x * normal.x; + r[0][1] = -2 * normal.x * normal.y; + r[1][0] = -2 * normal.x * normal.y; + r[1][1] = 1 - 2 * normal.y * normal.y; + return m * r; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 reflect3D( + const detail::tmat4x4& m, + const detail::tvec3& normal) + { + detail::tmat4x4 r(1); + r[0][0] = 1 - 2 * normal.x * normal.x; + r[0][1] = -2 * normal.x * normal.y; + r[0][2] = -2 * normal.x * normal.z; + + r[1][0] = -2 * normal.x * normal.y; + r[1][1] = 1 - 2 * normal.y * normal.y; + r[1][2] = -2 * normal.y * normal.z; + + r[2][0] = -2 * normal.x * normal.z; + r[2][1] = -2 * normal.y * normal.z; + r[2][2] = 1 - 2 * normal.z * normal.z; + return m * r; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 proj2D( + const detail::tmat3x3& m, + const detail::tvec3& normal) + { + detail::tmat3x3 r(1); + r[0][0] = 1 - normal.x * normal.x; + r[0][1] = - normal.x * normal.y; + r[1][0] = - normal.x * normal.y; + r[1][1] = 1 - normal.y * normal.y; + return m * r; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 proj3D( + const detail::tmat4x4& m, + const detail::tvec3& normal) + { + detail::tmat4x4 r(1); + r[0][0] = 1 - normal.x * normal.x; + r[0][1] = - normal.x * normal.y; + r[0][2] = - normal.x * normal.z; + r[1][0] = - normal.x * normal.y; + r[1][1] = 1 - normal.y * normal.y; + r[1][2] = - normal.y * normal.z; + r[2][0] = - normal.x * normal.z; + r[2][1] = - normal.y * normal.z; + r[2][2] = 1 - normal.z * normal.z; + return m * r; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 scaleBias( + T scale, + T bias) + { + detail::tmat4x4 result; + result[3] = detail::tvec4(detail::tvec3(bias), T(1)); + result[0][0] = scale; + result[1][1] = scale; + result[2][2] = scale; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 scaleBias( + const detail::tmat4x4& m, + T scale, + T bias) + { + return m * scaleBias(scale, bias); + } +}//namespace glm + diff --git a/include/gal/opengl/glm/gtx/ulp.hpp b/include/gal/opengl/glm/gtx/ulp.hpp new file mode 100644 index 0000000000..963f1f4cda --- /dev/null +++ b/include/gal/opengl/glm/gtx/ulp.hpp @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/////////////////////////////////////////////////////////////////////////////////// + +#if(defined(GLM_MESSAGES)) +# pragma message("GLM: GLM_GTX_ulp extension is deprecated, include GLM_GTC_ulp (glm/gtc/ulp.hpp) instead") +#endif + +// Promoted: +#include "../gtc/ulp.hpp" diff --git a/include/gal/opengl/glm/gtx/unsigned_int.hpp b/include/gal/opengl/glm/gtx/unsigned_int.hpp new file mode 100644 index 0000000000..982d469665 --- /dev/null +++ b/include/gal/opengl/glm/gtx/unsigned_int.hpp @@ -0,0 +1,26 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/////////////////////////////////////////////////////////////////////////////////// + +#if(defined(GLM_MESSAGES)) +# pragma message("GLM: GLM_GTX_unsigned_int extension is deprecated, include GLM_GTX_integer instead") +#endif diff --git a/include/gal/opengl/glm/gtx/unsigned_int.inl b/include/gal/opengl/glm/gtx/unsigned_int.inl new file mode 100644 index 0000000000..2d60c56444 --- /dev/null +++ b/include/gal/opengl/glm/gtx/unsigned_int.inl @@ -0,0 +1,13 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-24 +// Updated : 2008-10-07 +// Licence : This source is under MIT License +// File : glm/gtx/unsigned_int.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/vec1.hpp b/include/gal/opengl/glm/gtx/vec1.hpp new file mode 100644 index 0000000000..3634129b94 --- /dev/null +++ b/include/gal/opengl/glm/gtx/vec1.hpp @@ -0,0 +1,137 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_vec1 +/// @file glm/gtx/vec1.hpp +/// @date 2010-02-08 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_vec1 GLM_GTX_vec1 +/// @ingroup gtx +/// +/// @brief Add vec1, ivec1, uvec1 and bvec1 types. +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_vec1 +#define GLM_GTX_vec1 GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../core/type_vec1.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_vec1 extension included") +#endif + +namespace glm +{ + //! 1 component vector of high precision floating-point numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::highp_vec1_t highp_vec1; + //! 1 component vector of medium precision floating-point numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::mediump_vec1_t mediump_vec1; + //! 1 component vector of low precision floating-point numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::lowp_vec1_t lowp_vec1; + + //! 1 component vector of high precision signed integer numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::highp_ivec1_t highp_ivec1; + //! 1 component vector of medium precision signed integer numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::mediump_ivec1_t mediump_ivec1; + //! 1 component vector of low precision signed integer numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::lowp_ivec1_t lowp_ivec1; + + //! 1 component vector of high precision unsigned integer numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::highp_uvec1_t highp_uvec1; + //! 1 component vector of medium precision unsigned integer numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::mediump_uvec1_t mediump_uvec1; + //! 1 component vector of low precision unsigned integer numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::lowp_uvec1_t lowp_uvec1; + + ////////////////////////// + // vec1 definition + + //! 1 component vector of boolean. + //! From GLM_GTX_vec1 extension. + typedef detail::tvec1 bvec1; + +#if(defined(GLM_PRECISION_HIGHP_FLOAT)) + typedef highp_vec1 vec1; +#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT)) + typedef mediump_vec1 vec1; +#elif(defined(GLM_PRECISION_LOWP_FLOAT)) + typedef lowp_vec1 vec1; +#else + //! 1 component vector of floating-point numbers. + //! From GLM_GTX_vec1 extension. + typedef mediump_vec1 vec1; +#endif//GLM_PRECISION + +#if(defined(GLM_PRECISION_HIGHP_INT)) + typedef highp_ivec1 ivec1; +#elif(defined(GLM_PRECISION_MEDIUMP_INT)) + typedef mediump_ivec1 ivec1; +#elif(defined(GLM_PRECISION_LOWP_INT)) + typedef lowp_ivec1 ivec1; +#else + //! 1 component vector of signed integer numbers. + //! From GLM_GTX_vec1 extension. + typedef mediump_ivec1 ivec1; +#endif//GLM_PRECISION + +#if(defined(GLM_PRECISION_HIGHP_UINT)) + typedef highp_uvec1 uvec1; +#elif(defined(GLM_PRECISION_MEDIUMP_UINT)) + typedef mediump_uvec1 uvec1; +#elif(defined(GLM_PRECISION_LOWP_UINT)) + typedef lowp_uvec1 uvec1; +#else + //! 1 component vector of unsigned integer numbers. + //! From GLM_GTX_vec1 extension. + typedef mediump_uvec1 uvec1; +#endif//GLM_PRECISION + +}// namespace glm + +#include "vec1.inl" + +#endif//GLM_GTX_vec1 + diff --git a/include/gal/opengl/glm/gtx/vec1.inl b/include/gal/opengl/glm/gtx/vec1.inl new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/gal/opengl/glm/gtx/vector_access.hpp b/include/gal/opengl/glm/gtx/vector_access.hpp new file mode 100644 index 0000000000..19799594c6 --- /dev/null +++ b/include/gal/opengl/glm/gtx/vector_access.hpp @@ -0,0 +1,85 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_vector_access +/// @file glm/gtx/vector_access.hpp +/// @date 2006-01-16 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_vector_access GLM_GTX_vector_access +/// @ingroup gtx +/// +/// @brief Function to set values to vectors +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_vector_access +#define GLM_GTX_vector_access GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_vector_access extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_vector_access + /// @{ + + //! Set values to a 2 components vector. + //! From GLM_GTX_vector_access extension. + template + void set( + detail::tvec2 & v, + valType const & x, + valType const & y); + + //! Set values to a 3 components vector. + //! From GLM_GTX_vector_access extension. + template + void set( + detail::tvec3 & v, + valType const & x, + valType const & y, + valType const & z); + + //! Set values to a 4 components vector. + //! From GLM_GTX_vector_access extension. + template + void set( + detail::tvec4 & v, + valType const & x, + valType const & y, + valType const & z, + valType const & w); + + /// @} +}//namespace glm + +#include "vector_access.inl" + +#endif//GLM_GTX_vector_access diff --git a/include/gal/opengl/glm/gtx/vector_access.inl b/include/gal/opengl/glm/gtx/vector_access.inl new file mode 100644 index 0000000000..75660b4c05 --- /dev/null +++ b/include/gal/opengl/glm/gtx/vector_access.inl @@ -0,0 +1,53 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2006-01-16 +// Updated : 2008-10-07 +// Licence : This source is under MIT License +// File : glm/gtx/vector_access.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER void set + ( + detail::tvec2& v, + valType const & x, + valType const & y + ) + { + v.x = x; + v.y = y; + } + + template + GLM_FUNC_QUALIFIER void set + ( + detail::tvec3& v, + valType const & x, + valType const & y, + valType const & z + ) + { + v.x = x; + v.y = y; + v.z = z; + } + + template + GLM_FUNC_QUALIFIER void set + ( + detail::tvec4& v, + valType const & x, + valType const & y, + valType const & z, + valType const & w + ) + { + v.x = x; + v.y = y; + v.z = z; + v.w = w; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/vector_angle.hpp b/include/gal/opengl/glm/gtx/vector_angle.hpp new file mode 100644 index 0000000000..c2f6777a76 --- /dev/null +++ b/include/gal/opengl/glm/gtx/vector_angle.hpp @@ -0,0 +1,88 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_vector_angle +/// @file glm/gtx/vector_angle.hpp +/// @date 2005-12-30 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_quaternion (dependence) +/// @see gtx_epsilon (dependence) +/// +/// @defgroup gtx_vector_angle GLM_GTX_vector_angle +/// @ingroup gtx +/// +/// @brief Compute angle between vectors +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_vector_angle +#define GLM_GTX_vector_angle GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/epsilon.hpp" +#include "../gtx/quaternion.hpp" +#include "../gtx/rotate_vector.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_vector_angle extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_vector_angle + /// @{ + + //! Returns the absolute angle between two vectors + //! Parameters need to be normalized. + //! From GLM_GTX_vector_angle extension + template + GLM_FUNC_QUALIFIER typename vecType::value_type angle( + vecType const & x, + vecType const & y); + + //! Returns the oriented angle between two 2d vectors + //! Parameters need to be normalized. + //! From GLM_GTX_vector_angle extension. + template + GLM_FUNC_QUALIFIER T orientedAngle( + detail::tvec2 const & x, + detail::tvec2 const & y); + + //! Returns the oriented angle between two 3d vectors based from a reference axis. + //! Parameters need to be normalized. + //! From GLM_GTX_vector_angle extension. + template + GLM_FUNC_QUALIFIER T orientedAngle( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 const & ref); + + /// @} +}// namespace glm + +#include "vector_angle.inl" + +#endif//GLM_GTX_vector_angle diff --git a/include/gal/opengl/glm/gtx/vector_angle.inl b/include/gal/opengl/glm/gtx/vector_angle.inl new file mode 100644 index 0000000000..196ff16a16 --- /dev/null +++ b/include/gal/opengl/glm/gtx/vector_angle.inl @@ -0,0 +1,57 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-30 +// Updated : 2008-09-29 +// Licence : This source is under MIT License +// File : glm/gtx/vector_angle.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER typename genType::value_type angle + ( + genType const & x, + genType const & y + ) + { + return degrees(acos(dot(x, y))); + } + + //! \todo epsilon is hard coded to 0.01 + template + GLM_FUNC_QUALIFIER valType orientedAngle + ( + detail::tvec2 const & x, + detail::tvec2 const & y + ) + { +#ifdef GLM_FORCE_RADIANS + valType const Angle(acos(dot(x, y))); +#else + valType const Angle(glm::degrees(acos(dot(x, y)))); +#endif + detail::tvec2 const TransformedVector(glm::rotate(x, Angle)); + if(all(epsilonEqual(y, TransformedVector, valType(0.01)))) + return Angle; + else + return -Angle; + } + + template + GLM_FUNC_QUALIFIER valType orientedAngle + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 const & ref + ) + { + valType const Angle(glm::degrees(glm::acos(glm::dot(x, y)))); + + if(glm::dot(ref, glm::cross(x, y)) < valType(0)) + return -Angle; + else + return Angle; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/vector_query.hpp b/include/gal/opengl/glm/gtx/vector_query.hpp new file mode 100644 index 0000000000..3e50400e86 --- /dev/null +++ b/include/gal/opengl/glm/gtx/vector_query.hpp @@ -0,0 +1,112 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_vector_query +/// @file glm/gtx/vector_query.hpp +/// @date 2008-03-10 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_vector_query GLM_GTX_vector_query +/// @ingroup gtx +/// +/// @brief Query informations of vector types +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_vector_query +#define GLM_GTX_vector_query GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include +#include + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_vector_query extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_vector_query + /// @{ + + //! Check whether two vectors are collinears. + //! From GLM_GTX_vector_query extensions. + template + bool areCollinear( + genType const & v0, + genType const & v1, + typename genType::value_type const & epsilon/* = std::numeric_limits::epsilon()*/); + + //! Check whether two vectors are orthogonals. + //! From GLM_GTX_vector_query extensions. + template + bool areOrthogonal( + genType const & v0, + genType const & v1, + typename genType::value_type const & epsilon/* = std::numeric_limits::epsilon()*/); + + //! Check whether a vector is normalized. + //! From GLM_GTX_vector_query extensions. + template class vecType> + bool isNormalized( + vecType const & v, + genType const & epsilon/* = std::numeric_limits::epsilon()*/); + + //! Check whether a vector is null. + //! From GLM_GTX_vector_query extensions. + template + bool isNull( + detail::tvec2 const & v, + valType const & epsilon/* = std::numeric_limits::epsilon()*/); + + //! Check whether a vector is null. + //! From GLM_GTX_vector_query extensions. + template + bool isNull( + detail::tvec3 const & v, + valType const & epsilon/* = std::numeric_limits::epsilon()*/); + + //! Check whether a vector is null. + //! From GLM_GTX_vector_query extensions. + template + bool isNull( + detail::tvec4 const & v, + valType const & epsilon/* = std::numeric_limits::epsilon()*/); + + //! Check whether two vectors are orthonormal. + //! From GLM_GTX_vector_query extensions. + template + bool areOrthonormal( + genType const & v0, + genType const & v1, + typename genType::value_type const & epsilon/* = std::numeric_limits::epsilon()*/); + + /// @} +}// namespace glm + +#include "vector_query.inl" + +#endif//GLM_GTX_vector_query diff --git a/include/gal/opengl/glm/gtx/vector_query.inl b/include/gal/opengl/glm/gtx/vector_query.inl new file mode 100644 index 0000000000..8cff371943 --- /dev/null +++ b/include/gal/opengl/glm/gtx/vector_query.inl @@ -0,0 +1,164 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-03-05 +// Updated : 2010-02-16 +// Licence : This source is under MIT License +// File : glm/gtx/vector_query.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Dependency: +// - GLM core +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +namespace glm +{ + template + GLM_FUNC_QUALIFIER bool areCollinear + ( + detail::tvec2 const & v0, + detail::tvec2 const & v1, + typename detail::tvec2::value_type const & epsilon + ) + { + return length(cross(detail::tvec3(v0, T(0)), detail::tvec3(v1, T(0)))) < epsilon; + } + + template + GLM_FUNC_QUALIFIER bool areCollinear + ( + detail::tvec3 const & v0, + detail::tvec3 const & v1, + typename detail::tvec3::value_type const & epsilon + ) + { + return length(cross(v0, v1)) < epsilon; + } + + template + GLM_FUNC_QUALIFIER bool areCollinear + ( + detail::tvec4 const & v0, + detail::tvec4 const & v1, + typename detail::tvec4::value_type const & epsilon + ) + { + return length(cross(detail::tvec3(v0), detail::tvec3(v1))) < epsilon; + } + + template + GLM_FUNC_QUALIFIER bool areOrthogonal + ( + genType const & v0, + genType const & v1, + typename genType::value_type const & epsilon + ) + { + return abs(dot(v0, v1)) <= max( + typename genType::value_type(1), + length(v0)) * max( + typename genType::value_type(1), + length(v1)) * epsilon; + } + + template class vecType> + GLM_FUNC_QUALIFIER bool isNormalized + ( + vecType const & v, + genType const & epsilon + ) + { + return abs(length(v) - genType(1)) <= genType(2) * epsilon; + } + + template + GLM_FUNC_QUALIFIER bool isNull + ( + detail::tvec2 const & v, + valType const & epsilon + ) + { + return length(v) <= epsilon; + } + + template + GLM_FUNC_QUALIFIER bool isNull + ( + detail::tvec3 const & v, + valType const & epsilon + ) + { + return length(v) <= epsilon; + } + + template + GLM_FUNC_QUALIFIER bool isNull + ( + detail::tvec4 const & v, + valType const & epsilon + ) + { + return length(v) <= epsilon; + } + + template + GLM_FUNC_QUALIFIER bool isCompNull + ( + T const & s, + T const & epsilon + ) + { + return abs(s) < epsilon; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 isCompNull + ( + detail::tvec2 const & v, + T const & epsilon) + { + return detail::tvec2( + (abs(v.x) < epsilon), + (abs(v.y) < epsilon)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 isCompNull + ( + detail::tvec3 const & v, + T const & epsilon + ) + { + return detail::tvec3( + abs(v.x) < epsilon, + abs(v.y) < epsilon, + abs(v.z) < epsilon); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 isCompNull + ( + detail::tvec4 const & v, + T const & epsilon + ) + { + return detail::tvec4( + abs(v.x) < epsilon, + abs(v.y) < epsilon, + abs(v.z) < epsilon, + abs(v.w) < epsilon); + } + + template + GLM_FUNC_QUALIFIER bool areOrthonormal + ( + genType const & v0, + genType const & v1, + typename genType::value_type const & epsilon + ) + { + return isNormalized(v0, epsilon) && isNormalized(v1, epsilon) && (abs(dot(v0, v1)) <= epsilon); + } + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/verbose_operator.hpp b/include/gal/opengl/glm/gtx/verbose_operator.hpp new file mode 100644 index 0000000000..2afd39eb26 --- /dev/null +++ b/include/gal/opengl/glm/gtx/verbose_operator.hpp @@ -0,0 +1,83 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_verbose_operator +/// @file glm/gtx/verbose_operator.hpp +/// @date 2007-05-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_verbose_operator GLM_GTX_verbose_operator +/// @ingroup gtx +/// +/// @brief Use words to replace operators +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_verbose_operator +#define GLM_GTX_verbose_operator GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_verbose_operator extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_verbose_operator + /// @{ + + //! Addition of two values + //! From GLM_GTX_verbose_operator extension. + template + genTypeT add(genTypeT const & a, genTypeU const & b); + + //! Substration of two values + //! From GLM_GTX_verbose_operator extension. + template + genTypeT sub(genTypeT const & a, genTypeU const & b); + + //! Multiplication of two values + //! From GLM_GTX_verbose_operator extension. + template + genTypeT mul(genTypeT const & a, genTypeU const & b); + + //! Division of two values + //! From GLM_GTX_verbose_operator extension. + template + genTypeT div(genTypeT const & a, genTypeU const & b); + + //! Multiplication and addition of three values + //! From GLM_GTX_verbose_operator extension. + template + genTypeT mad(genTypeT const & a, genTypeU const & b, genTypeV const & c); + + /// @} +}// namespace glm + +#include "verbose_operator.inl" + +#endif//GLM_GTX_verbose_operator diff --git a/include/gal/opengl/glm/gtx/verbose_operator.inl b/include/gal/opengl/glm/gtx/verbose_operator.inl new file mode 100644 index 0000000000..a0936eb9ef --- /dev/null +++ b/include/gal/opengl/glm/gtx/verbose_operator.inl @@ -0,0 +1,124 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2006-04-20 +// Updated : 2008-09-29 +// Licence : This source is under MIT License +// File : glm/gtx/verbose_operator.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER genType add(genType const & a, genType const & b) + { + return a + b; + } + + template + GLM_FUNC_QUALIFIER genType sub(genType const & a, genType const & b) + { + return a - b; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x2 mul + ( + detail::tmat2x2 const & a, + detail::tmat2x2 const & b + ) + { + return a * b; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 mul + ( + detail::tmat3x3 const & a, + detail::tmat3x3 const & b + ) + { + return a * b; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 mul + ( + detail::tmat4x4 const & a, + detail::tmat4x4 const & b + ) + { + return a * b; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 mul + ( + detail::tmat2x2 const & m, + detail::tvec2 const & v + ) + { + return m * v; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 mul + ( + detail::tmat3x3 const & m, + detail::tvec3 const & v) + { + return m * v; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 mul + ( + detail::tmat4x4 const & m, + detail::tvec4 const & v + ) + { + return m * v; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 mul + ( + detail::tvec2 const & v, + detail::tmat2x2 const & m + ) + { + return v * m; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 mul + ( + detail::tvec3 const & v, + detail::tmat3x3 const & m + ) + { + return v * m; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 mul + ( + detail::tvec4 const & v, + detail::tmat4x4 const & m + ) + { + return v * m; + } + + template + GLM_FUNC_QUALIFIER genType div(genType const & a, genType const & b) + { + return a / b; + } + + template + GLM_FUNC_QUALIFIER genTypeT mad(genTypeT const & a, genTypeU const & b, genTypeV const & c) + { + return a * b + c; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/wrap.hpp b/include/gal/opengl/glm/gtx/wrap.hpp new file mode 100644 index 0000000000..057353c97f --- /dev/null +++ b/include/gal/opengl/glm/gtx/wrap.hpp @@ -0,0 +1,73 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_wrap +/// @file glm/gtx/wrap.hpp +/// @date 2009-11-25 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_wrap GLM_GTX_wrap +/// @ingroup gtx +/// +/// @brief Wrapping mode of texture coordinates. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_wrap +#define GLM_GTX_wrap GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_wrap extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_wrap + /// @{ + + //! Simulate GL_CLAMP OpenGL wrap mode + //! From GLM_GTX_wrap extension. + template + genType clamp(genType const & Texcoord); + + //! Simulate GL_REPEAT OpenGL wrap mode + //! From GLM_GTX_wrap extension. + template + genType repeat(genType const & Texcoord); + + //! Simulate GL_MIRROR_REPEAT OpenGL wrap mode + //! From GLM_GTX_wrap extension. + template + genType mirrorRepeat(genType const & Texcoord); + + /// @} +}// namespace glm + +#include "wrap.inl" + +#endif//GLM_GTX_wrap diff --git a/include/gal/opengl/glm/gtx/wrap.inl b/include/gal/opengl/glm/gtx/wrap.inl new file mode 100644 index 0000000000..cbb9d9830c --- /dev/null +++ b/include/gal/opengl/glm/gtx/wrap.inl @@ -0,0 +1,165 @@ +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2009-11-25 +// Updated : 2010-02-13 +// Licence : This source is under MIT License +// File : glm/gtx/wrap.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Dependency: +// - GLM core +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER genType clamp + ( + genType const & Texcoord + ) + { + return glm::clamp(Texcoord, genType(0), genType(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 clamp + ( + detail::tvec2 const & Texcoord + ) + { + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + Result[i] = clamp(Texcoord[i]); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 clamp + ( + detail::tvec3 const & Texcoord + ) + { + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + Result[i] = clamp(Texcoord[i]); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 clamp + ( + detail::tvec4 const & Texcoord + ) + { + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + Result[i] = clamp(Texcoord[i]); + return Result; + } + + //////////////////////// + // repeat + + template + GLM_FUNC_QUALIFIER genType repeat + ( + genType const & Texcoord + ) + { + return glm::fract(Texcoord); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 repeat + ( + detail::tvec2 const & Texcoord + ) + { + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + Result[i] = repeat(Texcoord[i]); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 repeat + ( + detail::tvec3 const & Texcoord + ) + { + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + Result[i] = repeat(Texcoord[i]); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 repeat + ( + detail::tvec4 const & Texcoord + ) + { + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + Result[i] = repeat(Texcoord[i]); + return Result; + } + + //////////////////////// + // mirrorRepeat + + template + GLM_FUNC_QUALIFIER genType mirrorRepeat + ( + genType const & Texcoord + ) + { + genType const Clamp = genType(int(glm::floor(Texcoord)) % 2); + genType const Floor = glm::floor(Texcoord); + genType const Rest = Texcoord - Floor; + genType const Mirror = Clamp + Rest; + + genType Out; + if(Mirror >= genType(1)) + Out = genType(1) - Rest; + else + Out = Rest; + return Out; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 mirrorRepeat + ( + detail::tvec2 const & Texcoord + ) + { + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + Result[i] = mirrorRepeat(Texcoord[i]); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 mirrorRepeat + ( + detail::tvec3 const & Texcoord + ) + { + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + Result[i] = mirrorRepeat(Texcoord[i]); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 mirrorRepeat + ( + detail::tvec4 const & Texcoord + ) + { + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + Result[i] = mirrorRepeat(Texcoord[i]); + return Result; + } +}//namespace glm diff --git a/include/gal/opengl/glm/virtrev/xstream.hpp b/include/gal/opengl/glm/virtrev/xstream.hpp new file mode 100644 index 0000000000..772f3726e2 --- /dev/null +++ b/include/gal/opengl/glm/virtrev/xstream.hpp @@ -0,0 +1,166 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref virtrev_xstream +/// @file glm/virtrev/xstream.hpp +/// @date 2008-05-24 / 2008-05-26 +/// @author Mathieu Roumillac (matrem84.free.fr) +/// +/// @see core (dependence) +/// @see gtc_matrix_access (dependence) +/// +/// @defgroup virtrev_xstream GLM_VIRTREV_xstream: xml like output +/// @ingroup virtrev +/// +/// @brief Streaming vector and matrix in a xml way. +/// +/// Include for this functionality. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_VIRTREV_xstream +#define GLM_VIRTREV_xstream GLM_VERSION + +#include "../glm.hpp" +#include "../gtc/matrix_access.hpp" +#include + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_VIRTREV_xstream extension included") +#endif +/* +namespace glm{ +namespace detail +{ + template + std::ostream & operator << (std::ostream & stream, glm::detail::tvec2 const & vec) + { + stream << ""; + + return stream; + } + + template + std::ostream & operator << (std::ostream & stream, glm::detail::tvec3 const & vec) + { + stream << ""; + + return stream; + } + + template + std::ostream & operator << (std::ostream & stream, glm::detail::tvec4 const & vec) + { + stream << ""; + + return stream; + } + + template + std::ostream & operator << (std::ostream & stream, glm::detail::tmat2x2 const & mat) + { + stream << "" << std::endl; + stream << "" << std::endl; + stream << "" << std::endl; + stream << ""; + + return stream; + } + + template + std::ostream & operator << (std::ostream & stream, glm::detail::tmat3x3 const & mat) + { + stream << "" << std::endl; + stream << "" << std::endl; + stream << "" << std::endl; + stream << "" << std::endl; + stream << ""; + + return stream; + } + + template + std::ostream & operator << (std::ostream & stream, glm::detail::tmat4x4 const & mat) + { + stream << "" << std::endl; + stream << "" << std::endl; + stream << "" << std::endl; + stream << "" << std::endl; + stream << "" << std::endl; + stream << ""; + + return stream; + } + +}//namespace detail +}//namespace glm +*/ +#endif//GLM_VIRTREV_xstream diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 75941ecacf..234a19c4ea 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -3,6 +3,8 @@ * * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * Copyright (C) 2013 CERN + * @author Maciej Suminski * * Graphics Abstraction Layer (GAL) for OpenGL * @@ -31,6 +33,10 @@ #include #include +// OpenGL mathematics library +#define GLM_FORCE_RADIANS +#include + // wxWidgets imports #include #include @@ -46,12 +52,6 @@ #include -#if defined(DEBUG) -#define D(x) x -#else -#define D(x) -#endif - namespace KiGfx { class SHADER; @@ -192,7 +192,8 @@ public: double GetLineWidth(); /// @copydoc GAL::SetLayerDepth() - virtual void SetLayerDepth( double aLayerDepth ){ + virtual void SetLayerDepth( double aLayerDepth ) + { super::SetLayerDepth( aLayerDepth ); } @@ -337,20 +338,25 @@ private: // Display lists GLuint displayListsArcs; ///< Arc display list + VBO_ITEM verticesArc; GLuint displayListCircle; ///< Circle display list + VBO_ITEM verticesCircle; GLuint displayListSemiCircle; ///< Semi circle display list + VBO_ITEM verticesSemiCircle; // Vertex buffer objects related fields std::deque vboItems; ///< Stores informations about VBO objects - VBO_ITEM* curVboItem; - GLuint curVboVertId; - GLuint curVboIndId; + VBO_ITEM* curVboItem; ///< Currently used VBO_ITEM (for grouping) + GLuint curVboVertId; ///< Currently used vertices VBO handle + GLuint curVboIndId; ///< Currently used indices VBO handle + int vboSize; ///< Amount of vertices stored in VBO + bool vboNeedsUpdate; ///< Flag indicating if VBO should be rebuilt + glm::mat4 transform; ///< Current transformation matrix + std::stack transformStack; ///< Stack of transformation matrices - int vboSize; - bool vboNeedsUpdate; - - double curvePoints[12]; ///< Coefficients for curves - std::deque unitCirclePoints; ///< List of the points on a unit circle + double curvePoints[12]; ///< Coefficients for curves + // FIXME to be removed: + std::deque unitCirclePoints; ///< List of the points on a unit circle // Polygon tesselation GLUtesselator* tesselator; ///< Pointer to the tesselator @@ -404,7 +410,7 @@ private: void computeUnitSemiCircle(); /// Compute the points of a unit arc. - void computeUnitArcs(); + // void computeUnitArcs(); // TODO not used // Event handling /** @@ -467,13 +473,20 @@ private: */ void deleteFrameBuffer( GLuint* aFrameBuffer, GLuint* aDepthBuffer, GLuint* aTexture ); - // TODO comment + /** + * @brief Initializes everything needed to use vertex buffer objects. + */ void initVertexBufferObjects(); - // TODO comment + /** + * @brief Deinitializes everything when vertex buffer objects are not used anymore. + */ void deleteVertexBufferObjects(); - // TODO comment + /** + * @brief Rebuilds vertex buffer object using stored VBO_ITEMS and sends it to + * the graphic card memory. + */ void rebuildVbo(); /** @@ -494,6 +507,30 @@ private: inline void drawLineCap( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aDepthOffset ); + /** + * @brief Function that replaces glTranslate and behaves according to isGrouping variable. + * In case isGrouping==false, it is simply glTranslate, in other case it + * modifies transformation matrix. + * + * @param aX is translation in X axis direction. + * @param aY is translation in Y axis direction. + * @param aZ is translation in Z axis direction. + */ + inline void translate3( double aX, double aY, double aZ ); + + /** + * @brief Function that replaces glColor and behaves according to isGrouping variable. + * In case isGrouping==false, it is simply glColor, in other case it + * modifies color used by current VBO_ITEM. + * + * @param aR is red component. + * @param aG is green component. + * @param aB is blue component. + * @param aA is alpha component. + */ + inline void color4( double aRed, double aGreen, double aBlue, double aAlpha ); + inline void color4( const COLOR4D& aColor ); + inline void selectShader( int aIndex ); /// @copydoc GAL::DrawRoundedSegment() diff --git a/include/gal/opengl/vbo_item.h b/include/gal/opengl/vbo_item.h index ca0f229c99..3fd97a33f6 100644 --- a/include/gal/opengl/vbo_item.h +++ b/include/gal/opengl/vbo_item.h @@ -33,6 +33,8 @@ #define VBO_ITEM_H_ #include +#include +#include namespace KiGfx { @@ -91,20 +93,50 @@ public: */ int GetOffset() const; + /** + * Function SetTransformMatrix() + * Sets transformation matrix for vertices that are added to VBO_ITEM. If you do not want to + * transform vertices at all, pass NULL as the argument. + * @param aMatrix is the new transform matrix or NULL if you do not want to use transformation + * matrix. + */ + void SetTransformMatrix( const glm::mat4* aMatrix ); + + /** + * Function ChangeColor() + * Colors all vertices to the specified color. + * @param aColor is the new color for vertices. + */ + void ChangeColor( const COLOR4D& aColor ); + + /** + * Function UseColor() + * Sets color used for all added vertices. + * @param aColor is the color used for added vertices. + */ + void UseColor( const COLOR4D& aColor ); + ///< Functions for getting VBO ids. //void SetVbo( int aVboId ); //int GetVbo() const; ///< Data organization information for vertices. - static const int VertStride = 7; - static const int VertSize = VertStride * sizeof(GLfloat); - static const int IndStride = 1; - static const int IndSize = IndStride * sizeof(GLuint); - static const int ColorOffset = 3 * sizeof(GLfloat); + // Each vertex consists of 7 floats + static const int VertStride = 7; + static const int VertSize = VertStride * sizeof(GLfloat); + + static const int IndStride = 1; + static const int IndSize = IndStride * sizeof(GLuint); + + // Offset of color data from the beginning of vertex data + static const int ColorOffset = 3; + static const int ColorByteOffset = ColorOffset * sizeof(GLfloat); + static const int ColorStride = 4; + static const int ColorSize = ColorStride * sizeof(GLfloat); private: ///< VBO ids in which the item is stored. - //int m_vboId; // not used yet + //int m_vboId; // not used yet ///< Contains vertices coordinates and colors. ///< Packed by 7 floats for each vertex: {X, Y, Z, R, G, B, A} @@ -121,8 +153,14 @@ private: int m_shader; int m_shaderAttrib; + ///< Color used for new vertices pushed. + GLfloat m_color[4]; + ///< Flag telling if the item should be recached in VBO or not. bool m_isDirty; + + ///< Current transform matrix for every new vertex pushed. + const glm::mat4* m_transform; }; } // namespace KiGfx diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index f8f7418a78..650cd53c7d 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -168,7 +168,7 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) // Load zones for( int i = 0; i < m_Pcb->GetAreaCount(); ++i ) { - view->Add( (KiGfx::VIEW_ITEM*) ( m_Pcb->GetArea( i ) ) ); + //view->Add( (KiGfx::VIEW_ITEM*) ( m_Pcb->GetArea( i ) ) ); } // Load drawings @@ -242,9 +242,9 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) view->SetTopLayer( m_Pcb->GetLayer() ); + view->RecacheAllItems( true ); if( m_galCanvasActive ) { - view->RecacheAllItems( true ); m_galCanvas->Refresh(); } } From 01775906994a94803c3c3413dcf8edd994bc50f2 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 16 May 2013 10:35:16 +0200 Subject: [PATCH 077/415] Faster way of caching items for OPENGL GAL. --- common/gal/opengl/opengl_gal.cpp | 1 + common/gal/opengl/vbo_item.cpp | 171 ++++++++++++++++++------------- include/gal/opengl/opengl_gal.h | 11 +- include/gal/opengl/vbo_item.h | 32 ++++-- pcbnew/basepcbframe.cpp | 2 +- 5 files changed, 135 insertions(+), 82 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index c66397b78f..c68ea182dc 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -511,6 +511,7 @@ void OPENGL_GAL::rebuildVbo() // Upload vertices coordinates and indices to GPU memory glBindBuffer( GL_ARRAY_BUFFER, curVboVertId ); glBufferData( GL_ARRAY_BUFFER, vboSize * VBO_ITEM::VertSize, verticesBuffer, GL_DYNAMIC_DRAW ); + glBindBuffer( GL_ARRAY_BUFFER, 0 ); glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, curVboIndId ); glBufferData( GL_ELEMENT_ARRAY_BUFFER, vboSize * VBO_ITEM::IndSize, diff --git a/common/gal/opengl/vbo_item.cpp b/common/gal/opengl/vbo_item.cpp index c44e32a056..8778780f59 100644 --- a/common/gal/opengl/vbo_item.cpp +++ b/common/gal/opengl/vbo_item.cpp @@ -40,11 +40,25 @@ VBO_ITEM::VBO_ITEM() : m_isDirty( true ), m_transform( NULL ) { + // Prepare a block for storing vertices & indices + useNewBlock(); } VBO_ITEM::~VBO_ITEM() { + if( m_isDirty ) + { + // Data is still stored in blocks + std::list::const_iterator v_it, v_end; + for( v_it = m_vertBlocks.begin(), v_end = m_vertBlocks.end(); v_it != v_end; ++v_it ) + delete[] *v_it; + + std::list::const_iterator i_it, i_end; + for( i_it = m_indBlocks.begin(), i_end = m_indBlocks.end(); i_it != i_end; ++i_it ) + delete[] *i_it; + } + if( m_vertices ) delete m_vertices; @@ -55,20 +69,11 @@ VBO_ITEM::~VBO_ITEM() void VBO_ITEM::PushVertex( const GLfloat* aVertex ) { - GLfloat* newVertices = new GLfloat[( m_size + 1 ) * VertStride]; - GLuint* newIndices = new GLuint[( m_size + 1 ) * IndStride]; - - // Handle a new vertex - if( m_vertices ) - { - // Copy all previous vertices data - memcpy( newVertices, m_vertices, m_size * VertSize ); - delete m_vertices; - } - m_vertices = newVertices; + if( m_spaceLeft == 0 ) + useNewBlock(); // Add the new vertex - memcpy( &newVertices[m_size * VertStride], aVertex, VertSize ); + memcpy( m_vertPtr, aVertex, VertSize ); if( m_transform != NULL ) { @@ -78,89 +83,45 @@ void VBO_ITEM::PushVertex( const GLfloat* aVertex ) glm::vec4 transVertex = *m_transform * origVertex; // Replace only coordinates, leave color as it is - memcpy( &newVertices[m_size * VertStride], &transVertex[0], 3 * sizeof(GLfloat) ); + memcpy( m_vertPtr, &transVertex[0], 3 * sizeof(GLfloat) ); } - // Handle a new index - if( m_indices ) - { - // Copy all previous vertices data - memcpy( newIndices, m_indices, m_size * IndSize ); - delete m_indices; - } - m_indices = newIndices; + // Move to the next free space + m_vertPtr += VertStride; - // Add the new vertex - m_indices[m_size] = m_offset + m_size; + // Add the new index + *m_indPtr = m_offset + m_size; + m_indPtr++; m_size++; m_isDirty = true; + m_spaceLeft--; } void VBO_ITEM::PushVertices( const GLfloat* aVertices, GLuint aSize ) { - int newSize = m_size + aSize; - GLfloat* newVertices = new GLfloat[newSize * VertStride]; - GLuint* newIndices = new GLuint[newSize * IndStride]; - - // Handle new vertices - if( m_vertices ) + for( unsigned int i = 0; i < aSize; ++i ) { - // Copy all previous vertices data - memcpy( newVertices, m_vertices, ( m_size ) * VertSize ); - delete m_vertices; + PushVertex( &aVertices[i * VertStride] ); } - m_vertices = newVertices; - - // Add new vertices - memcpy( &newVertices[m_size * VertStride], aVertices, aSize * VertSize ); - - if( m_transform != NULL ) - { - const GLfloat* vertexPtr = aVertices; - - for( unsigned int i = 0; i < aSize; ++i ) - { - // Apply transformations - // X, Y, Z coordinates - glm::vec4 origVertex( vertexPtr[0], vertexPtr[1], vertexPtr[2], 1.0f ); - glm::vec4 transVertex = *m_transform * origVertex; - - // Replace only coordinates, leave color as it is - memcpy( &newVertices[(m_size + i) * VertStride], &transVertex[0], 3 * sizeof(GLfloat) ); - - // Move on to the next vertex - vertexPtr += VertStride; - } - } - - // Handle new indices - if( m_indices ) - { - // Copy all previous vertices data - memcpy( newIndices, m_indices, ( m_size ) * IndSize ); - delete m_indices; - } - m_indices = newIndices; - - // Add the new vertex - for( int i = m_size; i < newSize; ++i ) - m_indices[i] = m_offset + i; - - m_size += aSize; - m_isDirty = true; } -GLfloat* VBO_ITEM::GetVertices() const +GLfloat* VBO_ITEM::GetVertices() { + if( m_isDirty ) + prepareFinal(); + return m_vertices; } -GLuint* VBO_ITEM::GetIndices() const +GLuint* VBO_ITEM::GetIndices() { + if( m_isDirty ) + prepareFinal(); + return m_indices; } @@ -202,6 +163,9 @@ void VBO_ITEM::SetTransformMatrix( const glm::mat4* aMatrix ) void VBO_ITEM::ChangeColor( const COLOR4D& aColor ) { + if( m_isDirty ) + prepareFinal(); + // Point to color of vertices GLfloat* vertexPtr = m_vertices + ColorOffset; const GLfloat newColor[] = { aColor.r, aColor.g, aColor.b, aColor.a }; @@ -237,3 +201,64 @@ int GetVbo() const { } */ + + +void VBO_ITEM::useNewBlock() +{ + GLfloat* newVertBlock = new GLfloat[BLOCK_SIZE * VertStride]; + GLuint* newIndBlock = new GLuint[BLOCK_SIZE]; + + m_vertPtr = newVertBlock; + m_indPtr = newIndBlock; + + m_vertBlocks.push_back( newVertBlock ); + m_indBlocks.push_back( newIndBlock ); + + m_spaceLeft = BLOCK_SIZE; +} + + +void VBO_ITEM::prepareFinal() +{ + if( m_vertices ) + delete m_vertices; + + // Allocate memory that would store all of vertices + m_vertices = new GLfloat[m_size * VertStride]; + // Set the pointer that will move along the buffer + GLfloat* vertPtr = m_vertices; + + // Copy blocks of vertices one after another to m_vertices + std::list::const_iterator v_it; + for( v_it = m_vertBlocks.begin(); *v_it != m_vertBlocks.back(); ++v_it ) + { + memcpy( vertPtr, *v_it, BLOCK_SIZE * VertSize ); + delete[] *v_it; + vertPtr += ( BLOCK_SIZE * VertStride ); + } + + // In the last block we need to copy only used vertices + memcpy( vertPtr, *v_it, ( BLOCK_SIZE - m_spaceLeft ) * VertSize ); + + if( m_indices ) + delete m_indices; + + // Allocate memory that would store all of indices + m_indices = new GLuint[m_size * IndStride]; + // Set the pointer that will move along the buffer + GLuint* indPtr = m_indices; + + // Copy blocks of indices one after another to m_indices + std::list::const_iterator i_it; + for( i_it = m_indBlocks.begin(); *i_it != m_indBlocks.back(); ++i_it ) + { + memcpy( indPtr, *i_it, BLOCK_SIZE * IndSize ); + delete[] *i_it; + indPtr += ( BLOCK_SIZE * IndStride ); + } + + // In the last block we need to copy only used indices + memcpy( indPtr, *i_it, ( BLOCK_SIZE - m_spaceLeft ) * IndSize ); + + m_isDirty = false; +} diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 234a19c4ea..eb52a1ecf3 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -448,7 +448,6 @@ private: * @brief Blit the main texture to the screen. * * @param aIsClearFrameBuffer if true, the frame buffer is cleared as well. - * */ void blitMainTexture( bool aIsClearFrameBuffer ); @@ -485,7 +484,7 @@ private: /** * @brief Rebuilds vertex buffer object using stored VBO_ITEMS and sends it to - * the graphic card memory. + * the graphics card memory. */ void rebuildVbo(); @@ -529,6 +528,14 @@ private: * @param aA is alpha component. */ inline void color4( double aRed, double aGreen, double aBlue, double aAlpha ); + + /** + * @brief Function that replaces glColor and behaves according to isGrouping variable. + * In case isGrouping==false, it is simply glColor, in other case it + * modifies color used by current VBO_ITEM. + * + * @param aColor is the new color. + */ inline void color4( const COLOR4D& aColor ); inline void selectShader( int aIndex ); diff --git a/include/gal/opengl/vbo_item.h b/include/gal/opengl/vbo_item.h index 3fd97a33f6..a7592ab6be 100644 --- a/include/gal/opengl/vbo_item.h +++ b/include/gal/opengl/vbo_item.h @@ -27,8 +27,6 @@ * @brief Class to handle an item held in a Vertex Buffer Object. */ -// TODO comments - #ifndef VBO_ITEM_H_ #define VBO_ITEM_H_ @@ -36,6 +34,8 @@ #include #include +#include + namespace KiGfx { @@ -68,9 +68,14 @@ public: * Returns a pointer to the array containing all vertices. * @return Pointer to vertices packed in format {X, Y, Z, R, G, B, A}. */ - GLfloat* GetVertices() const; + GLfloat* GetVertices(); - GLuint* GetIndices() const; + /** + * Function GetIndices() + * Returns a pointer to the array containing all indices of vertices. + * @return Pointer to indices. + */ + GLuint* GetIndices(); /** * Function GetSize() @@ -120,7 +125,7 @@ public: //void SetVbo( int aVboId ); //int GetVbo() const; - ///< Data organization information for vertices. + ///< Data organization information for vertices {X,Y,Z,R,G,B,A}. // Each vertex consists of 7 floats static const int VertStride = 7; static const int VertSize = VertStride * sizeof(GLfloat); @@ -128,7 +133,7 @@ public: static const int IndStride = 1; static const int IndSize = IndStride * sizeof(GLuint); - // Offset of color data from the beginning of vertex data + // Offset of color data from the beginning of each vertex data static const int ColorOffset = 3; static const int ColorByteOffset = ColorOffset * sizeof(GLfloat); static const int ColorStride = 4; @@ -145,6 +150,21 @@ private: ///< Indices of vertices GLuint* m_indices; + ///< Lists of blocks + std::list m_vertBlocks; + std::list m_indBlocks; + ///< Pointers to current blocks that can be used for storing data + GLfloat* m_vertPtr; + GLuint* m_indPtr; + ///< How many vertices can be stored in the current buffer + int m_spaceLeft; + ///< Number of vertices & indices stored in a single block + static const int BLOCK_SIZE = 8; + ///< Creates a new block for storing vertices data + void useNewBlock(); + ///< Prepares a continuous block of data that can be copied to graphics card buffer. + void prepareFinal(); + ///< Offset and size of data in VBO. int m_offset; int m_size; diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 650cd53c7d..69e740fffc 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -168,7 +168,7 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) // Load zones for( int i = 0; i < m_Pcb->GetAreaCount(); ++i ) { - //view->Add( (KiGfx::VIEW_ITEM*) ( m_Pcb->GetArea( i ) ) ); + view->Add( (KiGfx::VIEW_ITEM*) ( m_Pcb->GetArea( i ) ) ); } // Load drawings From a593306a06927b460805b71acb69340fdbbdb681 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 16 May 2013 13:46:00 +0200 Subject: [PATCH 078/415] Fixed time measuring functions (only for profiling in debug) --- common/profile.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/common/profile.h b/common/profile.h index d224152a89..32a5b2038a 100644 --- a/common/profile.h +++ b/common/profile.h @@ -24,8 +24,7 @@ /** * @file profile.h: - * @brief Simple profiling functions for measuring code execution time. Currently only Linux is - * supported. + * @brief Simple profiling functions for measuring code execution time. */ #ifndef __PROFILE_H @@ -91,20 +90,18 @@ static __inline__ unsigned long long rdtsc() // Fixme: OS X version /** * Function get_tics - * Returns the number of milliseconds that have elapsed since the system was started. - * @return uint64_t Number of milliseconds. + * Returns the number of microseconds that have elapsed since the system was started. + * @return uint64_t Number of microseconds. */ static inline uint64_t get_tics() { #if defined(__linux__) - struct timezone tz = { 0, 0 }; struct timeval tv; - gettimeofday( &tv, &tz ); + gettimeofday( &tv, NULL ); return (uint64_t) tv.tv_sec * 1000000ULL + (uint64_t) tv.tv_usec; #elif defined _WIN32 || defined _WIN64 - // TODO to be tested - return GetTickCount(); + return GetTickCount() * 1000; #else return 0; #endif @@ -125,7 +122,8 @@ struct prof_counter * Begins code execution time counting for a given profiling counter. * @param cnt is the counter which should be started. * @param use_rdtsc tells if processor's time-stamp counter should be used for time counting. - * Otherwise is system tics method will be used. + * Otherwise is system tics method will be used. IMPORTANT: time-stamp counter should not + * be used on multicore machines executing threaded code. */ static inline void prof_start( prof_counter* cnt, bool use_rdtsc ) { From b58cc107e62c53f8eb07783b77595a5cf5fb341b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 16 May 2013 14:47:34 +0200 Subject: [PATCH 079/415] Changed functions for adding vertices in VBO mode to make code easier to read and understand. --- common/gal/opengl/opengl_gal.cpp | 453 ++++++++----------------------- common/gal/opengl/vbo_item.cpp | 14 +- include/gal/opengl/opengl_gal.h | 20 ++ include/gal/opengl/vbo_item.h | 7 +- 4 files changed, 147 insertions(+), 347 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index c68ea182dc..8969a669e9 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -625,31 +625,15 @@ inline void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2 VECTOR2D v2 = aEndPoint + perpendicularVector; VECTOR2D v3 = aEndPoint - perpendicularVector; - if( isGrouping ) - { - const GLfloat newVertices[] = - { - v0.x, v0.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - v1.x, v1.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - v3.x, v3.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - v0.x, v0.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - v3.x, v3.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - v2.x, v2.y, layerDepth, strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a - }; - curVboItem->PushVertices( newVertices, 6 ); - } - else - { - glBegin( GL_TRIANGLES ); - glVertex3d( v0.x, v0.y, layerDepth ); - glVertex3d( v1.x, v1.y, layerDepth ); - glVertex3d( v3.x, v3.y, layerDepth ); + begin( GL_TRIANGLES ); + vertex3( v0.x, v0.y, layerDepth ); + vertex3( v1.x, v1.y, layerDepth ); + vertex3( v3.x, v3.y, layerDepth ); - glVertex3d( v0.x, v0.y, layerDepth ); - glVertex3d( v3.x, v3.y, layerDepth ); - glVertex3d( v2.x, v2.y, layerDepth ); - glEnd(); - } + vertex3( v0.x, v0.y, layerDepth ); + vertex3( v3.x, v3.y, layerDepth ); + vertex3( v2.x, v2.y, layerDepth ); + end(); } @@ -721,6 +705,34 @@ inline void OPENGL_GAL::drawLineCap( const VECTOR2D& aStartPoint, const VECTOR2D } +void OPENGL_GAL::begin( GLenum aMode ) +{ + if( !isGrouping ) + glBegin( aMode ); +} + + +void OPENGL_GAL::end() +{ + if( !isGrouping ) + glEnd(); +} + + +void OPENGL_GAL::vertex3( double aX, double aY, double aZ ) +{ + if( isGrouping ) + { + const GLfloat vertex[] = { aX, aY, aZ }; + curVboItem->PushVertex( vertex ); + } + else + { + glVertex3d( aX, aY, aZ ); + } +} + + void OPENGL_GAL::translate3( double aX, double aY, double aZ ) { if( isGrouping ) @@ -738,8 +750,7 @@ void OPENGL_GAL::color4( double aRed, double aGreen, double aBlue, double aAlpha { if( isGrouping ) { -// TODO not used - may be it is not useful at all, to be checked -// curVboItem->UseColor( COLOR4D( aRed, aGreen, aBlue, aAlpha ) ); + curVboItem->UseColor( COLOR4D( aRed, aGreen, aBlue, aAlpha ) ); } else { @@ -752,8 +763,7 @@ void OPENGL_GAL::color4( const COLOR4D& aColor ) { if( isGrouping ) { -// TODO not used - may be it is not useful at all, to be checked -// curVboItem->UseColor( aColor ); + curVboItem->UseColor( aColor ); } else { @@ -871,54 +881,24 @@ void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) // Now draw the fan SWAP( angle1, >, angle2 ); - if( !isGrouping ) - glBegin( GL_TRIANGLES ); + begin( GL_TRIANGLES ); for( double a = angle1; a < angle2; ) { // Compute vertices - double v0[] = { lastPoint.x, lastPoint.y }; - double v1[] = - { - lastPoint.x + adjust * sin( a ), - lastPoint.y - adjust * cos( a ) - }; + vertex3( lastPoint.x, lastPoint.y, layerDepth ); + vertex3( lastPoint.x + adjust * sin( a ), + lastPoint.y - adjust * cos( a ), layerDepth ); a += M_PI / 32; if(a > angle2) a = angle2; - double v2[] = - { - lastPoint.x + adjust * sin( a ), - lastPoint.y - adjust * cos( a ) - }; - - if( isGrouping ) - { - const GLfloat newVertices[] = - { - v0[0], v0[1], layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - - v1[0], v1[1], layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - - v2[0], v2[1], layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - }; - curVboItem->PushVertices( newVertices, 3 ); - } - else - { - glVertex3d( v0[0], v0[1], layerDepth ); - glVertex3d( v1[0], v1[1], layerDepth ); - glVertex3d( v2[0], v2[1], layerDepth ); - } + vertex3( lastPoint.x + adjust * sin( a ), + lastPoint.y - adjust * cos( a ), layerDepth ); } - if( !isGrouping ) - glEnd(); + end(); break; } @@ -942,29 +922,11 @@ void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) } // Insert a triangle at the joint to close the gap - if( isGrouping ) - { - const GLfloat newVertices[] = - { - edgePoint1.x, edgePoint1.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - - edgePoint2.x, edgePoint2.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - - lastPoint.x, lastPoint.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - }; - curVboItem->PushVertices( newVertices, 3 ); - } - else - { - glBegin( GL_TRIANGLES ); - glVertex3d( edgePoint1.x, edgePoint1.y, layerDepth ); - glVertex3d( edgePoint2.x, edgePoint2.y, layerDepth ); - glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); - glEnd(); - } + begin( GL_TRIANGLES ); + vertex3( edgePoint1.x, edgePoint1.y, layerDepth ); + vertex3( edgePoint2.x, edgePoint2.y, layerDepth ); + vertex3( lastPoint.x, lastPoint.y, layerDepth ); + end(); break; } @@ -1002,95 +964,32 @@ void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) VECTOR2D mp1 = point1 + ( limit / lineLengthA ) * lastStartEndVector; VECTOR2D mp2 = point3 - ( limit / lineLengthB ) * startEndVector; - if( isGrouping ) - { - const GLfloat newVertices[] = - { - lastPoint.x, lastPoint.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + begin( GL_TRIANGLES ); + vertex3( lastPoint.x, lastPoint.y, layerDepth ); + vertex3( point1.x, point1.y, layerDepth ); + vertex3( mp1.x, mp1.y, layerDepth ); - point1.x, point1.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + vertex3( lastPoint.x, lastPoint.y, layerDepth ); + vertex3( mp1.x, mp1.y, layerDepth ); + vertex3( mp2.x, mp2.y, layerDepth ); - mp1.x, mp1.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - - lastPoint.x, lastPoint.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - - mp1.x, mp1.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - - mp2.x, mp2.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - - lastPoint.x, lastPoint.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - - mp2.x, mp2.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - - point3.x, point3.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a - }; - curVboItem->PushVertices( newVertices, 9 ); - } - else - { - glBegin( GL_TRIANGLES ); - glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); - glVertex3d( point1.x, point1.y, layerDepth ); - glVertex3d( mp1.x, mp1.y, layerDepth ); - - glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); - glVertex3d( mp1.x, mp1.y, layerDepth ); - glVertex3d( mp2.x, mp2.y, layerDepth ); - - glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); - glVertex3d( mp2.x, mp2.y, layerDepth ); - glVertex3d( point3.x, point3.y, layerDepth ); - glEnd(); - } + vertex3( lastPoint.x, lastPoint.y, layerDepth ); + vertex3( mp2.x, mp2.y, layerDepth ); + vertex3( point3.x, point3.y, layerDepth ); + end(); } else { - if( isGrouping ) - { - const GLfloat newVertices[] = - { - lastPoint.x, lastPoint.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + // Insert two triangles for the mitered edge + begin( GL_TRIANGLES ); + vertex3( lastPoint.x, lastPoint.y, layerDepth ); + vertex3( point1.x, point1.y, layerDepth ); + vertex3( miterPoint.x, miterPoint.y, layerDepth ); - point1.x, point1.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - - miterPoint.x, miterPoint.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - - lastPoint.x, lastPoint.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - - miterPoint.x, miterPoint.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - - point3.x, point3.y, layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a - }; - curVboItem->PushVertices( newVertices, 6 ); - } - else - { - // Insert two triangles for the mitered edge - glBegin( GL_TRIANGLES ); - glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); - glVertex3d( point1.x, point1.y, layerDepth ); - glVertex3d( miterPoint.x, miterPoint.y, layerDepth ); - - glVertex3d( lastPoint.x, lastPoint.y, layerDepth ); - glVertex3d( miterPoint.x, miterPoint.y, layerDepth ); - glVertex3d( point3.x, point3.y, layerDepth ); - glEnd(); - } + vertex3( lastPoint.x, lastPoint.y, layerDepth ); + vertex3( miterPoint.x, miterPoint.y, layerDepth ); + vertex3( point3.x, point3.y, layerDepth ); + end(); } break; } @@ -1175,42 +1074,15 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn { color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - if( isGrouping ) - { - const GLfloat newVertices[] = - { - aStartPoint.x, aStartPoint.y, layerDepth, - fillColor.r, fillColor.g, fillColor.b, fillColor.a, + begin( GL_TRIANGLES ); + vertex3( aStartPoint.x, aStartPoint.y, layerDepth ); + vertex3( diagonalPointA.x, diagonalPointA.y, layerDepth ); + vertex3( aEndPoint.x, aEndPoint.y, layerDepth ); - diagonalPointA.x, diagonalPointA.y, layerDepth, - fillColor.r, fillColor.g, fillColor.b, fillColor.a, - - aEndPoint.x, aEndPoint.y, layerDepth, - fillColor.r, fillColor.g, fillColor.b, fillColor.a, - - aStartPoint.x, aStartPoint.y, layerDepth, - fillColor.r, fillColor.g, fillColor.b, fillColor.a, - - aEndPoint.x, aEndPoint.y, layerDepth, - fillColor.r, fillColor.g, fillColor.b, fillColor.a, - - diagonalPointB.x, diagonalPointB.y, layerDepth, - fillColor.r, fillColor.g, fillColor.b, fillColor.a - }; - curVboItem->PushVertices( newVertices, 6 ); - } - else - { - glBegin( GL_TRIANGLES ); - glVertex3d( aStartPoint.x, aStartPoint.y, layerDepth ); - glVertex3d( diagonalPointA.x, diagonalPointA.y, layerDepth ); - glVertex3d( aEndPoint.x, aEndPoint.y, layerDepth ); - - glVertex3d( aStartPoint.x, aStartPoint.y, layerDepth ); - glVertex3d( aEndPoint.x, aEndPoint.y, layerDepth ); - glVertex3d( diagonalPointB.x, diagonalPointB.y, layerDepth ); - glEnd(); - } + vertex3( aStartPoint.x, aStartPoint.y, layerDepth ); + vertex3( aEndPoint.x, aEndPoint.y, layerDepth ); + vertex3( diagonalPointB.x, diagonalPointB.y, layerDepth ); + end(); } // Restore the stroke color @@ -1257,8 +1129,7 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) translate3( aCenterPoint.x, aCenterPoint.y, 0.0 ); Scale( VECTOR2D( aRadius, aRadius ) ); - if( !isGrouping ) - glBegin( GL_TRIANGLES ); + begin( GL_TRIANGLES ); for( std::deque::const_iterator it = unitCirclePoints.begin(); it != unitCirclePoints.end(); it++ ) @@ -1268,44 +1139,16 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) double v2[] = { ( it + 1 )->x * innerScale, ( it + 1 )->y * innerScale }; double v3[] = { ( it + 1 )->x * outerScale, ( it + 1 )->y * outerScale }; - if( isGrouping ) - { - const GLfloat newVertices[] = - { - v0[0], v0[1], layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + vertex3( v0[0], v0[1], layerDepth ); + vertex3( v1[0], v1[1], layerDepth ); + vertex3( v2[0], v2[1], layerDepth ); - v1[0], v1[1], layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - - v2[0], v2[1], layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - - v1[0], v1[1], layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - - v3[0], v3[1], layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - - v2[0], v2[1], layerDepth, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a - }; - curVboItem->PushVertices( newVertices, 6 ); - } - else - { - glVertex3d( v0[0], v0[1], layerDepth ); - glVertex3d( v1[0], v1[1], layerDepth ); - glVertex3d( v2[0], v2[1], layerDepth ); - - glVertex3d( v1[0], v1[1], layerDepth ); - glVertex3d( v3[0], v3[1], layerDepth ); - glVertex3d( v2[0], v2[1], layerDepth ); - } + vertex3( v1[0], v1[1], layerDepth ); + vertex3( v3[0], v3[1], layerDepth ); + vertex3( v2[0], v2[1], layerDepth ); } - if( !isGrouping ) - glEnd(); + end(); Restore(); } @@ -1323,7 +1166,6 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) if( isGrouping ) { - verticesCircle.ChangeColor( fillColor ); curVboItem->PushVertices( verticesCircle.GetVertices(), verticesCircle.GetSize() ); } else @@ -1336,7 +1178,6 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) } -// This method is used for round line caps void OPENGL_GAL::drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle, double aDepthOffset ) { @@ -1347,8 +1188,6 @@ void OPENGL_GAL::drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, d if( isGrouping ) { - // Add vertices with a proper color - verticesSemiCircle.ChangeColor( strokeColor ); curVboItem->PushVertices( verticesSemiCircle.GetVertices(), verticesSemiCircle.GetSize() ); } else @@ -1427,8 +1266,7 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a double alphaIncrement = 2 * M_PI / CIRCLE_POINTS; color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); - if( !isGrouping ) - glBegin( GL_TRIANGLES ); + begin( GL_TRIANGLES ); for( double alpha = aStartAngle; alpha < aEndAngle; ) { @@ -1443,44 +1281,16 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a double v2[] = { cos( alpha ) * innerScale, sin( alpha ) * innerScale }; double v3[] = { cos( alpha ) * outerScale, sin( alpha ) * outerScale }; - if( isGrouping ) - { - const GLfloat newVertices[] = - { - v0[0], v0[1], 0.0f, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, + vertex3( v0[0], v0[1], 0.0 ); + vertex3( v1[0], v1[1], 0.0 ); + vertex3( v2[0], v2[1], 0.0 ); - v1[0], v1[1], 0.0f, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - - v2[0], v2[1], 0.0f, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - - v1[0], v1[1], 0.0f, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - - v3[0], v3[1], 0.0f, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a, - - v2[0], v2[1], 0.0f, - strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a - }; - curVboItem->PushVertices( newVertices, 6 ); - } - else - { - glVertex2d( v0[0], v0[1] ); - glVertex2d( v1[0], v1[1] ); - glVertex2d( v2[0], v2[1] ); - - glVertex2d( v1[0], v1[1] ); - glVertex2d( v3[0], v3[1] ); - glVertex2d( v2[0], v2[1] ); - } + vertex3( v1[0], v1[1], 0.0 ); + vertex3( v3[0], v3[1], 0.0 ); + vertex3( v2[0], v2[1], 0.0 ); } - if( !isGrouping ) - glEnd(); + end(); if( lineCap == LINE_CAP_ROUND ) { @@ -1496,57 +1306,20 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a double alpha; color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - if( !isGrouping ) + begin( GL_TRIANGLES ); + + for( alpha = aStartAngle; ( alpha + alphaIncrement ) < aEndAngle; ) { - glBegin( GL_TRIANGLES ); - - for( alpha = aStartAngle; ( alpha + alphaIncrement ) < aEndAngle; ) - { - glVertex2d( middlePoint.x, middlePoint.y ); - glVertex2d( cos( alpha ), sin( alpha ) ); - alpha += alphaIncrement; - glVertex2d( cos( alpha ), sin( alpha ) ); - } - - glVertex2d( middlePoint.x, middlePoint.y ); - glVertex2d( cos( alpha ), sin( alpha ) ); - glVertex2d( endPoint.x, endPoint.y ); - glEnd(); + vertex3( middlePoint.x, middlePoint.y, 0.0 ); + vertex3( cos( alpha ), sin( alpha ), 0.0 ); + alpha += alphaIncrement; + vertex3( cos( alpha ), sin( alpha ), 0.0 ); } - else - { - for( alpha = aStartAngle; ( alpha + alphaIncrement ) < aEndAngle; ) - { - const GLfloat v0[] = - { - middlePoint.x, middlePoint.y, 0.0f, fillColor.r, fillColor.g, fillColor.b, - fillColor.a - }; - const GLfloat v1[] = - { - cos( alpha ), sin( alpha ), 0.0f, fillColor.r, fillColor.g, fillColor.b, - fillColor.a - }; - alpha += alphaIncrement; - const GLfloat v2[] = - { - cos( alpha ), sin( alpha ), 0.0f, fillColor.r, fillColor.g, fillColor.b, - fillColor.a - }; - curVboItem->PushVertex( v0 ); - curVboItem->PushVertex( v1 ); - curVboItem->PushVertex( v2 ); - } - - const GLfloat newVertices[] = - { - middlePoint.x, middlePoint.y, 0.0f, fillColor.r, fillColor.g, fillColor.b, fillColor.a, - cos( alpha ), sin( alpha ), 0.0f, fillColor.r, fillColor.g, fillColor.b, fillColor.a, - endPoint.x, endPoint.y, 0.0f, fillColor.r, fillColor.g, fillColor.b, fillColor.a - }; - curVboItem->PushVertices( newVertices, 3 ); - } + vertex3( middlePoint.x, middlePoint.y, 0.0 ); + vertex3( cos( alpha ), sin( alpha ), 0.0 ); + vertex3( endPoint.x, endPoint.y, 0.0 ); + end(); } Restore(); @@ -1897,18 +1670,18 @@ void OPENGL_GAL::computeUnitCircle() // Insert in a display list and a vector for( int i = 0; i < CIRCLE_POINTS; i++ ) { - GLfloat v0[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; - GLfloat v1[] = + const GLfloat v0[] = { 0.0f, 0.0f, 0.0f }; + const GLfloat v1[] = { cos( 2.0 * M_PI / CIRCLE_POINTS * i ), // x sin( 2.0 * M_PI / CIRCLE_POINTS * i ), // y - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f // z & color + 0.0f // z }; - GLfloat v2[] = + const GLfloat v2[] = { cos( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), // x sin( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), // y - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f // z & color + 0.0f // z }; glVertex2d( 0, 0 ); @@ -1938,18 +1711,18 @@ void OPENGL_GAL::computeUnitSemiCircle() for( int i = 0; i < CIRCLE_POINTS / 2; ++i ) { - GLfloat v0[] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; + GLfloat v0[] = { 0.0f, 0.0f, 0.0f }; GLfloat v1[] = { cos( 2.0 * M_PI / CIRCLE_POINTS * i ), // x sin( 2.0 * M_PI / CIRCLE_POINTS * i ), // y - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f // z & color + 0.0f // z }; GLfloat v2[] = { cos( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), // x sin( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), // y - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f // z & color + 0.0f // z }; glVertex2d( 0, 0 ); diff --git a/common/gal/opengl/vbo_item.cpp b/common/gal/opengl/vbo_item.cpp index 8778780f59..c458dffccf 100644 --- a/common/gal/opengl/vbo_item.cpp +++ b/common/gal/opengl/vbo_item.cpp @@ -72,9 +72,6 @@ void VBO_ITEM::PushVertex( const GLfloat* aVertex ) if( m_spaceLeft == 0 ) useNewBlock(); - // Add the new vertex - memcpy( m_vertPtr, aVertex, VertSize ); - if( m_transform != NULL ) { // Apply transformations @@ -83,8 +80,16 @@ void VBO_ITEM::PushVertex( const GLfloat* aVertex ) glm::vec4 transVertex = *m_transform * origVertex; // Replace only coordinates, leave color as it is - memcpy( m_vertPtr, &transVertex[0], 3 * sizeof(GLfloat) ); + memcpy( m_vertPtr, &transVertex[0], CoordSize ); } + else + { + // Add the new vertex + memcpy( m_vertPtr, aVertex, CoordSize ); + } + + // Apply currently used color + memcpy( m_vertPtr + ColorOffset, m_color, ColorSize ); // Move to the next free space m_vertPtr += VertStride; @@ -180,7 +185,6 @@ void VBO_ITEM::ChangeColor( const COLOR4D& aColor ) } -// TODO it is not used yet void VBO_ITEM::UseColor( const COLOR4D& aColor ) { m_color[0] = aColor.r; diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index eb52a1ecf3..787ac2ce7f 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -506,6 +506,26 @@ private: inline void drawLineCap( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aDepthOffset ); + ///< OpenGL replacement functions (that are working both in immediate and VBO modes) + /** + * @brief Starts drawing in immediate mode or does nothing if an item's caching has started. + * @param aMode specifies the primitive or primitives that will be created. + */ + inline void begin( GLenum aMode ); + + /** + * @brief Ends drawing in immediate mode or does nothing if an item's caching has started. + */ + inline void end(); + + /** + * @brief Adds vertex to the current item or draws it in immediate mode. + * @param aX is X coordinate. + * @param aY is Y coordinate. + * @param aZ is Z coordinate. + */ + inline void vertex3( double aX, double aY, double aZ ); + /** * @brief Function that replaces glTranslate and behaves according to isGrouping variable. * In case isGrouping==false, it is simply glTranslate, in other case it diff --git a/include/gal/opengl/vbo_item.h b/include/gal/opengl/vbo_item.h index a7592ab6be..7d61b55f49 100644 --- a/include/gal/opengl/vbo_item.h +++ b/include/gal/opengl/vbo_item.h @@ -130,8 +130,8 @@ public: static const int VertStride = 7; static const int VertSize = VertStride * sizeof(GLfloat); - static const int IndStride = 1; - static const int IndSize = IndStride * sizeof(GLuint); + static const int CoordStride = 3; + static const int CoordSize = CoordStride * sizeof(GLfloat); // Offset of color data from the beginning of each vertex data static const int ColorOffset = 3; @@ -139,6 +139,9 @@ public: static const int ColorStride = 4; static const int ColorSize = ColorStride * sizeof(GLfloat); + static const int IndStride = 1; + static const int IndSize = IndStride * sizeof(GLuint); + private: ///< VBO ids in which the item is stored. //int m_vboId; // not used yet From 1d0ca225726bfaaef31eae1baabc2e0b9ff7d152 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 16 May 2013 17:17:35 +0200 Subject: [PATCH 080/415] Different way of measuring render time. --- common/drawpanel_gal.cpp | 17 +++++++++++++++++ common/view/view.cpp | 38 ++++---------------------------------- 2 files changed, 21 insertions(+), 34 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 7e8cf7acf6..e82f5f3553 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -39,6 +39,10 @@ #include #include +#ifdef __WXDEBUG__ +#include +#endif /* __WXDEBUG__ */ + #define METRIC_UNIT_LENGTH (1e9) @@ -116,6 +120,12 @@ void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent ) void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) { +#ifdef __WXDEBUG__ + prof_counter time; + + prof_start( &time, false ); +#endif /* __WXDEBUG__ */ + m_gal->BeginDrawing(); m_gal->SetBackgroundColor( KiGfx::COLOR4D( 0, 0, 0, 1.0 ) ); m_gal->ClearScreen(); @@ -129,6 +139,13 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) m_view->Redraw(); m_gal->EndDrawing(); + +#ifdef __WXDEBUG__ + prof_end( &time ); + + wxLogDebug( wxT( "EDA_DRAW_PANEL_GAL::Refresh: %.0f ms (%.0f fps)" ), + static_cast( time.value ) / 1000.0, 1000000.0 / static_cast( time.value ) ); +#endif /* __WXDEBUG__ */ } diff --git a/common/view/view.cpp b/common/view/view.cpp index 5e250373fe..26188e3d86 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -33,7 +33,9 @@ #include #include +#ifdef __WXDEBUG__ #include +#endif /* __WXDEBUG__ */ using namespace KiGfx; @@ -359,14 +361,12 @@ void VIEW::EnableTopLayer( bool aEnable ) struct VIEW::drawItem { drawItem( VIEW* aView, int aCurrentLayer ) : - count( 0 ), countCached( 0 ), currentLayer( aCurrentLayer ), time( 0 ), view( aView ) + currentLayer( aCurrentLayer ), view( aView ) { } void operator()( VIEW_ITEM* aItem ) { - BOX2I tmp; - uint64_t ts = rdtsc(); GAL* gal = view->GetGAL(); if( view->m_useGroups ) @@ -376,7 +376,6 @@ struct VIEW::drawItem if( group >= 0 && aItem->ViewIsVisible() ) { gal->DrawGroup( group ); - countCached++; } else { @@ -390,30 +389,15 @@ struct VIEW::drawItem { view->m_painter->Draw( static_cast( aItem ), currentLayer ); } - - time += rdtsc() - ts; - count++; } - int count; - int countCached; int currentLayer; - uint64_t time; VIEW* view; }; void VIEW::redrawRect( const BOX2I& aRect ) { - int totalItems = 0, totalCached = 0; - uint64_t totalDrawTime = 0; -#ifdef __WXDEBUG__ - prof_counter totalCycles, totalRealTime; - - prof_start( &totalRealTime, false ); - prof_start( &totalCycles, true ); -#endif /* __WXDEBUG__ */ - BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers ) { if( l->enabled ) @@ -421,25 +405,11 @@ void VIEW::redrawRect( const BOX2I& aRect ) drawItem drawFunc( this, l->id ); if( !m_useGroups ) - m_gal->SetLayerDepth( (double) l->renderingOrder ); + m_gal->SetLayerDepth( static_cast( l->renderingOrder ) ); l->items->Query( aRect, drawFunc ); l->isDirty = false; - - totalItems += drawFunc.count; - totalDrawTime += drawFunc.time; - totalCached += drawFunc.countCached; } } - -#ifdef __WXDEBUG__ - prof_end( &totalCycles ); - prof_end( &totalRealTime ); - - wxLogDebug( wxT( "Redraw::items %d (%d cached), %.1f ms/frame (%.0f FPS), draw/geometry ratio: %.1f%%" ), - totalItems, totalCached, (double) totalRealTime.value / 1000.0, - 1000000.0 / (double) totalRealTime.value, - (double) totalDrawTime / (double) totalCycles.value * 100.0 ); -#endif /* __WXDEBUG__ */ } From 7dec942ef7d21ddc31d58c92098725122811785f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 16 May 2013 18:43:25 +0200 Subject: [PATCH 081/415] Different way of rendering groups (with a single DrawElements call) in OpenGL GAL. --- common/gal/opengl/opengl_gal.cpp | 83 +++++++++++++++++--------------- include/gal/opengl/opengl_gal.h | 3 ++ include/gal/opengl/vbo_item.h | 4 +- 3 files changed, 50 insertions(+), 40 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 8969a669e9..a7b2f2e797 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -411,6 +411,10 @@ void OPENGL_GAL::BeginDrawing() // If any of VBO items is dirty - recache everything if( vboNeedsUpdate ) rebuildVbo(); + + // Clear indices buffer + itemsToDraw.clear(); + itemsToDrawSize = 0; } @@ -463,6 +467,41 @@ void OPENGL_GAL::blitMainTexture( bool aIsClearFrameBuffer ) void OPENGL_GAL::EndDrawing() { + // TODO Checking if we are using right VBOs, in other case do the binding. + // Right now there is only one VBO, so there is no problem. + + // Prepare buffers + glEnableClientState( GL_VERTEX_ARRAY ); + glEnableClientState( GL_COLOR_ARRAY ); + + // Bind vertices data buffer and point to the data + glBindBuffer( GL_ARRAY_BUFFER, curVboVertId ); + glVertexPointer( 3, GL_FLOAT, VBO_ITEM::VertSize, 0 ); + glColorPointer( 4, GL_FLOAT, VBO_ITEM::VertSize, (GLvoid*) VBO_ITEM::ColorByteOffset ); + + glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, curVboIndId ); + GLuint* indicesPtr = static_cast( glMapBuffer( GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY ) ); + + wxASSERT_MSG( indicesPtr != NULL, "OPENGL_GAL::EndDrawing: Could not map GPU memory" ); + + std::list::const_iterator it, end; + for( it = itemsToDraw.begin(), end = itemsToDraw.end(); it != end; ++it ) + { + memcpy( indicesPtr, (*it)->GetIndices(), (*it)->GetSize() * VBO_ITEM::IndSize ); + indicesPtr += (*it)->GetSize() * VBO_ITEM::IndStride; + } + + bool result = glUnmapBuffer( GL_ELEMENT_ARRAY_BUFFER ); + wxASSERT_MSG( result == TRUE, "OPENGL_GAL::EndDrawing: Unmapping indices buffer failed" ); + + glDrawElements( GL_TRIANGLES, itemsToDrawSize, GL_UNSIGNED_INT, (GLvoid*) 0 ); + glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 ); + glBindBuffer( GL_ARRAY_BUFFER, 0 ); + + // Deactivate vertex array + glDisableClientState( GL_COLOR_ARRAY ); + glDisableClientState( GL_VERTEX_ARRAY ); + // Draw the remaining contents, blit the main texture to the screen, swap the buffers glFlush(); blitMainTexture( true ); @@ -487,13 +526,11 @@ void OPENGL_GAL::rebuildVbo() prof_start( &totalTime, false ); #endif /* __WXDEBUG__ */ - // Buffers for storing cached items data + // Buffer for storing cached items data GLfloat* verticesBuffer = new GLfloat[VBO_ITEM::VertStride * vboSize]; - GLuint* indicesBuffer = new GLuint[vboSize]; - // Pointers for easier usage with memcpy + // Pointer for easier usage with memcpy GLfloat* verticesBufferPtr = verticesBuffer; - GLuint* indicesBufferPtr = indicesBuffer; // Fill out buffers with data for( std::deque::iterator vboItem = vboItems.begin(); @@ -503,9 +540,6 @@ void OPENGL_GAL::rebuildVbo() memcpy( verticesBufferPtr, (*vboItem)->GetVertices(), size * VBO_ITEM::VertSize ); verticesBufferPtr += size * VBO_ITEM::VertStride; - - memcpy( indicesBufferPtr, (*vboItem)->GetIndices(), size * VBO_ITEM::IndSize ); - indicesBufferPtr += size * VBO_ITEM::IndStride; } // Upload vertices coordinates and indices to GPU memory @@ -513,15 +547,12 @@ void OPENGL_GAL::rebuildVbo() glBufferData( GL_ARRAY_BUFFER, vboSize * VBO_ITEM::VertSize, verticesBuffer, GL_DYNAMIC_DRAW ); glBindBuffer( GL_ARRAY_BUFFER, 0 ); + // Allocate the biggest possible buffer for indices glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, curVboIndId ); - glBufferData( GL_ELEMENT_ARRAY_BUFFER, vboSize * VBO_ITEM::IndSize, - indicesBuffer, GL_DYNAMIC_DRAW ); + glBufferData( GL_ELEMENT_ARRAY_BUFFER, vboSize * VBO_ITEM::IndSize, NULL, GL_STREAM_DRAW ); glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 ); - // Remove temporary buffers delete[] verticesBuffer; - delete[] indicesBuffer; - vboNeedsUpdate = false; #ifdef __WXDEBUG__ @@ -1610,32 +1641,8 @@ void OPENGL_GAL::DeleteGroup( int aGroupNumber ) void OPENGL_GAL::DrawGroup( int aGroupNumber ) { - std::deque::iterator it = vboItems.begin(); - std::advance( it, aGroupNumber ); - - // TODO Checking if we are using right VBOs, in other case do the binding. - // Right now there is only one VBO, so there is no problem. - - glEnableClientState( GL_VERTEX_ARRAY ); - glEnableClientState( GL_COLOR_ARRAY ); - - // Bind vertices data buffer and point to the data - glBindBuffer( GL_ARRAY_BUFFER, curVboVertId ); - glVertexPointer( 3, GL_FLOAT, VBO_ITEM::VertSize, 0 ); - glColorPointer( 4, GL_FLOAT, VBO_ITEM::VertSize, (GLvoid*) VBO_ITEM::ColorByteOffset ); - glBindBuffer( GL_ARRAY_BUFFER, 0 ); - - // Bind indices data buffer - int size = (*it)->GetSize(); - int offset = (*it)->GetOffset(); - glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, curVboIndId ); - glDrawRangeElements( GL_TRIANGLES, 0, vboSize - 1, size, - GL_UNSIGNED_INT, (GLvoid*) ( offset * VBO_ITEM::IndSize ) ); - glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 ); - - // Deactivate vertex array - glDisableClientState( GL_COLOR_ARRAY ); - glDisableClientState( GL_VERTEX_ARRAY ); + itemsToDraw.push_back( vboItems[aGroupNumber] ); + itemsToDrawSize += vboItems[aGroupNumber]->GetSize(); } diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 787ac2ce7f..22bd697d28 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -353,6 +353,9 @@ private: bool vboNeedsUpdate; ///< Flag indicating if VBO should be rebuilt glm::mat4 transform; ///< Current transformation matrix std::stack transformStack; ///< Stack of transformation matrices + std::list itemsToDraw; ///< Stores items that are going to be + ///< drawn in the current frame + int itemsToDrawSize; ///< Number of indices to be drawn double curvePoints[12]; ///< Coefficients for curves // FIXME to be removed: diff --git a/include/gal/opengl/vbo_item.h b/include/gal/opengl/vbo_item.h index 7d61b55f49..bbc8919a57 100644 --- a/include/gal/opengl/vbo_item.h +++ b/include/gal/opengl/vbo_item.h @@ -126,8 +126,8 @@ public: //int GetVbo() const; ///< Data organization information for vertices {X,Y,Z,R,G,B,A}. - // Each vertex consists of 7 floats - static const int VertStride = 7; + // Each vertex consists of 7 floats, but it is padded to 8 + static const int VertStride = 8; static const int VertSize = VertStride * sizeof(GLfloat); static const int CoordStride = 3; From 31b722f9d345fe55a7fde9d09dba2d1fa3014736 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 27 May 2013 09:37:49 +0200 Subject: [PATCH 082/415] Added tesselation of polygons for VBO based rendering (OpenGL GAL). --- common/gal/opengl/opengl_gal.cpp | 56 ++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 14 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index a7b2f2e797..9c67bc22e3 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -1404,10 +1404,19 @@ void OPENGL_GAL::DrawPolygon( const std::deque& aPointList ) gluTessProperty( tesselator, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_POSITIVE ); glNormal3d( 0.0, 0.0, 1.0 ); - glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); glShadeModel( GL_FLAT ); - gluTessBeginPolygon( tesselator, NULL ); + if( isGrouping ) + { + // Store polygon triangles' coordinates to the current VBO item + gluTessBeginPolygon( tesselator, curVboItem ); + } + else + { + // Display polygons directly + gluTessBeginPolygon( tesselator, NULL ); + } gluTessBeginContour( tesselator ); // use operator=( const POINTS& ) @@ -1781,11 +1790,20 @@ void OPENGL_GAL::ComputeWorldScreenMatrix() // Compare Redbook Chapter 11 -void CALLBACK VertexCallback( GLvoid* aVertexPtr ) +void CALLBACK VertexCallback( GLvoid* aVertexPtr, void* aData ) { - GLdouble* vertex = (GLdouble*) aVertexPtr; + GLdouble* vertex = static_cast( aVertexPtr ); - glVertex3dv( vertex ); + if( aData ) + { + VBO_ITEM* vboItem = static_cast( aData ); + const GLfloat newVertex[] = { vertex[0], vertex[1], vertex[2] }; + vboItem->PushVertex( newVertex ); + } + else + { + glVertex3dv( vertex ); + } } @@ -1801,15 +1819,24 @@ void CALLBACK CombineCallback( GLdouble coords[3], } -void CALLBACK BeginCallback( GLenum aWhich ) +void CALLBACK EdgeCallback(void) { - glBegin( aWhich ); + // This callback is needed to force GLU tesselator to use triangles only + return; } -void CALLBACK EndCallback() +void CALLBACK BeginCallback( GLenum aWhich, void* aData ) { - glEnd(); + if( !aData ) + glBegin( aWhich ); +} + + +void CALLBACK EndCallback( void* aData ) +{ + if( !aData ) + glEnd(); } @@ -1824,11 +1851,12 @@ void CALLBACK ErrorCallback( GLenum aErrorCode ) void InitTesselatorCallbacks( GLUtesselator* aTesselator ) { - gluTessCallback( aTesselator, GLU_TESS_VERTEX, ( void (CALLBACK*)() )VertexCallback ); - gluTessCallback( aTesselator, GLU_TESS_COMBINE, ( void (CALLBACK*)() )CombineCallback ); - gluTessCallback( aTesselator, GLU_TESS_BEGIN, ( void (CALLBACK*)() )BeginCallback ); - gluTessCallback( aTesselator, GLU_TESS_END, ( void (CALLBACK*)() )EndCallback ); - gluTessCallback( aTesselator, GLU_TESS_ERROR, ( void (CALLBACK*)() )ErrorCallback ); + gluTessCallback( aTesselator, GLU_TESS_VERTEX_DATA, ( void (CALLBACK*)() )VertexCallback ); + gluTessCallback( aTesselator, GLU_TESS_COMBINE, ( void (CALLBACK*)() )CombineCallback ); + gluTessCallback( aTesselator, GLU_TESS_EDGE_FLAG, ( void (CALLBACK*)() )EdgeCallback ); + gluTessCallback( aTesselator, GLU_TESS_BEGIN_DATA, ( void (CALLBACK*)() )BeginCallback ); + gluTessCallback( aTesselator, GLU_TESS_END_DATA, ( void (CALLBACK*)() )EndCallback ); + gluTessCallback( aTesselator, GLU_TESS_ERROR_DATA, ( void (CALLBACK*)() )ErrorCallback ); } From 2912138ef2dee63cba0c3d475e233497fbf3c7de Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 3 Jun 2013 10:54:24 +0200 Subject: [PATCH 083/415] Display linking errors in debug mode for shaders. Added SHADER::GetAttribute() function for getting shaders attribute location. --- common/gal/opengl/shader.cpp | 27 ++++++++++++++++++++------- include/gal/opengl/shader.h | 11 ++++++++++- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/common/gal/opengl/shader.cpp b/common/gal/opengl/shader.cpp index e38fbe1995..6cbd84850d 100644 --- a/common/gal/opengl/shader.cpp +++ b/common/gal/opengl/shader.cpp @@ -168,23 +168,30 @@ void SHADER::ConfigureGeometryShader( GLuint maxVertices, GLuint geometryInputTy } -void SHADER::Link() +bool SHADER::Link() { // Shader linking glLinkProgram( programNumber ); ProgramInfo( programNumber ); // Check the Link state - GLint linkStatus = 0; - glGetObjectParameterivARB( programNumber, GL_OBJECT_LINK_STATUS_ARB, &linkStatus ); + glGetObjectParameterivARB( programNumber, GL_OBJECT_LINK_STATUS_ARB, (GLint*) &isShaderLinked ); - if( !linkStatus ) +#ifdef __WXDEBUG__ + if( !isShaderLinked ) { - wxLogError( wxString::FromUTF8( "Can't link the shaders!" ) ); - exit( 1 ); + int maxLength; + glGetProgramiv( programNumber, GL_INFO_LOG_LENGTH, &maxLength ); + maxLength = maxLength + 1; + char *linkInfoLog = new char[maxLength]; + glGetProgramInfoLog( programNumber, maxLength, &maxLength, linkInfoLog ); + std::cerr << "Shader linking error:" << std::endl; + std::cerr << linkInfoLog; + delete[] linkInfoLog; } +#endif /* __WXDEBUG__ */ - isShaderLinked = true; + return isShaderLinked; } @@ -215,3 +222,9 @@ void SHADER::SetParameter( int parameterNumber, float value ) { glUniform1f( parameterLocation[parameterNumber], value ); } + + +int SHADER::GetAttribute( std::string aAttributeName ) +{ + return glGetAttribLocation( programNumber, aAttributeName.c_str() ); +} diff --git a/include/gal/opengl/shader.h b/include/gal/opengl/shader.h index 97852c27d4..71fa03109f 100644 --- a/include/gal/opengl/shader.h +++ b/include/gal/opengl/shader.h @@ -80,8 +80,9 @@ public: /** * Link the shaders. + * @return true in case of success, false otherwise. */ - void Link(); + bool Link(); /** * Use the shader. @@ -122,6 +123,14 @@ public: */ void SetParameter( int aParameterNumber, float aValue ); + /** + * @brief Gets an attribute location. + * + * @param aAttributeName is the name of the attribute. + * @return the location. + */ + int GetAttribute( std::string aAttributeName ); + private: /** From 85a2aee79c0ce66f90d7fd3863e6ee151b2e2b5d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 4 Jun 2013 15:58:53 +0200 Subject: [PATCH 084/415] Introducing shaders. Shader's parameters are stored in VBO_ITEM. Changed VBO_ITEM data structure. Added UseShader() function for selecting shader for a given VBO_ITEM. Added one main vertex & fragment shader program to be used for with all kinds of items (type of shader is selected using attributes that are stored in VBO). Currently available shaders are: at-least-1px-width line, filled circle and stroked circle. Removed unnecessary param (aDepthOffset) from a few functions (OPENGL_GAL::drawSemiCircle(), OPENGL_GAL::drawLineCap()). Removed function OPENGL_GAL::DrawRoundedSegment(). Changed some asserts to debug info or error log. --- common/drawpanel_gal.cpp | 4 +- common/gal/opengl/opengl_gal.cpp | 574 ++++++++++-------- .../opengl/{shader/round.frag => shader.frag} | 49 +- .../opengl/{shader/line.vert => shader.vert} | 40 +- common/gal/opengl/shader/circle.frag | 60 -- common/gal/opengl/shader/circle.geom | 115 ---- common/gal/opengl/shader/circle.vert | 35 -- common/gal/opengl/shader/line.frag | 37 -- common/gal/opengl/shader/line.geom | 123 ---- common/gal/opengl/shader/round.vert | 37 -- common/gal/opengl/vbo_item.cpp | 46 +- include/gal/opengl/opengl_gal.h | 46 +- include/gal/opengl/vbo_item.h | 86 ++- pcbnew/pcbframe.cpp | 4 +- 14 files changed, 513 insertions(+), 743 deletions(-) rename common/gal/opengl/{shader/round.frag => shader.frag} (53%) rename common/gal/opengl/{shader/line.vert => shader.vert} (50%) delete mode 100644 common/gal/opengl/shader/circle.frag delete mode 100644 common/gal/opengl/shader/circle.geom delete mode 100644 common/gal/opengl/shader/circle.vert delete mode 100644 common/gal/opengl/shader/line.frag delete mode 100644 common/gal/opengl/shader/line.geom delete mode 100644 common/gal/opengl/shader/round.vert diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index e82f5f3553..390f919c1b 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -58,9 +58,9 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin wxStandardPaths paths; wxFileName executableFile( paths.GetExecutablePath() ); m_galShaderPath = std::string( ( executableFile.GetPath() + - wxT( "/../../common/gal/opengl/shader/" ) ).mb_str() ); + wxT( "/../../common/gal/opengl/" ) ).mb_str() ); - SwitchBackend( aGalType, false ); + SwitchBackend( aGalType, true ); SetBackgroundStyle( wxBG_STYLE_CUSTOM ); // Initial display settings diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 9c67bc22e3..c9d3987402 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -26,8 +26,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#include + #include -#include #include #include @@ -71,22 +72,20 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, isUseShader = isUseShaders; isShaderInitialized = false; isGrouping = false; - shaderPath = "../../common/gal/opengl/shader/"; + shaderPath = "../../common/gal/opengl"; wxSize parentSize = aParent->GetSize(); isVboInitialized = false; vboNeedsUpdate = false; curVboItem = NULL; vboSize = 0; - transform = glm::mat4( 1.0f ); + transform = glm::mat4( 1.0f ); // Identity matrix SetSize( parentSize ); screenSize.x = parentSize.x; screenSize.y = parentSize.y; - currentShader = -1; - // Set grid defaults SetGridColor( COLOR4D( 0.3, 0.3, 0.3, 0.3 ) ); SetCoarseGrid( 10 ); @@ -108,10 +107,13 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); #endif - // Compute the unit circles, used for speed up of the circle drawing - computeUnitCircle(); - computeUnitSemiCircle(); - // computeUnitArcs(); // TODO it is not used anywhere + if( !isUseShader ) + { + // Compute the unit circles, used for speed up of the circle drawing + computeUnitCircle(); + computeUnitSemiCircle(); + //computeUnitArcs(); // TODO remove? it is not used anywhere + } } @@ -346,18 +348,18 @@ void OPENGL_GAL::BeginDrawing() // Compile the shaders if( !isShaderInitialized && isUseShader ) { - std::string shaderNames[SHADER_NUMBER] = { std::string( "round" ) }; - - for( int i = 0; i < 1; i++ ) + shader.ConfigureGeometryShader( 3, GL_TRIANGLES, GL_TRIANGLES ); + shader.AddSource( shaderPath + std::string( "/shader.vert" ), SHADER_TYPE_VERTEX ); + shader.AddSource( shaderPath + std::string( "/shader.frag" ), SHADER_TYPE_FRAGMENT ); + if( !shader.Link() ) { - shaderList.push_back( SHADER() ); + wxLogFatalError( wxT( "Cannot link the shaders!" ) ); + } - shaderList[i].AddSource( shaderPath + std::string( "/" ) + shaderNames[i] + - std::string( ".frag" ), SHADER_TYPE_FRAGMENT ); - shaderList[i].AddSource( shaderPath + std::string( "/" ) + shaderNames[i] + - std::string( ".vert" ), SHADER_TYPE_VERTEX ); - - shaderList[i].Link(); + shaderAttrib = shader.GetAttribute( "attrShaderParams" ); + if( shaderAttrib == -1 ) + { + wxLogFatalError( wxT( "Could not get the shader attribute location" ) ); } isShaderInitialized = true; @@ -420,7 +422,8 @@ void OPENGL_GAL::BeginDrawing() void OPENGL_GAL::blitMainTexture( bool aIsClearFrameBuffer ) { - selectShader( -1 ); + shader.Deactivate(); + // Don't use blending for the final blitting glDisable( GL_BLEND ); @@ -474,25 +477,41 @@ void OPENGL_GAL::EndDrawing() glEnableClientState( GL_VERTEX_ARRAY ); glEnableClientState( GL_COLOR_ARRAY ); - // Bind vertices data buffer and point to the data + // Bind vertices data buffers glBindBuffer( GL_ARRAY_BUFFER, curVboVertId ); - glVertexPointer( 3, GL_FLOAT, VBO_ITEM::VertSize, 0 ); - glColorPointer( 4, GL_FLOAT, VBO_ITEM::VertSize, (GLvoid*) VBO_ITEM::ColorByteOffset ); + glVertexPointer( VBO_ITEM::CoordStride, GL_FLOAT, VBO_ITEM::VertByteSize, 0 ); + glColorPointer( VBO_ITEM::ColorStride, GL_FLOAT, VBO_ITEM::VertByteSize, + (GLvoid*) VBO_ITEM::ColorByteOffset ); + + // Shader parameters + if( isUseShader ) + { + shader.Use(); + glEnableVertexAttribArray( shaderAttrib ); + glVertexAttribPointer( shaderAttrib, VBO_ITEM::ShaderStride, GL_FLOAT, GL_FALSE, + VBO_ITEM::VertByteSize, (GLvoid*) VBO_ITEM::ShaderByteOffset ); + } glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, curVboIndId ); GLuint* indicesPtr = static_cast( glMapBuffer( GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY ) ); - wxASSERT_MSG( indicesPtr != NULL, "OPENGL_GAL::EndDrawing: Could not map GPU memory" ); + if( indicesPtr == NULL ) + { + wxLogError( wxT( "Could not map GPU memory" ) ); + } + // Copy indices of items that should be drawn to GPU memory std::list::const_iterator it, end; for( it = itemsToDraw.begin(), end = itemsToDraw.end(); it != end; ++it ) { - memcpy( indicesPtr, (*it)->GetIndices(), (*it)->GetSize() * VBO_ITEM::IndSize ); + memcpy( indicesPtr, (*it)->GetIndices(), (*it)->GetSize() * VBO_ITEM::IndByteSize ); indicesPtr += (*it)->GetSize() * VBO_ITEM::IndStride; } - bool result = glUnmapBuffer( GL_ELEMENT_ARRAY_BUFFER ); - wxASSERT_MSG( result == TRUE, "OPENGL_GAL::EndDrawing: Unmapping indices buffer failed" ); + if( !glUnmapBuffer( GL_ELEMENT_ARRAY_BUFFER ) ) + { + wxLogError( wxT( "Unmapping indices buffer failed" ) ); + } glDrawElements( GL_TRIANGLES, itemsToDrawSize, GL_UNSIGNED_INT, (GLvoid*) 0 ); glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 ); @@ -501,6 +520,11 @@ void OPENGL_GAL::EndDrawing() // Deactivate vertex array glDisableClientState( GL_COLOR_ARRAY ); glDisableClientState( GL_VERTEX_ARRAY ); + if( isUseShader ) + { + glDisableVertexAttribArray( shaderAttrib ); + shader.Deactivate(); + } // Draw the remaining contents, blit the main texture to the screen, swap the buffers glFlush(); @@ -538,18 +562,18 @@ void OPENGL_GAL::rebuildVbo() { int size = (*vboItem)->GetSize(); - memcpy( verticesBufferPtr, (*vboItem)->GetVertices(), size * VBO_ITEM::VertSize ); + memcpy( verticesBufferPtr, (*vboItem)->GetVertices(), size * VBO_ITEM::VertByteSize ); verticesBufferPtr += size * VBO_ITEM::VertStride; } - // Upload vertices coordinates and indices to GPU memory + // Upload vertices coordinates, shader types and indices to GPU memory glBindBuffer( GL_ARRAY_BUFFER, curVboVertId ); - glBufferData( GL_ARRAY_BUFFER, vboSize * VBO_ITEM::VertSize, verticesBuffer, GL_DYNAMIC_DRAW ); + glBufferData( GL_ARRAY_BUFFER, vboSize * VBO_ITEM::VertByteSize, verticesBuffer, GL_DYNAMIC_DRAW ); glBindBuffer( GL_ARRAY_BUFFER, 0 ); // Allocate the biggest possible buffer for indices glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, curVboIndId ); - glBufferData( GL_ELEMENT_ARRAY_BUFFER, vboSize * VBO_ITEM::IndSize, NULL, GL_STREAM_DRAW ); + glBufferData( GL_ELEMENT_ARRAY_BUFFER, vboSize * VBO_ITEM::IndByteSize, NULL, GL_STREAM_DRAW ); glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 ); delete[] verticesBuffer; @@ -558,112 +582,90 @@ void OPENGL_GAL::rebuildVbo() #ifdef __WXDEBUG__ prof_end( &totalTime ); - wxLogDebug( wxT( "Rebuilding VBO::items %d / %.1f ms" ), + wxLogDebug( wxT( "Rebuilding VBO::%d vertices / %.1f ms" ), vboSize, (double) totalTime.value / 1000.0 ); #endif /* __WXDEBUG__ */ } -inline void OPENGL_GAL::selectShader( int aIndex ) -{ - if( currentShader != aIndex ) - { - if( currentShader >= 0 ) - shaderList[currentShader].Deactivate(); - - if( aIndex >= 0 ) - shaderList[aIndex].Use(); - - currentShader = aIndex; - } -} - - -void OPENGL_GAL::drawRoundedSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, - double aWidth, bool aStroke, bool aGlBegin ) -{ - VECTOR2D l = ( aEndPoint - aStartPoint ); - double lnorm = l.EuclideanNorm(); - double aspect; - - if( l.x == 0 && l.y == 0 ) - { - l = VECTOR2D( aWidth / 2.0, 0.0 ); - aspect = 0.0; - } - else - { - l = l.Resize( aWidth / 2.0 ); - aspect = lnorm / (lnorm + aWidth); - } - - VECTOR2D p = l.Perpendicular(); - VECTOR2D corners[4] = { aStartPoint - l - p, aEndPoint + l - p, - aEndPoint + l + p, aStartPoint - l + p }; - - if( aStroke ) - { - color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); - } - else - { - color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - } - - selectShader( 0 ); - - if( aGlBegin ) - glBegin( GL_QUADS ); // shader - - glNormal3d( aspect, 0, 0 ); - glTexCoord2f( 0.0, 0.0 ); - glVertex3d( corners[0].x, corners[0].y, layerDepth ); - glNormal3d( aspect, 0, 0 ); - glTexCoord2f( 1.0, 0.0 ); - glVertex3d( corners[1].x, corners[1].y, layerDepth ); - glNormal3d( aspect, 0, 0 ); - glTexCoord2f( 1.0, 1.0 ); - glVertex3d( corners[2].x, corners[2].y, layerDepth ); - glNormal3d( aspect, 0, 0 ); - glTexCoord2f( 0.0, 1.0 ); - glVertex3d( corners[3].x, corners[3].y, layerDepth ); - - if( aGlBegin ) - glEnd(); -} - - inline void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { VECTOR2D startEndVector = aEndPoint - aStartPoint; double lineLength = startEndVector.EuclideanNorm(); + double scale = 0.5 * lineWidth / lineLength; - // Limit the width of the line to a minimum of one pixel - // this looks best without anti-aliasing - // XXX Should be improved later. - double scale = 0.5 * lineWidth / lineLength; - double scale1pix = 0.5001 / worldScale / lineLength; - if( lineWidth * worldScale < 1.0002 && !isGrouping ) +#ifdef __WXDEBUG__ + if( lineLength > 0.0 ) { - scale = scale1pix; + wxLogDebug( wxT( "Tried to draw line with length <= 0" ) ); + } +#endif /* __WXDEBUG__ */ + + if( lineLength <= 0.0 ) + return; + + if( lineWidth * worldScale < 1.0002 && !isGrouping && !isUseShader ) + { + // Limit the width of the line to a minimum of one pixel + // this looks best without anti-aliasing + scale = 0.5001 / worldScale / lineLength; } VECTOR2D perpendicularVector( -startEndVector.y * scale, startEndVector.x * scale ); - // Compute the edge points of the line - VECTOR2D v0 = aStartPoint + perpendicularVector; - VECTOR2D v1 = aStartPoint - perpendicularVector; - VECTOR2D v2 = aEndPoint + perpendicularVector; - VECTOR2D v3 = aEndPoint - perpendicularVector; - begin( GL_TRIANGLES ); - vertex3( v0.x, v0.y, layerDepth ); - vertex3( v1.x, v1.y, layerDepth ); - vertex3( v3.x, v3.y, layerDepth ); - vertex3( v0.x, v0.y, layerDepth ); - vertex3( v3.x, v3.y, layerDepth ); - vertex3( v2.x, v2.y, layerDepth ); + if( isUseShader ) + { + glm::vec4 vector( perpendicularVector.x, perpendicularVector.y, 0.0, 0.0 ); + + // If transform stack is not empty, then it means that + // there is a transformation matrix that has to be applied + if( !transformStack.empty() ) + { + vector = transform * vector; + } + else + { + glm::vec4 vector( perpendicularVector.x, perpendicularVector.y, 0.0, 0.0 ); + } + + // Line width is maintained by the vertex shader + setShader( SHADER_LINE, vector.x, vector.y, lineWidth ); + vertex3( aStartPoint.x, aStartPoint.y, layerDepth ); // v0 + + setShader( SHADER_LINE, -vector.x, -vector.y, lineWidth ); + vertex3( aStartPoint.x, aStartPoint.y, layerDepth ); // v1 + + setShader( SHADER_LINE, -vector.x, -vector.y, lineWidth ); + vertex3( aEndPoint.x, aEndPoint.y, layerDepth ); // v3 + + setShader( SHADER_LINE, vector.x, vector.y, lineWidth ); + vertex3( aStartPoint.x, aStartPoint.y, layerDepth ); // v0 + + setShader( SHADER_LINE, -vector.x, -vector.y, lineWidth ); + vertex3( aEndPoint.x, aEndPoint.y, layerDepth ); // v3 + + setShader( SHADER_LINE, vector.x, vector.y, lineWidth ); + vertex3( aEndPoint.x, aEndPoint.y, layerDepth ); // v2 + } + else + { + // Compute the edge points of the line + VECTOR2D v0 = aStartPoint + perpendicularVector; + VECTOR2D v1 = aStartPoint - perpendicularVector; + VECTOR2D v2 = aEndPoint + perpendicularVector; + VECTOR2D v3 = aEndPoint - perpendicularVector; + + vertex3( v0.x, v0.y, layerDepth ); + vertex3( v1.x, v1.y, layerDepth ); + vertex3( v3.x, v3.y, layerDepth ); + + vertex3( v0.x, v0.y, layerDepth ); + vertex3( v3.x, v3.y, layerDepth ); + vertex3( v2.x, v2.y, layerDepth ); + } + end(); } @@ -676,15 +678,17 @@ void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndP if( isFillEnabled ) { + // Filled tracks color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); SetLineWidth( aWidth ); - drawSemiCircle( aStartPoint, aWidth / 2, lineAngle + M_PI / 2, layerDepth ); - drawSemiCircle( aEndPoint, aWidth / 2, lineAngle - M_PI / 2, layerDepth ); + drawSemiCircle( aStartPoint, aWidth / 2, lineAngle + M_PI / 2 ); + drawSemiCircle( aEndPoint, aWidth / 2, lineAngle - M_PI / 2 ); drawLineQuad( aStartPoint, aEndPoint ); } else { + // Outlined tracks double lineLength = startEndVector.EuclideanNorm(); color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); @@ -700,16 +704,15 @@ void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndP drawLineQuad( VECTOR2D( 0.0, -aWidth / 2.0 ), VECTOR2D( lineLength, -aWidth / 2.0 ) ); - DrawArc( VECTOR2D( 0.0, 0.0 ), aWidth / 2.0, M_PI / 2.0, 3.0 * M_PI / 2.0 ); - DrawArc( VECTOR2D( lineLength, 0.0 ), aWidth / 2.0, M_PI / 2.0, -M_PI / 2.0 ); + drawSemiCircle( VECTOR2D( 0.0, 0.0 ), aWidth / 2, M_PI / 2 ); + drawSemiCircle( VECTOR2D( lineLength, 0.0 ), aWidth / 2, -M_PI / 2 ); Restore(); } } -inline void OPENGL_GAL::drawLineCap( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, - double aDepthOffset ) +inline void OPENGL_GAL::drawLineCap( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { VECTOR2D startEndVector = aEndPoint - aStartPoint; // double lineLength = startEndVector.EuclideanNorm(); @@ -723,7 +726,7 @@ inline void OPENGL_GAL::drawLineCap( const VECTOR2D& aStartPoint, const VECTOR2D case LINE_CAP_ROUND: // Add a semicircle at the line end - drawSemiCircle( aStartPoint, lineWidth / 2, lineAngle + M_PI / 2, aDepthOffset ); + drawSemiCircle( aStartPoint, lineWidth / 2, lineAngle + M_PI / 2 ); break; case LINE_CAP_SQUARED: @@ -754,6 +757,7 @@ void OPENGL_GAL::vertex3( double aX, double aY, double aZ ) { if( isGrouping ) { + // New vertex coordinates for VBO const GLfloat vertex[] = { aX, aY, aZ }; curVboItem->PushVertex( vertex ); } @@ -805,31 +809,46 @@ void OPENGL_GAL::color4( const COLOR4D& aColor ) void OPENGL_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { - if( isUseShader ) + if( isFillEnabled ) { - drawRoundedSegment( aStartPoint, aEndPoint, lineWidth, true, true ); - } - else - { - VECTOR2D startEndVector = aEndPoint - aStartPoint; - double lineLength = startEndVector.EuclideanNorm(); - if( lineLength > 0.0 ) - { - color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - drawLineCap( aStartPoint, aEndPoint, layerDepth ); - drawLineCap( aEndPoint, aStartPoint, layerDepth ); - drawLineQuad( aStartPoint, aEndPoint ); - } + drawLineCap( aStartPoint, aEndPoint ); + drawLineCap( aEndPoint, aStartPoint ); + drawLineQuad( aStartPoint, aEndPoint ); + } + + if( isStrokeEnabled ) + { + // TODO outline mode + color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + + drawLineCap( aStartPoint, aEndPoint ); + drawLineCap( aEndPoint, aStartPoint ); + drawLineQuad( aStartPoint, aEndPoint ); } } void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) { - LineCap savedLineCap = lineCap; - bool isFirstPoint = true; + + if( isUseShader ) + { + // This method reduces amount of triangles used for drawing + std::deque::const_iterator it = aPointList.begin(); + + // Start from the second point + for( it++; it != aPointList.end(); it++ ) + { + DrawLine( *( it - 1 ), *it ); + } + + return; + } + + LineCap savedLineCap = lineCap; bool isFirstLine = true; VECTOR2D startEndVector; VECTOR2D lastStartEndVector; @@ -854,7 +873,7 @@ void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) if( isFirstLine ) { - drawLineCap( lastPoint, actualPoint, layerDepth ); + drawLineCap( lastPoint, actualPoint ); isFirstLine = false; } else @@ -1029,7 +1048,7 @@ void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) if( it == aPointList.end() - 1 ) { - drawLineCap( actualPoint, lastPoint, layerDepth ); + drawLineCap( actualPoint, lastPoint ); } drawLineQuad( lastPoint, *it ); @@ -1050,47 +1069,11 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn VECTOR2D diagonalPointA( aEndPoint.x, aStartPoint.y ); VECTOR2D diagonalPointB( aStartPoint.x, aEndPoint.y ); - if( isUseShader ) - { - if( isFillEnabled ) - { - selectShader( 0 ); - glColor4d( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - glBegin( GL_QUADS ); // shader - glNormal3d( 1.0, 0, 0 ); - glTexCoord2f( 0.0, 0.0 ); - glVertex3d( aStartPoint.x, aStartPoint.y, layerDepth ); - glNormal3d( 1.0, 0, 0 ); - glTexCoord2f( 1.0, 0.0 ); - glVertex3d( diagonalPointA.x, diagonalPointA.y, layerDepth ); - glNormal3d( 1.0, 0, 0 ); - glTexCoord2f( 1.0, 1.0 ); - glVertex3d( aEndPoint.x, aEndPoint.y, layerDepth ); - glNormal3d( 1.0, 0, 0 ); - glTexCoord2f( 0.0, 1.0 ); - glVertex3d( diagonalPointB.x, diagonalPointB.y, layerDepth ); - glEnd(); - } - - if( isStrokeEnabled ) - { - glBegin( GL_QUADS ); // shader - drawRoundedSegment( aStartPoint, diagonalPointA, lineWidth, true, false ); - drawRoundedSegment( aEndPoint, diagonalPointA, lineWidth, true, false ); - drawRoundedSegment( aStartPoint, diagonalPointB, lineWidth, true, false ); - drawRoundedSegment( aEndPoint, diagonalPointB, lineWidth, true, false ); - glEnd(); - } - - return; - } - - selectShader( -1 ); - // Stroke the outline if( isStrokeEnabled ) { color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + std::deque pointList; pointList.push_back( aStartPoint ); pointList.push_back( diagonalPointA ); @@ -1103,6 +1086,7 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn // Fill the rectangle if( isFillEnabled ) { + setShader( SHADER_NONE ); color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); begin( GL_TRIANGLES ); @@ -1115,23 +1099,74 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn vertex3( diagonalPointB.x, diagonalPointB.y, layerDepth ); end(); } - - // Restore the stroke color - color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); } void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) { - // We need a minimum radius, else simply don't draw the circle - if( aRadius <= 0.0 ) +#ifdef __WXDEBUG__ + if( aRadius > 0.0 ) { - return; + wxLogDebug( wxT( "Tried to draw circle with radius <= 0" ) ); } +#endif /* __WXDEBUG__ */ if( isUseShader ) { - drawRoundedSegment( aCenterPoint, aCenterPoint, aRadius * 2.0, false, true ); + if( isFillEnabled ) + { + color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + + /* Draw a triangle that contains the circle, then shade it leaving only the circle. + Parameters given to setShader are relative coordinates of the triangle's vertices. + Shader uses this coordinates to determine if fragments are inside the circle or not. + v2 + /\ + //\\ + v0 /_\/_\ v1 + */ + setShader( SHADER_FILLED_CIRCLE, -sqrt( 3.0f ), -1.0f ); + vertex3( aCenterPoint.x - aRadius * sqrt( 3.0f ), // v0 + aCenterPoint.y - aRadius, layerDepth ); + + setShader( SHADER_FILLED_CIRCLE, sqrt( 3.0f ), -1.0f ); + vertex3( aCenterPoint.x + aRadius * sqrt( 3.0f ), // v1 + aCenterPoint.y - aRadius, layerDepth ); + + setShader( SHADER_FILLED_CIRCLE, 0.0f, 2.0f ); + vertex3( aCenterPoint.x, aCenterPoint.y + aRadius * 2.0f, layerDepth ); // v2 + } + + if( isStrokeEnabled ) + { + color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + + /* Draw a triangle that contains the circle, then shade it leaving only the circle. + Parameters given to setShader are relative coordinates of the triangle's vertices + and the line width. Shader uses this coordinates to determine if fragments are inside + the circle or not. Width parameter has to be passed as a relative value. + v2 + /\ + //\\ + v0 /_\/_\ v1 + */ + float outerRadius = aRadius + ( lineWidth / 2.0f ); + float innerRadius = aRadius - ( lineWidth / 2.0f ); + float relWidth = innerRadius / outerRadius; + + setShader( SHADER_STROKED_CIRCLE, -sqrt( 3.0f ), -1.0f, relWidth ); + vertex3( aCenterPoint.x - outerRadius * sqrt( 3.0f ), // v0 + aCenterPoint.y - outerRadius, layerDepth ); + + setShader( SHADER_STROKED_CIRCLE, sqrt( 3.0f ), -1.0f, relWidth ); + vertex3( aCenterPoint.x + outerRadius * sqrt( 3.0f ), // v1 + aCenterPoint.y - outerRadius, layerDepth ); + + setShader( SHADER_STROKED_CIRCLE, 0.0f, 2.0f, relWidth ); + vertex3( aCenterPoint.x, // v2 + aCenterPoint.y + outerRadius * 2.0f, layerDepth ); + } + return; } @@ -1142,12 +1177,6 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) outerScale += 1.0; innerScale += 1.0; - if( isUseShader ) - { - // TODO is it ever reached? - innerScale *= 1.0 / cos( M_PI / CIRCLE_POINTS ); - } - if( isStrokeEnabled ) { if( innerScale < outerScale ) @@ -1209,24 +1238,53 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) } -void OPENGL_GAL::drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle, - double aDepthOffset ) +void OPENGL_GAL::drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ) { - Save(); - translate3( aCenterPoint.x, aCenterPoint.y, aDepthOffset ); - Scale( VECTOR2D( aRadius, aRadius ) ); - Rotate( aAngle ); - - if( isGrouping ) + if( isUseShader ) { - curVboItem->PushVertices( verticesSemiCircle.GetVertices(), verticesSemiCircle.GetSize() ); + Save(); + Translate( aCenterPoint ); + Rotate( aAngle ); + + color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + + /* Draw a triangle that contains the semicircle, then shade it to leave only the semicircle. + Parameters given to setShader are relative coordinates of the triangle's vertices. + Shader uses this coordinates to determine if fragments are inside the semicircle or not. + v2 + /\ + /__\ + v0 //__\\ v1 + */ + setShader( SHADER_FILLED_CIRCLE, -3.0f / sqrt( 3.0f ), 0.0f, lineWidth ); + vertex3( -aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 + + setShader( SHADER_FILLED_CIRCLE, 3.0f / sqrt( 3.0f ), 0.0f, lineWidth ); + vertex3( aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 + + setShader( SHADER_FILLED_CIRCLE, 0.0f, 2.0f, lineWidth ); + vertex3( 0.0f, aRadius * 2.0f, layerDepth ); // v2 + + Restore(); } else { - glCallList( displayListSemiCircle ); - } + Save(); + translate3( aCenterPoint.x, aCenterPoint.y, layerDepth ); + Scale( VECTOR2D( aRadius, aRadius ) ); + Rotate( aAngle ); - Restore(); + if( isGrouping ) + { + curVboItem->PushVertices( verticesSemiCircle.GetVertices(), verticesSemiCircle.GetSize() ); + } + else + { + glCallList( displayListSemiCircle ); + } + + Restore(); + } } @@ -1239,12 +1297,6 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a return; } - double outerScale = lineWidth / aRadius / 2; - double innerScale = -outerScale; - - outerScale += 1.0; - innerScale += 1.0; - // Swap the angles, if start angle is greater than end angle SWAP( aStartAngle, >, aEndAngle ); @@ -1254,46 +1306,37 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a VECTOR2D middlePoint = 0.5 * startEndPoint; Save(); - translate3( aCenterPoint.x, aCenterPoint.y, layerDepth ); - Scale( VECTOR2D( aRadius, aRadius ) ); + translate3( aCenterPoint.x, aCenterPoint.y, 0.0 ); if( isStrokeEnabled ) { if( isUseShader ) { - int n_points_s = (int) ( aRadius * worldScale ); - int n_points_a = (int) ( ( aEndAngle - aStartAngle ) / - (double) ( 2.0 * M_PI / CIRCLE_POINTS ) ); + double alphaIncrement = 2.0 * M_PI / CIRCLE_POINTS; + color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); - if( n_points_s < 4 ) - n_points_s = 4; - - int n_points = std::min( n_points_s, n_points_a ); - - if( n_points > CIRCLE_POINTS ) - n_points = CIRCLE_POINTS; - - double alphaIncrement = ( aEndAngle - aStartAngle ) / n_points; - - double cosI = cos( alphaIncrement ); - double sinI = sin( alphaIncrement ); - - VECTOR2D p( cos( aStartAngle ), sin( aStartAngle ) ); - - glBegin( GL_QUADS ); // shader - - for( int i = 0; i < n_points; i++ ) + VECTOR2D p( cos( aStartAngle ) * aRadius, sin( aStartAngle ) * aRadius ); + for( double alpha = aStartAngle; alpha < aEndAngle; alpha += alphaIncrement ) { - VECTOR2D p_next( p.x * cosI - p.y * sinI, p.x * sinI + p.y * cosI ); + if( alpha > aEndAngle ) + alpha = aEndAngle; + + VECTOR2D p_next( cos( alpha ) * aRadius, sin( alpha ) * aRadius ); + DrawLine( p, p_next ); - drawRoundedSegment( p, p_next, lineWidth / aRadius, true, false ); p = p_next; } - - glEnd(); } else { + Scale( VECTOR2D( aRadius, aRadius ) ); + + double outerScale = lineWidth / aRadius / 2; + double innerScale = -outerScale; + + outerScale += 1.0; + innerScale += 1.0; + double alphaIncrement = 2 * M_PI / CIRCLE_POINTS; color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); @@ -1312,21 +1355,21 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a double v2[] = { cos( alpha ) * innerScale, sin( alpha ) * innerScale }; double v3[] = { cos( alpha ) * outerScale, sin( alpha ) * outerScale }; - vertex3( v0[0], v0[1], 0.0 ); - vertex3( v1[0], v1[1], 0.0 ); - vertex3( v2[0], v2[1], 0.0 ); + vertex3( v0[0], v0[1], layerDepth ); + vertex3( v1[0], v1[1], layerDepth ); + vertex3( v2[0], v2[1], layerDepth ); - vertex3( v1[0], v1[1], 0.0 ); - vertex3( v3[0], v3[1], 0.0 ); - vertex3( v2[0], v2[1], 0.0 ); + vertex3( v1[0], v1[1], layerDepth ); + vertex3( v3[0], v3[1], layerDepth ); + vertex3( v2[0], v2[1], layerDepth ); } end(); if( lineCap == LINE_CAP_ROUND ) { - drawSemiCircle( startPoint, lineWidth / aRadius / 2.0, aStartAngle + M_PI, 0 ); - drawSemiCircle( endPoint, lineWidth / aRadius / 2.0, aEndAngle, 0 ); + drawSemiCircle( startPoint, lineWidth / aRadius / 2.0, aStartAngle + M_PI ); + drawSemiCircle( endPoint, lineWidth / aRadius / 2.0, aEndAngle ); } } } @@ -1341,15 +1384,15 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a for( alpha = aStartAngle; ( alpha + alphaIncrement ) < aEndAngle; ) { - vertex3( middlePoint.x, middlePoint.y, 0.0 ); - vertex3( cos( alpha ), sin( alpha ), 0.0 ); + vertex3( middlePoint.x, middlePoint.y, layerDepth ); + vertex3( cos( alpha ), sin( alpha ), layerDepth ); alpha += alphaIncrement; - vertex3( cos( alpha ), sin( alpha ), 0.0 ); + vertex3( cos( alpha ), sin( alpha ), layerDepth ); } - vertex3( middlePoint.x, middlePoint.y, 0.0 ); - vertex3( cos( alpha ), sin( alpha ), 0.0 ); - vertex3( endPoint.x, endPoint.y, 0.0 ); + vertex3( middlePoint.x, middlePoint.y, layerDepth ); + vertex3( cos( alpha ), sin( alpha ), layerDepth ); + vertex3( endPoint.x, endPoint.y, layerDepth ); end(); } @@ -1391,6 +1434,8 @@ void OPENGL_GAL::DrawPolygon( const std::deque& aPointList ) // Any non convex polygon needs to be tesselated // for this purpose the GLU standard functions are used + setShader( SHADER_NONE ); + GLUtesselator* tesselator = gluNewTess(); typedef std::vector OGLPOINTS; @@ -1624,18 +1669,27 @@ int OPENGL_GAL::BeginGroup() void OPENGL_GAL::EndGroup() { - wxASSERT_MSG( curVboItem->GetSize() != 0, - "OPENGL_GAL::EndGroup: Tried to add group that contains nothing" ); +#ifdef __WXDEBUG__ + if( curVboItem->GetSize() != 0 ) + { + wxLogDebug( wxT( "Tried to add group that contains nothing" ) ); + } +#endif /* __WXDEBUG__ */ - vboSize += curVboItem->GetSize(); + vboSize += curVboItem->GetSize(); + curVboItem = NULL; isGrouping = false; } void OPENGL_GAL::DeleteGroup( int aGroupNumber ) { - wxASSERT_MSG( aGroupNumber < vboItems.size(), - "OPENGL_GAL::DeleteGroup: Tried to delete not existing group" ); +#ifdef __WXDEBUG__ + if( (unsigned) aGroupNumber < vboItems.size() ) + { + wxLogDebug( wxT( "Tried to delete not existing group" ) ); + } +#endif /* __WXDEBUG__ */ std::deque::iterator it = vboItems.begin(); std::advance( it, aGroupNumber ); @@ -1962,7 +2016,7 @@ void OPENGL_GAL::DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEnd VECTOR2D point4 = aEndPoint - perpendicularVector; if( isUseShader ) - selectShader( -1 ); + shader.Deactivate(); // Set color glColor4d( gridColor.r, gridColor.g, gridColor.b, gridColor.a ); diff --git a/common/gal/opengl/shader/round.frag b/common/gal/opengl/shader.frag similarity index 53% rename from common/gal/opengl/shader/round.frag rename to common/gal/opengl/shader.frag index 3d615db8c0..16ceb949ef 100644 --- a/common/gal/opengl/shader/round.frag +++ b/common/gal/opengl/shader.frag @@ -1,7 +1,8 @@ /* * This program source code file is part of KICAD, a free EDA CAD application. * - * Copyright (C) 2013 Tomasz Wlostowski + * Copyright (C) 2013 CERN + * @author Maciej Suminski * * Fragment shader * @@ -24,18 +25,48 @@ */ #version 120 +//#pragma debug(on) -varying float aspect; +// Shader types +const float SHADER_LINE = 1.0; +const float SHADER_FILLED_CIRCLE = 2.0; +const float SHADER_STROKED_CIRCLE = 3.0; -void main() +varying in vec4 shaderParams; + +void filledCircle( vec2 aCoord ) { - vec2 v = abs( gl_TexCoord[0].xy - vec2( 0.5, 0.5 ) ) * 2.0 - vec2( aspect, 0.0 ); - vec2 d = vec2( v.x / ( 1.0 - aspect ), v.y ); - - if( v.x <= 0.0 || (dot( d, d ) < 1.0 ) ) + if( dot( aCoord, aCoord ) < 1.0 ) gl_FragColor = gl_Color; else discard; - - // gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); } + + +void strokedCircle( vec2 aCoord, float aWidth ) +{ + if( ( dot( aCoord, aCoord ) < 1.0 ) && + ( dot( aCoord, aCoord ) > aWidth * aWidth ) ) + gl_FragColor = gl_Color; + else + discard; +} + + +void main() +{ + if( shaderParams[0] == SHADER_FILLED_CIRCLE ) + { + filledCircle( vec2( shaderParams[1], shaderParams[2] ) ); + } + else if( shaderParams[0] == SHADER_STROKED_CIRCLE ) + { + strokedCircle( vec2( shaderParams[1], shaderParams[2] ), shaderParams[3] ); + } + else + { + // Simple pass-through + gl_FragColor = gl_Color; + } +} + diff --git a/common/gal/opengl/shader/line.vert b/common/gal/opengl/shader.vert similarity index 50% rename from common/gal/opengl/shader/line.vert rename to common/gal/opengl/shader.vert index 2e16c5d08f..a272982119 100644 --- a/common/gal/opengl/shader/line.vert +++ b/common/gal/opengl/shader.vert @@ -1,8 +1,8 @@ /* * This program source code file is part of KICAD, a free EDA CAD application. * - * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de - * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. + * Copyright (C) 2013 CERN + * @author Maciej Suminski * * Vertex shader * @@ -24,12 +24,42 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -// This shader requires GLSL 1.2 #version 120 +// Shader types +const float SHADER_LINE = 1.0; +const float SHADER_FILLED_CIRCLE = 2.0; +const float SHADER_STROKED_CIRCLE = 3.0; + +attribute vec4 attrShaderParams; +varying out vec4 shaderParams; + void main() { - // Simple pass-through - gl_Position = gl_Vertex; + // Pass attributes to the fragment shader + shaderParams = attrShaderParams; + + if( shaderParams[0] == SHADER_LINE ) + { + float lineWidth = shaderParams[3]; + float worldScale = gl_ModelViewMatrix[0][0]; + float scale; + + // Make lines appear to be at least 1 pixel width + if( worldScale * lineWidth < 1.0 ) + scale = 1.0 / ( worldScale * lineWidth ); + else + scale = 1.0; + + gl_Position = gl_ModelViewProjectionMatrix * + ( gl_Vertex + vec4( shaderParams.yz * scale, 0.0, 0.0 ) ); + } + else + { + // Pass through the coordinates like in the fixed pipeline + gl_Position = ftransform(); + } + gl_FrontColor = gl_Color; } + diff --git a/common/gal/opengl/shader/circle.frag b/common/gal/opengl/shader/circle.frag deleted file mode 100644 index 142952c878..0000000000 --- a/common/gal/opengl/shader/circle.frag +++ /dev/null @@ -1,60 +0,0 @@ -/* - * This program source code file is part of KICAD, a free EDA CAD application. - * - * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de - * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. - * - * Fragment shader - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, you may find one here: - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * or you may search the http://www.gnu.org website for the version 2 license, - * or you may write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -// This shader requires GLSL 1.2 -#version 120 - -// Input variables -flat varying vec4 center_; -flat varying vec2 radius_; -flat varying vec4 colorA_; -flat varying vec4 colorB_; - -void main( void ) -{ - // Compute the distance from the circle edge - float distA = distance( center_, gl_FragCoord ) - radius_.y; - float distB = radius_.x - distance( center_, gl_FragCoord ); - - // Limit the range to [ 0 .. 1 ] - if( distA < 0 ) distA = 0; - if( distA > 1 ) distA = 1; - if( distB < 0 ) distB = 0; - if( distB > 1 ) distB = 1; - - // Points with a larger distance from the edge are set deeper - gl_FragDepth = gl_FragCoord.z + distA * 0.001 + distB * 0.001; - - // Compute the color - vec4 color; - color.r = colorA_.r; - color.g = colorA_.g; - color.b = colorA_.b; - color.a = colorA_.a * ( 1 - distA ) * ( 1 - distB ); - - // Now output the edge fragment color - gl_FragColor = color; -} diff --git a/common/gal/opengl/shader/circle.geom b/common/gal/opengl/shader/circle.geom deleted file mode 100644 index e908e458b6..0000000000 --- a/common/gal/opengl/shader/circle.geom +++ /dev/null @@ -1,115 +0,0 @@ -/* - * This program source code file is part of KICAD, a free EDA CAD application. - * - * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de - * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. - * - * Geometry shader - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, you may find one here: - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * or you may search the http://www.gnu.org website for the version 2 license, - * or you may write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -// This shader requires GLSL 1.2 -#version 120 -#extension GL_EXT_geometry_shader4: enable -#extension GL_EXT_gpu_shader4: enable - -uniform float viewPortX2; -uniform float viewPortY2; - -flat varying vec4 center_; -flat varying vec2 radius_; -flat varying vec4 colorA_; - -const float PI = 3.141592654; -const float EPSILON = 0.01; -const float smallestValue = 1.175494351e-38; -const int SEGMENTS = 16; - -const float PIXEL_EXTEND = 1.5; - -void main() -{ - vec4 center = gl_PositionIn[0]; - vec4 radius = gl_PositionIn[1]; - - center_ = gl_ModelViewProjectionMatrix * center; - - // Compute the outer and inner radius in screen coordinates - // This could be further optimized - radius_.x = ( gl_ModelViewProjectionMatrix * vec4(radius.x, 0, 0, 1) ).x; - radius_.x = abs( radius_.x - (gl_ModelViewProjectionMatrix * vec4(0, 0, 0, 1) ).x ) * viewPortX2; - radius_.y = ( gl_ModelViewProjectionMatrix * vec4(radius.y, 0, 0, 1) ).x; - radius_.y = abs( radius_.y - (gl_ModelViewProjectionMatrix * vec4(0, 0, 0, 1) ).x ) * viewPortX2; - - // Compute the center point in screen coordinates - center_.x = center_.x * viewPortX2 + viewPortX2; - center_.y = center_.y * viewPortY2 + viewPortY2; - - // Compute the extend value, first make sure that the outline is inside the triangles and second add - // a margin for one pixel for smooth edges - float extendInner = 1.0; - float extendOuter = 0; - if( radius_.y > smallestValue ) - { - extendOuter += PIXEL_EXTEND / radius_.y; - } - extendOuter += 1.0 / cos( PI / SEGMENTS ); - - colorA_ = gl_FrontColorIn[0]; - - // Create a quad strip for the outer circle edge - for( float alpha = 0, inc = 2 * PI / SEGMENTS, limit = 2 * PI + EPSILON; - alpha < limit; alpha += inc ) - { - gl_Position = gl_ModelViewProjectionMatrix * - vec4( center.x + extendInner * radius.y * cos( alpha ), - center.y + extendInner * radius.y * sin( alpha ), center.zw ); - EmitVertex(); - gl_Position = gl_ModelViewProjectionMatrix * - vec4( center.x + extendOuter * radius.y * cos( alpha ), - center.y + extendOuter * radius.y * sin( alpha ), center.zw ); - EmitVertex(); - } - EndPrimitive(); - - if( radius.x > 0 ) - { - extendInner = cos( PI / SEGMENTS ) - PIXEL_EXTEND / radius_.x; - if( extendInner < 0.0 ) - { - extendInner = 0; - } - extendOuter = 1.0 / cos( PI / SEGMENTS); - - // Create a quad strip for the inner circle edge - for( float alpha = 0, inc = 2 * PI / SEGMENTS, limit = 2 * PI + EPSILON; - alpha < limit; alpha += inc ) - { - gl_Position = gl_ModelViewProjectionMatrix * - vec4( center.x + extendOuter * radius.x * cos( alpha ), - center.y + extendOuter * radius.x * sin( alpha ), center.zw ); - EmitVertex(); - gl_Position = gl_ModelViewProjectionMatrix * - vec4( center.x + extendInner * radius.x * cos( alpha ), - center.y + extendInner * radius.x * sin( alpha ), center.zw ); - EmitVertex(); - } - EndPrimitive(); - } -} diff --git a/common/gal/opengl/shader/circle.vert b/common/gal/opengl/shader/circle.vert deleted file mode 100644 index 2e16c5d08f..0000000000 --- a/common/gal/opengl/shader/circle.vert +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This program source code file is part of KICAD, a free EDA CAD application. - * - * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de - * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. - * - * Vertex shader - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, you may find one here: - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * or you may search the http://www.gnu.org website for the version 2 license, - * or you may write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -// This shader requires GLSL 1.2 -#version 120 - -void main() -{ - // Simple pass-through - gl_Position = gl_Vertex; - gl_FrontColor = gl_Color; -} diff --git a/common/gal/opengl/shader/line.frag b/common/gal/opengl/shader/line.frag deleted file mode 100644 index 63d0f0bf2c..0000000000 --- a/common/gal/opengl/shader/line.frag +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This program source code file is part of KICAD, a free EDA CAD application. - * - * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de - * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. - * - * Fragment shader - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, you may find one here: - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * or you may search the http://www.gnu.org website for the version 2 license, - * or you may write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#version 120 -#extension GL_EXT_gpu_shader4: enable - -varying float dist; - -void main() -{ - float d = dist; - gl_FragDepth = gl_FragCoord.z + d * 0.001; - gl_FragColor = vec4( gl_Color.rgb, gl_Color.a * ( 1 - d ) ); -} diff --git a/common/gal/opengl/shader/line.geom b/common/gal/opengl/shader/line.geom deleted file mode 100644 index 8000a791cd..0000000000 --- a/common/gal/opengl/shader/line.geom +++ /dev/null @@ -1,123 +0,0 @@ -/* - * This program source code file is part of KICAD, a free EDA CAD application. - * - * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de - * Copyright (C) 2012 Kicad Developers, see change_log.txt for contributors. - * - * Geometry shader - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, you may find one here: - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * or you may search the http://www.gnu.org website for the version 2 license, - * or you may write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#version 120 -#extension GL_EXT_geometry_shader4: enable -#extension GL_EXT_gpu_shader4: enable - -uniform float viewPortX2; -uniform float viewPortY2; -varying float dist; - -void main() -{ - // Compute the transformed start and end points - vec2 startPoint = gl_PositionIn[0].xy; - vec2 endPoint = gl_PositionIn[1].xy; - float lineWidth = gl_PositionIn[1].z; - - // Compute vector start -> end - vec2 startEndVector = endPoint.xy - startPoint.xy; - float lineLength = distance( startPoint, endPoint ); - float scale = 0.0; - - if( lineLength > 0.0 ) - { - scale = 0.5 * lineWidth / lineLength; - } - else - { - scale = 0.0; - } - - // Compute the edge points of the line - vec2 perpendicularVector = scale * vec2( -startEndVector.y, startEndVector.x ); - vec2 point1 = startPoint + perpendicularVector; - vec2 point2 = startPoint - perpendicularVector; - vec2 point3 = endPoint + perpendicularVector; - vec2 point4 = endPoint - perpendicularVector; - - vec4 point1T = gl_ModelViewProjectionMatrix * vec4( point1, gl_PositionIn[0].zw ); - vec4 point2T = gl_ModelViewProjectionMatrix * vec4( point2, gl_PositionIn[0].zw ); - vec4 point3T = gl_ModelViewProjectionMatrix * vec4( point3, gl_PositionIn[0].zw ); - vec4 point4T = gl_ModelViewProjectionMatrix * vec4( point4, gl_PositionIn[0].zw ); - - // Construct the quad for the middle - gl_FrontColor = gl_FrontColorIn[0]; - dist = 0; - gl_Position = point1T; - EmitVertex(); - dist = 0; - gl_Position = point2T; - EmitVertex(); - dist = 0; - gl_Position = point3T; - EmitVertex(); - dist = 0; - gl_Position = point4T; - EmitVertex(); - - EndPrimitive(); - - // Compute the perpendicular vector with 1 pixel width - vec2 v = point1T.xy - point3T.xy; - vec4 onePix = 0.5 * vec4( -v.y, v.x, 0, 0 ); - onePix *= 1.0 / sqrt( dot( onePix, onePix ) ); - onePix.x *= 1.0 / viewPortX2; - onePix.y *= 1.0 / viewPortY2; - - gl_FrontColor = gl_FrontColorIn[0]; - - dist = 1; - gl_Position = point1T + onePix; - EmitVertex(); - dist = 1; - gl_Position = point3T + onePix; - EmitVertex(); - dist = 0; - gl_Position = point1T; - EmitVertex(); - dist = 0; - gl_Position = point3T; - EmitVertex(); - - EndPrimitive(); - - dist = 1; - gl_Position = point2T - onePix; - EmitVertex(); - dist = 1; - gl_Position = point4T - onePix; - EmitVertex(); - dist = 0; - gl_Position = point2T; - EmitVertex(); - dist = 0; - gl_Position = point4T; - EmitVertex(); - - EndPrimitive(); -} diff --git a/common/gal/opengl/shader/round.vert b/common/gal/opengl/shader/round.vert deleted file mode 100644 index c42f2be8f5..0000000000 --- a/common/gal/opengl/shader/round.vert +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This program source code file is part of KICAD, a free EDA CAD application. - * - * Copyright (C) 2013 Tomasz Wlostowski - * - * Vertex shader - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, you may find one here: - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * or you may search the http://www.gnu.org website for the version 2 license, - * or you may write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#version 120 - -varying float aspect; - -void main() -{ - gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; - gl_FrontColor = gl_Color; - gl_TexCoord[0] = gl_MultiTexCoord0; - - aspect = gl_Normal.x; -} diff --git a/common/gal/opengl/vbo_item.cpp b/common/gal/opengl/vbo_item.cpp index c458dffccf..ce254d40e9 100644 --- a/common/gal/opengl/vbo_item.cpp +++ b/common/gal/opengl/vbo_item.cpp @@ -40,6 +40,9 @@ VBO_ITEM::VBO_ITEM() : m_isDirty( true ), m_transform( NULL ) { + // By default no shader is used + m_shader[0] = 0; + // Prepare a block for storing vertices & indices useNewBlock(); } @@ -50,7 +53,7 @@ VBO_ITEM::~VBO_ITEM() if( m_isDirty ) { // Data is still stored in blocks - std::list::const_iterator v_it, v_end; + std::list::const_iterator v_it, v_end; for( v_it = m_vertBlocks.begin(), v_end = m_vertBlocks.end(); v_it != v_end; ++v_it ) delete[] *v_it; @@ -75,24 +78,27 @@ void VBO_ITEM::PushVertex( const GLfloat* aVertex ) if( m_transform != NULL ) { // Apply transformations - // X, Y, Z coordinates - glm::vec4 origVertex( aVertex[0], aVertex[1], aVertex[2], 1.0f ); - glm::vec4 transVertex = *m_transform * origVertex; + // X, Y, Z coordinates + glm::vec4 vertex( aVertex[0], aVertex[1], aVertex[2], 1.0f ); + vertex = *m_transform * vertex; // Replace only coordinates, leave color as it is - memcpy( m_vertPtr, &transVertex[0], CoordSize ); + memcpy( &m_vertPtr->struc.coord, &vertex[0], CoordByteSize ); } else { // Add the new vertex - memcpy( m_vertPtr, aVertex, CoordSize ); + memcpy( &m_vertPtr->struc.coord, aVertex, CoordByteSize ); } // Apply currently used color - memcpy( m_vertPtr + ColorOffset, m_color, ColorSize ); + memcpy( &m_vertPtr->struc.color, m_color, ColorByteSize ); + + // Apply currently used shader + memcpy( &m_vertPtr->struc.shader, m_shader, ShaderByteSize ); // Move to the next free space - m_vertPtr += VertStride; + m_vertPtr++; // Add the new index *m_indPtr = m_offset + m_size; @@ -177,10 +183,10 @@ void VBO_ITEM::ChangeColor( const COLOR4D& aColor ) for( int i = 0; i < m_size; ++i ) { - memcpy( vertexPtr, newColor, ColorSize ); + memcpy( vertexPtr, newColor, ColorByteSize ); // Move on to the next vertex - vertexPtr += VertStride; + vertexPtr++; } } @@ -194,6 +200,12 @@ void VBO_ITEM::UseColor( const COLOR4D& aColor ) } +void VBO_ITEM::UseShader( const GLfloat* aShader ) +{ + memcpy( m_shader, aShader, ShaderByteSize ); +} + + /* // TODO void SetVbo( int aVboId ) @@ -209,8 +221,8 @@ int GetVbo() const void VBO_ITEM::useNewBlock() { - GLfloat* newVertBlock = new GLfloat[BLOCK_SIZE * VertStride]; - GLuint* newIndBlock = new GLuint[BLOCK_SIZE]; + VBO_VERTEX* newVertBlock = new VBO_VERTEX[BLOCK_SIZE]; + GLuint* newIndBlock = new GLuint[BLOCK_SIZE]; m_vertPtr = newVertBlock; m_indPtr = newIndBlock; @@ -233,16 +245,16 @@ void VBO_ITEM::prepareFinal() GLfloat* vertPtr = m_vertices; // Copy blocks of vertices one after another to m_vertices - std::list::const_iterator v_it; + std::list::const_iterator v_it; for( v_it = m_vertBlocks.begin(); *v_it != m_vertBlocks.back(); ++v_it ) { - memcpy( vertPtr, *v_it, BLOCK_SIZE * VertSize ); + memcpy( vertPtr, *v_it, BLOCK_SIZE * VertByteSize ); delete[] *v_it; vertPtr += ( BLOCK_SIZE * VertStride ); } // In the last block we need to copy only used vertices - memcpy( vertPtr, *v_it, ( BLOCK_SIZE - m_spaceLeft ) * VertSize ); + memcpy( vertPtr, *v_it, ( BLOCK_SIZE - m_spaceLeft ) * VertByteSize ); if( m_indices ) delete m_indices; @@ -256,13 +268,13 @@ void VBO_ITEM::prepareFinal() std::list::const_iterator i_it; for( i_it = m_indBlocks.begin(); *i_it != m_indBlocks.back(); ++i_it ) { - memcpy( indPtr, *i_it, BLOCK_SIZE * IndSize ); + memcpy( indPtr, *i_it, BLOCK_SIZE * IndByteSize ); delete[] *i_it; indPtr += ( BLOCK_SIZE * IndStride ); } // In the last block we need to copy only used indices - memcpy( indPtr, *i_it, ( BLOCK_SIZE - m_spaceLeft ) * IndSize ); + memcpy( indPtr, *i_it, ( BLOCK_SIZE - m_spaceLeft ) * IndByteSize ); m_isDirty = false; } diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 22bd697d28..56a2c38911 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -36,6 +36,7 @@ // OpenGL mathematics library #define GLM_FORCE_RADIANS #include +#include // wxWidgets imports #include @@ -323,7 +324,6 @@ private: static const int CIRCLE_POINTS = 64; ///< The number of points for circle approximation static const int CURVE_POINTS = 32; ///< The number of points for curve approximation - static const int SHADER_NUMBER = 2; ///< Number of the used shaders static const double MITER_LIMIT = 1.5; ///< Limit for mitered edges ( * lineWidth ) /// This factor is used to for correct merging of antialiased edges, @@ -365,7 +365,18 @@ private: GLUtesselator* tesselator; ///< Pointer to the tesselator // Shader - std::deque shaderList; ///< List of the shaders + // Possible types of shaders + typedef enum + { + SHADER_NONE = 0, + SHADER_LINE, + SHADER_FILLED_CIRCLE, + SHADER_STROKED_CIRCLE, + } SHADER_TYPE; + + SHADER shader; ///< There is only one shader used for different objects + int shaderAttrib; ///< Location of shader attributes (for glVertexAttribPointer) + std::string shaderPath; ///< Location of shader files // Cursor int cursorSize; ///< Size of the cursor in pixels @@ -391,8 +402,6 @@ private: bool isShaderEnabled; ///< Are the shaders enabled? bool isUseShader; ///< Should the shaders be used? bool isGrouping; ///< Was a group started? - int currentShader; ///< ID of the shader currently in use - std::string shaderPath; /** * @brief Draw a semi circle (used for line caps). @@ -400,11 +409,9 @@ private: * @param aCenterPoint is the center point. * @param aRadius is the radius of the semi-circle. * @param aAngle is the angle of the semi-circle. - * @param ADepthOffset is the relative depth of the semi-circle. * */ - void drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle, - double aDepthOffset ); + void drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ); /// Compute the points of a unit circle. void computeUnitCircle(); @@ -506,8 +513,7 @@ private: * @param aEndPoint is the end point of the line. * @param aDepthOffset is the relative depth of the line cap. */ - inline void drawLineCap( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, - double aDepthOffset ); + inline void drawLineCap( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); ///< OpenGL replacement functions (that are working both in immediate and VBO modes) /** @@ -561,13 +567,23 @@ private: */ inline void color4( const COLOR4D& aColor ); - inline void selectShader( int aIndex ); - - /// @copydoc GAL::DrawRoundedSegment() - void drawRoundedSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aWidth, - bool aStroke = false, bool aGlBegin = false ); - + /** + * @brief Function that sets shader and its parameters for the currently used VBO_ITEM. + * It should be used before adding any vertices that have to be shaded. + * @param aShader is the type of shader used for vertices. + * @param aParam[1..3] are shader's parameters. Their meaning depends on the type of used shader. + * For more information you may check shaders' source code. + */ + inline void setShader( SHADER_TYPE aShader, GLfloat aParam1 = 0.0f, + GLfloat aParam2 = 0.0f, GLfloat aParam3 = 0.0f ) + { + if( isUseShader && isGrouping ) + { + const GLfloat shader[] = { aShader, aParam1, aParam2, aParam3 }; + curVboItem->UseShader( shader ); + } + } }; } // namespace KiGfx diff --git a/include/gal/opengl/vbo_item.h b/include/gal/opengl/vbo_item.h index bbc8919a57..95e556eb9b 100644 --- a/include/gal/opengl/vbo_item.h +++ b/include/gal/opengl/vbo_item.h @@ -34,10 +34,31 @@ #include #include +#include + #include namespace KiGfx { +typedef struct VBO_VERTEX_DATA +{ + GLfloat x, y, z; // Coordinates + GLfloat r, g, b, a; // Color + GLfloat shader[4]; // Shader type & params +} VBO_VERTEX_DATA; + +typedef struct VBO_VERTEX_STRUCT +{ + GLfloat coord[3]; // Coordinates + GLfloat color[4]; // Color + GLfloat shader[4]; // Shader type & params +} VBO_VERTEX_STRUCT; + +typedef union VBO_VERTEX +{ + VBO_VERTEX_DATA data; + VBO_VERTEX_STRUCT struc; +} VBO_VERTEX; class VBO_ITEM { @@ -50,6 +71,7 @@ public: * Adds a single vertex to the VBO_ITEM. Vertex contains information about coordinates and * colors and has to follow the specified format {X,Y,Z,R,G,B,A}. * @param aVertex is a vertex to be added. + * @param aShader is an attribute for shader. */ void PushVertex( const GLfloat* aVertex ); @@ -60,6 +82,7 @@ public: * coordinates and colors and has to follow the specified format {X,Y,Z,R,G,B,A}. * @param aVertices are vertices to be added. * @param aSize is an amount of vertices to be added. + * @param aShader is an attribute for shader. */ void PushVertices( const GLfloat* aVertices, GLuint aSize ); @@ -121,26 +144,38 @@ public: */ void UseColor( const COLOR4D& aColor ); + /** + * Function UseShader() + * Sets shader and its parameters used for all added vertices. + * @param aShader is the array that contains shader number followed by its parameters. + */ + void UseShader( const GLfloat* aShader ); + ///< Functions for getting VBO ids. //void SetVbo( int aVboId ); //int GetVbo() const; - ///< Data organization information for vertices {X,Y,Z,R,G,B,A}. - // Each vertex consists of 7 floats, but it is padded to 8 - static const int VertStride = 8; - static const int VertSize = VertStride * sizeof(GLfloat); + ///< Data organization information for vertices {X,Y,Z,R,G,B,A} (@see VBO_VERTEX). + static const int VertByteSize = sizeof(VBO_VERTEX); + static const int VertStride = VertByteSize / sizeof(GLfloat); - static const int CoordStride = 3; - static const int CoordSize = CoordStride * sizeof(GLfloat); + static const int CoordStride = sizeof(VBO_VERTEX_STRUCT().coord) / sizeof(GLfloat); + static const int CoordByteSize = sizeof(VBO_VERTEX_STRUCT().coord); // Offset of color data from the beginning of each vertex data - static const int ColorOffset = 3; - static const int ColorByteOffset = ColorOffset * sizeof(GLfloat); - static const int ColorStride = 4; - static const int ColorSize = ColorStride * sizeof(GLfloat); + static const int ColorByteOffset = offsetof( VBO_VERTEX_STRUCT, color ); + static const int ColorOffset = ColorByteOffset / sizeof(GLfloat); + static const int ColorStride = sizeof(VBO_VERTEX_STRUCT().color) / sizeof(GLfloat); + static const int ColorByteSize = sizeof(VBO_VERTEX_STRUCT().color); + + // Shader attributes + static const int ShaderByteOffset = offsetof( VBO_VERTEX_STRUCT, shader ); + static const int ShaderOffset = ShaderByteOffset / sizeof(GLfloat); + static const int ShaderStride = sizeof(VBO_VERTEX_STRUCT().shader) / sizeof(GLfloat); + static const int ShaderByteSize = sizeof(VBO_VERTEX_STRUCT().shader); static const int IndStride = 1; - static const int IndSize = IndStride * sizeof(GLuint); + static const int IndByteSize = IndStride * sizeof(GLuint); private: ///< VBO ids in which the item is stored. @@ -153,31 +188,30 @@ private: ///< Indices of vertices GLuint* m_indices; - ///< Lists of blocks - std::list m_vertBlocks; - std::list m_indBlocks; - ///< Pointers to current blocks that can be used for storing data - GLfloat* m_vertPtr; - GLuint* m_indPtr; + ///< Lists of data blocks storing vertices + std::list m_vertBlocks; + std::list m_indBlocks; + ///< Pointers to current blocks that should be used for storing data + VBO_VERTEX* m_vertPtr; + GLuint* m_indPtr; ///< How many vertices can be stored in the current buffer - int m_spaceLeft; + int m_spaceLeft; ///< Number of vertices & indices stored in a single block - static const int BLOCK_SIZE = 8; + static const int BLOCK_SIZE = 256; ///< Creates a new block for storing vertices data - void useNewBlock(); + void useNewBlock(); ///< Prepares a continuous block of data that can be copied to graphics card buffer. - void prepareFinal(); + void prepareFinal(); ///< Offset and size of data in VBO. int m_offset; int m_size; - ///< Shader data used for rendering. - int m_shader; - int m_shaderAttrib; - ///< Color used for new vertices pushed. - GLfloat m_color[4]; + GLfloat m_color[ColorStride]; + + ///< Shader and its parameters used for new vertices pushed + GLfloat m_shader[ShaderStride]; ///< Flag telling if the item should be recached in VBO or not. bool m_isDirty; diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 58aeaf1724..c4fca25758 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -582,12 +582,12 @@ void PCB_EDIT_FRAME::SwitchCanvas( wxCommandEvent& aEvent ) break; case ID_MENU_CANVAS_CAIRO: - m_galCanvas->SwitchBackend( EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO, false ); + m_galCanvas->SwitchBackend( EDA_DRAW_PANEL_GAL::GAL_TYPE_CAIRO ); UseGalCanvas( true ); break; case ID_MENU_CANVAS_OPENGL: - m_galCanvas->SwitchBackend( EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL, false ); + m_galCanvas->SwitchBackend( EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL, true ); UseGalCanvas( true ); break; } From 2d5f342ee8e23bde11ab00528cd2c1c18097b370 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 4 Jun 2013 16:18:33 +0200 Subject: [PATCH 085/415] Switching to OpenGL using shaders backend on the fly (changed keyboard shortcuts: different backends are available using Alt+F9..F12). --- common/drawpanel_gal.cpp | 9 +++++++-- include/class_drawpanel_gal.h | 1 + pcbnew/hotkeys.cpp | 10 ++++++---- pcbnew/hotkeys.h | 1 + pcbnew/menubar_pcbframe.cpp | 7 +++++++ pcbnew/pcbframe.cpp | 12 +++++++++--- pcbnew/pcbnew_id.h | 1 + 7 files changed, 32 insertions(+), 9 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 390f919c1b..ea6e31ed7d 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -58,7 +58,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin wxStandardPaths paths; wxFileName executableFile( paths.GetExecutablePath() ); m_galShaderPath = std::string( ( executableFile.GetPath() + - wxT( "/../../common/gal/opengl/" ) ).mb_str() ); + wxT( "/../../common/gal/opengl" ) ).mb_str() ); SwitchBackend( aGalType, true ); SetBackgroundStyle( wxBG_STYLE_CUSTOM ); @@ -151,7 +151,11 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) { - if( aGalType == m_currentGal && m_gal != NULL ) + wxLogDebug( wxT( "EDA_DRAW_PANEL_GAL::SwitchBackend: using shaders: %s" ), + aUseShaders ? "true" : "false" ); + + // Do not do anything if the currently used GAL is correct + if( aGalType == m_currentGal && aUseShaders == m_useShaders && m_gal != NULL ) return; if( m_gal ) @@ -186,4 +190,5 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) m_gal->ResizeScreen( size.GetX(), size.GetY() ); m_currentGal = aGalType; + m_useShaders = aUseShaders; } diff --git a/include/class_drawpanel_gal.h b/include/class_drawpanel_gal.h index 6587f91044..62f98c5767 100644 --- a/include/class_drawpanel_gal.h +++ b/include/class_drawpanel_gal.h @@ -88,6 +88,7 @@ protected: ///< using GAL KiGfx::WX_VIEW_CONTROLS* m_viewControls; ///< Control for VIEW (moving, zooming, etc.) GalType m_currentGal; ///< Currently used GAL + bool m_useShaders; ///< Are shaders used? (only for OpenGL GAL) std::string m_galShaderPath; ///< Path to shader files, used in OpenGL mode }; diff --git a/pcbnew/hotkeys.cpp b/pcbnew/hotkeys.cpp index 95715d7af9..aef8425021 100644 --- a/pcbnew/hotkeys.cpp +++ b/pcbnew/hotkeys.cpp @@ -83,9 +83,11 @@ static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ), static EDA_HOTKEY HkSwitchHighContrastMode( wxT("Switch Highcontrast mode"), HK_SWITCH_HIGHCONTRAST_MODE,'H'); #ifdef KICAD_GAL -static EDA_HOTKEY HkCanvasDefault( wxT( "Switch to default canvas" ), HK_CANVAS_DEFAULT, WXK_F10 ); -static EDA_HOTKEY HkCanvasCairo( wxT( "Switch to OpenGL canvas" ), HK_CANVAS_OPENGL, WXK_F11 ); -static EDA_HOTKEY HkCanvasOpenGL( wxT( "Switch to Cairo canvas" ), HK_CANVAS_CAIRO, WXK_F12 ); +static EDA_HOTKEY HkCanvasDefault( wxT( "Switch to default canvas" ), HK_CANVAS_DEFAULT, WXK_F9 ); +static EDA_HOTKEY HkCanvasOpenGL( wxT( "Switch to OpenGL canvas" ), HK_CANVAS_OPENGL, WXK_F10 ); +static EDA_HOTKEY HkCanvasOpenGLShaders( wxT( "Switch to OpenGL canvas with shaders" ), + HK_CANVAS_OPENGL_SHADERS, WXK_F11 ); +static EDA_HOTKEY HkCanvasCairo( wxT( "Switch to Cairo canvas" ), HK_CANVAS_CAIRO, WXK_F12 ); #endif /* Fit on Screen */ #if !defined( __WXMAC__ ) @@ -234,7 +236,7 @@ EDA_HOTKEY* board_edit_Hotkey_List[] = &HkRecordMacros8, &HkCallMacros8, &HkRecordMacros9, &HkCallMacros9, &HkSwitchHighContrastMode, #ifdef KICAD_GAL - &HkCanvasDefault, &HkCanvasCairo, &HkCanvasOpenGL, + &HkCanvasDefault, &HkCanvasCairo, &HkCanvasOpenGL, &HkCanvasOpenGLShaders, #endif NULL }; diff --git a/pcbnew/hotkeys.h b/pcbnew/hotkeys.h index d504e99887..277f7e95eb 100644 --- a/pcbnew/hotkeys.h +++ b/pcbnew/hotkeys.h @@ -85,6 +85,7 @@ enum hotkey_id_commnand { #ifdef KICAD_GAL HK_CANVAS_DEFAULT, HK_CANVAS_OPENGL, + HK_CANVAS_OPENGL_SHADERS, HK_CANVAS_CAIRO, #endif }; diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index 35babf398f..fb89e45b61 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -365,6 +365,13 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() AddMenuItem( viewMenu, ID_MENU_CANVAS_OPENGL, text, _( "Switch the canvas implementation to OpenGL" ), KiBitmap( tools_xpm ) ); + + text = AddHotkeyName( _( "&Switch canvas to OpenGL (shaders)" ), g_Pcbnew_Editor_Hokeys_Descr, + HK_CANVAS_OPENGL_SHADERS, IS_ACCELERATOR ); + + AddMenuItem( viewMenu, ID_MENU_CANVAS_OPENGL_SHADERS, + text, _( "Switch the canvas implementation to OpenGL that uses shaders" ), + KiBitmap( tools_xpm ) ); text = AddHotkeyName( _( "&Switch canvas to Cairo" ), g_Pcbnew_Editor_Hokeys_Descr, HK_CANVAS_CAIRO, IS_ACCELERATOR ); diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index c4fca25758..556bde2450 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -157,9 +157,10 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_MENU( ID_MENU_PCB_SHOW_3D_FRAME, PCB_EDIT_FRAME::Show3D_Frame ) // Switching canvases - EVT_MENU( ID_MENU_CANVAS_DEFAULT, PCB_EDIT_FRAME::SwitchCanvas ) - EVT_MENU( ID_MENU_CANVAS_CAIRO, PCB_EDIT_FRAME::SwitchCanvas ) - EVT_MENU( ID_MENU_CANVAS_OPENGL, PCB_EDIT_FRAME::SwitchCanvas ) + EVT_MENU( ID_MENU_CANVAS_DEFAULT, PCB_EDIT_FRAME::SwitchCanvas ) + EVT_MENU( ID_MENU_CANVAS_CAIRO, PCB_EDIT_FRAME::SwitchCanvas ) + EVT_MENU( ID_MENU_CANVAS_OPENGL, PCB_EDIT_FRAME::SwitchCanvas ) + EVT_MENU( ID_MENU_CANVAS_OPENGL_SHADERS, PCB_EDIT_FRAME::SwitchCanvas ) // Menu Get Design Rules Editor EVT_MENU( ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG, PCB_EDIT_FRAME::ShowDesignRulesEditor ) @@ -587,6 +588,11 @@ void PCB_EDIT_FRAME::SwitchCanvas( wxCommandEvent& aEvent ) break; case ID_MENU_CANVAS_OPENGL: + m_galCanvas->SwitchBackend( EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL, false ); + UseGalCanvas( true ); + break; + + case ID_MENU_CANVAS_OPENGL_SHADERS: m_galCanvas->SwitchBackend( EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL, true ); UseGalCanvas( true ); break; diff --git a/pcbnew/pcbnew_id.h b/pcbnew/pcbnew_id.h index d6580786fb..a5babb0348 100644 --- a/pcbnew/pcbnew_id.h +++ b/pcbnew/pcbnew_id.h @@ -268,6 +268,7 @@ enum pcbnew_ids ID_MENU_PCB_SHOW_3D_FRAME, ID_MENU_CANVAS_DEFAULT, ID_MENU_CANVAS_OPENGL, + ID_MENU_CANVAS_OPENGL_SHADERS, ID_MENU_CANVAS_CAIRO, ID_PCB_USER_GRID_SETUP, ID_PCB_GEN_BOM_FILE_FROM_BOARD, From 7858e6aa7c97a1ad5ee3639b9d242fa4c2471ec1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 5 Jun 2013 10:48:30 +0200 Subject: [PATCH 086/415] Changed data structure in VBO_ITEM. --- common/gal/opengl/vbo_item.cpp | 21 +++----------- include/gal/opengl/vbo_item.h | 53 +++++++++++++--------------------- 2 files changed, 24 insertions(+), 50 deletions(-) diff --git a/common/gal/opengl/vbo_item.cpp b/common/gal/opengl/vbo_item.cpp index ce254d40e9..6aeb98034d 100644 --- a/common/gal/opengl/vbo_item.cpp +++ b/common/gal/opengl/vbo_item.cpp @@ -83,19 +83,19 @@ void VBO_ITEM::PushVertex( const GLfloat* aVertex ) vertex = *m_transform * vertex; // Replace only coordinates, leave color as it is - memcpy( &m_vertPtr->struc.coord, &vertex[0], CoordByteSize ); + memcpy( &m_vertPtr->x, &vertex[0], CoordByteSize ); } else { // Add the new vertex - memcpy( &m_vertPtr->struc.coord, aVertex, CoordByteSize ); + memcpy( &m_vertPtr->x, aVertex, CoordByteSize ); } // Apply currently used color - memcpy( &m_vertPtr->struc.color, m_color, ColorByteSize ); + memcpy( &m_vertPtr->r, m_color, ColorByteSize ); // Apply currently used shader - memcpy( &m_vertPtr->struc.shader, m_shader, ShaderByteSize ); + memcpy( &m_vertPtr->shader, m_shader, ShaderByteSize ); // Move to the next free space m_vertPtr++; @@ -206,19 +206,6 @@ void VBO_ITEM::UseShader( const GLfloat* aShader ) } -/* -// TODO -void SetVbo( int aVboId ) -{ -} - - -int GetVbo() const -{ -} -*/ - - void VBO_ITEM::useNewBlock() { VBO_VERTEX* newVertBlock = new VBO_VERTEX[BLOCK_SIZE]; diff --git a/include/gal/opengl/vbo_item.h b/include/gal/opengl/vbo_item.h index 95e556eb9b..028105506f 100644 --- a/include/gal/opengl/vbo_item.h +++ b/include/gal/opengl/vbo_item.h @@ -40,25 +40,13 @@ namespace KiGfx { -typedef struct VBO_VERTEX_DATA +typedef struct VBO_VERTEX { GLfloat x, y, z; // Coordinates GLfloat r, g, b, a; // Color GLfloat shader[4]; // Shader type & params } VBO_VERTEX_DATA; -typedef struct VBO_VERTEX_STRUCT -{ - GLfloat coord[3]; // Coordinates - GLfloat color[4]; // Color - GLfloat shader[4]; // Shader type & params -} VBO_VERTEX_STRUCT; - -typedef union VBO_VERTEX -{ - VBO_VERTEX_DATA data; - VBO_VERTEX_STRUCT struc; -} VBO_VERTEX; class VBO_ITEM { @@ -159,34 +147,33 @@ public: static const int VertByteSize = sizeof(VBO_VERTEX); static const int VertStride = VertByteSize / sizeof(GLfloat); - static const int CoordStride = sizeof(VBO_VERTEX_STRUCT().coord) / sizeof(GLfloat); - static const int CoordByteSize = sizeof(VBO_VERTEX_STRUCT().coord); + static const int CoordByteSize = sizeof(VBO_VERTEX().x) + sizeof(VBO_VERTEX().y) + + sizeof(VBO_VERTEX().z); + static const int CoordStride = CoordByteSize / sizeof(GLfloat); // Offset of color data from the beginning of each vertex data - static const int ColorByteOffset = offsetof( VBO_VERTEX_STRUCT, color ); + static const int ColorByteOffset = offsetof(VBO_VERTEX, r); static const int ColorOffset = ColorByteOffset / sizeof(GLfloat); - static const int ColorStride = sizeof(VBO_VERTEX_STRUCT().color) / sizeof(GLfloat); - static const int ColorByteSize = sizeof(VBO_VERTEX_STRUCT().color); + static const int ColorByteSize = sizeof(VBO_VERTEX().r) + sizeof(VBO_VERTEX().g) + + sizeof(VBO_VERTEX().b) + sizeof(VBO_VERTEX().a); + static const int ColorStride = ColorByteSize / sizeof(GLfloat); // Shader attributes - static const int ShaderByteOffset = offsetof( VBO_VERTEX_STRUCT, shader ); + static const int ShaderByteOffset = offsetof(VBO_VERTEX, shader); static const int ShaderOffset = ShaderByteOffset / sizeof(GLfloat); - static const int ShaderStride = sizeof(VBO_VERTEX_STRUCT().shader) / sizeof(GLfloat); - static const int ShaderByteSize = sizeof(VBO_VERTEX_STRUCT().shader); + static const int ShaderByteSize = sizeof(VBO_VERTEX().shader); + static const int ShaderStride = ShaderByteSize / sizeof(GLfloat); static const int IndStride = 1; static const int IndByteSize = IndStride * sizeof(GLuint); private: - ///< VBO ids in which the item is stored. - //int m_vboId; // not used yet - ///< Contains vertices coordinates and colors. ///< Packed by 7 floats for each vertex: {X, Y, Z, R, G, B, A} - GLfloat* m_vertices; + GLfloat* m_vertices; ///< Indices of vertices - GLuint* m_indices; + GLuint* m_indices; ///< Lists of data blocks storing vertices std::list m_vertBlocks; @@ -204,20 +191,20 @@ private: void prepareFinal(); ///< Offset and size of data in VBO. - int m_offset; - int m_size; + int m_offset; + int m_size; ///< Color used for new vertices pushed. - GLfloat m_color[ColorStride]; + GLfloat m_color[ColorStride]; ///< Shader and its parameters used for new vertices pushed - GLfloat m_shader[ShaderStride]; + GLfloat m_shader[ShaderStride]; ///< Flag telling if the item should be recached in VBO or not. - bool m_isDirty; + bool m_isDirty; - ///< Current transform matrix for every new vertex pushed. - const glm::mat4* m_transform; + ///< Current transform matrix applied for every new vertex pushed. + const glm::mat4* m_transform; }; } // namespace KiGfx From 03b5d6125b7c11822b4d0c9d9b47635510c59ba1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 6 Jun 2013 11:52:39 +0200 Subject: [PATCH 087/415] Removed indices storing from VBO_ITEM as they are always consecutive numbers. Removed storing pointers to VBO_ITEMs that have to be drawn - instead they are memcpied to mapped GPU memory. Some functions of VBO_ITEM became inline. --- common/gal/opengl/opengl_gal.cpp | 53 +++++++++--------- common/gal/opengl/vbo_item.cpp | 95 -------------------------------- include/gal/opengl/opengl_gal.h | 5 +- include/gal/opengl/vbo_item.h | 70 ++++++++++++++--------- 4 files changed, 73 insertions(+), 150 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index c9d3987402..c0128a9515 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -414,9 +414,19 @@ void OPENGL_GAL::BeginDrawing() if( vboNeedsUpdate ) rebuildVbo(); - // Clear indices buffer - itemsToDraw.clear(); - itemsToDrawSize = 0; + // Number of vertices to be drawn + indicesSize = 0; + + glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, curVboIndId ); + // Discard old buffer, so we can use it again + glBufferData( GL_ELEMENT_ARRAY_BUFFER, vboSize * VBO_ITEM::IndByteSize, NULL, GL_STREAM_DRAW ); + + // Map the GPU memory, so we can store indices that are going to be drawn + indicesPtr = static_cast( glMapBuffer( GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY ) ); + if( indicesPtr == NULL ) + { + wxLogError( wxT( "Could not map GPU memory" ) ); + } } @@ -473,6 +483,11 @@ void OPENGL_GAL::EndDrawing() // TODO Checking if we are using right VBOs, in other case do the binding. // Right now there is only one VBO, so there is no problem. + if( !glUnmapBuffer( GL_ELEMENT_ARRAY_BUFFER ) ) + { + wxLogError( wxT( "Unmapping indices buffer failed" ) ); + } + // Prepare buffers glEnableClientState( GL_VERTEX_ARRAY ); glEnableClientState( GL_COLOR_ARRAY ); @@ -492,28 +507,7 @@ void OPENGL_GAL::EndDrawing() VBO_ITEM::VertByteSize, (GLvoid*) VBO_ITEM::ShaderByteOffset ); } - glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, curVboIndId ); - GLuint* indicesPtr = static_cast( glMapBuffer( GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY ) ); - - if( indicesPtr == NULL ) - { - wxLogError( wxT( "Could not map GPU memory" ) ); - } - - // Copy indices of items that should be drawn to GPU memory - std::list::const_iterator it, end; - for( it = itemsToDraw.begin(), end = itemsToDraw.end(); it != end; ++it ) - { - memcpy( indicesPtr, (*it)->GetIndices(), (*it)->GetSize() * VBO_ITEM::IndByteSize ); - indicesPtr += (*it)->GetSize() * VBO_ITEM::IndStride; - } - - if( !glUnmapBuffer( GL_ELEMENT_ARRAY_BUFFER ) ) - { - wxLogError( wxT( "Unmapping indices buffer failed" ) ); - } - - glDrawElements( GL_TRIANGLES, itemsToDrawSize, GL_UNSIGNED_INT, (GLvoid*) 0 ); + glDrawElements( GL_TRIANGLES, indicesSize, GL_UNSIGNED_INT, (GLvoid*) 0 ); glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 ); glBindBuffer( GL_ARRAY_BUFFER, 0 ); @@ -1704,8 +1698,13 @@ void OPENGL_GAL::DeleteGroup( int aGroupNumber ) void OPENGL_GAL::DrawGroup( int aGroupNumber ) { - itemsToDraw.push_back( vboItems[aGroupNumber] ); - itemsToDrawSize += vboItems[aGroupNumber]->GetSize(); + int size = vboItems[aGroupNumber]->GetSize(); + int offset = vboItems[aGroupNumber]->GetOffset(); + + // Copy indices of items that should be drawn to GPU memory + for( int i = offset; i < offset + size; *indicesPtr++ = i++ ); + + indicesSize += size; } diff --git a/common/gal/opengl/vbo_item.cpp b/common/gal/opengl/vbo_item.cpp index 6aeb98034d..1412a83b57 100644 --- a/common/gal/opengl/vbo_item.cpp +++ b/common/gal/opengl/vbo_item.cpp @@ -34,7 +34,6 @@ using namespace KiGfx; VBO_ITEM::VBO_ITEM() : m_vertices( NULL ), - m_indices( NULL ), m_offset( 0 ), m_size( 0 ), m_isDirty( true ), @@ -56,17 +55,10 @@ VBO_ITEM::~VBO_ITEM() std::list::const_iterator v_it, v_end; for( v_it = m_vertBlocks.begin(), v_end = m_vertBlocks.end(); v_it != v_end; ++v_it ) delete[] *v_it; - - std::list::const_iterator i_it, i_end; - for( i_it = m_indBlocks.begin(), i_end = m_indBlocks.end(); i_it != i_end; ++i_it ) - delete[] *i_it; } if( m_vertices ) delete m_vertices; - - if( m_indices ) - delete m_indices; } @@ -100,10 +92,6 @@ void VBO_ITEM::PushVertex( const GLfloat* aVertex ) // Move to the next free space m_vertPtr++; - // Add the new index - *m_indPtr = m_offset + m_size; - m_indPtr++; - m_size++; m_isDirty = true; m_spaceLeft--; @@ -128,50 +116,6 @@ GLfloat* VBO_ITEM::GetVertices() } -GLuint* VBO_ITEM::GetIndices() -{ - if( m_isDirty ) - prepareFinal(); - - return m_indices; -} - - -int VBO_ITEM::GetSize() const -{ - return m_size; -} - - -void VBO_ITEM::SetOffset( int aOffset ) -{ - if( m_offset == aOffset ) - return; - - int delta = aOffset - m_offset; - - // Change offset for all the stored indices - for( int i = 0; i < m_size; ++i ) - { - m_indices += delta; - } - - m_offset = aOffset; -} - - -int VBO_ITEM::GetOffset() const -{ - return m_offset; -} - - -void VBO_ITEM::SetTransformMatrix( const glm::mat4* aMatrix ) -{ - m_transform = aMatrix; -} - - void VBO_ITEM::ChangeColor( const COLOR4D& aColor ) { if( m_isDirty ) @@ -191,31 +135,12 @@ void VBO_ITEM::ChangeColor( const COLOR4D& aColor ) } -void VBO_ITEM::UseColor( const COLOR4D& aColor ) -{ - m_color[0] = aColor.r; - m_color[1] = aColor.g; - m_color[2] = aColor.b; - m_color[3] = aColor.a; -} - - -void VBO_ITEM::UseShader( const GLfloat* aShader ) -{ - memcpy( m_shader, aShader, ShaderByteSize ); -} - - void VBO_ITEM::useNewBlock() { VBO_VERTEX* newVertBlock = new VBO_VERTEX[BLOCK_SIZE]; - GLuint* newIndBlock = new GLuint[BLOCK_SIZE]; m_vertPtr = newVertBlock; - m_indPtr = newIndBlock; - m_vertBlocks.push_back( newVertBlock ); - m_indBlocks.push_back( newIndBlock ); m_spaceLeft = BLOCK_SIZE; } @@ -243,25 +168,5 @@ void VBO_ITEM::prepareFinal() // In the last block we need to copy only used vertices memcpy( vertPtr, *v_it, ( BLOCK_SIZE - m_spaceLeft ) * VertByteSize ); - if( m_indices ) - delete m_indices; - - // Allocate memory that would store all of indices - m_indices = new GLuint[m_size * IndStride]; - // Set the pointer that will move along the buffer - GLuint* indPtr = m_indices; - - // Copy blocks of indices one after another to m_indices - std::list::const_iterator i_it; - for( i_it = m_indBlocks.begin(); *i_it != m_indBlocks.back(); ++i_it ) - { - memcpy( indPtr, *i_it, BLOCK_SIZE * IndByteSize ); - delete[] *i_it; - indPtr += ( BLOCK_SIZE * IndStride ); - } - - // In the last block we need to copy only used indices - memcpy( indPtr, *i_it, ( BLOCK_SIZE - m_spaceLeft ) * IndByteSize ); - m_isDirty = false; } diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 56a2c38911..0c04447040 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -353,9 +353,8 @@ private: bool vboNeedsUpdate; ///< Flag indicating if VBO should be rebuilt glm::mat4 transform; ///< Current transformation matrix std::stack transformStack; ///< Stack of transformation matrices - std::list itemsToDraw; ///< Stores items that are going to be - ///< drawn in the current frame - int itemsToDrawSize; ///< Number of indices to be drawn + int indicesSize; ///< Number of indices to be drawn + GLuint* indicesPtr; ///< Pointer to mapped GPU memory double curvePoints[12]; ///< Coefficients for curves // FIXME to be removed: diff --git a/include/gal/opengl/vbo_item.h b/include/gal/opengl/vbo_item.h index 028105506f..a3b476cbb5 100644 --- a/include/gal/opengl/vbo_item.h +++ b/include/gal/opengl/vbo_item.h @@ -45,8 +45,7 @@ typedef struct VBO_VERTEX GLfloat x, y, z; // Coordinates GLfloat r, g, b, a; // Color GLfloat shader[4]; // Shader type & params -} VBO_VERTEX_DATA; - +} VBO_VERTEX; class VBO_ITEM { @@ -81,33 +80,36 @@ public: */ GLfloat* GetVertices(); - /** - * Function GetIndices() - * Returns a pointer to the array containing all indices of vertices. - * @return Pointer to indices. - */ - GLuint* GetIndices(); /** * Function GetSize() * Returns information about number of vertices stored. * @param Amount of vertices. */ - int GetSize() const; + inline int GetSize() const + { + return m_size; + } /** * Function SetOffset() * Sets data offset in the VBO. * @param aOffset is the offset expressed as a number of vertices. */ - void SetOffset( int aOffset ); + void SetOffset( int aOffset ) + { + m_offset = aOffset; + } /** * Function GetOffset() * Returns data offset in the VBO. * @return Data offset expressed as a number of vertices. */ - int GetOffset() const; + inline int GetOffset() const + { + return m_offset; + } /** * Function SetTransformMatrix() @@ -116,7 +118,10 @@ public: * @param aMatrix is the new transform matrix or NULL if you do not want to use transformation * matrix. */ - void SetTransformMatrix( const glm::mat4* aMatrix ); + void SetTransformMatrix( const glm::mat4* aMatrix ) + { + m_transform = aMatrix; + } /** * Function ChangeColor() @@ -130,18 +135,37 @@ public: * Sets color used for all added vertices. * @param aColor is the color used for added vertices. */ - void UseColor( const COLOR4D& aColor ); + void UseColor( const COLOR4D& aColor ) + { + m_color[0] = aColor.r; + m_color[1] = aColor.g; + m_color[2] = aColor.b; + m_color[3] = aColor.a; + } /** * Function UseShader() * Sets shader and its parameters used for all added vertices. * @param aShader is the array that contains shader number followed by its parameters. */ - void UseShader( const GLfloat* aShader ); + inline void UseShader( const GLfloat* aShader ) + { + for( int i = 0; i < ShaderStride; ++i ) + { + m_shader[i] = aShader[i]; + } + } + + + inline void FreeVerticesData() + { + if( m_vertices && !m_isDirty ) + { + delete[] m_vertices; + m_vertices = NULL; + } + } - ///< Functions for getting VBO ids. - //void SetVbo( int aVboId ); - //int GetVbo() const; ///< Data organization information for vertices {X,Y,Z,R,G,B,A} (@see VBO_VERTEX). static const int VertByteSize = sizeof(VBO_VERTEX); @@ -164,26 +188,22 @@ public: static const int ShaderByteSize = sizeof(VBO_VERTEX().shader); static const int ShaderStride = ShaderByteSize / sizeof(GLfloat); - static const int IndStride = 1; - static const int IndByteSize = IndStride * sizeof(GLuint); + static const int IndByteSize = sizeof(GLuint); private: ///< Contains vertices coordinates and colors. ///< Packed by 7 floats for each vertex: {X, Y, Z, R, G, B, A} GLfloat* m_vertices; - ///< Indices of vertices - GLuint* m_indices; - ///< Lists of data blocks storing vertices std::list m_vertBlocks; - std::list m_indBlocks; + ///< Pointers to current blocks that should be used for storing data VBO_VERTEX* m_vertPtr; - GLuint* m_indPtr; + ///< How many vertices can be stored in the current buffer int m_spaceLeft; - ///< Number of vertices & indices stored in a single block + ///< Number of vertices stored in a single block static const int BLOCK_SIZE = 256; ///< Creates a new block for storing vertices data void useNewBlock(); From 5c405a6f40c625caebde3ea4ee84e99af35126fe Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 6 Jun 2013 11:54:37 +0200 Subject: [PATCH 088/415] Removed some debug messages. --- common/gal/opengl/opengl_gal.cpp | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index c0128a9515..cc20bbe6d9 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -588,13 +588,6 @@ inline void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2 double lineLength = startEndVector.EuclideanNorm(); double scale = 0.5 * lineWidth / lineLength; -#ifdef __WXDEBUG__ - if( lineLength > 0.0 ) - { - wxLogDebug( wxT( "Tried to draw line with length <= 0" ) ); - } -#endif /* __WXDEBUG__ */ - if( lineLength <= 0.0 ) return; @@ -1098,13 +1091,6 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) { -#ifdef __WXDEBUG__ - if( aRadius > 0.0 ) - { - wxLogDebug( wxT( "Tried to draw circle with radius <= 0" ) ); - } -#endif /* __WXDEBUG__ */ - if( isUseShader ) { if( isFillEnabled ) @@ -1663,13 +1649,6 @@ int OPENGL_GAL::BeginGroup() void OPENGL_GAL::EndGroup() { -#ifdef __WXDEBUG__ - if( curVboItem->GetSize() != 0 ) - { - wxLogDebug( wxT( "Tried to add group that contains nothing" ) ); - } -#endif /* __WXDEBUG__ */ - vboSize += curVboItem->GetSize(); curVboItem = NULL; isGrouping = false; From 198052358e02dad93c578f74ba602415a9adc0be Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 18 Jun 2013 16:19:30 +0200 Subject: [PATCH 089/415] Added GAL_TYPE_NONE as an indicator of GAL uninitialized state. --- common/drawpanel_gal.cpp | 13 ++++++++----- include/class_drawpanel_gal.h | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index ea6e31ed7d..cb338db085 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -51,9 +51,10 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin GalType aGalType ) : wxWindow( aParentWindow, aWindowId, aPosition, aSize ) { - m_gal = NULL; - m_view = NULL; - m_painter = NULL; + m_gal = NULL; + m_currentGal = GAL_TYPE_NONE; + m_view = NULL; + m_painter = NULL; wxStandardPaths paths; wxFileName executableFile( paths.GetExecutablePath() ); @@ -158,8 +159,7 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) if( aGalType == m_currentGal && aUseShaders == m_useShaders && m_gal != NULL ) return; - if( m_gal ) - delete m_gal; + delete m_gal; switch( aGalType ) { @@ -171,6 +171,9 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) case GAL_TYPE_CAIRO: m_gal = new KiGfx::CAIRO_GAL( this, this, this ); break; + + case GAL_TYPE_NONE: + return; } m_gal->SetWorldUnitLength( 1.0 / METRIC_UNIT_LENGTH * 2.54 ); // 1 inch in nanometers diff --git a/include/class_drawpanel_gal.h b/include/class_drawpanel_gal.h index 62f98c5767..d0b94f08e4 100644 --- a/include/class_drawpanel_gal.h +++ b/include/class_drawpanel_gal.h @@ -50,6 +50,7 @@ class EDA_DRAW_PANEL_GAL : public wxWindow { public: enum GalType { + GAL_TYPE_NONE, ///< Not used GAL_TYPE_OPENGL, ///< OpenGL implementation GAL_TYPE_CAIRO, ///< Cairo implementation }; From 8a89e160ed7133b4216a05751f9e6dc85f185273 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 18 Jun 2013 16:20:29 +0200 Subject: [PATCH 090/415] Added VBO_CONTAINER as a faster storage for vertices (OPENGL_GAL), tuned for exchanging data with GPU. Removed a few unnecessary variables and fields from OPENGL_GAL. Added function GAL::ClearCache() for freeing memory used by cached items. Fixed a few memory leaks (tesselator, PAINTER's settings & VIEW_ITEM's groups). Changed a few functions into inlines. --- common/CMakeLists.txt | 1 + common/gal/cairo/cairo_gal.cpp | 18 +- common/gal/opengl/opengl_gal.cpp | 312 ++++++++----------- common/gal/opengl/vbo_container.cpp | 369 +++++++++++++++++++++++ common/gal/opengl/vbo_item.cpp | 105 +++---- common/gal/stroke_font.cpp | 4 +- common/painter.cpp | 1 + common/view/view.cpp | 5 + common/view/view_item.cpp | 4 +- include/gal/cairo/cairo_gal.h | 3 + include/gal/graphics_abstraction_layer.h | 5 + include/gal/opengl/opengl_gal.h | 94 +++++- include/gal/opengl/vbo_container.h | 256 ++++++++++++++++ include/gal/opengl/vbo_item.h | 81 +++-- include/view/view_item.h | 3 +- 15 files changed, 925 insertions(+), 336 deletions(-) create mode 100644 common/gal/opengl/vbo_container.cpp create mode 100644 include/gal/opengl/vbo_container.h diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index cffff218b0..4a173cf3fa 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -21,6 +21,7 @@ set(GAL_SRCS gal/opengl/opengl_gal.cpp gal/opengl/shader.cpp gal/opengl/vbo_item.cpp + gal/opengl/vbo_container.cpp gal/cairo/cairo_gal.cpp view/wx_view_controls.cpp ) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index c2be24ce53..a9b898355d 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -99,10 +99,7 @@ CAIRO_GAL::~CAIRO_GAL() delete cursorPixels; delete cursorPixelsSaved; - for( int i = groups.size() - 1; i >= 0; --i ) - { - DeleteGroup( i ); - } + ClearCache(); deleteBitmaps(); } @@ -687,13 +684,22 @@ void CAIRO_GAL::EndGroup() } +void CAIRO_GAL::ClearCache() +{ + for( int i = groups.size() - 1; i >= 0; --i ) + { + DeleteGroup( i ); + } +} + + void CAIRO_GAL::DeleteGroup( int aGroupNumber ) { storePath(); // Delete the Cairo paths - for( std::deque::iterator it = groups[aGroupNumber].begin(), end = groups[aGroupNumber].end(); - it != end; ++it ) + std::deque::iterator it, end; + for( it = groups[aGroupNumber].begin(), end = groups[aGroupNumber].end(); it != end; ++it ) { if( it->command == CMD_FILL_PATH || it->command == CMD_STROKE_PATH ) { diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index cc20bbe6d9..33a36f1fb9 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -29,8 +29,8 @@ #include #include +#include #include -#include #include #include @@ -78,7 +78,6 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, isVboInitialized = false; vboNeedsUpdate = false; curVboItem = NULL; - vboSize = 0; transform = glm::mat4( 1.0f ); // Identity matrix SetSize( parentSize ); @@ -107,12 +106,26 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); #endif + vboContainer = new VBO_CONTAINER; + + // Tesselator initialization + tesselator = gluNewTess(); + InitTesselatorCallbacks( tesselator ); + gluTessProperty( tesselator, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_POSITIVE ); + if( !isUseShader ) { + // (3 vertices per triangle) * (2 items [circle&semicircle]) * (number of points per item) + precomputedContainer = new VBO_CONTAINER( 3 * 2 * CIRCLE_POINTS ); + // Compute the unit circles, used for speed up of the circle drawing + verticesCircle = new VBO_ITEM( precomputedContainer ); computeUnitCircle(); + verticesCircle->Finish(); + + verticesSemiCircle = new VBO_ITEM( precomputedContainer ); computeUnitSemiCircle(); - //computeUnitArcs(); // TODO remove? it is not used anywhere + verticesSemiCircle->Finish(); } } @@ -121,6 +134,13 @@ OPENGL_GAL::~OPENGL_GAL() { glFlush(); + if( !isUseShader ) + { + delete verticesCircle; + delete verticesSemiCircle; + delete precomputedContainer; + } + // Delete the buffers if( isFrameBufferInitialized ) { @@ -128,16 +148,13 @@ OPENGL_GAL::~OPENGL_GAL() deleteFrameBuffer( &frameBufferBackup, &depthBufferBackup, &textureBackup ); } + gluDeleteTess( tesselator ); + if( isVboInitialized ) { - std::deque::iterator it, end; - - for( it = vboItems.begin(), end = vboItems.end(); it != end; it++ ) - { - delete *it; - } - + ClearCache(); deleteVertexBufferObjects(); + delete vboContainer; } delete glContext; @@ -241,8 +258,8 @@ void OPENGL_GAL::initFrameBuffers() void OPENGL_GAL::initVertexBufferObjects() { // Generate buffers for vertices and indices - glGenBuffers( 1, &curVboVertId ); - glGenBuffers( 1, &curVboIndId ); + glGenBuffers( 1, &vboVertices ); + glGenBuffers( 1, &vboIndices ); isVboInitialized = true; } @@ -253,8 +270,8 @@ void OPENGL_GAL::deleteVertexBufferObjects() glBindBuffer( GL_ARRAY_BUFFER, 0 ); glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 ); - glDeleteBuffers( 1, &curVboVertId ); - glDeleteBuffers( 1, &curVboIndId ); + glDeleteBuffers( 1, &vboVertices ); + glDeleteBuffers( 1, &vboIndices ); isVboInitialized = false; } @@ -348,7 +365,6 @@ void OPENGL_GAL::BeginDrawing() // Compile the shaders if( !isShaderInitialized && isUseShader ) { - shader.ConfigureGeometryShader( 3, GL_TRIANGLES, GL_TRIANGLES ); shader.AddSource( shaderPath + std::string( "/shader.vert" ), SHADER_TYPE_VERTEX ); shader.AddSource( shaderPath + std::string( "/shader.frag" ), SHADER_TYPE_FRAGMENT ); if( !shader.Link() ) @@ -417,9 +433,10 @@ void OPENGL_GAL::BeginDrawing() // Number of vertices to be drawn indicesSize = 0; - glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, curVboIndId ); + glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, vboIndices ); // Discard old buffer, so we can use it again - glBufferData( GL_ELEMENT_ARRAY_BUFFER, vboSize * VBO_ITEM::IndByteSize, NULL, GL_STREAM_DRAW ); + glBufferData( GL_ELEMENT_ARRAY_BUFFER, vboContainer->GetSize() * VBO_ITEM::IndByteSize, + NULL, GL_STREAM_DRAW ); // Map the GPU memory, so we can store indices that are going to be drawn indicesPtr = static_cast( glMapBuffer( GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY ) ); @@ -493,7 +510,7 @@ void OPENGL_GAL::EndDrawing() glEnableClientState( GL_COLOR_ARRAY ); // Bind vertices data buffers - glBindBuffer( GL_ARRAY_BUFFER, curVboVertId ); + glBindBuffer( GL_ARRAY_BUFFER, vboVertices ); glVertexPointer( VBO_ITEM::CoordStride, GL_FLOAT, VBO_ITEM::VertByteSize, 0 ); glColorPointer( VBO_ITEM::ColorStride, GL_FLOAT, VBO_ITEM::VertByteSize, (GLvoid*) VBO_ITEM::ColorByteOffset ); @@ -544,40 +561,27 @@ void OPENGL_GAL::rebuildVbo() prof_start( &totalTime, false ); #endif /* __WXDEBUG__ */ - // Buffer for storing cached items data - GLfloat* verticesBuffer = new GLfloat[VBO_ITEM::VertStride * vboSize]; + GLfloat* data = (GLfloat*) vboContainer->GetAllVertices(); - // Pointer for easier usage with memcpy - GLfloat* verticesBufferPtr = verticesBuffer; - - // Fill out buffers with data - for( std::deque::iterator vboItem = vboItems.begin(); - vboItem != vboItems.end(); vboItem++ ) - { - int size = (*vboItem)->GetSize(); - - memcpy( verticesBufferPtr, (*vboItem)->GetVertices(), size * VBO_ITEM::VertByteSize ); - verticesBufferPtr += size * VBO_ITEM::VertStride; - } - - // Upload vertices coordinates, shader types and indices to GPU memory - glBindBuffer( GL_ARRAY_BUFFER, curVboVertId ); - glBufferData( GL_ARRAY_BUFFER, vboSize * VBO_ITEM::VertByteSize, verticesBuffer, GL_DYNAMIC_DRAW ); + // Upload vertices coordinates and shader types to GPU memory + glBindBuffer( GL_ARRAY_BUFFER, vboVertices ); + glBufferData( GL_ARRAY_BUFFER, vboContainer->GetSize() * VBO_ITEM::VertByteSize, + data, GL_DYNAMIC_DRAW ); glBindBuffer( GL_ARRAY_BUFFER, 0 ); // Allocate the biggest possible buffer for indices - glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, curVboIndId ); - glBufferData( GL_ELEMENT_ARRAY_BUFFER, vboSize * VBO_ITEM::IndByteSize, NULL, GL_STREAM_DRAW ); + glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, vboIndices ); + glBufferData( GL_ELEMENT_ARRAY_BUFFER, vboContainer->GetSize() * VBO_ITEM::IndByteSize, + NULL, GL_STREAM_DRAW ); glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 ); - delete[] verticesBuffer; vboNeedsUpdate = false; #ifdef __WXDEBUG__ prof_end( &totalTime ); wxLogDebug( wxT( "Rebuilding VBO::%d vertices / %.1f ms" ), - vboSize, (double) totalTime.value / 1000.0 ); + vboContainer->GetSize(), (double) totalTime.value / 1000.0 ); #endif /* __WXDEBUG__ */ } @@ -726,74 +730,6 @@ inline void OPENGL_GAL::drawLineCap( const VECTOR2D& aStartPoint, const VECTOR2D } -void OPENGL_GAL::begin( GLenum aMode ) -{ - if( !isGrouping ) - glBegin( aMode ); -} - - -void OPENGL_GAL::end() -{ - if( !isGrouping ) - glEnd(); -} - - -void OPENGL_GAL::vertex3( double aX, double aY, double aZ ) -{ - if( isGrouping ) - { - // New vertex coordinates for VBO - const GLfloat vertex[] = { aX, aY, aZ }; - curVboItem->PushVertex( vertex ); - } - else - { - glVertex3d( aX, aY, aZ ); - } -} - - -void OPENGL_GAL::translate3( double aX, double aY, double aZ ) -{ - if( isGrouping ) - { - transform = glm::translate( transform, glm::vec3( aX, aY, aZ ) ); - } - else - { - glTranslated( aX, aY, aZ ); - } -} - - -void OPENGL_GAL::color4( double aRed, double aGreen, double aBlue, double aAlpha ) -{ - if( isGrouping ) - { - curVboItem->UseColor( COLOR4D( aRed, aGreen, aBlue, aAlpha ) ); - } - else - { - glColor4d( aRed, aGreen, aBlue, aAlpha ); - } -} - - -void OPENGL_GAL::color4( const COLOR4D& aColor ) -{ - if( isGrouping ) - { - curVboItem->UseColor( aColor ); - } - else - { - glColor4d( aColor.r, aColor.g, aColor.b, aColor.a); - } -} - - void OPENGL_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { if( isFillEnabled ) @@ -1206,7 +1142,13 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) if( isGrouping ) { - curVboItem->PushVertices( verticesCircle.GetVertices(), verticesCircle.GetSize() ); + VBO_VERTEX* circle = new VBO_VERTEX[CIRCLE_POINTS * 3]; + + memcpy( circle, verticesCircle->GetVertices(), + VBO_ITEM::VertByteSize * CIRCLE_POINTS * 3 ); + curVboItem->PushVertices( circle, CIRCLE_POINTS * 3 ); + + delete[] circle; } else { @@ -1256,7 +1198,13 @@ void OPENGL_GAL::drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, d if( isGrouping ) { - curVboItem->PushVertices( verticesSemiCircle.GetVertices(), verticesSemiCircle.GetSize() ); + VBO_VERTEX* semiCircle = new VBO_VERTEX[CIRCLE_POINTS * 3]; + + memcpy( semiCircle, verticesSemiCircle->GetVertices(), + VBO_ITEM::VertByteSize * CIRCLE_POINTS * 3 ); + curVboItem->PushVertices( semiCircle, CIRCLE_POINTS * 3 ); + + delete[] semiCircle; } else { @@ -1416,32 +1364,19 @@ void OPENGL_GAL::DrawPolygon( const std::deque& aPointList ) setShader( SHADER_NONE ); - GLUtesselator* tesselator = gluNewTess(); - typedef std::vector OGLPOINTS; // Do only one heap allocation, can do because we know size in advance. // std::vector is then fastest OGLPOINTS vertexList( aPointList.size(), OGLPOINT( "fastest" ) ); - InitTesselatorCallbacks( tesselator ); - - gluTessProperty( tesselator, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_POSITIVE ); - glNormal3d( 0.0, 0.0, 1.0 ); color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); glShadeModel( GL_FLAT ); - if( isGrouping ) - { - // Store polygon triangles' coordinates to the current VBO item - gluTessBeginPolygon( tesselator, curVboItem ); - } - else - { - // Display polygons directly - gluTessBeginPolygon( tesselator, NULL ); - } + + TessParams params = { curVboItem, tessIntersects }; + gluTessBeginPolygon( tesselator, ¶ms ); gluTessBeginContour( tesselator ); // use operator=( const POINTS& ) @@ -1456,7 +1391,13 @@ void OPENGL_GAL::DrawPolygon( const std::deque& aPointList ) gluTessEndContour( tesselator ); gluTessEndPolygon( tesselator ); - gluDeleteTess( tesselator ); + // Free allocated intersecting points + std::vector::iterator it, it_end; + for( it = tessIntersects.begin(), it_end = tessIntersects.end(); it < it_end; ++it ) + { + delete[] *it; + } + tessIntersects.clear(); // vertexList destroyed here } @@ -1639,8 +1580,7 @@ int OPENGL_GAL::BeginGroup() vboNeedsUpdate = true; // Save the pointer for caching the current item - curVboItem = new VBO_ITEM; - curVboItem->SetOffset( vboSize ); + curVboItem = new VBO_ITEM( vboContainer ); vboItems.push_back( curVboItem ); return vboItems.size() - 1; @@ -1649,27 +1589,30 @@ int OPENGL_GAL::BeginGroup() void OPENGL_GAL::EndGroup() { - vboSize += curVboItem->GetSize(); + curVboItem->Finish(); curVboItem = NULL; isGrouping = false; } +void OPENGL_GAL::ClearCache() +{ + std::deque::iterator it, end; + for( it = vboItems.begin(), end = vboItems.end(); it != end; it++ ) + { + delete *it; + } + + vboItems.clear(); +} + + void OPENGL_GAL::DeleteGroup( int aGroupNumber ) { -#ifdef __WXDEBUG__ - if( (unsigned) aGroupNumber < vboItems.size() ) - { - wxLogDebug( wxT( "Tried to delete not existing group" ) ); - } -#endif /* __WXDEBUG__ */ + VBO_ITEM* item = vboItems[aGroupNumber]; - std::deque::iterator it = vboItems.begin(); - std::advance( it, aGroupNumber ); - - // vboSize -= it->GetSize(); // FIXME? - delete *it; - // vboItems.erase( it ); // makes change to group numbers - that's veeery bad + vboItems[aGroupNumber] = NULL; + delete item; vboNeedsUpdate = true; } @@ -1687,26 +1630,6 @@ void OPENGL_GAL::DrawGroup( int aGroupNumber ) } -// TODO it is not used anywhere -/*void OPENGL_GAL::computeUnitArcs() -{ - displayListsArcs = glGenLists( CIRCLE_POINTS + 1 ); - - // Create an individual display list for each arc in with an angle [0 .. 2pi] - for( int j = 0; j < CIRCLE_POINTS + 1; j++ ) - { - glNewList( displayListsArcs + j, GL_COMPILE ); - - for( int i = 0; i < j; i++ ) - { - glVertex2d( cos( 2 * M_PI / CIRCLE_POINTS * i ), sin( 2 * M_PI / CIRCLE_POINTS * i ) ); - } - - glEndList(); - } -}*/ - - void OPENGL_GAL::computeUnitCircle() { displayListCircle = glGenLists( 1 ); @@ -1718,30 +1641,28 @@ void OPENGL_GAL::computeUnitCircle() // Insert in a display list and a vector for( int i = 0; i < CIRCLE_POINTS; i++ ) { - const GLfloat v0[] = { 0.0f, 0.0f, 0.0f }; - const GLfloat v1[] = - { + VBO_VERTEX v0( 0.0f, 0.0f, 0.0f ); + VBO_VERTEX v1( cos( 2.0 * M_PI / CIRCLE_POINTS * i ), // x sin( 2.0 * M_PI / CIRCLE_POINTS * i ), // y 0.0f // z - }; - const GLfloat v2[] = - { + ); + VBO_VERTEX v2( cos( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), // x sin( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), // y 0.0f // z - }; + ); glVertex2d( 0, 0 ); - verticesCircle.PushVertex( v0 ); + verticesCircle->PushVertex( &v0 ); - glVertex2d( v1[0], v1[1] ); - verticesCircle.PushVertex( v1 ); - unitCirclePoints.push_back( VECTOR2D( v1[0], v1[1] ) ); // TODO remove + glVertex2d( v1.x, v1.y ); + verticesCircle->PushVertex( &v1 ); + unitCirclePoints.push_back( VECTOR2D( v1.x, v1.y ) ); // TODO remove - glVertex2d( v2[0], v2[1] ); - verticesCircle.PushVertex( v2 ); - unitCirclePoints.push_back( VECTOR2D( v2[0], v2[1] ) ); // TODO remove + glVertex2d( v2.x, v2.y ); + verticesCircle->PushVertex( &v2 ); + unitCirclePoints.push_back( VECTOR2D( v2.x, v2.y ) ); // TODO remove } glEnd(); @@ -1759,28 +1680,26 @@ void OPENGL_GAL::computeUnitSemiCircle() for( int i = 0; i < CIRCLE_POINTS / 2; ++i ) { - GLfloat v0[] = { 0.0f, 0.0f, 0.0f }; - GLfloat v1[] = - { + VBO_VERTEX v0( 0.0f, 0.0f, 0.0f ); + VBO_VERTEX v1( cos( 2.0 * M_PI / CIRCLE_POINTS * i ), // x sin( 2.0 * M_PI / CIRCLE_POINTS * i ), // y 0.0f // z - }; - GLfloat v2[] = - { + ); + VBO_VERTEX v2( cos( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), // x sin( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), // y 0.0f // z - }; + ); glVertex2d( 0, 0 ); - verticesSemiCircle.PushVertex( v0 ); + verticesSemiCircle->PushVertex( &v0 ); - glVertex2d( v1[0], v1[1] ); - verticesSemiCircle.PushVertex( v1 ); + glVertex2d( v1.x, v1.y ); + verticesSemiCircle->PushVertex( &v1 ); - glVertex2d( v2[0], v2[1] ); - verticesSemiCircle.PushVertex( v2 ); + glVertex2d( v2.x, v2.y ); + verticesSemiCircle->PushVertex( &v2 ); } glEnd(); @@ -1825,12 +1744,13 @@ void OPENGL_GAL::ComputeWorldScreenMatrix() void CALLBACK VertexCallback( GLvoid* aVertexPtr, void* aData ) { GLdouble* vertex = static_cast( aVertexPtr ); + OPENGL_GAL::TessParams* param = static_cast( aData ); + VBO_ITEM* vboItem = param->vboItem; - if( aData ) + if( vboItem ) { - VBO_ITEM* vboItem = static_cast( aData ); - const GLfloat newVertex[] = { vertex[0], vertex[1], vertex[2] }; - vboItem->PushVertex( newVertex ); + VBO_VERTEX newVertex( vertex[0], vertex[1], vertex[2] ); + vboItem->PushVertex( &newVertex ); } else { @@ -1841,9 +1761,13 @@ void CALLBACK VertexCallback( GLvoid* aVertexPtr, void* aData ) void CALLBACK CombineCallback( GLdouble coords[3], GLdouble* vertex_data[4], - GLfloat weight[4], GLdouble** dataOut ) + GLfloat weight[4], GLdouble** dataOut, void* aData ) { GLdouble* vertex = new GLdouble[3]; + OPENGL_GAL::TessParams* param = static_cast( aData ); + + // Save the pointer so we can delete it later + param->intersectPoints.push_back( vertex ); memcpy( vertex, coords, 3 * sizeof(GLdouble) ); @@ -1884,7 +1808,7 @@ void CALLBACK ErrorCallback( GLenum aErrorCode ) void InitTesselatorCallbacks( GLUtesselator* aTesselator ) { gluTessCallback( aTesselator, GLU_TESS_VERTEX_DATA, ( void (CALLBACK*)() )VertexCallback ); - gluTessCallback( aTesselator, GLU_TESS_COMBINE, ( void (CALLBACK*)() )CombineCallback ); + gluTessCallback( aTesselator, GLU_TESS_COMBINE_DATA, ( void (CALLBACK*)() )CombineCallback ); gluTessCallback( aTesselator, GLU_TESS_EDGE_FLAG, ( void (CALLBACK*)() )EdgeCallback ); gluTessCallback( aTesselator, GLU_TESS_BEGIN_DATA, ( void (CALLBACK*)() )BeginCallback ); gluTessCallback( aTesselator, GLU_TESS_END_DATA, ( void (CALLBACK*)() )EndCallback ); diff --git a/common/gal/opengl/vbo_container.cpp b/common/gal/opengl/vbo_container.cpp new file mode 100644 index 0000000000..33fd141a4a --- /dev/null +++ b/common/gal/opengl/vbo_container.cpp @@ -0,0 +1,369 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file vbo_container.cpp + * @brief Class to store VBO_ITEMs. + */ + +#include +#include +#include +#include +#ifdef __WXDEBUG__ +#include +#endif /* __WXDEBUG__ */ + +#define CONTAINER_TEST 1 + +using namespace KiGfx; + +VBO_CONTAINER::VBO_CONTAINER( int aSize ) : + m_freeSpace( aSize ), m_currentSize( aSize ), itemStarted( false ) +{ + m_vertices = new VBO_VERTEX[aSize]; + + // In the beginning there is only free space + m_freeChunks.insert( Chunk( aSize, 0 ) ); +} + + +VBO_CONTAINER::~VBO_CONTAINER() +{ + delete[] m_vertices; +} + + +void VBO_CONTAINER::StartItem( VBO_ITEM* aVboItem ) +{ + itemStarted = true; + item = aVboItem; + itemSize = 0; + + // Reserve minimal sensible chunk size (at least to store a single triangle) + itemChunkSize = 3; + allocate( aVboItem, itemChunkSize ); +} + + +void VBO_CONTAINER::EndItem() +{ + if( itemSize < itemChunkSize ) + { + // There is some memory left, so we should return it to the pool + int itemChunkOffset = item->GetOffset(); + + m_reservedChunks.erase( item ); + m_reservedChunks.insert( ReservedChunk( item, Chunk( itemSize, itemChunkOffset ) ) ); + + m_freeChunks.insert( Chunk( itemChunkSize - itemSize, itemChunkOffset + itemSize ) ); + m_freeSpace += ( itemChunkSize - itemSize ); + } + + itemStarted = false; +} + + +void VBO_CONTAINER::Add( VBO_ITEM* aVboItem, const VBO_VERTEX* aVertex, unsigned int aSize ) +{ + unsigned int offset; + + if( itemStarted ) // There is an item being created with an unknown size.. + { + unsigned int itemChunkOffset; + + // ..and unfortunately does not fit into currently reserved chunk + if( itemSize + aSize > itemChunkSize ) + { + // Find the previous chunk for the item, save it, so it can be removed later + ReservedChunkMap::iterator it = m_reservedChunks.find( item ); + + // Reserve bigger memory for the current item + int newSize = ( 2 * itemSize ) + aSize; + itemChunkOffset = allocate( aVboItem, newSize ); + + // Check if there was no error + if( itemChunkOffset > m_currentSize ) + return; + + // Save previous chunk's offset for copying data + int oldItemChunkOffset = getChunkOffset( *it ); + + // Copy all the old data + memcpy( &m_vertices[itemChunkOffset], &m_vertices[oldItemChunkOffset], + itemSize * VBO_ITEM::VertByteSize ); + + // Return memory used by the previous chunk + free( it ); + + itemChunkSize = newSize; + } + else + { + itemChunkOffset = item->GetOffset(); + } + + // Store new vertices in the chunk reserved for the unknown-sized item + offset = itemChunkOffset + itemSize; + itemSize += aSize; + } + else + { + // Add vertices to previously already finished item + wxASSERT_MSG( false, wxT( "Warning: not tested yet" ) ); + + ReservedChunkMap::iterator it = m_reservedChunks.find( aVboItem ); + unsigned int chunkSize = getChunkSize( *it ); + unsigned int itemSize = aVboItem->GetSize(); + + if( chunkSize < itemSize + aSize ) + { + resizeChunk( aVboItem, itemSize + aSize ); + it = m_reservedChunks.find( aVboItem ); + } + + offset = getChunkOffset( *it ) + itemSize; + } + + memcpy( &m_vertices[offset], aVertex, aSize * VBO_ITEM::VertByteSize ); +} + + +VBO_VERTEX* VBO_CONTAINER::GetAllVertices() const +{ + return m_vertices; +} + + +VBO_VERTEX* VBO_CONTAINER::GetVertices( const VBO_ITEM* aVboItem ) const +{ + int offset = aVboItem->GetOffset(); + + return &m_vertices[offset]; +} + + +unsigned int VBO_CONTAINER::allocate( VBO_ITEM* aVboItem, unsigned int aSize ) +{ + // Is there enough space to store vertices? + if( m_freeSpace < aSize ) + { + bool result; + + // Would it be enough to double the current space? + if( aSize < m_freeSpace + m_currentSize ) + { + // Yes: exponential growing + result = resizeContainer( m_currentSize * 2 ); + } + else + { + // No: grow to the nearest bigger power of 2 + result = resizeContainer( getPowerOf2( m_currentSize * 2 + aSize ) ); + } + + // An error has occurred + if( !result ) + return UINT_MAX; + } + + // Look for the space with at least given size + FreeChunkMap::iterator it = m_freeChunks.lower_bound( aSize ); + + if( it == m_freeChunks.end() ) + { + // This means that there is enough space for + // storing vertices, but the space is not continous + if( !defragment() ) + return false; + + // We can take the first free chunk, as there is only one after defragmentation + // and we can be sure that it provides enough space to store the object + it = m_freeChunks.begin(); + } + + unsigned int chunkSize = it->first; + unsigned int chunkOffset = it->second; + m_freeChunks.erase( it ); + + wxASSERT( chunkSize >= aSize ); + + // If there is some space left, return it to the pool - add an entry for it + if( chunkSize > aSize ) + { + m_freeChunks.insert( Chunk( chunkSize - aSize, chunkOffset + aSize ) ); + } + m_freeSpace -= aSize; + m_reservedChunks.insert( ReservedChunk( aVboItem, Chunk( aSize, chunkOffset ) ) ); + + aVboItem->SetOffset( chunkOffset ); + + return chunkOffset; +} + + +void VBO_CONTAINER::free( const ReservedChunkMap::iterator& aChunk ) +{ + // Remove the chunk from the reserved chunks map and add to the free chunks map + int size = getChunkSize( *aChunk ); + int offset = getChunkOffset( *aChunk ); + + m_reservedChunks.erase( aChunk ); + m_freeChunks.insert( Chunk( size, offset ) ); + m_freeSpace += size; +} + + +bool VBO_CONTAINER::defragment( VBO_VERTEX* aTarget ) +{ + if( m_freeChunks.size() <= 1 ) + { + // There is no point in defragmenting, as there is only one or no free chunks + return true; + } + + if( aTarget == NULL ) + { + // No target was specified, so we have to allocate our own space + aTarget = new (std::nothrow) VBO_VERTEX[m_currentSize]; + if( aTarget == NULL ) + { + wxLogError( wxT( "Run out of memory" ) ); + return false; + } + } + + int newOffset = 0; + ReservedChunkMap::iterator it, it_end; + for( it = m_reservedChunks.begin(), it_end = m_reservedChunks.end(); it != it_end; ++it ) + { + VBO_ITEM* vboItem = getChunkVboItem( *it ); + int itemOffset = getChunkOffset( *it ); + int itemSize = getChunkSize( *it ); + + // Move an item to the new container + memcpy( &aTarget[newOffset], &m_vertices[itemOffset], itemSize * VBO_ITEM::VertByteSize ); + + // Update new offset + vboItem->SetOffset( newOffset ); + setChunkOffset( *it, newOffset ); + + // Move to the next free space + newOffset += itemSize; + } + + delete[] m_vertices; + m_vertices = aTarget; + + // Now there is only one big chunk of free memory + m_freeChunks.clear(); + m_freeChunks.insert( Chunk( m_freeSpace, m_currentSize - m_freeSpace ) ); + + return true; +} + + +void VBO_CONTAINER::resizeChunk( VBO_ITEM* aVboItem, int aNewSize ) +{ + wxASSERT_MSG( false, wxT( "Warning: not tested yet" ) ); + + // TODO ESPECIALLY test the case of shrinking chunk + ReservedChunkMap::iterator it = m_reservedChunks.find( aVboItem ); + int size = getChunkSize( *it ); + int offset = getChunkOffset( *it ); + + int newOffset = allocate( aVboItem, aNewSize ); + memcpy( &m_vertices[newOffset], &m_vertices[offset], size * VBO_ITEM::VertByteSize ); + + // Remove the chunk from the reserved chunks map and add to the free chunks map + m_reservedChunks.erase( it ); + m_freeChunks.insert( Chunk( size, offset ) ); + m_freeSpace += size; +} + + +bool VBO_CONTAINER::resizeContainer( unsigned int aNewSize ) +{ + unsigned int copySize; + if( aNewSize < m_currentSize ) + { + // Sanity check, no shrinking if we cannot fit all the data + if( ( m_currentSize - m_freeSpace ) > aNewSize ) + return false; + + defragment(); + copySize = ( m_currentSize - m_freeSpace ); + } + else + { + copySize = m_currentSize; + } + + VBO_VERTEX* newContainer = new (std::nothrow) VBO_VERTEX[aNewSize]; + if( newContainer == NULL ) + { + wxLogError( wxT( "Run out of memory" ) ); + return false; + } + + memcpy( newContainer, m_vertices, copySize * VBO_ITEM::VertByteSize ); + delete[] m_vertices; + m_vertices = newContainer; + + // Update variables + unsigned int lastFreeSize = 0; + unsigned int lastFreeOffset = 0; + + // Search for the last free chunk *at the end of the container* (not the last chunk in general) + FreeChunkMap::reverse_iterator lastFree, freeEnd; + for( lastFree = m_freeChunks.rbegin(), freeEnd = m_freeChunks.rend(); + lastFree != freeEnd && lastFreeSize + lastFreeOffset != m_currentSize; ++lastFree ) + { + lastFreeSize = getChunkSize( *lastFree ); + lastFreeOffset = getChunkOffset( *lastFree ); + } + + if( lastFreeSize + lastFreeOffset == m_currentSize ) + { + // We found a chunk at the end of the container + m_freeChunks.erase( lastFree.base() ); + // so we can merge it with the new free chunk + m_freeChunks.insert( Chunk( aNewSize - m_currentSize + lastFreeSize, // size + m_currentSize - lastFreeSize ) ); // offset + } + else + { + // As there is no free chunk at the end of container - simply add a new entry + if( aNewSize > m_currentSize ) // only in the case of enlargement + { + m_freeChunks.insert( Chunk( aNewSize - m_currentSize, // size + m_currentSize ) ); // offset + } + } + + m_freeSpace += ( aNewSize - m_currentSize ); + m_currentSize = aNewSize; + + return true; +} diff --git a/common/gal/opengl/vbo_item.cpp b/common/gal/opengl/vbo_item.cpp index 1412a83b57..8991c669af 100644 --- a/common/gal/opengl/vbo_item.cpp +++ b/common/gal/opengl/vbo_item.cpp @@ -27,107 +27,98 @@ * @brief Class to handle an item held in a Vertex Buffer Object. */ +#include #include #include using namespace KiGfx; -VBO_ITEM::VBO_ITEM() : - m_vertices( NULL ), +VBO_ITEM::VBO_ITEM( VBO_CONTAINER* aContainer ) : m_offset( 0 ), m_size( 0 ), + m_container( aContainer ), m_isDirty( true ), m_transform( NULL ) { // By default no shader is used m_shader[0] = 0; - // Prepare a block for storing vertices & indices - useNewBlock(); + // The item's size is not known yet, so we just start an item in the container + aContainer->StartItem( this ); } VBO_ITEM::~VBO_ITEM() { - if( m_isDirty ) - { - // Data is still stored in blocks - std::list::const_iterator v_it, v_end; - for( v_it = m_vertBlocks.begin(), v_end = m_vertBlocks.end(); v_it != v_end; ++v_it ) - delete[] *v_it; - } - - if( m_vertices ) - delete m_vertices; + m_container->Free( this ); } -void VBO_ITEM::PushVertex( const GLfloat* aVertex ) +void VBO_ITEM::PushVertex( VBO_VERTEX* aVertex ) { - if( m_spaceLeft == 0 ) - useNewBlock(); - if( m_transform != NULL ) { // Apply transformations - // X, Y, Z coordinates - glm::vec4 vertex( aVertex[0], aVertex[1], aVertex[2], 1.0f ); + glm::vec4 vertex( aVertex->x, aVertex->y, aVertex->z, 1.0f ); vertex = *m_transform * vertex; // Replace only coordinates, leave color as it is - memcpy( &m_vertPtr->x, &vertex[0], CoordByteSize ); - } - else - { - // Add the new vertex - memcpy( &m_vertPtr->x, aVertex, CoordByteSize ); + aVertex->x = vertex.x; + aVertex->y = vertex.y; + aVertex->z = vertex.z; } // Apply currently used color - memcpy( &m_vertPtr->r, m_color, ColorByteSize ); + aVertex->r = m_color[0]; + aVertex->g = m_color[1]; + aVertex->b = m_color[2]; + aVertex->a = m_color[3]; // Apply currently used shader - memcpy( &m_vertPtr->shader, m_shader, ShaderByteSize ); + for( int i = 0; i < ShaderStride; ++i ) + { + aVertex->shader[i] = m_shader[i]; + } - // Move to the next free space - m_vertPtr++; + m_container->Add( this, aVertex ); m_size++; m_isDirty = true; - m_spaceLeft--; } -void VBO_ITEM::PushVertices( const GLfloat* aVertices, GLuint aSize ) +void VBO_ITEM::PushVertices( VBO_VERTEX* aVertices, GLuint aSize ) { for( unsigned int i = 0; i < aSize; ++i ) { - PushVertex( &aVertices[i * VertStride] ); + PushVertex( &aVertices[i] ); } } -GLfloat* VBO_ITEM::GetVertices() +VBO_VERTEX* VBO_ITEM::GetVertices() { if( m_isDirty ) - prepareFinal(); + Finish(); - return m_vertices; + return m_container->GetVertices( this ); } void VBO_ITEM::ChangeColor( const COLOR4D& aColor ) { + wxASSERT_MSG( false, wxT( "This was not tested yet" ) ); + if( m_isDirty ) - prepareFinal(); + Finish(); // Point to color of vertices - GLfloat* vertexPtr = m_vertices + ColorOffset; + VBO_VERTEX* vertexPtr = GetVertices(); const GLfloat newColor[] = { aColor.r, aColor.g, aColor.b, aColor.a }; - for( int i = 0; i < m_size; ++i ) + for( unsigned int i = 0; i < m_size; ++i ) { - memcpy( vertexPtr, newColor, ColorByteSize ); + memcpy( &vertexPtr->r, newColor, ColorByteSize ); // Move on to the next vertex vertexPtr++; @@ -135,38 +126,10 @@ void VBO_ITEM::ChangeColor( const COLOR4D& aColor ) } -void VBO_ITEM::useNewBlock() +void VBO_ITEM::Finish() { - VBO_VERTEX* newVertBlock = new VBO_VERTEX[BLOCK_SIZE]; - - m_vertPtr = newVertBlock; - m_vertBlocks.push_back( newVertBlock ); - - m_spaceLeft = BLOCK_SIZE; -} - - -void VBO_ITEM::prepareFinal() -{ - if( m_vertices ) - delete m_vertices; - - // Allocate memory that would store all of vertices - m_vertices = new GLfloat[m_size * VertStride]; - // Set the pointer that will move along the buffer - GLfloat* vertPtr = m_vertices; - - // Copy blocks of vertices one after another to m_vertices - std::list::const_iterator v_it; - for( v_it = m_vertBlocks.begin(); *v_it != m_vertBlocks.back(); ++v_it ) - { - memcpy( vertPtr, *v_it, BLOCK_SIZE * VertByteSize ); - delete[] *v_it; - vertPtr += ( BLOCK_SIZE * VertStride ); - } - - // In the last block we need to copy only used vertices - memcpy( vertPtr, *v_it, ( BLOCK_SIZE - m_spaceLeft ) * VertByteSize ); + // The unknown-sized item has just ended, so we need to inform the container about it + m_container->EndItem(); m_isDirty = false; } diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp index 8125b73a04..b4b89965de 100644 --- a/common/gal/stroke_font.cpp +++ b/common/gal/stroke_font.cpp @@ -66,8 +66,8 @@ bool STROKE_FONT::LoadNewStrokeFont( const char* const aNewStrokeFont[], int aNe while( aNewStrokeFont[j][i] ) { - VECTOR2D point; - char coordinate[2]; + VECTOR2D point( 0.0, 0.0 ); + char coordinate[2] = { 0, }; for( int k = 0; k < 2; k++ ) { diff --git a/common/painter.cpp b/common/painter.cpp index fa28295158..0541cb1e0e 100644 --- a/common/painter.cpp +++ b/common/painter.cpp @@ -79,6 +79,7 @@ PAINTER::PAINTER( GAL* aGal ) : PAINTER::~PAINTER() { delete m_stroke_font; + delete m_settings; } diff --git a/common/view/view.cpp b/common/view/view.cpp index 26188e3d86..33f83527f3 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -473,6 +473,11 @@ void VIEW::Clear() l->items->RemoveAll(); } + + if( m_useGroups ) + { + m_gal->ClearCache(); + } } diff --git a/common/view/view_item.cpp b/common/view/view_item.cpp index b7f680252d..266f7df186 100644 --- a/common/view/view_item.cpp +++ b/common/view/view_item.cpp @@ -111,7 +111,7 @@ void VIEW_ITEM::setGroup( int aLayer, int aId ) if( m_groupsSize > 0 ) { std::copy( m_groups, m_groups + m_groupsSize, newGroups ); - delete m_groups; + delete[] m_groups; } m_groups = newGroups; @@ -123,7 +123,7 @@ void VIEW_ITEM::deleteGroups() { if( m_groupsSize > 0 ) { - delete m_groups; + delete[] m_groups; m_groupsSize = 0; } } diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index f70dd3e7c2..f042e962eb 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -212,6 +212,9 @@ public: /// @copydoc GAL::DeleteGroup() virtual void DeleteGroup( int aGroupNumber ); + /// @copydoc GAL::ClearCache() + virtual void ClearCache(); + // -------------------------------------------------------- // Handling the world <-> screen transformation // -------------------------------------------------------- diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 245508b7a2..79bc8e2a8e 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -370,6 +370,11 @@ public: */ virtual void DeleteGroup( int aGroupNumber ) = 0; + /** + * @brief Delete all data created during caching of graphic items. + */ + virtual void ClearCache() = 0; + // -------------------------------------------------------- // Handling the world <-> screen transformation // -------------------------------------------------------- diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 0c04447040..1dca06f2a0 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -35,6 +35,8 @@ // OpenGL mathematics library #define GLM_FORCE_RADIANS +#include + #include #include @@ -56,7 +58,7 @@ namespace KiGfx { class SHADER; -class VBO_ITEM; +class VBO_CONTAINER; /** * @brief Class OpenGL_GAL is the OpenGL implementation of the Graphics Abstraction Layer. @@ -236,6 +238,9 @@ public: /// @copydoc GAL::DeleteGroup() virtual void DeleteGroup( int aGroupNumber ); + /// @copydoc GAL::ClearCache() + virtual void ClearCache(); + // -------------------------------------------------------- // Handling the world <-> screen transformation // -------------------------------------------------------- @@ -315,6 +320,13 @@ public: shaderPath = aPath; } + ///< Parameters passed to the GLU tesselator + typedef struct + { + VBO_ITEM* vboItem; ///< VBO_ITEM for storing new vertices + std::vector& intersectPoints; ///< Intersect points, that have to be freed + } TessParams; + protected: virtual void DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); @@ -336,20 +348,19 @@ private: wxEvtHandler* mouseListener; wxEvtHandler* paintListener; - // Display lists - GLuint displayListsArcs; ///< Arc display list - VBO_ITEM verticesArc; + // Display lists (used in shaderless mode) + VBO_CONTAINER* precomputedContainer; ///< Container for storing display lists GLuint displayListCircle; ///< Circle display list - VBO_ITEM verticesCircle; + VBO_ITEM* verticesCircle; GLuint displayListSemiCircle; ///< Semi circle display list - VBO_ITEM verticesSemiCircle; + VBO_ITEM* verticesSemiCircle; // Vertex buffer objects related fields std::deque vboItems; ///< Stores informations about VBO objects VBO_ITEM* curVboItem; ///< Currently used VBO_ITEM (for grouping) - GLuint curVboVertId; ///< Currently used vertices VBO handle - GLuint curVboIndId; ///< Currently used indices VBO handle - int vboSize; ///< Amount of vertices stored in VBO + VBO_CONTAINER* vboContainer; ///< Container for storing VBO_ITEMs + GLuint vboVertices; ///< Currently used vertices VBO handle + GLuint vboIndices; ///< Currently used indices VBO handle bool vboNeedsUpdate; ///< Flag indicating if VBO should be rebuilt glm::mat4 transform; ///< Current transformation matrix std::stack transformStack; ///< Stack of transformation matrices @@ -361,7 +372,8 @@ private: std::deque unitCirclePoints; ///< List of the points on a unit circle // Polygon tesselation - GLUtesselator* tesselator; ///< Pointer to the tesselator + GLUtesselator* tesselator; ///< Pointer to the tesselator + std::vector tessIntersects; ///< Storage of intersecting points // Shader // Possible types of shaders @@ -519,12 +531,20 @@ private: * @brief Starts drawing in immediate mode or does nothing if an item's caching has started. * @param aMode specifies the primitive or primitives that will be created. */ - inline void begin( GLenum aMode ); + inline void begin( GLenum aMode ) + { + if( !isGrouping ) + glBegin( aMode ); + } /** * @brief Ends drawing in immediate mode or does nothing if an item's caching has started. */ - inline void end(); + inline void end() + { + if( !isGrouping ) + glEnd(); + } /** * @brief Adds vertex to the current item or draws it in immediate mode. @@ -532,7 +552,19 @@ private: * @param aY is Y coordinate. * @param aZ is Z coordinate. */ - inline void vertex3( double aX, double aY, double aZ ); + inline void vertex3( double aX, double aY, double aZ ) + { + if( isGrouping ) + { + // New vertex coordinates for VBO + VBO_VERTEX vertex( aX, aY, aZ ); + curVboItem->PushVertex( &vertex ); + } + else + { + glVertex3d( aX, aY, aZ ); + } + } /** * @brief Function that replaces glTranslate and behaves according to isGrouping variable. @@ -543,7 +575,17 @@ private: * @param aY is translation in Y axis direction. * @param aZ is translation in Z axis direction. */ - inline void translate3( double aX, double aY, double aZ ); + inline void translate3( double aX, double aY, double aZ ) + { + if( isGrouping ) + { + transform = glm::translate( transform, glm::vec3( aX, aY, aZ ) ); + } + else + { + glTranslated( aX, aY, aZ ); + } + } /** * @brief Function that replaces glColor and behaves according to isGrouping variable. @@ -555,7 +597,17 @@ private: * @param aB is blue component. * @param aA is alpha component. */ - inline void color4( double aRed, double aGreen, double aBlue, double aAlpha ); + inline void color4( double aRed, double aGreen, double aBlue, double aAlpha ) + { + if( isGrouping ) + { + curVboItem->UseColor( COLOR4D( aRed, aGreen, aBlue, aAlpha ) ); + } + else + { + glColor4d( aRed, aGreen, aBlue, aAlpha ); + } + } /** * @brief Function that replaces glColor and behaves according to isGrouping variable. @@ -564,7 +616,17 @@ private: * * @param aColor is the new color. */ - inline void color4( const COLOR4D& aColor ); + inline void color4( const COLOR4D& aColor ) + { + if( isGrouping ) + { + curVboItem->UseColor( aColor ); + } + else + { + glColor4d( aColor.r, aColor.g, aColor.b, aColor.a); + } + } /** * @brief Function that sets shader and its parameters for the currently used VBO_ITEM. diff --git a/include/gal/opengl/vbo_container.h b/include/gal/opengl/vbo_container.h new file mode 100644 index 0000000000..f39c59f2e5 --- /dev/null +++ b/include/gal/opengl/vbo_container.h @@ -0,0 +1,256 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file vbo_container.h + * @brief Class to store VBO_ITEMs. + */ + +#ifndef VBO_CONTAINER_H_ +#define VBO_CONTAINER_H_ + +#include +#include +#include + +namespace KiGfx +{ +class VBO_ITEM; +typedef struct VBO_VERTEX VBO_VERTEX; + +class VBO_CONTAINER +{ +public: + VBO_CONTAINER( int aSize = 1048576 ); + ~VBO_CONTAINER(); + + ///< Maps size of free memory chunks to their offsets + typedef std::pair Chunk; + typedef std::multimap FreeChunkMap; + + ///< Maps size of reserved memory chunks to their owners (VBO_ITEMs) + typedef std::pair ReservedChunk; + typedef std::multimap ReservedChunkMap; + + /** + * Function StartItem() + * Starts an unknown sized item. After calling the function it is possible to add vertices + * using function Add(). + * @param aVboItem is the item that is going to store vertices in the container. + */ + void StartItem( VBO_ITEM* aVboItem ); + + /** + * Function EndItem() + * Marks current item as finished and returns unused memory to the pool. StartItem() function + * has to be called first. + */ + void EndItem(); + + /** + * Function Add() + * Stores given number of vertices in the container for the specific VBO_ITEM. + * @param aVboItem is the owner of the vertices. + * @param aVertex are vertices data to be stored. + * @param aSize is the number of vertices to be added. + */ + void Add( VBO_ITEM* aVboItem, const VBO_VERTEX* aVertex, unsigned int aSize = 1 ); + + /** + * Function Free() + * Frees the chunk reserved by the aVboItem. + * @param aVboItem is the owner of the chunk to be freed. + */ + inline void Free( VBO_ITEM* aVboItem ) + { + ReservedChunkMap::iterator it = m_reservedChunks.find( aVboItem ); + free( it ); + + // Dynamic memory freeing, there is no point in holding + // a large amount of memory when there is no use for it + if( m_freeSpace > ( m_currentSize / 2 ) ) + { + resizeContainer( m_currentSize / 2 ); + } + } + + /** + * Function GetAllVertices() + * Returns all vertices stored in the container. It is especially useful for transferring + * data to the GPU memory. + */ + VBO_VERTEX* GetAllVertices() const; + + /** + * Function GetVertices() + * Returns vertices stored by the specific item. + * @aVboItem is the specific item. + */ + VBO_VERTEX* GetVertices( const VBO_ITEM* aVboItem ) const; + + /** + * Function GetSize() + * Returns amount of vertices currently stored in the container. + */ + inline int GetSize() const + { + return m_currentSize; + } + +private: + ///< Stores size & offset of free chunks. + FreeChunkMap m_freeChunks; + ///< Stores owners (VBO_ITEM*) of reserved chunks and their size & offset. + ReservedChunkMap m_reservedChunks; + + /** + * Function allocate() + * Finds an offset where the number of vertices can be stored in a continous space. If there is + * no such chunk, appropriate amount of memory is allocated first. + * @param aVboItem is the owner of vertices to be stored. + * @param aSize is the number of vertices to be stored. + */ + unsigned int allocate( VBO_ITEM* aVboItem, unsigned int aSize ); + + /** + * Function getChunkSize() + * Returns size of the given chunk (works both for reserved and free chunks). + * @param aChunk is the chunk. + */ + inline int getChunkSize( const Chunk& aChunk ) const + { + return aChunk.first; + } + + inline int getChunkSize( const ReservedChunk& aChunk ) const + { + return aChunk.second.first; + } + + /** + * Function getChunkOffset() + * Returns offset of the given chunk (works both for reserved and free chunks). + * @param aChunk is the chunk. + */ + inline unsigned int getChunkOffset( const Chunk& aChunk ) const + { + return aChunk.second; + } + + inline unsigned int getChunkOffset( const ReservedChunk& aChunk ) const + { + return aChunk.second.second; + } + + /** + * Function getChunkOffset() + * Upadtes offset of the given chunk (works both for reserved and free chunks). + * !! IMPORTANT: it does not reallocate the chunk, it just changes its properties. + * @param aChunk is the chunk. + */ + inline void setChunkOffset( Chunk& aChunk, unsigned int aOffset ) const + { + aChunk.second = aOffset; + } + + inline void setChunkOffset( ReservedChunk& aChunk, unsigned int aOffset ) const + { + aChunk.second.second = aOffset; + } + + /** + * Function getChunkVboItem() + * Returns owner of the given reserved chunk. + * @param aChunk is the chunk. + */ + inline VBO_ITEM* getChunkVboItem( const ReservedChunk& aChunk ) const + { + return aChunk.first; + } + + /** + * Function defragment() + * Removes empty spaces between chunks, so after that there is a long continous space + * for storing vertices at the and of the container. + * @return false in case of failure (eg. memory shortage) + */ + bool defragment( VBO_VERTEX* aTarget = NULL ); + + /** + * Function resizeChunk() + * Changes size of the chunk that stores vertices of aVboItem. + * @param aVboItem is the item for which reserved space size should be changed. + * @param aNewSize is the new size for the aVboItem, expressed in vertices number. + */ + void resizeChunk( VBO_ITEM* aVboItem, int aNewSize ); + + /** + * Function resizeContainer() + * Prepares a bigger container of a given size. + * @param aNewSize is the new size of container, expressed in vertices + * @return false in case of failure (eg. memory shortage) + */ + bool resizeContainer( unsigned int aNewSize ); + + /** + * Function free() + * Frees the space described in aChunk and returns it to the free space pool. + * @param aChunk is a space to be freed. + */ + void free( const ReservedChunkMap::iterator& aChunk ); + + ///< How many vertices we can store in the container + unsigned int m_freeSpace; + + ///< How big is the current container, expressed in vertices + unsigned int m_currentSize; + + ///< Actual storage memory + VBO_VERTEX* m_vertices; + + ///< A flag saying if there is the item with an unknown size being added + bool itemStarted; + + ///< Variables holding the state of the item currently being added + unsigned int itemSize, itemChunkSize; + VBO_ITEM* item; + + /** + * Function getPowerOf2() + * Returns the nearest power of 2, bigger than aNumber. + * @param aNumber is the number for which we look for a bigger power of 2. + */ + unsigned int getPowerOf2( unsigned int aNumber ) + { + unsigned int power = 1; + + while( power < aNumber && power ) + power <<= 1; + + return power; + } +}; +} // namespace KiGfx + +#endif /* VBO_CONTAINER_H_ */ diff --git a/include/gal/opengl/vbo_item.h b/include/gal/opengl/vbo_item.h index a3b476cbb5..8f1d875911 100644 --- a/include/gal/opengl/vbo_item.h +++ b/include/gal/opengl/vbo_item.h @@ -36,8 +36,6 @@ #include -#include - namespace KiGfx { typedef struct VBO_VERTEX @@ -45,12 +43,31 @@ typedef struct VBO_VERTEX GLfloat x, y, z; // Coordinates GLfloat r, g, b, a; // Color GLfloat shader[4]; // Shader type & params + GLfloat _padding; + + VBO_VERTEX() + {} + + VBO_VERTEX( const GLfloat aX, const GLfloat aY, const GLfloat aZ ) : + x( aX ), y( aY ), z( aZ ) + {} + + VBO_VERTEX( const GLfloat *aData ) : + x( aData[0] ), y( aData[1] ), z( aData[2] ) + {} + + operator GLfloat*() + { + return &x; + } } VBO_VERTEX; +class VBO_CONTAINER; + class VBO_ITEM { public: - VBO_ITEM(); + VBO_ITEM( VBO_CONTAINER* aContainer ); ~VBO_ITEM(); /** @@ -60,7 +77,7 @@ public: * @param aVertex is a vertex to be added. * @param aShader is an attribute for shader. */ - void PushVertex( const GLfloat* aVertex ); + void PushVertex( VBO_VERTEX* aVertex ); /** * Function PushVertices() @@ -71,14 +88,14 @@ public: * @param aSize is an amount of vertices to be added. * @param aShader is an attribute for shader. */ - void PushVertices( const GLfloat* aVertices, GLuint aSize ); + void PushVertices( VBO_VERTEX* aVertices, GLuint aSize ); /** * Function GetVertices() * Returns a pointer to the array containing all vertices. * @return Pointer to vertices packed in format {X, Y, Z, R, G, B, A}. */ - GLfloat* GetVertices(); + VBO_VERTEX* GetVertices(); /** @@ -86,7 +103,7 @@ public: * Returns information about number of vertices stored. * @param Amount of vertices. */ - inline int GetSize() const + inline unsigned int GetSize() const { return m_size; } @@ -96,7 +113,7 @@ public: * Sets data offset in the VBO. * @param aOffset is the offset expressed as a number of vertices. */ - void SetOffset( int aOffset ) + void SetOffset( unsigned int aOffset ) { m_offset = aOffset; } @@ -106,7 +123,7 @@ public: * Returns data offset in the VBO. * @return Data offset expressed as a number of vertices. */ - inline int GetOffset() const + inline unsigned int GetOffset() const { return m_offset; } @@ -156,16 +173,8 @@ public: } } - - inline void FreeVerticesData() - { - if( m_vertices && !m_isDirty ) - { - delete[] m_vertices; - m_vertices = NULL; - } - } - + ///< Informs the container that there will be no more vertices for the current VBO_ITEM + void Finish(); ///< Data organization information for vertices {X,Y,Z,R,G,B,A} (@see VBO_VERTEX). static const int VertByteSize = sizeof(VBO_VERTEX); @@ -191,40 +200,24 @@ public: static const int IndByteSize = sizeof(GLuint); private: - ///< Contains vertices coordinates and colors. - ///< Packed by 7 floats for each vertex: {X, Y, Z, R, G, B, A} - GLfloat* m_vertices; + ///< Offset and size of data stored in the VBO_CONTAINER. + unsigned int m_offset; + unsigned int m_size; - ///< Lists of data blocks storing vertices - std::list m_vertBlocks; - - ///< Pointers to current blocks that should be used for storing data - VBO_VERTEX* m_vertPtr; - - ///< How many vertices can be stored in the current buffer - int m_spaceLeft; - ///< Number of vertices stored in a single block - static const int BLOCK_SIZE = 256; - ///< Creates a new block for storing vertices data - void useNewBlock(); - ///< Prepares a continuous block of data that can be copied to graphics card buffer. - void prepareFinal(); - - ///< Offset and size of data in VBO. - int m_offset; - int m_size; + ///< Storage for vertices. + VBO_CONTAINER* m_container; ///< Color used for new vertices pushed. - GLfloat m_color[ColorStride]; + GLfloat m_color[ColorStride]; ///< Shader and its parameters used for new vertices pushed - GLfloat m_shader[ShaderStride]; + GLfloat m_shader[ShaderStride]; ///< Flag telling if the item should be recached in VBO or not. - bool m_isDirty; + bool m_isDirty; ///< Current transform matrix applied for every new vertex pushed. - const glm::mat4* m_transform; + const glm::mat4* m_transform; }; } // namespace KiGfx diff --git a/include/view/view_item.h b/include/view/view_item.h index 019b00fb72..55d7df7080 100644 --- a/include/view/view_item.h +++ b/include/view/view_item.h @@ -68,7 +68,7 @@ public: ALL = 0xff }; - VIEW_ITEM() : m_view( NULL ), m_viewVisible( true ), m_groupsSize( 0 ) {} + VIEW_ITEM() : m_view( NULL ), m_viewVisible( true ), m_groups( NULL ), m_groupsSize( 0 ) {} /** * Destructor. For dynamic views, removes the item from the view. @@ -76,6 +76,7 @@ public: virtual ~VIEW_ITEM() { ViewRelease(); + delete[] m_groups; }; /** From bff4d1239cf4398be8d8c88fcb0bd4a3ceb27a31 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 18 Jun 2013 17:01:23 +0200 Subject: [PATCH 091/415] Removed unnecessary casting from VIEW_ITEM to EDA_ITEM. Added Type() function to VIEW_ITEM. --- common/view/view.cpp | 8 ++-- include/base_struct.h | 93 -------------------------------------- include/painter.h | 3 +- include/view/view_item.h | 96 ++++++++++++++++++++++++++++++++++++++++ pcbnew/pcb_painter.cpp | 2 +- pcbnew/pcb_painter.h | 2 +- 6 files changed, 104 insertions(+), 100 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 33f83527f3..680ae1e719 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -199,7 +199,7 @@ double VIEW::ToScreen( double aCoord, bool aAbsolute ) const void VIEW::CopySettings( const VIEW* aOtherView ) { - // FIXME + wxASSERT_MSG( false, wxT( "This is not implemented" ) ); } @@ -249,7 +249,7 @@ void VIEW::SetViewport( const BOX2D& aViewport, bool aKeepAspect ) void VIEW::SetMirror( bool aMirrorX, bool aMirrorY ) { - // FIXME + wxASSERT_MSG( false, wxT( "This is not implemented" ) ); } @@ -381,13 +381,13 @@ struct VIEW::drawItem { group = gal->BeginGroup(); aItem->setGroup( currentLayer, group ); - view->m_painter->Draw( static_cast( aItem ), currentLayer ); + view->m_painter->Draw( aItem, currentLayer ); gal->EndGroup(); } } else if( aItem->ViewIsVisible() ) { - view->m_painter->Draw( static_cast( aItem ), currentLayer ); + view->m_painter->Draw( aItem, currentLayer ); } } diff --git a/include/base_struct.h b/include/base_struct.h index 0cc366e8da..ef4c299914 100644 --- a/include/base_struct.h +++ b/include/base_struct.h @@ -47,99 +47,6 @@ extern std::ostream& operator <<( std::ostream& out, const wxPoint& pt ); #endif -/** - * Enum KICAD_T - * is the set of class identification values, stored in EDA_ITEM::m_StructType - */ -enum KICAD_T { - NOT_USED = -1, ///< the 3d code uses this value - - EOT = 0, ///< search types array terminator (End Of Types) - - TYPE_NOT_INIT = 0, - PCB_T, - SCREEN_T, ///< not really an item, used to identify a screen - - // Items in pcb - PCB_MODULE_T, ///< class MODULE, a footprint - PCB_PAD_T, ///< class D_PAD, a pad in a footprint - PCB_LINE_T, ///< class DRAWSEGMENT, a segment not on copper layers - PCB_TEXT_T, ///< class TEXTE_PCB, text on a layer - PCB_MODULE_TEXT_T, ///< class TEXTE_MODULE, text in a footprint - PCB_MODULE_EDGE_T, ///< class EDGE_MODULE, a footprint edge - PCB_TRACE_T, ///< class TRACKE, a track segment (segment on a copper layer) - PCB_VIA_T, ///< class SEGVIA, a via (like a track segment on a copper layer) - PCB_ZONE_T, ///< class SEGZONE, a segment used to fill a zone area (segment on a - ///< copper layer) - PCB_MARKER_T, ///< class MARKER_PCB, a marker used to show something - PCB_DIMENSION_T, ///< class DIMENSION, a dimension (graphic item) - PCB_TARGET_T, ///< class PCB_TARGET, a target (graphic item) - PCB_ZONE_AREA_T, ///< class ZONE_CONTAINER, a zone area - PCB_ITEM_LIST_T, ///< class BOARD_ITEM_LIST, a list of board items - - // Schematic draw Items. The order of these items effects the sort order. - // It is currently ordered to mimic the old Eeschema locate behavior where - // the smallest item is the selected item. - SCH_MARKER_T, - SCH_JUNCTION_T, - SCH_NO_CONNECT_T, - SCH_BUS_WIRE_ENTRY_T, - SCH_BUS_BUS_ENTRY_T, - SCH_LINE_T, - SCH_BITMAP_T, - SCH_TEXT_T, - SCH_LABEL_T, - SCH_GLOBAL_LABEL_T, - SCH_HIERARCHICAL_LABEL_T, - SCH_FIELD_T, - SCH_COMPONENT_T, - SCH_SHEET_PIN_T, - SCH_SHEET_T, - - // Be prudent with these 3 types: - // they should be used only to locate a specific field type - // among SCH_FIELD_T items types - SCH_FIELD_LOCATE_REFERENCE_T, - SCH_FIELD_LOCATE_VALUE_T, - SCH_FIELD_LOCATE_FOOTPRINT_T, - - // General - SCH_SCREEN_T, - - /* - * Draw items in library component. - * - * The order of these items effects the sort order for items inside the - * "DRAW/ENDDRAW" section of the component definition in a library file. - * If you add a new draw item, type, please make sure you add it so the - * sort order is logical. - */ - LIB_COMPONENT_T, - LIB_ALIAS_T, - LIB_ARC_T, - LIB_CIRCLE_T, - LIB_TEXT_T, - LIB_RECTANGLE_T, - LIB_POLYLINE_T, - LIB_BEZIER_T, - LIB_PIN_T, - - /* - * Fields are not saved inside the "DRAW/ENDDRAW". Add new draw item - * types before this line. - */ - LIB_FIELD_T, - - /* - * For GerbView: items type: - */ - TYPE_GERBER_DRAW_ITEM, - - // End value - MAX_STRUCT_TYPE_ID -}; - - /** * Enum FILL_T * is the set of fill types used in plotting or drawing enclosed areas. diff --git a/include/painter.h b/include/painter.h index a9e9dc947a..d043dff2c8 100644 --- a/include/painter.h +++ b/include/painter.h @@ -41,6 +41,7 @@ namespace KiGfx { class GAL; class STROKE_FONT; +class VIEW_ITEM; /** * Class RENDER_SETTINGS @@ -205,7 +206,7 @@ public: * may know what to draw (eg. for pads there are separate layers for holes, because they * have other dimensions then the pad itself. */ - virtual bool Draw( const EDA_ITEM* aItem, int aLayer ) = 0; + virtual bool Draw( const VIEW_ITEM* aItem, int aLayer ) = 0; protected: diff --git a/include/view/view_item.h b/include/view/view_item.h index 55d7df7080..ffe7fe700f 100644 --- a/include/view/view_item.h +++ b/include/view/view_item.h @@ -34,6 +34,98 @@ #include +/** + * Enum KICAD_T + * is the set of class identification values, stored in VIEW_ITEM::m_StructType + */ +enum KICAD_T { + NOT_USED = -1, ///< the 3d code uses this value + + EOT = 0, ///< search types array terminator (End Of Types) + + TYPE_NOT_INIT = 0, + PCB_T, + SCREEN_T, ///< not really an item, used to identify a screen + + // Items in pcb + PCB_MODULE_T, ///< class MODULE, a footprint + PCB_PAD_T, ///< class D_PAD, a pad in a footprint + PCB_LINE_T, ///< class DRAWSEGMENT, a segment not on copper layers + PCB_TEXT_T, ///< class TEXTE_PCB, text on a layer + PCB_MODULE_TEXT_T, ///< class TEXTE_MODULE, text in a footprint + PCB_MODULE_EDGE_T, ///< class EDGE_MODULE, a footprint edge + PCB_TRACE_T, ///< class TRACKE, a track segment (segment on a copper layer) + PCB_VIA_T, ///< class SEGVIA, a via (like a track segment on a copper layer) + PCB_ZONE_T, ///< class SEGZONE, a segment used to fill a zone area (segment on a + ///< copper layer) + PCB_MARKER_T, ///< class MARKER_PCB, a marker used to show something + PCB_DIMENSION_T, ///< class DIMENSION, a dimension (graphic item) + PCB_TARGET_T, ///< class PCB_TARGET, a target (graphic item) + PCB_ZONE_AREA_T, ///< class ZONE_CONTAINER, a zone area + PCB_ITEM_LIST_T, ///< class BOARD_ITEM_LIST, a list of board items + + // Schematic draw Items. The order of these items effects the sort order. + // It is currently ordered to mimic the old Eeschema locate behavior where + // the smallest item is the selected item. + SCH_MARKER_T, + SCH_JUNCTION_T, + SCH_NO_CONNECT_T, + SCH_BUS_WIRE_ENTRY_T, + SCH_BUS_BUS_ENTRY_T, + SCH_LINE_T, + SCH_BITMAP_T, + SCH_TEXT_T, + SCH_LABEL_T, + SCH_GLOBAL_LABEL_T, + SCH_HIERARCHICAL_LABEL_T, + SCH_FIELD_T, + SCH_COMPONENT_T, + SCH_SHEET_PIN_T, + SCH_SHEET_T, + + // Be prudent with these 3 types: + // they should be used only to locate a specific field type + // among SCH_FIELD_T items types + SCH_FIELD_LOCATE_REFERENCE_T, + SCH_FIELD_LOCATE_VALUE_T, + SCH_FIELD_LOCATE_FOOTPRINT_T, + + // General + SCH_SCREEN_T, + + /* + * Draw items in library component. + * + * The order of these items effects the sort order for items inside the + * "DRAW/ENDDRAW" section of the component definition in a library file. + * If you add a new draw item, type, please make sure you add it so the + * sort order is logical. + */ + LIB_COMPONENT_T, + LIB_ALIAS_T, + LIB_ARC_T, + LIB_CIRCLE_T, + LIB_TEXT_T, + LIB_RECTANGLE_T, + LIB_POLYLINE_T, + LIB_BEZIER_T, + LIB_PIN_T, + + /* + * Fields are not saved inside the "DRAW/ENDDRAW". Add new draw item + * types before this line. + */ + LIB_FIELD_T, + + /* + * For GerbView: items type: + */ + TYPE_GERBER_DRAW_ITEM, + + // End value + MAX_STRUCT_TYPE_ID +}; + namespace KiGfx { // Forward declarations @@ -154,6 +246,9 @@ public: */ void ViewRelease(); + /// @copydoc EDA_ITEM::Type() + virtual KICAD_T Type() const = 0; + protected: friend class VIEW; @@ -174,6 +269,7 @@ protected: VIEW* m_view; ///* Current dynamic view the item is assigned to. bool m_viewVisible; ///* Are we visible in the current dynamic VIEW. + private: ///* Helper for storing cached items group ids typedef std::pair GroupPair; diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 03b74edd82..c8591208d7 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -167,7 +167,7 @@ const COLOR4D& PCB_PAINTER::getItemColor( int aItemType, int aNetCode ) const } -bool PCB_PAINTER::Draw( const EDA_ITEM* aItem, int aLayer ) +bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) { // the "cast" applied in here clarifies which overloaded draw() is called switch( aItem->Type() ) diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 90cfd7ddd5..e20c0008db 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -115,7 +115,7 @@ public: PCB_PAINTER( GAL* aGal ); /// @copydoc PAINTER::Draw() - virtual bool Draw( const EDA_ITEM*, int ); + virtual bool Draw( const VIEW_ITEM*, int ); /// @copydoc PAINTER::ApplySettings() virtual void ApplySettings( RENDER_SETTINGS* aSettings ) From c4e42f46a920673293199eb0ac8eab96f49a8954 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 18 Jun 2013 17:53:12 +0200 Subject: [PATCH 092/415] Removed unnecessary functions from VBO_VERTEX. --- common/gal/opengl/opengl_gal.cpp | 22 +++++++++++----------- include/gal/opengl/opengl_gal.h | 2 +- include/gal/opengl/vbo_item.h | 16 ---------------- 3 files changed, 12 insertions(+), 28 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 33a36f1fb9..7d902b1d6e 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -1641,17 +1641,17 @@ void OPENGL_GAL::computeUnitCircle() // Insert in a display list and a vector for( int i = 0; i < CIRCLE_POINTS; i++ ) { - VBO_VERTEX v0( 0.0f, 0.0f, 0.0f ); - VBO_VERTEX v1( + VBO_VERTEX v0 = { 0.0f, 0.0f, 0.0f }; + VBO_VERTEX v1 = { cos( 2.0 * M_PI / CIRCLE_POINTS * i ), // x sin( 2.0 * M_PI / CIRCLE_POINTS * i ), // y 0.0f // z - ); - VBO_VERTEX v2( + }; + VBO_VERTEX v2 = { cos( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), // x sin( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), // y 0.0f // z - ); + }; glVertex2d( 0, 0 ); verticesCircle->PushVertex( &v0 ); @@ -1680,17 +1680,17 @@ void OPENGL_GAL::computeUnitSemiCircle() for( int i = 0; i < CIRCLE_POINTS / 2; ++i ) { - VBO_VERTEX v0( 0.0f, 0.0f, 0.0f ); - VBO_VERTEX v1( + VBO_VERTEX v0 = { 0.0f, 0.0f, 0.0f }; + VBO_VERTEX v1 = { cos( 2.0 * M_PI / CIRCLE_POINTS * i ), // x sin( 2.0 * M_PI / CIRCLE_POINTS * i ), // y 0.0f // z - ); - VBO_VERTEX v2( + }; + VBO_VERTEX v2 = { cos( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), // x sin( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), // y 0.0f // z - ); + }; glVertex2d( 0, 0 ); verticesSemiCircle->PushVertex( &v0 ); @@ -1749,7 +1749,7 @@ void CALLBACK VertexCallback( GLvoid* aVertexPtr, void* aData ) if( vboItem ) { - VBO_VERTEX newVertex( vertex[0], vertex[1], vertex[2] ); + VBO_VERTEX newVertex = { vertex[0], vertex[1], vertex[2] }; vboItem->PushVertex( &newVertex ); } else diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 1dca06f2a0..2f22078be0 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -557,7 +557,7 @@ private: if( isGrouping ) { // New vertex coordinates for VBO - VBO_VERTEX vertex( aX, aY, aZ ); + VBO_VERTEX vertex = { aX, aY, aZ }; curVboItem->PushVertex( &vertex ); } else diff --git a/include/gal/opengl/vbo_item.h b/include/gal/opengl/vbo_item.h index 8f1d875911..83011b92e4 100644 --- a/include/gal/opengl/vbo_item.h +++ b/include/gal/opengl/vbo_item.h @@ -44,22 +44,6 @@ typedef struct VBO_VERTEX GLfloat r, g, b, a; // Color GLfloat shader[4]; // Shader type & params GLfloat _padding; - - VBO_VERTEX() - {} - - VBO_VERTEX( const GLfloat aX, const GLfloat aY, const GLfloat aZ ) : - x( aX ), y( aY ), z( aZ ) - {} - - VBO_VERTEX( const GLfloat *aData ) : - x( aData[0] ), y( aData[1] ), z( aData[2] ) - {} - - operator GLfloat*() - { - return &x; - } } VBO_VERTEX; class VBO_CONTAINER; From 585aeb7f91f76c2613ccd3189a151e5f35a28d69 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 19 Jun 2013 10:50:46 +0200 Subject: [PATCH 093/415] Moved fields containing information about currently used color, shader and transformation for vertices from VBO_ITEM to VBO_CONTAINER (OPENGL_GAL). --- common/gal/opengl/opengl_gal.cpp | 4 +- common/gal/opengl/vbo_container.cpp | 46 +++++++++++++- common/gal/opengl/vbo_item.cpp | 34 +---------- include/gal/opengl/opengl_gal.h | 9 ++- include/gal/opengl/vbo_container.h | 94 ++++++++++++++++++++++++++--- include/gal/opengl/vbo_item.h | 93 +++++++--------------------- 6 files changed, 161 insertions(+), 119 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 7d902b1d6e..e42d3f0fe3 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -1543,7 +1543,7 @@ void OPENGL_GAL::Save() if( isGrouping ) { transformStack.push( transform ); - curVboItem->SetTransformMatrix( &transform ); + vboContainer->SetTransformMatrix( &transform ); } else { @@ -1562,7 +1562,7 @@ void OPENGL_GAL::Restore() if( transformStack.empty() ) { // Disable transforming, as the selected matrix is identity - curVboItem->SetTransformMatrix( NULL ); + vboContainer->SetTransformMatrix( NULL ); } } else diff --git a/common/gal/opengl/vbo_container.cpp b/common/gal/opengl/vbo_container.cpp index 33fd141a4a..80269fc18e 100644 --- a/common/gal/opengl/vbo_container.cpp +++ b/common/gal/opengl/vbo_container.cpp @@ -28,7 +28,6 @@ */ #include -#include #include #include #ifdef __WXDEBUG__ @@ -40,8 +39,11 @@ using namespace KiGfx; VBO_CONTAINER::VBO_CONTAINER( int aSize ) : - m_freeSpace( aSize ), m_currentSize( aSize ), itemStarted( false ) + m_freeSpace( aSize ), m_currentSize( aSize ), itemStarted( false ), m_transform( NULL ) { + // By default no shader is used + m_shader[0] = 0; + m_vertices = new VBO_VERTEX[aSize]; // In the beginning there is only free space @@ -88,6 +90,7 @@ void VBO_CONTAINER::EndItem() void VBO_CONTAINER::Add( VBO_ITEM* aVboItem, const VBO_VERTEX* aVertex, unsigned int aSize ) { unsigned int offset; + VBO_VERTEX* vertexPtr; if( itemStarted ) // There is an item being created with an unknown size.. { @@ -146,7 +149,44 @@ void VBO_CONTAINER::Add( VBO_ITEM* aVboItem, const VBO_VERTEX* aVertex, unsigned offset = getChunkOffset( *it ) + itemSize; } - memcpy( &m_vertices[offset], aVertex, aSize * VBO_ITEM::VertByteSize ); + for( unsigned int i = 0; i < aSize; ++i ) + { + // Pointer to the vertex that we are currently adding + vertexPtr = &m_vertices[offset + i]; + + // Modify the vertex according to the currently used transformations + if( m_transform != NULL ) + { + // Apply transformations + glm::vec4 vertex( aVertex[i].x, aVertex[i].y, aVertex[i].z, 1.0f ); + vertex = *m_transform * vertex; + + // Replace only coordinates, leave color as it is + vertexPtr->x = vertex.x; + vertexPtr->y = vertex.y; + vertexPtr->z = vertex.z; + } + else + { + // Simply copy coordinates + vertexPtr->x = aVertex[i].x; + vertexPtr->y = aVertex[i].y; + vertexPtr->z = aVertex[i].z; + } + + // Apply currently used color + vertexPtr->r = m_color[0]; + vertexPtr->g = m_color[1]; + vertexPtr->b = m_color[2]; + vertexPtr->a = m_color[3]; + + // Apply currently used shader + for( unsigned int i = 0; i < VBO_ITEM::ShaderStride; ++i ) + { + vertexPtr->shader[i] = m_shader[i]; + } + } + } diff --git a/common/gal/opengl/vbo_item.cpp b/common/gal/opengl/vbo_item.cpp index 8991c669af..28d83f5895 100644 --- a/common/gal/opengl/vbo_item.cpp +++ b/common/gal/opengl/vbo_item.cpp @@ -37,12 +37,8 @@ VBO_ITEM::VBO_ITEM( VBO_CONTAINER* aContainer ) : m_offset( 0 ), m_size( 0 ), m_container( aContainer ), - m_isDirty( true ), - m_transform( NULL ) + m_isDirty( true ) { - // By default no shader is used - m_shader[0] = 0; - // The item's size is not known yet, so we just start an item in the container aContainer->StartItem( this ); } @@ -54,32 +50,8 @@ VBO_ITEM::~VBO_ITEM() } -void VBO_ITEM::PushVertex( VBO_VERTEX* aVertex ) +void VBO_ITEM::PushVertex( const VBO_VERTEX* aVertex ) { - if( m_transform != NULL ) - { - // Apply transformations - glm::vec4 vertex( aVertex->x, aVertex->y, aVertex->z, 1.0f ); - vertex = *m_transform * vertex; - - // Replace only coordinates, leave color as it is - aVertex->x = vertex.x; - aVertex->y = vertex.y; - aVertex->z = vertex.z; - } - - // Apply currently used color - aVertex->r = m_color[0]; - aVertex->g = m_color[1]; - aVertex->b = m_color[2]; - aVertex->a = m_color[3]; - - // Apply currently used shader - for( int i = 0; i < ShaderStride; ++i ) - { - aVertex->shader[i] = m_shader[i]; - } - m_container->Add( this, aVertex ); m_size++; @@ -87,7 +59,7 @@ void VBO_ITEM::PushVertex( VBO_VERTEX* aVertex ) } -void VBO_ITEM::PushVertices( VBO_VERTEX* aVertices, GLuint aSize ) +void VBO_ITEM::PushVertices( const VBO_VERTEX* aVertices, GLuint aSize ) { for( unsigned int i = 0; i < aSize; ++i ) { diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 2f22078be0..ca137752d9 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -37,7 +37,7 @@ #define GLM_FORCE_RADIANS #include -#include +#include #include // wxWidgets imports @@ -58,7 +58,6 @@ namespace KiGfx { class SHADER; -class VBO_CONTAINER; /** * @brief Class OpenGL_GAL is the OpenGL implementation of the Graphics Abstraction Layer. @@ -601,7 +600,7 @@ private: { if( isGrouping ) { - curVboItem->UseColor( COLOR4D( aRed, aGreen, aBlue, aAlpha ) ); + vboContainer->UseColor( aRed, aGreen, aBlue, aAlpha ); } else { @@ -620,7 +619,7 @@ private: { if( isGrouping ) { - curVboItem->UseColor( aColor ); + vboContainer->UseColor( aColor ); } else { @@ -642,7 +641,7 @@ private: { const GLfloat shader[] = { aShader, aParam1, aParam2, aParam3 }; - curVboItem->UseShader( shader ); + vboContainer->UseShader( shader ); } } }; diff --git a/include/gal/opengl/vbo_container.h b/include/gal/opengl/vbo_container.h index f39c59f2e5..b32a255b3f 100644 --- a/include/gal/opengl/vbo_container.h +++ b/include/gal/opengl/vbo_container.h @@ -31,6 +31,9 @@ #define VBO_CONTAINER_H_ #include +#include +#include +#include #include #include @@ -118,6 +121,73 @@ public: return m_currentSize; } + /** + * Function SetTransformMatrix() + * Sets transformation matrix for vertices that are added to VBO_ITEM. If you do not want to + * transform vertices at all, pass NULL as the argument. + * @param aMatrix is the new transform matrix or NULL if you do not want to use transformation + * matrix. + */ + inline void SetTransformMatrix( const glm::mat4* aMatrix ) + { + m_transform = aMatrix; + } + + /** + * Function UseColor() + * Sets color used for all added vertices. + * @param aColor is the color used for added vertices. + */ + inline void UseColor( const COLOR4D& aColor ) + { + m_color[0] = aColor.r; + m_color[1] = aColor.g; + m_color[2] = aColor.b; + m_color[3] = aColor.a; + } + + /** + * Function UseColor() + * Sets color used for all added vertices. + * @param aColor is the color used for added vertices. + */ + inline void UseColor( const GLfloat aColor[VBO_ITEM::ColorStride] ) + { + for( unsigned int i = 0; i < VBO_ITEM::ColorStride; ++i ) + { + m_color[i] = aColor[i]; + } + } + + /** + * Function UseColor() + * Sets color used for all added vertices. + * @param aR is the red component of the color. + * @param aG is the green component of the color. + * @param aB is the blue component of the color. + * @param aA is the alpha component of the color. + */ + inline void UseColor( GLfloat aR, GLfloat aG, GLfloat aB, GLfloat aA ) + { + m_color[0] = aR; + m_color[1] = aG; + m_color[2] = aB; + m_color[3] = aA; + } + + /** + * Function UseShader() + * Sets shader and its parameters used for all added vertices. + * @param aShader is the array that contains shader number followed by its parameters. + */ + inline void UseShader( const GLfloat aShader[VBO_ITEM::ShaderStride] ) + { + for( unsigned int i = 0; i < VBO_ITEM::ShaderStride; ++i ) + { + m_shader[i] = aShader[i]; + } + } + private: ///< Stores size & offset of free chunks. FreeChunkMap m_freeChunks; @@ -221,27 +291,37 @@ private: void free( const ReservedChunkMap::iterator& aChunk ); ///< How many vertices we can store in the container - unsigned int m_freeSpace; + unsigned int m_freeSpace; ///< How big is the current container, expressed in vertices - unsigned int m_currentSize; + unsigned int m_currentSize; ///< Actual storage memory - VBO_VERTEX* m_vertices; + VBO_VERTEX* m_vertices; ///< A flag saying if there is the item with an unknown size being added - bool itemStarted; + bool itemStarted; ///< Variables holding the state of the item currently being added - unsigned int itemSize, itemChunkSize; - VBO_ITEM* item; + unsigned int itemSize; + unsigned int itemChunkSize; + VBO_ITEM* item; + + ///< Color used for new vertices pushed. + GLfloat m_color[VBO_ITEM::ColorStride]; + + ///< Shader and its parameters used for new vertices pushed + GLfloat m_shader[VBO_ITEM::ShaderStride]; + + ///< Current transform matrix applied for every new vertex pushed. + const glm::mat4* m_transform; /** * Function getPowerOf2() * Returns the nearest power of 2, bigger than aNumber. * @param aNumber is the number for which we look for a bigger power of 2. */ - unsigned int getPowerOf2( unsigned int aNumber ) + unsigned int getPowerOf2( unsigned int aNumber ) const { unsigned int power = 1; diff --git a/include/gal/opengl/vbo_item.h b/include/gal/opengl/vbo_item.h index 83011b92e4..e87a3e8c17 100644 --- a/include/gal/opengl/vbo_item.h +++ b/include/gal/opengl/vbo_item.h @@ -31,9 +31,7 @@ #define VBO_ITEM_H_ #include -#include #include - #include namespace KiGfx @@ -61,7 +59,7 @@ public: * @param aVertex is a vertex to be added. * @param aShader is an attribute for shader. */ - void PushVertex( VBO_VERTEX* aVertex ); + void PushVertex( const VBO_VERTEX* aVertex ); /** * Function PushVertices() @@ -72,7 +70,7 @@ public: * @param aSize is an amount of vertices to be added. * @param aShader is an attribute for shader. */ - void PushVertices( VBO_VERTEX* aVertices, GLuint aSize ); + void PushVertices( const VBO_VERTEX* aVertices, GLuint aSize ); /** * Function GetVertices() @@ -97,7 +95,7 @@ public: * Sets data offset in the VBO. * @param aOffset is the offset expressed as a number of vertices. */ - void SetOffset( unsigned int aOffset ) + inline void SetOffset( unsigned int aOffset ) { m_offset = aOffset; } @@ -112,18 +110,6 @@ public: return m_offset; } - /** - * Function SetTransformMatrix() - * Sets transformation matrix for vertices that are added to VBO_ITEM. If you do not want to - * transform vertices at all, pass NULL as the argument. - * @param aMatrix is the new transform matrix or NULL if you do not want to use transformation - * matrix. - */ - void SetTransformMatrix( const glm::mat4* aMatrix ) - { - m_transform = aMatrix; - } - /** * Function ChangeColor() * Colors all vertices to the specified color. @@ -131,77 +117,42 @@ public: */ void ChangeColor( const COLOR4D& aColor ); - /** - * Function UseColor() - * Sets color used for all added vertices. - * @param aColor is the color used for added vertices. - */ - void UseColor( const COLOR4D& aColor ) - { - m_color[0] = aColor.r; - m_color[1] = aColor.g; - m_color[2] = aColor.b; - m_color[3] = aColor.a; - } - - /** - * Function UseShader() - * Sets shader and its parameters used for all added vertices. - * @param aShader is the array that contains shader number followed by its parameters. - */ - inline void UseShader( const GLfloat* aShader ) - { - for( int i = 0; i < ShaderStride; ++i ) - { - m_shader[i] = aShader[i]; - } - } - ///< Informs the container that there will be no more vertices for the current VBO_ITEM void Finish(); ///< Data organization information for vertices {X,Y,Z,R,G,B,A} (@see VBO_VERTEX). - static const int VertByteSize = sizeof(VBO_VERTEX); - static const int VertStride = VertByteSize / sizeof(GLfloat); + static const unsigned int VertByteSize = sizeof(VBO_VERTEX); + static const unsigned int VertStride = VertByteSize / sizeof(GLfloat); - static const int CoordByteSize = sizeof(VBO_VERTEX().x) + sizeof(VBO_VERTEX().y) + - sizeof(VBO_VERTEX().z); - static const int CoordStride = CoordByteSize / sizeof(GLfloat); + static const unsigned int CoordByteSize = sizeof(VBO_VERTEX().x) + sizeof(VBO_VERTEX().y) + + sizeof(VBO_VERTEX().z); + static const unsigned int CoordStride = CoordByteSize / sizeof(GLfloat); // Offset of color data from the beginning of each vertex data - static const int ColorByteOffset = offsetof(VBO_VERTEX, r); - static const int ColorOffset = ColorByteOffset / sizeof(GLfloat); - static const int ColorByteSize = sizeof(VBO_VERTEX().r) + sizeof(VBO_VERTEX().g) + - sizeof(VBO_VERTEX().b) + sizeof(VBO_VERTEX().a); - static const int ColorStride = ColorByteSize / sizeof(GLfloat); + static const unsigned int ColorByteOffset = offsetof(VBO_VERTEX, r); + static const unsigned int ColorOffset = ColorByteOffset / sizeof(GLfloat); + static const unsigned int ColorByteSize = sizeof(VBO_VERTEX().r) + sizeof(VBO_VERTEX().g) + + sizeof(VBO_VERTEX().b) + sizeof(VBO_VERTEX().a); + static const unsigned int ColorStride = ColorByteSize / sizeof(GLfloat); // Shader attributes - static const int ShaderByteOffset = offsetof(VBO_VERTEX, shader); - static const int ShaderOffset = ShaderByteOffset / sizeof(GLfloat); - static const int ShaderByteSize = sizeof(VBO_VERTEX().shader); - static const int ShaderStride = ShaderByteSize / sizeof(GLfloat); + static const unsigned int ShaderByteOffset = offsetof(VBO_VERTEX, shader); + static const unsigned int ShaderOffset = ShaderByteOffset / sizeof(GLfloat); + static const unsigned int ShaderByteSize = sizeof(VBO_VERTEX().shader); + static const unsigned int ShaderStride = ShaderByteSize / sizeof(GLfloat); - static const int IndByteSize = sizeof(GLuint); + static const unsigned int IndByteSize = sizeof(GLuint); private: ///< Offset and size of data stored in the VBO_CONTAINER. - unsigned int m_offset; - unsigned int m_size; + unsigned int m_offset; + unsigned int m_size; ///< Storage for vertices. - VBO_CONTAINER* m_container; - - ///< Color used for new vertices pushed. - GLfloat m_color[ColorStride]; - - ///< Shader and its parameters used for new vertices pushed - GLfloat m_shader[ShaderStride]; + VBO_CONTAINER* m_container; ///< Flag telling if the item should be recached in VBO or not. - bool m_isDirty; - - ///< Current transform matrix applied for every new vertex pushed. - const glm::mat4* m_transform; + bool m_isDirty; }; } // namespace KiGfx From db41bc287094d7262dc8e777e9ce7c4324c07c21 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 19 Jun 2013 12:07:25 +0200 Subject: [PATCH 094/415] Changed order of used headers, so there is no need to include again 'wx/wx.h' needed by layers_id_color_and_visibility.h --- pcbnew/class_board.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index dc4dcdad5b..3b8e614475 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -33,12 +33,12 @@ #include +#include // PAGE_INFO #include #include #include #include #include -#include // PAGE_INFO #include #include #include From ff75a2808001f0cfb44413c8eafe15122b2ad9e5 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 20 Jun 2013 09:58:18 +0200 Subject: [PATCH 095/415] Added a framerate limiter. Now it does not use all the CPU power while panning even on simple boards. --- common/drawpanel_gal.cpp | 12 +++++++++++- include/class_drawpanel_gal.h | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index cb338db085..c346247925 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -88,6 +88,8 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin Connect( wxEVT_PAINT, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this ); + + m_timeStamp = 0; } @@ -107,7 +109,7 @@ EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL() } -void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& aEvent ) +void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) ) { Refresh(); } @@ -121,6 +123,14 @@ void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent ) void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) { + const unsigned int FPS_LIMIT = 50; + + // Framerate limiter + wxLongLong currentTimeStamp = wxGetLocalTimeMillis(); + if( currentTimeStamp - m_timeStamp < ( 1 / FPS_LIMIT ) ) + return; + m_timeStamp = currentTimeStamp; + #ifdef __WXDEBUG__ prof_counter time; diff --git a/include/class_drawpanel_gal.h b/include/class_drawpanel_gal.h index d0b94f08e4..35c7488d52 100644 --- a/include/class_drawpanel_gal.h +++ b/include/class_drawpanel_gal.h @@ -79,7 +79,7 @@ public: virtual void Refresh( bool eraseBackground = true, const wxRect* rect = NULL ); protected: - void onPaint( wxPaintEvent& aEvent ); + void onPaint( wxPaintEvent& WXUNUSED( aEvent ) ); void onSize( wxSizeEvent& aEvent ); KiGfx::GAL* m_gal; ///< Interface for drawing objects on a 2D-surface @@ -90,6 +90,7 @@ protected: KiGfx::WX_VIEW_CONTROLS* m_viewControls; ///< Control for VIEW (moving, zooming, etc.) GalType m_currentGal; ///< Currently used GAL bool m_useShaders; ///< Are shaders used? (only for OpenGL GAL) + wxLongLong m_timeStamp; std::string m_galShaderPath; ///< Path to shader files, used in OpenGL mode }; From 316f7309a1ab378e204e2cc57db1991177f583ed Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 20 Jun 2013 13:16:12 +0200 Subject: [PATCH 096/415] Bug fixes: - VBO_CONTAINER::allocate() was returning wrong value in case of error - framelimiter had wrong formula for computing destined period between frames - removed _padding field from VBO_VERTEX, as it was not speeding up, but wasting memory --- common/drawpanel_gal.cpp | 2 +- common/gal/opengl/opengl_gal.cpp | 3 +-- common/gal/opengl/vbo_container.cpp | 7 ++++++- include/gal/opengl/vbo_item.h | 1 - 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index c346247925..822d368739 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -127,7 +127,7 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) // Framerate limiter wxLongLong currentTimeStamp = wxGetLocalTimeMillis(); - if( currentTimeStamp - m_timeStamp < ( 1 / FPS_LIMIT ) ) + if( currentTimeStamp - m_timeStamp < ( 1000 / FPS_LIMIT ) ) return; m_timeStamp = currentTimeStamp; diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index e42d3f0fe3..b3382b3ca3 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -755,8 +755,6 @@ void OPENGL_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoin void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) { - bool isFirstPoint = true; - if( isUseShader ) { // This method reduces amount of triangles used for drawing @@ -771,6 +769,7 @@ void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) return; } + bool isFirstPoint = true; LineCap savedLineCap = lineCap; bool isFirstLine = true; VECTOR2D startEndVector; diff --git a/common/gal/opengl/vbo_container.cpp b/common/gal/opengl/vbo_container.cpp index 80269fc18e..471ebd59f8 100644 --- a/common/gal/opengl/vbo_container.cpp +++ b/common/gal/opengl/vbo_container.cpp @@ -225,7 +225,9 @@ unsigned int VBO_CONTAINER::allocate( VBO_ITEM* aVboItem, unsigned int aSize ) // An error has occurred if( !result ) + { return UINT_MAX; + } } // Look for the space with at least given size @@ -236,7 +238,9 @@ unsigned int VBO_CONTAINER::allocate( VBO_ITEM* aVboItem, unsigned int aSize ) // This means that there is enough space for // storing vertices, but the space is not continous if( !defragment() ) - return false; + { + return UINT_MAX; + } // We can take the first free chunk, as there is only one after defragmentation // and we can be sure that it provides enough space to store the object @@ -245,6 +249,7 @@ unsigned int VBO_CONTAINER::allocate( VBO_ITEM* aVboItem, unsigned int aSize ) unsigned int chunkSize = it->first; unsigned int chunkOffset = it->second; + m_freeChunks.erase( it ); wxASSERT( chunkSize >= aSize ); diff --git a/include/gal/opengl/vbo_item.h b/include/gal/opengl/vbo_item.h index e87a3e8c17..e0e6edc8f1 100644 --- a/include/gal/opengl/vbo_item.h +++ b/include/gal/opengl/vbo_item.h @@ -41,7 +41,6 @@ typedef struct VBO_VERTEX GLfloat x, y, z; // Coordinates GLfloat r, g, b, a; // Color GLfloat shader[4]; // Shader type & params - GLfloat _padding; } VBO_VERTEX; class VBO_CONTAINER; From fdc52d933a6e221f12a31c180a04b390f1d593db Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 20 Jun 2013 16:37:21 +0200 Subject: [PATCH 097/415] Fixed some minor rendering issues, mostyl for shaderless OpenGL GAL. --- common/gal/opengl/opengl_gal.cpp | 62 ++++++++++++++++------------- common/gal/opengl/vbo_container.cpp | 6 +-- 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index b3382b3ca3..8b537b4c37 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -1101,7 +1101,7 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) Save(); - translate3( aCenterPoint.x, aCenterPoint.y, 0.0 ); + translate3( aCenterPoint.x, aCenterPoint.y, layerDepth ); Scale( VECTOR2D( aRadius, aRadius ) ); begin( GL_TRIANGLES ); @@ -1114,13 +1114,13 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) double v2[] = { ( it + 1 )->x * innerScale, ( it + 1 )->y * innerScale }; double v3[] = { ( it + 1 )->x * outerScale, ( it + 1 )->y * outerScale }; - vertex3( v0[0], v0[1], layerDepth ); - vertex3( v1[0], v1[1], layerDepth ); - vertex3( v2[0], v2[1], layerDepth ); + vertex3( v0[0], v0[1], 0.0 ); + vertex3( v1[0], v1[1], 0.0 ); + vertex3( v2[0], v2[1], 0.0 ); - vertex3( v1[0], v1[1], layerDepth ); - vertex3( v3[0], v3[1], layerDepth ); - vertex3( v2[0], v2[1], layerDepth ); + vertex3( v1[0], v1[1], 0.0 ); + vertex3( v3[0], v3[1], 0.0 ); + vertex3( v2[0], v2[1], 0.0 ); } end(); @@ -1135,12 +1135,12 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); Save(); - translate3( aCenterPoint.x, aCenterPoint.y, layerDepth ); Scale( VECTOR2D( aRadius, aRadius ) ); if( isGrouping ) { + // Multiplied by 3, as this is the number of vertices in a single triangle VBO_VERTEX* circle = new VBO_VERTEX[CIRCLE_POINTS * 3]; memcpy( circle, verticesCircle->GetVertices(), @@ -1197,11 +1197,12 @@ void OPENGL_GAL::drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, d if( isGrouping ) { - VBO_VERTEX* semiCircle = new VBO_VERTEX[CIRCLE_POINTS * 3]; + // Multiplied by 3, as this is the number of vertices in a single triangle + VBO_VERTEX* semiCircle = new VBO_VERTEX[CIRCLE_POINTS / 2 * 3]; memcpy( semiCircle, verticesSemiCircle->GetVertices(), - VBO_ITEM::VertByteSize * CIRCLE_POINTS * 3 ); - curVboItem->PushVertices( semiCircle, CIRCLE_POINTS * 3 ); + VBO_ITEM::VertByteSize * CIRCLE_POINTS / 2 * 3 ); + curVboItem->PushVertices( semiCircle, CIRCLE_POINTS / 2 * 3 ); delete[] semiCircle; } @@ -1233,7 +1234,7 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a VECTOR2D middlePoint = 0.5 * startEndPoint; Save(); - translate3( aCenterPoint.x, aCenterPoint.y, 0.0 ); + translate3( aCenterPoint.x, aCenterPoint.y, layerDepth ); if( isStrokeEnabled ) { @@ -1243,16 +1244,21 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); VECTOR2D p( cos( aStartAngle ) * aRadius, sin( aStartAngle ) * aRadius ); - for( double alpha = aStartAngle; alpha < aEndAngle; alpha += alphaIncrement ) + double alpha; + for( alpha = aStartAngle + alphaIncrement; alpha < aEndAngle; alpha += alphaIncrement ) { - if( alpha > aEndAngle ) - alpha = aEndAngle; - VECTOR2D p_next( cos( alpha ) * aRadius, sin( alpha ) * aRadius ); DrawLine( p, p_next ); p = p_next; } + + // Draw the last missing part + if( alpha != aEndAngle ) + { + VECTOR2D p_last( cos( aEndAngle ) * aRadius, sin( aEndAngle ) * aRadius ); + DrawLine( p, p_last ); + } } else { @@ -1282,13 +1288,13 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a double v2[] = { cos( alpha ) * innerScale, sin( alpha ) * innerScale }; double v3[] = { cos( alpha ) * outerScale, sin( alpha ) * outerScale }; - vertex3( v0[0], v0[1], layerDepth ); - vertex3( v1[0], v1[1], layerDepth ); - vertex3( v2[0], v2[1], layerDepth ); + vertex3( v0[0], v0[1], 0.0 ); + vertex3( v1[0], v1[1], 0.0 ); + vertex3( v2[0], v2[1], 0.0 ); - vertex3( v1[0], v1[1], layerDepth ); - vertex3( v3[0], v3[1], layerDepth ); - vertex3( v2[0], v2[1], layerDepth ); + vertex3( v1[0], v1[1], 0.0 ); + vertex3( v3[0], v3[1], 0.0 ); + vertex3( v2[0], v2[1], 0.0 ); } end(); @@ -1311,15 +1317,15 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a for( alpha = aStartAngle; ( alpha + alphaIncrement ) < aEndAngle; ) { - vertex3( middlePoint.x, middlePoint.y, layerDepth ); - vertex3( cos( alpha ), sin( alpha ), layerDepth ); + vertex3( middlePoint.x, middlePoint.y, 0.0 ); + vertex3( cos( alpha ), sin( alpha ), 0.0 ); alpha += alphaIncrement; - vertex3( cos( alpha ), sin( alpha ), layerDepth ); + vertex3( cos( alpha ), sin( alpha ), 0.0 ); } - vertex3( middlePoint.x, middlePoint.y, layerDepth ); - vertex3( cos( alpha ), sin( alpha ), layerDepth ); - vertex3( endPoint.x, endPoint.y, layerDepth ); + vertex3( middlePoint.x, middlePoint.y, 0.0 ); + vertex3( cos( alpha ), sin( alpha ), 0.0 ); + vertex3( endPoint.x, endPoint.y, 0.0 ); end(); } diff --git a/common/gal/opengl/vbo_container.cpp b/common/gal/opengl/vbo_container.cpp index 471ebd59f8..3959e3e749 100644 --- a/common/gal/opengl/vbo_container.cpp +++ b/common/gal/opengl/vbo_container.cpp @@ -34,8 +34,6 @@ #include #endif /* __WXDEBUG__ */ -#define CONTAINER_TEST 1 - using namespace KiGfx; VBO_CONTAINER::VBO_CONTAINER( int aSize ) : @@ -181,9 +179,9 @@ void VBO_CONTAINER::Add( VBO_ITEM* aVboItem, const VBO_VERTEX* aVertex, unsigned vertexPtr->a = m_color[3]; // Apply currently used shader - for( unsigned int i = 0; i < VBO_ITEM::ShaderStride; ++i ) + for( unsigned int j = 0; j < VBO_ITEM::ShaderStride; ++j ) { - vertexPtr->shader[i] = m_shader[i]; + vertexPtr->shader[j] = m_shader[j]; } } From bf7d383066bb3d1e3bcb129dafdbcad86e54d70d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 21 Jun 2013 09:01:40 +0200 Subject: [PATCH 098/415] Changed atan2() to VECTOR2D::Angle() --- common/gal/opengl/opengl_gal.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 8b537b4c37..1bf42aa497 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -665,7 +665,7 @@ void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndP double aWidth ) { VECTOR2D startEndVector = aEndPoint - aStartPoint; - double lineAngle = atan2( startEndVector.y, startEndVector.x ); + double lineAngle = startEndVector.Angle(); if( isFillEnabled ) { @@ -707,7 +707,7 @@ inline void OPENGL_GAL::drawLineCap( const VECTOR2D& aStartPoint, const VECTOR2D { VECTOR2D startEndVector = aEndPoint - aStartPoint; // double lineLength = startEndVector.EuclideanNorm(); - double lineAngle = atan2( startEndVector.y, startEndVector.x ); + double lineAngle = startEndVector.Angle(); switch( lineCap ) { From b5fdf4f1dab488dc31c776901341317c97ca1c2e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 21 Jun 2013 12:02:17 +0200 Subject: [PATCH 099/415] Shows single layer pads with proper colors. --- pcbnew/class_pad.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 3e10dc4c48..caf911f43f 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -764,8 +764,27 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const } else { - // Multi layer pad with hole - pad is shown on one common layer, hole on the other - aLayers[0] = ITEM_GAL_LAYER( PADS_VISIBLE ); + if( IsOnLayer( LAYER_N_FRONT ) && IsOnLayer( LAYER_N_BACK ) ) + { + // Multi layer pad + aLayers[0] = ITEM_GAL_LAYER( PADS_VISIBLE ); + } + else if( IsOnLayer( LAYER_N_FRONT ) ) + { + aLayers[0] = ITEM_GAL_LAYER( PAD_FR_VISIBLE ); + } + else if( IsOnLayer( LAYER_N_BACK ) ) + { + aLayers[0] = ITEM_GAL_LAYER( PAD_BK_VISIBLE ); + } +#ifdef __WXDEBUG__ + else // Should not occur + { + wxLogWarning( wxT("D_PAD::ViewGetLayers():PAD on layer different than FRONT/BACK") ); + } +#endif + + // Draw a hole aLayers[1] = ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ); aCount = 2; From 4e8d1366b66213161c3a80f599e111c41d43b9a7 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 24 Jun 2013 10:12:36 +0200 Subject: [PATCH 100/415] Added conversion from EDA_COLOR_T to COLOR4D. --- common/gal/color4d.cpp | 9 +++++++++ include/gal/color4d.h | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/common/gal/color4d.cpp b/common/gal/color4d.cpp index d5c50cc843..ebaf66b325 100644 --- a/common/gal/color4d.cpp +++ b/common/gal/color4d.cpp @@ -28,6 +28,15 @@ using namespace KiGfx; +COLOR4D::COLOR4D( EDA_COLOR_T aColor ) +{ + r = g_ColorRefs[aColor].m_Red; + g = g_ColorRefs[aColor].m_Green; + b = g_ColorRefs[aColor].m_Blue; + a = 1.0; +} + + const bool COLOR4D::operator==( const COLOR4D& aColor ) { return a == aColor.a && r == aColor.r && g == aColor.g && b == aColor.b; diff --git a/include/gal/color4d.h b/include/gal/color4d.h index 4914829c33..f53e613683 100644 --- a/include/gal/color4d.h +++ b/include/gal/color4d.h @@ -27,6 +27,8 @@ #ifndef COLOR4D_H_ #define COLOR4D_H_ +#include + namespace KiGfx { /** @@ -55,6 +57,14 @@ public: { } + /** + * @brief Constructor + * + * @param aColor is one of KiCad's palette colors. + * @see EDA_COLOR_T + */ + COLOR4D( EDA_COLOR_T aColor ); + /** * Function Highlight * Makes the color brighter by a given factor. From d114d9e386fca1c5473aa22717f53866f8c07c3d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 24 Jun 2013 10:21:34 +0200 Subject: [PATCH 101/415] Passing COLOR4D parameter using constant reference. --- common/gal/cairo/cairo_gal.cpp | 6 +++--- common/gal/opengl/opengl_gal.cpp | 6 +++--- include/gal/cairo/cairo_gal.h | 6 +++--- include/gal/graphics_abstraction_layer.h | 10 +++++----- include/gal/opengl/opengl_gal.h | 6 +++--- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index a9b898355d..9938df5d3e 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -413,7 +413,7 @@ void CAIRO_GAL::DrawCurve( const VECTOR2D& aStartPoint, const VECTOR2D& aControl } -void CAIRO_GAL::SetBackgroundColor( COLOR4D aColor ) +void CAIRO_GAL::SetBackgroundColor( const COLOR4D& aColor ) { backgroundColor = aColor; } @@ -449,7 +449,7 @@ void CAIRO_GAL::SetIsStroke( bool aIsStrokeEnabled ) } -void CAIRO_GAL::SetStrokeColor( COLOR4D aColor ) +void CAIRO_GAL::SetStrokeColor( const COLOR4D& aColor ) { storePath(); @@ -468,7 +468,7 @@ void CAIRO_GAL::SetStrokeColor( COLOR4D aColor ) } -void CAIRO_GAL::SetFillColor( COLOR4D aColor ) +void CAIRO_GAL::SetFillColor( const COLOR4D& aColor ) { storePath(); fillColor = aColor; diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 1bf42aa497..63068170c9 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -1440,7 +1440,7 @@ void OPENGL_GAL::DrawCurve( const VECTOR2D& aStartPoint, const VECTOR2D& aContro } -void OPENGL_GAL::SetStrokeColor( COLOR4D aColor ) +void OPENGL_GAL::SetStrokeColor( const COLOR4D& aColor ) { isSetAttributes = true; strokeColor = aColor; @@ -1450,14 +1450,14 @@ void OPENGL_GAL::SetStrokeColor( COLOR4D aColor ) } -void OPENGL_GAL::SetFillColor( COLOR4D aColor ) +void OPENGL_GAL::SetFillColor( const COLOR4D& aColor ) { isSetAttributes = true; fillColor = aColor; } -void OPENGL_GAL::SetBackgroundColor( COLOR4D aColor ) +void OPENGL_GAL::SetBackgroundColor( const COLOR4D& aColor ) { isSetAttributes = true; backgroundColor = aColor; diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index f042e962eb..582db3b654 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -148,16 +148,16 @@ public: virtual void SetIsStroke( bool aIsStrokeEnabled ); /// @copydoc GAL::SetFillColor() - virtual void SetFillColor( COLOR4D aColor ); + virtual void SetFillColor( const COLOR4D& aColor ); /// @copydoc GAL::SetStrokeColor() - virtual void SetStrokeColor( COLOR4D aColor ); + virtual void SetStrokeColor( const COLOR4D& aColor ); /// @copydoc GAL::GetStrokeColor() COLOR4D GetStrokeColor(); /// @copydoc GAL::SetBackgroundColor() - virtual void SetBackgroundColor( COLOR4D aColor ); + virtual void SetBackgroundColor( const COLOR4D& aColor ); /// @copydoc GAL::SetLineCap() virtual void SetLineCap( LineCap aLineCap ); diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 79bc8e2a8e..747525dd88 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -219,7 +219,7 @@ public: * * @param aColor is the color for filling. */ - inline virtual void SetFillColor( COLOR4D aColor ) + inline virtual void SetFillColor( const COLOR4D& aColor ) { fillColor = aColor; } @@ -229,7 +229,7 @@ public: * * @param aColor is the color for stroking the outline. */ - inline virtual void SetStrokeColor( COLOR4D aColor ) + inline virtual void SetStrokeColor( const COLOR4D& aColor ) { strokeColor = aColor; } @@ -249,7 +249,7 @@ public: * * @param aColor is the color for background filling. */ - virtual void SetBackgroundColor( COLOR4D aColor ) = 0; + virtual void SetBackgroundColor( const COLOR4D& aColor ) = 0; /** * @brief Set the style of the line caps. @@ -569,7 +569,7 @@ public: * * @param aGridColor is the grid color, it should have a low alpha value for the best effect. */ - inline void SetGridColor( COLOR4D aGridColor ) + inline void SetGridColor( const COLOR4D& aGridColor ) { gridColor = aGridColor; } @@ -637,7 +637,7 @@ public: * * @param aCursorColor is the color of the cursor. */ - inline void SetCursorColor( COLOR4D aCursorColor ) + inline void SetCursorColor( const COLOR4D& aCursorColor ) { cursorColor = aCursorColor; } diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index ca137752d9..0fc4b0a3cf 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -164,16 +164,16 @@ public: } /// @copydoc GAL::SetFillColor() - virtual void SetFillColor( COLOR4D aColor ); + virtual void SetFillColor( const COLOR4D& aColor ); /// @copydoc GAL::SetStrokeColor() - virtual void SetStrokeColor( COLOR4D aColor ); + virtual void SetStrokeColor( const COLOR4D& aColor ); /// @copydoc GAL::GetStrokeColor() COLOR4D GetStrokeColor(); /// @copydoc GAL::SetBackgroundColor() - virtual void SetBackgroundColor( COLOR4D aColor ); + virtual void SetBackgroundColor( const COLOR4D& aColor ); /// @copydoc GAL::SetLineCap() virtual void SetLineCap( LineCap aLineCap ) From 9e937f8113fff1b299b0582159366c5be23acb51 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 24 Jun 2013 10:32:08 +0200 Subject: [PATCH 102/415] Added convertsion from wxColour to COLOR4D. --- common/gal/color4d.cpp | 11 +++++++++++ include/gal/color4d.h | 9 +++++++++ 2 files changed, 20 insertions(+) diff --git a/common/gal/color4d.cpp b/common/gal/color4d.cpp index ebaf66b325..b28b4d1b68 100644 --- a/common/gal/color4d.cpp +++ b/common/gal/color4d.cpp @@ -37,6 +37,17 @@ COLOR4D::COLOR4D( EDA_COLOR_T aColor ) } +#ifdef WX_COMPATIBILITY + COLOR4D::COLOR4D( const wxColour& aColor ) + { + r = aColor.Red(); + g = aColor.Green(); + b = aColor.Blue(); + a = aColor.Alpha(); + } +#endif + + const bool COLOR4D::operator==( const COLOR4D& aColor ) { return a == aColor.a && r == aColor.r && g == aColor.g && b == aColor.b; diff --git a/include/gal/color4d.h b/include/gal/color4d.h index f53e613683..f11f6487db 100644 --- a/include/gal/color4d.h +++ b/include/gal/color4d.h @@ -65,6 +65,15 @@ public: */ COLOR4D( EDA_COLOR_T aColor ); +#ifdef WX_COMPATIBILITY + /** + * @brief Constructor + * + * @param aColor is the color type used by wxWidgets. + */ + COLOR4D( const wxColour& aColor ); +#endif /* WX_COMPATIBLITY */ + /** * Function Highlight * Makes the color brighter by a given factor. From bfc1665d87b356b67c50b5013fc3746adcdc4f9c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 24 Jun 2013 13:46:24 +0200 Subject: [PATCH 103/415] Fixed hotkeys for switching GAL backends. --- pcbnew/hotkeys.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pcbnew/hotkeys.cpp b/pcbnew/hotkeys.cpp index aef8425021..5cc75c4eb9 100644 --- a/pcbnew/hotkeys.cpp +++ b/pcbnew/hotkeys.cpp @@ -83,11 +83,14 @@ static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ), static EDA_HOTKEY HkSwitchHighContrastMode( wxT("Switch Highcontrast mode"), HK_SWITCH_HIGHCONTRAST_MODE,'H'); #ifdef KICAD_GAL -static EDA_HOTKEY HkCanvasDefault( wxT( "Switch to default canvas" ), HK_CANVAS_DEFAULT, WXK_F9 ); -static EDA_HOTKEY HkCanvasOpenGL( wxT( "Switch to OpenGL canvas" ), HK_CANVAS_OPENGL, WXK_F10 ); +static EDA_HOTKEY HkCanvasDefault( wxT( "Switch to default canvas" ), + HK_CANVAS_DEFAULT, GR_KB_ALT + WXK_F9 ); +static EDA_HOTKEY HkCanvasOpenGL( wxT( "Switch to OpenGL canvas" ), + HK_CANVAS_OPENGL, GR_KB_ALT + WXK_F10 ); static EDA_HOTKEY HkCanvasOpenGLShaders( wxT( "Switch to OpenGL canvas with shaders" ), - HK_CANVAS_OPENGL_SHADERS, WXK_F11 ); -static EDA_HOTKEY HkCanvasCairo( wxT( "Switch to Cairo canvas" ), HK_CANVAS_CAIRO, WXK_F12 ); + HK_CANVAS_OPENGL_SHADERS, GR_KB_ALT + WXK_F11 ); +static EDA_HOTKEY HkCanvasCairo( wxT( "Switch to Cairo canvas" ), + HK_CANVAS_CAIRO, GR_KB_ALT + WXK_F12 ); #endif /* Fit on Screen */ #if !defined( __WXMAC__ ) From e1aa6f7e84424150df2f88f554b17e5696990c94 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 24 Jun 2013 14:33:02 +0200 Subject: [PATCH 104/415] Grid settings apply to GAL based rendering. --- common/drawframe.cpp | 62 ++++++++++++++++------- common/drawpanel_gal.cpp | 5 -- common/gal/graphics_abstraction_layer.cpp | 6 +++ common/gal/opengl/opengl_gal.cpp | 2 + include/gal/graphics_abstraction_layer.h | 14 ++++- 5 files changed, 66 insertions(+), 23 deletions(-) diff --git a/common/drawframe.cpp b/common/drawframe.cpp index 6fec87f2a3..58df3c1766 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -236,7 +236,15 @@ void EDA_DRAW_FRAME::SkipNextLeftButtonReleaseEvent() void EDA_DRAW_FRAME::OnToggleGridState( wxCommandEvent& aEvent ) { SetGridVisibility( !IsGridVisible() ); - m_canvas->Refresh(); +#ifdef KICAD_GAL + if( m_galCanvasActive ) + { + m_galCanvas->GetGAL()->SetGridVisibility( IsGridVisible() ); + m_galCanvas->Refresh(); + } + else +#endif /* KICAD_GAL */ + m_canvas->Refresh(); } @@ -388,6 +396,14 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event ) m_LastGridSizeId = id - ID_POPUP_GRID_LEVEL_1000; screen->SetGrid( id ); screen->SetCrossHairPosition( screen->RefPos( true ) ); +#ifdef KICAD_GAL + if( m_galCanvasActive ) + { + KiGfx::GAL* gal = m_galCanvas->GetGAL(); + gal->SetGridSize( VECTOR2D( screen->GetGrid().m_Size ) ); + } +#endif /* KICAD_GAL */ + Refresh(); } @@ -945,32 +961,44 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) KiGfx::VIEW* view = m_galCanvas->GetView(); KiGfx::GAL* gal = m_galCanvas->GetGAL(); - if( aEnable && m_galCanvasActive ) - { - // When we switch between GAL based canvases, all we need is a refresh - m_galCanvas->Refresh(); - } - - if( !( aEnable ^ m_galCanvasActive ) ) - return; - double zoomFactor = gal->GetWorldScale() / gal->GetZoomFactor(); // Display the same view after canvas switching if( aEnable ) { - double zoom = 1 / ( zoomFactor * m_canvas->GetZoom() ); - view->SetScale( zoom ); + BASE_SCREEN* screen = GetScreen(); - view->SetCenter( VECTOR2D( m_canvas->GetScreenCenterLogicalPosition() ) ); + // Switch to GAL rendering + if( !m_galCanvasActive ) + { + // Change view settings only if GAL was not active previously + double zoom = 1.0 / ( zoomFactor * m_canvas->GetZoom() ); + view->SetScale( zoom ); + view->SetCenter( VECTOR2D( m_canvas->GetScreenCenterLogicalPosition() ) ); + } + + // Set up grid settings + gal->SetGridVisibility( IsGridVisible() ); + // Default grid color - dark cyan does not look good + //gal->SetGridColor( KiGfx::COLOR4D( GetGridColor() ) ); + gal->SetGridColor( KiGfx::COLOR4D( 0.1, 0.1, 0.1, 1.0 ) ); + gal->SetGridSize( VECTOR2D( screen->GetGridSize() ) ); + gal->SetGridOrigin( VECTOR2D( screen->GetGridOrigin() ) ); + gal->SetGridOriginMarkerSize( 15 ); + gal->SetGridDrawThreshold( 10 ); } else { - double zoom = 1 / ( zoomFactor * view->GetScale() ); - m_canvas->SetZoom( zoom ); + // Switch to standard rendering + if( m_galCanvasActive ) + { + // Change view settings only if GAL was active previously + double zoom = 1.0 / ( zoomFactor * view->GetScale() ); + m_canvas->SetZoom( zoom ); - VECTOR2D center = view->GetCenter(); - RedrawScreen( wxPoint( center.x, center.y ), false ); + VECTOR2D center = view->GetCenter(); + RedrawScreen( wxPoint( center.x, center.y ), false ); + } } m_canvas->SetEvtHandlerEnabled( !aEnable ); diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 822d368739..2896be651f 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -140,11 +140,6 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) m_gal->BeginDrawing(); m_gal->SetBackgroundColor( KiGfx::COLOR4D( 0, 0, 0, 1.0 ) ); m_gal->ClearScreen(); - m_gal->SetGridOrigin( VECTOR2D( 0, 0 ) ); - m_gal->SetGridOriginMarkerSize( 15 ); - m_gal->SetGridSize( VECTOR2D( METRIC_UNIT_LENGTH / 10000.0, METRIC_UNIT_LENGTH / 10000.0 ) ); - m_gal->SetGridDrawThreshold( 10 ); - m_gal->SetLayerDepth( 0 ); m_gal->DrawGrid(); m_view->Redraw(); diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index a996fcbafb..51c5bd5786 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -44,6 +44,7 @@ GAL::GAL() SetZoomFactor( 1.0 ); SetFillColor( COLOR4D( 0.0, 0.0, 0.0, 0.0 ) ); SetStrokeColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); + SetGridVisibility( true ); SetGridColor( COLOR4D( 1, 1, 1, 0.1 ) ); SetCoarseGrid( 5 ); SetLineWidth( 1.0 ); @@ -58,6 +59,9 @@ GAL::~GAL() void GAL::DrawGrid() { + if( !gridVisibility ) + return; + // The grid consists of lines // For the drawing the start points, end points and increments have to be calculated in world coordinates VECTOR2D screenStartPoint( 0, 0 ); @@ -98,6 +102,7 @@ void GAL::DrawGrid() double origSize = (double) gridOriginMarkerSize / worldScale; + // Draw the origin marker SetStrokeColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); SetIsFill( false ); DrawLine( gridOrigin + VECTOR2D( -origSize, -origSize ), gridOrigin + VECTOR2D( origSize, origSize ) ); @@ -109,6 +114,7 @@ void GAL::DrawGrid() if( std::max( gridScreenSizeDense, gridScreenSizeCoarse ) < gridDrawThreshold ) return; + SetLayerDepth( 0.0 ); // Now draw the grid, every coarse grid line gets the double width for( int j = gridStartY; j < gridEndY; j += 1 ) { diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 63068170c9..097c141077 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -1909,10 +1909,12 @@ void OPENGL_GAL::DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEnd if( aStartPoint.x == aEndPoint.x ) { + // Vertical grid line perpendicularVector = VECTOR2D( 0.5 * lineWidth, 0 ); } else { + // Horizontal grid line perpendicularVector = VECTOR2D( 0, 0.5 * lineWidth ); } diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 747525dd88..e7524a65e1 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -524,6 +524,16 @@ public: // Grid methods // ------------- + /** + * @brief Sets the visibility setting of the grid. + * + * @param aVisibility is the new visibility setting of the grid. + */ + inline void SetGridVisibility( bool aVisibility ) + { + gridVisibility = aVisibility; + } + /** * @brief Set the origin point for the grid. * @@ -698,13 +708,15 @@ protected: double layerDepth; ///< The actual layer depth VECTOR2D depthRange; ///< Range of the depth + // Grid settings + bool gridVisibility; ///< Should the grid be shown VECTOR2D gridSize; ///< The grid size VECTOR2D gridOrigin; ///< The grid origin COLOR4D gridColor; ///< Color of the grid int gridTick; ///< Every tick line gets the double width double gridLineWidth; ///< Line width of the grid int gridDrawThreshold; ///< Minimum screen size of the grid (pixels) - ///< below which the grid is not drawn + ///< below which the grid is not drawn int gridOriginMarkerSize; ///< Grid origin indicator size (pixels) bool isCursorEnabled; ///< Is the cursor enabled? From 33b3d5edfbcc20fb0b2b82adbf1e06e7c2e01836 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 24 Jun 2013 15:40:31 +0200 Subject: [PATCH 105/415] Small improvements to SHADER class. --- common/gal/opengl/shader.cpp | 31 ++++++++++--------------------- include/gal/opengl/shader.h | 34 +++++++++++++++++++++++++++------- 2 files changed, 37 insertions(+), 28 deletions(-) diff --git a/common/gal/opengl/shader.cpp b/common/gal/opengl/shader.cpp index 6cbd84850d..83eab3d2a7 100644 --- a/common/gal/opengl/shader.cpp +++ b/common/gal/opengl/shader.cpp @@ -35,13 +35,14 @@ using namespace KiGfx; -SHADER::SHADER() +SHADER::SHADER() : + isProgramCreated( false ), + isShaderLinked( false ), + maximumVertices( 4 ), + active( false ), + geomInputType( GL_LINES ), + geomOutputType( GL_LINES ) { - isProgramCreated = false; - isShaderLinked = false; - maximumVertices = 4; - geomInputType = GL_LINES; - geomOutputType = GL_LINES; } @@ -108,7 +109,7 @@ std::string SHADER::ReadSource( std::string aShaderSourceName ) } -void SHADER::AddSource( std::string aShaderSourceName, ShaderType aShaderType ) +void SHADER::AddSource( const std::string& aShaderSourceName, ShaderType aShaderType ) { if( isShaderLinked ) { @@ -195,19 +196,7 @@ bool SHADER::Link() } -void SHADER::Use() -{ - glUseProgram( programNumber ); -} - - -void SHADER::Deactivate() -{ - glUseProgram( 0 ); -} - - -void SHADER::AddParameter( std::string aParameterName ) +void SHADER::AddParameter( const std::string& aParameterName ) { GLint location = glGetUniformLocation( programNumber, aParameterName.c_str() ); @@ -224,7 +213,7 @@ void SHADER::SetParameter( int parameterNumber, float value ) } -int SHADER::GetAttribute( std::string aAttributeName ) +int SHADER::GetAttribute( std::string aAttributeName ) const { return glGetAttribLocation( programNumber, aAttributeName.c_str() ); } diff --git a/include/gal/opengl/shader.h b/include/gal/opengl/shader.h index 71fa03109f..115fa02e49 100644 --- a/include/gal/opengl/shader.h +++ b/include/gal/opengl/shader.h @@ -76,23 +76,42 @@ public: * @param aShaderSourceName is the shader source file name. * @param aShaderType is the type of the shader. */ - void AddSource( std::string aShaderSourceName, ShaderType aShaderType ); + void AddSource( const std::string& aShaderSourceName, ShaderType aShaderType ); /** - * Link the shaders. + * @brief Link the shaders. + * * @return true in case of success, false otherwise. */ bool Link(); /** - * Use the shader. + * @brief Use the shader. */ - void Use(); + inline void Use() + { + glUseProgram( programNumber ); + active = true; + } /** * @brief Deactivate the shader and use the default OpenGL program. */ - void Deactivate(); + inline void Deactivate() + { + glUseProgram( 0 ); + active = false; + } + + /** + * @brief Returns the current state of the shader. + * + * @return True if any of shaders is enabled. + */ + inline bool IsActive() const + { + return active; + } /** * @brief Configure the geometry shader - has to be done before linking! @@ -113,7 +132,7 @@ public: * * @param aParameterName is the name of the parameter. */ - void AddParameter( std::string aParameterName ); + void AddParameter( const std::string& aParameterName ); /** * @brief Set a parameter of the shader. @@ -129,7 +148,7 @@ public: * @param aAttributeName is the name of the attribute. * @return the location. */ - int GetAttribute( std::string aAttributeName ); + int GetAttribute( std::string aAttributeName ) const; private: @@ -152,6 +171,7 @@ private: GLuint programNumber; ///< Shader program number bool isProgramCreated; ///< Flag for program creation bool isShaderLinked; ///< Is the shader linked? + bool active; ///< Is any of shaders used? GLuint maximumVertices; ///< The maximum of vertices to be generated GLuint geomInputType; ///< Input type [e.g. GL_LINES, GL_TRIANGLES, GL_QUADS etc.] GLuint geomOutputType; ///< Output type [e.g. GL_LINES, GL_TRIANGLES, GL_QUADS etc.] From cdab6cfdbedc44af070f3ad999e520a73216b0ed Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 24 Jun 2013 16:02:18 +0200 Subject: [PATCH 106/415] Draw the origin marker in OpenGL with shaders GAL. --- common/gal/graphics_abstraction_layer.cpp | 7 ++-- common/gal/opengl/opengl_gal.cpp | 42 +++++++++-------------- include/gal/opengl/opengl_gal.h | 1 - 3 files changed, 19 insertions(+), 31 deletions(-) diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index 51c5bd5786..f693507735 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -97,13 +97,12 @@ void GAL::DrawGrid() double width = gridLineWidth / worldScale; double doubleWidth = 2 * width; - // Set line width & color - SetLineWidth( width ); - - double origSize = (double) gridOriginMarkerSize / worldScale; + SetLayerDepth( 0.0 ); // Draw the origin marker + double origSize = (double) gridOriginMarkerSize / worldScale; SetStrokeColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); + SetLineWidth( width ); SetIsFill( false ); DrawLine( gridOrigin + VECTOR2D( -origSize, -origSize ), gridOrigin + VECTOR2D( origSize, origSize ) ); DrawLine( gridOrigin + VECTOR2D( -origSize, origSize ), gridOrigin + VECTOR2D( origSize, -origSize ) ); diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 097c141077..462bf30f55 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -113,20 +113,18 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, InitTesselatorCallbacks( tesselator ); gluTessProperty( tesselator, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_POSITIVE ); - if( !isUseShader ) - { - // (3 vertices per triangle) * (2 items [circle&semicircle]) * (number of points per item) - precomputedContainer = new VBO_CONTAINER( 3 * 2 * CIRCLE_POINTS ); + // Buffered semicircle & circle vertices + // (3 vertices per triangle) * (2 items [circle&semicircle]) * (number of points per item) + precomputedContainer = new VBO_CONTAINER( 3 * 2 * CIRCLE_POINTS ); - // Compute the unit circles, used for speed up of the circle drawing - verticesCircle = new VBO_ITEM( precomputedContainer ); - computeUnitCircle(); - verticesCircle->Finish(); + // Compute the unit circles, used for speed up of the circle drawing + verticesCircle = new VBO_ITEM( precomputedContainer ); + computeUnitCircle(); + verticesCircle->Finish(); - verticesSemiCircle = new VBO_ITEM( precomputedContainer ); - computeUnitSemiCircle(); - verticesSemiCircle->Finish(); - } + verticesSemiCircle = new VBO_ITEM( precomputedContainer ); + computeUnitSemiCircle(); + verticesSemiCircle->Finish(); } @@ -134,12 +132,9 @@ OPENGL_GAL::~OPENGL_GAL() { glFlush(); - if( !isUseShader ) - { - delete verticesCircle; - delete verticesSemiCircle; - delete precomputedContainer; - } + delete verticesCircle; + delete verticesSemiCircle; + delete precomputedContainer; // Delete the buffers if( isFrameBufferInitialized ) @@ -449,8 +444,6 @@ void OPENGL_GAL::BeginDrawing() void OPENGL_GAL::blitMainTexture( bool aIsClearFrameBuffer ) { - shader.Deactivate(); - // Don't use blending for the final blitting glDisable( GL_BLEND ); @@ -606,7 +599,7 @@ inline void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2 begin( GL_TRIANGLES ); - if( isUseShader ) + if( isUseShader && isGrouping ) { glm::vec4 vector( perpendicularVector.x, perpendicularVector.y, 0.0, 0.0 ); @@ -1026,7 +1019,7 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) { - if( isUseShader ) + if( isUseShader && isGrouping ) { if( isFillEnabled ) { @@ -1161,7 +1154,7 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) void OPENGL_GAL::drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ) { - if( isUseShader ) + if( isUseShader && isGrouping ) { Save(); Translate( aCenterPoint ); @@ -1924,9 +1917,6 @@ void OPENGL_GAL::DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEnd VECTOR2D point3 = aEndPoint + perpendicularVector; VECTOR2D point4 = aEndPoint - perpendicularVector; - if( isUseShader ) - shader.Deactivate(); - // Set color glColor4d( gridColor.r, gridColor.g, gridColor.b, gridColor.a ); diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 0fc4b0a3cf..77acc3a1f8 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -409,7 +409,6 @@ private: bool isFrameBufferInitialized; ///< Are the frame buffers initialized? bool isVboInitialized; bool isShaderInitialized; ///< Was the shader initialized? - bool isShaderEnabled; ///< Are the shaders enabled? bool isUseShader; ///< Should the shaders be used? bool isGrouping; ///< Was a group started? From ec1a5d1318d6ef1c77a5db693ad3e1704379ec40 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 25 Jun 2013 09:15:57 +0200 Subject: [PATCH 107/415] Added zoom in, zoom out & fit on screen view commands handling in GAL. --- common/zoom.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/common/zoom.cpp b/common/zoom.cpp index e8e07b5f90..e23e718a73 100644 --- a/common/zoom.cpp +++ b/common/zoom.cpp @@ -33,6 +33,9 @@ #include #include #include +#include +#include +#include #include #include #include @@ -81,10 +84,10 @@ void EDA_DRAW_FRAME::Zoom_Automatique( bool aWarpPointer ) if( screen->m_FirstRedraw ) screen->SetCrossHairPosition( screen->GetScrollCenterPosition() ); +#ifdef KICAD_GAL if( !m_galCanvasActive ) +#endif /* KICAD_GAL */ RedrawScreen( screen->GetScrollCenterPosition(), aWarpPointer ); - else - m_canvas->Hide(); } @@ -193,6 +196,20 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event ) RedrawScreen( center, true ); } + if( m_galCanvasActive ) + { + // Apply computed view settings to GAL + KiGfx::VIEW* view = m_galCanvas->GetView(); + KiGfx::GAL* gal = m_galCanvas->GetGAL(); + + double zoomFactor = gal->GetWorldScale() / gal->GetZoomFactor(); + double zoom = 1.0 / ( zoomFactor * GetZoom() ); + + view->SetScale( zoom ); + view->SetCenter( VECTOR2D( center ) ); + m_galCanvas->Refresh(); + } + UpdateStatusBar(); } From dbb4e67737d447a913c194415a95bf9ead7709e9 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 25 Jun 2013 16:54:30 +0200 Subject: [PATCH 108/415] Fixed warning about a not initialized variable. --- common/gal/stroke_font.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp index b4b89965de..3f0958284e 100644 --- a/common/gal/stroke_font.cpp +++ b/common/gal/stroke_font.cpp @@ -56,8 +56,8 @@ bool STROKE_FONT::LoadNewStrokeFont( const char* const aNewStrokeFont[], int aNe for( int j = 0; j < aNewStrokeFontSize; j++ ) { Glyph glyph; - double glyphStartX; - double glyphEndX; + double glyphStartX = 0.0; + double glyphEndX = 0.0; VECTOR2D glyphBoundingX; std::deque pointList; From 258b80494132f6ddc837b48336fbe44a0236817e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 25 Jun 2013 17:12:54 +0200 Subject: [PATCH 109/415] Added possibility to change cached layer color (for the purpose of high contrast display). --- common/gal/cairo/cairo_gal.cpp | 18 ++++++++ common/gal/opengl/opengl_gal.cpp | 7 +++ common/gal/opengl/vbo_item.cpp | 9 ++-- common/view/view.cpp | 53 ++++++++++++++++++++++- include/gal/cairo/cairo_gal.h | 3 ++ include/gal/graphics_abstraction_layer.h | 8 ++++ include/gal/opengl/opengl_gal.h | 3 ++ include/painter.h | 19 +++++--- include/view/view.h | 31 +++++++++---- pcbnew/dialogs/dialog_general_options.cpp | 24 +++++----- pcbnew/pcb_painter.cpp | 15 ++++++- pcbnew/pcb_painter.h | 4 +- 12 files changed, 161 insertions(+), 33 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 9938df5d3e..4bc1d59c87 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -801,6 +801,24 @@ void CAIRO_GAL::DrawGroup( int aGroupNumber ) } +void CAIRO_GAL::ChangeGroupColor( int aGroupNumber, const COLOR4D& aNewColor ) +{ + storePath(); + + for( Group::iterator it = groups[aGroupNumber].begin(); + it != groups[aGroupNumber].end(); ++it ) + { + if( it->command == CMD_SET_FILLCOLOR || it->command == CMD_SET_STROKECOLOR ) + { + it->arguments[0] = aNewColor.r; + it->arguments[1] = aNewColor.g; + it->arguments[2] = aNewColor.b; + it->arguments[3] = aNewColor.a; + } + } +} + + void CAIRO_GAL::Flush() { storePath(); diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 462bf30f55..69944a5daf 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -1628,6 +1628,13 @@ void OPENGL_GAL::DrawGroup( int aGroupNumber ) } +void OPENGL_GAL::ChangeGroupColor( int aGroupNumber, const COLOR4D& aNewColor ) +{ + vboItems[aGroupNumber]->ChangeColor( aNewColor ); + vboNeedsUpdate = true; +} + + void OPENGL_GAL::computeUnitCircle() { displayListCircle = glGenLists( 1 ); diff --git a/common/gal/opengl/vbo_item.cpp b/common/gal/opengl/vbo_item.cpp index 28d83f5895..4d6132403b 100644 --- a/common/gal/opengl/vbo_item.cpp +++ b/common/gal/opengl/vbo_item.cpp @@ -79,18 +79,17 @@ VBO_VERTEX* VBO_ITEM::GetVertices() void VBO_ITEM::ChangeColor( const COLOR4D& aColor ) { - wxASSERT_MSG( false, wxT( "This was not tested yet" ) ); - if( m_isDirty ) Finish(); - // Point to color of vertices VBO_VERTEX* vertexPtr = GetVertices(); - const GLfloat newColor[] = { aColor.r, aColor.g, aColor.b, aColor.a }; for( unsigned int i = 0; i < m_size; ++i ) { - memcpy( &vertexPtr->r, newColor, ColorByteSize ); + vertexPtr->r = aColor.r; + vertexPtr->g = aColor.g; + vertexPtr->b = aColor.b; + vertexPtr->a = aColor.a; // Move on to the next vertex vertexPtr++; diff --git a/common/view/view.cpp b/common/view/view.cpp index 680ae1e719..07114f8eaa 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -307,6 +307,55 @@ void VIEW::SetLayerOrder( int aLayer, int aRenderingOrder ) } +struct VIEW::updateItemsColor +{ + updateItemsColor( int aLayer, PAINTER* aPainter, GAL* aGal ) : + layer( aLayer ), painter( aPainter), gal( aGal ) + { + } + + void operator()( VIEW_ITEM* aItem ) + { + // Obtain the color that should be used for coloring the item + const COLOR4D color = painter->GetColor( aItem, layer ); + int group = aItem->getGroup( layer ); + + gal->ChangeGroupColor( group, color ); + } + + int layer; + PAINTER* painter; + GAL* gal; +}; + + +void VIEW::UpdateLayerColor( int aLayer ) +{ + BOX2I r; + + r.SetMaximum(); + + updateItemsColor visitor( aLayer, m_painter, m_gal ); + m_layers[aLayer].items->Query( r, visitor ); +} + + +void VIEW::UpdateAllLayersColor() +{ + BOX2I r; + + r.SetMaximum(); + + for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) + { + VIEW_LAYER* l = &( ( *i ).second ); + updateItemsColor visitor( l->id, m_painter, m_gal ); + + l->items->Query( r, visitor ); + } +} + + void VIEW::SetTopLayer( int aLayer ) { // Restore previous order @@ -561,13 +610,13 @@ void VIEW::clearGroupCache() BOX2I r; r.SetMaximum(); + clearItemCache visitor( this ); for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) { VIEW_LAYER* l = & ( ( *i ).second ); - clearItemCache visitor( this ); l->items->Query( r, visitor ); - }; + } } diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 582db3b654..0af3c173fd 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -209,6 +209,9 @@ public: /// @copydoc GAL::DrawGroup() virtual void DrawGroup( int aGroupNumber ); + /// @copydoc GAL::ChangeGroupColor() + virtual void ChangeGroupColor( int aGroupNumber, const COLOR4D& aNewColor ); + /// @copydoc GAL::DeleteGroup() virtual void DeleteGroup( int aGroupNumber ); diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index e7524a65e1..8a8cbb2036 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -363,6 +363,14 @@ public: */ virtual void DrawGroup( int aGroupNumber ) = 0; + /** + * @brief Changes the color used to draw the group. + * + * @param aGroupNumber is the group number. + * @param aNewColor is the new color. + */ + virtual void ChangeGroupColor( int aGroupNumber, const COLOR4D& aNewColor ) = 0; + /** * @brief Delete the group from the memory. * diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 77acc3a1f8..9db405d7a5 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -234,6 +234,9 @@ public: /// @copydoc GAL::DrawGroup() virtual void DrawGroup( int aGroupNumber ); + /// @copydoc GAL::ChangeGroupColor() + virtual void ChangeGroupColor( int aGroupNumber, const COLOR4D& aNewColor ); + /// @copydoc GAL::DeleteGroup() virtual void DeleteGroup( int aGroupNumber ); diff --git a/include/painter.h b/include/painter.h index d043dff2c8..f4ac232821 100644 --- a/include/painter.h +++ b/include/painter.h @@ -82,7 +82,7 @@ public: * (eg. highlighted, so it differs from other layers). * @param aLayerId is a layer number that should be displayed in a specific mode. */ - void SetActiveLayer( int aLayerId ) + inline void SetActiveLayer( int aLayerId ) { m_activeLayer = aLayerId; } @@ -94,7 +94,7 @@ public: * @param aNetCode is optional and if specified, turns on higlighting only for the net with * number given as the parameter. */ - void SetHighlight( bool aEnabled, int aNetcode = -1 ) + inline void SetHighlight( bool aEnabled, int aNetcode = -1 ) { m_highlightEnabled = aEnabled; @@ -107,7 +107,7 @@ public: * Turns on/off high contrast display mode. * @param aEnabled determines if high contrast display mode should be enabled or not. */ - void SetHighContrast( bool aEnabled ) + inline void SetHighContrast( bool aEnabled ) { m_hiContrastEnabled = aEnabled; } @@ -200,7 +200,7 @@ public: /** * Function Draw - * Takes an instance of EDA_ITEM and passes it to a function that know how to draw the item. + * Takes an instance of VIEW_ITEM and passes it to a function that know how to draw the item. * @param aItem is an item to be drawn. * @param aLayer tells which layer is currently rendered so that draw functions * may know what to draw (eg. for pads there are separate layers for holes, because they @@ -208,8 +208,17 @@ public: */ virtual bool Draw( const VIEW_ITEM* aItem, int aLayer ) = 0; -protected: + /** + * Function GetColor + * Returns the color that should be used to draw the specific VIEW_ITEM on the specific layer + * using currently used render settings. + * @param aItem is the VIEW_ITEM. + * @param aLayer is the layer. + * @return The color. + */ + virtual const COLOR4D& GetColor( const VIEW_ITEM* aItem, int aLayer ) = 0; +protected: /** * Function getLayerColor * is used for obtaining color that should be used for specific layer/net diff --git a/include/view/view.h b/include/view/view.h index 45e7645671..9577537dda 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -61,8 +61,8 @@ public: /** * Constructor. - * @param aIsDynamic: decides whether we are creating a static or a dynamic VIEW. - * @param aUseGroups: fixme + * @param aIsDynamic decides whether we are creating a static or a dynamic VIEW. + * @param aUseGroups tells if items added to the VIEW should be stored in groups. */ VIEW( bool aIsDynamic = true, bool aUseGroups = false ); @@ -116,7 +116,7 @@ public: * Returns the GAL this view is using to draw graphical primitives. * @return Pointer to the currently used GAL instance. */ - GAL* GetGAL() const { return m_gal; } + GAL* GetGAL() const { return m_gal; } /** * Function SetPainter() @@ -264,6 +264,21 @@ public: */ void SetLayerOrder( int aLayer, int aRenderingOrder ); + /** + * Function UpdateLayerColor() + * Applies the new coloring scheme held by RENDER_SETTINGS in case that it has changed. + * @param aLayer is a number of the layer to be updated. + * @see RENDER_SETTINGS + */ + void UpdateLayerColor( int aLayer ); + + /** + * Function UpdateAllLayersColor() + * Applies the new coloring scheme to all layers. The used scheme is held by RENDER_SETTINGS. + * @see RENDER_SETTINGS + */ + void UpdateAllLayersColor(); + /** * Function SetTopLayer() * Sets given layer to be displayed on the top or sets back the default order of layers. @@ -313,7 +328,6 @@ public: static const int TOP_LAYER; ///* layer number for displaying items on the top private: - struct VIEW_LAYER { bool enabled; ///* is the layer to be rendered? @@ -338,6 +352,7 @@ private: struct unlinkItem; struct recacheItem; struct drawItem; + struct updateItemsColor; ///* Saves current top layer settings in order to restore it when it's not top anymore VIEW_LAYER m_topLayer; @@ -346,18 +361,18 @@ private: bool m_enableTopLayer; ///* Redraws contents within rect aRect - void redrawRect( const BOX2I& aRect ); + void redrawRect( const BOX2I& aRect ); ///* Manages dirty flags & redraw queueing when updating an item. Called internally /// via VIEW_ITEM::ViewUpdate() - void invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ); + void invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ); ///* Sorts m_orderedLayers when layer rendering order has changed - void sortLayers(); + void sortLayers(); ///* Clears cached GAL group numbers (*ONLY* numbers stored in VIEW_ITEMs, not group objects ///* used by GAL) - void clearGroupCache(); + void clearGroupCache(); /// Determines rendering order of layers. Used in display order sorting function. static bool compareRenderingOrder( VIEW_LAYER* i, VIEW_LAYER* j ) diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index 4634dd8c8b..0303401896 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -161,6 +161,12 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) { int id = event.GetId(); bool state = event.IsChecked(); +#ifdef KICAD_GAL + KiGfx::PCB_PAINTER* painter = + static_cast ( m_galCanvas->GetView()->GetPainter() ); + KiGfx::PCB_RENDER_SETTINGS* settings = + static_cast ( painter->GetSettings() ); +#endif /* KICAD_GAL */ switch( id ) { @@ -221,9 +227,14 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) case ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE: DisplayOpt.ContrastModeDisplay = state; #ifdef KICAD_GAL + // Apply new display options to the GAL canvas + settings->LoadDisplayOptions( DisplayOpt ); m_galCanvas->GetView()->EnableTopLayer( state ); + m_galCanvas->GetView()->UpdateAllLayersColor(); + + if( !IsGalCanvasActive() ) #endif /* KICAD_GAL */ - m_canvas->Refresh(); + m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR_MICROWAVE: @@ -250,16 +261,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) } #ifdef KICAD_GAL - // Apply new display options to the GAL canvas - KiGfx::PCB_PAINTER* painter = - static_cast ( m_galCanvas->GetView()->GetPainter() ); - KiGfx::PCB_RENDER_SETTINGS* settings = - static_cast ( painter->GetSettings() ); - settings->LoadDisplayOptions( DisplayOpt ); - if( IsGalCanvasActive() ) - { m_galCanvas->Refresh(); - } -#endif +#endif /* KICAD_GAL */ } diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index c8591208d7..e0cb774058 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -117,6 +117,19 @@ PCB_PAINTER::PCB_PAINTER( GAL* aGal ) : } +const COLOR4D& PCB_PAINTER::GetColor( const VIEW_ITEM* aItem, int aLayer ) +{ + int netCode = 0; + + // Try to obtain the netcode for the item + const BOARD_CONNECTED_ITEM* item = dynamic_cast( aItem ); + if( item ) + netCode = item->GetNet(); + + return getLayerColor( aLayer, netCode ); +} + + const COLOR4D& PCB_PAINTER::getLayerColor( int aLayer, int aNetCode ) const { if( m_pcbSettings->m_hiContrastEnabled && m_pcbSettings->m_activeLayer != aLayer ) @@ -211,7 +224,7 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) break; default: - // Painter does not knowNetwork: how to draw the object + // Painter does not know how to draw the object return false; break; } diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index e20c0008db..6d1c630801 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -126,8 +126,10 @@ public: m_pcbSettings = dynamic_cast ( aSettings ); } -protected: + /// @copydoc PAINTER::GetColor() + virtual const COLOR4D& GetColor( const VIEW_ITEM* aItem, int aLayer ); +protected: PCB_RENDER_SETTINGS* m_pcbSettings; /// @copydoc PAINTER::getLayerColor() From 4ca54b2f1de6f37016163ed09f463d14276ffc74 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 26 Jun 2013 10:43:58 +0200 Subject: [PATCH 110/415] Small speed up for the color change function (OpenGL_GAL). --- common/gal/opengl/vbo_item.cpp | 5 +---- include/gal/opengl/vbo_container.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/common/gal/opengl/vbo_item.cpp b/common/gal/opengl/vbo_item.cpp index 4d6132403b..ba68c1abb0 100644 --- a/common/gal/opengl/vbo_item.cpp +++ b/common/gal/opengl/vbo_item.cpp @@ -73,15 +73,12 @@ VBO_VERTEX* VBO_ITEM::GetVertices() if( m_isDirty ) Finish(); - return m_container->GetVertices( this ); + return m_container->GetVertices( m_offset ); } void VBO_ITEM::ChangeColor( const COLOR4D& aColor ) { - if( m_isDirty ) - Finish(); - VBO_VERTEX* vertexPtr = GetVertices(); for( unsigned int i = 0; i < m_size; ++i ) diff --git a/include/gal/opengl/vbo_container.h b/include/gal/opengl/vbo_container.h index b32a255b3f..ba8e292310 100644 --- a/include/gal/opengl/vbo_container.h +++ b/include/gal/opengl/vbo_container.h @@ -112,6 +112,16 @@ public: */ VBO_VERTEX* GetVertices( const VBO_ITEM* aVboItem ) const; + /** + * Function GetVertices() + * Returns vertices stored at the specific offset. + * @aOffest is the specific offset. + */ + inline VBO_VERTEX* GetVertices( unsigned int aOffset ) const + { + return &m_vertices[aOffset]; + } + /** * Function GetSize() * Returns amount of vertices currently stored in the container. From 603029b1061b9d1c9c159d7aaa20baf8609525fc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 26 Jun 2013 16:31:52 +0200 Subject: [PATCH 111/415] High contrast mode with showing the selected layer on the top. --- common/gal/cairo/cairo_gal.cpp | 7 ++++ common/gal/opengl/opengl_gal.cpp | 7 ++++ common/gal/opengl/vbo_item.cpp | 14 +++++++ common/view/view.cpp | 49 ++++++++++++++++++++++-- include/gal/cairo/cairo_gal.h | 3 ++ include/gal/graphics_abstraction_layer.h | 8 ++++ include/gal/opengl/opengl_gal.h | 3 ++ include/gal/opengl/vbo_item.h | 7 ++++ include/view/view.h | 15 ++++++-- pcbnew/class_pcb_layer_widget.cpp | 1 + 10 files changed, 107 insertions(+), 7 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 4bc1d59c87..6e30bea899 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -819,6 +819,13 @@ void CAIRO_GAL::ChangeGroupColor( int aGroupNumber, const COLOR4D& aNewColor ) } +void CAIRO_GAL::ChangeGroupDepth( int aGroupNumber, int aDepth ) +{ + // Cairo does not have any possibilities to change the depth coordinate of stored items, + // it depends only on the order of drawing +} + + void CAIRO_GAL::Flush() { storePath(); diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 69944a5daf..951f57e586 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -1635,6 +1635,13 @@ void OPENGL_GAL::ChangeGroupColor( int aGroupNumber, const COLOR4D& aNewColor ) } +void OPENGL_GAL::ChangeGroupDepth( int aGroupNumber, int aDepth ) +{ + vboItems[aGroupNumber]->ChangeDepth( aDepth ); + vboNeedsUpdate = true; +} + + void OPENGL_GAL::computeUnitCircle() { displayListCircle = glGenLists( 1 ); diff --git a/common/gal/opengl/vbo_item.cpp b/common/gal/opengl/vbo_item.cpp index ba68c1abb0..a10a75a675 100644 --- a/common/gal/opengl/vbo_item.cpp +++ b/common/gal/opengl/vbo_item.cpp @@ -94,6 +94,20 @@ void VBO_ITEM::ChangeColor( const COLOR4D& aColor ) } +void VBO_ITEM::ChangeDepth( int aDepth ) +{ + VBO_VERTEX* vertexPtr = GetVertices(); + + for( unsigned int i = 0; i < m_size; ++i ) + { + vertexPtr->z = aDepth; + + // Move on to the next vertex + vertexPtr++; + } +} + + void VBO_ITEM::Finish() { // The unknown-sized item has just ended, so we need to inform the container about it diff --git a/common/view/view.cpp b/common/view/view.cpp index 07114f8eaa..91c216137a 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -40,8 +40,9 @@ using namespace KiGfx; // Static constants -const unsigned int VIEW::VIEW_MAX_LAYERS = 64; -const int VIEW::TOP_LAYER = -1; +const int VIEW::VIEW_MAX_LAYERS = 64; +// Top layer depth +const int VIEW::TOP_LAYER = -1; void VIEW::AddLayer( int aLayer, bool aDisplayOnly ) { @@ -303,6 +304,7 @@ void VIEW::sortLayers() void VIEW::SetLayerOrder( int aLayer, int aRenderingOrder ) { m_layers[aLayer].renderingOrder = aRenderingOrder; + sortLayers(); } @@ -319,6 +321,7 @@ struct VIEW::updateItemsColor // Obtain the color that should be used for coloring the item const COLOR4D color = painter->GetColor( aItem, layer ); int group = aItem->getGroup( layer ); + wxASSERT( group >= 0 ); gal->ChangeGroupColor( group, color ); } @@ -356,11 +359,45 @@ void VIEW::UpdateAllLayersColor() } +struct VIEW::changeItemsDepth +{ + changeItemsDepth( int aLayer, int aDepth, GAL* aGal ) : + layer( aLayer ), depth( aDepth ), gal( aGal ) + { + } + + void operator()( VIEW_ITEM* aItem ) + { + int group = aItem->getGroup( layer ); + + if( group >= 0 ) + gal->ChangeGroupDepth( group, depth ); + } + + int layer, depth; + GAL* gal; +}; + + +void VIEW::ChangeLayerDepth( int aLayer, int aDepth ) +{ + BOX2I r; + + r.SetMaximum(); + + changeItemsDepth visitor( aLayer, aDepth, m_gal ); + m_layers[aLayer].items->Query( r, visitor ); +} + + void VIEW::SetTopLayer( int aLayer ) { // Restore previous order if( m_topLayer.enabled ) + { m_layers[m_topLayer.id].renderingOrder = m_topLayer.renderingOrder; + ChangeLayerDepth( m_topLayer.id, m_topLayer.renderingOrder ); + } if( aLayer >= 0 && aLayer < VIEW_MAX_LAYERS ) { @@ -370,7 +407,10 @@ void VIEW::SetTopLayer( int aLayer ) // Apply new settings only if the option is enabled if( m_enableTopLayer ) + { m_layers[aLayer].renderingOrder = TOP_LAYER; + ChangeLayerDepth( aLayer, TOP_LAYER ); + } // Set the flag saying that settings stored in m_topLayer are valid m_topLayer.enabled = true; @@ -396,12 +436,15 @@ void VIEW::EnableTopLayer( bool aEnable ) if( aEnable ) { m_layers[m_topLayer.id].renderingOrder = TOP_LAYER; + ChangeLayerDepth( m_topLayer.id, TOP_LAYER ); } else { m_layers[m_topLayer.id].renderingOrder = m_topLayer.renderingOrder; + ChangeLayerDepth( m_topLayer.id, m_topLayer.renderingOrder ); } } + sortLayers(); m_enableTopLayer = aEnable; } @@ -416,7 +459,7 @@ struct VIEW::drawItem void operator()( VIEW_ITEM* aItem ) { - GAL* gal = view->GetGAL(); + GAL* gal = view->GetGAL(); if( view->m_useGroups ) { diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 0af3c173fd..cd8cdf5525 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -212,6 +212,9 @@ public: /// @copydoc GAL::ChangeGroupColor() virtual void ChangeGroupColor( int aGroupNumber, const COLOR4D& aNewColor ); + /// @copydoc GAL::ChangeGroupDepth() + virtual void ChangeGroupDepth( int aGroupNumber, int aDepth ); + /// @copydoc GAL::DeleteGroup() virtual void DeleteGroup( int aGroupNumber ); diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 8a8cbb2036..0411c699b8 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -371,6 +371,14 @@ public: */ virtual void ChangeGroupColor( int aGroupNumber, const COLOR4D& aNewColor ) = 0; + /** + * @brief Changes the depth (Z-axis position) of the group. + * + * @param aGroupNumber is the group number. + * @param aDepth is the new depth. + */ + virtual void ChangeGroupDepth( int aGroupNumber, int aDepth ) = 0; + /** * @brief Delete the group from the memory. * diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 9db405d7a5..1dfc6f9cc8 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -237,6 +237,9 @@ public: /// @copydoc GAL::ChangeGroupColor() virtual void ChangeGroupColor( int aGroupNumber, const COLOR4D& aNewColor ); + /// @copydoc GAL::ChangeGroupDepth() + virtual void ChangeGroupDepth( int aGroupNumber, int aDepth ); + /// @copydoc GAL::DeleteGroup() virtual void DeleteGroup( int aGroupNumber ); diff --git a/include/gal/opengl/vbo_item.h b/include/gal/opengl/vbo_item.h index e0e6edc8f1..865eb88466 100644 --- a/include/gal/opengl/vbo_item.h +++ b/include/gal/opengl/vbo_item.h @@ -116,6 +116,13 @@ public: */ void ChangeColor( const COLOR4D& aColor ); + /** + * Function ChangeDepth() + * Moves all vertices to the specified depth. + * @param aDepth is the new depth for vertices. + */ + void ChangeDepth( int aDepth ); + ///< Informs the container that there will be no more vertices for the current VBO_ITEM void Finish(); diff --git a/include/view/view.h b/include/view/view.h index 9577537dda..9ebc3d09c6 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -215,7 +215,6 @@ public: */ double ToScreen( double aCoord, bool aAbsolute = true ) const; - /** * Function GetScreenPixelSize() * Returns the size of the our rendering area, in pixels. @@ -232,7 +231,6 @@ public: */ void AddLayer( int aLayer, bool aDisplayOnly = false ); - /** * Function ClearLayer() * Removes all items from a given layer. @@ -279,6 +277,14 @@ public: */ void UpdateAllLayersColor(); + /** + * Function ChangeLayerDepth() + * Changes the depth of items on the given layer. + * @param aLayer is a number of the layer to be updated. + * @param aDepth is the new depth. + */ + void ChangeLayerDepth( int aLayer, int aDepth ); + /** * Function SetTopLayer() * Sets given layer to be displayed on the top or sets back the default order of layers. @@ -324,8 +330,8 @@ public: */ bool IsDynamic() const { return m_dynamic; } - static const unsigned int VIEW_MAX_LAYERS; ///* maximum number of layers that may be shown - static const int TOP_LAYER; ///* layer number for displaying items on the top + static const int VIEW_MAX_LAYERS; ///* maximum number of layers that may be shown + static const int TOP_LAYER; ///* layer number for displaying items on the top private: struct VIEW_LAYER @@ -353,6 +359,7 @@ private: struct recacheItem; struct drawItem; struct updateItemsColor; + struct changeItemsDepth; ///* Saves current top layer settings in order to restore it when it's not top anymore VIEW_LAYER m_topLayer; diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index 668a7efc34..d928e0ee76 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -361,6 +361,7 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer ) // Set display settings for high contrast mode KiGfx::VIEW* view = myframe->GetGalCanvas()->GetView(); view->GetPainter()->GetSettings()->SetActiveLayer( aLayer ); + view->UpdateAllLayersColor(); view->SetTopLayer( aLayer ); #endif /* KICAD_GAL */ From 1e7df3606a0ff64686a880bbecc821a7c992398f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 27 Jun 2013 11:54:49 +0200 Subject: [PATCH 112/415] Groups are stored in map instead of deque, so it allows easier adding & removing. --- common/gal/cairo/cairo_gal.cpp | 58 ++++++++++++++++++++----------- common/gal/opengl/opengl_gal.cpp | 59 ++++++++++++++++++++------------ include/gal/cairo/cairo_gal.h | 12 +++++-- include/gal/opengl/opengl_gal.h | 15 ++++++-- 4 files changed, 98 insertions(+), 46 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 6e30bea899..18f07f94c6 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -31,6 +31,8 @@ #include #include +#include + using namespace KiGfx; CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, @@ -50,6 +52,7 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, isInitialized = false; isDeleteSavedPixels = false; zoomFactor = 1.0; + groupCounter = 0; SetSize( aParent->GetSize() ); @@ -200,6 +203,20 @@ void CAIRO_GAL::deinitSurface() } +unsigned int CAIRO_GAL::getGroupNumber() +{ + wxASSERT_MSG( groups.size() < std::numeric_limits::max(), + wxT( "There are no free slots to store a group" ) ); + + while( groups.find( groupCounter ) != groups.end() ) + { + groupCounter++; + } + + return groupCounter++; +} + + void CAIRO_GAL::BeginDrawing() throw( int ) { initSurface(); @@ -429,7 +446,7 @@ void CAIRO_GAL::SetIsFill( bool aIsFillEnabled ) GroupElement groupElement; groupElement.command = CMD_SET_FILL; groupElement.boolArgument = aIsFillEnabled; - groups.back().push_back( groupElement ); + currentGroup->push_back( groupElement ); } } @@ -444,7 +461,7 @@ void CAIRO_GAL::SetIsStroke( bool aIsStrokeEnabled ) GroupElement groupElement; groupElement.command = CMD_SET_STROKE; groupElement.boolArgument = aIsStrokeEnabled; - groups.back().push_back( groupElement ); + currentGroup->push_back( groupElement ); } } @@ -463,7 +480,7 @@ void CAIRO_GAL::SetStrokeColor( const COLOR4D& aColor ) groupElement.arguments[1] = strokeColor.g; groupElement.arguments[2] = strokeColor.b; groupElement.arguments[3] = strokeColor.a; - groups.back().push_back( groupElement ); + currentGroup->push_back( groupElement ); } } @@ -481,7 +498,7 @@ void CAIRO_GAL::SetFillColor( const COLOR4D& aColor ) groupElement.arguments[1] = fillColor.g; groupElement.arguments[2] = fillColor.b; groupElement.arguments[3] = fillColor.a; - groups.back().push_back( groupElement ); + currentGroup->push_back( groupElement ); } } @@ -498,7 +515,7 @@ void CAIRO_GAL::SetLineWidth( double aLineWidth ) GroupElement groupElement; groupElement.command = CMD_SET_LINE_WIDTH; groupElement.arguments[0] = aLineWidth; - groups.back().push_back( groupElement ); + currentGroup->push_back( groupElement ); } } @@ -516,7 +533,7 @@ void CAIRO_GAL::SetLineCap( LineCap aLineCap ) GroupElement groupElement; groupElement.command = CMD_SET_LINE_CAP; groupElement.intArgument = (int) aLineCap; - groups.back().push_back( groupElement ); + currentGroup->push_back( groupElement ); } } @@ -534,7 +551,7 @@ void CAIRO_GAL::SetLineJoin( LineJoin aLineJoin ) GroupElement groupElement; groupElement.command = CMD_SET_LINE_JOIN; groupElement.intArgument = (int) aLineJoin; - groups.back().push_back( groupElement ); + currentGroup->push_back( groupElement ); } } @@ -592,7 +609,7 @@ void CAIRO_GAL::Rotate( double aAngle ) GroupElement groupElement; groupElement.command = CMD_ROTATE; groupElement.arguments[0] = aAngle; - groups.back().push_back( groupElement ); + currentGroup->push_back( groupElement ); } } @@ -609,7 +626,7 @@ void CAIRO_GAL::Translate( const VECTOR2D& aTranslation ) groupElement.command = CMD_TRANSLATE; groupElement.arguments[0] = aTranslation.x; groupElement.arguments[1] = aTranslation.y; - groups.back().push_back( groupElement ); + currentGroup->push_back( groupElement ); } } @@ -626,7 +643,7 @@ void CAIRO_GAL::Scale( const VECTOR2D& aScale ) groupElement.command = CMD_SCALE; groupElement.arguments[0] = aScale.x; groupElement.arguments[1] = aScale.y; - groups.back().push_back( groupElement ); + currentGroup->push_back( groupElement ); } } @@ -641,7 +658,7 @@ void CAIRO_GAL::Save() { GroupElement groupElement; groupElement.command = CMD_SAVE; - groups.back().push_back( groupElement ); + currentGroup->push_back( groupElement ); } } @@ -656,7 +673,7 @@ void CAIRO_GAL::Restore() { GroupElement groupElement; groupElement.command = CMD_RESTORE; - groups.back().push_back( groupElement ); + currentGroup->push_back( groupElement ); } } @@ -668,10 +685,14 @@ int CAIRO_GAL::BeginGroup() // If the grouping is started: the actual path is stored in the group, when // a attribute was changed or when grouping stops with the end group method. storePath(); + Group group; - groups.push_back( group ); + int groupNumber = getGroupNumber(); + groups.insert( std::make_pair( groupNumber, group ) ); + currentGroup = &groups[groupNumber]; isGrouping = true; - return groups.size() - 1; + + return groupNumber; } @@ -708,7 +729,7 @@ void CAIRO_GAL::DeleteGroup( int aGroupNumber ) } // Delete the group - groups.erase( groups.begin() + aGroupNumber ); + groups.erase( aGroupNumber ); } @@ -879,15 +900,12 @@ void CAIRO_GAL::storePath() // Copy the actual path, append it to the global path list // then check, if the path needs to be stroked/filled and // add this command to the group list; - - // pathList.push_back( path ); // FIXME: it's not used anywhere else? - if( isStrokeEnabled ) { GroupElement groupElement; groupElement.cairoPath = cairo_copy_path( cairoImage ); groupElement.command = CMD_STROKE_PATH; - groups.back().push_back( groupElement ); + currentGroup->push_back( groupElement ); } if( isFillEnabled ) @@ -895,7 +913,7 @@ void CAIRO_GAL::storePath() GroupElement groupElement; groupElement.cairoPath = cairo_copy_path( cairoImage ); groupElement.command = CMD_FILL_PATH; - groups.back().push_back( groupElement ); + currentGroup->push_back( groupElement ); } } diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 951f57e586..391966cc7d 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -38,6 +38,8 @@ #include #endif /* __WXDEBUG__ */ +#include + #ifndef CALLBACK #define CALLBACK #endif @@ -77,9 +79,11 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, isVboInitialized = false; vboNeedsUpdate = false; - curVboItem = NULL; + currentGroup = NULL; + groupCounter = 0; transform = glm::mat4( 1.0f ); // Identity matrix + SetSize( parentSize ); screenSize.x = parentSize.x; @@ -723,6 +727,20 @@ inline void OPENGL_GAL::drawLineCap( const VECTOR2D& aStartPoint, const VECTOR2D } +unsigned int OPENGL_GAL::getGroupNumber() +{ + wxASSERT_MSG( groups.size() < std::numeric_limits::max(), + wxT( "There are no free slots to store a group" ) ); + + while( groups.find( groupCounter ) != groups.end() ) + { + groupCounter++; + } + + return groupCounter++; +} + + void OPENGL_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { if( isFillEnabled ) @@ -1138,7 +1156,7 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) memcpy( circle, verticesCircle->GetVertices(), VBO_ITEM::VertByteSize * CIRCLE_POINTS * 3 ); - curVboItem->PushVertices( circle, CIRCLE_POINTS * 3 ); + currentGroup->PushVertices( circle, CIRCLE_POINTS * 3 ); delete[] circle; } @@ -1195,7 +1213,7 @@ void OPENGL_GAL::drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, d memcpy( semiCircle, verticesSemiCircle->GetVertices(), VBO_ITEM::VertByteSize * CIRCLE_POINTS / 2 * 3 ); - curVboItem->PushVertices( semiCircle, CIRCLE_POINTS / 2 * 3 ); + currentGroup->PushVertices( semiCircle, CIRCLE_POINTS / 2 * 3 ); delete[] semiCircle; } @@ -1373,7 +1391,7 @@ void OPENGL_GAL::DrawPolygon( const std::deque& aPointList ) glShadeModel( GL_FLAT ); - TessParams params = { curVboItem, tessIntersects }; + TessParams params = { currentGroup, tessIntersects }; gluTessBeginPolygon( tesselator, ¶ms ); gluTessBeginContour( tesselator ); @@ -1578,39 +1596,38 @@ int OPENGL_GAL::BeginGroup() vboNeedsUpdate = true; // Save the pointer for caching the current item - curVboItem = new VBO_ITEM( vboContainer ); - vboItems.push_back( curVboItem ); + currentGroup = new VBO_ITEM( vboContainer ); + int groupNumber = getGroupNumber(); + groups.insert( std::make_pair( groupNumber, currentGroup ) ); - return vboItems.size() - 1; + return groupNumber; } void OPENGL_GAL::EndGroup() { - curVboItem->Finish(); - curVboItem = NULL; + currentGroup->Finish(); + isGrouping = false; } void OPENGL_GAL::ClearCache() { - std::deque::iterator it, end; - for( it = vboItems.begin(), end = vboItems.end(); it != end; it++ ) + std::map::iterator it, end; + for( it = groups.begin(), end = groups.end(); it != end; it++ ) { - delete *it; + delete it->second; } - vboItems.clear(); + groups.clear(); } void OPENGL_GAL::DeleteGroup( int aGroupNumber ) { - VBO_ITEM* item = vboItems[aGroupNumber]; - - vboItems[aGroupNumber] = NULL; - delete item; + delete groups[aGroupNumber]; + groups.erase( aGroupNumber ); vboNeedsUpdate = true; } @@ -1618,8 +1635,8 @@ void OPENGL_GAL::DeleteGroup( int aGroupNumber ) void OPENGL_GAL::DrawGroup( int aGroupNumber ) { - int size = vboItems[aGroupNumber]->GetSize(); - int offset = vboItems[aGroupNumber]->GetOffset(); + int size = groups[aGroupNumber]->GetSize(); + int offset = groups[aGroupNumber]->GetOffset(); // Copy indices of items that should be drawn to GPU memory for( int i = offset; i < offset + size; *indicesPtr++ = i++ ); @@ -1630,14 +1647,14 @@ void OPENGL_GAL::DrawGroup( int aGroupNumber ) void OPENGL_GAL::ChangeGroupColor( int aGroupNumber, const COLOR4D& aNewColor ) { - vboItems[aGroupNumber]->ChangeColor( aNewColor ); + groups[aGroupNumber]->ChangeColor( aNewColor ); vboNeedsUpdate = true; } void OPENGL_GAL::ChangeGroupDepth( int aGroupNumber, int aDepth ) { - vboItems[aGroupNumber]->ChangeDepth( aDepth ); + groups[aGroupNumber]->ChangeDepth( aDepth ); vboNeedsUpdate = true; } diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index cd8cdf5525..610de7fef4 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -322,7 +322,6 @@ private: int actualGroupIndex; ///< The index of the actual group bool isGrouping; ///< Is grouping enabled ? bool isElementAdded; ///< Was an graphic element added ? - std::deque pathList; ///< List of stored paths /// Maximum number of arguments for one command static const int MAX_CAIRO_ARGUMENTS = 6; @@ -359,7 +358,9 @@ private: } GroupElement; typedef std::deque Group; ///< A graphic group type definition - std::deque groups; ///< List of graphic groups + std::map groups; ///< List of graphic groups + unsigned int groupCounter; ///< Counter used for generating keys for groups + Group* currentGroup; ///< Currently used group // Variables related to Cairo <-> wxWidgets cairo_matrix_t cairoWorldScreenMatrix; ///< Cairo world to screen transformation matrix @@ -410,6 +411,13 @@ private: // Destroy Cairo surfaces when are not needed anymore void deinitSurface(); + + /** + * @brief Returns a valid key that can be used as a group number. + * + * @return An unique group number that is not used by any other group. + */ + unsigned int getGroupNumber(); }; } // namespace KiGfx diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 1dfc6f9cc8..b276b88e68 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -361,12 +361,14 @@ private: VBO_ITEM* verticesSemiCircle; // Vertex buffer objects related fields - std::deque vboItems; ///< Stores informations about VBO objects - VBO_ITEM* curVboItem; ///< Currently used VBO_ITEM (for grouping) + std::map groups; ///< Stores informations about VBO objects (groups) + unsigned int groupCounter; ///< Counter used for generating keys for groups + VBO_ITEM* currentGroup; ///< Currently used VBO_ITEM (for grouping) VBO_CONTAINER* vboContainer; ///< Container for storing VBO_ITEMs GLuint vboVertices; ///< Currently used vertices VBO handle GLuint vboIndices; ///< Currently used indices VBO handle bool vboNeedsUpdate; ///< Flag indicating if VBO should be rebuilt + glm::mat4 transform; ///< Current transformation matrix std::stack transformStack; ///< Stack of transformation matrices int indicesSize; ///< Number of indices to be drawn @@ -530,6 +532,13 @@ private: */ inline void drawLineCap( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); + /** + * @brief Returns a valid key that can be used as a group number. + * + * @return An unique group number that is not used by any other group. + */ + unsigned int getGroupNumber(); + ///< OpenGL replacement functions (that are working both in immediate and VBO modes) /** * @brief Starts drawing in immediate mode or does nothing if an item's caching has started. @@ -562,7 +571,7 @@ private: { // New vertex coordinates for VBO VBO_VERTEX vertex = { aX, aY, aZ }; - curVboItem->PushVertex( &vertex ); + currentGroup->PushVertex( &vertex ); } else { From 96116659beda2dd12ee738d452e6cfb2fe95c0d5 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 27 Jun 2013 16:05:15 +0200 Subject: [PATCH 113/415] Faster circles & semicircles drawing for the shaderless OpenGL backend. Removed unnecessary variables and computations. --- common/gal/opengl/opengl_gal.cpp | 103 +++++++++++++------------------ include/gal/opengl/opengl_gal.h | 5 -- 2 files changed, 42 insertions(+), 66 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 391966cc7d..12f83d1dfa 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -118,17 +118,13 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, gluTessProperty( tesselator, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_POSITIVE ); // Buffered semicircle & circle vertices - // (3 vertices per triangle) * (2 items [circle&semicircle]) * (number of points per item) - precomputedContainer = new VBO_CONTAINER( 3 * 2 * CIRCLE_POINTS ); + // (3 vertices per triangle) * (number of points to draw a circle) + precomputedContainer = new VBO_CONTAINER( 3 * CIRCLE_POINTS ); // Compute the unit circles, used for speed up of the circle drawing verticesCircle = new VBO_ITEM( precomputedContainer ); computeUnitCircle(); verticesCircle->Finish(); - - verticesSemiCircle = new VBO_ITEM( precomputedContainer ); - computeUnitSemiCircle(); - verticesSemiCircle->Finish(); } @@ -137,7 +133,6 @@ OPENGL_GAL::~OPENGL_GAL() glFlush(); delete verticesCircle; - delete verticesSemiCircle; delete precomputedContainer; // Delete the buffers @@ -1108,30 +1103,45 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) if( innerScale < outerScale ) { // Draw the outline + VBO_VERTEX* circle = verticesCircle->GetVertices(); + int next; + color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); Save(); - translate3( aCenterPoint.x, aCenterPoint.y, layerDepth ); + translate3( aCenterPoint.x, aCenterPoint.y, 0.0 ); Scale( VECTOR2D( aRadius, aRadius ) ); begin( GL_TRIANGLES ); - for( std::deque::const_iterator it = unitCirclePoints.begin(); - it != unitCirclePoints.end(); it++ ) + for( int i = 0; i < 3 * CIRCLE_POINTS; ++i ) { - double v0[] = { it->x * innerScale, it->y * innerScale }; - double v1[] = { it->x * outerScale, it->y * outerScale }; - double v2[] = { ( it + 1 )->x * innerScale, ( it + 1 )->y * innerScale }; - double v3[] = { ( it + 1 )->x * outerScale, ( it + 1 )->y * outerScale }; + // verticesCircle contains precomputed circle points interleaved with vertex + // (0,0,0), so filled circles can be drawn as consecutive triangles, ie: + // { 0,a,b, 0,c,d, 0,e,f, 0,g,h, ... } + // where letters stand for consecutive circle points and 0 for (0,0,0) vertex. - vertex3( v0[0], v0[1], 0.0 ); - vertex3( v1[0], v1[1], 0.0 ); - vertex3( v2[0], v2[1], 0.0 ); + // We have to skip all (0,0,0) vertices (every third vertex) + if( i % 3 == 0) + { + i++; + // Depending on the vertex, next circle point may be stored in the next vertex.. + next = i + 1; + } + else + { + // ..or 2 vertices away (in case it is preceded by (0,0,0) vertex) + next = i + 2; + } - vertex3( v1[0], v1[1], 0.0 ); - vertex3( v3[0], v3[1], 0.0 ); - vertex3( v2[0], v2[1], 0.0 ); + vertex3( circle[i].x * innerScale, circle[i].y * innerScale, layerDepth ); + vertex3( circle[i].x * outerScale, circle[i].y * outerScale, layerDepth ); + vertex3( circle[next].x * innerScale, circle[next].y * innerScale, layerDepth ); + + vertex3( circle[i].x * outerScale, circle[i].y * outerScale, layerDepth ); + vertex3( circle[next].x * outerScale, circle[next].y * outerScale, layerDepth ); + vertex3( circle[next].x * innerScale, circle[next].y * innerScale, layerDepth ); } end(); @@ -1151,14 +1161,7 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) if( isGrouping ) { - // Multiplied by 3, as this is the number of vertices in a single triangle - VBO_VERTEX* circle = new VBO_VERTEX[CIRCLE_POINTS * 3]; - - memcpy( circle, verticesCircle->GetVertices(), - VBO_ITEM::VertByteSize * CIRCLE_POINTS * 3 ); - currentGroup->PushVertices( circle, CIRCLE_POINTS * 3 ); - - delete[] circle; + currentGroup->PushVertices( verticesCircle->GetVertices(), CIRCLE_POINTS * 3 ); } else { @@ -1208,14 +1211,8 @@ void OPENGL_GAL::drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, d if( isGrouping ) { - // Multiplied by 3, as this is the number of vertices in a single triangle - VBO_VERTEX* semiCircle = new VBO_VERTEX[CIRCLE_POINTS / 2 * 3]; - - memcpy( semiCircle, verticesSemiCircle->GetVertices(), - VBO_ITEM::VertByteSize * CIRCLE_POINTS / 2 * 3 ); - currentGroup->PushVertices( semiCircle, CIRCLE_POINTS / 2 * 3 ); - - delete[] semiCircle; + // It is enough just to push just a half of the circle vertices to make a semicircle + currentGroup->PushVertices( verticesCircle->GetVertices(), CIRCLE_POINTS / 2 * 3 ); } else { @@ -1668,15 +1665,16 @@ void OPENGL_GAL::computeUnitCircle() // Compute the circle points for a given number of segments // Insert in a display list and a vector + const VBO_VERTEX v0 = { 0.0f, 0.0f, 0.0f }; + for( int i = 0; i < CIRCLE_POINTS; i++ ) { - VBO_VERTEX v0 = { 0.0f, 0.0f, 0.0f }; - VBO_VERTEX v1 = { + const VBO_VERTEX v1 = { cos( 2.0 * M_PI / CIRCLE_POINTS * i ), // x sin( 2.0 * M_PI / CIRCLE_POINTS * i ), // y 0.0f // z }; - VBO_VERTEX v2 = { + const VBO_VERTEX v2 = { cos( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), // x sin( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), // y 0.0f // z @@ -1687,11 +1685,9 @@ void OPENGL_GAL::computeUnitCircle() glVertex2d( v1.x, v1.y ); verticesCircle->PushVertex( &v1 ); - unitCirclePoints.push_back( VECTOR2D( v1.x, v1.y ) ); // TODO remove glVertex2d( v2.x, v2.y ); verticesCircle->PushVertex( &v2 ); - unitCirclePoints.push_back( VECTOR2D( v2.x, v2.y ) ); // TODO remove } glEnd(); @@ -1709,26 +1705,11 @@ void OPENGL_GAL::computeUnitSemiCircle() for( int i = 0; i < CIRCLE_POINTS / 2; ++i ) { - VBO_VERTEX v0 = { 0.0f, 0.0f, 0.0f }; - VBO_VERTEX v1 = { - cos( 2.0 * M_PI / CIRCLE_POINTS * i ), // x - sin( 2.0 * M_PI / CIRCLE_POINTS * i ), // y - 0.0f // z - }; - VBO_VERTEX v2 = { - cos( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), // x - sin( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), // y - 0.0f // z - }; - - glVertex2d( 0, 0 ); - verticesSemiCircle->PushVertex( &v0 ); - - glVertex2d( v1.x, v1.y ); - verticesSemiCircle->PushVertex( &v1 ); - - glVertex2d( v2.x, v2.y ); - verticesSemiCircle->PushVertex( &v2 ); + glVertex2d( 0.0, 0.0 ); + glVertex2d( cos( 2.0 * M_PI / CIRCLE_POINTS * i ), + sin( 2.0 * M_PI / CIRCLE_POINTS * i ) ); + glVertex2d( cos( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), + sin( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ) ); } glEnd(); diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index b276b88e68..8b098440cf 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -358,7 +358,6 @@ private: GLuint displayListCircle; ///< Circle display list VBO_ITEM* verticesCircle; GLuint displayListSemiCircle; ///< Semi circle display list - VBO_ITEM* verticesSemiCircle; // Vertex buffer objects related fields std::map groups; ///< Stores informations about VBO objects (groups) @@ -374,10 +373,6 @@ private: int indicesSize; ///< Number of indices to be drawn GLuint* indicesPtr; ///< Pointer to mapped GPU memory - double curvePoints[12]; ///< Coefficients for curves - // FIXME to be removed: - std::deque unitCirclePoints; ///< List of the points on a unit circle - // Polygon tesselation GLUtesselator* tesselator; ///< Pointer to the tesselator std::vector tessIntersects; ///< Storage of intersecting points From 8504f305947a6bbb7596db21014ae61933ebbccd Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 27 Jun 2013 17:23:54 +0200 Subject: [PATCH 114/415] Proper handling of toggling outline display of items. --- pcbnew/basepcbframe.cpp | 1 + pcbnew/dialogs/dialog_general_options.cpp | 22 +++++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 143746afec..28d5a7a35e 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -506,6 +506,7 @@ void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent ) KiGfx::PCB_RENDER_SETTINGS* settings = static_cast ( painter->GetSettings() ); settings->LoadDisplayOptions( DisplayOpt ); + m_galCanvas->GetView()->RecacheAllItems( true ); if( IsGalCanvasActive() ) m_galCanvas->Refresh(); diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index 0303401896..6c46cd1579 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -166,6 +166,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) static_cast ( m_galCanvas->GetView()->GetPainter() ); KiGfx::PCB_RENDER_SETTINGS* settings = static_cast ( painter->GetSettings() ); + bool recache = false; #endif /* KICAD_GAL */ switch( id ) @@ -216,18 +217,26 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) case ID_TB_OPTIONS_SHOW_VIAS_SKETCH: m_DisplayViaFill = DisplayOpt.DisplayViaFill = !state; - m_canvas->Refresh(); +#ifdef KICAD_GAL + recache = true; + if( !IsGalCanvasActive() ) +#endif /* KICAD_GAL */ + m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_TRACKS_SKETCH: m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill = !state; - m_canvas->Refresh(); +#ifdef KICAD_GAL + recache = true; + if( !IsGalCanvasActive() ) +#endif /* KICAD_GAL */ + m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE: DisplayOpt.ContrastModeDisplay = state; #ifdef KICAD_GAL - // Apply new display options to the GAL canvas + // Apply new display options to the GAL canvas (this is faster than recaching) settings->LoadDisplayOptions( DisplayOpt ); m_galCanvas->GetView()->EnableTopLayer( state ); m_galCanvas->GetView()->UpdateAllLayersColor(); @@ -261,6 +270,13 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) } #ifdef KICAD_GAL + if( recache ) + { + // Apply new display options to the GAL canvas + settings->LoadDisplayOptions( DisplayOpt ); + m_galCanvas->GetView()->RecacheAllItems( true ); + } + if( IsGalCanvasActive() ) m_galCanvas->Refresh(); #endif /* KICAD_GAL */ From 009925724ee64f1e5d9c0c2f9a6e2ed3a9934658 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 27 Jun 2013 17:31:10 +0200 Subject: [PATCH 115/415] Minor code cleaning. --- common/gal/opengl/opengl_gal.cpp | 12 ------------ common/painter.cpp | 1 - include/painter.h | 1 - 3 files changed, 14 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 12f83d1dfa..919e1c1282 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -540,14 +540,6 @@ void OPENGL_GAL::EndDrawing() void OPENGL_GAL::rebuildVbo() { - /* FIXME should be done less naively, maybe sth like: - float *ptr = (float*)glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_READ_WRITE_ARB); - if(ptr) - { - updateVertices(....); - glUnmapBufferARB(GL_ARRAY_BUFFER_ARB); // release pointer to mapping buffer - }*/ - #ifdef __WXDEBUG__ prof_counter totalTime; prof_start( &totalTime, false ); @@ -608,10 +600,6 @@ inline void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2 { vector = transform * vector; } - else - { - glm::vec4 vector( perpendicularVector.x, perpendicularVector.y, 0.0, 0.0 ); - } // Line width is maintained by the vertex shader setShader( SHADER_LINE, vector.x, vector.y, lineWidth ); diff --git a/common/painter.cpp b/common/painter.cpp index 0541cb1e0e..dbc53ab965 100644 --- a/common/painter.cpp +++ b/common/painter.cpp @@ -34,7 +34,6 @@ RENDER_SETTINGS::RENDER_SETTINGS() { // Set the default initial values m_selectionBorderColor = COLOR4D( 1.0, 1.0, 1.0, 1.0 ); - m_netLabelColor = COLOR4D( 1.0, 1.0, 1.0, 0.7 ); m_highlightFactor = 0.5; m_selectFactor = 0.5; diff --git a/include/painter.h b/include/painter.h index f4ac232821..184993019f 100644 --- a/include/painter.h +++ b/include/painter.h @@ -128,7 +128,6 @@ protected: float m_highlightFactor; /// Factor used for computing hightlight color COLOR4D m_selectionBorderColor; /// Color of selection box border - COLOR4D m_netLabelColor; /// Color of net labels float m_selectFactor; /// Specifies how color of selected items is changed float m_layerOpacity; /// Determines opacity of all layers, so every can be seen From 95d5ab706abcceb6746384bc7935e6b9401841af Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 28 Jun 2013 10:47:41 +0200 Subject: [PATCH 116/415] VBO_CONTAINER: Changed new[]/delete[] pairs to realloc(), possibly reducing memory fragmentation and the container shrinking time. --- common/gal/opengl/vbo_container.cpp | 19 +++++++++---------- include/gal/opengl/vbo_container.h | 6 +++--- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/common/gal/opengl/vbo_container.cpp b/common/gal/opengl/vbo_container.cpp index 3959e3e749..63f0ca1f80 100644 --- a/common/gal/opengl/vbo_container.cpp +++ b/common/gal/opengl/vbo_container.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #ifdef __WXDEBUG__ #include @@ -42,7 +43,7 @@ VBO_CONTAINER::VBO_CONTAINER( int aSize ) : // By default no shader is used m_shader[0] = 0; - m_vertices = new VBO_VERTEX[aSize]; + m_vertices = static_cast( malloc( aSize * sizeof( VBO_VERTEX ) ) ); // In the beginning there is only free space m_freeChunks.insert( Chunk( aSize, 0 ) ); @@ -51,7 +52,7 @@ VBO_CONTAINER::VBO_CONTAINER( int aSize ) : VBO_CONTAINER::~VBO_CONTAINER() { - delete[] m_vertices; + free( m_vertices ); } @@ -116,7 +117,7 @@ void VBO_CONTAINER::Add( VBO_ITEM* aVboItem, const VBO_VERTEX* aVertex, unsigned itemSize * VBO_ITEM::VertByteSize ); // Return memory used by the previous chunk - free( it ); + freeChunk( it ); itemChunkSize = newSize; } @@ -266,7 +267,7 @@ unsigned int VBO_CONTAINER::allocate( VBO_ITEM* aVboItem, unsigned int aSize ) } -void VBO_CONTAINER::free( const ReservedChunkMap::iterator& aChunk ) +void VBO_CONTAINER::freeChunk( const ReservedChunkMap::iterator& aChunk ) { // Remove the chunk from the reserved chunks map and add to the free chunks map int size = getChunkSize( *aChunk ); @@ -289,7 +290,7 @@ bool VBO_CONTAINER::defragment( VBO_VERTEX* aTarget ) if( aTarget == NULL ) { // No target was specified, so we have to allocate our own space - aTarget = new (std::nothrow) VBO_VERTEX[m_currentSize]; + aTarget = static_cast( malloc( m_currentSize * sizeof( VBO_VERTEX ) ) ); if( aTarget == NULL ) { wxLogError( wxT( "Run out of memory" ) ); @@ -316,7 +317,7 @@ bool VBO_CONTAINER::defragment( VBO_VERTEX* aTarget ) newOffset += itemSize; } - delete[] m_vertices; + free( m_vertices ); m_vertices = aTarget; // Now there is only one big chunk of free memory @@ -363,15 +364,13 @@ bool VBO_CONTAINER::resizeContainer( unsigned int aNewSize ) copySize = m_currentSize; } - VBO_VERTEX* newContainer = new (std::nothrow) VBO_VERTEX[aNewSize]; + VBO_VERTEX* newContainer = static_cast( realloc( m_vertices, aNewSize * sizeof( VBO_VERTEX ) ) ); if( newContainer == NULL ) { wxLogError( wxT( "Run out of memory" ) ); return false; } - memcpy( newContainer, m_vertices, copySize * VBO_ITEM::VertByteSize ); - delete[] m_vertices; m_vertices = newContainer; // Update variables @@ -391,7 +390,7 @@ bool VBO_CONTAINER::resizeContainer( unsigned int aNewSize ) { // We found a chunk at the end of the container m_freeChunks.erase( lastFree.base() ); - // so we can merge it with the new free chunk + // so we can merge it with the new freeChunk chunk m_freeChunks.insert( Chunk( aNewSize - m_currentSize + lastFreeSize, // size m_currentSize - lastFreeSize ) ); // offset } diff --git a/include/gal/opengl/vbo_container.h b/include/gal/opengl/vbo_container.h index ba8e292310..0d6a8df5c2 100644 --- a/include/gal/opengl/vbo_container.h +++ b/include/gal/opengl/vbo_container.h @@ -88,7 +88,7 @@ public: inline void Free( VBO_ITEM* aVboItem ) { ReservedChunkMap::iterator it = m_reservedChunks.find( aVboItem ); - free( it ); + freeChunk( it ); // Dynamic memory freeing, there is no point in holding // a large amount of memory when there is no use for it @@ -294,11 +294,11 @@ private: bool resizeContainer( unsigned int aNewSize ); /** - * Function free() + * Function freeChunk() * Frees the space described in aChunk and returns it to the free space pool. * @param aChunk is a space to be freed. */ - void free( const ReservedChunkMap::iterator& aChunk ); + void freeChunk( const ReservedChunkMap::iterator& aChunk ); ///< How many vertices we can store in the container unsigned int m_freeSpace; From 690e7144c1f00d102a1ea6fb7ed550d52e0c8e98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Sumi=C5=84ski?= Date: Sun, 30 Jun 2013 15:37:35 +0200 Subject: [PATCH 117/415] Made shaders compatible with Intel GPUs. --- common/gal/opengl/shader.frag | 3 +-- common/gal/opengl/shader.vert | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/common/gal/opengl/shader.frag b/common/gal/opengl/shader.frag index 16ceb949ef..8525e3b0b9 100644 --- a/common/gal/opengl/shader.frag +++ b/common/gal/opengl/shader.frag @@ -25,14 +25,13 @@ */ #version 120 -//#pragma debug(on) // Shader types const float SHADER_LINE = 1.0; const float SHADER_FILLED_CIRCLE = 2.0; const float SHADER_STROKED_CIRCLE = 3.0; -varying in vec4 shaderParams; +varying vec4 shaderParams; void filledCircle( vec2 aCoord ) { diff --git a/common/gal/opengl/shader.vert b/common/gal/opengl/shader.vert index a272982119..eee54e0ffa 100644 --- a/common/gal/opengl/shader.vert +++ b/common/gal/opengl/shader.vert @@ -31,8 +31,8 @@ const float SHADER_LINE = 1.0; const float SHADER_FILLED_CIRCLE = 2.0; const float SHADER_STROKED_CIRCLE = 3.0; -attribute vec4 attrShaderParams; -varying out vec4 shaderParams; +attribute vec4 attrShaderParams; +varying vec4 shaderParams; void main() { From e9669c65941594b7e37841a8f9bcc6e2d8e70c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Sumi=C5=84ski?= Date: Sun, 30 Jun 2013 15:37:46 +0200 Subject: [PATCH 118/415] More debug information in case of failure compilation of shaders. --- common/gal/opengl/opengl_gal.cpp | 12 +++++++++-- common/gal/opengl/shader.cpp | 36 +++++++++++++++++++++++++++++++- include/gal/opengl/shader.h | 9 +++++++- 3 files changed, 53 insertions(+), 4 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 919e1c1282..b984655e13 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -359,8 +359,16 @@ void OPENGL_GAL::BeginDrawing() // Compile the shaders if( !isShaderInitialized && isUseShader ) { - shader.AddSource( shaderPath + std::string( "/shader.vert" ), SHADER_TYPE_VERTEX ); - shader.AddSource( shaderPath + std::string( "/shader.frag" ), SHADER_TYPE_FRAGMENT ); + if( !shader.AddSource( shaderPath + std::string( "/shader.vert" ), SHADER_TYPE_VERTEX ) ) + { + wxLogFatalError( wxT( "Cannot compile vertex shader!" ) ); + } + + if( !shader.AddSource( shaderPath + std::string( "/shader.frag" ), SHADER_TYPE_FRAGMENT ) ) + { + wxLogFatalError( wxT( "Cannot compile fragment shader!" ) ); + } + if( !shader.Link() ) { wxLogFatalError( wxT( "Cannot link the shaders!" ) ); diff --git a/common/gal/opengl/shader.cpp b/common/gal/opengl/shader.cpp index 83eab3d2a7..8baf9f68c1 100644 --- a/common/gal/opengl/shader.cpp +++ b/common/gal/opengl/shader.cpp @@ -83,6 +83,27 @@ void SHADER::ProgramInfo( GLuint aProgram ) } +void SHADER::ShaderInfo( GLuint aShader ) +{ + GLint glInfoLogLength = 0; + GLint writtenChars = 0; + + // Get the length of the info string + glGetShaderiv( aShader, GL_INFO_LOG_LENGTH, &glInfoLogLength ); + + // Print the information + if( glInfoLogLength > 2 ) + { + GLchar* glInfoLog = new GLchar[glInfoLogLength]; + glGetShaderInfoLog( aShader, glInfoLogLength, &writtenChars, glInfoLog ); + + wxLogInfo( wxString::FromUTF8( (char*) glInfoLog ) ); + + delete glInfoLog; + } +} + + std::string SHADER::ReadSource( std::string aShaderSourceName ) { // Open the shader source for reading @@ -109,7 +130,7 @@ std::string SHADER::ReadSource( std::string aShaderSourceName ) } -void SHADER::AddSource( const std::string& aShaderSourceName, ShaderType aShaderType ) +bool SHADER::AddSource( const std::string& aShaderSourceName, ShaderType aShaderType ) { if( isShaderLinked ) { @@ -144,6 +165,17 @@ void SHADER::AddSource( const std::string& aShaderSourceName, ShaderType aShader // Compile and attach shader to the program glCompileShader( shaderNumber ); + GLint status; + glGetShaderiv( shaderNumber, GL_COMPILE_STATUS, &status ); + if( status != GL_TRUE ) + { + wxLogError( wxT( "Shader compilation error" ) ); + + ShaderInfo( shaderNumber ); + + return false; + } + glAttachShader( programNumber, shaderNumber ); ProgramInfo( programNumber ); @@ -157,6 +189,8 @@ void SHADER::AddSource( const std::string& aShaderSourceName, ShaderType aShader // Delete the allocated char array delete[] source; + + return true; } diff --git a/include/gal/opengl/shader.h b/include/gal/opengl/shader.h index 115fa02e49..f4804c3b66 100644 --- a/include/gal/opengl/shader.h +++ b/include/gal/opengl/shader.h @@ -76,7 +76,7 @@ public: * @param aShaderSourceName is the shader source file name. * @param aShaderType is the type of the shader. */ - void AddSource( const std::string& aShaderSourceName, ShaderType aShaderType ); + bool AddSource( const std::string& aShaderSourceName, ShaderType aShaderType ); /** * @brief Link the shaders. @@ -159,6 +159,13 @@ private: */ void ProgramInfo( GLuint aProgram ); + /** + * @brief Get the shader information. + * + * @param aShader is the shader number. + */ + void ShaderInfo( GLuint aShader ); + /** * @brief Read the shader source file * From a1f81bbe978b3ebbb21cf1916f6753b9a8f3e465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Sumi=C5=84ski?= Date: Sun, 30 Jun 2013 19:31:16 +0200 Subject: [PATCH 119/415] Shaders are built-in instead of being loaded from external files. --- common/CMakeLists.txt | 15 ++ common/drawpanel_gal.cpp | 7 - common/gal/opengl/make_shader_src_h.sh | 39 ++++ common/gal/opengl/opengl_gal.cpp | 5 +- common/gal/opengl/shader.cpp | 263 +++++++++++++------------ include/class_drawpanel_gal.h | 2 - include/gal/opengl/opengl_gal.h | 6 - include/gal/opengl/shader.h | 29 ++- 8 files changed, 220 insertions(+), 146 deletions(-) create mode 100755 common/gal/opengl/make_shader_src_h.sh diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 4a173cf3fa..67bacb0530 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -12,6 +12,20 @@ include_directories( ) if(KICAD_GAL) +# Generate files containing shader programs +add_custom_command ( + OUTPUT gal/opengl/shader_src.h + DEPENDS gal/opengl/make_shader_src_h.sh + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/common/gal/opengl + COMMAND ${SHELL} + ARGS ${PROJECT_SOURCE_DIR}/common/gal/opengl/make_shader_src_h.sh +) + +add_custom_target ( + ShaderHeader ALL + DEPENDS gal/opengl/shader_src.h +) + set(GAL_SRCS drawpanel_gal.cpp painter.cpp @@ -27,6 +41,7 @@ set(GAL_SRCS ) add_library(gal STATIC ${GAL_SRCS}) +add_dependencies(gal ShaderHeader) if(WIN32) add_definitions(-DGLEW_STATIC) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 2896be651f..77719d093b 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include @@ -56,11 +55,6 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin m_view = NULL; m_painter = NULL; - wxStandardPaths paths; - wxFileName executableFile( paths.GetExecutablePath() ); - m_galShaderPath = std::string( ( executableFile.GetPath() + - wxT( "/../../common/gal/opengl" ) ).mb_str() ); - SwitchBackend( aGalType, true ); SetBackgroundStyle( wxBG_STYLE_CUSTOM ); @@ -170,7 +164,6 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) { case GAL_TYPE_OPENGL: m_gal = new KiGfx::OPENGL_GAL( this, this, this, aUseShaders ); - static_cast (m_gal)->SetShaderPath( m_galShaderPath ); break; case GAL_TYPE_CAIRO: diff --git a/common/gal/opengl/make_shader_src_h.sh b/common/gal/opengl/make_shader_src_h.sh new file mode 100755 index 0000000000..19f6a410f2 --- /dev/null +++ b/common/gal/opengl/make_shader_src_h.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# Make a header file containing GLSL source code +echo "Generating headers containing GLSL source code.." + +# Source files to be included +SHADER_SRC=( "shader.vert" "shader.frag" ) +# Number of shaders +SHADERS_NUMBER=${#SHADER_SRC[@]} +OUTPUT="shader_src.h" + +# Prepare GLSL source to be included in C array +function processSrc { + # 1st part: remove /* */ comments + # 2nd part: remove // comments + # 3rd part: remove blank lines (or containing only whitespaces) + # 4th & 5th part: wrap every line in quotation marks + sed '/\/\*/,/\*\//d; s/[ \t]*\/\/.*$//; /^[ \t]*$/d; s/^[ \t]*/"/; s/[ \t]*$/\\n"/' $1 >> $OUTPUT + echo "," >> $OUTPUT +} + +# Header +echo "#ifndef SHADER_SRC_H +#define SHADER_SRC_H + +const unsigned int shaders_number = $SHADERS_NUMBER; +const char *shaders_src[] = {" > $OUTPUT + +# Main contents +for filename in "${SHADER_SRC[@]}" +do + processSrc $filename +done + +# Footer +echo "}; +#endif /* SHADER_SRC_H */" >> $OUTPUT + +echo "Done." diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index b984655e13..dde0ff9c6d 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -74,7 +74,6 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, isUseShader = isUseShaders; isShaderInitialized = false; isGrouping = false; - shaderPath = "../../common/gal/opengl"; wxSize parentSize = aParent->GetSize(); isVboInitialized = false; @@ -359,12 +358,12 @@ void OPENGL_GAL::BeginDrawing() // Compile the shaders if( !isShaderInitialized && isUseShader ) { - if( !shader.AddSource( shaderPath + std::string( "/shader.vert" ), SHADER_TYPE_VERTEX ) ) + if( !shader.LoadBuiltinShader( 0, SHADER_TYPE_VERTEX ) ) { wxLogFatalError( wxT( "Cannot compile vertex shader!" ) ); } - if( !shader.AddSource( shaderPath + std::string( "/shader.frag" ), SHADER_TYPE_FRAGMENT ) ) + if( !shader.LoadBuiltinShader( 1, SHADER_TYPE_FRAGMENT ) ) { wxLogFatalError( wxT( "Cannot compile fragment shader!" ) ); } diff --git a/common/gal/opengl/shader.cpp b/common/gal/opengl/shader.cpp index 8baf9f68c1..693e0596ac 100644 --- a/common/gal/opengl/shader.cpp +++ b/common/gal/opengl/shader.cpp @@ -32,14 +32,15 @@ #include #include +#include "shader_src.h" using namespace KiGfx; SHADER::SHADER() : isProgramCreated( false ), isShaderLinked( false ), - maximumVertices( 4 ), active( false ), + maximumVertices( 4 ), geomInputType( GL_LINES ), geomOutputType( GL_LINES ) { @@ -62,135 +63,21 @@ SHADER::~SHADER() } -void SHADER::ProgramInfo( GLuint aProgram ) +bool SHADER::LoadBuiltinShader( unsigned int aShaderNumber, ShaderType aShaderType ) { - GLint glInfoLogLength = 0; - GLint writtenChars = 0; + if( aShaderNumber >= shaders_number ) + return false; - // Get the length of the info string - glGetProgramiv( aProgram, GL_INFO_LOG_LENGTH, &glInfoLogLength ); - - // Print the information - if( glInfoLogLength > 2 ) - { - GLchar* glInfoLog = new GLchar[glInfoLogLength]; - glGetProgramInfoLog( aProgram, glInfoLogLength, &writtenChars, glInfoLog ); - - wxLogInfo( wxString::FromUTF8( (char*) glInfoLog ) ); - - delete glInfoLog; - } + return addSource( std::string( shaders_src[aShaderNumber] ), aShaderType ); } -void SHADER::ShaderInfo( GLuint aShader ) +bool SHADER::LoadShaderFromFile( const std::string& aShaderSourceName, ShaderType aShaderType ) { - GLint glInfoLogLength = 0; - GLint writtenChars = 0; - - // Get the length of the info string - glGetShaderiv( aShader, GL_INFO_LOG_LENGTH, &glInfoLogLength ); - - // Print the information - if( glInfoLogLength > 2 ) - { - GLchar* glInfoLog = new GLchar[glInfoLogLength]; - glGetShaderInfoLog( aShader, glInfoLogLength, &writtenChars, glInfoLog ); - - wxLogInfo( wxString::FromUTF8( (char*) glInfoLog ) ); - - delete glInfoLog; - } -} - - -std::string SHADER::ReadSource( std::string aShaderSourceName ) -{ - // Open the shader source for reading - std::ifstream inputFile( aShaderSourceName.c_str(), std::ifstream::in ); - std::string shaderSource; - - if( !inputFile ) - { - wxLogError( wxString::FromUTF8( "Can't read the shader source: " ) + - wxString( aShaderSourceName.c_str(), wxConvUTF8 ) ); - exit( 1 ); - } - - std::string shaderSourceLine; - - // Read all lines from the text file - while( getline( inputFile, shaderSourceLine ) ) - { - shaderSource += shaderSourceLine; - shaderSource += "\n"; - } - - return shaderSource; -} - - -bool SHADER::AddSource( const std::string& aShaderSourceName, ShaderType aShaderType ) -{ - if( isShaderLinked ) - { - wxLogError( wxString::FromUTF8( "Shader is already linked!" ) ); - } - - // Create the program - if( !isProgramCreated ) - { - programNumber = glCreateProgram(); - isProgramCreated = true; - } - // Load shader sources - std::string shaderSource = ReadSource( aShaderSourceName ); + const std::string shaderSource = readSource( aShaderSourceName ); - // Create a shader - GLuint shaderNumber = glCreateShader( aShaderType ); - shaderNumbers.push_back( shaderNumber ); - - // Get the program info - ProgramInfo( programNumber ); - - // Copy to char array - char* source = new char[shaderSource.size() + 1]; - strcpy( source, shaderSource.c_str() ); - const char** source_ = (const char**) ( &source ); - - // Attach the source - glShaderSource( shaderNumber, 1, source_, NULL ); - ProgramInfo( programNumber ); - - // Compile and attach shader to the program - glCompileShader( shaderNumber ); - GLint status; - glGetShaderiv( shaderNumber, GL_COMPILE_STATUS, &status ); - if( status != GL_TRUE ) - { - wxLogError( wxT( "Shader compilation error" ) ); - - ShaderInfo( shaderNumber ); - - return false; - } - - glAttachShader( programNumber, shaderNumber ); - ProgramInfo( programNumber ); - - // Special handling for the geometry shader - if( aShaderType == SHADER_TYPE_GEOMETRY ) - { - glProgramParameteriEXT( programNumber, GL_GEOMETRY_VERTICES_OUT_EXT, maximumVertices ); - glProgramParameteriEXT( programNumber, GL_GEOMETRY_INPUT_TYPE_EXT, geomInputType ); - glProgramParameteriEXT( programNumber, GL_GEOMETRY_OUTPUT_TYPE_EXT, geomOutputType ); - } - - // Delete the allocated char array - delete[] source; - - return true; + return addSource( shaderSource, aShaderType ); } @@ -207,7 +94,7 @@ bool SHADER::Link() { // Shader linking glLinkProgram( programNumber ); - ProgramInfo( programNumber ); + programInfo( programNumber ); // Check the Link state glGetObjectParameterivARB( programNumber, GL_OBJECT_LINK_STATUS_ARB, (GLint*) &isShaderLinked ); @@ -251,3 +138,133 @@ int SHADER::GetAttribute( std::string aAttributeName ) const { return glGetAttribLocation( programNumber, aAttributeName.c_str() ); } + + +void SHADER::programInfo( GLuint aProgram ) +{ + GLint glInfoLogLength = 0; + GLint writtenChars = 0; + + // Get the length of the info string + glGetProgramiv( aProgram, GL_INFO_LOG_LENGTH, &glInfoLogLength ); + + // Print the information + if( glInfoLogLength > 2 ) + { + GLchar* glInfoLog = new GLchar[glInfoLogLength]; + glGetProgramInfoLog( aProgram, glInfoLogLength, &writtenChars, glInfoLog ); + + wxLogInfo( wxString::FromUTF8( (char*) glInfoLog ) ); + + delete glInfoLog; + } +} + + +void SHADER::shaderInfo( GLuint aShader ) +{ + GLint glInfoLogLength = 0; + GLint writtenChars = 0; + + // Get the length of the info string + glGetShaderiv( aShader, GL_INFO_LOG_LENGTH, &glInfoLogLength ); + + // Print the information + if( glInfoLogLength > 2 ) + { + GLchar* glInfoLog = new GLchar[glInfoLogLength]; + glGetShaderInfoLog( aShader, glInfoLogLength, &writtenChars, glInfoLog ); + + wxLogInfo( wxString::FromUTF8( (char*) glInfoLog ) ); + + delete glInfoLog; + } +} + + +std::string SHADER::readSource( std::string aShaderSourceName ) +{ + // Open the shader source for reading + std::ifstream inputFile( aShaderSourceName.c_str(), std::ifstream::in ); + std::string shaderSource; + + if( !inputFile ) + { + wxLogError( wxString::FromUTF8( "Can't read the shader source: " ) + + wxString( aShaderSourceName.c_str(), wxConvUTF8 ) ); + exit( 1 ); + } + + std::string shaderSourceLine; + + // Read all lines from the text file + while( getline( inputFile, shaderSourceLine ) ) + { + shaderSource += shaderSourceLine; + shaderSource += "\n"; + } + + return shaderSource; +} + + +bool SHADER::addSource( const std::string& aShaderSource, ShaderType aShaderType ) +{ + if( isShaderLinked ) + { + wxLogError( wxString::FromUTF8( "Shader is already linked!" ) ); + } + + // Create the program + if( !isProgramCreated ) + { + programNumber = glCreateProgram(); + isProgramCreated = true; + } + + // Create a shader + GLuint shaderNumber = glCreateShader( aShaderType ); + shaderNumbers.push_back( shaderNumber ); + + // Get the program info + programInfo( programNumber ); + + // Copy to char array + char* source = new char[aShaderSource.size() + 1]; + strcpy( source, aShaderSource.c_str() ); + const char** source_ = (const char**) ( &source ); + + // Attach the source + glShaderSource( shaderNumber, 1, source_, NULL ); + programInfo( programNumber ); + + // Compile and attach shader to the program + glCompileShader( shaderNumber ); + GLint status; + glGetShaderiv( shaderNumber, GL_COMPILE_STATUS, &status ); + if( status != GL_TRUE ) + { + wxLogError( wxT( "Shader compilation error" ) ); + + shaderInfo( shaderNumber ); + + return false; + } + + glAttachShader( programNumber, shaderNumber ); + programInfo( programNumber ); + + // Special handling for the geometry shader + if( aShaderType == SHADER_TYPE_GEOMETRY ) + { + glProgramParameteriEXT( programNumber, GL_GEOMETRY_VERTICES_OUT_EXT, maximumVertices ); + glProgramParameteriEXT( programNumber, GL_GEOMETRY_INPUT_TYPE_EXT, geomInputType ); + glProgramParameteriEXT( programNumber, GL_GEOMETRY_OUTPUT_TYPE_EXT, geomOutputType ); + } + + // Delete the allocated char array + delete[] source; + + return true; +} + diff --git a/include/class_drawpanel_gal.h b/include/class_drawpanel_gal.h index 35c7488d52..b6a63306f9 100644 --- a/include/class_drawpanel_gal.h +++ b/include/class_drawpanel_gal.h @@ -91,8 +91,6 @@ protected: GalType m_currentGal; ///< Currently used GAL bool m_useShaders; ///< Are shaders used? (only for OpenGL GAL) wxLongLong m_timeStamp; - - std::string m_galShaderPath; ///< Path to shader files, used in OpenGL mode }; #endif diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 8b098440cf..663bb29d6b 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -320,11 +320,6 @@ public: paintListener = aPaintListener; } - void SetShaderPath( const std::string& aPath ) - { - shaderPath = aPath; - } - ///< Parameters passed to the GLU tesselator typedef struct { @@ -389,7 +384,6 @@ private: SHADER shader; ///< There is only one shader used for different objects int shaderAttrib; ///< Location of shader attributes (for glVertexAttribPointer) - std::string shaderPath; ///< Location of shader files // Cursor int cursorSize; ///< Size of the cursor in pixels diff --git a/include/gal/opengl/shader.h b/include/gal/opengl/shader.h index f4804c3b66..9e94d9b406 100644 --- a/include/gal/opengl/shader.h +++ b/include/gal/opengl/shader.h @@ -71,12 +71,22 @@ public: virtual ~SHADER(); /** - * @brief Add a shader and compile the shader sources. + * @brief Loads one of the built-in shaders and compiles it. + * + * @param aShaderNumber is the shader number (indexing from 0). + * @param aShaderType is the type of the shader. + * @return True in case of success, false otherwise. + */ + bool LoadBuiltinShader( unsigned int aShaderNumber, ShaderType aShaderType ); + + /** + * @brief Loads one of the built-in shaders and compiles it. * * @param aShaderSourceName is the shader source file name. * @param aShaderType is the type of the shader. + * @return True in case of success, false otherwise. */ - bool AddSource( const std::string& aShaderSourceName, ShaderType aShaderType ); + bool LoadShaderFromFile( const std::string& aShaderSourceName, ShaderType aShaderType ); /** * @brief Link the shaders. @@ -157,14 +167,14 @@ private: * * @param aProgram is the program number. */ - void ProgramInfo( GLuint aProgram ); + void programInfo( GLuint aProgram ); /** * @brief Get the shader information. * * @param aShader is the shader number. */ - void ShaderInfo( GLuint aShader ); + void shaderInfo( GLuint aShader ); /** * @brief Read the shader source file @@ -172,7 +182,16 @@ private: * @param aShaderSourceName is the shader source file name. * @return the source as string */ - std::string ReadSource( std::string aShaderSourceName ); + std::string readSource( std::string aShaderSourceName ); + + /** + * @brief Add a shader and compile the shader sources. + * + * @param aShaderSource is the shader source content. + * @param aShaderType is the type of the shader. + * @return True in case of success, false otherwise. + */ + bool addSource( const std::string& aShaderSource, ShaderType aShaderType ); std::deque shaderNumbers; ///< Shader number list GLuint programNumber; ///< Shader program number From fa083142a7e7887982725d2301032bf0f3ce6864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Sumi=C5=84ski?= Date: Sun, 30 Jun 2013 22:45:31 +0200 Subject: [PATCH 120/415] Colors are stored as unsigned bytes instead of floats. --- common/gal/opengl/opengl_gal.cpp | 2 +- common/gal/opengl/vbo_item.cpp | 8 ++++---- include/gal/opengl/vbo_container.h | 20 ++++++++++---------- include/gal/opengl/vbo_item.h | 6 +++--- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index dde0ff9c6d..83a1f8c90e 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -511,7 +511,7 @@ void OPENGL_GAL::EndDrawing() // Bind vertices data buffers glBindBuffer( GL_ARRAY_BUFFER, vboVertices ); glVertexPointer( VBO_ITEM::CoordStride, GL_FLOAT, VBO_ITEM::VertByteSize, 0 ); - glColorPointer( VBO_ITEM::ColorStride, GL_FLOAT, VBO_ITEM::VertByteSize, + glColorPointer( VBO_ITEM::ColorStride, GL_UNSIGNED_BYTE, VBO_ITEM::VertByteSize, (GLvoid*) VBO_ITEM::ColorByteOffset ); // Shader parameters diff --git a/common/gal/opengl/vbo_item.cpp b/common/gal/opengl/vbo_item.cpp index a10a75a675..3f3d21b6b0 100644 --- a/common/gal/opengl/vbo_item.cpp +++ b/common/gal/opengl/vbo_item.cpp @@ -83,10 +83,10 @@ void VBO_ITEM::ChangeColor( const COLOR4D& aColor ) for( unsigned int i = 0; i < m_size; ++i ) { - vertexPtr->r = aColor.r; - vertexPtr->g = aColor.g; - vertexPtr->b = aColor.b; - vertexPtr->a = aColor.a; + vertexPtr->r = aColor.r * 255; + vertexPtr->g = aColor.g * 255; + vertexPtr->b = aColor.b * 255; + vertexPtr->a = aColor.a * 255; // Move on to the next vertex vertexPtr++; diff --git a/include/gal/opengl/vbo_container.h b/include/gal/opengl/vbo_container.h index 0d6a8df5c2..2f1c8a3075 100644 --- a/include/gal/opengl/vbo_container.h +++ b/include/gal/opengl/vbo_container.h @@ -150,10 +150,10 @@ public: */ inline void UseColor( const COLOR4D& aColor ) { - m_color[0] = aColor.r; - m_color[1] = aColor.g; - m_color[2] = aColor.b; - m_color[3] = aColor.a; + m_color[0] = aColor.r * 255; + m_color[1] = aColor.g * 255; + m_color[2] = aColor.b * 255; + m_color[3] = aColor.a * 255; } /** @@ -165,7 +165,7 @@ public: { for( unsigned int i = 0; i < VBO_ITEM::ColorStride; ++i ) { - m_color[i] = aColor[i]; + m_color[i] = aColor[i] * 255; } } @@ -179,10 +179,10 @@ public: */ inline void UseColor( GLfloat aR, GLfloat aG, GLfloat aB, GLfloat aA ) { - m_color[0] = aR; - m_color[1] = aG; - m_color[2] = aB; - m_color[3] = aA; + m_color[0] = aR * 255; + m_color[1] = aG * 255; + m_color[2] = aB * 255; + m_color[3] = aA * 255; } /** @@ -318,7 +318,7 @@ private: VBO_ITEM* item; ///< Color used for new vertices pushed. - GLfloat m_color[VBO_ITEM::ColorStride]; + GLubyte m_color[VBO_ITEM::ColorStride]; ///< Shader and its parameters used for new vertices pushed GLfloat m_shader[VBO_ITEM::ShaderStride]; diff --git a/include/gal/opengl/vbo_item.h b/include/gal/opengl/vbo_item.h index 865eb88466..6fc5c4675d 100644 --- a/include/gal/opengl/vbo_item.h +++ b/include/gal/opengl/vbo_item.h @@ -39,7 +39,7 @@ namespace KiGfx typedef struct VBO_VERTEX { GLfloat x, y, z; // Coordinates - GLfloat r, g, b, a; // Color + GLubyte r, g, b, a; // Color GLfloat shader[4]; // Shader type & params } VBO_VERTEX; @@ -136,10 +136,10 @@ public: // Offset of color data from the beginning of each vertex data static const unsigned int ColorByteOffset = offsetof(VBO_VERTEX, r); - static const unsigned int ColorOffset = ColorByteOffset / sizeof(GLfloat); + static const unsigned int ColorOffset = ColorByteOffset / sizeof(GLubyte); static const unsigned int ColorByteSize = sizeof(VBO_VERTEX().r) + sizeof(VBO_VERTEX().g) + sizeof(VBO_VERTEX().b) + sizeof(VBO_VERTEX().a); - static const unsigned int ColorStride = ColorByteSize / sizeof(GLfloat); + static const unsigned int ColorStride = ColorByteSize / sizeof(GLubyte); // Shader attributes static const unsigned int ShaderByteOffset = offsetof(VBO_VERTEX, shader); From 5476a03799cd54fe236628c81a6c87e04f830999 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 1 Jul 2013 13:20:48 +0200 Subject: [PATCH 121/415] Changed std::map to boost::unordered_map for storing memory chunks and groups information. --- common/gal/opengl/opengl_gal.cpp | 9 ++--- common/gal/opengl/vbo_container.cpp | 58 +++++++++++++++++++---------- include/gal/opengl/opengl_gal.h | 6 ++- include/gal/opengl/vbo_container.h | 10 +++-- 4 files changed, 53 insertions(+), 30 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 83a1f8c90e..bccc05153c 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -26,8 +26,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include - #include #include #include @@ -39,6 +37,7 @@ #endif /* __WXDEBUG__ */ #include +#include #ifndef CALLBACK #define CALLBACK @@ -82,7 +81,6 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, groupCounter = 0; transform = glm::mat4( 1.0f ); // Identity matrix - SetSize( parentSize ); screenSize.x = parentSize.x; @@ -1606,10 +1604,9 @@ void OPENGL_GAL::EndGroup() void OPENGL_GAL::ClearCache() { - std::map::iterator it, end; - for( it = groups.begin(), end = groups.end(); it != end; it++ ) + BOOST_FOREACH( GroupsMap::value_type it, groups ) { - delete it->second; + delete it.second; } groups.clear(); diff --git a/common/gal/opengl/vbo_container.cpp b/common/gal/opengl/vbo_container.cpp index 63f0ca1f80..8e888d8bd5 100644 --- a/common/gal/opengl/vbo_container.cpp +++ b/common/gal/opengl/vbo_container.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #ifdef __WXDEBUG__ #include @@ -38,7 +39,8 @@ using namespace KiGfx; VBO_CONTAINER::VBO_CONTAINER( int aSize ) : - m_freeSpace( aSize ), m_currentSize( aSize ), itemStarted( false ), m_transform( NULL ) + m_freeSpace( aSize ), m_currentSize( aSize ), itemStarted( false ), m_transform( NULL ), + m_failed( false ) { // By default no shader is used m_shader[0] = 0; @@ -82,6 +84,7 @@ void VBO_CONTAINER::EndItem() m_freeSpace += ( itemChunkSize - itemSize ); } + item = NULL; itemStarted = false; } @@ -91,6 +94,9 @@ void VBO_CONTAINER::Add( VBO_ITEM* aVboItem, const VBO_VERTEX* aVertex, unsigned unsigned int offset; VBO_VERTEX* vertexPtr; + if( m_failed ) + return; + if( itemStarted ) // There is an item being created with an unknown size.. { unsigned int itemChunkOffset; @@ -98,27 +104,34 @@ void VBO_CONTAINER::Add( VBO_ITEM* aVboItem, const VBO_VERTEX* aVertex, unsigned // ..and unfortunately does not fit into currently reserved chunk if( itemSize + aSize > itemChunkSize ) { - // Find the previous chunk for the item, save it, so it can be removed later + // Find the previous chunk for the item and change mark it as NULL + // so it will not be removed during a possible defragmentation ReservedChunkMap::iterator it = m_reservedChunks.find( item ); + m_reservedChunks.insert( ReservedChunk( static_cast( NULL ), it->second ) ); + m_reservedChunks.erase( it ); - // Reserve bigger memory for the current item + // Reserve bigger memory fo r the current item int newSize = ( 2 * itemSize ) + aSize; itemChunkOffset = allocate( aVboItem, newSize ); + aVboItem->SetOffset( itemChunkOffset ); // Check if there was no error if( itemChunkOffset > m_currentSize ) + { + m_failed = true; return; + } - // Save previous chunk's offset for copying data + it = m_reservedChunks.find( static_cast( NULL ) ); + // Check if the chunk was not reallocated after defragmentation int oldItemChunkOffset = getChunkOffset( *it ); + // Free the space previously used by the chunk + freeChunk( it ); // Copy all the old data memcpy( &m_vertices[itemChunkOffset], &m_vertices[oldItemChunkOffset], itemSize * VBO_ITEM::VertByteSize ); - // Return memory used by the previous chunk - freeChunk( it ); - itemChunkSize = newSize; } else @@ -310,7 +323,8 @@ bool VBO_CONTAINER::defragment( VBO_VERTEX* aTarget ) memcpy( &aTarget[newOffset], &m_vertices[itemOffset], itemSize * VBO_ITEM::VertByteSize ); // Update new offset - vboItem->SetOffset( newOffset ); + if( vboItem ) + vboItem->SetOffset( newOffset ); setChunkOffset( *it, newOffset ); // Move to the next free space @@ -349,26 +363,32 @@ void VBO_CONTAINER::resizeChunk( VBO_ITEM* aVboItem, int aNewSize ) bool VBO_CONTAINER::resizeContainer( unsigned int aNewSize ) { - unsigned int copySize; + VBO_VERTEX* newContainer; + if( aNewSize < m_currentSize ) { // Sanity check, no shrinking if we cannot fit all the data if( ( m_currentSize - m_freeSpace ) > aNewSize ) return false; - defragment(); - copySize = ( m_currentSize - m_freeSpace ); + newContainer = static_cast( malloc( aNewSize * sizeof( VBO_VERTEX ) ) ); + if( newContainer == NULL ) + { + wxLogError( wxT( "Run out of memory" ) ); + return false; + } + + // Defragment directly to the new, smaller container + defragment( newContainer ); } else { - copySize = m_currentSize; - } - - VBO_VERTEX* newContainer = static_cast( realloc( m_vertices, aNewSize * sizeof( VBO_VERTEX ) ) ); - if( newContainer == NULL ) - { - wxLogError( wxT( "Run out of memory" ) ); - return false; + newContainer = static_cast( realloc( m_vertices, aNewSize * sizeof( VBO_VERTEX ) ) ); + if( newContainer == NULL ) + { + wxLogError( wxT( "Run out of memory" ) ); + return false; + } } m_vertices = newContainer; diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 663bb29d6b..115652c99e 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -49,6 +49,7 @@ #include #include #include +#include #include #include @@ -355,7 +356,8 @@ private: GLuint displayListSemiCircle; ///< Semi circle display list // Vertex buffer objects related fields - std::map groups; ///< Stores informations about VBO objects (groups) + typedef boost::unordered_map GroupsMap; + GroupsMap groups; ///< Stores informations about VBO objects (groups) unsigned int groupCounter; ///< Counter used for generating keys for groups VBO_ITEM* currentGroup; ///< Currently used VBO_ITEM (for grouping) VBO_CONTAINER* vboContainer; ///< Container for storing VBO_ITEMs @@ -559,7 +561,7 @@ private: if( isGrouping ) { // New vertex coordinates for VBO - VBO_VERTEX vertex = { aX, aY, aZ }; + const VBO_VERTEX vertex = { aX, aY, aZ }; currentGroup->PushVertex( &vertex ); } else diff --git a/include/gal/opengl/vbo_container.h b/include/gal/opengl/vbo_container.h index 2f1c8a3075..6ce50193dd 100644 --- a/include/gal/opengl/vbo_container.h +++ b/include/gal/opengl/vbo_container.h @@ -35,6 +35,7 @@ #include #include #include +#include #include namespace KiGfx @@ -52,9 +53,9 @@ public: typedef std::pair Chunk; typedef std::multimap FreeChunkMap; - ///< Maps size of reserved memory chunks to their owners (VBO_ITEMs) + ///< Maps VBO_ITEMs to reserved memory chunks offsets & sizes typedef std::pair ReservedChunk; - typedef std::multimap ReservedChunkMap; + typedef boost::unordered_map ReservedChunkMap; /** * Function StartItem() @@ -115,7 +116,7 @@ public: /** * Function GetVertices() * Returns vertices stored at the specific offset. - * @aOffest is the specific offset. + * @aOffset is the specific offset. */ inline VBO_VERTEX* GetVertices( unsigned int aOffset ) const { @@ -326,6 +327,9 @@ private: ///< Current transform matrix applied for every new vertex pushed. const glm::mat4* m_transform; + ///< Failure flag + bool m_failed; + /** * Function getPowerOf2() * Returns the nearest power of 2, bigger than aNumber. From a46d344db25c8ff49bb48b854277f3d21f8a6fd7 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 1 Jul 2013 14:06:38 +0200 Subject: [PATCH 122/415] Mirrored text display bugfix. --- common/gal/stroke_font.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp index 3f0958284e..778c0a537d 100644 --- a/common/gal/stroke_font.cpp +++ b/common/gal/stroke_font.cpp @@ -183,10 +183,13 @@ void STROKE_FONT::Draw( std::string aText, const VECTOR2D& aPosition, double aRo break; case GR_TEXT_HJUSTIFY_RIGHT: - m_gal->Translate( VECTOR2D( -textsize.x, 0 ) ); + if( !m_mirrored ) + m_gal->Translate( VECTOR2D( -textsize.x, 0 ) ); break; case GR_TEXT_HJUSTIFY_LEFT: + if( m_mirrored ) + m_gal->Translate( VECTOR2D( -textsize.x, 0 ) ); break; default: From f1dbfffd8265aebe450107b9d0447b35ade16699 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 1 Jul 2013 14:39:27 +0200 Subject: [PATCH 123/415] Removed different styles of line caps and line joins, leaving only round caps & joins. Fixed drawing stroked semicircles using OpenGL backend. --- common/gal/cairo/cairo_gal.cpp | 60 +-- common/gal/graphics_abstraction_layer.cpp | 2 - common/gal/opengl/opengl_gal.cpp | 442 +++++++--------------- common/gal/stroke_font.cpp | 2 - include/gal/cairo/cairo_gal.h | 12 - include/gal/graphics_abstraction_layer.h | 43 --- include/gal/opengl/opengl_gal.h | 24 +- pcbnew/pcb_painter.cpp | 11 +- 8 files changed, 152 insertions(+), 444 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 18f07f94c6..148d0fc283 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -72,15 +72,6 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); #endif - // Initialize line attributes map - lineCapMap[LINE_CAP_BUTT] = CAIRO_LINE_CAP_BUTT; - lineCapMap[LINE_CAP_ROUND] = CAIRO_LINE_CAP_ROUND; - lineCapMap[LINE_CAP_SQUARED] = CAIRO_LINE_CAP_SQUARE; - - lineJoinMap[LINE_JOIN_BEVEL] = CAIRO_LINE_JOIN_BEVEL; - lineJoinMap[LINE_JOIN_ROUND] = CAIRO_LINE_JOIN_ROUND; - lineJoinMap[LINE_JOIN_MITER] = CAIRO_LINE_JOIN_MITER; - // Initialize the cursor shape SetCursorColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); initCursor( 21 ); @@ -179,8 +170,8 @@ void CAIRO_GAL::initSurface() cairo_new_path( cairoImage ); isElementAdded = true; - cairo_set_line_join( cairoImage, lineJoinMap[lineJoin] ); - cairo_set_line_cap( cairoImage, lineCapMap[lineCap] ); + cairo_set_line_join( cairoImage, CAIRO_LINE_JOIN_ROUND ); + cairo_set_line_cap( cairoImage, CAIRO_LINE_CAP_ROUND ); lineWidth = 0; @@ -298,9 +289,6 @@ void CAIRO_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint void CAIRO_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aWidth ) { - cairo_set_line_cap( cairoImage, CAIRO_LINE_CAP_ROUND ); - cairo_set_line_join( cairoImage, CAIRO_LINE_JOIN_ROUND ); - if( isFillEnabled ) { SetLineWidth( aWidth ); @@ -520,42 +508,6 @@ void CAIRO_GAL::SetLineWidth( double aLineWidth ) } -void CAIRO_GAL::SetLineCap( LineCap aLineCap ) -{ - storePath(); - - lineCap = aLineCap; - - cairo_set_line_cap( cairoImage, lineCapMap[aLineCap] ); - - if( isGrouping ) - { - GroupElement groupElement; - groupElement.command = CMD_SET_LINE_CAP; - groupElement.intArgument = (int) aLineCap; - currentGroup->push_back( groupElement ); - } -} - - -void CAIRO_GAL::SetLineJoin( LineJoin aLineJoin ) -{ - storePath(); - - lineJoin = aLineJoin; - - cairo_set_line_join( cairoImage, lineJoinMap[aLineJoin] ); - - if( isGrouping ) - { - GroupElement groupElement; - groupElement.command = CMD_SET_LINE_JOIN; - groupElement.intArgument = (int) aLineJoin; - currentGroup->push_back( groupElement ); - } -} - - void CAIRO_GAL::ClearScreen() { // Clear screen @@ -767,14 +719,6 @@ void CAIRO_GAL::DrawGroup( int aGroupNumber ) cairo_set_line_width( cairoImage, it->arguments[0] ); break; - case CMD_SET_LINE_JOIN: - cairo_set_line_join( cairoImage, lineJoinMap[(LineJoin) ( it->intArgument )] ); - break; - - case CMD_SET_LINE_CAP: - cairo_set_line_cap( cairoImage, lineCapMap[(LineCap) ( it->intArgument )] ); - break; - case CMD_STROKE_PATH: cairo_set_source_rgb( cairoImage, strokeColor.r, strokeColor.g, strokeColor.b ); cairo_append_path( cairoImage, it->cairoPath ); diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index f693507735..f5b984e009 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -38,8 +38,6 @@ GAL::GAL() // Set the default values for the internal variables SetIsFill( false ); SetIsStroke( true ); - SetLineJoin( LINE_JOIN_ROUND ); - SetLineCap( LINE_CAP_ROUND ); SetIsCursorEnabled( false ); SetZoomFactor( 1.0 ); SetFillColor( COLOR4D( 0.0, 0.0, 0.0, 0.0 ) ); diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index bccc05153c..a43c0ff7d6 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -658,9 +658,11 @@ void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndP color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); SetLineWidth( aWidth ); - drawSemiCircle( aStartPoint, aWidth / 2, lineAngle + M_PI / 2 ); - drawSemiCircle( aEndPoint, aWidth / 2, lineAngle - M_PI / 2 ); drawLineQuad( aStartPoint, aEndPoint ); + + // Draw line caps + drawFilledSemiCircle( aStartPoint, aWidth / 2, lineAngle + M_PI / 2 ); + drawFilledSemiCircle( aEndPoint, aWidth / 2, lineAngle - M_PI / 2 ); } else { @@ -680,41 +682,15 @@ void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndP drawLineQuad( VECTOR2D( 0.0, -aWidth / 2.0 ), VECTOR2D( lineLength, -aWidth / 2.0 ) ); - drawSemiCircle( VECTOR2D( 0.0, 0.0 ), aWidth / 2, M_PI / 2 ); - drawSemiCircle( VECTOR2D( lineLength, 0.0 ), aWidth / 2, -M_PI / 2 ); + // Draw line caps + drawStrokedSemiCircle( VECTOR2D( 0.0, 0.0 ), ( aWidth + lineWidth ) / 2, M_PI / 2 ); + drawStrokedSemiCircle( VECTOR2D( lineLength, 0.0 ), ( aWidth + lineWidth ) / 2, -M_PI / 2 ); Restore(); } } -inline void OPENGL_GAL::drawLineCap( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) -{ - VECTOR2D startEndVector = aEndPoint - aStartPoint; - // double lineLength = startEndVector.EuclideanNorm(); - double lineAngle = startEndVector.Angle(); - - switch( lineCap ) - { - case LINE_CAP_BUTT: - // TODO - break; - - case LINE_CAP_ROUND: - // Add a semicircle at the line end - drawSemiCircle( aStartPoint, lineWidth / 2, lineAngle + M_PI / 2 ); - break; - - case LINE_CAP_SQUARED: - // FIXME? VECTOR2D offset; - // offset = startEndVector * ( lineWidth / lineLength / 2.0 ); - // aStartPoint = aStartPoint - offset; - // aEndPoint = aEndPoint + offset; - break; - } -} - - unsigned int OPENGL_GAL::getGroupNumber() { wxASSERT_MSG( groups.size() < std::numeric_limits::max(), @@ -731,256 +707,26 @@ unsigned int OPENGL_GAL::getGroupNumber() void OPENGL_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { - if( isFillEnabled ) - { - color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + const VECTOR2D startEndVector = aEndPoint - aStartPoint; + double lineAngle = startEndVector.Angle(); - drawLineCap( aStartPoint, aEndPoint ); - drawLineCap( aEndPoint, aStartPoint ); - drawLineQuad( aStartPoint, aEndPoint ); - } + drawLineQuad( aStartPoint, aEndPoint ); - if( isStrokeEnabled ) - { - // TODO outline mode - color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); - - drawLineCap( aStartPoint, aEndPoint ); - drawLineCap( aEndPoint, aStartPoint ); - drawLineQuad( aStartPoint, aEndPoint ); - } + // Line caps + drawFilledSemiCircle( aStartPoint, lineWidth / 2, lineAngle + M_PI / 2 ); + drawFilledSemiCircle( aEndPoint, lineWidth / 2, lineAngle + M_PI / 2 ); } void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) { - if( isUseShader ) + std::deque::const_iterator it = aPointList.begin(); + + // Start from the second point + for( it++; it != aPointList.end(); it++ ) { - // This method reduces amount of triangles used for drawing - std::deque::const_iterator it = aPointList.begin(); - - // Start from the second point - for( it++; it != aPointList.end(); it++ ) - { - DrawLine( *( it - 1 ), *it ); - } - - return; + DrawLine( *( it - 1 ), *it ); } - - bool isFirstPoint = true; - LineCap savedLineCap = lineCap; - bool isFirstLine = true; - VECTOR2D startEndVector; - VECTOR2D lastStartEndVector; - VECTOR2D lastPoint; - - unsigned int i = 0; - - // Draw for each segment a line - for( std::deque::const_iterator it = aPointList.begin(); - it != aPointList.end(); it++ ) - { - // First point - if( it == aPointList.begin() ) - { - isFirstPoint = false; - lastPoint = *it; - } - else - { - VECTOR2D actualPoint = *it; - startEndVector = actualPoint - lastPoint; - - if( isFirstLine ) - { - drawLineCap( lastPoint, actualPoint ); - isFirstLine = false; - } - else - { - // Compute some variables for the joints - double lineLengthA = lastStartEndVector.EuclideanNorm(); - double scale = 0.5 * lineWidth / lineLengthA; - VECTOR2D perpendicularVector1( -lastStartEndVector.y * scale, - lastStartEndVector.x * scale ); - double lineLengthB = startEndVector.EuclideanNorm(); - scale = 0.5 * lineWidth / lineLengthB; - VECTOR2D perpendicularVector2( -startEndVector.y * scale, - startEndVector.x * scale ); - - switch( lineJoin ) - { - case LINE_JOIN_ROUND: - { - // Insert a triangle fan at the line joint - // Compute the start and end angle for the triangle fan - double angle1 = startEndVector.Angle(); - double angle2 = lastStartEndVector.Angle(); - double angleDiff = angle1 - angle2; - // Determines the side of the triangle fan - double adjust = angleDiff < 0 ? -0.5 * lineWidth : 0.5 * lineWidth; - - // Angle correction for some special cases - if( angleDiff < -M_PI ) - { - if( angle1 < 0 ) - { - angle1 += 2 * M_PI; - } - - if( angle2 < 0 ) - { - angle2 += 2 * M_PI; - } - adjust = -adjust; - } - else if( angleDiff > M_PI ) - { - if( angle1 > 0 ) - { - angle1 -= 2 * M_PI; - } - - if( angle2 > 0 ) - { - angle2 -= 2 * M_PI; - } - adjust = -adjust; - } - - // Now draw the fan - SWAP( angle1, >, angle2 ); - - begin( GL_TRIANGLES ); - - for( double a = angle1; a < angle2; ) - { - // Compute vertices - vertex3( lastPoint.x, lastPoint.y, layerDepth ); - vertex3( lastPoint.x + adjust * sin( a ), - lastPoint.y - adjust * cos( a ), layerDepth ); - - a += M_PI / 32; - if(a > angle2) - a = angle2; - - vertex3( lastPoint.x + adjust * sin( a ), - lastPoint.y - adjust * cos( a ), layerDepth ); - } - - end(); - break; - } - - case LINE_JOIN_BEVEL: - { - // We compute the edge points of the line segments at the joint - VECTOR2D edgePoint1; - VECTOR2D edgePoint2; - // Determine the correct side - if( lastStartEndVector.x * startEndVector.y - - lastStartEndVector.y * startEndVector.x - < 0 ) - { - edgePoint1 = lastPoint + perpendicularVector1; - edgePoint2 = lastPoint + perpendicularVector2; - } - else - { - edgePoint1 = lastPoint - perpendicularVector1; - edgePoint2 = lastPoint - perpendicularVector2; - } - - // Insert a triangle at the joint to close the gap - begin( GL_TRIANGLES ); - vertex3( edgePoint1.x, edgePoint1.y, layerDepth ); - vertex3( edgePoint2.x, edgePoint2.y, layerDepth ); - vertex3( lastPoint.x, lastPoint.y, layerDepth ); - end(); - - break; - } - - case LINE_JOIN_MITER: - { - // Compute points of the outer edges - VECTOR2D point1 = lastPoint - perpendicularVector1; - VECTOR2D point3 = lastPoint - perpendicularVector2; - if( lastStartEndVector.x * startEndVector.y - - lastStartEndVector.y * startEndVector.x < 0 ) - { - point1 = lastPoint + perpendicularVector1; - point3 = lastPoint + perpendicularVector2; - } - - VECTOR2D point2 = point1 - lastStartEndVector; - VECTOR2D point4 = point3 + startEndVector; - - // Now compute the intersection point of the edges - double c1 = point1.Cross( point2 ); - double c2 = point3.Cross( point4 ); - double quot = startEndVector.Cross( lastStartEndVector ); - - VECTOR2D miterPoint( -c1 * startEndVector.x - c2 * lastStartEndVector.x, - -c1 * startEndVector.y - c2 * lastStartEndVector.y ); - - miterPoint = ( 1 / quot ) * miterPoint; - - // Check if the point is outside the limit - if( ( lastPoint - miterPoint ).EuclideanNorm() > 2 * lineWidth ) - { - // if it's outside cut the edge and insert three triangles - double limit = MITER_LIMIT * lineWidth; - VECTOR2D mp1 = point1 + ( limit / lineLengthA ) * lastStartEndVector; - VECTOR2D mp2 = point3 - ( limit / lineLengthB ) * startEndVector; - - begin( GL_TRIANGLES ); - vertex3( lastPoint.x, lastPoint.y, layerDepth ); - vertex3( point1.x, point1.y, layerDepth ); - vertex3( mp1.x, mp1.y, layerDepth ); - - vertex3( lastPoint.x, lastPoint.y, layerDepth ); - vertex3( mp1.x, mp1.y, layerDepth ); - vertex3( mp2.x, mp2.y, layerDepth ); - - vertex3( lastPoint.x, lastPoint.y, layerDepth ); - vertex3( mp2.x, mp2.y, layerDepth ); - vertex3( point3.x, point3.y, layerDepth ); - end(); - } - else - { - // Insert two triangles for the mitered edge - begin( GL_TRIANGLES ); - vertex3( lastPoint.x, lastPoint.y, layerDepth ); - vertex3( point1.x, point1.y, layerDepth ); - vertex3( miterPoint.x, miterPoint.y, layerDepth ); - - vertex3( lastPoint.x, lastPoint.y, layerDepth ); - vertex3( miterPoint.x, miterPoint.y, layerDepth ); - vertex3( point3.x, point3.y, layerDepth ); - end(); - } - break; - } - } - } - - if( it == aPointList.end() - 1 ) - { - drawLineCap( actualPoint, lastPoint ); - } - - drawLineQuad( lastPoint, *it ); - lastPoint = *it; - lastStartEndVector = startEndVector; - } - - i++; - } - - lineCap = savedLineCap; } @@ -1058,7 +804,8 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) /* Draw a triangle that contains the circle, then shade it leaving only the circle. Parameters given to setShader are relative coordinates of the triangle's vertices and the line width. Shader uses this coordinates to determine if fragments are inside - the circle or not. Width parameter has to be passed as a relative value. + the circle or not. Width parameter has to be passed as a ratio of inner radius + to outer radius. v2 /\ //\\ @@ -1084,15 +831,14 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) return; } - // Draw the middle of the circle (not anti-aliased) - // Compute the factors for the unit circle - double outerScale = lineWidth / aRadius / 2; - double innerScale = -outerScale; - outerScale += 1.0; - innerScale += 1.0; - if( isStrokeEnabled ) { + // Compute the factors for the unit circle + double outerScale = lineWidth / aRadius / 2; + double innerScale = -outerScale; + outerScale += 1.0; + innerScale += 1.0; + if( innerScale < outerScale ) { // Draw the outline @@ -1167,6 +913,22 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) void OPENGL_GAL::drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ) +{ + if( isFillEnabled ) + { + color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + drawFilledSemiCircle( aCenterPoint, aRadius, aAngle ); + } + + if( isStrokeEnabled ) + { + color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + drawStrokedSemiCircle( aCenterPoint, aRadius, aAngle ); + } +} + + +void OPENGL_GAL::drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ) { if( isUseShader && isGrouping ) { @@ -1174,23 +936,21 @@ void OPENGL_GAL::drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, d Translate( aCenterPoint ); Rotate( aAngle ); - color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); - /* Draw a triangle that contains the semicircle, then shade it to leave only the semicircle. - Parameters given to setShader are relative coordinates of the triangle's vertices. - Shader uses this coordinates to determine if fragments are inside the semicircle or not. - v2 - /\ - /__\ - v0 //__\\ v1 - */ - setShader( SHADER_FILLED_CIRCLE, -3.0f / sqrt( 3.0f ), 0.0f, lineWidth ); + Parameters given to setShader are relative coordinates of the triangle's vertices. + Shader uses this coordinates to determine if fragments are inside the semicircle or not. + v2 + /\ + /__\ + v0 //__\\ v1 + */ + setShader( SHADER_FILLED_CIRCLE, -3.0f / sqrt( 3.0f ), 0.0f ); vertex3( -aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 - setShader( SHADER_FILLED_CIRCLE, 3.0f / sqrt( 3.0f ), 0.0f, lineWidth ); + setShader( SHADER_FILLED_CIRCLE, 3.0f / sqrt( 3.0f ), 0.0f ); vertex3( aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 - setShader( SHADER_FILLED_CIRCLE, 0.0f, 2.0f, lineWidth ); + setShader( SHADER_FILLED_CIRCLE, 0.0f, 2.0f ); vertex3( 0.0f, aRadius * 2.0f, layerDepth ); // v2 Restore(); @@ -1217,6 +977,96 @@ void OPENGL_GAL::drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, d } +void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ) +{ + if( isUseShader && isGrouping ) + { + Save(); + Translate( aCenterPoint ); + Rotate( aAngle ); + + /* Draw a triangle that contains the semicircle, then shade it to leave only the semicircle. + Parameters given to setShader are relative coordinates of the triangle's vertices + and the line width. Shader uses this coordinates to determine if fragments are inside + the semicircle or not. Width parameter has to be passed as a ratio of inner radius + to outer radius. + v2 + /\ + /__\ + v0 //__\\ v1 + */ + float outerRadius = aRadius; + float innerRadius = aRadius - lineWidth; + float relWidth = innerRadius / outerRadius; + + setShader( SHADER_STROKED_CIRCLE, -3.0f / sqrt( 3.0f ), 0.0f, relWidth ); + vertex3( -aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 + + setShader( SHADER_STROKED_CIRCLE, 3.0f / sqrt( 3.0f ), 0.0f, relWidth ); + vertex3( aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 + + setShader( SHADER_STROKED_CIRCLE, 0.0f, 2.0f, relWidth ); + vertex3( 0.0f, aRadius * 2.0f, layerDepth ); // v2 + + Restore(); + } + else + { + // Compute the factors for the unit circle + double outerScale = lineWidth / aRadius / 2; + double innerScale = -outerScale; + outerScale += 1.0; + innerScale += 1.0; + + if( innerScale < outerScale ) + { + Save(); + Translate( aCenterPoint ); + Rotate( aAngle ); + + // Draw the outline + VBO_VERTEX* circle = verticesCircle->GetVertices(); + int next; + + begin( GL_TRIANGLES ); + + for( int i = 0; i < ( 3 * CIRCLE_POINTS ) / 2; ++i ) + { + // verticesCircle contains precomputed circle points interleaved with vertex + // (0,0,0), so filled circles can be drawn as consecutive triangles, ie: + // { 0,a,b, 0,c,d, 0,e,f, 0,g,h, ... } + // where letters stand for consecutive circle points and 0 for (0,0,0) vertex. + + // We have to skip all (0,0,0) vertices (every third vertex) + if( i % 3 == 0 ) + { + i++; + // Depending on the vertex, next circle point may be stored in the next vertex.. + next = i + 1; + } + else + { + // ..or 2 vertices away (in case it is preceded by (0,0,0) vertex) + next = i + 2; + } + + vertex3( circle[i].x * innerScale, circle[i].y * innerScale, layerDepth ); + vertex3( circle[i].x * outerScale, circle[i].y * outerScale, layerDepth ); + vertex3( circle[next].x * innerScale, circle[next].y * innerScale, layerDepth ); + + vertex3( circle[i].x * outerScale, circle[i].y * outerScale, layerDepth ); + vertex3( circle[next].x * outerScale, circle[next].y * outerScale, layerDepth ); + vertex3( circle[next].x * innerScale, circle[next].y * innerScale, layerDepth ); + } + + end(); + + Restore(); + } + } +} + + // FIXME Optimize void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double aStartAngle, double aEndAngle ) @@ -1300,11 +1150,9 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a end(); - if( lineCap == LINE_CAP_ROUND ) - { - drawSemiCircle( startPoint, lineWidth / aRadius / 2.0, aStartAngle + M_PI ); - drawSemiCircle( endPoint, lineWidth / aRadius / 2.0, aEndAngle ); - } + // Draw line caps + drawFilledSemiCircle( startPoint, lineWidth / aRadius / 2.0, aStartAngle + M_PI ); + drawFilledSemiCircle( endPoint, lineWidth / aRadius / 2.0, aEndAngle ); } } diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp index 778c0a537d..0b74a09e84 100644 --- a/common/gal/stroke_font.cpp +++ b/common/gal/stroke_font.cpp @@ -233,8 +233,6 @@ void STROKE_FONT::Draw( std::string aText, const VECTOR2D& aPosition, double aRo m_gal->SetIsStroke( true ); m_gal->SetIsFill( false ); - m_gal->SetLineCap( LINE_CAP_ROUND ); - m_gal->SetLineJoin( LINE_JOIN_ROUND ); if( m_bold ) { diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 610de7fef4..0ae26b6fd8 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -159,12 +159,6 @@ public: /// @copydoc GAL::SetBackgroundColor() virtual void SetBackgroundColor( const COLOR4D& aColor ); - /// @copydoc GAL::SetLineCap() - virtual void SetLineCap( LineCap aLineCap ); - - /// @copydoc GAL::SetLineJoin() - virtual void SetLineJoin( LineJoin aLineJoin ); - /// @copydoc GAL::SetLineWidth() virtual void SetLineWidth( double aLineWidth ); @@ -334,8 +328,6 @@ private: CMD_SET_FILLCOLOR, ///< Set the fill color CMD_SET_STROKECOLOR, ///< Set the stroke color CMD_SET_LINE_WIDTH, ///< Set the line width - CMD_SET_LINE_CAP, ///< Set the line cap style - CMD_SET_LINE_JOIN, ///< Set the line join style CMD_STROKE_PATH, ///< Set the stroke path CMD_FILL_PATH, ///< Set the fill path CMD_TRANSFORM, ///< Transform the actual context @@ -371,10 +363,6 @@ private: int stride; ///< Stride value for Cairo bool isInitialized; ///< Are Cairo image & surface ready to use - // Mapping between Cairo and GAL line attributes - std::map lineCapMap; ///< Line cap style mapping - std::map lineJoinMap; ///< Line join style mapping - // Methods void storePath(); ///< Store the actual path diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 0411c699b8..1a1e894d25 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -38,27 +38,6 @@ namespace KiGfx { - -/** - * LineCap: Type definition of the line end point style - */ -enum LineCap -{ - LINE_CAP_BUTT, ///< Stop line at the end point - LINE_CAP_ROUND, ///< Draw a circle at the end point - LINE_CAP_SQUARED ///< Draw a square at the end point -}; - -/** - * LineJoin: Type definition of the line joint style - */ -enum LineJoin -{ - LINE_JOIN_MITER, ///< Use sharp corners - LINE_JOIN_ROUND, ///< Insert a circle at the joints - LINE_JOIN_BEVEL ///< Diagonal corner -}; - /** * GridStyle: Type definition of the grid style */ @@ -251,26 +230,6 @@ public: */ virtual void SetBackgroundColor( const COLOR4D& aColor ) = 0; - /** - * @brief Set the style of the line caps. - * - * @param aLineCap is the line cap style. - */ - inline virtual void SetLineCap( LineCap aLineCap ) - { - lineCap = aLineCap; - } - - /** - * @brief Set the line join style. - * - * @param aLineJoin is the line join style. - */ - inline virtual void SetLineJoin( LineJoin aLineJoin ) - { - lineJoin = aLineJoin; - } - /** * @brief Set the line width. * @@ -710,8 +669,6 @@ protected: double worldScale; ///< The scale factor world->screen double lineWidth; ///< The line width - LineCap lineCap; ///< Line end style - LineJoin lineJoin; ///< Style of the line joints bool isFillEnabled; ///< Is filling of graphic objects enabled ? bool isStrokeEnabled; ///< Are the outlines stroked ? diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 115652c99e..5fb345f881 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -176,18 +176,6 @@ public: /// @copydoc GAL::SetBackgroundColor() virtual void SetBackgroundColor( const COLOR4D& aColor ); - /// @copydoc GAL::SetLineCap() - virtual void SetLineCap( LineCap aLineCap ) - { - lineCap = aLineCap; - } - - /// @copydoc GAL::SetLineJoin() - virtual void SetLineJoin( LineJoin aLineJoin ) - { - lineJoin = aLineJoin; - } - /// @copydoc GAL::SetLineWidth() virtual void SetLineWidth( double aLineWidth ); @@ -421,6 +409,9 @@ private: */ void drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ); + void drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ); + void drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ); + /// Compute the points of a unit circle. void computeUnitCircle(); @@ -514,15 +505,6 @@ private: */ inline void drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); - /** - * @brief Draw the line cap - * - * @param aStartPoint is the start point of the line. - * @param aEndPoint is the end point of the line. - * @param aDepthOffset is the relative depth of the line cap. - */ - inline void drawLineCap( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); - /** * @brief Returns a valid key that can be used as a group number. * diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index e0cb774058..3b7598c1af 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -314,8 +314,6 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) // Outline mode m_gal->SetIsFill( false ); m_gal->SetIsStroke( true ); - m_gal->SetLineCap( LINE_CAP_ROUND ); - m_gal->SetLineJoin( LINE_JOIN_MITER ); m_gal->SetLineWidth( m_pcbSettings->m_outlineWidth ); m_gal->SetStrokeColor( color ); } @@ -420,8 +418,6 @@ void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment ) m_gal->SetIsStroke( true ); m_gal->SetStrokeColor( strokeColor ); m_gal->SetLineWidth( aSegment->GetWidth() ); - m_gal->SetLineCap( LINE_CAP_ROUND ); - m_gal->SetLineJoin( LINE_JOIN_ROUND ); switch( aSegment->GetShape() ) { @@ -430,9 +426,8 @@ void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment ) break; case S_RECT: - m_gal->SetLineCap( LINE_CAP_SQUARED ); - m_gal->SetLineJoin( LINE_JOIN_BEVEL ); - m_gal->DrawLine( VECTOR2D( aSegment->GetStart() ), VECTOR2D( aSegment->GetEnd() ) ); + wxASSERT_MSG( false, wxT( "Not tested yet" ) ); + m_gal->DrawRectangle( VECTOR2D( aSegment->GetStart() ), VECTOR2D( aSegment->GetEnd() ) ); break; case S_ARC: @@ -506,8 +501,6 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aContainer ) m_gal->SetIsFill( !fillMode ); m_gal->SetIsStroke( true ); m_gal->SetLineWidth( aContainer->GetThermalReliefCopperBridge() / 2.0 ); - m_gal->SetLineCap( LINE_CAP_ROUND ); - m_gal->SetLineJoin( LINE_JOIN_ROUND ); // FIXME implement hatch mode From a6ce907a4ffbd19c712495effe2780a4ce5ce20d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 1 Jul 2013 15:23:43 +0200 Subject: [PATCH 124/415] Faster polylines drawing using OpenGL backend. Fixed drawing of lines' caps. --- common/gal/opengl/opengl_gal.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index a43c0ff7d6..27d60aa287 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -714,7 +714,7 @@ void OPENGL_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoin // Line caps drawFilledSemiCircle( aStartPoint, lineWidth / 2, lineAngle + M_PI / 2 ); - drawFilledSemiCircle( aEndPoint, lineWidth / 2, lineAngle + M_PI / 2 ); + drawFilledSemiCircle( aEndPoint, lineWidth / 2, lineAngle - M_PI / 2 ); } @@ -725,8 +725,19 @@ void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) // Start from the second point for( it++; it != aPointList.end(); it++ ) { - DrawLine( *( it - 1 ), *it ); + const VECTOR2D startEndVector = ( *it - *( it - 1 ) ); + double lineAngle = startEndVector.Angle(); + + drawLineQuad( *( it - 1 ), *it ); + + // There is no need to draw line caps on both ends of polyline's segments + drawFilledSemiCircle( *( it - 1 ), lineWidth / 2, lineAngle + M_PI / 2 ); } + + // ..and now - draw the ending cap + const VECTOR2D startEndVector = ( *( it - 1 ) - *( it - 2 ) ); + double lineAngle = startEndVector.Angle(); + drawFilledSemiCircle( *( it - 1 ), lineWidth / 2, lineAngle - M_PI / 2 ); } From f38935459bd13f2d01d0575507e8ed20d99cdb97 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 1 Jul 2013 15:47:44 +0200 Subject: [PATCH 125/415] Headers are regenerated only if shaders' source code was modified. --- common/gal/opengl/make_shader_src_h.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/common/gal/opengl/make_shader_src_h.sh b/common/gal/opengl/make_shader_src_h.sh index 19f6a410f2..9bb4ce4de8 100755 --- a/common/gal/opengl/make_shader_src_h.sh +++ b/common/gal/opengl/make_shader_src_h.sh @@ -8,6 +8,20 @@ SHADER_SRC=( "shader.vert" "shader.frag" ) # Number of shaders SHADERS_NUMBER=${#SHADER_SRC[@]} OUTPUT="shader_src.h" +UPDATE=false + +# Check if it is necessary to regenerate headers +for filename in "${SHADER_SRC[@]}" +do + if [[ $filename -nt $OUTPUT ]]; then + UPDATE=true + fi +done + +if [[ $UPDATE == false ]]; then + echo "Headers are up-to-date." + exit +fi # Prepare GLSL source to be included in C array function processSrc { From 2061947138e4bb87095f8431447e93199097af52 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 2 Jul 2013 09:27:12 +0200 Subject: [PATCH 126/415] Fixed stroke semicircles drawing using shaderless OpenGL backend. --- common/gal/opengl/opengl_gal.cpp | 79 +++++++++++++++----------------- 1 file changed, 37 insertions(+), 42 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 27d60aa287..7ab2c5ec8f 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -1024,56 +1024,51 @@ void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRa else { // Compute the factors for the unit circle - double outerScale = lineWidth / aRadius / 2; - double innerScale = -outerScale; - outerScale += 1.0; - innerScale += 1.0; + double innerScale = 1.0 - lineWidth / aRadius; - if( innerScale < outerScale ) + Save(); + Translate( aCenterPoint ); + Scale( VECTOR2D( aRadius, aRadius ) ); + Rotate( aAngle ); + + // Draw the outline + VBO_VERTEX* circle = verticesCircle->GetVertices(); + int next; + + begin( GL_TRIANGLES ); + + for( int i = 0; i < ( 3 * CIRCLE_POINTS ) / 2; ++i ) { - Save(); - Translate( aCenterPoint ); - Rotate( aAngle ); + // verticesCircle contains precomputed circle points interleaved with vertex + // (0,0,0), so filled circles can be drawn as consecutive triangles, ie: + // { 0,a,b, 0,c,d, 0,e,f, 0,g,h, ... } + // where letters stand for consecutive circle points and 0 for (0,0,0) vertex. - // Draw the outline - VBO_VERTEX* circle = verticesCircle->GetVertices(); - int next; - - begin( GL_TRIANGLES ); - - for( int i = 0; i < ( 3 * CIRCLE_POINTS ) / 2; ++i ) + // We have to skip all (0,0,0) vertices (every third vertex) + if( i % 3 == 0 ) { - // verticesCircle contains precomputed circle points interleaved with vertex - // (0,0,0), so filled circles can be drawn as consecutive triangles, ie: - // { 0,a,b, 0,c,d, 0,e,f, 0,g,h, ... } - // where letters stand for consecutive circle points and 0 for (0,0,0) vertex. - - // We have to skip all (0,0,0) vertices (every third vertex) - if( i % 3 == 0 ) - { - i++; - // Depending on the vertex, next circle point may be stored in the next vertex.. - next = i + 1; - } - else - { - // ..or 2 vertices away (in case it is preceded by (0,0,0) vertex) - next = i + 2; - } - - vertex3( circle[i].x * innerScale, circle[i].y * innerScale, layerDepth ); - vertex3( circle[i].x * outerScale, circle[i].y * outerScale, layerDepth ); - vertex3( circle[next].x * innerScale, circle[next].y * innerScale, layerDepth ); - - vertex3( circle[i].x * outerScale, circle[i].y * outerScale, layerDepth ); - vertex3( circle[next].x * outerScale, circle[next].y * outerScale, layerDepth ); - vertex3( circle[next].x * innerScale, circle[next].y * innerScale, layerDepth ); + i++; + // Depending on the vertex, next circle point may be stored in the next vertex.. + next = i + 1; + } + else + { + // ..or 2 vertices away (in case it is preceded by (0,0,0) vertex) + next = i + 2; } - end(); + vertex3( circle[i].x * innerScale, circle[i].y * innerScale, layerDepth ); + vertex3( circle[i].x, circle[i].y, layerDepth ); + vertex3( circle[next].x * innerScale, circle[next].y * innerScale, layerDepth ); - Restore(); + vertex3( circle[i].x, circle[i].y, layerDepth ); + vertex3( circle[next].x, circle[next].y, layerDepth ); + vertex3( circle[next].x * innerScale, circle[next].y * innerScale, layerDepth ); } + + end(); + + Restore(); } } From 187b529dbba9a102c36ad0fe1150e9176af2455f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 2 Jul 2013 14:02:42 +0200 Subject: [PATCH 127/415] Added possibility to change display modes of zones. --- pcbnew/dialogs/dialog_general_options.cpp | 18 ++++- pcbnew/pcb_painter.cpp | 90 +++++++++++++++++++---- pcbnew/pcb_painter.h | 10 ++- 3 files changed, 97 insertions(+), 21 deletions(-) diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index 6c46cd1579..63bb4960df 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -202,17 +202,29 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) case ID_TB_OPTIONS_SHOW_ZONES: DisplayOpt.DisplayZonesMode = 0; - m_canvas->Refresh(); +#ifdef KICAD_GAL + recache = true; + if( !IsGalCanvasActive() ) +#endif /* KICAD_GAL */ + m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_ZONES_DISABLE: DisplayOpt.DisplayZonesMode = 1; - m_canvas->Refresh(); +#ifdef KICAD_GAL + recache = true; + if( !IsGalCanvasActive() ) +#endif /* KICAD_GAL */ + m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY: DisplayOpt.DisplayZonesMode = 2; - m_canvas->Refresh(); +#ifdef KICAD_GAL + recache = true; + if( !IsGalCanvasActive() ) +#endif /* KICAD_GAL */ + m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_VIAS_SKETCH: diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 3b7598c1af..1697d05442 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -84,6 +84,21 @@ void PCB_RENDER_SETTINGS::LoadDisplayOptions( const DISPLAY_OPTIONS& aOptions ) m_sketchModeSelect[PADS_VISIBLE] = !aOptions.DisplayPadFill; m_sketchModeSelect[VIAS_VISIBLE] = !aOptions.DisplayViaFill; m_sketchModeSelect[TRACKS_VISIBLE] = !aOptions.DisplayPcbTrackFill; + + switch( aOptions.DisplayZonesMode ) + { + case 0: + m_displayZoneMode = DZ_SHOW_FILLED; + break; + + case 1: + m_displayZoneMode = DZ_HIDE_FILLED; + break; + + case 2: + m_displayZoneMode = DZ_SHOW_OUTLINED; + break; + } } @@ -487,25 +502,60 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) void PCB_PAINTER::draw( const ZONE_CONTAINER* aContainer ) { - std::vector polyPoints = aContainer->GetFilledPolysList().GetList(); - if( polyPoints.size() == 0 ) // Nothing to draw - return; - - COLOR4D fillColor = getLayerColor( aContainer->GetLayer(), aContainer->GetNet() ); - std::vector::iterator polyIterator; + COLOR4D color = getLayerColor( aContainer->GetLayer(), aContainer->GetNet() ); std::deque corners; - int fillMode = aContainer->GetFillMode(); + PCB_RENDER_SETTINGS::DisplayZonesMode displayMode = m_pcbSettings->m_displayZoneMode; - m_gal->SetFillColor( fillColor ); - m_gal->SetStrokeColor( fillColor ); - m_gal->SetIsFill( !fillMode ); + // Draw the outline + m_gal->SetStrokeColor( color ); + m_gal->SetIsFill( false ); m_gal->SetIsStroke( true ); - m_gal->SetLineWidth( aContainer->GetThermalReliefCopperBridge() / 2.0 ); + m_gal->SetLineWidth( m_pcbSettings->m_outlineWidth ); - // FIXME implement hatch mode - - if( fillMode == 0 ) + const CPolyLine* outline = aContainer->Outline(); + for( int i = 0; i < outline->GetCornersCount(); ++i ) { + corners.push_back( VECTOR2D( outline->GetPos( i ) ) ); + } + // The last point for closing the polyline + corners.push_back( VECTOR2D( outline->GetPos( 0 ) ) ); + m_gal->DrawPolyline( corners ); + corners.clear(); + + // Draw the outline's hatch lines + std::vector::const_iterator hatch, hatch_end; + for( hatch = outline->m_HatchLines.begin(), hatch_end = outline->m_HatchLines.end(); + hatch != hatch_end; ++hatch ) + { + const VECTOR2D start = VECTOR2D( hatch->m_Start ); + const VECTOR2D end = VECTOR2D( hatch->m_End ); + + m_gal->DrawLine( start, end ); + } + + // Draw the filling + if( displayMode != PCB_RENDER_SETTINGS::DZ_HIDE_FILLED ) + { + const std::vector polyPoints = aContainer->GetFilledPolysList().GetList(); + if( polyPoints.size() == 0 ) // Nothing to draw + return; + + // Set up drawing options + m_gal->SetFillColor( color ); + m_gal->SetLineWidth( aContainer->GetThermalReliefCopperBridge() / 2.0 ); + + if( displayMode == PCB_RENDER_SETTINGS::DZ_SHOW_FILLED ) + { + m_gal->SetIsFill( true ); + m_gal->SetIsStroke( true ); + } + else if( displayMode == PCB_RENDER_SETTINGS::DZ_SHOW_OUTLINED ) + { + m_gal->SetIsFill( false ); + m_gal->SetIsStroke( true ); + } + + std::vector::const_iterator polyIterator; for( polyIterator = polyPoints.begin(); polyIterator != polyPoints.end(); polyIterator++ ) { // Find out all of polygons and then draw them @@ -513,8 +563,16 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aContainer ) if( polyIterator->end_contour ) { - m_gal->DrawPolygon( corners ); - m_gal->DrawPolyline( corners ); + if( displayMode == PCB_RENDER_SETTINGS::DZ_SHOW_FILLED ) + { + m_gal->DrawPolygon( corners ); + m_gal->DrawPolyline( corners ); + } + else if( displayMode == PCB_RENDER_SETTINGS::DZ_SHOW_OUTLINED ) + { + m_gal->DrawPolyline( corners ); + } + corners.clear(); } } diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 6d1c630801..20a5d4fe67 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -61,7 +61,6 @@ class STROKE_FONT; class PCB_RENDER_SETTINGS : public RENDER_SETTINGS { public: - friend class PCB_PAINTER; enum ClearanceMode { @@ -70,6 +69,12 @@ public: CL_TRACKS = 0x4 }; + enum DisplayZonesMode { + DZ_HIDE_FILLED = 0, + DZ_SHOW_FILLED, + DZ_SHOW_OUTLINED + }; + PCB_RENDER_SETTINGS(); /// @copydoc RENDER_SETTINGS::Update() @@ -87,7 +92,6 @@ public: void LoadDisplayOptions( const DISPLAY_OPTIONS& aOptions ); protected: - /// Colors for all layers (including special, highlighted & darkened versions) COLOR4D m_layerColors [NB_LAYERS]; COLOR4D m_layerColorsHi [NB_LAYERS]; @@ -101,6 +105,8 @@ protected: bool m_sketchModeSelect[END_PCB_VISIBLE_LIST]; bool m_visibleLayers [NB_LAYERS]; bool m_visibleItems [END_PCB_VISIBLE_LIST]; + + DisplayZonesMode m_displayZoneMode; }; From fc7b9029c949782e72f7d0508e98c72bc528fb39 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 2 Jul 2013 18:11:57 +0200 Subject: [PATCH 128/415] Fixed stroked semicircles Z coordinate in shaderless OpenGL backend. --- common/gal/opengl/opengl_gal.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 7ab2c5ec8f..5687162c7d 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -1027,7 +1027,7 @@ void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRa double innerScale = 1.0 - lineWidth / aRadius; Save(); - Translate( aCenterPoint ); + translate3( aCenterPoint.x, aCenterPoint.y, layerDepth ); Scale( VECTOR2D( aRadius, aRadius ) ); Rotate( aAngle ); @@ -1057,13 +1057,13 @@ void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRa next = i + 2; } - vertex3( circle[i].x * innerScale, circle[i].y * innerScale, layerDepth ); - vertex3( circle[i].x, circle[i].y, layerDepth ); - vertex3( circle[next].x * innerScale, circle[next].y * innerScale, layerDepth ); + vertex3( circle[i].x * innerScale, circle[i].y * innerScale, 0.0 ); + vertex3( circle[i].x, circle[i].y, 0.0 ); + vertex3( circle[next].x * innerScale, circle[next].y * innerScale, 0.0 ); - vertex3( circle[i].x, circle[i].y, layerDepth ); - vertex3( circle[next].x, circle[next].y, layerDepth ); - vertex3( circle[next].x * innerScale, circle[next].y * innerScale, layerDepth ); + vertex3( circle[i].x, circle[i].y, 0.0 ); + vertex3( circle[next].x, circle[next].y, 0.0 ); + vertex3( circle[next].x * innerScale, circle[next].y * innerScale, 0.0 ); } end(); From d0278dad159c6e1a720c4fa467c65a2e911b05e7 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 3 Jul 2013 13:08:43 +0200 Subject: [PATCH 129/415] Shaders can handle integer parameters (uniforms). --- common/gal/opengl/shader.cpp | 12 ++++++++++-- include/gal/opengl/shader.h | 6 ++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/common/gal/opengl/shader.cpp b/common/gal/opengl/shader.cpp index 693e0596ac..27b11b25b7 100644 --- a/common/gal/opengl/shader.cpp +++ b/common/gal/opengl/shader.cpp @@ -117,7 +117,7 @@ bool SHADER::Link() } -void SHADER::AddParameter( const std::string& aParameterName ) +int SHADER::AddParameter( const std::string& aParameterName ) { GLint location = glGetUniformLocation( programNumber, aParameterName.c_str() ); @@ -125,15 +125,23 @@ void SHADER::AddParameter( const std::string& aParameterName ) { parameterLocation.push_back( location ); } + + return location; } -void SHADER::SetParameter( int parameterNumber, float value ) +void SHADER::SetParameter( int parameterNumber, float value ) const { glUniform1f( parameterLocation[parameterNumber], value ); } +void SHADER::SetParameter( int parameterNumber, int value ) const +{ + glUniform1i( parameterLocation[parameterNumber], value ); +} + + int SHADER::GetAttribute( std::string aAttributeName ) const { return glGetAttribLocation( programNumber, aAttributeName.c_str() ); diff --git a/include/gal/opengl/shader.h b/include/gal/opengl/shader.h index 9e94d9b406..b9dcbf88ba 100644 --- a/include/gal/opengl/shader.h +++ b/include/gal/opengl/shader.h @@ -141,8 +141,9 @@ public: * method using the queue position. * * @param aParameterName is the name of the parameter. + * @return the added parameter location. */ - void AddParameter( const std::string& aParameterName ); + int AddParameter( const std::string& aParameterName ); /** * @brief Set a parameter of the shader. @@ -150,7 +151,8 @@ public: * @param aParameterNumber is the number of the parameter. * @param aValue is the value of the parameter. */ - void SetParameter( int aParameterNumber, float aValue ); + void SetParameter( int aParameterNumber, float aValue ) const; + void SetParameter( int aParameterNumber, int aValue ) const; /** * @brief Gets an attribute location. From be415dab1db5fe0621bbd930c2a7d7bdaa379c20 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 4 Jul 2013 11:37:43 +0200 Subject: [PATCH 130/415] Moved STROKE_FONT from PAINTER to GAL. --- common/gal/graphics_abstraction_layer.cpp | 16 ++++++++++-- common/gal/stroke_font.cpp | 11 --------- common/painter.cpp | 6 ----- include/gal/graphics_abstraction_layer.h | 30 ++++++++++++++++++++++- include/gal/stroke_font.h | 7 ------ include/painter.h | 5 ---- pcbnew/pcb_painter.cpp | 10 +++----- pcbnew/pcb_painter.h | 1 - 8 files changed, 47 insertions(+), 39 deletions(-) diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index f5b984e009..93ce880bf7 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -28,12 +28,12 @@ #include #include -#include using namespace KiGfx; -GAL::GAL() +GAL::GAL() : + strokeFont( this ) { // Set the default values for the internal variables SetIsFill( false ); @@ -47,6 +47,8 @@ GAL::GAL() SetCoarseGrid( 5 ); SetLineWidth( 1.0 ); SetDepthRange( VECTOR2D( -2048, 2047 ) ); + + strokeFont.LoadNewStrokeFont( newstroke_font, newstroke_font_bufsize ); } @@ -156,3 +158,13 @@ void GAL::DrawGrid() SetStrokeColor( savedColor ); } + +void GAL::SetTextAttributes( const EDA_TEXT* aText ) +{ + strokeFont.SetGlyphSize( VECTOR2D( aText->GetSize() ) ); + strokeFont.SetHorizontalJustify( aText->GetHorizJustify() ); + strokeFont.SetVerticalJustify( aText->GetVertJustify() ); + strokeFont.SetBold( aText->IsBold() ); + strokeFont.SetItalic( aText->IsItalic() ); + strokeFont.SetMirrored( aText->IsMirrored() ); +} diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp index 0b74a09e84..bfae39c38a 100644 --- a/common/gal/stroke_font.cpp +++ b/common/gal/stroke_font.cpp @@ -114,17 +114,6 @@ bool STROKE_FONT::LoadNewStrokeFont( const char* const aNewStrokeFont[], int aNe } -void STROKE_FONT::LoadAttributes( const EDA_TEXT* aText ) -{ - SetGlyphSize( VECTOR2D( aText->GetSize() ) ); - SetHorizontalJustify( aText->GetHorizJustify() ); - SetVerticalJustify( aText->GetVertJustify() ); - SetBold( aText->IsBold() ); - SetItalic( aText->IsItalic() ); - SetMirrored( aText->IsMirrored() ); -} - - BOX2D STROKE_FONT::computeBoundingBox( const Glyph& aGlyph, const VECTOR2D& aGlyphBoundingX ) const { BOX2D boundingBox; diff --git a/common/painter.cpp b/common/painter.cpp index dbc53ab965..49c39e24a3 100644 --- a/common/painter.cpp +++ b/common/painter.cpp @@ -25,8 +25,6 @@ */ #include -#include -#include using namespace KiGfx; @@ -70,14 +68,11 @@ void RENDER_SETTINGS::Update() PAINTER::PAINTER( GAL* aGal ) : m_gal( aGal ), m_settings( NULL ) { - m_stroke_font = new STROKE_FONT( aGal ); - m_stroke_font->LoadNewStrokeFont( newstroke_font, newstroke_font_bufsize ); } PAINTER::~PAINTER() { - delete m_stroke_font; delete m_settings; } @@ -85,5 +80,4 @@ PAINTER::~PAINTER() void PAINTER::SetGAL( GAL* aGal ) { m_gal = aGal; - m_stroke_font->SetGAL( aGal ); } diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 1a1e894d25..b87c7de3e1 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -33,8 +33,10 @@ #include #include -#include +#include +#include +#include namespace KiGfx { @@ -260,6 +262,29 @@ public: layerDepth = aLayerDepth; } + // ---- + // Text + // ---- + /** + * @brief Draws a vector type text using preloaded Newstroke font. + * + * @param aText is the text to be drawn. + * @param aPosition is the text position in world coordinates. + * @param aRotationAngle is the text rotation angle. + */ + inline virtual void StrokeText( const std::string& aText, const VECTOR2D& aPosition, + double aRotationAngle ) + { + strokeFont.Draw( aText, aPosition, aRotationAngle ); + } + + /** + * @brief Loads attributes of the given text (bold/italic/underline/mirrored and so on). + * + * @param aText is the text item. + */ + virtual void SetTextAttributes( const EDA_TEXT* aText ); + // -------------- // Transformation // -------------- @@ -696,6 +721,9 @@ protected: VECTOR2D cursorPosition; ///< The cursor position COLOR4D cursorColor; ///< Cursor color + /// Instance of object that stores information about how to draw texts + STROKE_FONT strokeFont; + /// Compute the scaling factor for the world->screen matrix inline void ComputeWorldScale() { diff --git a/include/gal/stroke_font.h b/include/gal/stroke_font.h index 0d394ba613..5b35730d7a 100644 --- a/include/gal/stroke_font.h +++ b/include/gal/stroke_font.h @@ -66,13 +66,6 @@ public: */ bool LoadNewStrokeFont( const char* const aNewStrokeFont[], int aNewStrokeFontSize ); - /** - * @brief Load attributes of a given text, in order to be used during drawing. - * - * @param aText is the text string. - */ - void LoadAttributes( const EDA_TEXT* aText ); - /** * @brief Draw a string. * diff --git a/include/painter.h b/include/painter.h index 184993019f..775137dcbf 100644 --- a/include/painter.h +++ b/include/painter.h @@ -40,7 +40,6 @@ class COLORS_DESIGN_SETTINGS; namespace KiGfx { class GAL; -class STROKE_FONT; class VIEW_ITEM; /** @@ -231,10 +230,6 @@ protected: /// commands used to draw (eg. DrawLine, DrawCircle, etc.) GAL* m_gal; - /// Instance of object that stores information about how to draw texts (including different - /// font display modes [bold/italic/mirror]). - STROKE_FONT* m_stroke_font; - /// Colors and display modes settings that are going to be used when drawing items. RENDER_SETTINGS* m_settings; }; diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 1697d05442..22293d1ad9 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -38,8 +38,6 @@ #include #include #include -#include -#include using namespace KiGfx; @@ -482,8 +480,8 @@ void PCB_PAINTER::draw( const TEXTE_PCB* aText ) m_gal->SetStrokeColor( strokeColor ); m_gal->SetLineWidth( aText->GetThickness() ); - m_stroke_font->LoadAttributes( aText ); - m_stroke_font->Draw( std::string( aText->GetText().mb_str() ), position, orientation ); + m_gal->SetTextAttributes( aText ); + m_gal->StrokeText( std::string( aText->GetText().mb_str() ), position, orientation ); } @@ -495,8 +493,8 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) m_gal->SetStrokeColor( strokeColor ); m_gal->SetLineWidth( aText->GetThickness() ); - m_stroke_font->LoadAttributes( aText ); - m_stroke_font->Draw( std::string( aText->GetText().mb_str() ), position, orientation ); + m_gal->SetTextAttributes( aText ); + m_gal->StrokeText( std::string( aText->GetText().mb_str() ), position, orientation ); } diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 20a5d4fe67..3e92143ba0 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -52,7 +52,6 @@ class PCB_TARGET; namespace KiGfx { class GAL; -class STROKE_FONT; /** * Class PCB_RENDER_SETTINGS From b79c17b43c8aa2555a358da602d8a9b944719209 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 4 Jul 2013 14:21:40 +0200 Subject: [PATCH 131/415] Reduced frame limit. --- common/drawpanel_gal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 77719d093b..2ec46a048f 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -117,7 +117,7 @@ void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent ) void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) { - const unsigned int FPS_LIMIT = 50; + const unsigned int FPS_LIMIT = 40; // Framerate limiter wxLongLong currentTimeStamp = wxGetLocalTimeMillis(); From ffc24ad5185e69419eb9d761c88055b16bfedd02 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 4 Jul 2013 14:24:41 +0200 Subject: [PATCH 132/415] Added functions for changing settings of used font in GAL. --- include/gal/graphics_abstraction_layer.h | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index b87c7de3e1..d4142c3237 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -285,6 +285,42 @@ public: */ virtual void SetTextAttributes( const EDA_TEXT* aText ); + /// @copydoc STROKE_FONT::SetGlyphSize() + inline void SetGlyphSize( const VECTOR2D aGlyphSize ) + { + strokeFont.SetGlyphSize( aGlyphSize ); + } + + /// @copydoc STROKE_FONT::SetBold() + inline void SetBold( const bool aBold ) + { + strokeFont.SetBold( aBold ); + } + + /// @copydoc STROKE_FONT::SetItalic() + inline void SetItalic( const bool aItalic ) + { + strokeFont.SetItalic( aItalic ); + } + + /// @copydoc STROKE_FONT::SetMirrored() + inline void SetMirrored( const bool aMirrored ) + { + strokeFont.SetMirrored( aMirrored ); + } + + /// @copydoc STROKE_FONT::SetHorizontalJustify() + inline void SetHorizontalJustify( const EDA_TEXT_HJUSTIFY_T aHorizontalJustify ) + { + strokeFont.SetHorizontalJustify( aHorizontalJustify ); + } + + /// @copydoc STROKE_FONT::SetVerticalJustify() + inline void SetVerticalJustify( const EDA_TEXT_VJUSTIFY_T aVerticalJustify ) + { + strokeFont.SetVerticalJustify( aVerticalJustify ); + } + // -------------- // Transformation // -------------- From d8e45ef8663a7711d3fc5ae50d5abf5fa81cf042 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 4 Jul 2013 16:27:27 +0200 Subject: [PATCH 133/415] Fixed drawing circles and semicircles using display lists. --- common/gal/opengl/opengl_gal.cpp | 57 +++++++++++++++++--------------- include/gal/opengl/opengl_gal.h | 21 +++++------- 2 files changed, 40 insertions(+), 38 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 5687162c7d..162a2c85e8 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -66,7 +66,6 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, SetCursorColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); // Initialize the flags - isCreated = false; isDeleteSavedPixels = true; isGlewInitialized = false; isFrameBufferInitialized = false; @@ -114,14 +113,8 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, InitTesselatorCallbacks( tesselator ); gluTessProperty( tesselator, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_POSITIVE ); - // Buffered semicircle & circle vertices - // (3 vertices per triangle) * (number of points to draw a circle) - precomputedContainer = new VBO_CONTAINER( 3 * CIRCLE_POINTS ); - - // Compute the unit circles, used for speed up of the circle drawing - verticesCircle = new VBO_ITEM( precomputedContainer ); - computeUnitCircle(); - verticesCircle->Finish(); + // Compute unit semicircle & circle vertices and store them in a buffer for faster drawing + computeCircleVbo(); } @@ -129,6 +122,11 @@ OPENGL_GAL::~OPENGL_GAL() { glFlush(); + if( glIsList( displayListSemiCircle ) ) + glDeleteLists( displayListSemiCircle, 1 ); + if( glIsList( displayListCircle ) ) + glDeleteLists( displayListCircle, 1 ); + delete verticesCircle; delete precomputedContainer; @@ -331,6 +329,7 @@ void OPENGL_GAL::initGlew() } initVertexBufferObjects(); + computeCircleDisplayLists(); isGlewInitialized = true; } @@ -1502,12 +1501,11 @@ void OPENGL_GAL::ChangeGroupDepth( int aGroupNumber, int aDepth ) } -void OPENGL_GAL::computeUnitCircle() +void OPENGL_GAL::computeCircleVbo() { - displayListCircle = glGenLists( 1 ); - glNewList( displayListCircle, GL_COMPILE ); - - glBegin( GL_TRIANGLES ); + // (3 vertices per triangle) * (number of points to draw a circle) + precomputedContainer = new VBO_CONTAINER( 3 * CIRCLE_POINTS ); + verticesCircle = new VBO_ITEM( precomputedContainer ); // Compute the circle points for a given number of segments // Insert in a display list and a vector @@ -1526,29 +1524,38 @@ void OPENGL_GAL::computeUnitCircle() 0.0f // z }; - glVertex2d( 0, 0 ); verticesCircle->PushVertex( &v0 ); - - glVertex2d( v1.x, v1.y ); verticesCircle->PushVertex( &v1 ); - - glVertex2d( v2.x, v2.y ); verticesCircle->PushVertex( &v2 ); } - glEnd(); - - glEndList(); + verticesCircle->Finish(); } -void OPENGL_GAL::computeUnitSemiCircle() +void OPENGL_GAL::computeCircleDisplayLists() { + // Circle display list + displayListCircle = glGenLists( 1 ); + glNewList( displayListCircle, GL_COMPILE ); + + glBegin( GL_TRIANGLES ); + for( int i = 0; i < CIRCLE_POINTS; ++i ) + { + glVertex2d( 0.0, 0.0 ); + glVertex2d( cos( 2.0 * M_PI / CIRCLE_POINTS * i ), + sin( 2.0 * M_PI / CIRCLE_POINTS * i ) ); + glVertex2d( cos( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), + sin( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ) ); + } + glEnd(); + glEndList(); + + // Semicircle display list displayListSemiCircle = glGenLists( 1 ); glNewList( displayListSemiCircle, GL_COMPILE ); glBegin( GL_TRIANGLES ); - for( int i = 0; i < CIRCLE_POINTS / 2; ++i ) { glVertex2d( 0.0, 0.0 ); @@ -1557,9 +1564,7 @@ void OPENGL_GAL::computeUnitSemiCircle() glVertex2d( cos( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), sin( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ) ); } - glEnd(); - glEndList(); } diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 5fb345f881..0304ead7e1 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -337,10 +337,10 @@ private: wxEvtHandler* mouseListener; wxEvtHandler* paintListener; - // Display lists (used in shaderless mode) + // VBO buffers & display lists (used in immediate mode) VBO_CONTAINER* precomputedContainer; ///< Container for storing display lists + VBO_ITEM* verticesCircle; ///< Buffer for circle & semicircle vertices GLuint displayListCircle; ///< Circle display list - VBO_ITEM* verticesCircle; GLuint displayListSemiCircle; ///< Semi circle display list // Vertex buffer objects related fields @@ -372,8 +372,8 @@ private: SHADER_STROKED_CIRCLE, } SHADER_TYPE; - SHADER shader; ///< There is only one shader used for different objects - int shaderAttrib; ///< Location of shader attributes (for glVertexAttribPointer) + SHADER shader; ///< There is only one shader used for different objects + int shaderAttrib; ///< Location of shader attributes (for glVertexAttribPointer) // Cursor int cursorSize; ///< Size of the cursor in pixels @@ -391,7 +391,6 @@ private: GLuint textureBackup; ///< Backup texture handle // Internal flags - bool isCreated; bool isGlewInitialized; ///< Is GLEW initialized? bool isFrameBufferInitialized; ///< Are the frame buffers initialized? bool isVboInitialized; @@ -412,14 +411,12 @@ private: void drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ); void drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ); - /// Compute the points of a unit circle. - void computeUnitCircle(); + /// Compute the points of an unit circle & semicircle and store them in VBO. + void computeCircleVbo(); - /// Compute the points of a unit semi circle. - void computeUnitSemiCircle(); - - /// Compute the points of a unit arc. - // void computeUnitArcs(); // TODO not used + /// Compute the points of an unit circle & semicircle and store them in display lists + /// for drawing in immediate mode. + void computeCircleDisplayLists(); // Event handling /** From e77690c26802aedd41c077595b763be9500500b5 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 4 Jul 2013 17:02:20 +0200 Subject: [PATCH 134/415] Added the 'cached' parameter for VIEW_LAYER. The parameter decides if items drawn on the layer should be cached or drawn in immediate mode. Removed m_useGroups from VIEW, as now groups are enabled per layer. --- common/drawpanel_gal.cpp | 2 +- common/view/view.cpp | 74 +++++++++++++++++----------------------- include/view/view.h | 29 +++++++++++----- include/view/view_item.h | 2 -- 4 files changed, 53 insertions(+), 54 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 2ec46a048f..7837cf8d04 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -65,7 +65,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin m_painter = new KiGfx::PCB_PAINTER( m_gal ); - m_view = new KiGfx::VIEW( true, true ); + m_view = new KiGfx::VIEW( true ); m_view->SetPainter( m_painter ); m_view->SetGAL( m_gal ); diff --git a/common/view/view.cpp b/common/view/view.cpp index 91c216137a..9300869f8b 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -53,6 +53,7 @@ void VIEW::AddLayer( int aLayer, bool aDisplayOnly ) m_layers[aLayer].items = new VIEW_RTREE(); m_layers[aLayer].renderingOrder = aLayer; m_layers[aLayer].enabled = true; + m_layers[aLayer].cached = true; m_layers[aLayer].isDirty = false; m_layers[aLayer].displayOnly = aDisplayOnly; } @@ -138,13 +139,12 @@ int VIEW::Query( const BOX2I& aRect, std::vector& aResult ) } -VIEW::VIEW( bool aIsDynamic, bool aUseGroups ) : +VIEW::VIEW( bool aIsDynamic ) : m_enableTopLayer( false ), m_scale ( 1.0 ), m_painter( NULL ), m_gal( NULL ), - m_dynamic( aIsDynamic ), - m_useGroups( aUseGroups ) + m_dynamic( aIsDynamic ) { // By default there is no layer on the top m_topLayer.enabled = false; @@ -209,8 +209,7 @@ void VIEW::SetGAL( GAL* aGal ) m_gal = aGal; // clear group numbers, so everything is going to be recached - if( m_useGroups ) - clearGroupCache(); + clearGroupCache(); // force the new GAL to display the current viewport. SetCenter( m_center ); @@ -282,12 +281,6 @@ void VIEW::SetCenter( const VECTOR2D& aCenter ) } -void VIEW::SetLayerVisible( int aLayer, bool aVisible ) -{ - m_layers[aLayer].enabled = aVisible; -} - - void VIEW::sortLayers() { int n = 0; @@ -452,7 +445,7 @@ void VIEW::EnableTopLayer( bool aEnable ) struct VIEW::drawItem { - drawItem( VIEW* aView, int aCurrentLayer ) : + drawItem( VIEW* aView, const VIEW_LAYER* aCurrentLayer ) : currentLayer( aCurrentLayer ), view( aView ) { } @@ -461,9 +454,10 @@ struct VIEW::drawItem { GAL* gal = view->GetGAL(); - if( view->m_useGroups ) + if( currentLayer->cached ) { - int group = aItem->getGroup( currentLayer ); + // Draw using cached information or create one + int group = aItem->getGroup( currentLayer->id ); if( group >= 0 && aItem->ViewIsVisible() ) { @@ -472,19 +466,20 @@ struct VIEW::drawItem else { group = gal->BeginGroup(); - aItem->setGroup( currentLayer, group ); - view->m_painter->Draw( aItem, currentLayer ); + aItem->setGroup( currentLayer->id, group ); + view->m_painter->Draw( aItem, currentLayer->id ); gal->EndGroup(); } } else if( aItem->ViewIsVisible() ) { - view->m_painter->Draw( aItem, currentLayer ); + // Immediate mode + view->m_painter->Draw( aItem, currentLayer->id ); } } - int currentLayer; - VIEW* view; + const VIEW_LAYER* currentLayer; + VIEW* view; }; @@ -494,10 +489,9 @@ void VIEW::redrawRect( const BOX2I& aRect ) { if( l->enabled ) { - drawItem drawFunc( this, l->id ); + drawItem drawFunc( this, l ); - if( !m_useGroups ) - m_gal->SetLayerDepth( static_cast( l->renderingOrder ) ); + m_gal->SetLayerDepth( static_cast( l->renderingOrder ) ); l->items->Query( aRect, drawFunc ); l->isDirty = false; } @@ -514,9 +508,9 @@ struct VIEW::unlinkItem }; -struct VIEW::recacheItem +struct VIEW::recacheLayer { - recacheItem( VIEW* aView, GAL* aGal, int aLayer, bool aImmediately ) : + recacheLayer( VIEW* aView, GAL* aGal, int aLayer, bool aImmediately ) : view( aView ), gal( aGal ), layer( aLayer ), immediately( aImmediately ) { } @@ -566,10 +560,7 @@ void VIEW::Clear() l->items->RemoveAll(); } - if( m_useGroups ) - { - m_gal->ClearCache(); - } + m_gal->ClearCache(); } @@ -608,12 +599,11 @@ void VIEW::invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ) l->items->Remove( aItem ); l->items->Insert( aItem ); /* reinsert */ - if( m_useGroups ) - aItem->deleteGroups(); + aItem->deleteGroups(); } } - if( m_useGroups && aItem->storesGroups() ) + if( aItem->storesGroups() ) { std::vector groups = aItem->getAllGroups(); for(std::vector::iterator i = groups.begin(); i != groups.end(); i++ ) @@ -626,9 +616,9 @@ void VIEW::invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ) } -struct VIEW::clearItemCache +struct VIEW::clearLayerCache { - clearItemCache( VIEW* aView ) : + clearLayerCache( VIEW* aView ) : view( aView ) { } @@ -647,13 +637,10 @@ struct VIEW::clearItemCache void VIEW::clearGroupCache() { - if( !m_useGroups ) - return; - BOX2I r; r.SetMaximum(); - clearItemCache visitor( this ); + clearLayerCache visitor( this ); for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) { @@ -665,9 +652,6 @@ void VIEW::clearGroupCache() void VIEW::RecacheAllItems( bool aImmediately ) { - if( !m_useGroups ) - return; - BOX2I r; r.SetMaximum(); @@ -682,9 +666,13 @@ void VIEW::RecacheAllItems( bool aImmediately ) for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) { VIEW_LAYER* l = & ( ( *i ).second ); - m_gal->SetLayerDepth( (double) l->renderingOrder ); - recacheItem visitor( this, m_gal, l->id, aImmediately ); - l->items->Query( r, visitor ); + + if( l->cached ) + { + m_gal->SetLayerDepth( (double) l->renderingOrder ); + recacheLayer visitor( this, m_gal, l->id, aImmediately ); + l->items->Query( r, visitor ); + } } #ifdef __WXDEBUG__ diff --git a/include/view/view.h b/include/view/view.h index 9ebc3d09c6..7bb93fad15 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -64,7 +64,7 @@ public: * @param aIsDynamic decides whether we are creating a static or a dynamic VIEW. * @param aUseGroups tells if items added to the VIEW should be stored in groups. */ - VIEW( bool aIsDynamic = true, bool aUseGroups = false ); + VIEW( bool aIsDynamic = true ); ~VIEW(); @@ -251,7 +251,21 @@ public: * visibility is updated * @param aVisible: the obivous */ - void SetLayerVisible( int aLayer, bool aVisible = true ); + inline void SetLayerVisible( int aLayer, bool aVisible = true ) + { + m_layers[aLayer].enabled = aVisible; + } + + /** + * Function SetLayerDynamic() + * Turns on or off the dynamic parameter of a particular layer. + * @param aLayer: the layer + * @param aDynamic: the parameter + */ + inline void SetLayerCached( int aLayer, bool aCached = true ) + { + m_layers[aLayer].cached = aCached; + } /** * Function SetLayerOrder() @@ -339,6 +353,8 @@ private: bool enabled; ///* is the layer to be rendered? bool isDirty; ///* does it contain any dirty items (updated since last redraw) bool displayOnly; ///* is the layer display only? + bool cached; ///* items on non-cached layers are displayed in + ///* immediate mode VIEW_RTREE* items; ///* R-tree indexing all items on this layer. std::vector dirtyItems; ///* set of dirty items collected since last redraw int renderingOrder; ///* rendering order of this layer @@ -354,10 +370,10 @@ private: typedef std::vector::iterator LayerOrderIter; // Function objects that need to access VIEW/VIEW_ITEM private/protected members - struct clearItemCache; - struct unlinkItem; - struct recacheItem; + struct clearLayerCache; + struct recacheLayer; struct drawItem; + struct unlinkItem; struct updateItemsColor; struct changeItemsDepth; @@ -408,9 +424,6 @@ private: /// Dynamic VIEW (eg. display PCB in window) allows changes once it is built, /// static (eg. image/PDF) - does not. bool m_dynamic; - - /// Determines whether to use cached groups of objects for displaying. - bool m_useGroups; }; } // namespace KiGfx diff --git a/include/view/view_item.h b/include/view/view_item.h index ffe7fe700f..b1710ca51b 100644 --- a/include/view/view_item.h +++ b/include/view/view_item.h @@ -205,7 +205,6 @@ public: * @param aLayers[]: output layer index array * @param aCount: number of layer indices in aLayers[] */ - virtual void ViewGetLayers( int aLayers[], int& aCount ) const = 0; /** @@ -216,7 +215,6 @@ public: */ void ViewSetVisible( bool aIsVisible = true ); - /** * Function ViewIsVisible() * Returns if the item is visible (or not). From 53542a9d3742547824e70f9c470a6e384966a5c4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 4 Jul 2013 18:45:00 +0200 Subject: [PATCH 135/415] Added implementation of level of details per layer and item type pairs basis (items on every layer have a possibility to define the minimum VIEW scale to be shown). --- common/view/view.cpp | 6 ++++-- include/view/view_item.h | 11 +++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 9300869f8b..ab436c31fe 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -459,7 +459,8 @@ struct VIEW::drawItem // Draw using cached information or create one int group = aItem->getGroup( currentLayer->id ); - if( group >= 0 && aItem->ViewIsVisible() ) + if( group >= 0 && aItem->ViewIsVisible() && + aItem->ViewGetLOD( currentLayer->id ) < view->m_scale ) { gal->DrawGroup( group ); } @@ -471,7 +472,8 @@ struct VIEW::drawItem gal->EndGroup(); } } - else if( aItem->ViewIsVisible() ) + else if( aItem->ViewIsVisible() && + aItem->ViewGetLOD( currentLayer->id ) < view->m_scale ) { // Immediate mode view->m_painter->Draw( aItem, currentLayer->id ); diff --git a/include/view/view_item.h b/include/view/view_item.h index b1710ca51b..7a3540ed38 100644 --- a/include/view/view_item.h +++ b/include/view/view_item.h @@ -227,6 +227,17 @@ public: return m_viewVisible; } + /** + * Function ViewGetLOD() + * Returns the level of detail of the item. A level of detail is the minimal VIEW scale that + * is sufficient for an item to be shown on a given layer. + */ + virtual unsigned int ViewGetLOD( int aLayer ) const + { + // By default always show the item + return 0; + } + /** * Function ViewUpdate() * For dynamic VIEWs, informs the associated VIEW that the graphical representation of From c2fb99ce49741690c991bd41a11e82cef61a6522 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 5 Jul 2013 09:31:04 +0200 Subject: [PATCH 136/415] Removed pointers where they were not necessary. --- common/gal/opengl/opengl_gal.cpp | 46 +++++++++++++------------------- include/gal/opengl/opengl_gal.h | 32 +++++++++++++++++----- 2 files changed, 43 insertions(+), 35 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 162a2c85e8..aaabca1c1c 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -27,7 +27,6 @@ */ #include -#include #include #include @@ -53,7 +52,8 @@ const int glAttributes[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 1 OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, wxEvtHandler* aPaintListener, bool isUseShaders, const wxString& aName ) : wxGLCanvas( aParent, wxID_ANY, (int*) glAttributes, wxDefaultPosition, wxDefaultSize, - wxEXPAND, aName ) + wxEXPAND, aName ), + verticesCircle( &precomputedContainer ) { // Create the OpenGL-Context glContext = new wxGLContext( this ); @@ -106,8 +106,6 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); #endif - vboContainer = new VBO_CONTAINER; - // Tesselator initialization tesselator = gluNewTess(); InitTesselatorCallbacks( tesselator ); @@ -127,9 +125,6 @@ OPENGL_GAL::~OPENGL_GAL() if( glIsList( displayListCircle ) ) glDeleteLists( displayListCircle, 1 ); - delete verticesCircle; - delete precomputedContainer; - // Delete the buffers if( isFrameBufferInitialized ) { @@ -143,7 +138,6 @@ OPENGL_GAL::~OPENGL_GAL() { ClearCache(); deleteVertexBufferObjects(); - delete vboContainer; } delete glContext; @@ -433,7 +427,7 @@ void OPENGL_GAL::BeginDrawing() glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, vboIndices ); // Discard old buffer, so we can use it again - glBufferData( GL_ELEMENT_ARRAY_BUFFER, vboContainer->GetSize() * VBO_ITEM::IndByteSize, + glBufferData( GL_ELEMENT_ARRAY_BUFFER, vboContainer.GetSize() * VBO_ITEM::IndByteSize, NULL, GL_STREAM_DRAW ); // Map the GPU memory, so we can store indices that are going to be drawn @@ -549,17 +543,17 @@ void OPENGL_GAL::rebuildVbo() prof_start( &totalTime, false ); #endif /* __WXDEBUG__ */ - GLfloat* data = (GLfloat*) vboContainer->GetAllVertices(); + GLfloat* data = (GLfloat*) vboContainer.GetAllVertices(); // Upload vertices coordinates and shader types to GPU memory glBindBuffer( GL_ARRAY_BUFFER, vboVertices ); - glBufferData( GL_ARRAY_BUFFER, vboContainer->GetSize() * VBO_ITEM::VertByteSize, + glBufferData( GL_ARRAY_BUFFER, vboContainer.GetSize() * VBO_ITEM::VertByteSize, data, GL_DYNAMIC_DRAW ); glBindBuffer( GL_ARRAY_BUFFER, 0 ); // Allocate the biggest possible buffer for indices glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, vboIndices ); - glBufferData( GL_ELEMENT_ARRAY_BUFFER, vboContainer->GetSize() * VBO_ITEM::IndByteSize, + glBufferData( GL_ELEMENT_ARRAY_BUFFER, vboContainer.GetSize() * VBO_ITEM::IndByteSize, NULL, GL_STREAM_DRAW ); glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 ); @@ -569,7 +563,7 @@ void OPENGL_GAL::rebuildVbo() prof_end( &totalTime ); wxLogDebug( wxT( "Rebuilding VBO::%d vertices / %.1f ms" ), - vboContainer->GetSize(), (double) totalTime.value / 1000.0 ); + vboContainer.GetSize(), (double) totalTime.value / 1000.0 ); #endif /* __WXDEBUG__ */ } @@ -852,7 +846,7 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) if( innerScale < outerScale ) { // Draw the outline - VBO_VERTEX* circle = verticesCircle->GetVertices(); + VBO_VERTEX* circle = verticesCircle.GetVertices(); int next; color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); @@ -910,7 +904,7 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) if( isGrouping ) { - currentGroup->PushVertices( verticesCircle->GetVertices(), CIRCLE_POINTS * 3 ); + currentGroup->PushVertices( verticesCircle.GetVertices(), CIRCLE_POINTS * 3 ); } else { @@ -975,7 +969,7 @@ void OPENGL_GAL::drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRad if( isGrouping ) { // It is enough just to push just a half of the circle vertices to make a semicircle - currentGroup->PushVertices( verticesCircle->GetVertices(), CIRCLE_POINTS / 2 * 3 ); + currentGroup->PushVertices( verticesCircle.GetVertices(), CIRCLE_POINTS / 2 * 3 ); } else { @@ -1031,7 +1025,7 @@ void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRa Rotate( aAngle ); // Draw the outline - VBO_VERTEX* circle = verticesCircle->GetVertices(); + VBO_VERTEX* circle = verticesCircle.GetVertices(); int next; begin( GL_TRIANGLES ); @@ -1402,7 +1396,7 @@ void OPENGL_GAL::Save() if( isGrouping ) { transformStack.push( transform ); - vboContainer->SetTransformMatrix( &transform ); + vboContainer.SetTransformMatrix( &transform ); } else { @@ -1421,7 +1415,7 @@ void OPENGL_GAL::Restore() if( transformStack.empty() ) { // Disable transforming, as the selected matrix is identity - vboContainer->SetTransformMatrix( NULL ); + vboContainer.SetTransformMatrix( NULL ); } } else @@ -1439,7 +1433,7 @@ int OPENGL_GAL::BeginGroup() vboNeedsUpdate = true; // Save the pointer for caching the current item - currentGroup = new VBO_ITEM( vboContainer ); + currentGroup = new VBO_ITEM( &vboContainer ); int groupNumber = getGroupNumber(); groups.insert( std::make_pair( groupNumber, currentGroup ) ); @@ -1503,10 +1497,6 @@ void OPENGL_GAL::ChangeGroupDepth( int aGroupNumber, int aDepth ) void OPENGL_GAL::computeCircleVbo() { - // (3 vertices per triangle) * (number of points to draw a circle) - precomputedContainer = new VBO_CONTAINER( 3 * CIRCLE_POINTS ); - verticesCircle = new VBO_ITEM( precomputedContainer ); - // Compute the circle points for a given number of segments // Insert in a display list and a vector const VBO_VERTEX v0 = { 0.0f, 0.0f, 0.0f }; @@ -1524,12 +1514,12 @@ void OPENGL_GAL::computeCircleVbo() 0.0f // z }; - verticesCircle->PushVertex( &v0 ); - verticesCircle->PushVertex( &v1 ); - verticesCircle->PushVertex( &v2 ); + verticesCircle.PushVertex( &v0 ); + verticesCircle.PushVertex( &v1 ); + verticesCircle.PushVertex( &v2 ); } - verticesCircle->Finish(); + verticesCircle.Finish(); } diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 0304ead7e1..f9d60717f8 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -338,8 +338,8 @@ private: wxEvtHandler* paintListener; // VBO buffers & display lists (used in immediate mode) - VBO_CONTAINER* precomputedContainer; ///< Container for storing display lists - VBO_ITEM* verticesCircle; ///< Buffer for circle & semicircle vertices + VBO_CONTAINER precomputedContainer; ///< Container for storing display lists + VBO_ITEM verticesCircle; ///< Buffer for circle & semicircle vertices GLuint displayListCircle; ///< Circle display list GLuint displayListSemiCircle; ///< Semi circle display list @@ -348,7 +348,7 @@ private: GroupsMap groups; ///< Stores informations about VBO objects (groups) unsigned int groupCounter; ///< Counter used for generating keys for groups VBO_ITEM* currentGroup; ///< Currently used VBO_ITEM (for grouping) - VBO_CONTAINER* vboContainer; ///< Container for storing VBO_ITEMs + VBO_CONTAINER vboContainer; ///< Container for storing VBO_ITEMs GLuint vboVertices; ///< Currently used vertices VBO handle GLuint vboIndices; ///< Currently used indices VBO handle bool vboNeedsUpdate; ///< Flag indicating if VBO should be rebuilt @@ -399,7 +399,8 @@ private: bool isGrouping; ///< Was a group started? /** - * @brief Draw a semi circle (used for line caps). + * @brief Draw a semi circle. Depending on settings (isStrokeEnabled & isFilledEnabled) it runs + * the proper function (drawStrokedSemiCircle or drawFilledSemiCircle). * * @param aCenterPoint is the center point. * @param aRadius is the radius of the semi-circle. @@ -408,7 +409,24 @@ private: */ void drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ); + /** + * @brief Draw a filled semi circle. + * + * @param aCenterPoint is the center point. + * @param aRadius is the radius of the semi-circle. + * @param aAngle is the angle of the semi-circle. + * + */ void drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ); + + /** + * @brief Draw a stroked semi circle. + * + * @param aCenterPoint is the center point. + * @param aRadius is the radius of the semi-circle. + * @param aAngle is the angle of the semi-circle. + * + */ void drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ); /// Compute the points of an unit circle & semicircle and store them in VBO. @@ -584,7 +602,7 @@ private: { if( isGrouping ) { - vboContainer->UseColor( aRed, aGreen, aBlue, aAlpha ); + vboContainer.UseColor( aRed, aGreen, aBlue, aAlpha ); } else { @@ -603,7 +621,7 @@ private: { if( isGrouping ) { - vboContainer->UseColor( aColor ); + vboContainer.UseColor( aColor ); } else { @@ -625,7 +643,7 @@ private: { const GLfloat shader[] = { aShader, aParam1, aParam2, aParam3 }; - vboContainer->UseShader( shader ); + vboContainer.UseShader( shader ); } } }; From 1399ed198ca71e9c22ab73274ce1503d1bb5a710 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 5 Jul 2013 14:01:33 +0200 Subject: [PATCH 137/415] Removed most of deprecated OpenGL calls. Items used to be drawn in immediate mode now are drawn using vertex arrays. --- common/gal/opengl/opengl_gal.cpp | 258 ++++++++-------------------- common/gal/opengl/vbo_container.cpp | 26 ++- include/gal/opengl/opengl_gal.h | 96 ++--------- include/gal/opengl/vbo_container.h | 11 +- include/gal/opengl/vbo_item.h | 2 +- 5 files changed, 126 insertions(+), 267 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index aaabca1c1c..c4887a2f86 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -76,9 +76,10 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, isVboInitialized = false; vboNeedsUpdate = false; - currentGroup = NULL; + currentItem = NULL; groupCounter = 0; transform = glm::mat4( 1.0f ); // Identity matrix + nonCachedItem = NULL; SetSize( parentSize ); @@ -120,10 +121,7 @@ OPENGL_GAL::~OPENGL_GAL() { glFlush(); - if( glIsList( displayListSemiCircle ) ) - glDeleteLists( displayListSemiCircle, 1 ); - if( glIsList( displayListCircle ) ) - glDeleteLists( displayListCircle, 1 ); + delete nonCachedItem; // Delete the buffers if( isFrameBufferInitialized ) @@ -241,8 +239,8 @@ void OPENGL_GAL::initFrameBuffers() void OPENGL_GAL::initVertexBufferObjects() { // Generate buffers for vertices and indices - glGenBuffers( 1, &vboVertices ); - glGenBuffers( 1, &vboIndices ); + glGenBuffers( 1, &cachedVerts ); + glGenBuffers( 1, &cachedInds ); isVboInitialized = true; } @@ -253,8 +251,8 @@ void OPENGL_GAL::deleteVertexBufferObjects() glBindBuffer( GL_ARRAY_BUFFER, 0 ); glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 ); - glDeleteBuffers( 1, &vboVertices ); - glDeleteBuffers( 1, &vboIndices ); + glDeleteBuffers( 1, &cachedVerts ); + glDeleteBuffers( 1, &cachedInds ); isVboInitialized = false; } @@ -323,7 +321,6 @@ void OPENGL_GAL::initGlew() } initVertexBufferObjects(); - computeCircleDisplayLists(); isGlewInitialized = true; } @@ -425,9 +422,9 @@ void OPENGL_GAL::BeginDrawing() // Number of vertices to be drawn indicesSize = 0; - glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, vboIndices ); + glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, cachedInds ); // Discard old buffer, so we can use it again - glBufferData( GL_ELEMENT_ARRAY_BUFFER, vboContainer.GetSize() * VBO_ITEM::IndByteSize, + glBufferData( GL_ELEMENT_ARRAY_BUFFER, cachedVbo.GetSize() * VBO_ITEM::IndByteSize, NULL, GL_STREAM_DRAW ); // Map the GPU memory, so we can store indices that are going to be drawn @@ -436,6 +433,14 @@ void OPENGL_GAL::BeginDrawing() { wxLogError( wxT( "Could not map GPU memory" ) ); } + + // Prepare buffer for non-cached items + delete nonCachedItem; + nonCachedItem = new VBO_ITEM( &nonCachedVbo ); + + // By default we draw non-cached objects, it changes on BeginGroup()/EndGroup() + currentContainer = &nonCachedVbo; + currentItem = nonCachedItem; } @@ -487,9 +492,6 @@ void OPENGL_GAL::blitMainTexture( bool aIsClearFrameBuffer ) void OPENGL_GAL::EndDrawing() { - // TODO Checking if we are using right VBOs, in other case do the binding. - // Right now there is only one VBO, so there is no problem. - if( !glUnmapBuffer( GL_ELEMENT_ARRAY_BUFFER ) ) { wxLogError( wxT( "Unmapping indices buffer failed" ) ); @@ -500,7 +502,7 @@ void OPENGL_GAL::EndDrawing() glEnableClientState( GL_COLOR_ARRAY ); // Bind vertices data buffers - glBindBuffer( GL_ARRAY_BUFFER, vboVertices ); + glBindBuffer( GL_ARRAY_BUFFER, cachedVerts ); glVertexPointer( VBO_ITEM::CoordStride, GL_FLOAT, VBO_ITEM::VertByteSize, 0 ); glColorPointer( VBO_ITEM::ColorStride, GL_UNSIGNED_BYTE, VBO_ITEM::VertByteSize, (GLvoid*) VBO_ITEM::ColorByteOffset ); @@ -518,6 +520,20 @@ void OPENGL_GAL::EndDrawing() glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 ); glBindBuffer( GL_ARRAY_BUFFER, 0 ); + // Draw non-cached items + GLfloat* vertices = (GLfloat*)( nonCachedVbo.GetAllVertices() ); + GLubyte* colors = (GLubyte*)( nonCachedVbo.GetAllVertices() ) + VBO_ITEM::ColorOffset; + GLfloat* shaders = (GLfloat*)( nonCachedVbo.GetAllVertices() ) + VBO_ITEM::ShaderOffset; + + glVertexPointer( VBO_ITEM::CoordStride, GL_FLOAT, VBO_ITEM::VertByteSize, vertices ); + glColorPointer( VBO_ITEM::ColorStride, GL_UNSIGNED_BYTE, VBO_ITEM::VertByteSize, colors ); + if( isUseShader ) + { + glVertexAttribPointer( shaderAttrib, VBO_ITEM::ShaderStride, GL_FLOAT, GL_FALSE, + VBO_ITEM::VertByteSize, shaders ); + } + glDrawArrays( GL_TRIANGLES, nonCachedItem->GetOffset(), nonCachedItem->GetSize() ); + // Deactivate vertex array glDisableClientState( GL_COLOR_ARRAY ); glDisableClientState( GL_VERTEX_ARRAY ); @@ -543,17 +559,17 @@ void OPENGL_GAL::rebuildVbo() prof_start( &totalTime, false ); #endif /* __WXDEBUG__ */ - GLfloat* data = (GLfloat*) vboContainer.GetAllVertices(); + GLfloat* data = (GLfloat*) cachedVbo.GetAllVertices(); // Upload vertices coordinates and shader types to GPU memory - glBindBuffer( GL_ARRAY_BUFFER, vboVertices ); - glBufferData( GL_ARRAY_BUFFER, vboContainer.GetSize() * VBO_ITEM::VertByteSize, + glBindBuffer( GL_ARRAY_BUFFER, cachedVerts ); + glBufferData( GL_ARRAY_BUFFER, cachedVbo.GetSize() * VBO_ITEM::VertByteSize, data, GL_DYNAMIC_DRAW ); glBindBuffer( GL_ARRAY_BUFFER, 0 ); // Allocate the biggest possible buffer for indices - glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, vboIndices ); - glBufferData( GL_ELEMENT_ARRAY_BUFFER, vboContainer.GetSize() * VBO_ITEM::IndByteSize, + glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, cachedInds ); + glBufferData( GL_ELEMENT_ARRAY_BUFFER, cachedVbo.GetSize() * VBO_ITEM::IndByteSize, NULL, GL_STREAM_DRAW ); glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 ); @@ -563,7 +579,7 @@ void OPENGL_GAL::rebuildVbo() prof_end( &totalTime ); wxLogDebug( wxT( "Rebuilding VBO::%d vertices / %.1f ms" ), - vboContainer.GetSize(), (double) totalTime.value / 1000.0 ); + cachedVbo.GetSize(), (double) totalTime.value / 1000.0 ); #endif /* __WXDEBUG__ */ } @@ -577,27 +593,16 @@ inline void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2 if( lineLength <= 0.0 ) return; - if( lineWidth * worldScale < 1.0002 && !isGrouping && !isUseShader ) - { - // Limit the width of the line to a minimum of one pixel - // this looks best without anti-aliasing - scale = 0.5001 / worldScale / lineLength; - } - VECTOR2D perpendicularVector( -startEndVector.y * scale, startEndVector.x * scale ); - begin( GL_TRIANGLES ); - - if( isUseShader && isGrouping ) + if( isUseShader ) { glm::vec4 vector( perpendicularVector.x, perpendicularVector.y, 0.0, 0.0 ); // If transform stack is not empty, then it means that // there is a transformation matrix that has to be applied if( !transformStack.empty() ) - { vector = transform * vector; - } // Line width is maintained by the vertex shader setShader( SHADER_LINE, vector.x, vector.y, lineWidth ); @@ -634,8 +639,6 @@ inline void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2 vertex3( v3.x, v3.y, layerDepth ); vertex3( v2.x, v2.y, layerDepth ); } - - end(); } @@ -760,7 +763,6 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn setShader( SHADER_NONE ); color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - begin( GL_TRIANGLES ); vertex3( aStartPoint.x, aStartPoint.y, layerDepth ); vertex3( diagonalPointA.x, diagonalPointA.y, layerDepth ); vertex3( aEndPoint.x, aEndPoint.y, layerDepth ); @@ -768,14 +770,13 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn vertex3( aStartPoint.x, aStartPoint.y, layerDepth ); vertex3( aEndPoint.x, aEndPoint.y, layerDepth ); vertex3( diagonalPointB.x, diagonalPointB.y, layerDepth ); - end(); } } void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) { - if( isUseShader && isGrouping ) + if( isUseShader ) { if( isFillEnabled ) { @@ -856,8 +857,6 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) translate3( aCenterPoint.x, aCenterPoint.y, 0.0 ); Scale( VECTOR2D( aRadius, aRadius ) ); - begin( GL_TRIANGLES ); - for( int i = 0; i < 3 * CIRCLE_POINTS; ++i ) { // verticesCircle contains precomputed circle points interleaved with vertex @@ -887,8 +886,6 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) vertex3( circle[next].x * innerScale, circle[next].y * innerScale, layerDepth ); } - end(); - Restore(); } } @@ -902,14 +899,7 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) translate3( aCenterPoint.x, aCenterPoint.y, layerDepth ); Scale( VECTOR2D( aRadius, aRadius ) ); - if( isGrouping ) - { - currentGroup->PushVertices( verticesCircle.GetVertices(), CIRCLE_POINTS * 3 ); - } - else - { - glCallList( displayListCircle ); - } + currentItem->PushVertices( verticesCircle.GetVertices(), CIRCLE_POINTS * 3 ); Restore(); } @@ -934,7 +924,7 @@ void OPENGL_GAL::drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, d void OPENGL_GAL::drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ) { - if( isUseShader && isGrouping ) + if( isUseShader ) { Save(); Translate( aCenterPoint ); @@ -966,15 +956,8 @@ void OPENGL_GAL::drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRad Scale( VECTOR2D( aRadius, aRadius ) ); Rotate( aAngle ); - if( isGrouping ) - { - // It is enough just to push just a half of the circle vertices to make a semicircle - currentGroup->PushVertices( verticesCircle.GetVertices(), CIRCLE_POINTS / 2 * 3 ); - } - else - { - glCallList( displayListSemiCircle ); - } + // It is enough just to push just a half of the circle vertices to make a semicircle + currentItem->PushVertices( verticesCircle.GetVertices(), CIRCLE_POINTS / 2 * 3 ); Restore(); } @@ -983,7 +966,7 @@ void OPENGL_GAL::drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRad void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ) { - if( isUseShader && isGrouping ) + if( isUseShader ) { Save(); Translate( aCenterPoint ); @@ -1028,8 +1011,6 @@ void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRa VBO_VERTEX* circle = verticesCircle.GetVertices(); int next; - begin( GL_TRIANGLES ); - for( int i = 0; i < ( 3 * CIRCLE_POINTS ) / 2; ++i ) { // verticesCircle contains precomputed circle points interleaved with vertex @@ -1059,8 +1040,6 @@ void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRa vertex3( circle[next].x * innerScale, circle[next].y * innerScale, 0.0 ); } - end(); - Restore(); } } @@ -1123,8 +1102,6 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a double alphaIncrement = 2 * M_PI / CIRCLE_POINTS; color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); - begin( GL_TRIANGLES ); - for( double alpha = aStartAngle; alpha < aEndAngle; ) { double v0[] = { cos( alpha ) * innerScale, sin( alpha ) * innerScale }; @@ -1147,8 +1124,6 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a vertex3( v2[0], v2[1], 0.0 ); } - end(); - // Draw line caps drawFilledSemiCircle( startPoint, lineWidth / aRadius / 2.0, aStartAngle + M_PI ); drawFilledSemiCircle( endPoint, lineWidth / aRadius / 2.0, aEndAngle ); @@ -1161,8 +1136,6 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a double alpha; color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - begin( GL_TRIANGLES ); - for( alpha = aStartAngle; ( alpha + alphaIncrement ) < aEndAngle; ) { vertex3( middlePoint.x, middlePoint.y, 0.0 ); @@ -1174,7 +1147,6 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a vertex3( middlePoint.x, middlePoint.y, 0.0 ); vertex3( cos( alpha ), sin( alpha ), 0.0 ); vertex3( endPoint.x, endPoint.y, 0.0 ); - end(); } Restore(); @@ -1228,7 +1200,7 @@ void OPENGL_GAL::DrawPolygon( const std::deque& aPointList ) glShadeModel( GL_FLAT ); - TessParams params = { currentGroup, tessIntersects }; + TessParams params = { currentItem, tessIntersects }; gluTessBeginPolygon( tesselator, ¶ms ); gluTessBeginContour( tesselator ); @@ -1348,40 +1320,19 @@ void OPENGL_GAL::Transform( MATRIX3x3D aTransformation ) void OPENGL_GAL::Rotate( double aAngle ) { - if( isGrouping ) - { - transform = glm::rotate( transform, (float) aAngle, glm::vec3( 0, 0, 1 ) ); - } - else - { - glRotated( aAngle * ( 360 / ( 2 * M_PI ) ), 0, 0, 1 ); - } + transform = glm::rotate( transform, (float) aAngle, glm::vec3( 0, 0, 1 ) ); } void OPENGL_GAL::Translate( const VECTOR2D& aVector ) { - if( isGrouping ) - { - transform = glm::translate( transform, glm::vec3( aVector.x, aVector.y, 0 ) ); - } - else - { - glTranslated( aVector.x, aVector.y, 0 ); - } + transform = glm::translate( transform, glm::vec3( aVector.x, aVector.y, 0 ) ); } void OPENGL_GAL::Scale( const VECTOR2D& aScale ) { - if( isGrouping ) - { - transform = glm::scale( transform, glm::vec3( aScale.x, aScale.y, 0 ) ); - } - else - { - glScaled( aScale.x, aScale.y, 0 ); - } + transform = glm::scale( transform, glm::vec3( aScale.x, aScale.y, 0 ) ); } @@ -1393,34 +1344,20 @@ void OPENGL_GAL::Flush() void OPENGL_GAL::Save() { - if( isGrouping ) - { - transformStack.push( transform ); - vboContainer.SetTransformMatrix( &transform ); - } - else - { - glPushMatrix(); - } + transformStack.push( transform ); + currentContainer->SetTransformMatrix( &transform ); } void OPENGL_GAL::Restore() { - if( isGrouping ) - { - transform = transformStack.top(); - transformStack.pop(); + transform = transformStack.top(); + transformStack.pop(); - if( transformStack.empty() ) - { - // Disable transforming, as the selected matrix is identity - vboContainer.SetTransformMatrix( NULL ); - } - } - else + if( transformStack.empty() ) { - glPopMatrix(); + // Disable transforming, as the selected matrix is identity + currentContainer->SetTransformMatrix( NULL ); } } @@ -1433,9 +1370,10 @@ int OPENGL_GAL::BeginGroup() vboNeedsUpdate = true; // Save the pointer for caching the current item - currentGroup = new VBO_ITEM( &vboContainer ); + currentItem = new VBO_ITEM( &cachedVbo ); + currentContainer = &cachedVbo; int groupNumber = getGroupNumber(); - groups.insert( std::make_pair( groupNumber, currentGroup ) ); + groups.insert( std::make_pair( groupNumber, currentItem ) ); return groupNumber; } @@ -1443,7 +1381,9 @@ int OPENGL_GAL::BeginGroup() void OPENGL_GAL::EndGroup() { - currentGroup->Finish(); + currentItem->Finish(); + currentItem = nonCachedItem; + currentContainer = &nonCachedVbo; isGrouping = false; } @@ -1523,42 +1463,6 @@ void OPENGL_GAL::computeCircleVbo() } -void OPENGL_GAL::computeCircleDisplayLists() -{ - // Circle display list - displayListCircle = glGenLists( 1 ); - glNewList( displayListCircle, GL_COMPILE ); - - glBegin( GL_TRIANGLES ); - for( int i = 0; i < CIRCLE_POINTS; ++i ) - { - glVertex2d( 0.0, 0.0 ); - glVertex2d( cos( 2.0 * M_PI / CIRCLE_POINTS * i ), - sin( 2.0 * M_PI / CIRCLE_POINTS * i ) ); - glVertex2d( cos( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), - sin( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ) ); - } - glEnd(); - glEndList(); - - // Semicircle display list - displayListSemiCircle = glGenLists( 1 ); - glNewList( displayListSemiCircle, GL_COMPILE ); - - glBegin( GL_TRIANGLES ); - for( int i = 0; i < CIRCLE_POINTS / 2; ++i ) - { - glVertex2d( 0.0, 0.0 ); - glVertex2d( cos( 2.0 * M_PI / CIRCLE_POINTS * i ), - sin( 2.0 * M_PI / CIRCLE_POINTS * i ) ); - glVertex2d( cos( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), - sin( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ) ); - } - glEnd(); - glEndList(); -} - - void OPENGL_GAL::ComputeWorldScreenMatrix() { ComputeWorldScale(); @@ -1603,10 +1507,6 @@ void CALLBACK VertexCallback( GLvoid* aVertexPtr, void* aData ) VBO_VERTEX newVertex = { vertex[0], vertex[1], vertex[2] }; vboItem->PushVertex( &newVertex ); } - else - { - glVertex3dv( vertex ); - } } @@ -1633,20 +1533,6 @@ void CALLBACK EdgeCallback(void) } -void CALLBACK BeginCallback( GLenum aWhich, void* aData ) -{ - if( !aData ) - glBegin( aWhich ); -} - - -void CALLBACK EndCallback( void* aData ) -{ - if( !aData ) - glEnd(); -} - - void CALLBACK ErrorCallback( GLenum aErrorCode ) { const GLubyte* estring; @@ -1661,8 +1547,6 @@ void InitTesselatorCallbacks( GLUtesselator* aTesselator ) gluTessCallback( aTesselator, GLU_TESS_VERTEX_DATA, ( void (CALLBACK*)() )VertexCallback ); gluTessCallback( aTesselator, GLU_TESS_COMBINE_DATA, ( void (CALLBACK*)() )CombineCallback ); gluTessCallback( aTesselator, GLU_TESS_EDGE_FLAG, ( void (CALLBACK*)() )EdgeCallback ); - gluTessCallback( aTesselator, GLU_TESS_BEGIN_DATA, ( void (CALLBACK*)() )BeginCallback ); - gluTessCallback( aTesselator, GLU_TESS_END_DATA, ( void (CALLBACK*)() )EndCallback ); gluTessCallback( aTesselator, GLU_TESS_ERROR_DATA, ( void (CALLBACK*)() )ErrorCallback ); } @@ -1771,19 +1655,19 @@ void OPENGL_GAL::DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEnd VECTOR2D point4 = aEndPoint - perpendicularVector; // Set color - glColor4d( gridColor.r, gridColor.g, gridColor.b, gridColor.a ); + color4( gridColor.r, gridColor.g, gridColor.b, gridColor.a ); + + setShader( SHADER_NONE ); // Draw the quad for the grid line - glBegin( GL_TRIANGLES ); double gridDepth = depthRange.y * 0.75; - glVertex3d( point1.x, point1.y, gridDepth ); - glVertex3d( point2.x, point2.y, gridDepth ); - glVertex3d( point4.x, point4.y, gridDepth ); + vertex3( point1.x, point1.y, gridDepth ); + vertex3( point2.x, point2.y, gridDepth ); + vertex3( point4.x, point4.y, gridDepth ); - glVertex3d( point1.x, point1.y, gridDepth ); - glVertex3d( point4.x, point4.y, gridDepth ); - glVertex3d( point3.x, point3.y, gridDepth ); - glEnd(); + vertex3( point1.x, point1.y, gridDepth ); + vertex3( point4.x, point4.y, gridDepth ); + vertex3( point3.x, point3.y, gridDepth ); } diff --git a/common/gal/opengl/vbo_container.cpp b/common/gal/opengl/vbo_container.cpp index 8e888d8bd5..cbf5320035 100644 --- a/common/gal/opengl/vbo_container.cpp +++ b/common/gal/opengl/vbo_container.cpp @@ -38,7 +38,7 @@ using namespace KiGfx; -VBO_CONTAINER::VBO_CONTAINER( int aSize ) : +VBO_CONTAINER::VBO_CONTAINER( unsigned int aSize ) : m_freeSpace( aSize ), m_currentSize( aSize ), itemStarted( false ), m_transform( NULL ), m_failed( false ) { @@ -202,6 +202,30 @@ void VBO_CONTAINER::Add( VBO_ITEM* aVboItem, const VBO_VERTEX* aVertex, unsigned } +void VBO_CONTAINER::Clear() +{ + // Change size to the default one + m_vertices = static_cast( realloc( m_vertices, + defaultInitSize * sizeof( VBO_VERTEX ) ) ); + + // Reset state variables + m_freeSpace = defaultInitSize; + m_currentSize = defaultInitSize; + itemStarted = false; + m_transform = NULL; + m_failed = false; + + // By default no shader is used + m_shader[0] = 0; + + m_freeChunks.clear(); + m_reservedChunks.clear(); + + // In the beginning there is only free space + m_freeChunks.insert( Chunk( m_freeSpace, 0 ) ); +} + + VBO_VERTEX* VBO_CONTAINER::GetAllVertices() const { return m_vertices; diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index f9d60717f8..235c8082fb 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -337,21 +337,22 @@ private: wxEvtHandler* mouseListener; wxEvtHandler* paintListener; - // VBO buffers & display lists (used in immediate mode) + // VBO buffered vertices for faster circle & semicircle drawing VBO_CONTAINER precomputedContainer; ///< Container for storing display lists VBO_ITEM verticesCircle; ///< Buffer for circle & semicircle vertices - GLuint displayListCircle; ///< Circle display list - GLuint displayListSemiCircle; ///< Semi circle display list // Vertex buffer objects related fields typedef boost::unordered_map GroupsMap; GroupsMap groups; ///< Stores informations about VBO objects (groups) unsigned int groupCounter; ///< Counter used for generating keys for groups - VBO_ITEM* currentGroup; ///< Currently used VBO_ITEM (for grouping) - VBO_CONTAINER vboContainer; ///< Container for storing VBO_ITEMs - GLuint vboVertices; ///< Currently used vertices VBO handle - GLuint vboIndices; ///< Currently used indices VBO handle + VBO_ITEM* currentItem; ///< Currently used VBO_ITEM (for grouping) + VBO_CONTAINER* currentContainer; ///< Currently used VBO_CONTAINER (for storing VBO_ITEMs) + VBO_CONTAINER cachedVbo; ///< Container for storing VBO_ITEMs + GLuint cachedVerts; ///< Currently used vertices VBO handle + GLuint cachedInds; ///< Currently used indices VBO handle bool vboNeedsUpdate; ///< Flag indicating if VBO should be rebuilt + VBO_CONTAINER nonCachedVbo; ///< Container for storing non-cached VBO_ITEMs + VBO_ITEM* nonCachedItem; ///< Item that is gathering non-cached vertices glm::mat4 transform; ///< Current transformation matrix std::stack transformStack; ///< Stack of transformation matrices @@ -432,10 +433,6 @@ private: /// Compute the points of an unit circle & semicircle and store them in VBO. void computeCircleVbo(); - /// Compute the points of an unit circle & semicircle and store them in display lists - /// for drawing in immediate mode. - void computeCircleDisplayLists(); - // Event handling /** * @brief This is the window creation event handler. @@ -527,26 +524,6 @@ private: */ unsigned int getGroupNumber(); - ///< OpenGL replacement functions (that are working both in immediate and VBO modes) - /** - * @brief Starts drawing in immediate mode or does nothing if an item's caching has started. - * @param aMode specifies the primitive or primitives that will be created. - */ - inline void begin( GLenum aMode ) - { - if( !isGrouping ) - glBegin( aMode ); - } - - /** - * @brief Ends drawing in immediate mode or does nothing if an item's caching has started. - */ - inline void end() - { - if( !isGrouping ) - glEnd(); - } - /** * @brief Adds vertex to the current item or draws it in immediate mode. * @param aX is X coordinate. @@ -555,22 +532,13 @@ private: */ inline void vertex3( double aX, double aY, double aZ ) { - if( isGrouping ) - { - // New vertex coordinates for VBO - const VBO_VERTEX vertex = { aX, aY, aZ }; - currentGroup->PushVertex( &vertex ); - } - else - { - glVertex3d( aX, aY, aZ ); - } + // New vertex coordinates for VBO + const VBO_VERTEX vertex = { aX, aY, aZ }; + currentItem->PushVertex( &vertex ); } /** - * @brief Function that replaces glTranslate and behaves according to isGrouping variable. - * In case isGrouping==false, it is simply glTranslate, in other case it - * modifies transformation matrix. + * @brief Function that replaces glTranslate. It modifies transformation matrix. * * @param aX is translation in X axis direction. * @param aY is translation in Y axis direction. @@ -578,20 +546,11 @@ private: */ inline void translate3( double aX, double aY, double aZ ) { - if( isGrouping ) - { - transform = glm::translate( transform, glm::vec3( aX, aY, aZ ) ); - } - else - { - glTranslated( aX, aY, aZ ); - } + transform = glm::translate( transform, glm::vec3( aX, aY, aZ ) ); } /** - * @brief Function that replaces glColor and behaves according to isGrouping variable. - * In case isGrouping==false, it is simply glColor, in other case it - * modifies color used by current VBO_ITEM. + * @brief Function that replaces glColor. It modifies color used by current VBO_ITEM. * * @param aR is red component. * @param aG is green component. @@ -600,33 +559,17 @@ private: */ inline void color4( double aRed, double aGreen, double aBlue, double aAlpha ) { - if( isGrouping ) - { - vboContainer.UseColor( aRed, aGreen, aBlue, aAlpha ); - } - else - { - glColor4d( aRed, aGreen, aBlue, aAlpha ); - } + currentContainer->UseColor( aRed, aGreen, aBlue, aAlpha ); } /** - * @brief Function that replaces glColor and behaves according to isGrouping variable. - * In case isGrouping==false, it is simply glColor, in other case it - * modifies color used by current VBO_ITEM. + * @brief Function that replaces glColor. It modifies color used by current VBO_ITEM. * * @param aColor is the new color. */ inline void color4( const COLOR4D& aColor ) { - if( isGrouping ) - { - vboContainer.UseColor( aColor ); - } - else - { - glColor4d( aColor.r, aColor.g, aColor.b, aColor.a); - } + currentContainer->UseColor( aColor ); } /** @@ -639,11 +582,10 @@ private: inline void setShader( SHADER_TYPE aShader, GLfloat aParam1 = 0.0f, GLfloat aParam2 = 0.0f, GLfloat aParam3 = 0.0f ) { - if( isUseShader && isGrouping ) + if( isUseShader ) { const GLfloat shader[] = { aShader, aParam1, aParam2, aParam3 }; - - vboContainer.UseShader( shader ); + currentContainer->UseShader( shader ); } } }; diff --git a/include/gal/opengl/vbo_container.h b/include/gal/opengl/vbo_container.h index 6ce50193dd..de2faf1f2d 100644 --- a/include/gal/opengl/vbo_container.h +++ b/include/gal/opengl/vbo_container.h @@ -46,7 +46,7 @@ typedef struct VBO_VERTEX VBO_VERTEX; class VBO_CONTAINER { public: - VBO_CONTAINER( int aSize = 1048576 ); + VBO_CONTAINER( unsigned int aSize = defaultInitSize ); ~VBO_CONTAINER(); ///< Maps size of free memory chunks to their offsets @@ -99,6 +99,12 @@ public: } } + /** + * Function Clear() + * Removes all the data stored in the container. + */ + void Clear(); + /** * Function GetAllVertices() * Returns all vertices stored in the container. It is especially useful for transferring @@ -344,6 +350,9 @@ private: return power; } + + ///< Default initial size of a container (expressed in vertices) + static const unsigned int defaultInitSize = 1048576; }; } // namespace KiGfx diff --git a/include/gal/opengl/vbo_item.h b/include/gal/opengl/vbo_item.h index 6fc5c4675d..146f0966a2 100644 --- a/include/gal/opengl/vbo_item.h +++ b/include/gal/opengl/vbo_item.h @@ -126,7 +126,7 @@ public: ///< Informs the container that there will be no more vertices for the current VBO_ITEM void Finish(); - ///< Data organization information for vertices {X,Y,Z,R,G,B,A} (@see VBO_VERTEX). + ///< Data structure for vertices {X,Y,Z,R,G,B,A,shader¶m} (@see VBO_VERTEX). static const unsigned int VertByteSize = sizeof(VBO_VERTEX); static const unsigned int VertStride = VertByteSize / sizeof(GLfloat); From 145ea35ac30ffa1d6bd588cdc4950cd4c92dcad3 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 5 Jul 2013 15:48:45 +0200 Subject: [PATCH 138/415] Fixed segmentation fault when there was no board loaded. --- common/gal/opengl/opengl_gal.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index c4887a2f86..cc43852dba 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -114,6 +114,9 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, // Compute unit semicircle & circle vertices and store them in a buffer for faster drawing computeCircleVbo(); + + // By default we draw non-cached objects, it changes on BeginGroup()/EndGroup() + currentContainer = &nonCachedVbo; } @@ -437,9 +440,6 @@ void OPENGL_GAL::BeginDrawing() // Prepare buffer for non-cached items delete nonCachedItem; nonCachedItem = new VBO_ITEM( &nonCachedVbo ); - - // By default we draw non-cached objects, it changes on BeginGroup()/EndGroup() - currentContainer = &nonCachedVbo; currentItem = nonCachedItem; } From f885296fb2caff3bb9784feb2817cb3ede88ec76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Sumi=C5=84ski?= Date: Sun, 7 Jul 2013 02:30:28 +0200 Subject: [PATCH 139/415] Removed KICAD_GAL CMake option. --- CMakeLists.txt | 10 ---------- common/CMakeLists.txt | 6 ------ common/drawframe.cpp | 9 +-------- common/zoom.cpp | 2 -- cvpcb/CMakeLists.txt | 2 -- include/base_struct.h | 4 ---- pcbnew/CMakeLists.txt | 2 -- pcbnew/basepcbframe.cpp | 10 ---------- pcbnew/class_pcb_layer_widget.cpp | 13 +------------ pcbnew/dialogs/dialog_general_options.cpp | 13 +------------ pcbnew/hotkeys.cpp | 3 +-- pcbnew/hotkeys.h | 2 -- pcbnew/menubar_pcbframe.cpp | 2 -- pcbnew/pcbframe.cpp | 4 ---- 14 files changed, 4 insertions(+), 78 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 61c061db0a..2466e06c10 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,10 +51,6 @@ option(KICAD_SCRIPTING_WXPYTHON "set this option ON to build wxpython implementation for wx interface building in python and py.shell" ) -option(KICAD_GAL - "set this option ON to build KICAD using Graphics Abstraction Layer as a rendering backend" - ) - # when option KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES is enabled: # PYTHON_EXECUTABLE can be defined when invoking cmake # ( use -DPYTHON_EXECUTABLE=/python.exe or python2 ) @@ -187,10 +183,6 @@ if(USE_WX_GRAPHICS_CONTEXT) add_definitions(-DUSE_WX_GRAPHICS_CONTEXT) endif() -if(KICAD_GAL) - add_definitions(-DKICAD_GAL) -endif() - # Allow user to override the default settings for adding images to menu items. By default # images in menu items are enabled on all platforms except OSX. This can be over ridden by # defining -DUSE_IMAGES_IN_MENUS=ON/OFF to force the preferred behavior. @@ -265,7 +257,6 @@ add_definitions(-DWX_COMPATIBILITY) find_package(OpenGL QUIET) check_find_package_result(OPENGL_FOUND "OpenGL") -if(KICAD_GAL) ##################### # Find GLEW library # ##################### @@ -277,7 +268,6 @@ check_find_package_result(GLEW_FOUND "GLEW") ###################### find_package(Cairo 1.8.1 QUIET) check_find_package_result(CAIRO_FOUND "Cairo") -endif(KICAD_GAL) ########################## # Download Boost library # diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 67bacb0530..95047eb3b0 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -11,7 +11,6 @@ include_directories( ${INC_AFTER} ) -if(KICAD_GAL) # Generate files containing shader programs add_custom_command ( OUTPUT gal/opengl/shader_src.h @@ -46,7 +45,6 @@ add_dependencies(gal ShaderHeader) if(WIN32) add_definitions(-DGLEW_STATIC) endif(WIN32) -endif(KICAD_GAL) set(COMMON_ABOUT_DLG_SRCS dialog_about/AboutDialog_main.cpp @@ -129,13 +127,11 @@ set(COMMON_SRCS zoom.cpp ) -if(KICAD_GAL) set(COMMON_SRCS ${COMMON_SRCS} view/view.cpp view/view_item.cpp ) -endif(KICAD_GAL) add_library(common STATIC ${COMMON_SRCS}) @@ -188,12 +184,10 @@ set(PCB_COMMON_SRCS fp_lib_table.cpp ) -if(KICAD_GAL) set(PCB_COMMON_SRCS ${PCB_COMMON_SRCS} ../pcbnew/pcb_painter.cpp ) -endif(KICAD_GAL) # add -DPCBNEW to compilation of these PCBNEW sources set_source_files_properties( ${PCB_COMMON_SRCS} PROPERTIES diff --git a/common/drawframe.cpp b/common/drawframe.cpp index 58df3c1766..a07399ab97 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -46,10 +46,8 @@ #include #include -#ifdef KICAD_GAL #include #include -#endif /* KICAD_GAL */ /** * Definition for enabling and disabling scroll bar setting trace output. See the @@ -236,14 +234,12 @@ void EDA_DRAW_FRAME::SkipNextLeftButtonReleaseEvent() void EDA_DRAW_FRAME::OnToggleGridState( wxCommandEvent& aEvent ) { SetGridVisibility( !IsGridVisible() ); -#ifdef KICAD_GAL if( m_galCanvasActive ) { m_galCanvas->GetGAL()->SetGridVisibility( IsGridVisible() ); m_galCanvas->Refresh(); } else -#endif /* KICAD_GAL */ m_canvas->Refresh(); } @@ -396,13 +392,12 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event ) m_LastGridSizeId = id - ID_POPUP_GRID_LEVEL_1000; screen->SetGrid( id ); screen->SetCrossHairPosition( screen->RefPos( true ) ); -#ifdef KICAD_GAL + if( m_galCanvasActive ) { KiGfx::GAL* gal = m_galCanvas->GetGAL(); gal->SetGridSize( VECTOR2D( screen->GetGrid().m_Size ) ); } -#endif /* KICAD_GAL */ Refresh(); } @@ -957,7 +952,6 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU ) void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) { -#ifdef KICAD_GAL KiGfx::VIEW* view = m_galCanvas->GetView(); KiGfx::GAL* gal = m_galCanvas->GetGAL(); @@ -1010,5 +1004,4 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) m_auimgr.Update(); m_galCanvasActive = aEnable; -#endif /* KICAD_GAL */ } diff --git a/common/zoom.cpp b/common/zoom.cpp index e23e718a73..a537256eea 100644 --- a/common/zoom.cpp +++ b/common/zoom.cpp @@ -84,9 +84,7 @@ void EDA_DRAW_FRAME::Zoom_Automatique( bool aWarpPointer ) if( screen->m_FirstRedraw ) screen->SetCrossHairPosition( screen->GetScrollCenterPosition() ); -#ifdef KICAD_GAL if( !m_galCanvasActive ) -#endif /* KICAD_GAL */ RedrawScreen( screen->GetScrollCenterPosition(), aWarpPointer ); } diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index c1563d7da5..5310be69a3 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -99,7 +99,6 @@ target_link_libraries(cvpcb ${GDI_PLUS_LIBRARIES} ) -if(KICAD_GAL) target_link_libraries(cvpcb gal ${GLEW_LIBRARIES} @@ -116,7 +115,6 @@ target_link_libraries(cvpcb bz2 ) endif(WIN32) -endif(KICAD_GAL) ### # Add cvpcb as install target diff --git a/include/base_struct.h b/include/base_struct.h index ef4c299914..9948f5b4d3 100644 --- a/include/base_struct.h +++ b/include/base_struct.h @@ -298,11 +298,7 @@ typedef unsigned STATUS_FLAGS; * is a base class for most all the KiCad significant classes, used in * schematics and boards. */ -#ifdef KICAD_GAL class EDA_ITEM : public KiGfx::VIEW_ITEM -#else -class EDA_ITEM -#endif { private: diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 08858bc2bd..94a2f03ad8 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -426,7 +426,6 @@ target_link_libraries(pcbnew ${PCBNEW_EXTRA_LIBS} ) -if(KICAD_GAL) target_link_libraries(pcbnew gal ${GLEW_LIBRARIES} @@ -443,7 +442,6 @@ target_link_libraries(pcbnew bz2 ) endif(WIN32) -endif(KICAD_GAL) ### # Add pcbnew as install target diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 28d5a7a35e..8c6cfb0018 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -52,9 +52,7 @@ #include #include #include -#ifdef KICAD_GAL #include -#endif // Configuration entry names. @@ -132,10 +130,8 @@ PCB_BASE_FRAME::PCB_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, m_FastGrid1 = 0; m_FastGrid2 = 0; -#ifdef KICAD_GAL m_galCanvas = new EDA_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize, EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL ); -#endif /* KICAD_GAL */ m_auxiliaryToolBar = NULL; } @@ -146,9 +142,7 @@ PCB_BASE_FRAME::~PCB_BASE_FRAME() delete m_Collector; delete m_Pcb; // is already NULL for FOOTPRINT_EDIT_FRAME -#ifdef KICAD_GAL delete m_galCanvas; -#endif /* KICAD_GAL */ } @@ -157,7 +151,6 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) delete m_Pcb; m_Pcb = aBoard; -#ifdef KICAD_GAL if( m_galCanvas ) { KiGfx::VIEW* view = m_galCanvas->GetView(); @@ -249,7 +242,6 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) m_galCanvas->Refresh(); } } -#endif } @@ -499,7 +491,6 @@ void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent ) { m_DisplayPadFill = DisplayOpt.DisplayPadFill = !m_DisplayPadFill; -#ifdef KICAD_GAL // Apply new display options to the GAL canvas KiGfx::PCB_PAINTER* painter = static_cast ( m_galCanvas->GetView()->GetPainter() ); @@ -511,7 +502,6 @@ void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent ) if( IsGalCanvasActive() ) m_galCanvas->Refresh(); else -#endif m_canvas->Refresh(); } diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index d928e0ee76..dbc070d3df 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -31,11 +31,10 @@ #include #include #include -#ifdef KICAD_GAL #include #include #include -#endif + #include #include #include // enum PCB_VISIBLE @@ -357,23 +356,19 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer ) // false from this function. myframe->setActiveLayer( aLayer, false ); -#ifdef KICAD_GAL // Set display settings for high contrast mode KiGfx::VIEW* view = myframe->GetGalCanvas()->GetView(); view->GetPainter()->GetSettings()->SetActiveLayer( aLayer ); view->UpdateAllLayersColor(); view->SetTopLayer( aLayer ); -#endif /* KICAD_GAL */ if( m_alwaysShowActiveCopperLayer ) OnLayerSelected(); else if(DisplayOpt.ContrastModeDisplay) { -#ifdef KICAD_GAL if( myframe->IsGalCanvasActive() ) myframe->GetGalCanvas()->Refresh(); else -#endif /* KICAD_GAL */ myframe->GetCanvas()->Refresh(); } @@ -409,22 +404,18 @@ void PCB_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool is brd->SetVisibleLayers( visibleLayers ); -#ifdef KICAD_GAL EDA_DRAW_PANEL_GAL *galCanvas = myframe->GetGalCanvas(); if( galCanvas ) { KiGfx::VIEW* view = galCanvas->GetView(); view->SetLayerVisible( aLayer, isVisible ); } -#endif /* KICAD_GAL */ if( isFinal ) { -#ifdef KICAD_GAL if( myframe->IsGalCanvasActive() ) galCanvas->Refresh(); else -#endif /* KICAD_GAL */ myframe->GetCanvas()->Refresh(); } } @@ -440,7 +431,6 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled ) BOARD* brd = myframe->GetBoard(); brd->SetElementVisibility( aId, isEnabled ); -#ifdef KICAD_GAL EDA_DRAW_PANEL_GAL *galCanvas = myframe->GetGalCanvas(); if( galCanvas ) { @@ -451,7 +441,6 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled ) if( myframe->IsGalCanvasActive() ) galCanvas->Refresh(); else -#endif /* KICAD_GAL */ myframe->GetCanvas()->Refresh(); } diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index 63bb4960df..6509399218 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -42,11 +42,9 @@ #include #include -#ifdef KICAD_GAL #include #include #include -#endif /* KICAD_GAL */ DIALOG_GENERALOPTIONS::DIALOG_GENERALOPTIONS( PCB_EDIT_FRAME* parent ) : DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE( parent ) @@ -161,13 +159,11 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) { int id = event.GetId(); bool state = event.IsChecked(); -#ifdef KICAD_GAL KiGfx::PCB_PAINTER* painter = static_cast ( m_galCanvas->GetView()->GetPainter() ); KiGfx::PCB_RENDER_SETTINGS* settings = static_cast ( painter->GetSettings() ); bool recache = false; -#endif /* KICAD_GAL */ switch( id ) { @@ -229,32 +225,27 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) case ID_TB_OPTIONS_SHOW_VIAS_SKETCH: m_DisplayViaFill = DisplayOpt.DisplayViaFill = !state; -#ifdef KICAD_GAL recache = true; if( !IsGalCanvasActive() ) -#endif /* KICAD_GAL */ m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_TRACKS_SKETCH: m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill = !state; -#ifdef KICAD_GAL recache = true; if( !IsGalCanvasActive() ) -#endif /* KICAD_GAL */ m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE: DisplayOpt.ContrastModeDisplay = state; -#ifdef KICAD_GAL + // Apply new display options to the GAL canvas (this is faster than recaching) settings->LoadDisplayOptions( DisplayOpt ); m_galCanvas->GetView()->EnableTopLayer( state ); m_galCanvas->GetView()->UpdateAllLayersColor(); if( !IsGalCanvasActive() ) -#endif /* KICAD_GAL */ m_canvas->Refresh(); break; @@ -281,7 +272,6 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) break; } -#ifdef KICAD_GAL if( recache ) { // Apply new display options to the GAL canvas @@ -291,5 +281,4 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) if( IsGalCanvasActive() ) m_galCanvas->Refresh(); -#endif /* KICAD_GAL */ } diff --git a/pcbnew/hotkeys.cpp b/pcbnew/hotkeys.cpp index 5cc75c4eb9..f4b338a7f1 100644 --- a/pcbnew/hotkeys.cpp +++ b/pcbnew/hotkeys.cpp @@ -82,7 +82,6 @@ static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ), HK_RESET_LOCAL_COORD, ' ' ); static EDA_HOTKEY HkSwitchHighContrastMode( wxT("Switch Highcontrast mode"), HK_SWITCH_HIGHCONTRAST_MODE,'H'); -#ifdef KICAD_GAL static EDA_HOTKEY HkCanvasDefault( wxT( "Switch to default canvas" ), HK_CANVAS_DEFAULT, GR_KB_ALT + WXK_F9 ); static EDA_HOTKEY HkCanvasOpenGL( wxT( "Switch to OpenGL canvas" ), @@ -91,7 +90,7 @@ static EDA_HOTKEY HkCanvasOpenGLShaders( wxT( "Switch to OpenGL canvas with shad HK_CANVAS_OPENGL_SHADERS, GR_KB_ALT + WXK_F11 ); static EDA_HOTKEY HkCanvasCairo( wxT( "Switch to Cairo canvas" ), HK_CANVAS_CAIRO, GR_KB_ALT + WXK_F12 ); -#endif + /* Fit on Screen */ #if !defined( __WXMAC__ ) static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME ); diff --git a/pcbnew/hotkeys.h b/pcbnew/hotkeys.h index 277f7e95eb..c96855c2a2 100644 --- a/pcbnew/hotkeys.h +++ b/pcbnew/hotkeys.h @@ -82,12 +82,10 @@ enum hotkey_id_commnand { HK_CALL_MACROS_9, HK_MACRO_ID_END, HK_SWITCH_HIGHCONTRAST_MODE, -#ifdef KICAD_GAL HK_CANVAS_DEFAULT, HK_CANVAS_OPENGL, HK_CANVAS_OPENGL_SHADERS, HK_CANVAS_CAIRO, -#endif }; // Full list of hotkey descriptors for board editor and footprint editor diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index c38c397dac..5f87f1d8cb 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -348,7 +348,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() _( "&List Nets" ), _( "View a list of nets with names and id's" ), KiBitmap( tools_xpm ) ); -#ifdef KICAD_GAL // Switching GAL-based canvas on/off viewMenu->AppendSeparator(); @@ -379,7 +378,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() AddMenuItem( viewMenu, ID_MENU_CANVAS_CAIRO, text, _( "Switch the canvas implementation to Cairo" ), KiBitmap( tools_xpm ) ); -#endif /** Create Place Menu **/ wxMenu* placeMenu = new wxMenu; diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 0582e1a070..53014d1dcb 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -62,9 +62,7 @@ #include #endif -#if defined(KICAD_GAL) #include -#endif // Keys used in read/write config #define OPTKEY_DEFAULT_LINEWIDTH_VALUE wxT( "PlotLineWidth_mm" ) @@ -598,7 +596,6 @@ void PCB_EDIT_FRAME::Show3D_Frame( wxCommandEvent& event ) void PCB_EDIT_FRAME::SwitchCanvas( wxCommandEvent& aEvent ) { -#ifdef KICAD_GAL int id = aEvent.GetId(); switch( id ) @@ -622,7 +619,6 @@ void PCB_EDIT_FRAME::SwitchCanvas( wxCommandEvent& aEvent ) UseGalCanvas( true ); break; } -#endif } From 14110cdea8044a688788889aa6b5682523c2eb06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Sumi=C5=84ski?= Date: Sun, 7 Jul 2013 18:55:23 +0200 Subject: [PATCH 140/415] Removed drawing hatch lines for polygons. --- pcbnew/pcb_painter.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 22293d1ad9..07ae0ef434 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -520,17 +520,6 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aContainer ) m_gal->DrawPolyline( corners ); corners.clear(); - // Draw the outline's hatch lines - std::vector::const_iterator hatch, hatch_end; - for( hatch = outline->m_HatchLines.begin(), hatch_end = outline->m_HatchLines.end(); - hatch != hatch_end; ++hatch ) - { - const VECTOR2D start = VECTOR2D( hatch->m_Start ); - const VECTOR2D end = VECTOR2D( hatch->m_End ); - - m_gal->DrawLine( start, end ); - } - // Draw the filling if( displayMode != PCB_RENDER_SETTINGS::DZ_HIDE_FILLED ) { From f067dc8b3215163ff7b5c7e3f4aa04df069d0f90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Sumi=C5=84ski?= Date: Sun, 7 Jul 2013 19:30:44 +0200 Subject: [PATCH 141/415] Added possibility to change zoom using toolbar in GAL. --- common/drawframe.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/common/drawframe.cpp b/common/drawframe.cpp index a07399ab97..eb17f432ac 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -426,7 +426,21 @@ void EDA_DRAW_FRAME::OnSelectZoom( wxCommandEvent& event ) return; GetScreen()->SetZoom( selectedZoom ); - RedrawScreen( GetScreen()->GetScrollCenterPosition(), false ); + + if( m_galCanvasActive ) + { + // Apply computed view settings to GAL + KiGfx::VIEW* view = m_galCanvas->GetView(); + KiGfx::GAL* gal = m_galCanvas->GetGAL(); + + double zoomFactor = gal->GetWorldScale() / gal->GetZoomFactor(); + double zoom = 1.0 / ( zoomFactor * GetZoom() ); + + view->SetScale( zoom ); + m_galCanvas->Refresh(); + } + else + RedrawScreen( GetScreen()->GetScrollCenterPosition(), false ); } } From 5a0f8019c7c1dab13ed5a0f74c0b4278c96867df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Sumi=C5=84ski?= Date: Sun, 7 Jul 2013 20:02:06 +0200 Subject: [PATCH 142/415] Removed some more KICAD_GAL ifdefs. --- pcbnew/dialogs/dialog_general_options.cpp | 6 ------ pcbnew/hotkeys.cpp | 2 -- 2 files changed, 8 deletions(-) diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index 6509399218..c066e2c3a7 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -198,28 +198,22 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) case ID_TB_OPTIONS_SHOW_ZONES: DisplayOpt.DisplayZonesMode = 0; -#ifdef KICAD_GAL recache = true; if( !IsGalCanvasActive() ) -#endif /* KICAD_GAL */ m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_ZONES_DISABLE: DisplayOpt.DisplayZonesMode = 1; -#ifdef KICAD_GAL recache = true; if( !IsGalCanvasActive() ) -#endif /* KICAD_GAL */ m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY: DisplayOpt.DisplayZonesMode = 2; -#ifdef KICAD_GAL recache = true; if( !IsGalCanvasActive() ) -#endif /* KICAD_GAL */ m_canvas->Refresh(); break; diff --git a/pcbnew/hotkeys.cpp b/pcbnew/hotkeys.cpp index f4b338a7f1..481db0168c 100644 --- a/pcbnew/hotkeys.cpp +++ b/pcbnew/hotkeys.cpp @@ -237,9 +237,7 @@ EDA_HOTKEY* board_edit_Hotkey_List[] = &HkRecordMacros6, &HkCallMacros6, &HkRecordMacros7, &HkCallMacros7, &HkRecordMacros8, &HkCallMacros8, &HkRecordMacros9, &HkCallMacros9, &HkSwitchHighContrastMode, -#ifdef KICAD_GAL &HkCanvasDefault, &HkCanvasCairo, &HkCanvasOpenGL, &HkCanvasOpenGLShaders, -#endif NULL }; From 85131e359e702f7cd9bbc82ef6fe30bd086304ec Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 8 Jul 2013 09:28:58 +0200 Subject: [PATCH 143/415] Added 'required layers' option for drawn items. --- common/view/view.cpp | 28 ++++++++++++++++++++++++---- common/view/view_item.cpp | 7 +++++++ include/view/view.h | 3 +++ include/view/view_item.h | 10 ++++++++++ 4 files changed, 44 insertions(+), 4 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index ab436c31fe..cf8678a254 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -454,13 +454,21 @@ struct VIEW::drawItem { GAL* gal = view->GetGAL(); + aItem->ViewGetRequiredLayers( layers, layersCount ); + + // Conditions that have te be fulfilled for an item to be drawn + bool drawCondition = aItem->ViewIsVisible() && + aItem->ViewGetLOD( currentLayer->id ) < view->m_scale && + view->isEveryLayerEnabled( layers, layersCount ); + if( !drawCondition ) + return; + if( currentLayer->cached ) { // Draw using cached information or create one int group = aItem->getGroup( currentLayer->id ); - if( group >= 0 && aItem->ViewIsVisible() && - aItem->ViewGetLOD( currentLayer->id ) < view->m_scale ) + if( group >= 0 ) { gal->DrawGroup( group ); } @@ -472,8 +480,7 @@ struct VIEW::drawItem gal->EndGroup(); } } - else if( aItem->ViewIsVisible() && - aItem->ViewGetLOD( currentLayer->id ) < view->m_scale ) + else { // Immediate mode view->m_painter->Draw( aItem, currentLayer->id ); @@ -482,6 +489,7 @@ struct VIEW::drawItem const VIEW_LAYER* currentLayer; VIEW* view; + int layersCount, layers[VIEW_MAX_LAYERS]; }; @@ -652,6 +660,18 @@ void VIEW::clearGroupCache() } +bool VIEW::isEveryLayerEnabled( const int aLayers[], int aCount ) const +{ + for( int i = 0; i < aCount; ++i ) + { + if( !m_layers.at( aLayers[i] ).enabled ) + return false; + } + + return true; +} + + void VIEW::RecacheAllItems( bool aImmediately ) { BOX2I r; diff --git a/common/view/view_item.cpp b/common/view/view_item.cpp index 266f7df186..8b53114a4c 100644 --- a/common/view/view_item.cpp +++ b/common/view/view_item.cpp @@ -48,6 +48,13 @@ void VIEW_ITEM::ViewSetVisible( bool aIsVisible ) } +void VIEW_ITEM::ViewGetRequiredLayers( int aLayers[], int& aCount ) const +{ + // By default there is no layer required + aCount = 0; +} + + void VIEW_ITEM::ViewUpdate( int aUpdateFlags, bool aForceImmediateRedraw ) { m_view->invalidateItem( this, aUpdateFlags ); diff --git a/include/view/view.h b/include/view/view.h index 7bb93fad15..c13ba6bf52 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -403,6 +403,9 @@ private: return i->renderingOrder > j->renderingOrder; } + /// Checks if every layer stored in aLayers array is enabled. + bool isEveryLayerEnabled( const int aLayers[], int aCount ) const; + /// Contains set of possible displayed layers and its properties LayerMap m_layers; diff --git a/include/view/view_item.h b/include/view/view_item.h index 7a3540ed38..00040e2455 100644 --- a/include/view/view_item.h +++ b/include/view/view_item.h @@ -207,6 +207,16 @@ public: */ virtual void ViewGetLayers( int aLayers[], int& aCount ) const = 0; + /** + * Function ViewGetRequiredLayers() + * Returns the all the layers that are required for an item to be drawn. Eg. there is no point + * to draw netnames, when the track is not visible - so track layer should be marked as + * required. + * @param aLayers[]: output layer index array + * @param aCount: number of layer indices in aLayers[] + */ + virtual void ViewGetRequiredLayers( int aLayers[], int& aCount ) const; + /** * Function ViewSetVisible() * Sets the item visibility. From fabb646a0b96a42607d59f891e41b7ab8eedbbd3 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 8 Jul 2013 09:57:23 +0200 Subject: [PATCH 144/415] Showing net names on tracks. --- include/layers_id_colors_and_visibility.h | 1 + pcbnew/basepcbframe.cpp | 9 ++- pcbnew/class_track.cpp | 40 +++++++++---- pcbnew/class_track.h | 9 +++ pcbnew/pcb_painter.cpp | 71 +++++++++++++++++------ pcbnew/pcb_painter.h | 2 +- 6 files changed, 102 insertions(+), 30 deletions(-) diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index 312d3d711b..65ebc1555d 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -214,6 +214,7 @@ enum PCB_VISIBLE MOD_REFERENCES_VISIBLE, ///< show modules references (when texts are visibles) TRACKS_VISIBLE, + TRACKS_NETNAMES_VISIBLE, PADS_VISIBLE, VIA_HOLES_VISIBLE, PAD_HOLES_VISIBLE, diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 8c6cfb0018..6587d5ab21 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -97,9 +97,10 @@ const int m_galLayerOrder[] = ITEM_GAL_LAYER( VIA_HOLES_VISIBLE ), ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), - ITEM_GAL_LAYER( PAD_FR_VISIBLE ), LAYER_N_FRONT, LAYER_N_15, LAYER_N_14, LAYER_N_13, + ITEM_GAL_LAYER( TRACKS_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ), + LAYER_N_FRONT, LAYER_N_15, LAYER_N_14, LAYER_N_13, LAYER_N_12, LAYER_N_11, LAYER_N_10, LAYER_N_9, LAYER_N_8, LAYER_N_7, LAYER_N_6, - LAYER_N_5, LAYER_N_4, LAYER_N_3, LAYER_N_2, ITEM_GAL_LAYER( PAD_BK_VISIBLE ), LAYER_N_BACK, + LAYER_N_5, LAYER_N_4, LAYER_N_3, LAYER_N_2, LAYER_N_BACK, ITEM_GAL_LAYER( PAD_BK_VISIBLE ), SOLDERMASK_N_BACK, ADHESIVE_N_BACK, SOLDERPASTE_N_BACK, SILKSCREEN_N_BACK, ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ) @@ -223,6 +224,10 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) view->SetLayerOrder( m_galLayerOrder[i], i ); } + // Netnames are drawn only when scale is sufficient (level of details) + // so there is no point in caching them + view->SetLayerCached( ITEM_GAL_LAYER( TRACKS_NETNAMES_VISIBLE ), false ); + // Load layer & elements visibility settings for( unsigned int i = 0; i < NB_LAYERS; ++i ) { diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index d145f8b93e..df77567834 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -749,6 +749,36 @@ void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, } +void TRACK::ViewGetLayers( int aLayers[], int& aCount ) const +{ + // Show the track and its netname on different layers + aLayers[0] = GetLayer(); + aLayers[1] = ITEM_GAL_LAYER( TRACKS_NETNAMES_VISIBLE ); + aCount = 2; +} + + +void TRACK::ViewGetRequiredLayers( int aLayers[], int& aCount ) const +{ + // The only required layer is the track layer itself + aLayers[0] = GetLayer(); + aCount = 1; +} + + +unsigned int TRACK::ViewGetLOD( int aLayer ) const +{ + // Netnames will be shown only if zoom is appropriate + if( aLayer == ITEM_GAL_LAYER( TRACKS_NETNAMES_VISIBLE ) ) + { + return ( 20000000 / m_Width ); + } + + // Other layers are shown without any conditions + return 0; +} + + void SEGVIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, const wxPoint& aOffset ) { @@ -964,16 +994,6 @@ void SEGVIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode, void SEGVIA::ViewGetLayers( int aLayers[], int& aCount ) const { - /*int top_layer, bottom_layer; - ReturnLayerPair( &top_layer, &bottom_layer ); - - // We can add vias to all layers they belong, but then they are drawn this many times - aCount = 0; - for( int i = bottom_layer; i <= top_layer; ++i ) - { - aLayers[aCount++] = i; - }*/ - // Just show it on common via & via holes layers aLayers[0] = ITEM_GAL_LAYER( VIAS_VISIBLE ); aLayers[1] = ITEM_GAL_LAYER( VIA_HOLES_VISIBLE ); diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index 7a32f9b80e..87ea39f3f0 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -328,6 +328,15 @@ public: virtual EDA_ITEM* Clone() const; + /// @copydoc VIEW_ITEM::ViewGetLayers() + virtual void ViewGetLayers( int aLayers[], int& aCount ) const; + + /// @copydoc VIEW_ITEM::ViewGetRequiredLayers() + virtual void ViewGetRequiredLayers( int aLayers[], int& aCount ) const; + + /// @copydoc VIEW_ITEM::ViewGetLOD() + virtual unsigned int ViewGetLOD( int aLayer ) const; + #if defined (DEBUG) virtual void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 07ae0ef434..5d8eff4d35 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -23,6 +23,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#include #include #include #include @@ -33,6 +34,7 @@ #include #include #include +#include #include #include @@ -65,10 +67,12 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings m_itemColors[i] = m_legacyColorMap[aSettings->GetItemColor( i )]; } - m_itemColors[VIA_HOLES_VISIBLE] = COLOR4D( 0.5, 0.4, 0.0, 1.0 ); - m_itemColors[PAD_HOLES_VISIBLE] = COLOR4D( 0.0, 0.5, 0.5, 1.0 ); - m_itemColors[VIAS_VISIBLE] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); - m_itemColors[PADS_VISIBLE] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); + // Default colors for specific layers + m_itemColors[VIA_HOLES_VISIBLE] = COLOR4D( 0.5, 0.4, 0.0, 1.0 ); + m_itemColors[PAD_HOLES_VISIBLE] = COLOR4D( 0.0, 0.5, 0.5, 1.0 ); + m_itemColors[VIAS_VISIBLE] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); + m_itemColors[PADS_VISIBLE] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); + m_itemColors[TRACKS_NETNAMES_VISIBLE] = COLOR4D( 0.9, 0.9, 0.9, 1.0 ); Update(); } @@ -200,7 +204,7 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) { case PCB_ZONE_T: case PCB_TRACE_T: - draw( (TRACK*) aItem ); + draw( (TRACK*) aItem, aLayer ); break; case PCB_VIA_T: @@ -246,30 +250,63 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) } -void PCB_PAINTER::draw( const TRACK* aTrack ) +void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) { VECTOR2D start( aTrack->GetStart() ); VECTOR2D end( aTrack->GetEnd() ); int width = aTrack->GetWidth(); - COLOR4D color = getLayerColor( aTrack->GetLayer(), aTrack->GetNet() ); + int netNumber = aTrack->GetNet(); + COLOR4D color = getLayerColor( aLayer, netNumber ); m_gal->SetStrokeColor( color ); - m_gal->SetIsStroke( true ); - if( m_pcbSettings->m_sketchModeSelect[TRACKS_VISIBLE] ) + if( aLayer == ITEM_GAL_LAYER( TRACKS_NETNAMES_VISIBLE) ) { - // Outline mode - m_gal->SetLineWidth( m_pcbSettings->m_outlineWidth ); - m_gal->SetIsFill( false ); + // If there is a net name - display it on the track + if( netNumber != 0 ) + { + VECTOR2D line = ( end - start ); + double length = line.EuclideanNorm(); + + // Check if the track is long enough to have a netname displayed + if( length < 10 * width ) + return; + + NETINFO_ITEM* net = ( (BOARD*) aTrack->GetParent() )->FindNet( netNumber ); + std::string netName = std::string( net->GetShortNetname().mb_str() ); + VECTOR2D textPosition = start + line / 2.0; // center of the track + double textOrientation = -atan( line.y / line.x ); + double textSize = std::min( static_cast( width ), length / netName.length() ); + + m_gal->SetLineWidth( width / 10.0 ); + m_gal->SetBold( false ); + m_gal->SetItalic( false ); + m_gal->SetMirrored( false ); + m_gal->SetGlyphSize( VECTOR2D( textSize * 0.7, textSize * 0.7 ) ); + m_gal->SetHorizontalJustify( GR_TEXT_HJUSTIFY_CENTER ); + m_gal->SetVerticalJustify( GR_TEXT_VJUSTIFY_CENTER ); + m_gal->StrokeText( netName, textPosition, textOrientation ); + } } else { - // Filled mode - m_gal->SetFillColor( color ); - m_gal->SetIsFill( true ); - } + // Draw a regular track + m_gal->SetIsStroke( true ); - m_gal->DrawSegment( start, end, width ); + if( m_pcbSettings->m_sketchModeSelect[TRACKS_VISIBLE] ) + { + // Outline mode + m_gal->SetLineWidth( m_pcbSettings->m_outlineWidth ); + m_gal->SetIsFill( false ); + } + else + { + // Filled mode + m_gal->SetFillColor( color ); + m_gal->SetIsFill( true ); + } + m_gal->DrawSegment( start, end, width ); + } } diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 3e92143ba0..56bc7be35a 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -149,7 +149,7 @@ protected: const COLOR4D& getItemColor( int aItemType, int aNetCode ) const; // Drawing functions for various types of PCB-specific items - void draw( const TRACK* ); + void draw( const TRACK*, int ); void draw( const SEGVIA*, int ); void draw( const D_PAD*, int ); void draw( const DRAWSEGMENT* ); From 81143324a5e2a19a181c41fe529789ac647acffd Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 8 Jul 2013 11:30:50 +0200 Subject: [PATCH 145/415] Showing net names on pads. --- include/layers_id_colors_and_visibility.h | 5 +- pcbnew/basepcbframe.cpp | 4 +- pcbnew/class_pad.cpp | 44 ++++++++++---- pcbnew/class_pad.h | 6 ++ pcbnew/class_track.cpp | 2 +- pcbnew/pcb_painter.cpp | 70 +++++++++++++++++++++-- pcbnew/pcb_painter.h | 2 + 7 files changed, 114 insertions(+), 19 deletions(-) diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index 65ebc1555d..b150666ee9 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -216,8 +216,9 @@ enum PCB_VISIBLE TRACKS_VISIBLE, TRACKS_NETNAMES_VISIBLE, PADS_VISIBLE, - VIA_HOLES_VISIBLE, - PAD_HOLES_VISIBLE, + PADS_NETNAMES_VISIBLE, + PADS_HOLES_VISIBLE, + VIAS_HOLES_VISIBLE, END_PCB_VISIBLE_LIST // sentinel }; diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 6587d5ab21..e37983e063 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -94,7 +94,8 @@ const int m_galLayerOrder[] = ITEM_GAL_LAYER( MOD_REFERENCES_VISIBLE), ITEM_GAL_LAYER( MOD_VALUES_VISIBLE ), SILKSCREEN_N_FRONT, SOLDERPASTE_N_FRONT, ADHESIVE_N_FRONT, SOLDERMASK_N_FRONT, - ITEM_GAL_LAYER( VIA_HOLES_VISIBLE ), ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ), + ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), + ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), ITEM_GAL_LAYER( TRACKS_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ), @@ -227,6 +228,7 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) // Netnames are drawn only when scale is sufficient (level of details) // so there is no point in caching them view->SetLayerCached( ITEM_GAL_LAYER( TRACKS_NETNAMES_VISIBLE ), false ); + view->SetLayerCached( ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), false ); // Load layer & elements visibility settings for( unsigned int i = 0; i < NB_LAYERS; ++i ) diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index caf911f43f..a6bb82f0c7 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -746,36 +746,36 @@ EDA_ITEM* D_PAD::Clone() const void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const { - if( m_Attribute == PAD_SMD || m_Attribute == PAD_CONN) + aCount = 0; + + if( m_Attribute == PAD_SMD || m_Attribute == PAD_CONN ) { // Single layer pad (smd) without hole if( IsOnLayer( LAYER_N_FRONT ) ) - aLayers[0] = ITEM_GAL_LAYER( PAD_FR_VISIBLE ); + aLayers[aCount++] = ITEM_GAL_LAYER( PAD_FR_VISIBLE ); else if( IsOnLayer( LAYER_N_BACK ) ) - aLayers[0] = ITEM_GAL_LAYER( PAD_BK_VISIBLE ); + aLayers[aCount++] = ITEM_GAL_LAYER( PAD_BK_VISIBLE ); #ifdef __WXDEBUG__ else // Should not occur { wxLogWarning( wxT("D_PAD::ViewGetLayers():PAD on layer different than FRONT/BACK") ); } #endif - - aCount = 1; } else { if( IsOnLayer( LAYER_N_FRONT ) && IsOnLayer( LAYER_N_BACK ) ) { // Multi layer pad - aLayers[0] = ITEM_GAL_LAYER( PADS_VISIBLE ); + aLayers[aCount++] = ITEM_GAL_LAYER( PADS_VISIBLE ); } else if( IsOnLayer( LAYER_N_FRONT ) ) { - aLayers[0] = ITEM_GAL_LAYER( PAD_FR_VISIBLE ); + aLayers[aCount++] = ITEM_GAL_LAYER( PAD_FR_VISIBLE ); } else if( IsOnLayer( LAYER_N_BACK ) ) { - aLayers[0] = ITEM_GAL_LAYER( PAD_BK_VISIBLE ); + aLayers[aCount++] = ITEM_GAL_LAYER( PAD_BK_VISIBLE ); } #ifdef __WXDEBUG__ else // Should not occur @@ -785,9 +785,31 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const #endif // Draw a hole - aLayers[1] = ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ); - - aCount = 2; + aLayers[aCount++] = ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ); } + + // Pad description layer (number & net) + aLayers[aCount++] = ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ); } + +void D_PAD::ViewGetRequiredLayers( int aLayers[], int& aCount ) const +{ + ViewGetLayers( aLayers, aCount ); + + // Remove pad description layer from the required layers group + aCount--; +} + + +unsigned int D_PAD::ViewGetLOD( int aLayer ) const +{ + // Netnames will be shown only if zoom is appropriate + if( aLayer == ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ) ) + { + return ( 100000000 / std::max( m_Size.x, m_Size.y ) ); + } + + // Other layers are shown without any conditions + return 0; +} diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index f220b39587..e5ff1b42bd 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -433,6 +433,12 @@ public: /// @copydoc VIEW_ITEM::ViewGetLayers() virtual void ViewGetLayers( int aLayers[], int& aCount ) const; + /// @copydoc VIEW_ITEM::ViewGetRequiredLayers() + virtual void ViewGetRequiredLayers( int aLayers[], int& aCount ) const; + + /// @copydoc VIEW_ITEM::ViewGetLOD() + virtual unsigned int ViewGetLOD( int aLayer ) const; + /** * Function CopyNetlistSettings * copies the netlist settings to \a aPad. diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index df77567834..784556c814 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -996,7 +996,7 @@ void SEGVIA::ViewGetLayers( int aLayers[], int& aCount ) const { // Just show it on common via & via holes layers aLayers[0] = ITEM_GAL_LAYER( VIAS_VISIBLE ); - aLayers[1] = ITEM_GAL_LAYER( VIA_HOLES_VISIBLE ); + aLayers[1] = ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ); aCount = 2; } diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 5d8eff4d35..3bf4a722de 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -68,8 +68,8 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings } // Default colors for specific layers - m_itemColors[VIA_HOLES_VISIBLE] = COLOR4D( 0.5, 0.4, 0.0, 1.0 ); - m_itemColors[PAD_HOLES_VISIBLE] = COLOR4D( 0.0, 0.5, 0.5, 1.0 ); + m_itemColors[VIAS_HOLES_VISIBLE] = COLOR4D( 0.5, 0.4, 0.0, 1.0 ); + m_itemColors[PADS_HOLES_VISIBLE] = COLOR4D( 0.0, 0.5, 0.5, 1.0 ); m_itemColors[VIAS_VISIBLE] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); m_itemColors[PADS_VISIBLE] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); m_itemColors[TRACKS_NETNAMES_VISIBLE] = COLOR4D( 0.9, 0.9, 0.9, 1.0 ); @@ -321,7 +321,7 @@ void PCB_PAINTER::draw( const SEGVIA* aVia, int aLayer ) { radius = aVia->GetWidth() / 2.0; } - else if( aLayer == ITEM_GAL_LAYER( VIA_HOLES_VISIBLE ) ) + else if( aLayer == ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ) ) { radius = aVia->GetDrillValue() / 2.0; } @@ -354,11 +354,73 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) { COLOR4D color; VECTOR2D size; + VECTOR2D position( aPad->GetPosition() ); PAD_SHAPE_T shape; double m, n; + double orientation = aPad->GetOrientation(); + NORMALIZE_ANGLE_90( orientation ); // do not display descriptions upside down + orientation = orientation * M_PI / 1800.0; color = getLayerColor( aLayer, aPad->GetNet() ); + // Draw description layer + if( aLayer == ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ) ) + { + size = VECTOR2D( aPad->GetSize() / 2 ); + + // Font size limits + if( size.x > PCB_RENDER_SETTINGS::MAX_FONT_SIZE ) + size.x = PCB_RENDER_SETTINGS::MAX_FONT_SIZE; + if( size.y > PCB_RENDER_SETTINGS::MAX_FONT_SIZE ) + size.y = PCB_RENDER_SETTINGS::MAX_FONT_SIZE; + + // Keep the size ratio for the font, but make it smaller + if( size.x < size.y ) + { + orientation -= M_PI / 2; + size.y = size.x * 4.0 / 3.0; + } + else + { + size.x = size.y * 3.0 / 4.0; + } + + m_gal->Save(); + m_gal->Translate( position ); + m_gal->Rotate( -orientation ); + + // Default font settings + m_gal->SetHorizontalJustify( GR_TEXT_HJUSTIFY_CENTER ); + m_gal->SetVerticalJustify( GR_TEXT_VJUSTIFY_CENTER ); + m_gal->SetBold( false ); + m_gal->SetItalic( false ); + m_gal->SetMirrored( false ); + m_gal->SetStrokeColor( color ); + + // Let's make some space for a netname too, if there's one to display + if( !aPad->GetNetname().empty() ) + { + size = size / 2.0; + m_gal->SetGlyphSize( size ); + m_gal->SetLineWidth( size.y / 10.0 ); + + m_gal->StrokeText( std::string( aPad->GetNetname().mb_str() ), + VECTOR2D( 0, size.y ), 0.0 ); + m_gal->Translate( VECTOR2D( 0.0, -size.y / 2.0 ) ); + } + else + { + // In case when there's no netname assigned + m_gal->SetGlyphSize( size ); + m_gal->SetLineWidth( size.y / 10.0 ); + } + + m_gal->StrokeText( std::string( aPad->GetPadName().mb_str() ), VECTOR2D( 0, 0 ), 0.0 ); + + m_gal->Restore(); + return; + } + if( m_pcbSettings->m_sketchModeSelect[PADS_VISIBLE] ) { // Outline mode @@ -380,7 +442,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) m_gal->Rotate( -aPad->GetOrientation() * M_PI / 1800.0 ); // orientation is in tenths of degree // Choose drawing settings depending on if we are drawing a pad itself or a hole - if( aLayer == ITEM_GAL_LAYER( PAD_HOLES_VISIBLE ) ) + if( aLayer == ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ) ) { // Drawing hole size = VECTOR2D( aPad->GetDrillSize() ) / 2.0; diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 56bc7be35a..a9ebbc830c 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -105,6 +105,8 @@ protected: bool m_visibleLayers [NB_LAYERS]; bool m_visibleItems [END_PCB_VISIBLE_LIST]; + static const double MAX_FONT_SIZE = 1500000; + DisplayZonesMode m_displayZoneMode; }; From 3e140ddcfe33beaef22ae1ec7ab278630464ae86 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 8 Jul 2013 13:57:09 +0200 Subject: [PATCH 146/415] Lighter pads & tracks net names color. Proper rotation of text on symmetrical pads. --- pcbnew/pcb_painter.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 3bf4a722de..00beb48e59 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -68,11 +68,12 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings } // Default colors for specific layers - m_itemColors[VIAS_HOLES_VISIBLE] = COLOR4D( 0.5, 0.4, 0.0, 1.0 ); - m_itemColors[PADS_HOLES_VISIBLE] = COLOR4D( 0.0, 0.5, 0.5, 1.0 ); + m_itemColors[VIAS_HOLES_VISIBLE] = COLOR4D( 0.5, 0.4, 0.0, 1.0 ); + m_itemColors[PADS_HOLES_VISIBLE] = COLOR4D( 0.0, 0.5, 0.5, 1.0 ); m_itemColors[VIAS_VISIBLE] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); m_itemColors[PADS_VISIBLE] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); - m_itemColors[TRACKS_NETNAMES_VISIBLE] = COLOR4D( 0.9, 0.9, 0.9, 1.0 ); + m_itemColors[PADS_NETNAMES_VISIBLE] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); + m_itemColors[TRACKS_NETNAMES_VISIBLE] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); Update(); } @@ -380,6 +381,11 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) orientation -= M_PI / 2; size.y = size.x * 4.0 / 3.0; } + else if( size.x == size.y ) + { + // If the text is displayed on a symmetrical pad, do not rotate it + orientation = 0.0; + } else { size.x = size.y * 3.0 / 4.0; From 30f19be5558b71d69309a3cc911c61354d2ba0f1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 8 Jul 2013 14:06:45 +0200 Subject: [PATCH 147/415] Fixed 'disappearing via' issue. --- pcbnew/class_track.cpp | 8 ++++++++ pcbnew/class_track.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 784556c814..54ab04e58c 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -1001,6 +1001,14 @@ void SEGVIA::ViewGetLayers( int aLayers[], int& aCount ) const } +void SEGVIA::ViewGetRequiredLayers( int aLayers[], int& aCount ) const +{ + // The only required layer is via itself, holes are optional + aLayers[0] = ITEM_GAL_LAYER( VIAS_VISIBLE ); + aCount = 1; +} + + // see class_track.h void TRACK::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) { diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index 87ea39f3f0..bbacb4e3aa 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -424,6 +424,9 @@ public: /// @copydoc VIEW_ITEM::ViewGetLayers() virtual void ViewGetLayers( int aLayers[], int& aCount ) const; + /// @copydoc VIEW_ITEM::ViewGetRequiredLayers() + virtual void ViewGetRequiredLayers( int aLayers[], int& aCount ) const; + #if defined (DEBUG) virtual void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override #endif From 7d9d2e508de3683b111c1c2f6ce53ac8c86f40fe Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 8 Jul 2013 15:24:44 +0200 Subject: [PATCH 148/415] Remove updating of non-cached layers. --- common/view/view.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index cf8678a254..7528009d6c 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -314,9 +314,9 @@ struct VIEW::updateItemsColor // Obtain the color that should be used for coloring the item const COLOR4D color = painter->GetColor( aItem, layer ); int group = aItem->getGroup( layer ); - wxASSERT( group >= 0 ); - gal->ChangeGroupColor( group, color ); + if( group > 0) + gal->ChangeGroupColor( group, color ); } int layer; @@ -327,6 +327,10 @@ struct VIEW::updateItemsColor void VIEW::UpdateLayerColor( int aLayer ) { + // There is no point in updating non-cached layers + if( !m_layers[aLayer].cached ) + return; + BOX2I r; r.SetMaximum(); @@ -345,8 +349,12 @@ void VIEW::UpdateAllLayersColor() for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) { VIEW_LAYER* l = &( ( *i ).second ); - updateItemsColor visitor( l->id, m_painter, m_gal ); + // There is no point in updating non-cached layers + if( !m_layers[l->id].cached ) + continue; + + updateItemsColor visitor( l->id, m_painter, m_gal ); l->items->Query( r, visitor ); } } @@ -374,6 +382,10 @@ struct VIEW::changeItemsDepth void VIEW::ChangeLayerDepth( int aLayer, int aDepth ) { + // There is no point in updating non-cached layers + if( !m_layers[aLayer].cached ) + return; + BOX2I r; r.SetMaximum(); From 209bb4290f56d17989daad2badaf64bf7a6a6e1e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 8 Jul 2013 16:46:04 +0200 Subject: [PATCH 149/415] Separate layers for each copper layer netnames. --- include/layers_id_colors_and_visibility.h | 52 ++++++++++++++++++++++- pcbnew/basepcbframe.cpp | 27 +++++++++--- pcbnew/class_track.cpp | 4 +- pcbnew/pcb_painter.cpp | 12 ++++-- 4 files changed, 83 insertions(+), 12 deletions(-) diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index b150666ee9..6bb09417c5 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -214,15 +214,35 @@ enum PCB_VISIBLE MOD_REFERENCES_VISIBLE, ///< show modules references (when texts are visibles) TRACKS_VISIBLE, - TRACKS_NETNAMES_VISIBLE, PADS_VISIBLE, - PADS_NETNAMES_VISIBLE, PADS_HOLES_VISIBLE, VIAS_HOLES_VISIBLE, + // Netname layers + LAYER_1_NETNAMES_VISIBLE, // Bottom layer + LAYER_2_NETNAMES_VISIBLE, + LAYER_3_NETNAMES_VISIBLE, + LAYER_4_NETNAMES_VISIBLE, + LAYER_5_NETNAMES_VISIBLE, + LAYER_6_NETNAMES_VISIBLE, + LAYER_7_NETNAMES_VISIBLE, + LAYER_8_NETNAMES_VISIBLE, + LAYER_9_NETNAMES_VISIBLE, + LAYER_10_NETNAMES_VISIBLE, + LAYER_11_NETNAMES_VISIBLE, + LAYER_12_NETNAMES_VISIBLE, + LAYER_13_NETNAMES_VISIBLE, + LAYER_14_NETNAMES_VISIBLE, + LAYER_15_NETNAMES_VISIBLE, + LAYER_16_NETNAMES_VISIBLE, // Top layer + PADS_NETNAMES_VISIBLE, + END_PCB_VISIBLE_LIST // sentinel }; +#define FIRST_NETNAME_LAYER ITEM_GAL_LAYER( LAYER_1_NETNAMES_VISIBLE ) +#define LAST_NETNAME_LAYER ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ) + /// macro for obtaining layer number for specific item (eg. pad or text) #define ITEM_GAL_LAYER(layer) (NB_LAYERS + layer) @@ -338,4 +358,32 @@ LAYER_NUM ExtractLayer( LAYER_MSK aMask ); */ wxString LayerMaskDescribe( const BOARD *aBoard, LAYER_MSK aMask ); +/** + * Returns a netname layer corresponding to the given layer. + */ +inline LAYER_NUM GetNetnameLayer( LAYER_NUM aLayer ) +{ + if( IsCopperLayer( aLayer ) ) + { + // Compute the offset in description layers + return FIRST_NETNAME_LAYER + ( aLayer - FIRST_COPPER_LAYER ); + } + else if( aLayer == ITEM_GAL_LAYER( PADS_VISIBLE ) ) + return ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ); + + // Fallback + return COMMENT_N; +} + +/** + * Function IsCopperLayer + * tests whether a layer is a netname layer + * @param aLayer = Layer to test + * @return true if aLayer is a valid netname layer + */ +inline bool IsNetnameLayer( LAYER_NUM aLayer ) +{ + return aLayer >= FIRST_NETNAME_LAYER && aLayer <= LAST_NETNAME_LAYER; +} + #endif // _LAYERS_ID_AND_VISIBILITY_H_ diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index e37983e063..e8accd2d7f 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -98,10 +98,24 @@ const int m_galLayerOrder[] = ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), - ITEM_GAL_LAYER( TRACKS_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ), - LAYER_N_FRONT, LAYER_N_15, LAYER_N_14, LAYER_N_13, - LAYER_N_12, LAYER_N_11, LAYER_N_10, LAYER_N_9, LAYER_N_8, LAYER_N_7, LAYER_N_6, - LAYER_N_5, LAYER_N_4, LAYER_N_3, LAYER_N_2, LAYER_N_BACK, ITEM_GAL_LAYER( PAD_BK_VISIBLE ), + ITEM_GAL_LAYER( PAD_FR_VISIBLE ), + ITEM_GAL_LAYER( LAYER_16_NETNAMES_VISIBLE ), LAYER_N_FRONT, + ITEM_GAL_LAYER( LAYER_15_NETNAMES_VISIBLE ), LAYER_N_15, + ITEM_GAL_LAYER( LAYER_14_NETNAMES_VISIBLE ), LAYER_N_14, + ITEM_GAL_LAYER( LAYER_13_NETNAMES_VISIBLE ), LAYER_N_13, + ITEM_GAL_LAYER( LAYER_12_NETNAMES_VISIBLE ), LAYER_N_12, + ITEM_GAL_LAYER( LAYER_11_NETNAMES_VISIBLE ), LAYER_N_11, + ITEM_GAL_LAYER( LAYER_10_NETNAMES_VISIBLE ), LAYER_N_10, + ITEM_GAL_LAYER( LAYER_9_NETNAMES_VISIBLE ), LAYER_N_9, + ITEM_GAL_LAYER( LAYER_8_NETNAMES_VISIBLE ), LAYER_N_8, + ITEM_GAL_LAYER( LAYER_7_NETNAMES_VISIBLE ), LAYER_N_7, + ITEM_GAL_LAYER( LAYER_6_NETNAMES_VISIBLE ), LAYER_N_6, + ITEM_GAL_LAYER( LAYER_5_NETNAMES_VISIBLE ), LAYER_N_5, + ITEM_GAL_LAYER( LAYER_4_NETNAMES_VISIBLE ), LAYER_N_4, + ITEM_GAL_LAYER( LAYER_3_NETNAMES_VISIBLE ), LAYER_N_3, + ITEM_GAL_LAYER( LAYER_2_NETNAMES_VISIBLE ), LAYER_N_2, + ITEM_GAL_LAYER( LAYER_1_NETNAMES_VISIBLE ), LAYER_N_BACK, + ITEM_GAL_LAYER( PAD_BK_VISIBLE ), SOLDERMASK_N_BACK, ADHESIVE_N_BACK, SOLDERPASTE_N_BACK, SILKSCREEN_N_BACK, ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ) @@ -227,7 +241,10 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) // Netnames are drawn only when scale is sufficient (level of details) // so there is no point in caching them - view->SetLayerCached( ITEM_GAL_LAYER( TRACKS_NETNAMES_VISIBLE ), false ); + for( LAYER_NUM layer = FIRST_COPPER_LAYER; layer <= LAST_COPPER_LAYER; ++layer ) + { + view->SetLayerCached( GetNetnameLayer( layer ), false ); + } view->SetLayerCached( ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), false ); // Load layer & elements visibility settings diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index 05bd95d5c6..91029f30ae 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -754,7 +754,7 @@ void TRACK::ViewGetLayers( int aLayers[], int& aCount ) const { // Show the track and its netname on different layers aLayers[0] = GetLayer(); - aLayers[1] = ITEM_GAL_LAYER( TRACKS_NETNAMES_VISIBLE ); + aLayers[1] = GetNetnameLayer( aLayers[0] ); aCount = 2; } @@ -770,7 +770,7 @@ void TRACK::ViewGetRequiredLayers( int aLayers[], int& aCount ) const unsigned int TRACK::ViewGetLOD( int aLayer ) const { // Netnames will be shown only if zoom is appropriate - if( aLayer == ITEM_GAL_LAYER( TRACKS_NETNAMES_VISIBLE ) ) + if( aLayer == GetNetnameLayer( GetLayer() ) ) { return ( 20000000 / m_Width ); } diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 00beb48e59..d4221b49e6 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -73,7 +73,13 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings m_itemColors[VIAS_VISIBLE] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); m_itemColors[PADS_VISIBLE] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); m_itemColors[PADS_NETNAMES_VISIBLE] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); - m_itemColors[TRACKS_NETNAMES_VISIBLE] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); + // Netnames for copper layers + for( LAYER_NUM layer = FIRST_COPPER_LAYER; layer <= LAST_COPPER_LAYER; ++layer ) + { + // Quick, dirty hack, netnames layers should be stored in usual layers + m_itemColors[GetNetnameLayer( layer ) - NB_LAYERS] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); + } + Update(); } @@ -261,7 +267,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) m_gal->SetStrokeColor( color ); - if( aLayer == ITEM_GAL_LAYER( TRACKS_NETNAMES_VISIBLE) ) + if( IsNetnameLayer( aLayer ) ) { // If there is a net name - display it on the track if( netNumber != 0 ) @@ -289,7 +295,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) m_gal->StrokeText( netName, textPosition, textOrientation ); } } - else + else if( IsCopperLayer( aLayer )) { // Draw a regular track m_gal->SetIsStroke( true ); From ea436444f2f72dd6b8e5e0e8876c5552e40a753a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 8 Jul 2013 17:14:16 +0200 Subject: [PATCH 150/415] wxWidgets 2.8 compatibility fix. Scripting engine build fix. --- common/drawframe.cpp | 4 ++-- pcbnew/CMakeLists.txt | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/common/drawframe.cpp b/common/drawframe.cpp index fd0b8d5ee1..5681ceac03 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -396,7 +396,7 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event ) if( m_galCanvasActive ) { KiGfx::GAL* gal = m_galCanvas->GetGAL(); - gal->SetGridSize( VECTOR2D( screen->GetGrid().m_Size ) ); + gal->SetGridSize( VECTOR2D( screen->GetGrid().m_Size.x, screen->GetGrid().m_Size.y ) ); } Refresh(); @@ -990,7 +990,7 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) // Default grid color - dark cyan does not look good //gal->SetGridColor( KiGfx::COLOR4D( GetGridColor() ) ); gal->SetGridColor( KiGfx::COLOR4D( 0.1, 0.1, 0.1, 1.0 ) ); - gal->SetGridSize( VECTOR2D( screen->GetGridSize() ) ); + gal->SetGridSize( VECTOR2D( screen->GetGridSize().x, screen->GetGridSize().y ) ); gal->SetGridOrigin( VECTOR2D( screen->GetGridOrigin() ) ); gal->SetGridOriginMarkerSize( 15 ); gal->SetGridDrawThreshold( 10 ); diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index c0b82cc8cd..fa681e4faf 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -326,6 +326,9 @@ if (KICAD_SCRIPTING_MODULES) pcad2kicadpcb polygon bitmaps + gal + ${GLEW_LIBRARIES} + ${CAIRO_LIBRARIES} ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} ${GDI_PLUS_LIBRARIES} From 90d03c784c964d4adf62dffaf18500f90bac5713 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 8 Jul 2013 20:04:43 +0200 Subject: [PATCH 151/415] Dynamic font scaling for pads netnames. --- pcbnew/pcb_painter.cpp | 10 ++++++---- pcbnew/pcb_painter.h | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index d4221b49e6..9c08ee2251 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -374,12 +374,14 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) if( aLayer == ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ) ) { size = VECTOR2D( aPad->GetSize() / 2 ); + double scale = m_gal->GetZoomFactor(); + double maxSize = PCB_RENDER_SETTINGS::MAX_FONT_SIZE / scale; // Font size limits - if( size.x > PCB_RENDER_SETTINGS::MAX_FONT_SIZE ) - size.x = PCB_RENDER_SETTINGS::MAX_FONT_SIZE; - if( size.y > PCB_RENDER_SETTINGS::MAX_FONT_SIZE ) - size.y = PCB_RENDER_SETTINGS::MAX_FONT_SIZE; + if( size.x > maxSize ) + size.x = maxSize; + if( size.y > maxSize ) + size.y = maxSize; // Keep the size ratio for the font, but make it smaller if( size.x < size.y ) diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index a9ebbc830c..bc673661ad 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -105,7 +105,7 @@ protected: bool m_visibleLayers [NB_LAYERS]; bool m_visibleItems [END_PCB_VISIBLE_LIST]; - static const double MAX_FONT_SIZE = 1500000; + static const double MAX_FONT_SIZE = 100000000; DisplayZonesMode m_displayZoneMode; }; From c9f9db906964df6951a4c9ea42bdfbd57599eac4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 8 Jul 2013 20:42:46 +0200 Subject: [PATCH 152/415] Dynamic color setting for netnames. --- include/gal/color4d.h | 11 +++++++++++ pcbnew/pcb_painter.cpp | 24 ++++++++++++++++++------ 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/include/gal/color4d.h b/include/gal/color4d.h index f11f6487db..64616239e6 100644 --- a/include/gal/color4d.h +++ b/include/gal/color4d.h @@ -132,6 +132,17 @@ public: a ); } + /** + * Function GetBrightness + * Returns the brightness value of the color ranged from 0.0 to 1.0. + * @return The brightness value. + */ + double GetBrightness() const + { + // Weighted W3C formula + return ( r * 0.299 + g * 0.587 + b * 0.117 ); + } + /// @brief Equality operator, are two colors equal const bool operator==( const COLOR4D& aColor ); diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 9c08ee2251..1efc19d092 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -263,9 +263,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) VECTOR2D end( aTrack->GetEnd() ); int width = aTrack->GetWidth(); int netNumber = aTrack->GetNet(); - COLOR4D color = getLayerColor( aLayer, netNumber ); - - m_gal->SetStrokeColor( color ); + COLOR4D color; if( IsNetnameLayer( aLayer ) ) { @@ -285,6 +283,13 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) double textOrientation = -atan( line.y / line.x ); double textSize = std::min( static_cast( width ), length / netName.length() ); + // Set a proper color for the label + color = getLayerColor( aTrack->GetLayer(), aTrack->GetNet() ); + if( color.GetBrightness() > 0.5 ) + m_gal->SetStrokeColor( color.Darkened( 0.8 ) ); + else + m_gal->SetStrokeColor( color.Highlighted( 0.8 ) ); + m_gal->SetLineWidth( width / 10.0 ); m_gal->SetBold( false ); m_gal->SetItalic( false ); @@ -298,6 +303,8 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) else if( IsCopperLayer( aLayer )) { // Draw a regular track + color = getLayerColor( aLayer, netNumber ); + m_gal->SetStrokeColor( color ); m_gal->SetIsStroke( true ); if( m_pcbSettings->m_sketchModeSelect[TRACKS_VISIBLE] ) @@ -368,8 +375,6 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) NORMALIZE_ANGLE_90( orientation ); // do not display descriptions upside down orientation = orientation * M_PI / 1800.0; - color = getLayerColor( aLayer, aPad->GetNet() ); - // Draw description layer if( aLayer == ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ) ) { @@ -409,7 +414,13 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) m_gal->SetBold( false ); m_gal->SetItalic( false ); m_gal->SetMirrored( false ); - m_gal->SetStrokeColor( color ); + + // Set a proper color for the label + color = getLayerColor( aPad->GetParent()->GetLayer(), aPad->GetNet() ); + if( color.GetBrightness() > 0.5 ) + m_gal->SetStrokeColor( color.Darkened( 0.8 ) ); + else + m_gal->SetStrokeColor( color.Highlighted( 0.8 ) ); // Let's make some space for a netname too, if there's one to display if( !aPad->GetNetname().empty() ) @@ -435,6 +446,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) return; } + color = getLayerColor( aLayer, aPad->GetNet() ); if( m_pcbSettings->m_sketchModeSelect[PADS_VISIBLE] ) { // Outline mode From 79a4f42ef937d3b22f121cc4b12b35bea6ab7c00 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 9 Jul 2013 10:00:23 +0200 Subject: [PATCH 153/415] Fixed multiline vertical strings drawing bug. --- common/gal/stroke_font.cpp | 29 ++++++++++++++--------------- include/gal/stroke_font.h | 2 ++ pcbnew/pcb_painter.cpp | 6 ++++++ 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp index bfae39c38a..643ac21b9d 100644 --- a/common/gal/stroke_font.cpp +++ b/common/gal/stroke_font.cpp @@ -140,21 +140,6 @@ BOX2D STROKE_FONT::computeBoundingBox( const Glyph& aGlyph, const VECTOR2D& aGly void STROKE_FONT::Draw( std::string aText, const VECTOR2D& aPosition, double aRotationAngle ) { - // Split multiline strings into separate ones and draw line by line - size_t newlinePos = aText.find( '\n' ); - - if( newlinePos != std::string::npos ) - { - VECTOR2D nextlinePosition( aPosition ); - nextlinePosition += VECTOR2D( 0.0, m_glyphSize.y * 1.6 ); // FIXME remove magic number - - Draw( aText.substr( newlinePos + 1 ), nextlinePosition, aRotationAngle ); - aText = aText.substr( 0, newlinePos ); - } - - // Compute the text size - VECTOR2D textsize = computeTextSize( aText ); - // By default overbar is turned off m_overbar = false; @@ -164,6 +149,20 @@ void STROKE_FONT::Draw( std::string aText, const VECTOR2D& aPosition, double aRo m_gal->Translate( aPosition ); m_gal->Rotate( -aRotationAngle ); + // Split multiline strings into separate ones and draw them line by line + size_t newlinePos = aText.find( '\n' ); + + if( newlinePos != std::string::npos ) + { + VECTOR2D nextlinePosition = VECTOR2D( 0.0, m_glyphSize.y * LINE_HEIGHT_RATIO ); + + Draw( aText.substr( newlinePos + 1 ), nextlinePosition, 0.0 ); + aText = aText.substr( 0, newlinePos ); + } + + // Compute the text size + VECTOR2D textsize = computeTextSize( aText ); + // Adjust the text position to the given alignment switch( m_horizontalJustify ) { diff --git a/include/gal/stroke_font.h b/include/gal/stroke_font.h index 5b35730d7a..7c58730d11 100644 --- a/include/gal/stroke_font.h +++ b/include/gal/stroke_font.h @@ -181,6 +181,8 @@ private: * @return is the text size. */ VECTOR2D computeTextSize( const std::string& aText ) const; + + static const double LINE_HEIGHT_RATIO = 1.6; }; } // namespace KiGfx diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 1efc19d092..dc3670e6ec 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -599,6 +599,9 @@ void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment ) void PCB_PAINTER::draw( const TEXTE_PCB* aText ) { + if( aText->GetText().Length() == 0 ) + return; + COLOR4D strokeColor = getLayerColor( aText->GetLayer(), 0 ); VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y ); double orientation = aText->GetOrientation() * M_PI / 1800.0; @@ -612,6 +615,9 @@ void PCB_PAINTER::draw( const TEXTE_PCB* aText ) void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) { + if( aText->GetLength() == 0 ) + return; + COLOR4D strokeColor = getLayerColor( aLayer, 0 ); VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y); double orientation = aText->GetDrawRotation() * M_PI / 1800.0; From e7dae3a9c165cacb1ca778b6b06fe6ea60b8572d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 16 Jul 2013 08:42:44 +0200 Subject: [PATCH 154/415] Fixind GLM headers problem. --- include/gal/opengl/glm/core/_detail.hpp | 950 +++--- include/gal/opengl/glm/core/_fixes.hpp | 110 +- include/gal/opengl/glm/core/_swizzle.hpp | 1672 +++++----- include/gal/opengl/glm/core/_swizzle_func.hpp | 1574 +++++----- include/gal/opengl/glm/core/_vectorize.hpp | 318 +- include/gal/opengl/glm/core/dummy.cpp | 80 +- include/gal/opengl/glm/core/func_common.hpp | 860 ++--- include/gal/opengl/glm/core/func_common.inl | 2394 +++++++------- .../gal/opengl/glm/core/func_exponential.hpp | 246 +- .../gal/opengl/glm/core/func_exponential.inl | 310 +- .../gal/opengl/glm/core/func_geometric.hpp | 276 +- .../gal/opengl/glm/core/func_geometric.inl | 644 ++-- include/gal/opengl/glm/core/func_integer.hpp | 402 +-- include/gal/opengl/glm/core/func_integer.inl | 1292 ++++---- include/gal/opengl/glm/core/func_matrix.hpp | 300 +- include/gal/opengl/glm/core/func_matrix.inl | 1164 +++---- include/gal/opengl/glm/core/func_noise.hpp | 174 +- include/gal/opengl/glm/core/func_noise.inl | 728 ++--- include/gal/opengl/glm/core/func_packing.hpp | 386 +-- include/gal/opengl/glm/core/func_packing.inl | 356 +-- .../opengl/glm/core/func_trigonometric.hpp | 406 +-- .../opengl/glm/core/func_trigonometric.inl | 488 +-- .../glm/core/func_vector_relational.hpp | 276 +- .../glm/core/func_vector_relational.inl | 356 +-- include/gal/opengl/glm/core/hint.hpp | 80 +- .../gal/opengl/glm/core/intrinsic_common.hpp | 178 +- .../gal/opengl/glm/core/intrinsic_common.inl | 626 ++-- .../opengl/glm/core/intrinsic_exponential.hpp | 158 +- .../opengl/glm/core/intrinsic_exponential.inl | 54 +- .../opengl/glm/core/intrinsic_geometric.hpp | 152 +- .../opengl/glm/core/intrinsic_geometric.inl | 292 +- .../gal/opengl/glm/core/intrinsic_matrix.hpp | 138 +- .../gal/opengl/glm/core/intrinsic_matrix.inl | 2140 ++++++------- .../glm/core/intrinsic_trigonometric.hpp | 96 +- .../glm/core/intrinsic_trigonometric.inl | 54 +- .../glm/core/intrinsic_vector_relational.hpp | 96 +- .../glm/core/intrinsic_vector_relational.inl | 730 ++--- include/gal/opengl/glm/core/setup.hpp | 1392 ++++----- include/gal/opengl/glm/core/type.hpp | 682 ++-- include/gal/opengl/glm/core/type_float.hpp | 168 +- include/gal/opengl/glm/core/type_gentype.hpp | 338 +- include/gal/opengl/glm/core/type_gentype.inl | 732 ++--- include/gal/opengl/glm/core/type_half.hpp | 236 +- include/gal/opengl/glm/core/type_half.inl | 842 ++--- include/gal/opengl/glm/core/type_int.hpp | 272 +- include/gal/opengl/glm/core/type_mat.hpp | 150 +- include/gal/opengl/glm/core/type_mat.inl | 54 +- include/gal/opengl/glm/core/type_mat2x2.hpp | 628 ++-- include/gal/opengl/glm/core/type_mat2x2.inl | 1400 ++++----- include/gal/opengl/glm/core/type_mat2x3.hpp | 516 +-- include/gal/opengl/glm/core/type_mat2x3.inl | 1290 ++++---- include/gal/opengl/glm/core/type_mat2x4.hpp | 520 ++-- include/gal/opengl/glm/core/type_mat2x4.inl | 1328 ++++---- include/gal/opengl/glm/core/type_mat3x2.hpp | 530 ++-- include/gal/opengl/glm/core/type_mat3x2.inl | 1364 ++++---- include/gal/opengl/glm/core/type_mat3x3.hpp | 636 ++-- include/gal/opengl/glm/core/type_mat3x3.inl | 1624 +++++----- include/gal/opengl/glm/core/type_mat3x4.hpp | 532 ++-- include/gal/opengl/glm/core/type_mat3x4.inl | 1424 ++++----- include/gal/opengl/glm/core/type_mat4x2.hpp | 540 ++-- include/gal/opengl/glm/core/type_mat4x2.inl | 1456 ++++----- include/gal/opengl/glm/core/type_mat4x3.hpp | 536 ++-- include/gal/opengl/glm/core/type_mat4x3.inl | 1474 ++++----- include/gal/opengl/glm/core/type_mat4x4.hpp | 640 ++-- include/gal/opengl/glm/core/type_mat4x4.inl | 1810 +++++------ include/gal/opengl/glm/core/type_size.hpp | 86 +- include/gal/opengl/glm/core/type_vec.hpp | 82 +- include/gal/opengl/glm/core/type_vec.inl | 54 +- include/gal/opengl/glm/core/type_vec1.hpp | 424 +-- include/gal/opengl/glm/core/type_vec1.inl | 1856 +++++------ include/gal/opengl/glm/core/type_vec2.hpp | 634 ++-- include/gal/opengl/glm/core/type_vec2.inl | 2056 ++++++------ include/gal/opengl/glm/core/type_vec3.hpp | 684 ++-- include/gal/opengl/glm/core/type_vec3.inl | 2304 +++++++------- include/gal/opengl/glm/core/type_vec4.hpp | 798 ++--- include/gal/opengl/glm/core/type_vec4.inl | 2756 ++++++++--------- include/gal/opengl/glm/ext.hpp | 290 +- include/gal/opengl/glm/glm.hpp | 258 +- include/gal/opengl/glm/gtc/constants.hpp | 372 +-- include/gal/opengl/glm/gtc/constants.inl | 372 +-- include/gal/opengl/glm/gtc/epsilon.hpp | 188 +- include/gal/opengl/glm/gtc/epsilon.inl | 572 ++-- include/gal/opengl/glm/gtc/half_float.hpp | 880 +++--- include/gal/opengl/glm/gtc/half_float.inl | 2078 ++++++------- include/gal/opengl/glm/gtc/matrix_access.hpp | 174 +- include/gal/opengl/glm/gtc/matrix_access.inl | 160 +- include/gal/opengl/glm/gtc/matrix_integer.hpp | 1012 +++--- include/gal/opengl/glm/gtc/matrix_inverse.hpp | 148 +- include/gal/opengl/glm/gtc/matrix_inverse.inl | 318 +- .../gal/opengl/glm/gtc/matrix_transform.hpp | 582 ++-- .../gal/opengl/glm/gtc/matrix_transform.inl | 860 ++--- include/gal/opengl/glm/gtc/noise.hpp | 160 +- include/gal/opengl/glm/gtc/noise.inl | 1734 +++++------ include/gal/opengl/glm/gtc/quaternion.hpp | 762 ++--- include/gal/opengl/glm/gtc/quaternion.inl | 1576 +++++----- include/gal/opengl/glm/gtc/random.hpp | 228 +- include/gal/opengl/glm/gtc/random.inl | 340 +- include/gal/opengl/glm/gtc/reciprocal.hpp | 266 +- include/gal/opengl/glm/gtc/reciprocal.inl | 398 +-- include/gal/opengl/glm/gtc/swizzle.hpp | 750 ++--- include/gal/opengl/glm/gtc/swizzle.inl | 232 +- include/gal/opengl/glm/gtc/type_precision.hpp | 1338 ++++---- include/gal/opengl/glm/gtc/type_precision.inl | 64 +- include/gal/opengl/glm/gtc/type_ptr.hpp | 338 +- include/gal/opengl/glm/gtc/type_ptr.inl | 924 +++--- include/gal/opengl/glm/gtc/ulp.hpp | 180 +- include/gal/opengl/glm/gtc/ulp.inl | 628 ++-- .../gal/opengl/glm/gtx/associated_min_max.hpp | 212 +- .../gal/opengl/glm/gtx/associated_min_max.inl | 1824 +++++------ include/gal/opengl/glm/gtx/bit.hpp | 280 +- include/gal/opengl/glm/gtx/bit.inl | 1200 +++---- include/gal/opengl/glm/gtx/closest_point.hpp | 132 +- include/gal/opengl/glm/gtx/closest_point.inl | 72 +- include/gal/opengl/glm/gtx/color_cast.hpp | 248 +- include/gal/opengl/glm/gtx/color_cast.inl | 1466 ++++----- include/gal/opengl/glm/gtx/color_space.hpp | 192 +- include/gal/opengl/glm/gtx/color_space.inl | 298 +- .../gal/opengl/glm/gtx/color_space_YCoCg.hpp | 168 +- .../gal/opengl/glm/gtx/color_space_YCoCg.inl | 128 +- include/gal/opengl/glm/gtx/compatibility.hpp | 352 +-- include/gal/opengl/glm/gtx/compatibility.inl | 120 +- include/gal/opengl/glm/gtx/component_wise.hpp | 164 +- include/gal/opengl/glm/gtx/component_wise.inl | 94 +- include/gal/opengl/glm/gtx/constants.hpp | 66 +- include/gal/opengl/glm/gtx/epsilon.hpp | 58 +- include/gal/opengl/glm/gtx/euler_angles.hpp | 312 +- include/gal/opengl/glm/gtx/euler_angles.inl | 488 +-- include/gal/opengl/glm/gtx/extend.hpp | 132 +- include/gal/opengl/glm/gtx/extend.inl | 110 +- .../gal/opengl/glm/gtx/extented_min_max.hpp | 388 +-- .../gal/opengl/glm/gtx/extented_min_max.inl | 356 +-- .../gal/opengl/glm/gtx/fast_exponential.hpp | 198 +- .../gal/opengl/glm/gtx/fast_exponential.inl | 296 +- .../gal/opengl/glm/gtx/fast_square_root.hpp | 170 +- .../gal/opengl/glm/gtx/fast_square_root.inl | 272 +- .../gal/opengl/glm/gtx/fast_trigonometry.hpp | 200 +- .../gal/opengl/glm/gtx/fast_trigonometry.inl | 150 +- include/gal/opengl/glm/gtx/gradient_paint.hpp | 152 +- include/gal/opengl/glm/gtx/gradient_paint.inl | 86 +- .../glm/gtx/handed_coordinate_space.hpp | 148 +- .../glm/gtx/handed_coordinate_space.inl | 66 +- include/gal/opengl/glm/gtx/inertia.hpp | 230 +- include/gal/opengl/glm/gtx/inertia.inl | 228 +- include/gal/opengl/glm/gtx/int_10_10_10_2.hpp | 128 +- include/gal/opengl/glm/gtx/int_10_10_10_2.inl | 38 +- include/gal/opengl/glm/gtx/integer.hpp | 208 +- include/gal/opengl/glm/gtx/integer.inl | 406 +-- include/gal/opengl/glm/gtx/intersect.hpp | 204 +- include/gal/opengl/glm/gtx/intersect.inl | 392 +-- include/gal/opengl/glm/gtx/log_base.hpp | 130 +- include/gal/opengl/glm/gtx/log_base.inl | 48 +- .../opengl/glm/gtx/matrix_cross_product.hpp | 142 +- .../opengl/glm/gtx/matrix_cross_product.inl | 88 +- .../opengl/glm/gtx/matrix_interpolation.hpp | 176 +- .../opengl/glm/gtx/matrix_interpolation.inl | 260 +- .../opengl/glm/gtx/matrix_major_storage.hpp | 286 +- .../opengl/glm/gtx/matrix_major_storage.inl | 346 +-- .../gal/opengl/glm/gtx/matrix_operation.hpp | 224 +- .../gal/opengl/glm/gtx/matrix_operation.inl | 248 +- include/gal/opengl/glm/gtx/matrix_query.hpp | 234 +- include/gal/opengl/glm/gtx/matrix_query.inl | 308 +- include/gal/opengl/glm/gtx/mixed_product.hpp | 130 +- include/gal/opengl/glm/gtx/mixed_product.inl | 44 +- include/gal/opengl/glm/gtx/multiple.hpp | 146 +- include/gal/opengl/glm/gtx/multiple.inl | 236 +- include/gal/opengl/glm/gtx/noise.hpp | 58 +- include/gal/opengl/glm/gtx/norm.hpp | 266 +- include/gal/opengl/glm/gtx/norm.inl | 312 +- include/gal/opengl/glm/gtx/normal.hpp | 134 +- include/gal/opengl/glm/gtx/normal.inl | 44 +- include/gal/opengl/glm/gtx/normalize_dot.hpp | 152 +- include/gal/opengl/glm/gtx/normalize_dot.inl | 230 +- .../gal/opengl/glm/gtx/number_precision.hpp | 176 +- .../gal/opengl/glm/gtx/number_precision.inl | 26 +- include/gal/opengl/glm/gtx/ocl_type.hpp | 264 +- include/gal/opengl/glm/gtx/optimum_pow.hpp | 182 +- include/gal/opengl/glm/gtx/optimum_pow.inl | 116 +- include/gal/opengl/glm/gtx/orthonormalize.hpp | 144 +- include/gal/opengl/glm/gtx/orthonormalize.inl | 86 +- include/gal/opengl/glm/gtx/perpendicular.hpp | 134 +- include/gal/opengl/glm/gtx/perpendicular.inl | 42 +- .../gal/opengl/glm/gtx/polar_coordinates.hpp | 140 +- .../gal/opengl/glm/gtx/polar_coordinates.inl | 110 +- include/gal/opengl/glm/gtx/projection.hpp | 130 +- include/gal/opengl/glm/gtx/projection.inl | 42 +- include/gal/opengl/glm/gtx/quaternion.hpp | 392 +-- include/gal/opengl/glm/gtx/quaternion.inl | 418 +-- include/gal/opengl/glm/gtx/random.hpp | 58 +- include/gal/opengl/glm/gtx/raw_data.hpp | 150 +- include/gal/opengl/glm/gtx/raw_data.inl | 22 +- include/gal/opengl/glm/gtx/reciprocal.hpp | 52 +- include/gal/opengl/glm/gtx/rotate_vector.hpp | 264 +- include/gal/opengl/glm/gtx/rotate_vector.inl | 422 +-- include/gal/opengl/glm/gtx/simd_mat4.hpp | 412 +-- include/gal/opengl/glm/gtx/simd_mat4.inl | 1180 +++---- include/gal/opengl/glm/gtx/simd_vec4.hpp | 1034 +++---- include/gal/opengl/glm/gtx/simd_vec4.inl | 1454 ++++----- include/gal/opengl/glm/gtx/spline.hpp | 180 +- include/gal/opengl/glm/gtx/spline.inl | 140 +- include/gal/opengl/glm/gtx/std_based_type.hpp | 166 +- include/gal/opengl/glm/gtx/std_based_type.inl | 26 +- include/gal/opengl/glm/gtx/string_cast.hpp | 140 +- include/gal/opengl/glm/gtx/string_cast.inl | 1176 +++---- include/gal/opengl/glm/gtx/transform.hpp | 262 +- include/gal/opengl/glm/gtx/transform.inl | 180 +- include/gal/opengl/glm/gtx/transform2.hpp | 270 +- include/gal/opengl/glm/gtx/transform2.inl | 308 +- include/gal/opengl/glm/gtx/ulp.hpp | 58 +- include/gal/opengl/glm/gtx/unsigned_int.hpp | 52 +- include/gal/opengl/glm/gtx/unsigned_int.inl | 26 +- include/gal/opengl/glm/gtx/vec1.hpp | 274 +- include/gal/opengl/glm/gtx/vector_access.hpp | 170 +- include/gal/opengl/glm/gtx/vector_access.inl | 106 +- include/gal/opengl/glm/gtx/vector_angle.hpp | 176 +- include/gal/opengl/glm/gtx/vector_angle.inl | 114 +- include/gal/opengl/glm/gtx/vector_query.hpp | 224 +- include/gal/opengl/glm/gtx/vector_query.inl | 328 +- .../gal/opengl/glm/gtx/verbose_operator.hpp | 166 +- .../gal/opengl/glm/gtx/verbose_operator.inl | 248 +- include/gal/opengl/glm/gtx/wrap.hpp | 146 +- include/gal/opengl/glm/gtx/wrap.inl | 330 +- include/gal/opengl/glm/virtrev/xstream.hpp | 332 +- 222 files changed, 51654 insertions(+), 51654 deletions(-) diff --git a/include/gal/opengl/glm/core/_detail.hpp b/include/gal/opengl/glm/core/_detail.hpp index 00c29253e3..ecc9250ecf 100644 --- a/include/gal/opengl/glm/core/_detail.hpp +++ b/include/gal/opengl/glm/core/_detail.hpp @@ -1,475 +1,475 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/_detail.hpp -/// @date 2008-07-24 / 2011-06-14 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_detail -#define glm_core_detail - -#include "setup.hpp" -#include -#if(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) -#include -#endif - -namespace glm{ -namespace detail -{ - class half; - -#if(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) // C99 detected, 64 bit types available - typedef int64_t sint64; - typedef uint64_t uint64; -#elif(GLM_COMPILER & GLM_COMPILER_VC) - typedef signed __int64 sint64; - typedef unsigned __int64 uint64; -#elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC | GLM_COMPILER_CLANG)) - __extension__ typedef signed long long sint64; - __extension__ typedef unsigned long long uint64; -#elif(GLM_COMPILER & GLM_COMPILER_BC) - typedef Int64 sint64; - typedef Uint64 uint64; -#else//unknown compiler - typedef signed long long sint64; - typedef unsigned long long uint64; -#endif//GLM_COMPILER - - template - struct If - { - template - static GLM_FUNC_QUALIFIER T apply(F functor, const T& val) - { - return functor(val); - } - }; - - template<> - struct If - { - template - static GLM_FUNC_QUALIFIER T apply(F, const T& val) - { - return val; - } - }; - - //template - //struct traits - //{ - // static const bool is_signed = false; - // static const bool is_float = false; - // static const bool is_vector = false; - // static const bool is_matrix = false; - // static const bool is_genType = false; - // static const bool is_genIType = false; - // static const bool is_genUType = false; - //}; - - //template <> - //struct traits - //{ - // static const bool is_float = true; - // static const bool is_genType = true; - //}; - - //template <> - //struct traits - //{ - // static const bool is_float = true; - // static const bool is_genType = true; - //}; - - //template <> - //struct traits - //{ - // static const bool is_float = true; - // static const bool is_genType = true; - //}; - - //template - //struct desc - //{ - // typedef genType type; - // typedef genType * pointer; - // typedef genType const* const_pointer; - // typedef genType const *const const_pointer_const; - // typedef genType *const pointer_const; - // typedef genType & reference; - // typedef genType const& const_reference; - // typedef genType const& param_type; - - // typedef typename genType::value_type value_type; - // typedef typename genType::size_type size_type; - // static const typename size_type value_size; - //}; - - //template - //const typename desc::size_type desc::value_size = genType::value_size(); - - union uif32 - { - GLM_FUNC_QUALIFIER uif32() : - i(0) - {} - - GLM_FUNC_QUALIFIER uif32(float f) : - f(f) - {} - - GLM_FUNC_QUALIFIER uif32(unsigned int i) : - i(i) - {} - - float f; - unsigned int i; - }; - - union uif64 - { - GLM_FUNC_QUALIFIER uif64() : - i(0) - {} - - GLM_FUNC_QUALIFIER uif64(double f) : - f(f) - {} - - GLM_FUNC_QUALIFIER uif64(uint64 i) : - i(i) - {} - - double f; - uint64 i; - }; - - typedef uif32 uif; - - ////////////////// - // int - - template - struct is_int - { - enum is_int_enum - { - _YES = 0, - _NO = 1 - }; - }; - -#define GLM_DETAIL_IS_INT(T) \ - template <> \ - struct is_int \ - { \ - enum is_int_enum \ - { \ - _YES = 1, \ - _NO = 0 \ - }; \ - } - - ////////////////// - // uint - - template - struct is_uint - { - enum is_uint_enum - { - _YES = 0, - _NO = 1 - }; - }; - -#define GLM_DETAIL_IS_UINT(T) \ - template <> \ - struct is_uint \ - { \ - enum is_uint_enum \ - { \ - _YES = 1, \ - _NO = 0 \ - }; \ - } - - //GLM_DETAIL_IS_UINT(unsigned long long) - - ////////////////// - // float - - template - struct is_float - { - enum is_float_enum - { - _YES = 0, - _NO = 1 - }; - }; - -#define GLM_DETAIL_IS_FLOAT(T) \ - template <> \ - struct is_float \ - { \ - enum is_float_enum \ - { \ - _YES = 1, \ - _NO = 0 \ - }; \ - } - - GLM_DETAIL_IS_FLOAT(detail::half); - GLM_DETAIL_IS_FLOAT(float); - GLM_DETAIL_IS_FLOAT(double); - GLM_DETAIL_IS_FLOAT(long double); - - ////////////////// - // bool - - template - struct is_bool - { - enum is_bool_enum - { - _YES = 0, - _NO = 1 - }; - }; - - template <> - struct is_bool - { - enum is_bool_enum - { - _YES = 1, - _NO = 0 - }; - }; - - ////////////////// - // vector - - template - struct is_vector - { - enum is_vector_enum - { - _YES = 0, - _NO = 1 - }; - }; - -# define GLM_DETAIL_IS_VECTOR(TYPE) \ - template \ - struct is_vector > \ - { \ - enum is_vector_enum \ - { \ - _YES = 1, \ - _NO = 0 \ - }; \ - } - - ////////////////// - // matrix - - template - struct is_matrix - { - enum is_matrix_enum - { - _YES = 0, - _NO = 1 - }; - }; - -#define GLM_DETAIL_IS_MATRIX(T) \ - template <> \ - struct is_matrix \ - { \ - enum is_matrix_enum \ - { \ - _YES = 1, \ - _NO = 0 \ - }; \ - } - - ////////////////// - // type - - template - struct type - { - enum type_enum - { - is_float = is_float::_YES, - is_int = is_int::_YES, - is_uint = is_uint::_YES, - is_bool = is_bool::_YES - }; - }; - - ////////////////// - // type - - typedef signed char int8; - typedef signed short int16; - typedef signed int int32; - typedef detail::sint64 int64; - - typedef unsigned char uint8; - typedef unsigned short uint16; - typedef unsigned int uint32; - typedef detail::uint64 uint64; - - typedef detail::half float16; - typedef float float32; - typedef double float64; - - ////////////////// - // float_or_int_trait - - struct float_or_int_value - { - enum - { - GLM_ERROR, - GLM_FLOAT, - GLM_INT - }; - }; - - template - struct float_or_int_trait - { - enum{ID = float_or_int_value::GLM_ERROR}; - }; - - template <> - struct float_or_int_trait - { - enum{ID = float_or_int_value::GLM_INT}; - }; - - template <> - struct float_or_int_trait - { - enum{ID = float_or_int_value::GLM_INT}; - }; - - template <> - struct float_or_int_trait - { - enum{ID = float_or_int_value::GLM_INT}; - }; - - template <> - struct float_or_int_trait - { - enum{ID = float_or_int_value::GLM_INT}; - }; - - template <> - struct float_or_int_trait - { - enum{ID = float_or_int_value::GLM_INT}; - }; - - template <> - struct float_or_int_trait - { - enum{ID = float_or_int_value::GLM_INT}; - }; - - template <> - struct float_or_int_trait - { - enum{ID = float_or_int_value::GLM_INT}; - }; - - template <> - struct float_or_int_trait - { - enum{ID = float_or_int_value::GLM_INT}; - }; - - template <> - struct float_or_int_trait - { - enum{ID = float_or_int_value::GLM_FLOAT}; - }; - - template <> - struct float_or_int_trait - { - enum{ID = float_or_int_value::GLM_FLOAT}; - }; - - template <> - struct float_or_int_trait - { - enum{ID = float_or_int_value::GLM_FLOAT}; - }; - -}//namespace detail -}//namespace glm - -#if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005)) -# define GLM_DEPRECATED __declspec(deprecated) -# define GLM_ALIGN(x) __declspec(align(x)) -# define GLM_ALIGNED_STRUCT(x) __declspec(align(x)) struct -# define GLM_RESTRICT __declspec(restrict) -# define GLM_RESTRICT_VAR __restrict -# define GLM_CONSTEXPR -#elif((GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC)) && (GLM_COMPILER >= GLM_COMPILER_GCC31)) -# define GLM_DEPRECATED __attribute__((__deprecated__)) -# define GLM_ALIGN(x) __attribute__((aligned(x))) -# define GLM_ALIGNED_STRUCT(x) struct __attribute__((aligned(x))) -# if(GLM_COMPILER >= GLM_COMPILER_GCC33) -# define GLM_RESTRICT __restrict__ -# define GLM_RESTRICT_VAR __restrict__ -# else -# define GLM_RESTRICT -# define GLM_RESTRICT_VAR -# endif -# define GLM_RESTRICT __restrict__ -# define GLM_RESTRICT_VAR __restrict__ -# if((GLM_COMPILER >= GLM_COMPILER_GCC47) && ((GLM_LANG & GLM_LANG_CXX0X) == GLM_LANG_CXX0X)) -# define GLM_CONSTEXPR constexpr -# else -# define GLM_CONSTEXPR -# endif -#else -# define GLM_DEPRECATED -# define GLM_ALIGN -# define GLM_ALIGNED_STRUCT(x) -# define GLM_RESTRICT -# define GLM_RESTRICT_VAR -# define GLM_CONSTEXPR -#endif//GLM_COMPILER - -#endif//glm_core_detail +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/_detail.hpp +/// @date 2008-07-24 / 2011-06-14 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_detail +#define glm_core_detail + +#include "setup.hpp" +#include +#if(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) +#include +#endif + +namespace glm{ +namespace detail +{ + class half; + +#if(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) // C99 detected, 64 bit types available + typedef int64_t sint64; + typedef uint64_t uint64; +#elif(GLM_COMPILER & GLM_COMPILER_VC) + typedef signed __int64 sint64; + typedef unsigned __int64 uint64; +#elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC | GLM_COMPILER_CLANG)) + __extension__ typedef signed long long sint64; + __extension__ typedef unsigned long long uint64; +#elif(GLM_COMPILER & GLM_COMPILER_BC) + typedef Int64 sint64; + typedef Uint64 uint64; +#else//unknown compiler + typedef signed long long sint64; + typedef unsigned long long uint64; +#endif//GLM_COMPILER + + template + struct If + { + template + static GLM_FUNC_QUALIFIER T apply(F functor, const T& val) + { + return functor(val); + } + }; + + template<> + struct If + { + template + static GLM_FUNC_QUALIFIER T apply(F, const T& val) + { + return val; + } + }; + + //template + //struct traits + //{ + // static const bool is_signed = false; + // static const bool is_float = false; + // static const bool is_vector = false; + // static const bool is_matrix = false; + // static const bool is_genType = false; + // static const bool is_genIType = false; + // static const bool is_genUType = false; + //}; + + //template <> + //struct traits + //{ + // static const bool is_float = true; + // static const bool is_genType = true; + //}; + + //template <> + //struct traits + //{ + // static const bool is_float = true; + // static const bool is_genType = true; + //}; + + //template <> + //struct traits + //{ + // static const bool is_float = true; + // static const bool is_genType = true; + //}; + + //template + //struct desc + //{ + // typedef genType type; + // typedef genType * pointer; + // typedef genType const* const_pointer; + // typedef genType const *const const_pointer_const; + // typedef genType *const pointer_const; + // typedef genType & reference; + // typedef genType const& const_reference; + // typedef genType const& param_type; + + // typedef typename genType::value_type value_type; + // typedef typename genType::size_type size_type; + // static const typename size_type value_size; + //}; + + //template + //const typename desc::size_type desc::value_size = genType::value_size(); + + union uif32 + { + GLM_FUNC_QUALIFIER uif32() : + i(0) + {} + + GLM_FUNC_QUALIFIER uif32(float f) : + f(f) + {} + + GLM_FUNC_QUALIFIER uif32(unsigned int i) : + i(i) + {} + + float f; + unsigned int i; + }; + + union uif64 + { + GLM_FUNC_QUALIFIER uif64() : + i(0) + {} + + GLM_FUNC_QUALIFIER uif64(double f) : + f(f) + {} + + GLM_FUNC_QUALIFIER uif64(uint64 i) : + i(i) + {} + + double f; + uint64 i; + }; + + typedef uif32 uif; + + ////////////////// + // int + + template + struct is_int + { + enum is_int_enum + { + _YES = 0, + _NO = 1 + }; + }; + +#define GLM_DETAIL_IS_INT(T) \ + template <> \ + struct is_int \ + { \ + enum is_int_enum \ + { \ + _YES = 1, \ + _NO = 0 \ + }; \ + } + + ////////////////// + // uint + + template + struct is_uint + { + enum is_uint_enum + { + _YES = 0, + _NO = 1 + }; + }; + +#define GLM_DETAIL_IS_UINT(T) \ + template <> \ + struct is_uint \ + { \ + enum is_uint_enum \ + { \ + _YES = 1, \ + _NO = 0 \ + }; \ + } + + //GLM_DETAIL_IS_UINT(unsigned long long) + + ////////////////// + // float + + template + struct is_float + { + enum is_float_enum + { + _YES = 0, + _NO = 1 + }; + }; + +#define GLM_DETAIL_IS_FLOAT(T) \ + template <> \ + struct is_float \ + { \ + enum is_float_enum \ + { \ + _YES = 1, \ + _NO = 0 \ + }; \ + } + + GLM_DETAIL_IS_FLOAT(detail::half); + GLM_DETAIL_IS_FLOAT(float); + GLM_DETAIL_IS_FLOAT(double); + GLM_DETAIL_IS_FLOAT(long double); + + ////////////////// + // bool + + template + struct is_bool + { + enum is_bool_enum + { + _YES = 0, + _NO = 1 + }; + }; + + template <> + struct is_bool + { + enum is_bool_enum + { + _YES = 1, + _NO = 0 + }; + }; + + ////////////////// + // vector + + template + struct is_vector + { + enum is_vector_enum + { + _YES = 0, + _NO = 1 + }; + }; + +# define GLM_DETAIL_IS_VECTOR(TYPE) \ + template \ + struct is_vector > \ + { \ + enum is_vector_enum \ + { \ + _YES = 1, \ + _NO = 0 \ + }; \ + } + + ////////////////// + // matrix + + template + struct is_matrix + { + enum is_matrix_enum + { + _YES = 0, + _NO = 1 + }; + }; + +#define GLM_DETAIL_IS_MATRIX(T) \ + template <> \ + struct is_matrix \ + { \ + enum is_matrix_enum \ + { \ + _YES = 1, \ + _NO = 0 \ + }; \ + } + + ////////////////// + // type + + template + struct type + { + enum type_enum + { + is_float = is_float::_YES, + is_int = is_int::_YES, + is_uint = is_uint::_YES, + is_bool = is_bool::_YES + }; + }; + + ////////////////// + // type + + typedef signed char int8; + typedef signed short int16; + typedef signed int int32; + typedef detail::sint64 int64; + + typedef unsigned char uint8; + typedef unsigned short uint16; + typedef unsigned int uint32; + typedef detail::uint64 uint64; + + typedef detail::half float16; + typedef float float32; + typedef double float64; + + ////////////////// + // float_or_int_trait + + struct float_or_int_value + { + enum + { + GLM_ERROR, + GLM_FLOAT, + GLM_INT + }; + }; + + template + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_ERROR}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_INT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_FLOAT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_FLOAT}; + }; + + template <> + struct float_or_int_trait + { + enum{ID = float_or_int_value::GLM_FLOAT}; + }; + +}//namespace detail +}//namespace glm + +#if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005)) +# define GLM_DEPRECATED __declspec(deprecated) +# define GLM_ALIGN(x) __declspec(align(x)) +# define GLM_ALIGNED_STRUCT(x) __declspec(align(x)) struct +# define GLM_RESTRICT __declspec(restrict) +# define GLM_RESTRICT_VAR __restrict +# define GLM_CONSTEXPR +#elif((GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC)) && (GLM_COMPILER >= GLM_COMPILER_GCC31)) +# define GLM_DEPRECATED __attribute__((__deprecated__)) +# define GLM_ALIGN(x) __attribute__((aligned(x))) +# define GLM_ALIGNED_STRUCT(x) struct __attribute__((aligned(x))) +# if(GLM_COMPILER >= GLM_COMPILER_GCC33) +# define GLM_RESTRICT __restrict__ +# define GLM_RESTRICT_VAR __restrict__ +# else +# define GLM_RESTRICT +# define GLM_RESTRICT_VAR +# endif +# define GLM_RESTRICT __restrict__ +# define GLM_RESTRICT_VAR __restrict__ +# if((GLM_COMPILER >= GLM_COMPILER_GCC47) && ((GLM_LANG & GLM_LANG_CXX0X) == GLM_LANG_CXX0X)) +# define GLM_CONSTEXPR constexpr +# else +# define GLM_CONSTEXPR +# endif +#else +# define GLM_DEPRECATED +# define GLM_ALIGN +# define GLM_ALIGNED_STRUCT(x) +# define GLM_RESTRICT +# define GLM_RESTRICT_VAR +# define GLM_CONSTEXPR +#endif//GLM_COMPILER + +#endif//glm_core_detail diff --git a/include/gal/opengl/glm/core/_fixes.hpp b/include/gal/opengl/glm/core/_fixes.hpp index 420a3225b3..1b4dddaac7 100644 --- a/include/gal/opengl/glm/core/_fixes.hpp +++ b/include/gal/opengl/glm/core/_fixes.hpp @@ -1,55 +1,55 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/_fixes.hpp -/// @date 2011-02-21 / 2011-11-22 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#include - -//! Workaround for compatibility with other libraries -#ifdef max -#undef max -#endif - -//! Workaround for compatibility with other libraries -#ifdef min -#undef min -#endif - -//! Workaround for Android -#ifdef isnan -#undef isnan -#endif - -//! Workaround for Android -#ifdef isinf -#undef isinf -#endif - -//! Workaround for Chrone Native Client -#ifdef log2 -#undef log2 -#endif - +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/_fixes.hpp +/// @date 2011-02-21 / 2011-11-22 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#include + +//! Workaround for compatibility with other libraries +#ifdef max +#undef max +#endif + +//! Workaround for compatibility with other libraries +#ifdef min +#undef min +#endif + +//! Workaround for Android +#ifdef isnan +#undef isnan +#endif + +//! Workaround for Android +#ifdef isinf +#undef isinf +#endif + +//! Workaround for Chrone Native Client +#ifdef log2 +#undef log2 +#endif + diff --git a/include/gal/opengl/glm/core/_swizzle.hpp b/include/gal/opengl/glm/core/_swizzle.hpp index 65443b1614..e234a02719 100644 --- a/include/gal/opengl/glm/core/_swizzle.hpp +++ b/include/gal/opengl/glm/core/_swizzle.hpp @@ -1,836 +1,836 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/_swizzle.hpp -/// @date 2006-04-20 / 2011-02-16 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_swizzle -#define glm_core_swizzle - -#include "_swizzle_func.hpp" - -namespace glm -{ - enum comp - { - X = 0, - R = 0, - S = 0, - Y = 1, - G = 1, - T = 1, - Z = 2, - B = 2, - P = 2, - W = 3, - A = 3, - Q = 3 - }; -}//namespace glm - -namespace glm{ -namespace detail -{ - // Internal class for implementing swizzle operators - template - struct _swizzle_base0 - { - typedef T value_type; - - protected: - value_type& elem (size_t i) { return (reinterpret_cast(_buffer))[i]; } - const value_type& elem (size_t i) const { return (reinterpret_cast(_buffer))[i]; } - - // Use an opaque buffer to *ensure* the compiler doesn't call a constructor. - // The size 1 buffer is assumed to aligned to the actual members so that the - // elem() - char _buffer[1]; - }; - - template - struct _swizzle_base1 : public _swizzle_base0 - { - }; - - template - struct _swizzle_base1 : public _swizzle_base0 - { - V operator ()() const { return V(this->elem(E0), this->elem(E1)); } - }; - - template - struct _swizzle_base1 : public _swizzle_base0 - { - V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2)); } - }; - - template - struct _swizzle_base1 : public _swizzle_base0 - { - V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2), this->elem(E3)); } - }; - - // Internal class for implementing swizzle operators - /* - Template parameters: - - ValueType = type of scalar values (e.g. float, double) - VecType = class the swizzle is applies to (e.g. tvec3) - N = number of components in the vector (e.g. 3) - E0...3 = what index the n-th element of this swizzle refers to in the unswizzled vec - - DUPLICATE_ELEMENTS = 1 if there is a repeated element, 0 otherwise (used to specialize swizzles - containing duplicate elements so that they cannot be used as r-values). - */ - template - struct _swizzle_base2 : public _swizzle_base1 - { - typedef VecType vec_type; - typedef ValueType value_type; - - _swizzle_base2& operator= (const ValueType& t) - { - for (int i = 0; i < N; ++i) - (*this)[i] = t; - return *this; - } - - _swizzle_base2& operator= (const VecType& that) - { - struct op { - void operator() (value_type& e, value_type& t) { e = t; } - }; - _apply_op(that, op()); - return *this; - } - - void operator -= (const VecType& that) - { - struct op { - void operator() (value_type& e, value_type& t) { e -= t; } - }; - _apply_op(that, op()); - } - - void operator += (const VecType& that) - { - struct op { - void operator() (value_type& e, value_type& t) { e += t; } - }; - _apply_op(that, op()); - } - - void operator *= (const VecType& that) - { - struct op { - void operator() (value_type& e, value_type& t) { e *= t; } - }; - _apply_op(that, op()); - } - - void operator /= (const VecType& that) - { - struct op { - void operator() (value_type& e, value_type& t) { e /= t; } - }; - _apply_op(that, op()); - } - - value_type& operator[] (size_t i) - { - static const int offset_dst[4] = { E0, E1, E2, E3 }; - return this->elem(offset_dst[i]); - } - value_type operator[] (size_t i) const - { - static const int offset_dst[4] = { E0, E1, E2, E3 }; - return this->elem(offset_dst[i]); - } - protected: - template - void _apply_op(const VecType& that, T op) - { - // Make a copy of the data in this == &that. - // The copier should optimize out the copy in cases where the function is - // properly inlined and the copy is not necessary. - ValueType t[N]; - for (int i = 0; i < N; ++i) - t[i] = that[i]; - for (int i = 0; i < N; ++i) - op( (*this)[i], t[i] ); - } - }; - - // Specialization for swizzles containing duplicate elements. These cannot be modified. - template - struct _swizzle_base2 : public _swizzle_base1 - { - typedef VecType vec_type; - typedef ValueType value_type; - - struct Stub {}; - _swizzle_base2& operator= (Stub const &) {} - - value_type operator[] (size_t i) const - { - static const int offset_dst[4] = { E0, E1, E2, E3 }; - return this->elem(offset_dst[i]); - } - }; - - template - struct swizzle : public _swizzle_base2 - { - typedef _swizzle_base2 base_type; - - using base_type::operator=; - - operator VecType () const { return (*this)(); } - }; - -// -// To prevent the C++ syntax from getting entirely overwhelming, define some alias macros -// -#define _GLM_SWIZZLE_TEMPLATE1 template -#define _GLM_SWIZZLE_TEMPLATE2 template -#define _GLM_SWIZZLE_TYPE1 glm::detail::swizzle -#define _GLM_SWIZZLE_TYPE2 glm::detail::swizzle - -// -// Wrapper for a binary operator (e.g. u.yy + v.zy) -// -#define _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND) \ - _GLM_SWIZZLE_TEMPLATE2 \ - V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \ - { \ - return a() OPERAND b(); \ - } \ - _GLM_SWIZZLE_TEMPLATE1 \ - V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const V& b) \ - { \ - return a() OPERAND b; \ - } \ - _GLM_SWIZZLE_TEMPLATE1 \ - V operator OPERAND ( const V& a, const _GLM_SWIZZLE_TYPE1& b) \ - { \ - return a OPERAND b(); \ - } - -// -// Wrapper for a operand between a swizzle and a binary (e.g. 1.0f - u.xyz) -// -#define _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND) \ - _GLM_SWIZZLE_TEMPLATE1 \ - V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const T& b) \ - { \ - return a() OPERAND b; \ - } \ - _GLM_SWIZZLE_TEMPLATE1 \ - V operator OPERAND ( const T& a, const _GLM_SWIZZLE_TYPE1& b) \ - { \ - return a OPERAND b(); \ - } - -// -// Macro for wrapping a function taking one argument (e.g. abs()) -// -#define _GLM_SWIZZLE_FUNCTION_1_ARGS(RETURN_TYPE,FUNCTION) \ - _GLM_SWIZZLE_TEMPLATE1 \ - typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a) \ - { \ - return FUNCTION(a()); \ - } - -// -// Macro for wrapping a function taking two vector arguments (e.g. dot()). -// -#define _GLM_SWIZZLE_FUNCTION_2_ARGS(RETURN_TYPE,FUNCTION) \ - _GLM_SWIZZLE_TEMPLATE2 \ - typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \ - { \ - return FUNCTION(a(), b()); \ - } \ - _GLM_SWIZZLE_TEMPLATE1 \ - typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b) \ - { \ - return FUNCTION(a(), b()); \ - } \ - _GLM_SWIZZLE_TEMPLATE1 \ - typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename V& b) \ - { \ - return FUNCTION(a(), b); \ - } \ - _GLM_SWIZZLE_TEMPLATE1 \ - typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const V& a, const _GLM_SWIZZLE_TYPE1& b) \ - { \ - return FUNCTION(a, b()); \ - } - -// -// Macro for wrapping a function take 2 vec arguments followed by a scalar (e.g. mix()). -// -#define _GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(RETURN_TYPE,FUNCTION) \ - _GLM_SWIZZLE_TEMPLATE2 \ - typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b, const T& c) \ - { \ - return FUNCTION(a(), b(), c); \ - } \ - _GLM_SWIZZLE_TEMPLATE1 \ - typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \ - { \ - return FUNCTION(a(), b(), c); \ - } \ - _GLM_SWIZZLE_TEMPLATE1 \ - typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename S0::vec_type& b, const T& c)\ - { \ - return FUNCTION(a(), b, c); \ - } \ - _GLM_SWIZZLE_TEMPLATE1 \ - typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const typename V& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \ - { \ - return FUNCTION(a, b(), c); \ - } - -}//namespace detail -}//namespace glm - -namespace glm -{ - namespace detail - { - _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(-) - _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(*) - _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(+) - _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(-) - _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(*) - _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(/) - } - - // - // Swizzles are distinct types from the unswizzled type. The below macros will - // provide template specializations for the swizzle types for the given functions - // so that the compiler does not have any ambiguity to choosing how to handle - // the function. - // - // The alternative is to use the operator()() when calling the function in order - // to explicitly convert the swizzled type to the unswizzled type. - // - - //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, abs); - //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, acos); - //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, acosh); - //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, all); - //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, any); - - //_GLM_SWIZZLE_FUNCTION_2_ARGS(value_type, dot); - //_GLM_SWIZZLE_FUNCTION_2_ARGS(vec_type, cross); - //_GLM_SWIZZLE_FUNCTION_2_ARGS(vec_type, step); - //_GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(vec_type, mix); -} - -#define _GLM_SWIZZLE2_2_MEMBERS(T,P,E0,E1) \ - struct { glm::detail::swizzle<2,T,P,0,0,-1,-2> E0 ## E0; }; \ - struct { glm::detail::swizzle<2,T,P,0,1,-1,-2> E0 ## E1; }; \ - struct { glm::detail::swizzle<2,T,P,1,0,-1,-2> E1 ## E0; }; \ - struct { glm::detail::swizzle<2,T,P,1,1,-1,-2> E1 ## E1; }; - -#define _GLM_SWIZZLE2_3_MEMBERS(T,P2,E0,E1) \ - struct { glm::detail::swizzle<3,T,P2,0,0,0,-1> E0 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P2,0,0,1,-1> E0 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P2,0,1,0,-1> E0 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P2,0,1,1,-1> E0 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P2,1,0,0,-1> E1 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P2,1,0,1,-1> E1 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P2,1,1,0,-1> E1 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P2,1,1,1,-1> E1 ## E1 ## E1; }; - -#define _GLM_SWIZZLE2_4_MEMBERS(T,P2,E0,E1) \ - struct { glm::detail::swizzle<4,T,P2,0,0,0,0> E0 ## E0 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,0,0,0,1> E0 ## E0 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,0,0,1,0> E0 ## E0 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,0,0,1,1> E0 ## E0 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,0,1,0,0> E0 ## E1 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,0,1,0,1> E0 ## E1 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,0,1,1,0> E0 ## E1 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,0,1,1,1> E0 ## E1 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,1,0,0,0> E1 ## E0 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,1,0,0,1> E1 ## E0 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,1,0,1,0> E1 ## E0 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,1,0,1,1> E1 ## E0 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,1,1,0,0> E1 ## E1 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,1,1,0,1> E1 ## E1 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,1,1,1,0> E1 ## E1 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,1,1,1,1> E1 ## E1 ## E1 ## E1; }; - -#define _GLM_SWIZZLE3_2_MEMBERS(T,P2,E0,E1,E2) \ - struct { glm::detail::swizzle<2,T,P2,0,0,-1,-2> E0 ## E0; }; \ - struct { glm::detail::swizzle<2,T,P2,0,1,-1,-2> E0 ## E1; }; \ - struct { glm::detail::swizzle<2,T,P2,0,2,-1,-2> E0 ## E2; }; \ - struct { glm::detail::swizzle<2,T,P2,1,0,-1,-2> E1 ## E0; }; \ - struct { glm::detail::swizzle<2,T,P2,1,1,-1,-2> E1 ## E1; }; \ - struct { glm::detail::swizzle<2,T,P2,1,2,-1,-2> E1 ## E2; }; \ - struct { glm::detail::swizzle<2,T,P2,2,0,-1,-2> E2 ## E0; }; \ - struct { glm::detail::swizzle<2,T,P2,2,1,-1,-2> E2 ## E1; }; \ - struct { glm::detail::swizzle<2,T,P2,2,2,-1,-2> E2 ## E2; }; - -#define _GLM_SWIZZLE3_3_MEMBERS(T,P,E0,E1,E2) \ - struct { glm::detail::swizzle<3,T,P,0,0,0,-1> E0 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,0,0,1,-1> E0 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,0,0,2,-1> E0 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,0,1,0,-1> E0 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,0,1,1,-1> E0 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,0,1,2,-1> E0 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,0,2,0,-1> E0 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,0,2,1,-1> E0 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,0,2,2,-1> E0 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,1,0,0,-1> E1 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,1,0,1,-1> E1 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,1,0,2,-1> E1 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,1,1,0,-1> E1 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,1,1,1,-1> E1 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,1,1,2,-1> E1 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,1,2,0,-1> E1 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,1,2,1,-1> E1 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,1,2,2,-1> E1 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,2,0,0,-1> E2 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,2,0,1,-1> E2 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,2,0,2,-1> E2 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,2,1,0,-1> E2 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,2,1,1,-1> E2 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,2,1,2,-1> E2 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,2,2,0,-1> E2 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,2,2,1,-1> E2 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,2,2,2,-1> E2 ## E2 ## E2; }; - -#define _GLM_SWIZZLE3_4_MEMBERS(T,P2,E0,E1,E2) \ - struct { glm::detail::swizzle<4,T,P2,0,0,0,0> E0 ## E0 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,0,0,0,1> E0 ## E0 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,0,0,0,2> E0 ## E0 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,0,0,1,0> E0 ## E0 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,0,0,1,1> E0 ## E0 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,0,0,1,2> E0 ## E0 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,0,0,2,0> E0 ## E0 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,0,0,2,1> E0 ## E0 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,0,0,2,2> E0 ## E0 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,0,1,0,0> E0 ## E1 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,0,1,0,1> E0 ## E1 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,0,1,0,2> E0 ## E1 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,0,1,1,0> E0 ## E1 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,0,1,1,1> E0 ## E1 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,0,1,1,2> E0 ## E1 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,0,1,2,0> E0 ## E1 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,0,1,2,1> E0 ## E1 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,0,1,2,2> E0 ## E1 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,0,2,0,0> E0 ## E2 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,0,2,0,1> E0 ## E2 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,0,2,0,2> E0 ## E2 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,0,2,1,0> E0 ## E2 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,0,2,1,1> E0 ## E2 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,0,2,1,2> E0 ## E2 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,0,2,2,0> E0 ## E2 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,0,2,2,1> E0 ## E2 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,0,2,2,2> E0 ## E2 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,1,0,0,0> E1 ## E0 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,1,0,0,1> E1 ## E0 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,1,0,0,2> E1 ## E0 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,1,0,1,0> E1 ## E0 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,1,0,1,1> E1 ## E0 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,1,0,1,2> E1 ## E0 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,1,0,2,0> E1 ## E0 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,1,0,2,1> E1 ## E0 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,1,0,2,2> E1 ## E0 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,1,1,0,0> E1 ## E1 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,1,1,0,1> E1 ## E1 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,1,1,0,2> E1 ## E1 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,1,1,1,0> E1 ## E1 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,1,1,1,1> E1 ## E1 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,1,1,1,2> E1 ## E1 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,1,1,2,0> E1 ## E1 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,1,1,2,1> E1 ## E1 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,1,1,2,2> E1 ## E1 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,1,2,0,0> E1 ## E2 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,1,2,0,1> E1 ## E2 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,1,2,0,2> E1 ## E2 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,1,2,1,0> E1 ## E2 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,1,2,1,1> E1 ## E2 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,1,2,1,2> E1 ## E2 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,1,2,2,0> E1 ## E2 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,1,2,2,1> E1 ## E2 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,1,2,2,2> E1 ## E2 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,2,0,0,0> E2 ## E0 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,2,0,0,1> E2 ## E0 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,2,0,0,2> E2 ## E0 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,2,0,1,0> E2 ## E0 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,2,0,1,1> E2 ## E0 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,2,0,1,2> E2 ## E0 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,2,0,2,0> E2 ## E0 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,2,0,2,1> E2 ## E0 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,2,0,2,2> E2 ## E0 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,2,1,0,0> E2 ## E1 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,2,1,0,1> E2 ## E1 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,2,1,0,2> E2 ## E1 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,2,1,1,0> E2 ## E1 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,2,1,1,1> E2 ## E1 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,2,1,1,2> E2 ## E1 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,2,1,2,0> E2 ## E1 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,2,1,2,1> E2 ## E1 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,2,1,2,2> E2 ## E1 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,2,2,0,0> E2 ## E2 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,2,2,0,1> E2 ## E2 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,2,2,0,2> E2 ## E2 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,2,2,1,0> E2 ## E2 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,2,2,1,1> E2 ## E2 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,2,2,1,2> E2 ## E2 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P2,2,2,2,0> E2 ## E2 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P2,2,2,2,1> E2 ## E2 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P2,2,2,2,2> E2 ## E2 ## E2 ## E2; }; - -#define _GLM_SWIZZLE4_2_MEMBERS(T,P,E0,E1,E2,E3) \ - struct { glm::detail::swizzle<2,T,P,0,0,-1,-2> E0 ## E0; }; \ - struct { glm::detail::swizzle<2,T,P,0,1,-1,-2> E0 ## E1; }; \ - struct { glm::detail::swizzle<2,T,P,0,2,-1,-2> E0 ## E2; }; \ - struct { glm::detail::swizzle<2,T,P,0,3,-1,-2> E0 ## E3; }; \ - struct { glm::detail::swizzle<2,T,P,1,0,-1,-2> E1 ## E0; }; \ - struct { glm::detail::swizzle<2,T,P,1,1,-1,-2> E1 ## E1; }; \ - struct { glm::detail::swizzle<2,T,P,1,2,-1,-2> E1 ## E2; }; \ - struct { glm::detail::swizzle<2,T,P,1,3,-1,-2> E1 ## E3; }; \ - struct { glm::detail::swizzle<2,T,P,2,0,-1,-2> E2 ## E0; }; \ - struct { glm::detail::swizzle<2,T,P,2,1,-1,-2> E2 ## E1; }; \ - struct { glm::detail::swizzle<2,T,P,2,2,-1,-2> E2 ## E2; }; \ - struct { glm::detail::swizzle<2,T,P,2,3,-1,-2> E2 ## E3; }; \ - struct { glm::detail::swizzle<2,T,P,3,0,-1,-2> E3 ## E0; }; \ - struct { glm::detail::swizzle<2,T,P,3,1,-1,-2> E3 ## E1; }; \ - struct { glm::detail::swizzle<2,T,P,3,2,-1,-2> E3 ## E2; }; \ - struct { glm::detail::swizzle<2,T,P,3,3,-1,-2> E3 ## E3; }; - -#define _GLM_SWIZZLE4_3_MEMBERS(T,P,E0,E1,E2,E3) \ - struct { glm::detail::swizzle<3,T,P,0,0,0,-1> E0 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,0,0,1,-1> E0 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,0,0,2,-1> E0 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,0,0,3,-1> E0 ## E0 ## E3; }; \ - struct { glm::detail::swizzle<3,T,P,0,1,0,-1> E0 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,0,1,1,-1> E0 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,0,1,2,-1> E0 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,0,1,3,-1> E0 ## E1 ## E3; }; \ - struct { glm::detail::swizzle<3,T,P,0,2,0,-1> E0 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,0,2,1,-1> E0 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,0,2,2,-1> E0 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,0,2,3,-1> E0 ## E2 ## E3; }; \ - struct { glm::detail::swizzle<3,T,P,0,3,0,-1> E0 ## E3 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,0,3,1,-1> E0 ## E3 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,0,3,2,-1> E0 ## E3 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,0,3,3,-1> E0 ## E3 ## E3; }; \ - struct { glm::detail::swizzle<3,T,P,1,0,0,-1> E1 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,1,0,1,-1> E1 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,1,0,2,-1> E1 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,1,0,3,-1> E1 ## E0 ## E3; }; \ - struct { glm::detail::swizzle<3,T,P,1,1,0,-1> E1 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,1,1,1,-1> E1 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,1,1,2,-1> E1 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,1,1,3,-1> E1 ## E1 ## E3; }; \ - struct { glm::detail::swizzle<3,T,P,1,2,0,-1> E1 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,1,2,1,-1> E1 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,1,2,2,-1> E1 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,1,2,3,-1> E1 ## E2 ## E3; }; \ - struct { glm::detail::swizzle<3,T,P,1,3,0,-1> E1 ## E3 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,1,3,1,-1> E1 ## E3 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,1,3,2,-1> E1 ## E3 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,1,3,3,-1> E1 ## E3 ## E3; }; \ - struct { glm::detail::swizzle<3,T,P,2,0,0,-1> E2 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,2,0,1,-1> E2 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,2,0,2,-1> E2 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,2,0,3,-1> E2 ## E0 ## E3; }; \ - struct { glm::detail::swizzle<3,T,P,2,1,0,-1> E2 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,2,1,1,-1> E2 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,2,1,2,-1> E2 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,2,1,3,-1> E2 ## E1 ## E3; }; \ - struct { glm::detail::swizzle<3,T,P,2,2,0,-1> E2 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,2,2,1,-1> E2 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,2,2,2,-1> E2 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,2,2,3,-1> E2 ## E2 ## E3; }; \ - struct { glm::detail::swizzle<3,T,P,2,3,0,-1> E2 ## E3 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,2,3,1,-1> E2 ## E3 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,2,3,2,-1> E2 ## E3 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,2,3,3,-1> E2 ## E3 ## E3; }; \ - struct { glm::detail::swizzle<3,T,P,3,0,0,-1> E3 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,3,0,1,-1> E3 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,3,0,2,-1> E3 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,3,0,3,-1> E3 ## E0 ## E3; }; \ - struct { glm::detail::swizzle<3,T,P,3,1,0,-1> E3 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,3,1,1,-1> E3 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,3,1,2,-1> E3 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,3,1,3,-1> E3 ## E1 ## E3; }; \ - struct { glm::detail::swizzle<3,T,P,3,2,0,-1> E3 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,3,2,1,-1> E3 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,3,2,2,-1> E3 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,3,2,3,-1> E3 ## E2 ## E3; }; \ - struct { glm::detail::swizzle<3,T,P,3,3,0,-1> E3 ## E3 ## E0; }; \ - struct { glm::detail::swizzle<3,T,P,3,3,1,-1> E3 ## E3 ## E1; }; \ - struct { glm::detail::swizzle<3,T,P,3,3,2,-1> E3 ## E3 ## E2; }; \ - struct { glm::detail::swizzle<3,T,P,3,3,3,-1> E3 ## E3 ## E3; }; - -#define _GLM_SWIZZLE4_4_MEMBERS(T,P,E0,E1,E2,E3) \ - struct { glm::detail::swizzle<4,T,P,0,0,0,0> E0 ## E0 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,0,0,0,1> E0 ## E0 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,0,0,0,2> E0 ## E0 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,0,0,0,3> E0 ## E0 ## E0 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,0,0,1,0> E0 ## E0 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,0,0,1,1> E0 ## E0 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,0,0,1,2> E0 ## E0 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,0,0,1,3> E0 ## E0 ## E1 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,0,0,2,0> E0 ## E0 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,0,0,2,1> E0 ## E0 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,0,0,2,2> E0 ## E0 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,0,0,2,3> E0 ## E0 ## E2 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,0,0,3,0> E0 ## E0 ## E3 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,0,0,3,1> E0 ## E0 ## E3 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,0,0,3,2> E0 ## E0 ## E3 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,0,0,3,3> E0 ## E0 ## E3 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,0,1,0,0> E0 ## E1 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,0,1,0,1> E0 ## E1 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,0,1,0,2> E0 ## E1 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,0,1,0,3> E0 ## E1 ## E0 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,0,1,1,0> E0 ## E1 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,0,1,1,1> E0 ## E1 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,0,1,1,2> E0 ## E1 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,0,1,1,3> E0 ## E1 ## E1 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,0,1,2,0> E0 ## E1 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,0,1,2,1> E0 ## E1 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,0,1,2,2> E0 ## E1 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,0,1,2,3> E0 ## E1 ## E2 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,0,1,3,0> E0 ## E1 ## E3 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,0,1,3,1> E0 ## E1 ## E3 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,0,1,3,2> E0 ## E1 ## E3 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,0,1,3,3> E0 ## E1 ## E3 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,0,2,0,0> E0 ## E2 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,0,2,0,1> E0 ## E2 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,0,2,0,2> E0 ## E2 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,0,2,0,3> E0 ## E2 ## E0 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,0,2,1,0> E0 ## E2 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,0,2,1,1> E0 ## E2 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,0,2,1,2> E0 ## E2 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,0,2,1,3> E0 ## E2 ## E1 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,0,2,2,0> E0 ## E2 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,0,2,2,1> E0 ## E2 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,0,2,2,2> E0 ## E2 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,0,2,2,3> E0 ## E2 ## E2 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,0,2,3,0> E0 ## E2 ## E3 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,0,2,3,1> E0 ## E2 ## E3 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,0,2,3,2> E0 ## E2 ## E3 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,0,2,3,3> E0 ## E2 ## E3 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,1,0,0,0> E1 ## E0 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,1,0,0,1> E1 ## E0 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,1,0,0,2> E1 ## E0 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,1,0,0,3> E1 ## E0 ## E0 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,1,0,1,0> E1 ## E0 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,1,0,1,1> E1 ## E0 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,1,0,1,2> E1 ## E0 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,1,0,1,3> E1 ## E0 ## E1 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,1,0,2,0> E1 ## E0 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,1,0,2,1> E1 ## E0 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,1,0,2,2> E1 ## E0 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,1,0,2,3> E1 ## E0 ## E2 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,1,0,3,0> E1 ## E0 ## E3 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,1,0,3,1> E1 ## E0 ## E3 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,1,0,3,2> E1 ## E0 ## E3 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,1,0,3,3> E1 ## E0 ## E3 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,1,1,0,0> E1 ## E1 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,1,1,0,1> E1 ## E1 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,1,1,0,2> E1 ## E1 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,1,1,0,3> E1 ## E1 ## E0 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,1,1,1,0> E1 ## E1 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,1,1,1,1> E1 ## E1 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,1,1,1,2> E1 ## E1 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,1,1,1,3> E1 ## E1 ## E1 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,1,1,2,0> E1 ## E1 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,1,1,2,1> E1 ## E1 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,1,1,2,2> E1 ## E1 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,1,1,2,3> E1 ## E1 ## E2 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,1,1,3,0> E1 ## E1 ## E3 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,1,1,3,1> E1 ## E1 ## E3 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,1,1,3,2> E1 ## E1 ## E3 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,1,1,3,3> E1 ## E1 ## E3 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,1,2,0,0> E1 ## E2 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,1,2,0,1> E1 ## E2 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,1,2,0,2> E1 ## E2 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,1,2,0,3> E1 ## E2 ## E0 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,1,2,1,0> E1 ## E2 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,1,2,1,1> E1 ## E2 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,1,2,1,2> E1 ## E2 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,1,2,1,3> E1 ## E2 ## E1 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,1,2,2,0> E1 ## E2 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,1,2,2,1> E1 ## E2 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,1,2,2,2> E1 ## E2 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,1,2,2,3> E1 ## E2 ## E2 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,1,2,3,0> E1 ## E2 ## E3 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,1,2,3,1> E1 ## E2 ## E3 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,1,2,3,2> E1 ## E2 ## E3 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,1,2,3,3> E1 ## E2 ## E3 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,1,3,0,0> E1 ## E3 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,1,3,0,1> E1 ## E3 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,1,3,0,2> E1 ## E3 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,1,3,0,3> E1 ## E3 ## E0 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,1,3,1,0> E1 ## E3 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,1,3,1,1> E1 ## E3 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,1,3,1,2> E1 ## E3 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,1,3,1,3> E1 ## E3 ## E1 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,1,3,2,0> E1 ## E3 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,1,3,2,1> E1 ## E3 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,1,3,2,2> E1 ## E3 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,1,3,2,3> E1 ## E3 ## E2 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,1,3,3,0> E1 ## E3 ## E3 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,1,3,3,1> E1 ## E3 ## E3 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,1,3,3,2> E1 ## E3 ## E3 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,1,3,3,3> E1 ## E3 ## E3 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,2,0,0,0> E2 ## E0 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,2,0,0,1> E2 ## E0 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,2,0,0,2> E2 ## E0 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,2,0,0,3> E2 ## E0 ## E0 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,2,0,1,0> E2 ## E0 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,2,0,1,1> E2 ## E0 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,2,0,1,2> E2 ## E0 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,2,0,1,3> E2 ## E0 ## E1 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,2,0,2,0> E2 ## E0 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,2,0,2,1> E2 ## E0 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,2,0,2,2> E2 ## E0 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,2,0,2,3> E2 ## E0 ## E2 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,2,0,3,0> E2 ## E0 ## E3 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,2,0,3,1> E2 ## E0 ## E3 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,2,0,3,2> E2 ## E0 ## E3 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,2,0,3,3> E2 ## E0 ## E3 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,2,1,0,0> E2 ## E1 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,2,1,0,1> E2 ## E1 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,2,1,0,2> E2 ## E1 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,2,1,0,3> E2 ## E1 ## E0 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,2,1,1,0> E2 ## E1 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,2,1,1,1> E2 ## E1 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,2,1,1,2> E2 ## E1 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,2,1,1,3> E2 ## E1 ## E1 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,2,1,2,0> E2 ## E1 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,2,1,2,1> E2 ## E1 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,2,1,2,2> E2 ## E1 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,2,1,2,3> E2 ## E1 ## E2 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,2,1,3,0> E2 ## E1 ## E3 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,2,1,3,1> E2 ## E1 ## E3 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,2,1,3,2> E2 ## E1 ## E3 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,2,1,3,3> E2 ## E1 ## E3 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,2,2,0,0> E2 ## E2 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,2,2,0,1> E2 ## E2 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,2,2,0,2> E2 ## E2 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,2,2,0,3> E2 ## E2 ## E0 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,2,2,1,0> E2 ## E2 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,2,2,1,1> E2 ## E2 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,2,2,1,2> E2 ## E2 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,2,2,1,3> E2 ## E2 ## E1 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,2,2,2,0> E2 ## E2 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,2,2,2,1> E2 ## E2 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,2,2,2,2> E2 ## E2 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,2,2,2,3> E2 ## E2 ## E2 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,2,2,3,0> E2 ## E2 ## E3 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,2,2,3,1> E2 ## E2 ## E3 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,2,2,3,2> E2 ## E2 ## E3 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,2,2,3,3> E2 ## E2 ## E3 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,2,3,0,0> E2 ## E3 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,2,3,0,1> E2 ## E3 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,2,3,0,2> E2 ## E3 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,2,3,0,3> E2 ## E3 ## E0 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,2,3,1,0> E2 ## E3 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,2,3,1,1> E2 ## E3 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,2,3,1,2> E2 ## E3 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,2,3,1,3> E2 ## E3 ## E1 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,2,3,2,0> E2 ## E3 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,2,3,2,1> E2 ## E3 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,2,3,2,2> E2 ## E3 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,2,3,2,3> E2 ## E3 ## E2 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,2,3,3,0> E2 ## E3 ## E3 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,2,3,3,1> E2 ## E3 ## E3 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,2,3,3,2> E2 ## E3 ## E3 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,2,3,3,3> E2 ## E3 ## E3 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,3,0,0,0> E3 ## E0 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,3,0,0,1> E3 ## E0 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,3,0,0,2> E3 ## E0 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,3,0,0,3> E3 ## E0 ## E0 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,3,0,1,0> E3 ## E0 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,3,0,1,1> E3 ## E0 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,3,0,1,2> E3 ## E0 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,3,0,1,3> E3 ## E0 ## E1 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,3,0,2,0> E3 ## E0 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,3,0,2,1> E3 ## E0 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,3,0,2,2> E3 ## E0 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,3,0,2,3> E3 ## E0 ## E2 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,3,0,3,0> E3 ## E0 ## E3 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,3,0,3,1> E3 ## E0 ## E3 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,3,0,3,2> E3 ## E0 ## E3 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,3,0,3,3> E3 ## E0 ## E3 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,3,1,0,0> E3 ## E1 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,3,1,0,1> E3 ## E1 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,3,1,0,2> E3 ## E1 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,3,1,0,3> E3 ## E1 ## E0 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,3,1,1,0> E3 ## E1 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,3,1,1,1> E3 ## E1 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,3,1,1,2> E3 ## E1 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,3,1,1,3> E3 ## E1 ## E1 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,3,1,2,0> E3 ## E1 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,3,1,2,1> E3 ## E1 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,3,1,2,2> E3 ## E1 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,3,1,2,3> E3 ## E1 ## E2 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,3,1,3,0> E3 ## E1 ## E3 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,3,1,3,1> E3 ## E1 ## E3 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,3,1,3,2> E3 ## E1 ## E3 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,3,1,3,3> E3 ## E1 ## E3 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,3,2,0,0> E3 ## E2 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,3,2,0,1> E3 ## E2 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,3,2,0,2> E3 ## E2 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,3,2,0,3> E3 ## E2 ## E0 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,3,2,1,0> E3 ## E2 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,3,2,1,1> E3 ## E2 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,3,2,1,2> E3 ## E2 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,3,2,1,3> E3 ## E2 ## E1 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,3,2,2,0> E3 ## E2 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,3,2,2,1> E3 ## E2 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,3,2,2,2> E3 ## E2 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,3,2,2,3> E3 ## E2 ## E2 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,3,2,3,0> E3 ## E2 ## E3 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,3,2,3,1> E3 ## E2 ## E3 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,3,2,3,2> E3 ## E2 ## E3 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,3,2,3,3> E3 ## E2 ## E3 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,3,3,0,0> E3 ## E3 ## E0 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,3,3,0,1> E3 ## E3 ## E0 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,3,3,0,2> E3 ## E3 ## E0 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,3,3,0,3> E3 ## E3 ## E0 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,3,3,1,0> E3 ## E3 ## E1 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,3,3,1,1> E3 ## E3 ## E1 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,3,3,1,2> E3 ## E3 ## E1 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,3,3,1,3> E3 ## E3 ## E1 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,3,3,2,0> E3 ## E3 ## E2 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,3,3,2,1> E3 ## E3 ## E2 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,3,3,2,2> E3 ## E3 ## E2 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,3,3,2,3> E3 ## E3 ## E2 ## E3; }; \ - struct { glm::detail::swizzle<4,T,P,3,3,3,0> E3 ## E3 ## E3 ## E0; }; \ - struct { glm::detail::swizzle<4,T,P,3,3,3,1> E3 ## E3 ## E3 ## E1; }; \ - struct { glm::detail::swizzle<4,T,P,3,3,3,2> E3 ## E3 ## E3 ## E2; }; \ - struct { glm::detail::swizzle<4,T,P,3,3,3,3> E3 ## E3 ## E3 ## E3; }; - -#endif//glm_core_swizzle +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/_swizzle.hpp +/// @date 2006-04-20 / 2011-02-16 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_swizzle +#define glm_core_swizzle + +#include "_swizzle_func.hpp" + +namespace glm +{ + enum comp + { + X = 0, + R = 0, + S = 0, + Y = 1, + G = 1, + T = 1, + Z = 2, + B = 2, + P = 2, + W = 3, + A = 3, + Q = 3 + }; +}//namespace glm + +namespace glm{ +namespace detail +{ + // Internal class for implementing swizzle operators + template + struct _swizzle_base0 + { + typedef T value_type; + + protected: + value_type& elem (size_t i) { return (reinterpret_cast(_buffer))[i]; } + const value_type& elem (size_t i) const { return (reinterpret_cast(_buffer))[i]; } + + // Use an opaque buffer to *ensure* the compiler doesn't call a constructor. + // The size 1 buffer is assumed to aligned to the actual members so that the + // elem() + char _buffer[1]; + }; + + template + struct _swizzle_base1 : public _swizzle_base0 + { + }; + + template + struct _swizzle_base1 : public _swizzle_base0 + { + V operator ()() const { return V(this->elem(E0), this->elem(E1)); } + }; + + template + struct _swizzle_base1 : public _swizzle_base0 + { + V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2)); } + }; + + template + struct _swizzle_base1 : public _swizzle_base0 + { + V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2), this->elem(E3)); } + }; + + // Internal class for implementing swizzle operators + /* + Template parameters: + + ValueType = type of scalar values (e.g. float, double) + VecType = class the swizzle is applies to (e.g. tvec3) + N = number of components in the vector (e.g. 3) + E0...3 = what index the n-th element of this swizzle refers to in the unswizzled vec + + DUPLICATE_ELEMENTS = 1 if there is a repeated element, 0 otherwise (used to specialize swizzles + containing duplicate elements so that they cannot be used as r-values). + */ + template + struct _swizzle_base2 : public _swizzle_base1 + { + typedef VecType vec_type; + typedef ValueType value_type; + + _swizzle_base2& operator= (const ValueType& t) + { + for (int i = 0; i < N; ++i) + (*this)[i] = t; + return *this; + } + + _swizzle_base2& operator= (const VecType& that) + { + struct op { + void operator() (value_type& e, value_type& t) { e = t; } + }; + _apply_op(that, op()); + return *this; + } + + void operator -= (const VecType& that) + { + struct op { + void operator() (value_type& e, value_type& t) { e -= t; } + }; + _apply_op(that, op()); + } + + void operator += (const VecType& that) + { + struct op { + void operator() (value_type& e, value_type& t) { e += t; } + }; + _apply_op(that, op()); + } + + void operator *= (const VecType& that) + { + struct op { + void operator() (value_type& e, value_type& t) { e *= t; } + }; + _apply_op(that, op()); + } + + void operator /= (const VecType& that) + { + struct op { + void operator() (value_type& e, value_type& t) { e /= t; } + }; + _apply_op(that, op()); + } + + value_type& operator[] (size_t i) + { + static const int offset_dst[4] = { E0, E1, E2, E3 }; + return this->elem(offset_dst[i]); + } + value_type operator[] (size_t i) const + { + static const int offset_dst[4] = { E0, E1, E2, E3 }; + return this->elem(offset_dst[i]); + } + protected: + template + void _apply_op(const VecType& that, T op) + { + // Make a copy of the data in this == &that. + // The copier should optimize out the copy in cases where the function is + // properly inlined and the copy is not necessary. + ValueType t[N]; + for (int i = 0; i < N; ++i) + t[i] = that[i]; + for (int i = 0; i < N; ++i) + op( (*this)[i], t[i] ); + } + }; + + // Specialization for swizzles containing duplicate elements. These cannot be modified. + template + struct _swizzle_base2 : public _swizzle_base1 + { + typedef VecType vec_type; + typedef ValueType value_type; + + struct Stub {}; + _swizzle_base2& operator= (Stub const &) {} + + value_type operator[] (size_t i) const + { + static const int offset_dst[4] = { E0, E1, E2, E3 }; + return this->elem(offset_dst[i]); + } + }; + + template + struct swizzle : public _swizzle_base2 + { + typedef _swizzle_base2 base_type; + + using base_type::operator=; + + operator VecType () const { return (*this)(); } + }; + +// +// To prevent the C++ syntax from getting entirely overwhelming, define some alias macros +// +#define _GLM_SWIZZLE_TEMPLATE1 template +#define _GLM_SWIZZLE_TEMPLATE2 template +#define _GLM_SWIZZLE_TYPE1 glm::detail::swizzle +#define _GLM_SWIZZLE_TYPE2 glm::detail::swizzle + +// +// Wrapper for a binary operator (e.g. u.yy + v.zy) +// +#define _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND) \ + _GLM_SWIZZLE_TEMPLATE2 \ + V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \ + { \ + return a() OPERAND b(); \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const V& b) \ + { \ + return a() OPERAND b; \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + V operator OPERAND ( const V& a, const _GLM_SWIZZLE_TYPE1& b) \ + { \ + return a OPERAND b(); \ + } + +// +// Wrapper for a operand between a swizzle and a binary (e.g. 1.0f - u.xyz) +// +#define _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND) \ + _GLM_SWIZZLE_TEMPLATE1 \ + V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const T& b) \ + { \ + return a() OPERAND b; \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + V operator OPERAND ( const T& a, const _GLM_SWIZZLE_TYPE1& b) \ + { \ + return a OPERAND b(); \ + } + +// +// Macro for wrapping a function taking one argument (e.g. abs()) +// +#define _GLM_SWIZZLE_FUNCTION_1_ARGS(RETURN_TYPE,FUNCTION) \ + _GLM_SWIZZLE_TEMPLATE1 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a) \ + { \ + return FUNCTION(a()); \ + } + +// +// Macro for wrapping a function taking two vector arguments (e.g. dot()). +// +#define _GLM_SWIZZLE_FUNCTION_2_ARGS(RETURN_TYPE,FUNCTION) \ + _GLM_SWIZZLE_TEMPLATE2 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \ + { \ + return FUNCTION(a(), b()); \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b) \ + { \ + return FUNCTION(a(), b()); \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename V& b) \ + { \ + return FUNCTION(a(), b); \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const V& a, const _GLM_SWIZZLE_TYPE1& b) \ + { \ + return FUNCTION(a, b()); \ + } + +// +// Macro for wrapping a function take 2 vec arguments followed by a scalar (e.g. mix()). +// +#define _GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(RETURN_TYPE,FUNCTION) \ + _GLM_SWIZZLE_TEMPLATE2 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b, const T& c) \ + { \ + return FUNCTION(a(), b(), c); \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \ + { \ + return FUNCTION(a(), b(), c); \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename S0::vec_type& b, const T& c)\ + { \ + return FUNCTION(a(), b, c); \ + } \ + _GLM_SWIZZLE_TEMPLATE1 \ + typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const typename V& a, const _GLM_SWIZZLE_TYPE1& b, const T& c) \ + { \ + return FUNCTION(a, b(), c); \ + } + +}//namespace detail +}//namespace glm + +namespace glm +{ + namespace detail + { + _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(-) + _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(*) + _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(+) + _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(-) + _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(*) + _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(/) + } + + // + // Swizzles are distinct types from the unswizzled type. The below macros will + // provide template specializations for the swizzle types for the given functions + // so that the compiler does not have any ambiguity to choosing how to handle + // the function. + // + // The alternative is to use the operator()() when calling the function in order + // to explicitly convert the swizzled type to the unswizzled type. + // + + //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, abs); + //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, acos); + //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, acosh); + //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, all); + //_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type, any); + + //_GLM_SWIZZLE_FUNCTION_2_ARGS(value_type, dot); + //_GLM_SWIZZLE_FUNCTION_2_ARGS(vec_type, cross); + //_GLM_SWIZZLE_FUNCTION_2_ARGS(vec_type, step); + //_GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(vec_type, mix); +} + +#define _GLM_SWIZZLE2_2_MEMBERS(T,P,E0,E1) \ + struct { glm::detail::swizzle<2,T,P,0,0,-1,-2> E0 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P,0,1,-1,-2> E0 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P,1,0,-1,-2> E1 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P,1,1,-1,-2> E1 ## E1; }; + +#define _GLM_SWIZZLE2_3_MEMBERS(T,P2,E0,E1) \ + struct { glm::detail::swizzle<3,T,P2,0,0,0,-1> E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P2,0,0,1,-1> E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P2,0,1,0,-1> E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P2,0,1,1,-1> E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P2,1,0,0,-1> E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P2,1,0,1,-1> E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P2,1,1,0,-1> E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P2,1,1,1,-1> E1 ## E1 ## E1; }; + +#define _GLM_SWIZZLE2_4_MEMBERS(T,P2,E0,E1) \ + struct { glm::detail::swizzle<4,T,P2,0,0,0,0> E0 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,0,1> E0 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,1,0> E0 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,1,1> E0 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,0,0> E0 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,0,1> E0 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,1,0> E0 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,1,1> E0 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,0,0> E1 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,0,1> E1 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,1,0> E1 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,1,1> E1 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,0,0> E1 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,0,1> E1 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,1,0> E1 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,1,1> E1 ## E1 ## E1 ## E1; }; + +#define _GLM_SWIZZLE3_2_MEMBERS(T,P2,E0,E1,E2) \ + struct { glm::detail::swizzle<2,T,P2,0,0,-1,-2> E0 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P2,0,1,-1,-2> E0 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P2,0,2,-1,-2> E0 ## E2; }; \ + struct { glm::detail::swizzle<2,T,P2,1,0,-1,-2> E1 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P2,1,1,-1,-2> E1 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P2,1,2,-1,-2> E1 ## E2; }; \ + struct { glm::detail::swizzle<2,T,P2,2,0,-1,-2> E2 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P2,2,1,-1,-2> E2 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P2,2,2,-1,-2> E2 ## E2; }; + +#define _GLM_SWIZZLE3_3_MEMBERS(T,P,E0,E1,E2) \ + struct { glm::detail::swizzle<3,T,P,0,0,0,-1> E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,0,0,1,-1> E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,0,0,2,-1> E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,0,1,0,-1> E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,0,1,1,-1> E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,0,1,2,-1> E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,0,2,0,-1> E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,0,2,1,-1> E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,0,2,2,-1> E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,1,0,0,-1> E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,1,0,1,-1> E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,1,0,2,-1> E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,1,1,0,-1> E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,1,1,1,-1> E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,1,1,2,-1> E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,1,2,0,-1> E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,1,2,1,-1> E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,1,2,2,-1> E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,2,0,0,-1> E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,2,0,1,-1> E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,2,0,2,-1> E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,2,1,0,-1> E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,2,1,1,-1> E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,2,1,2,-1> E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,2,2,0,-1> E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,2,2,1,-1> E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,2,2,2,-1> E2 ## E2 ## E2; }; + +#define _GLM_SWIZZLE3_4_MEMBERS(T,P2,E0,E1,E2) \ + struct { glm::detail::swizzle<4,T,P2,0,0,0,0> E0 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,0,1> E0 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,0,2> E0 ## E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,1,0> E0 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,1,1> E0 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,1,2> E0 ## E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,2,0> E0 ## E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,2,1> E0 ## E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,0,2,2> E0 ## E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,0,0> E0 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,0,1> E0 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,0,2> E0 ## E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,1,0> E0 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,1,1> E0 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,1,2> E0 ## E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,2,0> E0 ## E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,2,1> E0 ## E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,1,2,2> E0 ## E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,0,0> E0 ## E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,0,1> E0 ## E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,0,2> E0 ## E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,1,0> E0 ## E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,1,1> E0 ## E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,1,2> E0 ## E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,2,0> E0 ## E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,2,1> E0 ## E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,0,2,2,2> E0 ## E2 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,0,0> E1 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,0,1> E1 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,0,2> E1 ## E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,1,0> E1 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,1,1> E1 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,1,2> E1 ## E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,2,0> E1 ## E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,2,1> E1 ## E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,0,2,2> E1 ## E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,0,0> E1 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,0,1> E1 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,0,2> E1 ## E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,1,0> E1 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,1,1> E1 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,1,2> E1 ## E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,2,0> E1 ## E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,2,1> E1 ## E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,1,2,2> E1 ## E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,0,0> E1 ## E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,0,1> E1 ## E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,0,2> E1 ## E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,1,0> E1 ## E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,1,1> E1 ## E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,1,2> E1 ## E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,2,0> E1 ## E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,2,1> E1 ## E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,1,2,2,2> E1 ## E2 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,0,0> E2 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,0,1> E2 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,0,2> E2 ## E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,1,0> E2 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,1,1> E2 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,1,2> E2 ## E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,2,0> E2 ## E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,2,1> E2 ## E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,0,2,2> E2 ## E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,0,0> E2 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,0,1> E2 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,0,2> E2 ## E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,1,0> E2 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,1,1> E2 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,1,2> E2 ## E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,2,0> E2 ## E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,2,1> E2 ## E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,1,2,2> E2 ## E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,0,0> E2 ## E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,0,1> E2 ## E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,0,2> E2 ## E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,1,0> E2 ## E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,1,1> E2 ## E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,1,2> E2 ## E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,2,0> E2 ## E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,2,1> E2 ## E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P2,2,2,2,2> E2 ## E2 ## E2 ## E2; }; + +#define _GLM_SWIZZLE4_2_MEMBERS(T,P,E0,E1,E2,E3) \ + struct { glm::detail::swizzle<2,T,P,0,0,-1,-2> E0 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P,0,1,-1,-2> E0 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P,0,2,-1,-2> E0 ## E2; }; \ + struct { glm::detail::swizzle<2,T,P,0,3,-1,-2> E0 ## E3; }; \ + struct { glm::detail::swizzle<2,T,P,1,0,-1,-2> E1 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P,1,1,-1,-2> E1 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P,1,2,-1,-2> E1 ## E2; }; \ + struct { glm::detail::swizzle<2,T,P,1,3,-1,-2> E1 ## E3; }; \ + struct { glm::detail::swizzle<2,T,P,2,0,-1,-2> E2 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P,2,1,-1,-2> E2 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P,2,2,-1,-2> E2 ## E2; }; \ + struct { glm::detail::swizzle<2,T,P,2,3,-1,-2> E2 ## E3; }; \ + struct { glm::detail::swizzle<2,T,P,3,0,-1,-2> E3 ## E0; }; \ + struct { glm::detail::swizzle<2,T,P,3,1,-1,-2> E3 ## E1; }; \ + struct { glm::detail::swizzle<2,T,P,3,2,-1,-2> E3 ## E2; }; \ + struct { glm::detail::swizzle<2,T,P,3,3,-1,-2> E3 ## E3; }; + +#define _GLM_SWIZZLE4_3_MEMBERS(T,P,E0,E1,E2,E3) \ + struct { glm::detail::swizzle<3,T,P,0,0,0,-1> E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,0,0,1,-1> E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,0,0,2,-1> E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,0,0,3,-1> E0 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,0,1,0,-1> E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,0,1,1,-1> E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,0,1,2,-1> E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,0,1,3,-1> E0 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,0,2,0,-1> E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,0,2,1,-1> E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,0,2,2,-1> E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,0,2,3,-1> E0 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,0,3,0,-1> E0 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,0,3,1,-1> E0 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,0,3,2,-1> E0 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,0,3,3,-1> E0 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,1,0,0,-1> E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,1,0,1,-1> E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,1,0,2,-1> E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,1,0,3,-1> E1 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,1,1,0,-1> E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,1,1,1,-1> E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,1,1,2,-1> E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,1,1,3,-1> E1 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,1,2,0,-1> E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,1,2,1,-1> E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,1,2,2,-1> E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,1,2,3,-1> E1 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,1,3,0,-1> E1 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,1,3,1,-1> E1 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,1,3,2,-1> E1 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,1,3,3,-1> E1 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,2,0,0,-1> E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,2,0,1,-1> E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,2,0,2,-1> E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,2,0,3,-1> E2 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,2,1,0,-1> E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,2,1,1,-1> E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,2,1,2,-1> E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,2,1,3,-1> E2 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,2,2,0,-1> E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,2,2,1,-1> E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,2,2,2,-1> E2 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,2,2,3,-1> E2 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,2,3,0,-1> E2 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,2,3,1,-1> E2 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,2,3,2,-1> E2 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,2,3,3,-1> E2 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,3,0,0,-1> E3 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,3,0,1,-1> E3 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,3,0,2,-1> E3 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,3,0,3,-1> E3 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,3,1,0,-1> E3 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,3,1,1,-1> E3 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,3,1,2,-1> E3 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,3,1,3,-1> E3 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,3,2,0,-1> E3 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,3,2,1,-1> E3 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,3,2,2,-1> E3 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,3,2,3,-1> E3 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<3,T,P,3,3,0,-1> E3 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<3,T,P,3,3,1,-1> E3 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<3,T,P,3,3,2,-1> E3 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<3,T,P,3,3,3,-1> E3 ## E3 ## E3; }; + +#define _GLM_SWIZZLE4_4_MEMBERS(T,P,E0,E1,E2,E3) \ + struct { glm::detail::swizzle<4,T,P,0,0,0,0> E0 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,0,1> E0 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,0,2> E0 ## E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,0,3> E0 ## E0 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,1,0> E0 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,1,1> E0 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,1,2> E0 ## E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,1,3> E0 ## E0 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,2,0> E0 ## E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,2,1> E0 ## E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,2,2> E0 ## E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,2,3> E0 ## E0 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,3,0> E0 ## E0 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,3,1> E0 ## E0 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,3,2> E0 ## E0 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,0,3,3> E0 ## E0 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,0,0> E0 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,0,1> E0 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,0,2> E0 ## E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,0,3> E0 ## E1 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,1,0> E0 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,1,1> E0 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,1,2> E0 ## E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,1,3> E0 ## E1 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,2,0> E0 ## E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,2,1> E0 ## E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,2,2> E0 ## E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,2,3> E0 ## E1 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,3,0> E0 ## E1 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,3,1> E0 ## E1 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,3,2> E0 ## E1 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,1,3,3> E0 ## E1 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,0,0> E0 ## E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,0,1> E0 ## E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,0,2> E0 ## E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,0,3> E0 ## E2 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,1,0> E0 ## E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,1,1> E0 ## E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,1,2> E0 ## E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,1,3> E0 ## E2 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,2,0> E0 ## E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,2,1> E0 ## E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,2,2> E0 ## E2 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,2,3> E0 ## E2 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,3,0> E0 ## E2 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,3,1> E0 ## E2 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,3,2> E0 ## E2 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,0,2,3,3> E0 ## E2 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,0,0> E1 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,0,1> E1 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,0,2> E1 ## E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,0,3> E1 ## E0 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,1,0> E1 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,1,1> E1 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,1,2> E1 ## E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,1,3> E1 ## E0 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,2,0> E1 ## E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,2,1> E1 ## E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,2,2> E1 ## E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,2,3> E1 ## E0 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,3,0> E1 ## E0 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,3,1> E1 ## E0 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,3,2> E1 ## E0 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,0,3,3> E1 ## E0 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,0,0> E1 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,0,1> E1 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,0,2> E1 ## E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,0,3> E1 ## E1 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,1,0> E1 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,1,1> E1 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,1,2> E1 ## E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,1,3> E1 ## E1 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,2,0> E1 ## E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,2,1> E1 ## E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,2,2> E1 ## E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,2,3> E1 ## E1 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,3,0> E1 ## E1 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,3,1> E1 ## E1 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,3,2> E1 ## E1 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,1,3,3> E1 ## E1 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,0,0> E1 ## E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,0,1> E1 ## E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,0,2> E1 ## E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,0,3> E1 ## E2 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,1,0> E1 ## E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,1,1> E1 ## E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,1,2> E1 ## E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,1,3> E1 ## E2 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,2,0> E1 ## E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,2,1> E1 ## E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,2,2> E1 ## E2 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,2,3> E1 ## E2 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,3,0> E1 ## E2 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,3,1> E1 ## E2 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,3,2> E1 ## E2 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,2,3,3> E1 ## E2 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,0,0> E1 ## E3 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,0,1> E1 ## E3 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,0,2> E1 ## E3 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,0,3> E1 ## E3 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,1,0> E1 ## E3 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,1,1> E1 ## E3 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,1,2> E1 ## E3 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,1,3> E1 ## E3 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,2,0> E1 ## E3 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,2,1> E1 ## E3 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,2,2> E1 ## E3 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,2,3> E1 ## E3 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,3,0> E1 ## E3 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,3,1> E1 ## E3 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,3,2> E1 ## E3 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,1,3,3,3> E1 ## E3 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,0,0> E2 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,0,1> E2 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,0,2> E2 ## E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,0,3> E2 ## E0 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,1,0> E2 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,1,1> E2 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,1,2> E2 ## E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,1,3> E2 ## E0 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,2,0> E2 ## E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,2,1> E2 ## E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,2,2> E2 ## E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,2,3> E2 ## E0 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,3,0> E2 ## E0 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,3,1> E2 ## E0 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,3,2> E2 ## E0 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,0,3,3> E2 ## E0 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,0,0> E2 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,0,1> E2 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,0,2> E2 ## E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,0,3> E2 ## E1 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,1,0> E2 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,1,1> E2 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,1,2> E2 ## E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,1,3> E2 ## E1 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,2,0> E2 ## E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,2,1> E2 ## E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,2,2> E2 ## E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,2,3> E2 ## E1 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,3,0> E2 ## E1 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,3,1> E2 ## E1 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,3,2> E2 ## E1 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,1,3,3> E2 ## E1 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,0,0> E2 ## E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,0,1> E2 ## E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,0,2> E2 ## E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,0,3> E2 ## E2 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,1,0> E2 ## E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,1,1> E2 ## E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,1,2> E2 ## E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,1,3> E2 ## E2 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,2,0> E2 ## E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,2,1> E2 ## E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,2,2> E2 ## E2 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,2,3> E2 ## E2 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,3,0> E2 ## E2 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,3,1> E2 ## E2 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,3,2> E2 ## E2 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,2,3,3> E2 ## E2 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,0,0> E2 ## E3 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,0,1> E2 ## E3 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,0,2> E2 ## E3 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,0,3> E2 ## E3 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,1,0> E2 ## E3 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,1,1> E2 ## E3 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,1,2> E2 ## E3 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,1,3> E2 ## E3 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,2,0> E2 ## E3 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,2,1> E2 ## E3 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,2,2> E2 ## E3 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,2,3> E2 ## E3 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,3,0> E2 ## E3 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,3,1> E2 ## E3 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,3,2> E2 ## E3 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,2,3,3,3> E2 ## E3 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,0,0> E3 ## E0 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,0,1> E3 ## E0 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,0,2> E3 ## E0 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,0,3> E3 ## E0 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,1,0> E3 ## E0 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,1,1> E3 ## E0 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,1,2> E3 ## E0 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,1,3> E3 ## E0 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,2,0> E3 ## E0 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,2,1> E3 ## E0 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,2,2> E3 ## E0 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,2,3> E3 ## E0 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,3,0> E3 ## E0 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,3,1> E3 ## E0 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,3,2> E3 ## E0 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,0,3,3> E3 ## E0 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,0,0> E3 ## E1 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,0,1> E3 ## E1 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,0,2> E3 ## E1 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,0,3> E3 ## E1 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,1,0> E3 ## E1 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,1,1> E3 ## E1 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,1,2> E3 ## E1 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,1,3> E3 ## E1 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,2,0> E3 ## E1 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,2,1> E3 ## E1 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,2,2> E3 ## E1 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,2,3> E3 ## E1 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,3,0> E3 ## E1 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,3,1> E3 ## E1 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,3,2> E3 ## E1 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,1,3,3> E3 ## E1 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,0,0> E3 ## E2 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,0,1> E3 ## E2 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,0,2> E3 ## E2 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,0,3> E3 ## E2 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,1,0> E3 ## E2 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,1,1> E3 ## E2 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,1,2> E3 ## E2 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,1,3> E3 ## E2 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,2,0> E3 ## E2 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,2,1> E3 ## E2 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,2,2> E3 ## E2 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,2,3> E3 ## E2 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,3,0> E3 ## E2 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,3,1> E3 ## E2 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,3,2> E3 ## E2 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,2,3,3> E3 ## E2 ## E3 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,0,0> E3 ## E3 ## E0 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,0,1> E3 ## E3 ## E0 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,0,2> E3 ## E3 ## E0 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,0,3> E3 ## E3 ## E0 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,1,0> E3 ## E3 ## E1 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,1,1> E3 ## E3 ## E1 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,1,2> E3 ## E3 ## E1 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,1,3> E3 ## E3 ## E1 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,2,0> E3 ## E3 ## E2 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,2,1> E3 ## E3 ## E2 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,2,2> E3 ## E3 ## E2 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,2,3> E3 ## E3 ## E2 ## E3; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,3,0> E3 ## E3 ## E3 ## E0; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,3,1> E3 ## E3 ## E3 ## E1; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,3,2> E3 ## E3 ## E3 ## E2; }; \ + struct { glm::detail::swizzle<4,T,P,3,3,3,3> E3 ## E3 ## E3 ## E3; }; + +#endif//glm_core_swizzle diff --git a/include/gal/opengl/glm/core/_swizzle_func.hpp b/include/gal/opengl/glm/core/_swizzle_func.hpp index 90a895d63d..255a3ec980 100644 --- a/include/gal/opengl/glm/core/_swizzle_func.hpp +++ b/include/gal/opengl/glm/core/_swizzle_func.hpp @@ -1,787 +1,787 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/_swizzle_func.hpp -/// @date 2011-10-16 / 2011-10-16 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_swizzle_func -#define glm_core_swizzle_func - -#define GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B) \ - SWIZZLED_TYPE A ## B() CONST \ - { \ - return SWIZZLED_TYPE(this->A, this->B); \ - } - -#define GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C) \ - SWIZZLED_TYPE A ## B ## C() CONST \ - { \ - return SWIZZLED_TYPE(this->A, this->B, this->C); \ - } - -#define GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C, D) \ - SWIZZLED_TYPE A ## B ## C ## D() CONST \ - { \ - return SWIZZLED_TYPE(this->A, this->B, this->C, this->D); \ - } - -#define GLM_SWIZZLE_GEN_VEC2_ENTRY_DEF(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B) \ - template \ - SWIZZLED_TYPE CLASS_TYPE::A ## B() CONST \ - { \ - return SWIZZLED_TYPE(this->A, this->B); \ - } - -#define GLM_SWIZZLE_GEN_VEC3_ENTRY_DEF(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C) \ - template \ - SWIZZLED_TYPE CLASS_TYPE::A ## B ## C() CONST \ - { \ - return SWIZZLED_TYPE(this->A, this->B, this->C); \ - } - -#define GLM_SWIZZLE_GEN_VEC4_ENTRY_DEF(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C, D) \ - template \ - SWIZZLED_TYPE CLASS_TYPE::A ## B ## C ## D() CONST \ - { \ - return SWIZZLED_TYPE(this->A, this->B, this->C, this->D); \ - } - -#define GLM_MUTABLE - -#define GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) - -#define GLM_SWIZZLE_GEN_REF_FROM_VEC2(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE) \ - GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, x, y) \ - GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, r, g) \ - GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, s, t) - -//GLM_SWIZZLE_GEN_REF_FROM_VEC2(valType, detail::vec2, detail::ref2) - -#define GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B) - -#define GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B, A) - -#define GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \ - GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \ - GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C) - -#define GLM_SWIZZLE_GEN_REF_FROM_VEC3(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE) \ - GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, x, y, z) \ - GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, r, g, b) \ - GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, s, t, q) - -//GLM_SWIZZLE_GEN_REF_FROM_VEC3(valType, detail::vec3, detail::ref2, detail::ref3) - -#define GLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, D) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, D) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, D) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, C) - -#define GLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, B, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, C, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, C, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, D, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, D, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, A, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, A, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, C, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, C, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, D, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, D, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, A, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, B, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, B, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, D, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, D, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, A, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, B, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, C, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, C, B) - -#define GLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, C, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, C, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, D, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, D, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, B, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, B, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, C, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, C, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, D, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, D, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, A, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, A, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, B, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, B, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, D, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, D, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, A, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, A, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, C, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, C, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, A, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, A, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, B, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, B, C, A) - -#define GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) - -#define GLM_SWIZZLE_GEN_REF_FROM_VEC4(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \ - GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z, w) \ - GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b, a) \ - GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, q, p) - -//GLM_SWIZZLE_GEN_REF_FROM_VEC4(valType, detail::vec4, detail::ref2, detail::ref3, detail::ref4) - -#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) - -#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) - -#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) - -#define GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B) \ - GLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B) \ - GLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B) \ - GLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B) - -#define GLM_SWIZZLE_GEN_VEC_FROM_VEC2(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \ - GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y) \ - GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g) \ - GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t) - -//GLM_SWIZZLE_GEN_VEC_FROM_VEC2(valType, detail::vec2, detail::vec2, detail::vec3, detail::vec4) - -#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C) - -#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C) - -#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, C) - -#define GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C) \ - GLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C) \ - GLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \ - GLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C) - -#define GLM_SWIZZLE_GEN_VEC_FROM_VEC3(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \ - GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z) \ - GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b) \ - GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, q) - -//GLM_SWIZZLE_GEN_VEC_FROM_VEC3(valType, detail::vec3, detail::vec2, detail::vec3, detail::vec4) - -#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C) \ - GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D) - -#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C) \ - GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D) - -#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, D) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, A) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, B) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, C) \ - GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, D) - -#define GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C, D) \ - GLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) - -#define GLM_SWIZZLE_GEN_VEC_FROM_VEC4(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \ - GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z, w) \ - GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b, a) \ - GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, q, p) - -//GLM_SWIZZLE_GEN_VEC_FROM_VEC4(valType, detail::vec4, detail::vec2, detail::vec3, detail::vec4) - -#endif//glm_core_swizzle_func +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/_swizzle_func.hpp +/// @date 2011-10-16 / 2011-10-16 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_swizzle_func +#define glm_core_swizzle_func + +#define GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B) \ + SWIZZLED_TYPE A ## B() CONST \ + { \ + return SWIZZLED_TYPE(this->A, this->B); \ + } + +#define GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C) \ + SWIZZLED_TYPE A ## B ## C() CONST \ + { \ + return SWIZZLED_TYPE(this->A, this->B, this->C); \ + } + +#define GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C, D) \ + SWIZZLED_TYPE A ## B ## C ## D() CONST \ + { \ + return SWIZZLED_TYPE(this->A, this->B, this->C, this->D); \ + } + +#define GLM_SWIZZLE_GEN_VEC2_ENTRY_DEF(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B) \ + template \ + SWIZZLED_TYPE CLASS_TYPE::A ## B() CONST \ + { \ + return SWIZZLED_TYPE(this->A, this->B); \ + } + +#define GLM_SWIZZLE_GEN_VEC3_ENTRY_DEF(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C) \ + template \ + SWIZZLED_TYPE CLASS_TYPE::A ## B ## C() CONST \ + { \ + return SWIZZLED_TYPE(this->A, this->B, this->C); \ + } + +#define GLM_SWIZZLE_GEN_VEC4_ENTRY_DEF(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C, D) \ + template \ + SWIZZLED_TYPE CLASS_TYPE::A ## B ## C ## D() CONST \ + { \ + return SWIZZLED_TYPE(this->A, this->B, this->C, this->D); \ + } + +#define GLM_MUTABLE + +#define GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) + +#define GLM_SWIZZLE_GEN_REF_FROM_VEC2(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE) \ + GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, x, y) \ + GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, r, g) \ + GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, s, t) + +//GLM_SWIZZLE_GEN_REF_FROM_VEC2(valType, detail::vec2, detail::ref2) + +#define GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B) + +#define GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B, A) + +#define GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C) + +#define GLM_SWIZZLE_GEN_REF_FROM_VEC3(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, x, y, z) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, r, g, b) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, s, t, q) + +//GLM_SWIZZLE_GEN_REF_FROM_VEC3(valType, detail::vec3, detail::ref2, detail::ref3) + +#define GLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, C) + +#define GLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, C, B) + +#define GLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, C, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, C, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, B, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, C, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, C, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, A, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , B, A, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, B, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, B, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, A, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , C, A, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, , D, B, C, A) + +#define GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) + +#define GLM_SWIZZLE_GEN_REF_FROM_VEC4(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z, w) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b, a) \ + GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, q, p) + +//GLM_SWIZZLE_GEN_REF_FROM_VEC4(valType, detail::vec4, detail::ref2, detail::ref3, detail::ref4) + +#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) + +#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) + +#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) + +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B) \ + GLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B) \ + GLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B) \ + GLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B) + +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC2(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t) + +//GLM_SWIZZLE_GEN_VEC_FROM_VEC2(valType, detail::vec2, detail::vec2, detail::vec3, detail::vec4) + +#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C) + +#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C) + +#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, C) + +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C) + +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC3(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, q) + +//GLM_SWIZZLE_GEN_VEC_FROM_VEC3(valType, detail::vec3, detail::vec2, detail::vec3, detail::vec4) + +#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C) \ + GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D) + +#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C) \ + GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D) + +#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, D) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, A) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, B) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, C) \ + GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, D) + +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C, D) \ + GLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) + +#define GLM_SWIZZLE_GEN_VEC_FROM_VEC4(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z, w) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b, a) \ + GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, q, p) + +//GLM_SWIZZLE_GEN_VEC_FROM_VEC4(valType, detail::vec4, detail::vec2, detail::vec3, detail::vec4) + +#endif//glm_core_swizzle_func diff --git a/include/gal/opengl/glm/core/_vectorize.hpp b/include/gal/opengl/glm/core/_vectorize.hpp index e8ced04d24..7e14cc17ef 100644 --- a/include/gal/opengl/glm/core/_vectorize.hpp +++ b/include/gal/opengl/glm/core/_vectorize.hpp @@ -1,159 +1,159 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/_vectorize.hpp -/// @date 2011-10-14 / 2011-10-14 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#define VECTORIZE2_VEC(func) \ - template \ - GLM_FUNC_QUALIFIER detail::tvec2 func( \ - detail::tvec2 const & v) \ - { \ - return detail::tvec2( \ - func(v.x), \ - func(v.y)); \ - } - -#define VECTORIZE3_VEC(func) \ - template \ - GLM_FUNC_QUALIFIER detail::tvec3 func( \ - detail::tvec3 const & v) \ - { \ - return detail::tvec3( \ - func(v.x), \ - func(v.y), \ - func(v.z)); \ - } - -#define VECTORIZE4_VEC(func) \ - template \ - GLM_FUNC_QUALIFIER detail::tvec4 func( \ - detail::tvec4 const & v) \ - { \ - return detail::tvec4( \ - func(v.x), \ - func(v.y), \ - func(v.z), \ - func(v.w)); \ - } - -#define VECTORIZE_VEC(func) \ - VECTORIZE2_VEC(func) \ - VECTORIZE3_VEC(func) \ - VECTORIZE4_VEC(func) - -#define VECTORIZE2_VEC_SCA(func) \ - template \ - GLM_FUNC_QUALIFIER detail::tvec2 func \ - ( \ - detail::tvec2 const & x, \ - typename detail::tvec2::value_type const & y \ - ) \ - { \ - return detail::tvec2( \ - func(x.x, y), \ - func(x.y, y)); \ - } - -#define VECTORIZE3_VEC_SCA(func) \ - template \ - GLM_FUNC_QUALIFIER detail::tvec3 func \ - ( \ - detail::tvec3 const & x, \ - typename detail::tvec3::value_type const & y \ - ) \ - { \ - return detail::tvec3( \ - func(x.x, y), \ - func(x.y, y), \ - func(x.z, y)); \ - } - -#define VECTORIZE4_VEC_SCA(func) \ - template \ - GLM_FUNC_QUALIFIER detail::tvec4 func \ - ( \ - detail::tvec4 const & x, \ - typename detail::tvec4::value_type const & y \ - ) \ - { \ - return detail::tvec4( \ - func(x.x, y), \ - func(x.y, y), \ - func(x.z, y), \ - func(x.w, y)); \ - } - -#define VECTORIZE_VEC_SCA(func) \ - VECTORIZE2_VEC_SCA(func) \ - VECTORIZE3_VEC_SCA(func) \ - VECTORIZE4_VEC_SCA(func) - -#define VECTORIZE2_VEC_VEC(func) \ - template \ - GLM_FUNC_QUALIFIER detail::tvec2 func \ - ( \ - detail::tvec2 const & x, \ - detail::tvec2 const & y \ - ) \ - { \ - return detail::tvec2( \ - func(x.x, y.x), \ - func(x.y, y.y)); \ - } - -#define VECTORIZE3_VEC_VEC(func) \ - template \ - GLM_FUNC_QUALIFIER detail::tvec3 func \ - ( \ - detail::tvec3 const & x, \ - detail::tvec3 const & y \ - ) \ - { \ - return detail::tvec3( \ - func(x.x, y.x), \ - func(x.y, y.y), \ - func(x.z, y.z)); \ - } - -#define VECTORIZE4_VEC_VEC(func) \ - template \ - GLM_FUNC_QUALIFIER detail::tvec4 func \ - ( \ - detail::tvec4 const & x, \ - detail::tvec4 const & y \ - ) \ - { \ - return detail::tvec4( \ - func(x.x, y.x), \ - func(x.y, y.y), \ - func(x.z, y.z), \ - func(x.w, y.w)); \ - } - -#define VECTORIZE_VEC_VEC(func) \ - VECTORIZE2_VEC_VEC(func) \ - VECTORIZE3_VEC_VEC(func) \ - VECTORIZE4_VEC_VEC(func) +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/_vectorize.hpp +/// @date 2011-10-14 / 2011-10-14 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#define VECTORIZE2_VEC(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec2 func( \ + detail::tvec2 const & v) \ + { \ + return detail::tvec2( \ + func(v.x), \ + func(v.y)); \ + } + +#define VECTORIZE3_VEC(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec3 func( \ + detail::tvec3 const & v) \ + { \ + return detail::tvec3( \ + func(v.x), \ + func(v.y), \ + func(v.z)); \ + } + +#define VECTORIZE4_VEC(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec4 func( \ + detail::tvec4 const & v) \ + { \ + return detail::tvec4( \ + func(v.x), \ + func(v.y), \ + func(v.z), \ + func(v.w)); \ + } + +#define VECTORIZE_VEC(func) \ + VECTORIZE2_VEC(func) \ + VECTORIZE3_VEC(func) \ + VECTORIZE4_VEC(func) + +#define VECTORIZE2_VEC_SCA(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec2 func \ + ( \ + detail::tvec2 const & x, \ + typename detail::tvec2::value_type const & y \ + ) \ + { \ + return detail::tvec2( \ + func(x.x, y), \ + func(x.y, y)); \ + } + +#define VECTORIZE3_VEC_SCA(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec3 func \ + ( \ + detail::tvec3 const & x, \ + typename detail::tvec3::value_type const & y \ + ) \ + { \ + return detail::tvec3( \ + func(x.x, y), \ + func(x.y, y), \ + func(x.z, y)); \ + } + +#define VECTORIZE4_VEC_SCA(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec4 func \ + ( \ + detail::tvec4 const & x, \ + typename detail::tvec4::value_type const & y \ + ) \ + { \ + return detail::tvec4( \ + func(x.x, y), \ + func(x.y, y), \ + func(x.z, y), \ + func(x.w, y)); \ + } + +#define VECTORIZE_VEC_SCA(func) \ + VECTORIZE2_VEC_SCA(func) \ + VECTORIZE3_VEC_SCA(func) \ + VECTORIZE4_VEC_SCA(func) + +#define VECTORIZE2_VEC_VEC(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec2 func \ + ( \ + detail::tvec2 const & x, \ + detail::tvec2 const & y \ + ) \ + { \ + return detail::tvec2( \ + func(x.x, y.x), \ + func(x.y, y.y)); \ + } + +#define VECTORIZE3_VEC_VEC(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec3 func \ + ( \ + detail::tvec3 const & x, \ + detail::tvec3 const & y \ + ) \ + { \ + return detail::tvec3( \ + func(x.x, y.x), \ + func(x.y, y.y), \ + func(x.z, y.z)); \ + } + +#define VECTORIZE4_VEC_VEC(func) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec4 func \ + ( \ + detail::tvec4 const & x, \ + detail::tvec4 const & y \ + ) \ + { \ + return detail::tvec4( \ + func(x.x, y.x), \ + func(x.y, y.y), \ + func(x.z, y.z), \ + func(x.w, y.w)); \ + } + +#define VECTORIZE_VEC_VEC(func) \ + VECTORIZE2_VEC_VEC(func) \ + VECTORIZE3_VEC_VEC(func) \ + VECTORIZE4_VEC_VEC(func) diff --git a/include/gal/opengl/glm/core/dummy.cpp b/include/gal/opengl/glm/core/dummy.cpp index c69977bd56..db03cf8970 100644 --- a/include/gal/opengl/glm/core/dummy.cpp +++ b/include/gal/opengl/glm/core/dummy.cpp @@ -1,40 +1,40 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/dummy.cpp -/// @date 2011-01-19 / 2011-06-15 -/// @author Christophe Riccio -/// -/// GLM is a header only library. There is nothing to compile. -/// dummy.cpp exist only a wordaround for CMake file. -/////////////////////////////////////////////////////////////////////////////////// - -#define GLM_MESSAGES -#include "../glm.hpp" - -//#error "GLM is a header only library" - -int main() -{ - -} +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/dummy.cpp +/// @date 2011-01-19 / 2011-06-15 +/// @author Christophe Riccio +/// +/// GLM is a header only library. There is nothing to compile. +/// dummy.cpp exist only a wordaround for CMake file. +/////////////////////////////////////////////////////////////////////////////////// + +#define GLM_MESSAGES +#include "../glm.hpp" + +//#error "GLM is a header only library" + +int main() +{ + +} diff --git a/include/gal/opengl/glm/core/func_common.hpp b/include/gal/opengl/glm/core/func_common.hpp index c524948a71..9ed943ccf6 100644 --- a/include/gal/opengl/glm/core/func_common.hpp +++ b/include/gal/opengl/glm/core/func_common.hpp @@ -1,430 +1,430 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/func_common.hpp -/// @date 2008-03-08 / 2010-01-26 -/// @author Christophe Riccio -/// -/// @see GLSL 4.20.8 specification, section 8.3 Common Functions -/// -/// @defgroup core_func_common Common functions -/// @ingroup core -/// -/// These all operate component-wise. The description is per component. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_CORE_func_common -#define GLM_CORE_func_common GLM_VERSION - -#include "_fixes.hpp" - -namespace glm -{ - /// @addtogroup core_func_common - /// @{ - - /// Returns x if x >= 0; otherwise, it returns -x. - /// - /// @tparam genType floating-point or signed integer; scalar or vector types. - /// - /// @see GLSL abs man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - genType abs(genType const & x); - - /// Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0. - /// - /// @tparam genType Floating-point or signed integer; scalar or vector types. - /// - /// @see GLSL sign man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - genType sign(genType const & x); - - /// Returns a value equal to the nearest integer that is less then or equal to x. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL floor man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - genType floor(genType const & x); - - /// Returns a value equal to the nearest integer to x - /// whose absolute value is not larger than the absolute value of x. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL trunc man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - genType trunc(genType const & x); - - /// Returns a value equal to the nearest integer to x. - /// The fraction 0.5 will round in a direction chosen by the - /// implementation, presumably the direction that is fastest. - /// This includes the possibility that round(x) returns the - /// same value as roundEven(x) for all values of x. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL round man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - genType round(genType const & x); - - /// Returns a value equal to the nearest integer to x. - /// A fractional part of 0.5 will round toward the nearest even - /// integer. (Both 3.5 and 4.5 for x will return 4.0.) - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL roundEven man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - /// @see New round to even technique - template - genType roundEven(genType const & x); - - /// Returns a value equal to the nearest integer - /// that is greater than or equal to x. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL ceil man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - genType ceil(genType const & x); - - /// Return x - floor(x). - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL fract man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - genType fract(genType const & x); - - /// Modulus. Returns x - y * floor(x / y) - /// for each component in x using the floating point value y. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL mod man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - genType mod( - genType const & x, - genType const & y); - - /// Modulus. Returns x - y * floor(x / y) - /// for each component in x using the floating point value y. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL mod man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - genType mod( - genType const & x, - typename genType::value_type const & y); - - /// Returns the fractional part of x and sets i to the integer - /// part (as a whole number floating point value). Both the - /// return value and the output parameter will have the same - /// sign as x. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL modf man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - genType modf( - genType const & x, - genType & i); - - /// Returns y if y < x; otherwise, it returns x. - /// - /// @tparam genType Floating-point or integer; scalar or vector types. - /// - /// @see GLSL min man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - genType min( - genType const & x, - genType const & y); - - template - genType min( - genType const & x, - typename genType::value_type const & y); - - /// Returns y if x < y; otherwise, it returns x. - /// - /// @tparam genType Floating-point or integer; scalar or vector types. - /// - /// @see GLSL max man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - genType max( - genType const & x, - genType const & y); - - template - genType max( - genType const & x, - typename genType::value_type const & y); - - /// Returns min(max(x, minVal), maxVal) for each component in x - /// using the floating-point values minVal and maxVal. - /// - /// @tparam genType Floating-point or integer; scalar or vector types. - /// - /// @see GLSL clamp man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - genType clamp( - genType const & x, - genType const & minVal, - genType const & maxVal); - - template - genType clamp( - genType const & x, - typename genType::value_type const & minVal, - typename genType::value_type const & maxVal); - - //! @return If genTypeU is a floating scalar or vector: - //! Returns x * (1.0 - a) + y * a, i.e., the linear blend of - //! x and y using the floating-point value a. - //! The value for a is not restricted to the range [0, 1]. - //! - //! @return If genTypeU is a boolean scalar or vector: - //! Selects which vector each returned component comes - //! from. For a component of a that is false, the - //! corresponding component of x is returned. For a - //! component of a that is true, the corresponding - //! component of y is returned. Components of x and y that - //! are not selected are allowed to be invalid floating point - //! values and will have no effect on the results. Thus, this - //! provides different functionality than - //! genType mix(genType x, genType y, genType(a)) - //! where a is a Boolean vector. - /// - /// @see GLSL mix man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - /// - /// @param[in] x Value to interpolate. - /// @param[in] y Value to interpolate. - /// @param[in] a Interpolant. - /// - /// @tparam genTypeT Floating point scalar or vector. - /// @tparam genTypeU Floating point or boolean scalar or vector. It can't be a vector if it is the length of genTypeT. - /// - /// @code - /// #include - /// ... - /// float a; - /// bool b; - /// glm::dvec3 e; - /// glm::dvec3 f; - /// glm::vec4 g; - /// glm::vec4 h; - /// ... - /// glm::vec4 r = glm::mix(g, h, a); // Interpolate with a floating-point scalar two vectors. - /// glm::vec4 s = glm::mix(g, h, b); // Teturns g or h; - /// glm::dvec3 t = glm::mix(e, f, a); // Types of the third parameter is not required to match with the first and the second. - /// glm::vec4 u = glm::mix(g, h, r); // Interpolations can be perform per component with a vector for the last parameter. - /// @endcode - template - genTypeT mix(genTypeT const & x, genTypeT const & y, genTypeU const & a); - - //! Returns 0.0 if x < edge, otherwise it returns 1.0. - //! - /// @see GLSL step man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - genType step( - genType const & edge, - genType const & x); - - template - genType step( - typename genType::value_type const & edge, - genType const & x); - - /// Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and - /// performs smooth Hermite interpolation between 0 and 1 - /// when edge0 < x < edge1. This is useful in cases where - /// you would want a threshold function with a smooth - /// transition. This is equivalent to: - /// genType t; - /// t = clamp ((x – edge0) / (edge1 – edge0), 0, 1); - /// return t * t * (3 – 2 * t); - /// Results are undefined if edge0 >= edge1. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL smoothstep man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - genType smoothstep( - genType const & edge0, - genType const & edge1, - genType const & x); - - template - genType smoothstep( - typename genType::value_type const & edge0, - typename genType::value_type const & edge1, - genType const & x); - - /// Returns true if x holds a NaN (not a number) - /// representation in the underlying implementation's set of - /// floating point representations. Returns false otherwise, - /// including for implementations with no NaN - /// representations. - /// - /// /!\ When using compiler fast math, this function may fail. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL isnan man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - typename genType::bool_type isnan(genType const & x); - - /// Returns true if x holds a positive infinity or negative - /// infinity representation in the underlying implementation's - /// set of floating point representations. Returns false - /// otherwise, including for implementations with no infinity - /// representations. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL isinf man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - typename genType::bool_type isinf(genType const & x); - - /// Returns a signed integer value representing - /// the encoding of a floating-point value. The floatingpoint - /// value's bit-level representation is preserved. - /// - /// @tparam genType Single-precision floating-point scalar or vector types. - /// @tparam genIType Signed integer scalar or vector types. - /// - /// @see GLSL floatBitsToInt man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - genIType floatBitsToInt(genType const & value); - - /// Returns a unsigned integer value representing - /// the encoding of a floating-point value. The floatingpoint - /// value's bit-level representation is preserved. - /// - /// @tparam genType Single-precision floating-point scalar or vector types. - /// @tparam genUType Unsigned integer scalar or vector types. - /// - /// @see GLSL floatBitsToUint man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - genUType floatBitsToUint(genType const & value); - - /// Returns a floating-point value corresponding to a signed - /// integer encoding of a floating-point value. - /// If an inf or NaN is passed in, it will not signal, and the - /// resulting floating point value is unspecified. Otherwise, - /// the bit-level representation is preserved. - /// - /// @tparam genType Single-precision floating-point scalar or vector types. - /// @tparam genIType Signed integer scalar or vector types. - /// - /// @see GLSL intBitsToFloat man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - /// - /// @todo Clarify this declaration, we don't need to actually specify the return type - template - genType intBitsToFloat(genIType const & value); - - /// Returns a floating-point value corresponding to a - /// unsigned integer encoding of a floating-point value. - /// If an inf or NaN is passed in, it will not signal, and the - /// resulting floating point value is unspecified. Otherwise, - /// the bit-level representation is preserved. - /// - /// @tparam genType Single-precision floating-point scalar or vector types. - /// @tparam genUType Unsigned integer scalar or vector types. - /// - /// @see GLSL uintBitsToFloat man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - /// - /// @todo Clarify this declaration, we don't need to actually specify the return type - template - genType uintBitsToFloat(genUType const & value); - - /// Computes and returns a * b + c. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL fma man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - genType fma(genType const & a, genType const & b, genType const & c); - - /// Splits x into a floating-point significand in the range - /// [0.5, 1.0) and an integral exponent of two, such that: - /// x = significand * exp(2, exponent) - /// - /// The significand is returned by the function and the - /// exponent is returned in the parameter exp. For a - /// floating-point value of zero, the significant and exponent - /// are both zero. For a floating-point value that is an - /// infinity or is not a number, the results are undefined. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL frexp man page - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - genType frexp(genType const & x, genIType & exp); - - /// Builds a floating-point number from x and the - /// corresponding integral exponent of two in exp, returning: - /// significand * exp(2, exponent) - /// - /// If this product is too large to be represented in the - /// floating-point type, the result is undefined. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL ldexp man page; - /// @see GLSL 4.20.8 specification, section 8.3 Common Functions - template - genType ldexp(genType const & x, genIType const & exp); - - /// @} -}//namespace glm - -#include "func_common.inl" - -#endif//GLM_CORE_func_common +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_common.hpp +/// @date 2008-03-08 / 2010-01-26 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.3 Common Functions +/// +/// @defgroup core_func_common Common functions +/// @ingroup core +/// +/// These all operate component-wise. The description is per component. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_CORE_func_common +#define GLM_CORE_func_common GLM_VERSION + +#include "_fixes.hpp" + +namespace glm +{ + /// @addtogroup core_func_common + /// @{ + + /// Returns x if x >= 0; otherwise, it returns -x. + /// + /// @tparam genType floating-point or signed integer; scalar or vector types. + /// + /// @see GLSL abs man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType abs(genType const & x); + + /// Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0. + /// + /// @tparam genType Floating-point or signed integer; scalar or vector types. + /// + /// @see GLSL sign man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType sign(genType const & x); + + /// Returns a value equal to the nearest integer that is less then or equal to x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL floor man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType floor(genType const & x); + + /// Returns a value equal to the nearest integer to x + /// whose absolute value is not larger than the absolute value of x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL trunc man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType trunc(genType const & x); + + /// Returns a value equal to the nearest integer to x. + /// The fraction 0.5 will round in a direction chosen by the + /// implementation, presumably the direction that is fastest. + /// This includes the possibility that round(x) returns the + /// same value as roundEven(x) for all values of x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL round man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType round(genType const & x); + + /// Returns a value equal to the nearest integer to x. + /// A fractional part of 0.5 will round toward the nearest even + /// integer. (Both 3.5 and 4.5 for x will return 4.0.) + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL roundEven man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + /// @see New round to even technique + template + genType roundEven(genType const & x); + + /// Returns a value equal to the nearest integer + /// that is greater than or equal to x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL ceil man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType ceil(genType const & x); + + /// Return x - floor(x). + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL fract man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType fract(genType const & x); + + /// Modulus. Returns x - y * floor(x / y) + /// for each component in x using the floating point value y. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL mod man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType mod( + genType const & x, + genType const & y); + + /// Modulus. Returns x - y * floor(x / y) + /// for each component in x using the floating point value y. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL mod man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType mod( + genType const & x, + typename genType::value_type const & y); + + /// Returns the fractional part of x and sets i to the integer + /// part (as a whole number floating point value). Both the + /// return value and the output parameter will have the same + /// sign as x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL modf man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType modf( + genType const & x, + genType & i); + + /// Returns y if y < x; otherwise, it returns x. + /// + /// @tparam genType Floating-point or integer; scalar or vector types. + /// + /// @see GLSL min man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType min( + genType const & x, + genType const & y); + + template + genType min( + genType const & x, + typename genType::value_type const & y); + + /// Returns y if x < y; otherwise, it returns x. + /// + /// @tparam genType Floating-point or integer; scalar or vector types. + /// + /// @see GLSL max man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType max( + genType const & x, + genType const & y); + + template + genType max( + genType const & x, + typename genType::value_type const & y); + + /// Returns min(max(x, minVal), maxVal) for each component in x + /// using the floating-point values minVal and maxVal. + /// + /// @tparam genType Floating-point or integer; scalar or vector types. + /// + /// @see GLSL clamp man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType clamp( + genType const & x, + genType const & minVal, + genType const & maxVal); + + template + genType clamp( + genType const & x, + typename genType::value_type const & minVal, + typename genType::value_type const & maxVal); + + //! @return If genTypeU is a floating scalar or vector: + //! Returns x * (1.0 - a) + y * a, i.e., the linear blend of + //! x and y using the floating-point value a. + //! The value for a is not restricted to the range [0, 1]. + //! + //! @return If genTypeU is a boolean scalar or vector: + //! Selects which vector each returned component comes + //! from. For a component of a that is false, the + //! corresponding component of x is returned. For a + //! component of a that is true, the corresponding + //! component of y is returned. Components of x and y that + //! are not selected are allowed to be invalid floating point + //! values and will have no effect on the results. Thus, this + //! provides different functionality than + //! genType mix(genType x, genType y, genType(a)) + //! where a is a Boolean vector. + /// + /// @see GLSL mix man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + /// + /// @param[in] x Value to interpolate. + /// @param[in] y Value to interpolate. + /// @param[in] a Interpolant. + /// + /// @tparam genTypeT Floating point scalar or vector. + /// @tparam genTypeU Floating point or boolean scalar or vector. It can't be a vector if it is the length of genTypeT. + /// + /// @code + /// #include + /// ... + /// float a; + /// bool b; + /// glm::dvec3 e; + /// glm::dvec3 f; + /// glm::vec4 g; + /// glm::vec4 h; + /// ... + /// glm::vec4 r = glm::mix(g, h, a); // Interpolate with a floating-point scalar two vectors. + /// glm::vec4 s = glm::mix(g, h, b); // Teturns g or h; + /// glm::dvec3 t = glm::mix(e, f, a); // Types of the third parameter is not required to match with the first and the second. + /// glm::vec4 u = glm::mix(g, h, r); // Interpolations can be perform per component with a vector for the last parameter. + /// @endcode + template + genTypeT mix(genTypeT const & x, genTypeT const & y, genTypeU const & a); + + //! Returns 0.0 if x < edge, otherwise it returns 1.0. + //! + /// @see GLSL step man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType step( + genType const & edge, + genType const & x); + + template + genType step( + typename genType::value_type const & edge, + genType const & x); + + /// Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and + /// performs smooth Hermite interpolation between 0 and 1 + /// when edge0 < x < edge1. This is useful in cases where + /// you would want a threshold function with a smooth + /// transition. This is equivalent to: + /// genType t; + /// t = clamp ((x – edge0) / (edge1 – edge0), 0, 1); + /// return t * t * (3 – 2 * t); + /// Results are undefined if edge0 >= edge1. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL smoothstep man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType smoothstep( + genType const & edge0, + genType const & edge1, + genType const & x); + + template + genType smoothstep( + typename genType::value_type const & edge0, + typename genType::value_type const & edge1, + genType const & x); + + /// Returns true if x holds a NaN (not a number) + /// representation in the underlying implementation's set of + /// floating point representations. Returns false otherwise, + /// including for implementations with no NaN + /// representations. + /// + /// /!\ When using compiler fast math, this function may fail. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL isnan man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + typename genType::bool_type isnan(genType const & x); + + /// Returns true if x holds a positive infinity or negative + /// infinity representation in the underlying implementation's + /// set of floating point representations. Returns false + /// otherwise, including for implementations with no infinity + /// representations. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL isinf man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + typename genType::bool_type isinf(genType const & x); + + /// Returns a signed integer value representing + /// the encoding of a floating-point value. The floatingpoint + /// value's bit-level representation is preserved. + /// + /// @tparam genType Single-precision floating-point scalar or vector types. + /// @tparam genIType Signed integer scalar or vector types. + /// + /// @see GLSL floatBitsToInt man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genIType floatBitsToInt(genType const & value); + + /// Returns a unsigned integer value representing + /// the encoding of a floating-point value. The floatingpoint + /// value's bit-level representation is preserved. + /// + /// @tparam genType Single-precision floating-point scalar or vector types. + /// @tparam genUType Unsigned integer scalar or vector types. + /// + /// @see GLSL floatBitsToUint man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genUType floatBitsToUint(genType const & value); + + /// Returns a floating-point value corresponding to a signed + /// integer encoding of a floating-point value. + /// If an inf or NaN is passed in, it will not signal, and the + /// resulting floating point value is unspecified. Otherwise, + /// the bit-level representation is preserved. + /// + /// @tparam genType Single-precision floating-point scalar or vector types. + /// @tparam genIType Signed integer scalar or vector types. + /// + /// @see GLSL intBitsToFloat man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + /// + /// @todo Clarify this declaration, we don't need to actually specify the return type + template + genType intBitsToFloat(genIType const & value); + + /// Returns a floating-point value corresponding to a + /// unsigned integer encoding of a floating-point value. + /// If an inf or NaN is passed in, it will not signal, and the + /// resulting floating point value is unspecified. Otherwise, + /// the bit-level representation is preserved. + /// + /// @tparam genType Single-precision floating-point scalar or vector types. + /// @tparam genUType Unsigned integer scalar or vector types. + /// + /// @see GLSL uintBitsToFloat man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + /// + /// @todo Clarify this declaration, we don't need to actually specify the return type + template + genType uintBitsToFloat(genUType const & value); + + /// Computes and returns a * b + c. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL fma man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType fma(genType const & a, genType const & b, genType const & c); + + /// Splits x into a floating-point significand in the range + /// [0.5, 1.0) and an integral exponent of two, such that: + /// x = significand * exp(2, exponent) + /// + /// The significand is returned by the function and the + /// exponent is returned in the parameter exp. For a + /// floating-point value of zero, the significant and exponent + /// are both zero. For a floating-point value that is an + /// infinity or is not a number, the results are undefined. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL frexp man page + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType frexp(genType const & x, genIType & exp); + + /// Builds a floating-point number from x and the + /// corresponding integral exponent of two in exp, returning: + /// significand * exp(2, exponent) + /// + /// If this product is too large to be represented in the + /// floating-point type, the result is undefined. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL ldexp man page; + /// @see GLSL 4.20.8 specification, section 8.3 Common Functions + template + genType ldexp(genType const & x, genIType const & exp); + + /// @} +}//namespace glm + +#include "func_common.inl" + +#endif//GLM_CORE_func_common diff --git a/include/gal/opengl/glm/core/func_common.inl b/include/gal/opengl/glm/core/func_common.inl index febe1bf7fd..9c1c0470c2 100644 --- a/include/gal/opengl/glm/core/func_common.inl +++ b/include/gal/opengl/glm/core/func_common.inl @@ -1,1197 +1,1197 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/func_common.inl -/// @date 2008-08-03 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm{ -namespace detail -{ - template - struct Abs_ - {}; - - template - struct Abs_ - { - static genFIType get(genFIType const & x) - { - GLM_STATIC_ASSERT( - detail::type::is_float || - detail::type::is_int, "'abs' only accept floating-point and integer inputs"); - return x >= genFIType(0) ? x : -x; - // TODO, perf comp with: *(((int *) &x) + 1) &= 0x7fffffff; - } - }; - - template - struct Abs_ - { - static genFIType get(genFIType const & x) - { - GLM_STATIC_ASSERT( - detail::type::is_uint, "'abs' only accept floating-point and integer inputs"); - return x; - } - }; -}//namespace detail - - // abs - template - GLM_FUNC_QUALIFIER genFIType abs - ( - genFIType const & x - ) - { - return detail::Abs_::is_signed>::get(x); - } - - VECTORIZE_VEC(abs) - - // sign - //Try something like based on x >> 31 to get the sign bit - template - GLM_FUNC_QUALIFIER genFIType sign - ( - genFIType const & x - ) - { - GLM_STATIC_ASSERT( - detail::type::is_float || - detail::type::is_int, "'sign' only accept signed inputs"); - - genFIType result; - if(x > genFIType(0)) - result = genFIType(1); - else if(x < genFIType(0)) - result = genFIType(-1); - else - result = genFIType(0); - return result; - } - - VECTORIZE_VEC(sign) - - // floor - template <> - GLM_FUNC_QUALIFIER detail::half floor(detail::half const & x) - { - return detail::half(::std::floor(float(x))); - } - - template - GLM_FUNC_QUALIFIER genType floor(genType const & x) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'floor' only accept floating-point inputs"); - - return ::std::floor(x); - } - - VECTORIZE_VEC(floor) - - // trunc - template - GLM_FUNC_QUALIFIER genType trunc(genType const & x) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'trunc' only accept floating-point inputs"); - return x < 0 ? -floor(-x) : floor(x); - } - - VECTORIZE_VEC(trunc) - - // round - template - GLM_FUNC_QUALIFIER genType round(genType const& x) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'round' only accept floating-point inputs"); - - if(x < 0) - return genType(int(x - genType(0.5))); - return genType(int(x + genType(0.5))); - } - - VECTORIZE_VEC(round) - -/* - // roundEven - template - GLM_FUNC_QUALIFIER genType roundEven(genType const& x) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'roundEven' only accept floating-point inputs"); - - return genType(int(x + genType(int(x) % 2))); - } -*/ - - // roundEven - template - GLM_FUNC_QUALIFIER genType roundEven(genType const & x) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'roundEven' only accept floating-point inputs"); - - int Integer = int(x); - genType IntegerPart = genType(Integer); - genType FractionalPart = fract(x); - - if(FractionalPart > genType(0.5) || FractionalPart < genType(0.5)) - { - return round(x); - } - else if((Integer % 2) == 0) - { - return IntegerPart; - } - else if(x <= genType(0)) // Work around... - { - return IntegerPart - 1; - } - else - { - return IntegerPart + 1; - } - //else // Bug on MinGW 4.5.2 - //{ - // return mix(IntegerPart + genType(-1), IntegerPart + genType(1), x <= genType(0)); - //} - } - - VECTORIZE_VEC(roundEven) - - // ceil - template - GLM_FUNC_QUALIFIER genType ceil(genType const & x) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'ceil' only accept floating-point inputs"); - - return ::std::ceil(x); - } - - VECTORIZE_VEC(ceil) - - // fract - template - GLM_FUNC_QUALIFIER genType fract - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'fract' only accept floating-point inputs"); - - return x - ::std::floor(x); - } - - VECTORIZE_VEC(fract) - - // mod - template - GLM_FUNC_QUALIFIER genType mod - ( - genType const & x, - genType const & y - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'mod' only accept floating-point inputs"); - - return x - y * floor(x / y); - } - - VECTORIZE_VEC_SCA(mod) - VECTORIZE_VEC_VEC(mod) - - // modf - template - GLM_FUNC_QUALIFIER genType modf - ( - genType const & x, - genType & i - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'modf' only accept floating-point inputs"); - - return std::modf(x, &i); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 modf - ( - detail::tvec2 const & x, - detail::tvec2 & i - ) - { - return detail::tvec2( - modf(x.x, i.x), - modf(x.y, i.y)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 modf - ( - detail::tvec3 const & x, - detail::tvec3 & i - ) - { - return detail::tvec3( - modf(x.x, i.x), - modf(x.y, i.y), - modf(x.z, i.z)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 modf - ( - detail::tvec4 const & x, - detail::tvec4 & i - ) - { - return detail::tvec4( - modf(x.x, i.x), - modf(x.y, i.y), - modf(x.z, i.z), - modf(x.w, i.w)); - } - - //// Only valid if (INT_MIN <= x-y <= INT_MAX) - //// min(x,y) - //r = y + ((x - y) & ((x - y) >> (sizeof(int) * - //CHAR_BIT – 1))); - //// max(x,y) - //r = x - ((x - y) & ((x - y) >> (sizeof(int) * - //CHAR_BIT - 1))); - - // min - template - GLM_FUNC_QUALIFIER genType min - ( - genType const & x, - genType const & y - ) - { - GLM_STATIC_ASSERT( - detail::type::is_float || - detail::type::is_int || - detail::type::is_uint, "'min' only accept numbers"); - - return x < y ? x : y; - } - - VECTORIZE_VEC_SCA(min) - VECTORIZE_VEC_VEC(min) - - // max - template - GLM_FUNC_QUALIFIER genType max - ( - genType const & x, - genType const & y - ) - { - GLM_STATIC_ASSERT( - detail::type::is_float || - detail::type::is_int || - detail::type::is_uint, "'max' only accept numbers"); - - return x > y ? x : y; - } - - VECTORIZE_VEC_SCA(max) - VECTORIZE_VEC_VEC(max) - - // clamp - template - GLM_FUNC_QUALIFIER valType clamp - ( - valType const & x, - valType const & minVal, - valType const & maxVal - ) - { - GLM_STATIC_ASSERT( - detail::type::is_float || - detail::type::is_int || - detail::type::is_uint, "'clamp' only accept numbers"); - - return min(maxVal, max(minVal, x)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 clamp - ( - detail::tvec2 const & x, - typename detail::tvec2::value_type const & minVal, - typename detail::tvec2::value_type const & maxVal - ) - { - return detail::tvec2( - clamp(x.x, minVal, maxVal), - clamp(x.y, minVal, maxVal)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 clamp - ( - detail::tvec3 const & x, - typename detail::tvec3::value_type const & minVal, - typename detail::tvec3::value_type const & maxVal - ) - { - return detail::tvec3( - clamp(x.x, minVal, maxVal), - clamp(x.y, minVal, maxVal), - clamp(x.z, minVal, maxVal)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 clamp - ( - detail::tvec4 const & x, - typename detail::tvec4::value_type const & minVal, - typename detail::tvec4::value_type const & maxVal - ) - { - return detail::tvec4( - clamp(x.x, minVal, maxVal), - clamp(x.y, minVal, maxVal), - clamp(x.z, minVal, maxVal), - clamp(x.w, minVal, maxVal)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 clamp - ( - detail::tvec2 const & x, - detail::tvec2 const & minVal, - detail::tvec2 const & maxVal - ) - { - return detail::tvec2( - clamp(x.x, minVal.x, maxVal.x), - clamp(x.y, minVal.y, maxVal.y)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 clamp - ( - detail::tvec3 const & x, - detail::tvec3 const & minVal, - detail::tvec3 const & maxVal - ) - { - return detail::tvec3( - clamp(x.x, minVal.x, maxVal.x), - clamp(x.y, minVal.y, maxVal.y), - clamp(x.z, minVal.z, maxVal.z)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 clamp - ( - detail::tvec4 const & x, - detail::tvec4 const & minVal, - detail::tvec4 const & maxVal - ) - { - return detail::tvec4( - clamp(x.x, minVal.x, maxVal.x), - clamp(x.y, minVal.y, maxVal.y), - clamp(x.z, minVal.z, maxVal.z), - clamp(x.w, minVal.w, maxVal.w)); - } - - // mix - template - GLM_FUNC_QUALIFIER genTypeT mix - ( - genTypeT const & x, - genTypeT const & y, - genTypeU const & a - ) - { - // It could be a vector too - //GLM_STATIC_ASSERT( - // detail::type::is_float && - // detail::type::is_float); - - //return x + a * (y - x); - return genTypeT(genTypeU(x) + a * genTypeU(y - x)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 mix - ( - detail::tvec2 const & x, - detail::tvec2 const & y, - valTypeB const & a - ) - { - return detail::tvec2( - detail::tvec2(x) + a * detail::tvec2(y - x)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 mix - ( - detail::tvec3 const & x, - detail::tvec3 const & y, - valTypeB const & a - ) - { - return detail::tvec3( - detail::tvec3(x) + a * detail::tvec3(y - x)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 mix - ( - detail::tvec4 const & x, - detail::tvec4 const & y, - valTypeB const & a - ) - { - return detail::tvec4( - detail::tvec4(x) + a * detail::tvec4(y - x)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 mix - ( - detail::tvec2 const & x, - detail::tvec2 const & y, - detail::tvec2 const & a - ) - { - return detail::tvec2( - detail::tvec2(x) + a * detail::tvec2(y - x)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 mix - ( - detail::tvec3 const & x, - detail::tvec3 const & y, - detail::tvec3 const & a - ) - { - return detail::tvec3( - detail::tvec3(x) + a * detail::tvec3(y - x)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 mix - ( - detail::tvec4 const & x, - detail::tvec4 const & y, - detail::tvec4 const & a - ) - { - return detail::tvec4( - detail::tvec4(x) + a * detail::tvec4(y - x)); - } - - //template - //GLM_FUNC_QUALIFIER genTypeT mix - //( - // genTypeT const & x, - // genTypeT const & y, - // float const & a - //) - //{ - // // It could be a vector too - // //GLM_STATIC_ASSERT( - // // detail::type::is_float && - // // detail::type::is_float); - - // return x + a * (y - x); - //} - - template - GLM_FUNC_QUALIFIER genType mix - ( - genType const & x, - genType const & y, - bool const & a - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); - - return a ? y : x; - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 mix - ( - detail::tvec2 const & x, - detail::tvec2 const & y, - typename detail::tvec2::bool_type a - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); - - detail::tvec2 result; - for - ( - typename detail::tvec2::size_type i = 0; - i < detail::tvec2::value_size(); - ++i - ) - { - result[i] = a[i] ? y[i] : x[i]; - } - return result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 mix - ( - detail::tvec3 const & x, - detail::tvec3 const & y, - typename detail::tvec3::bool_type a - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); - - detail::tvec3 result; - for - ( - typename detail::tvec3::size_type i = 0; - i < detail::tvec3::value_size(); - ++i - ) - { - result[i] = a[i] ? y[i] : x[i]; - } - return result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 mix - ( - detail::tvec4 const & x, - detail::tvec4 const & y, - typename detail::tvec4::bool_type a - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); - - detail::tvec4 result; - for - ( - typename detail::tvec4::size_type i = 0; - i < detail::tvec4::value_size(); - ++i - ) - { - result[i] = a[i] ? y[i] : x[i]; - } - return result; - } - - // step - template - GLM_FUNC_QUALIFIER genType step - ( - genType const & edge, - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'step' only accept floating-point inputs"); - - return x < edge ? genType(0) : genType(1); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 step - ( - typename detail::tvec2::value_type const & edge, - detail::tvec2 const & x - ) - { - return detail::tvec2( - x.x < edge ? T(0) : T(1), - x.y < edge ? T(0) : T(1)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 step - ( - typename detail::tvec3::value_type const & edge, - detail::tvec3 const & x - ) - { - return detail::tvec3( - x.x < edge ? T(0) : T(1), - x.y < edge ? T(0) : T(1), - x.z < edge ? T(0) : T(1)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 step - ( - typename detail::tvec4::value_type const & edge, - detail::tvec4 const & x - ) - { - return detail::tvec4( - x.x < edge ? T(0) : T(1), - x.y < edge ? T(0) : T(1), - x.z < edge ? T(0) : T(1), - x.w < edge ? T(0) : T(1)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 step - ( - detail::tvec2 const & edge, - detail::tvec2 const & x - ) - { - return detail::tvec2( - x.x < edge.x ? T(0) : T(1), - x.y < edge.y ? T(0) : T(1)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 step - ( - detail::tvec3 const & edge, - detail::tvec3 const & x - ) - { - return detail::tvec3( - x.x < edge.x ? T(0) : T(1), - x.y < edge.y ? T(0) : T(1), - x.z < edge.z ? T(0) : T(1)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 step - ( - detail::tvec4 const & edge, - detail::tvec4 const & x - ) - { - return detail::tvec4( - x.x < edge.x ? T(0) : T(1), - x.y < edge.y ? T(0) : T(1), - x.z < edge.z ? T(0) : T(1), - x.w < edge.w ? T(0) : T(1)); - } - - // smoothstep - template - GLM_FUNC_QUALIFIER genType smoothstep - ( - genType const & edge0, - genType const & edge1, - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'smoothstep' only accept floating-point inputs"); - - genType tmp = clamp((x - edge0) / (edge1 - edge0), genType(0), genType(1)); - return tmp * tmp * (genType(3) - genType(2) * tmp); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 smoothstep - ( - typename detail::tvec2::value_type const & edge0, - typename detail::tvec2::value_type const & edge1, - detail::tvec2 const & x - ) - { - return detail::tvec2( - smoothstep(edge0, edge1, x.x), - smoothstep(edge0, edge1, x.y)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 smoothstep - ( - typename detail::tvec3::value_type const & edge0, - typename detail::tvec3::value_type const & edge1, - detail::tvec3 const & x - ) - { - return detail::tvec3( - smoothstep(edge0, edge1, x.x), - smoothstep(edge0, edge1, x.y), - smoothstep(edge0, edge1, x.z)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 smoothstep - ( - typename detail::tvec4::value_type const & edge0, - typename detail::tvec4::value_type const & edge1, - detail::tvec4 const & x - ) - { - return detail::tvec4( - smoothstep(edge0, edge1, x.x), - smoothstep(edge0, edge1, x.y), - smoothstep(edge0, edge1, x.z), - smoothstep(edge0, edge1, x.w)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 smoothstep - ( - detail::tvec2 const & edge0, - detail::tvec2 const & edge1, - detail::tvec2 const & x - ) - { - return detail::tvec2( - smoothstep(edge0.x, edge1.x, x.x), - smoothstep(edge0.y, edge1.y, x.y)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 smoothstep - ( - detail::tvec3 const & edge0, - detail::tvec3 const & edge1, - detail::tvec3 const & x - ) - { - return detail::tvec3( - smoothstep(edge0.x, edge1.x, x.x), - smoothstep(edge0.y, edge1.y, x.y), - smoothstep(edge0.z, edge1.z, x.z)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 smoothstep - ( - detail::tvec4 const & edge0, - detail::tvec4 const & edge1, - detail::tvec4 const & x - ) - { - return detail::tvec4( - smoothstep(edge0.x, edge1.x, x.x), - smoothstep(edge0.y, edge1.y, x.y), - smoothstep(edge0.z, edge1.z, x.z), - smoothstep(edge0.w, edge1.w, x.w)); - } - - // TODO: Not working on MinGW... - template - GLM_FUNC_QUALIFIER bool isnan(genType const & x) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'isnan' only accept floating-point inputs"); - -# if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL)) - return _isnan(x) != 0; -# elif(GLM_COMPILER & GLM_COMPILER_GCC) -# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) - return _isnan(x) != 0; -# else - return std::isnan(x); -# endif -# else - return std::isnan(x); -# endif - } - - template - GLM_FUNC_QUALIFIER typename detail::tvec2::bool_type isnan - ( - detail::tvec2 const & x - ) - { - return typename detail::tvec2::bool_type( - isnan(x.x), - isnan(x.y)); - } - - template - GLM_FUNC_QUALIFIER typename detail::tvec3::bool_type isnan - ( - detail::tvec3 const & x - ) - { - return typename detail::tvec3::bool_type( - isnan(x.x), - isnan(x.y), - isnan(x.z)); - } - - template - GLM_FUNC_QUALIFIER typename detail::tvec4::bool_type isnan - ( - detail::tvec4 const & x - ) - { - return typename detail::tvec4::bool_type( - isnan(x.x), - isnan(x.y), - isnan(x.z), - isnan(x.w)); - } - - template - GLM_FUNC_QUALIFIER bool isinf( - genType const & x) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'isinf' only accept floating-point inputs"); - -# if(GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC)) - return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF; -# elif(GLM_COMPILER & GLM_COMPILER_GCC) -# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) - return _isinf(x) != 0; -# else - return std::isinf(x); -# endif -# else - return std::isinf(x); -# endif -/* -# if(GLM_COMPILER & GLM_COMPILER_VC) - return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF; -# elif(GLM_COMPILER & GLM_COMPILER_GCC) -# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) - return _isinf(x) != 0; -# else - return std::isinf(x); -# endif -# elif(GLM_COMPILER & GLM_COMPILER_INTEL) - return isinf(x) != 0; -# else - return std::isinf(x); -# endif -*/ - } - - template - GLM_FUNC_QUALIFIER typename detail::tvec2::bool_type isinf - ( - detail::tvec2 const & x - ) - { - return typename detail::tvec2::bool_type( - isinf(x.x), - isinf(x.y)); - } - - template - GLM_FUNC_QUALIFIER typename detail::tvec3::bool_type isinf - ( - detail::tvec3 const & x - ) - { - return typename detail::tvec3::bool_type( - isinf(x.x), - isinf(x.y), - isinf(x.z)); - } - - template - GLM_FUNC_QUALIFIER typename detail::tvec4::bool_type isinf - ( - detail::tvec4 const & x - ) - { - return typename detail::tvec4::bool_type( - isinf(x.x), - isinf(x.y), - isinf(x.z), - isinf(x.w)); - } - - GLM_FUNC_QUALIFIER int floatBitsToInt(float const & value) - { - union - { - float f; - int i; - } fi; - - fi.f = value; - return fi.i; - } - - GLM_FUNC_QUALIFIER detail::tvec2 floatBitsToInt - ( - detail::tvec2 const & value - ) - { - return detail::tvec2( - floatBitsToInt(value.x), - floatBitsToInt(value.y)); - } - - GLM_FUNC_QUALIFIER detail::tvec3 floatBitsToInt - ( - detail::tvec3 const & value - ) - { - return detail::tvec3( - floatBitsToInt(value.x), - floatBitsToInt(value.y), - floatBitsToInt(value.z)); - } - - GLM_FUNC_QUALIFIER detail::tvec4 floatBitsToInt - ( - detail::tvec4 const & value - ) - { - return detail::tvec4( - floatBitsToInt(value.x), - floatBitsToInt(value.y), - floatBitsToInt(value.z), - floatBitsToInt(value.w)); - } - - GLM_FUNC_QUALIFIER uint floatBitsToUint(float const & value) - { - union - { - float f; - uint u; - } fu; - - fu.f = value; - return fu.u; - } - - GLM_FUNC_QUALIFIER detail::tvec2 floatBitsToUint - ( - detail::tvec2 const & value - ) - { - return detail::tvec2( - floatBitsToUint(value.x), - floatBitsToUint(value.y)); - } - - GLM_FUNC_QUALIFIER detail::tvec3 floatBitsToUint - ( - detail::tvec3 const & value - ) - { - return detail::tvec3( - floatBitsToUint(value.x), - floatBitsToUint(value.y), - floatBitsToUint(value.z)); - } - - GLM_FUNC_QUALIFIER detail::tvec4 floatBitsToUint - ( - detail::tvec4 const & value - ) - { - return detail::tvec4( - floatBitsToUint(value.x), - floatBitsToUint(value.y), - floatBitsToUint(value.z), - floatBitsToUint(value.w)); - } - - GLM_FUNC_QUALIFIER float intBitsToFloat(int const & value) - { - union - { - float f; - int i; - } fi; - - fi.i = value; - return fi.f; - } - - GLM_FUNC_QUALIFIER detail::tvec2 intBitsToFloat - - ( - detail::tvec2 const & value - ) - { - return detail::tvec2( - intBitsToFloat(value.x), - intBitsToFloat(value.y)); - } - - GLM_FUNC_QUALIFIER detail::tvec3 intBitsToFloat - ( - detail::tvec3 const & value - ) - { - return detail::tvec3( - intBitsToFloat(value.x), - intBitsToFloat(value.y), - intBitsToFloat(value.z)); - } - - GLM_FUNC_QUALIFIER detail::tvec4 intBitsToFloat - ( - detail::tvec4 const & value - ) - { - return detail::tvec4( - intBitsToFloat(value.x), - intBitsToFloat(value.y), - intBitsToFloat(value.z), - intBitsToFloat(value.w)); - } - - GLM_FUNC_QUALIFIER float uintBitsToFloat(uint const & value) - { - union - { - float f; - uint u; - } fu; - - fu.u = value; - return fu.f; - } - - GLM_FUNC_QUALIFIER detail::tvec2 uintBitsToFloat - ( - detail::tvec2 const & value - ) - { - return detail::tvec2( - uintBitsToFloat(value.x), - uintBitsToFloat(value.y)); - } - - GLM_FUNC_QUALIFIER detail::tvec3 uintBitsToFloat - ( - detail::tvec3 const & value - ) - { - return detail::tvec3( - uintBitsToFloat(value.x), - uintBitsToFloat(value.y), - uintBitsToFloat(value.z)); - } - - GLM_FUNC_QUALIFIER detail::tvec4 uintBitsToFloat - ( - detail::tvec4 const & value - ) - { - return detail::tvec4( - uintBitsToFloat(value.x), - uintBitsToFloat(value.y), - uintBitsToFloat(value.z), - uintBitsToFloat(value.w)); - } - - template - GLM_FUNC_QUALIFIER genType fma - ( - genType const & a, - genType const & b, - genType const & c - ) - { - return a * b + c; - } - - template - GLM_FUNC_QUALIFIER genType frexp - ( - genType const & x, - int & exp - ) - { - return std::frexp(x, exp); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 frexp - ( - detail::tvec2 const & x, - detail::tvec2 & exp - ) - { - return std::frexp(x, exp); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 frexp - ( - detail::tvec3 const & x, - detail::tvec3 & exp - ) - { - return std::frexp(x, exp); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 frexp - ( - detail::tvec4 const & x, - detail::tvec4 & exp - ) - { - return std::frexp(x, exp); - } - - template - GLM_FUNC_QUALIFIER genType ldexp - ( - genType const & x, - int const & exp - ) - { - return std::frexp(x, exp); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 ldexp - ( - detail::tvec2 const & x, - detail::tvec2 const & exp - ) - { - return std::frexp(x, exp); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 ldexp - ( - detail::tvec3 const & x, - detail::tvec3 const & exp - ) - { - return std::frexp(x, exp); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 ldexp - ( - detail::tvec4 const & x, - detail::tvec4 const & exp - ) - { - return std::frexp(x, exp); - } - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_common.inl +/// @date 2008-08-03 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + struct Abs_ + {}; + + template + struct Abs_ + { + static genFIType get(genFIType const & x) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int, "'abs' only accept floating-point and integer inputs"); + return x >= genFIType(0) ? x : -x; + // TODO, perf comp with: *(((int *) &x) + 1) &= 0x7fffffff; + } + }; + + template + struct Abs_ + { + static genFIType get(genFIType const & x) + { + GLM_STATIC_ASSERT( + detail::type::is_uint, "'abs' only accept floating-point and integer inputs"); + return x; + } + }; +}//namespace detail + + // abs + template + GLM_FUNC_QUALIFIER genFIType abs + ( + genFIType const & x + ) + { + return detail::Abs_::is_signed>::get(x); + } + + VECTORIZE_VEC(abs) + + // sign + //Try something like based on x >> 31 to get the sign bit + template + GLM_FUNC_QUALIFIER genFIType sign + ( + genFIType const & x + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int, "'sign' only accept signed inputs"); + + genFIType result; + if(x > genFIType(0)) + result = genFIType(1); + else if(x < genFIType(0)) + result = genFIType(-1); + else + result = genFIType(0); + return result; + } + + VECTORIZE_VEC(sign) + + // floor + template <> + GLM_FUNC_QUALIFIER detail::half floor(detail::half const & x) + { + return detail::half(::std::floor(float(x))); + } + + template + GLM_FUNC_QUALIFIER genType floor(genType const & x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'floor' only accept floating-point inputs"); + + return ::std::floor(x); + } + + VECTORIZE_VEC(floor) + + // trunc + template + GLM_FUNC_QUALIFIER genType trunc(genType const & x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'trunc' only accept floating-point inputs"); + return x < 0 ? -floor(-x) : floor(x); + } + + VECTORIZE_VEC(trunc) + + // round + template + GLM_FUNC_QUALIFIER genType round(genType const& x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'round' only accept floating-point inputs"); + + if(x < 0) + return genType(int(x - genType(0.5))); + return genType(int(x + genType(0.5))); + } + + VECTORIZE_VEC(round) + +/* + // roundEven + template + GLM_FUNC_QUALIFIER genType roundEven(genType const& x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'roundEven' only accept floating-point inputs"); + + return genType(int(x + genType(int(x) % 2))); + } +*/ + + // roundEven + template + GLM_FUNC_QUALIFIER genType roundEven(genType const & x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'roundEven' only accept floating-point inputs"); + + int Integer = int(x); + genType IntegerPart = genType(Integer); + genType FractionalPart = fract(x); + + if(FractionalPart > genType(0.5) || FractionalPart < genType(0.5)) + { + return round(x); + } + else if((Integer % 2) == 0) + { + return IntegerPart; + } + else if(x <= genType(0)) // Work around... + { + return IntegerPart - 1; + } + else + { + return IntegerPart + 1; + } + //else // Bug on MinGW 4.5.2 + //{ + // return mix(IntegerPart + genType(-1), IntegerPart + genType(1), x <= genType(0)); + //} + } + + VECTORIZE_VEC(roundEven) + + // ceil + template + GLM_FUNC_QUALIFIER genType ceil(genType const & x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'ceil' only accept floating-point inputs"); + + return ::std::ceil(x); + } + + VECTORIZE_VEC(ceil) + + // fract + template + GLM_FUNC_QUALIFIER genType fract + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'fract' only accept floating-point inputs"); + + return x - ::std::floor(x); + } + + VECTORIZE_VEC(fract) + + // mod + template + GLM_FUNC_QUALIFIER genType mod + ( + genType const & x, + genType const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mod' only accept floating-point inputs"); + + return x - y * floor(x / y); + } + + VECTORIZE_VEC_SCA(mod) + VECTORIZE_VEC_VEC(mod) + + // modf + template + GLM_FUNC_QUALIFIER genType modf + ( + genType const & x, + genType & i + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'modf' only accept floating-point inputs"); + + return std::modf(x, &i); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 modf + ( + detail::tvec2 const & x, + detail::tvec2 & i + ) + { + return detail::tvec2( + modf(x.x, i.x), + modf(x.y, i.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 modf + ( + detail::tvec3 const & x, + detail::tvec3 & i + ) + { + return detail::tvec3( + modf(x.x, i.x), + modf(x.y, i.y), + modf(x.z, i.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 modf + ( + detail::tvec4 const & x, + detail::tvec4 & i + ) + { + return detail::tvec4( + modf(x.x, i.x), + modf(x.y, i.y), + modf(x.z, i.z), + modf(x.w, i.w)); + } + + //// Only valid if (INT_MIN <= x-y <= INT_MAX) + //// min(x,y) + //r = y + ((x - y) & ((x - y) >> (sizeof(int) * + //CHAR_BIT – 1))); + //// max(x,y) + //r = x - ((x - y) & ((x - y) >> (sizeof(int) * + //CHAR_BIT - 1))); + + // min + template + GLM_FUNC_QUALIFIER genType min + ( + genType const & x, + genType const & y + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int || + detail::type::is_uint, "'min' only accept numbers"); + + return x < y ? x : y; + } + + VECTORIZE_VEC_SCA(min) + VECTORIZE_VEC_VEC(min) + + // max + template + GLM_FUNC_QUALIFIER genType max + ( + genType const & x, + genType const & y + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int || + detail::type::is_uint, "'max' only accept numbers"); + + return x > y ? x : y; + } + + VECTORIZE_VEC_SCA(max) + VECTORIZE_VEC_VEC(max) + + // clamp + template + GLM_FUNC_QUALIFIER valType clamp + ( + valType const & x, + valType const & minVal, + valType const & maxVal + ) + { + GLM_STATIC_ASSERT( + detail::type::is_float || + detail::type::is_int || + detail::type::is_uint, "'clamp' only accept numbers"); + + return min(maxVal, max(minVal, x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 clamp + ( + detail::tvec2 const & x, + typename detail::tvec2::value_type const & minVal, + typename detail::tvec2::value_type const & maxVal + ) + { + return detail::tvec2( + clamp(x.x, minVal, maxVal), + clamp(x.y, minVal, maxVal)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 clamp + ( + detail::tvec3 const & x, + typename detail::tvec3::value_type const & minVal, + typename detail::tvec3::value_type const & maxVal + ) + { + return detail::tvec3( + clamp(x.x, minVal, maxVal), + clamp(x.y, minVal, maxVal), + clamp(x.z, minVal, maxVal)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 clamp + ( + detail::tvec4 const & x, + typename detail::tvec4::value_type const & minVal, + typename detail::tvec4::value_type const & maxVal + ) + { + return detail::tvec4( + clamp(x.x, minVal, maxVal), + clamp(x.y, minVal, maxVal), + clamp(x.z, minVal, maxVal), + clamp(x.w, minVal, maxVal)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 clamp + ( + detail::tvec2 const & x, + detail::tvec2 const & minVal, + detail::tvec2 const & maxVal + ) + { + return detail::tvec2( + clamp(x.x, minVal.x, maxVal.x), + clamp(x.y, minVal.y, maxVal.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 clamp + ( + detail::tvec3 const & x, + detail::tvec3 const & minVal, + detail::tvec3 const & maxVal + ) + { + return detail::tvec3( + clamp(x.x, minVal.x, maxVal.x), + clamp(x.y, minVal.y, maxVal.y), + clamp(x.z, minVal.z, maxVal.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 clamp + ( + detail::tvec4 const & x, + detail::tvec4 const & minVal, + detail::tvec4 const & maxVal + ) + { + return detail::tvec4( + clamp(x.x, minVal.x, maxVal.x), + clamp(x.y, minVal.y, maxVal.y), + clamp(x.z, minVal.z, maxVal.z), + clamp(x.w, minVal.w, maxVal.w)); + } + + // mix + template + GLM_FUNC_QUALIFIER genTypeT mix + ( + genTypeT const & x, + genTypeT const & y, + genTypeU const & a + ) + { + // It could be a vector too + //GLM_STATIC_ASSERT( + // detail::type::is_float && + // detail::type::is_float); + + //return x + a * (y - x); + return genTypeT(genTypeU(x) + a * genTypeU(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 mix + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + valTypeB const & a + ) + { + return detail::tvec2( + detail::tvec2(x) + a * detail::tvec2(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 mix + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + valTypeB const & a + ) + { + return detail::tvec3( + detail::tvec3(x) + a * detail::tvec3(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 mix + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + valTypeB const & a + ) + { + return detail::tvec4( + detail::tvec4(x) + a * detail::tvec4(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 mix + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 const & a + ) + { + return detail::tvec2( + detail::tvec2(x) + a * detail::tvec2(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 mix + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 const & a + ) + { + return detail::tvec3( + detail::tvec3(x) + a * detail::tvec3(y - x)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 mix + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 const & a + ) + { + return detail::tvec4( + detail::tvec4(x) + a * detail::tvec4(y - x)); + } + + //template + //GLM_FUNC_QUALIFIER genTypeT mix + //( + // genTypeT const & x, + // genTypeT const & y, + // float const & a + //) + //{ + // // It could be a vector too + // //GLM_STATIC_ASSERT( + // // detail::type::is_float && + // // detail::type::is_float); + + // return x + a * (y - x); + //} + + template + GLM_FUNC_QUALIFIER genType mix + ( + genType const & x, + genType const & y, + bool const & a + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); + + return a ? y : x; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 mix + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + typename detail::tvec2::bool_type a + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); + + detail::tvec2 result; + for + ( + typename detail::tvec2::size_type i = 0; + i < detail::tvec2::value_size(); + ++i + ) + { + result[i] = a[i] ? y[i] : x[i]; + } + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 mix + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + typename detail::tvec3::bool_type a + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); + + detail::tvec3 result; + for + ( + typename detail::tvec3::size_type i = 0; + i < detail::tvec3::value_size(); + ++i + ) + { + result[i] = a[i] ? y[i] : x[i]; + } + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 mix + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + typename detail::tvec4::bool_type a + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'mix' only accept floating-point inputs"); + + detail::tvec4 result; + for + ( + typename detail::tvec4::size_type i = 0; + i < detail::tvec4::value_size(); + ++i + ) + { + result[i] = a[i] ? y[i] : x[i]; + } + return result; + } + + // step + template + GLM_FUNC_QUALIFIER genType step + ( + genType const & edge, + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'step' only accept floating-point inputs"); + + return x < edge ? genType(0) : genType(1); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 step + ( + typename detail::tvec2::value_type const & edge, + detail::tvec2 const & x + ) + { + return detail::tvec2( + x.x < edge ? T(0) : T(1), + x.y < edge ? T(0) : T(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 step + ( + typename detail::tvec3::value_type const & edge, + detail::tvec3 const & x + ) + { + return detail::tvec3( + x.x < edge ? T(0) : T(1), + x.y < edge ? T(0) : T(1), + x.z < edge ? T(0) : T(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 step + ( + typename detail::tvec4::value_type const & edge, + detail::tvec4 const & x + ) + { + return detail::tvec4( + x.x < edge ? T(0) : T(1), + x.y < edge ? T(0) : T(1), + x.z < edge ? T(0) : T(1), + x.w < edge ? T(0) : T(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 step + ( + detail::tvec2 const & edge, + detail::tvec2 const & x + ) + { + return detail::tvec2( + x.x < edge.x ? T(0) : T(1), + x.y < edge.y ? T(0) : T(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 step + ( + detail::tvec3 const & edge, + detail::tvec3 const & x + ) + { + return detail::tvec3( + x.x < edge.x ? T(0) : T(1), + x.y < edge.y ? T(0) : T(1), + x.z < edge.z ? T(0) : T(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 step + ( + detail::tvec4 const & edge, + detail::tvec4 const & x + ) + { + return detail::tvec4( + x.x < edge.x ? T(0) : T(1), + x.y < edge.y ? T(0) : T(1), + x.z < edge.z ? T(0) : T(1), + x.w < edge.w ? T(0) : T(1)); + } + + // smoothstep + template + GLM_FUNC_QUALIFIER genType smoothstep + ( + genType const & edge0, + genType const & edge1, + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'smoothstep' only accept floating-point inputs"); + + genType tmp = clamp((x - edge0) / (edge1 - edge0), genType(0), genType(1)); + return tmp * tmp * (genType(3) - genType(2) * tmp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 smoothstep + ( + typename detail::tvec2::value_type const & edge0, + typename detail::tvec2::value_type const & edge1, + detail::tvec2 const & x + ) + { + return detail::tvec2( + smoothstep(edge0, edge1, x.x), + smoothstep(edge0, edge1, x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 smoothstep + ( + typename detail::tvec3::value_type const & edge0, + typename detail::tvec3::value_type const & edge1, + detail::tvec3 const & x + ) + { + return detail::tvec3( + smoothstep(edge0, edge1, x.x), + smoothstep(edge0, edge1, x.y), + smoothstep(edge0, edge1, x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 smoothstep + ( + typename detail::tvec4::value_type const & edge0, + typename detail::tvec4::value_type const & edge1, + detail::tvec4 const & x + ) + { + return detail::tvec4( + smoothstep(edge0, edge1, x.x), + smoothstep(edge0, edge1, x.y), + smoothstep(edge0, edge1, x.z), + smoothstep(edge0, edge1, x.w)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 smoothstep + ( + detail::tvec2 const & edge0, + detail::tvec2 const & edge1, + detail::tvec2 const & x + ) + { + return detail::tvec2( + smoothstep(edge0.x, edge1.x, x.x), + smoothstep(edge0.y, edge1.y, x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 smoothstep + ( + detail::tvec3 const & edge0, + detail::tvec3 const & edge1, + detail::tvec3 const & x + ) + { + return detail::tvec3( + smoothstep(edge0.x, edge1.x, x.x), + smoothstep(edge0.y, edge1.y, x.y), + smoothstep(edge0.z, edge1.z, x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 smoothstep + ( + detail::tvec4 const & edge0, + detail::tvec4 const & edge1, + detail::tvec4 const & x + ) + { + return detail::tvec4( + smoothstep(edge0.x, edge1.x, x.x), + smoothstep(edge0.y, edge1.y, x.y), + smoothstep(edge0.z, edge1.z, x.z), + smoothstep(edge0.w, edge1.w, x.w)); + } + + // TODO: Not working on MinGW... + template + GLM_FUNC_QUALIFIER bool isnan(genType const & x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'isnan' only accept floating-point inputs"); + +# if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL)) + return _isnan(x) != 0; +# elif(GLM_COMPILER & GLM_COMPILER_GCC) +# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) + return _isnan(x) != 0; +# else + return std::isnan(x); +# endif +# else + return std::isnan(x); +# endif + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec2::bool_type isnan + ( + detail::tvec2 const & x + ) + { + return typename detail::tvec2::bool_type( + isnan(x.x), + isnan(x.y)); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec3::bool_type isnan + ( + detail::tvec3 const & x + ) + { + return typename detail::tvec3::bool_type( + isnan(x.x), + isnan(x.y), + isnan(x.z)); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec4::bool_type isnan + ( + detail::tvec4 const & x + ) + { + return typename detail::tvec4::bool_type( + isnan(x.x), + isnan(x.y), + isnan(x.z), + isnan(x.w)); + } + + template + GLM_FUNC_QUALIFIER bool isinf( + genType const & x) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'isinf' only accept floating-point inputs"); + +# if(GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC)) + return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF; +# elif(GLM_COMPILER & GLM_COMPILER_GCC) +# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) + return _isinf(x) != 0; +# else + return std::isinf(x); +# endif +# else + return std::isinf(x); +# endif +/* +# if(GLM_COMPILER & GLM_COMPILER_VC) + return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF; +# elif(GLM_COMPILER & GLM_COMPILER_GCC) +# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) + return _isinf(x) != 0; +# else + return std::isinf(x); +# endif +# elif(GLM_COMPILER & GLM_COMPILER_INTEL) + return isinf(x) != 0; +# else + return std::isinf(x); +# endif +*/ + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec2::bool_type isinf + ( + detail::tvec2 const & x + ) + { + return typename detail::tvec2::bool_type( + isinf(x.x), + isinf(x.y)); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec3::bool_type isinf + ( + detail::tvec3 const & x + ) + { + return typename detail::tvec3::bool_type( + isinf(x.x), + isinf(x.y), + isinf(x.z)); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec4::bool_type isinf + ( + detail::tvec4 const & x + ) + { + return typename detail::tvec4::bool_type( + isinf(x.x), + isinf(x.y), + isinf(x.z), + isinf(x.w)); + } + + GLM_FUNC_QUALIFIER int floatBitsToInt(float const & value) + { + union + { + float f; + int i; + } fi; + + fi.f = value; + return fi.i; + } + + GLM_FUNC_QUALIFIER detail::tvec2 floatBitsToInt + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + floatBitsToInt(value.x), + floatBitsToInt(value.y)); + } + + GLM_FUNC_QUALIFIER detail::tvec3 floatBitsToInt + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + floatBitsToInt(value.x), + floatBitsToInt(value.y), + floatBitsToInt(value.z)); + } + + GLM_FUNC_QUALIFIER detail::tvec4 floatBitsToInt + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + floatBitsToInt(value.x), + floatBitsToInt(value.y), + floatBitsToInt(value.z), + floatBitsToInt(value.w)); + } + + GLM_FUNC_QUALIFIER uint floatBitsToUint(float const & value) + { + union + { + float f; + uint u; + } fu; + + fu.f = value; + return fu.u; + } + + GLM_FUNC_QUALIFIER detail::tvec2 floatBitsToUint + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + floatBitsToUint(value.x), + floatBitsToUint(value.y)); + } + + GLM_FUNC_QUALIFIER detail::tvec3 floatBitsToUint + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + floatBitsToUint(value.x), + floatBitsToUint(value.y), + floatBitsToUint(value.z)); + } + + GLM_FUNC_QUALIFIER detail::tvec4 floatBitsToUint + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + floatBitsToUint(value.x), + floatBitsToUint(value.y), + floatBitsToUint(value.z), + floatBitsToUint(value.w)); + } + + GLM_FUNC_QUALIFIER float intBitsToFloat(int const & value) + { + union + { + float f; + int i; + } fi; + + fi.i = value; + return fi.f; + } + + GLM_FUNC_QUALIFIER detail::tvec2 intBitsToFloat + + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + intBitsToFloat(value.x), + intBitsToFloat(value.y)); + } + + GLM_FUNC_QUALIFIER detail::tvec3 intBitsToFloat + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + intBitsToFloat(value.x), + intBitsToFloat(value.y), + intBitsToFloat(value.z)); + } + + GLM_FUNC_QUALIFIER detail::tvec4 intBitsToFloat + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + intBitsToFloat(value.x), + intBitsToFloat(value.y), + intBitsToFloat(value.z), + intBitsToFloat(value.w)); + } + + GLM_FUNC_QUALIFIER float uintBitsToFloat(uint const & value) + { + union + { + float f; + uint u; + } fu; + + fu.u = value; + return fu.f; + } + + GLM_FUNC_QUALIFIER detail::tvec2 uintBitsToFloat + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + uintBitsToFloat(value.x), + uintBitsToFloat(value.y)); + } + + GLM_FUNC_QUALIFIER detail::tvec3 uintBitsToFloat + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + uintBitsToFloat(value.x), + uintBitsToFloat(value.y), + uintBitsToFloat(value.z)); + } + + GLM_FUNC_QUALIFIER detail::tvec4 uintBitsToFloat + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + uintBitsToFloat(value.x), + uintBitsToFloat(value.y), + uintBitsToFloat(value.z), + uintBitsToFloat(value.w)); + } + + template + GLM_FUNC_QUALIFIER genType fma + ( + genType const & a, + genType const & b, + genType const & c + ) + { + return a * b + c; + } + + template + GLM_FUNC_QUALIFIER genType frexp + ( + genType const & x, + int & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 frexp + ( + detail::tvec2 const & x, + detail::tvec2 & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 frexp + ( + detail::tvec3 const & x, + detail::tvec3 & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 frexp + ( + detail::tvec4 const & x, + detail::tvec4 & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER genType ldexp + ( + genType const & x, + int const & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 ldexp + ( + detail::tvec2 const & x, + detail::tvec2 const & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 ldexp + ( + detail::tvec3 const & x, + detail::tvec3 const & exp + ) + { + return std::frexp(x, exp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 ldexp + ( + detail::tvec4 const & x, + detail::tvec4 const & exp + ) + { + return std::frexp(x, exp); + } + +}//namespace glm diff --git a/include/gal/opengl/glm/core/func_exponential.hpp b/include/gal/opengl/glm/core/func_exponential.hpp index 37910aded2..557ac175d2 100644 --- a/include/gal/opengl/glm/core/func_exponential.hpp +++ b/include/gal/opengl/glm/core/func_exponential.hpp @@ -1,123 +1,123 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/func_exponential.hpp -/// @date 2008-08-08 / 2011-06-14 -/// @author Christophe Riccio -/// -/// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions -/// -/// @defgroup core_func_exponential Exponential functions -/// @ingroup core -/// -/// These all operate component-wise. The description is per component. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_func_exponential -#define glm_core_func_exponential GLM_VERSION - -namespace glm -{ - /// @addtogroup core_func_exponential - /// @{ - - /// Returns x raised to the y power. - /// - /// @param x pow function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision. - /// @param y - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL pow man page - /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions - template - genType pow(genType const & x, genType const & y); - - /// Returns the natural exponentiation of x, i.e., e^x. - /// - /// @param x exp function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision. - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL exp man page - /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions - template - genType exp(genType const & x); - - /// Returns the natural logarithm of x, i.e., - /// returns the value y which satisfies the equation x = e^y. - /// Results are undefined if x <= 0. - /// - /// @param x log function is defined for input values of x defined in the range (0, inf+) in the limit of the type precision. - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL log man page - /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions - template - genType log(genType const & x); - - /// Returns 2 raised to the x power. - /// - /// @param x exp2 function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision. - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL exp2 man page - /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions - template - genType exp2(genType const & x); - - /// Returns the base 2 log of x, i.e., returns the value y, - /// which satisfies the equation x = 2 ^ y. - /// - /// @param x log2 function is defined for input values of x defined in the range (0, inf+) in the limit of the type precision. - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL log2 man page - /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions - template - genType log2(genType const & x); - - /// Returns the positive square root of x. - /// - /// @param x sqrt function is defined for input values of x defined in the range [0, inf+) in the limit of the type precision. - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL sqrt man page - /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions - template - genType sqrt(genType const & x); - - /// Returns the reciprocal of the positive square root of x. - /// - /// @param x inversesqrt function is defined for input values of x defined in the range [0, inf+) in the limit of the type precision. - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL inversesqrt man page - /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions - template - genType inversesqrt(genType const & x); - - /// @} -}//namespace glm - -#include "func_exponential.inl" - -#endif//glm_core_func_exponential +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_exponential.hpp +/// @date 2008-08-08 / 2011-06-14 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions +/// +/// @defgroup core_func_exponential Exponential functions +/// @ingroup core +/// +/// These all operate component-wise. The description is per component. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_exponential +#define glm_core_func_exponential GLM_VERSION + +namespace glm +{ + /// @addtogroup core_func_exponential + /// @{ + + /// Returns x raised to the y power. + /// + /// @param x pow function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision. + /// @param y + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL pow man page + /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions + template + genType pow(genType const & x, genType const & y); + + /// Returns the natural exponentiation of x, i.e., e^x. + /// + /// @param x exp function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision. + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL exp man page + /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions + template + genType exp(genType const & x); + + /// Returns the natural logarithm of x, i.e., + /// returns the value y which satisfies the equation x = e^y. + /// Results are undefined if x <= 0. + /// + /// @param x log function is defined for input values of x defined in the range (0, inf+) in the limit of the type precision. + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL log man page + /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions + template + genType log(genType const & x); + + /// Returns 2 raised to the x power. + /// + /// @param x exp2 function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision. + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL exp2 man page + /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions + template + genType exp2(genType const & x); + + /// Returns the base 2 log of x, i.e., returns the value y, + /// which satisfies the equation x = 2 ^ y. + /// + /// @param x log2 function is defined for input values of x defined in the range (0, inf+) in the limit of the type precision. + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL log2 man page + /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions + template + genType log2(genType const & x); + + /// Returns the positive square root of x. + /// + /// @param x sqrt function is defined for input values of x defined in the range [0, inf+) in the limit of the type precision. + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL sqrt man page + /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions + template + genType sqrt(genType const & x); + + /// Returns the reciprocal of the positive square root of x. + /// + /// @param x inversesqrt function is defined for input values of x defined in the range [0, inf+) in the limit of the type precision. + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL inversesqrt man page + /// @see GLSL 4.20.8 specification, section 8.2 Exponential Functions + template + genType inversesqrt(genType const & x); + + /// @} +}//namespace glm + +#include "func_exponential.inl" + +#endif//glm_core_func_exponential diff --git a/include/gal/opengl/glm/core/func_exponential.inl b/include/gal/opengl/glm/core/func_exponential.inl index 9b87b9c1d5..6ae709c6de 100644 --- a/include/gal/opengl/glm/core/func_exponential.inl +++ b/include/gal/opengl/glm/core/func_exponential.inl @@ -1,155 +1,155 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/func_exponential.inl -/// @date 2008-08-03 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - // pow - template - GLM_FUNC_QUALIFIER genType pow - ( - genType const & x, - genType const & y - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'pow' only accept floating-point input"); - - return genType(::std::pow(x, y)); - } - - VECTORIZE_VEC_VEC(pow) - - // exp - template - GLM_FUNC_QUALIFIER genType exp - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'exp' only accept floating-point input"); - - return genType(::std::exp(x)); - } - - VECTORIZE_VEC(exp) - - // log - template - GLM_FUNC_QUALIFIER genType log - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'log' only accept floating-point input"); - - return genType(::std::log(x)); - } - - VECTORIZE_VEC(log) - - //exp2, ln2 = 0.69314718055994530941723212145818f - template - GLM_FUNC_QUALIFIER genType exp2 - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'exp2' only accept floating-point input"); - - return genType(::std::exp(genType(0.69314718055994530941723212145818) * x)); - } - - VECTORIZE_VEC(exp2) - -namespace _detail -{ - template - struct _compute_log2 - { - template - T operator() (T const & Value) const; -/* - { - GLM_STATIC_ASSERT(0, "'log2' parameter has an invalid template parameter type. GLM core features only supports floating-point types, include for integer types support. Others types are not supported."); - return Value; - } -*/ - }; - - template <> - struct _compute_log2 - { - template - T operator() (T const & Value) const - { - return T(::std::log(Value)) / T(0.69314718055994530941723212145818); - } - }; - -}//namespace _detail - - // log2, ln2 = 0.69314718055994530941723212145818f - template - GLM_FUNC_QUALIFIER genType log2 - ( - genType const & x - ) - { - assert(x > genType(0)); // log2 is only defined on the range (0, inf] - return _detail::_compute_log2::ID>()(x); - } - - VECTORIZE_VEC(log2) - - // sqrt - template - GLM_FUNC_QUALIFIER genType sqrt - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'sqrt' only accept floating-point input"); - - return genType(::std::sqrt(x)); - } - - VECTORIZE_VEC(sqrt) - - template - GLM_FUNC_QUALIFIER genType inversesqrt - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'inversesqrt' only accept floating-point input"); - - return genType(1) / ::std::sqrt(x); - } - - VECTORIZE_VEC(inversesqrt) - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_exponential.inl +/// @date 2008-08-03 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + // pow + template + GLM_FUNC_QUALIFIER genType pow + ( + genType const & x, + genType const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'pow' only accept floating-point input"); + + return genType(::std::pow(x, y)); + } + + VECTORIZE_VEC_VEC(pow) + + // exp + template + GLM_FUNC_QUALIFIER genType exp + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'exp' only accept floating-point input"); + + return genType(::std::exp(x)); + } + + VECTORIZE_VEC(exp) + + // log + template + GLM_FUNC_QUALIFIER genType log + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'log' only accept floating-point input"); + + return genType(::std::log(x)); + } + + VECTORIZE_VEC(log) + + //exp2, ln2 = 0.69314718055994530941723212145818f + template + GLM_FUNC_QUALIFIER genType exp2 + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'exp2' only accept floating-point input"); + + return genType(::std::exp(genType(0.69314718055994530941723212145818) * x)); + } + + VECTORIZE_VEC(exp2) + +namespace _detail +{ + template + struct _compute_log2 + { + template + T operator() (T const & Value) const; +/* + { + GLM_STATIC_ASSERT(0, "'log2' parameter has an invalid template parameter type. GLM core features only supports floating-point types, include for integer types support. Others types are not supported."); + return Value; + } +*/ + }; + + template <> + struct _compute_log2 + { + template + T operator() (T const & Value) const + { + return T(::std::log(Value)) / T(0.69314718055994530941723212145818); + } + }; + +}//namespace _detail + + // log2, ln2 = 0.69314718055994530941723212145818f + template + GLM_FUNC_QUALIFIER genType log2 + ( + genType const & x + ) + { + assert(x > genType(0)); // log2 is only defined on the range (0, inf] + return _detail::_compute_log2::ID>()(x); + } + + VECTORIZE_VEC(log2) + + // sqrt + template + GLM_FUNC_QUALIFIER genType sqrt + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'sqrt' only accept floating-point input"); + + return genType(::std::sqrt(x)); + } + + VECTORIZE_VEC(sqrt) + + template + GLM_FUNC_QUALIFIER genType inversesqrt + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'inversesqrt' only accept floating-point input"); + + return genType(1) / ::std::sqrt(x); + } + + VECTORIZE_VEC(inversesqrt) + +}//namespace glm diff --git a/include/gal/opengl/glm/core/func_geometric.hpp b/include/gal/opengl/glm/core/func_geometric.hpp index 53757da910..1c92e1b88b 100644 --- a/include/gal/opengl/glm/core/func_geometric.hpp +++ b/include/gal/opengl/glm/core/func_geometric.hpp @@ -1,138 +1,138 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/func_geometric.hpp -/// @date 2008-08-03 / 2011-06-14 -/// @author Christophe Riccio -/// -/// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions -/// -/// @defgroup core_func_geometric Geometric functions -/// @ingroup core -/// -/// These operate on vectors as vectors, not component-wise. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_func_geometric -#define glm_core_func_geometric GLM_VERSION - -namespace glm -{ - /// @addtogroup core_func_geometric - /// @{ - - /// Returns the length of x, i.e., sqrt(x * x). - /// - /// @tparam genType Floating-point vector types. - /// - /// @see GLSL length man page - /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions - template - typename genType::value_type length( - genType const & x); - - /// Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). - /// - /// @tparam genType Floating-point vector types. - /// - /// @see GLSL distance man page - /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions - template - typename genType::value_type distance( - genType const & p0, - genType const & p1); - - /// Returns the dot product of x and y, i.e., result = x * y. - /// - /// @tparam genType Floating-point vector types. - /// - /// @see GLSL dot man page - /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions - template - typename genType::value_type dot( - genType const & x, - genType const & y); - - /// Returns the cross product of x and y. - /// - /// @tparam valType Floating-point scalar types. - /// - /// @see GLSL cross man page - /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions - template - detail::tvec3 cross( - detail::tvec3 const & x, - detail::tvec3 const & y); - - /// Returns a vector in the same direction as x but with length of 1. - /// - /// @see GLSL normalize man page - /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions - template - genType normalize( - genType const & x); - - /// If dot(Nref, I) < 0.0, return N, otherwise, return -N. - /// - /// @tparam genType Floating-point vector types. - /// - /// @see GLSL faceforward man page - /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions - template - genType faceforward( - genType const & N, - genType const & I, - genType const & Nref); - - /// For the incident vector I and surface orientation N, - /// returns the reflection direction : result = I - 2.0 * dot(N, I) * N. - /// - /// @tparam genType Floating-point vector types. - /// - /// @see GLSL reflect man page - /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions - template - genType reflect( - genType const & I, - genType const & N); - - /// For the incident vector I and surface normal N, - /// and the ratio of indices of refraction eta, - /// return the refraction vector. - /// - /// @tparam genType Floating-point vector types. - /// - /// @see GLSL refract man page - /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions - template - genType refract( - genType const & I, - genType const & N, - typename genType::value_type const & eta); - - /// @} -}//namespace glm - -#include "func_geometric.inl" - -#endif//glm_core_func_geometric +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_geometric.hpp +/// @date 2008-08-03 / 2011-06-14 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions +/// +/// @defgroup core_func_geometric Geometric functions +/// @ingroup core +/// +/// These operate on vectors as vectors, not component-wise. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_geometric +#define glm_core_func_geometric GLM_VERSION + +namespace glm +{ + /// @addtogroup core_func_geometric + /// @{ + + /// Returns the length of x, i.e., sqrt(x * x). + /// + /// @tparam genType Floating-point vector types. + /// + /// @see GLSL length man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + typename genType::value_type length( + genType const & x); + + /// Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). + /// + /// @tparam genType Floating-point vector types. + /// + /// @see GLSL distance man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + typename genType::value_type distance( + genType const & p0, + genType const & p1); + + /// Returns the dot product of x and y, i.e., result = x * y. + /// + /// @tparam genType Floating-point vector types. + /// + /// @see GLSL dot man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + typename genType::value_type dot( + genType const & x, + genType const & y); + + /// Returns the cross product of x and y. + /// + /// @tparam valType Floating-point scalar types. + /// + /// @see GLSL cross man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + detail::tvec3 cross( + detail::tvec3 const & x, + detail::tvec3 const & y); + + /// Returns a vector in the same direction as x but with length of 1. + /// + /// @see GLSL normalize man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + genType normalize( + genType const & x); + + /// If dot(Nref, I) < 0.0, return N, otherwise, return -N. + /// + /// @tparam genType Floating-point vector types. + /// + /// @see GLSL faceforward man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + genType faceforward( + genType const & N, + genType const & I, + genType const & Nref); + + /// For the incident vector I and surface orientation N, + /// returns the reflection direction : result = I - 2.0 * dot(N, I) * N. + /// + /// @tparam genType Floating-point vector types. + /// + /// @see GLSL reflect man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + genType reflect( + genType const & I, + genType const & N); + + /// For the incident vector I and surface normal N, + /// and the ratio of indices of refraction eta, + /// return the refraction vector. + /// + /// @tparam genType Floating-point vector types. + /// + /// @see GLSL refract man page + /// @see GLSL 4.20.8 specification, section 8.5 Geometric Functions + template + genType refract( + genType const & I, + genType const & N, + typename genType::value_type const & eta); + + /// @} +}//namespace glm + +#include "func_geometric.inl" + +#endif//glm_core_func_geometric diff --git a/include/gal/opengl/glm/core/func_geometric.inl b/include/gal/opengl/glm/core/func_geometric.inl index 9ae20f0d69..1923d05d1b 100644 --- a/include/gal/opengl/glm/core/func_geometric.inl +++ b/include/gal/opengl/glm/core/func_geometric.inl @@ -1,322 +1,322 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/func_geometric.inl -/// @date 2008-08-03 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - // length - template - GLM_FUNC_QUALIFIER genType length - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'length' only accept floating-point inputs"); - - genType sqr = x * x; - return sqrt(sqr); - } - - template - GLM_FUNC_QUALIFIER typename detail::tvec2::value_type length - ( - detail::tvec2 const & v - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'length' only accept floating-point inputs"); - - typename detail::tvec2::value_type sqr = v.x * v.x + v.y * v.y; - return sqrt(sqr); - } - - template - GLM_FUNC_QUALIFIER typename detail::tvec3::value_type length - ( - detail::tvec3 const & v - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'length' only accept floating-point inputs"); - - typename detail::tvec3::value_type sqr = v.x * v.x + v.y * v.y + v.z * v.z; - return sqrt(sqr); - } - - template - GLM_FUNC_QUALIFIER typename detail::tvec4::value_type length - ( - detail::tvec4 const & v - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'length' only accept floating-point inputs"); - - typename detail::tvec4::value_type sqr = v.x * v.x + v.y * v.y + v.z * v.z + v.w * v.w; - return sqrt(sqr); - } - - // distance - template - GLM_FUNC_QUALIFIER genType distance - ( - genType const & p0, - genType const & p1 - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'distance' only accept floating-point inputs"); - - return length(p1 - p0); - } - - template - GLM_FUNC_QUALIFIER typename detail::tvec2::value_type distance - ( - detail::tvec2 const & p0, - detail::tvec2 const & p1 - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'distance' only accept floating-point inputs"); - - return length(p1 - p0); - } - - template - GLM_FUNC_QUALIFIER typename detail::tvec3::value_type distance - ( - detail::tvec3 const & p0, - detail::tvec3 const & p1 - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'distance' only accept floating-point inputs"); - - return length(p1 - p0); - } - - template - GLM_FUNC_QUALIFIER typename detail::tvec4::value_type distance - ( - detail::tvec4 const & p0, - detail::tvec4 const & p1 - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'distance' only accept floating-point inputs"); - - return length(p1 - p0); - } - - // dot - template - GLM_FUNC_QUALIFIER genType dot - ( - genType const & x, - genType const & y - - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'dot' only accept floating-point inputs"); - - return x * y; - } - - template - GLM_FUNC_QUALIFIER typename detail::tvec2::value_type dot - ( - detail::tvec2 const & x, - detail::tvec2 const & y - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'dot' only accept floating-point inputs"); - - return x.x * y.x + x.y * y.y; - } - - template - GLM_FUNC_QUALIFIER T dot - ( - detail::tvec3 const & x, - detail::tvec3 const & y - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'dot' only accept floating-point inputs"); - - return x.x * y.x + x.y * y.y + x.z * y.z; - } -/* // SSE3 - GLM_FUNC_QUALIFIER float dot(const tvec4& x, const tvec4& y) - { - float Result; - __asm - { - mov esi, x - mov edi, y - movaps xmm0, [esi] - mulps xmm0, [edi] - haddps( _xmm0, _xmm0 ) - haddps( _xmm0, _xmm0 ) - movss Result, xmm0 - } - return Result; - } -*/ - template - GLM_FUNC_QUALIFIER T dot - ( - detail::tvec4 const & x, - detail::tvec4 const & y - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'dot' only accept floating-point inputs"); - - return x.x * y.x + x.y * y.y + x.z * y.z + x.w * y.w; - } - - // cross - template - GLM_FUNC_QUALIFIER detail::tvec3 cross - ( - detail::tvec3 const & x, - detail::tvec3 const & y - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'cross' only accept floating-point inputs"); - - return detail::tvec3( - x.y * y.z - y.y * x.z, - x.z * y.x - y.z * x.x, - x.x * y.y - y.x * x.y); - } - - // normalize - template - GLM_FUNC_QUALIFIER genType normalize - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'normalize' only accept floating-point inputs"); - - return x < genType(0) ? genType(-1) : genType(1); - } - - // According to issue 10 GLSL 1.10 specification, if length(x) == 0 then result is undefine and generate an error - template - GLM_FUNC_QUALIFIER detail::tvec2 normalize - ( - detail::tvec2 const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'normalize' only accept floating-point inputs"); - - typename detail::tvec2::value_type sqr = x.x * x.x + x.y * x.y; - return x * inversesqrt(sqr); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 normalize - ( - detail::tvec3 const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'normalize' only accept floating-point inputs"); - - typename detail::tvec3::value_type sqr = x.x * x.x + x.y * x.y + x.z * x.z; - return x * inversesqrt(sqr); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 normalize - ( - detail::tvec4 const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'normalize' only accept floating-point inputs"); - - typename detail::tvec4::value_type sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w; - return x * inversesqrt(sqr); - } - - // faceforward - template - GLM_FUNC_QUALIFIER genType faceforward - ( - genType const & N, - genType const & I, - genType const & Nref - ) - { - return dot(Nref, I) < 0 ? N : -N; - } - - // reflect - template - genType reflect - ( - genType const & I, - genType const & N - ) - { - return I - N * dot(N, I) * genType(2); - } - - // refract - template - GLM_FUNC_QUALIFIER genType refract - ( - genType const & I, - genType const & N, - genType const & eta - ) - { - //It could be a vector - //GLM_STATIC_ASSERT(detail::type::is_float); - - genType dotValue = dot(N, I); - genType k = genType(1) - eta * eta * (genType(1) - dotValue * dotValue); - if(k < genType(0)) - return genType(0); - else - return eta * I - (eta * dotValue + sqrt(k)) * N; - } - - template - GLM_FUNC_QUALIFIER genType refract - ( - genType const & I, - genType const & N, - typename genType::value_type const & eta - ) - { - //It could be a vector - //GLM_STATIC_ASSERT(detail::type::is_float); - - typename genType::value_type dotValue = dot(N, I); - typename genType::value_type k = typename genType::value_type(1) - eta * eta * (typename genType::value_type(1) - dotValue * dotValue); - if(k < typename genType::value_type(0)) - return genType(0); - else - return eta * I - (eta * dotValue + sqrt(k)) * N; - } - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_geometric.inl +/// @date 2008-08-03 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + // length + template + GLM_FUNC_QUALIFIER genType length + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'length' only accept floating-point inputs"); + + genType sqr = x * x; + return sqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec2::value_type length + ( + detail::tvec2 const & v + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'length' only accept floating-point inputs"); + + typename detail::tvec2::value_type sqr = v.x * v.x + v.y * v.y; + return sqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec3::value_type length + ( + detail::tvec3 const & v + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'length' only accept floating-point inputs"); + + typename detail::tvec3::value_type sqr = v.x * v.x + v.y * v.y + v.z * v.z; + return sqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec4::value_type length + ( + detail::tvec4 const & v + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'length' only accept floating-point inputs"); + + typename detail::tvec4::value_type sqr = v.x * v.x + v.y * v.y + v.z * v.z + v.w * v.w; + return sqrt(sqr); + } + + // distance + template + GLM_FUNC_QUALIFIER genType distance + ( + genType const & p0, + genType const & p1 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'distance' only accept floating-point inputs"); + + return length(p1 - p0); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec2::value_type distance + ( + detail::tvec2 const & p0, + detail::tvec2 const & p1 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'distance' only accept floating-point inputs"); + + return length(p1 - p0); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec3::value_type distance + ( + detail::tvec3 const & p0, + detail::tvec3 const & p1 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'distance' only accept floating-point inputs"); + + return length(p1 - p0); + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec4::value_type distance + ( + detail::tvec4 const & p0, + detail::tvec4 const & p1 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'distance' only accept floating-point inputs"); + + return length(p1 - p0); + } + + // dot + template + GLM_FUNC_QUALIFIER genType dot + ( + genType const & x, + genType const & y + + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'dot' only accept floating-point inputs"); + + return x * y; + } + + template + GLM_FUNC_QUALIFIER typename detail::tvec2::value_type dot + ( + detail::tvec2 const & x, + detail::tvec2 const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'dot' only accept floating-point inputs"); + + return x.x * y.x + x.y * y.y; + } + + template + GLM_FUNC_QUALIFIER T dot + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'dot' only accept floating-point inputs"); + + return x.x * y.x + x.y * y.y + x.z * y.z; + } +/* // SSE3 + GLM_FUNC_QUALIFIER float dot(const tvec4& x, const tvec4& y) + { + float Result; + __asm + { + mov esi, x + mov edi, y + movaps xmm0, [esi] + mulps xmm0, [edi] + haddps( _xmm0, _xmm0 ) + haddps( _xmm0, _xmm0 ) + movss Result, xmm0 + } + return Result; + } +*/ + template + GLM_FUNC_QUALIFIER T dot + ( + detail::tvec4 const & x, + detail::tvec4 const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'dot' only accept floating-point inputs"); + + return x.x * y.x + x.y * y.y + x.z * y.z + x.w * y.w; + } + + // cross + template + GLM_FUNC_QUALIFIER detail::tvec3 cross + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'cross' only accept floating-point inputs"); + + return detail::tvec3( + x.y * y.z - y.y * x.z, + x.z * y.x - y.z * x.x, + x.x * y.y - y.x * x.y); + } + + // normalize + template + GLM_FUNC_QUALIFIER genType normalize + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'normalize' only accept floating-point inputs"); + + return x < genType(0) ? genType(-1) : genType(1); + } + + // According to issue 10 GLSL 1.10 specification, if length(x) == 0 then result is undefine and generate an error + template + GLM_FUNC_QUALIFIER detail::tvec2 normalize + ( + detail::tvec2 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'normalize' only accept floating-point inputs"); + + typename detail::tvec2::value_type sqr = x.x * x.x + x.y * x.y; + return x * inversesqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 normalize + ( + detail::tvec3 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'normalize' only accept floating-point inputs"); + + typename detail::tvec3::value_type sqr = x.x * x.x + x.y * x.y + x.z * x.z; + return x * inversesqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 normalize + ( + detail::tvec4 const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'normalize' only accept floating-point inputs"); + + typename detail::tvec4::value_type sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w; + return x * inversesqrt(sqr); + } + + // faceforward + template + GLM_FUNC_QUALIFIER genType faceforward + ( + genType const & N, + genType const & I, + genType const & Nref + ) + { + return dot(Nref, I) < 0 ? N : -N; + } + + // reflect + template + genType reflect + ( + genType const & I, + genType const & N + ) + { + return I - N * dot(N, I) * genType(2); + } + + // refract + template + GLM_FUNC_QUALIFIER genType refract + ( + genType const & I, + genType const & N, + genType const & eta + ) + { + //It could be a vector + //GLM_STATIC_ASSERT(detail::type::is_float); + + genType dotValue = dot(N, I); + genType k = genType(1) - eta * eta * (genType(1) - dotValue * dotValue); + if(k < genType(0)) + return genType(0); + else + return eta * I - (eta * dotValue + sqrt(k)) * N; + } + + template + GLM_FUNC_QUALIFIER genType refract + ( + genType const & I, + genType const & N, + typename genType::value_type const & eta + ) + { + //It could be a vector + //GLM_STATIC_ASSERT(detail::type::is_float); + + typename genType::value_type dotValue = dot(N, I); + typename genType::value_type k = typename genType::value_type(1) - eta * eta * (typename genType::value_type(1) - dotValue * dotValue); + if(k < typename genType::value_type(0)) + return genType(0); + else + return eta * I - (eta * dotValue + sqrt(k)) * N; + } + +}//namespace glm diff --git a/include/gal/opengl/glm/core/func_integer.hpp b/include/gal/opengl/glm/core/func_integer.hpp index 9541f7f3c1..affbcd8fa5 100644 --- a/include/gal/opengl/glm/core/func_integer.hpp +++ b/include/gal/opengl/glm/core/func_integer.hpp @@ -1,201 +1,201 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/func_integer.hpp -/// @date 2010-03-17 / 2011-06-18 -/// @author Christophe Riccio -/// -/// @see GLSL 4.20.8 specification, section 8.8 Integer Functions -/// -/// @defgroup core_func_integer Integer functions -/// @ingroup core -/// -/// These all operate component-wise. The description is per component. -/// The notation [a, b] means the set of bits from bit-number a through bit-number -/// b, inclusive. The lowest-order bit is bit 0. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_func_integer -#define glm_core_func_integer GLM_VERSION - -namespace glm -{ - /// @addtogroup core_func_integer - /// @{ - - /// Adds 32-bit unsigned integer x and y, returning the sum - /// modulo pow(2, 32). The value carry is set to 0 if the sum was - /// less than pow(2, 32), or to 1 otherwise. - /// - /// @tparam genUType Unsigned integer scalar or vector types. - /// - /// @see GLSL uaddCarry man page - /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions - template - genUType uaddCarry( - genUType const & x, - genUType const & y, - genUType & carry); - - /// Subtracts the 32-bit unsigned integer y from x, returning - /// the difference if non-negative, or pow(2, 32) plus the difference - /// otherwise. The value borrow is set to 0 if x >= y, or to 1 otherwise. - /// - /// @tparam genUType Unsigned integer scalar or vector types. - /// - /// @see GLSL usubBorrow man page - /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions - template - genUType usubBorrow( - genUType const & x, - genUType const & y, - genUType & borrow); - - /// Multiplies 32-bit integers x and y, producing a 64-bit - /// result. The 32 least-significant bits are returned in lsb. - /// The 32 most-significant bits are returned in msb. - /// - /// @tparam genUType Unsigned integer scalar or vector types. - /// - /// @see GLSL umulExtended man page - /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions - template - void umulExtended( - genUType const & x, - genUType const & y, - genUType & msb, - genUType & lsb); - - /// Multiplies 32-bit integers x and y, producing a 64-bit - /// result. The 32 least-significant bits are returned in lsb. - /// The 32 most-significant bits are returned in msb. - /// - /// @tparam genIType Signed integer scalar or vector types. - /// - /// @see GLSL imulExtended man page - /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions - template - void imulExtended( - genIType const & x, - genIType const & y, - genIType & msb, - genIType & lsb); - - /// Extracts bits [offset, offset + bits - 1] from value, - /// returning them in the least significant bits of the result. - /// For unsigned data types, the most significant bits of the - /// result will be set to zero. For signed data types, the - /// most significant bits will be set to the value of bit offset + base – 1. - /// - /// If bits is zero, the result will be zero. The result will be - /// undefined if offset or bits is negative, or if the sum of - /// offset and bits is greater than the number of bits used - /// to store the operand. - /// - /// @tparam genIUType Signed or unsigned integer scalar or vector types. - /// - /// @see GLSL bitfieldExtract man page - /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions - template - genIUType bitfieldExtract( - genIUType const & Value, - int const & Offset, - int const & Bits); - - /// Returns the insertion the bits least-significant bits of insert into base. - /// - /// The result will have bits [offset, offset + bits - 1] taken - /// from bits [0, bits – 1] of insert, and all other bits taken - /// directly from the corresponding bits of base. If bits is - /// zero, the result will simply be base. The result will be - /// undefined if offset or bits is negative, or if the sum of - /// offset and bits is greater than the number of bits used to - /// store the operand. - /// - /// @tparam genIUType Signed or unsigned integer scalar or vector types. - /// - /// @see GLSL bitfieldInsert man page - /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions - template - genIUType bitfieldInsert( - genIUType const & Base, - genIUType const & Insert, - int const & Offset, - int const & Bits); - - /// Returns the reversal of the bits of value. - /// The bit numbered n of the result will be taken from bit (bits - 1) - n of value, - /// where bits is the total number of bits used to represent value. - /// - /// @tparam genIUType Signed or unsigned integer scalar or vector types. - /// - /// @see GLSL bitfieldReverse man page - /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions - template - genIUType bitfieldReverse(genIUType const & Value); - - /// Returns the number of bits set to 1 in the binary representation of value. - /// - /// @tparam genIUType Signed or unsigned integer scalar or vector types. - /// - /// @see GLSL bitCount man page - /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions - /// - /// @todo Clarify the declaration to specify that scalars are suported. - template class genIUType> - typename genIUType::signed_type bitCount(genIUType const & Value); - - /// Returns the bit number of the least significant bit set to - /// 1 in the binary representation of value. - /// If value is zero, -1 will be returned. - /// - /// @tparam genIUType Signed or unsigned integer scalar or vector types. - /// - /// @see GLSL findLSB man page - /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions - /// - /// @todo Clarify the declaration to specify that scalars are suported. - template class genIUType> - typename genIUType::signed_type findLSB(genIUType const & Value); - - /// Returns the bit number of the most significant bit in the binary representation of value. - /// For positive integers, the result will be the bit number of the most significant bit set to 1. - /// For negative integers, the result will be the bit number of the most significant - /// bit set to 0. For a value of zero or negative one, -1 will be returned. - /// - /// @tparam genIUType Signed or unsigned integer scalar or vector types. - /// - /// @see GLSL findMSB man page - /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions - /// - /// @todo Clarify the declaration to specify that scalars are suported. - template class genIUType> - typename genIUType::signed_type findMSB(genIUType const & Value); - - /// @} -}//namespace glm - -#include "func_integer.inl" - -#endif//glm_core_func_integer - +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_integer.hpp +/// @date 2010-03-17 / 2011-06-18 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.8 Integer Functions +/// +/// @defgroup core_func_integer Integer functions +/// @ingroup core +/// +/// These all operate component-wise. The description is per component. +/// The notation [a, b] means the set of bits from bit-number a through bit-number +/// b, inclusive. The lowest-order bit is bit 0. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_integer +#define glm_core_func_integer GLM_VERSION + +namespace glm +{ + /// @addtogroup core_func_integer + /// @{ + + /// Adds 32-bit unsigned integer x and y, returning the sum + /// modulo pow(2, 32). The value carry is set to 0 if the sum was + /// less than pow(2, 32), or to 1 otherwise. + /// + /// @tparam genUType Unsigned integer scalar or vector types. + /// + /// @see GLSL uaddCarry man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + template + genUType uaddCarry( + genUType const & x, + genUType const & y, + genUType & carry); + + /// Subtracts the 32-bit unsigned integer y from x, returning + /// the difference if non-negative, or pow(2, 32) plus the difference + /// otherwise. The value borrow is set to 0 if x >= y, or to 1 otherwise. + /// + /// @tparam genUType Unsigned integer scalar or vector types. + /// + /// @see GLSL usubBorrow man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + template + genUType usubBorrow( + genUType const & x, + genUType const & y, + genUType & borrow); + + /// Multiplies 32-bit integers x and y, producing a 64-bit + /// result. The 32 least-significant bits are returned in lsb. + /// The 32 most-significant bits are returned in msb. + /// + /// @tparam genUType Unsigned integer scalar or vector types. + /// + /// @see GLSL umulExtended man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + template + void umulExtended( + genUType const & x, + genUType const & y, + genUType & msb, + genUType & lsb); + + /// Multiplies 32-bit integers x and y, producing a 64-bit + /// result. The 32 least-significant bits are returned in lsb. + /// The 32 most-significant bits are returned in msb. + /// + /// @tparam genIType Signed integer scalar or vector types. + /// + /// @see GLSL imulExtended man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + template + void imulExtended( + genIType const & x, + genIType const & y, + genIType & msb, + genIType & lsb); + + /// Extracts bits [offset, offset + bits - 1] from value, + /// returning them in the least significant bits of the result. + /// For unsigned data types, the most significant bits of the + /// result will be set to zero. For signed data types, the + /// most significant bits will be set to the value of bit offset + base – 1. + /// + /// If bits is zero, the result will be zero. The result will be + /// undefined if offset or bits is negative, or if the sum of + /// offset and bits is greater than the number of bits used + /// to store the operand. + /// + /// @tparam genIUType Signed or unsigned integer scalar or vector types. + /// + /// @see GLSL bitfieldExtract man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + template + genIUType bitfieldExtract( + genIUType const & Value, + int const & Offset, + int const & Bits); + + /// Returns the insertion the bits least-significant bits of insert into base. + /// + /// The result will have bits [offset, offset + bits - 1] taken + /// from bits [0, bits – 1] of insert, and all other bits taken + /// directly from the corresponding bits of base. If bits is + /// zero, the result will simply be base. The result will be + /// undefined if offset or bits is negative, or if the sum of + /// offset and bits is greater than the number of bits used to + /// store the operand. + /// + /// @tparam genIUType Signed or unsigned integer scalar or vector types. + /// + /// @see GLSL bitfieldInsert man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + template + genIUType bitfieldInsert( + genIUType const & Base, + genIUType const & Insert, + int const & Offset, + int const & Bits); + + /// Returns the reversal of the bits of value. + /// The bit numbered n of the result will be taken from bit (bits - 1) - n of value, + /// where bits is the total number of bits used to represent value. + /// + /// @tparam genIUType Signed or unsigned integer scalar or vector types. + /// + /// @see GLSL bitfieldReverse man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + template + genIUType bitfieldReverse(genIUType const & Value); + + /// Returns the number of bits set to 1 in the binary representation of value. + /// + /// @tparam genIUType Signed or unsigned integer scalar or vector types. + /// + /// @see GLSL bitCount man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + /// + /// @todo Clarify the declaration to specify that scalars are suported. + template class genIUType> + typename genIUType::signed_type bitCount(genIUType const & Value); + + /// Returns the bit number of the least significant bit set to + /// 1 in the binary representation of value. + /// If value is zero, -1 will be returned. + /// + /// @tparam genIUType Signed or unsigned integer scalar or vector types. + /// + /// @see GLSL findLSB man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + /// + /// @todo Clarify the declaration to specify that scalars are suported. + template class genIUType> + typename genIUType::signed_type findLSB(genIUType const & Value); + + /// Returns the bit number of the most significant bit in the binary representation of value. + /// For positive integers, the result will be the bit number of the most significant bit set to 1. + /// For negative integers, the result will be the bit number of the most significant + /// bit set to 0. For a value of zero or negative one, -1 will be returned. + /// + /// @tparam genIUType Signed or unsigned integer scalar or vector types. + /// + /// @see GLSL findMSB man page + /// @see GLSL 4.20.8 specification, section 8.8 Integer Functions + /// + /// @todo Clarify the declaration to specify that scalars are suported. + template class genIUType> + typename genIUType::signed_type findMSB(genIUType const & Value); + + /// @} +}//namespace glm + +#include "func_integer.inl" + +#endif//glm_core_func_integer + diff --git a/include/gal/opengl/glm/core/func_integer.inl b/include/gal/opengl/glm/core/func_integer.inl index 4964526e9e..ae7bf8af36 100644 --- a/include/gal/opengl/glm/core/func_integer.inl +++ b/include/gal/opengl/glm/core/func_integer.inl @@ -1,646 +1,646 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/func_integer.inl -/// @date 2010-03-17 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#if(GLM_COMPILER & GLM_COMPILER_VC) -#include -#pragma intrinsic(_BitScanReverse) -#endif - -namespace glm -{ - // uaddCarry - template - GLM_FUNC_QUALIFIER genUType uaddCarry - ( - genUType const & x, - genUType const & y, - genUType & Carry - ) - { - detail::highp_uint_t Value64 = detail::highp_uint_t(x) + detail::highp_uint_t(y); - genUType Result = genUType(Value64 % (detail::highp_uint_t(1) << detail::highp_uint_t(32))); - Carry = (Value64 % (detail::highp_uint_t(1) << detail::highp_uint_t(32))) > 1 ? 1 : 0; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 uaddCarry - ( - detail::tvec2 const & x, - detail::tvec2 const & y, - detail::tvec2 & Carry - ) - { - return detail::tvec2( - uaddCarry(x[0], y[0], Carry[0]), - uaddCarry(x[1], y[1], Carry[1])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 uaddCarry - ( - detail::tvec3 const & x, - detail::tvec3 const & y, - detail::tvec3 & Carry - ) - { - return detail::tvec3( - uaddCarry(x[0], y[0], Carry[0]), - uaddCarry(x[1], y[1], Carry[1]), - uaddCarry(x[2], y[2], Carry[2])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 uaddCarry - ( - detail::tvec4 const & x, - detail::tvec4 const & y, - detail::tvec4 & Carry - ) - { - return detail::tvec4( - uaddCarry(x[0], y[0], Carry[0]), - uaddCarry(x[1], y[1], Carry[1]), - uaddCarry(x[2], y[2], Carry[2]), - uaddCarry(x[3], y[3], Carry[3])); - } - - // usubBorrow - template - GLM_FUNC_QUALIFIER genUType usubBorrow - ( - genUType const & x, - genUType const & y, - genUType & Borrow - ) - { - Borrow = x >= y ? 0 : 1; - if(x > y) - return genUType(detail::highp_int_t(x) - detail::highp_int_t(y)); - else - return genUType(detail::highp_int_t(1) << detail::highp_int_t(32) + detail::highp_int_t(x) - detail::highp_int_t(y)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 usubBorrow - ( - detail::tvec2 const & x, - detail::tvec2 const & y, - detail::tvec2 & Borrow - ) - { - return detail::tvec2( - usubBorrow(x[0], y[0], Borrow[0]), - usubBorrow(x[1], y[1], Borrow[1])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 usubBorrow - ( - detail::tvec3 const & x, - detail::tvec3 const & y, - detail::tvec3 & Borrow - ) - { - return detail::tvec3( - usubBorrow(x[0], y[0], Borrow[0]), - usubBorrow(x[1], y[1], Borrow[1]), - usubBorrow(x[2], y[2], Borrow[2])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 usubBorrow - ( - detail::tvec4 const & x, - detail::tvec4 const & y, - detail::tvec4 & Borrow - ) - { - return detail::tvec4( - usubBorrow(x[0], y[0], Borrow[0]), - usubBorrow(x[1], y[1], Borrow[1]), - usubBorrow(x[2], y[2], Borrow[2]), - usubBorrow(x[3], y[3], Borrow[3])); - } - - // umulExtended - template - GLM_FUNC_QUALIFIER void umulExtended - ( - genUType const & x, - genUType const & y, - genUType & msb, - genUType & lsb - ) - { - detail::highp_uint_t ValueX64 = x; - detail::highp_uint_t ValueY64 = y; - detail::highp_uint_t Value64 = ValueX64 * ValueY64; - msb = *(genUType*)&genUType(Value64 & ((detail::highp_uint_t(1) << detail::highp_uint_t(32)) - detail::highp_uint_t(1))); - lsb = *(genUType*)&genUType(Value64 >> detail::highp_uint_t(32)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 umulExtended - ( - detail::tvec2 const & x, - detail::tvec2 const & y, - detail::tvec2 & msb, - detail::tvec2 & lsb - ) - { - return detail::tvec2( - umulExtended(x[0], y[0], msb, lsb), - umulExtended(x[1], y[1], msb, lsb)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 umulExtended - ( - detail::tvec3 const & x, - detail::tvec3 const & y, - detail::tvec3 & msb, - detail::tvec3 & lsb - ) - { - return detail::tvec3( - umulExtended(x[0], y[0], msb, lsb), - umulExtended(x[1], y[1], msb, lsb), - umulExtended(x[2], y[2], msb, lsb)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 umulExtended - ( - detail::tvec4 const & x, - detail::tvec4 const & y, - detail::tvec4 & msb, - detail::tvec4 & lsb - ) - { - return detail::tvec4( - umulExtended(x[0], y[0], msb, lsb), - umulExtended(x[1], y[1], msb, lsb), - umulExtended(x[2], y[2], msb, lsb), - umulExtended(x[3], y[3], msb, lsb)); - } - - // imulExtended - template - GLM_FUNC_QUALIFIER void imulExtended - ( - genIType const & x, - genIType const & y, - genIType & msb, - genIType & lsb - ) - { - detail::highp_int_t ValueX64 = x; - detail::highp_int_t ValueY64 = y; - detail::highp_int_t Value64 = ValueX64 * ValueY64; - msb = *(genIType*)&genIType(Value64 & ((detail::highp_uint_t(1) << detail::highp_uint_t(32)) - detail::highp_uint_t(1))); - lsb = *(genIType*)&genIType(Value64 >> detail::highp_uint_t(32)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 imulExtended - ( - detail::tvec2 const & x, - detail::tvec2 const & y, - detail::tvec2 & msb, - detail::tvec2 & lsb - ) - { - return detail::tvec2( - imulExtended(x[0], y[0], msb, lsb), - imulExtended(x[1], y[1], msb, lsb)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 imulExtended - ( - detail::tvec3 const & x, - detail::tvec3 const & y, - detail::tvec3 & msb, - detail::tvec3 & lsb - ) - { - return detail::tvec3( - imulExtended(x[0], y[0], msb, lsb), - imulExtended(x[1], y[1], msb, lsb), - imulExtended(x[2], y[2], msb, lsb)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 imulExtended - ( - detail::tvec4 const & x, - detail::tvec4 const & y, - detail::tvec4 & msb, - detail::tvec4 & lsb - ) - { - return detail::tvec4( - imulExtended(x[0], y[0], msb, lsb), - imulExtended(x[1], y[1], msb, lsb), - imulExtended(x[2], y[2], msb, lsb), - imulExtended(x[3], y[3], msb, lsb)); - } - - // bitfieldExtract - template - GLM_FUNC_QUALIFIER genIUType bitfieldExtract - ( - genIUType const & Value, - int const & Offset, - int const & Bits - ) - { - int GenSize = int(sizeof(genIUType)) << int(3); - - assert(Offset + Bits <= GenSize); - - genIUType ShiftLeft = Bits ? Value << (GenSize - (Bits + Offset)) : genIUType(0); - genIUType ShiftBack = ShiftLeft >> genIUType(GenSize - Bits); - - return ShiftBack; - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 bitfieldExtract - ( - detail::tvec2 const & Value, - int const & Offset, - int const & Bits - ) - { - return detail::tvec2( - bitfieldExtract(Value[0], Offset, Bits), - bitfieldExtract(Value[1], Offset, Bits)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 bitfieldExtract - ( - detail::tvec3 const & Value, - int const & Offset, - int const & Bits - ) - { - return detail::tvec3( - bitfieldExtract(Value[0], Offset, Bits), - bitfieldExtract(Value[1], Offset, Bits), - bitfieldExtract(Value[2], Offset, Bits)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 bitfieldExtract - ( - detail::tvec4 const & Value, - int const & Offset, - int const & Bits - ) - { - return detail::tvec4( - bitfieldExtract(Value[0], Offset, Bits), - bitfieldExtract(Value[1], Offset, Bits), - bitfieldExtract(Value[2], Offset, Bits), - bitfieldExtract(Value[3], Offset, Bits)); - } - - // bitfieldInsert - template - GLM_FUNC_QUALIFIER genIUType bitfieldInsert - ( - genIUType const & Base, - genIUType const & Insert, - int const & Offset, - int const & Bits - ) - { - GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitfieldInsert' only accept integer values"); - assert(Offset + Bits <= sizeof(genIUType)); - - if(Bits == 0) - return Base; - - genIUType Mask = 0; - for(int Bit = Offset; Bit < Offset + Bits; ++Bit) - Mask |= (1 << Bit); - - return (Base & ~Mask) | (Insert & Mask); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 bitfieldInsert - ( - detail::tvec2 const & Base, - detail::tvec2 const & Insert, - int const & Offset, - int const & Bits - ) - { - return detail::tvec2( - bitfieldInsert(Base[0], Insert[0], Offset, Bits), - bitfieldInsert(Base[1], Insert[1], Offset, Bits)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 bitfieldInsert - ( - detail::tvec3 const & Base, - detail::tvec3 const & Insert, - int const & Offset, - int const & Bits - ) - { - return detail::tvec3( - bitfieldInsert(Base[0], Insert[0], Offset, Bits), - bitfieldInsert(Base[1], Insert[1], Offset, Bits), - bitfieldInsert(Base[2], Insert[2], Offset, Bits)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 bitfieldInsert - ( - detail::tvec4 const & Base, - detail::tvec4 const & Insert, - int const & Offset, - int const & Bits - ) - { - return detail::tvec4( - bitfieldInsert(Base[0], Insert[0], Offset, Bits), - bitfieldInsert(Base[1], Insert[1], Offset, Bits), - bitfieldInsert(Base[2], Insert[2], Offset, Bits), - bitfieldInsert(Base[3], Insert[3], Offset, Bits)); - } - - // bitfieldReverse - template - GLM_FUNC_QUALIFIER genIUType bitfieldReverse(genIUType const & Value) - { - GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitfieldReverse' only accept integer values"); - - genIUType Out = 0; - std::size_t BitSize = sizeof(genIUType) * 8; - for(std::size_t i = 0; i < BitSize; ++i) - if(Value & (genIUType(1) << i)) - Out |= genIUType(1) << (BitSize - 1 - i); - return Out; - } - - VECTORIZE_VEC(bitfieldReverse) - - // bitCount - template - GLM_FUNC_QUALIFIER int bitCount(genIUType const & Value) - { - GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitCount' only accept integer values"); - - int Count = 0; - for(std::size_t i = 0; i < sizeof(genIUType) * std::size_t(8); ++i) - { - if(Value & (1 << i)) - ++Count; - } - return Count; - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 bitCount - ( - detail::tvec2 const & value - ) - { - return detail::tvec2( - bitCount(value[0]), - bitCount(value[1])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 bitCount - ( - detail::tvec3 const & value - ) - { - return detail::tvec3( - bitCount(value[0]), - bitCount(value[1]), - bitCount(value[2])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 bitCount - ( - detail::tvec4 const & value - ) - { - return detail::tvec4( - bitCount(value[0]), - bitCount(value[1]), - bitCount(value[2]), - bitCount(value[3])); - } - - // findLSB - template - GLM_FUNC_QUALIFIER int findLSB - ( - genIUType const & Value - ) - { - GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'findLSB' only accept integer values"); - if(Value == 0) - return -1; - - genIUType Bit; - for(Bit = genIUType(0); !(Value & (1 << Bit)); ++Bit){} - return Bit; - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 findLSB - ( - detail::tvec2 const & value - ) - { - return detail::tvec2( - findLSB(value[0]), - findLSB(value[1])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 findLSB - ( - detail::tvec3 const & value - ) - { - return detail::tvec3( - findLSB(value[0]), - findLSB(value[1]), - findLSB(value[2])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 findLSB - ( - detail::tvec4 const & value - ) - { - return detail::tvec4( - findLSB(value[0]), - findLSB(value[1]), - findLSB(value[2]), - findLSB(value[3])); - } - - // findMSB -/* -#if((GLM_ARCH != GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_VC)) - - template - GLM_FUNC_QUALIFIER int findMSB - ( - genIUType const & Value - ) - { - GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'findMSB' only accept integer values"); - if(Value == 0) - return -1; - - unsigned long Result(0); - _BitScanReverse(&Result, Value); - return int(Result); - } - -// __builtin_clz seems to be buggy as it crasks for some values, from 0x00200000 to 80000000 -#elif((GLM_ARCH != GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC40)) - - template - GLM_FUNC_QUALIFIER int findMSB - ( - genIUType const & Value - ) - { - GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'findMSB' only accept integer values"); - if(Value == 0) - return -1; - - // clz returns the number or trailing 0-bits; see - // http://gcc.gnu.org/onlinedocs/gcc-4.7.1/gcc/Other-Builtins.html - // - // NoteBecause __builtin_clz only works for unsigned ints, this - // implementation will not work for 64-bit integers. - // - return 31 - __builtin_clzl(Value); - } -#else -*/ -/* SSE implementation idea - - __m128i const Zero = _mm_set_epi32( 0, 0, 0, 0); - __m128i const One = _mm_set_epi32( 1, 1, 1, 1); - __m128i Bit = _mm_set_epi32(-1, -1, -1, -1); - __m128i Tmp = _mm_set_epi32(Value, Value, Value, Value); - __m128i Mmi = Zero; - for(int i = 0; i < 32; ++i) - { - __m128i Shilt = _mm_and_si128(_mm_cmpgt_epi32(Tmp, One), One); - Tmp = _mm_srai_epi32(Tmp, One); - Bit = _mm_add_epi32(Bit, _mm_and_si128(Shilt, i)); - Mmi = _mm_and_si128(Mmi, One); - } - return Bit; - -*/ - - template - GLM_FUNC_QUALIFIER int findMSB - ( - genIUType const & Value - ) - { - GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'findMSB' only accept integer values"); - - if(Value == genIUType(0) || Value == genIUType(-1)) - return -1; - else if(Value > 0) - { - genIUType Bit = genIUType(-1); - for(genIUType tmp = Value; tmp > 0; tmp >>= 1, ++Bit){} - return Bit; - } - else //if(Value < 0) - { - int const BitCount(sizeof(genIUType) * 8); - int MostSignificantBit(-1); - for(int BitIndex(0); BitIndex < BitCount; ++BitIndex) - MostSignificantBit = (Value & (1 << BitIndex)) ? MostSignificantBit : BitIndex; - assert(MostSignificantBit >= 0); - return MostSignificantBit; - } - } -//#endif//(GLM_COMPILER) - - template - GLM_FUNC_QUALIFIER detail::tvec2 findMSB - ( - detail::tvec2 const & value - ) - { - return detail::tvec2( - findMSB(value[0]), - findMSB(value[1])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 findMSB - ( - detail::tvec3 const & value - ) - { - return detail::tvec3( - findMSB(value[0]), - findMSB(value[1]), - findMSB(value[2])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 findMSB - ( - detail::tvec4 const & value - ) - { - return detail::tvec4( - findMSB(value[0]), - findMSB(value[1]), - findMSB(value[2]), - findMSB(value[3])); - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_integer.inl +/// @date 2010-03-17 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#if(GLM_COMPILER & GLM_COMPILER_VC) +#include +#pragma intrinsic(_BitScanReverse) +#endif + +namespace glm +{ + // uaddCarry + template + GLM_FUNC_QUALIFIER genUType uaddCarry + ( + genUType const & x, + genUType const & y, + genUType & Carry + ) + { + detail::highp_uint_t Value64 = detail::highp_uint_t(x) + detail::highp_uint_t(y); + genUType Result = genUType(Value64 % (detail::highp_uint_t(1) << detail::highp_uint_t(32))); + Carry = (Value64 % (detail::highp_uint_t(1) << detail::highp_uint_t(32))) > 1 ? 1 : 0; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 uaddCarry + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 & Carry + ) + { + return detail::tvec2( + uaddCarry(x[0], y[0], Carry[0]), + uaddCarry(x[1], y[1], Carry[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 uaddCarry + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 & Carry + ) + { + return detail::tvec3( + uaddCarry(x[0], y[0], Carry[0]), + uaddCarry(x[1], y[1], Carry[1]), + uaddCarry(x[2], y[2], Carry[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 uaddCarry + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 & Carry + ) + { + return detail::tvec4( + uaddCarry(x[0], y[0], Carry[0]), + uaddCarry(x[1], y[1], Carry[1]), + uaddCarry(x[2], y[2], Carry[2]), + uaddCarry(x[3], y[3], Carry[3])); + } + + // usubBorrow + template + GLM_FUNC_QUALIFIER genUType usubBorrow + ( + genUType const & x, + genUType const & y, + genUType & Borrow + ) + { + Borrow = x >= y ? 0 : 1; + if(x > y) + return genUType(detail::highp_int_t(x) - detail::highp_int_t(y)); + else + return genUType(detail::highp_int_t(1) << detail::highp_int_t(32) + detail::highp_int_t(x) - detail::highp_int_t(y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 usubBorrow + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 & Borrow + ) + { + return detail::tvec2( + usubBorrow(x[0], y[0], Borrow[0]), + usubBorrow(x[1], y[1], Borrow[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 usubBorrow + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 & Borrow + ) + { + return detail::tvec3( + usubBorrow(x[0], y[0], Borrow[0]), + usubBorrow(x[1], y[1], Borrow[1]), + usubBorrow(x[2], y[2], Borrow[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 usubBorrow + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 & Borrow + ) + { + return detail::tvec4( + usubBorrow(x[0], y[0], Borrow[0]), + usubBorrow(x[1], y[1], Borrow[1]), + usubBorrow(x[2], y[2], Borrow[2]), + usubBorrow(x[3], y[3], Borrow[3])); + } + + // umulExtended + template + GLM_FUNC_QUALIFIER void umulExtended + ( + genUType const & x, + genUType const & y, + genUType & msb, + genUType & lsb + ) + { + detail::highp_uint_t ValueX64 = x; + detail::highp_uint_t ValueY64 = y; + detail::highp_uint_t Value64 = ValueX64 * ValueY64; + msb = *(genUType*)&genUType(Value64 & ((detail::highp_uint_t(1) << detail::highp_uint_t(32)) - detail::highp_uint_t(1))); + lsb = *(genUType*)&genUType(Value64 >> detail::highp_uint_t(32)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 umulExtended + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 & msb, + detail::tvec2 & lsb + ) + { + return detail::tvec2( + umulExtended(x[0], y[0], msb, lsb), + umulExtended(x[1], y[1], msb, lsb)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 umulExtended + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 & msb, + detail::tvec3 & lsb + ) + { + return detail::tvec3( + umulExtended(x[0], y[0], msb, lsb), + umulExtended(x[1], y[1], msb, lsb), + umulExtended(x[2], y[2], msb, lsb)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 umulExtended + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 & msb, + detail::tvec4 & lsb + ) + { + return detail::tvec4( + umulExtended(x[0], y[0], msb, lsb), + umulExtended(x[1], y[1], msb, lsb), + umulExtended(x[2], y[2], msb, lsb), + umulExtended(x[3], y[3], msb, lsb)); + } + + // imulExtended + template + GLM_FUNC_QUALIFIER void imulExtended + ( + genIType const & x, + genIType const & y, + genIType & msb, + genIType & lsb + ) + { + detail::highp_int_t ValueX64 = x; + detail::highp_int_t ValueY64 = y; + detail::highp_int_t Value64 = ValueX64 * ValueY64; + msb = *(genIType*)&genIType(Value64 & ((detail::highp_uint_t(1) << detail::highp_uint_t(32)) - detail::highp_uint_t(1))); + lsb = *(genIType*)&genIType(Value64 >> detail::highp_uint_t(32)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 imulExtended + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 & msb, + detail::tvec2 & lsb + ) + { + return detail::tvec2( + imulExtended(x[0], y[0], msb, lsb), + imulExtended(x[1], y[1], msb, lsb)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 imulExtended + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 & msb, + detail::tvec3 & lsb + ) + { + return detail::tvec3( + imulExtended(x[0], y[0], msb, lsb), + imulExtended(x[1], y[1], msb, lsb), + imulExtended(x[2], y[2], msb, lsb)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 imulExtended + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 & msb, + detail::tvec4 & lsb + ) + { + return detail::tvec4( + imulExtended(x[0], y[0], msb, lsb), + imulExtended(x[1], y[1], msb, lsb), + imulExtended(x[2], y[2], msb, lsb), + imulExtended(x[3], y[3], msb, lsb)); + } + + // bitfieldExtract + template + GLM_FUNC_QUALIFIER genIUType bitfieldExtract + ( + genIUType const & Value, + int const & Offset, + int const & Bits + ) + { + int GenSize = int(sizeof(genIUType)) << int(3); + + assert(Offset + Bits <= GenSize); + + genIUType ShiftLeft = Bits ? Value << (GenSize - (Bits + Offset)) : genIUType(0); + genIUType ShiftBack = ShiftLeft >> genIUType(GenSize - Bits); + + return ShiftBack; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 bitfieldExtract + ( + detail::tvec2 const & Value, + int const & Offset, + int const & Bits + ) + { + return detail::tvec2( + bitfieldExtract(Value[0], Offset, Bits), + bitfieldExtract(Value[1], Offset, Bits)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 bitfieldExtract + ( + detail::tvec3 const & Value, + int const & Offset, + int const & Bits + ) + { + return detail::tvec3( + bitfieldExtract(Value[0], Offset, Bits), + bitfieldExtract(Value[1], Offset, Bits), + bitfieldExtract(Value[2], Offset, Bits)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 bitfieldExtract + ( + detail::tvec4 const & Value, + int const & Offset, + int const & Bits + ) + { + return detail::tvec4( + bitfieldExtract(Value[0], Offset, Bits), + bitfieldExtract(Value[1], Offset, Bits), + bitfieldExtract(Value[2], Offset, Bits), + bitfieldExtract(Value[3], Offset, Bits)); + } + + // bitfieldInsert + template + GLM_FUNC_QUALIFIER genIUType bitfieldInsert + ( + genIUType const & Base, + genIUType const & Insert, + int const & Offset, + int const & Bits + ) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitfieldInsert' only accept integer values"); + assert(Offset + Bits <= sizeof(genIUType)); + + if(Bits == 0) + return Base; + + genIUType Mask = 0; + for(int Bit = Offset; Bit < Offset + Bits; ++Bit) + Mask |= (1 << Bit); + + return (Base & ~Mask) | (Insert & Mask); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 bitfieldInsert + ( + detail::tvec2 const & Base, + detail::tvec2 const & Insert, + int const & Offset, + int const & Bits + ) + { + return detail::tvec2( + bitfieldInsert(Base[0], Insert[0], Offset, Bits), + bitfieldInsert(Base[1], Insert[1], Offset, Bits)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 bitfieldInsert + ( + detail::tvec3 const & Base, + detail::tvec3 const & Insert, + int const & Offset, + int const & Bits + ) + { + return detail::tvec3( + bitfieldInsert(Base[0], Insert[0], Offset, Bits), + bitfieldInsert(Base[1], Insert[1], Offset, Bits), + bitfieldInsert(Base[2], Insert[2], Offset, Bits)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 bitfieldInsert + ( + detail::tvec4 const & Base, + detail::tvec4 const & Insert, + int const & Offset, + int const & Bits + ) + { + return detail::tvec4( + bitfieldInsert(Base[0], Insert[0], Offset, Bits), + bitfieldInsert(Base[1], Insert[1], Offset, Bits), + bitfieldInsert(Base[2], Insert[2], Offset, Bits), + bitfieldInsert(Base[3], Insert[3], Offset, Bits)); + } + + // bitfieldReverse + template + GLM_FUNC_QUALIFIER genIUType bitfieldReverse(genIUType const & Value) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitfieldReverse' only accept integer values"); + + genIUType Out = 0; + std::size_t BitSize = sizeof(genIUType) * 8; + for(std::size_t i = 0; i < BitSize; ++i) + if(Value & (genIUType(1) << i)) + Out |= genIUType(1) << (BitSize - 1 - i); + return Out; + } + + VECTORIZE_VEC(bitfieldReverse) + + // bitCount + template + GLM_FUNC_QUALIFIER int bitCount(genIUType const & Value) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitCount' only accept integer values"); + + int Count = 0; + for(std::size_t i = 0; i < sizeof(genIUType) * std::size_t(8); ++i) + { + if(Value & (1 << i)) + ++Count; + } + return Count; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 bitCount + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + bitCount(value[0]), + bitCount(value[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 bitCount + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + bitCount(value[0]), + bitCount(value[1]), + bitCount(value[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 bitCount + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + bitCount(value[0]), + bitCount(value[1]), + bitCount(value[2]), + bitCount(value[3])); + } + + // findLSB + template + GLM_FUNC_QUALIFIER int findLSB + ( + genIUType const & Value + ) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'findLSB' only accept integer values"); + if(Value == 0) + return -1; + + genIUType Bit; + for(Bit = genIUType(0); !(Value & (1 << Bit)); ++Bit){} + return Bit; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 findLSB + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + findLSB(value[0]), + findLSB(value[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 findLSB + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + findLSB(value[0]), + findLSB(value[1]), + findLSB(value[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 findLSB + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + findLSB(value[0]), + findLSB(value[1]), + findLSB(value[2]), + findLSB(value[3])); + } + + // findMSB +/* +#if((GLM_ARCH != GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_VC)) + + template + GLM_FUNC_QUALIFIER int findMSB + ( + genIUType const & Value + ) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'findMSB' only accept integer values"); + if(Value == 0) + return -1; + + unsigned long Result(0); + _BitScanReverse(&Result, Value); + return int(Result); + } + +// __builtin_clz seems to be buggy as it crasks for some values, from 0x00200000 to 80000000 +#elif((GLM_ARCH != GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC40)) + + template + GLM_FUNC_QUALIFIER int findMSB + ( + genIUType const & Value + ) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'findMSB' only accept integer values"); + if(Value == 0) + return -1; + + // clz returns the number or trailing 0-bits; see + // http://gcc.gnu.org/onlinedocs/gcc-4.7.1/gcc/Other-Builtins.html + // + // NoteBecause __builtin_clz only works for unsigned ints, this + // implementation will not work for 64-bit integers. + // + return 31 - __builtin_clzl(Value); + } +#else +*/ +/* SSE implementation idea + + __m128i const Zero = _mm_set_epi32( 0, 0, 0, 0); + __m128i const One = _mm_set_epi32( 1, 1, 1, 1); + __m128i Bit = _mm_set_epi32(-1, -1, -1, -1); + __m128i Tmp = _mm_set_epi32(Value, Value, Value, Value); + __m128i Mmi = Zero; + for(int i = 0; i < 32; ++i) + { + __m128i Shilt = _mm_and_si128(_mm_cmpgt_epi32(Tmp, One), One); + Tmp = _mm_srai_epi32(Tmp, One); + Bit = _mm_add_epi32(Bit, _mm_and_si128(Shilt, i)); + Mmi = _mm_and_si128(Mmi, One); + } + return Bit; + +*/ + + template + GLM_FUNC_QUALIFIER int findMSB + ( + genIUType const & Value + ) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'findMSB' only accept integer values"); + + if(Value == genIUType(0) || Value == genIUType(-1)) + return -1; + else if(Value > 0) + { + genIUType Bit = genIUType(-1); + for(genIUType tmp = Value; tmp > 0; tmp >>= 1, ++Bit){} + return Bit; + } + else //if(Value < 0) + { + int const BitCount(sizeof(genIUType) * 8); + int MostSignificantBit(-1); + for(int BitIndex(0); BitIndex < BitCount; ++BitIndex) + MostSignificantBit = (Value & (1 << BitIndex)) ? MostSignificantBit : BitIndex; + assert(MostSignificantBit >= 0); + return MostSignificantBit; + } + } +//#endif//(GLM_COMPILER) + + template + GLM_FUNC_QUALIFIER detail::tvec2 findMSB + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + findMSB(value[0]), + findMSB(value[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 findMSB + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + findMSB(value[0]), + findMSB(value[1]), + findMSB(value[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 findMSB + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + findMSB(value[0]), + findMSB(value[1]), + findMSB(value[2]), + findMSB(value[3])); + } +}//namespace glm diff --git a/include/gal/opengl/glm/core/func_matrix.hpp b/include/gal/opengl/glm/core/func_matrix.hpp index c0338aa07d..ac1fda8482 100644 --- a/include/gal/opengl/glm/core/func_matrix.hpp +++ b/include/gal/opengl/glm/core/func_matrix.hpp @@ -1,150 +1,150 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/func_matrix.hpp -/// @date 2008-08-03 / 2011-06-15 -/// @author Christophe Riccio -/// -/// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions -/// -/// @defgroup core_func_matrix Matrix functions -/// @ingroup core -/// -/// For each of the following built-in matrix functions, there is both a -/// single-precision floating point version, where all arguments and return values -/// are single precision, and a double-precision floating version, where all -/// arguments and return values are double precision. Only the single-precision -/// floating point version is shown. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_CORE_func_matrix -#define GLM_CORE_func_matrix GLM_VERSION - -namespace glm -{ - /// @addtogroup core_func_matrix - /// @{ - - /// Multiply matrix x by matrix y component-wise, i.e., - /// result[i][j] is the scalar product of x[i][j] and y[i][j]. - /// - /// @tparam matType Floating-point matrix types. - /// - /// @see GLSL matrixCompMult man page - /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions - template - matType matrixCompMult( - matType const & x, - matType const & y); - - /// Treats the first parameter c as a column vector - /// and the second parameter r as a row vector - /// and does a linear algebraic matrix multiply c * r. - /// - /// @tparam matType Floating-point matrix types. - /// - /// @see GLSL outerProduct man page - /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions - /// - /// @todo Clarify the declaration to specify that matType doesn't have to be provided when used. - template - matType outerProduct( - vecType const & c, - vecType const & r); - - /// Returns the transposed matrix of x - /// - /// @tparam matType Floating-point matrix types. - /// - /// @see GLSL transpose man page - /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions - template - typename matType::transpose_type transpose( - matType const & x); - - /// Return the determinant of a mat2 matrix. - /// - /// @tparam valType Floating-point scalar types. - /// - /// @see GLSL determinant man page - /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions - template - typename detail::tmat2x2::value_type determinant( - detail::tmat2x2 const & m); - - /// Return the determinant of a mat3 matrix. - /// - /// @tparam valType Floating-point scalar types. - /// - /// @see GLSL determinant man page - /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions - template - typename detail::tmat3x3::value_type determinant( - detail::tmat3x3 const & m); - - /// Return the determinant of a mat4 matrix. - /// - /// @tparam valType Floating-point scalar types. - /// - /// @see GLSL determinant man page - /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions - template - typename detail::tmat4x4::value_type determinant( - detail::tmat4x4 const & m); - - /// Return the inverse of a mat2 matrix. - /// - /// @tparam valType Floating-point scalar types. - /// - /// @see GLSL inverse man page - /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions - template - detail::tmat2x2 inverse( - detail::tmat2x2 const & m); - - /// Return the inverse of a mat3 matrix. - /// - /// @tparam valType Floating-point scalar types. - /// - /// @see GLSL inverse man page - /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions - template - detail::tmat3x3 inverse( - detail::tmat3x3 const & m); - - /// Return the inverse of a mat4 matrix. - /// - /// @tparam valType Floating-point scalar types. - /// - /// @see GLSL inverse man page - /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions - template - detail::tmat4x4 inverse( - detail::tmat4x4 const & m); - - /// @} -}//namespace glm - -#include "func_matrix.inl" - -#endif//GLM_CORE_func_matrix +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_matrix.hpp +/// @date 2008-08-03 / 2011-06-15 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions +/// +/// @defgroup core_func_matrix Matrix functions +/// @ingroup core +/// +/// For each of the following built-in matrix functions, there is both a +/// single-precision floating point version, where all arguments and return values +/// are single precision, and a double-precision floating version, where all +/// arguments and return values are double precision. Only the single-precision +/// floating point version is shown. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_CORE_func_matrix +#define GLM_CORE_func_matrix GLM_VERSION + +namespace glm +{ + /// @addtogroup core_func_matrix + /// @{ + + /// Multiply matrix x by matrix y component-wise, i.e., + /// result[i][j] is the scalar product of x[i][j] and y[i][j]. + /// + /// @tparam matType Floating-point matrix types. + /// + /// @see GLSL matrixCompMult man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + matType matrixCompMult( + matType const & x, + matType const & y); + + /// Treats the first parameter c as a column vector + /// and the second parameter r as a row vector + /// and does a linear algebraic matrix multiply c * r. + /// + /// @tparam matType Floating-point matrix types. + /// + /// @see GLSL outerProduct man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + /// + /// @todo Clarify the declaration to specify that matType doesn't have to be provided when used. + template + matType outerProduct( + vecType const & c, + vecType const & r); + + /// Returns the transposed matrix of x + /// + /// @tparam matType Floating-point matrix types. + /// + /// @see GLSL transpose man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + typename matType::transpose_type transpose( + matType const & x); + + /// Return the determinant of a mat2 matrix. + /// + /// @tparam valType Floating-point scalar types. + /// + /// @see GLSL determinant man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + typename detail::tmat2x2::value_type determinant( + detail::tmat2x2 const & m); + + /// Return the determinant of a mat3 matrix. + /// + /// @tparam valType Floating-point scalar types. + /// + /// @see GLSL determinant man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + typename detail::tmat3x3::value_type determinant( + detail::tmat3x3 const & m); + + /// Return the determinant of a mat4 matrix. + /// + /// @tparam valType Floating-point scalar types. + /// + /// @see GLSL determinant man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + typename detail::tmat4x4::value_type determinant( + detail::tmat4x4 const & m); + + /// Return the inverse of a mat2 matrix. + /// + /// @tparam valType Floating-point scalar types. + /// + /// @see GLSL inverse man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + detail::tmat2x2 inverse( + detail::tmat2x2 const & m); + + /// Return the inverse of a mat3 matrix. + /// + /// @tparam valType Floating-point scalar types. + /// + /// @see GLSL inverse man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + detail::tmat3x3 inverse( + detail::tmat3x3 const & m); + + /// Return the inverse of a mat4 matrix. + /// + /// @tparam valType Floating-point scalar types. + /// + /// @see GLSL inverse man page + /// @see GLSL 4.20.8 specification, section 8.6 Matrix Functions + template + detail::tmat4x4 inverse( + detail::tmat4x4 const & m); + + /// @} +}//namespace glm + +#include "func_matrix.inl" + +#endif//GLM_CORE_func_matrix diff --git a/include/gal/opengl/glm/core/func_matrix.inl b/include/gal/opengl/glm/core/func_matrix.inl index 528379dd5f..3b07b74b1d 100644 --- a/include/gal/opengl/glm/core/func_matrix.inl +++ b/include/gal/opengl/glm/core/func_matrix.inl @@ -1,582 +1,582 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/func_matrix.inl -/// @date 2008-03-08 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - // matrixCompMult - template - GLM_FUNC_QUALIFIER matType matrixCompMult - ( - matType const & x, - matType const & y - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'matrixCompMult' only accept floating-point inputs"); - - matType result(matType::null); - for(typename matType::size_type i = 0; i < matType::row_size(); ++i) - result[i] = x[i] * y[i]; - return result; - } - - // outerProduct - template - GLM_FUNC_QUALIFIER detail::tmat2x2 outerProduct - ( - detail::tvec2 const & c, - detail::tvec2 const & r - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); - - detail::tmat2x2 m(detail::tmat2x2::null); - m[0][0] = c[0] * r[0]; - m[0][1] = c[1] * r[0]; - m[1][0] = c[0] * r[1]; - m[1][1] = c[1] * r[1]; - return m; - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x3 outerProduct - ( - detail::tvec3 const & c, - detail::tvec3 const & r - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); - - detail::tmat3x3 m(detail::tmat3x3::null); - for(typename detail::tmat3x3::size_type i(0); i < m.length(); ++i) - m[i] = c * r[i]; - return m; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 outerProduct - ( - detail::tvec4 const & c, - detail::tvec4 const & r - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); - - detail::tmat4x4 m(detail::tmat4x4::null); - for(typename detail::tmat4x4::size_type i(0); i < m.length(); ++i) - m[i] = c * r[i]; - return m; - } - - template - GLM_FUNC_QUALIFIER detail::tmat2x3 outerProduct - ( - detail::tvec3 const & c, - detail::tvec2 const & r - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); - - detail::tmat2x3 m(detail::tmat2x3::null); - m[0][0] = c.x * r.x; - m[0][1] = c.y * r.x; - m[0][2] = c.z * r.x; - m[1][0] = c.x * r.y; - m[1][1] = c.y * r.y; - m[1][2] = c.z * r.y; - return m; - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x2 outerProduct - ( - detail::tvec2 const & c, - detail::tvec3 const & r - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); - - detail::tmat3x2 m(detail::tmat3x2::null); - m[0][0] = c.x * r.x; - m[0][1] = c.y * r.x; - m[1][0] = c.x * r.y; - m[1][1] = c.y * r.y; - m[2][0] = c.x * r.z; - m[2][1] = c.y * r.z; - return m; - } - - template - GLM_FUNC_QUALIFIER detail::tmat2x4 outerProduct - ( - detail::tvec4 const & c, - detail::tvec2 const & r - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); - - detail::tmat2x4 m(detail::tmat2x4::null); - m[0][0] = c.x * r.x; - m[0][1] = c.y * r.x; - m[0][2] = c.z * r.x; - m[0][3] = c.w * r.x; - m[1][0] = c.x * r.y; - m[1][1] = c.y * r.y; - m[1][2] = c.z * r.y; - m[1][3] = c.w * r.y; - return m; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x2 outerProduct - ( - detail::tvec2 const & c, - detail::tvec4 const & r - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); - - detail::tmat4x2 m(detail::tmat4x2::null); - m[0][0] = c.x * r.x; - m[0][1] = c.y * r.x; - m[1][0] = c.x * r.y; - m[1][1] = c.y * r.y; - m[2][0] = c.x * r.z; - m[2][1] = c.y * r.z; - m[3][0] = c.x * r.w; - m[3][1] = c.y * r.w; - return m; - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x4 outerProduct - ( - detail::tvec4 const & c, - detail::tvec3 const & r - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); - - detail::tmat3x4 m(detail::tmat3x4::null); - m[0][0] = c.x * r.x; - m[0][1] = c.y * r.x; - m[0][2] = c.z * r.x; - m[0][3] = c.w * r.x; - m[1][0] = c.x * r.y; - m[1][1] = c.y * r.y; - m[1][2] = c.z * r.y; - m[1][3] = c.w * r.y; - m[2][0] = c.x * r.z; - m[2][1] = c.y * r.z; - m[2][2] = c.z * r.z; - m[2][3] = c.w * r.z; - return m; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x3 outerProduct - ( - detail::tvec3 const & c, - detail::tvec4 const & r - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); - - detail::tmat4x3 m(detail::tmat4x3::null); - m[0][0] = c.x * r.x; - m[0][1] = c.y * r.x; - m[0][2] = c.z * r.x; - m[1][0] = c.x * r.y; - m[1][1] = c.y * r.y; - m[1][2] = c.z * r.y; - m[2][0] = c.x * r.z; - m[2][1] = c.y * r.z; - m[2][2] = c.z * r.z; - m[3][0] = c.x * r.w; - m[3][1] = c.y * r.w; - m[3][2] = c.z * r.w; - return m; - } - - template - GLM_FUNC_QUALIFIER detail::tmat2x2 transpose - ( - detail::tmat2x2 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); - - detail::tmat2x2 result(detail::tmat2x2::null); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - return result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x3 transpose - ( - detail::tmat3x3 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); - - detail::tmat3x3 result(detail::tmat3x3::null); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[0][2] = m[2][0]; - - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[1][2] = m[2][1]; - - result[2][0] = m[0][2]; - result[2][1] = m[1][2]; - result[2][2] = m[2][2]; - return result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 transpose - ( - detail::tmat4x4 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); - - detail::tmat4x4 result(detail::tmat4x4::null); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[0][2] = m[2][0]; - result[0][3] = m[3][0]; - - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[1][2] = m[2][1]; - result[1][3] = m[3][1]; - - result[2][0] = m[0][2]; - result[2][1] = m[1][2]; - result[2][2] = m[2][2]; - result[2][3] = m[3][2]; - - result[3][0] = m[0][3]; - result[3][1] = m[1][3]; - result[3][2] = m[2][3]; - result[3][3] = m[3][3]; - return result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat2x3 transpose - ( - detail::tmat3x2 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); - - detail::tmat2x3 result(detail::tmat2x3::null); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[0][2] = m[2][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[1][2] = m[2][1]; - return result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x2 transpose - ( - detail::tmat2x3 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); - - detail::tmat3x2 result(detail::tmat3x2::null); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[2][0] = m[0][2]; - result[2][1] = m[1][2]; - return result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat2x4 transpose - ( - detail::tmat4x2 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); - - detail::tmat2x4 result(detail::tmat2x4::null); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[0][2] = m[2][0]; - result[0][3] = m[3][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[1][2] = m[2][1]; - result[1][3] = m[3][1]; - return result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x2 transpose - ( - detail::tmat2x4 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); - - detail::tmat4x2 result(detail::tmat4x2::null); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[2][0] = m[0][2]; - result[2][1] = m[1][2]; - result[3][0] = m[0][3]; - result[3][1] = m[1][3]; - return result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x4 transpose - ( - detail::tmat4x3 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); - - detail::tmat3x4 result(detail::tmat3x4::null); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[0][2] = m[2][0]; - result[0][3] = m[3][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[1][2] = m[2][1]; - result[1][3] = m[3][1]; - result[2][0] = m[0][2]; - result[2][1] = m[1][2]; - result[2][2] = m[2][2]; - result[2][3] = m[3][2]; - return result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x3 transpose - ( - detail::tmat3x4 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); - - detail::tmat4x3 result(detail::tmat4x3::null); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[0][2] = m[2][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[1][2] = m[2][1]; - result[2][0] = m[0][2]; - result[2][1] = m[1][2]; - result[2][2] = m[2][2]; - result[3][0] = m[0][3]; - result[3][1] = m[1][3]; - result[3][2] = m[2][3]; - return result; - } - - template - GLM_FUNC_QUALIFIER typename detail::tmat2x2::value_type determinant - ( - detail::tmat2x2 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'determinant' only accept floating-point inputs"); - - return m[0][0] * m[1][1] - m[1][0] * m[0][1]; - } - - template - GLM_FUNC_QUALIFIER typename detail::tmat3x3::value_type determinant - ( - detail::tmat3x3 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'determinant' only accept floating-point inputs"); - - return - + m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2]) - - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2]) - + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]); - } - - template - GLM_FUNC_QUALIFIER typename detail::tmat4x4::value_type determinant - ( - detail::tmat4x4 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'determinant' only accept floating-point inputs"); - - T SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3]; - T SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3]; - T SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2]; - T SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3]; - T SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2]; - T SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1]; - - detail::tvec4 DetCof( - + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02), - - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04), - + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05), - - (m[1][0] * SubFactor02 - m[1][1] * SubFactor04 + m[1][2] * SubFactor05)); - - return m[0][0] * DetCof[0] - + m[0][1] * DetCof[1] - + m[0][2] * DetCof[2] - + m[0][3] * DetCof[3]; - } - - template - GLM_FUNC_QUALIFIER detail::tmat2x2 inverse - ( - detail::tmat2x2 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'inverse' only accept floating-point inputs"); - - //valType Determinant = m[0][0] * m[1][1] - m[1][0] * m[0][1]; - T Determinant = determinant(m); - - detail::tmat2x2 Inverse( - + m[1][1] / Determinant, - - m[0][1] / Determinant, - - m[1][0] / Determinant, - + m[0][0] / Determinant); - - return Inverse; - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x3 inverse - ( - detail::tmat3x3 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'inverse' only accept floating-point inputs"); - - //valType Determinant = m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2]) - // - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2]) - // + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]); - - T Determinant = determinant(m); - - detail::tmat3x3 Inverse(detail::tmat3x3::null); - Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]); - Inverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]); - Inverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]); - Inverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]); - Inverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]); - Inverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]); - Inverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]); - Inverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]); - Inverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]); - Inverse /= Determinant; - - return Inverse; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 inverse - ( - detail::tmat4x4 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'inverse' only accept floating-point inputs"); - - T Coef00 = m[2][2] * m[3][3] - m[3][2] * m[2][3]; - T Coef02 = m[1][2] * m[3][3] - m[3][2] * m[1][3]; - T Coef03 = m[1][2] * m[2][3] - m[2][2] * m[1][3]; - - T Coef04 = m[2][1] * m[3][3] - m[3][1] * m[2][3]; - T Coef06 = m[1][1] * m[3][3] - m[3][1] * m[1][3]; - T Coef07 = m[1][1] * m[2][3] - m[2][1] * m[1][3]; - - T Coef08 = m[2][1] * m[3][2] - m[3][1] * m[2][2]; - T Coef10 = m[1][1] * m[3][2] - m[3][1] * m[1][2]; - T Coef11 = m[1][1] * m[2][2] - m[2][1] * m[1][2]; - - T Coef12 = m[2][0] * m[3][3] - m[3][0] * m[2][3]; - T Coef14 = m[1][0] * m[3][3] - m[3][0] * m[1][3]; - T Coef15 = m[1][0] * m[2][3] - m[2][0] * m[1][3]; - - T Coef16 = m[2][0] * m[3][2] - m[3][0] * m[2][2]; - T Coef18 = m[1][0] * m[3][2] - m[3][0] * m[1][2]; - T Coef19 = m[1][0] * m[2][2] - m[2][0] * m[1][2]; - - T Coef20 = m[2][0] * m[3][1] - m[3][0] * m[2][1]; - T Coef22 = m[1][0] * m[3][1] - m[3][0] * m[1][1]; - T Coef23 = m[1][0] * m[2][1] - m[2][0] * m[1][1]; - - detail::tvec4 const SignA(+1, -1, +1, -1); - detail::tvec4 const SignB(-1, +1, -1, +1); - - detail::tvec4 Fac0(Coef00, Coef00, Coef02, Coef03); - detail::tvec4 Fac1(Coef04, Coef04, Coef06, Coef07); - detail::tvec4 Fac2(Coef08, Coef08, Coef10, Coef11); - detail::tvec4 Fac3(Coef12, Coef12, Coef14, Coef15); - detail::tvec4 Fac4(Coef16, Coef16, Coef18, Coef19); - detail::tvec4 Fac5(Coef20, Coef20, Coef22, Coef23); - - detail::tvec4 Vec0(m[1][0], m[0][0], m[0][0], m[0][0]); - detail::tvec4 Vec1(m[1][1], m[0][1], m[0][1], m[0][1]); - detail::tvec4 Vec2(m[1][2], m[0][2], m[0][2], m[0][2]); - detail::tvec4 Vec3(m[1][3], m[0][3], m[0][3], m[0][3]); - - detail::tvec4 Inv0 = SignA * (Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2); - detail::tvec4 Inv1 = SignB * (Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4); - detail::tvec4 Inv2 = SignA * (Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5); - detail::tvec4 Inv3 = SignB * (Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5); - - detail::tmat4x4 Inverse(Inv0, Inv1, Inv2, Inv3); - - detail::tvec4 Row0(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]); - - T Determinant = glm::dot(m[0], Row0); - - Inverse /= Determinant; - - return Inverse; - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_matrix.inl +/// @date 2008-03-08 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + // matrixCompMult + template + GLM_FUNC_QUALIFIER matType matrixCompMult + ( + matType const & x, + matType const & y + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'matrixCompMult' only accept floating-point inputs"); + + matType result(matType::null); + for(typename matType::size_type i = 0; i < matType::row_size(); ++i) + result[i] = x[i] * y[i]; + return result; + } + + // outerProduct + template + GLM_FUNC_QUALIFIER detail::tmat2x2 outerProduct + ( + detail::tvec2 const & c, + detail::tvec2 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat2x2 m(detail::tmat2x2::null); + m[0][0] = c[0] * r[0]; + m[0][1] = c[1] * r[0]; + m[1][0] = c[0] * r[1]; + m[1][1] = c[1] * r[1]; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 outerProduct + ( + detail::tvec3 const & c, + detail::tvec3 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat3x3 m(detail::tmat3x3::null); + for(typename detail::tmat3x3::size_type i(0); i < m.length(); ++i) + m[i] = c * r[i]; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 outerProduct + ( + detail::tvec4 const & c, + detail::tvec4 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat4x4 m(detail::tmat4x4::null); + for(typename detail::tmat4x4::size_type i(0); i < m.length(); ++i) + m[i] = c * r[i]; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x3 outerProduct + ( + detail::tvec3 const & c, + detail::tvec2 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat2x3 m(detail::tmat2x3::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[0][2] = c.z * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[1][2] = c.z * r.y; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x2 outerProduct + ( + detail::tvec2 const & c, + detail::tvec3 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat3x2 m(detail::tmat3x2::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[2][0] = c.x * r.z; + m[2][1] = c.y * r.z; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x4 outerProduct + ( + detail::tvec4 const & c, + detail::tvec2 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat2x4 m(detail::tmat2x4::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[0][2] = c.z * r.x; + m[0][3] = c.w * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[1][2] = c.z * r.y; + m[1][3] = c.w * r.y; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x2 outerProduct + ( + detail::tvec2 const & c, + detail::tvec4 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat4x2 m(detail::tmat4x2::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[2][0] = c.x * r.z; + m[2][1] = c.y * r.z; + m[3][0] = c.x * r.w; + m[3][1] = c.y * r.w; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x4 outerProduct + ( + detail::tvec4 const & c, + detail::tvec3 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat3x4 m(detail::tmat3x4::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[0][2] = c.z * r.x; + m[0][3] = c.w * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[1][2] = c.z * r.y; + m[1][3] = c.w * r.y; + m[2][0] = c.x * r.z; + m[2][1] = c.y * r.z; + m[2][2] = c.z * r.z; + m[2][3] = c.w * r.z; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x3 outerProduct + ( + detail::tvec3 const & c, + detail::tvec4 const & r + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'outerProduct' only accept floating-point inputs"); + + detail::tmat4x3 m(detail::tmat4x3::null); + m[0][0] = c.x * r.x; + m[0][1] = c.y * r.x; + m[0][2] = c.z * r.x; + m[1][0] = c.x * r.y; + m[1][1] = c.y * r.y; + m[1][2] = c.z * r.y; + m[2][0] = c.x * r.z; + m[2][1] = c.y * r.z; + m[2][2] = c.z * r.z; + m[3][0] = c.x * r.w; + m[3][1] = c.y * r.w; + m[3][2] = c.z * r.w; + return m; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x2 transpose + ( + detail::tmat2x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat2x2 result(detail::tmat2x2::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 transpose + ( + detail::tmat3x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat3x3 result(detail::tmat3x3::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[2][2] = m[2][2]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 transpose + ( + detail::tmat4x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat4x4 result(detail::tmat4x4::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[0][3] = m[3][0]; + + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + result[1][3] = m[3][1]; + + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[2][2] = m[2][2]; + result[2][3] = m[3][2]; + + result[3][0] = m[0][3]; + result[3][1] = m[1][3]; + result[3][2] = m[2][3]; + result[3][3] = m[3][3]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x3 transpose + ( + detail::tmat3x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat2x3 result(detail::tmat2x3::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x2 transpose + ( + detail::tmat2x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat3x2 result(detail::tmat3x2::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x4 transpose + ( + detail::tmat4x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat2x4 result(detail::tmat2x4::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[0][3] = m[3][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + result[1][3] = m[3][1]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x2 transpose + ( + detail::tmat2x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat4x2 result(detail::tmat4x2::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[3][0] = m[0][3]; + result[3][1] = m[1][3]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x4 transpose + ( + detail::tmat4x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat3x4 result(detail::tmat3x4::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[0][3] = m[3][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + result[1][3] = m[3][1]; + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[2][2] = m[2][2]; + result[2][3] = m[3][2]; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x3 transpose + ( + detail::tmat3x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'transpose' only accept floating-point inputs"); + + detail::tmat4x3 result(detail::tmat4x3::null); + result[0][0] = m[0][0]; + result[0][1] = m[1][0]; + result[0][2] = m[2][0]; + result[1][0] = m[0][1]; + result[1][1] = m[1][1]; + result[1][2] = m[2][1]; + result[2][0] = m[0][2]; + result[2][1] = m[1][2]; + result[2][2] = m[2][2]; + result[3][0] = m[0][3]; + result[3][1] = m[1][3]; + result[3][2] = m[2][3]; + return result; + } + + template + GLM_FUNC_QUALIFIER typename detail::tmat2x2::value_type determinant + ( + detail::tmat2x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'determinant' only accept floating-point inputs"); + + return m[0][0] * m[1][1] - m[1][0] * m[0][1]; + } + + template + GLM_FUNC_QUALIFIER typename detail::tmat3x3::value_type determinant + ( + detail::tmat3x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'determinant' only accept floating-point inputs"); + + return + + m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2]) + - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2]) + + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]); + } + + template + GLM_FUNC_QUALIFIER typename detail::tmat4x4::value_type determinant + ( + detail::tmat4x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'determinant' only accept floating-point inputs"); + + T SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3]; + T SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3]; + T SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2]; + T SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3]; + T SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2]; + T SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1]; + + detail::tvec4 DetCof( + + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02), + - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04), + + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05), + - (m[1][0] * SubFactor02 - m[1][1] * SubFactor04 + m[1][2] * SubFactor05)); + + return m[0][0] * DetCof[0] + + m[0][1] * DetCof[1] + + m[0][2] * DetCof[2] + + m[0][3] * DetCof[3]; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x2 inverse + ( + detail::tmat2x2 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'inverse' only accept floating-point inputs"); + + //valType Determinant = m[0][0] * m[1][1] - m[1][0] * m[0][1]; + T Determinant = determinant(m); + + detail::tmat2x2 Inverse( + + m[1][1] / Determinant, + - m[0][1] / Determinant, + - m[1][0] / Determinant, + + m[0][0] / Determinant); + + return Inverse; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 inverse + ( + detail::tmat3x3 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'inverse' only accept floating-point inputs"); + + //valType Determinant = m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2]) + // - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2]) + // + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]); + + T Determinant = determinant(m); + + detail::tmat3x3 Inverse(detail::tmat3x3::null); + Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]); + Inverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]); + Inverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]); + Inverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]); + Inverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]); + Inverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]); + Inverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]); + Inverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]); + Inverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]); + Inverse /= Determinant; + + return Inverse; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 inverse + ( + detail::tmat4x4 const & m + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'inverse' only accept floating-point inputs"); + + T Coef00 = m[2][2] * m[3][3] - m[3][2] * m[2][3]; + T Coef02 = m[1][2] * m[3][3] - m[3][2] * m[1][3]; + T Coef03 = m[1][2] * m[2][3] - m[2][2] * m[1][3]; + + T Coef04 = m[2][1] * m[3][3] - m[3][1] * m[2][3]; + T Coef06 = m[1][1] * m[3][3] - m[3][1] * m[1][3]; + T Coef07 = m[1][1] * m[2][3] - m[2][1] * m[1][3]; + + T Coef08 = m[2][1] * m[3][2] - m[3][1] * m[2][2]; + T Coef10 = m[1][1] * m[3][2] - m[3][1] * m[1][2]; + T Coef11 = m[1][1] * m[2][2] - m[2][1] * m[1][2]; + + T Coef12 = m[2][0] * m[3][3] - m[3][0] * m[2][3]; + T Coef14 = m[1][0] * m[3][3] - m[3][0] * m[1][3]; + T Coef15 = m[1][0] * m[2][3] - m[2][0] * m[1][3]; + + T Coef16 = m[2][0] * m[3][2] - m[3][0] * m[2][2]; + T Coef18 = m[1][0] * m[3][2] - m[3][0] * m[1][2]; + T Coef19 = m[1][0] * m[2][2] - m[2][0] * m[1][2]; + + T Coef20 = m[2][0] * m[3][1] - m[3][0] * m[2][1]; + T Coef22 = m[1][0] * m[3][1] - m[3][0] * m[1][1]; + T Coef23 = m[1][0] * m[2][1] - m[2][0] * m[1][1]; + + detail::tvec4 const SignA(+1, -1, +1, -1); + detail::tvec4 const SignB(-1, +1, -1, +1); + + detail::tvec4 Fac0(Coef00, Coef00, Coef02, Coef03); + detail::tvec4 Fac1(Coef04, Coef04, Coef06, Coef07); + detail::tvec4 Fac2(Coef08, Coef08, Coef10, Coef11); + detail::tvec4 Fac3(Coef12, Coef12, Coef14, Coef15); + detail::tvec4 Fac4(Coef16, Coef16, Coef18, Coef19); + detail::tvec4 Fac5(Coef20, Coef20, Coef22, Coef23); + + detail::tvec4 Vec0(m[1][0], m[0][0], m[0][0], m[0][0]); + detail::tvec4 Vec1(m[1][1], m[0][1], m[0][1], m[0][1]); + detail::tvec4 Vec2(m[1][2], m[0][2], m[0][2], m[0][2]); + detail::tvec4 Vec3(m[1][3], m[0][3], m[0][3], m[0][3]); + + detail::tvec4 Inv0 = SignA * (Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2); + detail::tvec4 Inv1 = SignB * (Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4); + detail::tvec4 Inv2 = SignA * (Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5); + detail::tvec4 Inv3 = SignB * (Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5); + + detail::tmat4x4 Inverse(Inv0, Inv1, Inv2, Inv3); + + detail::tvec4 Row0(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]); + + T Determinant = glm::dot(m[0], Row0); + + Inverse /= Determinant; + + return Inverse; + } +}//namespace glm diff --git a/include/gal/opengl/glm/core/func_noise.hpp b/include/gal/opengl/glm/core/func_noise.hpp index e583475305..369f56de6f 100644 --- a/include/gal/opengl/glm/core/func_noise.hpp +++ b/include/gal/opengl/glm/core/func_noise.hpp @@ -1,87 +1,87 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/func_noise.hpp -/// @date 2008-08-01 / 2011-06-18 -/// @author Christophe Riccio -/// -/// @see GLSL 4.20.8 specification, section 8.13 Noise Functions -/// -/// @defgroup core_func_noise Noise functions -/// @ingroup core -/// -/// Noise functions are stochastic functions that can be used to increase visual -/// complexity. Values returned by the following noise functions give the -/// appearance of randomness, but are not truly random. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_func_noise -#define glm_core_func_noise GLM_VERSION - -namespace glm -{ - /// @addtogroup core_func_noise - /// @{ - - /// Returns a 1D noise value based on the input value x. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL noise1 man page - /// @see GLSL 4.20.8 specification, section 8.13 Noise Functions - template - typename genType::value_type noise1(genType const & x); - - /// Returns a 2D noise value based on the input value x. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL noise2 man page - /// @see GLSL 4.20.8 specification, section 8.13 Noise Functions - template - detail::tvec2 noise2(genType const & x); - - /// Returns a 3D noise value based on the input value x. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL noise3 man page - /// @see GLSL 4.20.8 specification, section 8.13 Noise Functions - template - detail::tvec3 noise3(genType const & x); - - /// Returns a 4D noise value based on the input value x. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL noise4 man page - /// @see GLSL 4.20.8 specification, section 8.13 Noise Functions - template - detail::tvec4 noise4(genType const & x); - - /// @} -}//namespace glm - -#include "func_noise.inl" - -#endif//glm_core_func_noise +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_noise.hpp +/// @date 2008-08-01 / 2011-06-18 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.13 Noise Functions +/// +/// @defgroup core_func_noise Noise functions +/// @ingroup core +/// +/// Noise functions are stochastic functions that can be used to increase visual +/// complexity. Values returned by the following noise functions give the +/// appearance of randomness, but are not truly random. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_func_noise +#define glm_core_func_noise GLM_VERSION + +namespace glm +{ + /// @addtogroup core_func_noise + /// @{ + + /// Returns a 1D noise value based on the input value x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL noise1 man page + /// @see GLSL 4.20.8 specification, section 8.13 Noise Functions + template + typename genType::value_type noise1(genType const & x); + + /// Returns a 2D noise value based on the input value x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL noise2 man page + /// @see GLSL 4.20.8 specification, section 8.13 Noise Functions + template + detail::tvec2 noise2(genType const & x); + + /// Returns a 3D noise value based on the input value x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL noise3 man page + /// @see GLSL 4.20.8 specification, section 8.13 Noise Functions + template + detail::tvec3 noise3(genType const & x); + + /// Returns a 4D noise value based on the input value x. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL noise4 man page + /// @see GLSL 4.20.8 specification, section 8.13 Noise Functions + template + detail::tvec4 noise4(genType const & x); + + /// @} +}//namespace glm + +#include "func_noise.inl" + +#endif//glm_core_func_noise diff --git a/include/gal/opengl/glm/core/func_noise.inl b/include/gal/opengl/glm/core/func_noise.inl index 7a0b374817..a53ba5a75b 100644 --- a/include/gal/opengl/glm/core/func_noise.inl +++ b/include/gal/opengl/glm/core/func_noise.inl @@ -1,364 +1,364 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/func_noise.inl -/// @date 2008-08-01 / 2011-09-27 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER T noise1(T const & x) - { - return noise1(glm::detail::tvec2(x, T(0))); - } - - template - GLM_FUNC_QUALIFIER glm::detail::tvec2 noise2(T const & x) - { - return glm::detail::tvec2( - noise1(x + T(0.0)), - noise1(x + T(1.0))); - } - - template - GLM_FUNC_QUALIFIER glm::detail::tvec3 noise3(T const & x) - { - return glm::detail::tvec3( - noise1(x - T(1.0)), - noise1(x + T(0.0)), - noise1(x + T(1.0))); - } - - template - GLM_FUNC_QUALIFIER glm::detail::tvec4 noise4(T const & x) - { - return glm::detail::tvec4( - noise1(x - T(1.0)), - noise1(x + T(0.0)), - noise1(x + T(1.0)), - noise1(x + T(2.0))); - } - - template - GLM_FUNC_QUALIFIER T noise1(glm::detail::tvec2 const & v) - { - detail::tvec4 const C = detail::tvec4( - T( 0.211324865405187), // (3.0 - sqrt(3.0)) / 6.0 - T( 0.366025403784439), // 0.5 * (sqrt(3.0) - 1.0) - T(-0.577350269189626), // -1.0 + 2.0 * C.x - T( 0.024390243902439)); // 1.0 / 41.0 - - // First corner - detail::tvec2 i = floor(v + dot(v, detail::tvec2(C[1]))); - detail::tvec2 x0 = v - i + dot(i, detail::tvec2(C[0])); - - // Other corners - //i1.x = step( x0.y, x0.x ); // x0.x > x0.y ? 1.0 : 0.0 - //i1.y = 1.0 - i1.x; - detail::tvec2 i1 = (x0.x > x0.y) ? detail::tvec2(1, 0) : detail::tvec2(0, 1); - // x0 = x0 - 0.0 + 0.0 * C.xx ; - // x1 = x0 - i1 + 1.0 * C.xx ; - // x2 = x0 - 1.0 + 2.0 * C.xx ; - detail::tvec4 x12 = detail::tvec4(x0.x, x0.y, x0.x, x0.y) + detail::tvec4(C.x, C.x, C.z, C.z); - x12 = detail::tvec4(detail::tvec2(x12) - i1, x12.z, x12.w); - - // Permutations - i = mod(i, T(289)); // Avoid truncation effects in permutation - detail::tvec3 p = permute( - permute(i.y + detail::tvec3(T(0), i1.y, T(1))) - + i.x + detail::tvec3(T(0), i1.x, T(1))); - - detail::tvec3 m = max(T(0.5) - detail::tvec3( - dot(x0, x0), - dot(detail::tvec2(x12.x, x12.y), detail::tvec2(x12.x, x12.y)), - dot(detail::tvec2(x12.z, x12.w), detail::tvec2(x12.z, x12.w))), T(0)); - m = m * m ; - m = m * m ; - - // Gradients: 41 points uniformly over a line, mapped onto a diamond. - // The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287) - - detail::tvec3 x = T(2) * fract(p * C.w) - T(1); - detail::tvec3 h = abs(x) - T(0.5); - detail::tvec3 ox = floor(x + T(0.5)); - detail::tvec3 a0 = x - ox; - - // Normalise gradients implicitly by scaling m - // Inlined for speed: m *= taylorInvSqrt( a0*a0 + h*h ); - m *= T(1.79284291400159) - T(0.85373472095314) * (a0 * a0 + h * h); - - // Compute final noise value at P - detail::tvec3 g; - g.x = a0.x * x0.x + h.x * x0.y; - //g.yz = a0.yz * x12.xz + h.yz * x12.yw; - g.y = a0.y * x12.x + h.y * x12.y; - g.z = a0.z * x12.z + h.z * x12.w; - return T(130) * dot(m, g); - } - - template - GLM_FUNC_QUALIFIER T noise1(detail::tvec3 const & v) - { - detail::tvec2 const C(1.0 / 6.0, 1.0 / 3.0); - detail::tvec4 const D(0.0, 0.5, 1.0, 2.0); - - // First corner - detail::tvec3 i(floor(v + dot(v, detail::tvec3(C.y)))); - detail::tvec3 x0(v - i + dot(i, detail::tvec3(C.x))); - - // Other corners - detail::tvec3 g(step(detail::tvec3(x0.y, x0.z, x0.x), x0)); - detail::tvec3 l(T(1) - g); - detail::tvec3 i1(min(g, detail::tvec3(l.z, l.x, l.y))); - detail::tvec3 i2(max(g, detail::tvec3(l.z, l.x, l.y))); - - // x0 = x0 - 0.0 + 0.0 * C.xxx; - // x1 = x0 - i1 + 1.0 * C.xxx; - // x2 = x0 - i2 + 2.0 * C.xxx; - // x3 = x0 - 1.0 + 3.0 * C.xxx; - detail::tvec3 x1(x0 - i1 + C.x); - detail::tvec3 x2(x0 - i2 + C.y); // 2.0*C.x = 1/3 = C.y - detail::tvec3 x3(x0 - D.y); // -1.0+3.0*C.x = -0.5 = -D.y - - // Permutations - i = mod289(i); - detail::tvec4 p(permute(permute(permute( - i.z + detail::tvec4(T(0), i1.z, i2.z, T(1))) + - i.y + detail::tvec4(T(0), i1.y, i2.y, T(1))) + - i.x + detail::tvec4(T(0), i1.x, i2.x, T(1)))); - - // Gradients: 7x7 points over a square, mapped onto an octahedron. - // The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294) - T n_ = T(0.142857142857); // 1.0/7.0 - detail::tvec3 ns(n_ * detail::tvec3(D.w, D.y, D.z) - detail::tvec3(D.x, D.z, D.x)); - - detail::tvec4 j(p - T(49) * floor(p * ns.z * ns.z)); // mod(p,7*7) - - detail::tvec4 x_(floor(j * ns.z)); - detail::tvec4 y_(floor(j - T(7) * x_)); // mod(j,N) - - detail::tvec4 x(x_ * ns.x + ns.y); - detail::tvec4 y(y_ * ns.x + ns.y); - detail::tvec4 h(T(1) - abs(x) - abs(y)); - - detail::tvec4 b0(x.x, x.y, y.x, y.y); - detail::tvec4 b1(x.z, x.w, y.z, y.w); - - // vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0; - // vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0; - detail::tvec4 s0(floor(b0) * T(2) + T(1)); - detail::tvec4 s1(floor(b1) * T(2) + T(1)); - detail::tvec4 sh(-step(h, detail::tvec4(0.0))); - - detail::tvec4 a0 = detail::tvec4(b0.x, b0.z, b0.y, b0.w) + detail::tvec4(s0.x, s0.z, s0.y, s0.w) * detail::tvec4(sh.x, sh.x, sh.y, sh.y); - detail::tvec4 a1 = detail::tvec4(b1.x, b1.z, b1.y, b1.w) + detail::tvec4(s1.x, s1.z, s1.y, s1.w) * detail::tvec4(sh.z, sh.z, sh.w, sh.w); - - detail::tvec3 p0(a0.x, a0.y, h.x); - detail::tvec3 p1(a0.z, a0.w, h.y); - detail::tvec3 p2(a1.x, a1.y, h.z); - detail::tvec3 p3(a1.z, a1.w, h.w); - - // Normalise gradients - detail::tvec4 norm = taylorInvSqrt(detail::tvec4(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3))); - p0 *= norm.x; - p1 *= norm.y; - p2 *= norm.z; - p3 *= norm.w; - - // Mix final noise value - detail::tvec4 m = max(T(0.6) - detail::tvec4(dot(x0, x0), dot(x1, x1), dot(x2, x2), dot(x3, x3)), T(0)); - m = m * m; - return T(42) * dot(m * m, detail::tvec4(dot(p0, x0), dot(p1, x1), dot(p2, x2), dot(p3, x3))); - } - - template - GLM_FUNC_QUALIFIER T noise1(detail::tvec4 const & v) - { - detail::tvec4 const C( - 0.138196601125011, // (5 - sqrt(5))/20 G4 - 0.276393202250021, // 2 * G4 - 0.414589803375032, // 3 * G4 - -0.447213595499958); // -1 + 4 * G4 - - // (sqrt(5) - 1)/4 = F4, used once below - T const F4 = T(0.309016994374947451); - - // First corner - detail::tvec4 i = floor(v + dot(v, vec4(F4))); - detail::tvec4 x0 = v - i + dot(i, vec4(C.x)); - - // Other corners - - // Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI) - detail::tvec4 i0; - detail::tvec3 isX = step(detail::tvec3(x0.y, x0.z, x0.w), detail::tvec3(x0.x)); - detail::tvec3 isYZ = step(detail::tvec3(x0.z, x0.w, x0.w), detail::tvec3(x0.y, x0.y, x0.z)); - // i0.x = dot(isX, vec3(1.0)); - //i0.x = isX.x + isX.y + isX.z; - //i0.yzw = T(1) - isX; - i0 = detail::tvec4(isX.x + isX.y + isX.z, T(1) - isX); - // i0.y += dot(isYZ.xy, vec2(1.0)); - i0.y += isYZ.x + isYZ.y; - //i0.zw += 1.0 - detail::tvec2(isYZ.x, isYZ.y); - i0.z += T(1) - isYZ.x; - i0.w += T(1) - isYZ.y; - i0.z += isYZ.z; - i0.w += T(1) - isYZ.z; - - // i0 now contains the unique values 0,1,2,3 in each channel - detail::tvec4 i3 = clamp(i0, 0.0, 1.0); - detail::tvec4 i2 = clamp(i0 - 1.0, 0.0, 1.0); - detail::tvec4 i1 = clamp(i0 - 2.0, 0.0, 1.0); - - // x0 = x0 - 0.0 + 0.0 * C.xxxx - // x1 = x0 - i1 + 0.0 * C.xxxx - // x2 = x0 - i2 + 0.0 * C.xxxx - // x3 = x0 - i3 + 0.0 * C.xxxx - // x4 = x0 - 1.0 + 4.0 * C.xxxx - detail::tvec4 x1 = x0 - i1 + C.x; - detail::tvec4 x2 = x0 - i2 + C.y; - detail::tvec4 x3 = x0 - i3 + C.z; - detail::tvec4 x4 = x0 + C.w; - - // Permutations - i = mod(i, T(289)); - T j0 = permute(permute(permute(permute(i.w) + i.z) + i.y) + i.x); - detail::tvec4 j1 = permute(permute(permute(permute( - i.w + detail::tvec4(i1.w, i2.w, i3.w, T(1))) - + i.z + detail::tvec4(i1.z, i2.z, i3.z, T(1))) - + i.y + detail::tvec4(i1.y, i2.y, i3.y, T(1))) - + i.x + detail::tvec4(i1.x, i2.x, i3.x, T(1))); - - // Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope - // 7*7*6 = 294, which is close to the ring size 17*17 = 289. - detail::tvec4 ip = detail::tvec4(T(1) / T(294), T(1) / T(49), T(1) / T(7), T(0)); - - detail::tvec4 p0 = grad4(j0, ip); - detail::tvec4 p1 = grad4(j1.x, ip); - detail::tvec4 p2 = grad4(j1.y, ip); - detail::tvec4 p3 = grad4(j1.z, ip); - detail::tvec4 p4 = grad4(j1.w, ip); - - // Normalise gradients - detail::tvec4 norm = taylorInvSqrt(detail::tvec4(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3))); - p0 *= norm.x; - p1 *= norm.y; - p2 *= norm.z; - p3 *= norm.w; - p4 *= taylorInvSqrt(dot(p4, p4)); - - // Mix contributions from the five corners - detail::tvec3 m0 = max(T(0.6) - detail::tvec3(dot(x0, x0), dot(x1, x1), dot(x2, x2)), T(0)); - detail::tvec2 m1 = max(T(0.6) - detail::tvec2(dot(x3, x3), dot(x4, x4) ), T(0)); - m0 = m0 * m0; - m1 = m1 * m1; - return T(49) * - (dot(m0 * m0, detail::tvec3(dot(p0, x0), dot(p1, x1), dot(p2, x2))) + - dot(m1 * m1, detail::tvec2(dot(p3, x3), dot(p4, x4)))); - } - - template - GLM_FUNC_QUALIFIER glm::detail::tvec2 noise2(glm::detail::tvec2 const & x) - { - return glm::detail::tvec2( - noise1(x + glm::detail::tvec2(0.0)), - noise1(glm::detail::tvec2(0.0) - x)); - } - - template - GLM_FUNC_QUALIFIER glm::detail::tvec2 noise2(glm::detail::tvec3 const & x) - { - return glm::detail::tvec2( - noise1(x + glm::detail::tvec3(0.0)), - noise1(glm::detail::tvec3(0.0) - x)); - } - - template - GLM_FUNC_QUALIFIER glm::detail::tvec2 noise2(glm::detail::tvec4 const & x) - { - return glm::detail::tvec2( - noise1(x + glm::detail::tvec4(0.0)), - noise1(glm::detail::tvec4(0.0) - x)); - } - - template - GLM_FUNC_QUALIFIER glm::detail::tvec3 noise3(glm::detail::tvec2 const & x) - { - return glm::detail::tvec3( - noise1(x - glm::detail::tvec2(1.0)), - noise1(x + glm::detail::tvec2(0.0)), - noise1(x + glm::detail::tvec2(1.0))); - } - - template - GLM_FUNC_QUALIFIER glm::detail::tvec3 noise3(glm::detail::tvec3 const & x) - { - return glm::detail::tvec3( - noise1(x - glm::detail::tvec3(1.0)), - noise1(x + glm::detail::tvec3(0.0)), - noise1(x + glm::detail::tvec3(1.0))); - } - - template - GLM_FUNC_QUALIFIER glm::detail::tvec3 noise3(glm::detail::tvec4 const & x) - { - return glm::detail::tvec3( - noise1(x - glm::detail::tvec4(1.0)), - noise1(x + glm::detail::tvec4(0.0)), - noise1(x + glm::detail::tvec4(1.0))); - } - - template - GLM_FUNC_QUALIFIER glm::detail::tvec4 noise4(glm::detail::tvec2 const & x) - { - return glm::detail::tvec4( - noise1(x - glm::detail::tvec2(1.0)), - noise1(x + glm::detail::tvec2(0.0)), - noise1(x + glm::detail::tvec2(1.0)), - noise1(x + glm::detail::tvec2(2.0))); - } - - - template - GLM_FUNC_QUALIFIER glm::detail::tvec4 noise4(glm::detail::tvec3 const & x) - { - return glm::detail::tvec4( - noise1(x - glm::detail::tvec3(1.0)), - noise1(x + glm::detail::tvec3(0.0)), - noise1(x + glm::detail::tvec3(1.0)), - noise1(x + glm::detail::tvec3(2.0))); - } - - template - GLM_FUNC_QUALIFIER glm::detail::tvec4 noise4(glm::detail::tvec4 const & x) - { - return glm::detail::tvec4( - noise1(x - glm::detail::tvec4(1.0)), - noise1(x + glm::detail::tvec4(0.0)), - noise1(x + glm::detail::tvec4(1.0)), - noise1(x + glm::detail::tvec4(2.0))); - } - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_noise.inl +/// @date 2008-08-01 / 2011-09-27 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER T noise1(T const & x) + { + return noise1(glm::detail::tvec2(x, T(0))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec2 noise2(T const & x) + { + return glm::detail::tvec2( + noise1(x + T(0.0)), + noise1(x + T(1.0))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec3 noise3(T const & x) + { + return glm::detail::tvec3( + noise1(x - T(1.0)), + noise1(x + T(0.0)), + noise1(x + T(1.0))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec4 noise4(T const & x) + { + return glm::detail::tvec4( + noise1(x - T(1.0)), + noise1(x + T(0.0)), + noise1(x + T(1.0)), + noise1(x + T(2.0))); + } + + template + GLM_FUNC_QUALIFIER T noise1(glm::detail::tvec2 const & v) + { + detail::tvec4 const C = detail::tvec4( + T( 0.211324865405187), // (3.0 - sqrt(3.0)) / 6.0 + T( 0.366025403784439), // 0.5 * (sqrt(3.0) - 1.0) + T(-0.577350269189626), // -1.0 + 2.0 * C.x + T( 0.024390243902439)); // 1.0 / 41.0 + + // First corner + detail::tvec2 i = floor(v + dot(v, detail::tvec2(C[1]))); + detail::tvec2 x0 = v - i + dot(i, detail::tvec2(C[0])); + + // Other corners + //i1.x = step( x0.y, x0.x ); // x0.x > x0.y ? 1.0 : 0.0 + //i1.y = 1.0 - i1.x; + detail::tvec2 i1 = (x0.x > x0.y) ? detail::tvec2(1, 0) : detail::tvec2(0, 1); + // x0 = x0 - 0.0 + 0.0 * C.xx ; + // x1 = x0 - i1 + 1.0 * C.xx ; + // x2 = x0 - 1.0 + 2.0 * C.xx ; + detail::tvec4 x12 = detail::tvec4(x0.x, x0.y, x0.x, x0.y) + detail::tvec4(C.x, C.x, C.z, C.z); + x12 = detail::tvec4(detail::tvec2(x12) - i1, x12.z, x12.w); + + // Permutations + i = mod(i, T(289)); // Avoid truncation effects in permutation + detail::tvec3 p = permute( + permute(i.y + detail::tvec3(T(0), i1.y, T(1))) + + i.x + detail::tvec3(T(0), i1.x, T(1))); + + detail::tvec3 m = max(T(0.5) - detail::tvec3( + dot(x0, x0), + dot(detail::tvec2(x12.x, x12.y), detail::tvec2(x12.x, x12.y)), + dot(detail::tvec2(x12.z, x12.w), detail::tvec2(x12.z, x12.w))), T(0)); + m = m * m ; + m = m * m ; + + // Gradients: 41 points uniformly over a line, mapped onto a diamond. + // The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287) + + detail::tvec3 x = T(2) * fract(p * C.w) - T(1); + detail::tvec3 h = abs(x) - T(0.5); + detail::tvec3 ox = floor(x + T(0.5)); + detail::tvec3 a0 = x - ox; + + // Normalise gradients implicitly by scaling m + // Inlined for speed: m *= taylorInvSqrt( a0*a0 + h*h ); + m *= T(1.79284291400159) - T(0.85373472095314) * (a0 * a0 + h * h); + + // Compute final noise value at P + detail::tvec3 g; + g.x = a0.x * x0.x + h.x * x0.y; + //g.yz = a0.yz * x12.xz + h.yz * x12.yw; + g.y = a0.y * x12.x + h.y * x12.y; + g.z = a0.z * x12.z + h.z * x12.w; + return T(130) * dot(m, g); + } + + template + GLM_FUNC_QUALIFIER T noise1(detail::tvec3 const & v) + { + detail::tvec2 const C(1.0 / 6.0, 1.0 / 3.0); + detail::tvec4 const D(0.0, 0.5, 1.0, 2.0); + + // First corner + detail::tvec3 i(floor(v + dot(v, detail::tvec3(C.y)))); + detail::tvec3 x0(v - i + dot(i, detail::tvec3(C.x))); + + // Other corners + detail::tvec3 g(step(detail::tvec3(x0.y, x0.z, x0.x), x0)); + detail::tvec3 l(T(1) - g); + detail::tvec3 i1(min(g, detail::tvec3(l.z, l.x, l.y))); + detail::tvec3 i2(max(g, detail::tvec3(l.z, l.x, l.y))); + + // x0 = x0 - 0.0 + 0.0 * C.xxx; + // x1 = x0 - i1 + 1.0 * C.xxx; + // x2 = x0 - i2 + 2.0 * C.xxx; + // x3 = x0 - 1.0 + 3.0 * C.xxx; + detail::tvec3 x1(x0 - i1 + C.x); + detail::tvec3 x2(x0 - i2 + C.y); // 2.0*C.x = 1/3 = C.y + detail::tvec3 x3(x0 - D.y); // -1.0+3.0*C.x = -0.5 = -D.y + + // Permutations + i = mod289(i); + detail::tvec4 p(permute(permute(permute( + i.z + detail::tvec4(T(0), i1.z, i2.z, T(1))) + + i.y + detail::tvec4(T(0), i1.y, i2.y, T(1))) + + i.x + detail::tvec4(T(0), i1.x, i2.x, T(1)))); + + // Gradients: 7x7 points over a square, mapped onto an octahedron. + // The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294) + T n_ = T(0.142857142857); // 1.0/7.0 + detail::tvec3 ns(n_ * detail::tvec3(D.w, D.y, D.z) - detail::tvec3(D.x, D.z, D.x)); + + detail::tvec4 j(p - T(49) * floor(p * ns.z * ns.z)); // mod(p,7*7) + + detail::tvec4 x_(floor(j * ns.z)); + detail::tvec4 y_(floor(j - T(7) * x_)); // mod(j,N) + + detail::tvec4 x(x_ * ns.x + ns.y); + detail::tvec4 y(y_ * ns.x + ns.y); + detail::tvec4 h(T(1) - abs(x) - abs(y)); + + detail::tvec4 b0(x.x, x.y, y.x, y.y); + detail::tvec4 b1(x.z, x.w, y.z, y.w); + + // vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0; + // vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0; + detail::tvec4 s0(floor(b0) * T(2) + T(1)); + detail::tvec4 s1(floor(b1) * T(2) + T(1)); + detail::tvec4 sh(-step(h, detail::tvec4(0.0))); + + detail::tvec4 a0 = detail::tvec4(b0.x, b0.z, b0.y, b0.w) + detail::tvec4(s0.x, s0.z, s0.y, s0.w) * detail::tvec4(sh.x, sh.x, sh.y, sh.y); + detail::tvec4 a1 = detail::tvec4(b1.x, b1.z, b1.y, b1.w) + detail::tvec4(s1.x, s1.z, s1.y, s1.w) * detail::tvec4(sh.z, sh.z, sh.w, sh.w); + + detail::tvec3 p0(a0.x, a0.y, h.x); + detail::tvec3 p1(a0.z, a0.w, h.y); + detail::tvec3 p2(a1.x, a1.y, h.z); + detail::tvec3 p3(a1.z, a1.w, h.w); + + // Normalise gradients + detail::tvec4 norm = taylorInvSqrt(detail::tvec4(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3))); + p0 *= norm.x; + p1 *= norm.y; + p2 *= norm.z; + p3 *= norm.w; + + // Mix final noise value + detail::tvec4 m = max(T(0.6) - detail::tvec4(dot(x0, x0), dot(x1, x1), dot(x2, x2), dot(x3, x3)), T(0)); + m = m * m; + return T(42) * dot(m * m, detail::tvec4(dot(p0, x0), dot(p1, x1), dot(p2, x2), dot(p3, x3))); + } + + template + GLM_FUNC_QUALIFIER T noise1(detail::tvec4 const & v) + { + detail::tvec4 const C( + 0.138196601125011, // (5 - sqrt(5))/20 G4 + 0.276393202250021, // 2 * G4 + 0.414589803375032, // 3 * G4 + -0.447213595499958); // -1 + 4 * G4 + + // (sqrt(5) - 1)/4 = F4, used once below + T const F4 = T(0.309016994374947451); + + // First corner + detail::tvec4 i = floor(v + dot(v, vec4(F4))); + detail::tvec4 x0 = v - i + dot(i, vec4(C.x)); + + // Other corners + + // Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI) + detail::tvec4 i0; + detail::tvec3 isX = step(detail::tvec3(x0.y, x0.z, x0.w), detail::tvec3(x0.x)); + detail::tvec3 isYZ = step(detail::tvec3(x0.z, x0.w, x0.w), detail::tvec3(x0.y, x0.y, x0.z)); + // i0.x = dot(isX, vec3(1.0)); + //i0.x = isX.x + isX.y + isX.z; + //i0.yzw = T(1) - isX; + i0 = detail::tvec4(isX.x + isX.y + isX.z, T(1) - isX); + // i0.y += dot(isYZ.xy, vec2(1.0)); + i0.y += isYZ.x + isYZ.y; + //i0.zw += 1.0 - detail::tvec2(isYZ.x, isYZ.y); + i0.z += T(1) - isYZ.x; + i0.w += T(1) - isYZ.y; + i0.z += isYZ.z; + i0.w += T(1) - isYZ.z; + + // i0 now contains the unique values 0,1,2,3 in each channel + detail::tvec4 i3 = clamp(i0, 0.0, 1.0); + detail::tvec4 i2 = clamp(i0 - 1.0, 0.0, 1.0); + detail::tvec4 i1 = clamp(i0 - 2.0, 0.0, 1.0); + + // x0 = x0 - 0.0 + 0.0 * C.xxxx + // x1 = x0 - i1 + 0.0 * C.xxxx + // x2 = x0 - i2 + 0.0 * C.xxxx + // x3 = x0 - i3 + 0.0 * C.xxxx + // x4 = x0 - 1.0 + 4.0 * C.xxxx + detail::tvec4 x1 = x0 - i1 + C.x; + detail::tvec4 x2 = x0 - i2 + C.y; + detail::tvec4 x3 = x0 - i3 + C.z; + detail::tvec4 x4 = x0 + C.w; + + // Permutations + i = mod(i, T(289)); + T j0 = permute(permute(permute(permute(i.w) + i.z) + i.y) + i.x); + detail::tvec4 j1 = permute(permute(permute(permute( + i.w + detail::tvec4(i1.w, i2.w, i3.w, T(1))) + + i.z + detail::tvec4(i1.z, i2.z, i3.z, T(1))) + + i.y + detail::tvec4(i1.y, i2.y, i3.y, T(1))) + + i.x + detail::tvec4(i1.x, i2.x, i3.x, T(1))); + + // Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope + // 7*7*6 = 294, which is close to the ring size 17*17 = 289. + detail::tvec4 ip = detail::tvec4(T(1) / T(294), T(1) / T(49), T(1) / T(7), T(0)); + + detail::tvec4 p0 = grad4(j0, ip); + detail::tvec4 p1 = grad4(j1.x, ip); + detail::tvec4 p2 = grad4(j1.y, ip); + detail::tvec4 p3 = grad4(j1.z, ip); + detail::tvec4 p4 = grad4(j1.w, ip); + + // Normalise gradients + detail::tvec4 norm = taylorInvSqrt(detail::tvec4(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3))); + p0 *= norm.x; + p1 *= norm.y; + p2 *= norm.z; + p3 *= norm.w; + p4 *= taylorInvSqrt(dot(p4, p4)); + + // Mix contributions from the five corners + detail::tvec3 m0 = max(T(0.6) - detail::tvec3(dot(x0, x0), dot(x1, x1), dot(x2, x2)), T(0)); + detail::tvec2 m1 = max(T(0.6) - detail::tvec2(dot(x3, x3), dot(x4, x4) ), T(0)); + m0 = m0 * m0; + m1 = m1 * m1; + return T(49) * + (dot(m0 * m0, detail::tvec3(dot(p0, x0), dot(p1, x1), dot(p2, x2))) + + dot(m1 * m1, detail::tvec2(dot(p3, x3), dot(p4, x4)))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec2 noise2(glm::detail::tvec2 const & x) + { + return glm::detail::tvec2( + noise1(x + glm::detail::tvec2(0.0)), + noise1(glm::detail::tvec2(0.0) - x)); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec2 noise2(glm::detail::tvec3 const & x) + { + return glm::detail::tvec2( + noise1(x + glm::detail::tvec3(0.0)), + noise1(glm::detail::tvec3(0.0) - x)); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec2 noise2(glm::detail::tvec4 const & x) + { + return glm::detail::tvec2( + noise1(x + glm::detail::tvec4(0.0)), + noise1(glm::detail::tvec4(0.0) - x)); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec3 noise3(glm::detail::tvec2 const & x) + { + return glm::detail::tvec3( + noise1(x - glm::detail::tvec2(1.0)), + noise1(x + glm::detail::tvec2(0.0)), + noise1(x + glm::detail::tvec2(1.0))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec3 noise3(glm::detail::tvec3 const & x) + { + return glm::detail::tvec3( + noise1(x - glm::detail::tvec3(1.0)), + noise1(x + glm::detail::tvec3(0.0)), + noise1(x + glm::detail::tvec3(1.0))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec3 noise3(glm::detail::tvec4 const & x) + { + return glm::detail::tvec3( + noise1(x - glm::detail::tvec4(1.0)), + noise1(x + glm::detail::tvec4(0.0)), + noise1(x + glm::detail::tvec4(1.0))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec4 noise4(glm::detail::tvec2 const & x) + { + return glm::detail::tvec4( + noise1(x - glm::detail::tvec2(1.0)), + noise1(x + glm::detail::tvec2(0.0)), + noise1(x + glm::detail::tvec2(1.0)), + noise1(x + glm::detail::tvec2(2.0))); + } + + + template + GLM_FUNC_QUALIFIER glm::detail::tvec4 noise4(glm::detail::tvec3 const & x) + { + return glm::detail::tvec4( + noise1(x - glm::detail::tvec3(1.0)), + noise1(x + glm::detail::tvec3(0.0)), + noise1(x + glm::detail::tvec3(1.0)), + noise1(x + glm::detail::tvec3(2.0))); + } + + template + GLM_FUNC_QUALIFIER glm::detail::tvec4 noise4(glm::detail::tvec4 const & x) + { + return glm::detail::tvec4( + noise1(x - glm::detail::tvec4(1.0)), + noise1(x + glm::detail::tvec4(0.0)), + noise1(x + glm::detail::tvec4(1.0)), + noise1(x + glm::detail::tvec4(2.0))); + } + +}//namespace glm diff --git a/include/gal/opengl/glm/core/func_packing.hpp b/include/gal/opengl/glm/core/func_packing.hpp index b196095e7a..e4f26dcbf5 100644 --- a/include/gal/opengl/glm/core/func_packing.hpp +++ b/include/gal/opengl/glm/core/func_packing.hpp @@ -1,193 +1,193 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/func_packing.hpp -/// @date 2010-03-17 / 2011-06-15 -/// @author Christophe Riccio -/// -/// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions -/// -/// @defgroup core_func_packing Floating-Point Pack and Unpack Functions -/// @ingroup core -/// -/// These functions do not operate component-wise, rather as described in each case. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_CORE_func_packing -#define GLM_CORE_func_packing GLM_VERSION - -namespace glm -{ - /// @addtogroup core_func_packing - /// @{ - - //! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. - //! Then, the results are packed into the returned 32-bit unsigned integer. - //! - //! The conversion for component c of v to fixed point is done as follows: - //! packUnorm2x16: round(clamp(c, 0, +1) * 65535.0) - //! - //! The first component of the vector will be written to the least significant bits of the output; - //! the last component will be written to the most significant bits. - //! - /// @see GLSL packUnorm2x16 man page - /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - detail::uint32 packUnorm2x16(detail::tvec2 const & v); - - //! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. - //! Then, the results are packed into the returned 32-bit unsigned integer. - //! - //! The conversion for component c of v to fixed point is done as follows: - //! packSnorm2x16: round(clamp(v, -1, +1) * 32767.0) - //! - //! The first component of the vector will be written to the least significant bits of the output; - //! the last component will be written to the most significant bits. - //! - /// @see GLSL packSnorm2x16 man page - /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - detail::uint32 packSnorm2x16(detail::tvec2 const & v); - - //! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. - //! Then, the results are packed into the returned 32-bit unsigned integer. - //! - //! The conversion for component c of v to fixed point is done as follows: - //! packUnorm4x8: round(clamp(c, 0, +1) * 255.0) - //! - //! The first component of the vector will be written to the least significant bits of the output; - //! the last component will be written to the most significant bits. - //! - /// @see GLSL packUnorm4x8 man page - /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - detail::uint32 packUnorm4x8(detail::tvec4 const & v); - - //! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. - //! Then, the results are packed into the returned 32-bit unsigned integer. - //! - //! The conversion for component c of v to fixed point is done as follows: - //! packSnorm4x8: round(clamp(c, -1, +1) * 127.0) - //! - //! The first component of the vector will be written to the least significant bits of the output; - //! the last component will be written to the most significant bits. - //! - /// @see GLSL packSnorm4x8 man page - /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - detail::uint32 packSnorm4x8(detail::tvec4 const & v); - - //! First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. - //! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. - //! - //! The conversion for unpacked fixed-point value f to floating point is done as follows: - //! unpackUnorm2x16: f / 65535.0 - //! - //! The first component of the returned vector will be extracted from the least significant bits of the input; - //! the last component will be extracted from the most significant bits. - //! - /// @see GLSL unpackUnorm2x16 man page - /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - detail::tvec2 unpackUnorm2x16(detail::uint32 const & p); - - //! First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. - //! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. - //! - //! The conversion for unpacked fixed-point value f to floating point is done as follows: - //! unpackSnorm2x16: clamp(f / 32767.0, -1, +1) - //! - //! The first component of the returned vector will be extracted from the least significant bits of the input; - //! the last component will be extracted from the most significant bits. - //! - /// @see GLSL unpackSnorm2x16 man page - /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - detail::tvec2 unpackSnorm2x16(detail::uint32 const & p); - - /// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. - /// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. - /// - /// The conversion for unpacked fixed-point value f to floating point is done as follows: - /// unpackUnorm4x8: f / 255.0 - /// - /// The first component of the returned vector will be extracted from the least significant bits of the input; - /// the last component will be extracted from the most significant bits. - /// - /// @see GLSL unpackUnorm4x8 man page - /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - detail::tvec4 unpackUnorm4x8(detail::uint32 const & p); - - /// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. - /// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. - /// - /// The conversion for unpacked fixed-point value f to floating point is done as follows: - /// unpackSnorm4x8: clamp(f / 127.0, -1, +1) - /// - /// The first component of the returned vector will be extracted from the least significant bits of the input; - /// the last component will be extracted from the most significant bits. - /// - /// @see GLSL unpackSnorm4x8 man page - /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - detail::tvec4 unpackSnorm4x8(detail::uint32 const & p); - - /// Returns a double-precision value obtained by packing the components of v into a 64-bit value. - /// If an IEEE 754 Inf or NaN is created, it will not signal, and the resulting floating point value is unspecified. - /// Otherwise, the bit- level representation of v is preserved. - /// The first vector component specifies the 32 least significant bits; - /// the second component specifies the 32 most significant bits. - /// - /// @see GLSL packDouble2x32 man page - /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - double packDouble2x32(detail::tvec2 const & v); - - /// Returns a two-component unsigned integer vector representation of v. - /// The bit-level representation of v is preserved. - /// The first component of the vector contains the 32 least significant bits of the double; - /// the second component consists the 32 most significant bits. - /// - /// @see GLSL unpackDouble2x32 man page - /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - detail::tvec2 unpackDouble2x32(double const & v); - - /// Returns an unsigned integer obtained by converting the components of a two-component floating-point vector - /// to the 16-bit floating-point representation found in the OpenGL Specification, - /// and then packing these two 16- bit integers into a 32-bit unsigned integer. - /// The first vector component specifies the 16 least-significant bits of the result; - /// the second component specifies the 16 most-significant bits. - /// - /// @see GLSL packHalf2x16 man page - /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - uint packHalf2x16(vec2 const & v); - - /// Returns a two-component floating-point vector with components obtained by unpacking a 32-bit unsigned integer into a pair of 16-bit values, - /// interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification, - /// and converting them to 32-bit floating-point values. - /// The first component of the vector is obtained from the 16 least-significant bits of v; - /// the second component is obtained from the 16 most-significant bits of v. - /// - /// @see GLSL unpackHalf2x16 man page - /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions - vec2 unpackHalf2x16(uint const & v); - - /// @} -}//namespace glm - -#include "func_packing.inl" - -#endif//GLM_CORE_func_packing - +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_packing.hpp +/// @date 2010-03-17 / 2011-06-15 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions +/// +/// @defgroup core_func_packing Floating-Point Pack and Unpack Functions +/// @ingroup core +/// +/// These functions do not operate component-wise, rather as described in each case. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_CORE_func_packing +#define GLM_CORE_func_packing GLM_VERSION + +namespace glm +{ + /// @addtogroup core_func_packing + /// @{ + + //! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. + //! Then, the results are packed into the returned 32-bit unsigned integer. + //! + //! The conversion for component c of v to fixed point is done as follows: + //! packUnorm2x16: round(clamp(c, 0, +1) * 65535.0) + //! + //! The first component of the vector will be written to the least significant bits of the output; + //! the last component will be written to the most significant bits. + //! + /// @see GLSL packUnorm2x16 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::uint32 packUnorm2x16(detail::tvec2 const & v); + + //! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. + //! Then, the results are packed into the returned 32-bit unsigned integer. + //! + //! The conversion for component c of v to fixed point is done as follows: + //! packSnorm2x16: round(clamp(v, -1, +1) * 32767.0) + //! + //! The first component of the vector will be written to the least significant bits of the output; + //! the last component will be written to the most significant bits. + //! + /// @see GLSL packSnorm2x16 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::uint32 packSnorm2x16(detail::tvec2 const & v); + + //! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. + //! Then, the results are packed into the returned 32-bit unsigned integer. + //! + //! The conversion for component c of v to fixed point is done as follows: + //! packUnorm4x8: round(clamp(c, 0, +1) * 255.0) + //! + //! The first component of the vector will be written to the least significant bits of the output; + //! the last component will be written to the most significant bits. + //! + /// @see GLSL packUnorm4x8 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::uint32 packUnorm4x8(detail::tvec4 const & v); + + //! First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. + //! Then, the results are packed into the returned 32-bit unsigned integer. + //! + //! The conversion for component c of v to fixed point is done as follows: + //! packSnorm4x8: round(clamp(c, -1, +1) * 127.0) + //! + //! The first component of the vector will be written to the least significant bits of the output; + //! the last component will be written to the most significant bits. + //! + /// @see GLSL packSnorm4x8 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::uint32 packSnorm4x8(detail::tvec4 const & v); + + //! First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. + //! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. + //! + //! The conversion for unpacked fixed-point value f to floating point is done as follows: + //! unpackUnorm2x16: f / 65535.0 + //! + //! The first component of the returned vector will be extracted from the least significant bits of the input; + //! the last component will be extracted from the most significant bits. + //! + /// @see GLSL unpackUnorm2x16 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::tvec2 unpackUnorm2x16(detail::uint32 const & p); + + //! First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. + //! Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. + //! + //! The conversion for unpacked fixed-point value f to floating point is done as follows: + //! unpackSnorm2x16: clamp(f / 32767.0, -1, +1) + //! + //! The first component of the returned vector will be extracted from the least significant bits of the input; + //! the last component will be extracted from the most significant bits. + //! + /// @see GLSL unpackSnorm2x16 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::tvec2 unpackSnorm2x16(detail::uint32 const & p); + + /// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. + /// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. + /// + /// The conversion for unpacked fixed-point value f to floating point is done as follows: + /// unpackUnorm4x8: f / 255.0 + /// + /// The first component of the returned vector will be extracted from the least significant bits of the input; + /// the last component will be extracted from the most significant bits. + /// + /// @see GLSL unpackUnorm4x8 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::tvec4 unpackUnorm4x8(detail::uint32 const & p); + + /// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers. + /// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector. + /// + /// The conversion for unpacked fixed-point value f to floating point is done as follows: + /// unpackSnorm4x8: clamp(f / 127.0, -1, +1) + /// + /// The first component of the returned vector will be extracted from the least significant bits of the input; + /// the last component will be extracted from the most significant bits. + /// + /// @see GLSL unpackSnorm4x8 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::tvec4 unpackSnorm4x8(detail::uint32 const & p); + + /// Returns a double-precision value obtained by packing the components of v into a 64-bit value. + /// If an IEEE 754 Inf or NaN is created, it will not signal, and the resulting floating point value is unspecified. + /// Otherwise, the bit- level representation of v is preserved. + /// The first vector component specifies the 32 least significant bits; + /// the second component specifies the 32 most significant bits. + /// + /// @see GLSL packDouble2x32 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + double packDouble2x32(detail::tvec2 const & v); + + /// Returns a two-component unsigned integer vector representation of v. + /// The bit-level representation of v is preserved. + /// The first component of the vector contains the 32 least significant bits of the double; + /// the second component consists the 32 most significant bits. + /// + /// @see GLSL unpackDouble2x32 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + detail::tvec2 unpackDouble2x32(double const & v); + + /// Returns an unsigned integer obtained by converting the components of a two-component floating-point vector + /// to the 16-bit floating-point representation found in the OpenGL Specification, + /// and then packing these two 16- bit integers into a 32-bit unsigned integer. + /// The first vector component specifies the 16 least-significant bits of the result; + /// the second component specifies the 16 most-significant bits. + /// + /// @see GLSL packHalf2x16 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + uint packHalf2x16(vec2 const & v); + + /// Returns a two-component floating-point vector with components obtained by unpacking a 32-bit unsigned integer into a pair of 16-bit values, + /// interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification, + /// and converting them to 32-bit floating-point values. + /// The first component of the vector is obtained from the 16 least-significant bits of v; + /// the second component is obtained from the 16 most-significant bits of v. + /// + /// @see GLSL unpackHalf2x16 man page + /// @see GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions + vec2 unpackHalf2x16(uint const & v); + + /// @} +}//namespace glm + +#include "func_packing.inl" + +#endif//GLM_CORE_func_packing + diff --git a/include/gal/opengl/glm/core/func_packing.inl b/include/gal/opengl/glm/core/func_packing.inl index 260acf29b4..27197151bb 100644 --- a/include/gal/opengl/glm/core/func_packing.inl +++ b/include/gal/opengl/glm/core/func_packing.inl @@ -1,178 +1,178 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/func_packing.inl -/// @date 2010-03-17 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - GLM_FUNC_QUALIFIER detail::uint32 packUnorm2x16(detail::tvec2 const & v) - { - detail::uint16 A(detail::uint16(round(clamp(v.x, 0.0f, 1.0f) * 65535.0f))); - detail::uint16 B(detail::uint16(round(clamp(v.y, 0.0f, 1.0f) * 65535.0f))); - return detail::uint32((B << 16) | A); - } - - GLM_FUNC_QUALIFIER detail::tvec2 unpackUnorm2x16(detail::uint32 const & p) - { - detail::uint32 Mask16((1 << 16) - 1); - detail::uint32 A((p >> 0) & Mask16); - detail::uint32 B((p >> 16) & Mask16); - return detail::tvec2( - A * 1.0f / 65535.0f, - B * 1.0f / 65535.0f); - } - - GLM_FUNC_QUALIFIER detail::uint32 packSnorm2x16(detail::tvec2 const & v) - { - union iu - { - detail::int16 i; - detail::uint16 u; - } A, B; - - detail::tvec2 Unpack = clamp(v ,-1.0f, 1.0f) * 32767.0f; - A.i = detail::int16(round(Unpack.x)); - B.i = detail::int16(round(Unpack.y)); - detail::uint32 Pack = (detail::uint32(B.u) << 16) | (detail::uint32(A.u) << 0); - return Pack; - } - - GLM_FUNC_QUALIFIER detail::tvec2 unpackSnorm2x16(detail::uint32 const & p) - { - union iu - { - detail::int16 i; - detail::uint16 u; - } A, B; - - detail::uint32 Mask16((1 << 16) - 1); - A.u = detail::uint16((p >> 0) & Mask16); - B.u = detail::uint16((p >> 16) & Mask16); - detail::tvec2 Pack(A.i, B.i); - - return clamp(Pack * 1.0f / 32767.0f, -1.0f, 1.0f); - } - - GLM_FUNC_QUALIFIER detail::uint32 packUnorm4x8(detail::tvec4 const & v) - { - detail::uint8 A((detail::uint8)round(clamp(v.x, 0.0f, 1.0f) * 255.0f)); - detail::uint8 B((detail::uint8)round(clamp(v.y, 0.0f, 1.0f) * 255.0f)); - detail::uint8 C((detail::uint8)round(clamp(v.z, 0.0f, 1.0f) * 255.0f)); - detail::uint8 D((detail::uint8)round(clamp(v.w, 0.0f, 1.0f) * 255.0f)); - return detail::uint32((D << 24) | (C << 16) | (B << 8) | A); - } - - GLM_FUNC_QUALIFIER detail::tvec4 unpackUnorm4x8(detail::uint32 const & p) - { - detail::uint32 Mask8((1 << 8) - 1); - detail::uint32 A((p >> 0) & Mask8); - detail::uint32 B((p >> 8) & Mask8); - detail::uint32 C((p >> 16) & Mask8); - detail::uint32 D((p >> 24) & Mask8); - return detail::tvec4( - A * 1.0f / 255.0f, - B * 1.0f / 255.0f, - C * 1.0f / 255.0f, - D * 1.0f / 255.0f); - } - - GLM_FUNC_QUALIFIER detail::uint32 packSnorm4x8(detail::tvec4 const & v) - { - union iu - { - detail::int8 i; - detail::uint8 u; - } A, B, C, D; - - detail::tvec4 Unpack = clamp(v ,-1.0f, 1.0f) * 127.0f; - A.i = detail::int8(round(Unpack.x)); - B.i = detail::int8(round(Unpack.y)); - C.i = detail::int8(round(Unpack.z)); - D.i = detail::int8(round(Unpack.w)); - detail::uint32 Pack = (detail::uint32(D.u) << 24) | (detail::uint32(C.u) << 16) | (detail::uint32(B.u) << 8) | (detail::uint32(A.u) << 0); - return Pack; - } - - GLM_FUNC_QUALIFIER detail::tvec4 unpackSnorm4x8(detail::uint32 const & p) - { - union iu - { - detail::int8 i; - detail::uint8 u; - } A, B, C, D; - - detail::uint32 Mask8((1 << 8) - 1); - A.u = detail::uint8((p >> 0) & Mask8); - B.u = detail::uint8((p >> 8) & Mask8); - C.u = detail::uint8((p >> 16) & Mask8); - D.u = detail::uint8((p >> 24) & Mask8); - detail::tvec4 Pack(A.i, B.i, C.i, D.i); - - return clamp(Pack * 1.0f / 127.0f, -1.0f, 1.0f); - } - - GLM_FUNC_QUALIFIER double packDouble2x32(detail::tvec2 const & v) - { - return *(double*)&v; - } - - GLM_FUNC_QUALIFIER detail::tvec2 unpackDouble2x32(double const & v) - { - return *(detail::tvec2*)&v; - } - - GLM_FUNC_QUALIFIER uint packHalf2x16(detail::tvec2 const & v) - { - union helper - { - uint other; - struct - { - detail::hdata a, b; - } orig; - } Pack; - - Pack.orig.a = detail::toFloat16(v.x); - Pack.orig.b = detail::toFloat16(v.y); - return *(uint*)&Pack; - } - - GLM_FUNC_QUALIFIER vec2 unpackHalf2x16(uint const & v) - { - union helper - { - uint other; - struct - { - detail::hdata a, b; - } orig; - } Unpack; - Unpack.other = v; - - return vec2(detail::toFloat32(Unpack.orig.a), detail::toFloat32(Unpack.orig.b)); - } -}//namespace glm - +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_packing.inl +/// @date 2010-03-17 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + GLM_FUNC_QUALIFIER detail::uint32 packUnorm2x16(detail::tvec2 const & v) + { + detail::uint16 A(detail::uint16(round(clamp(v.x, 0.0f, 1.0f) * 65535.0f))); + detail::uint16 B(detail::uint16(round(clamp(v.y, 0.0f, 1.0f) * 65535.0f))); + return detail::uint32((B << 16) | A); + } + + GLM_FUNC_QUALIFIER detail::tvec2 unpackUnorm2x16(detail::uint32 const & p) + { + detail::uint32 Mask16((1 << 16) - 1); + detail::uint32 A((p >> 0) & Mask16); + detail::uint32 B((p >> 16) & Mask16); + return detail::tvec2( + A * 1.0f / 65535.0f, + B * 1.0f / 65535.0f); + } + + GLM_FUNC_QUALIFIER detail::uint32 packSnorm2x16(detail::tvec2 const & v) + { + union iu + { + detail::int16 i; + detail::uint16 u; + } A, B; + + detail::tvec2 Unpack = clamp(v ,-1.0f, 1.0f) * 32767.0f; + A.i = detail::int16(round(Unpack.x)); + B.i = detail::int16(round(Unpack.y)); + detail::uint32 Pack = (detail::uint32(B.u) << 16) | (detail::uint32(A.u) << 0); + return Pack; + } + + GLM_FUNC_QUALIFIER detail::tvec2 unpackSnorm2x16(detail::uint32 const & p) + { + union iu + { + detail::int16 i; + detail::uint16 u; + } A, B; + + detail::uint32 Mask16((1 << 16) - 1); + A.u = detail::uint16((p >> 0) & Mask16); + B.u = detail::uint16((p >> 16) & Mask16); + detail::tvec2 Pack(A.i, B.i); + + return clamp(Pack * 1.0f / 32767.0f, -1.0f, 1.0f); + } + + GLM_FUNC_QUALIFIER detail::uint32 packUnorm4x8(detail::tvec4 const & v) + { + detail::uint8 A((detail::uint8)round(clamp(v.x, 0.0f, 1.0f) * 255.0f)); + detail::uint8 B((detail::uint8)round(clamp(v.y, 0.0f, 1.0f) * 255.0f)); + detail::uint8 C((detail::uint8)round(clamp(v.z, 0.0f, 1.0f) * 255.0f)); + detail::uint8 D((detail::uint8)round(clamp(v.w, 0.0f, 1.0f) * 255.0f)); + return detail::uint32((D << 24) | (C << 16) | (B << 8) | A); + } + + GLM_FUNC_QUALIFIER detail::tvec4 unpackUnorm4x8(detail::uint32 const & p) + { + detail::uint32 Mask8((1 << 8) - 1); + detail::uint32 A((p >> 0) & Mask8); + detail::uint32 B((p >> 8) & Mask8); + detail::uint32 C((p >> 16) & Mask8); + detail::uint32 D((p >> 24) & Mask8); + return detail::tvec4( + A * 1.0f / 255.0f, + B * 1.0f / 255.0f, + C * 1.0f / 255.0f, + D * 1.0f / 255.0f); + } + + GLM_FUNC_QUALIFIER detail::uint32 packSnorm4x8(detail::tvec4 const & v) + { + union iu + { + detail::int8 i; + detail::uint8 u; + } A, B, C, D; + + detail::tvec4 Unpack = clamp(v ,-1.0f, 1.0f) * 127.0f; + A.i = detail::int8(round(Unpack.x)); + B.i = detail::int8(round(Unpack.y)); + C.i = detail::int8(round(Unpack.z)); + D.i = detail::int8(round(Unpack.w)); + detail::uint32 Pack = (detail::uint32(D.u) << 24) | (detail::uint32(C.u) << 16) | (detail::uint32(B.u) << 8) | (detail::uint32(A.u) << 0); + return Pack; + } + + GLM_FUNC_QUALIFIER detail::tvec4 unpackSnorm4x8(detail::uint32 const & p) + { + union iu + { + detail::int8 i; + detail::uint8 u; + } A, B, C, D; + + detail::uint32 Mask8((1 << 8) - 1); + A.u = detail::uint8((p >> 0) & Mask8); + B.u = detail::uint8((p >> 8) & Mask8); + C.u = detail::uint8((p >> 16) & Mask8); + D.u = detail::uint8((p >> 24) & Mask8); + detail::tvec4 Pack(A.i, B.i, C.i, D.i); + + return clamp(Pack * 1.0f / 127.0f, -1.0f, 1.0f); + } + + GLM_FUNC_QUALIFIER double packDouble2x32(detail::tvec2 const & v) + { + return *(double*)&v; + } + + GLM_FUNC_QUALIFIER detail::tvec2 unpackDouble2x32(double const & v) + { + return *(detail::tvec2*)&v; + } + + GLM_FUNC_QUALIFIER uint packHalf2x16(detail::tvec2 const & v) + { + union helper + { + uint other; + struct + { + detail::hdata a, b; + } orig; + } Pack; + + Pack.orig.a = detail::toFloat16(v.x); + Pack.orig.b = detail::toFloat16(v.y); + return *(uint*)&Pack; + } + + GLM_FUNC_QUALIFIER vec2 unpackHalf2x16(uint const & v) + { + union helper + { + uint other; + struct + { + detail::hdata a, b; + } orig; + } Unpack; + Unpack.other = v; + + return vec2(detail::toFloat32(Unpack.orig.a), detail::toFloat32(Unpack.orig.b)); + } +}//namespace glm + diff --git a/include/gal/opengl/glm/core/func_trigonometric.hpp b/include/gal/opengl/glm/core/func_trigonometric.hpp index d8b87e368e..ccb7f9ea6d 100644 --- a/include/gal/opengl/glm/core/func_trigonometric.hpp +++ b/include/gal/opengl/glm/core/func_trigonometric.hpp @@ -1,203 +1,203 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/func_trigonometric.hpp -/// @date 2008-08-01 / 2011-06-15 -/// @author Christophe Riccio -/// -/// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions -/// -/// @defgroup core_func_trigonometric Angle and Trigonometry Functions -/// @ingroup core -/// -/// Function parameters specified as angle are assumed to be in units of radians. -/// In no case will any of these functions result in a divide by zero error. If -/// the divisor of a ratio is 0, then results will be undefined. -/// -/// These all operate component-wise. The description is per component. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_CORE_func_trigonometric -#define GLM_CORE_func_trigonometric GLM_VERSION - -namespace glm -{ - /// @addtogroup core_func_trigonometric - /// @{ - - /// Converts degrees to radians and returns the result. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL radians man page - /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions - template - genType radians(genType const & degrees); - - /// Converts radians to degrees and returns the result. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL degrees man page - /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions - template - genType degrees(genType const & radians); - - /// The standard trigonometric sine function. - /// The values returned by this function will range from [-1, 1]. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL sin man page - /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions - template - genType sin(genType const & angle); - - /// The standard trigonometric cosine function. - /// The values returned by this function will range from [-1, 1]. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL cos man page - /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions - template - genType cos(genType const & angle); - - /// The standard trigonometric tangent function. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL tan man page - /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions - template - genType tan(genType const & angle); - - /// Arc sine. Returns an angle whose sine is x. - /// The range of values returned by this function is [-PI/2, PI/2]. - /// Results are undefined if |x| > 1. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL asin man page - /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions - template - genType asin(genType const & x); - - /// Arc cosine. Returns an angle whose sine is x. - /// The range of values returned by this function is [0, PI]. - /// Results are undefined if |x| > 1. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL acos man page - /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions - template - genType acos(genType const & x); - - /// Arc tangent. Returns an angle whose tangent is y/x. - /// The signs of x and y are used to determine what - /// quadrant the angle is in. The range of values returned - /// by this function is [-PI, PI]. Results are undefined - /// if x and y are both 0. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL atan man page - /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions - template - genType atan(genType const & y, genType const & x); - - /// Arc tangent. Returns an angle whose tangent is y_over_x. - /// The range of values returned by this function is [-PI/2, PI/2]. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL atan man page - /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions - template - genType atan(genType const & y_over_x); - - /// Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2 - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL sinh man page - /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions - template - genType sinh(genType const & angle); - - /// Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2 - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL cosh man page - /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions - template - genType cosh(genType const & angle); - - /// Returns the hyperbolic tangent function, sinh(angle) / cosh(angle) - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL tanh man page - /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions - template - genType tanh(genType const & angle); - - /// Arc hyperbolic sine; returns the inverse of sinh. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL asinh man page - /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions - template - genType asinh(genType const & x); - - /// Arc hyperbolic cosine; returns the non-negative inverse - /// of cosh. Results are undefined if x < 1. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL acosh man page - /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions - template - genType acosh(genType const & x); - - /// Arc hyperbolic tangent; returns the inverse of tanh. - /// Results are undefined if abs(x) >= 1. - /// - /// @tparam genType Floating-point scalar or vector types. - /// - /// @see GLSL atanh man page - /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions - template - genType atanh(genType const & x); - - /// @} -}//namespace glm - -#include "func_trigonometric.inl" - -#endif//GLM_CORE_func_trigonometric - - +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_trigonometric.hpp +/// @date 2008-08-01 / 2011-06-15 +/// @author Christophe Riccio +/// +/// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions +/// +/// @defgroup core_func_trigonometric Angle and Trigonometry Functions +/// @ingroup core +/// +/// Function parameters specified as angle are assumed to be in units of radians. +/// In no case will any of these functions result in a divide by zero error. If +/// the divisor of a ratio is 0, then results will be undefined. +/// +/// These all operate component-wise. The description is per component. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_CORE_func_trigonometric +#define GLM_CORE_func_trigonometric GLM_VERSION + +namespace glm +{ + /// @addtogroup core_func_trigonometric + /// @{ + + /// Converts degrees to radians and returns the result. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL radians man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType radians(genType const & degrees); + + /// Converts radians to degrees and returns the result. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL degrees man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType degrees(genType const & radians); + + /// The standard trigonometric sine function. + /// The values returned by this function will range from [-1, 1]. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL sin man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType sin(genType const & angle); + + /// The standard trigonometric cosine function. + /// The values returned by this function will range from [-1, 1]. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL cos man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType cos(genType const & angle); + + /// The standard trigonometric tangent function. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL tan man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType tan(genType const & angle); + + /// Arc sine. Returns an angle whose sine is x. + /// The range of values returned by this function is [-PI/2, PI/2]. + /// Results are undefined if |x| > 1. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL asin man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType asin(genType const & x); + + /// Arc cosine. Returns an angle whose sine is x. + /// The range of values returned by this function is [0, PI]. + /// Results are undefined if |x| > 1. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL acos man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType acos(genType const & x); + + /// Arc tangent. Returns an angle whose tangent is y/x. + /// The signs of x and y are used to determine what + /// quadrant the angle is in. The range of values returned + /// by this function is [-PI, PI]. Results are undefined + /// if x and y are both 0. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL atan man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType atan(genType const & y, genType const & x); + + /// Arc tangent. Returns an angle whose tangent is y_over_x. + /// The range of values returned by this function is [-PI/2, PI/2]. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL atan man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType atan(genType const & y_over_x); + + /// Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2 + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL sinh man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType sinh(genType const & angle); + + /// Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2 + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL cosh man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType cosh(genType const & angle); + + /// Returns the hyperbolic tangent function, sinh(angle) / cosh(angle) + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL tanh man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType tanh(genType const & angle); + + /// Arc hyperbolic sine; returns the inverse of sinh. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL asinh man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType asinh(genType const & x); + + /// Arc hyperbolic cosine; returns the non-negative inverse + /// of cosh. Results are undefined if x < 1. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL acosh man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType acosh(genType const & x); + + /// Arc hyperbolic tangent; returns the inverse of tanh. + /// Results are undefined if abs(x) >= 1. + /// + /// @tparam genType Floating-point scalar or vector types. + /// + /// @see GLSL atanh man page + /// @see GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions + template + genType atanh(genType const & x); + + /// @} +}//namespace glm + +#include "func_trigonometric.inl" + +#endif//GLM_CORE_func_trigonometric + + diff --git a/include/gal/opengl/glm/core/func_trigonometric.inl b/include/gal/opengl/glm/core/func_trigonometric.inl index 75204f967f..240cdafca0 100644 --- a/include/gal/opengl/glm/core/func_trigonometric.inl +++ b/include/gal/opengl/glm/core/func_trigonometric.inl @@ -1,244 +1,244 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/func_trigonometric.inl -/// @date 2008-08-03 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - // radians - template - GLM_FUNC_QUALIFIER genType radians - ( - genType const & degrees - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'radians' only accept floating-point input"); - - genType const pi = genType(3.1415926535897932384626433832795); - return degrees * (pi / genType(180)); - } - - VECTORIZE_VEC(radians) - - // degrees - template - GLM_FUNC_QUALIFIER genType degrees - ( - genType const & radians - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'degrees' only accept floating-point input"); - - const genType pi = genType(3.1415926535897932384626433832795); - return radians * (genType(180) / pi); - } - - VECTORIZE_VEC(degrees) - - // sin - template - GLM_FUNC_QUALIFIER genType sin - ( - genType const & angle - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'sin' only accept floating-point input"); - - return genType(::std::sin(angle)); - } - - VECTORIZE_VEC(sin) - - // cos - template - GLM_FUNC_QUALIFIER genType cos(genType const & angle) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'cos' only accept floating-point input"); - - return genType(::std::cos(angle)); - } - - VECTORIZE_VEC(cos) - - // tan - template - GLM_FUNC_QUALIFIER genType tan - ( - genType const & angle - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'tan' only accept floating-point input"); - - return genType(::std::tan(angle)); - } - - VECTORIZE_VEC(tan) - - // asin - template - GLM_FUNC_QUALIFIER genType asin - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'asin' only accept floating-point input"); - - return genType(::std::asin(x)); - } - - VECTORIZE_VEC(asin) - - // acos - template - GLM_FUNC_QUALIFIER genType acos - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'acos' only accept floating-point input"); - - return genType(::std::acos(x)); - } - - VECTORIZE_VEC(acos) - - // atan - template - GLM_FUNC_QUALIFIER genType atan - ( - genType const & y, - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'atan' only accept floating-point input"); - - return genType(::std::atan2(y, x)); - } - - VECTORIZE_VEC_VEC(atan) - - template - GLM_FUNC_QUALIFIER genType atan - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'atan' only accept floating-point input"); - - return genType(::std::atan(x)); - } - - VECTORIZE_VEC(atan) - - // sinh - template - GLM_FUNC_QUALIFIER genType sinh - ( - genType const & angle - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'sinh' only accept floating-point input"); - - return genType(std::sinh(angle)); - } - - VECTORIZE_VEC(sinh) - - // cosh - template - GLM_FUNC_QUALIFIER genType cosh - ( - genType const & angle - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'cosh' only accept floating-point input"); - - return genType(std::cosh(angle)); - } - - VECTORIZE_VEC(cosh) - - // tanh - template - GLM_FUNC_QUALIFIER genType tanh - ( - genType const & angle - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'tanh' only accept floating-point input"); - - return genType(std::tanh(angle)); - } - - VECTORIZE_VEC(tanh) - - // asinh - template - GLM_FUNC_QUALIFIER genType asinh - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'asinh' only accept floating-point input"); - - return (x < genType(0) ? genType(-1) : (x > genType(0) ? genType(1) : genType(0))) * log(abs(x) + sqrt(genType(1) + x * x)); - } - - VECTORIZE_VEC(asinh) - - // acosh - template - GLM_FUNC_QUALIFIER genType acosh - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'acosh' only accept floating-point input"); - - if(x < genType(1)) - return genType(0); - return log(x + sqrt(x * x - genType(1))); - } - - VECTORIZE_VEC(acosh) - - // atanh - template - GLM_FUNC_QUALIFIER genType atanh - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'atanh' only accept floating-point input"); - - if(abs(x) >= genType(1)) - return 0; - return genType(0.5) * log((genType(1) + x) / (genType(1) - x)); - } - - VECTORIZE_VEC(atanh) - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/func_trigonometric.inl +/// @date 2008-08-03 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + // radians + template + GLM_FUNC_QUALIFIER genType radians + ( + genType const & degrees + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'radians' only accept floating-point input"); + + genType const pi = genType(3.1415926535897932384626433832795); + return degrees * (pi / genType(180)); + } + + VECTORIZE_VEC(radians) + + // degrees + template + GLM_FUNC_QUALIFIER genType degrees + ( + genType const & radians + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'degrees' only accept floating-point input"); + + const genType pi = genType(3.1415926535897932384626433832795); + return radians * (genType(180) / pi); + } + + VECTORIZE_VEC(degrees) + + // sin + template + GLM_FUNC_QUALIFIER genType sin + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'sin' only accept floating-point input"); + + return genType(::std::sin(angle)); + } + + VECTORIZE_VEC(sin) + + // cos + template + GLM_FUNC_QUALIFIER genType cos(genType const & angle) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'cos' only accept floating-point input"); + + return genType(::std::cos(angle)); + } + + VECTORIZE_VEC(cos) + + // tan + template + GLM_FUNC_QUALIFIER genType tan + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'tan' only accept floating-point input"); + + return genType(::std::tan(angle)); + } + + VECTORIZE_VEC(tan) + + // asin + template + GLM_FUNC_QUALIFIER genType asin + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'asin' only accept floating-point input"); + + return genType(::std::asin(x)); + } + + VECTORIZE_VEC(asin) + + // acos + template + GLM_FUNC_QUALIFIER genType acos + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'acos' only accept floating-point input"); + + return genType(::std::acos(x)); + } + + VECTORIZE_VEC(acos) + + // atan + template + GLM_FUNC_QUALIFIER genType atan + ( + genType const & y, + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'atan' only accept floating-point input"); + + return genType(::std::atan2(y, x)); + } + + VECTORIZE_VEC_VEC(atan) + + template + GLM_FUNC_QUALIFIER genType atan + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'atan' only accept floating-point input"); + + return genType(::std::atan(x)); + } + + VECTORIZE_VEC(atan) + + // sinh + template + GLM_FUNC_QUALIFIER genType sinh + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'sinh' only accept floating-point input"); + + return genType(std::sinh(angle)); + } + + VECTORIZE_VEC(sinh) + + // cosh + template + GLM_FUNC_QUALIFIER genType cosh + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'cosh' only accept floating-point input"); + + return genType(std::cosh(angle)); + } + + VECTORIZE_VEC(cosh) + + // tanh + template + GLM_FUNC_QUALIFIER genType tanh + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'tanh' only accept floating-point input"); + + return genType(std::tanh(angle)); + } + + VECTORIZE_VEC(tanh) + + // asinh + template + GLM_FUNC_QUALIFIER genType asinh + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'asinh' only accept floating-point input"); + + return (x < genType(0) ? genType(-1) : (x > genType(0) ? genType(1) : genType(0))) * log(abs(x) + sqrt(genType(1) + x * x)); + } + + VECTORIZE_VEC(asinh) + + // acosh + template + GLM_FUNC_QUALIFIER genType acosh + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'acosh' only accept floating-point input"); + + if(x < genType(1)) + return genType(0); + return log(x + sqrt(x * x - genType(1))); + } + + VECTORIZE_VEC(acosh) + + // atanh + template + GLM_FUNC_QUALIFIER genType atanh + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'atanh' only accept floating-point input"); + + if(abs(x) >= genType(1)) + return 0; + return genType(0.5) * log((genType(1) + x) / (genType(1) - x)); + } + + VECTORIZE_VEC(atanh) + +}//namespace glm diff --git a/include/gal/opengl/glm/core/func_vector_relational.hpp b/include/gal/opengl/glm/core/func_vector_relational.hpp index d24e46514c..7b5a7cd080 100644 --- a/include/gal/opengl/glm/core/func_vector_relational.hpp +++ b/include/gal/opengl/glm/core/func_vector_relational.hpp @@ -1,138 +1,138 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/func_vector_relational.hpp -/// @date 2008-08-03 / 2011-06-15 -/// @author Christophe Riccio -/// -/// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions -/// -/// @defgroup core_func_vector_relational Vector Relational Functions -/// @ingroup core -/// -/// Relational and equality operators (<, <=, >, >=, ==, !=) are defined to -/// operate on scalars and produce scalar Boolean results. For vector results, -/// use the following built-in functions. -/// -/// In all cases, the sizes of all the input and return vectors for any particular -/// call must match. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_CORE_func_vector_relational -#define GLM_CORE_func_vector_relational GLM_VERSION - -#include "_detail.hpp" - -namespace glm -{ - /// @addtogroup core_func_vector_relational - /// @{ - - /// Returns the component-wise comparison result of x < y. - /// - /// @tparam vecType Floating-point or integer vector types. - /// - /// @see GLSL lessThan man page - /// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions - template - typename vecType::bool_type lessThan(vecType const & x, vecType const & y); - - /// Returns the component-wise comparison of result x <= y. - /// - /// @tparam vecType Floating-point or integer vector types. - /// - /// @see GLSL lessThanEqual man page - /// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions - template - typename vecType::bool_type lessThanEqual(vecType const & x, vecType const & y); - - /// Returns the component-wise comparison of result x > y. - /// - /// @tparam vecType Floating-point or integer vector types. - /// - /// @see GLSL greaterThan man page - /// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions - template - typename vecType::bool_type greaterThan(vecType const & x, vecType const & y); - - /// Returns the component-wise comparison of result x >= y. - /// - /// @tparam vecType Floating-point or integer vector types. - /// - /// @see GLSL greaterThanEqual man page - /// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions - template - typename vecType::bool_type greaterThanEqual(vecType const & x, vecType const & y); - - /// Returns the component-wise comparison of result x == y. - /// - /// @tparam vecType Floating-point, integer or boolean vector types. - /// - /// @see GLSL equal man page - /// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions - template - typename vecType::bool_type equal(vecType const & x, vecType const & y); - - /// Returns the component-wise comparison of result x != y. - /// - /// @tparam vecType Floating-point, integer or boolean vector types. - /// - /// @see GLSL notEqual man page - /// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions - template - typename vecType::bool_type notEqual(vecType const & x, vecType const & y); - - /// Returns true if any component of x is true. - /// - /// @tparam vecType Boolean vector types. - /// - /// @see GLSL any man page - /// @see GLSL 4.20.8 specification, section 8.7 Vector Relational Functions - template (toFloat32(this->data)); - } -*/ - - GLM_FUNC_QUALIFIER half::operator float() const - { - return toFloat32(this->data); - } - - // Unary updatable operators - GLM_FUNC_QUALIFIER half& half::operator= (half const & s) - { - data = s.data; - return *this; - } - - GLM_FUNC_QUALIFIER half& half::operator+=(half const & s) - { - data = toFloat16(toFloat32(data) + toFloat32(s.data)); - return *this; - } - - GLM_FUNC_QUALIFIER half& half::operator-=(half const & s) - { - data = toFloat16(toFloat32(data) - toFloat32(s.data)); - return *this; - } - - GLM_FUNC_QUALIFIER half& half::operator*=(half const & s) - { - data = toFloat16(toFloat32(data) * toFloat32(s.data)); - return *this; - } - - GLM_FUNC_QUALIFIER half& half::operator/=(half const & s) - { - data = toFloat16(toFloat32(data) / toFloat32(s.data)); - return *this; - } - - GLM_FUNC_QUALIFIER half& half::operator++() - { - float Casted = toFloat32(data); - this->data = toFloat16(++Casted); - return *this; - } - - GLM_FUNC_QUALIFIER half& half::operator--() - { - float Casted = toFloat32(data); - this->data = toFloat16(--Casted); - return *this; - } - - ////////////////////////////////////// - // Binary arithmetic operators - - GLM_FUNC_QUALIFIER detail::half operator+ (detail::half const & s1, detail::half const & s2) - { - return detail::half(float(s1) + float(s2)); - } - - GLM_FUNC_QUALIFIER detail::half operator- (detail::half const & s1, detail::half const & s2) - { - return detail::half(float(s1) - float(s2)); - } - - GLM_FUNC_QUALIFIER detail::half operator* (detail::half const & s1, detail::half const & s2) - { - return detail::half(float(s1) * float(s2)); - } - - GLM_FUNC_QUALIFIER detail::half operator/ (detail::half const & s1, detail::half const & s2) - { - return detail::half(float(s1) / float(s2)); - } - - // Unary constant operators - GLM_FUNC_QUALIFIER detail::half operator- (detail::half const & s) - { - return detail::half(-float(s)); - } - - GLM_FUNC_QUALIFIER detail::half operator-- (detail::half const & s, int) - { - return detail::half(float(s) - 1.0f); - } - - GLM_FUNC_QUALIFIER detail::half operator++ (detail::half const & s, int) - { - return detail::half(float(s) + 1.0f); - } - - GLM_FUNC_QUALIFIER bool operator== - ( - detail::half const & x, - detail::half const & y - ) - { - return x._data() == y._data(); - } - - GLM_FUNC_QUALIFIER bool operator!= - ( - detail::half const & x, - detail::half const & y - ) - { - return x._data() != y._data(); - } - - GLM_FUNC_QUALIFIER bool operator< - ( - detail::half const & x, - detail::half const & y - ) - { - return float(x) < float(y); - } - - GLM_FUNC_QUALIFIER bool operator<= - ( - detail::half const & x, - detail::half const & y - ) - { - return float(x) <= float(y); - } - - GLM_FUNC_QUALIFIER bool operator> - ( - detail::half const & x, - detail::half const & y - ) - { - return float(x) > float(y); - } - - GLM_FUNC_QUALIFIER bool operator>= - ( - detail::half const & x, - detail::half const & y - ) - { - return float(x) >= float(y); - } - -}//namespace detail -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// +/// This half implementation is based on OpenEXR which is Copyright (c) 2002, +/// Industrial Light & Magic, a division of Lucas Digital Ltd. LLC +/// +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_half.inl +/// @date 2008-08-17 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#include "_detail.hpp" + +namespace glm{ +namespace detail +{ + GLM_FUNC_QUALIFIER float overflow() + { + volatile float f = 1e10; + + for(int i = 0; i < 10; ++i) + f *= f; // this will overflow before + // the for­loop terminates + return f; + } + + GLM_FUNC_QUALIFIER float toFloat32(hdata value) + { + int s = (value >> 15) & 0x00000001; + int e = (value >> 10) & 0x0000001f; + int m = value & 0x000003ff; + + if(e == 0) + { + if(m == 0) + { + // + // Plus or minus zero + // + + detail::uif result; + result.i = (unsigned int)(s << 31); + return result.f; + } + else + { + // + // Denormalized number -- renormalize it + // + + while(!(m & 0x00000400)) + { + m <<= 1; + e -= 1; + } + + e += 1; + m &= ~0x00000400; + } + } + else if(e == 31) + { + if(m == 0) + { + // + // Positive or negative infinity + // + + uif result; + result.i = (unsigned int)((s << 31) | 0x7f800000); + return result.f; + } + else + { + // + // Nan -- preserve sign and significand bits + // + + uif result; + result.i = (unsigned int)((s << 31) | 0x7f800000 | (m << 13)); + return result.f; + } + } + + // + // Normalized number + // + + e = e + (127 - 15); + m = m << 13; + + // + // Assemble s, e and m. + // + + uif Result; + Result.i = (unsigned int)((s << 31) | (e << 23) | m); + return Result.f; + } + + GLM_FUNC_QUALIFIER hdata toFloat16(float const & f) + { + uif Entry; + Entry.f = f; + int i = (int)Entry.i; + + // + // Our floating point number, f, is represented by the bit + // pattern in integer i. Disassemble that bit pattern into + // the sign, s, the exponent, e, and the significand, m. + // Shift s into the position where it will go in in the + // resulting half number. + // Adjust e, accounting for the different exponent bias + // of float and half (127 versus 15). + // + + register int s = (i >> 16) & 0x00008000; + register int e = ((i >> 23) & 0x000000ff) - (127 - 15); + register int m = i & 0x007fffff; + + // + // Now reassemble s, e and m into a half: + // + + if(e <= 0) + { + if(e < -10) + { + // + // E is less than -10. The absolute value of f is + // less than half_MIN (f may be a small normalized + // float, a denormalized float or a zero). + // + // We convert f to a half zero. + // + + return hdata(s); + } + + // + // E is between -10 and 0. F is a normalized float, + // whose magnitude is less than __half_NRM_MIN. + // + // We convert f to a denormalized half. + // + + m = (m | 0x00800000) >> (1 - e); + + // + // Round to nearest, round "0.5" up. + // + // Rounding may cause the significand to overflow and make + // our number normalized. Because of the way a half's bits + // are laid out, we don't have to treat this case separately; + // the code below will handle it correctly. + // + + if(m & 0x00001000) + m += 0x00002000; + + // + // Assemble the half from s, e (zero) and m. + // + + return hdata(s | (m >> 13)); + } + else if(e == 0xff - (127 - 15)) + { + if(m == 0) + { + // + // F is an infinity; convert f to a half + // infinity with the same sign as f. + // + + return hdata(s | 0x7c00); + } + else + { + // + // F is a NAN; we produce a half NAN that preserves + // the sign bit and the 10 leftmost bits of the + // significand of f, with one exception: If the 10 + // leftmost bits are all zero, the NAN would turn + // into an infinity, so we have to set at least one + // bit in the significand. + // + + m >>= 13; + + return hdata(s | 0x7c00 | m | (m == 0)); + } + } + else + { + // + // E is greater than zero. F is a normalized float. + // We try to convert f to a normalized half. + // + + // + // Round to nearest, round "0.5" up + // + + if(m & 0x00001000) + { + m += 0x00002000; + + if(m & 0x00800000) + { + m = 0; // overflow in significand, + e += 1; // adjust exponent + } + } + + // + // Handle exponent overflow + // + + if (e > 30) + { + overflow(); // Cause a hardware floating point overflow; + + return hdata(s | 0x7c00); + // if this returns, the half becomes an + } // infinity with the same sign as f. + + // + // Assemble the half from s, e and m. + // + + return hdata(s | (e << 10) | (m >> 13)); + } + } + + GLM_FUNC_QUALIFIER half::half() : + data(0) + {} + + GLM_FUNC_QUALIFIER half::half(half const & s) : + data(s.data) + {} + + template + GLM_FUNC_QUALIFIER half::half(U const & s) : + data(toFloat16(float(s))) + {} +/* + template + GLM_FUNC_QUALIFIER half::operator U() const + { + return static_cast(toFloat32(this->data)); + } +*/ + + GLM_FUNC_QUALIFIER half::operator float() const + { + return toFloat32(this->data); + } + + // Unary updatable operators + GLM_FUNC_QUALIFIER half& half::operator= (half const & s) + { + data = s.data; + return *this; + } + + GLM_FUNC_QUALIFIER half& half::operator+=(half const & s) + { + data = toFloat16(toFloat32(data) + toFloat32(s.data)); + return *this; + } + + GLM_FUNC_QUALIFIER half& half::operator-=(half const & s) + { + data = toFloat16(toFloat32(data) - toFloat32(s.data)); + return *this; + } + + GLM_FUNC_QUALIFIER half& half::operator*=(half const & s) + { + data = toFloat16(toFloat32(data) * toFloat32(s.data)); + return *this; + } + + GLM_FUNC_QUALIFIER half& half::operator/=(half const & s) + { + data = toFloat16(toFloat32(data) / toFloat32(s.data)); + return *this; + } + + GLM_FUNC_QUALIFIER half& half::operator++() + { + float Casted = toFloat32(data); + this->data = toFloat16(++Casted); + return *this; + } + + GLM_FUNC_QUALIFIER half& half::operator--() + { + float Casted = toFloat32(data); + this->data = toFloat16(--Casted); + return *this; + } + + ////////////////////////////////////// + // Binary arithmetic operators + + GLM_FUNC_QUALIFIER detail::half operator+ (detail::half const & s1, detail::half const & s2) + { + return detail::half(float(s1) + float(s2)); + } + + GLM_FUNC_QUALIFIER detail::half operator- (detail::half const & s1, detail::half const & s2) + { + return detail::half(float(s1) - float(s2)); + } + + GLM_FUNC_QUALIFIER detail::half operator* (detail::half const & s1, detail::half const & s2) + { + return detail::half(float(s1) * float(s2)); + } + + GLM_FUNC_QUALIFIER detail::half operator/ (detail::half const & s1, detail::half const & s2) + { + return detail::half(float(s1) / float(s2)); + } + + // Unary constant operators + GLM_FUNC_QUALIFIER detail::half operator- (detail::half const & s) + { + return detail::half(-float(s)); + } + + GLM_FUNC_QUALIFIER detail::half operator-- (detail::half const & s, int) + { + return detail::half(float(s) - 1.0f); + } + + GLM_FUNC_QUALIFIER detail::half operator++ (detail::half const & s, int) + { + return detail::half(float(s) + 1.0f); + } + + GLM_FUNC_QUALIFIER bool operator== + ( + detail::half const & x, + detail::half const & y + ) + { + return x._data() == y._data(); + } + + GLM_FUNC_QUALIFIER bool operator!= + ( + detail::half const & x, + detail::half const & y + ) + { + return x._data() != y._data(); + } + + GLM_FUNC_QUALIFIER bool operator< + ( + detail::half const & x, + detail::half const & y + ) + { + return float(x) < float(y); + } + + GLM_FUNC_QUALIFIER bool operator<= + ( + detail::half const & x, + detail::half const & y + ) + { + return float(x) <= float(y); + } + + GLM_FUNC_QUALIFIER bool operator> + ( + detail::half const & x, + detail::half const & y + ) + { + return float(x) > float(y); + } + + GLM_FUNC_QUALIFIER bool operator>= + ( + detail::half const & x, + detail::half const & y + ) + { + return float(x) >= float(y); + } + +}//namespace detail +}//namespace glm diff --git a/include/gal/opengl/glm/core/type_int.hpp b/include/gal/opengl/glm/core/type_int.hpp index 3ebb16c285..fcf844a2b3 100644 --- a/include/gal/opengl/glm/core/type_int.hpp +++ b/include/gal/opengl/glm/core/type_int.hpp @@ -1,136 +1,136 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_int.hpp -/// @date 2008-08-22 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_type_int -#define glm_core_type_int - -#include "setup.hpp" -#include "_detail.hpp" - -namespace glm{ -namespace detail -{ - typedef signed short lowp_int_t; - typedef signed int mediump_int_t; - typedef sint64 highp_int_t; - - typedef unsigned short lowp_uint_t; - typedef unsigned int mediump_uint_t; - typedef uint64 highp_uint_t; - - GLM_DETAIL_IS_INT(signed char); - GLM_DETAIL_IS_INT(signed short); - GLM_DETAIL_IS_INT(signed int); - GLM_DETAIL_IS_INT(signed long); - GLM_DETAIL_IS_INT(highp_int_t); - - GLM_DETAIL_IS_UINT(unsigned char); - GLM_DETAIL_IS_UINT(unsigned short); - GLM_DETAIL_IS_UINT(unsigned int); - GLM_DETAIL_IS_UINT(unsigned long); - GLM_DETAIL_IS_UINT(highp_uint_t); -}//namespace detail - - /// @addtogroup core_precision - /// @{ - - /// Low precision signed integer. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.3 Integers - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::lowp_int_t lowp_int; - - /// Medium precision signed integer. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.3 Integers - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::mediump_int_t mediump_int; - - /// High precision signed integer. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.3 Integers - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::highp_int_t highp_int; - - /// Low precision unsigned integer. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.3 Integers - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::lowp_uint_t lowp_uint; - - /// Medium precision unsigned integer. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.3 Integers - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::mediump_uint_t mediump_uint; - - /// High precision unsigned integer. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.3 Integers - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::highp_uint_t highp_uint; - -#if(!defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT)) - typedef mediump_int int_t; -#elif(defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT)) - typedef highp_int int_t; -#elif(!defined(GLM_PRECISION_HIGHP_INT) && defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT)) - typedef mediump_int int_t; -#elif(!defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && defined(GLM_PRECISION_LOWP_INT)) - typedef lowp_int int_t; -#else -# error "GLM error: multiple default precision requested for signed interger types" -#endif - -#if(!defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT)) - typedef mediump_uint uint_t; -#elif(defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT)) - typedef highp_uint uint_t; -#elif(!defined(GLM_PRECISION_HIGHP_UINT) && defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT)) - typedef mediump_uint uint_t; -#elif(!defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && defined(GLM_PRECISION_LOWP_UINT)) - typedef lowp_uint uint_t; -#else -# error "GLM error: multiple default precision requested for unsigned interger types" -#endif - - /// Unsigned integer type. - /// - /// @see GLSL 4.20.8 specification, section 4.1.3 Integers - typedef uint_t uint; - - /// @} -}//namespace glm - -#endif//glm_core_type_int +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_int.hpp +/// @date 2008-08-22 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_int +#define glm_core_type_int + +#include "setup.hpp" +#include "_detail.hpp" + +namespace glm{ +namespace detail +{ + typedef signed short lowp_int_t; + typedef signed int mediump_int_t; + typedef sint64 highp_int_t; + + typedef unsigned short lowp_uint_t; + typedef unsigned int mediump_uint_t; + typedef uint64 highp_uint_t; + + GLM_DETAIL_IS_INT(signed char); + GLM_DETAIL_IS_INT(signed short); + GLM_DETAIL_IS_INT(signed int); + GLM_DETAIL_IS_INT(signed long); + GLM_DETAIL_IS_INT(highp_int_t); + + GLM_DETAIL_IS_UINT(unsigned char); + GLM_DETAIL_IS_UINT(unsigned short); + GLM_DETAIL_IS_UINT(unsigned int); + GLM_DETAIL_IS_UINT(unsigned long); + GLM_DETAIL_IS_UINT(highp_uint_t); +}//namespace detail + + /// @addtogroup core_precision + /// @{ + + /// Low precision signed integer. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.3 Integers + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::lowp_int_t lowp_int; + + /// Medium precision signed integer. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.3 Integers + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::mediump_int_t mediump_int; + + /// High precision signed integer. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.3 Integers + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::highp_int_t highp_int; + + /// Low precision unsigned integer. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.3 Integers + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::lowp_uint_t lowp_uint; + + /// Medium precision unsigned integer. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.3 Integers + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::mediump_uint_t mediump_uint; + + /// High precision unsigned integer. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.3 Integers + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::highp_uint_t highp_uint; + +#if(!defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT)) + typedef mediump_int int_t; +#elif(defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT)) + typedef highp_int int_t; +#elif(!defined(GLM_PRECISION_HIGHP_INT) && defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT)) + typedef mediump_int int_t; +#elif(!defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && defined(GLM_PRECISION_LOWP_INT)) + typedef lowp_int int_t; +#else +# error "GLM error: multiple default precision requested for signed interger types" +#endif + +#if(!defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT)) + typedef mediump_uint uint_t; +#elif(defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT)) + typedef highp_uint uint_t; +#elif(!defined(GLM_PRECISION_HIGHP_UINT) && defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT)) + typedef mediump_uint uint_t; +#elif(!defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && defined(GLM_PRECISION_LOWP_UINT)) + typedef lowp_uint uint_t; +#else +# error "GLM error: multiple default precision requested for unsigned interger types" +#endif + + /// Unsigned integer type. + /// + /// @see GLSL 4.20.8 specification, section 4.1.3 Integers + typedef uint_t uint; + + /// @} +}//namespace glm + +#endif//glm_core_type_int diff --git a/include/gal/opengl/glm/core/type_mat.hpp b/include/gal/opengl/glm/core/type_mat.hpp index fcf94a04b6..cbf0c205a1 100644 --- a/include/gal/opengl/glm/core/type_mat.hpp +++ b/include/gal/opengl/glm/core/type_mat.hpp @@ -1,75 +1,75 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_mat.hpp -/// @date 2010-01-26 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_type_mat -#define glm_core_type_mat - -#include "type_gentype.hpp" - -namespace glm{ -namespace detail -{ - //template - //< - // typename T, - // template class C, - // template class R - //> - //struct matType - //{ - // enum ctor{null}; - // typedef T value_type; - // typedef std::size_t size_type; - // typedef C col_type; - // typedef R row_type; - // static size_type const col_size; - // static size_type const row_size; - //}; - - //template - //< - // typename T, - // template class C, - // template class R - //> - //typename matType::size_type const - //matType::col_size = matType::col_type::value_size; - - //template - //< - // typename T, - // template class C, - // template class R - //> - //typename matType::size_type const - //matType::row_size = matType::row_type::value_size; - -}//namespace detail -}//namespace glm - -#endif//glm_core_type_mat +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat.hpp +/// @date 2010-01-26 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_mat +#define glm_core_type_mat + +#include "type_gentype.hpp" + +namespace glm{ +namespace detail +{ + //template + //< + // typename T, + // template class C, + // template class R + //> + //struct matType + //{ + // enum ctor{null}; + // typedef T value_type; + // typedef std::size_t size_type; + // typedef C col_type; + // typedef R row_type; + // static size_type const col_size; + // static size_type const row_size; + //}; + + //template + //< + // typename T, + // template class C, + // template class R + //> + //typename matType::size_type const + //matType::col_size = matType::col_type::value_size; + + //template + //< + // typename T, + // template class C, + // template class R + //> + //typename matType::size_type const + //matType::row_size = matType::row_type::value_size; + +}//namespace detail +}//namespace glm + +#endif//glm_core_type_mat diff --git a/include/gal/opengl/glm/core/type_mat.inl b/include/gal/opengl/glm/core/type_mat.inl index b6da6aea22..06ce8f665c 100644 --- a/include/gal/opengl/glm/core/type_mat.inl +++ b/include/gal/opengl/glm/core/type_mat.inl @@ -1,27 +1,27 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_mat.inl -/// @date 2011-06-15 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat.inl +/// @date 2011-06-15 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// diff --git a/include/gal/opengl/glm/core/type_mat2x2.hpp b/include/gal/opengl/glm/core/type_mat2x2.hpp index e3bef1b26d..9695f977db 100644 --- a/include/gal/opengl/glm/core/type_mat2x2.hpp +++ b/include/gal/opengl/glm/core/type_mat2x2.hpp @@ -1,314 +1,314 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_mat2x2.hpp -/// @date 2005-01-27 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_type_mat2x2 -#define glm_core_type_mat2x2 - -#include "type_mat.hpp" - -namespace glm{ -namespace detail -{ - template struct tvec1; - template struct tvec2; - template struct tvec3; - template struct tvec4; - template struct tmat2x2; - template struct tmat2x3; - template struct tmat2x4; - template struct tmat3x2; - template struct tmat3x3; - template struct tmat3x4; - template struct tmat4x2; - template struct tmat4x3; - template struct tmat4x4; - - template - struct tmat2x2 - { - // Implementation detail - enum ctor{null}; - typedef T value_type; - typedef std::size_t size_type; - typedef tvec2 col_type; - typedef tvec2 row_type; - typedef tmat2x2 type; - typedef tmat2x2 transpose_type; - - static GLM_FUNC_DECL size_type col_size(); - static GLM_FUNC_DECL size_type row_size(); - - GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; - - public: - // Implementation detail - GLM_FUNC_DECL tmat2x2 _inverse() const; - - private: - ////////////////////////////////////// - // Implementation detail - col_type value[2]; - - public: - ////////////////////////////////////// - // Constructors - GLM_FUNC_DECL tmat2x2(); - GLM_FUNC_DECL tmat2x2( - tmat2x2 const & m); - - GLM_FUNC_DECL explicit tmat2x2( - ctor Null); - GLM_FUNC_DECL explicit tmat2x2( - value_type const & x); - GLM_FUNC_DECL explicit tmat2x2( - value_type const & x1, value_type const & y1, - value_type const & x2, value_type const & y2); - GLM_FUNC_DECL explicit tmat2x2( - col_type const & v1, - col_type const & v2); - - ////////////////////////////////////// - // Conversions - template - GLM_FUNC_DECL explicit tmat2x2( - U const & x); - - template - GLM_FUNC_DECL explicit tmat2x2( - U const & x1, V const & y1, - M const & x2, N const & y2); - - template - GLM_FUNC_DECL explicit tmat2x2( - tvec2 const & v1, - tvec2 const & v2); - - ////////////////////////////////////// - // Matrix conversions - template - GLM_FUNC_DECL explicit tmat2x2(tmat2x2 const & m); - - GLM_FUNC_DECL explicit tmat2x2(tmat3x3 const & x); - GLM_FUNC_DECL explicit tmat2x2(tmat4x4 const & x); - GLM_FUNC_DECL explicit tmat2x2(tmat2x3 const & x); - GLM_FUNC_DECL explicit tmat2x2(tmat3x2 const & x); - GLM_FUNC_DECL explicit tmat2x2(tmat2x4 const & x); - GLM_FUNC_DECL explicit tmat2x2(tmat4x2 const & x); - GLM_FUNC_DECL explicit tmat2x2(tmat3x4 const & x); - GLM_FUNC_DECL explicit tmat2x2(tmat4x3 const & x); - - ////////////////////////////////////// - // Accesses - - GLM_FUNC_DECL col_type & operator[](size_type i); - GLM_FUNC_DECL col_type const & operator[](size_type i) const; - - // Unary updatable operators - GLM_FUNC_DECL tmat2x2 & operator=(tmat2x2 const & m); - template - GLM_FUNC_DECL tmat2x2 & operator=(tmat2x2 const & m); - template - GLM_FUNC_DECL tmat2x2 & operator+=(U const & s); - template - GLM_FUNC_DECL tmat2x2 & operator+=(tmat2x2 const & m); - template - GLM_FUNC_DECL tmat2x2 & operator-=(U const & s); - template - GLM_FUNC_DECL tmat2x2 & operator-=(tmat2x2 const & m); - template - GLM_FUNC_DECL tmat2x2 & operator*=(U const & s); - template - GLM_FUNC_DECL tmat2x2 & operator*=(tmat2x2 const & m); - template - GLM_FUNC_DECL tmat2x2 & operator/=(U const & s); - template - GLM_FUNC_DECL tmat2x2 & operator/=(tmat2x2 const & m); - GLM_FUNC_DECL tmat2x2 & operator++(); - GLM_FUNC_DECL tmat2x2 & operator--(); - }; - - // Binary operators - template - tmat2x2 operator+ ( - tmat2x2 const & m, - typename tmat2x2::value_type const & s); - - template - tmat2x2 operator+ ( - typename tmat2x2::value_type const & s, - tmat2x2 const & m); - - template - tmat2x2 operator+ ( - tmat2x2 const & m1, - tmat2x2 const & m2); - - template - tmat2x2 operator- ( - tmat2x2 const & m, - typename tmat2x2::value_type const & s); - - template - tmat2x2 operator- ( - typename tmat2x2::value_type const & s, - tmat2x2 const & m); - - template - tmat2x2 operator- ( - tmat2x2 const & m1, - tmat2x2 const & m2); - - template - tmat2x2 operator* ( - tmat2x2 const & m, - typename tmat2x2::value_type const & s); - - template - tmat2x2 operator* ( - typename tmat2x2::value_type const & s, - tmat2x2 const & m); - - template - typename tmat2x2::col_type operator* ( - tmat2x2 const & m, - typename tmat2x2::row_type const & v); - - template - typename tmat2x2::row_type operator* ( - typename tmat2x2::col_type const & v, - tmat2x2 const & m); - - template - tmat2x2 operator* ( - tmat2x2 const & m1, - tmat2x2 const & m2); - - template - tmat3x2 operator* ( - tmat2x2 const & m1, - tmat3x2 const & m2); - - template - tmat4x2 operator* ( - tmat2x2 const & m1, - tmat4x2 const & m2); - - template - tmat2x2 operator/ ( - tmat2x2 const & m, - typename tmat2x2::value_type const & s); - - template - tmat2x2 operator/ ( - typename tmat2x2::value_type const & s, - tmat2x2 const & m); - - template - typename tmat2x2::col_type operator/ ( - tmat2x2 const & m, - typename tmat2x2::row_type const & v); - - template - typename tmat2x2::row_type operator/ ( - typename tmat2x2::col_type const & v, - tmat2x2 const & m); - - template - tmat2x2 operator/ ( - tmat2x2 const & m1, - tmat2x2 const & m2); - - // Unary constant operators - template - tmat2x2 const operator- ( - tmat2x2 const & m); - - template - tmat2x2 const operator-- ( - tmat2x2 const & m, - int); - - template - tmat2x2 const operator++ ( - tmat2x2 const & m, - int); -} //namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 2 columns of 2 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x2 lowp_mat2; - - /// 2 columns of 2 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x2 mediump_mat2; - - /// 2 columns of 2 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x2 highp_mat2; - - /// 2 columns of 2 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x2 lowp_mat2x2; - - /// 2 columns of 2 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x2 mediump_mat2x2; - - /// 2 columns of 2 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x2 highp_mat2x2; - - /// @} -}//namespace glm - -#ifndef GLM_EXTERNAL_TEMPLATE -#include "type_mat2x2.inl" -#endif - -#endif //glm_core_type_mat2x2 +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat2x2.hpp +/// @date 2005-01-27 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_mat2x2 +#define glm_core_type_mat2x2 + +#include "type_mat.hpp" + +namespace glm{ +namespace detail +{ + template struct tvec1; + template struct tvec2; + template struct tvec3; + template struct tvec4; + template struct tmat2x2; + template struct tmat2x3; + template struct tmat2x4; + template struct tmat3x2; + template struct tmat3x3; + template struct tmat3x4; + template struct tmat4x2; + template struct tmat4x3; + template struct tmat4x4; + + template + struct tmat2x2 + { + // Implementation detail + enum ctor{null}; + typedef T value_type; + typedef std::size_t size_type; + typedef tvec2 col_type; + typedef tvec2 row_type; + typedef tmat2x2 type; + typedef tmat2x2 transpose_type; + + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + public: + // Implementation detail + GLM_FUNC_DECL tmat2x2 _inverse() const; + + private: + ////////////////////////////////////// + // Implementation detail + col_type value[2]; + + public: + ////////////////////////////////////// + // Constructors + GLM_FUNC_DECL tmat2x2(); + GLM_FUNC_DECL tmat2x2( + tmat2x2 const & m); + + GLM_FUNC_DECL explicit tmat2x2( + ctor Null); + GLM_FUNC_DECL explicit tmat2x2( + value_type const & x); + GLM_FUNC_DECL explicit tmat2x2( + value_type const & x1, value_type const & y1, + value_type const & x2, value_type const & y2); + GLM_FUNC_DECL explicit tmat2x2( + col_type const & v1, + col_type const & v2); + + ////////////////////////////////////// + // Conversions + template + GLM_FUNC_DECL explicit tmat2x2( + U const & x); + + template + GLM_FUNC_DECL explicit tmat2x2( + U const & x1, V const & y1, + M const & x2, N const & y2); + + template + GLM_FUNC_DECL explicit tmat2x2( + tvec2 const & v1, + tvec2 const & v2); + + ////////////////////////////////////// + // Matrix conversions + template + GLM_FUNC_DECL explicit tmat2x2(tmat2x2 const & m); + + GLM_FUNC_DECL explicit tmat2x2(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat2x2(tmat4x3 const & x); + + ////////////////////////////////////// + // Accesses + + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; + + // Unary updatable operators + GLM_FUNC_DECL tmat2x2 & operator=(tmat2x2 const & m); + template + GLM_FUNC_DECL tmat2x2 & operator=(tmat2x2 const & m); + template + GLM_FUNC_DECL tmat2x2 & operator+=(U const & s); + template + GLM_FUNC_DECL tmat2x2 & operator+=(tmat2x2 const & m); + template + GLM_FUNC_DECL tmat2x2 & operator-=(U const & s); + template + GLM_FUNC_DECL tmat2x2 & operator-=(tmat2x2 const & m); + template + GLM_FUNC_DECL tmat2x2 & operator*=(U const & s); + template + GLM_FUNC_DECL tmat2x2 & operator*=(tmat2x2 const & m); + template + GLM_FUNC_DECL tmat2x2 & operator/=(U const & s); + template + GLM_FUNC_DECL tmat2x2 & operator/=(tmat2x2 const & m); + GLM_FUNC_DECL tmat2x2 & operator++(); + GLM_FUNC_DECL tmat2x2 & operator--(); + }; + + // Binary operators + template + tmat2x2 operator+ ( + tmat2x2 const & m, + typename tmat2x2::value_type const & s); + + template + tmat2x2 operator+ ( + typename tmat2x2::value_type const & s, + tmat2x2 const & m); + + template + tmat2x2 operator+ ( + tmat2x2 const & m1, + tmat2x2 const & m2); + + template + tmat2x2 operator- ( + tmat2x2 const & m, + typename tmat2x2::value_type const & s); + + template + tmat2x2 operator- ( + typename tmat2x2::value_type const & s, + tmat2x2 const & m); + + template + tmat2x2 operator- ( + tmat2x2 const & m1, + tmat2x2 const & m2); + + template + tmat2x2 operator* ( + tmat2x2 const & m, + typename tmat2x2::value_type const & s); + + template + tmat2x2 operator* ( + typename tmat2x2::value_type const & s, + tmat2x2 const & m); + + template + typename tmat2x2::col_type operator* ( + tmat2x2 const & m, + typename tmat2x2::row_type const & v); + + template + typename tmat2x2::row_type operator* ( + typename tmat2x2::col_type const & v, + tmat2x2 const & m); + + template + tmat2x2 operator* ( + tmat2x2 const & m1, + tmat2x2 const & m2); + + template + tmat3x2 operator* ( + tmat2x2 const & m1, + tmat3x2 const & m2); + + template + tmat4x2 operator* ( + tmat2x2 const & m1, + tmat4x2 const & m2); + + template + tmat2x2 operator/ ( + tmat2x2 const & m, + typename tmat2x2::value_type const & s); + + template + tmat2x2 operator/ ( + typename tmat2x2::value_type const & s, + tmat2x2 const & m); + + template + typename tmat2x2::col_type operator/ ( + tmat2x2 const & m, + typename tmat2x2::row_type const & v); + + template + typename tmat2x2::row_type operator/ ( + typename tmat2x2::col_type const & v, + tmat2x2 const & m); + + template + tmat2x2 operator/ ( + tmat2x2 const & m1, + tmat2x2 const & m2); + + // Unary constant operators + template + tmat2x2 const operator- ( + tmat2x2 const & m); + + template + tmat2x2 const operator-- ( + tmat2x2 const & m, + int); + + template + tmat2x2 const operator++ ( + tmat2x2 const & m, + int); +} //namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 2 columns of 2 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x2 lowp_mat2; + + /// 2 columns of 2 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x2 mediump_mat2; + + /// 2 columns of 2 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x2 highp_mat2; + + /// 2 columns of 2 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x2 lowp_mat2x2; + + /// 2 columns of 2 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x2 mediump_mat2x2; + + /// 2 columns of 2 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x2 highp_mat2x2; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_mat2x2.inl" +#endif + +#endif //glm_core_type_mat2x2 diff --git a/include/gal/opengl/glm/core/type_mat2x2.inl b/include/gal/opengl/glm/core/type_mat2x2.inl index 987577d7a5..cbcf7c0e1e 100644 --- a/include/gal/opengl/glm/core/type_mat2x2.inl +++ b/include/gal/opengl/glm/core/type_mat2x2.inl @@ -1,700 +1,700 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_mat2x2.inl -/// @date 2005-01-16 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm{ -namespace detail -{ - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x2::size_type tmat2x2::length() const - { - return 2; - } - - template - GLM_FUNC_QUALIFIER typename tmat2x2::size_type tmat2x2::col_size() - { - return 2; - } - - template - GLM_FUNC_QUALIFIER typename tmat2x2::size_type tmat2x2::row_size() - { - return 2; - } - - ////////////////////////////////////// - // Accesses - - template - GLM_FUNC_QUALIFIER typename tmat2x2::col_type & - tmat2x2::operator[] - ( - size_type i - ) - { - assert(i < this->length()); - return this->value[i]; - } - - template - GLM_FUNC_QUALIFIER typename tmat2x2::col_type const & - tmat2x2::operator[] - ( - size_type i - ) const - { - assert(i < this->length()); - return this->value[i]; - } - - ////////////////////////////////////////////////////////////// - // Constructors - - template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2() - { - this->value[0] = col_type(1, 0); - this->value[1] = col_type(0, 1); - } - - template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - tmat2x2 const & m - ) - { - this->value[0] = m.value[0]; - this->value[1] = m.value[1]; - } - - template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - ctor - ) - {} - - template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - value_type const & s - ) - { - value_type const Zero(0); - this->value[0] = col_type(s, Zero); - this->value[1] = col_type(Zero, s); - } - - template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - value_type const & x0, value_type const & y0, - value_type const & x1, value_type const & y1 - ) - { - this->value[0] = col_type(x0, y0); - this->value[1] = col_type(x1, y1); - } - - template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - col_type const & v0, - col_type const & v1 - ) - { - this->value[0] = v0; - this->value[1] = v1; - } - - ////////////////////////////////////// - // Convertion constructors - template - template - GLM_FUNC_DECL tmat2x2::tmat2x2 - ( - U const & s - ) - { - value_type const Zero(0); - this->value[0] = tvec2(value_type(s), Zero); - this->value[1] = tvec2(Zero, value_type(s)); - } - - template - template - GLM_FUNC_DECL tmat2x2::tmat2x2 - ( - X1 const & x1, Y1 const & y1, - X2 const & x2, Y2 const & y2 - ) - { - this->value[0] = col_type(value_type(x1), value_type(y1)); - this->value[1] = col_type(value_type(x2), value_type(y2)); - } - - template - template - GLM_FUNC_DECL tmat2x2::tmat2x2 - ( - tvec2 const & v1, - tvec2 const & v2 - ) - { - this->value[0] = col_type(v1); - this->value[1] = col_type(v2); - } - - ////////////////////////////////////////////////////////////// - // mat2x2 matrix conversions - - template - template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - tmat2x2 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - tmat3x3 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - tmat4x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - tmat2x3 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - tmat3x2 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - } - - template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - tmat2x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - tmat4x2 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - } - - template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - tmat3x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 - ( - tmat4x3 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x2 tmat2x2::_inverse() const - { - typename tmat2x2::value_type Determinant = this->value[0][0] * this->value[1][1] - this->value[1][0] * this->value[0][1]; - - tmat2x2 Inverse( - + this->value[1][1] / Determinant, - - this->value[0][1] / Determinant, - - this->value[1][0] / Determinant, - + this->value[0][0] / Determinant); - return Inverse; - } - - ////////////////////////////////////////////////////////////// - // mat2x2 operators - - // This function shouldn't required but it seems that VC7.1 have an optimisation bug if this operator wasn't declared - template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator= - ( - tmat2x2 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator= - ( - tmat2x2 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator+= - ( - U const & s - ) - { - this->value[0] += s; - this->value[1] += s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator+= - ( - tmat2x2 const & m - ) - { - this->value[0] += m[0]; - this->value[1] += m[1]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator-= - ( - U const & s - ) - { - this->value[0] -= s; - this->value[1] -= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator-= - ( - tmat2x2 const & m - ) - { - this->value[0] -= m[0]; - this->value[1] -= m[1]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator*= - ( - U const & s - ) - { - this->value[0] *= s; - this->value[1] *= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator*= - ( - tmat2x2 const & m - ) - { - return (*this = *this * m); - } - - template - template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator/= - ( - U const & s - ) - { - this->value[0] /= s; - this->value[1] /= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator/= - ( - tmat2x2 const & m - ) - { - return (*this = *this / m); - } - - template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator++ () - { - ++this->value[0]; - ++this->value[1]; - return *this; - } - - template - GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator-- () - { - --this->value[0]; - --this->value[1]; - return *this; - } - - ////////////////////////////////////////////////////////////// - // Binary operators - - template - GLM_FUNC_QUALIFIER tmat2x2 operator+ - ( - tmat2x2 const & m, - typename tmat2x2::value_type const & s - ) - { - return tmat2x2( - m[0] + s, - m[1] + s); - } - - template - GLM_FUNC_QUALIFIER tmat2x2 operator+ - ( - typename tmat2x2::value_type const & s, - tmat2x2 const & m - ) - { - return tmat2x2( - m[0] + s, - m[1] + s); - } - - template - GLM_FUNC_QUALIFIER tmat2x2 operator+ - ( - tmat2x2 const & m1, - tmat2x2 const & m2 - ) - { - return tmat2x2( - m1[0] + m2[0], - m1[1] + m2[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x2 operator- - ( - tmat2x2 const & m, - typename tmat2x2::value_type const & s - ) - { - return tmat2x2( - m[0] - s, - m[1] - s); - } - - template - GLM_FUNC_QUALIFIER tmat2x2 operator- - ( - typename tmat2x2::value_type const & s, - tmat2x2 const & m - ) - { - return tmat2x2( - s - m[0], - s - m[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x2 operator- - ( - tmat2x2 const & m1, - tmat2x2 const & m2 - ) - { - return tmat2x2( - m1[0] - m2[0], - m1[1] - m2[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x2 operator* - ( - tmat2x2 const & m, - typename tmat2x2::value_type const & s - ) - { - return tmat2x2( - m[0] * s, - m[1] * s); - } - - template - GLM_FUNC_QUALIFIER tmat2x2 operator* - ( - typename tmat2x2::value_type const & s, - tmat2x2 const & m - ) - { - return tmat2x2( - m[0] * s, - m[1] * s); - } - - template - GLM_FUNC_QUALIFIER typename tmat2x2::col_type operator* - ( - tmat2x2 const & m, - typename tmat2x2::row_type const & v - ) - { - return detail::tvec2( - m[0][0] * v.x + m[1][0] * v.y, - m[0][1] * v.x + m[1][1] * v.y); - } - - template - GLM_FUNC_QUALIFIER typename tmat2x2::row_type operator* - ( - typename tmat2x2::col_type const & v, - tmat2x2 const & m - ) - { - return detail::tvec2( - v.x * m[0][0] + v.y * m[0][1], - v.x * m[1][0] + v.y * m[1][1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x2 operator* - ( - tmat2x2 const & m1, - tmat2x2 const & m2 - ) - { - return tmat2x2( - m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], - m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1], - m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1], - m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1]); - } - - template - GLM_FUNC_QUALIFIER tmat3x2 operator* - ( - tmat2x2 const & m1, - tmat3x2 const & m2 - ) - { - return tmat3x2( - m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], - m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1], - m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1], - m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1], - m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1], - m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1]); - } - - template - GLM_FUNC_QUALIFIER tmat4x2 operator* - ( - tmat2x2 const & m1, - tmat4x2 const & m2 - ) - { - return tmat4x2( - m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], - m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1], - m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1], - m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1], - m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1], - m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1], - m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1], - m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x2 operator/ - ( - tmat2x2 const & m, - typename tmat2x2::value_type const & s - ) - { - return tmat2x2( - m[0] / s, - m[1] / s); - } - - template - GLM_FUNC_QUALIFIER tmat2x2 operator/ - ( - typename tmat2x2::value_type const & s, - tmat2x2 const & m - ) - { - return tmat2x2( - s / m[0], - s / m[1]); - } - - template - GLM_FUNC_QUALIFIER typename tmat2x2::col_type operator/ - ( - tmat2x2 const & m, - typename tmat2x2::row_type & v - ) - { - return m._inverse() * v; - } - - template - GLM_FUNC_QUALIFIER typename tmat2x2::row_type operator/ - ( - typename tmat2x2::col_type const & v, - tmat2x2 const & m - ) - { - return v * m._inverse(); - } - - template - GLM_FUNC_QUALIFIER tmat2x2 operator/ - ( - tmat2x2 const & m1, - tmat2x2 const & m2 - ) - { - return m1 * m2._inverse(); - } - - // Unary constant operators - template - GLM_FUNC_QUALIFIER tmat2x2 const operator- - ( - tmat2x2 const & m - ) - { - return tmat2x2( - -m[0], - -m[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x2 const operator++ - ( - tmat2x2 const & m, - int - ) - { - return tmat2x2( - m[0] + T(1), - m[1] + T(1)); - } - - template - GLM_FUNC_QUALIFIER tmat2x2 const operator-- - ( - tmat2x2 const & m, - int - ) - { - return tmat2x2( - m[0] - T(1), - m[1] - T(1)); - } - - ////////////////////////////////////// - // Boolean operators - - template - GLM_FUNC_QUALIFIER bool operator== - ( - tmat2x2 const & m1, - tmat2x2 const & m2 - ) - { - return (m1[0] == m2[0]) && (m1[1] == m2[1]); - } - - template - GLM_FUNC_QUALIFIER bool operator!= - ( - tmat2x2 const & m1, - tmat2x2 const & m2 - ) - { - return (m1[0] != m2[0]) || (m1[1] != m2[1]); - } - -} //namespace detail -} //namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat2x2.inl +/// @date 2005-01-16 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x2::size_type tmat2x2::length() const + { + return 2; + } + + template + GLM_FUNC_QUALIFIER typename tmat2x2::size_type tmat2x2::col_size() + { + return 2; + } + + template + GLM_FUNC_QUALIFIER typename tmat2x2::size_type tmat2x2::row_size() + { + return 2; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tmat2x2::col_type & + tmat2x2::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return this->value[i]; + } + + template + GLM_FUNC_QUALIFIER typename tmat2x2::col_type const & + tmat2x2::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return this->value[i]; + } + + ////////////////////////////////////////////////////////////// + // Constructors + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2() + { + this->value[0] = col_type(1, 0); + this->value[1] = col_type(0, 1); + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + tmat2x2 const & m + ) + { + this->value[0] = m.value[0]; + this->value[1] = m.value[1]; + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + value_type const & s + ) + { + value_type const Zero(0); + this->value[0] = col_type(s, Zero); + this->value[1] = col_type(Zero, s); + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + value_type const & x0, value_type const & y0, + value_type const & x1, value_type const & y1 + ) + { + this->value[0] = col_type(x0, y0); + this->value[1] = col_type(x1, y1); + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + col_type const & v0, + col_type const & v1 + ) + { + this->value[0] = v0; + this->value[1] = v1; + } + + ////////////////////////////////////// + // Convertion constructors + template + template + GLM_FUNC_DECL tmat2x2::tmat2x2 + ( + U const & s + ) + { + value_type const Zero(0); + this->value[0] = tvec2(value_type(s), Zero); + this->value[1] = tvec2(Zero, value_type(s)); + } + + template + template + GLM_FUNC_DECL tmat2x2::tmat2x2 + ( + X1 const & x1, Y1 const & y1, + X2 const & x2, Y2 const & y2 + ) + { + this->value[0] = col_type(value_type(x1), value_type(y1)); + this->value[1] = col_type(value_type(x2), value_type(y2)); + } + + template + template + GLM_FUNC_DECL tmat2x2::tmat2x2 + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + this->value[0] = col_type(v1); + this->value[1] = col_type(v2); + } + + ////////////////////////////////////////////////////////////// + // mat2x2 matrix conversions + + template + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + tmat2x2 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + tmat3x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + tmat4x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + tmat2x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + tmat3x2 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + tmat2x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + tmat4x2 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + tmat3x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2::tmat2x2 + ( + tmat4x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 tmat2x2::_inverse() const + { + typename tmat2x2::value_type Determinant = this->value[0][0] * this->value[1][1] - this->value[1][0] * this->value[0][1]; + + tmat2x2 Inverse( + + this->value[1][1] / Determinant, + - this->value[0][1] / Determinant, + - this->value[1][0] / Determinant, + + this->value[0][0] / Determinant); + return Inverse; + } + + ////////////////////////////////////////////////////////////// + // mat2x2 operators + + // This function shouldn't required but it seems that VC7.1 have an optimisation bug if this operator wasn't declared + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator= + ( + tmat2x2 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator= + ( + tmat2x2 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator+= + ( + U const & s + ) + { + this->value[0] += s; + this->value[1] += s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator+= + ( + tmat2x2 const & m + ) + { + this->value[0] += m[0]; + this->value[1] += m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator-= + ( + U const & s + ) + { + this->value[0] -= s; + this->value[1] -= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator-= + ( + tmat2x2 const & m + ) + { + this->value[0] -= m[0]; + this->value[1] -= m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator*= + ( + U const & s + ) + { + this->value[0] *= s; + this->value[1] *= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator*= + ( + tmat2x2 const & m + ) + { + return (*this = *this * m); + } + + template + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator/= + ( + U const & s + ) + { + this->value[0] /= s; + this->value[1] /= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator/= + ( + tmat2x2 const & m + ) + { + return (*this = *this / m); + } + + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator++ () + { + ++this->value[0]; + ++this->value[1]; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat2x2& tmat2x2::operator-- () + { + --this->value[0]; + --this->value[1]; + return *this; + } + + ////////////////////////////////////////////////////////////// + // Binary operators + + template + GLM_FUNC_QUALIFIER tmat2x2 operator+ + ( + tmat2x2 const & m, + typename tmat2x2::value_type const & s + ) + { + return tmat2x2( + m[0] + s, + m[1] + s); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator+ + ( + typename tmat2x2::value_type const & s, + tmat2x2 const & m + ) + { + return tmat2x2( + m[0] + s, + m[1] + s); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator+ + ( + tmat2x2 const & m1, + tmat2x2 const & m2 + ) + { + return tmat2x2( + m1[0] + m2[0], + m1[1] + m2[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator- + ( + tmat2x2 const & m, + typename tmat2x2::value_type const & s + ) + { + return tmat2x2( + m[0] - s, + m[1] - s); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator- + ( + typename tmat2x2::value_type const & s, + tmat2x2 const & m + ) + { + return tmat2x2( + s - m[0], + s - m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator- + ( + tmat2x2 const & m1, + tmat2x2 const & m2 + ) + { + return tmat2x2( + m1[0] - m2[0], + m1[1] - m2[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator* + ( + tmat2x2 const & m, + typename tmat2x2::value_type const & s + ) + { + return tmat2x2( + m[0] * s, + m[1] * s); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator* + ( + typename tmat2x2::value_type const & s, + tmat2x2 const & m + ) + { + return tmat2x2( + m[0] * s, + m[1] * s); + } + + template + GLM_FUNC_QUALIFIER typename tmat2x2::col_type operator* + ( + tmat2x2 const & m, + typename tmat2x2::row_type const & v + ) + { + return detail::tvec2( + m[0][0] * v.x + m[1][0] * v.y, + m[0][1] * v.x + m[1][1] * v.y); + } + + template + GLM_FUNC_QUALIFIER typename tmat2x2::row_type operator* + ( + typename tmat2x2::col_type const & v, + tmat2x2 const & m + ) + { + return detail::tvec2( + v.x * m[0][0] + v.y * m[0][1], + v.x * m[1][0] + v.y * m[1][1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator* + ( + tmat2x2 const & m1, + tmat2x2 const & m2 + ) + { + return tmat2x2( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1]); + } + + template + GLM_FUNC_QUALIFIER tmat3x2 operator* + ( + tmat2x2 const & m1, + tmat3x2 const & m2 + ) + { + return tmat3x2( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1]); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 operator* + ( + tmat2x2 const & m1, + tmat4x2 const & m2 + ) + { + return tmat4x2( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1], + m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1], + m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator/ + ( + tmat2x2 const & m, + typename tmat2x2::value_type const & s + ) + { + return tmat2x2( + m[0] / s, + m[1] / s); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator/ + ( + typename tmat2x2::value_type const & s, + tmat2x2 const & m + ) + { + return tmat2x2( + s / m[0], + s / m[1]); + } + + template + GLM_FUNC_QUALIFIER typename tmat2x2::col_type operator/ + ( + tmat2x2 const & m, + typename tmat2x2::row_type & v + ) + { + return m._inverse() * v; + } + + template + GLM_FUNC_QUALIFIER typename tmat2x2::row_type operator/ + ( + typename tmat2x2::col_type const & v, + tmat2x2 const & m + ) + { + return v * m._inverse(); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator/ + ( + tmat2x2 const & m1, + tmat2x2 const & m2 + ) + { + return m1 * m2._inverse(); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tmat2x2 const operator- + ( + tmat2x2 const & m + ) + { + return tmat2x2( + -m[0], + -m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 const operator++ + ( + tmat2x2 const & m, + int + ) + { + return tmat2x2( + m[0] + T(1), + m[1] + T(1)); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 const operator-- + ( + tmat2x2 const & m, + int + ) + { + return tmat2x2( + m[0] - T(1), + m[1] - T(1)); + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tmat2x2 const & m1, + tmat2x2 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tmat2x2 const & m1, + tmat2x2 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]); + } + +} //namespace detail +} //namespace glm diff --git a/include/gal/opengl/glm/core/type_mat2x3.hpp b/include/gal/opengl/glm/core/type_mat2x3.hpp index b079f46e99..4a02f8c30a 100644 --- a/include/gal/opengl/glm/core/type_mat2x3.hpp +++ b/include/gal/opengl/glm/core/type_mat2x3.hpp @@ -1,258 +1,258 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_mat2x3.hpp -/// @date 2006-10-01 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_type_mat2x3 -#define glm_core_type_mat2x3 - -#include "type_mat.hpp" - -namespace glm{ -namespace detail -{ - template struct tvec1; - template struct tvec2; - template struct tvec3; - template struct tvec4; - template struct tmat2x2; - template struct tmat2x3; - template struct tmat2x4; - template struct tmat3x2; - template struct tmat3x3; - template struct tmat3x4; - template struct tmat4x2; - template struct tmat4x3; - template struct tmat4x4; - - template - struct tmat2x3 - { - enum ctor{null}; - typedef T value_type; - typedef std::size_t size_type; - typedef tvec3 col_type; - typedef tvec2 row_type; - typedef tmat2x3 type; - typedef tmat3x2 transpose_type; - - static GLM_FUNC_DECL size_type col_size(); - static GLM_FUNC_DECL size_type row_size(); - - GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; - - private: - // Data - col_type value[2]; - - public: - // Constructors - GLM_FUNC_DECL tmat2x3(); - GLM_FUNC_DECL tmat2x3(tmat2x3 const & m); - - GLM_FUNC_DECL explicit tmat2x3( - ctor); - GLM_FUNC_DECL explicit tmat2x3( - value_type const & s); - GLM_FUNC_DECL explicit tmat2x3( - value_type const & x0, value_type const & y0, value_type const & z0, - value_type const & x1, value_type const & y1, value_type const & z1); - GLM_FUNC_DECL explicit tmat2x3( - col_type const & v0, - col_type const & v1); - - ////////////////////////////////////// - // Conversions - template - GLM_FUNC_DECL explicit tmat2x3( - U const & x); - - template - GLM_FUNC_DECL explicit tmat2x3( - X1 const & x1, Y1 const & y1, Z1 const & z1, - X2 const & x2, Y2 const & y2, Z2 const & z2); - - template - GLM_FUNC_DECL explicit tmat2x3( - tvec3 const & v1, - tvec3 const & v2); - - ////////////////////////////////////// - // Matrix conversion - template - GLM_FUNC_DECL explicit tmat2x3(tmat2x3 const & m); - - GLM_FUNC_DECL explicit tmat2x3(tmat2x2 const & x); - GLM_FUNC_DECL explicit tmat2x3(tmat3x3 const & x); - GLM_FUNC_DECL explicit tmat2x3(tmat4x4 const & x); - GLM_FUNC_DECL explicit tmat2x3(tmat2x4 const & x); - GLM_FUNC_DECL explicit tmat2x3(tmat3x2 const & x); - GLM_FUNC_DECL explicit tmat2x3(tmat3x4 const & x); - GLM_FUNC_DECL explicit tmat2x3(tmat4x2 const & x); - GLM_FUNC_DECL explicit tmat2x3(tmat4x3 const & x); - - // Accesses - col_type & operator[](size_type i); - col_type const & operator[](size_type i) const; - - // Unary updatable operators - GLM_FUNC_DECL tmat2x3 & operator= (tmat2x3 const & m); - template - GLM_FUNC_DECL tmat2x3 & operator= (tmat2x3 const & m); - template - GLM_FUNC_DECL tmat2x3 & operator+= (U const & s); - template - GLM_FUNC_DECL tmat2x3 & operator+= (tmat2x3 const & m); - template - GLM_FUNC_DECL tmat2x3 & operator-= (U const & s); - template - GLM_FUNC_DECL tmat2x3 & operator-= (tmat2x3 const & m); - template - GLM_FUNC_DECL tmat2x3 & operator*= (U const & s); - template - GLM_FUNC_DECL tmat2x3 & operator*= (tmat2x3 const & m); - template - GLM_FUNC_DECL tmat2x3 & operator/= (U const & s); - - GLM_FUNC_DECL tmat2x3 & operator++ (); - GLM_FUNC_DECL tmat2x3 & operator-- (); - }; - - // Binary operators - template - tmat2x3 operator+ ( - tmat2x3 const & m, - typename tmat2x3::value_type const & s); - - template - tmat2x3 operator+ ( - tmat2x3 const & m1, - tmat2x3 const & m2); - - template - tmat2x3 operator- ( - tmat2x3 const & m, - typename tmat2x3::value_type const & s); - - template - tmat2x3 operator- ( - tmat2x3 const & m1, - tmat2x3 const & m2); - - template - tmat2x3 operator* ( - tmat2x3 const & m, - typename tmat2x3::value_type const & s); - - template - tmat2x3 operator* ( - typename tmat2x3::value_type const & s, - tmat2x3 const & m); - - template - typename tmat2x3::col_type operator* ( - tmat2x3 const & m, - typename tmat2x3::row_type const & v); - - template - typename tmat2x3::row_type operator* ( - typename tmat2x3::col_type const & v, - tmat2x3 const & m); - - template - tmat2x3 operator* ( - tmat2x3 const & m1, - tmat2x2 const & m2); - - template - tmat3x3 operator* ( - tmat2x3 const & m1, - tmat3x2 const & m2); - - template - tmat4x3 operator* ( - tmat2x3 const & m1, - tmat4x2 const & m2); - - template - tmat2x3 operator/ ( - tmat2x3 const & m, - typename tmat2x3::value_type const & s); - - template - tmat2x3 operator/ ( - typename tmat2x3::value_type const & s, - tmat2x3 const & m); - - // Unary constant operators - template - tmat2x3 const operator- ( - tmat2x3 const & m); - - template - tmat2x3 const operator-- ( - tmat2x3 const & m, - int); - - template - tmat2x3 const operator++ ( - tmat2x3 const & m, - int); - -} //namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 2 columns of 3 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x3 lowp_mat2x3; - - /// 2 columns of 3 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x3 mediump_mat2x3; - - /// 2 columns of 3 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x3 highp_mat2x3; - - /// @} -}//namespace glm - -#ifndef GLM_EXTERNAL_TEMPLATE -#include "type_mat2x3.inl" -#endif - -#endif //glm_core_type_mat2x3 +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat2x3.hpp +/// @date 2006-10-01 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_mat2x3 +#define glm_core_type_mat2x3 + +#include "type_mat.hpp" + +namespace glm{ +namespace detail +{ + template struct tvec1; + template struct tvec2; + template struct tvec3; + template struct tvec4; + template struct tmat2x2; + template struct tmat2x3; + template struct tmat2x4; + template struct tmat3x2; + template struct tmat3x3; + template struct tmat3x4; + template struct tmat4x2; + template struct tmat4x3; + template struct tmat4x4; + + template + struct tmat2x3 + { + enum ctor{null}; + typedef T value_type; + typedef std::size_t size_type; + typedef tvec3 col_type; + typedef tvec2 row_type; + typedef tmat2x3 type; + typedef tmat3x2 transpose_type; + + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + private: + // Data + col_type value[2]; + + public: + // Constructors + GLM_FUNC_DECL tmat2x3(); + GLM_FUNC_DECL tmat2x3(tmat2x3 const & m); + + GLM_FUNC_DECL explicit tmat2x3( + ctor); + GLM_FUNC_DECL explicit tmat2x3( + value_type const & s); + GLM_FUNC_DECL explicit tmat2x3( + value_type const & x0, value_type const & y0, value_type const & z0, + value_type const & x1, value_type const & y1, value_type const & z1); + GLM_FUNC_DECL explicit tmat2x3( + col_type const & v0, + col_type const & v1); + + ////////////////////////////////////// + // Conversions + template + GLM_FUNC_DECL explicit tmat2x3( + U const & x); + + template + GLM_FUNC_DECL explicit tmat2x3( + X1 const & x1, Y1 const & y1, Z1 const & z1, + X2 const & x2, Y2 const & y2, Z2 const & z2); + + template + GLM_FUNC_DECL explicit tmat2x3( + tvec3 const & v1, + tvec3 const & v2); + + ////////////////////////////////////// + // Matrix conversion + template + GLM_FUNC_DECL explicit tmat2x3(tmat2x3 const & m); + + GLM_FUNC_DECL explicit tmat2x3(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat2x3(tmat4x3 const & x); + + // Accesses + col_type & operator[](size_type i); + col_type const & operator[](size_type i) const; + + // Unary updatable operators + GLM_FUNC_DECL tmat2x3 & operator= (tmat2x3 const & m); + template + GLM_FUNC_DECL tmat2x3 & operator= (tmat2x3 const & m); + template + GLM_FUNC_DECL tmat2x3 & operator+= (U const & s); + template + GLM_FUNC_DECL tmat2x3 & operator+= (tmat2x3 const & m); + template + GLM_FUNC_DECL tmat2x3 & operator-= (U const & s); + template + GLM_FUNC_DECL tmat2x3 & operator-= (tmat2x3 const & m); + template + GLM_FUNC_DECL tmat2x3 & operator*= (U const & s); + template + GLM_FUNC_DECL tmat2x3 & operator*= (tmat2x3 const & m); + template + GLM_FUNC_DECL tmat2x3 & operator/= (U const & s); + + GLM_FUNC_DECL tmat2x3 & operator++ (); + GLM_FUNC_DECL tmat2x3 & operator-- (); + }; + + // Binary operators + template + tmat2x3 operator+ ( + tmat2x3 const & m, + typename tmat2x3::value_type const & s); + + template + tmat2x3 operator+ ( + tmat2x3 const & m1, + tmat2x3 const & m2); + + template + tmat2x3 operator- ( + tmat2x3 const & m, + typename tmat2x3::value_type const & s); + + template + tmat2x3 operator- ( + tmat2x3 const & m1, + tmat2x3 const & m2); + + template + tmat2x3 operator* ( + tmat2x3 const & m, + typename tmat2x3::value_type const & s); + + template + tmat2x3 operator* ( + typename tmat2x3::value_type const & s, + tmat2x3 const & m); + + template + typename tmat2x3::col_type operator* ( + tmat2x3 const & m, + typename tmat2x3::row_type const & v); + + template + typename tmat2x3::row_type operator* ( + typename tmat2x3::col_type const & v, + tmat2x3 const & m); + + template + tmat2x3 operator* ( + tmat2x3 const & m1, + tmat2x2 const & m2); + + template + tmat3x3 operator* ( + tmat2x3 const & m1, + tmat3x2 const & m2); + + template + tmat4x3 operator* ( + tmat2x3 const & m1, + tmat4x2 const & m2); + + template + tmat2x3 operator/ ( + tmat2x3 const & m, + typename tmat2x3::value_type const & s); + + template + tmat2x3 operator/ ( + typename tmat2x3::value_type const & s, + tmat2x3 const & m); + + // Unary constant operators + template + tmat2x3 const operator- ( + tmat2x3 const & m); + + template + tmat2x3 const operator-- ( + tmat2x3 const & m, + int); + + template + tmat2x3 const operator++ ( + tmat2x3 const & m, + int); + +} //namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 2 columns of 3 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x3 lowp_mat2x3; + + /// 2 columns of 3 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x3 mediump_mat2x3; + + /// 2 columns of 3 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x3 highp_mat2x3; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_mat2x3.inl" +#endif + +#endif //glm_core_type_mat2x3 diff --git a/include/gal/opengl/glm/core/type_mat2x3.inl b/include/gal/opengl/glm/core/type_mat2x3.inl index 012edce3da..345670dec5 100644 --- a/include/gal/opengl/glm/core/type_mat2x3.inl +++ b/include/gal/opengl/glm/core/type_mat2x3.inl @@ -1,645 +1,645 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_mat2x3.inl -/// @date 2006-08-05 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm{ -namespace detail -{ - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x3::size_type tmat2x3::length() const - { - return 2; - } - - template - GLM_FUNC_QUALIFIER typename tmat2x3::size_type tmat2x3::col_size() - { - return 3; - } - - template - GLM_FUNC_QUALIFIER typename tmat2x3::size_type tmat2x3::row_size() - { - return 2; - } - - ////////////////////////////////////// - // Accesses - - template - GLM_FUNC_QUALIFIER typename tmat2x3::col_type & - tmat2x3::operator[] - ( - size_type i - ) - { - assert(i < this->length()); - return this->value[i]; - } - - template - GLM_FUNC_QUALIFIER typename tmat2x3::col_type const & - tmat2x3::operator[] - ( - size_type i - ) const - { - assert(i < this->length()); - return this->value[i]; - } - - ////////////////////////////////////////////////////////////// - // Constructors - - template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3() - { - this->value[0] = col_type(T(1), T(0), T(0)); - this->value[1] = col_type(T(0), T(1), T(0)); - } - - template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - tmat2x3 const & m - ) - { - this->value[0] = m.value[0]; - this->value[1] = m.value[1]; - } - - template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - ctor - ) - {} - - template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - value_type const & s - ) - { - this->value[0] = col_type(s, T(0), T(0)); - this->value[1] = col_type(T(0), s, T(0)); - } - - template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - value_type const & x0, value_type const & y0, value_type const & z0, - value_type const & x1, value_type const & y1, value_type const & z1 - ) - { - this->value[0] = col_type(x0, y0, z0); - this->value[1] = col_type(x1, y1, z1); - } - - template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - col_type const & v0, - col_type const & v1 - ) - { - this->value[0] = v0; - this->value[1] = v1; - } - - ////////////////////////////////////// - // Convertion constructors - template - template - GLM_FUNC_DECL tmat2x3::tmat2x3 - ( - U const & s - ) - { - value_type const Zero(0); - this->value[0] = tvec3(value_type(s), Zero, Zero); - this->value[1] = tvec3(Zero, value_type(s), Zero); - } - - template - template < - typename X1, typename Y1, typename Z1, - typename X2, typename Y2, typename Z2> - GLM_FUNC_DECL tmat2x3::tmat2x3 - ( - X1 const & x1, Y1 const & y1, Z1 const & z1, - X2 const & x2, Y2 const & y2, Z2 const & z2 - ) - { - this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1)); - this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2)); - } - - template - template - GLM_FUNC_DECL tmat2x3::tmat2x3 - ( - tvec3 const & v1, - tvec3 const & v2 - ) - { - this->value[0] = col_type(v1); - this->value[1] = col_type(v2); - } - - ////////////////////////////////////// - // Matrix conversions - - template - template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - tmat2x3 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - tmat2x2 const & m - ) - { - this->value[0] = col_type(m[0], T(0)); - this->value[1] = col_type(m[1], T(0)); - } - - template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - tmat3x3 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - tmat4x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - tmat2x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - tmat3x2 const & m - ) - { - this->value[0] = col_type(m[0], T(0)); - this->value[1] = col_type(m[1], T(0)); - } - - template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - tmat3x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - tmat4x2 const & m - ) - { - this->value[0] = col_type(m[0], T(0)); - this->value[1] = col_type(m[1], T(0)); - } - - template - GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 - ( - tmat4x3 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - } - - ////////////////////////////////////////////////////////////// - // Unary updatable operators - - template - GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator= - ( - tmat2x3 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator= - ( - tmat2x3 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator+= - ( - U const & s - ) - { - this->value[0] += s; - this->value[1] += s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator+= - ( - tmat2x3 const & m - ) - { - this->value[0] += m[0]; - this->value[1] += m[1]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator-= - ( - U const & s - ) - { - this->value[0] -= s; - this->value[1] -= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator-= - ( - tmat2x3 const & m - ) - { - this->value[0] -= m[0]; - this->value[1] -= m[1]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator*= - ( - U const & s - ) - { - this->value[0] *= s; - this->value[1] *= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator*= - ( - tmat2x3 const & m - ) - { - return (*this = tmat2x3(*this * m)); - } - - template - template - GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator/= - ( - U const & s - ) - { - this->value[0] /= s; - this->value[1] /= s; - return *this; - } - - template - GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator++ () - { - ++this->value[0]; - ++this->value[1]; - return *this; - } - - template - GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator-- () - { - --this->value[0]; - --this->value[1]; - return *this; - } - - ////////////////////////////////////////////////////////////// - // Binary operators - - template - GLM_FUNC_QUALIFIER tmat2x3 operator+ - ( - tmat2x3 const & m, - typename tmat2x3::value_type const & s - ) - { - return tmat2x3( - m[0] + s, - m[1] + s); - } - - template - GLM_FUNC_QUALIFIER tmat2x3 operator+ - ( - tmat2x3 const & m1, - tmat2x3 const & m2 - ) - { - return tmat2x3( - m1[0] + m2[0], - m1[1] + m2[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x3 operator- - ( - tmat2x3 const & m, - typename tmat2x3::value_type const & s - ) - { - return tmat2x3( - m[0] - s, - m[1] - s); - } - - template - GLM_FUNC_QUALIFIER tmat2x3 operator- - ( - tmat2x3 const & m1, - tmat2x3 const & m2 - ) - { - return tmat2x3( - m1[0] - m2[0], - m1[1] - m2[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x3 operator* - ( - tmat2x3 const & m, - typename tmat2x3::value_type const & s - ) - { - return tmat2x3( - m[0] * s, - m[1] * s); - } - - template - GLM_FUNC_QUALIFIER tmat2x3 operator* - ( - typename tmat2x3::value_type const & s, - tmat2x3 const & m - ) - { - return tmat2x3( - m[0] * s, - m[1] * s); - } - - template - GLM_FUNC_QUALIFIER typename tmat2x3::col_type operator* - ( - tmat2x3 const & m, - typename tmat2x3::row_type const & v) - { - return typename tmat2x3::col_type( - m[0][0] * v.x + m[1][0] * v.y, - m[0][1] * v.x + m[1][1] * v.y, - m[0][2] * v.x + m[1][2] * v.y); - } - - template - GLM_FUNC_QUALIFIER typename tmat2x3::row_type operator* - ( - typename tmat2x3::col_type const & v, - tmat2x3 const & m) - { - return typename tmat2x3::row_type( - v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2], - v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2]); - } - - template - GLM_FUNC_QUALIFIER tmat2x3 operator* - ( - tmat2x3 const & m1, - tmat2x2 const & m2 - ) - { - return tmat2x3( - m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], - m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1], - m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1], - m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1], - m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1], - m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1]); - } - - template - GLM_FUNC_QUALIFIER tmat3x3 operator* - ( - tmat2x3 const & m1, - tmat3x2 const & m2 - ) - { - typename tmat2x3::value_type SrcA00 = m1[0][0]; - typename tmat2x3::value_type SrcA01 = m1[0][1]; - typename tmat2x3::value_type SrcA02 = m1[0][2]; - typename tmat2x3::value_type SrcA10 = m1[1][0]; - typename tmat2x3::value_type SrcA11 = m1[1][1]; - typename tmat2x3::value_type SrcA12 = m1[1][2]; - - typename tmat2x3::value_type SrcB00 = m2[0][0]; - typename tmat2x3::value_type SrcB01 = m2[0][1]; - typename tmat2x3::value_type SrcB10 = m2[1][0]; - typename tmat2x3::value_type SrcB11 = m2[1][1]; - typename tmat2x3::value_type SrcB20 = m2[2][0]; - typename tmat2x3::value_type SrcB21 = m2[2][1]; - - tmat3x3 Result(tmat3x3::null); - Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01; - Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01; - Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01; - Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11; - Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11; - Result[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11; - Result[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21; - Result[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21; - Result[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21; - return Result; - } - - template - GLM_FUNC_QUALIFIER tmat4x3 operator* - ( - tmat2x3 const & m1, - tmat4x2 const & m2 - ) - { - return tmat4x3( - m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], - m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1], - m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1], - m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1], - m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1], - m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1], - m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1], - m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1], - m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1], - m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1], - m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1], - m1[0][2] * m2[3][0] + m1[1][2] * m2[3][1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x3 operator/ - ( - tmat2x3 const & m, - typename tmat2x3::value_type const & s - ) - { - return tmat2x3( - m[0] / s, - m[1] / s); - } - - template - GLM_FUNC_QUALIFIER tmat2x3 operator/ - ( - typename tmat2x3::value_type const & s, - tmat2x3 const & m - ) - { - return tmat2x3( - s / m[0], - s / m[1]); - } - - // Unary constant operators - template - GLM_FUNC_QUALIFIER tmat2x3 const operator- - ( - tmat2x3 const & m - ) - { - return tmat2x3( - -m[0], - -m[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x3 const operator++ - ( - tmat2x3 const & m, - int - ) - { - return tmat2x3( - m[0] + typename tmat2x3::value_type(1), - m[1] + typename tmat2x3::value_type(1)); - } - - template - GLM_FUNC_QUALIFIER tmat2x3 const operator-- - ( - tmat2x3 const & m, - int - ) - { - return tmat2x3( - m[0] - typename tmat2x3::value_type(1), - m[1] - typename tmat2x3::value_type(1)); - } - - ////////////////////////////////////// - // Boolean operators - - template - GLM_FUNC_QUALIFIER bool operator== - ( - tmat2x3 const & m1, - tmat2x3 const & m2 - ) - { - return (m1[0] == m2[0]) && (m1[1] == m2[1]); - } - - template - GLM_FUNC_QUALIFIER bool operator!= - ( - tmat2x3 const & m1, - tmat2x3 const & m2 - ) - { - return (m1[0] != m2[0]) || (m1[1] != m2[1]); - } -} //namespace detail -} //namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat2x3.inl +/// @date 2006-08-05 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x3::size_type tmat2x3::length() const + { + return 2; + } + + template + GLM_FUNC_QUALIFIER typename tmat2x3::size_type tmat2x3::col_size() + { + return 3; + } + + template + GLM_FUNC_QUALIFIER typename tmat2x3::size_type tmat2x3::row_size() + { + return 2; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tmat2x3::col_type & + tmat2x3::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return this->value[i]; + } + + template + GLM_FUNC_QUALIFIER typename tmat2x3::col_type const & + tmat2x3::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return this->value[i]; + } + + ////////////////////////////////////////////////////////////// + // Constructors + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3() + { + this->value[0] = col_type(T(1), T(0), T(0)); + this->value[1] = col_type(T(0), T(1), T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + tmat2x3 const & m + ) + { + this->value[0] = m.value[0]; + this->value[1] = m.value[1]; + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + value_type const & s + ) + { + this->value[0] = col_type(s, T(0), T(0)); + this->value[1] = col_type(T(0), s, T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + value_type const & x0, value_type const & y0, value_type const & z0, + value_type const & x1, value_type const & y1, value_type const & z1 + ) + { + this->value[0] = col_type(x0, y0, z0); + this->value[1] = col_type(x1, y1, z1); + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + col_type const & v0, + col_type const & v1 + ) + { + this->value[0] = v0; + this->value[1] = v1; + } + + ////////////////////////////////////// + // Convertion constructors + template + template + GLM_FUNC_DECL tmat2x3::tmat2x3 + ( + U const & s + ) + { + value_type const Zero(0); + this->value[0] = tvec3(value_type(s), Zero, Zero); + this->value[1] = tvec3(Zero, value_type(s), Zero); + } + + template + template < + typename X1, typename Y1, typename Z1, + typename X2, typename Y2, typename Z2> + GLM_FUNC_DECL tmat2x3::tmat2x3 + ( + X1 const & x1, Y1 const & y1, Z1 const & z1, + X2 const & x2, Y2 const & y2, Z2 const & z2 + ) + { + this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1)); + this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2)); + } + + template + template + GLM_FUNC_DECL tmat2x3::tmat2x3 + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + this->value[0] = col_type(v1); + this->value[1] = col_type(v2); + } + + ////////////////////////////////////// + // Matrix conversions + + template + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + tmat2x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + tmat2x2 const & m + ) + { + this->value[0] = col_type(m[0], T(0)); + this->value[1] = col_type(m[1], T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + tmat3x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + tmat4x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + tmat2x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + tmat3x2 const & m + ) + { + this->value[0] = col_type(m[0], T(0)); + this->value[1] = col_type(m[1], T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + tmat3x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + tmat4x2 const & m + ) + { + this->value[0] = col_type(m[0], T(0)); + this->value[1] = col_type(m[1], T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat2x3::tmat2x3 + ( + tmat4x3 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + } + + ////////////////////////////////////////////////////////////// + // Unary updatable operators + + template + GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator= + ( + tmat2x3 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator= + ( + tmat2x3 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator+= + ( + U const & s + ) + { + this->value[0] += s; + this->value[1] += s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator+= + ( + tmat2x3 const & m + ) + { + this->value[0] += m[0]; + this->value[1] += m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator-= + ( + U const & s + ) + { + this->value[0] -= s; + this->value[1] -= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator-= + ( + tmat2x3 const & m + ) + { + this->value[0] -= m[0]; + this->value[1] -= m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x3& tmat2x3::operator*= + ( + U const & s + ) + { + this->value[0] *= s; + this->value[1] *= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator*= + ( + tmat2x3 const & m + ) + { + return (*this = tmat2x3(*this * m)); + } + + template + template + GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator/= + ( + U const & s + ) + { + this->value[0] /= s; + this->value[1] /= s; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator++ () + { + ++this->value[0]; + ++this->value[1]; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat2x3 & tmat2x3::operator-- () + { + --this->value[0]; + --this->value[1]; + return *this; + } + + ////////////////////////////////////////////////////////////// + // Binary operators + + template + GLM_FUNC_QUALIFIER tmat2x3 operator+ + ( + tmat2x3 const & m, + typename tmat2x3::value_type const & s + ) + { + return tmat2x3( + m[0] + s, + m[1] + s); + } + + template + GLM_FUNC_QUALIFIER tmat2x3 operator+ + ( + tmat2x3 const & m1, + tmat2x3 const & m2 + ) + { + return tmat2x3( + m1[0] + m2[0], + m1[1] + m2[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x3 operator- + ( + tmat2x3 const & m, + typename tmat2x3::value_type const & s + ) + { + return tmat2x3( + m[0] - s, + m[1] - s); + } + + template + GLM_FUNC_QUALIFIER tmat2x3 operator- + ( + tmat2x3 const & m1, + tmat2x3 const & m2 + ) + { + return tmat2x3( + m1[0] - m2[0], + m1[1] - m2[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x3 operator* + ( + tmat2x3 const & m, + typename tmat2x3::value_type const & s + ) + { + return tmat2x3( + m[0] * s, + m[1] * s); + } + + template + GLM_FUNC_QUALIFIER tmat2x3 operator* + ( + typename tmat2x3::value_type const & s, + tmat2x3 const & m + ) + { + return tmat2x3( + m[0] * s, + m[1] * s); + } + + template + GLM_FUNC_QUALIFIER typename tmat2x3::col_type operator* + ( + tmat2x3 const & m, + typename tmat2x3::row_type const & v) + { + return typename tmat2x3::col_type( + m[0][0] * v.x + m[1][0] * v.y, + m[0][1] * v.x + m[1][1] * v.y, + m[0][2] * v.x + m[1][2] * v.y); + } + + template + GLM_FUNC_QUALIFIER typename tmat2x3::row_type operator* + ( + typename tmat2x3::col_type const & v, + tmat2x3 const & m) + { + return typename tmat2x3::row_type( + v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2], + v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2]); + } + + template + GLM_FUNC_QUALIFIER tmat2x3 operator* + ( + tmat2x3 const & m1, + tmat2x2 const & m2 + ) + { + return tmat2x3( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1]); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator* + ( + tmat2x3 const & m1, + tmat3x2 const & m2 + ) + { + typename tmat2x3::value_type SrcA00 = m1[0][0]; + typename tmat2x3::value_type SrcA01 = m1[0][1]; + typename tmat2x3::value_type SrcA02 = m1[0][2]; + typename tmat2x3::value_type SrcA10 = m1[1][0]; + typename tmat2x3::value_type SrcA11 = m1[1][1]; + typename tmat2x3::value_type SrcA12 = m1[1][2]; + + typename tmat2x3::value_type SrcB00 = m2[0][0]; + typename tmat2x3::value_type SrcB01 = m2[0][1]; + typename tmat2x3::value_type SrcB10 = m2[1][0]; + typename tmat2x3::value_type SrcB11 = m2[1][1]; + typename tmat2x3::value_type SrcB20 = m2[2][0]; + typename tmat2x3::value_type SrcB21 = m2[2][1]; + + tmat3x3 Result(tmat3x3::null); + Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01; + Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01; + Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01; + Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11; + Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11; + Result[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11; + Result[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21; + Result[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21; + Result[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21; + return Result; + } + + template + GLM_FUNC_QUALIFIER tmat4x3 operator* + ( + tmat2x3 const & m1, + tmat4x2 const & m2 + ) + { + return tmat4x3( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1], + m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1], + m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1], + m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1], + m1[0][2] * m2[3][0] + m1[1][2] * m2[3][1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x3 operator/ + ( + tmat2x3 const & m, + typename tmat2x3::value_type const & s + ) + { + return tmat2x3( + m[0] / s, + m[1] / s); + } + + template + GLM_FUNC_QUALIFIER tmat2x3 operator/ + ( + typename tmat2x3::value_type const & s, + tmat2x3 const & m + ) + { + return tmat2x3( + s / m[0], + s / m[1]); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tmat2x3 const operator- + ( + tmat2x3 const & m + ) + { + return tmat2x3( + -m[0], + -m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x3 const operator++ + ( + tmat2x3 const & m, + int + ) + { + return tmat2x3( + m[0] + typename tmat2x3::value_type(1), + m[1] + typename tmat2x3::value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat2x3 const operator-- + ( + tmat2x3 const & m, + int + ) + { + return tmat2x3( + m[0] - typename tmat2x3::value_type(1), + m[1] - typename tmat2x3::value_type(1)); + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tmat2x3 const & m1, + tmat2x3 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tmat2x3 const & m1, + tmat2x3 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]); + } +} //namespace detail +} //namespace glm diff --git a/include/gal/opengl/glm/core/type_mat2x4.hpp b/include/gal/opengl/glm/core/type_mat2x4.hpp index cc6e2458db..acd619a299 100644 --- a/include/gal/opengl/glm/core/type_mat2x4.hpp +++ b/include/gal/opengl/glm/core/type_mat2x4.hpp @@ -1,260 +1,260 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_mat2x4.hpp -/// @date 2006-08-05 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_type_mat2x4 -#define glm_core_type_mat2x4 - -#include "type_mat.hpp" - -namespace glm{ -namespace detail -{ - template struct tvec1; - template struct tvec2; - template struct tvec3; - template struct tvec4; - template struct tmat2x2; - template struct tmat2x3; - template struct tmat2x4; - template struct tmat3x2; - template struct tmat3x3; - template struct tmat3x4; - template struct tmat4x2; - template struct tmat4x3; - template struct tmat4x4; - - template - struct tmat2x4 - { - enum ctor{null}; - typedef T value_type; - typedef std::size_t size_type; - typedef tvec4 col_type; - typedef tvec2 row_type; - typedef tmat2x4 type; - typedef tmat4x2 transpose_type; - - static GLM_FUNC_DECL size_type col_size(); - static GLM_FUNC_DECL size_type row_size(); - - GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; - - private: - // Data - col_type value[2]; - - public: - // Constructors - GLM_FUNC_DECL tmat2x4(); - GLM_FUNC_DECL tmat2x4(tmat2x4 const & m); - - GLM_FUNC_DECL explicit tmat2x4( - ctor); - GLM_FUNC_DECL explicit tmat2x4( - value_type const & s); - GLM_FUNC_DECL explicit tmat2x4( - value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, - value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1); - GLM_FUNC_DECL explicit tmat2x4( - col_type const & v0, - col_type const & v1); - - ////////////////////////////////////// - // Conversions - template - GLM_FUNC_DECL explicit tmat2x4( - U const & x); - - template < - typename X1, typename Y1, typename Z1, typename W1, - typename X2, typename Y2, typename Z2, typename W2> - GLM_FUNC_DECL explicit tmat2x4( - X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, - X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2); - - template - GLM_FUNC_DECL explicit tmat2x4( - tvec4 const & v1, - tvec4 const & v2); - - ////////////////////////////////////// - // Matrix conversions - template - GLM_FUNC_DECL explicit tmat2x4(tmat2x4 const & m); - - GLM_FUNC_DECL explicit tmat2x4(tmat2x2 const & x); - GLM_FUNC_DECL explicit tmat2x4(tmat3x3 const & x); - GLM_FUNC_DECL explicit tmat2x4(tmat4x4 const & x); - GLM_FUNC_DECL explicit tmat2x4(tmat2x3 const & x); - GLM_FUNC_DECL explicit tmat2x4(tmat3x2 const & x); - GLM_FUNC_DECL explicit tmat2x4(tmat3x4 const & x); - GLM_FUNC_DECL explicit tmat2x4(tmat4x2 const & x); - GLM_FUNC_DECL explicit tmat2x4(tmat4x3 const & x); - - // Accesses - GLM_FUNC_DECL col_type & operator[](size_type i); - GLM_FUNC_DECL col_type const & operator[](size_type i) const; - - // Unary updatable operators - GLM_FUNC_DECL tmat2x4& operator= (tmat2x4 const & m); - template - GLM_FUNC_DECL tmat2x4& operator= (tmat2x4 const & m); - template - GLM_FUNC_DECL tmat2x4& operator+= (U const & s); - template - GLM_FUNC_DECL tmat2x4& operator+= (tmat2x4 const & m); - template - GLM_FUNC_DECL tmat2x4& operator-= (U const & s); - template - GLM_FUNC_DECL tmat2x4& operator-= (tmat2x4 const & m); - template - GLM_FUNC_DECL tmat2x4& operator*= (U const & s); - template - GLM_FUNC_DECL tmat2x4& operator*= (tmat2x4 const & m); - template - GLM_FUNC_DECL tmat2x4& operator/= (U const & s); - - GLM_FUNC_DECL tmat2x4& operator++ (); - GLM_FUNC_DECL tmat2x4& operator-- (); - }; - - // Binary operators - template - tmat2x4 operator+ ( - tmat2x4 const & m, - typename tmat2x4::value_type const & s); - - template - tmat2x4 operator+ ( - tmat2x4 const & m1, - tmat2x4 const & m2); - - template - tmat2x4 operator- ( - tmat2x4 const & m, - typename tmat2x4::value_type const & s); - - template - tmat2x4 operator- ( - tmat2x4 const & m1, - tmat2x4 const & m2); - - template - tmat2x4 operator* ( - tmat2x4 const & m, - typename tmat2x4::value_type const & s); - - template - tmat2x4 operator* ( - typename tmat2x4::value_type const & s, - tmat2x4 const & m); - - template - typename tmat2x4::col_type operator* ( - tmat2x4 const & m, - typename tmat2x4::row_type const & v); - - template - typename tmat2x4::row_type operator* ( - typename tmat2x4::col_type const & v, - tmat2x4 const & m); - - template - tmat4x4 operator* ( - tmat2x4 const & m1, - tmat4x2 const & m2); - - template - tmat2x4 operator* ( - tmat2x4 const & m1, - tmat2x2 const & m2); - - template - tmat3x4 operator* ( - tmat2x4 const & m1, - tmat3x2 const & m2); - - template - tmat2x4 operator/ ( - tmat2x4 const & m, - typename tmat2x4::value_type const & s); - - template - tmat2x4 operator/ ( - typename tmat2x4::value_type const & s, - tmat2x4 const & m); - - // Unary constant operators - template - tmat2x4 const operator- ( - tmat2x4 const & m); - - template - tmat2x4 const operator-- ( - tmat2x4 const & m, - int); - - template - tmat2x4 const operator++ ( - tmat2x4 const & m, - int); - -} //namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 2 columns of 4 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x4 lowp_mat2x4; - - /// 2 columns of 4 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x4 mediump_mat2x4; - - /// 2 columns of 4 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat2x4 highp_mat2x4; - - /// @} -}//namespace glm - -#ifndef GLM_EXTERNAL_TEMPLATE -#include "type_mat2x4.inl" -#endif - -#endif //glm_core_type_mat2x4 +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat2x4.hpp +/// @date 2006-08-05 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_mat2x4 +#define glm_core_type_mat2x4 + +#include "type_mat.hpp" + +namespace glm{ +namespace detail +{ + template struct tvec1; + template struct tvec2; + template struct tvec3; + template struct tvec4; + template struct tmat2x2; + template struct tmat2x3; + template struct tmat2x4; + template struct tmat3x2; + template struct tmat3x3; + template struct tmat3x4; + template struct tmat4x2; + template struct tmat4x3; + template struct tmat4x4; + + template + struct tmat2x4 + { + enum ctor{null}; + typedef T value_type; + typedef std::size_t size_type; + typedef tvec4 col_type; + typedef tvec2 row_type; + typedef tmat2x4 type; + typedef tmat4x2 transpose_type; + + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + private: + // Data + col_type value[2]; + + public: + // Constructors + GLM_FUNC_DECL tmat2x4(); + GLM_FUNC_DECL tmat2x4(tmat2x4 const & m); + + GLM_FUNC_DECL explicit tmat2x4( + ctor); + GLM_FUNC_DECL explicit tmat2x4( + value_type const & s); + GLM_FUNC_DECL explicit tmat2x4( + value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, + value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1); + GLM_FUNC_DECL explicit tmat2x4( + col_type const & v0, + col_type const & v1); + + ////////////////////////////////////// + // Conversions + template + GLM_FUNC_DECL explicit tmat2x4( + U const & x); + + template < + typename X1, typename Y1, typename Z1, typename W1, + typename X2, typename Y2, typename Z2, typename W2> + GLM_FUNC_DECL explicit tmat2x4( + X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, + X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2); + + template + GLM_FUNC_DECL explicit tmat2x4( + tvec4 const & v1, + tvec4 const & v2); + + ////////////////////////////////////// + // Matrix conversions + template + GLM_FUNC_DECL explicit tmat2x4(tmat2x4 const & m); + + GLM_FUNC_DECL explicit tmat2x4(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat2x4(tmat4x3 const & x); + + // Accesses + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; + + // Unary updatable operators + GLM_FUNC_DECL tmat2x4& operator= (tmat2x4 const & m); + template + GLM_FUNC_DECL tmat2x4& operator= (tmat2x4 const & m); + template + GLM_FUNC_DECL tmat2x4& operator+= (U const & s); + template + GLM_FUNC_DECL tmat2x4& operator+= (tmat2x4 const & m); + template + GLM_FUNC_DECL tmat2x4& operator-= (U const & s); + template + GLM_FUNC_DECL tmat2x4& operator-= (tmat2x4 const & m); + template + GLM_FUNC_DECL tmat2x4& operator*= (U const & s); + template + GLM_FUNC_DECL tmat2x4& operator*= (tmat2x4 const & m); + template + GLM_FUNC_DECL tmat2x4& operator/= (U const & s); + + GLM_FUNC_DECL tmat2x4& operator++ (); + GLM_FUNC_DECL tmat2x4& operator-- (); + }; + + // Binary operators + template + tmat2x4 operator+ ( + tmat2x4 const & m, + typename tmat2x4::value_type const & s); + + template + tmat2x4 operator+ ( + tmat2x4 const & m1, + tmat2x4 const & m2); + + template + tmat2x4 operator- ( + tmat2x4 const & m, + typename tmat2x4::value_type const & s); + + template + tmat2x4 operator- ( + tmat2x4 const & m1, + tmat2x4 const & m2); + + template + tmat2x4 operator* ( + tmat2x4 const & m, + typename tmat2x4::value_type const & s); + + template + tmat2x4 operator* ( + typename tmat2x4::value_type const & s, + tmat2x4 const & m); + + template + typename tmat2x4::col_type operator* ( + tmat2x4 const & m, + typename tmat2x4::row_type const & v); + + template + typename tmat2x4::row_type operator* ( + typename tmat2x4::col_type const & v, + tmat2x4 const & m); + + template + tmat4x4 operator* ( + tmat2x4 const & m1, + tmat4x2 const & m2); + + template + tmat2x4 operator* ( + tmat2x4 const & m1, + tmat2x2 const & m2); + + template + tmat3x4 operator* ( + tmat2x4 const & m1, + tmat3x2 const & m2); + + template + tmat2x4 operator/ ( + tmat2x4 const & m, + typename tmat2x4::value_type const & s); + + template + tmat2x4 operator/ ( + typename tmat2x4::value_type const & s, + tmat2x4 const & m); + + // Unary constant operators + template + tmat2x4 const operator- ( + tmat2x4 const & m); + + template + tmat2x4 const operator-- ( + tmat2x4 const & m, + int); + + template + tmat2x4 const operator++ ( + tmat2x4 const & m, + int); + +} //namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 2 columns of 4 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x4 lowp_mat2x4; + + /// 2 columns of 4 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x4 mediump_mat2x4; + + /// 2 columns of 4 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat2x4 highp_mat2x4; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_mat2x4.inl" +#endif + +#endif //glm_core_type_mat2x4 diff --git a/include/gal/opengl/glm/core/type_mat2x4.inl b/include/gal/opengl/glm/core/type_mat2x4.inl index efcf77d9a5..f40963231b 100644 --- a/include/gal/opengl/glm/core/type_mat2x4.inl +++ b/include/gal/opengl/glm/core/type_mat2x4.inl @@ -1,664 +1,664 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_mat2x4.inl -/// @date 2006-08-05 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm{ -namespace detail -{ - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x4::size_type tmat2x4::length() const - { - return 2; - } - - template - GLM_FUNC_QUALIFIER typename tmat2x4::size_type tmat2x4::col_size() - { - return 4; - } - - template - GLM_FUNC_QUALIFIER typename tmat2x4::size_type tmat2x4::row_size() - { - return 2; - } - - ////////////////////////////////////// - // Accesses - - template - GLM_FUNC_QUALIFIER typename tmat2x4::col_type & - tmat2x4::operator[] - ( - size_type i - ) - { - assert(i < this->length()); - return this->value[i]; - } - - template - GLM_FUNC_QUALIFIER typename tmat2x4::col_type const & - tmat2x4::operator[] - ( - size_type i - ) const - { - assert(i < this->length()); - return this->value[i]; - } - - ////////////////////////////////////////////////////////////// - // Constructors - - template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4() - { - value_type const Zero(0); - value_type const One(1); - this->value[0] = col_type(One, Zero, Zero, Zero); - this->value[1] = col_type(Zero, One, Zero, Zero); - } - - template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - tmat2x4 const & m - ) - { - this->value[0] = m.value[0]; - this->value[1] = m.value[1]; - } - - template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - ctor - ) - {} - - template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - value_type const & s - ) - { - value_type const Zero(0); - this->value[0] = col_type(s, Zero, Zero, Zero); - this->value[1] = col_type(Zero, Zero, Zero, Zero); - } - - template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, - value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1 - ) - { - this->value[0] = col_type(x0, y0, z0, w0); - this->value[1] = col_type(x1, y1, z1, w1); - } - - template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - col_type const & v0, - col_type const & v1 - ) - { - this->value[0] = v0; - this->value[1] = v1; - } - - ////////////////////////////////////// - // Convertion constructors - template - template - GLM_FUNC_DECL tmat2x4::tmat2x4 - ( - U const & s - ) - { - value_type const Zero(0); - this->value[0] = tvec4(value_type(s), Zero, Zero, Zero); - this->value[1] = tvec4(Zero, value_type(s), Zero, Zero); - } - - template - template < - typename X1, typename Y1, typename Z1, typename W1, - typename X2, typename Y2, typename Z2, typename W2> - GLM_FUNC_DECL tmat2x4::tmat2x4 - ( - X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, - X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2 - ) - { - this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1), value_type(w1)); - this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2), value_type(w2)); - } - - template - template - GLM_FUNC_DECL tmat2x4::tmat2x4 - ( - tvec4 const & v1, - tvec4 const & v2 - ) - { - this->value[0] = col_type(v1); - this->value[1] = col_type(v2); - } - - ////////////////////////////////////// - // Matrix conversions - - template - template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - tmat2x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - tmat2x2 const & m - ) - { - this->value[0] = col_type(m[0], detail::tvec2(0)); - this->value[1] = col_type(m[1], detail::tvec2(0)); - } - - template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - tmat3x3 const & m - ) - { - this->value[0] = col_type(m[0], T(0)); - this->value[1] = col_type(m[1], T(0)); - } - - template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - tmat4x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - tmat2x3 const & m - ) - { - this->value[0] = col_type(m[0], T(0)); - this->value[1] = col_type(m[1], T(0)); - } - - template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - tmat3x2 const & m - ) - { - this->value[0] = col_type(m[0], detail::tvec2(0)); - this->value[1] = col_type(m[1], detail::tvec2(0)); - } - - template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - tmat3x4 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - } - - template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - tmat4x2 const & m - ) - { - this->value[0] = col_type(m[0], detail::tvec2(T(0))); - this->value[1] = col_type(m[1], detail::tvec2(T(0))); - } - - template - GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 - ( - tmat4x3 const & m - ) - { - this->value[0] = col_type(m[0], T(0)); - this->value[1] = col_type(m[1], T(0)); - } - - ////////////////////////////////////////////////////////////// - // Unary updatable operators - - template - GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator= - ( - tmat2x4 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator= - ( - tmat2x4 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator+= - ( - U const & s - ) - { - this->value[0] += s; - this->value[1] += s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator+= - ( - tmat2x4 const & m - ) - { - this->value[0] += m[0]; - this->value[1] += m[1]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator-= - ( - U const & s - ) - { - this->value[0] -= s; - this->value[1] -= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator-= - ( - tmat2x4 const & m - ) - { - this->value[0] -= m[0]; - this->value[1] -= m[1]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator*= - ( - U const & s - ) - { - this->value[0] *= s; - this->value[1] *= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator*= - ( - tmat2x4 const & m - ) - { - return (*this = tmat2x4(*this * m)); - } - - template - template - GLM_FUNC_QUALIFIER tmat2x4 & tmat2x4::operator/= - ( - U const & s - ) - { - this->value[0] /= s; - this->value[1] /= s; - return *this; - } - - template - GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator++ () - { - ++this->value[0]; - ++this->value[1]; - return *this; - } - - template - GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator-- () - { - --this->value[0]; - --this->value[1]; - return *this; - } - - ////////////////////////////////////////////////////////////// - // Binary operators - - template - GLM_FUNC_QUALIFIER tmat2x4 operator+ - ( - tmat2x4 const & m, - typename tmat2x4::value_type const & s - ) - { - return tmat2x4( - m[0] + s, - m[1] + s); - } - - template - GLM_FUNC_QUALIFIER tmat2x4 operator+ - ( - tmat2x4 const & m1, - tmat2x4 const & m2 - ) - { - return tmat2x4( - m1[0] + m2[0], - m1[1] + m2[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x4 operator- - ( - tmat2x4 const & m, - typename tmat2x4::value_type const & s - ) - { - return tmat2x4( - m[0] - s, - m[1] - s); - } - - template - GLM_FUNC_QUALIFIER tmat2x4 operator- - ( - tmat2x4 const & m1, - tmat2x4 const & m2 - ) - { - return tmat2x4( - m1[0] - m2[0], - m1[1] - m2[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x4 operator* - ( - tmat2x4 const & m, - typename tmat2x4::value_type const & s - ) - { - return tmat2x4( - m[0] * s, - m[1] * s); - } - - template - GLM_FUNC_QUALIFIER tmat2x4 operator* - ( - typename tmat2x4::value_type const & s, - tmat2x4 const & m - ) - { - return tmat2x4( - m[0] * s, - m[1] * s); - } - - template - GLM_FUNC_QUALIFIER typename tmat2x4::col_type operator* - ( - tmat2x4 const & m, - typename tmat2x4::row_type const & v - ) - { - return typename tmat2x4::col_type( - m[0][0] * v.x + m[1][0] * v.y, - m[0][1] * v.x + m[1][1] * v.y, - m[0][2] * v.x + m[1][2] * v.y, - m[0][3] * v.x + m[1][3] * v.y); - } - - template - GLM_FUNC_QUALIFIER typename tmat2x4::row_type operator* - ( - typename tmat2x4::col_type const & v, - tmat2x4 const & m - ) - { - return typename tmat2x4::row_type( - v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2] + v.w * m[0][3], - v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2] + v.w * m[1][3]); - } - - template - GLM_FUNC_QUALIFIER tmat4x4 operator* - ( - tmat2x4 const & m1, - tmat4x2 const & m2 - ) - { - typename tmat2x4::value_type SrcA00 = m1[0][0]; - typename tmat2x4::value_type SrcA01 = m1[0][1]; - typename tmat2x4::value_type SrcA02 = m1[0][2]; - typename tmat2x4::value_type SrcA03 = m1[0][3]; - typename tmat2x4::value_type SrcA10 = m1[1][0]; - typename tmat2x4::value_type SrcA11 = m1[1][1]; - typename tmat2x4::value_type SrcA12 = m1[1][2]; - typename tmat2x4::value_type SrcA13 = m1[1][3]; - - typename tmat2x4::value_type SrcB00 = m2[0][0]; - typename tmat2x4::value_type SrcB01 = m2[0][1]; - typename tmat2x4::value_type SrcB10 = m2[1][0]; - typename tmat2x4::value_type SrcB11 = m2[1][1]; - typename tmat2x4::value_type SrcB20 = m2[2][0]; - typename tmat2x4::value_type SrcB21 = m2[2][1]; - typename tmat2x4::value_type SrcB30 = m2[3][0]; - typename tmat2x4::value_type SrcB31 = m2[3][1]; - - tmat4x4 Result(tmat4x4::null); - Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01; - Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01; - Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01; - Result[0][3] = SrcA03 * SrcB00 + SrcA13 * SrcB01; - Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11; - Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11; - Result[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11; - Result[1][3] = SrcA03 * SrcB10 + SrcA13 * SrcB11; - Result[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21; - Result[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21; - Result[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21; - Result[2][3] = SrcA03 * SrcB20 + SrcA13 * SrcB21; - Result[3][0] = SrcA00 * SrcB30 + SrcA10 * SrcB31; - Result[3][1] = SrcA01 * SrcB30 + SrcA11 * SrcB31; - Result[3][2] = SrcA02 * SrcB30 + SrcA12 * SrcB31; - Result[3][3] = SrcA03 * SrcB30 + SrcA13 * SrcB31; - return Result; - } - - template - GLM_FUNC_QUALIFIER tmat2x4 operator* - ( - tmat2x4 const & m1, - tmat2x2 const & m2 - ) - { - return tmat2x4( - m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], - m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1], - m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1], - m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1], - m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1], - m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1], - m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1], - m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1]); - } - - template - GLM_FUNC_QUALIFIER tmat3x4 operator* - ( - tmat2x4 const & m1, - tmat3x2 const & m2 - ) - { - return tmat3x4( - m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], - m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1], - m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1], - m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1], - m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1], - m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1], - m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1], - m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1], - m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1], - m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1], - m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1], - m1[0][3] * m2[2][0] + m1[1][3] * m2[2][1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x4 operator/ - ( - tmat2x4 const & m, - typename tmat2x4::value_type const & s - ) - { - return tmat2x4( - m[0] / s, - m[1] / s); - } - - template - GLM_FUNC_QUALIFIER tmat2x4 operator/ - ( - typename tmat2x4::value_type const & s, - tmat2x4 const & m - ) - { - return tmat2x4( - s / m[0], - s / m[1]); - } - - // Unary constant operators - template - GLM_FUNC_QUALIFIER tmat2x4 const operator- - ( - tmat2x4 const & m - ) - { - return tmat2x4( - -m[0], - -m[1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x4 const operator++ - ( - tmat2x4 const & m, - int - ) - { - return tmat2x4( - m[0] + typename tmat2x4::value_type(1), - m[1] + typename tmat2x4::value_type(1)); - } - - template - GLM_FUNC_QUALIFIER tmat2x4 const operator-- - ( - tmat2x4 const & m, - int - ) - { - return tmat2x4( - m[0] - typename tmat2x4::value_type(1), - m[1] - typename tmat2x4::value_type(1)); - } - - ////////////////////////////////////// - // Boolean operators - - template - GLM_FUNC_QUALIFIER bool operator== - ( - tmat2x4 const & m1, - tmat2x4 const & m2 - ) - { - return (m1[0] == m2[0]) && (m1[1] == m2[1]); - } - - template - GLM_FUNC_QUALIFIER bool operator!= - ( - tmat2x4 const & m1, - tmat2x4 const & m2 - ) - { - return (m1[0] != m2[0]) || (m1[1] != m2[1]); - } -} //namespace detail -} //namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat2x4.inl +/// @date 2006-08-05 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat2x4::size_type tmat2x4::length() const + { + return 2; + } + + template + GLM_FUNC_QUALIFIER typename tmat2x4::size_type tmat2x4::col_size() + { + return 4; + } + + template + GLM_FUNC_QUALIFIER typename tmat2x4::size_type tmat2x4::row_size() + { + return 2; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tmat2x4::col_type & + tmat2x4::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return this->value[i]; + } + + template + GLM_FUNC_QUALIFIER typename tmat2x4::col_type const & + tmat2x4::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return this->value[i]; + } + + ////////////////////////////////////////////////////////////// + // Constructors + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4() + { + value_type const Zero(0); + value_type const One(1); + this->value[0] = col_type(One, Zero, Zero, Zero); + this->value[1] = col_type(Zero, One, Zero, Zero); + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + tmat2x4 const & m + ) + { + this->value[0] = m.value[0]; + this->value[1] = m.value[1]; + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + value_type const & s + ) + { + value_type const Zero(0); + this->value[0] = col_type(s, Zero, Zero, Zero); + this->value[1] = col_type(Zero, Zero, Zero, Zero); + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, + value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1 + ) + { + this->value[0] = col_type(x0, y0, z0, w0); + this->value[1] = col_type(x1, y1, z1, w1); + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + col_type const & v0, + col_type const & v1 + ) + { + this->value[0] = v0; + this->value[1] = v1; + } + + ////////////////////////////////////// + // Convertion constructors + template + template + GLM_FUNC_DECL tmat2x4::tmat2x4 + ( + U const & s + ) + { + value_type const Zero(0); + this->value[0] = tvec4(value_type(s), Zero, Zero, Zero); + this->value[1] = tvec4(Zero, value_type(s), Zero, Zero); + } + + template + template < + typename X1, typename Y1, typename Z1, typename W1, + typename X2, typename Y2, typename Z2, typename W2> + GLM_FUNC_DECL tmat2x4::tmat2x4 + ( + X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, + X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2 + ) + { + this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1), value_type(w1)); + this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2), value_type(w2)); + } + + template + template + GLM_FUNC_DECL tmat2x4::tmat2x4 + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + this->value[0] = col_type(v1); + this->value[1] = col_type(v2); + } + + ////////////////////////////////////// + // Matrix conversions + + template + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + tmat2x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + tmat2x2 const & m + ) + { + this->value[0] = col_type(m[0], detail::tvec2(0)); + this->value[1] = col_type(m[1], detail::tvec2(0)); + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + tmat3x3 const & m + ) + { + this->value[0] = col_type(m[0], T(0)); + this->value[1] = col_type(m[1], T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + tmat4x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + tmat2x3 const & m + ) + { + this->value[0] = col_type(m[0], T(0)); + this->value[1] = col_type(m[1], T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + tmat3x2 const & m + ) + { + this->value[0] = col_type(m[0], detail::tvec2(0)); + this->value[1] = col_type(m[1], detail::tvec2(0)); + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + tmat3x4 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + tmat4x2 const & m + ) + { + this->value[0] = col_type(m[0], detail::tvec2(T(0))); + this->value[1] = col_type(m[1], detail::tvec2(T(0))); + } + + template + GLM_FUNC_QUALIFIER tmat2x4::tmat2x4 + ( + tmat4x3 const & m + ) + { + this->value[0] = col_type(m[0], T(0)); + this->value[1] = col_type(m[1], T(0)); + } + + ////////////////////////////////////////////////////////////// + // Unary updatable operators + + template + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator= + ( + tmat2x4 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator= + ( + tmat2x4 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator+= + ( + U const & s + ) + { + this->value[0] += s; + this->value[1] += s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator+= + ( + tmat2x4 const & m + ) + { + this->value[0] += m[0]; + this->value[1] += m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator-= + ( + U const & s + ) + { + this->value[0] -= s; + this->value[1] -= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator-= + ( + tmat2x4 const & m + ) + { + this->value[0] -= m[0]; + this->value[1] -= m[1]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator*= + ( + U const & s + ) + { + this->value[0] *= s; + this->value[1] *= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator*= + ( + tmat2x4 const & m + ) + { + return (*this = tmat2x4(*this * m)); + } + + template + template + GLM_FUNC_QUALIFIER tmat2x4 & tmat2x4::operator/= + ( + U const & s + ) + { + this->value[0] /= s; + this->value[1] /= s; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator++ () + { + ++this->value[0]; + ++this->value[1]; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat2x4& tmat2x4::operator-- () + { + --this->value[0]; + --this->value[1]; + return *this; + } + + ////////////////////////////////////////////////////////////// + // Binary operators + + template + GLM_FUNC_QUALIFIER tmat2x4 operator+ + ( + tmat2x4 const & m, + typename tmat2x4::value_type const & s + ) + { + return tmat2x4( + m[0] + s, + m[1] + s); + } + + template + GLM_FUNC_QUALIFIER tmat2x4 operator+ + ( + tmat2x4 const & m1, + tmat2x4 const & m2 + ) + { + return tmat2x4( + m1[0] + m2[0], + m1[1] + m2[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x4 operator- + ( + tmat2x4 const & m, + typename tmat2x4::value_type const & s + ) + { + return tmat2x4( + m[0] - s, + m[1] - s); + } + + template + GLM_FUNC_QUALIFIER tmat2x4 operator- + ( + tmat2x4 const & m1, + tmat2x4 const & m2 + ) + { + return tmat2x4( + m1[0] - m2[0], + m1[1] - m2[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x4 operator* + ( + tmat2x4 const & m, + typename tmat2x4::value_type const & s + ) + { + return tmat2x4( + m[0] * s, + m[1] * s); + } + + template + GLM_FUNC_QUALIFIER tmat2x4 operator* + ( + typename tmat2x4::value_type const & s, + tmat2x4 const & m + ) + { + return tmat2x4( + m[0] * s, + m[1] * s); + } + + template + GLM_FUNC_QUALIFIER typename tmat2x4::col_type operator* + ( + tmat2x4 const & m, + typename tmat2x4::row_type const & v + ) + { + return typename tmat2x4::col_type( + m[0][0] * v.x + m[1][0] * v.y, + m[0][1] * v.x + m[1][1] * v.y, + m[0][2] * v.x + m[1][2] * v.y, + m[0][3] * v.x + m[1][3] * v.y); + } + + template + GLM_FUNC_QUALIFIER typename tmat2x4::row_type operator* + ( + typename tmat2x4::col_type const & v, + tmat2x4 const & m + ) + { + return typename tmat2x4::row_type( + v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2] + v.w * m[0][3], + v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2] + v.w * m[1][3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator* + ( + tmat2x4 const & m1, + tmat4x2 const & m2 + ) + { + typename tmat2x4::value_type SrcA00 = m1[0][0]; + typename tmat2x4::value_type SrcA01 = m1[0][1]; + typename tmat2x4::value_type SrcA02 = m1[0][2]; + typename tmat2x4::value_type SrcA03 = m1[0][3]; + typename tmat2x4::value_type SrcA10 = m1[1][0]; + typename tmat2x4::value_type SrcA11 = m1[1][1]; + typename tmat2x4::value_type SrcA12 = m1[1][2]; + typename tmat2x4::value_type SrcA13 = m1[1][3]; + + typename tmat2x4::value_type SrcB00 = m2[0][0]; + typename tmat2x4::value_type SrcB01 = m2[0][1]; + typename tmat2x4::value_type SrcB10 = m2[1][0]; + typename tmat2x4::value_type SrcB11 = m2[1][1]; + typename tmat2x4::value_type SrcB20 = m2[2][0]; + typename tmat2x4::value_type SrcB21 = m2[2][1]; + typename tmat2x4::value_type SrcB30 = m2[3][0]; + typename tmat2x4::value_type SrcB31 = m2[3][1]; + + tmat4x4 Result(tmat4x4::null); + Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01; + Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01; + Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01; + Result[0][3] = SrcA03 * SrcB00 + SrcA13 * SrcB01; + Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11; + Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11; + Result[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11; + Result[1][3] = SrcA03 * SrcB10 + SrcA13 * SrcB11; + Result[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21; + Result[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21; + Result[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21; + Result[2][3] = SrcA03 * SrcB20 + SrcA13 * SrcB21; + Result[3][0] = SrcA00 * SrcB30 + SrcA10 * SrcB31; + Result[3][1] = SrcA01 * SrcB30 + SrcA11 * SrcB31; + Result[3][2] = SrcA02 * SrcB30 + SrcA12 * SrcB31; + Result[3][3] = SrcA03 * SrcB30 + SrcA13 * SrcB31; + return Result; + } + + template + GLM_FUNC_QUALIFIER tmat2x4 operator* + ( + tmat2x4 const & m1, + tmat2x2 const & m2 + ) + { + return tmat2x4( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1], + m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1], + m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1]); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 operator* + ( + tmat2x4 const & m1, + tmat3x2 const & m2 + ) + { + return tmat3x4( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1], + m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1], + m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1], + m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1], + m1[0][3] * m2[2][0] + m1[1][3] * m2[2][1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x4 operator/ + ( + tmat2x4 const & m, + typename tmat2x4::value_type const & s + ) + { + return tmat2x4( + m[0] / s, + m[1] / s); + } + + template + GLM_FUNC_QUALIFIER tmat2x4 operator/ + ( + typename tmat2x4::value_type const & s, + tmat2x4 const & m + ) + { + return tmat2x4( + s / m[0], + s / m[1]); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tmat2x4 const operator- + ( + tmat2x4 const & m + ) + { + return tmat2x4( + -m[0], + -m[1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x4 const operator++ + ( + tmat2x4 const & m, + int + ) + { + return tmat2x4( + m[0] + typename tmat2x4::value_type(1), + m[1] + typename tmat2x4::value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat2x4 const operator-- + ( + tmat2x4 const & m, + int + ) + { + return tmat2x4( + m[0] - typename tmat2x4::value_type(1), + m[1] - typename tmat2x4::value_type(1)); + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tmat2x4 const & m1, + tmat2x4 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tmat2x4 const & m1, + tmat2x4 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]); + } +} //namespace detail +} //namespace glm diff --git a/include/gal/opengl/glm/core/type_mat3x2.hpp b/include/gal/opengl/glm/core/type_mat3x2.hpp index d96b104e51..ad985b8ecc 100644 --- a/include/gal/opengl/glm/core/type_mat3x2.hpp +++ b/include/gal/opengl/glm/core/type_mat3x2.hpp @@ -1,265 +1,265 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_mat3x2.hpp -/// @date 2006-08-05 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_type_mat3x2 -#define glm_core_type_mat3x2 - -#include "type_mat.hpp" - -namespace glm{ -namespace detail -{ - template struct tvec1; - template struct tvec2; - template struct tvec3; - template struct tvec4; - template struct tmat2x2; - template struct tmat2x3; - template struct tmat2x4; - template struct tmat3x2; - template struct tmat3x3; - template struct tmat3x4; - template struct tmat4x2; - template struct tmat4x3; - template struct tmat4x4; - - template - struct tmat3x2 - { - enum ctor{null}; - typedef T value_type; - typedef std::size_t size_type; - typedef tvec2 col_type; - typedef tvec3 row_type; - typedef tmat3x2 type; - typedef tmat2x3 transpose_type; - - static GLM_FUNC_DECL size_type col_size(); - static GLM_FUNC_DECL size_type row_size(); - - GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; - - private: - // Data - col_type value[3]; - - public: - // Constructors - GLM_FUNC_DECL tmat3x2(); - GLM_FUNC_DECL tmat3x2(tmat3x2 const & m); - - GLM_FUNC_DECL explicit tmat3x2( - ctor); - GLM_FUNC_DECL explicit tmat3x2( - value_type const & s); - GLM_FUNC_DECL explicit tmat3x2( - value_type const & x0, value_type const & y0, - value_type const & x1, value_type const & y1, - value_type const & x2, value_type const & y2); - GLM_FUNC_DECL explicit tmat3x2( - col_type const & v0, - col_type const & v1, - col_type const & v2); - - ////////////////////////////////////// - // Conversions - template - GLM_FUNC_DECL explicit tmat3x2( - U const & x); - - template - < - typename X1, typename Y1, - typename X2, typename Y2, - typename X3, typename Y3 - > - GLM_FUNC_DECL explicit tmat3x2( - X1 const & x1, Y1 const & y1, - X2 const & x2, Y2 const & y2, - X3 const & x3, Y3 const & y3); - - template - GLM_FUNC_DECL explicit tmat3x2( - tvec2 const & v1, - tvec2 const & v2, - tvec2 const & v3); - - // Matrix conversions - template - GLM_FUNC_DECL explicit tmat3x2(tmat3x2 const & m); - - GLM_FUNC_DECL explicit tmat3x2(tmat2x2 const & x); - GLM_FUNC_DECL explicit tmat3x2(tmat3x3 const & x); - GLM_FUNC_DECL explicit tmat3x2(tmat4x4 const & x); - GLM_FUNC_DECL explicit tmat3x2(tmat2x3 const & x); - GLM_FUNC_DECL explicit tmat3x2(tmat2x4 const & x); - GLM_FUNC_DECL explicit tmat3x2(tmat3x4 const & x); - GLM_FUNC_DECL explicit tmat3x2(tmat4x2 const & x); - GLM_FUNC_DECL explicit tmat3x2(tmat4x3 const & x); - - // Accesses - GLM_FUNC_DECL col_type & operator[](size_type i); - GLM_FUNC_DECL col_type const & operator[](size_type i) const; - - // Unary updatable operators - GLM_FUNC_DECL tmat3x2 & operator= (tmat3x2 const & m); - template - GLM_FUNC_DECL tmat3x2 & operator= (tmat3x2 const & m); - template - GLM_FUNC_DECL tmat3x2 & operator+= (U const & s); - template - GLM_FUNC_DECL tmat3x2 & operator+= (tmat3x2 const & m); - template - GLM_FUNC_DECL tmat3x2 & operator-= (U const & s); - template - GLM_FUNC_DECL tmat3x2 & operator-= (tmat3x2 const & m); - template - GLM_FUNC_DECL tmat3x2 & operator*= (U const & s); - template - GLM_FUNC_DECL tmat3x2 & operator*= (tmat3x2 const & m); - template - GLM_FUNC_DECL tmat3x2 & operator/= (U const & s); - - GLM_FUNC_DECL tmat3x2 & operator++ (); - GLM_FUNC_DECL tmat3x2 & operator-- (); - }; - - // Binary operators - template - tmat3x2 operator+ ( - tmat3x2 const & m, - typename tmat3x2::value_type const & s); - - template - tmat3x2 operator+ ( - tmat3x2 const & m1, - tmat3x2 const & m2); - - template - tmat3x2 operator- ( - tmat3x2 const & m, - typename tmat3x2::value_type const & s); - - template - tmat3x2 operator- ( - tmat3x2 const & m1, - tmat3x2 const & m2); - - template - tmat3x2 operator* ( - tmat3x2 const & m, - typename tmat3x2::value_type const & s); - - template - tmat3x2 operator* ( - typename tmat3x2::value_type const & s, - tmat3x2 const & m); - - template - typename tmat3x2::col_type operator* ( - tmat3x2 const & m, - typename tmat3x2::row_type const & v); - - template - typename tmat3x2::row_type operator* ( - typename tmat3x2::col_type const & v, - tmat3x2 const & m); - - template - tmat2x2 operator* ( - tmat3x2 const & m1, - tmat2x3 const & m2); - - template - tmat3x2 operator* ( - tmat3x2 const & m1, - tmat3x3 const & m2); - - template - tmat4x2 operator* ( - tmat3x2 const & m1, - tmat4x3 const & m2); - - template - tmat3x2 operator/ ( - tmat3x2 const & m, - typename tmat3x2::value_type const & s); - - template - tmat3x2 operator/ ( - typename tmat3x2::value_type const & s, - tmat3x2 const & m); - - // Unary constant operators - template - tmat3x2 const operator- ( - tmat3x2 const & m); - - template - tmat3x2 const operator-- ( - tmat3x2 const & m, - int); - - template - tmat3x2 const operator++ ( - tmat3x2 const & m, - int); -} //namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 3 columns of 2 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x2 lowp_mat3x2; - - /// 3 columns of 2 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x2 mediump_mat3x2; - - /// 3 columns of 2 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x2 highp_mat3x2; - - /// @} -}//namespace glm - -#ifndef GLM_EXTERNAL_TEMPLATE -#include "type_mat3x2.inl" -#endif - -#endif //glm_core_type_mat3x2 +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat3x2.hpp +/// @date 2006-08-05 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_mat3x2 +#define glm_core_type_mat3x2 + +#include "type_mat.hpp" + +namespace glm{ +namespace detail +{ + template struct tvec1; + template struct tvec2; + template struct tvec3; + template struct tvec4; + template struct tmat2x2; + template struct tmat2x3; + template struct tmat2x4; + template struct tmat3x2; + template struct tmat3x3; + template struct tmat3x4; + template struct tmat4x2; + template struct tmat4x3; + template struct tmat4x4; + + template + struct tmat3x2 + { + enum ctor{null}; + typedef T value_type; + typedef std::size_t size_type; + typedef tvec2 col_type; + typedef tvec3 row_type; + typedef tmat3x2 type; + typedef tmat2x3 transpose_type; + + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + private: + // Data + col_type value[3]; + + public: + // Constructors + GLM_FUNC_DECL tmat3x2(); + GLM_FUNC_DECL tmat3x2(tmat3x2 const & m); + + GLM_FUNC_DECL explicit tmat3x2( + ctor); + GLM_FUNC_DECL explicit tmat3x2( + value_type const & s); + GLM_FUNC_DECL explicit tmat3x2( + value_type const & x0, value_type const & y0, + value_type const & x1, value_type const & y1, + value_type const & x2, value_type const & y2); + GLM_FUNC_DECL explicit tmat3x2( + col_type const & v0, + col_type const & v1, + col_type const & v2); + + ////////////////////////////////////// + // Conversions + template + GLM_FUNC_DECL explicit tmat3x2( + U const & x); + + template + < + typename X1, typename Y1, + typename X2, typename Y2, + typename X3, typename Y3 + > + GLM_FUNC_DECL explicit tmat3x2( + X1 const & x1, Y1 const & y1, + X2 const & x2, Y2 const & y2, + X3 const & x3, Y3 const & y3); + + template + GLM_FUNC_DECL explicit tmat3x2( + tvec2 const & v1, + tvec2 const & v2, + tvec2 const & v3); + + // Matrix conversions + template + GLM_FUNC_DECL explicit tmat3x2(tmat3x2 const & m); + + GLM_FUNC_DECL explicit tmat3x2(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat3x2(tmat4x3 const & x); + + // Accesses + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; + + // Unary updatable operators + GLM_FUNC_DECL tmat3x2 & operator= (tmat3x2 const & m); + template + GLM_FUNC_DECL tmat3x2 & operator= (tmat3x2 const & m); + template + GLM_FUNC_DECL tmat3x2 & operator+= (U const & s); + template + GLM_FUNC_DECL tmat3x2 & operator+= (tmat3x2 const & m); + template + GLM_FUNC_DECL tmat3x2 & operator-= (U const & s); + template + GLM_FUNC_DECL tmat3x2 & operator-= (tmat3x2 const & m); + template + GLM_FUNC_DECL tmat3x2 & operator*= (U const & s); + template + GLM_FUNC_DECL tmat3x2 & operator*= (tmat3x2 const & m); + template + GLM_FUNC_DECL tmat3x2 & operator/= (U const & s); + + GLM_FUNC_DECL tmat3x2 & operator++ (); + GLM_FUNC_DECL tmat3x2 & operator-- (); + }; + + // Binary operators + template + tmat3x2 operator+ ( + tmat3x2 const & m, + typename tmat3x2::value_type const & s); + + template + tmat3x2 operator+ ( + tmat3x2 const & m1, + tmat3x2 const & m2); + + template + tmat3x2 operator- ( + tmat3x2 const & m, + typename tmat3x2::value_type const & s); + + template + tmat3x2 operator- ( + tmat3x2 const & m1, + tmat3x2 const & m2); + + template + tmat3x2 operator* ( + tmat3x2 const & m, + typename tmat3x2::value_type const & s); + + template + tmat3x2 operator* ( + typename tmat3x2::value_type const & s, + tmat3x2 const & m); + + template + typename tmat3x2::col_type operator* ( + tmat3x2 const & m, + typename tmat3x2::row_type const & v); + + template + typename tmat3x2::row_type operator* ( + typename tmat3x2::col_type const & v, + tmat3x2 const & m); + + template + tmat2x2 operator* ( + tmat3x2 const & m1, + tmat2x3 const & m2); + + template + tmat3x2 operator* ( + tmat3x2 const & m1, + tmat3x3 const & m2); + + template + tmat4x2 operator* ( + tmat3x2 const & m1, + tmat4x3 const & m2); + + template + tmat3x2 operator/ ( + tmat3x2 const & m, + typename tmat3x2::value_type const & s); + + template + tmat3x2 operator/ ( + typename tmat3x2::value_type const & s, + tmat3x2 const & m); + + // Unary constant operators + template + tmat3x2 const operator- ( + tmat3x2 const & m); + + template + tmat3x2 const operator-- ( + tmat3x2 const & m, + int); + + template + tmat3x2 const operator++ ( + tmat3x2 const & m, + int); +} //namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 3 columns of 2 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x2 lowp_mat3x2; + + /// 3 columns of 2 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x2 mediump_mat3x2; + + /// 3 columns of 2 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x2 highp_mat3x2; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_mat3x2.inl" +#endif + +#endif //glm_core_type_mat3x2 diff --git a/include/gal/opengl/glm/core/type_mat3x2.inl b/include/gal/opengl/glm/core/type_mat3x2.inl index 6366d49633..36136217c4 100644 --- a/include/gal/opengl/glm/core/type_mat3x2.inl +++ b/include/gal/opengl/glm/core/type_mat3x2.inl @@ -1,682 +1,682 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_mat3x2.inl -/// @date 2006-08-05 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm{ -namespace detail -{ - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x2::size_type tmat3x2::length() const - { - return 3; - } - - template - GLM_FUNC_QUALIFIER typename tmat3x2::size_type tmat3x2::col_size() - { - return 2; - } - - template - GLM_FUNC_QUALIFIER typename tmat3x2::size_type tmat3x2::row_size() - { - return 3; - } - - ////////////////////////////////////// - // Accesses - - template - GLM_FUNC_QUALIFIER typename tmat3x2::col_type & - tmat3x2::operator[] - ( - size_type i - ) - { - assert(i < this->length()); - return this->value[i]; - } - - template - GLM_FUNC_QUALIFIER typename tmat3x2::col_type const & - tmat3x2::operator[] - ( - size_type i - ) const - { - assert(i < this->length()); - return this->value[i]; - } - - ////////////////////////////////////////////////////////////// - // Constructors - - template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2() - { - this->value[0] = col_type(1, 0); - this->value[1] = col_type(0, 1); - this->value[2] = col_type(0, 0); - } - - template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - tmat3x2 const & m - ) - { - this->value[0] = m.value[0]; - this->value[1] = m.value[1]; - this->value[2] = m.value[2]; - } - - template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - ctor - ) - {} - - template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - value_type const & s - ) - { - this->value[0] = col_type(s, 0); - this->value[1] = col_type(0, s); - this->value[2] = col_type(0, 0); - } - - template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - value_type const & x0, value_type const & y0, - value_type const & x1, value_type const & y1, - value_type const & x2, value_type const & y2 - ) - { - this->value[0] = col_type(x0, y0); - this->value[1] = col_type(x1, y1); - this->value[2] = col_type(x2, y2); - } - - template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - col_type const & v0, - col_type const & v1, - col_type const & v2 - ) - { - this->value[0] = v0; - this->value[1] = v1; - this->value[2] = v2; - } - - ////////////////////////////////////// - // Convertion constructors - template - template - GLM_FUNC_DECL tmat3x2::tmat3x2 - ( - U const & s - ) - { - value_type const Zero(0); - this->value[0] = tvec2(value_type(s), Zero); - this->value[1] = tvec2(Zero, value_type(s)); - this->value[2] = tvec2(Zero); - } - - template - template < - typename X1, typename Y1, - typename X2, typename Y2, - typename X3, typename Y3> - GLM_FUNC_DECL tmat3x2::tmat3x2 - ( - X1 const & x1, Y1 const & y1, - X2 const & x2, Y2 const & y2, - X3 const & x3, Y3 const & y3 - ) - { - this->value[0] = col_type(value_type(x1), value_type(y1)); - this->value[1] = col_type(value_type(x2), value_type(y2)); - this->value[2] = col_type(value_type(x3), value_type(y3)); - } - - template - template - GLM_FUNC_DECL tmat3x2::tmat3x2 - ( - tvec2 const & v1, - tvec2 const & v2, - tvec2 const & v3 - ) - { - this->value[0] = col_type(v1); - this->value[1] = col_type(v2); - this->value[2] = col_type(v3); - } - - ////////////////////////////////////////////////////////////// - // mat3x2 matrix conversions - - template - template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - tmat3x2 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(m[2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - tmat2x2 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = col_type(T(0)); - } - - template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - tmat3x3 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(m[2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - tmat4x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(m[2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - tmat2x3 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(T(0)); - } - - template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - tmat2x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(T(0)); - } - - template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - tmat3x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(m[2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - tmat4x2 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = m[2]; - } - - template - GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 - ( - tmat4x3 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(m[2]); - } - - ////////////////////////////////////////////////////////////// - // Unary updatable operators - - template - GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator= - ( - tmat3x2 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = m[2]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator= - ( - tmat3x2 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = m[2]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator+= - ( - U const & s - ) - { - this->value[0] += s; - this->value[1] += s; - this->value[2] += s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator+= - ( - tmat3x2 const & m - ) - { - this->value[0] += m[0]; - this->value[1] += m[1]; - this->value[2] += m[2]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator-= - ( - U const & s - ) - { - this->value[0] -= s; - this->value[1] -= s; - this->value[2] -= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator-= - ( - tmat3x2 const & m - ) - { - this->value[0] -= m[0]; - this->value[1] -= m[1]; - this->value[2] -= m[2]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator*= - ( - U const & s - ) - { - this->value[0] *= s; - this->value[1] *= s; - this->value[2] *= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator*= - ( - tmat3x2 const & m - ) - { - return (*this = tmat3x2(*this * m)); - } - - template - template - GLM_FUNC_QUALIFIER tmat3x2 & tmat3x2::operator/= - ( - U const & s - ) - { - this->value[0] /= s; - this->value[1] /= s; - this->value[2] /= s; - return *this; - } - - template - GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator++ () - { - ++this->value[0]; - ++this->value[1]; - ++this->value[2]; - return *this; - } - - template - GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator-- () - { - --this->value[0]; - --this->value[1]; - --this->value[2]; - return *this; - } - - ////////////////////////////////////////////////////////////// - // Binary operators - - template - GLM_FUNC_QUALIFIER tmat3x2 operator+ - ( - tmat3x2 const & m, - typename tmat3x2::value_type const & s - ) - { - return tmat3x2( - m[0] + s, - m[1] + s, - m[2] + s); - } - - template - GLM_FUNC_QUALIFIER tmat3x2 operator+ - ( - tmat3x2 const & m1, - tmat3x2 const & m2 - ) - { - return tmat3x2( - m1[0] + m2[0], - m1[1] + m2[1], - m1[2] + m2[2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x2 operator- - ( - tmat3x2 const & m, - typename tmat3x2::value_type const & s - ) - { - return tmat3x2( - m[0] - s, - m[1] - s, - m[2] - s); - } - - template - GLM_FUNC_QUALIFIER tmat3x2 operator- - ( - tmat3x2 const & m1, - tmat3x2 const & m2 - ) - { - return tmat3x2( - m1[0] - m2[0], - m1[1] - m2[1], - m1[2] - m2[2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x2 operator* - ( - tmat3x2 const & m, - typename tmat3x2::value_type const & s - ) - { - return tmat3x2( - m[0] * s, - m[1] * s, - m[2] * s); - } - - template - GLM_FUNC_QUALIFIER tmat3x2 operator* - ( - typename tmat3x2::value_type const & s, - tmat3x2 const & m - ) - { - return tmat3x2( - m[0] * s, - m[1] * s, - m[2] * s); - } - - template - GLM_FUNC_QUALIFIER typename tmat3x2::col_type operator* - ( - tmat3x2 const & m, - typename tmat3x2::row_type const & v) - { - return typename tmat3x2::col_type( - m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z, - m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z); - } - - template - GLM_FUNC_QUALIFIER typename tmat3x2::row_type operator* - ( - typename tmat3x2::col_type const & v, - tmat3x2 const & m) - { - return typename tmat3x2::row_type( - v.x * m[0][0] + v.y * m[0][1], - v.x * m[1][0] + v.y * m[1][1], - v.x * m[2][0] + v.y * m[2][1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x2 operator* - ( - tmat3x2 const & m1, - tmat2x3 const & m2 - ) - { - const T SrcA00 = m1[0][0]; - const T SrcA01 = m1[0][1]; - const T SrcA10 = m1[1][0]; - const T SrcA11 = m1[1][1]; - const T SrcA20 = m1[2][0]; - const T SrcA21 = m1[2][1]; - - const T SrcB00 = m2[0][0]; - const T SrcB01 = m2[0][1]; - const T SrcB02 = m2[0][2]; - const T SrcB10 = m2[1][0]; - const T SrcB11 = m2[1][1]; - const T SrcB12 = m2[1][2]; - - tmat2x2 Result(tmat2x2::null); - Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02; - Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02; - Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12; - Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12; - return Result; - } - - template - GLM_FUNC_QUALIFIER tmat3x2 operator* - ( - tmat3x2 const & m1, - tmat3x3 const & m2 - ) - { - return tmat3x2( - m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], - m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2], - m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2], - m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2], - m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2], - m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2]); - } - - template - GLM_FUNC_QUALIFIER tmat4x2 operator* - ( - tmat3x2 const & m1, - tmat4x3 const & m2 - ) - { - return tmat4x2( - m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], - m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2], - m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2], - m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2], - m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2], - m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2], - m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2], - m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x2 operator/ - ( - tmat3x2 const & m, - typename tmat3x2::value_type const & s - ) - { - return tmat3x2( - m[0] / s, - m[1] / s, - m[2] / s); - } - - template - GLM_FUNC_QUALIFIER tmat3x2 operator/ - ( - typename tmat3x2::value_type const & s, - tmat3x2 const & m - ) - { - return tmat3x2( - s / m[0], - s / m[1], - s / m[2]); - } - - // Unary constant operators - template - GLM_FUNC_QUALIFIER tmat3x2 const operator- - ( - tmat3x2 const & m - ) - { - return tmat3x2( - -m[0], - -m[1], - -m[2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x2 const operator++ - ( - tmat3x2 const & m, - int - ) - { - typename tmat3x2::value_type One(1); - return tmat3x2( - m[0] + One, - m[1] + One, - m[2] + One); - } - - template - GLM_FUNC_QUALIFIER tmat3x2 const operator-- - ( - tmat3x2 const & m, - int - ) - { - typename tmat3x2::value_type One(1); - return tmat3x2( - m[0] - One, - m[1] - One, - m[2] - One); - } - - ////////////////////////////////////// - // Boolean operators - - template - GLM_FUNC_QUALIFIER bool operator== - ( - tmat3x2 const & m1, - tmat3x2 const & m2 - ) - { - return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]); - } - - template - GLM_FUNC_QUALIFIER bool operator!= - ( - tmat3x2 const & m1, - tmat3x2 const & m2 - ) - { - return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]); - } - -} //namespace detail -} //namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat3x2.inl +/// @date 2006-08-05 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x2::size_type tmat3x2::length() const + { + return 3; + } + + template + GLM_FUNC_QUALIFIER typename tmat3x2::size_type tmat3x2::col_size() + { + return 2; + } + + template + GLM_FUNC_QUALIFIER typename tmat3x2::size_type tmat3x2::row_size() + { + return 3; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tmat3x2::col_type & + tmat3x2::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return this->value[i]; + } + + template + GLM_FUNC_QUALIFIER typename tmat3x2::col_type const & + tmat3x2::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return this->value[i]; + } + + ////////////////////////////////////////////////////////////// + // Constructors + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2() + { + this->value[0] = col_type(1, 0); + this->value[1] = col_type(0, 1); + this->value[2] = col_type(0, 0); + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + tmat3x2 const & m + ) + { + this->value[0] = m.value[0]; + this->value[1] = m.value[1]; + this->value[2] = m.value[2]; + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + value_type const & s + ) + { + this->value[0] = col_type(s, 0); + this->value[1] = col_type(0, s); + this->value[2] = col_type(0, 0); + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + value_type const & x0, value_type const & y0, + value_type const & x1, value_type const & y1, + value_type const & x2, value_type const & y2 + ) + { + this->value[0] = col_type(x0, y0); + this->value[1] = col_type(x1, y1); + this->value[2] = col_type(x2, y2); + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + col_type const & v0, + col_type const & v1, + col_type const & v2 + ) + { + this->value[0] = v0; + this->value[1] = v1; + this->value[2] = v2; + } + + ////////////////////////////////////// + // Convertion constructors + template + template + GLM_FUNC_DECL tmat3x2::tmat3x2 + ( + U const & s + ) + { + value_type const Zero(0); + this->value[0] = tvec2(value_type(s), Zero); + this->value[1] = tvec2(Zero, value_type(s)); + this->value[2] = tvec2(Zero); + } + + template + template < + typename X1, typename Y1, + typename X2, typename Y2, + typename X3, typename Y3> + GLM_FUNC_DECL tmat3x2::tmat3x2 + ( + X1 const & x1, Y1 const & y1, + X2 const & x2, Y2 const & y2, + X3 const & x3, Y3 const & y3 + ) + { + this->value[0] = col_type(value_type(x1), value_type(y1)); + this->value[1] = col_type(value_type(x2), value_type(y2)); + this->value[2] = col_type(value_type(x3), value_type(y3)); + } + + template + template + GLM_FUNC_DECL tmat3x2::tmat3x2 + ( + tvec2 const & v1, + tvec2 const & v2, + tvec2 const & v3 + ) + { + this->value[0] = col_type(v1); + this->value[1] = col_type(v2); + this->value[2] = col_type(v3); + } + + ////////////////////////////////////////////////////////////// + // mat3x2 matrix conversions + + template + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + tmat3x2 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + tmat2x2 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = col_type(T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + tmat3x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + tmat4x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + tmat2x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + tmat2x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + tmat3x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + tmat4x2 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + } + + template + GLM_FUNC_QUALIFIER tmat3x2::tmat3x2 + ( + tmat4x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + } + + ////////////////////////////////////////////////////////////// + // Unary updatable operators + + template + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator= + ( + tmat3x2 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator= + ( + tmat3x2 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator+= + ( + U const & s + ) + { + this->value[0] += s; + this->value[1] += s; + this->value[2] += s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator+= + ( + tmat3x2 const & m + ) + { + this->value[0] += m[0]; + this->value[1] += m[1]; + this->value[2] += m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator-= + ( + U const & s + ) + { + this->value[0] -= s; + this->value[1] -= s; + this->value[2] -= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator-= + ( + tmat3x2 const & m + ) + { + this->value[0] -= m[0]; + this->value[1] -= m[1]; + this->value[2] -= m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator*= + ( + U const & s + ) + { + this->value[0] *= s; + this->value[1] *= s; + this->value[2] *= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator*= + ( + tmat3x2 const & m + ) + { + return (*this = tmat3x2(*this * m)); + } + + template + template + GLM_FUNC_QUALIFIER tmat3x2 & tmat3x2::operator/= + ( + U const & s + ) + { + this->value[0] /= s; + this->value[1] /= s; + this->value[2] /= s; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator++ () + { + ++this->value[0]; + ++this->value[1]; + ++this->value[2]; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat3x2& tmat3x2::operator-- () + { + --this->value[0]; + --this->value[1]; + --this->value[2]; + return *this; + } + + ////////////////////////////////////////////////////////////// + // Binary operators + + template + GLM_FUNC_QUALIFIER tmat3x2 operator+ + ( + tmat3x2 const & m, + typename tmat3x2::value_type const & s + ) + { + return tmat3x2( + m[0] + s, + m[1] + s, + m[2] + s); + } + + template + GLM_FUNC_QUALIFIER tmat3x2 operator+ + ( + tmat3x2 const & m1, + tmat3x2 const & m2 + ) + { + return tmat3x2( + m1[0] + m2[0], + m1[1] + m2[1], + m1[2] + m2[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x2 operator- + ( + tmat3x2 const & m, + typename tmat3x2::value_type const & s + ) + { + return tmat3x2( + m[0] - s, + m[1] - s, + m[2] - s); + } + + template + GLM_FUNC_QUALIFIER tmat3x2 operator- + ( + tmat3x2 const & m1, + tmat3x2 const & m2 + ) + { + return tmat3x2( + m1[0] - m2[0], + m1[1] - m2[1], + m1[2] - m2[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x2 operator* + ( + tmat3x2 const & m, + typename tmat3x2::value_type const & s + ) + { + return tmat3x2( + m[0] * s, + m[1] * s, + m[2] * s); + } + + template + GLM_FUNC_QUALIFIER tmat3x2 operator* + ( + typename tmat3x2::value_type const & s, + tmat3x2 const & m + ) + { + return tmat3x2( + m[0] * s, + m[1] * s, + m[2] * s); + } + + template + GLM_FUNC_QUALIFIER typename tmat3x2::col_type operator* + ( + tmat3x2 const & m, + typename tmat3x2::row_type const & v) + { + return typename tmat3x2::col_type( + m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z, + m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z); + } + + template + GLM_FUNC_QUALIFIER typename tmat3x2::row_type operator* + ( + typename tmat3x2::col_type const & v, + tmat3x2 const & m) + { + return typename tmat3x2::row_type( + v.x * m[0][0] + v.y * m[0][1], + v.x * m[1][0] + v.y * m[1][1], + v.x * m[2][0] + v.y * m[2][1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator* + ( + tmat3x2 const & m1, + tmat2x3 const & m2 + ) + { + const T SrcA00 = m1[0][0]; + const T SrcA01 = m1[0][1]; + const T SrcA10 = m1[1][0]; + const T SrcA11 = m1[1][1]; + const T SrcA20 = m1[2][0]; + const T SrcA21 = m1[2][1]; + + const T SrcB00 = m2[0][0]; + const T SrcB01 = m2[0][1]; + const T SrcB02 = m2[0][2]; + const T SrcB10 = m2[1][0]; + const T SrcB11 = m2[1][1]; + const T SrcB12 = m2[1][2]; + + tmat2x2 Result(tmat2x2::null); + Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02; + Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02; + Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12; + Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12; + return Result; + } + + template + GLM_FUNC_QUALIFIER tmat3x2 operator* + ( + tmat3x2 const & m1, + tmat3x3 const & m2 + ) + { + return tmat3x2( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2]); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 operator* + ( + tmat3x2 const & m1, + tmat4x3 const & m2 + ) + { + return tmat4x2( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2], + m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2], + m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x2 operator/ + ( + tmat3x2 const & m, + typename tmat3x2::value_type const & s + ) + { + return tmat3x2( + m[0] / s, + m[1] / s, + m[2] / s); + } + + template + GLM_FUNC_QUALIFIER tmat3x2 operator/ + ( + typename tmat3x2::value_type const & s, + tmat3x2 const & m + ) + { + return tmat3x2( + s / m[0], + s / m[1], + s / m[2]); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tmat3x2 const operator- + ( + tmat3x2 const & m + ) + { + return tmat3x2( + -m[0], + -m[1], + -m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x2 const operator++ + ( + tmat3x2 const & m, + int + ) + { + typename tmat3x2::value_type One(1); + return tmat3x2( + m[0] + One, + m[1] + One, + m[2] + One); + } + + template + GLM_FUNC_QUALIFIER tmat3x2 const operator-- + ( + tmat3x2 const & m, + int + ) + { + typename tmat3x2::value_type One(1); + return tmat3x2( + m[0] - One, + m[1] - One, + m[2] - One); + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tmat3x2 const & m1, + tmat3x2 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tmat3x2 const & m1, + tmat3x2 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]); + } + +} //namespace detail +} //namespace glm diff --git a/include/gal/opengl/glm/core/type_mat3x3.hpp b/include/gal/opengl/glm/core/type_mat3x3.hpp index 2df7e8fcd9..f2cdb07bd4 100644 --- a/include/gal/opengl/glm/core/type_mat3x3.hpp +++ b/include/gal/opengl/glm/core/type_mat3x3.hpp @@ -1,318 +1,318 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_mat3x3.hpp -/// @date 2005-01-27 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_type_mat3x3 -#define glm_core_type_mat3x3 - -#include "type_mat.hpp" - -namespace glm{ -namespace detail -{ - template struct tvec1; - template struct tvec2; - template struct tvec3; - template struct tvec4; - template struct tmat2x2; - template struct tmat2x3; - template struct tmat2x4; - template struct tmat3x2; - template struct tmat3x3; - template struct tmat3x4; - template struct tmat4x2; - template struct tmat4x3; - template struct tmat4x4; - - template - struct tmat3x3 - { - enum ctor{null}; - typedef T value_type; - typedef std::size_t size_type; - typedef tvec3 col_type; - typedef tvec3 row_type; - typedef tmat3x3 type; - typedef tmat3x3 transpose_type; - - static GLM_FUNC_DECL size_type col_size(); - static GLM_FUNC_DECL size_type row_size(); - - GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; - - public: - /// Implementation detail - /// @cond DETAIL - GLM_FUNC_DECL tmat3x3 _inverse() const; - /// @endcond - - private: - // Data - col_type value[3]; - - public: - // Constructors - GLM_FUNC_DECL tmat3x3(); - GLM_FUNC_DECL tmat3x3(tmat3x3 const & m); - - GLM_FUNC_DECL explicit tmat3x3( - ctor Null); - GLM_FUNC_DECL explicit tmat3x3( - value_type const & s); - GLM_FUNC_DECL explicit tmat3x3( - value_type const & x0, value_type const & y0, value_type const & z0, - value_type const & x1, value_type const & y1, value_type const & z1, - value_type const & x2, value_type const & y2, value_type const & z2); - GLM_FUNC_DECL explicit tmat3x3( - col_type const & v0, - col_type const & v1, - col_type const & v2); - - ////////////////////////////////////// - // Conversions - template - GLM_FUNC_DECL explicit tmat3x3( - U const & x); - - template - < - typename X1, typename Y1, typename Z1, - typename X2, typename Y2, typename Z2, - typename X3, typename Y3, typename Z3 - > - GLM_FUNC_DECL explicit tmat3x3( - X1 const & x1, Y1 const & y1, Z1 const & z1, - X2 const & x2, Y2 const & y2, Z2 const & z2, - X3 const & x3, Y3 const & y3, Z3 const & z3); - - template - GLM_FUNC_DECL explicit tmat3x3( - tvec3 const & v1, - tvec3 const & v2, - tvec3 const & v3); - - // Matrix conversions - template - GLM_FUNC_DECL explicit tmat3x3(tmat3x3 const & m); - - GLM_FUNC_DECL explicit tmat3x3(tmat2x2 const & x); - GLM_FUNC_DECL explicit tmat3x3(tmat4x4 const & x); - GLM_FUNC_DECL explicit tmat3x3(tmat2x3 const & x); - GLM_FUNC_DECL explicit tmat3x3(tmat3x2 const & x); - GLM_FUNC_DECL explicit tmat3x3(tmat2x4 const & x); - GLM_FUNC_DECL explicit tmat3x3(tmat4x2 const & x); - GLM_FUNC_DECL explicit tmat3x3(tmat3x4 const & x); - GLM_FUNC_DECL explicit tmat3x3(tmat4x3 const & x); - - // Accesses - GLM_FUNC_DECL col_type & operator[](size_type i); - GLM_FUNC_DECL col_type const & operator[](size_type i) const; - - // Unary updatable operators - GLM_FUNC_DECL tmat3x3& operator= (tmat3x3 const & m); - template - GLM_FUNC_DECL tmat3x3& operator= (tmat3x3 const & m); - template - GLM_FUNC_DECL tmat3x3& operator+= (U const & s); - template - GLM_FUNC_DECL tmat3x3& operator+= (tmat3x3 const & m); - template - GLM_FUNC_DECL tmat3x3& operator-= (U const & s); - template - GLM_FUNC_DECL tmat3x3& operator-= (tmat3x3 const & m); - template - GLM_FUNC_DECL tmat3x3& operator*= (U const & s); - template - GLM_FUNC_DECL tmat3x3& operator*= (tmat3x3 const & m); - template - GLM_FUNC_DECL tmat3x3& operator/= (U const & s); - template - GLM_FUNC_DECL tmat3x3& operator/= (tmat3x3 const & m); - GLM_FUNC_DECL tmat3x3& operator++ (); - GLM_FUNC_DECL tmat3x3& operator-- (); - }; - - // Binary operators - template - tmat3x3 operator+ ( - tmat3x3 const & m, - typename tmat3x3::value_type const & s); - - template - tmat3x3 operator+ ( - typename tmat3x3::value_type const & s, - tmat3x3 const & m); - - template - tmat3x3 operator+ ( - tmat3x3 const & m1, - tmat3x3 const & m2); - - template - tmat3x3 operator- ( - tmat3x3 const & m, - typename tmat3x3::value_type const & s); - - template - tmat3x3 operator- ( - typename tmat3x3::value_type const & s, - tmat3x3 const & m); - - template - tmat3x3 operator- ( - tmat3x3 const & m1, - tmat3x3 const & m2); - - template - tmat3x3 operator* ( - tmat3x3 const & m, - typename tmat3x3::value_type const & s); - - template - tmat3x3 operator* ( - typename tmat3x3::value_type const & s, - tmat3x3 const & m); - - template - typename tmat3x3::col_type operator* ( - tmat3x3 const & m, - typename tmat3x3::row_type const & v); - - template - typename tmat3x3::row_type operator* ( - typename tmat3x3::col_type const & v, - tmat3x3 const & m); - - template - tmat3x3 operator* ( - tmat3x3 const & m1, - tmat3x3 const & m2); - - template - tmat2x3 operator* ( - tmat3x3 const & m1, - tmat2x3 const & m2); - - template - tmat4x3 operator* ( - tmat3x3 const & m1, - tmat4x3 const & m2); - - template - tmat3x3 operator/ ( - tmat3x3 const & m, - typename tmat3x3::value_type const & s); - - template - tmat3x3 operator/ ( - typename tmat3x3::value_type const & s, - tmat3x3 const & m); - - template - typename tmat3x3::col_type operator/ ( - tmat3x3 const & m, - typename tmat3x3::row_type const & v); - - template - typename tmat3x3::row_type operator/ ( - typename tmat3x3::col_type const & v, - tmat3x3 const & m); - - template - tmat3x3 operator/ ( - tmat3x3 const & m1, - tmat3x3 const & m2); - - // Unary constant operators - template - tmat3x3 const operator- ( - tmat3x3 const & m); - - template - tmat3x3 const operator-- ( - tmat3x3 const & m, - int); - - template - tmat3x3 const operator++ ( - tmat3x3 const & m, - int); -} //namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 3 columns of 3 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x3 lowp_mat3; - - /// 3 columns of 3 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x3 mediump_mat3; - - /// 3 columns of 3 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x3 highp_mat3; - - /// 3 columns of 3 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x3 lowp_mat3x3; - - /// 3 columns of 3 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x3 mediump_mat3x3; - - /// 3 columns of 3 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x3 highp_mat3x3; - - /// @} -}//namespace glm - -#ifndef GLM_EXTERNAL_TEMPLATE -#include "type_mat3x3.inl" -#endif - -#endif //glm_core_type_mat3x3 +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat3x3.hpp +/// @date 2005-01-27 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_mat3x3 +#define glm_core_type_mat3x3 + +#include "type_mat.hpp" + +namespace glm{ +namespace detail +{ + template struct tvec1; + template struct tvec2; + template struct tvec3; + template struct tvec4; + template struct tmat2x2; + template struct tmat2x3; + template struct tmat2x4; + template struct tmat3x2; + template struct tmat3x3; + template struct tmat3x4; + template struct tmat4x2; + template struct tmat4x3; + template struct tmat4x4; + + template + struct tmat3x3 + { + enum ctor{null}; + typedef T value_type; + typedef std::size_t size_type; + typedef tvec3 col_type; + typedef tvec3 row_type; + typedef tmat3x3 type; + typedef tmat3x3 transpose_type; + + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + public: + /// Implementation detail + /// @cond DETAIL + GLM_FUNC_DECL tmat3x3 _inverse() const; + /// @endcond + + private: + // Data + col_type value[3]; + + public: + // Constructors + GLM_FUNC_DECL tmat3x3(); + GLM_FUNC_DECL tmat3x3(tmat3x3 const & m); + + GLM_FUNC_DECL explicit tmat3x3( + ctor Null); + GLM_FUNC_DECL explicit tmat3x3( + value_type const & s); + GLM_FUNC_DECL explicit tmat3x3( + value_type const & x0, value_type const & y0, value_type const & z0, + value_type const & x1, value_type const & y1, value_type const & z1, + value_type const & x2, value_type const & y2, value_type const & z2); + GLM_FUNC_DECL explicit tmat3x3( + col_type const & v0, + col_type const & v1, + col_type const & v2); + + ////////////////////////////////////// + // Conversions + template + GLM_FUNC_DECL explicit tmat3x3( + U const & x); + + template + < + typename X1, typename Y1, typename Z1, + typename X2, typename Y2, typename Z2, + typename X3, typename Y3, typename Z3 + > + GLM_FUNC_DECL explicit tmat3x3( + X1 const & x1, Y1 const & y1, Z1 const & z1, + X2 const & x2, Y2 const & y2, Z2 const & z2, + X3 const & x3, Y3 const & y3, Z3 const & z3); + + template + GLM_FUNC_DECL explicit tmat3x3( + tvec3 const & v1, + tvec3 const & v2, + tvec3 const & v3); + + // Matrix conversions + template + GLM_FUNC_DECL explicit tmat3x3(tmat3x3 const & m); + + GLM_FUNC_DECL explicit tmat3x3(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat3x3(tmat4x3 const & x); + + // Accesses + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; + + // Unary updatable operators + GLM_FUNC_DECL tmat3x3& operator= (tmat3x3 const & m); + template + GLM_FUNC_DECL tmat3x3& operator= (tmat3x3 const & m); + template + GLM_FUNC_DECL tmat3x3& operator+= (U const & s); + template + GLM_FUNC_DECL tmat3x3& operator+= (tmat3x3 const & m); + template + GLM_FUNC_DECL tmat3x3& operator-= (U const & s); + template + GLM_FUNC_DECL tmat3x3& operator-= (tmat3x3 const & m); + template + GLM_FUNC_DECL tmat3x3& operator*= (U const & s); + template + GLM_FUNC_DECL tmat3x3& operator*= (tmat3x3 const & m); + template + GLM_FUNC_DECL tmat3x3& operator/= (U const & s); + template + GLM_FUNC_DECL tmat3x3& operator/= (tmat3x3 const & m); + GLM_FUNC_DECL tmat3x3& operator++ (); + GLM_FUNC_DECL tmat3x3& operator-- (); + }; + + // Binary operators + template + tmat3x3 operator+ ( + tmat3x3 const & m, + typename tmat3x3::value_type const & s); + + template + tmat3x3 operator+ ( + typename tmat3x3::value_type const & s, + tmat3x3 const & m); + + template + tmat3x3 operator+ ( + tmat3x3 const & m1, + tmat3x3 const & m2); + + template + tmat3x3 operator- ( + tmat3x3 const & m, + typename tmat3x3::value_type const & s); + + template + tmat3x3 operator- ( + typename tmat3x3::value_type const & s, + tmat3x3 const & m); + + template + tmat3x3 operator- ( + tmat3x3 const & m1, + tmat3x3 const & m2); + + template + tmat3x3 operator* ( + tmat3x3 const & m, + typename tmat3x3::value_type const & s); + + template + tmat3x3 operator* ( + typename tmat3x3::value_type const & s, + tmat3x3 const & m); + + template + typename tmat3x3::col_type operator* ( + tmat3x3 const & m, + typename tmat3x3::row_type const & v); + + template + typename tmat3x3::row_type operator* ( + typename tmat3x3::col_type const & v, + tmat3x3 const & m); + + template + tmat3x3 operator* ( + tmat3x3 const & m1, + tmat3x3 const & m2); + + template + tmat2x3 operator* ( + tmat3x3 const & m1, + tmat2x3 const & m2); + + template + tmat4x3 operator* ( + tmat3x3 const & m1, + tmat4x3 const & m2); + + template + tmat3x3 operator/ ( + tmat3x3 const & m, + typename tmat3x3::value_type const & s); + + template + tmat3x3 operator/ ( + typename tmat3x3::value_type const & s, + tmat3x3 const & m); + + template + typename tmat3x3::col_type operator/ ( + tmat3x3 const & m, + typename tmat3x3::row_type const & v); + + template + typename tmat3x3::row_type operator/ ( + typename tmat3x3::col_type const & v, + tmat3x3 const & m); + + template + tmat3x3 operator/ ( + tmat3x3 const & m1, + tmat3x3 const & m2); + + // Unary constant operators + template + tmat3x3 const operator- ( + tmat3x3 const & m); + + template + tmat3x3 const operator-- ( + tmat3x3 const & m, + int); + + template + tmat3x3 const operator++ ( + tmat3x3 const & m, + int); +} //namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 3 columns of 3 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x3 lowp_mat3; + + /// 3 columns of 3 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x3 mediump_mat3; + + /// 3 columns of 3 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x3 highp_mat3; + + /// 3 columns of 3 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x3 lowp_mat3x3; + + /// 3 columns of 3 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x3 mediump_mat3x3; + + /// 3 columns of 3 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x3 highp_mat3x3; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_mat3x3.inl" +#endif + +#endif //glm_core_type_mat3x3 diff --git a/include/gal/opengl/glm/core/type_mat3x3.inl b/include/gal/opengl/glm/core/type_mat3x3.inl index 9a62d11f43..f1db54b84d 100644 --- a/include/gal/opengl/glm/core/type_mat3x3.inl +++ b/include/gal/opengl/glm/core/type_mat3x3.inl @@ -1,812 +1,812 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_mat3x3.inl -/// @date 2005-01-27 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm{ -namespace detail -{ - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x3::size_type tmat3x3::length() const - { - return 3; - } - - template - GLM_FUNC_QUALIFIER typename tmat3x3::size_type tmat3x3::col_size() - { - return 3; - } - - template - GLM_FUNC_QUALIFIER typename tmat3x3::size_type tmat3x3::row_size() - { - return 3; - } - - ////////////////////////////////////// - // Accesses - - template - GLM_FUNC_QUALIFIER typename tmat3x3::col_type & - tmat3x3::operator[] - ( - size_type i - ) - { - assert(i < this->length()); - return this->value[i]; - } - - template - GLM_FUNC_QUALIFIER typename tmat3x3::col_type const & - tmat3x3::operator[] - ( - size_type i - ) const - { - assert(i < this->length()); - return this->value[i]; - } - - ////////////////////////////////////////////////////////////// - // Constructors - - template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3() - { - value_type const Zero(0); - value_type const One(1); - this->value[0] = col_type(One, Zero, Zero); - this->value[1] = col_type(Zero, One, Zero); - this->value[2] = col_type(Zero, Zero, One); - } - - template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - tmat3x3 const & m - ) - { - this->value[0] = m.value[0]; - this->value[1] = m.value[1]; - this->value[2] = m.value[2]; - } - - template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - ctor - ) - {} - - template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - value_type const & s - ) - { - value_type const Zero(0); - this->value[0] = col_type(s, Zero, Zero); - this->value[1] = col_type(Zero, s, Zero); - this->value[2] = col_type(Zero, Zero, s); - } - - template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - value_type const & x0, value_type const & y0, value_type const & z0, - value_type const & x1, value_type const & y1, value_type const & z1, - value_type const & x2, value_type const & y2, value_type const & z2 - ) - { - this->value[0] = col_type(x0, y0, z0); - this->value[1] = col_type(x1, y1, z1); - this->value[2] = col_type(x2, y2, z2); - } - - template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - col_type const & v0, - col_type const & v1, - col_type const & v2 - ) - { - this->value[0] = v0; - this->value[1] = v1; - this->value[2] = v2; - } - - ////////////////////////////////////// - // Convertion constructors - template - template - GLM_FUNC_DECL tmat3x3::tmat3x3 - ( - U const & s - ) - { - value_type const Zero(0); - this->value[0] = tvec3(value_type(s), Zero, Zero); - this->value[1] = tvec3(Zero, value_type(s), Zero); - this->value[2] = tvec3(Zero, Zero, value_type(s)); - } - - template - template < - typename X1, typename Y1, typename Z1, - typename X2, typename Y2, typename Z2, - typename X3, typename Y3, typename Z3> - GLM_FUNC_DECL tmat3x3::tmat3x3 - ( - X1 const & x1, Y1 const & y1, Z1 const & z1, - X2 const & x2, Y2 const & y2, Z2 const & z2, - X3 const & x3, Y3 const & y3, Z3 const & z3 - ) - { - this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1)); - this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2)); - this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3)); - } - - template - template - GLM_FUNC_DECL tmat3x3::tmat3x3 - ( - tvec3 const & v1, - tvec3 const & v2, - tvec3 const & v3 - ) - { - this->value[0] = col_type(v1); - this->value[1] = col_type(v2); - this->value[2] = col_type(v3); - } - - ////////////////////////////////////////////////////////////// - // Conversions - - template - template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - tmat3x3 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(m[2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - tmat2x2 const & m - ) - { - this->value[0] = col_type(m[0], value_type(0)); - this->value[1] = col_type(m[1], value_type(0)); - this->value[2] = col_type(detail::tvec2(0), value_type(1)); - } - - template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - tmat4x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(m[2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - tmat2x3 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = col_type(detail::tvec2(0), value_type(1)); - } - - template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - tmat3x2 const & m - ) - { - this->value[0] = col_type(m[0], value_type(0)); - this->value[1] = col_type(m[1], value_type(0)); - this->value[2] = col_type(m[2], value_type(1)); - } - - template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - tmat2x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(detail::tvec2(0), value_type(1)); - } - - template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - tmat4x2 const & m - ) - { - this->value[0] = col_type(m[0], value_type(0)); - this->value[1] = col_type(m[1], value_type(0)); - this->value[2] = col_type(m[2], value_type(1)); - } - - template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - tmat3x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(m[2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 - ( - tmat4x3 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = m[2]; - } - - ////////////////////////////////////////////////////////////// - // Operators - - template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator= - ( - tmat3x3 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = m[2]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator= - ( - tmat3x3 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = m[2]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator+= - ( - U const & s - ) - { - this->value[0] += s; - this->value[1] += s; - this->value[2] += s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator+= - ( - tmat3x3 const & m - ) - { - this->value[0] += m[0]; - this->value[1] += m[1]; - this->value[2] += m[2]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator-= - ( - U const & s - ) - { - this->value[0] -= s; - this->value[1] -= s; - this->value[2] -= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator-= - ( - tmat3x3 const & m - ) - { - this->value[0] -= m[0]; - this->value[1] -= m[1]; - this->value[2] -= m[2]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator*= - ( - U const & s - ) - { - this->value[0] *= s; - this->value[1] *= s; - this->value[2] *= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator*= - ( - tmat3x3 const & m - ) - { - return (*this = *this * m); - } - - template - template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator/= - ( - U const & s - ) - { - this->value[0] /= s; - this->value[1] /= s; - this->value[2] /= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator/= - ( - tmat3x3 const & m - ) - { - return (*this = *this / m); - } - - template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator++ () - { - ++this->value[0]; - ++this->value[1]; - ++this->value[2]; - return *this; - } - - template - GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator-- () - { - --this->value[0]; - --this->value[1]; - --this->value[2]; - return *this; - } - - template - GLM_FUNC_QUALIFIER tmat3x3 tmat3x3::_inverse() const - { - T S00 = value[0][0]; - T S01 = value[0][1]; - T S02 = value[0][2]; - - T S10 = value[1][0]; - T S11 = value[1][1]; - T S12 = value[1][2]; - - T S20 = value[2][0]; - T S21 = value[2][1]; - T S22 = value[2][2]; -/* - tmat3x3 Inverse( - + (S11 * S22 - S21 * S12), - - (S10 * S22 - S20 * S12), - + (S10 * S21 - S20 * S11), - - (S01 * S22 - S21 * S02), - + (S00 * S22 - S20 * S02), - - (S00 * S21 - S20 * S01), - + (S01 * S12 - S11 * S02), - - (S00 * S12 - S10 * S02), - + (S00 * S11 - S10 * S01)); -*/ - tmat3x3 Inverse( - S11 * S22 - S21 * S12, - S12 * S20 - S22 * S10, - S10 * S21 - S20 * S11, - S02 * S21 - S01 * S22, - S00 * S22 - S02 * S20, - S01 * S20 - S00 * S21, - S12 * S01 - S11 * S02, - S10 * S02 - S12 * S00, - S11 * S00 - S10 * S01); - - T Determinant = S00 * (S11 * S22 - S21 * S12) - - S10 * (S01 * S22 - S21 * S02) - + S20 * (S01 * S12 - S11 * S02); - - Inverse /= Determinant; - return Inverse; - } - - ////////////////////////////////////////////////////////////// - // Binary operators - - template - GLM_FUNC_QUALIFIER tmat3x3 operator+ - ( - tmat3x3 const & m, - typename tmat3x3::value_type const & s - ) - { - return tmat3x3( - m[0] + s, - m[1] + s, - m[2] + s); - } - - template - GLM_FUNC_QUALIFIER tmat3x3 operator+ - ( - typename tmat3x3::value_type const & s, - tmat3x3 const & m - ) - { - return tmat3x3( - m[0] + s, - m[1] + s, - m[2] + s); - } - - template - GLM_FUNC_QUALIFIER tmat3x3 operator+ - ( - tmat3x3 const & m1, - tmat3x3 const & m2 - ) - { - return tmat3x3( - m1[0] + m2[0], - m1[1] + m2[1], - m1[2] + m2[2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x3 operator- - ( - tmat3x3 const & m, - typename tmat3x3::value_type const & s - ) - { - return tmat3x3( - m[0] - s, - m[1] - s, - m[2] - s); - } - - template - GLM_FUNC_QUALIFIER tmat3x3 operator- - ( - typename tmat3x3::value_type const & s, - tmat3x3 const & m - ) - { - return tmat3x3( - s - m[0], - s - m[1], - s - m[2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x3 operator- - ( - tmat3x3 const & m1, - tmat3x3 const & m2 - ) - { - return tmat3x3( - m1[0] - m2[0], - m1[1] - m2[1], - m1[2] - m2[2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x3 operator* - ( - tmat3x3 const & m, - typename tmat3x3::value_type const & s - ) - { - return tmat3x3( - m[0] * s, - m[1] * s, - m[2] * s); - } - - template - GLM_FUNC_QUALIFIER tmat3x3 operator* - ( - typename tmat3x3::value_type const & s, - tmat3x3 const & m - ) - { - return tmat3x3( - m[0] * s, - m[1] * s, - m[2] * s); - } - - template - GLM_FUNC_QUALIFIER typename tmat3x3::col_type operator* - ( - tmat3x3 const & m, - typename tmat3x3::row_type const & v - ) - { - return typename tmat3x3::col_type( - m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z, - m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z, - m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z); - } - - template - GLM_FUNC_QUALIFIER typename tmat3x3::row_type operator* - ( - typename tmat3x3::col_type const & v, - tmat3x3 const & m - ) - { - return typename tmat3x3::row_type( - m[0][0] * v.x + m[0][1] * v.y + m[0][2] * v.z, - m[1][0] * v.x + m[1][1] * v.y + m[1][2] * v.z, - m[2][0] * v.x + m[2][1] * v.y + m[2][2] * v.z); - } - - template - GLM_FUNC_QUALIFIER tmat3x3 operator* - ( - tmat3x3 const & m1, - tmat3x3 const & m2 - ) - { - typename tmat3x3::value_type const SrcA00 = m1[0][0]; - typename tmat3x3::value_type const SrcA01 = m1[0][1]; - typename tmat3x3::value_type const SrcA02 = m1[0][2]; - typename tmat3x3::value_type const SrcA10 = m1[1][0]; - typename tmat3x3::value_type const SrcA11 = m1[1][1]; - typename tmat3x3::value_type const SrcA12 = m1[1][2]; - typename tmat3x3::value_type const SrcA20 = m1[2][0]; - typename tmat3x3::value_type const SrcA21 = m1[2][1]; - typename tmat3x3::value_type const SrcA22 = m1[2][2]; - - typename tmat3x3::value_type const SrcB00 = m2[0][0]; - typename tmat3x3::value_type const SrcB01 = m2[0][1]; - typename tmat3x3::value_type const SrcB02 = m2[0][2]; - typename tmat3x3::value_type const SrcB10 = m2[1][0]; - typename tmat3x3::value_type const SrcB11 = m2[1][1]; - typename tmat3x3::value_type const SrcB12 = m2[1][2]; - typename tmat3x3::value_type const SrcB20 = m2[2][0]; - typename tmat3x3::value_type const SrcB21 = m2[2][1]; - typename tmat3x3::value_type const SrcB22 = m2[2][2]; - - tmat3x3 Result(tmat3x3::null); - Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02; - Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02; - Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02; - Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12; - Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12; - Result[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11 + SrcA22 * SrcB12; - Result[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21 + SrcA20 * SrcB22; - Result[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21 + SrcA21 * SrcB22; - Result[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21 + SrcA22 * SrcB22; - return Result; - } - - template - GLM_FUNC_QUALIFIER tmat2x3 operator* - ( - tmat3x3 const & m1, - tmat2x3 const & m2 - ) - { - return tmat2x3( - m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], - m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2], - m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2], - m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2], - m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2], - m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2]); - } - - template - GLM_FUNC_QUALIFIER tmat4x3 operator* - ( - tmat3x3 const & m1, - tmat4x3 const & m2 - ) - { - return tmat4x3( - m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], - m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2], - m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2], - m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2], - m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2], - m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2], - m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2], - m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2], - m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2], - m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2], - m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2], - m1[0][2] * m2[3][0] + m1[1][2] * m2[3][1] + m1[2][2] * m2[3][2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x3 operator/ - ( - tmat3x3 const & m, - typename tmat3x3::value_type const & s - ) - { - return tmat3x3( - m[0] / s, - m[1] / s, - m[2] / s); - } - - template - GLM_FUNC_QUALIFIER tmat3x3 operator/ - ( - typename tmat3x3::value_type const & s, - tmat3x3 const & m - ) - { - return tmat3x3( - s / m[0], - s / m[1], - s / m[2]); - } - - template - GLM_FUNC_QUALIFIER typename tmat3x3::col_type operator/ - ( - tmat3x3 const & m, - typename tmat3x3::row_type const & v - ) - { - return m._inverse() * v; - } - - template - GLM_FUNC_QUALIFIER typename tmat3x3::row_type operator/ - ( - typename tmat3x3::col_type const & v, - tmat3x3 const & m - ) - { - return v * m._inverse(); - } - - template - GLM_FUNC_QUALIFIER tmat3x3 operator/ - ( - tmat3x3 const & m1, - tmat3x3 const & m2 - ) - { - return m1 * m2._inverse(); - } - - // Unary constant operators - template - GLM_FUNC_QUALIFIER tmat3x3 const operator- - ( - tmat3x3 const & m - ) - { - return tmat3x3( - -m[0], - -m[1], - -m[2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x3 const operator++ - ( - tmat3x3 const & m, - int - ) - { - return tmat3x3( - m[0] + T(1), - m[1] + T(1), - m[2] + T(1)); - } - - template - GLM_FUNC_QUALIFIER tmat3x3 const operator-- - ( - tmat3x3 const & m, - int - ) - { - return tmat3x3( - m[0] - T(1), - m[1] - T(1), - m[2] - T(1)); - } - - ////////////////////////////////////// - // Boolean operators - - template - GLM_FUNC_QUALIFIER bool operator== - ( - tmat3x3 const & m1, - tmat3x3 const & m2 - ) - { - return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]); - } - - template - GLM_FUNC_QUALIFIER bool operator!= - ( - tmat3x3 const & m1, - tmat3x3 const & m2 - ) - { - return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]); - } - -} //namespace detail -} //namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat3x3.inl +/// @date 2005-01-27 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x3::size_type tmat3x3::length() const + { + return 3; + } + + template + GLM_FUNC_QUALIFIER typename tmat3x3::size_type tmat3x3::col_size() + { + return 3; + } + + template + GLM_FUNC_QUALIFIER typename tmat3x3::size_type tmat3x3::row_size() + { + return 3; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tmat3x3::col_type & + tmat3x3::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return this->value[i]; + } + + template + GLM_FUNC_QUALIFIER typename tmat3x3::col_type const & + tmat3x3::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return this->value[i]; + } + + ////////////////////////////////////////////////////////////// + // Constructors + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3() + { + value_type const Zero(0); + value_type const One(1); + this->value[0] = col_type(One, Zero, Zero); + this->value[1] = col_type(Zero, One, Zero); + this->value[2] = col_type(Zero, Zero, One); + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + tmat3x3 const & m + ) + { + this->value[0] = m.value[0]; + this->value[1] = m.value[1]; + this->value[2] = m.value[2]; + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + value_type const & s + ) + { + value_type const Zero(0); + this->value[0] = col_type(s, Zero, Zero); + this->value[1] = col_type(Zero, s, Zero); + this->value[2] = col_type(Zero, Zero, s); + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + value_type const & x0, value_type const & y0, value_type const & z0, + value_type const & x1, value_type const & y1, value_type const & z1, + value_type const & x2, value_type const & y2, value_type const & z2 + ) + { + this->value[0] = col_type(x0, y0, z0); + this->value[1] = col_type(x1, y1, z1); + this->value[2] = col_type(x2, y2, z2); + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + col_type const & v0, + col_type const & v1, + col_type const & v2 + ) + { + this->value[0] = v0; + this->value[1] = v1; + this->value[2] = v2; + } + + ////////////////////////////////////// + // Convertion constructors + template + template + GLM_FUNC_DECL tmat3x3::tmat3x3 + ( + U const & s + ) + { + value_type const Zero(0); + this->value[0] = tvec3(value_type(s), Zero, Zero); + this->value[1] = tvec3(Zero, value_type(s), Zero); + this->value[2] = tvec3(Zero, Zero, value_type(s)); + } + + template + template < + typename X1, typename Y1, typename Z1, + typename X2, typename Y2, typename Z2, + typename X3, typename Y3, typename Z3> + GLM_FUNC_DECL tmat3x3::tmat3x3 + ( + X1 const & x1, Y1 const & y1, Z1 const & z1, + X2 const & x2, Y2 const & y2, Z2 const & z2, + X3 const & x3, Y3 const & y3, Z3 const & z3 + ) + { + this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1)); + this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2)); + this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3)); + } + + template + template + GLM_FUNC_DECL tmat3x3::tmat3x3 + ( + tvec3 const & v1, + tvec3 const & v2, + tvec3 const & v3 + ) + { + this->value[0] = col_type(v1); + this->value[1] = col_type(v2); + this->value[2] = col_type(v3); + } + + ////////////////////////////////////////////////////////////// + // Conversions + + template + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + tmat3x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + tmat2x2 const & m + ) + { + this->value[0] = col_type(m[0], value_type(0)); + this->value[1] = col_type(m[1], value_type(0)); + this->value[2] = col_type(detail::tvec2(0), value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + tmat4x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + tmat2x3 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = col_type(detail::tvec2(0), value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + tmat3x2 const & m + ) + { + this->value[0] = col_type(m[0], value_type(0)); + this->value[1] = col_type(m[1], value_type(0)); + this->value[2] = col_type(m[2], value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + tmat2x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(detail::tvec2(0), value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + tmat4x2 const & m + ) + { + this->value[0] = col_type(m[0], value_type(0)); + this->value[1] = col_type(m[1], value_type(0)); + this->value[2] = col_type(m[2], value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + tmat3x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x3::tmat3x3 + ( + tmat4x3 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + } + + ////////////////////////////////////////////////////////////// + // Operators + + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator= + ( + tmat3x3 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator= + ( + tmat3x3 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator+= + ( + U const & s + ) + { + this->value[0] += s; + this->value[1] += s; + this->value[2] += s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator+= + ( + tmat3x3 const & m + ) + { + this->value[0] += m[0]; + this->value[1] += m[1]; + this->value[2] += m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator-= + ( + U const & s + ) + { + this->value[0] -= s; + this->value[1] -= s; + this->value[2] -= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator-= + ( + tmat3x3 const & m + ) + { + this->value[0] -= m[0]; + this->value[1] -= m[1]; + this->value[2] -= m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator*= + ( + U const & s + ) + { + this->value[0] *= s; + this->value[1] *= s; + this->value[2] *= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator*= + ( + tmat3x3 const & m + ) + { + return (*this = *this * m); + } + + template + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator/= + ( + U const & s + ) + { + this->value[0] /= s; + this->value[1] /= s; + this->value[2] /= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator/= + ( + tmat3x3 const & m + ) + { + return (*this = *this / m); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator++ () + { + ++this->value[0]; + ++this->value[1]; + ++this->value[2]; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat3x3 & tmat3x3::operator-- () + { + --this->value[0]; + --this->value[1]; + --this->value[2]; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat3x3 tmat3x3::_inverse() const + { + T S00 = value[0][0]; + T S01 = value[0][1]; + T S02 = value[0][2]; + + T S10 = value[1][0]; + T S11 = value[1][1]; + T S12 = value[1][2]; + + T S20 = value[2][0]; + T S21 = value[2][1]; + T S22 = value[2][2]; +/* + tmat3x3 Inverse( + + (S11 * S22 - S21 * S12), + - (S10 * S22 - S20 * S12), + + (S10 * S21 - S20 * S11), + - (S01 * S22 - S21 * S02), + + (S00 * S22 - S20 * S02), + - (S00 * S21 - S20 * S01), + + (S01 * S12 - S11 * S02), + - (S00 * S12 - S10 * S02), + + (S00 * S11 - S10 * S01)); +*/ + tmat3x3 Inverse( + S11 * S22 - S21 * S12, + S12 * S20 - S22 * S10, + S10 * S21 - S20 * S11, + S02 * S21 - S01 * S22, + S00 * S22 - S02 * S20, + S01 * S20 - S00 * S21, + S12 * S01 - S11 * S02, + S10 * S02 - S12 * S00, + S11 * S00 - S10 * S01); + + T Determinant = S00 * (S11 * S22 - S21 * S12) + - S10 * (S01 * S22 - S21 * S02) + + S20 * (S01 * S12 - S11 * S02); + + Inverse /= Determinant; + return Inverse; + } + + ////////////////////////////////////////////////////////////// + // Binary operators + + template + GLM_FUNC_QUALIFIER tmat3x3 operator+ + ( + tmat3x3 const & m, + typename tmat3x3::value_type const & s + ) + { + return tmat3x3( + m[0] + s, + m[1] + s, + m[2] + s); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator+ + ( + typename tmat3x3::value_type const & s, + tmat3x3 const & m + ) + { + return tmat3x3( + m[0] + s, + m[1] + s, + m[2] + s); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator+ + ( + tmat3x3 const & m1, + tmat3x3 const & m2 + ) + { + return tmat3x3( + m1[0] + m2[0], + m1[1] + m2[1], + m1[2] + m2[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator- + ( + tmat3x3 const & m, + typename tmat3x3::value_type const & s + ) + { + return tmat3x3( + m[0] - s, + m[1] - s, + m[2] - s); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator- + ( + typename tmat3x3::value_type const & s, + tmat3x3 const & m + ) + { + return tmat3x3( + s - m[0], + s - m[1], + s - m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator- + ( + tmat3x3 const & m1, + tmat3x3 const & m2 + ) + { + return tmat3x3( + m1[0] - m2[0], + m1[1] - m2[1], + m1[2] - m2[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator* + ( + tmat3x3 const & m, + typename tmat3x3::value_type const & s + ) + { + return tmat3x3( + m[0] * s, + m[1] * s, + m[2] * s); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator* + ( + typename tmat3x3::value_type const & s, + tmat3x3 const & m + ) + { + return tmat3x3( + m[0] * s, + m[1] * s, + m[2] * s); + } + + template + GLM_FUNC_QUALIFIER typename tmat3x3::col_type operator* + ( + tmat3x3 const & m, + typename tmat3x3::row_type const & v + ) + { + return typename tmat3x3::col_type( + m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z, + m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z, + m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z); + } + + template + GLM_FUNC_QUALIFIER typename tmat3x3::row_type operator* + ( + typename tmat3x3::col_type const & v, + tmat3x3 const & m + ) + { + return typename tmat3x3::row_type( + m[0][0] * v.x + m[0][1] * v.y + m[0][2] * v.z, + m[1][0] * v.x + m[1][1] * v.y + m[1][2] * v.z, + m[2][0] * v.x + m[2][1] * v.y + m[2][2] * v.z); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator* + ( + tmat3x3 const & m1, + tmat3x3 const & m2 + ) + { + typename tmat3x3::value_type const SrcA00 = m1[0][0]; + typename tmat3x3::value_type const SrcA01 = m1[0][1]; + typename tmat3x3::value_type const SrcA02 = m1[0][2]; + typename tmat3x3::value_type const SrcA10 = m1[1][0]; + typename tmat3x3::value_type const SrcA11 = m1[1][1]; + typename tmat3x3::value_type const SrcA12 = m1[1][2]; + typename tmat3x3::value_type const SrcA20 = m1[2][0]; + typename tmat3x3::value_type const SrcA21 = m1[2][1]; + typename tmat3x3::value_type const SrcA22 = m1[2][2]; + + typename tmat3x3::value_type const SrcB00 = m2[0][0]; + typename tmat3x3::value_type const SrcB01 = m2[0][1]; + typename tmat3x3::value_type const SrcB02 = m2[0][2]; + typename tmat3x3::value_type const SrcB10 = m2[1][0]; + typename tmat3x3::value_type const SrcB11 = m2[1][1]; + typename tmat3x3::value_type const SrcB12 = m2[1][2]; + typename tmat3x3::value_type const SrcB20 = m2[2][0]; + typename tmat3x3::value_type const SrcB21 = m2[2][1]; + typename tmat3x3::value_type const SrcB22 = m2[2][2]; + + tmat3x3 Result(tmat3x3::null); + Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02; + Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02; + Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02; + Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12; + Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12; + Result[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11 + SrcA22 * SrcB12; + Result[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21 + SrcA20 * SrcB22; + Result[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21 + SrcA21 * SrcB22; + Result[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21 + SrcA22 * SrcB22; + return Result; + } + + template + GLM_FUNC_QUALIFIER tmat2x3 operator* + ( + tmat3x3 const & m1, + tmat2x3 const & m2 + ) + { + return tmat2x3( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2]); + } + + template + GLM_FUNC_QUALIFIER tmat4x3 operator* + ( + tmat3x3 const & m1, + tmat4x3 const & m2 + ) + { + return tmat4x3( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2], + m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2], + m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2], + m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2], + m1[0][2] * m2[3][0] + m1[1][2] * m2[3][1] + m1[2][2] * m2[3][2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator/ + ( + tmat3x3 const & m, + typename tmat3x3::value_type const & s + ) + { + return tmat3x3( + m[0] / s, + m[1] / s, + m[2] / s); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator/ + ( + typename tmat3x3::value_type const & s, + tmat3x3 const & m + ) + { + return tmat3x3( + s / m[0], + s / m[1], + s / m[2]); + } + + template + GLM_FUNC_QUALIFIER typename tmat3x3::col_type operator/ + ( + tmat3x3 const & m, + typename tmat3x3::row_type const & v + ) + { + return m._inverse() * v; + } + + template + GLM_FUNC_QUALIFIER typename tmat3x3::row_type operator/ + ( + typename tmat3x3::col_type const & v, + tmat3x3 const & m + ) + { + return v * m._inverse(); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator/ + ( + tmat3x3 const & m1, + tmat3x3 const & m2 + ) + { + return m1 * m2._inverse(); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tmat3x3 const operator- + ( + tmat3x3 const & m + ) + { + return tmat3x3( + -m[0], + -m[1], + -m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 const operator++ + ( + tmat3x3 const & m, + int + ) + { + return tmat3x3( + m[0] + T(1), + m[1] + T(1), + m[2] + T(1)); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 const operator-- + ( + tmat3x3 const & m, + int + ) + { + return tmat3x3( + m[0] - T(1), + m[1] - T(1), + m[2] - T(1)); + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tmat3x3 const & m1, + tmat3x3 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tmat3x3 const & m1, + tmat3x3 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]); + } + +} //namespace detail +} //namespace glm diff --git a/include/gal/opengl/glm/core/type_mat3x4.hpp b/include/gal/opengl/glm/core/type_mat3x4.hpp index 093630993d..1422de7e5d 100644 --- a/include/gal/opengl/glm/core/type_mat3x4.hpp +++ b/include/gal/opengl/glm/core/type_mat3x4.hpp @@ -1,266 +1,266 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_mat3x4.hpp -/// @date 2006-08-05 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_type_mat3x4 -#define glm_core_type_mat3x4 - -#include "type_mat.hpp" - -namespace glm{ -namespace detail -{ - template struct tvec1; - template struct tvec2; - template struct tvec3; - template struct tvec4; - template struct tmat2x2; - template struct tmat2x3; - template struct tmat2x4; - template struct tmat3x2; - template struct tmat3x3; - template struct tmat3x4; - template struct tmat4x2; - template struct tmat4x3; - template struct tmat4x4; - - template - struct tmat3x4 - { - enum ctor{null}; - typedef T value_type; - typedef std::size_t size_type; - typedef tvec4 col_type; - typedef tvec3 row_type; - typedef tmat3x4 type; - typedef tmat4x3 transpose_type; - - static GLM_FUNC_DECL size_type col_size(); - static GLM_FUNC_DECL size_type row_size(); - - GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; - - private: - // Data - col_type value[3]; - - public: - // Constructors - GLM_FUNC_DECL tmat3x4(); - GLM_FUNC_DECL tmat3x4(tmat3x4 const & m); - - GLM_FUNC_DECL explicit tmat3x4( - ctor Null); - GLM_FUNC_DECL explicit tmat3x4( - value_type const & s); - GLM_FUNC_DECL explicit tmat3x4( - value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, - value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1, - value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2); - GLM_FUNC_DECL explicit tmat3x4( - col_type const & v0, - col_type const & v1, - col_type const & v2); - - ////////////////////////////////////// - // Conversions - template - GLM_FUNC_DECL explicit tmat3x4( - U const & x); - - template - < - typename X1, typename Y1, typename Z1, typename W1, - typename X2, typename Y2, typename Z2, typename W2, - typename X3, typename Y3, typename Z3, typename W3 - > - GLM_FUNC_DECL explicit tmat3x4( - X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, - X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, - X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3); - - template - GLM_FUNC_DECL explicit tmat3x4( - tvec4 const & v1, - tvec4 const & v2, - tvec4 const & v3); - - // Matrix conversion - template - GLM_FUNC_DECL explicit tmat3x4(tmat3x4 const & m); - - GLM_FUNC_DECL explicit tmat3x4(tmat2x2 const & x); - GLM_FUNC_DECL explicit tmat3x4(tmat3x3 const & x); - GLM_FUNC_DECL explicit tmat3x4(tmat4x4 const & x); - GLM_FUNC_DECL explicit tmat3x4(tmat2x3 const & x); - GLM_FUNC_DECL explicit tmat3x4(tmat3x2 const & x); - GLM_FUNC_DECL explicit tmat3x4(tmat2x4 const & x); - GLM_FUNC_DECL explicit tmat3x4(tmat4x2 const & x); - GLM_FUNC_DECL explicit tmat3x4(tmat4x3 const & x); - - // Accesses - col_type & operator[](size_type i); - col_type const & operator[](size_type i) const; - - // Unary updatable operators - GLM_FUNC_DECL tmat3x4 & operator= (tmat3x4 const & m); - template - GLM_FUNC_DECL tmat3x4 & operator= (tmat3x4 const & m); - template - GLM_FUNC_DECL tmat3x4 & operator+= (U const & s); - template - GLM_FUNC_DECL tmat3x4 & operator+= (tmat3x4 const & m); - template - GLM_FUNC_DECL tmat3x4 & operator-= (U const & s); - template - GLM_FUNC_DECL tmat3x4 & operator-= (tmat3x4 const & m); - template - GLM_FUNC_DECL tmat3x4 & operator*= (U const & s); - template - GLM_FUNC_DECL tmat3x4 & operator*= (tmat3x4 const & m); - template - GLM_FUNC_DECL tmat3x4 & operator/= (U const & s); - - GLM_FUNC_DECL tmat3x4 & operator++ (); - GLM_FUNC_DECL tmat3x4 & operator-- (); - }; - - // Binary operators - template - tmat3x4 operator+ ( - tmat3x4 const & m, - typename tmat3x4::value_type const & s); - - template - tmat3x4 operator+ ( - tmat3x4 const & m1, - tmat3x4 const & m2); - - template - tmat3x4 operator- ( - tmat3x4 const & m, - typename tmat3x4::value_type const & s); - - template - tmat3x4 operator- ( - tmat3x4 const & m1, - tmat3x4 const & m2); - - template - tmat3x4 operator* ( - tmat3x4 const & m, - typename tmat3x4::value_type const & s); - - template - tmat3x4 operator* ( - typename tmat3x4::value_type const & s, - tmat3x4 const & m); - - template - typename tmat3x4::col_type operator* ( - tmat3x4 const & m, - typename tmat3x4::row_type const & v); - - template - typename tmat3x4::row_type operator* ( - typename tmat3x4::col_type const & v, - tmat3x4 const & m); - - template - tmat4x4 operator* ( - tmat3x4 const & m1, - tmat4x3 const & m2); - - template - tmat2x4 operator* ( - tmat3x4 const & m1, - tmat2x3 const & m2); - - template - tmat3x4 operator* ( - tmat3x4 const & m1, - tmat3x3 const & m2); - - template - tmat3x4 operator/ ( - tmat3x4 const & m, - typename tmat3x4::value_type const & s); - - template - tmat3x4 operator/ ( - typename tmat3x4::value_type const & s, - tmat3x4 const & m); - - // Unary constant operators - template - tmat3x4 const operator- ( - tmat3x4 const & m); - - template - tmat3x4 const operator-- ( - tmat3x4 const & m, - int); - - template - tmat3x4 const operator++ ( - tmat3x4 const & m, - int); - -}//namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 3 columns of 4 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x4 lowp_mat3x4; - - /// 3 columns of 4 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x4 mediump_mat3x4; - - /// 3 columns of 4 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat3x4 highp_mat3x4; - - /// @} -}//namespace glm - -#ifndef GLM_EXTERNAL_TEMPLATE -#include "type_mat3x4.inl" -#endif - -#endif //glm_core_type_mat3x4 +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat3x4.hpp +/// @date 2006-08-05 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_mat3x4 +#define glm_core_type_mat3x4 + +#include "type_mat.hpp" + +namespace glm{ +namespace detail +{ + template struct tvec1; + template struct tvec2; + template struct tvec3; + template struct tvec4; + template struct tmat2x2; + template struct tmat2x3; + template struct tmat2x4; + template struct tmat3x2; + template struct tmat3x3; + template struct tmat3x4; + template struct tmat4x2; + template struct tmat4x3; + template struct tmat4x4; + + template + struct tmat3x4 + { + enum ctor{null}; + typedef T value_type; + typedef std::size_t size_type; + typedef tvec4 col_type; + typedef tvec3 row_type; + typedef tmat3x4 type; + typedef tmat4x3 transpose_type; + + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + private: + // Data + col_type value[3]; + + public: + // Constructors + GLM_FUNC_DECL tmat3x4(); + GLM_FUNC_DECL tmat3x4(tmat3x4 const & m); + + GLM_FUNC_DECL explicit tmat3x4( + ctor Null); + GLM_FUNC_DECL explicit tmat3x4( + value_type const & s); + GLM_FUNC_DECL explicit tmat3x4( + value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, + value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1, + value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2); + GLM_FUNC_DECL explicit tmat3x4( + col_type const & v0, + col_type const & v1, + col_type const & v2); + + ////////////////////////////////////// + // Conversions + template + GLM_FUNC_DECL explicit tmat3x4( + U const & x); + + template + < + typename X1, typename Y1, typename Z1, typename W1, + typename X2, typename Y2, typename Z2, typename W2, + typename X3, typename Y3, typename Z3, typename W3 + > + GLM_FUNC_DECL explicit tmat3x4( + X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, + X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, + X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3); + + template + GLM_FUNC_DECL explicit tmat3x4( + tvec4 const & v1, + tvec4 const & v2, + tvec4 const & v3); + + // Matrix conversion + template + GLM_FUNC_DECL explicit tmat3x4(tmat3x4 const & m); + + GLM_FUNC_DECL explicit tmat3x4(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat3x4(tmat4x3 const & x); + + // Accesses + col_type & operator[](size_type i); + col_type const & operator[](size_type i) const; + + // Unary updatable operators + GLM_FUNC_DECL tmat3x4 & operator= (tmat3x4 const & m); + template + GLM_FUNC_DECL tmat3x4 & operator= (tmat3x4 const & m); + template + GLM_FUNC_DECL tmat3x4 & operator+= (U const & s); + template + GLM_FUNC_DECL tmat3x4 & operator+= (tmat3x4 const & m); + template + GLM_FUNC_DECL tmat3x4 & operator-= (U const & s); + template + GLM_FUNC_DECL tmat3x4 & operator-= (tmat3x4 const & m); + template + GLM_FUNC_DECL tmat3x4 & operator*= (U const & s); + template + GLM_FUNC_DECL tmat3x4 & operator*= (tmat3x4 const & m); + template + GLM_FUNC_DECL tmat3x4 & operator/= (U const & s); + + GLM_FUNC_DECL tmat3x4 & operator++ (); + GLM_FUNC_DECL tmat3x4 & operator-- (); + }; + + // Binary operators + template + tmat3x4 operator+ ( + tmat3x4 const & m, + typename tmat3x4::value_type const & s); + + template + tmat3x4 operator+ ( + tmat3x4 const & m1, + tmat3x4 const & m2); + + template + tmat3x4 operator- ( + tmat3x4 const & m, + typename tmat3x4::value_type const & s); + + template + tmat3x4 operator- ( + tmat3x4 const & m1, + tmat3x4 const & m2); + + template + tmat3x4 operator* ( + tmat3x4 const & m, + typename tmat3x4::value_type const & s); + + template + tmat3x4 operator* ( + typename tmat3x4::value_type const & s, + tmat3x4 const & m); + + template + typename tmat3x4::col_type operator* ( + tmat3x4 const & m, + typename tmat3x4::row_type const & v); + + template + typename tmat3x4::row_type operator* ( + typename tmat3x4::col_type const & v, + tmat3x4 const & m); + + template + tmat4x4 operator* ( + tmat3x4 const & m1, + tmat4x3 const & m2); + + template + tmat2x4 operator* ( + tmat3x4 const & m1, + tmat2x3 const & m2); + + template + tmat3x4 operator* ( + tmat3x4 const & m1, + tmat3x3 const & m2); + + template + tmat3x4 operator/ ( + tmat3x4 const & m, + typename tmat3x4::value_type const & s); + + template + tmat3x4 operator/ ( + typename tmat3x4::value_type const & s, + tmat3x4 const & m); + + // Unary constant operators + template + tmat3x4 const operator- ( + tmat3x4 const & m); + + template + tmat3x4 const operator-- ( + tmat3x4 const & m, + int); + + template + tmat3x4 const operator++ ( + tmat3x4 const & m, + int); + +}//namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 3 columns of 4 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x4 lowp_mat3x4; + + /// 3 columns of 4 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x4 mediump_mat3x4; + + /// 3 columns of 4 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat3x4 highp_mat3x4; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_mat3x4.inl" +#endif + +#endif //glm_core_type_mat3x4 diff --git a/include/gal/opengl/glm/core/type_mat3x4.inl b/include/gal/opengl/glm/core/type_mat3x4.inl index c42311c4d0..82721d5a69 100644 --- a/include/gal/opengl/glm/core/type_mat3x4.inl +++ b/include/gal/opengl/glm/core/type_mat3x4.inl @@ -1,712 +1,712 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_mat3x4.inl -/// @date 2006-08-05 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm{ -namespace detail -{ - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x4::size_type tmat3x4::length() const - { - return 3; - } - - template - GLM_FUNC_QUALIFIER typename tmat3x4::size_type tmat3x4::col_size() - { - return 4; - } - - template - GLM_FUNC_QUALIFIER typename tmat3x4::size_type tmat3x4::row_size() - { - return 3; - } - - ////////////////////////////////////// - // Accesses - - template - GLM_FUNC_QUALIFIER typename tmat3x4::col_type & - tmat3x4::operator[] - ( - size_type i - ) - { - assert(i < this->length()); - return this->value[i]; - } - - template - GLM_FUNC_QUALIFIER typename tmat3x4::col_type const & - tmat3x4::operator[] - ( - size_type i - ) const - { - assert(i < this->length()); - return this->value[i]; - } - - ////////////////////////////////////////////////////////////// - // Constructors - - template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4() - { - this->value[0] = col_type(1, 0, 0, 0); - this->value[1] = col_type(0, 1, 0, 0); - this->value[2] = col_type(0, 0, 1, 0); - } - - template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - tmat3x4 const & m - ) - { - this->value[0] = m.value[0]; - this->value[1] = m.value[1]; - this->value[2] = m.value[2]; - } - - template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - ctor - ) - {} - - template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - value_type const & s - ) - { - value_type const Zero(0); - this->value[0] = col_type(s, Zero, Zero, Zero); - this->value[1] = col_type(Zero, s, Zero, Zero); - this->value[2] = col_type(Zero, Zero, s, Zero); - } - - template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, - value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1, - value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2 - ) - { - this->value[0] = col_type(x0, y0, z0, w0); - this->value[1] = col_type(x1, y1, z1, w1); - this->value[2] = col_type(x2, y2, z2, w2); - } - - template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - col_type const & v0, - col_type const & v1, - col_type const & v2 - ) - { - this->value[0] = v0; - this->value[1] = v1; - this->value[2] = v2; - } - - ////////////////////////////////////// - // Convertion constructors - template - template - GLM_FUNC_DECL tmat3x4::tmat3x4 - ( - U const & s - ) - { - value_type const Zero(0); - this->value[0] = tvec4(value_type(s), Zero, Zero, Zero); - this->value[1] = tvec4(Zero, value_type(s), Zero, Zero); - this->value[2] = tvec4(Zero, Zero, value_type(s), Zero); - } - - template - template < - typename X1, typename Y1, typename Z1, typename W1, - typename X2, typename Y2, typename Z2, typename W2, - typename X3, typename Y3, typename Z3, typename W3> - GLM_FUNC_DECL tmat3x4::tmat3x4 - ( - X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, - X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, - X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3 - ) - { - this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1), value_type(w1)); - this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2), value_type(w2)); - this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3), value_type(w3)); - } - - template - template - GLM_FUNC_DECL tmat3x4::tmat3x4 - ( - tvec4 const & v1, - tvec4 const & v2, - tvec4 const & v3 - ) - { - this->value[0] = col_type(v1); - this->value[1] = col_type(v2); - this->value[2] = col_type(v3); - } - - // Conversion - template - template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - tmat3x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(m[2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - tmat2x2 const & m - ) - { - this->value[0] = col_type(m[0], detail::tvec2(0)); - this->value[1] = col_type(m[1], detail::tvec2(0)); - this->value[2] = col_type(T(0), T(0), T(1), T(0)); - } - - template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - tmat3x3 const & m - ) - { - this->value[0] = col_type(m[0], T(0)); - this->value[1] = col_type(m[1], T(0)); - this->value[2] = col_type(m[2], T(0)); - } - - template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - tmat4x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(m[2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - tmat2x3 const & m - ) - { - this->value[0] = col_type(m[0], T(0)); - this->value[1] = col_type(m[1], T(0)); - this->value[2] = col_type(T(0), T(0), T(1), T(0)); - } - - template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - tmat3x2 const & m - ) - { - this->value[0] = col_type(m[0], detail::tvec2(0)); - this->value[1] = col_type(m[1], detail::tvec2(0)); - this->value[2] = col_type(m[2], T(0), T(1)); - } - - template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - tmat2x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(T(0), T(0), T(1), T(0)); - } - - template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - tmat4x2 const & m - ) - { - this->value[0] = col_type(m[0], detail::tvec2(T(0))); - this->value[1] = col_type(m[1], detail::tvec2(T(0))); - this->value[2] = col_type(m[2], detail::tvec2(T(1), T(0))); - } - - template - GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 - ( - tmat4x3 const & m - ) - { - this->value[0] = col_type(m[0], T(0)); - this->value[1] = col_type(m[1], T(0)); - this->value[2] = col_type(m[2], T(0)); - } - - ////////////////////////////////////////////////////////////// - // Unary updatable operators - - template - GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator= - ( - tmat3x4 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = m[2]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator= - ( - tmat3x4 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = m[2]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator+= - ( - U const & s - ) - { - this->value[0] += s; - this->value[1] += s; - this->value[2] += s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator+= - ( - tmat3x4 const & m - ) - { - this->value[0] += m[0]; - this->value[1] += m[1]; - this->value[2] += m[2]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator-= - ( - U const & s - ) - { - this->value[0] -= s; - this->value[1] -= s; - this->value[2] -= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator-= - ( - tmat3x4 const & m - ) - { - this->value[0] -= m[0]; - this->value[1] -= m[1]; - this->value[2] -= m[2]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator*= - ( - U const & s - ) - { - this->value[0] *= s; - this->value[1] *= s; - this->value[2] *= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator*= - ( - tmat3x4 const & m - ) - { - return (*this = tmat3x4(*this * m)); - } - - template - template - GLM_FUNC_QUALIFIER tmat3x4 & tmat3x4::operator/= - ( - U const & s - ) - { - this->value[0] /= s; - this->value[1] /= s; - this->value[2] /= s; - return *this; - } - - template - GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator++ () - { - ++this->value[0]; - ++this->value[1]; - ++this->value[2]; - return *this; - } - - template - GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator-- () - { - --this->value[0]; - --this->value[1]; - --this->value[2]; - return *this; - } - - ////////////////////////////////////////////////////////////// - // Binary operators - - template - GLM_FUNC_QUALIFIER tmat3x4 operator+ - ( - tmat3x4 const & m, - typename tmat3x4::value_type const & s - ) - { - return tmat3x4( - m[0] + s, - m[1] + s, - m[2] + s); - } - - template - GLM_FUNC_QUALIFIER tmat3x4 operator+ - ( - tmat3x4 const & m1, - tmat3x4 const & m2 - ) - { - return tmat3x4( - m1[0] + m2[0], - m1[1] + m2[1], - m1[2] + m2[2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x4 operator- - ( - tmat3x4 const & m, - typename tmat3x4::value_type const & s - ) - { - return tmat3x4( - m[0] - s, - m[1] - s, - m[2] - s); - } - - template - GLM_FUNC_QUALIFIER tmat3x4 operator- - ( - tmat3x4 const & m1, - tmat3x4 const & m2 - ) - { - return tmat3x4( - m1[0] - m2[0], - m1[1] - m2[1], - m1[2] - m2[2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x4 operator* - ( - tmat3x4 const & m, - typename tmat3x4::value_type const & s - ) - { - return tmat3x4( - m[0] * s, - m[1] * s, - m[2] * s); - } - - template - GLM_FUNC_QUALIFIER tmat3x4 operator* - ( - typename tmat3x4::value_type const & s, - tmat3x4 const & m - ) - { - return tmat3x4( - m[0] * s, - m[1] * s, - m[2] * s); - } - - template - GLM_FUNC_QUALIFIER typename tmat3x4::col_type operator* - ( - tmat3x4 const & m, - typename tmat3x4::row_type const & v - ) - { - return typename tmat3x4::col_type( - m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z, - m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z, - m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z, - m[0][3] * v.x + m[1][3] * v.y + m[2][3] * v.z); - } - - template - GLM_FUNC_QUALIFIER typename tmat3x4::row_type operator* - ( - typename tmat3x4::col_type const & v, - tmat3x4 const & m - ) - { - return typename tmat3x4::row_type( - v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2] + v.w * m[0][3], - v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2] + v.w * m[1][3], - v.x * m[2][0] + v.y * m[2][1] + v.z * m[2][2] + v.w * m[2][3]); - } - - template - GLM_FUNC_QUALIFIER tmat4x4 operator* - ( - tmat3x4 const & m1, - tmat4x3 const & m2 - ) - { - const T SrcA00 = m1[0][0]; - const T SrcA01 = m1[0][1]; - const T SrcA02 = m1[0][2]; - const T SrcA03 = m1[0][3]; - const T SrcA10 = m1[1][0]; - const T SrcA11 = m1[1][1]; - const T SrcA12 = m1[1][2]; - const T SrcA13 = m1[1][3]; - const T SrcA20 = m1[2][0]; - const T SrcA21 = m1[2][1]; - const T SrcA22 = m1[2][2]; - const T SrcA23 = m1[2][3]; - - const T SrcB00 = m2[0][0]; - const T SrcB01 = m2[0][1]; - const T SrcB02 = m2[0][2]; - const T SrcB10 = m2[1][0]; - const T SrcB11 = m2[1][1]; - const T SrcB12 = m2[1][2]; - const T SrcB20 = m2[2][0]; - const T SrcB21 = m2[2][1]; - const T SrcB22 = m2[2][2]; - const T SrcB30 = m2[3][0]; - const T SrcB31 = m2[3][1]; - const T SrcB32 = m2[3][2]; - - tmat4x4 Result(tmat4x4::null); - Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02; - Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02; - Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02; - Result[0][3] = SrcA03 * SrcB00 + SrcA13 * SrcB01 + SrcA23 * SrcB02; - Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12; - Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12; - Result[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11 + SrcA22 * SrcB12; - Result[1][3] = SrcA03 * SrcB10 + SrcA13 * SrcB11 + SrcA23 * SrcB12; - Result[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21 + SrcA20 * SrcB22; - Result[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21 + SrcA21 * SrcB22; - Result[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21 + SrcA22 * SrcB22; - Result[2][3] = SrcA03 * SrcB20 + SrcA13 * SrcB21 + SrcA23 * SrcB22; - Result[3][0] = SrcA00 * SrcB30 + SrcA10 * SrcB31 + SrcA20 * SrcB32; - Result[3][1] = SrcA01 * SrcB30 + SrcA11 * SrcB31 + SrcA21 * SrcB32; - Result[3][2] = SrcA02 * SrcB30 + SrcA12 * SrcB31 + SrcA22 * SrcB32; - Result[3][3] = SrcA03 * SrcB30 + SrcA13 * SrcB31 + SrcA23 * SrcB32; - return Result; - } - - template - GLM_FUNC_QUALIFIER tmat2x4 operator* - ( - tmat3x4 const & m1, - tmat2x3 const & m2 - ) - { - return tmat2x4( - m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], - m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2], - m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2], - m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2], - m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2], - m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2], - m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2], - m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x4 operator* - ( - tmat3x4 const & m1, - tmat3x3 const & m2 - ) - { - return tmat3x4( - m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], - m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2], - m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2], - m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2], - m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2], - m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2], - m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2], - m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2], - m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2], - m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2], - m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2], - m1[0][3] * m2[2][0] + m1[1][3] * m2[2][1] + m1[2][3] * m2[2][2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x4 operator/ - ( - tmat3x4 const & m, - typename tmat3x4::value_type const & s - ) - { - return tmat3x4( - m[0] / s, - m[1] / s, - m[2] / s); - } - - template - GLM_FUNC_QUALIFIER tmat3x4 operator/ - ( - typename tmat3x4::value_type const & s, - tmat3x4 const & m - ) - { - return tmat3x4( - s / m[0], - s / m[1], - s / m[2]); - } - - // Unary constant operators - template - GLM_FUNC_QUALIFIER tmat3x4 const operator- - ( - tmat3x4 const & m - ) - { - return tmat3x4( - -m[0], - -m[1], - -m[2]); - } - - template - GLM_FUNC_QUALIFIER tmat3x4 const operator++ - ( - tmat3x4 const & m, - int - ) - { - return tmat3x4( - m[0] + T(1), - m[1] + T(1), - m[2] + T(1)); - } - - template - GLM_FUNC_QUALIFIER tmat3x4 const operator-- - ( - tmat3x4 const & m, - int - ) - { - return tmat3x4( - m[0] - T(1), - m[1] - T(1), - m[2] - T(1)); - } - - ////////////////////////////////////// - // Boolean operators - - template - GLM_FUNC_QUALIFIER bool operator== - ( - tmat3x4 const & m1, - tmat3x4 const & m2 - ) - { - return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]); - } - - template - GLM_FUNC_QUALIFIER bool operator!= - ( - tmat3x4 const & m1, - tmat3x4 const & m2 - ) - { - return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]); - } -} //namespace detail -} //namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat3x4.inl +/// @date 2006-08-05 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat3x4::size_type tmat3x4::length() const + { + return 3; + } + + template + GLM_FUNC_QUALIFIER typename tmat3x4::size_type tmat3x4::col_size() + { + return 4; + } + + template + GLM_FUNC_QUALIFIER typename tmat3x4::size_type tmat3x4::row_size() + { + return 3; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tmat3x4::col_type & + tmat3x4::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return this->value[i]; + } + + template + GLM_FUNC_QUALIFIER typename tmat3x4::col_type const & + tmat3x4::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return this->value[i]; + } + + ////////////////////////////////////////////////////////////// + // Constructors + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4() + { + this->value[0] = col_type(1, 0, 0, 0); + this->value[1] = col_type(0, 1, 0, 0); + this->value[2] = col_type(0, 0, 1, 0); + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + tmat3x4 const & m + ) + { + this->value[0] = m.value[0]; + this->value[1] = m.value[1]; + this->value[2] = m.value[2]; + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + value_type const & s + ) + { + value_type const Zero(0); + this->value[0] = col_type(s, Zero, Zero, Zero); + this->value[1] = col_type(Zero, s, Zero, Zero); + this->value[2] = col_type(Zero, Zero, s, Zero); + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, + value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1, + value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2 + ) + { + this->value[0] = col_type(x0, y0, z0, w0); + this->value[1] = col_type(x1, y1, z1, w1); + this->value[2] = col_type(x2, y2, z2, w2); + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + col_type const & v0, + col_type const & v1, + col_type const & v2 + ) + { + this->value[0] = v0; + this->value[1] = v1; + this->value[2] = v2; + } + + ////////////////////////////////////// + // Convertion constructors + template + template + GLM_FUNC_DECL tmat3x4::tmat3x4 + ( + U const & s + ) + { + value_type const Zero(0); + this->value[0] = tvec4(value_type(s), Zero, Zero, Zero); + this->value[1] = tvec4(Zero, value_type(s), Zero, Zero); + this->value[2] = tvec4(Zero, Zero, value_type(s), Zero); + } + + template + template < + typename X1, typename Y1, typename Z1, typename W1, + typename X2, typename Y2, typename Z2, typename W2, + typename X3, typename Y3, typename Z3, typename W3> + GLM_FUNC_DECL tmat3x4::tmat3x4 + ( + X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, + X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, + X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3 + ) + { + this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1), value_type(w1)); + this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2), value_type(w2)); + this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3), value_type(w3)); + } + + template + template + GLM_FUNC_DECL tmat3x4::tmat3x4 + ( + tvec4 const & v1, + tvec4 const & v2, + tvec4 const & v3 + ) + { + this->value[0] = col_type(v1); + this->value[1] = col_type(v2); + this->value[2] = col_type(v3); + } + + // Conversion + template + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + tmat3x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + tmat2x2 const & m + ) + { + this->value[0] = col_type(m[0], detail::tvec2(0)); + this->value[1] = col_type(m[1], detail::tvec2(0)); + this->value[2] = col_type(T(0), T(0), T(1), T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + tmat3x3 const & m + ) + { + this->value[0] = col_type(m[0], T(0)); + this->value[1] = col_type(m[1], T(0)); + this->value[2] = col_type(m[2], T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + tmat4x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + tmat2x3 const & m + ) + { + this->value[0] = col_type(m[0], T(0)); + this->value[1] = col_type(m[1], T(0)); + this->value[2] = col_type(T(0), T(0), T(1), T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + tmat3x2 const & m + ) + { + this->value[0] = col_type(m[0], detail::tvec2(0)); + this->value[1] = col_type(m[1], detail::tvec2(0)); + this->value[2] = col_type(m[2], T(0), T(1)); + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + tmat2x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(T(0), T(0), T(1), T(0)); + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + tmat4x2 const & m + ) + { + this->value[0] = col_type(m[0], detail::tvec2(T(0))); + this->value[1] = col_type(m[1], detail::tvec2(T(0))); + this->value[2] = col_type(m[2], detail::tvec2(T(1), T(0))); + } + + template + GLM_FUNC_QUALIFIER tmat3x4::tmat3x4 + ( + tmat4x3 const & m + ) + { + this->value[0] = col_type(m[0], T(0)); + this->value[1] = col_type(m[1], T(0)); + this->value[2] = col_type(m[2], T(0)); + } + + ////////////////////////////////////////////////////////////// + // Unary updatable operators + + template + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator= + ( + tmat3x4 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator= + ( + tmat3x4 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator+= + ( + U const & s + ) + { + this->value[0] += s; + this->value[1] += s; + this->value[2] += s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator+= + ( + tmat3x4 const & m + ) + { + this->value[0] += m[0]; + this->value[1] += m[1]; + this->value[2] += m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator-= + ( + U const & s + ) + { + this->value[0] -= s; + this->value[1] -= s; + this->value[2] -= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator-= + ( + tmat3x4 const & m + ) + { + this->value[0] -= m[0]; + this->value[1] -= m[1]; + this->value[2] -= m[2]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator*= + ( + U const & s + ) + { + this->value[0] *= s; + this->value[1] *= s; + this->value[2] *= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator*= + ( + tmat3x4 const & m + ) + { + return (*this = tmat3x4(*this * m)); + } + + template + template + GLM_FUNC_QUALIFIER tmat3x4 & tmat3x4::operator/= + ( + U const & s + ) + { + this->value[0] /= s; + this->value[1] /= s; + this->value[2] /= s; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator++ () + { + ++this->value[0]; + ++this->value[1]; + ++this->value[2]; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat3x4& tmat3x4::operator-- () + { + --this->value[0]; + --this->value[1]; + --this->value[2]; + return *this; + } + + ////////////////////////////////////////////////////////////// + // Binary operators + + template + GLM_FUNC_QUALIFIER tmat3x4 operator+ + ( + tmat3x4 const & m, + typename tmat3x4::value_type const & s + ) + { + return tmat3x4( + m[0] + s, + m[1] + s, + m[2] + s); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 operator+ + ( + tmat3x4 const & m1, + tmat3x4 const & m2 + ) + { + return tmat3x4( + m1[0] + m2[0], + m1[1] + m2[1], + m1[2] + m2[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 operator- + ( + tmat3x4 const & m, + typename tmat3x4::value_type const & s + ) + { + return tmat3x4( + m[0] - s, + m[1] - s, + m[2] - s); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 operator- + ( + tmat3x4 const & m1, + tmat3x4 const & m2 + ) + { + return tmat3x4( + m1[0] - m2[0], + m1[1] - m2[1], + m1[2] - m2[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 operator* + ( + tmat3x4 const & m, + typename tmat3x4::value_type const & s + ) + { + return tmat3x4( + m[0] * s, + m[1] * s, + m[2] * s); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 operator* + ( + typename tmat3x4::value_type const & s, + tmat3x4 const & m + ) + { + return tmat3x4( + m[0] * s, + m[1] * s, + m[2] * s); + } + + template + GLM_FUNC_QUALIFIER typename tmat3x4::col_type operator* + ( + tmat3x4 const & m, + typename tmat3x4::row_type const & v + ) + { + return typename tmat3x4::col_type( + m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z, + m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z, + m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z, + m[0][3] * v.x + m[1][3] * v.y + m[2][3] * v.z); + } + + template + GLM_FUNC_QUALIFIER typename tmat3x4::row_type operator* + ( + typename tmat3x4::col_type const & v, + tmat3x4 const & m + ) + { + return typename tmat3x4::row_type( + v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2] + v.w * m[0][3], + v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2] + v.w * m[1][3], + v.x * m[2][0] + v.y * m[2][1] + v.z * m[2][2] + v.w * m[2][3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator* + ( + tmat3x4 const & m1, + tmat4x3 const & m2 + ) + { + const T SrcA00 = m1[0][0]; + const T SrcA01 = m1[0][1]; + const T SrcA02 = m1[0][2]; + const T SrcA03 = m1[0][3]; + const T SrcA10 = m1[1][0]; + const T SrcA11 = m1[1][1]; + const T SrcA12 = m1[1][2]; + const T SrcA13 = m1[1][3]; + const T SrcA20 = m1[2][0]; + const T SrcA21 = m1[2][1]; + const T SrcA22 = m1[2][2]; + const T SrcA23 = m1[2][3]; + + const T SrcB00 = m2[0][0]; + const T SrcB01 = m2[0][1]; + const T SrcB02 = m2[0][2]; + const T SrcB10 = m2[1][0]; + const T SrcB11 = m2[1][1]; + const T SrcB12 = m2[1][2]; + const T SrcB20 = m2[2][0]; + const T SrcB21 = m2[2][1]; + const T SrcB22 = m2[2][2]; + const T SrcB30 = m2[3][0]; + const T SrcB31 = m2[3][1]; + const T SrcB32 = m2[3][2]; + + tmat4x4 Result(tmat4x4::null); + Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02; + Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02; + Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02; + Result[0][3] = SrcA03 * SrcB00 + SrcA13 * SrcB01 + SrcA23 * SrcB02; + Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12; + Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12; + Result[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11 + SrcA22 * SrcB12; + Result[1][3] = SrcA03 * SrcB10 + SrcA13 * SrcB11 + SrcA23 * SrcB12; + Result[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21 + SrcA20 * SrcB22; + Result[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21 + SrcA21 * SrcB22; + Result[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21 + SrcA22 * SrcB22; + Result[2][3] = SrcA03 * SrcB20 + SrcA13 * SrcB21 + SrcA23 * SrcB22; + Result[3][0] = SrcA00 * SrcB30 + SrcA10 * SrcB31 + SrcA20 * SrcB32; + Result[3][1] = SrcA01 * SrcB30 + SrcA11 * SrcB31 + SrcA21 * SrcB32; + Result[3][2] = SrcA02 * SrcB30 + SrcA12 * SrcB31 + SrcA22 * SrcB32; + Result[3][3] = SrcA03 * SrcB30 + SrcA13 * SrcB31 + SrcA23 * SrcB32; + return Result; + } + + template + GLM_FUNC_QUALIFIER tmat2x4 operator* + ( + tmat3x4 const & m1, + tmat2x3 const & m2 + ) + { + return tmat2x4( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2], + m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2], + m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 operator* + ( + tmat3x4 const & m1, + tmat3x3 const & m2 + ) + { + return tmat3x4( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2], + m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2], + m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2], + m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2], + m1[0][3] * m2[2][0] + m1[1][3] * m2[2][1] + m1[2][3] * m2[2][2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 operator/ + ( + tmat3x4 const & m, + typename tmat3x4::value_type const & s + ) + { + return tmat3x4( + m[0] / s, + m[1] / s, + m[2] / s); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 operator/ + ( + typename tmat3x4::value_type const & s, + tmat3x4 const & m + ) + { + return tmat3x4( + s / m[0], + s / m[1], + s / m[2]); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tmat3x4 const operator- + ( + tmat3x4 const & m + ) + { + return tmat3x4( + -m[0], + -m[1], + -m[2]); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 const operator++ + ( + tmat3x4 const & m, + int + ) + { + return tmat3x4( + m[0] + T(1), + m[1] + T(1), + m[2] + T(1)); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 const operator-- + ( + tmat3x4 const & m, + int + ) + { + return tmat3x4( + m[0] - T(1), + m[1] - T(1), + m[2] - T(1)); + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tmat3x4 const & m1, + tmat3x4 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tmat3x4 const & m1, + tmat3x4 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]); + } +} //namespace detail +} //namespace glm diff --git a/include/gal/opengl/glm/core/type_mat4x2.hpp b/include/gal/opengl/glm/core/type_mat4x2.hpp index 9b0d2a32d1..873454b868 100644 --- a/include/gal/opengl/glm/core/type_mat4x2.hpp +++ b/include/gal/opengl/glm/core/type_mat4x2.hpp @@ -1,270 +1,270 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_mat4x2.hpp -/// @date 2006-10-01 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_type_mat4x2 -#define glm_core_type_mat4x2 - -#include "type_mat.hpp" - -namespace glm{ -namespace detail -{ - template struct tvec1; - template struct tvec2; - template struct tvec3; - template struct tvec4; - template struct tmat2x2; - template struct tmat2x3; - template struct tmat2x4; - template struct tmat3x2; - template struct tmat3x3; - template struct tmat3x4; - template struct tmat4x2; - template struct tmat4x3; - template struct tmat4x4; - - template - struct tmat4x2 - { - enum ctor{null}; - typedef T value_type; - typedef std::size_t size_type; - typedef tvec2 col_type; - typedef tvec4 row_type; - typedef tmat4x2 type; - typedef tmat2x4 transpose_type; - - static GLM_FUNC_DECL size_type col_size(); - static GLM_FUNC_DECL size_type row_size(); - - GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; - - private: - // Data - col_type value[4]; - - public: - // Constructors - GLM_FUNC_DECL tmat4x2(); - GLM_FUNC_DECL tmat4x2(tmat4x2 const & m); - - GLM_FUNC_DECL explicit tmat4x2( - ctor Null); - GLM_FUNC_DECL explicit tmat4x2( - value_type const & x); - GLM_FUNC_DECL explicit tmat4x2( - value_type const & x0, value_type const & y0, - value_type const & x1, value_type const & y1, - value_type const & x2, value_type const & y2, - value_type const & x3, value_type const & y3); - GLM_FUNC_DECL explicit tmat4x2( - col_type const & v0, - col_type const & v1, - col_type const & v2, - col_type const & v3); - - ////////////////////////////////////// - // Conversions - template - GLM_FUNC_DECL explicit tmat4x2( - U const & x); - - template - < - typename X1, typename Y1, - typename X2, typename Y2, - typename X3, typename Y3, - typename X4, typename Y4 - > - GLM_FUNC_DECL explicit tmat4x2( - X1 const & x1, Y1 const & y1, - X2 const & x2, Y2 const & y2, - X3 const & x3, Y3 const & y3, - X4 const & x4, Y4 const & y4); - - template - GLM_FUNC_DECL explicit tmat4x2( - tvec2 const & v1, - tvec2 const & v2, - tvec2 const & v3, - tvec2 const & v4); - - // Matrix conversions - template - GLM_FUNC_DECL explicit tmat4x2(tmat4x2 const & m); - - GLM_FUNC_DECL explicit tmat4x2(tmat2x2 const & x); - GLM_FUNC_DECL explicit tmat4x2(tmat3x3 const & x); - GLM_FUNC_DECL explicit tmat4x2(tmat4x4 const & x); - GLM_FUNC_DECL explicit tmat4x2(tmat2x3 const & x); - GLM_FUNC_DECL explicit tmat4x2(tmat3x2 const & x); - GLM_FUNC_DECL explicit tmat4x2(tmat2x4 const & x); - GLM_FUNC_DECL explicit tmat4x2(tmat4x3 const & x); - GLM_FUNC_DECL explicit tmat4x2(tmat3x4 const & x); - - // Accesses - GLM_FUNC_DECL col_type & operator[](size_type i); - GLM_FUNC_DECL col_type const & operator[](size_type i) const; - - // Unary updatable operators - GLM_FUNC_DECL tmat4x2& operator= (tmat4x2 const & m); - template - GLM_FUNC_DECL tmat4x2& operator= (tmat4x2 const & m); - template - GLM_FUNC_DECL tmat4x2& operator+= (U const & s); - template - GLM_FUNC_DECL tmat4x2& operator+= (tmat4x2 const & m); - template - GLM_FUNC_DECL tmat4x2& operator-= (U const & s); - template - GLM_FUNC_DECL tmat4x2& operator-= (tmat4x2 const & m); - template - GLM_FUNC_DECL tmat4x2& operator*= (U const & s); - template - GLM_FUNC_DECL tmat4x2& operator*= (tmat4x2 const & m); - template - GLM_FUNC_DECL tmat4x2& operator/= (U const & s); - - GLM_FUNC_DECL tmat4x2& operator++ (); - GLM_FUNC_DECL tmat4x2& operator-- (); - }; - - // Binary operators - template - tmat4x2 operator+ ( - tmat4x2 const & m, - typename tmat4x2::value_type const & s); - - template - tmat4x2 operator+ ( - tmat4x2 const & m1, - tmat4x2 const & m2); - - template - tmat4x2 operator- ( - tmat4x2 const & m, - typename tmat4x2::value_type const & s); - - template - tmat4x2 operator- ( - tmat4x2 const & m1, - tmat4x2 const & m2); - - template - tmat4x2 operator* ( - tmat4x2 const & m, - typename tmat4x2::value_type const & s); - - template - tmat4x2 operator* ( - typename tmat4x2::value_type const & s, - tmat4x2 const & m); - - template - typename tmat4x2::col_type operator* ( - tmat4x2 const & m, - typename tmat4x2::row_type const & v); - - template - typename tmat4x2::row_type operator* ( - typename tmat4x2::col_type const & v, - tmat4x2 const & m); - - template - tmat3x2 operator* ( - tmat4x2 const & m1, - tmat3x4 const & m2); - - template - tmat4x2 operator* ( - tmat4x2 const & m1, - tmat4x4 const & m2); - - template - tmat2x3 operator* ( - tmat4x3 const & m1, - tmat2x4 const & m2); - - template - tmat4x2 operator/ ( - tmat4x2 const & m, - typename tmat4x2::value_type const & s); - - template - tmat4x2 operator/ ( - typename tmat4x2::value_type const & s, - tmat4x2 const & m); - - // Unary constant operators - template - tmat4x2 const operator- ( - tmat4x2 const & m); - - template - tmat4x2 const operator-- ( - tmat4x2 const & m, - int); - - template - tmat4x2 const operator++ ( - tmat4x2 const & m, - int); -} //namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 4 columns of 2 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x2 lowp_mat4x2; - - /// 4 columns of 2 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x2 mediump_mat4x2; - - /// 4 columns of 2 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x2 highp_mat4x2; - - /// @} -}//namespace glm - -#ifndef GLM_EXTERNAL_TEMPLATE -#include "type_mat4x2.inl" -#endif - -#endif //glm_core_type_mat4x2 +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat4x2.hpp +/// @date 2006-10-01 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_mat4x2 +#define glm_core_type_mat4x2 + +#include "type_mat.hpp" + +namespace glm{ +namespace detail +{ + template struct tvec1; + template struct tvec2; + template struct tvec3; + template struct tvec4; + template struct tmat2x2; + template struct tmat2x3; + template struct tmat2x4; + template struct tmat3x2; + template struct tmat3x3; + template struct tmat3x4; + template struct tmat4x2; + template struct tmat4x3; + template struct tmat4x4; + + template + struct tmat4x2 + { + enum ctor{null}; + typedef T value_type; + typedef std::size_t size_type; + typedef tvec2 col_type; + typedef tvec4 row_type; + typedef tmat4x2 type; + typedef tmat2x4 transpose_type; + + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + private: + // Data + col_type value[4]; + + public: + // Constructors + GLM_FUNC_DECL tmat4x2(); + GLM_FUNC_DECL tmat4x2(tmat4x2 const & m); + + GLM_FUNC_DECL explicit tmat4x2( + ctor Null); + GLM_FUNC_DECL explicit tmat4x2( + value_type const & x); + GLM_FUNC_DECL explicit tmat4x2( + value_type const & x0, value_type const & y0, + value_type const & x1, value_type const & y1, + value_type const & x2, value_type const & y2, + value_type const & x3, value_type const & y3); + GLM_FUNC_DECL explicit tmat4x2( + col_type const & v0, + col_type const & v1, + col_type const & v2, + col_type const & v3); + + ////////////////////////////////////// + // Conversions + template + GLM_FUNC_DECL explicit tmat4x2( + U const & x); + + template + < + typename X1, typename Y1, + typename X2, typename Y2, + typename X3, typename Y3, + typename X4, typename Y4 + > + GLM_FUNC_DECL explicit tmat4x2( + X1 const & x1, Y1 const & y1, + X2 const & x2, Y2 const & y2, + X3 const & x3, Y3 const & y3, + X4 const & x4, Y4 const & y4); + + template + GLM_FUNC_DECL explicit tmat4x2( + tvec2 const & v1, + tvec2 const & v2, + tvec2 const & v3, + tvec2 const & v4); + + // Matrix conversions + template + GLM_FUNC_DECL explicit tmat4x2(tmat4x2 const & m); + + GLM_FUNC_DECL explicit tmat4x2(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat4x3 const & x); + GLM_FUNC_DECL explicit tmat4x2(tmat3x4 const & x); + + // Accesses + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; + + // Unary updatable operators + GLM_FUNC_DECL tmat4x2& operator= (tmat4x2 const & m); + template + GLM_FUNC_DECL tmat4x2& operator= (tmat4x2 const & m); + template + GLM_FUNC_DECL tmat4x2& operator+= (U const & s); + template + GLM_FUNC_DECL tmat4x2& operator+= (tmat4x2 const & m); + template + GLM_FUNC_DECL tmat4x2& operator-= (U const & s); + template + GLM_FUNC_DECL tmat4x2& operator-= (tmat4x2 const & m); + template + GLM_FUNC_DECL tmat4x2& operator*= (U const & s); + template + GLM_FUNC_DECL tmat4x2& operator*= (tmat4x2 const & m); + template + GLM_FUNC_DECL tmat4x2& operator/= (U const & s); + + GLM_FUNC_DECL tmat4x2& operator++ (); + GLM_FUNC_DECL tmat4x2& operator-- (); + }; + + // Binary operators + template + tmat4x2 operator+ ( + tmat4x2 const & m, + typename tmat4x2::value_type const & s); + + template + tmat4x2 operator+ ( + tmat4x2 const & m1, + tmat4x2 const & m2); + + template + tmat4x2 operator- ( + tmat4x2 const & m, + typename tmat4x2::value_type const & s); + + template + tmat4x2 operator- ( + tmat4x2 const & m1, + tmat4x2 const & m2); + + template + tmat4x2 operator* ( + tmat4x2 const & m, + typename tmat4x2::value_type const & s); + + template + tmat4x2 operator* ( + typename tmat4x2::value_type const & s, + tmat4x2 const & m); + + template + typename tmat4x2::col_type operator* ( + tmat4x2 const & m, + typename tmat4x2::row_type const & v); + + template + typename tmat4x2::row_type operator* ( + typename tmat4x2::col_type const & v, + tmat4x2 const & m); + + template + tmat3x2 operator* ( + tmat4x2 const & m1, + tmat3x4 const & m2); + + template + tmat4x2 operator* ( + tmat4x2 const & m1, + tmat4x4 const & m2); + + template + tmat2x3 operator* ( + tmat4x3 const & m1, + tmat2x4 const & m2); + + template + tmat4x2 operator/ ( + tmat4x2 const & m, + typename tmat4x2::value_type const & s); + + template + tmat4x2 operator/ ( + typename tmat4x2::value_type const & s, + tmat4x2 const & m); + + // Unary constant operators + template + tmat4x2 const operator- ( + tmat4x2 const & m); + + template + tmat4x2 const operator-- ( + tmat4x2 const & m, + int); + + template + tmat4x2 const operator++ ( + tmat4x2 const & m, + int); +} //namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 4 columns of 2 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x2 lowp_mat4x2; + + /// 4 columns of 2 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x2 mediump_mat4x2; + + /// 4 columns of 2 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x2 highp_mat4x2; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_mat4x2.inl" +#endif + +#endif //glm_core_type_mat4x2 diff --git a/include/gal/opengl/glm/core/type_mat4x2.inl b/include/gal/opengl/glm/core/type_mat4x2.inl index 3c4cd240f0..5ee0272dc0 100644 --- a/include/gal/opengl/glm/core/type_mat4x2.inl +++ b/include/gal/opengl/glm/core/type_mat4x2.inl @@ -1,728 +1,728 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_mat4x2.inl -/// @date 2006-10-01 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm{ -namespace detail -{ - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x2::size_type tmat4x2::length() const - { - return 4; - } - - template - GLM_FUNC_QUALIFIER typename tmat4x2::size_type tmat4x2::col_size() - { - return 2; - } - - template - GLM_FUNC_QUALIFIER typename tmat4x2::size_type tmat4x2::row_size() - { - return 4; - } - - ////////////////////////////////////// - // Accesses - - template - GLM_FUNC_QUALIFIER typename tmat4x2::col_type & - tmat4x2::operator[] - ( - size_type i - ) - { - assert(i < this->length()); - return this->value[i]; - } - - template - GLM_FUNC_QUALIFIER typename tmat4x2::col_type const & - tmat4x2::operator[] - ( - size_type i - ) const - { - assert(i < this->length()); - return this->value[i]; - } - - ////////////////////////////////////////////////////////////// - // Constructors - - template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2() - { - value_type const Zero(0); - value_type const One(1); - this->value[0] = col_type(One, Zero); - this->value[1] = col_type(Zero, One); - this->value[2] = col_type(Zero, Zero); - this->value[3] = col_type(Zero, Zero); - } - - template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - tmat4x2 const & m - ) - { - this->value[0] = m.value[0]; - this->value[1] = m.value[1]; - this->value[2] = m.value[2]; - this->value[3] = m.value[3]; - } - - template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - ctor - ) - {} - - template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - value_type const & s - ) - { - value_type const Zero(0); - this->value[0] = col_type(s, Zero); - this->value[1] = col_type(Zero, s); - this->value[2] = col_type(Zero, Zero); - this->value[3] = col_type(Zero, Zero); - } - - template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - value_type const & x0, value_type const & y0, - value_type const & x1, value_type const & y1, - value_type const & x2, value_type const & y2, - value_type const & x3, value_type const & y3 - ) - { - this->value[0] = col_type(x0, y0); - this->value[1] = col_type(x1, y1); - this->value[2] = col_type(x2, y2); - this->value[3] = col_type(x3, y3); - } - - template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - col_type const & v0, - col_type const & v1, - col_type const & v2, - col_type const & v3 - ) - { - this->value[0] = v0; - this->value[1] = v1; - this->value[2] = v2; - this->value[3] = v3; - } - - ////////////////////////////////////// - // Convertion constructors - template - template - GLM_FUNC_DECL tmat4x2::tmat4x2 - ( - U const & s - ) - { - value_type const Zero(0); - this->value[0] = tvec2(value_type(s), Zero); - this->value[1] = tvec2(Zero, value_type(s)); - this->value[2] = tvec2(Zero, Zero); - this->value[3] = tvec2(Zero, Zero); - } - - template - template < - typename X1, typename Y1, - typename X2, typename Y2, - typename X3, typename Y3, - typename X4, typename Y4> - GLM_FUNC_DECL tmat4x2::tmat4x2 - ( - X1 const & x1, Y1 const & y1, - X2 const & x2, Y2 const & y2, - X3 const & x3, Y3 const & y3, - X4 const & x4, Y4 const & y4 - ) - { - this->value[0] = col_type(value_type(x1), value_type(y1)); - this->value[1] = col_type(value_type(x2), value_type(y2)); - this->value[2] = col_type(value_type(x3), value_type(y3)); - this->value[3] = col_type(value_type(x4), value_type(y4)); - } - - template - template - GLM_FUNC_DECL tmat4x2::tmat4x2 - ( - tvec2 const & v1, - tvec2 const & v2, - tvec2 const & v3, - tvec2 const & v4 - ) - { - this->value[0] = col_type(v1); - this->value[1] = col_type(v2); - this->value[2] = col_type(v3); - this->value[3] = col_type(v4); - } - - // Conversion - template - template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - tmat4x2 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(m[2]); - this->value[3] = col_type(m[3]); - } - - template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - tmat2x2 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(value_type(0)); - this->value[3] = col_type(value_type(0)); - } - - template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - tmat3x3 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(m[2]); - this->value[3] = col_type(value_type(0)); - } - - template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - tmat4x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(m[2]); - this->value[3] = col_type(m[3]); - } - - template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - tmat2x3 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(value_type(0)); - this->value[3] = col_type(value_type(0)); - } - - template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - tmat3x2 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(m[2]); - this->value[3] = col_type(value_type(0)); - } - - template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - tmat2x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(value_type(0)); - this->value[3] = col_type(value_type(0)); - } - - template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - tmat4x3 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(m[2]); - this->value[3] = col_type(m[3]); - } - - template - GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 - ( - tmat3x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(m[2]); - this->value[3] = col_type(value_type(0)); - } - - ////////////////////////////////////////////////////////////// - // Unary updatable operators - - template - GLM_FUNC_QUALIFIER tmat4x2& tmat4x2::operator= - ( - tmat4x2 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = m[2]; - this->value[3] = m[3]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x2& tmat4x2::operator= - ( - tmat4x2 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = m[2]; - this->value[3] = m[3]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator+= - ( - U const & s - ) - { - this->value[0] += s; - this->value[1] += s; - this->value[2] += s; - this->value[3] += s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator+= - ( - tmat4x2 const & m - ) - { - this->value[0] += m[0]; - this->value[1] += m[1]; - this->value[2] += m[2]; - this->value[3] += m[3]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator-= - ( - U const & s - ) - { - this->value[0] -= s; - this->value[1] -= s; - this->value[2] -= s; - this->value[3] -= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator-= - ( - tmat4x2 const & m - ) - { - this->value[0] -= m[0]; - this->value[1] -= m[1]; - this->value[2] -= m[2]; - this->value[3] -= m[3]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator*= - ( - U const & s - ) - { - this->value[0] *= s; - this->value[1] *= s; - this->value[2] *= s; - this->value[3] *= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator*= - ( - tmat4x2 const & m - ) - { - return (*this = tmat4x2(*this * m)); - } - - template - template - GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator/= - ( - U const & s - ) - { - this->value[0] /= s; - this->value[1] /= s; - this->value[2] /= s; - this->value[3] /= s; - return *this; - } - - template - GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator++ () - { - ++this->value[0]; - ++this->value[1]; - ++this->value[2]; - ++this->value[3]; - return *this; - } - - template - GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator-- () - { - --this->value[0]; - --this->value[1]; - --this->value[2]; - --this->value[3]; - return *this; - } - - ////////////////////////////////////////////////////////////// - // Binary operators - - template - GLM_FUNC_QUALIFIER tmat4x2 operator+ - ( - tmat4x2 const & m, - typename tmat4x2::value_type const & s - ) - { - return tmat4x2( - m[0] + s, - m[1] + s, - m[2] + s, - m[3] + s); - } - - template - GLM_FUNC_QUALIFIER tmat4x2 operator+ - ( - tmat4x2 const & m1, - tmat4x2 const & m2 - ) - { - return tmat4x2( - m1[0] + m2[0], - m1[1] + m2[1], - m1[2] + m2[2], - m1[3] + m2[3]); - } - - template - GLM_FUNC_QUALIFIER tmat4x2 operator- - ( - tmat4x2 const & m, - typename tmat4x2::value_type const & s - ) - { - return tmat4x2( - m[0] - s, - m[1] - s, - m[2] - s, - m[3] - s); - } - - template - GLM_FUNC_QUALIFIER tmat4x2 operator- - ( - tmat4x2 const & m1, - tmat4x2 const & m2 - ) - { - return tmat4x2( - m1[0] - m2[0], - m1[1] - m2[1], - m1[2] - m2[2], - m1[3] - m2[3]); - } - - template - GLM_FUNC_QUALIFIER tmat4x2 operator* - ( - tmat4x2 const & m, - typename tmat4x2::value_type const & s - ) - { - return tmat4x2( - m[0] * s, - m[1] * s, - m[2] * s, - m[3] * s); - } - - template - GLM_FUNC_QUALIFIER tmat4x2 operator* - ( - typename tmat4x2::value_type const & s, - tmat4x2 const & m - ) - { - return tmat4x2( - m[0] * s, - m[1] * s, - m[2] * s, - m[3] * s); - } - - template - GLM_FUNC_QUALIFIER typename tmat4x2::col_type operator* - ( - tmat4x2 const & m, - typename tmat4x2::row_type const & v) - { - return typename tmat4x2::col_type( - m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w, - m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * v.w); - } - - template - GLM_FUNC_QUALIFIER typename tmat4x2::row_type operator* - ( - typename tmat4x2::col_type const & v, - tmat4x2 const & m) - { - return typename tmat4x2::row_type( - v.x * m[0][0] + v.y * m[0][1], - v.x * m[1][0] + v.y * m[1][1], - v.x * m[2][0] + v.y * m[2][1], - v.x * m[3][0] + v.y * m[3][1]); - } - - template - GLM_FUNC_QUALIFIER tmat2x2 operator* - ( - tmat4x2 const & m1, - tmat2x4 const & m2 - ) - { - T const SrcA00 = m1[0][0]; - T const SrcA01 = m1[0][1]; - T const SrcA10 = m1[1][0]; - T const SrcA11 = m1[1][1]; - T const SrcA20 = m1[2][0]; - T const SrcA21 = m1[2][1]; - T const SrcA30 = m1[3][0]; - T const SrcA31 = m1[3][1]; - - T const SrcB00 = m2[0][0]; - T const SrcB01 = m2[0][1]; - T const SrcB02 = m2[0][2]; - T const SrcB03 = m2[0][3]; - T const SrcB10 = m2[1][0]; - T const SrcB11 = m2[1][1]; - T const SrcB12 = m2[1][2]; - T const SrcB13 = m2[1][3]; - - tmat2x2 Result(tmat2x2::null); - Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02 + SrcA30 * SrcB03; - Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02 + SrcA31 * SrcB03; - Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12 + SrcA30 * SrcB13; - Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12 + SrcA31 * SrcB13; - return Result; - } - - template - GLM_FUNC_QUALIFIER tmat3x2 operator* - ( - tmat4x2 const & m1, - tmat3x4 const & m2 - ) - { - return tmat3x2( - m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], - m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3], - m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3], - m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3], - m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3], - m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3]); - } - - template - GLM_FUNC_QUALIFIER tmat4x2 operator* - ( - tmat4x2 const & m1, - tmat4x4 const & m2 - ) - { - return tmat4x2( - m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], - m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3], - m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3], - m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3], - m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3], - m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3], - m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2] + m1[3][0] * m2[3][3], - m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2] + m1[3][1] * m2[3][3]); - } - - template - GLM_FUNC_QUALIFIER tmat4x2 operator/ - ( - tmat4x2 const & m, - typename tmat4x2::value_type const & s - ) - { - return tmat4x2( - m[0] / s, - m[1] / s, - m[2] / s, - m[3] / s); - } - - template - GLM_FUNC_QUALIFIER tmat4x2 operator/ - ( - typename tmat4x2::value_type const & s, - tmat4x2 const & m - ) - { - return tmat4x2( - s / m[0], - s / m[1], - s / m[2], - s / m[3]); - } - - // Unary constant operators - template - GLM_FUNC_QUALIFIER tmat4x2 const operator- - ( - tmat4x2 const & m - ) - { - return tmat4x2( - -m[0], - -m[1], - -m[2], - -m[3]); - } - - template - GLM_FUNC_QUALIFIER tmat4x2 const operator++ - ( - tmat4x2 const & m, - int - ) - { - return tmat4x2( - m[0] + typename tmat4x2::value_type(1), - m[1] + typename tmat4x2::value_type(1), - m[2] + typename tmat4x2::value_type(1), - m[3] + typename tmat4x2::value_type(1)); - } - - template - GLM_FUNC_QUALIFIER tmat4x2 const operator-- - ( - tmat4x2 const & m, - int - ) - { - return tmat4x2( - m[0] - typename tmat4x2::value_type(1), - m[1] - typename tmat4x2::value_type(1), - m[2] - typename tmat4x2::value_type(1), - m[3] - typename tmat4x2::value_type(1)); - } - - ////////////////////////////////////// - // Boolean operators - - template - GLM_FUNC_QUALIFIER bool operator== - ( - tmat4x2 const & m1, - tmat4x2 const & m2 - ) - { - return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]); - } - - template - GLM_FUNC_QUALIFIER bool operator!= - ( - tmat4x2 const & m1, - tmat4x2 const & m2 - ) - { - return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]); - } -} //namespace detail -} //namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat4x2.inl +/// @date 2006-10-01 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x2::size_type tmat4x2::length() const + { + return 4; + } + + template + GLM_FUNC_QUALIFIER typename tmat4x2::size_type tmat4x2::col_size() + { + return 2; + } + + template + GLM_FUNC_QUALIFIER typename tmat4x2::size_type tmat4x2::row_size() + { + return 4; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tmat4x2::col_type & + tmat4x2::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return this->value[i]; + } + + template + GLM_FUNC_QUALIFIER typename tmat4x2::col_type const & + tmat4x2::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return this->value[i]; + } + + ////////////////////////////////////////////////////////////// + // Constructors + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2() + { + value_type const Zero(0); + value_type const One(1); + this->value[0] = col_type(One, Zero); + this->value[1] = col_type(Zero, One); + this->value[2] = col_type(Zero, Zero); + this->value[3] = col_type(Zero, Zero); + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + tmat4x2 const & m + ) + { + this->value[0] = m.value[0]; + this->value[1] = m.value[1]; + this->value[2] = m.value[2]; + this->value[3] = m.value[3]; + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + value_type const & s + ) + { + value_type const Zero(0); + this->value[0] = col_type(s, Zero); + this->value[1] = col_type(Zero, s); + this->value[2] = col_type(Zero, Zero); + this->value[3] = col_type(Zero, Zero); + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + value_type const & x0, value_type const & y0, + value_type const & x1, value_type const & y1, + value_type const & x2, value_type const & y2, + value_type const & x3, value_type const & y3 + ) + { + this->value[0] = col_type(x0, y0); + this->value[1] = col_type(x1, y1); + this->value[2] = col_type(x2, y2); + this->value[3] = col_type(x3, y3); + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + col_type const & v0, + col_type const & v1, + col_type const & v2, + col_type const & v3 + ) + { + this->value[0] = v0; + this->value[1] = v1; + this->value[2] = v2; + this->value[3] = v3; + } + + ////////////////////////////////////// + // Convertion constructors + template + template + GLM_FUNC_DECL tmat4x2::tmat4x2 + ( + U const & s + ) + { + value_type const Zero(0); + this->value[0] = tvec2(value_type(s), Zero); + this->value[1] = tvec2(Zero, value_type(s)); + this->value[2] = tvec2(Zero, Zero); + this->value[3] = tvec2(Zero, Zero); + } + + template + template < + typename X1, typename Y1, + typename X2, typename Y2, + typename X3, typename Y3, + typename X4, typename Y4> + GLM_FUNC_DECL tmat4x2::tmat4x2 + ( + X1 const & x1, Y1 const & y1, + X2 const & x2, Y2 const & y2, + X3 const & x3, Y3 const & y3, + X4 const & x4, Y4 const & y4 + ) + { + this->value[0] = col_type(value_type(x1), value_type(y1)); + this->value[1] = col_type(value_type(x2), value_type(y2)); + this->value[2] = col_type(value_type(x3), value_type(y3)); + this->value[3] = col_type(value_type(x4), value_type(y4)); + } + + template + template + GLM_FUNC_DECL tmat4x2::tmat4x2 + ( + tvec2 const & v1, + tvec2 const & v2, + tvec2 const & v3, + tvec2 const & v4 + ) + { + this->value[0] = col_type(v1); + this->value[1] = col_type(v2); + this->value[2] = col_type(v3); + this->value[3] = col_type(v4); + } + + // Conversion + template + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + tmat4x2 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + this->value[3] = col_type(m[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + tmat2x2 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(value_type(0)); + this->value[3] = col_type(value_type(0)); + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + tmat3x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + this->value[3] = col_type(value_type(0)); + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + tmat4x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + this->value[3] = col_type(m[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + tmat2x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(value_type(0)); + this->value[3] = col_type(value_type(0)); + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + tmat3x2 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + this->value[3] = col_type(value_type(0)); + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + tmat2x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(value_type(0)); + this->value[3] = col_type(value_type(0)); + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + tmat4x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + this->value[3] = col_type(m[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x2::tmat4x2 + ( + tmat3x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + this->value[3] = col_type(value_type(0)); + } + + ////////////////////////////////////////////////////////////// + // Unary updatable operators + + template + GLM_FUNC_QUALIFIER tmat4x2& tmat4x2::operator= + ( + tmat4x2 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + this->value[3] = m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x2& tmat4x2::operator= + ( + tmat4x2 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + this->value[3] = m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator+= + ( + U const & s + ) + { + this->value[0] += s; + this->value[1] += s; + this->value[2] += s; + this->value[3] += s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator+= + ( + tmat4x2 const & m + ) + { + this->value[0] += m[0]; + this->value[1] += m[1]; + this->value[2] += m[2]; + this->value[3] += m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator-= + ( + U const & s + ) + { + this->value[0] -= s; + this->value[1] -= s; + this->value[2] -= s; + this->value[3] -= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator-= + ( + tmat4x2 const & m + ) + { + this->value[0] -= m[0]; + this->value[1] -= m[1]; + this->value[2] -= m[2]; + this->value[3] -= m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator*= + ( + U const & s + ) + { + this->value[0] *= s; + this->value[1] *= s; + this->value[2] *= s; + this->value[3] *= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator*= + ( + tmat4x2 const & m + ) + { + return (*this = tmat4x2(*this * m)); + } + + template + template + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator/= + ( + U const & s + ) + { + this->value[0] /= s; + this->value[1] /= s; + this->value[2] /= s; + this->value[3] /= s; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator++ () + { + ++this->value[0]; + ++this->value[1]; + ++this->value[2]; + ++this->value[3]; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat4x2 & tmat4x2::operator-- () + { + --this->value[0]; + --this->value[1]; + --this->value[2]; + --this->value[3]; + return *this; + } + + ////////////////////////////////////////////////////////////// + // Binary operators + + template + GLM_FUNC_QUALIFIER tmat4x2 operator+ + ( + tmat4x2 const & m, + typename tmat4x2::value_type const & s + ) + { + return tmat4x2( + m[0] + s, + m[1] + s, + m[2] + s, + m[3] + s); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 operator+ + ( + tmat4x2 const & m1, + tmat4x2 const & m2 + ) + { + return tmat4x2( + m1[0] + m2[0], + m1[1] + m2[1], + m1[2] + m2[2], + m1[3] + m2[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 operator- + ( + tmat4x2 const & m, + typename tmat4x2::value_type const & s + ) + { + return tmat4x2( + m[0] - s, + m[1] - s, + m[2] - s, + m[3] - s); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 operator- + ( + tmat4x2 const & m1, + tmat4x2 const & m2 + ) + { + return tmat4x2( + m1[0] - m2[0], + m1[1] - m2[1], + m1[2] - m2[2], + m1[3] - m2[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 operator* + ( + tmat4x2 const & m, + typename tmat4x2::value_type const & s + ) + { + return tmat4x2( + m[0] * s, + m[1] * s, + m[2] * s, + m[3] * s); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 operator* + ( + typename tmat4x2::value_type const & s, + tmat4x2 const & m + ) + { + return tmat4x2( + m[0] * s, + m[1] * s, + m[2] * s, + m[3] * s); + } + + template + GLM_FUNC_QUALIFIER typename tmat4x2::col_type operator* + ( + tmat4x2 const & m, + typename tmat4x2::row_type const & v) + { + return typename tmat4x2::col_type( + m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w, + m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * v.w); + } + + template + GLM_FUNC_QUALIFIER typename tmat4x2::row_type operator* + ( + typename tmat4x2::col_type const & v, + tmat4x2 const & m) + { + return typename tmat4x2::row_type( + v.x * m[0][0] + v.y * m[0][1], + v.x * m[1][0] + v.y * m[1][1], + v.x * m[2][0] + v.y * m[2][1], + v.x * m[3][0] + v.y * m[3][1]); + } + + template + GLM_FUNC_QUALIFIER tmat2x2 operator* + ( + tmat4x2 const & m1, + tmat2x4 const & m2 + ) + { + T const SrcA00 = m1[0][0]; + T const SrcA01 = m1[0][1]; + T const SrcA10 = m1[1][0]; + T const SrcA11 = m1[1][1]; + T const SrcA20 = m1[2][0]; + T const SrcA21 = m1[2][1]; + T const SrcA30 = m1[3][0]; + T const SrcA31 = m1[3][1]; + + T const SrcB00 = m2[0][0]; + T const SrcB01 = m2[0][1]; + T const SrcB02 = m2[0][2]; + T const SrcB03 = m2[0][3]; + T const SrcB10 = m2[1][0]; + T const SrcB11 = m2[1][1]; + T const SrcB12 = m2[1][2]; + T const SrcB13 = m2[1][3]; + + tmat2x2 Result(tmat2x2::null); + Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02 + SrcA30 * SrcB03; + Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02 + SrcA31 * SrcB03; + Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12 + SrcA30 * SrcB13; + Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12 + SrcA31 * SrcB13; + return Result; + } + + template + GLM_FUNC_QUALIFIER tmat3x2 operator* + ( + tmat4x2 const & m1, + tmat3x4 const & m2 + ) + { + return tmat3x2( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 operator* + ( + tmat4x2 const & m1, + tmat4x4 const & m2 + ) + { + return tmat4x2( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3], + m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2] + m1[3][0] * m2[3][3], + m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2] + m1[3][1] * m2[3][3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 operator/ + ( + tmat4x2 const & m, + typename tmat4x2::value_type const & s + ) + { + return tmat4x2( + m[0] / s, + m[1] / s, + m[2] / s, + m[3] / s); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 operator/ + ( + typename tmat4x2::value_type const & s, + tmat4x2 const & m + ) + { + return tmat4x2( + s / m[0], + s / m[1], + s / m[2], + s / m[3]); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tmat4x2 const operator- + ( + tmat4x2 const & m + ) + { + return tmat4x2( + -m[0], + -m[1], + -m[2], + -m[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 const operator++ + ( + tmat4x2 const & m, + int + ) + { + return tmat4x2( + m[0] + typename tmat4x2::value_type(1), + m[1] + typename tmat4x2::value_type(1), + m[2] + typename tmat4x2::value_type(1), + m[3] + typename tmat4x2::value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat4x2 const operator-- + ( + tmat4x2 const & m, + int + ) + { + return tmat4x2( + m[0] - typename tmat4x2::value_type(1), + m[1] - typename tmat4x2::value_type(1), + m[2] - typename tmat4x2::value_type(1), + m[3] - typename tmat4x2::value_type(1)); + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tmat4x2 const & m1, + tmat4x2 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tmat4x2 const & m1, + tmat4x2 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]); + } +} //namespace detail +} //namespace glm diff --git a/include/gal/opengl/glm/core/type_mat4x3.hpp b/include/gal/opengl/glm/core/type_mat4x3.hpp index b878cbeb13..76717c4da5 100644 --- a/include/gal/opengl/glm/core/type_mat4x3.hpp +++ b/include/gal/opengl/glm/core/type_mat4x3.hpp @@ -1,268 +1,268 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_mat4x3.hpp -/// @date 2006-08-04 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_type_mat4x3 -#define glm_core_type_mat4x3 - -#include "type_mat.hpp" - -namespace glm{ -namespace detail -{ - template struct tvec1; - template struct tvec2; - template struct tvec3; - template struct tvec4; - template struct tmat2x2; - template struct tmat2x3; - template struct tmat2x4; - template struct tmat3x2; - template struct tmat3x3; - template struct tmat3x4; - template struct tmat4x2; - template struct tmat4x3; - template struct tmat4x4; - - template - struct tmat4x3 - { - enum ctor{null}; - typedef T value_type; - typedef std::size_t size_type; - typedef tvec3 col_type; - typedef tvec4 row_type; - typedef tmat4x3 type; - typedef tmat3x4 transpose_type; - - static GLM_FUNC_DECL size_type col_size(); - static GLM_FUNC_DECL size_type row_size(); - - GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; - - private: - // Data - col_type value[4]; - - public: - // Constructors - GLM_FUNC_DECL tmat4x3(); - GLM_FUNC_DECL tmat4x3(tmat4x3 const & m); - - GLM_FUNC_DECL explicit tmat4x3( - ctor Null); - GLM_FUNC_DECL explicit tmat4x3( - value_type const & x); - GLM_FUNC_DECL explicit tmat4x3( - value_type const & x0, value_type const & y0, value_type const & z0, - value_type const & x1, value_type const & y1, value_type const & z1, - value_type const & x2, value_type const & y2, value_type const & z2, - value_type const & x3, value_type const & y3, value_type const & z3); - GLM_FUNC_DECL explicit tmat4x3( - col_type const & v0, - col_type const & v1, - col_type const & v2, - col_type const & v3); - - ////////////////////////////////////// - // Conversions - template - GLM_FUNC_DECL explicit tmat4x3( - U const & x); - - template < - typename X1, typename Y1, typename Z1, - typename X2, typename Y2, typename Z2, - typename X3, typename Y3, typename Z3, - typename X4, typename Y4, typename Z4> - GLM_FUNC_DECL explicit tmat4x3( - X1 const & x1, Y1 const & y1, Z1 const & z1, - X2 const & x2, Y2 const & y2, Z2 const & z2, - X3 const & x3, Y3 const & y3, Z3 const & z3, - X4 const & x4, Y4 const & y4, Z4 const & z4); - - template - GLM_FUNC_DECL explicit tmat4x3( - tvec3 const & v1, - tvec3 const & v2, - tvec3 const & v3, - tvec3 const & v4); - - // Matrix conversions - template - GLM_FUNC_DECL explicit tmat4x3(tmat4x3 const & m); - - GLM_FUNC_DECL explicit tmat4x3(tmat2x2 const & x); - GLM_FUNC_DECL explicit tmat4x3(tmat3x3 const & x); - GLM_FUNC_DECL explicit tmat4x3(tmat4x4 const & x); - GLM_FUNC_DECL explicit tmat4x3(tmat2x3 const & x); - GLM_FUNC_DECL explicit tmat4x3(tmat3x2 const & x); - GLM_FUNC_DECL explicit tmat4x3(tmat2x4 const & x); - GLM_FUNC_DECL explicit tmat4x3(tmat4x2 const & x); - GLM_FUNC_DECL explicit tmat4x3(tmat3x4 const & x); - - // Accesses - col_type & operator[](size_type i); - col_type const & operator[](size_type i) const; - - // Unary updatable operators - GLM_FUNC_DECL tmat4x3 & operator= (tmat4x3 const & m); - template - GLM_FUNC_DECL tmat4x3 & operator= (tmat4x3 const & m); - template - GLM_FUNC_DECL tmat4x3 & operator+= (U const & s); - template - GLM_FUNC_DECL tmat4x3 & operator+= (tmat4x3 const & m); - template - GLM_FUNC_DECL tmat4x3 & operator-= (U const & s); - template - GLM_FUNC_DECL tmat4x3 & operator-= (tmat4x3 const & m); - template - GLM_FUNC_DECL tmat4x3 & operator*= (U const & s); - template - GLM_FUNC_DECL tmat4x3 & operator*= (tmat4x3 const & m); - template - GLM_FUNC_DECL tmat4x3 & operator/= (U const & s); - - GLM_FUNC_DECL tmat4x3 & operator++ (); - GLM_FUNC_DECL tmat4x3 & operator-- (); - }; - - // Binary operators - template - tmat4x3 operator+ ( - tmat4x3 const & m, - typename tmat4x3::value_type const & s); - - template - tmat4x3 operator+ ( - tmat4x3 const & m1, - tmat4x3 const & m2); - - template - tmat4x3 operator- ( - tmat4x3 const & m, - typename tmat4x3::value_type const & s); - - template - tmat4x3 operator- ( - tmat4x3 const & m1, - tmat4x3 const & m2); - - template - tmat4x3 operator* ( - tmat4x3 const & m, - typename tmat4x3::value_type const & s); - - template - tmat4x3 operator* ( - typename tmat4x3::value_type const & s, - tmat4x3 const & m); - - template - typename tmat4x3::col_type operator* ( - tmat4x3 const & m, - typename tmat4x3::row_type const & v); - - template - typename tmat4x3::row_type operator* ( - typename tmat4x3::col_type const & v, - tmat4x3 const & m); - - template - tmat2x3 operator* ( - tmat4x3 const & m1, - tmat2x4 const & m2); - - template - tmat3x3 operator* ( - tmat4x3 const & m1, - tmat3x4 const & m2); - - template - tmat4x3 operator* ( - tmat4x3 const & m1, - tmat4x4 const & m2); - - template - tmat4x3 operator/ ( - tmat4x3 const & m, - typename tmat4x3::value_type const & s); - - template - tmat4x3 operator/ ( - typename tmat4x3::value_type const & s, - tmat4x3 const & m); - - // Unary constant operators - template - tmat4x3 const operator- ( - tmat4x3 const & m); - - template - tmat4x3 const operator-- ( - tmat4x3 const & m, - int); - - template - tmat4x3 const operator++ ( - tmat4x3 const & m, - int); -}//namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 4 columns of 3 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x3 lowp_mat4x3; - - /// 4 columns of 3 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x3 mediump_mat4x3; - - /// 4 columns of 3 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x3 highp_mat4x3; - - /// @} -}//namespace glm - -#ifndef GLM_EXTERNAL_TEMPLATE -#include "type_mat4x3.inl" -#endif //GLM_EXTERNAL_TEMPLATE - -#endif//glm_core_type_mat4x3 +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat4x3.hpp +/// @date 2006-08-04 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_mat4x3 +#define glm_core_type_mat4x3 + +#include "type_mat.hpp" + +namespace glm{ +namespace detail +{ + template struct tvec1; + template struct tvec2; + template struct tvec3; + template struct tvec4; + template struct tmat2x2; + template struct tmat2x3; + template struct tmat2x4; + template struct tmat3x2; + template struct tmat3x3; + template struct tmat3x4; + template struct tmat4x2; + template struct tmat4x3; + template struct tmat4x4; + + template + struct tmat4x3 + { + enum ctor{null}; + typedef T value_type; + typedef std::size_t size_type; + typedef tvec3 col_type; + typedef tvec4 row_type; + typedef tmat4x3 type; + typedef tmat3x4 transpose_type; + + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + private: + // Data + col_type value[4]; + + public: + // Constructors + GLM_FUNC_DECL tmat4x3(); + GLM_FUNC_DECL tmat4x3(tmat4x3 const & m); + + GLM_FUNC_DECL explicit tmat4x3( + ctor Null); + GLM_FUNC_DECL explicit tmat4x3( + value_type const & x); + GLM_FUNC_DECL explicit tmat4x3( + value_type const & x0, value_type const & y0, value_type const & z0, + value_type const & x1, value_type const & y1, value_type const & z1, + value_type const & x2, value_type const & y2, value_type const & z2, + value_type const & x3, value_type const & y3, value_type const & z3); + GLM_FUNC_DECL explicit tmat4x3( + col_type const & v0, + col_type const & v1, + col_type const & v2, + col_type const & v3); + + ////////////////////////////////////// + // Conversions + template + GLM_FUNC_DECL explicit tmat4x3( + U const & x); + + template < + typename X1, typename Y1, typename Z1, + typename X2, typename Y2, typename Z2, + typename X3, typename Y3, typename Z3, + typename X4, typename Y4, typename Z4> + GLM_FUNC_DECL explicit tmat4x3( + X1 const & x1, Y1 const & y1, Z1 const & z1, + X2 const & x2, Y2 const & y2, Z2 const & z2, + X3 const & x3, Y3 const & y3, Z3 const & z3, + X4 const & x4, Y4 const & y4, Z4 const & z4); + + template + GLM_FUNC_DECL explicit tmat4x3( + tvec3 const & v1, + tvec3 const & v2, + tvec3 const & v3, + tvec3 const & v4); + + // Matrix conversions + template + GLM_FUNC_DECL explicit tmat4x3(tmat4x3 const & m); + + GLM_FUNC_DECL explicit tmat4x3(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat4x4 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat4x3(tmat3x4 const & x); + + // Accesses + col_type & operator[](size_type i); + col_type const & operator[](size_type i) const; + + // Unary updatable operators + GLM_FUNC_DECL tmat4x3 & operator= (tmat4x3 const & m); + template + GLM_FUNC_DECL tmat4x3 & operator= (tmat4x3 const & m); + template + GLM_FUNC_DECL tmat4x3 & operator+= (U const & s); + template + GLM_FUNC_DECL tmat4x3 & operator+= (tmat4x3 const & m); + template + GLM_FUNC_DECL tmat4x3 & operator-= (U const & s); + template + GLM_FUNC_DECL tmat4x3 & operator-= (tmat4x3 const & m); + template + GLM_FUNC_DECL tmat4x3 & operator*= (U const & s); + template + GLM_FUNC_DECL tmat4x3 & operator*= (tmat4x3 const & m); + template + GLM_FUNC_DECL tmat4x3 & operator/= (U const & s); + + GLM_FUNC_DECL tmat4x3 & operator++ (); + GLM_FUNC_DECL tmat4x3 & operator-- (); + }; + + // Binary operators + template + tmat4x3 operator+ ( + tmat4x3 const & m, + typename tmat4x3::value_type const & s); + + template + tmat4x3 operator+ ( + tmat4x3 const & m1, + tmat4x3 const & m2); + + template + tmat4x3 operator- ( + tmat4x3 const & m, + typename tmat4x3::value_type const & s); + + template + tmat4x3 operator- ( + tmat4x3 const & m1, + tmat4x3 const & m2); + + template + tmat4x3 operator* ( + tmat4x3 const & m, + typename tmat4x3::value_type const & s); + + template + tmat4x3 operator* ( + typename tmat4x3::value_type const & s, + tmat4x3 const & m); + + template + typename tmat4x3::col_type operator* ( + tmat4x3 const & m, + typename tmat4x3::row_type const & v); + + template + typename tmat4x3::row_type operator* ( + typename tmat4x3::col_type const & v, + tmat4x3 const & m); + + template + tmat2x3 operator* ( + tmat4x3 const & m1, + tmat2x4 const & m2); + + template + tmat3x3 operator* ( + tmat4x3 const & m1, + tmat3x4 const & m2); + + template + tmat4x3 operator* ( + tmat4x3 const & m1, + tmat4x4 const & m2); + + template + tmat4x3 operator/ ( + tmat4x3 const & m, + typename tmat4x3::value_type const & s); + + template + tmat4x3 operator/ ( + typename tmat4x3::value_type const & s, + tmat4x3 const & m); + + // Unary constant operators + template + tmat4x3 const operator- ( + tmat4x3 const & m); + + template + tmat4x3 const operator-- ( + tmat4x3 const & m, + int); + + template + tmat4x3 const operator++ ( + tmat4x3 const & m, + int); +}//namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 4 columns of 3 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x3 lowp_mat4x3; + + /// 4 columns of 3 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x3 mediump_mat4x3; + + /// 4 columns of 3 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x3 highp_mat4x3; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_mat4x3.inl" +#endif //GLM_EXTERNAL_TEMPLATE + +#endif//glm_core_type_mat4x3 diff --git a/include/gal/opengl/glm/core/type_mat4x3.inl b/include/gal/opengl/glm/core/type_mat4x3.inl index e451ee726a..f3ec6de5be 100644 --- a/include/gal/opengl/glm/core/type_mat4x3.inl +++ b/include/gal/opengl/glm/core/type_mat4x3.inl @@ -1,737 +1,737 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_mat4x3.inl -/// @date 2006-04-17 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm{ -namespace detail -{ - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x3::size_type tmat4x3::length() const - { - return 4; - } - - template - GLM_FUNC_QUALIFIER typename tmat4x3::size_type tmat4x3::col_size() - { - return 3; - } - - template - GLM_FUNC_QUALIFIER typename tmat4x3::size_type tmat4x3::row_size() - { - return 4; - } - - ////////////////////////////////////// - // Accesses - - template - GLM_FUNC_QUALIFIER typename tmat4x3::col_type & - tmat4x3::operator[] - ( - size_type i - ) - { - assert(i < this->length()); - return this->value[i]; - } - - template - GLM_FUNC_QUALIFIER typename tmat4x3::col_type const & - tmat4x3::operator[] - ( - size_type i - ) const - { - assert(i < this->length()); - return this->value[i]; - } - - ////////////////////////////////////////////////////////////// - // Constructors - - template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3() - { - value_type const Zero(0); - value_type const One(1); - this->value[0] = col_type(One, Zero, Zero); - this->value[1] = col_type(Zero, One, Zero); - this->value[2] = col_type(Zero, Zero, One); - this->value[3] = col_type(Zero, Zero, Zero); - } - - template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - tmat4x3 const & m - ) - { - this->value[0] = m.value[0]; - this->value[1] = m.value[1]; - this->value[2] = m.value[2]; - this->value[3] = m.value[3]; - } - - template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - ctor - ) - {} - - template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - value_type const & s - ) - { - value_type const Zero(0); - this->value[0] = col_type(s, Zero, Zero); - this->value[1] = col_type(Zero, s, Zero); - this->value[2] = col_type(Zero, Zero, s); - this->value[3] = col_type(Zero, Zero, Zero); - } - - template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - value_type const & x0, value_type const & y0, value_type const & z0, - value_type const & x1, value_type const & y1, value_type const & z1, - value_type const & x2, value_type const & y2, value_type const & z2, - value_type const & x3, value_type const & y3, value_type const & z3 - ) - { - this->value[0] = col_type(x0, y0, z0); - this->value[1] = col_type(x1, y1, z1); - this->value[2] = col_type(x2, y2, z2); - this->value[3] = col_type(x3, y3, z3); - } - - template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - col_type const & v0, - col_type const & v1, - col_type const & v2, - col_type const & v3 - ) - { - this->value[0] = v0; - this->value[1] = v1; - this->value[2] = v2; - this->value[3] = v3; - } - - ////////////////////////////////////// - // Convertion constructors - template - template - GLM_FUNC_DECL tmat4x3::tmat4x3 - ( - U const & s - ) - { - value_type const Zero(0); - this->value[0] = tvec3(value_type(s), Zero, Zero); - this->value[1] = tvec3(Zero, value_type(s), Zero); - this->value[2] = tvec3(Zero, Zero, value_type(s)); - this->value[3] = tvec3(Zero, Zero, Zero); - } - - template - template < - typename X1, typename Y1, typename Z1, - typename X2, typename Y2, typename Z2, - typename X3, typename Y3, typename Z3, - typename X4, typename Y4, typename Z4> - GLM_FUNC_DECL tmat4x3::tmat4x3 - ( - X1 const & x1, Y1 const & y1, Z1 const & z1, - X2 const & x2, Y2 const & y2, Z2 const & z2, - X3 const & x3, Y3 const & y3, Z3 const & z3, - X4 const & x4, Y4 const & y4, Z4 const & z4 - ) - { - this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1)); - this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2)); - this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3)); - this->value[3] = col_type(value_type(x4), value_type(y4), value_type(z4)); - } - - template - template - GLM_FUNC_DECL tmat4x3::tmat4x3 - ( - tvec3 const & v1, - tvec3 const & v2, - tvec3 const & v3, - tvec3 const & v4 - ) - { - this->value[0] = col_type(v1); - this->value[1] = col_type(v2); - this->value[2] = col_type(v3); - this->value[3] = col_type(v4); - } - - ////////////////////////////////////////////////////////////// - // Matrix conversions - - template - template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - tmat4x3 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(m[2]); - this->value[3] = col_type(m[3]); - } - - template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - tmat2x2 const & m - ) - { - this->value[0] = col_type(m[0], value_type(0)); - this->value[1] = col_type(m[1], value_type(0)); - this->value[2] = col_type(m[2], value_type(1)); - this->value[3] = col_type(value_type(0)); - } - - template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - tmat3x3 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(m[2]); - this->value[3] = col_type(value_type(0)); - } - - template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - tmat4x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(m[2]); - this->value[3] = col_type(m[3]); - } - - template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - tmat2x3 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(value_type(0), value_type(0), value_type(1)); - this->value[3] = col_type(value_type(0)); - } - - template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - tmat3x2 const & m - ) - { - this->value[0] = col_type(m[0], value_type(0)); - this->value[1] = col_type(m[1], value_type(0)); - this->value[2] = col_type(m[2], value_type(1)); - this->value[3] = col_type(value_type(0)); - } - - template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - tmat2x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(value_type(0), value_type(0), value_type(1)); - this->value[3] = col_type(value_type(0)); - } - - template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - tmat4x2 const & m - ) - { - this->value[0] = col_type(m[0], value_type(0)); - this->value[1] = col_type(m[1], value_type(0)); - this->value[2] = col_type(m[2], value_type(1)); - this->value[3] = col_type(m[3], value_type(0)); - } - - template - GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 - ( - tmat3x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(m[2]); - this->value[3] = col_type(value_type(0)); - } - - ////////////////////////////////////////////////////////////// - // Unary updatable operators - - template - GLM_FUNC_QUALIFIER tmat4x3& tmat4x3::operator= - ( - tmat4x3 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = m[2]; - this->value[3] = m[3]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x3& tmat4x3::operator= - ( - tmat4x3 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = m[2]; - this->value[3] = m[3]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator+= - ( - U const & s - ) - { - this->value[0] += s; - this->value[1] += s; - this->value[2] += s; - this->value[3] += s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator+= - ( - tmat4x3 const & m - ) - { - this->value[0] += m[0]; - this->value[1] += m[1]; - this->value[2] += m[2]; - this->value[3] += m[3]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator-= - ( - U const & s - ) - { - this->value[0] -= s; - this->value[1] -= s; - this->value[2] -= s; - this->value[3] -= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator-= - ( - tmat4x3 const & m - ) - { - this->value[0] -= m[0]; - this->value[1] -= m[1]; - this->value[2] -= m[2]; - this->value[3] -= m[3]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator*= - ( - U const & s - ) - { - this->value[0] *= s; - this->value[1] *= s; - this->value[2] *= s; - this->value[3] *= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator*= - ( - tmat4x3 const & m - ) - { - return (*this = tmat4x3(*this * m)); - } - - template - template - GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator/= - ( - U const & s - ) - { - this->value[0] /= s; - this->value[1] /= s; - this->value[2] /= s; - this->value[3] /= s; - return *this; - } - - template - GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator++ () - { - ++this->value[0]; - ++this->value[1]; - ++this->value[2]; - ++this->value[3]; - return *this; - } - - template - GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator-- () - { - --this->value[0]; - --this->value[1]; - --this->value[2]; - --this->value[3]; - return *this; - } - - ////////////////////////////////////////////////////////////// - // Binary operators - - template - GLM_FUNC_QUALIFIER tmat4x3 operator+ ( - tmat4x3 const & m, - typename tmat4x3::value_type const & s) - { - return tmat4x3( - m[0] + s, - m[1] + s, - m[2] + s, - m[3] + s); - } - - template - GLM_FUNC_QUALIFIER tmat4x3 operator+ ( - tmat4x3 const & m1, - tmat4x3 const & m2) - { - return tmat4x3( - m1[0] + m2[0], - m1[1] + m2[1], - m1[2] + m2[2], - m1[3] + m2[3]); - } - - template - GLM_FUNC_QUALIFIER tmat4x3 operator- ( - tmat4x3 const & m, - typename tmat4x3::value_type const & s) - { - return tmat4x3( - m[0] - s, - m[1] - s, - m[2] - s, - m[3] - s); - } - - template - GLM_FUNC_QUALIFIER tmat4x3 operator- ( - tmat4x3 const & m1, - tmat4x3 const & m2) - { - return tmat4x3( - m1[0] - m2[0], - m1[1] - m2[1], - m1[2] - m2[2], - m1[3] - m2[3]); - } - - template - GLM_FUNC_QUALIFIER tmat4x3 operator* ( - tmat4x3 const & m, - typename tmat4x3::value_type const & s) - { - return tmat4x3( - m[0] * s, - m[1] * s, - m[2] * s, - m[3] * s); - } - - template - GLM_FUNC_QUALIFIER tmat4x3 operator* ( - typename tmat4x3::value_type const & s, - tmat4x3 const & m) - { - return tmat4x3( - m[0] * s, - m[1] * s, - m[2] * s, - m[3] * s); - } - - template - GLM_FUNC_QUALIFIER typename tmat4x3::col_type operator* - ( - tmat4x3 const & m, - typename tmat4x3::row_type const & v) - { - return typename tmat4x3::col_type( - m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w, - m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * v.w, - m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z + m[3][2] * v.w); - } - - template - GLM_FUNC_QUALIFIER typename tmat4x3::row_type operator* - ( - typename tmat4x3::col_type const & v, - tmat4x3 const & m) - { - return typename tmat4x3::row_type( - v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2], - v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2], - v.x * m[2][0] + v.y * m[2][1] + v.z * m[2][2], - v.x * m[3][0] + v.y * m[3][1] + v.z * m[3][2]); - } - - template - GLM_FUNC_QUALIFIER tmat2x3 operator* - ( - tmat4x3 const & m1, - tmat2x4 const & m2 - ) - { - return tmat2x3( - m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], - m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3], - m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3], - m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3], - m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3], - m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3]); - } - - template - GLM_FUNC_QUALIFIER tmat3x3 operator* - ( - tmat4x3 const & m1, - tmat3x4 const & m2 - ) - { - T const SrcA00 = m1[0][0]; - T const SrcA01 = m1[0][1]; - T const SrcA02 = m1[0][2]; - T const SrcA10 = m1[1][0]; - T const SrcA11 = m1[1][1]; - T const SrcA12 = m1[1][2]; - T const SrcA20 = m1[2][0]; - T const SrcA21 = m1[2][1]; - T const SrcA22 = m1[2][2]; - T const SrcA30 = m1[3][0]; - T const SrcA31 = m1[3][1]; - T const SrcA32 = m1[3][2]; - - T const SrcB00 = m2[0][0]; - T const SrcB01 = m2[0][1]; - T const SrcB02 = m2[0][2]; - T const SrcB03 = m2[0][3]; - T const SrcB10 = m2[1][0]; - T const SrcB11 = m2[1][1]; - T const SrcB12 = m2[1][2]; - T const SrcB13 = m2[1][3]; - T const SrcB20 = m2[2][0]; - T const SrcB21 = m2[2][1]; - T const SrcB22 = m2[2][2]; - T const SrcB23 = m2[2][3]; - - tmat3x3 Result(tmat3x3::null); - Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02 + SrcA30 * SrcB03; - Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02 + SrcA31 * SrcB03; - Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02 + SrcA32 * SrcB03; - Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12 + SrcA30 * SrcB13; - Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12 + SrcA31 * SrcB13; - Result[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11 + SrcA22 * SrcB12 + SrcA32 * SrcB13; - Result[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21 + SrcA20 * SrcB22 + SrcA30 * SrcB23; - Result[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21 + SrcA21 * SrcB22 + SrcA31 * SrcB23; - Result[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21 + SrcA22 * SrcB22 + SrcA32 * SrcB23; - return Result; - } - - template - GLM_FUNC_QUALIFIER tmat4x3 operator* - ( - tmat4x3 const & m1, - tmat4x4 const & m2 - ) - { - return tmat4x3( - m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], - m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3], - m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3], - m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3], - m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3], - m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3], - m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3], - m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3], - m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2] + m1[3][2] * m2[2][3], - m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2] + m1[3][0] * m2[3][3], - m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2] + m1[3][1] * m2[3][3], - m1[0][2] * m2[3][0] + m1[1][2] * m2[3][1] + m1[2][2] * m2[3][2] + m1[3][2] * m2[3][3]); - } - - template - GLM_FUNC_QUALIFIER tmat4x3 operator/ - ( - tmat4x3 const & m, - typename tmat4x3::value_type const & s - ) - { - return tmat4x3( - m[0] / s, - m[1] / s, - m[2] / s, - m[3] / s); - } - - template - GLM_FUNC_QUALIFIER tmat4x3 operator/ - ( - typename tmat4x3::value_type const & s, - tmat4x3 const & m - ) - { - return tmat4x3( - s / m[0], - s / m[1], - s / m[2], - s / m[3]); - } - - // Unary constant operators - template - GLM_FUNC_QUALIFIER tmat4x3 const operator- - ( - tmat4x3 const & m - ) - { - return tmat4x3( - -m[0], - -m[1], - -m[2], - -m[3]); - } - - template - GLM_FUNC_QUALIFIER tmat4x3 const operator++ - ( - tmat4x3 const & m, - int - ) - { - return tmat4x3( - m[0] + T(1), - m[1] + T(1), - m[2] + T(1), - m[3] + T(1)); - } - - template - GLM_FUNC_QUALIFIER tmat4x3 const operator-- - ( - tmat4x3 const & m, - int - ) - { - return tmat4x3( - m[0] - T(1), - m[1] - T(1), - m[2] - T(1), - m[3] - T(1)); - } - - ////////////////////////////////////// - // Boolean operators - - template - GLM_FUNC_QUALIFIER bool operator== - ( - tmat4x3 const & m1, - tmat4x3 const & m2 - ) - { - return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]); - } - - template - GLM_FUNC_QUALIFIER bool operator!= - ( - tmat4x3 const & m1, - tmat4x3 const & m2 - ) - { - return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]); - } -} //namespace detail -} //namespace glm - +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat4x3.inl +/// @date 2006-04-17 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x3::size_type tmat4x3::length() const + { + return 4; + } + + template + GLM_FUNC_QUALIFIER typename tmat4x3::size_type tmat4x3::col_size() + { + return 3; + } + + template + GLM_FUNC_QUALIFIER typename tmat4x3::size_type tmat4x3::row_size() + { + return 4; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tmat4x3::col_type & + tmat4x3::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return this->value[i]; + } + + template + GLM_FUNC_QUALIFIER typename tmat4x3::col_type const & + tmat4x3::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return this->value[i]; + } + + ////////////////////////////////////////////////////////////// + // Constructors + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3() + { + value_type const Zero(0); + value_type const One(1); + this->value[0] = col_type(One, Zero, Zero); + this->value[1] = col_type(Zero, One, Zero); + this->value[2] = col_type(Zero, Zero, One); + this->value[3] = col_type(Zero, Zero, Zero); + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + tmat4x3 const & m + ) + { + this->value[0] = m.value[0]; + this->value[1] = m.value[1]; + this->value[2] = m.value[2]; + this->value[3] = m.value[3]; + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + value_type const & s + ) + { + value_type const Zero(0); + this->value[0] = col_type(s, Zero, Zero); + this->value[1] = col_type(Zero, s, Zero); + this->value[2] = col_type(Zero, Zero, s); + this->value[3] = col_type(Zero, Zero, Zero); + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + value_type const & x0, value_type const & y0, value_type const & z0, + value_type const & x1, value_type const & y1, value_type const & z1, + value_type const & x2, value_type const & y2, value_type const & z2, + value_type const & x3, value_type const & y3, value_type const & z3 + ) + { + this->value[0] = col_type(x0, y0, z0); + this->value[1] = col_type(x1, y1, z1); + this->value[2] = col_type(x2, y2, z2); + this->value[3] = col_type(x3, y3, z3); + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + col_type const & v0, + col_type const & v1, + col_type const & v2, + col_type const & v3 + ) + { + this->value[0] = v0; + this->value[1] = v1; + this->value[2] = v2; + this->value[3] = v3; + } + + ////////////////////////////////////// + // Convertion constructors + template + template + GLM_FUNC_DECL tmat4x3::tmat4x3 + ( + U const & s + ) + { + value_type const Zero(0); + this->value[0] = tvec3(value_type(s), Zero, Zero); + this->value[1] = tvec3(Zero, value_type(s), Zero); + this->value[2] = tvec3(Zero, Zero, value_type(s)); + this->value[3] = tvec3(Zero, Zero, Zero); + } + + template + template < + typename X1, typename Y1, typename Z1, + typename X2, typename Y2, typename Z2, + typename X3, typename Y3, typename Z3, + typename X4, typename Y4, typename Z4> + GLM_FUNC_DECL tmat4x3::tmat4x3 + ( + X1 const & x1, Y1 const & y1, Z1 const & z1, + X2 const & x2, Y2 const & y2, Z2 const & z2, + X3 const & x3, Y3 const & y3, Z3 const & z3, + X4 const & x4, Y4 const & y4, Z4 const & z4 + ) + { + this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1)); + this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2)); + this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3)); + this->value[3] = col_type(value_type(x4), value_type(y4), value_type(z4)); + } + + template + template + GLM_FUNC_DECL tmat4x3::tmat4x3 + ( + tvec3 const & v1, + tvec3 const & v2, + tvec3 const & v3, + tvec3 const & v4 + ) + { + this->value[0] = col_type(v1); + this->value[1] = col_type(v2); + this->value[2] = col_type(v3); + this->value[3] = col_type(v4); + } + + ////////////////////////////////////////////////////////////// + // Matrix conversions + + template + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + tmat4x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + this->value[3] = col_type(m[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + tmat2x2 const & m + ) + { + this->value[0] = col_type(m[0], value_type(0)); + this->value[1] = col_type(m[1], value_type(0)); + this->value[2] = col_type(m[2], value_type(1)); + this->value[3] = col_type(value_type(0)); + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + tmat3x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + this->value[3] = col_type(value_type(0)); + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + tmat4x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + this->value[3] = col_type(m[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + tmat2x3 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(value_type(0), value_type(0), value_type(1)); + this->value[3] = col_type(value_type(0)); + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + tmat3x2 const & m + ) + { + this->value[0] = col_type(m[0], value_type(0)); + this->value[1] = col_type(m[1], value_type(0)); + this->value[2] = col_type(m[2], value_type(1)); + this->value[3] = col_type(value_type(0)); + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + tmat2x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(value_type(0), value_type(0), value_type(1)); + this->value[3] = col_type(value_type(0)); + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + tmat4x2 const & m + ) + { + this->value[0] = col_type(m[0], value_type(0)); + this->value[1] = col_type(m[1], value_type(0)); + this->value[2] = col_type(m[2], value_type(1)); + this->value[3] = col_type(m[3], value_type(0)); + } + + template + GLM_FUNC_QUALIFIER tmat4x3::tmat4x3 + ( + tmat3x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + this->value[3] = col_type(value_type(0)); + } + + ////////////////////////////////////////////////////////////// + // Unary updatable operators + + template + GLM_FUNC_QUALIFIER tmat4x3& tmat4x3::operator= + ( + tmat4x3 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + this->value[3] = m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x3& tmat4x3::operator= + ( + tmat4x3 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + this->value[3] = m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator+= + ( + U const & s + ) + { + this->value[0] += s; + this->value[1] += s; + this->value[2] += s; + this->value[3] += s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator+= + ( + tmat4x3 const & m + ) + { + this->value[0] += m[0]; + this->value[1] += m[1]; + this->value[2] += m[2]; + this->value[3] += m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator-= + ( + U const & s + ) + { + this->value[0] -= s; + this->value[1] -= s; + this->value[2] -= s; + this->value[3] -= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator-= + ( + tmat4x3 const & m + ) + { + this->value[0] -= m[0]; + this->value[1] -= m[1]; + this->value[2] -= m[2]; + this->value[3] -= m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator*= + ( + U const & s + ) + { + this->value[0] *= s; + this->value[1] *= s; + this->value[2] *= s; + this->value[3] *= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator*= + ( + tmat4x3 const & m + ) + { + return (*this = tmat4x3(*this * m)); + } + + template + template + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator/= + ( + U const & s + ) + { + this->value[0] /= s; + this->value[1] /= s; + this->value[2] /= s; + this->value[3] /= s; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator++ () + { + ++this->value[0]; + ++this->value[1]; + ++this->value[2]; + ++this->value[3]; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat4x3 & tmat4x3::operator-- () + { + --this->value[0]; + --this->value[1]; + --this->value[2]; + --this->value[3]; + return *this; + } + + ////////////////////////////////////////////////////////////// + // Binary operators + + template + GLM_FUNC_QUALIFIER tmat4x3 operator+ ( + tmat4x3 const & m, + typename tmat4x3::value_type const & s) + { + return tmat4x3( + m[0] + s, + m[1] + s, + m[2] + s, + m[3] + s); + } + + template + GLM_FUNC_QUALIFIER tmat4x3 operator+ ( + tmat4x3 const & m1, + tmat4x3 const & m2) + { + return tmat4x3( + m1[0] + m2[0], + m1[1] + m2[1], + m1[2] + m2[2], + m1[3] + m2[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x3 operator- ( + tmat4x3 const & m, + typename tmat4x3::value_type const & s) + { + return tmat4x3( + m[0] - s, + m[1] - s, + m[2] - s, + m[3] - s); + } + + template + GLM_FUNC_QUALIFIER tmat4x3 operator- ( + tmat4x3 const & m1, + tmat4x3 const & m2) + { + return tmat4x3( + m1[0] - m2[0], + m1[1] - m2[1], + m1[2] - m2[2], + m1[3] - m2[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x3 operator* ( + tmat4x3 const & m, + typename tmat4x3::value_type const & s) + { + return tmat4x3( + m[0] * s, + m[1] * s, + m[2] * s, + m[3] * s); + } + + template + GLM_FUNC_QUALIFIER tmat4x3 operator* ( + typename tmat4x3::value_type const & s, + tmat4x3 const & m) + { + return tmat4x3( + m[0] * s, + m[1] * s, + m[2] * s, + m[3] * s); + } + + template + GLM_FUNC_QUALIFIER typename tmat4x3::col_type operator* + ( + tmat4x3 const & m, + typename tmat4x3::row_type const & v) + { + return typename tmat4x3::col_type( + m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w, + m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * v.w, + m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z + m[3][2] * v.w); + } + + template + GLM_FUNC_QUALIFIER typename tmat4x3::row_type operator* + ( + typename tmat4x3::col_type const & v, + tmat4x3 const & m) + { + return typename tmat4x3::row_type( + v.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2], + v.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2], + v.x * m[2][0] + v.y * m[2][1] + v.z * m[2][2], + v.x * m[3][0] + v.y * m[3][1] + v.z * m[3][2]); + } + + template + GLM_FUNC_QUALIFIER tmat2x3 operator* + ( + tmat4x3 const & m1, + tmat2x4 const & m2 + ) + { + return tmat2x3( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3]); + } + + template + GLM_FUNC_QUALIFIER tmat3x3 operator* + ( + tmat4x3 const & m1, + tmat3x4 const & m2 + ) + { + T const SrcA00 = m1[0][0]; + T const SrcA01 = m1[0][1]; + T const SrcA02 = m1[0][2]; + T const SrcA10 = m1[1][0]; + T const SrcA11 = m1[1][1]; + T const SrcA12 = m1[1][2]; + T const SrcA20 = m1[2][0]; + T const SrcA21 = m1[2][1]; + T const SrcA22 = m1[2][2]; + T const SrcA30 = m1[3][0]; + T const SrcA31 = m1[3][1]; + T const SrcA32 = m1[3][2]; + + T const SrcB00 = m2[0][0]; + T const SrcB01 = m2[0][1]; + T const SrcB02 = m2[0][2]; + T const SrcB03 = m2[0][3]; + T const SrcB10 = m2[1][0]; + T const SrcB11 = m2[1][1]; + T const SrcB12 = m2[1][2]; + T const SrcB13 = m2[1][3]; + T const SrcB20 = m2[2][0]; + T const SrcB21 = m2[2][1]; + T const SrcB22 = m2[2][2]; + T const SrcB23 = m2[2][3]; + + tmat3x3 Result(tmat3x3::null); + Result[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02 + SrcA30 * SrcB03; + Result[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02 + SrcA31 * SrcB03; + Result[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02 + SrcA32 * SrcB03; + Result[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12 + SrcA30 * SrcB13; + Result[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12 + SrcA31 * SrcB13; + Result[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11 + SrcA22 * SrcB12 + SrcA32 * SrcB13; + Result[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21 + SrcA20 * SrcB22 + SrcA30 * SrcB23; + Result[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21 + SrcA21 * SrcB22 + SrcA31 * SrcB23; + Result[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21 + SrcA22 * SrcB22 + SrcA32 * SrcB23; + return Result; + } + + template + GLM_FUNC_QUALIFIER tmat4x3 operator* + ( + tmat4x3 const & m1, + tmat4x4 const & m2 + ) + { + return tmat4x3( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3], + m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2] + m1[3][2] * m2[2][3], + m1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2] + m1[3][0] * m2[3][3], + m1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2] + m1[3][1] * m2[3][3], + m1[0][2] * m2[3][0] + m1[1][2] * m2[3][1] + m1[2][2] * m2[3][2] + m1[3][2] * m2[3][3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x3 operator/ + ( + tmat4x3 const & m, + typename tmat4x3::value_type const & s + ) + { + return tmat4x3( + m[0] / s, + m[1] / s, + m[2] / s, + m[3] / s); + } + + template + GLM_FUNC_QUALIFIER tmat4x3 operator/ + ( + typename tmat4x3::value_type const & s, + tmat4x3 const & m + ) + { + return tmat4x3( + s / m[0], + s / m[1], + s / m[2], + s / m[3]); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tmat4x3 const operator- + ( + tmat4x3 const & m + ) + { + return tmat4x3( + -m[0], + -m[1], + -m[2], + -m[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x3 const operator++ + ( + tmat4x3 const & m, + int + ) + { + return tmat4x3( + m[0] + T(1), + m[1] + T(1), + m[2] + T(1), + m[3] + T(1)); + } + + template + GLM_FUNC_QUALIFIER tmat4x3 const operator-- + ( + tmat4x3 const & m, + int + ) + { + return tmat4x3( + m[0] - T(1), + m[1] - T(1), + m[2] - T(1), + m[3] - T(1)); + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tmat4x3 const & m1, + tmat4x3 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tmat4x3 const & m1, + tmat4x3 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]); + } +} //namespace detail +} //namespace glm + diff --git a/include/gal/opengl/glm/core/type_mat4x4.hpp b/include/gal/opengl/glm/core/type_mat4x4.hpp index 2e911bc837..2f378e45ab 100644 --- a/include/gal/opengl/glm/core/type_mat4x4.hpp +++ b/include/gal/opengl/glm/core/type_mat4x4.hpp @@ -1,320 +1,320 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_mat4x4.hpp -/// @date 2005-01-27 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_type_mat4x4 -#define glm_core_type_mat4x4 - -#include "type_mat.hpp" - -namespace glm{ -namespace detail -{ - template struct tvec1; - template struct tvec2; - template struct tvec3; - template struct tvec4; - template struct tmat2x2; - template struct tmat2x3; - template struct tmat2x4; - template struct tmat3x2; - template struct tmat3x3; - template struct tmat3x4; - template struct tmat4x2; - template struct tmat4x3; - template struct tmat4x4; - - template - struct tmat4x4 - { - enum ctor{null}; - typedef T value_type; - typedef std::size_t size_type; - typedef tvec4 col_type; - typedef tvec4 row_type; - typedef tmat4x4 type; - typedef tmat4x4 transpose_type; - - static GLM_FUNC_DECL size_type col_size(); - static GLM_FUNC_DECL size_type row_size(); - - GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; - - public: - /// Implementation detail - /// @cond DETAIL - GLM_FUNC_DECL tmat4x4 _inverse() const; - /// @endcond - - private: - // Data - col_type value[4]; - - public: - // Constructors - GLM_FUNC_DECL tmat4x4(); - GLM_FUNC_DECL tmat4x4(tmat4x4 const & m); - - GLM_FUNC_DECL explicit tmat4x4( - ctor Null); - GLM_FUNC_DECL explicit tmat4x4( - value_type const & x); - GLM_FUNC_DECL explicit tmat4x4( - value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, - value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1, - value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2, - value_type const & x3, value_type const & y3, value_type const & z3, value_type const & w3); - GLM_FUNC_DECL explicit tmat4x4( - col_type const & v0, - col_type const & v1, - col_type const & v2, - col_type const & v3); - - ////////////////////////////////////// - // Conversions - template - GLM_FUNC_DECL explicit tmat4x4( - U const & x); - - template < - typename X1, typename Y1, typename Z1, typename W1, - typename X2, typename Y2, typename Z2, typename W2, - typename X3, typename Y3, typename Z3, typename W3, - typename X4, typename Y4, typename Z4, typename W4> - GLM_FUNC_DECL explicit tmat4x4( - X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, - X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, - X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3, - X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4); - - template - GLM_FUNC_DECL explicit tmat4x4( - tvec4 const & v1, - tvec4 const & v2, - tvec4 const & v3, - tvec4 const & v4); - - // Matrix conversions - template - GLM_FUNC_DECL explicit tmat4x4(tmat4x4 const & m); - - GLM_FUNC_DECL explicit tmat4x4(tmat2x2 const & x); - GLM_FUNC_DECL explicit tmat4x4(tmat3x3 const & x); - GLM_FUNC_DECL explicit tmat4x4(tmat2x3 const & x); - GLM_FUNC_DECL explicit tmat4x4(tmat3x2 const & x); - GLM_FUNC_DECL explicit tmat4x4(tmat2x4 const & x); - GLM_FUNC_DECL explicit tmat4x4(tmat4x2 const & x); - GLM_FUNC_DECL explicit tmat4x4(tmat3x4 const & x); - GLM_FUNC_DECL explicit tmat4x4(tmat4x3 const & x); - - // Accesses - GLM_FUNC_DECL col_type & operator[](size_type i); - GLM_FUNC_DECL col_type const & operator[](size_type i) const; - - // Unary updatable operators - GLM_FUNC_DECL tmat4x4 & operator= (tmat4x4 const & m); - template - GLM_FUNC_DECL tmat4x4 & operator= (tmat4x4 const & m); - template - GLM_FUNC_DECL tmat4x4 & operator+= (U const & s); - template - GLM_FUNC_DECL tmat4x4 & operator+= (tmat4x4 const & m); - template - GLM_FUNC_DECL tmat4x4 & operator-= (U const & s); - template - GLM_FUNC_DECL tmat4x4 & operator-= (tmat4x4 const & m); - template - GLM_FUNC_DECL tmat4x4 & operator*= (U const & s); - template - GLM_FUNC_DECL tmat4x4 & operator*= (tmat4x4 const & m); - template - GLM_FUNC_DECL tmat4x4 & operator/= (U const & s); - template - GLM_FUNC_DECL tmat4x4 & operator/= (tmat4x4 const & m); - GLM_FUNC_DECL tmat4x4 & operator++ (); - GLM_FUNC_DECL tmat4x4 & operator-- (); - }; - - // Binary operators - template - tmat4x4 operator+ ( - tmat4x4 const & m, - typename tmat4x4::value_type const & s); - - template - tmat4x4 operator+ ( - typename tmat4x4::value_type const & s, - tmat4x4 const & m); - - template - tmat4x4 operator+ ( - tmat4x4 const & m1, - tmat4x4 const & m2); - - template - tmat4x4 operator- ( - tmat4x4 const & m, - typename tmat4x4::value_type const & s); - - template - tmat4x4 operator- ( - typename tmat4x4::value_type const & s, - tmat4x4 const & m); - - template - tmat4x4 operator- ( - tmat4x4 const & m1, - tmat4x4 const & m2); - - template - tmat4x4 operator* ( - tmat4x4 const & m, - typename tmat4x4::value_type const & s); - - template - tmat4x4 operator* ( - typename tmat4x4::value_type const & s, - tmat4x4 const & m); - - template - typename tmat4x4::col_type operator* ( - tmat4x4 const & m, - typename tmat4x4::row_type const & v); - - template - typename tmat4x4::row_type operator* ( - typename tmat4x4::col_type const & v, - tmat4x4 const & m); - - template - tmat2x4 operator* ( - tmat4x4 const & m1, - tmat2x4 const & m2); - - template - tmat3x4 operator* ( - tmat4x4 const & m1, - tmat3x4 const & m2); - - template - tmat4x4 operator* ( - tmat4x4 const & m1, - tmat4x4 const & m2); - - template - tmat4x4 operator/ ( - tmat4x4 const & m, - typename tmat4x4::value_type const & s); - - template - tmat4x4 operator/ ( - typename tmat4x4::value_type const & s, - tmat4x4 const & m); - - template - typename tmat4x4::col_type operator/ ( - tmat4x4 const & m, - typename tmat4x4::row_type const & v); - - template - typename tmat4x4::row_type operator/ ( - typename tmat4x4::col_type & v, - tmat4x4 const & m); - - template - tmat4x4 operator/ ( - tmat4x4 const & m1, - tmat4x4 const & m2); - - // Unary constant operators - template - tmat4x4 const operator- ( - tmat4x4 const & m); - - template - tmat4x4 const operator-- ( - tmat4x4 const & m, int); - - template - tmat4x4 const operator++ ( - tmat4x4 const & m, int); - -} //namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 4 columns of 4 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x4 lowp_mat4; - - /// 4 columns of 4 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x4 mediump_mat4; - - /// 4 columns of 4 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x4 highp_mat4; - - /// 4 columns of 4 components matrix of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x4 lowp_mat4x4; - - /// 4 columns of 4 components matrix of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x4 mediump_mat4x4; - - /// 4 columns of 4 components matrix of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tmat4x4 highp_mat4x4; - - /// @} -}//namespace glm - -#ifndef GLM_EXTERNAL_TEMPLATE -#include "type_mat4x4.inl" -#endif//GLM_EXTERNAL_TEMPLATE - -#endif//glm_core_type_mat4x4 +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat4x4.hpp +/// @date 2005-01-27 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_mat4x4 +#define glm_core_type_mat4x4 + +#include "type_mat.hpp" + +namespace glm{ +namespace detail +{ + template struct tvec1; + template struct tvec2; + template struct tvec3; + template struct tvec4; + template struct tmat2x2; + template struct tmat2x3; + template struct tmat2x4; + template struct tmat3x2; + template struct tmat3x3; + template struct tmat3x4; + template struct tmat4x2; + template struct tmat4x3; + template struct tmat4x4; + + template + struct tmat4x4 + { + enum ctor{null}; + typedef T value_type; + typedef std::size_t size_type; + typedef tvec4 col_type; + typedef tvec4 row_type; + typedef tmat4x4 type; + typedef tmat4x4 transpose_type; + + static GLM_FUNC_DECL size_type col_size(); + static GLM_FUNC_DECL size_type row_size(); + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + public: + /// Implementation detail + /// @cond DETAIL + GLM_FUNC_DECL tmat4x4 _inverse() const; + /// @endcond + + private: + // Data + col_type value[4]; + + public: + // Constructors + GLM_FUNC_DECL tmat4x4(); + GLM_FUNC_DECL tmat4x4(tmat4x4 const & m); + + GLM_FUNC_DECL explicit tmat4x4( + ctor Null); + GLM_FUNC_DECL explicit tmat4x4( + value_type const & x); + GLM_FUNC_DECL explicit tmat4x4( + value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, + value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1, + value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2, + value_type const & x3, value_type const & y3, value_type const & z3, value_type const & w3); + GLM_FUNC_DECL explicit tmat4x4( + col_type const & v0, + col_type const & v1, + col_type const & v2, + col_type const & v3); + + ////////////////////////////////////// + // Conversions + template + GLM_FUNC_DECL explicit tmat4x4( + U const & x); + + template < + typename X1, typename Y1, typename Z1, typename W1, + typename X2, typename Y2, typename Z2, typename W2, + typename X3, typename Y3, typename Z3, typename W3, + typename X4, typename Y4, typename Z4, typename W4> + GLM_FUNC_DECL explicit tmat4x4( + X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, + X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, + X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3, + X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4); + + template + GLM_FUNC_DECL explicit tmat4x4( + tvec4 const & v1, + tvec4 const & v2, + tvec4 const & v3, + tvec4 const & v4); + + // Matrix conversions + template + GLM_FUNC_DECL explicit tmat4x4(tmat4x4 const & m); + + GLM_FUNC_DECL explicit tmat4x4(tmat2x2 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat3x3 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat2x3 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat3x2 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat2x4 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat4x2 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat3x4 const & x); + GLM_FUNC_DECL explicit tmat4x4(tmat4x3 const & x); + + // Accesses + GLM_FUNC_DECL col_type & operator[](size_type i); + GLM_FUNC_DECL col_type const & operator[](size_type i) const; + + // Unary updatable operators + GLM_FUNC_DECL tmat4x4 & operator= (tmat4x4 const & m); + template + GLM_FUNC_DECL tmat4x4 & operator= (tmat4x4 const & m); + template + GLM_FUNC_DECL tmat4x4 & operator+= (U const & s); + template + GLM_FUNC_DECL tmat4x4 & operator+= (tmat4x4 const & m); + template + GLM_FUNC_DECL tmat4x4 & operator-= (U const & s); + template + GLM_FUNC_DECL tmat4x4 & operator-= (tmat4x4 const & m); + template + GLM_FUNC_DECL tmat4x4 & operator*= (U const & s); + template + GLM_FUNC_DECL tmat4x4 & operator*= (tmat4x4 const & m); + template + GLM_FUNC_DECL tmat4x4 & operator/= (U const & s); + template + GLM_FUNC_DECL tmat4x4 & operator/= (tmat4x4 const & m); + GLM_FUNC_DECL tmat4x4 & operator++ (); + GLM_FUNC_DECL tmat4x4 & operator-- (); + }; + + // Binary operators + template + tmat4x4 operator+ ( + tmat4x4 const & m, + typename tmat4x4::value_type const & s); + + template + tmat4x4 operator+ ( + typename tmat4x4::value_type const & s, + tmat4x4 const & m); + + template + tmat4x4 operator+ ( + tmat4x4 const & m1, + tmat4x4 const & m2); + + template + tmat4x4 operator- ( + tmat4x4 const & m, + typename tmat4x4::value_type const & s); + + template + tmat4x4 operator- ( + typename tmat4x4::value_type const & s, + tmat4x4 const & m); + + template + tmat4x4 operator- ( + tmat4x4 const & m1, + tmat4x4 const & m2); + + template + tmat4x4 operator* ( + tmat4x4 const & m, + typename tmat4x4::value_type const & s); + + template + tmat4x4 operator* ( + typename tmat4x4::value_type const & s, + tmat4x4 const & m); + + template + typename tmat4x4::col_type operator* ( + tmat4x4 const & m, + typename tmat4x4::row_type const & v); + + template + typename tmat4x4::row_type operator* ( + typename tmat4x4::col_type const & v, + tmat4x4 const & m); + + template + tmat2x4 operator* ( + tmat4x4 const & m1, + tmat2x4 const & m2); + + template + tmat3x4 operator* ( + tmat4x4 const & m1, + tmat3x4 const & m2); + + template + tmat4x4 operator* ( + tmat4x4 const & m1, + tmat4x4 const & m2); + + template + tmat4x4 operator/ ( + tmat4x4 const & m, + typename tmat4x4::value_type const & s); + + template + tmat4x4 operator/ ( + typename tmat4x4::value_type const & s, + tmat4x4 const & m); + + template + typename tmat4x4::col_type operator/ ( + tmat4x4 const & m, + typename tmat4x4::row_type const & v); + + template + typename tmat4x4::row_type operator/ ( + typename tmat4x4::col_type & v, + tmat4x4 const & m); + + template + tmat4x4 operator/ ( + tmat4x4 const & m1, + tmat4x4 const & m2); + + // Unary constant operators + template + tmat4x4 const operator- ( + tmat4x4 const & m); + + template + tmat4x4 const operator-- ( + tmat4x4 const & m, int); + + template + tmat4x4 const operator++ ( + tmat4x4 const & m, int); + +} //namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 4 columns of 4 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x4 lowp_mat4; + + /// 4 columns of 4 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x4 mediump_mat4; + + /// 4 columns of 4 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x4 highp_mat4; + + /// 4 columns of 4 components matrix of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x4 lowp_mat4x4; + + /// 4 columns of 4 components matrix of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x4 mediump_mat4x4; + + /// 4 columns of 4 components matrix of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tmat4x4 highp_mat4x4; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_mat4x4.inl" +#endif//GLM_EXTERNAL_TEMPLATE + +#endif//glm_core_type_mat4x4 diff --git a/include/gal/opengl/glm/core/type_mat4x4.inl b/include/gal/opengl/glm/core/type_mat4x4.inl index 71aa484dc3..e796506f73 100644 --- a/include/gal/opengl/glm/core/type_mat4x4.inl +++ b/include/gal/opengl/glm/core/type_mat4x4.inl @@ -1,905 +1,905 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_mat4x4.inl -/// @date 2005-01-27 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm{ -namespace detail -{ - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x4::size_type tmat4x4::length() const - { - return 4; - } - - template - GLM_FUNC_QUALIFIER typename tmat4x4::size_type tmat4x4::col_size() - { - return 4; - } - - template - GLM_FUNC_QUALIFIER typename tmat4x4::size_type tmat4x4::row_size() - { - return 4; - } - - ////////////////////////////////////// - // Accesses - - template - GLM_FUNC_QUALIFIER typename tmat4x4::col_type & - tmat4x4::operator[] - ( - size_type i - ) - { - assert(i < this->length()); - return this->value[i]; - } - - template - GLM_FUNC_QUALIFIER typename tmat4x4::col_type const & - tmat4x4::operator[] - ( - size_type i - ) const - { - assert(i < this->length()); - return this->value[i]; - } - - ////////////////////////////////////////////////////////////// - // Constructors - - template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4() - { - value_type Zero(0); - value_type One(1); - this->value[0] = col_type(One, Zero, Zero, Zero); - this->value[1] = col_type(Zero, One, Zero, Zero); - this->value[2] = col_type(Zero, Zero, One, Zero); - this->value[3] = col_type(Zero, Zero, Zero, One); - } - - template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - tmat4x4 const & m - ) - { - this->value[0] = m.value[0]; - this->value[1] = m.value[1]; - this->value[2] = m.value[2]; - this->value[3] = m.value[3]; - } - - template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - ctor - ) - {} - - template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - value_type const & s - ) - { - value_type const Zero(0); - this->value[0] = col_type(s, Zero, Zero, Zero); - this->value[1] = col_type(Zero, s, Zero, Zero); - this->value[2] = col_type(Zero, Zero, s, Zero); - this->value[3] = col_type(Zero, Zero, Zero, s); - } - - template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, - value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1, - value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2, - value_type const & x3, value_type const & y3, value_type const & z3, value_type const & w3 - ) - { - this->value[0] = col_type(x0, y0, z0, w0); - this->value[1] = col_type(x1, y1, z1, w1); - this->value[2] = col_type(x2, y2, z2, w2); - this->value[3] = col_type(x3, y3, z3, w3); - } - - template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - col_type const & v0, - col_type const & v1, - col_type const & v2, - col_type const & v3 - ) - { - this->value[0] = v0; - this->value[1] = v1; - this->value[2] = v2; - this->value[3] = v3; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - tmat4x4 const & m - ) - { - this->value[0] = col_type(m[0]); - this->value[1] = col_type(m[1]); - this->value[2] = col_type(m[2]); - this->value[3] = col_type(m[3]); - } - - ////////////////////////////////////// - // Convertion constructors - template - template - GLM_FUNC_DECL tmat4x4::tmat4x4 - ( - U const & s - ) - { - GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types"); - - value_type const Zero(0); - this->value[0] = tvec4(value_type(s), Zero, Zero, Zero); - this->value[1] = tvec4(Zero, value_type(s), Zero, Zero); - this->value[2] = tvec4(Zero, Zero, value_type(s), Zero); - this->value[3] = tvec4(Zero, Zero, Zero, value_type(s)); - } - - template - template < - typename X1, typename Y1, typename Z1, typename W1, - typename X2, typename Y2, typename Z2, typename W2, - typename X3, typename Y3, typename Z3, typename W3, - typename X4, typename Y4, typename Z4, typename W4> - GLM_FUNC_DECL tmat4x4::tmat4x4 - ( - X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, - X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, - X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3, - X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4 - ) - { - GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid."); - GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid."); - GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid."); - GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 4th parameter type invalid."); - - GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 5th parameter type invalid."); - GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 6th parameter type invalid."); - GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 7th parameter type invalid."); - GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 8th parameter type invalid."); - - GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 9th parameter type invalid."); - GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 10th parameter type invalid."); - GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 11th parameter type invalid."); - GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 12th parameter type invalid."); - - GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 13th parameter type invalid."); - GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 14th parameter type invalid."); - GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 15th parameter type invalid."); - GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 16th parameter type invalid."); - - this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1), value_type(w1)); - this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2), value_type(w2)); - this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3), value_type(w3)); - this->value[3] = col_type(value_type(x4), value_type(y4), value_type(z4), value_type(w4)); - } - - template - template - GLM_FUNC_DECL tmat4x4::tmat4x4 - ( - tvec4 const & v1, - tvec4 const & v2, - tvec4 const & v3, - tvec4 const & v4 - ) - { - GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid."); - GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid."); - GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid."); - GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 4th parameter type invalid."); - - this->value[0] = col_type(v1); - this->value[1] = col_type(v2); - this->value[2] = col_type(v3); - this->value[3] = col_type(v4); - } - - ////////////////////////////////////// - // Matrix convertion constructors - template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - tmat2x2 const & m - ) - { - this->value[0] = col_type(m[0], detail::tvec2(0)); - this->value[1] = col_type(m[1], detail::tvec2(0)); - this->value[2] = col_type(value_type(0)); - this->value[3] = col_type(value_type(0), value_type(0), value_type(0), value_type(1)); - } - - template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - tmat3x3 const & m - ) - { - this->value[0] = col_type(m[0], value_type(0)); - this->value[1] = col_type(m[1], value_type(0)); - this->value[2] = col_type(m[2], value_type(0)); - this->value[3] = col_type(value_type(0), value_type(0), value_type(0), value_type(1)); - } - - template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - tmat2x3 const & m - ) - { - this->value[0] = col_type(m[0], value_type(0)); - this->value[1] = col_type(m[1], value_type(0)); - this->value[2] = col_type(value_type(0)); - this->value[3] = col_type(value_type(0), value_type(0), value_type(0), value_type(1)); - } - - template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - tmat3x2 const & m - ) - { - this->value[0] = col_type(m[0], detail::tvec2(0)); - this->value[1] = col_type(m[1], detail::tvec2(0)); - this->value[2] = col_type(m[2], detail::tvec2(0)); - this->value[3] = col_type(value_type(0), value_type(0), value_type(0), value_type(1)); - } - - template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - tmat2x4 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = col_type(T(0)); - this->value[3] = col_type(T(0), T(0), T(0), T(1)); - } - - template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - tmat4x2 const & m - ) - { - this->value[0] = col_type(m[0], detail::tvec2(0)); - this->value[1] = col_type(m[1], detail::tvec2(0)); - this->value[2] = col_type(T(0)); - this->value[3] = col_type(T(0), T(0), T(0), T(1)); - } - - template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - tmat3x4 const & m - ) - { - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = m[2]; - this->value[3] = col_type(T(0), T(0), T(0), T(1)); - } - - template - GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 - ( - tmat4x3 const & m - ) - { - this->value[0] = col_type(m[0], T(0)); - this->value[1] = col_type(m[1], T(0)); - this->value[2] = col_type(m[2], T(0)); - this->value[3] = col_type(m[3], T(1)); - } - - ////////////////////////////////////////////////////////////// - // Operators - - template - GLM_FUNC_QUALIFIER tmat4x4& tmat4x4::operator= - ( - tmat4x4 const & m - ) - { - //memcpy could be faster - //memcpy(&this->value, &m.value, 16 * sizeof(valType)); - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = m[2]; - this->value[3] = m[3]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x4& tmat4x4::operator= - ( - tmat4x4 const & m - ) - { - //memcpy could be faster - //memcpy(&this->value, &m.value, 16 * sizeof(valType)); - this->value[0] = m[0]; - this->value[1] = m[1]; - this->value[2] = m[2]; - this->value[3] = m[3]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x4& tmat4x4::operator+= - ( - U const & s - ) - { - this->value[0] += s; - this->value[1] += s; - this->value[2] += s; - this->value[3] += s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x4& tmat4x4::operator+= - ( - tmat4x4 const & m - ) - { - this->value[0] += m[0]; - this->value[1] += m[1]; - this->value[2] += m[2]; - this->value[3] += m[3]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator-= - ( - U const & s - ) - { - this->value[0] -= s; - this->value[1] -= s; - this->value[2] -= s; - this->value[3] -= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator-= - ( - tmat4x4 const & m - ) - { - this->value[0] -= m[0]; - this->value[1] -= m[1]; - this->value[2] -= m[2]; - this->value[3] -= m[3]; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator*= - ( - U const & s - ) - { - this->value[0] *= s; - this->value[1] *= s; - this->value[2] *= s; - this->value[3] *= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator*= - ( - tmat4x4 const & m - ) - { - return (*this = *this * m); - } - - template - template - GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator/= - ( - U const & s - ) - { - this->value[0] /= s; - this->value[1] /= s; - this->value[2] /= s; - this->value[3] /= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator/= - ( - tmat4x4 const & m - ) - { - return (*this = *this / m); - } - - template - GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator++ () - { - ++this->value[0]; - ++this->value[1]; - ++this->value[2]; - ++this->value[3]; - return *this; - } - - template - GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator-- () - { - --this->value[0]; - --this->value[1]; - --this->value[2]; - --this->value[3]; - return *this; - } - - template - GLM_FUNC_QUALIFIER tmat4x4 tmat4x4::_inverse() const - { - // Calculate all mat2 determinants - value_type SubFactor00 = this->value[2][2] * this->value[3][3] - this->value[3][2] * this->value[2][3]; - value_type SubFactor01 = this->value[2][1] * this->value[3][3] - this->value[3][1] * this->value[2][3]; - value_type SubFactor02 = this->value[2][1] * this->value[3][2] - this->value[3][1] * this->value[2][2]; - value_type SubFactor03 = this->value[2][0] * this->value[3][3] - this->value[3][0] * this->value[2][3]; - value_type SubFactor04 = this->value[2][0] * this->value[3][2] - this->value[3][0] * this->value[2][2]; - value_type SubFactor05 = this->value[2][0] * this->value[3][1] - this->value[3][0] * this->value[2][1]; - value_type SubFactor06 = this->value[1][2] * this->value[3][3] - this->value[3][2] * this->value[1][3]; - value_type SubFactor07 = this->value[1][1] * this->value[3][3] - this->value[3][1] * this->value[1][3]; - value_type SubFactor08 = this->value[1][1] * this->value[3][2] - this->value[3][1] * this->value[1][2]; - value_type SubFactor09 = this->value[1][0] * this->value[3][3] - this->value[3][0] * this->value[1][3]; - value_type SubFactor10 = this->value[1][0] * this->value[3][2] - this->value[3][0] * this->value[1][2]; - value_type SubFactor11 = this->value[1][1] * this->value[3][3] - this->value[3][1] * this->value[1][3]; - value_type SubFactor12 = this->value[1][0] * this->value[3][1] - this->value[3][0] * this->value[1][1]; - value_type SubFactor13 = this->value[1][2] * this->value[2][3] - this->value[2][2] * this->value[1][3]; - value_type SubFactor14 = this->value[1][1] * this->value[2][3] - this->value[2][1] * this->value[1][3]; - value_type SubFactor15 = this->value[1][1] * this->value[2][2] - this->value[2][1] * this->value[1][2]; - value_type SubFactor16 = this->value[1][0] * this->value[2][3] - this->value[2][0] * this->value[1][3]; - value_type SubFactor17 = this->value[1][0] * this->value[2][2] - this->value[2][0] * this->value[1][2]; - value_type SubFactor18 = this->value[1][0] * this->value[2][1] - this->value[2][0] * this->value[1][1]; -/* - tmat4x4 Inverse( - + (this->value[1][1] * SubFactor00 - this->value[1][2] * SubFactor01 + this->value[1][3] * SubFactor02), - - (this->value[1][0] * SubFactor00 - this->value[1][2] * SubFactor03 + this->value[1][3] * SubFactor04), - + (this->value[1][0] * SubFactor01 - this->value[1][1] * SubFactor03 + this->value[1][3] * SubFactor05), - - (this->value[1][0] * SubFactor02 - this->value[1][1] * SubFactor04 + this->value[1][2] * SubFactor05), - - - (this->value[0][1] * SubFactor00 - this->value[0][2] * SubFactor01 + this->value[0][3] * SubFactor02), - + (this->value[0][0] * SubFactor00 - this->value[0][2] * SubFactor03 + this->value[0][3] * SubFactor04), - - (this->value[0][0] * SubFactor01 - this->value[0][1] * SubFactor03 + this->value[0][3] * SubFactor05), - + (this->value[0][0] * SubFactor02 - this->value[0][1] * SubFactor04 + this->value[0][2] * SubFactor05), - - + (this->value[0][1] * SubFactor06 - this->value[0][2] * SubFactor07 + this->value[0][3] * SubFactor08), - - (this->value[0][0] * SubFactor06 - this->value[0][2] * SubFactor09 + this->value[0][3] * SubFactor10), - + (this->value[0][0] * SubFactor11 - this->value[0][1] * SubFactor09 + this->value[0][3] * SubFactor12), - - (this->value[0][0] * SubFactor08 - this->value[0][1] * SubFactor10 + this->value[0][2] * SubFactor12), - - - (this->value[0][1] * SubFactor13 - this->value[0][2] * SubFactor14 + this->value[0][3] * SubFactor15), - + (this->value[0][0] * SubFactor13 - this->value[0][2] * SubFactor16 + this->value[0][3] * SubFactor17), - - (this->value[0][0] * SubFactor14 - this->value[0][1] * SubFactor16 + this->value[0][3] * SubFactor18), - + (this->value[0][0] * SubFactor15 - this->value[0][1] * SubFactor17 + this->value[0][2] * SubFactor18)); -*/ - tmat4x4 Inverse( - + this->value[1][1] * SubFactor00 - this->value[1][2] * SubFactor01 + this->value[1][3] * SubFactor02, - - this->value[1][0] * SubFactor00 + this->value[1][2] * SubFactor03 - this->value[1][3] * SubFactor04, - + this->value[1][0] * SubFactor01 - this->value[1][1] * SubFactor03 + this->value[1][3] * SubFactor05, - - this->value[1][0] * SubFactor02 + this->value[1][1] * SubFactor04 - this->value[1][2] * SubFactor05, - - - this->value[0][1] * SubFactor00 + this->value[0][2] * SubFactor01 - this->value[0][3] * SubFactor02, - + this->value[0][0] * SubFactor00 - this->value[0][2] * SubFactor03 + this->value[0][3] * SubFactor04, - - this->value[0][0] * SubFactor01 + this->value[0][1] * SubFactor03 - this->value[0][3] * SubFactor05, - + this->value[0][0] * SubFactor02 - this->value[0][1] * SubFactor04 + this->value[0][2] * SubFactor05, - - + this->value[0][1] * SubFactor06 - this->value[0][2] * SubFactor07 + this->value[0][3] * SubFactor08, - - this->value[0][0] * SubFactor06 + this->value[0][2] * SubFactor09 - this->value[0][3] * SubFactor10, - + this->value[0][0] * SubFactor11 - this->value[0][1] * SubFactor09 + this->value[0][3] * SubFactor12, - - this->value[0][0] * SubFactor08 + this->value[0][1] * SubFactor10 - this->value[0][2] * SubFactor12, - - - this->value[0][1] * SubFactor13 + this->value[0][2] * SubFactor14 - this->value[0][3] * SubFactor15, - + this->value[0][0] * SubFactor13 - this->value[0][2] * SubFactor16 + this->value[0][3] * SubFactor17, - - this->value[0][0] * SubFactor14 + this->value[0][1] * SubFactor16 - this->value[0][3] * SubFactor18, - + this->value[0][0] * SubFactor15 - this->value[0][1] * SubFactor17 + this->value[0][2] * SubFactor18); - - value_type Determinant = - + this->value[0][0] * Inverse[0][0] - + this->value[0][1] * Inverse[1][0] - + this->value[0][2] * Inverse[2][0] - + this->value[0][3] * Inverse[3][0]; - - Inverse /= Determinant; - return Inverse; - } - - // Binary operators - template - GLM_FUNC_QUALIFIER tmat4x4 operator+ - ( - tmat4x4 const & m, - typename tmat4x4::value_type const & s - ) - { - return tmat4x4( - m[0] + s, - m[1] + s, - m[2] + s, - m[3] + s); - } - - template - GLM_FUNC_QUALIFIER tmat4x4 operator+ - ( - typename tmat4x4::value_type const & s, - tmat4x4 const & m - ) - { - return tmat4x4( - m[0] + s, - m[1] + s, - m[2] + s, - m[3] + s); - } - - template - GLM_FUNC_QUALIFIER tmat4x4 operator+ - ( - tmat4x4 const & m1, - tmat4x4 const & m2 - ) - { - return tmat4x4( - m1[0] + m2[0], - m1[1] + m2[1], - m1[2] + m2[2], - m1[3] + m2[3]); - } - - template - GLM_FUNC_QUALIFIER tmat4x4 operator- - ( - tmat4x4 const & m, - typename tmat4x4::value_type const & s - ) - { - return tmat4x4( - m[0] - s, - m[1] - s, - m[2] - s, - m[3] - s); - } - - template - GLM_FUNC_QUALIFIER tmat4x4 operator- - ( - typename tmat4x4::value_type const & s, - tmat4x4 const & m - ) - { - return tmat4x4( - s - m[0], - s - m[1], - s - m[2], - s - m[3]); - } - - template - GLM_FUNC_QUALIFIER tmat4x4 operator- - ( - tmat4x4 const & m1, - tmat4x4 const & m2 - ) - { - return tmat4x4( - m1[0] - m2[0], - m1[1] - m2[1], - m1[2] - m2[2], - m1[3] - m2[3]); - } - - template - GLM_FUNC_QUALIFIER tmat4x4 operator* - ( - tmat4x4 const & m, - typename tmat4x4::value_type const & s - ) - { - return tmat4x4( - m[0] * s, - m[1] * s, - m[2] * s, - m[3] * s); - } - - template - GLM_FUNC_QUALIFIER tmat4x4 operator* - ( - typename tmat4x4::value_type const & s, - tmat4x4 const & m - ) - { - return tmat4x4( - m[0] * s, - m[1] * s, - m[2] * s, - m[3] * s); - } - - template - GLM_FUNC_QUALIFIER typename tmat4x4::col_type operator* - ( - tmat4x4 const & m, - typename tmat4x4::row_type const & v - ) - { - return typename tmat4x4::col_type( - m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w, - m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * v.w, - m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z + m[3][2] * v.w, - m[0][3] * v.x + m[1][3] * v.y + m[2][3] * v.z + m[3][3] * v.w); - } - - template - GLM_FUNC_QUALIFIER typename tmat4x4::row_type operator* - ( - typename tmat4x4::col_type const & v, - tmat4x4 const & m - ) - { - return typename tmat4x4::row_type( - m[0][0] * v.x + m[0][1] * v.y + m[0][2] * v.z + m[0][3] * v.w, - m[1][0] * v.x + m[1][1] * v.y + m[1][2] * v.z + m[1][3] * v.w, - m[2][0] * v.x + m[2][1] * v.y + m[2][2] * v.z + m[2][3] * v.w, - m[3][0] * v.x + m[3][1] * v.y + m[3][2] * v.z + m[3][3] * v.w); - } - - template - GLM_FUNC_QUALIFIER tmat2x4 operator* - ( - tmat4x4 const & m1, - tmat2x4 const & m2 - ) - { - return tmat2x4( - m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], - m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3], - m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3], - m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2] + m1[3][3] * m2[0][3], - m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3], - m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3], - m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3], - m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2] + m1[3][3] * m2[1][3]); - } - - template - GLM_FUNC_QUALIFIER tmat3x4 operator* - ( - tmat4x4 const & m1, - tmat3x4 const & m2 - ) - { - return tmat3x4( - m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], - m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3], - m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3], - m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2] + m1[3][3] * m2[0][3], - m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3], - m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3], - m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3], - m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2] + m1[3][3] * m2[1][3], - m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3], - m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3], - m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2] + m1[3][2] * m2[2][3], - m1[0][3] * m2[2][0] + m1[1][3] * m2[2][1] + m1[2][3] * m2[2][2] + m1[3][3] * m2[2][3]); - } - - template - GLM_FUNC_QUALIFIER tmat4x4 operator* - ( - tmat4x4 const & m1, - tmat4x4 const & m2 - ) - { - typename tmat4x4::col_type const SrcA0 = m1[0]; - typename tmat4x4::col_type const SrcA1 = m1[1]; - typename tmat4x4::col_type const SrcA2 = m1[2]; - typename tmat4x4::col_type const SrcA3 = m1[3]; - - typename tmat4x4::col_type const SrcB0 = m2[0]; - typename tmat4x4::col_type const SrcB1 = m2[1]; - typename tmat4x4::col_type const SrcB2 = m2[2]; - typename tmat4x4::col_type const SrcB3 = m2[3]; - - tmat4x4 Result(tmat4x4::null); - Result[0] = SrcA0 * SrcB0[0] + SrcA1 * SrcB0[1] + SrcA2 * SrcB0[2] + SrcA3 * SrcB0[3]; - Result[1] = SrcA0 * SrcB1[0] + SrcA1 * SrcB1[1] + SrcA2 * SrcB1[2] + SrcA3 * SrcB1[3]; - Result[2] = SrcA0 * SrcB2[0] + SrcA1 * SrcB2[1] + SrcA2 * SrcB2[2] + SrcA3 * SrcB2[3]; - Result[3] = SrcA0 * SrcB3[0] + SrcA1 * SrcB3[1] + SrcA2 * SrcB3[2] + SrcA3 * SrcB3[3]; - return Result; - } - - template - GLM_FUNC_QUALIFIER tmat4x4 operator/ - ( - tmat4x4 const & m, - typename tmat4x4::value_type const & s - ) - { - return tmat4x4( - m[0] / s, - m[1] / s, - m[2] / s, - m[3] / s); - } - - template - GLM_FUNC_QUALIFIER tmat4x4 operator/ - ( - typename tmat4x4::value_type const & s, - tmat4x4 const & m - ) - { - return tmat4x4( - s / m[0], - s / m[1], - s / m[2], - s / m[3]); - } - - template - GLM_FUNC_QUALIFIER typename tmat4x4::col_type operator/ - ( - tmat4x4 const & m, - typename tmat4x4::row_type const & v - ) - { - return m._inverse() * v; - } - - template - GLM_FUNC_QUALIFIER typename tmat4x4::row_type operator/ - ( - typename tmat4x4::col_type const & v, - tmat4x4 const & m - ) - { - return v * m._inverse(); - } - - template - GLM_FUNC_QUALIFIER tmat4x4 operator/ - ( - tmat4x4 const & m1, - tmat4x4 const & m2 - ) - { - return m1 * m2._inverse(); - } - - // Unary constant operators - template - GLM_FUNC_QUALIFIER tmat4x4 const operator- - ( - tmat4x4 const & m - ) - { - return tmat4x4( - -m[0], - -m[1], - -m[2], - -m[3]); - } - - template - GLM_FUNC_QUALIFIER tmat4x4 const operator++ - ( - tmat4x4 const & m, - int - ) - { - return tmat4x4( - m[0] + typename tmat4x4::value_type(1), - m[1] + typename tmat4x4::value_type(1), - m[2] + typename tmat4x4::value_type(1), - m[3] + typename tmat4x4::value_type(1)); - } - - template - GLM_FUNC_QUALIFIER tmat4x4 const operator-- - ( - tmat4x4 const & m, - int - ) - { - return tmat4x4( - m[0] - typename tmat4x4::value_type(1), - m[1] - typename tmat4x4::value_type(1), - m[2] - typename tmat4x4::value_type(1), - m[3] - typename tmat4x4::value_type(1)); - } - - ////////////////////////////////////// - // Boolean operators - - template - GLM_FUNC_QUALIFIER bool operator== - ( - tmat4x4 const & m1, - tmat4x4 const & m2 - ) - { - return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]); - } - - template - GLM_FUNC_QUALIFIER bool operator!= - ( - tmat4x4 const & m1, - tmat4x4 const & m2 - ) - { - return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]); - } - -} //namespace detail -} //namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_mat4x4.inl +/// @date 2005-01-27 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tmat4x4::size_type tmat4x4::length() const + { + return 4; + } + + template + GLM_FUNC_QUALIFIER typename tmat4x4::size_type tmat4x4::col_size() + { + return 4; + } + + template + GLM_FUNC_QUALIFIER typename tmat4x4::size_type tmat4x4::row_size() + { + return 4; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tmat4x4::col_type & + tmat4x4::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return this->value[i]; + } + + template + GLM_FUNC_QUALIFIER typename tmat4x4::col_type const & + tmat4x4::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return this->value[i]; + } + + ////////////////////////////////////////////////////////////// + // Constructors + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4() + { + value_type Zero(0); + value_type One(1); + this->value[0] = col_type(One, Zero, Zero, Zero); + this->value[1] = col_type(Zero, One, Zero, Zero); + this->value[2] = col_type(Zero, Zero, One, Zero); + this->value[3] = col_type(Zero, Zero, Zero, One); + } + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + tmat4x4 const & m + ) + { + this->value[0] = m.value[0]; + this->value[1] = m.value[1]; + this->value[2] = m.value[2]; + this->value[3] = m.value[3]; + } + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + value_type const & s + ) + { + value_type const Zero(0); + this->value[0] = col_type(s, Zero, Zero, Zero); + this->value[1] = col_type(Zero, s, Zero, Zero); + this->value[2] = col_type(Zero, Zero, s, Zero); + this->value[3] = col_type(Zero, Zero, Zero, s); + } + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + value_type const & x0, value_type const & y0, value_type const & z0, value_type const & w0, + value_type const & x1, value_type const & y1, value_type const & z1, value_type const & w1, + value_type const & x2, value_type const & y2, value_type const & z2, value_type const & w2, + value_type const & x3, value_type const & y3, value_type const & z3, value_type const & w3 + ) + { + this->value[0] = col_type(x0, y0, z0, w0); + this->value[1] = col_type(x1, y1, z1, w1); + this->value[2] = col_type(x2, y2, z2, w2); + this->value[3] = col_type(x3, y3, z3, w3); + } + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + col_type const & v0, + col_type const & v1, + col_type const & v2, + col_type const & v3 + ) + { + this->value[0] = v0; + this->value[1] = v1; + this->value[2] = v2; + this->value[3] = v3; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + tmat4x4 const & m + ) + { + this->value[0] = col_type(m[0]); + this->value[1] = col_type(m[1]); + this->value[2] = col_type(m[2]); + this->value[3] = col_type(m[3]); + } + + ////////////////////////////////////// + // Convertion constructors + template + template + GLM_FUNC_DECL tmat4x4::tmat4x4 + ( + U const & s + ) + { + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types"); + + value_type const Zero(0); + this->value[0] = tvec4(value_type(s), Zero, Zero, Zero); + this->value[1] = tvec4(Zero, value_type(s), Zero, Zero); + this->value[2] = tvec4(Zero, Zero, value_type(s), Zero); + this->value[3] = tvec4(Zero, Zero, Zero, value_type(s)); + } + + template + template < + typename X1, typename Y1, typename Z1, typename W1, + typename X2, typename Y2, typename Z2, typename W2, + typename X3, typename Y3, typename Z3, typename W3, + typename X4, typename Y4, typename Z4, typename W4> + GLM_FUNC_DECL tmat4x4::tmat4x4 + ( + X1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1, + X2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2, + X3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3, + X4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 4th parameter type invalid."); + + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 5th parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 6th parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 7th parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 8th parameter type invalid."); + + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 9th parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 10th parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 11th parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 12th parameter type invalid."); + + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 13th parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 14th parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 15th parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 16th parameter type invalid."); + + this->value[0] = col_type(value_type(x1), value_type(y1), value_type(z1), value_type(w1)); + this->value[1] = col_type(value_type(x2), value_type(y2), value_type(z2), value_type(w2)); + this->value[2] = col_type(value_type(x3), value_type(y3), value_type(z3), value_type(w3)); + this->value[3] = col_type(value_type(x4), value_type(y4), value_type(z4), value_type(w4)); + } + + template + template + GLM_FUNC_DECL tmat4x4::tmat4x4 + ( + tvec4 const & v1, + tvec4 const & v2, + tvec4 const & v3, + tvec4 const & v4 + ) + { + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 1st parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid."); + GLM_STATIC_ASSERT(detail::type::is_float || std::numeric_limits::is_integer, "*mat4x4 constructor only takes float and integer types, 4th parameter type invalid."); + + this->value[0] = col_type(v1); + this->value[1] = col_type(v2); + this->value[2] = col_type(v3); + this->value[3] = col_type(v4); + } + + ////////////////////////////////////// + // Matrix convertion constructors + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + tmat2x2 const & m + ) + { + this->value[0] = col_type(m[0], detail::tvec2(0)); + this->value[1] = col_type(m[1], detail::tvec2(0)); + this->value[2] = col_type(value_type(0)); + this->value[3] = col_type(value_type(0), value_type(0), value_type(0), value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + tmat3x3 const & m + ) + { + this->value[0] = col_type(m[0], value_type(0)); + this->value[1] = col_type(m[1], value_type(0)); + this->value[2] = col_type(m[2], value_type(0)); + this->value[3] = col_type(value_type(0), value_type(0), value_type(0), value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + tmat2x3 const & m + ) + { + this->value[0] = col_type(m[0], value_type(0)); + this->value[1] = col_type(m[1], value_type(0)); + this->value[2] = col_type(value_type(0)); + this->value[3] = col_type(value_type(0), value_type(0), value_type(0), value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + tmat3x2 const & m + ) + { + this->value[0] = col_type(m[0], detail::tvec2(0)); + this->value[1] = col_type(m[1], detail::tvec2(0)); + this->value[2] = col_type(m[2], detail::tvec2(0)); + this->value[3] = col_type(value_type(0), value_type(0), value_type(0), value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + tmat2x4 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = col_type(T(0)); + this->value[3] = col_type(T(0), T(0), T(0), T(1)); + } + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + tmat4x2 const & m + ) + { + this->value[0] = col_type(m[0], detail::tvec2(0)); + this->value[1] = col_type(m[1], detail::tvec2(0)); + this->value[2] = col_type(T(0)); + this->value[3] = col_type(T(0), T(0), T(0), T(1)); + } + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + tmat3x4 const & m + ) + { + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + this->value[3] = col_type(T(0), T(0), T(0), T(1)); + } + + template + GLM_FUNC_QUALIFIER tmat4x4::tmat4x4 + ( + tmat4x3 const & m + ) + { + this->value[0] = col_type(m[0], T(0)); + this->value[1] = col_type(m[1], T(0)); + this->value[2] = col_type(m[2], T(0)); + this->value[3] = col_type(m[3], T(1)); + } + + ////////////////////////////////////////////////////////////// + // Operators + + template + GLM_FUNC_QUALIFIER tmat4x4& tmat4x4::operator= + ( + tmat4x4 const & m + ) + { + //memcpy could be faster + //memcpy(&this->value, &m.value, 16 * sizeof(valType)); + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + this->value[3] = m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x4& tmat4x4::operator= + ( + tmat4x4 const & m + ) + { + //memcpy could be faster + //memcpy(&this->value, &m.value, 16 * sizeof(valType)); + this->value[0] = m[0]; + this->value[1] = m[1]; + this->value[2] = m[2]; + this->value[3] = m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x4& tmat4x4::operator+= + ( + U const & s + ) + { + this->value[0] += s; + this->value[1] += s; + this->value[2] += s; + this->value[3] += s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x4& tmat4x4::operator+= + ( + tmat4x4 const & m + ) + { + this->value[0] += m[0]; + this->value[1] += m[1]; + this->value[2] += m[2]; + this->value[3] += m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator-= + ( + U const & s + ) + { + this->value[0] -= s; + this->value[1] -= s; + this->value[2] -= s; + this->value[3] -= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator-= + ( + tmat4x4 const & m + ) + { + this->value[0] -= m[0]; + this->value[1] -= m[1]; + this->value[2] -= m[2]; + this->value[3] -= m[3]; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator*= + ( + U const & s + ) + { + this->value[0] *= s; + this->value[1] *= s; + this->value[2] *= s; + this->value[3] *= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator*= + ( + tmat4x4 const & m + ) + { + return (*this = *this * m); + } + + template + template + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator/= + ( + U const & s + ) + { + this->value[0] /= s; + this->value[1] /= s; + this->value[2] /= s; + this->value[3] /= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator/= + ( + tmat4x4 const & m + ) + { + return (*this = *this / m); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator++ () + { + ++this->value[0]; + ++this->value[1]; + ++this->value[2]; + ++this->value[3]; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat4x4 & tmat4x4::operator-- () + { + --this->value[0]; + --this->value[1]; + --this->value[2]; + --this->value[3]; + return *this; + } + + template + GLM_FUNC_QUALIFIER tmat4x4 tmat4x4::_inverse() const + { + // Calculate all mat2 determinants + value_type SubFactor00 = this->value[2][2] * this->value[3][3] - this->value[3][2] * this->value[2][3]; + value_type SubFactor01 = this->value[2][1] * this->value[3][3] - this->value[3][1] * this->value[2][3]; + value_type SubFactor02 = this->value[2][1] * this->value[3][2] - this->value[3][1] * this->value[2][2]; + value_type SubFactor03 = this->value[2][0] * this->value[3][3] - this->value[3][0] * this->value[2][3]; + value_type SubFactor04 = this->value[2][0] * this->value[3][2] - this->value[3][0] * this->value[2][2]; + value_type SubFactor05 = this->value[2][0] * this->value[3][1] - this->value[3][0] * this->value[2][1]; + value_type SubFactor06 = this->value[1][2] * this->value[3][3] - this->value[3][2] * this->value[1][3]; + value_type SubFactor07 = this->value[1][1] * this->value[3][3] - this->value[3][1] * this->value[1][3]; + value_type SubFactor08 = this->value[1][1] * this->value[3][2] - this->value[3][1] * this->value[1][2]; + value_type SubFactor09 = this->value[1][0] * this->value[3][3] - this->value[3][0] * this->value[1][3]; + value_type SubFactor10 = this->value[1][0] * this->value[3][2] - this->value[3][0] * this->value[1][2]; + value_type SubFactor11 = this->value[1][1] * this->value[3][3] - this->value[3][1] * this->value[1][3]; + value_type SubFactor12 = this->value[1][0] * this->value[3][1] - this->value[3][0] * this->value[1][1]; + value_type SubFactor13 = this->value[1][2] * this->value[2][3] - this->value[2][2] * this->value[1][3]; + value_type SubFactor14 = this->value[1][1] * this->value[2][3] - this->value[2][1] * this->value[1][3]; + value_type SubFactor15 = this->value[1][1] * this->value[2][2] - this->value[2][1] * this->value[1][2]; + value_type SubFactor16 = this->value[1][0] * this->value[2][3] - this->value[2][0] * this->value[1][3]; + value_type SubFactor17 = this->value[1][0] * this->value[2][2] - this->value[2][0] * this->value[1][2]; + value_type SubFactor18 = this->value[1][0] * this->value[2][1] - this->value[2][0] * this->value[1][1]; +/* + tmat4x4 Inverse( + + (this->value[1][1] * SubFactor00 - this->value[1][2] * SubFactor01 + this->value[1][3] * SubFactor02), + - (this->value[1][0] * SubFactor00 - this->value[1][2] * SubFactor03 + this->value[1][3] * SubFactor04), + + (this->value[1][0] * SubFactor01 - this->value[1][1] * SubFactor03 + this->value[1][3] * SubFactor05), + - (this->value[1][0] * SubFactor02 - this->value[1][1] * SubFactor04 + this->value[1][2] * SubFactor05), + + - (this->value[0][1] * SubFactor00 - this->value[0][2] * SubFactor01 + this->value[0][3] * SubFactor02), + + (this->value[0][0] * SubFactor00 - this->value[0][2] * SubFactor03 + this->value[0][3] * SubFactor04), + - (this->value[0][0] * SubFactor01 - this->value[0][1] * SubFactor03 + this->value[0][3] * SubFactor05), + + (this->value[0][0] * SubFactor02 - this->value[0][1] * SubFactor04 + this->value[0][2] * SubFactor05), + + + (this->value[0][1] * SubFactor06 - this->value[0][2] * SubFactor07 + this->value[0][3] * SubFactor08), + - (this->value[0][0] * SubFactor06 - this->value[0][2] * SubFactor09 + this->value[0][3] * SubFactor10), + + (this->value[0][0] * SubFactor11 - this->value[0][1] * SubFactor09 + this->value[0][3] * SubFactor12), + - (this->value[0][0] * SubFactor08 - this->value[0][1] * SubFactor10 + this->value[0][2] * SubFactor12), + + - (this->value[0][1] * SubFactor13 - this->value[0][2] * SubFactor14 + this->value[0][3] * SubFactor15), + + (this->value[0][0] * SubFactor13 - this->value[0][2] * SubFactor16 + this->value[0][3] * SubFactor17), + - (this->value[0][0] * SubFactor14 - this->value[0][1] * SubFactor16 + this->value[0][3] * SubFactor18), + + (this->value[0][0] * SubFactor15 - this->value[0][1] * SubFactor17 + this->value[0][2] * SubFactor18)); +*/ + tmat4x4 Inverse( + + this->value[1][1] * SubFactor00 - this->value[1][2] * SubFactor01 + this->value[1][3] * SubFactor02, + - this->value[1][0] * SubFactor00 + this->value[1][2] * SubFactor03 - this->value[1][3] * SubFactor04, + + this->value[1][0] * SubFactor01 - this->value[1][1] * SubFactor03 + this->value[1][3] * SubFactor05, + - this->value[1][0] * SubFactor02 + this->value[1][1] * SubFactor04 - this->value[1][2] * SubFactor05, + + - this->value[0][1] * SubFactor00 + this->value[0][2] * SubFactor01 - this->value[0][3] * SubFactor02, + + this->value[0][0] * SubFactor00 - this->value[0][2] * SubFactor03 + this->value[0][3] * SubFactor04, + - this->value[0][0] * SubFactor01 + this->value[0][1] * SubFactor03 - this->value[0][3] * SubFactor05, + + this->value[0][0] * SubFactor02 - this->value[0][1] * SubFactor04 + this->value[0][2] * SubFactor05, + + + this->value[0][1] * SubFactor06 - this->value[0][2] * SubFactor07 + this->value[0][3] * SubFactor08, + - this->value[0][0] * SubFactor06 + this->value[0][2] * SubFactor09 - this->value[0][3] * SubFactor10, + + this->value[0][0] * SubFactor11 - this->value[0][1] * SubFactor09 + this->value[0][3] * SubFactor12, + - this->value[0][0] * SubFactor08 + this->value[0][1] * SubFactor10 - this->value[0][2] * SubFactor12, + + - this->value[0][1] * SubFactor13 + this->value[0][2] * SubFactor14 - this->value[0][3] * SubFactor15, + + this->value[0][0] * SubFactor13 - this->value[0][2] * SubFactor16 + this->value[0][3] * SubFactor17, + - this->value[0][0] * SubFactor14 + this->value[0][1] * SubFactor16 - this->value[0][3] * SubFactor18, + + this->value[0][0] * SubFactor15 - this->value[0][1] * SubFactor17 + this->value[0][2] * SubFactor18); + + value_type Determinant = + + this->value[0][0] * Inverse[0][0] + + this->value[0][1] * Inverse[1][0] + + this->value[0][2] * Inverse[2][0] + + this->value[0][3] * Inverse[3][0]; + + Inverse /= Determinant; + return Inverse; + } + + // Binary operators + template + GLM_FUNC_QUALIFIER tmat4x4 operator+ + ( + tmat4x4 const & m, + typename tmat4x4::value_type const & s + ) + { + return tmat4x4( + m[0] + s, + m[1] + s, + m[2] + s, + m[3] + s); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator+ + ( + typename tmat4x4::value_type const & s, + tmat4x4 const & m + ) + { + return tmat4x4( + m[0] + s, + m[1] + s, + m[2] + s, + m[3] + s); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator+ + ( + tmat4x4 const & m1, + tmat4x4 const & m2 + ) + { + return tmat4x4( + m1[0] + m2[0], + m1[1] + m2[1], + m1[2] + m2[2], + m1[3] + m2[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator- + ( + tmat4x4 const & m, + typename tmat4x4::value_type const & s + ) + { + return tmat4x4( + m[0] - s, + m[1] - s, + m[2] - s, + m[3] - s); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator- + ( + typename tmat4x4::value_type const & s, + tmat4x4 const & m + ) + { + return tmat4x4( + s - m[0], + s - m[1], + s - m[2], + s - m[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator- + ( + tmat4x4 const & m1, + tmat4x4 const & m2 + ) + { + return tmat4x4( + m1[0] - m2[0], + m1[1] - m2[1], + m1[2] - m2[2], + m1[3] - m2[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator* + ( + tmat4x4 const & m, + typename tmat4x4::value_type const & s + ) + { + return tmat4x4( + m[0] * s, + m[1] * s, + m[2] * s, + m[3] * s); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator* + ( + typename tmat4x4::value_type const & s, + tmat4x4 const & m + ) + { + return tmat4x4( + m[0] * s, + m[1] * s, + m[2] * s, + m[3] * s); + } + + template + GLM_FUNC_QUALIFIER typename tmat4x4::col_type operator* + ( + tmat4x4 const & m, + typename tmat4x4::row_type const & v + ) + { + return typename tmat4x4::col_type( + m[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w, + m[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * v.w, + m[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z + m[3][2] * v.w, + m[0][3] * v.x + m[1][3] * v.y + m[2][3] * v.z + m[3][3] * v.w); + } + + template + GLM_FUNC_QUALIFIER typename tmat4x4::row_type operator* + ( + typename tmat4x4::col_type const & v, + tmat4x4 const & m + ) + { + return typename tmat4x4::row_type( + m[0][0] * v.x + m[0][1] * v.y + m[0][2] * v.z + m[0][3] * v.w, + m[1][0] * v.x + m[1][1] * v.y + m[1][2] * v.z + m[1][3] * v.w, + m[2][0] * v.x + m[2][1] * v.y + m[2][2] * v.z + m[2][3] * v.w, + m[3][0] * v.x + m[3][1] * v.y + m[3][2] * v.z + m[3][3] * v.w); + } + + template + GLM_FUNC_QUALIFIER tmat2x4 operator* + ( + tmat4x4 const & m1, + tmat2x4 const & m2 + ) + { + return tmat2x4( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3], + m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2] + m1[3][3] * m2[0][3], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3], + m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2] + m1[3][3] * m2[1][3]); + } + + template + GLM_FUNC_QUALIFIER tmat3x4 operator* + ( + tmat4x4 const & m1, + tmat3x4 const & m2 + ) + { + return tmat3x4( + m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3], + m1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3], + m1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3], + m1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2] + m1[3][3] * m2[0][3], + m1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3], + m1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3], + m1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3], + m1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2] + m1[3][3] * m2[1][3], + m1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3], + m1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3], + m1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2] + m1[3][2] * m2[2][3], + m1[0][3] * m2[2][0] + m1[1][3] * m2[2][1] + m1[2][3] * m2[2][2] + m1[3][3] * m2[2][3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator* + ( + tmat4x4 const & m1, + tmat4x4 const & m2 + ) + { + typename tmat4x4::col_type const SrcA0 = m1[0]; + typename tmat4x4::col_type const SrcA1 = m1[1]; + typename tmat4x4::col_type const SrcA2 = m1[2]; + typename tmat4x4::col_type const SrcA3 = m1[3]; + + typename tmat4x4::col_type const SrcB0 = m2[0]; + typename tmat4x4::col_type const SrcB1 = m2[1]; + typename tmat4x4::col_type const SrcB2 = m2[2]; + typename tmat4x4::col_type const SrcB3 = m2[3]; + + tmat4x4 Result(tmat4x4::null); + Result[0] = SrcA0 * SrcB0[0] + SrcA1 * SrcB0[1] + SrcA2 * SrcB0[2] + SrcA3 * SrcB0[3]; + Result[1] = SrcA0 * SrcB1[0] + SrcA1 * SrcB1[1] + SrcA2 * SrcB1[2] + SrcA3 * SrcB1[3]; + Result[2] = SrcA0 * SrcB2[0] + SrcA1 * SrcB2[1] + SrcA2 * SrcB2[2] + SrcA3 * SrcB2[3]; + Result[3] = SrcA0 * SrcB3[0] + SrcA1 * SrcB3[1] + SrcA2 * SrcB3[2] + SrcA3 * SrcB3[3]; + return Result; + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator/ + ( + tmat4x4 const & m, + typename tmat4x4::value_type const & s + ) + { + return tmat4x4( + m[0] / s, + m[1] / s, + m[2] / s, + m[3] / s); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator/ + ( + typename tmat4x4::value_type const & s, + tmat4x4 const & m + ) + { + return tmat4x4( + s / m[0], + s / m[1], + s / m[2], + s / m[3]); + } + + template + GLM_FUNC_QUALIFIER typename tmat4x4::col_type operator/ + ( + tmat4x4 const & m, + typename tmat4x4::row_type const & v + ) + { + return m._inverse() * v; + } + + template + GLM_FUNC_QUALIFIER typename tmat4x4::row_type operator/ + ( + typename tmat4x4::col_type const & v, + tmat4x4 const & m + ) + { + return v * m._inverse(); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 operator/ + ( + tmat4x4 const & m1, + tmat4x4 const & m2 + ) + { + return m1 * m2._inverse(); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tmat4x4 const operator- + ( + tmat4x4 const & m + ) + { + return tmat4x4( + -m[0], + -m[1], + -m[2], + -m[3]); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 const operator++ + ( + tmat4x4 const & m, + int + ) + { + return tmat4x4( + m[0] + typename tmat4x4::value_type(1), + m[1] + typename tmat4x4::value_type(1), + m[2] + typename tmat4x4::value_type(1), + m[3] + typename tmat4x4::value_type(1)); + } + + template + GLM_FUNC_QUALIFIER tmat4x4 const operator-- + ( + tmat4x4 const & m, + int + ) + { + return tmat4x4( + m[0] - typename tmat4x4::value_type(1), + m[1] - typename tmat4x4::value_type(1), + m[2] - typename tmat4x4::value_type(1), + m[3] - typename tmat4x4::value_type(1)); + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tmat4x4 const & m1, + tmat4x4 const & m2 + ) + { + return (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tmat4x4 const & m1, + tmat4x4 const & m2 + ) + { + return (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]); + } + +} //namespace detail +} //namespace glm diff --git a/include/gal/opengl/glm/core/type_size.hpp b/include/gal/opengl/glm/core/type_size.hpp index 29d420dd71..c68a1f9b62 100644 --- a/include/gal/opengl/glm/core/type_size.hpp +++ b/include/gal/opengl/glm/core/type_size.hpp @@ -1,43 +1,43 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_size.hpp -/// @date 2008-10-05 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_type_size -#define glm_core_type_size - -#include - -namespace glm{ -namespace detail -{ - //typedef std::size_t size_t; - typedef int sizeType; - -}//namespace detail -}//namespace glm - -#endif//glm_core_type_size +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_size.hpp +/// @date 2008-10-05 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_size +#define glm_core_type_size + +#include + +namespace glm{ +namespace detail +{ + //typedef std::size_t size_t; + typedef int sizeType; + +}//namespace detail +}//namespace glm + +#endif//glm_core_type_size diff --git a/include/gal/opengl/glm/core/type_vec.hpp b/include/gal/opengl/glm/core/type_vec.hpp index 0afa7db51f..b3fdc9f3fd 100644 --- a/include/gal/opengl/glm/core/type_vec.hpp +++ b/include/gal/opengl/glm/core/type_vec.hpp @@ -1,41 +1,41 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_vec.hpp -/// @date 2010-01-26 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_type_vec -#define glm_core_type_vec - -#include "type_gentype.hpp" - -namespace glm{ -namespace detail -{ - -}//namespace detail -}//namespace glm - -#endif//glm_core_type_vec +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_vec.hpp +/// @date 2010-01-26 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_vec +#define glm_core_type_vec + +#include "type_gentype.hpp" + +namespace glm{ +namespace detail +{ + +}//namespace detail +}//namespace glm + +#endif//glm_core_type_vec diff --git a/include/gal/opengl/glm/core/type_vec.inl b/include/gal/opengl/glm/core/type_vec.inl index 5368dd5f7c..fbaf08e75f 100644 --- a/include/gal/opengl/glm/core/type_vec.inl +++ b/include/gal/opengl/glm/core/type_vec.inl @@ -1,27 +1,27 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_vec.inl -/// @date 2011-06-15 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_vec.inl +/// @date 2011-06-15 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// diff --git a/include/gal/opengl/glm/core/type_vec1.hpp b/include/gal/opengl/glm/core/type_vec1.hpp index 76c18e7878..862dbc37bd 100644 --- a/include/gal/opengl/glm/core/type_vec1.hpp +++ b/include/gal/opengl/glm/core/type_vec1.hpp @@ -1,212 +1,212 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_vec1.hpp -/// @date 2008-08-25 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_type_gentype1 -#define glm_core_type_gentype1 - -#include "type_vec.hpp" -#include "type_float.hpp" -#include "type_int.hpp" -#include "type_size.hpp" -#include "_swizzle.hpp" - -namespace glm{ -namespace detail -{ - template struct tref1; - template struct tref2; - template struct tref3; - template struct tref4; - template struct tvec1; - template struct tvec2; - template struct tvec3; - template struct tvec4; - - template - struct tvec1 - { - enum ctor{null}; - - typedef T value_type; - typedef std::size_t size_type; - typedef tvec1 type; - typedef tvec1 bool_type; - - GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; - - ////////////////////////////////////// - // Data - -# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW) - value_type x; -# else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES) - union {value_type x, r, s;}; -# endif//GLM_COMPONENT - - ////////////////////////////////////// - // Accesses - - GLM_FUNC_DECL value_type & operator[](size_type i); - GLM_FUNC_DECL value_type const & operator[](size_type i) const; - - ////////////////////////////////////// - // Implicit basic constructors - - GLM_FUNC_DECL tvec1(); - GLM_FUNC_DECL tvec1(tvec1 const & v); - - ////////////////////////////////////// - // Explicit basic constructors - - GLM_FUNC_DECL explicit tvec1( - ctor); - GLM_FUNC_DECL explicit tvec1( - value_type const & s); - - ////////////////////////////////////// - // Swizzle constructors - - GLM_FUNC_DECL tvec1(tref1 const & r); - - ////////////////////////////////////// - // Convertion scalar constructors - - //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec1(U const & s); - - ////////////////////////////////////// - // Convertion vector constructors - - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec1(tvec2 const & v); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec1(tvec3 const & v); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec1(tvec4 const & v); - - ////////////////////////////////////// - // Unary arithmetic operators - - GLM_FUNC_DECL tvec1 & operator= (tvec1 const & v); - template - GLM_FUNC_DECL tvec1 & operator= (tvec1 const & v); - - template - GLM_FUNC_DECL tvec1 & operator+=(U const & s); - template - GLM_FUNC_DECL tvec1 & operator+=(tvec1 const & v); - template - GLM_FUNC_DECL tvec1 & operator-=(U const & s); - template - GLM_FUNC_DECL tvec1 & operator-=(tvec1 const & v); - template - GLM_FUNC_DECL tvec1 & operator*=(U const & s); - template - GLM_FUNC_DECL tvec1 & operator*=(tvec1 const & v); - template - GLM_FUNC_DECL tvec1 & operator/=(U const & s); - template - GLM_FUNC_DECL tvec1 & operator/=(tvec1 const & v); - GLM_FUNC_DECL tvec1 & operator++(); - GLM_FUNC_DECL tvec1 & operator--(); - - ////////////////////////////////////// - // Unary bit operators - - template - GLM_FUNC_DECL tvec1 & operator%=(U const & s); - template - GLM_FUNC_DECL tvec1 & operator%=(tvec1 const & v); - template - GLM_FUNC_DECL tvec1 & operator&=(U const & s); - template - GLM_FUNC_DECL tvec1 & operator&=(tvec1 const & v); - template - GLM_FUNC_DECL tvec1 & operator|=(U const & s); - template - GLM_FUNC_DECL tvec1 & operator|=(tvec1 const & v); - template - GLM_FUNC_DECL tvec1 & operator^=(U const & s); - template - GLM_FUNC_DECL tvec1 & operator^=(tvec1 const & v); - template - GLM_FUNC_DECL tvec1 & operator<<=(U const & s); - template - GLM_FUNC_DECL tvec1 & operator<<=(tvec1 const & v); - template - GLM_FUNC_DECL tvec1 & operator>>=(U const & s); - template - GLM_FUNC_DECL tvec1 & operator>>=(tvec1 const & v); - - ////////////////////////////////////// - // Swizzle operators - - GLM_FUNC_DECL value_type swizzle(comp X) const; - GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; - GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; - GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; - GLM_FUNC_DECL tref1 swizzle(comp X); - }; - - template - struct tref1 - { - GLM_FUNC_DECL tref1(T & x); - GLM_FUNC_DECL tref1(tref1 const & r); - GLM_FUNC_DECL tref1(tvec1 const & v); - - GLM_FUNC_DECL tref1 & operator= (tref1 const & r); - GLM_FUNC_DECL tref1 & operator= (tvec1 const & v); - - T& x; - }; - - GLM_DETAIL_IS_VECTOR(tvec1); - - typedef detail::tvec1 highp_vec1_t; - typedef detail::tvec1 mediump_vec1_t; - typedef detail::tvec1 lowp_vec1_t; - typedef detail::tvec1 highp_ivec1_t; - typedef detail::tvec1 mediump_ivec1_t; - typedef detail::tvec1 lowp_ivec1_t; - typedef detail::tvec1 highp_uvec1_t; - typedef detail::tvec1 mediump_uvec1_t; - typedef detail::tvec1 lowp_uvec1_t; - -}//namespace detail -}//namespace glm - -#ifndef GLM_EXTERNAL_TEMPLATE -#include "type_vec1.inl" -#endif//GLM_EXTERNAL_TEMPLATE - -#endif//glm_core_type_gentype1 +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_vec1.hpp +/// @date 2008-08-25 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_gentype1 +#define glm_core_type_gentype1 + +#include "type_vec.hpp" +#include "type_float.hpp" +#include "type_int.hpp" +#include "type_size.hpp" +#include "_swizzle.hpp" + +namespace glm{ +namespace detail +{ + template struct tref1; + template struct tref2; + template struct tref3; + template struct tref4; + template struct tvec1; + template struct tvec2; + template struct tvec3; + template struct tvec4; + + template + struct tvec1 + { + enum ctor{null}; + + typedef T value_type; + typedef std::size_t size_type; + typedef tvec1 type; + typedef tvec1 bool_type; + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + ////////////////////////////////////// + // Data + +# if(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW) + value_type x; +# else//(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES) + union {value_type x, r, s;}; +# endif//GLM_COMPONENT + + ////////////////////////////////////// + // Accesses + + GLM_FUNC_DECL value_type & operator[](size_type i); + GLM_FUNC_DECL value_type const & operator[](size_type i) const; + + ////////////////////////////////////// + // Implicit basic constructors + + GLM_FUNC_DECL tvec1(); + GLM_FUNC_DECL tvec1(tvec1 const & v); + + ////////////////////////////////////// + // Explicit basic constructors + + GLM_FUNC_DECL explicit tvec1( + ctor); + GLM_FUNC_DECL explicit tvec1( + value_type const & s); + + ////////////////////////////////////// + // Swizzle constructors + + GLM_FUNC_DECL tvec1(tref1 const & r); + + ////////////////////////////////////// + // Convertion scalar constructors + + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec1(U const & s); + + ////////////////////////////////////// + // Convertion vector constructors + + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec1(tvec2 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec1(tvec3 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec1(tvec4 const & v); + + ////////////////////////////////////// + // Unary arithmetic operators + + GLM_FUNC_DECL tvec1 & operator= (tvec1 const & v); + template + GLM_FUNC_DECL tvec1 & operator= (tvec1 const & v); + + template + GLM_FUNC_DECL tvec1 & operator+=(U const & s); + template + GLM_FUNC_DECL tvec1 & operator+=(tvec1 const & v); + template + GLM_FUNC_DECL tvec1 & operator-=(U const & s); + template + GLM_FUNC_DECL tvec1 & operator-=(tvec1 const & v); + template + GLM_FUNC_DECL tvec1 & operator*=(U const & s); + template + GLM_FUNC_DECL tvec1 & operator*=(tvec1 const & v); + template + GLM_FUNC_DECL tvec1 & operator/=(U const & s); + template + GLM_FUNC_DECL tvec1 & operator/=(tvec1 const & v); + GLM_FUNC_DECL tvec1 & operator++(); + GLM_FUNC_DECL tvec1 & operator--(); + + ////////////////////////////////////// + // Unary bit operators + + template + GLM_FUNC_DECL tvec1 & operator%=(U const & s); + template + GLM_FUNC_DECL tvec1 & operator%=(tvec1 const & v); + template + GLM_FUNC_DECL tvec1 & operator&=(U const & s); + template + GLM_FUNC_DECL tvec1 & operator&=(tvec1 const & v); + template + GLM_FUNC_DECL tvec1 & operator|=(U const & s); + template + GLM_FUNC_DECL tvec1 & operator|=(tvec1 const & v); + template + GLM_FUNC_DECL tvec1 & operator^=(U const & s); + template + GLM_FUNC_DECL tvec1 & operator^=(tvec1 const & v); + template + GLM_FUNC_DECL tvec1 & operator<<=(U const & s); + template + GLM_FUNC_DECL tvec1 & operator<<=(tvec1 const & v); + template + GLM_FUNC_DECL tvec1 & operator>>=(U const & s); + template + GLM_FUNC_DECL tvec1 & operator>>=(tvec1 const & v); + + ////////////////////////////////////// + // Swizzle operators + + GLM_FUNC_DECL value_type swizzle(comp X) const; + GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; + GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; + GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + GLM_FUNC_DECL tref1 swizzle(comp X); + }; + + template + struct tref1 + { + GLM_FUNC_DECL tref1(T & x); + GLM_FUNC_DECL tref1(tref1 const & r); + GLM_FUNC_DECL tref1(tvec1 const & v); + + GLM_FUNC_DECL tref1 & operator= (tref1 const & r); + GLM_FUNC_DECL tref1 & operator= (tvec1 const & v); + + T& x; + }; + + GLM_DETAIL_IS_VECTOR(tvec1); + + typedef detail::tvec1 highp_vec1_t; + typedef detail::tvec1 mediump_vec1_t; + typedef detail::tvec1 lowp_vec1_t; + typedef detail::tvec1 highp_ivec1_t; + typedef detail::tvec1 mediump_ivec1_t; + typedef detail::tvec1 lowp_ivec1_t; + typedef detail::tvec1 highp_uvec1_t; + typedef detail::tvec1 mediump_uvec1_t; + typedef detail::tvec1 lowp_uvec1_t; + +}//namespace detail +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_vec1.inl" +#endif//GLM_EXTERNAL_TEMPLATE + +#endif//glm_core_type_gentype1 diff --git a/include/gal/opengl/glm/core/type_vec1.inl b/include/gal/opengl/glm/core/type_vec1.inl index aacd9103df..7214bf2fb1 100644 --- a/include/gal/opengl/glm/core/type_vec1.inl +++ b/include/gal/opengl/glm/core/type_vec1.inl @@ -1,928 +1,928 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_vec1.inl -/// @date 2008-08-25 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm{ -namespace detail -{ - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec1::size_type tvec1::length() const - { - return 1; - } - - ////////////////////////////////////// - // Accesses - - template - GLM_FUNC_QUALIFIER typename tvec1::value_type & tvec1::operator[] - ( - size_type i - ) - { - assert(i < this->length()); - return (&x)[i]; - } - - template - GLM_FUNC_QUALIFIER typename tvec1::value_type const & tvec1::operator[] - ( - size_type i - ) const - { - assert(i < this->length()); - return (&x)[i]; - } - - ////////////////////////////////////// - // Implicit basic constructors - - template - GLM_FUNC_QUALIFIER tvec1::tvec1() : - x(value_type(0)) - {} - - template - GLM_FUNC_QUALIFIER tvec1::tvec1 - ( - ctor - ) - {} - - template - GLM_FUNC_QUALIFIER tvec1::tvec1 - ( - tvec1 const & v - ) : - x(v.x) - {} - - ////////////////////////////////////// - // Explicit basic constructors - - template - GLM_FUNC_QUALIFIER tvec1::tvec1 - ( - value_type const & s - ) : - x(s) - {} - - ////////////////////////////////////// - // Swizzle constructors - - template - GLM_FUNC_QUALIFIER tvec1::tvec1 - ( - tref1 const & r - ) : - x(r.x) - {} - - ////////////////////////////////////// - // Convertion scalar constructors - - template - template - GLM_FUNC_QUALIFIER tvec1::tvec1 - ( - U const & s - ) : - x(value_type(s)) - {} - - ////////////////////////////////////// - // Convertion vector constructors - - template - template - GLM_FUNC_QUALIFIER tvec1::tvec1 - ( - tvec2 const & v - ) : - x(value_type(v.x)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec1::tvec1 - ( - tvec3 const & v - ) : - x(value_type(v.x)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec1::tvec1 - ( - tvec4 const & v - ) : - x(value_type(v.x)) - {} - - ////////////////////////////////////// - // Unary arithmetic operators - - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator= - ( - tvec1 const & v - ) - { - this->x = v.x; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator= - ( - tvec1 const & v - ) - { - this->x = T(v.x); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator+= - ( - U const & s - ) - { - this->x += T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator+= - ( - tvec1 const & v - ) - { - this->x += T(v.x); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator-= - ( - U const & s - ) - { - this->x -= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator-= - ( - tvec1 const & v - ) - { - this->x -= T(v.x); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator*= - ( - U const & s - ) - { - this->x *= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator*= - ( - tvec1 const & v - ) - { - this->x *= T(v.x); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator/= - ( - U const & s - ) - { - this->x /= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator/= - ( - tvec1 const & v - ) - { - this->x /= T(v.x); - return *this; - } - - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator++() - { - ++this->x; - return *this; - } - - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator--() - { - --this->x; - return *this; - } - - ////////////////////////////////////// - // Boolean operators - - template - GLM_FUNC_QUALIFIER bool operator== - ( - tvec1 const & v1, - tvec1 const & v2 - ) - { - return (v1.x == v2.x); - } - - template - GLM_FUNC_QUALIFIER bool operator!= - ( - tvec1 const & v1, - tvec1 const & v2 - ) - { - return (v1.x != v2.x); - } - - ////////////////////////////////////// - // Unary bit operators - - template - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator%= - ( - U const & s - ) - { - this->x %= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator%= - ( - tvec1 const & v - ) - { - this->x %= T(v.x); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator&= - ( - U const & s - ) - { - this->x &= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator&= - ( - tvec1 const & v - ) - { - this->x &= T(v.x); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator|= - ( - U const & s - ) - { - this->x |= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator|= - ( - tvec1 const & v - ) - { - this->x |= U(v.x); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator^= - ( - U const & s - ) - { - this->x ^= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator^= - ( - tvec1 const & v - ) - { - this->x ^= T(v.x); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator<<= - ( - U const & s - ) - { - this->x <<= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator<<= - ( - tvec1 const & v - ) - { - this->x <<= T(v.x); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator>>= - ( - U const & s - ) - { - this->x >>= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec1 & tvec1::operator>>= - ( - tvec1 const & v - ) - { - this->x >>= T(v.x); - return *this; - } - - ////////////////////////////////////// - // Swizzle operators - - template - GLM_FUNC_QUALIFIER T - tvec1::swizzle(comp x) const - { - return (*this)[x]; - } - - template - GLM_FUNC_QUALIFIER tvec2 - tvec1::swizzle - ( - comp x, - comp y - ) const - { - return tvec2( - (*this)[x], - (*this)[y]); - } - - template - GLM_FUNC_QUALIFIER tvec3 - tvec1::swizzle - ( - comp x, - comp y, - comp z - ) const - { - return tvec3( - (*this)[x], - (*this)[y], - (*this)[z]); - } - - template - GLM_FUNC_QUALIFIER tvec4 - tvec1::swizzle - ( - comp x, - comp y, - comp z, - comp w - ) const - { - return tvec4( - (*this)[x], - (*this)[y], - (*this)[z], - (*this)[w]); - } - - template - GLM_FUNC_QUALIFIER tref1 - tvec1::swizzle - ( - comp x - ) - { - return tref1( - (*this)[x]); - } - - ////////////////////////////////////// - // Binary arithmetic operators - - template - GLM_FUNC_QUALIFIER tvec1 operator+ - ( - tvec1 const & v, - typename tvec1::value_type const & s - ) - { - return tvec1( - v.x + s); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator+ - ( - typename tvec1::value_type const & s, - tvec1 const & v - ) - { - return tvec1( - s + v.x); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator+ - ( - tvec1 const & v1, - tvec1 const & v2 - ) - { - return tvec1( - v1.x + v2.x); - } - - //operator- - template - GLM_FUNC_QUALIFIER tvec1 operator- - ( - tvec1 const & v, - typename tvec1::value_type const & s - ) - { - return tvec1( - v.x - s); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator- - ( - typename tvec1::value_type const & s, - tvec1 const & v - ) - { - return tvec1( - s - v.x); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator- - ( - tvec1 const & v1, - tvec1 const & v2 - ) - { - return tvec1( - v1.x - v2.x); - } - - //operator* - template - GLM_FUNC_QUALIFIER tvec1 operator* - ( - tvec1 const & v, - typename tvec1::value_type const & s - ) - { - return tvec1( - v.x * s); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator* - ( - typename tvec1::value_type const & s, - tvec1 const & v - ) - { - return tvec1( - s * v.x); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator* - ( - tvec1 const & v1, - tvec1 const & v2 - ) - { - return tvec1( - v1.x * v2.x); - } - - //operator/ - template - GLM_FUNC_QUALIFIER tvec1 operator/ - ( - tvec1 const & v, - typename tvec1::value_type const & s - ) - { - return tvec1( - v.x / s); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator/ - ( - typename tvec1::value_type const & s, - tvec1 const & v - ) - { - return tvec1( - s / v.x); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator/ - ( - tvec1 const & v1, - tvec1 const & v2 - ) - { - return tvec1( - v1.x / v2.x); - } - - // Unary constant operators - template - GLM_FUNC_QUALIFIER tvec1 operator- - ( - tvec1 const & v - ) - { - return tvec1( - -v.x); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator++ - ( - tvec1 const & v, - int - ) - { - return tvec1( - v.x + T(1)); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator-- - ( - tvec1 const & v, - int - ) - { - return tvec1( - v.x - T(1)); - } - - ////////////////////////////////////// - // Binary bit operators - - template - GLM_FUNC_QUALIFIER tvec1 operator% - ( - tvec1 const & v, - typename tvec1::value_type const & s - ) - { - return tvec1( - v.x % s); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator% - ( - typename tvec1::value_type const & s, - tvec1 const & v - ) - { - return tvec1( - s % v.x); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator% - ( - tvec1 const & v1, - tvec1 const & v2 - ) - { - return tvec1( - v1.x % v2.x); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator& - ( - tvec1 const & v, - typename tvec1::value_type const & s - ) - { - return tvec1( - v.x & s); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator& - ( - typename tvec1::value_type const & s, - tvec1 const & v - ) - { - return tvec1( - s & v.x); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator& - ( - tvec1 const & v1, - tvec1 const & v2 - ) - { - return tvec1( - v1.x & v2.x); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator| - ( - tvec1 const & v, - typename tvec1::value_type const & s - ) - { - return tvec1( - v.x | s); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator| - ( - typename tvec1::value_type const & s, - tvec1 const & v - ) - { - return tvec1( - s | v.x); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator| - ( - tvec1 const & v1, - tvec1 const & v2 - ) - { - return tvec1( - v1.x | v2.x); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator^ - ( - tvec1 const & v, - typename tvec1::value_type const & s - ) - { - return tvec1( - v.x ^ s); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator^ - ( - typename tvec1::value_type const & s, - tvec1 const & v - ) - { - return tvec1( - s ^ v.x); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator^ - ( - tvec1 const & v1, - tvec1 const & v2 - ) - { - return tvec1( - v1.x ^ v2.x); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator<< - ( - tvec1 const & v, - typename tvec1::value_type const & s - ) - { - return tvec1( - v.x << s); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator<< - ( - typename tvec1::value_type const & s, - tvec1 const & v - ) - { - return tvec1( - s << v.x); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator<< - ( - tvec1 const & v1, - tvec1 const & v2 - ) - { - return tvec1( - v1.x << v2.x); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator>> - ( - tvec1 const & v, - typename tvec1::value_type const & s - ) - { - return tvec1( - v.x >> s); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator>> - ( - typename tvec1::value_type const & s, - tvec1 const & v - ) - { - return tvec1( - s >> v.x); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator>> - ( - tvec1 const & v1, - tvec1 const & v2 - ) - { - return tvec1( - v1.x >> v2.x); - } - - template - GLM_FUNC_QUALIFIER tvec1 operator~ - ( - tvec1 const & v - ) - { - return tvec1( - ~v.x); - } - - ////////////////////////////////////// - // tref definition - - template - GLM_FUNC_QUALIFIER tref1::tref1 - ( - T & x - ) : - x(x) - {} - - template - GLM_FUNC_QUALIFIER tref1::tref1 - ( - tref1 const & r - ) : - x(r.x) - {} - - template - GLM_FUNC_QUALIFIER tref1::tref1 - ( - tvec1 const & v - ) : - x(v.x) - {} - - template - GLM_FUNC_QUALIFIER tref1 & tref1::operator= - ( - tref1 const & r - ) - { - x = r.x; - return *this; - } - - template - GLM_FUNC_QUALIFIER tref1 & tref1::operator= - ( - tvec1 const & v - ) - { - x = v.x; - return *this; - } - -}//namespace detail -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_vec1.inl +/// @date 2008-08-25 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec1::size_type tvec1::length() const + { + return 1; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tvec1::value_type & tvec1::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return (&x)[i]; + } + + template + GLM_FUNC_QUALIFIER typename tvec1::value_type const & tvec1::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return (&x)[i]; + } + + ////////////////////////////////////// + // Implicit basic constructors + + template + GLM_FUNC_QUALIFIER tvec1::tvec1() : + x(value_type(0)) + {} + + template + GLM_FUNC_QUALIFIER tvec1::tvec1 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tvec1::tvec1 + ( + tvec1 const & v + ) : + x(v.x) + {} + + ////////////////////////////////////// + // Explicit basic constructors + + template + GLM_FUNC_QUALIFIER tvec1::tvec1 + ( + value_type const & s + ) : + x(s) + {} + + ////////////////////////////////////// + // Swizzle constructors + + template + GLM_FUNC_QUALIFIER tvec1::tvec1 + ( + tref1 const & r + ) : + x(r.x) + {} + + ////////////////////////////////////// + // Convertion scalar constructors + + template + template + GLM_FUNC_QUALIFIER tvec1::tvec1 + ( + U const & s + ) : + x(value_type(s)) + {} + + ////////////////////////////////////// + // Convertion vector constructors + + template + template + GLM_FUNC_QUALIFIER tvec1::tvec1 + ( + tvec2 const & v + ) : + x(value_type(v.x)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec1::tvec1 + ( + tvec3 const & v + ) : + x(value_type(v.x)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec1::tvec1 + ( + tvec4 const & v + ) : + x(value_type(v.x)) + {} + + ////////////////////////////////////// + // Unary arithmetic operators + + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator= + ( + tvec1 const & v + ) + { + this->x = v.x; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator= + ( + tvec1 const & v + ) + { + this->x = T(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator+= + ( + U const & s + ) + { + this->x += T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator+= + ( + tvec1 const & v + ) + { + this->x += T(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator-= + ( + U const & s + ) + { + this->x -= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator-= + ( + tvec1 const & v + ) + { + this->x -= T(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator*= + ( + U const & s + ) + { + this->x *= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator*= + ( + tvec1 const & v + ) + { + this->x *= T(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator/= + ( + U const & s + ) + { + this->x /= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator/= + ( + tvec1 const & v + ) + { + this->x /= T(v.x); + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator++() + { + ++this->x; + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator--() + { + --this->x; + return *this; + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return (v1.x == v2.x); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return (v1.x != v2.x); + } + + ////////////////////////////////////// + // Unary bit operators + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator%= + ( + U const & s + ) + { + this->x %= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator%= + ( + tvec1 const & v + ) + { + this->x %= T(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator&= + ( + U const & s + ) + { + this->x &= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator&= + ( + tvec1 const & v + ) + { + this->x &= T(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator|= + ( + U const & s + ) + { + this->x |= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator|= + ( + tvec1 const & v + ) + { + this->x |= U(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator^= + ( + U const & s + ) + { + this->x ^= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator^= + ( + tvec1 const & v + ) + { + this->x ^= T(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator<<= + ( + U const & s + ) + { + this->x <<= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator<<= + ( + tvec1 const & v + ) + { + this->x <<= T(v.x); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator>>= + ( + U const & s + ) + { + this->x >>= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec1 & tvec1::operator>>= + ( + tvec1 const & v + ) + { + this->x >>= T(v.x); + return *this; + } + + ////////////////////////////////////// + // Swizzle operators + + template + GLM_FUNC_QUALIFIER T + tvec1::swizzle(comp x) const + { + return (*this)[x]; + } + + template + GLM_FUNC_QUALIFIER tvec2 + tvec1::swizzle + ( + comp x, + comp y + ) const + { + return tvec2( + (*this)[x], + (*this)[y]); + } + + template + GLM_FUNC_QUALIFIER tvec3 + tvec1::swizzle + ( + comp x, + comp y, + comp z + ) const + { + return tvec3( + (*this)[x], + (*this)[y], + (*this)[z]); + } + + template + GLM_FUNC_QUALIFIER tvec4 + tvec1::swizzle + ( + comp x, + comp y, + comp z, + comp w + ) const + { + return tvec4( + (*this)[x], + (*this)[y], + (*this)[z], + (*this)[w]); + } + + template + GLM_FUNC_QUALIFIER tref1 + tvec1::swizzle + ( + comp x + ) + { + return tref1( + (*this)[x]); + } + + ////////////////////////////////////// + // Binary arithmetic operators + + template + GLM_FUNC_QUALIFIER tvec1 operator+ + ( + tvec1 const & v, + typename tvec1::value_type const & s + ) + { + return tvec1( + v.x + s); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator+ + ( + typename tvec1::value_type const & s, + tvec1 const & v + ) + { + return tvec1( + s + v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator+ + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return tvec1( + v1.x + v2.x); + } + + //operator- + template + GLM_FUNC_QUALIFIER tvec1 operator- + ( + tvec1 const & v, + typename tvec1::value_type const & s + ) + { + return tvec1( + v.x - s); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator- + ( + typename tvec1::value_type const & s, + tvec1 const & v + ) + { + return tvec1( + s - v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator- + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return tvec1( + v1.x - v2.x); + } + + //operator* + template + GLM_FUNC_QUALIFIER tvec1 operator* + ( + tvec1 const & v, + typename tvec1::value_type const & s + ) + { + return tvec1( + v.x * s); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator* + ( + typename tvec1::value_type const & s, + tvec1 const & v + ) + { + return tvec1( + s * v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator* + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return tvec1( + v1.x * v2.x); + } + + //operator/ + template + GLM_FUNC_QUALIFIER tvec1 operator/ + ( + tvec1 const & v, + typename tvec1::value_type const & s + ) + { + return tvec1( + v.x / s); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator/ + ( + typename tvec1::value_type const & s, + tvec1 const & v + ) + { + return tvec1( + s / v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator/ + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return tvec1( + v1.x / v2.x); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tvec1 operator- + ( + tvec1 const & v + ) + { + return tvec1( + -v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator++ + ( + tvec1 const & v, + int + ) + { + return tvec1( + v.x + T(1)); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator-- + ( + tvec1 const & v, + int + ) + { + return tvec1( + v.x - T(1)); + } + + ////////////////////////////////////// + // Binary bit operators + + template + GLM_FUNC_QUALIFIER tvec1 operator% + ( + tvec1 const & v, + typename tvec1::value_type const & s + ) + { + return tvec1( + v.x % s); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator% + ( + typename tvec1::value_type const & s, + tvec1 const & v + ) + { + return tvec1( + s % v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator% + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return tvec1( + v1.x % v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator& + ( + tvec1 const & v, + typename tvec1::value_type const & s + ) + { + return tvec1( + v.x & s); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator& + ( + typename tvec1::value_type const & s, + tvec1 const & v + ) + { + return tvec1( + s & v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator& + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return tvec1( + v1.x & v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator| + ( + tvec1 const & v, + typename tvec1::value_type const & s + ) + { + return tvec1( + v.x | s); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator| + ( + typename tvec1::value_type const & s, + tvec1 const & v + ) + { + return tvec1( + s | v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator| + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return tvec1( + v1.x | v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator^ + ( + tvec1 const & v, + typename tvec1::value_type const & s + ) + { + return tvec1( + v.x ^ s); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator^ + ( + typename tvec1::value_type const & s, + tvec1 const & v + ) + { + return tvec1( + s ^ v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator^ + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return tvec1( + v1.x ^ v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator<< + ( + tvec1 const & v, + typename tvec1::value_type const & s + ) + { + return tvec1( + v.x << s); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator<< + ( + typename tvec1::value_type const & s, + tvec1 const & v + ) + { + return tvec1( + s << v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator<< + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return tvec1( + v1.x << v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator>> + ( + tvec1 const & v, + typename tvec1::value_type const & s + ) + { + return tvec1( + v.x >> s); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator>> + ( + typename tvec1::value_type const & s, + tvec1 const & v + ) + { + return tvec1( + s >> v.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator>> + ( + tvec1 const & v1, + tvec1 const & v2 + ) + { + return tvec1( + v1.x >> v2.x); + } + + template + GLM_FUNC_QUALIFIER tvec1 operator~ + ( + tvec1 const & v + ) + { + return tvec1( + ~v.x); + } + + ////////////////////////////////////// + // tref definition + + template + GLM_FUNC_QUALIFIER tref1::tref1 + ( + T & x + ) : + x(x) + {} + + template + GLM_FUNC_QUALIFIER tref1::tref1 + ( + tref1 const & r + ) : + x(r.x) + {} + + template + GLM_FUNC_QUALIFIER tref1::tref1 + ( + tvec1 const & v + ) : + x(v.x) + {} + + template + GLM_FUNC_QUALIFIER tref1 & tref1::operator= + ( + tref1 const & r + ) + { + x = r.x; + return *this; + } + + template + GLM_FUNC_QUALIFIER tref1 & tref1::operator= + ( + tvec1 const & v + ) + { + x = v.x; + return *this; + } + +}//namespace detail +}//namespace glm diff --git a/include/gal/opengl/glm/core/type_vec2.hpp b/include/gal/opengl/glm/core/type_vec2.hpp index 8aa1bca5e3..0cdcdc63e0 100644 --- a/include/gal/opengl/glm/core/type_vec2.hpp +++ b/include/gal/opengl/glm/core/type_vec2.hpp @@ -1,317 +1,317 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_vec2.hpp -/// @date 2008-08-18 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_type_gentype2 -#define glm_core_type_gentype2 - -#include "type_vec.hpp" -#include "type_float.hpp" -#include "type_int.hpp" -#include "type_size.hpp" -#include "_swizzle.hpp" - -namespace glm{ -namespace detail -{ - template struct tref2; - template struct tref3; - template struct tref4; - template struct tvec3; - template struct tvec4; - - template - struct tvec2 - { - enum ctor{null}; - - typedef T value_type; - typedef std::size_t size_type; - typedef tvec2 type; - typedef tvec2 bool_type; - - GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; - - ////////////////////////////////////// - // Data - -# if(GLM_COMPONENT == GLM_COMPONENT_CXX11) - union - { -# if(defined(GLM_SWIZZLE)) - _GLM_SWIZZLE2_2_MEMBERS(value_type, glm::detail::tvec2, x, y) - _GLM_SWIZZLE2_2_MEMBERS(value_type, glm::detail::tvec2, r, g) - _GLM_SWIZZLE2_2_MEMBERS(value_type, glm::detail::tvec2, s, t) - _GLM_SWIZZLE2_3_MEMBERS(value_type, glm::detail::tvec3, x, y) - _GLM_SWIZZLE2_3_MEMBERS(value_type, glm::detail::tvec3, r, g) - _GLM_SWIZZLE2_3_MEMBERS(value_type, glm::detail::tvec3, s, t) - _GLM_SWIZZLE2_4_MEMBERS(value_type, glm::detail::tvec4, x, y) - _GLM_SWIZZLE2_4_MEMBERS(value_type, glm::detail::tvec4, r, g) - _GLM_SWIZZLE2_4_MEMBERS(value_type, glm::detail::tvec4, s, t) -# endif//(defined(GLM_SWIZZLE)) - - struct{value_type r, g;}; - struct{value_type s, t;}; - struct{value_type x, y;}; - }; -# elif(GLM_COMPONENT == GLM_COMPONENT_CXX98) - union {value_type x, r, s;}; - union {value_type y, g, t;}; - -# if(defined(GLM_SWIZZLE)) - // Defines all he swizzle operator as functions - GLM_SWIZZLE_GEN_REF_FROM_VEC2(value_type, detail::tvec2, detail::tref2) - GLM_SWIZZLE_GEN_VEC_FROM_VEC2(value_type, detail::tvec2, detail::tvec2, detail::tvec3, detail::tvec4) -# endif//(defined(GLM_SWIZZLE)) -# else //(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW) - value_type x, y; - -# if(defined(GLM_SWIZZLE)) - // Defines all he swizzle operator as functions - GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(value_type, detail::tvec2, detail::tref2, x, y) - GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(value_type, detail::tvec2, detail::tvec2, detail::tvec3, detail::tvec4, x, y) -# endif//(defined(GLM_SWIZZLE)) -# endif//GLM_COMPONENT - - ////////////////////////////////////// - // Accesses - - GLM_FUNC_DECL value_type & operator[](size_type i); - GLM_FUNC_DECL value_type const & operator[](size_type i) const; - - ////////////////////////////////////// - // Implicit basic constructors - - GLM_FUNC_DECL tvec2(); - GLM_FUNC_DECL tvec2(tvec2 const & v); - - ////////////////////////////////////// - // Explicit basic constructors - - GLM_FUNC_DECL explicit tvec2( - ctor); - GLM_FUNC_DECL explicit tvec2( - value_type const & s); - GLM_FUNC_DECL explicit tvec2( - value_type const & s1, - value_type const & s2); - - ////////////////////////////////////// - // Swizzle constructors - - tvec2(tref2 const & r); - - template - GLM_FUNC_DECL tvec2(const glm::detail::swizzle<2,T,tvec2,E0,E1,-1,-2>& that) - { - *this = that(); - } - - ////////////////////////////////////// - // Convertion constructors - - //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec2( - U const & x); - //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec2( - U const & x, - V const & y); - - ////////////////////////////////////// - // Convertion vector constructors - - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec2(tvec2 const & v); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec2(tvec3 const & v); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec2(tvec4 const & v); - - ////////////////////////////////////// - // Unary arithmetic operators - - GLM_FUNC_DECL tvec2 & operator= (tvec2 const & v); - template - GLM_FUNC_DECL tvec2 & operator= (tvec2 const & v); - - template - GLM_FUNC_DECL tvec2 & operator+=(U const & s); - template - GLM_FUNC_DECL tvec2 & operator+=(tvec2 const & v); - template - GLM_FUNC_DECL tvec2 & operator-=(U const & s); - template - GLM_FUNC_DECL tvec2 & operator-=(tvec2 const & v); - template - GLM_FUNC_DECL tvec2 & operator*=(U const & s); - template - GLM_FUNC_DECL tvec2 & operator*=(tvec2 const & v); - template - GLM_FUNC_DECL tvec2 & operator/=(U const & s); - template - GLM_FUNC_DECL tvec2 & operator/=(tvec2 const & v); - GLM_FUNC_DECL tvec2 & operator++(); - GLM_FUNC_DECL tvec2 & operator--(); - - ////////////////////////////////////// - // Unary bit operators - - template - GLM_FUNC_DECL tvec2 & operator%= (U const & s); - template - GLM_FUNC_DECL tvec2 & operator%= (tvec2 const & v); - template - GLM_FUNC_DECL tvec2 & operator&= (U const & s); - template - GLM_FUNC_DECL tvec2 & operator&= (tvec2 const & v); - template - GLM_FUNC_DECL tvec2 & operator|= (U const & s); - template - GLM_FUNC_DECL tvec2 & operator|= (tvec2 const & v); - template - GLM_FUNC_DECL tvec2 & operator^= (U const & s); - template - GLM_FUNC_DECL tvec2 & operator^= (tvec2 const & v); - template - GLM_FUNC_DECL tvec2 & operator<<=(U const & s); - template - GLM_FUNC_DECL tvec2 & operator<<=(tvec2 const & v); - template - GLM_FUNC_DECL tvec2 & operator>>=(U const & s); - template - GLM_FUNC_DECL tvec2 & operator>>=(tvec2 const & v); - - ////////////////////////////////////// - // Swizzle operators - - GLM_FUNC_DECL value_type swizzle(comp X) const; - GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; - GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; - GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; - GLM_FUNC_DECL tref2 swizzle(comp X, comp Y); - }; - - template - struct tref2 - { - GLM_FUNC_DECL tref2(T & x, T & y); - GLM_FUNC_DECL tref2(tref2 const & r); - GLM_FUNC_DECL explicit tref2(tvec2 const & v); - - GLM_FUNC_DECL tref2 & operator= (tref2 const & r); - GLM_FUNC_DECL tref2 & operator= (tvec2 const & v); - - GLM_FUNC_DECL tvec2 operator() (); - - T & x; - T & y; - }; - - GLM_DETAIL_IS_VECTOR(tvec2); - -} //namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 2 components vector of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec2 highp_vec2; - - /// 2 components vector of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec2 mediump_vec2; - - /// 2 components vector of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec2 lowp_vec2; - - /// 2 components vector of high precision signed integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec2 highp_ivec2; - - /// 2 components vector of medium precision signed integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec2 mediump_ivec2; - - /// 2 components vector of low precision signed integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec2 lowp_ivec2; - - /// 2 components vector of high precision unsigned integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec2 highp_uvec2; - - /// 2 components vector of medium precision unsigned integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec2 mediump_uvec2; - - /// 2 components vector of low precision unsigned integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec2 lowp_uvec2; - - /// @} -}//namespace glm - -#ifndef GLM_EXTERNAL_TEMPLATE -#include "type_vec2.inl" -#endif//GLM_EXTERNAL_TEMPLATE - -#endif//glm_core_type_gentype2 +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_vec2.hpp +/// @date 2008-08-18 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_gentype2 +#define glm_core_type_gentype2 + +#include "type_vec.hpp" +#include "type_float.hpp" +#include "type_int.hpp" +#include "type_size.hpp" +#include "_swizzle.hpp" + +namespace glm{ +namespace detail +{ + template struct tref2; + template struct tref3; + template struct tref4; + template struct tvec3; + template struct tvec4; + + template + struct tvec2 + { + enum ctor{null}; + + typedef T value_type; + typedef std::size_t size_type; + typedef tvec2 type; + typedef tvec2 bool_type; + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + ////////////////////////////////////// + // Data + +# if(GLM_COMPONENT == GLM_COMPONENT_CXX11) + union + { +# if(defined(GLM_SWIZZLE)) + _GLM_SWIZZLE2_2_MEMBERS(value_type, glm::detail::tvec2, x, y) + _GLM_SWIZZLE2_2_MEMBERS(value_type, glm::detail::tvec2, r, g) + _GLM_SWIZZLE2_2_MEMBERS(value_type, glm::detail::tvec2, s, t) + _GLM_SWIZZLE2_3_MEMBERS(value_type, glm::detail::tvec3, x, y) + _GLM_SWIZZLE2_3_MEMBERS(value_type, glm::detail::tvec3, r, g) + _GLM_SWIZZLE2_3_MEMBERS(value_type, glm::detail::tvec3, s, t) + _GLM_SWIZZLE2_4_MEMBERS(value_type, glm::detail::tvec4, x, y) + _GLM_SWIZZLE2_4_MEMBERS(value_type, glm::detail::tvec4, r, g) + _GLM_SWIZZLE2_4_MEMBERS(value_type, glm::detail::tvec4, s, t) +# endif//(defined(GLM_SWIZZLE)) + + struct{value_type r, g;}; + struct{value_type s, t;}; + struct{value_type x, y;}; + }; +# elif(GLM_COMPONENT == GLM_COMPONENT_CXX98) + union {value_type x, r, s;}; + union {value_type y, g, t;}; + +# if(defined(GLM_SWIZZLE)) + // Defines all he swizzle operator as functions + GLM_SWIZZLE_GEN_REF_FROM_VEC2(value_type, detail::tvec2, detail::tref2) + GLM_SWIZZLE_GEN_VEC_FROM_VEC2(value_type, detail::tvec2, detail::tvec2, detail::tvec3, detail::tvec4) +# endif//(defined(GLM_SWIZZLE)) +# else //(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW) + value_type x, y; + +# if(defined(GLM_SWIZZLE)) + // Defines all he swizzle operator as functions + GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(value_type, detail::tvec2, detail::tref2, x, y) + GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(value_type, detail::tvec2, detail::tvec2, detail::tvec3, detail::tvec4, x, y) +# endif//(defined(GLM_SWIZZLE)) +# endif//GLM_COMPONENT + + ////////////////////////////////////// + // Accesses + + GLM_FUNC_DECL value_type & operator[](size_type i); + GLM_FUNC_DECL value_type const & operator[](size_type i) const; + + ////////////////////////////////////// + // Implicit basic constructors + + GLM_FUNC_DECL tvec2(); + GLM_FUNC_DECL tvec2(tvec2 const & v); + + ////////////////////////////////////// + // Explicit basic constructors + + GLM_FUNC_DECL explicit tvec2( + ctor); + GLM_FUNC_DECL explicit tvec2( + value_type const & s); + GLM_FUNC_DECL explicit tvec2( + value_type const & s1, + value_type const & s2); + + ////////////////////////////////////// + // Swizzle constructors + + tvec2(tref2 const & r); + + template + GLM_FUNC_DECL tvec2(const glm::detail::swizzle<2,T,tvec2,E0,E1,-1,-2>& that) + { + *this = that(); + } + + ////////////////////////////////////// + // Convertion constructors + + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec2( + U const & x); + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec2( + U const & x, + V const & y); + + ////////////////////////////////////// + // Convertion vector constructors + + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec2(tvec2 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec2(tvec3 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec2(tvec4 const & v); + + ////////////////////////////////////// + // Unary arithmetic operators + + GLM_FUNC_DECL tvec2 & operator= (tvec2 const & v); + template + GLM_FUNC_DECL tvec2 & operator= (tvec2 const & v); + + template + GLM_FUNC_DECL tvec2 & operator+=(U const & s); + template + GLM_FUNC_DECL tvec2 & operator+=(tvec2 const & v); + template + GLM_FUNC_DECL tvec2 & operator-=(U const & s); + template + GLM_FUNC_DECL tvec2 & operator-=(tvec2 const & v); + template + GLM_FUNC_DECL tvec2 & operator*=(U const & s); + template + GLM_FUNC_DECL tvec2 & operator*=(tvec2 const & v); + template + GLM_FUNC_DECL tvec2 & operator/=(U const & s); + template + GLM_FUNC_DECL tvec2 & operator/=(tvec2 const & v); + GLM_FUNC_DECL tvec2 & operator++(); + GLM_FUNC_DECL tvec2 & operator--(); + + ////////////////////////////////////// + // Unary bit operators + + template + GLM_FUNC_DECL tvec2 & operator%= (U const & s); + template + GLM_FUNC_DECL tvec2 & operator%= (tvec2 const & v); + template + GLM_FUNC_DECL tvec2 & operator&= (U const & s); + template + GLM_FUNC_DECL tvec2 & operator&= (tvec2 const & v); + template + GLM_FUNC_DECL tvec2 & operator|= (U const & s); + template + GLM_FUNC_DECL tvec2 & operator|= (tvec2 const & v); + template + GLM_FUNC_DECL tvec2 & operator^= (U const & s); + template + GLM_FUNC_DECL tvec2 & operator^= (tvec2 const & v); + template + GLM_FUNC_DECL tvec2 & operator<<=(U const & s); + template + GLM_FUNC_DECL tvec2 & operator<<=(tvec2 const & v); + template + GLM_FUNC_DECL tvec2 & operator>>=(U const & s); + template + GLM_FUNC_DECL tvec2 & operator>>=(tvec2 const & v); + + ////////////////////////////////////// + // Swizzle operators + + GLM_FUNC_DECL value_type swizzle(comp X) const; + GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; + GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; + GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + GLM_FUNC_DECL tref2 swizzle(comp X, comp Y); + }; + + template + struct tref2 + { + GLM_FUNC_DECL tref2(T & x, T & y); + GLM_FUNC_DECL tref2(tref2 const & r); + GLM_FUNC_DECL explicit tref2(tvec2 const & v); + + GLM_FUNC_DECL tref2 & operator= (tref2 const & r); + GLM_FUNC_DECL tref2 & operator= (tvec2 const & v); + + GLM_FUNC_DECL tvec2 operator() (); + + T & x; + T & y; + }; + + GLM_DETAIL_IS_VECTOR(tvec2); + +} //namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 2 components vector of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 highp_vec2; + + /// 2 components vector of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 mediump_vec2; + + /// 2 components vector of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 lowp_vec2; + + /// 2 components vector of high precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 highp_ivec2; + + /// 2 components vector of medium precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 mediump_ivec2; + + /// 2 components vector of low precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 lowp_ivec2; + + /// 2 components vector of high precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 highp_uvec2; + + /// 2 components vector of medium precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 mediump_uvec2; + + /// 2 components vector of low precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec2 lowp_uvec2; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_vec2.inl" +#endif//GLM_EXTERNAL_TEMPLATE + +#endif//glm_core_type_gentype2 diff --git a/include/gal/opengl/glm/core/type_vec2.inl b/include/gal/opengl/glm/core/type_vec2.inl index acb386df6b..ccf0f1fda6 100644 --- a/include/gal/opengl/glm/core/type_vec2.inl +++ b/include/gal/opengl/glm/core/type_vec2.inl @@ -1,1028 +1,1028 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_tvec2.inl -/// @date 2008-08-18 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm{ -namespace detail -{ - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec2::size_type tvec2::length() const - { - return 2; - } - - ////////////////////////////////////// - // Accesses - - template - GLM_FUNC_QUALIFIER typename tvec2::value_type & - tvec2::operator[] - ( - size_type i - ) - { - assert(i < this->length()); - return (&x)[i]; - } - - template - GLM_FUNC_QUALIFIER typename tvec2::value_type const & - tvec2::operator[] - ( - size_type i - ) const - { - assert(i < this->length()); - return (&x)[i]; - } - - ////////////////////////////////////// - // Implicit basic constructors - - template - GLM_FUNC_QUALIFIER tvec2::tvec2() : - x(value_type(0)), - y(value_type(0)) - {} - - template - GLM_FUNC_QUALIFIER tvec2::tvec2 - ( - ctor - ) - {} - - template - GLM_FUNC_QUALIFIER tvec2::tvec2 - ( - tvec2 const & v - ) : - x(v.x), - y(v.y) - {} - - ////////////////////////////////////// - // Explicit basic constructors - - template - GLM_FUNC_QUALIFIER tvec2::tvec2 - ( - value_type const & s - ) : - x(s), - y(s) - {} - - template - GLM_FUNC_QUALIFIER tvec2::tvec2 - ( - value_type const & s1, - value_type const & s2 - ) : - x(s1), - y(s2) - {} - - ////////////////////////////////////// - // Swizzle constructors - - template - GLM_FUNC_QUALIFIER tvec2::tvec2 - ( - tref2 const & r - ) : - x(r.x), - y(r.y) - {} - - ////////////////////////////////////// - // Convertion scalar constructors - - template - template - GLM_FUNC_QUALIFIER tvec2::tvec2 - ( - U const & x - ) : - x(value_type(x)), - y(value_type(x)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec2::tvec2 - ( - U const & a, - V const & b - ) : - x(value_type(a)), - y(value_type(b)) - {} - - ////////////////////////////////////// - // Convertion vector constructors - - template - template - GLM_FUNC_QUALIFIER tvec2::tvec2 - ( - tvec2 const & v - ) : - x(value_type(v.x)), - y(value_type(v.y)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec2::tvec2 - ( - tvec3 const & v - ) : - x(value_type(v.x)), - y(value_type(v.y)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec2::tvec2 - ( - tvec4 const & v - ) : - x(value_type(v.x)), - y(value_type(v.y)) - {} - - ////////////////////////////////////// - // Unary arithmetic operators - - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator= - ( - tvec2 const & v - ) - { - this->x = v.x; - this->y = v.y; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator= - ( - tvec2 const & v - ) - { - this->x = T(v.x); - this->y = T(v.y); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator+= - ( - U const & s - ) - { - this->x += T(s); - this->y += T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator+= - ( - tvec2 const & v - ) - { - this->x += T(v.x); - this->y += T(v.y); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator-= - ( - U const & s - ) - { - this->x -= T(s); - this->y -= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator-= - ( - tvec2 const & v - ) - { - this->x -= T(v.x); - this->y -= T(v.y); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator*= - ( - U const & s - ) - { - this->x *= T(s); - this->y *= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator*= - ( - tvec2 const & v - ) - { - this->x *= T(v.x); - this->y *= T(v.y); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator/= - ( - U const & s - ) - { - this->x /= T(s); - this->y /= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator/= - ( - tvec2 const & v - ) - { - this->x /= T(v.x); - this->y /= T(v.y); - return *this; - } - - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator++() - { - ++this->x; - ++this->y; - return *this; - } - - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator--() - { - --this->x; - --this->y; - return *this; - } - - ////////////////////////////////////// - // Boolean operators - - template - GLM_FUNC_QUALIFIER bool operator== - ( - tvec2 const & v1, - tvec2 const & v2 - ) - { - return (v1.x == v2.x) && (v1.y == v2.y); - } - - template - GLM_FUNC_QUALIFIER bool operator!= - ( - tvec2 const & v1, - tvec2 const & v2 - ) - { - return (v1.x != v2.x) || (v1.y != v2.y); - } - - ////////////////////////////////////// - // Unary bit operators - - template - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator%= - ( - U const & s - ) - { - this->x %= T(s); - this->y %= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator%= - ( - tvec2 const & v - ) - { - this->x %= T(v.x); - this->y %= T(v.y); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator&= - ( - U const & s - ) - { - this->x &= T(s); - this->y &= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator&= - ( - tvec2 const & v - ) - { - this->x &= T(v.x); - this->y &= T(v.y); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator|= - ( - U const & s - ) - { - this->x |= T(s); - this->y |= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator|= - ( - tvec2 const & v - ) - { - this->x |= T(v.x); - this->y |= T(v.y); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator^= - ( - U const & s - ) - { - this->x ^= T(s); - this->y ^= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator^= - ( - tvec2 const & v - ) - { - this->x ^= T(v.x); - this->y ^= T(v.y); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator<<= - ( - U const & s - ) - { - this->x <<= T(s); - this->y <<= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator<<= - ( - tvec2 const & v - ) - { - this->x <<= T(v.x); - this->y <<= T(v.y); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator>>= - ( - U const & s - ) - { - this->x >>= T(s); - this->y >>= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator>>= - ( - tvec2 const & v - ) - { - this->x >>= T(v.x); - this->y >>= T(v.y); - return *this; - } - - ////////////////////////////////////// - // Swizzle operators - - template - GLM_FUNC_QUALIFIER typename tvec2::value_type tvec2::swizzle - ( - comp x - ) const - { - return (*this)[x]; - } - - template - GLM_FUNC_QUALIFIER tvec2 tvec2::swizzle - ( - comp x, - comp y - ) const - { - return tvec2( - (*this)[x], - (*this)[y]); - } - - template - GLM_FUNC_QUALIFIER tvec3 tvec2::swizzle - ( - comp x, - comp y, - comp z - ) const - { - return tvec3( - (*this)[x], - (*this)[y], - (*this)[z]); - } - - template - GLM_FUNC_QUALIFIER tvec4 tvec2::swizzle - ( - comp x, - comp y, - comp z, - comp w - ) const - { - return tvec4( - (*this)[x], - (*this)[y], - (*this)[z], - (*this)[w]); - } - - template - GLM_FUNC_QUALIFIER tref2 tvec2::swizzle - ( - comp x, - comp y - ) - { - return tref2( - (*this)[x], - (*this)[y]); - } - - ////////////////////////////////////// - // Binary arithmetic operators - - template - GLM_FUNC_QUALIFIER tvec2 operator+ - ( - tvec2 const & v, - T const & s - ) - { - return tvec2( - v.x + T(s), - v.y + T(s)); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator+ - ( - T const & s, - tvec2 const & v - ) - { - return tvec2( - T(s) + v.x, - T(s) + v.y); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator+ - ( - tvec2 const & v1, - tvec2 const & v2 - ) - { - return tvec2( - v1.x + T(v2.x), - v1.y + T(v2.y)); - } - - //operator- - template - GLM_FUNC_QUALIFIER tvec2 operator- - ( - tvec2 const & v, - T const & s - ) - { - return tvec2( - v.x - T(s), - v.y - T(s)); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator- - ( - T const & s, - tvec2 const & v - ) - { - return tvec2( - T(s) - v.x, - T(s) - v.y); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator- - ( - tvec2 const & v1, - tvec2 const & v2 - ) - { - return tvec2( - v1.x - T(v2.x), - v1.y - T(v2.y)); - } - - //operator* - template - GLM_FUNC_QUALIFIER tvec2 operator* - ( - tvec2 const & v, - T const & s - ) - { - return tvec2( - v.x * T(s), - v.y * T(s)); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator* - ( - T const & s, - tvec2 const & v - ) - { - return tvec2( - T(s) * v.x, - T(s) * v.y); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator* - ( - tvec2 const & v1, - tvec2 const & v2 - ) - { - return tvec2( - v1.x * T(v2.x), - v1.y * T(v2.y)); - } - - //operator/ - template - GLM_FUNC_QUALIFIER tvec2 operator/ - ( - tvec2 const & v, - T const & s - ) - { - return tvec2( - v.x / T(s), - v.y / T(s)); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator/ - ( - T const & s, - tvec2 const & v - ) - { - return tvec2( - T(s) / v.x, - T(s) / v.y); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator/ - ( - tvec2 const & v1, - tvec2 const & v2 - ) - { - return tvec2( - v1.x / T(v2.x), - v1.y / T(v2.y)); - } - - // Unary constant operators - template - GLM_FUNC_QUALIFIER tvec2 operator- - ( - tvec2 const & v - ) - { - return tvec2( - -v.x, - -v.y); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator++ - ( - tvec2 const & v, - int - ) - { - return tvec2( - v.x + T(1), - v.y + T(1)); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator-- - ( - tvec2 const & v, - int - ) - { - return tvec2( - v.x - T(1), - v.y - T(1)); - } - - ////////////////////////////////////// - // Binary bit operators - - template - GLM_FUNC_QUALIFIER tvec2 operator% - ( - tvec2 const & v, - T const & s - ) - { - return tvec2( - v.x % T(s), - v.y % T(s)); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator% - ( - T const & s, - tvec2 const & v - ) - { - return tvec2( - T(s) % v.x, - T(s) % v.y); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator% - ( - tvec2 const & v1, - tvec2 const & v2 - ) - { - return tvec2( - v1.x % T(v2.x), - v1.y % T(v2.y)); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator& - ( - tvec2 const & v, - T const & s - ) - { - return tvec2( - v.x & T(s), - v.y & T(s)); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator& - ( - T const & s, - tvec2 const & v - ) - { - return tvec2( - T(s) & v.x, - T(s) & v.y); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator& - ( - tvec2 const & v1, - tvec2 const & v2 - ) - { - return tvec2( - v1.x & T(v2.x), - v1.y & T(v2.y)); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator| - ( - tvec2 const & v, - T const & s - ) - { - return tvec2( - v.x | T(s), - v.y | T(s)); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator| - ( - T const & s, - tvec2 const & v - ) - { - return tvec2( - T(s) | v.x, - T(s) | v.y); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator| - ( - tvec2 const & v1, - tvec2 const & v2 - ) - { - return tvec2( - v1.x | T(v2.x), - v1.y | T(v2.y)); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator^ - ( - tvec2 const & v, - T const & s - ) - { - return tvec2( - v.x ^ T(s), - v.y ^ T(s)); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator^ - ( - T const & s, - tvec2 const & v - ) - { - return tvec2( - T(s) ^ v.x, - T(s) ^ v.y); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator^ - ( - tvec2 const & v1, - tvec2 const & v2 - ) - { - return tvec2( - v1.x ^ T(v2.x), - v1.y ^ T(v2.y)); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator<< - ( - tvec2 const & v, - T const & s - ) - { - return tvec2( - v.x << T(s), - v.y << T(s)); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator<< - ( - T const & s, - tvec2 const & v - ) - { - return tvec2( - s << T(v.x), - s << T(v.y)); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator<< - ( - tvec2 const & v1, - tvec2 const & v2 - ) - { - return tvec2( - v1.x << T(v2.x), - v1.y << T(v2.y)); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator>> - ( - tvec2 const & v, - T const & s - ) - { - return tvec2( - v.x >> T(s), - v.y >> T(s)); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator>> - ( - T const & s, - tvec2 const & v - ) - { - return tvec2( - T(s) >> v.x, - T(s) >> v.y); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator>> - ( - tvec2 const & v1, - tvec2 const & v2 - ) - { - return tvec2( - v1.x >> T(v2.x), - v1.y >> T(v2.y)); - } - - template - GLM_FUNC_QUALIFIER tvec2 operator~ - ( - tvec2 const & v - ) - { - return tvec2( - ~v.x, - ~v.y); - } - - ////////////////////////////////////// - // tref definition - - template - tref2::tref2 - ( - T & x, - T & y - ) : - x(x), - y(y) - {} - - template - tref2::tref2 - ( - tref2 const & r - ) : - x(r.x), - y(r.y) - {} - - template - tref2::tref2 - ( - tvec2 const & v - ) : - x(v.x), - y(v.y) - {} - - template - tref2& tref2::operator= - ( - tref2 const & r - ) - { - x = r.x; - y = r.y; - return *this; - } - - template - tref2& tref2::operator= - ( - tvec2 const & v - ) - { - x = v.x; - y = v.y; - return *this; - } - - template - GLM_FUNC_QUALIFIER tvec2 tref2::operator() () - { - return tvec2(this->x, this->y); - } -}//namespace detail -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_tvec2.inl +/// @date 2008-08-18 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec2::size_type tvec2::length() const + { + return 2; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tvec2::value_type & + tvec2::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return (&x)[i]; + } + + template + GLM_FUNC_QUALIFIER typename tvec2::value_type const & + tvec2::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return (&x)[i]; + } + + ////////////////////////////////////// + // Implicit basic constructors + + template + GLM_FUNC_QUALIFIER tvec2::tvec2() : + x(value_type(0)), + y(value_type(0)) + {} + + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + tvec2 const & v + ) : + x(v.x), + y(v.y) + {} + + ////////////////////////////////////// + // Explicit basic constructors + + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + value_type const & s + ) : + x(s), + y(s) + {} + + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + value_type const & s1, + value_type const & s2 + ) : + x(s1), + y(s2) + {} + + ////////////////////////////////////// + // Swizzle constructors + + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + tref2 const & r + ) : + x(r.x), + y(r.y) + {} + + ////////////////////////////////////// + // Convertion scalar constructors + + template + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + U const & x + ) : + x(value_type(x)), + y(value_type(x)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + U const & a, + V const & b + ) : + x(value_type(a)), + y(value_type(b)) + {} + + ////////////////////////////////////// + // Convertion vector constructors + + template + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + tvec2 const & v + ) : + x(value_type(v.x)), + y(value_type(v.y)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + tvec3 const & v + ) : + x(value_type(v.x)), + y(value_type(v.y)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + tvec4 const & v + ) : + x(value_type(v.x)), + y(value_type(v.y)) + {} + + ////////////////////////////////////// + // Unary arithmetic operators + + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator= + ( + tvec2 const & v + ) + { + this->x = v.x; + this->y = v.y; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator= + ( + tvec2 const & v + ) + { + this->x = T(v.x); + this->y = T(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator+= + ( + U const & s + ) + { + this->x += T(s); + this->y += T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator+= + ( + tvec2 const & v + ) + { + this->x += T(v.x); + this->y += T(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator-= + ( + U const & s + ) + { + this->x -= T(s); + this->y -= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator-= + ( + tvec2 const & v + ) + { + this->x -= T(v.x); + this->y -= T(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator*= + ( + U const & s + ) + { + this->x *= T(s); + this->y *= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator*= + ( + tvec2 const & v + ) + { + this->x *= T(v.x); + this->y *= T(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator/= + ( + U const & s + ) + { + this->x /= T(s); + this->y /= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator/= + ( + tvec2 const & v + ) + { + this->x /= T(v.x); + this->y /= T(v.y); + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator++() + { + ++this->x; + ++this->y; + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator--() + { + --this->x; + --this->y; + return *this; + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return (v1.x == v2.x) && (v1.y == v2.y); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return (v1.x != v2.x) || (v1.y != v2.y); + } + + ////////////////////////////////////// + // Unary bit operators + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator%= + ( + U const & s + ) + { + this->x %= T(s); + this->y %= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator%= + ( + tvec2 const & v + ) + { + this->x %= T(v.x); + this->y %= T(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator&= + ( + U const & s + ) + { + this->x &= T(s); + this->y &= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator&= + ( + tvec2 const & v + ) + { + this->x &= T(v.x); + this->y &= T(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator|= + ( + U const & s + ) + { + this->x |= T(s); + this->y |= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator|= + ( + tvec2 const & v + ) + { + this->x |= T(v.x); + this->y |= T(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator^= + ( + U const & s + ) + { + this->x ^= T(s); + this->y ^= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator^= + ( + tvec2 const & v + ) + { + this->x ^= T(v.x); + this->y ^= T(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator<<= + ( + U const & s + ) + { + this->x <<= T(s); + this->y <<= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator<<= + ( + tvec2 const & v + ) + { + this->x <<= T(v.x); + this->y <<= T(v.y); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator>>= + ( + U const & s + ) + { + this->x >>= T(s); + this->y >>= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator>>= + ( + tvec2 const & v + ) + { + this->x >>= T(v.x); + this->y >>= T(v.y); + return *this; + } + + ////////////////////////////////////// + // Swizzle operators + + template + GLM_FUNC_QUALIFIER typename tvec2::value_type tvec2::swizzle + ( + comp x + ) const + { + return (*this)[x]; + } + + template + GLM_FUNC_QUALIFIER tvec2 tvec2::swizzle + ( + comp x, + comp y + ) const + { + return tvec2( + (*this)[x], + (*this)[y]); + } + + template + GLM_FUNC_QUALIFIER tvec3 tvec2::swizzle + ( + comp x, + comp y, + comp z + ) const + { + return tvec3( + (*this)[x], + (*this)[y], + (*this)[z]); + } + + template + GLM_FUNC_QUALIFIER tvec4 tvec2::swizzle + ( + comp x, + comp y, + comp z, + comp w + ) const + { + return tvec4( + (*this)[x], + (*this)[y], + (*this)[z], + (*this)[w]); + } + + template + GLM_FUNC_QUALIFIER tref2 tvec2::swizzle + ( + comp x, + comp y + ) + { + return tref2( + (*this)[x], + (*this)[y]); + } + + ////////////////////////////////////// + // Binary arithmetic operators + + template + GLM_FUNC_QUALIFIER tvec2 operator+ + ( + tvec2 const & v, + T const & s + ) + { + return tvec2( + v.x + T(s), + v.y + T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator+ + ( + T const & s, + tvec2 const & v + ) + { + return tvec2( + T(s) + v.x, + T(s) + v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator+ + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return tvec2( + v1.x + T(v2.x), + v1.y + T(v2.y)); + } + + //operator- + template + GLM_FUNC_QUALIFIER tvec2 operator- + ( + tvec2 const & v, + T const & s + ) + { + return tvec2( + v.x - T(s), + v.y - T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator- + ( + T const & s, + tvec2 const & v + ) + { + return tvec2( + T(s) - v.x, + T(s) - v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator- + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return tvec2( + v1.x - T(v2.x), + v1.y - T(v2.y)); + } + + //operator* + template + GLM_FUNC_QUALIFIER tvec2 operator* + ( + tvec2 const & v, + T const & s + ) + { + return tvec2( + v.x * T(s), + v.y * T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator* + ( + T const & s, + tvec2 const & v + ) + { + return tvec2( + T(s) * v.x, + T(s) * v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator* + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return tvec2( + v1.x * T(v2.x), + v1.y * T(v2.y)); + } + + //operator/ + template + GLM_FUNC_QUALIFIER tvec2 operator/ + ( + tvec2 const & v, + T const & s + ) + { + return tvec2( + v.x / T(s), + v.y / T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator/ + ( + T const & s, + tvec2 const & v + ) + { + return tvec2( + T(s) / v.x, + T(s) / v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator/ + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return tvec2( + v1.x / T(v2.x), + v1.y / T(v2.y)); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tvec2 operator- + ( + tvec2 const & v + ) + { + return tvec2( + -v.x, + -v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator++ + ( + tvec2 const & v, + int + ) + { + return tvec2( + v.x + T(1), + v.y + T(1)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator-- + ( + tvec2 const & v, + int + ) + { + return tvec2( + v.x - T(1), + v.y - T(1)); + } + + ////////////////////////////////////// + // Binary bit operators + + template + GLM_FUNC_QUALIFIER tvec2 operator% + ( + tvec2 const & v, + T const & s + ) + { + return tvec2( + v.x % T(s), + v.y % T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator% + ( + T const & s, + tvec2 const & v + ) + { + return tvec2( + T(s) % v.x, + T(s) % v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator% + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return tvec2( + v1.x % T(v2.x), + v1.y % T(v2.y)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator& + ( + tvec2 const & v, + T const & s + ) + { + return tvec2( + v.x & T(s), + v.y & T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator& + ( + T const & s, + tvec2 const & v + ) + { + return tvec2( + T(s) & v.x, + T(s) & v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator& + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return tvec2( + v1.x & T(v2.x), + v1.y & T(v2.y)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator| + ( + tvec2 const & v, + T const & s + ) + { + return tvec2( + v.x | T(s), + v.y | T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator| + ( + T const & s, + tvec2 const & v + ) + { + return tvec2( + T(s) | v.x, + T(s) | v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator| + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return tvec2( + v1.x | T(v2.x), + v1.y | T(v2.y)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator^ + ( + tvec2 const & v, + T const & s + ) + { + return tvec2( + v.x ^ T(s), + v.y ^ T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator^ + ( + T const & s, + tvec2 const & v + ) + { + return tvec2( + T(s) ^ v.x, + T(s) ^ v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator^ + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return tvec2( + v1.x ^ T(v2.x), + v1.y ^ T(v2.y)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator<< + ( + tvec2 const & v, + T const & s + ) + { + return tvec2( + v.x << T(s), + v.y << T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator<< + ( + T const & s, + tvec2 const & v + ) + { + return tvec2( + s << T(v.x), + s << T(v.y)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator<< + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return tvec2( + v1.x << T(v2.x), + v1.y << T(v2.y)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator>> + ( + tvec2 const & v, + T const & s + ) + { + return tvec2( + v.x >> T(s), + v.y >> T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator>> + ( + T const & s, + tvec2 const & v + ) + { + return tvec2( + T(s) >> v.x, + T(s) >> v.y); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator>> + ( + tvec2 const & v1, + tvec2 const & v2 + ) + { + return tvec2( + v1.x >> T(v2.x), + v1.y >> T(v2.y)); + } + + template + GLM_FUNC_QUALIFIER tvec2 operator~ + ( + tvec2 const & v + ) + { + return tvec2( + ~v.x, + ~v.y); + } + + ////////////////////////////////////// + // tref definition + + template + tref2::tref2 + ( + T & x, + T & y + ) : + x(x), + y(y) + {} + + template + tref2::tref2 + ( + tref2 const & r + ) : + x(r.x), + y(r.y) + {} + + template + tref2::tref2 + ( + tvec2 const & v + ) : + x(v.x), + y(v.y) + {} + + template + tref2& tref2::operator= + ( + tref2 const & r + ) + { + x = r.x; + y = r.y; + return *this; + } + + template + tref2& tref2::operator= + ( + tvec2 const & v + ) + { + x = v.x; + y = v.y; + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec2 tref2::operator() () + { + return tvec2(this->x, this->y); + } +}//namespace detail +}//namespace glm diff --git a/include/gal/opengl/glm/core/type_vec3.hpp b/include/gal/opengl/glm/core/type_vec3.hpp index 929145666b..fa6e357c01 100644 --- a/include/gal/opengl/glm/core/type_vec3.hpp +++ b/include/gal/opengl/glm/core/type_vec3.hpp @@ -1,342 +1,342 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_vec3.hpp -/// @date 2008-08-22 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_type_gentype3 -#define glm_core_type_gentype3 - -#include "type_vec.hpp" -#include "type_float.hpp" -#include "type_int.hpp" -#include "type_size.hpp" -#include "_swizzle.hpp" - -namespace glm{ -namespace detail -{ - template struct tref2; - template struct tref3; - template struct tref4; - template struct tvec2; - template struct tvec4; - - template - struct tvec3 - { - enum ctor{null}; - - typedef T value_type; - typedef std::size_t size_type; - typedef tvec3 type; - typedef tvec3 bool_type; - - GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; - - ////////////////////////////////////// - // Data - -# if(GLM_COMPONENT == GLM_COMPONENT_CXX11) - union - { -# if(defined(GLM_SWIZZLE)) - _GLM_SWIZZLE3_2_MEMBERS(value_type, glm::detail::tvec2, x, y, z) - _GLM_SWIZZLE3_2_MEMBERS(value_type, glm::detail::tvec2, r, g, b) - _GLM_SWIZZLE3_2_MEMBERS(value_type, glm::detail::tvec2, s, t, p) - _GLM_SWIZZLE3_3_MEMBERS(value_type, glm::detail::tvec3, x, y, z) - _GLM_SWIZZLE3_3_MEMBERS(value_type, glm::detail::tvec3, r, g, b) - _GLM_SWIZZLE3_3_MEMBERS(value_type, glm::detail::tvec3, s, t, p) - _GLM_SWIZZLE3_4_MEMBERS(value_type, glm::detail::tvec4, x, y, z) - _GLM_SWIZZLE3_4_MEMBERS(value_type, glm::detail::tvec4, r, g, b) - _GLM_SWIZZLE3_4_MEMBERS(value_type, glm::detail::tvec4, s, t, p) -# endif//(defined(GLM_SWIZZLE)) - - struct{value_type r, g, b;}; - struct{value_type s, t, p;}; - struct{value_type x, y, z;}; - }; -# elif(GLM_COMPONENT == GLM_COMPONENT_CXX98) - union {value_type x, r, s;}; - union {value_type y, g, t;}; - union {value_type z, b, p;}; - -# if(defined(GLM_SWIZZLE)) - // Defines all he swizzle operator as functions - GLM_SWIZZLE_GEN_REF_FROM_VEC3(T, detail::tvec3, detail::tref2, detail::tref3) - GLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, detail::tvec3, detail::tvec2, detail::tvec3, detail::tvec4) -# endif//(defined(GLM_SWIZZLE)) -# else //(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW) - value_type x, y, z; - -# if(defined(GLM_SWIZZLE)) - // Defines all he swizzle operator as functions - GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(T, detail::tvec3, detail::tref2, detail::tref3, x, y, z) - GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(T, detail::tvec3, detail::tvec2, detail::tvec3, detail::tvec4, x, y, z) -# endif//(defined(GLM_SWIZZLE)) -# endif//GLM_COMPONENT - - ////////////////////////////////////// - // Accesses - - GLM_FUNC_DECL value_type & operator[](size_type i); - GLM_FUNC_DECL value_type const & operator[](size_type i) const; - - ////////////////////////////////////// - // Implicit basic constructors - - GLM_FUNC_DECL tvec3(); - GLM_FUNC_DECL tvec3(tvec3 const & v); - - ////////////////////////////////////// - // Explicit basic constructors - - GLM_FUNC_DECL explicit tvec3( - ctor); - GLM_FUNC_DECL explicit tvec3( - value_type const & s); - GLM_FUNC_DECL explicit tvec3( - value_type const & s1, - value_type const & s2, - value_type const & s3); - - ////////////////////////////////////// - // Convertion scalar constructors - - //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec3( - U const & x); - //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec3( - U const & x, - V const & y, - W const & z); - - ////////////////////////////////////// - // Convertion vector constructors - - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec3(tvec2 const & v, B const & s); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec3(A const & s, tvec2 const & v); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec3(tvec3 const & v); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec3(tvec4 const & v); - - ////////////////////////////////////// - // Swizzle constructors - - GLM_FUNC_DECL tvec3(tref3 const & r); - - template - GLM_FUNC_DECL explicit tvec3(tref2 const & v, B const & s); - - template - GLM_FUNC_DECL explicit tvec3(A const & s, tref2 const & v); - - template - GLM_FUNC_DECL tvec3(glm::detail::swizzle<3, T, tvec3, E0, E1, E2, -1> const & that) - { - *this = that(); - } - - template - GLM_FUNC_DECL tvec3(glm::detail::swizzle<2, T, tvec2, E0, E1, -1, -2> const & v, T const & s) - { - *this = tvec3(v(), s); - } - - template - GLM_FUNC_DECL tvec3(T const & s, glm::detail::swizzle<2, T, tvec2, E0, E1, -1, -2> const & v) - { - *this = tvec3(s, v()); - } - - ////////////////////////////////////// - // Unary arithmetic operators - - GLM_FUNC_DECL tvec3 & operator= (tvec3 const & v); - template - GLM_FUNC_DECL tvec3 & operator= (tvec3 const & v); - - template - GLM_FUNC_DECL tvec3 & operator+=(U const & s); - template - GLM_FUNC_DECL tvec3 & operator+=(tvec3 const & v); - template - GLM_FUNC_DECL tvec3 & operator-=(U const & s); - template - GLM_FUNC_DECL tvec3 & operator-=(tvec3 const & v); - template - GLM_FUNC_DECL tvec3 & operator*=(U const & s); - template - GLM_FUNC_DECL tvec3 & operator*=(tvec3 const & v); - template - GLM_FUNC_DECL tvec3 & operator/=(U const & s); - template - GLM_FUNC_DECL tvec3 & operator/=(tvec3 const & v); - GLM_FUNC_DECL tvec3 & operator++(); - GLM_FUNC_DECL tvec3 & operator--(); - - ////////////////////////////////////// - // Unary bit operators - - template - GLM_FUNC_DECL tvec3 & operator%= (U const & s); - template - GLM_FUNC_DECL tvec3 & operator%= (tvec3 const & v); - template - GLM_FUNC_DECL tvec3 & operator&= (U const & s); - template - GLM_FUNC_DECL tvec3 & operator&= (tvec3 const & v); - template - GLM_FUNC_DECL tvec3 & operator|= (U const & s); - template - GLM_FUNC_DECL tvec3 & operator|= (tvec3 const & v); - template - GLM_FUNC_DECL tvec3 & operator^= (U const & s); - template - GLM_FUNC_DECL tvec3 & operator^= (tvec3 const & v); - template - GLM_FUNC_DECL tvec3 & operator<<=(U const & s); - template - GLM_FUNC_DECL tvec3 & operator<<=(tvec3 const & v); - template - GLM_FUNC_DECL tvec3 & operator>>=(U const & s); - template - GLM_FUNC_DECL tvec3 & operator>>=(tvec3 const & v); - - ////////////////////////////////////// - // Swizzle operators - - GLM_FUNC_DECL value_type swizzle(comp X) const; - GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; - GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; - GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; - GLM_FUNC_DECL tref2 swizzle(comp X, comp Y); - GLM_FUNC_DECL tref3 swizzle(comp X, comp Y, comp Z); - }; - - template - struct tref3 - { - GLM_FUNC_DECL tref3(T & x, T & y, T & z); - GLM_FUNC_DECL tref3(tref3 const & r); - GLM_FUNC_DECL explicit tref3(tvec3 const & v); - - GLM_FUNC_DECL tref3 & operator= (tref3 const & r); - GLM_FUNC_DECL tref3 & operator= (tvec3 const & v); - - GLM_FUNC_DECL tvec3 operator() (); - - T & x; - T & y; - T & z; - }; - - GLM_DETAIL_IS_VECTOR(tvec3); -} //namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 3 components vector of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec3 highp_vec3; - - /// 3 components vector of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec3 mediump_vec3; - - /// 3 components vector of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec3 lowp_vec3; - - /// 3 components vector of high precision signed integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec3 highp_ivec3; - - /// 3 components vector of medium precision signed integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec3 mediump_ivec3; - - /// 3 components vector of low precision signed integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec3 lowp_ivec3; - - /// 3 components vector of high precision unsigned integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec3 highp_uvec3; - - /// 3 components vector of medium precision unsigned integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec3 mediump_uvec3; - - /// 3 components vector of low precision unsigned integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec3 lowp_uvec3; - - /// @} -}//namespace glm - -#ifndef GLM_EXTERNAL_TEMPLATE -#include "type_vec3.inl" -#endif//GLM_EXTERNAL_TEMPLATE - -#endif//glm_core_type_gentype3 +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_vec3.hpp +/// @date 2008-08-22 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_gentype3 +#define glm_core_type_gentype3 + +#include "type_vec.hpp" +#include "type_float.hpp" +#include "type_int.hpp" +#include "type_size.hpp" +#include "_swizzle.hpp" + +namespace glm{ +namespace detail +{ + template struct tref2; + template struct tref3; + template struct tref4; + template struct tvec2; + template struct tvec4; + + template + struct tvec3 + { + enum ctor{null}; + + typedef T value_type; + typedef std::size_t size_type; + typedef tvec3 type; + typedef tvec3 bool_type; + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + ////////////////////////////////////// + // Data + +# if(GLM_COMPONENT == GLM_COMPONENT_CXX11) + union + { +# if(defined(GLM_SWIZZLE)) + _GLM_SWIZZLE3_2_MEMBERS(value_type, glm::detail::tvec2, x, y, z) + _GLM_SWIZZLE3_2_MEMBERS(value_type, glm::detail::tvec2, r, g, b) + _GLM_SWIZZLE3_2_MEMBERS(value_type, glm::detail::tvec2, s, t, p) + _GLM_SWIZZLE3_3_MEMBERS(value_type, glm::detail::tvec3, x, y, z) + _GLM_SWIZZLE3_3_MEMBERS(value_type, glm::detail::tvec3, r, g, b) + _GLM_SWIZZLE3_3_MEMBERS(value_type, glm::detail::tvec3, s, t, p) + _GLM_SWIZZLE3_4_MEMBERS(value_type, glm::detail::tvec4, x, y, z) + _GLM_SWIZZLE3_4_MEMBERS(value_type, glm::detail::tvec4, r, g, b) + _GLM_SWIZZLE3_4_MEMBERS(value_type, glm::detail::tvec4, s, t, p) +# endif//(defined(GLM_SWIZZLE)) + + struct{value_type r, g, b;}; + struct{value_type s, t, p;}; + struct{value_type x, y, z;}; + }; +# elif(GLM_COMPONENT == GLM_COMPONENT_CXX98) + union {value_type x, r, s;}; + union {value_type y, g, t;}; + union {value_type z, b, p;}; + +# if(defined(GLM_SWIZZLE)) + // Defines all he swizzle operator as functions + GLM_SWIZZLE_GEN_REF_FROM_VEC3(T, detail::tvec3, detail::tref2, detail::tref3) + GLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, detail::tvec3, detail::tvec2, detail::tvec3, detail::tvec4) +# endif//(defined(GLM_SWIZZLE)) +# else //(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW) + value_type x, y, z; + +# if(defined(GLM_SWIZZLE)) + // Defines all he swizzle operator as functions + GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(T, detail::tvec3, detail::tref2, detail::tref3, x, y, z) + GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(T, detail::tvec3, detail::tvec2, detail::tvec3, detail::tvec4, x, y, z) +# endif//(defined(GLM_SWIZZLE)) +# endif//GLM_COMPONENT + + ////////////////////////////////////// + // Accesses + + GLM_FUNC_DECL value_type & operator[](size_type i); + GLM_FUNC_DECL value_type const & operator[](size_type i) const; + + ////////////////////////////////////// + // Implicit basic constructors + + GLM_FUNC_DECL tvec3(); + GLM_FUNC_DECL tvec3(tvec3 const & v); + + ////////////////////////////////////// + // Explicit basic constructors + + GLM_FUNC_DECL explicit tvec3( + ctor); + GLM_FUNC_DECL explicit tvec3( + value_type const & s); + GLM_FUNC_DECL explicit tvec3( + value_type const & s1, + value_type const & s2, + value_type const & s3); + + ////////////////////////////////////// + // Convertion scalar constructors + + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec3( + U const & x); + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec3( + U const & x, + V const & y, + W const & z); + + ////////////////////////////////////// + // Convertion vector constructors + + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec3(tvec2 const & v, B const & s); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec3(A const & s, tvec2 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec3(tvec3 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec3(tvec4 const & v); + + ////////////////////////////////////// + // Swizzle constructors + + GLM_FUNC_DECL tvec3(tref3 const & r); + + template + GLM_FUNC_DECL explicit tvec3(tref2 const & v, B const & s); + + template + GLM_FUNC_DECL explicit tvec3(A const & s, tref2 const & v); + + template + GLM_FUNC_DECL tvec3(glm::detail::swizzle<3, T, tvec3, E0, E1, E2, -1> const & that) + { + *this = that(); + } + + template + GLM_FUNC_DECL tvec3(glm::detail::swizzle<2, T, tvec2, E0, E1, -1, -2> const & v, T const & s) + { + *this = tvec3(v(), s); + } + + template + GLM_FUNC_DECL tvec3(T const & s, glm::detail::swizzle<2, T, tvec2, E0, E1, -1, -2> const & v) + { + *this = tvec3(s, v()); + } + + ////////////////////////////////////// + // Unary arithmetic operators + + GLM_FUNC_DECL tvec3 & operator= (tvec3 const & v); + template + GLM_FUNC_DECL tvec3 & operator= (tvec3 const & v); + + template + GLM_FUNC_DECL tvec3 & operator+=(U const & s); + template + GLM_FUNC_DECL tvec3 & operator+=(tvec3 const & v); + template + GLM_FUNC_DECL tvec3 & operator-=(U const & s); + template + GLM_FUNC_DECL tvec3 & operator-=(tvec3 const & v); + template + GLM_FUNC_DECL tvec3 & operator*=(U const & s); + template + GLM_FUNC_DECL tvec3 & operator*=(tvec3 const & v); + template + GLM_FUNC_DECL tvec3 & operator/=(U const & s); + template + GLM_FUNC_DECL tvec3 & operator/=(tvec3 const & v); + GLM_FUNC_DECL tvec3 & operator++(); + GLM_FUNC_DECL tvec3 & operator--(); + + ////////////////////////////////////// + // Unary bit operators + + template + GLM_FUNC_DECL tvec3 & operator%= (U const & s); + template + GLM_FUNC_DECL tvec3 & operator%= (tvec3 const & v); + template + GLM_FUNC_DECL tvec3 & operator&= (U const & s); + template + GLM_FUNC_DECL tvec3 & operator&= (tvec3 const & v); + template + GLM_FUNC_DECL tvec3 & operator|= (U const & s); + template + GLM_FUNC_DECL tvec3 & operator|= (tvec3 const & v); + template + GLM_FUNC_DECL tvec3 & operator^= (U const & s); + template + GLM_FUNC_DECL tvec3 & operator^= (tvec3 const & v); + template + GLM_FUNC_DECL tvec3 & operator<<=(U const & s); + template + GLM_FUNC_DECL tvec3 & operator<<=(tvec3 const & v); + template + GLM_FUNC_DECL tvec3 & operator>>=(U const & s); + template + GLM_FUNC_DECL tvec3 & operator>>=(tvec3 const & v); + + ////////////////////////////////////// + // Swizzle operators + + GLM_FUNC_DECL value_type swizzle(comp X) const; + GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; + GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; + GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + GLM_FUNC_DECL tref2 swizzle(comp X, comp Y); + GLM_FUNC_DECL tref3 swizzle(comp X, comp Y, comp Z); + }; + + template + struct tref3 + { + GLM_FUNC_DECL tref3(T & x, T & y, T & z); + GLM_FUNC_DECL tref3(tref3 const & r); + GLM_FUNC_DECL explicit tref3(tvec3 const & v); + + GLM_FUNC_DECL tref3 & operator= (tref3 const & r); + GLM_FUNC_DECL tref3 & operator= (tvec3 const & v); + + GLM_FUNC_DECL tvec3 operator() (); + + T & x; + T & y; + T & z; + }; + + GLM_DETAIL_IS_VECTOR(tvec3); +} //namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 3 components vector of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 highp_vec3; + + /// 3 components vector of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 mediump_vec3; + + /// 3 components vector of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 lowp_vec3; + + /// 3 components vector of high precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 highp_ivec3; + + /// 3 components vector of medium precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 mediump_ivec3; + + /// 3 components vector of low precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 lowp_ivec3; + + /// 3 components vector of high precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 highp_uvec3; + + /// 3 components vector of medium precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 mediump_uvec3; + + /// 3 components vector of low precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec3 lowp_uvec3; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_vec3.inl" +#endif//GLM_EXTERNAL_TEMPLATE + +#endif//glm_core_type_gentype3 diff --git a/include/gal/opengl/glm/core/type_vec3.inl b/include/gal/opengl/glm/core/type_vec3.inl index 3a1dd9433f..566266a9b6 100644 --- a/include/gal/opengl/glm/core/type_vec3.inl +++ b/include/gal/opengl/glm/core/type_vec3.inl @@ -1,1152 +1,1152 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_tvec3.inl -/// @date 2008-08-22 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm{ -namespace detail -{ - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec3::size_type tvec3::length() const - { - return 3; - } - - ////////////////////////////////////// - // Accesses - - template - GLM_FUNC_QUALIFIER typename tvec3::value_type & - tvec3::operator[] - ( - size_type i - ) - { - assert(i < this->length()); - return (&x)[i]; - } - - template - GLM_FUNC_QUALIFIER typename tvec3::value_type const & - tvec3::operator[] - ( - size_type i - ) const - { - assert(i < this->length()); - return (&x)[i]; - } - - ////////////////////////////////////// - // Implicit basic constructors - - template - GLM_FUNC_QUALIFIER tvec3::tvec3() : - x(value_type(0)), - y(value_type(0)), - z(value_type(0)) - {} - - template - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - ctor - ) - {} - - template - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - tvec3 const & v - ) : - x(v.x), - y(v.y), - z(v.z) - {} - - ////////////////////////////////////// - // Explicit basic constructors - - template - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - value_type const & s - ) : - x(s), - y(s), - z(s) - {} - - template - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - value_type const & s0, - value_type const & s1, - value_type const & s2 - ) : - x(s0), - y(s1), - z(s2) - {} - - ////////////////////////////////////// - // Swizzle constructors - - template - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - tref3 const & r - ) : - x(r.x), - y(r.y), - z(r.z) - {} - - template - template - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - tref2 const & v, - B const & s - ) : - x(value_type(v.x)), - y(value_type(v.y)), - z(value_type(s)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - A const & s, - tref2 const & v - ) : - x(value_type(s)), - y(value_type(v.x)), - z(value_type(v.y)) - {} - - ////////////////////////////////////// - // Convertion scalar constructors - - template - template - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - U const & s - ) : - x(value_type(s)), - y(value_type(s)), - z(value_type(s)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - A const & x, - B const & y, - C const & z - ) : - x(value_type(x)), - y(value_type(y)), - z(value_type(z)) - {} - - ////////////////////////////////////// - // Convertion vector constructors - - template - template - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - tvec2 const & v, - B const & s - ) : - x(value_type(v.x)), - y(value_type(v.y)), - z(value_type(s)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - A const & s, - tvec2 const & v - ) : - x(value_type(s)), - y(value_type(v.x)), - z(value_type(v.y)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - tvec3 const & v - ) : - x(value_type(v.x)), - y(value_type(v.y)), - z(value_type(v.z)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - tvec4 const & v - ) : - x(value_type(v.x)), - y(value_type(v.y)), - z(value_type(v.z)) - {} - - ////////////////////////////////////// - // Unary arithmetic operators - - template - GLM_FUNC_QUALIFIER tvec3& tvec3::operator= - ( - tvec3 const & v - ) - { - this->x = v.x; - this->y = v.y; - this->z = v.z; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec3& tvec3::operator= - ( - tvec3 const & v - ) - { - this->x = T(v.x); - this->y = T(v.y); - this->z = T(v.z); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator+= - ( - U const & s - ) - { - this->x += T(s); - this->y += T(s); - this->z += T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator+= - ( - tvec3 const & v - ) - { - this->x += T(v.x); - this->y += T(v.y); - this->z += T(v.z); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator-= - ( - U const & s - ) - { - this->x -= T(s); - this->y -= T(s); - this->z -= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator-= - ( - tvec3 const & v - ) - { - this->x -= T(v.x); - this->y -= T(v.y); - this->z -= T(v.z); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator*= - ( - U const & s - ) - { - this->x *= T(s); - this->y *= T(s); - this->z *= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator*= - ( - tvec3 const & v - ) - { - this->x *= T(v.x); - this->y *= T(v.y); - this->z *= T(v.z); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator/= - ( - U const & s - ) - { - this->x /= T(s); - this->y /= T(s); - this->z /= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator/= - ( - tvec3 const & v - ) - { - this->x /= T(v.x); - this->y /= T(v.y); - this->z /= T(v.z); - return *this; - } - - template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator++() - { - ++this->x; - ++this->y; - ++this->z; - return *this; - } - - template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator--() - { - --this->x; - --this->y; - --this->z; - return *this; - } - - ////////////////////////////////////// - // Boolean operators - - template - GLM_FUNC_QUALIFIER bool operator== - ( - tvec3 const & v1, - tvec3 const & v2 - ) - { - return (v1.x == v2.x) && (v1.y == v2.y) && (v1.z == v2.z); - } - - template - GLM_FUNC_QUALIFIER bool operator!= - ( - tvec3 const & v1, - tvec3 const & v2 - ) - { - return (v1.x != v2.x) || (v1.y != v2.y) || (v1.z != v2.z); - } - - ////////////////////////////////////// - // Unary bit operators - - template - template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator%= - ( - U const & s - ) - { - this->x %= s; - this->y %= s; - this->z %= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator%= - ( - tvec3 const & v - ) - { - this->x %= v.x; - this->y %= v.y; - this->z %= v.z; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator&= - ( - U const & s - ) - { - this->x &= s; - this->y &= s; - this->z &= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator&= - ( - tvec3 const & v - ) - { - this->x &= v.x; - this->y &= v.y; - this->z &= v.z; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator|= - ( - U const & s - ) - { - this->x |= s; - this->y |= s; - this->z |= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator|= - ( - tvec3 const & v - ) - { - this->x |= v.x; - this->y |= v.y; - this->z |= v.z; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator^= - ( - U const & s - ) - { - this->x ^= s; - this->y ^= s; - this->z ^= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator^= - ( - tvec3 const & v - ) - { - this->x ^= v.x; - this->y ^= v.y; - this->z ^= v.z; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator<<= - ( - U const & s - ) - { - this->x <<= s; - this->y <<= s; - this->z <<= s; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator<<= - ( - tvec3 const & v - ) - { - this->x <<= T(v.x); - this->y <<= T(v.y); - this->z <<= T(v.z); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator>>= - ( - U const & s - ) - { - this->x >>= T(s); - this->y >>= T(s); - this->z >>= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator>>= - ( - tvec3 const & v - ) - { - this->x >>= T(v.x); - this->y >>= T(v.y); - this->z >>= T(v.z); - return *this; - } - - ////////////////////////////////////// - // Swizzle operators - - template - GLM_FUNC_QUALIFIER typename tvec3::value_type - tvec3::swizzle - ( - comp x - ) const - { - return (*this)[x]; - } - - template - GLM_FUNC_QUALIFIER tvec2 tvec3::swizzle - ( - comp x, - comp y - ) const - { - return tvec2( - (*this)[x], - (*this)[y]); - } - - template - GLM_FUNC_QUALIFIER tvec3 tvec3::swizzle - ( - comp x, - comp y, - comp z - ) const - { - return tvec3( - (*this)[x], - (*this)[y], - (*this)[z]); - } - - template - GLM_FUNC_QUALIFIER tvec4 tvec3::swizzle - ( - comp x, - comp y, - comp z, - comp w - ) const - { - return tvec4( - (*this)[x], - (*this)[y], - (*this)[z], - (*this)[w]); - } - - template - GLM_FUNC_QUALIFIER tref2 tvec3::swizzle - ( - comp x, - comp y - ) - { - return tref2( - (*this)[x], - (*this)[y]); - } - - template - GLM_FUNC_QUALIFIER tref3 tvec3::swizzle - ( - comp x, - comp y, - comp z - ) - { - return tref3( - (*this)[x], - (*this)[y], - (*this)[z]); - } - - ////////////////////////////////////// - // Binary arithmetic operators - - template - GLM_FUNC_QUALIFIER tvec3 operator+ - ( - tvec3 const & v, - T const & s - ) - { - return tvec3( - v.x + T(s), - v.y + T(s), - v.z + T(s)); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator+ - ( - T const & s, - tvec3 const & v - ) - { - return tvec3( - T(s) + v.x, - T(s) + v.y, - T(s) + v.z); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator+ - ( - tvec3 const & v1, - tvec3 const & v2 - ) - { - return tvec3( - v1.x + T(v2.x), - v1.y + T(v2.y), - v1.z + T(v2.z)); - } - - //operator- - template - GLM_FUNC_QUALIFIER tvec3 operator- - ( - tvec3 const & v, - T const & s - ) - { - return tvec3( - v.x - T(s), - v.y - T(s), - v.z - T(s)); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator- - ( - T const & s, - tvec3 const & v - ) - { - return tvec3( - T(s) - v.x, - T(s) - v.y, - T(s) - v.z); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator- - ( - tvec3 const & v1, - tvec3 const & v2 - ) - { - return tvec3( - v1.x - T(v2.x), - v1.y - T(v2.y), - v1.z - T(v2.z)); - } - - //operator* - template - GLM_FUNC_QUALIFIER tvec3 operator* - ( - tvec3 const & v, - T const & s - ) - { - return tvec3( - v.x * T(s), - v.y * T(s), - v.z * T(s)); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator* - ( - T const & s, - tvec3 const & v - ) - { - return tvec3( - T(s) * v.x, - T(s) * v.y, - T(s) * v.z); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator* - ( - tvec3 const & v1, - tvec3 const & v2 - ) - { - return tvec3( - v1.x * T(v2.x), - v1.y * T(v2.y), - v1.z * T(v2.z)); - } - - //operator/ - template - GLM_FUNC_QUALIFIER tvec3 operator/ - ( - tvec3 const & v, - T const & s - ) - { - return tvec3( - v.x / T(s), - v.y / T(s), - v.z / T(s)); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator/ - ( - T const & s, - tvec3 const & v - ) - { - return tvec3( - T(s) / v.x, - T(s) / v.y, - T(s) / v.z); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator/ - ( - tvec3 const & v1, - tvec3 const & v2 - ) - { - return tvec3( - v1.x / T(v2.x), - v1.y / T(v2.y), - v1.z / T(v2.z)); - } - - // Unary constant operators - template - GLM_FUNC_QUALIFIER tvec3 operator- - ( - tvec3 const & v - ) - { - return tvec3( - -v.x, - -v.y, - -v.z); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator++ - ( - tvec3 const & v, - int - ) - { - return tvec3( - v.x + T(1), - v.y + T(1), - v.z + T(1)); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator-- - ( - tvec3 const & v, - int - ) - { - return tvec3( - v.x - T(1), - v.y - T(1), - v.z - T(1)); - } - - ////////////////////////////////////// - // Binary bit operators - - template - GLM_FUNC_QUALIFIER tvec3 operator% - ( - tvec3 const & v, - T const & s - ) - { - return tvec3( - v.x % T(s), - v.y % T(s), - v.z % T(s)); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator% - ( - T const & s, - tvec3 const & v - ) - { - return tvec3( - T(s) % v.x, - T(s) % v.y, - T(s) % v.z); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator% - ( - tvec3 const & v1, - tvec3 const & v2 - ) - { - return tvec3( - v1.x % T(v2.x), - v1.y % T(v2.y), - v1.z % T(v2.z)); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator& - ( - tvec3 const & v, - T const & s - ) - { - return tvec3( - v.x & T(s), - v.y & T(s), - v.z & T(s)); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator& - ( - T const & s, - tvec3 const & v - ) - { - return tvec3( - T(s) & v.x, - T(s) & v.y, - T(s) & v.z); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator& - ( - tvec3 const & v1, - tvec3 const & v2 - ) - { - return tvec3( - v1.x & T(v2.x), - v1.y & T(v2.y), - v1.z & T(v2.z)); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator| - ( - tvec3 const & v, - T const & s - ) - { - return tvec3( - v.x | T(s), - v.y | T(s), - v.z | T(s)); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator| - ( - T const & s, - tvec3 const & v - ) - { - return tvec3( - T(s) | v.x, - T(s) | v.y, - T(s) | v.z); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator| - ( - tvec3 const & v1, - tvec3 const & v2 - ) - { - return tvec3( - v1.x | T(v2.x), - v1.y | T(v2.y), - v1.z | T(v2.z)); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator^ - ( - tvec3 const & v, - T const & s - ) - { - return tvec3( - v.x ^ T(s), - v.y ^ T(s), - v.z ^ T(s)); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator^ - ( - T const & s, - tvec3 const & v - ) - { - return tvec3( - T(s) ^ v.x, - T(s) ^ v.y, - T(s) ^ v.z); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator^ - ( - tvec3 const & v1, - tvec3 const & v2 - ) - { - return tvec3( - v1.x ^ T(v2.x), - v1.y ^ T(v2.y), - v1.z ^ T(v2.z)); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator<< - ( - tvec3 const & v, - T const & s - ) - { - return tvec3( - v.x << T(s), - v.y << T(s), - v.z << T(s)); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator<< - ( - T const & s, - tvec3 const & v - ) - { - return tvec3( - T(s) << v.x, - T(s) << v.y, - T(s) << v.z); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator<< - ( - tvec3 const & v1, - tvec3 const & v2 - ) - { - return tvec3( - v1.x << T(v2.x), - v1.y << T(v2.y), - v1.z << T(v2.z)); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator>> - ( - tvec3 const & v, - T const & s - ) - { - return tvec3( - v.x >> T(s), - v.y >> T(s), - v.z >> T(s)); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator>> - ( - T const & s, - tvec3 const & v - ) - { - return tvec3( - s >> T(v.x), - s >> T(v.y), - s >> T(v.z)); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator>> - ( - tvec3 const & v1, - tvec3 const & v2 - ) - { - return tvec3( - v1.x >> T(v2.x), - v1.y >> T(v2.y), - v1.z >> T(v2.z)); - } - - template - GLM_FUNC_QUALIFIER tvec3 operator~ - ( - tvec3 const & v - ) - { - return tvec3( - ~v.x, - ~v.y, - ~v.z); - } - - ////////////////////////////////////// - // tref definition - - template - GLM_FUNC_QUALIFIER tref3::tref3(T & x, T & y, T & z) : - x(x), - y(y), - z(z) - {} - - template - GLM_FUNC_QUALIFIER tref3::tref3 - ( - tref3 const & r - ) : - x(r.x), - y(r.y), - z(r.z) - {} - - template - GLM_FUNC_QUALIFIER tref3::tref3 - ( - tvec3 const & v - ) : - x(v.x), - y(v.y), - z(v.z) - {} - - template - GLM_FUNC_QUALIFIER tref3 & tref3::operator= - ( - tref3 const & r - ) - { - x = r.x; - y = r.y; - z = r.z; - return *this; - } - - template - GLM_FUNC_QUALIFIER tref3 & tref3::operator= - ( - tvec3 const & v - ) - { - x = v.x; - y = v.y; - z = v.z; - return *this; - } - - template - GLM_FUNC_QUALIFIER tvec3 tref3::operator() () - { - return tvec3(this->x, this->y, this->z); - } - -}//namespace detail -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_tvec3.inl +/// @date 2008-08-22 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec3::size_type tvec3::length() const + { + return 3; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tvec3::value_type & + tvec3::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return (&x)[i]; + } + + template + GLM_FUNC_QUALIFIER typename tvec3::value_type const & + tvec3::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return (&x)[i]; + } + + ////////////////////////////////////// + // Implicit basic constructors + + template + GLM_FUNC_QUALIFIER tvec3::tvec3() : + x(value_type(0)), + y(value_type(0)), + z(value_type(0)) + {} + + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + tvec3 const & v + ) : + x(v.x), + y(v.y), + z(v.z) + {} + + ////////////////////////////////////// + // Explicit basic constructors + + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + value_type const & s + ) : + x(s), + y(s), + z(s) + {} + + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + value_type const & s0, + value_type const & s1, + value_type const & s2 + ) : + x(s0), + y(s1), + z(s2) + {} + + ////////////////////////////////////// + // Swizzle constructors + + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + tref3 const & r + ) : + x(r.x), + y(r.y), + z(r.z) + {} + + template + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + tref2 const & v, + B const & s + ) : + x(value_type(v.x)), + y(value_type(v.y)), + z(value_type(s)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + A const & s, + tref2 const & v + ) : + x(value_type(s)), + y(value_type(v.x)), + z(value_type(v.y)) + {} + + ////////////////////////////////////// + // Convertion scalar constructors + + template + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + U const & s + ) : + x(value_type(s)), + y(value_type(s)), + z(value_type(s)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + A const & x, + B const & y, + C const & z + ) : + x(value_type(x)), + y(value_type(y)), + z(value_type(z)) + {} + + ////////////////////////////////////// + // Convertion vector constructors + + template + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + tvec2 const & v, + B const & s + ) : + x(value_type(v.x)), + y(value_type(v.y)), + z(value_type(s)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + A const & s, + tvec2 const & v + ) : + x(value_type(s)), + y(value_type(v.x)), + z(value_type(v.y)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + tvec3 const & v + ) : + x(value_type(v.x)), + y(value_type(v.y)), + z(value_type(v.z)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + tvec4 const & v + ) : + x(value_type(v.x)), + y(value_type(v.y)), + z(value_type(v.z)) + {} + + ////////////////////////////////////// + // Unary arithmetic operators + + template + GLM_FUNC_QUALIFIER tvec3& tvec3::operator= + ( + tvec3 const & v + ) + { + this->x = v.x; + this->y = v.y; + this->z = v.z; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3& tvec3::operator= + ( + tvec3 const & v + ) + { + this->x = T(v.x); + this->y = T(v.y); + this->z = T(v.z); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator+= + ( + U const & s + ) + { + this->x += T(s); + this->y += T(s); + this->z += T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator+= + ( + tvec3 const & v + ) + { + this->x += T(v.x); + this->y += T(v.y); + this->z += T(v.z); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator-= + ( + U const & s + ) + { + this->x -= T(s); + this->y -= T(s); + this->z -= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator-= + ( + tvec3 const & v + ) + { + this->x -= T(v.x); + this->y -= T(v.y); + this->z -= T(v.z); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator*= + ( + U const & s + ) + { + this->x *= T(s); + this->y *= T(s); + this->z *= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator*= + ( + tvec3 const & v + ) + { + this->x *= T(v.x); + this->y *= T(v.y); + this->z *= T(v.z); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator/= + ( + U const & s + ) + { + this->x /= T(s); + this->y /= T(s); + this->z /= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator/= + ( + tvec3 const & v + ) + { + this->x /= T(v.x); + this->y /= T(v.y); + this->z /= T(v.z); + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator++() + { + ++this->x; + ++this->y; + ++this->z; + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator--() + { + --this->x; + --this->y; + --this->z; + return *this; + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return (v1.x == v2.x) && (v1.y == v2.y) && (v1.z == v2.z); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return (v1.x != v2.x) || (v1.y != v2.y) || (v1.z != v2.z); + } + + ////////////////////////////////////// + // Unary bit operators + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator%= + ( + U const & s + ) + { + this->x %= s; + this->y %= s; + this->z %= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator%= + ( + tvec3 const & v + ) + { + this->x %= v.x; + this->y %= v.y; + this->z %= v.z; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator&= + ( + U const & s + ) + { + this->x &= s; + this->y &= s; + this->z &= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator&= + ( + tvec3 const & v + ) + { + this->x &= v.x; + this->y &= v.y; + this->z &= v.z; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator|= + ( + U const & s + ) + { + this->x |= s; + this->y |= s; + this->z |= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator|= + ( + tvec3 const & v + ) + { + this->x |= v.x; + this->y |= v.y; + this->z |= v.z; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator^= + ( + U const & s + ) + { + this->x ^= s; + this->y ^= s; + this->z ^= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator^= + ( + tvec3 const & v + ) + { + this->x ^= v.x; + this->y ^= v.y; + this->z ^= v.z; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator<<= + ( + U const & s + ) + { + this->x <<= s; + this->y <<= s; + this->z <<= s; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator<<= + ( + tvec3 const & v + ) + { + this->x <<= T(v.x); + this->y <<= T(v.y); + this->z <<= T(v.z); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator>>= + ( + U const & s + ) + { + this->x >>= T(s); + this->y >>= T(s); + this->z >>= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator>>= + ( + tvec3 const & v + ) + { + this->x >>= T(v.x); + this->y >>= T(v.y); + this->z >>= T(v.z); + return *this; + } + + ////////////////////////////////////// + // Swizzle operators + + template + GLM_FUNC_QUALIFIER typename tvec3::value_type + tvec3::swizzle + ( + comp x + ) const + { + return (*this)[x]; + } + + template + GLM_FUNC_QUALIFIER tvec2 tvec3::swizzle + ( + comp x, + comp y + ) const + { + return tvec2( + (*this)[x], + (*this)[y]); + } + + template + GLM_FUNC_QUALIFIER tvec3 tvec3::swizzle + ( + comp x, + comp y, + comp z + ) const + { + return tvec3( + (*this)[x], + (*this)[y], + (*this)[z]); + } + + template + GLM_FUNC_QUALIFIER tvec4 tvec3::swizzle + ( + comp x, + comp y, + comp z, + comp w + ) const + { + return tvec4( + (*this)[x], + (*this)[y], + (*this)[z], + (*this)[w]); + } + + template + GLM_FUNC_QUALIFIER tref2 tvec3::swizzle + ( + comp x, + comp y + ) + { + return tref2( + (*this)[x], + (*this)[y]); + } + + template + GLM_FUNC_QUALIFIER tref3 tvec3::swizzle + ( + comp x, + comp y, + comp z + ) + { + return tref3( + (*this)[x], + (*this)[y], + (*this)[z]); + } + + ////////////////////////////////////// + // Binary arithmetic operators + + template + GLM_FUNC_QUALIFIER tvec3 operator+ + ( + tvec3 const & v, + T const & s + ) + { + return tvec3( + v.x + T(s), + v.y + T(s), + v.z + T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator+ + ( + T const & s, + tvec3 const & v + ) + { + return tvec3( + T(s) + v.x, + T(s) + v.y, + T(s) + v.z); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator+ + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return tvec3( + v1.x + T(v2.x), + v1.y + T(v2.y), + v1.z + T(v2.z)); + } + + //operator- + template + GLM_FUNC_QUALIFIER tvec3 operator- + ( + tvec3 const & v, + T const & s + ) + { + return tvec3( + v.x - T(s), + v.y - T(s), + v.z - T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator- + ( + T const & s, + tvec3 const & v + ) + { + return tvec3( + T(s) - v.x, + T(s) - v.y, + T(s) - v.z); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator- + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return tvec3( + v1.x - T(v2.x), + v1.y - T(v2.y), + v1.z - T(v2.z)); + } + + //operator* + template + GLM_FUNC_QUALIFIER tvec3 operator* + ( + tvec3 const & v, + T const & s + ) + { + return tvec3( + v.x * T(s), + v.y * T(s), + v.z * T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator* + ( + T const & s, + tvec3 const & v + ) + { + return tvec3( + T(s) * v.x, + T(s) * v.y, + T(s) * v.z); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator* + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return tvec3( + v1.x * T(v2.x), + v1.y * T(v2.y), + v1.z * T(v2.z)); + } + + //operator/ + template + GLM_FUNC_QUALIFIER tvec3 operator/ + ( + tvec3 const & v, + T const & s + ) + { + return tvec3( + v.x / T(s), + v.y / T(s), + v.z / T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator/ + ( + T const & s, + tvec3 const & v + ) + { + return tvec3( + T(s) / v.x, + T(s) / v.y, + T(s) / v.z); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator/ + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return tvec3( + v1.x / T(v2.x), + v1.y / T(v2.y), + v1.z / T(v2.z)); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tvec3 operator- + ( + tvec3 const & v + ) + { + return tvec3( + -v.x, + -v.y, + -v.z); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator++ + ( + tvec3 const & v, + int + ) + { + return tvec3( + v.x + T(1), + v.y + T(1), + v.z + T(1)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator-- + ( + tvec3 const & v, + int + ) + { + return tvec3( + v.x - T(1), + v.y - T(1), + v.z - T(1)); + } + + ////////////////////////////////////// + // Binary bit operators + + template + GLM_FUNC_QUALIFIER tvec3 operator% + ( + tvec3 const & v, + T const & s + ) + { + return tvec3( + v.x % T(s), + v.y % T(s), + v.z % T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator% + ( + T const & s, + tvec3 const & v + ) + { + return tvec3( + T(s) % v.x, + T(s) % v.y, + T(s) % v.z); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator% + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return tvec3( + v1.x % T(v2.x), + v1.y % T(v2.y), + v1.z % T(v2.z)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator& + ( + tvec3 const & v, + T const & s + ) + { + return tvec3( + v.x & T(s), + v.y & T(s), + v.z & T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator& + ( + T const & s, + tvec3 const & v + ) + { + return tvec3( + T(s) & v.x, + T(s) & v.y, + T(s) & v.z); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator& + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return tvec3( + v1.x & T(v2.x), + v1.y & T(v2.y), + v1.z & T(v2.z)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator| + ( + tvec3 const & v, + T const & s + ) + { + return tvec3( + v.x | T(s), + v.y | T(s), + v.z | T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator| + ( + T const & s, + tvec3 const & v + ) + { + return tvec3( + T(s) | v.x, + T(s) | v.y, + T(s) | v.z); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator| + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return tvec3( + v1.x | T(v2.x), + v1.y | T(v2.y), + v1.z | T(v2.z)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator^ + ( + tvec3 const & v, + T const & s + ) + { + return tvec3( + v.x ^ T(s), + v.y ^ T(s), + v.z ^ T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator^ + ( + T const & s, + tvec3 const & v + ) + { + return tvec3( + T(s) ^ v.x, + T(s) ^ v.y, + T(s) ^ v.z); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator^ + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return tvec3( + v1.x ^ T(v2.x), + v1.y ^ T(v2.y), + v1.z ^ T(v2.z)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator<< + ( + tvec3 const & v, + T const & s + ) + { + return tvec3( + v.x << T(s), + v.y << T(s), + v.z << T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator<< + ( + T const & s, + tvec3 const & v + ) + { + return tvec3( + T(s) << v.x, + T(s) << v.y, + T(s) << v.z); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator<< + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return tvec3( + v1.x << T(v2.x), + v1.y << T(v2.y), + v1.z << T(v2.z)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator>> + ( + tvec3 const & v, + T const & s + ) + { + return tvec3( + v.x >> T(s), + v.y >> T(s), + v.z >> T(s)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator>> + ( + T const & s, + tvec3 const & v + ) + { + return tvec3( + s >> T(v.x), + s >> T(v.y), + s >> T(v.z)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator>> + ( + tvec3 const & v1, + tvec3 const & v2 + ) + { + return tvec3( + v1.x >> T(v2.x), + v1.y >> T(v2.y), + v1.z >> T(v2.z)); + } + + template + GLM_FUNC_QUALIFIER tvec3 operator~ + ( + tvec3 const & v + ) + { + return tvec3( + ~v.x, + ~v.y, + ~v.z); + } + + ////////////////////////////////////// + // tref definition + + template + GLM_FUNC_QUALIFIER tref3::tref3(T & x, T & y, T & z) : + x(x), + y(y), + z(z) + {} + + template + GLM_FUNC_QUALIFIER tref3::tref3 + ( + tref3 const & r + ) : + x(r.x), + y(r.y), + z(r.z) + {} + + template + GLM_FUNC_QUALIFIER tref3::tref3 + ( + tvec3 const & v + ) : + x(v.x), + y(v.y), + z(v.z) + {} + + template + GLM_FUNC_QUALIFIER tref3 & tref3::operator= + ( + tref3 const & r + ) + { + x = r.x; + y = r.y; + z = r.z; + return *this; + } + + template + GLM_FUNC_QUALIFIER tref3 & tref3::operator= + ( + tvec3 const & v + ) + { + x = v.x; + y = v.y; + z = v.z; + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec3 tref3::operator() () + { + return tvec3(this->x, this->y, this->z); + } + +}//namespace detail +}//namespace glm diff --git a/include/gal/opengl/glm/core/type_vec4.hpp b/include/gal/opengl/glm/core/type_vec4.hpp index 68c5cd34a0..23450a2236 100644 --- a/include/gal/opengl/glm/core/type_vec4.hpp +++ b/include/gal/opengl/glm/core/type_vec4.hpp @@ -1,399 +1,399 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_vec4.hpp -/// @date 2008-08-22 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_type_gentype4 -#define glm_core_type_gentype4 - -#include "type_vec.hpp" -#include "type_float.hpp" -#include "type_int.hpp" -#include "type_size.hpp" -#include "_swizzle.hpp" - -namespace glm{ -namespace detail -{ - template struct tref2; - template struct tref3; - template struct tref4; - template struct tvec2; - template struct tvec3; - - template - struct tvec4 - { - enum ctor{null}; - - typedef T value_type; - typedef std::size_t size_type; - typedef tvec4 type; - typedef tvec4 bool_type; - - GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; - - ////////////////////////////////////// - // Data - -# if(GLM_COMPONENT == GLM_COMPONENT_CXX11) - union - { -# if(defined(GLM_SWIZZLE)) - _GLM_SWIZZLE4_2_MEMBERS(value_type, glm::detail::tvec2, x, y, z, w) - _GLM_SWIZZLE4_2_MEMBERS(value_type, glm::detail::tvec2, r, g, b, a) - _GLM_SWIZZLE4_2_MEMBERS(value_type, glm::detail::tvec2, s, t, p, q) - _GLM_SWIZZLE4_3_MEMBERS(value_type, glm::detail::tvec3, x, y, z, w) - _GLM_SWIZZLE4_3_MEMBERS(value_type, glm::detail::tvec3, r, g, b, a) - _GLM_SWIZZLE4_3_MEMBERS(value_type, glm::detail::tvec3, s, t, p, q) - _GLM_SWIZZLE4_4_MEMBERS(value_type, glm::detail::tvec4, x, y, z, w) - _GLM_SWIZZLE4_4_MEMBERS(value_type, glm::detail::tvec4, r, g, b, a) - _GLM_SWIZZLE4_4_MEMBERS(value_type, glm::detail::tvec4, s, t, p, q) -# endif//(defined(GLM_SWIZZLE)) - - struct{value_type r, g, b, a;}; - struct{value_type s, t, p, q;}; - struct{value_type x, y, z, w;}; - }; -# elif(GLM_COMPONENT == GLM_COMPONENT_CXX98) - union {value_type x, r, s;}; - union {value_type y, g, t;}; - union {value_type z, b, p;}; - union {value_type w, a, q;}; - -# if(defined(GLM_SWIZZLE)) - // Defines all he swizzle operator as functions - GLM_SWIZZLE_GEN_REF_FROM_VEC4(T, detail::tvec4, detail::tref2, detail::tref3, detail::tref4) - GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, detail::tvec4, detail::tvec2, detail::tvec3, detail::tvec4) -# endif//(defined(GLM_SWIZZLE)) -# else //(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW) - value_type x, y, z, w; - -# if(defined(GLM_SWIZZLE)) - // Defines all he swizzle operator as functions - GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(T, detail::tvec4, detail::tref2, detail::tref3, detail::tref4, x, y, z, w) - GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(T, detail::tvec4, detail::tvec2, detail::tvec3, detail::tvec4, x, y, z, w) -# endif//(defined(GLM_SWIZZLE)) -# endif//GLM_COMPONENT - - ////////////////////////////////////// - // Accesses - - GLM_FUNC_DECL value_type & operator[](size_type i); - GLM_FUNC_DECL value_type const & operator[](size_type i) const; - - ////////////////////////////////////// - // Implicit basic constructors - - GLM_FUNC_DECL tvec4(); - GLM_FUNC_DECL tvec4(type const & v); - - ////////////////////////////////////// - // Explicit basic constructors - - GLM_FUNC_DECL explicit tvec4( - ctor); - GLM_FUNC_DECL explicit tvec4( - value_type const & s); - GLM_FUNC_DECL explicit tvec4( - value_type const & s0, - value_type const & s1, - value_type const & s2, - value_type const & s3); - - ////////////////////////////////////// - // Convertion scalar constructors - - //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec4( - U const & x); - //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec4( - A const & x, - B const & y, - C const & z, - D const & w); - - ////////////////////////////////////// - // Convertion vector constructors - - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec4(tvec2 const & v, B const & s1, C const & s2); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec4(A const & s1, tvec2 const & v, C const & s2); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec4(A const & s1, B const & s2, tvec2 const & v); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec4(tvec3 const & v, B const & s); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec4(A const & s, tvec3 const & v); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec4(tvec2 const & v1, tvec2 const & v2); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec4(tvec4 const & v); - - template - GLM_FUNC_DECL tvec4(glm::detail::swizzle<4, T, tvec4, E0, E1, E2, E3> const & that) - { - *this = that(); - } - - template - GLM_FUNC_DECL tvec4(glm::detail::swizzle<2, T, tvec2, E0, E1, -1, -2> const & v, glm::detail::swizzle<2, T, tvec2, F0, F1, -1, -2> const & u) - { - *this = tvec4(v(), u()); - } - - template - GLM_FUNC_DECL tvec4(T const & x, T const & y, glm::detail::swizzle<2, T, tvec2, E0, E1, -1, -2> const & v) - { - *this = tvec4(x, y, v()); - } - - template - GLM_FUNC_DECL tvec4(T const & x, glm::detail::swizzle<2, T, tvec2, E0, E1, -1, -2> const & v, T const & w) - { - *this = tvec4(x, v(), w); - } - - template - GLM_FUNC_DECL tvec4(glm::detail::swizzle<2, T, tvec2, E0, E1, -1, -2> const & v, T const & z, T const & w) - { - *this = tvec4(v(), z, w); - } - - template - GLM_FUNC_DECL tvec4(glm::detail::swizzle<3, T, tvec3, E0, E1, E2, -1> const & v, T const & w) - { - *this = tvec4(v(), w); - } - - template - GLM_FUNC_DECL tvec4(T const & x, glm::detail::swizzle<3, T, tvec3, E0, E1, E2, -1> const & v) - { - *this = tvec4(x, v()); - } - - ////////////////////////////////////// - // Swizzle constructors - - GLM_FUNC_DECL tvec4(tref4 const & r); - - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec4(tref2 const & v, B const & s1, C const & s2); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec4(A const & s1, tref2 const & v, C const & s2); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec4(A const & s1, B const & s2, tref2 const & v); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec4(tref3 const & v, B const & s); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec4(A const & s, tref3 const & v); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec4(tref2 const & v1, tref2 const & v2); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec4(tvec2 const & v1, tref2 const & v2); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - GLM_FUNC_DECL explicit tvec4(tref2 const & v1, tvec2 const & v2); - - ////////////////////////////////////// - // Unary arithmetic operators - - GLM_FUNC_DECL tvec4 & operator= (tvec4 const & v); - template - GLM_FUNC_DECL tvec4 & operator= (tvec4 const & v); - - template - GLM_FUNC_DECL tvec4 & operator+=(U const & s); - template - GLM_FUNC_DECL tvec4 & operator+=(tvec4 const & v); - template - GLM_FUNC_DECL tvec4 & operator-=(U const & s); - template - GLM_FUNC_DECL tvec4 & operator-=(tvec4 const & v); - template - GLM_FUNC_DECL tvec4 & operator*=(U const & s); - template - GLM_FUNC_DECL tvec4 & operator*=(tvec4 const & v); - template - GLM_FUNC_DECL tvec4 & operator/=(U const & s); - template - GLM_FUNC_DECL tvec4 & operator/=(tvec4 const & v); - GLM_FUNC_DECL tvec4 & operator++(); - GLM_FUNC_DECL tvec4 & operator--(); - - ////////////////////////////////////// - // Unary bit operators - - template - GLM_FUNC_DECL tvec4 & operator%= (U const & s); - template - GLM_FUNC_DECL tvec4 & operator%= (tvec4 const & v); - template - GLM_FUNC_DECL tvec4 & operator&= (U const & s); - template - GLM_FUNC_DECL tvec4 & operator&= (tvec4 const & v); - template - GLM_FUNC_DECL tvec4 & operator|= (U const & s); - template - GLM_FUNC_DECL tvec4 & operator|= (tvec4 const & v); - template - GLM_FUNC_DECL tvec4 & operator^= (U const & s); - template - GLM_FUNC_DECL tvec4 & operator^= (tvec4 const & v); - template - GLM_FUNC_DECL tvec4 & operator<<=(U const & s); - template - GLM_FUNC_DECL tvec4 & operator<<=(tvec4 const & v); - template - GLM_FUNC_DECL tvec4 & operator>>=(U const & s); - template - GLM_FUNC_DECL tvec4 & operator>>=(tvec4 const & v); - - ////////////////////////////////////// - // Swizzle operators - - GLM_FUNC_DECL value_type swizzle(comp X) const; - GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; - GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; - GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; - GLM_FUNC_DECL tref2 swizzle(comp X, comp Y); - GLM_FUNC_DECL tref3 swizzle(comp X, comp Y, comp Z); - GLM_FUNC_DECL tref4 swizzle(comp X, comp Y, comp Z, comp W); - }; - - template - struct tref4 - { - GLM_FUNC_DECL tref4(T & x, T & y, T & z, T & w); - GLM_FUNC_DECL tref4(tref4 const & r); - GLM_FUNC_DECL explicit tref4(tvec4 const & v); - - GLM_FUNC_DECL tref4 & operator= (tref4 const & r); - GLM_FUNC_DECL tref4 & operator= (tvec4 const & v); - - GLM_FUNC_DECL tvec4 operator() (); - - T & x; - T & y; - T & z; - T & w; - }; - - GLM_DETAIL_IS_VECTOR(tvec4); -}//namespace detail - - /// @addtogroup core_precision - /// @{ - - /// 4 components vector of high precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec4 highp_vec4; - - /// 4 components vector of medium precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec4 mediump_vec4; - - /// 4 components vector of low precision floating-point numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec4 lowp_vec4; - - /// 4 components vector of high precision signed integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec4 highp_ivec4; - - /// 4 components vector of medium precision signed integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec4 mediump_ivec4; - - /// 4 components vector of low precision signed integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec4 lowp_ivec4; - - /// 4 components vector of high precision unsigned integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec4 highp_uvec4; - - /// 4 components vector of medium precision unsigned integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec4 mediump_uvec4; - - /// 4 components vector of low precision unsigned integer numbers. - /// There is no guarantee on the actual precision. - /// - /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors - /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier - typedef detail::tvec4 lowp_uvec4; - - /// @} -}//namespace glm - -#ifndef GLM_EXTERNAL_TEMPLATE -#include "type_vec4.inl" -#endif//GLM_EXTERNAL_TEMPLATE - -#endif//glm_core_type_gentype4 +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_vec4.hpp +/// @date 2008-08-22 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_core_type_gentype4 +#define glm_core_type_gentype4 + +#include "type_vec.hpp" +#include "type_float.hpp" +#include "type_int.hpp" +#include "type_size.hpp" +#include "_swizzle.hpp" + +namespace glm{ +namespace detail +{ + template struct tref2; + template struct tref3; + template struct tref4; + template struct tvec2; + template struct tvec3; + + template + struct tvec4 + { + enum ctor{null}; + + typedef T value_type; + typedef std::size_t size_type; + typedef tvec4 type; + typedef tvec4 bool_type; + + GLM_FUNC_DECL GLM_CONSTEXPR size_type length() const; + + ////////////////////////////////////// + // Data + +# if(GLM_COMPONENT == GLM_COMPONENT_CXX11) + union + { +# if(defined(GLM_SWIZZLE)) + _GLM_SWIZZLE4_2_MEMBERS(value_type, glm::detail::tvec2, x, y, z, w) + _GLM_SWIZZLE4_2_MEMBERS(value_type, glm::detail::tvec2, r, g, b, a) + _GLM_SWIZZLE4_2_MEMBERS(value_type, glm::detail::tvec2, s, t, p, q) + _GLM_SWIZZLE4_3_MEMBERS(value_type, glm::detail::tvec3, x, y, z, w) + _GLM_SWIZZLE4_3_MEMBERS(value_type, glm::detail::tvec3, r, g, b, a) + _GLM_SWIZZLE4_3_MEMBERS(value_type, glm::detail::tvec3, s, t, p, q) + _GLM_SWIZZLE4_4_MEMBERS(value_type, glm::detail::tvec4, x, y, z, w) + _GLM_SWIZZLE4_4_MEMBERS(value_type, glm::detail::tvec4, r, g, b, a) + _GLM_SWIZZLE4_4_MEMBERS(value_type, glm::detail::tvec4, s, t, p, q) +# endif//(defined(GLM_SWIZZLE)) + + struct{value_type r, g, b, a;}; + struct{value_type s, t, p, q;}; + struct{value_type x, y, z, w;}; + }; +# elif(GLM_COMPONENT == GLM_COMPONENT_CXX98) + union {value_type x, r, s;}; + union {value_type y, g, t;}; + union {value_type z, b, p;}; + union {value_type w, a, q;}; + +# if(defined(GLM_SWIZZLE)) + // Defines all he swizzle operator as functions + GLM_SWIZZLE_GEN_REF_FROM_VEC4(T, detail::tvec4, detail::tref2, detail::tref3, detail::tref4) + GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, detail::tvec4, detail::tvec2, detail::tvec3, detail::tvec4) +# endif//(defined(GLM_SWIZZLE)) +# else //(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW) + value_type x, y, z, w; + +# if(defined(GLM_SWIZZLE)) + // Defines all he swizzle operator as functions + GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(T, detail::tvec4, detail::tref2, detail::tref3, detail::tref4, x, y, z, w) + GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(T, detail::tvec4, detail::tvec2, detail::tvec3, detail::tvec4, x, y, z, w) +# endif//(defined(GLM_SWIZZLE)) +# endif//GLM_COMPONENT + + ////////////////////////////////////// + // Accesses + + GLM_FUNC_DECL value_type & operator[](size_type i); + GLM_FUNC_DECL value_type const & operator[](size_type i) const; + + ////////////////////////////////////// + // Implicit basic constructors + + GLM_FUNC_DECL tvec4(); + GLM_FUNC_DECL tvec4(type const & v); + + ////////////////////////////////////// + // Explicit basic constructors + + GLM_FUNC_DECL explicit tvec4( + ctor); + GLM_FUNC_DECL explicit tvec4( + value_type const & s); + GLM_FUNC_DECL explicit tvec4( + value_type const & s0, + value_type const & s1, + value_type const & s2, + value_type const & s3); + + ////////////////////////////////////// + // Convertion scalar constructors + + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4( + U const & x); + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4( + A const & x, + B const & y, + C const & z, + D const & w); + + ////////////////////////////////////// + // Convertion vector constructors + + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(tvec2 const & v, B const & s1, C const & s2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(A const & s1, tvec2 const & v, C const & s2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(A const & s1, B const & s2, tvec2 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(tvec3 const & v, B const & s); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(A const & s, tvec3 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(tvec2 const & v1, tvec2 const & v2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(tvec4 const & v); + + template + GLM_FUNC_DECL tvec4(glm::detail::swizzle<4, T, tvec4, E0, E1, E2, E3> const & that) + { + *this = that(); + } + + template + GLM_FUNC_DECL tvec4(glm::detail::swizzle<2, T, tvec2, E0, E1, -1, -2> const & v, glm::detail::swizzle<2, T, tvec2, F0, F1, -1, -2> const & u) + { + *this = tvec4(v(), u()); + } + + template + GLM_FUNC_DECL tvec4(T const & x, T const & y, glm::detail::swizzle<2, T, tvec2, E0, E1, -1, -2> const & v) + { + *this = tvec4(x, y, v()); + } + + template + GLM_FUNC_DECL tvec4(T const & x, glm::detail::swizzle<2, T, tvec2, E0, E1, -1, -2> const & v, T const & w) + { + *this = tvec4(x, v(), w); + } + + template + GLM_FUNC_DECL tvec4(glm::detail::swizzle<2, T, tvec2, E0, E1, -1, -2> const & v, T const & z, T const & w) + { + *this = tvec4(v(), z, w); + } + + template + GLM_FUNC_DECL tvec4(glm::detail::swizzle<3, T, tvec3, E0, E1, E2, -1> const & v, T const & w) + { + *this = tvec4(v(), w); + } + + template + GLM_FUNC_DECL tvec4(T const & x, glm::detail::swizzle<3, T, tvec3, E0, E1, E2, -1> const & v) + { + *this = tvec4(x, v()); + } + + ////////////////////////////////////// + // Swizzle constructors + + GLM_FUNC_DECL tvec4(tref4 const & r); + + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(tref2 const & v, B const & s1, C const & s2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(A const & s1, tref2 const & v, C const & s2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(A const & s1, B const & s2, tref2 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(tref3 const & v, B const & s); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(A const & s, tref3 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(tref2 const & v1, tref2 const & v2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(tvec2 const & v1, tref2 const & v2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + GLM_FUNC_DECL explicit tvec4(tref2 const & v1, tvec2 const & v2); + + ////////////////////////////////////// + // Unary arithmetic operators + + GLM_FUNC_DECL tvec4 & operator= (tvec4 const & v); + template + GLM_FUNC_DECL tvec4 & operator= (tvec4 const & v); + + template + GLM_FUNC_DECL tvec4 & operator+=(U const & s); + template + GLM_FUNC_DECL tvec4 & operator+=(tvec4 const & v); + template + GLM_FUNC_DECL tvec4 & operator-=(U const & s); + template + GLM_FUNC_DECL tvec4 & operator-=(tvec4 const & v); + template + GLM_FUNC_DECL tvec4 & operator*=(U const & s); + template + GLM_FUNC_DECL tvec4 & operator*=(tvec4 const & v); + template + GLM_FUNC_DECL tvec4 & operator/=(U const & s); + template + GLM_FUNC_DECL tvec4 & operator/=(tvec4 const & v); + GLM_FUNC_DECL tvec4 & operator++(); + GLM_FUNC_DECL tvec4 & operator--(); + + ////////////////////////////////////// + // Unary bit operators + + template + GLM_FUNC_DECL tvec4 & operator%= (U const & s); + template + GLM_FUNC_DECL tvec4 & operator%= (tvec4 const & v); + template + GLM_FUNC_DECL tvec4 & operator&= (U const & s); + template + GLM_FUNC_DECL tvec4 & operator&= (tvec4 const & v); + template + GLM_FUNC_DECL tvec4 & operator|= (U const & s); + template + GLM_FUNC_DECL tvec4 & operator|= (tvec4 const & v); + template + GLM_FUNC_DECL tvec4 & operator^= (U const & s); + template + GLM_FUNC_DECL tvec4 & operator^= (tvec4 const & v); + template + GLM_FUNC_DECL tvec4 & operator<<=(U const & s); + template + GLM_FUNC_DECL tvec4 & operator<<=(tvec4 const & v); + template + GLM_FUNC_DECL tvec4 & operator>>=(U const & s); + template + GLM_FUNC_DECL tvec4 & operator>>=(tvec4 const & v); + + ////////////////////////////////////// + // Swizzle operators + + GLM_FUNC_DECL value_type swizzle(comp X) const; + GLM_FUNC_DECL tvec2 swizzle(comp X, comp Y) const; + GLM_FUNC_DECL tvec3 swizzle(comp X, comp Y, comp Z) const; + GLM_FUNC_DECL tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + GLM_FUNC_DECL tref2 swizzle(comp X, comp Y); + GLM_FUNC_DECL tref3 swizzle(comp X, comp Y, comp Z); + GLM_FUNC_DECL tref4 swizzle(comp X, comp Y, comp Z, comp W); + }; + + template + struct tref4 + { + GLM_FUNC_DECL tref4(T & x, T & y, T & z, T & w); + GLM_FUNC_DECL tref4(tref4 const & r); + GLM_FUNC_DECL explicit tref4(tvec4 const & v); + + GLM_FUNC_DECL tref4 & operator= (tref4 const & r); + GLM_FUNC_DECL tref4 & operator= (tvec4 const & v); + + GLM_FUNC_DECL tvec4 operator() (); + + T & x; + T & y; + T & z; + T & w; + }; + + GLM_DETAIL_IS_VECTOR(tvec4); +}//namespace detail + + /// @addtogroup core_precision + /// @{ + + /// 4 components vector of high precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 highp_vec4; + + /// 4 components vector of medium precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 mediump_vec4; + + /// 4 components vector of low precision floating-point numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 lowp_vec4; + + /// 4 components vector of high precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 highp_ivec4; + + /// 4 components vector of medium precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 mediump_ivec4; + + /// 4 components vector of low precision signed integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 lowp_ivec4; + + /// 4 components vector of high precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 highp_uvec4; + + /// 4 components vector of medium precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 mediump_uvec4; + + /// 4 components vector of low precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + /// + /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors + /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier + typedef detail::tvec4 lowp_uvec4; + + /// @} +}//namespace glm + +#ifndef GLM_EXTERNAL_TEMPLATE +#include "type_vec4.inl" +#endif//GLM_EXTERNAL_TEMPLATE + +#endif//glm_core_type_gentype4 diff --git a/include/gal/opengl/glm/core/type_vec4.inl b/include/gal/opengl/glm/core/type_vec4.inl index 07c7e89d6f..8944c9db0a 100644 --- a/include/gal/opengl/glm/core/type_vec4.inl +++ b/include/gal/opengl/glm/core/type_vec4.inl @@ -1,1378 +1,1378 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/core/type_tvec4.inl -/// @date 2008-08-23 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm{ -namespace detail -{ - template - GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec4::size_type tvec4::length() const - { - return 4; - } - - ////////////////////////////////////// - // Accesses - - template - GLM_FUNC_QUALIFIER typename tvec4::value_type & - tvec4::operator[] - ( - size_type i - ) - { - assert(i < this->length()); - return (&x)[i]; - } - - template - GLM_FUNC_QUALIFIER typename tvec4::value_type const & - tvec4::operator[] - ( - size_type i - ) const - { - assert(i < this->length()); - return (&x)[i]; - } - - ////////////////////////////////////// - // Implicit basic constructors - - template - GLM_FUNC_QUALIFIER tvec4::tvec4() : - x(value_type(0)), - y(value_type(0)), - z(value_type(0)), - w(value_type(0)) - {} - - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - ctor - ) - {} - - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - type const & v - ) : - x(v.x), - y(v.y), - z(v.z), - w(v.w) - {} - - ////////////////////////////////////// - // Explicit basic constructors - - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - value_type const & s - ) : - x(s), - y(s), - z(s), - w(s) - {} - - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - value_type const & s1, - value_type const & s2, - value_type const & s3, - value_type const & s4 - ) : - x(s1), - y(s2), - z(s3), - w(s4) - {} - - ////////////////////////////////////// - // Swizzle constructors - - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - tref4 const & r - ) : - x(r.x), - y(r.y), - z(r.z), - w(r.w) - {} - - template - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - tref2 const & v, - B const & s1, - C const & s2 - ) : - x(value_type(v.x)), - y(value_type(v.y)), - z(value_type(s1)), - w(value_type(s2)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - A const & s1, - tref2 const & v, - C const & s2 - ) : - x(value_type(s1)), - y(value_type(v.x)), - z(value_type(v.y)), - w(value_type(s2)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - A const & s1, - B const & s2, - tref2 const & v - ) : - x(value_type(s1)), - y(value_type(s2)), - z(value_type(v.x)), - w(value_type(v.y)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - tref3 const & v, - B const & s - ) : - x(value_type(v.x)), - y(value_type(v.y)), - z(value_type(v.z)), - w(value_type(s)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - A const & s, - tref3 const & v - ) : - x(value_type(s)), - y(value_type(v.x)), - z(value_type(v.y)), - w(value_type(v.z)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - tref2 const & v1, - tref2 const & v2 - ) : - x(value_type(v1.x)), - y(value_type(v1.y)), - z(value_type(v2.x)), - w(value_type(v2.y)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - tvec2 const & v1, - tref2 const & v2 - ) : - x(value_type(v1.x)), - y(value_type(v1.y)), - z(value_type(v2.x)), - w(value_type(v2.y)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - tref2 const & v1, - tvec2 const & v2 - ) : - x(value_type(v1.x)), - y(value_type(v1.y)), - z(value_type(v2.x)), - w(value_type(v2.y)) - {} - - ////////////////////////////////////// - // Convertion scalar constructors - - template - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - U const & x - ) : - x(value_type(x)), - y(value_type(x)), - z(value_type(x)), - w(value_type(x)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - A const & x, - B const & y, - C const & z, - D const & w - ) : - x(value_type(x)), - y(value_type(y)), - z(value_type(z)), - w(value_type(w)) - {} - - ////////////////////////////////////// - // Convertion vector constructors - - template - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - tvec2 const & v, - B const & s1, - C const & s2 - ) : - x(value_type(v.x)), - y(value_type(v.y)), - z(value_type(s1)), - w(value_type(s2)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - A const & s1, - tvec2 const & v, - C const & s2 - ) : - x(value_type(s1)), - y(value_type(v.x)), - z(value_type(v.y)), - w(value_type(s2)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - A const & s1, - B const & s2, - tvec2 const & v - ) : - x(value_type(s1)), - y(value_type(s2)), - z(value_type(v.x)), - w(value_type(v.y)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - tvec3 const & v, - B const & s - ) : - x(value_type(v.x)), - y(value_type(v.y)), - z(value_type(v.z)), - w(value_type(s)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - A const & s, - tvec3 const & v - ) : - x(value_type(s)), - y(value_type(v.x)), - z(value_type(v.y)), - w(value_type(v.z)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - tvec2 const & v1, - tvec2 const & v2 - ) : - x(value_type(v1.x)), - y(value_type(v1.y)), - z(value_type(v2.x)), - w(value_type(v2.y)) - {} - - template - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - tvec4 const & v - ) : - x(value_type(v.x)), - y(value_type(v.y)), - z(value_type(v.z)), - w(value_type(v.w)) - {} - - ////////////////////////////////////// - // Unary arithmetic operators - - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator= - ( - tvec4 const & v - ) - { - this->x = v.x; - this->y = v.y; - this->z = v.z; - this->w = v.w; - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator= - ( - tvec4 const & v - ) - { - this->x = T(v.x); - this->y = T(v.y); - this->z = T(v.z); - this->w = T(v.w); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+= - ( - U const & s - ) - { - this->x += T(s); - this->y += T(s); - this->z += T(s); - this->w += T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+= - ( - tvec4 const & v - ) - { - this->x += T(v.x); - this->y += T(v.y); - this->z += T(v.z); - this->w += T(v.w); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator-= - ( - U const & s - ) - { - this->x -= T(s); - this->y -= T(s); - this->z -= T(s); - this->w -= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator-= - ( - tvec4 const & v - ) - { - this->x -= T(v.x); - this->y -= T(v.y); - this->z -= T(v.z); - this->w -= T(v.w); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator*= - ( - U const & s - ) - { - this->x *= T(s); - this->y *= T(s); - this->z *= T(s); - this->w *= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator*= - ( - tvec4 const & v - ) - { - this->x *= T(v.x); - this->y *= T(v.y); - this->z *= T(v.z); - this->w *= T(v.w); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator/= - ( - U const & s - ) - { - this->x /= T(s); - this->y /= T(s); - this->z /= T(s); - this->w /= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator/= - ( - tvec4 const & v - ) - { - this->x /= T(v.x); - this->y /= T(v.y); - this->z /= T(v.z); - this->w /= T(v.w); - return *this; - } - - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator++() - { - ++this->x; - ++this->y; - ++this->z; - ++this->w; - return *this; - } - - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator--() - { - --this->x; - --this->y; - --this->z; - --this->w; - return *this; - } - - ////////////////////////////////////// - // Unary bit operators - - template - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator%= - ( - U const & s - ) - { - this->x %= T(s); - this->y %= T(s); - this->z %= T(s); - this->w %= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator%= - ( - tvec4 const & v - ) - { - this->x %= T(v.x); - this->y %= T(v.y); - this->z %= T(v.z); - this->w %= T(v.w); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator&= - ( - U const & s - ) - { - this->x &= T(s); - this->y &= T(s); - this->z &= T(s); - this->w &= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator&= - ( - tvec4 const & v - ) - { - this->x &= T(v.x); - this->y &= T(v.y); - this->z &= T(v.z); - this->w &= T(v.w); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator|= - ( - U const & s - ) - { - this->x |= T(s); - this->y |= T(s); - this->z |= T(s); - this->w |= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator|= - ( - tvec4 const & v - ) - { - this->x |= T(v.x); - this->y |= T(v.y); - this->z |= T(v.z); - this->w |= T(v.w); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator^= - ( - U const & s - ) - { - this->x ^= T(s); - this->y ^= T(s); - this->z ^= T(s); - this->w ^= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator^= - ( - tvec4 const & v - ) - { - this->x ^= T(v.x); - this->y ^= T(v.y); - this->z ^= T(v.z); - this->w ^= T(v.w); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator<<= - ( - U const & s - ) - { - this->x <<= T(s); - this->y <<= T(s); - this->z <<= T(s); - this->w <<= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator<<= - ( - tvec4 const & v - ) - { - this->x <<= T(v.x); - this->y <<= T(v.y); - this->z <<= T(v.z); - this->w <<= T(v.w); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator>>= - ( - U const & s - ) - { - this->x >>= T(s); - this->y >>= T(s); - this->z >>= T(s); - this->w >>= T(s); - return *this; - } - - template - template - GLM_FUNC_QUALIFIER tvec4 & tvec4::operator>>= - ( - tvec4 const & v - ) - { - this->x >>= T(v.x); - this->y >>= T(v.y); - this->z >>= T(v.z); - this->w >>= T(v.w); - return *this; - } - - ////////////////////////////////////// - // Swizzle operators - - template - GLM_FUNC_QUALIFIER typename tvec4::value_type - tvec4::swizzle - ( - comp x - ) const - { - return (*this)[x]; - } - - template - GLM_FUNC_QUALIFIER tvec2 tvec4::swizzle - ( - comp x, - comp y - ) const - { - return tvec2( - (*this)[x], - (*this)[y]); - } - - template - GLM_FUNC_QUALIFIER tvec3 tvec4::swizzle - ( - comp x, - comp y, - comp z - ) const - { - return tvec3( - (*this)[x], - (*this)[y], - (*this)[z]); - } - - template - GLM_FUNC_QUALIFIER tvec4 tvec4::swizzle - ( - comp x, - comp y, - comp z, - comp w - ) const - { - return tvec4( - (*this)[x], - (*this)[y], - (*this)[z], - (*this)[w]); - } - - template - GLM_FUNC_QUALIFIER tref2 tvec4::swizzle - ( - comp x, - comp y - ) - { - return tref2( - (*this)[x], - (*this)[y]); - } - - template - GLM_FUNC_QUALIFIER tref3 tvec4::swizzle - ( - comp x, - comp y, - comp z - ) - { - return tref3( - (*this)[x], - (*this)[y], - (*this)[z]); - } - - template - GLM_FUNC_QUALIFIER tref4 tvec4::swizzle - ( - comp x, - comp y, - comp z, - comp w - ) - { - return tref4( - (*this)[x], - (*this)[y], - (*this)[z], - (*this)[w]); - } - - ////////////////////////////////////// - // Binary arithmetic operators - - template - GLM_FUNC_QUALIFIER tvec4 operator+ - ( - tvec4 const & v, - typename tvec4::value_type const & s - ) - { - return tvec4( - v.x + s, - v.y + s, - v.z + s, - v.w + s); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator+ - ( - typename tvec4::value_type const & s, - tvec4 const & v - ) - { - return tvec4( - s + v.x, - s + v.y, - s + v.z, - s + v.w); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator+ - ( - tvec4 const & v1, - tvec4 const & v2 - ) - { - return tvec4( - v1.x + v2.x, - v1.y + v2.y, - v1.z + v2.z, - v1.w + v2.w); - } - - //operator- - template - GLM_FUNC_QUALIFIER tvec4 operator- - ( - tvec4 const & v, - typename tvec4::value_type const & s - ) - { - return tvec4( - v.x - s, - v.y - s, - v.z - s, - v.w - s); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator- - ( - typename tvec4::value_type const & s, - tvec4 const & v - ) - { - return tvec4( - s - v.x, - s - v.y, - s - v.z, - s - v.w); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator- - ( - tvec4 const & v1, - tvec4 const & v2 - ) - { - return tvec4( - v1.x - v2.x, - v1.y - v2.y, - v1.z - v2.z, - v1.w - v2.w); - } - - //operator* - template - GLM_FUNC_QUALIFIER tvec4 operator* - ( - tvec4 const & v, - typename tvec4::value_type const & s - ) - { - return tvec4( - v.x * s, - v.y * s, - v.z * s, - v.w * s); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator* - ( - typename tvec4::value_type const & s, - tvec4 const & v - ) - { - return tvec4( - s * v.x, - s * v.y, - s * v.z, - s * v.w); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator* - ( - tvec4 const & v1, - tvec4 const & v2 - ) - { - return tvec4( - v1.x * v2.x, - v1.y * v2.y, - v1.z * v2.z, - v1.w * v2.w); - } - - //operator/ - template - GLM_FUNC_QUALIFIER tvec4 operator/ - ( - tvec4 const & v, - typename tvec4::value_type const & s - ) - { - return tvec4( - v.x / s, - v.y / s, - v.z / s, - v.w / s); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator/ - ( - typename tvec4::value_type const & s, - tvec4 const & v - ) - { - return tvec4( - s / v.x, - s / v.y, - s / v.z, - s / v.w); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator/ - ( - tvec4 const & v1, - tvec4 const & v2 - ) - { - return tvec4( - v1.x / v2.x, - v1.y / v2.y, - v1.z / v2.z, - v1.w / v2.w); - } - - // Unary constant operators - template - GLM_FUNC_QUALIFIER tvec4 operator- - ( - tvec4 const & v - ) - { - return tvec4( - -v.x, - -v.y, - -v.z, - -v.w); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator++ - ( - tvec4 const & v, - int - ) - { - typename tvec4::value_type One(1); - return tvec4( - v.x + One, - v.y + One, - v.z + One, - v.w + One); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator-- - ( - tvec4 const & v, - int - ) - { - typename tvec4::value_type One(1); - return tvec4( - v.x - One, - v.y - One, - v.z - One, - v.w - One); - } - - ////////////////////////////////////// - // Boolean operators - - template - GLM_FUNC_QUALIFIER bool operator== - ( - tvec4 const & v1, - tvec4 const & v2 - ) - { - return (v1.x == v2.x) && (v1.y == v2.y) && (v1.z == v2.z) && (v1.w == v2.w); - } - - template - GLM_FUNC_QUALIFIER bool operator!= - ( - tvec4 const & v1, - tvec4 const & v2 - ) - { - return (v1.x != v2.x) || (v1.y != v2.y) || (v1.z != v2.z) || (v1.w != v2.w); - } - - ////////////////////////////////////// - // Binary bit operators - - template - GLM_FUNC_QUALIFIER tvec4 operator% - ( - tvec4 const & v, - typename tvec4::value_type const & s - ) - { - return tvec4( - v.x % s, - v.y % s, - v.z % s, - v.w % s); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator% - ( - typename tvec4::value_type const & s, - tvec4 const & v - ) - { - return tvec4( - s % v.x, - s % v.y, - s % v.z, - s % v.w); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator% - ( - tvec4 const & v1, - tvec4 const & v2 - ) - { - return tvec4( - v1.x % v2.x, - v1.y % v2.y, - v1.z % v2.z, - v1.w % v2.w); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator& - ( - tvec4 const & v, - typename tvec4::value_type const & s - ) - { - return tvec4( - v.x & s, - v.y & s, - v.z & s, - v.w & s); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator& - ( - typename tvec4::value_type const & s, - tvec4 const & v - ) - { - return tvec4( - s & v.x, - s & v.y, - s & v.z, - s & v.w); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator& - ( - tvec4 const & v1, - tvec4 const & v2 - ) - { - return tvec4( - v1.x & v2.x, - v1.y & v2.y, - v1.z & v2.z, - v1.w & v2.w); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator| - ( - tvec4 const & v, - typename tvec4::value_type const & s - ) - { - return tvec4( - v.x | s, - v.y | s, - v.z | s, - v.w | s); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator| - ( - typename tvec4::value_type const & s, - tvec4 const & v - ) - { - return tvec4( - s | v.x, - s | v.y, - s | v.z, - s | v.w); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator| - ( - tvec4 const & v1, - tvec4 const & v2 - ) - { - return tvec4( - v1.x | v2.x, - v1.y | v2.y, - v1.z | v2.z, - v1.w | v2.w); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator^ - ( - tvec4 const & v, - typename tvec4::value_type const & s - ) - { - return tvec4( - v.x ^ s, - v.y ^ s, - v.z ^ s, - v.w ^ s); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator^ - ( - typename tvec4::value_type const & s, - tvec4 const & v - ) - { - return tvec4( - s ^ v.x, - s ^ v.y, - s ^ v.z, - s ^ v.w); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator^ - ( - tvec4 const & v1, - tvec4 const & v2 - ) - { - return tvec4( - v1.x ^ v2.x, - v1.y ^ v2.y, - v1.z ^ v2.z, - v1.w ^ v2.w); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator<< - ( - tvec4 const & v, - typename tvec4::value_type const & s - ) - { - return tvec4( - v.x << s, - v.y << s, - v.z << s, - v.w << s); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator<< - ( - typename tvec4::value_type const & s, - tvec4 const & v - ) - { - return tvec4( - s << v.x, - s << v.y, - s << v.z, - s << v.w); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator<< - ( - tvec4 const & v1, - tvec4 const & v2 - ) - { - return tvec4( - v1.x << v2.x, - v1.y << v2.y, - v1.z << v2.z, - v1.w << v2.w); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator>> - ( - tvec4 const & v, - typename tvec4::value_type const & s - ) - { - return tvec4( - v.x >> s, - v.y >> s, - v.z >> s, - v.w >> s); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator>> - ( - typename tvec4::value_type const & s, - tvec4 const & v - ) - { - return tvec4( - s >> v.x, - s >> v.y, - s >> v.z, - s >> v.w); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator>> - ( - tvec4 const & v1, - tvec4 const & v2 - ) - { - return tvec4( - v1.x >> v2.x, - v1.y >> v2.y, - v1.z >> v2.z, - v1.w >> v2.w); - } - - template - GLM_FUNC_QUALIFIER tvec4 operator~ - ( - tvec4 const & v - ) - { - return tvec4( - ~v.x, - ~v.y, - ~v.z, - ~v.w); - } - - ////////////////////////////////////// - // tref definition - - template - tref4::tref4 - ( - T & x, - T & y, - T & z, - T & w - ) : - x(x), - y(y), - z(z), - w(w) - {} - - template - tref4::tref4 - ( - tref4 const & r - ) : - x(r.x), - y(r.y), - z(r.z), - w(r.w) - {} - - template - tref4::tref4 - ( - tvec4 const & v - ) : - x(v.x), - y(v.y), - z(v.z), - w(v.w) - {} - - template - tref4& tref4::operator= - ( - tref4 const & r - ) - { - x = r.x; - y = r.y; - z = r.z; - w = r.w; - return *this; - } - - template - tref4& tref4::operator= - ( - tvec4 const & v - ) - { - x = v.x; - y = v.y; - z = v.z; - w = v.w; - return *this; - } - - template - GLM_FUNC_QUALIFIER tvec4 tref4::operator() () - { - return tvec4(this->x, this->y, this->z, this->w); - } - -}//namespace detail -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/core/type_tvec4.inl +/// @date 2008-08-23 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec4::size_type tvec4::length() const + { + return 4; + } + + ////////////////////////////////////// + // Accesses + + template + GLM_FUNC_QUALIFIER typename tvec4::value_type & + tvec4::operator[] + ( + size_type i + ) + { + assert(i < this->length()); + return (&x)[i]; + } + + template + GLM_FUNC_QUALIFIER typename tvec4::value_type const & + tvec4::operator[] + ( + size_type i + ) const + { + assert(i < this->length()); + return (&x)[i]; + } + + ////////////////////////////////////// + // Implicit basic constructors + + template + GLM_FUNC_QUALIFIER tvec4::tvec4() : + x(value_type(0)), + y(value_type(0)), + z(value_type(0)), + w(value_type(0)) + {} + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + ctor + ) + {} + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + type const & v + ) : + x(v.x), + y(v.y), + z(v.z), + w(v.w) + {} + + ////////////////////////////////////// + // Explicit basic constructors + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + value_type const & s + ) : + x(s), + y(s), + z(s), + w(s) + {} + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + value_type const & s1, + value_type const & s2, + value_type const & s3, + value_type const & s4 + ) : + x(s1), + y(s2), + z(s3), + w(s4) + {} + + ////////////////////////////////////// + // Swizzle constructors + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tref4 const & r + ) : + x(r.x), + y(r.y), + z(r.z), + w(r.w) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tref2 const & v, + B const & s1, + C const & s2 + ) : + x(value_type(v.x)), + y(value_type(v.y)), + z(value_type(s1)), + w(value_type(s2)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + A const & s1, + tref2 const & v, + C const & s2 + ) : + x(value_type(s1)), + y(value_type(v.x)), + z(value_type(v.y)), + w(value_type(s2)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + A const & s1, + B const & s2, + tref2 const & v + ) : + x(value_type(s1)), + y(value_type(s2)), + z(value_type(v.x)), + w(value_type(v.y)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tref3 const & v, + B const & s + ) : + x(value_type(v.x)), + y(value_type(v.y)), + z(value_type(v.z)), + w(value_type(s)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + A const & s, + tref3 const & v + ) : + x(value_type(s)), + y(value_type(v.x)), + z(value_type(v.y)), + w(value_type(v.z)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tref2 const & v1, + tref2 const & v2 + ) : + x(value_type(v1.x)), + y(value_type(v1.y)), + z(value_type(v2.x)), + w(value_type(v2.y)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tvec2 const & v1, + tref2 const & v2 + ) : + x(value_type(v1.x)), + y(value_type(v1.y)), + z(value_type(v2.x)), + w(value_type(v2.y)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tref2 const & v1, + tvec2 const & v2 + ) : + x(value_type(v1.x)), + y(value_type(v1.y)), + z(value_type(v2.x)), + w(value_type(v2.y)) + {} + + ////////////////////////////////////// + // Convertion scalar constructors + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + U const & x + ) : + x(value_type(x)), + y(value_type(x)), + z(value_type(x)), + w(value_type(x)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + A const & x, + B const & y, + C const & z, + D const & w + ) : + x(value_type(x)), + y(value_type(y)), + z(value_type(z)), + w(value_type(w)) + {} + + ////////////////////////////////////// + // Convertion vector constructors + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tvec2 const & v, + B const & s1, + C const & s2 + ) : + x(value_type(v.x)), + y(value_type(v.y)), + z(value_type(s1)), + w(value_type(s2)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + A const & s1, + tvec2 const & v, + C const & s2 + ) : + x(value_type(s1)), + y(value_type(v.x)), + z(value_type(v.y)), + w(value_type(s2)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + A const & s1, + B const & s2, + tvec2 const & v + ) : + x(value_type(s1)), + y(value_type(s2)), + z(value_type(v.x)), + w(value_type(v.y)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tvec3 const & v, + B const & s + ) : + x(value_type(v.x)), + y(value_type(v.y)), + z(value_type(v.z)), + w(value_type(s)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + A const & s, + tvec3 const & v + ) : + x(value_type(s)), + y(value_type(v.x)), + z(value_type(v.y)), + w(value_type(v.z)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tvec2 const & v1, + tvec2 const & v2 + ) : + x(value_type(v1.x)), + y(value_type(v1.y)), + z(value_type(v2.x)), + w(value_type(v2.y)) + {} + + template + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tvec4 const & v + ) : + x(value_type(v.x)), + y(value_type(v.y)), + z(value_type(v.z)), + w(value_type(v.w)) + {} + + ////////////////////////////////////// + // Unary arithmetic operators + + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator= + ( + tvec4 const & v + ) + { + this->x = v.x; + this->y = v.y; + this->z = v.z; + this->w = v.w; + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator= + ( + tvec4 const & v + ) + { + this->x = T(v.x); + this->y = T(v.y); + this->z = T(v.z); + this->w = T(v.w); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+= + ( + U const & s + ) + { + this->x += T(s); + this->y += T(s); + this->z += T(s); + this->w += T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator+= + ( + tvec4 const & v + ) + { + this->x += T(v.x); + this->y += T(v.y); + this->z += T(v.z); + this->w += T(v.w); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator-= + ( + U const & s + ) + { + this->x -= T(s); + this->y -= T(s); + this->z -= T(s); + this->w -= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator-= + ( + tvec4 const & v + ) + { + this->x -= T(v.x); + this->y -= T(v.y); + this->z -= T(v.z); + this->w -= T(v.w); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator*= + ( + U const & s + ) + { + this->x *= T(s); + this->y *= T(s); + this->z *= T(s); + this->w *= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator*= + ( + tvec4 const & v + ) + { + this->x *= T(v.x); + this->y *= T(v.y); + this->z *= T(v.z); + this->w *= T(v.w); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator/= + ( + U const & s + ) + { + this->x /= T(s); + this->y /= T(s); + this->z /= T(s); + this->w /= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator/= + ( + tvec4 const & v + ) + { + this->x /= T(v.x); + this->y /= T(v.y); + this->z /= T(v.z); + this->w /= T(v.w); + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator++() + { + ++this->x; + ++this->y; + ++this->z; + ++this->w; + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator--() + { + --this->x; + --this->y; + --this->z; + --this->w; + return *this; + } + + ////////////////////////////////////// + // Unary bit operators + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator%= + ( + U const & s + ) + { + this->x %= T(s); + this->y %= T(s); + this->z %= T(s); + this->w %= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator%= + ( + tvec4 const & v + ) + { + this->x %= T(v.x); + this->y %= T(v.y); + this->z %= T(v.z); + this->w %= T(v.w); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator&= + ( + U const & s + ) + { + this->x &= T(s); + this->y &= T(s); + this->z &= T(s); + this->w &= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator&= + ( + tvec4 const & v + ) + { + this->x &= T(v.x); + this->y &= T(v.y); + this->z &= T(v.z); + this->w &= T(v.w); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator|= + ( + U const & s + ) + { + this->x |= T(s); + this->y |= T(s); + this->z |= T(s); + this->w |= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator|= + ( + tvec4 const & v + ) + { + this->x |= T(v.x); + this->y |= T(v.y); + this->z |= T(v.z); + this->w |= T(v.w); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator^= + ( + U const & s + ) + { + this->x ^= T(s); + this->y ^= T(s); + this->z ^= T(s); + this->w ^= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator^= + ( + tvec4 const & v + ) + { + this->x ^= T(v.x); + this->y ^= T(v.y); + this->z ^= T(v.z); + this->w ^= T(v.w); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator<<= + ( + U const & s + ) + { + this->x <<= T(s); + this->y <<= T(s); + this->z <<= T(s); + this->w <<= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator<<= + ( + tvec4 const & v + ) + { + this->x <<= T(v.x); + this->y <<= T(v.y); + this->z <<= T(v.z); + this->w <<= T(v.w); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator>>= + ( + U const & s + ) + { + this->x >>= T(s); + this->y >>= T(s); + this->z >>= T(s); + this->w >>= T(s); + return *this; + } + + template + template + GLM_FUNC_QUALIFIER tvec4 & tvec4::operator>>= + ( + tvec4 const & v + ) + { + this->x >>= T(v.x); + this->y >>= T(v.y); + this->z >>= T(v.z); + this->w >>= T(v.w); + return *this; + } + + ////////////////////////////////////// + // Swizzle operators + + template + GLM_FUNC_QUALIFIER typename tvec4::value_type + tvec4::swizzle + ( + comp x + ) const + { + return (*this)[x]; + } + + template + GLM_FUNC_QUALIFIER tvec2 tvec4::swizzle + ( + comp x, + comp y + ) const + { + return tvec2( + (*this)[x], + (*this)[y]); + } + + template + GLM_FUNC_QUALIFIER tvec3 tvec4::swizzle + ( + comp x, + comp y, + comp z + ) const + { + return tvec3( + (*this)[x], + (*this)[y], + (*this)[z]); + } + + template + GLM_FUNC_QUALIFIER tvec4 tvec4::swizzle + ( + comp x, + comp y, + comp z, + comp w + ) const + { + return tvec4( + (*this)[x], + (*this)[y], + (*this)[z], + (*this)[w]); + } + + template + GLM_FUNC_QUALIFIER tref2 tvec4::swizzle + ( + comp x, + comp y + ) + { + return tref2( + (*this)[x], + (*this)[y]); + } + + template + GLM_FUNC_QUALIFIER tref3 tvec4::swizzle + ( + comp x, + comp y, + comp z + ) + { + return tref3( + (*this)[x], + (*this)[y], + (*this)[z]); + } + + template + GLM_FUNC_QUALIFIER tref4 tvec4::swizzle + ( + comp x, + comp y, + comp z, + comp w + ) + { + return tref4( + (*this)[x], + (*this)[y], + (*this)[z], + (*this)[w]); + } + + ////////////////////////////////////// + // Binary arithmetic operators + + template + GLM_FUNC_QUALIFIER tvec4 operator+ + ( + tvec4 const & v, + typename tvec4::value_type const & s + ) + { + return tvec4( + v.x + s, + v.y + s, + v.z + s, + v.w + s); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator+ + ( + typename tvec4::value_type const & s, + tvec4 const & v + ) + { + return tvec4( + s + v.x, + s + v.y, + s + v.z, + s + v.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator+ + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return tvec4( + v1.x + v2.x, + v1.y + v2.y, + v1.z + v2.z, + v1.w + v2.w); + } + + //operator- + template + GLM_FUNC_QUALIFIER tvec4 operator- + ( + tvec4 const & v, + typename tvec4::value_type const & s + ) + { + return tvec4( + v.x - s, + v.y - s, + v.z - s, + v.w - s); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator- + ( + typename tvec4::value_type const & s, + tvec4 const & v + ) + { + return tvec4( + s - v.x, + s - v.y, + s - v.z, + s - v.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator- + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return tvec4( + v1.x - v2.x, + v1.y - v2.y, + v1.z - v2.z, + v1.w - v2.w); + } + + //operator* + template + GLM_FUNC_QUALIFIER tvec4 operator* + ( + tvec4 const & v, + typename tvec4::value_type const & s + ) + { + return tvec4( + v.x * s, + v.y * s, + v.z * s, + v.w * s); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator* + ( + typename tvec4::value_type const & s, + tvec4 const & v + ) + { + return tvec4( + s * v.x, + s * v.y, + s * v.z, + s * v.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator* + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return tvec4( + v1.x * v2.x, + v1.y * v2.y, + v1.z * v2.z, + v1.w * v2.w); + } + + //operator/ + template + GLM_FUNC_QUALIFIER tvec4 operator/ + ( + tvec4 const & v, + typename tvec4::value_type const & s + ) + { + return tvec4( + v.x / s, + v.y / s, + v.z / s, + v.w / s); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator/ + ( + typename tvec4::value_type const & s, + tvec4 const & v + ) + { + return tvec4( + s / v.x, + s / v.y, + s / v.z, + s / v.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator/ + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return tvec4( + v1.x / v2.x, + v1.y / v2.y, + v1.z / v2.z, + v1.w / v2.w); + } + + // Unary constant operators + template + GLM_FUNC_QUALIFIER tvec4 operator- + ( + tvec4 const & v + ) + { + return tvec4( + -v.x, + -v.y, + -v.z, + -v.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator++ + ( + tvec4 const & v, + int + ) + { + typename tvec4::value_type One(1); + return tvec4( + v.x + One, + v.y + One, + v.z + One, + v.w + One); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator-- + ( + tvec4 const & v, + int + ) + { + typename tvec4::value_type One(1); + return tvec4( + v.x - One, + v.y - One, + v.z - One, + v.w - One); + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return (v1.x == v2.x) && (v1.y == v2.y) && (v1.z == v2.z) && (v1.w == v2.w); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return (v1.x != v2.x) || (v1.y != v2.y) || (v1.z != v2.z) || (v1.w != v2.w); + } + + ////////////////////////////////////// + // Binary bit operators + + template + GLM_FUNC_QUALIFIER tvec4 operator% + ( + tvec4 const & v, + typename tvec4::value_type const & s + ) + { + return tvec4( + v.x % s, + v.y % s, + v.z % s, + v.w % s); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator% + ( + typename tvec4::value_type const & s, + tvec4 const & v + ) + { + return tvec4( + s % v.x, + s % v.y, + s % v.z, + s % v.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator% + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return tvec4( + v1.x % v2.x, + v1.y % v2.y, + v1.z % v2.z, + v1.w % v2.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator& + ( + tvec4 const & v, + typename tvec4::value_type const & s + ) + { + return tvec4( + v.x & s, + v.y & s, + v.z & s, + v.w & s); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator& + ( + typename tvec4::value_type const & s, + tvec4 const & v + ) + { + return tvec4( + s & v.x, + s & v.y, + s & v.z, + s & v.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator& + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return tvec4( + v1.x & v2.x, + v1.y & v2.y, + v1.z & v2.z, + v1.w & v2.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator| + ( + tvec4 const & v, + typename tvec4::value_type const & s + ) + { + return tvec4( + v.x | s, + v.y | s, + v.z | s, + v.w | s); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator| + ( + typename tvec4::value_type const & s, + tvec4 const & v + ) + { + return tvec4( + s | v.x, + s | v.y, + s | v.z, + s | v.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator| + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return tvec4( + v1.x | v2.x, + v1.y | v2.y, + v1.z | v2.z, + v1.w | v2.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator^ + ( + tvec4 const & v, + typename tvec4::value_type const & s + ) + { + return tvec4( + v.x ^ s, + v.y ^ s, + v.z ^ s, + v.w ^ s); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator^ + ( + typename tvec4::value_type const & s, + tvec4 const & v + ) + { + return tvec4( + s ^ v.x, + s ^ v.y, + s ^ v.z, + s ^ v.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator^ + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return tvec4( + v1.x ^ v2.x, + v1.y ^ v2.y, + v1.z ^ v2.z, + v1.w ^ v2.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator<< + ( + tvec4 const & v, + typename tvec4::value_type const & s + ) + { + return tvec4( + v.x << s, + v.y << s, + v.z << s, + v.w << s); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator<< + ( + typename tvec4::value_type const & s, + tvec4 const & v + ) + { + return tvec4( + s << v.x, + s << v.y, + s << v.z, + s << v.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator<< + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return tvec4( + v1.x << v2.x, + v1.y << v2.y, + v1.z << v2.z, + v1.w << v2.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator>> + ( + tvec4 const & v, + typename tvec4::value_type const & s + ) + { + return tvec4( + v.x >> s, + v.y >> s, + v.z >> s, + v.w >> s); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator>> + ( + typename tvec4::value_type const & s, + tvec4 const & v + ) + { + return tvec4( + s >> v.x, + s >> v.y, + s >> v.z, + s >> v.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator>> + ( + tvec4 const & v1, + tvec4 const & v2 + ) + { + return tvec4( + v1.x >> v2.x, + v1.y >> v2.y, + v1.z >> v2.z, + v1.w >> v2.w); + } + + template + GLM_FUNC_QUALIFIER tvec4 operator~ + ( + tvec4 const & v + ) + { + return tvec4( + ~v.x, + ~v.y, + ~v.z, + ~v.w); + } + + ////////////////////////////////////// + // tref definition + + template + tref4::tref4 + ( + T & x, + T & y, + T & z, + T & w + ) : + x(x), + y(y), + z(z), + w(w) + {} + + template + tref4::tref4 + ( + tref4 const & r + ) : + x(r.x), + y(r.y), + z(r.z), + w(r.w) + {} + + template + tref4::tref4 + ( + tvec4 const & v + ) : + x(v.x), + y(v.y), + z(v.z), + w(v.w) + {} + + template + tref4& tref4::operator= + ( + tref4 const & r + ) + { + x = r.x; + y = r.y; + z = r.z; + w = r.w; + return *this; + } + + template + tref4& tref4::operator= + ( + tvec4 const & v + ) + { + x = v.x; + y = v.y; + z = v.z; + w = v.w; + return *this; + } + + template + GLM_FUNC_QUALIFIER tvec4 tref4::operator() () + { + return tvec4(this->x, this->y, this->z, this->w); + } + +}//namespace detail +}//namespace glm diff --git a/include/gal/opengl/glm/ext.hpp b/include/gal/opengl/glm/ext.hpp index 19b2ea1b8d..b0c4f72dbd 100644 --- a/include/gal/opengl/glm/ext.hpp +++ b/include/gal/opengl/glm/ext.hpp @@ -1,145 +1,145 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file glm/glm.hpp -/// @date 2009-05-01 / 2011-05-16 -/// @author Christophe Riccio -/// -/// @ref core (Dependence) -/// -/// @defgroup gtc GTC Extensions (Stable) -/// -/// @brief Functions and types that the GLSL specification doesn't define, but useful to have for a C++ program. -/// -/// GTC extensions aim to be stable. -/// -/// Even if it's highly unrecommended, it's possible to include all the extensions at once by -/// including . Otherwise, each extension needs to be included a specific file. -/// -/// @defgroup gtx GTX Extensions (Experimental) -/// -/// @brief Functions and types that the GLSL specification doesn't define, but -/// useful to have for a C++ program. -/// -/// Experimental extensions are useful functions and types, but the development of -/// their API and functionality is not necessarily stable. They can change -/// substantially between versions. Backwards compatibility is not much of an issue -/// for them. -/// -/// Even if it's highly unrecommended, it's possible to include all the extensions -/// at once by including . Otherwise, each extension needs to be -/// included a specific file. -/// -/// @defgroup virtrev VIRTREV Extensions -/// -/// @brief Extensions develop and maintain by Mathieu [matrem] Roumillac -/// (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showprofile&User=22660). -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_ext -#define glm_ext - -#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_EXT_INCLUDED_DISPLAYED)) -# define GLM_MESSAGE_EXT_INCLUDED_DISPLAYED -# pragma message("GLM: All extensions included (not recommanded)") -#endif//GLM_MESSAGES - -#include "./gtc/constants.hpp" -#include "./gtc/epsilon.hpp" -#include "./gtc/half_float.hpp" -#include "./gtc/matrix_access.hpp" -#include "./gtc/matrix_integer.hpp" -#include "./gtc/matrix_inverse.hpp" -#include "./gtc/matrix_transform.hpp" -#include "./gtc/noise.hpp" -#include "./gtc/quaternion.hpp" -#include "./gtc/random.hpp" -#include "./gtc/reciprocal.hpp" -#include "./gtc/swizzle.hpp" -#include "./gtc/type_precision.hpp" -#include "./gtc/type_ptr.hpp" -#include "./gtc/ulp.hpp" - -#include "./gtx/associated_min_max.hpp" -#include "./gtx/bit.hpp" -#include "./gtx/closest_point.hpp" -#include "./gtx/color_cast.hpp" -#include "./gtx/color_space.hpp" -#include "./gtx/color_space_YCoCg.hpp" -#include "./gtx/compatibility.hpp" -#include "./gtx/component_wise.hpp" -#include "./gtx/euler_angles.hpp" -#include "./gtx/extend.hpp" -#include "./gtx/extented_min_max.hpp" -#include "./gtx/fast_exponential.hpp" -#include "./gtx/fast_square_root.hpp" -#include "./gtx/fast_trigonometry.hpp" -#include "./gtx/gradient_paint.hpp" -#include "./gtx/handed_coordinate_space.hpp" -#include "./gtx/inertia.hpp" -#include "./gtx/int_10_10_10_2.hpp" -#include "./gtx/integer.hpp" -#include "./gtx/intersect.hpp" -#include "./gtx/log_base.hpp" -#include "./gtx/matrix_cross_product.hpp" -#include "./gtx/matrix_interpolation.hpp" -#include "./gtx/matrix_major_storage.hpp" -#include "./gtx/matrix_operation.hpp" -#include "./gtx/matrix_query.hpp" -#include "./gtx/mixed_product.hpp" -#include "./gtx/multiple.hpp" -#include "./gtx/norm.hpp" -#include "./gtx/normal.hpp" -#include "./gtx/normalize_dot.hpp" -#include "./gtx/number_precision.hpp" -#include "./gtx/ocl_type.hpp" -#include "./gtx/optimum_pow.hpp" -#include "./gtx/orthonormalize.hpp" -#include "./gtx/perpendicular.hpp" -#include "./gtx/polar_coordinates.hpp" -#include "./gtx/projection.hpp" -#include "./gtx/quaternion.hpp" -#include "./gtx/raw_data.hpp" -#include "./gtx/rotate_vector.hpp" -#include "./gtx/spline.hpp" -#include "./gtx/std_based_type.hpp" -#include "./gtx/string_cast.hpp" -#include "./gtx/transform.hpp" -#include "./gtx/transform2.hpp" -#include "./gtx/vec1.hpp" -#include "./gtx/vector_access.hpp" -#include "./gtx/vector_angle.hpp" -#include "./gtx/vector_query.hpp" -#include "./gtx/verbose_operator.hpp" -#include "./gtx/wrap.hpp" - -#if(GLM_ARCH & GLM_ARCH_SSE2) -# include "./gtx/simd_vec4.hpp" -# include "./gtx/simd_mat4.hpp" -#endif - -#include "./virtrev/xstream.hpp" - -//const float goldenRatio = 1.618033988749894848f; -//const float pi = 3.141592653589793238f; - -#endif //glm_ext +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @file glm/glm.hpp +/// @date 2009-05-01 / 2011-05-16 +/// @author Christophe Riccio +/// +/// @ref core (Dependence) +/// +/// @defgroup gtc GTC Extensions (Stable) +/// +/// @brief Functions and types that the GLSL specification doesn't define, but useful to have for a C++ program. +/// +/// GTC extensions aim to be stable. +/// +/// Even if it's highly unrecommended, it's possible to include all the extensions at once by +/// including . Otherwise, each extension needs to be included a specific file. +/// +/// @defgroup gtx GTX Extensions (Experimental) +/// +/// @brief Functions and types that the GLSL specification doesn't define, but +/// useful to have for a C++ program. +/// +/// Experimental extensions are useful functions and types, but the development of +/// their API and functionality is not necessarily stable. They can change +/// substantially between versions. Backwards compatibility is not much of an issue +/// for them. +/// +/// Even if it's highly unrecommended, it's possible to include all the extensions +/// at once by including . Otherwise, each extension needs to be +/// included a specific file. +/// +/// @defgroup virtrev VIRTREV Extensions +/// +/// @brief Extensions develop and maintain by Mathieu [matrem] Roumillac +/// (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showprofile&User=22660). +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_ext +#define glm_ext + +#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_EXT_INCLUDED_DISPLAYED)) +# define GLM_MESSAGE_EXT_INCLUDED_DISPLAYED +# pragma message("GLM: All extensions included (not recommanded)") +#endif//GLM_MESSAGES + +#include "./gtc/constants.hpp" +#include "./gtc/epsilon.hpp" +#include "./gtc/half_float.hpp" +#include "./gtc/matrix_access.hpp" +#include "./gtc/matrix_integer.hpp" +#include "./gtc/matrix_inverse.hpp" +#include "./gtc/matrix_transform.hpp" +#include "./gtc/noise.hpp" +#include "./gtc/quaternion.hpp" +#include "./gtc/random.hpp" +#include "./gtc/reciprocal.hpp" +#include "./gtc/swizzle.hpp" +#include "./gtc/type_precision.hpp" +#include "./gtc/type_ptr.hpp" +#include "./gtc/ulp.hpp" + +#include "./gtx/associated_min_max.hpp" +#include "./gtx/bit.hpp" +#include "./gtx/closest_point.hpp" +#include "./gtx/color_cast.hpp" +#include "./gtx/color_space.hpp" +#include "./gtx/color_space_YCoCg.hpp" +#include "./gtx/compatibility.hpp" +#include "./gtx/component_wise.hpp" +#include "./gtx/euler_angles.hpp" +#include "./gtx/extend.hpp" +#include "./gtx/extented_min_max.hpp" +#include "./gtx/fast_exponential.hpp" +#include "./gtx/fast_square_root.hpp" +#include "./gtx/fast_trigonometry.hpp" +#include "./gtx/gradient_paint.hpp" +#include "./gtx/handed_coordinate_space.hpp" +#include "./gtx/inertia.hpp" +#include "./gtx/int_10_10_10_2.hpp" +#include "./gtx/integer.hpp" +#include "./gtx/intersect.hpp" +#include "./gtx/log_base.hpp" +#include "./gtx/matrix_cross_product.hpp" +#include "./gtx/matrix_interpolation.hpp" +#include "./gtx/matrix_major_storage.hpp" +#include "./gtx/matrix_operation.hpp" +#include "./gtx/matrix_query.hpp" +#include "./gtx/mixed_product.hpp" +#include "./gtx/multiple.hpp" +#include "./gtx/norm.hpp" +#include "./gtx/normal.hpp" +#include "./gtx/normalize_dot.hpp" +#include "./gtx/number_precision.hpp" +#include "./gtx/ocl_type.hpp" +#include "./gtx/optimum_pow.hpp" +#include "./gtx/orthonormalize.hpp" +#include "./gtx/perpendicular.hpp" +#include "./gtx/polar_coordinates.hpp" +#include "./gtx/projection.hpp" +#include "./gtx/quaternion.hpp" +#include "./gtx/raw_data.hpp" +#include "./gtx/rotate_vector.hpp" +#include "./gtx/spline.hpp" +#include "./gtx/std_based_type.hpp" +#include "./gtx/string_cast.hpp" +#include "./gtx/transform.hpp" +#include "./gtx/transform2.hpp" +#include "./gtx/vec1.hpp" +#include "./gtx/vector_access.hpp" +#include "./gtx/vector_angle.hpp" +#include "./gtx/vector_query.hpp" +#include "./gtx/verbose_operator.hpp" +#include "./gtx/wrap.hpp" + +#if(GLM_ARCH & GLM_ARCH_SSE2) +# include "./gtx/simd_vec4.hpp" +# include "./gtx/simd_mat4.hpp" +#endif + +#include "./virtrev/xstream.hpp" + +//const float goldenRatio = 1.618033988749894848f; +//const float pi = 3.141592653589793238f; + +#endif //glm_ext diff --git a/include/gal/opengl/glm/glm.hpp b/include/gal/opengl/glm/glm.hpp index 880bce127a..c35f63b4da 100644 --- a/include/gal/opengl/glm/glm.hpp +++ b/include/gal/opengl/glm/glm.hpp @@ -1,129 +1,129 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref core -/// @file glm/glm.hpp -/// @date 2005-01-14 / 2011-10-24 -/// @author Christophe Riccio -/// -/// @defgroup core GLM Core -/// -/// @brief The core of GLM, which implements exactly and only the GLSL specification to the degree possible. -/// -/// The GLM core consists of @ref core_types "C++ types that mirror GLSL types" and -/// C++ functions that mirror the GLSL functions. It also includes -/// @ref core_precision "a set of precision-based types" that can be used in the appropriate -/// functions. The C++ types are all based on a basic set of @ref core_template "template types". -/// -/// The best documentation for GLM Core is the current GLSL specification, -/// version 4.2 -/// (pdf file). -/// There are a few @ref pg_differences "differences" between GLM core and GLSL. -/// -/// GLM core functionnalities require to be included to be used. -/// -/// @defgroup core_types Types -/// -/// @brief The standard types defined by the specification. -/// -/// These types are all typedefs of more generalized, template types. To see the definiton -/// of these template types, go to @ref core_template. -/// -/// @ingroup core -/// -/// @defgroup core_precision Precision types -/// -/// @brief Non-GLSL types that are used to define precision-based types. -/// -/// The GLSL language allows the user to define the precision of a particular variable. -/// In OpenGL's GLSL, these precision qualifiers have no effect; they are there for compatibility -/// with OpenGL ES's precision qualifiers, where they @em do have an effect. -/// -/// C++ has no language equivalent to precision qualifiers. So GLM provides the next-best thing: -/// a number of typedefs of the @ref core_template that use a particular precision. -/// -/// None of these types make any guarantees about the actual precision used. -/// -/// @ingroup core -/// -/// @defgroup core_template Template types -/// -/// @brief The generic template types used as the basis for the core types. -/// -/// These types are all templates used to define the actual @ref core_types. -/// These templetes are implementation details of GLM types and should not be used explicitly. -/// -/// @ingroup core -/////////////////////////////////////////////////////////////////////////////////// - -#include "core/_fixes.hpp" - -#ifndef glm_glm -#define glm_glm - -#include -#include -#include -#include -#include -//#include -#include "core/setup.hpp" - -#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_CORE_INCLUDED_DISPLAYED)) -# define GLM_MESSAGE_CORE_INCLUDED_DISPLAYED -# pragma message("GLM: Core library included") -#endif//GLM_MESSAGE - -#include "./core/_detail.hpp" -#include "./core/_vectorize.hpp" -#include "./core/type.hpp" - -#include "./core/func_trigonometric.hpp" -#include "./core/func_exponential.hpp" -#include "./core/func_common.hpp" -#include "./core/func_packing.hpp" -#include "./core/func_geometric.hpp" -#include "./core/func_matrix.hpp" -#include "./core/func_vector_relational.hpp" -#include "./core/func_integer.hpp" -#include "./core/func_noise.hpp" -#include "./core/_swizzle.hpp" - -//////////////////// -// check type sizes -#ifndef GLM_STATIC_ASSERT_NULL - GLM_STATIC_ASSERT(sizeof(glm::detail::int8) == 1, "int8 size isn't 1 byte on this platform"); - GLM_STATIC_ASSERT(sizeof(glm::detail::int16) == 2, "int16 size isn't 2 bytes on this platform"); - GLM_STATIC_ASSERT(sizeof(glm::detail::int32) == 4, "int32 size isn't 4 bytes on this platform"); - GLM_STATIC_ASSERT(sizeof(glm::detail::int64) == 8, "int64 size isn't 8 bytes on this platform"); - - GLM_STATIC_ASSERT(sizeof(glm::detail::uint8) == 1, "uint8 size isn't 1 byte on this platform"); - GLM_STATIC_ASSERT(sizeof(glm::detail::uint16) == 2, "uint16 size isn't 2 bytes on this platform"); - GLM_STATIC_ASSERT(sizeof(glm::detail::uint32) == 4, "uint32 size isn't 4 bytes on this platform"); - GLM_STATIC_ASSERT(sizeof(glm::detail::uint64) == 8, "uint64 size isn't 8 bytes on this platform"); - - GLM_STATIC_ASSERT(sizeof(glm::detail::float16) == 2, "float16 size isn't 2 bytes on this platform"); - GLM_STATIC_ASSERT(sizeof(glm::detail::float32) == 4, "float32 size isn't 4 bytes on this platform"); - GLM_STATIC_ASSERT(sizeof(glm::detail::float64) == 8, "float64 size isn't 8 bytes on this platform"); -#endif//GLM_STATIC_ASSERT_NULL - -#endif//glm_glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/glm.hpp +/// @date 2005-01-14 / 2011-10-24 +/// @author Christophe Riccio +/// +/// @defgroup core GLM Core +/// +/// @brief The core of GLM, which implements exactly and only the GLSL specification to the degree possible. +/// +/// The GLM core consists of @ref core_types "C++ types that mirror GLSL types" and +/// C++ functions that mirror the GLSL functions. It also includes +/// @ref core_precision "a set of precision-based types" that can be used in the appropriate +/// functions. The C++ types are all based on a basic set of @ref core_template "template types". +/// +/// The best documentation for GLM Core is the current GLSL specification, +/// version 4.2 +/// (pdf file). +/// There are a few @ref pg_differences "differences" between GLM core and GLSL. +/// +/// GLM core functionnalities require to be included to be used. +/// +/// @defgroup core_types Types +/// +/// @brief The standard types defined by the specification. +/// +/// These types are all typedefs of more generalized, template types. To see the definiton +/// of these template types, go to @ref core_template. +/// +/// @ingroup core +/// +/// @defgroup core_precision Precision types +/// +/// @brief Non-GLSL types that are used to define precision-based types. +/// +/// The GLSL language allows the user to define the precision of a particular variable. +/// In OpenGL's GLSL, these precision qualifiers have no effect; they are there for compatibility +/// with OpenGL ES's precision qualifiers, where they @em do have an effect. +/// +/// C++ has no language equivalent to precision qualifiers. So GLM provides the next-best thing: +/// a number of typedefs of the @ref core_template that use a particular precision. +/// +/// None of these types make any guarantees about the actual precision used. +/// +/// @ingroup core +/// +/// @defgroup core_template Template types +/// +/// @brief The generic template types used as the basis for the core types. +/// +/// These types are all templates used to define the actual @ref core_types. +/// These templetes are implementation details of GLM types and should not be used explicitly. +/// +/// @ingroup core +/////////////////////////////////////////////////////////////////////////////////// + +#include "core/_fixes.hpp" + +#ifndef glm_glm +#define glm_glm + +#include +#include +#include +#include +#include +//#include +#include "core/setup.hpp" + +#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_CORE_INCLUDED_DISPLAYED)) +# define GLM_MESSAGE_CORE_INCLUDED_DISPLAYED +# pragma message("GLM: Core library included") +#endif//GLM_MESSAGE + +#include "./core/_detail.hpp" +#include "./core/_vectorize.hpp" +#include "./core/type.hpp" + +#include "./core/func_trigonometric.hpp" +#include "./core/func_exponential.hpp" +#include "./core/func_common.hpp" +#include "./core/func_packing.hpp" +#include "./core/func_geometric.hpp" +#include "./core/func_matrix.hpp" +#include "./core/func_vector_relational.hpp" +#include "./core/func_integer.hpp" +#include "./core/func_noise.hpp" +#include "./core/_swizzle.hpp" + +//////////////////// +// check type sizes +#ifndef GLM_STATIC_ASSERT_NULL + GLM_STATIC_ASSERT(sizeof(glm::detail::int8) == 1, "int8 size isn't 1 byte on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::int16) == 2, "int16 size isn't 2 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::int32) == 4, "int32 size isn't 4 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::int64) == 8, "int64 size isn't 8 bytes on this platform"); + + GLM_STATIC_ASSERT(sizeof(glm::detail::uint8) == 1, "uint8 size isn't 1 byte on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::uint16) == 2, "uint16 size isn't 2 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::uint32) == 4, "uint32 size isn't 4 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::uint64) == 8, "uint64 size isn't 8 bytes on this platform"); + + GLM_STATIC_ASSERT(sizeof(glm::detail::float16) == 2, "float16 size isn't 2 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::float32) == 4, "float32 size isn't 4 bytes on this platform"); + GLM_STATIC_ASSERT(sizeof(glm::detail::float64) == 8, "float64 size isn't 8 bytes on this platform"); +#endif//GLM_STATIC_ASSERT_NULL + +#endif//glm_glm diff --git a/include/gal/opengl/glm/gtc/constants.hpp b/include/gal/opengl/glm/gtc/constants.hpp index 3fcc22673e..eba10219f4 100644 --- a/include/gal/opengl/glm/gtc/constants.hpp +++ b/include/gal/opengl/glm/gtc/constants.hpp @@ -1,186 +1,186 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_constants -/// @file glm/gtc/constants.hpp -/// @date 2011-09-30 / 2012-01-25 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtc_half_float (dependence) -/// -/// @defgroup gtc_constants GLM_GTC_constants -/// @ingroup gtc -/// -/// @brief Allow to perform bit operations on integer values -/// -/// need to be included to use these features. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTC_constants -#define GLM_GTC_constants GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtc/half_float.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTC_constants extension included") -#endif - -namespace glm -{ - /// @addtogroup gtc_constants - /// @{ - - /// Return the epsilon constant for floating point types. - /// @todo Implement epsilon for half-precision floating point type. - /// @see gtc_constants - template - genType epsilon(); - - /// Return 0. - /// @see gtc_constants - template - genType zero(); - - /// Return 1. - /// @see gtc_constants - template - genType one(); - - /// Return the pi constant. - /// @see gtc_constants - template - genType pi(); - - /// Return square root of pi. - /// @see gtc_constants - template - genType root_pi(); - - /// Return pi / 2. - /// @see gtc_constants - template - genType half_pi(); - - /// Return pi / 4. - /// @see gtc_constants - template - genType quarter_pi(); - - /// Return 1 / pi. - /// @see gtc_constants - template - genType one_over_pi(); - - /// Return 2 / pi. - /// @see gtc_constants - template - genType two_over_pi(); - - /// Return 2 / sqrt(pi). - /// @see gtc_constants - template - genType two_over_root_pi(); - - /// Return 1 / sqrt(2). - /// @see gtc_constants - template - genType one_over_root_two(); - - /// Return sqrt(pi / 2). - /// @see gtc_constants - template - genType root_half_pi(); - - /// Return sqrt(2 * pi). - /// @see gtc_constants - template - genType root_two_pi(); - - /// Return sqrt(ln(4)). - /// @see gtc_constants - template - genType root_ln_four(); - - /// Return e constant. - /// @see gtc_constants - template - genType e(); - - /// Return Euler's constant. - /// @see gtc_constants - template - genType euler(); - - /// Return sqrt(2). - /// @see gtc_constants - template - genType root_two(); - - /// Return sqrt(3). - /// @see gtc_constants - template - genType root_three(); - - /// Return sqrt(5). - /// @see gtc_constants - template - genType root_five(); - - /// Return ln(2). - /// @see gtc_constants - template - genType ln_two(); - - /// Return ln(10). - /// @see gtc_constants - template - genType ln_ten(); - - /// Return ln(ln(2)). - /// @see gtc_constants - template - genType ln_ln_two(); - - /// Return 1 / 3. - /// @see gtc_constants - template - genType third(); - - /// Return 2 / 3. - /// @see gtc_constants - template - genType two_thirds(); - - /// Return the golden ratio constant. - /// @see gtc_constants - template - genType golden_ratio(); - - /// @} -} //namespace glm - -#include "constants.inl" - -#endif//GLM_GTC_constants +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_constants +/// @file glm/gtc/constants.hpp +/// @date 2011-09-30 / 2012-01-25 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_half_float (dependence) +/// +/// @defgroup gtc_constants GLM_GTC_constants +/// @ingroup gtc +/// +/// @brief Allow to perform bit operations on integer values +/// +/// need to be included to use these features. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_constants +#define GLM_GTC_constants GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_constants extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_constants + /// @{ + + /// Return the epsilon constant for floating point types. + /// @todo Implement epsilon for half-precision floating point type. + /// @see gtc_constants + template + genType epsilon(); + + /// Return 0. + /// @see gtc_constants + template + genType zero(); + + /// Return 1. + /// @see gtc_constants + template + genType one(); + + /// Return the pi constant. + /// @see gtc_constants + template + genType pi(); + + /// Return square root of pi. + /// @see gtc_constants + template + genType root_pi(); + + /// Return pi / 2. + /// @see gtc_constants + template + genType half_pi(); + + /// Return pi / 4. + /// @see gtc_constants + template + genType quarter_pi(); + + /// Return 1 / pi. + /// @see gtc_constants + template + genType one_over_pi(); + + /// Return 2 / pi. + /// @see gtc_constants + template + genType two_over_pi(); + + /// Return 2 / sqrt(pi). + /// @see gtc_constants + template + genType two_over_root_pi(); + + /// Return 1 / sqrt(2). + /// @see gtc_constants + template + genType one_over_root_two(); + + /// Return sqrt(pi / 2). + /// @see gtc_constants + template + genType root_half_pi(); + + /// Return sqrt(2 * pi). + /// @see gtc_constants + template + genType root_two_pi(); + + /// Return sqrt(ln(4)). + /// @see gtc_constants + template + genType root_ln_four(); + + /// Return e constant. + /// @see gtc_constants + template + genType e(); + + /// Return Euler's constant. + /// @see gtc_constants + template + genType euler(); + + /// Return sqrt(2). + /// @see gtc_constants + template + genType root_two(); + + /// Return sqrt(3). + /// @see gtc_constants + template + genType root_three(); + + /// Return sqrt(5). + /// @see gtc_constants + template + genType root_five(); + + /// Return ln(2). + /// @see gtc_constants + template + genType ln_two(); + + /// Return ln(10). + /// @see gtc_constants + template + genType ln_ten(); + + /// Return ln(ln(2)). + /// @see gtc_constants + template + genType ln_ln_two(); + + /// Return 1 / 3. + /// @see gtc_constants + template + genType third(); + + /// Return 2 / 3. + /// @see gtc_constants + template + genType two_thirds(); + + /// Return the golden ratio constant. + /// @see gtc_constants + template + genType golden_ratio(); + + /// @} +} //namespace glm + +#include "constants.inl" + +#endif//GLM_GTC_constants diff --git a/include/gal/opengl/glm/gtc/constants.inl b/include/gal/opengl/glm/gtc/constants.inl index 38abf26167..afe3ddf8b1 100644 --- a/include/gal/opengl/glm/gtc/constants.inl +++ b/include/gal/opengl/glm/gtc/constants.inl @@ -1,186 +1,186 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_constants -/// @file glm/gtx/constants.inl -/// @date 2011-10-14 / 2012-01-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER genType epsilon() - { - return std::numeric_limits::epsilon(); - } - - template <> - GLM_FUNC_QUALIFIER half epsilon() - { - return half(1.19209290e-007); - } - - template - GLM_FUNC_QUALIFIER genType zero() - { - return genType(0); - } - - template - GLM_FUNC_QUALIFIER genType one() - { - return genType(1); - } - - template - GLM_FUNC_QUALIFIER genType pi() - { - return genType(3.14159265358979323846264338327950288); - } - - template - GLM_FUNC_QUALIFIER genType root_pi() - { - return genType(1.772453850905516027); - } - - template - GLM_FUNC_QUALIFIER genType half_pi() - { - return genType(1.57079632679489661923132169163975144); - } - - template - GLM_FUNC_QUALIFIER genType quarter_pi() - { - return genType(0.785398163397448309615660845819875721); - } - - template - GLM_FUNC_QUALIFIER genType one_over_pi() - { - return genType(0.318309886183790671537767526745028724); - } - - template - GLM_FUNC_QUALIFIER genType two_over_pi() - { - return genType(0.636619772367581343075535053490057448); - } - - template - GLM_FUNC_QUALIFIER genType two_over_root_pi() - { - return genType(1.12837916709551257389615890312154517); - } - - template - GLM_FUNC_QUALIFIER genType one_over_root_two() - { - return genType(0.707106781186547524400844362104849039); - } - - template - GLM_FUNC_QUALIFIER genType root_half_pi() - { - return genType(1.253314137315500251); - } - - template - GLM_FUNC_QUALIFIER genType root_two_pi() - { - return genType(2.506628274631000502); - } - - template - GLM_FUNC_QUALIFIER genType root_ln_four() - { - return genType(1.17741002251547469); - } - - template - GLM_FUNC_QUALIFIER genType e() - { - return genType(2.71828182845904523536); - } - - template - GLM_FUNC_QUALIFIER genType euler() - { - return genType(0.577215664901532860606); - } - - template - GLM_FUNC_QUALIFIER genType root_two() - { - return genType(1.41421356237309504880168872420969808); - } - - template - GLM_FUNC_QUALIFIER genType root_three() - { - return genType(1.73205080756887729352744634150587236); - } - - template - GLM_FUNC_QUALIFIER genType root_five() - { - return genType(2.23606797749978969640917366873127623); - } - - template - GLM_FUNC_QUALIFIER genType ln_two() - { - return genType(0.693147180559945309417232121458176568); - } - - template - GLM_FUNC_QUALIFIER genType ln_ten() - { - return genType(2.30258509299404568401799145468436421); - } - - template - GLM_FUNC_QUALIFIER genType ln_ln_two() - { - return genType(-0.3665129205816643); - } - - template - GLM_FUNC_QUALIFIER genType third() - { - return genType(0.3333333333333333333333333333333333333333); - } - - template - GLM_FUNC_QUALIFIER genType two_thirds() - { - return genType(0.666666666666666666666666666666666666667); - } - - template - GLM_FUNC_QUALIFIER genType golden_ratio() - { - return genType(1.61803398874989484820458683436563811); - } -} //namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_constants +/// @file glm/gtx/constants.inl +/// @date 2011-10-14 / 2012-01-25 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER genType epsilon() + { + return std::numeric_limits::epsilon(); + } + + template <> + GLM_FUNC_QUALIFIER half epsilon() + { + return half(1.19209290e-007); + } + + template + GLM_FUNC_QUALIFIER genType zero() + { + return genType(0); + } + + template + GLM_FUNC_QUALIFIER genType one() + { + return genType(1); + } + + template + GLM_FUNC_QUALIFIER genType pi() + { + return genType(3.14159265358979323846264338327950288); + } + + template + GLM_FUNC_QUALIFIER genType root_pi() + { + return genType(1.772453850905516027); + } + + template + GLM_FUNC_QUALIFIER genType half_pi() + { + return genType(1.57079632679489661923132169163975144); + } + + template + GLM_FUNC_QUALIFIER genType quarter_pi() + { + return genType(0.785398163397448309615660845819875721); + } + + template + GLM_FUNC_QUALIFIER genType one_over_pi() + { + return genType(0.318309886183790671537767526745028724); + } + + template + GLM_FUNC_QUALIFIER genType two_over_pi() + { + return genType(0.636619772367581343075535053490057448); + } + + template + GLM_FUNC_QUALIFIER genType two_over_root_pi() + { + return genType(1.12837916709551257389615890312154517); + } + + template + GLM_FUNC_QUALIFIER genType one_over_root_two() + { + return genType(0.707106781186547524400844362104849039); + } + + template + GLM_FUNC_QUALIFIER genType root_half_pi() + { + return genType(1.253314137315500251); + } + + template + GLM_FUNC_QUALIFIER genType root_two_pi() + { + return genType(2.506628274631000502); + } + + template + GLM_FUNC_QUALIFIER genType root_ln_four() + { + return genType(1.17741002251547469); + } + + template + GLM_FUNC_QUALIFIER genType e() + { + return genType(2.71828182845904523536); + } + + template + GLM_FUNC_QUALIFIER genType euler() + { + return genType(0.577215664901532860606); + } + + template + GLM_FUNC_QUALIFIER genType root_two() + { + return genType(1.41421356237309504880168872420969808); + } + + template + GLM_FUNC_QUALIFIER genType root_three() + { + return genType(1.73205080756887729352744634150587236); + } + + template + GLM_FUNC_QUALIFIER genType root_five() + { + return genType(2.23606797749978969640917366873127623); + } + + template + GLM_FUNC_QUALIFIER genType ln_two() + { + return genType(0.693147180559945309417232121458176568); + } + + template + GLM_FUNC_QUALIFIER genType ln_ten() + { + return genType(2.30258509299404568401799145468436421); + } + + template + GLM_FUNC_QUALIFIER genType ln_ln_two() + { + return genType(-0.3665129205816643); + } + + template + GLM_FUNC_QUALIFIER genType third() + { + return genType(0.3333333333333333333333333333333333333333); + } + + template + GLM_FUNC_QUALIFIER genType two_thirds() + { + return genType(0.666666666666666666666666666666666666667); + } + + template + GLM_FUNC_QUALIFIER genType golden_ratio() + { + return genType(1.61803398874989484820458683436563811); + } +} //namespace glm diff --git a/include/gal/opengl/glm/gtc/epsilon.hpp b/include/gal/opengl/glm/gtc/epsilon.hpp index 57cbbbd55b..eab8336d7f 100644 --- a/include/gal/opengl/glm/gtc/epsilon.hpp +++ b/include/gal/opengl/glm/gtc/epsilon.hpp @@ -1,94 +1,94 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_epsilon -/// @file glm/gtc/epsilon.hpp -/// @date 2012-04-07 / 2012-04-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtc_half_float (dependence) -/// @see gtc_quaternion (dependence) -/// -/// @defgroup gtc_epsilon GLM_GTC_epsilon -/// @ingroup gtc -/// -/// @brief Comparison functions for a user defined epsilon values. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTC_epsilon -#define GLM_GTC_epsilon GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtc/half_float.hpp" -#include "../gtc/quaternion.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTC_epsilon extension included") -#endif - -namespace glm -{ - /// @addtogroup gtc_epsilon - /// @{ - - /// Returns the component-wise compare of |x - y| < epsilon. - /// @see gtc_epsilon - template - typename genType::boolType epsilonEqual( - genType const & x, - genType const & y, - typename genType::value_type const & epsilon); - - /// Returns the component-wise compare of |x - y| < epsilon. - /// @see gtc_epsilon - template - typename genType::boolType epsilonEqual( - genType const & x, - genType const & y, - genType const & epsilon); - - /// Returns the component-wise compare of |x - y| < epsilon. - /// @see gtc_epsilon - template - typename genType::boolType epsilonNotEqual( - genType const & x, - genType const & y, - typename genType::value_type const & epsilon); - - /// Returns the component-wise compare of |x - y| >= epsilon. - /// @see gtc_epsilon - template - typename genType::boolType epsilonNotEqual( - genType const & x, - genType const & y, - genType const & epsilon); - - /// @} -}//namespace glm - -#include "epsilon.inl" - -#endif//GLM_GTC_epsilon +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_epsilon +/// @file glm/gtc/epsilon.hpp +/// @date 2012-04-07 / 2012-04-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_half_float (dependence) +/// @see gtc_quaternion (dependence) +/// +/// @defgroup gtc_epsilon GLM_GTC_epsilon +/// @ingroup gtc +/// +/// @brief Comparison functions for a user defined epsilon values. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_epsilon +#define GLM_GTC_epsilon GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" +#include "../gtc/quaternion.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_epsilon extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_epsilon + /// @{ + + /// Returns the component-wise compare of |x - y| < epsilon. + /// @see gtc_epsilon + template + typename genType::boolType epsilonEqual( + genType const & x, + genType const & y, + typename genType::value_type const & epsilon); + + /// Returns the component-wise compare of |x - y| < epsilon. + /// @see gtc_epsilon + template + typename genType::boolType epsilonEqual( + genType const & x, + genType const & y, + genType const & epsilon); + + /// Returns the component-wise compare of |x - y| < epsilon. + /// @see gtc_epsilon + template + typename genType::boolType epsilonNotEqual( + genType const & x, + genType const & y, + typename genType::value_type const & epsilon); + + /// Returns the component-wise compare of |x - y| >= epsilon. + /// @see gtc_epsilon + template + typename genType::boolType epsilonNotEqual( + genType const & x, + genType const & y, + genType const & epsilon); + + /// @} +}//namespace glm + +#include "epsilon.inl" + +#endif//GLM_GTC_epsilon diff --git a/include/gal/opengl/glm/gtc/epsilon.inl b/include/gal/opengl/glm/gtc/epsilon.inl index 2a235553bc..6faef7113d 100644 --- a/include/gal/opengl/glm/gtc/epsilon.inl +++ b/include/gal/opengl/glm/gtc/epsilon.inl @@ -1,286 +1,286 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_epsilon -/// @file glm/gtc/epsilon.inl -/// @date 2012-04-07 / 2012-04-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - GLM_FUNC_QUALIFIER bool epsilonEqual - ( - glm::half const & x, - glm::half const & y, - glm::half const & epsilon - ) - { - return abs(x - y) < epsilon; - } - - GLM_FUNC_QUALIFIER bool epsilonEqual - ( - float const & x, - float const & y, - float const & epsilon - ) - { - return abs(x - y) < epsilon; - } - - GLM_FUNC_QUALIFIER bool epsilonEqual - ( - double const & x, - double const & y, - double const & epsilon - ) - { - return abs(x - y) < epsilon; - } - - GLM_FUNC_QUALIFIER bool epsilonNotEqual - ( - glm::half const & x, - glm::half const & y, - glm::half const & epsilon - ) - { - return abs(x - y) >= epsilon; - } - - GLM_FUNC_QUALIFIER bool epsilonNotEqual - ( - float const & x, - float const & y, - float const & epsilon - ) - { - return abs(x - y) >= epsilon; - } - - GLM_FUNC_QUALIFIER bool epsilonNotEqual - ( - double const & x, - double const & y, - double const & epsilon - ) - { - return abs(x - y) >= epsilon; - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 epsilonEqual - ( - detail::tvec2 const & x, - detail::tvec2 const & y, - valType const & epsilon) - { - return detail::tvec2( - abs(x.x - y.x) < epsilon, - abs(x.y - y.y) < epsilon); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 epsilonEqual - ( - detail::tvec2 const & x, - detail::tvec2 const & y, - detail::tvec2 const & epsilon - ) - { - return detail::tvec2( - abs(x.x - y.x) < epsilon.x, - abs(x.y - y.y) < epsilon.y); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 epsilonEqual - ( - detail::tvec3 const & x, - detail::tvec3 const & y, - valType const & epsilon) - { - return detail::tvec3( - abs(x.x - y.x) < epsilon, - abs(x.y - y.y) < epsilon, - abs(x.z - y.z) < epsilon); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 epsilonEqual - ( - detail::tvec3 const & x, - detail::tvec3 const & y, - detail::tvec3 const & epsilon - ) - { - return detail::tvec3( - abs(x.x - y.x) < epsilon.x, - abs(x.y - y.y) < epsilon.y, - abs(x.z - y.z) < epsilon.z); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 epsilonEqual - ( - detail::tvec4 const & x, - detail::tvec4 const & y, - valType const & epsilon - ) - { - return detail::tvec4( - abs(x.x - y.x) < epsilon, - abs(x.y - y.y) < epsilon, - abs(x.z - y.z) < epsilon, - abs(x.w - y.w) < epsilon); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 epsilonEqual - ( - detail::tvec4 const & x, - detail::tvec4 const & y, - detail::tvec4 const & epsilon - ) - { - return detail::tvec4( - abs(x.x - y.x) < epsilon.x, - abs(x.y - y.y) < epsilon.y, - abs(x.z - y.z) < epsilon.z, - abs(x.w - y.w) < epsilon.w); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 epsilonNotEqual - ( - detail::tvec2 const & x, - detail::tvec2 const & y, - valType const & epsilon - ) - { - return detail::tvec2( - abs(x.x - y.x) >= epsilon, - abs(x.y - y.y) >= epsilon); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 epsilonNotEqual - ( - detail::tvec2 const & x, - detail::tvec2 const & y, - detail::tvec2 const & epsilon - ) - { - return detail::tvec2( - abs(x.x - y.x) >= epsilon.x, - abs(x.y - y.y) >= epsilon.y); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 epsilonNotEqual - ( - detail::tvec3 const & x, - detail::tvec3 const & y, - valType const & epsilon - ) - { - return detail::tvec3( - abs(x.x - y.x) >= epsilon, - abs(x.y - y.y) >= epsilon, - abs(x.z - y.z) >= epsilon); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 epsilonNotEqual - ( - detail::tvec3 const & x, - detail::tvec3 const & y, - detail::tvec3 const & epsilon - ) - { - return detail::tvec3( - abs(x.x - y.x) >= epsilon.x, - abs(x.y - y.y) >= epsilon.y, - abs(x.z - y.z) >= epsilon.z); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 epsilonNotEqual - ( - detail::tvec4 const & x, - detail::tvec4 const & y, - valType const & epsilon - ) - { - return detail::tvec4( - abs(x.x - y.x) >= epsilon, - abs(x.y - y.y) >= epsilon, - abs(x.z - y.z) >= epsilon, - abs(x.w - y.w) >= epsilon); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 epsilonNotEqual - ( - detail::tvec4 const & x, - detail::tvec4 const & y, - detail::tvec4 const & epsilon - ) - { - return detail::tvec4( - abs(x.x - y.x) >= epsilon.x, - abs(x.y - y.y) >= epsilon.y, - abs(x.z - y.z) >= epsilon.z, - abs(x.w - y.w) >= epsilon.w); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 epsilonEqual - ( - detail::tquat const & x, - detail::tquat const & y, - valType const & epsilon - ) - { - return detail::tvec4( - abs(x.x - y.x) < epsilon, - abs(x.y - y.y) < epsilon, - abs(x.z - y.z) < epsilon, - abs(x.w - y.w) < epsilon); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 epsilonNotEqual - ( - detail::tquat const & x, - detail::tquat const & y, - valType const & epsilon - ) - { - return detail::tvec4( - abs(x.x - y.x) >= epsilon, - abs(x.y - y.y) >= epsilon, - abs(x.z - y.z) >= epsilon, - abs(x.w - y.w) >= epsilon); - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_epsilon +/// @file glm/gtc/epsilon.inl +/// @date 2012-04-07 / 2012-04-07 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + GLM_FUNC_QUALIFIER bool epsilonEqual + ( + glm::half const & x, + glm::half const & y, + glm::half const & epsilon + ) + { + return abs(x - y) < epsilon; + } + + GLM_FUNC_QUALIFIER bool epsilonEqual + ( + float const & x, + float const & y, + float const & epsilon + ) + { + return abs(x - y) < epsilon; + } + + GLM_FUNC_QUALIFIER bool epsilonEqual + ( + double const & x, + double const & y, + double const & epsilon + ) + { + return abs(x - y) < epsilon; + } + + GLM_FUNC_QUALIFIER bool epsilonNotEqual + ( + glm::half const & x, + glm::half const & y, + glm::half const & epsilon + ) + { + return abs(x - y) >= epsilon; + } + + GLM_FUNC_QUALIFIER bool epsilonNotEqual + ( + float const & x, + float const & y, + float const & epsilon + ) + { + return abs(x - y) >= epsilon; + } + + GLM_FUNC_QUALIFIER bool epsilonNotEqual + ( + double const & x, + double const & y, + double const & epsilon + ) + { + return abs(x - y) >= epsilon; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 epsilonEqual + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + valType const & epsilon) + { + return detail::tvec2( + abs(x.x - y.x) < epsilon, + abs(x.y - y.y) < epsilon); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 epsilonEqual + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 const & epsilon + ) + { + return detail::tvec2( + abs(x.x - y.x) < epsilon.x, + abs(x.y - y.y) < epsilon.y); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 epsilonEqual + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + valType const & epsilon) + { + return detail::tvec3( + abs(x.x - y.x) < epsilon, + abs(x.y - y.y) < epsilon, + abs(x.z - y.z) < epsilon); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 epsilonEqual + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 const & epsilon + ) + { + return detail::tvec3( + abs(x.x - y.x) < epsilon.x, + abs(x.y - y.y) < epsilon.y, + abs(x.z - y.z) < epsilon.z); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 epsilonEqual + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + valType const & epsilon + ) + { + return detail::tvec4( + abs(x.x - y.x) < epsilon, + abs(x.y - y.y) < epsilon, + abs(x.z - y.z) < epsilon, + abs(x.w - y.w) < epsilon); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 epsilonEqual + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 const & epsilon + ) + { + return detail::tvec4( + abs(x.x - y.x) < epsilon.x, + abs(x.y - y.y) < epsilon.y, + abs(x.z - y.z) < epsilon.z, + abs(x.w - y.w) < epsilon.w); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 epsilonNotEqual + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + valType const & epsilon + ) + { + return detail::tvec2( + abs(x.x - y.x) >= epsilon, + abs(x.y - y.y) >= epsilon); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 epsilonNotEqual + ( + detail::tvec2 const & x, + detail::tvec2 const & y, + detail::tvec2 const & epsilon + ) + { + return detail::tvec2( + abs(x.x - y.x) >= epsilon.x, + abs(x.y - y.y) >= epsilon.y); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 epsilonNotEqual + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + valType const & epsilon + ) + { + return detail::tvec3( + abs(x.x - y.x) >= epsilon, + abs(x.y - y.y) >= epsilon, + abs(x.z - y.z) >= epsilon); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 epsilonNotEqual + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 const & epsilon + ) + { + return detail::tvec3( + abs(x.x - y.x) >= epsilon.x, + abs(x.y - y.y) >= epsilon.y, + abs(x.z - y.z) >= epsilon.z); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 epsilonNotEqual + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + valType const & epsilon + ) + { + return detail::tvec4( + abs(x.x - y.x) >= epsilon, + abs(x.y - y.y) >= epsilon, + abs(x.z - y.z) >= epsilon, + abs(x.w - y.w) >= epsilon); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 epsilonNotEqual + ( + detail::tvec4 const & x, + detail::tvec4 const & y, + detail::tvec4 const & epsilon + ) + { + return detail::tvec4( + abs(x.x - y.x) >= epsilon.x, + abs(x.y - y.y) >= epsilon.y, + abs(x.z - y.z) >= epsilon.z, + abs(x.w - y.w) >= epsilon.w); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 epsilonEqual + ( + detail::tquat const & x, + detail::tquat const & y, + valType const & epsilon + ) + { + return detail::tvec4( + abs(x.x - y.x) < epsilon, + abs(x.y - y.y) < epsilon, + abs(x.z - y.z) < epsilon, + abs(x.w - y.w) < epsilon); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 epsilonNotEqual + ( + detail::tquat const & x, + detail::tquat const & y, + valType const & epsilon + ) + { + return detail::tvec4( + abs(x.x - y.x) >= epsilon, + abs(x.y - y.y) >= epsilon, + abs(x.z - y.z) >= epsilon, + abs(x.w - y.w) >= epsilon); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtc/half_float.hpp b/include/gal/opengl/glm/gtc/half_float.hpp index 32049769a2..d256a49b99 100644 --- a/include/gal/opengl/glm/gtc/half_float.hpp +++ b/include/gal/opengl/glm/gtc/half_float.hpp @@ -1,440 +1,440 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_half_float -/// @file glm/gtc/half_float.hpp -/// @date 2009-04-29 / 2012-11-06 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtc_half_float GLM_GTC_half_float -/// @ingroup gtc -/// -/// Defines the half-precision floating-point type, along with various typedefs for vectors and matrices. -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTC_half_float -#define GLM_GTC_half_float GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTC_half_float extension included") -#endif - -namespace glm{ -namespace detail -{ -#if(GLM_COMPONENT == GLM_COMPONENT_CXX98) - template <> - struct tvec2 - { - enum ctor{null}; - typedef half value_type; - typedef std::size_t size_type; - - GLM_FUNC_DECL size_type length() const; - static GLM_FUNC_DECL size_type value_size(); - - typedef tvec2 type; - typedef tvec2 bool_type; - - ////////////////////////////////////// - // Data - - half x, y; - - ////////////////////////////////////// - // Accesses - - half & operator[](size_type i); - half const & operator[](size_type i) const; - - ////////////////////////////////////// - // Implicit basic constructors - - tvec2(); - tvec2(tvec2 const & v); - - ////////////////////////////////////// - // Explicit basic constructors - - explicit tvec2(ctor); - explicit tvec2( - half const & s); - explicit tvec2( - half const & s1, - half const & s2); - - ////////////////////////////////////// - // Swizzle constructors - - tvec2(tref2 const & r); - - ////////////////////////////////////// - // Convertion scalar constructors - - //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec2(U const & x); - //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec2(U const & x, V const & y); - - ////////////////////////////////////// - // Convertion vector constructors - - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec2(tvec2 const & v); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec2(tvec3 const & v); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec2(tvec4 const & v); - - ////////////////////////////////////// - // Unary arithmetic operators - - tvec2& operator= (tvec2 const & v); - - tvec2& operator+=(half const & s); - tvec2& operator+=(tvec2 const & v); - tvec2& operator-=(half const & s); - tvec2& operator-=(tvec2 const & v); - tvec2& operator*=(half const & s); - tvec2& operator*=(tvec2 const & v); - tvec2& operator/=(half const & s); - tvec2& operator/=(tvec2 const & v); - tvec2& operator++(); - tvec2& operator--(); - - ////////////////////////////////////// - // Swizzle operators - - half swizzle(comp X) const; - tvec2 swizzle(comp X, comp Y) const; - tvec3 swizzle(comp X, comp Y, comp Z) const; - tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; - tref2 swizzle(comp X, comp Y); - }; - - template <> - struct tvec3 - { - enum ctor{null}; - typedef half value_type; - typedef std::size_t size_type; - GLM_FUNC_DECL size_type length() const; - static GLM_FUNC_DECL size_type value_size(); - - typedef tvec3 type; - typedef tvec3 bool_type; - - ////////////////////////////////////// - // Data - - half x, y, z; - - ////////////////////////////////////// - // Accesses - - half & operator[](size_type i); - half const & operator[](size_type i) const; - - ////////////////////////////////////// - // Implicit basic constructors - - tvec3(); - tvec3(tvec3 const & v); - - ////////////////////////////////////// - // Explicit basic constructors - - explicit tvec3(ctor); - explicit tvec3( - half const & s); - explicit tvec3( - half const & s1, - half const & s2, - half const & s3); - - ////////////////////////////////////// - // Swizzle constructors - - tvec3(tref3 const & r); - - ////////////////////////////////////// - // Convertion scalar constructors - - //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec3(U const & x); - //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec3(U const & x, V const & y, W const & z); - - ////////////////////////////////////// - // Convertion vector constructors - - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec3(tvec2 const & v, B const & s); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec3(A const & s, tvec2 const & v); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec3(tvec3 const & v); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec3(tvec4 const & v); - - ////////////////////////////////////// - // Unary arithmetic operators - - tvec3& operator= (tvec3 const & v); - - tvec3& operator+=(half const & s); - tvec3& operator+=(tvec3 const & v); - tvec3& operator-=(half const & s); - tvec3& operator-=(tvec3 const & v); - tvec3& operator*=(half const & s); - tvec3& operator*=(tvec3 const & v); - tvec3& operator/=(half const & s); - tvec3& operator/=(tvec3 const & v); - tvec3& operator++(); - tvec3& operator--(); - - ////////////////////////////////////// - // Swizzle operators - - half swizzle(comp X) const; - tvec2 swizzle(comp X, comp Y) const; - tvec3 swizzle(comp X, comp Y, comp Z) const; - tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; - tref3 swizzle(comp X, comp Y, comp Z); - }; - - template <> - struct tvec4 - { - enum ctor{null}; - typedef half value_type; - typedef std::size_t size_type; - GLM_FUNC_DECL size_type length() const; - static GLM_FUNC_DECL size_type value_size(); - - typedef tvec4 type; - typedef tvec4 bool_type; - - ////////////////////////////////////// - // Data - - half x, y, z, w; - - ////////////////////////////////////// - // Accesses - - half & operator[](size_type i); - half const & operator[](size_type i) const; - - ////////////////////////////////////// - // Implicit basic constructors - - tvec4(); - tvec4(tvec4 const & v); - - ////////////////////////////////////// - // Explicit basic constructors - - explicit tvec4(ctor); - explicit tvec4( - half const & s); - explicit tvec4( - half const & s0, - half const & s1, - half const & s2, - half const & s3); - - ////////////////////////////////////// - // Swizzle constructors - - tvec4(tref4 const & r); - - ////////////////////////////////////// - // Convertion scalar constructors - - //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec4(U const & x); - //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec4(A const & x, B const & y, C const & z, D const & w); - - ////////////////////////////////////// - // Convertion vector constructors - - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec4(tvec2 const & v, B const & s1, C const & s2); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec4(A const & s1, tvec2 const & v, C const & s2); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec4(A const & s1, B const & s2, tvec2 const & v); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec4(tvec3 const & v, B const & s); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec4(A const & s, tvec3 const & v); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec4(tvec2 const & v1, tvec2 const & v2); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec4(tvec4 const & v); - - ////////////////////////////////////// - // Unary arithmetic operators - - tvec4& operator= (tvec4 const & v); - - tvec4& operator+=(half const & s); - tvec4& operator+=(tvec4 const & v); - tvec4& operator-=(half const & s); - tvec4& operator-=(tvec4 const & v); - tvec4& operator*=(half const & s); - tvec4& operator*=(tvec4 const & v); - tvec4& operator/=(half const & s); - tvec4& operator/=(tvec4 const & v); - tvec4& operator++(); - tvec4& operator--(); - - ////////////////////////////////////// - // Swizzle operators - - half swizzle(comp X) const; - tvec2 swizzle(comp X, comp Y) const; - tvec3 swizzle(comp X, comp Y, comp Z) const; - tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; - tref4 swizzle(comp X, comp Y, comp Z, comp W); - }; -#endif//(GLM_COMPONENT == GLM_COMPONENT_CXX98) -} -//namespace detail - - /// @addtogroup gtc_half_float - /// @{ - - /// Type for half-precision floating-point numbers. - /// @see gtc_half_float - typedef detail::half half; - - /// Vector of 2 half-precision floating-point numbers. - /// @see gtc_half_float - typedef detail::tvec2 hvec2; - - /// Vector of 3 half-precision floating-point numbers. - /// @see gtc_half_float - typedef detail::tvec3 hvec3; - - /// Vector of 4 half-precision floating-point numbers. - /// @see gtc_half_float - typedef detail::tvec4 hvec4; - - /// 2 * 2 matrix of half-precision floating-point numbers. - /// @see gtc_half_float - typedef detail::tmat2x2 hmat2; - - /// 3 * 3 matrix of half-precision floating-point numbers. - /// @see gtc_half_float - typedef detail::tmat3x3 hmat3; - - /// 4 * 4 matrix of half-precision floating-point numbers. - /// @see gtc_half_float - typedef detail::tmat4x4 hmat4; - - /// 2 * 2 matrix of half-precision floating-point numbers. - /// @see gtc_half_float - typedef detail::tmat2x2 hmat2x2; - - /// 2 * 3 matrix of half-precision floating-point numbers. - /// @see gtc_half_float - typedef detail::tmat2x3 hmat2x3; - - /// 2 * 4 matrix of half-precision floating-point numbers. - /// @see gtc_half_float - typedef detail::tmat2x4 hmat2x4; - - /// 3 * 2 matrix of half-precision floating-point numbers. - /// @see gtc_half_float - typedef detail::tmat3x2 hmat3x2; - - /// 3 * 3 matrix of half-precision floating-point numbers. - /// @see gtc_half_float - typedef detail::tmat3x3 hmat3x3; - - /// 3 * 4 matrix of half-precision floating-point numbers. - /// @see gtc_half_float - typedef detail::tmat3x4 hmat3x4; - - /// 4 * 2 matrix of half-precision floating-point numbers. - /// @see gtc_half_float - typedef detail::tmat4x2 hmat4x2; - - /// 4 * 3 matrix of half-precision floating-point numbers. - /// @see gtc_half_float - typedef detail::tmat4x3 hmat4x3; - - /// 4 * 4 matrix of half-precision floating-point numbers. - /// @see gtc_half_float - typedef detail::tmat4x4 hmat4x4; - - /// Returns the absolute value of a half-precision floating-point value - /// @see gtc_half_float - half abs(half const & x); - - /// Returns the absolute value of a half-precision floating-point two dimensional vector - /// @see gtc_half_float - hvec2 abs(hvec2 const & x); - - /// Returns the absolute value of a half-precision floating-point three dimensional vector - /// @see gtc_half_float - hvec3 abs(hvec3 const & x); - - /// Returns the absolute value of a half-precision floating-point four dimensional vector - /// @see gtc_half_float - hvec4 abs(hvec4 const & x); - - /// @} -}// namespace glm - -#include "half_float.inl" - -#endif//GLM_GTC_half_float +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_half_float +/// @file glm/gtc/half_float.hpp +/// @date 2009-04-29 / 2012-11-06 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtc_half_float GLM_GTC_half_float +/// @ingroup gtc +/// +/// Defines the half-precision floating-point type, along with various typedefs for vectors and matrices. +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_half_float +#define GLM_GTC_half_float GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_half_float extension included") +#endif + +namespace glm{ +namespace detail +{ +#if(GLM_COMPONENT == GLM_COMPONENT_CXX98) + template <> + struct tvec2 + { + enum ctor{null}; + typedef half value_type; + typedef std::size_t size_type; + + GLM_FUNC_DECL size_type length() const; + static GLM_FUNC_DECL size_type value_size(); + + typedef tvec2 type; + typedef tvec2 bool_type; + + ////////////////////////////////////// + // Data + + half x, y; + + ////////////////////////////////////// + // Accesses + + half & operator[](size_type i); + half const & operator[](size_type i) const; + + ////////////////////////////////////// + // Implicit basic constructors + + tvec2(); + tvec2(tvec2 const & v); + + ////////////////////////////////////// + // Explicit basic constructors + + explicit tvec2(ctor); + explicit tvec2( + half const & s); + explicit tvec2( + half const & s1, + half const & s2); + + ////////////////////////////////////// + // Swizzle constructors + + tvec2(tref2 const & r); + + ////////////////////////////////////// + // Convertion scalar constructors + + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec2(U const & x); + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec2(U const & x, V const & y); + + ////////////////////////////////////// + // Convertion vector constructors + + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec2(tvec2 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec2(tvec3 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec2(tvec4 const & v); + + ////////////////////////////////////// + // Unary arithmetic operators + + tvec2& operator= (tvec2 const & v); + + tvec2& operator+=(half const & s); + tvec2& operator+=(tvec2 const & v); + tvec2& operator-=(half const & s); + tvec2& operator-=(tvec2 const & v); + tvec2& operator*=(half const & s); + tvec2& operator*=(tvec2 const & v); + tvec2& operator/=(half const & s); + tvec2& operator/=(tvec2 const & v); + tvec2& operator++(); + tvec2& operator--(); + + ////////////////////////////////////// + // Swizzle operators + + half swizzle(comp X) const; + tvec2 swizzle(comp X, comp Y) const; + tvec3 swizzle(comp X, comp Y, comp Z) const; + tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + tref2 swizzle(comp X, comp Y); + }; + + template <> + struct tvec3 + { + enum ctor{null}; + typedef half value_type; + typedef std::size_t size_type; + GLM_FUNC_DECL size_type length() const; + static GLM_FUNC_DECL size_type value_size(); + + typedef tvec3 type; + typedef tvec3 bool_type; + + ////////////////////////////////////// + // Data + + half x, y, z; + + ////////////////////////////////////// + // Accesses + + half & operator[](size_type i); + half const & operator[](size_type i) const; + + ////////////////////////////////////// + // Implicit basic constructors + + tvec3(); + tvec3(tvec3 const & v); + + ////////////////////////////////////// + // Explicit basic constructors + + explicit tvec3(ctor); + explicit tvec3( + half const & s); + explicit tvec3( + half const & s1, + half const & s2, + half const & s3); + + ////////////////////////////////////// + // Swizzle constructors + + tvec3(tref3 const & r); + + ////////////////////////////////////// + // Convertion scalar constructors + + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec3(U const & x); + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec3(U const & x, V const & y, W const & z); + + ////////////////////////////////////// + // Convertion vector constructors + + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec3(tvec2 const & v, B const & s); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec3(A const & s, tvec2 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec3(tvec3 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec3(tvec4 const & v); + + ////////////////////////////////////// + // Unary arithmetic operators + + tvec3& operator= (tvec3 const & v); + + tvec3& operator+=(half const & s); + tvec3& operator+=(tvec3 const & v); + tvec3& operator-=(half const & s); + tvec3& operator-=(tvec3 const & v); + tvec3& operator*=(half const & s); + tvec3& operator*=(tvec3 const & v); + tvec3& operator/=(half const & s); + tvec3& operator/=(tvec3 const & v); + tvec3& operator++(); + tvec3& operator--(); + + ////////////////////////////////////// + // Swizzle operators + + half swizzle(comp X) const; + tvec2 swizzle(comp X, comp Y) const; + tvec3 swizzle(comp X, comp Y, comp Z) const; + tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + tref3 swizzle(comp X, comp Y, comp Z); + }; + + template <> + struct tvec4 + { + enum ctor{null}; + typedef half value_type; + typedef std::size_t size_type; + GLM_FUNC_DECL size_type length() const; + static GLM_FUNC_DECL size_type value_size(); + + typedef tvec4 type; + typedef tvec4 bool_type; + + ////////////////////////////////////// + // Data + + half x, y, z, w; + + ////////////////////////////////////// + // Accesses + + half & operator[](size_type i); + half const & operator[](size_type i) const; + + ////////////////////////////////////// + // Implicit basic constructors + + tvec4(); + tvec4(tvec4 const & v); + + ////////////////////////////////////// + // Explicit basic constructors + + explicit tvec4(ctor); + explicit tvec4( + half const & s); + explicit tvec4( + half const & s0, + half const & s1, + half const & s2, + half const & s3); + + ////////////////////////////////////// + // Swizzle constructors + + tvec4(tref4 const & r); + + ////////////////////////////////////// + // Convertion scalar constructors + + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(U const & x); + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(A const & x, B const & y, C const & z, D const & w); + + ////////////////////////////////////// + // Convertion vector constructors + + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(tvec2 const & v, B const & s1, C const & s2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(A const & s1, tvec2 const & v, C const & s2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(A const & s1, B const & s2, tvec2 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(tvec3 const & v, B const & s); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(A const & s, tvec3 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(tvec2 const & v1, tvec2 const & v2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(tvec4 const & v); + + ////////////////////////////////////// + // Unary arithmetic operators + + tvec4& operator= (tvec4 const & v); + + tvec4& operator+=(half const & s); + tvec4& operator+=(tvec4 const & v); + tvec4& operator-=(half const & s); + tvec4& operator-=(tvec4 const & v); + tvec4& operator*=(half const & s); + tvec4& operator*=(tvec4 const & v); + tvec4& operator/=(half const & s); + tvec4& operator/=(tvec4 const & v); + tvec4& operator++(); + tvec4& operator--(); + + ////////////////////////////////////// + // Swizzle operators + + half swizzle(comp X) const; + tvec2 swizzle(comp X, comp Y) const; + tvec3 swizzle(comp X, comp Y, comp Z) const; + tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + tref4 swizzle(comp X, comp Y, comp Z, comp W); + }; +#endif//(GLM_COMPONENT == GLM_COMPONENT_CXX98) +} +//namespace detail + + /// @addtogroup gtc_half_float + /// @{ + + /// Type for half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::half half; + + /// Vector of 2 half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tvec2 hvec2; + + /// Vector of 3 half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tvec3 hvec3; + + /// Vector of 4 half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tvec4 hvec4; + + /// 2 * 2 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat2x2 hmat2; + + /// 3 * 3 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat3x3 hmat3; + + /// 4 * 4 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat4x4 hmat4; + + /// 2 * 2 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat2x2 hmat2x2; + + /// 2 * 3 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat2x3 hmat2x3; + + /// 2 * 4 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat2x4 hmat2x4; + + /// 3 * 2 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat3x2 hmat3x2; + + /// 3 * 3 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat3x3 hmat3x3; + + /// 3 * 4 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat3x4 hmat3x4; + + /// 4 * 2 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat4x2 hmat4x2; + + /// 4 * 3 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat4x3 hmat4x3; + + /// 4 * 4 matrix of half-precision floating-point numbers. + /// @see gtc_half_float + typedef detail::tmat4x4 hmat4x4; + + /// Returns the absolute value of a half-precision floating-point value + /// @see gtc_half_float + half abs(half const & x); + + /// Returns the absolute value of a half-precision floating-point two dimensional vector + /// @see gtc_half_float + hvec2 abs(hvec2 const & x); + + /// Returns the absolute value of a half-precision floating-point three dimensional vector + /// @see gtc_half_float + hvec3 abs(hvec3 const & x); + + /// Returns the absolute value of a half-precision floating-point four dimensional vector + /// @see gtc_half_float + hvec4 abs(hvec4 const & x); + + /// @} +}// namespace glm + +#include "half_float.inl" + +#endif//GLM_GTC_half_float diff --git a/include/gal/opengl/glm/gtc/half_float.inl b/include/gal/opengl/glm/gtc/half_float.inl index 81baa8b49e..241def44f2 100644 --- a/include/gal/opengl/glm/gtc/half_float.inl +++ b/include/gal/opengl/glm/gtc/half_float.inl @@ -1,1039 +1,1039 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_half_float -/// @file glm/gtc/half_float.inl -/// @date 2009-04-29 / 2012-11-06 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm{ -namespace detail -{ -#if(GLM_COMPONENT == GLM_COMPONENT_CXX98) - - ////////////////////////////////////// - // hvec2 - - GLM_FUNC_QUALIFIER tvec2::size_type tvec2::length() const - { - return 2; - } - - GLM_FUNC_QUALIFIER tvec2::size_type tvec2::value_size() - { - return 2; - } - - ////////////////////////////////////// - // Accesses - - GLM_FUNC_QUALIFIER half & tvec2::operator[](tvec2::size_type i) - { - assert(/*i >= tvec2::size_type(0) && */i < tvec2::value_size()); - return (&x)[i]; - } - - GLM_FUNC_QUALIFIER half const & tvec2::operator[](tvec2::size_type i) const - { - assert(/*i >= tvec2::size_type(0) && */i < tvec2::value_size()); - return (&x)[i]; - } - - ////////////////////////////////////// - // Implicit basic constructors - - GLM_FUNC_QUALIFIER tvec2::tvec2() : - x(half(0.f)), - y(half(0.f)) - {} - - GLM_FUNC_QUALIFIER tvec2::tvec2 - ( - tvec2 const & v - ) : - x(v.x), - y(v.y) - {} - - ////////////////////////////////////// - // Explicit basic constructors - - GLM_FUNC_QUALIFIER tvec2::tvec2 - ( - half const & s - ) : - x(s), - y(s) - {} - - GLM_FUNC_QUALIFIER tvec2::tvec2 - ( - half const & s1, - half const & s2 - ) : - x(s1), - y(s2) - {} - - ////////////////////////////////////// - // Swizzle constructors - - GLM_FUNC_QUALIFIER tvec2::tvec2 - ( - tref2 const & r - ) : - x(r.x), - y(r.y) - {} - - ////////////////////////////////////// - // Convertion scalar constructors - - template - GLM_FUNC_QUALIFIER tvec2::tvec2 - ( - U const & x - ) : - x(half(x)), - y(half(x)) - {} - - template - GLM_FUNC_QUALIFIER tvec2::tvec2 - ( - U const & x, - V const & y - ) : - x(half(x)), - y(half(y)) - {} - - ////////////////////////////////////// - // Convertion vector constructors - - template - GLM_FUNC_QUALIFIER tvec2::tvec2 - ( - tvec2 const & v - ) : - x(half(v.x)), - y(half(v.y)) - {} - - template - GLM_FUNC_QUALIFIER tvec2::tvec2 - ( - tvec3 const & v - ) : - x(half(v.x)), - y(half(v.y)) - {} - - template - GLM_FUNC_QUALIFIER tvec2::tvec2 - ( - tvec4 const & v - ) : - x(half(v.x)), - y(half(v.y)) - {} - - ////////////////////////////////////// - // Unary arithmetic operators - - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator= - ( - tvec2 const & v - ) - { - this->x = v.x; - this->y = v.y; - return *this; - } - - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator+= - ( - half const & s - ) - { - this->x += s; - this->y += s; - return *this; - } - - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator+= - ( - tvec2 const & v - ) - { - this->x += v.x; - this->y += v.y; - return *this; - } - - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator-= - ( - half const & s - ) - { - this->x -= s; - this->y -= s; - return *this; - } - - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator-= - ( - tvec2 const & v - ) - { - this->x -= v.x; - this->y -= v.y; - return *this; - } - - GLM_FUNC_QUALIFIER tvec2& tvec2::operator*= - ( - half const & s - ) - { - this->x *= s; - this->y *= s; - return *this; - } - - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator*= - ( - tvec2 const & v - ) - { - this->x *= v.x; - this->y *= v.y; - return *this; - } - - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator/= - ( - half const & s - ) - { - this->x /= s; - this->y /= s; - return *this; - } - - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator/= - ( - tvec2 const & v - ) - { - this->x /= v.x; - this->y /= v.y; - return *this; - } - - GLM_FUNC_QUALIFIER tvec2 & tvec2::operator++() - { - ++this->x; - ++this->y; - return *this; - } - - GLM_FUNC_QUALIFIER tvec2& tvec2::operator--() - { - --this->x; - --this->y; - return *this; - } - - ////////////////////////////////////// - // Swizzle operators - - GLM_FUNC_QUALIFIER half tvec2::swizzle(comp x) const - { - return (*this)[x]; - } - - GLM_FUNC_QUALIFIER tvec2 tvec2::swizzle(comp x, comp y) const - { - return tvec2( - (*this)[x], - (*this)[y]); - } - - GLM_FUNC_QUALIFIER tvec3 tvec2::swizzle(comp x, comp y, comp z) const - { - return tvec3( - (*this)[x], - (*this)[y], - (*this)[z]); - } - - GLM_FUNC_QUALIFIER tvec4 tvec2::swizzle(comp x, comp y, comp z, comp w) const - { - return tvec4( - (*this)[x], - (*this)[y], - (*this)[z], - (*this)[w]); - } - - GLM_FUNC_QUALIFIER tref2 tvec2::swizzle(comp x, comp y) - { - return tref2( - (*this)[x], - (*this)[y]); - } - - ////////////////////////////////////// - // hvec3 - - GLM_FUNC_QUALIFIER tvec3::size_type tvec3::length() const - { - return 3; - } - - GLM_FUNC_QUALIFIER tvec3::size_type tvec3::value_size() - { - return 3; - } - - ////////////////////////////////////// - // Accesses - - GLM_FUNC_QUALIFIER half & tvec3::operator[] - ( - tvec3::size_type i - ) - { - assert(/*i >= tvec3::size_type(0) &&*/ i < tvec3::value_size()); - - return (&x)[i]; - } - - GLM_FUNC_QUALIFIER half const & tvec3::operator[] - ( - tvec3::size_type i - ) const - { - assert(/*i >= tvec3::size_type(0) &&*/ i < tvec3::value_size()); - - return (&x)[i]; - } - - ////////////////////////////////////// - // Implicit basic constructors - - GLM_FUNC_QUALIFIER tvec3::tvec3() : - x(half(0)), - y(half(0)), - z(half(0)) - {} - - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - tvec3 const & v - ) : - x(v.x), - y(v.y), - z(v.z) - {} - - ////////////////////////////////////// - // Explicit basic constructors - - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - half const & s - ) : - x(s), - y(s), - z(s) - {} - - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - half const & s0, - half const & s1, - half const & s2 - ) : - x(s0), - y(s1), - z(s2) - {} - - ////////////////////////////////////// - // Swizzle constructors - - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - tref3 const & r - ) : - x(r.x), - y(r.y), - z(r.z) - {} - - ////////////////////////////////////// - // Convertion scalar constructors - - template - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - U const & x - ) : - x(half(x)), - y(half(x)), - z(half(x)) - {} - - template - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - A const & x, - B const & y, - C const & z - ) : - x(half(x)), - y(half(y)), - z(half(z)) - {} - - ////////////////////////////////////// - // Convertion vector constructors - - template - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - tvec2 const & v, - B const & s - ) : - x(half(v.x)), - y(half(v.y)), - z(half(s)) - {} - - template - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - A const & s, - tvec2 const & v - ) : - x(half(s)), - y(half(v.x)), - z(half(v.y)) - {} - - template - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - tvec3 const & v - ) : - x(half(v.x)), - y(half(v.y)), - z(half(v.z)) - {} - - template - GLM_FUNC_QUALIFIER tvec3::tvec3 - ( - tvec4 const & v - ) : - x(half(v.x)), - y(half(v.y)), - z(half(v.z)) - {} - - ////////////////////////////////////// - // Unary arithmetic operators - - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator= - ( - tvec3 const & v - ) - { - this->x = v.x; - this->y = v.y; - this->z = v.z; - return *this; - } - - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator+= - ( - half const & s - ) - { - this->x += s; - this->y += s; - this->z += s; - return *this; - } - - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator+= - ( - tvec3 const & v - ) - { - this->x += v.x; - this->y += v.y; - this->z += v.z; - return *this; - } - - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator-= - ( - half const & s - ) - { - this->x -= s; - this->y -= s; - this->z -= s; - return *this; - } - - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator-= - ( - tvec3 const & v - ) - { - this->x -= v.x; - this->y -= v.y; - this->z -= v.z; - return *this; - } - - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator*= - ( - half const & s - ) - { - this->x *= s; - this->y *= s; - this->z *= s; - return *this; - } - - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator*= - ( - tvec3 const & v - ) - { - this->x *= v.x; - this->y *= v.y; - this->z *= v.z; - return *this; - } - - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator/= - ( - half const & s - ) - { - this->x /= s; - this->y /= s; - this->z /= s; - return *this; - } - - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator/= - ( - tvec3 const & v - ) - { - this->x /= v.x; - this->y /= v.y; - this->z /= v.z; - return *this; - } - - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator++() - { - ++this->x; - ++this->y; - ++this->z; - return *this; - } - - GLM_FUNC_QUALIFIER tvec3 & tvec3::operator--() - { - --this->x; - --this->y; - --this->z; - return *this; - } - - ////////////////////////////////////// - // Swizzle operators - - GLM_FUNC_QUALIFIER half tvec3::swizzle(comp x) const - { - return (*this)[x]; - } - - GLM_FUNC_QUALIFIER tvec2 tvec3::swizzle(comp x, comp y) const - { - return tvec2( - (*this)[x], - (*this)[y]); - } - - GLM_FUNC_QUALIFIER tvec3 tvec3::swizzle(comp x, comp y, comp z) const - { - return tvec3( - (*this)[x], - (*this)[y], - (*this)[z]); - } - - GLM_FUNC_QUALIFIER tvec4 tvec3::swizzle(comp x, comp y, comp z, comp w) const - { - return tvec4( - (*this)[x], - (*this)[y], - (*this)[z], - (*this)[w]); - } - - GLM_FUNC_QUALIFIER tref3 tvec3::swizzle(comp x, comp y, comp z) - { - return tref3( - (*this)[x], - (*this)[y], - (*this)[z]); - } - - ////////////////////////////////////// - // hvec4 - - GLM_FUNC_QUALIFIER tvec4::size_type tvec4::length() const - { - return 4; - } - - GLM_FUNC_QUALIFIER tvec4::size_type tvec4::value_size() - { - return 4; - } - - ////////////////////////////////////// - // Accesses - - GLM_FUNC_QUALIFIER half & tvec4::operator[] - ( - tvec4::size_type i - ) - { - assert(/*i >= tvec4::size_type(0) && */i < tvec4::value_size()); - - return (&x)[i]; - } - - GLM_FUNC_QUALIFIER half const & tvec4::operator[] - ( - tvec4::size_type i - ) const - { - assert(/*i >= tvec4::size_type(0) && */i < tvec4::value_size()); - - return (&x)[i]; - } - - ////////////////////////////////////// - // Implicit basic constructors - - GLM_FUNC_QUALIFIER tvec4::tvec4() : - x(half(0)), - y(half(0)), - z(half(0)), - w(half(0)) - {} - - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - tvec4 const & v - ) : - x(v.x), - y(v.y), - z(v.z), - w(v.w) - {} - - ////////////////////////////////////// - // Explicit basic constructors - - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - half const & s - ) : - x(s), - y(s), - z(s), - w(s) - {} - - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - half const & s1, - half const & s2, - half const & s3, - half const & s4 - ) : - x(s1), - y(s2), - z(s3), - w(s4) - {} - - ////////////////////////////////////// - // Swizzle constructors - - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - tref4 const & r - ) : - x(r.x), - y(r.y), - z(r.z), - w(r.w) - {} - - ////////////////////////////////////// - // Convertion scalar constructors - - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - U const & x - ) : - x(half(x)), - y(half(x)), - z(half(x)), - w(half(x)) - {} - - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - A const & x, - B const & y, - C const & z, - D const & w - ) : - x(half(x)), - y(half(y)), - z(half(z)), - w(half(w)) - {} - - ////////////////////////////////////// - // Convertion vector constructors - - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - tvec2 const & v, - B const & s1, - C const & s2 - ) : - x(half(v.x)), - y(half(v.y)), - z(half(s1)), - w(half(s2)) - {} - - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - A const & s1, - tvec2 const & v, - C const & s2 - ) : - x(half(s1)), - y(half(v.x)), - z(half(v.y)), - w(half(s2)) - {} - - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - A const & s1, - B const & s2, - tvec2 const & v - ) : - x(half(s1)), - y(half(s2)), - z(half(v.x)), - w(half(v.y)) - {} - - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - tvec3 const & v, - B const & s - ) : - x(half(v.x)), - y(half(v.y)), - z(half(v.z)), - w(half(s)) - {} - - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - A const & s, - tvec3 const & v - ) : - x(half(s)), - y(half(v.x)), - z(half(v.y)), - w(half(v.z)) - {} - - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - tvec2 const & v1, - tvec2 const & v2 - ) : - x(half(v1.x)), - y(half(v1.y)), - z(half(v2.x)), - w(half(v2.y)) - {} - - template - GLM_FUNC_QUALIFIER tvec4::tvec4 - ( - tvec4 const & v - ) : - x(half(v.x)), - y(half(v.y)), - z(half(v.z)), - w(half(v.w)) - {} - - ////////////////////////////////////// - // Unary arithmetic operators - - GLM_FUNC_QUALIFIER tvec4& tvec4::operator= - ( - tvec4 const & v - ) - { - this->x = v.x; - this->y = v.y; - this->z = v.z; - this->w = v.w; - return *this; - } - - GLM_FUNC_QUALIFIER tvec4& tvec4::operator+= - ( - half const & s - ) - { - this->x += s; - this->y += s; - this->z += s; - this->w += s; - return *this; - } - - GLM_FUNC_QUALIFIER tvec4& tvec4::operator+= - ( - tvec4 const & v - ) - { - this->x += v.x; - this->y += v.y; - this->z += v.z; - this->w += v.w; - return *this; - } - - GLM_FUNC_QUALIFIER tvec4& tvec4::operator-= - ( - half const & s - ) - { - this->x -= s; - this->y -= s; - this->z -= s; - this->w -= s; - return *this; - } - - GLM_FUNC_QUALIFIER tvec4& tvec4::operator-= - ( - tvec4 const & v - ) - { - this->x -= v.x; - this->y -= v.y; - this->z -= v.z; - this->w -= v.w; - return *this; - } - - GLM_FUNC_QUALIFIER tvec4& tvec4::operator*= - ( - half const & s - ) - { - this->x *= s; - this->y *= s; - this->z *= s; - this->w *= s; - return *this; - } - - GLM_FUNC_QUALIFIER tvec4& tvec4::operator*= - ( - tvec4 const & v - ) - { - this->x *= v.x; - this->y *= v.y; - this->z *= v.z; - this->w *= v.w; - return *this; - } - - GLM_FUNC_QUALIFIER tvec4& tvec4::operator/= - ( - half const & s - ) - { - this->x /= s; - this->y /= s; - this->z /= s; - this->w /= s; - return *this; - } - - GLM_FUNC_QUALIFIER tvec4& tvec4::operator/= - ( - tvec4 const & v - ) - { - this->x /= v.x; - this->y /= v.y; - this->z /= v.z; - this->w /= v.w; - return *this; - } - - GLM_FUNC_QUALIFIER tvec4& tvec4::operator++() - { - ++this->x; - ++this->y; - ++this->z; - ++this->w; - return *this; - } - - GLM_FUNC_QUALIFIER tvec4& tvec4::operator--() - { - --this->x; - --this->y; - --this->z; - --this->w; - return *this; - } - - ////////////////////////////////////// - // Swizzle operators - - GLM_FUNC_QUALIFIER half tvec4::swizzle(comp x) const - { - return (*this)[x]; - } - - GLM_FUNC_QUALIFIER tvec2 tvec4::swizzle(comp x, comp y) const - { - return tvec2( - (*this)[x], - (*this)[y]); - } - - GLM_FUNC_QUALIFIER tvec3 tvec4::swizzle(comp x, comp y, comp z) const - { - return tvec3( - (*this)[x], - (*this)[y], - (*this)[z]); - } - - GLM_FUNC_QUALIFIER tvec4 tvec4::swizzle(comp x, comp y, comp z, comp w) const - { - return tvec4( - (*this)[x], - (*this)[y], - (*this)[z], - (*this)[w]); - } - - GLM_FUNC_QUALIFIER tref4 tvec4::swizzle(comp x, comp y, comp z, comp w) - { - return tref4( - (*this)[x], - (*this)[y], - (*this)[z], - (*this)[w]); - } - -#endif//(GLM_COMPONENT == GLM_COMPONENT_CXX98) - -}//namespace detail - - GLM_FUNC_QUALIFIER half abs(half const & x) - { - return float(x) >= float(0) ? x : -x; - } - - GLM_FUNC_QUALIFIER hvec2 abs(hvec2 const & v) - { - return hvec2( - float(v.x) >= float(0) ? v.x : -v.x, - float(v.y) >= float(0) ? v.y : -v.y); - } - - GLM_FUNC_QUALIFIER hvec3 abs(hvec3 const & v) - { - return hvec3( - float(v.x) >= float(0) ? v.x : -v.x, - float(v.y) >= float(0) ? v.y : -v.y, - float(v.z) >= float(0) ? v.z : -v.z); - } - - GLM_FUNC_QUALIFIER hvec4 abs(hvec4 const & v) - { - return hvec4( - float(v.x) >= float(0) ? v.x : -v.x, - float(v.y) >= float(0) ? v.y : -v.y, - float(v.z) >= float(0) ? v.z : -v.z, - float(v.w) >= float(0) ? v.w : -v.w); - } - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_half_float +/// @file glm/gtc/half_float.inl +/// @date 2009-04-29 / 2012-11-06 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail +{ +#if(GLM_COMPONENT == GLM_COMPONENT_CXX98) + + ////////////////////////////////////// + // hvec2 + + GLM_FUNC_QUALIFIER tvec2::size_type tvec2::length() const + { + return 2; + } + + GLM_FUNC_QUALIFIER tvec2::size_type tvec2::value_size() + { + return 2; + } + + ////////////////////////////////////// + // Accesses + + GLM_FUNC_QUALIFIER half & tvec2::operator[](tvec2::size_type i) + { + assert(/*i >= tvec2::size_type(0) && */i < tvec2::value_size()); + return (&x)[i]; + } + + GLM_FUNC_QUALIFIER half const & tvec2::operator[](tvec2::size_type i) const + { + assert(/*i >= tvec2::size_type(0) && */i < tvec2::value_size()); + return (&x)[i]; + } + + ////////////////////////////////////// + // Implicit basic constructors + + GLM_FUNC_QUALIFIER tvec2::tvec2() : + x(half(0.f)), + y(half(0.f)) + {} + + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + tvec2 const & v + ) : + x(v.x), + y(v.y) + {} + + ////////////////////////////////////// + // Explicit basic constructors + + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + half const & s + ) : + x(s), + y(s) + {} + + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + half const & s1, + half const & s2 + ) : + x(s1), + y(s2) + {} + + ////////////////////////////////////// + // Swizzle constructors + + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + tref2 const & r + ) : + x(r.x), + y(r.y) + {} + + ////////////////////////////////////// + // Convertion scalar constructors + + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + U const & x + ) : + x(half(x)), + y(half(x)) + {} + + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + U const & x, + V const & y + ) : + x(half(x)), + y(half(y)) + {} + + ////////////////////////////////////// + // Convertion vector constructors + + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + tvec2 const & v + ) : + x(half(v.x)), + y(half(v.y)) + {} + + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + tvec3 const & v + ) : + x(half(v.x)), + y(half(v.y)) + {} + + template + GLM_FUNC_QUALIFIER tvec2::tvec2 + ( + tvec4 const & v + ) : + x(half(v.x)), + y(half(v.y)) + {} + + ////////////////////////////////////// + // Unary arithmetic operators + + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator= + ( + tvec2 const & v + ) + { + this->x = v.x; + this->y = v.y; + return *this; + } + + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator+= + ( + half const & s + ) + { + this->x += s; + this->y += s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator+= + ( + tvec2 const & v + ) + { + this->x += v.x; + this->y += v.y; + return *this; + } + + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator-= + ( + half const & s + ) + { + this->x -= s; + this->y -= s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator-= + ( + tvec2 const & v + ) + { + this->x -= v.x; + this->y -= v.y; + return *this; + } + + GLM_FUNC_QUALIFIER tvec2& tvec2::operator*= + ( + half const & s + ) + { + this->x *= s; + this->y *= s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator*= + ( + tvec2 const & v + ) + { + this->x *= v.x; + this->y *= v.y; + return *this; + } + + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator/= + ( + half const & s + ) + { + this->x /= s; + this->y /= s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator/= + ( + tvec2 const & v + ) + { + this->x /= v.x; + this->y /= v.y; + return *this; + } + + GLM_FUNC_QUALIFIER tvec2 & tvec2::operator++() + { + ++this->x; + ++this->y; + return *this; + } + + GLM_FUNC_QUALIFIER tvec2& tvec2::operator--() + { + --this->x; + --this->y; + return *this; + } + + ////////////////////////////////////// + // Swizzle operators + + GLM_FUNC_QUALIFIER half tvec2::swizzle(comp x) const + { + return (*this)[x]; + } + + GLM_FUNC_QUALIFIER tvec2 tvec2::swizzle(comp x, comp y) const + { + return tvec2( + (*this)[x], + (*this)[y]); + } + + GLM_FUNC_QUALIFIER tvec3 tvec2::swizzle(comp x, comp y, comp z) const + { + return tvec3( + (*this)[x], + (*this)[y], + (*this)[z]); + } + + GLM_FUNC_QUALIFIER tvec4 tvec2::swizzle(comp x, comp y, comp z, comp w) const + { + return tvec4( + (*this)[x], + (*this)[y], + (*this)[z], + (*this)[w]); + } + + GLM_FUNC_QUALIFIER tref2 tvec2::swizzle(comp x, comp y) + { + return tref2( + (*this)[x], + (*this)[y]); + } + + ////////////////////////////////////// + // hvec3 + + GLM_FUNC_QUALIFIER tvec3::size_type tvec3::length() const + { + return 3; + } + + GLM_FUNC_QUALIFIER tvec3::size_type tvec3::value_size() + { + return 3; + } + + ////////////////////////////////////// + // Accesses + + GLM_FUNC_QUALIFIER half & tvec3::operator[] + ( + tvec3::size_type i + ) + { + assert(/*i >= tvec3::size_type(0) &&*/ i < tvec3::value_size()); + + return (&x)[i]; + } + + GLM_FUNC_QUALIFIER half const & tvec3::operator[] + ( + tvec3::size_type i + ) const + { + assert(/*i >= tvec3::size_type(0) &&*/ i < tvec3::value_size()); + + return (&x)[i]; + } + + ////////////////////////////////////// + // Implicit basic constructors + + GLM_FUNC_QUALIFIER tvec3::tvec3() : + x(half(0)), + y(half(0)), + z(half(0)) + {} + + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + tvec3 const & v + ) : + x(v.x), + y(v.y), + z(v.z) + {} + + ////////////////////////////////////// + // Explicit basic constructors + + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + half const & s + ) : + x(s), + y(s), + z(s) + {} + + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + half const & s0, + half const & s1, + half const & s2 + ) : + x(s0), + y(s1), + z(s2) + {} + + ////////////////////////////////////// + // Swizzle constructors + + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + tref3 const & r + ) : + x(r.x), + y(r.y), + z(r.z) + {} + + ////////////////////////////////////// + // Convertion scalar constructors + + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + U const & x + ) : + x(half(x)), + y(half(x)), + z(half(x)) + {} + + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + A const & x, + B const & y, + C const & z + ) : + x(half(x)), + y(half(y)), + z(half(z)) + {} + + ////////////////////////////////////// + // Convertion vector constructors + + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + tvec2 const & v, + B const & s + ) : + x(half(v.x)), + y(half(v.y)), + z(half(s)) + {} + + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + A const & s, + tvec2 const & v + ) : + x(half(s)), + y(half(v.x)), + z(half(v.y)) + {} + + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + tvec3 const & v + ) : + x(half(v.x)), + y(half(v.y)), + z(half(v.z)) + {} + + template + GLM_FUNC_QUALIFIER tvec3::tvec3 + ( + tvec4 const & v + ) : + x(half(v.x)), + y(half(v.y)), + z(half(v.z)) + {} + + ////////////////////////////////////// + // Unary arithmetic operators + + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator= + ( + tvec3 const & v + ) + { + this->x = v.x; + this->y = v.y; + this->z = v.z; + return *this; + } + + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator+= + ( + half const & s + ) + { + this->x += s; + this->y += s; + this->z += s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator+= + ( + tvec3 const & v + ) + { + this->x += v.x; + this->y += v.y; + this->z += v.z; + return *this; + } + + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator-= + ( + half const & s + ) + { + this->x -= s; + this->y -= s; + this->z -= s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator-= + ( + tvec3 const & v + ) + { + this->x -= v.x; + this->y -= v.y; + this->z -= v.z; + return *this; + } + + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator*= + ( + half const & s + ) + { + this->x *= s; + this->y *= s; + this->z *= s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator*= + ( + tvec3 const & v + ) + { + this->x *= v.x; + this->y *= v.y; + this->z *= v.z; + return *this; + } + + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator/= + ( + half const & s + ) + { + this->x /= s; + this->y /= s; + this->z /= s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator/= + ( + tvec3 const & v + ) + { + this->x /= v.x; + this->y /= v.y; + this->z /= v.z; + return *this; + } + + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator++() + { + ++this->x; + ++this->y; + ++this->z; + return *this; + } + + GLM_FUNC_QUALIFIER tvec3 & tvec3::operator--() + { + --this->x; + --this->y; + --this->z; + return *this; + } + + ////////////////////////////////////// + // Swizzle operators + + GLM_FUNC_QUALIFIER half tvec3::swizzle(comp x) const + { + return (*this)[x]; + } + + GLM_FUNC_QUALIFIER tvec2 tvec3::swizzle(comp x, comp y) const + { + return tvec2( + (*this)[x], + (*this)[y]); + } + + GLM_FUNC_QUALIFIER tvec3 tvec3::swizzle(comp x, comp y, comp z) const + { + return tvec3( + (*this)[x], + (*this)[y], + (*this)[z]); + } + + GLM_FUNC_QUALIFIER tvec4 tvec3::swizzle(comp x, comp y, comp z, comp w) const + { + return tvec4( + (*this)[x], + (*this)[y], + (*this)[z], + (*this)[w]); + } + + GLM_FUNC_QUALIFIER tref3 tvec3::swizzle(comp x, comp y, comp z) + { + return tref3( + (*this)[x], + (*this)[y], + (*this)[z]); + } + + ////////////////////////////////////// + // hvec4 + + GLM_FUNC_QUALIFIER tvec4::size_type tvec4::length() const + { + return 4; + } + + GLM_FUNC_QUALIFIER tvec4::size_type tvec4::value_size() + { + return 4; + } + + ////////////////////////////////////// + // Accesses + + GLM_FUNC_QUALIFIER half & tvec4::operator[] + ( + tvec4::size_type i + ) + { + assert(/*i >= tvec4::size_type(0) && */i < tvec4::value_size()); + + return (&x)[i]; + } + + GLM_FUNC_QUALIFIER half const & tvec4::operator[] + ( + tvec4::size_type i + ) const + { + assert(/*i >= tvec4::size_type(0) && */i < tvec4::value_size()); + + return (&x)[i]; + } + + ////////////////////////////////////// + // Implicit basic constructors + + GLM_FUNC_QUALIFIER tvec4::tvec4() : + x(half(0)), + y(half(0)), + z(half(0)), + w(half(0)) + {} + + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tvec4 const & v + ) : + x(v.x), + y(v.y), + z(v.z), + w(v.w) + {} + + ////////////////////////////////////// + // Explicit basic constructors + + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + half const & s + ) : + x(s), + y(s), + z(s), + w(s) + {} + + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + half const & s1, + half const & s2, + half const & s3, + half const & s4 + ) : + x(s1), + y(s2), + z(s3), + w(s4) + {} + + ////////////////////////////////////// + // Swizzle constructors + + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tref4 const & r + ) : + x(r.x), + y(r.y), + z(r.z), + w(r.w) + {} + + ////////////////////////////////////// + // Convertion scalar constructors + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + U const & x + ) : + x(half(x)), + y(half(x)), + z(half(x)), + w(half(x)) + {} + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + A const & x, + B const & y, + C const & z, + D const & w + ) : + x(half(x)), + y(half(y)), + z(half(z)), + w(half(w)) + {} + + ////////////////////////////////////// + // Convertion vector constructors + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tvec2 const & v, + B const & s1, + C const & s2 + ) : + x(half(v.x)), + y(half(v.y)), + z(half(s1)), + w(half(s2)) + {} + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + A const & s1, + tvec2 const & v, + C const & s2 + ) : + x(half(s1)), + y(half(v.x)), + z(half(v.y)), + w(half(s2)) + {} + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + A const & s1, + B const & s2, + tvec2 const & v + ) : + x(half(s1)), + y(half(s2)), + z(half(v.x)), + w(half(v.y)) + {} + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tvec3 const & v, + B const & s + ) : + x(half(v.x)), + y(half(v.y)), + z(half(v.z)), + w(half(s)) + {} + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + A const & s, + tvec3 const & v + ) : + x(half(s)), + y(half(v.x)), + z(half(v.y)), + w(half(v.z)) + {} + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tvec2 const & v1, + tvec2 const & v2 + ) : + x(half(v1.x)), + y(half(v1.y)), + z(half(v2.x)), + w(half(v2.y)) + {} + + template + GLM_FUNC_QUALIFIER tvec4::tvec4 + ( + tvec4 const & v + ) : + x(half(v.x)), + y(half(v.y)), + z(half(v.z)), + w(half(v.w)) + {} + + ////////////////////////////////////// + // Unary arithmetic operators + + GLM_FUNC_QUALIFIER tvec4& tvec4::operator= + ( + tvec4 const & v + ) + { + this->x = v.x; + this->y = v.y; + this->z = v.z; + this->w = v.w; + return *this; + } + + GLM_FUNC_QUALIFIER tvec4& tvec4::operator+= + ( + half const & s + ) + { + this->x += s; + this->y += s; + this->z += s; + this->w += s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec4& tvec4::operator+= + ( + tvec4 const & v + ) + { + this->x += v.x; + this->y += v.y; + this->z += v.z; + this->w += v.w; + return *this; + } + + GLM_FUNC_QUALIFIER tvec4& tvec4::operator-= + ( + half const & s + ) + { + this->x -= s; + this->y -= s; + this->z -= s; + this->w -= s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec4& tvec4::operator-= + ( + tvec4 const & v + ) + { + this->x -= v.x; + this->y -= v.y; + this->z -= v.z; + this->w -= v.w; + return *this; + } + + GLM_FUNC_QUALIFIER tvec4& tvec4::operator*= + ( + half const & s + ) + { + this->x *= s; + this->y *= s; + this->z *= s; + this->w *= s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec4& tvec4::operator*= + ( + tvec4 const & v + ) + { + this->x *= v.x; + this->y *= v.y; + this->z *= v.z; + this->w *= v.w; + return *this; + } + + GLM_FUNC_QUALIFIER tvec4& tvec4::operator/= + ( + half const & s + ) + { + this->x /= s; + this->y /= s; + this->z /= s; + this->w /= s; + return *this; + } + + GLM_FUNC_QUALIFIER tvec4& tvec4::operator/= + ( + tvec4 const & v + ) + { + this->x /= v.x; + this->y /= v.y; + this->z /= v.z; + this->w /= v.w; + return *this; + } + + GLM_FUNC_QUALIFIER tvec4& tvec4::operator++() + { + ++this->x; + ++this->y; + ++this->z; + ++this->w; + return *this; + } + + GLM_FUNC_QUALIFIER tvec4& tvec4::operator--() + { + --this->x; + --this->y; + --this->z; + --this->w; + return *this; + } + + ////////////////////////////////////// + // Swizzle operators + + GLM_FUNC_QUALIFIER half tvec4::swizzle(comp x) const + { + return (*this)[x]; + } + + GLM_FUNC_QUALIFIER tvec2 tvec4::swizzle(comp x, comp y) const + { + return tvec2( + (*this)[x], + (*this)[y]); + } + + GLM_FUNC_QUALIFIER tvec3 tvec4::swizzle(comp x, comp y, comp z) const + { + return tvec3( + (*this)[x], + (*this)[y], + (*this)[z]); + } + + GLM_FUNC_QUALIFIER tvec4 tvec4::swizzle(comp x, comp y, comp z, comp w) const + { + return tvec4( + (*this)[x], + (*this)[y], + (*this)[z], + (*this)[w]); + } + + GLM_FUNC_QUALIFIER tref4 tvec4::swizzle(comp x, comp y, comp z, comp w) + { + return tref4( + (*this)[x], + (*this)[y], + (*this)[z], + (*this)[w]); + } + +#endif//(GLM_COMPONENT == GLM_COMPONENT_CXX98) + +}//namespace detail + + GLM_FUNC_QUALIFIER half abs(half const & x) + { + return float(x) >= float(0) ? x : -x; + } + + GLM_FUNC_QUALIFIER hvec2 abs(hvec2 const & v) + { + return hvec2( + float(v.x) >= float(0) ? v.x : -v.x, + float(v.y) >= float(0) ? v.y : -v.y); + } + + GLM_FUNC_QUALIFIER hvec3 abs(hvec3 const & v) + { + return hvec3( + float(v.x) >= float(0) ? v.x : -v.x, + float(v.y) >= float(0) ? v.y : -v.y, + float(v.z) >= float(0) ? v.z : -v.z); + } + + GLM_FUNC_QUALIFIER hvec4 abs(hvec4 const & v) + { + return hvec4( + float(v.x) >= float(0) ? v.x : -v.x, + float(v.y) >= float(0) ? v.y : -v.y, + float(v.z) >= float(0) ? v.z : -v.z, + float(v.w) >= float(0) ? v.w : -v.w); + } + +}//namespace glm diff --git a/include/gal/opengl/glm/gtc/matrix_access.hpp b/include/gal/opengl/glm/gtc/matrix_access.hpp index b7351b22ec..4dfb5fe67e 100644 --- a/include/gal/opengl/glm/gtc/matrix_access.hpp +++ b/include/gal/opengl/glm/gtc/matrix_access.hpp @@ -1,87 +1,87 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_matrix_access -/// @file glm/gtc/matrix_access.hpp -/// @date 2005-12-27 / 2011-05-16 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtc_matrix_access GLM_GTC_matrix_access -/// @ingroup gtc -/// -/// Defines functions to access rows or columns of a matrix easily. -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTC_matrix_access -#define GLM_GTC_matrix_access GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTC_matrix_access extension included") -#endif - -namespace glm -{ - /// @addtogroup gtc_matrix_access - /// @{ - - /// Get a specific row of a matrix. - /// @see gtc_matrix_access - template - typename genType::row_type row( - genType const & m, - int index); - - /// Set a specific row to a matrix. - /// @see gtc_matrix_access - template - genType row( - genType const & m, - int index, - typename genType::row_type const & x); - - /// Get a specific column of a matrix. - /// @see gtc_matrix_access - template - typename genType::col_type column( - genType const & m, - int index); - - /// Set a specific column to a matrix. - /// @see gtc_matrix_access - template - genType column( - genType const & m, - int index, - typename genType::col_type const & x); - - /// @} -}//namespace glm - -#include "matrix_access.inl" - -#endif//GLM_GTC_matrix_access +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_matrix_access +/// @file glm/gtc/matrix_access.hpp +/// @date 2005-12-27 / 2011-05-16 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtc_matrix_access GLM_GTC_matrix_access +/// @ingroup gtc +/// +/// Defines functions to access rows or columns of a matrix easily. +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_matrix_access +#define GLM_GTC_matrix_access GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_matrix_access extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_matrix_access + /// @{ + + /// Get a specific row of a matrix. + /// @see gtc_matrix_access + template + typename genType::row_type row( + genType const & m, + int index); + + /// Set a specific row to a matrix. + /// @see gtc_matrix_access + template + genType row( + genType const & m, + int index, + typename genType::row_type const & x); + + /// Get a specific column of a matrix. + /// @see gtc_matrix_access + template + typename genType::col_type column( + genType const & m, + int index); + + /// Set a specific column to a matrix. + /// @see gtc_matrix_access + template + genType column( + genType const & m, + int index, + typename genType::col_type const & x); + + /// @} +}//namespace glm + +#include "matrix_access.inl" + +#endif//GLM_GTC_matrix_access diff --git a/include/gal/opengl/glm/gtc/matrix_access.inl b/include/gal/opengl/glm/gtc/matrix_access.inl index e4e5ac3871..2f3f5009ea 100644 --- a/include/gal/opengl/glm/gtc/matrix_access.inl +++ b/include/gal/opengl/glm/gtc/matrix_access.inl @@ -1,80 +1,80 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_matrix_access -/// @file glm/gtc/matrix_access.inl -/// @date 2005-12-27 / 2011-06-05 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER genType row - ( - genType const & m, - int index, - typename genType::row_type const & x - ) - { - genType Result = m; - for(typename genType::size_type i = 0; i < genType::row_size(); ++i) - Result[i][index] = x[i]; - return Result; - } - - template - GLM_FUNC_QUALIFIER typename genType::row_type row - ( - genType const & m, - int index - ) - { - typename genType::row_type Result; - for(typename genType::size_type i = 0; i < genType::row_size(); ++i) - Result[i] = m[i][index]; - return Result; - } - - template - GLM_FUNC_QUALIFIER genType column - ( - genType const & m, - int index, - typename genType::col_type const & x - ) - { - genType Result = m; - Result[index] = x; - return Result; - } - - template - GLM_FUNC_QUALIFIER typename genType::col_type column - ( - genType const & m, - int index - ) - { - return m[index]; - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_matrix_access +/// @file glm/gtc/matrix_access.inl +/// @date 2005-12-27 / 2011-06-05 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER genType row + ( + genType const & m, + int index, + typename genType::row_type const & x + ) + { + genType Result = m; + for(typename genType::size_type i = 0; i < genType::row_size(); ++i) + Result[i][index] = x[i]; + return Result; + } + + template + GLM_FUNC_QUALIFIER typename genType::row_type row + ( + genType const & m, + int index + ) + { + typename genType::row_type Result; + for(typename genType::size_type i = 0; i < genType::row_size(); ++i) + Result[i] = m[i][index]; + return Result; + } + + template + GLM_FUNC_QUALIFIER genType column + ( + genType const & m, + int index, + typename genType::col_type const & x + ) + { + genType Result = m; + Result[index] = x; + return Result; + } + + template + GLM_FUNC_QUALIFIER typename genType::col_type column + ( + genType const & m, + int index + ) + { + return m[index]; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtc/matrix_integer.hpp b/include/gal/opengl/glm/gtc/matrix_integer.hpp index 58f8981964..50f157bef8 100644 --- a/include/gal/opengl/glm/gtc/matrix_integer.hpp +++ b/include/gal/opengl/glm/gtc/matrix_integer.hpp @@ -1,506 +1,506 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_matrix_integer -/// @file glm/gtc/matrix_integer.hpp -/// @date 2011-01-20 / 2011-06-05 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtc_matrix_integer GLM_GTC_matrix_integer -/// @ingroup gtc -/// -/// Defines a number of matrices with integer types. -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTC_matrix_integer -#define GLM_GTC_matrix_integer GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTC_matrix_integer extension included") -#endif - -namespace glm -{ - /// @addtogroup gtc_matrix_integer - /// @{ - - /// High-precision signed integer 2x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x2 highp_imat2; - - /// High-precision signed integer 3x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x3 highp_imat3; - - /// High-precision signed integer 4x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x4 highp_imat4; - - /// High-precision signed integer 2x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x2 highp_imat2x2; - - /// High-precision signed integer 2x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x3 highp_imat2x3; - - /// High-precision signed integer 2x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x4 highp_imat2x4; - - /// High-precision signed integer 3x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x2 highp_imat3x2; - - /// High-precision signed integer 3x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x3 highp_imat3x3; - - /// High-precision signed integer 3x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x4 highp_imat3x4; - - /// High-precision signed integer 4x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x2 highp_imat4x2; - - /// High-precision signed integer 4x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x3 highp_imat4x3; - - /// High-precision signed integer 4x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x4 highp_imat4x4; - - - /// Medium-precision signed integer 2x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x2 mediump_imat2; - - /// Medium-precision signed integer 3x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x3 mediump_imat3; - - /// Medium-precision signed integer 4x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x4 mediump_imat4; - - - /// Medium-precision signed integer 2x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x2 mediump_imat2x2; - - /// Medium-precision signed integer 2x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x3 mediump_imat2x3; - - /// Medium-precision signed integer 2x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x4 mediump_imat2x4; - - /// Medium-precision signed integer 3x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x2 mediump_imat3x2; - - /// Medium-precision signed integer 3x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x3 mediump_imat3x3; - - /// Medium-precision signed integer 3x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x4 mediump_imat3x4; - - /// Medium-precision signed integer 4x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x2 mediump_imat4x2; - - /// Medium-precision signed integer 4x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x3 mediump_imat4x3; - - /// Medium-precision signed integer 4x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x4 mediump_imat4x4; - - - /// Low-precision signed integer 2x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x2 lowp_imat2; - - /// Low-precision signed integer 3x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x3 lowp_imat3; - - /// Low-precision signed integer 4x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x4 lowp_imat4; - - - /// Low-precision signed integer 2x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x2 lowp_imat2x2; - - /// Low-precision signed integer 2x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x3 lowp_imat2x3; - - /// Low-precision signed integer 2x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x4 lowp_imat2x4; - - /// Low-precision signed integer 3x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x2 lowp_imat3x2; - - /// Low-precision signed integer 3x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x3 lowp_imat3x3; - - /// Low-precision signed integer 3x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x4 lowp_imat3x4; - - /// Low-precision signed integer 4x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x2 lowp_imat4x2; - - /// Low-precision signed integer 4x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x3 lowp_imat4x3; - - /// Low-precision signed integer 4x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x4 lowp_imat4x4; - - - /// High-precision unsigned integer 2x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x2 highp_umat2; - - /// High-precision unsigned integer 3x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x3 highp_umat3; - - /// High-precision unsigned integer 4x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x4 highp_umat4; - - /// High-precision unsigned integer 2x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x2 highp_umat2x2; - - /// High-precision unsigned integer 2x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x3 highp_umat2x3; - - /// High-precision unsigned integer 2x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x4 highp_umat2x4; - - /// High-precision unsigned integer 3x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x2 highp_umat3x2; - - /// High-precision unsigned integer 3x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x3 highp_umat3x3; - - /// High-precision unsigned integer 3x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x4 highp_umat3x4; - - /// High-precision unsigned integer 4x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x2 highp_umat4x2; - - /// High-precision unsigned integer 4x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x3 highp_umat4x3; - - /// High-precision unsigned integer 4x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x4 highp_umat4x4; - - - /// Medium-precision unsigned integer 2x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x2 mediump_umat2; - - /// Medium-precision unsigned integer 3x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x3 mediump_umat3; - - /// Medium-precision unsigned integer 4x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x4 mediump_umat4; - - - /// Medium-precision unsigned integer 2x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x2 mediump_umat2x2; - - /// Medium-precision unsigned integer 2x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x3 mediump_umat2x3; - - /// Medium-precision unsigned integer 2x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x4 mediump_umat2x4; - - /// Medium-precision unsigned integer 3x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x2 mediump_umat3x2; - - /// Medium-precision unsigned integer 3x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x3 mediump_umat3x3; - - /// Medium-precision unsigned integer 3x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x4 mediump_umat3x4; - - /// Medium-precision unsigned integer 4x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x2 mediump_umat4x2; - - /// Medium-precision unsigned integer 4x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x3 mediump_umat4x3; - - /// Medium-precision unsigned integer 4x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x4 mediump_umat4x4; - - - /// Low-precision unsigned integer 2x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x2 lowp_umat2; - - /// Low-precision unsigned integer 3x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x3 lowp_umat3; - - /// Low-precision unsigned integer 4x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x4 lowp_umat4; - - - /// Low-precision unsigned integer 2x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x2 lowp_umat2x2; - - /// Low-precision unsigned integer 2x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x3 lowp_umat2x3; - - /// Low-precision unsigned integer 2x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat2x4 lowp_umat2x4; - - /// Low-precision unsigned integer 3x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x2 lowp_umat3x2; - - /// Low-precision unsigned integer 3x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x3 lowp_umat3x3; - - /// Low-precision unsigned integer 3x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat3x4 lowp_umat3x4; - - /// Low-precision unsigned integer 4x2 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x2 lowp_umat4x2; - - /// Low-precision unsigned integer 4x3 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x3 lowp_umat4x3; - - /// Low-precision unsigned integer 4x4 matrix. - /// @see gtc_matrix_integer - typedef detail::tmat4x4 lowp_umat4x4; - -#if(defined(GLM_PRECISION_HIGHP_INT)) - typedef highp_imat2 imat2; - typedef highp_imat3 imat3; - typedef highp_imat4 imat4; - typedef highp_imat2x2 imat2x2; - typedef highp_imat2x3 imat2x3; - typedef highp_imat2x4 imat2x4; - typedef highp_imat3x2 imat3x2; - typedef highp_imat3x3 imat3x3; - typedef highp_imat3x4 imat3x4; - typedef highp_imat4x2 imat4x2; - typedef highp_imat4x3 imat4x3; - typedef highp_imat4x4 imat4x4; -#elif(defined(GLM_PRECISION_LOWP_INT)) - typedef lowp_imat2 imat2; - typedef lowp_imat3 imat3; - typedef lowp_imat4 imat4; - typedef lowp_imat2x2 imat2x2; - typedef lowp_imat2x3 imat2x3; - typedef lowp_imat2x4 imat2x4; - typedef lowp_imat3x2 imat3x2; - typedef lowp_imat3x3 imat3x3; - typedef lowp_imat3x4 imat3x4; - typedef lowp_imat4x2 imat4x2; - typedef lowp_imat4x3 imat4x3; - typedef lowp_imat4x4 imat4x4; -#else //if(defined(GLM_PRECISION_MEDIUMP_INT)) - - /// Signed integer 2x2 matrix. - /// @see gtc_matrix_integer - typedef mediump_imat2 imat2; - - /// Signed integer 3x3 matrix. - /// @see gtc_matrix_integer - typedef mediump_imat3 imat3; - - /// Signed integer 4x4 matrix. - /// @see gtc_matrix_integer - typedef mediump_imat4 imat4; - - /// Signed integer 2x2 matrix. - /// @see gtc_matrix_integer - typedef mediump_imat2x2 imat2x2; - - /// Signed integer 2x3 matrix. - /// @see gtc_matrix_integer - typedef mediump_imat2x3 imat2x3; - - /// Signed integer 2x4 matrix. - /// @see gtc_matrix_integer - typedef mediump_imat2x4 imat2x4; - - /// Signed integer 3x2 matrix. - /// @see gtc_matrix_integer - typedef mediump_imat3x2 imat3x2; - - /// Signed integer 3x3 matrix. - /// @see gtc_matrix_integer - typedef mediump_imat3x3 imat3x3; - - /// Signed integer 3x4 matrix. - /// @see gtc_matrix_integer - typedef mediump_imat3x4 imat3x4; - - /// Signed integer 4x2 matrix. - /// @see gtc_matrix_integer - typedef mediump_imat4x2 imat4x2; - - /// Signed integer 4x3 matrix. - /// @see gtc_matrix_integer - typedef mediump_imat4x3 imat4x3; - - /// Signed integer 4x4 matrix. - /// @see gtc_matrix_integer - typedef mediump_imat4x4 imat4x4; -#endif//GLM_PRECISION - -#if(defined(GLM_PRECISION_HIGHP_UINT)) - typedef highp_umat2 umat2; - typedef highp_umat3 umat3; - typedef highp_umat4 umat4; - typedef highp_umat2x2 umat2x2; - typedef highp_umat2x3 umat2x3; - typedef highp_umat2x4 umat2x4; - typedef highp_umat3x2 umat3x2; - typedef highp_umat3x3 umat3x3; - typedef highp_umat3x4 umat3x4; - typedef highp_umat4x2 umat4x2; - typedef highp_umat4x3 umat4x3; - typedef highp_umat4x4 umat4x4; -#elif(defined(GLM_PRECISION_LOWP_UINT)) - typedef lowp_umat2 umat2; - typedef lowp_umat3 umat3; - typedef lowp_umat4 umat4; - typedef lowp_umat2x2 umat2x2; - typedef lowp_umat2x3 umat2x3; - typedef lowp_umat2x4 umat2x4; - typedef lowp_umat3x2 umat3x2; - typedef lowp_umat3x3 umat3x3; - typedef lowp_umat3x4 umat3x4; - typedef lowp_umat4x2 umat4x2; - typedef lowp_umat4x3 umat4x3; - typedef lowp_umat4x4 umat4x4; -#else //if(defined(GLM_PRECISION_MEDIUMP_UINT)) - - /// Unsigned integer 2x2 matrix. - /// @see gtc_matrix_integer - typedef mediump_umat2 umat2; - - /// Unsigned integer 3x3 matrix. - /// @see gtc_matrix_integer - typedef mediump_umat3 umat3; - - /// Unsigned integer 4x4 matrix. - /// @see gtc_matrix_integer - typedef mediump_umat4 umat4; - - /// Unsigned integer 2x2 matrix. - /// @see gtc_matrix_integer - typedef mediump_umat2x2 umat2x2; - - /// Unsigned integer 2x3 matrix. - /// @see gtc_matrix_integer - typedef mediump_umat2x3 umat2x3; - - /// Unsigned integer 2x4 matrix. - /// @see gtc_matrix_integer - typedef mediump_umat2x4 umat2x4; - - /// Unsigned integer 3x2 matrix. - /// @see gtc_matrix_integer - typedef mediump_umat3x2 umat3x2; - - /// Unsigned integer 3x3 matrix. - /// @see gtc_matrix_integer - typedef mediump_umat3x3 umat3x3; - - /// Unsigned integer 3x4 matrix. - /// @see gtc_matrix_integer - typedef mediump_umat3x4 umat3x4; - - /// Unsigned integer 4x2 matrix. - /// @see gtc_matrix_integer - typedef mediump_umat4x2 umat4x2; - - /// Unsigned integer 4x3 matrix. - /// @see gtc_matrix_integer - typedef mediump_umat4x3 umat4x3; - - /// Unsigned integer 4x4 matrix. - /// @see gtc_matrix_integer - typedef mediump_umat4x4 umat4x4; -#endif//GLM_PRECISION - - /// @} -}//namespace glm - -#endif//GLM_GTC_matrix_integer +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_matrix_integer +/// @file glm/gtc/matrix_integer.hpp +/// @date 2011-01-20 / 2011-06-05 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtc_matrix_integer GLM_GTC_matrix_integer +/// @ingroup gtc +/// +/// Defines a number of matrices with integer types. +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_matrix_integer +#define GLM_GTC_matrix_integer GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_matrix_integer extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_matrix_integer + /// @{ + + /// High-precision signed integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 highp_imat2; + + /// High-precision signed integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 highp_imat3; + + /// High-precision signed integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 highp_imat4; + + /// High-precision signed integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 highp_imat2x2; + + /// High-precision signed integer 2x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x3 highp_imat2x3; + + /// High-precision signed integer 2x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x4 highp_imat2x4; + + /// High-precision signed integer 3x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x2 highp_imat3x2; + + /// High-precision signed integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 highp_imat3x3; + + /// High-precision signed integer 3x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x4 highp_imat3x4; + + /// High-precision signed integer 4x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x2 highp_imat4x2; + + /// High-precision signed integer 4x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x3 highp_imat4x3; + + /// High-precision signed integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 highp_imat4x4; + + + /// Medium-precision signed integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 mediump_imat2; + + /// Medium-precision signed integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 mediump_imat3; + + /// Medium-precision signed integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 mediump_imat4; + + + /// Medium-precision signed integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 mediump_imat2x2; + + /// Medium-precision signed integer 2x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x3 mediump_imat2x3; + + /// Medium-precision signed integer 2x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x4 mediump_imat2x4; + + /// Medium-precision signed integer 3x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x2 mediump_imat3x2; + + /// Medium-precision signed integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 mediump_imat3x3; + + /// Medium-precision signed integer 3x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x4 mediump_imat3x4; + + /// Medium-precision signed integer 4x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x2 mediump_imat4x2; + + /// Medium-precision signed integer 4x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x3 mediump_imat4x3; + + /// Medium-precision signed integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 mediump_imat4x4; + + + /// Low-precision signed integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 lowp_imat2; + + /// Low-precision signed integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 lowp_imat3; + + /// Low-precision signed integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 lowp_imat4; + + + /// Low-precision signed integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 lowp_imat2x2; + + /// Low-precision signed integer 2x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x3 lowp_imat2x3; + + /// Low-precision signed integer 2x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x4 lowp_imat2x4; + + /// Low-precision signed integer 3x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x2 lowp_imat3x2; + + /// Low-precision signed integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 lowp_imat3x3; + + /// Low-precision signed integer 3x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x4 lowp_imat3x4; + + /// Low-precision signed integer 4x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x2 lowp_imat4x2; + + /// Low-precision signed integer 4x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x3 lowp_imat4x3; + + /// Low-precision signed integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 lowp_imat4x4; + + + /// High-precision unsigned integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 highp_umat2; + + /// High-precision unsigned integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 highp_umat3; + + /// High-precision unsigned integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 highp_umat4; + + /// High-precision unsigned integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 highp_umat2x2; + + /// High-precision unsigned integer 2x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x3 highp_umat2x3; + + /// High-precision unsigned integer 2x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x4 highp_umat2x4; + + /// High-precision unsigned integer 3x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x2 highp_umat3x2; + + /// High-precision unsigned integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 highp_umat3x3; + + /// High-precision unsigned integer 3x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x4 highp_umat3x4; + + /// High-precision unsigned integer 4x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x2 highp_umat4x2; + + /// High-precision unsigned integer 4x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x3 highp_umat4x3; + + /// High-precision unsigned integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 highp_umat4x4; + + + /// Medium-precision unsigned integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 mediump_umat2; + + /// Medium-precision unsigned integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 mediump_umat3; + + /// Medium-precision unsigned integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 mediump_umat4; + + + /// Medium-precision unsigned integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 mediump_umat2x2; + + /// Medium-precision unsigned integer 2x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x3 mediump_umat2x3; + + /// Medium-precision unsigned integer 2x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x4 mediump_umat2x4; + + /// Medium-precision unsigned integer 3x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x2 mediump_umat3x2; + + /// Medium-precision unsigned integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 mediump_umat3x3; + + /// Medium-precision unsigned integer 3x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x4 mediump_umat3x4; + + /// Medium-precision unsigned integer 4x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x2 mediump_umat4x2; + + /// Medium-precision unsigned integer 4x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x3 mediump_umat4x3; + + /// Medium-precision unsigned integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 mediump_umat4x4; + + + /// Low-precision unsigned integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 lowp_umat2; + + /// Low-precision unsigned integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 lowp_umat3; + + /// Low-precision unsigned integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 lowp_umat4; + + + /// Low-precision unsigned integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x2 lowp_umat2x2; + + /// Low-precision unsigned integer 2x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x3 lowp_umat2x3; + + /// Low-precision unsigned integer 2x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat2x4 lowp_umat2x4; + + /// Low-precision unsigned integer 3x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x2 lowp_umat3x2; + + /// Low-precision unsigned integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x3 lowp_umat3x3; + + /// Low-precision unsigned integer 3x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat3x4 lowp_umat3x4; + + /// Low-precision unsigned integer 4x2 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x2 lowp_umat4x2; + + /// Low-precision unsigned integer 4x3 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x3 lowp_umat4x3; + + /// Low-precision unsigned integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef detail::tmat4x4 lowp_umat4x4; + +#if(defined(GLM_PRECISION_HIGHP_INT)) + typedef highp_imat2 imat2; + typedef highp_imat3 imat3; + typedef highp_imat4 imat4; + typedef highp_imat2x2 imat2x2; + typedef highp_imat2x3 imat2x3; + typedef highp_imat2x4 imat2x4; + typedef highp_imat3x2 imat3x2; + typedef highp_imat3x3 imat3x3; + typedef highp_imat3x4 imat3x4; + typedef highp_imat4x2 imat4x2; + typedef highp_imat4x3 imat4x3; + typedef highp_imat4x4 imat4x4; +#elif(defined(GLM_PRECISION_LOWP_INT)) + typedef lowp_imat2 imat2; + typedef lowp_imat3 imat3; + typedef lowp_imat4 imat4; + typedef lowp_imat2x2 imat2x2; + typedef lowp_imat2x3 imat2x3; + typedef lowp_imat2x4 imat2x4; + typedef lowp_imat3x2 imat3x2; + typedef lowp_imat3x3 imat3x3; + typedef lowp_imat3x4 imat3x4; + typedef lowp_imat4x2 imat4x2; + typedef lowp_imat4x3 imat4x3; + typedef lowp_imat4x4 imat4x4; +#else //if(defined(GLM_PRECISION_MEDIUMP_INT)) + + /// Signed integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat2 imat2; + + /// Signed integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat3 imat3; + + /// Signed integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat4 imat4; + + /// Signed integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat2x2 imat2x2; + + /// Signed integer 2x3 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat2x3 imat2x3; + + /// Signed integer 2x4 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat2x4 imat2x4; + + /// Signed integer 3x2 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat3x2 imat3x2; + + /// Signed integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat3x3 imat3x3; + + /// Signed integer 3x4 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat3x4 imat3x4; + + /// Signed integer 4x2 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat4x2 imat4x2; + + /// Signed integer 4x3 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat4x3 imat4x3; + + /// Signed integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef mediump_imat4x4 imat4x4; +#endif//GLM_PRECISION + +#if(defined(GLM_PRECISION_HIGHP_UINT)) + typedef highp_umat2 umat2; + typedef highp_umat3 umat3; + typedef highp_umat4 umat4; + typedef highp_umat2x2 umat2x2; + typedef highp_umat2x3 umat2x3; + typedef highp_umat2x4 umat2x4; + typedef highp_umat3x2 umat3x2; + typedef highp_umat3x3 umat3x3; + typedef highp_umat3x4 umat3x4; + typedef highp_umat4x2 umat4x2; + typedef highp_umat4x3 umat4x3; + typedef highp_umat4x4 umat4x4; +#elif(defined(GLM_PRECISION_LOWP_UINT)) + typedef lowp_umat2 umat2; + typedef lowp_umat3 umat3; + typedef lowp_umat4 umat4; + typedef lowp_umat2x2 umat2x2; + typedef lowp_umat2x3 umat2x3; + typedef lowp_umat2x4 umat2x4; + typedef lowp_umat3x2 umat3x2; + typedef lowp_umat3x3 umat3x3; + typedef lowp_umat3x4 umat3x4; + typedef lowp_umat4x2 umat4x2; + typedef lowp_umat4x3 umat4x3; + typedef lowp_umat4x4 umat4x4; +#else //if(defined(GLM_PRECISION_MEDIUMP_UINT)) + + /// Unsigned integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat2 umat2; + + /// Unsigned integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat3 umat3; + + /// Unsigned integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat4 umat4; + + /// Unsigned integer 2x2 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat2x2 umat2x2; + + /// Unsigned integer 2x3 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat2x3 umat2x3; + + /// Unsigned integer 2x4 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat2x4 umat2x4; + + /// Unsigned integer 3x2 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat3x2 umat3x2; + + /// Unsigned integer 3x3 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat3x3 umat3x3; + + /// Unsigned integer 3x4 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat3x4 umat3x4; + + /// Unsigned integer 4x2 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat4x2 umat4x2; + + /// Unsigned integer 4x3 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat4x3 umat4x3; + + /// Unsigned integer 4x4 matrix. + /// @see gtc_matrix_integer + typedef mediump_umat4x4 umat4x4; +#endif//GLM_PRECISION + + /// @} +}//namespace glm + +#endif//GLM_GTC_matrix_integer diff --git a/include/gal/opengl/glm/gtc/matrix_inverse.hpp b/include/gal/opengl/glm/gtc/matrix_inverse.hpp index 92b41bf5b0..77d702d1d9 100644 --- a/include/gal/opengl/glm/gtc/matrix_inverse.hpp +++ b/include/gal/opengl/glm/gtc/matrix_inverse.hpp @@ -1,74 +1,74 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_matrix_inverse -/// @file glm/gtc/matrix_inverse.hpp -/// @date 2005-12-21 / 2011-06-05 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtc_matrix_inverse GLM_GTC_matrix_inverse -/// @ingroup gtc -/// -/// Defines additional matrix inverting functions. -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTC_matrix_inverse -#define GLM_GTC_matrix_inverse GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTC_matrix_inverse extension included") -#endif - -namespace glm -{ - /// @addtogroup gtc_matrix_inverse - /// @{ - - /// Fast matrix inverse for affine matrix. - /// - /// @param m Input matrix to invert. - /// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-precision floating point value is highly innacurate. - /// @see gtc_matrix_inverse - template - genType affineInverse(genType const & m); - - /// Compute the inverse transpose of a matrix. - /// - /// @param m Input matrix to invert transpose. - /// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-precision floating point value is highly innacurate. - /// @see gtc_matrix_inverse - template - GLM_FUNC_QUALIFIER typename genType::value_type inverseTranspose( - genType const & m); - - /// @} -}//namespace glm - -#include "matrix_inverse.inl" - -#endif//GLM_GTC_matrix_inverse +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_matrix_inverse +/// @file glm/gtc/matrix_inverse.hpp +/// @date 2005-12-21 / 2011-06-05 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtc_matrix_inverse GLM_GTC_matrix_inverse +/// @ingroup gtc +/// +/// Defines additional matrix inverting functions. +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_matrix_inverse +#define GLM_GTC_matrix_inverse GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_matrix_inverse extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_matrix_inverse + /// @{ + + /// Fast matrix inverse for affine matrix. + /// + /// @param m Input matrix to invert. + /// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-precision floating point value is highly innacurate. + /// @see gtc_matrix_inverse + template + genType affineInverse(genType const & m); + + /// Compute the inverse transpose of a matrix. + /// + /// @param m Input matrix to invert transpose. + /// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-precision floating point value is highly innacurate. + /// @see gtc_matrix_inverse + template + GLM_FUNC_QUALIFIER typename genType::value_type inverseTranspose( + genType const & m); + + /// @} +}//namespace glm + +#include "matrix_inverse.inl" + +#endif//GLM_GTC_matrix_inverse diff --git a/include/gal/opengl/glm/gtc/matrix_inverse.inl b/include/gal/opengl/glm/gtc/matrix_inverse.inl index 5f5b067084..c6deb061db 100644 --- a/include/gal/opengl/glm/gtc/matrix_inverse.inl +++ b/include/gal/opengl/glm/gtc/matrix_inverse.inl @@ -1,159 +1,159 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_matrix_inverse -/// @file glm/gtc/matrix_inverse.inl -/// @date 2005-12-21 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER detail::tmat3x3 affineInverse - ( - detail::tmat3x3 const & m - ) - { - detail::tmat3x3 Result(m); - Result[2] = detail::tvec3(0, 0, 1); - Result = transpose(Result); - detail::tvec3 Translation = Result * detail::tvec3(-detail::tvec2(m[2]), m[2][2]); - Result[2] = Translation; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 affineInverse - ( - detail::tmat4x4 const & m - ) - { - detail::tmat4x4 Result(m); - Result[3] = detail::tvec4(0, 0, 0, 1); - Result = transpose(Result); - detail::tvec4 Translation = Result * detail::tvec4(-detail::tvec3(m[3]), m[3][3]); - Result[3] = Translation; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat2x2 inverseTranspose - ( - detail::tmat2x2 const & m - ) - { - valType Determinant = m[0][0] * m[1][1] - m[1][0] * m[0][1]; - - detail::tmat2x2 Inverse( - + m[1][1] / Determinant, - - m[0][1] / Determinant, - - m[1][0] / Determinant, - + m[0][0] / Determinant); - - return Inverse; - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x3 inverseTranspose - ( - detail::tmat3x3 const & m - ) - { - valType Determinant = - + m[0][0] * (m[1][1] * m[2][2] - m[1][2] * m[2][1]) - - m[0][1] * (m[1][0] * m[2][2] - m[1][2] * m[2][0]) - + m[0][2] * (m[1][0] * m[2][1] - m[1][1] * m[2][0]); - - detail::tmat3x3 Inverse; - Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]); - Inverse[0][1] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]); - Inverse[0][2] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]); - Inverse[1][0] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]); - Inverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]); - Inverse[1][2] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]); - Inverse[2][0] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]); - Inverse[2][1] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]); - Inverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]); - Inverse /= Determinant; - - return Inverse; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 inverseTranspose - ( - detail::tmat4x4 const & m - ) - { - valType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3]; - valType SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3]; - valType SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2]; - valType SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3]; - valType SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2]; - valType SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1]; - valType SubFactor06 = m[1][2] * m[3][3] - m[3][2] * m[1][3]; - valType SubFactor07 = m[1][1] * m[3][3] - m[3][1] * m[1][3]; - valType SubFactor08 = m[1][1] * m[3][2] - m[3][1] * m[1][2]; - valType SubFactor09 = m[1][0] * m[3][3] - m[3][0] * m[1][3]; - valType SubFactor10 = m[1][0] * m[3][2] - m[3][0] * m[1][2]; - valType SubFactor11 = m[1][1] * m[3][3] - m[3][1] * m[1][3]; - valType SubFactor12 = m[1][0] * m[3][1] - m[3][0] * m[1][1]; - valType SubFactor13 = m[1][2] * m[2][3] - m[2][2] * m[1][3]; - valType SubFactor14 = m[1][1] * m[2][3] - m[2][1] * m[1][3]; - valType SubFactor15 = m[1][1] * m[2][2] - m[2][1] * m[1][2]; - valType SubFactor16 = m[1][0] * m[2][3] - m[2][0] * m[1][3]; - valType SubFactor17 = m[1][0] * m[2][2] - m[2][0] * m[1][2]; - valType SubFactor18 = m[1][0] * m[2][1] - m[2][0] * m[1][1]; - - detail::tmat4x4 Inverse; - Inverse[0][0] = + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02); - Inverse[0][1] = - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04); - Inverse[0][2] = + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05); - Inverse[0][3] = - (m[1][0] * SubFactor02 - m[1][1] * SubFactor04 + m[1][2] * SubFactor05); - - Inverse[1][0] = - (m[0][1] * SubFactor00 - m[0][2] * SubFactor01 + m[0][3] * SubFactor02); - Inverse[1][1] = + (m[0][0] * SubFactor00 - m[0][2] * SubFactor03 + m[0][3] * SubFactor04); - Inverse[1][2] = - (m[0][0] * SubFactor01 - m[0][1] * SubFactor03 + m[0][3] * SubFactor05); - Inverse[1][3] = + (m[0][0] * SubFactor02 - m[0][1] * SubFactor04 + m[0][2] * SubFactor05); - - Inverse[2][0] = + (m[0][1] * SubFactor06 - m[0][2] * SubFactor07 + m[0][3] * SubFactor08); - Inverse[2][1] = - (m[0][0] * SubFactor06 - m[0][2] * SubFactor09 + m[0][3] * SubFactor10); - Inverse[2][2] = + (m[0][0] * SubFactor11 - m[0][1] * SubFactor09 + m[0][3] * SubFactor12); - Inverse[2][3] = - (m[0][0] * SubFactor08 - m[0][1] * SubFactor10 + m[0][2] * SubFactor12); - - Inverse[3][0] = - (m[0][1] * SubFactor13 - m[0][2] * SubFactor14 + m[0][3] * SubFactor15); - Inverse[3][1] = + (m[0][0] * SubFactor13 - m[0][2] * SubFactor16 + m[0][3] * SubFactor17); - Inverse[3][2] = - (m[0][0] * SubFactor14 - m[0][1] * SubFactor16 + m[0][3] * SubFactor18); - Inverse[3][3] = + (m[0][0] * SubFactor15 - m[0][1] * SubFactor17 + m[0][2] * SubFactor18); - - valType Determinant = - + m[0][0] * Inverse[0][0] - + m[0][1] * Inverse[0][1] - + m[0][2] * Inverse[0][2] - + m[0][3] * Inverse[0][3]; - - Inverse /= Determinant; - - return Inverse; - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_matrix_inverse +/// @file glm/gtc/matrix_inverse.inl +/// @date 2005-12-21 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tmat3x3 affineInverse + ( + detail::tmat3x3 const & m + ) + { + detail::tmat3x3 Result(m); + Result[2] = detail::tvec3(0, 0, 1); + Result = transpose(Result); + detail::tvec3 Translation = Result * detail::tvec3(-detail::tvec2(m[2]), m[2][2]); + Result[2] = Translation; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 affineInverse + ( + detail::tmat4x4 const & m + ) + { + detail::tmat4x4 Result(m); + Result[3] = detail::tvec4(0, 0, 0, 1); + Result = transpose(Result); + detail::tvec4 Translation = Result * detail::tvec4(-detail::tvec3(m[3]), m[3][3]); + Result[3] = Translation; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x2 inverseTranspose + ( + detail::tmat2x2 const & m + ) + { + valType Determinant = m[0][0] * m[1][1] - m[1][0] * m[0][1]; + + detail::tmat2x2 Inverse( + + m[1][1] / Determinant, + - m[0][1] / Determinant, + - m[1][0] / Determinant, + + m[0][0] / Determinant); + + return Inverse; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 inverseTranspose + ( + detail::tmat3x3 const & m + ) + { + valType Determinant = + + m[0][0] * (m[1][1] * m[2][2] - m[1][2] * m[2][1]) + - m[0][1] * (m[1][0] * m[2][2] - m[1][2] * m[2][0]) + + m[0][2] * (m[1][0] * m[2][1] - m[1][1] * m[2][0]); + + detail::tmat3x3 Inverse; + Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]); + Inverse[0][1] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]); + Inverse[0][2] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]); + Inverse[1][0] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]); + Inverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]); + Inverse[1][2] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]); + Inverse[2][0] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]); + Inverse[2][1] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]); + Inverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]); + Inverse /= Determinant; + + return Inverse; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 inverseTranspose + ( + detail::tmat4x4 const & m + ) + { + valType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3]; + valType SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3]; + valType SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2]; + valType SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3]; + valType SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2]; + valType SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1]; + valType SubFactor06 = m[1][2] * m[3][3] - m[3][2] * m[1][3]; + valType SubFactor07 = m[1][1] * m[3][3] - m[3][1] * m[1][3]; + valType SubFactor08 = m[1][1] * m[3][2] - m[3][1] * m[1][2]; + valType SubFactor09 = m[1][0] * m[3][3] - m[3][0] * m[1][3]; + valType SubFactor10 = m[1][0] * m[3][2] - m[3][0] * m[1][2]; + valType SubFactor11 = m[1][1] * m[3][3] - m[3][1] * m[1][3]; + valType SubFactor12 = m[1][0] * m[3][1] - m[3][0] * m[1][1]; + valType SubFactor13 = m[1][2] * m[2][3] - m[2][2] * m[1][3]; + valType SubFactor14 = m[1][1] * m[2][3] - m[2][1] * m[1][3]; + valType SubFactor15 = m[1][1] * m[2][2] - m[2][1] * m[1][2]; + valType SubFactor16 = m[1][0] * m[2][3] - m[2][0] * m[1][3]; + valType SubFactor17 = m[1][0] * m[2][2] - m[2][0] * m[1][2]; + valType SubFactor18 = m[1][0] * m[2][1] - m[2][0] * m[1][1]; + + detail::tmat4x4 Inverse; + Inverse[0][0] = + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02); + Inverse[0][1] = - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04); + Inverse[0][2] = + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05); + Inverse[0][3] = - (m[1][0] * SubFactor02 - m[1][1] * SubFactor04 + m[1][2] * SubFactor05); + + Inverse[1][0] = - (m[0][1] * SubFactor00 - m[0][2] * SubFactor01 + m[0][3] * SubFactor02); + Inverse[1][1] = + (m[0][0] * SubFactor00 - m[0][2] * SubFactor03 + m[0][3] * SubFactor04); + Inverse[1][2] = - (m[0][0] * SubFactor01 - m[0][1] * SubFactor03 + m[0][3] * SubFactor05); + Inverse[1][3] = + (m[0][0] * SubFactor02 - m[0][1] * SubFactor04 + m[0][2] * SubFactor05); + + Inverse[2][0] = + (m[0][1] * SubFactor06 - m[0][2] * SubFactor07 + m[0][3] * SubFactor08); + Inverse[2][1] = - (m[0][0] * SubFactor06 - m[0][2] * SubFactor09 + m[0][3] * SubFactor10); + Inverse[2][2] = + (m[0][0] * SubFactor11 - m[0][1] * SubFactor09 + m[0][3] * SubFactor12); + Inverse[2][3] = - (m[0][0] * SubFactor08 - m[0][1] * SubFactor10 + m[0][2] * SubFactor12); + + Inverse[3][0] = - (m[0][1] * SubFactor13 - m[0][2] * SubFactor14 + m[0][3] * SubFactor15); + Inverse[3][1] = + (m[0][0] * SubFactor13 - m[0][2] * SubFactor16 + m[0][3] * SubFactor17); + Inverse[3][2] = - (m[0][0] * SubFactor14 - m[0][1] * SubFactor16 + m[0][3] * SubFactor18); + Inverse[3][3] = + (m[0][0] * SubFactor15 - m[0][1] * SubFactor17 + m[0][2] * SubFactor18); + + valType Determinant = + + m[0][0] * Inverse[0][0] + + m[0][1] * Inverse[0][1] + + m[0][2] * Inverse[0][2] + + m[0][3] * Inverse[0][3]; + + Inverse /= Determinant; + + return Inverse; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtc/matrix_transform.hpp b/include/gal/opengl/glm/gtc/matrix_transform.hpp index a8f894adf2..128209af7c 100644 --- a/include/gal/opengl/glm/gtc/matrix_transform.hpp +++ b/include/gal/opengl/glm/gtc/matrix_transform.hpp @@ -1,291 +1,291 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_matrix_transform -/// @file glm/gtc/matrix_transform.hpp -/// @date 2009-04-29 / 2011-05-16 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_transform -/// @see gtx_transform2 -/// -/// @defgroup gtc_matrix_transform GLM_GTC_matrix_transform -/// @ingroup gtc -/// -/// @brief Defines functions that generate common transformation matrices. -/// -/// The matrices generated by this extension use standard OpenGL fixed-function -/// conventions. For example, the lookAt function generates a transform from world -/// space into the specific eye space that the projective matrix functions -/// (perspective, ortho, etc) are designed to expect. The OpenGL compatibility -/// specifications defines the particular layout of this eye space. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTC_matrix_transform -#define GLM_GTC_matrix_transform GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTC_matrix_transform extension included") -#endif - -namespace glm -{ - /// @addtogroup gtc_matrix_transform - /// @{ - - /// Builds a translation 4 * 4 matrix created from a vector of 3 components. - /// - /// @param m Input matrix multiplied by this translation matrix. - /// @param v Coordinates of a translation vector. - /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. - /// @code - /// #include - /// #include - /// ... - /// glm::mat4 m = glm::translate(glm::mat4(1.0f), glm::vec3(1.0f)); - /// // m[0][0] == 1.0f, m[0][1] == 0.0f, m[0][2] == 0.0f, m[0][3] == 0.0f - /// // m[1][0] == 0.0f, m[1][1] == 1.0f, m[1][2] == 0.0f, m[1][3] == 0.0f - /// // m[2][0] == 0.0f, m[2][1] == 0.0f, m[2][2] == 1.0f, m[2][3] == 0.0f - /// // m[3][0] == 1.0f, m[3][1] == 1.0f, m[3][2] == 1.0f, m[3][3] == 1.0f - /// @endcode - /// @see gtc_matrix_transform - /// @see gtx_transform - /// @see - translate(T x, T y, T z) - /// @see - translate(detail::tmat4x4 const & m, T x, T y, T z) - /// @see - translate(detail::tvec3 const & v) - template - detail::tmat4x4 translate( - detail::tmat4x4 const & m, - detail::tvec3 const & v); - - /// Builds a rotation 4 * 4 matrix created from an axis vector and an angle. - /// - /// @param m Input matrix multiplied by this rotation matrix. - /// @param angle Rotation angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. - /// @param axis Rotation axis, recommanded to be normalized. - /// @tparam T Value type used to build the matrix. Supported: half, float or double. - /// @see gtc_matrix_transform - /// @see gtx_transform - /// @see - rotate(T angle, T x, T y, T z) - /// @see - rotate(detail::tmat4x4 const & m, T angle, T x, T y, T z) - /// @see - rotate(T angle, detail::tvec3 const & v) - template - detail::tmat4x4 rotate( - detail::tmat4x4 const & m, - T const & angle, - detail::tvec3 const & axis); - - /// Builds a scale 4 * 4 matrix created from 3 scalars. - /// - /// @param m Input matrix multiplied by this scale matrix. - /// @param v Ratio of scaling for each axis. - /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. - /// @see gtc_matrix_transform - /// @see gtx_transform - /// @see - scale(T x, T y, T z) scale(T const & x, T const & y, T const & z) - /// @see - scale(detail::tmat4x4 const & m, T x, T y, T z) - /// @see - scale(detail::tvec3 const & v) - template - detail::tmat4x4 scale( - detail::tmat4x4 const & m, - detail::tvec3 const & v); - - /// Creates a matrix for an orthographic parallel viewing volume. - /// - /// @param left - /// @param right - /// @param bottom - /// @param top - /// @param zNear - /// @param zFar - /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. - /// @see gtc_matrix_transform - /// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top) - template - detail::tmat4x4 ortho( - T const & left, - T const & right, - T const & bottom, - T const & top, - T const & zNear, - T const & zFar); - - /// Creates a matrix for projecting two-dimensional coordinates onto the screen. - /// - /// @param left - /// @param right - /// @param bottom - /// @param top - /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. - /// @see gtc_matrix_transform - /// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar) - template - detail::tmat4x4 ortho( - T const & left, - T const & right, - T const & bottom, - T const & top); - - /// Creates a frustum matrix. - /// - /// @param left - /// @param right - /// @param bottom - /// @param top - /// @param near - /// @param far - /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. - /// @see gtc_matrix_transform - template - detail::tmat4x4 frustum( - T const & left, - T const & right, - T const & bottom, - T const & top, - T const & near, - T const & far); - - /// Creates a matrix for a symetric perspective-view frustum. - /// - /// @param fovy Expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. - /// @param aspect - /// @param near - /// @param far - /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. - /// @see gtc_matrix_transform - template - detail::tmat4x4 perspective( - T const & fovy, - T const & aspect, - T const & near, - T const & far); - - /// Builds a perspective projection matrix based on a field of view. - /// - /// @param fov Expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. - /// @param width - /// @param height - /// @param near - /// @param far - /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. - /// @see gtc_matrix_transform - template - detail::tmat4x4 perspectiveFov( - valType const & fov, - valType const & width, - valType const & height, - valType const & near, - valType const & far); - - /// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite. - /// - /// @param fovy Expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. - /// @param aspect - /// @param near - /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. - /// @see gtc_matrix_transform - template - detail::tmat4x4 infinitePerspective( - T fovy, T aspect, T near); - - /// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping. - /// - /// @param fovy Expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. - /// @param aspect - /// @param near - /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. - /// @see gtc_matrix_transform - template - detail::tmat4x4 tweakedInfinitePerspective( - T fovy, T aspect, T near); - - /// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates. - /// - /// @param obj - /// @param model - /// @param proj - /// @param viewport - /// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double. - /// @tparam U Currently supported: Floating-point types and integer types. - /// @see gtc_matrix_transform - template - detail::tvec3 project( - detail::tvec3 const & obj, - detail::tmat4x4 const & model, - detail::tmat4x4 const & proj, - detail::tvec4 const & viewport); - - /// Map the specified window coordinates (win.x, win.y, win.z) into object coordinates. - /// - /// @param win - /// @param model - /// @param proj - /// @param viewport - /// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double. - /// @tparam U Currently supported: Floating-point types and integer types. - /// @see gtc_matrix_transform - template - detail::tvec3 unProject( - detail::tvec3 const & win, - detail::tmat4x4 const & model, - detail::tmat4x4 const & proj, - detail::tvec4 const & viewport); - - /// Define a picking region - /// - /// @param center - /// @param delta - /// @param viewport - /// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double. - /// @tparam U Currently supported: Floating-point types and integer types. - /// @see gtc_matrix_transform - template - detail::tmat4x4 pickMatrix( - detail::tvec2 const & center, - detail::tvec2 const & delta, - detail::tvec4 const & viewport); - - /// Build a look at view matrix. - /// - /// @param eye Position of the camera - /// @param center Position where the camera is looking at - /// @param up Normalized up vector, how the camera is oriented. Typically (0, 0, 1) - /// @see gtc_matrix_transform - /// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) - template - detail::tmat4x4 lookAt( - detail::tvec3 const & eye, - detail::tvec3 const & center, - detail::tvec3 const & up); - - /// @} -}//namespace glm - -#include "matrix_transform.inl" - -#endif//GLM_GTC_matrix_transform +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_matrix_transform +/// @file glm/gtc/matrix_transform.hpp +/// @date 2009-04-29 / 2011-05-16 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_transform +/// @see gtx_transform2 +/// +/// @defgroup gtc_matrix_transform GLM_GTC_matrix_transform +/// @ingroup gtc +/// +/// @brief Defines functions that generate common transformation matrices. +/// +/// The matrices generated by this extension use standard OpenGL fixed-function +/// conventions. For example, the lookAt function generates a transform from world +/// space into the specific eye space that the projective matrix functions +/// (perspective, ortho, etc) are designed to expect. The OpenGL compatibility +/// specifications defines the particular layout of this eye space. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_matrix_transform +#define GLM_GTC_matrix_transform GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_matrix_transform extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_matrix_transform + /// @{ + + /// Builds a translation 4 * 4 matrix created from a vector of 3 components. + /// + /// @param m Input matrix multiplied by this translation matrix. + /// @param v Coordinates of a translation vector. + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @code + /// #include + /// #include + /// ... + /// glm::mat4 m = glm::translate(glm::mat4(1.0f), glm::vec3(1.0f)); + /// // m[0][0] == 1.0f, m[0][1] == 0.0f, m[0][2] == 0.0f, m[0][3] == 0.0f + /// // m[1][0] == 0.0f, m[1][1] == 1.0f, m[1][2] == 0.0f, m[1][3] == 0.0f + /// // m[2][0] == 0.0f, m[2][1] == 0.0f, m[2][2] == 1.0f, m[2][3] == 0.0f + /// // m[3][0] == 1.0f, m[3][1] == 1.0f, m[3][2] == 1.0f, m[3][3] == 1.0f + /// @endcode + /// @see gtc_matrix_transform + /// @see gtx_transform + /// @see - translate(T x, T y, T z) + /// @see - translate(detail::tmat4x4 const & m, T x, T y, T z) + /// @see - translate(detail::tvec3 const & v) + template + detail::tmat4x4 translate( + detail::tmat4x4 const & m, + detail::tvec3 const & v); + + /// Builds a rotation 4 * 4 matrix created from an axis vector and an angle. + /// + /// @param m Input matrix multiplied by this rotation matrix. + /// @param angle Rotation angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. + /// @param axis Rotation axis, recommanded to be normalized. + /// @tparam T Value type used to build the matrix. Supported: half, float or double. + /// @see gtc_matrix_transform + /// @see gtx_transform + /// @see - rotate(T angle, T x, T y, T z) + /// @see - rotate(detail::tmat4x4 const & m, T angle, T x, T y, T z) + /// @see - rotate(T angle, detail::tvec3 const & v) + template + detail::tmat4x4 rotate( + detail::tmat4x4 const & m, + T const & angle, + detail::tvec3 const & axis); + + /// Builds a scale 4 * 4 matrix created from 3 scalars. + /// + /// @param m Input matrix multiplied by this scale matrix. + /// @param v Ratio of scaling for each axis. + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @see gtc_matrix_transform + /// @see gtx_transform + /// @see - scale(T x, T y, T z) scale(T const & x, T const & y, T const & z) + /// @see - scale(detail::tmat4x4 const & m, T x, T y, T z) + /// @see - scale(detail::tvec3 const & v) + template + detail::tmat4x4 scale( + detail::tmat4x4 const & m, + detail::tvec3 const & v); + + /// Creates a matrix for an orthographic parallel viewing volume. + /// + /// @param left + /// @param right + /// @param bottom + /// @param top + /// @param zNear + /// @param zFar + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @see gtc_matrix_transform + /// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top) + template + detail::tmat4x4 ortho( + T const & left, + T const & right, + T const & bottom, + T const & top, + T const & zNear, + T const & zFar); + + /// Creates a matrix for projecting two-dimensional coordinates onto the screen. + /// + /// @param left + /// @param right + /// @param bottom + /// @param top + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @see gtc_matrix_transform + /// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar) + template + detail::tmat4x4 ortho( + T const & left, + T const & right, + T const & bottom, + T const & top); + + /// Creates a frustum matrix. + /// + /// @param left + /// @param right + /// @param bottom + /// @param top + /// @param near + /// @param far + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @see gtc_matrix_transform + template + detail::tmat4x4 frustum( + T const & left, + T const & right, + T const & bottom, + T const & top, + T const & near, + T const & far); + + /// Creates a matrix for a symetric perspective-view frustum. + /// + /// @param fovy Expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. + /// @param aspect + /// @param near + /// @param far + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @see gtc_matrix_transform + template + detail::tmat4x4 perspective( + T const & fovy, + T const & aspect, + T const & near, + T const & far); + + /// Builds a perspective projection matrix based on a field of view. + /// + /// @param fov Expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. + /// @param width + /// @param height + /// @param near + /// @param far + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @see gtc_matrix_transform + template + detail::tmat4x4 perspectiveFov( + valType const & fov, + valType const & width, + valType const & height, + valType const & near, + valType const & far); + + /// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite. + /// + /// @param fovy Expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. + /// @param aspect + /// @param near + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @see gtc_matrix_transform + template + detail::tmat4x4 infinitePerspective( + T fovy, T aspect, T near); + + /// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping. + /// + /// @param fovy Expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. + /// @param aspect + /// @param near + /// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double. + /// @see gtc_matrix_transform + template + detail::tmat4x4 tweakedInfinitePerspective( + T fovy, T aspect, T near); + + /// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates. + /// + /// @param obj + /// @param model + /// @param proj + /// @param viewport + /// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double. + /// @tparam U Currently supported: Floating-point types and integer types. + /// @see gtc_matrix_transform + template + detail::tvec3 project( + detail::tvec3 const & obj, + detail::tmat4x4 const & model, + detail::tmat4x4 const & proj, + detail::tvec4 const & viewport); + + /// Map the specified window coordinates (win.x, win.y, win.z) into object coordinates. + /// + /// @param win + /// @param model + /// @param proj + /// @param viewport + /// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double. + /// @tparam U Currently supported: Floating-point types and integer types. + /// @see gtc_matrix_transform + template + detail::tvec3 unProject( + detail::tvec3 const & win, + detail::tmat4x4 const & model, + detail::tmat4x4 const & proj, + detail::tvec4 const & viewport); + + /// Define a picking region + /// + /// @param center + /// @param delta + /// @param viewport + /// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double. + /// @tparam U Currently supported: Floating-point types and integer types. + /// @see gtc_matrix_transform + template + detail::tmat4x4 pickMatrix( + detail::tvec2 const & center, + detail::tvec2 const & delta, + detail::tvec4 const & viewport); + + /// Build a look at view matrix. + /// + /// @param eye Position of the camera + /// @param center Position where the camera is looking at + /// @param up Normalized up vector, how the camera is oriented. Typically (0, 0, 1) + /// @see gtc_matrix_transform + /// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) + template + detail::tmat4x4 lookAt( + detail::tvec3 const & eye, + detail::tvec3 const & center, + detail::tvec3 const & up); + + /// @} +}//namespace glm + +#include "matrix_transform.inl" + +#endif//GLM_GTC_matrix_transform diff --git a/include/gal/opengl/glm/gtc/matrix_transform.inl b/include/gal/opengl/glm/gtc/matrix_transform.inl index 9fdb583736..2245a4f9b3 100644 --- a/include/gal/opengl/glm/gtc/matrix_transform.inl +++ b/include/gal/opengl/glm/gtc/matrix_transform.inl @@ -1,430 +1,430 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_matrix_transform -/// @file glm/gtc/matrix_transform.inl -/// @date 2009-04-29 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER detail::tmat4x4 translate - ( - detail::tmat4x4 const & m, - detail::tvec3 const & v - ) - { - detail::tmat4x4 Result(m); - Result[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3]; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 rotate - ( - detail::tmat4x4 const & m, - T const & angle, - detail::tvec3 const & v - ) - { -#ifdef GLM_FORCE_RADIANS - T a = angle; -#else - T a = radians(angle); -#endif - T c = cos(a); - T s = sin(a); - - detail::tvec3 axis = normalize(v); - - detail::tvec3 temp = (T(1) - c) * axis; - - detail::tmat4x4 Rotate(detail::tmat4x4::null); - Rotate[0][0] = c + temp[0] * axis[0]; - Rotate[0][1] = 0 + temp[0] * axis[1] + s * axis[2]; - Rotate[0][2] = 0 + temp[0] * axis[2] - s * axis[1]; - - Rotate[1][0] = 0 + temp[1] * axis[0] - s * axis[2]; - Rotate[1][1] = c + temp[1] * axis[1]; - Rotate[1][2] = 0 + temp[1] * axis[2] + s * axis[0]; - - Rotate[2][0] = 0 + temp[2] * axis[0] + s * axis[1]; - Rotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0]; - Rotate[2][2] = c + temp[2] * axis[2]; - - detail::tmat4x4 Result(detail::tmat4x4::null); - Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2]; - Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2]; - Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2]; - Result[3] = m[3]; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 scale - ( - detail::tmat4x4 const & m, - detail::tvec3 const & v - ) - { - detail::tmat4x4 Result(detail::tmat4x4::null); - Result[0] = m[0] * v[0]; - Result[1] = m[1] * v[1]; - Result[2] = m[2] * v[2]; - Result[3] = m[3]; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 translate_slow - ( - detail::tmat4x4 const & m, - detail::tvec3 const & v - ) - { - detail::tmat4x4 Result(T(1)); - Result[3] = detail::tvec4(v, T(1)); - return m * Result; - - //detail::tmat4x4 Result(m); - Result[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3]; - //Result[3][0] = m[0][0] * v[0] + m[1][0] * v[1] + m[2][0] * v[2] + m[3][0]; - //Result[3][1] = m[0][1] * v[0] + m[1][1] * v[1] + m[2][1] * v[2] + m[3][1]; - //Result[3][2] = m[0][2] * v[0] + m[1][2] * v[1] + m[2][2] * v[2] + m[3][2]; - //Result[3][3] = m[0][3] * v[0] + m[1][3] * v[1] + m[2][3] * v[2] + m[3][3]; - //return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 rotate_slow - ( - detail::tmat4x4 const & m, - T const & angle, - detail::tvec3 const & v - ) - { -#ifdef GLM_FORCE_RADIANS - T const a = angle; -#else - T const a = radians(angle); -#endif - T c = cos(a); - T s = sin(a); - detail::tmat4x4 Result; - - detail::tvec3 axis = normalize(v); - - Result[0][0] = c + (1 - c) * axis.x * axis.x; - Result[0][1] = (1 - c) * axis.x * axis.y + s * axis.z; - Result[0][2] = (1 - c) * axis.x * axis.z - s * axis.y; - Result[0][3] = 0; - - Result[1][0] = (1 - c) * axis.y * axis.x - s * axis.z; - Result[1][1] = c + (1 - c) * axis.y * axis.y; - Result[1][2] = (1 - c) * axis.y * axis.z + s * axis.x; - Result[1][3] = 0; - - Result[2][0] = (1 - c) * axis.z * axis.x + s * axis.y; - Result[2][1] = (1 - c) * axis.z * axis.y - s * axis.x; - Result[2][2] = c + (1 - c) * axis.z * axis.z; - Result[2][3] = 0; - - Result[3] = detail::tvec4(0, 0, 0, 1); - return m * Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 scale_slow - ( - detail::tmat4x4 const & m, - detail::tvec3 const & v - ) - { - detail::tmat4x4 Result(T(1)); - Result[0][0] = v.x; - Result[1][1] = v.y; - Result[2][2] = v.z; - return m * Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 ortho - ( - valType const & left, - valType const & right, - valType const & bottom, - valType const & top, - valType const & zNear, - valType const & zFar - ) - { - detail::tmat4x4 Result(1); - Result[0][0] = valType(2) / (right - left); - Result[1][1] = valType(2) / (top - bottom); - Result[2][2] = - valType(2) / (zFar - zNear); - Result[3][0] = - (right + left) / (right - left); - Result[3][1] = - (top + bottom) / (top - bottom); - Result[3][2] = - (zFar + zNear) / (zFar - zNear); - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 ortho( - valType const & left, - valType const & right, - valType const & bottom, - valType const & top) - { - detail::tmat4x4 Result(1); - Result[0][0] = valType(2) / (right - left); - Result[1][1] = valType(2) / (top - bottom); - Result[2][2] = - valType(1); - Result[3][0] = - (right + left) / (right - left); - Result[3][1] = - (top + bottom) / (top - bottom); - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 frustum - ( - valType const & left, - valType const & right, - valType const & bottom, - valType const & top, - valType const & nearVal, - valType const & farVal - ) - { - detail::tmat4x4 Result(0); - Result[0][0] = (valType(2) * nearVal) / (right - left); - Result[1][1] = (valType(2) * nearVal) / (top - bottom); - Result[2][0] = (right + left) / (right - left); - Result[2][1] = (top + bottom) / (top - bottom); - Result[2][2] = -(farVal + nearVal) / (farVal - nearVal); - Result[2][3] = valType(-1); - Result[3][2] = -(valType(2) * farVal * nearVal) / (farVal - nearVal); - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 perspective - ( - valType const & fovy, - valType const & aspect, - valType const & zNear, - valType const & zFar - ) - { - valType range = tan(radians(fovy / valType(2))) * zNear; - valType left = -range * aspect; - valType right = range * aspect; - valType bottom = -range; - valType top = range; - - detail::tmat4x4 Result(valType(0)); - Result[0][0] = (valType(2) * zNear) / (right - left); - Result[1][1] = (valType(2) * zNear) / (top - bottom); - Result[2][2] = - (zFar + zNear) / (zFar - zNear); - Result[2][3] = - valType(1); - Result[3][2] = - (valType(2) * zFar * zNear) / (zFar - zNear); - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 perspectiveFov - ( - valType const & fov, - valType const & width, - valType const & height, - valType const & zNear, - valType const & zFar - ) - { -#ifdef GLM_FORCE_RADIANS - valType rad = fov; -#else - valType rad = glm::radians(fov); -#endif - valType h = glm::cos(valType(0.5) * rad) / glm::sin(valType(0.5) * rad); - valType w = h * height / width; ///todo max(width , Height) / min(width , Height)? - - detail::tmat4x4 Result(valType(0)); - Result[0][0] = w; - Result[1][1] = h; - Result[2][2] = - (zFar + zNear) / (zFar - zNear); - Result[2][3] = - valType(1); - Result[3][2] = - (valType(2) * zFar * zNear) / (zFar - zNear); - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 infinitePerspective - ( - T fovy, - T aspect, - T zNear - ) - { -#ifdef GLM_FORCE_RADIANS - T const range = tan(fovy / T(2)) * zNear; -#else - T const range = tan(radians(fovy / T(2))) * zNear; -#endif - T left = -range * aspect; - T right = range * aspect; - T bottom = -range; - T top = range; - - detail::tmat4x4 Result(T(0)); - Result[0][0] = (T(2) * zNear) / (right - left); - Result[1][1] = (T(2) * zNear) / (top - bottom); - Result[2][2] = - T(1); - Result[2][3] = - T(1); - Result[3][2] = - T(2) * zNear; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 tweakedInfinitePerspective - ( - T fovy, - T aspect, - T zNear - ) - { -#ifdef GLM_FORCE_RADIANS - T range = tan(fovy / T(2)) * zNear; -#else - T range = tan(radians(fovy / T(2))) * zNear; -#endif - T left = -range * aspect; - T right = range * aspect; - T bottom = -range; - T top = range; - - detail::tmat4x4 Result(T(0)); - Result[0][0] = (T(2) * zNear) / (right - left); - Result[1][1] = (T(2) * zNear) / (top - bottom); - Result[2][2] = T(0.0001) - T(1); - Result[2][3] = T(-1); - Result[3][2] = - (T(0.0001) - T(2)) * zNear; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 project - ( - detail::tvec3 const & obj, - detail::tmat4x4 const & model, - detail::tmat4x4 const & proj, - detail::tvec4 const & viewport - ) - { - detail::tvec4 tmp = detail::tvec4(obj, T(1)); - tmp = model * tmp; - tmp = proj * tmp; - - tmp /= tmp.w; - tmp = tmp * T(0.5) + T(0.5); - tmp[0] = tmp[0] * T(viewport[2]) + T(viewport[0]); - tmp[1] = tmp[1] * T(viewport[3]) + T(viewport[1]); - - return detail::tvec3(tmp); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 unProject - ( - detail::tvec3 const & win, - detail::tmat4x4 const & model, - detail::tmat4x4 const & proj, - detail::tvec4 const & viewport - ) - { - detail::tmat4x4 inverse = glm::inverse(proj * model); - - detail::tvec4 tmp = detail::tvec4(win, T(1)); - tmp.x = (tmp.x - T(viewport[0])) / T(viewport[2]); - tmp.y = (tmp.y - T(viewport[1])) / T(viewport[3]); - tmp = tmp * T(2) - T(1); - - detail::tvec4 obj = inverse * tmp; - obj /= obj.w; - - return detail::tvec3(obj); - } - - template - detail::tmat4x4 pickMatrix - ( - detail::tvec2 const & center, - detail::tvec2 const & delta, - detail::tvec4 const & viewport - ) - { - assert(delta.x > T(0) && delta.y > T(0)); - detail::tmat4x4 Result(1.0f); - - if(!(delta.x > T(0) && delta.y > T(0))) - return Result; // Error - - detail::tvec3 Temp( - (T(viewport[2]) - T(2) * (center.x - T(viewport[0]))) / delta.x, - (T(viewport[3]) - T(2) * (center.y - T(viewport[1]))) / delta.y, - T(0)); - - // Translate and scale the picked region to the entire window - Result = translate(Result, Temp); - return scale(Result, detail::tvec3(T(viewport[2]) / delta.x, T(viewport[3]) / delta.y, T(1))); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 lookAt - ( - detail::tvec3 const & eye, - detail::tvec3 const & center, - detail::tvec3 const & up - ) - { - detail::tvec3 f = normalize(center - eye); - detail::tvec3 u = normalize(up); - detail::tvec3 s = normalize(cross(f, u)); - u = cross(s, f); - - detail::tmat4x4 Result(1); - Result[0][0] = s.x; - Result[1][0] = s.y; - Result[2][0] = s.z; - Result[0][1] = u.x; - Result[1][1] = u.y; - Result[2][1] = u.z; - Result[0][2] =-f.x; - Result[1][2] =-f.y; - Result[2][2] =-f.z; - Result[3][0] =-dot(s, eye); - Result[3][1] =-dot(u, eye); - Result[3][2] = dot(f, eye); - return Result; - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_matrix_transform +/// @file glm/gtc/matrix_transform.inl +/// @date 2009-04-29 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tmat4x4 translate + ( + detail::tmat4x4 const & m, + detail::tvec3 const & v + ) + { + detail::tmat4x4 Result(m); + Result[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 rotate + ( + detail::tmat4x4 const & m, + T const & angle, + detail::tvec3 const & v + ) + { +#ifdef GLM_FORCE_RADIANS + T a = angle; +#else + T a = radians(angle); +#endif + T c = cos(a); + T s = sin(a); + + detail::tvec3 axis = normalize(v); + + detail::tvec3 temp = (T(1) - c) * axis; + + detail::tmat4x4 Rotate(detail::tmat4x4::null); + Rotate[0][0] = c + temp[0] * axis[0]; + Rotate[0][1] = 0 + temp[0] * axis[1] + s * axis[2]; + Rotate[0][2] = 0 + temp[0] * axis[2] - s * axis[1]; + + Rotate[1][0] = 0 + temp[1] * axis[0] - s * axis[2]; + Rotate[1][1] = c + temp[1] * axis[1]; + Rotate[1][2] = 0 + temp[1] * axis[2] + s * axis[0]; + + Rotate[2][0] = 0 + temp[2] * axis[0] + s * axis[1]; + Rotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0]; + Rotate[2][2] = c + temp[2] * axis[2]; + + detail::tmat4x4 Result(detail::tmat4x4::null); + Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2]; + Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2]; + Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2]; + Result[3] = m[3]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 scale + ( + detail::tmat4x4 const & m, + detail::tvec3 const & v + ) + { + detail::tmat4x4 Result(detail::tmat4x4::null); + Result[0] = m[0] * v[0]; + Result[1] = m[1] * v[1]; + Result[2] = m[2] * v[2]; + Result[3] = m[3]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 translate_slow + ( + detail::tmat4x4 const & m, + detail::tvec3 const & v + ) + { + detail::tmat4x4 Result(T(1)); + Result[3] = detail::tvec4(v, T(1)); + return m * Result; + + //detail::tmat4x4 Result(m); + Result[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3]; + //Result[3][0] = m[0][0] * v[0] + m[1][0] * v[1] + m[2][0] * v[2] + m[3][0]; + //Result[3][1] = m[0][1] * v[0] + m[1][1] * v[1] + m[2][1] * v[2] + m[3][1]; + //Result[3][2] = m[0][2] * v[0] + m[1][2] * v[1] + m[2][2] * v[2] + m[3][2]; + //Result[3][3] = m[0][3] * v[0] + m[1][3] * v[1] + m[2][3] * v[2] + m[3][3]; + //return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 rotate_slow + ( + detail::tmat4x4 const & m, + T const & angle, + detail::tvec3 const & v + ) + { +#ifdef GLM_FORCE_RADIANS + T const a = angle; +#else + T const a = radians(angle); +#endif + T c = cos(a); + T s = sin(a); + detail::tmat4x4 Result; + + detail::tvec3 axis = normalize(v); + + Result[0][0] = c + (1 - c) * axis.x * axis.x; + Result[0][1] = (1 - c) * axis.x * axis.y + s * axis.z; + Result[0][2] = (1 - c) * axis.x * axis.z - s * axis.y; + Result[0][3] = 0; + + Result[1][0] = (1 - c) * axis.y * axis.x - s * axis.z; + Result[1][1] = c + (1 - c) * axis.y * axis.y; + Result[1][2] = (1 - c) * axis.y * axis.z + s * axis.x; + Result[1][3] = 0; + + Result[2][0] = (1 - c) * axis.z * axis.x + s * axis.y; + Result[2][1] = (1 - c) * axis.z * axis.y - s * axis.x; + Result[2][2] = c + (1 - c) * axis.z * axis.z; + Result[2][3] = 0; + + Result[3] = detail::tvec4(0, 0, 0, 1); + return m * Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 scale_slow + ( + detail::tmat4x4 const & m, + detail::tvec3 const & v + ) + { + detail::tmat4x4 Result(T(1)); + Result[0][0] = v.x; + Result[1][1] = v.y; + Result[2][2] = v.z; + return m * Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 ortho + ( + valType const & left, + valType const & right, + valType const & bottom, + valType const & top, + valType const & zNear, + valType const & zFar + ) + { + detail::tmat4x4 Result(1); + Result[0][0] = valType(2) / (right - left); + Result[1][1] = valType(2) / (top - bottom); + Result[2][2] = - valType(2) / (zFar - zNear); + Result[3][0] = - (right + left) / (right - left); + Result[3][1] = - (top + bottom) / (top - bottom); + Result[3][2] = - (zFar + zNear) / (zFar - zNear); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 ortho( + valType const & left, + valType const & right, + valType const & bottom, + valType const & top) + { + detail::tmat4x4 Result(1); + Result[0][0] = valType(2) / (right - left); + Result[1][1] = valType(2) / (top - bottom); + Result[2][2] = - valType(1); + Result[3][0] = - (right + left) / (right - left); + Result[3][1] = - (top + bottom) / (top - bottom); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 frustum + ( + valType const & left, + valType const & right, + valType const & bottom, + valType const & top, + valType const & nearVal, + valType const & farVal + ) + { + detail::tmat4x4 Result(0); + Result[0][0] = (valType(2) * nearVal) / (right - left); + Result[1][1] = (valType(2) * nearVal) / (top - bottom); + Result[2][0] = (right + left) / (right - left); + Result[2][1] = (top + bottom) / (top - bottom); + Result[2][2] = -(farVal + nearVal) / (farVal - nearVal); + Result[2][3] = valType(-1); + Result[3][2] = -(valType(2) * farVal * nearVal) / (farVal - nearVal); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 perspective + ( + valType const & fovy, + valType const & aspect, + valType const & zNear, + valType const & zFar + ) + { + valType range = tan(radians(fovy / valType(2))) * zNear; + valType left = -range * aspect; + valType right = range * aspect; + valType bottom = -range; + valType top = range; + + detail::tmat4x4 Result(valType(0)); + Result[0][0] = (valType(2) * zNear) / (right - left); + Result[1][1] = (valType(2) * zNear) / (top - bottom); + Result[2][2] = - (zFar + zNear) / (zFar - zNear); + Result[2][3] = - valType(1); + Result[3][2] = - (valType(2) * zFar * zNear) / (zFar - zNear); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 perspectiveFov + ( + valType const & fov, + valType const & width, + valType const & height, + valType const & zNear, + valType const & zFar + ) + { +#ifdef GLM_FORCE_RADIANS + valType rad = fov; +#else + valType rad = glm::radians(fov); +#endif + valType h = glm::cos(valType(0.5) * rad) / glm::sin(valType(0.5) * rad); + valType w = h * height / width; ///todo max(width , Height) / min(width , Height)? + + detail::tmat4x4 Result(valType(0)); + Result[0][0] = w; + Result[1][1] = h; + Result[2][2] = - (zFar + zNear) / (zFar - zNear); + Result[2][3] = - valType(1); + Result[3][2] = - (valType(2) * zFar * zNear) / (zFar - zNear); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 infinitePerspective + ( + T fovy, + T aspect, + T zNear + ) + { +#ifdef GLM_FORCE_RADIANS + T const range = tan(fovy / T(2)) * zNear; +#else + T const range = tan(radians(fovy / T(2))) * zNear; +#endif + T left = -range * aspect; + T right = range * aspect; + T bottom = -range; + T top = range; + + detail::tmat4x4 Result(T(0)); + Result[0][0] = (T(2) * zNear) / (right - left); + Result[1][1] = (T(2) * zNear) / (top - bottom); + Result[2][2] = - T(1); + Result[2][3] = - T(1); + Result[3][2] = - T(2) * zNear; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 tweakedInfinitePerspective + ( + T fovy, + T aspect, + T zNear + ) + { +#ifdef GLM_FORCE_RADIANS + T range = tan(fovy / T(2)) * zNear; +#else + T range = tan(radians(fovy / T(2))) * zNear; +#endif + T left = -range * aspect; + T right = range * aspect; + T bottom = -range; + T top = range; + + detail::tmat4x4 Result(T(0)); + Result[0][0] = (T(2) * zNear) / (right - left); + Result[1][1] = (T(2) * zNear) / (top - bottom); + Result[2][2] = T(0.0001) - T(1); + Result[2][3] = T(-1); + Result[3][2] = - (T(0.0001) - T(2)) * zNear; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 project + ( + detail::tvec3 const & obj, + detail::tmat4x4 const & model, + detail::tmat4x4 const & proj, + detail::tvec4 const & viewport + ) + { + detail::tvec4 tmp = detail::tvec4(obj, T(1)); + tmp = model * tmp; + tmp = proj * tmp; + + tmp /= tmp.w; + tmp = tmp * T(0.5) + T(0.5); + tmp[0] = tmp[0] * T(viewport[2]) + T(viewport[0]); + tmp[1] = tmp[1] * T(viewport[3]) + T(viewport[1]); + + return detail::tvec3(tmp); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 unProject + ( + detail::tvec3 const & win, + detail::tmat4x4 const & model, + detail::tmat4x4 const & proj, + detail::tvec4 const & viewport + ) + { + detail::tmat4x4 inverse = glm::inverse(proj * model); + + detail::tvec4 tmp = detail::tvec4(win, T(1)); + tmp.x = (tmp.x - T(viewport[0])) / T(viewport[2]); + tmp.y = (tmp.y - T(viewport[1])) / T(viewport[3]); + tmp = tmp * T(2) - T(1); + + detail::tvec4 obj = inverse * tmp; + obj /= obj.w; + + return detail::tvec3(obj); + } + + template + detail::tmat4x4 pickMatrix + ( + detail::tvec2 const & center, + detail::tvec2 const & delta, + detail::tvec4 const & viewport + ) + { + assert(delta.x > T(0) && delta.y > T(0)); + detail::tmat4x4 Result(1.0f); + + if(!(delta.x > T(0) && delta.y > T(0))) + return Result; // Error + + detail::tvec3 Temp( + (T(viewport[2]) - T(2) * (center.x - T(viewport[0]))) / delta.x, + (T(viewport[3]) - T(2) * (center.y - T(viewport[1]))) / delta.y, + T(0)); + + // Translate and scale the picked region to the entire window + Result = translate(Result, Temp); + return scale(Result, detail::tvec3(T(viewport[2]) / delta.x, T(viewport[3]) / delta.y, T(1))); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 lookAt + ( + detail::tvec3 const & eye, + detail::tvec3 const & center, + detail::tvec3 const & up + ) + { + detail::tvec3 f = normalize(center - eye); + detail::tvec3 u = normalize(up); + detail::tvec3 s = normalize(cross(f, u)); + u = cross(s, f); + + detail::tmat4x4 Result(1); + Result[0][0] = s.x; + Result[1][0] = s.y; + Result[2][0] = s.z; + Result[0][1] = u.x; + Result[1][1] = u.y; + Result[2][1] = u.z; + Result[0][2] =-f.x; + Result[1][2] =-f.y; + Result[2][2] =-f.z; + Result[3][0] =-dot(s, eye); + Result[3][1] =-dot(u, eye); + Result[3][2] = dot(f, eye); + return Result; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtc/noise.hpp b/include/gal/opengl/glm/gtc/noise.hpp index 4aca0704f1..d828b40f75 100644 --- a/include/gal/opengl/glm/gtc/noise.hpp +++ b/include/gal/opengl/glm/gtc/noise.hpp @@ -1,80 +1,80 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_noise -/// @file glm/gtc/noise.hpp -/// @date 2011-04-21 / 2011-09-27 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtc_noise GLM_GTC_noise -/// @ingroup gtc -/// -/// Defines 2D, 3D and 4D procedural noise functions -/// Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise": -/// https://github.com/ashima/webgl-noise -/// Following Stefan Gustavson's paper "Simplex noise demystified": -/// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTC_noise -#define GLM_GTC_noise GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTC_noise extension included") -#endif - -namespace glm -{ - /// @addtogroup gtc_noise - /// @{ - - /// Classic perlin noise. - /// @see gtc_noise - template class vecType> - T perlin( - vecType const & p); - - /// Periodic perlin noise. - /// @see gtc_noise - template class vecType> - T perlin( - vecType const & p, - vecType const & rep); - - /// Simplex noise. - /// @see gtc_noise - template class vecType> - T simplex( - vecType const & p); - - /// @} -}//namespace glm - -#include "noise.inl" - -#endif//GLM_GTC_noise +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_noise +/// @file glm/gtc/noise.hpp +/// @date 2011-04-21 / 2011-09-27 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtc_noise GLM_GTC_noise +/// @ingroup gtc +/// +/// Defines 2D, 3D and 4D procedural noise functions +/// Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise": +/// https://github.com/ashima/webgl-noise +/// Following Stefan Gustavson's paper "Simplex noise demystified": +/// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_noise +#define GLM_GTC_noise GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_noise extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_noise + /// @{ + + /// Classic perlin noise. + /// @see gtc_noise + template class vecType> + T perlin( + vecType const & p); + + /// Periodic perlin noise. + /// @see gtc_noise + template class vecType> + T perlin( + vecType const & p, + vecType const & rep); + + /// Simplex noise. + /// @see gtc_noise + template class vecType> + T simplex( + vecType const & p); + + /// @} +}//namespace glm + +#include "noise.inl" + +#endif//GLM_GTC_noise diff --git a/include/gal/opengl/glm/gtc/noise.inl b/include/gal/opengl/glm/gtc/noise.inl index 57575dc814..740b1599da 100644 --- a/include/gal/opengl/glm/gtc/noise.inl +++ b/include/gal/opengl/glm/gtc/noise.inl @@ -1,867 +1,867 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_noise -/// @file glm/gtc/noise.inl -/// @date 2011-04-21 / 2012-04-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// -// Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise": -// https://github.com/ashima/webgl-noise -// Following Stefan Gustavson's paper "Simplex noise demystified": -// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER T mod289(T const & x) - { - return x - floor(x * T(1.0 / 289.0)) * T(289.0); - } - - template - GLM_FUNC_QUALIFIER T permute(T const & x) - { - return mod289(((x * T(34)) + T(1)) * x); - } - - template class vecType> - GLM_FUNC_QUALIFIER vecType permute(vecType const & x) - { - return mod289(((x * T(34)) + T(1)) * x); - } - - template - GLM_FUNC_QUALIFIER T taylorInvSqrt(T const & r) - { - return T(1.79284291400159) - T(0.85373472095314) * r; - } - - template class vecType> - GLM_FUNC_QUALIFIER vecType taylorInvSqrt(vecType const & r) - { - return T(1.79284291400159) - T(0.85373472095314) * r; - } - - template class vecType> - GLM_FUNC_QUALIFIER vecType fade(vecType const & t) - { - return t * t * t * (t * (t * T(6) - T(15)) + T(10)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 grad4(T const & j, detail::tvec4 const & ip) - { - detail::tvec3 pXYZ = floor(fract(detail::tvec3(j) * detail::tvec3(ip)) * T(7)) * ip[2] - T(1); - T pW = T(1.5) - dot(abs(pXYZ), detail::tvec3(1)); - detail::tvec4 s = detail::tvec4(lessThan(detail::tvec4(pXYZ, pW), detail::tvec4(0.0))); - pXYZ = pXYZ + (detail::tvec3(s) * T(2) - T(1)) * s.w; - return detail::tvec4(pXYZ, pW); - } - - // Classic Perlin noise - template - GLM_FUNC_QUALIFIER T perlin(detail::tvec2 const & P) - { - detail::tvec4 Pi = glm::floor(detail::tvec4(P.x, P.y, P.x, P.y)) + detail::tvec4(0.0, 0.0, 1.0, 1.0); - detail::tvec4 Pf = glm::fract(detail::tvec4(P.x, P.y, P.x, P.y)) - detail::tvec4(0.0, 0.0, 1.0, 1.0); - Pi = mod(Pi, T(289)); // To avoid truncation effects in permutation - detail::tvec4 ix(Pi.x, Pi.z, Pi.x, Pi.z); - detail::tvec4 iy(Pi.y, Pi.y, Pi.w, Pi.w); - detail::tvec4 fx(Pf.x, Pf.z, Pf.x, Pf.z); - detail::tvec4 fy(Pf.y, Pf.y, Pf.w, Pf.w); - - detail::tvec4 i = glm::permute(glm::permute(ix) + iy); - - detail::tvec4 gx = T(2) * glm::fract(i / T(41)) - T(1); - detail::tvec4 gy = glm::abs(gx) - T(0.5); - detail::tvec4 tx = glm::floor(gx + T(0.5)); - gx = gx - tx; - - detail::tvec2 g00(gx.x, gy.x); - detail::tvec2 g10(gx.y, gy.y); - detail::tvec2 g01(gx.z, gy.z); - detail::tvec2 g11(gx.w, gy.w); - - detail::tvec4 norm = taylorInvSqrt(detail::tvec4(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11))); - g00 *= norm.x; - g01 *= norm.y; - g10 *= norm.z; - g11 *= norm.w; - - T n00 = dot(g00, detail::tvec2(fx.x, fy.x)); - T n10 = dot(g10, detail::tvec2(fx.y, fy.y)); - T n01 = dot(g01, detail::tvec2(fx.z, fy.z)); - T n11 = dot(g11, detail::tvec2(fx.w, fy.w)); - - detail::tvec2 fade_xy = fade(detail::tvec2(Pf.x, Pf.y)); - detail::tvec2 n_x = mix(detail::tvec2(n00, n01), detail::tvec2(n10, n11), fade_xy.x); - T n_xy = mix(n_x.x, n_x.y, fade_xy.y); - return T(2.3) * n_xy; - } - - // Classic Perlin noise - template - GLM_FUNC_QUALIFIER T perlin(detail::tvec3 const & P) - { - detail::tvec3 Pi0 = floor(P); // Integer part for indexing - detail::tvec3 Pi1 = Pi0 + T(1); // Integer part + 1 - Pi0 = mod289(Pi0); - Pi1 = mod289(Pi1); - detail::tvec3 Pf0 = fract(P); // Fractional part for interpolation - detail::tvec3 Pf1 = Pf0 - T(1); // Fractional part - 1.0 - detail::tvec4 ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x); - detail::tvec4 iy = detail::tvec4(detail::tvec2(Pi0.y), detail::tvec2(Pi1.y)); - detail::tvec4 iz0(Pi0.z); - detail::tvec4 iz1(Pi1.z); - - detail::tvec4 ixy = permute(permute(ix) + iy); - detail::tvec4 ixy0 = permute(ixy + iz0); - detail::tvec4 ixy1 = permute(ixy + iz1); - - detail::tvec4 gx0 = ixy0 * T(1.0 / 7.0); - detail::tvec4 gy0 = fract(floor(gx0) * T(1.0 / 7.0)) - T(0.5); - gx0 = fract(gx0); - detail::tvec4 gz0 = detail::tvec4(0.5) - abs(gx0) - abs(gy0); - detail::tvec4 sz0 = step(gz0, detail::tvec4(0.0)); - gx0 -= sz0 * (step(T(0), gx0) - T(0.5)); - gy0 -= sz0 * (step(T(0), gy0) - T(0.5)); - - detail::tvec4 gx1 = ixy1 * T(1.0 / 7.0); - detail::tvec4 gy1 = fract(floor(gx1) * T(1.0 / 7.0)) - T(0.5); - gx1 = fract(gx1); - detail::tvec4 gz1 = detail::tvec4(0.5) - abs(gx1) - abs(gy1); - detail::tvec4 sz1 = step(gz1, detail::tvec4(0.0)); - gx1 -= sz1 * (step(T(0), gx1) - T(0.5)); - gy1 -= sz1 * (step(T(0), gy1) - T(0.5)); - - detail::tvec3 g000(gx0.x, gy0.x, gz0.x); - detail::tvec3 g100(gx0.y, gy0.y, gz0.y); - detail::tvec3 g010(gx0.z, gy0.z, gz0.z); - detail::tvec3 g110(gx0.w, gy0.w, gz0.w); - detail::tvec3 g001(gx1.x, gy1.x, gz1.x); - detail::tvec3 g101(gx1.y, gy1.y, gz1.y); - detail::tvec3 g011(gx1.z, gy1.z, gz1.z); - detail::tvec3 g111(gx1.w, gy1.w, gz1.w); - - detail::tvec4 norm0 = taylorInvSqrt(detail::tvec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110))); - g000 *= norm0.x; - g010 *= norm0.y; - g100 *= norm0.z; - g110 *= norm0.w; - detail::tvec4 norm1 = taylorInvSqrt(detail::tvec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111))); - g001 *= norm1.x; - g011 *= norm1.y; - g101 *= norm1.z; - g111 *= norm1.w; - - T n000 = dot(g000, Pf0); - T n100 = dot(g100, detail::tvec3(Pf1.x, Pf0.y, Pf0.z)); - T n010 = dot(g010, detail::tvec3(Pf0.x, Pf1.y, Pf0.z)); - T n110 = dot(g110, detail::tvec3(Pf1.x, Pf1.y, Pf0.z)); - T n001 = dot(g001, detail::tvec3(Pf0.x, Pf0.y, Pf1.z)); - T n101 = dot(g101, detail::tvec3(Pf1.x, Pf0.y, Pf1.z)); - T n011 = dot(g011, detail::tvec3(Pf0.x, Pf1.y, Pf1.z)); - T n111 = dot(g111, Pf1); - - detail::tvec3 fade_xyz = fade(Pf0); - detail::tvec4 n_z = mix(detail::tvec4(n000, n100, n010, n110), detail::tvec4(n001, n101, n011, n111), fade_xyz.z); - detail::tvec2 n_yz = mix(detail::tvec2(n_z.x, n_z.y), detail::tvec2(n_z.z, n_z.w), fade_xyz.y); - T n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); - return T(2.2) * n_xyz; - } - /* - // Classic Perlin noise - template - GLM_FUNC_QUALIFIER T perlin(detail::tvec3 const & P) - { - detail::tvec3 Pi0 = floor(P); // Integer part for indexing - detail::tvec3 Pi1 = Pi0 + T(1); // Integer part + 1 - Pi0 = mod(Pi0, T(289)); - Pi1 = mod(Pi1, T(289)); - detail::tvec3 Pf0 = fract(P); // Fractional part for interpolation - detail::tvec3 Pf1 = Pf0 - T(1); // Fractional part - 1.0 - detail::tvec4 ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x); - detail::tvec4 iy(Pi0.y, Pi0.y, Pi1.y, Pi1.y); - detail::tvec4 iz0(Pi0.z); - detail::tvec4 iz1(Pi1.z); - - detail::tvec4 ixy = permute(permute(ix) + iy); - detail::tvec4 ixy0 = permute(ixy + iz0); - detail::tvec4 ixy1 = permute(ixy + iz1); - - detail::tvec4 gx0 = ixy0 / T(7); - detail::tvec4 gy0 = fract(floor(gx0) / T(7)) - T(0.5); - gx0 = fract(gx0); - detail::tvec4 gz0 = detail::tvec4(0.5) - abs(gx0) - abs(gy0); - detail::tvec4 sz0 = step(gz0, detail::tvec4(0.0)); - gx0 -= sz0 * (step(0.0, gx0) - T(0.5)); - gy0 -= sz0 * (step(0.0, gy0) - T(0.5)); - - detail::tvec4 gx1 = ixy1 / T(7); - detail::tvec4 gy1 = fract(floor(gx1) / T(7)) - T(0.5); - gx1 = fract(gx1); - detail::tvec4 gz1 = detail::tvec4(0.5) - abs(gx1) - abs(gy1); - detail::tvec4 sz1 = step(gz1, detail::tvec4(0.0)); - gx1 -= sz1 * (step(T(0), gx1) - T(0.5)); - gy1 -= sz1 * (step(T(0), gy1) - T(0.5)); - - detail::tvec3 g000(gx0.x, gy0.x, gz0.x); - detail::tvec3 g100(gx0.y, gy0.y, gz0.y); - detail::tvec3 g010(gx0.z, gy0.z, gz0.z); - detail::tvec3 g110(gx0.w, gy0.w, gz0.w); - detail::tvec3 g001(gx1.x, gy1.x, gz1.x); - detail::tvec3 g101(gx1.y, gy1.y, gz1.y); - detail::tvec3 g011(gx1.z, gy1.z, gz1.z); - detail::tvec3 g111(gx1.w, gy1.w, gz1.w); - - detail::tvec4 norm0 = taylorInvSqrt(detail::tvec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110))); - g000 *= norm0.x; - g010 *= norm0.y; - g100 *= norm0.z; - g110 *= norm0.w; - detail::tvec4 norm1 = taylorInvSqrt(detail::tvec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111))); - g001 *= norm1.x; - g011 *= norm1.y; - g101 *= norm1.z; - g111 *= norm1.w; - - T n000 = dot(g000, Pf0); - T n100 = dot(g100, detail::tvec3(Pf1.x, Pf0.y, Pf0.z)); - T n010 = dot(g010, detail::tvec3(Pf0.x, Pf1.y, Pf0.z)); - T n110 = dot(g110, detail::tvec3(Pf1.x, Pf1.y, Pf0.z)); - T n001 = dot(g001, detail::tvec3(Pf0.x, Pf0.y, Pf1.z)); - T n101 = dot(g101, detail::tvec3(Pf1.x, Pf0.y, Pf1.z)); - T n011 = dot(g011, detail::tvec3(Pf0.x, Pf1.y, Pf1.z)); - T n111 = dot(g111, Pf1); - - detail::tvec3 fade_xyz = fade(Pf0); - detail::tvec4 n_z = mix(detail::tvec4(n000, n100, n010, n110), detail::tvec4(n001, n101, n011, n111), fade_xyz.z); - detail::tvec2 n_yz = mix( - detail::tvec2(n_z.x, n_z.y), - detail::tvec2(n_z.z, n_z.w), fade_xyz.y); - T n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); - return T(2.2) * n_xyz; - } - */ - // Classic Perlin noise - template - GLM_FUNC_QUALIFIER T perlin(detail::tvec4 const & P) - { - detail::tvec4 Pi0 = floor(P); // Integer part for indexing - detail::tvec4 Pi1 = Pi0 + T(1); // Integer part + 1 - Pi0 = mod(Pi0, T(289)); - Pi1 = mod(Pi1, T(289)); - detail::tvec4 Pf0 = fract(P); // Fractional part for interpolation - detail::tvec4 Pf1 = Pf0 - T(1); // Fractional part - 1.0 - detail::tvec4 ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x); - detail::tvec4 iy(Pi0.y, Pi0.y, Pi1.y, Pi1.y); - detail::tvec4 iz0(Pi0.z); - detail::tvec4 iz1(Pi1.z); - detail::tvec4 iw0(Pi0.w); - detail::tvec4 iw1(Pi1.w); - - detail::tvec4 ixy = permute(permute(ix) + iy); - detail::tvec4 ixy0 = permute(ixy + iz0); - detail::tvec4 ixy1 = permute(ixy + iz1); - detail::tvec4 ixy00 = permute(ixy0 + iw0); - detail::tvec4 ixy01 = permute(ixy0 + iw1); - detail::tvec4 ixy10 = permute(ixy1 + iw0); - detail::tvec4 ixy11 = permute(ixy1 + iw1); - - detail::tvec4 gx00 = ixy00 / T(7); - detail::tvec4 gy00 = floor(gx00) / T(7); - detail::tvec4 gz00 = floor(gy00) / T(6); - gx00 = fract(gx00) - T(0.5); - gy00 = fract(gy00) - T(0.5); - gz00 = fract(gz00) - T(0.5); - detail::tvec4 gw00 = detail::tvec4(0.75) - abs(gx00) - abs(gy00) - abs(gz00); - detail::tvec4 sw00 = step(gw00, detail::tvec4(0.0)); - gx00 -= sw00 * (step(T(0), gx00) - T(0.5)); - gy00 -= sw00 * (step(T(0), gy00) - T(0.5)); - - detail::tvec4 gx01 = ixy01 / T(7); - detail::tvec4 gy01 = floor(gx01) / T(7); - detail::tvec4 gz01 = floor(gy01) / T(6); - gx01 = fract(gx01) - T(0.5); - gy01 = fract(gy01) - T(0.5); - gz01 = fract(gz01) - T(0.5); - detail::tvec4 gw01 = detail::tvec4(0.75) - abs(gx01) - abs(gy01) - abs(gz01); - detail::tvec4 sw01 = step(gw01, detail::tvec4(0.0)); - gx01 -= sw01 * (step(T(0), gx01) - T(0.5)); - gy01 -= sw01 * (step(T(0), gy01) - T(0.5)); - - detail::tvec4 gx10 = ixy10 / T(7); - detail::tvec4 gy10 = floor(gx10) / T(7); - detail::tvec4 gz10 = floor(gy10) / T(6); - gx10 = fract(gx10) - T(0.5); - gy10 = fract(gy10) - T(0.5); - gz10 = fract(gz10) - T(0.5); - detail::tvec4 gw10 = detail::tvec4(0.75) - abs(gx10) - abs(gy10) - abs(gz10); - detail::tvec4 sw10 = step(gw10, detail::tvec4(0)); - gx10 -= sw10 * (step(T(0), gx10) - T(0.5)); - gy10 -= sw10 * (step(T(0), gy10) - T(0.5)); - - detail::tvec4 gx11 = ixy11 / T(7); - detail::tvec4 gy11 = floor(gx11) / T(7); - detail::tvec4 gz11 = floor(gy11) / T(6); - gx11 = fract(gx11) - T(0.5); - gy11 = fract(gy11) - T(0.5); - gz11 = fract(gz11) - T(0.5); - detail::tvec4 gw11 = detail::tvec4(0.75) - abs(gx11) - abs(gy11) - abs(gz11); - detail::tvec4 sw11 = step(gw11, detail::tvec4(0.0)); - gx11 -= sw11 * (step(T(0), gx11) - T(0.5)); - gy11 -= sw11 * (step(T(0), gy11) - T(0.5)); - - detail::tvec4 g0000(gx00.x, gy00.x, gz00.x, gw00.x); - detail::tvec4 g1000(gx00.y, gy00.y, gz00.y, gw00.y); - detail::tvec4 g0100(gx00.z, gy00.z, gz00.z, gw00.z); - detail::tvec4 g1100(gx00.w, gy00.w, gz00.w, gw00.w); - detail::tvec4 g0010(gx10.x, gy10.x, gz10.x, gw10.x); - detail::tvec4 g1010(gx10.y, gy10.y, gz10.y, gw10.y); - detail::tvec4 g0110(gx10.z, gy10.z, gz10.z, gw10.z); - detail::tvec4 g1110(gx10.w, gy10.w, gz10.w, gw10.w); - detail::tvec4 g0001(gx01.x, gy01.x, gz01.x, gw01.x); - detail::tvec4 g1001(gx01.y, gy01.y, gz01.y, gw01.y); - detail::tvec4 g0101(gx01.z, gy01.z, gz01.z, gw01.z); - detail::tvec4 g1101(gx01.w, gy01.w, gz01.w, gw01.w); - detail::tvec4 g0011(gx11.x, gy11.x, gz11.x, gw11.x); - detail::tvec4 g1011(gx11.y, gy11.y, gz11.y, gw11.y); - detail::tvec4 g0111(gx11.z, gy11.z, gz11.z, gw11.z); - detail::tvec4 g1111(gx11.w, gy11.w, gz11.w, gw11.w); - - detail::tvec4 norm00 = taylorInvSqrt(detail::tvec4(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100))); - g0000 *= norm00.x; - g0100 *= norm00.y; - g1000 *= norm00.z; - g1100 *= norm00.w; - - detail::tvec4 norm01 = taylorInvSqrt(detail::tvec4(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101))); - g0001 *= norm01.x; - g0101 *= norm01.y; - g1001 *= norm01.z; - g1101 *= norm01.w; - - detail::tvec4 norm10 = taylorInvSqrt(detail::tvec4(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110))); - g0010 *= norm10.x; - g0110 *= norm10.y; - g1010 *= norm10.z; - g1110 *= norm10.w; - - detail::tvec4 norm11 = taylorInvSqrt(detail::tvec4(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111))); - g0011 *= norm11.x; - g0111 *= norm11.y; - g1011 *= norm11.z; - g1111 *= norm11.w; - - T n0000 = dot(g0000, Pf0); - T n1000 = dot(g1000, detail::tvec4(Pf1.x, Pf0.y, Pf0.z, Pf0.w)); - T n0100 = dot(g0100, detail::tvec4(Pf0.x, Pf1.y, Pf0.z, Pf0.w)); - T n1100 = dot(g1100, detail::tvec4(Pf1.x, Pf1.y, Pf0.z, Pf0.w)); - T n0010 = dot(g0010, detail::tvec4(Pf0.x, Pf0.y, Pf1.z, Pf0.w)); - T n1010 = dot(g1010, detail::tvec4(Pf1.x, Pf0.y, Pf1.z, Pf0.w)); - T n0110 = dot(g0110, detail::tvec4(Pf0.x, Pf1.y, Pf1.z, Pf0.w)); - T n1110 = dot(g1110, detail::tvec4(Pf1.x, Pf1.y, Pf1.z, Pf0.w)); - T n0001 = dot(g0001, detail::tvec4(Pf0.x, Pf0.y, Pf0.z, Pf1.w)); - T n1001 = dot(g1001, detail::tvec4(Pf1.x, Pf0.y, Pf0.z, Pf1.w)); - T n0101 = dot(g0101, detail::tvec4(Pf0.x, Pf1.y, Pf0.z, Pf1.w)); - T n1101 = dot(g1101, detail::tvec4(Pf1.x, Pf1.y, Pf0.z, Pf1.w)); - T n0011 = dot(g0011, detail::tvec4(Pf0.x, Pf0.y, Pf1.z, Pf1.w)); - T n1011 = dot(g1011, detail::tvec4(Pf1.x, Pf0.y, Pf1.z, Pf1.w)); - T n0111 = dot(g0111, detail::tvec4(Pf0.x, Pf1.y, Pf1.z, Pf1.w)); - T n1111 = dot(g1111, Pf1); - - detail::tvec4 fade_xyzw = fade(Pf0); - detail::tvec4 n_0w = mix(detail::tvec4(n0000, n1000, n0100, n1100), detail::tvec4(n0001, n1001, n0101, n1101), fade_xyzw.w); - detail::tvec4 n_1w = mix(detail::tvec4(n0010, n1010, n0110, n1110), detail::tvec4(n0011, n1011, n0111, n1111), fade_xyzw.w); - detail::tvec4 n_zw = mix(n_0w, n_1w, fade_xyzw.z); - detail::tvec2 n_yzw = mix(detail::tvec2(n_zw.x, n_zw.y), detail::tvec2(n_zw.z, n_zw.w), fade_xyzw.y); - T n_xyzw = mix(n_yzw.x, n_yzw.y, fade_xyzw.x); - return T(2.2) * n_xyzw; - } - - // Classic Perlin noise, periodic variant - template - GLM_FUNC_QUALIFIER T perlin(detail::tvec2 const & P, detail::tvec2 const & rep) - { - detail::tvec4 Pi = floor(detail::tvec4(P.x, P.y, P.x, P.y)) + detail::tvec4(0.0, 0.0, 1.0, 1.0); - detail::tvec4 Pf = fract(detail::tvec4(P.x, P.y, P.x, P.y)) - detail::tvec4(0.0, 0.0, 1.0, 1.0); - Pi = mod(Pi, detail::tvec4(rep.x, rep.y, rep.x, rep.y)); // To create noise with explicit period - Pi = mod(Pi, T(289)); // To avoid truncation effects in permutation - detail::tvec4 ix(Pi.x, Pi.z, Pi.x, Pi.z); - detail::tvec4 iy(Pi.y, Pi.y, Pi.w, Pi.w); - detail::tvec4 fx(Pf.x, Pf.z, Pf.x, Pf.z); - detail::tvec4 fy(Pf.y, Pf.y, Pf.w, Pf.w); - - detail::tvec4 i = permute(permute(ix) + iy); - - detail::tvec4 gx = T(2) * fract(i / T(41)) - T(1); - detail::tvec4 gy = abs(gx) - T(0.5); - detail::tvec4 tx = floor(gx + T(0.5)); - gx = gx - tx; - - detail::tvec2 g00(gx.x, gy.x); - detail::tvec2 g10(gx.y, gy.y); - detail::tvec2 g01(gx.z, gy.z); - detail::tvec2 g11(gx.w, gy.w); - - detail::tvec4 norm = taylorInvSqrt(detail::tvec4(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11))); - g00 *= norm.x; - g01 *= norm.y; - g10 *= norm.z; - g11 *= norm.w; - - T n00 = dot(g00, detail::tvec2(fx.x, fy.x)); - T n10 = dot(g10, detail::tvec2(fx.y, fy.y)); - T n01 = dot(g01, detail::tvec2(fx.z, fy.z)); - T n11 = dot(g11, detail::tvec2(fx.w, fy.w)); - - detail::tvec2 fade_xy = fade(detail::tvec2(Pf.x, Pf.y)); - detail::tvec2 n_x = mix(detail::tvec2(n00, n01), detail::tvec2(n10, n11), fade_xy.x); - T n_xy = mix(n_x.x, n_x.y, fade_xy.y); - return T(2.3) * n_xy; - } - - // Classic Perlin noise, periodic variant - template - GLM_FUNC_QUALIFIER T perlin(detail::tvec3 const & P, detail::tvec3 const & rep) - { - detail::tvec3 Pi0 = mod(floor(P), rep); // Integer part, modulo period - detail::tvec3 Pi1 = mod(Pi0 + detail::tvec3(1.0), rep); // Integer part + 1, mod period - Pi0 = mod(Pi0, T(289)); - Pi1 = mod(Pi1, T(289)); - detail::tvec3 Pf0 = fract(P); // Fractional part for interpolation - detail::tvec3 Pf1 = Pf0 - detail::tvec3(1.0); // Fractional part - 1.0 - detail::tvec4 ix = detail::tvec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x); - detail::tvec4 iy = detail::tvec4(Pi0.y, Pi0.y, Pi1.y, Pi1.y); - detail::tvec4 iz0(Pi0.z); - detail::tvec4 iz1(Pi1.z); - - detail::tvec4 ixy = permute(permute(ix) + iy); - detail::tvec4 ixy0 = permute(ixy + iz0); - detail::tvec4 ixy1 = permute(ixy + iz1); - - detail::tvec4 gx0 = ixy0 / T(7); - detail::tvec4 gy0 = fract(floor(gx0) / T(7)) - T(0.5); - gx0 = fract(gx0); - detail::tvec4 gz0 = detail::tvec4(0.5) - abs(gx0) - abs(gy0); - detail::tvec4 sz0 = step(gz0, detail::tvec4(0)); - gx0 -= sz0 * (step(0.0, gx0) - T(0.5)); - gy0 -= sz0 * (step(0.0, gy0) - T(0.5)); - - detail::tvec4 gx1 = ixy1 / T(7); - detail::tvec4 gy1 = fract(floor(gx1) / T(7)) - T(0.5); - gx1 = fract(gx1); - detail::tvec4 gz1 = detail::tvec4(0.5) - abs(gx1) - abs(gy1); - detail::tvec4 sz1 = step(gz1, detail::tvec4(0.0)); - gx1 -= sz1 * (step(0.0, gx1) - T(0.5)); - gy1 -= sz1 * (step(0.0, gy1) - T(0.5)); - - detail::tvec3 g000 = detail::tvec3(gx0.x, gy0.x, gz0.x); - detail::tvec3 g100 = detail::tvec3(gx0.y, gy0.y, gz0.y); - detail::tvec3 g010 = detail::tvec3(gx0.z, gy0.z, gz0.z); - detail::tvec3 g110 = detail::tvec3(gx0.w, gy0.w, gz0.w); - detail::tvec3 g001 = detail::tvec3(gx1.x, gy1.x, gz1.x); - detail::tvec3 g101 = detail::tvec3(gx1.y, gy1.y, gz1.y); - detail::tvec3 g011 = detail::tvec3(gx1.z, gy1.z, gz1.z); - detail::tvec3 g111 = detail::tvec3(gx1.w, gy1.w, gz1.w); - - detail::tvec4 norm0 = taylorInvSqrt(detail::tvec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110))); - g000 *= norm0.x; - g010 *= norm0.y; - g100 *= norm0.z; - g110 *= norm0.w; - detail::tvec4 norm1 = taylorInvSqrt(detail::tvec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111))); - g001 *= norm1.x; - g011 *= norm1.y; - g101 *= norm1.z; - g111 *= norm1.w; - - T n000 = dot(g000, Pf0); - T n100 = dot(g100, detail::tvec3(Pf1.x, Pf0.y, Pf0.z)); - T n010 = dot(g010, detail::tvec3(Pf0.x, Pf1.y, Pf0.z)); - T n110 = dot(g110, detail::tvec3(Pf1.x, Pf1.y, Pf0.z)); - T n001 = dot(g001, detail::tvec3(Pf0.x, Pf0.y, Pf1.z)); - T n101 = dot(g101, detail::tvec3(Pf1.x, Pf0.y, Pf1.z)); - T n011 = dot(g011, detail::tvec3(Pf0.x, Pf1.y, Pf1.z)); - T n111 = dot(g111, Pf1); - - detail::tvec3 fade_xyz = fade(Pf0); - detail::tvec4 n_z = mix(detail::tvec4(n000, n100, n010, n110), detail::tvec4(n001, n101, n011, n111), fade_xyz.z); - detail::tvec2 n_yz = mix(detail::tvec2(n_z.x, n_z.y), detail::tvec2(n_z.z, n_z.w), fade_xyz.y); - T n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); - return T(2.2) * n_xyz; - } - - // Classic Perlin noise, periodic version - template - GLM_FUNC_QUALIFIER T perlin(detail::tvec4 const & P, detail::tvec4 const & rep) - { - detail::tvec4 Pi0 = mod(floor(P), rep); // Integer part modulo rep - detail::tvec4 Pi1 = mod(Pi0 + T(1), rep); // Integer part + 1 mod rep - detail::tvec4 Pf0 = fract(P); // Fractional part for interpolation - detail::tvec4 Pf1 = Pf0 - T(1); // Fractional part - 1.0 - detail::tvec4 ix = detail::tvec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x); - detail::tvec4 iy = detail::tvec4(Pi0.y, Pi0.y, Pi1.y, Pi1.y); - detail::tvec4 iz0(Pi0.z); - detail::tvec4 iz1(Pi1.z); - detail::tvec4 iw0(Pi0.w); - detail::tvec4 iw1(Pi1.w); - - detail::tvec4 ixy = permute(permute(ix) + iy); - detail::tvec4 ixy0 = permute(ixy + iz0); - detail::tvec4 ixy1 = permute(ixy + iz1); - detail::tvec4 ixy00 = permute(ixy0 + iw0); - detail::tvec4 ixy01 = permute(ixy0 + iw1); - detail::tvec4 ixy10 = permute(ixy1 + iw0); - detail::tvec4 ixy11 = permute(ixy1 + iw1); - - detail::tvec4 gx00 = ixy00 / T(7); - detail::tvec4 gy00 = floor(gx00) / T(7); - detail::tvec4 gz00 = floor(gy00) / T(6); - gx00 = fract(gx00) - T(0.5); - gy00 = fract(gy00) - T(0.5); - gz00 = fract(gz00) - T(0.5); - detail::tvec4 gw00 = detail::tvec4(0.75) - abs(gx00) - abs(gy00) - abs(gz00); - detail::tvec4 sw00 = step(gw00, detail::tvec4(0)); - gx00 -= sw00 * (step(0.0, gx00) - T(0.5)); - gy00 -= sw00 * (step(0.0, gy00) - T(0.5)); - - detail::tvec4 gx01 = ixy01 / T(7); - detail::tvec4 gy01 = floor(gx01) / T(7); - detail::tvec4 gz01 = floor(gy01) / T(6); - gx01 = fract(gx01) - T(0.5); - gy01 = fract(gy01) - T(0.5); - gz01 = fract(gz01) - T(0.5); - detail::tvec4 gw01 = detail::tvec4(0.75) - abs(gx01) - abs(gy01) - abs(gz01); - detail::tvec4 sw01 = step(gw01, detail::tvec4(0.0)); - gx01 -= sw01 * (step(0.0, gx01) - T(0.5)); - gy01 -= sw01 * (step(0.0, gy01) - T(0.5)); - - detail::tvec4 gx10 = ixy10 / T(7); - detail::tvec4 gy10 = floor(gx10) / T(7); - detail::tvec4 gz10 = floor(gy10) / T(6); - gx10 = fract(gx10) - T(0.5); - gy10 = fract(gy10) - T(0.5); - gz10 = fract(gz10) - T(0.5); - detail::tvec4 gw10 = detail::tvec4(0.75) - abs(gx10) - abs(gy10) - abs(gz10); - detail::tvec4 sw10 = step(gw10, detail::tvec4(0.0)); - gx10 -= sw10 * (step(0.0, gx10) - T(0.5)); - gy10 -= sw10 * (step(0.0, gy10) - T(0.5)); - - detail::tvec4 gx11 = ixy11 / T(7); - detail::tvec4 gy11 = floor(gx11) / T(7); - detail::tvec4 gz11 = floor(gy11) / T(6); - gx11 = fract(gx11) - T(0.5); - gy11 = fract(gy11) - T(0.5); - gz11 = fract(gz11) - T(0.5); - detail::tvec4 gw11 = detail::tvec4(0.75) - abs(gx11) - abs(gy11) - abs(gz11); - detail::tvec4 sw11 = step(gw11, detail::tvec4(0.0)); - gx11 -= sw11 * (step(0.0, gx11) - T(0.5)); - gy11 -= sw11 * (step(0.0, gy11) - T(0.5)); - - detail::tvec4 g0000(gx00.x, gy00.x, gz00.x, gw00.x); - detail::tvec4 g1000(gx00.y, gy00.y, gz00.y, gw00.y); - detail::tvec4 g0100(gx00.z, gy00.z, gz00.z, gw00.z); - detail::tvec4 g1100(gx00.w, gy00.w, gz00.w, gw00.w); - detail::tvec4 g0010(gx10.x, gy10.x, gz10.x, gw10.x); - detail::tvec4 g1010(gx10.y, gy10.y, gz10.y, gw10.y); - detail::tvec4 g0110(gx10.z, gy10.z, gz10.z, gw10.z); - detail::tvec4 g1110(gx10.w, gy10.w, gz10.w, gw10.w); - detail::tvec4 g0001(gx01.x, gy01.x, gz01.x, gw01.x); - detail::tvec4 g1001(gx01.y, gy01.y, gz01.y, gw01.y); - detail::tvec4 g0101(gx01.z, gy01.z, gz01.z, gw01.z); - detail::tvec4 g1101(gx01.w, gy01.w, gz01.w, gw01.w); - detail::tvec4 g0011(gx11.x, gy11.x, gz11.x, gw11.x); - detail::tvec4 g1011(gx11.y, gy11.y, gz11.y, gw11.y); - detail::tvec4 g0111(gx11.z, gy11.z, gz11.z, gw11.z); - detail::tvec4 g1111(gx11.w, gy11.w, gz11.w, gw11.w); - - detail::tvec4 norm00 = taylorInvSqrt(detail::tvec4(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100))); - g0000 *= norm00.x; - g0100 *= norm00.y; - g1000 *= norm00.z; - g1100 *= norm00.w; - - detail::tvec4 norm01 = taylorInvSqrt(detail::tvec4(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101))); - g0001 *= norm01.x; - g0101 *= norm01.y; - g1001 *= norm01.z; - g1101 *= norm01.w; - - detail::tvec4 norm10 = taylorInvSqrt(detail::tvec4(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110))); - g0010 *= norm10.x; - g0110 *= norm10.y; - g1010 *= norm10.z; - g1110 *= norm10.w; - - detail::tvec4 norm11 = taylorInvSqrt(detail::tvec4(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111))); - g0011 *= norm11.x; - g0111 *= norm11.y; - g1011 *= norm11.z; - g1111 *= norm11.w; - - T n0000 = dot(g0000, Pf0); - T n1000 = dot(g1000, detail::tvec4(Pf1.x, Pf0.y, Pf0.z, Pf0.w)); - T n0100 = dot(g0100, detail::tvec4(Pf0.x, Pf1.y, Pf0.z, Pf0.w)); - T n1100 = dot(g1100, detail::tvec4(Pf1.x, Pf1.y, Pf0.z, Pf0.w)); - T n0010 = dot(g0010, detail::tvec4(Pf0.x, Pf0.y, Pf1.z, Pf0.w)); - T n1010 = dot(g1010, detail::tvec4(Pf1.x, Pf0.y, Pf1.z, Pf0.w)); - T n0110 = dot(g0110, detail::tvec4(Pf0.x, Pf1.y, Pf1.z, Pf0.w)); - T n1110 = dot(g1110, detail::tvec4(Pf1.x, Pf1.y, Pf1.z, Pf0.w)); - T n0001 = dot(g0001, detail::tvec4(Pf0.x, Pf0.y, Pf0.z, Pf1.w)); - T n1001 = dot(g1001, detail::tvec4(Pf1.x, Pf0.y, Pf0.z, Pf1.w)); - T n0101 = dot(g0101, detail::tvec4(Pf0.x, Pf1.y, Pf0.z, Pf1.w)); - T n1101 = dot(g1101, detail::tvec4(Pf1.x, Pf1.y, Pf0.z, Pf1.w)); - T n0011 = dot(g0011, detail::tvec4(Pf0.x, Pf0.y, Pf1.z, Pf1.w)); - T n1011 = dot(g1011, detail::tvec4(Pf1.x, Pf0.y, Pf1.z, Pf1.w)); - T n0111 = dot(g0111, detail::tvec4(Pf0.x, Pf1.y, Pf1.z, Pf1.w)); - T n1111 = dot(g1111, Pf1); - - detail::tvec4 fade_xyzw = fade(Pf0); - detail::tvec4 n_0w = mix(detail::tvec4(n0000, n1000, n0100, n1100), detail::tvec4(n0001, n1001, n0101, n1101), fade_xyzw.w); - detail::tvec4 n_1w = mix(detail::tvec4(n0010, n1010, n0110, n1110), detail::tvec4(n0011, n1011, n0111, n1111), fade_xyzw.w); - detail::tvec4 n_zw = mix(n_0w, n_1w, fade_xyzw.z); - detail::tvec2 n_yzw = mix(detail::tvec2(n_zw.x, n_zw.y), detail::tvec2(n_zw.z, n_zw.w), fade_xyzw.y); - T n_xyzw = mix(n_yzw.x, n_yzw.y, fade_xyzw.x); - return T(2.2) * n_xyzw; - } - - template - GLM_FUNC_QUALIFIER T simplex(glm::detail::tvec2 const & v) - { - detail::tvec4 const C = detail::tvec4( - T( 0.211324865405187), // (3.0 - sqrt(3.0)) / 6.0 - T( 0.366025403784439), // 0.5 * (sqrt(3.0) - 1.0) - T(-0.577350269189626), // -1.0 + 2.0 * C.x - T( 0.024390243902439)); // 1.0 / 41.0 - - // First corner - detail::tvec2 i = floor(v + dot(v, detail::tvec2(C[1]))); - detail::tvec2 x0 = v - i + dot(i, detail::tvec2(C[0])); - - // Other corners - //i1.x = step( x0.y, x0.x ); // x0.x > x0.y ? 1.0 : 0.0 - //i1.y = 1.0 - i1.x; - detail::tvec2 i1 = (x0.x > x0.y) ? detail::tvec2(1, 0) : detail::tvec2(0, 1); - // x0 = x0 - 0.0 + 0.0 * C.xx ; - // x1 = x0 - i1 + 1.0 * C.xx ; - // x2 = x0 - 1.0 + 2.0 * C.xx ; - detail::tvec4 x12 = detail::tvec4(x0.x, x0.y, x0.x, x0.y) + detail::tvec4(C.x, C.x, C.z, C.z); - x12 = detail::tvec4(detail::tvec2(x12) - i1, x12.z, x12.w); - - // Permutations - i = mod(i, T(289)); // Avoid truncation effects in permutation - detail::tvec3 p = permute( - permute(i.y + detail::tvec3(T(0), i1.y, T(1))) - + i.x + detail::tvec3(T(0), i1.x, T(1))); - - detail::tvec3 m = max(T(0.5) - detail::tvec3( - dot(x0, x0), - dot(detail::tvec2(x12.x, x12.y), detail::tvec2(x12.x, x12.y)), - dot(detail::tvec2(x12.z, x12.w), detail::tvec2(x12.z, x12.w))), T(0)); - m = m * m ; - m = m * m ; - - // Gradients: 41 points uniformly over a line, mapped onto a diamond. - // The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287) - - detail::tvec3 x = T(2) * fract(p * C.w) - T(1); - detail::tvec3 h = abs(x) - T(0.5); - detail::tvec3 ox = floor(x + T(0.5)); - detail::tvec3 a0 = x - ox; - - // Normalise gradients implicitly by scaling m - // Inlined for speed: m *= taylorInvSqrt( a0*a0 + h*h ); - m *= T(1.79284291400159) - T(0.85373472095314) * (a0 * a0 + h * h); - - // Compute final noise value at P - detail::tvec3 g; - g.x = a0.x * x0.x + h.x * x0.y; - //g.yz = a0.yz * x12.xz + h.yz * x12.yw; - g.y = a0.y * x12.x + h.y * x12.y; - g.z = a0.z * x12.z + h.z * x12.w; - return T(130) * dot(m, g); - } - - template - GLM_FUNC_QUALIFIER T simplex(detail::tvec3 const & v) - { - detail::tvec2 const C(1.0 / 6.0, 1.0 / 3.0); - detail::tvec4 const D(0.0, 0.5, 1.0, 2.0); - - // First corner - detail::tvec3 i(floor(v + dot(v, detail::tvec3(C.y)))); - detail::tvec3 x0(v - i + dot(i, detail::tvec3(C.x))); - - // Other corners - detail::tvec3 g(step(detail::tvec3(x0.y, x0.z, x0.x), x0)); - detail::tvec3 l(T(1) - g); - detail::tvec3 i1(min(g, detail::tvec3(l.z, l.x, l.y))); - detail::tvec3 i2(max(g, detail::tvec3(l.z, l.x, l.y))); - - // x0 = x0 - 0.0 + 0.0 * C.xxx; - // x1 = x0 - i1 + 1.0 * C.xxx; - // x2 = x0 - i2 + 2.0 * C.xxx; - // x3 = x0 - 1.0 + 3.0 * C.xxx; - detail::tvec3 x1(x0 - i1 + C.x); - detail::tvec3 x2(x0 - i2 + C.y); // 2.0*C.x = 1/3 = C.y - detail::tvec3 x3(x0 - D.y); // -1.0+3.0*C.x = -0.5 = -D.y - - // Permutations - i = mod289(i); - detail::tvec4 p(permute(permute(permute( - i.z + detail::tvec4(T(0), i1.z, i2.z, T(1))) + - i.y + detail::tvec4(T(0), i1.y, i2.y, T(1))) + - i.x + detail::tvec4(T(0), i1.x, i2.x, T(1)))); - - // Gradients: 7x7 points over a square, mapped onto an octahedron. - // The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294) - T n_ = T(0.142857142857); // 1.0/7.0 - detail::tvec3 ns(n_ * detail::tvec3(D.w, D.y, D.z) - detail::tvec3(D.x, D.z, D.x)); - - detail::tvec4 j(p - T(49) * floor(p * ns.z * ns.z)); // mod(p,7*7) - - detail::tvec4 x_(floor(j * ns.z)); - detail::tvec4 y_(floor(j - T(7) * x_)); // mod(j,N) - - detail::tvec4 x(x_ * ns.x + ns.y); - detail::tvec4 y(y_ * ns.x + ns.y); - detail::tvec4 h(T(1) - abs(x) - abs(y)); - - detail::tvec4 b0(x.x, x.y, y.x, y.y); - detail::tvec4 b1(x.z, x.w, y.z, y.w); - - // vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0; - // vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0; - detail::tvec4 s0(floor(b0) * T(2) + T(1)); - detail::tvec4 s1(floor(b1) * T(2) + T(1)); - detail::tvec4 sh(-step(h, detail::tvec4(0.0))); - - detail::tvec4 a0 = detail::tvec4(b0.x, b0.z, b0.y, b0.w) + detail::tvec4(s0.x, s0.z, s0.y, s0.w) * detail::tvec4(sh.x, sh.x, sh.y, sh.y); - detail::tvec4 a1 = detail::tvec4(b1.x, b1.z, b1.y, b1.w) + detail::tvec4(s1.x, s1.z, s1.y, s1.w) * detail::tvec4(sh.z, sh.z, sh.w, sh.w); - - detail::tvec3 p0(a0.x, a0.y, h.x); - detail::tvec3 p1(a0.z, a0.w, h.y); - detail::tvec3 p2(a1.x, a1.y, h.z); - detail::tvec3 p3(a1.z, a1.w, h.w); - - // Normalise gradients - detail::tvec4 norm = taylorInvSqrt(detail::tvec4(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3))); - p0 *= norm.x; - p1 *= norm.y; - p2 *= norm.z; - p3 *= norm.w; - - // Mix final noise value - detail::tvec4 m = max(T(0.6) - detail::tvec4(dot(x0, x0), dot(x1, x1), dot(x2, x2), dot(x3, x3)), T(0)); - m = m * m; - return T(42) * dot(m * m, detail::tvec4(dot(p0, x0), dot(p1, x1), dot(p2, x2), dot(p3, x3))); - } - - template - GLM_FUNC_QUALIFIER T simplex(detail::tvec4 const & v) - { - detail::tvec4 const C( - 0.138196601125011, // (5 - sqrt(5))/20 G4 - 0.276393202250021, // 2 * G4 - 0.414589803375032, // 3 * G4 - -0.447213595499958); // -1 + 4 * G4 - - // (sqrt(5) - 1)/4 = F4, used once below - T const F4 = T(0.309016994374947451); - - // First corner - detail::tvec4 i = floor(v + dot(v, vec4(F4))); - detail::tvec4 x0 = v - i + dot(i, vec4(C.x)); - - // Other corners - - // Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI) - detail::tvec4 i0; - detail::tvec3 isX = step(detail::tvec3(x0.y, x0.z, x0.w), detail::tvec3(x0.x)); - detail::tvec3 isYZ = step(detail::tvec3(x0.z, x0.w, x0.w), detail::tvec3(x0.y, x0.y, x0.z)); - // i0.x = dot(isX, vec3(1.0)); - //i0.x = isX.x + isX.y + isX.z; - //i0.yzw = T(1) - isX; - i0 = detail::tvec4(isX.x + isX.y + isX.z, T(1) - isX); - // i0.y += dot(isYZ.xy, vec2(1.0)); - i0.y += isYZ.x + isYZ.y; - //i0.zw += 1.0 - detail::tvec2(isYZ.x, isYZ.y); - i0.z += T(1) - isYZ.x; - i0.w += T(1) - isYZ.y; - i0.z += isYZ.z; - i0.w += T(1) - isYZ.z; - - // i0 now contains the unique values 0,1,2,3 in each channel - detail::tvec4 i3 = clamp(i0, 0.0, 1.0); - detail::tvec4 i2 = clamp(i0 - 1.0, 0.0, 1.0); - detail::tvec4 i1 = clamp(i0 - 2.0, 0.0, 1.0); - - // x0 = x0 - 0.0 + 0.0 * C.xxxx - // x1 = x0 - i1 + 0.0 * C.xxxx - // x2 = x0 - i2 + 0.0 * C.xxxx - // x3 = x0 - i3 + 0.0 * C.xxxx - // x4 = x0 - 1.0 + 4.0 * C.xxxx - detail::tvec4 x1 = x0 - i1 + C.x; - detail::tvec4 x2 = x0 - i2 + C.y; - detail::tvec4 x3 = x0 - i3 + C.z; - detail::tvec4 x4 = x0 + C.w; - - // Permutations - i = mod(i, T(289)); - T j0 = permute(permute(permute(permute(i.w) + i.z) + i.y) + i.x); - detail::tvec4 j1 = permute(permute(permute(permute( - i.w + detail::tvec4(i1.w, i2.w, i3.w, T(1))) - + i.z + detail::tvec4(i1.z, i2.z, i3.z, T(1))) - + i.y + detail::tvec4(i1.y, i2.y, i3.y, T(1))) - + i.x + detail::tvec4(i1.x, i2.x, i3.x, T(1))); - - // Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope - // 7*7*6 = 294, which is close to the ring size 17*17 = 289. - detail::tvec4 ip = detail::tvec4(T(1) / T(294), T(1) / T(49), T(1) / T(7), T(0)); - - detail::tvec4 p0 = grad4(j0, ip); - detail::tvec4 p1 = grad4(j1.x, ip); - detail::tvec4 p2 = grad4(j1.y, ip); - detail::tvec4 p3 = grad4(j1.z, ip); - detail::tvec4 p4 = grad4(j1.w, ip); - - // Normalise gradients - detail::tvec4 norm = taylorInvSqrt(detail::tvec4(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3))); - p0 *= norm.x; - p1 *= norm.y; - p2 *= norm.z; - p3 *= norm.w; - p4 *= taylorInvSqrt(dot(p4, p4)); - - // Mix contributions from the five corners - detail::tvec3 m0 = max(T(0.6) - detail::tvec3(dot(x0, x0), dot(x1, x1), dot(x2, x2)), T(0)); - detail::tvec2 m1 = max(T(0.6) - detail::tvec2(dot(x3, x3), dot(x4, x4) ), T(0)); - m0 = m0 * m0; - m1 = m1 * m1; - return T(49) * - (dot(m0 * m0, detail::tvec3(dot(p0, x0), dot(p1, x1), dot(p2, x2))) + - dot(m1 * m1, detail::tvec2(dot(p3, x3), dot(p4, x4)))); - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_noise +/// @file glm/gtc/noise.inl +/// @date 2011-04-21 / 2012-04-07 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// +// Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise": +// https://github.com/ashima/webgl-noise +// Following Stefan Gustavson's paper "Simplex noise demystified": +// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER T mod289(T const & x) + { + return x - floor(x * T(1.0 / 289.0)) * T(289.0); + } + + template + GLM_FUNC_QUALIFIER T permute(T const & x) + { + return mod289(((x * T(34)) + T(1)) * x); + } + + template class vecType> + GLM_FUNC_QUALIFIER vecType permute(vecType const & x) + { + return mod289(((x * T(34)) + T(1)) * x); + } + + template + GLM_FUNC_QUALIFIER T taylorInvSqrt(T const & r) + { + return T(1.79284291400159) - T(0.85373472095314) * r; + } + + template class vecType> + GLM_FUNC_QUALIFIER vecType taylorInvSqrt(vecType const & r) + { + return T(1.79284291400159) - T(0.85373472095314) * r; + } + + template class vecType> + GLM_FUNC_QUALIFIER vecType fade(vecType const & t) + { + return t * t * t * (t * (t * T(6) - T(15)) + T(10)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 grad4(T const & j, detail::tvec4 const & ip) + { + detail::tvec3 pXYZ = floor(fract(detail::tvec3(j) * detail::tvec3(ip)) * T(7)) * ip[2] - T(1); + T pW = T(1.5) - dot(abs(pXYZ), detail::tvec3(1)); + detail::tvec4 s = detail::tvec4(lessThan(detail::tvec4(pXYZ, pW), detail::tvec4(0.0))); + pXYZ = pXYZ + (detail::tvec3(s) * T(2) - T(1)) * s.w; + return detail::tvec4(pXYZ, pW); + } + + // Classic Perlin noise + template + GLM_FUNC_QUALIFIER T perlin(detail::tvec2 const & P) + { + detail::tvec4 Pi = glm::floor(detail::tvec4(P.x, P.y, P.x, P.y)) + detail::tvec4(0.0, 0.0, 1.0, 1.0); + detail::tvec4 Pf = glm::fract(detail::tvec4(P.x, P.y, P.x, P.y)) - detail::tvec4(0.0, 0.0, 1.0, 1.0); + Pi = mod(Pi, T(289)); // To avoid truncation effects in permutation + detail::tvec4 ix(Pi.x, Pi.z, Pi.x, Pi.z); + detail::tvec4 iy(Pi.y, Pi.y, Pi.w, Pi.w); + detail::tvec4 fx(Pf.x, Pf.z, Pf.x, Pf.z); + detail::tvec4 fy(Pf.y, Pf.y, Pf.w, Pf.w); + + detail::tvec4 i = glm::permute(glm::permute(ix) + iy); + + detail::tvec4 gx = T(2) * glm::fract(i / T(41)) - T(1); + detail::tvec4 gy = glm::abs(gx) - T(0.5); + detail::tvec4 tx = glm::floor(gx + T(0.5)); + gx = gx - tx; + + detail::tvec2 g00(gx.x, gy.x); + detail::tvec2 g10(gx.y, gy.y); + detail::tvec2 g01(gx.z, gy.z); + detail::tvec2 g11(gx.w, gy.w); + + detail::tvec4 norm = taylorInvSqrt(detail::tvec4(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11))); + g00 *= norm.x; + g01 *= norm.y; + g10 *= norm.z; + g11 *= norm.w; + + T n00 = dot(g00, detail::tvec2(fx.x, fy.x)); + T n10 = dot(g10, detail::tvec2(fx.y, fy.y)); + T n01 = dot(g01, detail::tvec2(fx.z, fy.z)); + T n11 = dot(g11, detail::tvec2(fx.w, fy.w)); + + detail::tvec2 fade_xy = fade(detail::tvec2(Pf.x, Pf.y)); + detail::tvec2 n_x = mix(detail::tvec2(n00, n01), detail::tvec2(n10, n11), fade_xy.x); + T n_xy = mix(n_x.x, n_x.y, fade_xy.y); + return T(2.3) * n_xy; + } + + // Classic Perlin noise + template + GLM_FUNC_QUALIFIER T perlin(detail::tvec3 const & P) + { + detail::tvec3 Pi0 = floor(P); // Integer part for indexing + detail::tvec3 Pi1 = Pi0 + T(1); // Integer part + 1 + Pi0 = mod289(Pi0); + Pi1 = mod289(Pi1); + detail::tvec3 Pf0 = fract(P); // Fractional part for interpolation + detail::tvec3 Pf1 = Pf0 - T(1); // Fractional part - 1.0 + detail::tvec4 ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x); + detail::tvec4 iy = detail::tvec4(detail::tvec2(Pi0.y), detail::tvec2(Pi1.y)); + detail::tvec4 iz0(Pi0.z); + detail::tvec4 iz1(Pi1.z); + + detail::tvec4 ixy = permute(permute(ix) + iy); + detail::tvec4 ixy0 = permute(ixy + iz0); + detail::tvec4 ixy1 = permute(ixy + iz1); + + detail::tvec4 gx0 = ixy0 * T(1.0 / 7.0); + detail::tvec4 gy0 = fract(floor(gx0) * T(1.0 / 7.0)) - T(0.5); + gx0 = fract(gx0); + detail::tvec4 gz0 = detail::tvec4(0.5) - abs(gx0) - abs(gy0); + detail::tvec4 sz0 = step(gz0, detail::tvec4(0.0)); + gx0 -= sz0 * (step(T(0), gx0) - T(0.5)); + gy0 -= sz0 * (step(T(0), gy0) - T(0.5)); + + detail::tvec4 gx1 = ixy1 * T(1.0 / 7.0); + detail::tvec4 gy1 = fract(floor(gx1) * T(1.0 / 7.0)) - T(0.5); + gx1 = fract(gx1); + detail::tvec4 gz1 = detail::tvec4(0.5) - abs(gx1) - abs(gy1); + detail::tvec4 sz1 = step(gz1, detail::tvec4(0.0)); + gx1 -= sz1 * (step(T(0), gx1) - T(0.5)); + gy1 -= sz1 * (step(T(0), gy1) - T(0.5)); + + detail::tvec3 g000(gx0.x, gy0.x, gz0.x); + detail::tvec3 g100(gx0.y, gy0.y, gz0.y); + detail::tvec3 g010(gx0.z, gy0.z, gz0.z); + detail::tvec3 g110(gx0.w, gy0.w, gz0.w); + detail::tvec3 g001(gx1.x, gy1.x, gz1.x); + detail::tvec3 g101(gx1.y, gy1.y, gz1.y); + detail::tvec3 g011(gx1.z, gy1.z, gz1.z); + detail::tvec3 g111(gx1.w, gy1.w, gz1.w); + + detail::tvec4 norm0 = taylorInvSqrt(detail::tvec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110))); + g000 *= norm0.x; + g010 *= norm0.y; + g100 *= norm0.z; + g110 *= norm0.w; + detail::tvec4 norm1 = taylorInvSqrt(detail::tvec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111))); + g001 *= norm1.x; + g011 *= norm1.y; + g101 *= norm1.z; + g111 *= norm1.w; + + T n000 = dot(g000, Pf0); + T n100 = dot(g100, detail::tvec3(Pf1.x, Pf0.y, Pf0.z)); + T n010 = dot(g010, detail::tvec3(Pf0.x, Pf1.y, Pf0.z)); + T n110 = dot(g110, detail::tvec3(Pf1.x, Pf1.y, Pf0.z)); + T n001 = dot(g001, detail::tvec3(Pf0.x, Pf0.y, Pf1.z)); + T n101 = dot(g101, detail::tvec3(Pf1.x, Pf0.y, Pf1.z)); + T n011 = dot(g011, detail::tvec3(Pf0.x, Pf1.y, Pf1.z)); + T n111 = dot(g111, Pf1); + + detail::tvec3 fade_xyz = fade(Pf0); + detail::tvec4 n_z = mix(detail::tvec4(n000, n100, n010, n110), detail::tvec4(n001, n101, n011, n111), fade_xyz.z); + detail::tvec2 n_yz = mix(detail::tvec2(n_z.x, n_z.y), detail::tvec2(n_z.z, n_z.w), fade_xyz.y); + T n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); + return T(2.2) * n_xyz; + } + /* + // Classic Perlin noise + template + GLM_FUNC_QUALIFIER T perlin(detail::tvec3 const & P) + { + detail::tvec3 Pi0 = floor(P); // Integer part for indexing + detail::tvec3 Pi1 = Pi0 + T(1); // Integer part + 1 + Pi0 = mod(Pi0, T(289)); + Pi1 = mod(Pi1, T(289)); + detail::tvec3 Pf0 = fract(P); // Fractional part for interpolation + detail::tvec3 Pf1 = Pf0 - T(1); // Fractional part - 1.0 + detail::tvec4 ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x); + detail::tvec4 iy(Pi0.y, Pi0.y, Pi1.y, Pi1.y); + detail::tvec4 iz0(Pi0.z); + detail::tvec4 iz1(Pi1.z); + + detail::tvec4 ixy = permute(permute(ix) + iy); + detail::tvec4 ixy0 = permute(ixy + iz0); + detail::tvec4 ixy1 = permute(ixy + iz1); + + detail::tvec4 gx0 = ixy0 / T(7); + detail::tvec4 gy0 = fract(floor(gx0) / T(7)) - T(0.5); + gx0 = fract(gx0); + detail::tvec4 gz0 = detail::tvec4(0.5) - abs(gx0) - abs(gy0); + detail::tvec4 sz0 = step(gz0, detail::tvec4(0.0)); + gx0 -= sz0 * (step(0.0, gx0) - T(0.5)); + gy0 -= sz0 * (step(0.0, gy0) - T(0.5)); + + detail::tvec4 gx1 = ixy1 / T(7); + detail::tvec4 gy1 = fract(floor(gx1) / T(7)) - T(0.5); + gx1 = fract(gx1); + detail::tvec4 gz1 = detail::tvec4(0.5) - abs(gx1) - abs(gy1); + detail::tvec4 sz1 = step(gz1, detail::tvec4(0.0)); + gx1 -= sz1 * (step(T(0), gx1) - T(0.5)); + gy1 -= sz1 * (step(T(0), gy1) - T(0.5)); + + detail::tvec3 g000(gx0.x, gy0.x, gz0.x); + detail::tvec3 g100(gx0.y, gy0.y, gz0.y); + detail::tvec3 g010(gx0.z, gy0.z, gz0.z); + detail::tvec3 g110(gx0.w, gy0.w, gz0.w); + detail::tvec3 g001(gx1.x, gy1.x, gz1.x); + detail::tvec3 g101(gx1.y, gy1.y, gz1.y); + detail::tvec3 g011(gx1.z, gy1.z, gz1.z); + detail::tvec3 g111(gx1.w, gy1.w, gz1.w); + + detail::tvec4 norm0 = taylorInvSqrt(detail::tvec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110))); + g000 *= norm0.x; + g010 *= norm0.y; + g100 *= norm0.z; + g110 *= norm0.w; + detail::tvec4 norm1 = taylorInvSqrt(detail::tvec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111))); + g001 *= norm1.x; + g011 *= norm1.y; + g101 *= norm1.z; + g111 *= norm1.w; + + T n000 = dot(g000, Pf0); + T n100 = dot(g100, detail::tvec3(Pf1.x, Pf0.y, Pf0.z)); + T n010 = dot(g010, detail::tvec3(Pf0.x, Pf1.y, Pf0.z)); + T n110 = dot(g110, detail::tvec3(Pf1.x, Pf1.y, Pf0.z)); + T n001 = dot(g001, detail::tvec3(Pf0.x, Pf0.y, Pf1.z)); + T n101 = dot(g101, detail::tvec3(Pf1.x, Pf0.y, Pf1.z)); + T n011 = dot(g011, detail::tvec3(Pf0.x, Pf1.y, Pf1.z)); + T n111 = dot(g111, Pf1); + + detail::tvec3 fade_xyz = fade(Pf0); + detail::tvec4 n_z = mix(detail::tvec4(n000, n100, n010, n110), detail::tvec4(n001, n101, n011, n111), fade_xyz.z); + detail::tvec2 n_yz = mix( + detail::tvec2(n_z.x, n_z.y), + detail::tvec2(n_z.z, n_z.w), fade_xyz.y); + T n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); + return T(2.2) * n_xyz; + } + */ + // Classic Perlin noise + template + GLM_FUNC_QUALIFIER T perlin(detail::tvec4 const & P) + { + detail::tvec4 Pi0 = floor(P); // Integer part for indexing + detail::tvec4 Pi1 = Pi0 + T(1); // Integer part + 1 + Pi0 = mod(Pi0, T(289)); + Pi1 = mod(Pi1, T(289)); + detail::tvec4 Pf0 = fract(P); // Fractional part for interpolation + detail::tvec4 Pf1 = Pf0 - T(1); // Fractional part - 1.0 + detail::tvec4 ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x); + detail::tvec4 iy(Pi0.y, Pi0.y, Pi1.y, Pi1.y); + detail::tvec4 iz0(Pi0.z); + detail::tvec4 iz1(Pi1.z); + detail::tvec4 iw0(Pi0.w); + detail::tvec4 iw1(Pi1.w); + + detail::tvec4 ixy = permute(permute(ix) + iy); + detail::tvec4 ixy0 = permute(ixy + iz0); + detail::tvec4 ixy1 = permute(ixy + iz1); + detail::tvec4 ixy00 = permute(ixy0 + iw0); + detail::tvec4 ixy01 = permute(ixy0 + iw1); + detail::tvec4 ixy10 = permute(ixy1 + iw0); + detail::tvec4 ixy11 = permute(ixy1 + iw1); + + detail::tvec4 gx00 = ixy00 / T(7); + detail::tvec4 gy00 = floor(gx00) / T(7); + detail::tvec4 gz00 = floor(gy00) / T(6); + gx00 = fract(gx00) - T(0.5); + gy00 = fract(gy00) - T(0.5); + gz00 = fract(gz00) - T(0.5); + detail::tvec4 gw00 = detail::tvec4(0.75) - abs(gx00) - abs(gy00) - abs(gz00); + detail::tvec4 sw00 = step(gw00, detail::tvec4(0.0)); + gx00 -= sw00 * (step(T(0), gx00) - T(0.5)); + gy00 -= sw00 * (step(T(0), gy00) - T(0.5)); + + detail::tvec4 gx01 = ixy01 / T(7); + detail::tvec4 gy01 = floor(gx01) / T(7); + detail::tvec4 gz01 = floor(gy01) / T(6); + gx01 = fract(gx01) - T(0.5); + gy01 = fract(gy01) - T(0.5); + gz01 = fract(gz01) - T(0.5); + detail::tvec4 gw01 = detail::tvec4(0.75) - abs(gx01) - abs(gy01) - abs(gz01); + detail::tvec4 sw01 = step(gw01, detail::tvec4(0.0)); + gx01 -= sw01 * (step(T(0), gx01) - T(0.5)); + gy01 -= sw01 * (step(T(0), gy01) - T(0.5)); + + detail::tvec4 gx10 = ixy10 / T(7); + detail::tvec4 gy10 = floor(gx10) / T(7); + detail::tvec4 gz10 = floor(gy10) / T(6); + gx10 = fract(gx10) - T(0.5); + gy10 = fract(gy10) - T(0.5); + gz10 = fract(gz10) - T(0.5); + detail::tvec4 gw10 = detail::tvec4(0.75) - abs(gx10) - abs(gy10) - abs(gz10); + detail::tvec4 sw10 = step(gw10, detail::tvec4(0)); + gx10 -= sw10 * (step(T(0), gx10) - T(0.5)); + gy10 -= sw10 * (step(T(0), gy10) - T(0.5)); + + detail::tvec4 gx11 = ixy11 / T(7); + detail::tvec4 gy11 = floor(gx11) / T(7); + detail::tvec4 gz11 = floor(gy11) / T(6); + gx11 = fract(gx11) - T(0.5); + gy11 = fract(gy11) - T(0.5); + gz11 = fract(gz11) - T(0.5); + detail::tvec4 gw11 = detail::tvec4(0.75) - abs(gx11) - abs(gy11) - abs(gz11); + detail::tvec4 sw11 = step(gw11, detail::tvec4(0.0)); + gx11 -= sw11 * (step(T(0), gx11) - T(0.5)); + gy11 -= sw11 * (step(T(0), gy11) - T(0.5)); + + detail::tvec4 g0000(gx00.x, gy00.x, gz00.x, gw00.x); + detail::tvec4 g1000(gx00.y, gy00.y, gz00.y, gw00.y); + detail::tvec4 g0100(gx00.z, gy00.z, gz00.z, gw00.z); + detail::tvec4 g1100(gx00.w, gy00.w, gz00.w, gw00.w); + detail::tvec4 g0010(gx10.x, gy10.x, gz10.x, gw10.x); + detail::tvec4 g1010(gx10.y, gy10.y, gz10.y, gw10.y); + detail::tvec4 g0110(gx10.z, gy10.z, gz10.z, gw10.z); + detail::tvec4 g1110(gx10.w, gy10.w, gz10.w, gw10.w); + detail::tvec4 g0001(gx01.x, gy01.x, gz01.x, gw01.x); + detail::tvec4 g1001(gx01.y, gy01.y, gz01.y, gw01.y); + detail::tvec4 g0101(gx01.z, gy01.z, gz01.z, gw01.z); + detail::tvec4 g1101(gx01.w, gy01.w, gz01.w, gw01.w); + detail::tvec4 g0011(gx11.x, gy11.x, gz11.x, gw11.x); + detail::tvec4 g1011(gx11.y, gy11.y, gz11.y, gw11.y); + detail::tvec4 g0111(gx11.z, gy11.z, gz11.z, gw11.z); + detail::tvec4 g1111(gx11.w, gy11.w, gz11.w, gw11.w); + + detail::tvec4 norm00 = taylorInvSqrt(detail::tvec4(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100))); + g0000 *= norm00.x; + g0100 *= norm00.y; + g1000 *= norm00.z; + g1100 *= norm00.w; + + detail::tvec4 norm01 = taylorInvSqrt(detail::tvec4(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101))); + g0001 *= norm01.x; + g0101 *= norm01.y; + g1001 *= norm01.z; + g1101 *= norm01.w; + + detail::tvec4 norm10 = taylorInvSqrt(detail::tvec4(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110))); + g0010 *= norm10.x; + g0110 *= norm10.y; + g1010 *= norm10.z; + g1110 *= norm10.w; + + detail::tvec4 norm11 = taylorInvSqrt(detail::tvec4(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111))); + g0011 *= norm11.x; + g0111 *= norm11.y; + g1011 *= norm11.z; + g1111 *= norm11.w; + + T n0000 = dot(g0000, Pf0); + T n1000 = dot(g1000, detail::tvec4(Pf1.x, Pf0.y, Pf0.z, Pf0.w)); + T n0100 = dot(g0100, detail::tvec4(Pf0.x, Pf1.y, Pf0.z, Pf0.w)); + T n1100 = dot(g1100, detail::tvec4(Pf1.x, Pf1.y, Pf0.z, Pf0.w)); + T n0010 = dot(g0010, detail::tvec4(Pf0.x, Pf0.y, Pf1.z, Pf0.w)); + T n1010 = dot(g1010, detail::tvec4(Pf1.x, Pf0.y, Pf1.z, Pf0.w)); + T n0110 = dot(g0110, detail::tvec4(Pf0.x, Pf1.y, Pf1.z, Pf0.w)); + T n1110 = dot(g1110, detail::tvec4(Pf1.x, Pf1.y, Pf1.z, Pf0.w)); + T n0001 = dot(g0001, detail::tvec4(Pf0.x, Pf0.y, Pf0.z, Pf1.w)); + T n1001 = dot(g1001, detail::tvec4(Pf1.x, Pf0.y, Pf0.z, Pf1.w)); + T n0101 = dot(g0101, detail::tvec4(Pf0.x, Pf1.y, Pf0.z, Pf1.w)); + T n1101 = dot(g1101, detail::tvec4(Pf1.x, Pf1.y, Pf0.z, Pf1.w)); + T n0011 = dot(g0011, detail::tvec4(Pf0.x, Pf0.y, Pf1.z, Pf1.w)); + T n1011 = dot(g1011, detail::tvec4(Pf1.x, Pf0.y, Pf1.z, Pf1.w)); + T n0111 = dot(g0111, detail::tvec4(Pf0.x, Pf1.y, Pf1.z, Pf1.w)); + T n1111 = dot(g1111, Pf1); + + detail::tvec4 fade_xyzw = fade(Pf0); + detail::tvec4 n_0w = mix(detail::tvec4(n0000, n1000, n0100, n1100), detail::tvec4(n0001, n1001, n0101, n1101), fade_xyzw.w); + detail::tvec4 n_1w = mix(detail::tvec4(n0010, n1010, n0110, n1110), detail::tvec4(n0011, n1011, n0111, n1111), fade_xyzw.w); + detail::tvec4 n_zw = mix(n_0w, n_1w, fade_xyzw.z); + detail::tvec2 n_yzw = mix(detail::tvec2(n_zw.x, n_zw.y), detail::tvec2(n_zw.z, n_zw.w), fade_xyzw.y); + T n_xyzw = mix(n_yzw.x, n_yzw.y, fade_xyzw.x); + return T(2.2) * n_xyzw; + } + + // Classic Perlin noise, periodic variant + template + GLM_FUNC_QUALIFIER T perlin(detail::tvec2 const & P, detail::tvec2 const & rep) + { + detail::tvec4 Pi = floor(detail::tvec4(P.x, P.y, P.x, P.y)) + detail::tvec4(0.0, 0.0, 1.0, 1.0); + detail::tvec4 Pf = fract(detail::tvec4(P.x, P.y, P.x, P.y)) - detail::tvec4(0.0, 0.0, 1.0, 1.0); + Pi = mod(Pi, detail::tvec4(rep.x, rep.y, rep.x, rep.y)); // To create noise with explicit period + Pi = mod(Pi, T(289)); // To avoid truncation effects in permutation + detail::tvec4 ix(Pi.x, Pi.z, Pi.x, Pi.z); + detail::tvec4 iy(Pi.y, Pi.y, Pi.w, Pi.w); + detail::tvec4 fx(Pf.x, Pf.z, Pf.x, Pf.z); + detail::tvec4 fy(Pf.y, Pf.y, Pf.w, Pf.w); + + detail::tvec4 i = permute(permute(ix) + iy); + + detail::tvec4 gx = T(2) * fract(i / T(41)) - T(1); + detail::tvec4 gy = abs(gx) - T(0.5); + detail::tvec4 tx = floor(gx + T(0.5)); + gx = gx - tx; + + detail::tvec2 g00(gx.x, gy.x); + detail::tvec2 g10(gx.y, gy.y); + detail::tvec2 g01(gx.z, gy.z); + detail::tvec2 g11(gx.w, gy.w); + + detail::tvec4 norm = taylorInvSqrt(detail::tvec4(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11))); + g00 *= norm.x; + g01 *= norm.y; + g10 *= norm.z; + g11 *= norm.w; + + T n00 = dot(g00, detail::tvec2(fx.x, fy.x)); + T n10 = dot(g10, detail::tvec2(fx.y, fy.y)); + T n01 = dot(g01, detail::tvec2(fx.z, fy.z)); + T n11 = dot(g11, detail::tvec2(fx.w, fy.w)); + + detail::tvec2 fade_xy = fade(detail::tvec2(Pf.x, Pf.y)); + detail::tvec2 n_x = mix(detail::tvec2(n00, n01), detail::tvec2(n10, n11), fade_xy.x); + T n_xy = mix(n_x.x, n_x.y, fade_xy.y); + return T(2.3) * n_xy; + } + + // Classic Perlin noise, periodic variant + template + GLM_FUNC_QUALIFIER T perlin(detail::tvec3 const & P, detail::tvec3 const & rep) + { + detail::tvec3 Pi0 = mod(floor(P), rep); // Integer part, modulo period + detail::tvec3 Pi1 = mod(Pi0 + detail::tvec3(1.0), rep); // Integer part + 1, mod period + Pi0 = mod(Pi0, T(289)); + Pi1 = mod(Pi1, T(289)); + detail::tvec3 Pf0 = fract(P); // Fractional part for interpolation + detail::tvec3 Pf1 = Pf0 - detail::tvec3(1.0); // Fractional part - 1.0 + detail::tvec4 ix = detail::tvec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x); + detail::tvec4 iy = detail::tvec4(Pi0.y, Pi0.y, Pi1.y, Pi1.y); + detail::tvec4 iz0(Pi0.z); + detail::tvec4 iz1(Pi1.z); + + detail::tvec4 ixy = permute(permute(ix) + iy); + detail::tvec4 ixy0 = permute(ixy + iz0); + detail::tvec4 ixy1 = permute(ixy + iz1); + + detail::tvec4 gx0 = ixy0 / T(7); + detail::tvec4 gy0 = fract(floor(gx0) / T(7)) - T(0.5); + gx0 = fract(gx0); + detail::tvec4 gz0 = detail::tvec4(0.5) - abs(gx0) - abs(gy0); + detail::tvec4 sz0 = step(gz0, detail::tvec4(0)); + gx0 -= sz0 * (step(0.0, gx0) - T(0.5)); + gy0 -= sz0 * (step(0.0, gy0) - T(0.5)); + + detail::tvec4 gx1 = ixy1 / T(7); + detail::tvec4 gy1 = fract(floor(gx1) / T(7)) - T(0.5); + gx1 = fract(gx1); + detail::tvec4 gz1 = detail::tvec4(0.5) - abs(gx1) - abs(gy1); + detail::tvec4 sz1 = step(gz1, detail::tvec4(0.0)); + gx1 -= sz1 * (step(0.0, gx1) - T(0.5)); + gy1 -= sz1 * (step(0.0, gy1) - T(0.5)); + + detail::tvec3 g000 = detail::tvec3(gx0.x, gy0.x, gz0.x); + detail::tvec3 g100 = detail::tvec3(gx0.y, gy0.y, gz0.y); + detail::tvec3 g010 = detail::tvec3(gx0.z, gy0.z, gz0.z); + detail::tvec3 g110 = detail::tvec3(gx0.w, gy0.w, gz0.w); + detail::tvec3 g001 = detail::tvec3(gx1.x, gy1.x, gz1.x); + detail::tvec3 g101 = detail::tvec3(gx1.y, gy1.y, gz1.y); + detail::tvec3 g011 = detail::tvec3(gx1.z, gy1.z, gz1.z); + detail::tvec3 g111 = detail::tvec3(gx1.w, gy1.w, gz1.w); + + detail::tvec4 norm0 = taylorInvSqrt(detail::tvec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110))); + g000 *= norm0.x; + g010 *= norm0.y; + g100 *= norm0.z; + g110 *= norm0.w; + detail::tvec4 norm1 = taylorInvSqrt(detail::tvec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111))); + g001 *= norm1.x; + g011 *= norm1.y; + g101 *= norm1.z; + g111 *= norm1.w; + + T n000 = dot(g000, Pf0); + T n100 = dot(g100, detail::tvec3(Pf1.x, Pf0.y, Pf0.z)); + T n010 = dot(g010, detail::tvec3(Pf0.x, Pf1.y, Pf0.z)); + T n110 = dot(g110, detail::tvec3(Pf1.x, Pf1.y, Pf0.z)); + T n001 = dot(g001, detail::tvec3(Pf0.x, Pf0.y, Pf1.z)); + T n101 = dot(g101, detail::tvec3(Pf1.x, Pf0.y, Pf1.z)); + T n011 = dot(g011, detail::tvec3(Pf0.x, Pf1.y, Pf1.z)); + T n111 = dot(g111, Pf1); + + detail::tvec3 fade_xyz = fade(Pf0); + detail::tvec4 n_z = mix(detail::tvec4(n000, n100, n010, n110), detail::tvec4(n001, n101, n011, n111), fade_xyz.z); + detail::tvec2 n_yz = mix(detail::tvec2(n_z.x, n_z.y), detail::tvec2(n_z.z, n_z.w), fade_xyz.y); + T n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); + return T(2.2) * n_xyz; + } + + // Classic Perlin noise, periodic version + template + GLM_FUNC_QUALIFIER T perlin(detail::tvec4 const & P, detail::tvec4 const & rep) + { + detail::tvec4 Pi0 = mod(floor(P), rep); // Integer part modulo rep + detail::tvec4 Pi1 = mod(Pi0 + T(1), rep); // Integer part + 1 mod rep + detail::tvec4 Pf0 = fract(P); // Fractional part for interpolation + detail::tvec4 Pf1 = Pf0 - T(1); // Fractional part - 1.0 + detail::tvec4 ix = detail::tvec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x); + detail::tvec4 iy = detail::tvec4(Pi0.y, Pi0.y, Pi1.y, Pi1.y); + detail::tvec4 iz0(Pi0.z); + detail::tvec4 iz1(Pi1.z); + detail::tvec4 iw0(Pi0.w); + detail::tvec4 iw1(Pi1.w); + + detail::tvec4 ixy = permute(permute(ix) + iy); + detail::tvec4 ixy0 = permute(ixy + iz0); + detail::tvec4 ixy1 = permute(ixy + iz1); + detail::tvec4 ixy00 = permute(ixy0 + iw0); + detail::tvec4 ixy01 = permute(ixy0 + iw1); + detail::tvec4 ixy10 = permute(ixy1 + iw0); + detail::tvec4 ixy11 = permute(ixy1 + iw1); + + detail::tvec4 gx00 = ixy00 / T(7); + detail::tvec4 gy00 = floor(gx00) / T(7); + detail::tvec4 gz00 = floor(gy00) / T(6); + gx00 = fract(gx00) - T(0.5); + gy00 = fract(gy00) - T(0.5); + gz00 = fract(gz00) - T(0.5); + detail::tvec4 gw00 = detail::tvec4(0.75) - abs(gx00) - abs(gy00) - abs(gz00); + detail::tvec4 sw00 = step(gw00, detail::tvec4(0)); + gx00 -= sw00 * (step(0.0, gx00) - T(0.5)); + gy00 -= sw00 * (step(0.0, gy00) - T(0.5)); + + detail::tvec4 gx01 = ixy01 / T(7); + detail::tvec4 gy01 = floor(gx01) / T(7); + detail::tvec4 gz01 = floor(gy01) / T(6); + gx01 = fract(gx01) - T(0.5); + gy01 = fract(gy01) - T(0.5); + gz01 = fract(gz01) - T(0.5); + detail::tvec4 gw01 = detail::tvec4(0.75) - abs(gx01) - abs(gy01) - abs(gz01); + detail::tvec4 sw01 = step(gw01, detail::tvec4(0.0)); + gx01 -= sw01 * (step(0.0, gx01) - T(0.5)); + gy01 -= sw01 * (step(0.0, gy01) - T(0.5)); + + detail::tvec4 gx10 = ixy10 / T(7); + detail::tvec4 gy10 = floor(gx10) / T(7); + detail::tvec4 gz10 = floor(gy10) / T(6); + gx10 = fract(gx10) - T(0.5); + gy10 = fract(gy10) - T(0.5); + gz10 = fract(gz10) - T(0.5); + detail::tvec4 gw10 = detail::tvec4(0.75) - abs(gx10) - abs(gy10) - abs(gz10); + detail::tvec4 sw10 = step(gw10, detail::tvec4(0.0)); + gx10 -= sw10 * (step(0.0, gx10) - T(0.5)); + gy10 -= sw10 * (step(0.0, gy10) - T(0.5)); + + detail::tvec4 gx11 = ixy11 / T(7); + detail::tvec4 gy11 = floor(gx11) / T(7); + detail::tvec4 gz11 = floor(gy11) / T(6); + gx11 = fract(gx11) - T(0.5); + gy11 = fract(gy11) - T(0.5); + gz11 = fract(gz11) - T(0.5); + detail::tvec4 gw11 = detail::tvec4(0.75) - abs(gx11) - abs(gy11) - abs(gz11); + detail::tvec4 sw11 = step(gw11, detail::tvec4(0.0)); + gx11 -= sw11 * (step(0.0, gx11) - T(0.5)); + gy11 -= sw11 * (step(0.0, gy11) - T(0.5)); + + detail::tvec4 g0000(gx00.x, gy00.x, gz00.x, gw00.x); + detail::tvec4 g1000(gx00.y, gy00.y, gz00.y, gw00.y); + detail::tvec4 g0100(gx00.z, gy00.z, gz00.z, gw00.z); + detail::tvec4 g1100(gx00.w, gy00.w, gz00.w, gw00.w); + detail::tvec4 g0010(gx10.x, gy10.x, gz10.x, gw10.x); + detail::tvec4 g1010(gx10.y, gy10.y, gz10.y, gw10.y); + detail::tvec4 g0110(gx10.z, gy10.z, gz10.z, gw10.z); + detail::tvec4 g1110(gx10.w, gy10.w, gz10.w, gw10.w); + detail::tvec4 g0001(gx01.x, gy01.x, gz01.x, gw01.x); + detail::tvec4 g1001(gx01.y, gy01.y, gz01.y, gw01.y); + detail::tvec4 g0101(gx01.z, gy01.z, gz01.z, gw01.z); + detail::tvec4 g1101(gx01.w, gy01.w, gz01.w, gw01.w); + detail::tvec4 g0011(gx11.x, gy11.x, gz11.x, gw11.x); + detail::tvec4 g1011(gx11.y, gy11.y, gz11.y, gw11.y); + detail::tvec4 g0111(gx11.z, gy11.z, gz11.z, gw11.z); + detail::tvec4 g1111(gx11.w, gy11.w, gz11.w, gw11.w); + + detail::tvec4 norm00 = taylorInvSqrt(detail::tvec4(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100))); + g0000 *= norm00.x; + g0100 *= norm00.y; + g1000 *= norm00.z; + g1100 *= norm00.w; + + detail::tvec4 norm01 = taylorInvSqrt(detail::tvec4(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101))); + g0001 *= norm01.x; + g0101 *= norm01.y; + g1001 *= norm01.z; + g1101 *= norm01.w; + + detail::tvec4 norm10 = taylorInvSqrt(detail::tvec4(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110))); + g0010 *= norm10.x; + g0110 *= norm10.y; + g1010 *= norm10.z; + g1110 *= norm10.w; + + detail::tvec4 norm11 = taylorInvSqrt(detail::tvec4(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111))); + g0011 *= norm11.x; + g0111 *= norm11.y; + g1011 *= norm11.z; + g1111 *= norm11.w; + + T n0000 = dot(g0000, Pf0); + T n1000 = dot(g1000, detail::tvec4(Pf1.x, Pf0.y, Pf0.z, Pf0.w)); + T n0100 = dot(g0100, detail::tvec4(Pf0.x, Pf1.y, Pf0.z, Pf0.w)); + T n1100 = dot(g1100, detail::tvec4(Pf1.x, Pf1.y, Pf0.z, Pf0.w)); + T n0010 = dot(g0010, detail::tvec4(Pf0.x, Pf0.y, Pf1.z, Pf0.w)); + T n1010 = dot(g1010, detail::tvec4(Pf1.x, Pf0.y, Pf1.z, Pf0.w)); + T n0110 = dot(g0110, detail::tvec4(Pf0.x, Pf1.y, Pf1.z, Pf0.w)); + T n1110 = dot(g1110, detail::tvec4(Pf1.x, Pf1.y, Pf1.z, Pf0.w)); + T n0001 = dot(g0001, detail::tvec4(Pf0.x, Pf0.y, Pf0.z, Pf1.w)); + T n1001 = dot(g1001, detail::tvec4(Pf1.x, Pf0.y, Pf0.z, Pf1.w)); + T n0101 = dot(g0101, detail::tvec4(Pf0.x, Pf1.y, Pf0.z, Pf1.w)); + T n1101 = dot(g1101, detail::tvec4(Pf1.x, Pf1.y, Pf0.z, Pf1.w)); + T n0011 = dot(g0011, detail::tvec4(Pf0.x, Pf0.y, Pf1.z, Pf1.w)); + T n1011 = dot(g1011, detail::tvec4(Pf1.x, Pf0.y, Pf1.z, Pf1.w)); + T n0111 = dot(g0111, detail::tvec4(Pf0.x, Pf1.y, Pf1.z, Pf1.w)); + T n1111 = dot(g1111, Pf1); + + detail::tvec4 fade_xyzw = fade(Pf0); + detail::tvec4 n_0w = mix(detail::tvec4(n0000, n1000, n0100, n1100), detail::tvec4(n0001, n1001, n0101, n1101), fade_xyzw.w); + detail::tvec4 n_1w = mix(detail::tvec4(n0010, n1010, n0110, n1110), detail::tvec4(n0011, n1011, n0111, n1111), fade_xyzw.w); + detail::tvec4 n_zw = mix(n_0w, n_1w, fade_xyzw.z); + detail::tvec2 n_yzw = mix(detail::tvec2(n_zw.x, n_zw.y), detail::tvec2(n_zw.z, n_zw.w), fade_xyzw.y); + T n_xyzw = mix(n_yzw.x, n_yzw.y, fade_xyzw.x); + return T(2.2) * n_xyzw; + } + + template + GLM_FUNC_QUALIFIER T simplex(glm::detail::tvec2 const & v) + { + detail::tvec4 const C = detail::tvec4( + T( 0.211324865405187), // (3.0 - sqrt(3.0)) / 6.0 + T( 0.366025403784439), // 0.5 * (sqrt(3.0) - 1.0) + T(-0.577350269189626), // -1.0 + 2.0 * C.x + T( 0.024390243902439)); // 1.0 / 41.0 + + // First corner + detail::tvec2 i = floor(v + dot(v, detail::tvec2(C[1]))); + detail::tvec2 x0 = v - i + dot(i, detail::tvec2(C[0])); + + // Other corners + //i1.x = step( x0.y, x0.x ); // x0.x > x0.y ? 1.0 : 0.0 + //i1.y = 1.0 - i1.x; + detail::tvec2 i1 = (x0.x > x0.y) ? detail::tvec2(1, 0) : detail::tvec2(0, 1); + // x0 = x0 - 0.0 + 0.0 * C.xx ; + // x1 = x0 - i1 + 1.0 * C.xx ; + // x2 = x0 - 1.0 + 2.0 * C.xx ; + detail::tvec4 x12 = detail::tvec4(x0.x, x0.y, x0.x, x0.y) + detail::tvec4(C.x, C.x, C.z, C.z); + x12 = detail::tvec4(detail::tvec2(x12) - i1, x12.z, x12.w); + + // Permutations + i = mod(i, T(289)); // Avoid truncation effects in permutation + detail::tvec3 p = permute( + permute(i.y + detail::tvec3(T(0), i1.y, T(1))) + + i.x + detail::tvec3(T(0), i1.x, T(1))); + + detail::tvec3 m = max(T(0.5) - detail::tvec3( + dot(x0, x0), + dot(detail::tvec2(x12.x, x12.y), detail::tvec2(x12.x, x12.y)), + dot(detail::tvec2(x12.z, x12.w), detail::tvec2(x12.z, x12.w))), T(0)); + m = m * m ; + m = m * m ; + + // Gradients: 41 points uniformly over a line, mapped onto a diamond. + // The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287) + + detail::tvec3 x = T(2) * fract(p * C.w) - T(1); + detail::tvec3 h = abs(x) - T(0.5); + detail::tvec3 ox = floor(x + T(0.5)); + detail::tvec3 a0 = x - ox; + + // Normalise gradients implicitly by scaling m + // Inlined for speed: m *= taylorInvSqrt( a0*a0 + h*h ); + m *= T(1.79284291400159) - T(0.85373472095314) * (a0 * a0 + h * h); + + // Compute final noise value at P + detail::tvec3 g; + g.x = a0.x * x0.x + h.x * x0.y; + //g.yz = a0.yz * x12.xz + h.yz * x12.yw; + g.y = a0.y * x12.x + h.y * x12.y; + g.z = a0.z * x12.z + h.z * x12.w; + return T(130) * dot(m, g); + } + + template + GLM_FUNC_QUALIFIER T simplex(detail::tvec3 const & v) + { + detail::tvec2 const C(1.0 / 6.0, 1.0 / 3.0); + detail::tvec4 const D(0.0, 0.5, 1.0, 2.0); + + // First corner + detail::tvec3 i(floor(v + dot(v, detail::tvec3(C.y)))); + detail::tvec3 x0(v - i + dot(i, detail::tvec3(C.x))); + + // Other corners + detail::tvec3 g(step(detail::tvec3(x0.y, x0.z, x0.x), x0)); + detail::tvec3 l(T(1) - g); + detail::tvec3 i1(min(g, detail::tvec3(l.z, l.x, l.y))); + detail::tvec3 i2(max(g, detail::tvec3(l.z, l.x, l.y))); + + // x0 = x0 - 0.0 + 0.0 * C.xxx; + // x1 = x0 - i1 + 1.0 * C.xxx; + // x2 = x0 - i2 + 2.0 * C.xxx; + // x3 = x0 - 1.0 + 3.0 * C.xxx; + detail::tvec3 x1(x0 - i1 + C.x); + detail::tvec3 x2(x0 - i2 + C.y); // 2.0*C.x = 1/3 = C.y + detail::tvec3 x3(x0 - D.y); // -1.0+3.0*C.x = -0.5 = -D.y + + // Permutations + i = mod289(i); + detail::tvec4 p(permute(permute(permute( + i.z + detail::tvec4(T(0), i1.z, i2.z, T(1))) + + i.y + detail::tvec4(T(0), i1.y, i2.y, T(1))) + + i.x + detail::tvec4(T(0), i1.x, i2.x, T(1)))); + + // Gradients: 7x7 points over a square, mapped onto an octahedron. + // The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294) + T n_ = T(0.142857142857); // 1.0/7.0 + detail::tvec3 ns(n_ * detail::tvec3(D.w, D.y, D.z) - detail::tvec3(D.x, D.z, D.x)); + + detail::tvec4 j(p - T(49) * floor(p * ns.z * ns.z)); // mod(p,7*7) + + detail::tvec4 x_(floor(j * ns.z)); + detail::tvec4 y_(floor(j - T(7) * x_)); // mod(j,N) + + detail::tvec4 x(x_ * ns.x + ns.y); + detail::tvec4 y(y_ * ns.x + ns.y); + detail::tvec4 h(T(1) - abs(x) - abs(y)); + + detail::tvec4 b0(x.x, x.y, y.x, y.y); + detail::tvec4 b1(x.z, x.w, y.z, y.w); + + // vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0; + // vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0; + detail::tvec4 s0(floor(b0) * T(2) + T(1)); + detail::tvec4 s1(floor(b1) * T(2) + T(1)); + detail::tvec4 sh(-step(h, detail::tvec4(0.0))); + + detail::tvec4 a0 = detail::tvec4(b0.x, b0.z, b0.y, b0.w) + detail::tvec4(s0.x, s0.z, s0.y, s0.w) * detail::tvec4(sh.x, sh.x, sh.y, sh.y); + detail::tvec4 a1 = detail::tvec4(b1.x, b1.z, b1.y, b1.w) + detail::tvec4(s1.x, s1.z, s1.y, s1.w) * detail::tvec4(sh.z, sh.z, sh.w, sh.w); + + detail::tvec3 p0(a0.x, a0.y, h.x); + detail::tvec3 p1(a0.z, a0.w, h.y); + detail::tvec3 p2(a1.x, a1.y, h.z); + detail::tvec3 p3(a1.z, a1.w, h.w); + + // Normalise gradients + detail::tvec4 norm = taylorInvSqrt(detail::tvec4(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3))); + p0 *= norm.x; + p1 *= norm.y; + p2 *= norm.z; + p3 *= norm.w; + + // Mix final noise value + detail::tvec4 m = max(T(0.6) - detail::tvec4(dot(x0, x0), dot(x1, x1), dot(x2, x2), dot(x3, x3)), T(0)); + m = m * m; + return T(42) * dot(m * m, detail::tvec4(dot(p0, x0), dot(p1, x1), dot(p2, x2), dot(p3, x3))); + } + + template + GLM_FUNC_QUALIFIER T simplex(detail::tvec4 const & v) + { + detail::tvec4 const C( + 0.138196601125011, // (5 - sqrt(5))/20 G4 + 0.276393202250021, // 2 * G4 + 0.414589803375032, // 3 * G4 + -0.447213595499958); // -1 + 4 * G4 + + // (sqrt(5) - 1)/4 = F4, used once below + T const F4 = T(0.309016994374947451); + + // First corner + detail::tvec4 i = floor(v + dot(v, vec4(F4))); + detail::tvec4 x0 = v - i + dot(i, vec4(C.x)); + + // Other corners + + // Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI) + detail::tvec4 i0; + detail::tvec3 isX = step(detail::tvec3(x0.y, x0.z, x0.w), detail::tvec3(x0.x)); + detail::tvec3 isYZ = step(detail::tvec3(x0.z, x0.w, x0.w), detail::tvec3(x0.y, x0.y, x0.z)); + // i0.x = dot(isX, vec3(1.0)); + //i0.x = isX.x + isX.y + isX.z; + //i0.yzw = T(1) - isX; + i0 = detail::tvec4(isX.x + isX.y + isX.z, T(1) - isX); + // i0.y += dot(isYZ.xy, vec2(1.0)); + i0.y += isYZ.x + isYZ.y; + //i0.zw += 1.0 - detail::tvec2(isYZ.x, isYZ.y); + i0.z += T(1) - isYZ.x; + i0.w += T(1) - isYZ.y; + i0.z += isYZ.z; + i0.w += T(1) - isYZ.z; + + // i0 now contains the unique values 0,1,2,3 in each channel + detail::tvec4 i3 = clamp(i0, 0.0, 1.0); + detail::tvec4 i2 = clamp(i0 - 1.0, 0.0, 1.0); + detail::tvec4 i1 = clamp(i0 - 2.0, 0.0, 1.0); + + // x0 = x0 - 0.0 + 0.0 * C.xxxx + // x1 = x0 - i1 + 0.0 * C.xxxx + // x2 = x0 - i2 + 0.0 * C.xxxx + // x3 = x0 - i3 + 0.0 * C.xxxx + // x4 = x0 - 1.0 + 4.0 * C.xxxx + detail::tvec4 x1 = x0 - i1 + C.x; + detail::tvec4 x2 = x0 - i2 + C.y; + detail::tvec4 x3 = x0 - i3 + C.z; + detail::tvec4 x4 = x0 + C.w; + + // Permutations + i = mod(i, T(289)); + T j0 = permute(permute(permute(permute(i.w) + i.z) + i.y) + i.x); + detail::tvec4 j1 = permute(permute(permute(permute( + i.w + detail::tvec4(i1.w, i2.w, i3.w, T(1))) + + i.z + detail::tvec4(i1.z, i2.z, i3.z, T(1))) + + i.y + detail::tvec4(i1.y, i2.y, i3.y, T(1))) + + i.x + detail::tvec4(i1.x, i2.x, i3.x, T(1))); + + // Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope + // 7*7*6 = 294, which is close to the ring size 17*17 = 289. + detail::tvec4 ip = detail::tvec4(T(1) / T(294), T(1) / T(49), T(1) / T(7), T(0)); + + detail::tvec4 p0 = grad4(j0, ip); + detail::tvec4 p1 = grad4(j1.x, ip); + detail::tvec4 p2 = grad4(j1.y, ip); + detail::tvec4 p3 = grad4(j1.z, ip); + detail::tvec4 p4 = grad4(j1.w, ip); + + // Normalise gradients + detail::tvec4 norm = taylorInvSqrt(detail::tvec4(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3))); + p0 *= norm.x; + p1 *= norm.y; + p2 *= norm.z; + p3 *= norm.w; + p4 *= taylorInvSqrt(dot(p4, p4)); + + // Mix contributions from the five corners + detail::tvec3 m0 = max(T(0.6) - detail::tvec3(dot(x0, x0), dot(x1, x1), dot(x2, x2)), T(0)); + detail::tvec2 m1 = max(T(0.6) - detail::tvec2(dot(x3, x3), dot(x4, x4) ), T(0)); + m0 = m0 * m0; + m1 = m1 * m1; + return T(49) * + (dot(m0 * m0, detail::tvec3(dot(p0, x0), dot(p1, x1), dot(p2, x2))) + + dot(m1 * m1, detail::tvec2(dot(p3, x3), dot(p4, x4)))); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtc/quaternion.hpp b/include/gal/opengl/glm/gtc/quaternion.hpp index c971b9f5be..8e36a85485 100644 --- a/include/gal/opengl/glm/gtc/quaternion.hpp +++ b/include/gal/opengl/glm/gtc/quaternion.hpp @@ -1,381 +1,381 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_quaternion -/// @file glm/gtc/quaternion.hpp -/// @date 2009-05-21 / 2012-12-20 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtc_half_float (dependence) -/// @see gtc_constants (dependence) -/// -/// @defgroup gtc_quaternion GLM_GTC_quaternion -/// @ingroup gtc -/// -/// @brief Defines a templated quaternion type and several quaternion operations. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTC_quaternion -#define GLM_GTC_quaternion GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtc/half_float.hpp" -#include "../gtc/constants.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTC_quaternion extension included") -#endif - -namespace glm{ -namespace detail -{ - template - struct tquat// : public genType - { - enum ctor{null}; - - typedef T value_type; - typedef std::size_t size_type; - - public: - value_type x, y, z, w; - - GLM_FUNC_DECL size_type length() const; - - // Constructors - tquat(); - explicit tquat( - value_type const & s, - glm::detail::tvec3 const & v); - explicit tquat( - value_type const & w, - value_type const & x, - value_type const & y, - value_type const & z); - - // Convertions - - /// Build a quaternion from euler angles (pitch, yaw, roll), in radians. - explicit tquat( - tvec3 const & eulerAngles); - explicit tquat( - tmat3x3 const & m); - explicit tquat( - tmat4x4 const & m); - - // Accesses - value_type & operator[](int i); - value_type const & operator[](int i) const; - - // Operators - tquat & operator*=(value_type const & s); - tquat & operator/=(value_type const & s); - }; - - template - detail::tquat operator- ( - detail::tquat const & q); - - template - detail::tquat operator+ ( - detail::tquat const & q, - detail::tquat const & p); - - template - detail::tquat operator* ( - detail::tquat const & q, - detail::tquat const & p); - - template - detail::tvec3 operator* ( - detail::tquat const & q, - detail::tvec3 const & v); - - template - detail::tvec3 operator* ( - detail::tvec3 const & v, - detail::tquat const & q); - - template - detail::tvec4 operator* ( - detail::tquat const & q, - detail::tvec4 const & v); - - template - detail::tvec4 operator* ( - detail::tvec4 const & v, - detail::tquat const & q); - - template - detail::tquat operator* ( - detail::tquat const & q, - typename detail::tquat::value_type const & s); - - template - detail::tquat operator* ( - typename detail::tquat::value_type const & s, - detail::tquat const & q); - - template - detail::tquat operator/ ( - detail::tquat const & q, - typename detail::tquat::value_type const & s); - -} //namespace detail - - /// @addtogroup gtc_quaternion - /// @{ - - /// Returns the length of the quaternion. - /// - /// @see gtc_quaternion - template - T length( - detail::tquat const & q); - - /// Returns the normalized quaternion. - /// - /// @see gtc_quaternion - template - detail::tquat normalize( - detail::tquat const & q); - - /// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ... - /// - /// @see gtc_quaternion - template - T dot( - detail::tquat const & q1, - detail::tquat const & q2); - - /// Spherical linear interpolation of two quaternions. - /// The interpolation is oriented and the rotation is performed at constant speed. - /// For short path spherical linear interpolation, use the slerp function. - /// - /// @param x A quaternion - /// @param y A quaternion - /// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1]. - /// @tparam T Value type used to build the quaternion. Supported: half, float or double. - /// @see gtc_quaternion - /// @see - slerp(detail::tquat const & x, detail::tquat const & y, T const & a) - template - detail::tquat mix( - detail::tquat const & x, - detail::tquat const & y, - T const & a); - - /// Linear interpolation of two quaternions. - /// The interpolation is oriented. - /// - /// @param x A quaternion - /// @param y A quaternion - /// @param a Interpolation factor. The interpolation is defined in the range [0, 1]. - /// @tparam T Value type used to build the quaternion. Supported: half, float or double. - /// @see gtc_quaternion - template - detail::tquat lerp( - detail::tquat const & x, - detail::tquat const & y, - T const & a); - - /// Spherical linear interpolation of two quaternions. - /// The interpolation always take the short path and the rotation is performed at constant speed. - /// - /// @param x A quaternion - /// @param y A quaternion - /// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1]. - /// @tparam T Value type used to build the quaternion. Supported: half, float or double. - /// @see gtc_quaternion - template - detail::tquat slerp( - detail::tquat const & x, - detail::tquat const & y, - T const & a); - - /// Returns the q conjugate. - /// - /// @see gtc_quaternion - template - detail::tquat conjugate( - detail::tquat const & q); - - /// Returns the q inverse. - /// - /// @see gtc_quaternion - template - detail::tquat inverse( - detail::tquat const & q); - - /// Rotates a quaternion from an vector of 3 components axis and an angle. - /// - /// @param q Source orientation - /// @param angle Angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. - /// @param axis Axis of the rotation, must be normalized. - /// - /// @see gtc_quaternion - template - detail::tquat rotate( - detail::tquat const & q, - typename detail::tquat::value_type const & angle, - detail::tvec3 const & axis); - - /// Returns euler angles, yitch as x, yaw as y, roll as z. - /// - /// @see gtc_quaternion - template - detail::tvec3 eulerAngles( - detail::tquat const & x); - - /// Returns roll value of euler angles expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. - /// - /// @see gtx_quaternion - template - valType roll( - detail::tquat const & x); - - /// Returns pitch value of euler angles expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. - /// - /// @see gtx_quaternion - template - valType pitch( - detail::tquat const & x); - - /// Returns yaw value of euler angles expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. - /// - /// @see gtx_quaternion - template - valType yaw( - detail::tquat const & x); - - /// Converts a quaternion to a 3 * 3 matrix. - /// - /// @see gtc_quaternion - template - detail::tmat3x3 mat3_cast( - detail::tquat const & x); - - /// Converts a quaternion to a 4 * 4 matrix. - /// - /// @see gtc_quaternion - template - detail::tmat4x4 mat4_cast( - detail::tquat const & x); - - /// Converts a 3 * 3 matrix to a quaternion. - /// - /// @see gtc_quaternion - template - detail::tquat quat_cast( - detail::tmat3x3 const & x); - - /// Converts a 4 * 4 matrix to a quaternion. - /// - /// @see gtc_quaternion - template - detail::tquat quat_cast( - detail::tmat4x4 const & x); - - /// Returns the quaternion rotation angle. - /// - /// @see gtc_quaternion - template - valType angle( - detail::tquat const & x); - - /// Returns the q rotation axis. - /// - /// @see gtc_quaternion - template - detail::tvec3 axis( - detail::tquat const & x); - - /// Build a quaternion from an angle and a normalized axis. - /// - /// @param angle Angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. - /// @param x x component of the x-axis, x, y, z must be a normalized axis - /// @param y y component of the y-axis, x, y, z must be a normalized axis - /// @param z z component of the z-axis, x, y, z must be a normalized axis - /// - /// @see gtc_quaternion - template - detail::tquat angleAxis( - valType const & angle, - valType const & x, - valType const & y, - valType const & z); - - /// Build a quaternion from an angle and a normalized axis. - /// - /// @param angle Angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. - /// @param axis Axis of the quaternion, must be normalized. - /// - /// @see gtc_quaternion - template - detail::tquat angleAxis( - valType const & angle, - detail::tvec3 const & axis); - - /// Quaternion of floating-point numbers. - /// - /// @see gtc_quaternion - typedef detail::tquat quat; - - /// Quaternion of half-precision floating-point numbers. - /// - /// @see gtc_quaternion - typedef detail::tquat hquat; - - /// Quaternion of single-precision floating-point numbers. - /// - /// @see gtc_quaternion - typedef detail::tquat fquat; - - /// Quaternion of double-precision floating-point numbers. - /// - /// @see gtc_quaternion - typedef detail::tquat dquat; - - /// Quaternion of low precision floating-point numbers. - /// - /// @see gtc_quaternion - typedef detail::tquat lowp_quat; - - /// Quaternion of medium precision floating-point numbers. - /// - /// @see gtc_quaternion - typedef detail::tquat mediump_quat; - - /// Quaternion of high precision floating-point numbers. - /// - /// @see gtc_quaternion - typedef detail::tquat highp_quat; - - /// @} -} //namespace glm - -#include "quaternion.inl" - -#endif//GLM_GTC_quaternion +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_quaternion +/// @file glm/gtc/quaternion.hpp +/// @date 2009-05-21 / 2012-12-20 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_half_float (dependence) +/// @see gtc_constants (dependence) +/// +/// @defgroup gtc_quaternion GLM_GTC_quaternion +/// @ingroup gtc +/// +/// @brief Defines a templated quaternion type and several quaternion operations. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_quaternion +#define GLM_GTC_quaternion GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" +#include "../gtc/constants.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_quaternion extension included") +#endif + +namespace glm{ +namespace detail +{ + template + struct tquat// : public genType + { + enum ctor{null}; + + typedef T value_type; + typedef std::size_t size_type; + + public: + value_type x, y, z, w; + + GLM_FUNC_DECL size_type length() const; + + // Constructors + tquat(); + explicit tquat( + value_type const & s, + glm::detail::tvec3 const & v); + explicit tquat( + value_type const & w, + value_type const & x, + value_type const & y, + value_type const & z); + + // Convertions + + /// Build a quaternion from euler angles (pitch, yaw, roll), in radians. + explicit tquat( + tvec3 const & eulerAngles); + explicit tquat( + tmat3x3 const & m); + explicit tquat( + tmat4x4 const & m); + + // Accesses + value_type & operator[](int i); + value_type const & operator[](int i) const; + + // Operators + tquat & operator*=(value_type const & s); + tquat & operator/=(value_type const & s); + }; + + template + detail::tquat operator- ( + detail::tquat const & q); + + template + detail::tquat operator+ ( + detail::tquat const & q, + detail::tquat const & p); + + template + detail::tquat operator* ( + detail::tquat const & q, + detail::tquat const & p); + + template + detail::tvec3 operator* ( + detail::tquat const & q, + detail::tvec3 const & v); + + template + detail::tvec3 operator* ( + detail::tvec3 const & v, + detail::tquat const & q); + + template + detail::tvec4 operator* ( + detail::tquat const & q, + detail::tvec4 const & v); + + template + detail::tvec4 operator* ( + detail::tvec4 const & v, + detail::tquat const & q); + + template + detail::tquat operator* ( + detail::tquat const & q, + typename detail::tquat::value_type const & s); + + template + detail::tquat operator* ( + typename detail::tquat::value_type const & s, + detail::tquat const & q); + + template + detail::tquat operator/ ( + detail::tquat const & q, + typename detail::tquat::value_type const & s); + +} //namespace detail + + /// @addtogroup gtc_quaternion + /// @{ + + /// Returns the length of the quaternion. + /// + /// @see gtc_quaternion + template + T length( + detail::tquat const & q); + + /// Returns the normalized quaternion. + /// + /// @see gtc_quaternion + template + detail::tquat normalize( + detail::tquat const & q); + + /// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ... + /// + /// @see gtc_quaternion + template + T dot( + detail::tquat const & q1, + detail::tquat const & q2); + + /// Spherical linear interpolation of two quaternions. + /// The interpolation is oriented and the rotation is performed at constant speed. + /// For short path spherical linear interpolation, use the slerp function. + /// + /// @param x A quaternion + /// @param y A quaternion + /// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1]. + /// @tparam T Value type used to build the quaternion. Supported: half, float or double. + /// @see gtc_quaternion + /// @see - slerp(detail::tquat const & x, detail::tquat const & y, T const & a) + template + detail::tquat mix( + detail::tquat const & x, + detail::tquat const & y, + T const & a); + + /// Linear interpolation of two quaternions. + /// The interpolation is oriented. + /// + /// @param x A quaternion + /// @param y A quaternion + /// @param a Interpolation factor. The interpolation is defined in the range [0, 1]. + /// @tparam T Value type used to build the quaternion. Supported: half, float or double. + /// @see gtc_quaternion + template + detail::tquat lerp( + detail::tquat const & x, + detail::tquat const & y, + T const & a); + + /// Spherical linear interpolation of two quaternions. + /// The interpolation always take the short path and the rotation is performed at constant speed. + /// + /// @param x A quaternion + /// @param y A quaternion + /// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1]. + /// @tparam T Value type used to build the quaternion. Supported: half, float or double. + /// @see gtc_quaternion + template + detail::tquat slerp( + detail::tquat const & x, + detail::tquat const & y, + T const & a); + + /// Returns the q conjugate. + /// + /// @see gtc_quaternion + template + detail::tquat conjugate( + detail::tquat const & q); + + /// Returns the q inverse. + /// + /// @see gtc_quaternion + template + detail::tquat inverse( + detail::tquat const & q); + + /// Rotates a quaternion from an vector of 3 components axis and an angle. + /// + /// @param q Source orientation + /// @param angle Angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. + /// @param axis Axis of the rotation, must be normalized. + /// + /// @see gtc_quaternion + template + detail::tquat rotate( + detail::tquat const & q, + typename detail::tquat::value_type const & angle, + detail::tvec3 const & axis); + + /// Returns euler angles, yitch as x, yaw as y, roll as z. + /// + /// @see gtc_quaternion + template + detail::tvec3 eulerAngles( + detail::tquat const & x); + + /// Returns roll value of euler angles expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. + /// + /// @see gtx_quaternion + template + valType roll( + detail::tquat const & x); + + /// Returns pitch value of euler angles expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. + /// + /// @see gtx_quaternion + template + valType pitch( + detail::tquat const & x); + + /// Returns yaw value of euler angles expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. + /// + /// @see gtx_quaternion + template + valType yaw( + detail::tquat const & x); + + /// Converts a quaternion to a 3 * 3 matrix. + /// + /// @see gtc_quaternion + template + detail::tmat3x3 mat3_cast( + detail::tquat const & x); + + /// Converts a quaternion to a 4 * 4 matrix. + /// + /// @see gtc_quaternion + template + detail::tmat4x4 mat4_cast( + detail::tquat const & x); + + /// Converts a 3 * 3 matrix to a quaternion. + /// + /// @see gtc_quaternion + template + detail::tquat quat_cast( + detail::tmat3x3 const & x); + + /// Converts a 4 * 4 matrix to a quaternion. + /// + /// @see gtc_quaternion + template + detail::tquat quat_cast( + detail::tmat4x4 const & x); + + /// Returns the quaternion rotation angle. + /// + /// @see gtc_quaternion + template + valType angle( + detail::tquat const & x); + + /// Returns the q rotation axis. + /// + /// @see gtc_quaternion + template + detail::tvec3 axis( + detail::tquat const & x); + + /// Build a quaternion from an angle and a normalized axis. + /// + /// @param angle Angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. + /// @param x x component of the x-axis, x, y, z must be a normalized axis + /// @param y y component of the y-axis, x, y, z must be a normalized axis + /// @param z z component of the z-axis, x, y, z must be a normalized axis + /// + /// @see gtc_quaternion + template + detail::tquat angleAxis( + valType const & angle, + valType const & x, + valType const & y, + valType const & z); + + /// Build a quaternion from an angle and a normalized axis. + /// + /// @param angle Angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise. + /// @param axis Axis of the quaternion, must be normalized. + /// + /// @see gtc_quaternion + template + detail::tquat angleAxis( + valType const & angle, + detail::tvec3 const & axis); + + /// Quaternion of floating-point numbers. + /// + /// @see gtc_quaternion + typedef detail::tquat quat; + + /// Quaternion of half-precision floating-point numbers. + /// + /// @see gtc_quaternion + typedef detail::tquat hquat; + + /// Quaternion of single-precision floating-point numbers. + /// + /// @see gtc_quaternion + typedef detail::tquat fquat; + + /// Quaternion of double-precision floating-point numbers. + /// + /// @see gtc_quaternion + typedef detail::tquat dquat; + + /// Quaternion of low precision floating-point numbers. + /// + /// @see gtc_quaternion + typedef detail::tquat lowp_quat; + + /// Quaternion of medium precision floating-point numbers. + /// + /// @see gtc_quaternion + typedef detail::tquat mediump_quat; + + /// Quaternion of high precision floating-point numbers. + /// + /// @see gtc_quaternion + typedef detail::tquat highp_quat; + + /// @} +} //namespace glm + +#include "quaternion.inl" + +#endif//GLM_GTC_quaternion diff --git a/include/gal/opengl/glm/gtc/quaternion.inl b/include/gal/opengl/glm/gtc/quaternion.inl index 0ed5887bba..d1e7602674 100644 --- a/include/gal/opengl/glm/gtc/quaternion.inl +++ b/include/gal/opengl/glm/gtc/quaternion.inl @@ -1,788 +1,788 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_quaternion -/// @file glm/gtc/quaternion.inl -/// @date 2009-05-21 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#include - -namespace glm{ -namespace detail -{ - template - GLM_FUNC_QUALIFIER typename tquat::size_type tquat::length() const - { - return 4; - } - - template - GLM_FUNC_QUALIFIER tquat::tquat() : - x(0), - y(0), - z(0), - w(1) - {} - - template - GLM_FUNC_QUALIFIER tquat::tquat - ( - value_type const & s, - tvec3 const & v - ) : - x(v.x), - y(v.y), - z(v.z), - w(s) - {} - - template - GLM_FUNC_QUALIFIER tquat::tquat - ( - value_type const & w, - value_type const & x, - value_type const & y, - value_type const & z - ) : - x(x), - y(y), - z(z), - w(w) - {} - - ////////////////////////////////////////////////////////////// - // tquat conversions - - //template - //GLM_FUNC_QUALIFIER tquat::tquat - //( - // valType const & pitch, - // valType const & yaw, - // valType const & roll - //) - //{ - // tvec3 eulerAngle(pitch * valType(0.5), yaw * valType(0.5), roll * valType(0.5)); - // tvec3 c = glm::cos(eulerAngle * valType(0.5)); - // tvec3 s = glm::sin(eulerAngle * valType(0.5)); - // - // this->w = c.x * c.y * c.z + s.x * s.y * s.z; - // this->x = s.x * c.y * c.z - c.x * s.y * s.z; - // this->y = c.x * s.y * c.z + s.x * c.y * s.z; - // this->z = c.x * c.y * s.z - s.x * s.y * c.z; - //} - - template - GLM_FUNC_QUALIFIER tquat::tquat - ( - tvec3 const & eulerAngle - ) - { - tvec3 c = glm::cos(eulerAngle * value_type(0.5)); - tvec3 s = glm::sin(eulerAngle * value_type(0.5)); - - this->w = c.x * c.y * c.z + s.x * s.y * s.z; - this->x = s.x * c.y * c.z - c.x * s.y * s.z; - this->y = c.x * s.y * c.z + s.x * c.y * s.z; - this->z = c.x * c.y * s.z - s.x * s.y * c.z; - } - - template - GLM_FUNC_QUALIFIER tquat::tquat - ( - tmat3x3 const & m - ) - { - *this = quat_cast(m); - } - - template - GLM_FUNC_QUALIFIER tquat::tquat - ( - tmat4x4 const & m - ) - { - *this = quat_cast(m); - } - - ////////////////////////////////////////////////////////////// - // tquat accesses - - template - GLM_FUNC_QUALIFIER typename tquat::value_type & tquat::operator [] (int i) - { - return (&x)[i]; - } - - template - GLM_FUNC_QUALIFIER typename tquat::value_type const & tquat::operator [] (int i) const - { - return (&x)[i]; - } - - ////////////////////////////////////////////////////////////// - // tquat operators - - template - GLM_FUNC_QUALIFIER tquat & tquat::operator *= - ( - value_type const & s - ) - { - this->w *= s; - this->x *= s; - this->y *= s; - this->z *= s; - return *this; - } - - template - GLM_FUNC_QUALIFIER tquat & tquat::operator /= - ( - value_type const & s - ) - { - this->w /= s; - this->x /= s; - this->y /= s; - this->z /= s; - return *this; - } - - ////////////////////////////////////////////////////////////// - // tquat external operators - - template - GLM_FUNC_QUALIFIER detail::tquat operator- - ( - detail::tquat const & q - ) - { - return detail::tquat(-q.w, -q.x, -q.y, -q.z); - } - - template - GLM_FUNC_QUALIFIER detail::tquat operator+ - ( - detail::tquat const & q, - detail::tquat const & p - ) - { - return detail::tquat( - q.w + p.w, - q.x + p.x, - q.y + p.y, - q.z + p.z); - } - - template - GLM_FUNC_QUALIFIER detail::tquat operator* - ( - detail::tquat const & q, - detail::tquat const & p - ) - { - return detail::tquat( - q.w * p.w - q.x * p.x - q.y * p.y - q.z * p.z, - q.w * p.x + q.x * p.w + q.y * p.z - q.z * p.y, - q.w * p.y + q.y * p.w + q.z * p.x - q.x * p.z, - q.w * p.z + q.z * p.w + q.x * p.y - q.y * p.x); - } - - // Transformation - template - GLM_FUNC_QUALIFIER detail::tvec3 operator* - ( - detail::tquat const & q, - detail::tvec3 const & v - ) - { - typename detail::tquat::value_type Two(2); - - detail::tvec3 uv, uuv; - detail::tvec3 QuatVector(q.x, q.y, q.z); - uv = glm::cross(QuatVector, v); - uuv = glm::cross(QuatVector, uv); - uv *= (Two * q.w); - uuv *= Two; - - return v + uv + uuv; - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 operator* - ( - detail::tvec3 const & v, - detail::tquat const & q - ) - { - return inverse(q) * v; - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 operator* - ( - detail::tquat const & q, - detail::tvec4 const & v - ) - { - return detail::tvec4(q * detail::tvec3(v), v.w); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 operator* - ( - detail::tvec4 const & v, - detail::tquat const & q - ) - { - return inverse(q) * v; - } - - template - GLM_FUNC_QUALIFIER detail::tquat operator* - ( - detail::tquat const & q, - typename detail::tquat::value_type const & s - ) - { - return detail::tquat( - q.w * s, q.x * s, q.y * s, q.z * s); - } - - template - GLM_FUNC_QUALIFIER detail::tquat operator* - ( - typename detail::tquat::value_type const & s, - detail::tquat const & q - ) - { - return q * s; - } - - template - GLM_FUNC_QUALIFIER detail::tquat operator/ - ( - detail::tquat const & q, - typename detail::tquat::value_type const & s - ) - { - return detail::tquat( - q.w / s, q.x / s, q.y / s, q.z / s); - } - - ////////////////////////////////////// - // Boolean operators - - template - GLM_FUNC_QUALIFIER bool operator== - ( - detail::tquat const & q1, - detail::tquat const & q2 - ) - { - return (q1.x == q2.x) && (q1.y == q2.y) && (q1.z == q2.z) && (q1.w == q2.w); - } - - template - GLM_FUNC_QUALIFIER bool operator!= - ( - detail::tquat const & q1, - detail::tquat const & q2 - ) - { - return (q1.x != q2.x) || (q1.y != q2.y) || (q1.z != q2.z) || (q1.w != q2.w); - } - -}//namespace detail - - //////////////////////////////////////////////////////// - template - GLM_FUNC_QUALIFIER T length - ( - detail::tquat const & q - ) - { - return glm::sqrt(dot(q, q)); - } - - template - GLM_FUNC_QUALIFIER detail::tquat normalize - ( - detail::tquat const & q - ) - { - typename detail::tquat::value_type len = length(q); - if(len <= typename detail::tquat::value_type(0)) // Problem - return detail::tquat(1, 0, 0, 0); - typename detail::tquat::value_type oneOverLen = typename detail::tquat::value_type(1) / len; - return detail::tquat(q.w * oneOverLen, q.x * oneOverLen, q.y * oneOverLen, q.z * oneOverLen); - } - - template - GLM_FUNC_QUALIFIER T dot - ( - detail::tquat const & q1, - detail::tquat const & q2 - ) - { - return q1.x * q2.x + q1.y * q2.y + q1.z * q2.z + q1.w * q2.w; - } - - template - GLM_FUNC_QUALIFIER detail::tquat cross - ( - detail::tquat const & q1, - detail::tquat const & q2 - ) - { - return detail::tquat( - q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z, - q1.w * q2.x + q1.x * q2.w + q1.y * q2.z - q1.z * q2.y, - q1.w * q2.y + q1.y * q2.w + q1.z * q2.x - q1.x * q2.z, - q1.w * q2.z + q1.z * q2.w + q1.x * q2.y - q1.y * q2.x); - } -/* - // (x * sin(1 - a) * angle / sin(angle)) + (y * sin(a) * angle / sin(angle)) - template - GLM_FUNC_QUALIFIER detail::tquat mix - ( - detail::tquat const & x, - detail::tquat const & y, - typename detail::tquat::value_type const & a - ) - { - if(a <= typename detail::tquat::value_type(0)) return x; - if(a >= typename detail::tquat::value_type(1)) return y; - - float fCos = dot(x, y); - detail::tquat y2(y); //BUG!!! tquat y2; - if(fCos < typename detail::tquat::value_type(0)) - { - y2 = -y; - fCos = -fCos; - } - - //if(fCos > 1.0f) // problem - float k0, k1; - if(fCos > typename detail::tquat::value_type(0.9999)) - { - k0 = typename detail::tquat::value_type(1) - a; - k1 = typename detail::tquat::value_type(0) + a; //BUG!!! 1.0f + a; - } - else - { - typename detail::tquat::value_type fSin = sqrt(T(1) - fCos * fCos); - typename detail::tquat::value_type fAngle = atan(fSin, fCos); - typename detail::tquat::value_type fOneOverSin = T(1) / fSin; - k0 = sin((typename detail::tquat::value_type(1) - a) * fAngle) * fOneOverSin; - k1 = sin((typename detail::tquat::value_type(0) + a) * fAngle) * fOneOverSin; - } - - return detail::tquat( - k0 * x.w + k1 * y2.w, - k0 * x.x + k1 * y2.x, - k0 * x.y + k1 * y2.y, - k0 * x.z + k1 * y2.z); - } - - template - GLM_FUNC_QUALIFIER detail::tquat mix2 - ( - detail::tquat const & x, - detail::tquat const & y, - T const & a - ) - { - bool flip = false; - if(a <= T(0)) return x; - if(a >= T(1)) return y; - - T cos_t = dot(x, y); - if(cos_t < T(0)) - { - cos_t = -cos_t; - flip = true; - } - - T alpha(0), beta(0); - - if(T(1) - cos_t < 1e-7) - beta = T(1) - alpha; - else - { - T theta = acos(cos_t); - T sin_t = sin(theta); - beta = sin(theta * (T(1) - alpha)) / sin_t; - alpha = sin(alpha * theta) / sin_t; - } - - if(flip) - alpha = -alpha; - - return normalize(beta * x + alpha * y); - } -*/ - - template - GLM_FUNC_QUALIFIER detail::tquat mix - ( - detail::tquat const & x, - detail::tquat const & y, - T const & a - ) - { - T cosTheta = dot(x, y); - - // Perform a linear interpolation when cosTheta is close to 1 to avoid side effect of sin(angle) becoming a zero denominator - if(cosTheta > T(1) - epsilon()) - { - // Linear interpolation - return detail::tquat( - mix(x.w, y.w, a), - mix(x.x, y.x, a), - mix(x.y, y.y, a), - mix(x.z, y.z, a)); - } - else - { - // Essential Mathematics, page 467 - T angle = acos(cosTheta); - return (sin((T(1) - a) * angle) * x + sin(a * angle) * y) / sin(angle); - } - } - - template - GLM_FUNC_QUALIFIER detail::tquat lerp - ( - detail::tquat const & x, - detail::tquat const & y, - T const & a - ) - { - return x * (T(1) - a) + (y * a); - } - - template - GLM_FUNC_QUALIFIER detail::tquat slerp - ( - detail::tquat const & x, - detail::tquat const & y, - T const & a - ) - { - detail::tquat z = y; - - T cosTheta = dot(x, y); - - // If cosTheta < 0, the interpolation will take the long way around the sphere. - // To fix this, one quat must be negated. - if (cosTheta < T(0)) - { - z = -y; - cosTheta = -cosTheta; - } - - // Perform a linear interpolation when cosTheta is close to 1 to avoid side effect of sin(angle) becoming a zero denominator - if(cosTheta > T(1) - epsilon()) - { - // Linear interpolation - return detail::tquat( - mix(x.w, y.w, a), - mix(x.x, y.x, a), - mix(x.y, y.y, a), - mix(x.z, y.z, a)); - } - else - { - // Essential Mathematics, page 467 - T angle = acos(cosTheta); - return (sin((T(1) - a) * angle) * x + sin(a * angle) * z) / sin(angle); - } - } - - template - GLM_FUNC_QUALIFIER detail::tquat conjugate - ( - detail::tquat const & q - ) - { - return detail::tquat(q.w, -q.x, -q.y, -q.z); - } - - template - GLM_FUNC_QUALIFIER detail::tquat inverse - ( - detail::tquat const & q - ) - { - return conjugate(q) / dot(q, q); - } - - template - GLM_FUNC_QUALIFIER detail::tquat rotate - ( - detail::tquat const & q, - typename detail::tquat::value_type const & angle, - detail::tvec3 const & v - ) - { - detail::tvec3 Tmp = v; - - // Axis of rotation must be normalised - typename detail::tquat::value_type len = glm::length(Tmp); - if(abs(len - T(1)) > T(0.001)) - { - T oneOverLen = T(1) / len; - Tmp.x *= oneOverLen; - Tmp.y *= oneOverLen; - Tmp.z *= oneOverLen; - } - -#ifdef GLM_FORCE_RADIANS - typename detail::tquat::value_type const AngleRad(angle); -#else - typename detail::tquat::value_type const AngleRad = radians(angle); -#endif - typename detail::tquat::value_type const Sin = sin(AngleRad * T(0.5)); - - return q * detail::tquat(cos(AngleRad * T(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin); - //return gtc::quaternion::cross(q, detail::tquat(cos(AngleRad * T(0.5)), Tmp.x * fSin, Tmp.y * fSin, Tmp.z * fSin)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 eulerAngles - ( - detail::tquat const & x - ) - { - return detail::tvec3(pitch(x), yaw(x), roll(x)); - } - - template - GLM_FUNC_QUALIFIER valType roll - ( - detail::tquat const & q - ) - { -#ifdef GLM_FORCE_RADIANS - return valType(atan2(valType(2) * (q.x * q.y + q.w * q.z), q.w * q.w + q.x * q.x - q.y * q.y - q.z * q.z)); -#else - return glm::degrees(atan(valType(2) * (q.x * q.y + q.w * q.z), q.w * q.w + q.x * q.x - q.y * q.y - q.z * q.z)); -#endif - } - - template - GLM_FUNC_QUALIFIER valType pitch - ( - detail::tquat const & q - ) - { -#ifdef GLM_FORCE_RADIANS - return valType(atan2(valType(2) * (q.y * q.z + q.w * q.x), q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z)); -#else - return glm::degrees(atan(valType(2) * (q.y * q.z + q.w * q.x), q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z)); -#endif - } - - template - GLM_FUNC_QUALIFIER valType yaw - ( - detail::tquat const & q - ) - { -#ifdef GLM_FORCE_RADIANS - return asin(valType(-2) * (q.x * q.z - q.w * q.y)); -#else - return glm::degrees(asin(valType(-2) * (q.x * q.z - q.w * q.y))); -#endif - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x3 mat3_cast - ( - detail::tquat const & q - ) - { - detail::tmat3x3 Result(T(1)); - Result[0][0] = 1 - 2 * q.y * q.y - 2 * q.z * q.z; - Result[0][1] = 2 * q.x * q.y + 2 * q.w * q.z; - Result[0][2] = 2 * q.x * q.z - 2 * q.w * q.y; - - Result[1][0] = 2 * q.x * q.y - 2 * q.w * q.z; - Result[1][1] = 1 - 2 * q.x * q.x - 2 * q.z * q.z; - Result[1][2] = 2 * q.y * q.z + 2 * q.w * q.x; - - Result[2][0] = 2 * q.x * q.z + 2 * q.w * q.y; - Result[2][1] = 2 * q.y * q.z - 2 * q.w * q.x; - Result[2][2] = 1 - 2 * q.x * q.x - 2 * q.y * q.y; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 mat4_cast - ( - detail::tquat const & q - ) - { - return detail::tmat4x4(mat3_cast(q)); - } - - template - GLM_FUNC_QUALIFIER detail::tquat quat_cast - ( - detail::tmat3x3 const & m - ) - { - typename detail::tquat::value_type fourXSquaredMinus1 = m[0][0] - m[1][1] - m[2][2]; - typename detail::tquat::value_type fourYSquaredMinus1 = m[1][1] - m[0][0] - m[2][2]; - typename detail::tquat::value_type fourZSquaredMinus1 = m[2][2] - m[0][0] - m[1][1]; - typename detail::tquat::value_type fourWSquaredMinus1 = m[0][0] + m[1][1] + m[2][2]; - - int biggestIndex = 0; - typename detail::tquat::value_type fourBiggestSquaredMinus1 = fourWSquaredMinus1; - if(fourXSquaredMinus1 > fourBiggestSquaredMinus1) - { - fourBiggestSquaredMinus1 = fourXSquaredMinus1; - biggestIndex = 1; - } - if(fourYSquaredMinus1 > fourBiggestSquaredMinus1) - { - fourBiggestSquaredMinus1 = fourYSquaredMinus1; - biggestIndex = 2; - } - if(fourZSquaredMinus1 > fourBiggestSquaredMinus1) - { - fourBiggestSquaredMinus1 = fourZSquaredMinus1; - biggestIndex = 3; - } - - typename detail::tquat::value_type biggestVal = sqrt(fourBiggestSquaredMinus1 + T(1)) * T(0.5); - typename detail::tquat::value_type mult = T(0.25) / biggestVal; - - detail::tquat Result; - switch(biggestIndex) - { - case 0: - Result.w = biggestVal; - Result.x = (m[1][2] - m[2][1]) * mult; - Result.y = (m[2][0] - m[0][2]) * mult; - Result.z = (m[0][1] - m[1][0]) * mult; - break; - case 1: - Result.w = (m[1][2] - m[2][1]) * mult; - Result.x = biggestVal; - Result.y = (m[0][1] + m[1][0]) * mult; - Result.z = (m[2][0] + m[0][2]) * mult; - break; - case 2: - Result.w = (m[2][0] - m[0][2]) * mult; - Result.x = (m[0][1] + m[1][0]) * mult; - Result.y = biggestVal; - Result.z = (m[1][2] + m[2][1]) * mult; - break; - case 3: - Result.w = (m[0][1] - m[1][0]) * mult; - Result.x = (m[2][0] + m[0][2]) * mult; - Result.y = (m[1][2] + m[2][1]) * mult; - Result.z = biggestVal; - break; - - default: // Silence a -Wswitch-default warning in GCC. Should never actually get here. Assert is just for sanity. - assert(false); - break; - } - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tquat quat_cast - ( - detail::tmat4x4 const & m4 - ) - { - return quat_cast(detail::tmat3x3(m4)); - } - - template - GLM_FUNC_QUALIFIER T angle - ( - detail::tquat const & x - ) - { -#ifdef GLM_FORCE_RADIANS - return acos(x.w) * T(2); -#else - return glm::degrees(acos(x.w) * T(2)); -#endif - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 axis - ( - detail::tquat const & x - ) - { - T tmp1 = T(1) - x.w * x.w; - if(tmp1 <= T(0)) - return detail::tvec3(0, 0, 1); - T tmp2 = T(1) / sqrt(tmp1); - return detail::tvec3(x.x * tmp2, x.y * tmp2, x.z * tmp2); - } - - template - GLM_FUNC_QUALIFIER detail::tquat angleAxis - ( - valType const & angle, - valType const & x, - valType const & y, - valType const & z - ) - { - return angleAxis(angle, detail::tvec3(x, y, z)); - } - - template - GLM_FUNC_QUALIFIER detail::tquat angleAxis - ( - valType const & angle, - detail::tvec3 const & v - ) - { - detail::tquat result; - -#ifdef GLM_FORCE_RADIANS - valType a(angle); -#else - valType a(glm::radians(angle)); -#endif - valType s = glm::sin(a * valType(0.5)); - - result.w = glm::cos(a * valType(0.5)); - result.x = v.x * s; - result.y = v.y * s; - result.z = v.z * s; - return result; - } - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_quaternion +/// @file glm/gtc/quaternion.inl +/// @date 2009-05-21 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#include + +namespace glm{ +namespace detail +{ + template + GLM_FUNC_QUALIFIER typename tquat::size_type tquat::length() const + { + return 4; + } + + template + GLM_FUNC_QUALIFIER tquat::tquat() : + x(0), + y(0), + z(0), + w(1) + {} + + template + GLM_FUNC_QUALIFIER tquat::tquat + ( + value_type const & s, + tvec3 const & v + ) : + x(v.x), + y(v.y), + z(v.z), + w(s) + {} + + template + GLM_FUNC_QUALIFIER tquat::tquat + ( + value_type const & w, + value_type const & x, + value_type const & y, + value_type const & z + ) : + x(x), + y(y), + z(z), + w(w) + {} + + ////////////////////////////////////////////////////////////// + // tquat conversions + + //template + //GLM_FUNC_QUALIFIER tquat::tquat + //( + // valType const & pitch, + // valType const & yaw, + // valType const & roll + //) + //{ + // tvec3 eulerAngle(pitch * valType(0.5), yaw * valType(0.5), roll * valType(0.5)); + // tvec3 c = glm::cos(eulerAngle * valType(0.5)); + // tvec3 s = glm::sin(eulerAngle * valType(0.5)); + // + // this->w = c.x * c.y * c.z + s.x * s.y * s.z; + // this->x = s.x * c.y * c.z - c.x * s.y * s.z; + // this->y = c.x * s.y * c.z + s.x * c.y * s.z; + // this->z = c.x * c.y * s.z - s.x * s.y * c.z; + //} + + template + GLM_FUNC_QUALIFIER tquat::tquat + ( + tvec3 const & eulerAngle + ) + { + tvec3 c = glm::cos(eulerAngle * value_type(0.5)); + tvec3 s = glm::sin(eulerAngle * value_type(0.5)); + + this->w = c.x * c.y * c.z + s.x * s.y * s.z; + this->x = s.x * c.y * c.z - c.x * s.y * s.z; + this->y = c.x * s.y * c.z + s.x * c.y * s.z; + this->z = c.x * c.y * s.z - s.x * s.y * c.z; + } + + template + GLM_FUNC_QUALIFIER tquat::tquat + ( + tmat3x3 const & m + ) + { + *this = quat_cast(m); + } + + template + GLM_FUNC_QUALIFIER tquat::tquat + ( + tmat4x4 const & m + ) + { + *this = quat_cast(m); + } + + ////////////////////////////////////////////////////////////// + // tquat accesses + + template + GLM_FUNC_QUALIFIER typename tquat::value_type & tquat::operator [] (int i) + { + return (&x)[i]; + } + + template + GLM_FUNC_QUALIFIER typename tquat::value_type const & tquat::operator [] (int i) const + { + return (&x)[i]; + } + + ////////////////////////////////////////////////////////////// + // tquat operators + + template + GLM_FUNC_QUALIFIER tquat & tquat::operator *= + ( + value_type const & s + ) + { + this->w *= s; + this->x *= s; + this->y *= s; + this->z *= s; + return *this; + } + + template + GLM_FUNC_QUALIFIER tquat & tquat::operator /= + ( + value_type const & s + ) + { + this->w /= s; + this->x /= s; + this->y /= s; + this->z /= s; + return *this; + } + + ////////////////////////////////////////////////////////////// + // tquat external operators + + template + GLM_FUNC_QUALIFIER detail::tquat operator- + ( + detail::tquat const & q + ) + { + return detail::tquat(-q.w, -q.x, -q.y, -q.z); + } + + template + GLM_FUNC_QUALIFIER detail::tquat operator+ + ( + detail::tquat const & q, + detail::tquat const & p + ) + { + return detail::tquat( + q.w + p.w, + q.x + p.x, + q.y + p.y, + q.z + p.z); + } + + template + GLM_FUNC_QUALIFIER detail::tquat operator* + ( + detail::tquat const & q, + detail::tquat const & p + ) + { + return detail::tquat( + q.w * p.w - q.x * p.x - q.y * p.y - q.z * p.z, + q.w * p.x + q.x * p.w + q.y * p.z - q.z * p.y, + q.w * p.y + q.y * p.w + q.z * p.x - q.x * p.z, + q.w * p.z + q.z * p.w + q.x * p.y - q.y * p.x); + } + + // Transformation + template + GLM_FUNC_QUALIFIER detail::tvec3 operator* + ( + detail::tquat const & q, + detail::tvec3 const & v + ) + { + typename detail::tquat::value_type Two(2); + + detail::tvec3 uv, uuv; + detail::tvec3 QuatVector(q.x, q.y, q.z); + uv = glm::cross(QuatVector, v); + uuv = glm::cross(QuatVector, uv); + uv *= (Two * q.w); + uuv *= Two; + + return v + uv + uuv; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 operator* + ( + detail::tvec3 const & v, + detail::tquat const & q + ) + { + return inverse(q) * v; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 operator* + ( + detail::tquat const & q, + detail::tvec4 const & v + ) + { + return detail::tvec4(q * detail::tvec3(v), v.w); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 operator* + ( + detail::tvec4 const & v, + detail::tquat const & q + ) + { + return inverse(q) * v; + } + + template + GLM_FUNC_QUALIFIER detail::tquat operator* + ( + detail::tquat const & q, + typename detail::tquat::value_type const & s + ) + { + return detail::tquat( + q.w * s, q.x * s, q.y * s, q.z * s); + } + + template + GLM_FUNC_QUALIFIER detail::tquat operator* + ( + typename detail::tquat::value_type const & s, + detail::tquat const & q + ) + { + return q * s; + } + + template + GLM_FUNC_QUALIFIER detail::tquat operator/ + ( + detail::tquat const & q, + typename detail::tquat::value_type const & s + ) + { + return detail::tquat( + q.w / s, q.x / s, q.y / s, q.z / s); + } + + ////////////////////////////////////// + // Boolean operators + + template + GLM_FUNC_QUALIFIER bool operator== + ( + detail::tquat const & q1, + detail::tquat const & q2 + ) + { + return (q1.x == q2.x) && (q1.y == q2.y) && (q1.z == q2.z) && (q1.w == q2.w); + } + + template + GLM_FUNC_QUALIFIER bool operator!= + ( + detail::tquat const & q1, + detail::tquat const & q2 + ) + { + return (q1.x != q2.x) || (q1.y != q2.y) || (q1.z != q2.z) || (q1.w != q2.w); + } + +}//namespace detail + + //////////////////////////////////////////////////////// + template + GLM_FUNC_QUALIFIER T length + ( + detail::tquat const & q + ) + { + return glm::sqrt(dot(q, q)); + } + + template + GLM_FUNC_QUALIFIER detail::tquat normalize + ( + detail::tquat const & q + ) + { + typename detail::tquat::value_type len = length(q); + if(len <= typename detail::tquat::value_type(0)) // Problem + return detail::tquat(1, 0, 0, 0); + typename detail::tquat::value_type oneOverLen = typename detail::tquat::value_type(1) / len; + return detail::tquat(q.w * oneOverLen, q.x * oneOverLen, q.y * oneOverLen, q.z * oneOverLen); + } + + template + GLM_FUNC_QUALIFIER T dot + ( + detail::tquat const & q1, + detail::tquat const & q2 + ) + { + return q1.x * q2.x + q1.y * q2.y + q1.z * q2.z + q1.w * q2.w; + } + + template + GLM_FUNC_QUALIFIER detail::tquat cross + ( + detail::tquat const & q1, + detail::tquat const & q2 + ) + { + return detail::tquat( + q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z, + q1.w * q2.x + q1.x * q2.w + q1.y * q2.z - q1.z * q2.y, + q1.w * q2.y + q1.y * q2.w + q1.z * q2.x - q1.x * q2.z, + q1.w * q2.z + q1.z * q2.w + q1.x * q2.y - q1.y * q2.x); + } +/* + // (x * sin(1 - a) * angle / sin(angle)) + (y * sin(a) * angle / sin(angle)) + template + GLM_FUNC_QUALIFIER detail::tquat mix + ( + detail::tquat const & x, + detail::tquat const & y, + typename detail::tquat::value_type const & a + ) + { + if(a <= typename detail::tquat::value_type(0)) return x; + if(a >= typename detail::tquat::value_type(1)) return y; + + float fCos = dot(x, y); + detail::tquat y2(y); //BUG!!! tquat y2; + if(fCos < typename detail::tquat::value_type(0)) + { + y2 = -y; + fCos = -fCos; + } + + //if(fCos > 1.0f) // problem + float k0, k1; + if(fCos > typename detail::tquat::value_type(0.9999)) + { + k0 = typename detail::tquat::value_type(1) - a; + k1 = typename detail::tquat::value_type(0) + a; //BUG!!! 1.0f + a; + } + else + { + typename detail::tquat::value_type fSin = sqrt(T(1) - fCos * fCos); + typename detail::tquat::value_type fAngle = atan(fSin, fCos); + typename detail::tquat::value_type fOneOverSin = T(1) / fSin; + k0 = sin((typename detail::tquat::value_type(1) - a) * fAngle) * fOneOverSin; + k1 = sin((typename detail::tquat::value_type(0) + a) * fAngle) * fOneOverSin; + } + + return detail::tquat( + k0 * x.w + k1 * y2.w, + k0 * x.x + k1 * y2.x, + k0 * x.y + k1 * y2.y, + k0 * x.z + k1 * y2.z); + } + + template + GLM_FUNC_QUALIFIER detail::tquat mix2 + ( + detail::tquat const & x, + detail::tquat const & y, + T const & a + ) + { + bool flip = false; + if(a <= T(0)) return x; + if(a >= T(1)) return y; + + T cos_t = dot(x, y); + if(cos_t < T(0)) + { + cos_t = -cos_t; + flip = true; + } + + T alpha(0), beta(0); + + if(T(1) - cos_t < 1e-7) + beta = T(1) - alpha; + else + { + T theta = acos(cos_t); + T sin_t = sin(theta); + beta = sin(theta * (T(1) - alpha)) / sin_t; + alpha = sin(alpha * theta) / sin_t; + } + + if(flip) + alpha = -alpha; + + return normalize(beta * x + alpha * y); + } +*/ + + template + GLM_FUNC_QUALIFIER detail::tquat mix + ( + detail::tquat const & x, + detail::tquat const & y, + T const & a + ) + { + T cosTheta = dot(x, y); + + // Perform a linear interpolation when cosTheta is close to 1 to avoid side effect of sin(angle) becoming a zero denominator + if(cosTheta > T(1) - epsilon()) + { + // Linear interpolation + return detail::tquat( + mix(x.w, y.w, a), + mix(x.x, y.x, a), + mix(x.y, y.y, a), + mix(x.z, y.z, a)); + } + else + { + // Essential Mathematics, page 467 + T angle = acos(cosTheta); + return (sin((T(1) - a) * angle) * x + sin(a * angle) * y) / sin(angle); + } + } + + template + GLM_FUNC_QUALIFIER detail::tquat lerp + ( + detail::tquat const & x, + detail::tquat const & y, + T const & a + ) + { + return x * (T(1) - a) + (y * a); + } + + template + GLM_FUNC_QUALIFIER detail::tquat slerp + ( + detail::tquat const & x, + detail::tquat const & y, + T const & a + ) + { + detail::tquat z = y; + + T cosTheta = dot(x, y); + + // If cosTheta < 0, the interpolation will take the long way around the sphere. + // To fix this, one quat must be negated. + if (cosTheta < T(0)) + { + z = -y; + cosTheta = -cosTheta; + } + + // Perform a linear interpolation when cosTheta is close to 1 to avoid side effect of sin(angle) becoming a zero denominator + if(cosTheta > T(1) - epsilon()) + { + // Linear interpolation + return detail::tquat( + mix(x.w, y.w, a), + mix(x.x, y.x, a), + mix(x.y, y.y, a), + mix(x.z, y.z, a)); + } + else + { + // Essential Mathematics, page 467 + T angle = acos(cosTheta); + return (sin((T(1) - a) * angle) * x + sin(a * angle) * z) / sin(angle); + } + } + + template + GLM_FUNC_QUALIFIER detail::tquat conjugate + ( + detail::tquat const & q + ) + { + return detail::tquat(q.w, -q.x, -q.y, -q.z); + } + + template + GLM_FUNC_QUALIFIER detail::tquat inverse + ( + detail::tquat const & q + ) + { + return conjugate(q) / dot(q, q); + } + + template + GLM_FUNC_QUALIFIER detail::tquat rotate + ( + detail::tquat const & q, + typename detail::tquat::value_type const & angle, + detail::tvec3 const & v + ) + { + detail::tvec3 Tmp = v; + + // Axis of rotation must be normalised + typename detail::tquat::value_type len = glm::length(Tmp); + if(abs(len - T(1)) > T(0.001)) + { + T oneOverLen = T(1) / len; + Tmp.x *= oneOverLen; + Tmp.y *= oneOverLen; + Tmp.z *= oneOverLen; + } + +#ifdef GLM_FORCE_RADIANS + typename detail::tquat::value_type const AngleRad(angle); +#else + typename detail::tquat::value_type const AngleRad = radians(angle); +#endif + typename detail::tquat::value_type const Sin = sin(AngleRad * T(0.5)); + + return q * detail::tquat(cos(AngleRad * T(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin); + //return gtc::quaternion::cross(q, detail::tquat(cos(AngleRad * T(0.5)), Tmp.x * fSin, Tmp.y * fSin, Tmp.z * fSin)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 eulerAngles + ( + detail::tquat const & x + ) + { + return detail::tvec3(pitch(x), yaw(x), roll(x)); + } + + template + GLM_FUNC_QUALIFIER valType roll + ( + detail::tquat const & q + ) + { +#ifdef GLM_FORCE_RADIANS + return valType(atan2(valType(2) * (q.x * q.y + q.w * q.z), q.w * q.w + q.x * q.x - q.y * q.y - q.z * q.z)); +#else + return glm::degrees(atan(valType(2) * (q.x * q.y + q.w * q.z), q.w * q.w + q.x * q.x - q.y * q.y - q.z * q.z)); +#endif + } + + template + GLM_FUNC_QUALIFIER valType pitch + ( + detail::tquat const & q + ) + { +#ifdef GLM_FORCE_RADIANS + return valType(atan2(valType(2) * (q.y * q.z + q.w * q.x), q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z)); +#else + return glm::degrees(atan(valType(2) * (q.y * q.z + q.w * q.x), q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z)); +#endif + } + + template + GLM_FUNC_QUALIFIER valType yaw + ( + detail::tquat const & q + ) + { +#ifdef GLM_FORCE_RADIANS + return asin(valType(-2) * (q.x * q.z - q.w * q.y)); +#else + return glm::degrees(asin(valType(-2) * (q.x * q.z - q.w * q.y))); +#endif + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 mat3_cast + ( + detail::tquat const & q + ) + { + detail::tmat3x3 Result(T(1)); + Result[0][0] = 1 - 2 * q.y * q.y - 2 * q.z * q.z; + Result[0][1] = 2 * q.x * q.y + 2 * q.w * q.z; + Result[0][2] = 2 * q.x * q.z - 2 * q.w * q.y; + + Result[1][0] = 2 * q.x * q.y - 2 * q.w * q.z; + Result[1][1] = 1 - 2 * q.x * q.x - 2 * q.z * q.z; + Result[1][2] = 2 * q.y * q.z + 2 * q.w * q.x; + + Result[2][0] = 2 * q.x * q.z + 2 * q.w * q.y; + Result[2][1] = 2 * q.y * q.z - 2 * q.w * q.x; + Result[2][2] = 1 - 2 * q.x * q.x - 2 * q.y * q.y; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 mat4_cast + ( + detail::tquat const & q + ) + { + return detail::tmat4x4(mat3_cast(q)); + } + + template + GLM_FUNC_QUALIFIER detail::tquat quat_cast + ( + detail::tmat3x3 const & m + ) + { + typename detail::tquat::value_type fourXSquaredMinus1 = m[0][0] - m[1][1] - m[2][2]; + typename detail::tquat::value_type fourYSquaredMinus1 = m[1][1] - m[0][0] - m[2][2]; + typename detail::tquat::value_type fourZSquaredMinus1 = m[2][2] - m[0][0] - m[1][1]; + typename detail::tquat::value_type fourWSquaredMinus1 = m[0][0] + m[1][1] + m[2][2]; + + int biggestIndex = 0; + typename detail::tquat::value_type fourBiggestSquaredMinus1 = fourWSquaredMinus1; + if(fourXSquaredMinus1 > fourBiggestSquaredMinus1) + { + fourBiggestSquaredMinus1 = fourXSquaredMinus1; + biggestIndex = 1; + } + if(fourYSquaredMinus1 > fourBiggestSquaredMinus1) + { + fourBiggestSquaredMinus1 = fourYSquaredMinus1; + biggestIndex = 2; + } + if(fourZSquaredMinus1 > fourBiggestSquaredMinus1) + { + fourBiggestSquaredMinus1 = fourZSquaredMinus1; + biggestIndex = 3; + } + + typename detail::tquat::value_type biggestVal = sqrt(fourBiggestSquaredMinus1 + T(1)) * T(0.5); + typename detail::tquat::value_type mult = T(0.25) / biggestVal; + + detail::tquat Result; + switch(biggestIndex) + { + case 0: + Result.w = biggestVal; + Result.x = (m[1][2] - m[2][1]) * mult; + Result.y = (m[2][0] - m[0][2]) * mult; + Result.z = (m[0][1] - m[1][0]) * mult; + break; + case 1: + Result.w = (m[1][2] - m[2][1]) * mult; + Result.x = biggestVal; + Result.y = (m[0][1] + m[1][0]) * mult; + Result.z = (m[2][0] + m[0][2]) * mult; + break; + case 2: + Result.w = (m[2][0] - m[0][2]) * mult; + Result.x = (m[0][1] + m[1][0]) * mult; + Result.y = biggestVal; + Result.z = (m[1][2] + m[2][1]) * mult; + break; + case 3: + Result.w = (m[0][1] - m[1][0]) * mult; + Result.x = (m[2][0] + m[0][2]) * mult; + Result.y = (m[1][2] + m[2][1]) * mult; + Result.z = biggestVal; + break; + + default: // Silence a -Wswitch-default warning in GCC. Should never actually get here. Assert is just for sanity. + assert(false); + break; + } + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tquat quat_cast + ( + detail::tmat4x4 const & m4 + ) + { + return quat_cast(detail::tmat3x3(m4)); + } + + template + GLM_FUNC_QUALIFIER T angle + ( + detail::tquat const & x + ) + { +#ifdef GLM_FORCE_RADIANS + return acos(x.w) * T(2); +#else + return glm::degrees(acos(x.w) * T(2)); +#endif + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 axis + ( + detail::tquat const & x + ) + { + T tmp1 = T(1) - x.w * x.w; + if(tmp1 <= T(0)) + return detail::tvec3(0, 0, 1); + T tmp2 = T(1) / sqrt(tmp1); + return detail::tvec3(x.x * tmp2, x.y * tmp2, x.z * tmp2); + } + + template + GLM_FUNC_QUALIFIER detail::tquat angleAxis + ( + valType const & angle, + valType const & x, + valType const & y, + valType const & z + ) + { + return angleAxis(angle, detail::tvec3(x, y, z)); + } + + template + GLM_FUNC_QUALIFIER detail::tquat angleAxis + ( + valType const & angle, + detail::tvec3 const & v + ) + { + detail::tquat result; + +#ifdef GLM_FORCE_RADIANS + valType a(angle); +#else + valType a(glm::radians(angle)); +#endif + valType s = glm::sin(a * valType(0.5)); + + result.w = glm::cos(a * valType(0.5)); + result.x = v.x * s; + result.y = v.y * s; + result.z = v.z * s; + return result; + } + +}//namespace glm diff --git a/include/gal/opengl/glm/gtc/random.hpp b/include/gal/opengl/glm/gtc/random.hpp index 58aa75e1a7..ec03575654 100644 --- a/include/gal/opengl/glm/gtc/random.hpp +++ b/include/gal/opengl/glm/gtc/random.hpp @@ -1,114 +1,114 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_random -/// @file glm/gtc/random.hpp -/// @date 2011-09-18 / 2011-09-18 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtc_half_float (dependence) -/// @see gtx_random (extended) -/// -/// @defgroup gtc_random GLM_GTC_random -/// @ingroup gtc -/// -/// @brief Generate random number from various distribution methods. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTC_random -#define GLM_GTC_random GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtc/half_float.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTC_random extension included") -#endif - -namespace glm -{ - /// @addtogroup gtc_random - /// @{ - - /// Generate random numbers in the interval [Min, Max], according a linear distribution - /// - /// @param Min - /// @param Max - /// @tparam genType Value type. Currently supported: half (not recommanded), float or double scalars and vectors. - /// @see gtc_random - template - genType linearRand( - genType const & Min, - genType const & Max); - - /// Generate random numbers in the interval [Min, Max], according a gaussian distribution - /// - /// @param Mean - /// @param Deviation - /// @see gtc_random - template - genType gaussRand( - genType const & Mean, - genType const & Deviation); - - /// Generate a random 2D vector which coordinates are regulary distributed on a circle of a given radius - /// - /// @param Radius - /// @see gtc_random - template - detail::tvec2 circularRand( - T const & Radius); - - /// Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius - /// - /// @param Radius - /// @see gtc_random - template - detail::tvec3 sphericalRand( - T const & Radius); - - /// Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a given radius - /// - /// @param Radius - /// @see gtc_random - template - detail::tvec2 diskRand( - T const & Radius); - - /// Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of a given radius - /// - /// @param Radius - /// @see gtc_random - template - GLM_FUNC_QUALIFIER detail::tvec3 ballRand( - T const & Radius); - - /// @} -}//namespace glm - -#include "random.inl" - -#endif//GLM_GTC_random +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_random +/// @file glm/gtc/random.hpp +/// @date 2011-09-18 / 2011-09-18 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_half_float (dependence) +/// @see gtx_random (extended) +/// +/// @defgroup gtc_random GLM_GTC_random +/// @ingroup gtc +/// +/// @brief Generate random number from various distribution methods. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_random +#define GLM_GTC_random GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_random extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_random + /// @{ + + /// Generate random numbers in the interval [Min, Max], according a linear distribution + /// + /// @param Min + /// @param Max + /// @tparam genType Value type. Currently supported: half (not recommanded), float or double scalars and vectors. + /// @see gtc_random + template + genType linearRand( + genType const & Min, + genType const & Max); + + /// Generate random numbers in the interval [Min, Max], according a gaussian distribution + /// + /// @param Mean + /// @param Deviation + /// @see gtc_random + template + genType gaussRand( + genType const & Mean, + genType const & Deviation); + + /// Generate a random 2D vector which coordinates are regulary distributed on a circle of a given radius + /// + /// @param Radius + /// @see gtc_random + template + detail::tvec2 circularRand( + T const & Radius); + + /// Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius + /// + /// @param Radius + /// @see gtc_random + template + detail::tvec3 sphericalRand( + T const & Radius); + + /// Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a given radius + /// + /// @param Radius + /// @see gtc_random + template + detail::tvec2 diskRand( + T const & Radius); + + /// Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of a given radius + /// + /// @param Radius + /// @see gtc_random + template + GLM_FUNC_QUALIFIER detail::tvec3 ballRand( + T const & Radius); + + /// @} +}//namespace glm + +#include "random.inl" + +#endif//GLM_GTC_random diff --git a/include/gal/opengl/glm/gtc/random.inl b/include/gal/opengl/glm/gtc/random.inl index 70d7a19540..2bb292e783 100644 --- a/include/gal/opengl/glm/gtc/random.inl +++ b/include/gal/opengl/glm/gtc/random.inl @@ -1,170 +1,170 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_random -/// @file glm/gtc/random.inl -/// @date 2011-09-19 / 2012-04-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#include -#include - -namespace glm{ -namespace detail -{ - struct compute_linearRand - { - template - GLM_FUNC_QUALIFIER T operator() (T const & Min, T const & Max) const; -/* - { - GLM_STATIC_ASSERT(0, "'linearRand' invalid template parameter type. GLM_GTC_random only supports floating-point template types."); - return Min; - } -*/ - }; - - template <> - GLM_FUNC_QUALIFIER half compute_linearRand::operator() (half const & Min, half const & Max) const - { - return half(float(std::rand()) / float(RAND_MAX) * (float(Max) - float(Min)) + float(Min)); - } - - template <> - GLM_FUNC_QUALIFIER float compute_linearRand::operator() (float const & Min, float const & Max) const - { - return float(std::rand()) / float(RAND_MAX) * (Max - Min) + Min; - } - - template <> - GLM_FUNC_QUALIFIER double compute_linearRand::operator() (double const & Min, double const & Max) const - { - return double(std::rand()) / double(RAND_MAX) * (Max - Min) + Min; - } - - template <> - GLM_FUNC_QUALIFIER long double compute_linearRand::operator() (long double const & Min, long double const & Max) const - { - return (long double)(std::rand()) / (long double)(RAND_MAX) * (Max - Min) + Min; - } -}//namespace detail - - template - GLM_FUNC_QUALIFIER genType linearRand - ( - genType const & Min, - genType const & Max - ) - { - return detail::compute_linearRand()(Min, Max); - } - - VECTORIZE_VEC_VEC(linearRand) - - template - GLM_FUNC_QUALIFIER genType gaussRand - ( - genType const & Mean, - genType const & Deviation - ) - { - genType w, x1, x2; - - do - { - x1 = linearRand(genType(-1), genType(1)); - x2 = linearRand(genType(-1), genType(1)); - - w = x1 * x1 + x2 * x2; - } while(w > genType(1)); - - return x2 * Deviation * Deviation * sqrt((genType(-2) * log(w)) / w) + Mean; - } - - VECTORIZE_VEC_VEC(gaussRand) - - template - GLM_FUNC_QUALIFIER detail::tvec2 diskRand - ( - T const & Radius - ) - { - detail::tvec2 Result(T(0)); - T LenRadius(T(0)); - - do - { - Result = linearRand(detail::tvec2(-Radius), detail::tvec2(Radius)); - LenRadius = length(Result); - } - while(LenRadius > Radius); - - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 ballRand - ( - T const & Radius - ) - { - detail::tvec3 Result(T(0)); - T LenRadius(T(0)); - - do - { - Result = linearRand(detail::tvec3(-Radius), detail::tvec3(Radius)); - LenRadius = length(Result); - } - while(LenRadius > Radius); - - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 circularRand - ( - T const & Radius - ) - { - T a = linearRand(T(0), T(6.283185307179586476925286766559f)); - return detail::tvec2(cos(a), sin(a)) * Radius; - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 sphericalRand - ( - T const & Radius - ) - { - T z = linearRand(T(-1), T(1)); - T a = linearRand(T(0), T(6.283185307179586476925286766559f)); - - T r = sqrt(T(1) - z * z); - - T x = r * cos(a); - T y = r * sin(a); - - return detail::tvec3(x, y, z) * Radius; - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_random +/// @file glm/gtc/random.inl +/// @date 2011-09-19 / 2012-04-07 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#include +#include + +namespace glm{ +namespace detail +{ + struct compute_linearRand + { + template + GLM_FUNC_QUALIFIER T operator() (T const & Min, T const & Max) const; +/* + { + GLM_STATIC_ASSERT(0, "'linearRand' invalid template parameter type. GLM_GTC_random only supports floating-point template types."); + return Min; + } +*/ + }; + + template <> + GLM_FUNC_QUALIFIER half compute_linearRand::operator() (half const & Min, half const & Max) const + { + return half(float(std::rand()) / float(RAND_MAX) * (float(Max) - float(Min)) + float(Min)); + } + + template <> + GLM_FUNC_QUALIFIER float compute_linearRand::operator() (float const & Min, float const & Max) const + { + return float(std::rand()) / float(RAND_MAX) * (Max - Min) + Min; + } + + template <> + GLM_FUNC_QUALIFIER double compute_linearRand::operator() (double const & Min, double const & Max) const + { + return double(std::rand()) / double(RAND_MAX) * (Max - Min) + Min; + } + + template <> + GLM_FUNC_QUALIFIER long double compute_linearRand::operator() (long double const & Min, long double const & Max) const + { + return (long double)(std::rand()) / (long double)(RAND_MAX) * (Max - Min) + Min; + } +}//namespace detail + + template + GLM_FUNC_QUALIFIER genType linearRand + ( + genType const & Min, + genType const & Max + ) + { + return detail::compute_linearRand()(Min, Max); + } + + VECTORIZE_VEC_VEC(linearRand) + + template + GLM_FUNC_QUALIFIER genType gaussRand + ( + genType const & Mean, + genType const & Deviation + ) + { + genType w, x1, x2; + + do + { + x1 = linearRand(genType(-1), genType(1)); + x2 = linearRand(genType(-1), genType(1)); + + w = x1 * x1 + x2 * x2; + } while(w > genType(1)); + + return x2 * Deviation * Deviation * sqrt((genType(-2) * log(w)) / w) + Mean; + } + + VECTORIZE_VEC_VEC(gaussRand) + + template + GLM_FUNC_QUALIFIER detail::tvec2 diskRand + ( + T const & Radius + ) + { + detail::tvec2 Result(T(0)); + T LenRadius(T(0)); + + do + { + Result = linearRand(detail::tvec2(-Radius), detail::tvec2(Radius)); + LenRadius = length(Result); + } + while(LenRadius > Radius); + + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 ballRand + ( + T const & Radius + ) + { + detail::tvec3 Result(T(0)); + T LenRadius(T(0)); + + do + { + Result = linearRand(detail::tvec3(-Radius), detail::tvec3(Radius)); + LenRadius = length(Result); + } + while(LenRadius > Radius); + + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 circularRand + ( + T const & Radius + ) + { + T a = linearRand(T(0), T(6.283185307179586476925286766559f)); + return detail::tvec2(cos(a), sin(a)) * Radius; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 sphericalRand + ( + T const & Radius + ) + { + T z = linearRand(T(-1), T(1)); + T a = linearRand(T(0), T(6.283185307179586476925286766559f)); + + T r = sqrt(T(1) - z * z); + + T x = r * cos(a); + T y = r * sin(a); + + return detail::tvec3(x, y, z) * Radius; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtc/reciprocal.hpp b/include/gal/opengl/glm/gtc/reciprocal.hpp index 9e18076bda..8ebb617aee 100644 --- a/include/gal/opengl/glm/gtc/reciprocal.hpp +++ b/include/gal/opengl/glm/gtc/reciprocal.hpp @@ -1,133 +1,133 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_reciprocal -/// @file glm/gtc/reciprocal.hpp -/// @date 2008-10-09 / 2012-01-25 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtc_reciprocal GLM_GTC_reciprocal -/// @ingroup gtc -/// -/// @brief Define secant, cosecant and cotangent functions. -/// -/// need to be included to use these features. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTC_reciprocal -#define GLM_GTC_reciprocal GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTC_reciprocal extension included") -#endif - -namespace glm -{ - /// @addtogroup gtc_reciprocal - /// @{ - - /// Secant function. - /// hypotenuse / adjacent or 1 / cos(x) - /// - /// @see gtc_reciprocal - template - genType sec(genType const & angle); - - /// Cosecant function. - /// hypotenuse / opposite or 1 / sin(x) - /// - /// @see gtc_reciprocal - template - genType csc(genType const & angle); - - /// Cotangent function. - /// adjacent / opposite or 1 / tan(x) - /// - /// @see gtc_reciprocal - template - genType cot(genType const & angle); - - /// Inverse secant function. - /// - /// @see gtc_reciprocal - template - genType asec(genType const & x); - - /// Inverse cosecant function. - /// - /// @see gtc_reciprocal - template - genType acsc(genType const & x); - - /// Inverse cotangent function. - /// - /// @see gtc_reciprocal - template - genType acot(genType const & x); - - /// Secant hyperbolic function. - /// - /// @see gtc_reciprocal - template - genType sech(genType const & angle); - - /// Cosecant hyperbolic function. - /// - /// @see gtc_reciprocal - template - genType csch(genType const & angle); - - /// Cotangent hyperbolic function. - /// - /// @see gtc_reciprocal - template - genType coth(genType const & angle); - - /// Inverse secant hyperbolic function. - /// - /// @see gtc_reciprocal - template - genType asech(genType const & x); - - /// Inverse cosecant hyperbolic function. - /// - /// @see gtc_reciprocal - template - genType acsch(genType const & x); - - /// Inverse cotangent hyperbolic function. - /// - /// @see gtc_reciprocal - template - genType acoth(genType const & x); - - /// @} -}//namespace glm - -#include "reciprocal.inl" - -#endif//GLM_GTC_reciprocal +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_reciprocal +/// @file glm/gtc/reciprocal.hpp +/// @date 2008-10-09 / 2012-01-25 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtc_reciprocal GLM_GTC_reciprocal +/// @ingroup gtc +/// +/// @brief Define secant, cosecant and cotangent functions. +/// +/// need to be included to use these features. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_reciprocal +#define GLM_GTC_reciprocal GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_reciprocal extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_reciprocal + /// @{ + + /// Secant function. + /// hypotenuse / adjacent or 1 / cos(x) + /// + /// @see gtc_reciprocal + template + genType sec(genType const & angle); + + /// Cosecant function. + /// hypotenuse / opposite or 1 / sin(x) + /// + /// @see gtc_reciprocal + template + genType csc(genType const & angle); + + /// Cotangent function. + /// adjacent / opposite or 1 / tan(x) + /// + /// @see gtc_reciprocal + template + genType cot(genType const & angle); + + /// Inverse secant function. + /// + /// @see gtc_reciprocal + template + genType asec(genType const & x); + + /// Inverse cosecant function. + /// + /// @see gtc_reciprocal + template + genType acsc(genType const & x); + + /// Inverse cotangent function. + /// + /// @see gtc_reciprocal + template + genType acot(genType const & x); + + /// Secant hyperbolic function. + /// + /// @see gtc_reciprocal + template + genType sech(genType const & angle); + + /// Cosecant hyperbolic function. + /// + /// @see gtc_reciprocal + template + genType csch(genType const & angle); + + /// Cotangent hyperbolic function. + /// + /// @see gtc_reciprocal + template + genType coth(genType const & angle); + + /// Inverse secant hyperbolic function. + /// + /// @see gtc_reciprocal + template + genType asech(genType const & x); + + /// Inverse cosecant hyperbolic function. + /// + /// @see gtc_reciprocal + template + genType acsch(genType const & x); + + /// Inverse cotangent hyperbolic function. + /// + /// @see gtc_reciprocal + template + genType acoth(genType const & x); + + /// @} +}//namespace glm + +#include "reciprocal.inl" + +#endif//GLM_GTC_reciprocal diff --git a/include/gal/opengl/glm/gtc/reciprocal.inl b/include/gal/opengl/glm/gtc/reciprocal.inl index 146d49029e..0543c72964 100644 --- a/include/gal/opengl/glm/gtc/reciprocal.inl +++ b/include/gal/opengl/glm/gtc/reciprocal.inl @@ -1,199 +1,199 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_reciprocal -/// @file glm/gtc/reciprocal.inl -/// @date 2008-10-09 / 2012-04-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - // sec - template - GLM_FUNC_QUALIFIER genType sec - ( - genType const & angle - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'sec' only accept floating-point values"); - - return genType(1) / glm::cos(angle); - } - - VECTORIZE_VEC(sec) - - // csc - template - GLM_FUNC_QUALIFIER genType csc - ( - genType const & angle - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'csc' only accept floating-point values"); - - return genType(1) / glm::sin(angle); - } - - VECTORIZE_VEC(csc) - - // cot - template - GLM_FUNC_QUALIFIER genType cot - ( - genType const & angle - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'cot' only accept floating-point values"); - - return genType(1) / glm::tan(angle); - } - - VECTORIZE_VEC(cot) - - // asec - template - GLM_FUNC_QUALIFIER genType asec - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'asec' only accept floating-point values"); - - return acos(genType(1) / x); - } - - VECTORIZE_VEC(asec) - - // acsc - template - GLM_FUNC_QUALIFIER genType acsc - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'acsc' only accept floating-point values"); - - return asin(genType(1) / x); - } - - VECTORIZE_VEC(acsc) - - // acot - template - GLM_FUNC_QUALIFIER genType acot - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'acot' only accept floating-point values"); - - genType const pi_over_2 = genType(3.1415926535897932384626433832795 / 2.0); - return pi_over_2 - atan(x); - } - - VECTORIZE_VEC(acot) - - // sech - template - GLM_FUNC_QUALIFIER genType sech - ( - genType const & angle - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'sech' only accept floating-point values"); - - return genType(1) / glm::cosh(angle); - } - - VECTORIZE_VEC(sech) - - // csch - template - GLM_FUNC_QUALIFIER genType csch - ( - genType const & angle - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'csch' only accept floating-point values"); - - return genType(1) / glm::sinh(angle); - } - - VECTORIZE_VEC(csch) - - // coth - template - GLM_FUNC_QUALIFIER genType coth - ( - genType const & angle - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'coth' only accept floating-point values"); - - return glm::cosh(angle) / glm::sinh(angle); - } - - VECTORIZE_VEC(coth) - - // asech - template - GLM_FUNC_QUALIFIER genType asech - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'asech' only accept floating-point values"); - - return acosh(genType(1) / x); - } - - VECTORIZE_VEC(asech) - - // acsch - template - GLM_FUNC_QUALIFIER genType acsch - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'acsch' only accept floating-point values"); - - return asinh(genType(1) / x); - } - - VECTORIZE_VEC(acsch) - - // acoth - template - GLM_FUNC_QUALIFIER genType acoth - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'acoth' only accept floating-point values"); - - return atanh(genType(1) / x); - } - - VECTORIZE_VEC(acoth) -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_reciprocal +/// @file glm/gtc/reciprocal.inl +/// @date 2008-10-09 / 2012-04-07 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + // sec + template + GLM_FUNC_QUALIFIER genType sec + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'sec' only accept floating-point values"); + + return genType(1) / glm::cos(angle); + } + + VECTORIZE_VEC(sec) + + // csc + template + GLM_FUNC_QUALIFIER genType csc + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'csc' only accept floating-point values"); + + return genType(1) / glm::sin(angle); + } + + VECTORIZE_VEC(csc) + + // cot + template + GLM_FUNC_QUALIFIER genType cot + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'cot' only accept floating-point values"); + + return genType(1) / glm::tan(angle); + } + + VECTORIZE_VEC(cot) + + // asec + template + GLM_FUNC_QUALIFIER genType asec + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'asec' only accept floating-point values"); + + return acos(genType(1) / x); + } + + VECTORIZE_VEC(asec) + + // acsc + template + GLM_FUNC_QUALIFIER genType acsc + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'acsc' only accept floating-point values"); + + return asin(genType(1) / x); + } + + VECTORIZE_VEC(acsc) + + // acot + template + GLM_FUNC_QUALIFIER genType acot + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'acot' only accept floating-point values"); + + genType const pi_over_2 = genType(3.1415926535897932384626433832795 / 2.0); + return pi_over_2 - atan(x); + } + + VECTORIZE_VEC(acot) + + // sech + template + GLM_FUNC_QUALIFIER genType sech + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'sech' only accept floating-point values"); + + return genType(1) / glm::cosh(angle); + } + + VECTORIZE_VEC(sech) + + // csch + template + GLM_FUNC_QUALIFIER genType csch + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'csch' only accept floating-point values"); + + return genType(1) / glm::sinh(angle); + } + + VECTORIZE_VEC(csch) + + // coth + template + GLM_FUNC_QUALIFIER genType coth + ( + genType const & angle + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'coth' only accept floating-point values"); + + return glm::cosh(angle) / glm::sinh(angle); + } + + VECTORIZE_VEC(coth) + + // asech + template + GLM_FUNC_QUALIFIER genType asech + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'asech' only accept floating-point values"); + + return acosh(genType(1) / x); + } + + VECTORIZE_VEC(asech) + + // acsch + template + GLM_FUNC_QUALIFIER genType acsch + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'acsch' only accept floating-point values"); + + return asinh(genType(1) / x); + } + + VECTORIZE_VEC(acsch) + + // acoth + template + GLM_FUNC_QUALIFIER genType acoth + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'acoth' only accept floating-point values"); + + return atanh(genType(1) / x); + } + + VECTORIZE_VEC(acoth) +}//namespace glm diff --git a/include/gal/opengl/glm/gtc/swizzle.hpp b/include/gal/opengl/glm/gtc/swizzle.hpp index aa77729c72..455ab7bc4e 100644 --- a/include/gal/opengl/glm/gtc/swizzle.hpp +++ b/include/gal/opengl/glm/gtc/swizzle.hpp @@ -1,375 +1,375 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_swizzle -/// @file glm/gtc/swizzle.hpp -/// @date 2010-02-20 / 2011-06-05 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtc_swizzle GLM_GTC_swizzle -/// @ingroup gtc -/// -/// @brief Provide functions to emulate GLSL swizzle operator fonctionalities. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTC_swizzle -#define GLM_GTC_swizzle GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtc/type_precision.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTC_swizzle extension included") -#endif - -namespace glm -{ - /// @addtogroup gtc_swizzle - /// @{ - - template class vecType> - T const & swizzle( - vecType const & v, - comp x); - - template class vecType> - detail::tvec2 const & swizzle( - vecType const & v, - comp x, comp y); - - template class vecType> - detail::tvec3 const & swizzle( - vecType const & v, - comp x, comp y, comp z); - - template class vecType> - detail::tvec4 const & swizzle( - vecType const & v, - comp x, comp y, comp z, comp w); - - template class vecType> - T & swizzle( - vecType & v, - comp x); - - template class vecType> - detail::tref2 swizzle( - vecType & v, - comp x, comp y); - - template class vecType> - detail::tref3 swizzle( - vecType & v, - comp x, comp y, comp z); - - template class vecType> - detail::tref4 swizzle( - vecType & v, - comp x, comp y, comp z, comp w); - -# define static_swizzle1_const(TYPE, SIZE) \ - template \ - GLM_FUNC_QUALIFIER TYPE swizzle(detail::tvec##SIZE const & v) \ - {return v[x];} - -# define static_swizzle1_ref(TYPE, SIZE) \ - template \ - GLM_FUNC_QUALIFIER TYPE& swizzle(detail::tvec##SIZE & v) \ - {return v[x];} - - static_swizzle1_ref(detail::float16, 2) - static_swizzle1_ref(detail::float16, 3) - static_swizzle1_ref(detail::float16, 4) - static_swizzle1_ref(detail::float32, 2) - static_swizzle1_ref(detail::float32, 3) - static_swizzle1_ref(detail::float32, 4) - static_swizzle1_ref(detail::float64, 2) - static_swizzle1_ref(detail::float64, 3) - static_swizzle1_ref(detail::float64, 4) - - static_swizzle1_ref(detail::int8, 2) - static_swizzle1_ref(detail::int8, 3) - static_swizzle1_ref(detail::int8, 4) - static_swizzle1_ref(detail::int16, 2) - static_swizzle1_ref(detail::int16, 3) - static_swizzle1_ref(detail::int16, 4) - static_swizzle1_ref(detail::int32, 2) - static_swizzle1_ref(detail::int32, 3) - static_swizzle1_ref(detail::int32, 4) - static_swizzle1_ref(detail::int64, 2) - static_swizzle1_ref(detail::int64, 3) - static_swizzle1_ref(detail::int64, 4) - - static_swizzle1_ref(detail::uint8, 2) - static_swizzle1_ref(detail::uint8, 3) - static_swizzle1_ref(detail::uint8, 4) - static_swizzle1_ref(detail::uint16, 2) - static_swizzle1_ref(detail::uint16, 3) - static_swizzle1_ref(detail::uint16, 4) - static_swizzle1_ref(detail::uint32, 2) - static_swizzle1_ref(detail::uint32, 3) - static_swizzle1_ref(detail::uint32, 4) - static_swizzle1_ref(detail::uint64, 2) - static_swizzle1_ref(detail::uint64, 3) - static_swizzle1_ref(detail::uint64, 4) -/* -# define static_swizzle2_const(TYPE) \ - template \ - GLM_FUNC_QUALIFIER TYPE swizzle(TYPE const & v) \ - {return TYPE(v[x], v[y]);} - -# define static_swizzle3_const(TYPE) \ - template \ - GLM_FUNC_QUALIFIER TYPE swizzle(TYPE const & v) \ - {return TYPE(v[x], v[y], v[z]);} - -# define static_swizzle4_const(TYPE) \ - template \ - GLM_FUNC_QUALIFIER TYPE swizzle(TYPE const & v) \ - {return TYPE(v[x], v[y], v[z], v[w]);} -*/ - -# define static_swizzle2_const(TYPE, SIZE) \ - template \ - GLM_FUNC_QUALIFIER detail::tvec2 swizzle(detail::tvec##SIZE const & v) \ - {return detail::tvec2(v[x], v[y]);} - -# define static_swizzle3_const(TYPE, SIZE) \ - template \ - GLM_FUNC_QUALIFIER detail::tvec3 swizzle(detail::tvec##SIZE const & v) \ - {return detail::tvec3(v[x], v[y], v[z]);} - -# define static_swizzle4_const(TYPE, SIZE) \ - template \ - GLM_FUNC_QUALIFIER detail::tvec4 swizzle(detail::tvec##SIZE const & v) \ - {return detail::tvec4(v[x], v[y], v[z], v[w]);} - - - static_swizzle2_const(glm::f16, 2) - static_swizzle2_const(glm::f16, 3) - static_swizzle2_const(glm::f16, 4) - static_swizzle2_const(glm::f32, 2) - static_swizzle2_const(glm::f32, 3) - static_swizzle2_const(glm::f32, 4) - static_swizzle2_const(glm::f64, 2) - static_swizzle2_const(glm::f64, 3) - static_swizzle2_const(glm::f64, 4) - - static_swizzle2_const(glm::i8, 2) - static_swizzle2_const(glm::i8, 3) - static_swizzle2_const(glm::i8, 4) - static_swizzle2_const(glm::i16, 2) - static_swizzle2_const(glm::i16, 3) - static_swizzle2_const(glm::i16, 4) - static_swizzle2_const(glm::i32, 2) - static_swizzle2_const(glm::i32, 3) - static_swizzle2_const(glm::i32, 4) - static_swizzle2_const(glm::i64, 2) - static_swizzle2_const(glm::i64, 3) - static_swizzle2_const(glm::i64, 4) - - static_swizzle2_const(glm::u8, 2) - static_swizzle2_const(glm::u8, 3) - static_swizzle2_const(glm::u8, 4) - static_swizzle2_const(glm::u16, 2) - static_swizzle2_const(glm::u16, 3) - static_swizzle2_const(glm::u16, 4) - static_swizzle2_const(glm::u32, 2) - static_swizzle2_const(glm::u32, 3) - static_swizzle2_const(glm::u32, 4) - static_swizzle2_const(glm::u64, 2) - static_swizzle2_const(glm::u64, 3) - static_swizzle2_const(glm::u64, 4) - - static_swizzle3_const(glm::f16, 2) - static_swizzle3_const(glm::f16, 3) - static_swizzle3_const(glm::f16, 4) - static_swizzle3_const(glm::f32, 2) - static_swizzle3_const(glm::f32, 3) - static_swizzle3_const(glm::f32, 4) - static_swizzle3_const(glm::f64, 2) - static_swizzle3_const(glm::f64, 3) - static_swizzle3_const(glm::f64, 4) - - static_swizzle3_const(glm::i8, 2) - static_swizzle3_const(glm::i8, 3) - static_swizzle3_const(glm::i8, 4) - static_swizzle3_const(glm::i16, 2) - static_swizzle3_const(glm::i16, 3) - static_swizzle3_const(glm::i16, 4) - static_swizzle3_const(glm::i32, 2) - static_swizzle3_const(glm::i32, 3) - static_swizzle3_const(glm::i32, 4) - static_swizzle3_const(glm::i64, 2) - static_swizzle3_const(glm::i64, 3) - static_swizzle3_const(glm::i64, 4) - - static_swizzle3_const(glm::u8, 2) - static_swizzle3_const(glm::u8, 3) - static_swizzle3_const(glm::u8, 4) - static_swizzle3_const(glm::u16, 2) - static_swizzle3_const(glm::u16, 3) - static_swizzle3_const(glm::u16, 4) - static_swizzle3_const(glm::u32, 2) - static_swizzle3_const(glm::u32, 3) - static_swizzle3_const(glm::u32, 4) - static_swizzle3_const(glm::u64, 2) - static_swizzle3_const(glm::u64, 3) - static_swizzle3_const(glm::u64, 4) - - static_swizzle4_const(glm::f16, 2) - static_swizzle4_const(glm::f16, 3) - static_swizzle4_const(glm::f16, 4) - static_swizzle4_const(glm::f32, 2) - static_swizzle4_const(glm::f32, 3) - static_swizzle4_const(glm::f32, 4) - static_swizzle4_const(glm::f64, 2) - static_swizzle4_const(glm::f64, 3) - static_swizzle4_const(glm::f64, 4) - - static_swizzle4_const(glm::i8, 2) - static_swizzle4_const(glm::i8, 3) - static_swizzle4_const(glm::i8, 4) - static_swizzle4_const(glm::i16, 2) - static_swizzle4_const(glm::i16, 3) - static_swizzle4_const(glm::i16, 4) - static_swizzle4_const(glm::i32, 2) - static_swizzle4_const(glm::i32, 3) - static_swizzle4_const(glm::i32, 4) - static_swizzle4_const(glm::i64, 2) - static_swizzle4_const(glm::i64, 3) - static_swizzle4_const(glm::i64, 4) - - static_swizzle4_const(glm::u8, 2) - static_swizzle4_const(glm::u8, 3) - static_swizzle4_const(glm::u8, 4) - static_swizzle4_const(glm::u16, 2) - static_swizzle4_const(glm::u16, 3) - static_swizzle4_const(glm::u16, 4) - static_swizzle4_const(glm::u32, 2) - static_swizzle4_const(glm::u32, 3) - static_swizzle4_const(glm::u32, 4) - static_swizzle4_const(glm::u64, 2) - static_swizzle4_const(glm::u64, 3) - static_swizzle4_const(glm::u64, 4) - -# define static_swizzle2_ref(TYPE, SIZE) \ - template \ - GLM_FUNC_QUALIFIER glm::detail::tref2 swizzle(detail::tvec##SIZE & v) \ - {return glm::detail::tref2(v[x], v[y]);} - -# define static_swizzle3_ref(TYPE, SIZE) \ - template \ - GLM_FUNC_QUALIFIER glm::detail::tref3 swizzle(detail::tvec##SIZE & v) \ - {return glm::detail::tref3(v[x], v[y], v[z]);} - -# define static_swizzle4_ref(TYPE, SIZE) \ - template \ - GLM_FUNC_QUALIFIER glm::detail::tref4 swizzle(detail::tvec##SIZE & v) \ - {return glm::detail::tref4(v[x], v[y], v[z], v[w]);} - - static_swizzle2_ref(glm::f16, 2) - static_swizzle2_ref(glm::f16, 3) - static_swizzle2_ref(glm::f16, 4) - static_swizzle2_ref(glm::f32, 2) - static_swizzle2_ref(glm::f32, 3) - static_swizzle2_ref(glm::f32, 4) - static_swizzle2_ref(glm::f64, 2) - static_swizzle2_ref(glm::f64, 3) - static_swizzle2_ref(glm::f64, 4) - - static_swizzle2_ref(glm::i8, 2) - static_swizzle2_ref(glm::i8, 3) - static_swizzle2_ref(glm::i8, 4) - static_swizzle2_ref(glm::i16, 2) - static_swizzle2_ref(glm::i16, 3) - static_swizzle2_ref(glm::i16, 4) - static_swizzle2_ref(glm::i32, 2) - static_swizzle2_ref(glm::i32, 3) - static_swizzle2_ref(glm::i32, 4) - static_swizzle2_ref(glm::i64, 2) - static_swizzle2_ref(glm::i64, 3) - static_swizzle2_ref(glm::i64, 4) - - static_swizzle2_ref(glm::u8, 2) - static_swizzle2_ref(glm::u8, 3) - static_swizzle2_ref(glm::u8, 4) - static_swizzle2_ref(glm::u16, 2) - static_swizzle2_ref(glm::u16, 3) - static_swizzle2_ref(glm::u16, 4) - static_swizzle2_ref(glm::u32, 2) - static_swizzle2_ref(glm::u32, 3) - static_swizzle2_ref(glm::u32, 4) - static_swizzle2_ref(glm::u64, 2) - static_swizzle2_ref(glm::u64, 3) - static_swizzle2_ref(glm::u64, 4) - - static_swizzle3_ref(glm::f16, 3) - static_swizzle3_ref(glm::f16, 4) - static_swizzle3_ref(glm::f32, 3) - static_swizzle3_ref(glm::f32, 4) - static_swizzle3_ref(glm::f64, 3) - static_swizzle3_ref(glm::f64, 4) - - static_swizzle3_ref(glm::i8, 3) - static_swizzle3_ref(glm::i8, 4) - static_swizzle3_ref(glm::i16, 3) - static_swizzle3_ref(glm::i16, 4) - static_swizzle3_ref(glm::i32, 3) - static_swizzle3_ref(glm::i32, 4) - static_swizzle3_ref(glm::i64, 3) - static_swizzle3_ref(glm::i64, 4) - - static_swizzle3_ref(glm::u8, 3) - static_swizzle3_ref(glm::u8, 4) - static_swizzle3_ref(glm::u16, 3) - static_swizzle3_ref(glm::u16, 4) - static_swizzle3_ref(glm::u32, 3) - static_swizzle3_ref(glm::u32, 4) - static_swizzle3_ref(glm::u64, 3) - static_swizzle3_ref(glm::u64, 4) - - static_swizzle4_ref(glm::f16, 4) - static_swizzle4_ref(glm::f32, 4) - static_swizzle4_ref(glm::f64, 4) - - static_swizzle4_ref(glm::i8, 4) - static_swizzle4_ref(glm::i16, 4) - static_swizzle4_ref(glm::i32, 4) - static_swizzle4_ref(glm::i64, 4) - - static_swizzle4_ref(glm::u8, 4) - static_swizzle4_ref(glm::u16, 4) - static_swizzle4_ref(glm::u32, 4) - static_swizzle4_ref(glm::u64, 4) - - /// @} -}//namespace glm - -#include "swizzle.inl" - -#endif//GLM_GTC_swizzle +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_swizzle +/// @file glm/gtc/swizzle.hpp +/// @date 2010-02-20 / 2011-06-05 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtc_swizzle GLM_GTC_swizzle +/// @ingroup gtc +/// +/// @brief Provide functions to emulate GLSL swizzle operator fonctionalities. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_swizzle +#define GLM_GTC_swizzle GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/type_precision.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_swizzle extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_swizzle + /// @{ + + template class vecType> + T const & swizzle( + vecType const & v, + comp x); + + template class vecType> + detail::tvec2 const & swizzle( + vecType const & v, + comp x, comp y); + + template class vecType> + detail::tvec3 const & swizzle( + vecType const & v, + comp x, comp y, comp z); + + template class vecType> + detail::tvec4 const & swizzle( + vecType const & v, + comp x, comp y, comp z, comp w); + + template class vecType> + T & swizzle( + vecType & v, + comp x); + + template class vecType> + detail::tref2 swizzle( + vecType & v, + comp x, comp y); + + template class vecType> + detail::tref3 swizzle( + vecType & v, + comp x, comp y, comp z); + + template class vecType> + detail::tref4 swizzle( + vecType & v, + comp x, comp y, comp z, comp w); + +# define static_swizzle1_const(TYPE, SIZE) \ + template \ + GLM_FUNC_QUALIFIER TYPE swizzle(detail::tvec##SIZE const & v) \ + {return v[x];} + +# define static_swizzle1_ref(TYPE, SIZE) \ + template \ + GLM_FUNC_QUALIFIER TYPE& swizzle(detail::tvec##SIZE & v) \ + {return v[x];} + + static_swizzle1_ref(detail::float16, 2) + static_swizzle1_ref(detail::float16, 3) + static_swizzle1_ref(detail::float16, 4) + static_swizzle1_ref(detail::float32, 2) + static_swizzle1_ref(detail::float32, 3) + static_swizzle1_ref(detail::float32, 4) + static_swizzle1_ref(detail::float64, 2) + static_swizzle1_ref(detail::float64, 3) + static_swizzle1_ref(detail::float64, 4) + + static_swizzle1_ref(detail::int8, 2) + static_swizzle1_ref(detail::int8, 3) + static_swizzle1_ref(detail::int8, 4) + static_swizzle1_ref(detail::int16, 2) + static_swizzle1_ref(detail::int16, 3) + static_swizzle1_ref(detail::int16, 4) + static_swizzle1_ref(detail::int32, 2) + static_swizzle1_ref(detail::int32, 3) + static_swizzle1_ref(detail::int32, 4) + static_swizzle1_ref(detail::int64, 2) + static_swizzle1_ref(detail::int64, 3) + static_swizzle1_ref(detail::int64, 4) + + static_swizzle1_ref(detail::uint8, 2) + static_swizzle1_ref(detail::uint8, 3) + static_swizzle1_ref(detail::uint8, 4) + static_swizzle1_ref(detail::uint16, 2) + static_swizzle1_ref(detail::uint16, 3) + static_swizzle1_ref(detail::uint16, 4) + static_swizzle1_ref(detail::uint32, 2) + static_swizzle1_ref(detail::uint32, 3) + static_swizzle1_ref(detail::uint32, 4) + static_swizzle1_ref(detail::uint64, 2) + static_swizzle1_ref(detail::uint64, 3) + static_swizzle1_ref(detail::uint64, 4) +/* +# define static_swizzle2_const(TYPE) \ + template \ + GLM_FUNC_QUALIFIER TYPE swizzle(TYPE const & v) \ + {return TYPE(v[x], v[y]);} + +# define static_swizzle3_const(TYPE) \ + template \ + GLM_FUNC_QUALIFIER TYPE swizzle(TYPE const & v) \ + {return TYPE(v[x], v[y], v[z]);} + +# define static_swizzle4_const(TYPE) \ + template \ + GLM_FUNC_QUALIFIER TYPE swizzle(TYPE const & v) \ + {return TYPE(v[x], v[y], v[z], v[w]);} +*/ + +# define static_swizzle2_const(TYPE, SIZE) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec2 swizzle(detail::tvec##SIZE const & v) \ + {return detail::tvec2(v[x], v[y]);} + +# define static_swizzle3_const(TYPE, SIZE) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec3 swizzle(detail::tvec##SIZE const & v) \ + {return detail::tvec3(v[x], v[y], v[z]);} + +# define static_swizzle4_const(TYPE, SIZE) \ + template \ + GLM_FUNC_QUALIFIER detail::tvec4 swizzle(detail::tvec##SIZE const & v) \ + {return detail::tvec4(v[x], v[y], v[z], v[w]);} + + + static_swizzle2_const(glm::f16, 2) + static_swizzle2_const(glm::f16, 3) + static_swizzle2_const(glm::f16, 4) + static_swizzle2_const(glm::f32, 2) + static_swizzle2_const(glm::f32, 3) + static_swizzle2_const(glm::f32, 4) + static_swizzle2_const(glm::f64, 2) + static_swizzle2_const(glm::f64, 3) + static_swizzle2_const(glm::f64, 4) + + static_swizzle2_const(glm::i8, 2) + static_swizzle2_const(glm::i8, 3) + static_swizzle2_const(glm::i8, 4) + static_swizzle2_const(glm::i16, 2) + static_swizzle2_const(glm::i16, 3) + static_swizzle2_const(glm::i16, 4) + static_swizzle2_const(glm::i32, 2) + static_swizzle2_const(glm::i32, 3) + static_swizzle2_const(glm::i32, 4) + static_swizzle2_const(glm::i64, 2) + static_swizzle2_const(glm::i64, 3) + static_swizzle2_const(glm::i64, 4) + + static_swizzle2_const(glm::u8, 2) + static_swizzle2_const(glm::u8, 3) + static_swizzle2_const(glm::u8, 4) + static_swizzle2_const(glm::u16, 2) + static_swizzle2_const(glm::u16, 3) + static_swizzle2_const(glm::u16, 4) + static_swizzle2_const(glm::u32, 2) + static_swizzle2_const(glm::u32, 3) + static_swizzle2_const(glm::u32, 4) + static_swizzle2_const(glm::u64, 2) + static_swizzle2_const(glm::u64, 3) + static_swizzle2_const(glm::u64, 4) + + static_swizzle3_const(glm::f16, 2) + static_swizzle3_const(glm::f16, 3) + static_swizzle3_const(glm::f16, 4) + static_swizzle3_const(glm::f32, 2) + static_swizzle3_const(glm::f32, 3) + static_swizzle3_const(glm::f32, 4) + static_swizzle3_const(glm::f64, 2) + static_swizzle3_const(glm::f64, 3) + static_swizzle3_const(glm::f64, 4) + + static_swizzle3_const(glm::i8, 2) + static_swizzle3_const(glm::i8, 3) + static_swizzle3_const(glm::i8, 4) + static_swizzle3_const(glm::i16, 2) + static_swizzle3_const(glm::i16, 3) + static_swizzle3_const(glm::i16, 4) + static_swizzle3_const(glm::i32, 2) + static_swizzle3_const(glm::i32, 3) + static_swizzle3_const(glm::i32, 4) + static_swizzle3_const(glm::i64, 2) + static_swizzle3_const(glm::i64, 3) + static_swizzle3_const(glm::i64, 4) + + static_swizzle3_const(glm::u8, 2) + static_swizzle3_const(glm::u8, 3) + static_swizzle3_const(glm::u8, 4) + static_swizzle3_const(glm::u16, 2) + static_swizzle3_const(glm::u16, 3) + static_swizzle3_const(glm::u16, 4) + static_swizzle3_const(glm::u32, 2) + static_swizzle3_const(glm::u32, 3) + static_swizzle3_const(glm::u32, 4) + static_swizzle3_const(glm::u64, 2) + static_swizzle3_const(glm::u64, 3) + static_swizzle3_const(glm::u64, 4) + + static_swizzle4_const(glm::f16, 2) + static_swizzle4_const(glm::f16, 3) + static_swizzle4_const(glm::f16, 4) + static_swizzle4_const(glm::f32, 2) + static_swizzle4_const(glm::f32, 3) + static_swizzle4_const(glm::f32, 4) + static_swizzle4_const(glm::f64, 2) + static_swizzle4_const(glm::f64, 3) + static_swizzle4_const(glm::f64, 4) + + static_swizzle4_const(glm::i8, 2) + static_swizzle4_const(glm::i8, 3) + static_swizzle4_const(glm::i8, 4) + static_swizzle4_const(glm::i16, 2) + static_swizzle4_const(glm::i16, 3) + static_swizzle4_const(glm::i16, 4) + static_swizzle4_const(glm::i32, 2) + static_swizzle4_const(glm::i32, 3) + static_swizzle4_const(glm::i32, 4) + static_swizzle4_const(glm::i64, 2) + static_swizzle4_const(glm::i64, 3) + static_swizzle4_const(glm::i64, 4) + + static_swizzle4_const(glm::u8, 2) + static_swizzle4_const(glm::u8, 3) + static_swizzle4_const(glm::u8, 4) + static_swizzle4_const(glm::u16, 2) + static_swizzle4_const(glm::u16, 3) + static_swizzle4_const(glm::u16, 4) + static_swizzle4_const(glm::u32, 2) + static_swizzle4_const(glm::u32, 3) + static_swizzle4_const(glm::u32, 4) + static_swizzle4_const(glm::u64, 2) + static_swizzle4_const(glm::u64, 3) + static_swizzle4_const(glm::u64, 4) + +# define static_swizzle2_ref(TYPE, SIZE) \ + template \ + GLM_FUNC_QUALIFIER glm::detail::tref2 swizzle(detail::tvec##SIZE & v) \ + {return glm::detail::tref2(v[x], v[y]);} + +# define static_swizzle3_ref(TYPE, SIZE) \ + template \ + GLM_FUNC_QUALIFIER glm::detail::tref3 swizzle(detail::tvec##SIZE & v) \ + {return glm::detail::tref3(v[x], v[y], v[z]);} + +# define static_swizzle4_ref(TYPE, SIZE) \ + template \ + GLM_FUNC_QUALIFIER glm::detail::tref4 swizzle(detail::tvec##SIZE & v) \ + {return glm::detail::tref4(v[x], v[y], v[z], v[w]);} + + static_swizzle2_ref(glm::f16, 2) + static_swizzle2_ref(glm::f16, 3) + static_swizzle2_ref(glm::f16, 4) + static_swizzle2_ref(glm::f32, 2) + static_swizzle2_ref(glm::f32, 3) + static_swizzle2_ref(glm::f32, 4) + static_swizzle2_ref(glm::f64, 2) + static_swizzle2_ref(glm::f64, 3) + static_swizzle2_ref(glm::f64, 4) + + static_swizzle2_ref(glm::i8, 2) + static_swizzle2_ref(glm::i8, 3) + static_swizzle2_ref(glm::i8, 4) + static_swizzle2_ref(glm::i16, 2) + static_swizzle2_ref(glm::i16, 3) + static_swizzle2_ref(glm::i16, 4) + static_swizzle2_ref(glm::i32, 2) + static_swizzle2_ref(glm::i32, 3) + static_swizzle2_ref(glm::i32, 4) + static_swizzle2_ref(glm::i64, 2) + static_swizzle2_ref(glm::i64, 3) + static_swizzle2_ref(glm::i64, 4) + + static_swizzle2_ref(glm::u8, 2) + static_swizzle2_ref(glm::u8, 3) + static_swizzle2_ref(glm::u8, 4) + static_swizzle2_ref(glm::u16, 2) + static_swizzle2_ref(glm::u16, 3) + static_swizzle2_ref(glm::u16, 4) + static_swizzle2_ref(glm::u32, 2) + static_swizzle2_ref(glm::u32, 3) + static_swizzle2_ref(glm::u32, 4) + static_swizzle2_ref(glm::u64, 2) + static_swizzle2_ref(glm::u64, 3) + static_swizzle2_ref(glm::u64, 4) + + static_swizzle3_ref(glm::f16, 3) + static_swizzle3_ref(glm::f16, 4) + static_swizzle3_ref(glm::f32, 3) + static_swizzle3_ref(glm::f32, 4) + static_swizzle3_ref(glm::f64, 3) + static_swizzle3_ref(glm::f64, 4) + + static_swizzle3_ref(glm::i8, 3) + static_swizzle3_ref(glm::i8, 4) + static_swizzle3_ref(glm::i16, 3) + static_swizzle3_ref(glm::i16, 4) + static_swizzle3_ref(glm::i32, 3) + static_swizzle3_ref(glm::i32, 4) + static_swizzle3_ref(glm::i64, 3) + static_swizzle3_ref(glm::i64, 4) + + static_swizzle3_ref(glm::u8, 3) + static_swizzle3_ref(glm::u8, 4) + static_swizzle3_ref(glm::u16, 3) + static_swizzle3_ref(glm::u16, 4) + static_swizzle3_ref(glm::u32, 3) + static_swizzle3_ref(glm::u32, 4) + static_swizzle3_ref(glm::u64, 3) + static_swizzle3_ref(glm::u64, 4) + + static_swizzle4_ref(glm::f16, 4) + static_swizzle4_ref(glm::f32, 4) + static_swizzle4_ref(glm::f64, 4) + + static_swizzle4_ref(glm::i8, 4) + static_swizzle4_ref(glm::i16, 4) + static_swizzle4_ref(glm::i32, 4) + static_swizzle4_ref(glm::i64, 4) + + static_swizzle4_ref(glm::u8, 4) + static_swizzle4_ref(glm::u16, 4) + static_swizzle4_ref(glm::u32, 4) + static_swizzle4_ref(glm::u64, 4) + + /// @} +}//namespace glm + +#include "swizzle.inl" + +#endif//GLM_GTC_swizzle diff --git a/include/gal/opengl/glm/gtc/swizzle.inl b/include/gal/opengl/glm/gtc/swizzle.inl index 856ff50bf5..1efa7d931a 100644 --- a/include/gal/opengl/glm/gtc/swizzle.inl +++ b/include/gal/opengl/glm/gtc/swizzle.inl @@ -1,116 +1,116 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_swizzle -/// @file glm/gtc/swizzle.inl -/// @date 2011-01-15 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template class vecType> - GLM_FUNC_QUALIFIER T swizzle - ( - vecType const & v, - comp x - ) - { - assert(int(x) < int(vecType::value_size)); - return v[x]; - } - - template class vecType> - GLM_FUNC_QUALIFIER detail::tvec2 swizzle - ( - vecType const & v, - comp x, comp y - ) - { - return detail::tvec2( - v[x], - v[y]); - } - - template class vecType> - GLM_FUNC_QUALIFIER detail::tvec3 swizzle - ( - vecType const & v, - comp x, comp y, comp z - ) - { - return detail::tvec3( - v[x], - v[y], - v[z]); - } - - template class vecType> - GLM_FUNC_QUALIFIER detail::tvec4 swizzle - ( - vecType const & v, - comp x, comp y, comp z, comp w - ) - { - return detail::tvec4(v[x], v[y], v[z], v[w]); - } - - template - GLM_FUNC_QUALIFIER T& swizzle - ( - detail::tvec4 & v, - comp x - ) - { - return v[x]; - } - - template - GLM_FUNC_QUALIFIER detail::tref2 swizzle - ( - detail::tvec4 & v, - comp x, comp y - ) - { - return detail::tref2(v[x], v[y]); - } - - template - GLM_FUNC_QUALIFIER detail::tref3 swizzle - ( - detail::tvec4 & v, - comp x, comp y, comp z - ) - { - return detail::tref3(v[x], v[y], v[z]); - } - - template - GLM_FUNC_QUALIFIER detail::tref4 swizzle - ( - detail::tvec4 & v, - comp x, comp y, comp z, comp w - ) - { - return detail::tref4(v[x], v[y], v[z], v[w]); - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_swizzle +/// @file glm/gtc/swizzle.inl +/// @date 2011-01-15 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template class vecType> + GLM_FUNC_QUALIFIER T swizzle + ( + vecType const & v, + comp x + ) + { + assert(int(x) < int(vecType::value_size)); + return v[x]; + } + + template class vecType> + GLM_FUNC_QUALIFIER detail::tvec2 swizzle + ( + vecType const & v, + comp x, comp y + ) + { + return detail::tvec2( + v[x], + v[y]); + } + + template class vecType> + GLM_FUNC_QUALIFIER detail::tvec3 swizzle + ( + vecType const & v, + comp x, comp y, comp z + ) + { + return detail::tvec3( + v[x], + v[y], + v[z]); + } + + template class vecType> + GLM_FUNC_QUALIFIER detail::tvec4 swizzle + ( + vecType const & v, + comp x, comp y, comp z, comp w + ) + { + return detail::tvec4(v[x], v[y], v[z], v[w]); + } + + template + GLM_FUNC_QUALIFIER T& swizzle + ( + detail::tvec4 & v, + comp x + ) + { + return v[x]; + } + + template + GLM_FUNC_QUALIFIER detail::tref2 swizzle + ( + detail::tvec4 & v, + comp x, comp y + ) + { + return detail::tref2(v[x], v[y]); + } + + template + GLM_FUNC_QUALIFIER detail::tref3 swizzle + ( + detail::tvec4 & v, + comp x, comp y, comp z + ) + { + return detail::tref3(v[x], v[y], v[z]); + } + + template + GLM_FUNC_QUALIFIER detail::tref4 swizzle + ( + detail::tvec4 & v, + comp x, comp y, comp z, comp w + ) + { + return detail::tref4(v[x], v[y], v[z], v[w]); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtc/type_precision.hpp b/include/gal/opengl/glm/gtc/type_precision.hpp index 6d7ffe7bb7..270b51a6b4 100644 --- a/include/gal/opengl/glm/gtc/type_precision.hpp +++ b/include/gal/opengl/glm/gtc/type_precision.hpp @@ -1,669 +1,669 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_type_precision -/// @file glm/gtc/type_precision.hpp -/// @date 2009-06-04 / 2011-12-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtc_half_float (dependence) -/// @see gtc_quaternion (dependence) -/// -/// @defgroup gtc_type_precision GLM_GTC_type_precision -/// @ingroup gtc -/// -/// @brief Defines specific C++-based precision types. -/// -/// @ref core_precision defines types based on GLSL's precision qualifiers. This -/// extension defines types based on explicitly-sized C++ data types. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTC_type_precision -#define GLM_GTC_type_precision GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtc/half_float.hpp" -#include "../gtc/quaternion.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTC_type_precision extension included") -#endif - -namespace glm -{ - /////////////////////////// - // Signed int vector types - - /// @addtogroup gtc_type_precision - /// @{ - - /// 8 bit signed integer type. - /// @see gtc_type_precision - typedef detail::int8 int8; - - /// 16 bit signed integer type. - /// @see gtc_type_precision - typedef detail::int16 int16; - - /// 32 bit signed integer type. - /// @see gtc_type_precision - typedef detail::int32 int32; - - /// 64 bit signed integer type. - /// @see gtc_type_precision - typedef detail::int64 int64; - - - /// 8 bit signed integer type. - /// @see gtc_type_precision - typedef detail::int8 int8_t; - - /// 16 bit signed integer type. - /// @see gtc_type_precision - typedef detail::int16 int16_t; - - /// 32 bit signed integer type. - /// @see gtc_type_precision - typedef detail::int32 int32_t; - - /// 64 bit signed integer type. - /// @see gtc_type_precision - typedef detail::int64 int64_t; - - - /// 8 bit signed integer type. - /// @see gtc_type_precision - typedef detail::int8 i8; - - /// 16 bit signed integer type. - /// @see gtc_type_precision - typedef detail::int16 i16; - - /// 32 bit signed integer type. - /// @see gtc_type_precision - typedef detail::int32 i32; - - /// 64 bit signed integer type. - /// @see gtc_type_precision - typedef detail::int64 i64; - - - /// 8 bit signed integer scalar type. - /// @see gtc_type_precision - typedef detail::tvec1 i8vec1; - - /// 8 bit signed integer vector of 2 components type. - /// @see gtc_type_precision - typedef detail::tvec2 i8vec2; - - /// 8 bit signed integer vector of 3 components type. - /// @see gtc_type_precision - typedef detail::tvec3 i8vec3; - - /// 8 bit signed integer vector of 4 components type. - /// @see gtc_type_precision - typedef detail::tvec4 i8vec4; - - - /// 16 bit signed integer scalar type. - /// @see gtc_type_precision - typedef detail::tvec1 i16vec1; - - /// 16 bit signed integer vector of 2 components type. - /// @see gtc_type_precision - typedef detail::tvec2 i16vec2; - - /// 16 bit signed integer vector of 3 components type. - /// @see gtc_type_precision - typedef detail::tvec3 i16vec3; - - /// 16 bit signed integer vector of 4 components type. - /// @see gtc_type_precision - typedef detail::tvec4 i16vec4; - - - /// 32 bit signed integer scalar type. - /// @see gtc_type_precision - typedef detail::tvec1 i32vec1; - - /// 32 bit signed integer vector of 2 components type. - /// @see gtc_type_precision - typedef detail::tvec2 i32vec2; - - /// 32 bit signed integer vector of 3 components type. - /// @see gtc_type_precision - typedef detail::tvec3 i32vec3; - - /// 32 bit signed integer vector of 4 components type. - /// @see gtc_type_precision - typedef detail::tvec4 i32vec4; - - - /// 64 bit signed integer scalar type. - /// @see gtc_type_precision - typedef detail::tvec1 i64vec1; - - /// 64 bit signed integer vector of 2 components type. - /// @see gtc_type_precision - typedef detail::tvec2 i64vec2; - - /// 64 bit signed integer vector of 3 components type. - /// @see gtc_type_precision - typedef detail::tvec3 i64vec3; - - /// 64 bit signed integer vector of 4 components type. - /// @see gtc_type_precision - typedef detail::tvec4 i64vec4; - - - ///////////////////////////// - // Unsigned int vector types - - /// 8 bit unsigned integer type. - /// @see gtc_type_precision - typedef detail::uint8 uint8; - - /// 16 bit unsigned integer type. - /// @see gtc_type_precision - typedef detail::uint16 uint16; - - /// 32 bit unsigned integer type. - /// @see gtc_type_precision - typedef detail::uint32 uint32; - - /// 64 bit unsigned integer type. - /// @see gtc_type_precision - typedef detail::uint64 uint64; - - - /// 8 bit unsigned integer type. - /// @see gtc_type_precision - typedef detail::uint8 uint8_t; - - /// 16 bit unsigned integer type. - /// @see gtc_type_precision - typedef detail::uint16 uint16_t; - - /// 32 bit unsigned integer type. - /// @see gtc_type_precision - typedef detail::uint32 uint32_t; - - /// 64 bit unsigned integer type. - /// @see gtc_type_precision - typedef detail::uint64 uint64_t; - - - /// 8 bit unsigned integer type. - /// @see gtc_type_precision - typedef detail::uint8 u8; - - /// 16 bit unsigned integer type. - /// @see gtc_type_precision - typedef detail::uint16 u16; - - /// 32 bit unsigned integer type. - /// @see gtc_type_precision - typedef detail::uint32 u32; - - /// 64 bit unsigned integer type. - /// @see gtc_type_precision - typedef detail::uint64 u64; - - - /// 8 bit unsigned integer scalar type. - /// @see gtc_type_precision - typedef detail::tvec1 u8vec1; - - /// 8 bit unsigned integer vector of 2 components type. - /// @see gtc_type_precision - typedef detail::tvec2 u8vec2; - - /// 8 bit unsigned integer vector of 3 components type. - /// @see gtc_type_precision - typedef detail::tvec3 u8vec3; - - /// 8 bit unsigned integer vector of 4 components type. - /// @see gtc_type_precision - typedef detail::tvec4 u8vec4; - - - /// 16 bit unsigned integer scalar type. - /// @see gtc_type_precision - typedef detail::tvec1 u16vec1; - - /// 16 bit unsigned integer vector of 2 components type. - /// @see gtc_type_precision - typedef detail::tvec2 u16vec2; - - /// 16 bit unsigned integer vector of 3 components type. - /// @see gtc_type_precision - typedef detail::tvec3 u16vec3; - - /// 16 bit unsigned integer vector of 4 components type. - /// @see gtc_type_precision - typedef detail::tvec4 u16vec4; - - - /// 32 bit unsigned integer scalar type. - /// @see gtc_type_precision - typedef detail::tvec1 u32vec1; - - /// 32 bit unsigned integer vector of 2 components type. - /// @see gtc_type_precision - typedef detail::tvec2 u32vec2; - - /// 32 bit unsigned integer vector of 3 components type. - /// @see gtc_type_precision - typedef detail::tvec3 u32vec3; - - /// 32 bit unsigned integer vector of 4 components type. - /// @see gtc_type_precision - typedef detail::tvec4 u32vec4; - - - /// 64 bit unsigned integer scalar type. - /// @see gtc_type_precision - typedef detail::tvec1 u64vec1; - - /// 64 bit unsigned integer vector of 2 components type. - /// @see gtc_type_precision - typedef detail::tvec2 u64vec2; - - /// 64 bit unsigned integer vector of 3 components type. - /// @see gtc_type_precision - typedef detail::tvec3 u64vec3; - - /// 64 bit unsigned integer vector of 4 components type. - /// @see gtc_type_precision - typedef detail::tvec4 u64vec4; - - - ////////////////////// - // Float vector types - - /// 16 bit half-precision floating-point scalar. - /// @see gtc_type_precision - typedef detail::float16 float16; - - /// 32 bit single-precision floating-point scalar. - /// @see gtc_type_precision - typedef detail::float32 float32; - - /// 64 bit double-precision floating-point scalar. - /// @see gtc_type_precision - typedef detail::float64 float64; - - - /// 16 bit half-precision floating-point scalar. - /// @see gtc_type_precision - typedef detail::float16 float16_t; - - /// 32 bit single-precision floating-point scalar. - /// @see gtc_type_precision - typedef detail::float32 float32_t; - - /// 64 bit double-precision floating-point scalar. - /// @see gtc_type_precision - typedef detail::float64 float64_t; - - - /// 16 bit half-precision floating-point scalar. - /// @see gtc_type_precision - typedef float16 f16; - - /// 32 bit single-precision floating-point scalar. - /// @see gtc_type_precision - typedef float32 f32; - - /// 64 bit double-precision floating-point scalar. - /// @see gtc_type_precision - typedef float64 f64; - - - /// Single-precision floating-point vector of 1 component. - /// @see gtc_type_precision - typedef detail::tvec1 fvec1; - - /// Single-precision floating-point vector of 2 components. - /// @see gtc_type_precision - typedef detail::tvec2 fvec2; - - /// Single-precision floating-point vector of 3 components. - /// @see gtc_type_precision - typedef detail::tvec3 fvec3; - - /// Single-precision floating-point vector of 4 components. - /// @see gtc_type_precision - typedef detail::tvec4 fvec4; - - - /// Half-precision floating-point vector of 1 component. - /// @see gtc_type_precision - typedef detail::tvec1 f16vec1; - - /// Half-precision floating-point vector of 2 components. - /// @see gtc_type_precision - typedef detail::tvec2 f16vec2; - - /// Half-precision floating-point vector of 3 components. - /// @see gtc_type_precision - typedef detail::tvec3 f16vec3; - - /// Half-precision floating-point vector of 4 components. - /// @see gtc_type_precision - typedef detail::tvec4 f16vec4; - - - /// Single-precision floating-point vector of 1 component. - /// @see gtc_type_precision - typedef detail::tvec1 f32vec1; - - /// Single-precision floating-point vector of 2 components. - /// @see gtc_type_precision - typedef detail::tvec2 f32vec2; - - /// Single-precision floating-point vector of 3 components. - /// @see gtc_type_precision - typedef detail::tvec3 f32vec3; - - /// Single-precision floating-point vector of 4 components. - /// @see gtc_type_precision - typedef detail::tvec4 f32vec4; - - - /// Double-precision floating-point vector of 1 component. - /// @see gtc_type_precision - typedef detail::tvec1 f64vec1; - - /// Double-precision floating-point vector of 2 components. - /// @see gtc_type_precision - typedef detail::tvec2 f64vec2; - - /// Double-precision floating-point vector of 3 components. - /// @see gtc_type_precision - typedef detail::tvec3 f64vec3; - - /// Double-precision floating-point vector of 4 components. - /// @see gtc_type_precision - typedef detail::tvec4 f64vec4; - - - ////////////////////// - // Float matrix types - - /// Single-precision floating-point 1x1 matrix. - /// @see gtc_type_precision - //typedef detail::tmat1x1 fmat1; - - /// Single-precision floating-point 2x2 matrix. - /// @see gtc_type_precision - typedef detail::tmat2x2 fmat2; - - /// Single-precision floating-point 3x3 matrix. - /// @see gtc_type_precision - typedef detail::tmat3x3 fmat3; - - /// Single-precision floating-point 4x4 matrix. - /// @see gtc_type_precision - typedef detail::tmat4x4 fmat4; - - - /// Single-precision floating-point 1x1 matrix. - /// @see gtc_type_precision - //typedef f32 fmat1x1; - - /// Single-precision floating-point 2x2 matrix. - /// @see gtc_type_precision - typedef detail::tmat2x2 fmat2x2; - - /// Single-precision floating-point 2x3 matrix. - /// @see gtc_type_precision - typedef detail::tmat2x3 fmat2x3; - - /// Single-precision floating-point 2x4 matrix. - /// @see gtc_type_precision - typedef detail::tmat2x4 fmat2x4; - - /// Single-precision floating-point 3x2 matrix. - /// @see gtc_type_precision - typedef detail::tmat3x2 fmat3x2; - - /// Single-precision floating-point 3x3 matrix. - /// @see gtc_type_precision - typedef detail::tmat3x3 fmat3x3; - - /// Single-precision floating-point 3x4 matrix. - /// @see gtc_type_precision - typedef detail::tmat3x4 fmat3x4; - - /// Single-precision floating-point 4x2 matrix. - /// @see gtc_type_precision - typedef detail::tmat4x2 fmat4x2; - - /// Single-precision floating-point 4x3 matrix. - /// @see gtc_type_precision - typedef detail::tmat4x3 fmat4x3; - - /// Single-precision floating-point 4x4 matrix. - /// @see gtc_type_precision - typedef detail::tmat4x4 fmat4x4; - - - /// Half-precision floating-point 1x1 matrix. - /// @see gtc_type_precision - //typedef detail::tmat1x1 f16mat1; - - /// Half-precision floating-point 2x2 matrix. - /// @see gtc_type_precision - typedef detail::tmat2x2 f16mat2; - - /// Half-precision floating-point 3x3 matrix. - /// @see gtc_type_precision - typedef detail::tmat3x3 f16mat3; - - /// Half-precision floating-point 4x4 matrix. - /// @see gtc_type_precision - typedef detail::tmat4x4 f16mat4; - - - /// Half-precision floating-point 1x1 matrix. - /// @see gtc_type_precision - //typedef f16 f16mat1x1; - - /// Half-precision floating-point 2x2 matrix. - /// @see gtc_type_precision - typedef detail::tmat2x2 f16mat2x2; - - /// Half-precision floating-point 2x3 matrix. - /// @see gtc_type_precision - typedef detail::tmat2x3 f16mat2x3; - - /// Half-precision floating-point 2x4 matrix. - /// @see gtc_type_precision - typedef detail::tmat2x4 f16mat2x4; - - /// Half-precision floating-point 3x2 matrix. - /// @see gtc_type_precision - typedef detail::tmat3x2 f16mat3x2; - - /// Half-precision floating-point 3x3 matrix. - /// @see gtc_type_precision - typedef detail::tmat3x3 f16mat3x3; - - /// Half-precision floating-point 3x4 matrix. - /// @see gtc_type_precision - typedef detail::tmat3x4 f16mat3x4; - - /// Half-precision floating-point 4x2 matrix. - /// @see gtc_type_precision - typedef detail::tmat4x2 f16mat4x2; - - /// Half-precision floating-point 4x3 matrix. - /// @see gtc_type_precision - typedef detail::tmat4x3 f16mat4x3; - - /// Half-precision floating-point 4x4 matrix. - /// @see gtc_type_precision - typedef detail::tmat4x4 f16mat4x4; - - - /// Single-precision floating-point 1x1 matrix. - /// @see gtc_type_precision - //typedef detail::tmat1x1 f32mat1; - - /// Single-precision floating-point 2x2 matrix. - /// @see gtc_type_precision - typedef detail::tmat2x2 f32mat2; - - /// Single-precision floating-point 3x3 matrix. - /// @see gtc_type_precision - typedef detail::tmat3x3 f32mat3; - - /// Single-precision floating-point 4x4 matrix. - /// @see gtc_type_precision - typedef detail::tmat4x4 f32mat4; - - - /// Single-precision floating-point 1x1 matrix. - /// @see gtc_type_precision - //typedef f32 f32mat1x1; - - /// Single-precision floating-point 2x2 matrix. - /// @see gtc_type_precision - typedef detail::tmat2x2 f32mat2x2; - - /// Single-precision floating-point 2x3 matrix. - /// @see gtc_type_precision - typedef detail::tmat2x3 f32mat2x3; - - /// Single-precision floating-point 2x4 matrix. - /// @see gtc_type_precision - typedef detail::tmat2x4 f32mat2x4; - - /// Single-precision floating-point 3x2 matrix. - /// @see gtc_type_precision - typedef detail::tmat3x2 f32mat3x2; - - /// Single-precision floating-point 3x3 matrix. - /// @see gtc_type_precision - typedef detail::tmat3x3 f32mat3x3; - - /// Single-precision floating-point 3x4 matrix. - /// @see gtc_type_precision - typedef detail::tmat3x4 f32mat3x4; - - /// Single-precision floating-point 4x2 matrix. - /// @see gtc_type_precision - typedef detail::tmat4x2 f32mat4x2; - - /// Single-precision floating-point 4x3 matrix. - /// @see gtc_type_precision - typedef detail::tmat4x3 f32mat4x3; - - /// Single-precision floating-point 4x4 matrix. - /// @see gtc_type_precision - typedef detail::tmat4x4 f32mat4x4; - - - /// Double-precision floating-point 1x1 matrix. - /// @see gtc_type_precision - //typedef detail::tmat1x1 f64mat1; - - /// Double-precision floating-point 2x2 matrix. - /// @see gtc_type_precision - typedef detail::tmat2x2 f64mat2; - - /// Double-precision floating-point 3x3 matrix. - /// @see gtc_type_precision - typedef detail::tmat3x3 f64mat3; - - /// Double-precision floating-point 4x4 matrix. - /// @see gtc_type_precision - typedef detail::tmat4x4 f64mat4; - - - /// Double-precision floating-point 1x1 matrix. - /// @see gtc_type_precision - //typedef f64 f64mat1x1; - - /// Double-precision floating-point 2x2 matrix. - /// @see gtc_type_precision - typedef detail::tmat2x2 f64mat2x2; - - /// Double-precision floating-point 2x3 matrix. - /// @see gtc_type_precision - typedef detail::tmat2x3 f64mat2x3; - - /// Double-precision floating-point 2x4 matrix. - /// @see gtc_type_precision - typedef detail::tmat2x4 f64mat2x4; - - /// Double-precision floating-point 3x2 matrix. - /// @see gtc_type_precision - typedef detail::tmat3x2 f64mat3x2; - - /// Double-precision floating-point 3x3 matrix. - /// @see gtc_type_precision - typedef detail::tmat3x3 f64mat3x3; - - /// Double-precision floating-point 3x4 matrix. - /// @see gtc_type_precision - typedef detail::tmat3x4 f64mat3x4; - - /// Double-precision floating-point 4x2 matrix. - /// @see gtc_type_precision - typedef detail::tmat4x2 f64mat4x2; - - /// Double-precision floating-point 4x3 matrix. - /// @see gtc_type_precision - typedef detail::tmat4x3 f64mat4x3; - - /// Double-precision floating-point 4x4 matrix. - /// @see gtc_type_precision - typedef detail::tmat4x4 f64mat4x4; - - - ////////////////////////// - // Quaternion types - - /// Half-precision floating-point quaternion. - /// @see gtc_type_precision - typedef detail::tquat f16quat; - - /// Single-precision floating-point quaternion. - /// @see gtc_type_precision - typedef detail::tquat f32quat; - - /// Double-precision floating-point quaternion. - /// @see gtc_type_precision - typedef detail::tquat f64quat; - - /// @} -}//namespace glm - -#include "type_precision.inl" - -#endif//GLM_GTC_type_precision +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_type_precision +/// @file glm/gtc/type_precision.hpp +/// @date 2009-06-04 / 2011-12-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_half_float (dependence) +/// @see gtc_quaternion (dependence) +/// +/// @defgroup gtc_type_precision GLM_GTC_type_precision +/// @ingroup gtc +/// +/// @brief Defines specific C++-based precision types. +/// +/// @ref core_precision defines types based on GLSL's precision qualifiers. This +/// extension defines types based on explicitly-sized C++ data types. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_type_precision +#define GLM_GTC_type_precision GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" +#include "../gtc/quaternion.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_type_precision extension included") +#endif + +namespace glm +{ + /////////////////////////// + // Signed int vector types + + /// @addtogroup gtc_type_precision + /// @{ + + /// 8 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int8 int8; + + /// 16 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int16 int16; + + /// 32 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int32 int32; + + /// 64 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int64 int64; + + + /// 8 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int8 int8_t; + + /// 16 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int16 int16_t; + + /// 32 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int32 int32_t; + + /// 64 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int64 int64_t; + + + /// 8 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int8 i8; + + /// 16 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int16 i16; + + /// 32 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int32 i32; + + /// 64 bit signed integer type. + /// @see gtc_type_precision + typedef detail::int64 i64; + + + /// 8 bit signed integer scalar type. + /// @see gtc_type_precision + typedef detail::tvec1 i8vec1; + + /// 8 bit signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef detail::tvec2 i8vec2; + + /// 8 bit signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef detail::tvec3 i8vec3; + + /// 8 bit signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef detail::tvec4 i8vec4; + + + /// 16 bit signed integer scalar type. + /// @see gtc_type_precision + typedef detail::tvec1 i16vec1; + + /// 16 bit signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef detail::tvec2 i16vec2; + + /// 16 bit signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef detail::tvec3 i16vec3; + + /// 16 bit signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef detail::tvec4 i16vec4; + + + /// 32 bit signed integer scalar type. + /// @see gtc_type_precision + typedef detail::tvec1 i32vec1; + + /// 32 bit signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef detail::tvec2 i32vec2; + + /// 32 bit signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef detail::tvec3 i32vec3; + + /// 32 bit signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef detail::tvec4 i32vec4; + + + /// 64 bit signed integer scalar type. + /// @see gtc_type_precision + typedef detail::tvec1 i64vec1; + + /// 64 bit signed integer vector of 2 components type. + /// @see gtc_type_precision + typedef detail::tvec2 i64vec2; + + /// 64 bit signed integer vector of 3 components type. + /// @see gtc_type_precision + typedef detail::tvec3 i64vec3; + + /// 64 bit signed integer vector of 4 components type. + /// @see gtc_type_precision + typedef detail::tvec4 i64vec4; + + + ///////////////////////////// + // Unsigned int vector types + + /// 8 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint8 uint8; + + /// 16 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint16 uint16; + + /// 32 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint32 uint32; + + /// 64 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint64 uint64; + + + /// 8 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint8 uint8_t; + + /// 16 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint16 uint16_t; + + /// 32 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint32 uint32_t; + + /// 64 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint64 uint64_t; + + + /// 8 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint8 u8; + + /// 16 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint16 u16; + + /// 32 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint32 u32; + + /// 64 bit unsigned integer type. + /// @see gtc_type_precision + typedef detail::uint64 u64; + + + /// 8 bit unsigned integer scalar type. + /// @see gtc_type_precision + typedef detail::tvec1 u8vec1; + + /// 8 bit unsigned integer vector of 2 components type. + /// @see gtc_type_precision + typedef detail::tvec2 u8vec2; + + /// 8 bit unsigned integer vector of 3 components type. + /// @see gtc_type_precision + typedef detail::tvec3 u8vec3; + + /// 8 bit unsigned integer vector of 4 components type. + /// @see gtc_type_precision + typedef detail::tvec4 u8vec4; + + + /// 16 bit unsigned integer scalar type. + /// @see gtc_type_precision + typedef detail::tvec1 u16vec1; + + /// 16 bit unsigned integer vector of 2 components type. + /// @see gtc_type_precision + typedef detail::tvec2 u16vec2; + + /// 16 bit unsigned integer vector of 3 components type. + /// @see gtc_type_precision + typedef detail::tvec3 u16vec3; + + /// 16 bit unsigned integer vector of 4 components type. + /// @see gtc_type_precision + typedef detail::tvec4 u16vec4; + + + /// 32 bit unsigned integer scalar type. + /// @see gtc_type_precision + typedef detail::tvec1 u32vec1; + + /// 32 bit unsigned integer vector of 2 components type. + /// @see gtc_type_precision + typedef detail::tvec2 u32vec2; + + /// 32 bit unsigned integer vector of 3 components type. + /// @see gtc_type_precision + typedef detail::tvec3 u32vec3; + + /// 32 bit unsigned integer vector of 4 components type. + /// @see gtc_type_precision + typedef detail::tvec4 u32vec4; + + + /// 64 bit unsigned integer scalar type. + /// @see gtc_type_precision + typedef detail::tvec1 u64vec1; + + /// 64 bit unsigned integer vector of 2 components type. + /// @see gtc_type_precision + typedef detail::tvec2 u64vec2; + + /// 64 bit unsigned integer vector of 3 components type. + /// @see gtc_type_precision + typedef detail::tvec3 u64vec3; + + /// 64 bit unsigned integer vector of 4 components type. + /// @see gtc_type_precision + typedef detail::tvec4 u64vec4; + + + ////////////////////// + // Float vector types + + /// 16 bit half-precision floating-point scalar. + /// @see gtc_type_precision + typedef detail::float16 float16; + + /// 32 bit single-precision floating-point scalar. + /// @see gtc_type_precision + typedef detail::float32 float32; + + /// 64 bit double-precision floating-point scalar. + /// @see gtc_type_precision + typedef detail::float64 float64; + + + /// 16 bit half-precision floating-point scalar. + /// @see gtc_type_precision + typedef detail::float16 float16_t; + + /// 32 bit single-precision floating-point scalar. + /// @see gtc_type_precision + typedef detail::float32 float32_t; + + /// 64 bit double-precision floating-point scalar. + /// @see gtc_type_precision + typedef detail::float64 float64_t; + + + /// 16 bit half-precision floating-point scalar. + /// @see gtc_type_precision + typedef float16 f16; + + /// 32 bit single-precision floating-point scalar. + /// @see gtc_type_precision + typedef float32 f32; + + /// 64 bit double-precision floating-point scalar. + /// @see gtc_type_precision + typedef float64 f64; + + + /// Single-precision floating-point vector of 1 component. + /// @see gtc_type_precision + typedef detail::tvec1 fvec1; + + /// Single-precision floating-point vector of 2 components. + /// @see gtc_type_precision + typedef detail::tvec2 fvec2; + + /// Single-precision floating-point vector of 3 components. + /// @see gtc_type_precision + typedef detail::tvec3 fvec3; + + /// Single-precision floating-point vector of 4 components. + /// @see gtc_type_precision + typedef detail::tvec4 fvec4; + + + /// Half-precision floating-point vector of 1 component. + /// @see gtc_type_precision + typedef detail::tvec1 f16vec1; + + /// Half-precision floating-point vector of 2 components. + /// @see gtc_type_precision + typedef detail::tvec2 f16vec2; + + /// Half-precision floating-point vector of 3 components. + /// @see gtc_type_precision + typedef detail::tvec3 f16vec3; + + /// Half-precision floating-point vector of 4 components. + /// @see gtc_type_precision + typedef detail::tvec4 f16vec4; + + + /// Single-precision floating-point vector of 1 component. + /// @see gtc_type_precision + typedef detail::tvec1 f32vec1; + + /// Single-precision floating-point vector of 2 components. + /// @see gtc_type_precision + typedef detail::tvec2 f32vec2; + + /// Single-precision floating-point vector of 3 components. + /// @see gtc_type_precision + typedef detail::tvec3 f32vec3; + + /// Single-precision floating-point vector of 4 components. + /// @see gtc_type_precision + typedef detail::tvec4 f32vec4; + + + /// Double-precision floating-point vector of 1 component. + /// @see gtc_type_precision + typedef detail::tvec1 f64vec1; + + /// Double-precision floating-point vector of 2 components. + /// @see gtc_type_precision + typedef detail::tvec2 f64vec2; + + /// Double-precision floating-point vector of 3 components. + /// @see gtc_type_precision + typedef detail::tvec3 f64vec3; + + /// Double-precision floating-point vector of 4 components. + /// @see gtc_type_precision + typedef detail::tvec4 f64vec4; + + + ////////////////////// + // Float matrix types + + /// Single-precision floating-point 1x1 matrix. + /// @see gtc_type_precision + //typedef detail::tmat1x1 fmat1; + + /// Single-precision floating-point 2x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x2 fmat2; + + /// Single-precision floating-point 3x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x3 fmat3; + + /// Single-precision floating-point 4x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x4 fmat4; + + + /// Single-precision floating-point 1x1 matrix. + /// @see gtc_type_precision + //typedef f32 fmat1x1; + + /// Single-precision floating-point 2x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x2 fmat2x2; + + /// Single-precision floating-point 2x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x3 fmat2x3; + + /// Single-precision floating-point 2x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x4 fmat2x4; + + /// Single-precision floating-point 3x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x2 fmat3x2; + + /// Single-precision floating-point 3x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x3 fmat3x3; + + /// Single-precision floating-point 3x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x4 fmat3x4; + + /// Single-precision floating-point 4x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x2 fmat4x2; + + /// Single-precision floating-point 4x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x3 fmat4x3; + + /// Single-precision floating-point 4x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x4 fmat4x4; + + + /// Half-precision floating-point 1x1 matrix. + /// @see gtc_type_precision + //typedef detail::tmat1x1 f16mat1; + + /// Half-precision floating-point 2x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x2 f16mat2; + + /// Half-precision floating-point 3x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x3 f16mat3; + + /// Half-precision floating-point 4x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x4 f16mat4; + + + /// Half-precision floating-point 1x1 matrix. + /// @see gtc_type_precision + //typedef f16 f16mat1x1; + + /// Half-precision floating-point 2x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x2 f16mat2x2; + + /// Half-precision floating-point 2x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x3 f16mat2x3; + + /// Half-precision floating-point 2x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x4 f16mat2x4; + + /// Half-precision floating-point 3x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x2 f16mat3x2; + + /// Half-precision floating-point 3x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x3 f16mat3x3; + + /// Half-precision floating-point 3x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x4 f16mat3x4; + + /// Half-precision floating-point 4x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x2 f16mat4x2; + + /// Half-precision floating-point 4x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x3 f16mat4x3; + + /// Half-precision floating-point 4x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x4 f16mat4x4; + + + /// Single-precision floating-point 1x1 matrix. + /// @see gtc_type_precision + //typedef detail::tmat1x1 f32mat1; + + /// Single-precision floating-point 2x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x2 f32mat2; + + /// Single-precision floating-point 3x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x3 f32mat3; + + /// Single-precision floating-point 4x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x4 f32mat4; + + + /// Single-precision floating-point 1x1 matrix. + /// @see gtc_type_precision + //typedef f32 f32mat1x1; + + /// Single-precision floating-point 2x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x2 f32mat2x2; + + /// Single-precision floating-point 2x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x3 f32mat2x3; + + /// Single-precision floating-point 2x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x4 f32mat2x4; + + /// Single-precision floating-point 3x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x2 f32mat3x2; + + /// Single-precision floating-point 3x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x3 f32mat3x3; + + /// Single-precision floating-point 3x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x4 f32mat3x4; + + /// Single-precision floating-point 4x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x2 f32mat4x2; + + /// Single-precision floating-point 4x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x3 f32mat4x3; + + /// Single-precision floating-point 4x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x4 f32mat4x4; + + + /// Double-precision floating-point 1x1 matrix. + /// @see gtc_type_precision + //typedef detail::tmat1x1 f64mat1; + + /// Double-precision floating-point 2x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x2 f64mat2; + + /// Double-precision floating-point 3x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x3 f64mat3; + + /// Double-precision floating-point 4x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x4 f64mat4; + + + /// Double-precision floating-point 1x1 matrix. + /// @see gtc_type_precision + //typedef f64 f64mat1x1; + + /// Double-precision floating-point 2x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x2 f64mat2x2; + + /// Double-precision floating-point 2x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x3 f64mat2x3; + + /// Double-precision floating-point 2x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat2x4 f64mat2x4; + + /// Double-precision floating-point 3x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x2 f64mat3x2; + + /// Double-precision floating-point 3x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x3 f64mat3x3; + + /// Double-precision floating-point 3x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat3x4 f64mat3x4; + + /// Double-precision floating-point 4x2 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x2 f64mat4x2; + + /// Double-precision floating-point 4x3 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x3 f64mat4x3; + + /// Double-precision floating-point 4x4 matrix. + /// @see gtc_type_precision + typedef detail::tmat4x4 f64mat4x4; + + + ////////////////////////// + // Quaternion types + + /// Half-precision floating-point quaternion. + /// @see gtc_type_precision + typedef detail::tquat f16quat; + + /// Single-precision floating-point quaternion. + /// @see gtc_type_precision + typedef detail::tquat f32quat; + + /// Double-precision floating-point quaternion. + /// @see gtc_type_precision + typedef detail::tquat f64quat; + + /// @} +}//namespace glm + +#include "type_precision.inl" + +#endif//GLM_GTC_type_precision diff --git a/include/gal/opengl/glm/gtc/type_precision.inl b/include/gal/opengl/glm/gtc/type_precision.inl index 61577ee9e0..ea5b2faacd 100644 --- a/include/gal/opengl/glm/gtc/type_precision.inl +++ b/include/gal/opengl/glm/gtc/type_precision.inl @@ -1,32 +1,32 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_swizzle -/// @file glm/gtc/swizzle.inl -/// @date 2009-06-14 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - -} +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_swizzle +/// @file glm/gtc/swizzle.inl +/// @date 2009-06-14 / 2011-06-15 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + +} diff --git a/include/gal/opengl/glm/gtc/type_ptr.hpp b/include/gal/opengl/glm/gtc/type_ptr.hpp index ca2c0e42e4..2946e9367f 100644 --- a/include/gal/opengl/glm/gtc/type_ptr.hpp +++ b/include/gal/opengl/glm/gtc/type_ptr.hpp @@ -1,169 +1,169 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_type_ptr -/// @file glm/gtc/type_ptr.hpp -/// @date 2009-05-06 / 2011-06-05 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtc_half_float (dependence) -/// @see gtc_quaternion (dependence) -/// -/// @defgroup gtc_type_ptr GLM_GTC_type_ptr -/// @ingroup gtc -/// -/// @brief Handles the interaction between pointers and vector, matrix types. -/// -/// This extension defines an overloaded function, glm::value_ptr, which -/// takes any of the \ref core_template "core template types". It returns -/// a pointer to the memory layout of the object. Matrix types store their values -/// in column-major order. -/// -/// This is useful for uploading data to matrices or copying data to buffer objects. -/// -/// Example: -/// @code -/// #include -/// #include -/// -/// glm::vec3 aVector(3); -/// glm::mat4 someMatrix(1.0); -/// -/// glUniform3fv(uniformLoc, 1, glm::value_ptr(aVector)); -/// glUniformMatrix4fv(uniformMatrixLoc, 1, GL_FALSE, glm::value_ptr(someMatrix)); -/// @endcode -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTC_type_ptr -#define GLM_GTC_type_ptr GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtc/half_float.hpp" -#include "../gtc/quaternion.hpp" -#include - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTC_type_ptr extension included") -#endif - -namespace glm -{ - /// @addtogroup gtc_type_ptr - /// @{ - - /// Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - typename genType::value_type const * value_ptr(genType const & vec); - - /// Build a vector from a pointer. - /// @see gtc_type_ptr - template - detail::tvec2 make_vec2(T const * const ptr); - - /// Build a vector from a pointer. - /// @see gtc_type_ptr - template - detail::tvec3 make_vec3(T const * const ptr); - - /// Build a vector from a pointer. - /// @see gtc_type_ptr - template - detail::tvec4 make_vec4(T const * const ptr); - - /// Build a matrix from a pointer. - /// @see gtc_type_ptr - template - detail::tmat2x2 make_mat2x2(T const * const ptr); - - /// Build a matrix from a pointer. - /// @see gtc_type_ptr - template - detail::tmat2x3 make_mat2x3(T const * const ptr); - - /// Build a matrix from a pointer. - /// @see gtc_type_ptr - template - detail::tmat2x4 make_mat2x4(T const * const ptr); - - /// Build a matrix from a pointer. - /// @see gtc_type_ptr - template - detail::tmat3x2 make_mat3x2(T const * const ptr); - - /// Build a matrix from a pointer. - /// @see gtc_type_ptr - template - detail::tmat3x3 make_mat3x3(T const * const ptr); - - /// Build a matrix from a pointer. - /// @see gtc_type_ptr - template - detail::tmat3x4 make_mat3x4(T const * const ptr); - - /// Build a matrix from a pointer. - /// @see gtc_type_ptr - template - detail::tmat4x2 make_mat4x2( - T const * const ptr); - - /// Build a matrix from a pointer. - /// @see gtc_type_ptr - template - detail::tmat4x3 make_mat4x3(T const * const ptr); - - /// Build a matrix from a pointer. - /// @see gtc_type_ptr - template - detail::tmat4x4 make_mat4x4(T const * const ptr); - - /// Build a matrix from a pointer. - /// @see gtc_type_ptr - template - detail::tmat2x2 make_mat2(T const * const ptr); - - /// Build a matrix from a pointer. - /// @see gtc_type_ptr - template - detail::tmat3x3 make_mat3(T const * const ptr); - - /// Build a matrix from a pointer. - /// @see gtc_type_ptr - template - detail::tmat4x4 make_mat4(T const * const ptr); - - /// Build a quaternion from a pointer. - /// @see gtc_type_ptr - template - detail::tquat make_quat(T const * const ptr); - - /// @} -}//namespace glm - -#include "type_ptr.inl" - -#endif//GLM_GTC_type_ptr - +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_type_ptr +/// @file glm/gtc/type_ptr.hpp +/// @date 2009-05-06 / 2011-06-05 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_half_float (dependence) +/// @see gtc_quaternion (dependence) +/// +/// @defgroup gtc_type_ptr GLM_GTC_type_ptr +/// @ingroup gtc +/// +/// @brief Handles the interaction between pointers and vector, matrix types. +/// +/// This extension defines an overloaded function, glm::value_ptr, which +/// takes any of the \ref core_template "core template types". It returns +/// a pointer to the memory layout of the object. Matrix types store their values +/// in column-major order. +/// +/// This is useful for uploading data to matrices or copying data to buffer objects. +/// +/// Example: +/// @code +/// #include +/// #include +/// +/// glm::vec3 aVector(3); +/// glm::mat4 someMatrix(1.0); +/// +/// glUniform3fv(uniformLoc, 1, glm::value_ptr(aVector)); +/// glUniformMatrix4fv(uniformMatrixLoc, 1, GL_FALSE, glm::value_ptr(someMatrix)); +/// @endcode +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_type_ptr +#define GLM_GTC_type_ptr GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" +#include "../gtc/quaternion.hpp" +#include + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_type_ptr extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_type_ptr + /// @{ + + /// Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + typename genType::value_type const * value_ptr(genType const & vec); + + /// Build a vector from a pointer. + /// @see gtc_type_ptr + template + detail::tvec2 make_vec2(T const * const ptr); + + /// Build a vector from a pointer. + /// @see gtc_type_ptr + template + detail::tvec3 make_vec3(T const * const ptr); + + /// Build a vector from a pointer. + /// @see gtc_type_ptr + template + detail::tvec4 make_vec4(T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat2x2 make_mat2x2(T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat2x3 make_mat2x3(T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat2x4 make_mat2x4(T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat3x2 make_mat3x2(T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat3x3 make_mat3x3(T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat3x4 make_mat3x4(T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat4x2 make_mat4x2( + T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat4x3 make_mat4x3(T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat4x4 make_mat4x4(T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat2x2 make_mat2(T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat3x3 make_mat3(T const * const ptr); + + /// Build a matrix from a pointer. + /// @see gtc_type_ptr + template + detail::tmat4x4 make_mat4(T const * const ptr); + + /// Build a quaternion from a pointer. + /// @see gtc_type_ptr + template + detail::tquat make_quat(T const * const ptr); + + /// @} +}//namespace glm + +#include "type_ptr.inl" + +#endif//GLM_GTC_type_ptr + diff --git a/include/gal/opengl/glm/gtc/type_ptr.inl b/include/gal/opengl/glm/gtc/type_ptr.inl index d5ff6befe9..f1638d287f 100644 --- a/include/gal/opengl/glm/gtc/type_ptr.inl +++ b/include/gal/opengl/glm/gtc/type_ptr.inl @@ -1,462 +1,462 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_type_ptr -/// @file glm/gtc/type_ptr.inl -/// @date 2011-06-15 / 2011-12-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - /// @addtogroup gtc_type_ptr - /// @{ - - /// Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tvec2 const & vec - ) - { - return &(vec.x); - } - - //! Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tvec2 & vec - ) - { - return &(vec.x); - } - - //! Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tvec3 const & vec - ) - { - return &(vec.x); - } - - //! Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tvec3 & vec - ) - { - return &(vec.x); - } - - //! Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tvec4 const & vec - ) - { - return &(vec.x); - } - - //! Return the constant address to the data of the input parameter. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tvec4 & vec - ) - { - return &(vec.x); - } - - //! Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tmat2x2 const & mat - ) - { - return &(mat[0].x); - } - - //! Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tmat2x2 & mat - ) - { - return &(mat[0].x); - } - - //! Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tmat3x3 const & mat - ) - { - return &(mat[0].x); - } - - //! Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tmat3x3 & mat - ) - { - return &(mat[0].x); - } - - //! Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tmat4x4 const & mat - ) - { - return &(mat[0].x); - } - - //! Return the constant address to the data of the input parameter. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tmat4x4 & mat - ) - { - return &(mat[0].x); - } - - //! Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tmat2x3 const & mat - ) - { - return &(mat[0].x); - } - - //! Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tmat2x3 & mat - ) - { - return &(mat[0].x); - } - - //! Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tmat3x2 const & mat - ) - { - return &(mat[0].x); - } - - //! Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tmat3x2 & mat - ) - { - return &(mat[0].x); - } - - //! Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tmat2x4 const & mat - ) - { - return &(mat[0].x); - } - - //! Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tmat2x4 & mat - ) - { - return &(mat[0].x); - } - - //! Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tmat4x2 const & mat - ) - { - return &(mat[0].x); - } - - //! Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tmat4x2 & mat - ) - { - return &(mat[0].x); - } - - //! Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tmat3x4 const & mat - ) - { - return &(mat[0].x); - } - - //! Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tmat3x4 & mat - ) - { - return &(mat[0].x); - } - - //! Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tmat4x3 const & mat - ) - { - return &(mat[0].x); - } - - //! Return the constant address to the data of the input parameter. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tquat const & q - ) - { - return &(q[0]); - } - - //! Get the address of the matrix content. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER T * value_ptr(detail::tmat4x3 & mat) - { - return &(mat[0].x); - } - - //! Build a vector from a pointer. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER detail::tvec2 make_vec2(T const * const ptr) - { - detail::tvec2 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tvec2)); - return Result; - } - - //! Build a vector from a pointer. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER detail::tvec3 make_vec3(T const * const ptr) - { - detail::tvec3 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tvec3)); - return Result; - } - - //! Build a vector from a pointer. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER detail::tvec4 make_vec4(T const * const ptr) - { - detail::tvec4 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tvec4)); - return Result; - } - - //! Build a matrix from a pointer. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER detail::tmat2x2 make_mat2x2(T const * const ptr) - { - detail::tmat2x2 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x2)); - return Result; - } - - //! Build a matrix from a pointer. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER detail::tmat2x3 make_mat2x3(T const * const ptr) - { - detail::tmat2x3 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x3)); - return Result; - } - - //! Build a matrix from a pointer. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER detail::tmat2x4 make_mat2x4(T const * const ptr) - { - detail::tmat2x4 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x4)); - return Result; - } - - //! Build a matrix from a pointer. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER detail::tmat3x2 make_mat3x2(T const * const ptr) - { - detail::tmat3x2 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x2)); - return Result; - } - - //! Build a matrix from a pointer. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER detail::tmat3x3 make_mat3x3(T const * const ptr) - { - detail::tmat3x3 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x3)); - return Result; - } - - //! Build a matrix from a pointer. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER detail::tmat3x4 make_mat3x4(T const * const ptr) - { - detail::tmat3x4 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x4)); - return Result; - } - - //! Build a matrix from a pointer. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER detail::tmat4x2 make_mat4x2(T const * const ptr) - { - detail::tmat4x2 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x2)); - return Result; - } - - //! Build a matrix from a pointer. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER detail::tmat4x3 make_mat4x3(T const * const ptr) - { - detail::tmat4x3 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x3)); - return Result; - } - - //! Build a matrix from a pointer. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER detail::tmat4x4 make_mat4x4(T const * const ptr) - { - detail::tmat4x4 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x4)); - return Result; - } - - //! Build a matrix from a pointer. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER detail::tmat2x2 make_mat2(T const * const ptr) - { - return make_mat2x2(ptr); - } - - //! Build a matrix from a pointer. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER detail::tmat3x3 make_mat3(T const * const ptr) - { - return make_mat3x3(ptr); - } - - //! Build a matrix from a pointer. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER detail::tmat4x4 make_mat4(T const * const ptr) - { - return make_mat4x4(ptr); - } - - //! Build a quaternion from a pointer. - /// @see gtc_type_ptr - template - GLM_FUNC_QUALIFIER detail::tquat make_quat(T const * const ptr) - { - detail::tquat Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tquat)); - return Result; - } - - /// @} -}//namespace glm - +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_type_ptr +/// @file glm/gtc/type_ptr.inl +/// @date 2011-06-15 / 2011-12-07 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + /// @addtogroup gtc_type_ptr + /// @{ + + /// Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tvec2 const & vec + ) + { + return &(vec.x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tvec2 & vec + ) + { + return &(vec.x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tvec3 const & vec + ) + { + return &(vec.x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tvec3 & vec + ) + { + return &(vec.x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tvec4 const & vec + ) + { + return &(vec.x); + } + + //! Return the constant address to the data of the input parameter. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tvec4 & vec + ) + { + return &(vec.x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat2x2 const & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat2x2 & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat3x3 const & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat3x3 & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat4x4 const & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat4x4 & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat2x3 const & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat2x3 & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat3x2 const & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat3x2 & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat2x4 const & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat2x4 & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat4x2 const & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat4x2 & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat3x4 const & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat3x4 & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat4x3 const & mat + ) + { + return &(mat[0].x); + } + + //! Return the constant address to the data of the input parameter. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tquat const & q + ) + { + return &(q[0]); + } + + //! Get the address of the matrix content. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER T * value_ptr(detail::tmat4x3 & mat) + { + return &(mat[0].x); + } + + //! Build a vector from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tvec2 make_vec2(T const * const ptr) + { + detail::tvec2 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tvec2)); + return Result; + } + + //! Build a vector from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tvec3 make_vec3(T const * const ptr) + { + detail::tvec3 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tvec3)); + return Result; + } + + //! Build a vector from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tvec4 make_vec4(T const * const ptr) + { + detail::tvec4 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tvec4)); + return Result; + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat2x2 make_mat2x2(T const * const ptr) + { + detail::tmat2x2 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x2)); + return Result; + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat2x3 make_mat2x3(T const * const ptr) + { + detail::tmat2x3 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x3)); + return Result; + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat2x4 make_mat2x4(T const * const ptr) + { + detail::tmat2x4 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x4)); + return Result; + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat3x2 make_mat3x2(T const * const ptr) + { + detail::tmat3x2 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x2)); + return Result; + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat3x3 make_mat3x3(T const * const ptr) + { + detail::tmat3x3 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x3)); + return Result; + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat3x4 make_mat3x4(T const * const ptr) + { + detail::tmat3x4 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x4)); + return Result; + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat4x2 make_mat4x2(T const * const ptr) + { + detail::tmat4x2 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x2)); + return Result; + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat4x3 make_mat4x3(T const * const ptr) + { + detail::tmat4x3 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x3)); + return Result; + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat4x4 make_mat4x4(T const * const ptr) + { + detail::tmat4x4 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x4)); + return Result; + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat2x2 make_mat2(T const * const ptr) + { + return make_mat2x2(ptr); + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat3x3 make_mat3(T const * const ptr) + { + return make_mat3x3(ptr); + } + + //! Build a matrix from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tmat4x4 make_mat4(T const * const ptr) + { + return make_mat4x4(ptr); + } + + //! Build a quaternion from a pointer. + /// @see gtc_type_ptr + template + GLM_FUNC_QUALIFIER detail::tquat make_quat(T const * const ptr) + { + detail::tquat Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tquat)); + return Result; + } + + /// @} +}//namespace glm + diff --git a/include/gal/opengl/glm/gtc/ulp.hpp b/include/gal/opengl/glm/gtc/ulp.hpp index 9f79d57d52..5aa8905984 100644 --- a/include/gal/opengl/glm/gtc/ulp.hpp +++ b/include/gal/opengl/glm/gtc/ulp.hpp @@ -1,90 +1,90 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_ulp -/// @file glm/gtc/ulp.hpp -/// @date 2011-02-21 / 2011-12-12 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtc_ulp GLM_GTC_ulp -/// @ingroup gtc -/// -/// @brief Allow the measurement of the accuracy of a function against a reference -/// implementation. This extension works on floating-point data and provide results -/// in ULP. -/// need to be included to use these features. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTC_ulp -#define GLM_GTC_ulp GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTC_ulp extension included") -#endif - -namespace glm -{ - /// @addtogroup gtc_ulp - /// @{ - - /// Return the next ULP value(s) after the input value(s). - /// @see gtc_ulp - template - genType next_float(genType const & x); - - /// Return the previous ULP value(s) before the input value(s). - /// @see gtc_ulp - template - genType prev_float(genType const & x); - - /// Return the value(s) ULP distance after the input value(s). - /// @see gtc_ulp - template - genType next_float(genType const & x, uint const & Distance); - - /// Return the value(s) ULP distance before the input value(s). - /// @see gtc_ulp - template - genType prev_float(genType const & x, uint const & Distance); - - /// Return the distance in the number of ULP between 2 scalars. - /// @see gtc_ulp - template - uint float_distance(T const & x, T const & y); - - /// Return the distance in the number of ULP between 2 vectors. - /// @see gtc_ulp - template class vecType> - vecType float_distance(vecType const & x, vecType const & y); - - /// @} -}// namespace glm - -#include "ulp.inl" - -#endif//GLM_GTC_ulp - +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_ulp +/// @file glm/gtc/ulp.hpp +/// @date 2011-02-21 / 2011-12-12 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtc_ulp GLM_GTC_ulp +/// @ingroup gtc +/// +/// @brief Allow the measurement of the accuracy of a function against a reference +/// implementation. This extension works on floating-point data and provide results +/// in ULP. +/// need to be included to use these features. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTC_ulp +#define GLM_GTC_ulp GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTC_ulp extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_ulp + /// @{ + + /// Return the next ULP value(s) after the input value(s). + /// @see gtc_ulp + template + genType next_float(genType const & x); + + /// Return the previous ULP value(s) before the input value(s). + /// @see gtc_ulp + template + genType prev_float(genType const & x); + + /// Return the value(s) ULP distance after the input value(s). + /// @see gtc_ulp + template + genType next_float(genType const & x, uint const & Distance); + + /// Return the value(s) ULP distance before the input value(s). + /// @see gtc_ulp + template + genType prev_float(genType const & x, uint const & Distance); + + /// Return the distance in the number of ULP between 2 scalars. + /// @see gtc_ulp + template + uint float_distance(T const & x, T const & y); + + /// Return the distance in the number of ULP between 2 vectors. + /// @see gtc_ulp + template class vecType> + vecType float_distance(vecType const & x, vecType const & y); + + /// @} +}// namespace glm + +#include "ulp.inl" + +#endif//GLM_GTC_ulp + diff --git a/include/gal/opengl/glm/gtc/ulp.inl b/include/gal/opengl/glm/gtc/ulp.inl index b336349130..2875c68f37 100644 --- a/include/gal/opengl/glm/gtc/ulp.inl +++ b/include/gal/opengl/glm/gtc/ulp.inl @@ -1,314 +1,314 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtc_ulp -/// @file glm/gtc/ulp.inl -/// @date 2011-03-07 / 2012-04-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// -/// Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. -/// -/// Developed at SunPro, a Sun Microsystems, Inc. business. -/// Permission to use, copy, modify, and distribute this -/// software is freely granted, provided that this notice -/// is preserved. -/////////////////////////////////////////////////////////////////////////////////// - -#include -#include - -#pragma warning(push) -#pragma warning(disable : 4127) - -typedef union -{ - float value; - /* FIXME: Assumes 32 bit int. */ - unsigned int word; -} ieee_float_shape_type; - -typedef union -{ - double value; - struct - { - glm::detail::int32 lsw; - glm::detail::int32 msw; - } parts; -} ieee_double_shape_type; - -#define GLM_EXTRACT_WORDS(ix0,ix1,d) \ - do { \ - ieee_double_shape_type ew_u; \ - ew_u.value = (d); \ - (ix0) = ew_u.parts.msw; \ - (ix1) = ew_u.parts.lsw; \ - } while (0) - -#define GLM_GET_FLOAT_WORD(i,d) \ - do { \ - ieee_float_shape_type gf_u; \ - gf_u.value = (d); \ - (i) = gf_u.word; \ - } while (0) - -#define GLM_SET_FLOAT_WORD(d,i) \ - do { \ - ieee_float_shape_type sf_u; \ - sf_u.word = (i); \ - (d) = sf_u.value; \ - } while (0) - -#define GLM_INSERT_WORDS(d,ix0,ix1) \ - do { \ - ieee_double_shape_type iw_u; \ - iw_u.parts.msw = (ix0); \ - iw_u.parts.lsw = (ix1); \ - (d) = iw_u.value; \ - } while (0) - -namespace glm{ -namespace detail -{ - GLM_FUNC_QUALIFIER float nextafterf(float x, float y) - { - volatile float t; - glm::detail::int32 hx, hy, ix, iy; - - GLM_GET_FLOAT_WORD(hx, x); - GLM_GET_FLOAT_WORD(hy, y); - ix = hx&0x7fffffff; // |x| - iy = hy&0x7fffffff; // |y| - - if((ix>0x7f800000) || // x is nan - (iy>0x7f800000)) // y is nan - return x+y; - if(x==y) return y; // x=y, return y - if(ix==0) { // x == 0 - GLM_SET_FLOAT_WORD(x,(hy&0x80000000)|1);// return +-minsubnormal - t = x*x; - if(t==x) return t; else return x; // raise underflow flag - } - if(hx>=0) { // x > 0 - if(hx>hy) { // x > y, x -= ulp - hx -= 1; - } else { // x < y, x += ulp - hx += 1; - } - } else { // x < 0 - if(hy>=0||hx>hy){ // x < y, x -= ulp - hx -= 1; - } else { // x > y, x += ulp - hx += 1; - } - } - hy = hx&0x7f800000; - if(hy>=0x7f800000) return x+x; // overflow - if(hy<0x00800000) { // underflow - t = x*x; - if(t!=x) { // raise underflow flag - GLM_SET_FLOAT_WORD(y,hx); - return y; - } - } - GLM_SET_FLOAT_WORD(x,hx); - return x; - } - - GLM_FUNC_QUALIFIER double nextafter(double x, double y) - { - volatile double t; - glm::detail::int32 hx, hy, ix, iy; - glm::detail::uint32 lx, ly; - - GLM_EXTRACT_WORDS(hx, lx, x); - GLM_EXTRACT_WORDS(hy, ly, y); - ix = hx & 0x7fffffff; // |x| - iy = hy & 0x7fffffff; // |y| - - if(((ix>=0x7ff00000)&&((ix-0x7ff00000)|lx)!=0) || // x is nan - ((iy>=0x7ff00000)&&((iy-0x7ff00000)|ly)!=0)) // y is nan - return x+y; - if(x==y) return y; // x=y, return y - if((ix|lx)==0) { // x == 0 - GLM_INSERT_WORDS(x, hy & 0x80000000, 1); // return +-minsubnormal - t = x*x; - if(t==x) return t; else return x; // raise underflow flag - } - if(hx>=0) { // x > 0 - if(hx>hy||((hx==hy)&&(lx>ly))) { // x > y, x -= ulp - if(lx==0) hx -= 1; - lx -= 1; - } else { // x < y, x += ulp - lx += 1; - if(lx==0) hx += 1; - } - } else { // x < 0 - if(hy>=0||hx>hy||((hx==hy)&&(lx>ly))){// x < y, x -= ulp - if(lx==0) hx -= 1; - lx -= 1; - } else { // x > y, x += ulp - lx += 1; - if(lx==0) hx += 1; - } - } - hy = hx&0x7ff00000; - if(hy>=0x7ff00000) return x+x; // overflow - if(hy<0x00100000) { // underflow - t = x*x; - if(t!=x) { // raise underflow flag - GLM_INSERT_WORDS(y,hx,lx); - return y; - } - } - GLM_INSERT_WORDS(x,hx,lx); - return x; - } -}//namespace detail -}//namespace glm - -#pragma warning(pop) - -#if((GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS))) -# define GLM_NEXT_AFTER_FLT(x, toward) glm::detail::nextafterf((x), (toward)) -# define GLM_NEXT_AFTER_DBL(x, toward) _nextafter((x), (toward)) -#else -# define GLM_NEXT_AFTER_FLT(x, toward) nextafterf((x), (toward)) -# define GLM_NEXT_AFTER_DBL(x, toward) nextafter((x), (toward)) -#endif - -namespace glm -{ - GLM_FUNC_QUALIFIER float next_float(float const & x) - { - return GLM_NEXT_AFTER_FLT(x, std::numeric_limits::max()); - } - - GLM_FUNC_QUALIFIER double next_float(double const & x) - { - return GLM_NEXT_AFTER_DBL(x, std::numeric_limits::max()); - } - - template class vecType> - GLM_FUNC_QUALIFIER vecType next_float(vecType const & x) - { - vecType Result; - for(std::size_t i = 0; i < Result.length(); ++i) - Result[i] = next_float(x[i]); - return Result; - } - - GLM_FUNC_QUALIFIER float prev_float(float const & x) - { - return GLM_NEXT_AFTER_FLT(x, std::numeric_limits::min()); - } - - GLM_FUNC_QUALIFIER double prev_float(double const & x) - { - return GLM_NEXT_AFTER_DBL(x, std::numeric_limits::min()); - } - - template class vecType> - GLM_FUNC_QUALIFIER vecType prev_float(vecType const & x) - { - vecType Result; - for(std::size_t i = 0; i < Result.length(); ++i) - Result[i] = prev_float(x[i]); - return Result; - } - - template - GLM_FUNC_QUALIFIER T next_float(T const & x, uint const & ulps) - { - T temp = x; - for(std::size_t i = 0; i < ulps; ++i) - temp = next_float(temp); - return temp; - } - - template class vecType> - GLM_FUNC_QUALIFIER vecType next_float(vecType const & x, vecType const & ulps) - { - vecType Result; - for(std::size_t i = 0; i < Result.length(); ++i) - Result[i] = next_float(x[i], ulps[i]); - return Result; - } - - template - GLM_FUNC_QUALIFIER T prev_float(T const & x, uint const & ulps) - { - T temp = x; - for(std::size_t i = 0; i < ulps; ++i) - temp = prev_float(temp); - return temp; - } - - template class vecType> - GLM_FUNC_QUALIFIER vecType prev_float(vecType const & x, vecType const & ulps) - { - vecType Result; - for(std::size_t i = 0; i < Result.length(); ++i) - Result[i] = prev_float(x[i], ulps[i]); - return Result; - } - - template - GLM_FUNC_QUALIFIER uint float_distance(T const & x, T const & y) - { - uint ulp = 0; - - if(x < y) - { - T temp = x; - while(temp != y && ulp < std::numeric_limits::max()) - { - ++ulp; - temp = next_float(temp); - } - } - else if(y < x) - { - T temp = y; - while(temp != x && ulp < std::numeric_limits::max()) - { - ++ulp; - temp = next_float(temp); - } - } - else // == - { - - } - - return ulp; - } - - template class vecType> - GLM_FUNC_QUALIFIER vecType float_distance(vecType const & x, vecType const & y) - { - vecType Result; - for(std::size_t i = 0; i < Result.length(); ++i) - Result[i] = float_distance(x[i], y[i]); - return Result; - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtc_ulp +/// @file glm/gtc/ulp.inl +/// @date 2011-03-07 / 2012-04-07 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// +/// Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. +/// +/// Developed at SunPro, a Sun Microsystems, Inc. business. +/// Permission to use, copy, modify, and distribute this +/// software is freely granted, provided that this notice +/// is preserved. +/////////////////////////////////////////////////////////////////////////////////// + +#include +#include + +#pragma warning(push) +#pragma warning(disable : 4127) + +typedef union +{ + float value; + /* FIXME: Assumes 32 bit int. */ + unsigned int word; +} ieee_float_shape_type; + +typedef union +{ + double value; + struct + { + glm::detail::int32 lsw; + glm::detail::int32 msw; + } parts; +} ieee_double_shape_type; + +#define GLM_EXTRACT_WORDS(ix0,ix1,d) \ + do { \ + ieee_double_shape_type ew_u; \ + ew_u.value = (d); \ + (ix0) = ew_u.parts.msw; \ + (ix1) = ew_u.parts.lsw; \ + } while (0) + +#define GLM_GET_FLOAT_WORD(i,d) \ + do { \ + ieee_float_shape_type gf_u; \ + gf_u.value = (d); \ + (i) = gf_u.word; \ + } while (0) + +#define GLM_SET_FLOAT_WORD(d,i) \ + do { \ + ieee_float_shape_type sf_u; \ + sf_u.word = (i); \ + (d) = sf_u.value; \ + } while (0) + +#define GLM_INSERT_WORDS(d,ix0,ix1) \ + do { \ + ieee_double_shape_type iw_u; \ + iw_u.parts.msw = (ix0); \ + iw_u.parts.lsw = (ix1); \ + (d) = iw_u.value; \ + } while (0) + +namespace glm{ +namespace detail +{ + GLM_FUNC_QUALIFIER float nextafterf(float x, float y) + { + volatile float t; + glm::detail::int32 hx, hy, ix, iy; + + GLM_GET_FLOAT_WORD(hx, x); + GLM_GET_FLOAT_WORD(hy, y); + ix = hx&0x7fffffff; // |x| + iy = hy&0x7fffffff; // |y| + + if((ix>0x7f800000) || // x is nan + (iy>0x7f800000)) // y is nan + return x+y; + if(x==y) return y; // x=y, return y + if(ix==0) { // x == 0 + GLM_SET_FLOAT_WORD(x,(hy&0x80000000)|1);// return +-minsubnormal + t = x*x; + if(t==x) return t; else return x; // raise underflow flag + } + if(hx>=0) { // x > 0 + if(hx>hy) { // x > y, x -= ulp + hx -= 1; + } else { // x < y, x += ulp + hx += 1; + } + } else { // x < 0 + if(hy>=0||hx>hy){ // x < y, x -= ulp + hx -= 1; + } else { // x > y, x += ulp + hx += 1; + } + } + hy = hx&0x7f800000; + if(hy>=0x7f800000) return x+x; // overflow + if(hy<0x00800000) { // underflow + t = x*x; + if(t!=x) { // raise underflow flag + GLM_SET_FLOAT_WORD(y,hx); + return y; + } + } + GLM_SET_FLOAT_WORD(x,hx); + return x; + } + + GLM_FUNC_QUALIFIER double nextafter(double x, double y) + { + volatile double t; + glm::detail::int32 hx, hy, ix, iy; + glm::detail::uint32 lx, ly; + + GLM_EXTRACT_WORDS(hx, lx, x); + GLM_EXTRACT_WORDS(hy, ly, y); + ix = hx & 0x7fffffff; // |x| + iy = hy & 0x7fffffff; // |y| + + if(((ix>=0x7ff00000)&&((ix-0x7ff00000)|lx)!=0) || // x is nan + ((iy>=0x7ff00000)&&((iy-0x7ff00000)|ly)!=0)) // y is nan + return x+y; + if(x==y) return y; // x=y, return y + if((ix|lx)==0) { // x == 0 + GLM_INSERT_WORDS(x, hy & 0x80000000, 1); // return +-minsubnormal + t = x*x; + if(t==x) return t; else return x; // raise underflow flag + } + if(hx>=0) { // x > 0 + if(hx>hy||((hx==hy)&&(lx>ly))) { // x > y, x -= ulp + if(lx==0) hx -= 1; + lx -= 1; + } else { // x < y, x += ulp + lx += 1; + if(lx==0) hx += 1; + } + } else { // x < 0 + if(hy>=0||hx>hy||((hx==hy)&&(lx>ly))){// x < y, x -= ulp + if(lx==0) hx -= 1; + lx -= 1; + } else { // x > y, x += ulp + lx += 1; + if(lx==0) hx += 1; + } + } + hy = hx&0x7ff00000; + if(hy>=0x7ff00000) return x+x; // overflow + if(hy<0x00100000) { // underflow + t = x*x; + if(t!=x) { // raise underflow flag + GLM_INSERT_WORDS(y,hx,lx); + return y; + } + } + GLM_INSERT_WORDS(x,hx,lx); + return x; + } +}//namespace detail +}//namespace glm + +#pragma warning(pop) + +#if((GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS))) +# define GLM_NEXT_AFTER_FLT(x, toward) glm::detail::nextafterf((x), (toward)) +# define GLM_NEXT_AFTER_DBL(x, toward) _nextafter((x), (toward)) +#else +# define GLM_NEXT_AFTER_FLT(x, toward) nextafterf((x), (toward)) +# define GLM_NEXT_AFTER_DBL(x, toward) nextafter((x), (toward)) +#endif + +namespace glm +{ + GLM_FUNC_QUALIFIER float next_float(float const & x) + { + return GLM_NEXT_AFTER_FLT(x, std::numeric_limits::max()); + } + + GLM_FUNC_QUALIFIER double next_float(double const & x) + { + return GLM_NEXT_AFTER_DBL(x, std::numeric_limits::max()); + } + + template class vecType> + GLM_FUNC_QUALIFIER vecType next_float(vecType const & x) + { + vecType Result; + for(std::size_t i = 0; i < Result.length(); ++i) + Result[i] = next_float(x[i]); + return Result; + } + + GLM_FUNC_QUALIFIER float prev_float(float const & x) + { + return GLM_NEXT_AFTER_FLT(x, std::numeric_limits::min()); + } + + GLM_FUNC_QUALIFIER double prev_float(double const & x) + { + return GLM_NEXT_AFTER_DBL(x, std::numeric_limits::min()); + } + + template class vecType> + GLM_FUNC_QUALIFIER vecType prev_float(vecType const & x) + { + vecType Result; + for(std::size_t i = 0; i < Result.length(); ++i) + Result[i] = prev_float(x[i]); + return Result; + } + + template + GLM_FUNC_QUALIFIER T next_float(T const & x, uint const & ulps) + { + T temp = x; + for(std::size_t i = 0; i < ulps; ++i) + temp = next_float(temp); + return temp; + } + + template class vecType> + GLM_FUNC_QUALIFIER vecType next_float(vecType const & x, vecType const & ulps) + { + vecType Result; + for(std::size_t i = 0; i < Result.length(); ++i) + Result[i] = next_float(x[i], ulps[i]); + return Result; + } + + template + GLM_FUNC_QUALIFIER T prev_float(T const & x, uint const & ulps) + { + T temp = x; + for(std::size_t i = 0; i < ulps; ++i) + temp = prev_float(temp); + return temp; + } + + template class vecType> + GLM_FUNC_QUALIFIER vecType prev_float(vecType const & x, vecType const & ulps) + { + vecType Result; + for(std::size_t i = 0; i < Result.length(); ++i) + Result[i] = prev_float(x[i], ulps[i]); + return Result; + } + + template + GLM_FUNC_QUALIFIER uint float_distance(T const & x, T const & y) + { + uint ulp = 0; + + if(x < y) + { + T temp = x; + while(temp != y && ulp < std::numeric_limits::max()) + { + ++ulp; + temp = next_float(temp); + } + } + else if(y < x) + { + T temp = y; + while(temp != x && ulp < std::numeric_limits::max()) + { + ++ulp; + temp = next_float(temp); + } + } + else // == + { + + } + + return ulp; + } + + template class vecType> + GLM_FUNC_QUALIFIER vecType float_distance(vecType const & x, vecType const & y) + { + vecType Result; + for(std::size_t i = 0; i < Result.length(); ++i) + Result[i] = float_distance(x[i], y[i]); + return Result; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/associated_min_max.hpp b/include/gal/opengl/glm/gtx/associated_min_max.hpp index c6fc3757b1..e18087ec89 100644 --- a/include/gal/opengl/glm/gtx/associated_min_max.hpp +++ b/include/gal/opengl/glm/gtx/associated_min_max.hpp @@ -1,106 +1,106 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_associated_min_max -/// @file glm/gtx/associated_min_max.hpp -/// @date 2008-03-10 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_extented_min_max (dependence) -/// -/// @defgroup gtx_associated_min_max GLM_GTX_associated_min_max -/// @ingroup gtx -/// -/// @brief Min and max functions that return associated values not the compared onces. -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_associated_min_max -#define GLM_GTX_associated_min_max GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_associated_min_max extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_associated_min_max - /// @{ - - /// Min comparison between 2 variables - /// @see gtx_associated_min_max - template - genTypeU associatedMin( - const genTypeT& x, const genTypeU& a, - const genTypeT& y, const genTypeU& b); - - /// Min comparison between 3 variables - /// @see gtx_associated_min_max - template - genTypeU associatedMin( - const genTypeT& x, const genTypeU& a, - const genTypeT& y, const genTypeU& b, - const genTypeT& z, const genTypeU& c); - - /// Min comparison between 4 variables - /// @see gtx_associated_min_max - template - genTypeU associatedMin( - const genTypeT& x, const genTypeU& a, - const genTypeT& y, const genTypeU& b, - const genTypeT& z, const genTypeU& c, - const genTypeT& w, const genTypeU& d); - - /// Max comparison between 2 variables - /// @see gtx_associated_min_max - template - genTypeU associatedMax( - const genTypeT& x, const genTypeU& a, - const genTypeT& y, const genTypeU& b); - - /// Max comparison between 3 variables - /// @see gtx_associated_min_max - template - genTypeU associatedMax( - const genTypeT& x, const genTypeU& a, - const genTypeT& y, const genTypeU& b, - const genTypeT& z, const genTypeU& c); - - /// Max comparison between 4 variables - /// @see gtx_associated_min_max - template - genTypeU associatedMax( - const genTypeT& x, const genTypeU& a, - const genTypeT& y, const genTypeU& b, - const genTypeT& z, const genTypeU& c, - const genTypeT& w, const genTypeU& d); - - /// @} -} //namespace glm - -#include "associated_min_max.inl" - -#endif//GLM_GTX_associated_min_max +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_associated_min_max +/// @file glm/gtx/associated_min_max.hpp +/// @date 2008-03-10 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_extented_min_max (dependence) +/// +/// @defgroup gtx_associated_min_max GLM_GTX_associated_min_max +/// @ingroup gtx +/// +/// @brief Min and max functions that return associated values not the compared onces. +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_associated_min_max +#define GLM_GTX_associated_min_max GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_associated_min_max extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_associated_min_max + /// @{ + + /// Min comparison between 2 variables + /// @see gtx_associated_min_max + template + genTypeU associatedMin( + const genTypeT& x, const genTypeU& a, + const genTypeT& y, const genTypeU& b); + + /// Min comparison between 3 variables + /// @see gtx_associated_min_max + template + genTypeU associatedMin( + const genTypeT& x, const genTypeU& a, + const genTypeT& y, const genTypeU& b, + const genTypeT& z, const genTypeU& c); + + /// Min comparison between 4 variables + /// @see gtx_associated_min_max + template + genTypeU associatedMin( + const genTypeT& x, const genTypeU& a, + const genTypeT& y, const genTypeU& b, + const genTypeT& z, const genTypeU& c, + const genTypeT& w, const genTypeU& d); + + /// Max comparison between 2 variables + /// @see gtx_associated_min_max + template + genTypeU associatedMax( + const genTypeT& x, const genTypeU& a, + const genTypeT& y, const genTypeU& b); + + /// Max comparison between 3 variables + /// @see gtx_associated_min_max + template + genTypeU associatedMax( + const genTypeT& x, const genTypeU& a, + const genTypeT& y, const genTypeU& b, + const genTypeT& z, const genTypeU& c); + + /// Max comparison between 4 variables + /// @see gtx_associated_min_max + template + genTypeU associatedMax( + const genTypeT& x, const genTypeU& a, + const genTypeT& y, const genTypeU& b, + const genTypeT& z, const genTypeU& c, + const genTypeT& w, const genTypeU& d); + + /// @} +} //namespace glm + +#include "associated_min_max.inl" + +#endif//GLM_GTX_associated_min_max diff --git a/include/gal/opengl/glm/gtx/associated_min_max.inl b/include/gal/opengl/glm/gtx/associated_min_max.inl index f0e36f5edb..eea04cd496 100644 --- a/include/gal/opengl/glm/gtx/associated_min_max.inl +++ b/include/gal/opengl/glm/gtx/associated_min_max.inl @@ -1,912 +1,912 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2008-03-10 -// Updated : 2008-03-15 -// Licence : This source is under MIT License -// File : gtx_associated_min_max.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm{ - -// Min comparison between 2 variables -template -GLM_FUNC_QUALIFIER U associatedMin(T x, U a, T y, U b) -{ - return x < y ? a : b; -} - -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMin -( - const detail::tvec2& x, const detail::tvec2& a, - const detail::tvec2& y, const detail::tvec2& b -) -{ - detail::tvec2 Result; - //Result.x = x[0] < y[0] ? a[0] : b[0]; - //Result.y = x[1] < y[1] ? a[1] : b[1]; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) - Result[i] = x[i] < y[i] ? a[i] : b[i]; - return Result; -} - -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMin -( - const detail::tvec3& x, const detail::tvec3& a, - const detail::tvec3& y, const detail::tvec3& b -) -{ - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) - Result[i] = x[i] < y[i] ? a[i] : b[i]; - return Result; -} - -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMin -( - const detail::tvec4& x, const detail::tvec4& a, - const detail::tvec4& y, const detail::tvec4& b -) -{ - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) - Result[i] = x[i] < y[i] ? a[i] : b[i]; - return Result; -} - -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMin -( - T x, const detail::tvec2& a, - T y, const detail::tvec2& b -) -{ - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) - Result[i] = x < y ? a[i] : b[i]; - return Result; -} - -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMin -( - T x, const detail::tvec3& a, - T y, const detail::tvec3& b -) -{ - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) - Result[i] = x < y ? a[i] : b[i]; - return Result; -} - -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMin -( - T x, const detail::tvec4& a, - T y, const detail::tvec4& b -) -{ - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) - Result[i] = x < y ? a[i] : b[i]; - return Result; -} - -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMin -( - const detail::tvec2& x, U a, - const detail::tvec2& y, U b -) -{ - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) - Result[i] = x[i] < y[i] ? a : b; - return Result; -} - -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMin -( - const detail::tvec3& x, U a, - const detail::tvec3& y, U b -) -{ - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) - Result[i] = x[i] < y[i] ? a : b; - return Result; -} - -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMin -( - const detail::tvec4& x, U a, - const detail::tvec4& y, U b -) -{ - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) - Result[i] = x[i] < y[i] ? a : b; - return Result; -} - -// Min comparison between 3 variables -template -GLM_FUNC_QUALIFIER U associatedMin -( - T x, U a, - T y, U b, - T z, U c -) -{ - U Result = x < y ? (x < z ? a : c) : (y < z ? b : c); - return Result; -} - -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMin -( - const detail::tvec2& x, const detail::tvec2& a, - const detail::tvec2& y, const detail::tvec2& b, - const detail::tvec2& z, const detail::tvec2& c -) -{ - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) - Result[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]); - return Result; -} - -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMin -( - const detail::tvec3& x, const detail::tvec3& a, - const detail::tvec3& y, const detail::tvec3& b, - const detail::tvec3& z, const detail::tvec3& c -) -{ - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) - Result[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]); - return Result; -} - -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMin -( - const detail::tvec4& x, const detail::tvec4& a, - const detail::tvec4& y, const detail::tvec4& b, - const detail::tvec4& z, const detail::tvec4& c -) -{ - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) - Result[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]); - return Result; -} - -// Min comparison between 4 variables -template -GLM_FUNC_QUALIFIER U associatedMin -( - T x, U a, - T y, U b, - T z, U c, - T w, U d -) -{ - T Test1 = min(x, y); - T Test2 = min(z, w);; - U Result1 = x < y ? a : b; - U Result2 = z < w ? c : d; - U Result = Test1 < Test2 ? Result1 : Result2; - return Result; -} - -// Min comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMin -( - const detail::tvec2& x, const detail::tvec2& a, - const detail::tvec2& y, const detail::tvec2& b, - const detail::tvec2& z, const detail::tvec2& c, - const detail::tvec2& w, const detail::tvec2& d -) -{ - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) - { - T Test1 = min(x[i], y[i]); - T Test2 = min(z[i], w[i]); - U Result1 = x[i] < y[i] ? a[i] : b[i]; - U Result2 = z[i] < w[i] ? c[i] : d[i]; - Result[i] = Test1 < Test2 ? Result1 : Result2; - } - return Result; -} - -// Min comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMin -( - const detail::tvec3& x, const detail::tvec3& a, - const detail::tvec3& y, const detail::tvec3& b, - const detail::tvec3& z, const detail::tvec3& c, - const detail::tvec3& w, const detail::tvec3& d -) -{ - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) - { - T Test1 = min(x[i], y[i]); - T Test2 = min(z[i], w[i]); - U Result1 = x[i] < y[i] ? a[i] : b[i]; - U Result2 = z[i] < w[i] ? c[i] : d[i]; - Result[i] = Test1 < Test2 ? Result1 : Result2; - } - return Result; -} - -// Min comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMin -( - const detail::tvec4& x, const detail::tvec4& a, - const detail::tvec4& y, const detail::tvec4& b, - const detail::tvec4& z, const detail::tvec4& c, - const detail::tvec4& w, const detail::tvec4& d -) -{ - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) - { - T Test1 = min(x[i], y[i]); - T Test2 = min(z[i], w[i]); - U Result1 = x[i] < y[i] ? a[i] : b[i]; - U Result2 = z[i] < w[i] ? c[i] : d[i]; - Result[i] = Test1 < Test2 ? Result1 : Result2; - } - return Result; -} - -// Min comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMin -( - T x, const detail::tvec2& a, - T y, const detail::tvec2& b, - T z, const detail::tvec2& c, - T w, const detail::tvec2& d -) -{ - T Test1 = min(x, y); - T Test2 = min(z, w); - - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) - { - U Result1 = x < y ? a[i] : b[i]; - U Result2 = z < w ? c[i] : d[i]; - Result[i] = Test1 < Test2 ? Result1 : Result2; - } - return Result; -} - -// Min comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMin -( - T x, const detail::tvec3& a, - T y, const detail::tvec3& b, - T z, const detail::tvec3& c, - T w, const detail::tvec3& d -) -{ - T Test1 = min(x, y); - T Test2 = min(z, w); - - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) - { - U Result1 = x < y ? a[i] : b[i]; - U Result2 = z < w ? c[i] : d[i]; - Result[i] = Test1 < Test2 ? Result1 : Result2; - } - return Result; -} - -// Min comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMin -( - T x, const detail::tvec4& a, - T y, const detail::tvec4& b, - T z, const detail::tvec4& c, - T w, const detail::tvec4& d -) -{ - T Test1 = min(x, y); - T Test2 = min(z, w); - - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) - { - U Result1 = x < y ? a[i] : b[i]; - U Result2 = z < w ? c[i] : d[i]; - Result[i] = Test1 < Test2 ? Result1 : Result2; - } - return Result; -} - -// Min comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMin -( - const detail::tvec2& x, U a, - const detail::tvec2& y, U b, - const detail::tvec2& z, U c, - const detail::tvec2& w, U d -) -{ - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) - { - T Test1 = min(x[i], y[i]); - T Test2 = min(z[i], w[i]);; - U Result1 = x[i] < y[i] ? a : b; - U Result2 = z[i] < w[i] ? c : d; - Result[i] = Test1 < Test2 ? Result1 : Result2; - } - return Result; -} - -// Min comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMin -( - const detail::tvec3& x, U a, - const detail::tvec3& y, U b, - const detail::tvec3& z, U c, - const detail::tvec3& w, U d -) -{ - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) - { - T Test1 = min(x[i], y[i]); - T Test2 = min(z[i], w[i]);; - U Result1 = x[i] < y[i] ? a : b; - U Result2 = z[i] < w[i] ? c : d; - Result[i] = Test1 < Test2 ? Result1 : Result2; - } - return Result; -} - -// Min comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMin -( - const detail::tvec4& x, U a, - const detail::tvec4& y, U b, - const detail::tvec4& z, U c, - const detail::tvec4& w, U d -) -{ - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) - { - T Test1 = min(x[i], y[i]); - T Test2 = min(z[i], w[i]);; - U Result1 = x[i] < y[i] ? a : b; - U Result2 = z[i] < w[i] ? c : d; - Result[i] = Test1 < Test2 ? Result1 : Result2; - } - return Result; -} - -// Max comparison between 2 variables -template -GLM_FUNC_QUALIFIER U associatedMax(T x, U a, T y, U b) -{ - return x > y ? a : b; -} - -// Max comparison between 2 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMax -( - const detail::tvec2& x, const detail::tvec2& a, - const detail::tvec2& y, const detail::tvec2& b -) -{ - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) - Result[i] = x[i] > y[i] ? a[i] : b[i]; - return Result; -} - -// Max comparison between 2 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMax -( - const detail::tvec3& x, const detail::tvec3& a, - const detail::tvec3& y, const detail::tvec3& b -) -{ - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) - Result[i] = x[i] > y[i] ? a[i] : b[i]; - return Result; -} - -// Max comparison between 2 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMax -( - const detail::tvec4& x, const detail::tvec4& a, - const detail::tvec4& y, const detail::tvec4& b -) -{ - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) - Result[i] = x[i] > y[i] ? a[i] : b[i]; - return Result; -} - -// Max comparison between 2 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMax -( - T x, const detail::tvec2& a, - T y, const detail::tvec2& b -) -{ - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) - Result[i] = x > y ? a[i] : b[i]; - return Result; -} - -// Max comparison between 2 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMax -( - T x, const detail::tvec3& a, - T y, const detail::tvec3& b -) -{ - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) - Result[i] = x > y ? a[i] : b[i]; - return Result; -} - -// Max comparison between 2 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMax -( - T x, const detail::tvec4& a, - T y, const detail::tvec4& b -) -{ - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) - Result[i] = x > y ? a[i] : b[i]; - return Result; -} - -// Max comparison between 2 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMax -( - const detail::tvec2& x, U a, - const detail::tvec2& y, U b -) -{ - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) - Result[i] = x[i] > y[i] ? a : b; - return Result; -} - -// Max comparison between 2 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMax -( - const detail::tvec3& x, U a, - const detail::tvec3& y, U b -) -{ - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) - Result[i] = x[i] > y[i] ? a : b; - return Result; -} - -// Max comparison between 2 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMax -( - const detail::tvec4& x, U a, - const detail::tvec4& y, U b -) -{ - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) - Result[i] = x[i] > y[i] ? a : b; - return Result; -} - -// Max comparison between 3 variables -template -GLM_FUNC_QUALIFIER U associatedMax -( - T x, U a, - T y, U b, - T z, U c -) -{ - U Result = x > y ? (x > z ? a : c) : (y > z ? b : c); - return Result; -} - -// Max comparison between 3 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMax -( - const detail::tvec2& x, const detail::tvec2& a, - const detail::tvec2& y, const detail::tvec2& b, - const detail::tvec2& z, const detail::tvec2& c -) -{ - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) - Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]); - return Result; -} - -// Max comparison between 3 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMax -( - const detail::tvec3& x, const detail::tvec3& a, - const detail::tvec3& y, const detail::tvec3& b, - const detail::tvec3& z, const detail::tvec3& c -) -{ - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) - Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]); - return Result; -} - -// Max comparison between 3 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMax -( - const detail::tvec4& x, const detail::tvec4& a, - const detail::tvec4& y, const detail::tvec4& b, - const detail::tvec4& z, const detail::tvec4& c -) -{ - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) - Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]); - return Result; -} - -// Max comparison between 3 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMax -( - T x, const detail::tvec2& a, - T y, const detail::tvec2& b, - T z, const detail::tvec2& c -) -{ - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) - Result[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]); - return Result; -} - -// Max comparison between 3 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMax -( - T x, const detail::tvec3& a, - T y, const detail::tvec3& b, - T z, const detail::tvec3& c -) -{ - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) - Result[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]); - return Result; -} - -// Max comparison between 3 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMax -( - T x, const detail::tvec4& a, - T y, const detail::tvec4& b, - T z, const detail::tvec4& c -) -{ - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) - Result[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]); - return Result; -} - -// Max comparison between 3 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMax -( - const detail::tvec2& x, U a, - const detail::tvec2& y, U b, - const detail::tvec2& z, U c -) -{ - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) - Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c); - return Result; -} - -// Max comparison between 3 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMax -( - const detail::tvec3& x, U a, - const detail::tvec3& y, U b, - const detail::tvec3& z, U c -) -{ - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) - Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c); - return Result; -} - -// Max comparison between 3 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMax -( - const detail::tvec4& x, U a, - const detail::tvec4& y, U b, - const detail::tvec4& z, U c -) -{ - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) - Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c); - return Result; -} - -// Max comparison between 4 variables -template -GLM_FUNC_QUALIFIER U associatedMax -( - T x, U a, - T y, U b, - T z, U c, - T w, U d -) -{ - T Test1 = max(x, y); - T Test2 = max(z, w);; - U Result1 = x > y ? a : b; - U Result2 = z > w ? c : d; - U Result = Test1 > Test2 ? Result1 : Result2; - return Result; -} - -// Max comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMax -( - const detail::tvec2& x, const detail::tvec2& a, - const detail::tvec2& y, const detail::tvec2& b, - const detail::tvec2& z, const detail::tvec2& c, - const detail::tvec2& w, const detail::tvec2& d -) -{ - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) - { - T Test1 = max(x[i], y[i]); - T Test2 = max(z[i], w[i]); - U Result1 = x[i] > y[i] ? a[i] : b[i]; - U Result2 = z[i] > w[i] ? c[i] : d[i]; - Result[i] = Test1 > Test2 ? Result1 : Result2; - } - return Result; -} - -// Max comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMax -( - const detail::tvec3& x, const detail::tvec3& a, - const detail::tvec3& y, const detail::tvec3& b, - const detail::tvec3& z, const detail::tvec3& c, - const detail::tvec3& w, const detail::tvec3& d -) -{ - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) - { - T Test1 = max(x[i], y[i]); - T Test2 = max(z[i], w[i]); - U Result1 = x[i] > y[i] ? a[i] : b[i]; - U Result2 = z[i] > w[i] ? c[i] : d[i]; - Result[i] = Test1 > Test2 ? Result1 : Result2; - } - return Result; -} - -// Max comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMax -( - const detail::tvec4& x, const detail::tvec4& a, - const detail::tvec4& y, const detail::tvec4& b, - const detail::tvec4& z, const detail::tvec4& c, - const detail::tvec4& w, const detail::tvec4& d -) -{ - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) - { - T Test1 = max(x[i], y[i]); - T Test2 = max(z[i], w[i]); - U Result1 = x[i] > y[i] ? a[i] : b[i]; - U Result2 = z[i] > w[i] ? c[i] : d[i]; - Result[i] = Test1 > Test2 ? Result1 : Result2; - } - return Result; -} - -// Max comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMax -( - T x, const detail::tvec2& a, - T y, const detail::tvec2& b, - T z, const detail::tvec2& c, - T w, const detail::tvec2& d -) -{ - T Test1 = max(x, y); - T Test2 = max(z, w); - - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) - { - U Result1 = x > y ? a[i] : b[i]; - U Result2 = z > w ? c[i] : d[i]; - Result[i] = Test1 > Test2 ? Result1 : Result2; - } - return Result; -} - -// Max comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMax -( - T x, const detail::tvec3& a, - T y, const detail::tvec3& b, - T z, const detail::tvec3& c, - T w, const detail::tvec3& d -) -{ - T Test1 = max(x, y); - T Test2 = max(z, w); - - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) - { - U Result1 = x > y ? a[i] : b[i]; - U Result2 = z > w ? c[i] : d[i]; - Result[i] = Test1 > Test2 ? Result1 : Result2; - } - return Result; -} - -// Max comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMax -( - T x, const detail::tvec4& a, - T y, const detail::tvec4& b, - T z, const detail::tvec4& c, - T w, const detail::tvec4& d -) -{ - T Test1 = max(x, y); - T Test2 = max(z, w); - - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) - { - U Result1 = x > y ? a[i] : b[i]; - U Result2 = z > w ? c[i] : d[i]; - Result[i] = Test1 > Test2 ? Result1 : Result2; - } - return Result; -} - -// Max comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec2 associatedMax -( - const detail::tvec2& x, U a, - const detail::tvec2& y, U b, - const detail::tvec2& z, U c, - const detail::tvec2& w, U d -) -{ - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) - { - T Test1 = max(x[i], y[i]); - T Test2 = max(z[i], w[i]);; - U Result1 = x[i] > y[i] ? a : b; - U Result2 = z[i] > w[i] ? c : d; - Result[i] = Test1 > Test2 ? Result1 : Result2; - } - return Result; -} - -// Max comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec3 associatedMax -( - const detail::tvec3& x, U a, - const detail::tvec3& y, U b, - const detail::tvec3& z, U c, - const detail::tvec3& w, U d -) -{ - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) - { - T Test1 = max(x[i], y[i]); - T Test2 = max(z[i], w[i]);; - U Result1 = x[i] > y[i] ? a : b; - U Result2 = z[i] > w[i] ? c : d; - Result[i] = Test1 > Test2 ? Result1 : Result2; - } - return Result; -} - -// Max comparison between 4 variables -template -GLM_FUNC_QUALIFIER detail::tvec4 associatedMax -( - const detail::tvec4& x, U a, - const detail::tvec4& y, U b, - const detail::tvec4& z, U c, - const detail::tvec4& w, U d -) -{ - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) - { - T Test1 = max(x[i], y[i]); - T Test2 = max(z[i], w[i]);; - U Result1 = x[i] > y[i] ? a : b; - U Result2 = z[i] > w[i] ? c : d; - Result[i] = Test1 > Test2 ? Result1 : Result2; - } - return Result; -} - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-03-10 +// Updated : 2008-03-15 +// Licence : This source is under MIT License +// File : gtx_associated_min_max.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ + +// Min comparison between 2 variables +template +GLM_FUNC_QUALIFIER U associatedMin(T x, U a, T y, U b) +{ + return x < y ? a : b; +} + +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMin +( + const detail::tvec2& x, const detail::tvec2& a, + const detail::tvec2& y, const detail::tvec2& b +) +{ + detail::tvec2 Result; + //Result.x = x[0] < y[0] ? a[0] : b[0]; + //Result.y = x[1] < y[1] ? a[1] : b[1]; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + Result[i] = x[i] < y[i] ? a[i] : b[i]; + return Result; +} + +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMin +( + const detail::tvec3& x, const detail::tvec3& a, + const detail::tvec3& y, const detail::tvec3& b +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + Result[i] = x[i] < y[i] ? a[i] : b[i]; + return Result; +} + +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMin +( + const detail::tvec4& x, const detail::tvec4& a, + const detail::tvec4& y, const detail::tvec4& b +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + Result[i] = x[i] < y[i] ? a[i] : b[i]; + return Result; +} + +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMin +( + T x, const detail::tvec2& a, + T y, const detail::tvec2& b +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + Result[i] = x < y ? a[i] : b[i]; + return Result; +} + +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMin +( + T x, const detail::tvec3& a, + T y, const detail::tvec3& b +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + Result[i] = x < y ? a[i] : b[i]; + return Result; +} + +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMin +( + T x, const detail::tvec4& a, + T y, const detail::tvec4& b +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + Result[i] = x < y ? a[i] : b[i]; + return Result; +} + +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMin +( + const detail::tvec2& x, U a, + const detail::tvec2& y, U b +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + Result[i] = x[i] < y[i] ? a : b; + return Result; +} + +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMin +( + const detail::tvec3& x, U a, + const detail::tvec3& y, U b +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + Result[i] = x[i] < y[i] ? a : b; + return Result; +} + +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMin +( + const detail::tvec4& x, U a, + const detail::tvec4& y, U b +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + Result[i] = x[i] < y[i] ? a : b; + return Result; +} + +// Min comparison between 3 variables +template +GLM_FUNC_QUALIFIER U associatedMin +( + T x, U a, + T y, U b, + T z, U c +) +{ + U Result = x < y ? (x < z ? a : c) : (y < z ? b : c); + return Result; +} + +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMin +( + const detail::tvec2& x, const detail::tvec2& a, + const detail::tvec2& y, const detail::tvec2& b, + const detail::tvec2& z, const detail::tvec2& c +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + Result[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]); + return Result; +} + +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMin +( + const detail::tvec3& x, const detail::tvec3& a, + const detail::tvec3& y, const detail::tvec3& b, + const detail::tvec3& z, const detail::tvec3& c +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + Result[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]); + return Result; +} + +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMin +( + const detail::tvec4& x, const detail::tvec4& a, + const detail::tvec4& y, const detail::tvec4& b, + const detail::tvec4& z, const detail::tvec4& c +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + Result[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]); + return Result; +} + +// Min comparison between 4 variables +template +GLM_FUNC_QUALIFIER U associatedMin +( + T x, U a, + T y, U b, + T z, U c, + T w, U d +) +{ + T Test1 = min(x, y); + T Test2 = min(z, w);; + U Result1 = x < y ? a : b; + U Result2 = z < w ? c : d; + U Result = Test1 < Test2 ? Result1 : Result2; + return Result; +} + +// Min comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMin +( + const detail::tvec2& x, const detail::tvec2& a, + const detail::tvec2& y, const detail::tvec2& b, + const detail::tvec2& z, const detail::tvec2& c, + const detail::tvec2& w, const detail::tvec2& d +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + { + T Test1 = min(x[i], y[i]); + T Test2 = min(z[i], w[i]); + U Result1 = x[i] < y[i] ? a[i] : b[i]; + U Result2 = z[i] < w[i] ? c[i] : d[i]; + Result[i] = Test1 < Test2 ? Result1 : Result2; + } + return Result; +} + +// Min comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMin +( + const detail::tvec3& x, const detail::tvec3& a, + const detail::tvec3& y, const detail::tvec3& b, + const detail::tvec3& z, const detail::tvec3& c, + const detail::tvec3& w, const detail::tvec3& d +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + { + T Test1 = min(x[i], y[i]); + T Test2 = min(z[i], w[i]); + U Result1 = x[i] < y[i] ? a[i] : b[i]; + U Result2 = z[i] < w[i] ? c[i] : d[i]; + Result[i] = Test1 < Test2 ? Result1 : Result2; + } + return Result; +} + +// Min comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMin +( + const detail::tvec4& x, const detail::tvec4& a, + const detail::tvec4& y, const detail::tvec4& b, + const detail::tvec4& z, const detail::tvec4& c, + const detail::tvec4& w, const detail::tvec4& d +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + { + T Test1 = min(x[i], y[i]); + T Test2 = min(z[i], w[i]); + U Result1 = x[i] < y[i] ? a[i] : b[i]; + U Result2 = z[i] < w[i] ? c[i] : d[i]; + Result[i] = Test1 < Test2 ? Result1 : Result2; + } + return Result; +} + +// Min comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMin +( + T x, const detail::tvec2& a, + T y, const detail::tvec2& b, + T z, const detail::tvec2& c, + T w, const detail::tvec2& d +) +{ + T Test1 = min(x, y); + T Test2 = min(z, w); + + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + { + U Result1 = x < y ? a[i] : b[i]; + U Result2 = z < w ? c[i] : d[i]; + Result[i] = Test1 < Test2 ? Result1 : Result2; + } + return Result; +} + +// Min comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMin +( + T x, const detail::tvec3& a, + T y, const detail::tvec3& b, + T z, const detail::tvec3& c, + T w, const detail::tvec3& d +) +{ + T Test1 = min(x, y); + T Test2 = min(z, w); + + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + { + U Result1 = x < y ? a[i] : b[i]; + U Result2 = z < w ? c[i] : d[i]; + Result[i] = Test1 < Test2 ? Result1 : Result2; + } + return Result; +} + +// Min comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMin +( + T x, const detail::tvec4& a, + T y, const detail::tvec4& b, + T z, const detail::tvec4& c, + T w, const detail::tvec4& d +) +{ + T Test1 = min(x, y); + T Test2 = min(z, w); + + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + { + U Result1 = x < y ? a[i] : b[i]; + U Result2 = z < w ? c[i] : d[i]; + Result[i] = Test1 < Test2 ? Result1 : Result2; + } + return Result; +} + +// Min comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMin +( + const detail::tvec2& x, U a, + const detail::tvec2& y, U b, + const detail::tvec2& z, U c, + const detail::tvec2& w, U d +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + { + T Test1 = min(x[i], y[i]); + T Test2 = min(z[i], w[i]);; + U Result1 = x[i] < y[i] ? a : b; + U Result2 = z[i] < w[i] ? c : d; + Result[i] = Test1 < Test2 ? Result1 : Result2; + } + return Result; +} + +// Min comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMin +( + const detail::tvec3& x, U a, + const detail::tvec3& y, U b, + const detail::tvec3& z, U c, + const detail::tvec3& w, U d +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + { + T Test1 = min(x[i], y[i]); + T Test2 = min(z[i], w[i]);; + U Result1 = x[i] < y[i] ? a : b; + U Result2 = z[i] < w[i] ? c : d; + Result[i] = Test1 < Test2 ? Result1 : Result2; + } + return Result; +} + +// Min comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMin +( + const detail::tvec4& x, U a, + const detail::tvec4& y, U b, + const detail::tvec4& z, U c, + const detail::tvec4& w, U d +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + { + T Test1 = min(x[i], y[i]); + T Test2 = min(z[i], w[i]);; + U Result1 = x[i] < y[i] ? a : b; + U Result2 = z[i] < w[i] ? c : d; + Result[i] = Test1 < Test2 ? Result1 : Result2; + } + return Result; +} + +// Max comparison between 2 variables +template +GLM_FUNC_QUALIFIER U associatedMax(T x, U a, T y, U b) +{ + return x > y ? a : b; +} + +// Max comparison between 2 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +( + const detail::tvec2& x, const detail::tvec2& a, + const detail::tvec2& y, const detail::tvec2& b +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + Result[i] = x[i] > y[i] ? a[i] : b[i]; + return Result; +} + +// Max comparison between 2 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +( + const detail::tvec3& x, const detail::tvec3& a, + const detail::tvec3& y, const detail::tvec3& b +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + Result[i] = x[i] > y[i] ? a[i] : b[i]; + return Result; +} + +// Max comparison between 2 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +( + const detail::tvec4& x, const detail::tvec4& a, + const detail::tvec4& y, const detail::tvec4& b +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + Result[i] = x[i] > y[i] ? a[i] : b[i]; + return Result; +} + +// Max comparison between 2 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +( + T x, const detail::tvec2& a, + T y, const detail::tvec2& b +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + Result[i] = x > y ? a[i] : b[i]; + return Result; +} + +// Max comparison between 2 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +( + T x, const detail::tvec3& a, + T y, const detail::tvec3& b +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + Result[i] = x > y ? a[i] : b[i]; + return Result; +} + +// Max comparison between 2 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +( + T x, const detail::tvec4& a, + T y, const detail::tvec4& b +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + Result[i] = x > y ? a[i] : b[i]; + return Result; +} + +// Max comparison between 2 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +( + const detail::tvec2& x, U a, + const detail::tvec2& y, U b +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + Result[i] = x[i] > y[i] ? a : b; + return Result; +} + +// Max comparison between 2 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +( + const detail::tvec3& x, U a, + const detail::tvec3& y, U b +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + Result[i] = x[i] > y[i] ? a : b; + return Result; +} + +// Max comparison between 2 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +( + const detail::tvec4& x, U a, + const detail::tvec4& y, U b +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + Result[i] = x[i] > y[i] ? a : b; + return Result; +} + +// Max comparison between 3 variables +template +GLM_FUNC_QUALIFIER U associatedMax +( + T x, U a, + T y, U b, + T z, U c +) +{ + U Result = x > y ? (x > z ? a : c) : (y > z ? b : c); + return Result; +} + +// Max comparison between 3 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +( + const detail::tvec2& x, const detail::tvec2& a, + const detail::tvec2& y, const detail::tvec2& b, + const detail::tvec2& z, const detail::tvec2& c +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]); + return Result; +} + +// Max comparison between 3 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +( + const detail::tvec3& x, const detail::tvec3& a, + const detail::tvec3& y, const detail::tvec3& b, + const detail::tvec3& z, const detail::tvec3& c +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]); + return Result; +} + +// Max comparison between 3 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +( + const detail::tvec4& x, const detail::tvec4& a, + const detail::tvec4& y, const detail::tvec4& b, + const detail::tvec4& z, const detail::tvec4& c +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]); + return Result; +} + +// Max comparison between 3 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +( + T x, const detail::tvec2& a, + T y, const detail::tvec2& b, + T z, const detail::tvec2& c +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + Result[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]); + return Result; +} + +// Max comparison between 3 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +( + T x, const detail::tvec3& a, + T y, const detail::tvec3& b, + T z, const detail::tvec3& c +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + Result[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]); + return Result; +} + +// Max comparison between 3 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +( + T x, const detail::tvec4& a, + T y, const detail::tvec4& b, + T z, const detail::tvec4& c +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + Result[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]); + return Result; +} + +// Max comparison between 3 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +( + const detail::tvec2& x, U a, + const detail::tvec2& y, U b, + const detail::tvec2& z, U c +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c); + return Result; +} + +// Max comparison between 3 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +( + const detail::tvec3& x, U a, + const detail::tvec3& y, U b, + const detail::tvec3& z, U c +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c); + return Result; +} + +// Max comparison between 3 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +( + const detail::tvec4& x, U a, + const detail::tvec4& y, U b, + const detail::tvec4& z, U c +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + Result[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c); + return Result; +} + +// Max comparison between 4 variables +template +GLM_FUNC_QUALIFIER U associatedMax +( + T x, U a, + T y, U b, + T z, U c, + T w, U d +) +{ + T Test1 = max(x, y); + T Test2 = max(z, w);; + U Result1 = x > y ? a : b; + U Result2 = z > w ? c : d; + U Result = Test1 > Test2 ? Result1 : Result2; + return Result; +} + +// Max comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +( + const detail::tvec2& x, const detail::tvec2& a, + const detail::tvec2& y, const detail::tvec2& b, + const detail::tvec2& z, const detail::tvec2& c, + const detail::tvec2& w, const detail::tvec2& d +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + { + T Test1 = max(x[i], y[i]); + T Test2 = max(z[i], w[i]); + U Result1 = x[i] > y[i] ? a[i] : b[i]; + U Result2 = z[i] > w[i] ? c[i] : d[i]; + Result[i] = Test1 > Test2 ? Result1 : Result2; + } + return Result; +} + +// Max comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +( + const detail::tvec3& x, const detail::tvec3& a, + const detail::tvec3& y, const detail::tvec3& b, + const detail::tvec3& z, const detail::tvec3& c, + const detail::tvec3& w, const detail::tvec3& d +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + { + T Test1 = max(x[i], y[i]); + T Test2 = max(z[i], w[i]); + U Result1 = x[i] > y[i] ? a[i] : b[i]; + U Result2 = z[i] > w[i] ? c[i] : d[i]; + Result[i] = Test1 > Test2 ? Result1 : Result2; + } + return Result; +} + +// Max comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +( + const detail::tvec4& x, const detail::tvec4& a, + const detail::tvec4& y, const detail::tvec4& b, + const detail::tvec4& z, const detail::tvec4& c, + const detail::tvec4& w, const detail::tvec4& d +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + { + T Test1 = max(x[i], y[i]); + T Test2 = max(z[i], w[i]); + U Result1 = x[i] > y[i] ? a[i] : b[i]; + U Result2 = z[i] > w[i] ? c[i] : d[i]; + Result[i] = Test1 > Test2 ? Result1 : Result2; + } + return Result; +} + +// Max comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +( + T x, const detail::tvec2& a, + T y, const detail::tvec2& b, + T z, const detail::tvec2& c, + T w, const detail::tvec2& d +) +{ + T Test1 = max(x, y); + T Test2 = max(z, w); + + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size; ++i) + { + U Result1 = x > y ? a[i] : b[i]; + U Result2 = z > w ? c[i] : d[i]; + Result[i] = Test1 > Test2 ? Result1 : Result2; + } + return Result; +} + +// Max comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +( + T x, const detail::tvec3& a, + T y, const detail::tvec3& b, + T z, const detail::tvec3& c, + T w, const detail::tvec3& d +) +{ + T Test1 = max(x, y); + T Test2 = max(z, w); + + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size; ++i) + { + U Result1 = x > y ? a[i] : b[i]; + U Result2 = z > w ? c[i] : d[i]; + Result[i] = Test1 > Test2 ? Result1 : Result2; + } + return Result; +} + +// Max comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +( + T x, const detail::tvec4& a, + T y, const detail::tvec4& b, + T z, const detail::tvec4& c, + T w, const detail::tvec4& d +) +{ + T Test1 = max(x, y); + T Test2 = max(z, w); + + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size; ++i) + { + U Result1 = x > y ? a[i] : b[i]; + U Result2 = z > w ? c[i] : d[i]; + Result[i] = Test1 > Test2 ? Result1 : Result2; + } + return Result; +} + +// Max comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec2 associatedMax +( + const detail::tvec2& x, U a, + const detail::tvec2& y, U b, + const detail::tvec2& z, U c, + const detail::tvec2& w, U d +) +{ + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + { + T Test1 = max(x[i], y[i]); + T Test2 = max(z[i], w[i]);; + U Result1 = x[i] > y[i] ? a : b; + U Result2 = z[i] > w[i] ? c : d; + Result[i] = Test1 > Test2 ? Result1 : Result2; + } + return Result; +} + +// Max comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec3 associatedMax +( + const detail::tvec3& x, U a, + const detail::tvec3& y, U b, + const detail::tvec3& z, U c, + const detail::tvec3& w, U d +) +{ + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + { + T Test1 = max(x[i], y[i]); + T Test2 = max(z[i], w[i]);; + U Result1 = x[i] > y[i] ? a : b; + U Result2 = z[i] > w[i] ? c : d; + Result[i] = Test1 > Test2 ? Result1 : Result2; + } + return Result; +} + +// Max comparison between 4 variables +template +GLM_FUNC_QUALIFIER detail::tvec4 associatedMax +( + const detail::tvec4& x, U a, + const detail::tvec4& y, U b, + const detail::tvec4& z, U c, + const detail::tvec4& w, U d +) +{ + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + { + T Test1 = max(x[i], y[i]); + T Test2 = max(z[i], w[i]);; + U Result1 = x[i] > y[i] ? a : b; + U Result2 = z[i] > w[i] ? c : d; + Result[i] = Test1 > Test2 ? Result1 : Result2; + } + return Result; +} + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/bit.hpp b/include/gal/opengl/glm/gtx/bit.hpp index 510a4609a6..eee9d0c4ea 100644 --- a/include/gal/opengl/glm/gtx/bit.hpp +++ b/include/gal/opengl/glm/gtx/bit.hpp @@ -1,140 +1,140 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_bit -/// @file glm/gtx/bit.hpp -/// @date 2007-03-14 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtc_half_float (dependence) -/// -/// @defgroup gtx_bit GLM_GTX_bit -/// @ingroup gtx -/// -/// @brief Allow to perform bit operations on integer values -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_bit -#define GLM_GTX_bit GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtc/half_float.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_bit extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_bit - /// @{ - - /// Build a mask of 'count' bits - /// @see gtx_bit - template - genIType mask(genIType const & count); - - /// Component wise extraction of bit fields. - /// genType and genIType could be a scalar or a vector. - /// @see gtx_bit - template - GLM_DEPRECATED genIUType extractField( - genIUType const & v, - sizeType const & first, - sizeType const & count); - - //! Find the lowest bit set to 1 in a integer variable. - /// @see gtx_bit - template - GLM_DEPRECATED int lowestBit(genType const & value); - - //! Find the highest bit set to 1 in a integer variable. - /// @see gtx_bit - template - GLM_DEPRECATED int highestBit(genType const & value); - - //! Find the highest bit set to 1 in a integer variable and return its value. - /// @see gtx_bit - template - genType highestBitValue(genType const & value); - - //! Return true if the value is a power of two number. - /// @see gtx_bit - template - bool isPowerOfTwo(genType const & value); - - //! Return the power of two number which value is just higher the input value. - /// @see gtx_bit - template - genType powerOfTwoAbove(genType const & value); - - //! Return the power of two number which value is just lower the input value. - /// @see gtx_bit - template - genType powerOfTwoBelow(genType const & value); - - //! Return the power of two number which value is the closet to the input value. - /// @see gtx_bit - template - genType powerOfTwoNearest(genType const & value); - - //! Revert all bits of any integer based type. - /// @see gtx_bit - template - GLM_DEPRECATED genType bitRevert(genType const & value); - - //! Rotate all bits to the right. - /// @see gtx_bit - template - genType bitRotateRight(genType const & In, std::size_t Shift); - - //! Rotate all bits to the left. - /// @see gtx_bit - template - genType bitRotateLeft(genType const & In, std::size_t Shift); - - //! Set to 1 a range of bits. - /// @see gtx_bit - template - genIUType fillBitfieldWithOne( - genIUType const & Value, - int const & FromBit, - int const & ToBit); - - //! Set to 0 a range of bits. - /// @see gtx_bit - template - genIUType fillBitfieldWithZero( - genIUType const & Value, - int const & FromBit, - int const & ToBit); - - /// @} -} //namespace glm - -#include "bit.inl" - -#endif//GLM_GTX_bit +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_bit +/// @file glm/gtx/bit.hpp +/// @date 2007-03-14 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_half_float (dependence) +/// +/// @defgroup gtx_bit GLM_GTX_bit +/// @ingroup gtx +/// +/// @brief Allow to perform bit operations on integer values +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_bit +#define GLM_GTX_bit GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_bit extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_bit + /// @{ + + /// Build a mask of 'count' bits + /// @see gtx_bit + template + genIType mask(genIType const & count); + + /// Component wise extraction of bit fields. + /// genType and genIType could be a scalar or a vector. + /// @see gtx_bit + template + GLM_DEPRECATED genIUType extractField( + genIUType const & v, + sizeType const & first, + sizeType const & count); + + //! Find the lowest bit set to 1 in a integer variable. + /// @see gtx_bit + template + GLM_DEPRECATED int lowestBit(genType const & value); + + //! Find the highest bit set to 1 in a integer variable. + /// @see gtx_bit + template + GLM_DEPRECATED int highestBit(genType const & value); + + //! Find the highest bit set to 1 in a integer variable and return its value. + /// @see gtx_bit + template + genType highestBitValue(genType const & value); + + //! Return true if the value is a power of two number. + /// @see gtx_bit + template + bool isPowerOfTwo(genType const & value); + + //! Return the power of two number which value is just higher the input value. + /// @see gtx_bit + template + genType powerOfTwoAbove(genType const & value); + + //! Return the power of two number which value is just lower the input value. + /// @see gtx_bit + template + genType powerOfTwoBelow(genType const & value); + + //! Return the power of two number which value is the closet to the input value. + /// @see gtx_bit + template + genType powerOfTwoNearest(genType const & value); + + //! Revert all bits of any integer based type. + /// @see gtx_bit + template + GLM_DEPRECATED genType bitRevert(genType const & value); + + //! Rotate all bits to the right. + /// @see gtx_bit + template + genType bitRotateRight(genType const & In, std::size_t Shift); + + //! Rotate all bits to the left. + /// @see gtx_bit + template + genType bitRotateLeft(genType const & In, std::size_t Shift); + + //! Set to 1 a range of bits. + /// @see gtx_bit + template + genIUType fillBitfieldWithOne( + genIUType const & Value, + int const & FromBit, + int const & ToBit); + + //! Set to 0 a range of bits. + /// @see gtx_bit + template + genIUType fillBitfieldWithZero( + genIUType const & Value, + int const & FromBit, + int const & ToBit); + + /// @} +} //namespace glm + +#include "bit.inl" + +#endif//GLM_GTX_bit diff --git a/include/gal/opengl/glm/gtx/bit.inl b/include/gal/opengl/glm/gtx/bit.inl index 5dbd0b5697..d305c52d20 100644 --- a/include/gal/opengl/glm/gtx/bit.inl +++ b/include/gal/opengl/glm/gtx/bit.inl @@ -1,600 +1,600 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2007-03-14 -// Updated : 2008-11-14 -// Licence : This source is under MIT License -// File : glm/gtx/bit.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER genIType mask - ( - genIType const & count - ) - { - return ((genIType(1) << (count)) - genIType(1)); - } - - VECTORIZE_VEC(mask) - - // extractField - template - GLM_FUNC_QUALIFIER genIType extractField - ( - half const & value, - genIType const & first, - genIType const & count - ) - { - assert(first + count < sizeof(half)); - return (value._data() << first) >> ((sizeof(half) << 3) - count); - } - - template - GLM_FUNC_QUALIFIER genIType extractField - ( - float const & value, - genIType const & first, - genIType const & count - ) - { - assert(first + count < sizeof(float)); - return (detail::uif32(value).i << first) >> ((sizeof(float) << 3) - count); - } - - template - GLM_FUNC_QUALIFIER genIType extractField - ( - double const & value, - genIType const & first, - genIType const & count - ) - { - assert(first + count < sizeof(double)); - return (detail::uif64(value).i << first) >> ((sizeof(double) << genIType(3)) - count); - } - - template - GLM_FUNC_QUALIFIER genIUType extractField - ( - genIUType const & Value, - sizeType const & First, - sizeType const & Count - ) - { - sizeType GenSize = sizeof(genIUType) << 3; - - assert(First + Count <= GenSize); - - genIUType ShiftLeft = Count ? Value << (GenSize - (Count + First)) : 0; - genIUType ShiftBack = ShiftLeft >> genIUType(GenSize - Count); - - return ShiftBack; - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 extractField - ( - detail::tvec2 const & value, - sizeType const & first, - sizeType const & count - ) - { - return detail::tvec2( - extractField(value[0], first, count), - extractField(value[1], first, count)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 extractField - ( - detail::tvec3 const & value, - sizeType const & first, - sizeType const & count - ) - { - return detail::tvec3( - extractField(value[0], first, count), - extractField(value[1], first, count), - extractField(value[2], first, count)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 extractField - ( - detail::tvec4 const & value, - sizeType const & first, - sizeType const & count - ) - { - return detail::tvec4( - extractField(value[0], first, count), - extractField(value[1], first, count), - extractField(value[2], first, count), - extractField(value[3], first, count)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 extractField - ( - detail::tvec2 const & value, - detail::tvec2 const & first, - detail::tvec2 const & count - ) - { - return detail::tvec2( - extractField(value[0], first[0], count[0]), - extractField(value[1], first[1], count[1])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 extractField - ( - detail::tvec3 const & value, - detail::tvec3 const & first, - detail::tvec3 const & count - ) - { - return detail::tvec3( - extractField(value[0], first[0], count[0]), - extractField(value[1], first[1], count[1]), - extractField(value[2], first[2], count[2])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 extractField - ( - detail::tvec4 const & value, - detail::tvec4 const & first, - detail::tvec4 const & count - ) - { - return detail::tvec4( - extractField(value[0], first[0], count[0]), - extractField(value[1], first[1], count[1]), - extractField(value[2], first[2], count[2]), - extractField(value[3], first[3], count[3])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 extractField - ( - genIUType const & value, - detail::tvec2 const & first, - detail::tvec2 const & count - ) - { - return detail::tvec2( - extractField(value, first[0], count[0]), - extractField(value, first[1], count[1])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 extractField - ( - genIUType const & value, - detail::tvec3 const & first, - detail::tvec3 const & count - ) - { - return detail::tvec3( - extractField(value, first[0], count[0]), - extractField(value, first[1], count[1]), - extractField(value, first[2], count[2])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 extractField - ( - genIUType const & value, - detail::tvec4 const & first, - detail::tvec4 const & count - ) - { - return detail::tvec4( - extractField(value, first[0], count[0]), - extractField(value, first[1], count[1]), - extractField(value, first[2], count[2]), - extractField(value, first[3], count[3])); - } - - // lowestBit - template - GLM_FUNC_QUALIFIER int lowestBit - ( - genType const & Value - ) - { - assert(Value != genType(0)); // not valid call - - genType Bit; - for(Bit = genType(0); !(Value & (1 << Bit)); ++Bit){} - return Bit; - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 lowestBit - ( - detail::tvec2 const & value - ) - { - return detail::tvec2( - lowestBit(value[0]), - lowestBit(value[1])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 lowestBit - ( - detail::tvec3 const & value - ) - { - return detail::tvec3( - lowestBit(value[0]), - lowestBit(value[1]), - lowestBit(value[2])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 lowestBit - ( - detail::tvec4 const & value - ) - { - return detail::tvec4( - lowestBit(value[0]), - lowestBit(value[1]), - lowestBit(value[2]), - lowestBit(value[3])); - } - - // highestBit - template - GLM_FUNC_QUALIFIER int highestBit - ( - genType const & value - ) - { - assert(value != genType(0)); // not valid call - - genType bit = genType(-1); - for(genType tmp = value; tmp; tmp >>= 1, ++bit){} - return bit; - } - - //template <> - //GLM_FUNC_QUALIFIER int highestBit - //( - // int value - //) - //{ - // int bit = -1; - // for(int tmp = value; tmp; tmp >>= 1, ++bit); - // return bit; - //} - - template - GLM_FUNC_QUALIFIER detail::tvec2 highestBit - ( - detail::tvec2 const & value - ) - { - return detail::tvec2( - highestBit(value[0]), - highestBit(value[1])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 highestBit - ( - detail::tvec3 const & value - ) - { - return detail::tvec3( - highestBit(value[0]), - highestBit(value[1]), - highestBit(value[2])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 highestBit - ( - detail::tvec4 const & value - ) - { - return detail::tvec4( - highestBit(value[0]), - highestBit(value[1]), - highestBit(value[2]), - highestBit(value[3])); - } - - // highestBitValue - template - GLM_FUNC_QUALIFIER genType highestBitValue - ( - genType const & value - ) - { - genType tmp = value; - genType result = genType(0); - while(tmp) - { - result = (tmp & (~tmp + 1)); // grab lowest bit - tmp &= ~result; // clear lowest bit - } - return result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 highestBitValue - ( - detail::tvec2 const & value - ) - { - return detail::tvec2( - highestBitValue(value[0]), - highestBitValue(value[1])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 highestBitValue - ( - detail::tvec3 const & value - ) - { - return detail::tvec3( - highestBitValue(value[0]), - highestBitValue(value[1]), - highestBitValue(value[2])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 highestBitValue - ( - detail::tvec4 const & value - ) - { - return detail::tvec4( - highestBitValue(value[0]), - highestBitValue(value[1]), - highestBitValue(value[2]), - highestBitValue(value[3])); - } - - // isPowerOfTwo - template - GLM_FUNC_QUALIFIER bool isPowerOfTwo(genType const & Value) - { - //detail::If::is_signed>::apply(abs, Value); - //return !(Value & (Value - 1)); - - // For old complier? - genType Result = Value; - if(std::numeric_limits::is_signed) - Result = abs(Result); - return !(Result & (Result - 1)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 isPowerOfTwo - ( - detail::tvec2 const & value - ) - { - return detail::tvec2( - isPowerOfTwo(value[0]), - isPowerOfTwo(value[1])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 isPowerOfTwo - ( - detail::tvec3 const & value - ) - { - return detail::tvec3( - isPowerOfTwo(value[0]), - isPowerOfTwo(value[1]), - isPowerOfTwo(value[2])); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 isPowerOfTwo - ( - detail::tvec4 const & value - ) - { - return detail::tvec4( - isPowerOfTwo(value[0]), - isPowerOfTwo(value[1]), - isPowerOfTwo(value[2]), - isPowerOfTwo(value[3])); - } - - // powerOfTwoAbove - template - GLM_FUNC_QUALIFIER genType powerOfTwoAbove(genType const & value) - { - return isPowerOfTwo(value) ? value : highestBitValue(value) << 1; - } - - VECTORIZE_VEC(powerOfTwoAbove) - - // powerOfTwoBelow - template - GLM_FUNC_QUALIFIER genType powerOfTwoBelow - ( - genType const & value - ) - { - return isPowerOfTwo(value) ? value : highestBitValue(value); - } - - VECTORIZE_VEC(powerOfTwoBelow) - - // powerOfTwoNearest - template - GLM_FUNC_QUALIFIER genType powerOfTwoNearest - ( - genType const & value - ) - { - if(isPowerOfTwo(value)) - return value; - - genType prev = highestBitValue(value); - genType next = prev << 1; - return (next - value) < (value - prev) ? next : prev; - } - - VECTORIZE_VEC(powerOfTwoNearest) - - template - GLM_FUNC_QUALIFIER genType bitRevert(genType const & In) - { - GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitRevert' only accept integer values"); - - genType Out = 0; - std::size_t BitSize = sizeof(genType) * 8; - for(std::size_t i = 0; i < BitSize; ++i) - if(In & (genType(1) << i)) - Out |= genType(1) << (BitSize - 1 - i); - return Out; - } - - VECTORIZE_VEC(bitRevert) - - template - GLM_FUNC_QUALIFIER genType bitRotateRight(genType const & In, std::size_t Shift) - { - GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitRotateRight' only accept integer values"); - - std::size_t BitSize = sizeof(genType) * 8; - return (In << Shift) | (In >> (BitSize - Shift)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 bitRotateRight - ( - detail::tvec2 const & Value, - std::size_t Shift - ) - { - return detail::tvec2( - bitRotateRight(Value[0], Shift), - bitRotateRight(Value[1], Shift)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 bitRotateRight - ( - detail::tvec3 const & Value, - std::size_t Shift - ) - { - return detail::tvec3( - bitRotateRight(Value[0], Shift), - bitRotateRight(Value[1], Shift), - bitRotateRight(Value[2], Shift)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 bitRotateRight - ( - detail::tvec4 const & Value, - std::size_t Shift - ) - { - return detail::tvec4( - bitRotateRight(Value[0], Shift), - bitRotateRight(Value[1], Shift), - bitRotateRight(Value[2], Shift), - bitRotateRight(Value[3], Shift)); - } - - template - GLM_FUNC_QUALIFIER genType bitRotateLeft(genType const & In, std::size_t Shift) - { - GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitRotateLeft' only accept integer values"); - - std::size_t BitSize = sizeof(genType) * 8; - return (In >> Shift) | (In << (BitSize - Shift)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 bitRotateLeft - ( - detail::tvec2 const & Value, - std::size_t Shift - ) - { - return detail::tvec2( - bitRotateLeft(Value[0], Shift), - bitRotateLeft(Value[1], Shift)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 bitRotateLeft - ( - detail::tvec3 const & Value, - std::size_t Shift - ) - { - return detail::tvec3( - bitRotateLeft(Value[0], Shift), - bitRotateLeft(Value[1], Shift), - bitRotateLeft(Value[2], Shift)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 bitRotateLeft - ( - detail::tvec4 const & Value, - std::size_t Shift - ) - { - return detail::tvec4( - bitRotateLeft(Value[0], Shift), - bitRotateLeft(Value[1], Shift), - bitRotateLeft(Value[2], Shift), - bitRotateLeft(Value[3], Shift)); - } - - template - GLM_FUNC_QUALIFIER genIUType fillBitfieldWithOne - ( - genIUType const & Value, - int const & FromBit, - int const & ToBit - ) - { - assert(FromBit <= ToBit); - assert(ToBit <= sizeof(genIUType) * std::size_t(8)); - - genIUType Result = Value; - for(std::size_t i = 0; i <= ToBit; ++i) - Result |= (1 << i); - return Result; - } - - template - GLM_FUNC_QUALIFIER genIUType fillBitfieldWithZero - ( - genIUType const & Value, - int const & FromBit, - int const & ToBit - ) - { - assert(FromBit <= ToBit); - assert(ToBit <= sizeof(genIUType) * std::size_t(8)); - - genIUType Result = Value; - for(std::size_t i = 0; i <= ToBit; ++i) - Result &= ~(1 << i); - return Result; - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-03-14 +// Updated : 2008-11-14 +// Licence : This source is under MIT License +// File : glm/gtx/bit.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER genIType mask + ( + genIType const & count + ) + { + return ((genIType(1) << (count)) - genIType(1)); + } + + VECTORIZE_VEC(mask) + + // extractField + template + GLM_FUNC_QUALIFIER genIType extractField + ( + half const & value, + genIType const & first, + genIType const & count + ) + { + assert(first + count < sizeof(half)); + return (value._data() << first) >> ((sizeof(half) << 3) - count); + } + + template + GLM_FUNC_QUALIFIER genIType extractField + ( + float const & value, + genIType const & first, + genIType const & count + ) + { + assert(first + count < sizeof(float)); + return (detail::uif32(value).i << first) >> ((sizeof(float) << 3) - count); + } + + template + GLM_FUNC_QUALIFIER genIType extractField + ( + double const & value, + genIType const & first, + genIType const & count + ) + { + assert(first + count < sizeof(double)); + return (detail::uif64(value).i << first) >> ((sizeof(double) << genIType(3)) - count); + } + + template + GLM_FUNC_QUALIFIER genIUType extractField + ( + genIUType const & Value, + sizeType const & First, + sizeType const & Count + ) + { + sizeType GenSize = sizeof(genIUType) << 3; + + assert(First + Count <= GenSize); + + genIUType ShiftLeft = Count ? Value << (GenSize - (Count + First)) : 0; + genIUType ShiftBack = ShiftLeft >> genIUType(GenSize - Count); + + return ShiftBack; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 extractField + ( + detail::tvec2 const & value, + sizeType const & first, + sizeType const & count + ) + { + return detail::tvec2( + extractField(value[0], first, count), + extractField(value[1], first, count)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 extractField + ( + detail::tvec3 const & value, + sizeType const & first, + sizeType const & count + ) + { + return detail::tvec3( + extractField(value[0], first, count), + extractField(value[1], first, count), + extractField(value[2], first, count)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 extractField + ( + detail::tvec4 const & value, + sizeType const & first, + sizeType const & count + ) + { + return detail::tvec4( + extractField(value[0], first, count), + extractField(value[1], first, count), + extractField(value[2], first, count), + extractField(value[3], first, count)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 extractField + ( + detail::tvec2 const & value, + detail::tvec2 const & first, + detail::tvec2 const & count + ) + { + return detail::tvec2( + extractField(value[0], first[0], count[0]), + extractField(value[1], first[1], count[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 extractField + ( + detail::tvec3 const & value, + detail::tvec3 const & first, + detail::tvec3 const & count + ) + { + return detail::tvec3( + extractField(value[0], first[0], count[0]), + extractField(value[1], first[1], count[1]), + extractField(value[2], first[2], count[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 extractField + ( + detail::tvec4 const & value, + detail::tvec4 const & first, + detail::tvec4 const & count + ) + { + return detail::tvec4( + extractField(value[0], first[0], count[0]), + extractField(value[1], first[1], count[1]), + extractField(value[2], first[2], count[2]), + extractField(value[3], first[3], count[3])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 extractField + ( + genIUType const & value, + detail::tvec2 const & first, + detail::tvec2 const & count + ) + { + return detail::tvec2( + extractField(value, first[0], count[0]), + extractField(value, first[1], count[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 extractField + ( + genIUType const & value, + detail::tvec3 const & first, + detail::tvec3 const & count + ) + { + return detail::tvec3( + extractField(value, first[0], count[0]), + extractField(value, first[1], count[1]), + extractField(value, first[2], count[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 extractField + ( + genIUType const & value, + detail::tvec4 const & first, + detail::tvec4 const & count + ) + { + return detail::tvec4( + extractField(value, first[0], count[0]), + extractField(value, first[1], count[1]), + extractField(value, first[2], count[2]), + extractField(value, first[3], count[3])); + } + + // lowestBit + template + GLM_FUNC_QUALIFIER int lowestBit + ( + genType const & Value + ) + { + assert(Value != genType(0)); // not valid call + + genType Bit; + for(Bit = genType(0); !(Value & (1 << Bit)); ++Bit){} + return Bit; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 lowestBit + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + lowestBit(value[0]), + lowestBit(value[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 lowestBit + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + lowestBit(value[0]), + lowestBit(value[1]), + lowestBit(value[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 lowestBit + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + lowestBit(value[0]), + lowestBit(value[1]), + lowestBit(value[2]), + lowestBit(value[3])); + } + + // highestBit + template + GLM_FUNC_QUALIFIER int highestBit + ( + genType const & value + ) + { + assert(value != genType(0)); // not valid call + + genType bit = genType(-1); + for(genType tmp = value; tmp; tmp >>= 1, ++bit){} + return bit; + } + + //template <> + //GLM_FUNC_QUALIFIER int highestBit + //( + // int value + //) + //{ + // int bit = -1; + // for(int tmp = value; tmp; tmp >>= 1, ++bit); + // return bit; + //} + + template + GLM_FUNC_QUALIFIER detail::tvec2 highestBit + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + highestBit(value[0]), + highestBit(value[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 highestBit + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + highestBit(value[0]), + highestBit(value[1]), + highestBit(value[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 highestBit + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + highestBit(value[0]), + highestBit(value[1]), + highestBit(value[2]), + highestBit(value[3])); + } + + // highestBitValue + template + GLM_FUNC_QUALIFIER genType highestBitValue + ( + genType const & value + ) + { + genType tmp = value; + genType result = genType(0); + while(tmp) + { + result = (tmp & (~tmp + 1)); // grab lowest bit + tmp &= ~result; // clear lowest bit + } + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 highestBitValue + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + highestBitValue(value[0]), + highestBitValue(value[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 highestBitValue + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + highestBitValue(value[0]), + highestBitValue(value[1]), + highestBitValue(value[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 highestBitValue + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + highestBitValue(value[0]), + highestBitValue(value[1]), + highestBitValue(value[2]), + highestBitValue(value[3])); + } + + // isPowerOfTwo + template + GLM_FUNC_QUALIFIER bool isPowerOfTwo(genType const & Value) + { + //detail::If::is_signed>::apply(abs, Value); + //return !(Value & (Value - 1)); + + // For old complier? + genType Result = Value; + if(std::numeric_limits::is_signed) + Result = abs(Result); + return !(Result & (Result - 1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 isPowerOfTwo + ( + detail::tvec2 const & value + ) + { + return detail::tvec2( + isPowerOfTwo(value[0]), + isPowerOfTwo(value[1])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 isPowerOfTwo + ( + detail::tvec3 const & value + ) + { + return detail::tvec3( + isPowerOfTwo(value[0]), + isPowerOfTwo(value[1]), + isPowerOfTwo(value[2])); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 isPowerOfTwo + ( + detail::tvec4 const & value + ) + { + return detail::tvec4( + isPowerOfTwo(value[0]), + isPowerOfTwo(value[1]), + isPowerOfTwo(value[2]), + isPowerOfTwo(value[3])); + } + + // powerOfTwoAbove + template + GLM_FUNC_QUALIFIER genType powerOfTwoAbove(genType const & value) + { + return isPowerOfTwo(value) ? value : highestBitValue(value) << 1; + } + + VECTORIZE_VEC(powerOfTwoAbove) + + // powerOfTwoBelow + template + GLM_FUNC_QUALIFIER genType powerOfTwoBelow + ( + genType const & value + ) + { + return isPowerOfTwo(value) ? value : highestBitValue(value); + } + + VECTORIZE_VEC(powerOfTwoBelow) + + // powerOfTwoNearest + template + GLM_FUNC_QUALIFIER genType powerOfTwoNearest + ( + genType const & value + ) + { + if(isPowerOfTwo(value)) + return value; + + genType prev = highestBitValue(value); + genType next = prev << 1; + return (next - value) < (value - prev) ? next : prev; + } + + VECTORIZE_VEC(powerOfTwoNearest) + + template + GLM_FUNC_QUALIFIER genType bitRevert(genType const & In) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitRevert' only accept integer values"); + + genType Out = 0; + std::size_t BitSize = sizeof(genType) * 8; + for(std::size_t i = 0; i < BitSize; ++i) + if(In & (genType(1) << i)) + Out |= genType(1) << (BitSize - 1 - i); + return Out; + } + + VECTORIZE_VEC(bitRevert) + + template + GLM_FUNC_QUALIFIER genType bitRotateRight(genType const & In, std::size_t Shift) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitRotateRight' only accept integer values"); + + std::size_t BitSize = sizeof(genType) * 8; + return (In << Shift) | (In >> (BitSize - Shift)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 bitRotateRight + ( + detail::tvec2 const & Value, + std::size_t Shift + ) + { + return detail::tvec2( + bitRotateRight(Value[0], Shift), + bitRotateRight(Value[1], Shift)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 bitRotateRight + ( + detail::tvec3 const & Value, + std::size_t Shift + ) + { + return detail::tvec3( + bitRotateRight(Value[0], Shift), + bitRotateRight(Value[1], Shift), + bitRotateRight(Value[2], Shift)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 bitRotateRight + ( + detail::tvec4 const & Value, + std::size_t Shift + ) + { + return detail::tvec4( + bitRotateRight(Value[0], Shift), + bitRotateRight(Value[1], Shift), + bitRotateRight(Value[2], Shift), + bitRotateRight(Value[3], Shift)); + } + + template + GLM_FUNC_QUALIFIER genType bitRotateLeft(genType const & In, std::size_t Shift) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_integer, "'bitRotateLeft' only accept integer values"); + + std::size_t BitSize = sizeof(genType) * 8; + return (In >> Shift) | (In << (BitSize - Shift)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 bitRotateLeft + ( + detail::tvec2 const & Value, + std::size_t Shift + ) + { + return detail::tvec2( + bitRotateLeft(Value[0], Shift), + bitRotateLeft(Value[1], Shift)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 bitRotateLeft + ( + detail::tvec3 const & Value, + std::size_t Shift + ) + { + return detail::tvec3( + bitRotateLeft(Value[0], Shift), + bitRotateLeft(Value[1], Shift), + bitRotateLeft(Value[2], Shift)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 bitRotateLeft + ( + detail::tvec4 const & Value, + std::size_t Shift + ) + { + return detail::tvec4( + bitRotateLeft(Value[0], Shift), + bitRotateLeft(Value[1], Shift), + bitRotateLeft(Value[2], Shift), + bitRotateLeft(Value[3], Shift)); + } + + template + GLM_FUNC_QUALIFIER genIUType fillBitfieldWithOne + ( + genIUType const & Value, + int const & FromBit, + int const & ToBit + ) + { + assert(FromBit <= ToBit); + assert(ToBit <= sizeof(genIUType) * std::size_t(8)); + + genIUType Result = Value; + for(std::size_t i = 0; i <= ToBit; ++i) + Result |= (1 << i); + return Result; + } + + template + GLM_FUNC_QUALIFIER genIUType fillBitfieldWithZero + ( + genIUType const & Value, + int const & FromBit, + int const & ToBit + ) + { + assert(FromBit <= ToBit); + assert(ToBit <= sizeof(genIUType) * std::size_t(8)); + + genIUType Result = Value; + for(std::size_t i = 0; i <= ToBit; ++i) + Result &= ~(1 << i); + return Result; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/closest_point.hpp b/include/gal/opengl/glm/gtx/closest_point.hpp index 491e173bec..0e98875974 100644 --- a/include/gal/opengl/glm/gtx/closest_point.hpp +++ b/include/gal/opengl/glm/gtx/closest_point.hpp @@ -1,66 +1,66 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_bit -/// @file glm/gtx/bit.hpp -/// @date 2005-12-30 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_closest_point GLM_GTX_closest_point -/// @ingroup gtx -/// -/// @brief Find the point on a straight line which is the closet of a point. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_closest_point -#define GLM_GTX_closest_point GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_closest_point extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_closest_point - /// @{ - - /// Find the point on a straight line which is the closet of a point. - /// @see gtx_closest_point - template - detail::tvec3 closestPointOnLine( - detail::tvec3 const & point, - detail::tvec3 const & a, - detail::tvec3 const & b); - - /// @} -}// namespace glm - -#include "closest_point.inl" - -#endif//GLM_GTX_closest_point +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_bit +/// @file glm/gtx/bit.hpp +/// @date 2005-12-30 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_closest_point GLM_GTX_closest_point +/// @ingroup gtx +/// +/// @brief Find the point on a straight line which is the closet of a point. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_closest_point +#define GLM_GTX_closest_point GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_closest_point extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_closest_point + /// @{ + + /// Find the point on a straight line which is the closet of a point. + /// @see gtx_closest_point + template + detail::tvec3 closestPointOnLine( + detail::tvec3 const & point, + detail::tvec3 const & a, + detail::tvec3 const & b); + + /// @} +}// namespace glm + +#include "closest_point.inl" + +#endif//GLM_GTX_closest_point diff --git a/include/gal/opengl/glm/gtx/closest_point.inl b/include/gal/opengl/glm/gtx/closest_point.inl index 3050973fb4..0f223b8c50 100644 --- a/include/gal/opengl/glm/gtx/closest_point.inl +++ b/include/gal/opengl/glm/gtx/closest_point.inl @@ -1,36 +1,36 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2005-12-30 -// Updated : 2008-10-05 -// Licence : This source is under MIT License -// File : glm/gtx/closest_point.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_gtx_closest_point -#define glm_gtx_closest_point - -namespace glm -{ - template - GLM_FUNC_QUALIFIER detail::tvec3 closestPointOnLine - ( - detail::tvec3 const & point, - detail::tvec3 const & a, - detail::tvec3 const & b - ) - { - valType LineLength = distance(a, b); - detail::tvec3 Vector = point - a; - detail::tvec3 LineDirection = (b - a) / LineLength; - - // Project Vector to LineDirection to get the distance of point from a - valType Distance = dot(Vector, LineDirection); - - if(Distance <= valType(0)) return a; - if(Distance >= LineLength) return b; - return a + LineDirection * Distance; - } -}//namespace glm - -#endif//glm_gtx_closest_point +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-30 +// Updated : 2008-10-05 +// Licence : This source is under MIT License +// File : glm/gtx/closest_point.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_gtx_closest_point +#define glm_gtx_closest_point + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tvec3 closestPointOnLine + ( + detail::tvec3 const & point, + detail::tvec3 const & a, + detail::tvec3 const & b + ) + { + valType LineLength = distance(a, b); + detail::tvec3 Vector = point - a; + detail::tvec3 LineDirection = (b - a) / LineLength; + + // Project Vector to LineDirection to get the distance of point from a + valType Distance = dot(Vector, LineDirection); + + if(Distance <= valType(0)) return a; + if(Distance >= LineLength) return b; + return a + LineDirection * Distance; + } +}//namespace glm + +#endif//glm_gtx_closest_point diff --git a/include/gal/opengl/glm/gtx/color_cast.hpp b/include/gal/opengl/glm/gtx/color_cast.hpp index 5650155334..37b1a7f9ca 100644 --- a/include/gal/opengl/glm/gtx/color_cast.hpp +++ b/include/gal/opengl/glm/gtx/color_cast.hpp @@ -1,124 +1,124 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_color_cast -/// @file glm/gtx/color_cast.hpp -/// @date 2007-06-21 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_number_precision (dependence) -/// -/// @defgroup gtx_color_cast GLM_GTX_color_cast -/// @ingroup gtx -/// -/// @brief Conversion between two color types. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_color_cast -#define GLM_GTX_color_cast GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtx/number_precision.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_color_cast extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_color_cast - /// @{ - - //! Conversion of a floating value into a 8bit unsigned int value. - /// @see gtx_color_cast - template uint8 u8channel_cast(valType a); - - /// Conversion of a floating value into a 16bit unsigned int value. - /// @see gtx_color_cast - template uint16 u16channel_cast(valType a); - - template uint32 u32_rgbx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint32 u32_xrgb_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint32 u32_bgrx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint32 u32_xbgr_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - - template uint32 u32_rgba_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint32 u32_argb_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint32 u32_bgra_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint32 u32_abgr_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - - template uint64 u64_rgbx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint64 u64_xrgb_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint64 u64_bgrx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint64 u64_xbgr_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - - template uint64 u64_rgba_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint64 u64_argb_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint64 u64_bgra_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template uint64 u64_abgr_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - - template f16 f16_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension) - - template f16vec3 f16_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template f16vec3 f16_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template f16vec3 f16_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template f16vec3 f16_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - - template f16vec4 f16_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template f16vec4 f16_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template f16vec4 f16_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template f16vec4 f16_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - - template f32 f32_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension) - - template f32vec3 f32_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template f32vec3 f32_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template f32vec3 f32_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template f32vec3 f32_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - - template f32vec4 f32_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template f32vec4 f32_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template f32vec4 f32_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template f32vec4 f32_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - - template f64 f64_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension) - - template f64vec3 f64_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template f64vec3 f64_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template f64vec3 f64_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template f64vec3 f64_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - - template f64vec4 f64_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template f64vec4 f64_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template f64vec4 f64_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template f64vec4 f64_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - - /// @} -}//namespace glm - -#include "color_cast.inl" - -#endif//GLM_GTX_color_cast +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_color_cast +/// @file glm/gtx/color_cast.hpp +/// @date 2007-06-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_number_precision (dependence) +/// +/// @defgroup gtx_color_cast GLM_GTX_color_cast +/// @ingroup gtx +/// +/// @brief Conversion between two color types. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_color_cast +#define GLM_GTX_color_cast GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtx/number_precision.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_color_cast extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_color_cast + /// @{ + + //! Conversion of a floating value into a 8bit unsigned int value. + /// @see gtx_color_cast + template uint8 u8channel_cast(valType a); + + /// Conversion of a floating value into a 16bit unsigned int value. + /// @see gtx_color_cast + template uint16 u16channel_cast(valType a); + + template uint32 u32_rgbx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint32 u32_xrgb_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint32 u32_bgrx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint32 u32_xbgr_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + + template uint32 u32_rgba_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint32 u32_argb_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint32 u32_bgra_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint32 u32_abgr_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + + template uint64 u64_rgbx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint64 u64_xrgb_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint64 u64_bgrx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint64 u64_xbgr_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + + template uint64 u64_rgba_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint64 u64_argb_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint64 u64_bgra_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template uint64 u64_abgr_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + + template f16 f16_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension) + + template f16vec3 f16_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template f16vec3 f16_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template f16vec3 f16_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template f16vec3 f16_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + + template f16vec4 f16_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template f16vec4 f16_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template f16vec4 f16_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template f16vec4 f16_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + + template f32 f32_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension) + + template f32vec3 f32_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template f32vec3 f32_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template f32vec3 f32_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template f32vec3 f32_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + + template f32vec4 f32_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template f32vec4 f32_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template f32vec4 f32_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template f32vec4 f32_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + + template f64 f64_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension) + + template f64vec3 f64_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template f64vec3 f64_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template f64vec3 f64_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template f64vec3 f64_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + + template f64vec4 f64_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template f64vec4 f64_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template f64vec4 f64_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template f64vec4 f64_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + + /// @} +}//namespace glm + +#include "color_cast.inl" + +#endif//GLM_GTX_color_cast diff --git a/include/gal/opengl/glm/gtx/color_cast.inl b/include/gal/opengl/glm/gtx/color_cast.inl index a3a2ce2ea7..00d5ed2d1f 100644 --- a/include/gal/opengl/glm/gtx/color_cast.inl +++ b/include/gal/opengl/glm/gtx/color_cast.inl @@ -1,733 +1,733 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2007-06-21 -// Updated : 2007-08-03 -// Licence : This source is under MIT License -// File : glm/gtx/color_cast.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER uint8 u8channel_cast(T a) - { - return static_cast(a * T(255)); - } - - template - GLM_FUNC_QUALIFIER uint16 u16channel_cast(T a) - { - return static_cast(a * T(65535)); - } - - template - GLM_FUNC_QUALIFIER uint32 u32_rgbx_cast(const detail::tvec3& c) - { - uint32 result = 0; - result += static_cast(c.x * detail::tvec3::value_type(255)) << 0; - result += static_cast(c.y * detail::tvec3::value_type(255)) << 8; - result += static_cast(c.z * detail::tvec3::value_type(255)) << 16; - return result; - } - - template - GLM_FUNC_QUALIFIER uint32 u32_xrgb_cast(const detail::tvec3& c) - { - uint32 result = 0; - result += static_cast(c.x * detail::tvec3::value_type(255)) << 8; - result += static_cast(c.y * detail::tvec3::value_type(255)) << 16; - result += static_cast(c.z * detail::tvec3::value_type(255)) << 24; - return result; - } - - template - GLM_FUNC_QUALIFIER uint32 u32_bgrx_cast(const detail::tvec3& c) - { - uint32 result = 0; - result += static_cast(c.x * detail::tvec3::value_type(255)) << 16; - result += static_cast(c.y * detail::tvec3::value_type(255)) << 8; - result += static_cast(c.z * detail::tvec3::value_type(255)) << 0; - return result; - } - - template - GLM_FUNC_QUALIFIER uint32 u32_xbgr_cast(const detail::tvec3& c) - { - uint32 result = 0; - result += static_cast(c.x * detail::tvec3::value_type(255)) << 24; - result += static_cast(c.y * detail::tvec3::value_type(255)) << 16; - result += static_cast(c.z * detail::tvec3::value_type(255)) << 8; - result += static_cast(c.w * detail::tvec3::value_type(255)) << 0; - return result; - } - - template - GLM_FUNC_QUALIFIER uint32 u32_rgba_cast(const detail::tvec4& c) - { - uint32 result = 0; - result += static_cast(c.x * detail::tvec4::value_type(255)) << 0; - result += static_cast(c.y * detail::tvec4::value_type(255)) << 8; - result += static_cast(c.z * detail::tvec4::value_type(255)) << 16; - result += static_cast(c.w * detail::tvec4::value_type(255)) << 24; - return result; - } - - template - GLM_FUNC_QUALIFIER uint32 u32_argb_cast(const detail::tvec4& c) - { - uint32 result = 0; - result += static_cast(c.x * detail::tvec4::value_type(255)) << 8; - result += static_cast(c.y * detail::tvec4::value_type(255)) << 16; - result += static_cast(c.z * detail::tvec4::value_type(255)) << 24; - result += static_cast(c.w * detail::tvec4::value_type(255)) << 0; - return result; - } - - template - GLM_FUNC_QUALIFIER uint32 u32_bgra_cast(const detail::tvec4& c) - { - uint32 result = 0; - result += static_cast(c.x * detail::tvec4::value_type(255)) << 16; - result += static_cast(c.y * detail::tvec4::value_type(255)) << 8; - result += static_cast(c.z * detail::tvec4::value_type(255)) << 0; - result += static_cast(c.w * detail::tvec4::value_type(255)) << 24; - return result; - } - - template - GLM_FUNC_QUALIFIER uint32 u32_abgr_cast(const detail::tvec4& c) - { - uint32 result = 0; - result += static_cast(c.x * detail::tvec4::value_type(255)) << 24; - result += static_cast(c.y * detail::tvec4::value_type(255)) << 16; - result += static_cast(c.z * detail::tvec4::value_type(255)) << 8; - result += static_cast(c.w * detail::tvec4::value_type(255)) << 0; - return result; - } - - template - GLM_FUNC_QUALIFIER uint64 u64_rgbx_cast(const detail::tvec3& c) - { - uint64 result = 0; - result += static_cast(c.x * detail::tvec3::value_type(65535)) << 0; - result += static_cast(c.y * detail::tvec3::value_type(65535)) << 16; - result += static_cast(c.z * detail::tvec3::value_type(65535)) << 32; - return result; - } - - template - GLM_FUNC_QUALIFIER uint64 u32_xrgb_cast(const detail::tvec3& c) - { - uint64 result = 0; - result += static_cast(c.x * detail::tvec3::value_type(65535)) << 16; - result += static_cast(c.y * detail::tvec3::value_type(65535)) << 32; - result += static_cast(c.z * detail::tvec3::value_type(65535)) << 48; - return result; - } - - template - GLM_FUNC_QUALIFIER uint64 u32_bgrx_cast(const detail::tvec3& c) - { - uint64 result = 0; - result += static_cast(c.x * detail::tvec3::value_type(65535)) << 32; - result += static_cast(c.y * detail::tvec3::value_type(65535)) << 16; - result += static_cast(c.z * detail::tvec3::value_type(65535)) << 0; - return result; - } - - template - GLM_FUNC_QUALIFIER uint64 u32_xbgr_cast(const detail::tvec3& c) - { - uint64 result = 0; - result += static_cast(c.x * detail::tvec3::value_type(65535)) << 48; - result += static_cast(c.y * detail::tvec3::value_type(65535)) << 32; - result += static_cast(c.z * detail::tvec3::value_type(65535)) << 16; - result += static_cast(c.w * detail::tvec3::value_type(65535)) << 0; - return result; - } - - template - GLM_FUNC_QUALIFIER uint64 u64_rgba_cast(const detail::tvec4& c) - { - uint64 result = 0; - result += static_cast(c.x * detail::tvec4::value_type(65535)) << 0; - result += static_cast(c.y * detail::tvec4::value_type(65535)) << 16; - result += static_cast(c.z * detail::tvec4::value_type(65535)) << 32; - result += static_cast(c.w * detail::tvec4::value_type(65535)) << 48; - return result; - } - - template - GLM_FUNC_QUALIFIER uint64 u64_argb_cast(const detail::tvec4& c) - { - uint64 result = 0; - result += static_cast(c.x * detail::tvec4::value_type(65535)) << 16; - result += static_cast(c.y * detail::tvec4::value_type(65535)) << 32; - result += static_cast(c.z * detail::tvec4::value_type(65535)) << 48; - result += static_cast(c.w * detail::tvec4::value_type(65535)) << 0; - return result; - } - - template - GLM_FUNC_QUALIFIER uint64 u64_bgra_cast(const detail::tvec4& c) - { - uint64 result = 0; - result += static_cast(c.x * detail::tvec4::value_type(65535)) << 32; - result += static_cast(c.y * detail::tvec4::value_type(65535)) << 16; - result += static_cast(c.z * detail::tvec4::value_type(65535)) << 0; - result += static_cast(c.w * detail::tvec4::value_type(65535)) << 48; - return result; - } - - template - GLM_FUNC_QUALIFIER uint64 u64_abgr_cast(const detail::tvec4& c) - { - uint64 result = 0; - result += static_cast(c.x * detail::tvec4::value_type(65535)) << 48; - result += static_cast(c.y * detail::tvec4::value_type(65535)) << 32; - result += static_cast(c.z * detail::tvec4::value_type(65535)) << 16; - result += static_cast(c.w * detail::tvec4::value_type(65535)) << 0; - return result; - } - - template <> - GLM_FUNC_QUALIFIER f16 f16_channel_cast(uint32 color) - { - return f16(static_cast(color >> 0) / static_cast(255)); - } - - template <> - GLM_FUNC_QUALIFIER f16vec3 f16_rgbx_cast(uint32 color) - { - f16vec3 result; - result.x = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); - result.y = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); - result.z = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER f16vec3 f16_xrgb_cast(uint32 color) - { - f16vec3 result; - result.x = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); - result.y = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); - result.z = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER f16vec3 f16_bgrx_cast(uint32 color) - { - f16vec3 result; - result.x = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); - result.y = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); - result.z = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER f16vec3 f16_xbgr_cast(uint32 color) - { - f16vec3 result; - result.x = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); - result.y = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); - result.z = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER f16vec4 f16_rgba_cast(uint32 color) - { - f16vec4 result; - result.x = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); - result.y = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); - result.z = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); - result.w = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER f16vec4 f16_argb_cast(uint32 color) - { - f16vec4 result; - result.x = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); - result.y = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); - result.z = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); - result.w = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER f16vec4 f16_bgra_cast(uint32 color) - { - f16vec4 result; - result.x = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); - result.y = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); - result.z = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); - result.w = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER f16vec4 f16_abgr_cast(uint32 color) - { - f16vec4 result; - result.x = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); - result.y = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); - result.z = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); - result.w = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER float f32_channel_cast(uint8 color) - { - return static_cast(color >> 0) / static_cast(255); - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f32_rgbx_cast(uint32 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 0) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 16) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f32_xrgb_cast(uint32 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 24) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f32_bgrx_cast(uint32 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 0) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f32_xbgr_cast(uint32 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 24) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 8) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f32_rgba_cast(uint32 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 0) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.w = static_cast((color >> 24) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f32_argb_cast(uint32 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 24) & 0xFF) / static_cast(255); - result.w = static_cast((color >> 0) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f32_bgra_cast(uint32 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 0) & 0xFF) / static_cast(255); - result.w = static_cast((color >> 24) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f32_abgr_cast(uint32 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 24) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.w = static_cast((color >> 0) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER double f64_channel_cast(uint8 color) - { - return static_cast(color >> 0) / static_cast(255); - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f64_rgbx_cast(uint32 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 0) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 16) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f64_xrgb_cast(uint32 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 24) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f64_bgrx_cast(uint32 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 0) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f64_xbgr_cast(uint32 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 24) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 8) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f64_rgba_cast(uint32 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 0) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.w = static_cast((color >> 24) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f64_argb_cast(uint32 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 24) & 0xFF) / static_cast(255); - result.w = static_cast((color >> 0) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f64_bgra_cast(uint32 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 0) & 0xFF) / static_cast(255); - result.w = static_cast((color >> 24) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f64_abgr_cast(uint32 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 24) & 0xFF) / static_cast(255); - result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); - result.z = static_cast((color >> 8) & 0xFF) / static_cast(255); - result.w = static_cast((color >> 0) & 0xFF) / static_cast(255); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::half f16_channel_cast(uint16 color) - { - return detail::half(static_cast(color >> 0) / static_cast(65535)); - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f16_rgbx_cast(uint64 color) - { - detail::tvec3 result; - result.x = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); - result.y = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); - result.z = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f16_xrgb_cast(uint64 color) - { - detail::tvec3 result; - result.x = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); - result.y = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); - result.z = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f16_bgrx_cast(uint64 color) - { - detail::tvec3 result; - result.x = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); - result.y = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); - result.z = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f16_xbgr_cast(uint64 color) - { - detail::tvec3 result; - result.x = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); - result.y = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); - result.z = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f16_rgba_cast(uint64 color) - { - detail::tvec4 result; - result.x = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); - result.y = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); - result.z = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); - result.w = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f16_argb_cast(uint64 color) - { - detail::tvec4 result; - result.x = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); - result.y = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); - result.z = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); - result.w = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f16_bgra_cast(uint64 color) - { - detail::tvec4 result; - result.x = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); - result.y = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); - result.z = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); - result.w = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f16_abgr_cast(uint64 color) - { - detail::tvec4 result; - result.x = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); - result.y = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); - result.z = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); - result.w = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); - return result; - } - - template <> - GLM_FUNC_QUALIFIER float f32_channel_cast(uint16 color) - { - return static_cast(color >> 0) / static_cast(65535); - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f32_rgbx_cast(uint64 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f32_xrgb_cast(uint64 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f32_bgrx_cast(uint64 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f32_xbgr_cast(uint64 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f32_rgba_cast(uint64 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.w = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f32_argb_cast(uint64 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - result.w = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f32_bgra_cast(uint64 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - result.w = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f32_abgr_cast(uint64 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.w = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER double f64_channel_cast(uint16 color) - { - return static_cast(color >> 0) / static_cast(65535); - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f64_rgbx_cast(uint64 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f64_xrgb_cast(uint64 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f64_bgrx_cast(uint64 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec3 f64_xbgr_cast(uint64 color) - { - detail::tvec3 result; - result.x = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f64_rgba_cast(uint64 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.w = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f64_argb_cast(uint64 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - result.w = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f64_bgra_cast(uint64 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - result.w = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - return result; - } - - template <> - GLM_FUNC_QUALIFIER detail::tvec4 f64_abgr_cast(uint64 color) - { - detail::tvec4 result; - result.x = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); - result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); - result.z = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); - result.w = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); - return result; - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-06-21 +// Updated : 2007-08-03 +// Licence : This source is under MIT License +// File : glm/gtx/color_cast.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER uint8 u8channel_cast(T a) + { + return static_cast(a * T(255)); + } + + template + GLM_FUNC_QUALIFIER uint16 u16channel_cast(T a) + { + return static_cast(a * T(65535)); + } + + template + GLM_FUNC_QUALIFIER uint32 u32_rgbx_cast(const detail::tvec3& c) + { + uint32 result = 0; + result += static_cast(c.x * detail::tvec3::value_type(255)) << 0; + result += static_cast(c.y * detail::tvec3::value_type(255)) << 8; + result += static_cast(c.z * detail::tvec3::value_type(255)) << 16; + return result; + } + + template + GLM_FUNC_QUALIFIER uint32 u32_xrgb_cast(const detail::tvec3& c) + { + uint32 result = 0; + result += static_cast(c.x * detail::tvec3::value_type(255)) << 8; + result += static_cast(c.y * detail::tvec3::value_type(255)) << 16; + result += static_cast(c.z * detail::tvec3::value_type(255)) << 24; + return result; + } + + template + GLM_FUNC_QUALIFIER uint32 u32_bgrx_cast(const detail::tvec3& c) + { + uint32 result = 0; + result += static_cast(c.x * detail::tvec3::value_type(255)) << 16; + result += static_cast(c.y * detail::tvec3::value_type(255)) << 8; + result += static_cast(c.z * detail::tvec3::value_type(255)) << 0; + return result; + } + + template + GLM_FUNC_QUALIFIER uint32 u32_xbgr_cast(const detail::tvec3& c) + { + uint32 result = 0; + result += static_cast(c.x * detail::tvec3::value_type(255)) << 24; + result += static_cast(c.y * detail::tvec3::value_type(255)) << 16; + result += static_cast(c.z * detail::tvec3::value_type(255)) << 8; + result += static_cast(c.w * detail::tvec3::value_type(255)) << 0; + return result; + } + + template + GLM_FUNC_QUALIFIER uint32 u32_rgba_cast(const detail::tvec4& c) + { + uint32 result = 0; + result += static_cast(c.x * detail::tvec4::value_type(255)) << 0; + result += static_cast(c.y * detail::tvec4::value_type(255)) << 8; + result += static_cast(c.z * detail::tvec4::value_type(255)) << 16; + result += static_cast(c.w * detail::tvec4::value_type(255)) << 24; + return result; + } + + template + GLM_FUNC_QUALIFIER uint32 u32_argb_cast(const detail::tvec4& c) + { + uint32 result = 0; + result += static_cast(c.x * detail::tvec4::value_type(255)) << 8; + result += static_cast(c.y * detail::tvec4::value_type(255)) << 16; + result += static_cast(c.z * detail::tvec4::value_type(255)) << 24; + result += static_cast(c.w * detail::tvec4::value_type(255)) << 0; + return result; + } + + template + GLM_FUNC_QUALIFIER uint32 u32_bgra_cast(const detail::tvec4& c) + { + uint32 result = 0; + result += static_cast(c.x * detail::tvec4::value_type(255)) << 16; + result += static_cast(c.y * detail::tvec4::value_type(255)) << 8; + result += static_cast(c.z * detail::tvec4::value_type(255)) << 0; + result += static_cast(c.w * detail::tvec4::value_type(255)) << 24; + return result; + } + + template + GLM_FUNC_QUALIFIER uint32 u32_abgr_cast(const detail::tvec4& c) + { + uint32 result = 0; + result += static_cast(c.x * detail::tvec4::value_type(255)) << 24; + result += static_cast(c.y * detail::tvec4::value_type(255)) << 16; + result += static_cast(c.z * detail::tvec4::value_type(255)) << 8; + result += static_cast(c.w * detail::tvec4::value_type(255)) << 0; + return result; + } + + template + GLM_FUNC_QUALIFIER uint64 u64_rgbx_cast(const detail::tvec3& c) + { + uint64 result = 0; + result += static_cast(c.x * detail::tvec3::value_type(65535)) << 0; + result += static_cast(c.y * detail::tvec3::value_type(65535)) << 16; + result += static_cast(c.z * detail::tvec3::value_type(65535)) << 32; + return result; + } + + template + GLM_FUNC_QUALIFIER uint64 u32_xrgb_cast(const detail::tvec3& c) + { + uint64 result = 0; + result += static_cast(c.x * detail::tvec3::value_type(65535)) << 16; + result += static_cast(c.y * detail::tvec3::value_type(65535)) << 32; + result += static_cast(c.z * detail::tvec3::value_type(65535)) << 48; + return result; + } + + template + GLM_FUNC_QUALIFIER uint64 u32_bgrx_cast(const detail::tvec3& c) + { + uint64 result = 0; + result += static_cast(c.x * detail::tvec3::value_type(65535)) << 32; + result += static_cast(c.y * detail::tvec3::value_type(65535)) << 16; + result += static_cast(c.z * detail::tvec3::value_type(65535)) << 0; + return result; + } + + template + GLM_FUNC_QUALIFIER uint64 u32_xbgr_cast(const detail::tvec3& c) + { + uint64 result = 0; + result += static_cast(c.x * detail::tvec3::value_type(65535)) << 48; + result += static_cast(c.y * detail::tvec3::value_type(65535)) << 32; + result += static_cast(c.z * detail::tvec3::value_type(65535)) << 16; + result += static_cast(c.w * detail::tvec3::value_type(65535)) << 0; + return result; + } + + template + GLM_FUNC_QUALIFIER uint64 u64_rgba_cast(const detail::tvec4& c) + { + uint64 result = 0; + result += static_cast(c.x * detail::tvec4::value_type(65535)) << 0; + result += static_cast(c.y * detail::tvec4::value_type(65535)) << 16; + result += static_cast(c.z * detail::tvec4::value_type(65535)) << 32; + result += static_cast(c.w * detail::tvec4::value_type(65535)) << 48; + return result; + } + + template + GLM_FUNC_QUALIFIER uint64 u64_argb_cast(const detail::tvec4& c) + { + uint64 result = 0; + result += static_cast(c.x * detail::tvec4::value_type(65535)) << 16; + result += static_cast(c.y * detail::tvec4::value_type(65535)) << 32; + result += static_cast(c.z * detail::tvec4::value_type(65535)) << 48; + result += static_cast(c.w * detail::tvec4::value_type(65535)) << 0; + return result; + } + + template + GLM_FUNC_QUALIFIER uint64 u64_bgra_cast(const detail::tvec4& c) + { + uint64 result = 0; + result += static_cast(c.x * detail::tvec4::value_type(65535)) << 32; + result += static_cast(c.y * detail::tvec4::value_type(65535)) << 16; + result += static_cast(c.z * detail::tvec4::value_type(65535)) << 0; + result += static_cast(c.w * detail::tvec4::value_type(65535)) << 48; + return result; + } + + template + GLM_FUNC_QUALIFIER uint64 u64_abgr_cast(const detail::tvec4& c) + { + uint64 result = 0; + result += static_cast(c.x * detail::tvec4::value_type(65535)) << 48; + result += static_cast(c.y * detail::tvec4::value_type(65535)) << 32; + result += static_cast(c.z * detail::tvec4::value_type(65535)) << 16; + result += static_cast(c.w * detail::tvec4::value_type(65535)) << 0; + return result; + } + + template <> + GLM_FUNC_QUALIFIER f16 f16_channel_cast(uint32 color) + { + return f16(static_cast(color >> 0) / static_cast(255)); + } + + template <> + GLM_FUNC_QUALIFIER f16vec3 f16_rgbx_cast(uint32 color) + { + f16vec3 result; + result.x = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); + result.y = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); + result.z = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER f16vec3 f16_xrgb_cast(uint32 color) + { + f16vec3 result; + result.x = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); + result.y = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); + result.z = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER f16vec3 f16_bgrx_cast(uint32 color) + { + f16vec3 result; + result.x = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); + result.y = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); + result.z = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER f16vec3 f16_xbgr_cast(uint32 color) + { + f16vec3 result; + result.x = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); + result.y = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); + result.z = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER f16vec4 f16_rgba_cast(uint32 color) + { + f16vec4 result; + result.x = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); + result.y = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); + result.z = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); + result.w = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER f16vec4 f16_argb_cast(uint32 color) + { + f16vec4 result; + result.x = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); + result.y = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); + result.z = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); + result.w = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER f16vec4 f16_bgra_cast(uint32 color) + { + f16vec4 result; + result.x = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); + result.y = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); + result.z = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); + result.w = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER f16vec4 f16_abgr_cast(uint32 color) + { + f16vec4 result; + result.x = f16(static_cast((color >> 24) & 0xFF) / static_cast(255)); + result.y = f16(static_cast((color >> 16) & 0xFF) / static_cast(255)); + result.z = f16(static_cast((color >> 8) & 0xFF) / static_cast(255)); + result.w = f16(static_cast((color >> 0) & 0xFF) / static_cast(255)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER float f32_channel_cast(uint8 color) + { + return static_cast(color >> 0) / static_cast(255); + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f32_rgbx_cast(uint32 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 0) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 16) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f32_xrgb_cast(uint32 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 24) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f32_bgrx_cast(uint32 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 0) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f32_xbgr_cast(uint32 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 24) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 8) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f32_rgba_cast(uint32 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 0) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.w = static_cast((color >> 24) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f32_argb_cast(uint32 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 24) & 0xFF) / static_cast(255); + result.w = static_cast((color >> 0) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f32_bgra_cast(uint32 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 0) & 0xFF) / static_cast(255); + result.w = static_cast((color >> 24) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f32_abgr_cast(uint32 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 24) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.w = static_cast((color >> 0) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER double f64_channel_cast(uint8 color) + { + return static_cast(color >> 0) / static_cast(255); + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f64_rgbx_cast(uint32 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 0) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 16) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f64_xrgb_cast(uint32 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 24) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f64_bgrx_cast(uint32 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 0) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f64_xbgr_cast(uint32 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 24) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 8) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f64_rgba_cast(uint32 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 0) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.w = static_cast((color >> 24) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f64_argb_cast(uint32 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 24) & 0xFF) / static_cast(255); + result.w = static_cast((color >> 0) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f64_bgra_cast(uint32 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 0) & 0xFF) / static_cast(255); + result.w = static_cast((color >> 24) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f64_abgr_cast(uint32 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 24) & 0xFF) / static_cast(255); + result.y = static_cast((color >> 16) & 0xFF) / static_cast(255); + result.z = static_cast((color >> 8) & 0xFF) / static_cast(255); + result.w = static_cast((color >> 0) & 0xFF) / static_cast(255); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::half f16_channel_cast(uint16 color) + { + return detail::half(static_cast(color >> 0) / static_cast(65535)); + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f16_rgbx_cast(uint64 color) + { + detail::tvec3 result; + result.x = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); + result.y = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); + result.z = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f16_xrgb_cast(uint64 color) + { + detail::tvec3 result; + result.x = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); + result.y = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); + result.z = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f16_bgrx_cast(uint64 color) + { + detail::tvec3 result; + result.x = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); + result.y = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); + result.z = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f16_xbgr_cast(uint64 color) + { + detail::tvec3 result; + result.x = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); + result.y = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); + result.z = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f16_rgba_cast(uint64 color) + { + detail::tvec4 result; + result.x = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); + result.y = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); + result.z = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); + result.w = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f16_argb_cast(uint64 color) + { + detail::tvec4 result; + result.x = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); + result.y = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); + result.z = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); + result.w = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f16_bgra_cast(uint64 color) + { + detail::tvec4 result; + result.x = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); + result.y = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); + result.z = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); + result.w = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f16_abgr_cast(uint64 color) + { + detail::tvec4 result; + result.x = detail::half(static_cast((color >> 48) & 0xFFFF) / static_cast(65535)); + result.y = detail::half(static_cast((color >> 32) & 0xFFFF) / static_cast(65535)); + result.z = detail::half(static_cast((color >> 16) & 0xFFFF) / static_cast(65535)); + result.w = detail::half(static_cast((color >> 0) & 0xFFFF) / static_cast(65535)); + return result; + } + + template <> + GLM_FUNC_QUALIFIER float f32_channel_cast(uint16 color) + { + return static_cast(color >> 0) / static_cast(65535); + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f32_rgbx_cast(uint64 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f32_xrgb_cast(uint64 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f32_bgrx_cast(uint64 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f32_xbgr_cast(uint64 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f32_rgba_cast(uint64 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.w = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f32_argb_cast(uint64 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + result.w = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f32_bgra_cast(uint64 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + result.w = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f32_abgr_cast(uint64 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.w = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER double f64_channel_cast(uint16 color) + { + return static_cast(color >> 0) / static_cast(65535); + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f64_rgbx_cast(uint64 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f64_xrgb_cast(uint64 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f64_bgrx_cast(uint64 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec3 f64_xbgr_cast(uint64 color) + { + detail::tvec3 result; + result.x = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f64_rgba_cast(uint64 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.w = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f64_argb_cast(uint64 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + result.w = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f64_bgra_cast(uint64 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + result.w = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + return result; + } + + template <> + GLM_FUNC_QUALIFIER detail::tvec4 f64_abgr_cast(uint64 color) + { + detail::tvec4 result; + result.x = static_cast((color >> 48) & 0xFFFF) / static_cast(65535); + result.y = static_cast((color >> 32) & 0xFFFF) / static_cast(65535); + result.z = static_cast((color >> 16) & 0xFFFF) / static_cast(65535); + result.w = static_cast((color >> 0) & 0xFFFF) / static_cast(65535); + return result; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/color_space.hpp b/include/gal/opengl/glm/gtx/color_space.hpp index 9c453ab442..ed1987aa00 100644 --- a/include/gal/opengl/glm/gtx/color_space.hpp +++ b/include/gal/opengl/glm/gtx/color_space.hpp @@ -1,96 +1,96 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_color_space -/// @file glm/gtx/color_space.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_color_space GLM_GTX_color_space -/// @ingroup gtx -/// -/// @brief Related to RGB to HSV conversions and operations. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_color_space -#define GLM_GTX_color_space GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_color_space extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_color_space - /// @{ - - /// Converts a color from HSV color space to its color in RGB color space. - /// @see gtx_color_space - template - detail::tvec3 rgbColor( - detail::tvec3 const & hsvValue); - - /// Converts a color from RGB color space to its color in HSV color space. - /// @see gtx_color_space - template - detail::tvec3 hsvColor( - detail::tvec3 const & rgbValue); - - /// Build a saturation matrix. - /// @see gtx_color_space - template - detail::tmat4x4 saturation( - valType const s); - - /// Modify the saturation of a color. - /// @see gtx_color_space - template - detail::tvec3 saturation( - valType const s, - detail::tvec3 const & color); - - /// Modify the saturation of a color. - /// @see gtx_color_space - template - detail::tvec4 saturation( - valType const s, - detail::tvec4 const & color); - - /// Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals. - /// @see gtx_color_space - template - valType luminosity( - detail::tvec3 const & color); - - /// @} -}//namespace glm - -#include "color_space.inl" - -#endif//GLM_GTX_color_space +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_color_space +/// @file glm/gtx/color_space.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_color_space GLM_GTX_color_space +/// @ingroup gtx +/// +/// @brief Related to RGB to HSV conversions and operations. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_color_space +#define GLM_GTX_color_space GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_color_space extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_color_space + /// @{ + + /// Converts a color from HSV color space to its color in RGB color space. + /// @see gtx_color_space + template + detail::tvec3 rgbColor( + detail::tvec3 const & hsvValue); + + /// Converts a color from RGB color space to its color in HSV color space. + /// @see gtx_color_space + template + detail::tvec3 hsvColor( + detail::tvec3 const & rgbValue); + + /// Build a saturation matrix. + /// @see gtx_color_space + template + detail::tmat4x4 saturation( + valType const s); + + /// Modify the saturation of a color. + /// @see gtx_color_space + template + detail::tvec3 saturation( + valType const s, + detail::tvec3 const & color); + + /// Modify the saturation of a color. + /// @see gtx_color_space + template + detail::tvec4 saturation( + valType const s, + detail::tvec4 const & color); + + /// Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals. + /// @see gtx_color_space + template + valType luminosity( + detail::tvec3 const & color); + + /// @} +}//namespace glm + +#include "color_space.inl" + +#endif//GLM_GTX_color_space diff --git a/include/gal/opengl/glm/gtx/color_space.inl b/include/gal/opengl/glm/gtx/color_space.inl index 892270573d..fb5a7ed95b 100644 --- a/include/gal/opengl/glm/gtx/color_space.inl +++ b/include/gal/opengl/glm/gtx/color_space.inl @@ -1,149 +1,149 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2005-12-21 -// Updated : 2007-02-22 -// Licence : This source is under MIT License -// File : glm/gtx/color_space.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER detail::tvec3 rgbColor(const detail::tvec3& hsvColor) - { - detail::tvec3 hsv = hsvColor; - detail::tvec3 rgbColor; - - if(hsv.y == T(0)) - // achromatic (grey) - rgbColor = detail::tvec3(hsv.z); - else - { - T sector = floor(hsv.x / T(60)); - T frac = (hsv.x / T(60)) - sector; - // factorial part of h - T o = hsv.z * (T(1) - hsv.y); - T p = hsv.z * (T(1) - hsv.y * frac); - T q = hsv.z * (T(1) - hsv.y * (T(1) - frac)); - - switch(int(sector)) - { - default: - case 0: - rgbColor.r = hsv.z; - rgbColor.g = q; - rgbColor.b = o; - break; - case 1: - rgbColor.r = p; - rgbColor.g = hsv.z; - rgbColor.b = o; - break; - case 2: - rgbColor.r = o; - rgbColor.g = hsv.z; - rgbColor.b = q; - break; - case 3: - rgbColor.r = o; - rgbColor.g = p; - rgbColor.b = hsv.z; - break; - case 4: - rgbColor.r = q; - rgbColor.g = o; - rgbColor.b = hsv.z; - break; - case 5: - rgbColor.r = hsv.z; - rgbColor.g = o; - rgbColor.b = p; - break; - } - } - - return rgbColor; - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 hsvColor(const detail::tvec3& rgbColor) - { - detail::tvec3 hsv = rgbColor; - float Min = min(min(rgbColor.r, rgbColor.g), rgbColor.b); - float Max = max(max(rgbColor.r, rgbColor.g), rgbColor.b); - float Delta = Max - Min; - - hsv.z = Max; - - if(Max != T(0)) - { - hsv.y = Delta / hsv.z; - T h = T(0); - - if(rgbColor.r == Max) - // between yellow & magenta - h = T(0) + T(60) * (rgbColor.g - rgbColor.b) / Delta; - else if(rgbColor.g == Max) - // between cyan & yellow - h = T(120) + T(60) * (rgbColor.b - rgbColor.r) / Delta; - else - // between magenta & cyan - h = T(240) + T(60) * (rgbColor.r - rgbColor.g) / Delta; - - if(h < T(0)) - hsv.x = h + T(360); - else - hsv.x = h; - } - else - { - // If r = g = b = 0 then s = 0, h is undefined - hsv.y = T(0); - hsv.x = T(0); - } - - return hsv; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 saturation(const T s) - { - detail::tvec3 rgbw = detail::tvec3(T(0.2126), T(0.7152), T(0.0722)); - - T col0 = (T(1) - s) * rgbw.r; - T col1 = (T(1) - s) * rgbw.g; - T col2 = (T(1) - s) * rgbw.b; - - detail::tmat4x4 result(T(1)); - result[0][0] = col0 + s; - result[0][1] = col0; - result[0][2] = col0; - result[1][0] = col1; - result[1][1] = col1 + s; - result[1][2] = col1; - result[2][0] = col2; - result[2][1] = col2; - result[2][2] = col2 + s; - return result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 saturation(const T s, const detail::tvec3& color) - { - return detail::tvec3(saturation(s) * detail::tvec4(color, T(0))); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 saturation(const T s, const detail::tvec4& color) - { - return saturation(s) * color; - } - - template - GLM_FUNC_QUALIFIER T luminosity(const detail::tvec3& color) - { - const detail::tvec3 tmp = detail::tvec3(0.33, 0.59, 0.11); - return dot(color, tmp); - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2007-02-22 +// Licence : This source is under MIT License +// File : glm/gtx/color_space.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tvec3 rgbColor(const detail::tvec3& hsvColor) + { + detail::tvec3 hsv = hsvColor; + detail::tvec3 rgbColor; + + if(hsv.y == T(0)) + // achromatic (grey) + rgbColor = detail::tvec3(hsv.z); + else + { + T sector = floor(hsv.x / T(60)); + T frac = (hsv.x / T(60)) - sector; + // factorial part of h + T o = hsv.z * (T(1) - hsv.y); + T p = hsv.z * (T(1) - hsv.y * frac); + T q = hsv.z * (T(1) - hsv.y * (T(1) - frac)); + + switch(int(sector)) + { + default: + case 0: + rgbColor.r = hsv.z; + rgbColor.g = q; + rgbColor.b = o; + break; + case 1: + rgbColor.r = p; + rgbColor.g = hsv.z; + rgbColor.b = o; + break; + case 2: + rgbColor.r = o; + rgbColor.g = hsv.z; + rgbColor.b = q; + break; + case 3: + rgbColor.r = o; + rgbColor.g = p; + rgbColor.b = hsv.z; + break; + case 4: + rgbColor.r = q; + rgbColor.g = o; + rgbColor.b = hsv.z; + break; + case 5: + rgbColor.r = hsv.z; + rgbColor.g = o; + rgbColor.b = p; + break; + } + } + + return rgbColor; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 hsvColor(const detail::tvec3& rgbColor) + { + detail::tvec3 hsv = rgbColor; + float Min = min(min(rgbColor.r, rgbColor.g), rgbColor.b); + float Max = max(max(rgbColor.r, rgbColor.g), rgbColor.b); + float Delta = Max - Min; + + hsv.z = Max; + + if(Max != T(0)) + { + hsv.y = Delta / hsv.z; + T h = T(0); + + if(rgbColor.r == Max) + // between yellow & magenta + h = T(0) + T(60) * (rgbColor.g - rgbColor.b) / Delta; + else if(rgbColor.g == Max) + // between cyan & yellow + h = T(120) + T(60) * (rgbColor.b - rgbColor.r) / Delta; + else + // between magenta & cyan + h = T(240) + T(60) * (rgbColor.r - rgbColor.g) / Delta; + + if(h < T(0)) + hsv.x = h + T(360); + else + hsv.x = h; + } + else + { + // If r = g = b = 0 then s = 0, h is undefined + hsv.y = T(0); + hsv.x = T(0); + } + + return hsv; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 saturation(const T s) + { + detail::tvec3 rgbw = detail::tvec3(T(0.2126), T(0.7152), T(0.0722)); + + T col0 = (T(1) - s) * rgbw.r; + T col1 = (T(1) - s) * rgbw.g; + T col2 = (T(1) - s) * rgbw.b; + + detail::tmat4x4 result(T(1)); + result[0][0] = col0 + s; + result[0][1] = col0; + result[0][2] = col0; + result[1][0] = col1; + result[1][1] = col1 + s; + result[1][2] = col1; + result[2][0] = col2; + result[2][1] = col2; + result[2][2] = col2 + s; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 saturation(const T s, const detail::tvec3& color) + { + return detail::tvec3(saturation(s) * detail::tvec4(color, T(0))); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 saturation(const T s, const detail::tvec4& color) + { + return saturation(s) * color; + } + + template + GLM_FUNC_QUALIFIER T luminosity(const detail::tvec3& color) + { + const detail::tvec3 tmp = detail::tvec3(0.33, 0.59, 0.11); + return dot(color, tmp); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/color_space_YCoCg.hpp b/include/gal/opengl/glm/gtx/color_space_YCoCg.hpp index 2b3b23ec08..f0761c4b1c 100644 --- a/include/gal/opengl/glm/gtx/color_space_YCoCg.hpp +++ b/include/gal/opengl/glm/gtx/color_space_YCoCg.hpp @@ -1,84 +1,84 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_color_space_YCoCg -/// @file glm/gtx/color_space_YCoCg.hpp -/// @date 2008-10-28 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_color_space_YCoCg GLM_GTX_color_space_YCoCg -/// @ingroup gtx -/// -/// @brief RGB to YCoCg conversions and operations -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_gtx_color_space_YCoCg -#define glm_gtx_color_space_YCoCg GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_color_space_YCoCg extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_color_space_YCoCg - /// @{ - - /// Convert a color from RGB color space to YCoCg color space. - /// @see gtx_color_space_YCoCg - template - detail::tvec3 rgb2YCoCg( - detail::tvec3 const & rgbColor); - - /// Convert a color from YCoCg color space to RGB color space. - /// @see gtx_color_space_YCoCg - template - detail::tvec3 YCoCg2rgb( - detail::tvec3 const & YCoCgColor); - - /// Convert a color from RGB color space to YCoCgR color space. - /// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range" - /// @see gtx_color_space_YCoCg - template - detail::tvec3 rgb2YCoCgR( - detail::tvec3 const & rgbColor); - - /// Convert a color from YCoCgR color space to RGB color space. - /// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range" - /// @see gtx_color_space_YCoCg - template - detail::tvec3 YCoCgR2rgb( - detail::tvec3 const & YCoCgColor); - - /// @} -}//namespace glm - -#include "color_space_YCoCg.inl" - -#endif//glm_gtx_color_space_YCoCg +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_color_space_YCoCg +/// @file glm/gtx/color_space_YCoCg.hpp +/// @date 2008-10-28 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_color_space_YCoCg GLM_GTX_color_space_YCoCg +/// @ingroup gtx +/// +/// @brief RGB to YCoCg conversions and operations +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef glm_gtx_color_space_YCoCg +#define glm_gtx_color_space_YCoCg GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_color_space_YCoCg extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_color_space_YCoCg + /// @{ + + /// Convert a color from RGB color space to YCoCg color space. + /// @see gtx_color_space_YCoCg + template + detail::tvec3 rgb2YCoCg( + detail::tvec3 const & rgbColor); + + /// Convert a color from YCoCg color space to RGB color space. + /// @see gtx_color_space_YCoCg + template + detail::tvec3 YCoCg2rgb( + detail::tvec3 const & YCoCgColor); + + /// Convert a color from RGB color space to YCoCgR color space. + /// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range" + /// @see gtx_color_space_YCoCg + template + detail::tvec3 rgb2YCoCgR( + detail::tvec3 const & rgbColor); + + /// Convert a color from YCoCgR color space to RGB color space. + /// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range" + /// @see gtx_color_space_YCoCg + template + detail::tvec3 YCoCgR2rgb( + detail::tvec3 const & YCoCgColor); + + /// @} +}//namespace glm + +#include "color_space_YCoCg.inl" + +#endif//glm_gtx_color_space_YCoCg diff --git a/include/gal/opengl/glm/gtx/color_space_YCoCg.inl b/include/gal/opengl/glm/gtx/color_space_YCoCg.inl index 0ddceff82d..2c7dbf451c 100644 --- a/include/gal/opengl/glm/gtx/color_space_YCoCg.inl +++ b/include/gal/opengl/glm/gtx/color_space_YCoCg.inl @@ -1,64 +1,64 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2008-10-28 -// Updated : 2008-10-28 -// Licence : This source is under MIT License -// File : glm/gtx/color_space_YCoCg.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER detail::tvec3 rgb2YCoCg - ( - detail::tvec3 const & rgbColor - ) - { - detail::tvec3 result; - result.x/*Y */ = rgbColor.r / valType(4) + rgbColor.g / valType(2) + rgbColor.b / valType(4); - result.y/*Co*/ = rgbColor.r / valType(2) + rgbColor.g * valType(0) - rgbColor.b / valType(2); - result.z/*Cg*/ = - rgbColor.r / valType(4) + rgbColor.g / valType(2) - rgbColor.b / valType(4); - return result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 rgb2YCoCgR - ( - detail::tvec3 const & rgbColor - ) - { - detail::tvec3 result; - result.x/*Y */ = rgbColor.g / valType(2) + (rgbColor.r + rgbColor.b) / valType(4); - result.y/*Co*/ = rgbColor.r - rgbColor.b; - result.z/*Cg*/ = rgbColor.g - (rgbColor.r + rgbColor.b) / valType(2); - return result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 YCoCg2rgb - ( - detail::tvec3 const & YCoCgColor - ) - { - detail::tvec3 result; - result.r = YCoCgColor.x + YCoCgColor.y - YCoCgColor.z; - result.g = YCoCgColor.x + YCoCgColor.z; - result.b = YCoCgColor.x - YCoCgColor.y - YCoCgColor.z; - return result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 YCoCgR2rgb - ( - detail::tvec3 const & YCoCgRColor - ) - { - detail::tvec3 result; - valType tmp = YCoCgRColor.x - (YCoCgRColor.z / valType(2)); - result.g = YCoCgRColor.z + tmp; - result.b = tmp - (YCoCgRColor.y / valType(2)); - result.r = result.b + YCoCgRColor.y; - return result; - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-10-28 +// Updated : 2008-10-28 +// Licence : This source is under MIT License +// File : glm/gtx/color_space_YCoCg.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tvec3 rgb2YCoCg + ( + detail::tvec3 const & rgbColor + ) + { + detail::tvec3 result; + result.x/*Y */ = rgbColor.r / valType(4) + rgbColor.g / valType(2) + rgbColor.b / valType(4); + result.y/*Co*/ = rgbColor.r / valType(2) + rgbColor.g * valType(0) - rgbColor.b / valType(2); + result.z/*Cg*/ = - rgbColor.r / valType(4) + rgbColor.g / valType(2) - rgbColor.b / valType(4); + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 rgb2YCoCgR + ( + detail::tvec3 const & rgbColor + ) + { + detail::tvec3 result; + result.x/*Y */ = rgbColor.g / valType(2) + (rgbColor.r + rgbColor.b) / valType(4); + result.y/*Co*/ = rgbColor.r - rgbColor.b; + result.z/*Cg*/ = rgbColor.g - (rgbColor.r + rgbColor.b) / valType(2); + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 YCoCg2rgb + ( + detail::tvec3 const & YCoCgColor + ) + { + detail::tvec3 result; + result.r = YCoCgColor.x + YCoCgColor.y - YCoCgColor.z; + result.g = YCoCgColor.x + YCoCgColor.z; + result.b = YCoCgColor.x - YCoCgColor.y - YCoCgColor.z; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 YCoCgR2rgb + ( + detail::tvec3 const & YCoCgRColor + ) + { + detail::tvec3 result; + valType tmp = YCoCgRColor.x - (YCoCgRColor.z / valType(2)); + result.g = YCoCgRColor.z + tmp; + result.b = tmp - (YCoCgRColor.y / valType(2)); + result.r = result.b + YCoCgRColor.y; + return result; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/compatibility.hpp b/include/gal/opengl/glm/gtx/compatibility.hpp index 05ea6e306c..f8c44f8505 100644 --- a/include/gal/opengl/glm/gtx/compatibility.hpp +++ b/include/gal/opengl/glm/gtx/compatibility.hpp @@ -1,176 +1,176 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_compatibility -/// @file glm/gtx/compatibility.hpp -/// @date 2007-01-24 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtc_half_float (dependence) -/// -/// @defgroup gtx_compatibility GLM_GTX_compatibility -/// @ingroup gtx -/// -/// @brief Provide functions to increase the compatibility with Cg and HLSL languages -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_compatibility -#define GLM_GTX_compatibility GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtc/half_float.hpp" -#include "../gtc/quaternion.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_compatibility extension included") -#endif - -#if(GLM_COMPILER & GLM_COMPILER_VC) -# include -#elif(GLM_COMPILER & GLM_COMPILER_GCC) -# include -# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) -# undef isfinite -# endif -#endif//GLM_COMPILER - -namespace glm -{ - /// @addtogroup gtx_compatibility - /// @{ - - template GLM_FUNC_QUALIFIER T lerp(T x, T y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec2 lerp(const detail::tvec2& x, const detail::tvec2& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec3 lerp(const detail::tvec3& x, const detail::tvec3& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec4 lerp(const detail::tvec4& x, const detail::tvec4& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec2 lerp(const detail::tvec2& x, const detail::tvec2& y, const detail::tvec2& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec3 lerp(const detail::tvec3& x, const detail::tvec3& y, const detail::tvec3& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec4 lerp(const detail::tvec4& x, const detail::tvec4& y, const detail::tvec4& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - - template GLM_FUNC_QUALIFIER T slerp(detail::tquat const & x, detail::tquat const & y, T const & a){return mix(x, y, a);} //!< \brief Returns the slurp interpolation between two quaternions. - - template GLM_FUNC_QUALIFIER T saturate(T x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec2 saturate(const detail::tvec2& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec3 saturate(const detail::tvec3& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec4 saturate(const detail::tvec4& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) - - template GLM_FUNC_QUALIFIER T atan2(T x, T y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec2 atan2(const detail::tvec2& x, const detail::tvec2& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec3 atan2(const detail::tvec3& x, const detail::tvec3& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec4 atan2(const detail::tvec4& x, const detail::tvec4& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) - - template bool isfinite(genType const & x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) - template detail::tvec2 isfinite(const detail::tvec2& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) - template detail::tvec3 isfinite(const detail::tvec3& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) - template detail::tvec4 isfinite(const detail::tvec4& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) - - typedef bool bool1; //!< \brief boolean type with 1 component. (From GLM_GTX_compatibility extension) - typedef detail::tvec2 bool2; //!< \brief boolean type with 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tvec3 bool3; //!< \brief boolean type with 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tvec4 bool4; //!< \brief boolean type with 4 components. (From GLM_GTX_compatibility extension) - - typedef bool bool1x1; //!< \brief boolean matrix with 1 x 1 component. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x2 bool2x2; //!< \brief boolean matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x3 bool2x3; //!< \brief boolean matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x4 bool2x4; //!< \brief boolean matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x2 bool3x2; //!< \brief boolean matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x3 bool3x3; //!< \brief boolean matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x4 bool3x4; //!< \brief boolean matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x2 bool4x2; //!< \brief boolean matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x3 bool4x3; //!< \brief boolean matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x4 bool4x4; //!< \brief boolean matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) - - typedef int int1; //!< \brief integer vector with 1 component. (From GLM_GTX_compatibility extension) - typedef detail::tvec2 int2; //!< \brief integer vector with 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tvec3 int3; //!< \brief integer vector with 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tvec4 int4; //!< \brief integer vector with 4 components. (From GLM_GTX_compatibility extension) - - typedef int int1x1; //!< \brief integer matrix with 1 component. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x2 int2x2; //!< \brief integer matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x3 int2x3; //!< \brief integer matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x4 int2x4; //!< \brief integer matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x2 int3x2; //!< \brief integer matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x3 int3x3; //!< \brief integer matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x4 int3x4; //!< \brief integer matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x2 int4x2; //!< \brief integer matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x3 int4x3; //!< \brief integer matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x4 int4x4; //!< \brief integer matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) - - typedef detail::half half1; //!< \brief half-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension) - typedef detail::tvec2 half2; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tvec3 half3; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tvec4 half4; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) - - typedef detail::half half1x1; //!< \brief half-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x2 half2x2; //!< \brief half-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x3 half2x3; //!< \brief half-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x4 half2x4; //!< \brief half-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x2 half3x2; //!< \brief half-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x3 half3x3; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x4 half3x4; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x2 half4x2; //!< \brief half-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x3 half4x3; //!< \brief half-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x4 half4x4; //!< \brief half-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) - - typedef float float1; //!< \brief single-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension) - typedef detail::tvec2 float2; //!< \brief single-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tvec3 float3; //!< \brief single-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tvec4 float4; //!< \brief single-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension) - - typedef float float1x1; //!< \brief single-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x2 float2x2; //!< \brief single-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x3 float2x3; //!< \brief single-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x4 float2x4; //!< \brief single-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x2 float3x2; //!< \brief single-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x3 float3x3; //!< \brief single-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x4 float3x4; //!< \brief single-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x2 float4x2; //!< \brief single-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x3 float4x3; //!< \brief single-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x4 float4x4; //!< \brief single-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) - - typedef double double1; //!< \brief double-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension) - typedef detail::tvec2 double2; //!< \brief double-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tvec3 double3; //!< \brief double-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tvec4 double4; //!< \brief double-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension) - - typedef double double1x1; //!< \brief double-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x2 double2x2; //!< \brief double-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x3 double2x3; //!< \brief double-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x4 double2x4; //!< \brief double-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x2 double3x2; //!< \brief double-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x3 double3x3; //!< \brief double-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x4 double3x4; //!< \brief double-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x2 double4x2; //!< \brief double-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x3 double4x3; //!< \brief double-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x4 double4x4; //!< \brief double-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) - - /// @} -}//namespace glm - -#include "compatibility.inl" - -#endif//GLM_GTX_compatibility - +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_compatibility +/// @file glm/gtx/compatibility.hpp +/// @date 2007-01-24 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_half_float (dependence) +/// +/// @defgroup gtx_compatibility GLM_GTX_compatibility +/// @ingroup gtx +/// +/// @brief Provide functions to increase the compatibility with Cg and HLSL languages +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_compatibility +#define GLM_GTX_compatibility GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" +#include "../gtc/quaternion.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_compatibility extension included") +#endif + +#if(GLM_COMPILER & GLM_COMPILER_VC) +# include +#elif(GLM_COMPILER & GLM_COMPILER_GCC) +# include +# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) +# undef isfinite +# endif +#endif//GLM_COMPILER + +namespace glm +{ + /// @addtogroup gtx_compatibility + /// @{ + + template GLM_FUNC_QUALIFIER T lerp(T x, T y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec2 lerp(const detail::tvec2& x, const detail::tvec2& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec3 lerp(const detail::tvec3& x, const detail::tvec3& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec4 lerp(const detail::tvec4& x, const detail::tvec4& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec2 lerp(const detail::tvec2& x, const detail::tvec2& y, const detail::tvec2& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec3 lerp(const detail::tvec3& x, const detail::tvec3& y, const detail::tvec3& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec4 lerp(const detail::tvec4& x, const detail::tvec4& y, const detail::tvec4& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + + template GLM_FUNC_QUALIFIER T slerp(detail::tquat const & x, detail::tquat const & y, T const & a){return mix(x, y, a);} //!< \brief Returns the slurp interpolation between two quaternions. + + template GLM_FUNC_QUALIFIER T saturate(T x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec2 saturate(const detail::tvec2& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec3 saturate(const detail::tvec3& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec4 saturate(const detail::tvec4& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) + + template GLM_FUNC_QUALIFIER T atan2(T x, T y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec2 atan2(const detail::tvec2& x, const detail::tvec2& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec3 atan2(const detail::tvec3& x, const detail::tvec3& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec4 atan2(const detail::tvec4& x, const detail::tvec4& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) + + template bool isfinite(genType const & x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template detail::tvec2 isfinite(const detail::tvec2& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template detail::tvec3 isfinite(const detail::tvec3& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template detail::tvec4 isfinite(const detail::tvec4& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + + typedef bool bool1; //!< \brief boolean type with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tvec2 bool2; //!< \brief boolean type with 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec3 bool3; //!< \brief boolean type with 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec4 bool4; //!< \brief boolean type with 4 components. (From GLM_GTX_compatibility extension) + + typedef bool bool1x1; //!< \brief boolean matrix with 1 x 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x2 bool2x2; //!< \brief boolean matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x3 bool2x3; //!< \brief boolean matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x4 bool2x4; //!< \brief boolean matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x2 bool3x2; //!< \brief boolean matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x3 bool3x3; //!< \brief boolean matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x4 bool3x4; //!< \brief boolean matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x2 bool4x2; //!< \brief boolean matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x3 bool4x3; //!< \brief boolean matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x4 bool4x4; //!< \brief boolean matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) + + typedef int int1; //!< \brief integer vector with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tvec2 int2; //!< \brief integer vector with 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec3 int3; //!< \brief integer vector with 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec4 int4; //!< \brief integer vector with 4 components. (From GLM_GTX_compatibility extension) + + typedef int int1x1; //!< \brief integer matrix with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x2 int2x2; //!< \brief integer matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x3 int2x3; //!< \brief integer matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x4 int2x4; //!< \brief integer matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x2 int3x2; //!< \brief integer matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x3 int3x3; //!< \brief integer matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x4 int3x4; //!< \brief integer matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x2 int4x2; //!< \brief integer matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x3 int4x3; //!< \brief integer matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x4 int4x4; //!< \brief integer matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) + + typedef detail::half half1; //!< \brief half-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tvec2 half2; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec3 half3; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec4 half4; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) + + typedef detail::half half1x1; //!< \brief half-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x2 half2x2; //!< \brief half-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x3 half2x3; //!< \brief half-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x4 half2x4; //!< \brief half-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x2 half3x2; //!< \brief half-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x3 half3x3; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x4 half3x4; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x2 half4x2; //!< \brief half-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x3 half4x3; //!< \brief half-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x4 half4x4; //!< \brief half-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) + + typedef float float1; //!< \brief single-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tvec2 float2; //!< \brief single-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec3 float3; //!< \brief single-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec4 float4; //!< \brief single-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension) + + typedef float float1x1; //!< \brief single-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x2 float2x2; //!< \brief single-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x3 float2x3; //!< \brief single-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x4 float2x4; //!< \brief single-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x2 float3x2; //!< \brief single-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x3 float3x3; //!< \brief single-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x4 float3x4; //!< \brief single-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x2 float4x2; //!< \brief single-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x3 float4x3; //!< \brief single-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x4 float4x4; //!< \brief single-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) + + typedef double double1; //!< \brief double-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tvec2 double2; //!< \brief double-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec3 double3; //!< \brief double-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec4 double4; //!< \brief double-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension) + + typedef double double1x1; //!< \brief double-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x2 double2x2; //!< \brief double-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x3 double2x3; //!< \brief double-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x4 double2x4; //!< \brief double-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x2 double3x2; //!< \brief double-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x3 double3x3; //!< \brief double-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x4 double3x4; //!< \brief double-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x2 double4x2; //!< \brief double-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x3 double4x3; //!< \brief double-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x4 double4x4; //!< \brief double-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) + + /// @} +}//namespace glm + +#include "compatibility.inl" + +#endif//GLM_GTX_compatibility + diff --git a/include/gal/opengl/glm/gtx/compatibility.inl b/include/gal/opengl/glm/gtx/compatibility.inl index d9ebd9c57c..55daebd9ce 100644 --- a/include/gal/opengl/glm/gtx/compatibility.inl +++ b/include/gal/opengl/glm/gtx/compatibility.inl @@ -1,60 +1,60 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2007-03-16 -// Updated : 2008-10-24 -// Licence : This source is under MIT License -// File : glm/gtx/compatibility.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - // isfinite - template - GLM_FUNC_QUALIFIER bool isfinite( - genType const & x) - { -# if(GLM_COMPILER & GLM_COMPILER_VC) - return _finite(x); -# elif(GLM_COMPILER & GLM_COMPILER_GCC) -# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) - return _isfinite(x) != 0; -# else - return std::isfinite(x) != 0; -# endif -# else - return std::isfinite(x) != 0; -# endif - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 isfinite( - detail::tvec2 const & x) - { - return detail::tvec2( - isfinite(x.x), - isfinite(x.y)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 isfinite( - detail::tvec3 const & x) - { - return detail::tvec3( - isfinite(x.x), - isfinite(x.y), - isfinite(x.z)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 isfinite( - detail::tvec4 const & x) - { - return detail::tvec4( - isfinite(x.x), - isfinite(x.y), - isfinite(x.z), - isfinite(x.w)); - } - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-03-16 +// Updated : 2008-10-24 +// Licence : This source is under MIT License +// File : glm/gtx/compatibility.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + // isfinite + template + GLM_FUNC_QUALIFIER bool isfinite( + genType const & x) + { +# if(GLM_COMPILER & GLM_COMPILER_VC) + return _finite(x); +# elif(GLM_COMPILER & GLM_COMPILER_GCC) +# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) + return _isfinite(x) != 0; +# else + return std::isfinite(x) != 0; +# endif +# else + return std::isfinite(x) != 0; +# endif + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 isfinite( + detail::tvec2 const & x) + { + return detail::tvec2( + isfinite(x.x), + isfinite(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 isfinite( + detail::tvec3 const & x) + { + return detail::tvec3( + isfinite(x.x), + isfinite(x.y), + isfinite(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 isfinite( + detail::tvec4 const & x) + { + return detail::tvec4( + isfinite(x.x), + isfinite(x.y), + isfinite(x.z), + isfinite(x.w)); + } + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/component_wise.hpp b/include/gal/opengl/glm/gtx/component_wise.hpp index 8477e8c298..b634632e9b 100644 --- a/include/gal/opengl/glm/gtx/component_wise.hpp +++ b/include/gal/opengl/glm/gtx/component_wise.hpp @@ -1,82 +1,82 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_component_wise -/// @file glm/gtx/component_wise.hpp -/// @date 2007-05-21 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_component_wise GLM_GTX_component_wise -/// @ingroup gtx -/// -/// @brief Operations between components of a type -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_component_wise -#define GLM_GTX_component_wise GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_component_wise extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_component_wise - /// @{ - - /// Add all vector components together. - /// @see gtx_component_wise - template - typename genType::value_type compAdd( - genType const & v); - - /// Multiply all vector components together. - /// @see gtx_component_wise - template - typename genType::value_type compMul( - genType const & v); - - /// Find the minimum value between single vector components. - /// @see gtx_component_wise - template - typename genType::value_type compMin( - genType const & v); - - /// Find the maximum value between single vector components. - /// @see gtx_component_wise - template - typename genType::value_type compMax( - genType const & v); - - /// @} -}//namespace glm - -#include "component_wise.inl" - -#endif//GLM_GTX_component_wise +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_component_wise +/// @file glm/gtx/component_wise.hpp +/// @date 2007-05-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_component_wise GLM_GTX_component_wise +/// @ingroup gtx +/// +/// @brief Operations between components of a type +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_component_wise +#define GLM_GTX_component_wise GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_component_wise extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_component_wise + /// @{ + + /// Add all vector components together. + /// @see gtx_component_wise + template + typename genType::value_type compAdd( + genType const & v); + + /// Multiply all vector components together. + /// @see gtx_component_wise + template + typename genType::value_type compMul( + genType const & v); + + /// Find the minimum value between single vector components. + /// @see gtx_component_wise + template + typename genType::value_type compMin( + genType const & v); + + /// Find the maximum value between single vector components. + /// @see gtx_component_wise + template + typename genType::value_type compMax( + genType const & v); + + /// @} +}//namespace glm + +#include "component_wise.inl" + +#endif//GLM_GTX_component_wise diff --git a/include/gal/opengl/glm/gtx/component_wise.inl b/include/gal/opengl/glm/gtx/component_wise.inl index 942df94fc0..fbff05f41b 100644 --- a/include/gal/opengl/glm/gtx/component_wise.inl +++ b/include/gal/opengl/glm/gtx/component_wise.inl @@ -1,47 +1,47 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2007-05-21 -// Updated : 2010-02-12 -// Licence : This source is under MIT License -// File : gtx_component_wise.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER typename genType::value_type compAdd(genType const & v) - { - typename genType::size_type result = typename genType::value_type(0); - for(typename genType::size_type i = 0; i < v.length(); ++i) - result += v[i]; - return result; - } - - template - GLM_FUNC_QUALIFIER typename genType::value_type compMul(genType const & v) - { - typename genType::value_type result = typename genType::value_type(1); - for(typename genType::size_type i = 0; i < v.length(); ++i) - result *= v[i]; - return result; - } - - template - GLM_FUNC_QUALIFIER typename genType::value_type compMin(genType const & v) - { - typename genType::value_type result = typename genType::value_type(v[0]); - for(typename genType::size_type i = 1; i < v.length(); ++i) - result = min(result, v[i]); - return result; - } - - template - GLM_FUNC_QUALIFIER typename genType::value_type compMax(genType const & v) - { - typename genType::value_type result = typename genType::value_type(v[0]); - for(typename genType::size_type i = 1; i < v.length(); ++i) - result = max(result, v[i]); - return result; - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-05-21 +// Updated : 2010-02-12 +// Licence : This source is under MIT License +// File : gtx_component_wise.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER typename genType::value_type compAdd(genType const & v) + { + typename genType::size_type result = typename genType::value_type(0); + for(typename genType::size_type i = 0; i < v.length(); ++i) + result += v[i]; + return result; + } + + template + GLM_FUNC_QUALIFIER typename genType::value_type compMul(genType const & v) + { + typename genType::value_type result = typename genType::value_type(1); + for(typename genType::size_type i = 0; i < v.length(); ++i) + result *= v[i]; + return result; + } + + template + GLM_FUNC_QUALIFIER typename genType::value_type compMin(genType const & v) + { + typename genType::value_type result = typename genType::value_type(v[0]); + for(typename genType::size_type i = 1; i < v.length(); ++i) + result = min(result, v[i]); + return result; + } + + template + GLM_FUNC_QUALIFIER typename genType::value_type compMax(genType const & v) + { + typename genType::value_type result = typename genType::value_type(v[0]); + for(typename genType::size_type i = 1; i < v.length(); ++i) + result = max(result, v[i]); + return result; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/constants.hpp b/include/gal/opengl/glm/gtx/constants.hpp index 592199195d..f302d1bd76 100644 --- a/include/gal/opengl/glm/gtx/constants.hpp +++ b/include/gal/opengl/glm/gtx/constants.hpp @@ -1,33 +1,33 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_constants -#define GLM_GTX_constants GLM_VERSION - -#include "../gtc/constants.hpp" - -#if(defined(GLM_MESSAGES)) -# pragma message("GLM: GLM_GTX_constants extension is deprecated, include GLM_GTC_constants (glm/gtc/constants.hpp) instead") -#endif - -#endif//GLM_GTX_constants +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_constants +#define GLM_GTX_constants GLM_VERSION + +#include "../gtc/constants.hpp" + +#if(defined(GLM_MESSAGES)) +# pragma message("GLM: GLM_GTX_constants extension is deprecated, include GLM_GTC_constants (glm/gtc/constants.hpp) instead") +#endif + +#endif//GLM_GTX_constants diff --git a/include/gal/opengl/glm/gtx/epsilon.hpp b/include/gal/opengl/glm/gtx/epsilon.hpp index 6d8dae5ac4..73adc1aa1b 100644 --- a/include/gal/opengl/glm/gtx/epsilon.hpp +++ b/include/gal/opengl/glm/gtx/epsilon.hpp @@ -1,29 +1,29 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/////////////////////////////////////////////////////////////////////////////////// - -#if(defined(GLM_MESSAGES)) -# pragma message("GLM: GLM_GTX_epsilon extension is deprecated, include GLM_GTC_epsilon (glm/gtc/epsilon) instead") -#endif - -// Promoted: -#include "../gtc/epsilon.hpp" +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/////////////////////////////////////////////////////////////////////////////////// + +#if(defined(GLM_MESSAGES)) +# pragma message("GLM: GLM_GTX_epsilon extension is deprecated, include GLM_GTC_epsilon (glm/gtc/epsilon) instead") +#endif + +// Promoted: +#include "../gtc/epsilon.hpp" diff --git a/include/gal/opengl/glm/gtx/euler_angles.hpp b/include/gal/opengl/glm/gtx/euler_angles.hpp index b2f0b3743f..61316f23db 100644 --- a/include/gal/opengl/glm/gtx/euler_angles.hpp +++ b/include/gal/opengl/glm/gtx/euler_angles.hpp @@ -1,156 +1,156 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_euler_angles -/// @file glm/gtx/euler_angles.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtc_half_float (dependence) -/// -/// @defgroup gtx_euler_angles GLM_GTX_euler_angles -/// @ingroup gtx -/// -/// @brief Build matrices from Euler angles. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_euler_angles -#define GLM_GTX_euler_angles GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtc/half_float.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_euler_angles extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_euler_angles - /// @{ - - /// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X. - /// @see gtx_euler_angles - template - detail::tmat4x4 eulerAngleX( - valType const & angleX); - - /// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y. - /// @see gtx_euler_angles - template - detail::tmat4x4 eulerAngleY( - valType const & angleY); - - /// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z. - /// @see gtx_euler_angles - template - detail::tmat4x4 eulerAngleZ( - valType const & angleZ); - - /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y). - /// @see gtx_euler_angles - template - detail::tmat4x4 eulerAngleXY( - valType const & angleX, - valType const & angleY); - - /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X). - /// @see gtx_euler_angles - template - detail::tmat4x4 eulerAngleYX( - valType const & angleY, - valType const & angleX); - - /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z). - /// @see gtx_euler_angles - template - detail::tmat4x4 eulerAngleXZ( - valType const & angleX, - valType const & angleZ); - - /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X). - /// @see gtx_euler_angles - template - detail::tmat4x4 eulerAngleZX( - valType const & angleZ, - valType const & angleX); - - /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z). - /// @see gtx_euler_angles - template - detail::tmat4x4 eulerAngleYZ( - valType const & angleY, - valType const & angleZ); - - /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y). - /// @see gtx_euler_angles - template - detail::tmat4x4 eulerAngleZY( - valType const & angleZ, - valType const & angleY); - - /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). - /// @see gtx_euler_angles - template - detail::tmat4x4 eulerAngleYXZ( - valType const & yaw, - valType const & pitch, - valType const & roll); - - /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). - /// @see gtx_euler_angles - template - detail::tmat4x4 yawPitchRoll( - valType const & yaw, - valType const & pitch, - valType const & roll); - - /// Creates a 2D 2 * 2 rotation matrix from an euler angle. - /// @see gtx_euler_angles - template - detail::tmat2x2 orientate2(T const & angle); - - /// Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle. - /// @see gtx_euler_angles - template - detail::tmat3x3 orientate3(T const & angle); - - /// Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z). - /// @see gtx_euler_angles - template - detail::tmat3x3 orientate3(detail::tvec3 const & angles); - - /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). - /// @see gtx_euler_angles - template - detail::tmat4x4 orientate4(detail::tvec3 const & angles); - - /// @} -}//namespace glm - -#include "euler_angles.inl" - -#endif//GLM_GTX_euler_angles +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_euler_angles +/// @file glm/gtx/euler_angles.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_half_float (dependence) +/// +/// @defgroup gtx_euler_angles GLM_GTX_euler_angles +/// @ingroup gtx +/// +/// @brief Build matrices from Euler angles. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_euler_angles +#define GLM_GTX_euler_angles GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_euler_angles extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_euler_angles + /// @{ + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X. + /// @see gtx_euler_angles + template + detail::tmat4x4 eulerAngleX( + valType const & angleX); + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y. + /// @see gtx_euler_angles + template + detail::tmat4x4 eulerAngleY( + valType const & angleY); + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z. + /// @see gtx_euler_angles + template + detail::tmat4x4 eulerAngleZ( + valType const & angleZ); + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y). + /// @see gtx_euler_angles + template + detail::tmat4x4 eulerAngleXY( + valType const & angleX, + valType const & angleY); + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X). + /// @see gtx_euler_angles + template + detail::tmat4x4 eulerAngleYX( + valType const & angleY, + valType const & angleX); + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z). + /// @see gtx_euler_angles + template + detail::tmat4x4 eulerAngleXZ( + valType const & angleX, + valType const & angleZ); + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X). + /// @see gtx_euler_angles + template + detail::tmat4x4 eulerAngleZX( + valType const & angleZ, + valType const & angleX); + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z). + /// @see gtx_euler_angles + template + detail::tmat4x4 eulerAngleYZ( + valType const & angleY, + valType const & angleZ); + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y). + /// @see gtx_euler_angles + template + detail::tmat4x4 eulerAngleZY( + valType const & angleZ, + valType const & angleY); + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). + /// @see gtx_euler_angles + template + detail::tmat4x4 eulerAngleYXZ( + valType const & yaw, + valType const & pitch, + valType const & roll); + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). + /// @see gtx_euler_angles + template + detail::tmat4x4 yawPitchRoll( + valType const & yaw, + valType const & pitch, + valType const & roll); + + /// Creates a 2D 2 * 2 rotation matrix from an euler angle. + /// @see gtx_euler_angles + template + detail::tmat2x2 orientate2(T const & angle); + + /// Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle. + /// @see gtx_euler_angles + template + detail::tmat3x3 orientate3(T const & angle); + + /// Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z). + /// @see gtx_euler_angles + template + detail::tmat3x3 orientate3(detail::tvec3 const & angles); + + /// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). + /// @see gtx_euler_angles + template + detail::tmat4x4 orientate4(detail::tvec3 const & angles); + + /// @} +}//namespace glm + +#include "euler_angles.inl" + +#endif//GLM_GTX_euler_angles diff --git a/include/gal/opengl/glm/gtx/euler_angles.inl b/include/gal/opengl/glm/gtx/euler_angles.inl index dcde512836..896ec06024 100644 --- a/include/gal/opengl/glm/gtx/euler_angles.inl +++ b/include/gal/opengl/glm/gtx/euler_angles.inl @@ -1,244 +1,244 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2005-12-21 -// Updated : 2007-08-14 -// Licence : This source is under MIT License -// File : glm/gtx/euler_angles.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleX - ( - valType const & angleX - ) - { - valType cosX = glm::cos(angleX); - valType sinX = glm::sin(angleX); - - return detail::tmat4x4( - valType(1), valType(0), valType(0), valType(0), - valType(0), cosX, sinX, valType(0), - valType(0),-sinX, cosX, valType(0), - valType(0), valType(0), valType(0), valType(1)); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleY - ( - valType const & angleY - ) - { - valType cosY = glm::cos(angleY); - valType sinY = glm::sin(angleY); - - return detail::tmat4x4( - cosY, valType(0), sinY, valType(0), - valType(0), valType(1), valType(0), valType(0), - -sinY, valType(0), cosY, valType(0), - valType(0), valType(0), valType(0), valType(1)); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleZ - ( - valType const & angleZ - ) - { - valType cosZ = glm::cos(angleZ); - valType sinZ = glm::sin(angleZ); - - return detail::tmat4x4( - cosZ, sinZ, valType(0), valType(0), - -sinZ, cosZ, valType(0), valType(0), - valType(0), valType(0), valType(1), valType(0), - valType(0), valType(0), valType(0), valType(1)); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleXY - ( - valType const & angleX, - valType const & angleY - ) - { - valType cosX = glm::cos(angleX); - valType sinX = glm::sin(angleX); - valType cosY = glm::cos(angleY); - valType sinY = glm::sin(angleY); - - return detail::tmat4x4( - cosY, -sinX * sinY, cosX * sinY, valType(0), - valType(0), cosX, sinX, valType(0), - -sinY , -sinX * cosY, cosX * cosY, valType(0), - valType(0), valType(0), valType(0), valType(1)); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleYX - ( - valType const & angleY, - valType const & angleX - ) - { - valType cosX = glm::cos(angleX); - valType sinX = glm::sin(angleX); - valType cosY = glm::cos(angleY); - valType sinY = glm::sin(angleY); - - return detail::tmat4x4( - cosY, valType(0), sinY, valType(0), - -sinX * sinY, cosX, sinX * cosY, valType(0), - -cosX * sinY, -sinX, cosX * cosY, valType(0), - valType(0), valType(0), valType(0), valType(1)); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleXZ - ( - valType const & angleX, - valType const & angleZ - ) - { - return eulerAngleX(angleX) * eulerAngleZ(angleZ); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleZX - ( - valType const & angleZ, - valType const & angleX - ) - { - return eulerAngleZ(angleZ) * eulerAngleX(angleX); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleYXZ - ( - valType const & yaw, - valType const & pitch, - valType const & roll - ) - { - valType tmp_ch = glm::cos(yaw); - valType tmp_sh = glm::sin(yaw); - valType tmp_cp = glm::cos(pitch); - valType tmp_sp = glm::sin(pitch); - valType tmp_cb = glm::cos(roll); - valType tmp_sb = glm::sin(roll); - - detail::tmat4x4 Result; - Result[0][0] = tmp_ch * tmp_cb + tmp_sh * tmp_sp * tmp_sb; - Result[0][1] = tmp_sb * tmp_cp; - Result[0][2] = -tmp_sh * tmp_cb + tmp_ch * tmp_sp * tmp_sb; - Result[0][3] = valType(0); - Result[1][0] = -tmp_ch * tmp_sb + tmp_sh * tmp_sp * tmp_cb; - Result[1][1] = tmp_cb * tmp_cp; - Result[1][2] = tmp_sb * tmp_sh + tmp_ch * tmp_sp * tmp_cb; - Result[1][3] = valType(0); - Result[2][0] = tmp_sh * tmp_cp; - Result[2][1] = -tmp_sp; - Result[2][2] = tmp_ch * tmp_cp; - Result[2][3] = valType(0); - Result[3][0] = valType(0); - Result[3][1] = valType(0); - Result[3][2] = valType(0); - Result[3][3] = valType(1); - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 yawPitchRoll - ( - valType const & yaw, - valType const & pitch, - valType const & roll - ) - { - valType tmp_ch = glm::cos(yaw); - valType tmp_sh = glm::sin(yaw); - valType tmp_cp = glm::cos(pitch); - valType tmp_sp = glm::sin(pitch); - valType tmp_cb = glm::cos(roll); - valType tmp_sb = glm::sin(roll); - - detail::tmat4x4 Result; - Result[0][0] = tmp_ch * tmp_cb + tmp_sh * tmp_sp * tmp_sb; - Result[0][1] = tmp_sb * tmp_cp; - Result[0][2] = -tmp_sh * tmp_cb + tmp_ch * tmp_sp * tmp_sb; - Result[0][3] = valType(0); - Result[1][0] = -tmp_ch * tmp_sb + tmp_sh * tmp_sp * tmp_cb; - Result[1][1] = tmp_cb * tmp_cp; - Result[1][2] = tmp_sb * tmp_sh + tmp_ch * tmp_sp * tmp_cb; - Result[1][3] = valType(0); - Result[2][0] = tmp_sh * tmp_cp; - Result[2][1] = -tmp_sp; - Result[2][2] = tmp_ch * tmp_cp; - Result[2][3] = valType(0); - Result[3][0] = valType(0); - Result[3][1] = valType(0); - Result[3][2] = valType(0); - Result[3][3] = valType(1); - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat2x2 orientate2 - ( - valType const & angle - ) - { - valType c = glm::cos(angle); - valType s = glm::sin(angle); - - detail::tmat2x2 Result; - Result[0][0] = c; - Result[0][1] = s; - Result[1][0] = -s; - Result[1][1] = c; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x3 orientate3 - ( - valType const & angle - ) - { - valType c = glm::cos(angle); - valType s = glm::sin(angle); - - detail::tmat3x3 Result; - Result[0][0] = c; - Result[0][1] = s; - Result[0][2] = 0.0f; - Result[1][0] = -s; - Result[1][1] = c; - Result[1][2] = 0.0f; - Result[2][0] = 0.0f; - Result[2][1] = 0.0f; - Result[2][2] = 1.0f; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x3 orientate3 - ( - detail::tvec3 const & angles - ) - { - return detail::tmat3x3(yawPitchRoll(angles.x, angles.y, angles.z)); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 orientate4 - ( - detail::tvec3 const & angles - ) - { - return yawPitchRoll(angles.z, angles.x, angles.y); - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2007-08-14 +// Licence : This source is under MIT License +// File : glm/gtx/euler_angles.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleX + ( + valType const & angleX + ) + { + valType cosX = glm::cos(angleX); + valType sinX = glm::sin(angleX); + + return detail::tmat4x4( + valType(1), valType(0), valType(0), valType(0), + valType(0), cosX, sinX, valType(0), + valType(0),-sinX, cosX, valType(0), + valType(0), valType(0), valType(0), valType(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleY + ( + valType const & angleY + ) + { + valType cosY = glm::cos(angleY); + valType sinY = glm::sin(angleY); + + return detail::tmat4x4( + cosY, valType(0), sinY, valType(0), + valType(0), valType(1), valType(0), valType(0), + -sinY, valType(0), cosY, valType(0), + valType(0), valType(0), valType(0), valType(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleZ + ( + valType const & angleZ + ) + { + valType cosZ = glm::cos(angleZ); + valType sinZ = glm::sin(angleZ); + + return detail::tmat4x4( + cosZ, sinZ, valType(0), valType(0), + -sinZ, cosZ, valType(0), valType(0), + valType(0), valType(0), valType(1), valType(0), + valType(0), valType(0), valType(0), valType(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleXY + ( + valType const & angleX, + valType const & angleY + ) + { + valType cosX = glm::cos(angleX); + valType sinX = glm::sin(angleX); + valType cosY = glm::cos(angleY); + valType sinY = glm::sin(angleY); + + return detail::tmat4x4( + cosY, -sinX * sinY, cosX * sinY, valType(0), + valType(0), cosX, sinX, valType(0), + -sinY , -sinX * cosY, cosX * cosY, valType(0), + valType(0), valType(0), valType(0), valType(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleYX + ( + valType const & angleY, + valType const & angleX + ) + { + valType cosX = glm::cos(angleX); + valType sinX = glm::sin(angleX); + valType cosY = glm::cos(angleY); + valType sinY = glm::sin(angleY); + + return detail::tmat4x4( + cosY, valType(0), sinY, valType(0), + -sinX * sinY, cosX, sinX * cosY, valType(0), + -cosX * sinY, -sinX, cosX * cosY, valType(0), + valType(0), valType(0), valType(0), valType(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleXZ + ( + valType const & angleX, + valType const & angleZ + ) + { + return eulerAngleX(angleX) * eulerAngleZ(angleZ); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleZX + ( + valType const & angleZ, + valType const & angleX + ) + { + return eulerAngleZ(angleZ) * eulerAngleX(angleX); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 eulerAngleYXZ + ( + valType const & yaw, + valType const & pitch, + valType const & roll + ) + { + valType tmp_ch = glm::cos(yaw); + valType tmp_sh = glm::sin(yaw); + valType tmp_cp = glm::cos(pitch); + valType tmp_sp = glm::sin(pitch); + valType tmp_cb = glm::cos(roll); + valType tmp_sb = glm::sin(roll); + + detail::tmat4x4 Result; + Result[0][0] = tmp_ch * tmp_cb + tmp_sh * tmp_sp * tmp_sb; + Result[0][1] = tmp_sb * tmp_cp; + Result[0][2] = -tmp_sh * tmp_cb + tmp_ch * tmp_sp * tmp_sb; + Result[0][3] = valType(0); + Result[1][0] = -tmp_ch * tmp_sb + tmp_sh * tmp_sp * tmp_cb; + Result[1][1] = tmp_cb * tmp_cp; + Result[1][2] = tmp_sb * tmp_sh + tmp_ch * tmp_sp * tmp_cb; + Result[1][3] = valType(0); + Result[2][0] = tmp_sh * tmp_cp; + Result[2][1] = -tmp_sp; + Result[2][2] = tmp_ch * tmp_cp; + Result[2][3] = valType(0); + Result[3][0] = valType(0); + Result[3][1] = valType(0); + Result[3][2] = valType(0); + Result[3][3] = valType(1); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 yawPitchRoll + ( + valType const & yaw, + valType const & pitch, + valType const & roll + ) + { + valType tmp_ch = glm::cos(yaw); + valType tmp_sh = glm::sin(yaw); + valType tmp_cp = glm::cos(pitch); + valType tmp_sp = glm::sin(pitch); + valType tmp_cb = glm::cos(roll); + valType tmp_sb = glm::sin(roll); + + detail::tmat4x4 Result; + Result[0][0] = tmp_ch * tmp_cb + tmp_sh * tmp_sp * tmp_sb; + Result[0][1] = tmp_sb * tmp_cp; + Result[0][2] = -tmp_sh * tmp_cb + tmp_ch * tmp_sp * tmp_sb; + Result[0][3] = valType(0); + Result[1][0] = -tmp_ch * tmp_sb + tmp_sh * tmp_sp * tmp_cb; + Result[1][1] = tmp_cb * tmp_cp; + Result[1][2] = tmp_sb * tmp_sh + tmp_ch * tmp_sp * tmp_cb; + Result[1][3] = valType(0); + Result[2][0] = tmp_sh * tmp_cp; + Result[2][1] = -tmp_sp; + Result[2][2] = tmp_ch * tmp_cp; + Result[2][3] = valType(0); + Result[3][0] = valType(0); + Result[3][1] = valType(0); + Result[3][2] = valType(0); + Result[3][3] = valType(1); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x2 orientate2 + ( + valType const & angle + ) + { + valType c = glm::cos(angle); + valType s = glm::sin(angle); + + detail::tmat2x2 Result; + Result[0][0] = c; + Result[0][1] = s; + Result[1][0] = -s; + Result[1][1] = c; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 orientate3 + ( + valType const & angle + ) + { + valType c = glm::cos(angle); + valType s = glm::sin(angle); + + detail::tmat3x3 Result; + Result[0][0] = c; + Result[0][1] = s; + Result[0][2] = 0.0f; + Result[1][0] = -s; + Result[1][1] = c; + Result[1][2] = 0.0f; + Result[2][0] = 0.0f; + Result[2][1] = 0.0f; + Result[2][2] = 1.0f; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 orientate3 + ( + detail::tvec3 const & angles + ) + { + return detail::tmat3x3(yawPitchRoll(angles.x, angles.y, angles.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 orientate4 + ( + detail::tvec3 const & angles + ) + { + return yawPitchRoll(angles.z, angles.x, angles.y); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/extend.hpp b/include/gal/opengl/glm/gtx/extend.hpp index 908e8fec52..9cf29f8f79 100644 --- a/include/gal/opengl/glm/gtx/extend.hpp +++ b/include/gal/opengl/glm/gtx/extend.hpp @@ -1,66 +1,66 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_extend -/// @file glm/gtx/extend.hpp -/// @date 2006-01-07 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_extend GLM_GTX_extend -/// @ingroup gtx -/// -/// @brief Extend a position from a source to a position at a defined length. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_extend -#define GLM_GTX_extend GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_extend extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_extend - /// @{ - - /// Extends of Length the Origin position using the (Source - Origin) direction. - /// @see gtx_extend - template - genType extend( - genType const & Origin, - genType const & Source, - typename genType::value_type const Length); - - /// @} -}//namespace glm - -#include "extend.inl" - -#endif//GLM_GTX_extend +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_extend +/// @file glm/gtx/extend.hpp +/// @date 2006-01-07 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_extend GLM_GTX_extend +/// @ingroup gtx +/// +/// @brief Extend a position from a source to a position at a defined length. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_extend +#define GLM_GTX_extend GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_extend extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_extend + /// @{ + + /// Extends of Length the Origin position using the (Source - Origin) direction. + /// @see gtx_extend + template + genType extend( + genType const & Origin, + genType const & Source, + typename genType::value_type const Length); + + /// @} +}//namespace glm + +#include "extend.inl" + +#endif//GLM_GTX_extend diff --git a/include/gal/opengl/glm/gtx/extend.inl b/include/gal/opengl/glm/gtx/extend.inl index 0903549ba5..b65a69f257 100644 --- a/include/gal/opengl/glm/gtx/extend.inl +++ b/include/gal/opengl/glm/gtx/extend.inl @@ -1,55 +1,55 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2006-01-07 -// Updated : 2008-10-05 -// Licence : This source is under MIT License -// File : glm/gtx/extend.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - genType extend - ( - genType const & Origin, - genType const & Source, - genType const & Distance - ) - { - return Origin + (Source - Origin) * Distance; - } - - template - detail::tvec2 extend - ( - detail::tvec2 const & Origin, - detail::tvec2 const & Source, - valType const & Distance - ) - { - return Origin + (Source - Origin) * Distance; - } - - template - detail::tvec3 extend - ( - detail::tvec3 const & Origin, - detail::tvec3 const & Source, - valType const & Distance - ) - { - return Origin + (Source - Origin) * Distance; - } - - template - detail::tvec4 extend - ( - detail::tvec4 const & Origin, - detail::tvec4 const & Source, - valType const & Distance - ) - { - return Origin + (Source - Origin) * Distance; - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2006-01-07 +// Updated : 2008-10-05 +// Licence : This source is under MIT License +// File : glm/gtx/extend.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + genType extend + ( + genType const & Origin, + genType const & Source, + genType const & Distance + ) + { + return Origin + (Source - Origin) * Distance; + } + + template + detail::tvec2 extend + ( + detail::tvec2 const & Origin, + detail::tvec2 const & Source, + valType const & Distance + ) + { + return Origin + (Source - Origin) * Distance; + } + + template + detail::tvec3 extend + ( + detail::tvec3 const & Origin, + detail::tvec3 const & Source, + valType const & Distance + ) + { + return Origin + (Source - Origin) * Distance; + } + + template + detail::tvec4 extend + ( + detail::tvec4 const & Origin, + detail::tvec4 const & Source, + valType const & Distance + ) + { + return Origin + (Source - Origin) * Distance; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/extented_min_max.hpp b/include/gal/opengl/glm/gtx/extented_min_max.hpp index a29b34f271..5b2eba8250 100644 --- a/include/gal/opengl/glm/gtx/extented_min_max.hpp +++ b/include/gal/opengl/glm/gtx/extented_min_max.hpp @@ -1,194 +1,194 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_extented_min_max -/// @file glm/gtx/extented_min_max.hpp -/// @date 2007-03-14 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_half_float (dependence) -/// -/// @defgroup gtx_extented_min_max GLM_GTX_extented_min_max -/// @ingroup gtx -/// -/// Min and max functions for 3 to 4 parameters. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_extented_min_max -#define GLM_GTX_extented_min_max GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtc/half_float.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_extented_min_max extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_extented_min_max - /// @{ - - /// Return the minimum component-wise values of 3 inputs - /// @see gtx_extented_min_max - template - T min( - T const & x, - T const & y, - T const & z); - - /// Return the minimum component-wise values of 3 inputs - /// @see gtx_extented_min_max - template - < - typename T, - template class C - > - C min( - C const & x, - typename C::value_type const & y, - typename C::value_type const & z); - - /// Return the minimum component-wise values of 3 inputs - /// @see gtx_extented_min_max - template - < - typename T, - template class C - > - C min( - C const & x, - C const & y, - C const & z); - - /// Return the minimum component-wise values of 4 inputs - /// @see gtx_extented_min_max - template - T min( - T const & x, - T const & y, - T const & z, - T const & w); - - /// Return the minimum component-wise values of 4 inputs - /// @see gtx_extented_min_max - template - < - typename T, - template class C - > - C min( - C const & x, - typename C::value_type const & y, - typename C::value_type const & z, - typename C::value_type const & w); - - /// Return the minimum component-wise values of 4 inputs - /// @see gtx_extented_min_max - template - < - typename T, - template class C - > - C min( - C const & x, - C const & y, - C const & z, - C const & w); - - /// Return the maximum component-wise values of 3 inputs - /// @see gtx_extented_min_max - template - T max( - T const & x, - T const & y, - T const & z); - - /// Return the maximum component-wise values of 3 inputs - /// @see gtx_extented_min_max - template - < - typename T, - template class C - > - C max( - C const & x, - typename C::value_type const & y, - typename C::value_type const & z); - - /// Return the maximum component-wise values of 3 inputs - /// @see gtx_extented_min_max - template - < - typename T, - template class C - > - C max( - C const & x, - C const & y, - C const & z); - - /// Return the maximum component-wise values of 4 inputs - /// @see gtx_extented_min_max - template - T max( - T const & x, - T const & y, - T const & z, - T const & w); - - /// Return the maximum component-wise values of 4 inputs - /// @see gtx_extented_min_max - template - < - typename T, - template class C - > - C max( - C const & x, - typename C::value_type const & y, - typename C::value_type const & z, - typename C::value_type const & w); - - /// Return the maximum component-wise values of 4 inputs - /// @see gtx_extented_min_max - template - < - typename T, - template class C - > - C max( - C const & x, - C const & y, - C const & z, - C const & w); - - /// @} -}//namespace glm - -#include "extented_min_max.inl" - -#endif//GLM_GTX_extented_min_max +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_extented_min_max +/// @file glm/gtx/extented_min_max.hpp +/// @date 2007-03-14 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_half_float (dependence) +/// +/// @defgroup gtx_extented_min_max GLM_GTX_extented_min_max +/// @ingroup gtx +/// +/// Min and max functions for 3 to 4 parameters. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_extented_min_max +#define GLM_GTX_extented_min_max GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_extented_min_max extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_extented_min_max + /// @{ + + /// Return the minimum component-wise values of 3 inputs + /// @see gtx_extented_min_max + template + T min( + T const & x, + T const & y, + T const & z); + + /// Return the minimum component-wise values of 3 inputs + /// @see gtx_extented_min_max + template + < + typename T, + template class C + > + C min( + C const & x, + typename C::value_type const & y, + typename C::value_type const & z); + + /// Return the minimum component-wise values of 3 inputs + /// @see gtx_extented_min_max + template + < + typename T, + template class C + > + C min( + C const & x, + C const & y, + C const & z); + + /// Return the minimum component-wise values of 4 inputs + /// @see gtx_extented_min_max + template + T min( + T const & x, + T const & y, + T const & z, + T const & w); + + /// Return the minimum component-wise values of 4 inputs + /// @see gtx_extented_min_max + template + < + typename T, + template class C + > + C min( + C const & x, + typename C::value_type const & y, + typename C::value_type const & z, + typename C::value_type const & w); + + /// Return the minimum component-wise values of 4 inputs + /// @see gtx_extented_min_max + template + < + typename T, + template class C + > + C min( + C const & x, + C const & y, + C const & z, + C const & w); + + /// Return the maximum component-wise values of 3 inputs + /// @see gtx_extented_min_max + template + T max( + T const & x, + T const & y, + T const & z); + + /// Return the maximum component-wise values of 3 inputs + /// @see gtx_extented_min_max + template + < + typename T, + template class C + > + C max( + C const & x, + typename C::value_type const & y, + typename C::value_type const & z); + + /// Return the maximum component-wise values of 3 inputs + /// @see gtx_extented_min_max + template + < + typename T, + template class C + > + C max( + C const & x, + C const & y, + C const & z); + + /// Return the maximum component-wise values of 4 inputs + /// @see gtx_extented_min_max + template + T max( + T const & x, + T const & y, + T const & z, + T const & w); + + /// Return the maximum component-wise values of 4 inputs + /// @see gtx_extented_min_max + template + < + typename T, + template class C + > + C max( + C const & x, + typename C::value_type const & y, + typename C::value_type const & z, + typename C::value_type const & w); + + /// Return the maximum component-wise values of 4 inputs + /// @see gtx_extented_min_max + template + < + typename T, + template class C + > + C max( + C const & x, + C const & y, + C const & z, + C const & w); + + /// @} +}//namespace glm + +#include "extented_min_max.inl" + +#endif//GLM_GTX_extented_min_max diff --git a/include/gal/opengl/glm/gtx/extented_min_max.inl b/include/gal/opengl/glm/gtx/extented_min_max.inl index a19ad9cff3..5102c9a04c 100644 --- a/include/gal/opengl/glm/gtx/extented_min_max.inl +++ b/include/gal/opengl/glm/gtx/extented_min_max.inl @@ -1,178 +1,178 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2007-03-14 -// Updated : 2010-02-19 -// Licence : This source is under MIT License -// File : gtx_extented_min_max.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER T min( - T const & x, - T const & y, - T const & z) - { - return glm::min(glm::min(x, y), z); - } - - template - < - typename T, - template class C - > - GLM_FUNC_QUALIFIER C min - ( - C const & x, - typename C::value_type const & y, - typename C::value_type const & z - ) - { - return glm::min(glm::min(x, y), z); - } - - template - < - typename T, - template class C - > - GLM_FUNC_QUALIFIER C min - ( - C const & x, - C const & y, - C const & z - ) - { - return glm::min(glm::min(x, y), z); - } - - template - GLM_FUNC_QUALIFIER T min - ( - T const & x, - T const & y, - T const & z, - T const & w - ) - { - return glm::min(glm::min(x, y), glm::min(z, w)); - } - - template - < - typename T, - template class C - > - GLM_FUNC_QUALIFIER C min - ( - C const & x, - typename C::value_type const & y, - typename C::value_type const & z, - typename C::value_type const & w - ) - { - return glm::min(glm::min(x, y), glm::min(z, w)); - } - - template - < - typename T, - template class C - > - GLM_FUNC_QUALIFIER C min - ( - C const & x, - C const & y, - C const & z, - C const & w - ) - { - return glm::min(glm::min(x, y), glm::min(z, w)); - } - - template - GLM_FUNC_QUALIFIER T max( - T const & x, - T const & y, - T const & z) - { - return glm::max(glm::max(x, y), z); - } - - template - < - typename T, - template class C - > - GLM_FUNC_QUALIFIER C max - ( - C const & x, - typename C::value_type const & y, - typename C::value_type const & z - ) - { - return glm::max(glm::max(x, y), z); - } - - template - < - typename T, - template class C - > - GLM_FUNC_QUALIFIER C max - ( - C const & x, - C const & y, - C const & z - ) - { - return glm::max(glm::max(x, y), z); - } - - template - GLM_FUNC_QUALIFIER T max - ( - T const & x, - T const & y, - T const & z, - T const & w - ) - { - return glm::max(glm::max(x, y), glm::max(z, w)); - } - - template - < - typename T, - template class C - > - GLM_FUNC_QUALIFIER C max - ( - C const & x, - typename C::value_type const & y, - typename C::value_type const & z, - typename C::value_type const & w - ) - { - return glm::max(glm::max(x, y), glm::max(z, w)); - } - - template - < - typename T, - template class C - > - GLM_FUNC_QUALIFIER C max - ( - C const & x, - C const & y, - C const & z, - C const & w - ) - { - return glm::max(glm::max(x, y), glm::max(z, w)); - } - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-03-14 +// Updated : 2010-02-19 +// Licence : This source is under MIT License +// File : gtx_extented_min_max.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER T min( + T const & x, + T const & y, + T const & z) + { + return glm::min(glm::min(x, y), z); + } + + template + < + typename T, + template class C + > + GLM_FUNC_QUALIFIER C min + ( + C const & x, + typename C::value_type const & y, + typename C::value_type const & z + ) + { + return glm::min(glm::min(x, y), z); + } + + template + < + typename T, + template class C + > + GLM_FUNC_QUALIFIER C min + ( + C const & x, + C const & y, + C const & z + ) + { + return glm::min(glm::min(x, y), z); + } + + template + GLM_FUNC_QUALIFIER T min + ( + T const & x, + T const & y, + T const & z, + T const & w + ) + { + return glm::min(glm::min(x, y), glm::min(z, w)); + } + + template + < + typename T, + template class C + > + GLM_FUNC_QUALIFIER C min + ( + C const & x, + typename C::value_type const & y, + typename C::value_type const & z, + typename C::value_type const & w + ) + { + return glm::min(glm::min(x, y), glm::min(z, w)); + } + + template + < + typename T, + template class C + > + GLM_FUNC_QUALIFIER C min + ( + C const & x, + C const & y, + C const & z, + C const & w + ) + { + return glm::min(glm::min(x, y), glm::min(z, w)); + } + + template + GLM_FUNC_QUALIFIER T max( + T const & x, + T const & y, + T const & z) + { + return glm::max(glm::max(x, y), z); + } + + template + < + typename T, + template class C + > + GLM_FUNC_QUALIFIER C max + ( + C const & x, + typename C::value_type const & y, + typename C::value_type const & z + ) + { + return glm::max(glm::max(x, y), z); + } + + template + < + typename T, + template class C + > + GLM_FUNC_QUALIFIER C max + ( + C const & x, + C const & y, + C const & z + ) + { + return glm::max(glm::max(x, y), z); + } + + template + GLM_FUNC_QUALIFIER T max + ( + T const & x, + T const & y, + T const & z, + T const & w + ) + { + return glm::max(glm::max(x, y), glm::max(z, w)); + } + + template + < + typename T, + template class C + > + GLM_FUNC_QUALIFIER C max + ( + C const & x, + typename C::value_type const & y, + typename C::value_type const & z, + typename C::value_type const & w + ) + { + return glm::max(glm::max(x, y), glm::max(z, w)); + } + + template + < + typename T, + template class C + > + GLM_FUNC_QUALIFIER C max + ( + C const & x, + C const & y, + C const & z, + C const & w + ) + { + return glm::max(glm::max(x, y), glm::max(z, w)); + } + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/fast_exponential.hpp b/include/gal/opengl/glm/gtx/fast_exponential.hpp index 6f37b31474..e4fd8174c8 100644 --- a/include/gal/opengl/glm/gtx/fast_exponential.hpp +++ b/include/gal/opengl/glm/gtx/fast_exponential.hpp @@ -1,99 +1,99 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_fast_exponential -/// @file glm/gtx/fast_exponential.hpp -/// @date 2006-01-09 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_half_float (dependence) -/// -/// @defgroup gtx_fast_exponential GLM_GTX_fast_exponential -/// @ingroup gtx -/// -/// @brief Fast but less accurate implementations of exponential based functions. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_fast_exponential -#define GLM_GTX_fast_exponential GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtc/half_float.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_fast_exponential extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_fast_exponential - /// @{ - - /// Faster than the common pow function but less accurate. - /// @see gtx_fast_exponential - template - genType fastPow( - genType const & x, - genType const & y); - - /// Faster than the common pow function but less accurate. - /// @see gtx_fast_exponential - template - genTypeT fastPow( - genTypeT const & x, - genTypeU const & y); - - /// Faster than the common exp function but less accurate. - /// @see gtx_fast_exponential - template - T fastExp(const T& x); - - /// Faster than the common log function but less accurate. - /// @see gtx_fast_exponential - template - T fastLog(const T& x); - - /// Faster than the common exp2 function but less accurate. - /// @see gtx_fast_exponential - template - T fastExp2(const T& x); - - /// Faster than the common log2 function but less accurate. - /// @see gtx_fast_exponential - template - T fastLog2(const T& x); - - /// Faster than the common ln function but less accurate. - /// @see gtx_fast_exponential - template - T fastLn(const T& x); - - /// @} -}//namespace glm - -#include "fast_exponential.inl" - -#endif//GLM_GTX_fast_exponential +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_fast_exponential +/// @file glm/gtx/fast_exponential.hpp +/// @date 2006-01-09 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_half_float (dependence) +/// +/// @defgroup gtx_fast_exponential GLM_GTX_fast_exponential +/// @ingroup gtx +/// +/// @brief Fast but less accurate implementations of exponential based functions. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_fast_exponential +#define GLM_GTX_fast_exponential GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_fast_exponential extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_fast_exponential + /// @{ + + /// Faster than the common pow function but less accurate. + /// @see gtx_fast_exponential + template + genType fastPow( + genType const & x, + genType const & y); + + /// Faster than the common pow function but less accurate. + /// @see gtx_fast_exponential + template + genTypeT fastPow( + genTypeT const & x, + genTypeU const & y); + + /// Faster than the common exp function but less accurate. + /// @see gtx_fast_exponential + template + T fastExp(const T& x); + + /// Faster than the common log function but less accurate. + /// @see gtx_fast_exponential + template + T fastLog(const T& x); + + /// Faster than the common exp2 function but less accurate. + /// @see gtx_fast_exponential + template + T fastExp2(const T& x); + + /// Faster than the common log2 function but less accurate. + /// @see gtx_fast_exponential + template + T fastLog2(const T& x); + + /// Faster than the common ln function but less accurate. + /// @see gtx_fast_exponential + template + T fastLn(const T& x); + + /// @} +}//namespace glm + +#include "fast_exponential.inl" + +#endif//GLM_GTX_fast_exponential diff --git a/include/gal/opengl/glm/gtx/fast_exponential.inl b/include/gal/opengl/glm/gtx/fast_exponential.inl index 702a758fc8..3f29bfa911 100644 --- a/include/gal/opengl/glm/gtx/fast_exponential.inl +++ b/include/gal/opengl/glm/gtx/fast_exponential.inl @@ -1,148 +1,148 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2006-01-09 -// Updated : 2006-01-09 -// Licence : This source is under MIT License -// File : glm/gtx/fast_exponential.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - // fastPow: - template - GLM_FUNC_QUALIFIER genType fastPow(genType const & x, genType const & y) - { - return exp(y * log(x)); - } - - VECTORIZE_VEC_VEC(fastPow) - - template - GLM_FUNC_QUALIFIER T fastPow(const T x, int y) - { - T f = T(1); - for(int i = 0; i < y; ++i) - f *= x; - return f; - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 fastPow( - const detail::tvec2& x, - const detail::tvec2& y) - { - return detail::tvec2( - fastPow(x.x, y.x), - fastPow(x.y, y.y)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 fastPow( - const detail::tvec3& x, - const detail::tvec3& y) - { - return detail::tvec3( - fastPow(x.x, y.x), - fastPow(x.y, y.y), - fastPow(x.z, y.z)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 fastPow( - const detail::tvec4& x, - const detail::tvec4& y) - { - return detail::tvec4( - fastPow(x.x, y.x), - fastPow(x.y, y.y), - fastPow(x.z, y.z), - fastPow(x.w, y.w)); - } - - // fastExp - // Note: This function provides accurate results only for value between -1 and 1, else avoid it. - template - GLM_FUNC_QUALIFIER T fastExp(const T x) - { - // This has a better looking and same performance in release mode than the following code. However, in debug mode it's slower. - // return 1.0f + x * (1.0f + x * 0.5f * (1.0f + x * 0.3333333333f * (1.0f + x * 0.25 * (1.0f + x * 0.2f)))); - T x2 = x * x; - T x3 = x2 * x; - T x4 = x3 * x; - T x5 = x4 * x; - return T(1) + x + (x2 * T(0.5)) + (x3 * T(0.1666666667)) + (x4 * T(0.041666667)) + (x5 * T(0.008333333333)); - } - /* // Try to handle all values of float... but often shower than std::exp, glm::floor and the loop kill the performance - GLM_FUNC_QUALIFIER float fastExp(float x) - { - const float e = 2.718281828f; - const float IntegerPart = floor(x); - const float FloatPart = x - IntegerPart; - float z = 1.f; - - for(int i = 0; i < int(IntegerPart); ++i) - z *= e; - - const float x2 = FloatPart * FloatPart; - const float x3 = x2 * FloatPart; - const float x4 = x3 * FloatPart; - const float x5 = x4 * FloatPart; - return z * (1.0f + FloatPart + (x2 * 0.5f) + (x3 * 0.1666666667f) + (x4 * 0.041666667f) + (x5 * 0.008333333333f)); - } - - // Increase accuracy on number bigger that 1 and smaller than -1 but it's not enough for high and negative numbers - GLM_FUNC_QUALIFIER float fastExp(float x) - { - // This has a better looking and same performance in release mode than the following code. However, in debug mode it's slower. - // return 1.0f + x * (1.0f + x * 0.5f * (1.0f + x * 0.3333333333f * (1.0f + x * 0.25 * (1.0f + x * 0.2f)))); - float x2 = x * x; - float x3 = x2 * x; - float x4 = x3 * x; - float x5 = x4 * x; - float x6 = x5 * x; - float x7 = x6 * x; - float x8 = x7 * x; - return 1.0f + x + (x2 * 0.5f) + (x3 * 0.1666666667f) + (x4 * 0.041666667f) + (x5 * 0.008333333333f)+ (x6 * 0.00138888888888f) + (x7 * 0.000198412698f) + (x8 * 0.0000248015873f);; - } - */ - - VECTORIZE_VEC(fastExp) - - // fastLog - template - GLM_FUNC_QUALIFIER genType fastLog(genType const & x) - { - return std::log(x); - } - - /* Slower than the VC7.1 function... - GLM_FUNC_QUALIFIER float fastLog(float x) - { - float y1 = (x - 1.0f) / (x + 1.0f); - float y2 = y1 * y1; - return 2.0f * y1 * (1.0f + y2 * (0.3333333333f + y2 * (0.2f + y2 * 0.1428571429f))); - } - */ - - VECTORIZE_VEC(fastLog) - - //fastExp2, ln2 = 0.69314718055994530941723212145818f - template - GLM_FUNC_QUALIFIER genType fastExp2(genType const & x) - { - return fastExp(0.69314718055994530941723212145818f * x); - } - - VECTORIZE_VEC(fastExp2) - - // fastLog2, ln2 = 0.69314718055994530941723212145818f - template - GLM_FUNC_QUALIFIER genType fastLog2(genType const & x) - { - return fastLog(x) / 0.69314718055994530941723212145818f; - } - - VECTORIZE_VEC(fastLog2) - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2006-01-09 +// Updated : 2006-01-09 +// Licence : This source is under MIT License +// File : glm/gtx/fast_exponential.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + // fastPow: + template + GLM_FUNC_QUALIFIER genType fastPow(genType const & x, genType const & y) + { + return exp(y * log(x)); + } + + VECTORIZE_VEC_VEC(fastPow) + + template + GLM_FUNC_QUALIFIER T fastPow(const T x, int y) + { + T f = T(1); + for(int i = 0; i < y; ++i) + f *= x; + return f; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 fastPow( + const detail::tvec2& x, + const detail::tvec2& y) + { + return detail::tvec2( + fastPow(x.x, y.x), + fastPow(x.y, y.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 fastPow( + const detail::tvec3& x, + const detail::tvec3& y) + { + return detail::tvec3( + fastPow(x.x, y.x), + fastPow(x.y, y.y), + fastPow(x.z, y.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 fastPow( + const detail::tvec4& x, + const detail::tvec4& y) + { + return detail::tvec4( + fastPow(x.x, y.x), + fastPow(x.y, y.y), + fastPow(x.z, y.z), + fastPow(x.w, y.w)); + } + + // fastExp + // Note: This function provides accurate results only for value between -1 and 1, else avoid it. + template + GLM_FUNC_QUALIFIER T fastExp(const T x) + { + // This has a better looking and same performance in release mode than the following code. However, in debug mode it's slower. + // return 1.0f + x * (1.0f + x * 0.5f * (1.0f + x * 0.3333333333f * (1.0f + x * 0.25 * (1.0f + x * 0.2f)))); + T x2 = x * x; + T x3 = x2 * x; + T x4 = x3 * x; + T x5 = x4 * x; + return T(1) + x + (x2 * T(0.5)) + (x3 * T(0.1666666667)) + (x4 * T(0.041666667)) + (x5 * T(0.008333333333)); + } + /* // Try to handle all values of float... but often shower than std::exp, glm::floor and the loop kill the performance + GLM_FUNC_QUALIFIER float fastExp(float x) + { + const float e = 2.718281828f; + const float IntegerPart = floor(x); + const float FloatPart = x - IntegerPart; + float z = 1.f; + + for(int i = 0; i < int(IntegerPart); ++i) + z *= e; + + const float x2 = FloatPart * FloatPart; + const float x3 = x2 * FloatPart; + const float x4 = x3 * FloatPart; + const float x5 = x4 * FloatPart; + return z * (1.0f + FloatPart + (x2 * 0.5f) + (x3 * 0.1666666667f) + (x4 * 0.041666667f) + (x5 * 0.008333333333f)); + } + + // Increase accuracy on number bigger that 1 and smaller than -1 but it's not enough for high and negative numbers + GLM_FUNC_QUALIFIER float fastExp(float x) + { + // This has a better looking and same performance in release mode than the following code. However, in debug mode it's slower. + // return 1.0f + x * (1.0f + x * 0.5f * (1.0f + x * 0.3333333333f * (1.0f + x * 0.25 * (1.0f + x * 0.2f)))); + float x2 = x * x; + float x3 = x2 * x; + float x4 = x3 * x; + float x5 = x4 * x; + float x6 = x5 * x; + float x7 = x6 * x; + float x8 = x7 * x; + return 1.0f + x + (x2 * 0.5f) + (x3 * 0.1666666667f) + (x4 * 0.041666667f) + (x5 * 0.008333333333f)+ (x6 * 0.00138888888888f) + (x7 * 0.000198412698f) + (x8 * 0.0000248015873f);; + } + */ + + VECTORIZE_VEC(fastExp) + + // fastLog + template + GLM_FUNC_QUALIFIER genType fastLog(genType const & x) + { + return std::log(x); + } + + /* Slower than the VC7.1 function... + GLM_FUNC_QUALIFIER float fastLog(float x) + { + float y1 = (x - 1.0f) / (x + 1.0f); + float y2 = y1 * y1; + return 2.0f * y1 * (1.0f + y2 * (0.3333333333f + y2 * (0.2f + y2 * 0.1428571429f))); + } + */ + + VECTORIZE_VEC(fastLog) + + //fastExp2, ln2 = 0.69314718055994530941723212145818f + template + GLM_FUNC_QUALIFIER genType fastExp2(genType const & x) + { + return fastExp(0.69314718055994530941723212145818f * x); + } + + VECTORIZE_VEC(fastExp2) + + // fastLog2, ln2 = 0.69314718055994530941723212145818f + template + GLM_FUNC_QUALIFIER genType fastLog2(genType const & x) + { + return fastLog(x) / 0.69314718055994530941723212145818f; + } + + VECTORIZE_VEC(fastLog2) + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/fast_square_root.hpp b/include/gal/opengl/glm/gtx/fast_square_root.hpp index 2665f10d40..323c8ad59a 100644 --- a/include/gal/opengl/glm/gtx/fast_square_root.hpp +++ b/include/gal/opengl/glm/gtx/fast_square_root.hpp @@ -1,85 +1,85 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_fast_square_root -/// @file glm/gtx/fast_square_root.hpp -/// @date 2006-01-04 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_fast_square_root GLM_GTX_fast_square_root -/// @ingroup gtx -/// -/// @brief Fast but less accurate implementations of square root based functions. -/// - Sqrt optimisation based on Newton's method, -/// www.gamedev.net/community/forums/topic.asp?topic id=139956 -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_fast_square_root -#define GLM_GTX_fast_square_root GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_fast_square_root extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_fast_square_root - /// @{ - - //! Faster than the common sqrt function but less accurate. - //! From GLM_GTX_fast_square_root extension. - template - genType fastSqrt(genType const & x); - - //! Faster than the common inversesqrt function but less accurate. - //! From GLM_GTX_fast_square_root extension. - template - genType fastInverseSqrt(genType const & x); - - //! Faster than the common length function but less accurate. - //! From GLM_GTX_fast_square_root extension. - template - typename genType::value_type fastLength(genType const & x); - - //! Faster than the common distance function but less accurate. - //! From GLM_GTX_fast_square_root extension. - template - typename genType::value_type fastDistance(genType const & x, genType const & y); - - //! Faster than the common normalize function but less accurate. - //! From GLM_GTX_fast_square_root extension. - template - genType fastNormalize(genType const & x); - - /// @} -}// namespace glm - -#include "fast_square_root.inl" - -#endif//GLM_GTX_fast_square_root +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_fast_square_root +/// @file glm/gtx/fast_square_root.hpp +/// @date 2006-01-04 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_fast_square_root GLM_GTX_fast_square_root +/// @ingroup gtx +/// +/// @brief Fast but less accurate implementations of square root based functions. +/// - Sqrt optimisation based on Newton's method, +/// www.gamedev.net/community/forums/topic.asp?topic id=139956 +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_fast_square_root +#define GLM_GTX_fast_square_root GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_fast_square_root extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_fast_square_root + /// @{ + + //! Faster than the common sqrt function but less accurate. + //! From GLM_GTX_fast_square_root extension. + template + genType fastSqrt(genType const & x); + + //! Faster than the common inversesqrt function but less accurate. + //! From GLM_GTX_fast_square_root extension. + template + genType fastInverseSqrt(genType const & x); + + //! Faster than the common length function but less accurate. + //! From GLM_GTX_fast_square_root extension. + template + typename genType::value_type fastLength(genType const & x); + + //! Faster than the common distance function but less accurate. + //! From GLM_GTX_fast_square_root extension. + template + typename genType::value_type fastDistance(genType const & x, genType const & y); + + //! Faster than the common normalize function but less accurate. + //! From GLM_GTX_fast_square_root extension. + template + genType fastNormalize(genType const & x); + + /// @} +}// namespace glm + +#include "fast_square_root.inl" + +#endif//GLM_GTX_fast_square_root diff --git a/include/gal/opengl/glm/gtx/fast_square_root.inl b/include/gal/opengl/glm/gtx/fast_square_root.inl index fc6d5a493c..b904381cb5 100644 --- a/include/gal/opengl/glm/gtx/fast_square_root.inl +++ b/include/gal/opengl/glm/gtx/fast_square_root.inl @@ -1,136 +1,136 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2006-01-04 -// Updated : 2011-10-14 -// Licence : This source is under MIT License -// File : glm/gtx/fast_square_root.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - // fastSqrt - template - GLM_FUNC_QUALIFIER genType fastSqrt - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float, "'fastSqrt' only accept floating-point input"); - - return genType(1) / fastInverseSqrt(x); - } - - VECTORIZE_VEC(fastSqrt) - - // fastInversesqrt - template - GLM_FUNC_QUALIFIER genType fastInverseSqrt - ( - genType const & x - ) - { - genType tmp = x; - float xhalf = 0.5f * float(tmp); - uint i = *(uint*)&x; - i = 0x5f375a86 - (i >> 1); - //x = *(float*)&i; - //x = *((float*)(char*)&i); - tmp = detail::uif(i).f; - tmp = tmp * (1.5f - xhalf * tmp * tmp); - return genType(tmp); - } - - VECTORIZE_VEC(fastInverseSqrt) - - // fastLength - template - GLM_FUNC_QUALIFIER genType fastLength - ( - genType const & x - ) - { - return abs(x); - } - - template - GLM_FUNC_QUALIFIER valType fastLength - ( - detail::tvec2 const & x - ) - { - valType sqr = x.x * x.x + x.y * x.y; - return fastSqrt(sqr); - } - - template - GLM_FUNC_QUALIFIER valType fastLength - ( - detail::tvec3 const & x - ) - { - valType sqr = x.x * x.x + x.y * x.y + x.z * x.z; - return fastSqrt(sqr); - } - - template - GLM_FUNC_QUALIFIER valType fastLength - ( - detail::tvec4 const & x - ) - { - valType sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w; - return fastSqrt(sqr); - } - - // fastDistance - template - GLM_FUNC_QUALIFIER genType fastDistance - ( - genType const & x, - genType const & y - ) - { - return fastLength(y - x); - } - - // fastNormalize - template - GLM_FUNC_QUALIFIER genType fastNormalize - ( - genType const & x - ) - { - return x > genType(0) ? genType(1) : -genType(1); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 fastNormalize - ( - detail::tvec2 const & x - ) - { - valType sqr = x.x * x.x + x.y * x.y; - return x * fastInverseSqrt(sqr); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 fastNormalize - ( - detail::tvec3 const & x - ) - { - valType sqr = x.x * x.x + x.y * x.y + x.z * x.z; - return x * fastInverseSqrt(sqr); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 fastNormalize - ( - detail::tvec4 const & x - ) - { - valType sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w; - return x * fastInverseSqrt(sqr); - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2006-01-04 +// Updated : 2011-10-14 +// Licence : This source is under MIT License +// File : glm/gtx/fast_square_root.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + // fastSqrt + template + GLM_FUNC_QUALIFIER genType fastSqrt + ( + genType const & x + ) + { + GLM_STATIC_ASSERT(detail::type::is_float, "'fastSqrt' only accept floating-point input"); + + return genType(1) / fastInverseSqrt(x); + } + + VECTORIZE_VEC(fastSqrt) + + // fastInversesqrt + template + GLM_FUNC_QUALIFIER genType fastInverseSqrt + ( + genType const & x + ) + { + genType tmp = x; + float xhalf = 0.5f * float(tmp); + uint i = *(uint*)&x; + i = 0x5f375a86 - (i >> 1); + //x = *(float*)&i; + //x = *((float*)(char*)&i); + tmp = detail::uif(i).f; + tmp = tmp * (1.5f - xhalf * tmp * tmp); + return genType(tmp); + } + + VECTORIZE_VEC(fastInverseSqrt) + + // fastLength + template + GLM_FUNC_QUALIFIER genType fastLength + ( + genType const & x + ) + { + return abs(x); + } + + template + GLM_FUNC_QUALIFIER valType fastLength + ( + detail::tvec2 const & x + ) + { + valType sqr = x.x * x.x + x.y * x.y; + return fastSqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER valType fastLength + ( + detail::tvec3 const & x + ) + { + valType sqr = x.x * x.x + x.y * x.y + x.z * x.z; + return fastSqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER valType fastLength + ( + detail::tvec4 const & x + ) + { + valType sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w; + return fastSqrt(sqr); + } + + // fastDistance + template + GLM_FUNC_QUALIFIER genType fastDistance + ( + genType const & x, + genType const & y + ) + { + return fastLength(y - x); + } + + // fastNormalize + template + GLM_FUNC_QUALIFIER genType fastNormalize + ( + genType const & x + ) + { + return x > genType(0) ? genType(1) : -genType(1); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 fastNormalize + ( + detail::tvec2 const & x + ) + { + valType sqr = x.x * x.x + x.y * x.y; + return x * fastInverseSqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 fastNormalize + ( + detail::tvec3 const & x + ) + { + valType sqr = x.x * x.x + x.y * x.y + x.z * x.z; + return x * fastInverseSqrt(sqr); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 fastNormalize + ( + detail::tvec4 const & x + ) + { + valType sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w; + return x * fastInverseSqrt(sqr); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/fast_trigonometry.hpp b/include/gal/opengl/glm/gtx/fast_trigonometry.hpp index eed954fecd..adb7ec4e9b 100644 --- a/include/gal/opengl/glm/gtx/fast_trigonometry.hpp +++ b/include/gal/opengl/glm/gtx/fast_trigonometry.hpp @@ -1,100 +1,100 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_fast_trigonometry -/// @file glm/gtx/fast_trigonometry.hpp -/// @date 2006-01-08 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_fast_trigonometry GLM_GTX_fast_trigonometry -/// @ingroup gtx -/// -/// @brief Fast but less accurate implementations of trigonometric functions. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_fast_trigonometry -#define GLM_GTX_fast_trigonometry GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_fast_trigonometry extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_fast_trigonometry - /// @{ - - //! Faster than the common sin function but less accurate. - //! Defined between -2pi and 2pi. - //! From GLM_GTX_fast_trigonometry extension. - template - T fastSin(const T& angle); - - //! Faster than the common cos function but less accurate. - //! Defined between -2pi and 2pi. - //! From GLM_GTX_fast_trigonometry extension. - template - T fastCos(const T& angle); - - //! Faster than the common tan function but less accurate. - //! Defined between -2pi and 2pi. - //! From GLM_GTX_fast_trigonometry extension. - template - T fastTan(const T& angle); - - //! Faster than the common asin function but less accurate. - //! Defined between -2pi and 2pi. - //! From GLM_GTX_fast_trigonometry extension. - template - T fastAsin(const T& angle); - - //! Faster than the common acos function but less accurate. - //! Defined between -2pi and 2pi. - //! From GLM_GTX_fast_trigonometry extension. - template - T fastAcos(const T& angle); - - //! Faster than the common atan function but less accurate. - //! Defined between -2pi and 2pi. - //! From GLM_GTX_fast_trigonometry extension. - template - T fastAtan(const T& y, const T& x); - - //! Faster than the common atan function but less accurate. - //! Defined between -2pi and 2pi. - //! From GLM_GTX_fast_trigonometry extension. - template - T fastAtan(const T& angle); - - /// @} -}//namespace glm - -#include "fast_trigonometry.inl" - -#endif//GLM_GTX_fast_trigonometry +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_fast_trigonometry +/// @file glm/gtx/fast_trigonometry.hpp +/// @date 2006-01-08 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_fast_trigonometry GLM_GTX_fast_trigonometry +/// @ingroup gtx +/// +/// @brief Fast but less accurate implementations of trigonometric functions. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_fast_trigonometry +#define GLM_GTX_fast_trigonometry GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_fast_trigonometry extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_fast_trigonometry + /// @{ + + //! Faster than the common sin function but less accurate. + //! Defined between -2pi and 2pi. + //! From GLM_GTX_fast_trigonometry extension. + template + T fastSin(const T& angle); + + //! Faster than the common cos function but less accurate. + //! Defined between -2pi and 2pi. + //! From GLM_GTX_fast_trigonometry extension. + template + T fastCos(const T& angle); + + //! Faster than the common tan function but less accurate. + //! Defined between -2pi and 2pi. + //! From GLM_GTX_fast_trigonometry extension. + template + T fastTan(const T& angle); + + //! Faster than the common asin function but less accurate. + //! Defined between -2pi and 2pi. + //! From GLM_GTX_fast_trigonometry extension. + template + T fastAsin(const T& angle); + + //! Faster than the common acos function but less accurate. + //! Defined between -2pi and 2pi. + //! From GLM_GTX_fast_trigonometry extension. + template + T fastAcos(const T& angle); + + //! Faster than the common atan function but less accurate. + //! Defined between -2pi and 2pi. + //! From GLM_GTX_fast_trigonometry extension. + template + T fastAtan(const T& y, const T& x); + + //! Faster than the common atan function but less accurate. + //! Defined between -2pi and 2pi. + //! From GLM_GTX_fast_trigonometry extension. + template + T fastAtan(const T& angle); + + /// @} +}//namespace glm + +#include "fast_trigonometry.inl" + +#endif//GLM_GTX_fast_trigonometry diff --git a/include/gal/opengl/glm/gtx/fast_trigonometry.inl b/include/gal/opengl/glm/gtx/fast_trigonometry.inl index caf677772e..74536cb1f2 100644 --- a/include/gal/opengl/glm/gtx/fast_trigonometry.inl +++ b/include/gal/opengl/glm/gtx/fast_trigonometry.inl @@ -1,75 +1,75 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2006-01-08 -// Updated : 2011-10-14 -// Licence : This source is under MIT License -// File : glm/gtx/fast_trigonometry.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - // sin - template - GLM_FUNC_QUALIFIER T fastSin(T const & x) - { - return x - ((x * x * x) / T(6)) + ((x * x * x * x * x) / T(120)) - ((x * x * x * x * x * x * x) / T(5040)); - } - - VECTORIZE_VEC(fastSin) - - // cos - template - GLM_FUNC_QUALIFIER T fastCos(T const & x) - { - return T(1) - (x * x * T(0.5)) + (x * x * x * x * T(0.041666666666)) - (x * x * x * x * x * x * T(0.00138888888888)); - } - - VECTORIZE_VEC(fastCos) - - // tan - template - GLM_FUNC_QUALIFIER T fastTan(T const & x) - { - return x + (x * x * x * T(0.3333333333)) + (x * x * x * x * x * T(0.1333333333333)) + (x * x * x * x * x * x * x * T(0.0539682539)); - } - - VECTORIZE_VEC(fastTan) - - // asin - template - GLM_FUNC_QUALIFIER T fastAsin(T const & x) - { - return x + (x * x * x * T(0.166666667)) + (x * x * x * x * x * T(0.075)) + (x * x * x * x * x * x * x * T(0.0446428571)) + (x * x * x * x * x * x * x * x * x * T(0.0303819444));// + (x * x * x * x * x * x * x * x * x * x * x * T(0.022372159)); - } - - VECTORIZE_VEC(fastAsin) - - // acos - template - GLM_FUNC_QUALIFIER T fastAcos(T const & x) - { - return T(1.5707963267948966192313216916398) - fastAsin(x); //(PI / 2) - } - - VECTORIZE_VEC(fastAcos) - - // atan - template - GLM_FUNC_QUALIFIER T fastAtan(T const & y, T const & x) - { - T sgn = sign(y) * sign(x); - return abs(fastAtan(y / x)) * sgn; - } - - VECTORIZE_VEC_VEC(fastAtan) - - template - GLM_FUNC_QUALIFIER T fastAtan(T const & x) - { - return x - (x * x * x * T(0.333333333333)) + (x * x * x * x * x * T(0.2)) - (x * x * x * x * x * x * x * T(0.1428571429)) + (x * x * x * x * x * x * x * x * x * T(0.111111111111)) - (x * x * x * x * x * x * x * x * x * x * x * T(0.0909090909)); - } - - VECTORIZE_VEC(fastAtan) - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2006-01-08 +// Updated : 2011-10-14 +// Licence : This source is under MIT License +// File : glm/gtx/fast_trigonometry.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + // sin + template + GLM_FUNC_QUALIFIER T fastSin(T const & x) + { + return x - ((x * x * x) / T(6)) + ((x * x * x * x * x) / T(120)) - ((x * x * x * x * x * x * x) / T(5040)); + } + + VECTORIZE_VEC(fastSin) + + // cos + template + GLM_FUNC_QUALIFIER T fastCos(T const & x) + { + return T(1) - (x * x * T(0.5)) + (x * x * x * x * T(0.041666666666)) - (x * x * x * x * x * x * T(0.00138888888888)); + } + + VECTORIZE_VEC(fastCos) + + // tan + template + GLM_FUNC_QUALIFIER T fastTan(T const & x) + { + return x + (x * x * x * T(0.3333333333)) + (x * x * x * x * x * T(0.1333333333333)) + (x * x * x * x * x * x * x * T(0.0539682539)); + } + + VECTORIZE_VEC(fastTan) + + // asin + template + GLM_FUNC_QUALIFIER T fastAsin(T const & x) + { + return x + (x * x * x * T(0.166666667)) + (x * x * x * x * x * T(0.075)) + (x * x * x * x * x * x * x * T(0.0446428571)) + (x * x * x * x * x * x * x * x * x * T(0.0303819444));// + (x * x * x * x * x * x * x * x * x * x * x * T(0.022372159)); + } + + VECTORIZE_VEC(fastAsin) + + // acos + template + GLM_FUNC_QUALIFIER T fastAcos(T const & x) + { + return T(1.5707963267948966192313216916398) - fastAsin(x); //(PI / 2) + } + + VECTORIZE_VEC(fastAcos) + + // atan + template + GLM_FUNC_QUALIFIER T fastAtan(T const & y, T const & x) + { + T sgn = sign(y) * sign(x); + return abs(fastAtan(y / x)) * sgn; + } + + VECTORIZE_VEC_VEC(fastAtan) + + template + GLM_FUNC_QUALIFIER T fastAtan(T const & x) + { + return x - (x * x * x * T(0.333333333333)) + (x * x * x * x * x * T(0.2)) - (x * x * x * x * x * x * x * T(0.1428571429)) + (x * x * x * x * x * x * x * x * x * T(0.111111111111)) - (x * x * x * x * x * x * x * x * x * x * x * T(0.0909090909)); + } + + VECTORIZE_VEC(fastAtan) + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/gradient_paint.hpp b/include/gal/opengl/glm/gtx/gradient_paint.hpp index 16824a1f2f..f17a53cb34 100644 --- a/include/gal/opengl/glm/gtx/gradient_paint.hpp +++ b/include/gal/opengl/glm/gtx/gradient_paint.hpp @@ -1,76 +1,76 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_gradient_paint -/// @file glm/gtx/gradient_paint.hpp -/// @date 2009-03-06 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_optimum_pow (dependence) -/// -/// @defgroup gtx_gradient_paint GLM_GTX_gradient_paint -/// @ingroup gtx -/// -/// @brief Functions that return the color of procedural gradient for specific coordinates. -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_gradient_paint -#define GLM_GTX_gradient_paint GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtx/optimum_pow.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_gradient_paint extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_gradient_paint - /// @{ - - /// Return a color from a radial gradient. - /// @see - gtx_gradient_paint - template - valType radialGradient( - detail::tvec2 const & Center, - valType const & Radius, - detail::tvec2 const & Focal, - detail::tvec2 const & Position); - - /// Return a color from a linear gradient. - /// @see - gtx_gradient_paint - template - valType linearGradient( - detail::tvec2 const & Point0, - detail::tvec2 const & Point1, - detail::tvec2 const & Position); - - /// @} -}// namespace glm - -#include "gradient_paint.inl" - -#endif//GLM_GTX_gradient_paint +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_gradient_paint +/// @file glm/gtx/gradient_paint.hpp +/// @date 2009-03-06 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_optimum_pow (dependence) +/// +/// @defgroup gtx_gradient_paint GLM_GTX_gradient_paint +/// @ingroup gtx +/// +/// @brief Functions that return the color of procedural gradient for specific coordinates. +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_gradient_paint +#define GLM_GTX_gradient_paint GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtx/optimum_pow.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_gradient_paint extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_gradient_paint + /// @{ + + /// Return a color from a radial gradient. + /// @see - gtx_gradient_paint + template + valType radialGradient( + detail::tvec2 const & Center, + valType const & Radius, + detail::tvec2 const & Focal, + detail::tvec2 const & Position); + + /// Return a color from a linear gradient. + /// @see - gtx_gradient_paint + template + valType linearGradient( + detail::tvec2 const & Point0, + detail::tvec2 const & Point1, + detail::tvec2 const & Position); + + /// @} +}// namespace glm + +#include "gradient_paint.inl" + +#endif//GLM_GTX_gradient_paint diff --git a/include/gal/opengl/glm/gtx/gradient_paint.inl b/include/gal/opengl/glm/gtx/gradient_paint.inl index 16e84e024f..e5fed92bb5 100644 --- a/include/gal/opengl/glm/gtx/gradient_paint.inl +++ b/include/gal/opengl/glm/gtx/gradient_paint.inl @@ -1,43 +1,43 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2009-03-06 -// Updated : 2009-03-09 -// Licence : This source is under MIT License -// File : glm/gtx/gradient_paint.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - valType radialGradient - ( - detail::tvec2 const & Center, - valType const & Radius, - detail::tvec2 const & Focal, - detail::tvec2 const & Position - ) - { - detail::tvec2 F = Focal - Center; - detail::tvec2 D = Position - Focal; - valType Radius2 = pow2(Radius); - valType Fx2 = pow2(F.x); - valType Fy2 = pow2(F.y); - - valType Numerator = (D.x * F.x + D.y * F.y) + sqrt(Radius2 * (pow2(D.x) + pow2(D.y)) - pow2(D.x * F.y - D.y * F.x)); - valType Denominator = Radius2 - (Fx2 + Fy2); - return Numerator / Denominator; - } - - template - valType linearGradient - ( - detail::tvec2 const & Point0, - detail::tvec2 const & Point1, - detail::tvec2 const & Position - ) - { - detail::tvec2 Dist = Point1 - Point0; - return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist); - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2009-03-06 +// Updated : 2009-03-09 +// Licence : This source is under MIT License +// File : glm/gtx/gradient_paint.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + valType radialGradient + ( + detail::tvec2 const & Center, + valType const & Radius, + detail::tvec2 const & Focal, + detail::tvec2 const & Position + ) + { + detail::tvec2 F = Focal - Center; + detail::tvec2 D = Position - Focal; + valType Radius2 = pow2(Radius); + valType Fx2 = pow2(F.x); + valType Fy2 = pow2(F.y); + + valType Numerator = (D.x * F.x + D.y * F.y) + sqrt(Radius2 * (pow2(D.x) + pow2(D.y)) - pow2(D.x * F.y - D.y * F.x)); + valType Denominator = Radius2 - (Fx2 + Fy2); + return Numerator / Denominator; + } + + template + valType linearGradient + ( + detail::tvec2 const & Point0, + detail::tvec2 const & Point1, + detail::tvec2 const & Position + ) + { + detail::tvec2 Dist = Point1 - Point0; + return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/handed_coordinate_space.hpp b/include/gal/opengl/glm/gtx/handed_coordinate_space.hpp index 730a06e8ca..06f963e8eb 100644 --- a/include/gal/opengl/glm/gtx/handed_coordinate_space.hpp +++ b/include/gal/opengl/glm/gtx/handed_coordinate_space.hpp @@ -1,74 +1,74 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_handed_coordinate_space -/// @file glm/gtx/handed_coordinate_space.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_handed_coordinate_space GLM_GTX_handed_coordinate_space -/// @ingroup gtx -/// -/// @brief To know if a set of three basis vectors defines a right or left-handed coordinate system. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_handed_coordinate_space -#define GLM_GTX_handed_coordinate_space GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_handed_coordinate_space extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_handed_coordinate_space - /// @{ - - //! Return if a trihedron right handed or not. - //! From GLM_GTX_handed_coordinate_space extension. - template - bool rightHanded( - detail::tvec3 const & tangent, - detail::tvec3 const & binormal, - detail::tvec3 const & normal); - - //! Return if a trihedron left handed or not. - //! From GLM_GTX_handed_coordinate_space extension. - template - bool leftHanded( - detail::tvec3 const & tangent, - detail::tvec3 const & binormal, - detail::tvec3 const & normal); - - /// @} -}// namespace glm - -#include "handed_coordinate_space.inl" - -#endif//GLM_GTX_handed_coordinate_space +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_handed_coordinate_space +/// @file glm/gtx/handed_coordinate_space.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_handed_coordinate_space GLM_GTX_handed_coordinate_space +/// @ingroup gtx +/// +/// @brief To know if a set of three basis vectors defines a right or left-handed coordinate system. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_handed_coordinate_space +#define GLM_GTX_handed_coordinate_space GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_handed_coordinate_space extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_handed_coordinate_space + /// @{ + + //! Return if a trihedron right handed or not. + //! From GLM_GTX_handed_coordinate_space extension. + template + bool rightHanded( + detail::tvec3 const & tangent, + detail::tvec3 const & binormal, + detail::tvec3 const & normal); + + //! Return if a trihedron left handed or not. + //! From GLM_GTX_handed_coordinate_space extension. + template + bool leftHanded( + detail::tvec3 const & tangent, + detail::tvec3 const & binormal, + detail::tvec3 const & normal); + + /// @} +}// namespace glm + +#include "handed_coordinate_space.inl" + +#endif//GLM_GTX_handed_coordinate_space diff --git a/include/gal/opengl/glm/gtx/handed_coordinate_space.inl b/include/gal/opengl/glm/gtx/handed_coordinate_space.inl index da7cf4e3bc..2b3778af86 100644 --- a/include/gal/opengl/glm/gtx/handed_coordinate_space.inl +++ b/include/gal/opengl/glm/gtx/handed_coordinate_space.inl @@ -1,33 +1,33 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2005-12-21 -// Updated : 2009-02-19 -// Licence : This source is under MIT License -// File : glm/gtx/handed_coordinate_space.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER bool rightHanded - ( - detail::tvec3 const & tangent, - detail::tvec3 const & binormal, - detail::tvec3 const & normal - ) - { - return dot(cross(normal, tangent), binormal) > T(0); - } - - template - GLM_FUNC_QUALIFIER bool leftHanded - ( - detail::tvec3 const & tangent, - detail::tvec3 const & binormal, - detail::tvec3 const & normal - ) - { - return dot(cross(normal, tangent), binormal) < T(0); - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2009-02-19 +// Licence : This source is under MIT License +// File : glm/gtx/handed_coordinate_space.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER bool rightHanded + ( + detail::tvec3 const & tangent, + detail::tvec3 const & binormal, + detail::tvec3 const & normal + ) + { + return dot(cross(normal, tangent), binormal) > T(0); + } + + template + GLM_FUNC_QUALIFIER bool leftHanded + ( + detail::tvec3 const & tangent, + detail::tvec3 const & binormal, + detail::tvec3 const & normal + ) + { + return dot(cross(normal, tangent), binormal) < T(0); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/inertia.hpp b/include/gal/opengl/glm/gtx/inertia.hpp index 9d468fedb1..44a00ef198 100644 --- a/include/gal/opengl/glm/gtx/inertia.hpp +++ b/include/gal/opengl/glm/gtx/inertia.hpp @@ -1,115 +1,115 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_inertia -/// @file glm/gtx/inertia.hpp -/// @date 2006-04-21 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_extented_min_max (dependence) -/// -/// @defgroup gtx_inertia GLM_GTX_inertia -/// @ingroup gtx -/// -/// @brief Create inertia matrices -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_inertia -#define GLM_GTX_inertia GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_inertia extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_inertia - /// @{ - - //! Build an inertia matrix for a box. - //! From GLM_GTX_inertia extension. - template - detail::tmat3x3 boxInertia3( - T const & Mass, - detail::tvec3 const & Scale); - - //! Build an inertia matrix for a box. - //! From GLM_GTX_inertia extension. - template - detail::tmat4x4 boxInertia4( - T const & Mass, - detail::tvec3 const & Scale); - - //! Build an inertia matrix for a disk. - //! From GLM_GTX_inertia extension. - template - detail::tmat3x3 diskInertia3( - T const & Mass, - T const & Radius); - - //! Build an inertia matrix for a disk. - //! From GLM_GTX_inertia extension. - template - detail::tmat4x4 diskInertia4( - T const & Mass, - T const & Radius); - - //! Build an inertia matrix for a ball. - //! From GLM_GTX_inertia extension. - template - detail::tmat3x3 ballInertia3( - T const & Mass, - T const & Radius); - - //! Build an inertia matrix for a ball. - //! From GLM_GTX_inertia extension. - template - detail::tmat4x4 ballInertia4( - T const & Mass, - T const & Radius); - - //! Build an inertia matrix for a sphere. - //! From GLM_GTX_inertia extension. - template - detail::tmat3x3 sphereInertia3( - T const & Mass, - T const & Radius); - - //! Build an inertia matrix for a sphere. - //! From GLM_GTX_inertia extension. - template - detail::tmat4x4 sphereInertia4( - T const & Mass, - T const & Radius); - - /// @} -}// namespace glm - -#include "inertia.inl" - -#endif//GLM_GTX_inertia +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_inertia +/// @file glm/gtx/inertia.hpp +/// @date 2006-04-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_extented_min_max (dependence) +/// +/// @defgroup gtx_inertia GLM_GTX_inertia +/// @ingroup gtx +/// +/// @brief Create inertia matrices +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_inertia +#define GLM_GTX_inertia GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_inertia extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_inertia + /// @{ + + //! Build an inertia matrix for a box. + //! From GLM_GTX_inertia extension. + template + detail::tmat3x3 boxInertia3( + T const & Mass, + detail::tvec3 const & Scale); + + //! Build an inertia matrix for a box. + //! From GLM_GTX_inertia extension. + template + detail::tmat4x4 boxInertia4( + T const & Mass, + detail::tvec3 const & Scale); + + //! Build an inertia matrix for a disk. + //! From GLM_GTX_inertia extension. + template + detail::tmat3x3 diskInertia3( + T const & Mass, + T const & Radius); + + //! Build an inertia matrix for a disk. + //! From GLM_GTX_inertia extension. + template + detail::tmat4x4 diskInertia4( + T const & Mass, + T const & Radius); + + //! Build an inertia matrix for a ball. + //! From GLM_GTX_inertia extension. + template + detail::tmat3x3 ballInertia3( + T const & Mass, + T const & Radius); + + //! Build an inertia matrix for a ball. + //! From GLM_GTX_inertia extension. + template + detail::tmat4x4 ballInertia4( + T const & Mass, + T const & Radius); + + //! Build an inertia matrix for a sphere. + //! From GLM_GTX_inertia extension. + template + detail::tmat3x3 sphereInertia3( + T const & Mass, + T const & Radius); + + //! Build an inertia matrix for a sphere. + //! From GLM_GTX_inertia extension. + template + detail::tmat4x4 sphereInertia4( + T const & Mass, + T const & Radius); + + /// @} +}// namespace glm + +#include "inertia.inl" + +#endif//GLM_GTX_inertia diff --git a/include/gal/opengl/glm/gtx/inertia.inl b/include/gal/opengl/glm/gtx/inertia.inl index e83be40dd8..f6eeb48db9 100644 --- a/include/gal/opengl/glm/gtx/inertia.inl +++ b/include/gal/opengl/glm/gtx/inertia.inl @@ -1,114 +1,114 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2006-04-21 -// Updated : 2006-12-06 -// Licence : This source is under MIT License -// File : glm/gtx/inertia.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER detail::tmat3x3 boxInertia3 - ( - T const & Mass, - detail::tvec3 const & Scale - ) - { - detail::tmat3x3 Result(T(1)); - Result[0][0] = (Scale.y * Scale.y + Scale.z * Scale.z) * Mass / T(12); - Result[1][1] = (Scale.x * Scale.x + Scale.z * Scale.z) * Mass / T(12); - Result[2][2] = (Scale.x * Scale.x + Scale.y * Scale.y) * Mass / T(12); - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 boxInertia4 - ( - T const & Mass, - detail::tvec3 const & Scale - ) - { - detail::tmat4x4 Result(T(1)); - Result[0][0] = (Scale.y * Scale.y + Scale.z * Scale.z) * Mass / T(12); - Result[1][1] = (Scale.x * Scale.x + Scale.z * Scale.z) * Mass / T(12); - Result[2][2] = (Scale.x * Scale.x + Scale.y * Scale.y) * Mass / T(12); - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x3 diskInertia3 - ( - T const & Mass, - T const & Radius - ) - { - T a = Mass * Radius * Radius / T(2); - detail::tmat3x3 Result(a); - Result[2][2] *= T(2); - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 diskInertia4 - ( - T const & Mass, - T const & Radius - ) - { - T a = Mass * Radius * Radius / T(2); - detail::tmat4x4 Result(a); - Result[2][2] *= T(2); - Result[3][3] = T(1); - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x3 ballInertia3 - ( - T const & Mass, - T const & Radius - ) - { - T a = T(2) * Mass * Radius * Radius / T(5); - return detail::tmat3x3(a); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 ballInertia4 - ( - T const & Mass, - T const & Radius - ) - { - T a = T(2) * Mass * Radius * Radius / T(5); - detail::tmat4x4 Result(a); - Result[3][3] = T(1); - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x3 sphereInertia3 - ( - T const & Mass, - T const & Radius - ) - { - T a = T(2) * Mass * Radius * Radius / T(3); - return detail::tmat3x3(a); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 sphereInertia4 - ( - T const & Mass, - T const & Radius - ) - { - T a = T(2) * Mass * Radius * Radius / T(3); - detail::tmat4x4 Result(a); - Result[3][3] = T(1); - return Result; - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2006-04-21 +// Updated : 2006-12-06 +// Licence : This source is under MIT License +// File : glm/gtx/inertia.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tmat3x3 boxInertia3 + ( + T const & Mass, + detail::tvec3 const & Scale + ) + { + detail::tmat3x3 Result(T(1)); + Result[0][0] = (Scale.y * Scale.y + Scale.z * Scale.z) * Mass / T(12); + Result[1][1] = (Scale.x * Scale.x + Scale.z * Scale.z) * Mass / T(12); + Result[2][2] = (Scale.x * Scale.x + Scale.y * Scale.y) * Mass / T(12); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 boxInertia4 + ( + T const & Mass, + detail::tvec3 const & Scale + ) + { + detail::tmat4x4 Result(T(1)); + Result[0][0] = (Scale.y * Scale.y + Scale.z * Scale.z) * Mass / T(12); + Result[1][1] = (Scale.x * Scale.x + Scale.z * Scale.z) * Mass / T(12); + Result[2][2] = (Scale.x * Scale.x + Scale.y * Scale.y) * Mass / T(12); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 diskInertia3 + ( + T const & Mass, + T const & Radius + ) + { + T a = Mass * Radius * Radius / T(2); + detail::tmat3x3 Result(a); + Result[2][2] *= T(2); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 diskInertia4 + ( + T const & Mass, + T const & Radius + ) + { + T a = Mass * Radius * Radius / T(2); + detail::tmat4x4 Result(a); + Result[2][2] *= T(2); + Result[3][3] = T(1); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 ballInertia3 + ( + T const & Mass, + T const & Radius + ) + { + T a = T(2) * Mass * Radius * Radius / T(5); + return detail::tmat3x3(a); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 ballInertia4 + ( + T const & Mass, + T const & Radius + ) + { + T a = T(2) * Mass * Radius * Radius / T(5); + detail::tmat4x4 Result(a); + Result[3][3] = T(1); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 sphereInertia3 + ( + T const & Mass, + T const & Radius + ) + { + T a = T(2) * Mass * Radius * Radius / T(3); + return detail::tmat3x3(a); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 sphereInertia4 + ( + T const & Mass, + T const & Radius + ) + { + T a = T(2) * Mass * Radius * Radius / T(3); + detail::tmat4x4 Result(a); + Result[3][3] = T(1); + return Result; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/int_10_10_10_2.hpp b/include/gal/opengl/glm/gtx/int_10_10_10_2.hpp index af5a40440d..4396bd42c0 100644 --- a/include/gal/opengl/glm/gtx/int_10_10_10_2.hpp +++ b/include/gal/opengl/glm/gtx/int_10_10_10_2.hpp @@ -1,64 +1,64 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_int_10_10_10_2 -/// @file glm/gtx/int_10_10_10_2.hpp -/// @date 2010-07-07 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_raw_data (dependence) -/// -/// @defgroup gtx_int_10_10_10_2 GLM_GTX_int_10_10_10_2 -/// @ingroup gtx -/// -/// @brief Pack vector to 1010102 integers. Storage only. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_int_10_10_10_2 -#define GLM_GTX_int_10_10_10_2 GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtx/raw_data.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_int_10_10_10_2 extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_int_10_10_10_2 - /// @{ - - //! From GLM_GTX_int_10_10_10_2 extension. - //! Cast a vec4 to an u_10_10_10_2. - dword uint10_10_10_2_cast(glm::vec4 const & v); - - /// @} -}//namespace glm - -#include "int_10_10_10_2.inl" - -#endif//GLM_GTX_int_10_10_10_2 +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_int_10_10_10_2 +/// @file glm/gtx/int_10_10_10_2.hpp +/// @date 2010-07-07 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_raw_data (dependence) +/// +/// @defgroup gtx_int_10_10_10_2 GLM_GTX_int_10_10_10_2 +/// @ingroup gtx +/// +/// @brief Pack vector to 1010102 integers. Storage only. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_int_10_10_10_2 +#define GLM_GTX_int_10_10_10_2 GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtx/raw_data.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_int_10_10_10_2 extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_int_10_10_10_2 + /// @{ + + //! From GLM_GTX_int_10_10_10_2 extension. + //! Cast a vec4 to an u_10_10_10_2. + dword uint10_10_10_2_cast(glm::vec4 const & v); + + /// @} +}//namespace glm + +#include "int_10_10_10_2.inl" + +#endif//GLM_GTX_int_10_10_10_2 diff --git a/include/gal/opengl/glm/gtx/int_10_10_10_2.inl b/include/gal/opengl/glm/gtx/int_10_10_10_2.inl index 9ea3065ab6..f6b15d7cb7 100644 --- a/include/gal/opengl/glm/gtx/int_10_10_10_2.inl +++ b/include/gal/opengl/glm/gtx/int_10_10_10_2.inl @@ -1,19 +1,19 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2010-07-07 -// Updated : 2010-07-07 -// Licence : This source is under MIT License -// File : glm/gtx/int_10_10_10_2.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - GLM_FUNC_QUALIFIER dword uint10_10_10_2_cast - ( - glm::vec4 const & v - ) - { - return dword(uint(v.x * 2047.f) << 0 | uint(v.y * 2047.f) << 10 | uint(v.z * 2047.f) << 20 | uint(v.w * 3.f) << 30); - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2010-07-07 +// Updated : 2010-07-07 +// Licence : This source is under MIT License +// File : glm/gtx/int_10_10_10_2.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + GLM_FUNC_QUALIFIER dword uint10_10_10_2_cast + ( + glm::vec4 const & v + ) + { + return dword(uint(v.x * 2047.f) << 0 | uint(v.y * 2047.f) << 10 | uint(v.z * 2047.f) << 20 | uint(v.w * 3.f) << 30); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/integer.hpp b/include/gal/opengl/glm/gtx/integer.hpp index 00875b2779..db8c3cc901 100644 --- a/include/gal/opengl/glm/gtx/integer.hpp +++ b/include/gal/opengl/glm/gtx/integer.hpp @@ -1,104 +1,104 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_integer -/// @file glm/gtx/integer.hpp -/// @date 2005-12-24 / 2011-10-13 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_integer GLM_GTX_integer -/// @ingroup gtx -/// -/// @brief Add support for integer for core functions -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_integer -#define GLM_GTX_integer GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_integer extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_integer - /// @{ - - //! Returns x raised to the y power. - //! From GLM_GTX_integer extension. - int pow(int x, int y); - - //! Returns the positive square root of x. - //! From GLM_GTX_integer extension. - int sqrt(int x); - - //! Returns the log2 of x. Can be reliably using to compute mipmap count from the texture size. - //! From GLM_GTX_integer extension. - template - genIUType log2(genIUType const & x); - - //! Returns the floor log2 of x. - //! From GLM_GTX_integer extension. - unsigned int floor_log2(unsigned int x); - - //! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y. - //! From GLM_GTX_integer extension. - int mod(int x, int y); - - //! Return the factorial value of a number (!12 max, integer only) - //! From GLM_GTX_integer extension. - template - genType factorial(genType const & x); - - //! 32bit signed integer. - //! From GLM_GTX_integer extension. - typedef signed int sint; - - //! Returns x raised to the y power. - //! From GLM_GTX_integer extension. - uint pow(uint x, uint y); - - //! Returns the positive square root of x. - //! From GLM_GTX_integer extension. - uint sqrt(uint x); - - //! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y. - //! From GLM_GTX_integer extension. - uint mod(uint x, uint y); - - //! Returns the number of leading zeros. - //! From GLM_GTX_integer extension. - uint nlz(uint x); - - /// @} -}//namespace glm - -#include "integer.inl" - -#endif//GLM_GTX_integer +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_integer +/// @file glm/gtx/integer.hpp +/// @date 2005-12-24 / 2011-10-13 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_integer GLM_GTX_integer +/// @ingroup gtx +/// +/// @brief Add support for integer for core functions +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_integer +#define GLM_GTX_integer GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_integer extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_integer + /// @{ + + //! Returns x raised to the y power. + //! From GLM_GTX_integer extension. + int pow(int x, int y); + + //! Returns the positive square root of x. + //! From GLM_GTX_integer extension. + int sqrt(int x); + + //! Returns the log2 of x. Can be reliably using to compute mipmap count from the texture size. + //! From GLM_GTX_integer extension. + template + genIUType log2(genIUType const & x); + + //! Returns the floor log2 of x. + //! From GLM_GTX_integer extension. + unsigned int floor_log2(unsigned int x); + + //! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y. + //! From GLM_GTX_integer extension. + int mod(int x, int y); + + //! Return the factorial value of a number (!12 max, integer only) + //! From GLM_GTX_integer extension. + template + genType factorial(genType const & x); + + //! 32bit signed integer. + //! From GLM_GTX_integer extension. + typedef signed int sint; + + //! Returns x raised to the y power. + //! From GLM_GTX_integer extension. + uint pow(uint x, uint y); + + //! Returns the positive square root of x. + //! From GLM_GTX_integer extension. + uint sqrt(uint x); + + //! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y. + //! From GLM_GTX_integer extension. + uint mod(uint x, uint y); + + //! Returns the number of leading zeros. + //! From GLM_GTX_integer extension. + uint nlz(uint x); + + /// @} +}//namespace glm + +#include "integer.inl" + +#endif//GLM_GTX_integer diff --git a/include/gal/opengl/glm/gtx/integer.inl b/include/gal/opengl/glm/gtx/integer.inl index fc25b8a790..547064f657 100644 --- a/include/gal/opengl/glm/gtx/integer.inl +++ b/include/gal/opengl/glm/gtx/integer.inl @@ -1,203 +1,203 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2005-12-24 -// Updated : 2011-10-13 -// Licence : This source is under MIT License -// File : glm/gtx/integer.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - // pow - GLM_FUNC_QUALIFIER int pow(int x, int y) - { - if(y == 0) - return 1; - int result = x; - for(int i = 1; i < y; ++i) - result *= x; - return result; - } - - // sqrt: From Christopher J. Musial, An integer square root, Graphics Gems, 1990, page 387 - GLM_FUNC_QUALIFIER int sqrt(int x) - { - if(x <= 1) return x; - - int NextTrial = x >> 1; - int CurrentAnswer; - - do - { - CurrentAnswer = NextTrial; - NextTrial = (NextTrial + x / NextTrial) >> 1; - } while(NextTrial < CurrentAnswer); - - return CurrentAnswer; - } - -// Henry Gordon Dietz: http://aggregate.org/MAGIC/ -namespace _detail -{ - GLM_FUNC_QUALIFIER unsigned int ones32(unsigned int x) - { - /* 32-bit recursive reduction using SWAR... - but first step is mapping 2-bit values - into sum of 2 1-bit values in sneaky way - */ - x -= ((x >> 1) & 0x55555555); - x = (((x >> 2) & 0x33333333) + (x & 0x33333333)); - x = (((x >> 4) + x) & 0x0f0f0f0f); - x += (x >> 8); - x += (x >> 16); - return(x & 0x0000003f); - } - - template <> - struct _compute_log2 - { - template - GLM_FUNC_QUALIFIER T operator() (T const & Value) const - { -#if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_GCC)) - return Value <= T(1) ? T(0) : T(32) - nlz(Value - T(1)); -#else - return T(32) - nlz(Value - T(1)); -#endif - } - }; - -}//namespace _detail - - // Henry Gordon Dietz: http://aggregate.org/MAGIC/ -/* - GLM_FUNC_QUALIFIER unsigned int floor_log2(unsigned int x) - { - x |= (x >> 1); - x |= (x >> 2); - x |= (x >> 4); - x |= (x >> 8); - x |= (x >> 16); - - return _detail::ones32(x) >> 1; - } -*/ - // mod - GLM_FUNC_QUALIFIER int mod(int x, int y) - { - return x - y * (x / y); - } - - // factorial (!12 max, integer only) - template - GLM_FUNC_QUALIFIER genType factorial(genType const & x) - { - genType Temp = x; - genType Result; - for(Result = 1; Temp > 1; --Temp) - Result *= Temp; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 factorial( - detail::tvec2 const & x) - { - return detail::tvec2( - factorial(x.x), - factorial(x.y)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 factorial( - detail::tvec3 const & x) - { - return detail::tvec3( - factorial(x.x), - factorial(x.y), - factorial(x.z)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 factorial( - detail::tvec4 const & x) - { - return detail::tvec4( - factorial(x.x), - factorial(x.y), - factorial(x.z), - factorial(x.w)); - } - - GLM_FUNC_QUALIFIER uint pow(uint x, uint y) - { - uint result = x; - for(uint i = 1; i < y; ++i) - result *= x; - return result; - } - - GLM_FUNC_QUALIFIER uint sqrt(uint x) - { - if(x <= 1) return x; - - uint NextTrial = x >> 1; - uint CurrentAnswer; - - do - { - CurrentAnswer = NextTrial; - NextTrial = (NextTrial + x / NextTrial) >> 1; - } while(NextTrial < CurrentAnswer); - - return CurrentAnswer; - } - - GLM_FUNC_QUALIFIER uint mod(uint x, uint y) - { - return x - y * (x / y); - } - -#if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_GCC)) - - GLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x) - { - return 31u - findMSB(x); - } - -#else - - // Hackers Delight: http://www.hackersdelight.org/HDcode/nlz.c.txt - GLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x) - { - int y, m, n; - - y = -int(x >> 16); // If left half of x is 0, - m = (y >> 16) & 16; // set n = 16. If left half - n = 16 - m; // is nonzero, set n = 0 and - x = x >> m; // shift x right 16. - // Now x is of the form 0000xxxx. - y = x - 0x100; // If positions 8-15 are 0, - m = (y >> 16) & 8; // add 8 to n and shift x left 8. - n = n + m; - x = x << m; - - y = x - 0x1000; // If positions 12-15 are 0, - m = (y >> 16) & 4; // add 4 to n and shift x left 4. - n = n + m; - x = x << m; - - y = x - 0x4000; // If positions 14-15 are 0, - m = (y >> 16) & 2; // add 2 to n and shift x left 2. - n = n + m; - x = x << m; - - y = x >> 14; // Set y = 0, 1, 2, or 3. - m = y & ~(y >> 1); // Set m = 0, 1, 2, or 2 resp. - return unsigned(n + 2 - m); - } - -#endif//(GLM_COMPILER) - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-24 +// Updated : 2011-10-13 +// Licence : This source is under MIT License +// File : glm/gtx/integer.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + // pow + GLM_FUNC_QUALIFIER int pow(int x, int y) + { + if(y == 0) + return 1; + int result = x; + for(int i = 1; i < y; ++i) + result *= x; + return result; + } + + // sqrt: From Christopher J. Musial, An integer square root, Graphics Gems, 1990, page 387 + GLM_FUNC_QUALIFIER int sqrt(int x) + { + if(x <= 1) return x; + + int NextTrial = x >> 1; + int CurrentAnswer; + + do + { + CurrentAnswer = NextTrial; + NextTrial = (NextTrial + x / NextTrial) >> 1; + } while(NextTrial < CurrentAnswer); + + return CurrentAnswer; + } + +// Henry Gordon Dietz: http://aggregate.org/MAGIC/ +namespace _detail +{ + GLM_FUNC_QUALIFIER unsigned int ones32(unsigned int x) + { + /* 32-bit recursive reduction using SWAR... + but first step is mapping 2-bit values + into sum of 2 1-bit values in sneaky way + */ + x -= ((x >> 1) & 0x55555555); + x = (((x >> 2) & 0x33333333) + (x & 0x33333333)); + x = (((x >> 4) + x) & 0x0f0f0f0f); + x += (x >> 8); + x += (x >> 16); + return(x & 0x0000003f); + } + + template <> + struct _compute_log2 + { + template + GLM_FUNC_QUALIFIER T operator() (T const & Value) const + { +#if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_GCC)) + return Value <= T(1) ? T(0) : T(32) - nlz(Value - T(1)); +#else + return T(32) - nlz(Value - T(1)); +#endif + } + }; + +}//namespace _detail + + // Henry Gordon Dietz: http://aggregate.org/MAGIC/ +/* + GLM_FUNC_QUALIFIER unsigned int floor_log2(unsigned int x) + { + x |= (x >> 1); + x |= (x >> 2); + x |= (x >> 4); + x |= (x >> 8); + x |= (x >> 16); + + return _detail::ones32(x) >> 1; + } +*/ + // mod + GLM_FUNC_QUALIFIER int mod(int x, int y) + { + return x - y * (x / y); + } + + // factorial (!12 max, integer only) + template + GLM_FUNC_QUALIFIER genType factorial(genType const & x) + { + genType Temp = x; + genType Result; + for(Result = 1; Temp > 1; --Temp) + Result *= Temp; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 factorial( + detail::tvec2 const & x) + { + return detail::tvec2( + factorial(x.x), + factorial(x.y)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 factorial( + detail::tvec3 const & x) + { + return detail::tvec3( + factorial(x.x), + factorial(x.y), + factorial(x.z)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 factorial( + detail::tvec4 const & x) + { + return detail::tvec4( + factorial(x.x), + factorial(x.y), + factorial(x.z), + factorial(x.w)); + } + + GLM_FUNC_QUALIFIER uint pow(uint x, uint y) + { + uint result = x; + for(uint i = 1; i < y; ++i) + result *= x; + return result; + } + + GLM_FUNC_QUALIFIER uint sqrt(uint x) + { + if(x <= 1) return x; + + uint NextTrial = x >> 1; + uint CurrentAnswer; + + do + { + CurrentAnswer = NextTrial; + NextTrial = (NextTrial + x / NextTrial) >> 1; + } while(NextTrial < CurrentAnswer); + + return CurrentAnswer; + } + + GLM_FUNC_QUALIFIER uint mod(uint x, uint y) + { + return x - y * (x / y); + } + +#if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_GCC)) + + GLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x) + { + return 31u - findMSB(x); + } + +#else + + // Hackers Delight: http://www.hackersdelight.org/HDcode/nlz.c.txt + GLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x) + { + int y, m, n; + + y = -int(x >> 16); // If left half of x is 0, + m = (y >> 16) & 16; // set n = 16. If left half + n = 16 - m; // is nonzero, set n = 0 and + x = x >> m; // shift x right 16. + // Now x is of the form 0000xxxx. + y = x - 0x100; // If positions 8-15 are 0, + m = (y >> 16) & 8; // add 8 to n and shift x left 8. + n = n + m; + x = x << m; + + y = x - 0x1000; // If positions 12-15 are 0, + m = (y >> 16) & 4; // add 4 to n and shift x left 4. + n = n + m; + x = x << m; + + y = x - 0x4000; // If positions 14-15 are 0, + m = (y >> 16) & 2; // add 2 to n and shift x left 2. + n = n + m; + x = x << m; + + y = x >> 14; // Set y = 0, 1, 2, or 3. + m = y & ~(y >> 1); // Set m = 0, 1, 2, or 2 resp. + return unsigned(n + 2 - m); + } + +#endif//(GLM_COMPILER) + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/intersect.hpp b/include/gal/opengl/glm/gtx/intersect.hpp index 193aac0d54..d870faa59f 100644 --- a/include/gal/opengl/glm/gtx/intersect.hpp +++ b/include/gal/opengl/glm/gtx/intersect.hpp @@ -1,102 +1,102 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_intersect -/// @file glm/gtx/intersect.hpp -/// @date 2007-04-03 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_closest_point (dependence) -/// -/// @defgroup gtx_intersect GLM_GTX_intersect -/// @ingroup gtx -/// -/// @brief Add intersection functions -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_intersect -#define GLM_GTX_intersect GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtx/closest_point.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_closest_point extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_intersect - /// @{ - - //! Compute the intersection of a ray and a triangle. - //! From GLM_GTX_intersect extension. - template - bool intersectRayTriangle( - genType const & orig, genType const & dir, - genType const & vert0, genType const & vert1, genType const & vert2, - genType & baryPosition); - - //! Compute the intersection of a line and a triangle. - //! From GLM_GTX_intersect extension. - template - bool intersectLineTriangle( - genType const & orig, genType const & dir, - genType const & vert0, genType const & vert1, genType const & vert2, - genType & position); - - //! Compute the intersection distance of a ray and a sphere. - //! The ray direction vector is unit length. - //! From GLM_GTX_intersect extension. - template - bool intersectRaySphere( - genType const & rayStarting, genType const & rayNormalizedDirection, - genType const & sphereCenter, const typename genType::value_type sphereRadiusSquered, - typename genType::value_type & intersectionDistance); - - //! Compute the intersection of a ray and a sphere. - //! From GLM_GTX_intersect extension. - template - bool intersectRaySphere( - genType const & rayStarting, genType const & rayNormalizedDirection, - genType const & sphereCenter, const typename genType::value_type sphereRadius, - genType & intersectionPosition, genType & intersectionNormal); - - //! Compute the intersection of a line and a sphere. - //! From GLM_GTX_intersect extension - template - bool intersectLineSphere( - genType const & point0, genType const & point1, - genType const & sphereCenter, typename genType::value_type sphereRadius, - genType & intersectionPosition1, genType & intersectionNormal1, - genType & intersectionPosition2 = genType(), genType & intersectionNormal2 = genType()); - - /// @} -}//namespace glm - -#include "intersect.inl" - -#endif//GLM_GTX_intersect +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_intersect +/// @file glm/gtx/intersect.hpp +/// @date 2007-04-03 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_closest_point (dependence) +/// +/// @defgroup gtx_intersect GLM_GTX_intersect +/// @ingroup gtx +/// +/// @brief Add intersection functions +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_intersect +#define GLM_GTX_intersect GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtx/closest_point.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_closest_point extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_intersect + /// @{ + + //! Compute the intersection of a ray and a triangle. + //! From GLM_GTX_intersect extension. + template + bool intersectRayTriangle( + genType const & orig, genType const & dir, + genType const & vert0, genType const & vert1, genType const & vert2, + genType & baryPosition); + + //! Compute the intersection of a line and a triangle. + //! From GLM_GTX_intersect extension. + template + bool intersectLineTriangle( + genType const & orig, genType const & dir, + genType const & vert0, genType const & vert1, genType const & vert2, + genType & position); + + //! Compute the intersection distance of a ray and a sphere. + //! The ray direction vector is unit length. + //! From GLM_GTX_intersect extension. + template + bool intersectRaySphere( + genType const & rayStarting, genType const & rayNormalizedDirection, + genType const & sphereCenter, const typename genType::value_type sphereRadiusSquered, + typename genType::value_type & intersectionDistance); + + //! Compute the intersection of a ray and a sphere. + //! From GLM_GTX_intersect extension. + template + bool intersectRaySphere( + genType const & rayStarting, genType const & rayNormalizedDirection, + genType const & sphereCenter, const typename genType::value_type sphereRadius, + genType & intersectionPosition, genType & intersectionNormal); + + //! Compute the intersection of a line and a sphere. + //! From GLM_GTX_intersect extension + template + bool intersectLineSphere( + genType const & point0, genType const & point1, + genType const & sphereCenter, typename genType::value_type sphereRadius, + genType & intersectionPosition1, genType & intersectionNormal1, + genType & intersectionPosition2 = genType(), genType & intersectionNormal2 = genType()); + + /// @} +}//namespace glm + +#include "intersect.inl" + +#endif//GLM_GTX_intersect diff --git a/include/gal/opengl/glm/gtx/intersect.inl b/include/gal/opengl/glm/gtx/intersect.inl index 00f0131950..9e361f167c 100644 --- a/include/gal/opengl/glm/gtx/intersect.inl +++ b/include/gal/opengl/glm/gtx/intersect.inl @@ -1,196 +1,196 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2007-04-03 -// Updated : 2009-01-20 -// Licence : This source is under MIT licence -// File : glm/gtx/intersect.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#include -#include - -namespace glm -{ - template - GLM_FUNC_QUALIFIER bool intersectRayTriangle - ( - genType const & orig, genType const & dir, - genType const & v0, genType const & v1, genType const & v2, - genType & baryPosition - ) - { - genType e1 = v1 - v0; - genType e2 = v2 - v0; - - genType p = glm::cross(dir, e2); - - typename genType::value_type a = glm::dot(e1, p); - - typename genType::value_type Epsilon = std::numeric_limits::epsilon(); - if(a < Epsilon) - return false; - - typename genType::value_type f = typename genType::value_type(1.0f) / a; - - genType s = orig - v0; - baryPosition.x = f * glm::dot(s, p); - if(baryPosition.x < typename genType::value_type(0.0f)) - return false; - if(baryPosition.x > typename genType::value_type(1.0f)) - return false; - - genType q = glm::cross(s, e1); - baryPosition.y = f * glm::dot(dir, q); - if(baryPosition.y < typename genType::value_type(0.0f)) - return false; - if(baryPosition.y + baryPosition.x > typename genType::value_type(1.0f)) - return false; - - baryPosition.z = f * glm::dot(e2, q); - - return baryPosition.z >= typename genType::value_type(0.0f); - } - - //template - //GLM_FUNC_QUALIFIER bool intersectRayTriangle - //( - // genType const & orig, genType const & dir, - // genType const & vert0, genType const & vert1, genType const & vert2, - // genType & position - //) - //{ - // typename genType::value_type Epsilon = std::numeric_limits::epsilon(); - // - // genType edge1 = vert1 - vert0; - // genType edge2 = vert2 - vert0; - // - // genType pvec = cross(dir, edge2); - // - // float det = dot(edge1, pvec); - // if(det < Epsilon) - // return false; - // - // genType tvec = orig - vert0; - // - // position.y = dot(tvec, pvec); - // if (position.y < typename genType::value_type(0) || position.y > det) - // return typename genType::value_type(0); - // - // genType qvec = cross(tvec, edge1); - // - // position.z = dot(dir, qvec); - // if (position.z < typename genType::value_type(0) || position.y + position.z > det) - // return typename genType::value_type(0); - // - // position.x = dot(edge2, qvec); - // position *= typename genType::value_type(1) / det; - // - // return typename genType::value_type(1); - //} - - template - GLM_FUNC_QUALIFIER bool intersectLineTriangle - ( - genType const & orig, genType const & dir, - genType const & vert0, genType const & vert1, genType const & vert2, - genType & position - ) - { - typename genType::value_type Epsilon = std::numeric_limits::epsilon(); - - genType edge1 = vert1 - vert0; - genType edge2 = vert2 - vert0; - - genType pvec = cross(dir, edge2); - - float det = dot(edge1, pvec); - - if (det > -Epsilon && det < Epsilon) - return false; - float inv_det = typename genType::value_type(1) / det; - - genType tvec = orig - vert0; - - position.y = dot(tvec, pvec) * inv_det; - if (position.y < typename genType::value_type(0) || position.y > typename genType::value_type(1)) - return false; - - genType qvec = cross(tvec, edge1); - - position.z = dot(dir, qvec) * inv_det; - if (position.z < typename genType::value_type(0) || position.y + position.z > typename genType::value_type(1)) - return false; - - position.x = dot(edge2, qvec) * inv_det; - - return true; - } - - template - GLM_FUNC_QUALIFIER bool intersectRaySphere - ( - genType const & rayStarting, genType const & rayNormalizedDirection, - genType const & sphereCenter, const typename genType::value_type sphereRadiusSquered, - typename genType::value_type & intersectionDistance - ) - { - typename genType::value_type Epsilon = std::numeric_limits::epsilon(); - genType diff = sphereCenter - rayStarting; - typename genType::value_type t0 = dot(diff, rayNormalizedDirection); - typename genType::value_type dSquared = dot(diff, diff) - t0 * t0; - if( dSquared > sphereRadiusSquered ) - { - return false; - } - typename genType::value_type t1 = sqrt( sphereRadiusSquered - dSquared ); - intersectionDistance = t0 > t1 + Epsilon ? t0 - t1 : t0 + t1; - return intersectionDistance > Epsilon; - } - - template - GLM_FUNC_QUALIFIER bool intersectRaySphere - ( - genType const & rayStarting, genType const & rayNormalizedDirection, - genType const & sphereCenter, const typename genType::value_type sphereRadius, - genType & intersectionPosition, genType & intersectionNormal - ) - { - typename genType::value_type distance; - if( intersectRaySphere( rayStarting, rayNormalizedDirection, sphereCenter, sphereRadius * sphereRadius, distance ) ) - { - intersectionPosition = rayStarting + rayNormalizedDirection * distance; - intersectionNormal = (intersectionPosition - sphereCenter) / sphereRadius; - return true; - } - return false; - } - - template - GLM_FUNC_QUALIFIER bool intersectLineSphere - ( - genType const & point0, genType const & point1, - genType const & sphereCenter, typename genType::value_type sphereRadius, - genType & intersectionPoint1, genType & intersectionNormal1, - genType & intersectionPoint2, genType & intersectionNormal2 - ) - { - typename genType::value_type Epsilon = std::numeric_limits::epsilon(); - genType dir = normalize(point1 - point0); - genType diff = sphereCenter - point0; - typename genType::value_type t0 = dot(diff, dir); - typename genType::value_type dSquared = dot(diff, diff) - t0 * t0; - if( dSquared > sphereRadius * sphereRadius ) - { - return false; - } - typename genType::value_type t1 = sqrt( sphereRadius * sphereRadius - dSquared ); - if( t0 < t1 + Epsilon ) - t1 = -t1; - intersectionPoint1 = point0 + dir * (t0 - t1); - intersectionNormal1 = (intersectionPoint1 - sphereCenter) / sphereRadius; - intersectionPoint2 = point0 + dir * (t0 + t1); - intersectionNormal2 = (intersectionPoint2 - sphereCenter) / sphereRadius; - return true; - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-04-03 +// Updated : 2009-01-20 +// Licence : This source is under MIT licence +// File : glm/gtx/intersect.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include +#include + +namespace glm +{ + template + GLM_FUNC_QUALIFIER bool intersectRayTriangle + ( + genType const & orig, genType const & dir, + genType const & v0, genType const & v1, genType const & v2, + genType & baryPosition + ) + { + genType e1 = v1 - v0; + genType e2 = v2 - v0; + + genType p = glm::cross(dir, e2); + + typename genType::value_type a = glm::dot(e1, p); + + typename genType::value_type Epsilon = std::numeric_limits::epsilon(); + if(a < Epsilon) + return false; + + typename genType::value_type f = typename genType::value_type(1.0f) / a; + + genType s = orig - v0; + baryPosition.x = f * glm::dot(s, p); + if(baryPosition.x < typename genType::value_type(0.0f)) + return false; + if(baryPosition.x > typename genType::value_type(1.0f)) + return false; + + genType q = glm::cross(s, e1); + baryPosition.y = f * glm::dot(dir, q); + if(baryPosition.y < typename genType::value_type(0.0f)) + return false; + if(baryPosition.y + baryPosition.x > typename genType::value_type(1.0f)) + return false; + + baryPosition.z = f * glm::dot(e2, q); + + return baryPosition.z >= typename genType::value_type(0.0f); + } + + //template + //GLM_FUNC_QUALIFIER bool intersectRayTriangle + //( + // genType const & orig, genType const & dir, + // genType const & vert0, genType const & vert1, genType const & vert2, + // genType & position + //) + //{ + // typename genType::value_type Epsilon = std::numeric_limits::epsilon(); + // + // genType edge1 = vert1 - vert0; + // genType edge2 = vert2 - vert0; + // + // genType pvec = cross(dir, edge2); + // + // float det = dot(edge1, pvec); + // if(det < Epsilon) + // return false; + // + // genType tvec = orig - vert0; + // + // position.y = dot(tvec, pvec); + // if (position.y < typename genType::value_type(0) || position.y > det) + // return typename genType::value_type(0); + // + // genType qvec = cross(tvec, edge1); + // + // position.z = dot(dir, qvec); + // if (position.z < typename genType::value_type(0) || position.y + position.z > det) + // return typename genType::value_type(0); + // + // position.x = dot(edge2, qvec); + // position *= typename genType::value_type(1) / det; + // + // return typename genType::value_type(1); + //} + + template + GLM_FUNC_QUALIFIER bool intersectLineTriangle + ( + genType const & orig, genType const & dir, + genType const & vert0, genType const & vert1, genType const & vert2, + genType & position + ) + { + typename genType::value_type Epsilon = std::numeric_limits::epsilon(); + + genType edge1 = vert1 - vert0; + genType edge2 = vert2 - vert0; + + genType pvec = cross(dir, edge2); + + float det = dot(edge1, pvec); + + if (det > -Epsilon && det < Epsilon) + return false; + float inv_det = typename genType::value_type(1) / det; + + genType tvec = orig - vert0; + + position.y = dot(tvec, pvec) * inv_det; + if (position.y < typename genType::value_type(0) || position.y > typename genType::value_type(1)) + return false; + + genType qvec = cross(tvec, edge1); + + position.z = dot(dir, qvec) * inv_det; + if (position.z < typename genType::value_type(0) || position.y + position.z > typename genType::value_type(1)) + return false; + + position.x = dot(edge2, qvec) * inv_det; + + return true; + } + + template + GLM_FUNC_QUALIFIER bool intersectRaySphere + ( + genType const & rayStarting, genType const & rayNormalizedDirection, + genType const & sphereCenter, const typename genType::value_type sphereRadiusSquered, + typename genType::value_type & intersectionDistance + ) + { + typename genType::value_type Epsilon = std::numeric_limits::epsilon(); + genType diff = sphereCenter - rayStarting; + typename genType::value_type t0 = dot(diff, rayNormalizedDirection); + typename genType::value_type dSquared = dot(diff, diff) - t0 * t0; + if( dSquared > sphereRadiusSquered ) + { + return false; + } + typename genType::value_type t1 = sqrt( sphereRadiusSquered - dSquared ); + intersectionDistance = t0 > t1 + Epsilon ? t0 - t1 : t0 + t1; + return intersectionDistance > Epsilon; + } + + template + GLM_FUNC_QUALIFIER bool intersectRaySphere + ( + genType const & rayStarting, genType const & rayNormalizedDirection, + genType const & sphereCenter, const typename genType::value_type sphereRadius, + genType & intersectionPosition, genType & intersectionNormal + ) + { + typename genType::value_type distance; + if( intersectRaySphere( rayStarting, rayNormalizedDirection, sphereCenter, sphereRadius * sphereRadius, distance ) ) + { + intersectionPosition = rayStarting + rayNormalizedDirection * distance; + intersectionNormal = (intersectionPosition - sphereCenter) / sphereRadius; + return true; + } + return false; + } + + template + GLM_FUNC_QUALIFIER bool intersectLineSphere + ( + genType const & point0, genType const & point1, + genType const & sphereCenter, typename genType::value_type sphereRadius, + genType & intersectionPoint1, genType & intersectionNormal1, + genType & intersectionPoint2, genType & intersectionNormal2 + ) + { + typename genType::value_type Epsilon = std::numeric_limits::epsilon(); + genType dir = normalize(point1 - point0); + genType diff = sphereCenter - point0; + typename genType::value_type t0 = dot(diff, dir); + typename genType::value_type dSquared = dot(diff, diff) - t0 * t0; + if( dSquared > sphereRadius * sphereRadius ) + { + return false; + } + typename genType::value_type t1 = sqrt( sphereRadius * sphereRadius - dSquared ); + if( t0 < t1 + Epsilon ) + t1 = -t1; + intersectionPoint1 = point0 + dir * (t0 - t1); + intersectionNormal1 = (intersectionPoint1 - sphereCenter) / sphereRadius; + intersectionPoint2 = point0 + dir * (t0 + t1); + intersectionNormal2 = (intersectionPoint2 - sphereCenter) / sphereRadius; + return true; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/log_base.hpp b/include/gal/opengl/glm/gtx/log_base.hpp index 08d6f061c4..9a67477ca3 100644 --- a/include/gal/opengl/glm/gtx/log_base.hpp +++ b/include/gal/opengl/glm/gtx/log_base.hpp @@ -1,65 +1,65 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_log_base -/// @file glm/gtx/log_base.hpp -/// @date 2008-10-24 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_log_base GLM_GTX_log_base -/// @ingroup gtx -/// -/// @brief Logarithm for any base. base can be a vector or a scalar. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_log_base -#define GLM_GTX_log_base GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_log_base extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_log_base - /// @{ - - //! Logarithm for any base. - //! From GLM_GTX_log_base. - template - genType log( - genType const & x, - genType const & base); - - /// @} -}//namespace glm - -#include "log_base.inl" - -#endif//GLM_GTX_log_base +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_log_base +/// @file glm/gtx/log_base.hpp +/// @date 2008-10-24 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_log_base GLM_GTX_log_base +/// @ingroup gtx +/// +/// @brief Logarithm for any base. base can be a vector or a scalar. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_log_base +#define GLM_GTX_log_base GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_log_base extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_log_base + /// @{ + + //! Logarithm for any base. + //! From GLM_GTX_log_base. + template + genType log( + genType const & x, + genType const & base); + + /// @} +}//namespace glm + +#include "log_base.inl" + +#endif//GLM_GTX_log_base diff --git a/include/gal/opengl/glm/gtx/log_base.inl b/include/gal/opengl/glm/gtx/log_base.inl index 75c1537116..59a8084d55 100644 --- a/include/gal/opengl/glm/gtx/log_base.inl +++ b/include/gal/opengl/glm/gtx/log_base.inl @@ -1,24 +1,24 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2008-10-24 -// Updated : 2008-10-24 -// Licence : This source is under MIT License -// File : glm/gtx/log_base.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER genType log( - genType const & x, - genType const & base) - { - assert(x != genType(0)); - - return glm::log(x) / glm::log(base); - } - - VECTORIZE_VEC_SCA(log) - VECTORIZE_VEC_VEC(log) -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-10-24 +// Updated : 2008-10-24 +// Licence : This source is under MIT License +// File : glm/gtx/log_base.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER genType log( + genType const & x, + genType const & base) + { + assert(x != genType(0)); + + return glm::log(x) / glm::log(base); + } + + VECTORIZE_VEC_SCA(log) + VECTORIZE_VEC_VEC(log) +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/matrix_cross_product.hpp b/include/gal/opengl/glm/gtx/matrix_cross_product.hpp index bafb77925d..0cd6c49e5f 100644 --- a/include/gal/opengl/glm/gtx/matrix_cross_product.hpp +++ b/include/gal/opengl/glm/gtx/matrix_cross_product.hpp @@ -1,71 +1,71 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_matrix_cross_product -/// @file glm/gtx/matrix_cross_product.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_extented_min_max (dependence) -/// -/// @defgroup gtx_matrix_cross_product GLM_GTX_matrix_cross_product -/// @ingroup gtx -/// -/// @brief Build cross product matrices -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_matrix_cross_product -#define GLM_GTX_matrix_cross_product GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_matrix_cross_product extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_matrix_cross_product - /// @{ - - //! Build a cross product matrix. - //! From GLM_GTX_matrix_cross_product extension. - template - detail::tmat3x3 matrixCross3( - detail::tvec3 const & x); - - //! Build a cross product matrix. - //! From GLM_GTX_matrix_cross_product extension. - template - detail::tmat4x4 matrixCross4( - detail::tvec3 const & x); - - /// @} -}//namespace glm - -#include "matrix_cross_product.inl" - -#endif//GLM_GTX_matrix_cross_product +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_matrix_cross_product +/// @file glm/gtx/matrix_cross_product.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_extented_min_max (dependence) +/// +/// @defgroup gtx_matrix_cross_product GLM_GTX_matrix_cross_product +/// @ingroup gtx +/// +/// @brief Build cross product matrices +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_matrix_cross_product +#define GLM_GTX_matrix_cross_product GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_matrix_cross_product extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_matrix_cross_product + /// @{ + + //! Build a cross product matrix. + //! From GLM_GTX_matrix_cross_product extension. + template + detail::tmat3x3 matrixCross3( + detail::tvec3 const & x); + + //! Build a cross product matrix. + //! From GLM_GTX_matrix_cross_product extension. + template + detail::tmat4x4 matrixCross4( + detail::tvec3 const & x); + + /// @} +}//namespace glm + +#include "matrix_cross_product.inl" + +#endif//GLM_GTX_matrix_cross_product diff --git a/include/gal/opengl/glm/gtx/matrix_cross_product.inl b/include/gal/opengl/glm/gtx/matrix_cross_product.inl index 9d5d69acfe..e5f48e8849 100644 --- a/include/gal/opengl/glm/gtx/matrix_cross_product.inl +++ b/include/gal/opengl/glm/gtx/matrix_cross_product.inl @@ -1,44 +1,44 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2005-12-21 -// Updated : 2005-12-21 -// Licence : This source is under MIT License -// File : glm/gtx/matrix_cross_product.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER detail::tmat3x3 matrixCross3 - ( - detail::tvec3 const & x - ) - { - detail::tmat3x3 Result(T(0)); - Result[0][1] = x.z; - Result[1][0] = -x.z; - Result[0][2] = -x.y; - Result[2][0] = x.y; - Result[1][2] = x.x; - Result[2][1] = -x.x; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 matrixCross4 - ( - detail::tvec3 const & x - ) - { - detail::tmat4x4 Result(T(0)); - Result[0][1] = x.z; - Result[1][0] = -x.z; - Result[0][2] = -x.y; - Result[2][0] = x.y; - Result[1][2] = x.x; - Result[2][1] = -x.x; - return Result; - } - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2005-12-21 +// Licence : This source is under MIT License +// File : glm/gtx/matrix_cross_product.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tmat3x3 matrixCross3 + ( + detail::tvec3 const & x + ) + { + detail::tmat3x3 Result(T(0)); + Result[0][1] = x.z; + Result[1][0] = -x.z; + Result[0][2] = -x.y; + Result[2][0] = x.y; + Result[1][2] = x.x; + Result[2][1] = -x.x; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 matrixCross4 + ( + detail::tvec3 const & x + ) + { + detail::tmat4x4 Result(T(0)); + Result[0][1] = x.z; + Result[1][0] = -x.z; + Result[0][2] = -x.y; + Result[2][0] = x.y; + Result[1][2] = x.x; + Result[2][1] = -x.x; + return Result; + } + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/matrix_interpolation.hpp b/include/gal/opengl/glm/gtx/matrix_interpolation.hpp index 7b072e2eba..9217c6e18e 100644 --- a/include/gal/opengl/glm/gtx/matrix_interpolation.hpp +++ b/include/gal/opengl/glm/gtx/matrix_interpolation.hpp @@ -1,88 +1,88 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_matrix_interpolation -/// @file glm/gtx/matrix_interpolation.hpp -/// @date 2011-03-05 / 2011-06-07 -/// @author Ghenadii Ursachi (the.asteroth@gmail.com) -/// -/// @see core (dependence) -/// -/// @defgroup gtx_matrix_interpolation GLM_GTX_matrix_interpolation -/// @ingroup gtx -/// -/// @brief Allows to directly interpolate two exiciting matrices. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_matrix_interpolation -#define GLM_GTX_matrix_interpolation GLM_VERSION - -// Dependency: -//#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_matrix_interpolation extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_matrix_interpolation - /// @{ - - //! Get the axis and angle of the rotation from a matrix. - //! From GLM_GTX_matrix_interpolation extension. - template - void axisAngle( - detail::tmat4x4 const & mat, - detail::tvec3 & axis, - T & angle); - - //! Build a matrix from axis and angle. - //! From GLM_GTX_matrix_interpolation extension. - template - detail::tmat4x4 axisAngleMatrix( - detail::tvec3 const & axis, - T const angle); - - //! Extracts the rotation part of a matrix. - //! From GLM_GTX_matrix_interpolation extension. - template - detail::tmat4x4 extractMatrixRotation( - detail::tmat4x4 const & mat); - - //! Build a interpolation of 4 * 4 matrixes. - //! From GLM_GTX_matrix_interpolation extension. - //! Warning! works only with rotation and/or translation matrixes, scale will generate unexpected results. - template - detail::tmat4x4 interpolate( - detail::tmat4x4 const & m1, - detail::tmat4x4 const & m2, - T const delta); - - /// @} -}//namespace glm - -#include "matrix_interpolation.inl" - -#endif//GLM_GTX_matrix_interpolation +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_matrix_interpolation +/// @file glm/gtx/matrix_interpolation.hpp +/// @date 2011-03-05 / 2011-06-07 +/// @author Ghenadii Ursachi (the.asteroth@gmail.com) +/// +/// @see core (dependence) +/// +/// @defgroup gtx_matrix_interpolation GLM_GTX_matrix_interpolation +/// @ingroup gtx +/// +/// @brief Allows to directly interpolate two exiciting matrices. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_matrix_interpolation +#define GLM_GTX_matrix_interpolation GLM_VERSION + +// Dependency: +//#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_matrix_interpolation extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_matrix_interpolation + /// @{ + + //! Get the axis and angle of the rotation from a matrix. + //! From GLM_GTX_matrix_interpolation extension. + template + void axisAngle( + detail::tmat4x4 const & mat, + detail::tvec3 & axis, + T & angle); + + //! Build a matrix from axis and angle. + //! From GLM_GTX_matrix_interpolation extension. + template + detail::tmat4x4 axisAngleMatrix( + detail::tvec3 const & axis, + T const angle); + + //! Extracts the rotation part of a matrix. + //! From GLM_GTX_matrix_interpolation extension. + template + detail::tmat4x4 extractMatrixRotation( + detail::tmat4x4 const & mat); + + //! Build a interpolation of 4 * 4 matrixes. + //! From GLM_GTX_matrix_interpolation extension. + //! Warning! works only with rotation and/or translation matrixes, scale will generate unexpected results. + template + detail::tmat4x4 interpolate( + detail::tmat4x4 const & m1, + detail::tmat4x4 const & m2, + T const delta); + + /// @} +}//namespace glm + +#include "matrix_interpolation.inl" + +#endif//GLM_GTX_matrix_interpolation diff --git a/include/gal/opengl/glm/gtx/matrix_interpolation.inl b/include/gal/opengl/glm/gtx/matrix_interpolation.inl index 1df9bca4fd..ffd1509654 100644 --- a/include/gal/opengl/glm/gtx/matrix_interpolation.inl +++ b/include/gal/opengl/glm/gtx/matrix_interpolation.inl @@ -1,130 +1,130 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2011-03-05 -// Updated : 2011-03-05 -// Licence : This source is under MIT License -// File : glm/gtx/matrix_interpolation.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER void axisAngle - ( - detail::tmat4x4 const & mat, - detail::tvec3 & axis, - T & angle - ) - { - T epsilon = (T)0.01; - T epsilon2 = (T)0.1; - - if ((fabs(mat[1][0] - mat[0][1]) < epsilon) && (fabs(mat[2][0] - mat[0][2]) < epsilon) && (fabs(mat[2][1] - mat[1][2]) < epsilon)) { - if ((fabs(mat[1][0] + mat[0][1]) < epsilon2) && (fabs(mat[2][0] + mat[0][2]) < epsilon2) && (fabs(mat[2][1] + mat[1][2]) < epsilon2) && (fabs(mat[0][0] + mat[1][1] + mat[2][2] - (T)3.0) < epsilon2)) { - angle = (T)0.0; - axis.x = (T)1.0; - axis.y = (T)0.0; - axis.z = (T)0.0; - return; - } - angle = T(3.1415926535897932384626433832795); - T xx = (mat[0][0] + (T)1.0) / (T)2.0; - T yy = (mat[1][1] + (T)1.0) / (T)2.0; - T zz = (mat[2][2] + (T)1.0) / (T)2.0; - T xy = (mat[1][0] + mat[0][1]) / (T)4.0; - T xz = (mat[2][0] + mat[0][2]) / (T)4.0; - T yz = (mat[2][1] + mat[1][2]) / (T)4.0; - if ((xx > yy) && (xx > zz)) { - if (xx < epsilon) { - axis.x = (T)0.0; - axis.y = (T)0.7071; - axis.z = (T)0.7071; - } else { - axis.x = sqrt(xx); - axis.y = xy / axis.x; - axis.z = xz / axis.x; - } - } else if (yy > zz) { - if (yy < epsilon) { - axis.x = (T)0.7071; - axis.y = (T)0.0; - axis.z = (T)0.7071; - } else { - axis.y = sqrt(yy); - axis.x = xy / axis.y; - axis.z = yz / axis.y; - } - } else { - if (zz < epsilon) { - axis.x = (T)0.7071; - axis.y = (T)0.7071; - axis.z = (T)0.0; - } else { - axis.z = sqrt(zz); - axis.x = xz / axis.z; - axis.y = yz / axis.z; - } - } - return; - } - T s = sqrt((mat[2][1] - mat[1][2]) * (mat[2][1] - mat[1][2]) + (mat[2][0] - mat[0][2]) * (mat[2][0] - mat[0][2]) + (mat[1][0] - mat[0][1]) * (mat[1][0] - mat[0][1])); - if (glm::abs(s) < T(0.001)) - s = (T)1.0; - angle = acos((mat[0][0] + mat[1][1] + mat[2][2] - (T)1.0) / (T)2.0); - axis.x = (mat[1][2] - mat[2][1]) / s; - axis.y = (mat[2][0] - mat[0][2]) / s; - axis.z = (mat[0][1] - mat[1][0]) / s; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 axisAngleMatrix - ( - detail::tvec3 const & axis, - T const angle - ) - { - T c = cos(angle); - T s = sin(angle); - T t = T(1) - c; - detail::tvec3 n = normalize(axis); - - return detail::tmat4x4( - t * n.x * n.x + c, t * n.x * n.y + n.z * s, t * n.x * n.z - n.y * s, T(0), - t * n.x * n.y - n.z * s, t * n.y * n.y + c, t * n.y * n.z + n.x * s, T(0), - t * n.x * n.z + n.y * s, t * n.y * n.z - n.x * s, t * n.z * n.z + c, T(0), - T(0), T(0), T(0), T(1) - ); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 extractMatrixRotation( - detail::tmat4x4 const & mat) - { - return detail::tmat4x4( - mat[0][0], mat[0][1], mat[0][2], 0.0, - mat[1][0], mat[1][1], mat[1][2], 0.0, - mat[2][0], mat[2][1], mat[2][2], 0.0, - 0.0, 0.0, 0.0, 1.0 - ); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 interpolate - ( - detail::tmat4x4 const & m1, - detail::tmat4x4 const & m2, - T const delta - ) - { - detail::tmat4x4 dltRotation = m2 * transpose(m1); - detail::tvec3 dltAxis; - T dltAngle; - axisAngle(dltRotation, dltAxis, dltAngle); - detail::tmat4x4 out = axisAngleMatrix(dltAxis, dltAngle * delta) * extractMatrixRotation(m1); - out[3][0] = m1[3][0] + delta * (m2[3][0] - m1[3][0]); - out[3][1] = m1[3][1] + delta * (m2[3][1] - m1[3][1]); - out[3][2] = m1[3][2] + delta * (m2[3][2] - m1[3][2]); - return out; - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2011-03-05 +// Updated : 2011-03-05 +// Licence : This source is under MIT License +// File : glm/gtx/matrix_interpolation.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER void axisAngle + ( + detail::tmat4x4 const & mat, + detail::tvec3 & axis, + T & angle + ) + { + T epsilon = (T)0.01; + T epsilon2 = (T)0.1; + + if ((fabs(mat[1][0] - mat[0][1]) < epsilon) && (fabs(mat[2][0] - mat[0][2]) < epsilon) && (fabs(mat[2][1] - mat[1][2]) < epsilon)) { + if ((fabs(mat[1][0] + mat[0][1]) < epsilon2) && (fabs(mat[2][0] + mat[0][2]) < epsilon2) && (fabs(mat[2][1] + mat[1][2]) < epsilon2) && (fabs(mat[0][0] + mat[1][1] + mat[2][2] - (T)3.0) < epsilon2)) { + angle = (T)0.0; + axis.x = (T)1.0; + axis.y = (T)0.0; + axis.z = (T)0.0; + return; + } + angle = T(3.1415926535897932384626433832795); + T xx = (mat[0][0] + (T)1.0) / (T)2.0; + T yy = (mat[1][1] + (T)1.0) / (T)2.0; + T zz = (mat[2][2] + (T)1.0) / (T)2.0; + T xy = (mat[1][0] + mat[0][1]) / (T)4.0; + T xz = (mat[2][0] + mat[0][2]) / (T)4.0; + T yz = (mat[2][1] + mat[1][2]) / (T)4.0; + if ((xx > yy) && (xx > zz)) { + if (xx < epsilon) { + axis.x = (T)0.0; + axis.y = (T)0.7071; + axis.z = (T)0.7071; + } else { + axis.x = sqrt(xx); + axis.y = xy / axis.x; + axis.z = xz / axis.x; + } + } else if (yy > zz) { + if (yy < epsilon) { + axis.x = (T)0.7071; + axis.y = (T)0.0; + axis.z = (T)0.7071; + } else { + axis.y = sqrt(yy); + axis.x = xy / axis.y; + axis.z = yz / axis.y; + } + } else { + if (zz < epsilon) { + axis.x = (T)0.7071; + axis.y = (T)0.7071; + axis.z = (T)0.0; + } else { + axis.z = sqrt(zz); + axis.x = xz / axis.z; + axis.y = yz / axis.z; + } + } + return; + } + T s = sqrt((mat[2][1] - mat[1][2]) * (mat[2][1] - mat[1][2]) + (mat[2][0] - mat[0][2]) * (mat[2][0] - mat[0][2]) + (mat[1][0] - mat[0][1]) * (mat[1][0] - mat[0][1])); + if (glm::abs(s) < T(0.001)) + s = (T)1.0; + angle = acos((mat[0][0] + mat[1][1] + mat[2][2] - (T)1.0) / (T)2.0); + axis.x = (mat[1][2] - mat[2][1]) / s; + axis.y = (mat[2][0] - mat[0][2]) / s; + axis.z = (mat[0][1] - mat[1][0]) / s; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 axisAngleMatrix + ( + detail::tvec3 const & axis, + T const angle + ) + { + T c = cos(angle); + T s = sin(angle); + T t = T(1) - c; + detail::tvec3 n = normalize(axis); + + return detail::tmat4x4( + t * n.x * n.x + c, t * n.x * n.y + n.z * s, t * n.x * n.z - n.y * s, T(0), + t * n.x * n.y - n.z * s, t * n.y * n.y + c, t * n.y * n.z + n.x * s, T(0), + t * n.x * n.z + n.y * s, t * n.y * n.z - n.x * s, t * n.z * n.z + c, T(0), + T(0), T(0), T(0), T(1) + ); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 extractMatrixRotation( + detail::tmat4x4 const & mat) + { + return detail::tmat4x4( + mat[0][0], mat[0][1], mat[0][2], 0.0, + mat[1][0], mat[1][1], mat[1][2], 0.0, + mat[2][0], mat[2][1], mat[2][2], 0.0, + 0.0, 0.0, 0.0, 1.0 + ); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 interpolate + ( + detail::tmat4x4 const & m1, + detail::tmat4x4 const & m2, + T const delta + ) + { + detail::tmat4x4 dltRotation = m2 * transpose(m1); + detail::tvec3 dltAxis; + T dltAngle; + axisAngle(dltRotation, dltAxis, dltAngle); + detail::tmat4x4 out = axisAngleMatrix(dltAxis, dltAngle * delta) * extractMatrixRotation(m1); + out[3][0] = m1[3][0] + delta * (m2[3][0] - m1[3][0]); + out[3][1] = m1[3][1] + delta * (m2[3][1] - m1[3][1]); + out[3][2] = m1[3][2] + delta * (m2[3][2] - m1[3][2]); + return out; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/matrix_major_storage.hpp b/include/gal/opengl/glm/gtx/matrix_major_storage.hpp index 973e2aeeeb..2cb5b0693d 100644 --- a/include/gal/opengl/glm/gtx/matrix_major_storage.hpp +++ b/include/gal/opengl/glm/gtx/matrix_major_storage.hpp @@ -1,143 +1,143 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_matrix_major_storage -/// @file glm/gtx/matrix_major_storage.hpp -/// @date 2006-04-19 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_extented_min_max (dependence) -/// -/// @defgroup gtx_matrix_major_storage GLM_GTX_matrix_major_storage -/// @ingroup gtx -/// -/// @brief Build matrices with specific matrix order, row or column -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_matrix_major_storage -#define GLM_GTX_matrix_major_storage GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_matrix_major_storage extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_matrix_major_storage - /// @{ - - //! Build a row major matrix from row vectors. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat2x2 rowMajor2( - detail::tvec2 const & v1, - detail::tvec2 const & v2); - - //! Build a row major matrix from other matrix. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat2x2 rowMajor2( - detail::tmat2x2 const & m); - - //! Build a row major matrix from row vectors. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat3x3 rowMajor3( - detail::tvec3 const & v1, - detail::tvec3 const & v2, - detail::tvec3 const & v3); - - //! Build a row major matrix from other matrix. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat3x3 rowMajor3( - detail::tmat3x3 const & m); - - //! Build a row major matrix from row vectors. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat4x4 rowMajor4( - detail::tvec4 const & v1, - detail::tvec4 const & v2, - detail::tvec4 const & v3, - detail::tvec4 const & v4); - - //! Build a row major matrix from other matrix. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat4x4 rowMajor4( - detail::tmat4x4 const & m); - - //! Build a column major matrix from column vectors. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat2x2 colMajor2( - detail::tvec2 const & v1, - detail::tvec2 const & v2); - - //! Build a column major matrix from other matrix. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat2x2 colMajor2( - detail::tmat2x2 const & m); - - //! Build a column major matrix from column vectors. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat3x3 colMajor3( - detail::tvec3 const & v1, - detail::tvec3 const & v2, - detail::tvec3 const & v3); - - //! Build a column major matrix from other matrix. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat3x3 colMajor3( - detail::tmat3x3 const & m); - - //! Build a column major matrix from column vectors. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat4x4 colMajor4( - detail::tvec4 const & v1, - detail::tvec4 const & v2, - detail::tvec4 const & v3, - detail::tvec4 const & v4); - - //! Build a column major matrix from other matrix. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat4x4 colMajor4( - detail::tmat4x4 const & m); - - /// @} -}//namespace glm - -#include "matrix_major_storage.inl" - -#endif//GLM_GTX_matrix_major_storage +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_matrix_major_storage +/// @file glm/gtx/matrix_major_storage.hpp +/// @date 2006-04-19 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_extented_min_max (dependence) +/// +/// @defgroup gtx_matrix_major_storage GLM_GTX_matrix_major_storage +/// @ingroup gtx +/// +/// @brief Build matrices with specific matrix order, row or column +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_matrix_major_storage +#define GLM_GTX_matrix_major_storage GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_matrix_major_storage extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_matrix_major_storage + /// @{ + + //! Build a row major matrix from row vectors. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat2x2 rowMajor2( + detail::tvec2 const & v1, + detail::tvec2 const & v2); + + //! Build a row major matrix from other matrix. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat2x2 rowMajor2( + detail::tmat2x2 const & m); + + //! Build a row major matrix from row vectors. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat3x3 rowMajor3( + detail::tvec3 const & v1, + detail::tvec3 const & v2, + detail::tvec3 const & v3); + + //! Build a row major matrix from other matrix. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat3x3 rowMajor3( + detail::tmat3x3 const & m); + + //! Build a row major matrix from row vectors. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat4x4 rowMajor4( + detail::tvec4 const & v1, + detail::tvec4 const & v2, + detail::tvec4 const & v3, + detail::tvec4 const & v4); + + //! Build a row major matrix from other matrix. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat4x4 rowMajor4( + detail::tmat4x4 const & m); + + //! Build a column major matrix from column vectors. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat2x2 colMajor2( + detail::tvec2 const & v1, + detail::tvec2 const & v2); + + //! Build a column major matrix from other matrix. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat2x2 colMajor2( + detail::tmat2x2 const & m); + + //! Build a column major matrix from column vectors. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat3x3 colMajor3( + detail::tvec3 const & v1, + detail::tvec3 const & v2, + detail::tvec3 const & v3); + + //! Build a column major matrix from other matrix. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat3x3 colMajor3( + detail::tmat3x3 const & m); + + //! Build a column major matrix from column vectors. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat4x4 colMajor4( + detail::tvec4 const & v1, + detail::tvec4 const & v2, + detail::tvec4 const & v3, + detail::tvec4 const & v4); + + //! Build a column major matrix from other matrix. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat4x4 colMajor4( + detail::tmat4x4 const & m); + + /// @} +}//namespace glm + +#include "matrix_major_storage.inl" + +#endif//GLM_GTX_matrix_major_storage diff --git a/include/gal/opengl/glm/gtx/matrix_major_storage.inl b/include/gal/opengl/glm/gtx/matrix_major_storage.inl index 4e5a9ff342..78ba72f8e8 100644 --- a/include/gal/opengl/glm/gtx/matrix_major_storage.inl +++ b/include/gal/opengl/glm/gtx/matrix_major_storage.inl @@ -1,173 +1,173 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2006-04-19 -// Updated : 2009-02-19 -// Licence : This source is under MIT License -// File : glm/gtx/matrix_major_storage.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER detail::tmat2x2 rowMajor2 - ( - detail::tvec2 const & v1, - detail::tvec2 const & v2 - ) - { - detail::tmat2x2 Result; - Result[0][0] = v1.x; - Result[1][0] = v1.y; - Result[0][1] = v2.x; - Result[1][1] = v2.y; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat2x2 rowMajor2( - const detail::tmat2x2& m) - { - detail::tmat2x2 Result; - Result[0][0] = m[0][0]; - Result[0][1] = m[1][0]; - Result[1][0] = m[0][1]; - Result[1][1] = m[1][1]; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x3 rowMajor3( - const detail::tvec3& v1, - const detail::tvec3& v2, - const detail::tvec3& v3) - { - detail::tmat3x3 Result; - Result[0][0] = v1.x; - Result[1][0] = v1.y; - Result[2][0] = v1.z; - Result[0][1] = v2.x; - Result[1][1] = v2.y; - Result[2][1] = v2.z; - Result[0][2] = v3.x; - Result[1][2] = v3.y; - Result[2][2] = v3.z; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x3 rowMajor3( - const detail::tmat3x3& m) - { - detail::tmat3x3 Result; - Result[0][0] = m[0][0]; - Result[0][1] = m[1][0]; - Result[0][2] = m[2][0]; - Result[1][0] = m[0][1]; - Result[1][1] = m[1][1]; - Result[1][2] = m[2][1]; - Result[2][0] = m[0][2]; - Result[2][1] = m[1][2]; - Result[2][2] = m[2][2]; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 rowMajor4( - const detail::tvec4& v1, - const detail::tvec4& v2, - const detail::tvec4& v3, - const detail::tvec4& v4) - { - detail::tmat4x4 Result; - Result[0][0] = v1.x; - Result[1][0] = v1.y; - Result[2][0] = v1.z; - Result[3][0] = v1.w; - Result[0][1] = v2.x; - Result[1][1] = v2.y; - Result[2][1] = v2.z; - Result[3][1] = v2.w; - Result[0][2] = v3.x; - Result[1][2] = v3.y; - Result[2][2] = v3.z; - Result[3][2] = v3.w; - Result[0][3] = v4.x; - Result[1][3] = v4.y; - Result[2][3] = v4.z; - Result[3][3] = v4.w; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 rowMajor4( - const detail::tmat4x4& m) - { - detail::tmat4x4 Result; - Result[0][0] = m[0][0]; - Result[0][1] = m[1][0]; - Result[0][2] = m[2][0]; - Result[0][3] = m[3][0]; - Result[1][0] = m[0][1]; - Result[1][1] = m[1][1]; - Result[1][2] = m[2][1]; - Result[1][3] = m[3][1]; - Result[2][0] = m[0][2]; - Result[2][1] = m[1][2]; - Result[2][2] = m[2][2]; - Result[2][3] = m[3][2]; - Result[3][0] = m[0][3]; - Result[3][1] = m[1][3]; - Result[3][2] = m[2][3]; - Result[3][3] = m[3][3]; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat2x2 colMajor2( - const detail::tvec2& v1, - const detail::tvec2& v2) - { - return detail::tmat2x2(v1, v2); - } - - template - GLM_FUNC_QUALIFIER detail::tmat2x2 colMajor2( - const detail::tmat2x2& m) - { - return detail::tmat2x2(m); - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x3 colMajor3( - const detail::tvec3& v1, - const detail::tvec3& v2, - const detail::tvec3& v3) - { - return detail::tmat3x3(v1, v2, v3); - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x3 colMajor3( - const detail::tmat3x3& m) - { - return detail::tmat3x3(m); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 colMajor4( - const detail::tvec4& v1, - const detail::tvec4& v2, - const detail::tvec4& v3, - const detail::tvec4& v4) - { - return detail::tmat4x4(v1, v2, v3, v4); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 colMajor4( - const detail::tmat4x4& m) - { - return detail::tmat4x4(m); - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2006-04-19 +// Updated : 2009-02-19 +// Licence : This source is under MIT License +// File : glm/gtx/matrix_major_storage.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tmat2x2 rowMajor2 + ( + detail::tvec2 const & v1, + detail::tvec2 const & v2 + ) + { + detail::tmat2x2 Result; + Result[0][0] = v1.x; + Result[1][0] = v1.y; + Result[0][1] = v2.x; + Result[1][1] = v2.y; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x2 rowMajor2( + const detail::tmat2x2& m) + { + detail::tmat2x2 Result; + Result[0][0] = m[0][0]; + Result[0][1] = m[1][0]; + Result[1][0] = m[0][1]; + Result[1][1] = m[1][1]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 rowMajor3( + const detail::tvec3& v1, + const detail::tvec3& v2, + const detail::tvec3& v3) + { + detail::tmat3x3 Result; + Result[0][0] = v1.x; + Result[1][0] = v1.y; + Result[2][0] = v1.z; + Result[0][1] = v2.x; + Result[1][1] = v2.y; + Result[2][1] = v2.z; + Result[0][2] = v3.x; + Result[1][2] = v3.y; + Result[2][2] = v3.z; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 rowMajor3( + const detail::tmat3x3& m) + { + detail::tmat3x3 Result; + Result[0][0] = m[0][0]; + Result[0][1] = m[1][0]; + Result[0][2] = m[2][0]; + Result[1][0] = m[0][1]; + Result[1][1] = m[1][1]; + Result[1][2] = m[2][1]; + Result[2][0] = m[0][2]; + Result[2][1] = m[1][2]; + Result[2][2] = m[2][2]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 rowMajor4( + const detail::tvec4& v1, + const detail::tvec4& v2, + const detail::tvec4& v3, + const detail::tvec4& v4) + { + detail::tmat4x4 Result; + Result[0][0] = v1.x; + Result[1][0] = v1.y; + Result[2][0] = v1.z; + Result[3][0] = v1.w; + Result[0][1] = v2.x; + Result[1][1] = v2.y; + Result[2][1] = v2.z; + Result[3][1] = v2.w; + Result[0][2] = v3.x; + Result[1][2] = v3.y; + Result[2][2] = v3.z; + Result[3][2] = v3.w; + Result[0][3] = v4.x; + Result[1][3] = v4.y; + Result[2][3] = v4.z; + Result[3][3] = v4.w; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 rowMajor4( + const detail::tmat4x4& m) + { + detail::tmat4x4 Result; + Result[0][0] = m[0][0]; + Result[0][1] = m[1][0]; + Result[0][2] = m[2][0]; + Result[0][3] = m[3][0]; + Result[1][0] = m[0][1]; + Result[1][1] = m[1][1]; + Result[1][2] = m[2][1]; + Result[1][3] = m[3][1]; + Result[2][0] = m[0][2]; + Result[2][1] = m[1][2]; + Result[2][2] = m[2][2]; + Result[2][3] = m[3][2]; + Result[3][0] = m[0][3]; + Result[3][1] = m[1][3]; + Result[3][2] = m[2][3]; + Result[3][3] = m[3][3]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x2 colMajor2( + const detail::tvec2& v1, + const detail::tvec2& v2) + { + return detail::tmat2x2(v1, v2); + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x2 colMajor2( + const detail::tmat2x2& m) + { + return detail::tmat2x2(m); + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 colMajor3( + const detail::tvec3& v1, + const detail::tvec3& v2, + const detail::tvec3& v3) + { + return detail::tmat3x3(v1, v2, v3); + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 colMajor3( + const detail::tmat3x3& m) + { + return detail::tmat3x3(m); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 colMajor4( + const detail::tvec4& v1, + const detail::tvec4& v2, + const detail::tvec4& v3, + const detail::tvec4& v4) + { + return detail::tmat4x4(v1, v2, v3, v4); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 colMajor4( + const detail::tmat4x4& m) + { + return detail::tmat4x4(m); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/matrix_operation.hpp b/include/gal/opengl/glm/gtx/matrix_operation.hpp index 012ee1a050..460f16bad2 100644 --- a/include/gal/opengl/glm/gtx/matrix_operation.hpp +++ b/include/gal/opengl/glm/gtx/matrix_operation.hpp @@ -1,112 +1,112 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_matrix_operation -/// @file glm/gtx/matrix_operation.hpp -/// @date 2009-08-29 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_matrix_operation GLM_GTX_matrix_operation -/// @ingroup gtx -/// -/// @brief Build diagonal matrices from vectors. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_matrix_operation -#define GLM_GTX_matrix_operation GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_matrix_operation extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_matrix_operation - /// @{ - - //! Build a diagonal matrix. - //! From GLM_GTX_matrix_operation extension. - template - detail::tmat2x2 diagonal2x2( - detail::tvec2 const & v); - - //! Build a diagonal matrix. - //! From GLM_GTX_matrix_operation extension. - template - detail::tmat2x3 diagonal2x3( - detail::tvec2 const & v); - - //! Build a diagonal matrix. - //! From GLM_GTX_matrix_operation extension. - template - detail::tmat2x4 diagonal2x4( - detail::tvec2 const & v); - - //! Build a diagonal matrix. - //! From GLM_GTX_matrix_operation extension. - template - detail::tmat3x2 diagonal3x2( - detail::tvec2 const & v); - - //! Build a diagonal matrix. - //! From GLM_GTX_matrix_operation extension. - template - detail::tmat3x3 diagonal3x3( - detail::tvec3 const & v); - - //! Build a diagonal matrix. - //! From GLM_GTX_matrix_operation extension. - template - detail::tmat3x4 diagonal3x4( - detail::tvec3 const & v); - - //! Build a diagonal matrix. - //! From GLM_GTX_matrix_operation extension. - template - detail::tmat4x2 diagonal4x2( - detail::tvec2 const & v); - - //! Build a diagonal matrix. - //! From GLM_GTX_matrix_operation extension. - template - detail::tmat4x3 diagonal4x3( - detail::tvec3 const & v); - - //! Build a diagonal matrix. - //! From GLM_GTX_matrix_operation extension. - template - detail::tmat4x4 diagonal4x4( - detail::tvec4 const & v); - - /// @} -}//namespace glm - -#include "matrix_operation.inl" - -#endif//GLM_GTX_matrix_operation +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_matrix_operation +/// @file glm/gtx/matrix_operation.hpp +/// @date 2009-08-29 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_matrix_operation GLM_GTX_matrix_operation +/// @ingroup gtx +/// +/// @brief Build diagonal matrices from vectors. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_matrix_operation +#define GLM_GTX_matrix_operation GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_matrix_operation extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_matrix_operation + /// @{ + + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat2x2 diagonal2x2( + detail::tvec2 const & v); + + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat2x3 diagonal2x3( + detail::tvec2 const & v); + + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat2x4 diagonal2x4( + detail::tvec2 const & v); + + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat3x2 diagonal3x2( + detail::tvec2 const & v); + + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat3x3 diagonal3x3( + detail::tvec3 const & v); + + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat3x4 diagonal3x4( + detail::tvec3 const & v); + + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat4x2 diagonal4x2( + detail::tvec2 const & v); + + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat4x3 diagonal4x3( + detail::tvec3 const & v); + + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat4x4 diagonal4x4( + detail::tvec4 const & v); + + /// @} +}//namespace glm + +#include "matrix_operation.inl" + +#endif//GLM_GTX_matrix_operation diff --git a/include/gal/opengl/glm/gtx/matrix_operation.inl b/include/gal/opengl/glm/gtx/matrix_operation.inl index 2d5537af97..159b752575 100644 --- a/include/gal/opengl/glm/gtx/matrix_operation.inl +++ b/include/gal/opengl/glm/gtx/matrix_operation.inl @@ -1,124 +1,124 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2009-08-29 -// Updated : 2009-08-29 -// Licence : This source is under MIT License -// File : glm/gtx/matrix_operation.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER detail::tmat2x2 diagonal2x2 - ( - detail::tvec2 const & v - ) - { - detail::tmat2x2 Result(valType(1)); - Result[0][0] = v[0]; - Result[1][1] = v[1]; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat2x3 diagonal2x3 - ( - detail::tvec2 const & v - ) - { - detail::tmat2x3 Result(valType(1)); - Result[0][0] = v[0]; - Result[1][1] = v[1]; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat2x4 diagonal2x4 - ( - detail::tvec2 const & v - ) - { - detail::tmat2x4 Result(valType(1)); - Result[0][0] = v[0]; - Result[1][1] = v[1]; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x2 diagonal3x2 - ( - detail::tvec2 const & v - ) - { - detail::tmat3x2 Result(valType(1)); - Result[0][0] = v[0]; - Result[1][1] = v[1]; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x3 diagonal3x3 - ( - detail::tvec3 const & v - ) - { - detail::tmat3x3 Result(valType(1)); - Result[0][0] = v[0]; - Result[1][1] = v[1]; - Result[2][2] = v[2]; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x4 diagonal3x4 - ( - detail::tvec3 const & v - ) - { - detail::tmat3x4 Result(valType(1)); - Result[0][0] = v[0]; - Result[1][1] = v[1]; - Result[2][2] = v[2]; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 diagonal4x4 - ( - detail::tvec4 const & v - ) - { - detail::tmat4x4 Result(valType(1)); - Result[0][0] = v[0]; - Result[1][1] = v[1]; - Result[2][2] = v[2]; - Result[3][3] = v[3]; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x3 diagonal4x3 - ( - detail::tvec3 const & v - ) - { - detail::tmat4x3 Result(valType(1)); - Result[0][0] = v[0]; - Result[1][1] = v[1]; - Result[2][2] = v[2]; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x2 diagonal4x2 - ( - detail::tvec2 const & v - ) - { - detail::tmat4x2 Result(valType(1)); - Result[0][0] = v[0]; - Result[1][1] = v[1]; - return Result; - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2009-08-29 +// Updated : 2009-08-29 +// Licence : This source is under MIT License +// File : glm/gtx/matrix_operation.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tmat2x2 diagonal2x2 + ( + detail::tvec2 const & v + ) + { + detail::tmat2x2 Result(valType(1)); + Result[0][0] = v[0]; + Result[1][1] = v[1]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x3 diagonal2x3 + ( + detail::tvec2 const & v + ) + { + detail::tmat2x3 Result(valType(1)); + Result[0][0] = v[0]; + Result[1][1] = v[1]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x4 diagonal2x4 + ( + detail::tvec2 const & v + ) + { + detail::tmat2x4 Result(valType(1)); + Result[0][0] = v[0]; + Result[1][1] = v[1]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x2 diagonal3x2 + ( + detail::tvec2 const & v + ) + { + detail::tmat3x2 Result(valType(1)); + Result[0][0] = v[0]; + Result[1][1] = v[1]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 diagonal3x3 + ( + detail::tvec3 const & v + ) + { + detail::tmat3x3 Result(valType(1)); + Result[0][0] = v[0]; + Result[1][1] = v[1]; + Result[2][2] = v[2]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x4 diagonal3x4 + ( + detail::tvec3 const & v + ) + { + detail::tmat3x4 Result(valType(1)); + Result[0][0] = v[0]; + Result[1][1] = v[1]; + Result[2][2] = v[2]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 diagonal4x4 + ( + detail::tvec4 const & v + ) + { + detail::tmat4x4 Result(valType(1)); + Result[0][0] = v[0]; + Result[1][1] = v[1]; + Result[2][2] = v[2]; + Result[3][3] = v[3]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x3 diagonal4x3 + ( + detail::tvec3 const & v + ) + { + detail::tmat4x3 Result(valType(1)); + Result[0][0] = v[0]; + Result[1][1] = v[1]; + Result[2][2] = v[2]; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x2 diagonal4x2 + ( + detail::tvec2 const & v + ) + { + detail::tmat4x2 Result(valType(1)); + Result[0][0] = v[0]; + Result[1][1] = v[1]; + return Result; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/matrix_query.hpp b/include/gal/opengl/glm/gtx/matrix_query.hpp index b02a06d659..16ec496052 100644 --- a/include/gal/opengl/glm/gtx/matrix_query.hpp +++ b/include/gal/opengl/glm/gtx/matrix_query.hpp @@ -1,117 +1,117 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_matrix_query -/// @file glm/gtx/matrix_query.hpp -/// @date 2007-03-05 / 2011-08-28 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_vector_query (dependence) -/// -/// @defgroup gtx_matrix_query GLM_GTX_matrix_query -/// @ingroup gtx -/// -/// @brief Query to evaluate matrix properties -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_matrix_query -#define GLM_GTX_matrix_query GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtx/vector_query.hpp" -#include - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_matrix_query extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_matrix_query - /// @{ - - /// Return whether a matrix a null matrix. - /// From GLM_GTX_matrix_query extension. - template - bool isNull( - detail::tmat2x2 const & m, - T const & epsilon/* = std::numeric_limits::epsilon()*/); - - /// Return whether a matrix a null matrix. - /// From GLM_GTX_matrix_query extension. - template - bool isNull( - detail::tmat3x3 const & m, - T const & epsilon/* = std::numeric_limits::epsilon()*/); - - /// Return whether a matrix is a null matrix. - /// From GLM_GTX_matrix_query extension. - template - bool isNull( - detail::tmat4x4 const & m, - T const & epsilon/* = std::numeric_limits::epsilon()*/); - - /// Return whether a matrix is an identity matrix. - /// From GLM_GTX_matrix_query extension. - template - bool isIdentity( - genType const & m, - typename genType::value_type const & epsilon/* = std::numeric_limits::epsilon()*/); - - /// Return whether a matrix is a normalized matrix. - /// From GLM_GTX_matrix_query extension. - template - bool isNormalized( - detail::tmat2x2 const & m, - valType const & epsilon/* = std::numeric_limits::epsilon()*/); - - /// Return whether a matrix is a normalized matrix. - /// From GLM_GTX_matrix_query extension. - template - bool isNormalized( - detail::tmat3x3 const & m, - valType const & epsilon/* = std::numeric_limits::epsilon()*/); - - /// Return whether a matrix is a normalized matrix. - /// From GLM_GTX_matrix_query extension. - template - bool isNormalized( - detail::tmat4x4 const & m, - valType const & epsilon/* = std::numeric_limits::epsilon()*/); - - /// Return whether a matrix is an orthonormalized matrix. - /// From GLM_GTX_matrix_query extension. - template class matType> - bool isOrthogonal( - matType const & m, - valType const & epsilon/* = std::numeric_limits::epsilon()*/); - - /// @} -}//namespace glm - -#include "matrix_query.inl" - -#endif//GLM_GTX_matrix_query +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_matrix_query +/// @file glm/gtx/matrix_query.hpp +/// @date 2007-03-05 / 2011-08-28 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_vector_query (dependence) +/// +/// @defgroup gtx_matrix_query GLM_GTX_matrix_query +/// @ingroup gtx +/// +/// @brief Query to evaluate matrix properties +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_matrix_query +#define GLM_GTX_matrix_query GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtx/vector_query.hpp" +#include + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_matrix_query extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_matrix_query + /// @{ + + /// Return whether a matrix a null matrix. + /// From GLM_GTX_matrix_query extension. + template + bool isNull( + detail::tmat2x2 const & m, + T const & epsilon/* = std::numeric_limits::epsilon()*/); + + /// Return whether a matrix a null matrix. + /// From GLM_GTX_matrix_query extension. + template + bool isNull( + detail::tmat3x3 const & m, + T const & epsilon/* = std::numeric_limits::epsilon()*/); + + /// Return whether a matrix is a null matrix. + /// From GLM_GTX_matrix_query extension. + template + bool isNull( + detail::tmat4x4 const & m, + T const & epsilon/* = std::numeric_limits::epsilon()*/); + + /// Return whether a matrix is an identity matrix. + /// From GLM_GTX_matrix_query extension. + template + bool isIdentity( + genType const & m, + typename genType::value_type const & epsilon/* = std::numeric_limits::epsilon()*/); + + /// Return whether a matrix is a normalized matrix. + /// From GLM_GTX_matrix_query extension. + template + bool isNormalized( + detail::tmat2x2 const & m, + valType const & epsilon/* = std::numeric_limits::epsilon()*/); + + /// Return whether a matrix is a normalized matrix. + /// From GLM_GTX_matrix_query extension. + template + bool isNormalized( + detail::tmat3x3 const & m, + valType const & epsilon/* = std::numeric_limits::epsilon()*/); + + /// Return whether a matrix is a normalized matrix. + /// From GLM_GTX_matrix_query extension. + template + bool isNormalized( + detail::tmat4x4 const & m, + valType const & epsilon/* = std::numeric_limits::epsilon()*/); + + /// Return whether a matrix is an orthonormalized matrix. + /// From GLM_GTX_matrix_query extension. + template class matType> + bool isOrthogonal( + matType const & m, + valType const & epsilon/* = std::numeric_limits::epsilon()*/); + + /// @} +}//namespace glm + +#include "matrix_query.inl" + +#endif//GLM_GTX_matrix_query diff --git a/include/gal/opengl/glm/gtx/matrix_query.inl b/include/gal/opengl/glm/gtx/matrix_query.inl index 27618b2763..52eabe98a6 100644 --- a/include/gal/opengl/glm/gtx/matrix_query.inl +++ b/include/gal/opengl/glm/gtx/matrix_query.inl @@ -1,154 +1,154 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2007-03-05 -// Updated : 2007-03-05 -// Licence : This source is under MIT License -// File : glm/gtx/matrix_query.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Dependency: -// - GLM core -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER bool isNull - ( - detail::tmat2x2 const & m, - T const & epsilon) - { - bool result = true; - for(int i = 0; result && i < 2 ; ++i) - result = isNull(m[i], epsilon); - return result; - } - - template - GLM_FUNC_QUALIFIER bool isNull - ( - detail::tmat3x3 const & m, - T const & epsilon - ) - { - bool result = true; - for(int i = 0; result && i < 3 ; ++i) - result = isNull(m[i], epsilon); - return result; - } - - template - GLM_FUNC_QUALIFIER bool isNull - ( - detail::tmat4x4 const & m, - T const & epsilon - ) - { - bool result = true; - for(int i = 0; result && i < 4 ; ++i) - result = isNull(m[i], epsilon); - return result; - } - - template - GLM_FUNC_QUALIFIER bool isIdentity - ( - genType const & m, - typename genType::value_type const & epsilon - ) - { - bool result = true; - for(typename genType::size_type i = typename genType::size_type(0); result && i < genType::col_size(); ++i) - { - for(typename genType::size_type j = typename genType::size_type(0); result && j < i ; ++j) - result = abs(m[i][j]) <= epsilon; - if(result) - result = abs(m[i][i] - typename genType::value_type(1)) <= epsilon; - for(typename genType::size_type j = i + typename genType::size_type(1); result && j < genType::row_size(); ++j) - result = abs(m[i][j]) <= epsilon; - } - return result; - } - - template - GLM_FUNC_QUALIFIER bool isNormalized - ( - detail::tmat2x2 const & m, - genType const & epsilon - ) - { - bool result(true); - for(typename detail::tmat2x2::size_type i(0); result && i < m.length(); ++i) - result = isNormalized(m[i], epsilon); - for(typename detail::tmat2x2::size_type i(0); result && i < m.length(); ++i) - { - typename detail::tmat2x2::col_type v; - for(typename detail::tmat2x2::size_type j(0); j < m.length(); ++j) - v[j] = m[j][i]; - result = isNormalized(v, epsilon); - } - return result; - } - - template - GLM_FUNC_QUALIFIER bool isNormalized - ( - detail::tmat3x3 const & m, - genType const & epsilon - ) - { - bool result(true); - for(typename detail::tmat3x3::size_type i(0); result && i < m.length(); ++i) - result = isNormalized(m[i], epsilon); - for(typename detail::tmat3x3::size_type i(0); result && i < m.length(); ++i) - { - typename detail::tmat3x3::col_type v; - for(typename detail::tmat3x3::size_type j(0); j < m.length(); ++j) - v[j] = m[j][i]; - result = isNormalized(v, epsilon); - } - return result; - } - - template - GLM_FUNC_QUALIFIER bool isNormalized - ( - detail::tmat4x4 const & m, - genType const & epsilon - ) - { - bool result(true); - for(typename detail::tmat4x4::size_type i(0); result && i < m.length(); ++i) - result = isNormalized(m[i], epsilon); - for(typename detail::tmat4x4::size_type i(0); result && i < m.length(); ++i) - { - typename detail::tmat4x4::col_type v; - for(typename detail::tmat4x4::size_type j(0); j < m.length(); ++j) - v[j] = m[j][i]; - result = isNormalized(v, epsilon); - } - return result; - } - - template class matType> - GLM_FUNC_QUALIFIER bool isOrthogonal - ( - matType const & m, - genType const & epsilon - ) - { - bool result(true); - for(typename matType::size_type i(0); result && i < m.length() - 1; ++i) - for(typename matType::size_type j(i + 1); result && j < m.length(); ++j) - result = areOrthogonal(m[i], m[j], epsilon); - - if(result) - { - matType tmp = transpose(m); - for(typename matType::size_type i(0); result && i < m.length() - 1 ; ++i) - for(typename matType::size_type j(i + 1); result && j < m.length(); ++j) - result = areOrthogonal(tmp[i], tmp[j], epsilon); - } - return result; - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-03-05 +// Updated : 2007-03-05 +// Licence : This source is under MIT License +// File : glm/gtx/matrix_query.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Dependency: +// - GLM core +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER bool isNull + ( + detail::tmat2x2 const & m, + T const & epsilon) + { + bool result = true; + for(int i = 0; result && i < 2 ; ++i) + result = isNull(m[i], epsilon); + return result; + } + + template + GLM_FUNC_QUALIFIER bool isNull + ( + detail::tmat3x3 const & m, + T const & epsilon + ) + { + bool result = true; + for(int i = 0; result && i < 3 ; ++i) + result = isNull(m[i], epsilon); + return result; + } + + template + GLM_FUNC_QUALIFIER bool isNull + ( + detail::tmat4x4 const & m, + T const & epsilon + ) + { + bool result = true; + for(int i = 0; result && i < 4 ; ++i) + result = isNull(m[i], epsilon); + return result; + } + + template + GLM_FUNC_QUALIFIER bool isIdentity + ( + genType const & m, + typename genType::value_type const & epsilon + ) + { + bool result = true; + for(typename genType::size_type i = typename genType::size_type(0); result && i < genType::col_size(); ++i) + { + for(typename genType::size_type j = typename genType::size_type(0); result && j < i ; ++j) + result = abs(m[i][j]) <= epsilon; + if(result) + result = abs(m[i][i] - typename genType::value_type(1)) <= epsilon; + for(typename genType::size_type j = i + typename genType::size_type(1); result && j < genType::row_size(); ++j) + result = abs(m[i][j]) <= epsilon; + } + return result; + } + + template + GLM_FUNC_QUALIFIER bool isNormalized + ( + detail::tmat2x2 const & m, + genType const & epsilon + ) + { + bool result(true); + for(typename detail::tmat2x2::size_type i(0); result && i < m.length(); ++i) + result = isNormalized(m[i], epsilon); + for(typename detail::tmat2x2::size_type i(0); result && i < m.length(); ++i) + { + typename detail::tmat2x2::col_type v; + for(typename detail::tmat2x2::size_type j(0); j < m.length(); ++j) + v[j] = m[j][i]; + result = isNormalized(v, epsilon); + } + return result; + } + + template + GLM_FUNC_QUALIFIER bool isNormalized + ( + detail::tmat3x3 const & m, + genType const & epsilon + ) + { + bool result(true); + for(typename detail::tmat3x3::size_type i(0); result && i < m.length(); ++i) + result = isNormalized(m[i], epsilon); + for(typename detail::tmat3x3::size_type i(0); result && i < m.length(); ++i) + { + typename detail::tmat3x3::col_type v; + for(typename detail::tmat3x3::size_type j(0); j < m.length(); ++j) + v[j] = m[j][i]; + result = isNormalized(v, epsilon); + } + return result; + } + + template + GLM_FUNC_QUALIFIER bool isNormalized + ( + detail::tmat4x4 const & m, + genType const & epsilon + ) + { + bool result(true); + for(typename detail::tmat4x4::size_type i(0); result && i < m.length(); ++i) + result = isNormalized(m[i], epsilon); + for(typename detail::tmat4x4::size_type i(0); result && i < m.length(); ++i) + { + typename detail::tmat4x4::col_type v; + for(typename detail::tmat4x4::size_type j(0); j < m.length(); ++j) + v[j] = m[j][i]; + result = isNormalized(v, epsilon); + } + return result; + } + + template class matType> + GLM_FUNC_QUALIFIER bool isOrthogonal + ( + matType const & m, + genType const & epsilon + ) + { + bool result(true); + for(typename matType::size_type i(0); result && i < m.length() - 1; ++i) + for(typename matType::size_type j(i + 1); result && j < m.length(); ++j) + result = areOrthogonal(m[i], m[j], epsilon); + + if(result) + { + matType tmp = transpose(m); + for(typename matType::size_type i(0); result && i < m.length() - 1 ; ++i) + for(typename matType::size_type j(i + 1); result && j < m.length(); ++j) + result = areOrthogonal(tmp[i], tmp[j], epsilon); + } + return result; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/mixed_product.hpp b/include/gal/opengl/glm/gtx/mixed_product.hpp index 9752a05db1..f11ca1a6ef 100644 --- a/include/gal/opengl/glm/gtx/mixed_product.hpp +++ b/include/gal/opengl/glm/gtx/mixed_product.hpp @@ -1,65 +1,65 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_mixed_product -/// @file glm/gtx/mixed_product.hpp -/// @date 2007-04-03 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_mixed_product GLM_GTX_mixed_producte -/// @ingroup gtx -/// -/// @brief Mixed product of 3 vectors. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_mixed_product -#define GLM_GTX_mixed_product GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_mixed_product extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_mixed_product - /// @{ - - /// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension) - template - valType mixedProduct( - detail::tvec3 const & v1, - detail::tvec3 const & v2, - detail::tvec3 const & v3); - - /// @} -}// namespace glm - -#include "mixed_product.inl" - -#endif//GLM_GTX_mixed_product +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_mixed_product +/// @file glm/gtx/mixed_product.hpp +/// @date 2007-04-03 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_mixed_product GLM_GTX_mixed_producte +/// @ingroup gtx +/// +/// @brief Mixed product of 3 vectors. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_mixed_product +#define GLM_GTX_mixed_product GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_mixed_product extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_mixed_product + /// @{ + + /// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension) + template + valType mixedProduct( + detail::tvec3 const & v1, + detail::tvec3 const & v2, + detail::tvec3 const & v3); + + /// @} +}// namespace glm + +#include "mixed_product.inl" + +#endif//GLM_GTX_mixed_product diff --git a/include/gal/opengl/glm/gtx/mixed_product.inl b/include/gal/opengl/glm/gtx/mixed_product.inl index b34e0dcd42..c07895de90 100644 --- a/include/gal/opengl/glm/gtx/mixed_product.inl +++ b/include/gal/opengl/glm/gtx/mixed_product.inl @@ -1,22 +1,22 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2007-04-03 -// Updated : 2008-09-17 -// Licence : This source is under MIT License -// File : glm/gtx/mixed_product.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER valType mixedProduct - ( - detail::tvec3 const & v1, - detail::tvec3 const & v2, - detail::tvec3 const & v3 - ) - { - return dot(cross(v1, v2), v3); - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-04-03 +// Updated : 2008-09-17 +// Licence : This source is under MIT License +// File : glm/gtx/mixed_product.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER valType mixedProduct + ( + detail::tvec3 const & v1, + detail::tvec3 const & v2, + detail::tvec3 const & v3 + ) + { + return dot(cross(v1, v2), v3); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/multiple.hpp b/include/gal/opengl/glm/gtx/multiple.hpp index 3f9b8e392d..e40d5aaf35 100644 --- a/include/gal/opengl/glm/gtx/multiple.hpp +++ b/include/gal/opengl/glm/gtx/multiple.hpp @@ -1,73 +1,73 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_multiple -/// @file glm/gtx/multiple.hpp -/// @date 2009-10-26 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_extented_min_max (dependence) -/// -/// @defgroup gtx_multiple GLM_GTX_multiple -/// @ingroup gtx -/// -/// @brief Find the closest number of a number multiple of other number. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_multiple -#define GLM_GTX_multiple GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_multiple extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_multiple - /// @{ - - //! Higher Multiple number of Source. - //! From GLM_GTX_multiple extension. - template - genType higherMultiple( - genType const & Source, - genType const & Multiple); - - //! Lower Multiple number of Source. - //! From GLM_GTX_multiple extension. - template - genType lowerMultiple( - genType const & Source, - genType const & Multiple); - - /// @} -}//namespace glm - -#include "multiple.inl" - -#endif//GLM_GTX_multiple +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_multiple +/// @file glm/gtx/multiple.hpp +/// @date 2009-10-26 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_extented_min_max (dependence) +/// +/// @defgroup gtx_multiple GLM_GTX_multiple +/// @ingroup gtx +/// +/// @brief Find the closest number of a number multiple of other number. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_multiple +#define GLM_GTX_multiple GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_multiple extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_multiple + /// @{ + + //! Higher Multiple number of Source. + //! From GLM_GTX_multiple extension. + template + genType higherMultiple( + genType const & Source, + genType const & Multiple); + + //! Lower Multiple number of Source. + //! From GLM_GTX_multiple extension. + template + genType lowerMultiple( + genType const & Source, + genType const & Multiple); + + /// @} +}//namespace glm + +#include "multiple.inl" + +#endif//GLM_GTX_multiple diff --git a/include/gal/opengl/glm/gtx/multiple.inl b/include/gal/opengl/glm/gtx/multiple.inl index d344c68721..edb6620a36 100644 --- a/include/gal/opengl/glm/gtx/multiple.inl +++ b/include/gal/opengl/glm/gtx/multiple.inl @@ -1,118 +1,118 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2009-10-26 -// Updated : 2011-06-07 -// Licence : This source is under MIT License -// File : glm/gtx/multiple.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Dependency: -// - GLM core -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - ////////////////////// - // higherMultiple - - template - GLM_FUNC_QUALIFIER genType higherMultiple - ( - genType const & Source, - genType const & Multiple - ) - { - genType Tmp = Source % Multiple; - return Tmp ? Source + Multiple - Tmp : Source; - } - - template <> - GLM_FUNC_QUALIFIER detail::half higherMultiple - ( - detail::half const & SourceH, - detail::half const & MultipleH - ) - { - float Source = SourceH.toFloat(); - float Multiple = MultipleH.toFloat(); - - int Tmp = int(float(Source)) % int(Multiple); - return detail::half(Tmp ? Source + Multiple - float(Tmp) : Source); - } - - template <> - GLM_FUNC_QUALIFIER float higherMultiple - ( - float const & Source, - float const & Multiple - ) - { - int Tmp = int(Source) % int(Multiple); - return Tmp ? Source + Multiple - float(Tmp) : Source; - } - - template <> - GLM_FUNC_QUALIFIER double higherMultiple - ( - double const & Source, - double const & Multiple - ) - { - long Tmp = long(Source) % long(Multiple); - return Tmp ? Source + Multiple - double(Tmp) : Source; - } - - VECTORIZE_VEC_VEC(higherMultiple) - - ////////////////////// - // lowerMultiple - - template - GLM_FUNC_QUALIFIER genType lowerMultiple - ( - genType const & Source, - genType const & Multiple - ) - { - genType Tmp = Source % Multiple; - return Tmp ? Source - Tmp : Source; - } - - template <> - GLM_FUNC_QUALIFIER detail::half lowerMultiple - ( - detail::half const & SourceH, - detail::half const & MultipleH - ) - { - float Source = SourceH.toFloat(); - float Multiple = MultipleH.toFloat(); - - int Tmp = int(float(Source)) % int(float(Multiple)); - return detail::half(Tmp ? Source - float(Tmp) : Source); - } - - template <> - GLM_FUNC_QUALIFIER float lowerMultiple - ( - float const & Source, - float const & Multiple - ) - { - int Tmp = int(Source) % int(Multiple); - return Tmp ? Source - float(Tmp) : Source; - } - - template <> - GLM_FUNC_QUALIFIER double lowerMultiple - ( - double const & Source, - double const & Multiple - ) - { - long Tmp = long(Source) % long(Multiple); - return Tmp ? Source - double(Tmp) : Source; - } - - VECTORIZE_VEC_VEC(lowerMultiple) -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2009-10-26 +// Updated : 2011-06-07 +// Licence : This source is under MIT License +// File : glm/gtx/multiple.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Dependency: +// - GLM core +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + ////////////////////// + // higherMultiple + + template + GLM_FUNC_QUALIFIER genType higherMultiple + ( + genType const & Source, + genType const & Multiple + ) + { + genType Tmp = Source % Multiple; + return Tmp ? Source + Multiple - Tmp : Source; + } + + template <> + GLM_FUNC_QUALIFIER detail::half higherMultiple + ( + detail::half const & SourceH, + detail::half const & MultipleH + ) + { + float Source = SourceH.toFloat(); + float Multiple = MultipleH.toFloat(); + + int Tmp = int(float(Source)) % int(Multiple); + return detail::half(Tmp ? Source + Multiple - float(Tmp) : Source); + } + + template <> + GLM_FUNC_QUALIFIER float higherMultiple + ( + float const & Source, + float const & Multiple + ) + { + int Tmp = int(Source) % int(Multiple); + return Tmp ? Source + Multiple - float(Tmp) : Source; + } + + template <> + GLM_FUNC_QUALIFIER double higherMultiple + ( + double const & Source, + double const & Multiple + ) + { + long Tmp = long(Source) % long(Multiple); + return Tmp ? Source + Multiple - double(Tmp) : Source; + } + + VECTORIZE_VEC_VEC(higherMultiple) + + ////////////////////// + // lowerMultiple + + template + GLM_FUNC_QUALIFIER genType lowerMultiple + ( + genType const & Source, + genType const & Multiple + ) + { + genType Tmp = Source % Multiple; + return Tmp ? Source - Tmp : Source; + } + + template <> + GLM_FUNC_QUALIFIER detail::half lowerMultiple + ( + detail::half const & SourceH, + detail::half const & MultipleH + ) + { + float Source = SourceH.toFloat(); + float Multiple = MultipleH.toFloat(); + + int Tmp = int(float(Source)) % int(float(Multiple)); + return detail::half(Tmp ? Source - float(Tmp) : Source); + } + + template <> + GLM_FUNC_QUALIFIER float lowerMultiple + ( + float const & Source, + float const & Multiple + ) + { + int Tmp = int(Source) % int(Multiple); + return Tmp ? Source - float(Tmp) : Source; + } + + template <> + GLM_FUNC_QUALIFIER double lowerMultiple + ( + double const & Source, + double const & Multiple + ) + { + long Tmp = long(Source) % long(Multiple); + return Tmp ? Source - double(Tmp) : Source; + } + + VECTORIZE_VEC_VEC(lowerMultiple) +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/noise.hpp b/include/gal/opengl/glm/gtx/noise.hpp index 43dc33c147..f3d796cbf7 100644 --- a/include/gal/opengl/glm/gtx/noise.hpp +++ b/include/gal/opengl/glm/gtx/noise.hpp @@ -1,29 +1,29 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/////////////////////////////////////////////////////////////////////////////////// - -#if(defined(GLM_MESSAGES)) -# pragma message("GLM: GLM_GTX_random extension is deprecated, include GLM_GTC_random (glm/gtc/noise.hpp) instead") -#endif - -// Promoted: -#include "../gtc/noise.hpp" +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/////////////////////////////////////////////////////////////////////////////////// + +#if(defined(GLM_MESSAGES)) +# pragma message("GLM: GLM_GTX_random extension is deprecated, include GLM_GTC_random (glm/gtc/noise.hpp) instead") +#endif + +// Promoted: +#include "../gtc/noise.hpp" diff --git a/include/gal/opengl/glm/gtx/norm.hpp b/include/gal/opengl/glm/gtx/norm.hpp index b3906b62cb..311692c7ef 100644 --- a/include/gal/opengl/glm/gtx/norm.hpp +++ b/include/gal/opengl/glm/gtx/norm.hpp @@ -1,133 +1,133 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_norm -/// @file glm/gtx/norm.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_quaternion (dependence) -/// -/// @defgroup gtx_norm GLM_GTX_norm -/// @ingroup gtx -/// -/// @brief Various ways to compute vector norms. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_norm -#define GLM_GTX_norm GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtx/quaternion.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_norm extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_norm - /// @{ - - //! Returns the squared length of x. - //! From GLM_GTX_norm extension. - template - T length2( - T const & x); - - //! Returns the squared length of x. - //! From GLM_GTX_norm extension. - template - typename genType::value_type length2( - genType const & x); - - //! Returns the squared length of x. - //! From GLM_GTX_norm extension. - template - T length2( - detail::tquat const & q); - - //! Returns the squared distance between p0 and p1, i.e., length(p0 - p1). - //! From GLM_GTX_norm extension. - template - T distance2( - T const & p0, - T const & p1); - - //! Returns the squared distance between p0 and p1, i.e., length(p0 - p1). - //! From GLM_GTX_norm extension. - template - typename genType::value_type distance2( - genType const & p0, - genType const & p1); - - //! Returns the L1 norm between x and y. - //! From GLM_GTX_norm extension. - template - T l1Norm( - detail::tvec3 const & x, - detail::tvec3 const & y); - - //! Returns the L1 norm of v. - //! From GLM_GTX_norm extension. - template - T l1Norm( - detail::tvec3 const & v); - - //! Returns the L2 norm between x and y. - //! From GLM_GTX_norm extension. - template - T l2Norm( - detail::tvec3 const & x, - detail::tvec3 const & y); - - //! Returns the L2 norm of v. - //! From GLM_GTX_norm extension. - template - T l2Norm( - detail::tvec3 const & x); - - //! Returns the L norm between x and y. - //! From GLM_GTX_norm extension. - template - T lxNorm( - detail::tvec3 const & x, - detail::tvec3 const & y, - unsigned int Depth); - - //! Returns the L norm of v. - //! From GLM_GTX_norm extension. - template - T lxNorm( - detail::tvec3 const & x, - unsigned int Depth); - - /// @} -}//namespace glm - -#include "norm.inl" - -#endif//GLM_GTX_norm +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_norm +/// @file glm/gtx/norm.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_quaternion (dependence) +/// +/// @defgroup gtx_norm GLM_GTX_norm +/// @ingroup gtx +/// +/// @brief Various ways to compute vector norms. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_norm +#define GLM_GTX_norm GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtx/quaternion.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_norm extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_norm + /// @{ + + //! Returns the squared length of x. + //! From GLM_GTX_norm extension. + template + T length2( + T const & x); + + //! Returns the squared length of x. + //! From GLM_GTX_norm extension. + template + typename genType::value_type length2( + genType const & x); + + //! Returns the squared length of x. + //! From GLM_GTX_norm extension. + template + T length2( + detail::tquat const & q); + + //! Returns the squared distance between p0 and p1, i.e., length(p0 - p1). + //! From GLM_GTX_norm extension. + template + T distance2( + T const & p0, + T const & p1); + + //! Returns the squared distance between p0 and p1, i.e., length(p0 - p1). + //! From GLM_GTX_norm extension. + template + typename genType::value_type distance2( + genType const & p0, + genType const & p1); + + //! Returns the L1 norm between x and y. + //! From GLM_GTX_norm extension. + template + T l1Norm( + detail::tvec3 const & x, + detail::tvec3 const & y); + + //! Returns the L1 norm of v. + //! From GLM_GTX_norm extension. + template + T l1Norm( + detail::tvec3 const & v); + + //! Returns the L2 norm between x and y. + //! From GLM_GTX_norm extension. + template + T l2Norm( + detail::tvec3 const & x, + detail::tvec3 const & y); + + //! Returns the L2 norm of v. + //! From GLM_GTX_norm extension. + template + T l2Norm( + detail::tvec3 const & x); + + //! Returns the L norm between x and y. + //! From GLM_GTX_norm extension. + template + T lxNorm( + detail::tvec3 const & x, + detail::tvec3 const & y, + unsigned int Depth); + + //! Returns the L norm of v. + //! From GLM_GTX_norm extension. + template + T lxNorm( + detail::tvec3 const & x, + unsigned int Depth); + + /// @} +}//namespace glm + +#include "norm.inl" + +#endif//GLM_GTX_norm diff --git a/include/gal/opengl/glm/gtx/norm.inl b/include/gal/opengl/glm/gtx/norm.inl index 7dde0aeb40..a44201f8ce 100644 --- a/include/gal/opengl/glm/gtx/norm.inl +++ b/include/gal/opengl/glm/gtx/norm.inl @@ -1,156 +1,156 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2005-12-21 -// Updated : 2008-07-24 -// Licence : This source is under MIT License -// File : glm/gtx/norm.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER T length2 - ( - T const & x - ) - { - return x * x; - } - - template - GLM_FUNC_QUALIFIER T length2 - ( - detail::tvec2 const & x - ) - { - return dot(x, x); - } - - template - GLM_FUNC_QUALIFIER T length2 - ( - detail::tvec3 const & x - ) - { - return dot(x, x); - } - - template - GLM_FUNC_QUALIFIER T length2 - ( - detail::tvec4 const & x - ) - { - return dot(x, x); - } - - template - GLM_FUNC_QUALIFIER T length2 - ( - detail::tquat const & q - ) - { - return q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w; - } - - template - GLM_FUNC_QUALIFIER T distance2 - ( - T const & p0, - T const & p1 - ) - { - return length2(p1 - p0); - } - - template - GLM_FUNC_QUALIFIER T distance2 - ( - detail::tvec2 const & p0, - detail::tvec2 const & p1 - ) - { - return length2(p1 - p0); - } - - template - GLM_FUNC_QUALIFIER T distance2 - ( - detail::tvec3 const & p0, - detail::tvec3 const & p1 - ) - { - return length2(p1 - p0); - } - - template - GLM_FUNC_QUALIFIER T distance2 - ( - detail::tvec4 const & p0, - detail::tvec4 const & p1 - ) - { - return length2(p1 - p0); - } - - template - GLM_FUNC_QUALIFIER T l1Norm - ( - detail::tvec3 const & a, - detail::tvec3 const & b - ) - { - return abs(b.x - a.x) + abs(b.y - a.y) + abs(b.z - a.z); - } - - template - GLM_FUNC_QUALIFIER T l1Norm - ( - detail::tvec3 const & v - ) - { - return abs(v.x) + abs(v.y) + abs(v.z); - } - - template - GLM_FUNC_QUALIFIER T l2Norm - ( - detail::tvec3 const & a, - detail::tvec3 const & b - ) - { - return length(b - a); - } - - template - GLM_FUNC_QUALIFIER T l2Norm - ( - detail::tvec3 const & v - ) - { - return length(v); - } - - template - GLM_FUNC_QUALIFIER T lxNorm - ( - detail::tvec3 const & x, - detail::tvec3 const & y, - unsigned int Depth - ) - { - return pow(pow(y.x - x.x, T(Depth)) + pow(y.y - x.y, T(Depth)) + pow(y.z - x.z, T(Depth)), T(1) / T(Depth)); - } - - template - GLM_FUNC_QUALIFIER T lxNorm - ( - detail::tvec3 const & v, - unsigned int Depth - ) - { - return pow(pow(v.x, T(Depth)) + pow(v.y, T(Depth)) + pow(v.z, T(Depth)), T(1) / T(Depth)); - } - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2008-07-24 +// Licence : This source is under MIT License +// File : glm/gtx/norm.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER T length2 + ( + T const & x + ) + { + return x * x; + } + + template + GLM_FUNC_QUALIFIER T length2 + ( + detail::tvec2 const & x + ) + { + return dot(x, x); + } + + template + GLM_FUNC_QUALIFIER T length2 + ( + detail::tvec3 const & x + ) + { + return dot(x, x); + } + + template + GLM_FUNC_QUALIFIER T length2 + ( + detail::tvec4 const & x + ) + { + return dot(x, x); + } + + template + GLM_FUNC_QUALIFIER T length2 + ( + detail::tquat const & q + ) + { + return q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w; + } + + template + GLM_FUNC_QUALIFIER T distance2 + ( + T const & p0, + T const & p1 + ) + { + return length2(p1 - p0); + } + + template + GLM_FUNC_QUALIFIER T distance2 + ( + detail::tvec2 const & p0, + detail::tvec2 const & p1 + ) + { + return length2(p1 - p0); + } + + template + GLM_FUNC_QUALIFIER T distance2 + ( + detail::tvec3 const & p0, + detail::tvec3 const & p1 + ) + { + return length2(p1 - p0); + } + + template + GLM_FUNC_QUALIFIER T distance2 + ( + detail::tvec4 const & p0, + detail::tvec4 const & p1 + ) + { + return length2(p1 - p0); + } + + template + GLM_FUNC_QUALIFIER T l1Norm + ( + detail::tvec3 const & a, + detail::tvec3 const & b + ) + { + return abs(b.x - a.x) + abs(b.y - a.y) + abs(b.z - a.z); + } + + template + GLM_FUNC_QUALIFIER T l1Norm + ( + detail::tvec3 const & v + ) + { + return abs(v.x) + abs(v.y) + abs(v.z); + } + + template + GLM_FUNC_QUALIFIER T l2Norm + ( + detail::tvec3 const & a, + detail::tvec3 const & b + ) + { + return length(b - a); + } + + template + GLM_FUNC_QUALIFIER T l2Norm + ( + detail::tvec3 const & v + ) + { + return length(v); + } + + template + GLM_FUNC_QUALIFIER T lxNorm + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + unsigned int Depth + ) + { + return pow(pow(y.x - x.x, T(Depth)) + pow(y.y - x.y, T(Depth)) + pow(y.z - x.z, T(Depth)), T(1) / T(Depth)); + } + + template + GLM_FUNC_QUALIFIER T lxNorm + ( + detail::tvec3 const & v, + unsigned int Depth + ) + { + return pow(pow(v.x, T(Depth)) + pow(v.y, T(Depth)) + pow(v.z, T(Depth)), T(1) / T(Depth)); + } + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/normal.hpp b/include/gal/opengl/glm/gtx/normal.hpp index 92c129cc34..47a160418d 100644 --- a/include/gal/opengl/glm/gtx/normal.hpp +++ b/include/gal/opengl/glm/gtx/normal.hpp @@ -1,67 +1,67 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_normal -/// @file glm/gtx/normal.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_extented_min_max (dependence) -/// -/// @defgroup gtx_normal GLM_GTX_normal -/// @ingroup gtx -/// -/// @brief Compute the normal of a triangle. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_normal -#define GLM_GTX_normal GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_normal extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_normal - /// @{ - - //! Computes triangle normal from triangle points. - //! From GLM_GTX_normal extension. - template - detail::tvec3 triangleNormal( - detail::tvec3 const & p1, - detail::tvec3 const & p2, - detail::tvec3 const & p3); - - /// @} -}//namespace glm - -#include "normal.inl" - -#endif//GLM_GTX_normal +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_normal +/// @file glm/gtx/normal.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_extented_min_max (dependence) +/// +/// @defgroup gtx_normal GLM_GTX_normal +/// @ingroup gtx +/// +/// @brief Compute the normal of a triangle. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_normal +#define GLM_GTX_normal GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_normal extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_normal + /// @{ + + //! Computes triangle normal from triangle points. + //! From GLM_GTX_normal extension. + template + detail::tvec3 triangleNormal( + detail::tvec3 const & p1, + detail::tvec3 const & p2, + detail::tvec3 const & p3); + + /// @} +}//namespace glm + +#include "normal.inl" + +#endif//GLM_GTX_normal diff --git a/include/gal/opengl/glm/gtx/normal.inl b/include/gal/opengl/glm/gtx/normal.inl index c17e8180ed..ee8f8167f7 100644 --- a/include/gal/opengl/glm/gtx/normal.inl +++ b/include/gal/opengl/glm/gtx/normal.inl @@ -1,22 +1,22 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2005-12-21 -// Updated : 2011-06-07 -// Licence : This source is under MIT License -// File : glm/gtx/normal.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER detail::tvec3 triangleNormal - ( - detail::tvec3 const & p1, - detail::tvec3 const & p2, - detail::tvec3 const & p3 - ) - { - return normalize(cross(p1 - p2, p1 - p3)); - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2011-06-07 +// Licence : This source is under MIT License +// File : glm/gtx/normal.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tvec3 triangleNormal + ( + detail::tvec3 const & p1, + detail::tvec3 const & p2, + detail::tvec3 const & p3 + ) + { + return normalize(cross(p1 - p2, p1 - p3)); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/normalize_dot.hpp b/include/gal/opengl/glm/gtx/normalize_dot.hpp index 7dae359fb6..398f70c79f 100644 --- a/include/gal/opengl/glm/gtx/normalize_dot.hpp +++ b/include/gal/opengl/glm/gtx/normalize_dot.hpp @@ -1,76 +1,76 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_normalize_dot -/// @file glm/gtx/normalize_dot.hpp -/// @date 2007-09-28 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_fast_square_root (dependence) -/// -/// @defgroup gtx_normalize_dot GLM_GTX_normalize_dot -/// @ingroup gtx -/// -/// @brief Dot product of vectors that need to be normalize with a single square root. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_normalize_dot -#define GLM_GTX_normalize_dot GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtx/fast_square_root.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_normalize_dot extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_normalize_dot - /// @{ - - //! Normalize parameters and returns the dot product of x and y. - //! It's faster that dot(normalize(x), normalize(y)). - //! From GLM_GTX_normalize_dot extension. - template - typename genType::value_type normalizeDot( - genType const & x, - genType const & y); - - //! Normalize parameters and returns the dot product of x and y. - //! Faster that dot(fastNormalize(x), fastNormalize(y)). - //! From GLM_GTX_normalize_dot extension. - template - typename genType::value_type fastNormalizeDot( - genType const & x, - genType const & y); - - /// @} -}//namespace glm - -#include "normalize_dot.inl" - -#endif//GLM_GTX_normalize_dot +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_normalize_dot +/// @file glm/gtx/normalize_dot.hpp +/// @date 2007-09-28 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_fast_square_root (dependence) +/// +/// @defgroup gtx_normalize_dot GLM_GTX_normalize_dot +/// @ingroup gtx +/// +/// @brief Dot product of vectors that need to be normalize with a single square root. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_normalize_dot +#define GLM_GTX_normalize_dot GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtx/fast_square_root.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_normalize_dot extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_normalize_dot + /// @{ + + //! Normalize parameters and returns the dot product of x and y. + //! It's faster that dot(normalize(x), normalize(y)). + //! From GLM_GTX_normalize_dot extension. + template + typename genType::value_type normalizeDot( + genType const & x, + genType const & y); + + //! Normalize parameters and returns the dot product of x and y. + //! Faster that dot(fastNormalize(x), fastNormalize(y)). + //! From GLM_GTX_normalize_dot extension. + template + typename genType::value_type fastNormalizeDot( + genType const & x, + genType const & y); + + /// @} +}//namespace glm + +#include "normalize_dot.inl" + +#endif//GLM_GTX_normalize_dot diff --git a/include/gal/opengl/glm/gtx/normalize_dot.inl b/include/gal/opengl/glm/gtx/normalize_dot.inl index 4d379e8055..a492d4bcc2 100644 --- a/include/gal/opengl/glm/gtx/normalize_dot.inl +++ b/include/gal/opengl/glm/gtx/normalize_dot.inl @@ -1,115 +1,115 @@ -////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -////////////////////////////////////////////////////////////////////////////////// -// Created : 2007-09-28 -// Updated : 2008-10-07 -// Licence : This source is under MIT License -// File : glm/gtx/normalize_dot.inl -////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER genType normalizeDot - ( - genType const & x, - genType const & y - ) - { - return - glm::dot(x, y) * - glm::inversesqrt(glm::dot(x, x) * - glm::dot(y, y)); - } - - template - GLM_FUNC_QUALIFIER valType normalizeDot - ( - detail::tvec2 const & x, - detail::tvec2 const & y - ) - { - return - glm::dot(x, y) * - glm::inversesqrt(glm::dot(x, x) * - glm::dot(y, y)); - } - - template - GLM_FUNC_QUALIFIER valType normalizeDot - ( - detail::tvec3 const & x, - detail::tvec3 const & y - ) - { - return - glm::dot(x, y) * - glm::inversesqrt(glm::dot(x, x) * - glm::dot(y, y)); - } - - template - GLM_FUNC_QUALIFIER valType normalizeDot - ( - detail::tvec4 const & x, - detail::tvec4 const & y - ) - { - return - glm::dot(x, y) * - glm::inversesqrt(glm::dot(x, x) * - glm::dot(y, y)); - } - - template - GLM_FUNC_QUALIFIER genType fastNormalizeDot - ( - genType const & x, - genType const & y - ) - { - return - glm::dot(x, y) * - fastInverseSqrt(glm::dot(x, x) * - glm::dot(y, y)); - } - - template - GLM_FUNC_QUALIFIER valType fastNormalizeDot - ( - detail::tvec2 const & x, - detail::tvec2 const & y - ) - { - return - glm::dot(x, y) * - fastInverseSqrt(glm::dot(x, x) * - glm::dot(y, y)); - } - - template - GLM_FUNC_QUALIFIER valType fastNormalizeDot - ( - detail::tvec3 const & x, - detail::tvec3 const & y - ) - { - return - glm::dot(x, y) * - fastInverseSqrt(glm::dot(x, x) * - glm::dot(y, y)); - } - - template - GLM_FUNC_QUALIFIER valType fastNormalizeDot - ( - detail::tvec4 const & x, - detail::tvec4 const & y - ) - { - return - glm::dot(x, y) * - fastInverseSqrt(glm::dot(x, x) * - glm::dot(y, y)); - } -}//namespace glm +////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-09-28 +// Updated : 2008-10-07 +// Licence : This source is under MIT License +// File : glm/gtx/normalize_dot.inl +////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER genType normalizeDot + ( + genType const & x, + genType const & y + ) + { + return + glm::dot(x, y) * + glm::inversesqrt(glm::dot(x, x) * + glm::dot(y, y)); + } + + template + GLM_FUNC_QUALIFIER valType normalizeDot + ( + detail::tvec2 const & x, + detail::tvec2 const & y + ) + { + return + glm::dot(x, y) * + glm::inversesqrt(glm::dot(x, x) * + glm::dot(y, y)); + } + + template + GLM_FUNC_QUALIFIER valType normalizeDot + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + return + glm::dot(x, y) * + glm::inversesqrt(glm::dot(x, x) * + glm::dot(y, y)); + } + + template + GLM_FUNC_QUALIFIER valType normalizeDot + ( + detail::tvec4 const & x, + detail::tvec4 const & y + ) + { + return + glm::dot(x, y) * + glm::inversesqrt(glm::dot(x, x) * + glm::dot(y, y)); + } + + template + GLM_FUNC_QUALIFIER genType fastNormalizeDot + ( + genType const & x, + genType const & y + ) + { + return + glm::dot(x, y) * + fastInverseSqrt(glm::dot(x, x) * + glm::dot(y, y)); + } + + template + GLM_FUNC_QUALIFIER valType fastNormalizeDot + ( + detail::tvec2 const & x, + detail::tvec2 const & y + ) + { + return + glm::dot(x, y) * + fastInverseSqrt(glm::dot(x, x) * + glm::dot(y, y)); + } + + template + GLM_FUNC_QUALIFIER valType fastNormalizeDot + ( + detail::tvec3 const & x, + detail::tvec3 const & y + ) + { + return + glm::dot(x, y) * + fastInverseSqrt(glm::dot(x, x) * + glm::dot(y, y)); + } + + template + GLM_FUNC_QUALIFIER valType fastNormalizeDot + ( + detail::tvec4 const & x, + detail::tvec4 const & y + ) + { + return + glm::dot(x, y) * + fastInverseSqrt(glm::dot(x, x) * + glm::dot(y, y)); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/number_precision.hpp b/include/gal/opengl/glm/gtx/number_precision.hpp index 06d0014f5b..cfd14f6d39 100644 --- a/include/gal/opengl/glm/gtx/number_precision.hpp +++ b/include/gal/opengl/glm/gtx/number_precision.hpp @@ -1,88 +1,88 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_number_precision -/// @file glm/gtx/number_precision.hpp -/// @date 2007-05-10 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtc_type_precision (dependence) -/// @see gtc_quaternion (dependence) -/// -/// @defgroup gtx_number_precision GLM_GTX_number_precision -/// @ingroup gtx -/// -/// @brief Defined size types. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_number_precision -#define GLM_GTX_number_precision GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtc/type_precision.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_number_precision extension included") -#endif - -namespace glm{ -namespace gtx -{ - ///////////////////////////// - // Unsigned int vector types - - /// @addtogroup gtx_number_precision - /// @{ - - typedef u8 u8vec1; //!< \brief 8bit unsigned integer scalar. (from GLM_GTX_number_precision extension) - typedef u16 u16vec1; //!< \brief 16bit unsigned integer scalar. (from GLM_GTX_number_precision extension) - typedef u32 u32vec1; //!< \brief 32bit unsigned integer scalar. (from GLM_GTX_number_precision extension) - typedef u64 u64vec1; //!< \brief 64bit unsigned integer scalar. (from GLM_GTX_number_precision extension) - - ////////////////////// - // Float vector types - - typedef f16 f16vec1; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_number_precision extension) - typedef f32 f32vec1; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension) - typedef f64 f64vec1; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension) - - ////////////////////// - // Float matrix types - - typedef f16 f16mat1; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_number_precision extension) - typedef f16 f16mat1x1; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_number_precision extension) - typedef f32 f32mat1; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension) - typedef f32 f32mat1x1; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension) - typedef f64 f64mat1; //!< \brief Double-precision floating-point scalar. (from GLM_GTX_number_precision extension) - typedef f64 f64mat1x1; //!< \brief Double-precision floating-point scalar. (from GLM_GTX_number_precision extension) - - /// @} -}//namespace gtx -}//namespace glm - -#include "number_precision.inl" - -#endif//GLM_GTX_number_precision +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_number_precision +/// @file glm/gtx/number_precision.hpp +/// @date 2007-05-10 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_type_precision (dependence) +/// @see gtc_quaternion (dependence) +/// +/// @defgroup gtx_number_precision GLM_GTX_number_precision +/// @ingroup gtx +/// +/// @brief Defined size types. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_number_precision +#define GLM_GTX_number_precision GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/type_precision.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_number_precision extension included") +#endif + +namespace glm{ +namespace gtx +{ + ///////////////////////////// + // Unsigned int vector types + + /// @addtogroup gtx_number_precision + /// @{ + + typedef u8 u8vec1; //!< \brief 8bit unsigned integer scalar. (from GLM_GTX_number_precision extension) + typedef u16 u16vec1; //!< \brief 16bit unsigned integer scalar. (from GLM_GTX_number_precision extension) + typedef u32 u32vec1; //!< \brief 32bit unsigned integer scalar. (from GLM_GTX_number_precision extension) + typedef u64 u64vec1; //!< \brief 64bit unsigned integer scalar. (from GLM_GTX_number_precision extension) + + ////////////////////// + // Float vector types + + typedef f16 f16vec1; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_number_precision extension) + typedef f32 f32vec1; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension) + typedef f64 f64vec1; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension) + + ////////////////////// + // Float matrix types + + typedef f16 f16mat1; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_number_precision extension) + typedef f16 f16mat1x1; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_number_precision extension) + typedef f32 f32mat1; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension) + typedef f32 f32mat1x1; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension) + typedef f64 f64mat1; //!< \brief Double-precision floating-point scalar. (from GLM_GTX_number_precision extension) + typedef f64 f64mat1x1; //!< \brief Double-precision floating-point scalar. (from GLM_GTX_number_precision extension) + + /// @} +}//namespace gtx +}//namespace glm + +#include "number_precision.inl" + +#endif//GLM_GTX_number_precision diff --git a/include/gal/opengl/glm/gtx/number_precision.inl b/include/gal/opengl/glm/gtx/number_precision.inl index da9e81929a..9dff374e83 100644 --- a/include/gal/opengl/glm/gtx/number_precision.inl +++ b/include/gal/opengl/glm/gtx/number_precision.inl @@ -1,13 +1,13 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2007-05-10 -// Updated : 2007-05-10 -// Licence : This source is under MIT License -// File : glm/gtx/number_precision.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - -} +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-05-10 +// Updated : 2007-05-10 +// Licence : This source is under MIT License +// File : glm/gtx/number_precision.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + +} diff --git a/include/gal/opengl/glm/gtx/ocl_type.hpp b/include/gal/opengl/glm/gtx/ocl_type.hpp index 084f6975c1..9ad7196728 100644 --- a/include/gal/opengl/glm/gtx/ocl_type.hpp +++ b/include/gal/opengl/glm/gtx/ocl_type.hpp @@ -1,132 +1,132 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_ocl_type -/// @file glm/gtx/ocl_type.hpp -/// @date 2009-05-07 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_extented_min_max (dependence) -/// -/// @defgroup gtx_ocl_type GLM_GTX_ocl_type -/// @ingroup gtx -/// -/// @brief OpenCL types. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_ocl_type -#define GLM_GTX_ocl_type GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_ocl_type extension included") -#endif - -namespace glm{ -namespace gtx -{ - /////////////////////////// - // Scalar types - - /// @addtogroup gtx_ocl_type - /// @{ - - typedef detail::int8 cl_char; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::int16 cl_short; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::int32 cl_int; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::int64 cl_long; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) - - typedef detail::uint8 cl_uchar; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::uint16 cl_ushort; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::uint32 cl_uint; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::uint64 cl_ulong; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) - - typedef detail::float16 cl_half; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) - typedef detail::float32 cl_float; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension) - - - typedef detail::int8 cl_char1; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::int16 cl_short1; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::int32 cl_int1; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::int64 cl_long1; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) - - typedef detail::uint8 cl_uchar1; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::uint16 cl_ushort1; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::uint32 cl_uint1; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::uint64 cl_ulong1; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) - - //typedef detail::float16 cl_half1; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) - typedef detail::float32 cl_float1; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension) - - - typedef detail::tvec2 cl_char2; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::tvec2 cl_short2; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::tvec2 cl_int2; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::tvec2 cl_long2; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) - - typedef detail::tvec2 cl_uchar2; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::tvec2 cl_ushort2; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::tvec2 cl_uint2; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::tvec2 cl_ulong2; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) - - //typedef detail::tvec2 cl_half2; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) - typedef detail::tvec2 cl_float2; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension) - - - typedef detail::tvec3 cl_char3; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::tvec3 cl_short3; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::tvec3 cl_int3; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::tvec3 cl_long3; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) - - typedef detail::tvec3 cl_uchar3; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::tvec3 cl_ushort3; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::tvec3 cl_uint3; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::tvec3 cl_ulong3; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) - - //typedef detail::tvec3 cl_half3; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) - typedef detail::tvec3 cl_float3; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension) - - - typedef detail::tvec4 cl_char4; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::tvec4 cl_short4; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::tvec4 cl_int4; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::tvec4 cl_long4; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::tvec4 cl_uchar4; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::tvec4 cl_ushort4; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::tvec4 cl_uint4; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) - typedef detail::tvec4 cl_ulong4; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) - - //typedef detail::tvec4 cl_half4; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) - typedef detail::tvec4 cl_float4; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension) - - /// @} -}//namespace gtx -}//namespace glm - -#include "ocl_type.inl" - -#endif//GLM_GTX_ocl_type +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_ocl_type +/// @file glm/gtx/ocl_type.hpp +/// @date 2009-05-07 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_extented_min_max (dependence) +/// +/// @defgroup gtx_ocl_type GLM_GTX_ocl_type +/// @ingroup gtx +/// +/// @brief OpenCL types. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_ocl_type +#define GLM_GTX_ocl_type GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_ocl_type extension included") +#endif + +namespace glm{ +namespace gtx +{ + /////////////////////////// + // Scalar types + + /// @addtogroup gtx_ocl_type + /// @{ + + typedef detail::int8 cl_char; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::int16 cl_short; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::int32 cl_int; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::int64 cl_long; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) + + typedef detail::uint8 cl_uchar; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::uint16 cl_ushort; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::uint32 cl_uint; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::uint64 cl_ulong; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) + + typedef detail::float16 cl_half; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + typedef detail::float32 cl_float; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + + + typedef detail::int8 cl_char1; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::int16 cl_short1; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::int32 cl_int1; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::int64 cl_long1; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) + + typedef detail::uint8 cl_uchar1; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::uint16 cl_ushort1; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::uint32 cl_uint1; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::uint64 cl_ulong1; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) + + //typedef detail::float16 cl_half1; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + typedef detail::float32 cl_float1; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + + + typedef detail::tvec2 cl_char2; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec2 cl_short2; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec2 cl_int2; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec2 cl_long2; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) + + typedef detail::tvec2 cl_uchar2; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec2 cl_ushort2; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec2 cl_uint2; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec2 cl_ulong2; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) + + //typedef detail::tvec2 cl_half2; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + typedef detail::tvec2 cl_float2; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + + + typedef detail::tvec3 cl_char3; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec3 cl_short3; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec3 cl_int3; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec3 cl_long3; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) + + typedef detail::tvec3 cl_uchar3; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec3 cl_ushort3; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec3 cl_uint3; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec3 cl_ulong3; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) + + //typedef detail::tvec3 cl_half3; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + typedef detail::tvec3 cl_float3; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + + + typedef detail::tvec4 cl_char4; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec4 cl_short4; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec4 cl_int4; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec4 cl_long4; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec4 cl_uchar4; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec4 cl_ushort4; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec4 cl_uint4; //!< \brief 32bit signed integer. (from GLM_GTX_ocl_type extension) + typedef detail::tvec4 cl_ulong4; //!< \brief 64bit signed integer. (from GLM_GTX_ocl_type extension) + + //typedef detail::tvec4 cl_half4; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + typedef detail::tvec4 cl_float4; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension) + + /// @} +}//namespace gtx +}//namespace glm + +#include "ocl_type.inl" + +#endif//GLM_GTX_ocl_type diff --git a/include/gal/opengl/glm/gtx/optimum_pow.hpp b/include/gal/opengl/glm/gtx/optimum_pow.hpp index a39a28648d..735923e40d 100644 --- a/include/gal/opengl/glm/gtx/optimum_pow.hpp +++ b/include/gal/opengl/glm/gtx/optimum_pow.hpp @@ -1,91 +1,91 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_optimum_pow -/// @file glm/gtx/optimum_pow.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_optimum_pow GLM_GTX_optimum_pow -/// @ingroup gtx -/// -/// @brief Integer exponentiation of power functions. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_optimum_pow -#define GLM_GTX_optimum_pow GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_optimum_pow extension included") -#endif - -namespace glm{ -namespace gtx -{ - /// @addtogroup gtx_optimum_pow - /// @{ - - //! Returns x raised to the power of 2. - //! From GLM_GTX_optimum_pow extension. - template - genType pow2(const genType& x); - - //! Returns x raised to the power of 3. - //! From GLM_GTX_optimum_pow extension. - template - genType pow3(const genType& x); - - //! Returns x raised to the power of 4. - //! From GLM_GTX_optimum_pow extension. - template - genType pow4(const genType& x); - - //! Checks if the parameter is a power of 2 number. - //! From GLM_GTX_optimum_pow extension. - bool powOfTwo(int num); - - //! Checks to determine if the parameter component are power of 2 numbers. - //! From GLM_GTX_optimum_pow extension. - detail::tvec2 powOfTwo(const detail::tvec2& x); - - //! Checks to determine if the parameter component are power of 2 numbers. - //! From GLM_GTX_optimum_pow extension. - detail::tvec3 powOfTwo(const detail::tvec3& x); - - //! Checks to determine if the parameter component are power of 2 numbers. - //! From GLM_GTX_optimum_pow extension. - detail::tvec4 powOfTwo(const detail::tvec4& x); - - /// @} -}//namespace gtx -}//namespace glm - -#include "optimum_pow.inl" - -#endif//GLM_GTX_optimum_pow +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_optimum_pow +/// @file glm/gtx/optimum_pow.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_optimum_pow GLM_GTX_optimum_pow +/// @ingroup gtx +/// +/// @brief Integer exponentiation of power functions. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_optimum_pow +#define GLM_GTX_optimum_pow GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_optimum_pow extension included") +#endif + +namespace glm{ +namespace gtx +{ + /// @addtogroup gtx_optimum_pow + /// @{ + + //! Returns x raised to the power of 2. + //! From GLM_GTX_optimum_pow extension. + template + genType pow2(const genType& x); + + //! Returns x raised to the power of 3. + //! From GLM_GTX_optimum_pow extension. + template + genType pow3(const genType& x); + + //! Returns x raised to the power of 4. + //! From GLM_GTX_optimum_pow extension. + template + genType pow4(const genType& x); + + //! Checks if the parameter is a power of 2 number. + //! From GLM_GTX_optimum_pow extension. + bool powOfTwo(int num); + + //! Checks to determine if the parameter component are power of 2 numbers. + //! From GLM_GTX_optimum_pow extension. + detail::tvec2 powOfTwo(const detail::tvec2& x); + + //! Checks to determine if the parameter component are power of 2 numbers. + //! From GLM_GTX_optimum_pow extension. + detail::tvec3 powOfTwo(const detail::tvec3& x); + + //! Checks to determine if the parameter component are power of 2 numbers. + //! From GLM_GTX_optimum_pow extension. + detail::tvec4 powOfTwo(const detail::tvec4& x); + + /// @} +}//namespace gtx +}//namespace glm + +#include "optimum_pow.inl" + +#endif//GLM_GTX_optimum_pow diff --git a/include/gal/opengl/glm/gtx/optimum_pow.inl b/include/gal/opengl/glm/gtx/optimum_pow.inl index 069d515732..12476977b7 100644 --- a/include/gal/opengl/glm/gtx/optimum_pow.inl +++ b/include/gal/opengl/glm/gtx/optimum_pow.inl @@ -1,58 +1,58 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2005-12-21 -// Updated : 2005-12-27 -// Licence : This source is under MIT License -// File : glm/gtx/optimum_pow.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER genType pow2(const genType& x) - { - return x * x; - } - - template - GLM_FUNC_QUALIFIER genType pow3(const genType& x) - { - return x * x * x; - } - - template - GLM_FUNC_QUALIFIER genType pow4(const genType& x) - { - return x * x * x * x; - } - - GLM_FUNC_QUALIFIER bool powOfTwo(int x) - { - return !(x & (x - 1)); - } - - GLM_FUNC_QUALIFIER detail::tvec2 powOfTwo(const detail::tvec2& x) - { - return detail::tvec2( - powOfTwo(x.x), - powOfTwo(x.y)); - } - - GLM_FUNC_QUALIFIER detail::tvec3 powOfTwo(const detail::tvec3& x) - { - return detail::tvec3( - powOfTwo(x.x), - powOfTwo(x.y), - powOfTwo(x.z)); - } - - GLM_FUNC_QUALIFIER detail::tvec4 powOfTwo(const detail::tvec4& x) - { - return detail::tvec4( - powOfTwo(x.x), - powOfTwo(x.y), - powOfTwo(x.z), - powOfTwo(x.w)); - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2005-12-27 +// Licence : This source is under MIT License +// File : glm/gtx/optimum_pow.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER genType pow2(const genType& x) + { + return x * x; + } + + template + GLM_FUNC_QUALIFIER genType pow3(const genType& x) + { + return x * x * x; + } + + template + GLM_FUNC_QUALIFIER genType pow4(const genType& x) + { + return x * x * x * x; + } + + GLM_FUNC_QUALIFIER bool powOfTwo(int x) + { + return !(x & (x - 1)); + } + + GLM_FUNC_QUALIFIER detail::tvec2 powOfTwo(const detail::tvec2& x) + { + return detail::tvec2( + powOfTwo(x.x), + powOfTwo(x.y)); + } + + GLM_FUNC_QUALIFIER detail::tvec3 powOfTwo(const detail::tvec3& x) + { + return detail::tvec3( + powOfTwo(x.x), + powOfTwo(x.y), + powOfTwo(x.z)); + } + + GLM_FUNC_QUALIFIER detail::tvec4 powOfTwo(const detail::tvec4& x) + { + return detail::tvec4( + powOfTwo(x.x), + powOfTwo(x.y), + powOfTwo(x.z), + powOfTwo(x.w)); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/orthonormalize.hpp b/include/gal/opengl/glm/gtx/orthonormalize.hpp index 44780dab13..7d103f44c9 100644 --- a/include/gal/opengl/glm/gtx/orthonormalize.hpp +++ b/include/gal/opengl/glm/gtx/orthonormalize.hpp @@ -1,72 +1,72 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_orthonormalize -/// @file glm/gtx/orthonormalize.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_extented_min_max (dependence) -/// -/// @defgroup gtx_orthonormalize GLM_GTX_orthonormalize -/// @ingroup gtx -/// -/// @brief Orthonormalize matrices. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_orthonormalize -#define GLM_GTX_orthonormalize GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_orthonormalize extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_orthonormalize - /// @{ - - //! Returns the orthonormalized matrix of m. - //! From GLM_GTX_orthonormalize extension. - template - detail::tmat3x3 orthonormalize( - const detail::tmat3x3& m); - - //! Orthonormalizes x according y. - //! From GLM_GTX_orthonormalize extension. - template - detail::tvec3 orthonormalize( - const detail::tvec3& x, - const detail::tvec3& y); - - /// @} -}//namespace glm - -#include "orthonormalize.inl" - -#endif//GLM_GTX_orthonormalize +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_orthonormalize +/// @file glm/gtx/orthonormalize.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_extented_min_max (dependence) +/// +/// @defgroup gtx_orthonormalize GLM_GTX_orthonormalize +/// @ingroup gtx +/// +/// @brief Orthonormalize matrices. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_orthonormalize +#define GLM_GTX_orthonormalize GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_orthonormalize extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_orthonormalize + /// @{ + + //! Returns the orthonormalized matrix of m. + //! From GLM_GTX_orthonormalize extension. + template + detail::tmat3x3 orthonormalize( + const detail::tmat3x3& m); + + //! Orthonormalizes x according y. + //! From GLM_GTX_orthonormalize extension. + template + detail::tvec3 orthonormalize( + const detail::tvec3& x, + const detail::tvec3& y); + + /// @} +}//namespace glm + +#include "orthonormalize.inl" + +#endif//GLM_GTX_orthonormalize diff --git a/include/gal/opengl/glm/gtx/orthonormalize.inl b/include/gal/opengl/glm/gtx/orthonormalize.inl index a43e6808d9..559a3aea57 100644 --- a/include/gal/opengl/glm/gtx/orthonormalize.inl +++ b/include/gal/opengl/glm/gtx/orthonormalize.inl @@ -1,43 +1,43 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2005-12-21 -// Updated : 2005-12-21 -// Licence : This source is under MIT License -// File : glm/gtx/orthonormalize.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER detail::tmat3x3 orthonormalize - ( - const detail::tmat3x3& m - ) - { - detail::tmat3x3 r = m; - - r[0] = normalize(r[0]); - - float d0 = dot(r[0], r[1]); - r[1] -= r[0] * d0; - r[1] = normalize(r[1]); - - float d1 = dot(r[1], r[2]); - d0 = dot(r[0], r[2]); - r[2] -= r[0] * d0 + r[1] * d1; - r[2] = normalize(r[2]); - - return r; - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 orthonormalize - ( - const detail::tvec3& x, - const detail::tvec3& y - ) - { - return normalize(x - y * dot(y, x)); - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2005-12-21 +// Licence : This source is under MIT License +// File : glm/gtx/orthonormalize.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tmat3x3 orthonormalize + ( + const detail::tmat3x3& m + ) + { + detail::tmat3x3 r = m; + + r[0] = normalize(r[0]); + + float d0 = dot(r[0], r[1]); + r[1] -= r[0] * d0; + r[1] = normalize(r[1]); + + float d1 = dot(r[1], r[2]); + d0 = dot(r[0], r[2]); + r[2] -= r[0] * d0 + r[1] * d1; + r[2] = normalize(r[2]); + + return r; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 orthonormalize + ( + const detail::tvec3& x, + const detail::tvec3& y + ) + { + return normalize(x - y * dot(y, x)); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/perpendicular.hpp b/include/gal/opengl/glm/gtx/perpendicular.hpp index 97982f7119..5bdd66e7bd 100644 --- a/include/gal/opengl/glm/gtx/perpendicular.hpp +++ b/include/gal/opengl/glm/gtx/perpendicular.hpp @@ -1,67 +1,67 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_perpendicular -/// @file glm/gtx/perpendicular.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_projection (dependence) -/// -/// @defgroup gtx_perpendicular GLM_GTX_perpendicular -/// @ingroup gtx -/// -/// @brief Perpendicular of a vector from other one -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_perpendicular -#define GLM_GTX_perpendicular GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtx/projection.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_perpendicular extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_perpendicular - /// @{ - - //! Projects x a perpendicular axis of Normal. - //! From GLM_GTX_perpendicular extension. - template - vecType perp( - vecType const & x, - vecType const & Normal); - - /// @} -}//namespace glm - -#include "perpendicular.inl" - -#endif//GLM_GTX_perpendicular +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_perpendicular +/// @file glm/gtx/perpendicular.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_projection (dependence) +/// +/// @defgroup gtx_perpendicular GLM_GTX_perpendicular +/// @ingroup gtx +/// +/// @brief Perpendicular of a vector from other one +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_perpendicular +#define GLM_GTX_perpendicular GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtx/projection.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_perpendicular extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_perpendicular + /// @{ + + //! Projects x a perpendicular axis of Normal. + //! From GLM_GTX_perpendicular extension. + template + vecType perp( + vecType const & x, + vecType const & Normal); + + /// @} +}//namespace glm + +#include "perpendicular.inl" + +#endif//GLM_GTX_perpendicular diff --git a/include/gal/opengl/glm/gtx/perpendicular.inl b/include/gal/opengl/glm/gtx/perpendicular.inl index 2877508fec..fe33346199 100644 --- a/include/gal/opengl/glm/gtx/perpendicular.inl +++ b/include/gal/opengl/glm/gtx/perpendicular.inl @@ -1,21 +1,21 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2005-12-21 -// Updated : 2009-03-06 -// Licence : This source is under MIT License -// File : glm/gtx/perpendicular.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER vecType perp - ( - vecType const & x, - vecType const & Normal - ) - { - return x - proj(x, Normal); - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2009-03-06 +// Licence : This source is under MIT License +// File : glm/gtx/perpendicular.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER vecType perp + ( + vecType const & x, + vecType const & Normal + ) + { + return x - proj(x, Normal); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/polar_coordinates.hpp b/include/gal/opengl/glm/gtx/polar_coordinates.hpp index 1b9c8de845..ebfe689fc3 100644 --- a/include/gal/opengl/glm/gtx/polar_coordinates.hpp +++ b/include/gal/opengl/glm/gtx/polar_coordinates.hpp @@ -1,70 +1,70 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_polar_coordinates -/// @file glm/gtx/polar_coordinates.hpp -/// @date 2007-03-06 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_polar_coordinates GLM_GTX_polar_coordinates -/// @ingroup gtx -/// -/// @brief Conversion from Euclidean space to polar space and revert. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_polar_coordinates -#define GLM_GTX_polar_coordinates GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_polar_coordinates extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_polar_coordinates - /// @{ - - //! Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude. - //! From GLM_GTX_polar_coordinates extension. - template - detail::tvec3 polar( - detail::tvec3 const & euclidean); - - //! Convert Polar to Euclidean coordinates. - //! From GLM_GTX_polar_coordinates extension. - template - detail::tvec3 euclidean( - detail::tvec3 const & polar); - - /// @} -}//namespace glm - -#include "polar_coordinates.inl" - -#endif//GLM_GTX_polar_coordinates +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_polar_coordinates +/// @file glm/gtx/polar_coordinates.hpp +/// @date 2007-03-06 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_polar_coordinates GLM_GTX_polar_coordinates +/// @ingroup gtx +/// +/// @brief Conversion from Euclidean space to polar space and revert. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_polar_coordinates +#define GLM_GTX_polar_coordinates GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_polar_coordinates extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_polar_coordinates + /// @{ + + //! Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude. + //! From GLM_GTX_polar_coordinates extension. + template + detail::tvec3 polar( + detail::tvec3 const & euclidean); + + //! Convert Polar to Euclidean coordinates. + //! From GLM_GTX_polar_coordinates extension. + template + detail::tvec3 euclidean( + detail::tvec3 const & polar); + + /// @} +}//namespace glm + +#include "polar_coordinates.inl" + +#endif//GLM_GTX_polar_coordinates diff --git a/include/gal/opengl/glm/gtx/polar_coordinates.inl b/include/gal/opengl/glm/gtx/polar_coordinates.inl index 33c171f6ea..4cfdf7085f 100644 --- a/include/gal/opengl/glm/gtx/polar_coordinates.inl +++ b/include/gal/opengl/glm/gtx/polar_coordinates.inl @@ -1,55 +1,55 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2007-03-06 -// Updated : 2009-05-01 -// Licence : This source is under MIT License -// File : glm/gtx/polar_coordinates.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER detail::tvec3 polar - ( - detail::tvec3 const & euclidean - ) - { - T const Length(length(euclidean)); - detail::tvec3 const tmp(euclidean / Length); - T const xz_dist(sqrt(tmp.x * tmp.x + tmp.z * tmp.z)); - -#ifdef GLM_FORCE_RADIANS - return detail::tvec3( - atan(xz_dist, tmp.y), // latitude - atan(tmp.x, tmp.z), // longitude - xz_dist); // xz distance -#else - return detail::tvec3( - degrees(atan(xz_dist, tmp.y)), // latitude - degrees(atan(tmp.x, tmp.z)), // longitude - xz_dist); // xz distance -#endif - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 euclidean - ( - detail::tvec3 const & polar - ) - { -#ifdef GLM_FORCE_RADIANS - T const latitude(polar.x); - T const longitude(polar.y); -#else - T const latitude(radians(polar.x)); - T const longitude(radians(polar.y)); -#endif - - return detail::tvec3( - cos(latitude) * sin(longitude), - sin(latitude), - cos(latitude) * cos(longitude)); - } - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-03-06 +// Updated : 2009-05-01 +// Licence : This source is under MIT License +// File : glm/gtx/polar_coordinates.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tvec3 polar + ( + detail::tvec3 const & euclidean + ) + { + T const Length(length(euclidean)); + detail::tvec3 const tmp(euclidean / Length); + T const xz_dist(sqrt(tmp.x * tmp.x + tmp.z * tmp.z)); + +#ifdef GLM_FORCE_RADIANS + return detail::tvec3( + atan(xz_dist, tmp.y), // latitude + atan(tmp.x, tmp.z), // longitude + xz_dist); // xz distance +#else + return detail::tvec3( + degrees(atan(xz_dist, tmp.y)), // latitude + degrees(atan(tmp.x, tmp.z)), // longitude + xz_dist); // xz distance +#endif + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 euclidean + ( + detail::tvec3 const & polar + ) + { +#ifdef GLM_FORCE_RADIANS + T const latitude(polar.x); + T const longitude(polar.y); +#else + T const latitude(radians(polar.x)); + T const longitude(radians(polar.y)); +#endif + + return detail::tvec3( + cos(latitude) * sin(longitude), + sin(latitude), + cos(latitude) * cos(longitude)); + } + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/projection.hpp b/include/gal/opengl/glm/gtx/projection.hpp index 697f8e47a8..1c86ef4886 100644 --- a/include/gal/opengl/glm/gtx/projection.hpp +++ b/include/gal/opengl/glm/gtx/projection.hpp @@ -1,65 +1,65 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_projection -/// @file glm/gtx/projection.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_projection GLM_GTX_projection -/// @ingroup gtx -/// -/// @brief Projection of a vector to other one -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_projection -#define GLM_GTX_projection GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_projection extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_projection - /// @{ - - //! Projects x on Normal. - //! From GLM_GTX_projection extension. - template - vecType proj( - vecType const & x, - vecType const & Normal); - - /// @} -}//namespace glm - -#include "projection.inl" - -#endif//GLM_GTX_projection +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_projection +/// @file glm/gtx/projection.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_projection GLM_GTX_projection +/// @ingroup gtx +/// +/// @brief Projection of a vector to other one +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_projection +#define GLM_GTX_projection GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_projection extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_projection + /// @{ + + //! Projects x on Normal. + //! From GLM_GTX_projection extension. + template + vecType proj( + vecType const & x, + vecType const & Normal); + + /// @} +}//namespace glm + +#include "projection.inl" + +#endif//GLM_GTX_projection diff --git a/include/gal/opengl/glm/gtx/projection.inl b/include/gal/opengl/glm/gtx/projection.inl index 2cb3044384..263b757097 100644 --- a/include/gal/opengl/glm/gtx/projection.inl +++ b/include/gal/opengl/glm/gtx/projection.inl @@ -1,21 +1,21 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2005-12-21 -// Updated : 2009-03-06 -// Licence : This source is under MIT License -// File : glm/gtx/projection.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER vecType proj - ( - vecType const & x, - vecType const & Normal - ) - { - return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2009-03-06 +// Licence : This source is under MIT License +// File : glm/gtx/projection.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER vecType proj + ( + vecType const & x, + vecType const & Normal + ) + { + return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/quaternion.hpp b/include/gal/opengl/glm/gtx/quaternion.hpp index abcc3cf0cc..98949389f9 100644 --- a/include/gal/opengl/glm/gtx/quaternion.hpp +++ b/include/gal/opengl/glm/gtx/quaternion.hpp @@ -1,196 +1,196 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_quaternion -/// @file glm/gtx/quaternion.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_extented_min_max (dependence) -/// -/// @defgroup gtx_quaternion GLM_GTX_quaternion -/// @ingroup gtx -/// -/// @brief Extented quaternion types and functions -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_quaternion -#define GLM_GTX_quaternion GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtc/quaternion.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_quaternion extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_quaternion - /// @{ - - //! Compute a cross product between a quaternion and a vector. - /// - /// @see gtx_quaternion - template - detail::tvec3 cross( - detail::tquat const & q, - detail::tvec3 const & v); - - //! Compute a cross product between a vector and a quaternion. - /// - /// @see gtx_quaternion - template - detail::tvec3 cross( - detail::tvec3 const & v, - detail::tquat const & q); - - //! Compute a point on a path according squad equation. - //! q1 and q2 are control points; s1 and s2 are intermediate control points. - /// - /// @see gtx_quaternion - template - detail::tquat squad( - detail::tquat const & q1, - detail::tquat const & q2, - detail::tquat const & s1, - detail::tquat const & s2, - valType const & h); - - //! Returns an intermediate control point for squad interpolation. - /// - /// @see gtx_quaternion - template - detail::tquat intermediate( - detail::tquat const & prev, - detail::tquat const & curr, - detail::tquat const & next); - - //! Returns a exp of a quaternion. - /// - /// @see gtx_quaternion - template - detail::tquat exp( - detail::tquat const & q, - valType const & exponent); - - //! Returns a log of a quaternion. - /// - /// @see gtx_quaternion - template - detail::tquat log( - detail::tquat const & q); - - /// Returns x raised to the y power. - /// - /// @see gtx_quaternion - template - detail::tquat pow( - detail::tquat const & x, - valType const & y); - - //! Returns quarternion square root. - /// - /// @see gtx_quaternion - //template - //detail::tquat sqrt( - // detail::tquat const & q); - - //! Rotates a 3 components vector by a quaternion. - /// - /// @see gtx_quaternion - template - detail::tvec3 rotate( - detail::tquat const & q, - detail::tvec3 const & v); - - /// Rotates a 4 components vector by a quaternion. - /// - /// @see gtx_quaternion - template - detail::tvec4 rotate( - detail::tquat const & q, - detail::tvec4 const & v); - - /// Extract the real component of a quaternion. - /// - /// @see gtx_quaternion - template - valType extractRealComponent( - detail::tquat const & q); - - /// Converts a quaternion to a 3 * 3 matrix. - /// - /// @see gtx_quaternion - template - detail::tmat3x3 toMat3( - detail::tquat const & x){return mat3_cast(x);} - - /// Converts a quaternion to a 4 * 4 matrix. - /// - /// @see gtx_quaternion - template - detail::tmat4x4 toMat4( - detail::tquat const & x){return mat4_cast(x);} - - /// Converts a 3 * 3 matrix to a quaternion. - /// - /// @see gtx_quaternion - template - detail::tquat toQuat( - detail::tmat3x3 const & x){return quat_cast(x);} - - /// Converts a 4 * 4 matrix to a quaternion. - /// - /// @see gtx_quaternion - template - detail::tquat toQuat( - detail::tmat4x4 const & x){return quat_cast(x);} - - /// Quaternion interpolation using the rotation short path. - /// - /// @see gtx_quaternion - template - detail::tquat shortMix( - detail::tquat const & x, - detail::tquat const & y, - T const & a); - - /// Quaternion normalized linear interpolation. - /// - /// @see gtx_quaternion - template - detail::tquat fastMix( - detail::tquat const & x, - detail::tquat const & y, - T const & a); - - /// @} -}//namespace glm - -#include "quaternion.inl" - -#endif//GLM_GTX_quaternion +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_quaternion +/// @file glm/gtx/quaternion.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_extented_min_max (dependence) +/// +/// @defgroup gtx_quaternion GLM_GTX_quaternion +/// @ingroup gtx +/// +/// @brief Extented quaternion types and functions +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_quaternion +#define GLM_GTX_quaternion GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/quaternion.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_quaternion extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_quaternion + /// @{ + + //! Compute a cross product between a quaternion and a vector. + /// + /// @see gtx_quaternion + template + detail::tvec3 cross( + detail::tquat const & q, + detail::tvec3 const & v); + + //! Compute a cross product between a vector and a quaternion. + /// + /// @see gtx_quaternion + template + detail::tvec3 cross( + detail::tvec3 const & v, + detail::tquat const & q); + + //! Compute a point on a path according squad equation. + //! q1 and q2 are control points; s1 and s2 are intermediate control points. + /// + /// @see gtx_quaternion + template + detail::tquat squad( + detail::tquat const & q1, + detail::tquat const & q2, + detail::tquat const & s1, + detail::tquat const & s2, + valType const & h); + + //! Returns an intermediate control point for squad interpolation. + /// + /// @see gtx_quaternion + template + detail::tquat intermediate( + detail::tquat const & prev, + detail::tquat const & curr, + detail::tquat const & next); + + //! Returns a exp of a quaternion. + /// + /// @see gtx_quaternion + template + detail::tquat exp( + detail::tquat const & q, + valType const & exponent); + + //! Returns a log of a quaternion. + /// + /// @see gtx_quaternion + template + detail::tquat log( + detail::tquat const & q); + + /// Returns x raised to the y power. + /// + /// @see gtx_quaternion + template + detail::tquat pow( + detail::tquat const & x, + valType const & y); + + //! Returns quarternion square root. + /// + /// @see gtx_quaternion + //template + //detail::tquat sqrt( + // detail::tquat const & q); + + //! Rotates a 3 components vector by a quaternion. + /// + /// @see gtx_quaternion + template + detail::tvec3 rotate( + detail::tquat const & q, + detail::tvec3 const & v); + + /// Rotates a 4 components vector by a quaternion. + /// + /// @see gtx_quaternion + template + detail::tvec4 rotate( + detail::tquat const & q, + detail::tvec4 const & v); + + /// Extract the real component of a quaternion. + /// + /// @see gtx_quaternion + template + valType extractRealComponent( + detail::tquat const & q); + + /// Converts a quaternion to a 3 * 3 matrix. + /// + /// @see gtx_quaternion + template + detail::tmat3x3 toMat3( + detail::tquat const & x){return mat3_cast(x);} + + /// Converts a quaternion to a 4 * 4 matrix. + /// + /// @see gtx_quaternion + template + detail::tmat4x4 toMat4( + detail::tquat const & x){return mat4_cast(x);} + + /// Converts a 3 * 3 matrix to a quaternion. + /// + /// @see gtx_quaternion + template + detail::tquat toQuat( + detail::tmat3x3 const & x){return quat_cast(x);} + + /// Converts a 4 * 4 matrix to a quaternion. + /// + /// @see gtx_quaternion + template + detail::tquat toQuat( + detail::tmat4x4 const & x){return quat_cast(x);} + + /// Quaternion interpolation using the rotation short path. + /// + /// @see gtx_quaternion + template + detail::tquat shortMix( + detail::tquat const & x, + detail::tquat const & y, + T const & a); + + /// Quaternion normalized linear interpolation. + /// + /// @see gtx_quaternion + template + detail::tquat fastMix( + detail::tquat const & x, + detail::tquat const & y, + T const & a); + + /// @} +}//namespace glm + +#include "quaternion.inl" + +#endif//GLM_GTX_quaternion diff --git a/include/gal/opengl/glm/gtx/quaternion.inl b/include/gal/opengl/glm/gtx/quaternion.inl index 517d1700c3..66b3420ace 100644 --- a/include/gal/opengl/glm/gtx/quaternion.inl +++ b/include/gal/opengl/glm/gtx/quaternion.inl @@ -1,209 +1,209 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2005-12-21 -// Updated : 2008-11-27 -// Licence : This source is under MIT License -// File : glm/gtx/quaternion.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#include - -namespace glm -{ - template - GLM_FUNC_QUALIFIER detail::tvec3 cross - ( - detail::tvec3 const & v, - detail::tquat const & q - ) - { - return inverse(q) * v; - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 cross - ( - detail::tquat const & q, - detail::tvec3 const & v - ) - { - return q * v; - } - - template - GLM_FUNC_QUALIFIER detail::tquat squad - ( - detail::tquat const & q1, - detail::tquat const & q2, - detail::tquat const & s1, - detail::tquat const & s2, - T const & h) - { - return mix(mix(q1, q2, h), mix(s1, s2, h), T(2) * h (T(1) - h)); - } - - template - GLM_FUNC_QUALIFIER detail::tquat intermediate - ( - detail::tquat const & prev, - detail::tquat const & curr, - detail::tquat const & next - ) - { - detail::tquat invQuat = inverse(curr); - return ext((log(next + invQuat) + log(prev + invQuat)) / T(-4)) * curr; - } - - template - GLM_FUNC_QUALIFIER detail::tquat exp - ( - detail::tquat const & q, - T const & exponent - ) - { - detail::tvec3 u(q.x, q.y, q.z); - float a = glm::length(u); - detail::tvec3 v(u / a); - return detail::tquat(cos(a), sin(a) * v); - } - - template - GLM_FUNC_QUALIFIER detail::tquat log - ( - detail::tquat const & q - ) - { - if((q.x == T(0)) && (q.y == T(0)) && (q.z == T(0))) - { - if(q.w > T(0)) - return detail::tquat(log(q.w), T(0), T(0), T(0)); - else if(q.w < T(0)) - return detail::tquat(log(-q.w), T(3.1415926535897932384626433832795), T(0),T(0)); - else - return detail::tquat(std::numeric_limits::infinity(), std::numeric_limits::infinity(), std::numeric_limits::infinity(), std::numeric_limits::infinity()); - } - else - { - T Vec3Len = sqrt(q.x * q.x + q.y * q.y + q.z * q.z); - T QuatLen = sqrt(Vec3Len * Vec3Len + q.w * q.w); - T t = atan(Vec3Len, T(q.w)) / Vec3Len; - return detail::tquat(t * q.x, t * q.y, t * q.z, log(QuatLen)); - } - } - - template - GLM_FUNC_QUALIFIER detail::tquat pow - ( - detail::tquat const & x, - T const & y - ) - { - if(abs(x.w) > T(0.9999)) - return x; - float Angle = acos(y); - float NewAngle = Angle * y; - float Div = sin(NewAngle) / sin(Angle); - return detail::tquat( - cos(NewAngle), - x.x * Div, - x.y * Div, - x.z * Div); - } - - //template - //GLM_FUNC_QUALIFIER detail::tquat sqrt - //( - // detail::tquat const & q - //) - //{ - // T q0 = T(1) - dot(q, q); - // return T(2) * (T(1) + q0) * q; - //} - - template - GLM_FUNC_QUALIFIER detail::tvec3 rotate - ( - detail::tquat const & q, - detail::tvec3 const & v - ) - { - return q * v; - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 rotate - ( - detail::tquat const & q, - detail::tvec4 const & v - ) - { - return q * v; - } - - template - GLM_FUNC_QUALIFIER T extractRealComponent - ( - detail::tquat const & q - ) - { - T w = T(1.0) - q.x * q.x - q.y * q.y - q.z * q.z; - if(w < T(0)) - return T(0); - else - return -sqrt(w); - } - - template - GLM_FUNC_QUALIFIER detail::tquat shortMix - ( - detail::tquat const & x, - detail::tquat const & y, - T const & a - ) - { - if(a <= typename detail::tquat::value_type(0)) return x; - if(a >= typename detail::tquat::value_type(1)) return y; - - T fCos = dot(x, y); - detail::tquat y2(y); //BUG!!! tquat y2; - if(fCos < T(0)) - { - y2 = -y; - fCos = -fCos; - } - - //if(fCos > 1.0f) // problem - T k0, k1; - if(fCos > T(0.9999)) - { - k0 = T(1) - a; - k1 = T(0) + a; //BUG!!! 1.0f + a; - } - else - { - T fSin = sqrt(T(1) - fCos * fCos); - T fAngle = atan(fSin, fCos); - T fOneOverSin = T(1) / fSin; - k0 = sin((T(1) - a) * fAngle) * fOneOverSin; - k1 = sin((T(0) + a) * fAngle) * fOneOverSin; - } - - return detail::tquat( - k0 * x.w + k1 * y2.w, - k0 * x.x + k1 * y2.x, - k0 * x.y + k1 * y2.y, - k0 * x.z + k1 * y2.z); - } - - template - GLM_FUNC_QUALIFIER detail::tquat fastMix - ( - detail::tquat const & x, - detail::tquat const & y, - T const & a - ) - { - return glm::normalize(x * (T(1) - a) + (y * a)); - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2008-11-27 +// Licence : This source is under MIT License +// File : glm/gtx/quaternion.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tvec3 cross + ( + detail::tvec3 const & v, + detail::tquat const & q + ) + { + return inverse(q) * v; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 cross + ( + detail::tquat const & q, + detail::tvec3 const & v + ) + { + return q * v; + } + + template + GLM_FUNC_QUALIFIER detail::tquat squad + ( + detail::tquat const & q1, + detail::tquat const & q2, + detail::tquat const & s1, + detail::tquat const & s2, + T const & h) + { + return mix(mix(q1, q2, h), mix(s1, s2, h), T(2) * h (T(1) - h)); + } + + template + GLM_FUNC_QUALIFIER detail::tquat intermediate + ( + detail::tquat const & prev, + detail::tquat const & curr, + detail::tquat const & next + ) + { + detail::tquat invQuat = inverse(curr); + return ext((log(next + invQuat) + log(prev + invQuat)) / T(-4)) * curr; + } + + template + GLM_FUNC_QUALIFIER detail::tquat exp + ( + detail::tquat const & q, + T const & exponent + ) + { + detail::tvec3 u(q.x, q.y, q.z); + float a = glm::length(u); + detail::tvec3 v(u / a); + return detail::tquat(cos(a), sin(a) * v); + } + + template + GLM_FUNC_QUALIFIER detail::tquat log + ( + detail::tquat const & q + ) + { + if((q.x == T(0)) && (q.y == T(0)) && (q.z == T(0))) + { + if(q.w > T(0)) + return detail::tquat(log(q.w), T(0), T(0), T(0)); + else if(q.w < T(0)) + return detail::tquat(log(-q.w), T(3.1415926535897932384626433832795), T(0),T(0)); + else + return detail::tquat(std::numeric_limits::infinity(), std::numeric_limits::infinity(), std::numeric_limits::infinity(), std::numeric_limits::infinity()); + } + else + { + T Vec3Len = sqrt(q.x * q.x + q.y * q.y + q.z * q.z); + T QuatLen = sqrt(Vec3Len * Vec3Len + q.w * q.w); + T t = atan(Vec3Len, T(q.w)) / Vec3Len; + return detail::tquat(t * q.x, t * q.y, t * q.z, log(QuatLen)); + } + } + + template + GLM_FUNC_QUALIFIER detail::tquat pow + ( + detail::tquat const & x, + T const & y + ) + { + if(abs(x.w) > T(0.9999)) + return x; + float Angle = acos(y); + float NewAngle = Angle * y; + float Div = sin(NewAngle) / sin(Angle); + return detail::tquat( + cos(NewAngle), + x.x * Div, + x.y * Div, + x.z * Div); + } + + //template + //GLM_FUNC_QUALIFIER detail::tquat sqrt + //( + // detail::tquat const & q + //) + //{ + // T q0 = T(1) - dot(q, q); + // return T(2) * (T(1) + q0) * q; + //} + + template + GLM_FUNC_QUALIFIER detail::tvec3 rotate + ( + detail::tquat const & q, + detail::tvec3 const & v + ) + { + return q * v; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 rotate + ( + detail::tquat const & q, + detail::tvec4 const & v + ) + { + return q * v; + } + + template + GLM_FUNC_QUALIFIER T extractRealComponent + ( + detail::tquat const & q + ) + { + T w = T(1.0) - q.x * q.x - q.y * q.y - q.z * q.z; + if(w < T(0)) + return T(0); + else + return -sqrt(w); + } + + template + GLM_FUNC_QUALIFIER detail::tquat shortMix + ( + detail::tquat const & x, + detail::tquat const & y, + T const & a + ) + { + if(a <= typename detail::tquat::value_type(0)) return x; + if(a >= typename detail::tquat::value_type(1)) return y; + + T fCos = dot(x, y); + detail::tquat y2(y); //BUG!!! tquat y2; + if(fCos < T(0)) + { + y2 = -y; + fCos = -fCos; + } + + //if(fCos > 1.0f) // problem + T k0, k1; + if(fCos > T(0.9999)) + { + k0 = T(1) - a; + k1 = T(0) + a; //BUG!!! 1.0f + a; + } + else + { + T fSin = sqrt(T(1) - fCos * fCos); + T fAngle = atan(fSin, fCos); + T fOneOverSin = T(1) / fSin; + k0 = sin((T(1) - a) * fAngle) * fOneOverSin; + k1 = sin((T(0) + a) * fAngle) * fOneOverSin; + } + + return detail::tquat( + k0 * x.w + k1 * y2.w, + k0 * x.x + k1 * y2.x, + k0 * x.y + k1 * y2.y, + k0 * x.z + k1 * y2.z); + } + + template + GLM_FUNC_QUALIFIER detail::tquat fastMix + ( + detail::tquat const & x, + detail::tquat const & y, + T const & a + ) + { + return glm::normalize(x * (T(1) - a) + (y * a)); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/random.hpp b/include/gal/opengl/glm/gtx/random.hpp index ade53464a4..308b408a81 100644 --- a/include/gal/opengl/glm/gtx/random.hpp +++ b/include/gal/opengl/glm/gtx/random.hpp @@ -1,29 +1,29 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/////////////////////////////////////////////////////////////////////////////////// - -#if(defined(GLM_MESSAGES)) -# pragma message("GLM: GLM_GTX_random extension is deprecated, include GLM_GTC_random instead") -#endif - -// Promoted: -#include "../gtc/random.hpp" +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/////////////////////////////////////////////////////////////////////////////////// + +#if(defined(GLM_MESSAGES)) +# pragma message("GLM: GLM_GTX_random extension is deprecated, include GLM_GTC_random instead") +#endif + +// Promoted: +#include "../gtc/random.hpp" diff --git a/include/gal/opengl/glm/gtx/raw_data.hpp b/include/gal/opengl/glm/gtx/raw_data.hpp index 16a1c08754..ad1a9d9ec0 100644 --- a/include/gal/opengl/glm/gtx/raw_data.hpp +++ b/include/gal/opengl/glm/gtx/raw_data.hpp @@ -1,75 +1,75 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_raw_data -/// @file glm/gtx/raw_data.hpp -/// @date 2008-11-19 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_raw_data GLM_GTX_raw_data -/// @ingroup gtx -/// -/// @brief Projection of a vector to other one -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_raw_data -#define GLM_GTX_raw_data GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtc/type_precision.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_raw_data extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_raw_data - /// @{ - - //! Type for byte numbers. - //! From GLM_GTX_raw_data extension. - typedef uint8 byte; - - //! Type for word numbers. - //! From GLM_GTX_raw_data extension. - typedef uint16 word; - - //! Type for dword numbers. - //! From GLM_GTX_raw_data extension. - typedef uint32 dword; - - //! Type for qword numbers. - //! From GLM_GTX_raw_data extension. - typedef uint64 qword; - - /// @} -}// namespace glm - -#include "raw_data.inl" - -#endif//GLM_GTX_raw_data +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_raw_data +/// @file glm/gtx/raw_data.hpp +/// @date 2008-11-19 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_raw_data GLM_GTX_raw_data +/// @ingroup gtx +/// +/// @brief Projection of a vector to other one +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_raw_data +#define GLM_GTX_raw_data GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/type_precision.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_raw_data extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_raw_data + /// @{ + + //! Type for byte numbers. + //! From GLM_GTX_raw_data extension. + typedef uint8 byte; + + //! Type for word numbers. + //! From GLM_GTX_raw_data extension. + typedef uint16 word; + + //! Type for dword numbers. + //! From GLM_GTX_raw_data extension. + typedef uint32 dword; + + //! Type for qword numbers. + //! From GLM_GTX_raw_data extension. + typedef uint64 qword; + + /// @} +}// namespace glm + +#include "raw_data.inl" + +#endif//GLM_GTX_raw_data diff --git a/include/gal/opengl/glm/gtx/raw_data.inl b/include/gal/opengl/glm/gtx/raw_data.inl index 6edaaea4bd..7573120c6e 100644 --- a/include/gal/opengl/glm/gtx/raw_data.inl +++ b/include/gal/opengl/glm/gtx/raw_data.inl @@ -1,11 +1,11 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2008-11-19 -// Updated : 2008-11-19 -// Licence : This source is under MIT License -// File : glm/gtx/raw_data.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Dependency: -// - GLM core -/////////////////////////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-11-19 +// Updated : 2008-11-19 +// Licence : This source is under MIT License +// File : glm/gtx/raw_data.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Dependency: +// - GLM core +/////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/include/gal/opengl/glm/gtx/reciprocal.hpp b/include/gal/opengl/glm/gtx/reciprocal.hpp index 26e6e98d21..26ba76ba58 100644 --- a/include/gal/opengl/glm/gtx/reciprocal.hpp +++ b/include/gal/opengl/glm/gtx/reciprocal.hpp @@ -1,26 +1,26 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/////////////////////////////////////////////////////////////////////////////////// - -#if(defined(GLM_MESSAGES)) -# pragma message("GLM: GLM_GTX_reciprocal extension is deprecated, include GLM_GTC_reciprocal instead") -#endif +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/////////////////////////////////////////////////////////////////////////////////// + +#if(defined(GLM_MESSAGES)) +# pragma message("GLM: GLM_GTX_reciprocal extension is deprecated, include GLM_GTC_reciprocal instead") +#endif diff --git a/include/gal/opengl/glm/gtx/rotate_vector.hpp b/include/gal/opengl/glm/gtx/rotate_vector.hpp index a04edd3ac6..7e87505b1c 100644 --- a/include/gal/opengl/glm/gtx/rotate_vector.hpp +++ b/include/gal/opengl/glm/gtx/rotate_vector.hpp @@ -1,132 +1,132 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_rotate_vector -/// @file glm/gtx/rotate_vector.hpp -/// @date 2006-11-02 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_transform (dependence) -/// -/// @defgroup gtx_rotate_vector GLM_GTX_rotate_vector -/// @ingroup gtx -/// -/// @brief Function to directly rotate a vector -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_rotate_vector -#define GLM_GTX_rotate_vector GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtx/transform.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_rotate_vector extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_rotate_vector - /// @{ - - //! Rotate a two dimensional vector. - //! From GLM_GTX_rotate_vector extension. - template - detail::tvec2 rotate( - detail::tvec2 const & v, - T const & angle); - - //! Rotate a three dimensional vector around an axis. - //! From GLM_GTX_rotate_vector extension. - template - detail::tvec3 rotate( - detail::tvec3 const & v, - T const & angle, - detail::tvec3 const & normal); - - //! Rotate a four dimensional vector around an axis. - //! From GLM_GTX_rotate_vector extension. - template - detail::tvec4 rotate( - detail::tvec4 const & v, - T const & angle, - detail::tvec3 const & normal); - - //! Rotate a three dimensional vector around the X axis. - //! From GLM_GTX_rotate_vector extension. - template - detail::tvec3 rotateX( - detail::tvec3 const & v, - T const & angle); - - //! Rotate a three dimensional vector around the Y axis. - //! From GLM_GTX_rotate_vector extension. - template - detail::tvec3 rotateY( - detail::tvec3 const & v, - T const & angle); - - //! Rotate a three dimensional vector around the Z axis. - //! From GLM_GTX_rotate_vector extension. - template - detail::tvec3 rotateZ( - detail::tvec3 const & v, - T const & angle); - - //! Rotate a four dimentionnals vector around the X axis. - //! From GLM_GTX_rotate_vector extension. - template - detail::tvec4 rotateX( - detail::tvec4 const & v, - T const & angle); - - //! Rotate a four dimensional vector around the X axis. - //! From GLM_GTX_rotate_vector extension. - template - detail::tvec4 rotateY( - detail::tvec4 const & v, - T const & angle); - - //! Rotate a four dimensional vector around the X axis. - //! From GLM_GTX_rotate_vector extension. - template - detail::tvec4 rotateZ( - detail::tvec4 const & v, - T const & angle); - - //! Build a rotation matrix from a normal and a up vector. - //! From GLM_GTX_rotate_vector extension. - template - detail::tmat4x4 orientation( - detail::tvec3 const & Normal, - detail::tvec3 const & Up); - - /// @} -}//namespace glm - -#include "rotate_vector.inl" - -#endif//GLM_GTX_rotate_vector +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_rotate_vector +/// @file glm/gtx/rotate_vector.hpp +/// @date 2006-11-02 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_transform (dependence) +/// +/// @defgroup gtx_rotate_vector GLM_GTX_rotate_vector +/// @ingroup gtx +/// +/// @brief Function to directly rotate a vector +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_rotate_vector +#define GLM_GTX_rotate_vector GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtx/transform.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_rotate_vector extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_rotate_vector + /// @{ + + //! Rotate a two dimensional vector. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec2 rotate( + detail::tvec2 const & v, + T const & angle); + + //! Rotate a three dimensional vector around an axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec3 rotate( + detail::tvec3 const & v, + T const & angle, + detail::tvec3 const & normal); + + //! Rotate a four dimensional vector around an axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec4 rotate( + detail::tvec4 const & v, + T const & angle, + detail::tvec3 const & normal); + + //! Rotate a three dimensional vector around the X axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec3 rotateX( + detail::tvec3 const & v, + T const & angle); + + //! Rotate a three dimensional vector around the Y axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec3 rotateY( + detail::tvec3 const & v, + T const & angle); + + //! Rotate a three dimensional vector around the Z axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec3 rotateZ( + detail::tvec3 const & v, + T const & angle); + + //! Rotate a four dimentionnals vector around the X axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec4 rotateX( + detail::tvec4 const & v, + T const & angle); + + //! Rotate a four dimensional vector around the X axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec4 rotateY( + detail::tvec4 const & v, + T const & angle); + + //! Rotate a four dimensional vector around the X axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec4 rotateZ( + detail::tvec4 const & v, + T const & angle); + + //! Build a rotation matrix from a normal and a up vector. + //! From GLM_GTX_rotate_vector extension. + template + detail::tmat4x4 orientation( + detail::tvec3 const & Normal, + detail::tvec3 const & Up); + + /// @} +}//namespace glm + +#include "rotate_vector.inl" + +#endif//GLM_GTX_rotate_vector diff --git a/include/gal/opengl/glm/gtx/rotate_vector.inl b/include/gal/opengl/glm/gtx/rotate_vector.inl index 2e0c1f5d00..2866200e00 100644 --- a/include/gal/opengl/glm/gtx/rotate_vector.inl +++ b/include/gal/opengl/glm/gtx/rotate_vector.inl @@ -1,211 +1,211 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2006-11-02 -// Updated : 2009-02-19 -// Licence : This source is under MIT License -// File : glm/gtx/rotate_vector.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER detail::tvec2 rotate - ( - detail::tvec2 const & v, - T const & angle - ) - { - detail::tvec2 Result; -#ifdef GLM_FORCE_RADIANS - T const Cos(cos(angle)); - T const Sin(sin(angle)); -#else - T const Cos = cos(radians(angle)); - T const Sin = sin(radians(angle)); -#endif - Result.x = v.x * Cos - v.y * Sin; - Result.y = v.x * Sin + v.y * Cos; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 rotate - ( - detail::tvec3 const & v, - T const & angle, - detail::tvec3 const & normal - ) - { - return detail::tmat3x3(glm::rotate(angle, normal)) * v; - } - /* - template - GLM_FUNC_QUALIFIER detail::tvec3 rotateGTX( - const detail::tvec3& x, - T angle, - const detail::tvec3& normal) - { - const T Cos = cos(radians(angle)); - const T Sin = sin(radians(angle)); - return x * Cos + ((x * normal) * (T(1) - Cos)) * normal + cross(x, normal) * Sin; - } - */ - template - GLM_FUNC_QUALIFIER detail::tvec4 rotate - ( - detail::tvec4 const & v, - T const & angle, - detail::tvec3 const & normal - ) - { - return rotate(angle, normal) * v; - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 rotateX - ( - detail::tvec3 const & v, - T const & angle - ) - { - detail::tvec3 Result(v); - -#ifdef GLM_FORCE_RADIANS - T const Cos(cos(angle)); - T const Sin(sin(angle)); -#else - T const Cos = cos(radians(angle)); - T const Sin = sin(radians(angle)); -#endif - - Result.y = v.y * Cos - v.z * Sin; - Result.z = v.y * Sin + v.z * Cos; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 rotateY - ( - detail::tvec3 const & v, - T const & angle - ) - { - detail::tvec3 Result = v; - -#ifdef GLM_FORCE_RADIANS - T const Cos(cos(angle)); - T const Sin(sin(angle)); -#else - T const Cos(cos(radians(angle))); - T const Sin(sin(radians(angle))); -#endif - - Result.x = v.x * Cos + v.z * Sin; - Result.z = -v.x * Sin + v.z * Cos; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 rotateZ - ( - detail::tvec3 const & v, - T const & angle - ) - { - detail::tvec3 Result = v; - -#ifdef GLM_FORCE_RADIANS - T const Cos(cos(angle)); - T const Sin(sin(angle)); -#else - T const Cos(cos(radians(angle))); - T const Sin(sin(radians(angle))); -#endif - - Result.x = v.x * Cos - v.y * Sin; - Result.y = v.x * Sin + v.y * Cos; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 rotateX - ( - detail::tvec4 const & v, - T const & angle - ) - { - detail::tvec4 Result = v; - -#ifdef GLM_FORCE_RADIANS - T const Cos(cos(angle)); - T const Sin(sin(angle)); -#else - T const Cos(cos(radians(angle))); - T const Sin(sin(radians(angle))); -#endif - - Result.y = v.y * Cos - v.z * Sin; - Result.z = v.y * Sin + v.z * Cos; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 rotateY - ( - detail::tvec4 const & v, - T const & angle - ) - { - detail::tvec4 Result = v; - -#ifdef GLM_FORCE_RADIANS - T const Cos(cos(angle)); - T const Sin(sin(angle)); -#else - T const Cos(cos(radians(angle))); - T const Sin(sin(radians(angle))); -#endif - - Result.x = v.x * Cos + v.z * Sin; - Result.z = -v.x * Sin + v.z * Cos; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 rotateZ - ( - detail::tvec4 const & v, - T const & angle - ) - { - detail::tvec4 Result = v; - -#ifdef GLM_FORCE_RADIANS - T const Cos(cos(angle)); - T const Sin(sin(angle)); -#else - T const Cos(cos(radians(angle))); - T const Sin(sin(radians(angle))); -#endif - - Result.x = v.x * Cos - v.y * Sin; - Result.y = v.x * Sin + v.y * Cos; - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 orientation - ( - detail::tvec3 const & Normal, - detail::tvec3 const & Up - ) - { - if(all(equal(Normal, Up))) - return detail::tmat4x4(T(1)); - - detail::tvec3 RotationAxis = cross(Up, Normal); - T Angle = degrees(acos(dot(Normal, Up))); - return rotate(Angle, RotationAxis); - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2006-11-02 +// Updated : 2009-02-19 +// Licence : This source is under MIT License +// File : glm/gtx/rotate_vector.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tvec2 rotate + ( + detail::tvec2 const & v, + T const & angle + ) + { + detail::tvec2 Result; +#ifdef GLM_FORCE_RADIANS + T const Cos(cos(angle)); + T const Sin(sin(angle)); +#else + T const Cos = cos(radians(angle)); + T const Sin = sin(radians(angle)); +#endif + Result.x = v.x * Cos - v.y * Sin; + Result.y = v.x * Sin + v.y * Cos; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 rotate + ( + detail::tvec3 const & v, + T const & angle, + detail::tvec3 const & normal + ) + { + return detail::tmat3x3(glm::rotate(angle, normal)) * v; + } + /* + template + GLM_FUNC_QUALIFIER detail::tvec3 rotateGTX( + const detail::tvec3& x, + T angle, + const detail::tvec3& normal) + { + const T Cos = cos(radians(angle)); + const T Sin = sin(radians(angle)); + return x * Cos + ((x * normal) * (T(1) - Cos)) * normal + cross(x, normal) * Sin; + } + */ + template + GLM_FUNC_QUALIFIER detail::tvec4 rotate + ( + detail::tvec4 const & v, + T const & angle, + detail::tvec3 const & normal + ) + { + return rotate(angle, normal) * v; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 rotateX + ( + detail::tvec3 const & v, + T const & angle + ) + { + detail::tvec3 Result(v); + +#ifdef GLM_FORCE_RADIANS + T const Cos(cos(angle)); + T const Sin(sin(angle)); +#else + T const Cos = cos(radians(angle)); + T const Sin = sin(radians(angle)); +#endif + + Result.y = v.y * Cos - v.z * Sin; + Result.z = v.y * Sin + v.z * Cos; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 rotateY + ( + detail::tvec3 const & v, + T const & angle + ) + { + detail::tvec3 Result = v; + +#ifdef GLM_FORCE_RADIANS + T const Cos(cos(angle)); + T const Sin(sin(angle)); +#else + T const Cos(cos(radians(angle))); + T const Sin(sin(radians(angle))); +#endif + + Result.x = v.x * Cos + v.z * Sin; + Result.z = -v.x * Sin + v.z * Cos; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 rotateZ + ( + detail::tvec3 const & v, + T const & angle + ) + { + detail::tvec3 Result = v; + +#ifdef GLM_FORCE_RADIANS + T const Cos(cos(angle)); + T const Sin(sin(angle)); +#else + T const Cos(cos(radians(angle))); + T const Sin(sin(radians(angle))); +#endif + + Result.x = v.x * Cos - v.y * Sin; + Result.y = v.x * Sin + v.y * Cos; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 rotateX + ( + detail::tvec4 const & v, + T const & angle + ) + { + detail::tvec4 Result = v; + +#ifdef GLM_FORCE_RADIANS + T const Cos(cos(angle)); + T const Sin(sin(angle)); +#else + T const Cos(cos(radians(angle))); + T const Sin(sin(radians(angle))); +#endif + + Result.y = v.y * Cos - v.z * Sin; + Result.z = v.y * Sin + v.z * Cos; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 rotateY + ( + detail::tvec4 const & v, + T const & angle + ) + { + detail::tvec4 Result = v; + +#ifdef GLM_FORCE_RADIANS + T const Cos(cos(angle)); + T const Sin(sin(angle)); +#else + T const Cos(cos(radians(angle))); + T const Sin(sin(radians(angle))); +#endif + + Result.x = v.x * Cos + v.z * Sin; + Result.z = -v.x * Sin + v.z * Cos; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 rotateZ + ( + detail::tvec4 const & v, + T const & angle + ) + { + detail::tvec4 Result = v; + +#ifdef GLM_FORCE_RADIANS + T const Cos(cos(angle)); + T const Sin(sin(angle)); +#else + T const Cos(cos(radians(angle))); + T const Sin(sin(radians(angle))); +#endif + + Result.x = v.x * Cos - v.y * Sin; + Result.y = v.x * Sin + v.y * Cos; + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 orientation + ( + detail::tvec3 const & Normal, + detail::tvec3 const & Up + ) + { + if(all(equal(Normal, Up))) + return detail::tmat4x4(T(1)); + + detail::tvec3 RotationAxis = cross(Up, Normal); + T Angle = degrees(acos(dot(Normal, Up))); + return rotate(Angle, RotationAxis); + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/simd_mat4.hpp b/include/gal/opengl/glm/gtx/simd_mat4.hpp index 952fb9160e..2a1b9ff4a4 100644 --- a/include/gal/opengl/glm/gtx/simd_mat4.hpp +++ b/include/gal/opengl/glm/gtx/simd_mat4.hpp @@ -1,206 +1,206 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_simd_vec4 -/// @file glm/gtx/simd_vec4.hpp -/// @date 2009-05-07 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_simd_mat4 GLM_GTX_simd_mat4 -/// @ingroup gtx -/// -/// @brief SIMD implementation of mat4 type. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_simd_mat4 -#define GLM_GTX_simd_mat4 GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(GLM_ARCH != GLM_ARCH_PURE) - -#if(GLM_ARCH & GLM_ARCH_SSE2) -# include "../core/intrinsic_matrix.hpp" -# include "../gtx/simd_vec4.hpp" -#else -# error "GLM: GLM_GTX_simd_mat4 requires compiler support of SSE2 through intrinsics" -#endif - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_simd_mat4 extension included") -#endif - -namespace glm{ -namespace detail -{ - /// 4x4 Matrix implemented using SIMD SEE intrinsics. - /// \ingroup gtx_simd_mat4 - GLM_ALIGNED_STRUCT(16) fmat4x4SIMD - { - enum ctor{null}; - - typedef float value_type; - typedef fvec4SIMD col_type; - typedef fvec4SIMD row_type; - typedef std::size_t size_type; - static size_type value_size(); - static size_type col_size(); - static size_type row_size(); - static bool is_matrix(); - - fvec4SIMD Data[4]; - - ////////////////////////////////////// - // Constructors - - fmat4x4SIMD(); - explicit fmat4x4SIMD(float const & s); - explicit fmat4x4SIMD( - float const & x0, float const & y0, float const & z0, float const & w0, - float const & x1, float const & y1, float const & z1, float const & w1, - float const & x2, float const & y2, float const & z2, float const & w2, - float const & x3, float const & y3, float const & z3, float const & w3); - explicit fmat4x4SIMD( - fvec4SIMD const & v0, - fvec4SIMD const & v1, - fvec4SIMD const & v2, - fvec4SIMD const & v3); - explicit fmat4x4SIMD( - tmat4x4 const & m); - explicit fmat4x4SIMD( - __m128 const in[4]); - - // Conversions - //template - //explicit tmat4x4(tmat4x4 const & m); - - //explicit tmat4x4(tmat2x2 const & x); - //explicit tmat4x4(tmat3x3 const & x); - //explicit tmat4x4(tmat2x3 const & x); - //explicit tmat4x4(tmat3x2 const & x); - //explicit tmat4x4(tmat2x4 const & x); - //explicit tmat4x4(tmat4x2 const & x); - //explicit tmat4x4(tmat3x4 const & x); - //explicit tmat4x4(tmat4x3 const & x); - - // Accesses - fvec4SIMD & operator[](size_type i); - fvec4SIMD const & operator[](size_type i) const; - - // Unary updatable operators - fmat4x4SIMD & operator= (fmat4x4SIMD const & m); - fmat4x4SIMD & operator+= (float const & s); - fmat4x4SIMD & operator+= (fmat4x4SIMD const & m); - fmat4x4SIMD & operator-= (float const & s); - fmat4x4SIMD & operator-= (fmat4x4SIMD const & m); - fmat4x4SIMD & operator*= (float const & s); - fmat4x4SIMD & operator*= (fmat4x4SIMD const & m); - fmat4x4SIMD & operator/= (float const & s); - fmat4x4SIMD & operator/= (fmat4x4SIMD const & m); - fmat4x4SIMD & operator++ (); - fmat4x4SIMD & operator-- (); - }; - - // Binary operators - fmat4x4SIMD operator+ (fmat4x4SIMD const & m, float const & s); - fmat4x4SIMD operator+ (float const & s, fmat4x4SIMD const & m); - fmat4x4SIMD operator+ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); - - fmat4x4SIMD operator- (fmat4x4SIMD const & m, float const & s); - fmat4x4SIMD operator- (float const & s, fmat4x4SIMD const & m); - fmat4x4SIMD operator- (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); - - fmat4x4SIMD operator* (fmat4x4SIMD const & m, float const & s); - fmat4x4SIMD operator* (float const & s, fmat4x4SIMD const & m); - - fvec4SIMD operator* (fmat4x4SIMD const & m, fvec4SIMD const & v); - fvec4SIMD operator* (fvec4SIMD const & v, fmat4x4SIMD const & m); - - fmat4x4SIMD operator* (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); - - fmat4x4SIMD operator/ (fmat4x4SIMD const & m, float const & s); - fmat4x4SIMD operator/ (float const & s, fmat4x4SIMD const & m); - - fvec4SIMD operator/ (fmat4x4SIMD const & m, fvec4SIMD const & v); - fvec4SIMD operator/ (fvec4SIMD const & v, fmat4x4SIMD const & m); - - fmat4x4SIMD operator/ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); - - // Unary constant operators - fmat4x4SIMD const operator- (fmat4x4SIMD const & m); - fmat4x4SIMD const operator-- (fmat4x4SIMD const & m, int); - fmat4x4SIMD const operator++ (fmat4x4SIMD const & m, int); -}//namespace detail - - typedef detail::fmat4x4SIMD simdMat4; - - /// @addtogroup gtx_simd_mat4 - /// @{ - - //! Convert a simdMat4 to a mat4. - //! (From GLM_GTX_simd_mat4 extension) - detail::tmat4x4 mat4_cast( - detail::fmat4x4SIMD const & x); - - //! Multiply matrix x by matrix y component-wise, i.e., - //! result[i][j] is the scalar product of x[i][j] and y[i][j]. - //! (From GLM_GTX_simd_mat4 extension). - detail::fmat4x4SIMD matrixCompMult( - detail::fmat4x4SIMD const & x, - detail::fmat4x4SIMD const & y); - - //! Treats the first parameter c as a column vector - //! and the second parameter r as a row vector - //! and does a linear algebraic matrix multiply c * r. - //! (From GLM_GTX_simd_mat4 extension). - detail::fmat4x4SIMD outerProduct( - detail::fvec4SIMD const & c, - detail::fvec4SIMD const & r); - - //! Returns the transposed matrix of x - //! (From GLM_GTX_simd_mat4 extension). - detail::fmat4x4SIMD transpose( - detail::fmat4x4SIMD const & x); - - //! Return the determinant of a mat4 matrix. - //! (From GLM_GTX_simd_mat4 extension). - float determinant( - detail::fmat4x4SIMD const & m); - - //! Return the inverse of a mat4 matrix. - //! (From GLM_GTX_simd_mat4 extension). - detail::fmat4x4SIMD inverse( - detail::fmat4x4SIMD const & m); - - /// @} -}// namespace glm - -#include "simd_mat4.inl" - -#endif//(GLM_ARCH != GLM_ARCH_PURE) - -#endif//GLM_GTX_simd_mat4 +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_simd_vec4 +/// @file glm/gtx/simd_vec4.hpp +/// @date 2009-05-07 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_simd_mat4 GLM_GTX_simd_mat4 +/// @ingroup gtx +/// +/// @brief SIMD implementation of mat4 type. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_simd_mat4 +#define GLM_GTX_simd_mat4 GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(GLM_ARCH != GLM_ARCH_PURE) + +#if(GLM_ARCH & GLM_ARCH_SSE2) +# include "../core/intrinsic_matrix.hpp" +# include "../gtx/simd_vec4.hpp" +#else +# error "GLM: GLM_GTX_simd_mat4 requires compiler support of SSE2 through intrinsics" +#endif + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_simd_mat4 extension included") +#endif + +namespace glm{ +namespace detail +{ + /// 4x4 Matrix implemented using SIMD SEE intrinsics. + /// \ingroup gtx_simd_mat4 + GLM_ALIGNED_STRUCT(16) fmat4x4SIMD + { + enum ctor{null}; + + typedef float value_type; + typedef fvec4SIMD col_type; + typedef fvec4SIMD row_type; + typedef std::size_t size_type; + static size_type value_size(); + static size_type col_size(); + static size_type row_size(); + static bool is_matrix(); + + fvec4SIMD Data[4]; + + ////////////////////////////////////// + // Constructors + + fmat4x4SIMD(); + explicit fmat4x4SIMD(float const & s); + explicit fmat4x4SIMD( + float const & x0, float const & y0, float const & z0, float const & w0, + float const & x1, float const & y1, float const & z1, float const & w1, + float const & x2, float const & y2, float const & z2, float const & w2, + float const & x3, float const & y3, float const & z3, float const & w3); + explicit fmat4x4SIMD( + fvec4SIMD const & v0, + fvec4SIMD const & v1, + fvec4SIMD const & v2, + fvec4SIMD const & v3); + explicit fmat4x4SIMD( + tmat4x4 const & m); + explicit fmat4x4SIMD( + __m128 const in[4]); + + // Conversions + //template + //explicit tmat4x4(tmat4x4 const & m); + + //explicit tmat4x4(tmat2x2 const & x); + //explicit tmat4x4(tmat3x3 const & x); + //explicit tmat4x4(tmat2x3 const & x); + //explicit tmat4x4(tmat3x2 const & x); + //explicit tmat4x4(tmat2x4 const & x); + //explicit tmat4x4(tmat4x2 const & x); + //explicit tmat4x4(tmat3x4 const & x); + //explicit tmat4x4(tmat4x3 const & x); + + // Accesses + fvec4SIMD & operator[](size_type i); + fvec4SIMD const & operator[](size_type i) const; + + // Unary updatable operators + fmat4x4SIMD & operator= (fmat4x4SIMD const & m); + fmat4x4SIMD & operator+= (float const & s); + fmat4x4SIMD & operator+= (fmat4x4SIMD const & m); + fmat4x4SIMD & operator-= (float const & s); + fmat4x4SIMD & operator-= (fmat4x4SIMD const & m); + fmat4x4SIMD & operator*= (float const & s); + fmat4x4SIMD & operator*= (fmat4x4SIMD const & m); + fmat4x4SIMD & operator/= (float const & s); + fmat4x4SIMD & operator/= (fmat4x4SIMD const & m); + fmat4x4SIMD & operator++ (); + fmat4x4SIMD & operator-- (); + }; + + // Binary operators + fmat4x4SIMD operator+ (fmat4x4SIMD const & m, float const & s); + fmat4x4SIMD operator+ (float const & s, fmat4x4SIMD const & m); + fmat4x4SIMD operator+ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); + + fmat4x4SIMD operator- (fmat4x4SIMD const & m, float const & s); + fmat4x4SIMD operator- (float const & s, fmat4x4SIMD const & m); + fmat4x4SIMD operator- (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); + + fmat4x4SIMD operator* (fmat4x4SIMD const & m, float const & s); + fmat4x4SIMD operator* (float const & s, fmat4x4SIMD const & m); + + fvec4SIMD operator* (fmat4x4SIMD const & m, fvec4SIMD const & v); + fvec4SIMD operator* (fvec4SIMD const & v, fmat4x4SIMD const & m); + + fmat4x4SIMD operator* (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); + + fmat4x4SIMD operator/ (fmat4x4SIMD const & m, float const & s); + fmat4x4SIMD operator/ (float const & s, fmat4x4SIMD const & m); + + fvec4SIMD operator/ (fmat4x4SIMD const & m, fvec4SIMD const & v); + fvec4SIMD operator/ (fvec4SIMD const & v, fmat4x4SIMD const & m); + + fmat4x4SIMD operator/ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); + + // Unary constant operators + fmat4x4SIMD const operator- (fmat4x4SIMD const & m); + fmat4x4SIMD const operator-- (fmat4x4SIMD const & m, int); + fmat4x4SIMD const operator++ (fmat4x4SIMD const & m, int); +}//namespace detail + + typedef detail::fmat4x4SIMD simdMat4; + + /// @addtogroup gtx_simd_mat4 + /// @{ + + //! Convert a simdMat4 to a mat4. + //! (From GLM_GTX_simd_mat4 extension) + detail::tmat4x4 mat4_cast( + detail::fmat4x4SIMD const & x); + + //! Multiply matrix x by matrix y component-wise, i.e., + //! result[i][j] is the scalar product of x[i][j] and y[i][j]. + //! (From GLM_GTX_simd_mat4 extension). + detail::fmat4x4SIMD matrixCompMult( + detail::fmat4x4SIMD const & x, + detail::fmat4x4SIMD const & y); + + //! Treats the first parameter c as a column vector + //! and the second parameter r as a row vector + //! and does a linear algebraic matrix multiply c * r. + //! (From GLM_GTX_simd_mat4 extension). + detail::fmat4x4SIMD outerProduct( + detail::fvec4SIMD const & c, + detail::fvec4SIMD const & r); + + //! Returns the transposed matrix of x + //! (From GLM_GTX_simd_mat4 extension). + detail::fmat4x4SIMD transpose( + detail::fmat4x4SIMD const & x); + + //! Return the determinant of a mat4 matrix. + //! (From GLM_GTX_simd_mat4 extension). + float determinant( + detail::fmat4x4SIMD const & m); + + //! Return the inverse of a mat4 matrix. + //! (From GLM_GTX_simd_mat4 extension). + detail::fmat4x4SIMD inverse( + detail::fmat4x4SIMD const & m); + + /// @} +}// namespace glm + +#include "simd_mat4.inl" + +#endif//(GLM_ARCH != GLM_ARCH_PURE) + +#endif//GLM_GTX_simd_mat4 diff --git a/include/gal/opengl/glm/gtx/simd_mat4.inl b/include/gal/opengl/glm/gtx/simd_mat4.inl index 83b1948456..d813aec62b 100644 --- a/include/gal/opengl/glm/gtx/simd_mat4.inl +++ b/include/gal/opengl/glm/gtx/simd_mat4.inl @@ -1,590 +1,590 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2009-05-19 -// Updated : 2009-05-19 -// Licence : This source is under MIT License -// File : glm/gtx/simd_mat4.hpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm{ -namespace detail{ - -GLM_FUNC_QUALIFIER fmat4x4SIMD::size_type fmat4x4SIMD::value_size() -{ - return sizeof(value_type); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD::size_type fmat4x4SIMD::col_size() -{ - return 4; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD::size_type fmat4x4SIMD::row_size() -{ - return 4; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD() -{ -#ifndef GLM_SIMD_ENABLE_DEFAULT_INIT - this->Data[0] = fvec4SIMD(1.0f, 0, 0, 0); - this->Data[1] = fvec4SIMD(0, 1.0f, 0, 0); - this->Data[2] = fvec4SIMD(0, 0, 1.0f, 0); - this->Data[3] = fvec4SIMD(0, 0, 0, 1.0f); -#endif -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD(float const & s) -{ - this->Data[0] = fvec4SIMD(s, 0, 0, 0); - this->Data[1] = fvec4SIMD(0, s, 0, 0); - this->Data[2] = fvec4SIMD(0, 0, s, 0); - this->Data[3] = fvec4SIMD(0, 0, 0, s); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD -( - float const & x0, float const & y0, float const & z0, float const & w0, - float const & x1, float const & y1, float const & z1, float const & w1, - float const & x2, float const & y2, float const & z2, float const & w2, - float const & x3, float const & y3, float const & z3, float const & w3 -) -{ - this->Data[0] = fvec4SIMD(x0, y0, z0, w0); - this->Data[1] = fvec4SIMD(x1, y1, z1, w1); - this->Data[2] = fvec4SIMD(x2, y2, z2, w2); - this->Data[3] = fvec4SIMD(x3, y3, z3, w3); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD -( - fvec4SIMD const & v0, - fvec4SIMD const & v1, - fvec4SIMD const & v2, - fvec4SIMD const & v3 -) -{ - this->Data[0] = v0; - this->Data[1] = v1; - this->Data[2] = v2; - this->Data[3] = v3; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD -( - tmat4x4 const & m -) -{ - this->Data[0] = fvec4SIMD(m[0]); - this->Data[1] = fvec4SIMD(m[1]); - this->Data[2] = fvec4SIMD(m[2]); - this->Data[3] = fvec4SIMD(m[3]); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD -( - __m128 const in[4] -) -{ - this->Data[0] = in[0]; - this->Data[1] = in[1]; - this->Data[2] = in[2]; - this->Data[3] = in[3]; -} - -////////////////////////////////////// -// Accesses - -GLM_FUNC_QUALIFIER fvec4SIMD & fmat4x4SIMD::operator[] -( - fmat4x4SIMD::size_type i -) -{ - assert( - //i >= fmat4x4SIMD::size_type(0) && - i < fmat4x4SIMD::col_size()); - - return this->Data[i]; -} - -GLM_FUNC_QUALIFIER fvec4SIMD const & fmat4x4SIMD::operator[] -( - fmat4x4SIMD::size_type i -) const -{ - assert( - //i >= fmat4x4SIMD::size_type(0) && - i < fmat4x4SIMD::col_size()); - - return this->Data[i]; -} - -////////////////////////////////////////////////////////////// -// mat4 operators - -GLM_FUNC_QUALIFIER fmat4x4SIMD& fmat4x4SIMD::operator= -( - fmat4x4SIMD const & m -) -{ - this->Data[0] = m[0]; - this->Data[1] = m[1]; - this->Data[2] = m[2]; - this->Data[3] = m[3]; - return *this; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator+= -( - fmat4x4SIMD const & m -) -{ - this->Data[0].Data = _mm_add_ps(this->Data[0].Data, m[0].Data); - this->Data[1].Data = _mm_add_ps(this->Data[1].Data, m[1].Data); - this->Data[2].Data = _mm_add_ps(this->Data[2].Data, m[2].Data); - this->Data[3].Data = _mm_add_ps(this->Data[3].Data, m[3].Data); - return *this; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-= -( - fmat4x4SIMD const & m -) -{ - this->Data[0].Data = _mm_sub_ps(this->Data[0].Data, m[0].Data); - this->Data[1].Data = _mm_sub_ps(this->Data[1].Data, m[1].Data); - this->Data[2].Data = _mm_sub_ps(this->Data[2].Data, m[2].Data); - this->Data[3].Data = _mm_sub_ps(this->Data[3].Data, m[3].Data); - - return *this; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator*= -( - fmat4x4SIMD const & m -) -{ - sse_mul_ps(&this->Data[0].Data, &m.Data[0].Data, &this->Data[0].Data); - return *this; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator/= -( - fmat4x4SIMD const & m -) -{ - __m128 Inv[4]; - sse_inverse_ps(&m.Data[0].Data, Inv); - sse_mul_ps(&this->Data[0].Data, Inv, &this->Data[0].Data); - return *this; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator+= -( - float const & s -) -{ - __m128 Operand = _mm_set_ps1(s); - this->Data[0].Data = _mm_add_ps(this->Data[0].Data, Operand); - this->Data[1].Data = _mm_add_ps(this->Data[1].Data, Operand); - this->Data[2].Data = _mm_add_ps(this->Data[2].Data, Operand); - this->Data[3].Data = _mm_add_ps(this->Data[3].Data, Operand); - return *this; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-= -( - float const & s -) -{ - __m128 Operand = _mm_set_ps1(s); - this->Data[0].Data = _mm_sub_ps(this->Data[0].Data, Operand); - this->Data[1].Data = _mm_sub_ps(this->Data[1].Data, Operand); - this->Data[2].Data = _mm_sub_ps(this->Data[2].Data, Operand); - this->Data[3].Data = _mm_sub_ps(this->Data[3].Data, Operand); - return *this; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator*= -( - float const & s -) -{ - __m128 Operand = _mm_set_ps1(s); - this->Data[0].Data = _mm_mul_ps(this->Data[0].Data, Operand); - this->Data[1].Data = _mm_mul_ps(this->Data[1].Data, Operand); - this->Data[2].Data = _mm_mul_ps(this->Data[2].Data, Operand); - this->Data[3].Data = _mm_mul_ps(this->Data[3].Data, Operand); - return *this; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator/= -( - float const & s -) -{ - __m128 Operand = _mm_div_ps(one, _mm_set_ps1(s)); - this->Data[0].Data = _mm_mul_ps(this->Data[0].Data, Operand); - this->Data[1].Data = _mm_mul_ps(this->Data[1].Data, Operand); - this->Data[2].Data = _mm_mul_ps(this->Data[2].Data, Operand); - this->Data[3].Data = _mm_mul_ps(this->Data[3].Data, Operand); - return *this; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator++ () -{ - this->Data[0].Data = _mm_add_ps(this->Data[0].Data, one); - this->Data[1].Data = _mm_add_ps(this->Data[1].Data, one); - this->Data[2].Data = _mm_add_ps(this->Data[2].Data, one); - this->Data[3].Data = _mm_add_ps(this->Data[3].Data, one); - return *this; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-- () -{ - this->Data[0].Data = _mm_sub_ps(this->Data[0].Data, one); - this->Data[1].Data = _mm_sub_ps(this->Data[1].Data, one); - this->Data[2].Data = _mm_sub_ps(this->Data[2].Data, one); - this->Data[3].Data = _mm_sub_ps(this->Data[3].Data, one); - return *this; -} - - -////////////////////////////////////////////////////////////// -// Binary operators - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator+ -( - const fmat4x4SIMD &m, - float const & s -) -{ - return detail::fmat4x4SIMD - ( - m[0] + s, - m[1] + s, - m[2] + s, - m[3] + s - ); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator+ -( - float const & s, - const fmat4x4SIMD &m -) -{ - return detail::fmat4x4SIMD - ( - m[0] + s, - m[1] + s, - m[2] + s, - m[3] + s - ); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator+ -( - const fmat4x4SIMD &m1, - const fmat4x4SIMD &m2 -) -{ - return detail::fmat4x4SIMD - ( - m1[0] + m2[0], - m1[1] + m2[1], - m1[2] + m2[2], - m1[3] + m2[3] - ); -} - - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator- -( - const fmat4x4SIMD &m, - float const & s -) -{ - return detail::fmat4x4SIMD - ( - m[0] - s, - m[1] - s, - m[2] - s, - m[3] - s - ); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator- -( - float const & s, - const fmat4x4SIMD &m -) -{ - return detail::fmat4x4SIMD - ( - s - m[0], - s - m[1], - s - m[2], - s - m[3] - ); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator- -( - const fmat4x4SIMD &m1, - const fmat4x4SIMD &m2 -) -{ - return detail::fmat4x4SIMD - ( - m1[0] - m2[0], - m1[1] - m2[1], - m1[2] - m2[2], - m1[3] - m2[3] - ); -} - - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator* -( - const fmat4x4SIMD &m, - float const & s -) -{ - return detail::fmat4x4SIMD - ( - m[0] * s, - m[1] * s, - m[2] * s, - m[3] * s - ); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator* -( - float const & s, - const fmat4x4SIMD &m -) -{ - return detail::fmat4x4SIMD - ( - m[0] * s, - m[1] * s, - m[2] * s, - m[3] * s - ); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator* -( - const fmat4x4SIMD &m, - fvec4SIMD const & v -) -{ - return sse_mul_ps(&m.Data[0].Data, v.Data); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator* -( - fvec4SIMD const & v, - const fmat4x4SIMD &m -) -{ - return sse_mul_ps(v.Data, &m.Data[0].Data); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator* -( - const fmat4x4SIMD &m1, - const fmat4x4SIMD &m2 -) -{ - fmat4x4SIMD result; - sse_mul_ps(&m1.Data[0].Data, &m2.Data[0].Data, &result.Data[0].Data); - - return result; -} - - - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator/ -( - const fmat4x4SIMD &m, - float const & s -) -{ - return detail::fmat4x4SIMD - ( - m[0] / s, - m[1] / s, - m[2] / s, - m[3] / s - ); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator/ -( - float const & s, - const fmat4x4SIMD &m -) -{ - return detail::fmat4x4SIMD - ( - s / m[0], - s / m[1], - s / m[2], - s / m[3] - ); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator/ -( - const fmat4x4SIMD &m, - fvec4SIMD const & v -) -{ - return inverse(m) * v; -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator/ -( - fvec4SIMD const & v, - const fmat4x4SIMD &m -) -{ - return v * inverse(m); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator/ -( - const fmat4x4SIMD &m1, - const fmat4x4SIMD &m2 -) -{ - __m128 result[4]; - __m128 inv[4]; - - sse_inverse_ps(&m2.Data[0].Data, inv); - sse_mul_ps(&m1.Data[0].Data, inv, result); - - return fmat4x4SIMD(result); -} - - -////////////////////////////////////////////////////////////// -// Unary constant operators -GLM_FUNC_QUALIFIER fmat4x4SIMD const operator- -( - fmat4x4SIMD const & m -) -{ - return detail::fmat4x4SIMD - ( - -m[0], - -m[1], - -m[2], - -m[3] - ); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD const operator-- -( - fmat4x4SIMD const & m, - int -) -{ - return detail::fmat4x4SIMD - ( - m[0] - 1.0f, - m[1] - 1.0f, - m[2] - 1.0f, - m[3] - 1.0f - ); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD const operator++ -( - fmat4x4SIMD const & m, - int -) -{ - return detail::fmat4x4SIMD - ( - m[0] + 1.0f, - m[1] + 1.0f, - m[2] + 1.0f, - m[3] + 1.0f - ); -} - -}//namespace detail - -GLM_FUNC_QUALIFIER detail::tmat4x4 mat4_cast -( - detail::fmat4x4SIMD const & x -) -{ - GLM_ALIGN(16) detail::tmat4x4 Result; - _mm_store_ps(&Result[0][0], x.Data[0].Data); - _mm_store_ps(&Result[1][0], x.Data[1].Data); - _mm_store_ps(&Result[2][0], x.Data[2].Data); - _mm_store_ps(&Result[3][0], x.Data[3].Data); - return Result; -} - -GLM_FUNC_QUALIFIER detail::fmat4x4SIMD matrixCompMult -( - detail::fmat4x4SIMD const & x, - detail::fmat4x4SIMD const & y -) -{ - detail::fmat4x4SIMD result; - result[0] = x[0] * y[0]; - result[1] = x[1] * y[1]; - result[2] = x[2] * y[2]; - result[3] = x[3] * y[3]; - return result; -} - -GLM_FUNC_QUALIFIER detail::fmat4x4SIMD outerProduct -( - detail::fvec4SIMD const & c, - detail::fvec4SIMD const & r -) -{ - __m128 Shu0 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(0, 0, 0, 0)); - __m128 Shu1 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(1, 1, 1, 1)); - __m128 Shu2 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(2, 2, 2, 2)); - __m128 Shu3 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(3, 3, 3, 3)); - - detail::fmat4x4SIMD result(detail::fmat4x4SIMD::null); - result[0].Data = _mm_mul_ps(c.Data, Shu0); - result[1].Data = _mm_mul_ps(c.Data, Shu1); - result[2].Data = _mm_mul_ps(c.Data, Shu2); - result[3].Data = _mm_mul_ps(c.Data, Shu3); - return result; -} - -GLM_FUNC_QUALIFIER detail::fmat4x4SIMD transpose(detail::fmat4x4SIMD const & m) -{ - detail::fmat4x4SIMD result; - detail::sse_transpose_ps(&m[0].Data, &result[0].Data); - return result; -} - -GLM_FUNC_QUALIFIER float determinant(detail::fmat4x4SIMD const & m) -{ - float Result; - _mm_store_ss(&Result, detail::sse_det_ps(&m[0].Data)); - return Result; -} - -GLM_FUNC_QUALIFIER detail::fmat4x4SIMD inverse(detail::fmat4x4SIMD const & m) -{ - detail::fmat4x4SIMD result; - detail::sse_inverse_ps(&m[0].Data, &result[0].Data); - return result; -} - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2009-05-19 +// Updated : 2009-05-19 +// Licence : This source is under MIT License +// File : glm/gtx/simd_mat4.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail{ + +GLM_FUNC_QUALIFIER fmat4x4SIMD::size_type fmat4x4SIMD::value_size() +{ + return sizeof(value_type); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD::size_type fmat4x4SIMD::col_size() +{ + return 4; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD::size_type fmat4x4SIMD::row_size() +{ + return 4; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD() +{ +#ifndef GLM_SIMD_ENABLE_DEFAULT_INIT + this->Data[0] = fvec4SIMD(1.0f, 0, 0, 0); + this->Data[1] = fvec4SIMD(0, 1.0f, 0, 0); + this->Data[2] = fvec4SIMD(0, 0, 1.0f, 0); + this->Data[3] = fvec4SIMD(0, 0, 0, 1.0f); +#endif +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD(float const & s) +{ + this->Data[0] = fvec4SIMD(s, 0, 0, 0); + this->Data[1] = fvec4SIMD(0, s, 0, 0); + this->Data[2] = fvec4SIMD(0, 0, s, 0); + this->Data[3] = fvec4SIMD(0, 0, 0, s); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD +( + float const & x0, float const & y0, float const & z0, float const & w0, + float const & x1, float const & y1, float const & z1, float const & w1, + float const & x2, float const & y2, float const & z2, float const & w2, + float const & x3, float const & y3, float const & z3, float const & w3 +) +{ + this->Data[0] = fvec4SIMD(x0, y0, z0, w0); + this->Data[1] = fvec4SIMD(x1, y1, z1, w1); + this->Data[2] = fvec4SIMD(x2, y2, z2, w2); + this->Data[3] = fvec4SIMD(x3, y3, z3, w3); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD +( + fvec4SIMD const & v0, + fvec4SIMD const & v1, + fvec4SIMD const & v2, + fvec4SIMD const & v3 +) +{ + this->Data[0] = v0; + this->Data[1] = v1; + this->Data[2] = v2; + this->Data[3] = v3; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD +( + tmat4x4 const & m +) +{ + this->Data[0] = fvec4SIMD(m[0]); + this->Data[1] = fvec4SIMD(m[1]); + this->Data[2] = fvec4SIMD(m[2]); + this->Data[3] = fvec4SIMD(m[3]); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD +( + __m128 const in[4] +) +{ + this->Data[0] = in[0]; + this->Data[1] = in[1]; + this->Data[2] = in[2]; + this->Data[3] = in[3]; +} + +////////////////////////////////////// +// Accesses + +GLM_FUNC_QUALIFIER fvec4SIMD & fmat4x4SIMD::operator[] +( + fmat4x4SIMD::size_type i +) +{ + assert( + //i >= fmat4x4SIMD::size_type(0) && + i < fmat4x4SIMD::col_size()); + + return this->Data[i]; +} + +GLM_FUNC_QUALIFIER fvec4SIMD const & fmat4x4SIMD::operator[] +( + fmat4x4SIMD::size_type i +) const +{ + assert( + //i >= fmat4x4SIMD::size_type(0) && + i < fmat4x4SIMD::col_size()); + + return this->Data[i]; +} + +////////////////////////////////////////////////////////////// +// mat4 operators + +GLM_FUNC_QUALIFIER fmat4x4SIMD& fmat4x4SIMD::operator= +( + fmat4x4SIMD const & m +) +{ + this->Data[0] = m[0]; + this->Data[1] = m[1]; + this->Data[2] = m[2]; + this->Data[3] = m[3]; + return *this; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator+= +( + fmat4x4SIMD const & m +) +{ + this->Data[0].Data = _mm_add_ps(this->Data[0].Data, m[0].Data); + this->Data[1].Data = _mm_add_ps(this->Data[1].Data, m[1].Data); + this->Data[2].Data = _mm_add_ps(this->Data[2].Data, m[2].Data); + this->Data[3].Data = _mm_add_ps(this->Data[3].Data, m[3].Data); + return *this; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-= +( + fmat4x4SIMD const & m +) +{ + this->Data[0].Data = _mm_sub_ps(this->Data[0].Data, m[0].Data); + this->Data[1].Data = _mm_sub_ps(this->Data[1].Data, m[1].Data); + this->Data[2].Data = _mm_sub_ps(this->Data[2].Data, m[2].Data); + this->Data[3].Data = _mm_sub_ps(this->Data[3].Data, m[3].Data); + + return *this; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator*= +( + fmat4x4SIMD const & m +) +{ + sse_mul_ps(&this->Data[0].Data, &m.Data[0].Data, &this->Data[0].Data); + return *this; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator/= +( + fmat4x4SIMD const & m +) +{ + __m128 Inv[4]; + sse_inverse_ps(&m.Data[0].Data, Inv); + sse_mul_ps(&this->Data[0].Data, Inv, &this->Data[0].Data); + return *this; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator+= +( + float const & s +) +{ + __m128 Operand = _mm_set_ps1(s); + this->Data[0].Data = _mm_add_ps(this->Data[0].Data, Operand); + this->Data[1].Data = _mm_add_ps(this->Data[1].Data, Operand); + this->Data[2].Data = _mm_add_ps(this->Data[2].Data, Operand); + this->Data[3].Data = _mm_add_ps(this->Data[3].Data, Operand); + return *this; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-= +( + float const & s +) +{ + __m128 Operand = _mm_set_ps1(s); + this->Data[0].Data = _mm_sub_ps(this->Data[0].Data, Operand); + this->Data[1].Data = _mm_sub_ps(this->Data[1].Data, Operand); + this->Data[2].Data = _mm_sub_ps(this->Data[2].Data, Operand); + this->Data[3].Data = _mm_sub_ps(this->Data[3].Data, Operand); + return *this; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator*= +( + float const & s +) +{ + __m128 Operand = _mm_set_ps1(s); + this->Data[0].Data = _mm_mul_ps(this->Data[0].Data, Operand); + this->Data[1].Data = _mm_mul_ps(this->Data[1].Data, Operand); + this->Data[2].Data = _mm_mul_ps(this->Data[2].Data, Operand); + this->Data[3].Data = _mm_mul_ps(this->Data[3].Data, Operand); + return *this; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator/= +( + float const & s +) +{ + __m128 Operand = _mm_div_ps(one, _mm_set_ps1(s)); + this->Data[0].Data = _mm_mul_ps(this->Data[0].Data, Operand); + this->Data[1].Data = _mm_mul_ps(this->Data[1].Data, Operand); + this->Data[2].Data = _mm_mul_ps(this->Data[2].Data, Operand); + this->Data[3].Data = _mm_mul_ps(this->Data[3].Data, Operand); + return *this; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator++ () +{ + this->Data[0].Data = _mm_add_ps(this->Data[0].Data, one); + this->Data[1].Data = _mm_add_ps(this->Data[1].Data, one); + this->Data[2].Data = _mm_add_ps(this->Data[2].Data, one); + this->Data[3].Data = _mm_add_ps(this->Data[3].Data, one); + return *this; +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-- () +{ + this->Data[0].Data = _mm_sub_ps(this->Data[0].Data, one); + this->Data[1].Data = _mm_sub_ps(this->Data[1].Data, one); + this->Data[2].Data = _mm_sub_ps(this->Data[2].Data, one); + this->Data[3].Data = _mm_sub_ps(this->Data[3].Data, one); + return *this; +} + + +////////////////////////////////////////////////////////////// +// Binary operators + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator+ +( + const fmat4x4SIMD &m, + float const & s +) +{ + return detail::fmat4x4SIMD + ( + m[0] + s, + m[1] + s, + m[2] + s, + m[3] + s + ); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator+ +( + float const & s, + const fmat4x4SIMD &m +) +{ + return detail::fmat4x4SIMD + ( + m[0] + s, + m[1] + s, + m[2] + s, + m[3] + s + ); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator+ +( + const fmat4x4SIMD &m1, + const fmat4x4SIMD &m2 +) +{ + return detail::fmat4x4SIMD + ( + m1[0] + m2[0], + m1[1] + m2[1], + m1[2] + m2[2], + m1[3] + m2[3] + ); +} + + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator- +( + const fmat4x4SIMD &m, + float const & s +) +{ + return detail::fmat4x4SIMD + ( + m[0] - s, + m[1] - s, + m[2] - s, + m[3] - s + ); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator- +( + float const & s, + const fmat4x4SIMD &m +) +{ + return detail::fmat4x4SIMD + ( + s - m[0], + s - m[1], + s - m[2], + s - m[3] + ); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator- +( + const fmat4x4SIMD &m1, + const fmat4x4SIMD &m2 +) +{ + return detail::fmat4x4SIMD + ( + m1[0] - m2[0], + m1[1] - m2[1], + m1[2] - m2[2], + m1[3] - m2[3] + ); +} + + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator* +( + const fmat4x4SIMD &m, + float const & s +) +{ + return detail::fmat4x4SIMD + ( + m[0] * s, + m[1] * s, + m[2] * s, + m[3] * s + ); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator* +( + float const & s, + const fmat4x4SIMD &m +) +{ + return detail::fmat4x4SIMD + ( + m[0] * s, + m[1] * s, + m[2] * s, + m[3] * s + ); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator* +( + const fmat4x4SIMD &m, + fvec4SIMD const & v +) +{ + return sse_mul_ps(&m.Data[0].Data, v.Data); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator* +( + fvec4SIMD const & v, + const fmat4x4SIMD &m +) +{ + return sse_mul_ps(v.Data, &m.Data[0].Data); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator* +( + const fmat4x4SIMD &m1, + const fmat4x4SIMD &m2 +) +{ + fmat4x4SIMD result; + sse_mul_ps(&m1.Data[0].Data, &m2.Data[0].Data, &result.Data[0].Data); + + return result; +} + + + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator/ +( + const fmat4x4SIMD &m, + float const & s +) +{ + return detail::fmat4x4SIMD + ( + m[0] / s, + m[1] / s, + m[2] / s, + m[3] / s + ); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator/ +( + float const & s, + const fmat4x4SIMD &m +) +{ + return detail::fmat4x4SIMD + ( + s / m[0], + s / m[1], + s / m[2], + s / m[3] + ); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator/ +( + const fmat4x4SIMD &m, + fvec4SIMD const & v +) +{ + return inverse(m) * v; +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator/ +( + fvec4SIMD const & v, + const fmat4x4SIMD &m +) +{ + return v * inverse(m); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD operator/ +( + const fmat4x4SIMD &m1, + const fmat4x4SIMD &m2 +) +{ + __m128 result[4]; + __m128 inv[4]; + + sse_inverse_ps(&m2.Data[0].Data, inv); + sse_mul_ps(&m1.Data[0].Data, inv, result); + + return fmat4x4SIMD(result); +} + + +////////////////////////////////////////////////////////////// +// Unary constant operators +GLM_FUNC_QUALIFIER fmat4x4SIMD const operator- +( + fmat4x4SIMD const & m +) +{ + return detail::fmat4x4SIMD + ( + -m[0], + -m[1], + -m[2], + -m[3] + ); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD const operator-- +( + fmat4x4SIMD const & m, + int +) +{ + return detail::fmat4x4SIMD + ( + m[0] - 1.0f, + m[1] - 1.0f, + m[2] - 1.0f, + m[3] - 1.0f + ); +} + +GLM_FUNC_QUALIFIER fmat4x4SIMD const operator++ +( + fmat4x4SIMD const & m, + int +) +{ + return detail::fmat4x4SIMD + ( + m[0] + 1.0f, + m[1] + 1.0f, + m[2] + 1.0f, + m[3] + 1.0f + ); +} + +}//namespace detail + +GLM_FUNC_QUALIFIER detail::tmat4x4 mat4_cast +( + detail::fmat4x4SIMD const & x +) +{ + GLM_ALIGN(16) detail::tmat4x4 Result; + _mm_store_ps(&Result[0][0], x.Data[0].Data); + _mm_store_ps(&Result[1][0], x.Data[1].Data); + _mm_store_ps(&Result[2][0], x.Data[2].Data); + _mm_store_ps(&Result[3][0], x.Data[3].Data); + return Result; +} + +GLM_FUNC_QUALIFIER detail::fmat4x4SIMD matrixCompMult +( + detail::fmat4x4SIMD const & x, + detail::fmat4x4SIMD const & y +) +{ + detail::fmat4x4SIMD result; + result[0] = x[0] * y[0]; + result[1] = x[1] * y[1]; + result[2] = x[2] * y[2]; + result[3] = x[3] * y[3]; + return result; +} + +GLM_FUNC_QUALIFIER detail::fmat4x4SIMD outerProduct +( + detail::fvec4SIMD const & c, + detail::fvec4SIMD const & r +) +{ + __m128 Shu0 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(0, 0, 0, 0)); + __m128 Shu1 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(1, 1, 1, 1)); + __m128 Shu2 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(2, 2, 2, 2)); + __m128 Shu3 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(3, 3, 3, 3)); + + detail::fmat4x4SIMD result(detail::fmat4x4SIMD::null); + result[0].Data = _mm_mul_ps(c.Data, Shu0); + result[1].Data = _mm_mul_ps(c.Data, Shu1); + result[2].Data = _mm_mul_ps(c.Data, Shu2); + result[3].Data = _mm_mul_ps(c.Data, Shu3); + return result; +} + +GLM_FUNC_QUALIFIER detail::fmat4x4SIMD transpose(detail::fmat4x4SIMD const & m) +{ + detail::fmat4x4SIMD result; + detail::sse_transpose_ps(&m[0].Data, &result[0].Data); + return result; +} + +GLM_FUNC_QUALIFIER float determinant(detail::fmat4x4SIMD const & m) +{ + float Result; + _mm_store_ss(&Result, detail::sse_det_ps(&m[0].Data)); + return Result; +} + +GLM_FUNC_QUALIFIER detail::fmat4x4SIMD inverse(detail::fmat4x4SIMD const & m) +{ + detail::fmat4x4SIMD result; + detail::sse_inverse_ps(&m[0].Data, &result[0].Data); + return result; +} + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/simd_vec4.hpp b/include/gal/opengl/glm/gtx/simd_vec4.hpp index 793eac8028..3e36cc918a 100644 --- a/include/gal/opengl/glm/gtx/simd_vec4.hpp +++ b/include/gal/opengl/glm/gtx/simd_vec4.hpp @@ -1,517 +1,517 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_simd_vec4 -/// @file glm/gtx/simd_vec4.hpp -/// @date 2009-05-07 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_simd_vec4 GLM_GTX_simd_vec4 -/// @ingroup gtx -/// -/// @brief SIMD implementation of vec4 type. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_simd_vec4 -#define GLM_GTX_simd_vec4 GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(GLM_ARCH != GLM_ARCH_PURE) - -#if(GLM_ARCH & GLM_ARCH_SSE2) -# include "../core/intrinsic_common.hpp" -# include "../core/intrinsic_geometric.hpp" -#else -# error "GLM: GLM_GTX_simd_vec4 requires compiler support of SSE2 through intrinsics" -#endif - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_simd_vec4 extension included") -#endif - - -// Warning silencer for nameless struct/union. -#if (GLM_COMPILER & GLM_COMPILER_VC) -# pragma warning(push) -# pragma warning(disable:4201) // warning C4201: nonstandard extension used : nameless struct/union -#endif - - -namespace glm{ -namespace detail -{ - /// 4-dimensional vector implemented using SIMD SEE intrinsics. - /// \ingroup gtx_simd_vec4 - GLM_ALIGNED_STRUCT(16) fvec4SIMD - { - enum ctor{null}; - typedef __m128 value_type; - typedef std::size_t size_type; - static size_type value_size(); - - typedef fvec4SIMD type; - typedef tvec4 bool_type; - -#ifdef GLM_SIMD_ENABLE_XYZW_UNION - union - { - __m128 Data; - struct {float x, y, z, w;}; - }; -#else - __m128 Data; -#endif - - ////////////////////////////////////// - // Implicit basic constructors - - fvec4SIMD(); - fvec4SIMD(__m128 const & Data); - fvec4SIMD(fvec4SIMD const & v); - - ////////////////////////////////////// - // Explicit basic constructors - - explicit fvec4SIMD( - ctor); - explicit fvec4SIMD( - float const & s); - explicit fvec4SIMD( - float const & x, - float const & y, - float const & z, - float const & w); - explicit fvec4SIMD( - tvec4 const & v); - - //////////////////////////////////////// - //// Convertion vector constructors - - fvec4SIMD(vec2 const & v, float const & s1, float const & s2); - fvec4SIMD(float const & s1, vec2 const & v, float const & s2); - fvec4SIMD(float const & s1, float const & s2, vec2 const & v); - fvec4SIMD(vec3 const & v, float const & s); - fvec4SIMD(float const & s, vec3 const & v); - fvec4SIMD(vec2 const & v1, vec2 const & v2); - //fvec4SIMD(ivec4SIMD const & v); - - ////////////////////////////////////// - // Unary arithmetic operators - - fvec4SIMD& operator= (fvec4SIMD const & v); - fvec4SIMD& operator+=(fvec4SIMD const & v); - fvec4SIMD& operator-=(fvec4SIMD const & v); - fvec4SIMD& operator*=(fvec4SIMD const & v); - fvec4SIMD& operator/=(fvec4SIMD const & v); - - fvec4SIMD& operator+=(float const & s); - fvec4SIMD& operator-=(float const & s); - fvec4SIMD& operator*=(float const & s); - fvec4SIMD& operator/=(float const & s); - - fvec4SIMD& operator++(); - fvec4SIMD& operator--(); - - ////////////////////////////////////// - // Swizzle operators - - template - fvec4SIMD& swizzle(); - template - fvec4SIMD swizzle() const; - template - fvec4SIMD swizzle() const; - template - fvec4SIMD swizzle() const; - template - fvec4SIMD swizzle() const; - }; -}//namespace detail - - typedef glm::detail::fvec4SIMD simdVec4; - - /// @addtogroup gtx_simd_vec4 - /// @{ - - //! Convert a simdVec4 to a vec4. - //! (From GLM_GTX_simd_vec4 extension) - detail::tvec4 vec4_cast( - detail::fvec4SIMD const & x); - - //! Returns x if x >= 0; otherwise, it returns -x. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD abs(detail::fvec4SIMD const & x); - - //! Returns 1.0 if x > 0, 0.0 if x = 0, or -1.0 if x < 0. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD sign(detail::fvec4SIMD const & x); - - //! Returns a value equal to the nearest integer that is less then or equal to x. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD floor(detail::fvec4SIMD const & x); - - //! Returns a value equal to the nearest integer to x - //! whose absolute value is not larger than the absolute value of x. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD trunc(detail::fvec4SIMD const & x); - - //! Returns a value equal to the nearest integer to x. - //! The fraction 0.5 will round in a direction chosen by the - //! implementation, presumably the direction that is fastest. - //! This includes the possibility that round(x) returns the - //! same value as roundEven(x) for all values of x. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD round(detail::fvec4SIMD const & x); - - //! Returns a value equal to the nearest integer to x. - //! A fractional part of 0.5 will round toward the nearest even - //! integer. (Both 3.5 and 4.5 for x will return 4.0.) - //! (From GLM_GTX_simd_vec4 extension, common function) - //detail::fvec4SIMD roundEven(detail::fvec4SIMD const & x); - - //! Returns a value equal to the nearest integer - //! that is greater than or equal to x. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD ceil(detail::fvec4SIMD const & x); - - //! Return x - floor(x). - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD fract(detail::fvec4SIMD const & x); - - //! Modulus. Returns x - y * floor(x / y) - //! for each component in x using the floating point value y. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD mod( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y); - - //! Modulus. Returns x - y * floor(x / y) - //! for each component in x using the floating point value y. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD mod( - detail::fvec4SIMD const & x, - float const & y); - - //! Returns the fractional part of x and sets i to the integer - //! part (as a whole number floating point value). Both the - //! return value and the output parameter will have the same - //! sign as x. - //! (From GLM_GTX_simd_vec4 extension, common function) - //detail::fvec4SIMD modf( - // detail::fvec4SIMD const & x, - // detail::fvec4SIMD & i); - - //! Returns y if y < x; otherwise, it returns x. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD min( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y); - - detail::fvec4SIMD min( - detail::fvec4SIMD const & x, - float const & y); - - //! Returns y if x < y; otherwise, it returns x. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD max( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y); - - detail::fvec4SIMD max( - detail::fvec4SIMD const & x, - float const & y); - - //! Returns min(max(x, minVal), maxVal) for each component in x - //! using the floating-point values minVal and maxVal. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD clamp( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & minVal, - detail::fvec4SIMD const & maxVal); - - detail::fvec4SIMD clamp( - detail::fvec4SIMD const & x, - float const & minVal, - float const & maxVal); - - //! \return If genTypeU is a floating scalar or vector: - //! Returns x * (1.0 - a) + y * a, i.e., the linear blend of - //! x and y using the floating-point value a. - //! The value for a is not restricted to the range [0, 1]. - //! - //! \return If genTypeU is a boolean scalar or vector: - //! Selects which vector each returned component comes - //! from. For a component of a that is false, the - //! corresponding component of x is returned. For a - //! component of a that is true, the corresponding - //! component of y is returned. Components of x and y that - //! are not selected are allowed to be invalid floating point - //! values and will have no effect on the results. Thus, this - //! provides different functionality than - //! genType mix(genType x, genType y, genType(a)) - //! where a is a Boolean vector. - //! - //! From GLSL 1.30.08 specification, section 8.3 - //! - //! \param[in] x Floating point scalar or vector. - //! \param[in] y Floating point scalar or vector. - //! \param[in] a Floating point or boolean scalar or vector. - //! - // \todo Test when 'a' is a boolean. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD mix( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y, - detail::fvec4SIMD const & a); - - //! Returns 0.0 if x < edge, otherwise it returns 1.0. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD step( - detail::fvec4SIMD const & edge, - detail::fvec4SIMD const & x); - - detail::fvec4SIMD step( - float const & edge, - detail::fvec4SIMD const & x); - - //! Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and - //! performs smooth Hermite interpolation between 0 and 1 - //! when edge0 < x < edge1. This is useful in cases where - //! you would want a threshold function with a smooth - //! transition. This is equivalent to: - //! genType t; - //! t = clamp ((x – edge0) / (edge1 – edge0), 0, 1); - //! return t * t * (3 – 2 * t); - //! Results are undefined if edge0 >= edge1. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD smoothstep( - detail::fvec4SIMD const & edge0, - detail::fvec4SIMD const & edge1, - detail::fvec4SIMD const & x); - - detail::fvec4SIMD smoothstep( - float const & edge0, - float const & edge1, - detail::fvec4SIMD const & x); - - //! Returns true if x holds a NaN (not a number) - //! representation in the underlying implementation's set of - //! floating point representations. Returns false otherwise, - //! including for implementations with no NaN - //! representations. - //! (From GLM_GTX_simd_vec4 extension, common function) - //bvec4 isnan(detail::fvec4SIMD const & x); - - //! Returns true if x holds a positive infinity or negative - //! infinity representation in the underlying implementation's - //! set of floating point representations. Returns false - //! otherwise, including for implementations with no infinity - //! representations. - //! (From GLM_GTX_simd_vec4 extension, common function) - //bvec4 isinf(detail::fvec4SIMD const & x); - - //! Returns a signed or unsigned integer value representing - //! the encoding of a floating-point value. The floatingpoint - //! value's bit-level representation is preserved. - //! (From GLM_GTX_simd_vec4 extension, common function) - //detail::ivec4SIMD floatBitsToInt(detail::fvec4SIMD const & value); - - //! Returns a floating-point value corresponding to a signed - //! or unsigned integer encoding of a floating-point value. - //! If an inf or NaN is passed in, it will not signal, and the - //! resulting floating point value is unspecified. Otherwise, - //! the bit-level representation is preserved. - //! (From GLM_GTX_simd_vec4 extension, common function) - //detail::fvec4SIMD intBitsToFloat(detail::ivec4SIMD const & value); - - //! Computes and returns a * b + c. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD fma( - detail::fvec4SIMD const & a, - detail::fvec4SIMD const & b, - detail::fvec4SIMD const & c); - - //! Splits x into a floating-point significand in the range - //! [0.5, 1.0) and an integral exponent of two, such that: - //! x = significand * exp(2, exponent) - //! The significand is returned by the function and the - //! exponent is returned in the parameter exp. For a - //! floating-point value of zero, the significant and exponent - //! are both zero. For a floating-point value that is an - //! infinity or is not a number, the results are undefined. - //! (From GLM_GTX_simd_vec4 extension, common function) - //detail::fvec4SIMD frexp(detail::fvec4SIMD const & x, detail::ivec4SIMD & exp); - - //! Builds a floating-point number from x and the - //! corresponding integral exponent of two in exp, returning: - //! significand * exp(2, exponent) - //! If this product is too large to be represented in the - //! floating-point type, the result is undefined. - //! (From GLM_GTX_simd_vec4 extension, common function) - //detail::fvec4SIMD ldexp(detail::fvec4SIMD const & x, detail::ivec4SIMD const & exp); - - //! Returns the length of x, i.e., sqrt(x * x). - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - float length( - detail::fvec4SIMD const & x); - - //! Returns the length of x, i.e., sqrt(x * x). - //! Less accurate but much faster than simdLength. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - float fastLength( - detail::fvec4SIMD const & x); - - //! Returns the length of x, i.e., sqrt(x * x). - //! Slightly more accurate but much slower than simdLength. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - float niceLength( - detail::fvec4SIMD const & x); - - //! Returns the length of x, i.e., sqrt(x * x). - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - detail::fvec4SIMD length4( - detail::fvec4SIMD const & x); - - //! Returns the length of x, i.e., sqrt(x * x). - //! Less accurate but much faster than simdLength4. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - detail::fvec4SIMD fastLength4( - detail::fvec4SIMD const & x); - - //! Returns the length of x, i.e., sqrt(x * x). - //! Slightly more accurate but much slower than simdLength4. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - detail::fvec4SIMD niceLength4( - detail::fvec4SIMD const & x); - - //! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - float distance( - detail::fvec4SIMD const & p0, - detail::fvec4SIMD const & p1); - - //! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - detail::fvec4SIMD distance4( - detail::fvec4SIMD const & p0, - detail::fvec4SIMD const & p1); - - //! Returns the dot product of x and y, i.e., result = x * y. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - float simdDot( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y); - - //! Returns the dot product of x and y, i.e., result = x * y. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - detail::fvec4SIMD dot4( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y); - - //! Returns the cross product of x and y. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - detail::fvec4SIMD cross( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y); - - //! Returns a vector in the same direction as x but with length of 1. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - detail::fvec4SIMD normalize( - detail::fvec4SIMD const & x); - - //! Returns a vector in the same direction as x but with length of 1. - //! Less accurate but much faster than simdNormalize. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - detail::fvec4SIMD fastNormalize( - detail::fvec4SIMD const & x); - - //! If dot(Nref, I) < 0.0, return N, otherwise, return -N. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - detail::fvec4SIMD simdFaceforward( - detail::fvec4SIMD const & N, - detail::fvec4SIMD const & I, - detail::fvec4SIMD const & Nref); - - //! For the incident vector I and surface orientation N, - //! returns the reflection direction : result = I - 2.0 * dot(N, I) * N. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - detail::fvec4SIMD reflect( - detail::fvec4SIMD const & I, - detail::fvec4SIMD const & N); - - //! For the incident vector I and surface normal N, - //! and the ratio of indices of refraction eta, - //! return the refraction vector. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - detail::fvec4SIMD refract( - detail::fvec4SIMD const & I, - detail::fvec4SIMD const & N, - float const & eta); - - //! Returns the positive square root of x. - //! (From GLM_GTX_simd_vec4 extension, exponential function) - detail::fvec4SIMD sqrt( - detail::fvec4SIMD const & x); - - //! Returns the positive square root of x with the nicest quality but very slow. - //! Slightly more accurate but much slower than simdSqrt. - //! (From GLM_GTX_simd_vec4 extension, exponential function) - detail::fvec4SIMD niceSqrt( - detail::fvec4SIMD const & x); - - //! Returns the positive square root of x - //! Less accurate but much faster than sqrt. - //! (From GLM_GTX_simd_vec4 extension, exponential function) - detail::fvec4SIMD fastSqrt( - detail::fvec4SIMD const & x); - - //! Returns the reciprocal of the positive square root of x. - //! (From GLM_GTX_simd_vec4 extension, exponential function) - detail::fvec4SIMD inversesqrt( - detail::fvec4SIMD const & x); - - //! Returns the reciprocal of the positive square root of x. - //! Faster than inversesqrt but less accurate. - //! (From GLM_GTX_simd_vec4 extension, exponential function) - detail::fvec4SIMD fastInversesqrt( - detail::fvec4SIMD const & x); - - /// @} -}//namespace glm - -#include "simd_vec4.inl" - - -#if (GLM_COMPILER & GLM_COMPILER_VC) -# pragma warning(pop) -#endif - - -#endif//(GLM_ARCH != GLM_ARCH_PURE) - -#endif//GLM_GTX_simd_vec4 +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_simd_vec4 +/// @file glm/gtx/simd_vec4.hpp +/// @date 2009-05-07 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_simd_vec4 GLM_GTX_simd_vec4 +/// @ingroup gtx +/// +/// @brief SIMD implementation of vec4 type. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_simd_vec4 +#define GLM_GTX_simd_vec4 GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(GLM_ARCH != GLM_ARCH_PURE) + +#if(GLM_ARCH & GLM_ARCH_SSE2) +# include "../core/intrinsic_common.hpp" +# include "../core/intrinsic_geometric.hpp" +#else +# error "GLM: GLM_GTX_simd_vec4 requires compiler support of SSE2 through intrinsics" +#endif + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_simd_vec4 extension included") +#endif + + +// Warning silencer for nameless struct/union. +#if (GLM_COMPILER & GLM_COMPILER_VC) +# pragma warning(push) +# pragma warning(disable:4201) // warning C4201: nonstandard extension used : nameless struct/union +#endif + + +namespace glm{ +namespace detail +{ + /// 4-dimensional vector implemented using SIMD SEE intrinsics. + /// \ingroup gtx_simd_vec4 + GLM_ALIGNED_STRUCT(16) fvec4SIMD + { + enum ctor{null}; + typedef __m128 value_type; + typedef std::size_t size_type; + static size_type value_size(); + + typedef fvec4SIMD type; + typedef tvec4 bool_type; + +#ifdef GLM_SIMD_ENABLE_XYZW_UNION + union + { + __m128 Data; + struct {float x, y, z, w;}; + }; +#else + __m128 Data; +#endif + + ////////////////////////////////////// + // Implicit basic constructors + + fvec4SIMD(); + fvec4SIMD(__m128 const & Data); + fvec4SIMD(fvec4SIMD const & v); + + ////////////////////////////////////// + // Explicit basic constructors + + explicit fvec4SIMD( + ctor); + explicit fvec4SIMD( + float const & s); + explicit fvec4SIMD( + float const & x, + float const & y, + float const & z, + float const & w); + explicit fvec4SIMD( + tvec4 const & v); + + //////////////////////////////////////// + //// Convertion vector constructors + + fvec4SIMD(vec2 const & v, float const & s1, float const & s2); + fvec4SIMD(float const & s1, vec2 const & v, float const & s2); + fvec4SIMD(float const & s1, float const & s2, vec2 const & v); + fvec4SIMD(vec3 const & v, float const & s); + fvec4SIMD(float const & s, vec3 const & v); + fvec4SIMD(vec2 const & v1, vec2 const & v2); + //fvec4SIMD(ivec4SIMD const & v); + + ////////////////////////////////////// + // Unary arithmetic operators + + fvec4SIMD& operator= (fvec4SIMD const & v); + fvec4SIMD& operator+=(fvec4SIMD const & v); + fvec4SIMD& operator-=(fvec4SIMD const & v); + fvec4SIMD& operator*=(fvec4SIMD const & v); + fvec4SIMD& operator/=(fvec4SIMD const & v); + + fvec4SIMD& operator+=(float const & s); + fvec4SIMD& operator-=(float const & s); + fvec4SIMD& operator*=(float const & s); + fvec4SIMD& operator/=(float const & s); + + fvec4SIMD& operator++(); + fvec4SIMD& operator--(); + + ////////////////////////////////////// + // Swizzle operators + + template + fvec4SIMD& swizzle(); + template + fvec4SIMD swizzle() const; + template + fvec4SIMD swizzle() const; + template + fvec4SIMD swizzle() const; + template + fvec4SIMD swizzle() const; + }; +}//namespace detail + + typedef glm::detail::fvec4SIMD simdVec4; + + /// @addtogroup gtx_simd_vec4 + /// @{ + + //! Convert a simdVec4 to a vec4. + //! (From GLM_GTX_simd_vec4 extension) + detail::tvec4 vec4_cast( + detail::fvec4SIMD const & x); + + //! Returns x if x >= 0; otherwise, it returns -x. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD abs(detail::fvec4SIMD const & x); + + //! Returns 1.0 if x > 0, 0.0 if x = 0, or -1.0 if x < 0. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD sign(detail::fvec4SIMD const & x); + + //! Returns a value equal to the nearest integer that is less then or equal to x. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD floor(detail::fvec4SIMD const & x); + + //! Returns a value equal to the nearest integer to x + //! whose absolute value is not larger than the absolute value of x. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD trunc(detail::fvec4SIMD const & x); + + //! Returns a value equal to the nearest integer to x. + //! The fraction 0.5 will round in a direction chosen by the + //! implementation, presumably the direction that is fastest. + //! This includes the possibility that round(x) returns the + //! same value as roundEven(x) for all values of x. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD round(detail::fvec4SIMD const & x); + + //! Returns a value equal to the nearest integer to x. + //! A fractional part of 0.5 will round toward the nearest even + //! integer. (Both 3.5 and 4.5 for x will return 4.0.) + //! (From GLM_GTX_simd_vec4 extension, common function) + //detail::fvec4SIMD roundEven(detail::fvec4SIMD const & x); + + //! Returns a value equal to the nearest integer + //! that is greater than or equal to x. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD ceil(detail::fvec4SIMD const & x); + + //! Return x - floor(x). + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD fract(detail::fvec4SIMD const & x); + + //! Modulus. Returns x - y * floor(x / y) + //! for each component in x using the floating point value y. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD mod( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y); + + //! Modulus. Returns x - y * floor(x / y) + //! for each component in x using the floating point value y. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD mod( + detail::fvec4SIMD const & x, + float const & y); + + //! Returns the fractional part of x and sets i to the integer + //! part (as a whole number floating point value). Both the + //! return value and the output parameter will have the same + //! sign as x. + //! (From GLM_GTX_simd_vec4 extension, common function) + //detail::fvec4SIMD modf( + // detail::fvec4SIMD const & x, + // detail::fvec4SIMD & i); + + //! Returns y if y < x; otherwise, it returns x. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD min( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y); + + detail::fvec4SIMD min( + detail::fvec4SIMD const & x, + float const & y); + + //! Returns y if x < y; otherwise, it returns x. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD max( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y); + + detail::fvec4SIMD max( + detail::fvec4SIMD const & x, + float const & y); + + //! Returns min(max(x, minVal), maxVal) for each component in x + //! using the floating-point values minVal and maxVal. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD clamp( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & minVal, + detail::fvec4SIMD const & maxVal); + + detail::fvec4SIMD clamp( + detail::fvec4SIMD const & x, + float const & minVal, + float const & maxVal); + + //! \return If genTypeU is a floating scalar or vector: + //! Returns x * (1.0 - a) + y * a, i.e., the linear blend of + //! x and y using the floating-point value a. + //! The value for a is not restricted to the range [0, 1]. + //! + //! \return If genTypeU is a boolean scalar or vector: + //! Selects which vector each returned component comes + //! from. For a component of a that is false, the + //! corresponding component of x is returned. For a + //! component of a that is true, the corresponding + //! component of y is returned. Components of x and y that + //! are not selected are allowed to be invalid floating point + //! values and will have no effect on the results. Thus, this + //! provides different functionality than + //! genType mix(genType x, genType y, genType(a)) + //! where a is a Boolean vector. + //! + //! From GLSL 1.30.08 specification, section 8.3 + //! + //! \param[in] x Floating point scalar or vector. + //! \param[in] y Floating point scalar or vector. + //! \param[in] a Floating point or boolean scalar or vector. + //! + // \todo Test when 'a' is a boolean. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD mix( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y, + detail::fvec4SIMD const & a); + + //! Returns 0.0 if x < edge, otherwise it returns 1.0. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD step( + detail::fvec4SIMD const & edge, + detail::fvec4SIMD const & x); + + detail::fvec4SIMD step( + float const & edge, + detail::fvec4SIMD const & x); + + //! Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and + //! performs smooth Hermite interpolation between 0 and 1 + //! when edge0 < x < edge1. This is useful in cases where + //! you would want a threshold function with a smooth + //! transition. This is equivalent to: + //! genType t; + //! t = clamp ((x – edge0) / (edge1 – edge0), 0, 1); + //! return t * t * (3 – 2 * t); + //! Results are undefined if edge0 >= edge1. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD smoothstep( + detail::fvec4SIMD const & edge0, + detail::fvec4SIMD const & edge1, + detail::fvec4SIMD const & x); + + detail::fvec4SIMD smoothstep( + float const & edge0, + float const & edge1, + detail::fvec4SIMD const & x); + + //! Returns true if x holds a NaN (not a number) + //! representation in the underlying implementation's set of + //! floating point representations. Returns false otherwise, + //! including for implementations with no NaN + //! representations. + //! (From GLM_GTX_simd_vec4 extension, common function) + //bvec4 isnan(detail::fvec4SIMD const & x); + + //! Returns true if x holds a positive infinity or negative + //! infinity representation in the underlying implementation's + //! set of floating point representations. Returns false + //! otherwise, including for implementations with no infinity + //! representations. + //! (From GLM_GTX_simd_vec4 extension, common function) + //bvec4 isinf(detail::fvec4SIMD const & x); + + //! Returns a signed or unsigned integer value representing + //! the encoding of a floating-point value. The floatingpoint + //! value's bit-level representation is preserved. + //! (From GLM_GTX_simd_vec4 extension, common function) + //detail::ivec4SIMD floatBitsToInt(detail::fvec4SIMD const & value); + + //! Returns a floating-point value corresponding to a signed + //! or unsigned integer encoding of a floating-point value. + //! If an inf or NaN is passed in, it will not signal, and the + //! resulting floating point value is unspecified. Otherwise, + //! the bit-level representation is preserved. + //! (From GLM_GTX_simd_vec4 extension, common function) + //detail::fvec4SIMD intBitsToFloat(detail::ivec4SIMD const & value); + + //! Computes and returns a * b + c. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD fma( + detail::fvec4SIMD const & a, + detail::fvec4SIMD const & b, + detail::fvec4SIMD const & c); + + //! Splits x into a floating-point significand in the range + //! [0.5, 1.0) and an integral exponent of two, such that: + //! x = significand * exp(2, exponent) + //! The significand is returned by the function and the + //! exponent is returned in the parameter exp. For a + //! floating-point value of zero, the significant and exponent + //! are both zero. For a floating-point value that is an + //! infinity or is not a number, the results are undefined. + //! (From GLM_GTX_simd_vec4 extension, common function) + //detail::fvec4SIMD frexp(detail::fvec4SIMD const & x, detail::ivec4SIMD & exp); + + //! Builds a floating-point number from x and the + //! corresponding integral exponent of two in exp, returning: + //! significand * exp(2, exponent) + //! If this product is too large to be represented in the + //! floating-point type, the result is undefined. + //! (From GLM_GTX_simd_vec4 extension, common function) + //detail::fvec4SIMD ldexp(detail::fvec4SIMD const & x, detail::ivec4SIMD const & exp); + + //! Returns the length of x, i.e., sqrt(x * x). + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + float length( + detail::fvec4SIMD const & x); + + //! Returns the length of x, i.e., sqrt(x * x). + //! Less accurate but much faster than simdLength. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + float fastLength( + detail::fvec4SIMD const & x); + + //! Returns the length of x, i.e., sqrt(x * x). + //! Slightly more accurate but much slower than simdLength. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + float niceLength( + detail::fvec4SIMD const & x); + + //! Returns the length of x, i.e., sqrt(x * x). + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD length4( + detail::fvec4SIMD const & x); + + //! Returns the length of x, i.e., sqrt(x * x). + //! Less accurate but much faster than simdLength4. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD fastLength4( + detail::fvec4SIMD const & x); + + //! Returns the length of x, i.e., sqrt(x * x). + //! Slightly more accurate but much slower than simdLength4. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD niceLength4( + detail::fvec4SIMD const & x); + + //! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + float distance( + detail::fvec4SIMD const & p0, + detail::fvec4SIMD const & p1); + + //! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD distance4( + detail::fvec4SIMD const & p0, + detail::fvec4SIMD const & p1); + + //! Returns the dot product of x and y, i.e., result = x * y. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + float simdDot( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y); + + //! Returns the dot product of x and y, i.e., result = x * y. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD dot4( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y); + + //! Returns the cross product of x and y. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD cross( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y); + + //! Returns a vector in the same direction as x but with length of 1. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD normalize( + detail::fvec4SIMD const & x); + + //! Returns a vector in the same direction as x but with length of 1. + //! Less accurate but much faster than simdNormalize. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD fastNormalize( + detail::fvec4SIMD const & x); + + //! If dot(Nref, I) < 0.0, return N, otherwise, return -N. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD simdFaceforward( + detail::fvec4SIMD const & N, + detail::fvec4SIMD const & I, + detail::fvec4SIMD const & Nref); + + //! For the incident vector I and surface orientation N, + //! returns the reflection direction : result = I - 2.0 * dot(N, I) * N. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD reflect( + detail::fvec4SIMD const & I, + detail::fvec4SIMD const & N); + + //! For the incident vector I and surface normal N, + //! and the ratio of indices of refraction eta, + //! return the refraction vector. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD refract( + detail::fvec4SIMD const & I, + detail::fvec4SIMD const & N, + float const & eta); + + //! Returns the positive square root of x. + //! (From GLM_GTX_simd_vec4 extension, exponential function) + detail::fvec4SIMD sqrt( + detail::fvec4SIMD const & x); + + //! Returns the positive square root of x with the nicest quality but very slow. + //! Slightly more accurate but much slower than simdSqrt. + //! (From GLM_GTX_simd_vec4 extension, exponential function) + detail::fvec4SIMD niceSqrt( + detail::fvec4SIMD const & x); + + //! Returns the positive square root of x + //! Less accurate but much faster than sqrt. + //! (From GLM_GTX_simd_vec4 extension, exponential function) + detail::fvec4SIMD fastSqrt( + detail::fvec4SIMD const & x); + + //! Returns the reciprocal of the positive square root of x. + //! (From GLM_GTX_simd_vec4 extension, exponential function) + detail::fvec4SIMD inversesqrt( + detail::fvec4SIMD const & x); + + //! Returns the reciprocal of the positive square root of x. + //! Faster than inversesqrt but less accurate. + //! (From GLM_GTX_simd_vec4 extension, exponential function) + detail::fvec4SIMD fastInversesqrt( + detail::fvec4SIMD const & x); + + /// @} +}//namespace glm + +#include "simd_vec4.inl" + + +#if (GLM_COMPILER & GLM_COMPILER_VC) +# pragma warning(pop) +#endif + + +#endif//(GLM_ARCH != GLM_ARCH_PURE) + +#endif//GLM_GTX_simd_vec4 diff --git a/include/gal/opengl/glm/gtx/simd_vec4.inl b/include/gal/opengl/glm/gtx/simd_vec4.inl index 3043417852..005aa7dd1f 100644 --- a/include/gal/opengl/glm/gtx/simd_vec4.inl +++ b/include/gal/opengl/glm/gtx/simd_vec4.inl @@ -1,727 +1,727 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2009-05-07 -// Updated : 2009-05-07 -// Licence : This source is under MIT License -// File : glm/gtx/simd_vec4.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm{ -namespace detail{ - -template -struct mask -{ - enum{value = Value}; -}; - -////////////////////////////////////// -// Implicit basic constructors - -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD() -#ifdef GLM_SIMD_ENABLE_DEFAULT_INIT - : Data(_mm_set_ps(0.0f, 0.0f, 0.0f, 0.0f)) -#endif -{} - -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(__m128 const & Data) : - Data(Data) -{} - -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(fvec4SIMD const & v) : - Data(v.Data) -{} - -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(tvec4 const & v) : - Data(_mm_set_ps(v.w, v.z, v.y, v.x)) -{} - -////////////////////////////////////// -// Explicit basic constructors - -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s) : - Data(_mm_set1_ps(s)) -{} - -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & x, float const & y, float const & z, float const & w) : -// Data(_mm_setr_ps(x, y, z, w)) - Data(_mm_set_ps(w, z, y, x)) -{} -/* -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const v[4]) : - Data(_mm_load_ps(v)) -{} -*/ -////////////////////////////////////// -// Swizzle constructors - -//fvec4SIMD(ref4 const & r); - -////////////////////////////////////// -// Convertion vector constructors - -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec2 const & v, float const & s1, float const & s2) : - Data(_mm_set_ps(s2, s1, v.y, v.x)) -{} - -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s1, vec2 const & v, float const & s2) : - Data(_mm_set_ps(s2, v.y, v.x, s1)) -{} - -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s1, float const & s2, vec2 const & v) : - Data(_mm_set_ps(v.y, v.x, s2, s1)) -{} - -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec3 const & v, float const & s) : - Data(_mm_set_ps(s, v.z, v.y, v.x)) -{} - -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s, vec3 const & v) : - Data(_mm_set_ps(v.z, v.y, v.x, s)) -{} - -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec2 const & v1, vec2 const & v2) : - Data(_mm_set_ps(v2.y, v2.x, v1.y, v1.x)) -{} - -//GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(ivec4SIMD const & v) : -// Data(_mm_cvtepi32_ps(v.Data)) -//{} - -////////////////////////////////////// -// Unary arithmetic operators - -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator=(fvec4SIMD const & v) -{ - this->Data = v.Data; - return *this; -} - -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator+=(float const & s) -{ - this->Data = _mm_add_ps(Data, _mm_set_ps1(s)); - return *this; -} - -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator+=(fvec4SIMD const & v) -{ - this->Data = _mm_add_ps(this->Data , v.Data); - return *this; -} - -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator-=(float const & s) -{ - this->Data = _mm_sub_ps(Data, _mm_set_ps1(s)); - return *this; -} - -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator-=(fvec4SIMD const & v) -{ - this->Data = _mm_sub_ps(this->Data , v.Data); - return *this; -} - -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator*=(float const & s) -{ - this->Data = _mm_mul_ps(this->Data, _mm_set_ps1(s)); - return *this; -} - -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator*=(fvec4SIMD const & v) -{ - this->Data = _mm_mul_ps(this->Data , v.Data); - return *this; -} - -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator/=(float const & s) -{ - this->Data = _mm_div_ps(Data, _mm_set1_ps(s)); - return *this; -} - -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator/=(fvec4SIMD const & v) -{ - this->Data = _mm_div_ps(this->Data , v.Data); - return *this; -} - -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator++() -{ - this->Data = _mm_add_ps(this->Data , glm::detail::one); - return *this; -} - -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator--() -{ - this->Data = _mm_sub_ps(this->Data, glm::detail::one); - return *this; -} - -////////////////////////////////////// -// Swizzle operators - -template -GLM_FUNC_QUALIFIER fvec4SIMD fvec4SIMD::swizzle() const -{ - __m128 Data = _mm_shuffle_ps( - this->Data, this->Data, - mask<(W << 6) | (Z << 4) | (Y << 2) | (X << 0)>::value); - return fvec4SIMD(Data); -} - -template -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::swizzle() -{ - this->Data = _mm_shuffle_ps( - this->Data, this->Data, - mask<(W << 6) | (Z << 4) | (Y << 2) | (X << 0)>::value); - return *this; -} - -// operator+ -GLM_FUNC_QUALIFIER fvec4SIMD operator+ (fvec4SIMD const & v, float s) -{ - return fvec4SIMD(_mm_add_ps(v.Data, _mm_set1_ps(s))); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator+ (float s, fvec4SIMD const & v) -{ - return fvec4SIMD(_mm_add_ps(_mm_set1_ps(s), v.Data)); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator+ (fvec4SIMD const & v1, fvec4SIMD const & v2) -{ - return fvec4SIMD(_mm_add_ps(v1.Data, v2.Data)); -} - -//operator- -GLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v, float s) -{ - return fvec4SIMD(_mm_sub_ps(v.Data, _mm_set1_ps(s))); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator- (float s, fvec4SIMD const & v) -{ - return fvec4SIMD(_mm_sub_ps(_mm_set1_ps(s), v.Data)); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v1, fvec4SIMD const & v2) -{ - return fvec4SIMD(_mm_sub_ps(v1.Data, v2.Data)); -} - -//operator* -GLM_FUNC_QUALIFIER fvec4SIMD operator* (fvec4SIMD const & v, float s) -{ - __m128 par0 = v.Data; - __m128 par1 = _mm_set1_ps(s); - return fvec4SIMD(_mm_mul_ps(par0, par1)); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator* (float s, fvec4SIMD const & v) -{ - __m128 par0 = _mm_set1_ps(s); - __m128 par1 = v.Data; - return fvec4SIMD(_mm_mul_ps(par0, par1)); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator* (fvec4SIMD const & v1, fvec4SIMD const & v2) -{ - return fvec4SIMD(_mm_mul_ps(v1.Data, v2.Data)); -} - -//operator/ -GLM_FUNC_QUALIFIER fvec4SIMD operator/ (fvec4SIMD const & v, float s) -{ - __m128 par0 = v.Data; - __m128 par1 = _mm_set1_ps(s); - return fvec4SIMD(_mm_div_ps(par0, par1)); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator/ (float s, fvec4SIMD const & v) -{ - __m128 par0 = _mm_set1_ps(s); - __m128 par1 = v.Data; - return fvec4SIMD(_mm_div_ps(par0, par1)); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator/ (fvec4SIMD const & v1, fvec4SIMD const & v2) -{ - return fvec4SIMD(_mm_div_ps(v1.Data, v2.Data)); -} - -// Unary constant operators -GLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v) -{ - return fvec4SIMD(_mm_sub_ps(_mm_setzero_ps(), v.Data)); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator++ (fvec4SIMD const & v, int) -{ - return fvec4SIMD(_mm_add_ps(v.Data, glm::detail::one)); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator-- (fvec4SIMD const & v, int) -{ - return fvec4SIMD(_mm_sub_ps(v.Data, glm::detail::one)); -} - -}//namespace detail - -GLM_FUNC_QUALIFIER detail::tvec4 vec4_cast -( - detail::fvec4SIMD const & x -) -{ - GLM_ALIGN(16) detail::tvec4 Result; - _mm_store_ps(&Result[0], x.Data); - return Result; -} - -// Other possible implementation -//float abs(float a) -//{ -// return max(-a, a); -//} -GLM_FUNC_QUALIFIER detail::fvec4SIMD abs -( - detail::fvec4SIMD const & x -) -{ - return detail::sse_abs_ps(x.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD sign -( - detail::fvec4SIMD const & x -) -{ - return detail::sse_sgn_ps(x.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD floor -( - detail::fvec4SIMD const & x -) -{ - return detail::sse_flr_ps(x.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD trunc -( - detail::fvec4SIMD const & x -) -{ - //return x < 0 ? -floor(-x) : floor(x); - - __m128 Flr0 = detail::sse_flr_ps(_mm_sub_ps(_mm_setzero_ps(), x.Data)); - __m128 Sub0 = _mm_sub_ps(Flr0, x.Data); - __m128 Flr1 = detail::sse_flr_ps(x.Data); - - __m128 Cmp0 = _mm_cmplt_ps(x.Data, glm::detail::zero); - __m128 Cmp1 = _mm_cmpnlt_ps(x.Data, glm::detail::zero); - - __m128 And0 = _mm_and_ps(Sub0, Cmp0); - __m128 And1 = _mm_and_ps(Flr1, Cmp1); - - return _mm_or_ps(And0, And1); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD round -( - detail::fvec4SIMD const & x -) -{ - return detail::sse_rnd_ps(x.Data); -} - -//GLM_FUNC_QUALIFIER detail::fvec4SIMD roundEven -//( -// detail::fvec4SIMD const & x -//) -//{ - -//} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD ceil -( - detail::fvec4SIMD const & x -) -{ - return detail::sse_ceil_ps(x.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD fract -( - detail::fvec4SIMD const & x -) -{ - return detail::sse_frc_ps(x.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD mod -( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y -) -{ - return detail::sse_mod_ps(x.Data, y.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD mod -( - detail::fvec4SIMD const & x, - float const & y -) -{ - return detail::sse_mod_ps(x.Data, _mm_set1_ps(y)); -} - -//GLM_FUNC_QUALIFIER detail::fvec4SIMD modf -//( -// detail::fvec4SIMD const & x, -// detail::fvec4SIMD & i -//) -//{ - -//} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD min -( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y -) -{ - return _mm_min_ps(x.Data, y.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD min -( - detail::fvec4SIMD const & x, - float const & y -) -{ - return _mm_min_ps(x.Data, _mm_set1_ps(y)); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD max -( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y -) -{ - return _mm_max_ps(x.Data, y.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD max -( - detail::fvec4SIMD const & x, - float const & y -) -{ - return _mm_max_ps(x.Data, _mm_set1_ps(y)); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD clamp -( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & minVal, - detail::fvec4SIMD const & maxVal -) -{ - return detail::sse_clp_ps(x.Data, minVal.Data, maxVal.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD clamp -( - detail::fvec4SIMD const & x, - float const & minVal, - float const & maxVal -) -{ - return detail::sse_clp_ps(x.Data, _mm_set1_ps(minVal), _mm_set1_ps(maxVal)); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD mix -( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y, - detail::fvec4SIMD const & a -) -{ - __m128 Sub0 = _mm_sub_ps(y.Data, x.Data); - __m128 Mul0 = _mm_mul_ps(a.Data, Sub0); - return _mm_mul_ps(x.Data, Mul0); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD step -( - detail::fvec4SIMD const & edge, - detail::fvec4SIMD const & x -) -{ - __m128 cmp0 = _mm_cmpngt_ps(x.Data, edge.Data); - return _mm_max_ps(_mm_min_ps(cmp0, _mm_setzero_ps()), detail::one); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD step -( - float const & edge, - detail::fvec4SIMD const & x -) -{ - __m128 cmp0 = _mm_cmpngt_ps(x.Data, _mm_set1_ps(edge)); - return _mm_max_ps(_mm_min_ps(cmp0, _mm_setzero_ps()), detail::one); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD smoothstep -( - detail::fvec4SIMD const & edge0, - detail::fvec4SIMD const & edge1, - detail::fvec4SIMD const & x -) -{ - return detail::sse_ssp_ps(edge0.Data, edge1.Data, x.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD smoothstep -( - float const & edge0, - float const & edge1, - detail::fvec4SIMD const & x -) -{ - return detail::sse_ssp_ps(_mm_set1_ps(edge0), _mm_set1_ps(edge1), x.Data); -} - -//GLM_FUNC_QUALIFIER bvec4 isnan(detail::fvec4SIMD const & x) -//{ - -//} - -//GLM_FUNC_QUALIFIER bvec4 isinf(detail::fvec4SIMD const & x) -//{ - -//} - -//GLM_FUNC_QUALIFIER detail::ivec4SIMD floatBitsToInt -//( -// detail::fvec4SIMD const & value -//) -//{ - -//} - -//GLM_FUNC_QUALIFIER detail::fvec4SIMD intBitsToFloat -//( -// detail::ivec4SIMD const & value -//) -//{ - -//} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD fma -( - detail::fvec4SIMD const & a, - detail::fvec4SIMD const & b, - detail::fvec4SIMD const & c -) -{ - return _mm_add_ps(_mm_mul_ps(a.Data, b.Data), c.Data); -} - -GLM_FUNC_QUALIFIER float length -( - detail::fvec4SIMD const & x -) -{ - detail::fvec4SIMD dot0 = detail::sse_dot_ss(x.Data, x.Data); - detail::fvec4SIMD sqt0 = sqrt(dot0); - float Result = 0; - _mm_store_ss(&Result, sqt0.Data); - return Result; -} - -GLM_FUNC_QUALIFIER float fastLength -( - detail::fvec4SIMD const & x -) -{ - detail::fvec4SIMD dot0 = detail::sse_dot_ss(x.Data, x.Data); - detail::fvec4SIMD sqt0 = fastSqrt(dot0); - float Result = 0; - _mm_store_ss(&Result, sqt0.Data); - return Result; -} - -GLM_FUNC_QUALIFIER float niceLength -( - detail::fvec4SIMD const & x -) -{ - detail::fvec4SIMD dot0 = detail::sse_dot_ss(x.Data, x.Data); - detail::fvec4SIMD sqt0 = niceSqrt(dot0); - float Result = 0; - _mm_store_ss(&Result, sqt0.Data); - return Result; -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD length4 -( - detail::fvec4SIMD const & x -) -{ - return sqrt(dot4(x, x)); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD fastLength4 -( - detail::fvec4SIMD const & x -) -{ - return fastSqrt(dot4(x, x)); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD niceLength4 -( - detail::fvec4SIMD const & x -) -{ - return niceSqrt(dot4(x, x)); -} - -GLM_FUNC_QUALIFIER float distance -( - detail::fvec4SIMD const & p0, - detail::fvec4SIMD const & p1 -) -{ - float Result = 0; - _mm_store_ss(&Result, detail::sse_dst_ps(p0.Data, p1.Data)); - return Result; -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD distance4 -( - detail::fvec4SIMD const & p0, - detail::fvec4SIMD const & p1 -) -{ - return detail::sse_dst_ps(p0.Data, p1.Data); -} - -GLM_FUNC_QUALIFIER float dot -( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y -) -{ - float Result = 0; - _mm_store_ss(&Result, detail::sse_dot_ss(x.Data, y.Data)); - return Result; -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD dot4 -( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y -) -{ - return detail::sse_dot_ps(x.Data, y.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD cross -( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y -) -{ - return detail::sse_xpd_ps(x.Data, y.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD normalize -( - detail::fvec4SIMD const & x -) -{ - __m128 dot0 = detail::sse_dot_ps(x.Data, x.Data); - __m128 isr0 = inversesqrt(detail::fvec4SIMD(dot0)).Data; - __m128 mul0 = _mm_mul_ps(x.Data, isr0); - return mul0; -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD fastNormalize -( - detail::fvec4SIMD const & x -) -{ - __m128 dot0 = detail::sse_dot_ps(x.Data, x.Data); - __m128 isr0 = fastInversesqrt(dot0).Data; - __m128 mul0 = _mm_mul_ps(x.Data, isr0); - return mul0; -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD faceforward -( - detail::fvec4SIMD const & N, - detail::fvec4SIMD const & I, - detail::fvec4SIMD const & Nref -) -{ - return detail::sse_ffd_ps(N.Data, I.Data, Nref.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD reflect -( - detail::fvec4SIMD const & I, - detail::fvec4SIMD const & N -) -{ - return detail::sse_rfe_ps(I.Data, N.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD refract -( - detail::fvec4SIMD const & I, - detail::fvec4SIMD const & N, - float const & eta -) -{ - return detail::sse_rfa_ps(I.Data, N.Data, _mm_set1_ps(eta)); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD sqrt(detail::fvec4SIMD const & x) -{ - return _mm_mul_ps(inversesqrt(x).Data, x.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD niceSqrt(detail::fvec4SIMD const & x) -{ - return _mm_sqrt_ps(x.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD fastSqrt(detail::fvec4SIMD const & x) -{ - return _mm_mul_ps(fastInversesqrt(x.Data).Data, x.Data); -} - -// SSE scalar reciprocal sqrt using rsqrt op, plus one Newton-Rhaphson iteration -// By Elan Ruskin, http://assemblyrequired.crashworks.org/ -GLM_FUNC_QUALIFIER detail::fvec4SIMD inversesqrt(detail::fvec4SIMD const & x) -{ - GLM_ALIGN(4) static const __m128 three = {3, 3, 3, 3}; // aligned consts for fast load - GLM_ALIGN(4) static const __m128 half = {0.5,0.5,0.5,0.5}; - - __m128 recip = _mm_rsqrt_ps(x.Data); // "estimate" opcode - __m128 halfrecip = _mm_mul_ps(half, recip); - __m128 threeminus_xrr = _mm_sub_ps(three, _mm_mul_ps(x.Data, _mm_mul_ps(recip, recip))); - return _mm_mul_ps(halfrecip, threeminus_xrr); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD fastInversesqrt(detail::fvec4SIMD const & x) -{ - return _mm_rsqrt_ps(x.Data); -} - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2009-05-07 +// Updated : 2009-05-07 +// Licence : This source is under MIT License +// File : glm/gtx/simd_vec4.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ +namespace detail{ + +template +struct mask +{ + enum{value = Value}; +}; + +////////////////////////////////////// +// Implicit basic constructors + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD() +#ifdef GLM_SIMD_ENABLE_DEFAULT_INIT + : Data(_mm_set_ps(0.0f, 0.0f, 0.0f, 0.0f)) +#endif +{} + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(__m128 const & Data) : + Data(Data) +{} + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(fvec4SIMD const & v) : + Data(v.Data) +{} + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(tvec4 const & v) : + Data(_mm_set_ps(v.w, v.z, v.y, v.x)) +{} + +////////////////////////////////////// +// Explicit basic constructors + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s) : + Data(_mm_set1_ps(s)) +{} + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & x, float const & y, float const & z, float const & w) : +// Data(_mm_setr_ps(x, y, z, w)) + Data(_mm_set_ps(w, z, y, x)) +{} +/* +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const v[4]) : + Data(_mm_load_ps(v)) +{} +*/ +////////////////////////////////////// +// Swizzle constructors + +//fvec4SIMD(ref4 const & r); + +////////////////////////////////////// +// Convertion vector constructors + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec2 const & v, float const & s1, float const & s2) : + Data(_mm_set_ps(s2, s1, v.y, v.x)) +{} + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s1, vec2 const & v, float const & s2) : + Data(_mm_set_ps(s2, v.y, v.x, s1)) +{} + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s1, float const & s2, vec2 const & v) : + Data(_mm_set_ps(v.y, v.x, s2, s1)) +{} + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec3 const & v, float const & s) : + Data(_mm_set_ps(s, v.z, v.y, v.x)) +{} + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s, vec3 const & v) : + Data(_mm_set_ps(v.z, v.y, v.x, s)) +{} + +GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec2 const & v1, vec2 const & v2) : + Data(_mm_set_ps(v2.y, v2.x, v1.y, v1.x)) +{} + +//GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(ivec4SIMD const & v) : +// Data(_mm_cvtepi32_ps(v.Data)) +//{} + +////////////////////////////////////// +// Unary arithmetic operators + +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator=(fvec4SIMD const & v) +{ + this->Data = v.Data; + return *this; +} + +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator+=(float const & s) +{ + this->Data = _mm_add_ps(Data, _mm_set_ps1(s)); + return *this; +} + +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator+=(fvec4SIMD const & v) +{ + this->Data = _mm_add_ps(this->Data , v.Data); + return *this; +} + +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator-=(float const & s) +{ + this->Data = _mm_sub_ps(Data, _mm_set_ps1(s)); + return *this; +} + +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator-=(fvec4SIMD const & v) +{ + this->Data = _mm_sub_ps(this->Data , v.Data); + return *this; +} + +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator*=(float const & s) +{ + this->Data = _mm_mul_ps(this->Data, _mm_set_ps1(s)); + return *this; +} + +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator*=(fvec4SIMD const & v) +{ + this->Data = _mm_mul_ps(this->Data , v.Data); + return *this; +} + +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator/=(float const & s) +{ + this->Data = _mm_div_ps(Data, _mm_set1_ps(s)); + return *this; +} + +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator/=(fvec4SIMD const & v) +{ + this->Data = _mm_div_ps(this->Data , v.Data); + return *this; +} + +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator++() +{ + this->Data = _mm_add_ps(this->Data , glm::detail::one); + return *this; +} + +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator--() +{ + this->Data = _mm_sub_ps(this->Data, glm::detail::one); + return *this; +} + +////////////////////////////////////// +// Swizzle operators + +template +GLM_FUNC_QUALIFIER fvec4SIMD fvec4SIMD::swizzle() const +{ + __m128 Data = _mm_shuffle_ps( + this->Data, this->Data, + mask<(W << 6) | (Z << 4) | (Y << 2) | (X << 0)>::value); + return fvec4SIMD(Data); +} + +template +GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::swizzle() +{ + this->Data = _mm_shuffle_ps( + this->Data, this->Data, + mask<(W << 6) | (Z << 4) | (Y << 2) | (X << 0)>::value); + return *this; +} + +// operator+ +GLM_FUNC_QUALIFIER fvec4SIMD operator+ (fvec4SIMD const & v, float s) +{ + return fvec4SIMD(_mm_add_ps(v.Data, _mm_set1_ps(s))); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator+ (float s, fvec4SIMD const & v) +{ + return fvec4SIMD(_mm_add_ps(_mm_set1_ps(s), v.Data)); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator+ (fvec4SIMD const & v1, fvec4SIMD const & v2) +{ + return fvec4SIMD(_mm_add_ps(v1.Data, v2.Data)); +} + +//operator- +GLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v, float s) +{ + return fvec4SIMD(_mm_sub_ps(v.Data, _mm_set1_ps(s))); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator- (float s, fvec4SIMD const & v) +{ + return fvec4SIMD(_mm_sub_ps(_mm_set1_ps(s), v.Data)); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v1, fvec4SIMD const & v2) +{ + return fvec4SIMD(_mm_sub_ps(v1.Data, v2.Data)); +} + +//operator* +GLM_FUNC_QUALIFIER fvec4SIMD operator* (fvec4SIMD const & v, float s) +{ + __m128 par0 = v.Data; + __m128 par1 = _mm_set1_ps(s); + return fvec4SIMD(_mm_mul_ps(par0, par1)); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator* (float s, fvec4SIMD const & v) +{ + __m128 par0 = _mm_set1_ps(s); + __m128 par1 = v.Data; + return fvec4SIMD(_mm_mul_ps(par0, par1)); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator* (fvec4SIMD const & v1, fvec4SIMD const & v2) +{ + return fvec4SIMD(_mm_mul_ps(v1.Data, v2.Data)); +} + +//operator/ +GLM_FUNC_QUALIFIER fvec4SIMD operator/ (fvec4SIMD const & v, float s) +{ + __m128 par0 = v.Data; + __m128 par1 = _mm_set1_ps(s); + return fvec4SIMD(_mm_div_ps(par0, par1)); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator/ (float s, fvec4SIMD const & v) +{ + __m128 par0 = _mm_set1_ps(s); + __m128 par1 = v.Data; + return fvec4SIMD(_mm_div_ps(par0, par1)); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator/ (fvec4SIMD const & v1, fvec4SIMD const & v2) +{ + return fvec4SIMD(_mm_div_ps(v1.Data, v2.Data)); +} + +// Unary constant operators +GLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v) +{ + return fvec4SIMD(_mm_sub_ps(_mm_setzero_ps(), v.Data)); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator++ (fvec4SIMD const & v, int) +{ + return fvec4SIMD(_mm_add_ps(v.Data, glm::detail::one)); +} + +GLM_FUNC_QUALIFIER fvec4SIMD operator-- (fvec4SIMD const & v, int) +{ + return fvec4SIMD(_mm_sub_ps(v.Data, glm::detail::one)); +} + +}//namespace detail + +GLM_FUNC_QUALIFIER detail::tvec4 vec4_cast +( + detail::fvec4SIMD const & x +) +{ + GLM_ALIGN(16) detail::tvec4 Result; + _mm_store_ps(&Result[0], x.Data); + return Result; +} + +// Other possible implementation +//float abs(float a) +//{ +// return max(-a, a); +//} +GLM_FUNC_QUALIFIER detail::fvec4SIMD abs +( + detail::fvec4SIMD const & x +) +{ + return detail::sse_abs_ps(x.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD sign +( + detail::fvec4SIMD const & x +) +{ + return detail::sse_sgn_ps(x.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD floor +( + detail::fvec4SIMD const & x +) +{ + return detail::sse_flr_ps(x.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD trunc +( + detail::fvec4SIMD const & x +) +{ + //return x < 0 ? -floor(-x) : floor(x); + + __m128 Flr0 = detail::sse_flr_ps(_mm_sub_ps(_mm_setzero_ps(), x.Data)); + __m128 Sub0 = _mm_sub_ps(Flr0, x.Data); + __m128 Flr1 = detail::sse_flr_ps(x.Data); + + __m128 Cmp0 = _mm_cmplt_ps(x.Data, glm::detail::zero); + __m128 Cmp1 = _mm_cmpnlt_ps(x.Data, glm::detail::zero); + + __m128 And0 = _mm_and_ps(Sub0, Cmp0); + __m128 And1 = _mm_and_ps(Flr1, Cmp1); + + return _mm_or_ps(And0, And1); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD round +( + detail::fvec4SIMD const & x +) +{ + return detail::sse_rnd_ps(x.Data); +} + +//GLM_FUNC_QUALIFIER detail::fvec4SIMD roundEven +//( +// detail::fvec4SIMD const & x +//) +//{ + +//} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD ceil +( + detail::fvec4SIMD const & x +) +{ + return detail::sse_ceil_ps(x.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD fract +( + detail::fvec4SIMD const & x +) +{ + return detail::sse_frc_ps(x.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD mod +( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y +) +{ + return detail::sse_mod_ps(x.Data, y.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD mod +( + detail::fvec4SIMD const & x, + float const & y +) +{ + return detail::sse_mod_ps(x.Data, _mm_set1_ps(y)); +} + +//GLM_FUNC_QUALIFIER detail::fvec4SIMD modf +//( +// detail::fvec4SIMD const & x, +// detail::fvec4SIMD & i +//) +//{ + +//} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD min +( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y +) +{ + return _mm_min_ps(x.Data, y.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD min +( + detail::fvec4SIMD const & x, + float const & y +) +{ + return _mm_min_ps(x.Data, _mm_set1_ps(y)); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD max +( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y +) +{ + return _mm_max_ps(x.Data, y.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD max +( + detail::fvec4SIMD const & x, + float const & y +) +{ + return _mm_max_ps(x.Data, _mm_set1_ps(y)); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD clamp +( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & minVal, + detail::fvec4SIMD const & maxVal +) +{ + return detail::sse_clp_ps(x.Data, minVal.Data, maxVal.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD clamp +( + detail::fvec4SIMD const & x, + float const & minVal, + float const & maxVal +) +{ + return detail::sse_clp_ps(x.Data, _mm_set1_ps(minVal), _mm_set1_ps(maxVal)); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD mix +( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y, + detail::fvec4SIMD const & a +) +{ + __m128 Sub0 = _mm_sub_ps(y.Data, x.Data); + __m128 Mul0 = _mm_mul_ps(a.Data, Sub0); + return _mm_mul_ps(x.Data, Mul0); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD step +( + detail::fvec4SIMD const & edge, + detail::fvec4SIMD const & x +) +{ + __m128 cmp0 = _mm_cmpngt_ps(x.Data, edge.Data); + return _mm_max_ps(_mm_min_ps(cmp0, _mm_setzero_ps()), detail::one); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD step +( + float const & edge, + detail::fvec4SIMD const & x +) +{ + __m128 cmp0 = _mm_cmpngt_ps(x.Data, _mm_set1_ps(edge)); + return _mm_max_ps(_mm_min_ps(cmp0, _mm_setzero_ps()), detail::one); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD smoothstep +( + detail::fvec4SIMD const & edge0, + detail::fvec4SIMD const & edge1, + detail::fvec4SIMD const & x +) +{ + return detail::sse_ssp_ps(edge0.Data, edge1.Data, x.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD smoothstep +( + float const & edge0, + float const & edge1, + detail::fvec4SIMD const & x +) +{ + return detail::sse_ssp_ps(_mm_set1_ps(edge0), _mm_set1_ps(edge1), x.Data); +} + +//GLM_FUNC_QUALIFIER bvec4 isnan(detail::fvec4SIMD const & x) +//{ + +//} + +//GLM_FUNC_QUALIFIER bvec4 isinf(detail::fvec4SIMD const & x) +//{ + +//} + +//GLM_FUNC_QUALIFIER detail::ivec4SIMD floatBitsToInt +//( +// detail::fvec4SIMD const & value +//) +//{ + +//} + +//GLM_FUNC_QUALIFIER detail::fvec4SIMD intBitsToFloat +//( +// detail::ivec4SIMD const & value +//) +//{ + +//} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD fma +( + detail::fvec4SIMD const & a, + detail::fvec4SIMD const & b, + detail::fvec4SIMD const & c +) +{ + return _mm_add_ps(_mm_mul_ps(a.Data, b.Data), c.Data); +} + +GLM_FUNC_QUALIFIER float length +( + detail::fvec4SIMD const & x +) +{ + detail::fvec4SIMD dot0 = detail::sse_dot_ss(x.Data, x.Data); + detail::fvec4SIMD sqt0 = sqrt(dot0); + float Result = 0; + _mm_store_ss(&Result, sqt0.Data); + return Result; +} + +GLM_FUNC_QUALIFIER float fastLength +( + detail::fvec4SIMD const & x +) +{ + detail::fvec4SIMD dot0 = detail::sse_dot_ss(x.Data, x.Data); + detail::fvec4SIMD sqt0 = fastSqrt(dot0); + float Result = 0; + _mm_store_ss(&Result, sqt0.Data); + return Result; +} + +GLM_FUNC_QUALIFIER float niceLength +( + detail::fvec4SIMD const & x +) +{ + detail::fvec4SIMD dot0 = detail::sse_dot_ss(x.Data, x.Data); + detail::fvec4SIMD sqt0 = niceSqrt(dot0); + float Result = 0; + _mm_store_ss(&Result, sqt0.Data); + return Result; +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD length4 +( + detail::fvec4SIMD const & x +) +{ + return sqrt(dot4(x, x)); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD fastLength4 +( + detail::fvec4SIMD const & x +) +{ + return fastSqrt(dot4(x, x)); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD niceLength4 +( + detail::fvec4SIMD const & x +) +{ + return niceSqrt(dot4(x, x)); +} + +GLM_FUNC_QUALIFIER float distance +( + detail::fvec4SIMD const & p0, + detail::fvec4SIMD const & p1 +) +{ + float Result = 0; + _mm_store_ss(&Result, detail::sse_dst_ps(p0.Data, p1.Data)); + return Result; +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD distance4 +( + detail::fvec4SIMD const & p0, + detail::fvec4SIMD const & p1 +) +{ + return detail::sse_dst_ps(p0.Data, p1.Data); +} + +GLM_FUNC_QUALIFIER float dot +( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y +) +{ + float Result = 0; + _mm_store_ss(&Result, detail::sse_dot_ss(x.Data, y.Data)); + return Result; +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD dot4 +( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y +) +{ + return detail::sse_dot_ps(x.Data, y.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD cross +( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y +) +{ + return detail::sse_xpd_ps(x.Data, y.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD normalize +( + detail::fvec4SIMD const & x +) +{ + __m128 dot0 = detail::sse_dot_ps(x.Data, x.Data); + __m128 isr0 = inversesqrt(detail::fvec4SIMD(dot0)).Data; + __m128 mul0 = _mm_mul_ps(x.Data, isr0); + return mul0; +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD fastNormalize +( + detail::fvec4SIMD const & x +) +{ + __m128 dot0 = detail::sse_dot_ps(x.Data, x.Data); + __m128 isr0 = fastInversesqrt(dot0).Data; + __m128 mul0 = _mm_mul_ps(x.Data, isr0); + return mul0; +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD faceforward +( + detail::fvec4SIMD const & N, + detail::fvec4SIMD const & I, + detail::fvec4SIMD const & Nref +) +{ + return detail::sse_ffd_ps(N.Data, I.Data, Nref.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD reflect +( + detail::fvec4SIMD const & I, + detail::fvec4SIMD const & N +) +{ + return detail::sse_rfe_ps(I.Data, N.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD refract +( + detail::fvec4SIMD const & I, + detail::fvec4SIMD const & N, + float const & eta +) +{ + return detail::sse_rfa_ps(I.Data, N.Data, _mm_set1_ps(eta)); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD sqrt(detail::fvec4SIMD const & x) +{ + return _mm_mul_ps(inversesqrt(x).Data, x.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD niceSqrt(detail::fvec4SIMD const & x) +{ + return _mm_sqrt_ps(x.Data); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD fastSqrt(detail::fvec4SIMD const & x) +{ + return _mm_mul_ps(fastInversesqrt(x.Data).Data, x.Data); +} + +// SSE scalar reciprocal sqrt using rsqrt op, plus one Newton-Rhaphson iteration +// By Elan Ruskin, http://assemblyrequired.crashworks.org/ +GLM_FUNC_QUALIFIER detail::fvec4SIMD inversesqrt(detail::fvec4SIMD const & x) +{ + GLM_ALIGN(4) static const __m128 three = {3, 3, 3, 3}; // aligned consts for fast load + GLM_ALIGN(4) static const __m128 half = {0.5,0.5,0.5,0.5}; + + __m128 recip = _mm_rsqrt_ps(x.Data); // "estimate" opcode + __m128 halfrecip = _mm_mul_ps(half, recip); + __m128 threeminus_xrr = _mm_sub_ps(three, _mm_mul_ps(x.Data, _mm_mul_ps(recip, recip))); + return _mm_mul_ps(halfrecip, threeminus_xrr); +} + +GLM_FUNC_QUALIFIER detail::fvec4SIMD fastInversesqrt(detail::fvec4SIMD const & x) +{ + return _mm_rsqrt_ps(x.Data); +} + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/spline.hpp b/include/gal/opengl/glm/gtx/spline.hpp index 35553e1326..569f1a87fc 100644 --- a/include/gal/opengl/glm/gtx/spline.hpp +++ b/include/gal/opengl/glm/gtx/spline.hpp @@ -1,90 +1,90 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_spline -/// @file glm/gtx/spline.hpp -/// @date 2007-01-25 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_spline GLM_GTX_spline -/// @ingroup gtx -/// -/// @brief Spline functions -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_spline -#define GLM_GTX_spline GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtx/optimum_pow.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_spline extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_spline - /// @{ - - //! Return a point from a catmull rom curve. - //! From GLM_GTX_spline extension. - template - genType catmullRom( - genType const & v1, - genType const & v2, - genType const & v3, - genType const & v4, - typename genType::value_type const & s); - - //! Return a point from a hermite curve. - //! From GLM_GTX_spline extension. - template - genType hermite( - genType const & v1, - genType const & t1, - genType const & v2, - genType const & t2, - typename genType::value_type const & s); - - //! Return a point from a cubic curve. - //! From GLM_GTX_spline extension. - template - genType cubic( - genType const & v1, - genType const & v2, - genType const & v3, - genType const & v4, - typename genType::value_type const & s); - - /// @} -}//namespace glm - -#include "spline.inl" - -#endif//GLM_GTX_spline - +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_spline +/// @file glm/gtx/spline.hpp +/// @date 2007-01-25 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_spline GLM_GTX_spline +/// @ingroup gtx +/// +/// @brief Spline functions +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_spline +#define GLM_GTX_spline GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtx/optimum_pow.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_spline extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_spline + /// @{ + + //! Return a point from a catmull rom curve. + //! From GLM_GTX_spline extension. + template + genType catmullRom( + genType const & v1, + genType const & v2, + genType const & v3, + genType const & v4, + typename genType::value_type const & s); + + //! Return a point from a hermite curve. + //! From GLM_GTX_spline extension. + template + genType hermite( + genType const & v1, + genType const & t1, + genType const & v2, + genType const & t2, + typename genType::value_type const & s); + + //! Return a point from a cubic curve. + //! From GLM_GTX_spline extension. + template + genType cubic( + genType const & v1, + genType const & v2, + genType const & v3, + genType const & v4, + typename genType::value_type const & s); + + /// @} +}//namespace glm + +#include "spline.inl" + +#endif//GLM_GTX_spline + diff --git a/include/gal/opengl/glm/gtx/spline.inl b/include/gal/opengl/glm/gtx/spline.inl index 166e9e4410..23f895c7d1 100644 --- a/include/gal/opengl/glm/gtx/spline.inl +++ b/include/gal/opengl/glm/gtx/spline.inl @@ -1,70 +1,70 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2007-01-25 -// Updated : 2009-02-19 -// Licence : This source is under MIT License -// File : glm/gtx/spline.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm{ - -template -GLM_FUNC_QUALIFIER genType catmullRom -( - genType const & v1, - genType const & v2, - genType const & v3, - genType const & v4, - typename genType::value_type const & s -) -{ - typename genType::value_type s1 = s; - typename genType::value_type s2 = pow2(s); - typename genType::value_type s3 = pow3(s); - - typename genType::value_type f1 = -s3 + typename genType::value_type(2) * s2 - s; - typename genType::value_type f2 = typename genType::value_type(3) * s3 - typename genType::value_type(5) * s2 + typename genType::value_type(2); - typename genType::value_type f3 = typename genType::value_type(-3) * s3 + typename genType::value_type(4) * s2 + s; - typename genType::value_type f4 = s3 - s2; - - return (f1 * v1 + f2 * v2 + f3 * v3 + f4 * v4) / typename genType::value_type(2); - -} - -template -GLM_FUNC_QUALIFIER genType hermite -( - genType const & v1, - genType const & t1, - genType const & v2, - genType const & t2, - typename genType::value_type const & s -) -{ - typename genType::value_type s1 = s; - typename genType::value_type s2 = pow2(s); - typename genType::value_type s3 = pow3(s); - - typename genType::value_type f1 = typename genType::value_type(2) * s3 - typename genType::value_type(3) * s2 + typename genType::value_type(1); - typename genType::value_type f2 = typename genType::value_type(-2) * s3 + typename genType::value_type(3) * s2; - typename genType::value_type f3 = s3 - typename genType::value_type(2) * s2 + s; - typename genType::value_type f4 = s3 - s2; - - return f1 * v1 + f2 * v2 + f3 * t1 + f4 * t2; -} - -template -GLM_FUNC_QUALIFIER genType cubic -( - genType const & v1, - genType const & v2, - genType const & v3, - genType const & v4, - typename genType::value_type const & s -) -{ - return ((v1 * s + v2) * s + v3) * s + v4; -} - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-01-25 +// Updated : 2009-02-19 +// Licence : This source is under MIT License +// File : glm/gtx/spline.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm{ + +template +GLM_FUNC_QUALIFIER genType catmullRom +( + genType const & v1, + genType const & v2, + genType const & v3, + genType const & v4, + typename genType::value_type const & s +) +{ + typename genType::value_type s1 = s; + typename genType::value_type s2 = pow2(s); + typename genType::value_type s3 = pow3(s); + + typename genType::value_type f1 = -s3 + typename genType::value_type(2) * s2 - s; + typename genType::value_type f2 = typename genType::value_type(3) * s3 - typename genType::value_type(5) * s2 + typename genType::value_type(2); + typename genType::value_type f3 = typename genType::value_type(-3) * s3 + typename genType::value_type(4) * s2 + s; + typename genType::value_type f4 = s3 - s2; + + return (f1 * v1 + f2 * v2 + f3 * v3 + f4 * v4) / typename genType::value_type(2); + +} + +template +GLM_FUNC_QUALIFIER genType hermite +( + genType const & v1, + genType const & t1, + genType const & v2, + genType const & t2, + typename genType::value_type const & s +) +{ + typename genType::value_type s1 = s; + typename genType::value_type s2 = pow2(s); + typename genType::value_type s3 = pow3(s); + + typename genType::value_type f1 = typename genType::value_type(2) * s3 - typename genType::value_type(3) * s2 + typename genType::value_type(1); + typename genType::value_type f2 = typename genType::value_type(-2) * s3 + typename genType::value_type(3) * s2; + typename genType::value_type f3 = s3 - typename genType::value_type(2) * s2 + s; + typename genType::value_type f4 = s3 - s2; + + return f1 * v1 + f2 * v2 + f3 * t1 + f4 * t2; +} + +template +GLM_FUNC_QUALIFIER genType cubic +( + genType const & v1, + genType const & v2, + genType const & v3, + genType const & v4, + typename genType::value_type const & s +) +{ + return ((v1 * s + v2) * s + v3) * s + v4; +} + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/std_based_type.hpp b/include/gal/opengl/glm/gtx/std_based_type.hpp index 7fac251bf2..f96c9cc23c 100644 --- a/include/gal/opengl/glm/gtx/std_based_type.hpp +++ b/include/gal/opengl/glm/gtx/std_based_type.hpp @@ -1,83 +1,83 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_std_based_type -/// @file glm/gtx/std_based_type.hpp -/// @date 2008-06-08 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_extented_min_max (dependence) -/// -/// @defgroup gtx_std_based_type GLM_GTX_std_based_type -/// @ingroup gtx -/// -/// @brief Adds vector types based on STL value types. -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_std_based_type -#define GLM_GTX_std_based_type GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_std_based_type extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_std_based_type - /// @{ - - /// Vector type based of two std::size_t components. - /// @see GLM_GTX_std_based_type - typedef detail::tvec2 size2; - - /// Vector type based of three std::size_t components. - /// @see GLM_GTX_std_based_type - typedef detail::tvec3 size3; - - /// Vector type based of four std::size_t components. - /// @see GLM_GTX_std_based_type - typedef detail::tvec4 size4; - - /// Vector type based of two std::size_t components. - /// @see GLM_GTX_std_based_type - typedef detail::tvec2 size2_t; - - /// Vector type based of three std::size_t components. - /// @see GLM_GTX_std_based_type - typedef detail::tvec3 size3_t; - - /// Vector type based of four std::size_t components. - /// @see GLM_GTX_std_based_type - typedef detail::tvec4 size4_t; - - /// @} -}//namespace glm - -#include "std_based_type.inl" - -#endif//GLM_GTX_std_based_type +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_std_based_type +/// @file glm/gtx/std_based_type.hpp +/// @date 2008-06-08 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_extented_min_max (dependence) +/// +/// @defgroup gtx_std_based_type GLM_GTX_std_based_type +/// @ingroup gtx +/// +/// @brief Adds vector types based on STL value types. +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_std_based_type +#define GLM_GTX_std_based_type GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_std_based_type extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_std_based_type + /// @{ + + /// Vector type based of two std::size_t components. + /// @see GLM_GTX_std_based_type + typedef detail::tvec2 size2; + + /// Vector type based of three std::size_t components. + /// @see GLM_GTX_std_based_type + typedef detail::tvec3 size3; + + /// Vector type based of four std::size_t components. + /// @see GLM_GTX_std_based_type + typedef detail::tvec4 size4; + + /// Vector type based of two std::size_t components. + /// @see GLM_GTX_std_based_type + typedef detail::tvec2 size2_t; + + /// Vector type based of three std::size_t components. + /// @see GLM_GTX_std_based_type + typedef detail::tvec3 size3_t; + + /// Vector type based of four std::size_t components. + /// @see GLM_GTX_std_based_type + typedef detail::tvec4 size4_t; + + /// @} +}//namespace glm + +#include "std_based_type.inl" + +#endif//GLM_GTX_std_based_type diff --git a/include/gal/opengl/glm/gtx/std_based_type.inl b/include/gal/opengl/glm/gtx/std_based_type.inl index a5589d5145..67e7ad02cc 100644 --- a/include/gal/opengl/glm/gtx/std_based_type.inl +++ b/include/gal/opengl/glm/gtx/std_based_type.inl @@ -1,13 +1,13 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2008-06-08 -// Updated : 2008-06-08 -// Licence : This source is under MIT License -// File : glm/gtx/std_based_type.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - -} +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-06-08 +// Updated : 2008-06-08 +// Licence : This source is under MIT License +// File : glm/gtx/std_based_type.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + +} diff --git a/include/gal/opengl/glm/gtx/string_cast.hpp b/include/gal/opengl/glm/gtx/string_cast.hpp index c9fad94522..942fb92832 100644 --- a/include/gal/opengl/glm/gtx/string_cast.hpp +++ b/include/gal/opengl/glm/gtx/string_cast.hpp @@ -1,70 +1,70 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_string_cast -/// @file glm/gtx/string_cast.hpp -/// @date 2008-04-26 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtc_half_float (dependence) -/// @see gtx_integer (dependence) -/// @see gtx_quaternion (dependence) -/// -/// @defgroup gtx_string_cast GLM_GTX_string_cast -/// @ingroup gtx -/// -/// @brief Setup strings for GLM type values -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_string_cast -#define GLM_GTX_string_cast GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtc/half_float.hpp" -#include "../gtx/integer.hpp" -#include "../gtx/quaternion.hpp" -#include - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_string_cast extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_string_cast - /// @{ - - /// Create a string from a GLM type value. - /// From GLM_GTX_string_cast extension. - template - std::string to_string(genType const & x); - - /// @} -}//namespace glm - -#include "string_cast.inl" - -#endif//GLM_GTX_string_cast +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_string_cast +/// @file glm/gtx/string_cast.hpp +/// @date 2008-04-26 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_half_float (dependence) +/// @see gtx_integer (dependence) +/// @see gtx_quaternion (dependence) +/// +/// @defgroup gtx_string_cast GLM_GTX_string_cast +/// @ingroup gtx +/// +/// @brief Setup strings for GLM type values +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_string_cast +#define GLM_GTX_string_cast GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/half_float.hpp" +#include "../gtx/integer.hpp" +#include "../gtx/quaternion.hpp" +#include + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_string_cast extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_string_cast + /// @{ + + /// Create a string from a GLM type value. + /// From GLM_GTX_string_cast extension. + template + std::string to_string(genType const & x); + + /// @} +}//namespace glm + +#include "string_cast.inl" + +#endif//GLM_GTX_string_cast diff --git a/include/gal/opengl/glm/gtx/string_cast.inl b/include/gal/opengl/glm/gtx/string_cast.inl index 6b4f815e4e..d0e8f43fbe 100644 --- a/include/gal/opengl/glm/gtx/string_cast.inl +++ b/include/gal/opengl/glm/gtx/string_cast.inl @@ -1,588 +1,588 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2006 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2008-04-27 -// Updated : 2008-05-24 -// Licence : This source is under MIT License -// File : glm/gtx/string_cast.hpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#include -#include - -namespace glm{ -namespace detail -{ - GLM_FUNC_QUALIFIER std::string format(const char* msg, ...) - { - std::size_t const STRING_BUFFER(4096); - char text[STRING_BUFFER]; - va_list list; - - if(msg == 0) - return std::string(); - - va_start(list, msg); - -#if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005)) - vsprintf_s(text, STRING_BUFFER, msg, list); -#else// - vsprintf(text, msg, list); -#endif// - va_end(list); - - return std::string(text); - } - - static const char* True = "true"; - static const char* False = "false"; -}//namespace detail - - //////////////////////////////// - // Scalars - - GLM_FUNC_QUALIFIER std::string to_string(detail::half const & x) - { - return detail::format("half(%2.4f)", float(x)); - } - - GLM_FUNC_QUALIFIER std::string to_string(float x) - { - return detail::format("float(%f)", x); - } - - GLM_FUNC_QUALIFIER std::string to_string(double x) - { - return detail::format("double(%f)", x); - } - - GLM_FUNC_QUALIFIER std::string to_string(int x) - { - return detail::format("int(%d)", x); - } - - GLM_FUNC_QUALIFIER std::string to_string(unsigned int x) - { - return detail::format("uint(%d)", x); - } - - //////////////////////////////// - // Bool vectors - - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tvec2 const & v - ) - { - return detail::format("bvec2(%s, %s)", - v.x ? detail::True : detail::False, - v.y ? detail::True : detail::False); - } - - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tvec3 const & v - ) - { - return detail::format("bvec3(%s, %s, %s)", - v.x ? detail::True : detail::False, - v.y ? detail::True : detail::False, - v.z ? detail::True : detail::False); - } - - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tvec4 const & v - ) - { - return detail::format("bvec4(%s, %s, %s, %s)", - v.x ? detail::True : detail::False, - v.y ? detail::True : detail::False, - v.z ? detail::True : detail::False, - v.w ? detail::True : detail::False); - } - - //////////////////////////////// - // Half vectors - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tvec2 const & v - ) - { - return detail::format("hvec2(%2.4f, %2.4f)", v.x.toFloat(), v.y.toFloat()); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tvec3 const & v - ) - { - return detail::format("hvec3(%2.4f, %2.4f, %2.4f)", v.x.toFloat(), v.y.toFloat(), v.z.toFloat()); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tvec4 const & v - ) - { - return detail::format("hvec4(%2.4f, %2.4f, %2.4f, %2.4f)", v.x.toFloat(), v.y.toFloat(), v.z.toFloat(), v.w.toFloat()); - } - - //////////////////////////////// - // Float vectors - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tvec2 const & v - ) - { - return detail::format("fvec2(%f, %f)", v.x, v.y); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tvec3 const & v - ) - { - return detail::format("fvec3(%f, %f, %f)", v.x, v.y, v.z); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tvec4 const & v - ) - { - return detail::format("fvec4(%f, %f, %f, %f)", v.x, v.y, v.z, v.w); - } - - //////////////////////////////// - // Double vectors - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tvec2 const & v - ) - { - return detail::format("dvec2(%f, %f)", v.x, v.y); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tvec3 const & v - ) - { - return detail::format("dvec3(%f, %f, %f)", v.x, v.y, v.z); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tvec4 const & v - ) - { - return detail::format("dvec4(%f, %f, %f, %f)", v.x, v.y, v.z, v.w); - } - - //////////////////////////////// - // Int vectors - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tvec2 const & v - ) - { - return detail::format("ivec2(%d, %d)", v.x, v.y); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tvec3 const & v - ) - { - return detail::format("ivec3(%d, %d, %d)", v.x, v.y, v.z); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tvec4 const & v - ) - { - return detail::format("ivec4(%d, %d, %d, %d)", v.x, v.y, v.z, v.w); - } - - //////////////////////////////// - // Unsigned int vectors - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tvec2 const & v - ) - { - return detail::format("uvec2(%d, %d)", v.x, v.y); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tvec3 const & v - ) - { - return detail::format("uvec3(%d, %d, %d)", v.x, v.y, v.z); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tvec4 const & v - ) - { - return detail::format("uvec4(%d, %d, %d, %d)", v.x, v.y, v.z, v.w); - } - - //////////////////////////////// - // Half matrices - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat2x2 const & m - ) - { - return detail::format("hmat2x2((%f, %f), (%f, %f))", - m[0][0].toFloat(), m[0][1].toFloat(), - m[1][0].toFloat(), m[1][1].toFloat()); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat2x3 const & x - ) - { - return detail::format("hmat2x3((%f, %f, %f), (%f, %f, %f))", - x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(), - x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat()); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat2x4 const & x - ) - { - return detail::format("hmat2x4((%f, %f, %f, %f), (%f, %f, %f, %f))", - x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(), x[0][3].toFloat(), - x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat(), x[1][3].toFloat()); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat3x2 const & x - ) - { - return detail::format("hmat3x2((%f, %f), (%f, %f), (%f, %f))", - x[0][0].toFloat(), x[0][1].toFloat(), - x[1][0].toFloat(), x[1][1].toFloat(), - x[2][0].toFloat(), x[2][1].toFloat()); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat3x3 const & x - ) - { - return detail::format("hmat3x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f))", - x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(), - x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat(), - x[2][0].toFloat(), x[2][1].toFloat(), x[2][2].toFloat()); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat3x4 const & x - ) - { - return detail::format("hmat3x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))", - x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(), x[0][3].toFloat(), - x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat(), x[1][3].toFloat(), - x[2][0].toFloat(), x[2][1].toFloat(), x[2][2].toFloat(), x[2][3].toFloat()); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat4x2 const & x - ) - { - return detail::format("hmat4x2((%f, %f), (%f, %f), (%f, %f), (%f, %f))", - x[0][0].toFloat(), x[0][1].toFloat(), - x[1][0].toFloat(), x[1][1].toFloat(), - x[2][0].toFloat(), x[2][1].toFloat(), - x[3][0].toFloat(), x[3][1].toFloat()); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat4x3 const & x - ) - { - return detail::format("hmat4x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f), (%f, %f, %f))", - x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(), - x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat(), - x[2][0].toFloat(), x[2][1].toFloat(), x[2][2].toFloat(), - x[3][0].toFloat(), x[3][1].toFloat(), x[3][2].toFloat()); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat4x4 const & x - ) - { - return detail::format("hmat4x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))", - x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(), x[0][3].toFloat(), - x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat(), x[1][3].toFloat(), - x[2][0].toFloat(), x[2][1].toFloat(), x[2][2].toFloat(), x[2][3].toFloat(), - x[3][0].toFloat(), x[3][1].toFloat(), x[3][2].toFloat(), x[3][3].toFloat()); - } - - //////////////////////////////// - // Float matrices - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat2x2 const & x - ) - { - return detail::format("mat2x2((%f, %f), (%f, %f))", - x[0][0], x[0][1], - x[1][0], x[1][1]); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat2x3 const & x - ) - { - return detail::format("mat2x3((%f, %f, %f), (%f, %f, %f))", - x[0][0], x[0][1], x[0][2], - x[1][0], x[1][1], x[1][2]); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat2x4 const & x - ) - { - return detail::format("mat2x4((%f, %f, %f, %f), (%f, %f, %f, %f))", - x[0][0], x[0][1], x[0][2], x[0][3], - x[1][0], x[1][1], x[1][2], x[1][3]); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat3x2 const & x - ) - { - return detail::format("mat3x2((%f, %f), (%f, %f), (%f, %f))", - x[0][0], x[0][1], - x[1][0], x[1][1], - x[2][0], x[2][1]); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat3x3 const & x - ) - { - return detail::format("mat3x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f))", - x[0][0], x[0][1], x[0][2], - x[1][0], x[1][1], x[1][2], - x[2][0], x[2][1], x[2][2]); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat3x4 const & x - ) - { - return detail::format("mat3x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))", - x[0][0], x[0][1], x[0][2], x[0][3], - x[1][0], x[1][1], x[1][2], x[1][3], - x[2][0], x[2][1], x[2][2], x[2][3]); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat4x2 const & x - ) - { - return detail::format("mat4x2((%f, %f), (%f, %f), (%f, %f), (%f, %f))", - x[0][0], x[0][1], - x[1][0], x[1][1], - x[2][0], x[2][1], - x[3][0], x[3][1]); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat4x3 const & x - ) - { - return detail::format("mat4x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f), (%f, %f, %f))", - x[0][0], x[0][1], x[0][2], - x[1][0], x[1][1], x[1][2], - x[2][0], x[2][1], x[2][2], - x[3][0], x[3][1], x[3][2]); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat4x4 const & x - ) - { - return detail::format("mat4x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))", - x[0][0], x[0][1], x[0][2], x[0][3], - x[1][0], x[1][1], x[1][2], x[1][3], - x[2][0], x[2][1], x[2][2], x[2][3], - x[3][0], x[3][1], x[3][2], x[3][3]); - } - - //////////////////////////////// - // Double matrices - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat2x2 const & x - ) - { - return detail::format("dmat2x2((%f, %f), (%f, %f))", - x[0][0], x[0][1], - x[1][0], x[1][1]); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat2x3 const & x - ) - { - return detail::format("dmat2x3((%f, %f, %f), (%f, %f, %f))", - x[0][0], x[0][1], x[0][2], - x[1][0], x[1][1], x[1][2]); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat2x4 const & x - ) - { - return detail::format("dmat2x4((%f, %f, %f, %f), (%f, %f, %f, %f))", - x[0][0], x[0][1], x[0][2], x[0][3], - x[1][0], x[1][1], x[1][2], x[1][3]); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat3x2 const & x - ) - { - return detail::format("dmat3x2((%f, %f), (%f, %f), (%f, %f))", - x[0][0], x[0][1], - x[1][0], x[1][1], - x[2][0], x[2][1]); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat3x3 const & x - ) - { - return detail::format("dmat3x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f))", - x[0][0], x[0][1], x[0][2], - x[1][0], x[1][1], x[1][2], - x[2][0], x[2][1], x[2][2]); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat3x4 const & x - ) - { - return detail::format("dmat3x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))", - x[0][0], x[0][1], x[0][2], x[0][3], - x[1][0], x[1][1], x[1][2], x[1][3], - x[2][0], x[2][1], x[2][2], x[2][3]); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat4x2 const & x - ) - { - return detail::format("dmat4x2((%f, %f), (%f, %f), (%f, %f), (%f, %f))", - x[0][0], x[0][1], - x[1][0], x[1][1], - x[2][0], x[2][1], - x[3][0], x[3][1]); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat4x3 const & x - ) - { - return detail::format("dmat4x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f), (%f, %f, %f))", - x[0][0], x[0][1], x[0][2], - x[1][0], x[1][1], x[1][2], - x[2][0], x[2][1], x[2][2], - x[3][0], x[3][1], x[3][2]); - } - - template <> - GLM_FUNC_QUALIFIER std::string to_string - ( - detail::tmat4x4 const & x - ) - { - return detail::format("dmat4x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))", - x[0][0], x[0][1], x[0][2], x[0][3], - x[1][0], x[1][1], x[1][2], x[1][3], - x[2][0], x[2][1], x[2][2], x[2][3], - x[3][0], x[3][1], x[3][2], x[3][3]); - } - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2006 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2008-04-27 +// Updated : 2008-05-24 +// Licence : This source is under MIT License +// File : glm/gtx/string_cast.hpp +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include +#include + +namespace glm{ +namespace detail +{ + GLM_FUNC_QUALIFIER std::string format(const char* msg, ...) + { + std::size_t const STRING_BUFFER(4096); + char text[STRING_BUFFER]; + va_list list; + + if(msg == 0) + return std::string(); + + va_start(list, msg); + +#if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005)) + vsprintf_s(text, STRING_BUFFER, msg, list); +#else// + vsprintf(text, msg, list); +#endif// + va_end(list); + + return std::string(text); + } + + static const char* True = "true"; + static const char* False = "false"; +}//namespace detail + + //////////////////////////////// + // Scalars + + GLM_FUNC_QUALIFIER std::string to_string(detail::half const & x) + { + return detail::format("half(%2.4f)", float(x)); + } + + GLM_FUNC_QUALIFIER std::string to_string(float x) + { + return detail::format("float(%f)", x); + } + + GLM_FUNC_QUALIFIER std::string to_string(double x) + { + return detail::format("double(%f)", x); + } + + GLM_FUNC_QUALIFIER std::string to_string(int x) + { + return detail::format("int(%d)", x); + } + + GLM_FUNC_QUALIFIER std::string to_string(unsigned int x) + { + return detail::format("uint(%d)", x); + } + + //////////////////////////////// + // Bool vectors + + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec2 const & v + ) + { + return detail::format("bvec2(%s, %s)", + v.x ? detail::True : detail::False, + v.y ? detail::True : detail::False); + } + + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec3 const & v + ) + { + return detail::format("bvec3(%s, %s, %s)", + v.x ? detail::True : detail::False, + v.y ? detail::True : detail::False, + v.z ? detail::True : detail::False); + } + + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec4 const & v + ) + { + return detail::format("bvec4(%s, %s, %s, %s)", + v.x ? detail::True : detail::False, + v.y ? detail::True : detail::False, + v.z ? detail::True : detail::False, + v.w ? detail::True : detail::False); + } + + //////////////////////////////// + // Half vectors + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec2 const & v + ) + { + return detail::format("hvec2(%2.4f, %2.4f)", v.x.toFloat(), v.y.toFloat()); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec3 const & v + ) + { + return detail::format("hvec3(%2.4f, %2.4f, %2.4f)", v.x.toFloat(), v.y.toFloat(), v.z.toFloat()); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec4 const & v + ) + { + return detail::format("hvec4(%2.4f, %2.4f, %2.4f, %2.4f)", v.x.toFloat(), v.y.toFloat(), v.z.toFloat(), v.w.toFloat()); + } + + //////////////////////////////// + // Float vectors + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec2 const & v + ) + { + return detail::format("fvec2(%f, %f)", v.x, v.y); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec3 const & v + ) + { + return detail::format("fvec3(%f, %f, %f)", v.x, v.y, v.z); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec4 const & v + ) + { + return detail::format("fvec4(%f, %f, %f, %f)", v.x, v.y, v.z, v.w); + } + + //////////////////////////////// + // Double vectors + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec2 const & v + ) + { + return detail::format("dvec2(%f, %f)", v.x, v.y); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec3 const & v + ) + { + return detail::format("dvec3(%f, %f, %f)", v.x, v.y, v.z); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec4 const & v + ) + { + return detail::format("dvec4(%f, %f, %f, %f)", v.x, v.y, v.z, v.w); + } + + //////////////////////////////// + // Int vectors + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec2 const & v + ) + { + return detail::format("ivec2(%d, %d)", v.x, v.y); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec3 const & v + ) + { + return detail::format("ivec3(%d, %d, %d)", v.x, v.y, v.z); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec4 const & v + ) + { + return detail::format("ivec4(%d, %d, %d, %d)", v.x, v.y, v.z, v.w); + } + + //////////////////////////////// + // Unsigned int vectors + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec2 const & v + ) + { + return detail::format("uvec2(%d, %d)", v.x, v.y); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec3 const & v + ) + { + return detail::format("uvec3(%d, %d, %d)", v.x, v.y, v.z); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tvec4 const & v + ) + { + return detail::format("uvec4(%d, %d, %d, %d)", v.x, v.y, v.z, v.w); + } + + //////////////////////////////// + // Half matrices + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat2x2 const & m + ) + { + return detail::format("hmat2x2((%f, %f), (%f, %f))", + m[0][0].toFloat(), m[0][1].toFloat(), + m[1][0].toFloat(), m[1][1].toFloat()); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat2x3 const & x + ) + { + return detail::format("hmat2x3((%f, %f, %f), (%f, %f, %f))", + x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(), + x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat()); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat2x4 const & x + ) + { + return detail::format("hmat2x4((%f, %f, %f, %f), (%f, %f, %f, %f))", + x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(), x[0][3].toFloat(), + x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat(), x[1][3].toFloat()); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat3x2 const & x + ) + { + return detail::format("hmat3x2((%f, %f), (%f, %f), (%f, %f))", + x[0][0].toFloat(), x[0][1].toFloat(), + x[1][0].toFloat(), x[1][1].toFloat(), + x[2][0].toFloat(), x[2][1].toFloat()); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat3x3 const & x + ) + { + return detail::format("hmat3x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f))", + x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(), + x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat(), + x[2][0].toFloat(), x[2][1].toFloat(), x[2][2].toFloat()); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat3x4 const & x + ) + { + return detail::format("hmat3x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))", + x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(), x[0][3].toFloat(), + x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat(), x[1][3].toFloat(), + x[2][0].toFloat(), x[2][1].toFloat(), x[2][2].toFloat(), x[2][3].toFloat()); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat4x2 const & x + ) + { + return detail::format("hmat4x2((%f, %f), (%f, %f), (%f, %f), (%f, %f))", + x[0][0].toFloat(), x[0][1].toFloat(), + x[1][0].toFloat(), x[1][1].toFloat(), + x[2][0].toFloat(), x[2][1].toFloat(), + x[3][0].toFloat(), x[3][1].toFloat()); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat4x3 const & x + ) + { + return detail::format("hmat4x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f), (%f, %f, %f))", + x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(), + x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat(), + x[2][0].toFloat(), x[2][1].toFloat(), x[2][2].toFloat(), + x[3][0].toFloat(), x[3][1].toFloat(), x[3][2].toFloat()); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat4x4 const & x + ) + { + return detail::format("hmat4x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))", + x[0][0].toFloat(), x[0][1].toFloat(), x[0][2].toFloat(), x[0][3].toFloat(), + x[1][0].toFloat(), x[1][1].toFloat(), x[1][2].toFloat(), x[1][3].toFloat(), + x[2][0].toFloat(), x[2][1].toFloat(), x[2][2].toFloat(), x[2][3].toFloat(), + x[3][0].toFloat(), x[3][1].toFloat(), x[3][2].toFloat(), x[3][3].toFloat()); + } + + //////////////////////////////// + // Float matrices + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat2x2 const & x + ) + { + return detail::format("mat2x2((%f, %f), (%f, %f))", + x[0][0], x[0][1], + x[1][0], x[1][1]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat2x3 const & x + ) + { + return detail::format("mat2x3((%f, %f, %f), (%f, %f, %f))", + x[0][0], x[0][1], x[0][2], + x[1][0], x[1][1], x[1][2]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat2x4 const & x + ) + { + return detail::format("mat2x4((%f, %f, %f, %f), (%f, %f, %f, %f))", + x[0][0], x[0][1], x[0][2], x[0][3], + x[1][0], x[1][1], x[1][2], x[1][3]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat3x2 const & x + ) + { + return detail::format("mat3x2((%f, %f), (%f, %f), (%f, %f))", + x[0][0], x[0][1], + x[1][0], x[1][1], + x[2][0], x[2][1]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat3x3 const & x + ) + { + return detail::format("mat3x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f))", + x[0][0], x[0][1], x[0][2], + x[1][0], x[1][1], x[1][2], + x[2][0], x[2][1], x[2][2]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat3x4 const & x + ) + { + return detail::format("mat3x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))", + x[0][0], x[0][1], x[0][2], x[0][3], + x[1][0], x[1][1], x[1][2], x[1][3], + x[2][0], x[2][1], x[2][2], x[2][3]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat4x2 const & x + ) + { + return detail::format("mat4x2((%f, %f), (%f, %f), (%f, %f), (%f, %f))", + x[0][0], x[0][1], + x[1][0], x[1][1], + x[2][0], x[2][1], + x[3][0], x[3][1]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat4x3 const & x + ) + { + return detail::format("mat4x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f), (%f, %f, %f))", + x[0][0], x[0][1], x[0][2], + x[1][0], x[1][1], x[1][2], + x[2][0], x[2][1], x[2][2], + x[3][0], x[3][1], x[3][2]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat4x4 const & x + ) + { + return detail::format("mat4x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))", + x[0][0], x[0][1], x[0][2], x[0][3], + x[1][0], x[1][1], x[1][2], x[1][3], + x[2][0], x[2][1], x[2][2], x[2][3], + x[3][0], x[3][1], x[3][2], x[3][3]); + } + + //////////////////////////////// + // Double matrices + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat2x2 const & x + ) + { + return detail::format("dmat2x2((%f, %f), (%f, %f))", + x[0][0], x[0][1], + x[1][0], x[1][1]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat2x3 const & x + ) + { + return detail::format("dmat2x3((%f, %f, %f), (%f, %f, %f))", + x[0][0], x[0][1], x[0][2], + x[1][0], x[1][1], x[1][2]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat2x4 const & x + ) + { + return detail::format("dmat2x4((%f, %f, %f, %f), (%f, %f, %f, %f))", + x[0][0], x[0][1], x[0][2], x[0][3], + x[1][0], x[1][1], x[1][2], x[1][3]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat3x2 const & x + ) + { + return detail::format("dmat3x2((%f, %f), (%f, %f), (%f, %f))", + x[0][0], x[0][1], + x[1][0], x[1][1], + x[2][0], x[2][1]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat3x3 const & x + ) + { + return detail::format("dmat3x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f))", + x[0][0], x[0][1], x[0][2], + x[1][0], x[1][1], x[1][2], + x[2][0], x[2][1], x[2][2]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat3x4 const & x + ) + { + return detail::format("dmat3x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))", + x[0][0], x[0][1], x[0][2], x[0][3], + x[1][0], x[1][1], x[1][2], x[1][3], + x[2][0], x[2][1], x[2][2], x[2][3]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat4x2 const & x + ) + { + return detail::format("dmat4x2((%f, %f), (%f, %f), (%f, %f), (%f, %f))", + x[0][0], x[0][1], + x[1][0], x[1][1], + x[2][0], x[2][1], + x[3][0], x[3][1]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat4x3 const & x + ) + { + return detail::format("dmat4x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f), (%f, %f, %f))", + x[0][0], x[0][1], x[0][2], + x[1][0], x[1][1], x[1][2], + x[2][0], x[2][1], x[2][2], + x[3][0], x[3][1], x[3][2]); + } + + template <> + GLM_FUNC_QUALIFIER std::string to_string + ( + detail::tmat4x4 const & x + ) + { + return detail::format("dmat4x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))", + x[0][0], x[0][1], x[0][2], x[0][3], + x[1][0], x[1][1], x[1][2], x[1][3], + x[2][0], x[2][1], x[2][2], x[2][3], + x[3][0], x[3][1], x[3][2], x[3][3]); + } + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/transform.hpp b/include/gal/opengl/glm/gtx/transform.hpp index 17b85d9c83..fa9c2ce7d4 100644 --- a/include/gal/opengl/glm/gtx/transform.hpp +++ b/include/gal/opengl/glm/gtx/transform.hpp @@ -1,131 +1,131 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_transform -/// @file glm/gtx/transform.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtc_matrix_transform (dependence) -/// @see gtx_transform -/// @see gtx_transform2 -/// -/// @defgroup gtx_transform GLM_GTX_transform -/// @ingroup gtx -/// -/// @brief Add transformation matrices -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_transform -#define GLM_GTX_transform GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtc/matrix_transform.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_transform extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_transform - /// @{ - - //! Builds a translation 4 * 4 matrix created from 3 scalars. - //! - From \link gtx_transform GLM_GTX_transform \endlink extension - // - See also: \link glm::translate GLM_GTC_matrix_transform \endlink - template - detail::tmat4x4 translate( - T x, T y, T z); - - //! Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars. - //! - From \link gtx_transform GLM_GTX_transform \endlink extension - // - See also: \link glm::translate GLM_GTC_matrix_transform \endlink - template - detail::tmat4x4 translate( - detail::tmat4x4 const & m, - T x, T y, T z); - - //! Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars. - //! - From \link gtx_transform GLM_GTX_transform \endlink extension - // - See also: \link glm::translate GLM_GTC_matrix_transform \endlink - template - detail::tmat4x4 translate( - detail::tvec3 const & v); - - //! Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. - //! - From \link gtx_transform GLM_GTX_transform \endlink extension - // - See also: \link glm::rotate GLM_GTC_matrix_transform \endlink - template - detail::tmat4x4 rotate( - T angle, - T x, T y, T z); - - //! Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. - //! - From \link gtx_transform GLM_GTX_transform \endlink extension - // - See also: \link glm::rotate GLM_GTC_matrix_transform \endlink - template - detail::tmat4x4 rotate( - T angle, - detail::tvec3 const & v); - - //! Transforms a matrix with a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. - //! - From \link gtx_transform GLM_GTX_transform \endlink extension - // - See also: \link glm::rotate GLM_GTC_matrix_transform \endlink - template - detail::tmat4x4 rotate( - detail::tmat4x4 const & m, - T angle, - T x, T y, T z); - - //! Builds a scale 4 * 4 matrix created from 3 scalars. - //! - From \link gtx_transform GLM_GTX_transform \endlink extension - // - See also: \link glm::scale GLM_GTC_matrix_transform \endlink - template - detail::tmat4x4 scale( - T x, T y, T z); - - //! Transforms a matrix with a scale 4 * 4 matrix created from 3 scalars. - //! - From \link gtx_transform GLM_GTX_transform \endlink extension - // - See also: \link glm::scale GLM_GTC_matrix_transform \endlink - template - detail::tmat4x4 scale( - detail::tmat4x4 const & m, - T x, T y, T z); - - //! Transforms a matrix with a scale 4 * 4 matrix created from a vector of 3 components. - //! - From \link gtx_transform GLM_GTX_transform \endlink extension - // - See also: \link glm::scale GLM_GTC_matrix_transform \endlink - template - detail::tmat4x4 scale( - detail::tvec3 const & v); - - /// @} -}// namespace glm - -#include "transform.inl" - -#endif//GLM_GTX_transform +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_transform +/// @file glm/gtx/transform.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtc_matrix_transform (dependence) +/// @see gtx_transform +/// @see gtx_transform2 +/// +/// @defgroup gtx_transform GLM_GTX_transform +/// @ingroup gtx +/// +/// @brief Add transformation matrices +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_transform +#define GLM_GTX_transform GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/matrix_transform.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_transform extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_transform + /// @{ + + //! Builds a translation 4 * 4 matrix created from 3 scalars. + //! - From \link gtx_transform GLM_GTX_transform \endlink extension + // - See also: \link glm::translate GLM_GTC_matrix_transform \endlink + template + detail::tmat4x4 translate( + T x, T y, T z); + + //! Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars. + //! - From \link gtx_transform GLM_GTX_transform \endlink extension + // - See also: \link glm::translate GLM_GTC_matrix_transform \endlink + template + detail::tmat4x4 translate( + detail::tmat4x4 const & m, + T x, T y, T z); + + //! Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars. + //! - From \link gtx_transform GLM_GTX_transform \endlink extension + // - See also: \link glm::translate GLM_GTC_matrix_transform \endlink + template + detail::tmat4x4 translate( + detail::tvec3 const & v); + + //! Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. + //! - From \link gtx_transform GLM_GTX_transform \endlink extension + // - See also: \link glm::rotate GLM_GTC_matrix_transform \endlink + template + detail::tmat4x4 rotate( + T angle, + T x, T y, T z); + + //! Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. + //! - From \link gtx_transform GLM_GTX_transform \endlink extension + // - See also: \link glm::rotate GLM_GTC_matrix_transform \endlink + template + detail::tmat4x4 rotate( + T angle, + detail::tvec3 const & v); + + //! Transforms a matrix with a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. + //! - From \link gtx_transform GLM_GTX_transform \endlink extension + // - See also: \link glm::rotate GLM_GTC_matrix_transform \endlink + template + detail::tmat4x4 rotate( + detail::tmat4x4 const & m, + T angle, + T x, T y, T z); + + //! Builds a scale 4 * 4 matrix created from 3 scalars. + //! - From \link gtx_transform GLM_GTX_transform \endlink extension + // - See also: \link glm::scale GLM_GTC_matrix_transform \endlink + template + detail::tmat4x4 scale( + T x, T y, T z); + + //! Transforms a matrix with a scale 4 * 4 matrix created from 3 scalars. + //! - From \link gtx_transform GLM_GTX_transform \endlink extension + // - See also: \link glm::scale GLM_GTC_matrix_transform \endlink + template + detail::tmat4x4 scale( + detail::tmat4x4 const & m, + T x, T y, T z); + + //! Transforms a matrix with a scale 4 * 4 matrix created from a vector of 3 components. + //! - From \link gtx_transform GLM_GTX_transform \endlink extension + // - See also: \link glm::scale GLM_GTC_matrix_transform \endlink + template + detail::tmat4x4 scale( + detail::tvec3 const & v); + + /// @} +}// namespace glm + +#include "transform.inl" + +#endif//GLM_GTX_transform diff --git a/include/gal/opengl/glm/gtx/transform.inl b/include/gal/opengl/glm/gtx/transform.inl index f22a93d128..3b6fde9498 100644 --- a/include/gal/opengl/glm/gtx/transform.inl +++ b/include/gal/opengl/glm/gtx/transform.inl @@ -1,90 +1,90 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2005-12-21 -// Updated : 2009-04-29 -// Licence : This source is under MIT License -// File : glm/gtx/transform.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER detail::tmat4x4 translate( - T x, T y, T z) - { - return translate( - detail::tmat4x4(1.0f), - detail::tvec3(x, y , z)); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 translate( - detail::tmat4x4 const & m, - T x, T y, T z) - { - return translate( - m, detail::tvec3(x, y , z)); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 translate( - detail::tvec3 const & v) - { - return translate( - detail::tmat4x4(1.0f), v); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 rotate( - T angle, - T x, T y, T z) - { - return rotate( - detail::tmat4x4(1), angle, detail::tvec3(x, y, z)); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 rotate( - T angle, - detail::tvec3 const & v) - { - return rotate( - detail::tmat4x4(1), angle, v); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 rotate( - detail::tmat4x4 const & m, - T angle, - T x, T y, T z) - { - return rotate( - m, angle, detail::tvec3(x, y, z)); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 scale(T x, T y, T z) - { - return scale( - detail::tmat4x4(1), detail::tvec3(x, y, z)); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 scale( - detail::tmat4x4 const & m, - T x, T y, T z) - { - return scale( - m, detail::tvec3(x, y, z)); - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 scale( - detail::tvec3 const & v) - { - return scale( - detail::tmat4x4(1.0f), v); - } - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-21 +// Updated : 2009-04-29 +// Licence : This source is under MIT License +// File : glm/gtx/transform.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tmat4x4 translate( + T x, T y, T z) + { + return translate( + detail::tmat4x4(1.0f), + detail::tvec3(x, y , z)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 translate( + detail::tmat4x4 const & m, + T x, T y, T z) + { + return translate( + m, detail::tvec3(x, y , z)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 translate( + detail::tvec3 const & v) + { + return translate( + detail::tmat4x4(1.0f), v); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 rotate( + T angle, + T x, T y, T z) + { + return rotate( + detail::tmat4x4(1), angle, detail::tvec3(x, y, z)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 rotate( + T angle, + detail::tvec3 const & v) + { + return rotate( + detail::tmat4x4(1), angle, v); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 rotate( + detail::tmat4x4 const & m, + T angle, + T x, T y, T z) + { + return rotate( + m, angle, detail::tvec3(x, y, z)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 scale(T x, T y, T z) + { + return scale( + detail::tmat4x4(1), detail::tvec3(x, y, z)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 scale( + detail::tmat4x4 const & m, + T x, T y, T z) + { + return scale( + m, detail::tvec3(x, y, z)); + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 scale( + detail::tvec3 const & v) + { + return scale( + detail::tmat4x4(1.0f), v); + } + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/transform2.hpp b/include/gal/opengl/glm/gtx/transform2.hpp index 719349a20a..0336e35854 100644 --- a/include/gal/opengl/glm/gtx/transform2.hpp +++ b/include/gal/opengl/glm/gtx/transform2.hpp @@ -1,135 +1,135 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_transform2 -/// @file glm/gtx/transform2.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_transform (dependence) -/// -/// @defgroup gtx_transform2 GLM_GTX_transform2 -/// @ingroup gtx -/// -/// @brief Add extra transformation matrices -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_transform2 -#define GLM_GTX_transform2 GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtx/transform.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_transform2 extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_transform2 - /// @{ - - //! Transforms a matrix with a shearing on X axis. - //! From GLM_GTX_transform2 extension. - template - detail::tmat3x3 shearX2D( - detail::tmat3x3 const & m, - T y); - - //! Transforms a matrix with a shearing on Y axis. - //! From GLM_GTX_transform2 extension. - template - detail::tmat3x3 shearY2D( - detail::tmat3x3 const & m, - T x); - - //! Transforms a matrix with a shearing on X axis - //! From GLM_GTX_transform2 extension. - template - detail::tmat4x4 shearX3D( - const detail::tmat4x4 & m, - T y, - T z); - - //! Transforms a matrix with a shearing on Y axis. - //! From GLM_GTX_transform2 extension. - template - detail::tmat4x4 shearY3D( - const detail::tmat4x4 & m, - T x, - T z); - - //! Transforms a matrix with a shearing on Z axis. - //! From GLM_GTX_transform2 extension. - template - detail::tmat4x4 shearZ3D( - const detail::tmat4x4 & m, - T x, - T y); - - //template GLM_FUNC_QUALIFIER detail::tmat4x4 shear(const detail::tmat4x4 & m, shearPlane, planePoint, angle) - // Identity + tan(angle) * cross(Normal, OnPlaneVector) 0 - // - dot(PointOnPlane, normal) * OnPlaneVector 1 - - // Reflect functions seem to don't work - //template detail::tmat3x3 reflect2D(const detail::tmat3x3 & m, const detail::tvec3& normal){return reflect2DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension) - //template detail::tmat4x4 reflect3D(const detail::tmat4x4 & m, const detail::tvec3& normal){return reflect3DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension) - - //! Build planar projection matrix along normal axis. - //! From GLM_GTX_transform2 extension. - template - detail::tmat3x3 proj2D( - const detail::tmat3x3 & m, - const detail::tvec3& normal); - - //! Build planar projection matrix along normal axis. - //! From GLM_GTX_transform2 extension. - template - detail::tmat4x4 proj3D( - const detail::tmat4x4 & m, - const detail::tvec3& normal); - - //! Build a scale bias matrix. - //! From GLM_GTX_transform2 extension. - template - detail::tmat4x4 scaleBias( - valType scale, - valType bias); - - //! Build a scale bias matrix. - //! From GLM_GTX_transform2 extension. - template - detail::tmat4x4 scaleBias( - detail::tmat4x4 const & m, - valType scale, - valType bias); - - /// @} -}// namespace glm - -#include "transform2.inl" - -#endif//GLM_GTX_transform2 +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_transform2 +/// @file glm/gtx/transform2.hpp +/// @date 2005-12-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_transform (dependence) +/// +/// @defgroup gtx_transform2 GLM_GTX_transform2 +/// @ingroup gtx +/// +/// @brief Add extra transformation matrices +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_transform2 +#define GLM_GTX_transform2 GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtx/transform.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_transform2 extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_transform2 + /// @{ + + //! Transforms a matrix with a shearing on X axis. + //! From GLM_GTX_transform2 extension. + template + detail::tmat3x3 shearX2D( + detail::tmat3x3 const & m, + T y); + + //! Transforms a matrix with a shearing on Y axis. + //! From GLM_GTX_transform2 extension. + template + detail::tmat3x3 shearY2D( + detail::tmat3x3 const & m, + T x); + + //! Transforms a matrix with a shearing on X axis + //! From GLM_GTX_transform2 extension. + template + detail::tmat4x4 shearX3D( + const detail::tmat4x4 & m, + T y, + T z); + + //! Transforms a matrix with a shearing on Y axis. + //! From GLM_GTX_transform2 extension. + template + detail::tmat4x4 shearY3D( + const detail::tmat4x4 & m, + T x, + T z); + + //! Transforms a matrix with a shearing on Z axis. + //! From GLM_GTX_transform2 extension. + template + detail::tmat4x4 shearZ3D( + const detail::tmat4x4 & m, + T x, + T y); + + //template GLM_FUNC_QUALIFIER detail::tmat4x4 shear(const detail::tmat4x4 & m, shearPlane, planePoint, angle) + // Identity + tan(angle) * cross(Normal, OnPlaneVector) 0 + // - dot(PointOnPlane, normal) * OnPlaneVector 1 + + // Reflect functions seem to don't work + //template detail::tmat3x3 reflect2D(const detail::tmat3x3 & m, const detail::tvec3& normal){return reflect2DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension) + //template detail::tmat4x4 reflect3D(const detail::tmat4x4 & m, const detail::tvec3& normal){return reflect3DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension) + + //! Build planar projection matrix along normal axis. + //! From GLM_GTX_transform2 extension. + template + detail::tmat3x3 proj2D( + const detail::tmat3x3 & m, + const detail::tvec3& normal); + + //! Build planar projection matrix along normal axis. + //! From GLM_GTX_transform2 extension. + template + detail::tmat4x4 proj3D( + const detail::tmat4x4 & m, + const detail::tvec3& normal); + + //! Build a scale bias matrix. + //! From GLM_GTX_transform2 extension. + template + detail::tmat4x4 scaleBias( + valType scale, + valType bias); + + //! Build a scale bias matrix. + //! From GLM_GTX_transform2 extension. + template + detail::tmat4x4 scaleBias( + detail::tmat4x4 const & m, + valType scale, + valType bias); + + /// @} +}// namespace glm + +#include "transform2.inl" + +#endif//GLM_GTX_transform2 diff --git a/include/gal/opengl/glm/gtx/transform2.inl b/include/gal/opengl/glm/gtx/transform2.inl index b423f7e805..aa1c1ed3d3 100644 --- a/include/gal/opengl/glm/gtx/transform2.inl +++ b/include/gal/opengl/glm/gtx/transform2.inl @@ -1,154 +1,154 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2005-02-28 -// Updated : 2005-04-23 -// Licence : This source is under MIT License -// File : glm/gtx/transform2.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER detail::tmat3x3 shearX2D( - const detail::tmat3x3& m, - T s) - { - detail::tmat3x3 r(1); - r[0][1] = s; - return m * r; - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x3 shearY2D( - const detail::tmat3x3& m, - T s) - { - detail::tmat3x3 r(1); - r[1][0] = s; - return m * r; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 shearX3D( - const detail::tmat4x4& m, - T s, - T t) - { - detail::tmat4x4 r(1); - r[1][0] = s; - r[2][0] = t; - return m * r; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 shearY3D( - const detail::tmat4x4& m, - T s, - T t) - { - detail::tmat4x4 r(1); - r[0][1] = s; - r[2][1] = t; - return m * r; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 shearZ3D( - const detail::tmat4x4& m, - T s, - T t) - { - detail::tmat4x4 r(1); - r[0][2] = s; - r[1][2] = t; - return m * r; - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x3 reflect2D( - const detail::tmat3x3& m, - const detail::tvec3& normal) - { - detail::tmat3x3 r(1); - r[0][0] = 1 - 2 * normal.x * normal.x; - r[0][1] = -2 * normal.x * normal.y; - r[1][0] = -2 * normal.x * normal.y; - r[1][1] = 1 - 2 * normal.y * normal.y; - return m * r; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 reflect3D( - const detail::tmat4x4& m, - const detail::tvec3& normal) - { - detail::tmat4x4 r(1); - r[0][0] = 1 - 2 * normal.x * normal.x; - r[0][1] = -2 * normal.x * normal.y; - r[0][2] = -2 * normal.x * normal.z; - - r[1][0] = -2 * normal.x * normal.y; - r[1][1] = 1 - 2 * normal.y * normal.y; - r[1][2] = -2 * normal.y * normal.z; - - r[2][0] = -2 * normal.x * normal.z; - r[2][1] = -2 * normal.y * normal.z; - r[2][2] = 1 - 2 * normal.z * normal.z; - return m * r; - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x3 proj2D( - const detail::tmat3x3& m, - const detail::tvec3& normal) - { - detail::tmat3x3 r(1); - r[0][0] = 1 - normal.x * normal.x; - r[0][1] = - normal.x * normal.y; - r[1][0] = - normal.x * normal.y; - r[1][1] = 1 - normal.y * normal.y; - return m * r; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 proj3D( - const detail::tmat4x4& m, - const detail::tvec3& normal) - { - detail::tmat4x4 r(1); - r[0][0] = 1 - normal.x * normal.x; - r[0][1] = - normal.x * normal.y; - r[0][2] = - normal.x * normal.z; - r[1][0] = - normal.x * normal.y; - r[1][1] = 1 - normal.y * normal.y; - r[1][2] = - normal.y * normal.z; - r[2][0] = - normal.x * normal.z; - r[2][1] = - normal.y * normal.z; - r[2][2] = 1 - normal.z * normal.z; - return m * r; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 scaleBias( - T scale, - T bias) - { - detail::tmat4x4 result; - result[3] = detail::tvec4(detail::tvec3(bias), T(1)); - result[0][0] = scale; - result[1][1] = scale; - result[2][2] = scale; - return result; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 scaleBias( - const detail::tmat4x4& m, - T scale, - T bias) - { - return m * scaleBias(scale, bias); - } -}//namespace glm - +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-02-28 +// Updated : 2005-04-23 +// Licence : This source is under MIT License +// File : glm/gtx/transform2.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER detail::tmat3x3 shearX2D( + const detail::tmat3x3& m, + T s) + { + detail::tmat3x3 r(1); + r[0][1] = s; + return m * r; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 shearY2D( + const detail::tmat3x3& m, + T s) + { + detail::tmat3x3 r(1); + r[1][0] = s; + return m * r; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 shearX3D( + const detail::tmat4x4& m, + T s, + T t) + { + detail::tmat4x4 r(1); + r[1][0] = s; + r[2][0] = t; + return m * r; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 shearY3D( + const detail::tmat4x4& m, + T s, + T t) + { + detail::tmat4x4 r(1); + r[0][1] = s; + r[2][1] = t; + return m * r; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 shearZ3D( + const detail::tmat4x4& m, + T s, + T t) + { + detail::tmat4x4 r(1); + r[0][2] = s; + r[1][2] = t; + return m * r; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 reflect2D( + const detail::tmat3x3& m, + const detail::tvec3& normal) + { + detail::tmat3x3 r(1); + r[0][0] = 1 - 2 * normal.x * normal.x; + r[0][1] = -2 * normal.x * normal.y; + r[1][0] = -2 * normal.x * normal.y; + r[1][1] = 1 - 2 * normal.y * normal.y; + return m * r; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 reflect3D( + const detail::tmat4x4& m, + const detail::tvec3& normal) + { + detail::tmat4x4 r(1); + r[0][0] = 1 - 2 * normal.x * normal.x; + r[0][1] = -2 * normal.x * normal.y; + r[0][2] = -2 * normal.x * normal.z; + + r[1][0] = -2 * normal.x * normal.y; + r[1][1] = 1 - 2 * normal.y * normal.y; + r[1][2] = -2 * normal.y * normal.z; + + r[2][0] = -2 * normal.x * normal.z; + r[2][1] = -2 * normal.y * normal.z; + r[2][2] = 1 - 2 * normal.z * normal.z; + return m * r; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 proj2D( + const detail::tmat3x3& m, + const detail::tvec3& normal) + { + detail::tmat3x3 r(1); + r[0][0] = 1 - normal.x * normal.x; + r[0][1] = - normal.x * normal.y; + r[1][0] = - normal.x * normal.y; + r[1][1] = 1 - normal.y * normal.y; + return m * r; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 proj3D( + const detail::tmat4x4& m, + const detail::tvec3& normal) + { + detail::tmat4x4 r(1); + r[0][0] = 1 - normal.x * normal.x; + r[0][1] = - normal.x * normal.y; + r[0][2] = - normal.x * normal.z; + r[1][0] = - normal.x * normal.y; + r[1][1] = 1 - normal.y * normal.y; + r[1][2] = - normal.y * normal.z; + r[2][0] = - normal.x * normal.z; + r[2][1] = - normal.y * normal.z; + r[2][2] = 1 - normal.z * normal.z; + return m * r; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 scaleBias( + T scale, + T bias) + { + detail::tmat4x4 result; + result[3] = detail::tvec4(detail::tvec3(bias), T(1)); + result[0][0] = scale; + result[1][1] = scale; + result[2][2] = scale; + return result; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 scaleBias( + const detail::tmat4x4& m, + T scale, + T bias) + { + return m * scaleBias(scale, bias); + } +}//namespace glm + diff --git a/include/gal/opengl/glm/gtx/ulp.hpp b/include/gal/opengl/glm/gtx/ulp.hpp index 963f1f4cda..431d80e524 100644 --- a/include/gal/opengl/glm/gtx/ulp.hpp +++ b/include/gal/opengl/glm/gtx/ulp.hpp @@ -1,29 +1,29 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/////////////////////////////////////////////////////////////////////////////////// - -#if(defined(GLM_MESSAGES)) -# pragma message("GLM: GLM_GTX_ulp extension is deprecated, include GLM_GTC_ulp (glm/gtc/ulp.hpp) instead") -#endif - -// Promoted: -#include "../gtc/ulp.hpp" +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/////////////////////////////////////////////////////////////////////////////////// + +#if(defined(GLM_MESSAGES)) +# pragma message("GLM: GLM_GTX_ulp extension is deprecated, include GLM_GTC_ulp (glm/gtc/ulp.hpp) instead") +#endif + +// Promoted: +#include "../gtc/ulp.hpp" diff --git a/include/gal/opengl/glm/gtx/unsigned_int.hpp b/include/gal/opengl/glm/gtx/unsigned_int.hpp index 982d469665..c17719d862 100644 --- a/include/gal/opengl/glm/gtx/unsigned_int.hpp +++ b/include/gal/opengl/glm/gtx/unsigned_int.hpp @@ -1,26 +1,26 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/////////////////////////////////////////////////////////////////////////////////// - -#if(defined(GLM_MESSAGES)) -# pragma message("GLM: GLM_GTX_unsigned_int extension is deprecated, include GLM_GTX_integer instead") -#endif +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/////////////////////////////////////////////////////////////////////////////////// + +#if(defined(GLM_MESSAGES)) +# pragma message("GLM: GLM_GTX_unsigned_int extension is deprecated, include GLM_GTX_integer instead") +#endif diff --git a/include/gal/opengl/glm/gtx/unsigned_int.inl b/include/gal/opengl/glm/gtx/unsigned_int.inl index 2d60c56444..b73461d4ff 100644 --- a/include/gal/opengl/glm/gtx/unsigned_int.inl +++ b/include/gal/opengl/glm/gtx/unsigned_int.inl @@ -1,13 +1,13 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2005-12-24 -// Updated : 2008-10-07 -// Licence : This source is under MIT License -// File : glm/gtx/unsigned_int.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-24 +// Updated : 2008-10-07 +// Licence : This source is under MIT License +// File : glm/gtx/unsigned_int.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/vec1.hpp b/include/gal/opengl/glm/gtx/vec1.hpp index 3634129b94..0d4a4af8fd 100644 --- a/include/gal/opengl/glm/gtx/vec1.hpp +++ b/include/gal/opengl/glm/gtx/vec1.hpp @@ -1,137 +1,137 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_vec1 -/// @file glm/gtx/vec1.hpp -/// @date 2010-02-08 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_vec1 GLM_GTX_vec1 -/// @ingroup gtx -/// -/// @brief Add vec1, ivec1, uvec1 and bvec1 types. -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_vec1 -#define GLM_GTX_vec1 GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../core/type_vec1.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_vec1 extension included") -#endif - -namespace glm -{ - //! 1 component vector of high precision floating-point numbers. - //! There is no guarantee on the actual precision. - //! From GLM_GTX_vec1 extension. - typedef detail::highp_vec1_t highp_vec1; - //! 1 component vector of medium precision floating-point numbers. - //! There is no guarantee on the actual precision. - //! From GLM_GTX_vec1 extension. - typedef detail::mediump_vec1_t mediump_vec1; - //! 1 component vector of low precision floating-point numbers. - //! There is no guarantee on the actual precision. - //! From GLM_GTX_vec1 extension. - typedef detail::lowp_vec1_t lowp_vec1; - - //! 1 component vector of high precision signed integer numbers. - //! There is no guarantee on the actual precision. - //! From GLM_GTX_vec1 extension. - typedef detail::highp_ivec1_t highp_ivec1; - //! 1 component vector of medium precision signed integer numbers. - //! There is no guarantee on the actual precision. - //! From GLM_GTX_vec1 extension. - typedef detail::mediump_ivec1_t mediump_ivec1; - //! 1 component vector of low precision signed integer numbers. - //! There is no guarantee on the actual precision. - //! From GLM_GTX_vec1 extension. - typedef detail::lowp_ivec1_t lowp_ivec1; - - //! 1 component vector of high precision unsigned integer numbers. - //! There is no guarantee on the actual precision. - //! From GLM_GTX_vec1 extension. - typedef detail::highp_uvec1_t highp_uvec1; - //! 1 component vector of medium precision unsigned integer numbers. - //! There is no guarantee on the actual precision. - //! From GLM_GTX_vec1 extension. - typedef detail::mediump_uvec1_t mediump_uvec1; - //! 1 component vector of low precision unsigned integer numbers. - //! There is no guarantee on the actual precision. - //! From GLM_GTX_vec1 extension. - typedef detail::lowp_uvec1_t lowp_uvec1; - - ////////////////////////// - // vec1 definition - - //! 1 component vector of boolean. - //! From GLM_GTX_vec1 extension. - typedef detail::tvec1 bvec1; - -#if(defined(GLM_PRECISION_HIGHP_FLOAT)) - typedef highp_vec1 vec1; -#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT)) - typedef mediump_vec1 vec1; -#elif(defined(GLM_PRECISION_LOWP_FLOAT)) - typedef lowp_vec1 vec1; -#else - //! 1 component vector of floating-point numbers. - //! From GLM_GTX_vec1 extension. - typedef mediump_vec1 vec1; -#endif//GLM_PRECISION - -#if(defined(GLM_PRECISION_HIGHP_INT)) - typedef highp_ivec1 ivec1; -#elif(defined(GLM_PRECISION_MEDIUMP_INT)) - typedef mediump_ivec1 ivec1; -#elif(defined(GLM_PRECISION_LOWP_INT)) - typedef lowp_ivec1 ivec1; -#else - //! 1 component vector of signed integer numbers. - //! From GLM_GTX_vec1 extension. - typedef mediump_ivec1 ivec1; -#endif//GLM_PRECISION - -#if(defined(GLM_PRECISION_HIGHP_UINT)) - typedef highp_uvec1 uvec1; -#elif(defined(GLM_PRECISION_MEDIUMP_UINT)) - typedef mediump_uvec1 uvec1; -#elif(defined(GLM_PRECISION_LOWP_UINT)) - typedef lowp_uvec1 uvec1; -#else - //! 1 component vector of unsigned integer numbers. - //! From GLM_GTX_vec1 extension. - typedef mediump_uvec1 uvec1; -#endif//GLM_PRECISION - -}// namespace glm - -#include "vec1.inl" - -#endif//GLM_GTX_vec1 - +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_vec1 +/// @file glm/gtx/vec1.hpp +/// @date 2010-02-08 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_vec1 GLM_GTX_vec1 +/// @ingroup gtx +/// +/// @brief Add vec1, ivec1, uvec1 and bvec1 types. +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_vec1 +#define GLM_GTX_vec1 GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../core/type_vec1.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_vec1 extension included") +#endif + +namespace glm +{ + //! 1 component vector of high precision floating-point numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::highp_vec1_t highp_vec1; + //! 1 component vector of medium precision floating-point numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::mediump_vec1_t mediump_vec1; + //! 1 component vector of low precision floating-point numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::lowp_vec1_t lowp_vec1; + + //! 1 component vector of high precision signed integer numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::highp_ivec1_t highp_ivec1; + //! 1 component vector of medium precision signed integer numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::mediump_ivec1_t mediump_ivec1; + //! 1 component vector of low precision signed integer numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::lowp_ivec1_t lowp_ivec1; + + //! 1 component vector of high precision unsigned integer numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::highp_uvec1_t highp_uvec1; + //! 1 component vector of medium precision unsigned integer numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::mediump_uvec1_t mediump_uvec1; + //! 1 component vector of low precision unsigned integer numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::lowp_uvec1_t lowp_uvec1; + + ////////////////////////// + // vec1 definition + + //! 1 component vector of boolean. + //! From GLM_GTX_vec1 extension. + typedef detail::tvec1 bvec1; + +#if(defined(GLM_PRECISION_HIGHP_FLOAT)) + typedef highp_vec1 vec1; +#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT)) + typedef mediump_vec1 vec1; +#elif(defined(GLM_PRECISION_LOWP_FLOAT)) + typedef lowp_vec1 vec1; +#else + //! 1 component vector of floating-point numbers. + //! From GLM_GTX_vec1 extension. + typedef mediump_vec1 vec1; +#endif//GLM_PRECISION + +#if(defined(GLM_PRECISION_HIGHP_INT)) + typedef highp_ivec1 ivec1; +#elif(defined(GLM_PRECISION_MEDIUMP_INT)) + typedef mediump_ivec1 ivec1; +#elif(defined(GLM_PRECISION_LOWP_INT)) + typedef lowp_ivec1 ivec1; +#else + //! 1 component vector of signed integer numbers. + //! From GLM_GTX_vec1 extension. + typedef mediump_ivec1 ivec1; +#endif//GLM_PRECISION + +#if(defined(GLM_PRECISION_HIGHP_UINT)) + typedef highp_uvec1 uvec1; +#elif(defined(GLM_PRECISION_MEDIUMP_UINT)) + typedef mediump_uvec1 uvec1; +#elif(defined(GLM_PRECISION_LOWP_UINT)) + typedef lowp_uvec1 uvec1; +#else + //! 1 component vector of unsigned integer numbers. + //! From GLM_GTX_vec1 extension. + typedef mediump_uvec1 uvec1; +#endif//GLM_PRECISION + +}// namespace glm + +#include "vec1.inl" + +#endif//GLM_GTX_vec1 + diff --git a/include/gal/opengl/glm/gtx/vector_access.hpp b/include/gal/opengl/glm/gtx/vector_access.hpp index 19799594c6..7b1c54a51b 100644 --- a/include/gal/opengl/glm/gtx/vector_access.hpp +++ b/include/gal/opengl/glm/gtx/vector_access.hpp @@ -1,85 +1,85 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_vector_access -/// @file glm/gtx/vector_access.hpp -/// @date 2006-01-16 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_vector_access GLM_GTX_vector_access -/// @ingroup gtx -/// -/// @brief Function to set values to vectors -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_vector_access -#define GLM_GTX_vector_access GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_vector_access extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_vector_access - /// @{ - - //! Set values to a 2 components vector. - //! From GLM_GTX_vector_access extension. - template - void set( - detail::tvec2 & v, - valType const & x, - valType const & y); - - //! Set values to a 3 components vector. - //! From GLM_GTX_vector_access extension. - template - void set( - detail::tvec3 & v, - valType const & x, - valType const & y, - valType const & z); - - //! Set values to a 4 components vector. - //! From GLM_GTX_vector_access extension. - template - void set( - detail::tvec4 & v, - valType const & x, - valType const & y, - valType const & z, - valType const & w); - - /// @} -}//namespace glm - -#include "vector_access.inl" - -#endif//GLM_GTX_vector_access +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_vector_access +/// @file glm/gtx/vector_access.hpp +/// @date 2006-01-16 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_vector_access GLM_GTX_vector_access +/// @ingroup gtx +/// +/// @brief Function to set values to vectors +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_vector_access +#define GLM_GTX_vector_access GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_vector_access extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_vector_access + /// @{ + + //! Set values to a 2 components vector. + //! From GLM_GTX_vector_access extension. + template + void set( + detail::tvec2 & v, + valType const & x, + valType const & y); + + //! Set values to a 3 components vector. + //! From GLM_GTX_vector_access extension. + template + void set( + detail::tvec3 & v, + valType const & x, + valType const & y, + valType const & z); + + //! Set values to a 4 components vector. + //! From GLM_GTX_vector_access extension. + template + void set( + detail::tvec4 & v, + valType const & x, + valType const & y, + valType const & z, + valType const & w); + + /// @} +}//namespace glm + +#include "vector_access.inl" + +#endif//GLM_GTX_vector_access diff --git a/include/gal/opengl/glm/gtx/vector_access.inl b/include/gal/opengl/glm/gtx/vector_access.inl index 75660b4c05..8ccb5558e6 100644 --- a/include/gal/opengl/glm/gtx/vector_access.inl +++ b/include/gal/opengl/glm/gtx/vector_access.inl @@ -1,53 +1,53 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2006-01-16 -// Updated : 2008-10-07 -// Licence : This source is under MIT License -// File : glm/gtx/vector_access.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER void set - ( - detail::tvec2& v, - valType const & x, - valType const & y - ) - { - v.x = x; - v.y = y; - } - - template - GLM_FUNC_QUALIFIER void set - ( - detail::tvec3& v, - valType const & x, - valType const & y, - valType const & z - ) - { - v.x = x; - v.y = y; - v.z = z; - } - - template - GLM_FUNC_QUALIFIER void set - ( - detail::tvec4& v, - valType const & x, - valType const & y, - valType const & z, - valType const & w - ) - { - v.x = x; - v.y = y; - v.z = z; - v.w = w; - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2006-01-16 +// Updated : 2008-10-07 +// Licence : This source is under MIT License +// File : glm/gtx/vector_access.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER void set + ( + detail::tvec2& v, + valType const & x, + valType const & y + ) + { + v.x = x; + v.y = y; + } + + template + GLM_FUNC_QUALIFIER void set + ( + detail::tvec3& v, + valType const & x, + valType const & y, + valType const & z + ) + { + v.x = x; + v.y = y; + v.z = z; + } + + template + GLM_FUNC_QUALIFIER void set + ( + detail::tvec4& v, + valType const & x, + valType const & y, + valType const & z, + valType const & w + ) + { + v.x = x; + v.y = y; + v.z = z; + v.w = w; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/vector_angle.hpp b/include/gal/opengl/glm/gtx/vector_angle.hpp index c2f6777a76..bf01653400 100644 --- a/include/gal/opengl/glm/gtx/vector_angle.hpp +++ b/include/gal/opengl/glm/gtx/vector_angle.hpp @@ -1,88 +1,88 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_vector_angle -/// @file glm/gtx/vector_angle.hpp -/// @date 2005-12-30 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtx_quaternion (dependence) -/// @see gtx_epsilon (dependence) -/// -/// @defgroup gtx_vector_angle GLM_GTX_vector_angle -/// @ingroup gtx -/// -/// @brief Compute angle between vectors -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_vector_angle -#define GLM_GTX_vector_angle GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include "../gtc/epsilon.hpp" -#include "../gtx/quaternion.hpp" -#include "../gtx/rotate_vector.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_vector_angle extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_vector_angle - /// @{ - - //! Returns the absolute angle between two vectors - //! Parameters need to be normalized. - //! From GLM_GTX_vector_angle extension - template - GLM_FUNC_QUALIFIER typename vecType::value_type angle( - vecType const & x, - vecType const & y); - - //! Returns the oriented angle between two 2d vectors - //! Parameters need to be normalized. - //! From GLM_GTX_vector_angle extension. - template - GLM_FUNC_QUALIFIER T orientedAngle( - detail::tvec2 const & x, - detail::tvec2 const & y); - - //! Returns the oriented angle between two 3d vectors based from a reference axis. - //! Parameters need to be normalized. - //! From GLM_GTX_vector_angle extension. - template - GLM_FUNC_QUALIFIER T orientedAngle( - detail::tvec3 const & x, - detail::tvec3 const & y, - detail::tvec3 const & ref); - - /// @} -}// namespace glm - -#include "vector_angle.inl" - -#endif//GLM_GTX_vector_angle +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_vector_angle +/// @file glm/gtx/vector_angle.hpp +/// @date 2005-12-30 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// @see gtx_quaternion (dependence) +/// @see gtx_epsilon (dependence) +/// +/// @defgroup gtx_vector_angle GLM_GTX_vector_angle +/// @ingroup gtx +/// +/// @brief Compute angle between vectors +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_vector_angle +#define GLM_GTX_vector_angle GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include "../gtc/epsilon.hpp" +#include "../gtx/quaternion.hpp" +#include "../gtx/rotate_vector.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_vector_angle extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_vector_angle + /// @{ + + //! Returns the absolute angle between two vectors + //! Parameters need to be normalized. + //! From GLM_GTX_vector_angle extension + template + GLM_FUNC_QUALIFIER typename vecType::value_type angle( + vecType const & x, + vecType const & y); + + //! Returns the oriented angle between two 2d vectors + //! Parameters need to be normalized. + //! From GLM_GTX_vector_angle extension. + template + GLM_FUNC_QUALIFIER T orientedAngle( + detail::tvec2 const & x, + detail::tvec2 const & y); + + //! Returns the oriented angle between two 3d vectors based from a reference axis. + //! Parameters need to be normalized. + //! From GLM_GTX_vector_angle extension. + template + GLM_FUNC_QUALIFIER T orientedAngle( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 const & ref); + + /// @} +}// namespace glm + +#include "vector_angle.inl" + +#endif//GLM_GTX_vector_angle diff --git a/include/gal/opengl/glm/gtx/vector_angle.inl b/include/gal/opengl/glm/gtx/vector_angle.inl index 196ff16a16..183f1c7f68 100644 --- a/include/gal/opengl/glm/gtx/vector_angle.inl +++ b/include/gal/opengl/glm/gtx/vector_angle.inl @@ -1,57 +1,57 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2005-12-30 -// Updated : 2008-09-29 -// Licence : This source is under MIT License -// File : glm/gtx/vector_angle.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER typename genType::value_type angle - ( - genType const & x, - genType const & y - ) - { - return degrees(acos(dot(x, y))); - } - - //! \todo epsilon is hard coded to 0.01 - template - GLM_FUNC_QUALIFIER valType orientedAngle - ( - detail::tvec2 const & x, - detail::tvec2 const & y - ) - { -#ifdef GLM_FORCE_RADIANS - valType const Angle(acos(dot(x, y))); -#else - valType const Angle(glm::degrees(acos(dot(x, y)))); -#endif - detail::tvec2 const TransformedVector(glm::rotate(x, Angle)); - if(all(epsilonEqual(y, TransformedVector, valType(0.01)))) - return Angle; - else - return -Angle; - } - - template - GLM_FUNC_QUALIFIER valType orientedAngle - ( - detail::tvec3 const & x, - detail::tvec3 const & y, - detail::tvec3 const & ref - ) - { - valType const Angle(glm::degrees(glm::acos(glm::dot(x, y)))); - - if(glm::dot(ref, glm::cross(x, y)) < valType(0)) - return -Angle; - else - return Angle; - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2005-12-30 +// Updated : 2008-09-29 +// Licence : This source is under MIT License +// File : glm/gtx/vector_angle.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER typename genType::value_type angle + ( + genType const & x, + genType const & y + ) + { + return degrees(acos(dot(x, y))); + } + + //! \todo epsilon is hard coded to 0.01 + template + GLM_FUNC_QUALIFIER valType orientedAngle + ( + detail::tvec2 const & x, + detail::tvec2 const & y + ) + { +#ifdef GLM_FORCE_RADIANS + valType const Angle(acos(dot(x, y))); +#else + valType const Angle(glm::degrees(acos(dot(x, y)))); +#endif + detail::tvec2 const TransformedVector(glm::rotate(x, Angle)); + if(all(epsilonEqual(y, TransformedVector, valType(0.01)))) + return Angle; + else + return -Angle; + } + + template + GLM_FUNC_QUALIFIER valType orientedAngle + ( + detail::tvec3 const & x, + detail::tvec3 const & y, + detail::tvec3 const & ref + ) + { + valType const Angle(glm::degrees(glm::acos(glm::dot(x, y)))); + + if(glm::dot(ref, glm::cross(x, y)) < valType(0)) + return -Angle; + else + return Angle; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/vector_query.hpp b/include/gal/opengl/glm/gtx/vector_query.hpp index 3e50400e86..a04ea91b11 100644 --- a/include/gal/opengl/glm/gtx/vector_query.hpp +++ b/include/gal/opengl/glm/gtx/vector_query.hpp @@ -1,112 +1,112 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_vector_query -/// @file glm/gtx/vector_query.hpp -/// @date 2008-03-10 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_vector_query GLM_GTX_vector_query -/// @ingroup gtx -/// -/// @brief Query informations of vector types -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_vector_query -#define GLM_GTX_vector_query GLM_VERSION - -// Dependency: -#include "../glm.hpp" -#include -#include - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_vector_query extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_vector_query - /// @{ - - //! Check whether two vectors are collinears. - //! From GLM_GTX_vector_query extensions. - template - bool areCollinear( - genType const & v0, - genType const & v1, - typename genType::value_type const & epsilon/* = std::numeric_limits::epsilon()*/); - - //! Check whether two vectors are orthogonals. - //! From GLM_GTX_vector_query extensions. - template - bool areOrthogonal( - genType const & v0, - genType const & v1, - typename genType::value_type const & epsilon/* = std::numeric_limits::epsilon()*/); - - //! Check whether a vector is normalized. - //! From GLM_GTX_vector_query extensions. - template class vecType> - bool isNormalized( - vecType const & v, - genType const & epsilon/* = std::numeric_limits::epsilon()*/); - - //! Check whether a vector is null. - //! From GLM_GTX_vector_query extensions. - template - bool isNull( - detail::tvec2 const & v, - valType const & epsilon/* = std::numeric_limits::epsilon()*/); - - //! Check whether a vector is null. - //! From GLM_GTX_vector_query extensions. - template - bool isNull( - detail::tvec3 const & v, - valType const & epsilon/* = std::numeric_limits::epsilon()*/); - - //! Check whether a vector is null. - //! From GLM_GTX_vector_query extensions. - template - bool isNull( - detail::tvec4 const & v, - valType const & epsilon/* = std::numeric_limits::epsilon()*/); - - //! Check whether two vectors are orthonormal. - //! From GLM_GTX_vector_query extensions. - template - bool areOrthonormal( - genType const & v0, - genType const & v1, - typename genType::value_type const & epsilon/* = std::numeric_limits::epsilon()*/); - - /// @} -}// namespace glm - -#include "vector_query.inl" - -#endif//GLM_GTX_vector_query +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_vector_query +/// @file glm/gtx/vector_query.hpp +/// @date 2008-03-10 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_vector_query GLM_GTX_vector_query +/// @ingroup gtx +/// +/// @brief Query informations of vector types +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_vector_query +#define GLM_GTX_vector_query GLM_VERSION + +// Dependency: +#include "../glm.hpp" +#include +#include + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_vector_query extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_vector_query + /// @{ + + //! Check whether two vectors are collinears. + //! From GLM_GTX_vector_query extensions. + template + bool areCollinear( + genType const & v0, + genType const & v1, + typename genType::value_type const & epsilon/* = std::numeric_limits::epsilon()*/); + + //! Check whether two vectors are orthogonals. + //! From GLM_GTX_vector_query extensions. + template + bool areOrthogonal( + genType const & v0, + genType const & v1, + typename genType::value_type const & epsilon/* = std::numeric_limits::epsilon()*/); + + //! Check whether a vector is normalized. + //! From GLM_GTX_vector_query extensions. + template class vecType> + bool isNormalized( + vecType const & v, + genType const & epsilon/* = std::numeric_limits::epsilon()*/); + + //! Check whether a vector is null. + //! From GLM_GTX_vector_query extensions. + template + bool isNull( + detail::tvec2 const & v, + valType const & epsilon/* = std::numeric_limits::epsilon()*/); + + //! Check whether a vector is null. + //! From GLM_GTX_vector_query extensions. + template + bool isNull( + detail::tvec3 const & v, + valType const & epsilon/* = std::numeric_limits::epsilon()*/); + + //! Check whether a vector is null. + //! From GLM_GTX_vector_query extensions. + template + bool isNull( + detail::tvec4 const & v, + valType const & epsilon/* = std::numeric_limits::epsilon()*/); + + //! Check whether two vectors are orthonormal. + //! From GLM_GTX_vector_query extensions. + template + bool areOrthonormal( + genType const & v0, + genType const & v1, + typename genType::value_type const & epsilon/* = std::numeric_limits::epsilon()*/); + + /// @} +}// namespace glm + +#include "vector_query.inl" + +#endif//GLM_GTX_vector_query diff --git a/include/gal/opengl/glm/gtx/vector_query.inl b/include/gal/opengl/glm/gtx/vector_query.inl index 8cff371943..d0906e1cfc 100644 --- a/include/gal/opengl/glm/gtx/vector_query.inl +++ b/include/gal/opengl/glm/gtx/vector_query.inl @@ -1,164 +1,164 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2007-03-05 -// Updated : 2010-02-16 -// Licence : This source is under MIT License -// File : glm/gtx/vector_query.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Dependency: -// - GLM core -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#include - -namespace glm -{ - template - GLM_FUNC_QUALIFIER bool areCollinear - ( - detail::tvec2 const & v0, - detail::tvec2 const & v1, - typename detail::tvec2::value_type const & epsilon - ) - { - return length(cross(detail::tvec3(v0, T(0)), detail::tvec3(v1, T(0)))) < epsilon; - } - - template - GLM_FUNC_QUALIFIER bool areCollinear - ( - detail::tvec3 const & v0, - detail::tvec3 const & v1, - typename detail::tvec3::value_type const & epsilon - ) - { - return length(cross(v0, v1)) < epsilon; - } - - template - GLM_FUNC_QUALIFIER bool areCollinear - ( - detail::tvec4 const & v0, - detail::tvec4 const & v1, - typename detail::tvec4::value_type const & epsilon - ) - { - return length(cross(detail::tvec3(v0), detail::tvec3(v1))) < epsilon; - } - - template - GLM_FUNC_QUALIFIER bool areOrthogonal - ( - genType const & v0, - genType const & v1, - typename genType::value_type const & epsilon - ) - { - return abs(dot(v0, v1)) <= max( - typename genType::value_type(1), - length(v0)) * max( - typename genType::value_type(1), - length(v1)) * epsilon; - } - - template class vecType> - GLM_FUNC_QUALIFIER bool isNormalized - ( - vecType const & v, - genType const & epsilon - ) - { - return abs(length(v) - genType(1)) <= genType(2) * epsilon; - } - - template - GLM_FUNC_QUALIFIER bool isNull - ( - detail::tvec2 const & v, - valType const & epsilon - ) - { - return length(v) <= epsilon; - } - - template - GLM_FUNC_QUALIFIER bool isNull - ( - detail::tvec3 const & v, - valType const & epsilon - ) - { - return length(v) <= epsilon; - } - - template - GLM_FUNC_QUALIFIER bool isNull - ( - detail::tvec4 const & v, - valType const & epsilon - ) - { - return length(v) <= epsilon; - } - - template - GLM_FUNC_QUALIFIER bool isCompNull - ( - T const & s, - T const & epsilon - ) - { - return abs(s) < epsilon; - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 isCompNull - ( - detail::tvec2 const & v, - T const & epsilon) - { - return detail::tvec2( - (abs(v.x) < epsilon), - (abs(v.y) < epsilon)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 isCompNull - ( - detail::tvec3 const & v, - T const & epsilon - ) - { - return detail::tvec3( - abs(v.x) < epsilon, - abs(v.y) < epsilon, - abs(v.z) < epsilon); - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 isCompNull - ( - detail::tvec4 const & v, - T const & epsilon - ) - { - return detail::tvec4( - abs(v.x) < epsilon, - abs(v.y) < epsilon, - abs(v.z) < epsilon, - abs(v.w) < epsilon); - } - - template - GLM_FUNC_QUALIFIER bool areOrthonormal - ( - genType const & v0, - genType const & v1, - typename genType::value_type const & epsilon - ) - { - return isNormalized(v0, epsilon) && isNormalized(v1, epsilon) && (abs(dot(v0, v1)) <= epsilon); - } - -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2007-03-05 +// Updated : 2010-02-16 +// Licence : This source is under MIT License +// File : glm/gtx/vector_query.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Dependency: +// - GLM core +/////////////////////////////////////////////////////////////////////////////////////////////////// + +#include + +namespace glm +{ + template + GLM_FUNC_QUALIFIER bool areCollinear + ( + detail::tvec2 const & v0, + detail::tvec2 const & v1, + typename detail::tvec2::value_type const & epsilon + ) + { + return length(cross(detail::tvec3(v0, T(0)), detail::tvec3(v1, T(0)))) < epsilon; + } + + template + GLM_FUNC_QUALIFIER bool areCollinear + ( + detail::tvec3 const & v0, + detail::tvec3 const & v1, + typename detail::tvec3::value_type const & epsilon + ) + { + return length(cross(v0, v1)) < epsilon; + } + + template + GLM_FUNC_QUALIFIER bool areCollinear + ( + detail::tvec4 const & v0, + detail::tvec4 const & v1, + typename detail::tvec4::value_type const & epsilon + ) + { + return length(cross(detail::tvec3(v0), detail::tvec3(v1))) < epsilon; + } + + template + GLM_FUNC_QUALIFIER bool areOrthogonal + ( + genType const & v0, + genType const & v1, + typename genType::value_type const & epsilon + ) + { + return abs(dot(v0, v1)) <= max( + typename genType::value_type(1), + length(v0)) * max( + typename genType::value_type(1), + length(v1)) * epsilon; + } + + template class vecType> + GLM_FUNC_QUALIFIER bool isNormalized + ( + vecType const & v, + genType const & epsilon + ) + { + return abs(length(v) - genType(1)) <= genType(2) * epsilon; + } + + template + GLM_FUNC_QUALIFIER bool isNull + ( + detail::tvec2 const & v, + valType const & epsilon + ) + { + return length(v) <= epsilon; + } + + template + GLM_FUNC_QUALIFIER bool isNull + ( + detail::tvec3 const & v, + valType const & epsilon + ) + { + return length(v) <= epsilon; + } + + template + GLM_FUNC_QUALIFIER bool isNull + ( + detail::tvec4 const & v, + valType const & epsilon + ) + { + return length(v) <= epsilon; + } + + template + GLM_FUNC_QUALIFIER bool isCompNull + ( + T const & s, + T const & epsilon + ) + { + return abs(s) < epsilon; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 isCompNull + ( + detail::tvec2 const & v, + T const & epsilon) + { + return detail::tvec2( + (abs(v.x) < epsilon), + (abs(v.y) < epsilon)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 isCompNull + ( + detail::tvec3 const & v, + T const & epsilon + ) + { + return detail::tvec3( + abs(v.x) < epsilon, + abs(v.y) < epsilon, + abs(v.z) < epsilon); + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 isCompNull + ( + detail::tvec4 const & v, + T const & epsilon + ) + { + return detail::tvec4( + abs(v.x) < epsilon, + abs(v.y) < epsilon, + abs(v.z) < epsilon, + abs(v.w) < epsilon); + } + + template + GLM_FUNC_QUALIFIER bool areOrthonormal + ( + genType const & v0, + genType const & v1, + typename genType::value_type const & epsilon + ) + { + return isNormalized(v0, epsilon) && isNormalized(v1, epsilon) && (abs(dot(v0, v1)) <= epsilon); + } + +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/verbose_operator.hpp b/include/gal/opengl/glm/gtx/verbose_operator.hpp index 2afd39eb26..7e861537e5 100644 --- a/include/gal/opengl/glm/gtx/verbose_operator.hpp +++ b/include/gal/opengl/glm/gtx/verbose_operator.hpp @@ -1,83 +1,83 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_verbose_operator -/// @file glm/gtx/verbose_operator.hpp -/// @date 2007-05-21 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_verbose_operator GLM_GTX_verbose_operator -/// @ingroup gtx -/// -/// @brief Use words to replace operators -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_verbose_operator -#define GLM_GTX_verbose_operator GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_verbose_operator extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_verbose_operator - /// @{ - - //! Addition of two values - //! From GLM_GTX_verbose_operator extension. - template - genTypeT add(genTypeT const & a, genTypeU const & b); - - //! Substration of two values - //! From GLM_GTX_verbose_operator extension. - template - genTypeT sub(genTypeT const & a, genTypeU const & b); - - //! Multiplication of two values - //! From GLM_GTX_verbose_operator extension. - template - genTypeT mul(genTypeT const & a, genTypeU const & b); - - //! Division of two values - //! From GLM_GTX_verbose_operator extension. - template - genTypeT div(genTypeT const & a, genTypeU const & b); - - //! Multiplication and addition of three values - //! From GLM_GTX_verbose_operator extension. - template - genTypeT mad(genTypeT const & a, genTypeU const & b, genTypeV const & c); - - /// @} -}// namespace glm - -#include "verbose_operator.inl" - -#endif//GLM_GTX_verbose_operator +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_verbose_operator +/// @file glm/gtx/verbose_operator.hpp +/// @date 2007-05-21 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_verbose_operator GLM_GTX_verbose_operator +/// @ingroup gtx +/// +/// @brief Use words to replace operators +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_verbose_operator +#define GLM_GTX_verbose_operator GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_verbose_operator extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_verbose_operator + /// @{ + + //! Addition of two values + //! From GLM_GTX_verbose_operator extension. + template + genTypeT add(genTypeT const & a, genTypeU const & b); + + //! Substration of two values + //! From GLM_GTX_verbose_operator extension. + template + genTypeT sub(genTypeT const & a, genTypeU const & b); + + //! Multiplication of two values + //! From GLM_GTX_verbose_operator extension. + template + genTypeT mul(genTypeT const & a, genTypeU const & b); + + //! Division of two values + //! From GLM_GTX_verbose_operator extension. + template + genTypeT div(genTypeT const & a, genTypeU const & b); + + //! Multiplication and addition of three values + //! From GLM_GTX_verbose_operator extension. + template + genTypeT mad(genTypeT const & a, genTypeU const & b, genTypeV const & c); + + /// @} +}// namespace glm + +#include "verbose_operator.inl" + +#endif//GLM_GTX_verbose_operator diff --git a/include/gal/opengl/glm/gtx/verbose_operator.inl b/include/gal/opengl/glm/gtx/verbose_operator.inl index a0936eb9ef..1193efb191 100644 --- a/include/gal/opengl/glm/gtx/verbose_operator.inl +++ b/include/gal/opengl/glm/gtx/verbose_operator.inl @@ -1,124 +1,124 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2006-04-20 -// Updated : 2008-09-29 -// Licence : This source is under MIT License -// File : glm/gtx/verbose_operator.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER genType add(genType const & a, genType const & b) - { - return a + b; - } - - template - GLM_FUNC_QUALIFIER genType sub(genType const & a, genType const & b) - { - return a - b; - } - - template - GLM_FUNC_QUALIFIER detail::tmat2x2 mul - ( - detail::tmat2x2 const & a, - detail::tmat2x2 const & b - ) - { - return a * b; - } - - template - GLM_FUNC_QUALIFIER detail::tmat3x3 mul - ( - detail::tmat3x3 const & a, - detail::tmat3x3 const & b - ) - { - return a * b; - } - - template - GLM_FUNC_QUALIFIER detail::tmat4x4 mul - ( - detail::tmat4x4 const & a, - detail::tmat4x4 const & b - ) - { - return a * b; - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 mul - ( - detail::tmat2x2 const & m, - detail::tvec2 const & v - ) - { - return m * v; - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 mul - ( - detail::tmat3x3 const & m, - detail::tvec3 const & v) - { - return m * v; - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 mul - ( - detail::tmat4x4 const & m, - detail::tvec4 const & v - ) - { - return m * v; - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 mul - ( - detail::tvec2 const & v, - detail::tmat2x2 const & m - ) - { - return v * m; - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 mul - ( - detail::tvec3 const & v, - detail::tmat3x3 const & m - ) - { - return v * m; - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 mul - ( - detail::tvec4 const & v, - detail::tmat4x4 const & m - ) - { - return v * m; - } - - template - GLM_FUNC_QUALIFIER genType div(genType const & a, genType const & b) - { - return a / b; - } - - template - GLM_FUNC_QUALIFIER genTypeT mad(genTypeT const & a, genTypeU const & b, genTypeV const & c) - { - return a * b + c; - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2006-04-20 +// Updated : 2008-09-29 +// Licence : This source is under MIT License +// File : glm/gtx/verbose_operator.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER genType add(genType const & a, genType const & b) + { + return a + b; + } + + template + GLM_FUNC_QUALIFIER genType sub(genType const & a, genType const & b) + { + return a - b; + } + + template + GLM_FUNC_QUALIFIER detail::tmat2x2 mul + ( + detail::tmat2x2 const & a, + detail::tmat2x2 const & b + ) + { + return a * b; + } + + template + GLM_FUNC_QUALIFIER detail::tmat3x3 mul + ( + detail::tmat3x3 const & a, + detail::tmat3x3 const & b + ) + { + return a * b; + } + + template + GLM_FUNC_QUALIFIER detail::tmat4x4 mul + ( + detail::tmat4x4 const & a, + detail::tmat4x4 const & b + ) + { + return a * b; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 mul + ( + detail::tmat2x2 const & m, + detail::tvec2 const & v + ) + { + return m * v; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 mul + ( + detail::tmat3x3 const & m, + detail::tvec3 const & v) + { + return m * v; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 mul + ( + detail::tmat4x4 const & m, + detail::tvec4 const & v + ) + { + return m * v; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 mul + ( + detail::tvec2 const & v, + detail::tmat2x2 const & m + ) + { + return v * m; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 mul + ( + detail::tvec3 const & v, + detail::tmat3x3 const & m + ) + { + return v * m; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 mul + ( + detail::tvec4 const & v, + detail::tmat4x4 const & m + ) + { + return v * m; + } + + template + GLM_FUNC_QUALIFIER genType div(genType const & a, genType const & b) + { + return a / b; + } + + template + GLM_FUNC_QUALIFIER genTypeT mad(genTypeT const & a, genTypeU const & b, genTypeV const & c) + { + return a * b + c; + } +}//namespace glm diff --git a/include/gal/opengl/glm/gtx/wrap.hpp b/include/gal/opengl/glm/gtx/wrap.hpp index 057353c97f..66925f258c 100644 --- a/include/gal/opengl/glm/gtx/wrap.hpp +++ b/include/gal/opengl/glm/gtx/wrap.hpp @@ -1,73 +1,73 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_wrap -/// @file glm/gtx/wrap.hpp -/// @date 2009-11-25 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_wrap GLM_GTX_wrap -/// @ingroup gtx -/// -/// @brief Wrapping mode of texture coordinates. -/// -/// need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_GTX_wrap -#define GLM_GTX_wrap GLM_VERSION - -// Dependency: -#include "../glm.hpp" - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_GTX_wrap extension included") -#endif - -namespace glm -{ - /// @addtogroup gtx_wrap - /// @{ - - //! Simulate GL_CLAMP OpenGL wrap mode - //! From GLM_GTX_wrap extension. - template - genType clamp(genType const & Texcoord); - - //! Simulate GL_REPEAT OpenGL wrap mode - //! From GLM_GTX_wrap extension. - template - genType repeat(genType const & Texcoord); - - //! Simulate GL_MIRROR_REPEAT OpenGL wrap mode - //! From GLM_GTX_wrap extension. - template - genType mirrorRepeat(genType const & Texcoord); - - /// @} -}// namespace glm - -#include "wrap.inl" - -#endif//GLM_GTX_wrap +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref gtx_wrap +/// @file glm/gtx/wrap.hpp +/// @date 2009-11-25 / 2011-06-07 +/// @author Christophe Riccio +/// +/// @see core (dependence) +/// +/// @defgroup gtx_wrap GLM_GTX_wrap +/// @ingroup gtx +/// +/// @brief Wrapping mode of texture coordinates. +/// +/// need to be included to use these functionalities. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_GTX_wrap +#define GLM_GTX_wrap GLM_VERSION + +// Dependency: +#include "../glm.hpp" + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_GTX_wrap extension included") +#endif + +namespace glm +{ + /// @addtogroup gtx_wrap + /// @{ + + //! Simulate GL_CLAMP OpenGL wrap mode + //! From GLM_GTX_wrap extension. + template + genType clamp(genType const & Texcoord); + + //! Simulate GL_REPEAT OpenGL wrap mode + //! From GLM_GTX_wrap extension. + template + genType repeat(genType const & Texcoord); + + //! Simulate GL_MIRROR_REPEAT OpenGL wrap mode + //! From GLM_GTX_wrap extension. + template + genType mirrorRepeat(genType const & Texcoord); + + /// @} +}// namespace glm + +#include "wrap.inl" + +#endif//GLM_GTX_wrap diff --git a/include/gal/opengl/glm/gtx/wrap.inl b/include/gal/opengl/glm/gtx/wrap.inl index cbb9d9830c..bd3f12565c 100644 --- a/include/gal/opengl/glm/gtx/wrap.inl +++ b/include/gal/opengl/glm/gtx/wrap.inl @@ -1,165 +1,165 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2009-11-25 -// Updated : 2010-02-13 -// Licence : This source is under MIT License -// File : glm/gtx/wrap.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Dependency: -// - GLM core -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - template - GLM_FUNC_QUALIFIER genType clamp - ( - genType const & Texcoord - ) - { - return glm::clamp(Texcoord, genType(0), genType(1)); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 clamp - ( - detail::tvec2 const & Texcoord - ) - { - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) - Result[i] = clamp(Texcoord[i]); - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 clamp - ( - detail::tvec3 const & Texcoord - ) - { - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) - Result[i] = clamp(Texcoord[i]); - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 clamp - ( - detail::tvec4 const & Texcoord - ) - { - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) - Result[i] = clamp(Texcoord[i]); - return Result; - } - - //////////////////////// - // repeat - - template - GLM_FUNC_QUALIFIER genType repeat - ( - genType const & Texcoord - ) - { - return glm::fract(Texcoord); - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 repeat - ( - detail::tvec2 const & Texcoord - ) - { - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) - Result[i] = repeat(Texcoord[i]); - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 repeat - ( - detail::tvec3 const & Texcoord - ) - { - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) - Result[i] = repeat(Texcoord[i]); - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 repeat - ( - detail::tvec4 const & Texcoord - ) - { - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) - Result[i] = repeat(Texcoord[i]); - return Result; - } - - //////////////////////// - // mirrorRepeat - - template - GLM_FUNC_QUALIFIER genType mirrorRepeat - ( - genType const & Texcoord - ) - { - genType const Clamp = genType(int(glm::floor(Texcoord)) % 2); - genType const Floor = glm::floor(Texcoord); - genType const Rest = Texcoord - Floor; - genType const Mirror = Clamp + Rest; - - genType Out; - if(Mirror >= genType(1)) - Out = genType(1) - Rest; - else - Out = Rest; - return Out; - } - - template - GLM_FUNC_QUALIFIER detail::tvec2 mirrorRepeat - ( - detail::tvec2 const & Texcoord - ) - { - detail::tvec2 Result; - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) - Result[i] = mirrorRepeat(Texcoord[i]); - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec3 mirrorRepeat - ( - detail::tvec3 const & Texcoord - ) - { - detail::tvec3 Result; - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) - Result[i] = mirrorRepeat(Texcoord[i]); - return Result; - } - - template - GLM_FUNC_QUALIFIER detail::tvec4 mirrorRepeat - ( - detail::tvec4 const & Texcoord - ) - { - detail::tvec4 Result; - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) - Result[i] = mirrorRepeat(Texcoord[i]); - return Result; - } -}//namespace glm +/////////////////////////////////////////////////////////////////////////////////////////////////// +// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Created : 2009-11-25 +// Updated : 2010-02-13 +// Licence : This source is under MIT License +// File : glm/gtx/wrap.inl +/////////////////////////////////////////////////////////////////////////////////////////////////// +// Dependency: +// - GLM core +/////////////////////////////////////////////////////////////////////////////////////////////////// + +namespace glm +{ + template + GLM_FUNC_QUALIFIER genType clamp + ( + genType const & Texcoord + ) + { + return glm::clamp(Texcoord, genType(0), genType(1)); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 clamp + ( + detail::tvec2 const & Texcoord + ) + { + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + Result[i] = clamp(Texcoord[i]); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 clamp + ( + detail::tvec3 const & Texcoord + ) + { + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + Result[i] = clamp(Texcoord[i]); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 clamp + ( + detail::tvec4 const & Texcoord + ) + { + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + Result[i] = clamp(Texcoord[i]); + return Result; + } + + //////////////////////// + // repeat + + template + GLM_FUNC_QUALIFIER genType repeat + ( + genType const & Texcoord + ) + { + return glm::fract(Texcoord); + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 repeat + ( + detail::tvec2 const & Texcoord + ) + { + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + Result[i] = repeat(Texcoord[i]); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 repeat + ( + detail::tvec3 const & Texcoord + ) + { + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + Result[i] = repeat(Texcoord[i]); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 repeat + ( + detail::tvec4 const & Texcoord + ) + { + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + Result[i] = repeat(Texcoord[i]); + return Result; + } + + //////////////////////// + // mirrorRepeat + + template + GLM_FUNC_QUALIFIER genType mirrorRepeat + ( + genType const & Texcoord + ) + { + genType const Clamp = genType(int(glm::floor(Texcoord)) % 2); + genType const Floor = glm::floor(Texcoord); + genType const Rest = Texcoord - Floor; + genType const Mirror = Clamp + Rest; + + genType Out; + if(Mirror >= genType(1)) + Out = genType(1) - Rest; + else + Out = Rest; + return Out; + } + + template + GLM_FUNC_QUALIFIER detail::tvec2 mirrorRepeat + ( + detail::tvec2 const & Texcoord + ) + { + detail::tvec2 Result; + for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) + Result[i] = mirrorRepeat(Texcoord[i]); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec3 mirrorRepeat + ( + detail::tvec3 const & Texcoord + ) + { + detail::tvec3 Result; + for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) + Result[i] = mirrorRepeat(Texcoord[i]); + return Result; + } + + template + GLM_FUNC_QUALIFIER detail::tvec4 mirrorRepeat + ( + detail::tvec4 const & Texcoord + ) + { + detail::tvec4 Result; + for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) + Result[i] = mirrorRepeat(Texcoord[i]); + return Result; + } +}//namespace glm diff --git a/include/gal/opengl/glm/virtrev/xstream.hpp b/include/gal/opengl/glm/virtrev/xstream.hpp index 772f3726e2..79486cf400 100644 --- a/include/gal/opengl/glm/virtrev/xstream.hpp +++ b/include/gal/opengl/glm/virtrev/xstream.hpp @@ -1,166 +1,166 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref virtrev_xstream -/// @file glm/virtrev/xstream.hpp -/// @date 2008-05-24 / 2008-05-26 -/// @author Mathieu Roumillac (matrem84.free.fr) -/// -/// @see core (dependence) -/// @see gtc_matrix_access (dependence) -/// -/// @defgroup virtrev_xstream GLM_VIRTREV_xstream: xml like output -/// @ingroup virtrev -/// -/// @brief Streaming vector and matrix in a xml way. -/// -/// Include for this functionality. -/////////////////////////////////////////////////////////////////////////////////// - -#ifndef GLM_VIRTREV_xstream -#define GLM_VIRTREV_xstream GLM_VERSION - -#include "../glm.hpp" -#include "../gtc/matrix_access.hpp" -#include - -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) -# pragma message("GLM: GLM_VIRTREV_xstream extension included") -#endif -/* -namespace glm{ -namespace detail -{ - template - std::ostream & operator << (std::ostream & stream, glm::detail::tvec2 const & vec) - { - stream << ""; - - return stream; - } - - template - std::ostream & operator << (std::ostream & stream, glm::detail::tvec3 const & vec) - { - stream << ""; - - return stream; - } - - template - std::ostream & operator << (std::ostream & stream, glm::detail::tvec4 const & vec) - { - stream << ""; - - return stream; - } - - template - std::ostream & operator << (std::ostream & stream, glm::detail::tmat2x2 const & mat) - { - stream << "" << std::endl; - stream << "" << std::endl; - stream << "" << std::endl; - stream << ""; - - return stream; - } - - template - std::ostream & operator << (std::ostream & stream, glm::detail::tmat3x3 const & mat) - { - stream << "" << std::endl; - stream << "" << std::endl; - stream << "" << std::endl; - stream << "" << std::endl; - stream << ""; - - return stream; - } - - template - std::ostream & operator << (std::ostream & stream, glm::detail::tmat4x4 const & mat) - { - stream << "" << std::endl; - stream << "" << std::endl; - stream << "" << std::endl; - stream << "" << std::endl; - stream << "" << std::endl; - stream << ""; - - return stream; - } - -}//namespace detail -}//namespace glm -*/ -#endif//GLM_VIRTREV_xstream +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref virtrev_xstream +/// @file glm/virtrev/xstream.hpp +/// @date 2008-05-24 / 2008-05-26 +/// @author Mathieu Roumillac (matrem84.free.fr) +/// +/// @see core (dependence) +/// @see gtc_matrix_access (dependence) +/// +/// @defgroup virtrev_xstream GLM_VIRTREV_xstream: xml like output +/// @ingroup virtrev +/// +/// @brief Streaming vector and matrix in a xml way. +/// +/// Include for this functionality. +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_VIRTREV_xstream +#define GLM_VIRTREV_xstream GLM_VERSION + +#include "../glm.hpp" +#include "../gtc/matrix_access.hpp" +#include + +#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +# pragma message("GLM: GLM_VIRTREV_xstream extension included") +#endif +/* +namespace glm{ +namespace detail +{ + template + std::ostream & operator << (std::ostream & stream, glm::detail::tvec2 const & vec) + { + stream << ""; + + return stream; + } + + template + std::ostream & operator << (std::ostream & stream, glm::detail::tvec3 const & vec) + { + stream << ""; + + return stream; + } + + template + std::ostream & operator << (std::ostream & stream, glm::detail::tvec4 const & vec) + { + stream << ""; + + return stream; + } + + template + std::ostream & operator << (std::ostream & stream, glm::detail::tmat2x2 const & mat) + { + stream << "" << std::endl; + stream << "" << std::endl; + stream << "" << std::endl; + stream << ""; + + return stream; + } + + template + std::ostream & operator << (std::ostream & stream, glm::detail::tmat3x3 const & mat) + { + stream << "" << std::endl; + stream << "" << std::endl; + stream << "" << std::endl; + stream << "" << std::endl; + stream << ""; + + return stream; + } + + template + std::ostream & operator << (std::ostream & stream, glm::detail::tmat4x4 const & mat) + { + stream << "" << std::endl; + stream << "" << std::endl; + stream << "" << std::endl; + stream << "" << std::endl; + stream << "" << std::endl; + stream << ""; + + return stream; + } + +}//namespace detail +}//namespace glm +*/ +#endif//GLM_VIRTREV_xstream From 6789755b06a197f1ad54f9a1b1ee1f1686b01ecc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 16 Jul 2013 08:48:21 +0200 Subject: [PATCH 155/415] Stroked lines in Cairo GAL are always drawn at least 1 pixel wide. --- common/gal/cairo/cairo_gal.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 148d0fc283..d21a1a8286 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -496,7 +496,12 @@ void CAIRO_GAL::SetLineWidth( double aLineWidth ) storePath(); lineWidth = aLineWidth; - cairo_set_line_width( cairoImage, aLineWidth ); + + // Make lines appear at least 1 pixel wide, no matter of zoom + double x = 1.0, y = 1.0; + cairo_device_to_user_distance( cairoImage, &x, &y ); + double minWidth = std::min( fabs( x ), fabs( y ) ); + cairo_set_line_width( cairoImage, std::max( aLineWidth, minWidth ) ); if( isGrouping ) { @@ -716,9 +721,16 @@ void CAIRO_GAL::DrawGroup( int aGroupNumber ) break; case CMD_SET_LINE_WIDTH: - cairo_set_line_width( cairoImage, it->arguments[0] ); + { + // Make lines appear at least 1 pixel wide, no matter of zoom + double x = 1.0, y = 1.0; + cairo_device_to_user_distance( cairoImage, &x, &y ); + double minWidth = std::min( fabs( x ), fabs( y ) ); + cairo_set_line_width( cairoImage, std::max( it->arguments[0], minWidth ) ); + } break; + case CMD_STROKE_PATH: cairo_set_source_rgb( cairoImage, strokeColor.r, strokeColor.g, strokeColor.b ); cairo_append_path( cairoImage, it->cairoPath ); From 6dd9cb6fb8d671eb9fabc04339e60b666d8da161 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 16 Jul 2013 08:49:12 +0200 Subject: [PATCH 156/415] 1 pixel wide lines using OpenGL shaders. --- common/gal/opengl/opengl_gal.cpp | 91 +++++++++++++++----------------- common/gal/opengl/shader.frag | 15 ++++-- common/gal/opengl/shader.vert | 39 +++++++++++++- 3 files changed, 89 insertions(+), 56 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index cc43852dba..7d98f0cd38 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -783,23 +783,24 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); /* Draw a triangle that contains the circle, then shade it leaving only the circle. - Parameters given to setShader are relative coordinates of the triangle's vertices. + Parameters given to setShader are indices of the triangle's vertices + (if you want to understand more, check the vertex shader source [shader.vert]). Shader uses this coordinates to determine if fragments are inside the circle or not. v2 /\ //\\ v0 /_\/_\ v1 */ - setShader( SHADER_FILLED_CIRCLE, -sqrt( 3.0f ), -1.0f ); - vertex3( aCenterPoint.x - aRadius * sqrt( 3.0f ), // v0 - aCenterPoint.y - aRadius, layerDepth ); + setShader( SHADER_FILLED_CIRCLE, 1.0 ); + vertex3( aCenterPoint.x - aRadius * sqrt( 3.0f ), + aCenterPoint.y - aRadius, layerDepth ); // v0 - setShader( SHADER_FILLED_CIRCLE, sqrt( 3.0f ), -1.0f ); - vertex3( aCenterPoint.x + aRadius * sqrt( 3.0f ), // v1 - aCenterPoint.y - aRadius, layerDepth ); + setShader( SHADER_FILLED_CIRCLE, 2.0 ); + vertex3( aCenterPoint.x + aRadius * sqrt( 3.0f ), + aCenterPoint.y - aRadius, layerDepth ); // v1 - setShader( SHADER_FILLED_CIRCLE, 0.0f, 2.0f ); - vertex3( aCenterPoint.x, aCenterPoint.y + aRadius * 2.0f, layerDepth ); // v2 + setShader( SHADER_FILLED_CIRCLE, 3.0 ); + vertex3( aCenterPoint.x, aCenterPoint.y + aRadius * 2.0f, layerDepth ); // v2 } if( isStrokeEnabled ) @@ -807,30 +808,25 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); /* Draw a triangle that contains the circle, then shade it leaving only the circle. - Parameters given to setShader are relative coordinates of the triangle's vertices + Parameters given to setShader are indices of the triangle's vertices + (if you want to understand more, check the vertex shader source [shader.vert]). and the line width. Shader uses this coordinates to determine if fragments are inside - the circle or not. Width parameter has to be passed as a ratio of inner radius - to outer radius. + the circle or not. v2 /\ //\\ v0 /_\/_\ v1 */ - float outerRadius = aRadius + ( lineWidth / 2.0f ); - float innerRadius = aRadius - ( lineWidth / 2.0f ); - float relWidth = innerRadius / outerRadius; + setShader( SHADER_STROKED_CIRCLE, 1.0, aRadius, lineWidth ); + vertex3( aCenterPoint.x - aRadius * sqrt( 3.0f ), + aCenterPoint.y - aRadius, layerDepth ); // v0 - setShader( SHADER_STROKED_CIRCLE, -sqrt( 3.0f ), -1.0f, relWidth ); - vertex3( aCenterPoint.x - outerRadius * sqrt( 3.0f ), // v0 - aCenterPoint.y - outerRadius, layerDepth ); + setShader( SHADER_STROKED_CIRCLE, 2.0, aRadius, lineWidth ); + vertex3( aCenterPoint.x + aRadius * sqrt( 3.0f ), + aCenterPoint.y - aRadius, layerDepth ); // v1 - setShader( SHADER_STROKED_CIRCLE, sqrt( 3.0f ), -1.0f, relWidth ); - vertex3( aCenterPoint.x + outerRadius * sqrt( 3.0f ), // v1 - aCenterPoint.y - outerRadius, layerDepth ); - - setShader( SHADER_STROKED_CIRCLE, 0.0f, 2.0f, relWidth ); - vertex3( aCenterPoint.x, // v2 - aCenterPoint.y + outerRadius * 2.0f, layerDepth ); + setShader( SHADER_STROKED_CIRCLE, 3.0, aRadius, lineWidth ); + vertex3( aCenterPoint.x, aCenterPoint.y + aRadius * 2.0f, layerDepth ); // v2 } return; @@ -931,20 +927,21 @@ void OPENGL_GAL::drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRad Rotate( aAngle ); /* Draw a triangle that contains the semicircle, then shade it to leave only the semicircle. - Parameters given to setShader are relative coordinates of the triangle's vertices. - Shader uses this coordinates to determine if fragments are inside the semicircle or not. - v2 - /\ - /__\ - v0 //__\\ v1 + Parameters given to setShader are indices of the triangle's vertices + (if you want to understand more, check the vertex shader source [shader.vert]). + Shader uses this coordinates to determine if fragments are inside the semicircle or not. + v2 + /\ + /__\ + v0 //__\\ v1 */ - setShader( SHADER_FILLED_CIRCLE, -3.0f / sqrt( 3.0f ), 0.0f ); + setShader( SHADER_FILLED_CIRCLE, 4.0f ); vertex3( -aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 - setShader( SHADER_FILLED_CIRCLE, 3.0f / sqrt( 3.0f ), 0.0f ); + setShader( SHADER_FILLED_CIRCLE, 5.0f ); vertex3( aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 - setShader( SHADER_FILLED_CIRCLE, 0.0f, 2.0f ); + setShader( SHADER_FILLED_CIRCLE, 6.0f ); vertex3( 0.0f, aRadius * 2.0f, layerDepth ); // v2 Restore(); @@ -973,26 +970,22 @@ void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRa Rotate( aAngle ); /* Draw a triangle that contains the semicircle, then shade it to leave only the semicircle. - Parameters given to setShader are relative coordinates of the triangle's vertices - and the line width. Shader uses this coordinates to determine if fragments are inside - the semicircle or not. Width parameter has to be passed as a ratio of inner radius - to outer radius. - v2 - /\ - /__\ - v0 //__\\ v1 + Parameters given to setShader are indices of the triangle's vertices + (if you want to understand more, check the vertex shader source [shader.vert]), the + radius and the line width. Shader uses this coordinates to determine if fragments are + inside the semicircle or not. + v2 + /\ + /__\ + v0 //__\\ v1 */ - float outerRadius = aRadius; - float innerRadius = aRadius - lineWidth; - float relWidth = innerRadius / outerRadius; - - setShader( SHADER_STROKED_CIRCLE, -3.0f / sqrt( 3.0f ), 0.0f, relWidth ); + setShader( SHADER_STROKED_CIRCLE, 4.0f, aRadius, lineWidth ); vertex3( -aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 - setShader( SHADER_STROKED_CIRCLE, 3.0f / sqrt( 3.0f ), 0.0f, relWidth ); + setShader( SHADER_STROKED_CIRCLE, 5.0f, aRadius, lineWidth ); vertex3( aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 - setShader( SHADER_STROKED_CIRCLE, 0.0f, 2.0f, relWidth ); + setShader( SHADER_STROKED_CIRCLE, 6.0f, aRadius, lineWidth ); vertex3( 0.0f, aRadius * 2.0f, layerDepth ); // v2 Restore(); diff --git a/common/gal/opengl/shader.frag b/common/gal/opengl/shader.frag index 8525e3b0b9..f658fcdae5 100644 --- a/common/gal/opengl/shader.frag +++ b/common/gal/opengl/shader.frag @@ -32,20 +32,25 @@ const float SHADER_FILLED_CIRCLE = 2.0; const float SHADER_STROKED_CIRCLE = 3.0; varying vec4 shaderParams; +varying vec2 circleCoords; void filledCircle( vec2 aCoord ) { - if( dot( aCoord, aCoord ) < 1.0 ) + if( dot( aCoord, aCoord ) < 1.0f ) gl_FragColor = gl_Color; else discard; } -void strokedCircle( vec2 aCoord, float aWidth ) +void strokedCircle( vec2 aCoord, float aRadius, float aWidth ) { + float outerRadius = aRadius; + float innerRadius = aRadius - aWidth; + float relWidth = innerRadius / outerRadius; + if( ( dot( aCoord, aCoord ) < 1.0 ) && - ( dot( aCoord, aCoord ) > aWidth * aWidth ) ) + ( dot( aCoord, aCoord ) > relWidth * relWidth ) ) gl_FragColor = gl_Color; else discard; @@ -56,11 +61,11 @@ void main() { if( shaderParams[0] == SHADER_FILLED_CIRCLE ) { - filledCircle( vec2( shaderParams[1], shaderParams[2] ) ); + filledCircle( circleCoords ); } else if( shaderParams[0] == SHADER_STROKED_CIRCLE ) { - strokedCircle( vec2( shaderParams[1], shaderParams[2] ), shaderParams[3] ); + strokedCircle( circleCoords, shaderParams[2], shaderParams[3] ); } else { diff --git a/common/gal/opengl/shader.vert b/common/gal/opengl/shader.vert index eee54e0ffa..24b12afe45 100644 --- a/common/gal/opengl/shader.vert +++ b/common/gal/opengl/shader.vert @@ -31,8 +31,12 @@ const float SHADER_LINE = 1.0; const float SHADER_FILLED_CIRCLE = 2.0; const float SHADER_STROKED_CIRCLE = 3.0; +// Minimum line width +const float MIN_WIDTH = 1.0; + attribute vec4 attrShaderParams; varying vec4 shaderParams; +varying vec2 circleCoords; void main() { @@ -45,8 +49,8 @@ void main() float worldScale = gl_ModelViewMatrix[0][0]; float scale; - // Make lines appear to be at least 1 pixel width - if( worldScale * lineWidth < 1.0 ) + // Make lines appear to be at least 1 pixel wide + if( worldScale * lineWidth < MIN_WIDTH ) scale = 1.0 / ( worldScale * lineWidth ); else scale = 1.0; @@ -54,6 +58,37 @@ void main() gl_Position = gl_ModelViewProjectionMatrix * ( gl_Vertex + vec4( shaderParams.yz * scale, 0.0, 0.0 ) ); } + else if( ( shaderParams[0] == SHADER_STROKED_CIRCLE ) || + ( shaderParams[0] == SHADER_FILLED_CIRCLE ) ) + { + // Compute relative circle coordinates basing on indices + // Circle + if( shaderParams[1] == 1.0f ) + circleCoords = vec2( -sqrt( 3.0f ), -1.0f ); + else if( shaderParams[1] == 2.0f ) + circleCoords = vec2( sqrt( 3.0f ), -1.0f ); + else if( shaderParams[1] == 3.0f ) + circleCoords = vec2( 0.0f, 2.0f ); + + // Semicircle + else if( shaderParams[1] == 4.0f ) + circleCoords = vec2( -3.0f / sqrt( 3.0f ), 0.0f ); + else if( shaderParams[1] == 5.0f ) + circleCoords = vec2( 3.0f / sqrt( 3.0f ), 0.0f ); + else if( shaderParams[1] == 6.0f ) + circleCoords = vec2( 0.0f, 2.0f ); + + // Make the line appear to be at least 1 pixel wide + float lineWidth = shaderParams[3]; + float worldScale = gl_ModelViewMatrix[0][0]; + float scale; + + // Make lines appear to be at least 1 pixel width + if( worldScale * lineWidth < MIN_WIDTH ) + shaderParams[3] = shaderParams[3] / ( worldScale * lineWidth ); + + gl_Position = ftransform(); + } else { // Pass through the coordinates like in the fixed pipeline From 1073a524b9e89ee4611b0d4581baae09968d2a27 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 16 Jul 2013 09:26:29 +0200 Subject: [PATCH 157/415] Refactored code responsible for high contrast mode. Now it allows to have more than one layer on the top. Selecting layer using the dropdown list on the toolbar influences the layer displayed in high contrast mode. --- common/view/view.cpp | 103 ++++++++++++---------- include/view/view.h | 33 +++++-- include/wxPcbStruct.h | 8 +- pcbnew/basepcbframe.cpp | 4 - pcbnew/class_pcb_layer_widget.cpp | 15 +--- pcbnew/dialogs/dialog_general_options.cpp | 15 +++- pcbnew/pcbframe.cpp | 27 ++++++ 7 files changed, 122 insertions(+), 83 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 7528009d6c..b8f72a0f01 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -39,11 +39,6 @@ using namespace KiGfx; -// Static constants -const int VIEW::VIEW_MAX_LAYERS = 64; -// Top layer depth -const int VIEW::TOP_LAYER = -1; - void VIEW::AddLayer( int aLayer, bool aDisplayOnly ) { if( m_layers.find( aLayer ) == m_layers.end() ) @@ -140,14 +135,12 @@ int VIEW::Query( const BOX2I& aRect, std::vector& aResult ) VIEW::VIEW( bool aIsDynamic ) : - m_enableTopLayer( false ), + m_enableOrderModifier( false ), m_scale ( 1.0 ), m_painter( NULL ), m_gal( NULL ), m_dynamic( aIsDynamic ) { - // By default there is no layer on the top - m_topLayer.enabled = false; } @@ -395,63 +388,75 @@ void VIEW::ChangeLayerDepth( int aLayer, int aDepth ) } -void VIEW::SetTopLayer( int aLayer ) +void VIEW::SetTopLayer( int aLayer, bool aEnabled ) { - // Restore previous order - if( m_topLayer.enabled ) + if( aEnabled ) { - m_layers[m_topLayer.id].renderingOrder = m_topLayer.renderingOrder; - ChangeLayerDepth( m_topLayer.id, m_topLayer.renderingOrder ); - } + if( m_topLayers.count( aLayer ) == 1 ) + return; - if( aLayer >= 0 && aLayer < VIEW_MAX_LAYERS ) - { - // Save settings, so it can be restored later - m_topLayer.renderingOrder = m_layers[aLayer].renderingOrder; - m_topLayer.id = m_layers[aLayer].id; + m_topLayers.insert( aLayer ); - // Apply new settings only if the option is enabled - if( m_enableTopLayer ) - { - m_layers[aLayer].renderingOrder = TOP_LAYER; - ChangeLayerDepth( aLayer, TOP_LAYER ); - } - - // Set the flag saying that settings stored in m_topLayer are valid - m_topLayer.enabled = true; + // Move the layer closer to front + if( m_enableOrderModifier ) + m_layers[aLayer].renderingOrder += TOP_LAYER_MODIFIER; } else { - // There are no valid settings in m_topLayer - m_topLayer.enabled = false; - } + if( m_topLayers.count( aLayer ) == 0 ) + return; - sortLayers(); + m_topLayers.erase( aLayer ); + + // Restore the previous rendering order + if( m_enableOrderModifier ) + m_layers[aLayer].renderingOrder -= TOP_LAYER_MODIFIER; + } } void VIEW::EnableTopLayer( bool aEnable ) { - if( aEnable == m_enableTopLayer ) return; + if( aEnable == m_enableOrderModifier ) return; + m_enableOrderModifier = aEnable; - // Use stored settings only if applicable - // (topLayer.enabled == false means there are no valid settings stored) - if( m_topLayer.enabled ) + std::set::iterator it; + if( aEnable ) { - if( aEnable ) - { - m_layers[m_topLayer.id].renderingOrder = TOP_LAYER; - ChangeLayerDepth( m_topLayer.id, TOP_LAYER ); - } - else - { - m_layers[m_topLayer.id].renderingOrder = m_topLayer.renderingOrder; - ChangeLayerDepth( m_topLayer.id, m_topLayer.renderingOrder ); - } + for( it = m_topLayers.begin(); it != m_topLayers.end(); ++it ) + m_layers[*it].renderingOrder += TOP_LAYER_MODIFIER; } + else + { + for( it = m_topLayers.begin(); it != m_topLayers.end(); ++it ) + m_layers[*it].renderingOrder -= TOP_LAYER_MODIFIER; + } +} + + +void VIEW::ClearTopLayers() +{ + std::set::iterator it; + + if( m_enableOrderModifier ) + { + // Restore the previous rendering order for layers that were marked as top + for( it = m_topLayers.begin(); it != m_topLayers.end(); ++it ) + m_layers[*it].renderingOrder -= TOP_LAYER_MODIFIER; + } + + m_topLayers.clear(); +} + + +void VIEW::UpdateAllLayersOrder() +{ sortLayers(); - m_enableTopLayer = aEnable; + BOOST_FOREACH( LayerMap::value_type& l, m_layers ) + { + ChangeLayerDepth( l.first, l.second.renderingOrder ); + } } @@ -513,7 +518,7 @@ void VIEW::redrawRect( const BOX2I& aRect ) { drawItem drawFunc( this, l ); - m_gal->SetLayerDepth( static_cast( l->renderingOrder ) ); + m_gal->SetLayerDepth( l->renderingOrder ); l->items->Query( aRect, drawFunc ); l->isDirty = false; } @@ -703,7 +708,7 @@ void VIEW::RecacheAllItems( bool aImmediately ) if( l->cached ) { - m_gal->SetLayerDepth( (double) l->renderingOrder ); + m_gal->SetLayerDepth( l->renderingOrder ); recacheLayer visitor( this, m_gal, l->id, aImmediately ); l->items->Query( r, visitor ); } diff --git a/include/view/view.h b/include/view/view.h index c13ba6bf52..3f3c0dc459 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -26,6 +26,7 @@ #define __VIEW_H #include +#include #include #include @@ -305,7 +306,7 @@ public: * @param aLayer: the layer or -1 in case when no particular layer should * be displayed on the top. */ - void SetTopLayer( int aLayer ); + void SetTopLayer( int aLayer, bool aEnabled = true ); /** * Function EnableTopLayer() @@ -316,6 +317,20 @@ public: */ void EnableTopLayer( bool aEnable ); + /** + * Function ClearTopLayers() + * Removes all layers from the on-the-top set (they are no longer displayed over the rest of + * layers). + */ + void ClearTopLayers(); + + /** + * Function UpdateLayerOrder() + * Does everything that is needed to apply the rendering order of layers. It has to be called + * after modification of renderingOrder field of LAYER. + */ + void UpdateAllLayersOrder(); + /** * Function Redraw() * Immediately redraws the whole view. @@ -344,8 +359,7 @@ public: */ bool IsDynamic() const { return m_dynamic; } - static const int VIEW_MAX_LAYERS; ///* maximum number of layers that may be shown - static const int TOP_LAYER; ///* layer number for displaying items on the top + static const int VIEW_MAX_LAYERS = 64; ///* maximum number of layers that may be shown private: struct VIEW_LAYER @@ -377,11 +391,8 @@ private: struct updateItemsColor; struct changeItemsDepth; - ///* Saves current top layer settings in order to restore it when it's not top anymore - VIEW_LAYER m_topLayer; - - ///* Whether to use top layer settings or not - bool m_enableTopLayer; + ///* Whether to use rendering order modifier or not + bool m_enableOrderModifier; ///* Redraws contents within rect aRect void redrawRect( const BOX2I& aRect ); @@ -412,6 +423,9 @@ private: /// Sorted list of pointers to members of m_layers. LayerOrder m_orderedLayers; + /// Stores set of layers that are displayed on the top + std::set m_topLayers; + /// Center point of the VIEW (the point at which we are looking at) VECTOR2D m_center; @@ -427,6 +441,9 @@ private: /// Dynamic VIEW (eg. display PCB in window) allows changes once it is built, /// static (eg. image/PDF) - does not. bool m_dynamic; + + /// Rendering order modifier for layers that are marked as top layers + static const int TOP_LAYER_MODIFIER = -VIEW_MAX_LAYERS; }; } // namespace KiGfx diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 251db833b7..a79e660104 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -133,13 +133,7 @@ protected: * will change the currently active layer to \a aLayer and also * update the PCB_LAYER_WIDGET. */ - void setActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate = true ) - { - ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer = aLayer; - - if( doLayerWidgetUpdate ) - syncLayerWidgetLayer(); - } + void setActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate = true ); /** * Function getActiveLayer diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index e8accd2d7f..9fbf01b8dd 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -258,13 +258,9 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) view->SetLayerVisible( ITEM_GAL_LAYER( i ), m_Pcb->IsElementVisible( i ) ); } - view->SetTopLayer( m_Pcb->GetLayer() ); - view->RecacheAllItems( true ); if( m_galCanvasActive ) - { m_galCanvas->Refresh(); - } } } diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index dbc070d3df..54fb33d740 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -356,21 +356,10 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer ) // false from this function. myframe->setActiveLayer( aLayer, false ); - // Set display settings for high contrast mode - KiGfx::VIEW* view = myframe->GetGalCanvas()->GetView(); - view->GetPainter()->GetSettings()->SetActiveLayer( aLayer ); - view->UpdateAllLayersColor(); - view->SetTopLayer( aLayer ); - if( m_alwaysShowActiveCopperLayer ) OnLayerSelected(); - else if(DisplayOpt.ContrastModeDisplay) - { - if( myframe->IsGalCanvasActive() ) - myframe->GetGalCanvas()->Refresh(); - else - myframe->GetCanvas()->Refresh(); - } + else if( DisplayOpt.ContrastModeDisplay ) + myframe->GetCanvas()->Refresh(); return true; } diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index c066e2c3a7..996c0f9e92 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -232,16 +232,27 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) break; case ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE: + { DisplayOpt.ContrastModeDisplay = state; // Apply new display options to the GAL canvas (this is faster than recaching) settings->LoadDisplayOptions( DisplayOpt ); - m_galCanvas->GetView()->EnableTopLayer( state ); - m_galCanvas->GetView()->UpdateAllLayersColor(); + + KiGfx::VIEW* view = m_galCanvas->GetView(); + LAYER_NUM layer = getActiveLayer(); + + view->GetPainter()->GetSettings()->SetActiveLayer( layer ); + view->UpdateAllLayersColor(); + + view->EnableTopLayer( state ); + view->ClearTopLayers(); + view->SetTopLayer( layer ); + view->UpdateAllLayersOrder(); if( !IsGalCanvasActive() ) m_canvas->Refresh(); break; + } case ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR_MICROWAVE: m_show_microwave_tools = state; diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 53014d1dcb..a9cafce5cb 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -56,6 +56,8 @@ #include #include #include +#include +#include #if defined(KICAD_SCRIPTING) || defined(KICAD_SCRIPTING_WXPYTHON) @@ -741,6 +743,31 @@ bool PCB_EDIT_FRAME::IsMicroViaAcceptable( void ) } +void PCB_EDIT_FRAME::setActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate ) +{ + ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer = aLayer; + + // Set display settings for high contrast mode + KiGfx::VIEW* view = m_galCanvas->GetView(); + + if( DisplayOpt.ContrastModeDisplay ) + { + view->GetPainter()->GetSettings()->SetActiveLayer( aLayer ); + view->UpdateAllLayersColor(); + + view->ClearTopLayers(); + view->SetTopLayer( aLayer ); + view->UpdateAllLayersOrder(); + + if( m_galCanvasActive ) + m_galCanvas->Refresh(); + } + + if( doLayerWidgetUpdate ) + syncLayerWidgetLayer(); +} + + void PCB_EDIT_FRAME::syncLayerWidgetLayer() { m_Layers->SelectLayer( getActiveLayer() ); From 2b3d6075e2a80724ce53748a7fbe2070ff162459 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 16 Jul 2013 09:27:28 +0200 Subject: [PATCH 158/415] 1 pixel wide outlines for the Cairo and the OpenGL with shaders backends, but it breaks displaying outline in the shaderless OpenGL backend. --- common/painter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/painter.cpp b/common/painter.cpp index 49c39e24a3..f9350c2665 100644 --- a/common/painter.cpp +++ b/common/painter.cpp @@ -40,7 +40,7 @@ RENDER_SETTINGS::RENDER_SETTINGS() m_hiContrastEnabled = false; m_hiContrastFactor = 0.2; m_activeLayer = 0; - m_outlineWidth = 60000; + m_outlineWidth = 1; // Store the predefined colors used in KiCad in format used by GAL for( int i = 0; i < NBCOLORS; i++ ) From 7a545df299cc651865dae5aa47afb26c542d460a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 16 Jul 2013 10:49:56 +0200 Subject: [PATCH 159/415] Moved rendering order settings to a more appropriate place. --- include/layers_id_colors_and_visibility.h | 40 ++++++++++++++++++++- pcbnew/basepcbframe.cpp | 44 ++--------------------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index 6bb09417c5..7688dee9e6 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -184,6 +184,7 @@ inline int LayerMaskCountSet( LAYER_MSK aMask ) UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31\ }; + /** * Enum PCB_VISIBLE * is a set of visible PCB elements. @@ -214,7 +215,7 @@ enum PCB_VISIBLE MOD_REFERENCES_VISIBLE, ///< show modules references (when texts are visibles) TRACKS_VISIBLE, - PADS_VISIBLE, + PADS_VISIBLE, ///< multilayer pads, usually with holes PADS_HOLES_VISIBLE, VIAS_HOLES_VISIBLE, @@ -249,6 +250,43 @@ enum PCB_VISIBLE /// number of *all* layers including PCB and item layers #define TOTAL_LAYER_COUNT (NB_LAYERS + END_PCB_VISIBLE_LIST) +/// Rendering order of layers on GAL-based canvas (lower index in the array +/// means that layer is displayed closer to the user, ie. on the top). +const int GalLayerOrder[] = +{ + DRAW_N, COMMENT_N, ECO1_N, ECO2_N, EDGE_N, + UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31, + ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ), + ITEM_GAL_LAYER( MOD_REFERENCES_VISIBLE), ITEM_GAL_LAYER( MOD_VALUES_VISIBLE ), + SILKSCREEN_N_FRONT, SOLDERPASTE_N_FRONT, ADHESIVE_N_FRONT, SOLDERMASK_N_FRONT, + + ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), + ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), + ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), + + ITEM_GAL_LAYER( PAD_FR_VISIBLE ), + ITEM_GAL_LAYER( LAYER_16_NETNAMES_VISIBLE ), LAYER_N_FRONT, + ITEM_GAL_LAYER( LAYER_15_NETNAMES_VISIBLE ), LAYER_N_15, + ITEM_GAL_LAYER( LAYER_14_NETNAMES_VISIBLE ), LAYER_N_14, + ITEM_GAL_LAYER( LAYER_13_NETNAMES_VISIBLE ), LAYER_N_13, + ITEM_GAL_LAYER( LAYER_12_NETNAMES_VISIBLE ), LAYER_N_12, + ITEM_GAL_LAYER( LAYER_11_NETNAMES_VISIBLE ), LAYER_N_11, + ITEM_GAL_LAYER( LAYER_10_NETNAMES_VISIBLE ), LAYER_N_10, + ITEM_GAL_LAYER( LAYER_9_NETNAMES_VISIBLE ), LAYER_N_9, + ITEM_GAL_LAYER( LAYER_8_NETNAMES_VISIBLE ), LAYER_N_8, + ITEM_GAL_LAYER( LAYER_7_NETNAMES_VISIBLE ), LAYER_N_7, + ITEM_GAL_LAYER( LAYER_6_NETNAMES_VISIBLE ), LAYER_N_6, + ITEM_GAL_LAYER( LAYER_5_NETNAMES_VISIBLE ), LAYER_N_5, + ITEM_GAL_LAYER( LAYER_4_NETNAMES_VISIBLE ), LAYER_N_4, + ITEM_GAL_LAYER( LAYER_3_NETNAMES_VISIBLE ), LAYER_N_3, + ITEM_GAL_LAYER( LAYER_2_NETNAMES_VISIBLE ), LAYER_N_2, + ITEM_GAL_LAYER( LAYER_1_NETNAMES_VISIBLE ), LAYER_N_BACK, + ITEM_GAL_LAYER( PAD_BK_VISIBLE ), + + SOLDERMASK_N_BACK, ADHESIVE_N_BACK, SOLDERPASTE_N_BACK, SILKSCREEN_N_BACK, + ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ) +}; + /** * Function IsValidLayer * tests whether a given integer is a valid layer index, i.e. can diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 9fbf01b8dd..73327f6e51 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -84,44 +84,6 @@ BEGIN_EVENT_TABLE( PCB_BASE_FRAME, EDA_DRAW_FRAME ) END_EVENT_TABLE() -/// Rendering order of layers on GAL-based canvas (lower index in the array -/// means that layer is displayed closer to the user, ie. on the top). -const int m_galLayerOrder[] = -{ - DRAW_N, COMMENT_N, ECO1_N, ECO2_N, EDGE_N, - UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31, - ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ), - ITEM_GAL_LAYER( MOD_REFERENCES_VISIBLE), ITEM_GAL_LAYER( MOD_VALUES_VISIBLE ), - SILKSCREEN_N_FRONT, SOLDERPASTE_N_FRONT, ADHESIVE_N_FRONT, SOLDERMASK_N_FRONT, - - ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), - ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), - ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), - - ITEM_GAL_LAYER( PAD_FR_VISIBLE ), - ITEM_GAL_LAYER( LAYER_16_NETNAMES_VISIBLE ), LAYER_N_FRONT, - ITEM_GAL_LAYER( LAYER_15_NETNAMES_VISIBLE ), LAYER_N_15, - ITEM_GAL_LAYER( LAYER_14_NETNAMES_VISIBLE ), LAYER_N_14, - ITEM_GAL_LAYER( LAYER_13_NETNAMES_VISIBLE ), LAYER_N_13, - ITEM_GAL_LAYER( LAYER_12_NETNAMES_VISIBLE ), LAYER_N_12, - ITEM_GAL_LAYER( LAYER_11_NETNAMES_VISIBLE ), LAYER_N_11, - ITEM_GAL_LAYER( LAYER_10_NETNAMES_VISIBLE ), LAYER_N_10, - ITEM_GAL_LAYER( LAYER_9_NETNAMES_VISIBLE ), LAYER_N_9, - ITEM_GAL_LAYER( LAYER_8_NETNAMES_VISIBLE ), LAYER_N_8, - ITEM_GAL_LAYER( LAYER_7_NETNAMES_VISIBLE ), LAYER_N_7, - ITEM_GAL_LAYER( LAYER_6_NETNAMES_VISIBLE ), LAYER_N_6, - ITEM_GAL_LAYER( LAYER_5_NETNAMES_VISIBLE ), LAYER_N_5, - ITEM_GAL_LAYER( LAYER_4_NETNAMES_VISIBLE ), LAYER_N_4, - ITEM_GAL_LAYER( LAYER_3_NETNAMES_VISIBLE ), LAYER_N_3, - ITEM_GAL_LAYER( LAYER_2_NETNAMES_VISIBLE ), LAYER_N_2, - ITEM_GAL_LAYER( LAYER_1_NETNAMES_VISIBLE ), LAYER_N_BACK, - ITEM_GAL_LAYER( PAD_BK_VISIBLE ), - - SOLDERMASK_N_BACK, ADHESIVE_N_BACK, SOLDERPASTE_N_BACK, SILKSCREEN_N_BACK, - ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ) -}; - - PCB_BASE_FRAME::PCB_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize, @@ -233,10 +195,10 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) settings->LoadDisplayOptions( DisplayOpt ); } - // Set rendering order of layers (check m_galLayerOrder to see the order) - for( unsigned int i = 0; i < sizeof( m_galLayerOrder ) / sizeof( int ); ++i ) + // Set rendering order of layers + for( unsigned int i = 0; i < sizeof( GalLayerOrder ) / sizeof( int ); ++i ) { - view->SetLayerOrder( m_galLayerOrder[i], i ); + view->SetLayerOrder( GalLayerOrder[i], i ); } // Netnames are drawn only when scale is sufficient (level of details) From 3ba2d4428b523f2b236529bb7c2e0b3478711e83 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 16 Jul 2013 13:40:53 +0200 Subject: [PATCH 160/415] Added support for multiple active layers (colored ones in the high contrast mode). Added separate layers for pad netnames (now these are divided into multilayer/top/bottom pads). More appropriate layers are selecting a copper layer in the high contrast mode (now it shows the copper layer itself, vias & multilayer pads and netnames). --- common/painter.cpp | 1 - common/view/view.cpp | 3 ++ include/layers_id_colors_and_visibility.h | 10 +++- include/painter.h | 23 +++++++--- include/wxPcbStruct.h | 16 ++++++- pcbnew/basepcbframe.cpp | 5 +- pcbnew/class_pad.cpp | 56 ++++++++--------------- pcbnew/dialogs/dialog_general_options.cpp | 25 ++++------ pcbnew/pcb_painter.cpp | 6 ++- pcbnew/pcbframe.cpp | 47 +++++++++++++++---- 10 files changed, 115 insertions(+), 77 deletions(-) diff --git a/common/painter.cpp b/common/painter.cpp index f9350c2665..6d0f2d8543 100644 --- a/common/painter.cpp +++ b/common/painter.cpp @@ -39,7 +39,6 @@ RENDER_SETTINGS::RENDER_SETTINGS() m_highlightEnabled = false; m_hiContrastEnabled = false; m_hiContrastFactor = 0.2; - m_activeLayer = 0; m_outlineWidth = 1; // Store the predefined colors used in KiCad in format used by GAL diff --git a/common/view/view.cpp b/common/view/view.cpp index b8f72a0f01..8e1b031d31 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -431,6 +431,9 @@ void VIEW::EnableTopLayer( bool aEnable ) for( it = m_topLayers.begin(); it != m_topLayers.end(); ++it ) m_layers[*it].renderingOrder -= TOP_LAYER_MODIFIER; } + + UpdateAllLayersOrder(); + UpdateAllLayersColor(); } diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index 7688dee9e6..270a3a870f 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -236,6 +236,8 @@ enum PCB_VISIBLE LAYER_14_NETNAMES_VISIBLE, LAYER_15_NETNAMES_VISIBLE, LAYER_16_NETNAMES_VISIBLE, // Top layer + PAD_FR_NETNAMES_VISIBLE, + PAD_BK_NETNAMES_VISIBLE, PADS_NETNAMES_VISIBLE, END_PCB_VISIBLE_LIST // sentinel @@ -264,7 +266,7 @@ const int GalLayerOrder[] = ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), - ITEM_GAL_LAYER( PAD_FR_VISIBLE ), + ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ), ITEM_GAL_LAYER( LAYER_16_NETNAMES_VISIBLE ), LAYER_N_FRONT, ITEM_GAL_LAYER( LAYER_15_NETNAMES_VISIBLE ), LAYER_N_15, ITEM_GAL_LAYER( LAYER_14_NETNAMES_VISIBLE ), LAYER_N_14, @@ -281,7 +283,7 @@ const int GalLayerOrder[] = ITEM_GAL_LAYER( LAYER_3_NETNAMES_VISIBLE ), LAYER_N_3, ITEM_GAL_LAYER( LAYER_2_NETNAMES_VISIBLE ), LAYER_N_2, ITEM_GAL_LAYER( LAYER_1_NETNAMES_VISIBLE ), LAYER_N_BACK, - ITEM_GAL_LAYER( PAD_BK_VISIBLE ), + ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ), SOLDERMASK_N_BACK, ADHESIVE_N_BACK, SOLDERPASTE_N_BACK, SILKSCREEN_N_BACK, ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ) @@ -408,6 +410,10 @@ inline LAYER_NUM GetNetnameLayer( LAYER_NUM aLayer ) } else if( aLayer == ITEM_GAL_LAYER( PADS_VISIBLE ) ) return ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ); + else if( aLayer == ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ) + return ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ); + else if( aLayer == ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ) + return ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ); // Fallback return COMMENT_N; diff --git a/include/painter.h b/include/painter.h index 775137dcbf..379bc744ee 100644 --- a/include/painter.h +++ b/include/painter.h @@ -27,8 +27,8 @@ #ifndef __CLASS_PAINTER_H #define __CLASS_PAINTER_H -#include #include +#include #include #include @@ -51,8 +51,6 @@ class VIEW_ITEM; * - drawing quality control (sketch/outline mode) * The class acts as an interface between the PAINTER object and the GUI (i.e. Layers/Items * widget or display options dialog). - * - * Todo: properties/introspection */ class RENDER_SETTINGS { @@ -81,9 +79,21 @@ public: * (eg. highlighted, so it differs from other layers). * @param aLayerId is a layer number that should be displayed in a specific mode. */ - inline void SetActiveLayer( int aLayerId ) + inline void SetActiveLayer( int aLayerId, bool aEnabled = true ) { - m_activeLayer = aLayerId; + if( aEnabled ) + m_activeLayers.insert( aLayerId ); + else + m_activeLayers.erase( aLayerId ); + } + + /** + * Function ClearActiveLayers + * Clears the list of active layers. + */ + inline void ClearActiveLayers() + { + m_activeLayers.clear(); } /** @@ -112,8 +122,7 @@ public: } protected: - - int m_activeLayer; /// Stores active layer number + std::set m_activeLayers; /// Stores active layers number /// Parameters for display modes bool m_hiContrastEnabled; /// High contrast display mode on/off diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index a79e660104..7d9845e4ef 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -133,7 +133,15 @@ protected: * will change the currently active layer to \a aLayer and also * update the PCB_LAYER_WIDGET. */ - void setActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate = true ); + void setActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate = true ) + { + ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer = aLayer; + + setHighContrastLayer( aLayer ); + + if( doLayerWidgetUpdate ) + syncLayerWidgetLayer(); + } /** * Function getActiveLayer @@ -144,6 +152,12 @@ protected: return ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer; } + /** + * Function setHighContrastLayer + * takes care of display settings for the given layer to be displayed in high contrast mode. + */ + void setHighContrastLayer( LAYER_NUM aLayer ); + /** * Function syncLayerWidgetLayer * updates the currently layer "selection" within the PCB_LAYER_WIDGET. diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 73327f6e51..229030de37 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -203,11 +203,10 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) // Netnames are drawn only when scale is sufficient (level of details) // so there is no point in caching them - for( LAYER_NUM layer = FIRST_COPPER_LAYER; layer <= LAST_COPPER_LAYER; ++layer ) + for( LAYER_NUM layer = FIRST_NETNAME_LAYER; layer <= LAST_NETNAME_LAYER; ++layer ) { - view->SetLayerCached( GetNetnameLayer( layer ), false ); + view->SetLayerCached( layer, false ); } - view->SetLayerCached( ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), false ); // Load layer & elements visibility settings for( unsigned int i = 0; i < NB_LAYERS; ++i ) diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index a6bb82f0c7..8b59239662 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -748,48 +748,32 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const { aCount = 0; - if( m_Attribute == PAD_SMD || m_Attribute == PAD_CONN ) + if( IsOnLayer( LAYER_N_FRONT ) && IsOnLayer( LAYER_N_BACK ) ) { - // Single layer pad (smd) without hole - if( IsOnLayer( LAYER_N_FRONT ) ) - aLayers[aCount++] = ITEM_GAL_LAYER( PAD_FR_VISIBLE ); - else if( IsOnLayer( LAYER_N_BACK ) ) - aLayers[aCount++] = ITEM_GAL_LAYER( PAD_BK_VISIBLE ); -#ifdef __WXDEBUG__ - else // Should not occur - { - wxLogWarning( wxT("D_PAD::ViewGetLayers():PAD on layer different than FRONT/BACK") ); - } -#endif + // Multi layer pad + aLayers[aCount++] = ITEM_GAL_LAYER( PADS_VISIBLE ); + aLayers[aCount++] = ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ); } - else + else if( IsOnLayer( LAYER_N_FRONT ) ) { - if( IsOnLayer( LAYER_N_FRONT ) && IsOnLayer( LAYER_N_BACK ) ) - { - // Multi layer pad - aLayers[aCount++] = ITEM_GAL_LAYER( PADS_VISIBLE ); - } - else if( IsOnLayer( LAYER_N_FRONT ) ) - { - aLayers[aCount++] = ITEM_GAL_LAYER( PAD_FR_VISIBLE ); - } - else if( IsOnLayer( LAYER_N_BACK ) ) - { - aLayers[aCount++] = ITEM_GAL_LAYER( PAD_BK_VISIBLE ); - } + aLayers[aCount++] = ITEM_GAL_LAYER( PAD_FR_VISIBLE ); + aLayers[aCount++] = ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ); + } + else if( IsOnLayer( LAYER_N_BACK ) ) + { + aLayers[aCount++] = ITEM_GAL_LAYER( PAD_BK_VISIBLE ); + aLayers[aCount++] = ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ); + } #ifdef __WXDEBUG__ - else // Should not occur - { - wxLogWarning( wxT("D_PAD::ViewGetLayers():PAD on layer different than FRONT/BACK") ); - } + else // Should not occur + { + wxLogWarning( wxT("D_PAD::ViewGetLayers():PAD on layer different than FRONT/BACK") ); + } #endif - // Draw a hole + // These types of pads contain a hole + if( m_Attribute == PAD_STANDARD || m_Attribute == PAD_HOLE_NOT_PLATED ) aLayers[aCount++] = ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ); - } - - // Pad description layer (number & net) - aLayers[aCount++] = ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ); } @@ -805,7 +789,7 @@ void D_PAD::ViewGetRequiredLayers( int aLayers[], int& aCount ) const unsigned int D_PAD::ViewGetLOD( int aLayer ) const { // Netnames will be shown only if zoom is appropriate - if( aLayer == ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ) ) + if( IsNetnameLayer( aLayer ) ) { return ( 100000000 / std::max( m_Size.x, m_Size.y ) ); } diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index 996c0f9e92..0619451bb8 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -199,35 +199,35 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) case ID_TB_OPTIONS_SHOW_ZONES: DisplayOpt.DisplayZonesMode = 0; recache = true; - if( !IsGalCanvasActive() ) + if( !m_galCanvasActive ) m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_ZONES_DISABLE: DisplayOpt.DisplayZonesMode = 1; recache = true; - if( !IsGalCanvasActive() ) + if( !m_galCanvasActive ) m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY: DisplayOpt.DisplayZonesMode = 2; recache = true; - if( !IsGalCanvasActive() ) + if( !m_galCanvasActive ) m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_VIAS_SKETCH: m_DisplayViaFill = DisplayOpt.DisplayViaFill = !state; recache = true; - if( !IsGalCanvasActive() ) + if( !m_galCanvasActive ) m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_TRACKS_SKETCH: m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill = !state; recache = true; - if( !IsGalCanvasActive() ) + if( !m_galCanvasActive ) m_canvas->Refresh(); break; @@ -238,19 +238,12 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) // Apply new display options to the GAL canvas (this is faster than recaching) settings->LoadDisplayOptions( DisplayOpt ); - KiGfx::VIEW* view = m_galCanvas->GetView(); - LAYER_NUM layer = getActiveLayer(); + setHighContrastLayer( getActiveLayer() ); + m_galCanvas->GetView()->EnableTopLayer( state ); - view->GetPainter()->GetSettings()->SetActiveLayer( layer ); - view->UpdateAllLayersColor(); + if( m_galCanvasActive ) + m_galCanvas->Refresh(); - view->EnableTopLayer( state ); - view->ClearTopLayers(); - view->SetTopLayer( layer ); - view->UpdateAllLayersOrder(); - - if( !IsGalCanvasActive() ) - m_canvas->Refresh(); break; } diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index dc3670e6ec..eb8da2fa87 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -73,6 +73,8 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings m_itemColors[VIAS_VISIBLE] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); m_itemColors[PADS_VISIBLE] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); m_itemColors[PADS_NETNAMES_VISIBLE] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); + m_itemColors[PAD_FR_NETNAMES_VISIBLE] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); + m_itemColors[PAD_BK_NETNAMES_VISIBLE] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); // Netnames for copper layers for( LAYER_NUM layer = FIRST_COPPER_LAYER; layer <= LAST_COPPER_LAYER; ++layer ) { @@ -156,7 +158,7 @@ const COLOR4D& PCB_PAINTER::GetColor( const VIEW_ITEM* aItem, int aLayer ) const COLOR4D& PCB_PAINTER::getLayerColor( int aLayer, int aNetCode ) const { - if( m_pcbSettings->m_hiContrastEnabled && m_pcbSettings->m_activeLayer != aLayer ) + if( m_pcbSettings->m_hiContrastEnabled && m_pcbSettings->m_activeLayers.count( aLayer ) == 0 ) { return m_pcbSettings->m_hiContrastColor; } @@ -376,7 +378,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) orientation = orientation * M_PI / 1800.0; // Draw description layer - if( aLayer == ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ) ) + if( IsNetnameLayer( aLayer ) ) { size = VECTOR2D( aPad->GetSize() / 2 ); double scale = m_gal->GetZoomFactor(); diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index a9cafce5cb..8b8c85f296 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -743,28 +743,57 @@ bool PCB_EDIT_FRAME::IsMicroViaAcceptable( void ) } -void PCB_EDIT_FRAME::setActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate ) +void PCB_EDIT_FRAME::setHighContrastLayer( LAYER_NUM aLayer ) { - ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer = aLayer; - // Set display settings for high contrast mode KiGfx::VIEW* view = m_galCanvas->GetView(); + KiGfx::RENDER_SETTINGS* rSettings = view->GetPainter()->GetSettings(); if( DisplayOpt.ContrastModeDisplay ) { - view->GetPainter()->GetSettings()->SetActiveLayer( aLayer ); - view->UpdateAllLayersColor(); - view->ClearTopLayers(); view->SetTopLayer( aLayer ); + + rSettings->ClearActiveLayers(); + rSettings->SetActiveLayer( aLayer ); + + if( IsCopperLayer( aLayer ) ) + { + // Bring some other layers to the front in case of copper layers and make them colored + LAYER_NUM layers[] = { + GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIAS_VISIBLE ), + ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), + ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ) + }; + + for( unsigned int i = 0; i < sizeof( layers ) / sizeof( LAYER_NUM ); ++i ) + { + view->SetTopLayer( layers[i] ); + rSettings->SetActiveLayer( layers[i] ); + } + + // Pads should be shown too + if( aLayer == FIRST_COPPER_LAYER ) + { + view->SetTopLayer( ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); + view->SetTopLayer( ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ) ); + rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); + rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ) ); + } + else if( aLayer == LAST_COPPER_LAYER ) + { + view->SetTopLayer( ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); + view->SetTopLayer( ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ) ); + rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); + rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ) ); + } + } view->UpdateAllLayersOrder(); + view->UpdateAllLayersColor(); if( m_galCanvasActive ) m_galCanvas->Refresh(); } - - if( doLayerWidgetUpdate ) - syncLayerWidgetLayer(); } From 3cedadd738aafa4f3698a77ffc43f78168856904 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 16 Jul 2013 15:44:08 +0200 Subject: [PATCH 161/415] Fixed OpenGL tracks transparency & netnames issue. --- common/gal/opengl/opengl_gal.cpp | 37 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 7d98f0cd38..ad190861a2 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -501,25 +501,6 @@ void OPENGL_GAL::EndDrawing() glEnableClientState( GL_VERTEX_ARRAY ); glEnableClientState( GL_COLOR_ARRAY ); - // Bind vertices data buffers - glBindBuffer( GL_ARRAY_BUFFER, cachedVerts ); - glVertexPointer( VBO_ITEM::CoordStride, GL_FLOAT, VBO_ITEM::VertByteSize, 0 ); - glColorPointer( VBO_ITEM::ColorStride, GL_UNSIGNED_BYTE, VBO_ITEM::VertByteSize, - (GLvoid*) VBO_ITEM::ColorByteOffset ); - - // Shader parameters - if( isUseShader ) - { - shader.Use(); - glEnableVertexAttribArray( shaderAttrib ); - glVertexAttribPointer( shaderAttrib, VBO_ITEM::ShaderStride, GL_FLOAT, GL_FALSE, - VBO_ITEM::VertByteSize, (GLvoid*) VBO_ITEM::ShaderByteOffset ); - } - - glDrawElements( GL_TRIANGLES, indicesSize, GL_UNSIGNED_INT, (GLvoid*) 0 ); - glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 ); - glBindBuffer( GL_ARRAY_BUFFER, 0 ); - // Draw non-cached items GLfloat* vertices = (GLfloat*)( nonCachedVbo.GetAllVertices() ); GLubyte* colors = (GLubyte*)( nonCachedVbo.GetAllVertices() ) + VBO_ITEM::ColorOffset; @@ -529,11 +510,29 @@ void OPENGL_GAL::EndDrawing() glColorPointer( VBO_ITEM::ColorStride, GL_UNSIGNED_BYTE, VBO_ITEM::VertByteSize, colors ); if( isUseShader ) { + shader.Use(); + glEnableVertexAttribArray( shaderAttrib ); glVertexAttribPointer( shaderAttrib, VBO_ITEM::ShaderStride, GL_FLOAT, GL_FALSE, VBO_ITEM::VertByteSize, shaders ); } glDrawArrays( GL_TRIANGLES, nonCachedItem->GetOffset(), nonCachedItem->GetSize() ); + // Draw cached items + glBindBuffer( GL_ARRAY_BUFFER, cachedVerts ); + glVertexPointer( VBO_ITEM::CoordStride, GL_FLOAT, VBO_ITEM::VertByteSize, 0 ); + glColorPointer( VBO_ITEM::ColorStride, GL_UNSIGNED_BYTE, VBO_ITEM::VertByteSize, + (GLvoid*) VBO_ITEM::ColorByteOffset ); + if( isUseShader ) + { + glVertexAttribPointer( shaderAttrib, VBO_ITEM::ShaderStride, GL_FLOAT, GL_FALSE, + VBO_ITEM::VertByteSize, (GLvoid*) VBO_ITEM::ShaderByteOffset ); + } + + + glDrawElements( GL_TRIANGLES, indicesSize, GL_UNSIGNED_INT, (GLvoid*) 0 ); + glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 ); + glBindBuffer( GL_ARRAY_BUFFER, 0 ); + // Deactivate vertex array glDisableClientState( GL_COLOR_ARRAY ); glDisableClientState( GL_VERTEX_ARRAY ); From 910d95a7b648663ba1ac880fde3e9c0b5e78bff3 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 16 Jul 2013 15:45:21 +0200 Subject: [PATCH 162/415] Moved bottom netnames layer over bottom tracks & pads. Changed int to LAYER_NUM where applicable. --- include/layers_id_colors_and_visibility.h | 4 ++-- pcbnew/basepcbframe.cpp | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index 270a3a870f..f22eac8dd5 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -254,7 +254,7 @@ enum PCB_VISIBLE /// Rendering order of layers on GAL-based canvas (lower index in the array /// means that layer is displayed closer to the user, ie. on the top). -const int GalLayerOrder[] = +const LAYER_NUM GalLayerOrder[] = { DRAW_N, COMMENT_N, ECO1_N, ECO2_N, EDGE_N, UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31, @@ -282,8 +282,8 @@ const int GalLayerOrder[] = ITEM_GAL_LAYER( LAYER_4_NETNAMES_VISIBLE ), LAYER_N_4, ITEM_GAL_LAYER( LAYER_3_NETNAMES_VISIBLE ), LAYER_N_3, ITEM_GAL_LAYER( LAYER_2_NETNAMES_VISIBLE ), LAYER_N_2, - ITEM_GAL_LAYER( LAYER_1_NETNAMES_VISIBLE ), LAYER_N_BACK, ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ), + ITEM_GAL_LAYER( LAYER_1_NETNAMES_VISIBLE ), LAYER_N_BACK, SOLDERMASK_N_BACK, ADHESIVE_N_BACK, SOLDERPASTE_N_BACK, SILKSCREEN_N_BACK, ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ) diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 229030de37..59949e8746 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -196,8 +196,10 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) } // Set rendering order of layers - for( unsigned int i = 0; i < sizeof( GalLayerOrder ) / sizeof( int ); ++i ) + for( LAYER_NUM i = 0; i < sizeof(GalLayerOrder) / sizeof(LAYER_NUM); ++i ) { + wxASSERT( i < KiGfx::VIEW::VIEW_MAX_LAYERS ); + view->SetLayerOrder( GalLayerOrder[i], i ); } @@ -205,16 +207,16 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) // so there is no point in caching them for( LAYER_NUM layer = FIRST_NETNAME_LAYER; layer <= LAST_NETNAME_LAYER; ++layer ) { - view->SetLayerCached( layer, false ); + view->SetLayerCached( layer, false ); } // Load layer & elements visibility settings - for( unsigned int i = 0; i < NB_LAYERS; ++i ) + for( LAYER_NUM i = 0; i < NB_LAYERS; ++i ) { view->SetLayerVisible( i, m_Pcb->IsLayerVisible( i ) ); } - for( unsigned int i = 0; i < END_PCB_VISIBLE_LIST; ++i ) + for( LAYER_NUM i = 0; i < END_PCB_VISIBLE_LIST; ++i ) { view->SetLayerVisible( ITEM_GAL_LAYER( i ), m_Pcb->IsElementVisible( i ) ); } From a4a60643163d83ea4693ae34fcf309df60ccd41c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 17 Jul 2013 10:21:29 +0200 Subject: [PATCH 163/415] Fixed stroked circles width issue with OpenGL shaders. --- common/gal/opengl/opengl_gal.cpp | 21 ++++++++++++--------- common/gal/opengl/shader.frag | 12 ++++++------ common/gal/opengl/shader.vert | 13 ++++++------- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index ad190861a2..a82fa33d30 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -795,7 +795,7 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) aCenterPoint.y - aRadius, layerDepth ); // v0 setShader( SHADER_FILLED_CIRCLE, 2.0 ); - vertex3( aCenterPoint.x + aRadius * sqrt( 3.0f ), + vertex3( aCenterPoint.x + aRadius* sqrt( 3.0f ), aCenterPoint.y - aRadius, layerDepth ); // v1 setShader( SHADER_FILLED_CIRCLE, 3.0 ); @@ -816,16 +816,17 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) //\\ v0 /_\/_\ v1 */ + double outerRadius = aRadius + ( lineWidth / 2 ); setShader( SHADER_STROKED_CIRCLE, 1.0, aRadius, lineWidth ); - vertex3( aCenterPoint.x - aRadius * sqrt( 3.0f ), - aCenterPoint.y - aRadius, layerDepth ); // v0 + vertex3( aCenterPoint.x - outerRadius * sqrt( 3.0f ), + aCenterPoint.y - outerRadius, layerDepth ); // v0 setShader( SHADER_STROKED_CIRCLE, 2.0, aRadius, lineWidth ); - vertex3( aCenterPoint.x + aRadius * sqrt( 3.0f ), - aCenterPoint.y - aRadius, layerDepth ); // v1 + vertex3( aCenterPoint.x + outerRadius * sqrt( 3.0f ), + aCenterPoint.y - outerRadius, layerDepth ); // v1 setShader( SHADER_STROKED_CIRCLE, 3.0, aRadius, lineWidth ); - vertex3( aCenterPoint.x, aCenterPoint.y + aRadius * 2.0f, layerDepth ); // v2 + vertex3( aCenterPoint.x, aCenterPoint.y + outerRadius * 2.0f, layerDepth ); // v2 } return; @@ -964,6 +965,8 @@ void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRa { if( isUseShader ) { + double outerRadius = aRadius + ( lineWidth / 2 ); + Save(); Translate( aCenterPoint ); Rotate( aAngle ); @@ -979,13 +982,13 @@ void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRa v0 //__\\ v1 */ setShader( SHADER_STROKED_CIRCLE, 4.0f, aRadius, lineWidth ); - vertex3( -aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 + vertex3( -outerRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 setShader( SHADER_STROKED_CIRCLE, 5.0f, aRadius, lineWidth ); - vertex3( aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 + vertex3( outerRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 setShader( SHADER_STROKED_CIRCLE, 6.0f, aRadius, lineWidth ); - vertex3( 0.0f, aRadius * 2.0f, layerDepth ); // v2 + vertex3( 0.0f, outerRadius * 2.0f, layerDepth ); // v2 Restore(); } diff --git a/common/gal/opengl/shader.frag b/common/gal/opengl/shader.frag index f658fcdae5..e53c33674e 100644 --- a/common/gal/opengl/shader.frag +++ b/common/gal/opengl/shader.frag @@ -27,9 +27,9 @@ #version 120 // Shader types -const float SHADER_LINE = 1.0; -const float SHADER_FILLED_CIRCLE = 2.0; -const float SHADER_STROKED_CIRCLE = 3.0; +const float SHADER_LINE = 1.0f; +const float SHADER_FILLED_CIRCLE = 2.0f; +const float SHADER_STROKED_CIRCLE = 3.0f; varying vec4 shaderParams; varying vec2 circleCoords; @@ -45,11 +45,11 @@ void filledCircle( vec2 aCoord ) void strokedCircle( vec2 aCoord, float aRadius, float aWidth ) { - float outerRadius = aRadius; - float innerRadius = aRadius - aWidth; + float outerRadius = aRadius + ( aWidth / 2 ); + float innerRadius = aRadius - ( aWidth / 2 ); float relWidth = innerRadius / outerRadius; - if( ( dot( aCoord, aCoord ) < 1.0 ) && + if( ( dot( aCoord, aCoord ) < 1.0f ) && ( dot( aCoord, aCoord ) > relWidth * relWidth ) ) gl_FragColor = gl_Color; else diff --git a/common/gal/opengl/shader.vert b/common/gal/opengl/shader.vert index 24b12afe45..86f468b3c6 100644 --- a/common/gal/opengl/shader.vert +++ b/common/gal/opengl/shader.vert @@ -27,12 +27,12 @@ #version 120 // Shader types -const float SHADER_LINE = 1.0; -const float SHADER_FILLED_CIRCLE = 2.0; -const float SHADER_STROKED_CIRCLE = 3.0; +const float SHADER_LINE = 1.0f; +const float SHADER_FILLED_CIRCLE = 2.0f; +const float SHADER_STROKED_CIRCLE = 3.0f; // Minimum line width -const float MIN_WIDTH = 1.0; +const float MIN_WIDTH = 1.0f; attribute vec4 attrShaderParams; varying vec4 shaderParams; @@ -51,9 +51,9 @@ void main() // Make lines appear to be at least 1 pixel wide if( worldScale * lineWidth < MIN_WIDTH ) - scale = 1.0 / ( worldScale * lineWidth ); + scale = 1.0f / ( worldScale * lineWidth ); else - scale = 1.0; + scale = 1.0f; gl_Position = gl_ModelViewProjectionMatrix * ( gl_Vertex + vec4( shaderParams.yz * scale, 0.0, 0.0 ) ); @@ -81,7 +81,6 @@ void main() // Make the line appear to be at least 1 pixel wide float lineWidth = shaderParams[3]; float worldScale = gl_ModelViewMatrix[0][0]; - float scale; // Make lines appear to be at least 1 pixel width if( worldScale * lineWidth < MIN_WIDTH ) From 1d582a515c045d95e74db8a86b31543b70aeb928 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 17 Jul 2013 10:21:46 +0200 Subject: [PATCH 164/415] Added an interface for highlighting. --- common/view/view_item.cpp | 4 +- include/painter.h | 3 +- include/view/view_item.h | 27 ++++++++-- pcbnew/pcb_painter.cpp | 105 ++++++++++++++++++++------------------ pcbnew/pcb_painter.h | 4 +- 5 files changed, 84 insertions(+), 59 deletions(-) diff --git a/common/view/view_item.cpp b/common/view/view_item.cpp index 8b53114a4c..460c7f3d77 100644 --- a/common/view/view_item.cpp +++ b/common/view/view_item.cpp @@ -33,12 +33,12 @@ void VIEW_ITEM::ViewSetVisible( bool aIsVisible ) { bool update = false; - if( m_viewVisible != aIsVisible ) + if( m_visible != aIsVisible ) { update = true; } - m_viewVisible = aIsVisible; + m_visible = aIsVisible; // update only if the visibility has really changed if( update ) diff --git a/include/painter.h b/include/painter.h index 379bc744ee..8b6dc374d2 100644 --- a/include/painter.h +++ b/include/painter.h @@ -232,8 +232,9 @@ protected: * combination using stored color settings. * @param aLayer is the layer number that is being drawn. * @param aNetCode is a number of the net that is being drawn. + * @param aHighlighted says if the item is marked as highlighted. */ - virtual const COLOR4D& getLayerColor( int aLayer, int aNetCode ) const = 0; + virtual const COLOR4D& getLayerColor( int aLayer, int aNetCode, bool aHighlighted ) const = 0; /// Instance of graphic abstraction layer that gives an interface to call /// commands used to draw (eg. DrawLine, DrawCircle, etc.) diff --git a/include/view/view_item.h b/include/view/view_item.h index 00040e2455..3c1e2b3b33 100644 --- a/include/view/view_item.h +++ b/include/view/view_item.h @@ -160,7 +160,8 @@ public: ALL = 0xff }; - VIEW_ITEM() : m_view( NULL ), m_viewVisible( true ), m_groups( NULL ), m_groupsSize( 0 ) {} + VIEW_ITEM() : m_view( NULL ), m_visible( true ), m_highlighted( false ), + m_groups( NULL ), m_groupsSize( 0 ) {} /** * Destructor. For dynamic views, removes the item from the view. @@ -234,7 +235,26 @@ public: */ bool ViewIsVisible() const { - return m_viewVisible; + return m_visible; + } + + /** + * Function ViewSetHighlighted() + * Sets the item highlight. + * + * @param aIsHighlighted: whether the item is highlighted (on all layers), or not. + */ + void ViewSetHighlighted( bool aIsHighlighted = true ); + + /** + * Function ViewIsHighlighted() + * Returns if the item is highlighted (or not). + * + * @return when true, the item should be displayed as highlighted. + */ + bool ViewIsHighlighted() const + { + return m_highlighted; } /** @@ -287,7 +307,8 @@ protected: } VIEW* m_view; ///* Current dynamic view the item is assigned to. - bool m_viewVisible; ///* Are we visible in the current dynamic VIEW. + bool m_visible; ///* Are we visible in the current dynamic VIEW. + bool m_highlighted; ///* Should item be drawn as highlighted private: ///* Helper for storing cached items group ids diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index eb8da2fa87..c43848d30a 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -152,57 +152,54 @@ const COLOR4D& PCB_PAINTER::GetColor( const VIEW_ITEM* aItem, int aLayer ) if( item ) netCode = item->GetNet(); - return getLayerColor( aLayer, netCode ); + return getLayerColor( aLayer, netCode, aItem->ViewIsHighlighted() ); } -const COLOR4D& PCB_PAINTER::getLayerColor( int aLayer, int aNetCode ) const +const COLOR4D& PCB_PAINTER::getLayerColor( int aLayer, int aNetCode, bool aHighlighted ) const { + // Return grayish color for non-highlightezd layers in the high contrast mode if( m_pcbSettings->m_hiContrastEnabled && m_pcbSettings->m_activeLayers.count( aLayer ) == 0 ) - { return m_pcbSettings->m_hiContrastColor; - } - else if( m_pcbSettings->m_highlightEnabled ) - { - if( aNetCode == m_pcbSettings->m_highlightNetcode ) - { - return m_pcbSettings->m_layerColorsHi[aLayer]; - } - else - { - return m_pcbSettings->m_layerColorsDark[aLayer]; - } - } - else - { - // For item layers (vias, texts, and so on) - if( aLayer >= NB_LAYERS ) - return getItemColor( aLayer - NB_LAYERS, aNetCode ); - return m_pcbSettings->m_layerColors[aLayer]; - } -} + // For item layers (vias, texts, and so on) + if( aLayer >= NB_LAYERS ) + return getItemColor( aLayer - NB_LAYERS, aNetCode, aHighlighted ); + // Highlight per item basis + if( aHighlighted ) + return m_pcbSettings->m_layerColorsHi[aLayer]; -const COLOR4D& PCB_PAINTER::getItemColor( int aItemType, int aNetCode ) const -{ - // if(aNetCode == m_settings->m_hiContrastEnabled) - // return m_settings->m_itemColorsHi[ aItemType ]; + // Single net highlight mode if( m_pcbSettings->m_highlightEnabled ) { if( aNetCode == m_pcbSettings->m_highlightNetcode ) - { - return m_pcbSettings->m_itemColorsHi[aItemType]; - } + return m_pcbSettings->m_layerColorsHi[aLayer]; else - { - return m_pcbSettings->m_itemColorsDark[aItemType]; - } + return m_pcbSettings->m_layerColorsDark[aLayer]; } - else + + // No special modificators enabled + return m_pcbSettings->m_layerColors[aLayer]; +} + + +const COLOR4D& PCB_PAINTER::getItemColor( int aItemType, int aNetCode, bool aHighlighted ) const +{ + // Highlight per item basis + if( aHighlighted ) + return m_pcbSettings->m_itemColorsHi[aItemType]; + + if( m_pcbSettings->m_highlightEnabled ) { - return m_pcbSettings->m_itemColors[aItemType]; + if( aNetCode == m_pcbSettings->m_highlightNetcode ) + return m_pcbSettings->m_itemColorsHi[aItemType]; + else + return m_pcbSettings->m_itemColorsDark[aItemType]; } + + // No special modificators enabled + return m_pcbSettings->m_itemColors[aItemType]; } @@ -286,7 +283,8 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) double textSize = std::min( static_cast( width ), length / netName.length() ); // Set a proper color for the label - color = getLayerColor( aTrack->GetLayer(), aTrack->GetNet() ); + color = getLayerColor( aTrack->GetLayer(), aTrack->GetNet(), + aTrack->ViewIsHighlighted() ); if( color.GetBrightness() > 0.5 ) m_gal->SetStrokeColor( color.Darkened( 0.8 ) ); else @@ -305,7 +303,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) else if( IsCopperLayer( aLayer )) { // Draw a regular track - color = getLayerColor( aLayer, netNumber ); + color = getLayerColor( aLayer, netNumber, aTrack->ViewIsHighlighted() ); m_gal->SetStrokeColor( color ); m_gal->SetIsStroke( true ); @@ -344,7 +342,7 @@ void PCB_PAINTER::draw( const SEGVIA* aVia, int aLayer ) else return; - color = getLayerColor( aLayer, aVia->GetNet() ); + color = getLayerColor( aLayer, aVia->GetNet(), aVia->ViewIsHighlighted() ); if( m_pcbSettings->m_sketchModeSelect[VIAS_VISIBLE] ) { @@ -418,7 +416,9 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) m_gal->SetMirrored( false ); // Set a proper color for the label - color = getLayerColor( aPad->GetParent()->GetLayer(), aPad->GetNet() ); + color = getLayerColor( aPad->GetParent()->GetLayer(), aPad->GetNet(), + aPad->ViewIsHighlighted() ); + if( color.GetBrightness() > 0.5 ) m_gal->SetStrokeColor( color.Darkened( 0.8 ) ); else @@ -448,7 +448,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) return; } - color = getLayerColor( aLayer, aPad->GetNet() ); + color = getLayerColor( aLayer, aPad->GetNet(), aPad->ViewIsHighlighted() ); if( m_pcbSettings->m_sketchModeSelect[PADS_VISIBLE] ) { // Outline mode @@ -467,7 +467,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) m_gal->Save(); m_gal->Translate( VECTOR2D( aPad->GetPosition() ) ); - m_gal->Rotate( -aPad->GetOrientation() * M_PI / 1800.0 ); // orientation is in tenths of degree + m_gal->Rotate( -aPad->GetOrientation() * M_PI / 1800.0 ); // Choose drawing settings depending on if we are drawing a pad itself or a hole if( aLayer == ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ) ) @@ -551,7 +551,8 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment ) { - COLOR4D strokeColor = getLayerColor( aSegment->GetLayer(), 0 ); + COLOR4D strokeColor = getLayerColor( aSegment->GetLayer(), 0, + aSegment->ViewIsHighlighted() ); std::deque pointsList; m_gal->SetIsFill( false ); @@ -604,7 +605,7 @@ void PCB_PAINTER::draw( const TEXTE_PCB* aText ) if( aText->GetText().Length() == 0 ) return; - COLOR4D strokeColor = getLayerColor( aText->GetLayer(), 0 ); + COLOR4D strokeColor = getLayerColor( aText->GetLayer(), 0, aText->ViewIsHighlighted() ); VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y ); double orientation = aText->GetOrientation() * M_PI / 1800.0; @@ -620,7 +621,7 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) if( aText->GetLength() == 0 ) return; - COLOR4D strokeColor = getLayerColor( aLayer, 0 ); + COLOR4D strokeColor = getLayerColor( aLayer, 0, aText->ViewIsHighlighted() ); VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y); double orientation = aText->GetDrawRotation() * M_PI / 1800.0; @@ -631,9 +632,10 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) } -void PCB_PAINTER::draw( const ZONE_CONTAINER* aContainer ) +void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone ) { - COLOR4D color = getLayerColor( aContainer->GetLayer(), aContainer->GetNet() ); + COLOR4D color = getLayerColor( aZone->GetLayer(), aZone->GetNet(), + aZone->ViewIsHighlighted() ); std::deque corners; PCB_RENDER_SETTINGS::DisplayZonesMode displayMode = m_pcbSettings->m_displayZoneMode; @@ -643,7 +645,7 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aContainer ) m_gal->SetIsStroke( true ); m_gal->SetLineWidth( m_pcbSettings->m_outlineWidth ); - const CPolyLine* outline = aContainer->Outline(); + const CPolyLine* outline = aZone->Outline(); for( int i = 0; i < outline->GetCornersCount(); ++i ) { corners.push_back( VECTOR2D( outline->GetPos( i ) ) ); @@ -656,13 +658,13 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aContainer ) // Draw the filling if( displayMode != PCB_RENDER_SETTINGS::DZ_HIDE_FILLED ) { - const std::vector polyPoints = aContainer->GetFilledPolysList().GetList(); + const std::vector polyPoints = aZone->GetFilledPolysList().GetList(); if( polyPoints.size() == 0 ) // Nothing to draw return; // Set up drawing options m_gal->SetFillColor( color ); - m_gal->SetLineWidth( aContainer->GetThermalReliefCopperBridge() / 2.0 ); + m_gal->SetLineWidth( aZone->GetThermalReliefCopperBridge() / 2.0 ); if( displayMode == PCB_RENDER_SETTINGS::DZ_SHOW_FILLED ) { @@ -702,7 +704,8 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aContainer ) void PCB_PAINTER::draw( const DIMENSION* aDimension ) { - COLOR4D strokeColor = getLayerColor( aDimension->GetLayer(), 0 ); + COLOR4D strokeColor = getLayerColor( aDimension->GetLayer(), 0, + aDimension->ViewIsHighlighted() ); m_gal->SetStrokeColor( strokeColor ); m_gal->SetIsFill( false ); @@ -725,7 +728,7 @@ void PCB_PAINTER::draw( const DIMENSION* aDimension ) void PCB_PAINTER::draw( const PCB_TARGET* aTarget ) { - COLOR4D strokeColor = getLayerColor( aTarget->GetLayer(), 0 ); + COLOR4D strokeColor = getLayerColor( aTarget->GetLayer(), 0, aTarget->ViewIsHighlighted() ); VECTOR2D position( aTarget->GetPosition() ); double size, radius; diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index bc673661ad..a91ffbbea2 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -140,7 +140,7 @@ protected: PCB_RENDER_SETTINGS* m_pcbSettings; /// @copydoc PAINTER::getLayerColor() - const COLOR4D& getLayerColor( int aLayer, int aNetCode ) const; + const COLOR4D& getLayerColor( int aLayer, int aNetCode, bool aHighlighted ) const; /** * Function getItemColor @@ -148,7 +148,7 @@ protected: * @param aItemType Layer number of the item to be drawn. * @param aNetCode Net number of the item to be drawn. */ - const COLOR4D& getItemColor( int aItemType, int aNetCode ) const; + const COLOR4D& getItemColor( int aItemType, int aNetCode, bool aHighlighted ) const; // Drawing functions for various types of PCB-specific items void draw( const TRACK*, int ); From 0ab0c7b8ed100b36159fb7e7ce1006814f0e2cc0 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 17 Jul 2013 10:26:29 +0200 Subject: [PATCH 165/415] Restored missing Refresh() on switching the high contrast mode. --- pcbnew/dialogs/dialog_general_options.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index 0619451bb8..3c86cd8d4a 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -243,6 +243,8 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) if( m_galCanvasActive ) m_galCanvas->Refresh(); + else + m_canvas->Refresh(); break; } From 79b2eb0ff762e2e191a09c5d86a0a028efefc796 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 17 Jul 2013 13:38:56 +0200 Subject: [PATCH 166/415] Display preferences for showing netnames applies to the GAL backend. --- pcbnew/dialogs/dialog_display_options.cpp | 17 ++- pcbnew/pcb_painter.cpp | 175 ++++++++++++++-------- pcbnew/pcb_painter.h | 5 +- 3 files changed, 128 insertions(+), 69 deletions(-) diff --git a/pcbnew/dialogs/dialog_display_options.cpp b/pcbnew/dialogs/dialog_display_options.cpp index 90891d7bcc..be9bc04d40 100644 --- a/pcbnew/dialogs/dialog_display_options.cpp +++ b/pcbnew/dialogs/dialog_display_options.cpp @@ -18,6 +18,10 @@ #include #include +#include +#include +#include + void PCB_EDIT_FRAME::InstallDisplayOptionsDialog( wxCommandEvent& aEvent ) { @@ -165,7 +169,18 @@ void DIALOG_DISPLAY_OPTIONS::OnOkClick(wxCommandEvent& event) DisplayOpt.DisplayDrawItems = m_OptDisplayDrawings->GetSelection(); DisplayOpt.DisplayNetNamesMode = m_ShowNetNamesOption->GetSelection(); - m_Parent->GetCanvas()->Refresh(); + // Apply changes to the GAL + KiGfx::VIEW* view = m_Parent->GetGalCanvas()->GetView(); + KiGfx::PCB_PAINTER* painter = static_cast( view->GetPainter() ); + KiGfx::PCB_RENDER_SETTINGS* settings = + static_cast( painter->GetSettings() ); + settings->LoadDisplayOptions( DisplayOpt ); + view->RecacheAllItems(); + + if( m_Parent->IsGalCanvasActive() ) + m_Parent->GetGalCanvas()->Refresh(); + else + m_Parent->GetCanvas()->Refresh(); EndModal( 1 ); } diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index c43848d30a..d57bdabe82 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -90,12 +90,36 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings void PCB_RENDER_SETTINGS::LoadDisplayOptions( const DISPLAY_OPTIONS& aOptions ) { m_hiContrastEnabled = aOptions.ContrastModeDisplay; + m_padNumbers = aOptions.DisplayPadNum; // Whether to draw tracks, vias & pads filled or as outlines m_sketchModeSelect[PADS_VISIBLE] = !aOptions.DisplayPadFill; m_sketchModeSelect[VIAS_VISIBLE] = !aOptions.DisplayViaFill; m_sketchModeSelect[TRACKS_VISIBLE] = !aOptions.DisplayPcbTrackFill; + switch( aOptions.DisplayNetNamesMode ) + { + case 0: + m_netNamesOnPads = false; + m_netNamesOnTracks = false; + break; + + case 1: + m_netNamesOnPads = true; + m_netNamesOnTracks = false; + break; + + case 2: + m_netNamesOnPads = false; + m_netNamesOnTracks = true; + break; + + case 3: + m_netNamesOnPads = true; + m_netNamesOnTracks = true; + break; + } + switch( aOptions.DisplayZonesMode ) { case 0: @@ -264,7 +288,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) int netNumber = aTrack->GetNet(); COLOR4D color; - if( IsNetnameLayer( aLayer ) ) + if( m_pcbSettings->m_netNamesOnTracks && IsNetnameLayer( aLayer ) ) { // If there is a net name - display it on the track if( netNumber != 0 ) @@ -378,73 +402,92 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) // Draw description layer if( IsNetnameLayer( aLayer ) ) { - size = VECTOR2D( aPad->GetSize() / 2 ); - double scale = m_gal->GetZoomFactor(); - double maxSize = PCB_RENDER_SETTINGS::MAX_FONT_SIZE / scale; - - // Font size limits - if( size.x > maxSize ) - size.x = maxSize; - if( size.y > maxSize ) - size.y = maxSize; - - // Keep the size ratio for the font, but make it smaller - if( size.x < size.y ) + // Is anything that we can display enabled? + if( m_pcbSettings->m_netNamesOnPads || m_pcbSettings->m_padNumbers ) { - orientation -= M_PI / 2; - size.y = size.x * 4.0 / 3.0; + bool displayNetname = ( m_pcbSettings->m_netNamesOnPads && + !aPad->GetNetname().empty() ); + size = VECTOR2D( aPad->GetSize() / 2 ); + double scale = m_gal->GetZoomFactor(); + double maxSize = PCB_RENDER_SETTINGS::MAX_FONT_SIZE / scale; + + // Font size limits + if( size.x > maxSize ) + size.x = maxSize; + if( size.y > maxSize ) + size.y = maxSize; + + // Keep the size ratio for the font, but make it smaller + if( size.x < size.y ) + { + orientation -= M_PI / 2.0; + size.y = size.x * 4.0 / 3.0; + } + else if( size.x == size.y ) + { + // If the text is displayed on a symmetrical pad, do not rotate it + orientation = 0.0; + } + else + { + size.x = size.y * 3.0 / 4.0; + } + + m_gal->Save(); + m_gal->Translate( position ); + m_gal->Rotate( -orientation ); + + // Default font settings + m_gal->SetHorizontalJustify( GR_TEXT_HJUSTIFY_CENTER ); + m_gal->SetVerticalJustify( GR_TEXT_VJUSTIFY_CENTER ); + m_gal->SetBold( false ); + m_gal->SetItalic( false ); + m_gal->SetMirrored( false ); + + // Set a proper color for the label + color = getLayerColor( aPad->GetParent()->GetLayer(), aPad->GetNet(), + aPad->ViewIsHighlighted() ); + + if( color.GetBrightness() > 0.5 ) + m_gal->SetStrokeColor( color.Darkened( 0.8 ) ); + else + m_gal->SetStrokeColor( color.Highlighted( 0.8 ) ); + + if( displayNetname && m_pcbSettings->m_padNumbers ) + { + // Divide the space, when both pad numbers and netnames are enabled + size = size / 2.0; + m_gal->SetGlyphSize( size ); + m_gal->SetLineWidth( size.y / 8.0 ); + + m_gal->StrokeText( std::string( aPad->GetNetname().mb_str() ), + VECTOR2D( 0.0, size.y ), 0.0 ); + + m_gal->StrokeText( std::string( aPad->GetPadName().mb_str() ), + VECTOR2D( 0.0, -size.y / 2.0 ), 0.0 ); + } + else + { + // There is only one thing to display + if( displayNetname ) + { + m_gal->SetGlyphSize( size / 2.0 ); + m_gal->SetLineWidth( size.y / 12.0 ); + m_gal->StrokeText( std::string( aPad->GetNetname().mb_str() ), + VECTOR2D( 0.0, 0.0 ), 0.0 ); + } + + if( m_pcbSettings->m_padNumbers ) + { + m_gal->SetGlyphSize( size ); + m_gal->SetLineWidth( size.y / 10.0 ); + m_gal->StrokeText( std::string( aPad->GetPadName().mb_str() ), + VECTOR2D( 0.0, 0.0 ), 0.0 ); + } + } + + m_gal->Restore(); } - else if( size.x == size.y ) - { - // If the text is displayed on a symmetrical pad, do not rotate it - orientation = 0.0; - } - else - { - size.x = size.y * 3.0 / 4.0; - } - - m_gal->Save(); - m_gal->Translate( position ); - m_gal->Rotate( -orientation ); - - // Default font settings - m_gal->SetHorizontalJustify( GR_TEXT_HJUSTIFY_CENTER ); - m_gal->SetVerticalJustify( GR_TEXT_VJUSTIFY_CENTER ); - m_gal->SetBold( false ); - m_gal->SetItalic( false ); - m_gal->SetMirrored( false ); - - // Set a proper color for the label - color = getLayerColor( aPad->GetParent()->GetLayer(), aPad->GetNet(), - aPad->ViewIsHighlighted() ); - - if( color.GetBrightness() > 0.5 ) - m_gal->SetStrokeColor( color.Darkened( 0.8 ) ); - else - m_gal->SetStrokeColor( color.Highlighted( 0.8 ) ); - - // Let's make some space for a netname too, if there's one to display - if( !aPad->GetNetname().empty() ) - { - size = size / 2.0; - m_gal->SetGlyphSize( size ); - m_gal->SetLineWidth( size.y / 10.0 ); - - m_gal->StrokeText( std::string( aPad->GetNetname().mb_str() ), - VECTOR2D( 0, size.y ), 0.0 ); - m_gal->Translate( VECTOR2D( 0.0, -size.y / 2.0 ) ); - } - else - { - // In case when there's no netname assigned - m_gal->SetGlyphSize( size ); - m_gal->SetLineWidth( size.y / 10.0 ); - } - - m_gal->StrokeText( std::string( aPad->GetPadName().mb_str() ), VECTOR2D( 0, 0 ), 0.0 ); - - m_gal->Restore(); return; } diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index a91ffbbea2..50740889ef 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -102,8 +102,9 @@ protected: COLOR4D m_itemColorsDark [END_PCB_VISIBLE_LIST]; bool m_sketchModeSelect[END_PCB_VISIBLE_LIST]; - bool m_visibleLayers [NB_LAYERS]; - bool m_visibleItems [END_PCB_VISIBLE_LIST]; + bool m_padNumbers; + bool m_netNamesOnPads; + bool m_netNamesOnTracks; static const double MAX_FONT_SIZE = 100000000; From 89ddf97fa067b1ae1601a8ad9fea8d95ec352396 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 17 Jul 2013 14:02:08 +0200 Subject: [PATCH 167/415] Different approach to coloring netname labels. --- include/gal/color4d.h | 48 +++++++++++++++++++++++++++++++----------- pcbnew/pcb_painter.cpp | 11 ++++++---- 2 files changed, 43 insertions(+), 16 deletions(-) diff --git a/include/gal/color4d.h b/include/gal/color4d.h index 64616239e6..b5275dfa38 100644 --- a/include/gal/color4d.h +++ b/include/gal/color4d.h @@ -82,9 +82,9 @@ public: */ COLOR4D& Highlight( double aFactor ) { - r = (double) r * (1.0 - aFactor) + aFactor; - g = (double) g * (1.0 - aFactor) + aFactor; - b = (double) b * (1.0 - aFactor) + aFactor; + r = r * ( 1.0 - aFactor ) + aFactor; + g = g * ( 1.0 - aFactor ) + aFactor; + b = b * ( 1.0 - aFactor ) + aFactor; return *this; } @@ -97,9 +97,23 @@ public: */ COLOR4D& Darken( double aFactor ) { - r = (double) r * (1.0 - aFactor); - g = (double) g * (1.0 - aFactor); - b = (double) b * (1.0 - aFactor); + r = r * ( 1.0 - aFactor ); + g = g * ( 1.0 - aFactor ); + b = b * ( 1.0 - aFactor ); + + return *this; + } + + /** + * Function Invert + * Makes the color inverted, alpha remains the same. + * @return COLOR4D& Inverted color. + */ + COLOR4D& Invert() + { + r = ( 1.0 - r ); + g = ( 1.0 - g ); + b = ( 1.0 - b ); return *this; } @@ -112,9 +126,9 @@ public: */ COLOR4D Highlighted( double aFactor ) const { - return COLOR4D( r * (1.0 - aFactor) + aFactor, - g * (1.0 - aFactor) + aFactor, - b * (1.0 - aFactor) + aFactor, + return COLOR4D( r * ( 1.0 - aFactor ) + aFactor, + g * ( 1.0 - aFactor ) + aFactor, + b * ( 1.0 - aFactor ) + aFactor, a ); } @@ -126,12 +140,22 @@ public: */ COLOR4D Darkened( double aFactor ) const { - return COLOR4D( r * (1.0 - aFactor), - g * (1.0 - aFactor), - b * (1.0 - aFactor), + return COLOR4D( r * ( 1.0 - aFactor ), + g * ( 1.0 - aFactor ), + b * ( 1.0 - aFactor ), a ); } + /** + * Function Inverted + * Returns an inverted color, alpha remains the same. + * @return COLOR4D& Inverted color. + */ + COLOR4D Inverted() const + { + return COLOR4D( 1.0 - r, 1.0 - g, 1.0 - b, a ); + } + /** * Function GetBrightness * Returns the brightness value of the color ranged from 0.0 to 1.0. diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index d57bdabe82..777e7b9947 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -309,10 +309,12 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) // Set a proper color for the label color = getLayerColor( aTrack->GetLayer(), aTrack->GetNet(), aTrack->ViewIsHighlighted() ); + COLOR4D labelColor = getLayerColor( aLayer, 0, aTrack->ViewIsHighlighted() ); + if( color.GetBrightness() > 0.5 ) - m_gal->SetStrokeColor( color.Darkened( 0.8 ) ); + m_gal->SetStrokeColor( labelColor.Inverted() ); else - m_gal->SetStrokeColor( color.Highlighted( 0.8 ) ); + m_gal->SetStrokeColor( labelColor ); m_gal->SetLineWidth( width / 10.0 ); m_gal->SetBold( false ); @@ -447,11 +449,12 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) // Set a proper color for the label color = getLayerColor( aPad->GetParent()->GetLayer(), aPad->GetNet(), aPad->ViewIsHighlighted() ); + COLOR4D labelColor = getLayerColor( aLayer, 0, aPad->ViewIsHighlighted() ); if( color.GetBrightness() > 0.5 ) - m_gal->SetStrokeColor( color.Darkened( 0.8 ) ); + m_gal->SetStrokeColor( labelColor.Inverted() ); else - m_gal->SetStrokeColor( color.Highlighted( 0.8 ) ); + m_gal->SetStrokeColor( labelColor ); if( displayNetname && m_pcbSettings->m_padNumbers ) { From e5192ceddd6369edd9ec4dce0634a4376f71803e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 17 Jul 2013 14:16:37 +0200 Subject: [PATCH 168/415] Fixed wrong memory freeing. --- common/gal/opengl/shader.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/gal/opengl/shader.cpp b/common/gal/opengl/shader.cpp index 27b11b25b7..a535f1be69 100644 --- a/common/gal/opengl/shader.cpp +++ b/common/gal/opengl/shader.cpp @@ -164,7 +164,7 @@ void SHADER::programInfo( GLuint aProgram ) wxLogInfo( wxString::FromUTF8( (char*) glInfoLog ) ); - delete glInfoLog; + delete[] glInfoLog; } } @@ -185,7 +185,7 @@ void SHADER::shaderInfo( GLuint aShader ) wxLogInfo( wxString::FromUTF8( (char*) glInfoLog ) ); - delete glInfoLog; + delete[] glInfoLog; } } @@ -246,6 +246,9 @@ bool SHADER::addSource( const std::string& aShaderSource, ShaderType aShaderType glShaderSource( shaderNumber, 1, source_, NULL ); programInfo( programNumber ); + // Delete the allocated char array + delete[] source; + // Compile and attach shader to the program glCompileShader( shaderNumber ); GLint status; @@ -270,9 +273,6 @@ bool SHADER::addSource( const std::string& aShaderSource, ShaderType aShaderType glProgramParameteriEXT( programNumber, GL_GEOMETRY_OUTPUT_TYPE_EXT, geomOutputType ); } - // Delete the allocated char array - delete[] source; - return true; } From c81c316a4640ce35fc5b48b00861e9be1cf951ab Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 17 Jul 2013 18:49:38 +0200 Subject: [PATCH 169/415] Refactorization of VBO_CONTAINER. --- common/gal/opengl/vbo_container.cpp | 387 ++++++++++++++-------------- common/gal/opengl/vbo_item.cpp | 3 +- include/gal/opengl/vbo_container.h | 157 +++++------ include/gal/opengl/vbo_item.h | 34 ++- 4 files changed, 288 insertions(+), 293 deletions(-) diff --git a/common/gal/opengl/vbo_container.cpp b/common/gal/opengl/vbo_container.cpp index cbf5320035..fd6dea86f3 100644 --- a/common/gal/opengl/vbo_container.cpp +++ b/common/gal/opengl/vbo_container.cpp @@ -28,9 +28,8 @@ */ #include -#include -#include -#include +#include +#include #include #ifdef __WXDEBUG__ #include @@ -39,7 +38,7 @@ using namespace KiGfx; VBO_CONTAINER::VBO_CONTAINER( unsigned int aSize ) : - m_freeSpace( aSize ), m_currentSize( aSize ), itemStarted( false ), m_transform( NULL ), + m_freeSpace( aSize ), m_currentSize( aSize ), m_initialSize( aSize ), m_transform( NULL ), m_failed( false ) { // By default no shader is used @@ -58,114 +57,42 @@ VBO_CONTAINER::~VBO_CONTAINER() } -void VBO_CONTAINER::StartItem( VBO_ITEM* aVboItem ) +void VBO_CONTAINER::StartItem( VBO_ITEM* aItem ) { - itemStarted = true; - item = aVboItem; - itemSize = 0; + m_item = aItem; + m_itemSize = aItem->GetSize(); + m_chunkSize = m_itemSize; - // Reserve minimal sensible chunk size (at least to store a single triangle) - itemChunkSize = 3; - allocate( aVboItem, itemChunkSize ); + if( m_itemSize == 0 ) + m_items.insert( m_item ); // The item was not stored before + else + m_chunkOffset = m_item->GetOffset(); } void VBO_CONTAINER::EndItem() { - if( itemSize < itemChunkSize ) + if( m_itemSize < m_chunkSize ) { - // There is some memory left, so we should return it to the pool - int itemChunkOffset = item->GetOffset(); - - m_reservedChunks.erase( item ); - m_reservedChunks.insert( ReservedChunk( item, Chunk( itemSize, itemChunkOffset ) ) ); - - m_freeChunks.insert( Chunk( itemChunkSize - itemSize, itemChunkOffset + itemSize ) ); - m_freeSpace += ( itemChunkSize - itemSize ); + // Add the not used memory back to the pool + m_freeChunks.insert( Chunk( m_chunkSize - m_itemSize, m_chunkOffset + m_itemSize ) ); + m_freeSpace += ( m_chunkSize - m_itemSize ); } - item = NULL; - itemStarted = false; + m_item = NULL; } -void VBO_CONTAINER::Add( VBO_ITEM* aVboItem, const VBO_VERTEX* aVertex, unsigned int aSize ) +void VBO_CONTAINER::Add( const VBO_VERTEX* aVertex, unsigned int aSize ) { - unsigned int offset; - VBO_VERTEX* vertexPtr; + // Pointer to the vertex that we are currently adding + VBO_VERTEX* vertexPtr = allocate( aSize ); - if( m_failed ) + if( vertexPtr == NULL ) return; - if( itemStarted ) // There is an item being created with an unknown size.. - { - unsigned int itemChunkOffset; - - // ..and unfortunately does not fit into currently reserved chunk - if( itemSize + aSize > itemChunkSize ) - { - // Find the previous chunk for the item and change mark it as NULL - // so it will not be removed during a possible defragmentation - ReservedChunkMap::iterator it = m_reservedChunks.find( item ); - m_reservedChunks.insert( ReservedChunk( static_cast( NULL ), it->second ) ); - m_reservedChunks.erase( it ); - - // Reserve bigger memory fo r the current item - int newSize = ( 2 * itemSize ) + aSize; - itemChunkOffset = allocate( aVboItem, newSize ); - aVboItem->SetOffset( itemChunkOffset ); - - // Check if there was no error - if( itemChunkOffset > m_currentSize ) - { - m_failed = true; - return; - } - - it = m_reservedChunks.find( static_cast( NULL ) ); - // Check if the chunk was not reallocated after defragmentation - int oldItemChunkOffset = getChunkOffset( *it ); - // Free the space previously used by the chunk - freeChunk( it ); - - // Copy all the old data - memcpy( &m_vertices[itemChunkOffset], &m_vertices[oldItemChunkOffset], - itemSize * VBO_ITEM::VertByteSize ); - - itemChunkSize = newSize; - } - else - { - itemChunkOffset = item->GetOffset(); - } - - // Store new vertices in the chunk reserved for the unknown-sized item - offset = itemChunkOffset + itemSize; - itemSize += aSize; - } - else - { - // Add vertices to previously already finished item - wxASSERT_MSG( false, wxT( "Warning: not tested yet" ) ); - - ReservedChunkMap::iterator it = m_reservedChunks.find( aVboItem ); - unsigned int chunkSize = getChunkSize( *it ); - unsigned int itemSize = aVboItem->GetSize(); - - if( chunkSize < itemSize + aSize ) - { - resizeChunk( aVboItem, itemSize + aSize ); - it = m_reservedChunks.find( aVboItem ); - } - - offset = getChunkOffset( *it ) + itemSize; - } - for( unsigned int i = 0; i < aSize; ++i ) { - // Pointer to the vertex that we are currently adding - vertexPtr = &m_vertices[offset + i]; - // Modify the vertex according to the currently used transformations if( m_transform != NULL ) { @@ -197,6 +124,8 @@ void VBO_CONTAINER::Add( VBO_ITEM* aVboItem, const VBO_VERTEX* aVertex, unsigned { vertexPtr->shader[j] = m_shader[j]; } + + vertexPtr++; } } @@ -206,41 +135,90 @@ void VBO_CONTAINER::Clear() { // Change size to the default one m_vertices = static_cast( realloc( m_vertices, - defaultInitSize * sizeof( VBO_VERTEX ) ) ); + m_initialSize * sizeof( VBO_VERTEX ) ) ); + + // Set the size of all the stored VERTEX_ITEMs to 0, so it is clear that they are not held + // in the container anymore + Items::iterator it; + for( it = m_items.begin(); it != m_items.end(); ++it ) + { + ( *it )->setSize( 0 ); + } + m_items.clear(); // Reset state variables - m_freeSpace = defaultInitSize; - m_currentSize = defaultInitSize; - itemStarted = false; m_transform = NULL; m_failed = false; // By default no shader is used m_shader[0] = 0; - m_freeChunks.clear(); - m_reservedChunks.clear(); - // In the beginning there is only free space + m_freeSpace = m_initialSize; + m_currentSize = m_initialSize; + m_freeChunks.clear(); m_freeChunks.insert( Chunk( m_freeSpace, 0 ) ); } +void VBO_CONTAINER::Free( VBO_ITEM* aItem ) +{ + freeItem( aItem ); + + // Dynamic memory freeing, there is no point in holding + // a large amount of memory when there is no use for it + if( m_freeSpace > ( m_currentSize / 2 ) && m_currentSize > defaultInitSize ) + { + resizeContainer( m_currentSize / 2 ); + } +} + + VBO_VERTEX* VBO_CONTAINER::GetAllVertices() const { return m_vertices; } -VBO_VERTEX* VBO_CONTAINER::GetVertices( const VBO_ITEM* aVboItem ) const +VBO_VERTEX* VBO_CONTAINER::GetVertices( const VBO_ITEM* aItem ) const { - int offset = aVboItem->GetOffset(); + int offset = aItem->GetOffset(); return &m_vertices[offset]; } +VBO_VERTEX* VBO_CONTAINER::allocate( unsigned int aSize ) +{ + wxASSERT( m_item != NULL ); -unsigned int VBO_CONTAINER::allocate( VBO_ITEM* aVboItem, unsigned int aSize ) + if( m_failed ) + return NULL; + + if( m_itemSize + aSize > m_chunkSize ) + { + // There is not enough space in the currently reserved chunk, so we have to resize it + + // Reserve a bigger memory chunk for the current item + m_chunkSize = std::max( ( 2 * m_itemSize ) + aSize, (unsigned) 3 ); + // Save the current size before reallocating + m_chunkOffset = reallocate( m_chunkSize ); + + if( m_chunkOffset > m_currentSize ) + { + m_failed = true; + return NULL; + } + } + + VBO_VERTEX* reserved = &m_vertices[m_chunkOffset + m_itemSize]; + m_itemSize += aSize; + m_item->setSize( m_itemSize ); + + return reserved; +} + + +unsigned int VBO_CONTAINER::reallocate( unsigned int aSize ) { // Is there enough space to store vertices? if( m_freeSpace < aSize ) @@ -259,74 +237,68 @@ unsigned int VBO_CONTAINER::allocate( VBO_ITEM* aVboItem, unsigned int aSize ) result = resizeContainer( getPowerOf2( m_currentSize * 2 + aSize ) ); } - // An error has occurred if( !result ) - { return UINT_MAX; - } } - // Look for the space with at least given size - FreeChunkMap::iterator it = m_freeChunks.lower_bound( aSize ); + // Look for the free space of at least given size + FreeChunkMap::iterator newChunk = m_freeChunks.lower_bound( aSize ); - if( it == m_freeChunks.end() ) + if( newChunk == m_freeChunks.end() ) { - // This means that there is enough space for - // storing vertices, but the space is not continous + // In the case when there is enough space to store the vertices, + // but the free space is not continous we should defragment the container if( !defragment() ) - { return UINT_MAX; - } + + // Update the current offset + m_chunkOffset = m_item->GetOffset(); // We can take the first free chunk, as there is only one after defragmentation // and we can be sure that it provides enough space to store the object - it = m_freeChunks.begin(); + newChunk = m_freeChunks.begin(); } - unsigned int chunkSize = it->first; - unsigned int chunkOffset = it->second; - - m_freeChunks.erase( it ); + // Parameters of the allocated cuhnk + unsigned int chunkSize = newChunk->first; + unsigned int chunkOffset = newChunk->second; wxASSERT( chunkSize >= aSize ); + wxASSERT( chunkOffset < m_currentSize ); + + // Check if the item was previously stored in the container + if( m_itemSize > 0 ) + { + // The item was reallocated, so we have to copy all the old data to the new place + memcpy( &m_vertices[chunkOffset], &m_vertices[m_chunkOffset], + m_itemSize * VBO_ITEM::VertByteSize ); + + // Free the space previously used by the chunk + m_freeChunks.insert( Chunk( m_itemSize, m_chunkOffset ) ); + m_freeSpace += m_itemSize; + } + // Remove the allocated chunk from the free space pool + m_freeChunks.erase( newChunk ); + m_freeSpace -= chunkSize; // If there is some space left, return it to the pool - add an entry for it if( chunkSize > aSize ) { m_freeChunks.insert( Chunk( chunkSize - aSize, chunkOffset + aSize ) ); + m_freeSpace += chunkSize - aSize; } - m_freeSpace -= aSize; - m_reservedChunks.insert( ReservedChunk( aVboItem, Chunk( aSize, chunkOffset ) ) ); - aVboItem->SetOffset( chunkOffset ); + m_item->setOffset( chunkOffset ); return chunkOffset; } -void VBO_CONTAINER::freeChunk( const ReservedChunkMap::iterator& aChunk ) -{ - // Remove the chunk from the reserved chunks map and add to the free chunks map - int size = getChunkSize( *aChunk ); - int offset = getChunkOffset( *aChunk ); - - m_reservedChunks.erase( aChunk ); - m_freeChunks.insert( Chunk( size, offset ) ); - m_freeSpace += size; -} - - bool VBO_CONTAINER::defragment( VBO_VERTEX* aTarget ) { - if( m_freeChunks.size() <= 1 ) - { - // There is no point in defragmenting, as there is only one or no free chunks - return true; - } - if( aTarget == NULL ) { - // No target was specified, so we have to allocate our own space + // No target was specified, so we have to reallocate our own space aTarget = static_cast( malloc( m_currentSize * sizeof( VBO_VERTEX ) ) ); if( aTarget == NULL ) { @@ -336,20 +308,18 @@ bool VBO_CONTAINER::defragment( VBO_VERTEX* aTarget ) } int newOffset = 0; - ReservedChunkMap::iterator it, it_end; - for( it = m_reservedChunks.begin(), it_end = m_reservedChunks.end(); it != it_end; ++it ) + Items::iterator it, it_end; + for( it = m_items.begin(), it_end = m_items.end(); it != it_end; ++it ) { - VBO_ITEM* vboItem = getChunkVboItem( *it ); - int itemOffset = getChunkOffset( *it ); - int itemSize = getChunkSize( *it ); + VBO_ITEM* item = *it; + int itemOffset = item->GetOffset(); + int itemSize = item->GetSize(); // Move an item to the new container memcpy( &aTarget[newOffset], &m_vertices[itemOffset], itemSize * VBO_ITEM::VertByteSize ); - // Update new offset - if( vboItem ) - vboItem->SetOffset( newOffset ); - setChunkOffset( *it, newOffset ); + // Update its offset + item->setOffset( newOffset ); // Move to the next free space newOffset += itemSize; @@ -360,28 +330,52 @@ bool VBO_CONTAINER::defragment( VBO_VERTEX* aTarget ) // Now there is only one big chunk of free memory m_freeChunks.clear(); - m_freeChunks.insert( Chunk( m_freeSpace, m_currentSize - m_freeSpace ) ); + m_freeChunks.insert( Chunk( m_freeSpace, reservedSpace() ) ); return true; } -void VBO_CONTAINER::resizeChunk( VBO_ITEM* aVboItem, int aNewSize ) +void VBO_CONTAINER::mergeFreeChunks() { - wxASSERT_MSG( false, wxT( "Warning: not tested yet" ) ); + if( m_freeChunks.size() < 2 ) // There are no chunks that can be merged + return; - // TODO ESPECIALLY test the case of shrinking chunk - ReservedChunkMap::iterator it = m_reservedChunks.find( aVboItem ); - int size = getChunkSize( *it ); - int offset = getChunkOffset( *it ); + // Reversed free chunks map - this one stores chunk size with its offset as the key + std::list freeChunks; - int newOffset = allocate( aVboItem, aNewSize ); - memcpy( &m_vertices[newOffset], &m_vertices[offset], size * VBO_ITEM::VertByteSize ); + FreeChunkMap::const_iterator it, it_end; + for( it = m_freeChunks.begin(), it_end = m_freeChunks.end(); it != it_end; ++it ) + { + freeChunks.push_back( std::make_pair( it->second, it->first ) ); + } + m_freeChunks.clear(); + freeChunks.sort(); - // Remove the chunk from the reserved chunks map and add to the free chunks map - m_reservedChunks.erase( it ); - m_freeChunks.insert( Chunk( size, offset ) ); - m_freeSpace += size; + std::list::const_iterator itf, itf_end; + unsigned int offset = freeChunks.front().first; + unsigned int size = freeChunks.front().second; + freeChunks.pop_front(); + for( itf = freeChunks.begin(), itf_end = freeChunks.end(); itf != itf_end; ++itf ) + { + if( itf->first == offset + size ) + { + // These chunks can be merged, so just increase the current chunk size and go on + size += itf->second; + } + else + { + // These chunks cannot be merged + // So store the previous one + m_freeChunks.insert( std::make_pair( size, offset ) ); + // and let's check the next chunk + offset = itf->first; + size = itf->second; + } + } + + // Add the last one + m_freeChunks.insert( std::make_pair( size, offset ) ); } @@ -391,8 +385,9 @@ bool VBO_CONTAINER::resizeContainer( unsigned int aNewSize ) if( aNewSize < m_currentSize ) { + // Shrinking container // Sanity check, no shrinking if we cannot fit all the data - if( ( m_currentSize - m_freeSpace ) > aNewSize ) + if( reservedSpace() > aNewSize ) return false; newContainer = static_cast( malloc( aNewSize * sizeof( VBO_VERTEX ) ) ); @@ -404,52 +399,56 @@ bool VBO_CONTAINER::resizeContainer( unsigned int aNewSize ) // Defragment directly to the new, smaller container defragment( newContainer ); + + // We have to correct freeChunks after defragmentation + m_freeChunks.clear(); + m_freeChunks.insert( Chunk( aNewSize - reservedSpace(), reservedSpace() ) ); } else { + // Enlarging container newContainer = static_cast( realloc( m_vertices, aNewSize * sizeof( VBO_VERTEX ) ) ); if( newContainer == NULL ) { wxLogError( wxT( "Run out of memory" ) ); return false; } + + // Add an entry for the new memory chunk at the end of the container + m_freeChunks.insert( Chunk( aNewSize - m_currentSize, m_currentSize ) ); } m_vertices = newContainer; - // Update variables - unsigned int lastFreeSize = 0; - unsigned int lastFreeOffset = 0; - - // Search for the last free chunk *at the end of the container* (not the last chunk in general) - FreeChunkMap::reverse_iterator lastFree, freeEnd; - for( lastFree = m_freeChunks.rbegin(), freeEnd = m_freeChunks.rend(); - lastFree != freeEnd && lastFreeSize + lastFreeOffset != m_currentSize; ++lastFree ) - { - lastFreeSize = getChunkSize( *lastFree ); - lastFreeOffset = getChunkOffset( *lastFree ); - } - - if( lastFreeSize + lastFreeOffset == m_currentSize ) - { - // We found a chunk at the end of the container - m_freeChunks.erase( lastFree.base() ); - // so we can merge it with the new freeChunk chunk - m_freeChunks.insert( Chunk( aNewSize - m_currentSize + lastFreeSize, // size - m_currentSize - lastFreeSize ) ); // offset - } - else - { - // As there is no free chunk at the end of container - simply add a new entry - if( aNewSize > m_currentSize ) // only in the case of enlargement - { - m_freeChunks.insert( Chunk( aNewSize - m_currentSize, // size - m_currentSize ) ); // offset - } - } - m_freeSpace += ( aNewSize - m_currentSize ); m_currentSize = aNewSize; return true; } + + +void VBO_CONTAINER::freeItem( VBO_ITEM* aItem ) +{ + int size = aItem->GetSize(); + int offset = aItem->GetOffset(); + + m_freeChunks.insert( Chunk( size, offset ) ); + m_freeSpace += size; + m_items.erase( aItem ); + + // Item size is set to 0, so it means that it is not stored in the container + aItem->setSize( 0 ); +} + + +void VBO_CONTAINER::test() const +{ + unsigned int freeSpace = 0; + FreeChunkMap::const_iterator it, it_end; + + // Check if the amount of free memory stored as chunks is the same as reported by m_freeSpace + for( it = m_freeChunks.begin(), it_end = m_freeChunks.end(); it != it_end; ++it ) + freeSpace += it->first; + + wxASSERT( freeSpace == m_freeSpace ); +} diff --git a/common/gal/opengl/vbo_item.cpp b/common/gal/opengl/vbo_item.cpp index 3f3d21b6b0..15bdcc68d4 100644 --- a/common/gal/opengl/vbo_item.cpp +++ b/common/gal/opengl/vbo_item.cpp @@ -52,9 +52,8 @@ VBO_ITEM::~VBO_ITEM() void VBO_ITEM::PushVertex( const VBO_VERTEX* aVertex ) { - m_container->Add( this, aVertex ); + m_container->Add( aVertex ); - m_size++; m_isDirty = true; } diff --git a/include/gal/opengl/vbo_container.h b/include/gal/opengl/vbo_container.h index de2faf1f2d..cb48204fc7 100644 --- a/include/gal/opengl/vbo_container.h +++ b/include/gal/opengl/vbo_container.h @@ -35,8 +35,7 @@ #include #include #include -#include -#include +#include namespace KiGfx { @@ -47,23 +46,22 @@ class VBO_CONTAINER { public: VBO_CONTAINER( unsigned int aSize = defaultInitSize ); - ~VBO_CONTAINER(); + virtual ~VBO_CONTAINER(); ///< Maps size of free memory chunks to their offsets typedef std::pair Chunk; typedef std::multimap FreeChunkMap; - ///< Maps VBO_ITEMs to reserved memory chunks offsets & sizes - typedef std::pair ReservedChunk; - typedef boost::unordered_map ReservedChunkMap; + /// List of all the stored items + typedef std::set Items; /** * Function StartItem() - * Starts an unknown sized item. After calling the function it is possible to add vertices - * using function Add(). - * @param aVboItem is the item that is going to store vertices in the container. + * Sets an item to start its modifications. After calling the function it is possible to add + * vertices using function Add(). + * @param aItem is the item that is going to store vertices in the container. */ - void StartItem( VBO_ITEM* aVboItem ); + void StartItem( VBO_ITEM* aItem ); /** * Function EndItem() @@ -74,30 +72,20 @@ public: /** * Function Add() - * Stores given number of vertices in the container for the specific VBO_ITEM. - * @param aVboItem is the owner of the vertices. + * Stores given number of vertices in the container for the specific VBO_ITEM (started by + * StartItem() function). + * @param aItem is the owner of the vertices. * @param aVertex are vertices data to be stored. * @param aSize is the number of vertices to be added. */ - void Add( VBO_ITEM* aVboItem, const VBO_VERTEX* aVertex, unsigned int aSize = 1 ); + void Add( const VBO_VERTEX* aVertex, unsigned int aSize = 1 ); /** * Function Free() - * Frees the chunk reserved by the aVboItem. - * @param aVboItem is the owner of the chunk to be freed. + * Frees the chunk reserved by the aItem. + * @param aItem is the owner of the chunk to be freed. */ - inline void Free( VBO_ITEM* aVboItem ) - { - ReservedChunkMap::iterator it = m_reservedChunks.find( aVboItem ); - freeChunk( it ); - - // Dynamic memory freeing, there is no point in holding - // a large amount of memory when there is no use for it - if( m_freeSpace > ( m_currentSize / 2 ) ) - { - resizeContainer( m_currentSize / 2 ); - } - } + void Free( VBO_ITEM* aItem ); /** * Function Clear() @@ -115,9 +103,9 @@ public: /** * Function GetVertices() * Returns vertices stored by the specific item. - * @aVboItem is the specific item. + * @aItem is the specific item. */ - VBO_VERTEX* GetVertices( const VBO_ITEM* aVboItem ) const; + VBO_VERTEX* GetVertices( const VBO_ITEM* aItem ) const; /** * Function GetVertices() @@ -208,51 +196,50 @@ public: private: ///< Stores size & offset of free chunks. FreeChunkMap m_freeChunks; - ///< Stores owners (VBO_ITEM*) of reserved chunks and their size & offset. - ReservedChunkMap m_reservedChunks; + ///< Stored VERTEX_ITEMs + Items m_items; /** - * Function allocate() - * Finds an offset where the number of vertices can be stored in a continous space. If there is - * no such chunk, appropriate amount of memory is allocated first. - * @param aVboItem is the owner of vertices to be stored. + * Function allocate() + * Allocates the given amount of memory for the current VBO_ITEM (set by StartItem() function). + * @param aSize is the number of vertices that are requested to be allocated. + * @return Pointer to the allocated space. + */ + VBO_VERTEX* allocate( unsigned int aSize ); + + /** + * Function reallocate() + * Resizes the chunk that stores the current item to the given size. * @param aSize is the number of vertices to be stored. + * @return Offset of the new chunk. */ - unsigned int allocate( VBO_ITEM* aVboItem, unsigned int aSize ); + unsigned int reallocate( unsigned int aSize ); /** * Function getChunkSize() - * Returns size of the given chunk (works both for reserved and free chunks). + * Returns size of the given chunk. * @param aChunk is the chunk. + * @return Size of the chunk. */ - inline int getChunkSize( const Chunk& aChunk ) const + inline unsigned int getChunkSize( const Chunk& aChunk ) const { return aChunk.first; } - inline int getChunkSize( const ReservedChunk& aChunk ) const - { - return aChunk.second.first; - } - /** * Function getChunkOffset() - * Returns offset of the given chunk (works both for reserved and free chunks). + * Returns offset of the given chunk. * @param aChunk is the chunk. + * @return Offset of the chunk. */ inline unsigned int getChunkOffset( const Chunk& aChunk ) const { return aChunk.second; } - inline unsigned int getChunkOffset( const ReservedChunk& aChunk ) const - { - return aChunk.second.second; - } - /** - * Function getChunkOffset() - * Upadtes offset of the given chunk (works both for reserved and free chunks). + * Function setChunkOffset() + * Updates offset of the given chunk. * !! IMPORTANT: it does not reallocate the chunk, it just changes its properties. * @param aChunk is the chunk. */ @@ -261,51 +248,45 @@ private: aChunk.second = aOffset; } - inline void setChunkOffset( ReservedChunk& aChunk, unsigned int aOffset ) const - { - aChunk.second.second = aOffset; - } - - /** - * Function getChunkVboItem() - * Returns owner of the given reserved chunk. - * @param aChunk is the chunk. - */ - inline VBO_ITEM* getChunkVboItem( const ReservedChunk& aChunk ) const - { - return aChunk.first; - } - /** * Function defragment() * Removes empty spaces between chunks, so after that there is a long continous space * for storing vertices at the and of the container. - * @return false in case of failure (eg. memory shortage) + * @return false in case of failure (eg. memory shortage). */ bool defragment( VBO_VERTEX* aTarget = NULL ); /** - * Function resizeChunk() - * Changes size of the chunk that stores vertices of aVboItem. - * @param aVboItem is the item for which reserved space size should be changed. - * @param aNewSize is the new size for the aVboItem, expressed in vertices number. + * Function mergeFreeChunks() + * Looks for consecutive free memory chunks and merges them, decreasing fragmentation of + * memory. */ - void resizeChunk( VBO_ITEM* aVboItem, int aNewSize ); + void mergeFreeChunks(); /** * Function resizeContainer() * Prepares a bigger container of a given size. * @param aNewSize is the new size of container, expressed in vertices - * @return false in case of failure (eg. memory shortage) + * @return false in case of failure (eg. memory shortage). */ bool resizeContainer( unsigned int aNewSize ); /** - * Function freeChunk() - * Frees the space described in aChunk and returns it to the free space pool. - * @param aChunk is a space to be freed. + * Function freeItem() + * Frees the space occupied by the item and returns it to the free space pool. + * @param aItem is the item to be freed. */ - void freeChunk( const ReservedChunkMap::iterator& aChunk ); + void freeItem( VBO_ITEM* aItem ); + + /** + * Function reservedSpace() + * Returns size of the reserved memory space. + * @return Size of the reserved memory space (expressed as a number of vertices). + */ + unsigned int reservedSpace() + { + return m_currentSize - m_freeSpace; + } ///< How many vertices we can store in the container unsigned int m_freeSpace; @@ -316,25 +297,26 @@ private: ///< Actual storage memory VBO_VERTEX* m_vertices; - ///< A flag saying if there is the item with an unknown size being added - bool itemStarted; + ///< Initial size, used on clearing the container + unsigned int m_initialSize; - ///< Variables holding the state of the item currently being added - unsigned int itemSize; - unsigned int itemChunkSize; - VBO_ITEM* item; + ///< Variables holding the state of the item currently being modified + unsigned int m_itemSize; + unsigned int m_chunkSize; + unsigned int m_chunkOffset; + VBO_ITEM* m_item; - ///< Color used for new vertices pushed. + ///< Color used for the new vertices pushed. GLubyte m_color[VBO_ITEM::ColorStride]; ///< Shader and its parameters used for new vertices pushed GLfloat m_shader[VBO_ITEM::ShaderStride]; ///< Current transform matrix applied for every new vertex pushed. - const glm::mat4* m_transform; + const glm::mat4* m_transform; ///< Failure flag - bool m_failed; + bool m_failed; /** * Function getPowerOf2() @@ -353,6 +335,9 @@ private: ///< Default initial size of a container (expressed in vertices) static const unsigned int defaultInitSize = 1048576; + + ///< Basic tests for the container, use only for debugging. + void test() const; }; } // namespace KiGfx diff --git a/include/gal/opengl/vbo_item.h b/include/gal/opengl/vbo_item.h index 146f0966a2..e30f92d8ec 100644 --- a/include/gal/opengl/vbo_item.h +++ b/include/gal/opengl/vbo_item.h @@ -47,6 +47,8 @@ class VBO_CONTAINER; class VBO_ITEM { +friend class VBO_CONTAINER; + public: VBO_ITEM( VBO_CONTAINER* aContainer ); ~VBO_ITEM(); @@ -89,16 +91,6 @@ public: return m_size; } - /** - * Function SetOffset() - * Sets data offset in the VBO. - * @param aOffset is the offset expressed as a number of vertices. - */ - inline void SetOffset( unsigned int aOffset ) - { - m_offset = aOffset; - } - /** * Function GetOffset() * Returns data offset in the VBO. @@ -149,7 +141,7 @@ public: static const unsigned int IndByteSize = sizeof(GLuint); -private: +protected: ///< Offset and size of data stored in the VBO_CONTAINER. unsigned int m_offset; unsigned int m_size; @@ -159,6 +151,26 @@ private: ///< Flag telling if the item should be recached in VBO or not. bool m_isDirty; + + /** + * Function setSize() + * Sets data size in the VBO. + * @param aSize is the size expressed as a number of vertices. + */ + void setSize( unsigned int aSize ) + { + m_size = aSize; + } + + /** + * Function setOffset() + * Sets data offset in the VBO. + * @param aOffset is the offset expressed as a number of vertices. + */ + inline void setOffset( unsigned int aOffset ) + { + m_offset = aOffset; + } }; } // namespace KiGfx From 769bf51359e49c8614d98d000bc2b0124abb9099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Sumi=C5=84ski?= Date: Wed, 17 Jul 2013 23:55:59 +0200 Subject: [PATCH 170/415] Headers containing shader program sources are generated using CMake. --- CMakeModules/Shaders.cmake | 44 +++++++++++++++++++++ common/CMakeLists.txt | 19 +++++---- common/gal/opengl/make_shader_src_h.sh | 53 -------------------------- 3 files changed, 55 insertions(+), 61 deletions(-) create mode 100644 CMakeModules/Shaders.cmake delete mode 100755 common/gal/opengl/make_shader_src_h.sh diff --git a/CMakeModules/Shaders.cmake b/CMakeModules/Shaders.cmake new file mode 100644 index 0000000000..f4566dd622 --- /dev/null +++ b/CMakeModules/Shaders.cmake @@ -0,0 +1,44 @@ +# CMake script file to process a GLSL source file, so it can be included +# in C array and compiled in to an application. + +# number of input files +list( LENGTH inputFiles shadersNumber ) + +# write header +file( WRITE ${outputFile} "// Do not edit this file, it is autogenerated by CMake. + +#ifndef SHADER_SRC_H +#define SHADER_SRC_H + +const unsigned int shaders_number = ${shadersNumber}; +const char *shaders_src[] = {\n" ) + +foreach( inputFile ${inputFiles} ) + # put the input file name into the output file + file( APPEND ${outputFile} "\n// ${inputFile}" ) + + # process the input file + file( READ ${inputFile} contents ) + + # remove /* */ comments + string( REGEX REPLACE "/\\*.*\\*/" "" contents "${contents}" ) + # remove // comments + string( REGEX REPLACE "//[^\n]*" "" contents "${contents}" ) + # remove whitespaces at the beginning of each line + string( REGEX REPLACE "\n([\t ])*" "\n" contents "${contents}" ) + # remove unnecessary spaces + string( REGEX REPLACE " *([\\*/+&\\|,=<>\(\)]) *" "\\1" contents "${contents}" ) + # remove empty lines & wrap every line in "" and add '\n' at the end of each line + string( REGEX REPLACE "\n+" "\\\\n\"\n\"" contents "${contents}" ) + # remove unnecessary " & \n from the beginning and the end of contents + string( REGEX REPLACE "^\\\\n\"" "" contents "${contents}" ) + string( REGEX REPLACE "\"$" "," contents "${contents}" ) + + file( APPEND ${outputFile} "${contents}" ) + +endforeach( inputFile ${inputFiles} ) + +# write footer +file( APPEND ${outputFile} "}; +#endif /* SHADER_SRC_H */" ) + diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 4c21c16d18..0c5fd78172 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -11,17 +11,20 @@ include_directories( ${INC_AFTER} ) -# Generate files containing shader programs -add_custom_command ( +# Generate header files containing shader programs +# Order of input files is significant +add_custom_command( OUTPUT gal/opengl/shader_src.h - DEPENDS gal/opengl/make_shader_src_h.sh + COMMAND ${CMAKE_COMMAND} + -DinputFiles="${PROJECT_SOURCE_DIR}/common/gal/opengl/shader.vert\\;${PROJECT_SOURCE_DIR}/common/gal/opengl/shader.frag" + -DoutputFile="shader_src.h" + -P ${CMAKE_MODULE_PATH}/Shaders.cmake WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/common/gal/opengl - COMMAND ${SHELL} - ARGS ${PROJECT_SOURCE_DIR}/common/gal/opengl/make_shader_src_h.sh + COMMENT "Generating headers containing GLSL source code" ) -add_custom_target ( - ShaderHeader ALL +add_custom_target( + shader_headers ALL DEPENDS gal/opengl/shader_src.h ) @@ -40,7 +43,7 @@ set(GAL_SRCS ) add_library(gal STATIC ${GAL_SRCS}) -add_dependencies(gal ShaderHeader) +add_dependencies(gal shader_headers) if(WIN32) add_definitions(-DGLEW_STATIC) diff --git a/common/gal/opengl/make_shader_src_h.sh b/common/gal/opengl/make_shader_src_h.sh deleted file mode 100755 index 9bb4ce4de8..0000000000 --- a/common/gal/opengl/make_shader_src_h.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -# Make a header file containing GLSL source code -echo "Generating headers containing GLSL source code.." - -# Source files to be included -SHADER_SRC=( "shader.vert" "shader.frag" ) -# Number of shaders -SHADERS_NUMBER=${#SHADER_SRC[@]} -OUTPUT="shader_src.h" -UPDATE=false - -# Check if it is necessary to regenerate headers -for filename in "${SHADER_SRC[@]}" -do - if [[ $filename -nt $OUTPUT ]]; then - UPDATE=true - fi -done - -if [[ $UPDATE == false ]]; then - echo "Headers are up-to-date." - exit -fi - -# Prepare GLSL source to be included in C array -function processSrc { - # 1st part: remove /* */ comments - # 2nd part: remove // comments - # 3rd part: remove blank lines (or containing only whitespaces) - # 4th & 5th part: wrap every line in quotation marks - sed '/\/\*/,/\*\//d; s/[ \t]*\/\/.*$//; /^[ \t]*$/d; s/^[ \t]*/"/; s/[ \t]*$/\\n"/' $1 >> $OUTPUT - echo "," >> $OUTPUT -} - -# Header -echo "#ifndef SHADER_SRC_H -#define SHADER_SRC_H - -const unsigned int shaders_number = $SHADERS_NUMBER; -const char *shaders_src[] = {" > $OUTPUT - -# Main contents -for filename in "${SHADER_SRC[@]}" -do - processSrc $filename -done - -# Footer -echo "}; -#endif /* SHADER_SRC_H */" >> $OUTPUT - -echo "Done." From af26e17fa74e532d389a4e476e42f53d902b53cd Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 19 Jul 2013 09:35:25 +0200 Subject: [PATCH 171/415] Fixed comments. --- include/view/view.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/view/view.h b/include/view/view.h index 3f3c0dc459..da43b591ca 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -258,10 +258,10 @@ public: } /** - * Function SetLayerDynamic() - * Turns on or off the dynamic parameter of a particular layer. + * Function SetLayerCached() + * Turns on or off the cached parameter of a particular layer. * @param aLayer: the layer - * @param aDynamic: the parameter + * @param aCached: the new parameter value */ inline void SetLayerCached( int aLayer, bool aCached = true ) { From 75eb5491d58f705b65c647b5b27174550ad4e0b8 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 22 Jul 2013 10:41:12 +0200 Subject: [PATCH 172/415] Code refactorization. VBO_CONTAINER is split to [NON]CACHED_MANAGER, GPU_MANAGER and VERTEX_MANAGER. --- common/CMakeLists.txt | 8 +- common/drawpanel_gal.cpp | 2 +- common/gal/cairo/cairo_gal.cpp | 24 +- ...vbo_container.cpp => cached_container.cpp} | 413 ++++++----- common/gal/opengl/gpu_manager.cpp | 283 ++++++++ common/gal/opengl/noncached_container.cpp | 94 +++ common/gal/opengl/opengl_gal.cpp | 681 +++++++----------- common/gal/opengl/vbo_item.cpp | 116 --- common/gal/opengl/vertex_container.cpp | 57 ++ common/gal/opengl/vertex_item.cpp | 53 ++ common/gal/opengl/vertex_manager.cpp | 203 ++++++ include/gal/cairo/cairo_gal.h | 4 +- include/gal/opengl/cached_container.h | 185 +++++ include/gal/opengl/gpu_manager.h | 164 +++++ include/gal/opengl/noncached_container.h | 73 ++ include/gal/opengl/opengl_gal.h | 146 +--- include/gal/opengl/vbo_container.h | 344 --------- include/gal/opengl/vbo_item.h | 177 ----- include/gal/opengl/vertex_common.h | 75 ++ include/gal/opengl/vertex_container.h | 158 ++++ include/gal/opengl/vertex_item.h | 103 +++ include/gal/opengl/vertex_manager.h | 341 +++++++++ 22 files changed, 2326 insertions(+), 1378 deletions(-) rename common/gal/opengl/{vbo_container.cpp => cached_container.cpp} (55%) create mode 100644 common/gal/opengl/gpu_manager.cpp create mode 100644 common/gal/opengl/noncached_container.cpp delete mode 100644 common/gal/opengl/vbo_item.cpp create mode 100644 common/gal/opengl/vertex_container.cpp create mode 100644 common/gal/opengl/vertex_item.cpp create mode 100644 common/gal/opengl/vertex_manager.cpp create mode 100644 include/gal/opengl/cached_container.h create mode 100644 include/gal/opengl/gpu_manager.h create mode 100644 include/gal/opengl/noncached_container.h delete mode 100644 include/gal/opengl/vbo_container.h delete mode 100644 include/gal/opengl/vbo_item.h create mode 100644 include/gal/opengl/vertex_common.h create mode 100644 include/gal/opengl/vertex_container.h create mode 100644 include/gal/opengl/vertex_item.h create mode 100644 include/gal/opengl/vertex_manager.h diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 0c5fd78172..b6adf0d275 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -36,8 +36,12 @@ set(GAL_SRCS gal/color4d.cpp gal/opengl/opengl_gal.cpp gal/opengl/shader.cpp - gal/opengl/vbo_item.cpp - gal/opengl/vbo_container.cpp + gal/opengl/vertex_item.cpp + gal/opengl/vertex_container.cpp + gal/opengl/cached_container.cpp + gal/opengl/noncached_container.cpp + gal/opengl/vertex_manager.cpp + gal/opengl/gpu_manager.cpp gal/cairo/cairo_gal.cpp view/wx_view_controls.cpp ) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 7837cf8d04..3549455245 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -132,7 +132,7 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) #endif /* __WXDEBUG__ */ m_gal->BeginDrawing(); - m_gal->SetBackgroundColor( KiGfx::COLOR4D( 0, 0, 0, 1.0 ) ); + m_gal->SetBackgroundColor( KiGfx::COLOR4D( 0.0, 0.0, 0.0, 1.0 ) ); m_gal->ClearScreen(); m_gal->DrawGrid(); diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index d21a1a8286..ba944e842f 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -37,7 +37,7 @@ using namespace KiGfx; CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, wxEvtHandler* aPaintListener, const wxString& aName ) : - wxWindow( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxEXPAND, aName ) + wxWindow( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxEXPAND, aName ) { // Default values fillColor = COLOR4D( 0, 0, 0, 1 ); @@ -141,7 +141,7 @@ void CAIRO_GAL::initSurface() cairoSurface = cairo_image_surface_create_for_data( (unsigned char*) bitmapBuffer, CAIRO_FORMAT_RGB24, clientRectangle.width, clientRectangle.height, stride ); - cairoImage = cairo_create ( cairoSurface ); + cairoImage = cairo_create( cairoSurface ); #ifdef __WXDEBUG__ cairo_status_t status = cairo_status( cairoImage ); wxASSERT_MSG( status == CAIRO_STATUS_SUCCESS, "Cairo context creation error" ); @@ -194,10 +194,10 @@ void CAIRO_GAL::deinitSurface() } -unsigned int CAIRO_GAL::getGroupNumber() +unsigned int CAIRO_GAL::getNewGroupNumber() { wxASSERT_MSG( groups.size() < std::numeric_limits::max(), - wxT( "There are no free slots to store a group" ) ); + wxT( "There are no free slots to store a group" ) ); while( groups.find( groupCounter ) != groups.end() ) { @@ -230,6 +230,7 @@ void CAIRO_GAL::EndDrawing() // Now translate the raw image data from the format stored // by cairo into a format understood by wxImage. unsigned char* wxOutputPtr = wxOutput; + for( size_t count = 0; count < bufferSize; count++ ) { unsigned int value = bitmapBuffer[count]; @@ -287,7 +288,8 @@ void CAIRO_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint } -void CAIRO_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aWidth ) +void CAIRO_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, + double aWidth ) { if( isFillEnabled ) { @@ -317,7 +319,6 @@ void CAIRO_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPo cairo_line_to( cairoImage, lineLength, -aWidth / 2.0 ); cairo_restore( cairoImage ); - } isElementAdded = true; @@ -351,7 +352,8 @@ void CAIRO_GAL::DrawPolyline( std::deque& aPointList ) bool isFirstPoint = true; // Iterate over the point list and draw the segments - for( std::deque::const_iterator it = aPointList.begin(); it != aPointList.end(); ++it ) + std::deque::const_iterator it; + for( it = aPointList.begin(); it != aPointList.end(); ++it ) { if( isFirstPoint ) { @@ -373,7 +375,8 @@ void CAIRO_GAL::DrawPolygon( const std::deque& aPointList ) bool isFirstPoint = true; // Iterate over the point list and draw the polygon - for( std::deque::const_iterator it = aPointList.begin(); it != aPointList.end(); ++it ) + std::deque::const_iterator it; + for( it = aPointList.begin(); it != aPointList.end(); ++it ) { if( isFirstPoint ) { @@ -644,10 +647,10 @@ int CAIRO_GAL::BeginGroup() storePath(); Group group; - int groupNumber = getGroupNumber(); + int groupNumber = getNewGroupNumber(); groups.insert( std::make_pair( groupNumber, group ) ); currentGroup = &groups[groupNumber]; - isGrouping = true; + isGrouping = true; return groupNumber; } @@ -677,6 +680,7 @@ void CAIRO_GAL::DeleteGroup( int aGroupNumber ) // Delete the Cairo paths std::deque::iterator it, end; + for( it = groups[aGroupNumber].begin(), end = groups[aGroupNumber].end(); it != end; ++it ) { if( it->command == CMD_FILL_PATH || it->command == CMD_STROKE_PATH ) diff --git a/common/gal/opengl/vbo_container.cpp b/common/gal/opengl/cached_container.cpp similarity index 55% rename from common/gal/opengl/vbo_container.cpp rename to common/gal/opengl/cached_container.cpp index fd6dea86f3..ea718530ce 100644 --- a/common/gal/opengl/vbo_container.cpp +++ b/common/gal/opengl/cached_container.cpp @@ -23,171 +23,67 @@ */ /** - * @file vbo_container.cpp - * @brief Class to store VBO_ITEMs. + * @file cached_container.cpp + * @brief Class to store instances of VERTEX with caching. It allows storing VERTEX objects and + * associates them with VERTEX_ITEMs. This leads to a possibility of caching vertices data in the + * GPU memory and a fast reuse of that data. */ -#include -#include -#include +#include +#include +#include +#include #include +#include #ifdef __WXDEBUG__ #include #endif /* __WXDEBUG__ */ using namespace KiGfx; -VBO_CONTAINER::VBO_CONTAINER( unsigned int aSize ) : - m_freeSpace( aSize ), m_currentSize( aSize ), m_initialSize( aSize ), m_transform( NULL ), - m_failed( false ) +CACHED_CONTAINER::CACHED_CONTAINER( unsigned int aSize ) : + VERTEX_CONTAINER( aSize ) { - // By default no shader is used - m_shader[0] = 0; - - m_vertices = static_cast( malloc( aSize * sizeof( VBO_VERTEX ) ) ); - // In the beginning there is only free space m_freeChunks.insert( Chunk( aSize, 0 ) ); } -VBO_CONTAINER::~VBO_CONTAINER() +void CACHED_CONTAINER::SetItem( VERTEX_ITEM* aItem ) { - free( m_vertices ); -} + if( aItem == NULL ) + { + wxASSERT( m_item != NULL ); + // Finishing the item + if( m_itemSize < m_chunkSize ) + { + // There is some not used but reserved memory left, so we should return it to the pool + int itemOffset = m_item->GetOffset(); -void VBO_CONTAINER::StartItem( VBO_ITEM* aItem ) -{ - m_item = aItem; - m_itemSize = aItem->GetSize(); - m_chunkSize = m_itemSize; + // Add the not used memory back to the pool + m_freeChunks.insert( Chunk( m_chunkSize - m_itemSize, itemOffset + m_itemSize ) ); + m_freeSpace += ( m_chunkSize - m_itemSize ); + // mergeFreeChunks(); + } - if( m_itemSize == 0 ) - m_items.insert( m_item ); // The item was not stored before + m_item = NULL; + } else - m_chunkOffset = m_item->GetOffset(); -} - - -void VBO_CONTAINER::EndItem() -{ - if( m_itemSize < m_chunkSize ) { - // Add the not used memory back to the pool - m_freeChunks.insert( Chunk( m_chunkSize - m_itemSize, m_chunkOffset + m_itemSize ) ); - m_freeSpace += ( m_chunkSize - m_itemSize ); - } + m_item = aItem; + m_itemSize = m_item->GetSize(); + m_chunkSize = m_itemSize; - m_item = NULL; -} - - -void VBO_CONTAINER::Add( const VBO_VERTEX* aVertex, unsigned int aSize ) -{ - // Pointer to the vertex that we are currently adding - VBO_VERTEX* vertexPtr = allocate( aSize ); - - if( vertexPtr == NULL ) - return; - - for( unsigned int i = 0; i < aSize; ++i ) - { - // Modify the vertex according to the currently used transformations - if( m_transform != NULL ) - { - // Apply transformations - glm::vec4 vertex( aVertex[i].x, aVertex[i].y, aVertex[i].z, 1.0f ); - vertex = *m_transform * vertex; - - // Replace only coordinates, leave color as it is - vertexPtr->x = vertex.x; - vertexPtr->y = vertex.y; - vertexPtr->z = vertex.z; - } + if( m_itemSize == 0 ) + m_items.insert( m_item ); // The item was not stored before else - { - // Simply copy coordinates - vertexPtr->x = aVertex[i].x; - vertexPtr->y = aVertex[i].y; - vertexPtr->z = aVertex[i].z; - } - - // Apply currently used color - vertexPtr->r = m_color[0]; - vertexPtr->g = m_color[1]; - vertexPtr->b = m_color[2]; - vertexPtr->a = m_color[3]; - - // Apply currently used shader - for( unsigned int j = 0; j < VBO_ITEM::ShaderStride; ++j ) - { - vertexPtr->shader[j] = m_shader[j]; - } - - vertexPtr++; - } - -} - - -void VBO_CONTAINER::Clear() -{ - // Change size to the default one - m_vertices = static_cast( realloc( m_vertices, - m_initialSize * sizeof( VBO_VERTEX ) ) ); - - // Set the size of all the stored VERTEX_ITEMs to 0, so it is clear that they are not held - // in the container anymore - Items::iterator it; - for( it = m_items.begin(); it != m_items.end(); ++it ) - { - ( *it )->setSize( 0 ); - } - m_items.clear(); - - // Reset state variables - m_transform = NULL; - m_failed = false; - - // By default no shader is used - m_shader[0] = 0; - - // In the beginning there is only free space - m_freeSpace = m_initialSize; - m_currentSize = m_initialSize; - m_freeChunks.clear(); - m_freeChunks.insert( Chunk( m_freeSpace, 0 ) ); -} - - -void VBO_CONTAINER::Free( VBO_ITEM* aItem ) -{ - freeItem( aItem ); - - // Dynamic memory freeing, there is no point in holding - // a large amount of memory when there is no use for it - if( m_freeSpace > ( m_currentSize / 2 ) && m_currentSize > defaultInitSize ) - { - resizeContainer( m_currentSize / 2 ); + m_chunkOffset = m_item->GetOffset(); } } -VBO_VERTEX* VBO_CONTAINER::GetAllVertices() const -{ - return m_vertices; -} - - -VBO_VERTEX* VBO_CONTAINER::GetVertices( const VBO_ITEM* aItem ) const -{ - int offset = aItem->GetOffset(); - - return &m_vertices[offset]; -} - -VBO_VERTEX* VBO_CONTAINER::allocate( unsigned int aSize ) +VERTEX* CACHED_CONTAINER::Allocate( unsigned int aSize ) { wxASSERT( m_item != NULL ); @@ -198,8 +94,9 @@ VBO_VERTEX* VBO_CONTAINER::allocate( unsigned int aSize ) { // There is not enough space in the currently reserved chunk, so we have to resize it - // Reserve a bigger memory chunk for the current item - m_chunkSize = std::max( ( 2 * m_itemSize ) + aSize, (unsigned) 3 ); + // Reserve a bigger memory chunk for the current item and + // make it multiple of 3 to store triangles + m_chunkSize = ( 2 * m_itemSize ) + aSize + ( 3 - aSize % 3 ); // Save the current size before reallocating m_chunkOffset = reallocate( m_chunkSize ); @@ -210,16 +107,81 @@ VBO_VERTEX* VBO_CONTAINER::allocate( unsigned int aSize ) } } - VBO_VERTEX* reserved = &m_vertices[m_chunkOffset + m_itemSize]; + VERTEX* reserved = &m_vertices[m_chunkOffset + m_itemSize]; m_itemSize += aSize; m_item->setSize( m_itemSize ); + // The content has to be updated + m_dirty = true; + +#if CACHED_CONTAINER_TEST > 1 + test(); +#endif + return reserved; } -unsigned int VBO_CONTAINER::reallocate( unsigned int aSize ) +void CACHED_CONTAINER::Erase() { + wxASSERT( m_item != NULL ); + + freeItem( m_item ); + + // Dynamic memory freeing, there is no point in holding + // a large amount of memory when there is no use for it + if( m_freeSpace > ( m_currentSize / 2 ) && m_currentSize > m_initialSize ) + { + resizeContainer( m_currentSize / 2 ); + } +} + + +void CACHED_CONTAINER::Clear() +{ + // Change size to the default one + m_vertices = static_cast( realloc( m_vertices, + m_initialSize * sizeof( VERTEX ) ) ); + + // Reset state variables + m_freeSpace = m_initialSize; + m_currentSize = m_initialSize; + m_failed = false; + + // Set the size of all the stored VERTEX_ITEMs to 0, so it is clear that they are not held + // in the container anymore + Items::iterator it; + + for( it = m_items.begin(); it != m_items.end(); ++it ) + { + ( *it )->setSize( 0 ); + } + + m_items.clear(); + + + // Now there is only free space left + m_freeChunks.clear(); + m_freeChunks.insert( Chunk( m_freeSpace, 0 ) ); +} + + +VERTEX* CACHED_CONTAINER::GetVertices( const VERTEX_ITEM* aItem ) const +{ + int offset = aItem->GetOffset(); + + return &m_vertices[offset]; +} + + +unsigned int CACHED_CONTAINER::reallocate( unsigned int aSize ) +{ +#if CACHED_CONTAINER_TEST > 2 + wxLogDebug( wxT( "Resize 0x%08x to %d" ), (int) m_item, aSize ); + showFreeChunks(); + showReservedChunks(); +#endif + // Is there enough space to store vertices? if( m_freeSpace < aSize ) { @@ -260,7 +222,7 @@ unsigned int VBO_CONTAINER::reallocate( unsigned int aSize ) } // Parameters of the allocated cuhnk - unsigned int chunkSize = newChunk->first; + unsigned int chunkSize = newChunk->first; unsigned int chunkOffset = newChunk->second; wxASSERT( chunkSize >= aSize ); @@ -269,37 +231,57 @@ unsigned int VBO_CONTAINER::reallocate( unsigned int aSize ) // Check if the item was previously stored in the container if( m_itemSize > 0 ) { +#if CACHED_CONTAINER_TEST > 3 + wxLogDebug( wxT( "Moving 0x%08x from 0x%08x to 0x%08x" ), + (int) m_item, oldChunkOffset, chunkOffset ); +#endif // The item was reallocated, so we have to copy all the old data to the new place memcpy( &m_vertices[chunkOffset], &m_vertices[m_chunkOffset], - m_itemSize * VBO_ITEM::VertByteSize ); + m_itemSize * VertexSize ); // Free the space previously used by the chunk m_freeChunks.insert( Chunk( m_itemSize, m_chunkOffset ) ); m_freeSpace += m_itemSize; } + // Remove the allocated chunk from the free space pool m_freeChunks.erase( newChunk ); - m_freeSpace -= chunkSize; // If there is some space left, return it to the pool - add an entry for it if( chunkSize > aSize ) { m_freeChunks.insert( Chunk( chunkSize - aSize, chunkOffset + aSize ) ); - m_freeSpace += chunkSize - aSize; } + m_freeSpace -= aSize; + // mergeFreeChunks(); + m_item->setOffset( chunkOffset ); +#if CACHED_CONTAINER_TEST > 2 + showFreeChunks(); + showReservedChunks(); +#endif + return chunkOffset; } -bool VBO_CONTAINER::defragment( VBO_VERTEX* aTarget ) +bool CACHED_CONTAINER::defragment( VERTEX* aTarget ) { +#if CACHED_CONTAINER_TEST > 0 + wxLogDebug( wxT( "Defragmenting" ) ); +#endif +#ifdef __WXDEBUG__ + prof_counter totalTime; + prof_start( &totalTime, false ); +#endif /* __WXDEBUG__ */ + if( aTarget == NULL ) { // No target was specified, so we have to reallocate our own space - aTarget = static_cast( malloc( m_currentSize * sizeof( VBO_VERTEX ) ) ); + aTarget = static_cast( malloc( m_currentSize * sizeof( VERTEX ) ) ); + if( aTarget == NULL ) { wxLogError( wxT( "Run out of memory" ) ); @@ -309,16 +291,17 @@ bool VBO_CONTAINER::defragment( VBO_VERTEX* aTarget ) int newOffset = 0; Items::iterator it, it_end; + for( it = m_items.begin(), it_end = m_items.end(); it != it_end; ++it ) { - VBO_ITEM* item = *it; - int itemOffset = item->GetOffset(); - int itemSize = item->GetSize(); + VERTEX_ITEM* item = *it; + int itemOffset = item->GetOffset(); + int itemSize = item->GetSize(); // Move an item to the new container - memcpy( &aTarget[newOffset], &m_vertices[itemOffset], itemSize * VBO_ITEM::VertByteSize ); + memcpy( &aTarget[newOffset], &m_vertices[itemOffset], itemSize * VertexSize ); - // Update its offset + // Update new offset item->setOffset( newOffset ); // Move to the next free space @@ -330,17 +313,29 @@ bool VBO_CONTAINER::defragment( VBO_VERTEX* aTarget ) // Now there is only one big chunk of free memory m_freeChunks.clear(); - m_freeChunks.insert( Chunk( m_freeSpace, reservedSpace() ) ); + m_freeChunks.insert( Chunk( m_freeSpace, m_currentSize - m_freeSpace ) ); + +#ifdef __WXDEBUG__ + prof_end( &totalTime ); + + wxLogDebug( wxT( "Defragmented the container storing %d vertices / %.1f ms" ), + m_currentSize - m_freeSpace, (double) totalTime.value / 1000.0 ); +#endif /* __WXDEBUG__ */ return true; } -void VBO_CONTAINER::mergeFreeChunks() +void CACHED_CONTAINER::mergeFreeChunks() { - if( m_freeChunks.size() < 2 ) // There are no chunks that can be merged + if( m_freeChunks.size() <= 1 ) // There are no chunks that can be merged return; +#ifdef __WXDEBUG__ + prof_counter totalTime; + prof_start( &totalTime, false ); +#endif /* __WXDEBUG__ */ + // Reversed free chunks map - this one stores chunk size with its offset as the key std::list freeChunks; @@ -349,6 +344,7 @@ void VBO_CONTAINER::mergeFreeChunks() { freeChunks.push_back( std::make_pair( it->second, it->first ) ); } + m_freeChunks.clear(); freeChunks.sort(); @@ -356,6 +352,7 @@ void VBO_CONTAINER::mergeFreeChunks() unsigned int offset = freeChunks.front().first; unsigned int size = freeChunks.front().second; freeChunks.pop_front(); + for( itf = freeChunks.begin(), itf_end = freeChunks.end(); itf != itf_end; ++itf ) { if( itf->first == offset + size ) @@ -371,17 +368,30 @@ void VBO_CONTAINER::mergeFreeChunks() // and let's check the next chunk offset = itf->first; size = itf->second; + } } // Add the last one m_freeChunks.insert( std::make_pair( size, offset ) ); + +#ifdef __WXDEBUG__ + prof_end( &totalTime ); + + wxLogDebug( wxT( "Merged free chunks / %.1f ms" ), (double) totalTime.value / 1000.0 ); +#endif /* __WXDEBUG__ */ + + test(); } -bool VBO_CONTAINER::resizeContainer( unsigned int aNewSize ) +bool CACHED_CONTAINER::resizeContainer( unsigned int aNewSize ) { - VBO_VERTEX* newContainer; +#if CACHED_CONTAINER_TEST > 0 + wxLogDebug( wxT( "Resizing container from %d to %d" ), m_currentSize, aNewSize ); +#endif + + VERTEX* newContainer; if( aNewSize < m_currentSize ) { @@ -390,7 +400,8 @@ bool VBO_CONTAINER::resizeContainer( unsigned int aNewSize ) if( reservedSpace() > aNewSize ) return false; - newContainer = static_cast( malloc( aNewSize * sizeof( VBO_VERTEX ) ) ); + newContainer = static_cast( malloc( aNewSize * sizeof( VERTEX ) ) ); + if( newContainer == NULL ) { wxLogError( wxT( "Run out of memory" ) ); @@ -407,7 +418,8 @@ bool VBO_CONTAINER::resizeContainer( unsigned int aNewSize ) else { // Enlarging container - newContainer = static_cast( realloc( m_vertices, aNewSize * sizeof( VBO_VERTEX ) ) ); + newContainer = static_cast( realloc( m_vertices, aNewSize * sizeof( VERTEX ) ) ); + if( newContainer == NULL ) { wxLogError( wxT( "Run out of memory" ) ); @@ -420,35 +432,94 @@ bool VBO_CONTAINER::resizeContainer( unsigned int aNewSize ) m_vertices = newContainer; - m_freeSpace += ( aNewSize - m_currentSize ); + m_freeSpace += ( aNewSize - m_currentSize ); m_currentSize = aNewSize; return true; } -void VBO_CONTAINER::freeItem( VBO_ITEM* aItem ) +void CACHED_CONTAINER::freeItem( VERTEX_ITEM* aItem ) { - int size = aItem->GetSize(); - int offset = aItem->GetOffset(); + int size = aItem->GetSize(); + int offset = aItem->GetOffset(); + // Insert a free memory chunk entry in the place where item was stored m_freeChunks.insert( Chunk( size, offset ) ); m_freeSpace += size; m_items.erase( aItem ); - // Item size is set to 0, so it means that it is not stored in the container + // Indicate that the item is not stored in the container anymore aItem->setSize( 0 ); } -void VBO_CONTAINER::test() const +unsigned int CACHED_CONTAINER::getPowerOf2( unsigned int aNumber ) const { - unsigned int freeSpace = 0; - FreeChunkMap::const_iterator it, it_end; + unsigned int power = 1; - // Check if the amount of free memory stored as chunks is the same as reported by m_freeSpace - for( it = m_freeChunks.begin(), it_end = m_freeChunks.end(); it != it_end; ++it ) - freeSpace += it->first; + while( power < aNumber && power != 0 ) + power <<= 1; + + return power; +} + + +#ifdef CACHED_CONTAINER_TEST +void CACHED_CONTAINER::showFreeChunks() +{ + FreeChunkMap::iterator it; + + wxLogDebug( wxT( "Free chunks:" ) ); + + for( it = m_freeChunks.begin(); it != m_freeChunks.end(); ++it ) + { + unsigned int offset = getChunkOffset( *it ); + unsigned int size = getChunkSize( *it ); + + wxLogDebug( wxT( "[0x%08x-0x%08x] (size %d)" ), + offset, offset + size - 1, size ); + } +} + + +void CACHED_CONTAINER::showReservedChunks() +{ + Items::iterator it; + + wxLogDebug( wxT( "Reserved chunks:" ) ); + + for( it = m_items.begin(); it != m_items.end(); ++it ) + { + VERTEX_ITEM* item = *it; + unsigned int offset = item->GetOffset(); + unsigned int size = item->GetSize(); + + wxLogDebug( wxT( "[0x%08x-0x%08x] @ 0x%08x (size %d)" ), + offset, offset + size - 1, (int) item, size ); + } +} + + +void CACHED_CONTAINER::test() +{ + // Free space check + unsigned int freeSpace = 0; + FreeChunkMap::iterator itf; + for( itf = m_freeChunks.begin(); itf != m_freeChunks.end(); ++itf ) + freeSpace += getChunkSize( *itf ); wxASSERT( freeSpace == m_freeSpace ); + + // Reserved space check + /*unsigned int reservedSpace = 0; + Items::iterator itr; + for( itr = m_items.begin(); itr != m_items.end(); ++itr ) + reservedSpace += ( *itr )->GetSize(); + reservedSpace += m_itemSize; // Add the current chunk size + + wxASSERT( ( freeSpace + reservedSpace ) == m_currentSize );*/ + + // Overlapping check TBD } +#endif /* CACHED_CONTAINER_TEST */ diff --git a/common/gal/opengl/gpu_manager.cpp b/common/gal/opengl/gpu_manager.cpp new file mode 100644 index 0000000000..dea8e76f91 --- /dev/null +++ b/common/gal/opengl/gpu_manager.cpp @@ -0,0 +1,283 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file gpu_manager.cpp + * @brief Class to handle uploading vertices and indices to GPU in drawing purposes. + */ + +#include +#include +#include +#include +#include +#include +#ifdef __WXDEBUG__ +#include +#endif + +using namespace KiGfx; + +GPU_MANAGER* GPU_MANAGER::MakeManager( VERTEX_CONTAINER* aContainer ) +{ + if( typeid( *aContainer ) == typeid( CACHED_CONTAINER ) ) + return new GPU_CACHED_MANAGER( aContainer ); + else if( typeid( *aContainer ) == typeid( NONCACHED_CONTAINER ) ) + return new GPU_NONCACHED_MANAGER( aContainer ); + + wxASSERT_MSG( false, "Not handled container type" ); + return NULL; +} + + +GPU_MANAGER::GPU_MANAGER( VERTEX_CONTAINER* aContainer ) : + m_container( aContainer ), m_shader( NULL ) +{ +} + + +GPU_MANAGER::~GPU_MANAGER() +{ +} + + +void GPU_MANAGER::SetShader( SHADER& aShader ) +{ + m_shader = &aShader; + + m_shaderAttrib = m_shader->GetAttribute( "attrShaderParams" ); + + if( m_shaderAttrib == -1 ) + { + wxLogFatalError( wxT( "Could not get the shader attribute location" ) ); + } +} + + +// Cached manager +GPU_CACHED_MANAGER::GPU_CACHED_MANAGER( VERTEX_CONTAINER* aContainer ) : + GPU_MANAGER( aContainer ), m_buffersInitialized( false ), m_indicesPtr( NULL ), + m_indicesSize( 0 ) +{ +} + + +GPU_CACHED_MANAGER::~GPU_CACHED_MANAGER() +{ + if( m_buffersInitialized ) + { + glBindBuffer( GL_ARRAY_BUFFER, 0 ); + glDeleteBuffers( 1, &m_verticesBuffer ); + } +} + + +void GPU_CACHED_MANAGER::Initialize() +{ + wxASSERT( !m_buffersInitialized ); + + if( !m_buffersInitialized ) + { + glGenBuffers( 1, &m_verticesBuffer ); + m_buffersInitialized = true; + } +} + + +void GPU_CACHED_MANAGER::BeginDrawing() +{ + wxASSERT( !m_isDrawing ); + + if( m_container->isDirty() ) + uploadToGpu(); + + // Number of vertices to be drawn in the EndDrawing() + m_indicesSize = 0; + // Set the indices pointer to the beginning of the indices-to-draw buffer + m_indicesPtr = m_indices.get(); + + m_isDrawing = true; +} + + +void GPU_CACHED_MANAGER::DrawIndices( unsigned int aOffset, unsigned int aSize ) +{ + wxASSERT( m_isDrawing ); + + // Copy indices of items that should be drawn to GPU memory + for( unsigned int i = aOffset; i < aOffset + aSize; *m_indicesPtr++ = i++ ); + + m_indicesSize += aSize; +} + + +void GPU_CACHED_MANAGER::DrawAll() +{ + wxASSERT( m_isDrawing ); + + m_indicesSize = m_container->GetSize(); + for( unsigned int i = 0; i < m_indicesSize; *m_indicesPtr++ = i++ ); +} + + +void GPU_CACHED_MANAGER::EndDrawing() +{ + wxASSERT( m_isDrawing ); + + // Prepare buffers + glEnableClientState( GL_VERTEX_ARRAY ); + glEnableClientState( GL_COLOR_ARRAY ); + + // Bind vertices data buffers + glBindBuffer( GL_ARRAY_BUFFER, m_verticesBuffer ); + glVertexPointer( CoordStride, GL_FLOAT, VertexSize, 0 ); + glColorPointer( ColorStride, GL_UNSIGNED_BYTE, VertexSize, (GLvoid*) ColorOffset ); + + if( m_shader != NULL ) // Use shader if applicable + { + m_shader->Use(); + glEnableVertexAttribArray( m_shaderAttrib ); + glVertexAttribPointer( m_shaderAttrib, ShaderStride, GL_FLOAT, GL_FALSE, + VertexSize, (GLvoid*) ShaderOffset ); + } + + glDrawElements( GL_TRIANGLES, m_indicesSize, GL_UNSIGNED_INT, (GLvoid*) m_indices.get() ); + + glBindBuffer( GL_ARRAY_BUFFER, 0 ); + + // Deactivate vertex array + glDisableClientState( GL_COLOR_ARRAY ); + glDisableClientState( GL_VERTEX_ARRAY ); + + if( m_shader != NULL ) + { + glDisableVertexAttribArray( m_shaderAttrib ); + m_shader->Deactivate(); + } + + m_isDrawing = false; +} + + +void GPU_CACHED_MANAGER::uploadToGpu() +{ +#ifdef __WXDEBUG__ + prof_counter totalTime; + prof_start( &totalTime, false ); +#endif /* __WXDEBUG__ */ + + if( !m_buffersInitialized ) + Initialize(); + + int bufferSize = m_container->GetSize(); + GLfloat* vertices = (GLfloat*) m_container->GetAllVertices(); + + // Upload vertices coordinates and shader types to GPU memory + glBindBuffer( GL_ARRAY_BUFFER, m_verticesBuffer ); + glBufferData( GL_ARRAY_BUFFER, bufferSize * VertexSize, vertices, GL_DYNAMIC_DRAW ); + glBindBuffer( GL_ARRAY_BUFFER, 0 ); + + // Allocate the biggest possible buffer for indices + m_indices.reset( new GLuint[bufferSize] ); + + if( glGetError() != GL_NO_ERROR ) + { + wxLogError( wxT( "Error during data upload to the GPU memory" ) ); + } + +#ifdef __WXDEBUG__ + prof_end( &totalTime ); + + wxLogDebug( wxT( "Uploading %d vertices to GPU / %.1f ms" ), + bufferSize, (double) totalTime.value / 1000.0 ); +#endif /* __WXDEBUG__ */ +} + + +// Noncached manager +GPU_NONCACHED_MANAGER::GPU_NONCACHED_MANAGER( VERTEX_CONTAINER* aContainer ) : + GPU_MANAGER( aContainer ) +{ +} + + +void GPU_NONCACHED_MANAGER::Initialize() +{ + // Nothing has to be intialized +} + + +void GPU_NONCACHED_MANAGER::BeginDrawing() +{ + // Nothing has to be prepared +} + + +void GPU_NONCACHED_MANAGER::DrawIndices( unsigned int aOffset, unsigned int aSize ) +{ + wxASSERT_MSG( false, wxT( "Not implemented yet" ) ); +} + + +void GPU_NONCACHED_MANAGER::DrawAll() +{ + // This is the default use case, nothing has to be done + // The real rendering takes place in the EndDrawing() function +} + + +void GPU_NONCACHED_MANAGER::EndDrawing() +{ + VERTEX* vertices = m_container->GetAllVertices(); + GLfloat* coordinates = (GLfloat*) ( vertices ); + GLubyte* colors = (GLubyte*) ( vertices ) + ColorOffset; + GLfloat* shaders = (GLfloat*) ( vertices ) + ShaderOffset / sizeof(GLfloat); + + // Prepare buffers + glEnableClientState( GL_VERTEX_ARRAY ); + glEnableClientState( GL_COLOR_ARRAY ); + + glVertexPointer( CoordStride, GL_FLOAT, VertexSize, coordinates ); + glColorPointer( ColorStride, GL_UNSIGNED_BYTE, VertexSize, colors ); + + if( m_shader != NULL ) // Use shader if applicable + { + m_shader->Use(); + glEnableVertexAttribArray( m_shaderAttrib ); + glVertexAttribPointer( m_shaderAttrib, ShaderStride, GL_FLOAT, GL_FALSE, + VertexSize, shaders ); + } + + glDrawArrays( GL_TRIANGLES, 0, m_container->GetSize() ); + + // Deactivate vertex array + glDisableClientState( GL_COLOR_ARRAY ); + glDisableClientState( GL_VERTEX_ARRAY ); + + if( m_shader != NULL ) + { + glDisableVertexAttribArray( m_shaderAttrib ); + m_shader->Deactivate(); + } +} diff --git a/common/gal/opengl/noncached_container.cpp b/common/gal/opengl/noncached_container.cpp new file mode 100644 index 0000000000..f7eb3f897a --- /dev/null +++ b/common/gal/opengl/noncached_container.cpp @@ -0,0 +1,94 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file noncached_container.cpp + * @brief Class to store instances of VERTEX without caching. It allows a fast one-frame drawing + * and then clearing the buffer and starting from scratch. + */ + +#include +#include + +using namespace KiGfx; + +NONCACHED_CONTAINER::NONCACHED_CONTAINER( unsigned int aSize ) : + VERTEX_CONTAINER( aSize ), m_freePtr( 0 ) +{ +} + + +NONCACHED_CONTAINER::~NONCACHED_CONTAINER() +{ +} + + +void NONCACHED_CONTAINER::SetItem( VERTEX_ITEM* aItem ) +{ + // Nothing has to be done, as the noncached container + // does not care about VERTEX_ITEMs ownership +} + + +VERTEX* NONCACHED_CONTAINER::Allocate( unsigned int aSize ) +{ + if( m_freeSpace < aSize ) + { + // Double the space + VERTEX* newVertices = static_cast( realloc( m_vertices, + m_currentSize * 2 * + sizeof(VERTEX) ) ); + + if( newVertices != NULL ) + { + m_vertices = newVertices; + m_freeSpace += m_currentSize; + m_currentSize *= 2; + } + else + { + return NULL; + } + } + + VERTEX* freeVertex = &m_vertices[m_freePtr]; + + // Move to the next free chunk + m_freePtr += aSize; + m_freeSpace -= aSize; + + return freeVertex; +} + + +void NONCACHED_CONTAINER::Erase() +{ +} + + +void NONCACHED_CONTAINER::Clear() +{ + m_freePtr = 0; + m_freeSpace = m_currentSize; +} diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index a82fa33d30..a76611c974 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -53,7 +53,8 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, wxEvtHandler* aPaintListener, bool isUseShaders, const wxString& aName ) : wxGLCanvas( aParent, wxID_ANY, (int*) glAttributes, wxDefaultPosition, wxDefaultSize, wxEXPAND, aName ), - verticesCircle( &precomputedContainer ) + cachedManager( true ), + nonCachedManager( false ) { // Create the OpenGL-Context glContext = new wxGLContext( this ); @@ -73,13 +74,7 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, isShaderInitialized = false; isGrouping = false; wxSize parentSize = aParent->GetSize(); - - isVboInitialized = false; - vboNeedsUpdate = false; - currentItem = NULL; groupCounter = 0; - transform = glm::mat4( 1.0f ); // Identity matrix - nonCachedItem = NULL; SetSize( parentSize ); @@ -112,11 +107,11 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, InitTesselatorCallbacks( tesselator ); gluTessProperty( tesselator, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_POSITIVE ); - // Compute unit semicircle & circle vertices and store them in a buffer for faster drawing - computeCircleVbo(); + // Compute the unit circle vertices and store them in a buffer for faster drawing + computeCircle(); // By default we draw non-cached objects, it changes on BeginGroup()/EndGroup() - currentContainer = &nonCachedVbo; + currentManager = &nonCachedManager; } @@ -124,8 +119,6 @@ OPENGL_GAL::~OPENGL_GAL() { glFlush(); - delete nonCachedItem; - // Delete the buffers if( isFrameBufferInitialized ) { @@ -134,12 +127,7 @@ OPENGL_GAL::~OPENGL_GAL() } gluDeleteTess( tesselator ); - - if( isVboInitialized ) - { - ClearCache(); - deleteVertexBufferObjects(); - } + ClearCache(); delete glContext; } @@ -239,28 +227,6 @@ void OPENGL_GAL::initFrameBuffers() } -void OPENGL_GAL::initVertexBufferObjects() -{ - // Generate buffers for vertices and indices - glGenBuffers( 1, &cachedVerts ); - glGenBuffers( 1, &cachedInds ); - - isVboInitialized = true; -} - - -void OPENGL_GAL::deleteVertexBufferObjects() -{ - glBindBuffer( GL_ARRAY_BUFFER, 0 ); - glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 ); - - glDeleteBuffers( 1, &cachedVerts ); - glDeleteBuffers( 1, &cachedInds ); - - isVboInitialized = false; -} - - void OPENGL_GAL::SaveScreen() { glBindFramebuffer( GL_DRAW_FRAMEBUFFER, frameBufferBackup ); @@ -323,8 +289,6 @@ void OPENGL_GAL::initGlew() exit( 1 ); } - initVertexBufferObjects(); - isGlewInitialized = true; } @@ -337,38 +301,26 @@ void OPENGL_GAL::BeginDrawing() // Initialize GLEW, FBOs & VBOs if( !isGlewInitialized ) - { initGlew(); - } if( !isFrameBufferInitialized ) - { initFrameBuffers(); - } // Compile the shaders if( !isShaderInitialized && isUseShader ) { if( !shader.LoadBuiltinShader( 0, SHADER_TYPE_VERTEX ) ) - { - wxLogFatalError( wxT( "Cannot compile vertex shader!" ) ); - } + wxLogFatalError( wxT( "Cannot compile vertex shader!" ) ); if( !shader.LoadBuiltinShader( 1, SHADER_TYPE_FRAGMENT ) ) - { - wxLogFatalError( wxT( "Cannot compile fragment shader!" ) ); - } + wxLogFatalError( wxT( "Cannot compile fragment shader!" ) ); if( !shader.Link() ) - { wxLogFatalError( wxT( "Cannot link the shaders!" ) ); - } - shaderAttrib = shader.GetAttribute( "attrShaderParams" ); - if( shaderAttrib == -1 ) - { - wxLogFatalError( wxT( "Could not get the shader attribute location" ) ); - } + // Make VBOs use shaders + cachedManager.SetShader( shader ); + nonCachedManager.SetShader( shader ); isShaderInitialized = true; } @@ -418,29 +370,10 @@ void OPENGL_GAL::BeginDrawing() SetStrokeColor( strokeColor ); isDeleteSavedPixels = true; - // If any of VBO items is dirty - recache everything - if( vboNeedsUpdate ) - rebuildVbo(); + nonCachedManager.Clear(); - // Number of vertices to be drawn - indicesSize = 0; - - glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, cachedInds ); - // Discard old buffer, so we can use it again - glBufferData( GL_ELEMENT_ARRAY_BUFFER, cachedVbo.GetSize() * VBO_ITEM::IndByteSize, - NULL, GL_STREAM_DRAW ); - - // Map the GPU memory, so we can store indices that are going to be drawn - indicesPtr = static_cast( glMapBuffer( GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY ) ); - if( indicesPtr == NULL ) - { - wxLogError( wxT( "Could not map GPU memory" ) ); - } - - // Prepare buffer for non-cached items - delete nonCachedItem; - nonCachedItem = new VBO_ITEM( &nonCachedVbo ); - currentItem = nonCachedItem; + cachedManager.BeginDrawing(); + nonCachedManager.BeginDrawing(); } @@ -492,55 +425,8 @@ void OPENGL_GAL::blitMainTexture( bool aIsClearFrameBuffer ) void OPENGL_GAL::EndDrawing() { - if( !glUnmapBuffer( GL_ELEMENT_ARRAY_BUFFER ) ) - { - wxLogError( wxT( "Unmapping indices buffer failed" ) ); - } - - // Prepare buffers - glEnableClientState( GL_VERTEX_ARRAY ); - glEnableClientState( GL_COLOR_ARRAY ); - - // Draw non-cached items - GLfloat* vertices = (GLfloat*)( nonCachedVbo.GetAllVertices() ); - GLubyte* colors = (GLubyte*)( nonCachedVbo.GetAllVertices() ) + VBO_ITEM::ColorOffset; - GLfloat* shaders = (GLfloat*)( nonCachedVbo.GetAllVertices() ) + VBO_ITEM::ShaderOffset; - - glVertexPointer( VBO_ITEM::CoordStride, GL_FLOAT, VBO_ITEM::VertByteSize, vertices ); - glColorPointer( VBO_ITEM::ColorStride, GL_UNSIGNED_BYTE, VBO_ITEM::VertByteSize, colors ); - if( isUseShader ) - { - shader.Use(); - glEnableVertexAttribArray( shaderAttrib ); - glVertexAttribPointer( shaderAttrib, VBO_ITEM::ShaderStride, GL_FLOAT, GL_FALSE, - VBO_ITEM::VertByteSize, shaders ); - } - glDrawArrays( GL_TRIANGLES, nonCachedItem->GetOffset(), nonCachedItem->GetSize() ); - - // Draw cached items - glBindBuffer( GL_ARRAY_BUFFER, cachedVerts ); - glVertexPointer( VBO_ITEM::CoordStride, GL_FLOAT, VBO_ITEM::VertByteSize, 0 ); - glColorPointer( VBO_ITEM::ColorStride, GL_UNSIGNED_BYTE, VBO_ITEM::VertByteSize, - (GLvoid*) VBO_ITEM::ColorByteOffset ); - if( isUseShader ) - { - glVertexAttribPointer( shaderAttrib, VBO_ITEM::ShaderStride, GL_FLOAT, GL_FALSE, - VBO_ITEM::VertByteSize, (GLvoid*) VBO_ITEM::ShaderByteOffset ); - } - - - glDrawElements( GL_TRIANGLES, indicesSize, GL_UNSIGNED_INT, (GLvoid*) 0 ); - glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 ); - glBindBuffer( GL_ARRAY_BUFFER, 0 ); - - // Deactivate vertex array - glDisableClientState( GL_COLOR_ARRAY ); - glDisableClientState( GL_VERTEX_ARRAY ); - if( isUseShader ) - { - glDisableVertexAttribArray( shaderAttrib ); - shader.Deactivate(); - } + cachedManager.EndDrawing(); + nonCachedManager.EndDrawing(); // Draw the remaining contents, blit the main texture to the screen, swap the buffers glFlush(); @@ -551,38 +437,6 @@ void OPENGL_GAL::EndDrawing() } -void OPENGL_GAL::rebuildVbo() -{ -#ifdef __WXDEBUG__ - prof_counter totalTime; - prof_start( &totalTime, false ); -#endif /* __WXDEBUG__ */ - - GLfloat* data = (GLfloat*) cachedVbo.GetAllVertices(); - - // Upload vertices coordinates and shader types to GPU memory - glBindBuffer( GL_ARRAY_BUFFER, cachedVerts ); - glBufferData( GL_ARRAY_BUFFER, cachedVbo.GetSize() * VBO_ITEM::VertByteSize, - data, GL_DYNAMIC_DRAW ); - glBindBuffer( GL_ARRAY_BUFFER, 0 ); - - // Allocate the biggest possible buffer for indices - glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, cachedInds ); - glBufferData( GL_ELEMENT_ARRAY_BUFFER, cachedVbo.GetSize() * VBO_ITEM::IndByteSize, - NULL, GL_STREAM_DRAW ); - glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, 0 ); - - vboNeedsUpdate = false; - -#ifdef __WXDEBUG__ - prof_end( &totalTime ); - - wxLogDebug( wxT( "Rebuilding VBO::%d vertices / %.1f ms" ), - cachedVbo.GetSize(), (double) totalTime.value / 1000.0 ); -#endif /* __WXDEBUG__ */ -} - - inline void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { VECTOR2D startEndVector = aEndPoint - aStartPoint; @@ -598,29 +452,27 @@ inline void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2 { glm::vec4 vector( perpendicularVector.x, perpendicularVector.y, 0.0, 0.0 ); - // If transform stack is not empty, then it means that - // there is a transformation matrix that has to be applied - if( !transformStack.empty() ) - vector = transform * vector; + // The perpendicular vector also needs transformations + vector = currentManager->GetTransformation() * vector; // Line width is maintained by the vertex shader - setShader( SHADER_LINE, vector.x, vector.y, lineWidth ); - vertex3( aStartPoint.x, aStartPoint.y, layerDepth ); // v0 + currentManager->Shader( SHADER_LINE, vector.x, vector.y, lineWidth ); + currentManager->Vertex( aStartPoint.x, aStartPoint.y, layerDepth ); // v0 - setShader( SHADER_LINE, -vector.x, -vector.y, lineWidth ); - vertex3( aStartPoint.x, aStartPoint.y, layerDepth ); // v1 + currentManager->Shader( SHADER_LINE, -vector.x, -vector.y, lineWidth ); + currentManager->Vertex( aStartPoint.x, aStartPoint.y, layerDepth ); // v1 - setShader( SHADER_LINE, -vector.x, -vector.y, lineWidth ); - vertex3( aEndPoint.x, aEndPoint.y, layerDepth ); // v3 + currentManager->Shader( SHADER_LINE, -vector.x, -vector.y, lineWidth ); + currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth ); // v3 - setShader( SHADER_LINE, vector.x, vector.y, lineWidth ); - vertex3( aStartPoint.x, aStartPoint.y, layerDepth ); // v0 + currentManager->Shader( SHADER_LINE, vector.x, vector.y, lineWidth ); + currentManager->Vertex( aStartPoint.x, aStartPoint.y, layerDepth ); // v0 - setShader( SHADER_LINE, -vector.x, -vector.y, lineWidth ); - vertex3( aEndPoint.x, aEndPoint.y, layerDepth ); // v3 + currentManager->Shader( SHADER_LINE, -vector.x, -vector.y, lineWidth ); + currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth ); // v3 - setShader( SHADER_LINE, vector.x, vector.y, lineWidth ); - vertex3( aEndPoint.x, aEndPoint.y, layerDepth ); // v2 + currentManager->Shader( SHADER_LINE, vector.x, vector.y, lineWidth ); + currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth ); // v2 } else { @@ -630,13 +482,13 @@ inline void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2 VECTOR2D v2 = aEndPoint + perpendicularVector; VECTOR2D v3 = aEndPoint - perpendicularVector; - vertex3( v0.x, v0.y, layerDepth ); - vertex3( v1.x, v1.y, layerDepth ); - vertex3( v3.x, v3.y, layerDepth ); + currentManager->Vertex( v0.x, v0.y, layerDepth ); + currentManager->Vertex( v1.x, v1.y, layerDepth ); + currentManager->Vertex( v3.x, v3.y, layerDepth ); - vertex3( v0.x, v0.y, layerDepth ); - vertex3( v3.x, v3.y, layerDepth ); - vertex3( v2.x, v2.y, layerDepth ); + currentManager->Vertex( v0.x, v0.y, layerDepth ); + currentManager->Vertex( v3.x, v3.y, layerDepth ); + currentManager->Vertex( v2.x, v2.y, layerDepth ); } } @@ -650,7 +502,7 @@ void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndP if( isFillEnabled ) { // Filled tracks - color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + currentManager->Color( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); SetLineWidth( aWidth ); drawLineQuad( aStartPoint, aEndPoint ); @@ -664,12 +516,12 @@ void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndP // Outlined tracks double lineLength = startEndVector.EuclideanNorm(); - color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); Save(); - translate3( aStartPoint.x, aStartPoint.y, 0.0 ); - Rotate( lineAngle ); + currentManager->Translate( aStartPoint.x, aStartPoint.y, 0.0 ); + currentManager->Rotate( lineAngle, 0.0f, 0.0f, 1.0f ); drawLineQuad( VECTOR2D( 0.0, aWidth / 2.0 ), VECTOR2D( lineLength, aWidth / 2.0 ) ); @@ -686,7 +538,7 @@ void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndP } -unsigned int OPENGL_GAL::getGroupNumber() +unsigned int OPENGL_GAL::getNewGroupNumber() { wxASSERT_MSG( groups.size() < std::numeric_limits::max(), wxT( "There are no free slots to store a group" ) ); @@ -745,7 +597,7 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn // Stroke the outline if( isStrokeEnabled ) { - color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); std::deque pointList; pointList.push_back( aStartPoint ); @@ -759,16 +611,16 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn // Fill the rectangle if( isFillEnabled ) { - setShader( SHADER_NONE ); - color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + currentManager->Shader( SHADER_NONE ); + currentManager->Color( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - vertex3( aStartPoint.x, aStartPoint.y, layerDepth ); - vertex3( diagonalPointA.x, diagonalPointA.y, layerDepth ); - vertex3( aEndPoint.x, aEndPoint.y, layerDepth ); + currentManager->Vertex( aStartPoint.x, aStartPoint.y, layerDepth ); + currentManager->Vertex( diagonalPointA.x, diagonalPointA.y, layerDepth ); + currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth ); - vertex3( aStartPoint.x, aStartPoint.y, layerDepth ); - vertex3( aEndPoint.x, aEndPoint.y, layerDepth ); - vertex3( diagonalPointB.x, diagonalPointB.y, layerDepth ); + currentManager->Vertex( aStartPoint.x, aStartPoint.y, layerDepth ); + currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth ); + currentManager->Vertex( diagonalPointB.x, diagonalPointB.y, layerDepth ); } } @@ -779,7 +631,7 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) { if( isFillEnabled ) { - color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + currentManager->Color( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); /* Draw a triangle that contains the circle, then shade it leaving only the circle. Parameters given to setShader are indices of the triangle's vertices @@ -790,21 +642,21 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) //\\ v0 /_\/_\ v1 */ - setShader( SHADER_FILLED_CIRCLE, 1.0 ); - vertex3( aCenterPoint.x - aRadius * sqrt( 3.0f ), - aCenterPoint.y - aRadius, layerDepth ); // v0 + currentManager->Shader( SHADER_FILLED_CIRCLE, 1.0 ); + currentManager->Vertex( aCenterPoint.x - aRadius * sqrt( 3.0f ), + aCenterPoint.y - aRadius, layerDepth ); // v0 - setShader( SHADER_FILLED_CIRCLE, 2.0 ); - vertex3( aCenterPoint.x + aRadius* sqrt( 3.0f ), - aCenterPoint.y - aRadius, layerDepth ); // v1 + currentManager->Shader( SHADER_FILLED_CIRCLE, 2.0 ); + currentManager->Vertex( aCenterPoint.x + aRadius* sqrt( 3.0f ), + aCenterPoint.y - aRadius, layerDepth ); // v1 - setShader( SHADER_FILLED_CIRCLE, 3.0 ); - vertex3( aCenterPoint.x, aCenterPoint.y + aRadius * 2.0f, layerDepth ); // v2 + currentManager->Shader( SHADER_FILLED_CIRCLE, 3.0 ); + currentManager->Vertex( aCenterPoint.x, aCenterPoint.y + aRadius * 2.0f, layerDepth ); // v2 } if( isStrokeEnabled ) { - color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); /* Draw a triangle that contains the circle, then shade it leaving only the circle. Parameters given to setShader are indices of the triangle's vertices @@ -817,114 +669,126 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) v0 /_\/_\ v1 */ double outerRadius = aRadius + ( lineWidth / 2 ); - setShader( SHADER_STROKED_CIRCLE, 1.0, aRadius, lineWidth ); - vertex3( aCenterPoint.x - outerRadius * sqrt( 3.0f ), - aCenterPoint.y - outerRadius, layerDepth ); // v0 + currentManager->Shader( SHADER_STROKED_CIRCLE, 1.0, aRadius, lineWidth ); + currentManager->Vertex( aCenterPoint.x - outerRadius * sqrt( 3.0f ), + aCenterPoint.y - outerRadius, layerDepth ); // v0 - setShader( SHADER_STROKED_CIRCLE, 2.0, aRadius, lineWidth ); - vertex3( aCenterPoint.x + outerRadius * sqrt( 3.0f ), - aCenterPoint.y - outerRadius, layerDepth ); // v1 + currentManager->Shader( SHADER_STROKED_CIRCLE, 2.0, aRadius, lineWidth ); + currentManager->Vertex( aCenterPoint.x + outerRadius * sqrt( 3.0f ), + aCenterPoint.y - outerRadius, layerDepth ); // v1 - setShader( SHADER_STROKED_CIRCLE, 3.0, aRadius, lineWidth ); - vertex3( aCenterPoint.x, aCenterPoint.y + outerRadius * 2.0f, layerDepth ); // v2 + currentManager->Shader( SHADER_STROKED_CIRCLE, 3.0, aRadius, lineWidth ); + currentManager->Vertex( aCenterPoint.x, aCenterPoint.y + outerRadius * 2.0f, layerDepth ); // v2 + } + } + else + { + if( isStrokeEnabled ) + { + // Compute the factors for the unit circle + double outerScale = lineWidth / aRadius / 2; + double innerScale = -outerScale; + outerScale += 1.0; + innerScale += 1.0; + + if( innerScale < outerScale ) + { + // Draw the outline + VERTEX* circle = circleContainer.GetAllVertices(); + int next; + + currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, + strokeColor.a ); + + Save(); + + currentManager->Translate( aCenterPoint.x, aCenterPoint.y, 0.0 ); + currentManager->Scale( aRadius, aRadius, 0.0f ); + + for( int i = 0; i < 3 * CIRCLE_POINTS; ++i ) + { + // verticesCircle contains precomputed circle points interleaved with vertex + // (0,0,0), so filled circles can be drawn as consecutive triangles, ie: + // { 0,a,b, 0,c,d, 0,e,f, 0,g,h, ... } + // where letters stand for consecutive circle points and 0 for (0,0,0) vertex. + + // We have to skip all (0,0,0) vertices (every third vertex) + if( i % 3 == 0 ) + { + i++; + // Depending on the vertex, next circle point may be stored in the next vertex.. + next = i + 1; + } + else + { + // ..or 2 vertices away (in case it is preceded by (0,0,0) vertex) + next = i + 2; + } + + currentManager->Vertex( circle[i].x * innerScale, + circle[i].y * innerScale, + layerDepth ); + currentManager->Vertex( circle[i].x * outerScale, + circle[i].y * outerScale, + layerDepth ); + currentManager->Vertex( circle[next].x * innerScale, + circle[next].y * innerScale, + layerDepth ); + + currentManager->Vertex( circle[i].x * outerScale, + circle[i].y * outerScale, + layerDepth ); + currentManager->Vertex( circle[next].x * outerScale, + circle[next].y * outerScale, + layerDepth ); + currentManager->Vertex( circle[next].x * innerScale, + circle[next].y * innerScale, + layerDepth ); + } + + Restore(); + } } - return; - } - - if( isStrokeEnabled ) - { - // Compute the factors for the unit circle - double outerScale = lineWidth / aRadius / 2; - double innerScale = -outerScale; - outerScale += 1.0; - innerScale += 1.0; - - if( innerScale < outerScale ) + // Filled circles are easy to draw by using the stored vertices list, scaling and translating + if( isFillEnabled ) { - // Draw the outline - VBO_VERTEX* circle = verticesCircle.GetVertices(); - int next; - - color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + currentManager->Color( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); Save(); - - translate3( aCenterPoint.x, aCenterPoint.y, 0.0 ); - Scale( VECTOR2D( aRadius, aRadius ) ); - - for( int i = 0; i < 3 * CIRCLE_POINTS; ++i ) - { - // verticesCircle contains precomputed circle points interleaved with vertex - // (0,0,0), so filled circles can be drawn as consecutive triangles, ie: - // { 0,a,b, 0,c,d, 0,e,f, 0,g,h, ... } - // where letters stand for consecutive circle points and 0 for (0,0,0) vertex. - - // We have to skip all (0,0,0) vertices (every third vertex) - if( i % 3 == 0) - { - i++; - // Depending on the vertex, next circle point may be stored in the next vertex.. - next = i + 1; - } - else - { - // ..or 2 vertices away (in case it is preceded by (0,0,0) vertex) - next = i + 2; - } - - vertex3( circle[i].x * innerScale, circle[i].y * innerScale, layerDepth ); - vertex3( circle[i].x * outerScale, circle[i].y * outerScale, layerDepth ); - vertex3( circle[next].x * innerScale, circle[next].y * innerScale, layerDepth ); - - vertex3( circle[i].x * outerScale, circle[i].y * outerScale, layerDepth ); - vertex3( circle[next].x * outerScale, circle[next].y * outerScale, layerDepth ); - vertex3( circle[next].x * innerScale, circle[next].y * innerScale, layerDepth ); - } - + currentManager->Translate( aCenterPoint.x, aCenterPoint.y, layerDepth ); + currentManager->Scale( aRadius, aRadius, 0.0f ); + currentManager->Vertices( circleContainer.GetAllVertices(), CIRCLE_POINTS * 3 ); Restore(); } } - - // Filled circles are easy to draw by using the stored display list, scaling and translating - if( isFillEnabled ) - { - color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - - Save(); - translate3( aCenterPoint.x, aCenterPoint.y, layerDepth ); - Scale( VECTOR2D( aRadius, aRadius ) ); - - currentItem->PushVertices( verticesCircle.GetVertices(), CIRCLE_POINTS * 3 ); - - Restore(); - } } void OPENGL_GAL::drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ) { - if( isFillEnabled ) - { - color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - drawFilledSemiCircle( aCenterPoint, aRadius, aAngle ); - } + if( isFillEnabled ) + { + currentManager->Color( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + drawFilledSemiCircle( aCenterPoint, aRadius, aAngle ); + } - if( isStrokeEnabled ) - { - color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); - drawStrokedSemiCircle( aCenterPoint, aRadius, aAngle ); - } + if( isStrokeEnabled ) + { + currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + drawStrokedSemiCircle( aCenterPoint, aRadius, aAngle ); + } } -void OPENGL_GAL::drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ) +void OPENGL_GAL::drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, + double aAngle ) { if( isUseShader ) { Save(); - Translate( aCenterPoint ); - Rotate( aAngle ); + currentManager->Translate( aCenterPoint.x, aCenterPoint.y, 0.0f ); + currentManager->Rotate( aAngle, 0.0f, 0.0f, 1.0f ); /* Draw a triangle that contains the semicircle, then shade it to leave only the semicircle. Parameters given to setShader are indices of the triangle's vertices @@ -935,41 +799,42 @@ void OPENGL_GAL::drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRad /__\ v0 //__\\ v1 */ - setShader( SHADER_FILLED_CIRCLE, 4.0f ); - vertex3( -aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 + currentManager->Shader( SHADER_FILLED_CIRCLE, 4.0f ); + currentManager->Vertex( -aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 - setShader( SHADER_FILLED_CIRCLE, 5.0f ); - vertex3( aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 + currentManager->Shader( SHADER_FILLED_CIRCLE, 5.0f ); + currentManager->Vertex( aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 - setShader( SHADER_FILLED_CIRCLE, 6.0f ); - vertex3( 0.0f, aRadius * 2.0f, layerDepth ); // v2 + currentManager->Shader( SHADER_FILLED_CIRCLE, 6.0f ); + currentManager->Vertex( 0.0f, aRadius * 2.0f, layerDepth ); // v2 Restore(); } else { Save(); - translate3( aCenterPoint.x, aCenterPoint.y, layerDepth ); - Scale( VECTOR2D( aRadius, aRadius ) ); - Rotate( aAngle ); + currentManager->Translate( aCenterPoint.x, aCenterPoint.y, layerDepth ); + currentManager->Scale( aRadius, aRadius, 0.0f ); + currentManager->Rotate( aAngle, 0.0f, 0.0f, 1.0f ); - // It is enough just to push just a half of the circle vertices to make a semicircle - currentItem->PushVertices( verticesCircle.GetVertices(), CIRCLE_POINTS / 2 * 3 ); + // It is enough just to draw a half of the circle vertices to make a semicircle + currentManager->Vertices( circleContainer.GetAllVertices(), ( CIRCLE_POINTS * 3 ) / 2 ); Restore(); } } -void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ) +void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, + double aAngle ) { if( isUseShader ) { double outerRadius = aRadius + ( lineWidth / 2 ); Save(); - Translate( aCenterPoint ); - Rotate( aAngle ); + currentManager->Translate( aCenterPoint.x, aCenterPoint.y, 0.0f ); + currentManager->Rotate( aAngle, 0.0f, 0.0f, 1.0f ); /* Draw a triangle that contains the semicircle, then shade it to leave only the semicircle. Parameters given to setShader are indices of the triangle's vertices @@ -981,14 +846,14 @@ void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRa /__\ v0 //__\\ v1 */ - setShader( SHADER_STROKED_CIRCLE, 4.0f, aRadius, lineWidth ); - vertex3( -outerRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 + currentManager->Shader( SHADER_STROKED_CIRCLE, 4.0f, aRadius, lineWidth ); + currentManager->Vertex( -outerRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 - setShader( SHADER_STROKED_CIRCLE, 5.0f, aRadius, lineWidth ); - vertex3( outerRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 + currentManager->Shader( SHADER_STROKED_CIRCLE, 5.0f, aRadius, lineWidth ); + currentManager->Vertex( outerRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 - setShader( SHADER_STROKED_CIRCLE, 6.0f, aRadius, lineWidth ); - vertex3( 0.0f, outerRadius * 2.0f, layerDepth ); // v2 + currentManager->Shader( SHADER_STROKED_CIRCLE, 6.0f, aRadius, lineWidth ); + currentManager->Vertex( 0.0f, outerRadius * 2.0f, layerDepth ); // v2 Restore(); } @@ -998,13 +863,13 @@ void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRa double innerScale = 1.0 - lineWidth / aRadius; Save(); - translate3( aCenterPoint.x, aCenterPoint.y, layerDepth ); - Scale( VECTOR2D( aRadius, aRadius ) ); - Rotate( aAngle ); + currentManager->Translate( aCenterPoint.x, aCenterPoint.y, layerDepth ); + currentManager->Scale( aRadius, aRadius, 0.0f ); + currentManager->Rotate( aAngle, 0.0f, 0.0f, 1.0f ); // Draw the outline - VBO_VERTEX* circle = verticesCircle.GetVertices(); - int next; + VERTEX* circle = circleContainer.GetAllVertices(); + int next; for( int i = 0; i < ( 3 * CIRCLE_POINTS ) / 2; ++i ) { @@ -1026,13 +891,13 @@ void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRa next = i + 2; } - vertex3( circle[i].x * innerScale, circle[i].y * innerScale, 0.0 ); - vertex3( circle[i].x, circle[i].y, 0.0 ); - vertex3( circle[next].x * innerScale, circle[next].y * innerScale, 0.0 ); + currentManager->Vertex( circle[i].x * innerScale, circle[i].y * innerScale, 0.0 ); + currentManager->Vertex( circle[i].x, circle[i].y, 0.0 ); + currentManager->Vertex( circle[next].x * innerScale, circle[next].y * innerScale, 0.0 ); - vertex3( circle[i].x, circle[i].y, 0.0 ); - vertex3( circle[next].x, circle[next].y, 0.0 ); - vertex3( circle[next].x * innerScale, circle[next].y * innerScale, 0.0 ); + currentManager->Vertex( circle[i].x, circle[i].y, 0.0 ); + currentManager->Vertex( circle[next].x, circle[next].y, 0.0 ); + currentManager->Vertex( circle[next].x * innerScale, circle[next].y * innerScale, 0.0 ); } Restore(); @@ -1045,9 +910,7 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a double aEndAngle ) { if( aRadius <= 0 ) - { return; - } // Swap the angles, if start angle is greater than end angle SWAP( aStartAngle, >, aEndAngle ); @@ -1058,17 +921,17 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a VECTOR2D middlePoint = 0.5 * startEndPoint; Save(); - translate3( aCenterPoint.x, aCenterPoint.y, layerDepth ); + currentManager->Translate( aCenterPoint.x, aCenterPoint.y, layerDepth ); if( isStrokeEnabled ) { if( isUseShader ) { double alphaIncrement = 2.0 * M_PI / CIRCLE_POINTS; - color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); VECTOR2D p( cos( aStartAngle ) * aRadius, sin( aStartAngle ) * aRadius ); - double alpha; + double alpha; for( alpha = aStartAngle + alphaIncrement; alpha < aEndAngle; alpha += alphaIncrement ) { VECTOR2D p_next( cos( alpha ) * aRadius, sin( alpha ) * aRadius ); @@ -1095,7 +958,8 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a innerScale += 1.0; double alphaIncrement = 2 * M_PI / CIRCLE_POINTS; - color4( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + for( double alpha = aStartAngle; alpha < aEndAngle; ) { @@ -1110,13 +974,13 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a double v2[] = { cos( alpha ) * innerScale, sin( alpha ) * innerScale }; double v3[] = { cos( alpha ) * outerScale, sin( alpha ) * outerScale }; - vertex3( v0[0], v0[1], 0.0 ); - vertex3( v1[0], v1[1], 0.0 ); - vertex3( v2[0], v2[1], 0.0 ); + currentManager->Vertex( v0[0], v0[1], 0.0 ); + currentManager->Vertex( v1[0], v1[1], 0.0 ); + currentManager->Vertex( v2[0], v2[1], 0.0 ); - vertex3( v1[0], v1[1], 0.0 ); - vertex3( v3[0], v3[1], 0.0 ); - vertex3( v2[0], v2[1], 0.0 ); + currentManager->Vertex( v1[0], v1[1], 0.0 ); + currentManager->Vertex( v3[0], v3[1], 0.0 ); + currentManager->Vertex( v2[0], v2[1], 0.0 ); } // Draw line caps @@ -1129,19 +993,19 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a { double alphaIncrement = 2 * M_PI / CIRCLE_POINTS; double alpha; - color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + currentManager->Color( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); for( alpha = aStartAngle; ( alpha + alphaIncrement ) < aEndAngle; ) { - vertex3( middlePoint.x, middlePoint.y, 0.0 ); - vertex3( cos( alpha ), sin( alpha ), 0.0 ); + currentManager->Vertex( middlePoint.x, middlePoint.y, 0.0 ); + currentManager->Vertex( cos( alpha ), sin( alpha ), 0.0 ); alpha += alphaIncrement; - vertex3( cos( alpha ), sin( alpha ), 0.0 ); + currentManager->Vertex( cos( alpha ), sin( alpha ), 0.0 ); } - vertex3( middlePoint.x, middlePoint.y, 0.0 ); - vertex3( cos( alpha ), sin( alpha ), 0.0 ); - vertex3( endPoint.x, endPoint.y, 0.0 ); + currentManager->Vertex( middlePoint.x, middlePoint.y, 0.0 ); + currentManager->Vertex( cos( alpha ), sin( alpha ), 0.0 ); + currentManager->Vertex( endPoint.x, endPoint.y, 0.0 ); } Restore(); @@ -1181,8 +1045,7 @@ void OPENGL_GAL::DrawPolygon( const std::deque& aPointList ) { // Any non convex polygon needs to be tesselated // for this purpose the GLU standard functions are used - - setShader( SHADER_NONE ); + currentManager->Shader( SHADER_NONE ); typedef std::vector OGLPOINTS; @@ -1191,11 +1054,11 @@ void OPENGL_GAL::DrawPolygon( const std::deque& aPointList ) OGLPOINTS vertexList( aPointList.size(), OGLPOINT( "fastest" ) ); glNormal3d( 0.0, 0.0, 1.0 ); - color4( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + currentManager->Color( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); glShadeModel( GL_FLAT ); - TessParams params = { currentItem, tessIntersects }; + TessParams params = { currentManager, tessIntersects }; gluTessBeginPolygon( tesselator, ¶ms ); gluTessBeginContour( tesselator ); @@ -1213,10 +1076,12 @@ void OPENGL_GAL::DrawPolygon( const std::deque& aPointList ) // Free allocated intersecting points std::vector::iterator it, it_end; + for( it = tessIntersects.begin(), it_end = tessIntersects.end(); it < it_end; ++it ) { delete[] *it; } + tessIntersects.clear(); // vertexList destroyed here @@ -1261,7 +1126,7 @@ void OPENGL_GAL::SetStrokeColor( const COLOR4D& aColor ) strokeColor = aColor; // This is the default drawing color - color4( aColor.r, aColor.g, aColor.b, aColor.a ); + currentManager->Color( aColor.r, aColor.g, aColor.b, aColor.a ); } @@ -1315,19 +1180,19 @@ void OPENGL_GAL::Transform( MATRIX3x3D aTransformation ) void OPENGL_GAL::Rotate( double aAngle ) { - transform = glm::rotate( transform, (float) aAngle, glm::vec3( 0, 0, 1 ) ); + currentManager->Rotate( aAngle, 0.0f, 0.0f, 1.0f ); } void OPENGL_GAL::Translate( const VECTOR2D& aVector ) { - transform = glm::translate( transform, glm::vec3( aVector.x, aVector.y, 0 ) ); + currentManager->Translate( aVector.x, aVector.y, 0.0f ); } void OPENGL_GAL::Scale( const VECTOR2D& aScale ) { - transform = glm::scale( transform, glm::vec3( aScale.x, aScale.y, 0 ) ); + currentManager->Scale( aScale.x, aScale.y, 0.0f ); } @@ -1339,21 +1204,13 @@ void OPENGL_GAL::Flush() void OPENGL_GAL::Save() { - transformStack.push( transform ); - currentContainer->SetTransformMatrix( &transform ); + currentManager->PushMatrix(); } void OPENGL_GAL::Restore() { - transform = transformStack.top(); - transformStack.pop(); - - if( transformStack.empty() ) - { - // Disable transforming, as the selected matrix is identity - currentContainer->SetTransformMatrix( NULL ); - } + currentManager->PopMatrix(); } @@ -1361,14 +1218,10 @@ int OPENGL_GAL::BeginGroup() { isGrouping = true; - // There is a new group that is not in VBO yet - vboNeedsUpdate = true; - - // Save the pointer for caching the current item - currentItem = new VBO_ITEM( &cachedVbo ); - currentContainer = &cachedVbo; - int groupNumber = getGroupNumber(); - groups.insert( std::make_pair( groupNumber, currentItem ) ); + boost::shared_ptr newItem( new VERTEX_ITEM( cachedManager ) ); + currentManager = &cachedManager; + int groupNumber = getNewGroupNumber(); + groups.insert( std::make_pair( groupNumber, newItem ) ); return groupNumber; } @@ -1376,9 +1229,7 @@ int OPENGL_GAL::BeginGroup() void OPENGL_GAL::EndGroup() { - currentItem->Finish(); - currentItem = nonCachedItem; - currentContainer = &nonCachedVbo; + currentManager = &nonCachedManager; isGrouping = false; } @@ -1386,75 +1237,57 @@ void OPENGL_GAL::EndGroup() void OPENGL_GAL::ClearCache() { - BOOST_FOREACH( GroupsMap::value_type it, groups ) - { - delete it.second; - } - groups.clear(); + cachedManager.Clear(); } void OPENGL_GAL::DeleteGroup( int aGroupNumber ) { - delete groups[aGroupNumber]; groups.erase( aGroupNumber ); - - vboNeedsUpdate = true; } void OPENGL_GAL::DrawGroup( int aGroupNumber ) { - int size = groups[aGroupNumber]->GetSize(); - int offset = groups[aGroupNumber]->GetOffset(); - - // Copy indices of items that should be drawn to GPU memory - for( int i = offset; i < offset + size; *indicesPtr++ = i++ ); - - indicesSize += size; + cachedManager.DrawItem( *groups[aGroupNumber] ); } void OPENGL_GAL::ChangeGroupColor( int aGroupNumber, const COLOR4D& aNewColor ) { - groups[aGroupNumber]->ChangeColor( aNewColor ); - vboNeedsUpdate = true; + cachedManager.ChangeItemColor( *groups[aGroupNumber], aNewColor ); } void OPENGL_GAL::ChangeGroupDepth( int aGroupNumber, int aDepth ) { - groups[aGroupNumber]->ChangeDepth( aDepth ); - vboNeedsUpdate = true; + cachedManager.ChangeItemDepth( *groups[aGroupNumber], aDepth ); } -void OPENGL_GAL::computeCircleVbo() +void OPENGL_GAL::computeCircle() { + VERTEX* vertex = circleContainer.Allocate( CIRCLE_POINTS ); + // Compute the circle points for a given number of segments - // Insert in a display list and a vector - const VBO_VERTEX v0 = { 0.0f, 0.0f, 0.0f }; - - for( int i = 0; i < CIRCLE_POINTS; i++ ) + for( int i = 0; i < CIRCLE_POINTS; ++i ) { - const VBO_VERTEX v1 = { - cos( 2.0 * M_PI / CIRCLE_POINTS * i ), // x - sin( 2.0 * M_PI / CIRCLE_POINTS * i ), // y - 0.0f // z - }; - const VBO_VERTEX v2 = { - cos( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), // x - sin( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ), // y - 0.0f // z - }; + vertex->x = 0.0f; + vertex->y = 0.0f; + vertex->z = 0.0f; + vertex++; - verticesCircle.PushVertex( &v0 ); - verticesCircle.PushVertex( &v1 ); - verticesCircle.PushVertex( &v2 ); + vertex->x = cos( 2.0 * M_PI / CIRCLE_POINTS * i ); + vertex->y = sin( 2.0 * M_PI / CIRCLE_POINTS * i ); + vertex->z = 0.0f; + vertex++; + + vertex->x = cos( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ); + vertex->y = sin( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ); + vertex->z = 0.0f; + vertex++; } - - verticesCircle.Finish(); } @@ -1495,13 +1328,10 @@ void CALLBACK VertexCallback( GLvoid* aVertexPtr, void* aData ) { GLdouble* vertex = static_cast( aVertexPtr ); OPENGL_GAL::TessParams* param = static_cast( aData ); - VBO_ITEM* vboItem = param->vboItem; + VERTEX_MANAGER* vboManager = param->vboManager; - if( vboItem ) - { - VBO_VERTEX newVertex = { vertex[0], vertex[1], vertex[2] }; - vboItem->PushVertex( &newVertex ); - } + if( vboManager ) + vboManager->Vertex( vertex[0], vertex[1], vertex[2] ); } @@ -1524,7 +1354,6 @@ void CALLBACK CombineCallback( GLdouble coords[3], void CALLBACK EdgeCallback(void) { // This callback is needed to force GLU tesselator to use triangles only - return; } @@ -1650,19 +1479,19 @@ void OPENGL_GAL::DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEnd VECTOR2D point4 = aEndPoint - perpendicularVector; // Set color - color4( gridColor.r, gridColor.g, gridColor.b, gridColor.a ); + currentManager->Color( gridColor.r, gridColor.g, gridColor.b, gridColor.a ); - setShader( SHADER_NONE ); + currentManager->Shader( SHADER_NONE ); // Draw the quad for the grid line double gridDepth = depthRange.y * 0.75; - vertex3( point1.x, point1.y, gridDepth ); - vertex3( point2.x, point2.y, gridDepth ); - vertex3( point4.x, point4.y, gridDepth ); + currentManager->Vertex( point1.x, point1.y, gridDepth ); + currentManager->Vertex( point2.x, point2.y, gridDepth ); + currentManager->Vertex( point4.x, point4.y, gridDepth ); - vertex3( point1.x, point1.y, gridDepth ); - vertex3( point4.x, point4.y, gridDepth ); - vertex3( point3.x, point3.y, gridDepth ); + currentManager->Vertex( point1.x, point1.y, gridDepth ); + currentManager->Vertex( point4.x, point4.y, gridDepth ); + currentManager->Vertex( point3.x, point3.y, gridDepth ); } diff --git a/common/gal/opengl/vbo_item.cpp b/common/gal/opengl/vbo_item.cpp deleted file mode 100644 index 15bdcc68d4..0000000000 --- a/common/gal/opengl/vbo_item.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/* - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2013 CERN - * @author Maciej Suminski - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, you may find one here: - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * or you may search the http://www.gnu.org website for the version 2 license, - * or you may write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -/** - * @file vbo_item.cpp - * @brief Class to handle an item held in a Vertex Buffer Object. - */ - -#include -#include -#include - -using namespace KiGfx; - -VBO_ITEM::VBO_ITEM( VBO_CONTAINER* aContainer ) : - m_offset( 0 ), - m_size( 0 ), - m_container( aContainer ), - m_isDirty( true ) -{ - // The item's size is not known yet, so we just start an item in the container - aContainer->StartItem( this ); -} - - -VBO_ITEM::~VBO_ITEM() -{ - m_container->Free( this ); -} - - -void VBO_ITEM::PushVertex( const VBO_VERTEX* aVertex ) -{ - m_container->Add( aVertex ); - - m_isDirty = true; -} - - -void VBO_ITEM::PushVertices( const VBO_VERTEX* aVertices, GLuint aSize ) -{ - for( unsigned int i = 0; i < aSize; ++i ) - { - PushVertex( &aVertices[i] ); - } -} - - -VBO_VERTEX* VBO_ITEM::GetVertices() -{ - if( m_isDirty ) - Finish(); - - return m_container->GetVertices( m_offset ); -} - - -void VBO_ITEM::ChangeColor( const COLOR4D& aColor ) -{ - VBO_VERTEX* vertexPtr = GetVertices(); - - for( unsigned int i = 0; i < m_size; ++i ) - { - vertexPtr->r = aColor.r * 255; - vertexPtr->g = aColor.g * 255; - vertexPtr->b = aColor.b * 255; - vertexPtr->a = aColor.a * 255; - - // Move on to the next vertex - vertexPtr++; - } -} - - -void VBO_ITEM::ChangeDepth( int aDepth ) -{ - VBO_VERTEX* vertexPtr = GetVertices(); - - for( unsigned int i = 0; i < m_size; ++i ) - { - vertexPtr->z = aDepth; - - // Move on to the next vertex - vertexPtr++; - } -} - - -void VBO_ITEM::Finish() -{ - // The unknown-sized item has just ended, so we need to inform the container about it - m_container->EndItem(); - - m_isDirty = false; -} diff --git a/common/gal/opengl/vertex_container.cpp b/common/gal/opengl/vertex_container.cpp new file mode 100644 index 0000000000..02de36e4df --- /dev/null +++ b/common/gal/opengl/vertex_container.cpp @@ -0,0 +1,57 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file vertex_container.cpp + * @brief Class to store vertices and handle transfers between system memory and GPU memory. + */ + +#include +#include +#include +#include +#include + +using namespace KiGfx; + +VERTEX_CONTAINER* VERTEX_CONTAINER::MakeContainer( bool aCached ) +{ + if( aCached ) + return new CACHED_CONTAINER; + else + return new NONCACHED_CONTAINER; +} + + +VERTEX_CONTAINER::VERTEX_CONTAINER( unsigned int aSize ) : + m_freeSpace( aSize ), m_currentSize( aSize ), m_initialSize( aSize ), m_failed( false ) +{ + m_vertices = static_cast( malloc( aSize * sizeof( VERTEX ) ) ); +} + + +VERTEX_CONTAINER::~VERTEX_CONTAINER() +{ + free( m_vertices ); +} diff --git a/common/gal/opengl/vertex_item.cpp b/common/gal/opengl/vertex_item.cpp new file mode 100644 index 0000000000..f5cddc6661 --- /dev/null +++ b/common/gal/opengl/vertex_item.cpp @@ -0,0 +1,53 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file vertex_item.cpp + * @brief Class to handle an item held in a container. + */ + +#include +#include +#include + +using namespace KiGfx; + +VERTEX_ITEM::VERTEX_ITEM( const VERTEX_MANAGER& aManager ) : + m_manager( aManager ), m_offset( 0 ), m_size( 0 ) +{ + // As the item is created, we are going to modify it, so call to SetItem() is needed + m_manager.SetItem( *this ); +} + + +VERTEX_ITEM::~VERTEX_ITEM() +{ + m_manager.FreeItem( *this ); +} + + +VERTEX* VERTEX_ITEM::GetVertices() const +{ + return m_manager.GetVertices( *this ); +} diff --git a/common/gal/opengl/vertex_manager.cpp b/common/gal/opengl/vertex_manager.cpp new file mode 100644 index 0000000000..d3b9e00f66 --- /dev/null +++ b/common/gal/opengl/vertex_manager.cpp @@ -0,0 +1,203 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file vertex_manager.cpp + * @brief Class to control vertex container and GPU with possibility of emulating old-style OpenGL + * 1.0 state machine using modern OpenGL methods. + */ + +#include +#include +#include +#include +#include + +using namespace KiGfx; + +VERTEX_MANAGER::VERTEX_MANAGER( bool aCached ) : + m_noTransform( true ), m_transform( 1.0f ) +{ + m_container.reset( VERTEX_CONTAINER::MakeContainer( aCached ) ); + m_gpu.reset( GPU_MANAGER::MakeManager( m_container.get() ) ); + + // There is no shader used by default + for( unsigned int i = 0; i < ShaderStride; ++i ) + m_shader[i] = 0.0f; +} + + +void VERTEX_MANAGER::Vertex( GLfloat aX, GLfloat aY, GLfloat aZ ) const +{ + // Obtain the pointer to the vertex in the currently used container + VERTEX* newVertex = m_container->Allocate( 1 ); + if( newVertex == NULL ) + { + wxLogError( wxT( "Vertex allocation error" ) ); + return; + } + + putVertex( *newVertex, aX, aY, aZ ); +} + + +void VERTEX_MANAGER::Vertices( const VERTEX aVertices[], unsigned int aSize ) const +{ + // Obtain pointer to the vertex in currently used container + VERTEX* newVertex = m_container->Allocate( aSize ); + if( newVertex == NULL ) + { + wxLogError( wxT( "Vertex allocation error" ) ); + return; + } + + // Put vertices in already allocated memory chunk + for( unsigned int i = 0; i < aSize; ++i ) + { + putVertex( newVertex[i], aVertices[i].x, aVertices[i].y, aVertices[i].z ); + } +} + + +void VERTEX_MANAGER::SetItem( VERTEX_ITEM& aItem ) const +{ + m_container->SetItem( &aItem ); +} + + +void VERTEX_MANAGER::FreeItem( VERTEX_ITEM& aItem ) const +{ + m_container->SetItem( &aItem ); + m_container->Erase(); +} + + +void VERTEX_MANAGER::ChangeItemColor( const VERTEX_ITEM& aItem, const COLOR4D& aColor ) const +{ + unsigned int size = aItem.GetSize(); + unsigned int offset = aItem.GetOffset(); + + VERTEX* vertex = m_container->GetVertices( offset ); + for( unsigned int i = 0; i < size; ++i ) + { + vertex->r = aColor.r; + vertex->g = aColor.g; + vertex->b = aColor.b; + vertex->a = aColor.a; + vertex++; + } +} + + +void VERTEX_MANAGER::ChangeItemDepth( const VERTEX_ITEM& aItem, GLfloat aDepth ) const +{ + unsigned int size = aItem.GetSize(); + unsigned int offset = aItem.GetOffset(); + + VERTEX* vertex = m_container->GetVertices( offset ); + for( unsigned int i = 0; i < size; ++i ) + { + vertex->z = aDepth; + vertex++; + } +} + + +VERTEX* VERTEX_MANAGER::GetVertices( const VERTEX_ITEM& aItem ) const +{ + if( aItem.GetSize() == 0 ) + return NULL; // The item is not stored in the container + + return m_container->GetVertices( aItem.GetOffset() ); +} + + +void VERTEX_MANAGER::SetShader( SHADER& aShader ) const +{ + m_gpu->SetShader( aShader ); +} + + +void VERTEX_MANAGER::Clear() const +{ + m_container->Clear(); +} + + +void VERTEX_MANAGER::BeginDrawing() const +{ + m_gpu->BeginDrawing(); +} + + +void VERTEX_MANAGER::DrawItem( const VERTEX_ITEM& aItem ) const +{ + int size = aItem.GetSize(); + if( size > 0 ) + { + int offset = aItem.GetOffset(); + m_gpu->DrawIndices( offset, size ); + } +} + + +void VERTEX_MANAGER::EndDrawing() const +{ + m_gpu->EndDrawing(); +} + + +void VERTEX_MANAGER::putVertex( VERTEX& aTarget, GLfloat aX, GLfloat aY, GLfloat aZ ) const +{ + // Modify the vertex according to the currently used transformations + if( m_noTransform ) + { + // Simply copy coordinates, when the transform matrix is the identity matrix + aTarget.x = aX; + aTarget.y = aY; + aTarget.z = aZ; + } + else + { + // Apply transformations + glm::vec4 transVertex( aX, aY, aZ, 1.0f ); + transVertex = m_transform * transVertex; + + aTarget.x = transVertex.x; + aTarget.y = transVertex.y; + aTarget.z = transVertex.z; + } + + // Apply currently used color + aTarget.r = m_color[0]; + aTarget.g = m_color[1]; + aTarget.b = m_color[2]; + aTarget.a = m_color[3]; + + // Apply currently used shader + for( unsigned int j = 0; j < ShaderStride; ++j ) + { + aTarget.shader[j] = m_shader[j]; + } +} diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 0ae26b6fd8..96035763de 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -401,11 +401,11 @@ private: void deinitSurface(); /** - * @brief Returns a valid key that can be used as a group number. + * @brief Returns a valid key that can be used as a new group number. * * @return An unique group number that is not used by any other group. */ - unsigned int getGroupNumber(); + unsigned int getNewGroupNumber(); }; } // namespace KiGfx diff --git a/include/gal/opengl/cached_container.h b/include/gal/opengl/cached_container.h new file mode 100644 index 0000000000..6c2c8b92bf --- /dev/null +++ b/include/gal/opengl/cached_container.h @@ -0,0 +1,185 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file cached_container.h + * @brief Class to store instances of VERTEX with caching. It allows storing VERTEX objects and + * associates them with VERTEX_ITEMs. This leads to a possibility of caching vertices data in the + * GPU memory and a fast reuse of that data. + */ + +#ifndef CACHED_CONTAINER_H_ +#define CACHED_CONTAINER_H_ + +#include +#include +#include + +#ifdef __WXDEBUG__ +// Debug messages verbosity level +// #define CACHED_CONTAINER_TEST 2 +#endif + +namespace KiGfx +{ +class VERTEX_ITEM; +class SHADER; + +class CACHED_CONTAINER : public VERTEX_CONTAINER +{ +public: + CACHED_CONTAINER( unsigned int aSize = defaultInitSize ); + + ///< @copydoc VERTEX_CONTAINER::SetItem() + virtual void SetItem( VERTEX_ITEM* aItem ); + + ///< @copydoc VERTEX_CONTAINER::Allocate() + virtual VERTEX* Allocate( unsigned int aSize ); + + ///< @copydoc VERTEX_CONTAINER::Erase() + virtual void Erase(); + + ///< @copydoc VERTEX_CONTAINER::Clear() + virtual void Clear(); + + /** + * Function GetVertices() + * returns the vertices stored by the specific item. + * + * @param aItem is the item. + */ + virtual VERTEX* GetVertices( const VERTEX_ITEM* aItem ) const; + +protected: + ///< Maps size of free memory chunks to their offsets + typedef std::pair Chunk; + typedef std::multimap FreeChunkMap; + + /// List of all the stored items + typedef std::set Items; + + ///< Stores size & offset of free chunks. + FreeChunkMap m_freeChunks; + + ///< Stored VERTEX_ITEMs + Items m_items; + + ///< Currently modified item + VERTEX_ITEM* m_item; + + ///< Properties of currently modified chunk & item + unsigned int m_chunkSize; + unsigned int m_chunkOffset; + unsigned int m_itemSize; + + /** + * Function reallocate() + * resizes the chunk that stores the current item to the given size. + * + * @param aSize is the number of vertices to be stored. + * @return offset of the new chunk. + */ + virtual unsigned int reallocate( unsigned int aSize ); + + /** + * Function defragment() + * removes empty spaces between chunks, so after that there is a long continous space + * for storing vertices at the and of the container. + * + * @param aTarget is the already allocated destination for defragmented data. It has to be + * at least of the same size as the current container. If left NULL, it will be allocated + * inside the defragment() function. + * @return false in case of failure (eg. memory shortage) + */ + virtual bool defragment( VERTEX* aTarget = NULL ); + + /** + * Function mergeFreeChunks() + * looks for consecutive free memory chunks and merges them, decreasing fragmentation of + * memory. + */ + virtual void mergeFreeChunks(); + + /** + * Function resizeContainer() + * + * prepares a bigger container of a given size. + * @param aNewSize is the new size of container, expressed in vertices + * @return false in case of failure (eg. memory shortage) + */ + virtual bool resizeContainer( unsigned int aNewSize ); + + /** + * Function freeItem() + * frees the space occupied by the item and returns it to the free space pool. + * + * @param aItem is the item to be freed. + */ + virtual void freeItem( VERTEX_ITEM* aItem ); + + /** + * Function getPowerOf2() + * returns the nearest power of 2, bigger than aNumber. + * + * @param aNumber is the number for which we look for a bigger power of 2. + */ + unsigned int getPowerOf2( unsigned int aNumber ) const; + +private: + /** + * Function getChunkSize() + * returns size of the given chunk. + * + * @param aChunk is the chunk. + */ + inline int getChunkSize( const Chunk& aChunk ) const + { + return aChunk.first; + } + + /** + * Function getChunkOffset() + * returns offset of the chunk. + * + * @param aChunk is the chunk. + */ + inline unsigned int getChunkOffset( const Chunk& aChunk ) const + { + return aChunk.second; + } + + /// Debug & test functions +#ifdef CACHED_CONTAINER_TEST + void showFreeChunks(); + void showReservedChunks(); + void test(); +#else + inline void showFreeChunks() {} + inline void showReservedChunks() {} + inline void test() {} +#endif /* CACHED_CONTAINER_TEST */ +}; +} // namespace KiGfx + +#endif /* CACHED_CONTAINER_H_ */ diff --git a/include/gal/opengl/gpu_manager.h b/include/gal/opengl/gpu_manager.h new file mode 100644 index 0000000000..5b7e6e62ba --- /dev/null +++ b/include/gal/opengl/gpu_manager.h @@ -0,0 +1,164 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file gpu_manager.h + * @brief Class to handle uploading vertices and indices to GPU in drawing purposes. + */ + +#ifndef GPU_MANAGER_H_ +#define GPU_MANAGER_H_ + +#include +#include + +namespace KiGfx +{ +class SHADER; +class VERTEX_CONTAINER; +class CACHED_CONTAINER; +class NONCACHED_CONTAINER; + +class GPU_MANAGER +{ +public: + static GPU_MANAGER* MakeManager( VERTEX_CONTAINER* aContainer ); + + virtual ~GPU_MANAGER(); + + // TODO docs + /** + * @brief Initializes everything needed to use vertex buffer objects (should be called when + * there is an OpenGL context available). + */ + virtual void Initialize() = 0; + + /** + * Function BeginDrawing() + * Prepares the stored data to be drawn. + */ + virtual void BeginDrawing() = 0; + + /** + * Function DrawIndices() + * Makes the GPU draw given range of vertices. + * @param aOffset is the beginning of the range. + * @param aSize is the number of vertices to be drawn. + */ + virtual void DrawIndices( unsigned int aOffset, unsigned int aSize ) = 0; + + /** + * Function DrawIndices() + * Makes the GPU draw all the vertices stored in the container. + */ + virtual void DrawAll() = 0; + + /** + * Function EndDrawing() + * Clears the container after drawing routines. + */ + virtual void EndDrawing() = 0; + + /** + * Function SetShader() + * Allows using shaders with the stored data. + * @param aShader is the object that allows using shaders. + */ + virtual void SetShader( SHADER& aShader ); + +protected: + GPU_MANAGER( VERTEX_CONTAINER* aContainer ); + + ///< Drawing status flag. + bool m_isDrawing; + + ///< Container that stores vertices data. + VERTEX_CONTAINER* m_container; + + ///< Shader handling + SHADER* m_shader; + int m_shaderAttrib; ///< Location of shader attributes (for glVertexAttribPointer) +}; + + +class GPU_CACHED_MANAGER : public GPU_MANAGER +{ +public: + GPU_CACHED_MANAGER( VERTEX_CONTAINER* aContainer ); + ~GPU_CACHED_MANAGER(); + + ///< @copydoc GPU_MANAGER::Initialize() + virtual void Initialize(); + + ///< @copydoc GPU_MANAGER::BeginDrawing() + virtual void BeginDrawing(); + + ///< @copydoc GPU_MANAGER::DrawIndices() + virtual void DrawIndices( unsigned int aOffset, unsigned int aSize ); + + ///< @copydoc GPU_MANAGER::DrawAll() + virtual void DrawAll(); + + ///< @copydoc GPU_MANAGER::EndDrawing() + virtual void EndDrawing(); + + /** + * Function uploadToGpu + * Rebuilds vertex buffer object using stored VERTEX_ITEMs and sends it to the graphics card + * memory. + */ + virtual void uploadToGpu(); + +protected: + bool m_buffersInitialized; + boost::scoped_array m_indices; + GLuint* m_indicesPtr; + GLuint m_verticesBuffer; + unsigned int m_indicesSize; + +}; + + +class GPU_NONCACHED_MANAGER : public GPU_MANAGER +{ +public: + GPU_NONCACHED_MANAGER( VERTEX_CONTAINER* aContainer ); + + ///< @copydoc GPU_MANAGER::Initialize() + virtual void Initialize(); + + ///< @copydoc GPU_MANAGER::BeginDrawing() + virtual void BeginDrawing(); + + ///< @copydoc GPU_MANAGER::DrawIndices() + virtual void DrawIndices( unsigned int aOffset, unsigned int aSize ); + + ///< @copydoc GPU_MANAGER::DrawAll() + virtual void DrawAll(); + + ///< @copydoc GPU_MANAGER::EndDrawing() + virtual void EndDrawing(); +}; +} // namespace KiGfx +#endif /* GPU_MANAGER_H_ */ diff --git a/include/gal/opengl/noncached_container.h b/include/gal/opengl/noncached_container.h new file mode 100644 index 0000000000..0ff2f20a27 --- /dev/null +++ b/include/gal/opengl/noncached_container.h @@ -0,0 +1,73 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file noncached_container.h + * @brief Class to store instances of VERTEX without caching. It allows a fast one-frame drawing + * and then clearing the buffer and starting from scratch. + */ + +#ifndef NONCACHED_CONTAINER_H_ +#define NONCACHED_CONTAINER_H_ + +#include + +namespace KiGfx +{ +class VERTEX_ITEM; +class SHADER; + +class NONCACHED_CONTAINER : public VERTEX_CONTAINER +{ +public: + NONCACHED_CONTAINER( unsigned int aSize = defaultInitSize ); + virtual ~NONCACHED_CONTAINER(); + + ///< @copydoc VERTEX_CONTAINER::SetItem() + virtual void SetItem( VERTEX_ITEM* aItem ); + + ///< @copydoc VERTEX_CONTAINER::Allocate() + virtual VERTEX* Allocate( unsigned int aSize ); + + ///< @copydoc VERTEX_CONTAINER::Erase() + virtual void Erase(); + + ///< @copydoc VERTEX_CONTAINER::Clear() + virtual void Clear(); + + ///< @copydoc VERTEX_CONTAINER::GetSize() + virtual inline unsigned int GetSize() const + { + // As the m_freePtr points to the first free space, we can safely assume + // that this is the number of vertices stored inside + return m_freePtr; + } + +protected: + ///< Index of the free first space where a vertex can be stored + unsigned int m_freePtr; +}; +} // namespace KiGfx + +#endif /* NONCACHED_CONTAINER_H_ */ diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 235c8082fb..9338b44187 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -31,25 +31,21 @@ // GAL imports #include -#include - -// OpenGL mathematics library -#define GLM_FORCE_RADIANS -#include - -#include #include +#include +#include +#include -// wxWidgets imports #include #include -// STL imports #include #include #include #include -#include +#include +#include +#include #include #include @@ -312,7 +308,7 @@ public: ///< Parameters passed to the GLU tesselator typedef struct { - VBO_ITEM* vboItem; ///< VBO_ITEM for storing new vertices + VERTEX_MANAGER* vboManager; ///< VERTEX_ITEM for storing new vertices std::vector& intersectPoints; ///< Intersect points, that have to be freed } TessParams; @@ -325,11 +321,6 @@ private: static const int CIRCLE_POINTS = 64; ///< The number of points for circle approximation static const int CURVE_POINTS = 32; ///< The number of points for curve approximation - static const double MITER_LIMIT = 1.5; ///< Limit for mitered edges ( * lineWidth ) - - /// This factor is used to for correct merging of antialiased edges, - /// a very small value is required - static const double DEPTH_ADJUST_FACTOR = ( 1.0 / (1 << 23) ); wxClientDC* clientDC; ///< Drawing context wxGLContext* glContext; ///< OpenGL context of wxWidgets @@ -338,43 +329,22 @@ private: wxEvtHandler* paintListener; // VBO buffered vertices for faster circle & semicircle drawing - VBO_CONTAINER precomputedContainer; ///< Container for storing display lists - VBO_ITEM verticesCircle; ///< Buffer for circle & semicircle vertices + NONCACHED_CONTAINER circleContainer; ///< Container for storing circle vertices // Vertex buffer objects related fields - typedef boost::unordered_map GroupsMap; + typedef std::map< unsigned int, boost::shared_ptr > GroupsMap; GroupsMap groups; ///< Stores informations about VBO objects (groups) unsigned int groupCounter; ///< Counter used for generating keys for groups - VBO_ITEM* currentItem; ///< Currently used VBO_ITEM (for grouping) - VBO_CONTAINER* currentContainer; ///< Currently used VBO_CONTAINER (for storing VBO_ITEMs) - VBO_CONTAINER cachedVbo; ///< Container for storing VBO_ITEMs - GLuint cachedVerts; ///< Currently used vertices VBO handle - GLuint cachedInds; ///< Currently used indices VBO handle - bool vboNeedsUpdate; ///< Flag indicating if VBO should be rebuilt - VBO_CONTAINER nonCachedVbo; ///< Container for storing non-cached VBO_ITEMs - VBO_ITEM* nonCachedItem; ///< Item that is gathering non-cached vertices - - glm::mat4 transform; ///< Current transformation matrix - std::stack transformStack; ///< Stack of transformation matrices - int indicesSize; ///< Number of indices to be drawn - GLuint* indicesPtr; ///< Pointer to mapped GPU memory + VERTEX_MANAGER* currentManager; ///< Currently used VERTEX_MANAGER (for storing VERTEX_ITEMs) + VERTEX_MANAGER cachedManager; ///< Container for storing cached VERTEX_ITEMs + VERTEX_MANAGER nonCachedManager; ///< Container for storing non-cached VERTEX_ITEMs // Polygon tesselation - GLUtesselator* tesselator; ///< Pointer to the tesselator + GLUtesselator* tesselator; ///< Pointer to the tesselator std::vector tessIntersects; ///< Storage of intersecting points // Shader - // Possible types of shaders - typedef enum - { - SHADER_NONE = 0, - SHADER_LINE, - SHADER_FILLED_CIRCLE, - SHADER_STROKED_CIRCLE, - } SHADER_TYPE; - SHADER shader; ///< There is only one shader used for different objects - int shaderAttrib; ///< Location of shader attributes (for glVertexAttribPointer) // Cursor int cursorSize; ///< Size of the cursor in pixels @@ -394,7 +364,6 @@ private: // Internal flags bool isGlewInitialized; ///< Is GLEW initialized? bool isFrameBufferInitialized; ///< Are the frame buffers initialized? - bool isVboInitialized; bool isShaderInitialized; ///< Was the shader initialized? bool isUseShader; ///< Should the shaders be used? bool isGrouping; ///< Was a group started? @@ -430,8 +399,8 @@ private: */ void drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ); - /// Compute the points of an unit circle & semicircle and store them in VBO. - void computeCircleVbo(); + /// Compute the points of the unit circle and store them in VBO. + void computeCircle(); // Event handling /** @@ -493,22 +462,6 @@ private: */ void deleteFrameBuffer( GLuint* aFrameBuffer, GLuint* aDepthBuffer, GLuint* aTexture ); - /** - * @brief Initializes everything needed to use vertex buffer objects. - */ - void initVertexBufferObjects(); - - /** - * @brief Deinitializes everything when vertex buffer objects are not used anymore. - */ - void deleteVertexBufferObjects(); - - /** - * @brief Rebuilds vertex buffer object using stored VBO_ITEMS and sends it to - * the graphics card memory. - */ - void rebuildVbo(); - /** * @brief Draw a quad for the line. * @@ -518,76 +471,11 @@ private: inline void drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); /** - * @brief Returns a valid key that can be used as a group number. + * @brief Returns a valid key that can be used as a new group number. * * @return An unique group number that is not used by any other group. */ - unsigned int getGroupNumber(); - - /** - * @brief Adds vertex to the current item or draws it in immediate mode. - * @param aX is X coordinate. - * @param aY is Y coordinate. - * @param aZ is Z coordinate. - */ - inline void vertex3( double aX, double aY, double aZ ) - { - // New vertex coordinates for VBO - const VBO_VERTEX vertex = { aX, aY, aZ }; - currentItem->PushVertex( &vertex ); - } - - /** - * @brief Function that replaces glTranslate. It modifies transformation matrix. - * - * @param aX is translation in X axis direction. - * @param aY is translation in Y axis direction. - * @param aZ is translation in Z axis direction. - */ - inline void translate3( double aX, double aY, double aZ ) - { - transform = glm::translate( transform, glm::vec3( aX, aY, aZ ) ); - } - - /** - * @brief Function that replaces glColor. It modifies color used by current VBO_ITEM. - * - * @param aR is red component. - * @param aG is green component. - * @param aB is blue component. - * @param aA is alpha component. - */ - inline void color4( double aRed, double aGreen, double aBlue, double aAlpha ) - { - currentContainer->UseColor( aRed, aGreen, aBlue, aAlpha ); - } - - /** - * @brief Function that replaces glColor. It modifies color used by current VBO_ITEM. - * - * @param aColor is the new color. - */ - inline void color4( const COLOR4D& aColor ) - { - currentContainer->UseColor( aColor ); - } - - /** - * @brief Function that sets shader and its parameters for the currently used VBO_ITEM. - * It should be used before adding any vertices that have to be shaded. - * @param aShader is the type of shader used for vertices. - * @param aParam[1..3] are shader's parameters. Their meaning depends on the type of used shader. - * For more information you may check shaders' source code. - */ - inline void setShader( SHADER_TYPE aShader, GLfloat aParam1 = 0.0f, - GLfloat aParam2 = 0.0f, GLfloat aParam3 = 0.0f ) - { - if( isUseShader ) - { - const GLfloat shader[] = { aShader, aParam1, aParam2, aParam3 }; - currentContainer->UseShader( shader ); - } - } + unsigned int getNewGroupNumber(); }; } // namespace KiGfx diff --git a/include/gal/opengl/vbo_container.h b/include/gal/opengl/vbo_container.h deleted file mode 100644 index cb48204fc7..0000000000 --- a/include/gal/opengl/vbo_container.h +++ /dev/null @@ -1,344 +0,0 @@ -/* - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2013 CERN - * @author Maciej Suminski - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, you may find one here: - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * or you may search the http://www.gnu.org website for the version 2 license, - * or you may write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -/** - * @file vbo_container.h - * @brief Class to store VBO_ITEMs. - */ - -#ifndef VBO_CONTAINER_H_ -#define VBO_CONTAINER_H_ - -#include -#include -#include -#include -#include -#include - -namespace KiGfx -{ -class VBO_ITEM; -typedef struct VBO_VERTEX VBO_VERTEX; - -class VBO_CONTAINER -{ -public: - VBO_CONTAINER( unsigned int aSize = defaultInitSize ); - virtual ~VBO_CONTAINER(); - - ///< Maps size of free memory chunks to their offsets - typedef std::pair Chunk; - typedef std::multimap FreeChunkMap; - - /// List of all the stored items - typedef std::set Items; - - /** - * Function StartItem() - * Sets an item to start its modifications. After calling the function it is possible to add - * vertices using function Add(). - * @param aItem is the item that is going to store vertices in the container. - */ - void StartItem( VBO_ITEM* aItem ); - - /** - * Function EndItem() - * Marks current item as finished and returns unused memory to the pool. StartItem() function - * has to be called first. - */ - void EndItem(); - - /** - * Function Add() - * Stores given number of vertices in the container for the specific VBO_ITEM (started by - * StartItem() function). - * @param aItem is the owner of the vertices. - * @param aVertex are vertices data to be stored. - * @param aSize is the number of vertices to be added. - */ - void Add( const VBO_VERTEX* aVertex, unsigned int aSize = 1 ); - - /** - * Function Free() - * Frees the chunk reserved by the aItem. - * @param aItem is the owner of the chunk to be freed. - */ - void Free( VBO_ITEM* aItem ); - - /** - * Function Clear() - * Removes all the data stored in the container. - */ - void Clear(); - - /** - * Function GetAllVertices() - * Returns all vertices stored in the container. It is especially useful for transferring - * data to the GPU memory. - */ - VBO_VERTEX* GetAllVertices() const; - - /** - * Function GetVertices() - * Returns vertices stored by the specific item. - * @aItem is the specific item. - */ - VBO_VERTEX* GetVertices( const VBO_ITEM* aItem ) const; - - /** - * Function GetVertices() - * Returns vertices stored at the specific offset. - * @aOffset is the specific offset. - */ - inline VBO_VERTEX* GetVertices( unsigned int aOffset ) const - { - return &m_vertices[aOffset]; - } - - /** - * Function GetSize() - * Returns amount of vertices currently stored in the container. - */ - inline int GetSize() const - { - return m_currentSize; - } - - /** - * Function SetTransformMatrix() - * Sets transformation matrix for vertices that are added to VBO_ITEM. If you do not want to - * transform vertices at all, pass NULL as the argument. - * @param aMatrix is the new transform matrix or NULL if you do not want to use transformation - * matrix. - */ - inline void SetTransformMatrix( const glm::mat4* aMatrix ) - { - m_transform = aMatrix; - } - - /** - * Function UseColor() - * Sets color used for all added vertices. - * @param aColor is the color used for added vertices. - */ - inline void UseColor( const COLOR4D& aColor ) - { - m_color[0] = aColor.r * 255; - m_color[1] = aColor.g * 255; - m_color[2] = aColor.b * 255; - m_color[3] = aColor.a * 255; - } - - /** - * Function UseColor() - * Sets color used for all added vertices. - * @param aColor is the color used for added vertices. - */ - inline void UseColor( const GLfloat aColor[VBO_ITEM::ColorStride] ) - { - for( unsigned int i = 0; i < VBO_ITEM::ColorStride; ++i ) - { - m_color[i] = aColor[i] * 255; - } - } - - /** - * Function UseColor() - * Sets color used for all added vertices. - * @param aR is the red component of the color. - * @param aG is the green component of the color. - * @param aB is the blue component of the color. - * @param aA is the alpha component of the color. - */ - inline void UseColor( GLfloat aR, GLfloat aG, GLfloat aB, GLfloat aA ) - { - m_color[0] = aR * 255; - m_color[1] = aG * 255; - m_color[2] = aB * 255; - m_color[3] = aA * 255; - } - - /** - * Function UseShader() - * Sets shader and its parameters used for all added vertices. - * @param aShader is the array that contains shader number followed by its parameters. - */ - inline void UseShader( const GLfloat aShader[VBO_ITEM::ShaderStride] ) - { - for( unsigned int i = 0; i < VBO_ITEM::ShaderStride; ++i ) - { - m_shader[i] = aShader[i]; - } - } - -private: - ///< Stores size & offset of free chunks. - FreeChunkMap m_freeChunks; - ///< Stored VERTEX_ITEMs - Items m_items; - - /** - * Function allocate() - * Allocates the given amount of memory for the current VBO_ITEM (set by StartItem() function). - * @param aSize is the number of vertices that are requested to be allocated. - * @return Pointer to the allocated space. - */ - VBO_VERTEX* allocate( unsigned int aSize ); - - /** - * Function reallocate() - * Resizes the chunk that stores the current item to the given size. - * @param aSize is the number of vertices to be stored. - * @return Offset of the new chunk. - */ - unsigned int reallocate( unsigned int aSize ); - - /** - * Function getChunkSize() - * Returns size of the given chunk. - * @param aChunk is the chunk. - * @return Size of the chunk. - */ - inline unsigned int getChunkSize( const Chunk& aChunk ) const - { - return aChunk.first; - } - - /** - * Function getChunkOffset() - * Returns offset of the given chunk. - * @param aChunk is the chunk. - * @return Offset of the chunk. - */ - inline unsigned int getChunkOffset( const Chunk& aChunk ) const - { - return aChunk.second; - } - - /** - * Function setChunkOffset() - * Updates offset of the given chunk. - * !! IMPORTANT: it does not reallocate the chunk, it just changes its properties. - * @param aChunk is the chunk. - */ - inline void setChunkOffset( Chunk& aChunk, unsigned int aOffset ) const - { - aChunk.second = aOffset; - } - - /** - * Function defragment() - * Removes empty spaces between chunks, so after that there is a long continous space - * for storing vertices at the and of the container. - * @return false in case of failure (eg. memory shortage). - */ - bool defragment( VBO_VERTEX* aTarget = NULL ); - - /** - * Function mergeFreeChunks() - * Looks for consecutive free memory chunks and merges them, decreasing fragmentation of - * memory. - */ - void mergeFreeChunks(); - - /** - * Function resizeContainer() - * Prepares a bigger container of a given size. - * @param aNewSize is the new size of container, expressed in vertices - * @return false in case of failure (eg. memory shortage). - */ - bool resizeContainer( unsigned int aNewSize ); - - /** - * Function freeItem() - * Frees the space occupied by the item and returns it to the free space pool. - * @param aItem is the item to be freed. - */ - void freeItem( VBO_ITEM* aItem ); - - /** - * Function reservedSpace() - * Returns size of the reserved memory space. - * @return Size of the reserved memory space (expressed as a number of vertices). - */ - unsigned int reservedSpace() - { - return m_currentSize - m_freeSpace; - } - - ///< How many vertices we can store in the container - unsigned int m_freeSpace; - - ///< How big is the current container, expressed in vertices - unsigned int m_currentSize; - - ///< Actual storage memory - VBO_VERTEX* m_vertices; - - ///< Initial size, used on clearing the container - unsigned int m_initialSize; - - ///< Variables holding the state of the item currently being modified - unsigned int m_itemSize; - unsigned int m_chunkSize; - unsigned int m_chunkOffset; - VBO_ITEM* m_item; - - ///< Color used for the new vertices pushed. - GLubyte m_color[VBO_ITEM::ColorStride]; - - ///< Shader and its parameters used for new vertices pushed - GLfloat m_shader[VBO_ITEM::ShaderStride]; - - ///< Current transform matrix applied for every new vertex pushed. - const glm::mat4* m_transform; - - ///< Failure flag - bool m_failed; - - /** - * Function getPowerOf2() - * Returns the nearest power of 2, bigger than aNumber. - * @param aNumber is the number for which we look for a bigger power of 2. - */ - unsigned int getPowerOf2( unsigned int aNumber ) const - { - unsigned int power = 1; - - while( power < aNumber && power ) - power <<= 1; - - return power; - } - - ///< Default initial size of a container (expressed in vertices) - static const unsigned int defaultInitSize = 1048576; - - ///< Basic tests for the container, use only for debugging. - void test() const; -}; -} // namespace KiGfx - -#endif /* VBO_CONTAINER_H_ */ diff --git a/include/gal/opengl/vbo_item.h b/include/gal/opengl/vbo_item.h deleted file mode 100644 index e30f92d8ec..0000000000 --- a/include/gal/opengl/vbo_item.h +++ /dev/null @@ -1,177 +0,0 @@ -/* - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2013 CERN - * @author Maciej Suminski - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, you may find one here: - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * or you may search the http://www.gnu.org website for the version 2 license, - * or you may write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -/** - * @file vbo_item.h - * @brief Class to handle an item held in a Vertex Buffer Object. - */ - -#ifndef VBO_ITEM_H_ -#define VBO_ITEM_H_ - -#include -#include -#include - -namespace KiGfx -{ -typedef struct VBO_VERTEX -{ - GLfloat x, y, z; // Coordinates - GLubyte r, g, b, a; // Color - GLfloat shader[4]; // Shader type & params -} VBO_VERTEX; - -class VBO_CONTAINER; - -class VBO_ITEM -{ -friend class VBO_CONTAINER; - -public: - VBO_ITEM( VBO_CONTAINER* aContainer ); - ~VBO_ITEM(); - - /** - * Function PushVertex() - * Adds a single vertex to the VBO_ITEM. Vertex contains information about coordinates and - * colors and has to follow the specified format {X,Y,Z,R,G,B,A}. - * @param aVertex is a vertex to be added. - * @param aShader is an attribute for shader. - */ - void PushVertex( const VBO_VERTEX* aVertex ); - - /** - * Function PushVertices() - * Adds multiple vertices to the VBO_ITEM. This function is recommended over multiple calls to - * PushVertex, as it does less memory reallocations. Vertices contain information about - * coordinates and colors and has to follow the specified format {X,Y,Z,R,G,B,A}. - * @param aVertices are vertices to be added. - * @param aSize is an amount of vertices to be added. - * @param aShader is an attribute for shader. - */ - void PushVertices( const VBO_VERTEX* aVertices, GLuint aSize ); - - /** - * Function GetVertices() - * Returns a pointer to the array containing all vertices. - * @return Pointer to vertices packed in format {X, Y, Z, R, G, B, A}. - */ - VBO_VERTEX* GetVertices(); - - - /** - * Function GetSize() - * Returns information about number of vertices stored. - * @param Amount of vertices. - */ - inline unsigned int GetSize() const - { - return m_size; - } - - /** - * Function GetOffset() - * Returns data offset in the VBO. - * @return Data offset expressed as a number of vertices. - */ - inline unsigned int GetOffset() const - { - return m_offset; - } - - /** - * Function ChangeColor() - * Colors all vertices to the specified color. - * @param aColor is the new color for vertices. - */ - void ChangeColor( const COLOR4D& aColor ); - - /** - * Function ChangeDepth() - * Moves all vertices to the specified depth. - * @param aDepth is the new depth for vertices. - */ - void ChangeDepth( int aDepth ); - - ///< Informs the container that there will be no more vertices for the current VBO_ITEM - void Finish(); - - ///< Data structure for vertices {X,Y,Z,R,G,B,A,shader¶m} (@see VBO_VERTEX). - static const unsigned int VertByteSize = sizeof(VBO_VERTEX); - static const unsigned int VertStride = VertByteSize / sizeof(GLfloat); - - static const unsigned int CoordByteSize = sizeof(VBO_VERTEX().x) + sizeof(VBO_VERTEX().y) + - sizeof(VBO_VERTEX().z); - static const unsigned int CoordStride = CoordByteSize / sizeof(GLfloat); - - // Offset of color data from the beginning of each vertex data - static const unsigned int ColorByteOffset = offsetof(VBO_VERTEX, r); - static const unsigned int ColorOffset = ColorByteOffset / sizeof(GLubyte); - static const unsigned int ColorByteSize = sizeof(VBO_VERTEX().r) + sizeof(VBO_VERTEX().g) + - sizeof(VBO_VERTEX().b) + sizeof(VBO_VERTEX().a); - static const unsigned int ColorStride = ColorByteSize / sizeof(GLubyte); - - // Shader attributes - static const unsigned int ShaderByteOffset = offsetof(VBO_VERTEX, shader); - static const unsigned int ShaderOffset = ShaderByteOffset / sizeof(GLfloat); - static const unsigned int ShaderByteSize = sizeof(VBO_VERTEX().shader); - static const unsigned int ShaderStride = ShaderByteSize / sizeof(GLfloat); - - static const unsigned int IndByteSize = sizeof(GLuint); - -protected: - ///< Offset and size of data stored in the VBO_CONTAINER. - unsigned int m_offset; - unsigned int m_size; - - ///< Storage for vertices. - VBO_CONTAINER* m_container; - - ///< Flag telling if the item should be recached in VBO or not. - bool m_isDirty; - - /** - * Function setSize() - * Sets data size in the VBO. - * @param aSize is the size expressed as a number of vertices. - */ - void setSize( unsigned int aSize ) - { - m_size = aSize; - } - - /** - * Function setOffset() - * Sets data offset in the VBO. - * @param aOffset is the offset expressed as a number of vertices. - */ - inline void setOffset( unsigned int aOffset ) - { - m_offset = aOffset; - } -}; -} // namespace KiGfx - -#endif /* VBO_ITEM_H_ */ diff --git a/include/gal/opengl/vertex_common.h b/include/gal/opengl/vertex_common.h new file mode 100644 index 0000000000..a718ef4ea8 --- /dev/null +++ b/include/gal/opengl/vertex_common.h @@ -0,0 +1,75 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file vertex_common.h + * @brief Common defines and consts used in vertex related classes. + */ + +#ifndef VERTEX_COMMON_H_ +#define VERTEX_COMMON_H_ + +#include + +namespace KiGfx +{ +// Possible types of shaders +enum SHADER_TYPE +{ + SHADER_NONE = 0, + SHADER_LINE, + SHADER_FILLED_CIRCLE, + SHADER_STROKED_CIRCLE, +}; + +typedef struct VERTEX +{ + GLfloat x, y, z; // Coordinates + GLubyte r, g, b, a; // Color + GLfloat shader[4]; // Shader type & params +} VERTEX; + +///< Data structure for vertices {X,Y,Z,R,G,B,A,shader¶m} (@see VERTEX). +const unsigned int VertexSize = sizeof(VERTEX); +const unsigned int VertexStride = VertexSize / sizeof(GLfloat); + +const unsigned int CoordSize = sizeof(VERTEX().x) + sizeof(VERTEX().y) + sizeof(VERTEX().z); +const unsigned int CoordStride = CoordSize / sizeof(GLfloat); + +// Offset of color data from the beginning of each vertex data +const unsigned int ColorOffset = offsetof(VERTEX, r); +const unsigned int ColorSize = sizeof(VERTEX().r) + sizeof(VERTEX().g) + + sizeof(VERTEX().b) + sizeof(VERTEX().a); +const unsigned int ColorStride = ColorSize / sizeof(GLubyte); + +// Shader attributes +const unsigned int ShaderOffset = offsetof(VERTEX, shader); +const unsigned int ShaderSize = sizeof(VERTEX().shader); +const unsigned int ShaderStride = ShaderSize / sizeof(GLfloat); + +const unsigned int IndexSize = sizeof(GLuint); + +} // namespace KiGfx + +#endif /* VERTEX_COMMON_H_ */ diff --git a/include/gal/opengl/vertex_container.h b/include/gal/opengl/vertex_container.h new file mode 100644 index 0000000000..1714040022 --- /dev/null +++ b/include/gal/opengl/vertex_container.h @@ -0,0 +1,158 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file vertex_container.h + * @brief Class to store vertices and handle transfers between system memory and GPU memory. + */ + +#ifndef VERTEX_CONTAINER_H_ +#define VERTEX_CONTAINER_H_ + +#include + +namespace KiGfx +{ +class VERTEX; +class VERTEX_ITEM; +class SHADER; + +class VERTEX_CONTAINER +{ +public: + /** + * Function MakeContainer() + * Returns a pointer to a new container of an appropriate type. + */ + static VERTEX_CONTAINER* MakeContainer( bool aCached ); + virtual ~VERTEX_CONTAINER(); + + /** + * Function SetItem() + * sets the item in order to modify or finishes its current modifications. + * @param aItem is the item or NULL in case of finishing the item. + */ + virtual void SetItem( VERTEX_ITEM* aItem ) = 0; + + /** + * Function Allocate() + * returns allocated space (possibly resizing the reserved memory chunk or allocating a new + * chunk if it was not stored before) for the given number of vertices associated with the + * current item (set by SetItem()). The newly allocated space is added at the end of the chunk + * used by the current item and may serve to store new vertices. + * @param aSize is the number of vertices to be allocated. + * @return Pointer to the allocated space or NULL in case of failure. + */ + virtual VERTEX* Allocate( unsigned int aSize ) = 0; + + /** + * Function Erase() + * erases all vertices associated with the current item (set by SetItem()). + */ + virtual void Erase() = 0; + + /** + * Function Clear() + * removes all the data stored in the container and restores its original state. + */ + virtual void Clear() = 0; + + /** + * Function GetAllVertices() + * returns all the vertices stored in the container. It is especially useful for transferring + * data to the GPU memory. + */ + inline virtual VERTEX* GetAllVertices() const + { + return m_vertices; + } + + /** + * Function GetVertices() + * returns vertices stored at the specific offset. + * @aOffset is the offset. + */ + virtual inline VERTEX* GetVertices( unsigned int aOffset ) const + { + return &m_vertices[aOffset]; + } + + /** + * Function GetSize() + * returns amount of vertices currently stored in the container. + */ + virtual inline unsigned int GetSize() const + { + return m_currentSize; + } + + /** + * Function IsDirty() + * returns information about container cache state. Clears the flag after calling the function. + * @return true in case the vertices have to be reuploaded. + */ + inline bool isDirty() + { + bool state = m_dirty; + + m_dirty = false; + + return state; + } + +protected: + VERTEX_CONTAINER( unsigned int aSize = defaultInitSize ); + + ///< How many vertices we can store in the container + unsigned int m_freeSpace; + + ///< How big is the current container, expressed in vertices + unsigned int m_currentSize; + + ///< Store the initial size, so it can be resized to this on Clear() + unsigned int m_initialSize; + + ///< Actual storage memory (should be handled using malloc/realloc/free to speed up resizing) + VERTEX* m_vertices; + + ///< State flags + bool m_failed; + bool m_dirty; + + /** + * Function reservedSpace() + * returns size of the reserved memory space. + * @return Size of the reserved memory space (expressed as a number of vertices). + */ + unsigned int reservedSpace() + { + return m_currentSize - m_freeSpace; + } + + ///< Default initial size of a container (expressed in vertices) + static const unsigned int defaultInitSize = 1048576; +}; +} // namespace KiGfx + +#endif /* VERTEX_CONTAINER_H_ */ diff --git a/include/gal/opengl/vertex_item.h b/include/gal/opengl/vertex_item.h new file mode 100644 index 0000000000..4dd6b084f2 --- /dev/null +++ b/include/gal/opengl/vertex_item.h @@ -0,0 +1,103 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file vertex_item.h + * @brief Class to handle an item held in a container. + */ + +#ifndef VERTEX_ITEM_H_ +#define VERTEX_ITEM_H_ + +#include +#include +#include + +namespace KiGfx +{ +class VERTEX_MANAGER; + +class VERTEX_ITEM +{ +public: + friend class CACHED_CONTAINER; + friend class VERTEX_MANAGER; + + VERTEX_ITEM( const VERTEX_MANAGER& aManager ); + virtual ~VERTEX_ITEM(); + + /** + * Function GetSize() + * Returns information about number of vertices stored. + * @param Number of vertices. + */ + inline unsigned int GetSize() const + { + return m_size; + } + + /** + * Function GetOffset() + * Returns data offset in the container. + * @return Data offset expressed as a number of vertices. + */ + inline unsigned int GetOffset() const + { + return m_offset; + } + + /** + * Function GetVertices() + * Returns pointer to the data used by the VERTEX_ITEM. + */ + VERTEX* GetVertices() const; + +private: + const VERTEX_MANAGER& m_manager; + unsigned int m_offset; + unsigned int m_size; + + /** + * Function SetOffset() + * Sets data offset in the container. + * @param aOffset is the offset expressed as a number of vertices. + */ + inline void setOffset( unsigned int aOffset ) + { + m_offset = aOffset; + } + + /** + * Function SetSize() + * Sets data size in the container. + * @param aSize is the size expressed as a number of vertices. + */ + inline void setSize( unsigned int aSize ) + { + m_size = aSize; + } +}; +} // namespace KiGfx + +#endif /* VERTEX_ITEM_H_ */ diff --git a/include/gal/opengl/vertex_manager.h b/include/gal/opengl/vertex_manager.h new file mode 100644 index 0000000000..bacb99867e --- /dev/null +++ b/include/gal/opengl/vertex_manager.h @@ -0,0 +1,341 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file vertex_manager.h + * @brief Class to control vertex container and GPU with possibility of emulating old-style OpenGL + * 1.0 state machine using modern OpenGL methods. + */ + +#ifndef VERTEX_MANAGER_H_ +#define VERTEX_MANAGER_H_ + +#define GLM_FORCE_RADIANS +#include +#include +#include +#include +#include +#include +#include + +namespace KiGfx +{ +class SHADER; +class VERTEX_ITEM; +class VERTEX_CONTAINER; +class GPU_MANAGER; + +class VERTEX_MANAGER +{ +public: + /** + * @brief Constructor. + * + * @param aCached says if vertices should be cached in GPU or system memory. For data that + * does not change every frame, it is better to store vertices in GPU memory. + */ + VERTEX_MANAGER( bool aCached ); + + /** + * Function Vertex() + * adds a vertex with the given coordinates to the currently set item. Color & shader + * parameters stored in aVertex are ignored, instead color & shader set by Color() and + * Shader() functions are used. Vertex coordinates will have the current transformation + * matrix applied. + * + * @param aVertex contains vertex coordinates. + */ + inline void Vertex( const VERTEX& aVertex ) const + { + Vertex( aVertex.x, aVertex.y, aVertex.z ); + } + + /** + * Function Vertex() + * adds a vertex with the given coordinates to the currently set item. Vertex coordinates will + * have the current transformation matrix applied. + * + * @param aX is the X coordinate of the new vertex. + * @param aY is the Y coordinate of the new vertex. + * @param aZ is the Z coordinate of the new vertex. + */ + void Vertex( GLfloat aX, GLfloat aY, GLfloat aZ ) const; + + /** + * Function Vertices() + * adds one or more vertices to the currently set item. It takes advantage of allocating memory + * in advance, so should be faster than adding vertices one by one. Color & shader + * parameters stored in aVertices are ignored, instead color & shader set by Color() and + * Shader() functions are used. All the vertex coordinates will have the current + * transformation matrix applied. + * + * @param aVertices contains vertices to be added + * @param aSize is the number of vertices to be added. + */ + void Vertices( const VERTEX aVertices[], unsigned int aSize ) const; + + /** + * Function Color() + * changes currently used color that will be applied to newly added vertices. + * + * @param aColor is the new color. + */ + inline void Color( const COLOR4D& aColor ) + { + m_color[0] = aColor.r * 255.0; + m_color[1] = aColor.g * 255.0; + m_color[2] = aColor.b * 255.0; + m_color[3] = aColor.a * 255.0; + } + + /** + * Function Color() + * changes currently used color that will be applied to newly added vertices. It is the + * equivalent of glColor4f() function. + * @param aRed is the red component of the new color. + * @param aGreen is the green component of the new color. + * @param aBlue is the blue component of the new color. + * @param aAlpha is the alpha component of the new color. + */ + inline void Color( GLfloat aRed, GLfloat aGreen, GLfloat aBlue, GLfloat aAlpha ) + { + m_color[0] = aRed * 255.0; + m_color[1] = aGreen * 255.0; + m_color[2] = aBlue * 255.0; + m_color[3] = aAlpha * 255.0; + } + + /** + * Function Shader() + * changes currently used shader and its parameters that will be applied to newly added + * vertices. Parameters depend on shader, for more information have a look at shaders source + * code. + * @see SHADER_TYPE + * + * @param aShaderType is the a shader type to be applied. + * @param aParam1 is the optional parameter for a shader. + * @param aParam2 is the optional parameter for a shader. + * @param aParam3 is the optional parameter for a shader. + */ + inline void Shader( GLfloat aShaderType, GLfloat aParam1 = 0.0f, + GLfloat aParam2 = 0.0f, GLfloat aParam3 = 0.0f ) + { + m_shader[0] = aShaderType; + m_shader[1] = aParam1; + m_shader[2] = aParam2; + m_shader[3] = aParam3; + } + + /** + * Function Translate() + * multiplies the current matrix by a translation matrix, so newly vertices will be + * translated by the given vector. It is the equivalent of the glTranslatef() function. + * + * @param aX is the X coordinate of a translation vector. + * @param aY is the X coordinate of a translation vector. + * @param aZ is the X coordinate of a translation vector. + */ + inline void Translate( GLfloat aX, GLfloat aY, GLfloat aZ ) + { + m_transform = glm::translate( m_transform, glm::vec3( aX, aY, aZ ) ); + } + + /** + * Function Rotate() + * multiplies the current matrix by a rotation matrix, so the newly vertices will be + * rotated by the given angles. It is the equivalent of the glRotatef() function. + * + * @param aAngle is the angle of rotation, in radians. + * @param aX is a multiplier for the X axis + * @param aY is a multiplier for the Y axis + * @param aZ is a multiplier for the Z axis. + */ + inline void Rotate( GLfloat aAngle, GLfloat aX, GLfloat aY, GLfloat aZ ) + { + m_transform = glm::rotate( m_transform, aAngle, glm::vec3( aX, aY, aZ ) ); + } + + /** + * Function Scale() + * multiplies the current matrix by a scaling matrix, so the newly vertices will be + * scaled by the given factors. It is the equivalent of the glScalef() function. + * + * @param aX is the X axis scaling factor. + * @param aY is the Y axis scaling factor. + * @param aZ is the Z axis scaling factor. + */ + inline void Scale( GLfloat aX, GLfloat aY, GLfloat aZ ) + { + m_transform = glm::scale( m_transform, glm::vec3( aX, aY, aZ ) ); + } + + /** + * Function PushMatrix() + * pushes the current transformation matrix stack. It is the equivalent of the glPushMatrix() + * function. + */ + inline void PushMatrix() + { + m_transformStack.push( m_transform ); + + // Every transformation starts with PushMatrix + m_noTransform = false; + } + + /** + * Function PopMatrix() + * pops the current transformation matrix stack. It is the equivalent of the glPopMatrix() + * function. + */ + void PopMatrix() + { + wxASSERT( !m_transformStack.empty() ); + + m_transform = m_transformStack.top(); + m_transformStack.pop(); + + if( m_transformStack.empty() ) + { + // We return back to the identity matrix, thus no vertex transformation is needed + m_noTransform = true; + } + } + + /** + * Function SetItem() + * sets an item to start its modifications. After calling the function it is possible to add + * vertices using function Add(). + * + * @param aItem is the item that is going to store vertices in the container. + */ + void SetItem( VERTEX_ITEM& aItem ) const; + + /** + * Function FreeItem() + * frees the memory occupied by the item, so it is no longer stored in the container. + * + * @param aItem is the item to be freed + */ + void FreeItem( VERTEX_ITEM& aItem ) const; + + /** + * Function ChangeItemColor() + * changes the color of all vertices owned by an item. + * + * @param aItem is the item to change. + * @param aColor is the new color to be applied. + */ + void ChangeItemColor( const VERTEX_ITEM& aItem, const COLOR4D& aColor ) const; + + /** + * Function ChangeItemDepth() + * changes the depth of all vertices owned by an item. + * + * @param aItem is the item to change. + * @param aDepth is the new color to be applied. + */ + void ChangeItemDepth( const VERTEX_ITEM& aItem, GLfloat aDepth ) const; + + /** + * Function GetVertices() + * returns a pointer to the vertices owned by an item. + * + * @param aItem is the owner of vertices that are going to be returned. + * @return Pointer to the vertices or NULL if the item is not stored at the container. + */ + VERTEX* GetVertices( const VERTEX_ITEM& aItem ) const; + + const glm::mat4& GetTransformation() const + { + return m_transform; + } + + /** + * Function SetShader() + * sets a shader program that is going to be used during rendering. + * @param aShader is the object containing compiled and linked shader program. + */ + void SetShader( SHADER& aShader ) const; + + /** + * Function Clear() + * removes all the stored vertices from the container. + */ + void Clear() const; + + /** + * Function BeginDrawing() + * prepares buffers and items to start drawing. + */ + void BeginDrawing() const; + + /** + * Function DrawItem() + * draws an item to the buffer. + * + * @param aItem is the item to be drawn. + */ + void DrawItem( const VERTEX_ITEM& aItem ) const; + + /** + * Function EndDrawing() + * finishes drawing operations. + */ + void EndDrawing() const; + +protected: + /** + * Function putVertex() + * applies all transformation to the given coordinates and store them at the specified target. + * + * @param aTarget is the place where the new vertex is going to be stored (it has to be + * allocated first). + * @param aX is the X coordinate of the new vertex. + * @param aY is the Y coordinate of the new vertex. + * @param aZ is the Z coordinate of the new vertex. + */ + void putVertex( VERTEX& aTarget, GLfloat aX, GLfloat aY, GLfloat aZ ) const; + + /// Container for vertices, may be cached or noncached + boost::shared_ptr m_container; + /// GPU manager for data transfers and drawing operations + boost::shared_ptr m_gpu; + + /// State machine variables + /// True in case there is no need to transform vertices + bool m_noTransform; + /// Currently used transform matrix + glm::mat4 m_transform; + /// Stack of transformation matrices, used for Push/PopMatrix + std::stack m_transformStack; + /// Currently used color + GLubyte m_color[ColorStride]; + /// Currently used shader and its parameters + GLfloat m_shader[ShaderStride]; +}; + +} // namespace KiGfx + +#endif /* VERTEX_MANAGER_H_ */ From d6628419c9d7e77b709de5cdbe5d2fc01062f02c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 22 Jul 2013 13:14:53 +0200 Subject: [PATCH 173/415] Changed rendering order of cached & noncached layers. --- common/gal/opengl/opengl_gal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index a76611c974..19d50d2244 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -425,8 +425,8 @@ void OPENGL_GAL::blitMainTexture( bool aIsClearFrameBuffer ) void OPENGL_GAL::EndDrawing() { - cachedManager.EndDrawing(); nonCachedManager.EndDrawing(); + cachedManager.EndDrawing(); // Draw the remaining contents, blit the main texture to the screen, swap the buffers glFlush(); From e644f5be05f24d5c6de383b1f50bf17734a7ce10 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 23 Jul 2013 18:39:07 +0200 Subject: [PATCH 174/415] OpenGL multitarget rendering (compositing). --- common/CMakeLists.txt | 8 +- common/gal/cairo/cairo_gal.cpp | 6 + common/gal/graphics_abstraction_layer.cpp | 2 + common/gal/opengl/gpu_manager.cpp | 7 +- common/gal/opengl/opengl_compositor.cpp | 242 ++++++++++++++++++ common/gal/opengl/opengl_gal.cpp | 296 ++++++++-------------- common/view/view.cpp | 23 +- include/gal/cairo/cairo_gal.h | 3 + include/gal/compositor.h | 107 ++++++++ include/gal/definitions.h | 13 + include/gal/graphics_abstraction_layer.h | 14 +- include/gal/opengl/opengl_compositor.h | 101 ++++++++ include/gal/opengl/opengl_gal.h | 53 +--- include/gal/opengl/vertex_common.h | 2 +- include/gal/opengl/vertex_container.h | 1 - include/view/view.h | 16 +- pcbnew/basepcbframe.cpp | 2 +- 17 files changed, 635 insertions(+), 261 deletions(-) create mode 100644 common/gal/opengl/opengl_compositor.cpp create mode 100644 include/gal/compositor.h create mode 100644 include/gal/opengl/opengl_compositor.h diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index b6adf0d275..9e28a9fb3b 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -29,11 +29,15 @@ add_custom_target( ) set(GAL_SRCS + # Common part drawpanel_gal.cpp painter.cpp gal/graphics_abstraction_layer.cpp gal/stroke_font.cpp gal/color4d.cpp + view/wx_view_controls.cpp + + # OpenGL GAL gal/opengl/opengl_gal.cpp gal/opengl/shader.cpp gal/opengl/vertex_item.cpp @@ -42,8 +46,10 @@ set(GAL_SRCS gal/opengl/noncached_container.cpp gal/opengl/vertex_manager.cpp gal/opengl/gpu_manager.cpp + gal/opengl/opengl_compositor.cpp + + # Cairo GAL gal/cairo/cairo_gal.cpp - view/wx_view_controls.cpp ) add_library(gal STATIC ${GAL_SRCS}) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index ba944e842f..e6a2a59d82 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -280,6 +280,12 @@ void CAIRO_GAL::RestoreScreen() } +void CAIRO_GAL::SetTarget( RenderTarget aTarget ) +{ + wxASSERT_MSG( false, wxT( "Not implemented yet" ) ); +} + + void CAIRO_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { cairo_move_to( cairoImage, aStartPoint.x, aStartPoint.y ); diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index 93ce880bf7..88855fa5c6 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -62,6 +62,8 @@ void GAL::DrawGrid() if( !gridVisibility ) return; + SetTarget( TARGET_NONCACHED ); + // The grid consists of lines // For the drawing the start points, end points and increments have to be calculated in world coordinates VECTOR2D screenStartPoint( 0, 0 ); diff --git a/common/gal/opengl/gpu_manager.cpp b/common/gal/opengl/gpu_manager.cpp index dea8e76f91..04341ed0d4 100644 --- a/common/gal/opengl/gpu_manager.cpp +++ b/common/gal/opengl/gpu_manager.cpp @@ -77,9 +77,11 @@ void GPU_MANAGER::SetShader( SHADER& aShader ) // Cached manager GPU_CACHED_MANAGER::GPU_CACHED_MANAGER( VERTEX_CONTAINER* aContainer ) : - GPU_MANAGER( aContainer ), m_buffersInitialized( false ), m_indicesPtr( NULL ), + GPU_MANAGER( aContainer ), m_buffersInitialized( false ), m_indicesSize( 0 ) { + // Allocate the biggest possible buffer for indices + m_indices.reset( new GLuint[aContainer->GetSize()] ); } @@ -252,7 +254,6 @@ void GPU_NONCACHED_MANAGER::EndDrawing() VERTEX* vertices = m_container->GetAllVertices(); GLfloat* coordinates = (GLfloat*) ( vertices ); GLubyte* colors = (GLubyte*) ( vertices ) + ColorOffset; - GLfloat* shaders = (GLfloat*) ( vertices ) + ShaderOffset / sizeof(GLfloat); // Prepare buffers glEnableClientState( GL_VERTEX_ARRAY ); @@ -263,6 +264,8 @@ void GPU_NONCACHED_MANAGER::EndDrawing() if( m_shader != NULL ) // Use shader if applicable { + GLfloat* shaders = (GLfloat*) ( vertices ) + ShaderOffset / sizeof(GLfloat); + m_shader->Use(); glEnableVertexAttribArray( m_shaderAttrib ); glVertexAttribPointer( m_shaderAttrib, ShaderStride, GL_FLOAT, GL_FALSE, diff --git a/common/gal/opengl/opengl_compositor.cpp b/common/gal/opengl/opengl_compositor.cpp new file mode 100644 index 0000000000..1b768388c8 --- /dev/null +++ b/common/gal/opengl/opengl_compositor.cpp @@ -0,0 +1,242 @@ +/*i + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http:O//www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file opengl_compositor.cpp + * @brief Class that handles multitarget rendering (ie. to different textures/surfaces) and + * later compositing into a single image (OpenGL flavour). + */ + +#include +#include + +using namespace KiGfx; + +OPENGL_COMPOSITOR::OPENGL_COMPOSITOR() : + m_initialized( false ), m_current( 0 ) +{ +} + + +OPENGL_COMPOSITOR::~OPENGL_COMPOSITOR() +{ + if( m_initialized ) + clean(); +} + + +void OPENGL_COMPOSITOR::Initialize() +{ + if( m_initialized ) + return; + + // Get the maximum number of buffers + glGetIntegerv( GL_MAX_COLOR_ATTACHMENTS, (GLint*) &m_maxBuffers ); + + // We need framebuffer objects for drawing the screen contents + // Generate framebuffer and a depth buffer + glGenFramebuffers( 1, &m_framebuffer ); + glBindFramebuffer( GL_FRAMEBUFFER, m_framebuffer ); + m_currentFbo = m_framebuffer; + + // Allocate memory for the depth buffer + // Attach the depth buffer to the framebuffer + glGenRenderbuffers( 1, &m_depthBuffer ); + glBindRenderbuffer( GL_RENDERBUFFER, m_depthBuffer ); + + // Use here a size of 24 bits for the depth buffer, 8 bits for the stencil buffer + // this is required later for anti-aliasing + glRenderbufferStorage( GL_RENDERBUFFER, GL_DEPTH_STENCIL, m_width, m_height ); + glFramebufferRenderbuffer( GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, + GL_RENDERBUFFER, m_depthBuffer ); + glFramebufferRenderbuffer( GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, + GL_RENDERBUFFER, m_depthBuffer ); + + // Check the status, exit if the framebuffer can't be created + GLenum status = glCheckFramebufferStatus( GL_FRAMEBUFFER ); + + if( status != GL_FRAMEBUFFER_COMPLETE ) + { + wxLogFatalError( wxT( "Cannot create the framebuffer." ) ); + } + + // Unbind the framebuffer, so by default all the rendering goes directly to the display + glBindFramebuffer( GL_FRAMEBUFFER, 0 ); + m_currentFbo = 0; + + m_initialized = true; +} + + +void OPENGL_COMPOSITOR::Resize( unsigned int aWidth, unsigned int aHeight ) +{ + if( m_initialized ) + clean(); + + m_width = aWidth; + m_height = aHeight; +} + + +unsigned int OPENGL_COMPOSITOR::GetBuffer() +{ + wxASSERT( m_initialized ); + + if( m_buffers.size() < m_maxBuffers ) + { + // GL_COLOR_ATTACHMENTn are consecutive integers + GLuint attachmentPoint = GL_COLOR_ATTACHMENT0 + usedBuffers(); + GLuint textureTarget; + + // Generate the texture for the pixel storage + glGenTextures( 1, &textureTarget ); + glBindTexture( GL_TEXTURE_2D, textureTarget ); + + // Set texture parameters + glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, m_width, m_height, 0, GL_RGBA, + GL_UNSIGNED_BYTE, NULL ); + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); + + // Bind the texture to the specific attachment point, clear and rebind the screen + glBindFramebuffer( GL_FRAMEBUFFER, m_framebuffer ); + m_currentFbo = m_framebuffer; + glFramebufferTexture2D( GL_FRAMEBUFFER, attachmentPoint, GL_TEXTURE_2D, textureTarget, 0 ); + ClearBuffer(); + glBindFramebuffer( GL_FRAMEBUFFER, 0 ); + m_currentFbo = 0; + + // Store the new buffer + BUFFER_ITEM buffer = { textureTarget, attachmentPoint }; + m_buffers.push_back( buffer ); + + return usedBuffers(); + } + + // Unfortunately we have no more buffers left + return 0; +} + + +void OPENGL_COMPOSITOR::SetBuffer( unsigned int aBufferHandle ) +{ + if( aBufferHandle <= usedBuffers() ) + { + // Change the rendering destination to the selected attachment point + if( m_currentFbo != m_framebuffer ) + { + glBindFramebuffer( GL_FRAMEBUFFER, m_framebuffer ); + m_currentFbo = m_framebuffer; + } + + if( m_current != aBufferHandle - 1 ) + { + glDrawBuffer( m_buffers[m_current].attachmentPoint ); + m_current = aBufferHandle - 1; + } + } +} + + +void OPENGL_COMPOSITOR::ClearBuffer() +{ + wxASSERT( m_initialized ); + + glClearColor( 0.0f, 0.0f, 0.0f, 0.0f ); + glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); +} + + +void OPENGL_COMPOSITOR::BlitBuffer( unsigned int aBufferHandle ) +{ + wxASSERT( m_initialized ); + + wxASSERT_MSG( false, wxT( "Not implemented yet" ) ); +} + + +void OPENGL_COMPOSITOR::DrawBuffer( unsigned int aBufferHandle, double aDepth ) +{ + wxASSERT( m_initialized ); + + // Switch to the main framebuffer and blit the scene + glBindFramebuffer( GL_FRAMEBUFFER, 0 ); + m_currentFbo = 0; + + // Depth test has to be disabled to make transparency working + glDisable( GL_DEPTH_TEST ); + glBlendFunc( GL_ONE, GL_ONE_MINUS_SRC_ALPHA ); + + // Enable texturing and bind the main texture + glEnable( GL_TEXTURE_2D ); + glBindTexture( GL_TEXTURE_2D, m_buffers[aBufferHandle - 1].textureTarget ); + + // Draw a full screen quad with the texture + glMatrixMode( GL_MODELVIEW ); + glPushMatrix(); + glLoadIdentity(); + glMatrixMode( GL_PROJECTION ); + glPushMatrix(); + glLoadIdentity(); + + glBegin( GL_TRIANGLES ); + glTexCoord2f( 0.0f, 1.0f ); + glVertex3f( -1.0f, -1.0f, aDepth ); + glTexCoord2f( 1.0f, 1.0f ); + glVertex3f( 1.0f, -1.0f, aDepth ); + glTexCoord2f( 1.0f, 0.0f ); + glVertex3f( 1.0f, 1.0f, aDepth ); + + glTexCoord2f( 0.0f, 1.0f ); + glVertex3f( -1.0f, -1.0f, aDepth ); + glTexCoord2f( 1.0f, 0.0f ); + glVertex3f( 1.0f, 1.0f, aDepth ); + glTexCoord2f( 0.0f, 0.0f ); + glVertex3f( -1.0f, 1.0f, aDepth ); + glEnd(); + + glPopMatrix(); + glMatrixMode( GL_MODELVIEW ); + glPopMatrix(); +} + + +void OPENGL_COMPOSITOR::clean() +{ + wxASSERT( m_initialized ); + + glDeleteFramebuffers( 1, &m_framebuffer ); + glDeleteRenderbuffers( 1, &m_depthBuffer ); + + Buffers::const_iterator it; + for( it = m_buffers.begin(); it != m_buffers.end(); ++it ) + { + glDeleteTextures( 1, &it->textureTarget ); + } + m_buffers.clear(); + + m_initialized = false; +} + +GLuint OPENGL_COMPOSITOR::m_currentFbo = 0; diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 19d50d2244..bac3c92280 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -54,7 +54,8 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, wxGLCanvas( aParent, wxID_ANY, (int*) glAttributes, wxDefaultPosition, wxDefaultSize, wxEXPAND, aName ), cachedManager( true ), - nonCachedManager( false ) + nonCachedManager( false ), + overlayManager( false ) { // Create the OpenGL-Context glContext = new wxGLContext( this ); @@ -67,9 +68,8 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, SetCursorColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); // Initialize the flags - isDeleteSavedPixels = true; isGlewInitialized = false; - isFrameBufferInitialized = false; + isFramebufferInitialized = false; isUseShader = isUseShaders; isShaderInitialized = false; isGrouping = false; @@ -109,9 +109,6 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, // Compute the unit circle vertices and store them in a buffer for faster drawing computeCircle(); - - // By default we draw non-cached objects, it changes on BeginGroup()/EndGroup() - currentManager = &nonCachedManager; } @@ -119,13 +116,6 @@ OPENGL_GAL::~OPENGL_GAL() { glFlush(); - // Delete the buffers - if( isFrameBufferInitialized ) - { - deleteFrameBuffer( &frameBuffer, &depthBuffer, &texture ); - deleteFrameBuffer( &frameBufferBackup, &depthBufferBackup, &textureBackup ); - } - gluDeleteTess( tesselator ); ClearCache(); @@ -143,15 +133,9 @@ void OPENGL_GAL::ResizeScreen( int aWidth, int aHeight ) { screenSize = VECTOR2D( aWidth, aHeight ); - // Delete old buffers for resizing - if( isFrameBufferInitialized ) - { - deleteFrameBuffer( &frameBuffer, &depthBuffer, &texture ); - deleteFrameBuffer( &frameBufferBackup, &depthBufferBackup, &textureBackup ); - - // This flag is used for recreating the buffers - isFrameBufferInitialized = false; - } + // Resize framebuffers + compositor.Resize( aWidth, aHeight ); + isFramebufferInitialized = false; wxGLCanvas::SetSize( aWidth, aHeight ); } @@ -165,86 +149,35 @@ void OPENGL_GAL::skipMouseEvent( wxMouseEvent& aEvent ) } -void OPENGL_GAL::generateFrameBuffer( GLuint* aFrameBuffer, GLuint* aDepthBuffer, - GLuint* aTexture ) -{ - // We need frame buffer objects for drawing the screen contents - - // Generate frame buffer and a depth buffer - glGenFramebuffersEXT( 1, aFrameBuffer ); - glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, *aFrameBuffer ); - - // Allocate memory for the depth buffer - // Attach the depth buffer to the frame buffer - glGenRenderbuffersEXT( 1, aDepthBuffer ); - glBindRenderbufferEXT( GL_RENDERBUFFER_EXT, *aDepthBuffer ); - - // Use here a size of 24 bits for the depth buffer, 8 bits for the stencil buffer - // this is required later for anti-aliasing - glRenderbufferStorageEXT( GL_RENDERBUFFER_EXT, GL_DEPTH_STENCIL_EXT, screenSize.x, - screenSize.y ); - glFramebufferRenderbufferEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, - *aDepthBuffer ); - glFramebufferRenderbufferEXT( GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT, - GL_RENDERBUFFER_EXT, *aDepthBuffer ); - - // Generate the texture for the pixel storage - // Attach the texture to the frame buffer - glGenTextures( 1, aTexture ); - glBindTexture( GL_TEXTURE_2D, *aTexture ); - glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, screenSize.x, screenSize.y, 0, GL_RGBA, - GL_UNSIGNED_BYTE, NULL ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); - glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, - *aTexture, 0 ); - - // Check the status, exit if the frame buffer can't be created - GLenum status = glCheckFramebufferStatusEXT( GL_FRAMEBUFFER_EXT ); - - if( status != GL_FRAMEBUFFER_COMPLETE_EXT ) - { - wxLogError( wxT( "Can't create the frame buffer." ) ); - exit( 1 ); - } - - isFrameBufferInitialized = true; -} - - -void OPENGL_GAL::deleteFrameBuffer( GLuint* aFrameBuffer, GLuint* aDepthBuffer, GLuint* aTexture ) -{ - glDeleteFramebuffers( 1, aFrameBuffer ); - glDeleteRenderbuffers( 1, aDepthBuffer ); - glDeleteTextures( 1, aTexture ); -} - - -void OPENGL_GAL::initFrameBuffers() -{ - generateFrameBuffer( &frameBuffer, &depthBuffer, &texture ); - generateFrameBuffer( &frameBufferBackup, &depthBufferBackup, &textureBackup ); -} - - void OPENGL_GAL::SaveScreen() { - glBindFramebuffer( GL_DRAW_FRAMEBUFFER, frameBufferBackup ); - glBindFramebuffer( GL_READ_FRAMEBUFFER, frameBuffer ); - glBlitFramebuffer( 0, 0, screenSize.x, screenSize.y, 0, 0, screenSize.x, screenSize.y, - GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, - GL_NEAREST ); - glBindFramebuffer( GL_DRAW_FRAMEBUFFER, frameBuffer ); + wxASSERT_MSG( false, wxT( "Not implemented yet" ) ); } void OPENGL_GAL::RestoreScreen() { - glBindFramebuffer( GL_DRAW_FRAMEBUFFER, frameBuffer ); - glBindFramebuffer( GL_READ_FRAMEBUFFER, frameBufferBackup ); - glBlitFramebuffer( 0, 0, screenSize.x, screenSize.y, 0, 0, screenSize.x, screenSize.y, - GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, - GL_NEAREST ); + wxASSERT_MSG( false, wxT( "Not implemented yet" ) ); +} + + +void OPENGL_GAL::SetTarget( RenderTarget aTarget ) +{ + switch( aTarget ) + { + default: + case TARGET_CACHED: + currentManager = &cachedManager; + break; + + case TARGET_NONCACHED: + currentManager = &nonCachedManager; + break; + + case TARGET_OVERLAY: + currentManager = &overlayManager; + break; + } } @@ -275,7 +208,7 @@ void OPENGL_GAL::initGlew() exit( 1 ); } - // Frame buffers have to be supported + // Framebuffers have to be supported if( !GLEW_ARB_framebuffer_object ) { wxLogError( wxT( "Framebuffer objects are not supported!" ) ); @@ -303,8 +236,23 @@ void OPENGL_GAL::BeginDrawing() if( !isGlewInitialized ) initGlew(); - if( !isFrameBufferInitialized ) - initFrameBuffers(); + if( !isFramebufferInitialized ) + { + // Set up the view port + glMatrixMode( GL_PROJECTION ); + glLoadIdentity(); + glViewport( 0, 0, (GLsizei) screenSize.x, (GLsizei) screenSize.y ); + + // Create the screen transformation + glOrtho( 0, (GLint) screenSize.x, 0, (GLsizei) screenSize.y, -depthRange.x, -depthRange.y ); + + // Prepare rendering target buffers + compositor.Initialize(); + mainBuffer = compositor.GetBuffer(); + overlayBuffer = compositor.GetBuffer(); + + isFramebufferInitialized = true; + } // Compile the shaders if( !isShaderInitialized && isUseShader ) @@ -321,19 +269,18 @@ void OPENGL_GAL::BeginDrawing() // Make VBOs use shaders cachedManager.SetShader( shader ); nonCachedManager.SetShader( shader ); + overlayManager.SetShader( shader ); isShaderInitialized = true; } - // Bind the main frame buffer object - all contents are drawn there - glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, frameBuffer ); - // Disable 2D Textures glDisable( GL_TEXTURE_2D ); // Enable the depth buffer glEnable( GL_DEPTH_TEST ); glDepthFunc( GL_LESS ); + // Setup blending, required for transparent objects glEnable( GL_BLEND ); glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); @@ -341,14 +288,6 @@ void OPENGL_GAL::BeginDrawing() // Enable smooth lines glEnable( GL_LINE_SMOOTH ); - // Set up the view port - glMatrixMode( GL_PROJECTION ); - glLoadIdentity(); - glViewport( 0, 0, (GLsizei) screenSize.x, (GLsizei) screenSize.y ); - - // Create the screen transformation - glOrtho( 0, (GLint) screenSize.x, 0, (GLsizei) screenSize.y, -depthRange.x, -depthRange.y ); - glMatrixMode( GL_MODELVIEW ); // Set up the world <-> screen transformation @@ -368,69 +307,34 @@ void OPENGL_GAL::BeginDrawing() // Set defaults SetFillColor( fillColor ); SetStrokeColor( strokeColor ); - isDeleteSavedPixels = true; + // Prepare buffers for drawing nonCachedManager.Clear(); + overlayManager.Clear(); cachedManager.BeginDrawing(); nonCachedManager.BeginDrawing(); -} - - -void OPENGL_GAL::blitMainTexture( bool aIsClearFrameBuffer ) -{ - // Don't use blending for the final blitting - glDisable( GL_BLEND ); - - glColor4d( 1.0, 1.0, 1.0, 1.0 ); - - // Switch to the main frame buffer and blit the scene - glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, 0 ); - - if( aIsClearFrameBuffer ) - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT ); - - // Enable texturing and bind the main texture - glEnable( GL_TEXTURE_2D ); - glBindTexture( GL_TEXTURE_2D, texture ); - - // Draw a full screen quad with the texture - glMatrixMode( GL_MODELVIEW ); - glPushMatrix(); - glLoadIdentity(); - glMatrixMode( GL_PROJECTION ); - glPushMatrix(); - glLoadIdentity(); - - glBegin( GL_TRIANGLES ); - glTexCoord2i( 0, 1 ); - glVertex3i( -1, -1, 0 ); - glTexCoord2i( 1, 1 ); - glVertex3i( 1, -1, 0 ); - glTexCoord2i( 1, 0 ); - glVertex3i( 1, 1, 0 ); - - glTexCoord2i( 0, 1 ); - glVertex3i( -1, -1, 0 ); - glTexCoord2i( 1, 0 ); - glVertex3i( 1, 1, 0 ); - glTexCoord2i( 0, 0 ); - glVertex3i( -1, 1, 0 ); - glEnd(); - glPopMatrix(); - glMatrixMode( GL_MODELVIEW ); - glPopMatrix(); + overlayManager.BeginDrawing(); } void OPENGL_GAL::EndDrawing() { + // Cached & non-cached containers are rendered to the same buffer + compositor.SetBuffer( mainBuffer ); + compositor.ClearBuffer(); nonCachedManager.EndDrawing(); cachedManager.EndDrawing(); - // Draw the remaining contents, blit the main texture to the screen, swap the buffers + // Overlay container is rendered to a different buffer + compositor.SetBuffer( overlayBuffer ); + compositor.ClearBuffer(); + overlayManager.EndDrawing(); + + // Draw the remaining contents, blit the rendering targets to the screen, swap the buffers glFlush(); - blitMainTexture( true ); + compositor.DrawBuffer( mainBuffer, -1.0 ); + compositor.DrawBuffer( overlayBuffer, 0.0 ); SwapBuffers(); delete clientDC; @@ -530,8 +434,10 @@ void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndP VECTOR2D( lineLength, -aWidth / 2.0 ) ); // Draw line caps - drawStrokedSemiCircle( VECTOR2D( 0.0, 0.0 ), ( aWidth + lineWidth ) / 2, M_PI / 2 ); - drawStrokedSemiCircle( VECTOR2D( lineLength, 0.0 ), ( aWidth + lineWidth ) / 2, -M_PI / 2 ); + drawStrokedSemiCircle( VECTOR2D( 0.0, 0.0 ), + ( aWidth + lineWidth ) / 2, M_PI / 2 ); + drawStrokedSemiCircle( VECTOR2D( lineLength, 0.0 ), + ( aWidth + lineWidth ) / 2, -M_PI / 2 ); Restore(); } @@ -643,15 +549,16 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) v0 /_\/_\ v1 */ currentManager->Shader( SHADER_FILLED_CIRCLE, 1.0 ); - currentManager->Vertex( aCenterPoint.x - aRadius * sqrt( 3.0f ), - aCenterPoint.y - aRadius, layerDepth ); // v0 + currentManager->Vertex( aCenterPoint.x - aRadius * sqrt( 3.0f ), // v0 + aCenterPoint.y - aRadius, layerDepth ); currentManager->Shader( SHADER_FILLED_CIRCLE, 2.0 ); - currentManager->Vertex( aCenterPoint.x + aRadius* sqrt( 3.0f ), - aCenterPoint.y - aRadius, layerDepth ); // v1 + currentManager->Vertex( aCenterPoint.x + aRadius* sqrt( 3.0f ), // v1 + aCenterPoint.y - aRadius, layerDepth ); currentManager->Shader( SHADER_FILLED_CIRCLE, 3.0 ); - currentManager->Vertex( aCenterPoint.x, aCenterPoint.y + aRadius * 2.0f, layerDepth ); // v2 + currentManager->Vertex( aCenterPoint.x, aCenterPoint.y + aRadius * 2.0f, // v2 + layerDepth ); } if( isStrokeEnabled ) @@ -661,8 +568,8 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) /* Draw a triangle that contains the circle, then shade it leaving only the circle. Parameters given to setShader are indices of the triangle's vertices (if you want to understand more, check the vertex shader source [shader.vert]). - and the line width. Shader uses this coordinates to determine if fragments are inside - the circle or not. + and the line width. Shader uses this coordinates to determine if fragments are + inside the circle or not. v2 /\ //\\ @@ -670,15 +577,16 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) */ double outerRadius = aRadius + ( lineWidth / 2 ); currentManager->Shader( SHADER_STROKED_CIRCLE, 1.0, aRadius, lineWidth ); - currentManager->Vertex( aCenterPoint.x - outerRadius * sqrt( 3.0f ), - aCenterPoint.y - outerRadius, layerDepth ); // v0 + currentManager->Vertex( aCenterPoint.x - outerRadius * sqrt( 3.0f ), // v0 + aCenterPoint.y - outerRadius, layerDepth ); currentManager->Shader( SHADER_STROKED_CIRCLE, 2.0, aRadius, lineWidth ); - currentManager->Vertex( aCenterPoint.x + outerRadius * sqrt( 3.0f ), - aCenterPoint.y - outerRadius, layerDepth ); // v1 + currentManager->Vertex( aCenterPoint.x + outerRadius * sqrt( 3.0f ), // v1 + aCenterPoint.y - outerRadius, layerDepth ); currentManager->Shader( SHADER_STROKED_CIRCLE, 3.0, aRadius, lineWidth ); - currentManager->Vertex( aCenterPoint.x, aCenterPoint.y + outerRadius * 2.0f, layerDepth ); // v2 + currentManager->Vertex( aCenterPoint.x, aCenterPoint.y + outerRadius * 2.0f, // v2 + layerDepth ); } } else @@ -716,7 +624,8 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) if( i % 3 == 0 ) { i++; - // Depending on the vertex, next circle point may be stored in the next vertex.. + // Depending on the vertex, next circle point + // may be stored in the next vertex.. next = i + 1; } else @@ -750,7 +659,7 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) } } - // Filled circles are easy to draw by using the stored vertices list, scaling and translating + // Filled circles are easy to draw by using the stored vertices list if( isFillEnabled ) { currentManager->Color( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); @@ -790,8 +699,8 @@ void OPENGL_GAL::drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRad currentManager->Translate( aCenterPoint.x, aCenterPoint.y, 0.0f ); currentManager->Rotate( aAngle, 0.0f, 0.0f, 1.0f ); - /* Draw a triangle that contains the semicircle, then shade it to leave only the semicircle. - Parameters given to setShader are indices of the triangle's vertices + /* Draw a triangle that contains the semicircle, then shade it to leave only + * the semicircle. Parameters given to setShader are indices of the triangle's vertices (if you want to understand more, check the vertex shader source [shader.vert]). Shader uses this coordinates to determine if fragments are inside the semicircle or not. v2 @@ -800,13 +709,13 @@ void OPENGL_GAL::drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRad v0 //__\\ v1 */ currentManager->Shader( SHADER_FILLED_CIRCLE, 4.0f ); - currentManager->Vertex( -aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 + currentManager->Vertex( -aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 currentManager->Shader( SHADER_FILLED_CIRCLE, 5.0f ); - currentManager->Vertex( aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 + currentManager->Vertex( aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 currentManager->Shader( SHADER_FILLED_CIRCLE, 6.0f ); - currentManager->Vertex( 0.0f, aRadius * 2.0f, layerDepth ); // v2 + currentManager->Vertex( 0.0f, aRadius * 2.0f, layerDepth ); // v2 Restore(); } @@ -836,8 +745,8 @@ void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRa currentManager->Translate( aCenterPoint.x, aCenterPoint.y, 0.0f ); currentManager->Rotate( aAngle, 0.0f, 0.0f, 1.0f ); - /* Draw a triangle that contains the semicircle, then shade it to leave only the semicircle. - Parameters given to setShader are indices of the triangle's vertices + /* Draw a triangle that contains the semicircle, then shade it to leave only + * the semicircle. Parameters given to setShader are indices of the triangle's vertices (if you want to understand more, check the vertex shader source [shader.vert]), the radius and the line width. Shader uses this coordinates to determine if fragments are inside the semicircle or not. @@ -847,13 +756,13 @@ void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRa v0 //__\\ v1 */ currentManager->Shader( SHADER_STROKED_CIRCLE, 4.0f, aRadius, lineWidth ); - currentManager->Vertex( -outerRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 + currentManager->Vertex( -outerRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 currentManager->Shader( SHADER_STROKED_CIRCLE, 5.0f, aRadius, lineWidth ); - currentManager->Vertex( outerRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 + currentManager->Vertex( outerRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 currentManager->Shader( SHADER_STROKED_CIRCLE, 6.0f, aRadius, lineWidth ); - currentManager->Vertex( 0.0f, outerRadius * 2.0f, layerDepth ); // v2 + currentManager->Vertex( 0.0f, outerRadius * 2.0f, layerDepth ); // v2 Restore(); } @@ -957,10 +866,9 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a outerScale += 1.0; innerScale += 1.0; - double alphaIncrement = 2 * M_PI / CIRCLE_POINTS; + double alphaIncrement = 2.0 * M_PI / CIRCLE_POINTS; currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); - for( double alpha = aStartAngle; alpha < aEndAngle; ) { double v0[] = { cos( alpha ) * innerScale, sin( alpha ) * innerScale }; @@ -1155,8 +1063,7 @@ void OPENGL_GAL::ClearScreen() { // Clear screen glClearColor( backgroundColor.r, backgroundColor.g, backgroundColor.b, backgroundColor.a ); - - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT ); + glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); } @@ -1219,7 +1126,6 @@ int OPENGL_GAL::BeginGroup() isGrouping = true; boost::shared_ptr newItem( new VERTEX_ITEM( cachedManager ) ); - currentManager = &cachedManager; int groupNumber = getNewGroupNumber(); groups.insert( std::make_pair( groupNumber, newItem ) ); @@ -1229,8 +1135,6 @@ int OPENGL_GAL::BeginGroup() void OPENGL_GAL::EndGroup() { - currentManager = &nonCachedManager; - isGrouping = false; } @@ -1399,6 +1303,8 @@ VECTOR2D OPENGL_GAL::ComputeCursorToWorld( const VECTOR2D& aCursorPosition ) void OPENGL_GAL::DrawCursor( VECTOR2D aCursorPosition ) { + wxLogWarning( wxT( "Not tested ") ); + SetCurrent( *glContext ); // Draw the cursor on the surface @@ -1409,14 +1315,12 @@ void OPENGL_GAL::DrawCursor( VECTOR2D aCursorPosition ) aCursorPosition = worldScreenMatrix * cursorPositionWorld; - // Switch to the main frame buffer and blit the scene - glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, 0 ); - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); + // Switch to the main framebuffer and blit the scene + //glBindFramebuffer( GL_FRAMEBUFFER, 0 ); + //glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); glLoadIdentity(); - blitMainTexture( false ); - glDisable( GL_TEXTURE_2D ); glColor4d( cursorColor.r, cursorColor.g, cursorColor.b, cursorColor.a ); diff --git a/common/view/view.cpp b/common/view/view.cpp index 8e1b031d31..ead82c46e8 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -43,14 +43,14 @@ void VIEW::AddLayer( int aLayer, bool aDisplayOnly ) { if( m_layers.find( aLayer ) == m_layers.end() ) { - m_layers[aLayer] = VIEW_LAYER(); - m_layers[aLayer].id = aLayer; - m_layers[aLayer].items = new VIEW_RTREE(); + m_layers[aLayer] = VIEW_LAYER(); + m_layers[aLayer].id = aLayer; + m_layers[aLayer].items = new VIEW_RTREE(); m_layers[aLayer].renderingOrder = aLayer; m_layers[aLayer].enabled = true; - m_layers[aLayer].cached = true; m_layers[aLayer].isDirty = false; m_layers[aLayer].displayOnly = aDisplayOnly; + m_layers[aLayer].target = TARGET_CACHED; } sortLayers(); @@ -136,7 +136,7 @@ int VIEW::Query( const BOX2I& aRect, std::vector& aResult ) VIEW::VIEW( bool aIsDynamic ) : m_enableOrderModifier( false ), - m_scale ( 1.0 ), + m_scale( 1.0 ), m_painter( NULL ), m_gal( NULL ), m_dynamic( aIsDynamic ) @@ -321,7 +321,7 @@ struct VIEW::updateItemsColor void VIEW::UpdateLayerColor( int aLayer ) { // There is no point in updating non-cached layers - if( !m_layers[aLayer].cached ) + if( m_layers[aLayer].target != TARGET_CACHED ) return; BOX2I r; @@ -344,7 +344,7 @@ void VIEW::UpdateAllLayersColor() VIEW_LAYER* l = &( ( *i ).second ); // There is no point in updating non-cached layers - if( !m_layers[l->id].cached ) + if( l->target != TARGET_CACHED ) continue; updateItemsColor visitor( l->id, m_painter, m_gal ); @@ -376,7 +376,7 @@ struct VIEW::changeItemsDepth void VIEW::ChangeLayerDepth( int aLayer, int aDepth ) { // There is no point in updating non-cached layers - if( !m_layers[aLayer].cached ) + if( m_layers[aLayer].target != TARGET_CACHED ) return; BOX2I r; @@ -483,7 +483,7 @@ struct VIEW::drawItem if( !drawCondition ) return; - if( currentLayer->cached ) + if( currentLayer->target == TARGET_CACHED ) { // Draw using cached information or create one int group = aItem->getGroup( currentLayer->id ); @@ -521,6 +521,7 @@ void VIEW::redrawRect( const BOX2I& aRect ) { drawItem drawFunc( this, l ); + m_gal->SetTarget( l->target ); m_gal->SetLayerDepth( l->renderingOrder ); l->items->Query( aRect, drawFunc ); l->isDirty = false; @@ -709,8 +710,10 @@ void VIEW::RecacheAllItems( bool aImmediately ) { VIEW_LAYER* l = & ( ( *i ).second ); - if( l->cached ) + // Obviously, there is only one cached target that has to be recomputed + if( l->target == TARGET_CACHED ) { + m_gal->SetTarget( l->target ); m_gal->SetLayerDepth( l->renderingOrder ); recacheLayer visitor( this, m_gal, l->id, aImmediately ); l->items->Query( r, visitor ); diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 96035763de..35e3188d07 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -252,6 +252,9 @@ public: /// @copydoc GAL::RestoreScreen() virtual void RestoreScreen(); + /// @copydoc GAL::SetTarget() + virtual void SetTarget( RenderTarget aTarget ); + // ------- // Cursor // ------- diff --git a/include/gal/compositor.h b/include/gal/compositor.h new file mode 100644 index 0000000000..e678b00bdc --- /dev/null +++ b/include/gal/compositor.h @@ -0,0 +1,107 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file compositor.h + * @brief Class that handles multitarget rendering (ie. to different textures/surfaces) and + * later compositing into a single image. + */ + +#ifndef COMPOSITOR_H_ +#define COMPOSITOR_H_ + +namespace KiGfx +{ + +class COMPOSITOR +{ +public: + virtual ~COMPOSITOR() + { + } + + /** + * Function Reset() + * performs primary initialiation, necessary to use the object. + */ + virtual void Initialize() = 0; + + /** + * Function Resize() + * clears the state of COMPOSITOR, so it has to be reinitialized again with the new dimensions. + * + * @param aWidth is the framebuffer width (in pixels). + * @param aHeight is the framebuffer height (in pixels). + */ + virtual void Resize( unsigned int aWidth, unsigned int aHeight ) = 0; + + /** + * Function GetBuffer() + * prepares a new buffer that may be used as a rendering target. + * + * @return is the handle of the buffer. In case of failure 0 (zero) is returned as the handle. + */ + virtual unsigned int GetBuffer() = 0; + + /** + * Function SetBuffer() + * sets the selected buffer as the rendering target. All the following drawing functions are + * going to be rendered in the selected buffer. + * + * @param aBufferHandle is the handle of the buffer or 0 in case of rendering directly to the + * display. + */ + virtual void SetBuffer( unsigned int aBufferHandle ) = 0; + + /** + * Function ClearBuffer() + * clears the selected buffer (set by the SetBuffer() function). + */ + virtual void ClearBuffer() = 0; + + /** + * Function BlitBuffer() + * pastes the content of the buffer to the current buffer (set by SetBuffer() function). + * + * @param aBufferHandle is the handle to the buffer that is going to be pasted. + */ + virtual void BlitBuffer( unsigned int aBufferHandle ) = 0; + + /** + * Function DrawBuffer() + * draws the selected buffer on the screen. + * + * @param aBufferHandle is the handle of the buffer to be drawn. + * @param aDepth is the depth on which the buffer should be drawn. // TODO mention if higher depth value means close to the screen or is it opposite + */ + virtual void DrawBuffer( unsigned int aBufferHandle, double aDepth ) = 0; + +protected: + unsigned int m_width; ///< Width of the buffer (in pixels) + unsigned int m_height; ///< Height of the buffer (in pixels) +}; + +} // namespace KiGfx + +#endif /* COMPOSITOR_H_ */ diff --git a/include/gal/definitions.h b/include/gal/definitions.h index b6a66c584c..5e9059a2df 100644 --- a/include/gal/definitions.h +++ b/include/gal/definitions.h @@ -31,4 +31,17 @@ #define SWAP( varA, condition, varB ) if( varA condition varB ) { double tmp = varA; varA = varB; \ varB = tmp; } +namespace KiGfx +{ + /** + * RenderTarget: Possible rendering targets + */ + enum RenderTarget + { + TARGET_CACHED, ///< Main rendering target (cached) + TARGET_NONCACHED, ///< Auxiliary rendering target (noncached) + TARGET_OVERLAY ///< Items that may change while the view stays the same (noncached) + }; +} + #endif /* DEFINITIONS_H_ */ diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index d4142c3237..bb256f684a 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -35,6 +35,7 @@ #include #include +#include #include #include @@ -546,16 +547,27 @@ public: return worldScale; } + // --------------------------- + // Buffer manipulation methods + // --------------------------- + /** * @brief Save the screen contents. */ virtual void SaveScreen() = 0; /** - * @brief Save the screen contents. + * @brief Restore the screen contents. */ virtual void RestoreScreen() = 0; + /** + * @brief Sets the target for rendering. + * + * @param aTarget is the new target for rendering. + */ + virtual void SetTarget( RenderTarget aTarget ) = 0; + // ------------- // Grid methods // ------------- diff --git a/include/gal/opengl/opengl_compositor.h b/include/gal/opengl/opengl_compositor.h new file mode 100644 index 0000000000..f58cd493d9 --- /dev/null +++ b/include/gal/opengl/opengl_compositor.h @@ -0,0 +1,101 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file opengl_compositor.h + * @brief Class that handles multitarget rendering (ie. to different textures/surfaces) and + * later compositing into a single image (OpenGL flavour). + */ + +#ifndef OPENGL_COMPOSITOR_H_ +#define OPENGL_COMPOSITOR_H_ + +#include +#include +#include + +namespace KiGfx +{ + +class OPENGL_COMPOSITOR : public COMPOSITOR +{ +public: + OPENGL_COMPOSITOR(); + virtual ~OPENGL_COMPOSITOR(); + + ///< @copydoc COMPOSITOR::Initialize() + virtual void Initialize(); + + ///< @copydoc COMPOSITOR::Resize() + virtual void Resize( unsigned int aWidth, unsigned int aHeight ); + + ///< @copydoc COMPOSITOR::GetBuffer() + virtual unsigned int GetBuffer(); + + ///< @copydoc COMPOSITOR::SetBuffer() + virtual void SetBuffer( unsigned int aBufferHandle ); + + ///< @copydoc COMPOSITOR::ClearBuffer() + virtual void ClearBuffer(); + + ///< @copydoc COMPOSITOR::BlitBuffer() + virtual void BlitBuffer( unsigned int aBufferHandle ); + + ///< @copydoc COMPOSITOR::DrawBuffer() + virtual void DrawBuffer( unsigned int aBufferHandle, double aDepth ); + +protected: + typedef struct + { + GLuint textureTarget; ///< Main texture handle + GLuint attachmentPoint; + } BUFFER_ITEM; + + bool m_initialized; + unsigned int m_current; + GLuint m_framebuffer; ///< Main FBO handle + GLuint m_depthBuffer; ///< Depth buffer handle + unsigned int m_maxBuffers; ///< Maximal amount of buffers + typedef std::vector Buffers; + Buffers m_buffers; + + /// Store the currently used FBO name in case there was more than one compositor used + static GLuint m_currentFbo; + + /** + * Function clean() + * performs freeing of resources. + */ + void clean(); + + ///< Returns number of used buffers + unsigned int usedBuffers() + { + return m_buffers.size(); + } +}; + +} // namespace KiGfx + +#endif /* COMPOSITOR_H_ */ diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 9338b44187..b44d338fa8 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -268,6 +269,9 @@ public: /// @copydoc GAL::RestoreScreen() virtual void RestoreScreen(); + /// @copydoc GAL::SetTarget() + virtual void SetTarget( RenderTarget aTarget ); + // ------- // Cursor // ------- @@ -328,8 +332,8 @@ private: wxEvtHandler* mouseListener; wxEvtHandler* paintListener; - // VBO buffered vertices for faster circle & semicircle drawing - NONCACHED_CONTAINER circleContainer; ///< Container for storing circle vertices + // Precomputed vertices for faster circle & semicircle drawing + NONCACHED_CONTAINER circleContainer; ///< Container for storing circle vertices // Vertex buffer objects related fields typedef std::map< unsigned int, boost::shared_ptr > GroupsMap; @@ -338,6 +342,12 @@ private: VERTEX_MANAGER* currentManager; ///< Currently used VERTEX_MANAGER (for storing VERTEX_ITEMs) VERTEX_MANAGER cachedManager; ///< Container for storing cached VERTEX_ITEMs VERTEX_MANAGER nonCachedManager; ///< Container for storing non-cached VERTEX_ITEMs + VERTEX_MANAGER overlayManager; ///< Container for storing overlaid VERTEX_ITEMs + + // Framebuffer & compositing + OPENGL_COMPOSITOR compositor; ///< Handles multiple rendering targets + unsigned int mainBuffer; ///< Main rendering target + unsigned int overlayBuffer; ///< Auxiliary rendering target (for menus etc.) // Polygon tesselation GLUtesselator* tesselator; ///< Pointer to the tesselator @@ -350,20 +360,11 @@ private: int cursorSize; ///< Size of the cursor in pixels GLubyte* cursorShape; ///< Cursor pixel storage GLubyte* cursorSave; ///< Saved cursor pixels - bool isDeleteSavedPixels; ///< Flag for deleting saved pixels VECTOR2D savedCursorPosition; ///< Last saved cursor position - // Frame buffer - GLuint frameBuffer; ///< Main FBO handle - GLuint depthBuffer; ///< Depth buffer handle - GLuint texture; ///< Main texture handle - GLuint frameBufferBackup; ///< Backup FBO handle - GLuint depthBufferBackup; ///< Backup depth buffer handle - GLuint textureBackup; ///< Backup texture handle - // Internal flags bool isGlewInitialized; ///< Is GLEW initialized? - bool isFrameBufferInitialized; ///< Are the frame buffers initialized? + bool isFramebufferInitialized; ///< Are the framebuffers initialized? bool isShaderInitialized; ///< Was the shader initialized? bool isUseShader; ///< Should the shaders be used? bool isGrouping; ///< Was a group started? @@ -434,34 +435,6 @@ private: */ void initCursor( int aCursorSize ); - /** - * @brief Blit the main texture to the screen. - * - * @param aIsClearFrameBuffer if true, the frame buffer is cleared as well. - */ - void blitMainTexture( bool aIsClearFrameBuffer ); - - /// @brief Initialize the frame buffers for main contents and backup storage. - void initFrameBuffers(); - - /** - * @brief Generate a frame buffer for the screen contents. - * - * @param aFrameBuffer is the pointer to the frame buffer handle. - * @param aDepthBuffer is the pointer to the depth buffer handle. - * @param aTexture is the pointer to the texture handle. - */ - void generateFrameBuffer( GLuint* aFrameBuffer, GLuint* aDepthBuffer, GLuint* aTexture ); - - /** - * @brief Delete the frame buffer for the screen contents. - * - * @param aFrameBuffer is the pointer to the frame buffer handle. - * @param aDepthBuffer is the pointer to the depth buffer handle. - * @param aTexture is the pointer to the texture handle. - */ - void deleteFrameBuffer( GLuint* aFrameBuffer, GLuint* aDepthBuffer, GLuint* aTexture ); - /** * @brief Draw a quad for the line. * diff --git a/include/gal/opengl/vertex_common.h b/include/gal/opengl/vertex_common.h index a718ef4ea8..ef8c6d2046 100644 --- a/include/gal/opengl/vertex_common.h +++ b/include/gal/opengl/vertex_common.h @@ -43,7 +43,7 @@ enum SHADER_TYPE SHADER_STROKED_CIRCLE, }; -typedef struct VERTEX +typedef struct { GLfloat x, y, z; // Coordinates GLubyte r, g, b, a; // Color diff --git a/include/gal/opengl/vertex_container.h b/include/gal/opengl/vertex_container.h index 1714040022..3cf544c473 100644 --- a/include/gal/opengl/vertex_container.h +++ b/include/gal/opengl/vertex_container.h @@ -34,7 +34,6 @@ namespace KiGfx { -class VERTEX; class VERTEX_ITEM; class SHADER; diff --git a/include/view/view.h b/include/view/view.h index da43b591ca..8df37a162e 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -30,6 +30,7 @@ #include #include +#include namespace KiGfx { @@ -258,14 +259,14 @@ public: } /** - * Function SetLayerCached() - * Turns on or off the cached parameter of a particular layer. - * @param aLayer: the layer - * @param aCached: the new parameter value + * Function SetLayerTarget() + * Changes the rendering target for a particular layer. + * @param aLayer is the layer. + * @param aTarget is the rendering target. */ - inline void SetLayerCached( int aLayer, bool aCached = true ) + inline void SetLayerTarget( int aLayer, RenderTarget aTarget ) { - m_layers[aLayer].cached = aCached; + m_layers[aLayer].target = aTarget; } /** @@ -367,14 +368,13 @@ private: bool enabled; ///* is the layer to be rendered? bool isDirty; ///* does it contain any dirty items (updated since last redraw) bool displayOnly; ///* is the layer display only? - bool cached; ///* items on non-cached layers are displayed in - ///* immediate mode VIEW_RTREE* items; ///* R-tree indexing all items on this layer. std::vector dirtyItems; ///* set of dirty items collected since last redraw int renderingOrder; ///* rendering order of this layer int id; ///* layer ID BOX2I extents; ///* sum of bboxes of all items on the layer BOX2I dirtyExtents; ///* sum of bboxes of all dirty items on the layer + RenderTarget target; ///* where the layer should be rendered }; // Convenience typedefs diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 59949e8746..cc21eaf0cf 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -207,7 +207,7 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) // so there is no point in caching them for( LAYER_NUM layer = FIRST_NETNAME_LAYER; layer <= LAST_NETNAME_LAYER; ++layer ) { - view->SetLayerCached( layer, false ); + view->SetLayerTarget( layer, KiGfx::TARGET_NONCACHED ); } // Load layer & elements visibility settings From 27332a8a17f90ff27d487593eb32ec9e90c42c5a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 24 Jul 2013 14:22:00 +0200 Subject: [PATCH 175/415] Header containing GLSL source code is generated only after change of any of shader source files. --- CMakeModules/Shaders.cmake | 52 +++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/CMakeModules/Shaders.cmake b/CMakeModules/Shaders.cmake index f4566dd622..68036f9728 100644 --- a/CMakeModules/Shaders.cmake +++ b/CMakeModules/Shaders.cmake @@ -4,6 +4,19 @@ # number of input files list( LENGTH inputFiles shadersNumber ) +# check if GLSL source files were updated since the last time +set( update "FALSE" ) +foreach( inputFile ${inputFiles} ) + if( ${inputFile} IS_NEWER_THAN ${outputFile} ) + set( update "TRUE" ) + endif( ${inputFile} IS_NEWER_THAN ${outputFile} ) +endforeach( inputFile ${inputFiles} ) + +if( NOT update ) + message( "Headers are up-to-date" ) + return() +endif( NOT update ) + # write header file( WRITE ${outputFile} "// Do not edit this file, it is autogenerated by CMake. @@ -14,28 +27,27 @@ const unsigned int shaders_number = ${shadersNumber}; const char *shaders_src[] = {\n" ) foreach( inputFile ${inputFiles} ) - # put the input file name into the output file - file( APPEND ${outputFile} "\n// ${inputFile}" ) - - # process the input file - file( READ ${inputFile} contents ) - - # remove /* */ comments - string( REGEX REPLACE "/\\*.*\\*/" "" contents "${contents}" ) - # remove // comments - string( REGEX REPLACE "//[^\n]*" "" contents "${contents}" ) - # remove whitespaces at the beginning of each line - string( REGEX REPLACE "\n([\t ])*" "\n" contents "${contents}" ) - # remove unnecessary spaces - string( REGEX REPLACE " *([\\*/+&\\|,=<>\(\)]) *" "\\1" contents "${contents}" ) - # remove empty lines & wrap every line in "" and add '\n' at the end of each line - string( REGEX REPLACE "\n+" "\\\\n\"\n\"" contents "${contents}" ) - # remove unnecessary " & \n from the beginning and the end of contents - string( REGEX REPLACE "^\\\\n\"" "" contents "${contents}" ) - string( REGEX REPLACE "\"$" "," contents "${contents}" ) + # put the input file name into the output file + file( APPEND ${outputFile} "\n// ${inputFile}" ) - file( APPEND ${outputFile} "${contents}" ) + # process the input file + file( READ ${inputFile} contents ) + # remove /* */ comments + string( REGEX REPLACE "/\\*.*\\*/" "" contents "${contents}" ) + # remove // comments + string( REGEX REPLACE "//[^\n]*" "" contents "${contents}" ) + # remove whitespaces at the beginning of each line + string( REGEX REPLACE "\n([\t ])*" "\n" contents "${contents}" ) + # remove unnecessary spaces + string( REGEX REPLACE " *([\\*/+&\\|,=<>\(\)]) *" "\\1" contents "${contents}" ) + # remove empty lines & wrap every line in "" and add '\n' at the end of each line + string( REGEX REPLACE "\n+" "\\\\n\"\n\"" contents "${contents}" ) + # remove unnecessary " & \n from the beginning and the end of contents + string( REGEX REPLACE "^\\\\n\"" "" contents "${contents}" ) + string( REGEX REPLACE "\"$" "," contents "${contents}" ) + + file( APPEND ${outputFile} "${contents}" ) endforeach( inputFile ${inputFiles} ) # write footer From 8c74dcde28e647196df4041c6a8c61133ca4dd70 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 24 Jul 2013 15:06:59 +0200 Subject: [PATCH 176/415] Fixed blending function for OpenGL compositing. Corrected documentation, removed unnecessary functions. --- common/gal/opengl/opengl_compositor.cpp | 104 +++++++++++------------- common/gal/opengl/opengl_gal.cpp | 4 +- include/gal/compositor.h | 11 +-- include/gal/opengl/opengl_compositor.h | 35 ++++---- 4 files changed, 67 insertions(+), 87 deletions(-) diff --git a/common/gal/opengl/opengl_compositor.cpp b/common/gal/opengl/opengl_compositor.cpp index 1b768388c8..ab8eb59188 100644 --- a/common/gal/opengl/opengl_compositor.cpp +++ b/common/gal/opengl/opengl_compositor.cpp @@ -1,4 +1,4 @@ -/*i +/* * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2013 CERN @@ -103,58 +103,56 @@ unsigned int OPENGL_COMPOSITOR::GetBuffer() { wxASSERT( m_initialized ); - if( m_buffers.size() < m_maxBuffers ) - { - // GL_COLOR_ATTACHMENTn are consecutive integers - GLuint attachmentPoint = GL_COLOR_ATTACHMENT0 + usedBuffers(); - GLuint textureTarget; + if( m_buffers.size() >= m_maxBuffers ) + return 0; // Unfortunately we have no more free buffers left - // Generate the texture for the pixel storage - glGenTextures( 1, &textureTarget ); - glBindTexture( GL_TEXTURE_2D, textureTarget ); + // GL_COLOR_ATTACHMENTn are consecutive integers + GLuint attachmentPoint = GL_COLOR_ATTACHMENT0 + usedBuffers(); + GLuint textureTarget; - // Set texture parameters - glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, m_width, m_height, 0, GL_RGBA, - GL_UNSIGNED_BYTE, NULL ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); + // Generate the texture for the pixel storage + glGenTextures( 1, &textureTarget ); + glBindTexture( GL_TEXTURE_2D, textureTarget ); - // Bind the texture to the specific attachment point, clear and rebind the screen - glBindFramebuffer( GL_FRAMEBUFFER, m_framebuffer ); - m_currentFbo = m_framebuffer; - glFramebufferTexture2D( GL_FRAMEBUFFER, attachmentPoint, GL_TEXTURE_2D, textureTarget, 0 ); - ClearBuffer(); - glBindFramebuffer( GL_FRAMEBUFFER, 0 ); - m_currentFbo = 0; + // Set texture parameters + glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE ); + glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, m_width, m_height, 0, GL_RGBA, + GL_UNSIGNED_BYTE, NULL ); + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST ); + glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); - // Store the new buffer - BUFFER_ITEM buffer = { textureTarget, attachmentPoint }; - m_buffers.push_back( buffer ); + // Bind the texture to the specific attachment point, clear and rebind the screen + glBindFramebuffer( GL_FRAMEBUFFER, m_framebuffer ); + m_currentFbo = m_framebuffer; + glFramebufferTexture2D( GL_FRAMEBUFFER, attachmentPoint, GL_TEXTURE_2D, textureTarget, 0 ); + ClearBuffer(); + glBindFramebuffer( GL_FRAMEBUFFER, 0 ); + m_currentFbo = 0; - return usedBuffers(); - } + // Store the new buffer + OPENGL_BUFFER buffer = { textureTarget, attachmentPoint }; + m_buffers.push_back( buffer ); - // Unfortunately we have no more buffers left - return 0; + return usedBuffers(); } void OPENGL_COMPOSITOR::SetBuffer( unsigned int aBufferHandle ) { - if( aBufferHandle <= usedBuffers() ) - { - // Change the rendering destination to the selected attachment point - if( m_currentFbo != m_framebuffer ) - { - glBindFramebuffer( GL_FRAMEBUFFER, m_framebuffer ); - m_currentFbo = m_framebuffer; - } + if( aBufferHandle > usedBuffers() ) + return; - if( m_current != aBufferHandle - 1 ) - { - glDrawBuffer( m_buffers[m_current].attachmentPoint ); - m_current = aBufferHandle - 1; - } + // Change the rendering destination to the selected attachment point + if( m_currentFbo != m_framebuffer ) + { + glBindFramebuffer( GL_FRAMEBUFFER, m_framebuffer ); + m_currentFbo = m_framebuffer; + } + + if( m_current != aBufferHandle - 1 ) + { + m_current = aBufferHandle - 1; + glDrawBuffer( m_buffers[m_current].attachmentPoint ); } } @@ -168,15 +166,7 @@ void OPENGL_COMPOSITOR::ClearBuffer() } -void OPENGL_COMPOSITOR::BlitBuffer( unsigned int aBufferHandle ) -{ - wxASSERT( m_initialized ); - - wxASSERT_MSG( false, wxT( "Not implemented yet" ) ); -} - - -void OPENGL_COMPOSITOR::DrawBuffer( unsigned int aBufferHandle, double aDepth ) +void OPENGL_COMPOSITOR::DrawBuffer( unsigned int aBufferHandle ) { wxASSERT( m_initialized ); @@ -202,18 +192,18 @@ void OPENGL_COMPOSITOR::DrawBuffer( unsigned int aBufferHandle, double aDepth ) glBegin( GL_TRIANGLES ); glTexCoord2f( 0.0f, 1.0f ); - glVertex3f( -1.0f, -1.0f, aDepth ); + glVertex2f( -1.0f, -1.0f ); glTexCoord2f( 1.0f, 1.0f ); - glVertex3f( 1.0f, -1.0f, aDepth ); + glVertex2f( 1.0f, -1.0f ); glTexCoord2f( 1.0f, 0.0f ); - glVertex3f( 1.0f, 1.0f, aDepth ); + glVertex2f( 1.0f, 1.0f ); glTexCoord2f( 0.0f, 1.0f ); - glVertex3f( -1.0f, -1.0f, aDepth ); + glVertex2f( -1.0f, -1.0f ); glTexCoord2f( 1.0f, 0.0f ); - glVertex3f( 1.0f, 1.0f, aDepth ); + glVertex2f( 1.0f, 1.0f ); glTexCoord2f( 0.0f, 0.0f ); - glVertex3f( -1.0f, 1.0f, aDepth ); + glVertex2f( -1.0f, 1.0f ); glEnd(); glPopMatrix(); @@ -229,7 +219,7 @@ void OPENGL_COMPOSITOR::clean() glDeleteFramebuffers( 1, &m_framebuffer ); glDeleteRenderbuffers( 1, &m_depthBuffer ); - Buffers::const_iterator it; + OPENGL_BUFFERS::const_iterator it; for( it = m_buffers.begin(); it != m_buffers.end(); ++it ) { glDeleteTextures( 1, &it->textureTarget ); diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index bac3c92280..83fb1b7933 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -333,8 +333,8 @@ void OPENGL_GAL::EndDrawing() // Draw the remaining contents, blit the rendering targets to the screen, swap the buffers glFlush(); - compositor.DrawBuffer( mainBuffer, -1.0 ); - compositor.DrawBuffer( overlayBuffer, 0.0 ); + compositor.DrawBuffer( mainBuffer ); + compositor.DrawBuffer( overlayBuffer ); SwapBuffers(); delete clientDC; diff --git a/include/gal/compositor.h b/include/gal/compositor.h index e678b00bdc..db601d5617 100644 --- a/include/gal/compositor.h +++ b/include/gal/compositor.h @@ -80,22 +80,13 @@ public: */ virtual void ClearBuffer() = 0; - /** - * Function BlitBuffer() - * pastes the content of the buffer to the current buffer (set by SetBuffer() function). - * - * @param aBufferHandle is the handle to the buffer that is going to be pasted. - */ - virtual void BlitBuffer( unsigned int aBufferHandle ) = 0; - /** * Function DrawBuffer() * draws the selected buffer on the screen. * * @param aBufferHandle is the handle of the buffer to be drawn. - * @param aDepth is the depth on which the buffer should be drawn. // TODO mention if higher depth value means close to the screen or is it opposite */ - virtual void DrawBuffer( unsigned int aBufferHandle, double aDepth ) = 0; + virtual void DrawBuffer( unsigned int aBufferHandle ) = 0; protected: unsigned int m_width; ///< Width of the buffer (in pixels) diff --git a/include/gal/opengl/opengl_compositor.h b/include/gal/opengl/opengl_compositor.h index f58cd493d9..bccb6231bb 100644 --- a/include/gal/opengl/opengl_compositor.h +++ b/include/gal/opengl/opengl_compositor.h @@ -33,7 +33,7 @@ #include #include -#include +#include namespace KiGfx { @@ -44,41 +44,40 @@ public: OPENGL_COMPOSITOR(); virtual ~OPENGL_COMPOSITOR(); - ///< @copydoc COMPOSITOR::Initialize() + /// @copydoc COMPOSITOR::Initialize() virtual void Initialize(); - ///< @copydoc COMPOSITOR::Resize() + /// @copydoc COMPOSITOR::Resize() virtual void Resize( unsigned int aWidth, unsigned int aHeight ); - ///< @copydoc COMPOSITOR::GetBuffer() + /// @copydoc COMPOSITOR::GetBuffer() virtual unsigned int GetBuffer(); - ///< @copydoc COMPOSITOR::SetBuffer() + /// @copydoc COMPOSITOR::SetBuffer() virtual void SetBuffer( unsigned int aBufferHandle ); - ///< @copydoc COMPOSITOR::ClearBuffer() + /// @copydoc COMPOSITOR::ClearBuffer() virtual void ClearBuffer(); - ///< @copydoc COMPOSITOR::BlitBuffer() - virtual void BlitBuffer( unsigned int aBufferHandle ); - - ///< @copydoc COMPOSITOR::DrawBuffer() - virtual void DrawBuffer( unsigned int aBufferHandle, double aDepth ); + /// @copydoc COMPOSITOR::DrawBuffer() + virtual void DrawBuffer( unsigned int aBufferHandle ); protected: typedef struct { GLuint textureTarget; ///< Main texture handle - GLuint attachmentPoint; - } BUFFER_ITEM; + GLuint attachmentPoint; ///< Point to which an image from texture is attached + } OPENGL_BUFFER; - bool m_initialized; - unsigned int m_current; + bool m_initialized; ///< Initialization status flag + unsigned int m_current; ///< Currently used buffer handle GLuint m_framebuffer; ///< Main FBO handle GLuint m_depthBuffer; ///< Depth buffer handle unsigned int m_maxBuffers; ///< Maximal amount of buffers - typedef std::vector Buffers; - Buffers m_buffers; + typedef std::deque OPENGL_BUFFERS; + + /// Stores information about initialized buffers + OPENGL_BUFFERS m_buffers; /// Store the currently used FBO name in case there was more than one compositor used static GLuint m_currentFbo; @@ -89,7 +88,7 @@ protected: */ void clean(); - ///< Returns number of used buffers + /// Returns number of used buffers unsigned int usedBuffers() { return m_buffers.size(); From 60471ecc1ea39126998aef7752c9c7553b8f5198 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 25 Jul 2013 14:40:04 +0200 Subject: [PATCH 177/415] Added a layer compositor for the Cairo backend. --- common/CMakeLists.txt | 1 + common/gal/cairo/cairo_compositor.cpp | 161 ++++++++++++++ common/gal/cairo/cairo_gal.cpp | 303 ++++++++++++++------------ include/gal/cairo/cairo_compositor.h | 108 +++++++++ include/gal/cairo/cairo_gal.h | 39 ++-- 5 files changed, 460 insertions(+), 152 deletions(-) create mode 100644 common/gal/cairo/cairo_compositor.cpp create mode 100644 include/gal/cairo/cairo_compositor.h diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 9e28a9fb3b..9b7c285168 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -50,6 +50,7 @@ set(GAL_SRCS # Cairo GAL gal/cairo/cairo_gal.cpp + gal/cairo/cairo_compositor.cpp ) add_library(gal STATIC ${GAL_SRCS}) diff --git a/common/gal/cairo/cairo_compositor.cpp b/common/gal/cairo/cairo_compositor.cpp new file mode 100644 index 0000000000..53c8cc431e --- /dev/null +++ b/common/gal/cairo/cairo_compositor.cpp @@ -0,0 +1,161 @@ +/*i + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http:O//www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file cairo_compositor.cpp + * @brief Class that handles multitarget rendering (ie. to different textures/surfaces) and + * later compositing into a single image (Cairo flavour). + */ + +#include +#include + +using namespace KiGfx; + +CAIRO_COMPOSITOR::CAIRO_COMPOSITOR( cairo_t** aMainContext ) : + m_current( 0 ), m_currentContext( aMainContext ), m_mainContext( *aMainContext ) +{ + // Obtain the transformation matrix used in the main context + cairo_get_matrix( m_mainContext, &m_matrix ); +} + + +CAIRO_COMPOSITOR::~CAIRO_COMPOSITOR() +{ + clean(); +} + + +void CAIRO_COMPOSITOR::Initialize() +{ + // Nothing has to be done +} + + +void CAIRO_COMPOSITOR::Resize( unsigned int aWidth, unsigned int aHeight ) +{ + clean(); + + m_width = aWidth; + m_height = aHeight; + + m_stride = cairo_format_stride_for_width( CAIRO_FORMAT_ARGB32, m_width ); + m_bufferSize = m_stride * m_height; +} + + +unsigned int CAIRO_COMPOSITOR::GetBuffer() +{ + // Pixel storage + BitmapPtr bitmap( new unsigned int[m_bufferSize] ); + + // Create the Cairo surface + cairo_surface_t* surface = cairo_image_surface_create_for_data( + (unsigned char*) bitmap.get(), + CAIRO_FORMAT_ARGB32, m_width, + m_height, m_stride ); + cairo_t* context = cairo_create( surface ); + #ifdef __WXDEBUG__ + cairo_status_t status = cairo_status( context ); + wxASSERT_MSG( status == CAIRO_STATUS_SUCCESS, "Cairo context creation error" ); + #endif /* __WXDEBUG__ */ + + // Set default settings for the buffer + cairo_set_antialias( context, CAIRO_ANTIALIAS_SUBPIXEL ); + cairo_set_line_join( context, CAIRO_LINE_JOIN_ROUND ); + cairo_set_line_cap( context, CAIRO_LINE_CAP_ROUND ); + + // Use the same transformation matrix as the main context + cairo_set_matrix( context, &m_matrix ); + + // Store the new buffer + CAIRO_BUFFER buffer = { context, surface, bitmap }; + m_buffers.push_back( buffer ); + + return usedBuffers(); +} + + +void CAIRO_COMPOSITOR::SetBuffer( unsigned int aBufferHandle ) +{ + if( aBufferHandle <= usedBuffers() ) + { + m_current = aBufferHandle - 1; + *m_currentContext = m_buffers[m_current].context; + } +#ifdef __WXDEBUG__ + else + wxLogDebug( wxT( "Tried to use a not existing buffer" ) ); +#endif +} + + +void CAIRO_COMPOSITOR::ClearBuffer() +{ + // Reset the transformation matrix, so it is possible to composite images using + // screen coordinates instead of world coordinates + cairo_identity_matrix( m_buffers[m_current].context ); + + cairo_set_source_rgba( m_buffers[m_current].context, 0.0, 0.0, 0.0, 0.0 ); + cairo_rectangle( m_buffers[m_current].context, 0.0, 0.0, m_width, m_height ); + cairo_fill( m_buffers[m_current].context ); + + // Restore the transformation matrix + cairo_set_matrix( m_buffers[m_current].context, &m_matrix ); +} + + +void CAIRO_COMPOSITOR::DrawBuffer( unsigned int aBufferHandle ) +{ + if( aBufferHandle <= usedBuffers() ) + { + // Reset the transformation matrix, so it is possible to composite images using + // screen coordinates instead of world coordinates + cairo_identity_matrix( m_mainContext ); + + cairo_set_source_surface( m_mainContext, m_buffers[aBufferHandle - 1].surface, 0.0, 0.0 ); + cairo_paint( m_mainContext ); + + // Restore the transformation matrix + cairo_set_matrix( m_mainContext, &m_matrix ); + } +#ifdef __WXDEBUG__ + else + wxLogDebug( wxT( "Tried to use a not existing buffer" ) ); +#endif +} + + +void CAIRO_COMPOSITOR::clean() +{ + CAIRO_BUFFERS::const_iterator it; + + for( it = m_buffers.begin(); it != m_buffers.end(); ++it ) + { + cairo_destroy( it->context ); + cairo_surface_destroy( it->surface ); + } + + m_buffers.clear(); +} diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index e6a2a59d82..c17b0c7641 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #include @@ -89,13 +90,12 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, CAIRO_GAL::~CAIRO_GAL() { deinitSurface(); + deleteBitmaps(); delete cursorPixels; delete cursorPixelsSaved; ClearCache(); - - deleteBitmaps(); } @@ -107,11 +107,10 @@ void CAIRO_GAL::onPaint( wxPaintEvent& aEvent ) void CAIRO_GAL::ResizeScreen( int aWidth, int aHeight ) { - deleteBitmaps(); - screenSize = VECTOR2D( aWidth, aHeight ); // Recreate the bitmaps + deleteBitmaps(); allocateBitmaps(); SetSize( wxSize( aWidth, aHeight ) ); @@ -128,28 +127,19 @@ void CAIRO_GAL::skipMouseEvent( wxMouseEvent& aEvent ) void CAIRO_GAL::initSurface() { - if( isInitialized ) - return; - - // The size of the client area needs to be greater than zero - clientRectangle = parentWindow->GetClientRect(); - - if( clientRectangle.width == 0 || clientRectangle.height == 0 ) - throw EXCEPTION_ZERO_CLIENT_RECTANGLE; + wxASSERT( !isInitialized ); // Create the Cairo surface - cairoSurface = cairo_image_surface_create_for_data( (unsigned char*) bitmapBuffer, - CAIRO_FORMAT_RGB24, clientRectangle.width, - clientRectangle.height, stride ); - cairoImage = cairo_create( cairoSurface ); + surface = cairo_image_surface_create_for_data( (unsigned char*) bitmapBuffer, GAL_FORMAT, + screenSize.x, screenSize.y, stride ); + context = cairo_create( surface ); #ifdef __WXDEBUG__ - cairo_status_t status = cairo_status( cairoImage ); + cairo_status_t status = cairo_status( context ); wxASSERT_MSG( status == CAIRO_STATUS_SUCCESS, "Cairo context creation error" ); #endif /* __WXDEBUG__ */ + currentContext = context; - // ----------------------------------------------------------------- - - cairo_set_antialias( cairoImage, CAIRO_ANTIALIAS_SUBPIXEL ); + cairo_set_antialias( context, CAIRO_ANTIALIAS_SUBPIXEL ); // Clear the screen ClearScreen(); @@ -162,21 +152,20 @@ void CAIRO_GAL::initSurface() worldScreenMatrix.m_data[1][1], worldScreenMatrix.m_data[0][2], worldScreenMatrix.m_data[1][2] ); - cairo_set_matrix( cairoImage, &cairoWorldScreenMatrix ); + cairo_set_matrix( context, &cairoWorldScreenMatrix ); isSetAttributes = false; // Start drawing with a new path - cairo_new_path( cairoImage ); + cairo_new_path( context ); isElementAdded = true; - cairo_set_line_join( cairoImage, CAIRO_LINE_JOIN_ROUND ); - cairo_set_line_cap( cairoImage, CAIRO_LINE_CAP_ROUND ); + cairo_set_line_join( context, CAIRO_LINE_JOIN_ROUND ); + cairo_set_line_cap( context, CAIRO_LINE_CAP_ROUND ); lineWidth = 0; isDeleteSavedPixels = true; - isInitialized = true; } @@ -187,13 +176,25 @@ void CAIRO_GAL::deinitSurface() return; // Destroy Cairo objects - cairo_destroy( cairoImage ); - cairo_surface_destroy( cairoSurface ); + cairo_destroy( context ); + cairo_surface_destroy( surface ); isInitialized = false; } +void CAIRO_GAL::setCompositor() +{ + // Recreate the compositor with the new Cairo context + compositor.reset( new CAIRO_COMPOSITOR( ¤tContext ) ); + compositor->Resize( screenSize.x, screenSize.y ); + + // Prepare buffers + mainBuffer = compositor->GetBuffer(); + overlayBuffer = compositor->GetBuffer(); +} + + unsigned int CAIRO_GAL::getNewGroupNumber() { wxASSERT_MSG( groups.size() < std::numeric_limits::max(), @@ -211,8 +212,10 @@ unsigned int CAIRO_GAL::getNewGroupNumber() void CAIRO_GAL::BeginDrawing() throw( int ) { initSurface(); + setCompositor(); - cairo_push_group( cairoImage ); + // Cairo grouping prevents display of overlapping items on the same layer in the lighter color + cairo_push_group( currentContext ); } @@ -221,13 +224,18 @@ void CAIRO_GAL::EndDrawing() // Force remaining objects to be drawn Flush(); - cairo_pop_group_to_source( cairoImage ); - cairo_paint_with_alpha( cairoImage, fillColor.a ); + // Cairo grouping prevents display of overlapping items on the same layer in the lighter color + cairo_pop_group_to_source( currentContext ); + cairo_paint_with_alpha( currentContext, fillColor.a ); + + // Merge buffers on the screen + compositor->DrawBuffer( mainBuffer ); + compositor->DrawBuffer( overlayBuffer ); // This code was taken from the wxCairo example - it's not the most efficient one // Here is a good place for optimizations - // Now translate the raw image data from the format stored + // Now translate the raw context data from the format stored // by cairo into a format understood by wxImage. unsigned char* wxOutputPtr = wxOutput; @@ -282,14 +290,36 @@ void CAIRO_GAL::RestoreScreen() void CAIRO_GAL::SetTarget( RenderTarget aTarget ) { - wxASSERT_MSG( false, wxT( "Not implemented yet" ) ); + // If the compositor is not set, that means that there is a recaching process going on + // and we do not need the compositor now + if( !compositor ) + return; + + // Cairo grouping prevents display of overlapping items on the same layer in the lighter color + cairo_pop_group_to_source( currentContext ); + cairo_paint_with_alpha( currentContext, fillColor.a ); + + switch( aTarget ) + { + default: + case TARGET_CACHED: + case TARGET_NONCACHED: + compositor->SetBuffer( mainBuffer ); + break; + + case TARGET_OVERLAY: + compositor->SetBuffer( overlayBuffer ); + break; + } + + cairo_push_group( currentContext ); } void CAIRO_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { - cairo_move_to( cairoImage, aStartPoint.x, aStartPoint.y ); - cairo_line_to( cairoImage, aEndPoint.x, aEndPoint.y ); + cairo_move_to( currentContext, aStartPoint.x, aStartPoint.y ); + cairo_line_to( currentContext, aEndPoint.x, aEndPoint.y ); isElementAdded = true; } @@ -299,32 +329,34 @@ void CAIRO_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPo { if( isFillEnabled ) { + // Filled tracks mode SetLineWidth( aWidth ); - cairo_move_to( cairoImage, (double) aStartPoint.x, (double) aStartPoint.y ); - cairo_line_to( cairoImage, (double) aEndPoint.x, (double) aEndPoint.y ); + cairo_move_to( currentContext, (double) aStartPoint.x, (double) aStartPoint.y ); + cairo_line_to( currentContext, (double) aEndPoint.x, (double) aEndPoint.y ); } else { + // Outline mode for tracks VECTOR2D startEndVector = aEndPoint - aStartPoint; double lineAngle = atan2( startEndVector.y, startEndVector.x ); double lineLength = startEndVector.EuclideanNorm(); - cairo_save( cairoImage ); + cairo_save( currentContext ); - cairo_translate( cairoImage, aStartPoint.x, aStartPoint.y ); - cairo_rotate( cairoImage, lineAngle ); + cairo_translate( currentContext, aStartPoint.x, aStartPoint.y ); + cairo_rotate( currentContext, lineAngle ); - cairo_arc( cairoImage, 0.0, 0.0, aWidth / 2.0, M_PI / 2.0, 3.0 * M_PI / 2.0 ); - cairo_arc( cairoImage, lineLength, 0.0, aWidth / 2.0, -M_PI / 2.0, M_PI / 2.0 ); + cairo_arc( currentContext, 0.0, 0.0, aWidth / 2.0, M_PI / 2.0, 3.0 * M_PI / 2.0 ); + cairo_arc( currentContext, lineLength, 0.0, aWidth / 2.0, -M_PI / 2.0, M_PI / 2.0 ); - cairo_move_to( cairoImage, 0.0, aWidth / 2.0 ); - cairo_line_to( cairoImage, lineLength, aWidth / 2.0 ); + cairo_move_to( currentContext, 0.0, aWidth / 2.0 ); + cairo_line_to( currentContext, lineLength, aWidth / 2.0 ); - cairo_move_to( cairoImage, 0.0, -aWidth / 2.0 ); - cairo_line_to( cairoImage, lineLength, -aWidth / 2.0 ); + cairo_move_to( currentContext, 0.0, -aWidth / 2.0 ); + cairo_line_to( currentContext, lineLength, -aWidth / 2.0 ); - cairo_restore( cairoImage ); + cairo_restore( currentContext ); } isElementAdded = true; @@ -334,8 +366,8 @@ void CAIRO_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPo void CAIRO_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) { // A circle is drawn using an arc - cairo_new_sub_path( cairoImage ); - cairo_arc( cairoImage, aCenterPoint.x, aCenterPoint.y, aRadius, 0.0, 2 * M_PI ); + cairo_new_sub_path( currentContext ); + cairo_arc( currentContext, aCenterPoint.x, aCenterPoint.y, aRadius, 0.0, 2 * M_PI ); isElementAdded = true; } @@ -346,8 +378,8 @@ void CAIRO_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double aS { SWAP( aStartAngle, >, aEndAngle ); - cairo_new_sub_path( cairoImage ); - cairo_arc( cairoImage, aCenterPoint.x, aCenterPoint.y, aRadius, aStartAngle, aEndAngle ); + cairo_new_sub_path( currentContext ); + cairo_arc( currentContext, aCenterPoint.x, aCenterPoint.y, aRadius, aStartAngle, aEndAngle ); isElementAdded = true; } @@ -355,21 +387,13 @@ void CAIRO_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double aS void CAIRO_GAL::DrawPolyline( std::deque& aPointList ) { - bool isFirstPoint = true; - // Iterate over the point list and draw the segments - std::deque::const_iterator it; - for( it = aPointList.begin(); it != aPointList.end(); ++it ) + std::deque::const_iterator it = aPointList.begin(); + + cairo_move_to( currentContext, it->x, it->y ); + for( ++it; it != aPointList.end(); ++it ) { - if( isFirstPoint ) - { - cairo_move_to( cairoImage, it->x, it->y ); - isFirstPoint = false; - } - else - { - cairo_line_to( cairoImage, it->x, it->y ); - } + cairo_line_to( currentContext, it->x, it->y ); } isElementAdded = true; @@ -378,21 +402,13 @@ void CAIRO_GAL::DrawPolyline( std::deque& aPointList ) void CAIRO_GAL::DrawPolygon( const std::deque& aPointList ) { - bool isFirstPoint = true; - // Iterate over the point list and draw the polygon - std::deque::const_iterator it; - for( it = aPointList.begin(); it != aPointList.end(); ++it ) + std::deque::const_iterator it = aPointList.begin(); + + cairo_move_to( currentContext, it->x, it->y ); + for( ++it; it != aPointList.end(); ++it ) { - if( isFirstPoint ) - { - cairo_move_to( cairoImage, it->x, it->y ); - isFirstPoint = false; - } - else - { - cairo_line_to( cairoImage, it->x, it->y ); - } + cairo_line_to( currentContext, it->x, it->y ); } isElementAdded = true; @@ -406,11 +422,11 @@ void CAIRO_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEnd VECTOR2D diagonalPointB( aStartPoint.x, aEndPoint.y ); // The path is composed from 4 segments - cairo_move_to( cairoImage, aStartPoint.x, aStartPoint.y ); - cairo_line_to( cairoImage, diagonalPointA.x, diagonalPointA.y ); - cairo_line_to( cairoImage, aEndPoint.x, aEndPoint.y ); - cairo_line_to( cairoImage, diagonalPointB.x, diagonalPointB.y ); - cairo_close_path( cairoImage ); + cairo_move_to( currentContext, aStartPoint.x, aStartPoint.y ); + cairo_line_to( currentContext, diagonalPointA.x, diagonalPointA.y ); + cairo_line_to( currentContext, aEndPoint.x, aEndPoint.y ); + cairo_line_to( currentContext, diagonalPointB.x, diagonalPointB.y ); + cairo_close_path( currentContext ); isElementAdded = true; } @@ -419,10 +435,11 @@ void CAIRO_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEnd void CAIRO_GAL::DrawCurve( const VECTOR2D& aStartPoint, const VECTOR2D& aControlPointA, const VECTOR2D& aControlPointB, const VECTOR2D& aEndPoint ) { - cairo_move_to( cairoImage, aStartPoint.x, aStartPoint.y ); - cairo_curve_to( cairoImage, aControlPointA.x, aControlPointA.y, aControlPointB.x, + cairo_move_to( currentContext, aStartPoint.x, aStartPoint.y ); + cairo_curve_to( currentContext, aControlPointA.x, aControlPointA.y, aControlPointB.x, aControlPointB.y, aEndPoint.x, aEndPoint.y ); - cairo_line_to( cairoImage, aEndPoint.x, aEndPoint.y ); + cairo_line_to( currentContext, aEndPoint.x, aEndPoint.y ); + isElementAdded = true; } @@ -466,7 +483,6 @@ void CAIRO_GAL::SetIsStroke( bool aIsStrokeEnabled ) void CAIRO_GAL::SetStrokeColor( const COLOR4D& aColor ) { storePath(); - strokeColor = aColor; if( isGrouping ) @@ -506,12 +522,6 @@ void CAIRO_GAL::SetLineWidth( double aLineWidth ) lineWidth = aLineWidth; - // Make lines appear at least 1 pixel wide, no matter of zoom - double x = 1.0, y = 1.0; - cairo_device_to_user_distance( cairoImage, &x, &y ); - double minWidth = std::min( fabs( x ), fabs( y ) ); - cairo_set_line_width( cairoImage, std::max( aLineWidth, minWidth ) ); - if( isGrouping ) { GroupElement groupElement; @@ -519,16 +529,23 @@ void CAIRO_GAL::SetLineWidth( double aLineWidth ) groupElement.arguments[0] = aLineWidth; currentGroup->push_back( groupElement ); } + else + { + // Make lines appear at least 1 pixel wide, no matter of zoom + double x = 1.0, y = 1.0; + cairo_device_to_user_distance( currentContext, &x, &y ); + double minWidth = std::min( fabs( x ), fabs( y ) ); + cairo_set_line_width( currentContext, std::max( aLineWidth, minWidth ) ); + } } void CAIRO_GAL::ClearScreen() { - // Clear screen - cairo_set_source_rgba( cairoImage, - backgroundColor.r, backgroundColor.g, backgroundColor.b, 1.0 ); - cairo_rectangle( cairoImage, 0.0, 0.0, screenSize.x, screenSize.y ); - cairo_fill( cairoImage ); + cairo_set_source_rgb( currentContext, + backgroundColor.r, backgroundColor.g, backgroundColor.b ); + cairo_rectangle( currentContext, 0.0, 0.0, screenSize.x, screenSize.y ); + cairo_fill( currentContext ); } @@ -540,10 +557,10 @@ void CAIRO_GAL::SetLayerDepth( double aLayerDepth ) { storePath(); - cairo_pop_group_to_source( cairoImage ); - cairo_paint_with_alpha( cairoImage, fillColor.a ); - - cairo_push_group( cairoImage ); +// cairo_pop_group_to_source( currentContext ); +// cairo_paint_with_alpha( currentContext, fillColor.a ); +// +// cairo_push_group( currentContext ); } } @@ -560,7 +577,7 @@ void CAIRO_GAL::Transform( MATRIX3x3D aTransformation ) aTransformation.m_data[0][2], aTransformation.m_data[1][2] ); - cairo_transform( cairoImage, &cairoTransformation ); + cairo_transform( currentContext, &cairoTransformation ); } @@ -568,8 +585,6 @@ void CAIRO_GAL::Rotate( double aAngle ) { storePath(); - cairo_rotate( cairoImage, aAngle ); - if( isGrouping ) { GroupElement groupElement; @@ -577,6 +592,10 @@ void CAIRO_GAL::Rotate( double aAngle ) groupElement.arguments[0] = aAngle; currentGroup->push_back( groupElement ); } + else + { + cairo_rotate( currentContext, aAngle ); + } } @@ -584,8 +603,6 @@ void CAIRO_GAL::Translate( const VECTOR2D& aTranslation ) { storePath(); - cairo_translate( cairoImage, aTranslation.x, aTranslation.y ); - if( isGrouping ) { GroupElement groupElement; @@ -594,6 +611,10 @@ void CAIRO_GAL::Translate( const VECTOR2D& aTranslation ) groupElement.arguments[1] = aTranslation.y; currentGroup->push_back( groupElement ); } + else + { + cairo_translate( currentContext, aTranslation.x, aTranslation.y ); + } } @@ -601,8 +622,6 @@ void CAIRO_GAL::Scale( const VECTOR2D& aScale ) { storePath(); - cairo_scale( cairoImage, aScale.x, aScale.y ); - if( isGrouping ) { GroupElement groupElement; @@ -611,6 +630,10 @@ void CAIRO_GAL::Scale( const VECTOR2D& aScale ) groupElement.arguments[1] = aScale.y; currentGroup->push_back( groupElement ); } + else + { + cairo_scale( currentContext, aScale.x, aScale.y ); + } } @@ -618,14 +641,16 @@ void CAIRO_GAL::Save() { storePath(); - cairo_save( cairoImage ); - if( isGrouping ) { GroupElement groupElement; groupElement.command = CMD_SAVE; currentGroup->push_back( groupElement ); } + else + { + cairo_save( currentContext ); + } } @@ -633,14 +658,16 @@ void CAIRO_GAL::Restore() { storePath(); - cairo_restore( cairoImage ); - if( isGrouping ) { GroupElement groupElement; groupElement.command = CMD_RESTORE; currentGroup->push_back( groupElement ); } + else + { + cairo_restore( currentContext ); + } } @@ -734,50 +761,50 @@ void CAIRO_GAL::DrawGroup( int aGroupNumber ) { // Make lines appear at least 1 pixel wide, no matter of zoom double x = 1.0, y = 1.0; - cairo_device_to_user_distance( cairoImage, &x, &y ); + cairo_device_to_user_distance( currentContext, &x, &y ); double minWidth = std::min( fabs( x ), fabs( y ) ); - cairo_set_line_width( cairoImage, std::max( it->arguments[0], minWidth ) ); + cairo_set_line_width( currentContext, std::max( it->arguments[0], minWidth ) ); } break; case CMD_STROKE_PATH: - cairo_set_source_rgb( cairoImage, strokeColor.r, strokeColor.g, strokeColor.b ); - cairo_append_path( cairoImage, it->cairoPath ); - cairo_stroke( cairoImage ); + cairo_set_source_rgb( currentContext, strokeColor.r, strokeColor.g, strokeColor.b ); + cairo_append_path( currentContext, it->cairoPath ); + cairo_stroke( currentContext ); break; case CMD_FILL_PATH: - cairo_set_source_rgb( cairoImage, fillColor.r, fillColor.g, fillColor.b ); - cairo_append_path( cairoImage, it->cairoPath ); - cairo_fill( cairoImage ); + cairo_set_source_rgb( currentContext, fillColor.r, fillColor.g, fillColor.b ); + cairo_append_path( currentContext, it->cairoPath ); + cairo_fill( currentContext ); break; case CMD_TRANSFORM: cairo_matrix_t matrix; cairo_matrix_init( &matrix, it->arguments[0], it->arguments[1], it->arguments[2], it->arguments[3], it->arguments[4], it->arguments[5] ); - cairo_transform( cairoImage, &matrix ); + cairo_transform( currentContext, &matrix ); break; case CMD_ROTATE: - cairo_rotate( cairoImage, it->arguments[0] ); + cairo_rotate( currentContext, it->arguments[0] ); break; case CMD_TRANSLATE: - cairo_translate( cairoImage, it->arguments[0], it->arguments[1] ); + cairo_translate( currentContext, it->arguments[0], it->arguments[1] ); break; case CMD_SCALE: - cairo_scale( cairoImage, it->arguments[0], it->arguments[1] ); + cairo_scale( currentContext, it->arguments[0], it->arguments[1] ); break; case CMD_SAVE: - cairo_save( cairoImage ); + cairo_save( currentContext ); break; case CMD_RESTORE: - cairo_restore( cairoImage ); + cairo_restore( currentContext ); break; case CMD_CALL_GROUP: @@ -851,14 +878,14 @@ void CAIRO_GAL::storePath() { if( isFillEnabled ) { - cairo_set_source_rgb( cairoImage, fillColor.r, fillColor.g, fillColor.b ); - cairo_fill_preserve( cairoImage ); + cairo_set_source_rgb( currentContext, fillColor.r, fillColor.g, fillColor.b ); + cairo_fill_preserve( currentContext ); } if( isStrokeEnabled ) { - cairo_set_source_rgb( cairoImage, strokeColor.r, strokeColor.g, strokeColor.b ); - cairo_stroke_preserve( cairoImage ); + cairo_set_source_rgb( currentContext, strokeColor.r, strokeColor.g, strokeColor.b ); + cairo_stroke_preserve( currentContext ); } } else @@ -869,7 +896,7 @@ void CAIRO_GAL::storePath() if( isStrokeEnabled ) { GroupElement groupElement; - groupElement.cairoPath = cairo_copy_path( cairoImage ); + groupElement.cairoPath = cairo_copy_path( currentContext ); groupElement.command = CMD_STROKE_PATH; currentGroup->push_back( groupElement ); } @@ -877,13 +904,13 @@ void CAIRO_GAL::storePath() if( isFillEnabled ) { GroupElement groupElement; - groupElement.cairoPath = cairo_copy_path( cairoImage ); + groupElement.cairoPath = cairo_copy_path( currentContext ); groupElement.command = CMD_FILL_PATH; currentGroup->push_back( groupElement ); } } - cairo_new_path( cairoImage ); + cairo_new_path( currentContext ); } } @@ -962,17 +989,17 @@ void CAIRO_GAL::DrawCursor( VECTOR2D aCursorPosition ) void CAIRO_GAL::DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { - cairo_move_to( cairoImage, aStartPoint.x, aStartPoint.y ); - cairo_line_to( cairoImage, aEndPoint.x, aEndPoint.y ); - cairo_set_source_rgba( cairoImage, gridColor.r, gridColor.g, gridColor.b, gridColor.a ); - cairo_stroke( cairoImage ); + cairo_move_to( currentContext, aStartPoint.x, aStartPoint.y ); + cairo_line_to( currentContext, aEndPoint.x, aEndPoint.y ); + cairo_set_source_rgb( currentContext, gridColor.r, gridColor.g, gridColor.b ); + cairo_stroke( currentContext ); } void CAIRO_GAL::allocateBitmaps() { - // Create buffer, use the system independent Cairo image backend - stride = cairo_format_stride_for_width( CAIRO_FORMAT_RGB24, screenSize.x ); + // Create buffer, use the system independent Cairo context backend + stride = cairo_format_stride_for_width( GAL_FORMAT, screenSize.x ); bufferSize = stride * screenSize.y; bitmapBuffer = new unsigned int[bufferSize]; diff --git a/include/gal/cairo/cairo_compositor.h b/include/gal/cairo/cairo_compositor.h new file mode 100644 index 0000000000..24b730b28c --- /dev/null +++ b/include/gal/cairo/cairo_compositor.h @@ -0,0 +1,108 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file cairo_compositor.h + * @brief Class that handles multitarget rendering (ie. to different textures/surfaces) and + * later compositing into a single image (Cairo flavour). + */ + +#ifndef CAIRO_COMPOSITOR_H_ +#define CAIRO_COMPOSITOR_H_ + +#include +#include +#include +#include + +namespace KiGfx +{ + +class CAIRO_COMPOSITOR : public COMPOSITOR +{ +public: + CAIRO_COMPOSITOR( cairo_t** aMainContext ); + virtual ~CAIRO_COMPOSITOR(); + + /// @copydoc COMPOSITOR::Initialize() + virtual void Initialize(); + + /// @copydoc COMPOSITOR::Resize() + virtual void Resize( unsigned int aWidth, unsigned int aHeight ); + + /// @copydoc COMPOSITOR::GetBuffer() + virtual unsigned int GetBuffer(); + + /// @copydoc COMPOSITOR::SetBuffer() + virtual void SetBuffer( unsigned int aBufferHandle ); + + /// @copydoc COMPOSITOR::ClearBuffer() + virtual void ClearBuffer(); + + /// @copydoc COMPOSITOR::DrawBuffer() + virtual void DrawBuffer( unsigned int aBufferHandle ); + +protected: + typedef boost::shared_array BitmapPtr; + typedef struct + { + cairo_t* context; ///< Main texture handle + cairo_surface_t* surface; ///< Point to which an image from texture is attached + BitmapPtr bitmap; ///< Pixel storage + } CAIRO_BUFFER; + + unsigned int m_current; ///< Currently used buffer handle + typedef std::deque CAIRO_BUFFERS; + + /// Pointer to the current context, so it can be changed + cairo_t** m_currentContext; + + /// Rendering target used for compositing (the main display) + cairo_t* m_mainContext; + + /// Transformation matrix + cairo_matrix_t m_matrix; + + /// Stores information about initialized buffers + CAIRO_BUFFERS m_buffers; + + unsigned int m_stride; ///< Stride to use given the desired format and width + unsigned int m_bufferSize; ///< Amount of memory needed to store a buffer + + /** + * Function clean() + * performs freeing of resources. + */ + void clean(); + + /// Returns number of currently used buffers + unsigned int usedBuffers() + { + return m_buffers.size(); + } +}; + +} // namespace KiGfx + +#endif /* COMPOSITOR_H_ */ diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 35e3188d07..bccf92d724 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -33,7 +33,7 @@ #include #include - +#include #if defined(__WXMSW__) #define SCREEN_DEPTH 24 @@ -62,6 +62,8 @@ */ namespace KiGfx { +class CAIRO_COMPOSITOR; + class CAIRO_GAL : public GAL, public wxWindow { public: @@ -81,7 +83,7 @@ public: * @param aName is the name of this window for use by wxWindow::FindWindowByName() */ CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener = NULL, - wxEvtHandler* aPaintListener = NULL, const wxString& aName = wxT("CairoCanvas") ); + wxEvtHandler* aPaintListener = NULL, const wxString& aName = wxT( "CairoCanvas" ) ); virtual ~CAIRO_GAL(); @@ -299,11 +301,15 @@ private: /// Super class definition typedef GAL super; + // Compositing variables + boost::shared_ptr compositor; ///< Object for layers compositing + unsigned int mainBuffer; ///< Handle to the main buffer + unsigned int overlayBuffer; ///< Handle to the overlay buffer + // Variables related to wxWidgets wxWindow* parentWindow; ///< Parent window wxEvtHandler* mouseListener; ///< Mouse listener wxEvtHandler* paintListener; ///< Paint listener - wxRect clientRectangle; ///< Area definition of the surface unsigned int bufferSize; ///< Size of buffers cairoOutput, bitmapBuffers unsigned char* wxOutput; ///< wxImage comaptible buffer @@ -315,11 +321,6 @@ private: wxBitmap* cursorPixelsSaved; ///< Saved cursor pixels int cursorSize; ///< Cursor size - // Variables for the grouping function - int actualGroupIndex; ///< The index of the actual group - bool isGrouping; ///< Is grouping enabled ? - bool isElementAdded; ///< Was an graphic element added ? - /// Maximum number of arguments for one command static const int MAX_CAIRO_ARGUMENTS = 6; @@ -352,15 +353,19 @@ private: cairo_path_t* cairoPath; ///< Pointer to a Cairo path } GroupElement; + // Variables for the grouping function + bool isGrouping; ///< Is grouping enabled ? + bool isElementAdded; ///< Was an graphic element added ? typedef std::deque Group; ///< A graphic group type definition - std::map groups; ///< List of graphic groups - unsigned int groupCounter; ///< Counter used for generating keys for groups - Group* currentGroup; ///< Currently used group + std::map groups; ///< List of graphic groups + unsigned int groupCounter; ///< Counter used for generating keys for groups + Group* currentGroup; ///< Currently used group // Variables related to Cairo <-> wxWidgets cairo_matrix_t cairoWorldScreenMatrix; ///< Cairo world to screen transformation matrix - cairo_t* cairoImage; ///< Cairo image - cairo_surface_t* cairoSurface; ///< Cairo surface + cairo_t* currentContext; ///< Currently used Cairo context for drawing + cairo_t* context; ///< Cairo image + cairo_surface_t* surface; ///< Cairo surface unsigned int* bitmapBuffer; ///< Storage of the cairo image unsigned int* bitmapBufferBackup; ///< Backup storage of the cairo image int stride; ///< Stride value for Cairo @@ -400,15 +405,21 @@ private: /// Prepare Cairo surfaces for drawing void initSurface(); - // Destroy Cairo surfaces when are not needed anymore + /// Destroy Cairo surfaces when are not needed anymore void deinitSurface(); + /// Prepare the compositor + void setCompositor(); + /** * @brief Returns a valid key that can be used as a new group number. * * @return An unique group number that is not used by any other group. */ unsigned int getNewGroupNumber(); + + /// Format used to store pixels + static const cairo_format_t GAL_FORMAT = CAIRO_FORMAT_RGB24; }; } // namespace KiGfx From 76660ff15bd2989401ec17d6c5c6bf508f81285f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 25 Jul 2013 18:04:15 +0200 Subject: [PATCH 178/415] Fixed high contrast mode in OpenGL. Split display settings loading into more appropriate places. --- common/gal/opengl/gpu_manager.cpp | 2 +- common/gal/opengl/vertex_manager.cpp | 12 +++-- include/gal/opengl/vertex_container.h | 12 ++++- pcbnew/basepcbframe.cpp | 69 ++++++++++++--------------- pcbnew/initpcb.cpp | 8 +++- pcbnew/pcbframe.cpp | 13 ++++- 6 files changed, 69 insertions(+), 47 deletions(-) diff --git a/common/gal/opengl/gpu_manager.cpp b/common/gal/opengl/gpu_manager.cpp index 04341ed0d4..ffb12b342b 100644 --- a/common/gal/opengl/gpu_manager.cpp +++ b/common/gal/opengl/gpu_manager.cpp @@ -111,7 +111,7 @@ void GPU_CACHED_MANAGER::BeginDrawing() { wxASSERT( !m_isDrawing ); - if( m_container->isDirty() ) + if( m_container->IsDirty() ) uploadToGpu(); // Number of vertices to be drawn in the EndDrawing() diff --git a/common/gal/opengl/vertex_manager.cpp b/common/gal/opengl/vertex_manager.cpp index d3b9e00f66..7ffdd74922 100644 --- a/common/gal/opengl/vertex_manager.cpp +++ b/common/gal/opengl/vertex_manager.cpp @@ -101,12 +101,14 @@ void VERTEX_MANAGER::ChangeItemColor( const VERTEX_ITEM& aItem, const COLOR4D& a VERTEX* vertex = m_container->GetVertices( offset ); for( unsigned int i = 0; i < size; ++i ) { - vertex->r = aColor.r; - vertex->g = aColor.g; - vertex->b = aColor.b; - vertex->a = aColor.a; + vertex->r = aColor.r * 255.0; + vertex->g = aColor.g * 255.0; + vertex->b = aColor.b * 255.0; + vertex->a = aColor.a * 255.0; vertex++; } + + m_container->SetDirty(); } @@ -121,6 +123,8 @@ void VERTEX_MANAGER::ChangeItemDepth( const VERTEX_ITEM& aItem, GLfloat aDepth ) vertex->z = aDepth; vertex++; } + + m_container->SetDirty(); } diff --git a/include/gal/opengl/vertex_container.h b/include/gal/opengl/vertex_container.h index 3cf544c473..efca90b2f8 100644 --- a/include/gal/opengl/vertex_container.h +++ b/include/gal/opengl/vertex_container.h @@ -111,7 +111,7 @@ public: * returns information about container cache state. Clears the flag after calling the function. * @return true in case the vertices have to be reuploaded. */ - inline bool isDirty() + inline bool IsDirty() { bool state = m_dirty; @@ -120,6 +120,16 @@ public: return state; } + /** + * Function SetDirty() + * sets the dirty flag, so vertices in the container are going to be reuploaded to the GPU on + * the next frame. + */ + inline void SetDirty() + { + m_dirty = true; + } + protected: VERTEX_CONTAINER( unsigned int aSize = defaultInitSize ); diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index cc21eaf0cf..9580ea9e6c 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -182,45 +182,6 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) view->Add( zone ); } - // Apply layer coloring scheme & display options - if( view->GetPainter() ) - { - KiGfx::PCB_RENDER_SETTINGS* settings = new KiGfx::PCB_RENDER_SETTINGS(); - - // Load layers' colors from PCB data - settings->ImportLegacyColors( m_Pcb->GetColorsSettings() ); - view->GetPainter()->ApplySettings( settings ); - - // Load display options (such as filled/outline display of items) - settings->LoadDisplayOptions( DisplayOpt ); - } - - // Set rendering order of layers - for( LAYER_NUM i = 0; i < sizeof(GalLayerOrder) / sizeof(LAYER_NUM); ++i ) - { - wxASSERT( i < KiGfx::VIEW::VIEW_MAX_LAYERS ); - - view->SetLayerOrder( GalLayerOrder[i], i ); - } - - // Netnames are drawn only when scale is sufficient (level of details) - // so there is no point in caching them - for( LAYER_NUM layer = FIRST_NETNAME_LAYER; layer <= LAST_NETNAME_LAYER; ++layer ) - { - view->SetLayerTarget( layer, KiGfx::TARGET_NONCACHED ); - } - - // Load layer & elements visibility settings - for( LAYER_NUM i = 0; i < NB_LAYERS; ++i ) - { - view->SetLayerVisible( i, m_Pcb->IsLayerVisible( i ) ); - } - - for( LAYER_NUM i = 0; i < END_PCB_VISIBLE_LIST; ++i ) - { - view->SetLayerVisible( ITEM_GAL_LAYER( i ), m_Pcb->IsElementVisible( i ) ); - } - view->RecacheAllItems( true ); if( m_galCanvasActive ) m_galCanvas->Refresh(); @@ -827,6 +788,36 @@ void PCB_BASE_FRAME::LoadSettings() if( m_DisplayModText < LINE || m_DisplayModText > SKETCH ) m_DisplayModText = FILLED; + // Apply display settings for GAL + KiGfx::VIEW* view = m_galCanvas->GetView(); + // Set rendering order of layers + for( LAYER_NUM i = 0; i < sizeof(GalLayerOrder) / sizeof(LAYER_NUM); ++i ) + { + wxASSERT( i < KiGfx::VIEW::VIEW_MAX_LAYERS ); + + view->SetLayerOrder( GalLayerOrder[i], i ); + } + + // Netnames are drawn only when scale is sufficient (level of details) + // so there is no point in caching them + for( LAYER_NUM layer = FIRST_NETNAME_LAYER; layer <= LAST_NETNAME_LAYER; ++layer ) + { + view->SetLayerTarget( layer, KiGfx::TARGET_NONCACHED ); + } + + // Apply layer coloring scheme & display options + if( view->GetPainter() ) + { + KiGfx::PCB_RENDER_SETTINGS* settings = new KiGfx::PCB_RENDER_SETTINGS(); + + // Load layers' colors from PCB data + settings->ImportLegacyColors( m_Pcb->GetColorsSettings() ); + view->GetPainter()->ApplySettings( settings ); + + // Load display options (such as filled/outline display of items) + settings->LoadDisplayOptions( DisplayOpt ); + } + // WxWidgets 2.9.1 seems call setlocale( LC_NUMERIC, "" ) // when reading doubles in config, // but forget to back to current locale. So we call SetLocaleTo_Default diff --git a/pcbnew/initpcb.cpp b/pcbnew/initpcb.cpp index 5d180ab66c..8b3b398995 100644 --- a/pcbnew/initpcb.cpp +++ b/pcbnew/initpcb.cpp @@ -4,6 +4,9 @@ #include #include +#include +#include +#include #include #include @@ -67,9 +70,12 @@ bool PCB_EDIT_FRAME::Clear_Pcb( bool aQuery ) // Default copper layers count set to 2: double layer board GetBoard()->SetCopperLayerCount( 2 ); - // Update display: + // Update display GetBoard()->SetVisibleLayers( ALL_LAYERS ); + // Set currently selected layer to be shown in high contrast mode, when enabled` + setHighContrastLayer( GetScreen()->m_Active_Layer ); + ReFillLayerWidget(); Zoom_Automatique( false ); diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 8b8c85f296..0eddda4f60 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -472,7 +472,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title, DisplayError( this, msg ); } } - } @@ -813,6 +812,18 @@ void PCB_EDIT_FRAME::syncRenderStates() void PCB_EDIT_FRAME::syncLayerVisibilities() { m_Layers->SyncLayerVisibilities(); + + KiGfx::VIEW* view = m_galCanvas->GetView(); + // Load layer & elements visibility settings + for( LAYER_NUM i = 0; i < NB_LAYERS; ++i ) + { + view->SetLayerVisible( i, m_Pcb->IsLayerVisible( i ) ); + } + + for( LAYER_NUM i = 0; i < END_PCB_VISIBLE_LIST; ++i ) + { + view->SetLayerVisible( ITEM_GAL_LAYER( i ), m_Pcb->IsElementVisible( i ) ); + } } From f5b230a2effb1cb2e183bd644f4b4659e75e6e2f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 26 Jul 2013 10:05:57 +0200 Subject: [PATCH 179/415] Fixed recaching after changing display properties. --- pcbnew/dialogs/dialog_display_options.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/dialogs/dialog_display_options.cpp b/pcbnew/dialogs/dialog_display_options.cpp index be9bc04d40..8b44757d90 100644 --- a/pcbnew/dialogs/dialog_display_options.cpp +++ b/pcbnew/dialogs/dialog_display_options.cpp @@ -175,7 +175,7 @@ void DIALOG_DISPLAY_OPTIONS::OnOkClick(wxCommandEvent& event) KiGfx::PCB_RENDER_SETTINGS* settings = static_cast( painter->GetSettings() ); settings->LoadDisplayOptions( DisplayOpt ); - view->RecacheAllItems(); + view->RecacheAllItems( true ); if( m_Parent->IsGalCanvasActive() ) m_Parent->GetGalCanvas()->Refresh(); From 8ab96afd5bc29f683b37ed00108b02b5d457e6f4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 26 Jul 2013 12:15:28 +0200 Subject: [PATCH 180/415] Moved multilayer pad netnames to the top. --- include/layers_id_colors_and_visibility.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index f22eac8dd5..beb89b7a31 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -256,13 +256,13 @@ enum PCB_VISIBLE /// means that layer is displayed closer to the user, ie. on the top). const LAYER_NUM GalLayerOrder[] = { + ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), DRAW_N, COMMENT_N, ECO1_N, ECO2_N, EDGE_N, UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31, ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ), ITEM_GAL_LAYER( MOD_REFERENCES_VISIBLE), ITEM_GAL_LAYER( MOD_VALUES_VISIBLE ), SILKSCREEN_N_FRONT, SOLDERPASTE_N_FRONT, ADHESIVE_N_FRONT, SOLDERMASK_N_FRONT, - ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), From a4a2196cc200c7fb2d9b448ec0cce5e4496bec32 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 26 Jul 2013 14:35:31 +0200 Subject: [PATCH 181/415] Fixed profiling timers for compilation under Win32 (and hopefully Mac OS too). --- common/profile.h | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/common/profile.h b/common/profile.h index 32a5b2038a..82ecdf199e 100644 --- a/common/profile.h +++ b/common/profile.h @@ -30,10 +30,7 @@ #ifndef __PROFILE_H #define __PROFILE_H -#ifdef __linux__ - #include -#endif - +#include #include /** @@ -95,15 +92,10 @@ static __inline__ unsigned long long rdtsc() */ static inline uint64_t get_tics() { -#if defined(__linux__) struct timeval tv; gettimeofday( &tv, NULL ); return (uint64_t) tv.tv_sec * 1000000ULL + (uint64_t) tv.tv_usec; -#elif defined _WIN32 || defined _WIN64 - return GetTickCount() * 1000; -#else - return 0; #endif } @@ -152,6 +144,3 @@ static inline void prof_end( prof_counter* cnt ) else cnt->value = get_tics() - cnt->value; } - - -#endif From fcbfd00b98d8ce8f5ec9f1139143af1a17aece5c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 26 Jul 2013 18:12:22 +0200 Subject: [PATCH 182/415] Added scalar addition and subtraction operators. --- include/math/vector2d.h | 44 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/include/math/vector2d.h b/include/math/vector2d.h index 675e74d15f..a5eaa604e0 100644 --- a/include/math/vector2d.h +++ b/include/math/vector2d.h @@ -215,15 +215,27 @@ public: /// Vector addition operator VECTOR2 operator+( const VECTOR2& aVector ) const; + /// Scalar addition operator + VECTOR2 operator+( const T& aScalar ) const; + /// Compound assignment operator VECTOR2& operator+=( const VECTOR2& aVector ); + /// Compound assignment operator + VECTOR2& operator+=( const T& aScalar ); + /// Vector subtraction operator VECTOR2 operator-( const VECTOR2& aVector ) const; + /// Scalar subtraction operator + VECTOR2 operator-( const T& aScalar ) const; + /// Compound assignment operator VECTOR2& operator-=( const VECTOR2& aVector ); + /// Compound assignment operator + VECTOR2& operator-=( const T& aScalar ); + /// Negate Vector operator VECTOR2 operator-(); @@ -330,6 +342,15 @@ VECTOR2& VECTOR2::operator+=( const VECTOR2& aVector ) } +template +VECTOR2& VECTOR2::operator+=( const T& aScalar ) +{ + x += aScalar; + y += aScalar; + return *this; +} + + template VECTOR2& VECTOR2::operator-=( const VECTOR2& aVector ) { @@ -339,6 +360,15 @@ VECTOR2& VECTOR2::operator-=( const VECTOR2& aVector ) } +template +VECTOR2& VECTOR2::operator-=( const T& aScalar ) +{ + x -= aScalar; + y -= aScalar; + return *this; +} + + template int VECTOR2::LineSide( const VECTOR2& aStart, const VECTOR2& aEnd ) const { @@ -463,6 +493,13 @@ VECTOR2 VECTOR2::operator+( const VECTOR2& aVector ) const } +template +VECTOR2 VECTOR2::operator+( const T& aScalar ) const +{ + return VECTOR2 ( x + aScalar, y + aScalar ); +} + + template VECTOR2 VECTOR2::operator-( const VECTOR2& aVector ) const { @@ -470,6 +507,13 @@ VECTOR2 VECTOR2::operator-( const VECTOR2& aVector ) const } +template +VECTOR2 VECTOR2::operator-( const T& aScalar ) const +{ + return VECTOR2 ( x - aScalar, y - aScalar ); +} + + template VECTOR2 VECTOR2::operator-() { From b41d1e0eafe8e02b1f34d6082b40b1b25c87115d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 26 Jul 2013 18:15:11 +0200 Subject: [PATCH 183/415] Added display of soldermask for pads. --- include/layers_id_colors_and_visibility.h | 8 ++--- pcbnew/class_pad.cpp | 40 ++++++++++++++++++----- pcbnew/class_pad.h | 5 ++- pcbnew/pcb_painter.cpp | 8 +++++ 4 files changed, 48 insertions(+), 13 deletions(-) diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index beb89b7a31..2c8f2d079a 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -261,12 +261,12 @@ const LAYER_NUM GalLayerOrder[] = UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31, ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ), ITEM_GAL_LAYER( MOD_REFERENCES_VISIBLE), ITEM_GAL_LAYER( MOD_VALUES_VISIBLE ), - SILKSCREEN_N_FRONT, SOLDERPASTE_N_FRONT, ADHESIVE_N_FRONT, SOLDERMASK_N_FRONT, + SILKSCREEN_N_FRONT, SOLDERPASTE_N_FRONT, ADHESIVE_N_FRONT, ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), - ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ), + ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ), SOLDERMASK_N_FRONT, ITEM_GAL_LAYER( LAYER_16_NETNAMES_VISIBLE ), LAYER_N_FRONT, ITEM_GAL_LAYER( LAYER_15_NETNAMES_VISIBLE ), LAYER_N_15, ITEM_GAL_LAYER( LAYER_14_NETNAMES_VISIBLE ), LAYER_N_14, @@ -282,10 +282,10 @@ const LAYER_NUM GalLayerOrder[] = ITEM_GAL_LAYER( LAYER_4_NETNAMES_VISIBLE ), LAYER_N_4, ITEM_GAL_LAYER( LAYER_3_NETNAMES_VISIBLE ), LAYER_N_3, ITEM_GAL_LAYER( LAYER_2_NETNAMES_VISIBLE ), LAYER_N_2, - ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ), + ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ), SOLDERMASK_N_BACK, ITEM_GAL_LAYER( LAYER_1_NETNAMES_VISIBLE ), LAYER_N_BACK, - SOLDERMASK_N_BACK, ADHESIVE_N_BACK, SOLDERPASTE_N_BACK, SILKSCREEN_N_BACK, + ADHESIVE_N_BACK, SOLDERPASTE_N_BACK, SILKSCREEN_N_BACK, ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ) }; diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 8b59239662..a4933310ef 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -391,7 +391,7 @@ int D_PAD::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const // Mask margins handling: -int D_PAD::GetSolderMaskMargin() +int D_PAD::GetSolderMaskMargin() const { int margin = m_LocalSolderMaskMargin; MODULE* module = GetParent(); @@ -748,21 +748,29 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const { aCount = 0; + // These types of pads contain a hole + if( m_Attribute == PAD_STANDARD || m_Attribute == PAD_HOLE_NOT_PLATED ) + aLayers[aCount++] = ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ); + if( IsOnLayer( LAYER_N_FRONT ) && IsOnLayer( LAYER_N_BACK ) ) { // Multi layer pad aLayers[aCount++] = ITEM_GAL_LAYER( PADS_VISIBLE ); aLayers[aCount++] = ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ); + aLayers[aCount++] = SOLDERMASK_N_FRONT; + aLayers[aCount++] = SOLDERMASK_N_BACK; } else if( IsOnLayer( LAYER_N_FRONT ) ) { aLayers[aCount++] = ITEM_GAL_LAYER( PAD_FR_VISIBLE ); aLayers[aCount++] = ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ); + aLayers[aCount++] = SOLDERMASK_N_FRONT; } else if( IsOnLayer( LAYER_N_BACK ) ) { aLayers[aCount++] = ITEM_GAL_LAYER( PAD_BK_VISIBLE ); aLayers[aCount++] = ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ); + aLayers[aCount++] = SOLDERMASK_N_BACK; } #ifdef __WXDEBUG__ else // Should not occur @@ -770,10 +778,6 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const wxLogWarning( wxT("D_PAD::ViewGetLayers():PAD on layer different than FRONT/BACK") ); } #endif - - // These types of pads contain a hole - if( m_Attribute == PAD_STANDARD || m_Attribute == PAD_HOLE_NOT_PLATED ) - aLayers[aCount++] = ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ); } @@ -781,14 +785,23 @@ void D_PAD::ViewGetRequiredLayers( int aLayers[], int& aCount ) const { ViewGetLayers( aLayers, aCount ); - // Remove pad description layer from the required layers group - aCount--; + // Remove pad description layer & soldermask from the required layers group + if( IsOnLayer( LAYER_N_FRONT ) && IsOnLayer( LAYER_N_BACK ) ) + { + // Multilayer pads have 2 soldermask layers and one description layer + aCount -= 3; + } + else + { + // Resto of pads have one soldermask layer and one description layer + aCount -= 2; + } } unsigned int D_PAD::ViewGetLOD( int aLayer ) const { - // Netnames will be shown only if zoom is appropriate + // Netnames and soldermasks will be shown only if zoom is appropriate if( IsNetnameLayer( aLayer ) ) { return ( 100000000 / std::max( m_Size.x, m_Size.y ) ); @@ -797,3 +810,14 @@ unsigned int D_PAD::ViewGetLOD( int aLayer ) const // Other layers are shown without any conditions return 0; } + + +const BOX2I D_PAD::ViewBBox() const +{ + // Bounding box includes soldermask too + int solderMaskMargin = GetSolderMaskMargin(); + EDA_RECT bbox = GetBoundingBox(); + + return BOX2I( VECTOR2I( bbox.GetOrigin() ) - solderMaskMargin, + VECTOR2I( bbox.GetSize() ) + 2 * solderMaskMargin ); +} diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index 8f3d2787dd..e5eeaa297e 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -247,7 +247,7 @@ public: * 2 - if null, the parent footprint value * 1 - if null, the global value */ - int GetSolderMaskMargin(); + int GetSolderMaskMargin() const; /** * Function GetSolderPasteMargin @@ -442,6 +442,9 @@ public: /// @copydoc VIEW_ITEM::ViewGetLOD() virtual unsigned int ViewGetLOD( int aLayer ) const; + /// @copydoc VIEW_ITEM::ViewBBox() + virtual const BOX2I ViewBBox() const; + /** * Function CopyNetlistSettings * copies the netlist settings to \a aPad. diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 777e7b9947..0ef0e33500 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -522,6 +522,14 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) size = VECTOR2D( aPad->GetDrillSize() ) / 2.0; shape = aPad->GetDrillShape(); } + else if( aLayer == SOLDERMASK_N_FRONT || aLayer == SOLDERMASK_N_BACK ) + { + // Drawing soldermask + m_gal->Translate( VECTOR2D( aPad->GetOffset() ) ); + size = VECTOR2D( aPad->GetSize().x / 2.0 + aPad->GetSolderMaskMargin(), + aPad->GetSize().y / 2.0 + aPad->GetSolderMaskMargin() ); + shape = aPad->GetShape(); + } else { // Drawing every kind of pad From 5a5616f258c330acc5cf7c37cbd3e263b9032e4b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 29 Jul 2013 14:12:27 +0200 Subject: [PATCH 184/415] Added initialization of variable, preventing unconditional jumps. Fixed typos in comments. --- common/gal/opengl/gpu_manager.cpp | 2 +- common/gal/stroke_font.cpp | 4 ++-- common/view/view.cpp | 2 ++ include/gal/opengl/gpu_manager.h | 1 - pcbnew/class_pad.cpp | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/common/gal/opengl/gpu_manager.cpp b/common/gal/opengl/gpu_manager.cpp index ffb12b342b..255d6b0a26 100644 --- a/common/gal/opengl/gpu_manager.cpp +++ b/common/gal/opengl/gpu_manager.cpp @@ -52,7 +52,7 @@ GPU_MANAGER* GPU_MANAGER::MakeManager( VERTEX_CONTAINER* aContainer ) GPU_MANAGER::GPU_MANAGER( VERTEX_CONTAINER* aContainer ) : - m_container( aContainer ), m_shader( NULL ) + m_isDrawing( false ), m_container( aContainer ), m_shader( NULL ) { } diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp index 643ac21b9d..527b9d5122 100644 --- a/common/gal/stroke_font.cpp +++ b/common/gal/stroke_font.cpp @@ -167,7 +167,7 @@ void STROKE_FONT::Draw( std::string aText, const VECTOR2D& aPosition, double aRo switch( m_horizontalJustify ) { case GR_TEXT_HJUSTIFY_CENTER: - m_gal->Translate( VECTOR2D( -textsize.x / 2, 0 ) ); + m_gal->Translate( VECTOR2D( -textsize.x / 2.0, 0 ) ); break; case GR_TEXT_HJUSTIFY_RIGHT: @@ -187,7 +187,7 @@ void STROKE_FONT::Draw( std::string aText, const VECTOR2D& aPosition, double aRo switch( m_verticalJustify ) { case GR_TEXT_VJUSTIFY_CENTER: - m_gal->Translate( VECTOR2D( 0, textsize.y / 2 ) ); + m_gal->Translate( VECTOR2D( 0, textsize.y / 2.0 ) ); break; case GR_TEXT_VJUSTIFY_TOP: diff --git a/common/view/view.cpp b/common/view/view.cpp index ead82c46e8..16953ee1b6 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -474,6 +474,8 @@ struct VIEW::drawItem { GAL* gal = view->GetGAL(); + // Obtain layers that are required to be enabled for drawing an item + // (eg. there is no point in drawing track labels, if the track is not visible) aItem->ViewGetRequiredLayers( layers, layersCount ); // Conditions that have te be fulfilled for an item to be drawn diff --git a/include/gal/opengl/gpu_manager.h b/include/gal/opengl/gpu_manager.h index 5b7e6e62ba..9476bc724c 100644 --- a/include/gal/opengl/gpu_manager.h +++ b/include/gal/opengl/gpu_manager.h @@ -47,7 +47,6 @@ public: virtual ~GPU_MANAGER(); - // TODO docs /** * @brief Initializes everything needed to use vertex buffer objects (should be called when * there is an OpenGL context available). diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index a4933310ef..69e4ae4e53 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -793,7 +793,7 @@ void D_PAD::ViewGetRequiredLayers( int aLayers[], int& aCount ) const } else { - // Resto of pads have one soldermask layer and one description layer + // Rest of pads have one soldermask layer and one description layer aCount -= 2; } } From d41ea7376536f85c7e16f83d564751f3f2054912 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 29 Jul 2013 14:20:40 +0200 Subject: [PATCH 185/415] Fixed top layer pads netnames issue. --- include/view/view.h | 2 +- pcbnew/pcbframe.cpp | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/view/view.h b/include/view/view.h index 8df37a162e..9e8561187d 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -360,7 +360,7 @@ public: */ bool IsDynamic() const { return m_dynamic; } - static const int VIEW_MAX_LAYERS = 64; ///* maximum number of layers that may be shown + static const int VIEW_MAX_LAYERS = 128; ///* maximum number of layers that may be shown private: struct VIEW_LAYER diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 0eddda4f60..8a3e663359 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -824,6 +824,14 @@ void PCB_EDIT_FRAME::syncLayerVisibilities() { view->SetLayerVisible( ITEM_GAL_LAYER( i ), m_Pcb->IsElementVisible( i ) ); } + + // Enable some layers that are GAL specific + for( LAYER_NUM i = FIRST_NETNAME_LAYER; i < LAST_NETNAME_LAYER; ++i ) + { + view->SetLayerVisible( i, true ); + } + view->SetLayerVisible( ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), true ); + view->SetLayerVisible( ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), true ); } From 233174238468c75adb73b88fdd38bb922a2bb1bc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 29 Jul 2013 16:38:07 +0200 Subject: [PATCH 186/415] Removed shaderless OpenGL backend. --- common/drawpanel_gal.cpp | 12 +- common/gal/opengl/opengl_gal.cpp | 444 ++++++++----------------------- include/class_drawpanel_gal.h | 5 +- include/gal/opengl/opengl_gal.h | 8 +- pcbnew/hotkeys.cpp | 6 +- pcbnew/hotkeys.h | 1 - pcbnew/menubar_pcbframe.cpp | 7 - pcbnew/pcbframe.cpp | 8 +- pcbnew/pcbnew_id.h | 1 - 9 files changed, 126 insertions(+), 366 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 3549455245..0fc3582729 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -55,7 +55,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin m_view = NULL; m_painter = NULL; - SwitchBackend( aGalType, true ); + SwitchBackend( aGalType ); SetBackgroundStyle( wxBG_STYLE_CUSTOM ); // Initial display settings @@ -149,13 +149,10 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) } -void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) +void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) { - wxLogDebug( wxT( "EDA_DRAW_PANEL_GAL::SwitchBackend: using shaders: %s" ), - aUseShaders ? "true" : "false" ); - // Do not do anything if the currently used GAL is correct - if( aGalType == m_currentGal && aUseShaders == m_useShaders && m_gal != NULL ) + if( aGalType == m_currentGal && m_gal != NULL ) return; delete m_gal; @@ -163,7 +160,7 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) switch( aGalType ) { case GAL_TYPE_OPENGL: - m_gal = new KiGfx::OPENGL_GAL( this, this, this, aUseShaders ); + m_gal = new KiGfx::OPENGL_GAL( this, this, this ); break; case GAL_TYPE_CAIRO: @@ -191,5 +188,4 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) m_gal->ResizeScreen( size.GetX(), size.GetY() ); m_currentGal = aGalType; - m_useShaders = aUseShaders; } diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 83fb1b7933..22b5bae9b9 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -50,7 +50,7 @@ void InitTesselatorCallbacks( GLUtesselator* aTesselator ); const int glAttributes[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 16, 0 }; OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, - wxEvtHandler* aPaintListener, bool isUseShaders, const wxString& aName ) : + wxEvtHandler* aPaintListener, const wxString& aName ) : wxGLCanvas( aParent, wxID_ANY, (int*) glAttributes, wxDefaultPosition, wxDefaultSize, wxEXPAND, aName ), cachedManager( true ), @@ -70,7 +70,6 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, // Initialize the flags isGlewInitialized = false; isFramebufferInitialized = false; - isUseShader = isUseShaders; isShaderInitialized = false; isGrouping = false; wxSize parentSize = aParent->GetSize(); @@ -255,7 +254,7 @@ void OPENGL_GAL::BeginDrawing() } // Compile the shaders - if( !isShaderInitialized && isUseShader ) + if( !isShaderInitialized ) { if( !shader.LoadBuiltinShader( 0, SHADER_TYPE_VERTEX ) ) wxLogFatalError( wxT( "Cannot compile vertex shader!" ) ); @@ -351,49 +350,29 @@ inline void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2 return; VECTOR2D perpendicularVector( -startEndVector.y * scale, startEndVector.x * scale ); + glm::vec4 vector( perpendicularVector.x, perpendicularVector.y, 0.0, 0.0 ); - if( isUseShader ) - { - glm::vec4 vector( perpendicularVector.x, perpendicularVector.y, 0.0, 0.0 ); + // The perpendicular vector also needs transformations + vector = currentManager->GetTransformation() * vector; - // The perpendicular vector also needs transformations - vector = currentManager->GetTransformation() * vector; + // Line width is maintained by the vertex shader + currentManager->Shader( SHADER_LINE, vector.x, vector.y, lineWidth ); + currentManager->Vertex( aStartPoint.x, aStartPoint.y, layerDepth ); // v0 - // Line width is maintained by the vertex shader - currentManager->Shader( SHADER_LINE, vector.x, vector.y, lineWidth ); - currentManager->Vertex( aStartPoint.x, aStartPoint.y, layerDepth ); // v0 + currentManager->Shader( SHADER_LINE, -vector.x, -vector.y, lineWidth ); + currentManager->Vertex( aStartPoint.x, aStartPoint.y, layerDepth ); // v1 - currentManager->Shader( SHADER_LINE, -vector.x, -vector.y, lineWidth ); - currentManager->Vertex( aStartPoint.x, aStartPoint.y, layerDepth ); // v1 + currentManager->Shader( SHADER_LINE, -vector.x, -vector.y, lineWidth ); + currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth ); // v3 - currentManager->Shader( SHADER_LINE, -vector.x, -vector.y, lineWidth ); - currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth ); // v3 + currentManager->Shader( SHADER_LINE, vector.x, vector.y, lineWidth ); + currentManager->Vertex( aStartPoint.x, aStartPoint.y, layerDepth ); // v0 - currentManager->Shader( SHADER_LINE, vector.x, vector.y, lineWidth ); - currentManager->Vertex( aStartPoint.x, aStartPoint.y, layerDepth ); // v0 + currentManager->Shader( SHADER_LINE, -vector.x, -vector.y, lineWidth ); + currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth ); // v3 - currentManager->Shader( SHADER_LINE, -vector.x, -vector.y, lineWidth ); - currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth ); // v3 - - currentManager->Shader( SHADER_LINE, vector.x, vector.y, lineWidth ); - currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth ); // v2 - } - else - { - // Compute the edge points of the line - VECTOR2D v0 = aStartPoint + perpendicularVector; - VECTOR2D v1 = aStartPoint - perpendicularVector; - VECTOR2D v2 = aEndPoint + perpendicularVector; - VECTOR2D v3 = aEndPoint - perpendicularVector; - - currentManager->Vertex( v0.x, v0.y, layerDepth ); - currentManager->Vertex( v1.x, v1.y, layerDepth ); - currentManager->Vertex( v3.x, v3.y, layerDepth ); - - currentManager->Vertex( v0.x, v0.y, layerDepth ); - currentManager->Vertex( v3.x, v3.y, layerDepth ); - currentManager->Vertex( v2.x, v2.y, layerDepth ); - } + currentManager->Shader( SHADER_LINE, vector.x, vector.y, lineWidth ); + currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth ); // v2 } @@ -533,143 +512,58 @@ void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEn void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) { - if( isUseShader ) + if( isFillEnabled ) { - if( isFillEnabled ) - { - currentManager->Color( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + currentManager->Color( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - /* Draw a triangle that contains the circle, then shade it leaving only the circle. - Parameters given to setShader are indices of the triangle's vertices - (if you want to understand more, check the vertex shader source [shader.vert]). - Shader uses this coordinates to determine if fragments are inside the circle or not. - v2 - /\ - //\\ - v0 /_\/_\ v1 - */ - currentManager->Shader( SHADER_FILLED_CIRCLE, 1.0 ); - currentManager->Vertex( aCenterPoint.x - aRadius * sqrt( 3.0f ), // v0 - aCenterPoint.y - aRadius, layerDepth ); + /* Draw a triangle that contains the circle, then shade it leaving only the circle. + Parameters given to setShader are indices of the triangle's vertices + (if you want to understand more, check the vertex shader source [shader.vert]). + Shader uses this coordinates to determine if fragments are inside the circle or not. + v2 + /\ + //\\ + v0 /_\/_\ v1 + */ + currentManager->Shader( SHADER_FILLED_CIRCLE, 1.0 ); + currentManager->Vertex( aCenterPoint.x - aRadius * sqrt( 3.0f ), // v0 + aCenterPoint.y - aRadius, layerDepth ); - currentManager->Shader( SHADER_FILLED_CIRCLE, 2.0 ); - currentManager->Vertex( aCenterPoint.x + aRadius* sqrt( 3.0f ), // v1 - aCenterPoint.y - aRadius, layerDepth ); + currentManager->Shader( SHADER_FILLED_CIRCLE, 2.0 ); + currentManager->Vertex( aCenterPoint.x + aRadius* sqrt( 3.0f ), // v1 + aCenterPoint.y - aRadius, layerDepth ); - currentManager->Shader( SHADER_FILLED_CIRCLE, 3.0 ); - currentManager->Vertex( aCenterPoint.x, aCenterPoint.y + aRadius * 2.0f, // v2 - layerDepth ); - } - - if( isStrokeEnabled ) - { - currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); - - /* Draw a triangle that contains the circle, then shade it leaving only the circle. - Parameters given to setShader are indices of the triangle's vertices - (if you want to understand more, check the vertex shader source [shader.vert]). - and the line width. Shader uses this coordinates to determine if fragments are - inside the circle or not. - v2 - /\ - //\\ - v0 /_\/_\ v1 - */ - double outerRadius = aRadius + ( lineWidth / 2 ); - currentManager->Shader( SHADER_STROKED_CIRCLE, 1.0, aRadius, lineWidth ); - currentManager->Vertex( aCenterPoint.x - outerRadius * sqrt( 3.0f ), // v0 - aCenterPoint.y - outerRadius, layerDepth ); - - currentManager->Shader( SHADER_STROKED_CIRCLE, 2.0, aRadius, lineWidth ); - currentManager->Vertex( aCenterPoint.x + outerRadius * sqrt( 3.0f ), // v1 - aCenterPoint.y - outerRadius, layerDepth ); - - currentManager->Shader( SHADER_STROKED_CIRCLE, 3.0, aRadius, lineWidth ); - currentManager->Vertex( aCenterPoint.x, aCenterPoint.y + outerRadius * 2.0f, // v2 - layerDepth ); - } + currentManager->Shader( SHADER_FILLED_CIRCLE, 3.0 ); + currentManager->Vertex( aCenterPoint.x, aCenterPoint.y + aRadius * 2.0f, // v2 + layerDepth ); } - else + + if( isStrokeEnabled ) { - if( isStrokeEnabled ) - { - // Compute the factors for the unit circle - double outerScale = lineWidth / aRadius / 2; - double innerScale = -outerScale; - outerScale += 1.0; - innerScale += 1.0; + currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); - if( innerScale < outerScale ) - { - // Draw the outline - VERTEX* circle = circleContainer.GetAllVertices(); - int next; + /* Draw a triangle that contains the circle, then shade it leaving only the circle. + Parameters given to setShader are indices of the triangle's vertices + (if you want to understand more, check the vertex shader source [shader.vert]). + and the line width. Shader uses this coordinates to determine if fragments are + inside the circle or not. + v2 + /\ + //\\ + v0 /_\/_\ v1 + */ + double outerRadius = aRadius + ( lineWidth / 2 ); + currentManager->Shader( SHADER_STROKED_CIRCLE, 1.0, aRadius, lineWidth ); + currentManager->Vertex( aCenterPoint.x - outerRadius * sqrt( 3.0f ), // v0 + aCenterPoint.y - outerRadius, layerDepth ); - currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, - strokeColor.a ); + currentManager->Shader( SHADER_STROKED_CIRCLE, 2.0, aRadius, lineWidth ); + currentManager->Vertex( aCenterPoint.x + outerRadius * sqrt( 3.0f ), // v1 + aCenterPoint.y - outerRadius, layerDepth ); - Save(); - - currentManager->Translate( aCenterPoint.x, aCenterPoint.y, 0.0 ); - currentManager->Scale( aRadius, aRadius, 0.0f ); - - for( int i = 0; i < 3 * CIRCLE_POINTS; ++i ) - { - // verticesCircle contains precomputed circle points interleaved with vertex - // (0,0,0), so filled circles can be drawn as consecutive triangles, ie: - // { 0,a,b, 0,c,d, 0,e,f, 0,g,h, ... } - // where letters stand for consecutive circle points and 0 for (0,0,0) vertex. - - // We have to skip all (0,0,0) vertices (every third vertex) - if( i % 3 == 0 ) - { - i++; - // Depending on the vertex, next circle point - // may be stored in the next vertex.. - next = i + 1; - } - else - { - // ..or 2 vertices away (in case it is preceded by (0,0,0) vertex) - next = i + 2; - } - - currentManager->Vertex( circle[i].x * innerScale, - circle[i].y * innerScale, - layerDepth ); - currentManager->Vertex( circle[i].x * outerScale, - circle[i].y * outerScale, - layerDepth ); - currentManager->Vertex( circle[next].x * innerScale, - circle[next].y * innerScale, - layerDepth ); - - currentManager->Vertex( circle[i].x * outerScale, - circle[i].y * outerScale, - layerDepth ); - currentManager->Vertex( circle[next].x * outerScale, - circle[next].y * outerScale, - layerDepth ); - currentManager->Vertex( circle[next].x * innerScale, - circle[next].y * innerScale, - layerDepth ); - } - - Restore(); - } - } - - // Filled circles are easy to draw by using the stored vertices list - if( isFillEnabled ) - { - currentManager->Color( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - - Save(); - currentManager->Translate( aCenterPoint.x, aCenterPoint.y, layerDepth ); - currentManager->Scale( aRadius, aRadius, 0.0f ); - currentManager->Vertices( circleContainer.GetAllVertices(), CIRCLE_POINTS * 3 ); - Restore(); - } + currentManager->Shader( SHADER_STROKED_CIRCLE, 3.0, aRadius, lineWidth ); + currentManager->Vertex( aCenterPoint.x, aCenterPoint.y + outerRadius * 2.0f, // v2 + layerDepth ); } } @@ -693,124 +587,61 @@ void OPENGL_GAL::drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, d void OPENGL_GAL::drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ) { - if( isUseShader ) - { - Save(); - currentManager->Translate( aCenterPoint.x, aCenterPoint.y, 0.0f ); - currentManager->Rotate( aAngle, 0.0f, 0.0f, 1.0f ); + Save(); + currentManager->Translate( aCenterPoint.x, aCenterPoint.y, 0.0f ); + currentManager->Rotate( aAngle, 0.0f, 0.0f, 1.0f ); - /* Draw a triangle that contains the semicircle, then shade it to leave only - * the semicircle. Parameters given to setShader are indices of the triangle's vertices - (if you want to understand more, check the vertex shader source [shader.vert]). - Shader uses this coordinates to determine if fragments are inside the semicircle or not. - v2 - /\ - /__\ - v0 //__\\ v1 - */ - currentManager->Shader( SHADER_FILLED_CIRCLE, 4.0f ); - currentManager->Vertex( -aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 + /* Draw a triangle that contains the semicircle, then shade it to leave only + * the semicircle. Parameters given to setShader are indices of the triangle's vertices + (if you want to understand more, check the vertex shader source [shader.vert]). + Shader uses this coordinates to determine if fragments are inside the semicircle or not. + v2 + /\ + /__\ + v0 //__\\ v1 + */ + currentManager->Shader( SHADER_FILLED_CIRCLE, 4.0f ); + currentManager->Vertex( -aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 - currentManager->Shader( SHADER_FILLED_CIRCLE, 5.0f ); - currentManager->Vertex( aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 + currentManager->Shader( SHADER_FILLED_CIRCLE, 5.0f ); + currentManager->Vertex( aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 - currentManager->Shader( SHADER_FILLED_CIRCLE, 6.0f ); - currentManager->Vertex( 0.0f, aRadius * 2.0f, layerDepth ); // v2 + currentManager->Shader( SHADER_FILLED_CIRCLE, 6.0f ); + currentManager->Vertex( 0.0f, aRadius * 2.0f, layerDepth ); // v2 - Restore(); - } - else - { - Save(); - currentManager->Translate( aCenterPoint.x, aCenterPoint.y, layerDepth ); - currentManager->Scale( aRadius, aRadius, 0.0f ); - currentManager->Rotate( aAngle, 0.0f, 0.0f, 1.0f ); - - // It is enough just to draw a half of the circle vertices to make a semicircle - currentManager->Vertices( circleContainer.GetAllVertices(), ( CIRCLE_POINTS * 3 ) / 2 ); - - Restore(); - } + Restore(); } void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ) { - if( isUseShader ) - { - double outerRadius = aRadius + ( lineWidth / 2 ); + double outerRadius = aRadius + ( lineWidth / 2 ); - Save(); - currentManager->Translate( aCenterPoint.x, aCenterPoint.y, 0.0f ); - currentManager->Rotate( aAngle, 0.0f, 0.0f, 1.0f ); + Save(); + currentManager->Translate( aCenterPoint.x, aCenterPoint.y, 0.0f ); + currentManager->Rotate( aAngle, 0.0f, 0.0f, 1.0f ); - /* Draw a triangle that contains the semicircle, then shade it to leave only - * the semicircle. Parameters given to setShader are indices of the triangle's vertices - (if you want to understand more, check the vertex shader source [shader.vert]), the - radius and the line width. Shader uses this coordinates to determine if fragments are - inside the semicircle or not. - v2 - /\ - /__\ - v0 //__\\ v1 - */ - currentManager->Shader( SHADER_STROKED_CIRCLE, 4.0f, aRadius, lineWidth ); - currentManager->Vertex( -outerRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 + /* Draw a triangle that contains the semicircle, then shade it to leave only + * the semicircle. Parameters given to setShader are indices of the triangle's vertices + (if you want to understand more, check the vertex shader source [shader.vert]), the + radius and the line width. Shader uses this coordinates to determine if fragments are + inside the semicircle or not. + v2 + /\ + /__\ + v0 //__\\ v1 + */ + currentManager->Shader( SHADER_STROKED_CIRCLE, 4.0f, aRadius, lineWidth ); + currentManager->Vertex( -outerRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 - currentManager->Shader( SHADER_STROKED_CIRCLE, 5.0f, aRadius, lineWidth ); - currentManager->Vertex( outerRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 + currentManager->Shader( SHADER_STROKED_CIRCLE, 5.0f, aRadius, lineWidth ); + currentManager->Vertex( outerRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 - currentManager->Shader( SHADER_STROKED_CIRCLE, 6.0f, aRadius, lineWidth ); - currentManager->Vertex( 0.0f, outerRadius * 2.0f, layerDepth ); // v2 + currentManager->Shader( SHADER_STROKED_CIRCLE, 6.0f, aRadius, lineWidth ); + currentManager->Vertex( 0.0f, outerRadius * 2.0f, layerDepth ); // v2 - Restore(); - } - else - { - // Compute the factors for the unit circle - double innerScale = 1.0 - lineWidth / aRadius; - - Save(); - currentManager->Translate( aCenterPoint.x, aCenterPoint.y, layerDepth ); - currentManager->Scale( aRadius, aRadius, 0.0f ); - currentManager->Rotate( aAngle, 0.0f, 0.0f, 1.0f ); - - // Draw the outline - VERTEX* circle = circleContainer.GetAllVertices(); - int next; - - for( int i = 0; i < ( 3 * CIRCLE_POINTS ) / 2; ++i ) - { - // verticesCircle contains precomputed circle points interleaved with vertex - // (0,0,0), so filled circles can be drawn as consecutive triangles, ie: - // { 0,a,b, 0,c,d, 0,e,f, 0,g,h, ... } - // where letters stand for consecutive circle points and 0 for (0,0,0) vertex. - - // We have to skip all (0,0,0) vertices (every third vertex) - if( i % 3 == 0 ) - { - i++; - // Depending on the vertex, next circle point may be stored in the next vertex.. - next = i + 1; - } - else - { - // ..or 2 vertices away (in case it is preceded by (0,0,0) vertex) - next = i + 2; - } - - currentManager->Vertex( circle[i].x * innerScale, circle[i].y * innerScale, 0.0 ); - currentManager->Vertex( circle[i].x, circle[i].y, 0.0 ); - currentManager->Vertex( circle[next].x * innerScale, circle[next].y * innerScale, 0.0 ); - - currentManager->Vertex( circle[i].x, circle[i].y, 0.0 ); - currentManager->Vertex( circle[next].x, circle[next].y, 0.0 ); - currentManager->Vertex( circle[next].x * innerScale, circle[next].y * innerScale, 0.0 ); - } - - Restore(); - } + Restore(); } @@ -834,66 +665,24 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a if( isStrokeEnabled ) { - if( isUseShader ) + double alphaIncrement = 2.0 * M_PI / CIRCLE_POINTS; + currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + + VECTOR2D p( cos( aStartAngle ) * aRadius, sin( aStartAngle ) * aRadius ); + double alpha; + for( alpha = aStartAngle + alphaIncrement; alpha < aEndAngle; alpha += alphaIncrement ) { - double alphaIncrement = 2.0 * M_PI / CIRCLE_POINTS; - currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + VECTOR2D p_next( cos( alpha ) * aRadius, sin( alpha ) * aRadius ); + DrawLine( p, p_next ); - VECTOR2D p( cos( aStartAngle ) * aRadius, sin( aStartAngle ) * aRadius ); - double alpha; - for( alpha = aStartAngle + alphaIncrement; alpha < aEndAngle; alpha += alphaIncrement ) - { - VECTOR2D p_next( cos( alpha ) * aRadius, sin( alpha ) * aRadius ); - DrawLine( p, p_next ); - - p = p_next; - } - - // Draw the last missing part - if( alpha != aEndAngle ) - { - VECTOR2D p_last( cos( aEndAngle ) * aRadius, sin( aEndAngle ) * aRadius ); - DrawLine( p, p_last ); - } + p = p_next; } - else + + // Draw the last missing part + if( alpha != aEndAngle ) { - Scale( VECTOR2D( aRadius, aRadius ) ); - - double outerScale = lineWidth / aRadius / 2; - double innerScale = -outerScale; - - outerScale += 1.0; - innerScale += 1.0; - - double alphaIncrement = 2.0 * M_PI / CIRCLE_POINTS; - currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); - - for( double alpha = aStartAngle; alpha < aEndAngle; ) - { - double v0[] = { cos( alpha ) * innerScale, sin( alpha ) * innerScale }; - double v1[] = { cos( alpha ) * outerScale, sin( alpha ) * outerScale }; - - alpha += alphaIncrement; - - if( alpha > aEndAngle ) - alpha = aEndAngle; - - double v2[] = { cos( alpha ) * innerScale, sin( alpha ) * innerScale }; - double v3[] = { cos( alpha ) * outerScale, sin( alpha ) * outerScale }; - - currentManager->Vertex( v0[0], v0[1], 0.0 ); - currentManager->Vertex( v1[0], v1[1], 0.0 ); - currentManager->Vertex( v2[0], v2[1], 0.0 ); - - currentManager->Vertex( v1[0], v1[1], 0.0 ); - currentManager->Vertex( v3[0], v3[1], 0.0 ); - currentManager->Vertex( v2[0], v2[1], 0.0 ); - } - - // Draw line caps - drawFilledSemiCircle( startPoint, lineWidth / aRadius / 2.0, aStartAngle + M_PI ); - drawFilledSemiCircle( endPoint, lineWidth / aRadius / 2.0, aEndAngle ); + VECTOR2D p_last( cos( aEndAngle ) * aRadius, sin( aEndAngle ) * aRadius ); + DrawLine( p, p_last ); } } @@ -1362,6 +1151,7 @@ void OPENGL_GAL::DrawCursor( VECTOR2D aCursorPosition ) void OPENGL_GAL::DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { + // TODO change to simple drawline // We check, if we got a horizontal or a vertical grid line and compute the offset VECTOR2D perpendicularVector; @@ -1382,9 +1172,7 @@ void OPENGL_GAL::DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEnd VECTOR2D point3 = aEndPoint + perpendicularVector; VECTOR2D point4 = aEndPoint - perpendicularVector; - // Set color currentManager->Color( gridColor.r, gridColor.g, gridColor.b, gridColor.a ); - currentManager->Shader( SHADER_NONE ); // Draw the quad for the grid line diff --git a/include/class_drawpanel_gal.h b/include/class_drawpanel_gal.h index b6a63306f9..5f96787348 100644 --- a/include/class_drawpanel_gal.h +++ b/include/class_drawpanel_gal.h @@ -64,7 +64,7 @@ public: * Switches method of rendering graphics. * @param aGalType is a type of rendering engine that you want to use. */ - void SwitchBackend( GalType aGalType, bool aUseShaders = false ); + void SwitchBackend( GalType aGalType ); /** * Function GetGAL @@ -89,8 +89,7 @@ protected: ///< using GAL KiGfx::WX_VIEW_CONTROLS* m_viewControls; ///< Control for VIEW (moving, zooming, etc.) GalType m_currentGal; ///< Currently used GAL - bool m_useShaders; ///< Are shaders used? (only for OpenGL GAL) - wxLongLong m_timeStamp; + wxLongLong m_timeStamp; ///< Timestamp for framelimiter }; #endif diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index b44d338fa8..48aaba6928 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -82,14 +82,9 @@ public: * a wxCommandEvent holding EVT_GAL_REDRAW, as sent by PostPaint(). * * @param aName is the name of this window for use by wxWindow::FindWindowByName() - * - * @param isUseShaders is a flag, that indicates, if shaders should be used - * for higher quality rendering. - * */ OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener = NULL, - wxEvtHandler* aPaintListener = NULL, bool isUseShaders = false, - const wxString& aName = wxT( "GLCanvas" ) ); + wxEvtHandler* aPaintListener = NULL, const wxString& aName = wxT( "GLCanvas" ) ); virtual ~OPENGL_GAL(); @@ -366,7 +361,6 @@ private: bool isGlewInitialized; ///< Is GLEW initialized? bool isFramebufferInitialized; ///< Are the framebuffers initialized? bool isShaderInitialized; ///< Was the shader initialized? - bool isUseShader; ///< Should the shaders be used? bool isGrouping; ///< Was a group started? /** diff --git a/pcbnew/hotkeys.cpp b/pcbnew/hotkeys.cpp index 481db0168c..2f9e61d7fe 100644 --- a/pcbnew/hotkeys.cpp +++ b/pcbnew/hotkeys.cpp @@ -85,9 +85,7 @@ static EDA_HOTKEY HkSwitchHighContrastMode( wxT("Switch Highcontrast mode"), static EDA_HOTKEY HkCanvasDefault( wxT( "Switch to default canvas" ), HK_CANVAS_DEFAULT, GR_KB_ALT + WXK_F9 ); static EDA_HOTKEY HkCanvasOpenGL( wxT( "Switch to OpenGL canvas" ), - HK_CANVAS_OPENGL, GR_KB_ALT + WXK_F10 ); -static EDA_HOTKEY HkCanvasOpenGLShaders( wxT( "Switch to OpenGL canvas with shaders" ), - HK_CANVAS_OPENGL_SHADERS, GR_KB_ALT + WXK_F11 ); + HK_CANVAS_OPENGL, GR_KB_ALT + WXK_F11 ); static EDA_HOTKEY HkCanvasCairo( wxT( "Switch to Cairo canvas" ), HK_CANVAS_CAIRO, GR_KB_ALT + WXK_F12 ); @@ -237,7 +235,7 @@ EDA_HOTKEY* board_edit_Hotkey_List[] = &HkRecordMacros6, &HkCallMacros6, &HkRecordMacros7, &HkCallMacros7, &HkRecordMacros8, &HkCallMacros8, &HkRecordMacros9, &HkCallMacros9, &HkSwitchHighContrastMode, - &HkCanvasDefault, &HkCanvasCairo, &HkCanvasOpenGL, &HkCanvasOpenGLShaders, + &HkCanvasDefault, &HkCanvasCairo, &HkCanvasOpenGL, NULL }; diff --git a/pcbnew/hotkeys.h b/pcbnew/hotkeys.h index c96855c2a2..3881888724 100644 --- a/pcbnew/hotkeys.h +++ b/pcbnew/hotkeys.h @@ -84,7 +84,6 @@ enum hotkey_id_commnand { HK_SWITCH_HIGHCONTRAST_MODE, HK_CANVAS_DEFAULT, HK_CANVAS_OPENGL, - HK_CANVAS_OPENGL_SHADERS, HK_CANVAS_CAIRO, }; diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index 5f87f1d8cb..80e8dd8b41 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -364,13 +364,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() AddMenuItem( viewMenu, ID_MENU_CANVAS_OPENGL, text, _( "Switch the canvas implementation to OpenGL" ), KiBitmap( tools_xpm ) ); - - text = AddHotkeyName( _( "&Switch canvas to OpenGL (shaders)" ), g_Pcbnew_Editor_Hokeys_Descr, - HK_CANVAS_OPENGL_SHADERS, IS_ACCELERATOR ); - - AddMenuItem( viewMenu, ID_MENU_CANVAS_OPENGL_SHADERS, - text, _( "Switch the canvas implementation to OpenGL that uses shaders" ), - KiBitmap( tools_xpm ) ); text = AddHotkeyName( _( "&Switch canvas to Cairo" ), g_Pcbnew_Editor_Hokeys_Descr, HK_CANVAS_CAIRO, IS_ACCELERATOR ); diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 8a3e663359..630ea130e4 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -163,7 +163,6 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_MENU( ID_MENU_CANVAS_DEFAULT, PCB_EDIT_FRAME::SwitchCanvas ) EVT_MENU( ID_MENU_CANVAS_CAIRO, PCB_EDIT_FRAME::SwitchCanvas ) EVT_MENU( ID_MENU_CANVAS_OPENGL, PCB_EDIT_FRAME::SwitchCanvas ) - EVT_MENU( ID_MENU_CANVAS_OPENGL_SHADERS, PCB_EDIT_FRAME::SwitchCanvas ) // Menu Get Design Rules Editor EVT_MENU( ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG, PCB_EDIT_FRAME::ShowDesignRulesEditor ) @@ -611,12 +610,7 @@ void PCB_EDIT_FRAME::SwitchCanvas( wxCommandEvent& aEvent ) break; case ID_MENU_CANVAS_OPENGL: - m_galCanvas->SwitchBackend( EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL, false ); - UseGalCanvas( true ); - break; - - case ID_MENU_CANVAS_OPENGL_SHADERS: - m_galCanvas->SwitchBackend( EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL, true ); + m_galCanvas->SwitchBackend( EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL ); UseGalCanvas( true ); break; } diff --git a/pcbnew/pcbnew_id.h b/pcbnew/pcbnew_id.h index a5babb0348..d6580786fb 100644 --- a/pcbnew/pcbnew_id.h +++ b/pcbnew/pcbnew_id.h @@ -268,7 +268,6 @@ enum pcbnew_ids ID_MENU_PCB_SHOW_3D_FRAME, ID_MENU_CANVAS_DEFAULT, ID_MENU_CANVAS_OPENGL, - ID_MENU_CANVAS_OPENGL_SHADERS, ID_MENU_CANVAS_CAIRO, ID_PCB_USER_GRID_SETUP, ID_PCB_GEN_BOM_FILE_FROM_BOARD, From 70a2321cc127c6b5479624837c8709deda679ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Sumi=C5=84ski?= Date: Tue, 30 Jul 2013 13:58:03 +0200 Subject: [PATCH 187/415] Fixed smudging in the Cairo backend. --- common/gal/cairo/cairo_compositor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/gal/cairo/cairo_compositor.cpp b/common/gal/cairo/cairo_compositor.cpp index 53c8cc431e..fa6b6918f7 100644 --- a/common/gal/cairo/cairo_compositor.cpp +++ b/common/gal/cairo/cairo_compositor.cpp @@ -1,4 +1,4 @@ -/*i +/* * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2013 CERN @@ -69,6 +69,7 @@ unsigned int CAIRO_COMPOSITOR::GetBuffer() { // Pixel storage BitmapPtr bitmap( new unsigned int[m_bufferSize] ); + memset( bitmap.get(), 0x00, m_bufferSize * sizeof(int) ); // Create the Cairo surface cairo_surface_t* surface = cairo_image_surface_create_for_data( From 11a2d817383b07425f91eae9dfaa2e3bf88e5464 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 30 Jul 2013 17:09:06 +0200 Subject: [PATCH 188/415] Made GAL backends settings more consistent. Fixed grid line width in the OpenGL backend. --- common/gal/cairo/cairo_gal.cpp | 32 ++--- common/gal/graphics_abstraction_layer.cpp | 162 +++++++++++----------- common/gal/opengl/opengl_compositor.cpp | 9 +- common/gal/opengl/opengl_gal.cpp | 70 ++++------ common/gal/opengl/shader.vert | 2 +- include/gal/cairo/cairo_gal.h | 8 +- include/gal/graphics_abstraction_layer.h | 7 + include/gal/opengl/opengl_gal.h | 8 +- 8 files changed, 135 insertions(+), 163 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index c17b0c7641..6e8a225d93 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -40,23 +40,16 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, wxEvtHandler* aPaintListener, const wxString& aName ) : wxWindow( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxEXPAND, aName ) { - // Default values - fillColor = COLOR4D( 0, 0, 0, 1 ); - strokeColor = COLOR4D( 1, 1, 1, 1 ); - screenSize = VECTOR2D( aParent->GetSize() ); - parentWindow = aParent; mouseListener = aMouseListener; paintListener = aPaintListener; + // Initialize the flags isGrouping = false; isInitialized = false; isDeleteSavedPixels = false; - zoomFactor = 1.0; groupCounter = 0; - SetSize( aParent->GetSize() ); - // Connecting the event handlers Connect( wxEVT_PAINT, wxPaintEventHandler( CAIRO_GAL::onPaint ) ); @@ -73,17 +66,12 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); #endif - // Initialize the cursor shape - SetCursorColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); - initCursor( 21 ); + SetSize( aParent->GetSize() ); + screenSize = VECTOR2D( aParent->GetSize() ); + initCursor( 20 ); - // Allocate memory + // Allocate memory for pixel storage allocateBitmaps(); - - // Set grid defaults - SetGridColor( COLOR4D( 0.5, 0.5, 0.5, 0.3 ) ); - SetCoarseGrid( 10 ); - SetGridLineWidth( 0.5 ); } @@ -107,7 +95,7 @@ void CAIRO_GAL::onPaint( wxPaintEvent& aEvent ) void CAIRO_GAL::ResizeScreen( int aWidth, int aHeight ) { - screenSize = VECTOR2D( aWidth, aHeight ); + screenSize = VECTOR2D( aWidth, aHeight ); // Recreate the bitmaps deleteBitmaps(); @@ -557,10 +545,10 @@ void CAIRO_GAL::SetLayerDepth( double aLayerDepth ) { storePath(); -// cairo_pop_group_to_source( currentContext ); -// cairo_paint_with_alpha( currentContext, fillColor.a ); -// -// cairo_push_group( currentContext ); + cairo_pop_group_to_source( currentContext ); + cairo_paint_with_alpha( currentContext, fillColor.a ); + + cairo_push_group( currentContext ); } } diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index 88855fa5c6..a3bd5cff0f 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -38,15 +38,21 @@ GAL::GAL() : // Set the default values for the internal variables SetIsFill( false ); SetIsStroke( true ); - SetIsCursorEnabled( false ); - SetZoomFactor( 1.0 ); SetFillColor( COLOR4D( 0.0, 0.0, 0.0, 0.0 ) ); SetStrokeColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); - SetGridVisibility( true ); - SetGridColor( COLOR4D( 1, 1, 1, 0.1 ) ); - SetCoarseGrid( 5 ); - SetLineWidth( 1.0 ); + SetIsCursorEnabled( false ); + SetZoomFactor( 1.0 ); SetDepthRange( VECTOR2D( -2048, 2047 ) ); + SetLineWidth( 1.0 ); + + // Set grid defaults + SetGridVisibility( true ); + SetGridColor( COLOR4D( 0.4, 0.4, 0.4, 1.0 ) ); + SetCoarseGrid( 10 ); + SetGridLineWidth( 0.5 ); + + // Initialize the cursor shape + SetCursorColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); strokeFont.LoadNewStrokeFont( newstroke_font, newstroke_font_bufsize ); } @@ -65,99 +71,95 @@ void GAL::DrawGrid() SetTarget( TARGET_NONCACHED ); // The grid consists of lines - // For the drawing the start points, end points and increments have to be calculated in world coordinates - VECTOR2D screenStartPoint( 0, 0 ); - VECTOR2D screenEndPoint( screenSize.x, screenSize.y ); + // For the drawing the start points, end points and increments have + // to be calculated in world coordinates MATRIX3x3D inverseMatrix = worldScreenMatrix.Inverse(); - VECTOR2D worldStartPoint = inverseMatrix * screenStartPoint; - VECTOR2D worldEndPoint = inverseMatrix * screenEndPoint; - - // Compute grid variables - int gridStartX = round( worldStartPoint.x / gridSize.x ); - int gridEndX = round( worldEndPoint.x / gridSize.x ); - int gridStartY = round( worldStartPoint.y / gridSize.y ); - int gridEndY = round( worldEndPoint.y / gridSize.y ); + VECTOR2D worldStartPoint = inverseMatrix * VECTOR2D( 0.0, 0.0 ); + VECTOR2D worldEndPoint = inverseMatrix * screenSize; int gridScreenSizeDense = round( gridSize.x * worldScale ); - int gridScreenSizeCoarse = round( gridSize.x * (double) gridTick * worldScale ); - - // Swap the coordinates, if they have not the right order - SWAP( gridEndX, <, gridStartX ); - SWAP( gridEndY, <, gridStartY ); - - // Correct the index, else some lines are not correctly painted - gridStartX -= 1; - gridStartY -= 1; - gridEndX += 1; - gridEndY += 1; - - double savedLineWidth = GetLineWidth(); - COLOR4D savedColor = GetStrokeColor(); + int gridScreenSizeCoarse = round( gridSize.x * static_cast( gridTick ) * worldScale ); // Compute the line width of the grid - ComputeWorldScale(); - double width = gridLineWidth / worldScale; - double doubleWidth = 2 * width; + double width = 2.0 * gridLineWidth / worldScale; + double doubleWidth = 2.0 * width; - SetLayerDepth( 0.0 ); + SetIsFill( false ); + SetIsStroke( true ); // Draw the origin marker - double origSize = (double) gridOriginMarkerSize / worldScale; + SetLayerDepth( 0.0 ); + double origSize = static_cast( gridOriginMarkerSize ) / worldScale; SetStrokeColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); SetLineWidth( width ); - SetIsFill( false ); - DrawLine( gridOrigin + VECTOR2D( -origSize, -origSize ), gridOrigin + VECTOR2D( origSize, origSize ) ); - DrawLine( gridOrigin + VECTOR2D( -origSize, origSize ), gridOrigin + VECTOR2D( origSize, -origSize ) ); + DrawLine( gridOrigin + VECTOR2D( -origSize, -origSize ), + gridOrigin + VECTOR2D( origSize, origSize ) ); + DrawLine( gridOrigin + VECTOR2D( -origSize, origSize ), + gridOrigin + VECTOR2D( origSize, -origSize ) ); DrawCircle( gridOrigin, origSize * 0.7 ); - SetStrokeColor( gridColor ); - - if( std::max( gridScreenSizeDense, gridScreenSizeCoarse ) < gridDrawThreshold ) - return; - - SetLayerDepth( 0.0 ); - // Now draw the grid, every coarse grid line gets the double width - for( int j = gridStartY; j < gridEndY; j += 1 ) + // Check if the grid would not be too dense + if( std::max( gridScreenSizeDense, gridScreenSizeCoarse ) > gridDrawThreshold ) { - if( j % gridTick == 0 && gridScreenSizeDense > gridDrawThreshold ) + // Compute grid variables + int gridStartX = round( worldStartPoint.x / gridSize.x ); + int gridEndX = round( worldEndPoint.x / gridSize.x ); + int gridStartY = round( worldStartPoint.y / gridSize.y ); + int gridEndY = round( worldEndPoint.y / gridSize.y ); + + // Swap the coordinates, if they have not the right order + SWAP( gridEndX, <, gridStartX ); + SWAP( gridEndY, <, gridStartY ); + + // Correct the index, else some lines are not correctly painted + gridStartX -= 1; + gridStartY -= 1; + gridEndX += 1; + gridEndY += 1; + + // Draw the grid behind all layers + SetLayerDepth( depthRange.y * 0.75 ); + SetStrokeColor( gridColor ); + + // Now draw the grid, every coarse grid line gets the double width + for( int j = gridStartY; j < gridEndY; j += 1 ) { - SetLineWidth( doubleWidth ); - } - else - { - SetLineWidth( width ); + if( j % gridTick == 0 && gridScreenSizeDense > gridDrawThreshold ) + { + SetLineWidth( doubleWidth ); + } + else + { + SetLineWidth( width ); + } + + if( ( j % gridTick == 0 && gridScreenSizeCoarse > gridDrawThreshold ) + || gridScreenSizeDense > gridDrawThreshold ) + { + DrawGridLine( VECTOR2D( gridStartX * gridSize.x, j * gridSize.y ), + VECTOR2D( gridEndX * gridSize.x, j * gridSize.y ) ); + } } - if( ( j % gridTick == 0 && gridScreenSizeCoarse > gridDrawThreshold ) - || gridScreenSizeDense > gridDrawThreshold ) + for( int i = gridStartX; i < gridEndX; i += 1 ) { - DrawGridLine( VECTOR2D( gridStartX * gridSize.x, j * gridSize.y ), - VECTOR2D( gridEndX * gridSize.x, j * gridSize.y ) ); + if( i % gridTick == 0 && gridScreenSizeDense > gridDrawThreshold ) + { + SetLineWidth( doubleWidth ); + } + else + { + SetLineWidth( width ); + } + + if( ( i % gridTick == 0 && gridScreenSizeCoarse > gridDrawThreshold ) + || gridScreenSizeDense > gridDrawThreshold ) + { + DrawGridLine( VECTOR2D( i * gridSize.x, gridStartY * gridSize.y ), + VECTOR2D( i * gridSize.x, gridEndY * gridSize.y ) ); + } } } - - for( int i = gridStartX; i < gridEndX; i += 1 ) - { - if( i % gridTick == 0 && gridScreenSizeDense > gridDrawThreshold ) - { - SetLineWidth( doubleWidth ); - } - else - { - SetLineWidth( width ); - } - - if( ( i % gridTick == 0 && gridScreenSizeCoarse > gridDrawThreshold ) - || gridScreenSizeDense > gridDrawThreshold ) - { - DrawGridLine( VECTOR2D( i * gridSize.x, gridStartY * gridSize.y ), - VECTOR2D( i * gridSize.x, gridEndY * gridSize.y ) ); - } - } - - // Restore old values - SetLineWidth( savedLineWidth ); - SetStrokeColor( savedColor ); } diff --git a/common/gal/opengl/opengl_compositor.cpp b/common/gal/opengl/opengl_compositor.cpp index ab8eb59188..2ff733e978 100644 --- a/common/gal/opengl/opengl_compositor.cpp +++ b/common/gal/opengl/opengl_compositor.cpp @@ -143,13 +143,18 @@ void OPENGL_COMPOSITOR::SetBuffer( unsigned int aBufferHandle ) return; // Change the rendering destination to the selected attachment point - if( m_currentFbo != m_framebuffer ) + if( aBufferHandle == 0 ) + { + glBindFramebuffer( GL_FRAMEBUFFER, 0 ); + m_currentFbo = 0; + } + else if( m_currentFbo != m_framebuffer ) { glBindFramebuffer( GL_FRAMEBUFFER, m_framebuffer ); m_currentFbo = m_framebuffer; } - if( m_current != aBufferHandle - 1 ) + if( m_currentFbo != 0 && m_current != aBufferHandle - 1 ) { m_current = aBufferHandle - 1; glDrawBuffer( m_buffers[m_current].attachmentPoint ); diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 22b5bae9b9..9acb2d7f65 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -63,29 +63,14 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, mouseListener = aMouseListener; paintListener = aPaintListener; - // Set the cursor size - initCursor( 20 ); - SetCursorColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); - // Initialize the flags isGlewInitialized = false; isFramebufferInitialized = false; isShaderInitialized = false; isGrouping = false; - wxSize parentSize = aParent->GetSize(); groupCounter = 0; - SetSize( parentSize ); - - screenSize.x = parentSize.x; - screenSize.y = parentSize.y; - - // Set grid defaults - SetGridColor( COLOR4D( 0.3, 0.3, 0.3, 0.3 ) ); - SetCoarseGrid( 10 ); - SetGridLineWidth( 1.0 ); - - // Connecting the event handlers. + // Connecting the event handlers Connect( wxEVT_PAINT, wxPaintEventHandler( OPENGL_GAL::onPaint ) ); // Mouse events are skipped to the parent @@ -101,6 +86,10 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); #endif + SetSize( aParent->GetSize() ); + screenSize = VECTOR2D( aParent->GetSize() ); + initCursor( 20 ); + // Tesselator initialization tesselator = gluNewTess(); InitTesselatorCallbacks( tesselator ); @@ -308,6 +297,12 @@ void OPENGL_GAL::BeginDrawing() SetStrokeColor( strokeColor ); // Prepare buffers for drawing + compositor.SetBuffer( mainBuffer ); + compositor.ClearBuffer(); + compositor.SetBuffer( overlayBuffer ); + compositor.ClearBuffer(); + compositor.SetBuffer( 0 ); // Unbind buffers + nonCachedManager.Clear(); overlayManager.Clear(); @@ -321,13 +316,11 @@ void OPENGL_GAL::EndDrawing() { // Cached & non-cached containers are rendered to the same buffer compositor.SetBuffer( mainBuffer ); - compositor.ClearBuffer(); nonCachedManager.EndDrawing(); cachedManager.EndDrawing(); // Overlay container is rendered to a different buffer compositor.SetBuffer( overlayBuffer ); - compositor.ClearBuffer(); overlayManager.EndDrawing(); // Draw the remaining contents, blit the rendering targets to the screen, swap the buffers @@ -349,11 +342,9 @@ inline void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2 if( lineLength <= 0.0 ) return; - VECTOR2D perpendicularVector( -startEndVector.y * scale, startEndVector.x * scale ); - glm::vec4 vector( perpendicularVector.x, perpendicularVector.y, 0.0, 0.0 ); - // The perpendicular vector also needs transformations - vector = currentManager->GetTransformation() * vector; + glm::vec4 vector = currentManager->GetTransformation() * + glm::vec4( -startEndVector.y * scale, startEndVector.x * scale, 0.0, 0.0 ); // Line width is maintained by the vertex shader currentManager->Shader( SHADER_LINE, vector.x, vector.y, lineWidth ); @@ -1151,39 +1142,26 @@ void OPENGL_GAL::DrawCursor( VECTOR2D aCursorPosition ) void OPENGL_GAL::DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { - // TODO change to simple drawline - // We check, if we got a horizontal or a vertical grid line and compute the offset - VECTOR2D perpendicularVector; + compositor.SetBuffer( mainBuffer ); - if( aStartPoint.x == aEndPoint.x ) + // We do not need a very precise comparison here (the lineWidth is set by GAL::DrawGrid()) + if( fabs( lineWidth - 2.0 * gridLineWidth / worldScale ) < 0.1 ) { - // Vertical grid line - perpendicularVector = VECTOR2D( 0.5 * lineWidth, 0 ); + glLineWidth( 1.0 ); } else { - // Horizontal grid line - perpendicularVector = VECTOR2D( 0, 0.5 * lineWidth ); + glLineWidth( 2.0 ); } - // Now we compute the edge points of the quad - VECTOR2D point1 = aStartPoint + perpendicularVector; - VECTOR2D point2 = aStartPoint - perpendicularVector; - VECTOR2D point3 = aEndPoint + perpendicularVector; - VECTOR2D point4 = aEndPoint - perpendicularVector; + glColor4d( gridColor.r, gridColor.g, gridColor.b, gridColor.a ); - currentManager->Color( gridColor.r, gridColor.g, gridColor.b, gridColor.a ); - currentManager->Shader( SHADER_NONE ); + glBegin( GL_LINES ); + glVertex3d( aStartPoint.x, aStartPoint.y, layerDepth ); + glVertex3d( aEndPoint.x, aEndPoint.y, layerDepth ); + glEnd(); - // Draw the quad for the grid line - double gridDepth = depthRange.y * 0.75; - currentManager->Vertex( point1.x, point1.y, gridDepth ); - currentManager->Vertex( point2.x, point2.y, gridDepth ); - currentManager->Vertex( point4.x, point4.y, gridDepth ); - - currentManager->Vertex( point1.x, point1.y, gridDepth ); - currentManager->Vertex( point4.x, point4.y, gridDepth ); - currentManager->Vertex( point3.x, point3.y, gridDepth ); + glColor4d( 1.0, 1.0, 1.0, 1.0 ); } diff --git a/common/gal/opengl/shader.vert b/common/gal/opengl/shader.vert index 86f468b3c6..f22a582b6b 100644 --- a/common/gal/opengl/shader.vert +++ b/common/gal/opengl/shader.vert @@ -51,7 +51,7 @@ void main() // Make lines appear to be at least 1 pixel wide if( worldScale * lineWidth < MIN_WIDTH ) - scale = 1.0f / ( worldScale * lineWidth ); + scale = MIN_WIDTH / ( worldScale * lineWidth ); else scale = 1.0f; diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index bccf92d724..df3d977502 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -389,12 +389,8 @@ private: */ void skipMouseEvent( wxMouseEvent& aEvent ); - /** - * @brief Initialize the cursor. - * - * @param aCursorSize is the size of the cursor. - */ - void initCursor( int aCursorSize ); + /// @copydoc GAL::initCursor() + virtual void initCursor( int aCursorSize ); /// Allocate the bitmaps for drawing void allocateBitmaps(); diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index bb256f684a..0f51d607a3 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -785,6 +785,13 @@ protected: * @param aEndPoint is the end point of the line. */ virtual void DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) = 0; + + /** + * @brief Initialize the cursor. + * + * @param aCursorSize is the size of the cursor. + */ + virtual void initCursor( int aCursorSize ) = 0; }; } // namespace KiGfx diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 48aaba6928..4fd7a7c375 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -422,12 +422,8 @@ private: /// Initialize GLEW. void initGlew(); - /** - * @brief Initialize the cursor. - * - * @param aCursorSize is the cursor size in pixels (screen coordinates). - */ - void initCursor( int aCursorSize ); + /// @copydoc GAL::initCursor() + virtual void initCursor( int aCursorSize ); /** * @brief Draw a quad for the line. From 2f0ae47c8ec3cbcf17dab32a0ad2631bf4fd2af2 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 30 Jul 2013 18:29:54 +0200 Subject: [PATCH 189/415] Code refactoring. --- common/gal/cairo/cairo_compositor.cpp | 5 +- common/gal/cairo/cairo_gal.cpp | 600 +++++++-------- common/gal/graphics_abstraction_layer.cpp | 31 +- common/gal/opengl/gpu_manager.cpp | 2 +- common/gal/opengl/opengl_compositor.cpp | 4 +- common/gal/opengl/opengl_gal.cpp | 887 ++++++++++------------ common/gal/opengl/shader.cpp | 17 +- common/gal/opengl/vertex_manager.cpp | 11 +- common/view/wx_view_controls.cpp | 1 - include/gal/cairo/cairo_compositor.h | 18 +- include/gal/cairo/cairo_gal.h | 101 +-- include/gal/graphics_abstraction_layer.h | 10 +- include/gal/opengl/cached_container.h | 12 +- include/gal/opengl/opengl_compositor.h | 2 - include/gal/opengl/opengl_gal.h | 209 ++--- include/gal/opengl/vertex_common.h | 7 +- 16 files changed, 857 insertions(+), 1060 deletions(-) diff --git a/common/gal/cairo/cairo_compositor.cpp b/common/gal/cairo/cairo_compositor.cpp index fa6b6918f7..d5b101493a 100644 --- a/common/gal/cairo/cairo_compositor.cpp +++ b/common/gal/cairo/cairo_compositor.cpp @@ -34,7 +34,7 @@ using namespace KiGfx; CAIRO_COMPOSITOR::CAIRO_COMPOSITOR( cairo_t** aMainContext ) : - m_current( 0 ), m_currentContext( aMainContext ), m_mainContext( *aMainContext ) + m_current( 0 ), m_currentContext( aMainContext ), m_mainContext( *aMainContext ) { // Obtain the transformation matrix used in the main context cairo_get_matrix( m_mainContext, &m_matrix ); @@ -69,6 +69,7 @@ unsigned int CAIRO_COMPOSITOR::GetBuffer() { // Pixel storage BitmapPtr bitmap( new unsigned int[m_bufferSize] ); + memset( bitmap.get(), 0x00, m_bufferSize * sizeof(int) ); // Create the Cairo surface @@ -105,6 +106,7 @@ void CAIRO_COMPOSITOR::SetBuffer( unsigned int aBufferHandle ) m_current = aBufferHandle - 1; *m_currentContext = m_buffers[m_current].context; } + #ifdef __WXDEBUG__ else wxLogDebug( wxT( "Tried to use a not existing buffer" ) ); @@ -141,6 +143,7 @@ void CAIRO_COMPOSITOR::DrawBuffer( unsigned int aBufferHandle ) // Restore the transformation matrix cairo_set_matrix( m_mainContext, &m_matrix ); } + #ifdef __WXDEBUG__ else wxLogDebug( wxT( "Tried to use a not existing buffer" ) ); diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 6e8a225d93..c7e4f6b8ed 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -87,117 +87,7 @@ CAIRO_GAL::~CAIRO_GAL() } -void CAIRO_GAL::onPaint( wxPaintEvent& aEvent ) -{ - PostPaint(); -} - - -void CAIRO_GAL::ResizeScreen( int aWidth, int aHeight ) -{ - screenSize = VECTOR2D( aWidth, aHeight ); - - // Recreate the bitmaps - deleteBitmaps(); - allocateBitmaps(); - - SetSize( wxSize( aWidth, aHeight ) ); -} - - -void CAIRO_GAL::skipMouseEvent( wxMouseEvent& aEvent ) -{ - // Post the mouse event to the event listener registered in constructor, if any - if( mouseListener ) - wxPostEvent( mouseListener, aEvent ); -} - - -void CAIRO_GAL::initSurface() -{ - wxASSERT( !isInitialized ); - - // Create the Cairo surface - surface = cairo_image_surface_create_for_data( (unsigned char*) bitmapBuffer, GAL_FORMAT, - screenSize.x, screenSize.y, stride ); - context = cairo_create( surface ); -#ifdef __WXDEBUG__ - cairo_status_t status = cairo_status( context ); - wxASSERT_MSG( status == CAIRO_STATUS_SUCCESS, "Cairo context creation error" ); -#endif /* __WXDEBUG__ */ - currentContext = context; - - cairo_set_antialias( context, CAIRO_ANTIALIAS_SUBPIXEL ); - - // Clear the screen - ClearScreen(); - - // Compute the world <-> screen transformations - ComputeWorldScreenMatrix(); - - cairo_matrix_init( &cairoWorldScreenMatrix, worldScreenMatrix.m_data[0][0], - worldScreenMatrix.m_data[1][0], worldScreenMatrix.m_data[0][1], - worldScreenMatrix.m_data[1][1], worldScreenMatrix.m_data[0][2], - worldScreenMatrix.m_data[1][2] ); - - cairo_set_matrix( context, &cairoWorldScreenMatrix ); - - isSetAttributes = false; - - // Start drawing with a new path - cairo_new_path( context ); - isElementAdded = true; - - cairo_set_line_join( context, CAIRO_LINE_JOIN_ROUND ); - cairo_set_line_cap( context, CAIRO_LINE_CAP_ROUND ); - - lineWidth = 0; - - isDeleteSavedPixels = true; - isInitialized = true; -} - - -void CAIRO_GAL::deinitSurface() -{ - if( !isInitialized ) - return; - - // Destroy Cairo objects - cairo_destroy( context ); - cairo_surface_destroy( surface ); - - isInitialized = false; -} - - -void CAIRO_GAL::setCompositor() -{ - // Recreate the compositor with the new Cairo context - compositor.reset( new CAIRO_COMPOSITOR( ¤tContext ) ); - compositor->Resize( screenSize.x, screenSize.y ); - - // Prepare buffers - mainBuffer = compositor->GetBuffer(); - overlayBuffer = compositor->GetBuffer(); -} - - -unsigned int CAIRO_GAL::getNewGroupNumber() -{ - wxASSERT_MSG( groups.size() < std::numeric_limits::max(), - wxT( "There are no free slots to store a group" ) ); - - while( groups.find( groupCounter ) != groups.end() ) - { - groupCounter++; - } - - return groupCounter++; -} - - -void CAIRO_GAL::BeginDrawing() throw( int ) +void CAIRO_GAL::BeginDrawing() { initSurface(); setCompositor(); @@ -245,65 +135,6 @@ void CAIRO_GAL::EndDrawing() } -void CAIRO_GAL::SaveScreen() -{ - // Copy the current bitmap to the backup buffer - int offset = 0; - - for( int j = 0; j < screenSize.y; j++ ) - { - for( int i = 0; i < stride; i++ ) - { - bitmapBufferBackup[offset + i] = bitmapBuffer[offset + i]; - offset += stride; - } - } -} - - -void CAIRO_GAL::RestoreScreen() -{ - int offset = 0; - - for( int j = 0; j < screenSize.y; j++ ) - { - for( int i = 0; i < stride; i++ ) - { - bitmapBuffer[offset + i] = bitmapBufferBackup[offset + i]; - offset += stride; - } - } -} - - -void CAIRO_GAL::SetTarget( RenderTarget aTarget ) -{ - // If the compositor is not set, that means that there is a recaching process going on - // and we do not need the compositor now - if( !compositor ) - return; - - // Cairo grouping prevents display of overlapping items on the same layer in the lighter color - cairo_pop_group_to_source( currentContext ); - cairo_paint_with_alpha( currentContext, fillColor.a ); - - switch( aTarget ) - { - default: - case TARGET_CACHED: - case TARGET_NONCACHED: - compositor->SetBuffer( mainBuffer ); - break; - - case TARGET_OVERLAY: - compositor->SetBuffer( overlayBuffer ); - break; - } - - cairo_push_group( currentContext ); -} - - void CAIRO_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { cairo_move_to( currentContext, aStartPoint.x, aStartPoint.y ); @@ -335,7 +166,7 @@ void CAIRO_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPo cairo_translate( currentContext, aStartPoint.x, aStartPoint.y ); cairo_rotate( currentContext, lineAngle ); - cairo_arc( currentContext, 0.0, 0.0, aWidth / 2.0, M_PI / 2.0, 3.0 * M_PI / 2.0 ); + cairo_arc( currentContext, 0.0, 0.0, aWidth / 2.0, M_PI / 2.0, 3.0 * M_PI / 2.0 ); cairo_arc( currentContext, lineLength, 0.0, aWidth / 2.0, -M_PI / 2.0, M_PI / 2.0 ); cairo_move_to( currentContext, 0.0, aWidth / 2.0 ); @@ -373,12 +204,30 @@ void CAIRO_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double aS } +void CAIRO_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) +{ + // Calculate the diagonal points + VECTOR2D diagonalPointA( aEndPoint.x, aStartPoint.y ); + VECTOR2D diagonalPointB( aStartPoint.x, aEndPoint.y ); + + // The path is composed from 4 segments + cairo_move_to( currentContext, aStartPoint.x, aStartPoint.y ); + cairo_line_to( currentContext, diagonalPointA.x, diagonalPointA.y ); + cairo_line_to( currentContext, aEndPoint.x, aEndPoint.y ); + cairo_line_to( currentContext, diagonalPointB.x, diagonalPointB.y ); + cairo_close_path( currentContext ); + + isElementAdded = true; +} + + void CAIRO_GAL::DrawPolyline( std::deque& aPointList ) { // Iterate over the point list and draw the segments std::deque::const_iterator it = aPointList.begin(); cairo_move_to( currentContext, it->x, it->y ); + for( ++it; it != aPointList.end(); ++it ) { cairo_line_to( currentContext, it->x, it->y ); @@ -394,6 +243,7 @@ void CAIRO_GAL::DrawPolygon( const std::deque& aPointList ) std::deque::const_iterator it = aPointList.begin(); cairo_move_to( currentContext, it->x, it->y ); + for( ++it; it != aPointList.end(); ++it ) { cairo_line_to( currentContext, it->x, it->y ); @@ -403,23 +253,6 @@ void CAIRO_GAL::DrawPolygon( const std::deque& aPointList ) } -void CAIRO_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) -{ - // Calculate the diagonal points - VECTOR2D diagonalPointA( aEndPoint.x, aStartPoint.y ); - VECTOR2D diagonalPointB( aStartPoint.x, aEndPoint.y ); - - // The path is composed from 4 segments - cairo_move_to( currentContext, aStartPoint.x, aStartPoint.y ); - cairo_line_to( currentContext, diagonalPointA.x, diagonalPointA.y ); - cairo_line_to( currentContext, aEndPoint.x, aEndPoint.y ); - cairo_line_to( currentContext, diagonalPointB.x, diagonalPointB.y ); - cairo_close_path( currentContext ); - - isElementAdded = true; -} - - void CAIRO_GAL::DrawCurve( const VECTOR2D& aStartPoint, const VECTOR2D& aControlPointA, const VECTOR2D& aControlPointB, const VECTOR2D& aEndPoint ) { @@ -432,9 +265,41 @@ void CAIRO_GAL::DrawCurve( const VECTOR2D& aStartPoint, const VECTOR2D& aControl } -void CAIRO_GAL::SetBackgroundColor( const COLOR4D& aColor ) +void CAIRO_GAL::ResizeScreen( int aWidth, int aHeight ) { - backgroundColor = aColor; + screenSize = VECTOR2D( aWidth, aHeight ); + + // Recreate the bitmaps + deleteBitmaps(); + allocateBitmaps(); + + SetSize( wxSize( aWidth, aHeight ) ); +} + + +bool CAIRO_GAL::Show( bool aShow ) +{ + bool s = wxWindow::Show( aShow ); + + if( aShow ) + wxWindow::Raise(); + + return s; +} + + +void CAIRO_GAL::Flush() +{ + storePath(); +} + + +void CAIRO_GAL::ClearScreen() +{ + cairo_set_source_rgb( currentContext, + backgroundColor.r, backgroundColor.g, backgroundColor.b ); + cairo_rectangle( currentContext, 0.0, 0.0, screenSize.x, screenSize.y ); + cairo_fill( currentContext ); } @@ -528,15 +393,6 @@ void CAIRO_GAL::SetLineWidth( double aLineWidth ) } -void CAIRO_GAL::ClearScreen() -{ - cairo_set_source_rgb( currentContext, - backgroundColor.r, backgroundColor.g, backgroundColor.b ); - cairo_rectangle( currentContext, 0.0, 0.0, screenSize.x, screenSize.y ); - cairo_fill( currentContext ); -} - - void CAIRO_GAL::SetLayerDepth( double aLayerDepth ) { super::SetLayerDepth( aLayerDepth ); @@ -686,35 +542,6 @@ void CAIRO_GAL::EndGroup() } -void CAIRO_GAL::ClearCache() -{ - for( int i = groups.size() - 1; i >= 0; --i ) - { - DeleteGroup( i ); - } -} - - -void CAIRO_GAL::DeleteGroup( int aGroupNumber ) -{ - storePath(); - - // Delete the Cairo paths - std::deque::iterator it, end; - - for( it = groups[aGroupNumber].begin(), end = groups[aGroupNumber].end(); it != end; ++it ) - { - if( it->command == CMD_FILL_PATH || it->command == CMD_STROKE_PATH ) - { - cairo_path_destroy( it->cairoPath ); - } - } - - // Delete the group - groups.erase( aGroupNumber ); -} - - void CAIRO_GAL::DrawGroup( int aGroupNumber ) { // This method implements a small Virtual Machine - all stored commands @@ -828,103 +655,91 @@ void CAIRO_GAL::ChangeGroupDepth( int aGroupNumber, int aDepth ) } -void CAIRO_GAL::Flush() +void CAIRO_GAL::DeleteGroup( int aGroupNumber ) { storePath(); -} + // Delete the Cairo paths + std::deque::iterator it, end; -void CAIRO_GAL::ComputeWorldScreenMatrix() -{ - ComputeWorldScale(); - - worldScreenMatrix.SetIdentity(); - - MATRIX3x3D translation; - translation.SetIdentity(); - translation.SetTranslation( 0.5 * screenSize ); - - MATRIX3x3D scale; - scale.SetIdentity(); - scale.SetScale( VECTOR2D( worldScale, worldScale ) ); - - MATRIX3x3D lookat; - lookat.SetIdentity(); - lookat.SetTranslation( -lookAtPoint ); - - worldScreenMatrix = translation * scale * lookat * worldScreenMatrix; -} - - -void CAIRO_GAL::storePath() -{ - if( isElementAdded ) + for( it = groups[aGroupNumber].begin(), end = groups[aGroupNumber].end(); it != end; ++it ) { - isElementAdded = false; - - if( !isGrouping ) + if( it->command == CMD_FILL_PATH || it->command == CMD_STROKE_PATH ) { - if( isFillEnabled ) - { - cairo_set_source_rgb( currentContext, fillColor.r, fillColor.g, fillColor.b ); - cairo_fill_preserve( currentContext ); - } - - if( isStrokeEnabled ) - { - cairo_set_source_rgb( currentContext, strokeColor.r, strokeColor.g, strokeColor.b ); - cairo_stroke_preserve( currentContext ); - } + cairo_path_destroy( it->cairoPath ); } - else - { - // Copy the actual path, append it to the global path list - // then check, if the path needs to be stroked/filled and - // add this command to the group list; - if( isStrokeEnabled ) - { - GroupElement groupElement; - groupElement.cairoPath = cairo_copy_path( currentContext ); - groupElement.command = CMD_STROKE_PATH; - currentGroup->push_back( groupElement ); - } + } - if( isFillEnabled ) - { - GroupElement groupElement; - groupElement.cairoPath = cairo_copy_path( currentContext ); - groupElement.command = CMD_FILL_PATH; - currentGroup->push_back( groupElement ); - } - } + // Delete the group + groups.erase( aGroupNumber ); +} - cairo_new_path( currentContext ); + +void CAIRO_GAL::ClearCache() +{ + for( int i = groups.size() - 1; i >= 0; --i ) + { + DeleteGroup( i ); } } -// --------------- -// Cursor handling -// --------------- - - -void CAIRO_GAL::initCursor( int aCursorSize ) +void CAIRO_GAL::SaveScreen() { - cursorPixels = new wxBitmap( aCursorSize, aCursorSize ); - cursorPixelsSaved = new wxBitmap( aCursorSize, aCursorSize ); - cursorSize = aCursorSize; + // Copy the current bitmap to the backup buffer + int offset = 0; - wxMemoryDC cursorShape( *cursorPixels ); + for( int j = 0; j < screenSize.y; j++ ) + { + for( int i = 0; i < stride; i++ ) + { + bitmapBufferBackup[offset + i] = bitmapBuffer[offset + i]; + offset += stride; + } + } +} - cursorShape.SetBackground( *wxTRANSPARENT_BRUSH ); - wxColour color( cursorColor.r * cursorColor.a * 255, cursorColor.g * cursorColor.a * 255, - cursorColor.b * cursorColor.a * 255, 255 ); - wxPen pen = wxPen( color ); - cursorShape.SetPen( pen ); - cursorShape.Clear(); - cursorShape.DrawLine( 0, aCursorSize / 2, aCursorSize, aCursorSize / 2 ); - cursorShape.DrawLine( aCursorSize / 2, 0, aCursorSize / 2, aCursorSize ); +void CAIRO_GAL::RestoreScreen() +{ + int offset = 0; + + for( int j = 0; j < screenSize.y; j++ ) + { + for( int i = 0; i < stride; i++ ) + { + bitmapBuffer[offset + i] = bitmapBufferBackup[offset + i]; + offset += stride; + } + } +} + + +void CAIRO_GAL::SetTarget( RenderTarget aTarget ) +{ + // If the compositor is not set, that means that there is a recaching process going on + // and we do not need the compositor now + if( !compositor ) + return; + + // Cairo grouping prevents display of overlapping items on the same layer in the lighter color + cairo_pop_group_to_source( currentContext ); + cairo_paint_with_alpha( currentContext, fillColor.a ); + + switch( aTarget ) + { + default: + case TARGET_CACHED: + case TARGET_NONCACHED: + compositor->SetBuffer( mainBuffer ); + break; + + case TARGET_OVERLAY: + compositor->SetBuffer( overlayBuffer ); + break; + } + + cairo_push_group( currentContext ); } @@ -975,7 +790,7 @@ void CAIRO_GAL::DrawCursor( VECTOR2D aCursorPosition ) } -void CAIRO_GAL::DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) +void CAIRO_GAL::drawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { cairo_move_to( currentContext, aStartPoint.x, aStartPoint.y ); cairo_line_to( currentContext, aEndPoint.x, aEndPoint.y ); @@ -984,14 +799,96 @@ void CAIRO_GAL::DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndP } +void CAIRO_GAL::storePath() +{ + if( isElementAdded ) + { + isElementAdded = false; + + if( !isGrouping ) + { + if( isFillEnabled ) + { + cairo_set_source_rgb( currentContext, fillColor.r, fillColor.g, fillColor.b ); + cairo_fill_preserve( currentContext ); + } + + if( isStrokeEnabled ) + { + cairo_set_source_rgb( currentContext, strokeColor.r, strokeColor.g, + strokeColor.b ); + cairo_stroke_preserve( currentContext ); + } + } + else + { + // Copy the actual path, append it to the global path list + // then check, if the path needs to be stroked/filled and + // add this command to the group list; + if( isStrokeEnabled ) + { + GroupElement groupElement; + groupElement.cairoPath = cairo_copy_path( currentContext ); + groupElement.command = CMD_STROKE_PATH; + currentGroup->push_back( groupElement ); + } + + if( isFillEnabled ) + { + GroupElement groupElement; + groupElement.cairoPath = cairo_copy_path( currentContext ); + groupElement.command = CMD_FILL_PATH; + currentGroup->push_back( groupElement ); + } + } + + cairo_new_path( currentContext ); + } +} + + +void CAIRO_GAL::onPaint( wxPaintEvent& aEvent ) +{ + PostPaint(); +} + + +void CAIRO_GAL::skipMouseEvent( wxMouseEvent& aEvent ) +{ + // Post the mouse event to the event listener registered in constructor, if any + if( mouseListener ) + wxPostEvent( mouseListener, aEvent ); +} + + +void CAIRO_GAL::initCursor( int aCursorSize ) +{ + cursorPixels = new wxBitmap( aCursorSize, aCursorSize ); + cursorPixelsSaved = new wxBitmap( aCursorSize, aCursorSize ); + cursorSize = aCursorSize; + + wxMemoryDC cursorShape( *cursorPixels ); + + cursorShape.SetBackground( *wxTRANSPARENT_BRUSH ); + wxColour color( cursorColor.r * cursorColor.a * 255, cursorColor.g * cursorColor.a * 255, + cursorColor.b * cursorColor.a * 255, 255 ); + wxPen pen = wxPen( color ); + cursorShape.SetPen( pen ); + cursorShape.Clear(); + + cursorShape.DrawLine( 0, aCursorSize / 2, aCursorSize, aCursorSize / 2 ); + cursorShape.DrawLine( aCursorSize / 2, 0, aCursorSize / 2, aCursorSize ); +} + + void CAIRO_GAL::allocateBitmaps() { // Create buffer, use the system independent Cairo context backend stride = cairo_format_stride_for_width( GAL_FORMAT, screenSize.x ); bufferSize = stride * screenSize.y; - bitmapBuffer = new unsigned int[bufferSize]; - bitmapBufferBackup = new unsigned int[bufferSize]; + bitmapBuffer = new unsigned int[bufferSize]; + bitmapBufferBackup = new unsigned int[bufferSize]; wxOutput = new unsigned char[bufferSize * 3]; } @@ -1004,12 +901,83 @@ void CAIRO_GAL::deleteBitmaps() } -bool CAIRO_GAL::Show( bool aShow ) +void CAIRO_GAL::initSurface() { - bool s = wxWindow::Show( aShow ); + wxASSERT( !isInitialized ); - if( aShow ) - wxWindow::Raise(); + // Create the Cairo surface + surface = cairo_image_surface_create_for_data( (unsigned char*) bitmapBuffer, GAL_FORMAT, + screenSize.x, screenSize.y, stride ); + context = cairo_create( surface ); +#ifdef __WXDEBUG__ + cairo_status_t status = cairo_status( context ); + wxASSERT_MSG( status == CAIRO_STATUS_SUCCESS, "Cairo context creation error" ); +#endif /* __WXDEBUG__ */ + currentContext = context; - return s; + cairo_set_antialias( context, CAIRO_ANTIALIAS_SUBPIXEL ); + + // Clear the screen + ClearScreen(); + + // Compute the world <-> screen transformations + ComputeWorldScreenMatrix(); + + cairo_matrix_init( &cairoWorldScreenMatrix, worldScreenMatrix.m_data[0][0], + worldScreenMatrix.m_data[1][0], worldScreenMatrix.m_data[0][1], + worldScreenMatrix.m_data[1][1], worldScreenMatrix.m_data[0][2], + worldScreenMatrix.m_data[1][2] ); + + cairo_set_matrix( context, &cairoWorldScreenMatrix ); + + // Start drawing with a new path + cairo_new_path( context ); + isElementAdded = true; + + cairo_set_line_join( context, CAIRO_LINE_JOIN_ROUND ); + cairo_set_line_cap( context, CAIRO_LINE_CAP_ROUND ); + + lineWidth = 0; + + isDeleteSavedPixels = true; + isInitialized = true; +} + + +void CAIRO_GAL::deinitSurface() +{ + if( !isInitialized ) + return; + + // Destroy Cairo objects + cairo_destroy( context ); + cairo_surface_destroy( surface ); + + isInitialized = false; +} + + +void CAIRO_GAL::setCompositor() +{ + // Recreate the compositor with the new Cairo context + compositor.reset( new CAIRO_COMPOSITOR( ¤tContext ) ); + compositor->Resize( screenSize.x, screenSize.y ); + + // Prepare buffers + mainBuffer = compositor->GetBuffer(); + overlayBuffer = compositor->GetBuffer(); +} + + +unsigned int CAIRO_GAL::getNewGroupNumber() +{ + wxASSERT_MSG( groups.size() < std::numeric_limits::max(), + wxT( "There are no free slots to store a group" ) ); + + while( groups.find( groupCounter ) != groups.end() ) + { + groupCounter++; + } + + return groupCounter++; } diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index a3bd5cff0f..2f718647ae 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -63,6 +63,33 @@ GAL::~GAL() } +void GAL::ComputeWorldScreenMatrix() +{ + ComputeWorldScale(); + + worldScreenMatrix.SetIdentity(); + + MATRIX3x3D translation; + translation.SetIdentity(); + translation.SetTranslation( 0.5 * screenSize ); + + MATRIX3x3D scale; + scale.SetIdentity(); + scale.SetScale( VECTOR2D( worldScale, worldScale ) ); + + MATRIX3x3D flip; + flip.SetIdentity(); + flip.SetScale( VECTOR2D( 1.0, 1.0 ) ); + + MATRIX3x3D lookat; + lookat.SetIdentity(); + lookat.SetTranslation( -lookAtPoint ); + + worldScreenMatrix = translation * flip * scale * lookat * worldScreenMatrix; +} + + + void GAL::DrawGrid() { if( !gridVisibility ) @@ -136,7 +163,7 @@ void GAL::DrawGrid() if( ( j % gridTick == 0 && gridScreenSizeCoarse > gridDrawThreshold ) || gridScreenSizeDense > gridDrawThreshold ) { - DrawGridLine( VECTOR2D( gridStartX * gridSize.x, j * gridSize.y ), + drawGridLine( VECTOR2D( gridStartX * gridSize.x, j * gridSize.y ), VECTOR2D( gridEndX * gridSize.x, j * gridSize.y ) ); } } @@ -155,7 +182,7 @@ void GAL::DrawGrid() if( ( i % gridTick == 0 && gridScreenSizeCoarse > gridDrawThreshold ) || gridScreenSizeDense > gridDrawThreshold ) { - DrawGridLine( VECTOR2D( i * gridSize.x, gridStartY * gridSize.y ), + drawGridLine( VECTOR2D( i * gridSize.x, gridStartY * gridSize.y ), VECTOR2D( i * gridSize.x, gridEndY * gridSize.y ) ); } } diff --git a/common/gal/opengl/gpu_manager.cpp b/common/gal/opengl/gpu_manager.cpp index 255d6b0a26..d5d263a930 100644 --- a/common/gal/opengl/gpu_manager.cpp +++ b/common/gal/opengl/gpu_manager.cpp @@ -52,7 +52,7 @@ GPU_MANAGER* GPU_MANAGER::MakeManager( VERTEX_CONTAINER* aContainer ) GPU_MANAGER::GPU_MANAGER( VERTEX_CONTAINER* aContainer ) : - m_isDrawing( false ), m_container( aContainer ), m_shader( NULL ) + m_isDrawing( false ), m_container( aContainer ), m_shader( NULL ) { } diff --git a/common/gal/opengl/opengl_compositor.cpp b/common/gal/opengl/opengl_compositor.cpp index 2ff733e978..91b757cb98 100644 --- a/common/gal/opengl/opengl_compositor.cpp +++ b/common/gal/opengl/opengl_compositor.cpp @@ -104,7 +104,7 @@ unsigned int OPENGL_COMPOSITOR::GetBuffer() wxASSERT( m_initialized ); if( m_buffers.size() >= m_maxBuffers ) - return 0; // Unfortunately we have no more free buffers left + return 0; // Unfortunately we have no more free buffers left // GL_COLOR_ATTACHMENTn are consecutive integers GLuint attachmentPoint = GL_COLOR_ATTACHMENT0 + usedBuffers(); @@ -229,9 +229,11 @@ void OPENGL_COMPOSITOR::clean() { glDeleteTextures( 1, &it->textureTarget ); } + m_buffers.clear(); m_initialized = false; } + GLuint OPENGL_COMPOSITOR::m_currentFbo = 0; diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 9acb2d7f65..3a94d33e50 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -36,7 +36,6 @@ #endif /* __WXDEBUG__ */ #include -#include #ifndef CALLBACK #define CALLBACK @@ -94,9 +93,6 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, tesselator = gluNewTess(); InitTesselatorCallbacks( tesselator ); gluTessProperty( tesselator, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_POSITIVE ); - - // Compute the unit circle vertices and store them in a buffer for faster drawing - computeCircle(); } @@ -111,109 +107,6 @@ OPENGL_GAL::~OPENGL_GAL() } -void OPENGL_GAL::onPaint( wxPaintEvent& aEvent ) -{ - PostPaint(); -} - - -void OPENGL_GAL::ResizeScreen( int aWidth, int aHeight ) -{ - screenSize = VECTOR2D( aWidth, aHeight ); - - // Resize framebuffers - compositor.Resize( aWidth, aHeight ); - isFramebufferInitialized = false; - - wxGLCanvas::SetSize( aWidth, aHeight ); -} - - -void OPENGL_GAL::skipMouseEvent( wxMouseEvent& aEvent ) -{ - // Post the mouse event to the event listener registered in constructor, if any - if( mouseListener ) - wxPostEvent( mouseListener, aEvent ); -} - - -void OPENGL_GAL::SaveScreen() -{ - wxASSERT_MSG( false, wxT( "Not implemented yet" ) ); -} - - -void OPENGL_GAL::RestoreScreen() -{ - wxASSERT_MSG( false, wxT( "Not implemented yet" ) ); -} - - -void OPENGL_GAL::SetTarget( RenderTarget aTarget ) -{ - switch( aTarget ) - { - default: - case TARGET_CACHED: - currentManager = &cachedManager; - break; - - case TARGET_NONCACHED: - currentManager = &nonCachedManager; - break; - - case TARGET_OVERLAY: - currentManager = &overlayManager; - break; - } -} - - -void OPENGL_GAL::initGlew() -{ - // Initialize GLEW library - GLenum err = glewInit(); - - if( GLEW_OK != err ) - { - wxLogError( wxString::FromUTF8( (char*) glewGetErrorString( err ) ) ); - exit( 1 ); - } - else - { - wxLogDebug( wxString( wxT( "Status: Using GLEW " ) ) + - FROM_UTF8( (char*) glewGetString( GLEW_VERSION ) ) ); - } - - // Check the OpenGL version (minimum 2.1 is required) - if( GLEW_VERSION_2_1 ) - { - wxLogInfo( wxT( "OpenGL Version 2.1 supported." ) ); - } - else - { - wxLogError( wxT( "OpenGL Version 2.1 is not supported!" ) ); - exit( 1 ); - } - - // Framebuffers have to be supported - if( !GLEW_ARB_framebuffer_object ) - { - wxLogError( wxT( "Framebuffer objects are not supported!" ) ); - exit( 1 ); - } - - // Vertex buffer have to be supported - if( !GLEW_ARB_vertex_buffer_object ) - { - wxLogError( wxT( "Vertex buffer objects are not supported!" ) ); - exit( 1 ); - } - - isGlewInitialized = true; -} - - void OPENGL_GAL::BeginDrawing() { SetCurrent( *glContext ); @@ -232,7 +125,8 @@ void OPENGL_GAL::BeginDrawing() glViewport( 0, 0, (GLsizei) screenSize.x, (GLsizei) screenSize.y ); // Create the screen transformation - glOrtho( 0, (GLint) screenSize.x, 0, (GLsizei) screenSize.y, -depthRange.x, -depthRange.y ); + glOrtho( 0, (GLint) screenSize.x, 0, (GLsizei) screenSize.y, + -depthRange.x, -depthRange.y ); // Prepare rendering target buffers compositor.Initialize(); @@ -301,7 +195,7 @@ void OPENGL_GAL::BeginDrawing() compositor.ClearBuffer(); compositor.SetBuffer( overlayBuffer ); compositor.ClearBuffer(); - compositor.SetBuffer( 0 ); // Unbind buffers + compositor.SetBuffer( 0 ); // Unbind buffers nonCachedManager.Clear(); overlayManager.Clear(); @@ -333,37 +227,16 @@ void OPENGL_GAL::EndDrawing() } -inline void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) +void OPENGL_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { - VECTOR2D startEndVector = aEndPoint - aStartPoint; - double lineLength = startEndVector.EuclideanNorm(); - double scale = 0.5 * lineWidth / lineLength; + const VECTOR2D startEndVector = aEndPoint - aStartPoint; + double lineAngle = startEndVector.Angle(); - if( lineLength <= 0.0 ) - return; + drawLineQuad( aStartPoint, aEndPoint ); - // The perpendicular vector also needs transformations - glm::vec4 vector = currentManager->GetTransformation() * - glm::vec4( -startEndVector.y * scale, startEndVector.x * scale, 0.0, 0.0 ); - - // Line width is maintained by the vertex shader - currentManager->Shader( SHADER_LINE, vector.x, vector.y, lineWidth ); - currentManager->Vertex( aStartPoint.x, aStartPoint.y, layerDepth ); // v0 - - currentManager->Shader( SHADER_LINE, -vector.x, -vector.y, lineWidth ); - currentManager->Vertex( aStartPoint.x, aStartPoint.y, layerDepth ); // v1 - - currentManager->Shader( SHADER_LINE, -vector.x, -vector.y, lineWidth ); - currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth ); // v3 - - currentManager->Shader( SHADER_LINE, vector.x, vector.y, lineWidth ); - currentManager->Vertex( aStartPoint.x, aStartPoint.y, layerDepth ); // v0 - - currentManager->Shader( SHADER_LINE, -vector.x, -vector.y, lineWidth ); - currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth ); // v3 - - currentManager->Shader( SHADER_LINE, vector.x, vector.y, lineWidth ); - currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth ); // v2 + // Line caps + drawFilledSemiCircle( aStartPoint, lineWidth / 2, lineAngle + M_PI / 2 ); + drawFilledSemiCircle( aEndPoint, lineWidth / 2, lineAngle - M_PI / 2 ); } @@ -414,93 +287,6 @@ void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndP } -unsigned int OPENGL_GAL::getNewGroupNumber() -{ - wxASSERT_MSG( groups.size() < std::numeric_limits::max(), - wxT( "There are no free slots to store a group" ) ); - - while( groups.find( groupCounter ) != groups.end() ) - { - groupCounter++; - } - - return groupCounter++; -} - - -void OPENGL_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) -{ - const VECTOR2D startEndVector = aEndPoint - aStartPoint; - double lineAngle = startEndVector.Angle(); - - drawLineQuad( aStartPoint, aEndPoint ); - - // Line caps - drawFilledSemiCircle( aStartPoint, lineWidth / 2, lineAngle + M_PI / 2 ); - drawFilledSemiCircle( aEndPoint, lineWidth / 2, lineAngle - M_PI / 2 ); -} - - -void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) -{ - std::deque::const_iterator it = aPointList.begin(); - - // Start from the second point - for( it++; it != aPointList.end(); it++ ) - { - const VECTOR2D startEndVector = ( *it - *( it - 1 ) ); - double lineAngle = startEndVector.Angle(); - - drawLineQuad( *( it - 1 ), *it ); - - // There is no need to draw line caps on both ends of polyline's segments - drawFilledSemiCircle( *( it - 1 ), lineWidth / 2, lineAngle + M_PI / 2 ); - } - - // ..and now - draw the ending cap - const VECTOR2D startEndVector = ( *( it - 1 ) - *( it - 2 ) ); - double lineAngle = startEndVector.Angle(); - drawFilledSemiCircle( *( it - 1 ), lineWidth / 2, lineAngle - M_PI / 2 ); -} - - -void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) -{ - // Compute the diagonal points of the rectangle - VECTOR2D diagonalPointA( aEndPoint.x, aStartPoint.y ); - VECTOR2D diagonalPointB( aStartPoint.x, aEndPoint.y ); - - // Stroke the outline - if( isStrokeEnabled ) - { - currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); - - std::deque pointList; - pointList.push_back( aStartPoint ); - pointList.push_back( diagonalPointA ); - pointList.push_back( aEndPoint ); - pointList.push_back( diagonalPointB ); - pointList.push_back( aStartPoint ); - DrawPolyline( pointList ); - } - - // Fill the rectangle - if( isFillEnabled ) - { - currentManager->Shader( SHADER_NONE ); - currentManager->Color( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - - currentManager->Vertex( aStartPoint.x, aStartPoint.y, layerDepth ); - currentManager->Vertex( diagonalPointA.x, diagonalPointA.y, layerDepth ); - currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth ); - - currentManager->Vertex( aStartPoint.x, aStartPoint.y, layerDepth ); - currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth ); - currentManager->Vertex( diagonalPointB.x, diagonalPointB.y, layerDepth ); - } -} - - void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) { if( isFillEnabled ) @@ -508,21 +294,21 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) currentManager->Color( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); /* Draw a triangle that contains the circle, then shade it leaving only the circle. - Parameters given to setShader are indices of the triangle's vertices - (if you want to understand more, check the vertex shader source [shader.vert]). - Shader uses this coordinates to determine if fragments are inside the circle or not. - v2 - /\ - //\\ - v0 /_\/_\ v1 - */ + * Parameters given to setShader are indices of the triangle's vertices + * (if you want to understand more, check the vertex shader source [shader.vert]). + * Shader uses this coordinates to determine if fragments are inside the circle or not. + * v2 + * /\ + * //\\ + * v0 /_\/_\ v1 + */ currentManager->Shader( SHADER_FILLED_CIRCLE, 1.0 ); currentManager->Vertex( aCenterPoint.x - aRadius * sqrt( 3.0f ), // v0 - aCenterPoint.y - aRadius, layerDepth ); + aCenterPoint.y - aRadius, layerDepth ); currentManager->Shader( SHADER_FILLED_CIRCLE, 2.0 ); - currentManager->Vertex( aCenterPoint.x + aRadius* sqrt( 3.0f ), // v1 - aCenterPoint.y - aRadius, layerDepth ); + currentManager->Vertex( aCenterPoint.x + aRadius * sqrt( 3.0f ), // v1 + aCenterPoint.y - aRadius, layerDepth ); currentManager->Shader( SHADER_FILLED_CIRCLE, 3.0 ); currentManager->Vertex( aCenterPoint.x, aCenterPoint.y + aRadius * 2.0f, // v2 @@ -534,23 +320,23 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); /* Draw a triangle that contains the circle, then shade it leaving only the circle. - Parameters given to setShader are indices of the triangle's vertices - (if you want to understand more, check the vertex shader source [shader.vert]). - and the line width. Shader uses this coordinates to determine if fragments are - inside the circle or not. - v2 - /\ - //\\ - v0 /_\/_\ v1 - */ + * Parameters given to setShader are indices of the triangle's vertices + * (if you want to understand more, check the vertex shader source [shader.vert]). + * and the line width. Shader uses this coordinates to determine if fragments are + * inside the circle or not. + * v2 + * /\ + * //\\ + * v0 /_\/_\ v1 + */ double outerRadius = aRadius + ( lineWidth / 2 ); currentManager->Shader( SHADER_STROKED_CIRCLE, 1.0, aRadius, lineWidth ); currentManager->Vertex( aCenterPoint.x - outerRadius * sqrt( 3.0f ), // v0 - aCenterPoint.y - outerRadius, layerDepth ); + aCenterPoint.y - outerRadius, layerDepth ); currentManager->Shader( SHADER_STROKED_CIRCLE, 2.0, aRadius, lineWidth ); currentManager->Vertex( aCenterPoint.x + outerRadius * sqrt( 3.0f ), // v1 - aCenterPoint.y - outerRadius, layerDepth ); + aCenterPoint.y - outerRadius, layerDepth ); currentManager->Shader( SHADER_STROKED_CIRCLE, 3.0, aRadius, lineWidth ); currentManager->Vertex( aCenterPoint.x, aCenterPoint.y + outerRadius * 2.0f, // v2 @@ -559,84 +345,6 @@ void OPENGL_GAL::DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) } -void OPENGL_GAL::drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ) -{ - if( isFillEnabled ) - { - currentManager->Color( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - drawFilledSemiCircle( aCenterPoint, aRadius, aAngle ); - } - - if( isStrokeEnabled ) - { - currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); - drawStrokedSemiCircle( aCenterPoint, aRadius, aAngle ); - } -} - - -void OPENGL_GAL::drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, - double aAngle ) -{ - Save(); - currentManager->Translate( aCenterPoint.x, aCenterPoint.y, 0.0f ); - currentManager->Rotate( aAngle, 0.0f, 0.0f, 1.0f ); - - /* Draw a triangle that contains the semicircle, then shade it to leave only - * the semicircle. Parameters given to setShader are indices of the triangle's vertices - (if you want to understand more, check the vertex shader source [shader.vert]). - Shader uses this coordinates to determine if fragments are inside the semicircle or not. - v2 - /\ - /__\ - v0 //__\\ v1 - */ - currentManager->Shader( SHADER_FILLED_CIRCLE, 4.0f ); - currentManager->Vertex( -aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 - - currentManager->Shader( SHADER_FILLED_CIRCLE, 5.0f ); - currentManager->Vertex( aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 - - currentManager->Shader( SHADER_FILLED_CIRCLE, 6.0f ); - currentManager->Vertex( 0.0f, aRadius * 2.0f, layerDepth ); // v2 - - Restore(); -} - - -void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, - double aAngle ) -{ - double outerRadius = aRadius + ( lineWidth / 2 ); - - Save(); - currentManager->Translate( aCenterPoint.x, aCenterPoint.y, 0.0f ); - currentManager->Rotate( aAngle, 0.0f, 0.0f, 1.0f ); - - /* Draw a triangle that contains the semicircle, then shade it to leave only - * the semicircle. Parameters given to setShader are indices of the triangle's vertices - (if you want to understand more, check the vertex shader source [shader.vert]), the - radius and the line width. Shader uses this coordinates to determine if fragments are - inside the semicircle or not. - v2 - /\ - /__\ - v0 //__\\ v1 - */ - currentManager->Shader( SHADER_STROKED_CIRCLE, 4.0f, aRadius, lineWidth ); - currentManager->Vertex( -outerRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 - - currentManager->Shader( SHADER_STROKED_CIRCLE, 5.0f, aRadius, lineWidth ); - currentManager->Vertex( outerRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 - - currentManager->Shader( SHADER_STROKED_CIRCLE, 6.0f, aRadius, lineWidth ); - currentManager->Vertex( 0.0f, outerRadius * 2.0f, layerDepth ); // v2 - - Restore(); -} - - -// FIXME Optimize void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double aStartAngle, double aEndAngle ) { @@ -700,33 +408,64 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a } -struct OGLPOINT +void OPENGL_GAL::DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { - OGLPOINT() : - x( 0.0 ), y( 0.0 ), z( 0.0 ) - {} + // Compute the diagonal points of the rectangle + VECTOR2D diagonalPointA( aEndPoint.x, aStartPoint.y ); + VECTOR2D diagonalPointB( aStartPoint.x, aEndPoint.y ); - OGLPOINT( const char* fastest ) + // Stroke the outline + if( isStrokeEnabled ) { - // do nothing for fastest speed, and keep inline + currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + + std::deque pointList; + pointList.push_back( aStartPoint ); + pointList.push_back( diagonalPointA ); + pointList.push_back( aEndPoint ); + pointList.push_back( diagonalPointB ); + pointList.push_back( aStartPoint ); + DrawPolyline( pointList ); } - OGLPOINT( const VECTOR2D& aPoint ) : - x( aPoint.x ), y( aPoint.y ), z( 0.0 ) - {} - - OGLPOINT& operator=( const VECTOR2D& aPoint ) + // Fill the rectangle + if( isFillEnabled ) { - x = aPoint.x; - y = aPoint.y; - z = 0.0; - return *this; + currentManager->Shader( SHADER_NONE ); + currentManager->Color( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + + currentManager->Vertex( aStartPoint.x, aStartPoint.y, layerDepth ); + currentManager->Vertex( diagonalPointA.x, diagonalPointA.y, layerDepth ); + currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth ); + + currentManager->Vertex( aStartPoint.x, aStartPoint.y, layerDepth ); + currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth ); + currentManager->Vertex( diagonalPointB.x, diagonalPointB.y, layerDepth ); + } +} + + +void OPENGL_GAL::DrawPolyline( std::deque& aPointList ) +{ + std::deque::const_iterator it = aPointList.begin(); + + // Start from the second point + for( it++; it != aPointList.end(); it++ ) + { + const VECTOR2D startEndVector = ( *it - *( it - 1 ) ); + double lineAngle = startEndVector.Angle(); + + drawLineQuad( *( it - 1 ), *it ); + + // There is no need to draw line caps on both ends of polyline's segments + drawFilledSemiCircle( *( it - 1 ), lineWidth / 2, lineAngle + M_PI / 2 ); } - GLdouble x; - GLdouble y; - GLdouble z; -}; + // ..and now - draw the ending cap + const VECTOR2D startEndVector = ( *( it - 1 ) - *( it - 2 ) ); + double lineAngle = startEndVector.Angle(); + drawFilledSemiCircle( *( it - 1 ), lineWidth / 2, lineAngle - M_PI / 2 ); +} void OPENGL_GAL::DrawPolygon( const std::deque& aPointList ) @@ -808,34 +547,32 @@ void OPENGL_GAL::DrawCurve( const VECTOR2D& aStartPoint, const VECTOR2D& aContro } -void OPENGL_GAL::SetStrokeColor( const COLOR4D& aColor ) +void OPENGL_GAL::ResizeScreen( int aWidth, int aHeight ) { - isSetAttributes = true; - strokeColor = aColor; + screenSize = VECTOR2D( aWidth, aHeight ); - // This is the default drawing color - currentManager->Color( aColor.r, aColor.g, aColor.b, aColor.a ); + // Resize framebuffers + compositor.Resize( aWidth, aHeight ); + isFramebufferInitialized = false; + + wxGLCanvas::SetSize( aWidth, aHeight ); } -void OPENGL_GAL::SetFillColor( const COLOR4D& aColor ) +bool OPENGL_GAL::Show( bool aShow ) { - isSetAttributes = true; - fillColor = aColor; + bool s = wxGLCanvas::Show( aShow ); + + if( aShow ) + wxGLCanvas::Raise(); + + return s; } -void OPENGL_GAL::SetBackgroundColor( const COLOR4D& aColor ) +void OPENGL_GAL::Flush() { - isSetAttributes = true; - backgroundColor = aColor; -} - - -void OPENGL_GAL::SetLineWidth( double aLineWidth ) -{ - isSetAttributes = true; - lineWidth = aLineWidth; + glFlush(); } @@ -847,6 +584,15 @@ void OPENGL_GAL::ClearScreen() } +void OPENGL_GAL::SetStrokeColor( const COLOR4D& aColor ) +{ + strokeColor = aColor; + + // This is the default drawing color + currentManager->Color( aColor.r, aColor.g, aColor.b, aColor.a ); +} + + void OPENGL_GAL::Transform( MATRIX3x3D aTransformation ) { GLdouble matrixData[16] = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 }; @@ -883,12 +629,6 @@ void OPENGL_GAL::Scale( const VECTOR2D& aScale ) } -void OPENGL_GAL::Flush() -{ - glFlush(); -} - - void OPENGL_GAL::Save() { currentManager->PushMatrix(); @@ -919,19 +659,6 @@ void OPENGL_GAL::EndGroup() } -void OPENGL_GAL::ClearCache() -{ - groups.clear(); - cachedManager.Clear(); -} - - -void OPENGL_GAL::DeleteGroup( int aGroupNumber ) -{ - groups.erase( aGroupNumber ); -} - - void OPENGL_GAL::DrawGroup( int aGroupNumber ) { cachedManager.DrawItem( *groups[aGroupNumber] ); @@ -950,126 +677,51 @@ void OPENGL_GAL::ChangeGroupDepth( int aGroupNumber, int aDepth ) } -void OPENGL_GAL::computeCircle() +void OPENGL_GAL::DeleteGroup( int aGroupNumber ) { - VERTEX* vertex = circleContainer.Allocate( CIRCLE_POINTS ); + groups.erase( aGroupNumber ); +} - // Compute the circle points for a given number of segments - for( int i = 0; i < CIRCLE_POINTS; ++i ) + +void OPENGL_GAL::ClearCache() +{ + groups.clear(); + cachedManager.Clear(); +} + + +void OPENGL_GAL::SaveScreen() +{ + wxASSERT_MSG( false, wxT( "Not implemented yet" ) ); +} + + +void OPENGL_GAL::RestoreScreen() +{ + wxASSERT_MSG( false, wxT( "Not implemented yet" ) ); +} + + +void OPENGL_GAL::SetTarget( RenderTarget aTarget ) +{ + switch( aTarget ) { - vertex->x = 0.0f; - vertex->y = 0.0f; - vertex->z = 0.0f; - vertex++; + default: + case TARGET_CACHED: + currentManager = &cachedManager; + break; - vertex->x = cos( 2.0 * M_PI / CIRCLE_POINTS * i ); - vertex->y = sin( 2.0 * M_PI / CIRCLE_POINTS * i ); - vertex->z = 0.0f; - vertex++; + case TARGET_NONCACHED: + currentManager = &nonCachedManager; + break; - vertex->x = cos( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ); - vertex->y = sin( 2.0 * M_PI / CIRCLE_POINTS * ( i + 1 ) ); - vertex->z = 0.0f; - vertex++; + case TARGET_OVERLAY: + currentManager = &overlayManager; + break; } } -void OPENGL_GAL::ComputeWorldScreenMatrix() -{ - ComputeWorldScale(); - - worldScreenMatrix.SetIdentity(); - - MATRIX3x3D translation; - translation.SetIdentity(); - translation.SetTranslation( 0.5 * screenSize ); - - MATRIX3x3D scale; - scale.SetIdentity(); - scale.SetScale( VECTOR2D( worldScale, worldScale ) ); - - MATRIX3x3D flip; - flip.SetIdentity(); - flip.SetScale( VECTOR2D( 1.0, 1.0 ) ); - - MATRIX3x3D lookat; - lookat.SetIdentity(); - lookat.SetTranslation( -lookAtPoint ); - - worldScreenMatrix = translation * flip * scale * lookat * worldScreenMatrix; -} - - -// ------------------------------------- -// Callback functions for the tesselator -// ------------------------------------- - -// Compare Redbook Chapter 11 - - -void CALLBACK VertexCallback( GLvoid* aVertexPtr, void* aData ) -{ - GLdouble* vertex = static_cast( aVertexPtr ); - OPENGL_GAL::TessParams* param = static_cast( aData ); - VERTEX_MANAGER* vboManager = param->vboManager; - - if( vboManager ) - vboManager->Vertex( vertex[0], vertex[1], vertex[2] ); -} - - -void CALLBACK CombineCallback( GLdouble coords[3], - GLdouble* vertex_data[4], - GLfloat weight[4], GLdouble** dataOut, void* aData ) -{ - GLdouble* vertex = new GLdouble[3]; - OPENGL_GAL::TessParams* param = static_cast( aData ); - - // Save the pointer so we can delete it later - param->intersectPoints.push_back( vertex ); - - memcpy( vertex, coords, 3 * sizeof(GLdouble) ); - - *dataOut = vertex; -} - - -void CALLBACK EdgeCallback(void) -{ - // This callback is needed to force GLU tesselator to use triangles only -} - - -void CALLBACK ErrorCallback( GLenum aErrorCode ) -{ - const GLubyte* estring; - - estring = gluErrorString( aErrorCode ); - wxLogError( wxT( "Tessellation Error: %s" ), (char*) estring ); -} - - -void InitTesselatorCallbacks( GLUtesselator* aTesselator ) -{ - gluTessCallback( aTesselator, GLU_TESS_VERTEX_DATA, ( void (CALLBACK*)() )VertexCallback ); - gluTessCallback( aTesselator, GLU_TESS_COMBINE_DATA, ( void (CALLBACK*)() )CombineCallback ); - gluTessCallback( aTesselator, GLU_TESS_EDGE_FLAG, ( void (CALLBACK*)() )EdgeCallback ); - gluTessCallback( aTesselator, GLU_TESS_ERROR_DATA, ( void (CALLBACK*)() )ErrorCallback ); -} - - -// --------------- -// Cursor handling -// --------------- - - -void OPENGL_GAL::initCursor( int aCursorSize ) -{ - cursorSize = aCursorSize; -} - - VECTOR2D OPENGL_GAL::ComputeCursorToWorld( const VECTOR2D& aCursorPosition ) { VECTOR2D cursorPosition = aCursorPosition; @@ -1083,7 +735,7 @@ VECTOR2D OPENGL_GAL::ComputeCursorToWorld( const VECTOR2D& aCursorPosition ) void OPENGL_GAL::DrawCursor( VECTOR2D aCursorPosition ) { - wxLogWarning( wxT( "Not tested ") ); + wxLogWarning( wxT( "Not tested" ) ); SetCurrent( *glContext ); @@ -1096,8 +748,8 @@ void OPENGL_GAL::DrawCursor( VECTOR2D aCursorPosition ) aCursorPosition = worldScreenMatrix * cursorPositionWorld; // Switch to the main framebuffer and blit the scene - //glBindFramebuffer( GL_FRAMEBUFFER, 0 ); - //glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); + // glBindFramebuffer( GL_FRAMEBUFFER, 0 ); + // glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); glLoadIdentity(); @@ -1140,7 +792,7 @@ void OPENGL_GAL::DrawCursor( VECTOR2D aCursorPosition ) } -void OPENGL_GAL::DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) +void OPENGL_GAL::drawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { compositor.SetBuffer( mainBuffer ); @@ -1165,12 +817,247 @@ void OPENGL_GAL::DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEnd } -bool OPENGL_GAL::Show( bool aShow ) +inline void OPENGL_GAL::drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) { - bool s = wxGLCanvas::Show( aShow ); + VECTOR2D startEndVector = aEndPoint - aStartPoint; + double lineLength = startEndVector.EuclideanNorm(); + double scale = 0.5 * lineWidth / lineLength; - if( aShow ) - wxGLCanvas::Raise(); + if( lineLength <= 0.0 ) + return; - return s; + // The perpendicular vector also needs transformations + glm::vec4 vector = currentManager->GetTransformation() * + glm::vec4( -startEndVector.y * scale, startEndVector.x * scale, 0.0, 0.0 ); + + // Line width is maintained by the vertex shader + currentManager->Shader( SHADER_LINE, vector.x, vector.y, lineWidth ); + currentManager->Vertex( aStartPoint.x, aStartPoint.y, layerDepth ); // v0 + + currentManager->Shader( SHADER_LINE, -vector.x, -vector.y, lineWidth ); + currentManager->Vertex( aStartPoint.x, aStartPoint.y, layerDepth ); // v1 + + currentManager->Shader( SHADER_LINE, -vector.x, -vector.y, lineWidth ); + currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth ); // v3 + + currentManager->Shader( SHADER_LINE, vector.x, vector.y, lineWidth ); + currentManager->Vertex( aStartPoint.x, aStartPoint.y, layerDepth ); // v0 + + currentManager->Shader( SHADER_LINE, -vector.x, -vector.y, lineWidth ); + currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth ); // v3 + + currentManager->Shader( SHADER_LINE, vector.x, vector.y, lineWidth ); + currentManager->Vertex( aEndPoint.x, aEndPoint.y, layerDepth ); // v2 +} + + +void OPENGL_GAL::drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ) +{ + if( isFillEnabled ) + { + currentManager->Color( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); + drawFilledSemiCircle( aCenterPoint, aRadius, aAngle ); + } + + if( isStrokeEnabled ) + { + currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); + drawStrokedSemiCircle( aCenterPoint, aRadius, aAngle ); + } +} + + +void OPENGL_GAL::drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, + double aAngle ) +{ + Save(); + currentManager->Translate( aCenterPoint.x, aCenterPoint.y, 0.0f ); + currentManager->Rotate( aAngle, 0.0f, 0.0f, 1.0f ); + + /* Draw a triangle that contains the semicircle, then shade it to leave only + * the semicircle. Parameters given to setShader are indices of the triangle's vertices + * (if you want to understand more, check the vertex shader source [shader.vert]). + * Shader uses this coordinates to determine if fragments are inside the semicircle or not. + * v2 + * /\ + * /__\ + * v0 //__\\ v1 + */ + currentManager->Shader( SHADER_FILLED_CIRCLE, 4.0f ); + currentManager->Vertex( -aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 + + currentManager->Shader( SHADER_FILLED_CIRCLE, 5.0f ); + currentManager->Vertex( aRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 + + currentManager->Shader( SHADER_FILLED_CIRCLE, 6.0f ); + currentManager->Vertex( 0.0f, aRadius * 2.0f, layerDepth ); // v2 + + Restore(); +} + + +void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, + double aAngle ) +{ + double outerRadius = aRadius + ( lineWidth / 2 ); + + Save(); + currentManager->Translate( aCenterPoint.x, aCenterPoint.y, 0.0f ); + currentManager->Rotate( aAngle, 0.0f, 0.0f, 1.0f ); + + /* Draw a triangle that contains the semicircle, then shade it to leave only + * the semicircle. Parameters given to setShader are indices of the triangle's vertices + * (if you want to understand more, check the vertex shader source [shader.vert]), the + * radius and the line width. Shader uses this coordinates to determine if fragments are + * inside the semicircle or not. + * v2 + * /\ + * /__\ + * v0 //__\\ v1 + */ + currentManager->Shader( SHADER_STROKED_CIRCLE, 4.0f, aRadius, lineWidth ); + currentManager->Vertex( -outerRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v0 + + currentManager->Shader( SHADER_STROKED_CIRCLE, 5.0f, aRadius, lineWidth ); + currentManager->Vertex( outerRadius * 3.0f / sqrt( 3.0f ), 0.0f, layerDepth ); // v1 + + currentManager->Shader( SHADER_STROKED_CIRCLE, 6.0f, aRadius, lineWidth ); + currentManager->Vertex( 0.0f, outerRadius * 2.0f, layerDepth ); // v2 + + Restore(); +} + + +void OPENGL_GAL::onPaint( wxPaintEvent& aEvent ) +{ + PostPaint(); +} + + +void OPENGL_GAL::skipMouseEvent( wxMouseEvent& aEvent ) +{ + // Post the mouse event to the event listener registered in constructor, if any + if( mouseListener ) + wxPostEvent( mouseListener, aEvent ); +} + + +void OPENGL_GAL::initGlew() +{ + // Initialize GLEW library + GLenum err = glewInit(); + + if( GLEW_OK != err ) + { + wxLogError( wxString::FromUTF8( (char*) glewGetErrorString( err ) ) ); + exit( 1 ); + } + else + { + wxLogDebug( wxString( wxT( "Status: Using GLEW " ) ) + + FROM_UTF8( (char*) glewGetString( GLEW_VERSION ) ) ); + } + + // Check the OpenGL version (minimum 2.1 is required) + if( GLEW_VERSION_2_1 ) + { + wxLogInfo( wxT( "OpenGL Version 2.1 supported." ) ); + } + else + { + wxLogError( wxT( "OpenGL Version 2.1 is not supported!" ) ); + exit( 1 ); + } + + // Framebuffers have to be supported + if( !GLEW_ARB_framebuffer_object ) + { + wxLogError( wxT( "Framebuffer objects are not supported!" ) ); + exit( 1 ); + } + + // Vertex buffer have to be supported + if( !GLEW_ARB_vertex_buffer_object ) + { + wxLogError( wxT( "Vertex buffer objects are not supported!" ) ); + exit( 1 ); + } + + isGlewInitialized = true; +} + + +void OPENGL_GAL::initCursor( int aCursorSize ) +{ + cursorSize = aCursorSize; +} + + +unsigned int OPENGL_GAL::getNewGroupNumber() +{ + wxASSERT_MSG( groups.size() < std::numeric_limits::max(), + wxT( "There are no free slots to store a group" ) ); + + while( groups.find( groupCounter ) != groups.end() ) + { + groupCounter++; + } + + return groupCounter++; +} + + +// ------------------------------------- +// Callback functions for the tesselator +// ------------------------------------- + +// Compare Redbook Chapter 11 +void CALLBACK VertexCallback( GLvoid* aVertexPtr, void* aData ) +{ + GLdouble* vertex = static_cast( aVertexPtr ); + OPENGL_GAL::TessParams* param = static_cast( aData ); + VERTEX_MANAGER* vboManager = param->vboManager; + + if( vboManager ) + vboManager->Vertex( vertex[0], vertex[1], vertex[2] ); +} + + +void CALLBACK CombineCallback( GLdouble coords[3], + GLdouble* vertex_data[4], + GLfloat weight[4], GLdouble** dataOut, void* aData ) +{ + GLdouble* vertex = new GLdouble[3]; + OPENGL_GAL::TessParams* param = static_cast( aData ); + + // Save the pointer so we can delete it later + param->intersectPoints.push_back( vertex ); + + memcpy( vertex, coords, 3 * sizeof(GLdouble) ); + + *dataOut = vertex; +} + + +void CALLBACK EdgeCallback() +{ + // This callback is needed to force GLU tesselator to use triangles only +} + + +void CALLBACK ErrorCallback( GLenum aErrorCode ) +{ + const GLubyte* estring; + + estring = gluErrorString( aErrorCode ); + wxLogError( wxT( "Tessellation Error: %s" ), (char*) estring ); +} + + +void InitTesselatorCallbacks( GLUtesselator* aTesselator ) +{ + gluTessCallback( aTesselator, GLU_TESS_VERTEX_DATA, ( void (CALLBACK*)() )VertexCallback ); + gluTessCallback( aTesselator, GLU_TESS_COMBINE_DATA, ( void (CALLBACK*)() )CombineCallback ); + gluTessCallback( aTesselator, GLU_TESS_EDGE_FLAG, ( void (CALLBACK*)() )EdgeCallback ); + gluTessCallback( aTesselator, GLU_TESS_ERROR_DATA, ( void (CALLBACK*)() )ErrorCallback ); } diff --git a/common/gal/opengl/shader.cpp b/common/gal/opengl/shader.cpp index a535f1be69..5fbd8378da 100644 --- a/common/gal/opengl/shader.cpp +++ b/common/gal/opengl/shader.cpp @@ -37,12 +37,12 @@ using namespace KiGfx; SHADER::SHADER() : - isProgramCreated( false ), - isShaderLinked( false ), - active( false ), - maximumVertices( 4 ), - geomInputType( GL_LINES ), - geomOutputType( GL_LINES ) + isProgramCreated( false ), + isShaderLinked( false ), + active( false ), + maximumVertices( 4 ), + geomInputType( GL_LINES ), + geomOutputType( GL_LINES ) { } @@ -97,7 +97,8 @@ bool SHADER::Link() programInfo( programNumber ); // Check the Link state - glGetObjectParameterivARB( programNumber, GL_OBJECT_LINK_STATUS_ARB, (GLint*) &isShaderLinked ); + glGetObjectParameterivARB( programNumber, GL_OBJECT_LINK_STATUS_ARB, + (GLint*) &isShaderLinked ); #ifdef __WXDEBUG__ if( !isShaderLinked ) @@ -253,6 +254,7 @@ bool SHADER::addSource( const std::string& aShaderSource, ShaderType aShaderType glCompileShader( shaderNumber ); GLint status; glGetShaderiv( shaderNumber, GL_COMPILE_STATUS, &status ); + if( status != GL_TRUE ) { wxLogError( wxT( "Shader compilation error" ) ); @@ -275,4 +277,3 @@ bool SHADER::addSource( const std::string& aShaderSource, ShaderType aShaderType return true; } - diff --git a/common/gal/opengl/vertex_manager.cpp b/common/gal/opengl/vertex_manager.cpp index 7ffdd74922..876a793241 100644 --- a/common/gal/opengl/vertex_manager.cpp +++ b/common/gal/opengl/vertex_manager.cpp @@ -37,7 +37,7 @@ using namespace KiGfx; VERTEX_MANAGER::VERTEX_MANAGER( bool aCached ) : - m_noTransform( true ), m_transform( 1.0f ) + m_noTransform( true ), m_transform( 1.0f ) { m_container.reset( VERTEX_CONTAINER::MakeContainer( aCached ) ); m_gpu.reset( GPU_MANAGER::MakeManager( m_container.get() ) ); @@ -52,6 +52,7 @@ void VERTEX_MANAGER::Vertex( GLfloat aX, GLfloat aY, GLfloat aZ ) const { // Obtain the pointer to the vertex in the currently used container VERTEX* newVertex = m_container->Allocate( 1 ); + if( newVertex == NULL ) { wxLogError( wxT( "Vertex allocation error" ) ); @@ -66,6 +67,7 @@ void VERTEX_MANAGER::Vertices( const VERTEX aVertices[], unsigned int aSize ) co { // Obtain pointer to the vertex in currently used container VERTEX* newVertex = m_container->Allocate( aSize ); + if( newVertex == NULL ) { wxLogError( wxT( "Vertex allocation error" ) ); @@ -95,7 +97,7 @@ void VERTEX_MANAGER::FreeItem( VERTEX_ITEM& aItem ) const void VERTEX_MANAGER::ChangeItemColor( const VERTEX_ITEM& aItem, const COLOR4D& aColor ) const { - unsigned int size = aItem.GetSize(); + unsigned int size = aItem.GetSize(); unsigned int offset = aItem.GetOffset(); VERTEX* vertex = m_container->GetVertices( offset ); @@ -114,7 +116,7 @@ void VERTEX_MANAGER::ChangeItemColor( const VERTEX_ITEM& aItem, const COLOR4D& a void VERTEX_MANAGER::ChangeItemDepth( const VERTEX_ITEM& aItem, GLfloat aDepth ) const { - unsigned int size = aItem.GetSize(); + unsigned int size = aItem.GetSize(); unsigned int offset = aItem.GetOffset(); VERTEX* vertex = m_container->GetVertices( offset ); @@ -131,7 +133,7 @@ void VERTEX_MANAGER::ChangeItemDepth( const VERTEX_ITEM& aItem, GLfloat aDepth ) VERTEX* VERTEX_MANAGER::GetVertices( const VERTEX_ITEM& aItem ) const { if( aItem.GetSize() == 0 ) - return NULL; // The item is not stored in the container + return NULL; // The item is not stored in the container return m_container->GetVertices( aItem.GetOffset() ); } @@ -158,6 +160,7 @@ void VERTEX_MANAGER::BeginDrawing() const void VERTEX_MANAGER::DrawItem( const VERTEX_ITEM& aItem ) const { int size = aItem.GetSize(); + if( size > 0 ) { int offset = aItem.GetOffset(); diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index a4b56d0052..43727c376b 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -85,7 +85,6 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& event ) else scrollSpeed = scrollVec.y; - VECTOR2D t = m_view->GetScreenPixelSize(); VECTOR2D delta( event.ControlDown() ? -scrollSpeed : 0.0, event.ShiftDown() ? -scrollSpeed : 0.0 ); diff --git a/include/gal/cairo/cairo_compositor.h b/include/gal/cairo/cairo_compositor.h index 24b730b28c..b638b56a0a 100644 --- a/include/gal/cairo/cairo_compositor.h +++ b/include/gal/cairo/cairo_compositor.h @@ -38,7 +38,6 @@ namespace KiGfx { - class CAIRO_COMPOSITOR : public COMPOSITOR { public: @@ -67,25 +66,25 @@ protected: typedef boost::shared_array BitmapPtr; typedef struct { - cairo_t* context; ///< Main texture handle - cairo_surface_t* surface; ///< Point to which an image from texture is attached - BitmapPtr bitmap; ///< Pixel storage + cairo_t* context; ///< Main texture handle + cairo_surface_t* surface; ///< Point to which an image from texture is attached + BitmapPtr bitmap; ///< Pixel storage } CAIRO_BUFFER; - unsigned int m_current; ///< Currently used buffer handle + unsigned int m_current; ///< Currently used buffer handle typedef std::deque CAIRO_BUFFERS; /// Pointer to the current context, so it can be changed - cairo_t** m_currentContext; + cairo_t** m_currentContext; /// Rendering target used for compositing (the main display) - cairo_t* m_mainContext; + cairo_t* m_mainContext; /// Transformation matrix - cairo_matrix_t m_matrix; + cairo_matrix_t m_matrix; /// Stores information about initialized buffers - CAIRO_BUFFERS m_buffers; + CAIRO_BUFFERS m_buffers; unsigned int m_stride; ///< Stride to use given the desired format and width unsigned int m_bufferSize; ///< Amount of memory needed to store a buffer @@ -102,7 +101,6 @@ protected: return m_buffers.size(); } }; - } // namespace KiGfx #endif /* COMPOSITOR_H_ */ diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index df3d977502..14d4ca9827 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -45,9 +45,6 @@ #endif #endif -#define EXCEPTION_ZERO_CLIENT_RECTANGLE 0 -#define EXCEPTION_ZERO_CONTEXT 1 - /** * @brief Class CAIRO_GAL is the cairo implementation of the graphics abstraction layer. * @@ -92,7 +89,7 @@ public: // --------------- /// @copydoc GAL::BeginDrawing() - virtual void BeginDrawing() throw (int); + virtual void BeginDrawing(); /// @copydoc GAL::EndDrawing() virtual void EndDrawing(); @@ -103,19 +100,19 @@ public: /// @copydoc GAL::DrawSegment() virtual void DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aWidth ); - /// @copydoc GAL::DrawPolyline() - virtual void DrawPolyline( std::deque& aPointList ); - /// @copydoc GAL::DrawCircle() virtual void DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ); /// @copydoc GAL::DrawArc() - virtual void - DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double aStartAngle, double aEndAngle ); + virtual void DrawArc( const VECTOR2D& aCenterPoint, double aRadius, + double aStartAngle, double aEndAngle ); /// @copydoc GAL::DrawRectangle() virtual void DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); + /// @copydoc GAL::DrawPolyline() + virtual void DrawPolyline( std::deque& aPointList ); + /// @copydoc GAL::DrawPolygon() virtual void DrawPolygon( const std::deque& aPointList ); @@ -149,24 +146,15 @@ public: /// @copydoc GAL::SetIsStroke() virtual void SetIsStroke( bool aIsStrokeEnabled ); - /// @copydoc GAL::SetFillColor() - virtual void SetFillColor( const COLOR4D& aColor ); - /// @copydoc GAL::SetStrokeColor() virtual void SetStrokeColor( const COLOR4D& aColor ); - /// @copydoc GAL::GetStrokeColor() - COLOR4D GetStrokeColor(); - - /// @copydoc GAL::SetBackgroundColor() - virtual void SetBackgroundColor( const COLOR4D& aColor ); + /// @copydoc GAL::SetFillColor() + virtual void SetFillColor( const COLOR4D& aColor ); /// @copydoc GAL::SetLineWidth() virtual void SetLineWidth( double aLineWidth ); - /// @copydoc GAL::GetLineWidth() - double GetLineWidth(); - /// @copydoc GAL::SetLayerDepth() virtual void SetLayerDepth( double aLayerDepth ); @@ -221,33 +209,6 @@ public: // Handling the world <-> screen transformation // -------------------------------------------------------- - /// @copydoc GAL::ComputeWorldScreenMatrix() - virtual void ComputeWorldScreenMatrix(); - - /// @copydoc GAL::GetWorldScreenMatrix() - MATRIX3x3D GetWorldScreenMatrix(); - - /// @copydoc GAL::SetWorldScreenMatrix() - void SetWorldScreenMatrix( MATRIX3x3D aMatrix ); - - /// @copydoc GAL::SetWorldUnitLength() - void SetWorldUnitLength( double aWorldUnitLength ); - - /// @copydoc GAL::SetScreenDPI() - void SetScreenDPI( double aScreenDPI ); - - /// @copydoc GAL::SetLookAtPoint() - void SetLookAtPoint( const VECTOR2D& aPoint ); - - /// @copydoc GAL::GetLookAtPoint() - VECTOR2D GetLookAtPoint(); - - /// @copydoc GAL::SetZoomFactor() - void SetZoomFactor( double aZoomFactor ); - - /// @copydoc GAL::GetZoomFactor() - double GetZoomFactor(); - /// @copydoc GAL::SaveScreen() virtual void SaveScreen(); @@ -264,9 +225,6 @@ public: /// @copydoc GAL::ComputeCursorToWorld() virtual VECTOR2D ComputeCursorToWorld( const VECTOR2D& aCursorPosition ); - /// @copydoc GAL::SetIsCursorEnabled() - void SetIsCursorEnabled( bool aIsCursorEnabled ); - /// @copydoc GAL::DrawCursor() virtual void DrawCursor( VECTOR2D aCursorPosition ); @@ -295,7 +253,7 @@ public: } protected: - virtual void DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); + virtual void drawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); private: /// Super class definition @@ -303,30 +261,29 @@ private: // Compositing variables boost::shared_ptr compositor; ///< Object for layers compositing - unsigned int mainBuffer; ///< Handle to the main buffer - unsigned int overlayBuffer; ///< Handle to the overlay buffer + unsigned int mainBuffer; ///< Handle to the main buffer + unsigned int overlayBuffer; ///< Handle to the overlay buffer // Variables related to wxWidgets - wxWindow* parentWindow; ///< Parent window - wxEvtHandler* mouseListener; ///< Mouse listener - wxEvtHandler* paintListener; ///< Paint listener - unsigned int bufferSize; ///< Size of buffers cairoOutput, bitmapBuffers - unsigned char* wxOutput; ///< wxImage comaptible buffer + wxWindow* parentWindow; ///< Parent window + wxEvtHandler* mouseListener; ///< Mouse listener + wxEvtHandler* paintListener; ///< Paint listener + unsigned int bufferSize; ///< Size of buffers cairoOutput, bitmapBuffers + unsigned char* wxOutput; ///< wxImage comaptible buffer // Cursor variables - std::deque savedCursorPixels; ///< Saved pixels of the cursor - bool isDeleteSavedPixels; ///< True, if the saved pixels can be discarded - wxPoint savedCursorPosition; ///< The last cursor position - wxBitmap* cursorPixels; ///< Cursor pixels - wxBitmap* cursorPixelsSaved; ///< Saved cursor pixels - int cursorSize; ///< Cursor size + std::deque savedCursorPixels; ///< Saved pixels of the cursor + bool isDeleteSavedPixels; ///< True, if the saved pixels can be discarded + wxPoint savedCursorPosition; ///< The last cursor position + wxBitmap* cursorPixels; ///< Cursor pixels + wxBitmap* cursorPixelsSaved; ///< Saved cursor pixels + int cursorSize; ///< Cursor size /// Maximum number of arguments for one command static const int MAX_CAIRO_ARGUMENTS = 6; /// Definitions for the command recorder - enum GraphicsCommand - { + enum GraphicsCommand { CMD_SET_FILL, ///< Enable/disable filling CMD_SET_STROKE, ///< Enable/disable stroking CMD_SET_FILLCOLOR, ///< Set the fill color @@ -392,18 +349,18 @@ private: /// @copydoc GAL::initCursor() virtual void initCursor( int aCursorSize ); - /// Allocate the bitmaps for drawing - void allocateBitmaps(); - - /// Allocate the bitmaps for drawing - void deleteBitmaps(); - /// Prepare Cairo surfaces for drawing void initSurface(); /// Destroy Cairo surfaces when are not needed anymore void deinitSurface(); + /// Allocate the bitmaps for drawing + void allocateBitmaps(); + + /// Allocate the bitmaps for drawing + void deleteBitmaps(); + /// Prepare the compositor void setCompositor(); diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 0f51d607a3..f7b02c0ce8 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -231,7 +231,10 @@ public: * * @param aColor is the color for background filling. */ - virtual void SetBackgroundColor( const COLOR4D& aColor ) = 0; + inline virtual void SetBackgroundColor( const COLOR4D& aColor ) + { + backgroundColor = aColor; + } /** * @brief Set the line width. @@ -417,7 +420,7 @@ public: // -------------------------------------------------------- /// @brief Compute the world <-> screen transformation matrix - virtual void ComputeWorldScreenMatrix() = 0; + virtual void ComputeWorldScreenMatrix(); /** * @brief Get the world <-> screen transformation matrix. @@ -745,7 +748,6 @@ protected: bool isFillEnabled; ///< Is filling of graphic objects enabled ? bool isStrokeEnabled; ///< Are the outlines stroked ? - bool isSetAttributes; ///< True, if the attributes have been set COLOR4D backgroundColor; ///< The background color COLOR4D fillColor; ///< The fill color @@ -784,7 +786,7 @@ protected: * @param aStartPoint is the start point of the line. * @param aEndPoint is the end point of the line. */ - virtual void DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) = 0; + virtual void drawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) = 0; /** * @brief Initialize the cursor. diff --git a/include/gal/opengl/cached_container.h b/include/gal/opengl/cached_container.h index 6c2c8b92bf..6409d34356 100644 --- a/include/gal/opengl/cached_container.h +++ b/include/gal/opengl/cached_container.h @@ -94,12 +94,12 @@ protected: unsigned int m_itemSize; /** - * Function reallocate() - * resizes the chunk that stores the current item to the given size. - * - * @param aSize is the number of vertices to be stored. - * @return offset of the new chunk. - */ + * Function reallocate() + * resizes the chunk that stores the current item to the given size. + * + * @param aSize is the number of vertices to be stored. + * @return offset of the new chunk. + */ virtual unsigned int reallocate( unsigned int aSize ); /** diff --git a/include/gal/opengl/opengl_compositor.h b/include/gal/opengl/opengl_compositor.h index bccb6231bb..88d36f91fa 100644 --- a/include/gal/opengl/opengl_compositor.h +++ b/include/gal/opengl/opengl_compositor.h @@ -37,7 +37,6 @@ namespace KiGfx { - class OPENGL_COMPOSITOR : public COMPOSITOR { public: @@ -94,7 +93,6 @@ protected: return m_buffers.size(); } }; - } // namespace KiGfx #endif /* COMPOSITOR_H_ */ diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 4fd7a7c375..402f8fc133 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -104,19 +104,19 @@ public: /// @copydoc GAL::DrawSegment() virtual void DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aWidth ); - /// @copydoc GAL::DrawPolyline() - virtual void DrawPolyline( std::deque& aPointList ); - /// @copydoc GAL::DrawCircle() virtual void DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ); /// @copydoc GAL::DrawArc() - virtual void - DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double aStartAngle, double aEndAngle ); + virtual void DrawArc( const VECTOR2D& aCenterPoint, double aRadius, + double aStartAngle, double aEndAngle ); /// @copydoc GAL::DrawRectangle() virtual void DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); + /// @copydoc GAL::DrawPolyline() + virtual void DrawPolyline( std::deque& aPointList ); + /// @copydoc GAL::DrawPolygon() virtual void DrawPolygon( const std::deque& aPointList ); @@ -129,7 +129,7 @@ public: // -------------- /// @brief Resizes the canvas. - virtual void ResizeScreen ( int aWidth, int aHeight ); + virtual void ResizeScreen( int aWidth, int aHeight ); /// @brief Shows/hides the GAL canvas virtual bool Show( bool aShow ); @@ -144,42 +144,9 @@ public: // Attribute setting // ----------------- - /// @copydoc GAL::SetIsFill() - virtual void SetIsFill( bool aIsFillEnabled ) - { - isFillEnabled = aIsFillEnabled; - } - - /// @copydoc GAL::SetIsStroke() - virtual void SetIsStroke( bool aIsStrokeEnabled ) - { - isStrokeEnabled = aIsStrokeEnabled; - } - - /// @copydoc GAL::SetFillColor() - virtual void SetFillColor( const COLOR4D& aColor ); - /// @copydoc GAL::SetStrokeColor() virtual void SetStrokeColor( const COLOR4D& aColor ); - /// @copydoc GAL::GetStrokeColor() - COLOR4D GetStrokeColor(); - - /// @copydoc GAL::SetBackgroundColor() - virtual void SetBackgroundColor( const COLOR4D& aColor ); - - /// @copydoc GAL::SetLineWidth() - virtual void SetLineWidth( double aLineWidth ); - - /// @copydoc GAL::GetLineWidth() - double GetLineWidth(); - - /// @copydoc GAL::SetLayerDepth() - virtual void SetLayerDepth( double aLayerDepth ) - { - super::SetLayerDepth( aLayerDepth ); - } - // -------------- // Transformation // -------------- @@ -231,33 +198,6 @@ public: // Handling the world <-> screen transformation // -------------------------------------------------------- - /// @copydoc GAL::ComputeWorldScreenMatrix() - virtual void ComputeWorldScreenMatrix(); - - /// @copydoc GAL::GetWorldScreenMatrix() - MATRIX3x3D GetWorldScreenMatrix(); - - /// @copydoc GAL::SetWorldScreenMatrix() - void SetWorldScreenMatrix( MATRIX3x3D aMatrix ); - - /// @copydoc GAL::SetWorldUnitLength() - void SetWorldUnitLength( double aWorldUnitLength ); - - /// @copydoc GAL::SetScreenDPI() - void SetScreenDPI( double aScreenDPI ); - - /// @copydoc GAL::SetLookAtPoint() - void SetLookAtPoint( const VECTOR2D& aPoint ); - - /// @copydoc GAL::GetLookAtPoint() - VECTOR2D GetLookAtPoint(); - - /// @copydoc GAL::SetZoomFactor() - void SetZoomFactor( double aZoomFactor ); - - /// @copydoc GAL::GetZoomFactor() - double GetZoomFactor(); - /// @copydoc GAL::SaveScreen() virtual void SaveScreen(); @@ -274,9 +214,6 @@ public: /// @copydoc GAL::ComputeCursorToWorld() virtual VECTOR2D ComputeCursorToWorld( const VECTOR2D& aCursorPosition ); - /// @copydoc GAL::SetIsCursorEnabled() - void SetIsCursorEnabled( bool aIsCursorEnabled ); - /// @copydoc GAL::DrawCursor() virtual void DrawCursor( VECTOR2D aCursorPosition ); @@ -312,7 +249,7 @@ public: } TessParams; protected: - virtual void DrawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); + virtual void drawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); private: /// Super class definition @@ -321,90 +258,114 @@ private: static const int CIRCLE_POINTS = 64; ///< The number of points for circle approximation static const int CURVE_POINTS = 32; ///< The number of points for curve approximation - wxClientDC* clientDC; ///< Drawing context - wxGLContext* glContext; ///< OpenGL context of wxWidgets - wxWindow* parentWindow; ///< Parent window - wxEvtHandler* mouseListener; - wxEvtHandler* paintListener; - - // Precomputed vertices for faster circle & semicircle drawing - NONCACHED_CONTAINER circleContainer; ///< Container for storing circle vertices + wxClientDC* clientDC; ///< Drawing context + wxGLContext* glContext; ///< OpenGL context of wxWidgets + wxWindow* parentWindow; ///< Parent window + wxEvtHandler* mouseListener; + wxEvtHandler* paintListener; // Vertex buffer objects related fields typedef std::map< unsigned int, boost::shared_ptr > GroupsMap; - GroupsMap groups; ///< Stores informations about VBO objects (groups) - unsigned int groupCounter; ///< Counter used for generating keys for groups - VERTEX_MANAGER* currentManager; ///< Currently used VERTEX_MANAGER (for storing VERTEX_ITEMs) - VERTEX_MANAGER cachedManager; ///< Container for storing cached VERTEX_ITEMs - VERTEX_MANAGER nonCachedManager; ///< Container for storing non-cached VERTEX_ITEMs - VERTEX_MANAGER overlayManager; ///< Container for storing overlaid VERTEX_ITEMs + GroupsMap groups; ///< Stores informations about VBO objects (groups) + unsigned int groupCounter; ///< Counter used for generating keys for groups + VERTEX_MANAGER* currentManager; ///< Currently used VERTEX_MANAGER (for storing VERTEX_ITEMs) + VERTEX_MANAGER cachedManager; ///< Container for storing cached VERTEX_ITEMs + VERTEX_MANAGER nonCachedManager; ///< Container for storing non-cached VERTEX_ITEMs + VERTEX_MANAGER overlayManager; ///< Container for storing overlaid VERTEX_ITEMs // Framebuffer & compositing - OPENGL_COMPOSITOR compositor; ///< Handles multiple rendering targets - unsigned int mainBuffer; ///< Main rendering target - unsigned int overlayBuffer; ///< Auxiliary rendering target (for menus etc.) - - // Polygon tesselation - GLUtesselator* tesselator; ///< Pointer to the tesselator - std::vector tessIntersects; ///< Storage of intersecting points + OPENGL_COMPOSITOR compositor; ///< Handles multiple rendering targets + unsigned int mainBuffer; ///< Main rendering target + unsigned int overlayBuffer; ///< Auxiliary rendering target (for menus etc.) // Shader - SHADER shader; ///< There is only one shader used for different objects + SHADER shader; ///< There is only one shader used for different objects // Cursor - int cursorSize; ///< Size of the cursor in pixels - GLubyte* cursorShape; ///< Cursor pixel storage - GLubyte* cursorSave; ///< Saved cursor pixels - VECTOR2D savedCursorPosition; ///< Last saved cursor position + int cursorSize; ///< Size of the cursor in pixels + GLubyte* cursorShape; ///< Cursor pixel storage + GLubyte* cursorSave; ///< Saved cursor pixels + VECTOR2D savedCursorPosition; ///< Last saved cursor position // Internal flags - bool isGlewInitialized; ///< Is GLEW initialized? - bool isFramebufferInitialized; ///< Are the framebuffers initialized? - bool isShaderInitialized; ///< Was the shader initialized? - bool isGrouping; ///< Was a group started? + bool isGlewInitialized; ///< Is GLEW initialized? + bool isFramebufferInitialized; ///< Are the framebuffers initialized? + bool isShaderInitialized; ///< Was the shader initialized? + bool isGrouping; ///< Was a group started? + + // Polygon tesselation + GLUtesselator* tesselator; ///< Pointer to the tesselator + std::vector tessIntersects; ///< Storage of intersecting points + + // Structure used for tesselation of polygons + struct OGLPOINT + { + OGLPOINT() : + x( 0.0 ), y( 0.0 ), z( 0.0 ) + {} + + OGLPOINT( const char* fastest ) + { + // do nothing for fastest speed, and keep inline + } + + OGLPOINT( const VECTOR2D& aPoint ) : + x( aPoint.x ), y( aPoint.y ), z( 0.0 ) + {} + + OGLPOINT& operator=( const VECTOR2D& aPoint ) + { + x = aPoint.x; + y = aPoint.y; + z = 0.0; + return *this; + } + + GLdouble x; + GLdouble y; + GLdouble z; + }; /** - * @brief Draw a semi circle. Depending on settings (isStrokeEnabled & isFilledEnabled) it runs + * @brief Draw a quad for the line. + * + * @param aStartPoint is the start point of the line. + * @param aEndPoint is the end point of the line. + */ + inline void drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); + + /** + * @brief Draw a semicircle. Depending on settings (isStrokeEnabled & isFilledEnabled) it runs * the proper function (drawStrokedSemiCircle or drawFilledSemiCircle). * * @param aCenterPoint is the center point. - * @param aRadius is the radius of the semi-circle. - * @param aAngle is the angle of the semi-circle. + * @param aRadius is the radius of the semicircle. + * @param aAngle is the angle of the semicircle. * */ void drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ); /** - * @brief Draw a filled semi circle. + * @brief Draw a filled semicircle. * * @param aCenterPoint is the center point. - * @param aRadius is the radius of the semi-circle. - * @param aAngle is the angle of the semi-circle. + * @param aRadius is the radius of the semicircle. + * @param aAngle is the angle of the semicircle. * */ void drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ); /** - * @brief Draw a stroked semi circle. + * @brief Draw a stroked semicircle. * * @param aCenterPoint is the center point. - * @param aRadius is the radius of the semi-circle. - * @param aAngle is the angle of the semi-circle. + * @param aRadius is the radius of the semicircle. + * @param aAngle is the angle of the semicircle. * */ void drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle ); - /// Compute the points of the unit circle and store them in VBO. - void computeCircle(); - // Event handling - /** - * @brief This is the window creation event handler. - * - * @param aEvent is the window creation event. - */ - void onCreate( wxWindowCreateEvent& aEvent ); - /** * @brief This is the OnPaint event handler. * @@ -419,20 +380,12 @@ private: */ void skipMouseEvent( wxMouseEvent& aEvent ); - /// Initialize GLEW. + /// Initialize GLEW void initGlew(); /// @copydoc GAL::initCursor() virtual void initCursor( int aCursorSize ); - /** - * @brief Draw a quad for the line. - * - * @param aStartPoint is the start point of the line. - * @param aEndPoint is the end point of the line. - */ - inline void drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); - /** * @brief Returns a valid key that can be used as a new group number. * diff --git a/include/gal/opengl/vertex_common.h b/include/gal/opengl/vertex_common.h index ef8c6d2046..626ed5a6cf 100644 --- a/include/gal/opengl/vertex_common.h +++ b/include/gal/opengl/vertex_common.h @@ -35,9 +35,8 @@ namespace KiGfx { // Possible types of shaders -enum SHADER_TYPE -{ - SHADER_NONE = 0, +enum SHADER_TYPE { + SHADER_NONE = 0, SHADER_LINE, SHADER_FILLED_CIRCLE, SHADER_STROKED_CIRCLE, @@ -60,7 +59,7 @@ const unsigned int CoordStride = CoordSize / sizeof(GLfloat); // Offset of color data from the beginning of each vertex data const unsigned int ColorOffset = offsetof(VERTEX, r); const unsigned int ColorSize = sizeof(VERTEX().r) + sizeof(VERTEX().g) + - sizeof(VERTEX().b) + sizeof(VERTEX().a); + sizeof(VERTEX().b) + sizeof(VERTEX().a); const unsigned int ColorStride = ColorSize / sizeof(GLubyte); // Shader attributes From 83ca78a5fb7f34f80562782baeb4f11cf6fd56e8 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 31 Jul 2013 09:01:25 +0200 Subject: [PATCH 190/415] Fixed grid line drawing in OpenGL backend for some drivers. --- common/gal/opengl/opengl_gal.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 3a94d33e50..640a1b4ae9 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -167,9 +167,6 @@ void OPENGL_GAL::BeginDrawing() glEnable( GL_BLEND ); glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); - // Enable smooth lines - glEnable( GL_LINE_SMOOTH ); - glMatrixMode( GL_MODELVIEW ); // Set up the world <-> screen transformation From db6aecda476c535dc8f8968d72016cc47300784e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 31 Jul 2013 10:28:23 +0200 Subject: [PATCH 191/415] New display style for grid (dotted). --- common/gal/graphics_abstraction_layer.cpp | 122 ++++++++++++++-------- include/gal/graphics_abstraction_layer.h | 14 ++- 2 files changed, 87 insertions(+), 49 deletions(-) diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index 2f718647ae..c431c83565 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -47,6 +47,7 @@ GAL::GAL() : // Set grid defaults SetGridVisibility( true ); + SetGridStyle( GRID_STYLE_LINES ); SetGridColor( COLOR4D( 0.4, 0.4, 0.4, 1.0 ) ); SetCoarseGrid( 10 ); SetGridLineWidth( 0.5 ); @@ -97,7 +98,20 @@ void GAL::DrawGrid() SetTarget( TARGET_NONCACHED ); - // The grid consists of lines + // Draw the origin marker + double origSize = static_cast( gridOriginMarkerSize ) / worldScale; + SetLayerDepth( 0.0 ); + SetIsFill( false ); + SetIsStroke( true ); + SetStrokeColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); + SetLineWidth( gridLineWidth / worldScale ); + DrawLine( gridOrigin + VECTOR2D( -origSize, -origSize ), + gridOrigin + VECTOR2D( origSize, origSize ) ); + DrawLine( gridOrigin + VECTOR2D( -origSize, origSize ), + gridOrigin + VECTOR2D( origSize, -origSize ) ); + DrawCircle( gridOrigin, origSize * 0.7 ); + + // Draw the grid // For the drawing the start points, end points and increments have // to be calculated in world coordinates MATRIX3x3D inverseMatrix = worldScreenMatrix.Inverse(); @@ -107,23 +121,9 @@ void GAL::DrawGrid() int gridScreenSizeDense = round( gridSize.x * worldScale ); int gridScreenSizeCoarse = round( gridSize.x * static_cast( gridTick ) * worldScale ); - // Compute the line width of the grid - double width = 2.0 * gridLineWidth / worldScale; - double doubleWidth = 2.0 * width; - - SetIsFill( false ); - SetIsStroke( true ); - - // Draw the origin marker - SetLayerDepth( 0.0 ); - double origSize = static_cast( gridOriginMarkerSize ) / worldScale; - SetStrokeColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); - SetLineWidth( width ); - DrawLine( gridOrigin + VECTOR2D( -origSize, -origSize ), - gridOrigin + VECTOR2D( origSize, origSize ) ); - DrawLine( gridOrigin + VECTOR2D( -origSize, origSize ), - gridOrigin + VECTOR2D( origSize, -origSize ) ); - DrawCircle( gridOrigin, origSize * 0.7 ); + // Compute the line marker or point radius of the grid + double marker = 2.0 * gridLineWidth / worldScale; + double doubleMarker = 2.0 * marker; // Check if the grid would not be too dense if( std::max( gridScreenSizeDense, gridScreenSizeCoarse ) > gridDrawThreshold ) @@ -144,46 +144,76 @@ void GAL::DrawGrid() gridEndX += 1; gridEndY += 1; - // Draw the grid behind all layers + // Draw the grid behind all other layers SetLayerDepth( depthRange.y * 0.75 ); - SetStrokeColor( gridColor ); - // Now draw the grid, every coarse grid line gets the double width - for( int j = gridStartY; j < gridEndY; j += 1 ) + if( gridStyle == GRID_STYLE_LINES ) { - if( j % gridTick == 0 && gridScreenSizeDense > gridDrawThreshold ) + SetIsFill( false ); + SetIsStroke( true ); + SetStrokeColor( gridColor ); + + // Now draw the grid, every coarse grid line gets the double width + for( int j = gridStartY; j < gridEndY; j += 1 ) { - SetLineWidth( doubleWidth ); - } - else - { - SetLineWidth( width ); + if( j % gridTick == 0 && gridScreenSizeDense > gridDrawThreshold ) + SetLineWidth( doubleMarker ); + else + SetLineWidth( marker ); + + if( ( j % gridTick == 0 && gridScreenSizeCoarse > gridDrawThreshold ) + || gridScreenSizeDense > gridDrawThreshold ) + { + drawGridLine( VECTOR2D( gridStartX * gridSize.x, j * gridSize.y ), + VECTOR2D( gridEndX * gridSize.x, j * gridSize.y ) ); + } } - if( ( j % gridTick == 0 && gridScreenSizeCoarse > gridDrawThreshold ) - || gridScreenSizeDense > gridDrawThreshold ) + for( int i = gridStartX; i < gridEndX; i += 1 ) { - drawGridLine( VECTOR2D( gridStartX * gridSize.x, j * gridSize.y ), - VECTOR2D( gridEndX * gridSize.x, j * gridSize.y ) ); + if( i % gridTick == 0 && gridScreenSizeDense > gridDrawThreshold ) + SetLineWidth( doubleMarker ); + else + SetLineWidth( marker ); + + if( ( i % gridTick == 0 && gridScreenSizeCoarse > gridDrawThreshold ) + || gridScreenSizeDense > gridDrawThreshold ) + { + drawGridLine( VECTOR2D( i * gridSize.x, gridStartY * gridSize.y ), + VECTOR2D( i * gridSize.x, gridEndY * gridSize.y ) ); + } } } - - for( int i = gridStartX; i < gridEndX; i += 1 ) + else // Dotted grid { - if( i % gridTick == 0 && gridScreenSizeDense > gridDrawThreshold ) - { - SetLineWidth( doubleWidth ); - } - else - { - SetLineWidth( width ); - } + bool tickX, tickY; + SetIsFill( true ); + SetIsStroke( false ); + SetFillColor( gridColor ); - if( ( i % gridTick == 0 && gridScreenSizeCoarse > gridDrawThreshold ) - || gridScreenSizeDense > gridDrawThreshold ) + for( int j = gridStartY; j < gridEndY; j += 1 ) { - drawGridLine( VECTOR2D( i * gridSize.x, gridStartY * gridSize.y ), - VECTOR2D( i * gridSize.x, gridEndY * gridSize.y ) ); + if( j % gridTick == 0 && gridScreenSizeDense > gridDrawThreshold ) + tickY = true; + else + tickY = false; + + for( int i = gridStartX; i < gridEndX; i += 1 ) + { + if( i % gridTick == 0 && gridScreenSizeDense > gridDrawThreshold ) + tickX = true; + else + tickX = false; + + if( tickX || tickY || gridScreenSizeDense > gridDrawThreshold ) + { + double radius = ( tickX && tickY ) ? doubleMarker : marker; + DrawRectangle( VECTOR2D( i * gridSize.x - radius, + j * gridSize.y - radius ), + VECTOR2D( i * gridSize.x + radius, + j * gridSize.y + radius ) ); + } + } } } } diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index f7b02c0ce8..bc81a32f6c 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -44,7 +44,7 @@ namespace KiGfx /** * GridStyle: Type definition of the grid style */ -enum GridStyle +enum GRID_STYLE { GRID_STYLE_LINES, ///< Use lines for the grid GRID_STYLE_DOTS ///< Use dots for the grid @@ -668,8 +668,15 @@ public: /// @brief Draw the grid void DrawGrid(); - // TODO Not yet implemented - // virtual void SetGridStyle(GridStyle gridStyle); + /** + * @brief Change the grid display style. + * + * @param aGridStyle is the new style for grid. + */ + inline virtual void SetGridStyle( GRID_STYLE aGridStyle ) + { + gridStyle = aGridStyle; + } // ------- // Cursor @@ -758,6 +765,7 @@ protected: // Grid settings bool gridVisibility; ///< Should the grid be shown + GRID_STYLE gridStyle; ///< Grid display style VECTOR2D gridSize; ///< The grid size VECTOR2D gridOrigin; ///< The grid origin COLOR4D gridColor; ///< Color of the grid From 0f841f194f6cd640a4b5da5439e361a0ea6ac802 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 31 Jul 2013 11:36:46 +0200 Subject: [PATCH 192/415] Fixed drawing of polygon segments (eg. microwave extension traces). --- pcbnew/pcb_painter.cpp | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 0ef0e33500..42da3ef3dd 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -605,13 +605,11 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment ) { - COLOR4D strokeColor = getLayerColor( aSegment->GetLayer(), 0, - aSegment->ViewIsHighlighted() ); - std::deque pointsList; + COLOR4D color = getLayerColor( aSegment->GetLayer(), 0, aSegment->ViewIsHighlighted() ); m_gal->SetIsFill( false ); m_gal->SetIsStroke( true ); - m_gal->SetStrokeColor( strokeColor ); + m_gal->SetStrokeColor( color ); m_gal->SetLineWidth( aSegment->GetWidth() ); switch( aSegment->GetShape() ) @@ -636,10 +634,29 @@ void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment ) break; case S_POLYGON: + { + std::deque pointsList; + + m_gal->SetIsFill( true ); + m_gal->SetIsStroke( false ); + m_gal->SetFillColor( color ); + + m_gal->Save(); + m_gal->Translate( VECTOR2D( aSegment->GetPosition() ) ); + + MODULE* module = aSegment->GetParentModule(); + if( module ) + { + m_gal->Rotate( -module->GetOrientation() * M_PI / 1800.0 ); + } + std::copy( aSegment->GetPolyPoints().begin(), aSegment->GetPolyPoints().end(), std::back_inserter( pointsList ) ); m_gal->DrawPolygon( pointsList ); + + m_gal->Restore(); break; + } case S_CURVE: m_gal->DrawCurve( VECTOR2D( aSegment->GetStart() ), From 69f994e1b20b53d594bea4f3a793f636d2e2e9ab Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 31 Jul 2013 13:35:02 +0200 Subject: [PATCH 193/415] Added missing outline for polygon segments. --- pcbnew/pcb_painter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 42da3ef3dd..b2ff0b483b 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -652,6 +652,9 @@ void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment ) std::copy( aSegment->GetPolyPoints().begin(), aSegment->GetPolyPoints().end(), std::back_inserter( pointsList ) ); + + m_gal->SetLineWidth( aSegment->GetWidth() ); + m_gal->DrawPolyline( pointsList ); m_gal->DrawPolygon( pointsList ); m_gal->Restore(); From 1265dc633493e653dd6dd8595316062cd92fba45 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 31 Jul 2013 14:51:20 +0200 Subject: [PATCH 194/415] Added drawing of solderpaste layer for pads. --- include/layers_id_colors_and_visibility.h | 2 +- pcbnew/class_pad.cpp | 30 ++++++++++++++++------- pcbnew/class_pad.h | 2 +- pcbnew/pcb_painter.cpp | 16 ++++++++++-- 4 files changed, 37 insertions(+), 13 deletions(-) diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index 2c8f2d079a..e2304461c7 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -261,13 +261,13 @@ const LAYER_NUM GalLayerOrder[] = UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31, ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ), ITEM_GAL_LAYER( MOD_REFERENCES_VISIBLE), ITEM_GAL_LAYER( MOD_VALUES_VISIBLE ), - SILKSCREEN_N_FRONT, SOLDERPASTE_N_FRONT, ADHESIVE_N_FRONT, ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ), SOLDERMASK_N_FRONT, ITEM_GAL_LAYER( LAYER_16_NETNAMES_VISIBLE ), LAYER_N_FRONT, + SILKSCREEN_N_FRONT, SOLDERPASTE_N_FRONT, ADHESIVE_N_FRONT, ITEM_GAL_LAYER( LAYER_15_NETNAMES_VISIBLE ), LAYER_N_15, ITEM_GAL_LAYER( LAYER_14_NETNAMES_VISIBLE ), LAYER_N_14, ITEM_GAL_LAYER( LAYER_13_NETNAMES_VISIBLE ), LAYER_N_13, diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 69e4ae4e53..2a62d6d901 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -424,7 +424,7 @@ int D_PAD::GetSolderMaskMargin() const } -wxSize D_PAD::GetSolderPasteMargin() +wxSize D_PAD::GetSolderPasteMargin() const { int margin = m_LocalSolderPasteMargin; double mratio = m_LocalSolderPasteMarginRatio; @@ -759,18 +759,22 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const aLayers[aCount++] = ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ); aLayers[aCount++] = SOLDERMASK_N_FRONT; aLayers[aCount++] = SOLDERMASK_N_BACK; + aLayers[aCount++] = SOLDERPASTE_N_FRONT; + aLayers[aCount++] = SOLDERPASTE_N_BACK; } else if( IsOnLayer( LAYER_N_FRONT ) ) { aLayers[aCount++] = ITEM_GAL_LAYER( PAD_FR_VISIBLE ); aLayers[aCount++] = ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ); aLayers[aCount++] = SOLDERMASK_N_FRONT; + aLayers[aCount++] = SOLDERPASTE_N_FRONT; } else if( IsOnLayer( LAYER_N_BACK ) ) { aLayers[aCount++] = ITEM_GAL_LAYER( PAD_BK_VISIBLE ); aLayers[aCount++] = ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ); aLayers[aCount++] = SOLDERMASK_N_BACK; + aLayers[aCount++] = SOLDERPASTE_N_BACK; } #ifdef __WXDEBUG__ else // Should not occur @@ -788,13 +792,16 @@ void D_PAD::ViewGetRequiredLayers( int aLayers[], int& aCount ) const // Remove pad description layer & soldermask from the required layers group if( IsOnLayer( LAYER_N_FRONT ) && IsOnLayer( LAYER_N_BACK ) ) { - // Multilayer pads have 2 soldermask layers and one description layer - aCount -= 3; + // Multilayer pads have 2 soldermask layers (front and back), 2 solder paste layer + // (front and back) and one description layer that do not have to be enabled in order to + // display a pad. + aCount -= 5; } else { - // Rest of pads have one soldermask layer and one description layer - aCount -= 2; + // Rest of pads have one soldermask layer, one solder paste layer and one description layer + // that are not necessary for pad to be displayed. + aCount -= 3; } } @@ -815,9 +822,14 @@ unsigned int D_PAD::ViewGetLOD( int aLayer ) const const BOX2I D_PAD::ViewBBox() const { // Bounding box includes soldermask too - int solderMaskMargin = GetSolderMaskMargin(); - EDA_RECT bbox = GetBoundingBox(); + int solderMaskMargin = GetSolderMaskMargin(); + VECTOR2I solderPasteMargin = VECTOR2D( GetSolderPasteMargin() ); + EDA_RECT bbox = GetBoundingBox(); - return BOX2I( VECTOR2I( bbox.GetOrigin() ) - solderMaskMargin, - VECTOR2I( bbox.GetSize() ) + 2 * solderMaskMargin ); + // Look for the biggest possible bounding box + int xMargin = std::max( solderMaskMargin, solderPasteMargin.x ); + int yMargin = std::max( solderMaskMargin, solderPasteMargin.y ); + + return BOX2I( VECTOR2I( bbox.GetOrigin() ) - VECTOR2I( xMargin, yMargin ), + VECTOR2I( bbox.GetSize() ) + VECTOR2I( 2 * xMargin, 2 * yMargin ) ); } diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index e5eeaa297e..f72705e9fc 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -259,7 +259,7 @@ public: * 2 - if null, the parent footprint value * 1 - if null, the global value */ - wxSize GetSolderPasteMargin(); + wxSize GetSolderPasteMargin() const; void SetZoneConnection( ZoneConnection aType ) { m_ZoneConnection = aType; } ZoneConnection GetZoneConnection() const; diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index b2ff0b483b..cdccda1f82 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -525,9 +525,21 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) else if( aLayer == SOLDERMASK_N_FRONT || aLayer == SOLDERMASK_N_BACK ) { // Drawing soldermask + int soldermaskMargin = aPad->GetSolderMaskMargin(); + m_gal->Translate( VECTOR2D( aPad->GetOffset() ) ); - size = VECTOR2D( aPad->GetSize().x / 2.0 + aPad->GetSolderMaskMargin(), - aPad->GetSize().y / 2.0 + aPad->GetSolderMaskMargin() ); + size = VECTOR2D( aPad->GetSize().x / 2.0 + soldermaskMargin, + aPad->GetSize().y / 2.0 + soldermaskMargin ); + shape = aPad->GetShape(); + } + else if( aLayer == SOLDERPASTE_N_FRONT || aLayer == SOLDERPASTE_N_BACK ) + { + // Drawing solderpaste + int solderpasteMargin = aPad->GetLocalSolderPasteMargin(); + + m_gal->Translate( VECTOR2D( aPad->GetOffset() ) ); + size = VECTOR2D( aPad->GetSize().x / 2.0 + solderpasteMargin, + aPad->GetSize().y / 2.0 + solderpasteMargin ); shape = aPad->GetShape(); } else From f44a64a7050d680af8af294284cdfe1ff62125e9 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 2 Aug 2013 10:34:23 +0200 Subject: [PATCH 195/415] Modified way of handling OpenGL framebuffer errors. Now it is more verbose and the status is checked at the right moment (previously it was fine with Linux, but on Windows it showed errors). --- common/gal/opengl/opengl_compositor.cpp | 59 +++++++++++++++++++++---- 1 file changed, 51 insertions(+), 8 deletions(-) diff --git a/common/gal/opengl/opengl_compositor.cpp b/common/gal/opengl/opengl_compositor.cpp index 91b757cb98..9357d8dbbe 100644 --- a/common/gal/opengl/opengl_compositor.cpp +++ b/common/gal/opengl/opengl_compositor.cpp @@ -73,14 +73,6 @@ void OPENGL_COMPOSITOR::Initialize() glFramebufferRenderbuffer( GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, m_depthBuffer ); - // Check the status, exit if the framebuffer can't be created - GLenum status = glCheckFramebufferStatus( GL_FRAMEBUFFER ); - - if( status != GL_FRAMEBUFFER_COMPLETE ) - { - wxLogFatalError( wxT( "Cannot create the framebuffer." ) ); - } - // Unbind the framebuffer, so by default all the rendering goes directly to the display glBindFramebuffer( GL_FRAMEBUFFER, 0 ); m_currentFbo = 0; @@ -125,6 +117,57 @@ unsigned int OPENGL_COMPOSITOR::GetBuffer() glBindFramebuffer( GL_FRAMEBUFFER, m_framebuffer ); m_currentFbo = m_framebuffer; glFramebufferTexture2D( GL_FRAMEBUFFER, attachmentPoint, GL_TEXTURE_2D, textureTarget, 0 ); + + // Check the status, exit if the framebuffer can't be created + GLenum status = glCheckFramebufferStatus( GL_FRAMEBUFFER ); + + if( status != GL_FRAMEBUFFER_COMPLETE ) + { + switch( status ) + { + case GL_FRAMEBUFFER_UNDEFINED: + wxLogFatalError( wxT( "Target is the default framebuffer, " + "but the default framebuffer does not exist." ) ); + break; + + case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT: + wxLogFatalError( wxT( "Cannot create the framebuffer." ) ); + break; + + case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: + wxLogFatalError( wxT( "The framebuffer attachment points are incomplete." ) ); + break; + + case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER: + wxLogFatalError( wxT( "The framebuffer does not have at least " + "one image attached to it." ) ); + break; + + case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER: + wxLogFatalError( wxT( "The framebuffer read buffer is incomplete." ) ); + break; + + case GL_FRAMEBUFFER_UNSUPPORTED: + wxLogFatalError( wxT( "The combination of internal formats of the attached images " + "violates an implementation-dependent set of restrictions." ) ); + break; + + case GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: + wxLogFatalError( wxT( "GL_RENDERBUFFER_SAMPLES is not the same " + "for all attached renderbuffers" ) ); + break; + + case GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS: + wxLogFatalError( wxT( "Framebuffer incomplete layer targets errors." ) ); + break; + + default: + wxLogFatalError( wxT( "Cannot create the framebuffer." ) ); + break; + } + } + + ClearBuffer(); glBindFramebuffer( GL_FRAMEBUFFER, 0 ); m_currentFbo = 0; From 7ac5a172fad37ed8c062743d771f5d8c55c150e9 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 2 Aug 2013 10:35:58 +0200 Subject: [PATCH 196/415] Modified usage of wxStandardPaths to make it compatible with newer versions of wxWidgets. --- common/edaappl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/edaappl.cpp b/common/edaappl.cpp index 25f3f1d2ca..12933f0296 100644 --- a/common/edaappl.cpp +++ b/common/edaappl.cpp @@ -454,7 +454,7 @@ bool EDA_APP::SetBinDir() // Linux and Unix #elif defined(__UNIX__) - m_BinDir = wxStandardPaths().GetExecutablePath(); + m_BinDir = wxStandardPaths::Get().GetExecutablePath(); #else m_BinDir = argv[0]; #endif // __UNIX__ From d7857dd026c434f70cb46e8b13c2205df482e828 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 2 Aug 2013 10:55:40 +0200 Subject: [PATCH 197/415] Fixed the tesselator, so now it works with Windows. --- common/gal/opengl/opengl_gal.cpp | 48 ++++++++++------------------ include/gal/opengl/opengl_gal.h | 55 ++++++++++---------------------- 2 files changed, 33 insertions(+), 70 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 640a1b4ae9..358a7add09 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -37,10 +37,6 @@ #include -#ifndef CALLBACK -#define CALLBACK -#endif - using namespace KiGfx; // Prototypes @@ -92,6 +88,10 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, // Tesselator initialization tesselator = gluNewTess(); InitTesselatorCallbacks( tesselator ); + if( tesselator == NULL ) + { + wxLogFatalError( wxT( "Could not create the tesselator" ) ); + } gluTessProperty( tesselator, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_POSITIVE ); } @@ -233,7 +233,7 @@ void OPENGL_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoin // Line caps drawFilledSemiCircle( aStartPoint, lineWidth / 2, lineAngle + M_PI / 2 ); - drawFilledSemiCircle( aEndPoint, lineWidth / 2, lineAngle - M_PI / 2 ); + drawFilledSemiCircle( aEndPoint, lineWidth / 2, lineAngle - M_PI / 2 ); } @@ -471,41 +471,25 @@ void OPENGL_GAL::DrawPolygon( const std::deque& aPointList ) // for this purpose the GLU standard functions are used currentManager->Shader( SHADER_NONE ); - typedef std::vector OGLPOINTS; - - // Do only one heap allocation, can do because we know size in advance. - // std::vector is then fastest - OGLPOINTS vertexList( aPointList.size(), OGLPOINT( "fastest" ) ); - - glNormal3d( 0.0, 0.0, 1.0 ); - currentManager->Color( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); - - glShadeModel( GL_FLAT ); - TessParams params = { currentManager, tessIntersects }; gluTessBeginPolygon( tesselator, ¶ms ); gluTessBeginContour( tesselator ); - // use operator=( const POINTS& ) - copy( aPointList.begin(), aPointList.end(), vertexList.begin() ); - - for( OGLPOINTS::iterator it = vertexList.begin(); it != vertexList.end(); it++ ) + boost::shared_array points( new GLdouble[3 * aPointList.size()] ); + int v = 0; + for( std::deque::const_iterator it = aPointList.begin(); it != aPointList.end(); it++ ) { - it->z = layerDepth; - gluTessVertex( tesselator, &it->x, &it->x ); + points[v] = it->x; + points[v + 1] = it->y; + points[v + 2] = layerDepth; + gluTessVertex( tesselator, &points[v], &points[v] ); + v += 3; } gluTessEndContour( tesselator ); gluTessEndPolygon( tesselator ); // Free allocated intersecting points - std::vector::iterator it, it_end; - - for( it = tessIntersects.begin(), it_end = tessIntersects.end(); it < it_end; ++it ) - { - delete[] *it; - } - tessIntersects.clear(); // vertexList destroyed here @@ -1028,7 +1012,7 @@ void CALLBACK CombineCallback( GLdouble coords[3], OPENGL_GAL::TessParams* param = static_cast( aData ); // Save the pointer so we can delete it later - param->intersectPoints.push_back( vertex ); + param->intersectPoints.push_back( boost::shared_array( vertex ) ); memcpy( vertex, coords, 3 * sizeof(GLdouble) ); @@ -1036,7 +1020,7 @@ void CALLBACK CombineCallback( GLdouble coords[3], } -void CALLBACK EdgeCallback() +void CALLBACK EdgeCallback( GLboolean aEdgeFlag ) { // This callback is needed to force GLU tesselator to use triangles only } @@ -1056,5 +1040,5 @@ void InitTesselatorCallbacks( GLUtesselator* aTesselator ) gluTessCallback( aTesselator, GLU_TESS_VERTEX_DATA, ( void (CALLBACK*)() )VertexCallback ); gluTessCallback( aTesselator, GLU_TESS_COMBINE_DATA, ( void (CALLBACK*)() )CombineCallback ); gluTessCallback( aTesselator, GLU_TESS_EDGE_FLAG, ( void (CALLBACK*)() )EdgeCallback ); - gluTessCallback( aTesselator, GLU_TESS_ERROR_DATA, ( void (CALLBACK*)() )ErrorCallback ); + gluTessCallback( aTesselator, GLU_TESS_ERROR, ( void (CALLBACK*)() )ErrorCallback ); } diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 402f8fc133..4291090520 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -47,11 +47,15 @@ #include #include #include +#include #include #include #include +#ifndef CALLBACK +#define CALLBACK +#endif namespace KiGfx { @@ -244,8 +248,10 @@ public: ///< Parameters passed to the GLU tesselator typedef struct { - VERTEX_MANAGER* vboManager; ///< VERTEX_ITEM for storing new vertices - std::vector& intersectPoints; ///< Intersect points, that have to be freed + /// Manager used for storing new vertices + VERTEX_MANAGER* vboManager; + /// Intersect points, that have to be freed after tessellation + std::deque< boost::shared_array >& intersectPoints; } TessParams; protected: @@ -258,11 +264,11 @@ private: static const int CIRCLE_POINTS = 64; ///< The number of points for circle approximation static const int CURVE_POINTS = 32; ///< The number of points for curve approximation - wxClientDC* clientDC; ///< Drawing context - wxGLContext* glContext; ///< OpenGL context of wxWidgets - wxWindow* parentWindow; ///< Parent window - wxEvtHandler* mouseListener; - wxEvtHandler* paintListener; + wxClientDC* clientDC; ///< Drawing context + wxGLContext* glContext; ///< OpenGL context of wxWidgets + wxWindow* parentWindow; ///< Parent window + wxEvtHandler* mouseListener; + wxEvtHandler* paintListener; // Vertex buffer objects related fields typedef std::map< unsigned int, boost::shared_ptr > GroupsMap; @@ -294,37 +300,10 @@ private: bool isGrouping; ///< Was a group started? // Polygon tesselation - GLUtesselator* tesselator; ///< Pointer to the tesselator - std::vector tessIntersects; ///< Storage of intersecting points - - // Structure used for tesselation of polygons - struct OGLPOINT - { - OGLPOINT() : - x( 0.0 ), y( 0.0 ), z( 0.0 ) - {} - - OGLPOINT( const char* fastest ) - { - // do nothing for fastest speed, and keep inline - } - - OGLPOINT( const VECTOR2D& aPoint ) : - x( aPoint.x ), y( aPoint.y ), z( 0.0 ) - {} - - OGLPOINT& operator=( const VECTOR2D& aPoint ) - { - x = aPoint.x; - y = aPoint.y; - z = 0.0; - return *this; - } - - GLdouble x; - GLdouble y; - GLdouble z; - }; + /// The tessellator + GLUtesselator* tesselator; + /// Storage for intersecting points + std::deque< boost::shared_array > tessIntersects; /** * @brief Draw a quad for the line. From d26b94db61e133f19266cad11199f9fea9f43996 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 2 Aug 2013 16:45:30 +0200 Subject: [PATCH 198/415] Added missing header. --- pagelayout_editor/page_layout_writer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pagelayout_editor/page_layout_writer.cpp b/pagelayout_editor/page_layout_writer.cpp index 4e888c3fe1..2e13c2b0a9 100644 --- a/pagelayout_editor/page_layout_writer.cpp +++ b/pagelayout_editor/page_layout_writer.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include From 2d09237bd767ccd35abb8adb2cefb4e9aabbbe26 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 2 Aug 2013 16:46:53 +0200 Subject: [PATCH 199/415] Added core tool framework files + boost::context assembly stuff (initial, very buggy and unfinished work). --- common/CMakeLists.txt | 14 +- common/system/fcontext.s | 20 ++ common/system/jump_i386_pe_gas.S | 57 ++++ common/system/jump_i386_sysv_elf_gas.S | 72 +++++ common/system/jump_x86_64_sysv_elf_gas.S | 82 +++++ common/system/make_i386_pe_gas.S | 54 ++++ common/system/make_i386_sysv_elf_gas.S | 77 +++++ common/system/make_x86_64_sysv_elf_gas.S | 74 +++++ common/tool/context_menu.cpp | 71 +++++ common/tool/tool_base.cpp | 22 ++ common/tool/tool_dispatcher.cpp | 224 ++++++++++++++ common/tool/tool_event.cpp | 101 ++++++ common/tool/tool_interactive.cpp | 41 +++ common/tool/tool_manager.cpp | 193 ++++++++++++ include/tool/context_menu.h | 78 +++++ include/tool/coroutine.h | 240 +++++++++++++++ include/tool/delegate.h | 99 ++++++ include/tool/tool_base.h | 147 +++++++++ include/tool/tool_dispatcher.h | 90 ++++++ include/tool/tool_event.h | 374 +++++++++++++++++++++++ include/tool/tool_interactive.h | 115 +++++++ include/tool/tool_manager.h | 174 +++++++++++ 22 files changed, 2418 insertions(+), 1 deletion(-) create mode 100644 common/system/fcontext.s create mode 100644 common/system/jump_i386_pe_gas.S create mode 100644 common/system/jump_i386_sysv_elf_gas.S create mode 100644 common/system/jump_x86_64_sysv_elf_gas.S create mode 100644 common/system/make_i386_pe_gas.S create mode 100644 common/system/make_i386_sysv_elf_gas.S create mode 100644 common/system/make_x86_64_sysv_elf_gas.S create mode 100644 common/tool/context_menu.cpp create mode 100644 common/tool/tool_base.cpp create mode 100644 common/tool/tool_dispatcher.cpp create mode 100644 common/tool/tool_event.cpp create mode 100644 common/tool/tool_interactive.cpp create mode 100644 common/tool/tool_manager.cpp create mode 100644 include/tool/context_menu.h create mode 100644 include/tool/coroutine.h create mode 100644 include/tool/delegate.h create mode 100644 include/tool/tool_base.h create mode 100644 include/tool/tool_dispatcher.h create mode 100644 include/tool/tool_event.h create mode 100644 include/tool/tool_interactive.h create mode 100644 include/tool/tool_manager.h diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 9b7c285168..25357990ca 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -144,11 +144,23 @@ set(COMMON_SRCS zoom.cpp ) +enable_language(C CXX ASM) +set_source_files_properties(system/fcontext.s PROPERTIES COMPILE_FLAGS "-x assembler-with-cpp") + set(COMMON_SRCS ${COMMON_SRCS} view/view.cpp view/view_item.cpp - ) + + system/fcontext.s + + tool/tool_base.cpp + tool/tool_manager.cpp + tool/tool_dispatcher.cpp + tool/tool_event.cpp + tool/tool_interactive.cpp + tool/context_menu.cpp + ) add_library(common STATIC ${COMMON_SRCS}) diff --git a/common/system/fcontext.s b/common/system/fcontext.s new file mode 100644 index 0000000000..71055cc9a2 --- /dev/null +++ b/common/system/fcontext.s @@ -0,0 +1,20 @@ +/* + Boost::Context assembly wrapper - done to avoid compiling the whole boost binary library + which may be unpleasant, in particular under Windows (we don't support VC++, while boost::context + does not support mingw */ + + +#if __i386__ + #include "jump_i386_sysv_elf_gas.S" + #include "make_i386_sysv_elf_gas.S" + + #ifdef __WIN32__ + #include "jump_i386_pe_gas.S" + #include "make_i386_pe_gas.S" + #endif + +#elif __x86_64__ + #include "jump_x86_64_sysv_elf_gas.S" + #include "make_x86_64_sysv_elf_gas.S" +#endif + diff --git a/common/system/jump_i386_pe_gas.S b/common/system/jump_i386_pe_gas.S new file mode 100644 index 0000000000..39db0dec1f --- /dev/null +++ b/common/system/jump_i386_pe_gas.S @@ -0,0 +1,57 @@ +/* Copyright Oliver Kowalke 2009. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +*/ + +.text +.globl jump_fcontext +.align 2 +.type jump_fcontext,@function + +jump_fcontext: + mov 0x4(%esp),%ecx + mov %edi,(%ecx) + mov %esi,0x4(%ecx) + mov %ebx,0x8(%ecx) + mov %ebp,0xc(%ecx) + mov %fs:0x18,%edx + mov (%edx),%eax + mov %eax,0x24(%ecx) + mov 0x4(%edx),%eax + mov %eax,0x18(%ecx) + mov 0x8(%edx),%eax + mov %eax,0x20(%ecx) + mov 0x10(%edx),%eax + mov %eax,0x28(%ecx) + lea 0x4(%esp),%eax + mov %eax,0x10(%ecx) + mov (%esp),%eax + mov %eax,0x14(%ecx) + mov 0x8(%esp),%edx + mov (%edx),%edi + mov 0x4(%edx),%esi + mov 0x8(%edx),%ebx + mov 0xc(%edx),%ebp + mov 0x10(%esp),%eax + test %eax,%eax + je jump_fcontext+0x5f + stmxcsr 0x2c(%ecx) + fnstcw 0x30(%ecx) + ldmxcsr 0x2c(%edx) + fldcw 0x30(%edx) + mov %edx,%ecx + mov %fs:0x18,%edx + mov 0x24(%ecx),%eax + mov %eax,(%edx) + mov 0x18(%ecx),%eax + mov %eax,0x4(%edx) + mov 0x20(%ecx),%eax + mov %eax,0x8(%edx) + mov 0x28(%ecx),%eax + mov %eax,0x10(%edx) + mov 0xc(%esp),%eax + mov 0x10(%ecx),%esp + mov %eax,0x4(%esp) + mov 0x14(%ecx),%ecx + jmp *%ecx diff --git a/common/system/jump_i386_sysv_elf_gas.S b/common/system/jump_i386_sysv_elf_gas.S new file mode 100644 index 0000000000..7b50dfe181 --- /dev/null +++ b/common/system/jump_i386_sysv_elf_gas.S @@ -0,0 +1,72 @@ +/* + Copyright Oliver Kowalke 2009. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +*/ + +/******************************************************************** + * * + * -------------------------------------------------------------- * + * | 0 | 1 | 2 | 3 | 4 | 5 | * + * -------------------------------------------------------------- * + * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | * + * -------------------------------------------------------------- * + * | EDI | ESI | EBX | EBP | ESP | EIP | * + * -------------------------------------------------------------- * + * -------------------------------------------------------------- * + * | 6 | 7 | | * + * -------------------------------------------------------------- * + * | 0x18 | 0x1c | | * + * -------------------------------------------------------------- * + * | sp | size | | * + * -------------------------------------------------------------- * + * -------------------------------------------------------------- * + * | 8 | 9 | | * + * -------------------------------------------------------------- * + * | 0x20 | 0x24 | | * + * -------------------------------------------------------------- * + * | fc_mxcsr|fc_x87_cw| | * + * -------------------------------------------------------------- * + * * + * *****************************************************************/ + +.text +.globl jump_fcontext +.align 2 +.type jump_fcontext,@function +jump_fcontext: + movl 0x4(%esp), %ecx /* load address of the first fcontext_t arg */ + movl %edi, (%ecx) /* save EDI */ + movl %esi, 0x4(%ecx) /* save ESI */ + movl %ebx, 0x8(%ecx) /* save EBX */ + movl %ebp, 0xc(%ecx) /* save EBP */ + + leal 0x4(%esp), %eax /* exclude the return address */ + movl %eax, 0x10(%ecx) /* save as stack pointer */ + movl (%esp), %eax /* load return address */ + movl %eax, 0x14(%ecx) /* save return address */ + + movl 0x8(%esp), %edx /* load address of the second fcontext_t arg */ + movl (%edx), %edi /* restore EDI */ + movl 0x4(%edx), %esi /* restore ESI */ + movl 0x8(%edx), %ebx /* restore EBX */ + movl 0xc(%edx), %ebp /* restore EBP */ + + movl 0x10(%esp), %eax /* check if fpu enve preserving was requested */ + test %eax, %eax + je 1f + + stmxcsr 0x20(%ecx) /* save MMX control and status word */ + fnstcw 0x24(%ecx) /* save x87 control word */ + ldmxcsr 0x20(%edx) /* restore MMX control and status word */ + fldcw 0x24(%edx) /* restore x87 control word */ +1: + movl 0xc(%esp), %eax /* use third arg as return value after jump */ + + movl 0x10(%edx), %esp /* restore ESP */ + movl %eax, 0x4(%esp) /* use third arg as first arg in context function */ + movl 0x14(%edx), %edx /* fetch the address to return to */ + + jmp *%edx /* indirect jump to context */ +.size jump_fcontext,.-jump_fcontext diff --git a/common/system/jump_x86_64_sysv_elf_gas.S b/common/system/jump_x86_64_sysv_elf_gas.S new file mode 100644 index 0000000000..40b65d7db6 --- /dev/null +++ b/common/system/jump_x86_64_sysv_elf_gas.S @@ -0,0 +1,82 @@ +/* + Copyright Oliver Kowalke 2009. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +*/ + +/**************************************************************************************** + * * + * ---------------------------------------------------------------------------------- * + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * + * ---------------------------------------------------------------------------------- * + * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * + * ---------------------------------------------------------------------------------- * + * | RBX | R12 | R13 | R14 | * + * ---------------------------------------------------------------------------------- * + * ---------------------------------------------------------------------------------- * + * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * + * ---------------------------------------------------------------------------------- * + * | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | * + * ---------------------------------------------------------------------------------- * + * | R15 | RBP | RSP | RIP | * + * ---------------------------------------------------------------------------------- * + * ---------------------------------------------------------------------------------- * + * | 16 | 17 | 18 | 19 | | * + * ---------------------------------------------------------------------------------- * + * | 0x40 | 0x44 | 0x48 | 0x4c | | * + * ---------------------------------------------------------------------------------- * + * | sp | size | | * + * ---------------------------------------------------------------------------------- * + * ---------------------------------------------------------------------------------- * + * | 20 | 21 | | * + * ---------------------------------------------------------------------------------- * + * | 0x50 | 0x54 | | * + * ---------------------------------------------------------------------------------- * + * | fc_mxcsr|fc_x87_cw| | * + * ---------------------------------------------------------------------------------- * + * * + * **************************************************************************************/ + +.text +.globl jump_fcontext +.type jump_fcontext,@function +.align 16 +jump_fcontext: + movq %rbx, (%rdi) /* save RBX */ + movq %r12, 0x8(%rdi) /* save R12 */ + movq %r13, 0x10(%rdi) /* save R13 */ + movq %r14, 0x18(%rdi) /* save R14 */ + movq %r15, 0x20(%rdi) /* save R15 */ + movq %rbp, 0x28(%rdi) /* save RBP */ + + cmp $0, %rcx + je 1f + + stmxcsr 0x50(%rdi) /* save MMX control and status word */ + fnstcw 0x54(%rdi) /* save x87 control word */ + + ldmxcsr 0x50(%rsi) /* restore MMX control and status word */ + fldcw 0x54(%rsi) /* restore x87 control word */ +1: + + leaq 0x8(%rsp), %rax /* exclude the return address and save as stack pointer */ + movq %rax, 0x30(%rdi) /* save as stack pointer */ + movq (%rsp), %rax /* save return address */ + movq %rax, 0x38(%rdi) /* save return address as RIP */ + + movq (%rsi), %rbx /* restore RBX */ + movq 0x8(%rsi), %r12 /* restore R12 */ + movq 0x10(%rsi), %r13 /* restore R13 */ + movq 0x18(%rsi), %r14 /* restore R14 */ + movq 0x20(%rsi), %r15 /* restore R15 */ + movq 0x28(%rsi), %rbp /* restore RBP */ + + movq 0x30(%rsi), %rsp /* restore RSP */ + movq 0x38(%rsi), %rcx /* fetch the address to return to */ + + movq %rdx, %rax /* use third arg as return value after jump */ + movq %rdx, %rdi /* use third arg as first arg in context function */ + + jmp *%rcx /* indirect jump to context */ +.size jump_fcontext,.-jump_fcontext diff --git a/common/system/make_i386_pe_gas.S b/common/system/make_i386_pe_gas.S new file mode 100644 index 0000000000..297f8bf54a --- /dev/null +++ b/common/system/make_i386_pe_gas.S @@ -0,0 +1,54 @@ +/* Copyright Oliver Kowalke 2009. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +*/ + +.text +.globl make_fcontext +.align 2 +.type make_fcontext,@function + +make_fcontext: + mov 0x4(%esp),%eax + lea -0x34(%eax),%eax + and $0xfffffff0,%eax + mov 0x4(%esp),%ecx + mov %ecx,0x18(%eax) + mov 0x8(%esp),%edx + mov %edx,0x1c(%eax) + neg %edx + lea (%edx,%ecx,1),%ecx + mov %ecx,0x20(%eax) + mov 0xc(%esp),%ecx + mov %ecx,0x14(%eax) + stmxcsr 0x2c(%eax) + fnstcw 0x30(%eax) + lea -0x1c(%eax),%edx + mov %edx,0x10(%eax) + mov $0x0,%ecx + mov %ecx,(%edx) + mov %fs:0x18,%ecx + mov (%ecx),%edx + inc %edx + je make_fcontext+0x4c // <_make_fcontext+0x4c> + dec %edx + xchg %edx,%ecx + jmp make_fcontext+0x42 // <_make_fcontext+0x42> + mov 0x4(%ecx),%ecx + mov 0x10(%eax),%edx + mov %ecx,0x18(%edx) + mov $0xffffffff,%ecx + mov %ecx,0x14(%edx) + lea 0x14(%edx),%ecx + mov %ecx,0x24(%eax) + ret + +finish: + xor %eax,%eax + mov %eax,(%esp) + call finish+0xa + hlt + +.size make_fcontext,.-make_fcontext + diff --git a/common/system/make_i386_sysv_elf_gas.S b/common/system/make_i386_sysv_elf_gas.S new file mode 100644 index 0000000000..ef0e1b4086 --- /dev/null +++ b/common/system/make_i386_sysv_elf_gas.S @@ -0,0 +1,77 @@ +/* + Copyright Oliver Kowalke 2009. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +*/ + +/******************************************************************** + * * + * -------------------------------------------------------------- * + * | 0 | 1 | 2 | 3 | 4 | 5 | * + * -------------------------------------------------------------- * + * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | * + * -------------------------------------------------------------- * + * | EDI | ESI | EBX | EBP | ESP | EIP | * + * -------------------------------------------------------------- * + * -------------------------------------------------------------- * + * | 6 | 7 | | * + * -------------------------------------------------------------- * + * | 0x18 | 0x1c | | * + * -------------------------------------------------------------- * + * | sp | size | | * + * -------------------------------------------------------------- * + * -------------------------------------------------------------- * + * | 8 | 9 | | * + * -------------------------------------------------------------- * + * | 0x20 | 0x24 | | * + * -------------------------------------------------------------- * + * | fc_mxcsr|fc_x87_cw| | * + * -------------------------------------------------------------- * + * * + * *****************************************************************/ + +.text +.globl make_fcontext +.align 2 +.type make_fcontext,@function +make_fcontext: + movl 0x4(%esp), %eax /* load 1. arg of make_fcontext, pointer to context stack (base) */ + leal -0x28(%eax), %eax /* reserve space for fcontext_t at top of context stack */ + + /* shift address in EAX to lower 16 byte boundary */ + /* == pointer to fcontext_t and address of context stack */ + andl $-16, %eax + + movl 0x4(%esp), %edx /* load 1. arg of make_fcontext, pointer to context stack (base) */ + movl %edx, 0x18(%eax) /* save address of context stack (base) in fcontext_t */ + movl 0x8(%esp), %edx /* load 2. arg of make_fcontext, context stack size */ + movl %edx, 0x1c(%eax) /* save stack size in fcontext_t */ + movl 0xc(%esp), %edx /* load 3. arg of make_fcontext, pointer to context function */ + movl %edx, 0x14(%eax) /* save address of context function in fcontext_t */ + + stmxcsr 0x20(%eax) /* save MMX control and status word */ + fnstcw 0x24(%eax) /* save x87 control word */ + + leal -0x8(%eax), %edx /* reserve space for the last frame on context stack; (ESP - 0x4) % 16 == 0 */ + movl %edx, 0x10(%eax) /* save address in EDX as stack pointer for context function */ + + call 1f +1: popl %ecx /* address of label 2 */ + addl $finish-1b, %ecx /* compute abs address of label finish */ + movl %ecx, (%edx) /* save address of finish as return address for context functions */ + /* entered after context function returns */ + + ret + +finish: + /* ESP points to same address as ESP on entry of context function + 0x4 */ + call 2f +2: popl %ebx /* address of label 3 */ + addl $_GLOBAL_OFFSET_TABLE_+[.-2b], %ebx /* compute address of GOT and store it in EBX */ + + xorl %eax, %eax + movl %eax, (%esp) /* exit code is zero */ + call _exit@PLT /* exit application */ + hlt +.size make_fcontext,.-make_fcontext diff --git a/common/system/make_x86_64_sysv_elf_gas.S b/common/system/make_x86_64_sysv_elf_gas.S new file mode 100644 index 0000000000..ba040d0519 --- /dev/null +++ b/common/system/make_x86_64_sysv_elf_gas.S @@ -0,0 +1,74 @@ +/* + Copyright Oliver Kowalke 2009. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +*/ + +/**************************************************************************************** + * * + * ---------------------------------------------------------------------------------- * + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * + * ---------------------------------------------------------------------------------- * + * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * + * ---------------------------------------------------------------------------------- * + * | RBX | R12 | R13 | R14 | * + * ---------------------------------------------------------------------------------- * + * ---------------------------------------------------------------------------------- * + * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * + * ---------------------------------------------------------------------------------- * + * | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | * + * ---------------------------------------------------------------------------------- * + * | R15 | RBP | RSP | RIP | * + * ---------------------------------------------------------------------------------- * + * ---------------------------------------------------------------------------------- * + * | 16 | 17 | 18 | 19 | | * + * ---------------------------------------------------------------------------------- * + * | 0x40 | 0x44 | 0x48 | 0x4c | | * + * ---------------------------------------------------------------------------------- * + * | sp | size | | * + * ---------------------------------------------------------------------------------- * + * ---------------------------------------------------------------------------------- * + * | 20 | 21 | | * + * ---------------------------------------------------------------------------------- * + * | 0x50 | 0x54 | | * + * ---------------------------------------------------------------------------------- * + * | fc_mxcsr|fc_x87_cw| | * + * ---------------------------------------------------------------------------------- * + * * + * **************************************************************************************/ + +.text +.globl make_fcontext +.type make_fcontext,@function +.align 16 +make_fcontext: + leaq -0x58(%rdi), %rax /* reserve space for fcontext_t at top of context stack */ + + /* shift address in RAX to lower 16 byte boundary */ + /* == pointer to fcontext_t and address of context stack */ + andq $-16, %rax + + movq %rdi, 0x40(%rax) /* save address of context stack pointer (base) in fcontext_t */ + movq %rsi, 0x48(%rax) /* save context stack size in fcontext_t */ + movq %rdx, 0x38(%rax) /* save address of context function in fcontext_t */ + + stmxcsr 0x50(%rax) /* save MMX control and status word */ + fnstcw 0x54(%rax) /* save x87 control word */ + + leaq -0x8(%rax), %rdx /* reserve space for the return address on context stack, (RSP - 0x8) % 16 == 0 */ + movq %rdx, 0x30(%rax) /* save address in RDX as stack pointer for context function */ + + leaq finish(%rip), %rcx /* compute abs address of label finish */ + movq %rcx, (%rdx) /* save address of finish as return address for context function */ + /* entered after context function returns */ + + ret /* return pointer to fcontext_t placed on context stack */ + +finish: + /* RSP points to same address as RSP on entry of context function + 0x8 */ + xorq %rdi, %rdi /* exit code is zero */ + call _exit@PLT /* exit application */ + hlt +.size make_fcontext,.-make_fcontext + diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp new file mode 100644 index 0000000000..2649b2056e --- /dev/null +++ b/common/tool/context_menu.cpp @@ -0,0 +1,71 @@ +#include +#include + +#include +#include +#include + +#include + +class CONTEXT_MENU::CMEventHandler : public wxEvtHandler +{ +public: + CMEventHandler( CONTEXT_MENU *aMenu ): + m_menu(aMenu) {}; + + void onEvent( wxEvent & aEvent ) + { + TOOL_EVENT evt; + wxEventType type = aEvent.GetEventType(); + + if(type == wxEVT_MENU_HIGHLIGHT) + evt = TOOL_EVENT (TC_Command, TA_ContextMenuUpdate, aEvent.GetId() ); + else if (type == wxEVT_COMMAND_MENU_SELECTED) + evt = TOOL_EVENT (TC_Command, TA_ContextMenuChoice, aEvent.GetId() ); + + m_menu->m_tool->GetManager()->ProcessEvent(evt); + } + +private: + CONTEXT_MENU *m_menu; +}; + + +CONTEXT_MENU::CONTEXT_MENU ( ) +{ + m_tool = NULL; + m_menu = new wxMenu(); + m_handler = new CMEventHandler(this); + m_menu->Connect (wxEVT_MENU_HIGHLIGHT, wxEventHandler( CMEventHandler::onEvent ), NULL, m_handler ); + m_menu->Connect (wxEVT_COMMAND_MENU_SELECTED, wxEventHandler( CMEventHandler::onEvent ), NULL, m_handler ); + m_titleSet = false; +} + +CONTEXT_MENU::~CONTEXT_MENU ( ) +{ + delete m_menu; + delete m_handler; +} + +void CONTEXT_MENU::SetTitle( const wxString& aTitle ) +{ + if(m_titleSet) + { + m_menu->Delete(m_menu->FindItemByPosition(0)); // fixme: this is LAME! + m_menu->Delete(m_menu->FindItemByPosition(0)); + } + + m_menu->InsertSeparator(0); + m_menu->Insert(0, new wxMenuItem( m_menu, -1, aTitle, wxEmptyString, wxITEM_NORMAL ) ); + m_titleSet = true; +} + +void CONTEXT_MENU::Add ( const wxString& aItem, int aId ) +{ + m_menu->Append( new wxMenuItem( m_menu, aId, aItem, wxEmptyString, wxITEM_NORMAL ) ); +} + +void CONTEXT_MENU::Clear() +{ + m_titleSet = false; +} \ No newline at end of file diff --git a/common/tool/tool_base.cpp b/common/tool/tool_base.cpp new file mode 100644 index 0000000000..82b1f1ac55 --- /dev/null +++ b/common/tool/tool_base.cpp @@ -0,0 +1,22 @@ +#include +#include + +KiGfx::VIEW *TOOL_BASE::getView() +{ + return m_toolMgr->GetView(); +} + +KiGfx::VIEW_CONTROLS *TOOL_BASE::getViewControls() +{ + return m_toolMgr->GetViewControls(); +} + +wxWindow * TOOL_BASE::getEditFrameInt() +{ + return m_toolMgr->GetEditFrame(); +} + +EDA_ITEM * TOOL_BASE::getModelInt() +{ + return m_toolMgr->GetModel(); +} \ No newline at end of file diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp new file mode 100644 index 0000000000..4e114a58c1 --- /dev/null +++ b/common/tool/tool_dispatcher.cpp @@ -0,0 +1,224 @@ +#include +#include + +#include +#include + +#include +#include +#include + +#include + +#include + +#include +#include + +using boost::optional; + +struct TOOL_DISPATCHER::ButtonState +{ + + ButtonState (TOOL_MouseButtons aButton, const wxEventType& aDownEvent, const wxEventType & aUpEvent, bool aTriggerMenu = false) : + button(aButton), + downEvent(aDownEvent), + upEvent(aUpEvent), + triggerContextMenu(aTriggerMenu) + {}; + + bool dragging; + bool pressed; + + VECTOR2D dragOrigin; + double dragMaxDelta; + + TOOL_MouseButtons button; + wxEventType downEvent; + wxEventType upEvent; + bool triggerContextMenu; + + wxLongLong downTimestamp; + + void Reset() + { + dragging = false; + pressed = false; + } +}; + +TOOL_DISPATCHER::TOOL_DISPATCHER( TOOL_MANAGER *aToolMgr, PCB_BASE_FRAME *aEditFrame ): + m_toolMgr(aToolMgr), + m_editFrame(aEditFrame) + { + + m_buttons.push_back(new ButtonState(MB_Left, wxEVT_LEFT_DOWN, wxEVT_LEFT_UP)); + m_buttons.push_back(new ButtonState(MB_Right, wxEVT_RIGHT_DOWN, wxEVT_RIGHT_UP, true)); + m_buttons.push_back(new ButtonState(MB_Middle, wxEVT_MIDDLE_DOWN, wxEVT_MIDDLE_UP)); + + ResetState(); + }; + +TOOL_DISPATCHER::~TOOL_DISPATCHER() +{ + BOOST_FOREACH(ButtonState *st, m_buttons) + delete st; +} + +void TOOL_DISPATCHER::ResetState() +{ + BOOST_FOREACH(ButtonState *st, m_buttons) + st->Reset(); +} + + + +KiGfx::VIEW* TOOL_DISPATCHER::getView() +{ + return m_editFrame->GetGalCanvas()->GetView(); +} + +int TOOL_DISPATCHER::decodeModifiers( wxEvent& aEvent ) +{ + wxMouseEvent *me = static_cast (&aEvent); + int mods = 0; + + if(me->ControlDown()) + mods |= MB_ModCtrl; + if(me->AltDown()) + mods |= MB_ModAlt; + if(me->ShiftDown()) + mods |= MB_ModShift; + + return mods; +} + +bool TOOL_DISPATCHER::handleMouseButton ( wxEvent& aEvent, int aIndex, bool aMotion ) +{ + ButtonState *st = m_buttons[aIndex]; + wxEventType type = aEvent.GetEventType(); + optional evt; + + bool up = type == st->upEvent; + bool down = type == st->downEvent; + + int mods = decodeModifiers(aEvent); + int args = st->button | mods; + + if(down) + { + st->downTimestamp = wxGetLocalTimeMillis(); + st->dragOrigin = m_lastMousePos; + st->dragMaxDelta = 0; + st->pressed = true; + evt = TOOL_EVENT (TC_Mouse, TA_MouseDown, args ); + } else if (up) + { + bool isClick = false; + st->pressed = false; + + if(st->dragging) + { + wxLongLong t = wxGetLocalTimeMillis(); + + if( t - st->downTimestamp < DragTimeThreshold && st->dragMaxDelta < DragDistanceThreshold ) + isClick = true; + else + evt = TOOL_EVENT (TC_Mouse, TA_MouseUp, args ); + } else + isClick = true; + + + if(isClick) + { + if(st -> triggerContextMenu && !mods) + {} + // evt = TOOL_EVENT (TC_Command, TA_ContextMenu ); + else + evt = TOOL_EVENT (TC_Mouse, TA_MouseClick, args ); + } + + st->dragging = false; + } + + if(st->pressed && aMotion) + { + st->dragging = true; + double dragPixelDistance = getView()->ToScreen(m_lastMousePos - st->dragOrigin, false).EuclideanNorm(); + st->dragMaxDelta = std::max(st->dragMaxDelta, dragPixelDistance); + + wxLongLong t = wxGetLocalTimeMillis(); + + if( t - st->downTimestamp > DragTimeThreshold || st->dragMaxDelta > DragDistanceThreshold ) + { + evt = TOOL_EVENT (TC_Mouse, TA_MouseDrag, args ); + evt->SetMouseDragOrigin(st->dragOrigin); + evt->SetMouseDelta(m_lastMousePos - st->dragOrigin); + } + } + + if(evt) + { + evt->SetMousePosition(m_lastMousePos); + m_toolMgr->ProcessEvent( *evt ); + + return true; + } + + return false; +} + +void TOOL_DISPATCHER::DispatchWxEvent(wxEvent &aEvent) +{ + bool motion = false, buttonEvents = false; + VECTOR2D pos; + optional evt; + + int type = aEvent.GetEventType(); + + if( type == wxEVT_MOTION ) + { + wxMouseEvent *me = static_cast (&aEvent); + pos = getView()->ToWorld ( VECTOR2D( me->GetX(), me->GetY() )); + if(pos != m_lastMousePos) + { + motion = true; + m_lastMousePos = pos; + } + } + + for(unsigned int i = 0; i < m_buttons.size(); i++) + buttonEvents |= handleMouseButton(aEvent, i, motion); + + if(!buttonEvents && motion) + { + evt = TOOL_EVENT (TC_Mouse, TA_MouseMotion ); + evt->SetMousePosition(pos); + } + + if(evt) + m_toolMgr->ProcessEvent( *evt ); + + aEvent.Skip(); + +} + +void TOOL_DISPATCHER::DispatchWxCommand(wxCommandEvent &aEvent) +{ + bool activateTool = false; + std::string toolName; + + switch (aEvent.GetId()) + { + case ID_SELECTION_TOOL: + toolName = "pcbnew.InteractiveSelection"; + activateTool = true; + break; + } + + if(activateTool) + { + TOOL_EVENT evt ( TC_Command, TA_ActivateTool, toolName ); + m_toolMgr->ProcessEvent(evt); + } +} \ No newline at end of file diff --git a/common/tool/tool_event.cpp b/common/tool/tool_event.cpp new file mode 100644 index 0000000000..d10822f9c4 --- /dev/null +++ b/common/tool/tool_event.cpp @@ -0,0 +1,101 @@ +#include +#include + +#include + +#include +#include + +#include + +using namespace std; + +struct FlagString { + int flag; + std::string str; +}; + +static const std::string flag2string(int flag, const FlagString *exps) +{ + std::string rv; + for(int i = 0; exps[i].str.length(); i++) + if(exps[i].flag & flag) + rv+=exps[i].str+" "; + return rv; +} + +const std::string TOOL_EVENT::Format() const +{ + std::string ev; + + const FlagString categories[] = { + {TC_Mouse, "mouse"}, + {TC_Command, "command"}, + {TC_Message, "message"}, + {TC_View, "view"}, + {0, ""} + }; + + const FlagString actions[] = { + {TA_MouseClick, "click"}, + {TA_MouseUp, "button-up"}, + {TA_MouseDown, "button-down"}, + {TA_MouseDrag, "drag"}, + {TA_MouseMotion, "motion"}, + {TA_MouseWheel, "wheel"}, + {TA_ViewRefresh, "view-refresh"}, + {TA_ViewZoom, "view-zoom"}, + {TA_ViewPan, "view-pan"}, + {TA_ViewDirty, "view-dirty"}, + {TA_ChangeLayer, "change-layer"}, + {TA_CancelTool, "cancel-tool"}, + {TA_ActivateTool, "activate-tool"}, + {TA_ContextMenuUpdate, "context-menu-update"}, + {TA_ContextMenuChoice, "context-menu-choice"}, + {0, ""} + }; + + const FlagString buttons[] = { + {MB_None, "none"}, + {MB_Left, "left"}, + {MB_Right, "right"}, + {MB_Middle, "middle"}, + {MB_ModShift, "shift"}, + {MB_ModCtrl, "ctrl"}, + {MB_ModAlt, "alt"}, + {0, ""} + }; + + ev = "category: "; + ev += flag2string(m_category, categories); + ev +=" action: "; + ev += flag2string(m_actions, actions); + + if(m_actions & TA_Mouse) + { + ev +=" btns: "; + ev += flag2string(m_mouseButtons, buttons); + }; + + if(m_commandId) + { + char tmp[128]; + sprintf(tmp,"cmd-id: %d", *m_commandId); + ev += tmp; + } + + if(m_commandStr) + ev += "cmd-str: " + (*m_commandStr); + + return ev; +} + +const std::string TOOL_EVENT_LIST::Format() const +{ + string s; + + BOOST_FOREACH(TOOL_EVENT e, m_events) + s+=e.Format()+" "; + + return s; +} diff --git a/common/tool/tool_interactive.cpp b/common/tool/tool_interactive.cpp new file mode 100644 index 0000000000..2389c33eed --- /dev/null +++ b/common/tool/tool_interactive.cpp @@ -0,0 +1,41 @@ +#include + +#include +#include +#include +#include + +TOOL_INTERACTIVE::TOOL_INTERACTIVE( TOOL_ID aId, const std::string& aName ): + TOOL_BASE(TOOL_Interactive, aId, aName) + {}; + +TOOL_INTERACTIVE::TOOL_INTERACTIVE( const std::string& aName ): + TOOL_BASE(TOOL_Interactive, TOOL_MANAGER::MakeToolId(aName), aName) + {}; + + +TOOL_INTERACTIVE::~TOOL_INTERACTIVE() +{ + +} + +OPT_TOOL_EVENT TOOL_INTERACTIVE::Wait ( const TOOL_EVENT_LIST & aEventList ) +{ + return m_toolMgr->ScheduleWait(this, aEventList); +} + +void TOOL_INTERACTIVE::goInternal( TOOL_STATE_FUNC& aState, const TOOL_EVENT_LIST& aConditions ) +{ + m_toolMgr->ScheduleNextState(this, aState, aConditions); +} + +void TOOL_INTERACTIVE::Reset() +{ + +} + +void TOOL_INTERACTIVE::SetContextMenu( CONTEXT_MENU *aMenu, TOOL_ContextMenuTrigger aTrigger ) +{ + aMenu->setTool(this); + m_toolMgr->ScheduleContextMenu(this, aMenu, aTrigger); +} diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp new file mode 100644 index 0000000000..2fa4e702e5 --- /dev/null +++ b/common/tool/tool_manager.cpp @@ -0,0 +1,193 @@ +#include +#include + + +#include +#include +#include + +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include + +using boost::optional; +using namespace std; + +struct TOOL_MANAGER::ToolState +{ + TOOL_BASE *theTool; + + bool idle; + bool pendingWait; + bool pendingContextMenu; + + CONTEXT_MENU *contextMenu; + TOOL_ContextMenuTrigger contextMenuTrigger; + + COROUTINE *cofunc; + + TOOL_EVENT wakeupEvent; + TOOL_EVENT_LIST waitEvents; + + std::vector transitions; + + +}; + +TOOL_MANAGER::TOOL_MANAGER() +{ + +} + +void TOOL_MANAGER::RegisterTool ( TOOL_BASE *aTool ) +{ + ToolState *st = new ToolState; + + st->theTool = aTool; + st->idle = true; + st->pendingWait = false; + st->pendingContextMenu = false; + st->cofunc = NULL; + st->contextMenuTrigger = CMENU_OFF; + + m_toolState[ aTool ] = st; + m_toolNameIndex [ aTool->GetName() ] = st; + m_toolIdIndex [ aTool->GetId() ] = st; + + aTool->m_toolMgr = this; + + if(aTool->GetType() == TOOL_Interactive) + static_cast(aTool)->Reset(); +} + +void TOOL_MANAGER::ScheduleNextState( TOOL_BASE *aTool, TOOL_STATE_FUNC& aHandler, const TOOL_EVENT_LIST & aConditions ) +{ + ToolState *st = m_toolState [aTool]; + st->transitions.push_back ( Transition (aConditions, aHandler )); +} + +optional TOOL_MANAGER::ScheduleWait( TOOL_BASE *aTool, const TOOL_EVENT_LIST & aConditions ) +{ + ToolState *st = m_toolState [aTool]; + + st->pendingWait = true; + st->waitEvents = aConditions; + st->cofunc->Yield(); + + return st->wakeupEvent; +} + +void TOOL_MANAGER::dispatchInternal ( TOOL_EVENT& aEvent ) +{ + // iterate over all registered tools + BOOST_FOREACH(ToolState *st, m_toolState | boost::adaptors::map_values) + { + // the tool state handler is waiting for events (i.e. called Wait() method) + if(st->pendingWait) + { + + if( st->waitEvents.Matches(aEvent) ) + { + // got matching event? clear wait list and wake up the coroutine + st->wakeupEvent = aEvent; + st->pendingWait = false; + st->waitEvents.clear(); + st->cofunc->Resume(); + if(!st->cofunc->Running()) + delete st->cofunc; + + } + } else { + // no state handler in progress - check if there are any transitions (defined by + // Go() method that match the event. + + if(st->transitions.size()) { + BOOST_FOREACH(Transition tr, st->transitions) + { + if(tr.first.Matches(aEvent)) + { + st->transitions.clear(); + + if(!st->cofunc) + st->cofunc = new COROUTINE( tr.second ); + else + st->cofunc->SetEntry( tr.second ); + + // got match? Run the handler. + st->cofunc->Call(aEvent); + + if(!st->cofunc->Running()) + delete st->cofunc; + } + } + } + } + } +} + +bool TOOL_MANAGER::ProcessEvent (TOOL_EVENT& aEvent) +{ + printf("process: %s\n", aEvent.Format().c_str()); + + dispatchInternal(aEvent); + + + BOOST_FOREACH(ToolState *st, m_toolState | boost::adaptors::map_values) + { + if(st->contextMenuTrigger == CMENU_NOW) + { + st->pendingWait = true; + st->waitEvents = TOOL_EVENT ( TC_Any, TA_Any ); + st->contextMenuTrigger = CMENU_OFF; + GetEditFrame()->PopupMenu( st->contextMenu->GetMenu() ); + + TOOL_EVENT evt ( TC_Command, TA_ContextMenuChoice ); + dispatchInternal( evt ); + + break; + } + } + + if(m_view->IsDirty()) + { + PCB_EDIT_FRAME *f = static_cast(GetEditFrame()); + f->GetGalCanvas()->Refresh(); // fixme: ugly hack, provide a method in TOOL_DISPATCHER. + } + + return false; +} + +void TOOL_MANAGER::ScheduleContextMenu( TOOL_BASE *aTool, CONTEXT_MENU *aMenu, TOOL_ContextMenuTrigger aTrigger ) +{ + ToolState *st = m_toolState [aTool]; + + st->contextMenu = aMenu; + st->contextMenuTrigger = aTrigger; + + if(aTrigger == CMENU_NOW) + st->cofunc->Yield(); +} + +TOOL_ID TOOL_MANAGER::MakeToolId( const std::string &aToolName ) +{ + static int currentId; + return currentId++; +} + +void TOOL_MANAGER::SetEnvironment( EDA_ITEM *aModel, KiGfx::VIEW* aView, KiGfx::VIEW_CONTROLS *aViewControls, wxWindow *aFrame ) +{ + m_model = aModel; + m_view = aView; + m_viewControls = aViewControls; + m_editFrame = aFrame; + // fixme: reset tools after changing environment +} diff --git a/include/tool/context_menu.h b/include/tool/context_menu.h new file mode 100644 index 0000000000..a8d2f4292a --- /dev/null +++ b/include/tool/context_menu.h @@ -0,0 +1,78 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __CONTEXT_MENU_H +#define __CONTEXT_MENU_H + +#include + +class wxMenu; +class TOOL_INTERACTIVE; + +/** + * Class CONTEXT_MENU + * + * Defines the structure of a context (usually right-click) popup menu + * for a given tool. + */ +class CONTEXT_MENU +{ + +public: + + CONTEXT_MENU ( ); + ~CONTEXT_MENU ( ); + + void SetTitle( const wxString& aTitle ); + void Add ( const wxString& aItem, int aId ); + + // fixme: unimplemented + // void Add ( const TOOL_ACTION& aAction, int aId = -1 ); + + void Clear(); + + wxMenu *GetMenu() const + { + return m_menu; + } + +private: + + class CMEventHandler; + + friend class TOOL_INTERACTIVE; + + void setTool ( TOOL_INTERACTIVE *aTool ) + { + m_tool = aTool; + } + + bool m_titleSet; + + wxMenu *m_menu; + CMEventHandler *m_handler; + TOOL_INTERACTIVE *m_tool; +}; + +#endif diff --git a/include/tool/coroutine.h b/include/tool/coroutine.h new file mode 100644 index 0000000000..be57b97778 --- /dev/null +++ b/include/tool/coroutine.h @@ -0,0 +1,240 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __COROUTINE_H +#define __COROUTINE_H + +#include + +#include + +#include "delegate.h" + +/** + Class COROUNTINE. + Implements a coroutine. Wikipedia has a good explanation: + + "Coroutines are computer program components that generalize subroutines to + allow multiple entry points for suspending and resuming execution at certain locations. + Coroutines are well-suited for implementing more familiar program components such as cooperative + tasks, exceptions, event loop, iterators, infinite lists and pipes." + + In other words, a coroutine can be considered a lightweight thread - which can be + preempted only when it deliberately yields the control to the caller. This way, + we avoid concurrency problems such as locking / race conditions. + + Uses boost::context library to do the actual context switching. + + This particular version takes a DELEGATE as an entry point, so it can invoke + methods within a given object as separate coroutines. + + See coroutine_example.cpp for sample code. + */ + +template +class COROUTINE { + +public: + + COROUTINE ( ) + { + m_stackSize = c_defaultStackSize; + m_stack = NULL; + m_saved = NULL; + } + + /** + * Constructor + * Creates a coroutine from a member method of an object + */ + + template + COROUTINE ( T* object, ReturnType (T::*ptr)( ArgType ) ) : + m_func (object, ptr), + m_saved(NULL), + m_stack(NULL), + m_stackSize(c_defaultStackSize) + { + + } + + /** + * Constructor + * Creates a coroutine from a delegate object + */ + COROUTINE( DELEGATE < ReturnType, ArgType > aEntry ) : + m_func(aEntry), + m_saved(NULL), + m_stack(NULL), + m_stackSize(c_defaultStackSize) + {}; + + ~COROUTINE() + { + if(m_saved) + delete m_saved; + if(m_stack) + free(m_stack); + } + + /** + * Function Yield() + * + * Stops execution of the coroutine and returns control to the caller. + * After a yield, Call() or Resume() methods invoked by the caller will + * immediately return true, indicating that we are not done yet, just asleep. + */ + void Yield( ) + { + jump_fcontext(m_self, m_saved, 0); + } + + /** + * Function Yield() + * + * Yield with a value - passes a value of given type to the caller. + * Useful for implementing generator objects. + */ + void Yield( ReturnType& retVal ) + { + m_retVal = retVal; + jump_fcontext(m_self, m_saved, 0); + } + + /** + * Function SetEntry() + * + * Defines the entry point for the coroutine, if not set in the constructor. + */ + void SetEntry ( DELEGATE < ReturnType, ArgType > aEntry ) + { + m_func = aEntry; + } + + /* Function Call() + * + * Starts execution of a coroutine, passing args as its arguments. + * @return true, if the coroutine has yielded and false if it has finished its + * execution (returned). + */ + bool Call( ArgType args ) + { + // fixme: Clean up stack stuff. Add a guard + m_stack = malloc(c_defaultStackSize); + + // align to 16 bytes + void *sp = (void *) ((((ptrdiff_t) m_stack) + m_stackSize - 0xf) & 0xfffffff0); + + m_args = &args; + m_self = boost::context::make_fcontext(sp, m_stackSize, callerStub ); + m_saved = new boost::context::fcontext_t(); + + m_running = true; + // off we go! + boost::context::jump_fcontext(m_saved, m_self, reinterpret_cast (this)); + return m_running; + } + + /** + * Function Resume() + * + * Resumes execution of a previously yielded coroutine. + * @return true, if the coroutine has yielded again and false if it has finished its + * execution (returned). + */ + bool Resume( ) + { + jump_fcontext(m_saved, m_self, 0); + return m_running; + } + + /** + * Function ReturnValue() + * + * Returns the yielded value (the argument Yield() was called with) + */ + const ReturnType& ReturnValue() const + { + return m_retVal; + } + + /** + * Function Running() + * + * @return true, if the coroutine is active + */ + bool Running() const + { + return m_running; + } + +private: + + static const int c_defaultStackSize = 2000000; + + /* real entry point of the coroutine */ + static void callerStub(intptr_t data) + { + // get pointer to self + COROUTINE *cor = reinterpret_cast *> (data); + + // call the coroutine method + cor->m_retVal = cor->m_func(*cor->m_args); + cor->m_running = false; + + // go back to wherever we came from. + boost::context::jump_fcontext(cor->m_self, cor->m_saved, 0); //reinterpret_cast (this)); + } + + template struct strip_ref { + typedef T result; + }; + + template struct strip_ref { + typedef T result; + }; + + + DELEGATE < ReturnType, ArgType > m_func; + + ///< pointer to coroutine entry arguments. Stripped of references + ///< to avoid compiler errors. + typename strip_ref::result *m_args; + ReturnType m_retVal; + + ///< saved caller context + boost::context::fcontext_t *m_saved; + + ///< saved coroutine context + boost::context::fcontext_t *m_self; + + ///< coroutine stack + void *m_stack; + + size_t m_stackSize; + + bool m_running; +}; + +#endif diff --git a/include/tool/delegate.h b/include/tool/delegate.h new file mode 100644 index 0000000000..3e48b57ccc --- /dev/null +++ b/include/tool/delegate.h @@ -0,0 +1,99 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __DELEGATE_H +#define __DELEGATE_H + + +/** + * class DELEGATE + * A trivial delegate (pointer to member method of an object) pattern implementation. + * Check delegate_example.cpp for a coding sample. + */ + +template + class DELEGATE { + public: + typedef ReturnType (DELEGATE::*MemberPointer)( Arg ); + typedef ReturnType _ReturnType; + typedef Arg _ArgType; + + DELEGATE () + { + } + + template + DELEGATE ( T* object, ReturnType (T::*ptr)( Arg ) ) + { + m_ptr = reinterpret_cast(ptr); + m_object = reinterpret_cast (object); + }; + + + ReturnType operator()( Arg a ) const + { + DELEGATE *casted = reinterpret_cast * >(m_object); + return (casted->*m_ptr)(a); + } + +private: + MemberPointer m_ptr; + void *m_object; +}; + +/** + * Class DELEGATE0 + * Same as DELEGATE, but with no arguments. + */ +template + class DELEGATE0 { + public: + typedef ReturnType (DELEGATE0::*MemberPointer)( ); + + typedef ReturnType _ReturnType; + + DELEGATE0 () + { + } + + template + DELEGATE0 ( T* object, ReturnType (T::*ptr)( ) ) + { + m_ptr = reinterpret_cast(ptr); + m_object = reinterpret_cast (object); + }; + + + ReturnType operator()( ) const + { + DELEGATE0 *casted = reinterpret_cast * >(m_object); + return (casted->*m_ptr)(); + } + +private: + MemberPointer m_ptr; + void *m_object; +}; + +#endif diff --git a/include/tool/tool_base.h b/include/tool/tool_base.h new file mode 100644 index 0000000000..fd9658f06b --- /dev/null +++ b/include/tool/tool_base.h @@ -0,0 +1,147 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __TOOL_BASE_H +#define __TOOL_BASE_H + +#include + +// for KICAD_T. +#include + +#include +#include + +class EDA_ITEM; +class TOOL_MANAGER; + +namespace KiGfx { + class VIEW; + class VIEW_CONTROLS; +}; + + +enum TOOL_Type { + TOOL_Interactive = 0x1, + TOOL_Batch = 0x2 +}; + +typedef int TOOL_ID; +typedef DELEGATE TOOL_STATE_FUNC; + +/** + * Class TOOL_BASE + * + * Base abstract interface for all kinds of tools + */ + +class TOOL_BASE +{ +public: + + TOOL_BASE(TOOL_Type aType, TOOL_ID aId, const std::string& aName = std::string("")) : + m_type(aType), + m_toolId(aId), + m_toolName(aName) {}; + + virtual ~TOOL_BASE() {}; + + TOOL_Type GetType() const + { + return m_type; + } + + TOOL_ID GetId() const + { + return m_toolId; + } + + const std::string& GetName() const + { + return m_toolName; + } + + TOOL_MANAGER *GetManager() + { + return m_toolMgr; + } + +protected: + + friend class TOOL_MANAGER; + + /** + * Function attachManager() + * + * Sets the TOOL_MANAGER the tool will belong to. + * Called by TOOL_MANAGER::RegisterTool() + */ + void attachManager( TOOL_MANAGER *aManager ); + + KiGfx::VIEW *getView(); + KiGfx::VIEW_CONTROLS *getViewControls(); + + /** + * Function getEditFrame() + * + * Returns the application window object, casted to requested user type, possibly with + * run-time type check + */ + template + T *getEditFrame() + { + return static_cast (getEditFrameInt()); + } + + /** + * Function getModel() + * + * Returns the model object if it matches the requested type. + */ + template + T* getModel( KICAD_T modelType ) + { + EDA_ITEM *m = getModelInt(); +// assert(modelType == m->Type()); + return static_cast (m); + } + +protected: + + + TOOL_Type m_type; + TOOL_ID m_toolId; + std::string m_toolName; + TOOL_MANAGER *m_toolMgr; + +private: + + // hide the implementation to avoid spreading half of + // kicad and wxWidgets headers to the tools that may not need them at all! + EDA_ITEM *getModelInt(); + wxWindow *getEditFrameInt(); +}; + + +#endif diff --git a/include/tool/tool_dispatcher.h b/include/tool/tool_dispatcher.h new file mode 100644 index 0000000000..572d4bc60e --- /dev/null +++ b/include/tool/tool_dispatcher.h @@ -0,0 +1,90 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __TOOL_DISPATCHER_H +#define __TOOL_DISPATCHER_H + +#include + +#include + +#include + +class TOOL_MANAGER; +class PCB_BASE_FRAME; + +namespace KiGfx { + class VIEW ; +}; + +/** + * Class TOOL_DISPATCHER + * + * - takes wx events, + * - fixes all wx quirks (mouse warping, etc) + * - translates coordinates to world space + * - low-level input conditioning (drag/click threshold), updating mouse position during view auto-scroll/pan. + * - issues TOOL_EVENTS to the manager + */ + +class TOOL_DISPATCHER +{ + public: + /** + * Constructor + * + * @param aToolMgr: tool manager instance the events will be sent to + * @param aEditFrame: the frame wx events come from + */ + TOOL_DISPATCHER( TOOL_MANAGER *aToolMgr, PCB_BASE_FRAME *aEditFrame ); + ~TOOL_DISPATCHER(); + + virtual void ResetState (); + virtual void DispatchWxEvent(wxEvent &aEvent); + virtual void DispatchWxCommand(wxCommandEvent &aEvent); + + private: + + static const int MouseButtonCount = 3; + static const int DragTimeThreshold = 300; + static const int DragDistanceThreshold = 8; + + bool handleMouseButton ( wxEvent& aEvent, int aIndex, bool aMotion ); + bool handleKeys ( wxEvent& aEvent ); + bool handlePopupMenu ( wxEvent& aEvent ); + + int decodeModifiers( wxEvent& aEvent ); + + KiGfx::VIEW *getView(); + + struct ButtonState; + + TOOL_MANAGER *m_toolMgr; + PCB_BASE_FRAME *m_editFrame; + VECTOR2D m_lastMousePos; + std::vector m_buttons; + +}; + +#endif diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h new file mode 100644 index 0000000000..4811fa1cfb --- /dev/null +++ b/include/tool/tool_event.h @@ -0,0 +1,374 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __TOOL_EVENT_H +#define __TOOL_EVENT_H + +#include +#include + +#include + +#include + +class TOOL_MANAGER; + +/** + * Internal (GUI-independent) event definitions. + * Enums are mostly self-explanatory. + */ +enum TOOL_EventCategory { + TC_None = 0x0, + TC_Mouse = 0x1, + TC_Command = 0x2, + TC_Message = 0x4, + TC_View = 0x8, + TC_Any = 0xffffffff +}; + +enum TOOL_Actions { + TA_None = 0x0, + TA_MouseClick = 0x1, + TA_MouseUp = 0x2, + TA_MouseDown = 0x4, + TA_MouseDrag = 0x8, + TA_MouseMotion = 0x10, + TA_MouseWheel = 0x20, + TA_Mouse = 0x3f, + TA_ViewRefresh = 0x40, + TA_ViewZoom = 0x80, + TA_ViewPan = 0x100, + TA_ViewDirty = 0x200, + TA_ChangeLayer = 0x1000, + + // Tool cancel event. Issued automagically when the user hits escape or selects End Tool from the context menu. + TA_CancelTool = 0x2000, + + // Tool activation event. Issued by the GUI upon pressing a button/menu selection. + TA_ActivateTool = 0x4000, + + // Context menu update. Issued whenever context menu is open and the user hovers the mouse over one of choices. + // Used in dynamic highligting in disambiguation menu + TA_ContextMenuUpdate = 0x8000, + + // Context menu choice. Sent if the user picked something from the context menu or closed it without selecting anything. + TA_ContextMenuChoice = 0x10000, + TA_Any = 0xffffffff +}; + +enum TOOL_MouseButtons { + MB_None = 0x0, + MB_Left = 0x1, + MB_Right = 0x2, + MB_Middle = 0x4, + MB_ButtonMask = MB_Left | MB_Right | MB_Middle, + MB_ModShift = 0x8, + MB_ModCtrl = 0x10, + MB_ModAlt = 0x20, + MB_ModifierMask = MB_ModShift | MB_ModCtrl | MB_ModAlt, + MB_Any = 0xffffffff +}; + + +// Defines when a context menu is opened. +enum TOOL_ContextMenuTrigger { + CMENU_BUTTON = 0, // On the right button + CMENU_NOW, // Right now (after TOOL_INTERACTIVE::SetContxtMenu) + CMENU_OFF // Never +}; + +/** + * Class TOOL_EVENT + * + * Generic, UI-independent tool event. + */ +class TOOL_EVENT +{ + public: + + const std::string Format ( ) const; + + TOOL_EVENT(TOOL_EventCategory aCategory = TC_None, TOOL_Actions aAction = TA_None ): + m_category (aCategory), + m_actions (aAction), + m_mouseButtons(0) {}; + + TOOL_EVENT(TOOL_EventCategory aCategory, TOOL_Actions aAction, int aExtraParam ): + m_category (aCategory), + m_actions (aAction) + { + if(aCategory == TC_Mouse) + m_mouseButtons = aExtraParam; + else if (aCategory == TC_Command) + m_commandId = aExtraParam; + }; + + TOOL_EVENT(TOOL_EventCategory aCategory, TOOL_Actions aAction, const std::string& aExtraParam ): + m_category (aCategory), + m_actions (aAction), + m_mouseButtons(0) + { + if(aCategory == TC_Command) + m_commandStr = aExtraParam; + } + + + TOOL_EventCategory Category ( ) const + { + return m_category; + } + + TOOL_Actions Action ( ) const + { + return m_actions; + } + + const VECTOR2D Delta() const + { + return m_mouseDelta; + } + + const VECTOR2D& Position() const + { + return m_mousePos; + } + + const VECTOR2D& DragOrigin() const + { + return m_mouseDragOrigin; + } + + int Buttons() const + { + return m_mouseButtons; + } + + bool IsClick ( int aButtonMask = MB_Any ) const + { + return (m_actions == TA_MouseClick) && ((m_mouseButtons & aButtonMask) == aButtonMask); + } + + bool IsDrag ( int aButtonMask = MB_Any ) const + { + return (m_actions == TA_MouseDrag) && ((m_mouseButtons & aButtonMask) == aButtonMask); + } + + bool IsMouseUp ( int aButtonMask = MB_Any ) const + { + return (m_actions == TA_MouseUp) && ((m_mouseButtons & aButtonMask) == aButtonMask); + } + + bool IsMotion ( ) const + { + return (m_actions == TA_MouseMotion); + } + + bool IsCancel ( ) const + { + return m_actions == TA_CancelTool; + } + + bool Modifier ( int aMask = MB_ModifierMask ) const + { + return (m_mouseButtons & aMask); + } + + + void Ignore(); + + void SetMouseDragOrigin( const VECTOR2D &aP ) + { + m_mouseDragOrigin = aP; + } + + void SetMousePosition( const VECTOR2D& aP ) + { + m_mousePos = aP; + } + + void SetMouseDelta( const VECTOR2D& aP ) + { + m_mouseDelta = aP; + } + + bool Matches ( const TOOL_EVENT& aEvent ) const + { + if (! (m_category & aEvent.m_category)) + return false; + + if (! (m_actions & aEvent.m_actions)) + return false; + + if( m_category == TC_Command) + { + if(m_commandStr && aEvent.m_commandStr) + return (*m_commandStr == *aEvent.m_commandStr); + if(m_commandId && aEvent.m_commandId) + return (*m_commandId == *aEvent.m_commandId); + } + + return true; + } + + boost::optional GetCommandId() + { + return m_commandId; + } + + + private: + + friend class TOOL_MANAGER; + + TOOL_EventCategory m_category; + TOOL_Actions m_actions; + + VECTOR2D m_mouseDelta; + VECTOR2D m_mousePos; + VECTOR2D m_mouseDragOrigin; + + int m_mouseButtons; + boost::optional m_commandId; + boost::optional m_commandStr; + + + +}; + +typedef boost::optional OPT_TOOL_EVENT; + +/** + * Class TOOL_EVENT_LIST + * + * A list of TOOL_EVENTs, with overloaded || operators allowing for + * concatenating TOOL_EVENTs with little code. + */ +class TOOL_EVENT_LIST { + + public: + typedef TOOL_EVENT value_type; + typedef std::deque::iterator iterator; + typedef std::deque::const_iterator const_iterator; + + TOOL_EVENT_LIST() {}; + TOOL_EVENT_LIST( const TOOL_EVENT& aSingleEvent ) + { + m_events.push_back(aSingleEvent); + } + + const std::string Format ( ) const; + + boost::optional Matches( const TOOL_EVENT &b ) const + { + for(const_iterator i = m_events.begin(); i != m_events.end(); ++i) + if (i->Matches(b)) + return *i; + return boost::optional (); + } + + void Add ( const TOOL_EVENT& aEvent ) + { + m_events.push_back(aEvent); + } + + iterator begin() + { + return m_events.begin(); + } + + iterator end() + { + return m_events.end(); + } + + const_iterator cbegin() const + { + return m_events.begin(); + } + + const_iterator cend() const + { + return m_events.end(); + } + + int size() const + { + return m_events.size(); + } + + void clear() + { + m_events.clear(); + } + + TOOL_EVENT_LIST& operator=(const TOOL_EVENT_LIST& b) + { + m_events.clear(); + for(std::deque::const_iterator i = b.m_events.begin(); i != b.m_events.end(); ++i) + m_events.push_back(*i); + return *this; + } + + TOOL_EVENT_LIST& operator=(const TOOL_EVENT& b) + { + m_events.clear(); + m_events.push_back(b); + return *this; + } + + TOOL_EVENT_LIST& operator||(const TOOL_EVENT& b) + { + Add(b); + return *this; + } + + TOOL_EVENT_LIST& operator||(const TOOL_EVENT_LIST& b) + { + + return *this; + } + + private: + std::deque m_events; +}; + +inline const TOOL_EVENT_LIST operator || (const TOOL_EVENT& a, const TOOL_EVENT &b ) +{ + TOOL_EVENT_LIST l; + + l.Add(a); + l.Add(b); + + return l; +} + +inline const TOOL_EVENT_LIST operator || (const TOOL_EVENT & a, const TOOL_EVENT_LIST &b ) +{ + TOOL_EVENT_LIST l(b); + + l.Add(a); + return l; +} + +#endif diff --git a/include/tool/tool_interactive.h b/include/tool/tool_interactive.h new file mode 100644 index 0000000000..679ab5588e --- /dev/null +++ b/include/tool/tool_interactive.h @@ -0,0 +1,115 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __TOOL_INTERACTIVE_H +#define __TOOL_INTERACTIVE_H + +#include + +#include +#include + +class CONTEXT_MENU; + +class TOOL_INTERACTIVE : public TOOL_BASE { +public: + + TOOL_INTERACTIVE( TOOL_ID aId, const std::string& aName ); + + /** + * Constructor + * + * Creates a tool with given name. The name must be unique. */ + TOOL_INTERACTIVE( const std::string& aName ); + virtual ~TOOL_INTERACTIVE(); + + /** + * Function Reset() + * Brings the tool to a known, initial state. If the tool claimed anything from the model or the view, + * it must release it when its reset. + */ + virtual void Reset ( ) = 0; + + /** + * Function SetContextMenu() + * + * Assigns a context menu and tells when it should be activated + */ + void SetContextMenu( CONTEXT_MENU *aMenu, TOOL_ContextMenuTrigger aTrigger = CMENU_BUTTON ); + + /** + * Function Go() + * + * Defines which state (aStateFunc) to go when a certain event arrives (aConditions). + * No conditions means any event. + */ + template + void Go ( int (T::*aStateFunc)( TOOL_EVENT& ), const TOOL_EVENT_LIST & aConditions = TOOL_EVENT( TC_Any, TA_Any ) ); + + /** + * Function Wait() + * + * Suspends execution of the tool until an event specified in aEventList arrives. + * No parameters means waiting for any event. + */ + OPT_TOOL_EVENT Wait ( const TOOL_EVENT_LIST & aEventList = TOOL_EVENT ( TC_Any, TA_Any ) ); + + + /** functions below are not yet implemented - their interface may change */ + template + bool InvokeTool ( const std::string& aToolName, const Parameters& parameters, ReturnValue& returnValue ); + + template + bool InvokeWindow ( const std::string& aWindowName, const Parameters& parameters, ReturnValue& returnValue ); + + template + void Yield ( const T& returnValue ); + +protected: + + /* helper functions for constructing events for Wait() and Go() with + less typing */ + const TOOL_EVENT evActivate( std::string aToolName = "" ); + const TOOL_EVENT evCommand( int aCommandId = -1 ); + const TOOL_EVENT evCommand( std::string aCommandStr = ""); + const TOOL_EVENT evMotion(); + const TOOL_EVENT evClick(int aButton = MB_Any ); + const TOOL_EVENT evDrag(int aButton = MB_Any ); + const TOOL_EVENT evButtonUp( int aButton = MB_Any ); + const TOOL_EVENT evButtonDown(int aButton = MB_Any ); + +private: + + void goInternal( TOOL_STATE_FUNC& aState, const TOOL_EVENT_LIST& aConditions ); +}; + +// hide TOOL_MANAGER implementation +template +void TOOL_INTERACTIVE::Go( int (T::*aStateFunc)( TOOL_EVENT& ), const TOOL_EVENT_LIST& aConditions ) +{ + TOOL_STATE_FUNC sptr (static_cast(this), aStateFunc); + goInternal( sptr, aConditions ); +} + +#endif diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h new file mode 100644 index 0000000000..4a70d5048a --- /dev/null +++ b/include/tool/tool_manager.h @@ -0,0 +1,174 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __TOOL_MANAGER_H +#define __TOOL_MANAGER_H + +#include +#include +#include +#include + +#include + +#include + +#include +#include + +class TOOL_BASE; +class CONTEXT_MENU; +class wxWindow; + +/** + * Class TOOL_MANAGER. + * Master controller class: + * - registers editing tools + * - pumps UI events to tools requesting them + * - manages tool state machines (transitions and wait requests) + */ +class TOOL_MANAGER +{ + public: + + TOOL_MANAGER(); + ~TOOL_MANAGER(); + + /** + * Generates an unique ID from for a tool with given name. + */ + static TOOL_ID MakeToolId( const std::string &aToolName ); + + /** + * Function RegisterTool() + * Adds a tool to the manager set and sets it up. Called once for + * each tool during application initialization. + * @param aTool: tool to be added. Ownership is transferred. + */ + void RegisterTool(TOOL_BASE *aTool); + + /** + * Function InvokeTool() + * Calls a tool by sending a tool activation event to tool of given ID or name. + * An user-defined parameter object can be also passed + */ + void InvokeTool(TOOL_ID aToolId); + void InvokeTool(const std::string& name); + + template + void InvokeTool( const std::string& name, const Parameters& aToolParams); + + + /** + * Function FindTool() + * Searches for a tool with given name or ID + */ + TOOL_BASE *FindTool(int aId); + TOOL_BASE *FindTool(const std::string& aName); + + /** + * Resets the state of a given tool by clearing its wait and + * transition lists and calling tool's internal Reset() method. + */ + + void ResetTool( TOOL_BASE *aTool ); + + /** + * Takes an event from the TOOL_DISPATCHER and propagates it to + * tools that requested events of matching type(s) + */ + bool ProcessEvent (TOOL_EVENT& aEvent); + + /** + * Sets the work environment (model, view, view controls and the parent window). + * These are made available to the tool. Called by the parent frame (PCB_EDIT_FRAME) + * when the board is set up + */ + void SetEnvironment( EDA_ITEM *aModel, KiGfx::VIEW* aView, KiGfx::VIEW_CONTROLS *aViewControls, wxWindow *aFrame ); + + /* Accessors for the environment objects (view, model, etc.) */ + KiGfx::VIEW* GetView() + { + return m_view; + } + + KiGfx::VIEW_CONTROLS* GetViewControls() + { + return m_viewControls; + } + + EDA_ITEM* GetModel() + { + return m_model; + } + + wxWindow* GetEditFrame() + { + return m_editFrame; + } + + /** + * Defines a state transition - the events that cause a given handler method in the tool + * to be called. Called by TOOL_INTERACTIVE::Go(). May be called from a coroutine context. + */ + void ScheduleNextState( TOOL_BASE *aTool, TOOL_STATE_FUNC& aHandler, const TOOL_EVENT_LIST & aConditions ); + + /** + * Pauses execution of a given tool until one or more events matching aConditions arrives. The pause/resume + * operation is done through COROUTINE object. Called only from coroutines. + */ + boost::optional ScheduleWait( TOOL_BASE *aTool, const TOOL_EVENT_LIST & aConditions ); + + /** + * Sets behaviour of the tool's context popup menu. + * @param aMenu - the menu structure, defined by the tool + * @param aTrigger - when the menu is activated: + * CMENU_NOW: opens the menu right now + * CMENU_BUTTON: opens the menu when RMB is pressed + * CMENU_OFF: menu is disabled. + * May be called from a coroutine context. + */ + void ScheduleContextMenu( TOOL_BASE *aTool, CONTEXT_MENU *aMenu, TOOL_ContextMenuTrigger aTrigger ); + + private: + + void dispatchInternal ( TOOL_EVENT& aEvent ); + + struct ToolState; + typedef std::pair Transition; + + std::map m_toolState; + std::map m_toolNameIndex; + std::map m_toolIdIndex; + + EDA_ITEM *m_model; + KiGfx::VIEW *m_view; + KiGfx::VIEW_CONTROLS *m_viewControls; + wxWindow *m_editFrame; + + ToolState *m_currentTool; +}; + + +#endif \ No newline at end of file From a3f74b2f68f8accb50ad46c5d818ebd7314dd06a Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 2 Aug 2013 16:49:07 +0200 Subject: [PATCH 200/415] Increased number of layers in the view (for overlay objects) --- include/layers_id_colors_and_visibility.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index 2c8f2d079a..51b85d3a2b 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -250,7 +250,7 @@ enum PCB_VISIBLE #define ITEM_GAL_LAYER(layer) (NB_LAYERS + layer) /// number of *all* layers including PCB and item layers -#define TOTAL_LAYER_COUNT (NB_LAYERS + END_PCB_VISIBLE_LIST) +#define TOTAL_LAYER_COUNT 128 //(NB_LAYERS + END_PCB_VISIBLE_LIST) /// Rendering order of layers on GAL-based canvas (lower index in the array /// means that layer is displayed closer to the user, ie. on the top). From 3e5c236942b0eca533da4387a988b9eadce14f34 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 2 Aug 2013 16:50:29 +0200 Subject: [PATCH 201/415] Added COROUTINE and DELEGATE class examples. --- include/tool/examples/Makefile | 9 ++++ include/tool/examples/coroutine_example.cpp | 48 +++++++++++++++++++++ include/tool/examples/delegate_example.cpp | 35 +++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 include/tool/examples/Makefile create mode 100644 include/tool/examples/coroutine_example.cpp create mode 100644 include/tool/examples/delegate_example.cpp diff --git a/include/tool/examples/Makefile b/include/tool/examples/Makefile new file mode 100644 index 0000000000..a605263689 --- /dev/null +++ b/include/tool/examples/Makefile @@ -0,0 +1,9 @@ +CXXFLAGS = -I../.. -I../../boost + +all: delegate_example coroutine_example + +delegate_example: delegate_example.cpp + g++ -o $@ $^ $(CXXFLAGS) + +coroutine_example: coroutine_example.cpp + g++ -o $@ $^ $(CXXFLAGS) -lboost_context \ No newline at end of file diff --git a/include/tool/examples/coroutine_example.cpp b/include/tool/examples/coroutine_example.cpp new file mode 100644 index 0000000000..b5ad730145 --- /dev/null +++ b/include/tool/examples/coroutine_example.cpp @@ -0,0 +1,48 @@ +#include +#include + +#include + +using namespace std; + +typedef COROUTINE MyCoroutine; + +class MyClass { + + public: + int CountTo(int n) + { + printf("%s: Coroutine says hi. I will count from 1 to %d and yield each value.\n", __FUNCTION__, n); + for(int i = 1; i <= n; i++) + { + printf("%s: Yielding %d\n", __FUNCTION__, i); + cofunc.Yield(i); + } + } + + void Run() + { + cofunc = MyCoroutine (this, &MyClass::CountTo); + printf("%s: Calling coroutine that will count from 1 to 5.\n", __FUNCTION__); + cofunc.Call(5); + while (cofunc.Running()) + { + printf("%s: Got value: %d\n", __FUNCTION__, cofunc.ReturnValue()); + cofunc.Resume(); + } + + printf("%s: Done!\n", __FUNCTION__); + } + + MyCoroutine cofunc; +}; + + +main() +{ + MyClass obj; + + obj.Run(); + + return 0; +} diff --git a/include/tool/examples/delegate_example.cpp b/include/tool/examples/delegate_example.cpp new file mode 100644 index 0000000000..2c872e72a5 --- /dev/null +++ b/include/tool/examples/delegate_example.cpp @@ -0,0 +1,35 @@ +#include +#include + +#include + +using namespace std; + +class MyClass { + + public: + int MyMethod(const string &arg) + { + printf("MyClass(this = %p)::MyMethod() called with string '%s', length %d\n", this, arg.c_str(), arg.length()); + return arg.length(); + } +}; + +typedef DELEGATE MyDelegate; + +main() +{ + MyClass t1; + MyClass t2; + + + MyDelegate ptr1 (&t1, &MyClass::MyMethod); + MyDelegate ptr2 (&t2, &MyClass::MyMethod); + + int retval1, retval2; + retval1 = ptr1("apples"); + retval2 = ptr2("cherries"); + + printf("Object 1 returned %d, object 2 returned %d\n", retval1, retval2); + return 0; +} From 24cab0eabd49778368f61194dcccfec7074a73fc Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 2 Aug 2013 16:51:38 +0200 Subject: [PATCH 202/415] View: various fixes, added VIEW::IsDirty() --- common/view/view.cpp | 41 ++++++++++++++++++++++----------- common/view/view_item.cpp | 9 ++++++++ include/view/view.h | 4 +++- include/view/view_controls.h | 8 ++++++- include/view/wx_view_controls.h | 4 ++++ 5 files changed, 51 insertions(+), 15 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 16953ee1b6..14a765f014 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -498,14 +498,16 @@ struct VIEW::drawItem { group = gal->BeginGroup(); aItem->setGroup( currentLayer->id, group ); - view->m_painter->Draw( aItem, currentLayer->id ); + if(!view->m_painter->Draw( aItem, currentLayer->id )) + aItem->ViewDraw(currentLayer->id, gal, BOX2I()); gal->EndGroup(); } } else { // Immediate mode - view->m_painter->Draw( aItem, currentLayer->id ); + if(!view->m_painter->Draw( aItem, currentLayer->id )) + aItem->ViewDraw(currentLayer->id, gal, BOX2I()); } } @@ -526,11 +528,20 @@ void VIEW::redrawRect( const BOX2I& aRect ) m_gal->SetTarget( l->target ); m_gal->SetLayerDepth( l->renderingOrder ); l->items->Query( aRect, drawFunc ); - l->isDirty = false; } + l->isDirty = false; } } +bool VIEW::IsDirty() +{ + BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers ) + { + if(l->isDirty) + return true; + } + return false; +} struct VIEW::unlinkItem { @@ -622,18 +633,22 @@ void VIEW::invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ) for( int i = 0; i < layer_count; i++ ) { - VIEW_LAYER* l = &m_layers[layer_indices[i]]; - - l->dirtyExtents = - l->isDirty ? aItem->ViewBBox() : l->dirtyExtents.Merge( aItem->ViewBBox() ); - - if( aUpdateFlags & VIEW_ITEM::GEOMETRY ) + if(m_layers.find(layer_indices[i]) != m_layers.end()) { - l->items->Remove( aItem ); - l->items->Insert( aItem ); /* reinsert */ + VIEW_LAYER* l = &m_layers[layer_indices[i]]; - aItem->deleteGroups(); - } + l->dirtyExtents = + l->isDirty ? aItem->ViewBBox() : l->dirtyExtents.Merge( aItem->ViewBBox() ); + + l->isDirty = true; + + if( aUpdateFlags & VIEW_ITEM::GEOMETRY ) + { + l->items->Remove( aItem ); + l->items->Insert( aItem ); /* reinsert */ + aItem->deleteGroups(); + } + } } if( aItem->storesGroups() ) diff --git a/common/view/view_item.cpp b/common/view/view_item.cpp index 460c7f3d77..12651ed7c3 100644 --- a/common/view/view_item.cpp +++ b/common/view/view_item.cpp @@ -57,6 +57,9 @@ void VIEW_ITEM::ViewGetRequiredLayers( int aLayers[], int& aCount ) const void VIEW_ITEM::ViewUpdate( int aUpdateFlags, bool aForceImmediateRedraw ) { + if(!m_view) + return; + m_view->invalidateItem( this, aUpdateFlags ); if( aForceImmediateRedraw ) @@ -140,3 +143,9 @@ bool VIEW_ITEM::storesGroups() const { return ( m_groupsSize > 0 ); } + +void VIEW_ITEM::ViewSetHighlighted( bool aIsHighlighted ) +{ + m_highlighted = aIsHighlighted; + ViewUpdate(APPEARANCE | GEOMETRY); +} diff --git a/include/view/view.h b/include/view/view.h index 9e8561187d..27e9a48358 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -270,7 +270,7 @@ public: } /** - * Function SetLayerOrder() + * Function SetLayerOrder() * Sets rendering order of a particular layer. * @param aLayer: the layer * @param aRenderingOrder: arbitrary number denoting the rendering order. @@ -360,6 +360,8 @@ public: */ bool IsDynamic() const { return m_dynamic; } + bool IsDirty(); + static const int VIEW_MAX_LAYERS = 128; ///* maximum number of layers that may be shown private: diff --git a/include/view/view_controls.h b/include/view/view_controls.h index 695530d73e..9e399d3282 100644 --- a/include/view/view_controls.h +++ b/include/view/view_controls.h @@ -55,6 +55,7 @@ public: JUMP = 2 }; + VIEW_CONTROLS( VIEW* aView ) : m_view( aView ) {}; virtual ~VIEW_CONTROLS() {}; @@ -74,7 +75,7 @@ public: virtual void SetGrabMouse( bool aEnabled ) {}; /** - * Function SetGrabMouse + * Function SetAutoPan * Turns on/off auto panning (this feature is used when there is a tool active (eg. drawing a * track) and user moves mouse to the VIEW edge - then the view can be translated or not). * @param aEnabled tells if the autopanning should be active. @@ -108,6 +109,11 @@ public: */ virtual void AnimatedZoom( const BOX2I& aExtents ) {}; + virtual void WarpCursor (const VECTOR2D& aPosition ) {}; + + virtual void ShowCursor (bool aEnabled ) {}; + + protected: /// Pointer to controlled VIEW. VIEW* m_view; diff --git a/include/view/wx_view_controls.h b/include/view/wx_view_controls.h index df7b2f7bb7..8e7400df67 100644 --- a/include/view/wx_view_controls.h +++ b/include/view/wx_view_controls.h @@ -37,6 +37,7 @@ #include class EDA_DRAW_PANEL_GAL; +class TOOL_DISPATCHER; namespace KiGfx { @@ -56,6 +57,8 @@ public: void onButton( wxMouseEvent& event ); void onEnter( wxMouseEvent& event ); + void SetEventDispatcher( TOOL_DISPATCHER *aEventDispatcher ); + private: /// Options for WX_VIEW_CONTROLS @@ -80,6 +83,7 @@ private: /// Used for determining time intervals between events. wxLongLong m_timeStamp; + TOOL_DISPATCHER* m_eventDispatcher; }; } // namespace KiGfx From 71b8823625f2491027ac2f4bbbc7ce2830bf49c9 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 2 Aug 2013 16:53:04 +0200 Subject: [PATCH 203/415] PCB painter: improve label highlighting --- pcbnew/pcb_painter.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 0ef0e33500..f895ba261d 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -271,6 +271,7 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) break; default: + printf("painter: unknown item %p type %d\n", aItem, aItem->Type()); // Painter does not know how to draw the object return false; break; @@ -679,10 +680,30 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y); double orientation = aText->GetDrawRotation() * M_PI / 1800.0; + m_gal->PushDepth(); + + if(aText->ViewIsHighlighted()) + { + EDA_RECT bb (aText->GetBoundingBox()); + VECTOR2D s (bb.GetOrigin()); + VECTOR2D e (bb.GetEnd()); + m_gal->SetFillColor( COLOR4D (1.0, 1.0, 1.0, 0.3) ); + m_gal->SetStrokeColor( COLOR4D (1.0, 1.0, 1.0, 0.5) ); + m_gal->SetIsFill(true); + m_gal->SetIsStroke(true); + m_gal->SetLineWidth(0); + m_gal->DrawRectangle(s, e); + } + + m_gal->AdvanceDepth(); + m_gal->SetStrokeColor( strokeColor ); m_gal->SetLineWidth( aText->GetThickness() ); m_gal->SetTextAttributes( aText ); m_gal->StrokeText( std::string( aText->GetText().mb_str() ), position, orientation ); + + m_gal->PopDepth(); + } From 1a19c761aeef8a0c008629c51294474df967bbe1 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 2 Aug 2013 16:53:50 +0200 Subject: [PATCH 204/415] pcbnew: hooked Tool Framework into the edit panel. Added a sample selection tool (not fully functional). --- common/drawpanel_gal.cpp | 40 ++++- include/class_drawpanel_gal.h | 11 ++ include/wxBasePcbFrame.h | 7 +- include/wxPcbStruct.h | 3 +- pcbnew/CMakeLists.txt | 4 + pcbnew/basepcbframe.cpp | 14 +- pcbnew/menubar_pcbframe.cpp | 6 + pcbnew/pcbframe.cpp | 11 +- pcbnew/pcbnew_id.h | 2 + pcbnew/tools/pcb_tools.cpp | 55 +++++++ pcbnew/tools/selection_area.cpp | 62 +++++++ pcbnew/tools/selection_area.h | 76 +++++++++ pcbnew/tools/selection_tool.cpp | 276 ++++++++++++++++++++++++++++++++ pcbnew/tools/selection_tool.h | 71 ++++++++ 14 files changed, 632 insertions(+), 6 deletions(-) create mode 100644 pcbnew/tools/pcb_tools.cpp create mode 100644 pcbnew/tools/selection_area.cpp create mode 100644 pcbnew/tools/selection_area.h create mode 100644 pcbnew/tools/selection_tool.cpp create mode 100644 pcbnew/tools/selection_tool.h diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 3549455245..ee0de205c7 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -38,6 +38,9 @@ #include #include +#include +#include + #ifdef __WXDEBUG__ #include #endif /* __WXDEBUG__ */ @@ -54,6 +57,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin m_currentGal = GAL_TYPE_NONE; m_view = NULL; m_painter = NULL; + m_eventDispatcher = NULL; SwitchBackend( aGalType, true ); SetBackgroundStyle( wxBG_STYLE_CUSTOM ); @@ -83,6 +87,19 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin Connect( wxEVT_PAINT, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this ); + /* Generic events for the Tool Dispatcher */ + + Connect( wxEVT_MOTION, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_LEFT_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_LEFT_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_RIGHT_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_RIGHT_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_MIDDLE_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_MIDDLE_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_MOUSEWHEEL, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_KEY_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_KEY_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + m_timeStamp = 0; } @@ -121,8 +138,8 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) // Framerate limiter wxLongLong currentTimeStamp = wxGetLocalTimeMillis(); - if( currentTimeStamp - m_timeStamp < ( 1000 / FPS_LIMIT ) ) - return; + // if( currentTimeStamp - m_timeStamp < ( 1000 / FPS_LIMIT ) ) + // return; m_timeStamp = currentTimeStamp; #ifdef __WXDEBUG__ @@ -131,6 +148,8 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) prof_start( &time, false ); #endif /* __WXDEBUG__ */ + printf("Refresh!\n"); + m_gal->BeginDrawing(); m_gal->SetBackgroundColor( KiGfx::COLOR4D( 0.0, 0.0, 0.0, 1.0 ) ); m_gal->ClearScreen(); @@ -193,3 +212,20 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType, bool aUseShaders ) m_currentGal = aGalType; m_useShaders = aUseShaders; } + +void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent ) +{ + if(!m_eventDispatcher) + { + aEvent.Skip(); + return; + } else { + printf("evType %d\n", aEvent.GetEventType()); + m_eventDispatcher->DispatchWxEvent(aEvent); + } +} + +KiGfx::VIEW_CONTROLS* EDA_DRAW_PANEL_GAL::GetViewControls() const +{ + return m_viewControls; +} \ No newline at end of file diff --git a/include/class_drawpanel_gal.h b/include/class_drawpanel_gal.h index b6a63306f9..764f4d8020 100644 --- a/include/class_drawpanel_gal.h +++ b/include/class_drawpanel_gal.h @@ -36,12 +36,14 @@ #include class BOARD; +class TOOL_DISPATCHER; namespace KiGfx { class GAL; class VIEW; class WX_VIEW_CONTROLS; +class VIEW_CONTROLS; class PAINTER; }; @@ -74,13 +76,21 @@ public: KiGfx::GAL* GetGAL() { return m_gal; } void SetView( KiGfx::VIEW* aView ) { m_view = aView; } + KiGfx::VIEW* GetView() const { return m_view; } + KiGfx::VIEW_CONTROLS* GetViewControls() const; virtual void Refresh( bool eraseBackground = true, const wxRect* rect = NULL ); + void SetEventDispatcher(TOOL_DISPATCHER *aEventDispatcher) + { + m_eventDispatcher = aEventDispatcher; + } + protected: void onPaint( wxPaintEvent& WXUNUSED( aEvent ) ); void onSize( wxSizeEvent& aEvent ); + void onEvent( wxEvent& aEvent ); KiGfx::GAL* m_gal; ///< Interface for drawing objects on a 2D-surface KiGfx::VIEW* m_view; ///< Stores view settings (scale, center, etc.) @@ -91,6 +101,7 @@ protected: GalType m_currentGal; ///< Currently used GAL bool m_useShaders; ///< Are shaders used? (only for OpenGL GAL) wxLongLong m_timeStamp; + TOOL_DISPATCHER* m_eventDispatcher; }; #endif diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index 842b9059d6..09677f5daf 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -56,7 +56,8 @@ class ZONE_SETTINGS; class PCB_PLOT_PARAMS; class FP_LIB_TABLE; class FPID; - +class TOOL_MANAGER; +class TOOL_DISPATCHER; /** * class PCB_BASE_FRAME @@ -94,6 +95,10 @@ protected: /// main window. wxAuiToolBar* m_auxiliaryToolBar; + TOOL_MANAGER *m_toolManager; + TOOL_DISPATCHER *m_toolDispatcher; + + void setupTools(); void updateGridSelectBox(); void updateZoomSelectBox(); virtual void unitsChangeRefresh(); diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 7d9845e4ef..6730815c3b 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -65,7 +65,6 @@ class PARSE_ERROR; class IO_ERROR; class FP_LIB_TABLE; - /** * class PCB_EDIT_FRAME * the main frame for Pcbnew @@ -118,6 +117,8 @@ protected: bool m_useCmpFileForFpNames; ///< is true, use the .cmp file from CvPcb, else use the netlist // to know the footprint name of components. + void onGenericCommand( wxCommandEvent& aEvent ); + // we'll use lower case function names for private member functions. void createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu* aPopMenu ); void createPopUpMenuForFootprints( MODULE* aModule, wxMenu* aPopMenu ); diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index fa681e4faf..16d0ee1e5d 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -216,6 +216,10 @@ set(PCBNEW_CLASS_SRCS zones_polygons_test_connections.cpp zones_test_and_combine_areas.cpp class_footprint_wizard.cpp + + tools/selection_tool.cpp + tools/selection_area.cpp + tools/pcb_tools.cpp ) set(PCBNEW_SRCS ${PCBNEW_AUTOROUTER_SRCS} ${PCBNEW_CLASS_SRCS} ${PCBNEW_DIALOGS}) diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 9580ea9e6c..edc02934df 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -54,6 +54,8 @@ #include #include +#include +#include // Configuration entry names. static const wxString UserGridSizeXEntry( wxT( "PcbUserGrid_X" ) ); @@ -79,7 +81,7 @@ BEGIN_EVENT_TABLE( PCB_BASE_FRAME, EDA_DRAW_FRAME ) EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_PADS_SKETCH, PCB_BASE_FRAME::OnUpdatePadDrawMode ) EVT_UPDATE_UI( ID_ON_GRID_SELECT, PCB_BASE_FRAME::OnUpdateSelectGrid ) EVT_UPDATE_UI( ID_ON_ZOOM_SELECT, PCB_BASE_FRAME::OnUpdateSelectZoom ) - + EVT_UPDATE_UI_RANGE( ID_ZOOM_IN, ID_ZOOM_PAGE, PCB_BASE_FRAME::OnUpdateSelectZoom ) END_EVENT_TABLE() @@ -91,6 +93,8 @@ PCB_BASE_FRAME::PCB_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, EDA_DRAW_FRAME( aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName ) { m_Pcb = NULL; + m_toolManager = NULL; + m_toolDispatcher = NULL; m_DisplayPadFill = true; // How to draw pads m_DisplayViaFill = true; // How to draw vias @@ -111,6 +115,8 @@ PCB_BASE_FRAME::PCB_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, m_galCanvas = new EDA_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize, EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL ); + setupTools(); + m_auxiliaryToolBar = NULL; } @@ -185,6 +191,11 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) view->RecacheAllItems( true ); if( m_galCanvasActive ) m_galCanvas->Refresh(); + + // update the tool manager with the new board and its view. + if(m_toolManager) + m_toolManager->SetEnvironment( m_Pcb, view, m_galCanvas->GetViewControls(), this); + } } @@ -796,6 +807,7 @@ void PCB_BASE_FRAME::LoadSettings() wxASSERT( i < KiGfx::VIEW::VIEW_MAX_LAYERS ); view->SetLayerOrder( GalLayerOrder[i], i ); + view->SetLayerTarget( i, KiGfx::TARGET_NONCACHED ); } // Netnames are drawn only when scale is sufficient (level of details) diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index 5f87f1d8cb..28073bbbd8 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -298,6 +298,12 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() _( "Reset text size and width of all module fields to current defaults" ), KiBitmap( reset_text_xpm ) ); + editMenu->AppendSeparator(); + + AddMenuItem( editMenu, ID_SELECTION_TOOL, + _( "Select Tool" ), + _( "Interactive selection and drag&drop tool." ) ); + /** Create View menu **/ wxMenu* viewMenu = new wxMenu; diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 8a3e663359..67bfa67666 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -59,6 +59,8 @@ #include #include +#include +#include #if defined(KICAD_SCRIPTING) || defined(KICAD_SCRIPTING_WXPYTHON) #include @@ -116,6 +118,12 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_MENU( wxID_EXIT, PCB_EDIT_FRAME::OnQuit ) // menu Config + + /* Tom's hacks start */ + EVT_MENU ( ID_SELECTION_TOOL, PCB_EDIT_FRAME::onGenericCommand ) + EVT_TOOL ( ID_SELECTION_TOOL, PCB_EDIT_FRAME::onGenericCommand ) + /* Tom's hacks end */ + EVT_MENU( ID_PCB_DRAWINGS_WIDTHS_SETUP, PCB_EDIT_FRAME::OnConfigurePcbOptions ) EVT_MENU( ID_CONFIG_REQ, PCB_EDIT_FRAME::Process_Config ) EVT_MENU( ID_PCB_LIB_TABLE_EDIT, PCB_EDIT_FRAME::Process_Config ) @@ -472,9 +480,10 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title, DisplayError( this, msg ); } } + + setupTools(); } - PCB_EDIT_FRAME::~PCB_EDIT_FRAME() { m_RecordingMacros = -1; diff --git a/pcbnew/pcbnew_id.h b/pcbnew/pcbnew_id.h index a5babb0348..02e1ea6cda 100644 --- a/pcbnew/pcbnew_id.h +++ b/pcbnew/pcbnew_id.h @@ -367,6 +367,8 @@ enum pcbnew_ids ID_FOOTPRINT_WIZARD_SELECT_WIZARD, ID_FOOTPRINT_WIZARD_EXPORT_TO_BOARD, + ID_SELECTION_TOOL + }; #endif // PCBNEW_ID_H_ diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp new file mode 100644 index 0000000000..7843d6d7ec --- /dev/null +++ b/pcbnew/tools/pcb_tools.cpp @@ -0,0 +1,55 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include "selection_tool.h" + +void PCB_BASE_FRAME::setupTools() +{ + // create the manager and dispatcher. Route draw panel events to the dispatcher. + m_toolManager = new TOOL_MANAGER; + m_toolDispatcher = new TOOL_DISPATCHER_PCBNEW( m_toolManager, this ); + m_galCanvas->SetEventDispatcher (m_toolDispatcher); + + // register our selection tool. + m_toolManager->RegisterTool(new SELECTION_TOOL); + +} + +void PCB_EDIT_FRAME::onGenericCommand(wxCommandEvent &aEvent) +{ + m_toolDispatcher->DispatchWxCommand(aEvent); +} + diff --git a/pcbnew/tools/selection_area.cpp b/pcbnew/tools/selection_area.cpp new file mode 100644 index 0000000000..717a09bfc6 --- /dev/null +++ b/pcbnew/tools/selection_area.cpp @@ -0,0 +1,62 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +#include + +#include "selection_area.h" + +using namespace KiGfx; + +const BOX2I SELECTION_AREA::ViewBBox() const +{ + BOX2I tmp; + tmp.SetOrigin(m_origin); + tmp.SetEnd(m_end); + tmp.Normalize(); + return tmp; +} + +void SELECTION_AREA::ViewGetLayers( int aLayers[], int& aCount ) const +{ + aLayers[0] = SelectionLayer; + aCount = 1; +} + +void SELECTION_AREA::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const +{ + VECTOR2D width = m_view->ToWorld( VECTOR2D(1.0, 1.0), false ); // fixme: pixel-sized stroke width setting? + aGal->SetLineWidth( width.x ); + aGal->SetStrokeColor(COLOR4D(1.0, 1.0, 0.4, 1.0)); + aGal->SetFillColor(COLOR4D(0.3, 0.3, 0.5, 0.3)); + aGal->SetIsStroke(true); + aGal->SetIsFill(true); + aGal->SetLayerDepth(100.0); + aGal->DrawRectangle(m_origin, m_end); +} + +SELECTION_AREA::SELECTION_AREA(): + EDA_ITEM(NOT_USED) // this item is never added to a BOARD so it needs no type. + {} \ No newline at end of file diff --git a/pcbnew/tools/selection_area.h b/pcbnew/tools/selection_area.h new file mode 100644 index 0000000000..f4677f40a7 --- /dev/null +++ b/pcbnew/tools/selection_area.h @@ -0,0 +1,76 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __SELECTION_AREA_H +#define __SELECTION_AREA_H + +#include +#include + +#include + +#include +#include +#include + +/** + * Class SELECTION_AREA + * + * Represents a selection area (currently a rectangle) in a VIEW. + */ +class SELECTION_AREA : public EDA_ITEM +{ + public: + static const int SelectionLayer = 126; // fixme: define globally + + SELECTION_AREA(); + ~SELECTION_AREA() {}; + + virtual const BOX2I ViewBBox() const; + + void ViewDraw( int aLayer, KiGfx::GAL* aGal, const BOX2I& aVisibleArea ) const; + void ViewGetLayers( int aLayers[], int& aCount ) const; + + void SetOrigin ( VECTOR2I aOrigin ) + { + m_origin = aOrigin; + } + + void SetEnd ( VECTOR2I aEnd ) + { + m_end = aEnd; + } + + void Show(int x, std::ostream& st) const + { + + } + + private: + + + VECTOR2I m_origin, m_end; +}; + +#endif diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp new file mode 100644 index 0000000000..a872fbb46c --- /dev/null +++ b/pcbnew/tools/selection_tool.cpp @@ -0,0 +1,276 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include + +#include "selection_tool.h" +#include "selection_area.h" + +using namespace KiGfx; +using boost::optional; + + +SELECTION_TOOL::SELECTION_TOOL() : + TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ) + { + m_selArea = new SELECTION_AREA; + + } + + +SELECTION_TOOL::~SELECTION_TOOL() +{ + if(m_selArea) + delete m_selArea; +} + + +void SELECTION_TOOL::Reset() +{ + // the tool launches upon reception of activate ("pcbnew.InteractiveSelection") + Go(&SELECTION_TOOL::Main, TOOL_EVENT(TC_Command, TA_ActivateTool, GetName())); //"pcbnew.InteractiveSelection")); +} + +int SELECTION_TOOL::Main(TOOL_EVENT& aEvent) +{ + + // Main loop: keep receiving events + while(OPT_TOOL_EVENT evt = Wait ()) + { + + if(evt->IsCancel ()) + return 0; + + // single click? Select single object + if( evt->IsClick (MB_Left) ) + selectSingle(evt->Position(), evt->Modifier( MB_ModShift )); + + // drag with LMB? Select multiple objects (or at least draw a selection box) + if (evt->IsDrag ( MB_Left )) + selectMultiple(); + } + + return 0; +} + +void SELECTION_TOOL::toggleSelection ( BOARD_ITEM * aItem, bool aAdditive ) +{ + + if(m_selectedItems.find(aItem) != m_selectedItems.end()) + { + aItem->ViewSetHighlighted(false); + m_selectedItems.erase(aItem); + } else { + if(!aAdditive) + clearSelection(); + aItem->ViewSetHighlighted(true); + m_selectedItems.insert(aItem); + } +} + +void SELECTION_TOOL::clearSelection () +{ + BOOST_FOREACH(BOARD_ITEM *item, m_selectedItems) + { + item->ViewSetHighlighted(false); + } + + m_selectedItems.clear(); +} + + +void SELECTION_TOOL::selectSingle( const VECTOR2I &aWhere, bool aAdditive ) +{ + BOARD *pcb = getModel (PCB_T); + BOARD_ITEM *item; + GENERAL_COLLECTORS_GUIDE guide = getEditFrame()->GetCollectorsGuide(); + GENERAL_COLLECTOR collector; + + collector.Collect(pcb, GENERAL_COLLECTOR::AllBoardItems , wxPoint(aWhere.x, aWhere.y), guide); + + switch (collector.GetCount()) + { + case 0: + if(!aAdditive) + clearSelection(); + break; + case 1: + toggleSelection( collector[0], aAdditive ); + break; + default: + item = disambiguationMenu(&collector); + if(item) + toggleSelection(item, aAdditive ); + break; + } +} + + +BOARD_ITEM* SELECTION_TOOL::pickSmallestComponent( GENERAL_COLLECTOR* aCollector ) +{ + int count = aCollector->GetPrimaryCount(); // try to use preferred layer + if( 0 == count ) count = aCollector->GetCount(); + + for( int i = 0; iType() != PCB_MODULE_T ) + return NULL; + } + + // all are modules, now find smallest MODULE + + int minDim = 0x7FFFFFFF; + int minNdx = 0; + + for( int i = 0; iGetBoundingBox().GetWidth(); + int ly = module->GetBoundingBox().GetHeight(); + + int lmin = std::min( lx, ly ); + + if( lmin < minDim ) + { + minDim = lmin; + minNdx = i; + } + } + + return (*aCollector)[minNdx]; +} + +void SELECTION_TOOL::handleHighlight( const VECTOR2D& aP ) +{ + +} + +void SELECTION_TOOL::selectMultiple() +{ + OPT_TOOL_EVENT evt; + VIEW *v = getView(); + + v->Add(m_selArea); + + while (evt = Wait()) + { + if(evt->IsCancel()) + break; + + if(evt->IsDrag( MB_Left )) + { + m_selArea->SetOrigin( evt->DragOrigin() ); + m_selArea->SetEnd( evt->Position() ); + m_selArea->ViewSetVisible(true); + m_selArea->ViewUpdate(VIEW_ITEM::APPEARANCE | VIEW_ITEM::GEOMETRY); + + + v->SetLayerVisible( SELECTION_AREA::SelectionLayer ); + v->SetLayerOrder( SELECTION_AREA::SelectionLayer, 1000); + v->SetLayerTarget( SELECTION_AREA::SelectionLayer, TARGET_OVERLAY ); + } + + if(evt->IsMouseUp( MB_Left )) + { + m_selArea->ViewSetVisible(false); + break; + } + } + + + v->Remove(m_selArea); +} + + +BOARD_ITEM *SELECTION_TOOL::disambiguationMenu ( GENERAL_COLLECTOR *aCollector ) +{ + CONTEXT_MENU cmenu; + OPT_TOOL_EVENT evt ; + BOARD_ITEM *current = NULL; + + cmenu.SetTitle( _("Clarify selection")); + + int limit = std::min( 10, aCollector->GetCount() ); + + for( int i = 0; iGetSelectMenuText(); + cmenu.Add(text, i); + } + + SetContextMenu(&cmenu, CMENU_NOW); + + while (evt = Wait()) + { + + + if(evt->Action() == TA_ContextMenuUpdate ) + { + if(current) + current->ViewSetHighlighted(false); + + int id = *evt->GetCommandId(); + if(id >= 0) + { + current = (*aCollector) [id]; + current->ViewSetHighlighted(true); + } else + current = NULL; + + + } else if(evt->Action() == TA_ContextMenuChoice ) { + + optional id = evt->GetCommandId(); + + if(current) + current->ViewSetHighlighted(false); + + if(id && (*id >= 0)) + { + current = (*aCollector) [*id]; + current->ViewSetHighlighted(true); + return current; + } + return NULL; + } + + + } + + return NULL; +} \ No newline at end of file diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h new file mode 100644 index 0000000000..b226be85cc --- /dev/null +++ b/pcbnew/tools/selection_tool.h @@ -0,0 +1,71 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __SELECTION_TOOL_H +#define __SELECTION_TOOL_H + +#include + +#include +#include + +class SELECTION_AREA; +class BOARD_ITEM; +class GENERAL_COLLECTOR; + + +/** + * Class SELECTION_AREA + * + * Our sample selection tool: currently supports: + * - pick single objects (click LMB) + * - add objects to existing selection (Shift+LMB) + * - draw selection box (drag LMB) + * + * WORK IN PROGRESS. CONSIDER AS A DEMO! + */ + +class SELECTION_TOOL : public TOOL_INTERACTIVE +{ + public: + SELECTION_TOOL (); + ~SELECTION_TOOL (); + + void Reset(); + int Main(TOOL_EVENT& aEvent); + + private: + void selectSingle( const VECTOR2I &aWhere, bool aAdditive ); + void selectMultiple (); + void handleHighlight( const VECTOR2D& aP ); + BOARD_ITEM* disambiguationMenu ( GENERAL_COLLECTOR* aItems ); + BOARD_ITEM* pickSmallestComponent( GENERAL_COLLECTOR* aCollector ); + void toggleSelection ( BOARD_ITEM * aItem, bool aAdditive ); + void clearSelection (); + + std::set m_selectedItems; + SELECTION_AREA *m_selArea; +}; + +#endif From 2c5fcd7d2c687665e65782c231b690c735d65ee3 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 2 Aug 2013 17:25:53 +0200 Subject: [PATCH 205/415] pcbnew: tool initialization should belong to PCB_EDIT_FRAME to avoid linking errors on cvpcb. --- include/wxBasePcbFrame.h | 1 - include/wxPcbStruct.h | 1 + pcbnew/basepcbframe.cpp | 2 -- pcbnew/pcbframe.cpp | 3 ++- pcbnew/tools/pcb_tools.cpp | 4 ++-- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index 09677f5daf..7a569f3022 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -98,7 +98,6 @@ protected: TOOL_MANAGER *m_toolManager; TOOL_DISPATCHER *m_toolDispatcher; - void setupTools(); void updateGridSelectBox(); void updateZoomSelectBox(); virtual void unitsChangeRefresh(); diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 6730815c3b..d03fcc1f06 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -117,6 +117,7 @@ protected: bool m_useCmpFileForFpNames; ///< is true, use the .cmp file from CvPcb, else use the netlist // to know the footprint name of components. + void setupTools(); void onGenericCommand( wxCommandEvent& aEvent ); // we'll use lower case function names for private member functions. diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index edc02934df..30cb46d540 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -115,8 +115,6 @@ PCB_BASE_FRAME::PCB_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, m_galCanvas = new EDA_DRAW_PANEL_GAL( this, -1, wxPoint( 0, 0 ), m_FrameSize, EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL ); - setupTools(); - m_auxiliaryToolBar = NULL; } diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 67bfa67666..008464a9cf 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -321,6 +321,8 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title, for ( int i = 0; i < 10; i++ ) m_Macros[i].m_Record.clear(); + setupTools(); + SetBoard( new BOARD() ); // Create the PCB_LAYER_WIDGET *after* SetBoard(): @@ -481,7 +483,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title, } } - setupTools(); } PCB_EDIT_FRAME::~PCB_EDIT_FRAME() diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 7843d6d7ec..d2c60a5498 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -36,11 +36,11 @@ #include "selection_tool.h" -void PCB_BASE_FRAME::setupTools() +void PCB_EDIT_FRAME::setupTools() { // create the manager and dispatcher. Route draw panel events to the dispatcher. m_toolManager = new TOOL_MANAGER; - m_toolDispatcher = new TOOL_DISPATCHER_PCBNEW( m_toolManager, this ); + m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager, this ); m_galCanvas->SetEventDispatcher (m_toolDispatcher); // register our selection tool. From f9bd431d561a81edc1249d62e538e58516666f78 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 2 Aug 2013 17:57:28 +0200 Subject: [PATCH 206/415] pcbnew: removed printf() causing a bug --- pcbnew/pcb_painter.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 72b1895873..eb921914ea 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -271,7 +271,6 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) break; default: - printf("painter: unknown item %p type %d\n", aItem, aItem->Type()); // Painter does not know how to draw the object return false; break; From 8bcb88d6fda872b9b2cfae5dd86e1129523dff50 Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Fri, 2 Aug 2013 19:18:58 +0200 Subject: [PATCH 207/415] pcbnew: fixed missing Select Tool icon warning --- pcbnew/menubar_pcbframe.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index 424eb13dc9..5eb3b28a96 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -302,7 +302,8 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() AddMenuItem( editMenu, ID_SELECTION_TOOL, _( "Select Tool" ), - _( "Interactive selection and drag&drop tool." ) ); + _( "Interactive selection and drag&drop tool." ), + KiBitmap( tools_xpm ) ); /** Create View menu **/ wxMenu* viewMenu = new wxMenu; From a8ea2e05a4732107a4d66737078a35abf6161516 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 2 Aug 2013 19:21:22 +0200 Subject: [PATCH 208/415] Windows build fix. --- common/system/fcontext.s | 17 +++--- common/system/jump_i386_pe_gas.S | 95 ++++++++++++++++---------------- common/system/make_i386_pe_gas.S | 20 +++---- 3 files changed, 64 insertions(+), 68 deletions(-) diff --git a/common/system/fcontext.s b/common/system/fcontext.s index 71055cc9a2..16b291e4bd 100644 --- a/common/system/fcontext.s +++ b/common/system/fcontext.s @@ -5,16 +5,17 @@ #if __i386__ - #include "jump_i386_sysv_elf_gas.S" - #include "make_i386_sysv_elf_gas.S" - #ifdef __WIN32__ - #include "jump_i386_pe_gas.S" - #include "make_i386_pe_gas.S" - #endif + #ifdef __WIN32__ + #include "jump_i386_pe_gas.S" + #include "make_i386_pe_gas.S" + #else + #include "jump_i386_sysv_elf_gas.S" + #include "make_i386_sysv_elf_gas.S" + #endif #elif __x86_64__ - #include "jump_x86_64_sysv_elf_gas.S" - #include "make_x86_64_sysv_elf_gas.S" + #include "jump_x86_64_sysv_elf_gas.S" + #include "make_x86_64_sysv_elf_gas.S" #endif diff --git a/common/system/jump_i386_pe_gas.S b/common/system/jump_i386_pe_gas.S index 39db0dec1f..e93e42bae0 100644 --- a/common/system/jump_i386_pe_gas.S +++ b/common/system/jump_i386_pe_gas.S @@ -4,54 +4,53 @@ http://www.boost.org/LICENSE_1_0.txt) */ +.global _jump_fcontext .text -.globl jump_fcontext .align 2 -.type jump_fcontext,@function -jump_fcontext: - mov 0x4(%esp),%ecx - mov %edi,(%ecx) - mov %esi,0x4(%ecx) - mov %ebx,0x8(%ecx) - mov %ebp,0xc(%ecx) - mov %fs:0x18,%edx - mov (%edx),%eax - mov %eax,0x24(%ecx) - mov 0x4(%edx),%eax - mov %eax,0x18(%ecx) - mov 0x8(%edx),%eax - mov %eax,0x20(%ecx) - mov 0x10(%edx),%eax - mov %eax,0x28(%ecx) - lea 0x4(%esp),%eax - mov %eax,0x10(%ecx) - mov (%esp),%eax - mov %eax,0x14(%ecx) - mov 0x8(%esp),%edx - mov (%edx),%edi - mov 0x4(%edx),%esi - mov 0x8(%edx),%ebx - mov 0xc(%edx),%ebp - mov 0x10(%esp),%eax - test %eax,%eax - je jump_fcontext+0x5f - stmxcsr 0x2c(%ecx) - fnstcw 0x30(%ecx) - ldmxcsr 0x2c(%edx) - fldcw 0x30(%edx) - mov %edx,%ecx - mov %fs:0x18,%edx - mov 0x24(%ecx),%eax - mov %eax,(%edx) - mov 0x18(%ecx),%eax - mov %eax,0x4(%edx) - mov 0x20(%ecx),%eax - mov %eax,0x8(%edx) - mov 0x28(%ecx),%eax - mov %eax,0x10(%edx) - mov 0xc(%esp),%eax - mov 0x10(%ecx),%esp - mov %eax,0x4(%esp) - mov 0x14(%ecx),%ecx - jmp *%ecx +_jump_fcontext: + mov 0x4(%esp),%ecx + mov %edi,(%ecx) + mov %esi,0x4(%ecx) + mov %ebx,0x8(%ecx) + mov %ebp,0xc(%ecx) + mov %fs:0x18,%edx + mov (%edx),%eax + mov %eax,0x24(%ecx) + mov 0x4(%edx),%eax + mov %eax,0x18(%ecx) + mov 0x8(%edx),%eax + mov %eax,0x20(%ecx) + mov 0x10(%edx),%eax + mov %eax,0x28(%ecx) + lea 0x4(%esp),%eax + mov %eax,0x10(%ecx) + mov (%esp),%eax + mov %eax,0x14(%ecx) + mov 0x8(%esp),%edx + mov (%edx),%edi + mov 0x4(%edx),%esi + mov 0x8(%edx),%ebx + mov 0xc(%edx),%ebp + mov 0x10(%esp),%eax + test %eax,%eax + je _jump_fcontext+0x5f + stmxcsr 0x2c(%ecx) + fnstcw 0x30(%ecx) + ldmxcsr 0x2c(%edx) + fldcw 0x30(%edx) + mov %edx,%ecx + mov %fs:0x18,%edx + mov 0x24(%ecx),%eax + mov %eax,(%edx) + mov 0x18(%ecx),%eax + mov %eax,0x4(%edx) + mov 0x20(%ecx),%eax + mov %eax,0x8(%edx) + mov 0x28(%ecx),%eax + mov %eax,0x10(%edx) + mov 0xc(%esp),%eax + mov 0x10(%ecx),%esp + mov %eax,0x4(%esp) + mov 0x14(%ecx),%ecx + jmp *%ecx diff --git a/common/system/make_i386_pe_gas.S b/common/system/make_i386_pe_gas.S index 297f8bf54a..f0d9a60078 100644 --- a/common/system/make_i386_pe_gas.S +++ b/common/system/make_i386_pe_gas.S @@ -4,12 +4,11 @@ http://www.boost.org/LICENSE_1_0.txt) */ +.global _make_fcontext .text -.globl make_fcontext .align 2 -.type make_fcontext,@function -make_fcontext: +_make_fcontext: mov 0x4(%esp),%eax lea -0x34(%eax),%eax and $0xfffffff0,%eax @@ -31,10 +30,10 @@ make_fcontext: mov %fs:0x18,%ecx mov (%ecx),%edx inc %edx - je make_fcontext+0x4c // <_make_fcontext+0x4c> + je _make_fcontext+0x4c // <_make_fcontext+0x4c> dec %edx xchg %edx,%ecx - jmp make_fcontext+0x42 // <_make_fcontext+0x42> + jmp _make_fcontext+0x42 // <_make_fcontext+0x42> mov 0x4(%ecx),%ecx mov 0x10(%eax),%edx mov %ecx,0x18(%edx) @@ -45,10 +44,7 @@ make_fcontext: ret finish: - xor %eax,%eax - mov %eax,(%esp) - call finish+0xa - hlt - -.size make_fcontext,.-make_fcontext - + xor %eax,%eax + mov %eax,(%esp) + call finish+0xa + hlt From 6ebd5ddc53f55a9eb310b833e886826f7c323525 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 5 Aug 2013 14:06:01 +0200 Subject: [PATCH 209/415] Fixed bounding box for TEXTE_PCB class. --- pcbnew/class_pcb_text.cpp | 35 +++++++++++++++++++++++++++++++++++ pcbnew/class_pcb_text.h | 3 +++ 2 files changed, 38 insertions(+) diff --git a/pcbnew/class_pcb_text.cpp b/pcbnew/class_pcb_text.cpp index 344f776537..4ff4c02b88 100644 --- a/pcbnew/class_pcb_text.cpp +++ b/pcbnew/class_pcb_text.cpp @@ -188,3 +188,38 @@ EDA_ITEM* TEXTE_PCB::Clone() const return new TEXTE_PCB( *this ); } + +const BOX2I TEXTE_PCB::ViewBBox() const +{ + EDA_RECT rect = GetTextBox(); + + if( m_Orient != 0.0 ) + { + // If the text is rotated, we need to take it into account + wxPoint p1 = rect.GetOrigin(); + wxPoint p2 = wxPoint( p1.x + rect.GetWidth(), p1.y ); + wxPoint p3 = rect.GetEnd(); + wxPoint p4 = wxPoint( p1.x, p1.y + rect.GetHeight() ); + + // Transform all the corners of the bounding box according to the rotation angle + RotatePoint( &p1, m_Pos, -m_Orient ); + RotatePoint( &p2, m_Pos, -m_Orient ); + RotatePoint( &p3, m_Pos, -m_Orient ); + RotatePoint( &p4, m_Pos, -m_Orient ); + + // Find the new bounding box origin and dimensions + int minX = std::min( std::min( p1.x, p2.x ), std::min( p3.x, p4.x ) ); + int minY = std::min( std::min( p1.y, p2.y ), std::min( p3.y, p4.y ) ); + int maxX = std::max( std::max( p1.x, p2.x ), std::max( p3.x, p4.x ) ); + int maxY = std::max( std::max( p1.y, p2.y ), std::max( p3.y, p4.y ) ); + + int width = maxX - minX; + int height = maxY - minY; + + return BOX2I( VECTOR2I( minX, minY ), VECTOR2I( width, height ) ); + } + else + { + return BOX2I( rect.GetOrigin(), rect.GetSize() ); + } +} diff --git a/pcbnew/class_pcb_text.h b/pcbnew/class_pcb_text.h index 6bae690be1..d947cd05c9 100644 --- a/pcbnew/class_pcb_text.h +++ b/pcbnew/class_pcb_text.h @@ -124,6 +124,9 @@ public: #if defined(DEBUG) virtual void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override #endif + + /// @copydoc VIEW_ITEM::ViewBBox() + virtual const BOX2I ViewBBox() const; }; #endif // #define CLASS_PCB_TEXT_H From fa7b6a8cece04a85316387aa8a9eb7064eeedf26 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 5 Aug 2013 16:28:58 +0200 Subject: [PATCH 210/415] Moved VIEW_ITEM::ViewGetRequiredLayers() functionality to the VIEW class. Now required layers are set per layer basis instead of per item. --- common/view/view.cpp | 39 ++++++++++++++++++++++++++++----------- common/view/view_item.cpp | 10 ++-------- include/view/view.h | 18 +++++++++++++++--- include/view/view_item.h | 10 ---------- pcbnew/basepcbframe.cpp | 28 ++++++++++++++++++++-------- pcbnew/class_pad.cpp | 21 --------------------- pcbnew/class_pad.h | 3 --- pcbnew/class_track.cpp | 16 ---------------- pcbnew/class_track.h | 6 ------ 9 files changed, 65 insertions(+), 86 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 14a765f014..3ec8ef6a80 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -89,6 +89,22 @@ void VIEW::Remove( VIEW_ITEM* aItem ) } +void VIEW::SetRequired( int aLayerId, int aRequiredId, bool aRequired ) +{ + wxASSERT( (unsigned) aLayerId < m_layers.size() ); + wxASSERT( (unsigned) aRequiredId < m_layers.size() ); + + if( aRequired ) + { + m_layers[aLayerId].requiredLayers.insert( aRequiredId ); + } + else + { + m_layers[aLayerId].requiredLayers.erase( aRequired ); + } +} + + // stupid C++... python lamda would do this in one line template struct queryVisitor @@ -474,14 +490,9 @@ struct VIEW::drawItem { GAL* gal = view->GetGAL(); - // Obtain layers that are required to be enabled for drawing an item - // (eg. there is no point in drawing track labels, if the track is not visible) - aItem->ViewGetRequiredLayers( layers, layersCount ); - // Conditions that have te be fulfilled for an item to be drawn bool drawCondition = aItem->ViewIsVisible() && - aItem->ViewGetLOD( currentLayer->id ) < view->m_scale && - view->isEveryLayerEnabled( layers, layersCount ); + aItem->ViewGetLOD( currentLayer->id ) < view->m_scale; if( !drawCondition ) return; @@ -521,7 +532,7 @@ void VIEW::redrawRect( const BOX2I& aRect ) { BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers ) { - if( l->enabled ) + if( l->enabled && areRequiredLayersEnabled( l->id ) ) { drawItem drawFunc( this, l ); @@ -537,7 +548,7 @@ bool VIEW::IsDirty() { BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers ) { - if(l->isDirty) + if( l->isDirty ) return true; } return false; @@ -698,11 +709,17 @@ void VIEW::clearGroupCache() } -bool VIEW::isEveryLayerEnabled( const int aLayers[], int aCount ) const +bool VIEW::areRequiredLayersEnabled( int aLayerId ) const { - for( int i = 0; i < aCount; ++i ) + wxASSERT( (unsigned) aLayerId < m_layers.size() ); + + std::set::iterator it, it_end; + + for( it = m_layers.at( aLayerId ).requiredLayers.begin(), it_end = m_layers.at( aLayerId ).requiredLayers.end(); + it != it_end; ++it ) { - if( !m_layers.at( aLayers[i] ).enabled ) + // That is enough if just one layer is not enabled + if( !m_layers.at( *it ).enabled ) return false; } diff --git a/common/view/view_item.cpp b/common/view/view_item.cpp index 12651ed7c3..f1d1fdecba 100644 --- a/common/view/view_item.cpp +++ b/common/view/view_item.cpp @@ -48,13 +48,6 @@ void VIEW_ITEM::ViewSetVisible( bool aIsVisible ) } -void VIEW_ITEM::ViewGetRequiredLayers( int aLayers[], int& aCount ) const -{ - // By default there is no layer required - aCount = 0; -} - - void VIEW_ITEM::ViewUpdate( int aUpdateFlags, bool aForceImmediateRedraw ) { if(!m_view) @@ -144,8 +137,9 @@ bool VIEW_ITEM::storesGroups() const return ( m_groupsSize > 0 ); } + void VIEW_ITEM::ViewSetHighlighted( bool aIsHighlighted ) { m_highlighted = aIsHighlighted; - ViewUpdate(APPEARANCE | GEOMETRY); + ViewUpdate( APPEARANCE | GEOMETRY ); } diff --git a/include/view/view.h b/include/view/view.h index 27e9a48358..b37747da19 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -84,7 +84,8 @@ public: */ void Remove( VIEW_ITEM* aItem ); - /** Function Query() + /** + * Function Query() * Finds all visible items that touch or are within the rectangle aRect. * @param aRect area to search for items * @param aResult result of the search, containing VIEW_ITEMs associated with their layers. @@ -93,6 +94,16 @@ public: */ int Query( const BOX2I& aRect, std::vector& aResult ); + /** + * Function SetRequired() + * Marks the aRequiredId layer as required for the aLayerId layer. In order to display the + * layer, all of its required layers have to be enabled. + * @param aLayerId is the id of the layer for which we enable/disable the required layer. + * @param aRequiredId is the id of the required layer. + * @param aRequired tells if the required layer should be added or removed from the list. + */ + void SetRequired( int aLayerId, int aRequiredId, bool aRequired = true ); + /** * Function CopySettings() * Copies layers and visibility settings from another view. @@ -377,6 +388,7 @@ private: BOX2I extents; ///* sum of bboxes of all items on the layer BOX2I dirtyExtents; ///* sum of bboxes of all dirty items on the layer RenderTarget target; ///* where the layer should be rendered + std::set requiredLayers; ///* layers that are required to be enabled to show the layer }; // Convenience typedefs @@ -416,8 +428,8 @@ private: return i->renderingOrder > j->renderingOrder; } - /// Checks if every layer stored in aLayers array is enabled. - bool isEveryLayerEnabled( const int aLayers[], int aCount ) const; + /// Checks if every layer required by the aLayerId layer is enabled. + bool areRequiredLayersEnabled( int aLayerId ) const; /// Contains set of possible displayed layers and its properties LayerMap m_layers; diff --git a/include/view/view_item.h b/include/view/view_item.h index 5f73124e6d..acef72c512 100644 --- a/include/view/view_item.h +++ b/include/view/view_item.h @@ -115,16 +115,6 @@ public: */ virtual void ViewGetLayers( int aLayers[], int& aCount ) const = 0; - /** - * Function ViewGetRequiredLayers() - * Returns the all the layers that are required for an item to be drawn. Eg. there is no point - * to draw netnames, when the track is not visible - so track layer should be marked as - * required. - * @param aLayers[]: output layer index array - * @param aCount: number of layer indices in aLayers[] - */ - virtual void ViewGetRequiredLayers( int aLayers[], int& aCount ) const; - /** * Function ViewSetVisible() * Sets the item visibility. diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 30cb46d540..c1b0ccc809 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -93,8 +93,8 @@ PCB_BASE_FRAME::PCB_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, EDA_DRAW_FRAME( aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName ) { m_Pcb = NULL; - m_toolManager = NULL; - m_toolDispatcher = NULL; + m_toolManager = NULL; + m_toolDispatcher = NULL; m_DisplayPadFill = true; // How to draw pads m_DisplayViaFill = true; // How to draw vias @@ -806,14 +806,26 @@ void PCB_BASE_FRAME::LoadSettings() view->SetLayerOrder( GalLayerOrder[i], i ); view->SetLayerTarget( i, KiGfx::TARGET_NONCACHED ); + + if( IsCopperLayer( i ) ) + { + // Copper layers are required for netname layers + view->SetRequired( GetNetnameLayer( i ), i ); + } + else + if( IsNetnameLayer( i ) ) + { + // Netnames are drawn only when scale is sufficient (level of details) + // so there is no point in caching them + view->SetLayerTarget( i, KiGfx::TARGET_NONCACHED ); + } } - // Netnames are drawn only when scale is sufficient (level of details) - // so there is no point in caching them - for( LAYER_NUM layer = FIRST_NETNAME_LAYER; layer <= LAST_NETNAME_LAYER; ++layer ) - { - view->SetLayerTarget( layer, KiGfx::TARGET_NONCACHED ); - } + // Some more required layers settings + view->SetRequired( ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIAS_VISIBLE ) ); + view->SetRequired( ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ) ); + view->SetRequired( ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); + view->SetRequired( ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); // Apply layer coloring scheme & display options if( view->GetPainter() ) diff --git a/pcbnew/class_pad.cpp b/pcbnew/class_pad.cpp index 3950a73147..1f223e2335 100644 --- a/pcbnew/class_pad.cpp +++ b/pcbnew/class_pad.cpp @@ -850,27 +850,6 @@ void D_PAD::ViewGetLayers( int aLayers[], int& aCount ) const } -void D_PAD::ViewGetRequiredLayers( int aLayers[], int& aCount ) const -{ - ViewGetLayers( aLayers, aCount ); - - // Remove pad description layer & soldermask from the required layers group - if( IsOnLayer( LAYER_N_FRONT ) && IsOnLayer( LAYER_N_BACK ) ) - { - // Multilayer pads have 2 soldermask layers (front and back), 2 solder paste layer - // (front and back) and one description layer that do not have to be enabled in order to - // display a pad. - aCount -= 5; - } - else - { - // Rest of pads have one soldermask layer, one solder paste layer and one description layer - // that are not necessary for pad to be displayed. - aCount -= 3; - } -} - - unsigned int D_PAD::ViewGetLOD( int aLayer ) const { // Netnames and soldermasks will be shown only if zoom is appropriate diff --git a/pcbnew/class_pad.h b/pcbnew/class_pad.h index f72705e9fc..765b8d46fc 100644 --- a/pcbnew/class_pad.h +++ b/pcbnew/class_pad.h @@ -436,9 +436,6 @@ public: /// @copydoc VIEW_ITEM::ViewGetLayers() virtual void ViewGetLayers( int aLayers[], int& aCount ) const; - /// @copydoc VIEW_ITEM::ViewGetRequiredLayers() - virtual void ViewGetRequiredLayers( int aLayers[], int& aCount ) const; - /// @copydoc VIEW_ITEM::ViewGetLOD() virtual unsigned int ViewGetLOD( int aLayer ) const; diff --git a/pcbnew/class_track.cpp b/pcbnew/class_track.cpp index a3a8d2b2e7..bed16cca36 100644 --- a/pcbnew/class_track.cpp +++ b/pcbnew/class_track.cpp @@ -760,14 +760,6 @@ void TRACK::ViewGetLayers( int aLayers[], int& aCount ) const } -void TRACK::ViewGetRequiredLayers( int aLayers[], int& aCount ) const -{ - // The only required layer is the track layer itself - aLayers[0] = GetLayer(); - aCount = 1; -} - - unsigned int TRACK::ViewGetLOD( int aLayer ) const { // Netnames will be shown only if zoom is appropriate @@ -1004,14 +996,6 @@ void SEGVIA::ViewGetLayers( int aLayers[], int& aCount ) const } -void SEGVIA::ViewGetRequiredLayers( int aLayers[], int& aCount ) const -{ - // The only required layer is via itself, holes are optional - aLayers[0] = ITEM_GAL_LAYER( VIAS_VISIBLE ); - aCount = 1; -} - - // see class_track.h void TRACK::GetMsgPanelInfo( std::vector< MSG_PANEL_ITEM >& aList ) { diff --git a/pcbnew/class_track.h b/pcbnew/class_track.h index bbacb4e3aa..ce8e6cf282 100644 --- a/pcbnew/class_track.h +++ b/pcbnew/class_track.h @@ -331,9 +331,6 @@ public: /// @copydoc VIEW_ITEM::ViewGetLayers() virtual void ViewGetLayers( int aLayers[], int& aCount ) const; - /// @copydoc VIEW_ITEM::ViewGetRequiredLayers() - virtual void ViewGetRequiredLayers( int aLayers[], int& aCount ) const; - /// @copydoc VIEW_ITEM::ViewGetLOD() virtual unsigned int ViewGetLOD( int aLayer ) const; @@ -424,9 +421,6 @@ public: /// @copydoc VIEW_ITEM::ViewGetLayers() virtual void ViewGetLayers( int aLayers[], int& aCount ) const; - /// @copydoc VIEW_ITEM::ViewGetRequiredLayers() - virtual void ViewGetRequiredLayers( int aLayers[], int& aCount ) const; - #if defined (DEBUG) virtual void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override #endif From 114d12b060cf9e9b1c65715fdc16c49479975ebf Mon Sep 17 00:00:00 2001 From: Camille Delbegue Date: Mon, 5 Aug 2013 17:53:13 +0200 Subject: [PATCH 211/415] Remove a Clang warning and add a missing dependency to boost in cmake file. --- CMakeLists.txt | 1 + common/gal/stroke_font.cpp | 4 ++++ include/gal/stroke_font.h | 2 +- pcbnew/pcb_painter.cpp | 4 ++++ pcbnew/pcb_painter.h | 2 +- 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f8962b3c38..3359c1d918 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -403,6 +403,7 @@ add_subdirectory(tools) add_dependencies( pcbnew boost ) add_dependencies( eeschema boost ) add_dependencies( cvpcb boost ) +add_dependencies( gal boost ) add_dependencies( common boost ) add_dependencies( pcbcommon boost ) add_dependencies( 3d-viewer boost ) diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp index 527b9d5122..242a9f7125 100644 --- a/common/gal/stroke_font.cpp +++ b/common/gal/stroke_font.cpp @@ -29,6 +29,10 @@ using namespace KiGfx; + +const double STROKE_FONT::LINE_HEIGHT_RATIO = 1.6; + + STROKE_FONT::STROKE_FONT( GAL* aGal ) : m_gal( aGal ), m_bold( false ), diff --git a/include/gal/stroke_font.h b/include/gal/stroke_font.h index 7c58730d11..7af3b618cb 100644 --- a/include/gal/stroke_font.h +++ b/include/gal/stroke_font.h @@ -182,7 +182,7 @@ private: */ VECTOR2D computeTextSize( const std::string& aText ) const; - static const double LINE_HEIGHT_RATIO = 1.6; + static const double LINE_HEIGHT_RATIO; }; } // namespace KiGfx diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index f86be7a190..7c206cea8c 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -43,6 +43,10 @@ using namespace KiGfx; + +const double PCB_RENDER_SETTINGS::MAX_FONT_SIZE = 100000000; + + PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS() { // By default everything should be displayed as filled diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 50740889ef..5f0e4fe39b 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -106,7 +106,7 @@ protected: bool m_netNamesOnPads; bool m_netNamesOnTracks; - static const double MAX_FONT_SIZE = 100000000; + static const double MAX_FONT_SIZE; DisplayZonesMode m_displayZoneMode; }; From b6c4aaac8e5c4600d1bc2aba571cc833c522fd9f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 6 Aug 2013 09:31:08 +0200 Subject: [PATCH 212/415] Moved highlighted flag from VIEW_ITEM to EDA_ITEM. Added brightened and selected flag to EDA_ITEM. --- common/view/view_item.cpp | 7 - include/base_struct.h | 13 ++ include/gal/color4d.h | 8 +- include/view/view_item.h | 24 +-- pcbnew/pcb_painter.cpp | 51 +++--- pcbnew/tools/selection_tool.cpp | 301 ++++++++++++++++---------------- pcbnew/tools/selection_tool.h | 34 ++-- 7 files changed, 212 insertions(+), 226 deletions(-) diff --git a/common/view/view_item.cpp b/common/view/view_item.cpp index f1d1fdecba..3649516a25 100644 --- a/common/view/view_item.cpp +++ b/common/view/view_item.cpp @@ -136,10 +136,3 @@ bool VIEW_ITEM::storesGroups() const { return ( m_groupsSize > 0 ); } - - -void VIEW_ITEM::ViewSetHighlighted( bool aIsHighlighted ) -{ - m_highlighted = aIsHighlighted; - ViewUpdate( APPEARANCE | GEOMETRY ); -} diff --git a/include/base_struct.h b/include/base_struct.h index b4f196e877..30ef9d3c66 100644 --- a/include/base_struct.h +++ b/include/base_struct.h @@ -387,6 +387,9 @@ public: #define END_ONPAD (1 << 23) ///< Pcbnew: flag set for track segment ending on a pad #define BUSY (1 << 24) ///< Pcbnew: flag indicating that the structure has ///< already been edited, in some functions +#define HIGHLIGHTED (1 << 25) ///< item is drawn in normal colors, when the rest is darkened +#define BRIGHTENED (1 << 26) ///< item is drawn with a bright contour + #define EDA_ITEM_ALL_FLAGS -1 typedef unsigned STATUS_FLAGS; @@ -466,6 +469,16 @@ public: inline bool IsDragging() const { return m_Flags & IS_DRAGGED; } inline bool IsSelected() const { return m_Flags & SELECTED; } inline bool IsResized() const { return m_Flags & IS_RESIZED; } + inline bool IsHighlighted() const { return m_Flags & HIGHLIGHTED; } + inline bool IsBrightened() const { return m_Flags & BRIGHTENED; } + + inline void SetBrightened() { SetFlags( BRIGHTENED ); ViewUpdate( APPEARANCE ); } + inline void SetSelected() { SetFlags( SELECTED ); ViewUpdate( APPEARANCE ); } + inline void SetHighlighted() { SetFlags( HIGHLIGHTED ); ViewUpdate( APPEARANCE | GEOMETRY ); } + + inline void ClearSelected() { ClearFlags( SELECTED ); ViewUpdate( APPEARANCE ); } + inline void ClearHighlighted() { ClearFlags( HIGHLIGHTED ); ViewUpdate( APPEARANCE ); } + inline void ClearBrightened() { ClearFlags( BRIGHTENED ); ViewUpdate( APPEARANCE | GEOMETRY ); } void SetModified(); diff --git a/include/gal/color4d.h b/include/gal/color4d.h index b5275dfa38..d89a629c47 100644 --- a/include/gal/color4d.h +++ b/include/gal/color4d.h @@ -75,12 +75,12 @@ public: #endif /* WX_COMPATIBLITY */ /** - * Function Highlight + * Function Brighten * Makes the color brighter by a given factor. * @param aFactor Specifies how bright the color should become (valid values: 0.0 .. 1.0). * @return COLOR4D& Brightened color. */ - COLOR4D& Highlight( double aFactor ) + COLOR4D& Brighten( double aFactor ) { r = r * ( 1.0 - aFactor ) + aFactor; g = g * ( 1.0 - aFactor ) + aFactor; @@ -119,12 +119,12 @@ public: } /** - * Function Highlighted + * Function Brightened * Returns a color that is brighter by a given factor, without modifying object. * @param aFactor Specifies how bright the color should become (valid values: 0.0 .. 1.0). * @return COLOR4D Highlightedd color. */ - COLOR4D Highlighted( double aFactor ) const + COLOR4D Brightened( double aFactor ) const { return COLOR4D( r * ( 1.0 - aFactor ) + aFactor, g * ( 1.0 - aFactor ) + aFactor, diff --git a/include/view/view_item.h b/include/view/view_item.h index acef72c512..1cdc67f3e6 100644 --- a/include/view/view_item.h +++ b/include/view/view_item.h @@ -67,8 +67,7 @@ public: ALL = 0xff }; - VIEW_ITEM() : m_view( NULL ), m_visible( true ), m_highlighted( false ), - m_groups( NULL ), m_groupsSize( 0 ) {} + VIEW_ITEM() : m_view( NULL ), m_visible( true ), m_groups( NULL ), m_groupsSize( 0 ) {} /** * Destructor. For dynamic views, removes the item from the view. @@ -135,25 +134,6 @@ public: return m_visible; } - /** - * Function ViewSetHighlighted() - * Sets the item highlight. - * - * @param aIsHighlighted: whether the item is highlighted (on all layers), or not. - */ - void ViewSetHighlighted( bool aIsHighlighted = true ); - - /** - * Function ViewIsHighlighted() - * Returns if the item is highlighted (or not). - * - * @return when true, the item should be displayed as highlighted. - */ - bool ViewIsHighlighted() const - { - return m_highlighted; - } - /** * Function ViewGetLOD() * Returns the level of detail of the item. A level of detail is the minimal VIEW scale that @@ -191,7 +171,6 @@ protected: * * @param aView[]: dynamic VIEW instance the item is being added to. */ - void viewAssign( VIEW* aView ) { // release the item from a previously assigned dynamic view (if there is any) @@ -202,7 +181,6 @@ protected: VIEW* m_view; ///* Current dynamic view the item is assigned to. bool m_visible; ///* Are we visible in the current dynamic VIEW. - bool m_highlighted; ///* Should item be drawn as highlighted private: ///* Helper for storing cached items group ids diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index eb921914ea..476a47d927 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -143,17 +143,17 @@ void PCB_RENDER_SETTINGS::Update() for( int i = 0; i < NB_LAYERS; i++ ) { m_layerColors[i].a = m_layerOpacity; - m_layerColorsHi[i] = m_layerColors[i].Highlighted( m_highlightFactor ); + m_layerColorsHi[i] = m_layerColors[i].Brightened( m_highlightFactor ); m_layerColorsDark[i] = m_layerColors[i].Darkened( 1.0 - m_highlightFactor ); - m_layerColorsSel[i] = m_layerColors[i].Highlighted( m_selectFactor ); + m_layerColorsSel[i] = m_layerColors[i].Brightened( m_selectFactor ); } for( int i = 0; i < END_PCB_VISIBLE_LIST; i++ ) { m_itemColors[i].a = m_layerOpacity; - m_itemColorsHi[i] = m_itemColors[i].Highlighted( m_highlightFactor ); + m_itemColorsHi[i] = m_itemColors[i].Brightened( m_highlightFactor ); m_itemColorsDark[i] = m_itemColors[i].Darkened( 1.0 - m_highlightFactor ); - m_itemColorsSel[i] = m_itemColors[i].Highlighted( m_selectFactor ); + m_itemColorsSel[i] = m_itemColors[i].Brightened( m_selectFactor ); } m_hiContrastColor = COLOR4D( m_hiContrastFactor, m_hiContrastFactor, m_hiContrastFactor, @@ -176,22 +176,23 @@ const COLOR4D& PCB_PAINTER::GetColor( const VIEW_ITEM* aItem, int aLayer ) if( item ) netCode = item->GetNet(); - return getLayerColor( aLayer, netCode, aItem->ViewIsHighlighted() ); + return getLayerColor( aLayer, netCode, + static_cast( aItem )->IsSelected() ); } -const COLOR4D& PCB_PAINTER::getLayerColor( int aLayer, int aNetCode, bool aHighlighted ) const +const COLOR4D& PCB_PAINTER::getLayerColor( int aLayer, int aNetCode, bool aSelected ) const { - // Return grayish color for non-highlightezd layers in the high contrast mode + // Return grayish color for non-highlighted layers in the high contrast mode if( m_pcbSettings->m_hiContrastEnabled && m_pcbSettings->m_activeLayers.count( aLayer ) == 0 ) return m_pcbSettings->m_hiContrastColor; // For item layers (vias, texts, and so on) if( aLayer >= NB_LAYERS ) - return getItemColor( aLayer - NB_LAYERS, aNetCode, aHighlighted ); + return getItemColor( aLayer - NB_LAYERS, aNetCode, aSelected ); // Highlight per item basis - if( aHighlighted ) + if( aSelected ) return m_pcbSettings->m_layerColorsHi[aLayer]; // Single net highlight mode @@ -208,10 +209,10 @@ const COLOR4D& PCB_PAINTER::getLayerColor( int aLayer, int aNetCode, bool aHighl } -const COLOR4D& PCB_PAINTER::getItemColor( int aItemType, int aNetCode, bool aHighlighted ) const +const COLOR4D& PCB_PAINTER::getItemColor( int aItemType, int aNetCode, bool aSelected ) const { // Highlight per item basis - if( aHighlighted ) + if( aSelected ) return m_pcbSettings->m_itemColorsHi[aItemType]; if( m_pcbSettings->m_highlightEnabled ) @@ -308,8 +309,8 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) // Set a proper color for the label color = getLayerColor( aTrack->GetLayer(), aTrack->GetNet(), - aTrack->ViewIsHighlighted() ); - COLOR4D labelColor = getLayerColor( aLayer, 0, aTrack->ViewIsHighlighted() ); + aTrack->IsSelected() ); + COLOR4D labelColor = getLayerColor( aLayer, 0, aTrack->IsSelected() ); if( color.GetBrightness() > 0.5 ) m_gal->SetStrokeColor( labelColor.Inverted() ); @@ -329,7 +330,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) else if( IsCopperLayer( aLayer )) { // Draw a regular track - color = getLayerColor( aLayer, netNumber, aTrack->ViewIsHighlighted() ); + color = getLayerColor( aLayer, netNumber, aTrack->IsSelected() ); m_gal->SetStrokeColor( color ); m_gal->SetIsStroke( true ); @@ -368,7 +369,7 @@ void PCB_PAINTER::draw( const SEGVIA* aVia, int aLayer ) else return; - color = getLayerColor( aLayer, aVia->GetNet(), aVia->ViewIsHighlighted() ); + color = getLayerColor( aLayer, aVia->GetNet(), aVia->IsSelected() ); if( m_pcbSettings->m_sketchModeSelect[VIAS_VISIBLE] ) { @@ -448,8 +449,8 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) // Set a proper color for the label color = getLayerColor( aPad->GetParent()->GetLayer(), aPad->GetNet(), - aPad->ViewIsHighlighted() ); - COLOR4D labelColor = getLayerColor( aLayer, 0, aPad->ViewIsHighlighted() ); + aPad->IsSelected() ); + COLOR4D labelColor = getLayerColor( aLayer, 0, aPad->IsSelected() ); if( color.GetBrightness() > 0.5 ) m_gal->SetStrokeColor( labelColor.Inverted() ); @@ -494,7 +495,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) return; } - color = getLayerColor( aLayer, aPad->GetNet(), aPad->ViewIsHighlighted() ); + color = getLayerColor( aLayer, aPad->GetNet(), aPad->IsSelected() ); if( m_pcbSettings->m_sketchModeSelect[PADS_VISIBLE] ) { // Outline mode @@ -617,7 +618,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment ) { - COLOR4D color = getLayerColor( aSegment->GetLayer(), 0, aSegment->ViewIsHighlighted() ); + COLOR4D color = getLayerColor( aSegment->GetLayer(), 0, aSegment->IsSelected() ); m_gal->SetIsFill( false ); m_gal->SetIsStroke( true ); @@ -691,7 +692,7 @@ void PCB_PAINTER::draw( const TEXTE_PCB* aText ) if( aText->GetText().Length() == 0 ) return; - COLOR4D strokeColor = getLayerColor( aText->GetLayer(), 0, aText->ViewIsHighlighted() ); + COLOR4D strokeColor = getLayerColor( aText->GetLayer(), 0, aText->IsSelected() ); VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y ); double orientation = aText->GetOrientation() * M_PI / 1800.0; @@ -707,13 +708,13 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) if( aText->GetLength() == 0 ) return; - COLOR4D strokeColor = getLayerColor( aLayer, 0, aText->ViewIsHighlighted() ); + COLOR4D strokeColor = getLayerColor( aLayer, 0, aText->IsSelected() ); VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y); double orientation = aText->GetDrawRotation() * M_PI / 1800.0; m_gal->PushDepth(); - if(aText->ViewIsHighlighted()) + if(aText->IsSelected()) { EDA_RECT bb (aText->GetBoundingBox()); VECTOR2D s (bb.GetOrigin()); @@ -741,7 +742,7 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone ) { COLOR4D color = getLayerColor( aZone->GetLayer(), aZone->GetNet(), - aZone->ViewIsHighlighted() ); + aZone->IsSelected() ); std::deque corners; PCB_RENDER_SETTINGS::DisplayZonesMode displayMode = m_pcbSettings->m_displayZoneMode; @@ -811,7 +812,7 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone ) void PCB_PAINTER::draw( const DIMENSION* aDimension ) { COLOR4D strokeColor = getLayerColor( aDimension->GetLayer(), 0, - aDimension->ViewIsHighlighted() ); + aDimension->IsSelected() ); m_gal->SetStrokeColor( strokeColor ); m_gal->SetIsFill( false ); @@ -834,7 +835,7 @@ void PCB_PAINTER::draw( const DIMENSION* aDimension ) void PCB_PAINTER::draw( const PCB_TARGET* aTarget ) { - COLOR4D strokeColor = getLayerColor( aTarget->GetLayer(), 0, aTarget->ViewIsHighlighted() ); + COLOR4D strokeColor = getLayerColor( aTarget->GetLayer(), 0, aTarget->IsSelected() ); VECTOR2D position( aTarget->GetPosition() ); double size, radius; diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index a872fbb46c..c2cbc2978f 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -41,99 +41,104 @@ using namespace KiGfx; using boost::optional; - SELECTION_TOOL::SELECTION_TOOL() : - TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ) - { - m_selArea = new SELECTION_AREA; - - } + TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ) +{ + m_selArea = new SELECTION_AREA; +} SELECTION_TOOL::~SELECTION_TOOL() { - if(m_selArea) - delete m_selArea; + if( m_selArea ) + delete m_selArea; } void SELECTION_TOOL::Reset() { - // the tool launches upon reception of activate ("pcbnew.InteractiveSelection") - Go(&SELECTION_TOOL::Main, TOOL_EVENT(TC_Command, TA_ActivateTool, GetName())); //"pcbnew.InteractiveSelection")); + // the tool launches upon reception of activate ("pcbnew.InteractiveSelection") + Go( &SELECTION_TOOL::Main, TOOL_EVENT( TC_Command, TA_ActivateTool, GetName() ) ); //"pcbnew.InteractiveSelection")); } -int SELECTION_TOOL::Main(TOOL_EVENT& aEvent) + +int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) { - - // Main loop: keep receiving events - while(OPT_TOOL_EVENT evt = Wait ()) - { - if(evt->IsCancel ()) - return 0; - - // single click? Select single object - if( evt->IsClick (MB_Left) ) - selectSingle(evt->Position(), evt->Modifier( MB_ModShift )); - - // drag with LMB? Select multiple objects (or at least draw a selection box) - if (evt->IsDrag ( MB_Left )) - selectMultiple(); - } - - return 0; -} - -void SELECTION_TOOL::toggleSelection ( BOARD_ITEM * aItem, bool aAdditive ) -{ - - if(m_selectedItems.find(aItem) != m_selectedItems.end()) + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) { - aItem->ViewSetHighlighted(false); - m_selectedItems.erase(aItem); - } else { - if(!aAdditive) - clearSelection(); - aItem->ViewSetHighlighted(true); - m_selectedItems.insert(aItem); + + if( evt->IsCancel() ) + return 0; + + // single click? Select single object + if( evt->IsClick( MB_Left ) ) + selectSingle( evt->Position(), evt->Modifier( MB_ModShift ) ); + + // drag with LMB? Select multiple objects (or at least draw a selection box) + if( evt->IsDrag( MB_Left ) ) + selectMultiple(); + } + + return 0; +} + + +void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem, bool aAdditive ) +{ + + if( m_selectedItems.find( aItem ) != m_selectedItems.end() ) + { + aItem->ClearSelected(); + m_selectedItems.erase( aItem ); + } else + { + if( !aAdditive ) + clearSelection(); + aItem->SetSelected(); + m_selectedItems.insert( aItem ); } } -void SELECTION_TOOL::clearSelection () -{ - BOOST_FOREACH(BOARD_ITEM *item, m_selectedItems) - { - item->ViewSetHighlighted(false); - } - m_selectedItems.clear(); +void SELECTION_TOOL::clearSelection() +{ + BOOST_FOREACH(BOARD_ITEM* item, m_selectedItems) + { + item->ClearSelected(); + } + + m_selectedItems.clear(); } void SELECTION_TOOL::selectSingle( const VECTOR2I &aWhere, bool aAdditive ) { - BOARD *pcb = getModel (PCB_T); - BOARD_ITEM *item; + BOARD *pcb = getModel( PCB_T ); + BOARD_ITEM *item; GENERAL_COLLECTORS_GUIDE guide = getEditFrame()->GetCollectorsGuide(); GENERAL_COLLECTOR collector; - collector.Collect(pcb, GENERAL_COLLECTOR::AllBoardItems , wxPoint(aWhere.x, aWhere.y), guide); - + collector.Collect( pcb, GENERAL_COLLECTOR::AllBoardItems, wxPoint( aWhere.x, aWhere.y ), + guide ); + switch (collector.GetCount()) { - case 0: - if(!aAdditive) - clearSelection(); - break; - case 1: - toggleSelection( collector[0], aAdditive ); - break; - default: - item = disambiguationMenu(&collector); - if(item) - toggleSelection(item, aAdditive ); - break; + case 0: + if( !aAdditive ) + clearSelection(); + break; + + case 1: + toggleSelection( collector[0], aAdditive ); + break; + + default: + item = disambiguationMenu( &collector ); + if( item ) + toggleSelection( item, aAdditive ); + break; } } @@ -141,27 +146,27 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I &aWhere, bool aAdditive ) BOARD_ITEM* SELECTION_TOOL::pickSmallestComponent( GENERAL_COLLECTOR* aCollector ) { int count = aCollector->GetPrimaryCount(); // try to use preferred layer - if( 0 == count ) count = aCollector->GetCount(); + if( 0 == count ) + count = aCollector->GetCount(); - for( int i = 0; iType() != PCB_MODULE_T ) + if( ( *aCollector )[i]->Type() != PCB_MODULE_T ) return NULL; } - // all are modules, now find smallest MODULE - + // All are modules, now find smallest MODULE int minDim = 0x7FFFFFFF; int minNdx = 0; - for( int i = 0; iGetBoundingBox().GetWidth(); - int ly = module->GetBoundingBox().GetHeight(); + int lx = module->GetBoundingBox().GetWidth(); + int ly = module->GetBoundingBox().GetHeight(); - int lmin = std::min( lx, ly ); + int lmin = std::min( lx, ly ); if( lmin < minDim ) { @@ -170,107 +175,103 @@ BOARD_ITEM* SELECTION_TOOL::pickSmallestComponent( GENERAL_COLLECTOR* aCollector } } - return (*aCollector)[minNdx]; + return ( *aCollector )[minNdx]; } + void SELECTION_TOOL::handleHighlight( const VECTOR2D& aP ) { - } + void SELECTION_TOOL::selectMultiple() { - OPT_TOOL_EVENT evt; - VIEW *v = getView(); + OPT_TOOL_EVENT evt; + VIEW *v = getView(); - v->Add(m_selArea); + v->Add( m_selArea ); - while (evt = Wait()) - { - if(evt->IsCancel()) - break; + while( evt = Wait() ) + { + if( evt->IsCancel() ) + break; - if(evt->IsDrag( MB_Left )) - { - m_selArea->SetOrigin( evt->DragOrigin() ); - m_selArea->SetEnd( evt->Position() ); - m_selArea->ViewSetVisible(true); - m_selArea->ViewUpdate(VIEW_ITEM::APPEARANCE | VIEW_ITEM::GEOMETRY); - - - v->SetLayerVisible( SELECTION_AREA::SelectionLayer ); - v->SetLayerOrder( SELECTION_AREA::SelectionLayer, 1000); - v->SetLayerTarget( SELECTION_AREA::SelectionLayer, TARGET_OVERLAY ); - } + if( evt->IsDrag( MB_Left ) ) + { + m_selArea->SetOrigin( evt->DragOrigin() ); + m_selArea->SetEnd( evt->Position() ); + m_selArea->ViewSetVisible( true ); + m_selArea->ViewUpdate( VIEW_ITEM::APPEARANCE | VIEW_ITEM::GEOMETRY ); - if(evt->IsMouseUp( MB_Left )) - { - m_selArea->ViewSetVisible(false); - break; - } - } + v->SetLayerVisible( SELECTION_AREA::SelectionLayer ); + v->SetLayerOrder( SELECTION_AREA::SelectionLayer, 1000 ); + v->SetLayerTarget( SELECTION_AREA::SelectionLayer, TARGET_OVERLAY ); + } + if( evt->IsMouseUp( MB_Left ) ) + { + m_selArea->ViewSetVisible( false ); + break; + } + } - v->Remove(m_selArea); + v->Remove( m_selArea ); } -BOARD_ITEM *SELECTION_TOOL::disambiguationMenu ( GENERAL_COLLECTOR *aCollector ) +BOARD_ITEM *SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR *aCollector ) { - CONTEXT_MENU cmenu; - OPT_TOOL_EVENT evt ; - BOARD_ITEM *current = NULL; + CONTEXT_MENU cmenu; + OPT_TOOL_EVENT evt; + BOARD_ITEM *current = NULL; - cmenu.SetTitle( _("Clarify selection")); + cmenu.SetTitle( _( "Clarify selection" ) ); - int limit = std::min( 10, aCollector->GetCount() ); + int limit = std::min( 10, aCollector->GetCount() ); - for( int i = 0; iGetSelectMenuText(); - cmenu.Add(text, i); - } - - SetContextMenu(&cmenu, CMENU_NOW); + for( int i = 0; i < limit; ++i ) + { + wxString text; + BOARD_ITEM *item = ( *aCollector )[i]; + text = item->GetSelectMenuText(); + cmenu.Add( text, i ); + } - while (evt = Wait()) - { - - - if(evt->Action() == TA_ContextMenuUpdate ) - { - if(current) - current->ViewSetHighlighted(false); - - int id = *evt->GetCommandId(); - if(id >= 0) - { - current = (*aCollector) [id]; - current->ViewSetHighlighted(true); - } else - current = NULL; + SetContextMenu( &cmenu, CMENU_NOW ); - - } else if(evt->Action() == TA_ContextMenuChoice ) { + while( evt = Wait() ) + { + if( evt->Action() == TA_ContextMenuUpdate ) + { + if( current ) + current->ClearSelected(); - optional id = evt->GetCommandId(); + int id = *evt->GetCommandId(); + if( id >= 0 ) + { + current = ( *aCollector )[id]; + current->SetSelected(); + } else + current = NULL; - if(current) - current->ViewSetHighlighted(false); + } else if( evt->Action() == TA_ContextMenuChoice ) + { - if(id && (*id >= 0)) - { - current = (*aCollector) [*id]; - current->ViewSetHighlighted(true); - return current; - } - return NULL; - } + optional id = evt->GetCommandId(); - - } + if( current ) + current->ClearSelected(); - return NULL; -} \ No newline at end of file + if( id && ( *id >= 0 ) ) + { + current = ( *aCollector )[*id]; + current->SetSelected(); + return current; + } + return NULL; + } + + } + + return NULL; +} diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index b226be85cc..e3020d3758 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -36,7 +36,7 @@ class GENERAL_COLLECTOR; /** - * Class SELECTION_AREA + * Class SELECTION_TOOL * * Our sample selection tool: currently supports: * - pick single objects (click LMB) @@ -48,24 +48,24 @@ class GENERAL_COLLECTOR; class SELECTION_TOOL : public TOOL_INTERACTIVE { - public: - SELECTION_TOOL (); - ~SELECTION_TOOL (); +public: + SELECTION_TOOL (); + ~SELECTION_TOOL (); - void Reset(); - int Main(TOOL_EVENT& aEvent); + void Reset(); + int Main(TOOL_EVENT& aEvent); - private: - void selectSingle( const VECTOR2I &aWhere, bool aAdditive ); - void selectMultiple (); - void handleHighlight( const VECTOR2D& aP ); - BOARD_ITEM* disambiguationMenu ( GENERAL_COLLECTOR* aItems ); - BOARD_ITEM* pickSmallestComponent( GENERAL_COLLECTOR* aCollector ); - void toggleSelection ( BOARD_ITEM * aItem, bool aAdditive ); - void clearSelection (); - - std::set m_selectedItems; - SELECTION_AREA *m_selArea; +private: + void selectSingle( const VECTOR2I &aWhere, bool aAdditive ); + void selectMultiple (); + void handleHighlight( const VECTOR2D& aP ); + BOARD_ITEM* disambiguationMenu ( GENERAL_COLLECTOR* aItems ); + BOARD_ITEM* pickSmallestComponent( GENERAL_COLLECTOR* aCollector ); + void toggleSelection ( BOARD_ITEM * aItem, bool aAdditive ); + void clearSelection (); + + std::set m_selectedItems; + SELECTION_AREA* m_selArea; }; #endif From ff2a719bf7c21301184243b4e8808cf52be9fe04 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 6 Aug 2013 10:30:09 +0200 Subject: [PATCH 213/415] Code reformatting. --- common/tool/tool_dispatcher.cpp | 156 ++++++++++++++--------- common/tool/tool_manager.cpp | 118 ++++++++++------- include/gal/graphics_abstraction_layer.h | 7 +- include/tool/tool_dispatcher.h | 59 +++++---- include/tool/tool_manager.h | 48 +++---- pcbnew/tools/pcb_tools.cpp | 10 +- pcbnew/tools/selection_area.cpp | 12 +- pcbnew/tools/selection_area.h | 43 +++---- pcbnew/tools/selection_tool.cpp | 19 ++- pcbnew/tools/selection_tool.h | 10 +- 10 files changed, 273 insertions(+), 209 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 4e114a58c1..91df534df7 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -1,3 +1,27 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include @@ -19,12 +43,12 @@ using boost::optional; struct TOOL_DISPATCHER::ButtonState { - - ButtonState (TOOL_MouseButtons aButton, const wxEventType& aDownEvent, const wxEventType & aUpEvent, bool aTriggerMenu = false) : - button(aButton), - downEvent(aDownEvent), - upEvent(aUpEvent), - triggerContextMenu(aTriggerMenu) + ButtonState( TOOL_MouseButtons aButton, const wxEventType& aDownEvent, + const wxEventType & aUpEvent, bool aTriggerMenu = false) : + button( aButton ), + downEvent( aDownEvent ), + upEvent( aUpEvent ), + triggerContextMenu( aTriggerMenu ) {}; bool dragging; @@ -47,119 +71,123 @@ struct TOOL_DISPATCHER::ButtonState } }; -TOOL_DISPATCHER::TOOL_DISPATCHER( TOOL_MANAGER *aToolMgr, PCB_BASE_FRAME *aEditFrame ): - m_toolMgr(aToolMgr), - m_editFrame(aEditFrame) - { - - m_buttons.push_back(new ButtonState(MB_Left, wxEVT_LEFT_DOWN, wxEVT_LEFT_UP)); - m_buttons.push_back(new ButtonState(MB_Right, wxEVT_RIGHT_DOWN, wxEVT_RIGHT_UP, true)); - m_buttons.push_back(new ButtonState(MB_Middle, wxEVT_MIDDLE_DOWN, wxEVT_MIDDLE_UP)); - - ResetState(); - }; - + +TOOL_DISPATCHER::TOOL_DISPATCHER( TOOL_MANAGER *aToolMgr, PCB_BASE_FRAME *aEditFrame ) : + m_toolMgr(aToolMgr), m_editFrame(aEditFrame) +{ + m_buttons.push_back( new ButtonState( MB_Left, wxEVT_LEFT_DOWN, wxEVT_LEFT_UP ) ); + m_buttons.push_back( new ButtonState( MB_Right, wxEVT_RIGHT_DOWN, wxEVT_RIGHT_UP, true ) ); + m_buttons.push_back( new ButtonState( MB_Middle, wxEVT_MIDDLE_DOWN, wxEVT_MIDDLE_UP ) ); + + ResetState(); +} + + TOOL_DISPATCHER::~TOOL_DISPATCHER() { - BOOST_FOREACH(ButtonState *st, m_buttons) + BOOST_FOREACH( ButtonState* st, m_buttons ) delete st; } + void TOOL_DISPATCHER::ResetState() { - BOOST_FOREACH(ButtonState *st, m_buttons) + BOOST_FOREACH( ButtonState* st, m_buttons ) st->Reset(); } - KiGfx::VIEW* TOOL_DISPATCHER::getView() { return m_editFrame->GetGalCanvas()->GetView(); } + int TOOL_DISPATCHER::decodeModifiers( wxEvent& aEvent ) { - wxMouseEvent *me = static_cast (&aEvent); - int mods = 0; + wxMouseEvent* me = static_cast( &aEvent ); + int mods = 0; - if(me->ControlDown()) - mods |= MB_ModCtrl; - if(me->AltDown()) - mods |= MB_ModAlt; - if(me->ShiftDown()) - mods |= MB_ModShift; + if( me->ControlDown() ) + mods |= MB_ModCtrl; + if( me->AltDown() ) + mods |= MB_ModAlt; + if( me->ShiftDown() ) + mods |= MB_ModShift; return mods; } + bool TOOL_DISPATCHER::handleMouseButton ( wxEvent& aEvent, int aIndex, bool aMotion ) { - ButtonState *st = m_buttons[aIndex]; + ButtonState* st = m_buttons[aIndex]; wxEventType type = aEvent.GetEventType(); optional evt; bool up = type == st->upEvent; bool down = type == st->downEvent; - int mods = decodeModifiers(aEvent); + int mods = decodeModifiers( aEvent ); int args = st->button | mods; - if(down) + if( down ) { st->downTimestamp = wxGetLocalTimeMillis(); st->dragOrigin = m_lastMousePos; st->dragMaxDelta = 0; st->pressed = true; - evt = TOOL_EVENT (TC_Mouse, TA_MouseDown, args ); - } else if (up) + evt = TOOL_EVENT( TC_Mouse, TA_MouseDown, args ); + } + else if ( up ) { bool isClick = false; st->pressed = false; - if(st->dragging) + if( st->dragging ) { wxLongLong t = wxGetLocalTimeMillis(); if( t - st->downTimestamp < DragTimeThreshold && st->dragMaxDelta < DragDistanceThreshold ) isClick = true; else - evt = TOOL_EVENT (TC_Mouse, TA_MouseUp, args ); - } else + evt = TOOL_EVENT( TC_Mouse, TA_MouseUp, args ); + } + else isClick = true; - if(isClick) + if( isClick ) { - if(st -> triggerContextMenu && !mods) + if( st -> triggerContextMenu && !mods ) {} - // evt = TOOL_EVENT (TC_Command, TA_ContextMenu ); + // evt = TOOL_EVENT( TC_Command, TA_ContextMenu ); else - evt = TOOL_EVENT (TC_Mouse, TA_MouseClick, args ); + evt = TOOL_EVENT( TC_Mouse, TA_MouseClick, args ); } st->dragging = false; } - if(st->pressed && aMotion) + if( st->pressed && aMotion ) { st->dragging = true; - double dragPixelDistance = getView()->ToScreen(m_lastMousePos - st->dragOrigin, false).EuclideanNorm(); - st->dragMaxDelta = std::max(st->dragMaxDelta, dragPixelDistance); + double dragPixelDistance = getView()->ToScreen( m_lastMousePos - st->dragOrigin, false ).EuclideanNorm(); + st->dragMaxDelta = std::max( st->dragMaxDelta, dragPixelDistance ); wxLongLong t = wxGetLocalTimeMillis(); if( t - st->downTimestamp > DragTimeThreshold || st->dragMaxDelta > DragDistanceThreshold ) { - evt = TOOL_EVENT (TC_Mouse, TA_MouseDrag, args ); - evt->SetMouseDragOrigin(st->dragOrigin); - evt->SetMouseDelta(m_lastMousePos - st->dragOrigin); + evt = TOOL_EVENT( TC_Mouse, TA_MouseDrag, args ); + evt->SetMouseDragOrigin( st->dragOrigin ); + evt->SetMouseDelta( m_lastMousePos - st->dragOrigin ); } } - if(evt) + if( evt ) { - evt->SetMousePosition(m_lastMousePos); + evt->SetMousePosition( m_lastMousePos ); m_toolMgr->ProcessEvent( *evt ); return true; @@ -168,7 +196,8 @@ bool TOOL_DISPATCHER::handleMouseButton ( wxEvent& aEvent, int aIndex, bool aMot return false; } -void TOOL_DISPATCHER::DispatchWxEvent(wxEvent &aEvent) + +void TOOL_DISPATCHER::DispatchWxEvent( wxEvent &aEvent ) { bool motion = false, buttonEvents = false; VECTOR2D pos; @@ -178,37 +207,38 @@ void TOOL_DISPATCHER::DispatchWxEvent(wxEvent &aEvent) if( type == wxEVT_MOTION ) { - wxMouseEvent *me = static_cast (&aEvent); - pos = getView()->ToWorld ( VECTOR2D( me->GetX(), me->GetY() )); - if(pos != m_lastMousePos) + wxMouseEvent *me = static_cast(&aEvent ); + pos = getView()->ToWorld( VECTOR2D( me->GetX(), me->GetY() ) ); + if( pos != m_lastMousePos ) { motion = true; m_lastMousePos = pos; } } - for(unsigned int i = 0; i < m_buttons.size(); i++) - buttonEvents |= handleMouseButton(aEvent, i, motion); + for( unsigned int i = 0; i < m_buttons.size(); i++ ) + buttonEvents |= handleMouseButton( aEvent, i, motion ); - if(!buttonEvents && motion) + if( !buttonEvents && motion ) { evt = TOOL_EVENT (TC_Mouse, TA_MouseMotion ); - evt->SetMousePosition(pos); + evt->SetMousePosition( pos ); } - if(evt) + if( evt ) m_toolMgr->ProcessEvent( *evt ); aEvent.Skip(); } -void TOOL_DISPATCHER::DispatchWxCommand(wxCommandEvent &aEvent) + +void TOOL_DISPATCHER::DispatchWxCommand( wxCommandEvent &aEvent ) { bool activateTool = false; std::string toolName; - switch (aEvent.GetId()) + switch ( aEvent.GetId() ) { case ID_SELECTION_TOOL: toolName = "pcbnew.InteractiveSelection"; @@ -216,9 +246,9 @@ void TOOL_DISPATCHER::DispatchWxCommand(wxCommandEvent &aEvent) break; } - if(activateTool) + if( activateTool ) { TOOL_EVENT evt ( TC_Command, TA_ActivateTool, toolName ); - m_toolMgr->ProcessEvent(evt); + m_toolMgr->ProcessEvent( evt ); } -} \ No newline at end of file +} diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 2fa4e702e5..f1855907ee 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -1,7 +1,30 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include - #include #include #include @@ -24,33 +47,30 @@ using namespace std; struct TOOL_MANAGER::ToolState { - TOOL_BASE *theTool; + TOOL_BASE* theTool; bool idle; bool pendingWait; bool pendingContextMenu; - CONTEXT_MENU *contextMenu; + CONTEXT_MENU* contextMenu; TOOL_ContextMenuTrigger contextMenuTrigger; - COROUTINE *cofunc; + COROUTINE* cofunc; TOOL_EVENT wakeupEvent; TOOL_EVENT_LIST waitEvents; std::vector transitions; - - }; TOOL_MANAGER::TOOL_MANAGER() { - } void TOOL_MANAGER::RegisterTool ( TOOL_BASE *aTool ) { - ToolState *st = new ToolState; + ToolState* st = new ToolState; st->theTool = aTool; st->idle = true; @@ -59,25 +79,29 @@ void TOOL_MANAGER::RegisterTool ( TOOL_BASE *aTool ) st->cofunc = NULL; st->contextMenuTrigger = CMENU_OFF; - m_toolState[ aTool ] = st; - m_toolNameIndex [ aTool->GetName() ] = st; - m_toolIdIndex [ aTool->GetId() ] = st; + m_toolState[aTool] = st; + m_toolNameIndex[aTool->GetName()] = st; + m_toolIdIndex[aTool->GetId()] = st; aTool->m_toolMgr = this; - if(aTool->GetType() == TOOL_Interactive) - static_cast(aTool)->Reset(); + if( aTool->GetType() == TOOL_Interactive ) + static_cast( aTool )->Reset(); } -void TOOL_MANAGER::ScheduleNextState( TOOL_BASE *aTool, TOOL_STATE_FUNC& aHandler, const TOOL_EVENT_LIST & aConditions ) + +void TOOL_MANAGER::ScheduleNextState( TOOL_BASE *aTool, TOOL_STATE_FUNC& aHandler, + const TOOL_EVENT_LIST& aConditions ) { - ToolState *st = m_toolState [aTool]; - st->transitions.push_back ( Transition (aConditions, aHandler )); + ToolState* st = m_toolState[aTool]; + st->transitions.push_back( Transition( aConditions, aHandler ) ); } -optional TOOL_MANAGER::ScheduleWait( TOOL_BASE *aTool, const TOOL_EVENT_LIST & aConditions ) + +optional TOOL_MANAGER::ScheduleWait( TOOL_BASE *aTool, + const TOOL_EVENT_LIST& aConditions ) { - ToolState *st = m_toolState [aTool]; + ToolState *st = m_toolState[aTool]; st->pendingWait = true; st->waitEvents = aConditions; @@ -86,34 +110,36 @@ optional TOOL_MANAGER::ScheduleWait( TOOL_BASE *aTool, const TOOL_EV return st->wakeupEvent; } -void TOOL_MANAGER::dispatchInternal ( TOOL_EVENT& aEvent ) + +void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) { // iterate over all registered tools - BOOST_FOREACH(ToolState *st, m_toolState | boost::adaptors::map_values) + BOOST_FOREACH( ToolState* st, m_toolState | boost::adaptors::map_values ) { // the tool state handler is waiting for events (i.e. called Wait() method) - if(st->pendingWait) + if( st->pendingWait ) { - - if( st->waitEvents.Matches(aEvent) ) + if( st->waitEvents.Matches( aEvent ) ) { // got matching event? clear wait list and wake up the coroutine st->wakeupEvent = aEvent; st->pendingWait = false; st->waitEvents.clear(); st->cofunc->Resume(); - if(!st->cofunc->Running()) + if( !st->cofunc->Running() ) delete st->cofunc; - } - } else { + } + else + { // no state handler in progress - check if there are any transitions (defined by // Go() method that match the event. - if(st->transitions.size()) { - BOOST_FOREACH(Transition tr, st->transitions) + if( st->transitions.size() ) + { + BOOST_FOREACH( Transition tr, st->transitions ) { - if(tr.first.Matches(aEvent)) + if( tr.first.Matches( aEvent ) ) { st->transitions.clear(); @@ -123,9 +149,9 @@ void TOOL_MANAGER::dispatchInternal ( TOOL_EVENT& aEvent ) st->cofunc->SetEntry( tr.second ); // got match? Run the handler. - st->cofunc->Call(aEvent); + st->cofunc->Call( aEvent ); - if(!st->cofunc->Running()) + if( !st->cofunc->Running() ) delete st->cofunc; } } @@ -134,16 +160,16 @@ void TOOL_MANAGER::dispatchInternal ( TOOL_EVENT& aEvent ) } } -bool TOOL_MANAGER::ProcessEvent (TOOL_EVENT& aEvent) + +bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) { - printf("process: %s\n", aEvent.Format().c_str()); + printf( "process: %s\n", aEvent.Format().c_str() ); - dispatchInternal(aEvent); + dispatchInternal( aEvent ); - - BOOST_FOREACH(ToolState *st, m_toolState | boost::adaptors::map_values) + BOOST_FOREACH( ToolState* st, m_toolState | boost::adaptors::map_values ) { - if(st->contextMenuTrigger == CMENU_NOW) + if( st->contextMenuTrigger == CMENU_NOW ) { st->pendingWait = true; st->waitEvents = TOOL_EVENT ( TC_Any, TA_Any ); @@ -157,33 +183,37 @@ bool TOOL_MANAGER::ProcessEvent (TOOL_EVENT& aEvent) } } - if(m_view->IsDirty()) + if( m_view->IsDirty() ) { - PCB_EDIT_FRAME *f = static_cast(GetEditFrame()); + PCB_EDIT_FRAME* f = static_cast( GetEditFrame() ); f->GetGalCanvas()->Refresh(); // fixme: ugly hack, provide a method in TOOL_DISPATCHER. } return false; } -void TOOL_MANAGER::ScheduleContextMenu( TOOL_BASE *aTool, CONTEXT_MENU *aMenu, TOOL_ContextMenuTrigger aTrigger ) + +void TOOL_MANAGER::ScheduleContextMenu( TOOL_BASE* aTool, CONTEXT_MENU* aMenu, + TOOL_ContextMenuTrigger aTrigger ) { - ToolState *st = m_toolState [aTool]; + ToolState* st = m_toolState[aTool]; st->contextMenu = aMenu; st->contextMenuTrigger = aTrigger; - if(aTrigger == CMENU_NOW) + if( aTrigger == CMENU_NOW ) st->cofunc->Yield(); } -TOOL_ID TOOL_MANAGER::MakeToolId( const std::string &aToolName ) + +TOOL_ID TOOL_MANAGER::MakeToolId( const std::string& aToolName ) { static int currentId; return currentId++; } -void TOOL_MANAGER::SetEnvironment( EDA_ITEM *aModel, KiGfx::VIEW* aView, KiGfx::VIEW_CONTROLS *aViewControls, wxWindow *aFrame ) +void TOOL_MANAGER::SetEnvironment( EDA_ITEM* aModel, KiGfx::VIEW* aView, + KiGfx::VIEW_CONTROLS* aViewControls, wxWindow* aFrame ) { m_model = aModel; m_view = aView; diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index bc81a32f6c..3aaf93ecad 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -29,6 +29,7 @@ #include #include +#include #include @@ -717,9 +718,13 @@ public: */ virtual void DrawCursor( VECTOR2D aCursorPosition ) = 0; + /** + * @brief Changes the current depth to deeper, so it is possible to draw objects right beneath + * other. + */ inline void AdvanceDepth() { - layerDepth -= 0.1; // fixme: there should be a minimum step + layerDepth -= std::numeric_limits::epsilon(); } /** diff --git a/include/tool/tool_dispatcher.h b/include/tool/tool_dispatcher.h index 572d4bc60e..2060b0d544 100644 --- a/include/tool/tool_dispatcher.h +++ b/include/tool/tool_dispatcher.h @@ -50,40 +50,39 @@ namespace KiGfx { class TOOL_DISPATCHER { - public: - /** - * Constructor - * - * @param aToolMgr: tool manager instance the events will be sent to - * @param aEditFrame: the frame wx events come from - */ - TOOL_DISPATCHER( TOOL_MANAGER *aToolMgr, PCB_BASE_FRAME *aEditFrame ); - ~TOOL_DISPATCHER(); - - virtual void ResetState (); - virtual void DispatchWxEvent(wxEvent &aEvent); - virtual void DispatchWxCommand(wxCommandEvent &aEvent); - - private: - - static const int MouseButtonCount = 3; - static const int DragTimeThreshold = 300; - static const int DragDistanceThreshold = 8; +public: + /** + * Constructor + * + * @param aToolMgr: tool manager instance the events will be sent to + * @param aEditFrame: the frame wx events come from + */ + TOOL_DISPATCHER( TOOL_MANAGER* aToolMgr, PCB_BASE_FRAME* aEditFrame ); + virtual ~TOOL_DISPATCHER(); - bool handleMouseButton ( wxEvent& aEvent, int aIndex, bool aMotion ); - bool handleKeys ( wxEvent& aEvent ); - bool handlePopupMenu ( wxEvent& aEvent ); + virtual void ResetState(); + virtual void DispatchWxEvent( wxEvent& aEvent ); + virtual void DispatchWxCommand( wxCommandEvent& aEvent ); - int decodeModifiers( wxEvent& aEvent ); +private: + static const int MouseButtonCount = 3; + static const int DragTimeThreshold = 300; + static const int DragDistanceThreshold = 8; - KiGfx::VIEW *getView(); + bool handleMouseButton ( wxEvent& aEvent, int aIndex, bool aMotion ); + bool handleKeys ( wxEvent& aEvent ); + bool handlePopupMenu ( wxEvent& aEvent ); - struct ButtonState; - - TOOL_MANAGER *m_toolMgr; - PCB_BASE_FRAME *m_editFrame; - VECTOR2D m_lastMousePos; - std::vector m_buttons; + int decodeModifiers( wxEvent& aEvent ); + + KiGfx::VIEW* getView(); + + struct ButtonState; + + TOOL_MANAGER* m_toolMgr; + PCB_BASE_FRAME* m_editFrame; + VECTOR2D m_lastMousePos; + std::vector m_buttons; }; diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index 4a70d5048a..a41200b6e7 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -58,7 +58,7 @@ class TOOL_MANAGER /** * Generates an unique ID from for a tool with given name. */ - static TOOL_ID MakeToolId( const std::string &aToolName ); + static TOOL_ID MakeToolId( const std::string& aToolName ); /** * Function RegisterTool() @@ -66,46 +66,46 @@ class TOOL_MANAGER * each tool during application initialization. * @param aTool: tool to be added. Ownership is transferred. */ - void RegisterTool(TOOL_BASE *aTool); + void RegisterTool( TOOL_BASE* aTool ); /** * Function InvokeTool() * Calls a tool by sending a tool activation event to tool of given ID or name. * An user-defined parameter object can be also passed */ - void InvokeTool(TOOL_ID aToolId); - void InvokeTool(const std::string& name); + void InvokeTool( TOOL_ID aToolId ); + void InvokeTool( const std::string& name ); template - void InvokeTool( const std::string& name, const Parameters& aToolParams); + void InvokeTool( const std::string& name, const Parameters& aToolParams ); /** * Function FindTool() * Searches for a tool with given name or ID */ - TOOL_BASE *FindTool(int aId); - TOOL_BASE *FindTool(const std::string& aName); + TOOL_BASE *FindTool( int aId ); + TOOL_BASE *FindTool( const std::string& aName ); /** * Resets the state of a given tool by clearing its wait and * transition lists and calling tool's internal Reset() method. */ - void ResetTool( TOOL_BASE *aTool ); /** * Takes an event from the TOOL_DISPATCHER and propagates it to * tools that requested events of matching type(s) */ - bool ProcessEvent (TOOL_EVENT& aEvent); + bool ProcessEvent( TOOL_EVENT& aEvent ); /** * Sets the work environment (model, view, view controls and the parent window). * These are made available to the tool. Called by the parent frame (PCB_EDIT_FRAME) * when the board is set up */ - void SetEnvironment( EDA_ITEM *aModel, KiGfx::VIEW* aView, KiGfx::VIEW_CONTROLS *aViewControls, wxWindow *aFrame ); + void SetEnvironment( EDA_ITEM* aModel, KiGfx::VIEW* aView, + KiGfx::VIEW_CONTROLS* aViewControls, wxWindow* aFrame ); /* Accessors for the environment objects (view, model, etc.) */ KiGfx::VIEW* GetView() @@ -132,13 +132,16 @@ class TOOL_MANAGER * Defines a state transition - the events that cause a given handler method in the tool * to be called. Called by TOOL_INTERACTIVE::Go(). May be called from a coroutine context. */ - void ScheduleNextState( TOOL_BASE *aTool, TOOL_STATE_FUNC& aHandler, const TOOL_EVENT_LIST & aConditions ); + void ScheduleNextState( TOOL_BASE* aTool, TOOL_STATE_FUNC& aHandler, + const TOOL_EVENT_LIST& aConditions ); /** - * Pauses execution of a given tool until one or more events matching aConditions arrives. The pause/resume - * operation is done through COROUTINE object. Called only from coroutines. + * Pauses execution of a given tool until one or more events matching aConditions arrives. + * The pause/resume operation is done through COROUTINE object. + * Called only from coroutines. */ - boost::optional ScheduleWait( TOOL_BASE *aTool, const TOOL_EVENT_LIST & aConditions ); + boost::optional ScheduleWait( TOOL_BASE* aTool, + const TOOL_EVENT_LIST& aConditions ); /** * Sets behaviour of the tool's context popup menu. @@ -149,10 +152,10 @@ class TOOL_MANAGER * CMENU_OFF: menu is disabled. * May be called from a coroutine context. */ - void ScheduleContextMenu( TOOL_BASE *aTool, CONTEXT_MENU *aMenu, TOOL_ContextMenuTrigger aTrigger ); + void ScheduleContextMenu( TOOL_BASE* aTool, CONTEXT_MENU* aMenu, + TOOL_ContextMenuTrigger aTrigger ); private: - void dispatchInternal ( TOOL_EVENT& aEvent ); struct ToolState; @@ -162,13 +165,12 @@ class TOOL_MANAGER std::map m_toolNameIndex; std::map m_toolIdIndex; - EDA_ITEM *m_model; - KiGfx::VIEW *m_view; - KiGfx::VIEW_CONTROLS *m_viewControls; - wxWindow *m_editFrame; + EDA_ITEM* m_model; + KiGfx::VIEW* m_view; + KiGfx::VIEW_CONTROLS* m_viewControls; + wxWindow* m_editFrame; - ToolState *m_currentTool; + ToolState* m_currentTool; }; - -#endif \ No newline at end of file +#endif diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index d2c60a5498..4ee70cde94 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -41,15 +41,15 @@ void PCB_EDIT_FRAME::setupTools() // create the manager and dispatcher. Route draw panel events to the dispatcher. m_toolManager = new TOOL_MANAGER; m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager, this ); - m_galCanvas->SetEventDispatcher (m_toolDispatcher); + m_galCanvas->SetEventDispatcher( m_toolDispatcher ); // register our selection tool. - m_toolManager->RegisterTool(new SELECTION_TOOL); - + m_toolManager->RegisterTool( new SELECTION_TOOL ); } -void PCB_EDIT_FRAME::onGenericCommand(wxCommandEvent &aEvent) + +void PCB_EDIT_FRAME::onGenericCommand( wxCommandEvent &aEvent ) { - m_toolDispatcher->DispatchWxCommand(aEvent); + m_toolDispatcher->DispatchWxCommand( aEvent ); } diff --git a/pcbnew/tools/selection_area.cpp b/pcbnew/tools/selection_area.cpp index 717a09bfc6..3b8c52d0e6 100644 --- a/pcbnew/tools/selection_area.cpp +++ b/pcbnew/tools/selection_area.cpp @@ -39,15 +39,17 @@ const BOX2I SELECTION_AREA::ViewBBox() const return tmp; } + void SELECTION_AREA::ViewGetLayers( int aLayers[], int& aCount ) const { aLayers[0] = SelectionLayer; aCount = 1; } + void SELECTION_AREA::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const { - VECTOR2D width = m_view->ToWorld( VECTOR2D(1.0, 1.0), false ); // fixme: pixel-sized stroke width setting? + VECTOR2D width = m_view->ToWorld( VECTOR2D( 1.0, 1.0 ), false ); // fixme: pixel-sized stroke width setting? aGal->SetLineWidth( width.x ); aGal->SetStrokeColor(COLOR4D(1.0, 1.0, 0.4, 1.0)); aGal->SetFillColor(COLOR4D(0.3, 0.3, 0.5, 0.3)); @@ -57,6 +59,8 @@ void SELECTION_AREA::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea aGal->DrawRectangle(m_origin, m_end); } -SELECTION_AREA::SELECTION_AREA(): - EDA_ITEM(NOT_USED) // this item is never added to a BOARD so it needs no type. - {} \ No newline at end of file + +SELECTION_AREA::SELECTION_AREA() : + EDA_ITEM( NOT_USED ) // this item is never added to a BOARD so it needs no type. +{ +} diff --git a/pcbnew/tools/selection_area.h b/pcbnew/tools/selection_area.h index f4677f40a7..e004339d9b 100644 --- a/pcbnew/tools/selection_area.h +++ b/pcbnew/tools/selection_area.h @@ -41,36 +41,33 @@ */ class SELECTION_AREA : public EDA_ITEM { - public: - static const int SelectionLayer = 126; // fixme: define globally +public: + static const int SelectionLayer = 126; // fixme: define globally - SELECTION_AREA(); - ~SELECTION_AREA() {}; + SELECTION_AREA(); + ~SELECTION_AREA() {}; - virtual const BOX2I ViewBBox() const; + virtual const BOX2I ViewBBox() const; - void ViewDraw( int aLayer, KiGfx::GAL* aGal, const BOX2I& aVisibleArea ) const; - void ViewGetLayers( int aLayers[], int& aCount ) const; + void ViewDraw( int aLayer, KiGfx::GAL* aGal, const BOX2I& aVisibleArea ) const; + void ViewGetLayers( int aLayers[], int& aCount ) const; - void SetOrigin ( VECTOR2I aOrigin ) - { - m_origin = aOrigin; - } + void SetOrigin ( VECTOR2I aOrigin ) + { + m_origin = aOrigin; + } - void SetEnd ( VECTOR2I aEnd ) - { - m_end = aEnd; - } + void SetEnd ( VECTOR2I aEnd ) + { + m_end = aEnd; + } - void Show(int x, std::ostream& st) const - { + void Show(int x, std::ostream& st) const + { + } - } - - private: - - - VECTOR2I m_origin, m_end; +private: + VECTOR2I m_origin, m_end; }; #endif diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index c2cbc2978f..acd33326d6 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -64,11 +64,9 @@ void SELECTION_TOOL::Reset() int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) { - // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { - if( evt->IsCancel() ) return 0; @@ -87,7 +85,6 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem, bool aAdditive ) { - if( m_selectedItems.find( aItem ) != m_selectedItems.end() ) { aItem->ClearSelected(); @@ -104,7 +101,7 @@ void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem, bool aAdditive ) void SELECTION_TOOL::clearSelection() { - BOOST_FOREACH(BOARD_ITEM* item, m_selectedItems) + BOOST_FOREACH( BOARD_ITEM* item, m_selectedItems ) { item->ClearSelected(); } @@ -113,17 +110,17 @@ void SELECTION_TOOL::clearSelection() } -void SELECTION_TOOL::selectSingle( const VECTOR2I &aWhere, bool aAdditive ) +void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere, bool aAdditive ) { - BOARD *pcb = getModel( PCB_T ); - BOARD_ITEM *item; + BOARD* pcb = getModel( PCB_T ); + BOARD_ITEM* item; GENERAL_COLLECTORS_GUIDE guide = getEditFrame()->GetCollectorsGuide(); GENERAL_COLLECTOR collector; collector.Collect( pcb, GENERAL_COLLECTOR::AllBoardItems, wxPoint( aWhere.x, aWhere.y ), guide ); - switch (collector.GetCount()) + switch( collector.GetCount() ) { case 0: if( !aAdditive ) @@ -161,7 +158,7 @@ BOARD_ITEM* SELECTION_TOOL::pickSmallestComponent( GENERAL_COLLECTOR* aCollector for( int i = 0; i < count; ++i ) { - MODULE* module = (MODULE*) ( *aCollector )[i]; + MODULE* module = (MODULE*)( *aCollector )[i]; int lx = module->GetBoundingBox().GetWidth(); int ly = module->GetBoundingBox().GetHeight(); @@ -175,7 +172,7 @@ BOARD_ITEM* SELECTION_TOOL::pickSmallestComponent( GENERAL_COLLECTOR* aCollector } } - return ( *aCollector )[minNdx]; + return (*aCollector)[minNdx]; } @@ -219,7 +216,7 @@ void SELECTION_TOOL::selectMultiple() } -BOARD_ITEM *SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR *aCollector ) +BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR *aCollector ) { CONTEXT_MENU cmenu; OPT_TOOL_EVENT evt; diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index e3020d3758..8db55dd306 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -56,13 +56,13 @@ public: int Main(TOOL_EVENT& aEvent); private: - void selectSingle( const VECTOR2I &aWhere, bool aAdditive ); - void selectMultiple (); + void selectSingle( const VECTOR2I& aWhere, bool aAdditive ); + void selectMultiple(); void handleHighlight( const VECTOR2D& aP ); - BOARD_ITEM* disambiguationMenu ( GENERAL_COLLECTOR* aItems ); + BOARD_ITEM* disambiguationMenu( GENERAL_COLLECTOR* aItems ); BOARD_ITEM* pickSmallestComponent( GENERAL_COLLECTOR* aCollector ); - void toggleSelection ( BOARD_ITEM * aItem, bool aAdditive ); - void clearSelection (); + void toggleSelection( BOARD_ITEM* aItem, bool aAdditive ); + void clearSelection(); std::set m_selectedItems; SELECTION_AREA* m_selArea; From 3096a26b594c38ffca65370c440b69f4fe078acb Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 6 Aug 2013 14:57:48 +0200 Subject: [PATCH 214/415] Added GetTarget() for GALs. --- common/gal/cairo/cairo_gal.cpp | 8 ++++++++ common/gal/opengl/opengl_gal.cpp | 8 ++++++++ include/gal/cairo/cairo_gal.h | 4 ++++ include/gal/graphics_abstraction_layer.h | 7 +++++++ include/gal/opengl/opengl_gal.h | 4 ++++ 5 files changed, 31 insertions(+) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index c7e4f6b8ed..91e614f8fa 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -740,6 +740,14 @@ void CAIRO_GAL::SetTarget( RenderTarget aTarget ) } cairo_push_group( currentContext ); + + currentTarget = aTarget; +} + + +RenderTarget CAIRO_GAL::GetTarget() const +{ + return currentTarget; } diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 358a7add09..9b6b17ff8b 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -700,6 +700,14 @@ void OPENGL_GAL::SetTarget( RenderTarget aTarget ) currentManager = &overlayManager; break; } + + currentTarget = aTarget; +} + + +RenderTarget OPENGL_GAL::GetTarget() const +{ + return currentTarget; } diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 14d4ca9827..818cf0a84a 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -218,6 +218,9 @@ public: /// @copydoc GAL::SetTarget() virtual void SetTarget( RenderTarget aTarget ); + /// @copydoc GAL::GetTarget() + virtual RenderTarget GetTarget() const; + // ------- // Cursor // ------- @@ -263,6 +266,7 @@ private: boost::shared_ptr compositor; ///< Object for layers compositing unsigned int mainBuffer; ///< Handle to the main buffer unsigned int overlayBuffer; ///< Handle to the overlay buffer + RenderTarget currentTarget; ///< Current rendering target // Variables related to wxWidgets wxWindow* parentWindow; ///< Parent window diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 3aaf93ecad..677cc28ac1 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -572,6 +572,13 @@ public: */ virtual void SetTarget( RenderTarget aTarget ) = 0; + /** + * @brief Gets the currently used target for rendering. + * + * @return The current rendering target. + */ + virtual RenderTarget GetTarget() const = 0; + // ------------- // Grid methods // ------------- diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 4291090520..795f1e7622 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -211,6 +211,9 @@ public: /// @copydoc GAL::SetTarget() virtual void SetTarget( RenderTarget aTarget ); + /// @copydoc GAL::GetTarget() + virtual RenderTarget GetTarget() const; + // ------- // Cursor // ------- @@ -283,6 +286,7 @@ private: OPENGL_COMPOSITOR compositor; ///< Handles multiple rendering targets unsigned int mainBuffer; ///< Main rendering target unsigned int overlayBuffer; ///< Auxiliary rendering target (for menus etc.) + RenderTarget currentTarget; ///< Current rendering target // Shader SHADER shader; ///< There is only one shader used for different objects From 59201379682a34db63e65f703618739ec8be32bc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 7 Aug 2013 09:37:28 +0200 Subject: [PATCH 215/415] Removed frame limiter. --- common/drawpanel_gal.cpp | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index f85fceeed3..16c59c3ced 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -99,8 +99,6 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin Connect( wxEVT_MOUSEWHEEL, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_KEY_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_KEY_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - - m_timeStamp = 0; } @@ -134,14 +132,6 @@ void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent ) void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) { - const unsigned int FPS_LIMIT = 40; - - // Framerate limiter - wxLongLong currentTimeStamp = wxGetLocalTimeMillis(); - // if( currentTimeStamp - m_timeStamp < ( 1000 / FPS_LIMIT ) ) - // return; - m_timeStamp = currentTimeStamp; - #ifdef __WXDEBUG__ prof_counter time; @@ -209,19 +199,23 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) m_currentGal = aGalType; } + void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent ) { - if(!m_eventDispatcher) + if( !m_eventDispatcher ) { aEvent.Skip(); return; - } else { - printf("evType %d\n", aEvent.GetEventType()); - m_eventDispatcher->DispatchWxEvent(aEvent); + } + else + { + printf( "evType %d\n", aEvent.GetEventType() ); + m_eventDispatcher->DispatchWxEvent( aEvent ); } } + KiGfx::VIEW_CONTROLS* EDA_DRAW_PANEL_GAL::GetViewControls() const { return m_viewControls; -} \ No newline at end of file +} From f33a4975ef8b100528852f0161cad12f56d2b4bc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 7 Aug 2013 09:51:39 +0200 Subject: [PATCH 216/415] Simplified color computation. --- common/painter.cpp | 2 +- include/painter.h | 27 +++------ pcbnew/pcb_painter.cpp | 127 +++++++++++++++-------------------------- pcbnew/pcb_painter.h | 39 ++++--------- 4 files changed, 67 insertions(+), 128 deletions(-) diff --git a/common/painter.cpp b/common/painter.cpp index 6d0f2d8543..799fdc39e8 100644 --- a/common/painter.cpp +++ b/common/painter.cpp @@ -57,7 +57,7 @@ RENDER_SETTINGS::~RENDER_SETTINGS() } -void RENDER_SETTINGS::Update() +void RENDER_SETTINGS::update() { m_hiContrastColor = COLOR4D( m_hiContrastFactor, m_hiContrastFactor, m_highlightFactor, m_layerOpacity ); diff --git a/include/painter.h b/include/painter.h index 8b6dc374d2..8ab5c22b30 100644 --- a/include/painter.h +++ b/include/painter.h @@ -59,13 +59,6 @@ public: RENDER_SETTINGS(); virtual ~RENDER_SETTINGS(); - /** - * Function Update - * Precalculates extra colors for layers (eg. highlighted, darkened and any needed version - * of base colors). - */ - virtual void Update(); - /** * Function ImportLegacyColors * Loads a list of color settings for layers. @@ -122,6 +115,13 @@ public: } protected: + /** + * Function update + * Precalculates extra colors for layers (eg. highlighted, darkened and any needed version + * of base colors). + */ + virtual void update(); + std::set m_activeLayers; /// Stores active layers number /// Parameters for display modes @@ -138,8 +138,7 @@ protected: COLOR4D m_selectionBorderColor; /// Color of selection box border float m_selectFactor; /// Specifies how color of selected items is changed - float m_layerOpacity; /// Determines opacity of all layers, so every can be seen - /// at the same time + float m_layerOpacity; /// Determines opacity of all layers float m_outlineWidth; /// Line width used when drawing outlines /// Map of colors that were usually used for display @@ -226,16 +225,6 @@ public: virtual const COLOR4D& GetColor( const VIEW_ITEM* aItem, int aLayer ) = 0; protected: - /** - * Function getLayerColor - * is used for obtaining color that should be used for specific layer/net - * combination using stored color settings. - * @param aLayer is the layer number that is being drawn. - * @param aNetCode is a number of the net that is being drawn. - * @param aHighlighted says if the item is marked as highlighted. - */ - virtual const COLOR4D& getLayerColor( int aLayer, int aNetCode, bool aHighlighted ) const = 0; - /// Instance of graphic abstraction layer that gives an interface to call /// commands used to draw (eg. DrawLine, DrawCircle, etc.) GAL* m_gal; diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 476a47d927..49260064bc 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -51,7 +51,7 @@ PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS() m_sketchModeSelect[i] = false; } - Update(); + update(); } @@ -64,26 +64,26 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings for( int i = 0; i < END_PCB_VISIBLE_LIST; i++ ) { - m_itemColors[i] = m_legacyColorMap[aSettings->GetItemColor( i )]; + m_layerColors[ITEM_GAL_LAYER( i )] = m_legacyColorMap[aSettings->GetItemColor( i )]; } // Default colors for specific layers - m_itemColors[VIAS_HOLES_VISIBLE] = COLOR4D( 0.5, 0.4, 0.0, 1.0 ); - m_itemColors[PADS_HOLES_VISIBLE] = COLOR4D( 0.0, 0.5, 0.5, 1.0 ); - m_itemColors[VIAS_VISIBLE] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); - m_itemColors[PADS_VISIBLE] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); - m_itemColors[PADS_NETNAMES_VISIBLE] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); - m_itemColors[PAD_FR_NETNAMES_VISIBLE] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); - m_itemColors[PAD_BK_NETNAMES_VISIBLE] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); + m_layerColors[ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE )] = COLOR4D( 0.5, 0.4, 0.0, 1.0 ); + m_layerColors[ITEM_GAL_LAYER( PADS_HOLES_VISIBLE )] = COLOR4D( 0.0, 0.5, 0.5, 1.0 ); + m_layerColors[ITEM_GAL_LAYER( VIAS_VISIBLE )] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); + m_layerColors[ITEM_GAL_LAYER( PADS_VISIBLE )] = COLOR4D( 0.7, 0.7, 0.7, 1.0 ); + m_layerColors[ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); + m_layerColors[ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); + m_layerColors[ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); + // Netnames for copper layers for( LAYER_NUM layer = FIRST_COPPER_LAYER; layer <= LAST_COPPER_LAYER; ++layer ) { // Quick, dirty hack, netnames layers should be stored in usual layers - m_itemColors[GetNetnameLayer( layer ) - NB_LAYERS] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); + m_layerColors[GetNetnameLayer( layer )] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); } - - Update(); + update(); } @@ -137,10 +137,10 @@ void PCB_RENDER_SETTINGS::LoadDisplayOptions( const DISPLAY_OPTIONS& aOptions ) } -void PCB_RENDER_SETTINGS::Update() +void PCB_RENDER_SETTINGS::update() { // Calculate darkened/highlighted variants of layer colors - for( int i = 0; i < NB_LAYERS; i++ ) + for( int i = 0; i < TOTAL_LAYER_COUNT; i++ ) { m_layerColors[i].a = m_layerOpacity; m_layerColorsHi[i] = m_layerColors[i].Brightened( m_highlightFactor ); @@ -148,14 +148,6 @@ void PCB_RENDER_SETTINGS::Update() m_layerColorsSel[i] = m_layerColors[i].Brightened( m_selectFactor ); } - for( int i = 0; i < END_PCB_VISIBLE_LIST; i++ ) - { - m_itemColors[i].a = m_layerOpacity; - m_itemColorsHi[i] = m_itemColors[i].Brightened( m_highlightFactor ); - m_itemColorsDark[i] = m_itemColors[i].Darkened( 1.0 - m_highlightFactor ); - m_itemColorsSel[i] = m_itemColors[i].Brightened( m_selectFactor ); - } - m_hiContrastColor = COLOR4D( m_hiContrastFactor, m_hiContrastFactor, m_hiContrastFactor, m_layerOpacity ); } @@ -169,36 +161,29 @@ PCB_PAINTER::PCB_PAINTER( GAL* aGal ) : const COLOR4D& PCB_PAINTER::GetColor( const VIEW_ITEM* aItem, int aLayer ) { - int netCode = 0; + int netCode = -1; - // Try to obtain the netcode for the item - const BOARD_CONNECTED_ITEM* item = dynamic_cast( aItem ); - if( item ) - netCode = item->GetNet(); + if( aItem ) + { + if( static_cast( aItem )->IsSelected() ) + { + return m_pcbSettings->m_layerColorsSel[aLayer]; + } - return getLayerColor( aLayer, netCode, - static_cast( aItem )->IsSelected() ); -} + // Try to obtain the netcode for the item + const BOARD_CONNECTED_ITEM* item = dynamic_cast( aItem ); + if( item ) + netCode = item->GetNet(); + } - -const COLOR4D& PCB_PAINTER::getLayerColor( int aLayer, int aNetCode, bool aSelected ) const -{ // Return grayish color for non-highlighted layers in the high contrast mode if( m_pcbSettings->m_hiContrastEnabled && m_pcbSettings->m_activeLayers.count( aLayer ) == 0 ) return m_pcbSettings->m_hiContrastColor; - // For item layers (vias, texts, and so on) - if( aLayer >= NB_LAYERS ) - return getItemColor( aLayer - NB_LAYERS, aNetCode, aSelected ); - - // Highlight per item basis - if( aSelected ) - return m_pcbSettings->m_layerColorsHi[aLayer]; - // Single net highlight mode if( m_pcbSettings->m_highlightEnabled ) { - if( aNetCode == m_pcbSettings->m_highlightNetcode ) + if( netCode == m_pcbSettings->m_highlightNetcode ) return m_pcbSettings->m_layerColorsHi[aLayer]; else return m_pcbSettings->m_layerColorsDark[aLayer]; @@ -209,29 +194,12 @@ const COLOR4D& PCB_PAINTER::getLayerColor( int aLayer, int aNetCode, bool aSelec } -const COLOR4D& PCB_PAINTER::getItemColor( int aItemType, int aNetCode, bool aSelected ) const -{ - // Highlight per item basis - if( aSelected ) - return m_pcbSettings->m_itemColorsHi[aItemType]; - - if( m_pcbSettings->m_highlightEnabled ) - { - if( aNetCode == m_pcbSettings->m_highlightNetcode ) - return m_pcbSettings->m_itemColorsHi[aItemType]; - else - return m_pcbSettings->m_itemColorsDark[aItemType]; - } - - // No special modificators enabled - return m_pcbSettings->m_itemColors[aItemType]; -} - - bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) { + const BOARD_ITEM* item = static_cast( aItem ); + // the "cast" applied in here clarifies which overloaded draw() is called - switch( static_cast( aItem )->Type() ) + switch( item->Type() ) { case PCB_ZONE_T: case PCB_TRACE_T: @@ -308,9 +276,8 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) double textSize = std::min( static_cast( width ), length / netName.length() ); // Set a proper color for the label - color = getLayerColor( aTrack->GetLayer(), aTrack->GetNet(), - aTrack->IsSelected() ); - COLOR4D labelColor = getLayerColor( aLayer, 0, aTrack->IsSelected() ); + color = GetColor( aTrack, aTrack->GetLayer() ); + COLOR4D labelColor = GetColor( NULL, aLayer ); if( color.GetBrightness() > 0.5 ) m_gal->SetStrokeColor( labelColor.Inverted() ); @@ -330,7 +297,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) else if( IsCopperLayer( aLayer )) { // Draw a regular track - color = getLayerColor( aLayer, netNumber, aTrack->IsSelected() ); + color = GetColor( aTrack, aLayer ); m_gal->SetStrokeColor( color ); m_gal->SetIsStroke( true ); @@ -369,7 +336,7 @@ void PCB_PAINTER::draw( const SEGVIA* aVia, int aLayer ) else return; - color = getLayerColor( aLayer, aVia->GetNet(), aVia->IsSelected() ); + color = GetColor( aVia, aLayer ); if( m_pcbSettings->m_sketchModeSelect[VIAS_VISIBLE] ) { @@ -448,9 +415,8 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) m_gal->SetMirrored( false ); // Set a proper color for the label - color = getLayerColor( aPad->GetParent()->GetLayer(), aPad->GetNet(), - aPad->IsSelected() ); - COLOR4D labelColor = getLayerColor( aLayer, 0, aPad->IsSelected() ); + color = GetColor( aPad, aPad->GetLayer() ); + COLOR4D labelColor = GetColor( NULL, aLayer ); if( color.GetBrightness() > 0.5 ) m_gal->SetStrokeColor( labelColor.Inverted() ); @@ -495,7 +461,8 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) return; } - color = getLayerColor( aLayer, aPad->GetNet(), aPad->IsSelected() ); + // Pad drawing + color = GetColor( aPad, aLayer ); if( m_pcbSettings->m_sketchModeSelect[PADS_VISIBLE] ) { // Outline mode @@ -618,7 +585,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment ) { - COLOR4D color = getLayerColor( aSegment->GetLayer(), 0, aSegment->IsSelected() ); + COLOR4D color = GetColor( NULL, aSegment->GetLayer() ); m_gal->SetIsFill( false ); m_gal->SetIsStroke( true ); @@ -692,7 +659,7 @@ void PCB_PAINTER::draw( const TEXTE_PCB* aText ) if( aText->GetText().Length() == 0 ) return; - COLOR4D strokeColor = getLayerColor( aText->GetLayer(), 0, aText->IsSelected() ); + COLOR4D strokeColor = GetColor( NULL, aText->GetLayer() ); VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y ); double orientation = aText->GetOrientation() * M_PI / 1800.0; @@ -708,13 +675,13 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) if( aText->GetLength() == 0 ) return; - COLOR4D strokeColor = getLayerColor( aLayer, 0, aText->IsSelected() ); + COLOR4D strokeColor = GetColor( NULL, aLayer ); VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y); double orientation = aText->GetDrawRotation() * M_PI / 1800.0; m_gal->PushDepth(); - if(aText->IsSelected()) + /*if(aText->IsSelected()) { EDA_RECT bb (aText->GetBoundingBox()); VECTOR2D s (bb.GetOrigin()); @@ -725,7 +692,7 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) m_gal->SetIsStroke(true); m_gal->SetLineWidth(0); m_gal->DrawRectangle(s, e); - } + }*/ m_gal->AdvanceDepth(); @@ -741,8 +708,7 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone ) { - COLOR4D color = getLayerColor( aZone->GetLayer(), aZone->GetNet(), - aZone->IsSelected() ); + COLOR4D color = GetColor( NULL, aZone->GetLayer() ); std::deque corners; PCB_RENDER_SETTINGS::DisplayZonesMode displayMode = m_pcbSettings->m_displayZoneMode; @@ -811,8 +777,7 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone ) void PCB_PAINTER::draw( const DIMENSION* aDimension ) { - COLOR4D strokeColor = getLayerColor( aDimension->GetLayer(), 0, - aDimension->IsSelected() ); + COLOR4D strokeColor = GetColor( NULL, aDimension->GetLayer() ); m_gal->SetStrokeColor( strokeColor ); m_gal->SetIsFill( false ); @@ -835,7 +800,7 @@ void PCB_PAINTER::draw( const DIMENSION* aDimension ) void PCB_PAINTER::draw( const PCB_TARGET* aTarget ) { - COLOR4D strokeColor = getLayerColor( aTarget->GetLayer(), 0, aTarget->IsSelected() ); + COLOR4D strokeColor = GetColor( NULL, aTarget->GetLayer() ); VECTOR2D position( aTarget->GetPosition() ); double size, radius; diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 50740889ef..250e291413 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -27,10 +27,8 @@ #define __CLASS_PCB_PAINTER_H #include - #include - class EDA_ITEM; class COLORS_DESIGN_SETTINGS; class DISPLAY_OPTIONS; @@ -76,9 +74,6 @@ public: PCB_RENDER_SETTINGS(); - /// @copydoc RENDER_SETTINGS::Update() - void Update(); - /// @copydoc RENDER_SETTINGS::ImportLegacyColors() void ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings ); @@ -91,23 +86,24 @@ public: void LoadDisplayOptions( const DISPLAY_OPTIONS& aOptions ); protected: - /// Colors for all layers (including special, highlighted & darkened versions) - COLOR4D m_layerColors [NB_LAYERS]; - COLOR4D m_layerColorsHi [NB_LAYERS]; - COLOR4D m_layerColorsSel [NB_LAYERS]; - COLOR4D m_layerColorsDark[NB_LAYERS]; - COLOR4D m_itemColors [END_PCB_VISIBLE_LIST]; - COLOR4D m_itemColorsHi [END_PCB_VISIBLE_LIST]; - COLOR4D m_itemColorsSel [END_PCB_VISIBLE_LIST]; - COLOR4D m_itemColorsDark [END_PCB_VISIBLE_LIST]; + /// @copydoc RENDER_SETTINGS::Update() + void update(); - bool m_sketchModeSelect[END_PCB_VISIBLE_LIST]; + /// Colors for all layers (including special, highlighted & darkened versions) + COLOR4D m_layerColors [TOTAL_LAYER_COUNT]; + COLOR4D m_layerColorsHi [TOTAL_LAYER_COUNT]; + COLOR4D m_layerColorsSel [TOTAL_LAYER_COUNT]; + COLOR4D m_layerColorsDark[TOTAL_LAYER_COUNT]; + + bool m_sketchModeSelect[TOTAL_LAYER_COUNT]; bool m_padNumbers; bool m_netNamesOnPads; bool m_netNamesOnTracks; + /// Maximum font size for netnames (and other dynamically shown strings) static const double MAX_FONT_SIZE = 100000000; + /// Option for different display modes for zones DisplayZonesMode m_displayZoneMode; }; @@ -131,7 +127,7 @@ public: PAINTER::ApplySettings( aSettings ); // Store PCB specific render settings - m_pcbSettings = dynamic_cast ( aSettings ); + m_pcbSettings = dynamic_cast( aSettings ); } /// @copydoc PAINTER::GetColor() @@ -140,17 +136,6 @@ public: protected: PCB_RENDER_SETTINGS* m_pcbSettings; - /// @copydoc PAINTER::getLayerColor() - const COLOR4D& getLayerColor( int aLayer, int aNetCode, bool aHighlighted ) const; - - /** - * Function getItemColor - * Returns color for a special layer (eg. vias/pads holes, texts on front/bottom layer, etc.) - * @param aItemType Layer number of the item to be drawn. - * @param aNetCode Net number of the item to be drawn. - */ - const COLOR4D& getItemColor( int aItemType, int aNetCode, bool aHighlighted ) const; - // Drawing functions for various types of PCB-specific items void draw( const TRACK*, int ); void draw( const SEGVIA*, int ); From c928bc8ce355e5494ca8897710b4c145689ce1bc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 7 Aug 2013 10:52:50 +0200 Subject: [PATCH 217/415] Fixed layers caching settings. Added some comments. --- common/tool/tool_manager.cpp | 1 + common/view/view.cpp | 18 ++++++++++++------ common/view/view_item.cpp | 9 +++------ include/class_drawpanel_gal.h | 3 +-- include/view/view.h | 7 ++++++- pcbnew/basepcbframe.cpp | 29 +++++++++++++++++------------ 6 files changed, 40 insertions(+), 27 deletions(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index f1855907ee..3238100c68 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -212,6 +212,7 @@ TOOL_ID TOOL_MANAGER::MakeToolId( const std::string& aToolName ) return currentId++; } + void TOOL_MANAGER::SetEnvironment( EDA_ITEM* aModel, KiGfx::VIEW* aView, KiGfx::VIEW_CONTROLS* aViewControls, wxWindow* aFrame ) { diff --git a/common/view/view.cpp b/common/view/view.cpp index 3ec8ef6a80..fa5aade34f 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -544,7 +544,8 @@ void VIEW::redrawRect( const BOX2I& aRect ) } } -bool VIEW::IsDirty() + +bool VIEW::IsDirty() const { BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers ) { @@ -554,6 +555,7 @@ bool VIEW::IsDirty() return false; } + struct VIEW::unlinkItem { void operator()( VIEW_ITEM* aItem ) @@ -644,28 +646,32 @@ void VIEW::invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ) for( int i = 0; i < layer_count; i++ ) { - if(m_layers.find(layer_indices[i]) != m_layers.end()) + // Iterate through the layers used by the item + if( m_layers.find( layer_indices[i] ) != m_layers.end() ) { VIEW_LAYER* l = &m_layers[layer_indices[i]]; + // Mark the area occupied by the item as dirty l->dirtyExtents = l->isDirty ? aItem->ViewBBox() : l->dirtyExtents.Merge( aItem->ViewBBox() ); l->isDirty = true; + // If geometry has to be updated, then we need to reinsert the item if( aUpdateFlags & VIEW_ITEM::GEOMETRY ) { l->items->Remove( aItem ); - l->items->Insert( aItem ); /* reinsert */ - aItem->deleteGroups(); + l->items->Insert( aItem ); } - } + } } + // Remove all the groups, so the item will be recached if( aItem->storesGroups() ) { + // Clear the cached groups stored in GAL std::vector groups = aItem->getAllGroups(); - for(std::vector::iterator i = groups.begin(); i != groups.end(); i++ ) + for( std::vector::iterator i = groups.begin(); i != groups.end(); i++ ) { m_gal->DeleteGroup( *i ); } diff --git a/common/view/view_item.cpp b/common/view/view_item.cpp index 3649516a25..2598eb8ee6 100644 --- a/common/view/view_item.cpp +++ b/common/view/view_item.cpp @@ -50,7 +50,7 @@ void VIEW_ITEM::ViewSetVisible( bool aIsVisible ) void VIEW_ITEM::ViewUpdate( int aUpdateFlags, bool aForceImmediateRedraw ) { - if(!m_view) + if( !m_view ) return; m_view->invalidateItem( this, aUpdateFlags ); @@ -124,11 +124,8 @@ void VIEW_ITEM::setGroup( int aLayer, int aId ) void VIEW_ITEM::deleteGroups() { - if( m_groupsSize > 0 ) - { - delete[] m_groups; - m_groupsSize = 0; - } + delete[] m_groups; + m_groupsSize = 0; } diff --git a/include/class_drawpanel_gal.h b/include/class_drawpanel_gal.h index 400229e75e..9c789ac3b0 100644 --- a/include/class_drawpanel_gal.h +++ b/include/class_drawpanel_gal.h @@ -99,8 +99,7 @@ protected: ///< using GAL KiGfx::WX_VIEW_CONTROLS* m_viewControls; ///< Control for VIEW (moving, zooming, etc.) GalType m_currentGal; ///< Currently used GAL - wxLongLong m_timeStamp; - TOOL_DISPATCHER* m_eventDispatcher; + TOOL_DISPATCHER* m_eventDispatcher; }; #endif diff --git a/include/view/view.h b/include/view/view.h index b37747da19..7a3a7603de 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -371,7 +371,12 @@ public: */ bool IsDynamic() const { return m_dynamic; } - bool IsDirty(); + /** + * Function IsDirty() + * Returns true if any of the VIEW layers needs to be refreshened. + * @return True in case if any of layers is marked as dirty. + */ + bool IsDirty() const; static const int VIEW_MAX_LAYERS = 128; ///* maximum number of layers that may be shown diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index c1b0ccc809..b55ba8aabd 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -178,6 +178,9 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) // Load module's texts (name and value) view->Add( &module->Reference() ); view->Add( &module->Value() ); + + // Add the module itself + view->Add( module ); } // Segzones (equivalent of ZONE_CONTAINER for legacy boards) @@ -191,8 +194,8 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) m_galCanvas->Refresh(); // update the tool manager with the new board and its view. - if(m_toolManager) - m_toolManager->SetEnvironment( m_Pcb, view, m_galCanvas->GetViewControls(), this); + if( m_toolManager ) + m_toolManager->SetEnvironment( m_Pcb, view, m_galCanvas->GetViewControls(), this ); } } @@ -799,31 +802,33 @@ void PCB_BASE_FRAME::LoadSettings() // Apply display settings for GAL KiGfx::VIEW* view = m_galCanvas->GetView(); - // Set rendering order of layers - for( LAYER_NUM i = 0; i < sizeof(GalLayerOrder) / sizeof(LAYER_NUM); ++i ) + + // Set rendering order and properties of layers + for( LAYER_NUM i = 0; (unsigned) i < sizeof(GalLayerOrder) / sizeof(LAYER_NUM); ++i ) { - wxASSERT( i < KiGfx::VIEW::VIEW_MAX_LAYERS ); + LAYER_NUM layer = GalLayerOrder[i]; + wxASSERT( layer < KiGfx::VIEW::VIEW_MAX_LAYERS ); - view->SetLayerOrder( GalLayerOrder[i], i ); - view->SetLayerTarget( i, KiGfx::TARGET_NONCACHED ); + view->SetLayerOrder( layer, i ); - if( IsCopperLayer( i ) ) + if( IsCopperLayer( layer ) ) { // Copper layers are required for netname layers - view->SetRequired( GetNetnameLayer( i ), i ); + view->SetRequired( GetNetnameLayer( layer ), layer ); + view->SetLayerTarget( layer, KiGfx::TARGET_CACHED ); } - else - if( IsNetnameLayer( i ) ) + else if( IsNetnameLayer( layer ) ) { // Netnames are drawn only when scale is sufficient (level of details) // so there is no point in caching them - view->SetLayerTarget( i, KiGfx::TARGET_NONCACHED ); + view->SetLayerTarget( layer, KiGfx::TARGET_NONCACHED ); } } // Some more required layers settings view->SetRequired( ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIAS_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ) ); + view->SetRequired( ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); From c81b17c1cbd6dbbfc700f2ff7ffd1eb06ac4dcd4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 7 Aug 2013 11:20:12 +0200 Subject: [PATCH 218/415] Some more reformatting and adding copyright notices. --- common/tool/context_menu.cpp | 64 +++-- common/tool/tool_base.cpp | 39 ++- common/tool/tool_event.cpp | 110 +++++--- common/tool/tool_interactive.cpp | 47 +++- include/tool/context_menu.h | 15 +- include/tool/tool_base.h | 48 ++-- include/tool/tool_event.h | 449 ++++++++++++++++--------------- include/tool/tool_interactive.h | 12 +- include/view/view.h | 2 +- 9 files changed, 444 insertions(+), 342 deletions(-) diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index 2649b2056e..7e791d195b 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -1,3 +1,27 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include @@ -10,7 +34,7 @@ class CONTEXT_MENU::CMEventHandler : public wxEvtHandler { public: - CMEventHandler( CONTEXT_MENU *aMenu ): + CMEventHandler( CONTEXT_MENU* aMenu ): m_menu(aMenu) {}; void onEvent( wxEvent & aEvent ) @@ -18,54 +42,58 @@ public: TOOL_EVENT evt; wxEventType type = aEvent.GetEventType(); - if(type == wxEVT_MENU_HIGHLIGHT) - evt = TOOL_EVENT (TC_Command, TA_ContextMenuUpdate, aEvent.GetId() ); - else if (type == wxEVT_COMMAND_MENU_SELECTED) - evt = TOOL_EVENT (TC_Command, TA_ContextMenuChoice, aEvent.GetId() ); + if( type == wxEVT_MENU_HIGHLIGHT ) + evt = TOOL_EVENT( TC_Command, TA_ContextMenuUpdate, aEvent.GetId() ); + else if ( type == wxEVT_COMMAND_MENU_SELECTED ) + evt = TOOL_EVENT( TC_Command, TA_ContextMenuChoice, aEvent.GetId() ); - m_menu->m_tool->GetManager()->ProcessEvent(evt); + m_menu->m_tool->GetManager()->ProcessEvent( evt ); } private: - CONTEXT_MENU *m_menu; + CONTEXT_MENU* m_menu; }; -CONTEXT_MENU::CONTEXT_MENU ( ) +CONTEXT_MENU::CONTEXT_MENU() { m_tool = NULL; m_menu = new wxMenu(); - m_handler = new CMEventHandler(this); - m_menu->Connect (wxEVT_MENU_HIGHLIGHT, wxEventHandler( CMEventHandler::onEvent ), NULL, m_handler ); - m_menu->Connect (wxEVT_COMMAND_MENU_SELECTED, wxEventHandler( CMEventHandler::onEvent ), NULL, m_handler ); + m_handler = new CMEventHandler( this ); + m_menu->Connect( wxEVT_MENU_HIGHLIGHT, wxEventHandler( CMEventHandler::onEvent ), NULL, m_handler ); + m_menu->Connect( wxEVT_COMMAND_MENU_SELECTED, wxEventHandler( CMEventHandler::onEvent ), NULL, m_handler ); m_titleSet = false; } -CONTEXT_MENU::~CONTEXT_MENU ( ) + +CONTEXT_MENU::~CONTEXT_MENU() { delete m_menu; delete m_handler; } + void CONTEXT_MENU::SetTitle( const wxString& aTitle ) { - if(m_titleSet) + if( m_titleSet ) { - m_menu->Delete(m_menu->FindItemByPosition(0)); // fixme: this is LAME! - m_menu->Delete(m_menu->FindItemByPosition(0)); + m_menu->Delete( m_menu->FindItemByPosition( 0 ) ); // fixme: this is LAME! + m_menu->Delete( m_menu->FindItemByPosition( 0 ) ); } - m_menu->InsertSeparator(0); - m_menu->Insert(0, new wxMenuItem( m_menu, -1, aTitle, wxEmptyString, wxITEM_NORMAL ) ); + m_menu->InsertSeparator( 0 ); + m_menu->Insert( 0, new wxMenuItem( m_menu, -1, aTitle, wxEmptyString, wxITEM_NORMAL ) ); m_titleSet = true; } + void CONTEXT_MENU::Add ( const wxString& aItem, int aId ) { m_menu->Append( new wxMenuItem( m_menu, aId, aItem, wxEmptyString, wxITEM_NORMAL ) ); } + void CONTEXT_MENU::Clear() { m_titleSet = false; -} \ No newline at end of file +} diff --git a/common/tool/tool_base.cpp b/common/tool/tool_base.cpp index 82b1f1ac55..15409d1a8c 100644 --- a/common/tool/tool_base.cpp +++ b/common/tool/tool_base.cpp @@ -1,22 +1,49 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include -KiGfx::VIEW *TOOL_BASE::getView() +KiGfx::VIEW* TOOL_BASE::getView() { return m_toolMgr->GetView(); } -KiGfx::VIEW_CONTROLS *TOOL_BASE::getViewControls() + +KiGfx::VIEW_CONTROLS* TOOL_BASE::getViewControls() { return m_toolMgr->GetViewControls(); } - -wxWindow * TOOL_BASE::getEditFrameInt() + + +wxWindow* TOOL_BASE::getEditFrameInt() { return m_toolMgr->GetEditFrame(); } -EDA_ITEM * TOOL_BASE::getModelInt() + +EDA_ITEM* TOOL_BASE::getModelInt() { return m_toolMgr->GetModel(); -} \ No newline at end of file +} diff --git a/common/tool/tool_event.cpp b/common/tool/tool_event.cpp index d10822f9c4..3d03692b82 100644 --- a/common/tool/tool_event.cpp +++ b/common/tool/tool_event.cpp @@ -1,3 +1,27 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include @@ -10,12 +34,14 @@ using namespace std; -struct FlagString { +struct FlagString +{ int flag; std::string str; }; -static const std::string flag2string(int flag, const FlagString *exps) + +static const std::string flag2string( int flag, const FlagString* exps ) { std::string rv; for(int i = 0; exps[i].str.length(); i++) @@ -24,78 +50,80 @@ static const std::string flag2string(int flag, const FlagString *exps) return rv; } + const std::string TOOL_EVENT::Format() const { std::string ev; const FlagString categories[] = { - {TC_Mouse, "mouse"}, - {TC_Command, "command"}, - {TC_Message, "message"}, - {TC_View, "view"}, - {0, ""} + { TC_Mouse, "mouse" }, + { TC_Command, "command" }, + { TC_Message, "message" }, + { TC_View, "view" }, + { 0, "" } }; const FlagString actions[] = { - {TA_MouseClick, "click"}, - {TA_MouseUp, "button-up"}, - {TA_MouseDown, "button-down"}, - {TA_MouseDrag, "drag"}, - {TA_MouseMotion, "motion"}, - {TA_MouseWheel, "wheel"}, - {TA_ViewRefresh, "view-refresh"}, - {TA_ViewZoom, "view-zoom"}, - {TA_ViewPan, "view-pan"}, - {TA_ViewDirty, "view-dirty"}, - {TA_ChangeLayer, "change-layer"}, - {TA_CancelTool, "cancel-tool"}, - {TA_ActivateTool, "activate-tool"}, - {TA_ContextMenuUpdate, "context-menu-update"}, - {TA_ContextMenuChoice, "context-menu-choice"}, - {0, ""} + { TA_MouseClick, "click" }, + { TA_MouseUp, "button-up" }, + { TA_MouseDown, "button-down" }, + { TA_MouseDrag, "drag" }, + { TA_MouseMotion, "motion" }, + { TA_MouseWheel, "wheel" }, + { TA_ViewRefresh, "view-refresh" }, + { TA_ViewZoom, "view-zoom" }, + { TA_ViewPan, "view-pan" }, + { TA_ViewDirty, "view-dirty" }, + { TA_ChangeLayer, "change-layer" }, + { TA_CancelTool, "cancel-tool" }, + { TA_ActivateTool, "activate-tool" }, + { TA_ContextMenuUpdate, "context-menu-update" }, + { TA_ContextMenuChoice, "context-menu-choice" }, + { 0, "" } }; const FlagString buttons[] = { - {MB_None, "none"}, - {MB_Left, "left"}, - {MB_Right, "right"}, - {MB_Middle, "middle"}, - {MB_ModShift, "shift"}, - {MB_ModCtrl, "ctrl"}, - {MB_ModAlt, "alt"}, - {0, ""} + { MB_None, "none" }, + { MB_Left, "left" }, + { MB_Right, "right" }, + { MB_Middle, "middle" }, + { MB_ModShift, "shift" }, + { MB_ModCtrl, "ctrl" }, + { MB_ModAlt, "alt" }, + { 0, "" } }; ev = "category: "; - ev += flag2string(m_category, categories); + ev += flag2string( m_category, categories ); ev +=" action: "; - ev += flag2string(m_actions, actions); + ev += flag2string( m_actions, actions ); - if(m_actions & TA_Mouse) + if( m_actions & TA_Mouse ) { ev +=" btns: "; - ev += flag2string(m_mouseButtons, buttons); + ev += flag2string( m_mouseButtons, buttons ); }; - if(m_commandId) + if( m_commandId ) { char tmp[128]; - sprintf(tmp,"cmd-id: %d", *m_commandId); + sprintf( tmp, "cmd-id: %d", *m_commandId ); ev += tmp; } - if(m_commandStr) - ev += "cmd-str: " + (*m_commandStr); + if( m_commandStr ) + ev += "cmd-str: " + ( *m_commandStr ); return ev; } + const std::string TOOL_EVENT_LIST::Format() const { string s; - BOOST_FOREACH(TOOL_EVENT e, m_events) - s+=e.Format()+" "; + BOOST_FOREACH( TOOL_EVENT e, m_events ) + s += e.Format() + " "; return s; } diff --git a/common/tool/tool_interactive.cpp b/common/tool/tool_interactive.cpp index 2389c33eed..4e2d51e562 100644 --- a/common/tool/tool_interactive.cpp +++ b/common/tool/tool_interactive.cpp @@ -1,3 +1,27 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include @@ -5,37 +29,40 @@ #include #include -TOOL_INTERACTIVE::TOOL_INTERACTIVE( TOOL_ID aId, const std::string& aName ): - TOOL_BASE(TOOL_Interactive, aId, aName) +TOOL_INTERACTIVE::TOOL_INTERACTIVE( TOOL_ID aId, const std::string& aName ) : + TOOL_BASE( TOOL_Interactive, aId, aName ) {}; -TOOL_INTERACTIVE::TOOL_INTERACTIVE( const std::string& aName ): - TOOL_BASE(TOOL_Interactive, TOOL_MANAGER::MakeToolId(aName), aName) + +TOOL_INTERACTIVE::TOOL_INTERACTIVE( const std::string& aName ) : + TOOL_BASE( TOOL_Interactive, TOOL_MANAGER::MakeToolId( aName ), aName ) {}; TOOL_INTERACTIVE::~TOOL_INTERACTIVE() { - } + OPT_TOOL_EVENT TOOL_INTERACTIVE::Wait ( const TOOL_EVENT_LIST & aEventList ) { - return m_toolMgr->ScheduleWait(this, aEventList); + return m_toolMgr->ScheduleWait( this, aEventList ); } + void TOOL_INTERACTIVE::goInternal( TOOL_STATE_FUNC& aState, const TOOL_EVENT_LIST& aConditions ) { - m_toolMgr->ScheduleNextState(this, aState, aConditions); + m_toolMgr->ScheduleNextState( this, aState, aConditions ); } + void TOOL_INTERACTIVE::Reset() { - } + void TOOL_INTERACTIVE::SetContextMenu( CONTEXT_MENU *aMenu, TOOL_ContextMenuTrigger aTrigger ) { - aMenu->setTool(this); - m_toolMgr->ScheduleContextMenu(this, aMenu, aTrigger); + aMenu->setTool( this ); + m_toolMgr->ScheduleContextMenu( this, aMenu, aTrigger ); } diff --git a/include/tool/context_menu.h b/include/tool/context_menu.h index a8d2f4292a..63122b5b94 100644 --- a/include/tool/context_menu.h +++ b/include/tool/context_menu.h @@ -41,8 +41,8 @@ class CONTEXT_MENU public: - CONTEXT_MENU ( ); - ~CONTEXT_MENU ( ); + CONTEXT_MENU(); + ~CONTEXT_MENU(); void SetTitle( const wxString& aTitle ); void Add ( const wxString& aItem, int aId ); @@ -52,27 +52,26 @@ public: void Clear(); - wxMenu *GetMenu() const + wxMenu* GetMenu() const { return m_menu; } private: - class CMEventHandler; friend class TOOL_INTERACTIVE; - void setTool ( TOOL_INTERACTIVE *aTool ) + void setTool ( TOOL_INTERACTIVE* aTool ) { m_tool = aTool; } bool m_titleSet; - wxMenu *m_menu; - CMEventHandler *m_handler; - TOOL_INTERACTIVE *m_tool; + wxMenu* m_menu; + CMEventHandler* m_handler; + TOOL_INTERACTIVE* m_tool; }; #endif diff --git a/include/tool/tool_base.h b/include/tool/tool_base.h index fd9658f06b..ca686b0ddb 100644 --- a/include/tool/tool_base.h +++ b/include/tool/tool_base.h @@ -26,9 +26,7 @@ #define __TOOL_BASE_H #include - -// for KICAD_T. -#include +#include // for KICAD_T #include #include @@ -36,15 +34,16 @@ class EDA_ITEM; class TOOL_MANAGER; -namespace KiGfx { - class VIEW; - class VIEW_CONTROLS; +namespace KiGfx +{ +class VIEW; +class VIEW_CONTROLS; }; - -enum TOOL_Type { - TOOL_Interactive = 0x1, - TOOL_Batch = 0x2 +enum TOOL_Type +{ + TOOL_Interactive = 0x1, + TOOL_Batch = 0x2 }; typedef int TOOL_ID; @@ -60,10 +59,10 @@ class TOOL_BASE { public: - TOOL_BASE(TOOL_Type aType, TOOL_ID aId, const std::string& aName = std::string("")) : - m_type(aType), - m_toolId(aId), - m_toolName(aName) {}; + TOOL_BASE( TOOL_Type aType, TOOL_ID aId, const std::string& aName = std::string( "" ) ) : + m_type( aType ), + m_toolId( aId ), + m_toolName( aName ) {}; virtual ~TOOL_BASE() {}; @@ -82,13 +81,12 @@ public: return m_toolName; } - TOOL_MANAGER *GetManager() + TOOL_MANAGER* GetManager() { return m_toolMgr; } protected: - friend class TOOL_MANAGER; /** @@ -99,8 +97,8 @@ protected: */ void attachManager( TOOL_MANAGER *aManager ); - KiGfx::VIEW *getView(); - KiGfx::VIEW_CONTROLS *getViewControls(); + KiGfx::VIEW* getView(); + KiGfx::VIEW_CONTROLS* getViewControls(); /** * Function getEditFrame() @@ -111,7 +109,7 @@ protected: template T *getEditFrame() { - return static_cast (getEditFrameInt()); + return static_cast( getEditFrameInt() ); } /** @@ -124,24 +122,20 @@ protected: { EDA_ITEM *m = getModelInt(); // assert(modelType == m->Type()); - return static_cast (m); + return static_cast( m ); } protected: - - TOOL_Type m_type; TOOL_ID m_toolId; std::string m_toolName; - TOOL_MANAGER *m_toolMgr; + TOOL_MANAGER* m_toolMgr; private: - // hide the implementation to avoid spreading half of // kicad and wxWidgets headers to the tools that may not need them at all! - EDA_ITEM *getModelInt(); - wxWindow *getEditFrameInt(); + EDA_ITEM* getModelInt(); + wxWindow* getEditFrameInt(); }; - #endif diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index 4811fa1cfb..d5dec8525d 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -38,7 +38,8 @@ class TOOL_MANAGER; * Internal (GUI-independent) event definitions. * Enums are mostly self-explanatory. */ -enum TOOL_EventCategory { +enum TOOL_EventCategory +{ TC_None = 0x0, TC_Mouse = 0x1, TC_Command = 0x2, @@ -47,7 +48,8 @@ enum TOOL_EventCategory { TC_Any = 0xffffffff }; -enum TOOL_Actions { +enum TOOL_Actions +{ TA_None = 0x0, TA_MouseClick = 0x1, TA_MouseUp = 0x2, @@ -77,7 +79,8 @@ enum TOOL_Actions { TA_Any = 0xffffffff }; -enum TOOL_MouseButtons { +enum TOOL_MouseButtons +{ MB_None = 0x0, MB_Left = 0x1, MB_Right = 0x2, @@ -92,7 +95,8 @@ enum TOOL_MouseButtons { // Defines when a context menu is opened. -enum TOOL_ContextMenuTrigger { +enum TOOL_ContextMenuTrigger +{ CMENU_BUTTON = 0, // On the right button CMENU_NOW, // Right now (after TOOL_INTERACTIVE::SetContxtMenu) CMENU_OFF // Never @@ -105,155 +109,149 @@ enum TOOL_ContextMenuTrigger { */ class TOOL_EVENT { - public: +public: + const std::string Format() const; - const std::string Format ( ) const; + TOOL_EVENT( TOOL_EventCategory aCategory = TC_None, TOOL_Actions aAction = TA_None ): + m_category( aCategory ), + m_actions( aAction ), + m_mouseButtons( 0 ) {} - TOOL_EVENT(TOOL_EventCategory aCategory = TC_None, TOOL_Actions aAction = TA_None ): - m_category (aCategory), - m_actions (aAction), - m_mouseButtons(0) {}; - - TOOL_EVENT(TOOL_EventCategory aCategory, TOOL_Actions aAction, int aExtraParam ): - m_category (aCategory), - m_actions (aAction) - { - if(aCategory == TC_Mouse) - m_mouseButtons = aExtraParam; - else if (aCategory == TC_Command) - m_commandId = aExtraParam; - }; + TOOL_EVENT( TOOL_EventCategory aCategory, TOOL_Actions aAction, int aExtraParam ): + m_category( aCategory ), + m_actions( aAction ) + { + if( aCategory == TC_Mouse ) + m_mouseButtons = aExtraParam; + else if ( aCategory == TC_Command ) + m_commandId = aExtraParam; + } - TOOL_EVENT(TOOL_EventCategory aCategory, TOOL_Actions aAction, const std::string& aExtraParam ): - m_category (aCategory), - m_actions (aAction), - m_mouseButtons(0) - { - if(aCategory == TC_Command) - m_commandStr = aExtraParam; - } - - - TOOL_EventCategory Category ( ) const - { - return m_category; - } - - TOOL_Actions Action ( ) const - { - return m_actions; - } - - const VECTOR2D Delta() const - { - return m_mouseDelta; - } - - const VECTOR2D& Position() const - { - return m_mousePos; - } - - const VECTOR2D& DragOrigin() const - { - return m_mouseDragOrigin; - } - - int Buttons() const - { - return m_mouseButtons; - } - - bool IsClick ( int aButtonMask = MB_Any ) const - { - return (m_actions == TA_MouseClick) && ((m_mouseButtons & aButtonMask) == aButtonMask); - } - - bool IsDrag ( int aButtonMask = MB_Any ) const - { - return (m_actions == TA_MouseDrag) && ((m_mouseButtons & aButtonMask) == aButtonMask); - } - - bool IsMouseUp ( int aButtonMask = MB_Any ) const - { - return (m_actions == TA_MouseUp) && ((m_mouseButtons & aButtonMask) == aButtonMask); - } - - bool IsMotion ( ) const - { - return (m_actions == TA_MouseMotion); - } - - bool IsCancel ( ) const - { - return m_actions == TA_CancelTool; - } - - bool Modifier ( int aMask = MB_ModifierMask ) const - { - return (m_mouseButtons & aMask); - } - - - void Ignore(); - - void SetMouseDragOrigin( const VECTOR2D &aP ) - { - m_mouseDragOrigin = aP; - } - - void SetMousePosition( const VECTOR2D& aP ) - { - m_mousePos = aP; - } - - void SetMouseDelta( const VECTOR2D& aP ) - { - m_mouseDelta = aP; - } - - bool Matches ( const TOOL_EVENT& aEvent ) const - { - if (! (m_category & aEvent.m_category)) - return false; - - if (! (m_actions & aEvent.m_actions)) - return false; - - if( m_category == TC_Command) - { - if(m_commandStr && aEvent.m_commandStr) - return (*m_commandStr == *aEvent.m_commandStr); - if(m_commandId && aEvent.m_commandId) - return (*m_commandId == *aEvent.m_commandId); - } - - return true; - } - - boost::optional GetCommandId() - { - return m_commandId; - } + TOOL_EVENT( TOOL_EventCategory aCategory, TOOL_Actions aAction, const std::string& aExtraParam ): + m_category( aCategory ), + m_actions( aAction ), + m_mouseButtons( 0 ) + { + if( aCategory == TC_Command ) + m_commandStr = aExtraParam; + } - private: + TOOL_EventCategory Category() const + { + return m_category; + } - friend class TOOL_MANAGER; + TOOL_Actions Action() const + { + return m_actions; + } - TOOL_EventCategory m_category; - TOOL_Actions m_actions; - - VECTOR2D m_mouseDelta; - VECTOR2D m_mousePos; - VECTOR2D m_mouseDragOrigin; - - int m_mouseButtons; - boost::optional m_commandId; - boost::optional m_commandStr; - + const VECTOR2D Delta() const + { + return m_mouseDelta; + } + const VECTOR2D& Position() const + { + return m_mousePos; + } + const VECTOR2D& DragOrigin() const + { + return m_mouseDragOrigin; + } + + int Buttons() const + { + return m_mouseButtons; + } + + bool IsClick( int aButtonMask = MB_Any ) const + { + return ( m_actions == TA_MouseClick ) + && ( ( m_mouseButtons & aButtonMask ) == aButtonMask ); + } + + bool IsDrag( int aButtonMask = MB_Any ) const + { + return ( m_actions == TA_MouseDrag ) && ( ( m_mouseButtons & aButtonMask ) == aButtonMask ); + } + + bool IsMouseUp( int aButtonMask = MB_Any ) const + { + return ( m_actions == TA_MouseUp ) && ( ( m_mouseButtons & aButtonMask ) == aButtonMask ); + } + + bool IsMotion() const + { + return ( m_actions == TA_MouseMotion ); + } + + bool IsCancel() const + { + return m_actions == TA_CancelTool; + } + + bool Modifier( int aMask = MB_ModifierMask ) const + { + return ( m_mouseButtons & aMask ); + } + + void Ignore(); + + void SetMouseDragOrigin( const VECTOR2D &aP ) + { + m_mouseDragOrigin = aP; + } + + void SetMousePosition( const VECTOR2D& aP ) + { + m_mousePos = aP; + } + + void SetMouseDelta( const VECTOR2D& aP ) + { + m_mouseDelta = aP; + } + + bool Matches( const TOOL_EVENT& aEvent ) const + { + if( ! ( m_category & aEvent.m_category ) ) + return false; + + if( ! ( m_actions & aEvent.m_actions ) ) + return false; + + if( m_category == TC_Command ) + { + if( m_commandStr && aEvent.m_commandStr ) + return ( *m_commandStr == *aEvent.m_commandStr ); + if( m_commandId && aEvent.m_commandId ) + return ( *m_commandId == *aEvent.m_commandId ); + } + + return true; + } + + boost::optional GetCommandId() + { + return m_commandId; + } + +private: + friend class TOOL_MANAGER; + + TOOL_EventCategory m_category; + TOOL_Actions m_actions; + + VECTOR2D m_mouseDelta; + VECTOR2D m_mousePos; + VECTOR2D m_mouseDragOrigin; + + int m_mouseButtons; + boost::optional m_commandId; + boost::optional m_commandStr; }; typedef boost::optional OPT_TOOL_EVENT; @@ -265,109 +263,112 @@ typedef boost::optional OPT_TOOL_EVENT; * concatenating TOOL_EVENTs with little code. */ class TOOL_EVENT_LIST { +public: + typedef TOOL_EVENT value_type; + typedef std::deque::iterator iterator; + typedef std::deque::const_iterator const_iterator; - public: - typedef TOOL_EVENT value_type; - typedef std::deque::iterator iterator; - typedef std::deque::const_iterator const_iterator; + TOOL_EVENT_LIST() {}; + TOOL_EVENT_LIST( const TOOL_EVENT& aSingleEvent ) + { + m_events.push_back(aSingleEvent); + } - TOOL_EVENT_LIST() {}; - TOOL_EVENT_LIST( const TOOL_EVENT& aSingleEvent ) - { - m_events.push_back(aSingleEvent); - } + const std::string Format() const; - const std::string Format ( ) const; + boost::optional Matches( const TOOL_EVENT &b ) const + { + for( const_iterator i = m_events.begin(); i != m_events.end(); ++i ) + if ( i->Matches( b ) ) + return *i; + return boost::optional(); + } - boost::optional Matches( const TOOL_EVENT &b ) const - { - for(const_iterator i = m_events.begin(); i != m_events.end(); ++i) - if (i->Matches(b)) - return *i; - return boost::optional (); - } - - void Add ( const TOOL_EVENT& aEvent ) - { - m_events.push_back(aEvent); - } + void Add( const TOOL_EVENT& aEvent ) + { + m_events.push_back( aEvent ); + } - iterator begin() - { - return m_events.begin(); - } - - iterator end() - { - return m_events.end(); - } + iterator begin() + { + return m_events.begin(); + } - const_iterator cbegin() const - { - return m_events.begin(); - } - - const_iterator cend() const - { - return m_events.end(); - } + iterator end() + { + return m_events.end(); + } - int size() const - { - return m_events.size(); - } + const_iterator cbegin() const + { + return m_events.begin(); + } - void clear() - { - m_events.clear(); - } + const_iterator cend() const + { + return m_events.end(); + } - TOOL_EVENT_LIST& operator=(const TOOL_EVENT_LIST& b) - { - m_events.clear(); - for(std::deque::const_iterator i = b.m_events.begin(); i != b.m_events.end(); ++i) - m_events.push_back(*i); - return *this; - } + int size() const + { + return m_events.size(); + } - TOOL_EVENT_LIST& operator=(const TOOL_EVENT& b) - { - m_events.clear(); - m_events.push_back(b); - return *this; - } - - TOOL_EVENT_LIST& operator||(const TOOL_EVENT& b) - { - Add(b); - return *this; - } + void clear() + { + m_events.clear(); + } - TOOL_EVENT_LIST& operator||(const TOOL_EVENT_LIST& b) - { - - return *this; - } + TOOL_EVENT_LIST& operator=( const TOOL_EVENT_LIST& b ) + { + m_events.clear(); - private: - std::deque m_events; + for( std::deque::const_iterator i = b.m_events.begin(); + i != b.m_events.end(); ++i ) + { + m_events.push_back(*i); + } + + return *this; + } + + TOOL_EVENT_LIST& operator=( const TOOL_EVENT& b ) + { + m_events.clear(); + m_events.push_back( b ); + return *this; + } + + TOOL_EVENT_LIST& operator||( const TOOL_EVENT& b ) + { + Add( b ); + return *this; + } + + TOOL_EVENT_LIST& operator||( const TOOL_EVENT_LIST& b ) + { + return *this; + } + +private: + std::deque m_events; }; -inline const TOOL_EVENT_LIST operator || (const TOOL_EVENT& a, const TOOL_EVENT &b ) +inline const TOOL_EVENT_LIST operator||( const TOOL_EVENT& a, const TOOL_EVENT &b ) { TOOL_EVENT_LIST l; - l.Add(a); - l.Add(b); + l.Add( a ); + l.Add( b ); return l; } -inline const TOOL_EVENT_LIST operator || (const TOOL_EVENT & a, const TOOL_EVENT_LIST &b ) +inline const TOOL_EVENT_LIST operator||( const TOOL_EVENT & a, const TOOL_EVENT_LIST &b ) { - TOOL_EVENT_LIST l(b); + TOOL_EVENT_LIST l( b ); - l.Add(a); + l.Add( a ); return l; } diff --git a/include/tool/tool_interactive.h b/include/tool/tool_interactive.h index 679ab5588e..10b7250588 100644 --- a/include/tool/tool_interactive.h +++ b/include/tool/tool_interactive.h @@ -32,9 +32,9 @@ class CONTEXT_MENU; -class TOOL_INTERACTIVE : public TOOL_BASE { +class TOOL_INTERACTIVE : public TOOL_BASE +{ public: - TOOL_INTERACTIVE( TOOL_ID aId, const std::string& aName ); /** @@ -87,20 +87,18 @@ public: void Yield ( const T& returnValue ); protected: - /* helper functions for constructing events for Wait() and Go() with less typing */ const TOOL_EVENT evActivate( std::string aToolName = "" ); const TOOL_EVENT evCommand( int aCommandId = -1 ); const TOOL_EVENT evCommand( std::string aCommandStr = ""); const TOOL_EVENT evMotion(); - const TOOL_EVENT evClick(int aButton = MB_Any ); - const TOOL_EVENT evDrag(int aButton = MB_Any ); + const TOOL_EVENT evClick( int aButton = MB_Any ); + const TOOL_EVENT evDrag( int aButton = MB_Any ); const TOOL_EVENT evButtonUp( int aButton = MB_Any ); const TOOL_EVENT evButtonDown(int aButton = MB_Any ); private: - void goInternal( TOOL_STATE_FUNC& aState, const TOOL_EVENT_LIST& aConditions ); }; @@ -108,7 +106,7 @@ private: template void TOOL_INTERACTIVE::Go( int (T::*aStateFunc)( TOOL_EVENT& ), const TOOL_EVENT_LIST& aConditions ) { - TOOL_STATE_FUNC sptr (static_cast(this), aStateFunc); + TOOL_STATE_FUNC sptr (static_cast( this ), aStateFunc); goInternal( sptr, aConditions ); } diff --git a/include/view/view.h b/include/view/view.h index 7a3a7603de..d9f5ed5190 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -281,7 +281,7 @@ public: } /** - * Function SetLayerOrder() + * Function SetLayerOrder() * Sets rendering order of a particular layer. * @param aLayer: the layer * @param aRenderingOrder: arbitrary number denoting the rendering order. From 3f1b9a6b4a3aedf398d0c437cd9d18dcaab68828 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 7 Aug 2013 17:20:01 +0200 Subject: [PATCH 219/415] Different approach to item recaching. --- common/view/view.cpp | 104 +++++++++++++++++++++----------------- common/view/view_item.cpp | 1 + include/view/view.h | 8 ++- 3 files changed, 65 insertions(+), 48 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index fa5aade34f..2c0104f470 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -324,7 +324,7 @@ struct VIEW::updateItemsColor const COLOR4D color = painter->GetColor( aItem, layer ); int group = aItem->getGroup( layer ); - if( group > 0) + if( group >= 0 ) gal->ChangeGroupColor( group, color ); } @@ -539,8 +539,8 @@ void VIEW::redrawRect( const BOX2I& aRect ) m_gal->SetTarget( l->target ); m_gal->SetLayerDepth( l->renderingOrder ); l->items->Query( aRect, drawFunc ); + l->isDirty = false; } - l->isDirty = false; } } @@ -638,49 +638,6 @@ VECTOR2D VIEW::GetScreenPixelSize() const } -void VIEW::invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ) -{ - int layer_indices[VIEW_MAX_LAYERS], layer_count; - - aItem->ViewGetLayers( layer_indices, layer_count ); - - for( int i = 0; i < layer_count; i++ ) - { - // Iterate through the layers used by the item - if( m_layers.find( layer_indices[i] ) != m_layers.end() ) - { - VIEW_LAYER* l = &m_layers[layer_indices[i]]; - - // Mark the area occupied by the item as dirty - l->dirtyExtents = - l->isDirty ? aItem->ViewBBox() : l->dirtyExtents.Merge( aItem->ViewBBox() ); - - l->isDirty = true; - - // If geometry has to be updated, then we need to reinsert the item - if( aUpdateFlags & VIEW_ITEM::GEOMETRY ) - { - l->items->Remove( aItem ); - l->items->Insert( aItem ); - } - } - } - - // Remove all the groups, so the item will be recached - if( aItem->storesGroups() ) - { - // Clear the cached groups stored in GAL - std::vector groups = aItem->getAllGroups(); - for( std::vector::iterator i = groups.begin(); i != groups.end(); i++ ) - { - m_gal->DeleteGroup( *i ); - } - - aItem->deleteGroups(); - } -} - - struct VIEW::clearLayerCache { clearLayerCache( VIEW* aView ) : @@ -715,14 +672,67 @@ void VIEW::clearGroupCache() } +void VIEW::invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ) +{ + int layers[VIEW_MAX_LAYERS], layers_count; + aItem->ViewGetLayers( layers, layers_count ); + + // Iterate through layers used by the item and recache it immediately + for( int i = 0; i < layers_count; i++ ) + { + if( aUpdateFlags == VIEW_ITEM::APPEARANCE ) + { + updateItemAppearance( aItem, layers[i] ); + } + else if( aUpdateFlags == VIEW_ITEM::GEOMETRY ) + { + updateItemGeometry( aItem, layers[i]); + } + + // Mark those layers as dirty, so the VIEW will be refreshed + m_layers[layers[i]].isDirty = true; + } +} + + +void VIEW::updateItemAppearance( VIEW_ITEM* aItem, int aLayer ) +{ + wxASSERT( (unsigned) aLayer < m_layers.size() ); + + // Obtain the color that should be used for coloring the item on the specific layerId + const COLOR4D color = m_painter->GetColor( aItem, aLayer ); + int group = aItem->getGroup( aLayer ); + + // Change the color, only if it has group assigned + if( group >= 0 ) + m_gal->ChangeGroupColor( group, color ); +} + + +void VIEW::updateItemGeometry( VIEW_ITEM* aItem, int aLayer ) +{ + wxASSERT( (unsigned) aLayer < m_layers.size() ); + VIEW_LAYER& l = m_layers.at( aLayer ); + + m_gal->SetTarget( l.target ); + m_gal->SetLayerDepth( l.renderingOrder ); + + // Redraw the item from scratch + int group = m_gal->BeginGroup(); + aItem->setGroup( aLayer, group ); + m_painter->Draw( static_cast( aItem ), aLayer ); + m_gal->EndGroup(); +} + + bool VIEW::areRequiredLayersEnabled( int aLayerId ) const { wxASSERT( (unsigned) aLayerId < m_layers.size() ); std::set::iterator it, it_end; - for( it = m_layers.at( aLayerId ).requiredLayers.begin(), it_end = m_layers.at( aLayerId ).requiredLayers.end(); - it != it_end; ++it ) + for( it = m_layers.at( aLayerId ).requiredLayers.begin(), + it_end = m_layers.at( aLayerId ).requiredLayers.end(); it != it_end; ++it ) { // That is enough if just one layer is not enabled if( !m_layers.at( *it ).enabled ) diff --git a/common/view/view_item.cpp b/common/view/view_item.cpp index 2598eb8ee6..3d1fcc1f35 100644 --- a/common/view/view_item.cpp +++ b/common/view/view_item.cpp @@ -125,6 +125,7 @@ void VIEW_ITEM::setGroup( int aLayer, int aId ) void VIEW_ITEM::deleteGroups() { delete[] m_groups; + m_groups = NULL; m_groupsSize = 0; } diff --git a/include/view/view.h b/include/view/view.h index d9f5ed5190..daed4dc870 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -369,7 +369,7 @@ public: * Tells if the VIEW is dynamic (ie. can be changed, for example displaying PCBs in a window) * or static (that cannot be modified, eg. displaying image/PDF). */ - bool IsDynamic() const { return m_dynamic; } + bool IsDynamic() const { return m_dynamic; } /** * Function IsDirty() @@ -427,6 +427,12 @@ private: ///* used by GAL) void clearGroupCache(); + /// Updates colors that are used for an item to be drawn + void updateItemAppearance( VIEW_ITEM* aItem, int aLayer ); + + /// Updates all informations needed to draw an item + void updateItemGeometry( VIEW_ITEM* aItem, int aLayer ); + /// Determines rendering order of layers. Used in display order sorting function. static bool compareRenderingOrder( VIEW_LAYER* i, VIEW_LAYER* j ) { From 768b039cdebfbadf7f5f9339510a38511dd814b4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 8 Aug 2013 11:43:56 +0200 Subject: [PATCH 220/415] Added general purpose overlay layer and moved selection box to it. --- include/layers_id_colors_and_visibility.h | 3 +++ pcbnew/basepcbframe.cpp | 1 + pcbnew/tools/selection_area.cpp | 18 ++++++++---------- pcbnew/tools/selection_area.h | 5 +++-- pcbnew/tools/selection_tool.cpp | 4 ---- 5 files changed, 15 insertions(+), 16 deletions(-) diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index f9331a0254..bb1b13a243 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -240,6 +240,8 @@ enum PCB_VISIBLE PAD_BK_NETNAMES_VISIBLE, PADS_NETNAMES_VISIBLE, + GP_OVERLAY, // General purpose overlay + END_PCB_VISIBLE_LIST // sentinel }; @@ -256,6 +258,7 @@ enum PCB_VISIBLE /// means that layer is displayed closer to the user, ie. on the top). const LAYER_NUM GalLayerOrder[] = { + ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), DRAW_N, COMMENT_N, ECO1_N, ECO2_N, EDGE_N, UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31, diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index b55ba8aabd..1308addc82 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -831,6 +831,7 @@ void PCB_BASE_FRAME::LoadSettings() view->SetRequired( ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); + view->SetLayerTarget( ITEM_GAL_LAYER( GP_OVERLAY ), KiGfx::TARGET_OVERLAY ); // Apply layer coloring scheme & display options if( view->GetPainter() ) diff --git a/pcbnew/tools/selection_area.cpp b/pcbnew/tools/selection_area.cpp index 3b8c52d0e6..5c30de222c 100644 --- a/pcbnew/tools/selection_area.cpp +++ b/pcbnew/tools/selection_area.cpp @@ -33,8 +33,8 @@ using namespace KiGfx; const BOX2I SELECTION_AREA::ViewBBox() const { BOX2I tmp; - tmp.SetOrigin(m_origin); - tmp.SetEnd(m_end); + tmp.SetOrigin( m_origin ); + tmp.SetEnd( m_end ); tmp.Normalize(); return tmp; } @@ -49,14 +49,12 @@ void SELECTION_AREA::ViewGetLayers( int aLayers[], int& aCount ) const void SELECTION_AREA::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const { - VECTOR2D width = m_view->ToWorld( VECTOR2D( 1.0, 1.0 ), false ); // fixme: pixel-sized stroke width setting? - aGal->SetLineWidth( width.x ); - aGal->SetStrokeColor(COLOR4D(1.0, 1.0, 0.4, 1.0)); - aGal->SetFillColor(COLOR4D(0.3, 0.3, 0.5, 0.3)); - aGal->SetIsStroke(true); - aGal->SetIsFill(true); - aGal->SetLayerDepth(100.0); - aGal->DrawRectangle(m_origin, m_end); + aGal->SetLineWidth( 1.0 ); + aGal->SetStrokeColor( COLOR4D( 1.0, 1.0, 0.4, 1.0 ) ); + aGal->SetFillColor( COLOR4D( 0.3, 0.3, 0.5, 0.3 ) ); + aGal->SetIsStroke( true ); + aGal->SetIsFill( true ); + aGal->DrawRectangle( m_origin, m_end ); } diff --git a/pcbnew/tools/selection_area.h b/pcbnew/tools/selection_area.h index e004339d9b..8cc380b4ab 100644 --- a/pcbnew/tools/selection_area.h +++ b/pcbnew/tools/selection_area.h @@ -33,6 +33,7 @@ #include #include #include +#include /** * Class SELECTION_AREA @@ -42,7 +43,7 @@ class SELECTION_AREA : public EDA_ITEM { public: - static const int SelectionLayer = 126; // fixme: define globally + static const int SelectionLayer = ITEM_GAL_LAYER( GP_OVERLAY ); SELECTION_AREA(); ~SELECTION_AREA() {}; @@ -62,7 +63,7 @@ public: m_end = aEnd; } - void Show(int x, std::ostream& st) const + void Show( int x, std::ostream& st) const { } diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index acd33326d6..19d25b95e4 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -199,10 +199,6 @@ void SELECTION_TOOL::selectMultiple() m_selArea->SetEnd( evt->Position() ); m_selArea->ViewSetVisible( true ); m_selArea->ViewUpdate( VIEW_ITEM::APPEARANCE | VIEW_ITEM::GEOMETRY ); - - v->SetLayerVisible( SELECTION_AREA::SelectionLayer ); - v->SetLayerOrder( SELECTION_AREA::SelectionLayer, 1000 ); - v->SetLayerTarget( SELECTION_AREA::SelectionLayer, TARGET_OVERLAY ); } if( evt->IsMouseUp( MB_Left ) ) From a8430e09f5127ef63dd32ced9ab20f9e92561178 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 8 Aug 2013 11:53:29 +0200 Subject: [PATCH 221/415] Added selection box for modules. --- pcbnew/class_module.cpp | 6 ++++++ pcbnew/class_module.h | 3 +++ pcbnew/pcb_painter.cpp | 19 +++++++++++++++++++ pcbnew/pcb_painter.h | 1 + 4 files changed, 29 insertions(+) diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index f5b29906a6..cf61f31493 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -1024,3 +1024,9 @@ void MODULE::SetOrientation( double newangle ) CalculateBoundingBox(); } + +void MODULE::ViewGetLayers( int aLayers[], int& aCount ) const +{ + aCount = 1; + aLayers[0] = ITEM_GAL_LAYER( GP_OVERLAY ); // Selection box +} diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index 9730bd7caf..2ab09071fa 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -497,6 +497,9 @@ public: /// Return the initial comments block or NULL if none, without transfer of ownership. const wxArrayString* GetInitialComments() const { return m_initial_comments; } + /// @copydoc VIEW_ITEM::ViewGetLayers() + virtual void ViewGetLayers( int aLayers[], int& aCount ) const; + #if defined(DEBUG) virtual void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override #endif diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 49260064bc..6143e24219 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -219,6 +219,10 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) draw( (DRAWSEGMENT*) aItem ); break; + case PCB_MODULE_T: + draw( (MODULE*) aItem ); + break; + case PCB_TEXT_T: draw( (TEXTE_PCB*) aItem ); break; @@ -654,6 +658,21 @@ void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment ) } +void PCB_PAINTER::draw( const MODULE* aModule ) +{ + // For modules we have to draw a selection box if needed + if( aModule->IsSelected() ) + { + BOX2I boundingBox = aModule->ViewBBox(); + + m_gal->SetIsStroke( false ); + m_gal->SetIsFill( true ); + m_gal->SetFillColor( COLOR4D( 1.0, 1.0, 1.0, 0.5 ) ); + m_gal->DrawRectangle( boundingBox.GetOrigin(), boundingBox.GetEnd() ); + } +} + + void PCB_PAINTER::draw( const TEXTE_PCB* aText ) { if( aText->GetText().Length() == 0 ) diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 250e291413..3c220ee164 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -141,6 +141,7 @@ protected: void draw( const SEGVIA*, int ); void draw( const D_PAD*, int ); void draw( const DRAWSEGMENT* ); + void draw( const MODULE* ); void draw( const TEXTE_PCB* ); void draw( const TEXTE_MODULE*, int ); void draw( const ZONE_CONTAINER* ); From 09aa89f3f9a2e5dd468070348b01646792ced989 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 8 Aug 2013 12:30:00 +0200 Subject: [PATCH 222/415] Added brightened mode for selecting items using disambiguation menu. --- common/painter.cpp | 27 ++++++++++++++++++++++--- common/view/view.cpp | 13 ++++++++---- include/base_struct.h | 6 +++--- include/painter.h | 36 +++++++++++++++++++-------------- pcbnew/tools/selection_tool.cpp | 19 +++++++++-------- 5 files changed, 68 insertions(+), 33 deletions(-) diff --git a/common/painter.cpp b/common/painter.cpp index 799fdc39e8..5787b5427c 100644 --- a/common/painter.cpp +++ b/common/painter.cpp @@ -25,14 +25,13 @@ */ #include +#include using namespace KiGfx; RENDER_SETTINGS::RENDER_SETTINGS() { // Set the default initial values - m_selectionBorderColor = COLOR4D( 1.0, 1.0, 1.0, 1.0 ); - m_highlightFactor = 0.5; m_selectFactor = 0.5; m_layerOpacity = 0.8; @@ -65,7 +64,7 @@ void RENDER_SETTINGS::update() PAINTER::PAINTER( GAL* aGal ) : - m_gal( aGal ), m_settings( NULL ) + m_gal( aGal ), m_settings( NULL ), m_brightenedColor( 0.0, 1.0, 0.0, 0.9 ) { } @@ -80,3 +79,25 @@ void PAINTER::SetGAL( GAL* aGal ) { m_gal = aGal; } + + +void PAINTER::DrawBrightened( const VIEW_ITEM* aItem ) +{ + BOX2I box = aItem->ViewBBox(); + + RenderTarget oldTarget = m_gal->GetTarget(); + m_gal->SetTarget( TARGET_OVERLAY ); + + m_gal->PushDepth(); + m_gal->SetLayerDepth( -1.0 ); + + // Draw semitransparent box that marks items as brightened + m_gal->SetIsStroke( true ); + m_gal->SetLineWidth( 100000.0 ); + m_gal->SetStrokeColor( m_brightenedColor ); + + m_gal->DrawRectangle( box.GetOrigin(), box.GetOrigin() + box.GetSize() ); + m_gal->PopDepth(); + + m_gal->SetTarget( oldTarget ); +} diff --git a/common/view/view.cpp b/common/view/view.cpp index 2c0104f470..85248b04aa 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -509,16 +509,21 @@ struct VIEW::drawItem { group = gal->BeginGroup(); aItem->setGroup( currentLayer->id, group ); - if(!view->m_painter->Draw( aItem, currentLayer->id )) - aItem->ViewDraw(currentLayer->id, gal, BOX2I()); + if( !view->m_painter->Draw( aItem, currentLayer->id ) ) + aItem->ViewDraw( currentLayer->id, gal, BOX2I() ); // Alternative drawing method gal->EndGroup(); } } else { // Immediate mode - if(!view->m_painter->Draw( aItem, currentLayer->id )) - aItem->ViewDraw(currentLayer->id, gal, BOX2I()); + if( !view->m_painter->Draw( aItem, currentLayer->id ) ) + aItem->ViewDraw( currentLayer->id, gal, BOX2I() ); // Alternative drawing method + } + + if( static_cast( aItem )->IsBrightened() ) + { + view->m_painter->DrawBrightened( aItem ); } } diff --git a/include/base_struct.h b/include/base_struct.h index 30ef9d3c66..67e427eae6 100644 --- a/include/base_struct.h +++ b/include/base_struct.h @@ -472,13 +472,13 @@ public: inline bool IsHighlighted() const { return m_Flags & HIGHLIGHTED; } inline bool IsBrightened() const { return m_Flags & BRIGHTENED; } - inline void SetBrightened() { SetFlags( BRIGHTENED ); ViewUpdate( APPEARANCE ); } inline void SetSelected() { SetFlags( SELECTED ); ViewUpdate( APPEARANCE ); } - inline void SetHighlighted() { SetFlags( HIGHLIGHTED ); ViewUpdate( APPEARANCE | GEOMETRY ); } + inline void SetHighlighted() { SetFlags( HIGHLIGHTED ); ViewUpdate( APPEARANCE ); } + inline void SetBrightened() { SetFlags( BRIGHTENED ); ViewUpdate( APPEARANCE ); } inline void ClearSelected() { ClearFlags( SELECTED ); ViewUpdate( APPEARANCE ); } inline void ClearHighlighted() { ClearFlags( HIGHLIGHTED ); ViewUpdate( APPEARANCE ); } - inline void ClearBrightened() { ClearFlags( BRIGHTENED ); ViewUpdate( APPEARANCE | GEOMETRY ); } + inline void ClearBrightened() { ClearFlags( BRIGHTENED ); ViewUpdate( APPEARANCE ); } void SetModified(); diff --git a/include/painter.h b/include/painter.h index 8ab5c22b30..d546981369 100644 --- a/include/painter.h +++ b/include/painter.h @@ -55,7 +55,6 @@ class VIEW_ITEM; class RENDER_SETTINGS { public: - RENDER_SETTINGS(); virtual ~RENDER_SETTINGS(); @@ -125,21 +124,19 @@ protected: std::set m_activeLayers; /// Stores active layers number /// Parameters for display modes - bool m_hiContrastEnabled; /// High contrast display mode on/off - COLOR4D m_hiContrastColor; /// Color used for high contrast display mode - float m_hiContrastFactor; /// Factor used for computing high contrast color + bool m_hiContrastEnabled; ///< High contrast display mode on/off + COLOR4D m_hiContrastColor; ///< Color used for high contrast display mode + float m_hiContrastFactor; ///< Factor used for computing high contrast color - bool m_highlightEnabled; /// Highlight display mode on/off - int m_highlightNetcode; /// Net number that is displayed in highlight - /// -1 means that there is no specific net, and whole active - /// layer is highlighted - float m_highlightFactor; /// Factor used for computing hightlight color + bool m_highlightEnabled; ///< Highlight display mode on/off + int m_highlightNetcode; ///< Net number that is displayed in highlight + ///< -1 means that there is no specific net, and whole active + ///< layer is highlighted + float m_highlightFactor; ///< Factor used for computing hightlight color - COLOR4D m_selectionBorderColor; /// Color of selection box border - - float m_selectFactor; /// Specifies how color of selected items is changed - float m_layerOpacity; /// Determines opacity of all layers - float m_outlineWidth; /// Line width used when drawing outlines + float m_selectFactor; ///< Specifies how color of selected items is changed + float m_layerOpacity; ///< Determines opacity of all layers + float m_outlineWidth; ///< Line width used when drawing outlines /// Map of colors that were usually used for display std::map m_legacyColorMap; @@ -161,7 +158,6 @@ protected: class PAINTER { public: - /* * Constructor PAINTER( GAL* ) * initializes this object for painting on any of the polymorphic @@ -214,6 +210,13 @@ public: */ virtual bool Draw( const VIEW_ITEM* aItem, int aLayer ) = 0; + /** + * Function DrawBrightened + * Draws a special marking for the item. + * @param aItem is the item that is going to be marked. + */ + virtual void DrawBrightened( const VIEW_ITEM* aItem ); + /** * Function GetColor * Returns the color that should be used to draw the specific VIEW_ITEM on the specific layer @@ -231,6 +234,9 @@ protected: /// Colors and display modes settings that are going to be used when drawing items. RENDER_SETTINGS* m_settings; + + /// Color of brightened item frame + COLOR4D m_brightenedColor; }; } // namespace KiGfx diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 19d25b95e4..97e6c1200a 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -89,10 +89,12 @@ void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem, bool aAdditive ) { aItem->ClearSelected(); m_selectedItems.erase( aItem ); - } else + } + else { if( !aAdditive ) clearSelection(); + aItem->SetSelected(); m_selectedItems.insert( aItem ); } @@ -237,19 +239,20 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR *aCollector ) if( evt->Action() == TA_ContextMenuUpdate ) { if( current ) - current->ClearSelected(); + current->ClearBrightened(); int id = *evt->GetCommandId(); + if( id >= 0 ) { current = ( *aCollector )[id]; - current->SetSelected(); - } else + current->SetBrightened(); + } + else current = NULL; - - } else if( evt->Action() == TA_ContextMenuChoice ) + } + else if( evt->Action() == TA_ContextMenuChoice ) { - optional id = evt->GetCommandId(); if( current ) @@ -261,9 +264,9 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR *aCollector ) current->SetSelected(); return current; } + return NULL; } - } return NULL; From c2342776e1d737f67483f02155b455e43f33779e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 8 Aug 2013 14:50:32 +0200 Subject: [PATCH 223/415] Fixed disambiguation menu issue. --- common/tool/context_menu.cpp | 2 +- common/tool/tool_interactive.cpp | 2 +- common/tool/tool_manager.cpp | 2 +- include/tool/context_menu.h | 1 - include/tool/tool_manager.h | 2 +- pcbnew/tools/selection_tool.cpp | 8 ++++---- pcbnew/tools/selection_tool.h | 2 ++ 7 files changed, 10 insertions(+), 9 deletions(-) diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index 7e791d195b..125bb2bffb 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -37,7 +37,7 @@ public: CMEventHandler( CONTEXT_MENU* aMenu ): m_menu(aMenu) {}; - void onEvent( wxEvent & aEvent ) + void onEvent( wxEvent& aEvent ) { TOOL_EVENT evt; wxEventType type = aEvent.GetEventType(); diff --git a/common/tool/tool_interactive.cpp b/common/tool/tool_interactive.cpp index 4e2d51e562..1158a2625f 100644 --- a/common/tool/tool_interactive.cpp +++ b/common/tool/tool_interactive.cpp @@ -61,7 +61,7 @@ void TOOL_INTERACTIVE::Reset() } -void TOOL_INTERACTIVE::SetContextMenu( CONTEXT_MENU *aMenu, TOOL_ContextMenuTrigger aTrigger ) +void TOOL_INTERACTIVE::SetContextMenu( CONTEXT_MENU* aMenu, TOOL_ContextMenuTrigger aTrigger ) { aMenu->setTool( this ); m_toolMgr->ScheduleContextMenu( this, aMenu, aTrigger ); diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 3238100c68..7293c6fb31 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -68,7 +68,7 @@ TOOL_MANAGER::TOOL_MANAGER() { } -void TOOL_MANAGER::RegisterTool ( TOOL_BASE *aTool ) +void TOOL_MANAGER::RegisterTool( TOOL_BASE* aTool ) { ToolState* st = new ToolState; diff --git a/include/tool/context_menu.h b/include/tool/context_menu.h index 63122b5b94..909798534a 100644 --- a/include/tool/context_menu.h +++ b/include/tool/context_menu.h @@ -40,7 +40,6 @@ class CONTEXT_MENU { public: - CONTEXT_MENU(); ~CONTEXT_MENU(); diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index a41200b6e7..8014eded74 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -156,7 +156,7 @@ class TOOL_MANAGER TOOL_ContextMenuTrigger aTrigger ); private: - void dispatchInternal ( TOOL_EVENT& aEvent ); + void dispatchInternal( TOOL_EVENT& aEvent ); struct ToolState; typedef std::pair Transition; diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 97e6c1200a..4605c39185 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -216,11 +216,11 @@ void SELECTION_TOOL::selectMultiple() BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR *aCollector ) { - CONTEXT_MENU cmenu; OPT_TOOL_EVENT evt; BOARD_ITEM *current = NULL; - cmenu.SetTitle( _( "Clarify selection" ) ); + m_menu.reset( new CONTEXT_MENU() ); + m_menu->SetTitle( _( "Clarify selection" ) ); int limit = std::min( 10, aCollector->GetCount() ); @@ -229,10 +229,10 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR *aCollector ) wxString text; BOARD_ITEM *item = ( *aCollector )[i]; text = item->GetSelectMenuText(); - cmenu.Add( text, i ); + m_menu->Add( text, i ); } - SetContextMenu( &cmenu, CMENU_NOW ); + SetContextMenu( m_menu.get(), CMENU_NOW ); while( evt = Wait() ) { diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 8db55dd306..179dc1e88d 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -26,6 +26,7 @@ #define __SELECTION_TOOL_H #include +#include #include #include @@ -66,6 +67,7 @@ private: std::set m_selectedItems; SELECTION_AREA* m_selArea; + boost::shared_ptr m_menu; }; #endif From 9d9d74faadc137ce3b96fbdfb233b47c2e4a306b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 8 Aug 2013 14:59:59 +0200 Subject: [PATCH 224/415] Reformatting. --- common/tool/context_menu.cpp | 2 +- common/tool/tool_manager.cpp | 2 + include/tool/coroutine.h | 99 ++++++++-------- include/tool/tool_manager.h | 205 +++++++++++++++++----------------- pcbnew/tools/selection_tool.h | 2 +- 5 files changed, 151 insertions(+), 159 deletions(-) diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index 125bb2bffb..0a38f5bb0c 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -35,7 +35,7 @@ class CONTEXT_MENU::CMEventHandler : public wxEvtHandler { public: CMEventHandler( CONTEXT_MENU* aMenu ): - m_menu(aMenu) {}; + m_menu( aMenu ) {}; void onEvent( wxEvent& aEvent ) { diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 7293c6fb31..95c743cc26 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -64,10 +64,12 @@ struct TOOL_MANAGER::ToolState std::vector transitions; }; + TOOL_MANAGER::TOOL_MANAGER() { } + void TOOL_MANAGER::RegisterTool( TOOL_BASE* aTool ) { ToolState* st = new ToolState; diff --git a/include/tool/coroutine.h b/include/tool/coroutine.h index be57b97778..719c4dccd8 100644 --- a/include/tool/coroutine.h +++ b/include/tool/coroutine.h @@ -52,12 +52,11 @@ See coroutine_example.cpp for sample code. */ -template -class COROUTINE { - +template +class COROUTINE +{ public: - - COROUTINE ( ) + COROUTINE() { m_stackSize = c_defaultStackSize; m_stack = NULL; @@ -68,34 +67,26 @@ public: * Constructor * Creates a coroutine from a member method of an object */ - template - COROUTINE ( T* object, ReturnType (T::*ptr)( ArgType ) ) : - m_func (object, ptr), - m_saved(NULL), - m_stack(NULL), - m_stackSize(c_defaultStackSize) + COROUTINE( T* object, ReturnType (T::*ptr)( ArgType ) ) : + m_func( object, ptr ), m_saved( NULL ), m_stack( NULL ), m_stackSize( c_defaultStackSize ) { - } /** * Constructor * Creates a coroutine from a delegate object */ - COROUTINE( DELEGATE < ReturnType, ArgType > aEntry ) : - m_func(aEntry), - m_saved(NULL), - m_stack(NULL), - m_stackSize(c_defaultStackSize) + COROUTINE( DELEGATE aEntry ) : + m_func( aEntry ), m_saved( NULL ), m_stack( NULL ), m_stackSize( c_defaultStackSize ) {}; ~COROUTINE() { - if(m_saved) - delete m_saved; - if(m_stack) - free(m_stack); + if( m_saved ) + delete m_saved; + if( m_stack ) + free( m_stack ); } /** @@ -105,9 +96,9 @@ public: * After a yield, Call() or Resume() methods invoked by the caller will * immediately return true, indicating that we are not done yet, just asleep. */ - void Yield( ) + void Yield() { - jump_fcontext(m_self, m_saved, 0); + jump_fcontext( m_self, m_saved, 0 ); } /** @@ -119,7 +110,7 @@ public: void Yield( ReturnType& retVal ) { m_retVal = retVal; - jump_fcontext(m_self, m_saved, 0); + jump_fcontext( m_self, m_saved, 0 ); } /** @@ -127,7 +118,7 @@ public: * * Defines the entry point for the coroutine, if not set in the constructor. */ - void SetEntry ( DELEGATE < ReturnType, ArgType > aEntry ) + void SetEntry( DELEGATE aEntry ) { m_func = aEntry; } @@ -141,19 +132,19 @@ public: bool Call( ArgType args ) { // fixme: Clean up stack stuff. Add a guard - m_stack = malloc(c_defaultStackSize); + m_stack = malloc( c_defaultStackSize ); - // align to 16 bytes - void *sp = (void *) ((((ptrdiff_t) m_stack) + m_stackSize - 0xf) & 0xfffffff0); + // align to 16 bytes + void *sp = (void *) ( ( ( (ptrdiff_t) m_stack ) + m_stackSize - 0xf ) & 0xfffffff0 ); - m_args = &args; - m_self = boost::context::make_fcontext(sp, m_stackSize, callerStub ); - m_saved = new boost::context::fcontext_t(); - - m_running = true; - // off we go! - boost::context::jump_fcontext(m_saved, m_self, reinterpret_cast (this)); - return m_running; + m_args = &args; + m_self = boost::context::make_fcontext( sp, m_stackSize, callerStub ); + m_saved = new boost::context::fcontext_t(); + + m_running = true; + // off we go! + boost::context::jump_fcontext( m_saved, m_self, reinterpret_cast( this ) ); + return m_running; } /** @@ -163,10 +154,10 @@ public: * @return true, if the coroutine has yielded again and false if it has finished its * execution (returned). */ - bool Resume( ) + bool Resume() { - jump_fcontext(m_saved, m_self, 0); - return m_running; + jump_fcontext( m_saved, m_self, 0 ); + return m_running; } /** @@ -190,47 +181,47 @@ public: } private: - static const int c_defaultStackSize = 2000000; /* real entry point of the coroutine */ - static void callerStub(intptr_t data) + static void callerStub( intptr_t data ) { // get pointer to self - COROUTINE *cor = reinterpret_cast *> (data); + COROUTINE* cor = reinterpret_cast*>( data ); // call the coroutine method - cor->m_retVal = cor->m_func(*cor->m_args); + cor->m_retVal = cor->m_func( *cor->m_args ); cor->m_running = false; // go back to wherever we came from. - boost::context::jump_fcontext(cor->m_self, cor->m_saved, 0); //reinterpret_cast (this)); + boost::context::jump_fcontext( cor->m_self, cor->m_saved, 0 ); //reinterpret_cast( this )); } - template struct strip_ref { - typedef T result; + template struct strip_ref + { + typedef T result; }; - template struct strip_ref { - typedef T result; + template struct strip_ref + { + typedef T result; }; - - DELEGATE < ReturnType, ArgType > m_func; + DELEGATE m_func; ///< pointer to coroutine entry arguments. Stripped of references ///< to avoid compiler errors. - typename strip_ref::result *m_args; + typename strip_ref::result* m_args; ReturnType m_retVal; ///< saved caller context - boost::context::fcontext_t *m_saved; + boost::context::fcontext_t* m_saved; ///< saved coroutine context - boost::context::fcontext_t *m_self; + boost::context::fcontext_t* m_self; ///< coroutine stack - void *m_stack; + void* m_stack; size_t m_stackSize; diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index 8014eded74..dc7e62ee8f 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -50,127 +50,126 @@ class wxWindow; */ class TOOL_MANAGER { - public: - - TOOL_MANAGER(); - ~TOOL_MANAGER(); +public: + TOOL_MANAGER(); + ~TOOL_MANAGER(); - /** - * Generates an unique ID from for a tool with given name. - */ - static TOOL_ID MakeToolId( const std::string& aToolName ); + /** + * Generates an unique ID from for a tool with given name. + */ + static TOOL_ID MakeToolId( const std::string& aToolName ); - /** - * Function RegisterTool() - * Adds a tool to the manager set and sets it up. Called once for - * each tool during application initialization. - * @param aTool: tool to be added. Ownership is transferred. - */ - void RegisterTool( TOOL_BASE* aTool ); + /** + * Function RegisterTool() + * Adds a tool to the manager set and sets it up. Called once for + * each tool during application initialization. + * @param aTool: tool to be added. Ownership is transferred. + */ + void RegisterTool( TOOL_BASE* aTool ); - /** - * Function InvokeTool() - * Calls a tool by sending a tool activation event to tool of given ID or name. - * An user-defined parameter object can be also passed - */ - void InvokeTool( TOOL_ID aToolId ); - void InvokeTool( const std::string& name ); + /** + * Function InvokeTool() + * Calls a tool by sending a tool activation event to tool of given ID or name. + * An user-defined parameter object can be also passed + */ + void InvokeTool( TOOL_ID aToolId ); + void InvokeTool( const std::string& name ); - template - void InvokeTool( const std::string& name, const Parameters& aToolParams ); + template + void InvokeTool( const std::string& name, const Parameters& aToolParams ); - /** - * Function FindTool() - * Searches for a tool with given name or ID - */ - TOOL_BASE *FindTool( int aId ); - TOOL_BASE *FindTool( const std::string& aName ); + /** + * Function FindTool() + * Searches for a tool with given name or ID + */ + TOOL_BASE *FindTool( int aId ); + TOOL_BASE *FindTool( const std::string& aName ); - /** - * Resets the state of a given tool by clearing its wait and - * transition lists and calling tool's internal Reset() method. - */ - void ResetTool( TOOL_BASE *aTool ); + /** + * Resets the state of a given tool by clearing its wait and + * transition lists and calling tool's internal Reset() method. + */ + void ResetTool( TOOL_BASE *aTool ); - /** - * Takes an event from the TOOL_DISPATCHER and propagates it to - * tools that requested events of matching type(s) - */ - bool ProcessEvent( TOOL_EVENT& aEvent ); - - /** - * Sets the work environment (model, view, view controls and the parent window). - * These are made available to the tool. Called by the parent frame (PCB_EDIT_FRAME) - * when the board is set up - */ - void SetEnvironment( EDA_ITEM* aModel, KiGfx::VIEW* aView, - KiGfx::VIEW_CONTROLS* aViewControls, wxWindow* aFrame ); + /** + * Takes an event from the TOOL_DISPATCHER and propagates it to + * tools that requested events of matching type(s) + */ + bool ProcessEvent( TOOL_EVENT& aEvent ); - /* Accessors for the environment objects (view, model, etc.) */ - KiGfx::VIEW* GetView() - { - return m_view; - } + /** + * Sets the work environment (model, view, view controls and the parent window). + * These are made available to the tool. Called by the parent frame (PCB_EDIT_FRAME) + * when the board is set up + */ + void SetEnvironment( EDA_ITEM* aModel, KiGfx::VIEW* aView, + KiGfx::VIEW_CONTROLS* aViewControls, wxWindow* aFrame ); - KiGfx::VIEW_CONTROLS* GetViewControls() - { - return m_viewControls; - } + /* Accessors for the environment objects (view, model, etc.) */ + KiGfx::VIEW* GetView() + { + return m_view; + } - EDA_ITEM* GetModel() - { - return m_model; - } + KiGfx::VIEW_CONTROLS* GetViewControls() + { + return m_viewControls; + } - wxWindow* GetEditFrame() - { - return m_editFrame; - } + EDA_ITEM* GetModel() + { + return m_model; + } - /** - * Defines a state transition - the events that cause a given handler method in the tool - * to be called. Called by TOOL_INTERACTIVE::Go(). May be called from a coroutine context. - */ - void ScheduleNextState( TOOL_BASE* aTool, TOOL_STATE_FUNC& aHandler, - const TOOL_EVENT_LIST& aConditions ); - - /** - * Pauses execution of a given tool until one or more events matching aConditions arrives. - * The pause/resume operation is done through COROUTINE object. - * Called only from coroutines. - */ - boost::optional ScheduleWait( TOOL_BASE* aTool, - const TOOL_EVENT_LIST& aConditions ); - - /** - * Sets behaviour of the tool's context popup menu. - * @param aMenu - the menu structure, defined by the tool - * @param aTrigger - when the menu is activated: - * CMENU_NOW: opens the menu right now - * CMENU_BUTTON: opens the menu when RMB is pressed - * CMENU_OFF: menu is disabled. - * May be called from a coroutine context. - */ - void ScheduleContextMenu( TOOL_BASE* aTool, CONTEXT_MENU* aMenu, - TOOL_ContextMenuTrigger aTrigger ); + wxWindow* GetEditFrame() + { + return m_editFrame; + } - private: - void dispatchInternal( TOOL_EVENT& aEvent ); + /** + * Defines a state transition - the events that cause a given handler method in the tool + * to be called. Called by TOOL_INTERACTIVE::Go(). May be called from a coroutine context. + */ + void ScheduleNextState( TOOL_BASE* aTool, TOOL_STATE_FUNC& aHandler, + const TOOL_EVENT_LIST& aConditions ); - struct ToolState; - typedef std::pair Transition; + /** + * Pauses execution of a given tool until one or more events matching aConditions arrives. + * The pause/resume operation is done through COROUTINE object. + * Called only from coroutines. + */ + boost::optional ScheduleWait( TOOL_BASE* aTool, + const TOOL_EVENT_LIST& aConditions ); - std::map m_toolState; - std::map m_toolNameIndex; - std::map m_toolIdIndex; + /** + * Sets behaviour of the tool's context popup menu. + * @param aMenu - the menu structure, defined by the tool + * @param aTrigger - when the menu is activated: + * CMENU_NOW: opens the menu right now + * CMENU_BUTTON: opens the menu when RMB is pressed + * CMENU_OFF: menu is disabled. + * May be called from a coroutine context. + */ + void ScheduleContextMenu( TOOL_BASE* aTool, CONTEXT_MENU* aMenu, + TOOL_ContextMenuTrigger aTrigger ); - EDA_ITEM* m_model; - KiGfx::VIEW* m_view; - KiGfx::VIEW_CONTROLS* m_viewControls; - wxWindow* m_editFrame; +private: + void dispatchInternal( TOOL_EVENT& aEvent ); - ToolState* m_currentTool; + struct ToolState; + typedef std::pair Transition; + + std::map m_toolState; + std::map m_toolNameIndex; + std::map m_toolIdIndex; + + EDA_ITEM* m_model; + KiGfx::VIEW* m_view; + KiGfx::VIEW_CONTROLS* m_viewControls; + wxWindow* m_editFrame; + + ToolState* m_currentTool; }; #endif diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 179dc1e88d..3c5fb159c4 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -54,7 +54,7 @@ public: ~SELECTION_TOOL (); void Reset(); - int Main(TOOL_EVENT& aEvent); + int Main( TOOL_EVENT& aEvent ); private: void selectSingle( const VECTOR2I& aWhere, bool aAdditive ); From eefc79b5b28cb4a97c30ec31689c7ef9ccb9709f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 8 Aug 2013 19:41:20 +0200 Subject: [PATCH 225/415] Reformatting. --- common/tool/tool_dispatcher.cpp | 1 - common/tool/tool_interactive.cpp | 2 +- include/tool/delegate.h | 17 ++++++++--------- include/view/view.h | 4 ++-- pcbnew/tools/selection_tool.cpp | 8 ++++---- 5 files changed, 15 insertions(+), 17 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 91df534df7..8a73cee15e 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -229,7 +229,6 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent &aEvent ) m_toolMgr->ProcessEvent( *evt ); aEvent.Skip(); - } diff --git a/common/tool/tool_interactive.cpp b/common/tool/tool_interactive.cpp index 1158a2625f..3c04d81cb1 100644 --- a/common/tool/tool_interactive.cpp +++ b/common/tool/tool_interactive.cpp @@ -44,7 +44,7 @@ TOOL_INTERACTIVE::~TOOL_INTERACTIVE() } -OPT_TOOL_EVENT TOOL_INTERACTIVE::Wait ( const TOOL_EVENT_LIST & aEventList ) +OPT_TOOL_EVENT TOOL_INTERACTIVE::Wait( const TOOL_EVENT_LIST& aEventList ) { return m_toolMgr->ScheduleWait( this, aEventList ); } diff --git a/include/tool/delegate.h b/include/tool/delegate.h index 3e48b57ccc..f2841bb4ff 100644 --- a/include/tool/delegate.h +++ b/include/tool/delegate.h @@ -46,14 +46,14 @@ template template DELEGATE ( T* object, ReturnType (T::*ptr)( Arg ) ) { - m_ptr = reinterpret_cast(ptr); - m_object = reinterpret_cast (object); + m_ptr = reinterpret_cast( ptr ); + m_object = reinterpret_cast( object ); }; ReturnType operator()( Arg a ) const { - DELEGATE *casted = reinterpret_cast * >(m_object); + DELEGATE *casted = reinterpret_cast*>( m_object ); return (casted->*m_ptr)(a); } @@ -69,8 +69,7 @@ private: template class DELEGATE0 { public: - typedef ReturnType (DELEGATE0::*MemberPointer)( ); - + typedef ReturnType ( DELEGATE0::*MemberPointer )(); typedef ReturnType _ReturnType; DELEGATE0 () @@ -80,15 +79,15 @@ template template DELEGATE0 ( T* object, ReturnType (T::*ptr)( ) ) { - m_ptr = reinterpret_cast(ptr); - m_object = reinterpret_cast (object); + m_ptr = reinterpret_cast( ptr ); + m_object = reinterpret_cast( object ); }; ReturnType operator()( ) const { - DELEGATE0 *casted = reinterpret_cast * >(m_object); - return (casted->*m_ptr)(); + DELEGATE0* casted = reinterpret_cast*>( m_object ); + return ( casted->*m_ptr )(); } private: diff --git a/include/view/view.h b/include/view/view.h index daed4dc870..060de91667 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -102,7 +102,7 @@ public: * @param aRequiredId is the id of the required layer. * @param aRequired tells if the required layer should be added or removed from the list. */ - void SetRequired( int aLayerId, int aRequiredId, bool aRequired = true ); + void SetRequired( int aLayerId, int aRequiredId, bool aRequired = true ); /** * Function CopySettings() @@ -378,7 +378,7 @@ public: */ bool IsDirty() const; - static const int VIEW_MAX_LAYERS = 128; ///* maximum number of layers that may be shown + static const int VIEW_MAX_LAYERS = 128; ///* maximum number of layers that may be shown private: struct VIEW_LAYER diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 4605c39185..839486f9c9 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -119,8 +119,8 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere, bool aAdditive ) GENERAL_COLLECTORS_GUIDE guide = getEditFrame()->GetCollectorsGuide(); GENERAL_COLLECTOR collector; - collector.Collect( pcb, GENERAL_COLLECTOR::AllBoardItems, wxPoint( aWhere.x, aWhere.y ), - guide ); + collector.Collect( pcb, GENERAL_COLLECTOR::AllBoardItems, + wxPoint( aWhere.x, aWhere.y ), guide ); switch( collector.GetCount() ) { @@ -186,7 +186,7 @@ void SELECTION_TOOL::handleHighlight( const VECTOR2D& aP ) void SELECTION_TOOL::selectMultiple() { OPT_TOOL_EVENT evt; - VIEW *v = getView(); + VIEW* v = getView(); v->Add( m_selArea ); @@ -217,7 +217,7 @@ void SELECTION_TOOL::selectMultiple() BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR *aCollector ) { OPT_TOOL_EVENT evt; - BOARD_ITEM *current = NULL; + BOARD_ITEM* current = NULL; m_menu.reset( new CONTEXT_MENU() ); m_menu->SetTitle( _( "Clarify selection" ) ); From 46670c7eeb77fe8a0b17e93e361d3f84adffe219 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 8 Aug 2013 19:42:19 +0200 Subject: [PATCH 226/415] Multiple items selection tool. --- pcbnew/tools/selection_tool.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 839486f9c9..0366d59bf2 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -197,6 +197,7 @@ void SELECTION_TOOL::selectMultiple() if( evt->IsDrag( MB_Left ) ) { + // Start drawing a selection box m_selArea->SetOrigin( evt->DragOrigin() ); m_selArea->SetEnd( evt->Position() ); m_selArea->ViewSetVisible( true ); @@ -205,7 +206,27 @@ void SELECTION_TOOL::selectMultiple() if( evt->IsMouseUp( MB_Left ) ) { + // End drawing a selection box m_selArea->ViewSetVisible( false ); + + // Mark items within a box as selected + std::vector selectedItems; + BOX2I selectionBox = m_selArea->ViewBBox(); + + v->Query( selectionBox, selectedItems ); + std::vector::iterator it, it_end; + for( it = selectedItems.begin(), it_end = selectedItems.end(); it != it_end; ++it ) + { + BOARD_ITEM* item = static_cast( it->first ); + + // Add only those items which are fully within a selection box + if( selectionBox.Contains( item->ViewBBox() ) ) + { + item->SetSelected(); + m_selectedItems.insert( item ); + } + } + break; } } From 67b64f5ec6fd7f6e5eee5ad28c2388ac7a6b4f09 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 9 Aug 2013 10:18:48 +0200 Subject: [PATCH 227/415] Added the additive mode for the selection area. --- pcbnew/tools/selection_tool.cpp | 19 ++++++++++++------- pcbnew/tools/selection_tool.h | 5 +++-- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 0366d59bf2..8b24d53d11 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -67,12 +67,14 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { + m_additive = evt->Modifier( MB_ModShift ); + if( evt->IsCancel() ) return 0; // single click? Select single object if( evt->IsClick( MB_Left ) ) - selectSingle( evt->Position(), evt->Modifier( MB_ModShift ) ); + selectSingle( evt->Position() ); // drag with LMB? Select multiple objects (or at least draw a selection box) if( evt->IsDrag( MB_Left ) ) @@ -83,7 +85,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) } -void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem, bool aAdditive ) +void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) { if( m_selectedItems.find( aItem ) != m_selectedItems.end() ) { @@ -92,7 +94,7 @@ void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem, bool aAdditive ) } else { - if( !aAdditive ) + if( !m_additive ) clearSelection(); aItem->SetSelected(); @@ -112,7 +114,7 @@ void SELECTION_TOOL::clearSelection() } -void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere, bool aAdditive ) +void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) { BOARD* pcb = getModel( PCB_T ); BOARD_ITEM* item; @@ -125,18 +127,18 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere, bool aAdditive ) switch( collector.GetCount() ) { case 0: - if( !aAdditive ) + if( !m_additive ) clearSelection(); break; case 1: - toggleSelection( collector[0], aAdditive ); + toggleSelection( collector[0] ); break; default: item = disambiguationMenu( &collector ); if( item ) - toggleSelection( item, aAdditive ); + toggleSelection( item ); break; } } @@ -197,6 +199,9 @@ void SELECTION_TOOL::selectMultiple() if( evt->IsDrag( MB_Left ) ) { + if( !m_additive ) + clearSelection(); + // Start drawing a selection box m_selArea->SetOrigin( evt->DragOrigin() ); m_selArea->SetEnd( evt->Position() ); diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 3c5fb159c4..7072cc3cdd 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -57,17 +57,18 @@ public: int Main( TOOL_EVENT& aEvent ); private: - void selectSingle( const VECTOR2I& aWhere, bool aAdditive ); + void selectSingle( const VECTOR2I& aWhere ); void selectMultiple(); void handleHighlight( const VECTOR2D& aP ); BOARD_ITEM* disambiguationMenu( GENERAL_COLLECTOR* aItems ); BOARD_ITEM* pickSmallestComponent( GENERAL_COLLECTOR* aCollector ); - void toggleSelection( BOARD_ITEM* aItem, bool aAdditive ); + void toggleSelection( BOARD_ITEM* aItem ); void clearSelection(); std::set m_selectedItems; SELECTION_AREA* m_selArea; boost::shared_ptr m_menu; + bool m_additive; }; #endif From 18618deea3e8b9447efe064ef634c65bc0b6fab2 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 9 Aug 2013 15:04:10 +0200 Subject: [PATCH 228/415] Added selection boxes for texts. --- pcbnew/class_pcb_text.cpp | 12 ++++ pcbnew/class_pcb_text.h | 9 ++- pcbnew/class_text_mod.cpp | 5 +- pcbnew/class_text_mod.h | 1 - pcbnew/pcb_painter.cpp | 104 ++++++++++++++++++---------------- pcbnew/pcb_painter.h | 5 +- pcbnew/tools/selection_tool.h | 4 +- 7 files changed, 82 insertions(+), 58 deletions(-) diff --git a/pcbnew/class_pcb_text.cpp b/pcbnew/class_pcb_text.cpp index 4ff4c02b88..2ce86606aa 100644 --- a/pcbnew/class_pcb_text.cpp +++ b/pcbnew/class_pcb_text.cpp @@ -223,3 +223,15 @@ const BOX2I TEXTE_PCB::ViewBBox() const return BOX2I( rect.GetOrigin(), rect.GetSize() ); } } + + +void TEXTE_PCB::ViewGetLayers( int aLayers[], int& aCount ) const +{ + // Layer that simply displays the text + aLayers[0] = m_Layer; + + // On the general purpose overlay there is a selection box displayed + aLayers[1] = ITEM_GAL_LAYER( GP_OVERLAY ); + + aCount = 2; +} diff --git a/pcbnew/class_pcb_text.h b/pcbnew/class_pcb_text.h index d947cd05c9..4bf5395b63 100644 --- a/pcbnew/class_pcb_text.h +++ b/pcbnew/class_pcb_text.h @@ -121,12 +121,15 @@ public: EDA_ITEM* Clone() const; + /// @copydoc VIEW_ITEM::ViewBBox() + virtual const BOX2I ViewBBox() const; + + /// @copydoc VIEW_ITEM::ViewGetLayers() + virtual void ViewGetLayers( int aLayers[], int& aCount ) const; + #if defined(DEBUG) virtual void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override #endif - - /// @copydoc VIEW_ITEM::ViewBBox() - virtual const BOX2I ViewBBox() const; }; #endif // #define CLASS_PCB_TEXT_H diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index 4ecfc2767a..d84cac4860 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -456,5 +456,8 @@ void TEXTE_MODULE::ViewGetLayers( int aLayers[], int& aCount ) const break; } - aCount = 1; + // On the general purpose overlay there is a selection box displayed + aLayers[1] = ITEM_GAL_LAYER( GP_OVERLAY ); + + aCount = 2; } diff --git a/pcbnew/class_text_mod.h b/pcbnew/class_text_mod.h index 31e2e6d3d2..42add84304 100644 --- a/pcbnew/class_text_mod.h +++ b/pcbnew/class_text_mod.h @@ -142,7 +142,6 @@ public: return wxT( "MTEXT" ); } - wxString GetSelectMenuText() const; BITMAP_DEF GetMenuImage() const { return footprint_text_xpm; } diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 6143e24219..11a278e924 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -224,7 +224,7 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) break; case PCB_TEXT_T: - draw( (TEXTE_PCB*) aItem ); + draw( (TEXTE_PCB*) aItem, aLayer ); break; case PCB_MODULE_TEXT_T: @@ -662,65 +662,55 @@ void PCB_PAINTER::draw( const MODULE* aModule ) { // For modules we have to draw a selection box if needed if( aModule->IsSelected() ) - { - BOX2I boundingBox = aModule->ViewBBox(); - - m_gal->SetIsStroke( false ); - m_gal->SetIsFill( true ); - m_gal->SetFillColor( COLOR4D( 1.0, 1.0, 1.0, 0.5 ) ); - m_gal->DrawRectangle( boundingBox.GetOrigin(), boundingBox.GetEnd() ); - } + drawSelectionBox( aModule ); } -void PCB_PAINTER::draw( const TEXTE_PCB* aText ) +void PCB_PAINTER::draw( const TEXTE_PCB* aText, int aLayer ) { - if( aText->GetText().Length() == 0 ) - return; + if( aLayer == ITEM_GAL_LAYER( GP_OVERLAY ) ) + { + if( aText->IsSelected() ) + drawSelectionBox( aText ); + } + else + { + if( aText->GetText().Length() == 0 ) + return; - COLOR4D strokeColor = GetColor( NULL, aText->GetLayer() ); - VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y ); - double orientation = aText->GetOrientation() * M_PI / 1800.0; + COLOR4D strokeColor = GetColor( NULL, aText->GetLayer() ); + VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y ); + double orientation = aText->GetOrientation() * M_PI / 1800.0; - m_gal->SetStrokeColor( strokeColor ); - m_gal->SetLineWidth( aText->GetThickness() ); - m_gal->SetTextAttributes( aText ); - m_gal->StrokeText( std::string( aText->GetText().mb_str() ), position, orientation ); + m_gal->SetStrokeColor( strokeColor ); + m_gal->SetLineWidth( aText->GetThickness() ); + m_gal->SetTextAttributes( aText ); + m_gal->StrokeText( std::string( aText->GetText().mb_str() ), position, orientation ); + } } void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) { - if( aText->GetLength() == 0 ) - return; - - COLOR4D strokeColor = GetColor( NULL, aLayer ); - VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y); - double orientation = aText->GetDrawRotation() * M_PI / 1800.0; - - m_gal->PushDepth(); - - /*if(aText->IsSelected()) + if( aLayer == ITEM_GAL_LAYER( GP_OVERLAY ) ) { - EDA_RECT bb (aText->GetBoundingBox()); - VECTOR2D s (bb.GetOrigin()); - VECTOR2D e (bb.GetEnd()); - m_gal->SetFillColor( COLOR4D (1.0, 1.0, 1.0, 0.3) ); - m_gal->SetStrokeColor( COLOR4D (1.0, 1.0, 1.0, 0.5) ); - m_gal->SetIsFill(true); - m_gal->SetIsStroke(true); - m_gal->SetLineWidth(0); - m_gal->DrawRectangle(s, e); - }*/ - - m_gal->AdvanceDepth(); + if( aText->IsSelected() ) + drawSelectionBox( aText ); + } + else + { + if( aText->GetLength() == 0 ) + return; - m_gal->SetStrokeColor( strokeColor ); - m_gal->SetLineWidth( aText->GetThickness() ); - m_gal->SetTextAttributes( aText ); - m_gal->StrokeText( std::string( aText->GetText().mb_str() ), position, orientation ); + COLOR4D strokeColor = GetColor( NULL, aLayer ); + VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y); + double orientation = aText->GetDrawRotation() * M_PI / 1800.0; - m_gal->PopDepth(); + m_gal->SetStrokeColor( strokeColor ); + m_gal->SetLineWidth( aText->GetThickness() ); + m_gal->SetTextAttributes( aText ); + m_gal->StrokeText( std::string( aText->GetText().mb_str() ), position, orientation ); + } } @@ -796,7 +786,8 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone ) void PCB_PAINTER::draw( const DIMENSION* aDimension ) { - COLOR4D strokeColor = GetColor( NULL, aDimension->GetLayer() ); + int layer = aDimension->GetLayer(); + COLOR4D strokeColor = GetColor( NULL, layer ); m_gal->SetStrokeColor( strokeColor ); m_gal->SetIsFill( false ); @@ -805,15 +796,17 @@ void PCB_PAINTER::draw( const DIMENSION* aDimension ) // Draw an arrow m_gal->DrawLine( VECTOR2D( aDimension->m_crossBarO ), VECTOR2D( aDimension->m_crossBarF ) ); - m_gal->DrawLine( VECTOR2D( aDimension->m_featureLineGO ), VECTOR2D( aDimension->m_featureLineGF ) ); - m_gal->DrawLine( VECTOR2D( aDimension->m_featureLineDO ), VECTOR2D( aDimension->m_featureLineDF ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_featureLineGO ), + VECTOR2D( aDimension->m_featureLineGF ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_featureLineDO ), + VECTOR2D( aDimension->m_featureLineDF ) ); m_gal->DrawLine( VECTOR2D( aDimension->m_arrowD1O ), VECTOR2D( aDimension->m_arrowD1F ) ); m_gal->DrawLine( VECTOR2D( aDimension->m_arrowD2O ), VECTOR2D( aDimension->m_arrowD2F ) ); m_gal->DrawLine( VECTOR2D( aDimension->m_arrowG1O ), VECTOR2D( aDimension->m_arrowG1F ) ); m_gal->DrawLine( VECTOR2D( aDimension->m_arrowG2O ), VECTOR2D( aDimension->m_arrowG2F ) ); // Draw text - draw( &aDimension->Text() ); + draw( &aDimension->Text(), layer ); } @@ -853,3 +846,14 @@ void PCB_PAINTER::draw( const PCB_TARGET* aTarget ) m_gal->Restore(); } + + +void PCB_PAINTER::drawSelectionBox( const VIEW_ITEM* aItem ) const +{ + BOX2I boundingBox = aItem->ViewBBox(); + + m_gal->SetIsStroke( false ); + m_gal->SetIsFill( true ); + m_gal->SetFillColor( COLOR4D( 1.0, 1.0, 1.0, 0.5 ) ); + m_gal->DrawRectangle( boundingBox.GetOrigin(), boundingBox.GetEnd() ); +} diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 3c220ee164..14ae4e156e 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -142,11 +142,14 @@ protected: void draw( const D_PAD*, int ); void draw( const DRAWSEGMENT* ); void draw( const MODULE* ); - void draw( const TEXTE_PCB* ); + void draw( const TEXTE_PCB*, int ); void draw( const TEXTE_MODULE*, int ); void draw( const ZONE_CONTAINER* ); void draw( const DIMENSION* ); void draw( const PCB_TARGET* ); + + /// Draws a white semitransparent box indicating an item as selected + void drawSelectionBox( const VIEW_ITEM* aItem ) const; }; } // namespace KiGfx diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 7072cc3cdd..bec3a8a871 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -50,8 +50,8 @@ class GENERAL_COLLECTOR; class SELECTION_TOOL : public TOOL_INTERACTIVE { public: - SELECTION_TOOL (); - ~SELECTION_TOOL (); + SELECTION_TOOL(); + ~SELECTION_TOOL(); void Reset(); int Main( TOOL_EVENT& aEvent ); From eb290bf362c3663059f2dddba939b553a8be17fe Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 9 Aug 2013 15:21:31 +0200 Subject: [PATCH 229/415] Added some comments. --- common/drawpanel_gal.cpp | 6 ------ include/class_drawpanel_gal.h | 40 ++++++++++++++++++++++++++++------- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 16c59c3ced..ba7e5b38b7 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -213,9 +213,3 @@ void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent ) m_eventDispatcher->DispatchWxEvent( aEvent ); } } - - -KiGfx::VIEW_CONTROLS* EDA_DRAW_PANEL_GAL::GetViewControls() const -{ - return m_viewControls; -} diff --git a/include/class_drawpanel_gal.h b/include/class_drawpanel_gal.h index 9c789ac3b0..0ed254471a 100644 --- a/include/class_drawpanel_gal.h +++ b/include/class_drawpanel_gal.h @@ -69,20 +69,44 @@ public: void SwitchBackend( GalType aGalType ); /** - * Function GetGAL + * Function GetGAL() * Returns a pointer to the GAL instance used in the panel. - * @return KiGfx::GAL* Instance of GAL. + * @return The instance of GAL. */ - KiGfx::GAL* GetGAL() { return m_gal; } + KiGfx::GAL* GetGAL() const + { + return m_gal; + } - void SetView( KiGfx::VIEW* aView ) { m_view = aView; } + /** + * Function GetView() + * Returns a pointer to the VIEW instance used in the panel. + * @return The instance of VIEW. + */ + KiGfx::VIEW* GetView() const + { + return m_view; + } - KiGfx::VIEW* GetView() const { return m_view; } - KiGfx::VIEW_CONTROLS* GetViewControls() const; + /** + * Function GetViewControls() + * Returns a pointer to the VIEW_CONTROLS instance used in the panel. + * @return The instance of VIEW_CONTROLS. + */ + KiGfx::VIEW_CONTROLS* GetViewControls() const + { + return m_viewControls; + } + /// @copydoc wxWindow::Refresh() virtual void Refresh( bool eraseBackground = true, const wxRect* rect = NULL ); - void SetEventDispatcher(TOOL_DISPATCHER *aEventDispatcher) + /** + * Function SetEventDispatcher() + * Sets a dispatcher that processes events and forwards them to tools. + * @param aEventDispatcher is the object that will be used for dispatching events. + */ + void SetEventDispatcher( TOOL_DISPATCHER* aEventDispatcher ) { m_eventDispatcher = aEventDispatcher; } @@ -99,7 +123,7 @@ protected: ///< using GAL KiGfx::WX_VIEW_CONTROLS* m_viewControls; ///< Control for VIEW (moving, zooming, etc.) GalType m_currentGal; ///< Currently used GAL - TOOL_DISPATCHER* m_eventDispatcher; + TOOL_DISPATCHER* m_eventDispatcher; ///< Processes and forwards events to tools }; #endif From 21c3926714bf778d89af1fbd1e6eac0f1bac8e36 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Sat, 10 Aug 2013 11:14:16 +0200 Subject: [PATCH 230/415] Fixed win32 builds. --- common/CMakeLists.txt | 6 ++++-- cvpcb/CMakeLists.txt | 14 ++++++-------- pcbnew/CMakeLists.txt | 12 +++++------- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 837ce50e81..40223de25d 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -5,6 +5,7 @@ include_directories( ./dialog_about ${Boost_INCLUDE_DIR} ${CAIRO_INCLUDE_DIR} + ${GLEW_INCLUDE_DIR} ../3d-viewer ../pcbnew ../polygon @@ -56,9 +57,10 @@ set(GAL_SRCS add_library(gal STATIC ${GAL_SRCS}) add_dependencies(gal shader_headers) -if(WIN32) +# Only for win32 cross compilation using MXE +if(WIN32 AND MSYS) add_definitions(-DGLEW_STATIC) -endif(WIN32) +endif(WIN32 AND MSYS) set(COMMON_ABOUT_DLG_SRCS dialog_about/AboutDialog_main.cpp diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index 5310be69a3..247ab3c1ad 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -94,18 +94,16 @@ target_link_libraries(cvpcb common bitmaps polygon + gal ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} ${GDI_PLUS_LIBRARIES} + ${GLEW_LIBRARIES} + ${CAIRO_LIBRARIES} ) -target_link_libraries(cvpcb - gal - ${GLEW_LIBRARIES} - ${CAIRO_LIBRARIES} - ) - -if(WIN32) +# Only for win32 cross compilation using MXE +if(WIN32 AND MSYS) target_link_libraries(cvpcb opengl32 glu32 @@ -114,7 +112,7 @@ target_link_libraries(cvpcb freetype bz2 ) -endif(WIN32) +endif(WIN32 AND MSYS) ### # Add cvpcb as install target diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index d01a1d579a..06a0050f3a 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -420,20 +420,18 @@ target_link_libraries(pcbnew pcad2kicadpcb polygon bitmaps + gal ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} ${GDI_PLUS_LIBRARIES} ${PYTHON_LIBRARIES} ${PCBNEW_EXTRA_LIBS} - ) - -target_link_libraries(pcbnew - gal ${GLEW_LIBRARIES} ${CAIRO_LIBRARIES} ) - -if(WIN32) + +# Only for win32 cross compilation using MXE +if(WIN32 AND MSYS) target_link_libraries(pcbnew opengl32 glu32 @@ -442,7 +440,7 @@ target_link_libraries(pcbnew freetype bz2 ) -endif(WIN32) +endif(WIN32 AND MSYS) ### # Add pcbnew as install target From 543d4af682779e16d914c08c96b6b374f4ab4806 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 15 Aug 2013 10:20:49 +0200 Subject: [PATCH 231/415] Added resetting of tools after loading a new board. --- common/tool/tool_manager.cpp | 12 +++++++++--- include/tool/tool_manager.h | 7 +++---- pcbnew/tools/selection_tool.cpp | 2 ++ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 95c743cc26..f659b681b0 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -145,7 +145,7 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) { st->transitions.clear(); - if(!st->cofunc) + if( !st->cofunc ) st->cofunc = new COROUTINE( tr.second ); else st->cofunc->SetEntry( tr.second ); @@ -174,7 +174,7 @@ bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) if( st->contextMenuTrigger == CMENU_NOW ) { st->pendingWait = true; - st->waitEvents = TOOL_EVENT ( TC_Any, TA_Any ); + st->waitEvents = TOOL_EVENT( TC_Any, TA_Any ); st->contextMenuTrigger = CMENU_OFF; GetEditFrame()->PopupMenu( st->contextMenu->GetMenu() ); @@ -222,5 +222,11 @@ void TOOL_MANAGER::SetEnvironment( EDA_ITEM* aModel, KiGfx::VIEW* aView, m_view = aView; m_viewControls = aViewControls; m_editFrame = aFrame; - // fixme: reset tools after changing environment + + // Reset state of the registered tools + BOOST_FOREACH( TOOL_BASE* tool, m_toolState | boost::adaptors::map_keys ) + { + if( tool->GetType() == TOOL_Interactive ) + static_cast( tool )->Reset(); + } } diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index dc7e62ee8f..f428806a0b 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -78,19 +78,18 @@ public: template void InvokeTool( const std::string& name, const Parameters& aToolParams ); - /** * Function FindTool() * Searches for a tool with given name or ID */ - TOOL_BASE *FindTool( int aId ); - TOOL_BASE *FindTool( const std::string& aName ); + TOOL_BASE* FindTool( int aId ); + TOOL_BASE* FindTool( const std::string& aName ); /** * Resets the state of a given tool by clearing its wait and * transition lists and calling tool's internal Reset() method. */ - void ResetTool( TOOL_BASE *aTool ); + void ResetTool( TOOL_BASE* aTool ); /** * Takes an event from the TOOL_DISPATCHER and propagates it to diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 8b24d53d11..14e1b0e403 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -57,6 +57,8 @@ SELECTION_TOOL::~SELECTION_TOOL() void SELECTION_TOOL::Reset() { + m_selectedItems.clear(); + // the tool launches upon reception of activate ("pcbnew.InteractiveSelection") Go( &SELECTION_TOOL::Main, TOOL_EVENT( TC_Command, TA_ActivateTool, GetName() ) ); //"pcbnew.InteractiveSelection")); } From ae3c02abaeadd385e3823859fb9ea37469c7a5cb Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 15 Aug 2013 16:23:54 +0200 Subject: [PATCH 232/415] Build fix. --- include/class_drawpanel_gal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/class_drawpanel_gal.h b/include/class_drawpanel_gal.h index 0ed254471a..9206c69338 100644 --- a/include/class_drawpanel_gal.h +++ b/include/class_drawpanel_gal.h @@ -95,7 +95,7 @@ public: */ KiGfx::VIEW_CONTROLS* GetViewControls() const { - return m_viewControls; + return (KiGfx::VIEW_CONTROLS*)( m_viewControls ); } /// @copydoc wxWindow::Refresh() From 6268fe957a87b8a9d059509f52239fc9d83aac74 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 19 Aug 2013 09:44:50 +0200 Subject: [PATCH 233/415] Functions for direct item drawing. --- common/view/view.cpp | 92 +++++++++++++++++++++++++++----------------- include/view/view.h | 22 ++++++++++- 2 files changed, 77 insertions(+), 37 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 85248b04aa..133707f7ad 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -89,6 +89,53 @@ void VIEW::Remove( VIEW_ITEM* aItem ) } +void VIEW::Draw( VIEW_ITEM* aItem, int aLayer ) const +{ + if( isCached( aLayer ) ) + { + // Draw using cached information or create one + int group = aItem->getGroup( aLayer ); + + if( group >= 0 ) + { + m_gal->DrawGroup( group ); + } + else + { + group = m_gal->BeginGroup(); + aItem->setGroup( aLayer, group ); + if( !m_painter->Draw( aItem, aLayer ) ) + aItem->ViewDraw( aLayer, m_gal, BOX2I() ); // Alternative drawing method + m_gal->EndGroup(); + } + } + else + { + // Immediate mode + if( !m_painter->Draw( aItem, aLayer ) ) + aItem->ViewDraw( aLayer, m_gal, BOX2I() ); // Alternative drawing method + } + + // Draws a bright contour around the item + if( static_cast( aItem )->IsBrightened() ) + { + m_painter->DrawBrightened( aItem ); + } +} + + +void VIEW::Draw( VIEW_ITEM* aItem ) const +{ + int layers[VIEW_MAX_LAYERS], layers_count; + aItem->ViewGetLayers( layers, layers_count ); + + for( int i = 0; i < layers_count; ++i ) + { + Draw( aItem, layers[i] ); + } +} + + void VIEW::SetRequired( int aLayerId, int aRequiredId, bool aRequired ) { wxASSERT( (unsigned) aLayerId < m_layers.size() ); @@ -337,7 +384,7 @@ struct VIEW::updateItemsColor void VIEW::UpdateLayerColor( int aLayer ) { // There is no point in updating non-cached layers - if( m_layers[aLayer].target != TARGET_CACHED ) + if( !isCached( aLayer ) ) return; BOX2I r; @@ -360,7 +407,7 @@ void VIEW::UpdateAllLayersColor() VIEW_LAYER* l = &( ( *i ).second ); // There is no point in updating non-cached layers - if( l->target != TARGET_CACHED ) + if( !isCached( l->id ) ) continue; updateItemsColor visitor( l->id, m_painter, m_gal ); @@ -392,7 +439,7 @@ struct VIEW::changeItemsDepth void VIEW::ChangeLayerDepth( int aLayer, int aDepth ) { // There is no point in updating non-cached layers - if( m_layers[aLayer].target != TARGET_CACHED ) + if( !isCached( aLayer ) ) return; BOX2I r; @@ -488,43 +535,13 @@ struct VIEW::drawItem void operator()( VIEW_ITEM* aItem ) { - GAL* gal = view->GetGAL(); - // Conditions that have te be fulfilled for an item to be drawn bool drawCondition = aItem->ViewIsVisible() && aItem->ViewGetLOD( currentLayer->id ) < view->m_scale; if( !drawCondition ) return; - if( currentLayer->target == TARGET_CACHED ) - { - // Draw using cached information or create one - int group = aItem->getGroup( currentLayer->id ); - - if( group >= 0 ) - { - gal->DrawGroup( group ); - } - else - { - group = gal->BeginGroup(); - aItem->setGroup( currentLayer->id, group ); - if( !view->m_painter->Draw( aItem, currentLayer->id ) ) - aItem->ViewDraw( currentLayer->id, gal, BOX2I() ); // Alternative drawing method - gal->EndGroup(); - } - } - else - { - // Immediate mode - if( !view->m_painter->Draw( aItem, currentLayer->id ) ) - aItem->ViewDraw( currentLayer->id, gal, BOX2I() ); // Alternative drawing method - } - - if( static_cast( aItem )->IsBrightened() ) - { - view->m_painter->DrawBrightened( aItem ); - } + view->Draw( aItem, currentLayer->id ); } const VIEW_LAYER* currentLayer; @@ -691,7 +708,10 @@ void VIEW::invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ) } else if( aUpdateFlags == VIEW_ITEM::GEOMETRY ) { - updateItemGeometry( aItem, layers[i]); + // Reinsert item + Remove( aItem ); + Add( aItem ); + updateItemGeometry( aItem, layers[i]); /// TODO is it still necessary? } // Mark those layers as dirty, so the VIEW will be refreshed @@ -766,7 +786,7 @@ void VIEW::RecacheAllItems( bool aImmediately ) VIEW_LAYER* l = & ( ( *i ).second ); // Obviously, there is only one cached target that has to be recomputed - if( l->target == TARGET_CACHED ) + if( isCached( l->id ) ) { m_gal->SetTarget( l->target ); m_gal->SetLayerDepth( l->renderingOrder ); diff --git a/include/view/view.h b/include/view/view.h index 060de91667..2d6ad6a0e5 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -89,11 +89,25 @@ public: * Finds all visible items that touch or are within the rectangle aRect. * @param aRect area to search for items * @param aResult result of the search, containing VIEW_ITEMs associated with their layers. - * Sorted according to the rendering order (items that are on top of the rendering stack as first). + * Sorted according to the rendering order (items that are on top of the rendering stack as + * first). * @return Number of found items. */ int Query( const BOX2I& aRect, std::vector& aResult ); + /** + * Function Draw() + * Draws an item, but on a specified layers. It has to be marked that some of drawing settings + * are based on the layer on which an item is drawn. + */ + void Draw( VIEW_ITEM* aItem, int aLayer ) const; + + /** + * Function Draw() + * Draws an item on all layers that the item uses. + */ + void Draw( VIEW_ITEM* aItem ) const; + /** * Function SetRequired() * Marks the aRequiredId layer as required for the aLayerId layer. In order to display the @@ -442,6 +456,12 @@ private: /// Checks if every layer required by the aLayerId layer is enabled. bool areRequiredLayersEnabled( int aLayerId ) const; + /// Returns true if the layer is cached + inline bool isCached( int aLayer ) const + { + return ( m_layers.at( aLayer ).target == TARGET_CACHED ); + } + /// Contains set of possible displayed layers and its properties LayerMap m_layers; From e70a0e4e0e6f24600f39dbaf95c67edecb5d4ac2 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 19 Aug 2013 09:47:36 +0200 Subject: [PATCH 234/415] Reformatting. --- common/tool/tool_dispatcher.cpp | 2 +- common/tool/tool_manager.cpp | 4 ++-- include/tool/tool_base.h | 8 +++----- include/tool/tool_event.h | 6 +++--- include/tool/tool_interactive.h | 24 ++++++++++++++---------- include/tool/tool_manager.h | 8 ++++---- include/view/view_item.h | 17 ++++++++--------- pcbnew/pcbnew_id.h | 3 +-- 8 files changed, 36 insertions(+), 36 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 8a73cee15e..5eb905af23 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -207,7 +207,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent &aEvent ) if( type == wxEVT_MOTION ) { - wxMouseEvent *me = static_cast(&aEvent ); + wxMouseEvent *me = static_cast( &aEvent ); pos = getView()->ToWorld( VECTOR2D( me->GetX(), me->GetY() ) ); if( pos != m_lastMousePos ) { diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index f659b681b0..c3082eca70 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -100,10 +100,10 @@ void TOOL_MANAGER::ScheduleNextState( TOOL_BASE *aTool, TOOL_STATE_FUNC& aHandle } -optional TOOL_MANAGER::ScheduleWait( TOOL_BASE *aTool, +optional TOOL_MANAGER::ScheduleWait( TOOL_BASE* aTool, const TOOL_EVENT_LIST& aConditions ) { - ToolState *st = m_toolState[aTool]; + ToolState* st = m_toolState[aTool]; st->pendingWait = true; st->waitEvents = aConditions; diff --git a/include/tool/tool_base.h b/include/tool/tool_base.h index ca686b0ddb..0925e4edb1 100644 --- a/include/tool/tool_base.h +++ b/include/tool/tool_base.h @@ -58,7 +58,6 @@ typedef DELEGATE TOOL_STATE_FUNC; class TOOL_BASE { public: - TOOL_BASE( TOOL_Type aType, TOOL_ID aId, const std::string& aName = std::string( "" ) ) : m_type( aType ), m_toolId( aId ), @@ -95,7 +94,7 @@ protected: * Sets the TOOL_MANAGER the tool will belong to. * Called by TOOL_MANAGER::RegisterTool() */ - void attachManager( TOOL_MANAGER *aManager ); + void attachManager( TOOL_MANAGER* aManager ); KiGfx::VIEW* getView(); KiGfx::VIEW_CONTROLS* getViewControls(); @@ -107,7 +106,7 @@ protected: * run-time type check */ template - T *getEditFrame() + T* getEditFrame() { return static_cast( getEditFrameInt() ); } @@ -120,12 +119,11 @@ protected: template T* getModel( KICAD_T modelType ) { - EDA_ITEM *m = getModelInt(); + EDA_ITEM* m = getModelInt(); // assert(modelType == m->Type()); return static_cast( m ); } -protected: TOOL_Type m_type; TOOL_ID m_toolId; std::string m_toolName; diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index d5dec8525d..8a771a9297 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -98,7 +98,7 @@ enum TOOL_MouseButtons enum TOOL_ContextMenuTrigger { CMENU_BUTTON = 0, // On the right button - CMENU_NOW, // Right now (after TOOL_INTERACTIVE::SetContxtMenu) + CMENU_NOW, // Right now (after TOOL_INTERACTIVE::SetContextMenu) CMENU_OFF // Never }; @@ -217,10 +217,10 @@ public: bool Matches( const TOOL_EVENT& aEvent ) const { - if( ! ( m_category & aEvent.m_category ) ) + if( !( m_category & aEvent.m_category ) ) return false; - if( ! ( m_actions & aEvent.m_actions ) ) + if( !( m_actions & aEvent.m_actions ) ) return false; if( m_category == TC_Command ) diff --git a/include/tool/tool_interactive.h b/include/tool/tool_interactive.h index 10b7250588..4703c420b7 100644 --- a/include/tool/tool_interactive.h +++ b/include/tool/tool_interactive.h @@ -49,14 +49,14 @@ public: * Brings the tool to a known, initial state. If the tool claimed anything from the model or the view, * it must release it when its reset. */ - virtual void Reset ( ) = 0; + virtual void Reset() = 0; /** * Function SetContextMenu() * * Assigns a context menu and tells when it should be activated */ - void SetContextMenu( CONTEXT_MENU *aMenu, TOOL_ContextMenuTrigger aTrigger = CMENU_BUTTON ); + void SetContextMenu( CONTEXT_MENU* aMenu, TOOL_ContextMenuTrigger aTrigger = CMENU_BUTTON ); /** * Function Go() @@ -65,7 +65,8 @@ public: * No conditions means any event. */ template - void Go ( int (T::*aStateFunc)( TOOL_EVENT& ), const TOOL_EVENT_LIST & aConditions = TOOL_EVENT( TC_Any, TA_Any ) ); + void Go( int (T::*aStateFunc)( TOOL_EVENT& ), + const TOOL_EVENT_LIST& aConditions = TOOL_EVENT( TC_Any, TA_Any ) ); /** * Function Wait() @@ -73,25 +74,27 @@ public: * Suspends execution of the tool until an event specified in aEventList arrives. * No parameters means waiting for any event. */ - OPT_TOOL_EVENT Wait ( const TOOL_EVENT_LIST & aEventList = TOOL_EVENT ( TC_Any, TA_Any ) ); + OPT_TOOL_EVENT Wait( const TOOL_EVENT_LIST& aEventList = TOOL_EVENT ( TC_Any, TA_Any ) ); /** functions below are not yet implemented - their interface may change */ template - bool InvokeTool ( const std::string& aToolName, const Parameters& parameters, ReturnValue& returnValue ); + bool InvokeTool( const std::string& aToolName, const Parameters& parameters, + ReturnValue& returnValue ); template - bool InvokeWindow ( const std::string& aWindowName, const Parameters& parameters, ReturnValue& returnValue ); + bool InvokeWindow( const std::string& aWindowName, const Parameters& parameters, + ReturnValue& returnValue ); template - void Yield ( const T& returnValue ); + void Yield( const T& returnValue ); protected: /* helper functions for constructing events for Wait() and Go() with less typing */ const TOOL_EVENT evActivate( std::string aToolName = "" ); const TOOL_EVENT evCommand( int aCommandId = -1 ); - const TOOL_EVENT evCommand( std::string aCommandStr = ""); + const TOOL_EVENT evCommand( std::string aCommandStr = "" ); const TOOL_EVENT evMotion(); const TOOL_EVENT evClick( int aButton = MB_Any ); const TOOL_EVENT evDrag( int aButton = MB_Any ); @@ -104,9 +107,10 @@ private: // hide TOOL_MANAGER implementation template -void TOOL_INTERACTIVE::Go( int (T::*aStateFunc)( TOOL_EVENT& ), const TOOL_EVENT_LIST& aConditions ) +void TOOL_INTERACTIVE::Go( int (T::*aStateFunc)( TOOL_EVENT& ), + const TOOL_EVENT_LIST& aConditions ) { - TOOL_STATE_FUNC sptr (static_cast( this ), aStateFunc); + TOOL_STATE_FUNC sptr( static_cast( this ), aStateFunc ); goInternal( sptr, aConditions ); } diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index f428806a0b..36599977a0 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -73,17 +73,17 @@ public: * An user-defined parameter object can be also passed */ void InvokeTool( TOOL_ID aToolId ); - void InvokeTool( const std::string& name ); + void InvokeTool( const std::string& aName ); template - void InvokeTool( const std::string& name, const Parameters& aToolParams ); + void InvokeTool( const std::string& aName, const Parameters& aToolParams ); /** * Function FindTool() * Searches for a tool with given name or ID */ - TOOL_BASE* FindTool( int aId ); - TOOL_BASE* FindTool( const std::string& aName ); + TOOL_BASE* FindTool( int aId ) const; + TOOL_BASE* FindTool( const std::string& aName ) const; /** * Resets the state of a given tool by clearing its wait and diff --git a/include/view/view_item.h b/include/view/view_item.h index 1cdc67f3e6..17325d338b 100644 --- a/include/view/view_item.h +++ b/include/view/view_item.h @@ -124,7 +124,7 @@ public: /** * Function ViewIsVisible() - * Returns if the item is visible (or not). + * Returns information if the item is visible (or not). * * @return when true, the item is visible (i.e. to be displayed, not visible in the * *current* viewport) @@ -160,7 +160,7 @@ public: * Function ViewRelease() * Releases the item from an associated dynamic VIEW. For static views calling has no effect. */ - void ViewRelease(); + virtual void ViewRelease(); protected: friend class VIEW; @@ -171,7 +171,7 @@ protected: * * @param aView[]: dynamic VIEW instance the item is being added to. */ - void viewAssign( VIEW* aView ) + virtual void viewAssign( VIEW* aView ) { // release the item from a previously assigned dynamic view (if there is any) ViewRelease(); @@ -182,7 +182,6 @@ protected: VIEW* m_view; ///* Current dynamic view the item is assigned to. bool m_visible; ///* Are we visible in the current dynamic VIEW. -private: ///* Helper for storing cached items group ids typedef std::pair GroupPair; @@ -198,7 +197,7 @@ private: * @param aLayer is the layer number for which group id is queried. * @return group id or -1 in case there is no group id (ie. item is not cached). */ - int getGroup( int aLayer ) const; + virtual int getGroup( int aLayer ) const; /** * Function getAllGroups() @@ -206,7 +205,7 @@ private: * * @return vector of group ids. */ - std::vector getAllGroups() const; + virtual std::vector getAllGroups() const; /** * Function setGroup() @@ -215,13 +214,13 @@ private: * @param aLayer is the layer numbe. * @param aGroup is the group id. */ - void setGroup( int aLayer, int aGroup ); + virtual void setGroup( int aLayer, int aGroup ); /** * Function deleteGroups() * Removes all of the stored group ids. Forces recaching of the item. */ - void deleteGroups(); + virtual void deleteGroups(); /** * Function storesGroups() @@ -229,7 +228,7 @@ private: * * @returns true in case it is cached at least for one layer. */ - bool storesGroups() const; + virtual bool storesGroups() const; }; } // namespace KiGfx diff --git a/pcbnew/pcbnew_id.h b/pcbnew/pcbnew_id.h index 64329eb5c8..ba479ffe65 100644 --- a/pcbnew/pcbnew_id.h +++ b/pcbnew/pcbnew_id.h @@ -366,8 +366,7 @@ enum pcbnew_ids ID_FOOTPRINT_WIZARD_SELECT_WIZARD, ID_FOOTPRINT_WIZARD_EXPORT_TO_BOARD, - ID_SELECTION_TOOL - + ID_SELECTION_TOOL }; #endif // PCBNEW_ID_H_ From 57979f3c9b9d384c5aa8be34b41487e70b0f4806 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 19 Aug 2013 11:02:38 +0200 Subject: [PATCH 235/415] Smarter way of the overlay rendering (overlay is always refreshed, while cached&noncached targets only if the viewport or items have changed). --- common/drawpanel_gal.cpp | 13 ++-- common/gal/cairo/cairo_compositor.cpp | 68 +++++++---------- common/gal/cairo/cairo_gal.cpp | 50 ++++++++++-- common/gal/opengl/opengl_compositor.cpp | 22 +++--- common/gal/opengl/opengl_gal.cpp | 38 ++++++++-- common/view/view.cpp | 96 ++++++++++++++++++------ include/gal/cairo/cairo_compositor.h | 25 +++++- include/gal/cairo/cairo_gal.h | 4 + include/gal/compositor.h | 12 ++- include/gal/definitions.h | 3 + include/gal/graphics_abstraction_layer.h | 7 ++ include/gal/opengl/opengl_compositor.h | 16 +++- include/gal/opengl/opengl_gal.h | 3 + include/view/view.h | 25 ++++++ 14 files changed, 279 insertions(+), 103 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index ba7e5b38b7..d99f2b0920 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -127,6 +127,8 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) ) void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent ) { m_gal->ResizeScreen( aEvent.GetSize().x, aEvent.GetSize().y ); + m_view->SetTargetDirty( KiGfx::TARGET_CACHED ); + m_view->SetTargetDirty( KiGfx::TARGET_NONCACHED ); } @@ -134,24 +136,19 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) { #ifdef __WXDEBUG__ prof_counter time; - prof_start( &time, false ); #endif /* __WXDEBUG__ */ - printf("Refresh!\n"); - m_gal->BeginDrawing(); m_gal->SetBackgroundColor( KiGfx::COLOR4D( 0.0, 0.0, 0.0, 1.0 ) ); m_gal->ClearScreen(); - m_gal->DrawGrid(); m_view->Redraw(); m_gal->EndDrawing(); #ifdef __WXDEBUG__ prof_end( &time ); - wxLogDebug( wxT( "EDA_DRAW_PANEL_GAL::Refresh: %.0f ms (%.0f fps)" ), static_cast( time.value ) / 1000.0, 1000000.0 / static_cast( time.value ) ); #endif /* __WXDEBUG__ */ @@ -184,6 +181,9 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) m_gal->SetScreenDPI( 106 ); // Display resolution setting m_gal->ComputeWorldScreenMatrix(); + wxSize size = GetClientSize(); + m_gal->ResizeScreen( size.GetX(), size.GetY() ); + if( m_painter ) m_painter->SetGAL( m_gal ); @@ -193,9 +193,6 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) m_view->RecacheAllItems( true ); } - wxSize size = GetClientSize(); - m_gal->ResizeScreen( size.GetX(), size.GetY() ); - m_currentGal = aGalType; } diff --git a/common/gal/cairo/cairo_compositor.cpp b/common/gal/cairo/cairo_compositor.cpp index d5b101493a..b700dc6874 100644 --- a/common/gal/cairo/cairo_compositor.cpp +++ b/common/gal/cairo/cairo_compositor.cpp @@ -36,8 +36,6 @@ using namespace KiGfx; CAIRO_COMPOSITOR::CAIRO_COMPOSITOR( cairo_t** aMainContext ) : m_current( 0 ), m_currentContext( aMainContext ), m_mainContext( *aMainContext ) { - // Obtain the transformation matrix used in the main context - cairo_get_matrix( m_mainContext, &m_matrix ); } @@ -65,11 +63,10 @@ void CAIRO_COMPOSITOR::Resize( unsigned int aWidth, unsigned int aHeight ) } -unsigned int CAIRO_COMPOSITOR::GetBuffer() +unsigned int CAIRO_COMPOSITOR::CreateBuffer() { // Pixel storage BitmapPtr bitmap( new unsigned int[m_bufferSize] ); - memset( bitmap.get(), 0x00, m_bufferSize * sizeof(int) ); // Create the Cairo surface @@ -78,10 +75,10 @@ unsigned int CAIRO_COMPOSITOR::GetBuffer() CAIRO_FORMAT_ARGB32, m_width, m_height, m_stride ); cairo_t* context = cairo_create( surface ); - #ifdef __WXDEBUG__ - cairo_status_t status = cairo_status( context ); - wxASSERT_MSG( status == CAIRO_STATUS_SUCCESS, "Cairo context creation error" ); - #endif /* __WXDEBUG__ */ +#ifdef __WXDEBUG__ + cairo_status_t status = cairo_status( context ); + wxASSERT_MSG( status == CAIRO_STATUS_SUCCESS, "Cairo context creation error" ); +#endif /* __WXDEBUG__ */ // Set default settings for the buffer cairo_set_antialias( context, CAIRO_ANTIALIAS_SUBPIXEL ); @@ -89,6 +86,7 @@ unsigned int CAIRO_COMPOSITOR::GetBuffer() cairo_set_line_cap( context, CAIRO_LINE_CAP_ROUND ); // Use the same transformation matrix as the main context + cairo_get_matrix( m_mainContext, &m_matrix ); cairo_set_matrix( context, &m_matrix ); // Store the new buffer @@ -101,53 +99,41 @@ unsigned int CAIRO_COMPOSITOR::GetBuffer() void CAIRO_COMPOSITOR::SetBuffer( unsigned int aBufferHandle ) { - if( aBufferHandle <= usedBuffers() ) - { - m_current = aBufferHandle - 1; - *m_currentContext = m_buffers[m_current].context; - } + wxASSERT_MSG( aBufferHandle <= usedBuffers(), wxT( "Tried to use a not existing buffer" ) ); -#ifdef __WXDEBUG__ - else - wxLogDebug( wxT( "Tried to use a not existing buffer" ) ); -#endif + // Get currently used transformation matrix, so it can be applied to the new buffer + cairo_get_matrix( *m_currentContext, &m_matrix ); + + m_current = aBufferHandle - 1; + *m_currentContext = m_buffers[m_current].context; + + // Apply the current transformation matrix + cairo_set_matrix( *m_currentContext, &m_matrix ); } void CAIRO_COMPOSITOR::ClearBuffer() { - // Reset the transformation matrix, so it is possible to composite images using - // screen coordinates instead of world coordinates - cairo_identity_matrix( m_buffers[m_current].context ); - - cairo_set_source_rgba( m_buffers[m_current].context, 0.0, 0.0, 0.0, 0.0 ); - cairo_rectangle( m_buffers[m_current].context, 0.0, 0.0, m_width, m_height ); - cairo_fill( m_buffers[m_current].context ); - - // Restore the transformation matrix - cairo_set_matrix( m_buffers[m_current].context, &m_matrix ); + // Clear the pixel storage + memset( m_buffers[m_current].bitmap.get(), 0x00, m_bufferSize * sizeof(int) ); } void CAIRO_COMPOSITOR::DrawBuffer( unsigned int aBufferHandle ) { - if( aBufferHandle <= usedBuffers() ) - { - // Reset the transformation matrix, so it is possible to composite images using - // screen coordinates instead of world coordinates - cairo_identity_matrix( m_mainContext ); + wxASSERT_MSG( aBufferHandle <= usedBuffers(), wxT( "Tried to use a not existing buffer" ) ); - cairo_set_source_surface( m_mainContext, m_buffers[aBufferHandle - 1].surface, 0.0, 0.0 ); - cairo_paint( m_mainContext ); + // Reset the transformation matrix, so it is possible to composite images using + // screen coordinates instead of world coordinates + cairo_get_matrix( m_mainContext, &m_matrix ); + cairo_identity_matrix( m_mainContext ); - // Restore the transformation matrix - cairo_set_matrix( m_mainContext, &m_matrix ); - } + // Draw the selected buffer contents + cairo_set_source_surface( m_mainContext, m_buffers[aBufferHandle - 1].surface, 0.0, 0.0 ); + cairo_paint( m_mainContext ); -#ifdef __WXDEBUG__ - else - wxLogDebug( wxT( "Tried to use a not existing buffer" ) ); -#endif + // Restore the transformation matrix + cairo_set_matrix( m_mainContext, &m_matrix ); } diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 91e614f8fa..7b4f6972f7 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -48,6 +48,7 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, isGrouping = false; isInitialized = false; isDeleteSavedPixels = false; + validCompositor = false; groupCounter = 0; // Connecting the event handlers @@ -90,7 +91,11 @@ CAIRO_GAL::~CAIRO_GAL() void CAIRO_GAL::BeginDrawing() { initSurface(); - setCompositor(); + if( !validCompositor ) + setCompositor(); + + compositor->SetMainContext( context ); + compositor->SetBuffer( mainBuffer ); // Cairo grouping prevents display of overlapping items on the same layer in the lighter color cairo_push_group( currentContext ); @@ -120,9 +125,9 @@ void CAIRO_GAL::EndDrawing() for( size_t count = 0; count < bufferSize; count++ ) { unsigned int value = bitmapBuffer[count]; - *wxOutputPtr++ = (value >> 16) & 0xff; // Red pixel - *wxOutputPtr++ = (value >> 8) & 0xff; // Green pixel - *wxOutputPtr++ = value & 0xff; // Blue pixel + *wxOutputPtr++ = ( value >> 16 ) & 0xff; // Red pixel + *wxOutputPtr++ = ( value >> 8 ) & 0xff; // Green pixel + *wxOutputPtr++ = value & 0xff; // Blue pixel } wxImage img( (int) screenSize.x, (int) screenSize.y, (unsigned char*) wxOutput, true ); @@ -273,6 +278,10 @@ void CAIRO_GAL::ResizeScreen( int aWidth, int aHeight ) deleteBitmaps(); allocateBitmaps(); + if( validCompositor ) + compositor->Resize( aWidth, aHeight ); + validCompositor = false; + SetSize( wxSize( aWidth, aHeight ) ); } @@ -719,7 +728,7 @@ void CAIRO_GAL::SetTarget( RenderTarget aTarget ) { // If the compositor is not set, that means that there is a recaching process going on // and we do not need the compositor now - if( !compositor ) + if( !validCompositor ) return; // Cairo grouping prevents display of overlapping items on the same layer in the lighter color @@ -751,6 +760,31 @@ RenderTarget CAIRO_GAL::GetTarget() const } +void CAIRO_GAL::ClearTarget( RenderTarget aTarget ) +{ + // Save the current state + unsigned int currentBuffer = compositor->GetBuffer(); + + switch( aTarget ) + { + // Cached and noncached items are rendered to the same buffer + default: + case TARGET_CACHED: + case TARGET_NONCACHED: + compositor->SetBuffer( mainBuffer ); + break; + + case TARGET_OVERLAY: + compositor->SetBuffer( overlayBuffer ); + break; + } + compositor->ClearBuffer(); + + // Restore the previous state + compositor->SetBuffer( currentBuffer ); +} + + VECTOR2D CAIRO_GAL::ComputeCursorToWorld( const VECTOR2D& aCursorPosition ) { MATRIX3x3D inverseMatrix = worldScreenMatrix.Inverse(); @@ -972,8 +1006,10 @@ void CAIRO_GAL::setCompositor() compositor->Resize( screenSize.x, screenSize.y ); // Prepare buffers - mainBuffer = compositor->GetBuffer(); - overlayBuffer = compositor->GetBuffer(); + mainBuffer = compositor->CreateBuffer(); + overlayBuffer = compositor->CreateBuffer(); + + validCompositor = true; } diff --git a/common/gal/opengl/opengl_compositor.cpp b/common/gal/opengl/opengl_compositor.cpp index 9357d8dbbe..3485131aa7 100644 --- a/common/gal/opengl/opengl_compositor.cpp +++ b/common/gal/opengl/opengl_compositor.cpp @@ -74,7 +74,7 @@ void OPENGL_COMPOSITOR::Initialize() GL_RENDERBUFFER, m_depthBuffer ); // Unbind the framebuffer, so by default all the rendering goes directly to the display - glBindFramebuffer( GL_FRAMEBUFFER, 0 ); + glBindFramebuffer( GL_FRAMEBUFFER, DIRECT_RENDERING ); m_currentFbo = 0; m_initialized = true; @@ -91,7 +91,7 @@ void OPENGL_COMPOSITOR::Resize( unsigned int aWidth, unsigned int aHeight ) } -unsigned int OPENGL_COMPOSITOR::GetBuffer() +unsigned int OPENGL_COMPOSITOR::CreateBuffer() { wxASSERT( m_initialized ); @@ -169,8 +169,8 @@ unsigned int OPENGL_COMPOSITOR::GetBuffer() ClearBuffer(); - glBindFramebuffer( GL_FRAMEBUFFER, 0 ); - m_currentFbo = 0; + glBindFramebuffer( GL_FRAMEBUFFER, DIRECT_RENDERING ); + m_currentFbo = DIRECT_RENDERING; // Store the new buffer OPENGL_BUFFER buffer = { textureTarget, attachmentPoint }; @@ -186,10 +186,10 @@ void OPENGL_COMPOSITOR::SetBuffer( unsigned int aBufferHandle ) return; // Change the rendering destination to the selected attachment point - if( aBufferHandle == 0 ) + if( aBufferHandle == DIRECT_RENDERING ) { - glBindFramebuffer( GL_FRAMEBUFFER, 0 ); - m_currentFbo = 0; + glBindFramebuffer( GL_FRAMEBUFFER, DIRECT_RENDERING ); + m_currentFbo = DIRECT_RENDERING; } else if( m_currentFbo != m_framebuffer ) { @@ -197,7 +197,7 @@ void OPENGL_COMPOSITOR::SetBuffer( unsigned int aBufferHandle ) m_currentFbo = m_framebuffer; } - if( m_currentFbo != 0 && m_current != aBufferHandle - 1 ) + if( m_currentFbo != DIRECT_RENDERING ) { m_current = aBufferHandle - 1; glDrawBuffer( m_buffers[m_current].attachmentPoint ); @@ -219,8 +219,8 @@ void OPENGL_COMPOSITOR::DrawBuffer( unsigned int aBufferHandle ) wxASSERT( m_initialized ); // Switch to the main framebuffer and blit the scene - glBindFramebuffer( GL_FRAMEBUFFER, 0 ); - m_currentFbo = 0; + glBindFramebuffer( GL_FRAMEBUFFER, DIRECT_RENDERING ); + m_currentFbo = DIRECT_RENDERING; // Depth test has to be disabled to make transparency working glDisable( GL_DEPTH_TEST ); @@ -279,4 +279,4 @@ void OPENGL_COMPOSITOR::clean() } -GLuint OPENGL_COMPOSITOR::m_currentFbo = 0; +GLuint OPENGL_COMPOSITOR::m_currentFbo = DIRECT_RENDERING; diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 9b6b17ff8b..0325a173fe 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -130,8 +130,8 @@ void OPENGL_GAL::BeginDrawing() // Prepare rendering target buffers compositor.Initialize(); - mainBuffer = compositor.GetBuffer(); - overlayBuffer = compositor.GetBuffer(); + mainBuffer = compositor.CreateBuffer(); + overlayBuffer = compositor.CreateBuffer(); isFramebufferInitialized = true; } @@ -187,13 +187,10 @@ void OPENGL_GAL::BeginDrawing() SetFillColor( fillColor ); SetStrokeColor( strokeColor ); - // Prepare buffers for drawing - compositor.SetBuffer( mainBuffer ); - compositor.ClearBuffer(); - compositor.SetBuffer( overlayBuffer ); - compositor.ClearBuffer(); - compositor.SetBuffer( 0 ); // Unbind buffers + // Unbind buffers - set compositor for direct drawing + compositor.SetBuffer( OPENGL_COMPOSITOR::DIRECT_RENDERING ); + // Remove all previously stored items nonCachedManager.Clear(); overlayManager.Clear(); @@ -711,6 +708,31 @@ RenderTarget OPENGL_GAL::GetTarget() const } +void OPENGL_GAL::ClearTarget( RenderTarget aTarget ) +{ + // Save the current state + unsigned int oldTarget = compositor.GetBuffer(); + + switch( aTarget ) + { + // Cached and noncached items are rendered to the same buffer + default: + case TARGET_CACHED: + case TARGET_NONCACHED: + compositor.SetBuffer( mainBuffer ); + break; + + case TARGET_OVERLAY: + compositor.SetBuffer( overlayBuffer ); + break; + } + compositor.ClearBuffer(); + + // Restore the previous state + compositor.SetBuffer( oldTarget ); +} + + VECTOR2D OPENGL_GAL::ComputeCursorToWorld( const VECTOR2D& aCursorPosition ) { VECTOR2D cursorPosition = aCursorPosition; diff --git a/common/view/view.cpp b/common/view/view.cpp index 133707f7ad..3caed45b8b 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -39,6 +39,28 @@ using namespace KiGfx; +VIEW::VIEW( bool aIsDynamic ) : + m_enableOrderModifier( false ), + m_scale( 1.0 ), + m_painter( NULL ), + m_gal( NULL ), + m_dynamic( aIsDynamic ) +{ + // Redraw everything at the beginning + for( int i = 0; i < TARGETS_NUMBER; ++i ) + SetTargetDirty( i ); +} + + +VIEW::~VIEW() +{ + BOOST_FOREACH( LayerMap::value_type& l, m_layers ) + { + delete l.second.items; + } +} + + void VIEW::AddLayer( int aLayer, bool aDisplayOnly ) { if( m_layers.find( aLayer ) == m_layers.end() ) @@ -197,25 +219,6 @@ int VIEW::Query( const BOX2I& aRect, std::vector& aResult ) } -VIEW::VIEW( bool aIsDynamic ) : - m_enableOrderModifier( false ), - m_scale( 1.0 ), - m_painter( NULL ), - m_gal( NULL ), - m_dynamic( aIsDynamic ) -{ -} - - -VIEW::~VIEW() -{ - BOOST_FOREACH( LayerMap::value_type& l, m_layers ) - { - delete l.second.items; - } -} - - VECTOR2D VIEW::ToWorld( const VECTOR2D& aCoord, bool aAbsolute ) const { MATRIX3x3D matrix = m_gal->GetWorldScreenMatrix().Inverse(); @@ -267,6 +270,11 @@ void VIEW::SetGAL( GAL* aGal ) // clear group numbers, so everything is going to be recached clearGroupCache(); + // every target has to be refreshed + SetTargetDirty( TARGET_CACHED ); + SetTargetDirty( TARGET_NONCACHED ); + SetTargetDirty( TARGET_OVERLAY ); + // force the new GAL to display the current viewport. SetCenter( m_center ); SetScale( m_scale ); @@ -326,6 +334,10 @@ void VIEW::SetScale( double aScale, const VECTOR2D& aAnchor ) SetCenter( m_center - delta ); m_scale = aScale; + + // Redraw everything after the viewport has changed + SetTargetDirty( TARGET_CACHED ); + SetTargetDirty( TARGET_NONCACHED ); } @@ -334,6 +346,10 @@ void VIEW::SetCenter( const VECTOR2D& aCenter ) m_center = aCenter; m_gal->SetLookAtPoint( m_center ); m_gal->ComputeWorldScreenMatrix(); + + // Redraw everything after the viewport has changed + SetTargetDirty( TARGET_CACHED ); + SetTargetDirty( TARGET_NONCACHED ); } @@ -347,6 +363,8 @@ void VIEW::sortLayers() m_orderedLayers[n++] = &i->second; sort( m_orderedLayers.begin(), m_orderedLayers.end(), compareRenderingOrder ); + + SetTargetDirty( TARGET_CACHED ); } @@ -554,15 +572,15 @@ void VIEW::redrawRect( const BOX2I& aRect ) { BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers ) { - if( l->enabled && areRequiredLayersEnabled( l->id ) ) + if( l->enabled && isTargetDirty( l->target ) && areRequiredLayersEnabled( l->id ) ) { drawItem drawFunc( this, l ); m_gal->SetTarget( l->target ); m_gal->SetLayerDepth( l->renderingOrder ); l->items->Query( aRect, drawFunc ); - l->isDirty = false; } + l->isDirty = false; } } @@ -648,9 +666,27 @@ void VIEW::Redraw() VECTOR2D screenSize = m_gal->GetScreenPixelSize(); BOX2I rect( ToWorld( VECTOR2D( 0, 0 ) ), ToWorld( screenSize ) - ToWorld( VECTOR2D( 0, 0 ) ) ); - rect.Normalize(); + + if( isTargetDirty( TARGET_CACHED ) || isTargetDirty( TARGET_NONCACHED ) ) + { + // TARGET_CACHED and TARGET_NONCACHED have to be redrawn together, as they contain + // layers that rely on each other (eg. netnames are noncached, but tracks - are cached) + m_gal->ClearTarget( TARGET_NONCACHED ); + m_gal->ClearTarget( TARGET_CACHED ); + + SetTargetDirty( TARGET_NONCACHED ); + SetTargetDirty( TARGET_CACHED ); + + m_gal->DrawGrid(); + } + m_gal->ClearTarget( TARGET_OVERLAY ); + redrawRect( rect ); + + // All targets were redrawn, so nothing is dirty + SetTargetDirty( TARGET_CACHED, false ); + SetTargetDirty( TARGET_NONCACHED, false ); } @@ -801,3 +837,19 @@ void VIEW::RecacheAllItems( bool aImmediately ) wxLogDebug( wxT( "RecacheAllItems::%.1f ms" ), (double) totalRealTime.value / 1000.0 ); #endif /* __WXDEBUG__ */ } + + +bool VIEW::isTargetDirty( int aTarget ) const +{ + wxASSERT( aTarget < TARGETS_NUMBER ); + + // Check if any of layers belonging to the target is dirty + BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers ) + { + if( l->target == aTarget && l->isDirty ) + return true; + } + + // If no layer is dirty, just check the target status itself + return m_dirtyTargets[aTarget]; +} diff --git a/include/gal/cairo/cairo_compositor.h b/include/gal/cairo/cairo_compositor.h index b638b56a0a..116cfd7c0d 100644 --- a/include/gal/cairo/cairo_compositor.h +++ b/include/gal/cairo/cairo_compositor.h @@ -50,8 +50,14 @@ public: /// @copydoc COMPOSITOR::Resize() virtual void Resize( unsigned int aWidth, unsigned int aHeight ); + /// @copydoc COMPOSITOR::CreateBuffer() + virtual unsigned int CreateBuffer(); + /// @copydoc COMPOSITOR::GetBuffer() - virtual unsigned int GetBuffer(); + inline virtual unsigned int GetBuffer() const + { + return m_current + 1; + } /// @copydoc COMPOSITOR::SetBuffer() virtual void SetBuffer( unsigned int aBufferHandle ); @@ -62,6 +68,21 @@ public: /// @copydoc COMPOSITOR::DrawBuffer() virtual void DrawBuffer( unsigned int aBufferHandle ); + /** + * Function SetMainContext() + * Sets a context to be treated as the main context (ie. as a target of buffers rendering and + * as a source of settings for newly created buffers). + * + * @param aMainContext is the context that should be treated as the main one. + */ + inline virtual void SetMainContext( cairo_t* aMainContext ) + { + m_mainContext = aMainContext; + + // Use the context's transformation matrix + cairo_get_matrix( m_mainContext, &m_matrix ); + } + protected: typedef boost::shared_array BitmapPtr; typedef struct @@ -71,7 +92,7 @@ protected: BitmapPtr bitmap; ///< Pixel storage } CAIRO_BUFFER; - unsigned int m_current; ///< Currently used buffer handle + unsigned int m_current; ///< Currently used buffer handle typedef std::deque CAIRO_BUFFERS; /// Pointer to the current context, so it can be changed diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 818cf0a84a..0c584049f1 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -221,6 +221,9 @@ public: /// @copydoc GAL::GetTarget() virtual RenderTarget GetTarget() const; + /// @copydoc GAL::ClearTarget() + virtual void ClearTarget( RenderTarget aTarget ); + // ------- // Cursor // ------- @@ -267,6 +270,7 @@ private: unsigned int mainBuffer; ///< Handle to the main buffer unsigned int overlayBuffer; ///< Handle to the overlay buffer RenderTarget currentTarget; ///< Current rendering target + bool validCompositor; ///< Compositor initialization flag // Variables related to wxWidgets wxWindow* parentWindow; ///< Parent window diff --git a/include/gal/compositor.h b/include/gal/compositor.h index db601d5617..1a9d924426 100644 --- a/include/gal/compositor.h +++ b/include/gal/compositor.h @@ -57,12 +57,20 @@ public: virtual void Resize( unsigned int aWidth, unsigned int aHeight ) = 0; /** - * Function GetBuffer() + * Function CreateBuffer() * prepares a new buffer that may be used as a rendering target. * * @return is the handle of the buffer. In case of failure 0 (zero) is returned as the handle. */ - virtual unsigned int GetBuffer() = 0; + virtual unsigned int CreateBuffer() = 0; + + /** + * Function GetBuffer() + * returns currently used buffer handle. + * + * @return Currently used buffer handle. + */ + virtual unsigned int GetBuffer() const = 0; /** * Function SetBuffer() diff --git a/include/gal/definitions.h b/include/gal/definitions.h index 5e9059a2df..ce18235bd1 100644 --- a/include/gal/definitions.h +++ b/include/gal/definitions.h @@ -42,6 +42,9 @@ namespace KiGfx TARGET_NONCACHED, ///< Auxiliary rendering target (noncached) TARGET_OVERLAY ///< Items that may change while the view stays the same (noncached) }; + + /// Number of available rendering targets + static const int TARGETS_NUMBER = 3; } #endif /* DEFINITIONS_H_ */ diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 677cc28ac1..03da4451bf 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -579,6 +579,13 @@ public: */ virtual RenderTarget GetTarget() const = 0; + /** + * @brief Clears the target for rendering. + * + * @param aTarget is the target to be cleared. + */ + virtual void ClearTarget( RenderTarget aTarget ) = 0; + // ------------- // Grid methods // ------------- diff --git a/include/gal/opengl/opengl_compositor.h b/include/gal/opengl/opengl_compositor.h index 88d36f91fa..8b587fd3c6 100644 --- a/include/gal/opengl/opengl_compositor.h +++ b/include/gal/opengl/opengl_compositor.h @@ -49,18 +49,30 @@ public: /// @copydoc COMPOSITOR::Resize() virtual void Resize( unsigned int aWidth, unsigned int aHeight ); - /// @copydoc COMPOSITOR::GetBuffer() - virtual unsigned int GetBuffer(); + /// @copydoc COMPOSITOR::CreateBuffer() + virtual unsigned int CreateBuffer(); /// @copydoc COMPOSITOR::SetBuffer() virtual void SetBuffer( unsigned int aBufferHandle ); + /// @copydoc COMPOSITOR::GetBuffer() + inline virtual unsigned int GetBuffer() const + { + if( m_currentFbo == DIRECT_RENDERING ) + return DIRECT_RENDERING; + + return m_current + 1; + } + /// @copydoc COMPOSITOR::ClearBuffer() virtual void ClearBuffer(); /// @copydoc COMPOSITOR::DrawBuffer() virtual void DrawBuffer( unsigned int aBufferHandle ); + // Constant used by glBindFramebuffer to turn off rendering to framebuffers + static const unsigned int DIRECT_RENDERING = 0; + protected: typedef struct { diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 795f1e7622..66a2fd1712 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -214,6 +214,9 @@ public: /// @copydoc GAL::GetTarget() virtual RenderTarget GetTarget() const; + /// @copydoc GAL::ClearTarget() + virtual void ClearTarget( RenderTarget aTarget ); + // ------- // Cursor // ------- diff --git a/include/view/view.h b/include/view/view.h index 2d6ad6a0e5..f0caf95d02 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -392,6 +392,20 @@ public: */ bool IsDirty() const; + /** + * Function SetTargetDirty() + * Sets or clears target 'dirty' flag. + * @param aTarget is the target to set. + * @param aState says if the flag should be set or cleared. + */ + inline void SetTargetDirty( int aTarget, bool aState = true ) + { + wxASSERT( aTarget < TARGETS_NUMBER ); + + m_dirtyTargets[aTarget] = aState; + } + + static const int VIEW_MAX_LAYERS = 128; ///* maximum number of layers that may be shown private: @@ -462,6 +476,14 @@ private: return ( m_layers.at( aLayer ).target == TARGET_CACHED ); } + /** + * Function isTargetDirty() + * Returns true if any of layers belonging to the target or the target itself should be + * redrawn. + * @return True if the above condition is fulfilled. + */ + bool isTargetDirty( int aTarget ) const; + /// Contains set of possible displayed layers and its properties LayerMap m_layers; @@ -487,6 +509,9 @@ private: /// static (eg. image/PDF) - does not. bool m_dynamic; + /// Flags to mark targets as dirty, so they have to be redrawn on the next refresh event + bool m_dirtyTargets[TARGETS_NUMBER]; + /// Rendering order modifier for layers that are marked as top layers static const int TOP_LAYER_MODIFIER = -VIEW_MAX_LAYERS; }; From c8d06997f569be7dd0e25f1a5b86d64df326cdae Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 20 Aug 2013 14:49:08 +0200 Subject: [PATCH 236/415] Added InvokeTool() and FindTool() functions. --- common/tool/tool_manager.cpp | 42 +++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index c3082eca70..86104e492b 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -92,7 +92,47 @@ void TOOL_MANAGER::RegisterTool( TOOL_BASE* aTool ) } -void TOOL_MANAGER::ScheduleNextState( TOOL_BASE *aTool, TOOL_STATE_FUNC& aHandler, +void TOOL_MANAGER::InvokeTool( TOOL_ID aToolId ) +{ + TOOL_BASE* tool = FindTool( aToolId ); + + if( tool && tool->GetType() == TOOL_Interactive ) + static_cast( tool )->Reset(); +} + + +void TOOL_MANAGER::InvokeTool( const std::string& aName ) +{ + TOOL_BASE* tool = FindTool( aName ); + + if( tool && tool->GetType() == TOOL_Interactive ) + static_cast( tool )->Reset(); +} + + +TOOL_BASE* TOOL_MANAGER::FindTool( int aId ) const +{ + std::map::const_iterator it = m_toolIdIndex.find( aId ); + + if( it != m_toolIdIndex.end() ) + return it->second->theTool; + + return NULL; +} + + +TOOL_BASE* TOOL_MANAGER::FindTool( const std::string& aName ) const +{ + std::map::const_iterator it = m_toolNameIndex.find( aName ); + + if( it != m_toolNameIndex.end() ) + return it->second->theTool; + + return NULL; +} + + +void TOOL_MANAGER::ScheduleNextState( TOOL_BASE* aTool, TOOL_STATE_FUNC& aHandler, const TOOL_EVENT_LIST& aConditions ) { ToolState* st = m_toolState[aTool]; From 339cf51c0c454fa8b5a65f9ad3f2f5ae07aea4ac Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 20 Aug 2013 15:07:38 +0200 Subject: [PATCH 237/415] Added VIEW_GROUP for grouping items to be displayed on a single layer. --- common/CMakeLists.txt | 1 + common/drawpanel_gal.cpp | 5 +- common/view/view.cpp | 223 +++++++++++++++++++++++-------------- common/view/view_group.cpp | 145 ++++++++++++++++++++++++ include/view/view.h | 93 +++++++++++----- include/view/view_group.h | 158 ++++++++++++++++++++++++++ 6 files changed, 513 insertions(+), 112 deletions(-) create mode 100644 common/view/view_group.cpp create mode 100644 include/view/view_group.h diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 68cceb56df..67b27f893d 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -152,6 +152,7 @@ set(COMMON_SRCS ${COMMON_SRCS} view/view.cpp view/view_item.cpp + view/view_group.cpp system/fcontext.s diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index d99f2b0920..a6f11ff8b0 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -88,7 +88,6 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this ); /* Generic events for the Tool Dispatcher */ - Connect( wxEVT_MOTION, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_LEFT_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_LEFT_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); @@ -127,8 +126,8 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) ) void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent ) { m_gal->ResizeScreen( aEvent.GetSize().x, aEvent.GetSize().y ); - m_view->SetTargetDirty( KiGfx::TARGET_CACHED ); - m_view->SetTargetDirty( KiGfx::TARGET_NONCACHED ); + m_view->MarkTargetDirty( KiGfx::TARGET_CACHED ); + m_view->MarkTargetDirty( KiGfx::TARGET_NONCACHED ); } diff --git a/common/view/view.cpp b/common/view/view.cpp index 3caed45b8b..83bd16dfac 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -48,7 +49,7 @@ VIEW::VIEW( bool aIsDynamic ) : { // Redraw everything at the beginning for( int i = 0; i < TARGETS_NUMBER; ++i ) - SetTargetDirty( i ); + MarkTargetDirty( i ); } @@ -111,53 +112,6 @@ void VIEW::Remove( VIEW_ITEM* aItem ) } -void VIEW::Draw( VIEW_ITEM* aItem, int aLayer ) const -{ - if( isCached( aLayer ) ) - { - // Draw using cached information or create one - int group = aItem->getGroup( aLayer ); - - if( group >= 0 ) - { - m_gal->DrawGroup( group ); - } - else - { - group = m_gal->BeginGroup(); - aItem->setGroup( aLayer, group ); - if( !m_painter->Draw( aItem, aLayer ) ) - aItem->ViewDraw( aLayer, m_gal, BOX2I() ); // Alternative drawing method - m_gal->EndGroup(); - } - } - else - { - // Immediate mode - if( !m_painter->Draw( aItem, aLayer ) ) - aItem->ViewDraw( aLayer, m_gal, BOX2I() ); // Alternative drawing method - } - - // Draws a bright contour around the item - if( static_cast( aItem )->IsBrightened() ) - { - m_painter->DrawBrightened( aItem ); - } -} - - -void VIEW::Draw( VIEW_ITEM* aItem ) const -{ - int layers[VIEW_MAX_LAYERS], layers_count; - aItem->ViewGetLayers( layers, layers_count ); - - for( int i = 0; i < layers_count; ++i ) - { - Draw( aItem, layers[i] ); - } -} - - void VIEW::SetRequired( int aLayerId, int aRequiredId, bool aRequired ) { wxASSERT( (unsigned) aLayerId < m_layers.size() ); @@ -271,9 +225,9 @@ void VIEW::SetGAL( GAL* aGal ) clearGroupCache(); // every target has to be refreshed - SetTargetDirty( TARGET_CACHED ); - SetTargetDirty( TARGET_NONCACHED ); - SetTargetDirty( TARGET_OVERLAY ); + MarkTargetDirty( TARGET_CACHED ); + MarkTargetDirty( TARGET_NONCACHED ); + MarkTargetDirty( TARGET_OVERLAY ); // force the new GAL to display the current viewport. SetCenter( m_center ); @@ -336,8 +290,8 @@ void VIEW::SetScale( double aScale, const VECTOR2D& aAnchor ) m_scale = aScale; // Redraw everything after the viewport has changed - SetTargetDirty( TARGET_CACHED ); - SetTargetDirty( TARGET_NONCACHED ); + MarkTargetDirty( TARGET_CACHED ); + MarkTargetDirty( TARGET_NONCACHED ); } @@ -348,23 +302,8 @@ void VIEW::SetCenter( const VECTOR2D& aCenter ) m_gal->ComputeWorldScreenMatrix(); // Redraw everything after the viewport has changed - SetTargetDirty( TARGET_CACHED ); - SetTargetDirty( TARGET_NONCACHED ); -} - - -void VIEW::sortLayers() -{ - int n = 0; - - m_orderedLayers.resize( m_layers.size() ); - - for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) - m_orderedLayers[n++] = &i->second; - - sort( m_orderedLayers.begin(), m_orderedLayers.end(), compareRenderingOrder ); - - SetTargetDirty( TARGET_CACHED ); + MarkTargetDirty( TARGET_CACHED ); + MarkTargetDirty( TARGET_NONCACHED ); } @@ -376,6 +315,40 @@ void VIEW::SetLayerOrder( int aLayer, int aRenderingOrder ) } +int VIEW::GetLayerOrder( int aLayer ) const +{ + return m_layers.at(aLayer).renderingOrder; +} + + +void VIEW::SortLayers( int aLayers[], int& aCount ) const +{ + int maxLay, maxOrd, maxIdx; + + for( int i = 0; i < aCount; ++i ) + { + maxLay = aLayers[i]; + maxOrd = GetLayerOrder( maxLay ); + maxIdx = i; + + // Look for the max element in the range (j..aCount) + for( int j = i; j < aCount; ++j ) + { + if( maxOrd < GetLayerOrder( aLayers[j] ) ) + { + maxLay = aLayers[j]; + maxOrd = GetLayerOrder( maxLay ); + maxIdx = j; + } + } + + // Swap elements + aLayers[maxIdx] = aLayers[i]; + aLayers[i] = maxLay; + } +} + + struct VIEW::updateItemsColor { updateItemsColor( int aLayer, PAINTER* aPainter, GAL* aGal ) : @@ -559,7 +532,7 @@ struct VIEW::drawItem if( !drawCondition ) return; - view->Draw( aItem, currentLayer->id ); + view->draw( aItem, currentLayer->id ); } const VIEW_LAYER* currentLayer; @@ -585,13 +558,73 @@ void VIEW::redrawRect( const BOX2I& aRect ) } +void VIEW::draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate ) const +{ + if( isCached( aLayer ) && !aImmediate ) + { + // Draw using cached information or create one + int group = aItem->getGroup( aLayer ); + + if( group >= 0 ) + { + m_gal->DrawGroup( group ); + } + else + { + group = m_gal->BeginGroup(); + aItem->setGroup( aLayer, group ); + if( !m_painter->Draw( aItem, aLayer ) ) + aItem->ViewDraw( aLayer, m_gal, BOX2I() ); // Alternative drawing method + m_gal->EndGroup(); + } + } + else + { + // Immediate mode + if( !m_painter->Draw( aItem, aLayer ) ) + aItem->ViewDraw( aLayer, m_gal, BOX2I() ); // Alternative drawing method + } + + // Draws a bright contour around the item + if( static_cast( aItem )->IsBrightened() ) + { + m_painter->DrawBrightened( aItem ); + } +} + + +void VIEW::draw( VIEW_ITEM* aItem, bool aImmediate ) const +{ + int layers[VIEW_MAX_LAYERS], layers_count; + aItem->ViewGetLayers( layers, layers_count ); + SortLayers( layers, layers_count ); + + for( int i = 0; i < layers_count; ++i ) + { + m_gal->SetLayerDepth( m_layers.at( i ).renderingOrder ); + draw( aItem, layers[i], aImmediate ); + } +} + + +void VIEW::draw( VIEW_GROUP* aGroup, bool aImmediate ) const +{ + std::set::const_iterator it; + for( it = aGroup->Begin(); it != aGroup->End(); ++it ) + { + draw( *it, aImmediate ); + } +} + + bool VIEW::IsDirty() const { - BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers ) + for( int i = 0; i < TARGETS_NUMBER; ++i ) { - if( l->isDirty ) + if( isTargetDirty( i ) ) return true; - } + } + return false; } @@ -675,18 +708,22 @@ void VIEW::Redraw() m_gal->ClearTarget( TARGET_NONCACHED ); m_gal->ClearTarget( TARGET_CACHED ); - SetTargetDirty( TARGET_NONCACHED ); - SetTargetDirty( TARGET_CACHED ); + MarkTargetDirty( TARGET_NONCACHED ); + MarkTargetDirty( TARGET_CACHED ); m_gal->DrawGrid(); } + + // Always refresh the overlay + MarkTargetDirty( TARGET_OVERLAY ); m_gal->ClearTarget( TARGET_OVERLAY ); redrawRect( rect ); // All targets were redrawn, so nothing is dirty - SetTargetDirty( TARGET_CACHED, false ); - SetTargetDirty( TARGET_NONCACHED, false ); + clearTargetDirty( TARGET_CACHED ); + clearTargetDirty( TARGET_NONCACHED ); + clearTargetDirty( TARGET_OVERLAY ); } @@ -752,10 +789,26 @@ void VIEW::invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ) // Mark those layers as dirty, so the VIEW will be refreshed m_layers[layers[i]].isDirty = true; + MarkTargetDirty( m_layers[layers[i]].target ); // TODO remove? } } +void VIEW::sortLayers() +{ + int n = 0; + + m_orderedLayers.resize( m_layers.size() ); + + for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) + m_orderedLayers[n++] = &i->second; + + sort( m_orderedLayers.begin(), m_orderedLayers.end(), compareRenderingOrder ); + + MarkTargetDirty( TARGET_CACHED ); +} + + void VIEW::updateItemAppearance( VIEW_ITEM* aItem, int aLayer ) { wxASSERT( (unsigned) aLayer < m_layers.size() ); @@ -811,15 +864,13 @@ void VIEW::RecacheAllItems( bool aImmediately ) r.SetMaximum(); #ifdef __WXDEBUG__ - wxLogDebug( wxT( "RecacheAllItems::immediately: %u" ), aImmediately ); - prof_counter totalRealTime; prof_start( &totalRealTime, false ); #endif /* __WXDEBUG__ */ for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) { - VIEW_LAYER* l = & ( ( *i ).second ); + VIEW_LAYER* l = &( ( *i ).second ); // Obviously, there is only one cached target that has to be recomputed if( isCached( l->id ) ) @@ -834,7 +885,8 @@ void VIEW::RecacheAllItems( bool aImmediately ) #ifdef __WXDEBUG__ prof_end( &totalRealTime ); - wxLogDebug( wxT( "RecacheAllItems::%.1f ms" ), (double) totalRealTime.value / 1000.0 ); + wxLogDebug( wxT( "RecacheAllItems::immediately: %u %.1f ms" ), + aImmediately, (double) totalRealTime.value / 1000.0 ); #endif /* __WXDEBUG__ */ } @@ -843,6 +895,10 @@ bool VIEW::isTargetDirty( int aTarget ) const { wxASSERT( aTarget < TARGETS_NUMBER ); + // Check the target status + if( m_dirtyTargets[aTarget] ) + return true; + // Check if any of layers belonging to the target is dirty BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers ) { @@ -850,6 +906,5 @@ bool VIEW::isTargetDirty( int aTarget ) const return true; } - // If no layer is dirty, just check the target status itself - return m_dirtyTargets[aTarget]; + return false; } diff --git a/common/view/view_group.cpp b/common/view/view_group.cpp new file mode 100644 index 0000000000..f7ff19da96 --- /dev/null +++ b/common/view/view_group.cpp @@ -0,0 +1,145 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +/** + * @file view_group.cpp + * @brief VIEW_GROUP extends VIEW_ITEM by possibility of grouping items into a single object. + * VIEW_GROUP does not take over ownership of the held items. The main purpose of this class is + * to group items and draw them on a single layer (in particular the overlay). + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace KiGfx; + +VIEW_GROUP::VIEW_GROUP( VIEW* aView ) : + m_layer( ITEM_GAL_LAYER( GP_OVERLAY ) ) +{ + m_view = aView; +} + + +VIEW_GROUP::~VIEW_GROUP() +{ +} + + +void VIEW_GROUP::Add( VIEW_ITEM* aItem ) +{ + m_items.insert( aItem ); + updateBbox(); +} + + +void VIEW_GROUP::Remove( VIEW_ITEM* aItem ) +{ + m_items.erase( aItem ); + updateBbox(); +} + + +void VIEW_GROUP::Clear() +{ + m_items.clear(); + updateBbox(); +} + + +unsigned int VIEW_GROUP::GetSize() const +{ + return m_items.size(); +} + + +const BOX2I VIEW_GROUP::ViewBBox() const +{ + BOX2I box; + + // Merge all bounding boxes, so the returned one contains all stored items + BOOST_FOREACH( VIEW_ITEM* item, m_items ) + { + box.Merge( item->ViewBBox() ); + } + + return box; +} + + +void VIEW_GROUP::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const +{ + PAINTER* painter = m_view->GetPainter(); + + // Draw all items immediately (without caching) + BOOST_FOREACH( VIEW_ITEM* item, m_items ) + { + int layers[VIEW::VIEW_MAX_LAYERS], layers_count; + item->ViewGetLayers( layers, layers_count ); + m_view->SortLayers( layers, layers_count ); + + for( int i = 0; i < layers_count; i++ ) + { + aGal->SetLayerDepth( m_view->GetLayerOrder( layers[i] ) ); + + if( !painter->Draw( item, layers[i] ) ) + item->ViewDraw( layers[i], aGal, aVisibleArea ); // Alternative drawing method + } + + /// m_view->Draw( item, true ); + } +} + + +void VIEW_GROUP::ViewGetLayers( int aLayers[], int& aCount ) const +{ + aLayers[0] = m_layer; + aCount = 1; +} + + +void VIEW_GROUP::ViewUpdate( int aUpdateFlags, bool aForceImmediateRedraw ) +{ + BOOST_FOREACH( VIEW_ITEM* item, m_items ) + { + item->ViewUpdate( aUpdateFlags, aForceImmediateRedraw ); + } +} + + +void VIEW_GROUP::updateBbox() +{ + // Save the used VIEW, as it used nulled during Remove() + VIEW* view = m_view; + + // Reinsert the group, so the bounding box can be updated + view->Remove( this ); + view->Add( this ); +} diff --git a/include/view/view.h b/include/view/view.h index f0caf95d02..89155099df 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -37,6 +37,7 @@ namespace KiGfx class PAINTER; class GAL; class VIEW_ITEM; +class VIEW_GROUP; class VIEW_RTREE; /** @@ -95,19 +96,6 @@ public: */ int Query( const BOX2I& aRect, std::vector& aResult ); - /** - * Function Draw() - * Draws an item, but on a specified layers. It has to be marked that some of drawing settings - * are based on the layer on which an item is drawn. - */ - void Draw( VIEW_ITEM* aItem, int aLayer ) const; - - /** - * Function Draw() - * Draws an item on all layers that the item uses. - */ - void Draw( VIEW_ITEM* aItem ) const; - /** * Function SetRequired() * Marks the aRequiredId layer as required for the aLayerId layer. In order to display the @@ -296,13 +284,30 @@ public: /** * Function SetLayerOrder() - * Sets rendering order of a particular layer. + * Sets rendering order of a particular layer. Lower values are rendered first. * @param aLayer: the layer * @param aRenderingOrder: arbitrary number denoting the rendering order. - * Lower values are rendered first. */ void SetLayerOrder( int aLayer, int aRenderingOrder ); + /** + * Function GetLayerOrder() + * Returns rendering order of a particular layer. Lower values are rendered first. + * @param aLayer: the layer + * @return Rendering order of a particular layer. + */ + int GetLayerOrder( int aLayer ) const; + + /** + * Function SortLayers() + * Changes the order of given layer ids, so after sorting the order corresponds to layers + * rendering order (descending, ie. order in which layers should be drawn - from the bottom to + * the top). + * @param aLayers stores id of layers to be sorted. + * @param aCount stores the number of layers. + */ + void SortLayers( int aLayers[], int& aCount ) const; + /** * Function UpdateLayerColor() * Applies the new coloring scheme held by RENDER_SETTINGS in case that it has changed. @@ -390,22 +395,20 @@ public: * Returns true if any of the VIEW layers needs to be refreshened. * @return True in case if any of layers is marked as dirty. */ - bool IsDirty() const; + bool IsDirty() const; /** - * Function SetTargetDirty() + * Function MarkTargetDirty() * Sets or clears target 'dirty' flag. * @param aTarget is the target to set. - * @param aState says if the flag should be set or cleared. */ - inline void SetTargetDirty( int aTarget, bool aState = true ) + inline void MarkTargetDirty( int aTarget ) { wxASSERT( aTarget < TARGETS_NUMBER ); - m_dirtyTargets[aTarget] = aState; + m_dirtyTargets[aTarget] = true; } - static const int VIEW_MAX_LAYERS = 128; ///* maximum number of layers that may be shown private: @@ -438,12 +441,49 @@ private: struct updateItemsColor; struct changeItemsDepth; - ///* Whether to use rendering order modifier or not - bool m_enableOrderModifier; - ///* Redraws contents within rect aRect void redrawRect( const BOX2I& aRect ); + inline void clearTargetDirty( int aTarget ) + { + wxASSERT( aTarget < TARGETS_NUMBER ); + + m_dirtyTargets[aTarget] = false; + } + + /** + * Function draw() + * Draws an item, but on a specified layers. It has to be marked that some of drawing settings + * are based on the layer on which an item is drawn. + * + * @param aItem is the item to be drawn. + * @param aLayer is the layer which should be drawn. + * @param aImmediate dictates the way of drawing - it allows to force immediate drawing mode + * for cached items. + */ + void draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate = false ) const; + + /** + * Function draw() + * Draws an item on all layers that the item uses. + * + * @param aItem is the item to be drawn. + * @param aImmediate dictates the way of drawing - it allows to force immediate drawing mode + * for cached items. + */ + void draw( VIEW_ITEM* aItem, bool aImmediate = false ) const; + + /** + * Function draw() + * Draws a group of items on all layers that those items use. + * + * @param aItem is the group to be drawn. + * @param aImmediate dictates the way of drawing - it allows to force immediate drawing mode + * for cached items. + */ + void draw( VIEW_GROUP* aGroup, bool aImmediate = false ) const; + + ///* Manages dirty flags & redraw queueing when updating an item. Called internally /// via VIEW_ITEM::ViewUpdate() void invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ); @@ -484,10 +524,13 @@ private: */ bool isTargetDirty( int aTarget ) const; + ///* Whether to use rendering order modifier or not + bool m_enableOrderModifier; + /// Contains set of possible displayed layers and its properties LayerMap m_layers; - /// Sorted list of pointers to members of m_layers. + /// Sorted list of pointers to members of m_layers LayerOrder m_orderedLayers; /// Stores set of layers that are displayed on the top diff --git a/include/view/view_group.h b/include/view/view_group.h new file mode 100644 index 0000000000..4439234e0d --- /dev/null +++ b/include/view/view_group.h @@ -0,0 +1,158 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +/** + * @file view_group.h + * @brief VIEW_GROUP extends VIEW_ITEM by possibility of grouping items into a single object. + * VIEW_GROUP does not take over ownership of the held items. The main purpose of this class is + * to group items and draw them on a single layer (in particular the overlay). + */ + +#ifndef VIEW_GROUP_H_ +#define VIEW_GROUP_H_ + +#include +#include + +namespace KiGfx +{ + +class VIEW_GROUP : public VIEW_ITEM +{ +public: + VIEW_GROUP( VIEW* aView ); + virtual ~VIEW_GROUP(); + + /** + * Function Add() + * Adds an item to the group. + * + * @param aItem is the item to be added. + */ + virtual void Add( VIEW_ITEM* aItem ); + + /** + * Function Remove() + * Removes an item from the group. + * + * @param aItem is the item to be removed. + */ + virtual void Remove( VIEW_ITEM* aItem ); + + /** + * Function Clear() + * Removes all the stored items from the group. + */ + virtual void Clear(); + + /** + * Function Begin() + * Returns iterator to beginning. + */ + inline std::set::const_iterator Begin() const + { + return m_items.begin(); + } + + /** + * Function End() + * Returns iterator to end. + */ + inline std::set::const_iterator End() const + { + return m_items.end(); + } + + /** + * Function GetSize() + * Returns the number of stored items. + * + * @return Number of stored items. + */ + virtual unsigned int GetSize() const; + + /** + * Function ViewBBox() + * Returns the bounding box for all stored items covering all its layers. + * + * @return The current bounding box + */ + virtual const BOX2I ViewBBox() const; + + /** + * Function ViewDraw() + * Draws all the stored items in the group on the given layer. + * + * @param aLayer is the layer which should be drawn. + * @param aGal is the GAL that should be used for drawing. + * @param aVisibleArea is limiting the drawing area. + */ + virtual void ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const; + + /** + * Function ViewGetLayers() + * Returns all the layers used by the stored items. + * + * @param aLayers[] is the output layer index array. + * @param aCount is the number of layer indices in aLayers[]. + */ + virtual void ViewGetLayers( int aLayers[], int& aCount ) const; + + /// @copydoc VIEW_ITEM::ViewUpdate() + virtual void ViewUpdate( int aUpdateFlags, bool aForceImmediateRedraw ); + + /** + * Function SetLayer() + * Sets layer used to draw the group. + * + * @param aLayer is the layer used for drawing. + */ + inline virtual void SetLayer( int aLayer ) + { + m_layer = aLayer; + } + +protected: + /// These functions cannot be used with VIEW_GROUP as they are intended only to work with + /// singular VIEW_ITEMs (there is only one-to-one relation between item/layer combination and + /// its group). + int getGroup( int aLayer ) const { return -1; }; + std::vector getAllGroups() const { return std::vector(); }; + void setGroup( int aLayer, int aGroup ) {}; + void deleteGroups() {}; + bool storesGroups() const { return false; }; + + /// Layer on which the group is drawn + int m_layer; + +private: + void updateBbox(); + + /// Container for storing VIEW_ITEMs + std::set m_items; +}; +} // namespace KiGfx + +#endif // VIEW_GROUP_H_ From b5185696745ae58f533f5d582a0e0300b73cd5de Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 21 Aug 2013 17:37:27 +0200 Subject: [PATCH 238/415] Added handling keyboard events for the Tool framework. --- common/drawframe.cpp | 1 + common/drawpanel.cpp | 1 - common/drawpanel_gal.cpp | 30 +++++--- common/gal/cairo/cairo_gal.cpp | 15 ++-- common/gal/opengl/opengl_gal.cpp | 15 ++-- common/tool/tool_dispatcher.cpp | 77 ++++++++++++-------- common/tool/tool_event.cpp | 42 ++++++++--- common/view/wx_view_controls.cpp | 38 +++++----- include/class_drawpanel_gal.h | 1 + include/gal/cairo/cairo_gal.h | 2 +- include/tool/tool_dispatcher.h | 16 ++-- include/tool/tool_event.h | 121 ++++++++++++++++++++----------- include/view/wx_view_controls.h | 8 +- pcbnew/tools/selection_tool.cpp | 2 +- 14 files changed, 224 insertions(+), 145 deletions(-) diff --git a/common/drawframe.cpp b/common/drawframe.cpp index 5681ceac03..b7c9c9c139 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -1017,5 +1017,6 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) m_auimgr.GetPane( wxT( "DrawFrameGal" ) ).Show( aEnable ); m_auimgr.Update(); + m_galCanvas->SetFocus(); m_galCanvasActive = aEnable; } diff --git a/common/drawpanel.cpp b/common/drawpanel.cpp index 0fc2374e13..8c96634191 100644 --- a/common/drawpanel.cpp +++ b/common/drawpanel.cpp @@ -1334,7 +1334,6 @@ void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event ) Screen->SetMousePosition( pos ); GetParent()->GeneralControl( &DC, pos, localkey ); - } diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index a6f11ff8b0..678994b788 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -84,20 +84,21 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin m_viewControls = new KiGfx::WX_VIEW_CONTROLS( m_view, this ); - Connect( wxEVT_PAINT, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); - Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this ); + Connect( wxEVT_PAINT, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); + Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this ); /* Generic events for the Tool Dispatcher */ - Connect( wxEVT_MOTION, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_LEFT_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_LEFT_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_RIGHT_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_RIGHT_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_MIDDLE_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_MOTION, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_LEFT_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_LEFT_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_RIGHT_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_RIGHT_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_MIDDLE_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_MIDDLE_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_MOUSEWHEEL, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_KEY_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_KEY_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_MOUSEWHEEL, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_CHAR_HOOK, wxEventHandler( EDA_DRAW_PANEL_GAL::skipEvent ), NULL, this ); + Connect( wxEVT_KEY_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_KEY_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); } @@ -209,3 +210,10 @@ void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent ) m_eventDispatcher->DispatchWxEvent( aEvent ); } } + + +void EDA_DRAW_PANEL_GAL::skipEvent( wxEvent& aEvent ) +{ + // This is necessary for CHAR_HOOK event to generate KEY_UP and KEY_DOWN events + aEvent.Skip(); +} diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 7b4f6972f7..9425fd084f 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -52,17 +52,16 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, groupCounter = 0; // Connecting the event handlers - Connect( wxEVT_PAINT, wxPaintEventHandler( CAIRO_GAL::onPaint ) ); + Connect( wxEVT_PAINT, wxPaintEventHandler( CAIRO_GAL::onPaint ) ); // Mouse events are skipped to the parent - Connect( wxEVT_MOTION, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); - Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); - Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); - Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); - Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); - Connect( wxEVT_LEFT_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_MOTION, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_LEFT_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); - Connect( wxEVT_MIDDLE_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_MIDDLE_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); + Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); #if defined _WIN32 || defined _WIN64 Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( CAIRO_GAL::skipMouseEvent ) ); #endif diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 0325a173fe..5cbd4fa162 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -66,17 +66,16 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, groupCounter = 0; // Connecting the event handlers - Connect( wxEVT_PAINT, wxPaintEventHandler( OPENGL_GAL::onPaint ) ); + Connect( wxEVT_PAINT, wxPaintEventHandler( OPENGL_GAL::onPaint ) ); // Mouse events are skipped to the parent - Connect( wxEVT_MOTION, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); - Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); - Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); - Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); - Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); - Connect( wxEVT_LEFT_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_MOTION, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_LEFT_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); - Connect( wxEVT_MIDDLE_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_MIDDLE_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); + Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); #if defined _WIN32 || defined _WIN64 Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( OPENGL_GAL::skipMouseEvent ) ); #endif diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 5eb905af23..ddf168fba0 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -44,7 +44,7 @@ using boost::optional; struct TOOL_DISPATCHER::ButtonState { ButtonState( TOOL_MouseButtons aButton, const wxEventType& aDownEvent, - const wxEventType & aUpEvent, bool aTriggerMenu = false) : + const wxEventType& aUpEvent, bool aTriggerMenu = false ) : button( aButton ), downEvent( aDownEvent ), upEvent( aUpEvent ), @@ -63,7 +63,7 @@ struct TOOL_DISPATCHER::ButtonState bool triggerContextMenu; wxLongLong downTimestamp; - + void Reset() { dragging = false; @@ -72,8 +72,8 @@ struct TOOL_DISPATCHER::ButtonState }; -TOOL_DISPATCHER::TOOL_DISPATCHER( TOOL_MANAGER *aToolMgr, PCB_BASE_FRAME *aEditFrame ) : - m_toolMgr(aToolMgr), m_editFrame(aEditFrame) +TOOL_DISPATCHER::TOOL_DISPATCHER( TOOL_MANAGER* aToolMgr, PCB_BASE_FRAME* aEditFrame ) : + m_toolMgr( aToolMgr ), m_editFrame( aEditFrame ) { m_buttons.push_back( new ButtonState( MB_Left, wxEVT_LEFT_DOWN, wxEVT_LEFT_UP ) ); m_buttons.push_back( new ButtonState( MB_Right, wxEVT_RIGHT_DOWN, wxEVT_RIGHT_UP, true ) ); @@ -103,23 +103,22 @@ KiGfx::VIEW* TOOL_DISPATCHER::getView() } -int TOOL_DISPATCHER::decodeModifiers( wxEvent& aEvent ) +int TOOL_DISPATCHER::decodeModifiers( const wxKeyboardState* aState ) const { - wxMouseEvent* me = static_cast( &aEvent ); int mods = 0; - if( me->ControlDown() ) - mods |= MB_ModCtrl; - if( me->AltDown() ) - mods |= MB_ModAlt; - if( me->ShiftDown() ) - mods |= MB_ModShift; + if( aState->ControlDown() ) + mods |= MD_ModCtrl; + if( aState->AltDown() ) + mods |= MD_ModAlt; + if( aState->ShiftDown() ) + mods |= MD_ModShift; - return mods; + return mods; } -bool TOOL_DISPATCHER::handleMouseButton ( wxEvent& aEvent, int aIndex, bool aMotion ) +bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMotion ) { ButtonState* st = m_buttons[aIndex]; wxEventType type = aEvent.GetEventType(); @@ -128,7 +127,7 @@ bool TOOL_DISPATCHER::handleMouseButton ( wxEvent& aEvent, int aIndex, bool aMot bool up = type == st->upEvent; bool down = type == st->downEvent; - int mods = decodeModifiers( aEvent ); + int mods = decodeModifiers( static_cast( &aEvent ) ); int args = st->button | mods; if( down ) @@ -139,7 +138,7 @@ bool TOOL_DISPATCHER::handleMouseButton ( wxEvent& aEvent, int aIndex, bool aMot st->pressed = true; evt = TOOL_EVENT( TC_Mouse, TA_MouseDown, args ); } - else if ( up ) + else if( up ) { bool isClick = false; st->pressed = false; @@ -148,7 +147,8 @@ bool TOOL_DISPATCHER::handleMouseButton ( wxEvent& aEvent, int aIndex, bool aMot { wxLongLong t = wxGetLocalTimeMillis(); - if( t - st->downTimestamp < DragTimeThreshold && st->dragMaxDelta < DragDistanceThreshold ) + if( t - st->downTimestamp < DragTimeThreshold && + st->dragMaxDelta < DragDistanceThreshold ) isClick = true; else evt = TOOL_EVENT( TC_Mouse, TA_MouseUp, args ); @@ -159,7 +159,7 @@ bool TOOL_DISPATCHER::handleMouseButton ( wxEvent& aEvent, int aIndex, bool aMot if( isClick ) { - if( st -> triggerContextMenu && !mods ) + if( st->triggerContextMenu && !mods ) {} // evt = TOOL_EVENT( TC_Command, TA_ContextMenu ); else @@ -197,7 +197,7 @@ bool TOOL_DISPATCHER::handleMouseButton ( wxEvent& aEvent, int aIndex, bool aMot } -void TOOL_DISPATCHER::DispatchWxEvent( wxEvent &aEvent ) +void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) { bool motion = false, buttonEvents = false; VECTOR2D pos; @@ -205,25 +205,42 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent &aEvent ) int type = aEvent.GetEventType(); - if( type == wxEVT_MOTION ) + // Mouse handling + if( type == wxEVT_MOTION || type == wxEVT_MOUSEWHEEL || + type == wxEVT_LEFT_DOWN || type == wxEVT_LEFT_UP || + type == wxEVT_MIDDLE_DOWN || type == wxEVT_MIDDLE_UP || + type == wxEVT_RIGHT_DOWN || type == wxEVT_RIGHT_UP ) { - wxMouseEvent *me = static_cast( &aEvent ); + wxMouseEvent* me = static_cast( &aEvent ); pos = getView()->ToWorld( VECTOR2D( me->GetX(), me->GetY() ) ); if( pos != m_lastMousePos ) { motion = true; m_lastMousePos = pos; } + + for( unsigned int i = 0; i < m_buttons.size(); i++ ) + buttonEvents |= handleMouseButton( aEvent, i, motion ); + + if( !buttonEvents && motion ) + { + evt = TOOL_EVENT( TC_Mouse, TA_MouseMotion ); + evt->SetMousePosition( pos ); + } } - for( unsigned int i = 0; i < m_buttons.size(); i++ ) - buttonEvents |= handleMouseButton( aEvent, i, motion ); + // Keyboard handling + else if( type == wxEVT_KEY_UP || type == wxEVT_KEY_DOWN ) + { + wxKeyEvent* ke = static_cast( &aEvent ); + int key = ke->GetKeyCode(); + int mods = decodeModifiers( ke ); - if( !buttonEvents && motion ) - { - evt = TOOL_EVENT (TC_Mouse, TA_MouseMotion ); - evt->SetMousePosition( pos ); - } + if( type == wxEVT_KEY_UP ) + evt = TOOL_EVENT( TC_Keyboard, TA_KeyUp, key | mods ); + else + evt = TOOL_EVENT( TC_Keyboard, TA_KeyDown, key | mods ); + } if( evt ) m_toolMgr->ProcessEvent( *evt ); @@ -237,7 +254,7 @@ void TOOL_DISPATCHER::DispatchWxCommand( wxCommandEvent &aEvent ) bool activateTool = false; std::string toolName; - switch ( aEvent.GetId() ) + switch( aEvent.GetId() ) { case ID_SELECTION_TOOL: toolName = "pcbnew.InteractiveSelection"; @@ -247,7 +264,7 @@ void TOOL_DISPATCHER::DispatchWxCommand( wxCommandEvent &aEvent ) if( activateTool ) { - TOOL_EVENT evt ( TC_Command, TA_ActivateTool, toolName ); + TOOL_EVENT evt( TC_Command, TA_ActivateTool, toolName ); m_toolMgr->ProcessEvent( evt ); } } diff --git a/common/tool/tool_event.cpp b/common/tool/tool_event.cpp index 3d03692b82..4c5a0c2f98 100644 --- a/common/tool/tool_event.cpp +++ b/common/tool/tool_event.cpp @@ -44,9 +44,13 @@ struct FlagString static const std::string flag2string( int flag, const FlagString* exps ) { std::string rv; - for(int i = 0; exps[i].str.length(); i++) - if(exps[i].flag & flag) - rv+=exps[i].str+" "; + + for( int i = 0; exps[i].str.length(); i++ ) + { + if( exps[i].flag & flag ) + rv += exps[i].str + " "; + } + return rv; } @@ -57,6 +61,7 @@ const std::string TOOL_EVENT::Format() const const FlagString categories[] = { { TC_Mouse, "mouse" }, + { TC_Keyboard, "keyboard" }, { TC_Command, "command" }, { TC_Message, "message" }, { TC_View, "view" }, @@ -70,6 +75,8 @@ const std::string TOOL_EVENT::Format() const { TA_MouseDrag, "drag" }, { TA_MouseMotion, "motion" }, { TA_MouseWheel, "wheel" }, + { TA_KeyUp, "key-up" }, + { TA_KeyDown, "key-down" }, { TA_ViewRefresh, "view-refresh" }, { TA_ViewZoom, "view-zoom" }, { TA_ViewPan, "view-pan" }, @@ -87,23 +94,40 @@ const std::string TOOL_EVENT::Format() const { MB_Left, "left" }, { MB_Right, "right" }, { MB_Middle, "middle" }, - { MB_ModShift, "shift" }, - { MB_ModCtrl, "ctrl" }, - { MB_ModAlt, "alt" }, { 0, "" } }; + const FlagString modifiers[] = { + { MD_ModShift, "shift" }, + { MD_ModCtrl, "ctrl" }, + { MD_ModAlt, "alt" }, + { 0, "" } + }; + ev = "category: "; ev += flag2string( m_category, categories ); - ev +=" action: "; + ev += " action: "; ev += flag2string( m_actions, actions ); if( m_actions & TA_Mouse ) { - ev +=" btns: "; + ev += " btns: "; ev += flag2string( m_mouseButtons, buttons ); - }; + } + + if( m_actions & TA_Keyboard ) + { + char tmp[128]; + sprintf( tmp, "key: %d", m_keyCode ); + ev += tmp; + } + if( m_actions & ( TA_Mouse | TA_Keyboard ) ) + { + ev += " mods: "; + ev += flag2string( m_modifiers, modifiers ); + } + if( m_commandId ) { char tmp[128]; diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 43727c376b..0076668238 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -53,11 +53,11 @@ WX_VIEW_CONTROLS::WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ) : } -void WX_VIEW_CONTROLS::onMotion( wxMouseEvent& event ) +void WX_VIEW_CONTROLS::onMotion( wxMouseEvent& aEvent ) { - if( event.Dragging() && m_isDragPanning ) + if( aEvent.Dragging() && m_isDragPanning ) { - VECTOR2D mousePoint( event.GetX(), event.GetY() ); + VECTOR2D mousePoint( aEvent.GetX(), aEvent.GetY() ); VECTOR2D d = m_dragStartPoint - mousePoint; VECTOR2D delta = m_view->ToWorld( d, false ); @@ -65,19 +65,19 @@ void WX_VIEW_CONTROLS::onMotion( wxMouseEvent& event ) m_parentPanel->Refresh(); } - event.Skip(); + aEvent.Skip(); } -void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& event ) +void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& aEvent ) { const double wheelPanSpeed = 0.001; - if( event.ControlDown() || event.ShiftDown() ) + if( aEvent.ControlDown() || aEvent.ShiftDown() ) { // Scrolling VECTOR2D scrollVec = m_view->ToWorld( m_view->GetScreenPixelSize() * - ( (double) event.GetWheelRotation() * wheelPanSpeed ), false ); + ( (double) aEvent.GetWheelRotation() * wheelPanSpeed ), false ); double scrollSpeed; if( abs( scrollVec.x ) > abs( scrollVec.y ) ) @@ -85,8 +85,8 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& event ) else scrollSpeed = scrollVec.y; - VECTOR2D delta( event.ControlDown() ? -scrollSpeed : 0.0, - event.ShiftDown() ? -scrollSpeed : 0.0 ); + VECTOR2D delta( aEvent.ControlDown() ? -scrollSpeed : 0.0, + aEvent.ShiftDown() ? -scrollSpeed : 0.0 ); m_view->SetCenter( m_view->GetCenter() + delta ); m_parentPanel->Refresh(); @@ -103,41 +103,41 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& event ) // Set scaling speed depending on scroll wheel event interval if( timeDiff < 500 && timeDiff > 0 ) { - zoomScale = ( event.GetWheelRotation() > 0.0 ) ? 2.05 - timeDiff / 500 : + zoomScale = ( aEvent.GetWheelRotation() > 0.0 ) ? 2.05 - timeDiff / 500 : 1.0 / ( 2.05 - timeDiff / 500 ); } else { - zoomScale = ( event.GetWheelRotation() > 0.0 ) ? 1.05 : 0.95; + zoomScale = ( aEvent.GetWheelRotation() > 0.0 ) ? 1.05 : 0.95; } - VECTOR2D anchor = m_view->ToWorld( VECTOR2D( event.GetX(), event.GetY() ) ); + VECTOR2D anchor = m_view->ToWorld( VECTOR2D( aEvent.GetX(), aEvent.GetY() ) ); m_view->SetScale( m_view->GetScale() * zoomScale, anchor ); m_parentPanel->Refresh(); } - event.Skip(); + aEvent.Skip(); } -void WX_VIEW_CONTROLS::onButton( wxMouseEvent& event ) +void WX_VIEW_CONTROLS::onButton( wxMouseEvent& aEvent ) { - if( event.MiddleDown() ) + if( aEvent.MiddleDown() ) { m_isDragPanning = true; - m_dragStartPoint = VECTOR2D( event.GetX(), event.GetY() ); + m_dragStartPoint = VECTOR2D( aEvent.GetX(), aEvent.GetY() ); m_lookStartPoint = m_view->GetCenter(); } - else if( event.MiddleUp() ) + else if( aEvent.MiddleUp() ) { m_isDragPanning = false; } - event.Skip(); + aEvent.Skip(); } -void WX_VIEW_CONTROLS::onEnter( wxMouseEvent& event ) +void WX_VIEW_CONTROLS::onEnter( wxMouseEvent& aEvent ) { m_parentPanel->SetFocus(); } diff --git a/include/class_drawpanel_gal.h b/include/class_drawpanel_gal.h index 9206c69338..542787fd0d 100644 --- a/include/class_drawpanel_gal.h +++ b/include/class_drawpanel_gal.h @@ -115,6 +115,7 @@ protected: void onPaint( wxPaintEvent& WXUNUSED( aEvent ) ); void onSize( wxSizeEvent& aEvent ); void onEvent( wxEvent& aEvent ); + void skipEvent( wxEvent& aEvent ); KiGfx::GAL* m_gal; ///< Interface for drawing objects on a 2D-surface KiGfx::VIEW* m_view; ///< Stores view settings (scale, center, etc.) diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 0c584049f1..f96f5fc766 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -285,7 +285,7 @@ private: wxPoint savedCursorPosition; ///< The last cursor position wxBitmap* cursorPixels; ///< Cursor pixels wxBitmap* cursorPixelsSaved; ///< Saved cursor pixels - int cursorSize; ///< Cursor size + int cursorSize; ///< Cursor size /// Maximum number of arguments for one command static const int MAX_CAIRO_ARGUMENTS = 6; diff --git a/include/tool/tool_dispatcher.h b/include/tool/tool_dispatcher.h index 2060b0d544..8072274dfe 100644 --- a/include/tool/tool_dispatcher.h +++ b/include/tool/tool_dispatcher.h @@ -30,6 +30,7 @@ #include #include +#include class TOOL_MANAGER; class PCB_BASE_FRAME; @@ -69,21 +70,18 @@ private: static const int DragTimeThreshold = 300; static const int DragDistanceThreshold = 8; - bool handleMouseButton ( wxEvent& aEvent, int aIndex, bool aMotion ); - bool handleKeys ( wxEvent& aEvent ); - bool handlePopupMenu ( wxEvent& aEvent ); + bool handleMouseButton( wxEvent& aEvent, int aIndex, bool aMotion ); + bool handlePopupMenu( wxEvent& aEvent ); - int decodeModifiers( wxEvent& aEvent ); - - KiGfx::VIEW* getView(); + int decodeModifiers( const wxKeyboardState* aState ) const; struct ButtonState; - - TOOL_MANAGER* m_toolMgr; - PCB_BASE_FRAME* m_editFrame; VECTOR2D m_lastMousePos; std::vector m_buttons; + KiGfx::VIEW* getView(); + TOOL_MANAGER* m_toolMgr; + PCB_BASE_FRAME* m_editFrame; }; #endif diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index 8a771a9297..cdaaa45408 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -40,32 +40,39 @@ class TOOL_MANAGER; */ enum TOOL_EventCategory { - TC_None = 0x0, - TC_Mouse = 0x1, - TC_Command = 0x2, - TC_Message = 0x4, - TC_View = 0x8, - TC_Any = 0xffffffff + TC_None = 0x00, + TC_Mouse = 0x01, + TC_Keyboard = 0x02, + TC_Command = 0x04, + TC_Message = 0x08, + TC_View = 0x10, + TC_Any = 0xffffffff }; enum TOOL_Actions { - TA_None = 0x0, - TA_MouseClick = 0x1, - TA_MouseUp = 0x2, - TA_MouseDown = 0x4, - TA_MouseDrag = 0x8, - TA_MouseMotion = 0x10, - TA_MouseWheel = 0x20, - TA_Mouse = 0x3f, - TA_ViewRefresh = 0x40, - TA_ViewZoom = 0x80, - TA_ViewPan = 0x100, - TA_ViewDirty = 0x200, - TA_ChangeLayer = 0x1000, + // UI input events + TA_None = 0x0000, + TA_MouseClick = 0x0001, + TA_MouseUp = 0x0002, + TA_MouseDown = 0x0004, + TA_MouseDrag = 0x0008, + TA_MouseMotion = 0x0010, + TA_MouseWheel = 0x0020, + TA_Mouse = 0x003f, + TA_KeyUp = 0x0040, + TA_KeyDown = 0x0080, + TA_Keyboard = TA_KeyUp | TA_KeyDown, + + // View related events + TA_ViewRefresh = 0x0100, + TA_ViewZoom = 0x0200, + TA_ViewPan = 0x0400, + TA_ViewDirty = 0x0800, + TA_ChangeLayer = 0x1000, // Tool cancel event. Issued automagically when the user hits escape or selects End Tool from the context menu. - TA_CancelTool = 0x2000, + TA_CancelTool = 0x2000, // Tool activation event. Issued by the GUI upon pressing a button/menu selection. TA_ActivateTool = 0x4000, @@ -81,25 +88,28 @@ enum TOOL_Actions enum TOOL_MouseButtons { - MB_None = 0x0, - MB_Left = 0x1, - MB_Right = 0x2, - MB_Middle = 0x4, - MB_ButtonMask = MB_Left | MB_Right | MB_Middle, - MB_ModShift = 0x8, - MB_ModCtrl = 0x10, - MB_ModAlt = 0x20, - MB_ModifierMask = MB_ModShift | MB_ModCtrl | MB_ModAlt, - MB_Any = 0xffffffff + MB_None = 0x0, + MB_Left = 0x1, + MB_Right = 0x2, + MB_Middle = 0x4, + MB_ButtonMask = MB_Left | MB_Right | MB_Middle, + MB_Any = 0xffffffff }; +enum TOOL_Modifiers +{ + MD_ModShift = 0x1000, + MD_ModCtrl = 0x2000, + MD_ModAlt = 0x4000, + MD_ModifierMask = MD_ModShift | MD_ModCtrl | MD_ModAlt, +}; // Defines when a context menu is opened. enum TOOL_ContextMenuTrigger { - CMENU_BUTTON = 0, // On the right button - CMENU_NOW, // Right now (after TOOL_INTERACTIVE::SetContextMenu) - CMENU_OFF // Never + CMENU_BUTTON = 0, // On the right button + CMENU_NOW, // Right now (after TOOL_INTERACTIVE::SetContextMenu) + CMENU_OFF // Never }; /** @@ -112,22 +122,38 @@ class TOOL_EVENT public: const std::string Format() const; - TOOL_EVENT( TOOL_EventCategory aCategory = TC_None, TOOL_Actions aAction = TA_None ): + TOOL_EVENT( TOOL_EventCategory aCategory = TC_None, TOOL_Actions aAction = TA_None ) : m_category( aCategory ), m_actions( aAction ), - m_mouseButtons( 0 ) {} + m_mouseButtons( 0 ), + m_keyCode( 0 ), + m_modifiers( 0 ) {} - TOOL_EVENT( TOOL_EventCategory aCategory, TOOL_Actions aAction, int aExtraParam ): + TOOL_EVENT( TOOL_EventCategory aCategory, TOOL_Actions aAction, int aExtraParam ) : m_category( aCategory ), m_actions( aAction ) { if( aCategory == TC_Mouse ) - m_mouseButtons = aExtraParam; + { + m_mouseButtons = aExtraParam & MB_ButtonMask; + } + else if( aCategory == TC_Keyboard ) + { + m_keyCode = aExtraParam & ~MD_ModifierMask; // Filter out modifiers + } else if ( aCategory == TC_Command ) + { m_commandId = aExtraParam; + } + + if( aCategory & ( TC_Mouse | TC_Keyboard ) ) + { + m_modifiers = aExtraParam & MD_ModifierMask; + } } - TOOL_EVENT( TOOL_EventCategory aCategory, TOOL_Actions aAction, const std::string& aExtraParam ): + TOOL_EVENT( TOOL_EventCategory aCategory, TOOL_Actions aAction, + const std::string& aExtraParam ) : m_category( aCategory ), m_actions( aAction ), m_mouseButtons( 0 ) @@ -193,9 +219,14 @@ public: return m_actions == TA_CancelTool; } - bool Modifier( int aMask = MB_ModifierMask ) const + bool Modifier( int aMask = MD_ModifierMask ) const { - return ( m_mouseButtons & aMask ); + return ( m_modifiers & aMask ); + } + + int KeyCode() const + { + return m_keyCode; } void Ignore(); @@ -250,6 +281,8 @@ private: VECTOR2D m_mouseDragOrigin; int m_mouseButtons; + int m_keyCode; + int m_modifiers; boost::optional m_commandId; boost::optional m_commandStr; }; @@ -299,12 +332,12 @@ public: return m_events.end(); } - const_iterator cbegin() const + const_iterator cbegin() const { return m_events.begin(); } - const_iterator cend() const + const_iterator cend() const { return m_events.end(); } @@ -354,7 +387,7 @@ private: std::deque m_events; }; -inline const TOOL_EVENT_LIST operator||( const TOOL_EVENT& a, const TOOL_EVENT &b ) +inline const TOOL_EVENT_LIST operator||( const TOOL_EVENT& a, const TOOL_EVENT& b ) { TOOL_EVENT_LIST l; @@ -364,7 +397,7 @@ inline const TOOL_EVENT_LIST operator||( const TOOL_EVENT& a, const TOOL_EVENT & return l; } -inline const TOOL_EVENT_LIST operator||( const TOOL_EVENT & a, const TOOL_EVENT_LIST &b ) +inline const TOOL_EVENT_LIST operator||( const TOOL_EVENT& a, const TOOL_EVENT_LIST& b ) { TOOL_EVENT_LIST l( b ); diff --git a/include/view/wx_view_controls.h b/include/view/wx_view_controls.h index 8e7400df67..149a0eb310 100644 --- a/include/view/wx_view_controls.h +++ b/include/view/wx_view_controls.h @@ -52,10 +52,10 @@ public: WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ); ~WX_VIEW_CONTROLS() {}; - void onWheel( wxMouseEvent& event ); - void onMotion( wxMouseEvent& event ); - void onButton( wxMouseEvent& event ); - void onEnter( wxMouseEvent& event ); + void onWheel( wxMouseEvent& aEvent ); + void onMotion( wxMouseEvent& aEvent ); + void onButton( wxMouseEvent& aEvent ); + void onEnter( wxMouseEvent& aEvent ); void SetEventDispatcher( TOOL_DISPATCHER *aEventDispatcher ); diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 14e1b0e403..a7ac0c682d 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -69,7 +69,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { - m_additive = evt->Modifier( MB_ModShift ); + m_additive = evt->Modifier( MD_ModShift ); if( evt->IsCancel() ) return 0; From 166879a1c884d45b35a92a19cefdec1e0ccd7f0e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 22 Aug 2013 15:04:14 +0200 Subject: [PATCH 239/415] Mark layers as dirty on VIEW_ITEM removal. --- common/view/view.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/common/view/view.cpp b/common/view/view.cpp index 83bd16dfac..4c2a0aa9e0 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -108,6 +108,7 @@ void VIEW::Remove( VIEW_ITEM* aItem ) { VIEW_LAYER* l = & ( ( *i ).second ); l->items->Remove( aItem ); + l->isDirty = true; } } From 68125a7f50eb5eeea886c3bcabc358f44c2d95be Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 22 Aug 2013 15:05:37 +0200 Subject: [PATCH 240/415] Changed reaction of SELECTION_TOOL to ToolCancel event (first event clears selection, second one deactivates the tool). --- pcbnew/tools/selection_tool.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index a7ac0c682d..797225b3ca 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -72,7 +72,12 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) m_additive = evt->Modifier( MD_ModShift ); if( evt->IsCancel() ) - return 0; + { + if( !m_selectedItems.empty() ) + clearSelection(); + else + return 0; + } // single click? Select single object if( evt->IsClick( MB_Left ) ) @@ -242,7 +247,7 @@ void SELECTION_TOOL::selectMultiple() } -BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR *aCollector ) +BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) { OPT_TOOL_EVENT evt; BOARD_ITEM* current = NULL; From 7fe85b44f9b215e32ca5dc1b6948b04bd858ff4c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 22 Aug 2013 15:07:34 +0200 Subject: [PATCH 241/415] Modified InvokeTool(), so besides resetting the tool, it also send an ActivateTool event. Added generation of CancelTool event upon ESC key press. Minor bugfix. --- common/tool/tool_dispatcher.cpp | 14 +++++++++----- common/tool/tool_manager.cpp | 15 ++++++++++++--- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index ddf168fba0..fd276d4129 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -237,9 +237,16 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) int mods = decodeModifiers( ke ); if( type == wxEVT_KEY_UP ) - evt = TOOL_EVENT( TC_Keyboard, TA_KeyUp, key | mods ); + { + if( key == WXK_ESCAPE ) + evt = TOOL_EVENT( TC_Command, TA_CancelTool ); + else + evt = TOOL_EVENT( TC_Keyboard, TA_KeyUp, key | mods ); + } else + { evt = TOOL_EVENT( TC_Keyboard, TA_KeyDown, key | mods ); + } } if( evt ) @@ -263,8 +270,5 @@ void TOOL_DISPATCHER::DispatchWxCommand( wxCommandEvent &aEvent ) } if( activateTool ) - { - TOOL_EVENT evt( TC_Command, TA_ActivateTool, toolName ); - m_toolMgr->ProcessEvent( evt ); - } + m_toolMgr->InvokeTool( toolName ); } diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 86104e492b..1315d083a8 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -98,6 +98,9 @@ void TOOL_MANAGER::InvokeTool( TOOL_ID aToolId ) if( tool && tool->GetType() == TOOL_Interactive ) static_cast( tool )->Reset(); + + TOOL_EVENT evt( TC_Command, TA_ActivateTool, tool->GetName() ); + ProcessEvent( evt ); } @@ -105,8 +108,8 @@ void TOOL_MANAGER::InvokeTool( const std::string& aName ) { TOOL_BASE* tool = FindTool( aName ); - if( tool && tool->GetType() == TOOL_Interactive ) - static_cast( tool )->Reset(); + if( tool ) + InvokeTool( tool->GetId() ); } @@ -169,7 +172,10 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) st->waitEvents.clear(); st->cofunc->Resume(); if( !st->cofunc->Running() ) + { delete st->cofunc; + st->cofunc = NULL; + } } } else @@ -194,7 +200,10 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) st->cofunc->Call( aEvent ); if( !st->cofunc->Running() ) + { delete st->cofunc; + st->cofunc = NULL; + } } } } @@ -218,7 +227,7 @@ bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) st->contextMenuTrigger = CMENU_OFF; GetEditFrame()->PopupMenu( st->contextMenu->GetMenu() ); - TOOL_EVENT evt ( TC_Command, TA_ContextMenuChoice ); + TOOL_EVENT evt( TC_Command, TA_ContextMenuChoice ); dispatchInternal( evt ); break; From 37d98063f0522fc4d3f9d1b0df5f1e35e00fd1e0 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 22 Aug 2013 18:42:53 +0200 Subject: [PATCH 242/415] Added autopanning functionality to WX_VIEW_CONTROLS. --- common/view/wx_view_controls.cpp | 153 +++++++++++++++++++++++++++---- include/view/view_controls.h | 17 ---- include/view/wx_view_controls.h | 43 +++++++-- 3 files changed, 170 insertions(+), 43 deletions(-) diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 0076668238..7b0dfb1d4d 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -24,7 +24,6 @@ */ #include -#include #include #include @@ -33,9 +32,11 @@ using namespace KiGfx; WX_VIEW_CONTROLS::WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ) : VIEW_CONTROLS( aView ), + m_state( IDLE ), + m_autoPanEnabled( false ), + m_grabMouse( false ), m_autoPanMargin( 0.1 ), m_autoPanSpeed( 0.15 ), - m_autoPanCornerRatio( 0.1 ), m_parentPanel( aParentPanel ) { m_parentPanel->Connect( wxEVT_MOTION, wxMouseEventHandler( @@ -50,22 +51,40 @@ WX_VIEW_CONTROLS::WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ) : m_parentPanel->Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( WX_VIEW_CONTROLS::onEnter ), NULL, this ); #endif + + m_panTimer.SetOwner( this ); + this->Connect( wxEVT_TIMER, wxTimerEventHandler( + WX_VIEW_CONTROLS::onTimer ), NULL, this ); } void WX_VIEW_CONTROLS::onMotion( wxMouseEvent& aEvent ) { - if( aEvent.Dragging() && m_isDragPanning ) - { - VECTOR2D mousePoint( aEvent.GetX(), aEvent.GetY() ); - VECTOR2D d = m_dragStartPoint - mousePoint; - VECTOR2D delta = m_view->ToWorld( d, false ); + VECTOR2D mousePoint( aEvent.GetX(), aEvent.GetY() ); - m_view->SetCenter( m_lookStartPoint + delta ); - m_parentPanel->Refresh(); + if( aEvent.Dragging() ) + { + if( m_state == DRAG_PANNING ) + { + VECTOR2D d = m_dragStartPoint - mousePoint; + VECTOR2D delta = m_view->ToWorld( d, false ); + + m_view->SetCenter( m_lookStartPoint + delta ); + m_parentPanel->Refresh(); + aEvent.StopPropagation(); + } + else + { + aEvent.Skip(); + } + } + else + { + if( m_autoPanEnabled ) + handleAutoPanning( aEvent ); } - aEvent.Skip(); +// DeletePendingEvents(); } @@ -122,16 +141,25 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& aEvent ) void WX_VIEW_CONTROLS::onButton( wxMouseEvent& aEvent ) { - if( aEvent.MiddleDown() ) + switch( m_state ) { - m_isDragPanning = true; - m_dragStartPoint = VECTOR2D( aEvent.GetX(), aEvent.GetY() ); - m_lookStartPoint = m_view->GetCenter(); - } - else if( aEvent.MiddleUp() ) - { - m_isDragPanning = false; - } + case IDLE: + case AUTO_PANNING: + if( aEvent.MiddleDown() ) + { + m_dragStartPoint = VECTOR2D( aEvent.GetX(), aEvent.GetY() ); + m_lookStartPoint = m_view->GetCenter(); + m_state = DRAG_PANNING; + } + break; + + case DRAG_PANNING: + if( aEvent.MiddleUp() ) + { + m_state = IDLE; + } + break; + }; aEvent.Skip(); } @@ -141,3 +169,90 @@ void WX_VIEW_CONTROLS::onEnter( wxMouseEvent& aEvent ) { m_parentPanel->SetFocus(); } + + +void WX_VIEW_CONTROLS::onTimer( wxTimerEvent& aEvent ) +{ + switch( m_state ) + { + case AUTO_PANNING: + { + double borderSize = std::min( m_autoPanMargin * m_view->GetScreenPixelSize().x, + m_autoPanMargin * m_view->GetScreenPixelSize().y ); + + VECTOR2D dir( m_panDirection ); + + if( dir.EuclideanNorm() > borderSize ) + dir = dir.Resize( borderSize ); + + dir = m_view->ToWorld( dir, false ); + +// wxLogDebug( "AutoPanningTimer: dir %.4f %.4f sped %.4f", dir.x, dir.y, m_autoPanSpeed ); + + m_view->SetCenter( m_view->GetCenter() + dir * m_autoPanSpeed ); + + wxPaintEvent redrawEvent; + wxPostEvent( m_parentPanel, redrawEvent ); + } + break; + } + + DeletePendingEvents(); + m_panTimer.DeletePendingEvents(); +} + + +void WX_VIEW_CONTROLS::SetGrabMouse( bool aEnabled ) +{ + m_grabMouse = aEnabled; + + if( aEnabled ) + m_parentPanel->CaptureMouse(); + else + m_parentPanel->ReleaseMouse(); +} + + +void WX_VIEW_CONTROLS::handleAutoPanning( wxMouseEvent& aEvent ) +{ + VECTOR2D p( aEvent.GetX(), aEvent.GetY() ); + + // Compute areas where autopanning is active + double borderStart = std::min( m_autoPanMargin * m_view->GetScreenPixelSize().x, + m_autoPanMargin * m_view->GetScreenPixelSize().y ); + double borderEndX = m_view->GetScreenPixelSize().x - borderStart; + double borderEndY = m_view->GetScreenPixelSize().y - borderStart; + + m_panDirection = VECTOR2D(); + + if( p.x < borderStart ) + m_panDirection.x = -( borderStart - p.x ); + else if( p.x > borderEndX ) + m_panDirection.x = ( p.x - borderEndX ); + + if( p.y < borderStart ) + m_panDirection.y = -( borderStart - p.y ); + else if( p.y > borderEndY ) + m_panDirection.y = ( p.y - borderEndY ); + + bool borderHit = ( m_panDirection.x != 0 || m_panDirection.y != 0 ); + + switch( m_state ) + { + case AUTO_PANNING: + if( !borderHit ) + { + m_panTimer.Stop(); + m_state = IDLE; + } + break; + + case IDLE: + if( borderHit ) + { + m_state = AUTO_PANNING; + m_panTimer.Start( (int) ( 1000.0 / 60.0 ) ); + } + break; + } +} diff --git a/include/view/view_controls.h b/include/view/view_controls.h index 9e399d3282..0774d7ef69 100644 --- a/include/view/view_controls.h +++ b/include/view/view_controls.h @@ -46,16 +46,6 @@ class VIEW; class VIEW_CONTROLS { public: - /** - * Possible modes for panning (JUMP means that view is updated less often, resulting in - * not so responsive user interface). - */ - enum PanMode { - SMOOTH = 1, - JUMP = 2 - }; - - VIEW_CONTROLS( VIEW* aView ) : m_view( aView ) {}; virtual ~VIEW_CONTROLS() {}; @@ -89,13 +79,6 @@ public: */ virtual void SetPanSpeed( float aSpeed ) {}; - /** - * Function SetPanMode - * Enables specified mode for panning. - * @param aMode is a new mode used for VIEW panning. - */ - virtual void SetPanMode( PanMode aMode ) {}; - /** * Function SetZoomSpeed * Determines how much zoom factor should be affected on one zoom event (eg. mouse wheel). diff --git a/include/view/wx_view_controls.h b/include/view/wx_view_controls.h index 149a0eb310..ca2d9b679d 100644 --- a/include/view/wx_view_controls.h +++ b/include/view/wx_view_controls.h @@ -52,27 +52,55 @@ public: WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ); ~WX_VIEW_CONTROLS() {}; + /// Handler functions void onWheel( wxMouseEvent& aEvent ); void onMotion( wxMouseEvent& aEvent ); void onButton( wxMouseEvent& aEvent ); void onEnter( wxMouseEvent& aEvent ); + void onTimer( wxTimerEvent& aEvent ); - void SetEventDispatcher( TOOL_DISPATCHER *aEventDispatcher ); + /** + * Function SetGrabMouse() + * Enables/disables mouse cursor grabbing (limits the movement field only to the panel area). + * + * @param aEnabled says whether the option should enabled or disabled. + */ + void SetGrabMouse( bool aEnabled ); + + /** + * Function SetAutoPan() + * Enables/disables autopanning (panning when mouse cursor reaches the panel border). + * + * @param aEnabled says whether the option should enabled or disabled. + */ + void SetAutoPan( bool aEnabled ) + { + m_autoPanEnabled = true; + } private: + enum State { + IDLE = 1, + DRAG_PANNING, + AUTO_PANNING, + }; + + void handleAutoPanning( wxMouseEvent& aEvent ); + + /// Current state of VIEW_CONTROLS + State m_state; /// Options for WX_VIEW_CONTROLS - bool m_isDragPanning; - bool m_isAutoPanning; bool m_autoPanEnabled; bool m_needRedraw; + bool m_grabMouse; /// Distance from cursor to VIEW edge when panning is active. - double m_autoPanMargin; + float m_autoPanMargin; /// How fast is panning when in auto mode. - double m_autoPanSpeed; + float m_autoPanSpeed; /// TODO - double m_autoPanCornerRatio; + float m_autoPanAcceleration; /// Panel that is affected by VIEW_CONTROLS wxWindow* m_parentPanel; @@ -80,10 +108,11 @@ private: /// Stores information about point where event started. VECTOR2D m_dragStartPoint; VECTOR2D m_lookStartPoint; + VECTOR2D m_panDirection; /// Used for determining time intervals between events. wxLongLong m_timeStamp; - TOOL_DISPATCHER* m_eventDispatcher; + wxTimer m_panTimer; }; } // namespace KiGfx From 7a74418c397fa85e72e8a477519002ccd6715bb4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 23 Aug 2013 10:56:52 +0200 Subject: [PATCH 243/415] Removed some unnecessary stuff and added some comments to WX_VIEW_CONTROLS. --- common/view/wx_view_controls.cpp | 10 +--------- include/view/wx_view_controls.h | 25 ++++++++++++++----------- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 7b0dfb1d4d..ad37050336 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -33,8 +33,8 @@ using namespace KiGfx; WX_VIEW_CONTROLS::WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ) : VIEW_CONTROLS( aView ), m_state( IDLE ), - m_autoPanEnabled( false ), m_grabMouse( false ), + m_autoPanEnabled( false ), m_autoPanMargin( 0.1 ), m_autoPanSpeed( 0.15 ), m_parentPanel( aParentPanel ) @@ -83,8 +83,6 @@ void WX_VIEW_CONTROLS::onMotion( wxMouseEvent& aEvent ) if( m_autoPanEnabled ) handleAutoPanning( aEvent ); } - -// DeletePendingEvents(); } @@ -186,9 +184,6 @@ void WX_VIEW_CONTROLS::onTimer( wxTimerEvent& aEvent ) dir = dir.Resize( borderSize ); dir = m_view->ToWorld( dir, false ); - -// wxLogDebug( "AutoPanningTimer: dir %.4f %.4f sped %.4f", dir.x, dir.y, m_autoPanSpeed ); - m_view->SetCenter( m_view->GetCenter() + dir * m_autoPanSpeed ); wxPaintEvent redrawEvent; @@ -196,9 +191,6 @@ void WX_VIEW_CONTROLS::onTimer( wxTimerEvent& aEvent ) } break; } - - DeletePendingEvents(); - m_panTimer.DeletePendingEvents(); } diff --git a/include/view/wx_view_controls.h b/include/view/wx_view_controls.h index ca2d9b679d..bbd55f3856 100644 --- a/include/view/wx_view_controls.h +++ b/include/view/wx_view_controls.h @@ -37,7 +37,6 @@ #include class EDA_DRAW_PANEL_GAL; -class TOOL_DISPATCHER; namespace KiGfx { @@ -48,7 +47,6 @@ namespace KiGfx class WX_VIEW_CONTROLS : public VIEW_CONTROLS, public wxEvtHandler { public: - WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ); ~WX_VIEW_CONTROLS() {}; @@ -85,33 +83,38 @@ private: AUTO_PANNING, }; + /// Computes new viewport settings while in autopanning mode void handleAutoPanning( wxMouseEvent& aEvent ); /// Current state of VIEW_CONTROLS State m_state; - /// Options for WX_VIEW_CONTROLS - bool m_autoPanEnabled; - bool m_needRedraw; + /// Flag for grabbing the mouse cursor bool m_grabMouse; + /// Flag for turning on autopanning + bool m_autoPanEnabled; - /// Distance from cursor to VIEW edge when panning is active. + /// Distance from cursor to VIEW edge when panning is active float m_autoPanMargin; - /// How fast is panning when in auto mode. + /// How fast is panning when in auto mode float m_autoPanSpeed; - /// TODO - float m_autoPanAcceleration; /// Panel that is affected by VIEW_CONTROLS wxWindow* m_parentPanel; - /// Stores information about point where event started. + /// Stores information about point where dragging has started VECTOR2D m_dragStartPoint; + + /// Stores information about the center of viewport when dragging has started VECTOR2D m_lookStartPoint; + + /// Current direction of panning (only autopanning mode) VECTOR2D m_panDirection; - /// Used for determining time intervals between events. + /// Used for determining time intervals between scroll & zoom events wxLongLong m_timeStamp; + + /// Timer repsonsible for handling autopanning wxTimer m_panTimer; }; } // namespace KiGfx From eca53baf6fad4770b6cf4b08fc2a14f9a10e1122 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 26 Aug 2013 10:43:22 +0200 Subject: [PATCH 244/415] Fixed linking errors for apps other than pcbnew. --- common/drawpanel_gal.cpp | 4 ++++ common/view/view.cpp | 33 ++++++++++++++++++--------------- include/view/view.h | 22 ++++++++++++++-------- 3 files changed, 36 insertions(+), 23 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 678994b788..4bc6a0103d 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -143,6 +143,10 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) m_gal->SetBackgroundColor( KiGfx::COLOR4D( 0.0, 0.0, 0.0, 1.0 ) ); m_gal->ClearScreen(); + m_view->PrepareTargets(); + // Grid has to be redrawn only when the NONCACHED target is redrawn + if( m_view->IsTargetDirty( KiGfx::TARGET_NONCACHED ) ) + m_gal->DrawGrid(); m_view->Redraw(); m_gal->EndDrawing(); diff --git a/common/view/view.cpp b/common/view/view.cpp index 4c2a0aa9e0..290d51c92c 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -546,7 +546,7 @@ void VIEW::redrawRect( const BOX2I& aRect ) { BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers ) { - if( l->enabled && isTargetDirty( l->target ) && areRequiredLayersEnabled( l->id ) ) + if( l->enabled && IsTargetDirty( l->target ) && areRequiredLayersEnabled( l->id ) ) { drawItem drawFunc( this, l ); @@ -622,7 +622,7 @@ bool VIEW::IsDirty() const { for( int i = 0; i < TARGETS_NUMBER; ++i ) { - if( isTargetDirty( i ) ) + if( IsTargetDirty( i ) ) return true; } @@ -695,14 +695,9 @@ void VIEW::Clear() } -void VIEW::Redraw() +void VIEW::PrepareTargets() { - VECTOR2D screenSize = m_gal->GetScreenPixelSize(); - BOX2I rect( ToWorld( VECTOR2D( 0, 0 ) ), - ToWorld( screenSize ) - ToWorld( VECTOR2D( 0, 0 ) ) ); - rect.Normalize(); - - if( isTargetDirty( TARGET_CACHED ) || isTargetDirty( TARGET_NONCACHED ) ) + if( IsTargetDirty( TARGET_CACHED ) || IsTargetDirty( TARGET_NONCACHED ) ) { // TARGET_CACHED and TARGET_NONCACHED have to be redrawn together, as they contain // layers that rely on each other (eg. netnames are noncached, but tracks - are cached) @@ -711,13 +706,21 @@ void VIEW::Redraw() MarkTargetDirty( TARGET_NONCACHED ); MarkTargetDirty( TARGET_CACHED ); - - m_gal->DrawGrid(); } - // Always refresh the overlay - MarkTargetDirty( TARGET_OVERLAY ); - m_gal->ClearTarget( TARGET_OVERLAY ); + if( IsTargetDirty( TARGET_OVERLAY ) ) + { + m_gal->ClearTarget( TARGET_OVERLAY ); + } +} + + +void VIEW::Redraw() +{ + VECTOR2D screenSize = m_gal->GetScreenPixelSize(); + BOX2I rect( ToWorld( VECTOR2D( 0, 0 ) ), + ToWorld( screenSize ) - ToWorld( VECTOR2D( 0, 0 ) ) ); + rect.Normalize(); redrawRect( rect ); @@ -892,7 +895,7 @@ void VIEW::RecacheAllItems( bool aImmediately ) } -bool VIEW::isTargetDirty( int aTarget ) const +bool VIEW::IsTargetDirty( int aTarget ) const { wxASSERT( aTarget < TARGETS_NUMBER ); diff --git a/include/view/view.h b/include/view/view.h index 89155099df..3fd1935db6 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -362,6 +362,12 @@ public: */ void UpdateAllLayersOrder(); + /** + * Function PrepareTargets() + * Clears targets that are marked as dirty. + */ + void PrepareTargets(); + /** * Function Redraw() * Immediately redraws the whole view. @@ -397,6 +403,14 @@ public: */ bool IsDirty() const; + /** + * Function IsTargetDirty() + * Returns true if any of layers belonging to the target or the target itself should be + * redrawn. + * @return True if the above condition is fulfilled. + */ + bool IsTargetDirty( int aTarget ) const; + /** * Function MarkTargetDirty() * Sets or clears target 'dirty' flag. @@ -516,14 +530,6 @@ private: return ( m_layers.at( aLayer ).target == TARGET_CACHED ); } - /** - * Function isTargetDirty() - * Returns true if any of layers belonging to the target or the target itself should be - * redrawn. - * @return True if the above condition is fulfilled. - */ - bool isTargetDirty( int aTarget ) const; - ///* Whether to use rendering order modifier or not bool m_enableOrderModifier; From 8597d2c68165f60cee39db002a27fe5e7fb7248e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 26 Aug 2013 14:08:32 +0200 Subject: [PATCH 245/415] Fixed the 64 bit build. --- include/tool/coroutine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tool/coroutine.h b/include/tool/coroutine.h index 719c4dccd8..ddd460cc1f 100644 --- a/include/tool/coroutine.h +++ b/include/tool/coroutine.h @@ -135,7 +135,7 @@ public: m_stack = malloc( c_defaultStackSize ); // align to 16 bytes - void *sp = (void *) ( ( ( (ptrdiff_t) m_stack ) + m_stackSize - 0xf ) & 0xfffffff0 ); + void *sp = (void *) ( ( ( (ptrdiff_t) m_stack ) + m_stackSize - 0xf ) & ( ~0x0f ) ); m_args = &args; m_self = boost::context::make_fcontext( sp, m_stackSize, callerStub ); From 0a17e9a2363a477b0f90921263d1317343e8523f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 26 Aug 2013 14:23:17 +0200 Subject: [PATCH 246/415] Fix for wxWidgets 2.9.5 --- common/drawpanel.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/drawpanel.cpp b/common/drawpanel.cpp index 8c96634191..35885cf643 100644 --- a/common/drawpanel.cpp +++ b/common/drawpanel.cpp @@ -85,10 +85,17 @@ END_EVENT_TABLE() EDA_DRAW_PANEL::EDA_DRAW_PANEL( EDA_DRAW_FRAME* parent, int id, const wxPoint& pos, const wxSize& size ) : +#if wxCHECK_VERSION( 2, 9, 5 ) + wxScrolledWindow( parent, id, pos, size, wxBORDER | wxHSCROLL | wxVSCROLL ) +#else wxScrolledWindow( parent, id, pos, size, wxBORDER | wxHSCROLL | wxVSCROLL | wxALWAYS_SHOW_SB ) +#endif { wxASSERT( parent ); +#if wxCHECK_VERSION( 2, 9, 5 ) + ShowScrollbars( wxSHOW_SB_ALWAYS, wxSHOW_SB_ALWAYS ); +#endif m_scrollIncrementX = std::min( size.x / 8, 10 ); m_scrollIncrementY = std::min( size.y / 8, 10 ); From 96774bb98c2bd00c73a5ee59c352bad879baa231 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 27 Aug 2013 10:14:26 +0200 Subject: [PATCH 247/415] Added missing Mac OS X icons for the pagelayout_editor. --- pagelayout_editor/pl_editor.icns | Bin 0 -> 12539 bytes pagelayout_editor/pl_editor_doc.icns | Bin 0 -> 55232 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 pagelayout_editor/pl_editor.icns create mode 100644 pagelayout_editor/pl_editor_doc.icns diff --git a/pagelayout_editor/pl_editor.icns b/pagelayout_editor/pl_editor.icns new file mode 100644 index 0000000000000000000000000000000000000000..c84b0a172eacb81c64f5aa2d6de389d056b521b9 GIT binary patch literal 12539 zcmeI1cUV-%`o|a0m_&^&YBVOfDPEJ@B#N3~H)@w568?wy?dIb7#)(0?IG}-sZwM zA4_iwnoJ~o(Z`EkwD!VSez0x-=o>GLn#Fb820cdr6l^C_qAxl65tgb=$ONZeMExK zVvqn^%d)|yj=1FK6HrD436PITK&(ZpOg1(FZ&);=j^AwftR9u%6>p+R=52k~w|<(8 zs_^JZIR6%=%;Vepw{G92`1w+Nye#V)YMU&A^YaR_pQION23!ujI3&2zPd;ZAgqB(4 z=A0>H@_83p}nT`m!<%ub)WVt?rH)sgx8 z`}*I*+0YC%^A{=y3LBGy=X*A3=g$nSEzFDeyX3E(zjyebk;Q}5u$#L1V+)|;@pJQU zC@6n2X8vj!11x}6sr1yC1pw#oyk^5^b=vu#?yfN1^m&qQ{^o7TF`Ku9-1hbLyL-pa z-}_AEEyoAee-;%M=Otv7JPrKacVC0TzTfe;BNVjoa7ON#e71yhnMMu1myI?*Y)U&` z0p@Stc=6E5U0xN34qIdI|1y66kN^A+OZ$EMf4{WmtThg2@H(pdQ=&0ABOFfmh=O$* zjGHp%8C9akaZ^U)C@45GHjb)M{+DCppo#A1o>8^>`DdW`U;eYQfg8f~MTRk68=?)Xju}1o8i21O)xIj#FYxr zmqOf~lhOWwQdyRnm8Feq>&ww9%Z!RDZbxW!zt_F`s`S)!O?^#Vj=H8CzNlVRQ zx4VYbG~{aP3$^vpQy2ErB0~L%CB2z6w1P;jY0H5P@HGMn>i2>91<&XMW(r1eJ*vzl zC$Z3xxJ-=Zy!V6YQnPcWgKA#;)6!N>X29b+AT9*;5s4Gp^ZDj|E50>eQjW?b?B?wF z%x5`|Q=K>Ug18XOP;tQc$SRY~GlEcsS|MV0)#PQ@CkA10flw?$uP@oZVU_93lc-XS z0s(iRyR|pP9mEAZfsl_zF4}MU)s7|WcrcEtlu{vYSYG7myr~Dod8+0wUjKgYms`Gi zzX??!>UU98tx|v?S7-!0G4I>u`&Vw5k)HQ&rm2W`S0ozXd(CcF4_x=4`r(+oE?8{r!W1b87qG)I7z zf}wWuyZbpqe6Q6v2zW99ah^+b1R3t+bPsa-OYAc~~DC2B@#O*V2U&>SeB=t`w;_QdKr6mr7|hb@i%B59f89-@eWl zaEHazOFZGlU3>TJ`FUF!DwQ}NK4HzSb0=)-%o~)lhKEJe%RFJI=WTCq%8gpJRF)G% zO^|}=ZEWN-hFEO2Fzzx(s3xKB$Yt=IpyfA+>xvolAqJDlkG;s|rawmF-%ChHj_+0# zQj-$0{6M@yFwEl%1oGtTVzGmnCEjAO)zK>Sk)tcg?e|+mlWUY)US43MC)radf7lZo zW?r}V47fog5y>`g!56HE=2I-sn44RX&KOvn##~o;K6e9s$iS^f zb#A50B{I3zt)lE4raIjzKGwj>cF=Mc%qf z?F{uPFUr8&IwmehtB;32bP935($IG&sHQj-x^*-T-AXRSKAr_9a>mal%Soy&20-<1H zyY>o!UDeHBOypKzcfN%8?TU%q%ALfmJpwlB`?nX|I$z_~9-gRn(^lx#_d9@F<%oiy zoUc-8?Ap!amDGiquKi|C1}X<;b$Db&Rm2yi=%)WPnWR0 zgV8f|4(bLJe}eN-ym`NrH&x}M!6Z0gDzl(C10Wge@!LT588ODpSNb5W@@ghck{fqiUa zlYq%!53{A9eGxFMfkKX;t5s+PG%Ry~!DKPTH&?QGiILIKF)^`^qdU<*?Va&%wl{%c zg&g=s)xH}ckznLg82nWyAsc2)$`^ali2 z7w9pqTb|Fun(&0D%nqN3imDvFroD45o1WdKs`7bU`AnZ_51J{NC3UF0@NQzCe$xWP z=9IOui^Ah3G;QF;;^4q&LPQ%hB+Jpu^=zG+Rdc|MG_BOB7KPv2!9wlIpGm!93DYt5gq)TH}-bhMB5$>SNg37 zeznB_yPkQ^V5diyLhiMWBg~0UN=i<7(xH$@ijq<@q|mSYJxep>e3s06El=D3q!O4w_`BlUkf`0W{H|kfw zcIejY(-x&-}x+RD=UfYz;6HsH8SjhwQmL)H!FDe*Ms20Unqj7T^aoTf`_T;YPG0St`HA5 zp9{)zn@BZ7T^5rTmn2}f7utkmyN;2G$2K-|D5`HrR216T)SP4+_0&bbZnjFLeAvKL zvice$s*2kmIZ!7M&QYnZ-LGM=`uf=ock^g8igOZaOp{~gF<13ucSw9`dOeHT7Ftlq zttYyt67@^xb!_pXRQze5-Px5MSdzeHmtXbGaMq_?s8otJU%lD*#5XKDrRaWVWm2n* zQE)jZi!iDdjtt@*rE>qeN8Ajr#}8dBqPpny8C5E2f8v!;aCf20JxIPTU5k|db9b3} zU5WG$FnhmP$fgzKt5xEz2&bs02<{8byMiwZ>cPuWC~9YK+xhdVEk5Da>u)N=oWANb zv05phJs?vNoYQl9_;MA)i;UMES+`>CahvadRx9NKc3VzdQX!q&5b2YI!(n=CF^DDD zVoXg-Ga)Xot2E<&8m8xJ^qL7c%s2h@`{gUQu3a*_ z1>6=KR?0=30a|roR!VAhVQpY0=wJY=pq+8n>>qyIv%+}O=1*okg7;2fNJ7p~M`KlK zVL@f3168Nj%vjntZ_UPoYmC?L_fX=K0m#kyk~R;)4oYL*EeC<#D`sF$eJYMl)0 zf5&@U&9<-j`n%N&7O)gh=M0Vx3pJ8qI7B{q-VcX&Enm51{rfYk5KKZ+6SNXKl<*2> z?fBuRmByR4{Cx%mJ980KZfZ>%K)~Vl&R@0m@H*plJHME@TMq6}2ugy=Rs9au37rj^ zco^bxatl})E9ZW|2P+FIh$^Cb0jB5&3g$CTchZ@aTi3iht3@h9FvSg(rV9`s?(7$E zSx?Vx{&+?dT+C45taMY&*EGOl4?pAbhM7b0M`!LWC@e&ZkYaKPsdO$D?qji84LlBO zh~De9^kRVRJY8u|8;8vp=q(D$w!P%xN_Kl!6JWBQ4X_!5&teKVRkn5_xI1B85*4n> zC0fbQyVsmCGGJ1meg&~JsU9k|Bf!U6CQ zzM()M#mijen$bNQ7!?8?SSX-hL}VZqBNDvSRrcO_xNvhZ71r%ARPp$2EiJ9BG#b)| zv`_7jN`=+c&NT~9VOsjA7-&JCj$}(C8;OKPA}lo5Ds;WF%YlNcQHY^pnt4Rfu2tlu zWF*BPH4UFWEj}5mqU!28gd}~;i2u}rc<{ci;DMf4ksBBJd^$% z(uIeNkZuUh7<;u~$&QeY*CYd^YZ)Qk5J=z)su}9ElNT-g`0V!Lb2`%Lkkv+P+YJd`E*%Hd-QcJ>Bb2G>1==VydUK2f1hNLPoo7BwWJ%T z)Q~RS-Zd!5^LQa3owts37?q9@Gg%hh3N9=m2wtgk_7b>r`z)T6%GL8O9sH zss<_pI>cNpVc+6ATFmu8$^jTcx*XJiaaYh|vj& zq@T2G;Q_5e*X1x!fQ6}5^pTcLKL8nbGdU$C6+>J`v=bpSGwU9~7xBaU8wKR$WfI+{ z;`jb1Ar}#HR(G6xVHejP=L8+_I7d6LJI;;c0-~CsE((kciW9IqO3qIPxq-WNO+AUe zod9x|Cxe`llH0;)tt+@wRni_a8RV{bSry@3n#f_7dHyxzq9YT$x~fuW(xH6Mmw?=fyPfog%qo?nFU9+1AP0_fZH3@C zC+dv#e_6<3$2op0HQ*&7*PcsFF6!sjXFqsJ$hDSbB~tUdO6tR27IJMh#o1};HATJm z;BoFHAlKPgT~=IFRqOcDkfVX)9PKJ})+@;U4?%9b@$!R{Lay;(5_$Eqi6M8_JwG{o z@3M&@cQ`dICfNJC4`-OhQSpzFC**ii!U*Jgf6Ao(>Emku$wz@EBan-^8XxL^!{OkU zu_kLh_L28%AlJ`gTL*>*cv!9fgYnd4s}5j@e9U2vHMk}!$aUAgXM91n$<`5mjXliu zF)35lnr(gpAqO=hqOp)$iJM~1z#s=C03ioIcKKu~9YU^{@Q=la7GHgg*Wb<4LJsPL zq90us;Q9dMatR9-+v*_K=rRJiER(GONkC=L2O(EU*tytC3%TAgkb|-bAqRiW*B%Ws zO}73u7)MB-mJx#|0meC!F5+#Cu0X;eQ|~XQ@xQA_broK0 zXu@Z0g$d*10-6friYG3>Doh+6AAuFdmrhdh->nB(ouqetp?_DeuZ>q_uQKo|1Ftgh KDg*xyGw?5jnr;XH literal 0 HcmV?d00001 diff --git a/pagelayout_editor/pl_editor_doc.icns b/pagelayout_editor/pl_editor_doc.icns new file mode 100644 index 0000000000000000000000000000000000000000..6760a09bb4bb5a22c066068b2c0c84df18e3b331 GIT binary patch literal 55232 zcmeIb2V4``+xI;P22in=wXLpO++Dk_Ygx2KKK1T4|9L+|BlQxzw4Yc*O_b1%=et^+_LX51m(Zpd3eld z2r_Tm`~Hor!u*`indzTWl0Lq6zy9GdjYelMS!@o%wTvu&`>>qJX2NVUE(>Oy56^vd zo0)Jw{#ktd({c`z9hUdvIyX2+B9`WSdc@>$Li6IU(Ico@^sf7>oHtxZ>0Ydo?8Fs?%## zL)9-WD=+(3)vtT?pMOz(Y08_Yrq#de`Xu*5ZS@m}ua+@BWEiSXW6v37QvJ*22Y-56 zd-Z8o6OJr@{`|p%`-bY@a`|xg4)J65l`Mh&>Ic7-#zbuPdVTPLvHA~ghPb#!kzO@a zeQ^2fum0ijdv`;SnH98DTPZMXmFOu5+KX19hOG*{2tm71O|@aupn(vy$Mks6|Hgl- zb%srig7WP!Ew3*G^;o@j%dY*04(;E$dG)$M(9S*B&7l3vpMAqF2Ht-9?Ag=Darf`s zx)F2ba%5QW#Q;AaFAtZUeFm)chtOD&P#_XH3dw?Ad_Gql`SVZUuh3m#NeP8oPN7h# z6%{bek=~V}yz$cyYyBYTwy>N(O^1>0Wo1lXR7l0Pv5V(0718e<>lBh7#uTW zFdUhkDpc4ZZwR^}qEMI|j$@@ckH=-e%uXy8O?~}`L90C=C{{!*%Oj=3X%^|93b2Fc z*$j2e58thJhoBfC{qru5K>vV%z`%fu0YUzscyuO{#n8kI8o0^@g02dgY3sQfRh6!~ z8kOXiakIWV4KA!!Et17$@~bcR?&)v@f&zqpALPQ!P7=|>1Ydjig#{J|9266@uIZmATt8L$k|1hw4NUiBzLih|m`q zBK-Jf2yzziGxlEH#nGfj@(%9avzLZmKk)W#x(q+Q0fNW^e)h&f1z(yHq9`aRDppo; z#+S*TWhiljH4sD;@N-s`NQ6~cSERwgA)!8;w5S^{1uAgdX2B{5f(88i)o0yY+=(Zh ziQD=*o!xhEA60*JIRu>(av9mlNlA$*8Ob2P{!C9wNlVU_N%6B6L(pjfhb@xH6iOus z0EI%W#hO>El;Fo5Am{|24Wfx#$>R%zBC%8^gXIGha=91{2hB4N9G8puVyQ$blPi=e zwWg{{tJT5UE-Ew{lx_}+Zp$hyDk%l|3Moe@aCwiiveIIvTdy7q=FgfoYst#xAa&U< zTu8F(uyB#R!{VjOSFD)t3C$>T53Mlc{|tXyqcPNQCR2I>U33Te4WnAlAM@2aqvr2hj-qDI-QqA<;MMVn3P2Acl3N%#Gjnw6Z9mX@B8n3kQ9C&LP0 zv!J&7$_?FDrA4cCnnt=W^#64KZ7TVu;>ow6{(CX-Qb20u*U8t|e?=)dSpQ|!O}>Wy zE4`YY`7AN2;r<(T>)E~BjOa%Cug@`VswVMH1N|2y-yF2)eQrWhWBs>0G3Rb0{a2^@ zI{7x)f9dG^3A4ZGzdTJ;ZSvj7;Vv9M}!t+JNMTOK` zb&@ap-qqs{EB5Z&f8fC0J^K&sJyv9zd~>#c+Hm^W+oNbDUmyVem!qxIfA>eMrK0ht z*+U2Y@MAuDr0>PVI{mjmDOAKCQKzP+rB706%hLt%bvkgFOo+Zd&szqv)6C+qc@C?~ z>h@n(&vW}7XTdZ3O-FXlw_8_V|IJLvfwTY2O-{?nY@q)t<#J_Jb+xv!{`-Hf`|iQV z5*Aia8)#oeK~X(h0rjROWM&3InP9Y6-&T!|h0M($v(Kp3INJE)zdCdRemuLu^T#)F zys7hBk7MoMaQn8l&;RcB!QbhH1l^UH0nL`ki)AH1m5y&dQ%`+^Y zUO}V7w1E{=Dy6)vw6vt8sHm{8pdc?VHzy}MD=RZIJ;!g!pBvV|P=^4Rd>0i9MIxC* zEQTeBlq7SN6C`NnVrcJL7-}DIo^)3WMiYe<<)tt_p75X&%H%1FE&l?CJ79-(l(O;? zI*m$&!4MpwdoT!8)h7qby+FRb|2g6v9TgmB&8a5YBox4?CQBEmifO_GFiA*A^0~n99m|!@c>d@vd;L67PQTOC>jLsp*0PTjx`Q{YMu9>fJl*#rhSO4tvMT6-Kl84Hfm zpI;*RIr_G};CI32G0Tx@#R9{M)I}D%flWvE!^f`!8@A8P3n5@Q3Wq?UNEjh1EGmTj zi0#O<qgHS4!D^zMQp3|V5x4it91#etagd8H5z^Y2IGus8Mza#HC7+p=TsC09{ z$B$|a82q6E&y-3o^>)E??-D+E;fkAE>|YK;gGjsfU9M(OIk>r8p*QzF`69TW==M9& zb-!{xRv30wiY>Gg*bgP{*c*jXUQj&kMKY;e35udZBe$eqkMOx)^ol9F7((HKaVbX& z>^Ecf@U~r%C?!|!f!pIFqKu*Ijs^S9&Q*RaLOFrg*p(b$pS%FtwG`N&-Mk~bn#mM^ z@<=6erAn#eO`SA*$hO%xQAydG59NhXuX#XUmpmWZxdhms*|l;U*Lbr@u zI(lZev)KEJ;3lM$KgT_r#fj4w8H_|pIEag7_)b`7fK{D3Ht1N`$>~V{8$EFB?1pJAxHc^M9AS{ z_M0&KW2-k@!tEUd5{Xz#9Y1%@Z$6oBA;2}aSN7F-b``OS&dl>3{WW~CmY8FG_ z4(vrT#gZ|LM$PEtjDq)SaCIjX1*5JkV9!C5WX%hm)M?8QR#%+D)EPw%r9 z1tEl;&=H(~*>hRy#2L^=I~eMDaLFov+}@rqsEYV*>G&zX{KiGqu+~hcL#jJyjpoy! zZ3{qg_SrA@)0^`oO!vR0j2qYU9jd@$2nH{3I#i*VVL-h)aT>H9n0Mb}xAcOJ%@MiV z^Tbp!i!`xUG^%w$JLu5tFd;{Pew+ra1$I4mEpYIzW@Rxv?RmU%p{R1hq`T2qu3jZx zgRa8YI$XUG5GCLUjn>_E&RgV#QeJbs7FF`-BG%`p$eD{IUvn@}3xNIF2f17}G48&7 zww-4+i>Y*9BudYreaM!1-Zd5hG+d47(5*A)yH~SWLbpYtxqoCb2khPLD=HN{94K}#!N(jF^3IHU};;4M6QsD zNrEmSu~;M$2t+ESqDHvm(vjoO>wqnjS6Rv9@nK;f@IFq=2TcS{124FwV!2XLYu|gx z@ZZnj_P~S>UT=Z-TVjb6dy@q#VO0mU8d%r1i?zehF=zDVFs~yRYvAVK#TT$wI4Z5b zuwD4eh*MP{E6^)pt_@ZgTphd}l*ydrRx| zq{>kXR}s``+B9ejup`)xowy;Vq8z3KP!S5DlpQv$pFQ|{+xaLo+io%J;Aro($k85g zKo(ofoi}g6Kp5&`+uM$hK(OL zjtIdE%x&k*wF`wT7cE?9yU2bH)SBwSh54UI^}arhrFvgus)xfYL!+awhBln*9h6lX zT{Q`{sYY|6UMdS3&-PdXR4B1*uSScH2RJ$By?09%HI(heGAVe~i`}WK#m6pO4)%ge z5`2pr%=WeBsQ2kNuKr|VlJIU|S%cZ$V6V^iG1rbBDR{$_Mn#l^8p!te(}%J)+gD-P{?WV4$8YP;_IP7{ zo$YgENiC1R0u85!Ntrjtz< zXbq|>8_}oFgTmnY6FrTm1K?_RG+^~scyrfnYf`JH{xEFF==u}=1ox1OAkT;H zIDYl)u6=v=?c2ZmLe$o^>o+b6s6Wx4!V^7m?)X_pxbvwK2$4iO-&mTL%JgYoC>9Ha ze7>+X&9|oc|BFWSzKxFPYtlS6q7T0u>eS$fUZ3T`h@Sc}TUp@R=!m{H$7@i=z5I9g z3*NgoC&!~gmzRb4>CuG={>{trr(OmoeT@DfxOb_UIsST-TXZqV@mHeCnwjHg=O`14 zQ1+FZ%)gW4%Zl&4t*n1UUpL2t5q-(K$M3VAH$TUV83n1i&m#VRlH(K)K4uSHz=eSF_0a{MAb-~G`YQlF7-=U~_w zX-_&~Iy&!Blj9dkvOVs)ZQQ$J`o3*jk!|MNckbK)Z)?BfujqPnyqzkBUCtKx)K6dxL;O8D!t>s_x@h)p1$1f|Kb5ki3NLIU`>%dD`b7(25EBV&S z>Q)0e-l2k{=J7-lkb`sIe)y31wg}bAN{b4$x%KDxd1ZW%u4qYKVPR2mehNpG z_AxOfyrCQ~$8-D!FLaGr7r0~BuI9JU;a&TE^J4=!-b0_`cbIUYWL9CjqPIdhx{liI;e<#-W^-vtb#TXXz>Hk99if5o%50x$E;psnxU zylrB8^C5NsumoEhXgGLPS>I>9FaD-QuK-i9nL~?EjS>}VC5V$7$LoAEdRzE(ccKM#OM0&i9YHuHuBzR6$+ zv2o*qK^TY4W-*!ID>^-UT#Y@{zEkJ!-}DryDoiTW!d$+D#I@`3jY>PjWU}k3c-p(T!#jph+`Viy^ znfYFVFFJ<85ssnAMPdMaf#`*}5uFhd5k}4+Cx}OpgT#ICF5+Lv7UD*;b$?z0@IfF3 ze}{yIg@;GLk;|hZBO@Zh!@@#Cf`czz3<7kozn?D{*L!<;dV09Kxw^VIJCPk7NkjyO z&!0Pc=FI6+Cr=zde(dOx!-o$YJg|S?zP)>P@7lF<$6wpGZQHtK^QMg(H>_W?ED*8@ z47vzBg@gi65fPEZs3nmR;o-nfNF6_3wSLHd!_Ow*XWiNWhyVjeH}gx0WpFu>LM%th zh^1yFC8T1ch*$^}kn)LnNG_B^%0@mDv!F~Q1Dl>;`RP+?G&p^YKV;z>7!+F-TJ5Rx z)OuEVXxggPAMgX_{((Um;o$Ec#=i^Ktp!sm2;lG8)zxyCP2yN^!SocK6Zb;pWu8kV zfv;AJaT_bWji|JgR7NN*r7)Saaz~02)v3aR7D^}52u!1;rGH=`P!p9pmbEP@DPuC} zB;3x8c9jl@27?~KKLEEPm06aT>CK1~GLUnj#nK6^x@HJy3xdH8#_gPGK6FopD{d>n zt7nwN02C`=TMk@PD2_nWiRM8MW{^y5t-yC=tdM18#Bxicts|8TOx@_w3`;sFfnL?p z-(PR(SPrTKG#Mn^%!PiPL0}uL2)=qNQn@9i95Z7vh*U?Q=1lizkeFUyn)(CRVq&=! z1-E6f7znT>)0{ws0-5A5Z2kN{16u@qU9g`ClnF}LUZ?+Z-BTH{zUrZ0gpe2=p+cAm2 zj!buEcrg80PA0Yl?+dsskzxgCB4EpAGm#1suyta%F}+zNrV|S>*slTF!2SYWFA7Yx z0`^p3Ujei)G07}vrWuPxX1cQQ60g;p`&`JvszyPmmXy*m+#IIGGhK{EtNa1GeR9I5uqCK6!t>Y?U4Z}q5Yp)A%dx%3ap0N^C*xkbe zJA+CkRuHH++_$b=wJ~NhVbj)wF4ta``Y{oX6`KtT1N3ogcY`&l!urZtyFVOGdk6XZ zdjz-zb-xI1li=PK6yWdc=d_D_?NuRg=glN>2mqkgpKj^u?v6VnR#?+2E}xh+eDkBE zPjIUFr%!30kTf{mJR?0Llbl8T+&w!dCo4G>{7-7~vmnIj_WNR>=4Dh{jTMIA>gI;G zUPVV5ts?r=>>;Pc3jA|DtZb_SlT|c;H6a2xg^YHtl2$O)RT{NiKn>aNclULf804%J7UQC3EVX%OS7!iDQ?Lq$(pYZDC>%1xzzv5%$5swG&u$Cn= zUAR^p4p!OKt5$&GIk~!Gif{#@R~&juAOj?T6fnMR0j~f`hyV_Ns6})=QTd0s=kGqe ze)J-j$tf-V;C$XcE~$*|%e6Gsb8#{1b;L?oqbHZc3iDb$Sl6psS#kd*lOvKBJdIAG z78K^Z^g0s$t-{J@<>c&=0m@eax|mHPa{YCHP@=}Y%H=E75_5Yo^)uDWM0Pf$sxv-#BbV7gl&^>dh` z^Q|=BFBHj`q67hiUxzP>`Nfq%wBPAa@#}SauRl&M`24w;$rrHGBkz9vL}4d}obkV% zj+NAti={W|%9U72iDYv9x`^DO=7J;I0o7=tP4__qQe2`A(bE(PE4?iXpNtrLa zkbsBTEHAEQC9b*xS9Ns6R59T3%hH;v!rJevwL-U9h)>Y_w^8T4-V`w^(jHuTnE3Fs zOjQ1gbUHXL0~FVdYX#maVg<&e+Y?E+G?+n6D}w3mO|RIO;yBtRR4>n z{zoD>9bF6)wFb4vx{L7d5L%m=G!5q-(j}wba%VjkVU@3rnY8)WIfx7Uo0h6`` zCO*3u9C77pz|pCT@0Cj`DWBiG%21$HGDd2!qt}g>*)-=m4q$_WjARN;Au(}at#<$> z-Kk-4oA?=}xc}aB){1TCjvb7+7IcZcZm?alP$^^-Bqb!uz??oQ?M)~gaOY(~jfdq} z6$ocxI1P&)dV2<^s)}XsfJm(LWD}TJ1Oo>H0D!D{@bgboXE`jLF~#0J_8NKJ)D;&+ zRdOMxEHmM?7)IMyiOXLFxdl8Z0PW<+wdV7ASVJvewgmHX{=Cr(gUc{pXhcFVc!5=B zYH+(7j-vNh_xgFZ{h}GehfY1!+)e146QSd%Kv#6X_DG`-C3-yagC;@Ir zT$oP~8ogMZJ%@XtgL%1xnu-`*ASwt{WSCA%U)p}uxaq4Fj2$_8^3p9^7tGuMCMZ;? zW#URoX2RXuaWB$o0&aeMbU@6@3NqK44L(2v56iH6Se-t54yy;9jxf418OF;Y#>p;l zya^2EEKPL;d#+dt+wte81^#BY@aWqu+fvIPyY3r&Kp0g0V)fly)ZWlsaU|Fl@;b>rllsOWahs* z?RB@t%aSFyms6)cX|)oVfiT;fdV!_=u?GQA7qv^u!z z69hQviCq_^Od{m5Y30R*`FVNyl*H3+H;q1IOBMqk@JVyM3nJ4Bza&^aU`bmHOT->E zdZKFYDLsbHUT!~q^r&$&r;qJ#`R!$%!2@>bH7Yr%NF|#|2TzO@yv(z1H-HBrenoH( zR>w}9#9T1Ih(X^;_)=Ir5P$H%D^Vr=IH~i9KONT1`EBIbDYGVgZ#@W1fYcGI5wt_K z4!iCO;6f0+z`K>kE3E{`xfvzW#@7|=>Y-b;nPTKC<+S?kx& z9XDe1lo@~g(%ozqM~mu6V1<-$;pzZ+FEsq^Pj;j;F{CR`8 zM5GsoWxeETMFnZ#@M-pI9L9|tJ#pI95nZ~idyb+oP)AVfYOMI+Ay1_s$}OtPh&AFe zFbNrmA31gm7spCopL!K1Y+kpi%a<>lI(+2#=~Ksi+v&GwQnVVu%iaa3gVFLW}dgn^b=rexn5+5h+XtJX{# zJ#yUC8K8TN^N;~*orG(-=(U`=ZFx%BqJ=;TKGYUdVloldk8FMNZN3rI<`i-P?QIOxxx2 zej71n(u~PNZTjy{M70>@OV)W9nhO*QG!|fRF{uLwlMUsvGDua5Vc|C-u`2)ksIGr3 zTx>ge#Hc@JP94#wio&#^NVv{pg`6D6RoM&(4D(*9Tto7=204xT_YuAWHY290gqeBE`M}*z~J4k zex4rAo~~XbPZuu>Z`YF-a4E39gRzNv?A)~rD-w(K;=#)V3Ky5+2w{E~S}s!}208J>k`dw7lB~_IQ6xffJD=$7Gij_f(6lc)XEJwMK6L%b-OoDic%-^jZQwFE_hV zz~?ebvtB-UPnDJ5IIuga3dLTVN1^6il3Sf34d43LUmx-IVY7vDfxf9Z0wM3|bD50C zPJi+s2|U7zOJWb~j*wR=z(fP=@!GM<4fHu z+`lF|qxi#{4`~#!Od-PcWE#0#Q|*C5)s9t=)){T9#q$LS2ARxMaND*ISP2pKPX@sg zY)MhnFJ@DMKHmRWA(n!5KJIUxHgeXl+|2P z%gtMj%7cx{9Ob*MJt2$r_e;4v5ty_g72-ves+FpDex&n=BLGEg&clh=RI@6bn)|}j z3-+=0^1hy~#vK61UpUxmD0)|;19sKzA?^Av4@ebAVPSWXNP;^E#~j2R+qic9`VAW# z*W0XK`$UC%P|>dawFBO5y>qumg390lk|SU^SkvH}w`{?kz@Xk;@CHA@)BG4TLz zHpd(wK)<8@g0d=~pNY-o2m~-60uDMF^;Jsc{ex>(xU8~Sx;#z=UQlVYD(3xDr{Qzf zXU>AhZA2=)nrF!Eu1%!Ca^k;X&Y@)*d)0 zx(*shtddF*Fmnf%5#?>b1G1yqOapG@1Td`-D>=+1$}MXP4sSF!s_NV2NI8dF38wi~ zR>HWhjX_qV1T%rK!Xi}&xDP{Bh{ggR5|L3twHB>7;|!!B1!5{rShr!r7wW_I=P)?f zmnlrW6S%Mf5g#wKNC9rsu&6B<3xTH-SW1?)1AWR?3ruE|P-@ z;ojTHU#qTL_YOn}%tkm}an)T(G`z(4>?v>+J7TT9e^;0o%!7*Ev0M-igE*Mmk?B6Vfo;?*Z|tS+CNJ;wG-U}P9EyiEl5(Txxp z9_Z=m9|cF7U-b3_`4I88^76lWJtijV(j}+hwoWU~-BQ*ST)o;TNVt05e%kZ}c3un3 z?QCuBkcE)l1zR(_h43P1p|c%f{`_U+J9SQnSDDwGeaG+6j&0kvcx^V{vUTegWHb0~ zxz%jTW_S~{*?9|L!{)<559^#wSg~@Y@pOwv(OxdjFI@>v&R$oaHeyI%GC2Uf1AP_& zcO5dyE11j5qg%j-J>0XH@ToB&Irxsa-k z7sAqI%igH<(P#;tAZiMR2oUgSkBAY8nN;cyd=XVdHOU}g+DR5KTlN}!9mH;`4G17o zG8a)0^$K_azBqsB(gx2*K*JEhodA&`auA$K4{$c|i!Qo&$&y#5-oc|C-mX~ju}ULg zIy-hY=HE?41Win;4RLs}x$$HxtnS#!;GTr=>z++ikd)5gY^;Nr+&2mKix<}?Km?uG z)IAXto}_eCk?_KQA>iQfwEz|u#^xs)%1=^w0WkQKWUT#{rxQWjVW+#{r<4*gLPLlhAQ@?mjm}h6##Ho7EB)Jbb)#NFL zFwfQ&oGBv;tb{^AB@dgwjfFT_;skOHQSJ(w$yH$qX5<(imCfhd+CFtwn}hY)l!59e zDsu^*7cA!5+MZQLsN+@UnfM>t&R$?^>-xzt+cn2G*CQ_ie8abRxC|T$fS?65TWAPa z>2U$Y)@;Gdi%`b}3+68XT<_eubLPyRJqxT|V?JZX^y$QDW`F*POeIe7n~Y3Brow+B z)6Az&pD_cT*>2XX*|X=&nG0r@&L=K_=An@B|BzOqqLrv0^QYAKi%szqT?{W&rO~@$Y#xaS3Zp0E$50pfE2d$8EcBd`OB*!2pU!fzDBn z>jNnIe+^Jz&HR;qU4G(b46^sYP7f+I`N=!bPkDt8-Mz0otIJRH`vH9GVXYLU4Qm9Khf`NegboVeYpbN)&yGmik~<#ezI$( zypjs|iA;>2pr>BB5OC{7U4Eh;{1ra|9Ox-4%z*{=VHkgp^ff>6^THGn&QH8blH>fu zyDL5+jqnqljr>H72N+O2*az;00g6jvEe23zy?UbuD9YYl2?%|V-xxsAnPC7ZhMYFw zVl{Wo#`%fD4=*x{%jtlhD18+h5uH%nC_nK9>tkAxrT~h2cj8`VfJIL8KirSF*(gBK z!AKq8*8`TBW1rA*5Tt2<;(h#+M~|O>%%x_%e|zUzBLGERCl;6!;AKqH07WSPDB|M) zK=C;%J?(Yey>|@)6zz>{19nAVsRfSa7%+|I5ERMpUOs#BG&wV|AT#`Wg9L?jtrtXM zj)60ECz1g_@%n6I{Dg^< zHoyri?}POe@M*p|_ync6K#xzH!9H5+ag(p`iJAb$zA(eGemL8pY$iUzVbQ^gg-ziT zMi)3VgUI@T&{An-A18Hb5qhG70YMPpybLVuhds$C)GdThv@-$@IA79FpN}*xgio}u zAskHAwJn2BSl5apfO5b}4tn&zrzbiX=n1J9<4Is?ZOy$*KZGZKFd`42g4oh;^05v`*ZcZkLl^y4@cKknvCr(uYOiWZsDJT^QStT!gHq4nk@*A7Q zH#BJV71W&5G&ljOB@l?&xy4K{U5Hnj;J#_U5j{eesqv;-&$pHcLgTFGM2D3qd)G2St!M+}`XXRhBIuelbp z7VXD~3sb~lM18mfC<(tbub9qZFldDz9zA)Tl;S%4mvwg^-MfDexlexJ{LsCoc}&HA zt(TVo-;>f)7;Gl3G$%3cMgm2i>ookQlQF0{-?1(!F|=M%LMY-tye|+is2^^}zNK(w z;?Lv}gOAElJtu*|SME9^UxtAV;P!8PO>RO;d~cuwPIASZj6EwNlCobsOGqvg%T=N* zOi!khE3{rHz$A3dz$A+Xe1jGm)D#LnSn3x5_%QfEAcSEi z#z+a3kV#@$@}!zZNeLr^agwWgyRipkvF3I$mk*Y=6zj#0NOfxU-QCOVU6$A^ba;S6 z4Am-X$kOHTD(e-i&OK2!ib-@cHUvj^>u0Ne%luM=a`3UClURlq{fJbn)?AwQ!?!Nq z+4Sijs#jO!pX&E5Jji;$cS|A^O(PPWaRA^1M;qPy``y_B34j=coke1q0Bak}fjVT? zFWKywVpI}=S@X(ISDp9=N(%EC?r_W6{7&9 z1}9ZY<#WeF`F7^>wI{ z%A_Rl$N_^dgb)r%0G7`ZpsLNHB#u(R&+}A*{|8^#F?ytfl%Ih$jaUOnO*M=!sEbs$ z0m}#@8dwc!08vSA9wBicmkH<#y>cgv8s(pHA>~>H4ckB?XBkSXQL{)N7o+YK7^h>EOh!>w3dzN0+H`r#zt6TY=qs}ph!3zjxdXi zM4~!HMn#3VpFHk-`AYPaAP+ZJk{i(-Fcl z&Hd{Sv$Hb`p7@X(U238!LV|YJ<4I;Qi=LmGlW{xp*&B?IaQ66DgoN9PfG6pN#ravE z^NQ0SdS6c|D$kDfbZK~*i3YI)10k_)*X8?fGv2;R$}TF&d*KtClty8tTyY8fmxRQT zt8p*mqoNbCiV8BG_}xx=RV1Ok4Ra0p_k=_g?D{Y%J2O7Y^KMdHmQ+~wCeW?L2#Emi z;JeRXzlpl|JQ*V-WP+l{!5)_%wIm@Cdo?`jR%mQRdCJrGr3zJLUYxIA%MlWx?gtJB zy)I*xrN4LsR+x~nGwufZ$2@IOLSnLAOo_CTn*H`wI+)cdrKMgE489%Tl7z%yJDiXx zOn!x}FrkrDyotFK(ZYnpMLi*5Tw+30`aU)!;y)rJ3JipVSXlb{&ebdb2_ZqvdUfy4 zqlEMd0Xr}0N%XB3jV&=z7hY&CAt7X!Wxap#^wFc|iFwq_k0}rSBSNAqH}&0%xO$%&(BPGpYZ(Yv*h%TB?S@x5g|b>%1KZD@b=Az7P7uW#?)|K0KuI3b~sM=c!C zfApfov&a7P20-Hwo9=H;(^h%=FQKkch?BC5mnek?4=34HzP!{Osg@?RCQA2cBzx8!`5~ zE(1JrIh6=LY2TUW!EZhzp?SZ~E8+RW8&M(74xJn`NW@PHJ`(&WCOp8)`PAkKLwv|%$4s%c^RxA`vzWhR zf8FIIhSkSMREi}0Yp}=VTah6b&aPju_EgwgpRpr0-+%Ie^pG6q{K);W#q%3@!!$`p zaD`I7(_fL-uUzstwQcbd=KBh3)PC;BVD?|y{x;xxxFRqGfOBk@DWmd4J1`+wbzh#<}L&q zsEv;vjZhR4e;o>supT;M{nh595scJ0hRzg?$Z{Dw{DcIc5sy#*wS~0JZ2LBNyTzt0 z&kS?~`|yQZarF~er=p2fB=9v8hMr*a0m)DaI0geAp?9GHcmy{68e2uefJcyZ z&0Ry{D5a9e$A1ylKu1UfS{Pl7SU#%RG2(SwiIzr4hC@U1fw$r8%|8$vVHGVS#Rmvi# z{7Ifkm@#{CbLfaGi}-kH z`)2QgveL2(4s&O@%z@@2bF8Lq&Eir@!NtIg2X3){`MVM|6}K*Z*4tw2O85YY-mv;q}wJqVGagF!ieo^Ny|1oHblZ&gnho=|#>1NZD`*M zKHgrQ9`0@~U^_Ck&6ghQ`BsK}4g9uWpKp3~@7AT0 zO?zw0w#{&BS`@Q3Z3)(R8M^i8^-Z6?SSbc!#rXM`Uxy4CI&|2u;loE5w&BBu0k1=T z{pIJuKmGW__uma1&>wT%vwPRhdf(<|rqa#dZ(~ld#0t@=bJuR&dxBzM<@k2Mz=7Wl z8ub15-~XWBz}}!ig9Z*9FyPz%{rX~#dvxpCrBg?&+60R>|Il|$Db27_ShZ{4!3LD0 zOV@7Qy7%bWvsbTg@U3@m{6D>V_3YWBd-rZ#L5(}wbZFnMMLgFO0oySH<**=FT3T7R gYu6qW25cSm8@Ah_efxIptgS6A32n{W{GBTQe;3Xj<^TWy literal 0 HcmV?d00001 From e6e13b260991fa45effce3b9bf10ea9e730fea3f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 27 Aug 2013 10:32:39 +0200 Subject: [PATCH 248/415] Fixed GLEW library detection for Mac OS X. --- CMakeModules/FindGLEW.cmake | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeModules/FindGLEW.cmake b/CMakeModules/FindGLEW.cmake index 5b9b814872..88e9a50757 100644 --- a/CMakeModules/FindGLEW.cmake +++ b/CMakeModules/FindGLEW.cmake @@ -42,12 +42,16 @@ ELSE (WIN32) IF (APPLE) # These values for Apple could probably do with improvement. - FIND_PATH( GLEW_INCLUDE_DIR glew.h + FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h /System/Library/Frameworks/GLEW.framework/Versions/A/Headers + /opt/local/include ${OPENGL_LIBRARY_DIR} ) - SET(GLEW_GLEW_LIBRARY "-framework GLEW" CACHE STRING "GLEW library for OSX") - SET(GLEW_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX") + + FIND_LIBRARY( GLEW_GLEW_LIBRARY GLEW + /opt/local/lib + ) + ELSE (APPLE) FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h From cebdb43234b35222b807b020bf9ddb3615e3eaa3 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 27 Aug 2013 18:08:32 +0200 Subject: [PATCH 249/415] Added mouse cursor drawing. Added flipping mode. --- common/drawpanel_gal.cpp | 32 +++++---- common/gal/cairo/cairo_gal.cpp | 85 +++++++++++------------ common/gal/graphics_abstraction_layer.cpp | 35 +++++----- common/gal/opengl/opengl_gal.cpp | 79 ++++++--------------- common/view/view.cpp | 5 +- common/view/wx_view_controls.cpp | 8 +-- include/gal/cairo/cairo_gal.h | 12 ++-- include/gal/graphics_abstraction_layer.h | 64 ++++++++++++++--- include/gal/opengl/opengl_gal.h | 11 +-- include/view/wx_view_controls.h | 14 ++++ 10 files changed, 178 insertions(+), 167 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 4bc6a0103d..83fa574802 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -119,20 +119,6 @@ EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL() void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) ) -{ - Refresh(); -} - - -void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent ) -{ - m_gal->ResizeScreen( aEvent.GetSize().x, aEvent.GetSize().y ); - m_view->MarkTargetDirty( KiGfx::TARGET_CACHED ); - m_view->MarkTargetDirty( KiGfx::TARGET_NONCACHED ); -} - - -void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) { #ifdef __WXDEBUG__ prof_counter time; @@ -148,6 +134,7 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) if( m_view->IsTargetDirty( KiGfx::TARGET_NONCACHED ) ) m_gal->DrawGrid(); m_view->Redraw(); + m_gal->DrawCursor( m_viewControls->GetMousePosition() ); m_gal->EndDrawing(); @@ -159,6 +146,21 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) } +void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent ) +{ + m_gal->ResizeScreen( aEvent.GetSize().x, aEvent.GetSize().y ); + m_view->MarkTargetDirty( KiGfx::TARGET_CACHED ); + m_view->MarkTargetDirty( KiGfx::TARGET_NONCACHED ); +} + + +void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) +{ + wxPaintEvent redrawEvent; + wxPostEvent( this, redrawEvent ); +} + + void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) { // Do not do anything if the currently used GAL is correct @@ -213,6 +215,8 @@ void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent ) printf( "evType %d\n", aEvent.GetEventType() ); m_eventDispatcher->DispatchWxEvent( aEvent ); } + + Refresh(); } diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 9425fd084f..86bd566bf7 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -24,7 +24,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include #include #include @@ -135,6 +134,9 @@ void CAIRO_GAL::EndDrawing() wxBufferedDC dc; dc.Init( &client_dc, bmp ); + // Now it is the time to blit the mouse cursor + blitCursor( dc ); + deinitSurface(); } @@ -784,50 +786,12 @@ void CAIRO_GAL::ClearTarget( RenderTarget aTarget ) } -VECTOR2D CAIRO_GAL::ComputeCursorToWorld( const VECTOR2D& aCursorPosition ) +void CAIRO_GAL::DrawCursor( const VECTOR2D& aCursorPosition ) { - MATRIX3x3D inverseMatrix = worldScreenMatrix.Inverse(); - VECTOR2D cursorPositionWorld = inverseMatrix * aCursorPosition; - - return cursorPositionWorld; -} - - -void CAIRO_GAL::DrawCursor( VECTOR2D aCursorPosition ) -{ - if( !IsShownOnScreen() ) - return; - - wxClientDC clientDC( this ); - wxMemoryDC cursorSave( *cursorPixelsSaved ); - wxMemoryDC cursorShape( *cursorPixels ); - - // Snap to grid - VECTOR2D cursorPositionWorld = ComputeCursorToWorld( aCursorPosition ); - - cursorPositionWorld.x = round( cursorPositionWorld.x / gridSize.x ) * gridSize.x; - cursorPositionWorld.y = round( cursorPositionWorld.y / gridSize.y ) * gridSize.y; - aCursorPosition = worldScreenMatrix * cursorPositionWorld; - aCursorPosition = aCursorPosition - VECTOR2D( cursorSize / 2, cursorSize / 2 ); - - if( !isDeleteSavedPixels ) - { - clientDC.Blit( savedCursorPosition.x, savedCursorPosition.y, cursorSize, cursorSize, - &cursorSave, 0, 0 ); - } - else - { - isDeleteSavedPixels = false; - } - - cursorSave.Blit( 0, 0, cursorSize, cursorSize, &clientDC, aCursorPosition.x, - aCursorPosition.y ); - - clientDC.Blit( aCursorPosition.x, aCursorPosition.y, cursorSize, cursorSize, &cursorShape, 0, - 0, wxOR ); - - savedCursorPosition.x = (wxCoord) aCursorPosition.x; - savedCursorPosition.y = (wxCoord) aCursorPosition.y; + // Now we should only store the position of the mouse cursor + // The real drawing routines are in EndDrawing() + cursorPosition = VECTOR2D( aCursorPosition.x - cursorSize / 2, + aCursorPosition.y - cursorSize / 2 ); } @@ -888,7 +852,7 @@ void CAIRO_GAL::storePath() } -void CAIRO_GAL::onPaint( wxPaintEvent& aEvent ) +void CAIRO_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) ) { PostPaint(); } @@ -922,6 +886,37 @@ void CAIRO_GAL::initCursor( int aCursorSize ) } +void CAIRO_GAL::blitCursor( wxBufferedDC& clientDC ) +{ + if( !isCursorEnabled ) + return; + + wxMemoryDC cursorSave( *cursorPixelsSaved ); + wxMemoryDC cursorShape( *cursorPixels ); + + if( !isDeleteSavedPixels ) + { + // Restore pixels that were overpainted by the previous cursor + clientDC.Blit( savedCursorPosition.x, savedCursorPosition.y, + cursorSize, cursorSize, &cursorSave, 0, 0 ); + } + else + { + isDeleteSavedPixels = false; + } + + // Store pixels that are going to be overpainted + cursorSave.Blit( 0, 0, cursorSize, cursorSize, &clientDC, cursorPosition.x, cursorPosition.y ); + + // Draw the cursor + clientDC.Blit( cursorPosition.x, cursorPosition.y, cursorSize, cursorSize, + &cursorShape, 0, 0, wxOR ); + + savedCursorPosition.x = (wxCoord) cursorPosition.x; + savedCursorPosition.y = (wxCoord) cursorPosition.y; +} + + void CAIRO_GAL::allocateBitmaps() { // Create buffer, use the system independent Cairo context backend diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index c431c83565..593d59a9e9 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -40,9 +40,9 @@ GAL::GAL() : SetIsStroke( true ); SetFillColor( COLOR4D( 0.0, 0.0, 0.0, 0.0 ) ); SetStrokeColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); - SetIsCursorEnabled( false ); SetZoomFactor( 1.0 ); SetDepthRange( VECTOR2D( -2048, 2047 ) ); + SetFlip( false, false ); SetLineWidth( 1.0 ); // Set grid defaults @@ -54,6 +54,8 @@ GAL::GAL() : // Initialize the cursor shape SetCursorColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); + SetCursorSize( 20 ); + SetCursorEnabled( true ); strokeFont.LoadNewStrokeFont( newstroke_font, newstroke_font_bufsize ); } @@ -64,6 +66,17 @@ GAL::~GAL() } +void GAL::SetTextAttributes( const EDA_TEXT* aText ) +{ + strokeFont.SetGlyphSize( VECTOR2D( aText->GetSize() ) ); + strokeFont.SetHorizontalJustify( aText->GetHorizJustify() ); + strokeFont.SetVerticalJustify( aText->GetVertJustify() ); + strokeFont.SetBold( aText->IsBold() ); + strokeFont.SetItalic( aText->IsItalic() ); + strokeFont.SetMirrored( aText->IsMirrored() ); +} + + void GAL::ComputeWorldScreenMatrix() { ComputeWorldScale(); @@ -80,17 +93,17 @@ void GAL::ComputeWorldScreenMatrix() MATRIX3x3D flip; flip.SetIdentity(); - flip.SetScale( VECTOR2D( 1.0, 1.0 ) ); + flip.SetScale( VECTOR2D( flipX, flipY ) ); MATRIX3x3D lookat; lookat.SetIdentity(); lookat.SetTranslation( -lookAtPoint ); worldScreenMatrix = translation * flip * scale * lookat * worldScreenMatrix; + screenWorldMatrix = worldScreenMatrix.Inverse(); } - void GAL::DrawGrid() { if( !gridVisibility ) @@ -114,9 +127,8 @@ void GAL::DrawGrid() // Draw the grid // For the drawing the start points, end points and increments have // to be calculated in world coordinates - MATRIX3x3D inverseMatrix = worldScreenMatrix.Inverse(); - VECTOR2D worldStartPoint = inverseMatrix * VECTOR2D( 0.0, 0.0 ); - VECTOR2D worldEndPoint = inverseMatrix * screenSize; + VECTOR2D worldStartPoint = screenWorldMatrix * VECTOR2D( 0.0, 0.0 ); + VECTOR2D worldEndPoint = screenWorldMatrix * screenSize; int gridScreenSizeDense = round( gridSize.x * worldScale ); int gridScreenSizeCoarse = round( gridSize.x * static_cast( gridTick ) * worldScale ); @@ -218,14 +230,3 @@ void GAL::DrawGrid() } } } - - -void GAL::SetTextAttributes( const EDA_TEXT* aText ) -{ - strokeFont.SetGlyphSize( VECTOR2D( aText->GetSize() ) ); - strokeFont.SetHorizontalJustify( aText->GetHorizJustify() ); - strokeFont.SetVerticalJustify( aText->GetVertJustify() ); - strokeFont.SetBold( aText->IsBold() ); - strokeFont.SetItalic( aText->IsItalic() ); - strokeFont.SetMirrored( aText->IsMirrored() ); -} diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 5cbd4fa162..dd446c3f58 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -732,73 +732,35 @@ void OPENGL_GAL::ClearTarget( RenderTarget aTarget ) } -VECTOR2D OPENGL_GAL::ComputeCursorToWorld( const VECTOR2D& aCursorPosition ) +void OPENGL_GAL::DrawCursor( const VECTOR2D& aCursorPosition ) { - VECTOR2D cursorPosition = aCursorPosition; - cursorPosition.y = screenSize.y - aCursorPosition.y; - MATRIX3x3D inverseMatrix = worldScreenMatrix.Inverse(); - VECTOR2D cursorPositionWorld = inverseMatrix * cursorPosition; + if( !isCursorEnabled ) + return; - return cursorPositionWorld; -} + compositor.SetBuffer( OPENGL_COMPOSITOR::DIRECT_RENDERING ); + // Invert y axis + VECTOR2D cursorPosition = VECTOR2D( aCursorPosition.x, screenSize.y - aCursorPosition.y ); -void OPENGL_GAL::DrawCursor( VECTOR2D aCursorPosition ) -{ - wxLogWarning( wxT( "Not tested" ) ); + VECTOR2D cursorBegin = ToWorld( cursorPosition - + VECTOR2D( cursorSize / 2, cursorSize / 2 ) ); + VECTOR2D cursorEnd = ToWorld( cursorPosition + + VECTOR2D( cursorSize / 2, cursorSize / 2 ) ); + VECTOR2D cursorCenter = ( cursorBegin + cursorEnd ) / 2.0; - SetCurrent( *glContext ); - - // Draw the cursor on the surface - VECTOR2D cursorPositionWorld = ComputeCursorToWorld( aCursorPosition ); - - cursorPositionWorld.x = round( cursorPositionWorld.x / gridSize.x ) * gridSize.x; - cursorPositionWorld.y = round( cursorPositionWorld.y / gridSize.y ) * gridSize.y; - - aCursorPosition = worldScreenMatrix * cursorPositionWorld; - - // Switch to the main framebuffer and blit the scene - // glBindFramebuffer( GL_FRAMEBUFFER, 0 ); - // glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - glLoadIdentity(); - - glDisable( GL_TEXTURE_2D ); + glLineWidth( 1.0 ); glColor4d( cursorColor.r, cursorColor.g, cursorColor.b, cursorColor.a ); - glBegin( GL_TRIANGLES ); + glBegin( GL_LINES ); + glVertex3f( cursorCenter.x, cursorBegin.y, GetMinDepth() ); + glVertex3f( cursorCenter.x, cursorEnd.y, GetMinDepth() ); - glVertex3f( (int) ( aCursorPosition.x - cursorSize / 2 ) + 1, - (int) ( aCursorPosition.y ), depthRange.x ); - glVertex3f( (int) ( aCursorPosition.x + cursorSize / 2 ) + 1, - (int) ( aCursorPosition.y ), depthRange.x ); - glVertex3f( (int) ( aCursorPosition.x + cursorSize / 2 ) + 1, - (int) ( aCursorPosition.y + 1 ), depthRange.x ); - - glVertex3f( (int) ( aCursorPosition.x - cursorSize / 2 ) + 1, - (int) ( aCursorPosition.y ), depthRange.x ); - glVertex3f( (int) ( aCursorPosition.x - cursorSize / 2 ) + 1, - (int) ( aCursorPosition.y + 1), depthRange.x ); - glVertex3f( (int) ( aCursorPosition.x + cursorSize / 2 ) + 1, - (int) ( aCursorPosition.y + 1 ), depthRange.x ); - - glVertex3f( (int) ( aCursorPosition.x ), - (int) ( aCursorPosition.y - cursorSize / 2 ) + 1, depthRange.x ); - glVertex3f( (int) ( aCursorPosition.x ), - (int) ( aCursorPosition.y + cursorSize / 2 ) + 1, depthRange.x ); - glVertex3f( (int) ( aCursorPosition.x ) + 1, - (int) ( aCursorPosition.y + cursorSize / 2 ) + 1, depthRange.x ); - - glVertex3f( (int) ( aCursorPosition.x ), - (int) ( aCursorPosition.y - cursorSize / 2 ) + 1, depthRange.x ); - glVertex3f( (int) ( aCursorPosition.x ) + 1, - (int) ( aCursorPosition.y - cursorSize / 2 ) + 1, depthRange.x ); - glVertex3f( (int) ( aCursorPosition.x ) + 1, - (int) ( aCursorPosition.y + cursorSize / 2 ) + 1, depthRange.x ); + glVertex3f( cursorBegin.x, cursorCenter.y, GetMinDepth() ); + glVertex3f( cursorEnd.x, cursorCenter.y, GetMinDepth() ); glEnd(); - // Blit the current screen contents - SwapBuffers(); + // Restore the default color, so textures will be drawn properly + glColor4d( 1.0, 1.0, 1.0, 1.0 ); } @@ -823,6 +785,7 @@ void OPENGL_GAL::drawGridLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEnd glVertex3d( aEndPoint.x, aEndPoint.y, layerDepth ); glEnd(); + // Restore the default color, so textures will be drawn properly glColor4d( 1.0, 1.0, 1.0, 1.0 ); } @@ -938,7 +901,7 @@ void OPENGL_GAL::drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRa } -void OPENGL_GAL::onPaint( wxPaintEvent& aEvent ) +void OPENGL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) ) { PostPaint(); } diff --git a/common/view/view.cpp b/common/view/view.cpp index 290d51c92c..86333d51c5 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -268,7 +268,7 @@ void VIEW::SetViewport( const BOX2D& aViewport, bool aKeepAspect ) void VIEW::SetMirror( bool aMirrorX, bool aMirrorY ) { - wxASSERT_MSG( false, wxT( "This is not implemented" ) ); + m_gal->SetFlip( aMirrorX, aMirrorY ); } @@ -292,7 +292,6 @@ void VIEW::SetScale( double aScale, const VECTOR2D& aAnchor ) // Redraw everything after the viewport has changed MarkTargetDirty( TARGET_CACHED ); - MarkTargetDirty( TARGET_NONCACHED ); } @@ -304,7 +303,6 @@ void VIEW::SetCenter( const VECTOR2D& aCenter ) // Redraw everything after the viewport has changed MarkTargetDirty( TARGET_CACHED ); - MarkTargetDirty( TARGET_NONCACHED ); } @@ -706,6 +704,7 @@ void VIEW::PrepareTargets() MarkTargetDirty( TARGET_NONCACHED ); MarkTargetDirty( TARGET_CACHED ); + MarkTargetDirty( TARGET_OVERLAY ); } if( IsTargetDirty( TARGET_OVERLAY ) ) diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index ad37050336..4066f8d9e6 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -60,17 +60,17 @@ WX_VIEW_CONTROLS::WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ) : void WX_VIEW_CONTROLS::onMotion( wxMouseEvent& aEvent ) { - VECTOR2D mousePoint( aEvent.GetX(), aEvent.GetY() ); + m_mousePosition.x = aEvent.GetX(); + m_mousePosition.y = aEvent.GetY(); if( aEvent.Dragging() ) { if( m_state == DRAG_PANNING ) { - VECTOR2D d = m_dragStartPoint - mousePoint; + VECTOR2D d = m_dragStartPoint - m_mousePosition; VECTOR2D delta = m_view->ToWorld( d, false ); m_view->SetCenter( m_lookStartPoint + delta ); - m_parentPanel->Refresh(); aEvent.StopPropagation(); } else @@ -106,7 +106,6 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& aEvent ) aEvent.ShiftDown() ? -scrollSpeed : 0.0 ); m_view->SetCenter( m_view->GetCenter() + delta ); - m_parentPanel->Refresh(); } else { @@ -130,7 +129,6 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& aEvent ) VECTOR2D anchor = m_view->ToWorld( VECTOR2D( aEvent.GetX(), aEvent.GetY() ) ); m_view->SetScale( m_view->GetScale() * zoomScale, anchor ); - m_parentPanel->Refresh(); } aEvent.Skip(); diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index f96f5fc766..be1e2fc7b4 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -34,6 +34,7 @@ #include #include +#include #if defined(__WXMSW__) #define SCREEN_DEPTH 24 @@ -228,11 +229,8 @@ public: // Cursor // ------- - /// @copydoc GAL::ComputeCursorToWorld() - virtual VECTOR2D ComputeCursorToWorld( const VECTOR2D& aCursorPosition ); - /// @copydoc GAL::DrawCursor() - virtual void DrawCursor( VECTOR2D aCursorPosition ); + virtual void DrawCursor( const VECTOR2D& aCursorPosition ); /** * Function PostPaint @@ -286,6 +284,7 @@ private: wxBitmap* cursorPixels; ///< Cursor pixels wxBitmap* cursorPixelsSaved; ///< Saved cursor pixels int cursorSize; ///< Cursor size + VECTOR2D cursorPosition; ///< Current cursor position /// Maximum number of arguments for one command static const int MAX_CAIRO_ARGUMENTS = 6; @@ -357,6 +356,11 @@ private: /// @copydoc GAL::initCursor() virtual void initCursor( int aCursorSize ); + /** + * @brief Blits cursor into current screen. + */ + virtual void blitCursor( wxBufferedDC& clientDC ); + /// Prepare Cairo surfaces for drawing void initSurface(); diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 03da4451bf..0e334694a1 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -551,6 +551,25 @@ public: return worldScale; } + /** + * @brief Sets flipping of the screen. + * + * @param xAxis is the flip flag for the X axis. + * @param yAxis is the flip flag for the Y axis. + */ + inline void SetFlip( bool xAxis, bool yAxis ) + { + if( xAxis ) + flipX = -1.0; // flipped + else + flipX = 1.0; // regular + + if( yAxis ) + flipY = -1.0; // flipped + else + flipY = 1.0; // regular + } + // --------------------------- // Buffer manipulation methods // --------------------------- @@ -693,26 +712,36 @@ public: gridStyle = aGridStyle; } - // ------- - // Cursor - // ------- + /** + * @brief Compute the point position in world coordinates from given screen coordinates. + * + * @param aPoint the pointposition in screen coordinates. + * @return the point position in world coordinates. + */ + inline virtual VECTOR2D ToWorld( const VECTOR2D& aPoint ) const + { + return VECTOR2D( screenWorldMatrix * aPoint ); + } /** - * @brief Compute the cursor position in world coordinates from given screen coordinates. + * @brief Compute the point position in screen coordinates from given world coordinates. * - * @param aCursorPosition is the cursor position in screen coordinates. - * @return the cursor position in world coordinates. + * @param aPoint the pointposition in world coordinates. + * @return the point position in screen coordinates. */ - virtual VECTOR2D ComputeCursorToWorld( const VECTOR2D& aCursorPosition ) = 0; + inline virtual VECTOR2D ToScreen( const VECTOR2D& aPoint ) const + { + return VECTOR2D( worldScreenMatrix * aPoint ); + } /** * @brief Enable/Disable cursor. * * @param aIsCursorEnabled is true if the cursor should be enabled, else false. */ - inline void SetIsCursorEnabled( bool aIsCursorEnabled ) + inline void SetCursorEnabled( bool aCursorEnabled ) { - isCursorEnabled = aIsCursorEnabled; + isCursorEnabled = aCursorEnabled; } /** @@ -725,12 +754,22 @@ public: cursorColor = aCursorColor; } + /** + * @brief Set the cursor size. + * + * @param aCursorSize is the size of the cursor. + */ + inline void SetCursorSize( unsigned int aCursorSize ) + { + cursorSize = aCursorSize; + } + /** * @brief Draw the cursor. * * @param aCursorPosition is the cursor position in screen coordinates. */ - virtual void DrawCursor( VECTOR2D aCursorPosition ) = 0; + virtual void DrawCursor( const VECTOR2D& aCursorPosition ) = 0; /** * @brief Changes the current depth to deeper, so it is possible to draw objects right beneath @@ -768,7 +807,10 @@ protected: double zoomFactor; ///< The zoom factor MATRIX3x3D worldScreenMatrix; ///< World transformation + MATRIX3x3D screenWorldMatrix; ///< Screen transformation double worldScale; ///< The scale factor world->screen + double flipX; ///< Flag for X axis flipping + double flipY; ///< Flag for Y axis flipping double lineWidth; ///< The line width @@ -795,8 +837,8 @@ protected: int gridOriginMarkerSize; ///< Grid origin indicator size (pixels) bool isCursorEnabled; ///< Is the cursor enabled? - VECTOR2D cursorPosition; ///< The cursor position COLOR4D cursorColor; ///< Cursor color + int cursorSize; ///< Size of the cursor in pixels /// Instance of object that stores information about how to draw texts STROKE_FONT strokeFont; diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 66a2fd1712..170b6c7a50 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -221,11 +221,8 @@ public: // Cursor // ------- - /// @copydoc GAL::ComputeCursorToWorld() - virtual VECTOR2D ComputeCursorToWorld( const VECTOR2D& aCursorPosition ); - /// @copydoc GAL::DrawCursor() - virtual void DrawCursor( VECTOR2D aCursorPosition ); + virtual void DrawCursor( const VECTOR2D& aCursorPosition ); /** * @brief Function PostPaint @@ -294,12 +291,6 @@ private: // Shader SHADER shader; ///< There is only one shader used for different objects - // Cursor - int cursorSize; ///< Size of the cursor in pixels - GLubyte* cursorShape; ///< Cursor pixel storage - GLubyte* cursorSave; ///< Saved cursor pixels - VECTOR2D savedCursorPosition; ///< Last saved cursor position - // Internal flags bool isGlewInitialized; ///< Is GLEW initialized? bool isFramebufferInitialized; ///< Are the framebuffers initialized? diff --git a/include/view/wx_view_controls.h b/include/view/wx_view_controls.h index bbd55f3856..47da6b9126 100644 --- a/include/view/wx_view_controls.h +++ b/include/view/wx_view_controls.h @@ -76,6 +76,17 @@ public: m_autoPanEnabled = true; } + /** + * Function GetMousePosition() + * Returns the current mouse cursor position in the screen coordinates. + * + * @return The current mouse cursor position. + */ + const VECTOR2D& GetMousePosition() const + { + return m_mousePosition; + } + private: enum State { IDLE = 1, @@ -89,6 +100,9 @@ private: /// Current state of VIEW_CONTROLS State m_state; + /// Current mouse position + VECTOR2D m_mousePosition; + /// Flag for grabbing the mouse cursor bool m_grabMouse; /// Flag for turning on autopanning From 86c29e23dff891a5d6abfd17d8de333382c721fb Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 28 Aug 2013 16:25:42 +0200 Subject: [PATCH 250/415] Added cursor snapping. --- common/drawframe.cpp | 3 -- common/drawpanel_gal.cpp | 2 +- common/gal/cairo/cairo_gal.cpp | 3 ++ common/gal/graphics_abstraction_layer.cpp | 12 +++++++- common/gal/opengl/opengl_gal.cpp | 3 ++ common/view/wx_view_controls.cpp | 13 +++++++- include/gal/graphics_abstraction_layer.h | 23 +++++++++++++- include/view/wx_view_controls.h | 37 ++++++++++++++++++++--- 8 files changed, 84 insertions(+), 12 deletions(-) diff --git a/common/drawframe.cpp b/common/drawframe.cpp index b7c9c9c139..a38908e970 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -987,9 +987,6 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) // Set up grid settings gal->SetGridVisibility( IsGridVisible() ); - // Default grid color - dark cyan does not look good - //gal->SetGridColor( KiGfx::COLOR4D( GetGridColor() ) ); - gal->SetGridColor( KiGfx::COLOR4D( 0.1, 0.1, 0.1, 1.0 ) ); gal->SetGridSize( VECTOR2D( screen->GetGridSize().x, screen->GetGridSize().y ) ); gal->SetGridOrigin( VECTOR2D( screen->GetGridOrigin() ) ); gal->SetGridOriginMarkerSize( 15 ); diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 83fa574802..5c1925b66f 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -134,7 +134,7 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) ) if( m_view->IsTargetDirty( KiGfx::TARGET_NONCACHED ) ) m_gal->DrawGrid(); m_view->Redraw(); - m_gal->DrawCursor( m_viewControls->GetMousePosition() ); + m_gal->DrawCursor( m_viewControls->GetCursorPosition() ); m_gal->EndDrawing(); diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 86bd566bf7..058c34b338 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -69,6 +69,9 @@ CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, screenSize = VECTOR2D( aParent->GetSize() ); initCursor( 20 ); + // Grid color settings are different in Cairo and OpenGL + SetGridColor( COLOR4D( 0.1, 0.1, 0.1, 0.8 ) ); + // Allocate memory for pixel storage allocateBitmaps(); } diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index 593d59a9e9..50e3d5723d 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -48,7 +48,6 @@ GAL::GAL() : // Set grid defaults SetGridVisibility( true ); SetGridStyle( GRID_STYLE_LINES ); - SetGridColor( COLOR4D( 0.4, 0.4, 0.4, 1.0 ) ); SetCoarseGrid( 10 ); SetGridLineWidth( 0.5 ); @@ -230,3 +229,14 @@ void GAL::DrawGrid() } } } + + +VECTOR2D GAL::GetGridPoint( VECTOR2D aPoint ) const +{ + VECTOR2D pointWorld = ToWorld( aPoint ); + + pointWorld.x = round( pointWorld.x / gridSize.x ) * gridSize.x; + pointWorld.y = round( pointWorld.y / gridSize.y ) * gridSize.y; + + return ToScreen( pointWorld ); +} diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index dd446c3f58..efe801d137 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -84,6 +84,9 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, screenSize = VECTOR2D( aParent->GetSize() ); initCursor( 20 ); + // Grid color settings are different in Cairo and OpenGL + SetGridColor( COLOR4D( 0.8, 0.8, 0.8, 0.1 ) ); + // Tesselator initialization tesselator = gluNewTess(); InitTesselatorCallbacks( tesselator ); diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 4066f8d9e6..58fef65260 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -27,6 +27,7 @@ #include #include +#include using namespace KiGfx; @@ -37,6 +38,7 @@ WX_VIEW_CONTROLS::WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ) : m_autoPanEnabled( false ), m_autoPanMargin( 0.1 ), m_autoPanSpeed( 0.15 ), + m_snappingEnabled( true ), m_parentPanel( aParentPanel ) { m_parentPanel->Connect( wxEVT_MOTION, wxMouseEventHandler( @@ -203,7 +205,16 @@ void WX_VIEW_CONTROLS::SetGrabMouse( bool aEnabled ) } -void WX_VIEW_CONTROLS::handleAutoPanning( wxMouseEvent& aEvent ) +VECTOR2D WX_VIEW_CONTROLS::GetCursorPosition() const +{ + if( m_snappingEnabled ) + return m_view->GetGAL()->GetGridPoint( m_mousePosition ); + + return m_mousePosition; +} + + +void WX_VIEW_CONTROLS::handleAutoPanning( const wxMouseEvent& aEvent ) { VECTOR2D p( aEvent.GetX(), aEvent.GetY() ); diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 0e334694a1..2b87606de0 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -652,13 +652,23 @@ public: /** * @brief Set the grid size. * - * @param aGridSize is a vector containing the grid size in x- and y direction. + * @param aGridSize is a vector containing the grid size in x and y direction. */ inline void SetGridSize( const VECTOR2D& aGridSize ) { gridSize = aGridSize; } + /** + * @brief Returns the grid size. + * + * @return A vector containing the grid size in x and y direction. + */ + inline const VECTOR2D& GetGridSize() const + { + return gridSize; + } + /** * @brief Set the grid color. * @@ -702,6 +712,17 @@ public: /// @brief Draw the grid void DrawGrid(); + + /** + * Function GetGridPoint() + * For a given point it returns the nearest point belonging to the grid. + * + * @param aPoint is the point for which the grid point is searched. + * @return The nearest grid point. + */ + VECTOR2D GetGridPoint( VECTOR2D aPoint ) const; + + /** * @brief Change the grid display style. * diff --git a/include/view/wx_view_controls.h b/include/view/wx_view_controls.h index 47da6b9126..7c9621fb58 100644 --- a/include/view/wx_view_controls.h +++ b/include/view/wx_view_controls.h @@ -61,10 +61,21 @@ public: * Function SetGrabMouse() * Enables/disables mouse cursor grabbing (limits the movement field only to the panel area). * - * @param aEnabled says whether the option should enabled or disabled. + * @param aEnabled says whether the option should be enabled or disabled. */ void SetGrabMouse( bool aEnabled ); + /** + * Function SetSnapping() + * Enables/disables snapping cursor to grid. + * + * @param aEnabled says whether the opion should be enabled or disabled. + */ + void SetSnapping( bool aEnabled ) + { + m_snappingEnabled = aEnabled; + } + /** * Function SetAutoPan() * Enables/disables autopanning (panning when mouse cursor reaches the panel border). @@ -73,20 +84,31 @@ public: */ void SetAutoPan( bool aEnabled ) { - m_autoPanEnabled = true; + m_autoPanEnabled = aEnabled; } /** * Function GetMousePosition() - * Returns the current mouse cursor position in the screen coordinates. + * Returns the current mouse pointer position in the screen coordinates. Note, that it may be + * different from the cursor position if snapping is enabled (@see GetCursorPosition()). * - * @return The current mouse cursor position. + * @return The current mouse pointer position. */ const VECTOR2D& GetMousePosition() const { return m_mousePosition; } + + /** + * Function GetCursorPosition() + * Returns the current cursor position in the screen coordinates. Note, that it may be + * different from the mouse pointer position if snapping is enabled (@see GetMousePosition()). + * + * @return The current cursor position. + */ + VECTOR2D GetCursorPosition() const; + private: enum State { IDLE = 1, @@ -95,7 +117,7 @@ private: }; /// Computes new viewport settings while in autopanning mode - void handleAutoPanning( wxMouseEvent& aEvent ); + void handleAutoPanning( const wxMouseEvent& aEvent ); /// Current state of VIEW_CONTROLS State m_state; @@ -105,11 +127,16 @@ private: /// Flag for grabbing the mouse cursor bool m_grabMouse; + /// Flag for turning on autopanning bool m_autoPanEnabled; /// Distance from cursor to VIEW edge when panning is active float m_autoPanMargin; + + /// Should the cursor snap to grid or move freely + bool m_snappingEnabled; + /// How fast is panning when in auto mode float m_autoPanSpeed; From 00a2da7d185bf2dff01f039d5df4b6bf5b75cc37 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 28 Aug 2013 17:06:07 +0200 Subject: [PATCH 251/415] Fixed cursor drawing for OpenGL. --- common/gal/cairo/cairo_gal.cpp | 2 +- common/gal/opengl/opengl_gal.cpp | 65 ++++++++++++++++++-------------- include/gal/cairo/cairo_gal.h | 2 +- include/gal/opengl/opengl_gal.h | 7 ++++ 4 files changed, 46 insertions(+), 30 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 058c34b338..4ed047b24c 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -792,7 +792,7 @@ void CAIRO_GAL::ClearTarget( RenderTarget aTarget ) void CAIRO_GAL::DrawCursor( const VECTOR2D& aCursorPosition ) { // Now we should only store the position of the mouse cursor - // The real drawing routines are in EndDrawing() + // The real drawing routines are in blitCursor() cursorPosition = VECTOR2D( aCursorPosition.x - cursorSize / 2, aCursorPosition.y - cursorSize / 2 ); } diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index efe801d137..5b584ff10e 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -214,9 +214,11 @@ void OPENGL_GAL::EndDrawing() overlayManager.EndDrawing(); // Draw the remaining contents, blit the rendering targets to the screen, swap the buffers - glFlush(); compositor.DrawBuffer( mainBuffer ); compositor.DrawBuffer( overlayBuffer ); + blitCursor(); + + glFlush(); SwapBuffers(); delete clientDC; @@ -737,33 +739,10 @@ void OPENGL_GAL::ClearTarget( RenderTarget aTarget ) void OPENGL_GAL::DrawCursor( const VECTOR2D& aCursorPosition ) { - if( !isCursorEnabled ) - return; - - compositor.SetBuffer( OPENGL_COMPOSITOR::DIRECT_RENDERING ); - - // Invert y axis - VECTOR2D cursorPosition = VECTOR2D( aCursorPosition.x, screenSize.y - aCursorPosition.y ); - - VECTOR2D cursorBegin = ToWorld( cursorPosition - - VECTOR2D( cursorSize / 2, cursorSize / 2 ) ); - VECTOR2D cursorEnd = ToWorld( cursorPosition + - VECTOR2D( cursorSize / 2, cursorSize / 2 ) ); - VECTOR2D cursorCenter = ( cursorBegin + cursorEnd ) / 2.0; - - glLineWidth( 1.0 ); - glColor4d( cursorColor.r, cursorColor.g, cursorColor.b, cursorColor.a ); - - glBegin( GL_LINES ); - glVertex3f( cursorCenter.x, cursorBegin.y, GetMinDepth() ); - glVertex3f( cursorCenter.x, cursorEnd.y, GetMinDepth() ); - - glVertex3f( cursorBegin.x, cursorCenter.y, GetMinDepth() ); - glVertex3f( cursorEnd.x, cursorCenter.y, GetMinDepth() ); - glEnd(); - - // Restore the default color, so textures will be drawn properly - glColor4d( 1.0, 1.0, 1.0, 1.0 ); + // Now we should only store the position of the mouse cursor + // The real drawing routines are in blitCursor() + cursorPosition = VECTOR2D( aCursorPosition.x, + screenSize.y - aCursorPosition.y ); // invert Y axis } @@ -969,6 +948,36 @@ void OPENGL_GAL::initCursor( int aCursorSize ) } +void OPENGL_GAL::blitCursor() +{ + if( !isCursorEnabled ) + return; + + compositor.SetBuffer( OPENGL_COMPOSITOR::DIRECT_RENDERING ); + + VECTOR2D cursorBegin = ToWorld( cursorPosition - + VECTOR2D( cursorSize / 2, cursorSize / 2 ) ); + VECTOR2D cursorEnd = ToWorld( cursorPosition + + VECTOR2D( cursorSize / 2, cursorSize / 2 ) ); + VECTOR2D cursorCenter = ( cursorBegin + cursorEnd ) / 2.0; + + glDisable( GL_TEXTURE_2D ); + glLineWidth( 1.0 ); + glColor4d( cursorColor.r, cursorColor.g, cursorColor.b, cursorColor.a ); + + glBegin( GL_LINES ); + glVertex2d( cursorCenter.x, cursorBegin.y ); + glVertex2d( cursorCenter.x, cursorEnd.y ); + + glVertex2d( cursorBegin.x, cursorCenter.y ); + glVertex2d( cursorEnd.x, cursorCenter.y ); + glEnd(); + + // Restore the default color, so textures will be drawn properly + glColor4d( 1.0, 1.0, 1.0, 1.0 ); +} + + unsigned int OPENGL_GAL::getNewGroupNumber() { wxASSERT_MSG( groups.size() < std::numeric_limits::max(), diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index be1e2fc7b4..77ba5c0a1e 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -357,7 +357,7 @@ private: virtual void initCursor( int aCursorSize ); /** - * @brief Blits cursor into current screen. + * @brief Blits cursor into the current screen. */ virtual void blitCursor( wxBufferedDC& clientDC ); diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 170b6c7a50..f8c0addee9 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -297,6 +297,8 @@ private: bool isShaderInitialized; ///< Was the shader initialized? bool isGrouping; ///< Was a group started? + VECTOR2D cursorPosition; ///< Current cursor position + // Polygon tesselation /// The tessellator GLUtesselator* tesselator; @@ -363,6 +365,11 @@ private: /// @copydoc GAL::initCursor() virtual void initCursor( int aCursorSize ); + /** + * @brief Blits cursor into the current screen. + */ + void blitCursor(); + /** * @brief Returns a valid key that can be used as a new group number. * From d62e474850619df452af7a82edb30042145568a5 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 29 Aug 2013 12:03:57 +0200 Subject: [PATCH 252/415] Reduced displayed events information. --- common/drawpanel_gal.cpp | 1 - common/tool/tool_manager.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 5c1925b66f..8f68332aa3 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -212,7 +212,6 @@ void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent ) } else { - printf( "evType %d\n", aEvent.GetEventType() ); m_eventDispatcher->DispatchWxEvent( aEvent ); } diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 1315d083a8..2d1ce65bb7 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -214,7 +214,7 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) { - printf( "process: %s\n", aEvent.Format().c_str() ); + wxLogDebug( "event: %s", aEvent.Format().c_str() ); dispatchInternal( aEvent ); From 1bf848e41836eee1294cde1c3d1f487936917aca Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 29 Aug 2013 12:06:06 +0200 Subject: [PATCH 253/415] Unified Set/GetPosition() for BOARD_ITEMs. --- include/class_board_item.h | 4 ++++ pcbnew/class_board.cpp | 15 ++++++++++++++- pcbnew/class_board.h | 4 ++++ pcbnew/class_pcb_text.h | 10 ++++++++++ pcbnew/class_text_mod.h | 10 ++++++++++ 5 files changed, 42 insertions(+), 1 deletion(-) diff --git a/include/class_board_item.h b/include/class_board_item.h index ea0a10b38f..f63e141ed7 100644 --- a/include/class_board_item.h +++ b/include/class_board_item.h @@ -90,6 +90,10 @@ public: // Do not create a copy constructor. The one generated by the compiler is adequate. + virtual const wxPoint& GetPosition() const = 0; + + virtual void SetPosition( const wxPoint& aPos ) = 0; + /** * A value of wxPoint(0,0) which can be passed to the Draw() functions. */ diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 47a1df6ccb..d49685b8ec 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -123,9 +123,22 @@ BOARD::~BOARD() } +const wxPoint& BOARD::GetPosition() const +{ + wxLogWarning( wxT( "This should not be called on the BOARD object") ); + + return ZeroOffset; +} + +void BOARD::SetPosition( const wxPoint& aPos ) +{ + wxLogWarning( wxT( "This should not be called on the BOARD object") ); +} + + void BOARD::Move( const wxPoint& aMoveVector ) // overload { - + wxLogWarning( wxT( "This should not be called on the BOARD object") ); } diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index 3b8e614475..87fa424973 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -308,6 +308,10 @@ public: BOARD(); ~BOARD(); + virtual const wxPoint& GetPosition() const; + + virtual void SetPosition( const wxPoint& aPos ); + bool IsEmpty() const { return m_Drawings.GetCount() == 0 && m_Modules.GetCount() == 0 && diff --git a/pcbnew/class_pcb_text.h b/pcbnew/class_pcb_text.h index 4bf5395b63..d8896d7ea9 100644 --- a/pcbnew/class_pcb_text.h +++ b/pcbnew/class_pcb_text.h @@ -49,6 +49,16 @@ public: ~TEXTE_PCB(); + virtual const wxPoint& GetPosition() const + { + return m_Pos; + } + + virtual void SetPosition( const wxPoint& aPos ) + { + m_Pos = aPos; + } + void Move( const wxPoint& aMoveVector ) { m_Pos += aMoveVector; diff --git a/pcbnew/class_text_mod.h b/pcbnew/class_text_mod.h index 42add84304..635cef14de 100644 --- a/pcbnew/class_text_mod.h +++ b/pcbnew/class_text_mod.h @@ -79,6 +79,16 @@ public: ~TEXTE_MODULE(); + virtual const wxPoint& GetPosition() const + { + return m_Pos; + } + + virtual void SetPosition( const wxPoint& aPos ) + { + m_Pos = aPos; + } + TEXTE_MODULE* Next() const { return (TEXTE_MODULE*) Pnext; } TEXTE_MODULE* Back() const { return (TEXTE_MODULE*) Pback; } From 9c6998c6bc1ea914997028d590d6e6af6fa74be1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 30 Aug 2013 10:23:18 +0200 Subject: [PATCH 254/415] Added SELECTION_TOOL::GetSelection() --- pcbnew/tools/selection_tool.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index bec3a8a871..6d485395fa 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -55,6 +55,10 @@ public: void Reset(); int Main( TOOL_EVENT& aEvent ); + const std::set& GetSelection() const + { + return m_selectedItems; + } private: void selectSingle( const VECTOR2I& aWhere ); From 367924e669c5efce6d4ee9fa0db73a0d33ff47ec Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 30 Aug 2013 10:37:26 +0200 Subject: [PATCH 255/415] Added stacking for tools. --- common/tool/tool_interactive.cpp | 5 --- common/tool/tool_manager.cpp | 74 +++++++++++++++++++++++++------- include/tool/tool_manager.h | 19 ++++++-- 3 files changed, 73 insertions(+), 25 deletions(-) diff --git a/common/tool/tool_interactive.cpp b/common/tool/tool_interactive.cpp index 3c04d81cb1..c69030090a 100644 --- a/common/tool/tool_interactive.cpp +++ b/common/tool/tool_interactive.cpp @@ -56,11 +56,6 @@ void TOOL_INTERACTIVE::goInternal( TOOL_STATE_FUNC& aState, const TOOL_EVENT_LIS } -void TOOL_INTERACTIVE::Reset() -{ -} - - void TOOL_INTERACTIVE::SetContextMenu( CONTEXT_MENU* aMenu, TOOL_ContextMenuTrigger aTrigger ) { aMenu->setTool( this ); diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 2d1ce65bb7..c200031930 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -92,24 +92,40 @@ void TOOL_MANAGER::RegisterTool( TOOL_BASE* aTool ) } -void TOOL_MANAGER::InvokeTool( TOOL_ID aToolId ) +bool TOOL_MANAGER::InvokeTool( TOOL_ID aToolId ) { TOOL_BASE* tool = FindTool( aToolId ); if( tool && tool->GetType() == TOOL_Interactive ) + { + // If the tool is already active, do not invoke it again + if( m_toolIdIndex[aToolId]->idle == false ) + return false; + + m_toolIdIndex[aToolId]->idle = false; static_cast( tool )->Reset(); - TOOL_EVENT evt( TC_Command, TA_ActivateTool, tool->GetName() ); - ProcessEvent( evt ); + TOOL_EVENT evt( TC_Command, TA_ActivateTool, tool->GetName() ); + ProcessEvent( evt ); + + // Save the tool on the front of the processing queue + m_activeTools.push_front( aToolId ); + + return true; + } + + return false; } -void TOOL_MANAGER::InvokeTool( const std::string& aName ) +bool TOOL_MANAGER::InvokeTool( const std::string& aName ) { TOOL_BASE* tool = FindTool( aName ); if( tool ) - InvokeTool( tool->GetId() ); + return InvokeTool( tool->GetId() ); + + return false; } @@ -159,13 +175,18 @@ optional TOOL_MANAGER::ScheduleWait( TOOL_BASE* aTool, void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) { // iterate over all registered tools - BOOST_FOREACH( ToolState* st, m_toolState | boost::adaptors::map_values ) - { + BOOST_FOREACH( TOOL_ID toolId, m_activeTools ) + { + ToolState* st = m_toolIdIndex[toolId]; + // the tool state handler is waiting for events (i.e. called Wait() method) if( st->pendingWait ) { if( st->waitEvents.Matches( aEvent ) ) { + // By default, already processed events are not passed further + m_passEvent = false; + // got matching event? clear wait list and wake up the coroutine st->wakeupEvent = aEvent; st->pendingWait = false; @@ -173,16 +194,22 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) st->cofunc->Resume(); if( !st->cofunc->Running() ) { - delete st->cofunc; - st->cofunc = NULL; + finishTool( st ); } + + // The tool requested to stop propagating event to other tools + if( !m_passEvent ) + break; } } - else + } + + BOOST_FOREACH( ToolState* st, m_toolState | boost::adaptors::map_values ) + { + if( !st->pendingWait ) { // no state handler in progress - check if there are any transitions (defined by // Go() method that match the event. - if( st->transitions.size() ) { BOOST_FOREACH( Transition tr, st->transitions ) @@ -201,8 +228,7 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) if( !st->cofunc->Running() ) { - delete st->cofunc; - st->cofunc = NULL; + finishTool( st ); } } } @@ -212,14 +238,28 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) } +void TOOL_MANAGER::finishTool( ToolState* aState ) +{ + wxASSERT( m_activeTools.front() == aState->theTool->GetId() ); + + aState->idle = true; + m_activeTools.erase( m_activeTools.begin() ); + + delete aState->cofunc; + aState->cofunc = NULL; +} + + bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) { wxLogDebug( "event: %s", aEvent.Format().c_str() ); dispatchInternal( aEvent ); - BOOST_FOREACH( ToolState* st, m_toolState | boost::adaptors::map_values ) - { + BOOST_FOREACH( TOOL_ID toolId, m_activeTools ) + { + ToolState* st = m_toolIdIndex[toolId]; + if( st->contextMenuTrigger == CMENU_NOW ) { st->pendingWait = true; @@ -273,8 +313,10 @@ void TOOL_MANAGER::SetEnvironment( EDA_ITEM* aModel, KiGfx::VIEW* aView, m_editFrame = aFrame; // Reset state of the registered tools - BOOST_FOREACH( TOOL_BASE* tool, m_toolState | boost::adaptors::map_keys ) + BOOST_FOREACH( TOOL_ID toolId, m_activeTools ) { + TOOL_BASE* tool = m_toolIdIndex[toolId]->theTool; + if( tool->GetType() == TOOL_Interactive ) static_cast( tool )->Reset(); } diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index 36599977a0..771427812d 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -72,8 +72,8 @@ public: * Calls a tool by sending a tool activation event to tool of given ID or name. * An user-defined parameter object can be also passed */ - void InvokeTool( TOOL_ID aToolId ); - void InvokeTool( const std::string& aName ); + bool InvokeTool( TOOL_ID aToolId ); + bool InvokeTool( const std::string& aName ); template void InvokeTool( const std::string& aName, const Parameters& aToolParams ); @@ -153,20 +153,31 @@ public: void ScheduleContextMenu( TOOL_BASE* aTool, CONTEXT_MENU* aMenu, TOOL_ContextMenuTrigger aTrigger ); -private: - void dispatchInternal( TOOL_EVENT& aEvent ); + /** + * Allows a tool pass the already handled event to be passed to the next tool on the stack. + */ + void PassEvent() + { + m_passEvent = true; + } +private: struct ToolState; typedef std::pair Transition; + void dispatchInternal( TOOL_EVENT& aEvent ); + void finishTool( ToolState* aState ); + std::map m_toolState; std::map m_toolNameIndex; std::map m_toolIdIndex; + std::deque m_activeTools; EDA_ITEM* m_model; KiGfx::VIEW* m_view; KiGfx::VIEW_CONTROLS* m_viewControls; wxWindow* m_editFrame; + bool m_passEvent; ToolState* m_currentTool; }; From a2f0110f3dff2214435a3a1dc8393388f06c77df Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 30 Aug 2013 14:02:57 +0200 Subject: [PATCH 256/415] Added selection box for DIMENSION. --- pcbnew/class_dimension.cpp | 12 ++++++++++ pcbnew/class_dimension.h | 3 +++ pcbnew/pcb_painter.cpp | 48 ++++++++++++++++++++++---------------- pcbnew/pcb_painter.h | 2 +- 4 files changed, 44 insertions(+), 21 deletions(-) diff --git a/pcbnew/class_dimension.cpp b/pcbnew/class_dimension.cpp index 6a2cfb407b..6cd8c58bec 100644 --- a/pcbnew/class_dimension.cpp +++ b/pcbnew/class_dimension.cpp @@ -489,6 +489,18 @@ wxString DIMENSION::GetSelectMenuText() const } +void DIMENSION::ViewGetLayers( int aLayers[], int& aCount ) const +{ + // Layer that simply displays the text + aLayers[0] = m_Layer; + + // On the general purpose overlay there is a selection box displayed + aLayers[1] = ITEM_GAL_LAYER( GP_OVERLAY ); + + aCount = 2; +} + + EDA_ITEM* DIMENSION::Clone() const { return new DIMENSION( *this ); diff --git a/pcbnew/class_dimension.h b/pcbnew/class_dimension.h index a04920cce4..c92aae7433 100644 --- a/pcbnew/class_dimension.h +++ b/pcbnew/class_dimension.h @@ -144,6 +144,9 @@ public: EDA_ITEM* Clone() const; + /// @copydoc VIEW_ITEM::ViewGetLayers() + virtual void ViewGetLayers( int aLayers[], int& aCount ) const; + #if defined(DEBUG) virtual void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override #endif diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 11a278e924..36ab6588ee 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -236,7 +236,7 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) break; case PCB_DIMENSION_T: - draw( (DIMENSION*) aItem ); + draw( (DIMENSION*) aItem, aLayer ); break; case PCB_TARGET_T: @@ -784,29 +784,37 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone ) } -void PCB_PAINTER::draw( const DIMENSION* aDimension ) +void PCB_PAINTER::draw( const DIMENSION* aDimension, int aLayer ) { - int layer = aDimension->GetLayer(); - COLOR4D strokeColor = GetColor( NULL, layer ); + if( aLayer == ITEM_GAL_LAYER( GP_OVERLAY ) ) + { + if( aDimension->IsSelected() ) + drawSelectionBox( aDimension ); + } + else + { + int layer = aDimension->GetLayer(); + COLOR4D strokeColor = GetColor( NULL, layer ); - m_gal->SetStrokeColor( strokeColor ); - m_gal->SetIsFill( false ); - m_gal->SetIsStroke( true ); - m_gal->SetLineWidth( aDimension->GetWidth() ); + m_gal->SetStrokeColor( strokeColor ); + m_gal->SetIsFill( false ); + m_gal->SetIsStroke( true ); + m_gal->SetLineWidth( aDimension->GetWidth() ); - // Draw an arrow - m_gal->DrawLine( VECTOR2D( aDimension->m_crossBarO ), VECTOR2D( aDimension->m_crossBarF ) ); - m_gal->DrawLine( VECTOR2D( aDimension->m_featureLineGO ), - VECTOR2D( aDimension->m_featureLineGF ) ); - m_gal->DrawLine( VECTOR2D( aDimension->m_featureLineDO ), - VECTOR2D( aDimension->m_featureLineDF ) ); - m_gal->DrawLine( VECTOR2D( aDimension->m_arrowD1O ), VECTOR2D( aDimension->m_arrowD1F ) ); - m_gal->DrawLine( VECTOR2D( aDimension->m_arrowD2O ), VECTOR2D( aDimension->m_arrowD2F ) ); - m_gal->DrawLine( VECTOR2D( aDimension->m_arrowG1O ), VECTOR2D( aDimension->m_arrowG1F ) ); - m_gal->DrawLine( VECTOR2D( aDimension->m_arrowG2O ), VECTOR2D( aDimension->m_arrowG2F ) ); + // Draw an arrow + m_gal->DrawLine( VECTOR2D( aDimension->m_crossBarO ), VECTOR2D( aDimension->m_crossBarF ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_featureLineGO ), + VECTOR2D( aDimension->m_featureLineGF ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_featureLineDO ), + VECTOR2D( aDimension->m_featureLineDF ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_arrowD1O ), VECTOR2D( aDimension->m_arrowD1F ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_arrowD2O ), VECTOR2D( aDimension->m_arrowD2F ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_arrowG1O ), VECTOR2D( aDimension->m_arrowG1F ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_arrowG2O ), VECTOR2D( aDimension->m_arrowG2F ) ); - // Draw text - draw( &aDimension->Text(), layer ); + // Draw text + draw( &aDimension->Text(), layer ); + } } diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 14ae4e156e..952a042f39 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -145,7 +145,7 @@ protected: void draw( const TEXTE_PCB*, int ); void draw( const TEXTE_MODULE*, int ); void draw( const ZONE_CONTAINER* ); - void draw( const DIMENSION* ); + void draw( const DIMENSION*, int ); void draw( const PCB_TARGET* ); /// Draws a white semitransparent box indicating an item as selected From bf9b535f6677a6d170baba0036b418854a53573b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 30 Aug 2013 14:43:18 +0200 Subject: [PATCH 257/415] Fixed warning. --- common/view/wx_view_controls.cpp | 2 +- include/view/wx_view_controls.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 58fef65260..465b94f8ae 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -35,10 +35,10 @@ WX_VIEW_CONTROLS::WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ) : VIEW_CONTROLS( aView ), m_state( IDLE ), m_grabMouse( false ), + m_snappingEnabled( true ), m_autoPanEnabled( false ), m_autoPanMargin( 0.1 ), m_autoPanSpeed( 0.15 ), - m_snappingEnabled( true ), m_parentPanel( aParentPanel ) { m_parentPanel->Connect( wxEVT_MOTION, wxMouseEventHandler( diff --git a/include/view/wx_view_controls.h b/include/view/wx_view_controls.h index 7c9621fb58..81c3ed1d83 100644 --- a/include/view/wx_view_controls.h +++ b/include/view/wx_view_controls.h @@ -128,15 +128,15 @@ private: /// Flag for grabbing the mouse cursor bool m_grabMouse; + /// Should the cursor snap to grid or move freely + bool m_snappingEnabled; + /// Flag for turning on autopanning bool m_autoPanEnabled; /// Distance from cursor to VIEW edge when panning is active float m_autoPanMargin; - /// Should the cursor snap to grid or move freely - bool m_snappingEnabled; - /// How fast is panning when in auto mode float m_autoPanSpeed; From 3b046c409bc24b8f210452c64550509623904f84 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 2 Sep 2013 11:49:46 +0200 Subject: [PATCH 258/415] Changed way of naming VIEW_ITEM update flags to be more explicit. VIEW_ITEMs save the layer numbers they use, it allowed to speed up removal of items. --- common/drawpanel_gal.cpp | 9 ------- common/view/view.cpp | 54 ++++++++++++++++++++++++++------------- common/view/view_item.cpp | 14 ++++++++++ include/base_struct.h | 12 ++++----- include/view/view.h | 2 +- include/view/view_item.h | 42 ++++++++++++++++++++++++++---- 6 files changed, 94 insertions(+), 39 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 8f68332aa3..6df67bb3a0 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -73,15 +73,6 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin m_view->SetPainter( m_painter ); m_view->SetGAL( m_gal ); - // View uses layers to display EDA_ITEMs (item may be displayed on several layers, for example - // pad may be shown on pad, pad hole and solder paste layers). There are usual copper layers - // (eg. F.Cu, B.Cu, internal and so on) and layers for displaying objects such as texts, - // silkscreen, pads, vias, etc. - for( int i = 0; i < TOTAL_LAYER_COUNT; i++ ) - { - m_view->AddLayer( i ); - } - m_viewControls = new KiGfx::WX_VIEW_CONTROLS( m_view, this ); Connect( wxEVT_PAINT, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); diff --git a/common/view/view.cpp b/common/view/view.cpp index 86333d51c5..4fcd86b9ba 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -50,6 +50,15 @@ VIEW::VIEW( bool aIsDynamic ) : // Redraw everything at the beginning for( int i = 0; i < TARGETS_NUMBER; ++i ) MarkTargetDirty( i ); + + // View uses layers to display EDA_ITEMs (item may be displayed on several layers, for example + // pad may be shown on pad, pad hole and solder paste layers). There are usual copper layers + // (eg. F.Cu, B.Cu, internal and so on) and layers for displaying objects such as texts, + // silkscreen, pads, vias, etc. + for( int i = 0; i < VIEW_MAX_LAYERS; i++ ) + { + AddLayer( i ); + } } @@ -85,6 +94,7 @@ void VIEW::Add( VIEW_ITEM* aItem ) int layers[VIEW_MAX_LAYERS], layers_count; aItem->ViewGetLayers( layers, layers_count ); + aItem->saveLayers( layers, layers_count ); for( int i = 0; i < layers_count; i++ ) { @@ -103,12 +113,14 @@ void VIEW::Remove( VIEW_ITEM* aItem ) if( m_dynamic ) aItem->m_view = NULL; -// fixme: this is so sloooow! - for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) + int layers[VIEW::VIEW_MAX_LAYERS], layers_count; + aItem->getLayers( layers, layers_count ); + + for( int i = 0; i < layers_count; ++i ) { - VIEW_LAYER* l = & ( ( *i ).second ); - l->items->Remove( aItem ); - l->isDirty = true; + VIEW_LAYER& l = m_layers[layers[i]]; + l.items->Remove( aItem ); + l.isDirty = true; } } @@ -595,7 +607,9 @@ void VIEW::draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate ) const void VIEW::draw( VIEW_ITEM* aItem, bool aImmediate ) const { int layers[VIEW_MAX_LAYERS], layers_count; - aItem->ViewGetLayers( layers, layers_count ); + + aItem->getLayers( layers, layers_count ); + // Sorting is needed for drawing order dependent GALs (like Cairo) SortLayers( layers, layers_count ); for( int i = 0; i < layers_count; ++i ) @@ -773,26 +787,30 @@ void VIEW::clearGroupCache() void VIEW::invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ) { int layers[VIEW_MAX_LAYERS], layers_count; - aItem->ViewGetLayers( layers, layers_count ); + aItem->getLayers( layers, layers_count ); // Iterate through layers used by the item and recache it immediately for( int i = 0; i < layers_count; i++ ) { - if( aUpdateFlags == VIEW_ITEM::APPEARANCE ) + int layerId = layers[i]; + + if( aUpdateFlags & VIEW_ITEM::GEOMETRY ) { - updateItemAppearance( aItem, layers[i] ); - } - else if( aUpdateFlags == VIEW_ITEM::GEOMETRY ) - { - // Reinsert item + // Reinsert item in order to update bounding box Remove( aItem ); Add( aItem ); - updateItemGeometry( aItem, layers[i]); /// TODO is it still necessary? + + if( isCached( layerId ) ) + updateItemGeometry( aItem, layerId ); /// TODO is it still necessary? + } + else if( aUpdateFlags & VIEW_ITEM::COLOR ) + { + updateItemColor( aItem, layerId ); } // Mark those layers as dirty, so the VIEW will be refreshed - m_layers[layers[i]].isDirty = true; - MarkTargetDirty( m_layers[layers[i]].target ); // TODO remove? + m_layers[layerId].isDirty = true; + MarkTargetDirty( m_layers[layerId].target ); // TODO remove? } } @@ -812,7 +830,7 @@ void VIEW::sortLayers() } -void VIEW::updateItemAppearance( VIEW_ITEM* aItem, int aLayer ) +void VIEW::updateItemColor( VIEW_ITEM* aItem, int aLayer ) { wxASSERT( (unsigned) aLayer < m_layers.size() ); @@ -875,13 +893,13 @@ void VIEW::RecacheAllItems( bool aImmediately ) { VIEW_LAYER* l = &( ( *i ).second ); - // Obviously, there is only one cached target that has to be recomputed if( isCached( l->id ) ) { m_gal->SetTarget( l->target ); m_gal->SetLayerDepth( l->renderingOrder ); recacheLayer visitor( this, m_gal, l->id, aImmediately ); l->items->Query( r, visitor ); + l->isDirty = false; } } diff --git a/common/view/view_item.cpp b/common/view/view_item.cpp index 3d1fcc1f35..4104d06c1a 100644 --- a/common/view/view_item.cpp +++ b/common/view/view_item.cpp @@ -71,6 +71,20 @@ void VIEW_ITEM::ViewRelease() } +void VIEW_ITEM::getLayers( int* aLayers, int& aCount ) const +{ + int* layersPtr = aLayers; + for( int i = 0; i < m_layers.size(); ++i ) + { + if( m_layers[i] ) + *layersPtr++ = i; + + } + + aCount = m_layers.count(); +} + + int VIEW_ITEM::getGroup( int aLayer ) const { for( int i = 0; i < m_groupsSize; ++i ) diff --git a/include/base_struct.h b/include/base_struct.h index 67e427eae6..b61368e0d1 100644 --- a/include/base_struct.h +++ b/include/base_struct.h @@ -472,13 +472,13 @@ public: inline bool IsHighlighted() const { return m_Flags & HIGHLIGHTED; } inline bool IsBrightened() const { return m_Flags & BRIGHTENED; } - inline void SetSelected() { SetFlags( SELECTED ); ViewUpdate( APPEARANCE ); } - inline void SetHighlighted() { SetFlags( HIGHLIGHTED ); ViewUpdate( APPEARANCE ); } - inline void SetBrightened() { SetFlags( BRIGHTENED ); ViewUpdate( APPEARANCE ); } + inline void SetSelected() { SetFlags( SELECTED ); ViewUpdate( COLOR ); } + inline void SetHighlighted() { SetFlags( HIGHLIGHTED ); ViewUpdate( COLOR ); } + inline void SetBrightened() { SetFlags( BRIGHTENED ); ViewUpdate( COLOR ); } - inline void ClearSelected() { ClearFlags( SELECTED ); ViewUpdate( APPEARANCE ); } - inline void ClearHighlighted() { ClearFlags( HIGHLIGHTED ); ViewUpdate( APPEARANCE ); } - inline void ClearBrightened() { ClearFlags( BRIGHTENED ); ViewUpdate( APPEARANCE ); } + inline void ClearSelected() { ClearFlags( SELECTED ); ViewUpdate( COLOR ); } + inline void ClearHighlighted() { ClearFlags( HIGHLIGHTED ); ViewUpdate( COLOR ); } + inline void ClearBrightened() { ClearFlags( BRIGHTENED ); ViewUpdate( COLOR ); } void SetModified(); diff --git a/include/view/view.h b/include/view/view.h index 3fd1935db6..4ad11828f5 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -510,7 +510,7 @@ private: void clearGroupCache(); /// Updates colors that are used for an item to be drawn - void updateItemAppearance( VIEW_ITEM* aItem, int aLayer ); + void updateItemColor( VIEW_ITEM* aItem, int aLayer ); /// Updates all informations needed to draw an item void updateItemGeometry( VIEW_ITEM* aItem, int aLayer ); diff --git a/include/view/view_item.h b/include/view/view_item.h index 17325d338b..49f0b7d492 100644 --- a/include/view/view_item.h +++ b/include/view/view_item.h @@ -31,14 +31,16 @@ #define __VIEW_ITEM_H #include +#include #include +#include +#include namespace KiGfx { // Forward declarations class GAL; class PAINTER; -class VIEW; /** * Class VIEW_ITEM - @@ -62,12 +64,14 @@ public: * - ALL: all flags above */ enum ViewUpdateFlags { - APPEARANCE = 0x1, - GEOMETRY = 0x2, - ALL = 0xff + APPEARANCE = 0x01, /// Visibility flag has changed + COLOR = 0x02, /// Color has changed + GEOMETRY = 0x04, /// Position or shape has changed + ALL = 0xff }; - VIEW_ITEM() : m_view( NULL ), m_visible( true ), m_groups( NULL ), m_groupsSize( 0 ) {} + VIEW_ITEM() : m_view( NULL ), m_visible( true ), m_groups( NULL ), + m_groupsSize( 0 ) {} /** * Destructor. For dynamic views, removes the item from the view. @@ -165,6 +169,15 @@ public: protected: friend class VIEW; + /** + * Function getLayers() + * Returns layer numbers used by the item. + * + * @param aLayers[]: output layer index array + * @param aCount: number of layer indices in aLayers[] + */ + virtual void getLayers( int* aLayers, int& aCount ) const; + /** * Function viewAssign() * Assigns the item to a given dynamic VIEW. Called internally by the VIEW. @@ -229,6 +242,25 @@ protected: * @returns true in case it is cached at least for one layer. */ virtual bool storesGroups() const; + + /// Stores layer numbers used by the item. + std::bitset m_layers; + + /** + * Function saveLayers() + * Saves layers used by the item. + * + * @param aLayers is an array containing layer numbers to be saved. + * @param aCount is the size of the array. + */ + virtual void saveLayers( int* aLayers, int aCount ) + { + m_layers.reset(); + + for( int i = 0; i < aCount; ++i ) + m_layers.set(aLayers[i]); + } + }; } // namespace KiGfx From 0b17e5d288548e01e6e950331798c1dd80196453 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 2 Sep 2013 14:21:12 +0200 Subject: [PATCH 259/415] Added some comments and changed names of classes to match the coding rules. --- common/tool/tool_interactive.cpp | 2 +- common/tool/tool_manager.cpp | 50 +++++++++++++++++++++----------- include/tool/tool_event.h | 2 +- include/tool/tool_interactive.h | 2 +- include/tool/tool_manager.h | 16 +++++----- 5 files changed, 44 insertions(+), 28 deletions(-) diff --git a/common/tool/tool_interactive.cpp b/common/tool/tool_interactive.cpp index c69030090a..5d3ee77fcc 100644 --- a/common/tool/tool_interactive.cpp +++ b/common/tool/tool_interactive.cpp @@ -56,7 +56,7 @@ void TOOL_INTERACTIVE::goInternal( TOOL_STATE_FUNC& aState, const TOOL_EVENT_LIS } -void TOOL_INTERACTIVE::SetContextMenu( CONTEXT_MENU* aMenu, TOOL_ContextMenuTrigger aTrigger ) +void TOOL_INTERACTIVE::SetContextMenu( CONTEXT_MENU* aMenu, CONTEXT_MENU_TRIGGER aTrigger ) { aMenu->setTool( this ); m_toolMgr->ScheduleContextMenu( this, aMenu, aTrigger ); diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index c200031930..1601b7aece 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -45,23 +45,39 @@ using boost::optional; using namespace std; -struct TOOL_MANAGER::ToolState +/// Struct describing the current state of a TOOL +struct TOOL_MANAGER::TOOL_STATE { + /// The tool itself TOOL_BASE* theTool; + /// Is the tool active or idle at the moment bool idle; + + /// Flag defining if the tool is waiting for any event bool pendingWait; + + /// Is there a context menu to be displayed bool pendingContextMenu; + /// Context menu used by the tool CONTEXT_MENU* contextMenu; - TOOL_ContextMenuTrigger contextMenuTrigger; + /// Defines when a context menu is opened + CONTEXT_MENU_TRIGGER contextMenuTrigger; + + /// Coroutine launched upon an event trigger COROUTINE* cofunc; + /// The event that triggered the coroutine TOOL_EVENT wakeupEvent; + + /// List of events that are triggering the coroutine TOOL_EVENT_LIST waitEvents; - std::vector transitions; + /// List of possible transitions (ie. association of events and functions that are executed + /// upon the event reception + std::vector transitions; }; @@ -72,7 +88,7 @@ TOOL_MANAGER::TOOL_MANAGER() void TOOL_MANAGER::RegisterTool( TOOL_BASE* aTool ) { - ToolState* st = new ToolState; + TOOL_STATE* st = new TOOL_STATE; st->theTool = aTool; st->idle = true; @@ -131,7 +147,7 @@ bool TOOL_MANAGER::InvokeTool( const std::string& aName ) TOOL_BASE* TOOL_MANAGER::FindTool( int aId ) const { - std::map::const_iterator it = m_toolIdIndex.find( aId ); + std::map::const_iterator it = m_toolIdIndex.find( aId ); if( it != m_toolIdIndex.end() ) return it->second->theTool; @@ -142,7 +158,7 @@ TOOL_BASE* TOOL_MANAGER::FindTool( int aId ) const TOOL_BASE* TOOL_MANAGER::FindTool( const std::string& aName ) const { - std::map::const_iterator it = m_toolNameIndex.find( aName ); + std::map::const_iterator it = m_toolNameIndex.find( aName ); if( it != m_toolNameIndex.end() ) return it->second->theTool; @@ -154,15 +170,15 @@ TOOL_BASE* TOOL_MANAGER::FindTool( const std::string& aName ) const void TOOL_MANAGER::ScheduleNextState( TOOL_BASE* aTool, TOOL_STATE_FUNC& aHandler, const TOOL_EVENT_LIST& aConditions ) { - ToolState* st = m_toolState[aTool]; - st->transitions.push_back( Transition( aConditions, aHandler ) ); + TOOL_STATE* st = m_toolState[aTool]; + st->transitions.push_back( TRANSITION( aConditions, aHandler ) ); } optional TOOL_MANAGER::ScheduleWait( TOOL_BASE* aTool, const TOOL_EVENT_LIST& aConditions ) { - ToolState* st = m_toolState[aTool]; + TOOL_STATE* st = m_toolState[aTool]; st->pendingWait = true; st->waitEvents = aConditions; @@ -177,7 +193,7 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) // iterate over all registered tools BOOST_FOREACH( TOOL_ID toolId, m_activeTools ) { - ToolState* st = m_toolIdIndex[toolId]; + TOOL_STATE* st = m_toolIdIndex[toolId]; // the tool state handler is waiting for events (i.e. called Wait() method) if( st->pendingWait ) @@ -204,7 +220,7 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) } } - BOOST_FOREACH( ToolState* st, m_toolState | boost::adaptors::map_values ) + BOOST_FOREACH( TOOL_STATE* st, m_toolState | boost::adaptors::map_values ) { if( !st->pendingWait ) { @@ -212,7 +228,7 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) // Go() method that match the event. if( st->transitions.size() ) { - BOOST_FOREACH( Transition tr, st->transitions ) + BOOST_FOREACH( TRANSITION tr, st->transitions ) { if( tr.first.Matches( aEvent ) ) { @@ -238,7 +254,7 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) } -void TOOL_MANAGER::finishTool( ToolState* aState ) +void TOOL_MANAGER::finishTool( TOOL_STATE* aState ) { wxASSERT( m_activeTools.front() == aState->theTool->GetId() ); @@ -252,13 +268,13 @@ void TOOL_MANAGER::finishTool( ToolState* aState ) bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) { - wxLogDebug( "event: %s", aEvent.Format().c_str() ); +// wxLogDebug( "event: %s", aEvent.Format().c_str() ); dispatchInternal( aEvent ); BOOST_FOREACH( TOOL_ID toolId, m_activeTools ) { - ToolState* st = m_toolIdIndex[toolId]; + TOOL_STATE* st = m_toolIdIndex[toolId]; if( st->contextMenuTrigger == CMENU_NOW ) { @@ -285,9 +301,9 @@ bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) void TOOL_MANAGER::ScheduleContextMenu( TOOL_BASE* aTool, CONTEXT_MENU* aMenu, - TOOL_ContextMenuTrigger aTrigger ) + CONTEXT_MENU_TRIGGER aTrigger ) { - ToolState* st = m_toolState[aTool]; + TOOL_STATE* st = m_toolState[aTool]; st->contextMenu = aMenu; st->contextMenuTrigger = aTrigger; diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index cdaaa45408..1033a2f51a 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -105,7 +105,7 @@ enum TOOL_Modifiers }; // Defines when a context menu is opened. -enum TOOL_ContextMenuTrigger +enum CONTEXT_MENU_TRIGGER { CMENU_BUTTON = 0, // On the right button CMENU_NOW, // Right now (after TOOL_INTERACTIVE::SetContextMenu) diff --git a/include/tool/tool_interactive.h b/include/tool/tool_interactive.h index 4703c420b7..0a2be56f10 100644 --- a/include/tool/tool_interactive.h +++ b/include/tool/tool_interactive.h @@ -56,7 +56,7 @@ public: * * Assigns a context menu and tells when it should be activated */ - void SetContextMenu( CONTEXT_MENU* aMenu, TOOL_ContextMenuTrigger aTrigger = CMENU_BUTTON ); + void SetContextMenu( CONTEXT_MENU* aMenu, CONTEXT_MENU_TRIGGER aTrigger = CMENU_BUTTON ); /** * Function Go() diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index 771427812d..765e5cd606 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -151,7 +151,7 @@ public: * May be called from a coroutine context. */ void ScheduleContextMenu( TOOL_BASE* aTool, CONTEXT_MENU* aMenu, - TOOL_ContextMenuTrigger aTrigger ); + CONTEXT_MENU_TRIGGER aTrigger ); /** * Allows a tool pass the already handled event to be passed to the next tool on the stack. @@ -162,15 +162,15 @@ public: } private: - struct ToolState; - typedef std::pair Transition; + struct TOOL_STATE; + typedef std::pair TRANSITION; void dispatchInternal( TOOL_EVENT& aEvent ); - void finishTool( ToolState* aState ); + void finishTool( TOOL_STATE* aState ); - std::map m_toolState; - std::map m_toolNameIndex; - std::map m_toolIdIndex; + std::map m_toolState; + std::map m_toolNameIndex; + std::map m_toolIdIndex; std::deque m_activeTools; EDA_ITEM* m_model; @@ -179,7 +179,7 @@ private: wxWindow* m_editFrame; bool m_passEvent; - ToolState* m_currentTool; + TOOL_STATE* m_currentTool; }; #endif From 1e1fbb4ccf660605c4467108e68901987cfdd01f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 2 Sep 2013 16:26:42 +0200 Subject: [PATCH 260/415] Corrected behaviour of drag panning while autopanning is enabled. --- common/view/wx_view_controls.cpp | 33 ++++++++++++++++++++++++-------- include/view/wx_view_controls.h | 13 +++++++++++-- 2 files changed, 36 insertions(+), 10 deletions(-) diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 465b94f8ae..22a0af5b0e 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -64,8 +64,14 @@ void WX_VIEW_CONTROLS::onMotion( wxMouseEvent& aEvent ) { m_mousePosition.x = aEvent.GetX(); m_mousePosition.y = aEvent.GetY(); + bool isAutoPanning = false; - if( aEvent.Dragging() ) + if( m_autoPanEnabled ) + { + isAutoPanning = handleAutoPanning( aEvent ); + } + + if( !isAutoPanning && aEvent.Dragging() ) { if( m_state == DRAG_PANNING ) { @@ -80,11 +86,6 @@ void WX_VIEW_CONTROLS::onMotion( wxMouseEvent& aEvent ) aEvent.Skip(); } } - else - { - if( m_autoPanEnabled ) - handleAutoPanning( aEvent ); - } } @@ -157,7 +158,7 @@ void WX_VIEW_CONTROLS::onButton( wxMouseEvent& aEvent ) m_state = IDLE; } break; - }; + } aEvent.Skip(); } @@ -190,6 +191,10 @@ void WX_VIEW_CONTROLS::onTimer( wxTimerEvent& aEvent ) wxPostEvent( m_parentPanel, redrawEvent ); } break; + + case IDLE: // Just remove unnecessary warnings + case DRAG_PANNING: + break; } } @@ -214,7 +219,7 @@ VECTOR2D WX_VIEW_CONTROLS::GetCursorPosition() const } -void WX_VIEW_CONTROLS::handleAutoPanning( const wxMouseEvent& aEvent ) +bool WX_VIEW_CONTROLS::handleAutoPanning( const wxMouseEvent& aEvent ) { VECTOR2D p( aEvent.GetX(), aEvent.GetY() ); @@ -245,7 +250,10 @@ void WX_VIEW_CONTROLS::handleAutoPanning( const wxMouseEvent& aEvent ) { m_panTimer.Stop(); m_state = IDLE; + + return false; } + return true; break; case IDLE: @@ -253,7 +261,16 @@ void WX_VIEW_CONTROLS::handleAutoPanning( const wxMouseEvent& aEvent ) { m_state = AUTO_PANNING; m_panTimer.Start( (int) ( 1000.0 / 60.0 ) ); + + return true; } + return false; break; + + case DRAG_PANNING: + return false; } + + wxASSERT_MSG( false, wxT( "This line should never be reached" ) ); + return false; // Should not be reached, just avoid the compiler warnings.. } diff --git a/include/view/wx_view_controls.h b/include/view/wx_view_controls.h index 81c3ed1d83..556338bd9e 100644 --- a/include/view/wx_view_controls.h +++ b/include/view/wx_view_controls.h @@ -85,6 +85,8 @@ public: void SetAutoPan( bool aEnabled ) { m_autoPanEnabled = aEnabled; + if( m_state == AUTO_PANNING ) + m_state = IDLE; } /** @@ -116,8 +118,15 @@ private: AUTO_PANNING, }; - /// Computes new viewport settings while in autopanning mode - void handleAutoPanning( const wxMouseEvent& aEvent ); + /** + * Function handleAutoPanning() + * Computes new viewport settings while in autopanning mode. + * + * @param aEvent is an event to be processed and decide if autopanning should happen. + * @return true if it is currently autopanning (ie. autopanning is active and mouse cursor + * is in the area that causes autopanning to happen). + */ + bool handleAutoPanning( const wxMouseEvent& aEvent ); /// Current state of VIEW_CONTROLS State m_state; From 202f7f91071691aa8949385cb41a3d998d2d7f2c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 2 Sep 2013 16:29:10 +0200 Subject: [PATCH 261/415] Added autopanning to the selection tool. --- pcbnew/pcbframe.cpp | 3 +-- pcbnew/tools/selection_tool.cpp | 39 ++++++++++++++++++++++++++++----- 2 files changed, 34 insertions(+), 8 deletions(-) diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 064eb19524..fe9e5ee01d 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -319,8 +319,6 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title, for ( int i = 0; i < 10; i++ ) m_Macros[i].m_Record.clear(); - - setupTools(); SetBoard( new BOARD() ); @@ -482,6 +480,7 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title, } } + setupTools(); } PCB_EDIT_FRAME::~PCB_EDIT_FRAME() diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 797225b3ca..198541afca 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -32,6 +32,7 @@ #include #include +#include #include @@ -59,13 +60,15 @@ void SELECTION_TOOL::Reset() { m_selectedItems.clear(); - // the tool launches upon reception of activate ("pcbnew.InteractiveSelection") - Go( &SELECTION_TOOL::Main, TOOL_EVENT( TC_Command, TA_ActivateTool, GetName() ) ); //"pcbnew.InteractiveSelection")); + // The tool launches upon reception of activate ("pcbnew.InteractiveSelection") + Go( &SELECTION_TOOL::Main, TOOL_EVENT( TC_Command, TA_ActivateTool, GetName() ) ); } int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) { + bool dragging = false; + // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { @@ -76,18 +79,42 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) if( !m_selectedItems.empty() ) clearSelection(); else - return 0; + break; // Finish } // single click? Select single object if( evt->IsClick( MB_Left ) ) selectSingle( evt->Position() ); - // drag with LMB? Select multiple objects (or at least draw a selection box) + // drag with LMB? Select multiple objects (or at least draw a selection box) or drag them if( evt->IsDrag( MB_Left ) ) - selectMultiple(); + { + dragging = true; + getViewControls()->SetAutoPan( true ); + + if( m_selectedItems.empty() || m_additive ) + { + // If nothings has been selected or user wants to select more + // draw the selection box + selectMultiple(); + } + else + { + // Now user wants to drag the selected items + m_toolMgr->InvokeTool( "pcbnew.InteractiveMove" ); + } + + } + else if( dragging ) + { + dragging = false; + getViewControls()->SetAutoPan( false ); + } } + // Restore the default settings + getViewControls()->SetAutoPan( false ); + return 0; } @@ -213,7 +240,7 @@ void SELECTION_TOOL::selectMultiple() m_selArea->SetOrigin( evt->DragOrigin() ); m_selArea->SetEnd( evt->Position() ); m_selArea->ViewSetVisible( true ); - m_selArea->ViewUpdate( VIEW_ITEM::APPEARANCE | VIEW_ITEM::GEOMETRY ); + m_selArea->ViewUpdate( VIEW_ITEM::GEOMETRY ); } if( evt->IsMouseUp( MB_Left ) ) From 7c745cd9c6a6b19400d55fb2e18313dc2b8dccf8 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 2 Sep 2013 16:44:13 +0200 Subject: [PATCH 262/415] Allow invoking GAL tools, only if GAL is active. --- common/tool/tool_dispatcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index fd276d4129..89da297fa9 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -269,6 +269,6 @@ void TOOL_DISPATCHER::DispatchWxCommand( wxCommandEvent &aEvent ) break; } - if( activateTool ) + if( activateTool && m_editFrame->IsGalCanvasActive() ) m_toolMgr->InvokeTool( toolName ); } From 6405273059d431f61131516cc1f0e5318644606d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 3 Sep 2013 13:51:53 +0200 Subject: [PATCH 263/415] Support for trapezoidal pads. --- pcbnew/pcb_painter.cpp | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 36ab6588ee..59da4f9770 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -570,10 +570,40 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) break; case PAD_RECT: - case PAD_TRAPEZOID: m_gal->DrawRectangle( VECTOR2D( -size.x, -size.y ), VECTOR2D( size.x, size.y ) ); break; + case PAD_TRAPEZOID: + { + std::deque pointList; + wxPoint corners[4]; + + VECTOR2D padSize = VECTOR2D( aPad->GetSize().x, aPad->GetSize().y ) / 2; + VECTOR2D deltaPadSize = size - padSize; // = solder[Paste/Mask]Margin or 0 + VECTOR2D delta = VECTOR2D( aPad->GetDelta().x / 2, + aPad->GetDelta().y / 2 ); + VECTOR2D inflate = VECTOR2D( delta.y * ( deltaPadSize.x / size.x ), + delta.x * ( deltaPadSize.y / size.y ) ); + + aPad->BuildPadPolygon( corners, wxSize( deltaPadSize.x, deltaPadSize.y ), 0.0 ); + pointList.push_back( VECTOR2D( corners[0] ) ); + pointList.push_back( VECTOR2D( corners[1] ) ); + pointList.push_back( VECTOR2D( corners[2] ) ); + pointList.push_back( VECTOR2D( corners[3] ) ); + + if( m_pcbSettings->m_sketchModeSelect[PADS_VISIBLE] ) + { + // Add the beginning point to close the outline + pointList.push_back( pointList.front() ); + m_gal->DrawPolyline( pointList ); + } + else + { + m_gal->DrawPolygon( pointList ); + } + } + break; + case PAD_CIRCLE: m_gal->DrawCircle( VECTOR2D( 0.0, 0.0 ), size.x ); break; From 446a0a174e06d119c0babfe514b08c62412059de Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 3 Sep 2013 14:15:37 +0200 Subject: [PATCH 264/415] Module texts are now moveable, rotatable and flippable. --- pcbnew/class_text_mod.cpp | 16 ++++++++++++++++ pcbnew/class_text_mod.h | 9 +++++++++ 2 files changed, 25 insertions(+) diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index d84cac4860..37b9a63c3c 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -87,6 +87,22 @@ TEXTE_MODULE::~TEXTE_MODULE() } +void TEXTE_MODULE::Rotate( const wxPoint& aRotCentre, double aAngle ) +{ + RotatePoint( &m_Pos, aRotCentre, aAngle ); + m_Orient += aAngle; + NORMALIZE_ANGLE_360( m_Orient ); +} + + +void TEXTE_MODULE::Flip(const wxPoint& aCentre ) +{ + m_Pos.y = aCentre.y - ( m_Pos.y - aCentre.y ); + SetLayer( FlipLayer( GetLayer() ) ); + m_Mirror = !m_Mirror; +} + + void TEXTE_MODULE::Copy( TEXTE_MODULE* source ) { if( source == NULL ) diff --git a/pcbnew/class_text_mod.h b/pcbnew/class_text_mod.h index 635cef14de..b693298159 100644 --- a/pcbnew/class_text_mod.h +++ b/pcbnew/class_text_mod.h @@ -89,6 +89,15 @@ public: m_Pos = aPos; } + void Move( const wxPoint& aMoveVector ) + { + m_Pos += aMoveVector; + } + + void Rotate( const wxPoint& aRotCentre, double aAngle ); + + void Flip( const wxPoint& aCentre ); + TEXTE_MODULE* Next() const { return (TEXTE_MODULE*) Pnext; } TEXTE_MODULE* Back() const { return (TEXTE_MODULE*) Pback; } From 1a1416aaa401f667e83f63755f7648b60ecf1fbb Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 3 Sep 2013 17:46:05 +0200 Subject: [PATCH 265/415] Fixed Cairo's render target setting. --- common/gal/cairo/cairo_gal.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index 4ed047b24c..d66a2cb725 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -736,8 +736,13 @@ void CAIRO_GAL::SetTarget( RenderTarget aTarget ) return; // Cairo grouping prevents display of overlapping items on the same layer in the lighter color - cairo_pop_group_to_source( currentContext ); - cairo_paint_with_alpha( currentContext, fillColor.a ); + if( isInitialized ) + { + storePath(); + + cairo_pop_group_to_source( currentContext ); + cairo_paint_with_alpha( currentContext, fillColor.a ); + } switch( aTarget ) { @@ -752,7 +757,8 @@ void CAIRO_GAL::SetTarget( RenderTarget aTarget ) break; } - cairo_push_group( currentContext ); + if( isInitialized ) + cairo_push_group( currentContext ); currentTarget = aTarget; } From 55dddb69f721b48c959485d620d057d1d19ab13b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 4 Sep 2013 10:56:06 +0200 Subject: [PATCH 266/415] Improved selection rules. Added some comments to the selection tool. --- pcbnew/tools/selection_tool.cpp | 59 +++++++++++++++++++++---- pcbnew/tools/selection_tool.h | 78 +++++++++++++++++++++++++++++++-- 2 files changed, 124 insertions(+), 13 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 198541afca..d1b702244b 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -68,6 +69,10 @@ void SELECTION_TOOL::Reset() int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) { bool dragging = false; + m_board = static_cast( m_toolMgr->GetEditFrame() )->GetBoard(); + + if( !m_board ) + return 0; // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) @@ -131,8 +136,12 @@ void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) if( !m_additive ) clearSelection(); - aItem->SetSelected(); - m_selectedItems.insert( aItem ); + // Prevent selection of invisible items + if( selectable( aItem ) ) + { + aItem->SetSelected(); + m_selectedItems.insert( aItem ); + } } } @@ -214,11 +223,6 @@ BOARD_ITEM* SELECTION_TOOL::pickSmallestComponent( GENERAL_COLLECTOR* aCollector } -void SELECTION_TOOL::handleHighlight( const VECTOR2D& aP ) -{ -} - - void SELECTION_TOOL::selectMultiple() { OPT_TOOL_EVENT evt; @@ -258,8 +262,8 @@ void SELECTION_TOOL::selectMultiple() { BOARD_ITEM* item = static_cast( it->first ); - // Add only those items which are fully within a selection box - if( selectionBox.Contains( item->ViewBBox() ) ) + // Add only those items which are visible and fully within the selection box + if( selectable( item ) && selectionBox.Contains( item->ViewBBox() ) ) { item->SetSelected(); m_selectedItems.insert( item ); @@ -331,3 +335,40 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) return NULL; } + + +bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const +{ + switch( aItem->Type() ) + { + case PCB_VIA_T: + { + // For vias it is enough if only one of layers is visible + LAYER_NUM top, bottom; + static_cast( aItem )->ReturnLayerPair( &top, &bottom ); + + return ( m_board->IsLayerVisible( top ) || + m_board->IsLayerVisible( bottom ) ); + } + break; + + case PCB_PAD_T: + // Pads are supposed to be on top, bottom or both at the same time (THT) + if( aItem->IsOnLayer( LAYER_N_FRONT ) && m_board->IsLayerVisible( LAYER_N_FRONT ) ) + return true; + + if( aItem->IsOnLayer( LAYER_N_BACK ) && m_board->IsLayerVisible( LAYER_N_BACK ) ) + return true; + + return false; + break; + + case PCB_MODULE_EDGE_T: + // These are not selectable, otherwise silkscreen drawings would be easily destroyed + return false; + break; + } + + // All other items + return m_board->IsLayerVisible( aItem->GetLayer() ); +} diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 6d485395fa..7a59d31921 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -35,7 +35,6 @@ class SELECTION_AREA; class BOARD_ITEM; class GENERAL_COLLECTOR; - /** * Class SELECTION_TOOL * @@ -43,8 +42,6 @@ class GENERAL_COLLECTOR; * - pick single objects (click LMB) * - add objects to existing selection (Shift+LMB) * - draw selection box (drag LMB) - * - * WORK IN PROGRESS. CONSIDER AS A DEMO! */ class SELECTION_TOOL : public TOOL_INTERACTIVE @@ -53,25 +50,98 @@ public: SELECTION_TOOL(); ~SELECTION_TOOL(); + /** + * Function Reset() + * + * Initializes the selection tool. + */ void Reset(); + + /** + * Function Main() + * + * The main loop. + */ int Main( TOOL_EVENT& aEvent ); + + /** + * Function GetSelection() + * + * Returns the set of currently selected items. + */ const std::set& GetSelection() const { return m_selectedItems; } private: + /** + * Function selectSingle() + * Selects an item pointed by the parameter aWhere. If there is more than one item at that + * place, there is a menu displayed that allows to choose the item. + * + * @param aWhere is the place where the item should be selected. + */ void selectSingle( const VECTOR2I& aWhere ); + + /** + * Function selectMultiple() + * Handles drawing a selection box that allows to select many items at the same time. + */ void selectMultiple(); - void handleHighlight( const VECTOR2D& aP ); + + /** + * Function disambiguationMenu() + * Handles the menu that allows to select one of many items in case there is more than one + * item at the selected point (@see selectSingle()). + * + * @param aItems contains list of items that are displayed to the user. + */ BOARD_ITEM* disambiguationMenu( GENERAL_COLLECTOR* aItems ); + + /** + * Function pickSmallestComponent() + * Allows to find the smallest (in terms of bounding box area) item from the list. + * + * @param aCollector containes the list of items. + */ BOARD_ITEM* pickSmallestComponent( GENERAL_COLLECTOR* aCollector ); + + /** + * Function toggleSelection() + * Changes selection status of a given item. + * + * @param aItem is the item to have selection status changed. + */ void toggleSelection( BOARD_ITEM* aItem ); + + /** + * Function clearSelection() + * Clears selections of currently selected items. + */ void clearSelection(); + /** + * Function selectable() + * Checks conditions for an item to be selected. + * + * @return True if the item fulfills conditions to be selected. + */ + bool selectable( const BOARD_ITEM* aItem ) const; + + /// Currently used PCB + BOARD* m_board; + + /// Container storing currently selected items std::set m_selectedItems; + + /// Visual representation of selection area SELECTION_AREA* m_selArea; + + /// Menu shown in case of selection ambiguity boost::shared_ptr m_menu; + + /// Flag saying if items should be added to the current selection or rather replace it bool m_additive; }; From 9a032e742264679f8eb228ba05fed498b1b84664 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 4 Sep 2013 16:18:37 +0200 Subject: [PATCH 267/415] Moved selection marking boxes to a different layer. --- include/layers_id_colors_and_visibility.h | 3 ++- pcbnew/basepcbframe.cpp | 1 + pcbnew/class_dimension.cpp | 2 +- pcbnew/class_module.cpp | 2 +- pcbnew/class_pcb_text.cpp | 2 +- pcbnew/class_text_mod.cpp | 2 +- pcbnew/pcb_painter.cpp | 6 +++--- 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index bb1b13a243..3ab011d3b5 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -240,6 +240,7 @@ enum PCB_VISIBLE PAD_BK_NETNAMES_VISIBLE, PADS_NETNAMES_VISIBLE, + SELECTION, GP_OVERLAY, // General purpose overlay END_PCB_VISIBLE_LIST // sentinel @@ -258,7 +259,7 @@ enum PCB_VISIBLE /// means that layer is displayed closer to the user, ie. on the top). const LAYER_NUM GalLayerOrder[] = { - ITEM_GAL_LAYER( GP_OVERLAY ), + ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( SELECTION ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), DRAW_N, COMMENT_N, ECO1_N, ECO2_N, EDGE_N, UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31, diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 1308addc82..1c4c6a65e1 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -831,6 +831,7 @@ void PCB_BASE_FRAME::LoadSettings() view->SetRequired( ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); + view->SetLayerTarget( ITEM_GAL_LAYER( SELECTION ), KiGfx::TARGET_OVERLAY ); view->SetLayerTarget( ITEM_GAL_LAYER( GP_OVERLAY ), KiGfx::TARGET_OVERLAY ); // Apply layer coloring scheme & display options diff --git a/pcbnew/class_dimension.cpp b/pcbnew/class_dimension.cpp index 6cd8c58bec..c6dab49476 100644 --- a/pcbnew/class_dimension.cpp +++ b/pcbnew/class_dimension.cpp @@ -495,7 +495,7 @@ void DIMENSION::ViewGetLayers( int aLayers[], int& aCount ) const aLayers[0] = m_Layer; // On the general purpose overlay there is a selection box displayed - aLayers[1] = ITEM_GAL_LAYER( GP_OVERLAY ); + aLayers[1] = ITEM_GAL_LAYER( SELECTION ); aCount = 2; } diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index cf61f31493..0b68f61e64 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -1028,5 +1028,5 @@ void MODULE::SetOrientation( double newangle ) void MODULE::ViewGetLayers( int aLayers[], int& aCount ) const { aCount = 1; - aLayers[0] = ITEM_GAL_LAYER( GP_OVERLAY ); // Selection box + aLayers[0] = ITEM_GAL_LAYER( SELECTION ); // Selection box } diff --git a/pcbnew/class_pcb_text.cpp b/pcbnew/class_pcb_text.cpp index 2ce86606aa..15920fa968 100644 --- a/pcbnew/class_pcb_text.cpp +++ b/pcbnew/class_pcb_text.cpp @@ -231,7 +231,7 @@ void TEXTE_PCB::ViewGetLayers( int aLayers[], int& aCount ) const aLayers[0] = m_Layer; // On the general purpose overlay there is a selection box displayed - aLayers[1] = ITEM_GAL_LAYER( GP_OVERLAY ); + aLayers[1] = ITEM_GAL_LAYER( SELECTION ); aCount = 2; } diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index 37b9a63c3c..e4f28f31b1 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -473,7 +473,7 @@ void TEXTE_MODULE::ViewGetLayers( int aLayers[], int& aCount ) const } // On the general purpose overlay there is a selection box displayed - aLayers[1] = ITEM_GAL_LAYER( GP_OVERLAY ); + aLayers[1] = ITEM_GAL_LAYER( SELECTION ); aCount = 2; } diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 59da4f9770..45841207ed 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -698,7 +698,7 @@ void PCB_PAINTER::draw( const MODULE* aModule ) void PCB_PAINTER::draw( const TEXTE_PCB* aText, int aLayer ) { - if( aLayer == ITEM_GAL_LAYER( GP_OVERLAY ) ) + if( aLayer == ITEM_GAL_LAYER( SELECTION ) ) { if( aText->IsSelected() ) drawSelectionBox( aText ); @@ -722,7 +722,7 @@ void PCB_PAINTER::draw( const TEXTE_PCB* aText, int aLayer ) void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) { - if( aLayer == ITEM_GAL_LAYER( GP_OVERLAY ) ) + if( aLayer == ITEM_GAL_LAYER( SELECTION ) ) { if( aText->IsSelected() ) drawSelectionBox( aText ); @@ -816,7 +816,7 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone ) void PCB_PAINTER::draw( const DIMENSION* aDimension, int aLayer ) { - if( aLayer == ITEM_GAL_LAYER( GP_OVERLAY ) ) + if( aLayer == ITEM_GAL_LAYER( SELECTION ) ) { if( aDimension->IsSelected() ) drawSelectionBox( aDimension ); From a1089c9dd68c1ed57d8b797bf4ec6264c3b98ef3 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 4 Sep 2013 16:23:26 +0200 Subject: [PATCH 268/415] More effective way of updating bounding boxes. IsCached() method made public. Removed some of unused fields from the layer description structure. --- common/view/view.cpp | 44 ++++++++++++++++++++++++++++++-------------- include/view/view.h | 19 ++++++++++--------- 2 files changed, 40 insertions(+), 23 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 4fcd86b9ba..72d8cf79c7 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -98,9 +98,9 @@ void VIEW::Add( VIEW_ITEM* aItem ) for( int i = 0; i < layers_count; i++ ) { - VIEW_LAYER* l = &m_layers[layers[i]]; - l->items->Insert( aItem ); - l->dirtyExtents.Merge( aItem->ViewBBox() ); + VIEW_LAYER& l = m_layers[layers[i]]; + l.items->Insert( aItem ); + l.isDirty = true; } if( m_dynamic ) @@ -386,7 +386,7 @@ struct VIEW::updateItemsColor void VIEW::UpdateLayerColor( int aLayer ) { // There is no point in updating non-cached layers - if( !isCached( aLayer ) ) + if( !IsCached( aLayer ) ) return; BOX2I r; @@ -409,7 +409,7 @@ void VIEW::UpdateAllLayersColor() VIEW_LAYER* l = &( ( *i ).second ); // There is no point in updating non-cached layers - if( !isCached( l->id ) ) + if( !IsCached( l->id ) ) continue; updateItemsColor visitor( l->id, m_painter, m_gal ); @@ -441,7 +441,7 @@ struct VIEW::changeItemsDepth void VIEW::ChangeLayerDepth( int aLayer, int aDepth ) { // There is no point in updating non-cached layers - if( !isCached( aLayer ) ) + if( !IsCached( aLayer ) ) return; BOX2I r; @@ -564,6 +564,7 @@ void VIEW::redrawRect( const BOX2I& aRect ) m_gal->SetLayerDepth( l->renderingOrder ); l->items->Query( aRect, drawFunc ); } + l->isDirty = false; } } @@ -571,7 +572,7 @@ void VIEW::redrawRect( const BOX2I& aRect ) void VIEW::draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate ) const { - if( isCached( aLayer ) && !aImmediate ) + if( IsCached( aLayer ) && !aImmediate ) { // Draw using cached information or create one int group = aItem->getGroup( aLayer ); @@ -697,6 +698,7 @@ void VIEW::Clear() { VIEW_LAYER* l = &( ( *i ).second ); unlinkItem v; + if( m_dynamic ) l->items->Query( r, v ); @@ -789,6 +791,9 @@ void VIEW::invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ) int layers[VIEW_MAX_LAYERS], layers_count; aItem->getLayers( layers, layers_count ); + if( aUpdateFlags & VIEW_ITEM::GEOMETRY ) + updateBbox( aItem ); + // Iterate through layers used by the item and recache it immediately for( int i = 0; i < layers_count; i++ ) { @@ -796,12 +801,8 @@ void VIEW::invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ) if( aUpdateFlags & VIEW_ITEM::GEOMETRY ) { - // Reinsert item in order to update bounding box - Remove( aItem ); - Add( aItem ); - - if( isCached( layerId ) ) - updateItemGeometry( aItem, layerId ); /// TODO is it still necessary? + if( IsCached( layerId ) ) + updateItemGeometry( aItem, layerId ); } else if( aUpdateFlags & VIEW_ITEM::COLOR ) { @@ -860,6 +861,21 @@ void VIEW::updateItemGeometry( VIEW_ITEM* aItem, int aLayer ) } +void VIEW::updateBbox( VIEW_ITEM* aItem ) +{ + int layers[VIEW_MAX_LAYERS], layers_count; + aItem->ViewGetLayers( layers, layers_count ); + + for( int i = 0; i < layers_count; i++ ) + { + VIEW_LAYER& l = m_layers[layers[i]]; + l.items->Remove( aItem ); + l.items->Insert( aItem ); + l.isDirty = true; + } +} + + bool VIEW::areRequiredLayersEnabled( int aLayerId ) const { wxASSERT( (unsigned) aLayerId < m_layers.size() ); @@ -893,7 +909,7 @@ void VIEW::RecacheAllItems( bool aImmediately ) { VIEW_LAYER* l = &( ( *i ).second ); - if( isCached( l->id ) ) + if( IsCached( l->id ) ) { m_gal->SetTarget( l->target ); m_gal->SetLayerDepth( l->renderingOrder ); diff --git a/include/view/view.h b/include/view/view.h index 4ad11828f5..d5a1b9348c 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -423,6 +423,13 @@ public: m_dirtyTargets[aTarget] = true; } + /// Returns true if the layer is cached + inline bool IsCached( int aLayer ) const + { + return ( m_layers.at( aLayer ).target == TARGET_CACHED ); + } + + static const int VIEW_MAX_LAYERS = 128; ///* maximum number of layers that may be shown private: @@ -432,11 +439,8 @@ private: bool isDirty; ///* does it contain any dirty items (updated since last redraw) bool displayOnly; ///* is the layer display only? VIEW_RTREE* items; ///* R-tree indexing all items on this layer. - std::vector dirtyItems; ///* set of dirty items collected since last redraw int renderingOrder; ///* rendering order of this layer int id; ///* layer ID - BOX2I extents; ///* sum of bboxes of all items on the layer - BOX2I dirtyExtents; ///* sum of bboxes of all dirty items on the layer RenderTarget target; ///* where the layer should be rendered std::set requiredLayers; ///* layers that are required to be enabled to show the layer }; @@ -515,6 +519,9 @@ private: /// Updates all informations needed to draw an item void updateItemGeometry( VIEW_ITEM* aItem, int aLayer ); + /// Updates bounding box of an item + void updateBbox( VIEW_ITEM* aItem ); + /// Determines rendering order of layers. Used in display order sorting function. static bool compareRenderingOrder( VIEW_LAYER* i, VIEW_LAYER* j ) { @@ -524,12 +531,6 @@ private: /// Checks if every layer required by the aLayerId layer is enabled. bool areRequiredLayersEnabled( int aLayerId ) const; - /// Returns true if the layer is cached - inline bool isCached( int aLayer ) const - { - return ( m_layers.at( aLayer ).target == TARGET_CACHED ); - } - ///* Whether to use rendering order modifier or not bool m_enableOrderModifier; From 7e4eba9eed1097bdd65ce641dbeee01700270bf7 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 4 Sep 2013 16:25:57 +0200 Subject: [PATCH 269/415] Some comments. --- common/gal/opengl/opengl_compositor.cpp | 3 ++- common/tool/tool_manager.cpp | 5 +++-- include/tool/tool_manager.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/common/gal/opengl/opengl_compositor.cpp b/common/gal/opengl/opengl_compositor.cpp index 3485131aa7..0a212af554 100644 --- a/common/gal/opengl/opengl_compositor.cpp +++ b/common/gal/opengl/opengl_compositor.cpp @@ -167,8 +167,9 @@ unsigned int OPENGL_COMPOSITOR::CreateBuffer() } } - ClearBuffer(); + + // Return to direct rendering (we were asked only to create a buffer, not switch to one) glBindFramebuffer( GL_FRAMEBUFFER, DIRECT_RENDERING ); m_currentFbo = DIRECT_RENDERING; diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 1601b7aece..03250f8fff 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -207,9 +207,9 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) st->wakeupEvent = aEvent; st->pendingWait = false; st->waitEvents.clear(); - st->cofunc->Resume(); - if( !st->cofunc->Running() ) + if( !st->cofunc->Resume() ) { + // The couroutine has finished finishTool( st ); } @@ -258,6 +258,7 @@ void TOOL_MANAGER::finishTool( TOOL_STATE* aState ) { wxASSERT( m_activeTools.front() == aState->theTool->GetId() ); + // Deactivate the most recent tool and remove it from the active tools queue aState->idle = true; m_activeTools.erase( m_activeTools.begin() ); diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index 765e5cd606..f0830263de 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -154,7 +154,7 @@ public: CONTEXT_MENU_TRIGGER aTrigger ); /** - * Allows a tool pass the already handled event to be passed to the next tool on the stack. + * Allows a tool to pass the already handled event to the next tool on the stack. */ void PassEvent() { From 7716d4592d425e276eff0d007b146723fcfd2611 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 6 Sep 2013 10:19:53 +0200 Subject: [PATCH 270/415] Fixed hotkeys for switching rendering backends. --- pcbnew/hotkeys_board_editor.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index 0a155643f4..691346005a 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -540,6 +540,18 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit DisplayOpt.ContrastModeDisplay = !DisplayOpt.ContrastModeDisplay; m_canvas->Refresh(); break; + + case HK_CANVAS_CAIRO: + evt_type = ID_MENU_CANVAS_CAIRO; + break; + + case HK_CANVAS_OPENGL: + evt_type = ID_MENU_CANVAS_OPENGL; + break; + + case HK_CANVAS_DEFAULT: + evt_type = ID_MENU_CANVAS_DEFAULT; + break; } if( evt_type != 0 ) From 345e97f2961484ead8b8bab9301b57f8ca7be59d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 6 Sep 2013 11:31:16 +0200 Subject: [PATCH 271/415] Solved refreshing issues. --- common/dialogs/dialog_page_settings.cpp | 2 +- common/drawframe.cpp | 7 ++--- common/view/view.cpp | 2 +- common/view/view_group.cpp | 28 ++++++++----------- common/zoom.cpp | 15 ++++++++-- include/view/view.h | 15 ++++++++-- include/wxstruct.h | 8 ++++-- pcbnew/autorouter/automove.cpp | 2 +- pcbnew/basepcbframe.cpp | 11 +++----- pcbnew/board_undo_redo.cpp | 6 ++-- pcbnew/class_pcb_layer_widget.cpp | 10 +++---- pcbnew/dialogs/dialog_display_options.cpp | 2 +- pcbnew/dialogs/dialog_drc.cpp | 2 +- pcbnew/dialogs/dialog_general_options.cpp | 14 +++++----- pcbnew/dialogs/dialog_global_deletion.cpp | 2 +- .../dialog_global_edit_tracks_and_vias.cpp | 2 +- .../dialog_global_modules_fields_edition.cpp | 2 +- pcbnew/dialogs/dialog_orient_footprints.cpp | 2 +- pcbnew/dialogs/dialog_set_grid.cpp | 2 +- pcbnew/edit.cpp | 16 +++++------ pcbnew/edit_pcb_text.cpp | 8 +++--- pcbnew/editmod.cpp | 4 +-- pcbnew/edtxtmod.cpp | 2 +- pcbnew/event_handlers_tracks_vias_sizes.cpp | 2 +- pcbnew/footprint_wizard.cpp | 2 +- pcbnew/footprint_wizard_frame.cpp | 4 +-- pcbnew/hotkeys_board_editor.cpp | 6 ++-- pcbnew/modedit.cpp | 18 ++++++------ pcbnew/modedit_onclick.cpp | 12 ++++---- pcbnew/modedit_undo_redo.cpp | 4 +-- pcbnew/modules.cpp | 6 ++-- pcbnew/modview.cpp | 2 +- pcbnew/modview_frame.cpp | 6 ++-- pcbnew/move_or_drag_track.cpp | 2 +- pcbnew/netlist.cpp | 2 +- pcbnew/pcbframe.cpp | 4 +-- pcbnew/sel_layer.cpp | 2 +- pcbnew/xchgmod.cpp | 6 ++-- pcbnew/zones_by_polygon.cpp | 2 +- pcbnew/zones_by_polygon_fill_functions.cpp | 2 +- 40 files changed, 128 insertions(+), 118 deletions(-) diff --git a/common/dialogs/dialog_page_settings.cpp b/common/dialogs/dialog_page_settings.cpp index 7ab002480b..961024e065 100644 --- a/common/dialogs/dialog_page_settings.cpp +++ b/common/dialogs/dialog_page_settings.cpp @@ -222,7 +222,7 @@ void DIALOG_PAGES_SETTINGS::OnOkClick( wxCommandEvent& event ) if( SavePageSettings() ) { m_screen->SetModify(); - m_parent->GetCanvas()->Refresh(); + m_parent->RefreshCanvas(); if( m_localPrjConfigChanged ) m_parent->SaveProjectSettings( true ); diff --git a/common/drawframe.cpp b/common/drawframe.cpp index a38908e970..a8857896c2 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -235,12 +235,9 @@ void EDA_DRAW_FRAME::OnToggleGridState( wxCommandEvent& aEvent ) { SetGridVisibility( !IsGridVisible() ); if( m_galCanvasActive ) - { m_galCanvas->GetGAL()->SetGridVisibility( IsGridVisible() ); - m_galCanvas->Refresh(); - } - else - m_canvas->Refresh(); + + RefreshCanvas(); } diff --git a/common/view/view.cpp b/common/view/view.cpp index 72d8cf79c7..f8ba2db28f 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -915,7 +915,7 @@ void VIEW::RecacheAllItems( bool aImmediately ) m_gal->SetLayerDepth( l->renderingOrder ); recacheLayer visitor( this, m_gal, l->id, aImmediately ); l->items->Query( r, visitor ); - l->isDirty = false; + l->isDirty = true; } } diff --git a/common/view/view_group.cpp b/common/view/view_group.cpp index f7ff19da96..3b740e01b5 100644 --- a/common/view/view_group.cpp +++ b/common/view/view_group.cpp @@ -82,15 +82,9 @@ unsigned int VIEW_GROUP::GetSize() const const BOX2I VIEW_GROUP::ViewBBox() const { - BOX2I box; - - // Merge all bounding boxes, so the returned one contains all stored items - BOOST_FOREACH( VIEW_ITEM* item, m_items ) - { - box.Merge( item->ViewBBox() ); - } - - return box; + BOX2I maxBox; + maxBox.SetMaximum(); + return maxBox; } @@ -107,31 +101,33 @@ void VIEW_GROUP::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) co for( int i = 0; i < layers_count; i++ ) { - aGal->SetLayerDepth( m_view->GetLayerOrder( layers[i] ) ); + if( m_view->IsCached( layers[i] ) && m_view->IsLayerVisible( layers[i] ) ) + { + aGal->SetLayerDepth( m_view->GetLayerOrder( layers[i] ) ); - if( !painter->Draw( item, layers[i] ) ) - item->ViewDraw( layers[i], aGal, aVisibleArea ); // Alternative drawing method + if( !painter->Draw( item, layers[i] ) ) + item->ViewDraw( layers[i], aGal, aVisibleArea ); // Alternative drawing method + } } - - /// m_view->Draw( item, true ); } } void VIEW_GROUP::ViewGetLayers( int aLayers[], int& aCount ) const { + // Everything is displayed on a single layer aLayers[0] = m_layer; aCount = 1; } -void VIEW_GROUP::ViewUpdate( int aUpdateFlags, bool aForceImmediateRedraw ) +/*void VIEW_GROUP::ViewUpdate( int aUpdateFlags, bool aForceImmediateRedraw ) { BOOST_FOREACH( VIEW_ITEM* item, m_items ) { item->ViewUpdate( aUpdateFlags, aForceImmediateRedraw ); } -} +}*/ void VIEW_GROUP::updateBbox() diff --git a/common/zoom.cpp b/common/zoom.cpp index a537256eea..9e1175c3b8 100644 --- a/common/zoom.cpp +++ b/common/zoom.cpp @@ -52,7 +52,7 @@ void EDA_DRAW_FRAME::RedrawScreen( const wxPoint& aCenterPoint, bool aWarpPointe if( aWarpPointer ) m_canvas->MoveCursorToCrossHair(); - m_canvas->Refresh(); + RefreshCanvas(); m_canvas->Update(); } @@ -64,11 +64,20 @@ void EDA_DRAW_FRAME::RedrawScreen2( const wxPoint& posBefore ) AdjustScrollBars( newCenter ); - m_canvas->Refresh(); + RefreshCanvas(); m_canvas->Update(); } +void EDA_DRAW_FRAME::RefreshCanvas() +{ + if( m_galCanvasActive ) + m_galCanvas->Refresh(); + else + m_canvas->Refresh(); +} + + void EDA_DRAW_FRAME::Zoom_Automatique( bool aWarpPointer ) { BASE_SCREEN* screen = GetScreen(); @@ -160,7 +169,7 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event ) break; case ID_ZOOM_REDRAW: - m_canvas->Refresh(); + RefreshCanvas(); break; case ID_POPUP_ZOOM_CENTER: diff --git a/include/view/view.h b/include/view/view.h index d5a1b9348c..f5eb6b13ca 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -262,15 +262,24 @@ public: /** * Function SetLayerVisible() * Controls the visibility of a particular layer. - * @param aLayer: the layer to show/hide. When ALL_LAYERS constant is given, all layers' - * visibility is updated - * @param aVisible: the obivous + * @param aLayer: the layer to show/hide + * @param aVisible: the obvious */ inline void SetLayerVisible( int aLayer, bool aVisible = true ) { m_layers[aLayer].enabled = aVisible; } + /** + * Function IsLayerVisible() + * Returns information about visibility of a particular layer. + * @param aLayer: true if the layer is visible, false otherwise + */ + inline bool IsLayerVisible( int aLayer ) const + { + return m_layers.at( aLayer ).enabled; + } + /** * Function SetLayerTarget() * Changes the rendering target for a particular layer. diff --git a/include/wxstruct.h b/include/wxstruct.h index 938e15c24b..76e5987b50 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -452,8 +452,6 @@ protected: wxOverlay m_overlay; #endif -protected: - void SetScreen( BASE_SCREEN* aScreen ) { m_currentScreen = aScreen; } /** @@ -692,6 +690,12 @@ public: */ void RedrawScreen2( const wxPoint& posBefore ); + /** + * Function RefreshCanvas + * Depending on the current state of GAL - it refreshes the default canvas of the GAL canvas. + */ + void RefreshCanvas(); + /** * Function Zoom_Automatique * redraws the screen with best zoom level and the best centering diff --git a/pcbnew/autorouter/automove.cpp b/pcbnew/autorouter/automove.cpp index 401b7d8606..cd8e191927 100644 --- a/pcbnew/autorouter/automove.cpp +++ b/pcbnew/autorouter/automove.cpp @@ -293,7 +293,7 @@ void PCB_EDIT_FRAME::AutoMoveModulesOnPcb( bool PlaceModulesHorsPcb ) if( newList.GetCount() ) SaveCopyInUndoList( newList, UR_CHANGED ); - m_canvas->Refresh(); + RefreshCanvas(); } diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 1c4c6a65e1..bd5e71781a 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -431,7 +431,7 @@ void PCB_BASE_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) GetScreen()->m_Active_Layer = layer; if( DisplayOpt.ContrastModeDisplay ) - m_canvas->Refresh(); + RefreshCanvas(); } @@ -455,10 +455,7 @@ void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent ) settings->LoadDisplayOptions( DisplayOpt ); m_galCanvas->GetView()->RecacheAllItems( true ); - if( IsGalCanvasActive() ) - m_galCanvas->Refresh(); - else - m_canvas->Refresh(); + RefreshCanvas(); } @@ -625,8 +622,8 @@ void PCB_BASE_FRAME::SetToolID( int aId, int aCursor, const wxString& aToolMsg ) // must do this after the tool has been set, otherwise pad::Draw() does // not show proper color when DisplayOpt.ContrastModeDisplay is true. - if( redraw && m_canvas) - m_canvas->Refresh(); + if( redraw && m_canvas ) + RefreshCanvas(); } diff --git a/pcbnew/board_undo_redo.cpp b/pcbnew/board_undo_redo.cpp index 88cfaa49b1..1b132fa1a2 100644 --- a/pcbnew/board_undo_redo.cpp +++ b/pcbnew/board_undo_redo.cpp @@ -367,7 +367,7 @@ void PCB_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem, if( aItem->Type() == PCB_MODULE_T ) if( ((MODULE*)aItem)->GetFlags() & MODULE_to_PLACE ) break; - m_canvas->Refresh(); + RefreshCanvas(); #endif case UR_MOVED: case UR_FLIPPED: @@ -622,7 +622,7 @@ void PCB_EDIT_FRAME::GetBoardFromUndoList( wxCommandEvent& event ) GetScreen()->PushCommandToRedoList( List ); OnModify(); - m_canvas->Refresh(); + RefreshCanvas(); } @@ -650,7 +650,7 @@ void PCB_EDIT_FRAME::GetBoardFromRedoList( wxCommandEvent& event ) GetScreen()->PushCommandToUndoList( List ); OnModify(); - m_canvas->Refresh(); + RefreshCanvas(); } diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index 54fb33d740..3ac5b7f640 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -346,7 +346,7 @@ void PCB_LAYER_WIDGET::OnLayerColorChange( LAYER_NUM aLayer, EDA_COLOR_T aColor { myframe->GetBoard()->SetLayerColor( aLayer, aColor ); myframe->ReCreateLayerBox( NULL ); - myframe->GetCanvas()->Refresh(); + myframe->RefreshCanvas(); } @@ -359,7 +359,7 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer ) if( m_alwaysShowActiveCopperLayer ) OnLayerSelected(); else if( DisplayOpt.ContrastModeDisplay ) - myframe->GetCanvas()->Refresh(); + myframe->RefreshCanvas(); return true; } @@ -405,14 +405,14 @@ void PCB_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool is if( myframe->IsGalCanvasActive() ) galCanvas->Refresh(); else - myframe->GetCanvas()->Refresh(); + myframe->RefreshCanvas(); } } void PCB_LAYER_WIDGET::OnRenderColorChange( int aId, EDA_COLOR_T aColor ) { myframe->GetBoard()->SetVisibleElementColor( aId, aColor ); - myframe->GetCanvas()->Refresh(); + myframe->RefreshCanvas(); } void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled ) @@ -430,7 +430,7 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled ) if( myframe->IsGalCanvasActive() ) galCanvas->Refresh(); else - myframe->GetCanvas()->Refresh(); + myframe->RefreshCanvas(); } //----------------------------------------------- diff --git a/pcbnew/dialogs/dialog_display_options.cpp b/pcbnew/dialogs/dialog_display_options.cpp index 8b44757d90..4f5fb1cbea 100644 --- a/pcbnew/dialogs/dialog_display_options.cpp +++ b/pcbnew/dialogs/dialog_display_options.cpp @@ -180,7 +180,7 @@ void DIALOG_DISPLAY_OPTIONS::OnOkClick(wxCommandEvent& event) if( m_Parent->IsGalCanvasActive() ) m_Parent->GetGalCanvas()->Refresh(); else - m_Parent->GetCanvas()->Refresh(); + m_Parent->RefreshCanvas(); EndModal( 1 ); } diff --git a/pcbnew/dialogs/dialog_drc.cpp b/pcbnew/dialogs/dialog_drc.cpp index d65d497784..0a779540b3 100644 --- a/pcbnew/dialogs/dialog_drc.cpp +++ b/pcbnew/dialogs/dialog_drc.cpp @@ -548,7 +548,7 @@ void DIALOG_DRC_CONTROL::OnUnconnectedSelectionEvent( wxCommandEvent& event ) void DIALOG_DRC_CONTROL::RedrawDrawPanel() { - m_Parent->GetCanvas()->Refresh(); + m_Parent->RefreshCanvas(); } diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index 3c86cd8d4a..37854ac88f 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -185,7 +185,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) if( state && (GetBoard()->m_Status_Pcb & LISTE_RATSNEST_ITEM_OK) == 0 ) Compile_Ratsnest( NULL, true ); - m_canvas->Refresh(); + RefreshCanvas(); break; case ID_TB_OPTIONS_SHOW_MODULE_RATSNEST: @@ -200,35 +200,35 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) DisplayOpt.DisplayZonesMode = 0; recache = true; if( !m_galCanvasActive ) - m_canvas->Refresh(); + RefreshCanvas(); break; case ID_TB_OPTIONS_SHOW_ZONES_DISABLE: DisplayOpt.DisplayZonesMode = 1; recache = true; if( !m_galCanvasActive ) - m_canvas->Refresh(); + RefreshCanvas(); break; case ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY: DisplayOpt.DisplayZonesMode = 2; recache = true; if( !m_galCanvasActive ) - m_canvas->Refresh(); + RefreshCanvas(); break; case ID_TB_OPTIONS_SHOW_VIAS_SKETCH: m_DisplayViaFill = DisplayOpt.DisplayViaFill = !state; recache = true; if( !m_galCanvasActive ) - m_canvas->Refresh(); + RefreshCanvas(); break; case ID_TB_OPTIONS_SHOW_TRACKS_SKETCH: m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill = !state; recache = true; if( !m_galCanvasActive ) - m_canvas->Refresh(); + RefreshCanvas(); break; case ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE: @@ -244,7 +244,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) if( m_galCanvasActive ) m_galCanvas->Refresh(); else - m_canvas->Refresh(); + RefreshCanvas(); break; } diff --git a/pcbnew/dialogs/dialog_global_deletion.cpp b/pcbnew/dialogs/dialog_global_deletion.cpp index cce6a7b4b5..3048f5b7c0 100644 --- a/pcbnew/dialogs/dialog_global_deletion.cpp +++ b/pcbnew/dialogs/dialog_global_deletion.cpp @@ -182,7 +182,7 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( ) m_Parent->Compile_Ratsnest( NULL, true ); } - m_Parent->GetCanvas()->Refresh(); + m_Parent->RefreshCanvas(); m_Parent->OnModify(); EndModal( 1 ); diff --git a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp index b5114a0ce8..8fd7b9f040 100644 --- a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp +++ b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp @@ -206,7 +206,7 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::OnOkClick( wxCommandEvent& event ) EndModal( 1 ); if( change ) - m_Parent->GetCanvas()->Refresh(); + m_Parent->RefreshCanvas(); } diff --git a/pcbnew/dialogs/dialog_global_modules_fields_edition.cpp b/pcbnew/dialogs/dialog_global_modules_fields_edition.cpp index aa8f2c9186..55fa8efdc7 100644 --- a/pcbnew/dialogs/dialog_global_modules_fields_edition.cpp +++ b/pcbnew/dialogs/dialog_global_modules_fields_edition.cpp @@ -136,7 +136,7 @@ void PCB_EDIT_FRAME::OnResetModuleTextSizes( wxCommandEvent& event ) DIALOG_GLOBAL_MODULES_FIELDS_EDITION dlg(this); dlg.ShowModal(); - m_canvas->Refresh(); + RefreshCanvas(); } void PCB_BASE_FRAME::ResetModuleTextSizes( const wxString & aFilter, bool aRef, diff --git a/pcbnew/dialogs/dialog_orient_footprints.cpp b/pcbnew/dialogs/dialog_orient_footprints.cpp index 4c6dd832d5..20b31aab44 100644 --- a/pcbnew/dialogs/dialog_orient_footprints.cpp +++ b/pcbnew/dialogs/dialog_orient_footprints.cpp @@ -104,7 +104,7 @@ void PCB_EDIT_FRAME::OnOrientFootprints( wxCommandEvent& event ) if( ReOrientModules( text, dlg.GetOrientation(), dlg.ApplyToLockedModules() ) ) { - m_canvas->Refresh(); + RefreshCanvas(); Compile_Ratsnest( NULL, true ); } } diff --git a/pcbnew/dialogs/dialog_set_grid.cpp b/pcbnew/dialogs/dialog_set_grid.cpp index 36527c6df6..5c37f16f5c 100644 --- a/pcbnew/dialogs/dialog_set_grid.cpp +++ b/pcbnew/dialogs/dialog_set_grid.cpp @@ -216,7 +216,7 @@ bool PCB_BASE_FRAME::InvokeDialogGrid() if( GetScreen()->GetGridId() == ID_POPUP_GRID_USER ) GetScreen()->SetGrid( ID_POPUP_GRID_USER ); - m_canvas->Refresh(); + RefreshCanvas(); return true; } diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 0a2fb5434f..47e60041ba 100755 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -399,7 +399,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) GetDesignSettings().m_CurrentViaType = v_type; if( DisplayOpt.ContrastModeDisplay ) - m_canvas->Refresh(); + RefreshCanvas(); } break; @@ -572,7 +572,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_POPUP_PCB_FILL_ALL_ZONES: m_canvas->MoveCursorToCrossHair(); Fill_All_Zones( this ); - m_canvas->Refresh(); + RefreshCanvas(); SetMsgPanel( GetBoard() ); break; @@ -584,7 +584,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) TestNetConnection( NULL, zone_container->GetNet() ); OnModify(); SetMsgPanel( GetBoard() ); - m_canvas->Refresh(); + RefreshCanvas(); } SetCurItem( NULL ); break; @@ -604,7 +604,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) TestForActiveLinksInRatsnest( 0 ); // Recalculate the active ratsnest, i.e. the unconnected links OnModify(); SetMsgPanel( GetBoard() ); - m_canvas->Refresh(); + RefreshCanvas(); break; case ID_POPUP_PCB_FILL_ZONE: @@ -612,7 +612,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) Fill_Zone( (ZONE_CONTAINER*) GetCurItem() ); TestNetConnection( NULL, ( (ZONE_CONTAINER*) GetCurItem() )->GetNet() ); SetMsgPanel( GetBoard() ); - m_canvas->Refresh(); + RefreshCanvas(); break; case ID_POPUP_PCB_MOVE_TEXTEPCB_REQUEST: @@ -1040,7 +1040,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) Delete_Drawings_All_Layer( GetCurItem()->GetLayer() ); SetCurItem( NULL ); m_canvas->MoveCursorToCrossHair(); - m_canvas->Refresh(); + RefreshCanvas(); break; case ID_POPUP_PCB_EDIT_DRAWING: @@ -1287,7 +1287,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) if( Other_Layer_Route( (TRACK*) GetScreen()->GetCurItem(), DC ) ) { if( DisplayOpt.ContrastModeDisplay ) - m_canvas->Refresh(); + RefreshCanvas(); } // if the via was allowed by DRC, then the layer swap has already @@ -1306,7 +1306,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) setActiveLayer( layer ); if( DisplayOpt.ContrastModeDisplay ) - m_canvas->Refresh(); + RefreshCanvas(); } diff --git a/pcbnew/edit_pcb_text.cpp b/pcbnew/edit_pcb_text.cpp index c7a62aaa01..72901a5a56 100644 --- a/pcbnew/edit_pcb_text.cpp +++ b/pcbnew/edit_pcb_text.cpp @@ -126,7 +126,7 @@ void PCB_EDIT_FRAME::Place_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ) TextePcb->ClearFlags(); #ifdef USE_WX_OVERLAY - m_canvas->Refresh(); + RefreshCanvas(); #endif } @@ -144,7 +144,7 @@ void PCB_EDIT_FRAME::StartMoveTextePcb( TEXTE_PCB* aTextePcb, wxDC* aDC, bool aE SetMsgPanel( aTextePcb ); #ifdef USE_WX_OVERLAY - m_canvas->Refresh(); + RefreshCanvas(); #endif GetScreen()->SetCrossHairPosition( aTextePcb->GetTextPosition() ); @@ -257,7 +257,7 @@ void PCB_EDIT_FRAME::Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ) OnModify(); #ifdef USE_WX_OVERLAY - m_canvas->Refresh(); + RefreshCanvas(); #endif } @@ -281,6 +281,6 @@ void PCB_EDIT_FRAME::FlipTextePcb( TEXTE_PCB* aTextePcb, wxDC* aDC ) OnModify(); #ifdef USE_WX_OVERLAY - m_canvas->Refresh(); + RefreshCanvas(); #endif } diff --git a/pcbnew/editmod.cpp b/pcbnew/editmod.cpp index 1f217d6194..9f4e01a7f0 100644 --- a/pcbnew/editmod.cpp +++ b/pcbnew/editmod.cpp @@ -68,7 +68,7 @@ void PCB_EDIT_FRAME::InstallModuleOptionsFrame( MODULE* Module, wxDC* DC ) #ifdef __WXMAC__ // If something edited, push a refresh request if (retvalue == 0 || retvalue == 1) - m_canvas->Refresh(); + RefreshCanvas(); #endif if( retvalue == 2 ) @@ -120,7 +120,7 @@ void FOOTPRINT_EDIT_FRAME::RemoveStruct( EDA_ITEM* Item ) case PCB_MODULE_EDGE_T: Delete_Edge_Module( (EDGE_MODULE*) Item ); - m_canvas->Refresh(); + RefreshCanvas(); break; case PCB_MODULE_T: diff --git a/pcbnew/edtxtmod.cpp b/pcbnew/edtxtmod.cpp index 01869ae06f..4da20c4956 100644 --- a/pcbnew/edtxtmod.cpp +++ b/pcbnew/edtxtmod.cpp @@ -349,7 +349,7 @@ void PCB_BASE_FRAME::ResetTextSize( BOARD_ITEM* aItem, wxDC* aDC ) text->SetThickness( newThickness ); if( aDC ) - m_canvas->Refresh(); + RefreshCanvas(); OnModify(); } diff --git a/pcbnew/event_handlers_tracks_vias_sizes.cpp b/pcbnew/event_handlers_tracks_vias_sizes.cpp index 52428a3834..33f975b07c 100644 --- a/pcbnew/event_handlers_tracks_vias_sizes.cpp +++ b/pcbnew/event_handlers_tracks_vias_sizes.cpp @@ -118,5 +118,5 @@ void PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event( wxCommandEvent& event ) }*/ //+hp //Refresh canvas, that we can see changes instantly. I use this because it dont,t throw mouse up-left corner. - m_canvas->Refresh(); + RefreshCanvas(); } diff --git a/pcbnew/footprint_wizard.cpp b/pcbnew/footprint_wizard.cpp index 75560423a0..451d7964dc 100644 --- a/pcbnew/footprint_wizard.cpp +++ b/pcbnew/footprint_wizard.cpp @@ -117,7 +117,7 @@ void FOOTPRINT_WIZARD_FRAME::ReloadFootprint() printf( "footprintWizard->GetModule() returns NULL\n" ); } - m_canvas->Refresh(); + RefreshCanvas(); } diff --git a/pcbnew/footprint_wizard_frame.cpp b/pcbnew/footprint_wizard_frame.cpp index 73fe27b054..c48e6ebcf2 100644 --- a/pcbnew/footprint_wizard_frame.cpp +++ b/pcbnew/footprint_wizard_frame.cpp @@ -408,7 +408,7 @@ void FOOTPRINT_WIZARD_FRAME::ReCreatePageList() ReCreateParameterList(); ReCreateHToolbar(); DisplayWizardInfos(); - m_canvas->Refresh(); + RefreshCanvas(); } @@ -506,7 +506,7 @@ void FOOTPRINT_WIZARD_FRAME::ClickOnPageList( wxCommandEvent& event ) return; ReCreateParameterList(); - m_canvas->Refresh(); + RefreshCanvas(); DisplayWizardInfos(); } diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index 691346005a..30b07f55b2 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -357,7 +357,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit DisplayOpt.DisplayPcbTrackFill ^= 1; DisplayOpt.DisplayPcbTrackFill &= 1; m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill; - m_canvas->Refresh(); + RefreshCanvas(); break; case HK_DELETE: @@ -454,7 +454,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit { Other_Layer_Route( NULL, aDC ); if( DisplayOpt.ContrastModeDisplay ) - m_canvas->Refresh(); + RefreshCanvas(); break; } @@ -538,7 +538,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit case HK_SWITCH_HIGHCONTRAST_MODE: // switch to high contrast mode and refresh the canvas DisplayOpt.ContrastModeDisplay = !DisplayOpt.ContrastModeDisplay; - m_canvas->Refresh(); + RefreshCanvas(); break; case HK_CANVAS_CAIRO: diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index fb1b5f1035..e8fb7e2bba 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -542,7 +542,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) GetScreen()->GetCurItem()->ClearFlags(); if( ret > 0 ) - m_canvas->Refresh(); + RefreshCanvas(); } break; @@ -572,7 +572,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) m_canvas->MoveCursorToCrossHair(); if( ret > 0 ) - m_canvas->Refresh(); + RefreshCanvas(); } break; @@ -661,38 +661,38 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) m_canvas->MoveCursorToCrossHair(); if( edge ) - m_canvas->Refresh(); + RefreshCanvas(); } break; case ID_POPUP_MODEDIT_EDIT_BODY_ITEM : m_canvas->MoveCursorToCrossHair(); InstallFootprintBodyItemPropertiesDlg( (EDGE_MODULE*) GetScreen()->GetCurItem() ); - m_canvas->Refresh(); + RefreshCanvas(); break; case ID_POPUP_MODEDIT_EDIT_WIDTH_CURRENT_EDGE: m_canvas->MoveCursorToCrossHair(); Edit_Edge_Width( (EDGE_MODULE*) GetScreen()->GetCurItem() ); - m_canvas->Refresh(); + RefreshCanvas(); break; case ID_POPUP_MODEDIT_EDIT_WIDTH_ALL_EDGE: m_canvas->MoveCursorToCrossHair(); Edit_Edge_Width( NULL ); - m_canvas->Refresh(); + RefreshCanvas(); break; case ID_POPUP_MODEDIT_EDIT_LAYER_CURRENT_EDGE: m_canvas->MoveCursorToCrossHair(); Edit_Edge_Layer( (EDGE_MODULE*) GetScreen()->GetCurItem() ); - m_canvas->Refresh(); + RefreshCanvas(); break; case ID_POPUP_MODEDIT_EDIT_LAYER_ALL_EDGE: m_canvas->MoveCursorToCrossHair(); Edit_Edge_Layer( NULL ); - m_canvas->Refresh(); + RefreshCanvas(); break; case ID_POPUP_PCB_DELETE_EDGE: @@ -775,7 +775,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) } if( redraw ) - m_canvas->Refresh(); + RefreshCanvas(); } diff --git a/pcbnew/modedit_onclick.cpp b/pcbnew/modedit_onclick.cpp index 4628f1ba80..07f9fd35ab 100644 --- a/pcbnew/modedit_onclick.cpp +++ b/pcbnew/modedit_onclick.cpp @@ -97,13 +97,13 @@ void FOOTPRINT_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) { End_Edge_Module( (EDGE_MODULE*) item ); SetCurItem( NULL ); - m_canvas->Refresh(); + RefreshCanvas(); } else if( ( (EDGE_MODULE*) item )->GetShape() == S_ARC ) { End_Edge_Module( (EDGE_MODULE*) item ); SetCurItem( NULL ); - m_canvas->Refresh(); + RefreshCanvas(); } else if( ( (EDGE_MODULE*) item )->GetShape() == S_SEGMENT ) { @@ -150,7 +150,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) // so deselect the active tool SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString ); SetCurItem( NULL ); - m_canvas->Refresh(); + RefreshCanvas(); } break; @@ -436,7 +436,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) m_canvas->MoveCursorToCrossHair(); if( ret > 0 ) - m_canvas->Refresh(); + RefreshCanvas(); } break; @@ -448,7 +448,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) case PCB_MODULE_EDGE_T : m_canvas->MoveCursorToCrossHair(); InstallFootprintBodyItemPropertiesDlg( (EDGE_MODULE*) item ); - m_canvas->Refresh(); + RefreshCanvas(); break; default: @@ -463,7 +463,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) { End_Edge_Module( (EDGE_MODULE*) item ); SetCurItem( NULL ); - m_canvas->Refresh(); + RefreshCanvas(); } break; diff --git a/pcbnew/modedit_undo_redo.cpp b/pcbnew/modedit_undo_redo.cpp index 5e1fc518cc..8d4fea8620 100644 --- a/pcbnew/modedit_undo_redo.cpp +++ b/pcbnew/modedit_undo_redo.cpp @@ -72,7 +72,7 @@ void FOOTPRINT_EDIT_FRAME::GetComponentFromRedoList( wxCommandEvent& event ) SetCurItem( NULL ); OnModify(); - m_canvas->Refresh(); + RefreshCanvas(); } @@ -101,5 +101,5 @@ void FOOTPRINT_EDIT_FRAME::GetComponentFromUndoList( wxCommandEvent& event ) SetCurItem( NULL ); OnModify(); - m_canvas->Refresh(); + RefreshCanvas(); } diff --git a/pcbnew/modules.cpp b/pcbnew/modules.cpp index f19e944a9b..edaae23008 100644 --- a/pcbnew/modules.cpp +++ b/pcbnew/modules.cpp @@ -285,7 +285,7 @@ bool PCB_EDIT_FRAME::Delete_Module( MODULE* aModule, wxDC* aDC, bool aAskBeforeD // Redraw the full screen to ensure perfect display of board and ratsnest. if( aDC ) - m_canvas->Refresh(); + RefreshCanvas(); return true; } @@ -421,7 +421,7 @@ void PCB_BASE_FRAME::PlaceModule( MODULE* aModule, wxDC* aDC, bool aDoNotRecreat Compile_Ratsnest( aDC, true ); if( aDC ) - m_canvas->Refresh(); + RefreshCanvas(); SetMsgPanel( aModule ); } @@ -490,7 +490,7 @@ void PCB_BASE_FRAME::Rotate_Module( wxDC* DC, MODULE* module, double angle, bool } if( module->GetFlags() == 0 ) // module not in edit: redraw full screen - m_canvas->Refresh(); + RefreshCanvas(); } } diff --git a/pcbnew/modview.cpp b/pcbnew/modview.cpp index 2fb378ef84..bfeed514cc 100644 --- a/pcbnew/modview.cpp +++ b/pcbnew/modview.cpp @@ -165,7 +165,7 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentFootprint( wxCommandEvent& event ) SetCurItem( NULL ); Zoom_Automatique( false ); - m_canvas->Refresh(); + RefreshCanvas(); Update3D_Frame(); m_FootprintList->SetStringSelection( m_footprintName ); } diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index a051ea942d..5ec3ed8ae2 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -411,7 +411,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList() ReCreateFootprintList(); ReCreateHToolbar(); DisplayLibInfos(); - m_canvas->Refresh(); + RefreshCanvas(); } @@ -477,7 +477,7 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnLibList( wxCommandEvent& event ) m_libraryName = name; ReCreateFootprintList(); - m_canvas->Refresh(); + RefreshCanvas(); DisplayLibInfos(); ReCreateHToolbar(); } @@ -525,7 +525,7 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList( wxCommandEvent& event ) DisplayLibInfos(); Zoom_Automatique( false ); - m_canvas->Refresh(); + RefreshCanvas(); Update3D_Frame(); } } diff --git a/pcbnew/move_or_drag_track.cpp b/pcbnew/move_or_drag_track.cpp index 877edfcd03..82f9cac46f 100644 --- a/pcbnew/move_or_drag_track.cpp +++ b/pcbnew/move_or_drag_track.cpp @@ -894,7 +894,7 @@ bool PCB_EDIT_FRAME::PlaceDraggedOrMovedTrackSegment( TRACK* Track, wxDC* DC ) if( current_net_code > 0 ) TestNetConnection( DC, current_net_code ); - m_canvas->Refresh(); + RefreshCanvas(); return true; } diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index 5b40506808..f358c5fcc6 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -109,7 +109,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName, // Rebuild the board connectivity: Compile_Ratsnest( NULL, true ); SetMsgPanel( GetBoard() ); - m_canvas->Refresh(); + RefreshCanvas(); } diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index fe9e5ee01d..7e29efb5ed 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -790,11 +790,9 @@ void PCB_EDIT_FRAME::setHighContrastLayer( LAYER_NUM aLayer ) rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ) ); } } + view->UpdateAllLayersOrder(); view->UpdateAllLayersColor(); - - if( m_galCanvasActive ) - m_galCanvas->Refresh(); } } diff --git a/pcbnew/sel_layer.cpp b/pcbnew/sel_layer.cpp index 5e265a26dc..e2e524beb2 100644 --- a/pcbnew/sel_layer.cpp +++ b/pcbnew/sel_layer.cpp @@ -243,7 +243,7 @@ void PCB_BASE_FRAME::SelectLayerPair() // because the PAD_SMD pads may change color. if( result >= 0 && DisplayOpt.ContrastModeDisplay ) { - m_canvas->Refresh(); + RefreshCanvas(); } } diff --git a/pcbnew/xchgmod.cpp b/pcbnew/xchgmod.cpp index 32ee549465..67bb2edb3a 100644 --- a/pcbnew/xchgmod.cpp +++ b/pcbnew/xchgmod.cpp @@ -281,7 +281,7 @@ void DIALOG_EXCHANGE_MODULE::Change_Current_Module() if( m_Parent->GetBoard()->IsElementVisible( RATSNEST_VISIBLE ) ) m_Parent->Compile_Ratsnest( NULL, true ); - m_Parent->GetCanvas()->Refresh(); + m_Parent->RefreshCanvas(); } if( pickList.GetCount() ) @@ -370,7 +370,7 @@ void DIALOG_EXCHANGE_MODULE::Change_ModuleId( bool aUseValue ) if( m_Parent->GetBoard()->IsElementVisible( RATSNEST_VISIBLE ) ) m_Parent->Compile_Ratsnest( NULL, true ); - m_Parent->GetCanvas()->Refresh(); + m_Parent->RefreshCanvas(); } if( pickList.GetCount() ) @@ -423,7 +423,7 @@ void DIALOG_EXCHANGE_MODULE::Change_ModuleAll() if( m_Parent->GetBoard()->IsElementVisible( RATSNEST_VISIBLE ) ) m_Parent->Compile_Ratsnest( NULL, true ); - m_Parent->GetCanvas()->Refresh(); + m_Parent->RefreshCanvas(); } if( pickList.GetCount() ) diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index 9effa3977c..8973ffccb3 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -333,7 +333,7 @@ void PCB_EDIT_FRAME::End_Move_Zone_Corner_Or_Outlines( wxDC* DC, ZONE_CONTAINER* // Combine zones if possible wxBusyCursor dummy; GetBoard()->OnAreaPolygonModified( &s_AuxiliaryList, aZone ); - m_canvas->Refresh(); + RefreshCanvas(); int ii = GetBoard()->GetAreaIndex( aZone ); // test if aZone exists diff --git a/pcbnew/zones_by_polygon_fill_functions.cpp b/pcbnew/zones_by_polygon_fill_functions.cpp index 61324cb6c7..2697f03e6e 100644 --- a/pcbnew/zones_by_polygon_fill_functions.cpp +++ b/pcbnew/zones_by_polygon_fill_functions.cpp @@ -80,7 +80,7 @@ void PCB_EDIT_FRAME::Delete_OldZone_Fill( SEGZONE* aZone, time_t aTimestamp ) if( modify ) { OnModify(); - m_canvas->Refresh(); + RefreshCanvas(); } } From 6054e7be0abd6c765bd975d71a2169a180944383 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 6 Sep 2013 16:01:46 +0200 Subject: [PATCH 272/415] Added a few comments. --- common/tool/tool_dispatcher.cpp | 3 +-- include/tool/tool_manager.h | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 89da297fa9..d87a7248fd 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -155,7 +155,6 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti } else isClick = true; - if( isClick ) { @@ -256,7 +255,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) } -void TOOL_DISPATCHER::DispatchWxCommand( wxCommandEvent &aEvent ) +void TOOL_DISPATCHER::DispatchWxCommand( wxCommandEvent& aEvent ) { bool activateTool = false; std::string toolName; diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index f0830263de..cfafb609c0 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -71,6 +71,8 @@ public: * Function InvokeTool() * Calls a tool by sending a tool activation event to tool of given ID or name. * An user-defined parameter object can be also passed + * + * @return True if the requested tool was invoked successfully. */ bool InvokeTool( TOOL_ID aToolId ); bool InvokeTool( const std::string& aName ); @@ -81,6 +83,8 @@ public: /** * Function FindTool() * Searches for a tool with given name or ID + * + * @return Pointer to the request tool of NULL in case of failure. */ TOOL_BASE* FindTool( int aId ) const; TOOL_BASE* FindTool( const std::string& aName ) const; @@ -100,7 +104,7 @@ public: /** * Sets the work environment (model, view, view controls and the parent window). * These are made available to the tool. Called by the parent frame (PCB_EDIT_FRAME) - * when the board is set up + * when the board is set up. */ void SetEnvironment( EDA_ITEM* aModel, KiGfx::VIEW* aView, KiGfx::VIEW_CONTROLS* aViewControls, wxWindow* aFrame ); From bc67fc338e8219f45b7acb5aeee1560f331a0b47 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 6 Sep 2013 16:04:12 +0200 Subject: [PATCH 273/415] Smarter selection algorithm (does not allow to select both whole MODULE and its parts at the same time). Cancel event works better (selection box does not appear after cancelling the selection tool). Removed blinking selection box effect. Model is accessed in more appropriate way (getModel() method). --- pcbnew/tools/selection_tool.cpp | 63 ++++++++++++++++++++++++++------- pcbnew/tools/selection_tool.h | 13 ++++--- 2 files changed, 60 insertions(+), 16 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index d1b702244b..c1a68a1914 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -69,9 +69,10 @@ void SELECTION_TOOL::Reset() int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) { bool dragging = false; - m_board = static_cast( m_toolMgr->GetEditFrame() )->GetBoard(); + bool allowMultiple = true; + BOARD* board = getModel( PCB_T ); - if( !m_board ) + if( !board ) return 0; // Main loop: keep receiving events @@ -91,6 +92,10 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) if( evt->IsClick( MB_Left ) ) selectSingle( evt->Position() ); + // unlock the multiple selection box + if( evt->IsMouseUp( MB_Left ) ) + allowMultiple = true; + // drag with LMB? Select multiple objects (or at least draw a selection box) or drag them if( evt->IsDrag( MB_Left ) ) { @@ -101,14 +106,14 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) { // If nothings has been selected or user wants to select more // draw the selection box - selectMultiple(); + if( allowMultiple ) + allowMultiple = !selectMultiple(); } else { // Now user wants to drag the selected items m_toolMgr->InvokeTool( "pcbnew.InteractiveMove" ); } - } else if( dragging ) { @@ -223,17 +228,24 @@ BOARD_ITEM* SELECTION_TOOL::pickSmallestComponent( GENERAL_COLLECTOR* aCollector } -void SELECTION_TOOL::selectMultiple() +bool SELECTION_TOOL::selectMultiple() { OPT_TOOL_EVENT evt; VIEW* v = getView(); + bool cancelled = false; + // Those 2 lines remove the blink-in-the-random-place effect + m_selArea->SetOrigin( VECTOR2I( 0, 0 ) ); + m_selArea->SetEnd( VECTOR2I( 0, 0 ) ); v->Add( m_selArea ); while( evt = Wait() ) { if( evt->IsCancel() ) + { + cancelled = true; break; + } if( evt->IsDrag( MB_Left ) ) { @@ -269,12 +281,15 @@ void SELECTION_TOOL::selectMultiple() m_selectedItems.insert( item ); } } + handleModules(); break; } } v->Remove( m_selArea ); + + return cancelled; } @@ -337,8 +352,10 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) } -bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const +bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) { + BOARD* board = getModel( PCB_T ); + switch( aItem->Type() ) { case PCB_VIA_T: @@ -347,17 +364,17 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const LAYER_NUM top, bottom; static_cast( aItem )->ReturnLayerPair( &top, &bottom ); - return ( m_board->IsLayerVisible( top ) || - m_board->IsLayerVisible( bottom ) ); + return ( board->IsLayerVisible( top ) || + board->IsLayerVisible( bottom ) ); } break; case PCB_PAD_T: // Pads are supposed to be on top, bottom or both at the same time (THT) - if( aItem->IsOnLayer( LAYER_N_FRONT ) && m_board->IsLayerVisible( LAYER_N_FRONT ) ) + if( aItem->IsOnLayer( LAYER_N_FRONT ) && board->IsLayerVisible( LAYER_N_FRONT ) ) return true; - if( aItem->IsOnLayer( LAYER_N_BACK ) && m_board->IsLayerVisible( LAYER_N_BACK ) ) + if( aItem->IsOnLayer( LAYER_N_BACK ) && board->IsLayerVisible( LAYER_N_BACK ) ) return true; return false; @@ -369,6 +386,28 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const break; } - // All other items - return m_board->IsLayerVisible( aItem->GetLayer() ); + // All other items are selected only if the layer on which they exist is visible + return board->IsLayerVisible( aItem->GetLayer() ); +} + + +void SELECTION_TOOL::handleModules() +{ + std::set::iterator it, it_end; + + for( it = m_selectedItems.begin(), it_end = m_selectedItems.end(); it != it_end; ) + { + BOARD_ITEM* parent = (*it)->GetParent(); + + // Do not allow to select MODULE and it's parts at the same time + if( parent != NULL && parent->IsSelected() ) + { + (*it)->ClearSelected(); + m_selectedItems.erase( it++ ); + } + else + { + ++it; + } + } } diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 7a59d31921..e198542b78 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -87,8 +87,10 @@ private: /** * Function selectMultiple() * Handles drawing a selection box that allows to select many items at the same time. + * + * @return true if the function was cancelled (ie. CancelEvent was received). */ - void selectMultiple(); + bool selectMultiple(); /** * Function disambiguationMenu() @@ -127,10 +129,13 @@ private: * * @return True if the item fulfills conditions to be selected. */ - bool selectable( const BOARD_ITEM* aItem ) const; + bool selectable( const BOARD_ITEM* aItem ); - /// Currently used PCB - BOARD* m_board; + /** + * Prevents from selecting both MODULEs and it's parts at the same time. The right way is + * to select a MODULE *or* some of it's parts. + */ + void handleModules(); /// Container storing currently selected items std::set m_selectedItems; From 7e73dad7b05de911eaa9317a4585f4e9238310e7 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 6 Sep 2013 17:06:02 +0200 Subject: [PATCH 274/415] Some more spots where the GAL refresh was required. --- common/drawframe.cpp | 15 +++++++++++---- include/view/view.h | 7 ++++++- pcbnew/class_pcb_layer_widget.cpp | 9 ++------- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/common/drawframe.cpp b/common/drawframe.cpp index a8857896c2..88f73d7c44 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -234,8 +234,12 @@ void EDA_DRAW_FRAME::SkipNextLeftButtonReleaseEvent() void EDA_DRAW_FRAME::OnToggleGridState( wxCommandEvent& aEvent ) { SetGridVisibility( !IsGridVisible() ); + if( m_galCanvasActive ) + { m_galCanvas->GetGAL()->SetGridVisibility( IsGridVisible() ); + m_galCanvas->GetView()->MarkTargetDirty( KiGfx::TARGET_NONCACHED ); + } RefreshCanvas(); } @@ -392,11 +396,12 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event ) if( m_galCanvasActive ) { - KiGfx::GAL* gal = m_galCanvas->GetGAL(); - gal->SetGridSize( VECTOR2D( screen->GetGrid().m_Size.x, screen->GetGrid().m_Size.y ) ); + m_galCanvas->GetGAL()->SetGridSize( VECTOR2D( screen->GetGrid().m_Size.x, + screen->GetGrid().m_Size.y ) ); + m_galCanvas->GetView()->MarkTargetDirty( KiGfx::TARGET_NONCACHED ); } - Refresh(); + RefreshCanvas(); } @@ -1011,6 +1016,8 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) m_auimgr.GetPane( wxT( "DrawFrameGal" ) ).Show( aEnable ); m_auimgr.Update(); - m_galCanvas->SetFocus(); m_galCanvasActive = aEnable; + + if( aEnable ) + m_galCanvas->SetFocus(); } diff --git a/include/view/view.h b/include/view/view.h index f5eb6b13ca..29cb5ecb0e 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -267,7 +267,12 @@ public: */ inline void SetLayerVisible( int aLayer, bool aVisible = true ) { - m_layers[aLayer].enabled = aVisible; + if( m_layers[aLayer].enabled != aVisible ) + { + // Target has to be redrawn after changing its visibility + MarkTargetDirty( m_layers[aLayer].target ); + m_layers[aLayer].enabled = aVisible; + } } /** diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index 3ac5b7f640..07b46f4fa9 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -393,7 +393,7 @@ void PCB_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool is brd->SetVisibleLayers( visibleLayers ); - EDA_DRAW_PANEL_GAL *galCanvas = myframe->GetGalCanvas(); + EDA_DRAW_PANEL_GAL* galCanvas = myframe->GetGalCanvas(); if( galCanvas ) { KiGfx::VIEW* view = galCanvas->GetView(); @@ -401,12 +401,7 @@ void PCB_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool is } if( isFinal ) - { - if( myframe->IsGalCanvasActive() ) - galCanvas->Refresh(); - else - myframe->RefreshCanvas(); - } + myframe->RefreshCanvas(); } void PCB_LAYER_WIDGET::OnRenderColorChange( int aId, EDA_COLOR_T aColor ) From cbbc2f42e8d004aa268b2347d47c64dae5fdcf82 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 6 Sep 2013 17:06:33 +0200 Subject: [PATCH 275/415] Starts the GAL by default. --- pcbnew/pcbnew.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index 061f465d4a..285a0ba1d5 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -314,6 +314,9 @@ bool EDA_APP::OnInit() frame->SetFocus(); frame->GetCanvas()->SetFocus(); + // Activate the GAL + frame->UseGalCanvas( true ); + return true; } From 02f7e9c800221b247a40ca09aa3cb3fae2903a90 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 6 Sep 2013 17:53:01 +0200 Subject: [PATCH 276/415] Changed focus owner of LayerWidget to EDA_DRAW_PANEL_GAL to make keyboard events work (apparently everything works fine, to be tested more extensively). Removed unnecessary event hook from EDA_DRAW_PANEL_GAL. --- common/drawpanel_gal.cpp | 8 -------- include/class_drawpanel_gal.h | 1 - pcbnew/pcbframe.cpp | 2 +- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 6df67bb3a0..3b354506bf 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -87,7 +87,6 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin Connect( wxEVT_MIDDLE_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_MIDDLE_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_MOUSEWHEEL, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_CHAR_HOOK, wxEventHandler( EDA_DRAW_PANEL_GAL::skipEvent ), NULL, this ); Connect( wxEVT_KEY_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_KEY_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); } @@ -208,10 +207,3 @@ void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent ) Refresh(); } - - -void EDA_DRAW_PANEL_GAL::skipEvent( wxEvent& aEvent ) -{ - // This is necessary for CHAR_HOOK event to generate KEY_UP and KEY_DOWN events - aEvent.Skip(); -} diff --git a/include/class_drawpanel_gal.h b/include/class_drawpanel_gal.h index 542787fd0d..9206c69338 100644 --- a/include/class_drawpanel_gal.h +++ b/include/class_drawpanel_gal.h @@ -115,7 +115,6 @@ protected: void onPaint( wxPaintEvent& WXUNUSED( aEvent ) ); void onSize( wxSizeEvent& aEvent ); void onEvent( wxEvent& aEvent ); - void skipEvent( wxEvent& aEvent ); KiGfx::GAL* m_gal; ///< Interface for drawing objects on a 2D-surface KiGfx::VIEW* m_view; ///< Stores view settings (scale, center, etc.) diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 7e29efb5ed..7a7a6f6e4e 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -333,7 +333,7 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title, if( screenHeight <= 900 ) pointSize = (pointSize * 8) / 10; - m_Layers = new PCB_LAYER_WIDGET( this, m_canvas, pointSize ); + m_Layers = new PCB_LAYER_WIDGET( this, m_galCanvas, pointSize ); m_drc = new DRC( this ); // these 2 objects point to each other From 77fc1aecb29cbdb3aa6f722d46c651b8addf30dd Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 9 Sep 2013 09:34:52 +0200 Subject: [PATCH 277/415] First version of the move tool. --- common/view/view_group.cpp | 12 --- include/view/view_group.h | 3 - pcbnew/CMakeLists.txt | 1 + pcbnew/tools/move_tool.cpp | 185 +++++++++++++++++++++++++++++++++++++ pcbnew/tools/move_tool.h | 113 ++++++++++++++++++++++ pcbnew/tools/pcb_tools.cpp | 6 +- 6 files changed, 303 insertions(+), 17 deletions(-) create mode 100644 pcbnew/tools/move_tool.cpp create mode 100644 pcbnew/tools/move_tool.h diff --git a/common/view/view_group.cpp b/common/view/view_group.cpp index 3b740e01b5..d4cc2472bc 100644 --- a/common/view/view_group.cpp +++ b/common/view/view_group.cpp @@ -56,21 +56,18 @@ VIEW_GROUP::~VIEW_GROUP() void VIEW_GROUP::Add( VIEW_ITEM* aItem ) { m_items.insert( aItem ); - updateBbox(); } void VIEW_GROUP::Remove( VIEW_ITEM* aItem ) { m_items.erase( aItem ); - updateBbox(); } void VIEW_GROUP::Clear() { m_items.clear(); - updateBbox(); } @@ -121,15 +118,6 @@ void VIEW_GROUP::ViewGetLayers( int aLayers[], int& aCount ) const } -/*void VIEW_GROUP::ViewUpdate( int aUpdateFlags, bool aForceImmediateRedraw ) -{ - BOOST_FOREACH( VIEW_ITEM* item, m_items ) - { - item->ViewUpdate( aUpdateFlags, aForceImmediateRedraw ); - } -}*/ - - void VIEW_GROUP::updateBbox() { // Save the used VIEW, as it used nulled during Remove() diff --git a/include/view/view_group.h b/include/view/view_group.h index 4439234e0d..ab48e80028 100644 --- a/include/view/view_group.h +++ b/include/view/view_group.h @@ -120,9 +120,6 @@ public: */ virtual void ViewGetLayers( int aLayers[], int& aCount ) const; - /// @copydoc VIEW_ITEM::ViewUpdate() - virtual void ViewUpdate( int aUpdateFlags, bool aForceImmediateRedraw ); - /** * Function SetLayer() * Sets layer used to draw the group. diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 79b78b9b1a..d86f9dbf54 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -219,6 +219,7 @@ set(PCBNEW_CLASS_SRCS tools/selection_tool.cpp tools/selection_area.cpp + tools/move_tool.cpp tools/pcb_tools.cpp ) diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp new file mode 100644 index 0000000000..54e5afe7af --- /dev/null +++ b/pcbnew/tools/move_tool.cpp @@ -0,0 +1,185 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include + +#include "selection_tool.h" +#include "move_tool.h" + +using namespace KiGfx; +using boost::optional; + +MOVE_TOOL::MOVE_TOOL() : + TOOL_INTERACTIVE( "pcbnew.InteractiveMove" ), m_selectionTool( NULL ) +{ +} + + +MOVE_TOOL::~MOVE_TOOL() +{ +} + + +void MOVE_TOOL::Reset() +{ + // Find the selection tool, so they can cooperate + TOOL_BASE* selectionTool = m_toolMgr->FindTool( std::string( "pcbnew.InteractiveSelection" ) ); + + if( selectionTool ) + { + m_selectionTool = static_cast( selectionTool ); + } + else + { + wxLogError( "pcbnew.InteractiveSelection tool is not available" ); + return; + } + + // the tool launches upon reception of activate ("pcbnew.InteractiveMove") + Go( &MOVE_TOOL::Main, TOOL_EVENT( TC_Command, TA_ActivateTool, GetName() ) ); //"pcbnew.InteractiveMove")); +} + + +int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) +{ + VECTOR2D dragPosition; + bool dragging = false; + bool restore = false; + VIEW* view = m_toolMgr->GetView(); + std::set selection; + VIEW_GROUP items( view ); + + view->Add( &items ); + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + if( evt->IsCancel() ) + { + restore = true; + m_toolMgr->PassEvent(); + break; // Finish + } + + if( evt->IsDrag( MB_Left ) ) + { + if( dragging ) + { + // Dragging is alre + VECTOR2D movement = ( evt->Position() - dragPosition ); + + std::set::iterator it, it_end; + for( it = selection.begin(), it_end = selection.end(); it != it_end; ++it ) + { + (*it)->Move( wxPoint( movement.x, movement.y ) ); + } + items.ViewUpdate( VIEW_ITEM::GEOMETRY ); + } + else + { + // Begin dragging + selection = m_selectionTool->GetSelection(); + + std::set::iterator it; + for( it = selection.begin(); it != selection.end(); ++it ) + { + viewGroupAdd( *it, &items ); + + // but if a MODULE was selected, then we need to redraw all of it's parts + if( (*it)->Type() == PCB_MODULE_T ) + { + MODULE* module = static_cast( *it ); + + // Move everything that belongs to the module + for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) + viewGroupAdd( pad, &items ); + + for( BOARD_ITEM* drawing = module->GraphicalItems().GetFirst(); drawing; + drawing = drawing->Next() ) + viewGroupAdd( drawing, &items ); + + viewGroupAdd( &module->Reference(), &items ); + viewGroupAdd( &module->Value(), &items ); + } + + } + items.ViewUpdate( VIEW_ITEM::GEOMETRY ); + + dragging = true; + } + + dragPosition = evt->Position(); + } + else if( evt->Category() == TC_Mouse ) // Filter out other events + { + if( dragging ) + { + break; // Finish + } + } + } + + // Clean-up after movement + std::deque::iterator it, it_end; + if( restore ) + { + // Movement has to be rollbacked, so restore previous state of items + for( it = m_itemsState.begin(), it_end = m_itemsState.end(); it != it_end; ++it ) + it->Restore(); + } + else + { + // Apply changes + for( it = m_itemsState.begin(), it_end = m_itemsState.end(); it != it_end; ++it ) + { + it->RestoreVisibility(); + it->item->ViewUpdate( VIEW_ITEM::GEOMETRY ); + } + } + + m_itemsState.clear(); + items.Clear(); + view->Remove( &items ); + + return 0; +} + + +void MOVE_TOOL::viewGroupAdd( BOARD_ITEM* aItem, KiGfx::VIEW_GROUP* aGroup ) +{ + // Save the state of the selected items, in case it has to be restored + ITEM_STATE state; + state.Save( aItem ); + m_itemsState.push_back( state ); + + // Add items to the VIEW_GROUP, so they will be displayed on the overlay + // while dragging + aGroup->Add( aItem ); + + // Set the original item as invisible + aItem->ViewSetVisible( false ); +} diff --git a/pcbnew/tools/move_tool.h b/pcbnew/tools/move_tool.h new file mode 100644 index 0000000000..1022230a69 --- /dev/null +++ b/pcbnew/tools/move_tool.h @@ -0,0 +1,113 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __MOVE_TOOL_H +#define __MOVE_TOOL_H + +#include +#include + +class BOARD_ITEM; +class SELECTION_TOOL; + +namespace KiGfx +{ +class VIEW_GROUP; +} + +/** + * Class MOVE_TOOL + * /// TODO DOCS!! + * Our sample move tool: currently supports: + * - pick single objects (click LMB) + * - add objects to existing move (Shift+LMB) + * - draw move box (drag LMB) + * + * WORK IN PROGRESS. CONSIDER AS A DEMO! + */ + +class MOVE_TOOL : public TOOL_INTERACTIVE +{ +public: + MOVE_TOOL(); + ~MOVE_TOOL(); + + /** + * Function Reset() + * + * Resets the tool and initializes it. + */ + void Reset(); + + /** + * Function Main() + * + * Main loop in which events are handled. + */ + int Main( TOOL_EVENT& aEvent ); + +private: + void viewGroupAdd( BOARD_ITEM* aItem, KiGfx::VIEW_GROUP* aGroup ); + + /// Structure for (re)storing BOARD_ITEM state + typedef struct + { + BOARD_ITEM* item; /// Pointer to the item + VECTOR2D position; /// Original position of the item + bool visible; /// Original visibility flag + + void Save( BOARD_ITEM* aItem ) + { + wxPoint pos = aItem->GetPosition(); + + item = aItem; + position.x = pos.x; + position.y = pos.y; + visible = aItem->ViewIsVisible(); + } + + void RestorePosition() + { + item->SetPosition( wxPoint( position.x, position.y ) ); + } + + void RestoreVisibility() + { + item->ViewSetVisible( visible ); + } + + void Restore() + { + RestorePosition(); + RestoreVisibility(); + } + } ITEM_STATE; + + /// Selection tool used for obtaining selected items + SELECTION_TOOL* m_selectionTool; + + std::deque m_itemsState; +}; + +#endif diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 4ee70cde94..0dc342a17d 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -35,16 +35,18 @@ #include #include "selection_tool.h" +#include "move_tool.h" void PCB_EDIT_FRAME::setupTools() { - // create the manager and dispatcher. Route draw panel events to the dispatcher. + // Create the manager and dispatcher. Route draw panel events to the dispatcher m_toolManager = new TOOL_MANAGER; m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager, this ); m_galCanvas->SetEventDispatcher( m_toolDispatcher ); - // register our selection tool. + // Register tools m_toolManager->RegisterTool( new SELECTION_TOOL ); + m_toolManager->RegisterTool( new MOVE_TOOL ); } From c6d9a04dbac69b70c63d11d7e78e1e72a17ee105 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 9 Sep 2013 10:10:02 +0200 Subject: [PATCH 278/415] Parts of MODULEs are not selectable in multiple selection mode. --- pcbnew/tools/selection_tool.cpp | 40 +++++++++++++-------------------- pcbnew/tools/selection_tool.h | 9 +++----- 2 files changed, 18 insertions(+), 31 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index c1a68a1914..63689482b5 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -44,7 +44,7 @@ using namespace KiGfx; using boost::optional; SELECTION_TOOL::SELECTION_TOOL() : - TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ) + TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ), m_multiple( false ) { m_selArea = new SELECTION_AREA; } @@ -233,6 +233,7 @@ bool SELECTION_TOOL::selectMultiple() OPT_TOOL_EVENT evt; VIEW* v = getView(); bool cancelled = false; + m_multiple = true; // Those 2 lines remove the blink-in-the-random-place effect m_selArea->SetOrigin( VECTOR2I( 0, 0 ) ); @@ -281,13 +282,12 @@ bool SELECTION_TOOL::selectMultiple() m_selectedItems.insert( item ); } } - handleModules(); - break; } } v->Remove( m_selArea ); + m_multiple = false; return cancelled; } @@ -370,6 +370,11 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) break; case PCB_PAD_T: + { + // Pads are not selectable in multiple selection mode + if( m_multiple ) + return false; + // Pads are supposed to be on top, bottom or both at the same time (THT) if( aItem->IsOnLayer( LAYER_N_FRONT ) && board->IsLayerVisible( LAYER_N_FRONT ) ) return true; @@ -378,6 +383,13 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) return true; return false; + } + break; + + case PCB_MODULE_TEXT_T: + // Module texts are not selectable in multiple selection mode + if( m_multiple ) + return false; break; case PCB_MODULE_EDGE_T: @@ -389,25 +401,3 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) // All other items are selected only if the layer on which they exist is visible return board->IsLayerVisible( aItem->GetLayer() ); } - - -void SELECTION_TOOL::handleModules() -{ - std::set::iterator it, it_end; - - for( it = m_selectedItems.begin(), it_end = m_selectedItems.end(); it != it_end; ) - { - BOARD_ITEM* parent = (*it)->GetParent(); - - // Do not allow to select MODULE and it's parts at the same time - if( parent != NULL && parent->IsSelected() ) - { - (*it)->ClearSelected(); - m_selectedItems.erase( it++ ); - } - else - { - ++it; - } - } -} diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index e198542b78..c76743d266 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -131,12 +131,6 @@ private: */ bool selectable( const BOARD_ITEM* aItem ); - /** - * Prevents from selecting both MODULEs and it's parts at the same time. The right way is - * to select a MODULE *or* some of it's parts. - */ - void handleModules(); - /// Container storing currently selected items std::set m_selectedItems; @@ -148,6 +142,9 @@ private: /// Flag saying if items should be added to the current selection or rather replace it bool m_additive; + + /// Flag saying if multiple selection mode is active + bool m_multiple; }; #endif From 7bbd31fa2a666f38810e3b1a2a4ce57553b9df5c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 9 Sep 2013 10:53:46 +0200 Subject: [PATCH 279/415] Modified interfaces for [WX_]VIEW_CONTROLS. --- common/view/wx_view_controls.cpp | 20 ++---- include/view/view_controls.h | 108 ++++++++++++++++++++++++------- include/view/wx_view_controls.h | 68 +++---------------- 3 files changed, 100 insertions(+), 96 deletions(-) diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 22a0af5b0e..49817951d4 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -34,11 +34,6 @@ using namespace KiGfx; WX_VIEW_CONTROLS::WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ) : VIEW_CONTROLS( aView ), m_state( IDLE ), - m_grabMouse( false ), - m_snappingEnabled( true ), - m_autoPanEnabled( false ), - m_autoPanMargin( 0.1 ), - m_autoPanSpeed( 0.15 ), m_parentPanel( aParentPanel ) { m_parentPanel->Connect( wxEVT_MOTION, wxMouseEventHandler( @@ -64,6 +59,12 @@ void WX_VIEW_CONTROLS::onMotion( wxMouseEvent& aEvent ) { m_mousePosition.x = aEvent.GetX(); m_mousePosition.y = aEvent.GetY(); + + if( m_snappingEnabled ) + m_cursorPosition = m_view->GetGAL()->GetGridPoint( m_mousePosition ); + else + m_cursorPosition = m_mousePosition; + bool isAutoPanning = false; if( m_autoPanEnabled ) @@ -210,15 +211,6 @@ void WX_VIEW_CONTROLS::SetGrabMouse( bool aEnabled ) } -VECTOR2D WX_VIEW_CONTROLS::GetCursorPosition() const -{ - if( m_snappingEnabled ) - return m_view->GetGAL()->GetGridPoint( m_mousePosition ); - - return m_mousePosition; -} - - bool WX_VIEW_CONTROLS::handleAutoPanning( const wxMouseEvent& aEvent ) { VECTOR2D p( aEvent.GetX(), aEvent.GetY() ); diff --git a/include/view/view_controls.h b/include/view/view_controls.h index 0774d7ef69..3b686d966c 100644 --- a/include/view/view_controls.h +++ b/include/view/view_controls.h @@ -46,23 +46,31 @@ class VIEW; class VIEW_CONTROLS { public: - VIEW_CONTROLS( VIEW* aView ) : m_view( aView ) {}; + VIEW_CONTROLS( VIEW* aView ) : m_view( aView ), m_snappingEnabled( false ), + m_grabMouse( false ), m_autoPanEnabled( false ), m_autoPanMargin( 0.1 ), + m_autoPanSpeed( 0.15 ) {}; virtual ~VIEW_CONTROLS() {}; /** - * Function Activate - * Determines if all view related events (mouse wheel, right click panning, etc.), should be - * handled or not. If not - they can be processed by the legacy view. - * @param aEnabled tells if events should be handled. + * Function SetSnapping() + * Enables/disables snapping cursor to grid. + * + * @param aEnabled says whether the opion should be enabled or disabled. */ - virtual void Activate( bool aEnabled ) {}; + void SetSnapping( bool aEnabled ) + { + m_snappingEnabled = aEnabled; + } /** * Function SetGrabMouse * Turns on/off mouse grabbing. When the mouse is grabbed, it cannot go outside the VIEW. * @param aEnabled tells if mouse should be grabbed or not. */ - virtual void SetGrabMouse( bool aEnabled ) {}; + virtual void SetGrabMouse( bool aEnabled ) + { + m_grabMouse = aEnabled; + } /** * Function SetAutoPan @@ -70,36 +78,90 @@ public: * track) and user moves mouse to the VIEW edge - then the view can be translated or not). * @param aEnabled tells if the autopanning should be active. */ - virtual void SetAutoPan( bool aEnabled ) {} + virtual void SetAutoPan( bool aEnabled ) + { + m_autoPanEnabled = aEnabled; + } /** - * Function SetPanSpeed - * Sets speed of panning. - * @param aSpeed is a new speed for panning. + * Function SetAutoPanSpeed() + * Sets speed of autopanning. + * @param aSpeed is a new speed for autopanning. */ - virtual void SetPanSpeed( float aSpeed ) {}; + virtual void SetAutoPanSpeed( float aSpeed ) + { + m_autoPanSpeed = aSpeed; + } /** - * Function SetZoomSpeed - * Determines how much zoom factor should be affected on one zoom event (eg. mouse wheel). - * @param aSpeed is a new zooming speed. + * Function SetAutoPanMArgin() + * Sets margin for autopanning (ie. the area when autopanning becomes active). + * @param aSpeed is a new margin for autopanning. */ - virtual void SetZoomSpeed( float aSpeed ) {}; + virtual void SetAutoPanMargin( float aMargin ) + { + m_autoPanMargin = aMargin; + }; /** - * Function AnimatedZoom - * // TODO + * Function GetMousePosition() + * Returns the current mouse pointer position in the screen coordinates. Note, that it may be + * different from the cursor position if snapping is enabled (@see GetCursorPosition()). + * + * @return The current mouse pointer position. */ - virtual void AnimatedZoom( const BOX2I& aExtents ) {}; + virtual const VECTOR2D& GetMousePosition() const + { + return m_mousePosition; + } - virtual void WarpCursor (const VECTOR2D& aPosition ) {}; - - virtual void ShowCursor (bool aEnabled ) {}; + /** + * Function GetCursorPosition() + * Returns the current cursor position in the screen coordinates. Note, that it may be + * different from the mouse pointer position if snapping is enabled (@see GetMousePosition()). + * + * @return The current cursor position in screen coordinates. + */ + virtual const VECTOR2D& GetCursorPosition() const + { + return m_cursorPosition; + } + /** + * Function SetCursorPosition() + * Allows to move the cursor to a different location. + * + * @param aPosition is the new location expressed in screen coordinates. + */ + virtual void SetCursorPosition( const VECTOR2D& aPosition ) + { + m_cursorPosition = aPosition; + } protected: /// Pointer to controlled VIEW. - VIEW* m_view; + VIEW* m_view; + + /// Current mouse position + VECTOR2D m_mousePosition; + + /// Current cursor position + VECTOR2D m_cursorPosition; + + /// Should the cursor snap to grid or move freely + bool m_snappingEnabled; + + /// Flag for grabbing the mouse cursor + bool m_grabMouse; + + /// Flag for turning on autopanning + bool m_autoPanEnabled; + + /// Distance from cursor to VIEW edge when panning is active + float m_autoPanMargin; + + /// How fast is panning when in auto mode + float m_autoPanSpeed; }; } // namespace KiGfx diff --git a/include/view/wx_view_controls.h b/include/view/wx_view_controls.h index 556338bd9e..1df1590745 100644 --- a/include/view/wx_view_controls.h +++ b/include/view/wx_view_controls.h @@ -51,11 +51,11 @@ public: ~WX_VIEW_CONTROLS() {}; /// Handler functions - void onWheel( wxMouseEvent& aEvent ); - void onMotion( wxMouseEvent& aEvent ); - void onButton( wxMouseEvent& aEvent ); - void onEnter( wxMouseEvent& aEvent ); - void onTimer( wxTimerEvent& aEvent ); + void onWheel( wxMouseEvent& aEvent ); + void onMotion( wxMouseEvent& aEvent ); + void onButton( wxMouseEvent& aEvent ); + void onEnter( wxMouseEvent& aEvent ); + void onTimer( wxTimerEvent& aEvent ); /** * Function SetGrabMouse() @@ -63,18 +63,7 @@ public: * * @param aEnabled says whether the option should be enabled or disabled. */ - void SetGrabMouse( bool aEnabled ); - - /** - * Function SetSnapping() - * Enables/disables snapping cursor to grid. - * - * @param aEnabled says whether the opion should be enabled or disabled. - */ - void SetSnapping( bool aEnabled ) - { - m_snappingEnabled = aEnabled; - } + void SetGrabMouse( bool aEnabled ); /** * Function SetAutoPan() @@ -82,36 +71,15 @@ public: * * @param aEnabled says whether the option should enabled or disabled. */ - void SetAutoPan( bool aEnabled ) + void SetAutoPan( bool aEnabled ) { m_autoPanEnabled = aEnabled; if( m_state == AUTO_PANNING ) m_state = IDLE; } - /** - * Function GetMousePosition() - * Returns the current mouse pointer position in the screen coordinates. Note, that it may be - * different from the cursor position if snapping is enabled (@see GetCursorPosition()). - * - * @return The current mouse pointer position. - */ - const VECTOR2D& GetMousePosition() const - { - return m_mousePosition; - } - - - /** - * Function GetCursorPosition() - * Returns the current cursor position in the screen coordinates. Note, that it may be - * different from the mouse pointer position if snapping is enabled (@see GetMousePosition()). - * - * @return The current cursor position. - */ - VECTOR2D GetCursorPosition() const; - private: + /// Possible states for WX_VIEW_CONTROLS enum State { IDLE = 1, DRAG_PANNING, @@ -126,29 +94,11 @@ private: * @return true if it is currently autopanning (ie. autopanning is active and mouse cursor * is in the area that causes autopanning to happen). */ - bool handleAutoPanning( const wxMouseEvent& aEvent ); + bool handleAutoPanning( const wxMouseEvent& aEvent ); /// Current state of VIEW_CONTROLS State m_state; - /// Current mouse position - VECTOR2D m_mousePosition; - - /// Flag for grabbing the mouse cursor - bool m_grabMouse; - - /// Should the cursor snap to grid or move freely - bool m_snappingEnabled; - - /// Flag for turning on autopanning - bool m_autoPanEnabled; - - /// Distance from cursor to VIEW edge when panning is active - float m_autoPanMargin; - - /// How fast is panning when in auto mode - float m_autoPanSpeed; - /// Panel that is affected by VIEW_CONTROLS wxWindow* m_parentPanel; From cea4d8969720154af35638c9899598b0e8e09cb7 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 9 Sep 2013 10:54:11 +0200 Subject: [PATCH 280/415] Tools are enabled to switch snapping cursor to grid. --- common/tool/tool_dispatcher.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index d87a7248fd..7138f14774 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -199,7 +200,7 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) { bool motion = false, buttonEvents = false; - VECTOR2D pos; + VECTOR2D pos, screenPos; optional evt; int type = aEvent.GetEventType(); @@ -210,8 +211,9 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) type == wxEVT_MIDDLE_DOWN || type == wxEVT_MIDDLE_UP || type == wxEVT_RIGHT_DOWN || type == wxEVT_RIGHT_UP ) { - wxMouseEvent* me = static_cast( &aEvent ); - pos = getView()->ToWorld( VECTOR2D( me->GetX(), me->GetY() ) ); + screenPos = m_toolMgr->GetViewControls()->GetCursorPosition(); + pos = getView()->ToWorld( screenPos ); + if( pos != m_lastMousePos ) { motion = true; @@ -271,3 +273,4 @@ void TOOL_DISPATCHER::DispatchWxCommand( wxCommandEvent& aEvent ) if( activateTool && m_editFrame->IsGalCanvasActive() ) m_toolMgr->InvokeTool( toolName ); } + From 940689372262a097c74998f826bc1b8ac9b0f3b8 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 9 Sep 2013 11:45:20 +0200 Subject: [PATCH 281/415] Enabled snapping for the move tool. --- pcbnew/tools/move_tool.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp index 54e5afe7af..f0783f6a40 100644 --- a/pcbnew/tools/move_tool.cpp +++ b/pcbnew/tools/move_tool.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include "selection_tool.h" #include "move_tool.h" @@ -74,6 +75,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) VIEW_GROUP items( view ); view->Add( &items ); + m_toolMgr->GetViewControls()->SetSnapping( true ); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) @@ -164,6 +166,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) m_itemsState.clear(); items.Clear(); view->Remove( &items ); + m_toolMgr->GetViewControls()->SetSnapping( false ); return 0; } From dd1ad34cea789423abb842e6a7815f8ac6682f59 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 9 Sep 2013 13:57:56 +0200 Subject: [PATCH 282/415] Stops autopanning on left mouse button release. --- common/view/wx_view_controls.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 49817951d4..5f3950ea15 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -44,6 +44,10 @@ WX_VIEW_CONTROLS::WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ) : WX_VIEW_CONTROLS::onButton ), NULL, this ); m_parentPanel->Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( WX_VIEW_CONTROLS::onButton ), NULL, this ); + m_parentPanel->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( + WX_VIEW_CONTROLS::onButton ), NULL, this ); + m_parentPanel->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( + WX_VIEW_CONTROLS::onButton ), NULL, this ); #if defined _WIN32 || defined _WIN64 m_parentPanel->Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( WX_VIEW_CONTROLS::onEnter ), NULL, this ); @@ -151,6 +155,11 @@ void WX_VIEW_CONTROLS::onButton( wxMouseEvent& aEvent ) m_lookStartPoint = m_view->GetCenter(); m_state = DRAG_PANNING; } + + if( aEvent.LeftUp() ) + { + m_state = IDLE; // Stop autopanning when user release left mouse button + } break; case DRAG_PANNING: From b319b710df729af6a0e98dcdeae3ccbd3986d6ac Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 9 Sep 2013 14:31:13 +0200 Subject: [PATCH 283/415] Fixed color for drawing polygons on overlay. --- common/gal/opengl/opengl_gal.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 5b584ff10e..4d40e28978 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -471,6 +471,7 @@ void OPENGL_GAL::DrawPolygon( const std::deque& aPointList ) // Any non convex polygon needs to be tesselated // for this purpose the GLU standard functions are used currentManager->Shader( SHADER_NONE ); + currentManager->Color( fillColor.r, fillColor.g, fillColor.b, fillColor.a ); TessParams params = { currentManager, tessIntersects }; gluTessBeginPolygon( tesselator, ¶ms ); From 881cbd6d2f85e4d318f8b5fa06ccfbc4dc229f9c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 9 Sep 2013 14:31:27 +0200 Subject: [PATCH 284/415] Small refactoring. --- common/view/wx_view_controls.cpp | 3 +-- include/tool/tool_dispatcher.h | 2 +- include/view/wx_view_controls.h | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 5f3950ea15..838f5b82a0 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -197,8 +197,7 @@ void WX_VIEW_CONTROLS::onTimer( wxTimerEvent& aEvent ) dir = m_view->ToWorld( dir, false ); m_view->SetCenter( m_view->GetCenter() + dir * m_autoPanSpeed ); - wxPaintEvent redrawEvent; - wxPostEvent( m_parentPanel, redrawEvent ); + m_parentPanel->Refresh(); } break; diff --git a/include/tool/tool_dispatcher.h b/include/tool/tool_dispatcher.h index 8072274dfe..d4057c68b0 100644 --- a/include/tool/tool_dispatcher.h +++ b/include/tool/tool_dispatcher.h @@ -36,7 +36,7 @@ class TOOL_MANAGER; class PCB_BASE_FRAME; namespace KiGfx { - class VIEW ; + class VIEW; }; /** diff --git a/include/view/wx_view_controls.h b/include/view/wx_view_controls.h index 1df1590745..7c905f2f9c 100644 --- a/include/view/wx_view_controls.h +++ b/include/view/wx_view_controls.h @@ -54,8 +54,8 @@ public: void onWheel( wxMouseEvent& aEvent ); void onMotion( wxMouseEvent& aEvent ); void onButton( wxMouseEvent& aEvent ); - void onEnter( wxMouseEvent& aEvent ); - void onTimer( wxTimerEvent& aEvent ); + void onEnter( wxMouseEvent& WXUNUSED( aEvent ) ); + void onTimer( wxTimerEvent& WXUNUSED( aEvent ) ); /** * Function SetGrabMouse() From 3a7f5fcf03710ecf72c0f1490980c5f18836812d Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Mon, 9 Sep 2013 16:53:33 +0200 Subject: [PATCH 285/415] math/box2.h: normalize on construction, minor compilation warning fix --- include/math/box2.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/include/math/box2.h b/include/math/box2.h index 3a6368590e..8d506bf62d 100644 --- a/include/math/box2.h +++ b/include/math/box2.h @@ -66,7 +66,9 @@ public: BOX2( const Vec& aPos, const Vec& aSize ) : m_Pos( aPos ), m_Size( aSize ) - { } + { + Normalize(); + } void SetMaximum() { @@ -416,10 +418,10 @@ public: { ecoord_type x2 = m_Pos.x + m_Size.x; ecoord_type y2 = m_Pos.y + m_Size.y; - ecoord_type xdiff = std::max( aP.x < m_Pos.x ? m_Pos.x - aP.x : m_Pos.x - x2, 0 ); - ecoord_type ydiff = std::max( aP.y < m_Pos.y ? m_Pos.y - aP.y : m_Pos.y - y2, 0 ); - return xdiff * xdiff + ydiff * ydiff; - } + ecoord_type xdiff = std::max(aP.x < m_Pos.x ? m_Pos.x - aP.x : m_Pos.x - x2, (ecoord_type)0); + ecoord_type ydiff = std::max(aP.y < m_Pos.y ? m_Pos.y - aP.y : m_Pos.y - y2, (ecoord_type)0); + return xdiff * xdiff + ydiff * ydiff; + } ecoord_type Distance( const Vec& aP ) const { From 35e639c5999c2740917e49a00ecb665ef6072db8 Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Mon, 9 Sep 2013 16:55:01 +0200 Subject: [PATCH 286/415] math/math_util.h: fixed signedness bug in rescale() --- include/math/math_util.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/math/math_util.h b/include/math/math_util.h index 2a3ff3fa17..9145b7fa89 100644 --- a/include/math/math_util.h +++ b/include/math/math_util.h @@ -50,12 +50,12 @@ template<> int rescale( int numerator, int value, int denominator ) template<> int64_t rescale( int64_t numerator, int64_t value, int64_t denominator ) { - uint64_t r = 0; + int64_t r = 0; int64_t sign = ( ( numerator < 0) ? -1 : 1 ) * ( denominator < 0 ? - 1: 1 ) * (value < 0 ? - 1 : 1); - uint64_t a = abs( numerator ); - uint64_t b = abs( value ); - uint64_t c = abs( denominator ); + int64_t a = std::abs( numerator ); + int64_t b = std::abs( value ); + int64_t c = std::abs( denominator ); r = c / 2; @@ -77,14 +77,14 @@ template<> int64_t rescale( int64_t numerator, int64_t value, int64_t denominato a0 = a0 * b0 + t1a; a1 = a1 * b1 + (t1 >> 32) + (a0 < t1a); a0 += r; - a1 += a0 < r; + a1 += ((uint64_t)a0) < r; for( i = 63; i >= 0; i-- ) { a1 += a1 + ( (a0 >> i) & 1 ); t1 += t1; - if( c <= a1 ) + if( (uint64_t)c <= a1 ) { a1 -= c; t1++; From 8b9226d82063dceae40a4f4bbdee11dae9a67b0c Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Mon, 9 Sep 2013 16:56:18 +0200 Subject: [PATCH 287/415] math/vector2d.h: removed unused code, correct rounding in Resize() --- include/math/vector2d.h | 148 +++++++--------------------------------- 1 file changed, 25 insertions(+), 123 deletions(-) diff --git a/include/math/vector2d.h b/include/math/vector2d.h index a5eaa604e0..8c09602c60 100644 --- a/include/math/vector2d.h +++ b/include/math/vector2d.h @@ -54,6 +54,8 @@ template <> struct VECTOR2_TRAITS { typedef int64_t extended_type; + static const extended_type ECOORD_MAX = 0x7fffffffffffffffULL; + static const extended_type ECOORD_MIN = 0x8000000000000000ULL; }; // Forward declarations for template friends @@ -123,6 +125,15 @@ public: */ T EuclideanNorm() const; + /** + * Function Squared Euclidean Norm + * computes the squared euclidean norm of the vector, which is defined as (x ** 2 + y ** 2). + * It is used to calculate the length of the vector. + * @return Scalar, the euclidean norm + */ + extended_type SquaredEuclideanNorm() const; + + /** * Function Perpendicular * computes the perpendicular vector @@ -130,40 +141,6 @@ public: */ VECTOR2 Perpendicular() const; - /** - * Function LineProjection - * computes the perpendicular projection point of self on a line - * going through aA and aB points. - * @return Projected point - */ - VECTOR2 LineProjection( const VECTOR2& aA, const VECTOR2& aB ) const; - - /** - * Function LineSide - * determines on which side of directed line passing via points aEnd - * and a start aStart we are. - * @return: < 0: left, 0 : on the line, > 0 : right - */ - int LineSide( const VECTOR2& aStart, const VECTOR2& aEnd ) const; - - /** - * Function LineDistance - * returns the closest Euclidean distance to a line defined by points - * aStart and aEnd. - * @param aDetermineSide: when true, the sign of the returned value indicates - * the side of the line at which we are (negative = left) - * @return the distance - */ - T LineDistance( const VECTOR2& aStart, const VECTOR2& aEnd, - bool aDetermineSide = false ) const; - - /** - * Function ClosestSegmentPoint - * returns the closest point on a line segment defined by aStart and aEnd. - * @return: our point - */ - VECTOR2 ClosestSegmentPoint( const VECTOR2& aStart, const VECTOR2& aEnd ) const; - /** * Function Resize * returns a vector of the same direction, but length specified in aNewLength @@ -308,6 +285,13 @@ T VECTOR2::EuclideanNorm() const return sqrt( (extended_type) x * x + (extended_type) y * y ); } +template +typename VECTOR2::extended_type VECTOR2::SquaredEuclideanNorm() const +{ + return (extended_type)x * x + (extended_type) y * y ; +} + + template double VECTOR2::Angle() const @@ -367,89 +351,6 @@ VECTOR2& VECTOR2::operator-=( const T& aScalar ) y -= aScalar; return *this; } - - -template -int VECTOR2::LineSide( const VECTOR2& aStart, const VECTOR2& aEnd ) const -{ - VECTOR2 d = aEnd - aStart; - VECTOR2 ap = *this - aStart; - - extended_type det = (extended_type) d.x * (extended_type) ap.y - - (extended_type) d.y * (extended_type) ap.x; - - return det < 0 ? -1 : (det > 0 ? 1 : 0); -} - - -template -VECTOR2 VECTOR2::LineProjection( const VECTOR2& aA, const VECTOR2& aB ) const -{ - const VECTOR2 d = aB - aA; - extended_type det = (extended_type) d.x * d.x + d.y * (extended_type) d.y; - extended_type dxdy = (extended_type) d.x * d.y; - extended_type qx = - ( (extended_type) aA.x * d.y * d.y + (extended_type) d.x * d.x * x - dxdy * - (aA.y - y) ) / det; - extended_type qy = - ( (extended_type) aA.y * d.x * d.x + (extended_type) d.y * d.y * y - dxdy * - (aA.x - x) ) / det; - - return VECTOR2 ( (T) qx, (T) qy ); -} - - -template -T VECTOR2::LineDistance( const VECTOR2& aStart, const VECTOR2& aEnd, - bool aDetermineSide ) const -{ - extended_type a = aStart.y - aEnd.y; - extended_type b = aEnd.x - aStart.x; - extended_type c = -a * aStart.x - b * aStart.y; - - T dist = ( a * x + b * y + c ) / sqrt( a * a + b * b ); - return aDetermineSide ? dist : abs( dist ); -} - - -template -VECTOR2 VECTOR2::ClosestSegmentPoint( const VECTOR2& aStart, - const VECTOR2& aEnd ) const -{ - VECTOR2 d = (aEnd - aStart); - extended_type l_squared = (extended_type) d.x * d.x + (extended_type) d.y * d.y; - - - if( l_squared == 0 ) - { - return aStart; - } - - extended_type t = - (extended_type) (x - aStart.x) * (extended_type) d.x + - (extended_type) (y - aStart.y) * (extended_type) d.y; - - if( t < 0 ) - { - return aStart; - } - else if( t > l_squared ) - { - return aEnd; - } - - double xp = (double) t * (double) d.x / (double) l_squared; - double yp = (double) t * (double) d.y / (double) l_squared; - - /*VECTOR2 proj = aStart + VECTOR2 ( ( t * (extended_type) d.x / l_squared ), - ( t * ( extended_type) d.y / l_squared ) );*/ - - VECTOR2 proj = aStart + VECTOR2 ( (T) xp, (T) yp ); - - return proj; -} - - template VECTOR2 VECTOR2::Rotate( double aAngle ) const { @@ -464,14 +365,15 @@ VECTOR2 VECTOR2::Rotate( double aAngle ) const template VECTOR2 VECTOR2::Resize( T aNewLength ) const { - if( x == 0 && y == 0 ) - return VECTOR2 ( 0, 0 ); + if(x == 0 && y == 0) + return VECTOR2 (0, 0); - T l = this->EuclideanNorm(); + extended_type l_sq_current = (extended_type)this->x * this->x + (extended_type)this->y * this->y; + extended_type l_sq_new = (extended_type) aNewLength * aNewLength; - return VECTOR2 ( - rescale( aNewLength, x, l ), - rescale( aNewLength, y, l ) ); + return VECTOR2 ( + (this->x < 0 ? -1 : 1 ) * sqrt(rescale(l_sq_new, (extended_type) x * x, l_sq_current)), + (this->y < 0 ? -1 : 1 ) * sqrt(rescale(l_sq_new, (extended_type) y * y, l_sq_current))); } From a384290356feb806775db762573821f375eb138f Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Mon, 9 Sep 2013 17:07:03 +0200 Subject: [PATCH 288/415] EDA_DRAWPANEL_GAL: set focus on mouse enter to catch all key events --- common/drawpanel_gal.cpp | 11 +++++++++-- include/class_drawpanel_gal.h | 5 +++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 6df67bb3a0..cb259aba39 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -87,9 +87,11 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin Connect( wxEVT_MIDDLE_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_MIDDLE_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_MOUSEWHEEL, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_CHAR_HOOK, wxEventHandler( EDA_DRAW_PANEL_GAL::skipEvent ), NULL, this ); + Connect( wxEVT_CHAR_HOOK, wxEventHandler( EDA_DRAW_PANEL_GAL::skipEvent ) ); Connect( wxEVT_KEY_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_KEY_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_ENTER_WINDOW, wxEventHandler (EDA_DRAW_PANEL_GAL::onEnter ), NULL, this ); + this->SetFocus(); } @@ -101,7 +103,7 @@ EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL() if( m_viewControls ) delete m_viewControls; - if( m_view ) + if( m_view ) delete m_view; if( m_gal ) @@ -210,6 +212,11 @@ void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent ) } +void EDA_DRAW_PANEL_GAL::onEnter ( wxEvent& aEvent ) +{ + SetFocus(); +} + void EDA_DRAW_PANEL_GAL::skipEvent( wxEvent& aEvent ) { // This is necessary for CHAR_HOOK event to generate KEY_UP and KEY_DOWN events diff --git a/include/class_drawpanel_gal.h b/include/class_drawpanel_gal.h index 542787fd0d..7daee84a6b 100644 --- a/include/class_drawpanel_gal.h +++ b/include/class_drawpanel_gal.h @@ -114,8 +114,9 @@ public: protected: void onPaint( wxPaintEvent& WXUNUSED( aEvent ) ); void onSize( wxSizeEvent& aEvent ); - void onEvent( wxEvent& aEvent ); - void skipEvent( wxEvent& aEvent ); + void onEvent( wxEvent& aEvent ); + void onEnter( wxEvent& aEvent ); + void skipEvent( wxEvent& aEvent ); KiGfx::GAL* m_gal; ///< Interface for drawing objects on a 2D-surface KiGfx::VIEW* m_view; ///< Stores view settings (scale, center, etc.) From 36d4e8fa623ed4bb07e39fc741b615256c49ef1b Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Mon, 9 Sep 2013 17:08:52 +0200 Subject: [PATCH 289/415] PCB_PAINTER: added public GetLayerColor() method --- pcbnew/pcb_painter.cpp | 4 ++++ pcbnew/pcb_painter.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 36ab6588ee..5e62b91060 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -193,6 +193,10 @@ const COLOR4D& PCB_PAINTER::GetColor( const VIEW_ITEM* aItem, int aLayer ) return m_pcbSettings->m_layerColors[aLayer]; } +const COLOR4D& PCB_RENDER_SETTINGS::GetLayerColor( int aLayer ) const +{ + return m_layerColors[aLayer]; +} bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) { diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 952a042f39..a51324500f 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -85,6 +85,8 @@ public: */ void LoadDisplayOptions( const DISPLAY_OPTIONS& aOptions ); + const COLOR4D& GetLayerColor ( int aLayer ) const; + protected: /// @copydoc RENDER_SETTINGS::Update() void update(); From 0cf8221e623590b92310abed02673da2f728fcfe Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 9 Sep 2013 17:12:03 +0200 Subject: [PATCH 290/415] Fixed hanging up of menu loop when user never moves mouse cursor into popup menu area. --- common/tool/context_menu.cpp | 16 ++++++++++++---- include/tool/context_menu.h | 4 ++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index 0a38f5bb0c..a2247efe4d 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -44,7 +44,7 @@ public: if( type == wxEVT_MENU_HIGHLIGHT ) evt = TOOL_EVENT( TC_Command, TA_ContextMenuUpdate, aEvent.GetId() ); - else if ( type == wxEVT_COMMAND_MENU_SELECTED ) + else if( type == wxEVT_COMMAND_MENU_SELECTED ) evt = TOOL_EVENT( TC_Command, TA_ContextMenuChoice, aEvent.GetId() ); m_menu->m_tool->GetManager()->ProcessEvent( evt ); @@ -60,8 +60,15 @@ CONTEXT_MENU::CONTEXT_MENU() m_tool = NULL; m_menu = new wxMenu(); m_handler = new CMEventHandler( this ); - m_menu->Connect( wxEVT_MENU_HIGHLIGHT, wxEventHandler( CMEventHandler::onEvent ), NULL, m_handler ); - m_menu->Connect( wxEVT_COMMAND_MENU_SELECTED, wxEventHandler( CMEventHandler::onEvent ), NULL, m_handler ); + m_menu->Connect( wxEVT_MENU_HIGHLIGHT, wxEventHandler( CMEventHandler::onEvent ), + NULL, m_handler ); + m_menu->Connect( wxEVT_COMMAND_MENU_SELECTED, wxEventHandler( CMEventHandler::onEvent ), + NULL, m_handler ); + + // Workaround for the case when mouse cursor never reaches menu (it hangs up tools using menu) + wxMenuEvent menuEvent( wxEVT_MENU_HIGHLIGHT, 0, m_menu ); + m_menu->AddPendingEvent( menuEvent ); + m_titleSet = false; } @@ -75,6 +82,7 @@ CONTEXT_MENU::~CONTEXT_MENU() void CONTEXT_MENU::SetTitle( const wxString& aTitle ) { + // Unfortunately wxMenu::SetTitle() does nothing.. if( m_titleSet ) { m_menu->Delete( m_menu->FindItemByPosition( 0 ) ); // fixme: this is LAME! @@ -87,7 +95,7 @@ void CONTEXT_MENU::SetTitle( const wxString& aTitle ) } -void CONTEXT_MENU::Add ( const wxString& aItem, int aId ) +void CONTEXT_MENU::Add( const wxString& aItem, int aId ) { m_menu->Append( new wxMenuItem( m_menu, aId, aItem, wxEmptyString, wxITEM_NORMAL ) ); } diff --git a/include/tool/context_menu.h b/include/tool/context_menu.h index 909798534a..b62a55a041 100644 --- a/include/tool/context_menu.h +++ b/include/tool/context_menu.h @@ -44,7 +44,7 @@ public: ~CONTEXT_MENU(); void SetTitle( const wxString& aTitle ); - void Add ( const wxString& aItem, int aId ); + void Add( const wxString& aItem, int aId ); // fixme: unimplemented // void Add ( const TOOL_ACTION& aAction, int aId = -1 ); @@ -61,7 +61,7 @@ private: friend class TOOL_INTERACTIVE; - void setTool ( TOOL_INTERACTIVE* aTool ) + void setTool( TOOL_INTERACTIVE* aTool ) { m_tool = aTool; } From bd6bb510f8e5d44495004ba98568e867cec167c8 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 10 Sep 2013 10:47:42 +0200 Subject: [PATCH 291/415] Changed D() macro to DBG() because of conflict with glm::D(). Added const to GetColor() and GetType() functions in WS_DRAW_ITEM. --- 3d-viewer/3d_draw_basic_functions.cpp | 2 +- 3d-viewer/vrmlmodelparser.cpp | 8 +++---- 3d-viewer/x3dmodelparser.cpp | 18 +++++++------- include/fctsys.h | 4 ++-- include/worksheet_shape_builder.h | 5 ++-- ...board_items_to_polygon_shape_transform.cpp | 2 +- pcbnew/deltrack.cpp | 4 ++-- pcbnew/dialogs/dialog_fp_lib_table.cpp | 10 ++++---- pcbnew/eagle_plugin.cpp | 2 +- pcbnew/editrack.cpp | 24 +++++++++---------- pcbnew/gen_modules_placefile.cpp | 4 ++-- pcbnew/specctra_export.cpp | 6 ++--- 12 files changed, 44 insertions(+), 45 deletions(-) diff --git a/3d-viewer/3d_draw_basic_functions.cpp b/3d-viewer/3d_draw_basic_functions.cpp index bb08b572b3..fbe1fb6277 100644 --- a/3d-viewer/3d_draw_basic_functions.cpp +++ b/3d-viewer/3d_draw_basic_functions.cpp @@ -415,6 +415,6 @@ void CALLBACK tessErrorCB( GLenum errorCode ) errorStr = gluErrorString( errorCode ); // DEBUG // - D( printf( "Tess ERROR: %s\n", errorStr ); ) + DBG( printf( "Tess ERROR: %s\n", errorStr ); ) #endif } diff --git a/3d-viewer/vrmlmodelparser.cpp b/3d-viewer/vrmlmodelparser.cpp index 20ec219991..fa90c6ada8 100644 --- a/3d-viewer/vrmlmodelparser.cpp +++ b/3d-viewer/vrmlmodelparser.cpp @@ -115,7 +115,7 @@ int VRML_MODEL_PARSER::readMaterial( FILE* file, int* LineNum ) } } - D( printf( "ReadMaterial error: material not found\n" ) ); + DBG( printf( "ReadMaterial error: material not found\n" ) ); return 0; } @@ -207,7 +207,7 @@ int VRML_MODEL_PARSER::readChildren( FILE* file, int* LineNum ) } else { - D( printf( "ReadChildren error line %d <%s> \n", *LineNum, text ) ); + DBG( printf( "ReadChildren error line %d <%s> \n", *LineNum, text ) ); break; } } @@ -241,7 +241,7 @@ int VRML_MODEL_PARSER::readShape( FILE* file, int* LineNum ) } else { - D( printf( "ReadShape error line %d <%s> \n", *LineNum, text ) ); + DBG( printf( "ReadShape error line %d <%s> \n", *LineNum, text ) ); break; } } @@ -271,7 +271,7 @@ int VRML_MODEL_PARSER::readAppearance( FILE* file, int* LineNum ) } else { - D( printf( "ReadAppearance error line %d <%s> \n", *LineNum, text ) ); + DBG( printf( "ReadAppearance error line %d <%s> \n", *LineNum, text ) ); break; } } diff --git a/3d-viewer/x3dmodelparser.cpp b/3d-viewer/x3dmodelparser.cpp index 8205726ce1..0ca02d9157 100644 --- a/3d-viewer/x3dmodelparser.cpp +++ b/3d-viewer/x3dmodelparser.cpp @@ -197,19 +197,19 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode ) if( !parseDoubleTriplet( properties[ wxT( "diffuseColor" ) ], material->m_DiffuseColor ) ) { - D( printf("diffuseColor parsing error") ); + DBG( printf("diffuseColor parsing error") ); } if( !parseDoubleTriplet( properties[ wxT( "specularColor" ) ], material->m_SpecularColor ) ) { - D( printf("specularColor parsing error") ); + DBG( printf("specularColor parsing error") ); } if( !parseDoubleTriplet( properties[ wxT( "emissiveColor" ) ], material->m_EmissiveColor ) ) { - D( printf("emissiveColor parsing error") ); + DBG( printf("emissiveColor parsing error") ); } wxStringTokenizer values; @@ -221,7 +221,7 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode ) } else { - D( printf( "ambienterror" ) ); + DBG( printf( "ambienterror" ) ); } values.SetString( properties[ wxT( "shininess" ) ] ); @@ -232,7 +232,7 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode ) } else { - D( printf( "shininess error" ) ); + DBG( printf( "shininess error" ) ); } values.SetString( properties[ wxT( "transparency" ) ] ); @@ -243,7 +243,7 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode ) } else { - D( printf( "trans error") ); + DBG( printf( "trans error") ); } material->SetMaterial(); @@ -303,7 +303,7 @@ void X3D_MODEL_PARSER::readMaterial( wxXmlNode* aMatNode ) } } - D( printf( "ReadMaterial error: material not found\n" ) ); + DBG( printf( "ReadMaterial error: material not found\n" ) ); } } @@ -373,7 +373,7 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode, tokens.GetNextToken().ToDouble( &rotation.z ) && tokens.GetNextToken().ToDouble( &angle ) ) ) { - D( printf("rotation read error") ); + DBG( printf("rotation read error") ); } double vrmlunits_to_3Dunits = g_Parm_3D_Visu.m_BiuTo3Dunits * @@ -407,7 +407,7 @@ void X3D_MODEL_PARSER::readIndexedFaceSet( wxXmlNode* aFaceNode, if( points.size() % 3 != 0 ) { - D( printf( "Number of points is incorrect" ) ); + DBG( printf( "Number of points is incorrect" ) ); return; } diff --git a/include/fctsys.h b/include/fctsys.h index 2d07a11413..ff239ce9de 100644 --- a/include/fctsys.h +++ b/include/fctsys.h @@ -21,9 +21,9 @@ #define WIN_STRING_DIR_SEP wxT( "\\" ) #ifdef DEBUG -#define D(x) x +#define DBG(x) x #else -#define D(x) // nothing +#define DBG(x) // nothing #endif /** diff --git a/include/worksheet_shape_builder.h b/include/worksheet_shape_builder.h index af6051c353..a7d4644172 100644 --- a/include/worksheet_shape_builder.h +++ b/include/worksheet_shape_builder.h @@ -39,7 +39,6 @@ protected: // to the parent WORKSHEET_DATAITEM item, // in page layout editor -protected: WS_DRAW_ITEM_BASE( WORKSHEET_DATAITEM* aParent, WS_DRAW_TYPE aType, EDA_COLOR_T aColor ) { @@ -53,8 +52,8 @@ public: virtual ~WS_DRAW_ITEM_BASE() {} // Accessors: - EDA_COLOR_T GetColor() { return m_color; } - WS_DRAW_TYPE GetType() { return m_type; }; + EDA_COLOR_T GetColor() const { return m_color; } + WS_DRAW_TYPE GetType() const { return m_type; }; WORKSHEET_DATAITEM* GetParent() { return m_parent; } diff --git a/pcbnew/board_items_to_polygon_shape_transform.cpp b/pcbnew/board_items_to_polygon_shape_transform.cpp index 9b801d452e..c18dbc3d19 100644 --- a/pcbnew/board_items_to_polygon_shape_transform.cpp +++ b/pcbnew/board_items_to_polygon_shape_transform.cpp @@ -143,7 +143,7 @@ void MODULE::TransformGraphicShapesWithClearanceToPolygonSet( break; default: - D( printf( "Error: Shape %d not implemented!\n", + DBG( printf( "Error: Shape %d not implemented!\n", outline->GetShape() ); ) break; } diff --git a/pcbnew/deltrack.cpp b/pcbnew/deltrack.cpp index f85c787f69..2a77f9faec 100644 --- a/pcbnew/deltrack.cpp +++ b/pcbnew/deltrack.cpp @@ -55,7 +55,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack ) { LAYER_NUM previous_layer = getActiveLayer(); - D( g_CurrentTrackList.VerifyListIntegrity(); ) + DBG( g_CurrentTrackList.VerifyListIntegrity(); ) // Delete the current trace ShowNewTrackWhenMovingCursor( m_canvas, DC, wxDefaultPosition, false ); @@ -215,7 +215,7 @@ void PCB_EDIT_FRAME::Remove_One_Track( wxDC* DC, TRACK* pt_segm ) next_track = tracksegment->Next(); tracksegment->SetState( BUSY, false ); - D( std::cout << __func__ << ": track " << tracksegment << " status=" \ + DBG( std::cout << __func__ << ": track " << tracksegment << " status=" \ << TO_UTF8( TRACK::ShowState( tracksegment->GetStatus() ) ) \ << std::endl; ) diff --git a/pcbnew/dialogs/dialog_fp_lib_table.cpp b/pcbnew/dialogs/dialog_fp_lib_table.cpp index 34eccd06f2..4bc9fc9d7e 100644 --- a/pcbnew/dialogs/dialog_fp_lib_table.cpp +++ b/pcbnew/dialogs/dialog_fp_lib_table.cpp @@ -252,7 +252,7 @@ class DIALOG_FP_LIB_TABLE : public DIALOG_FP_LIB_TABLE_BASE wxArrayInt cols = m_cur_grid->GetSelectedCols(); wxArrayInt rows = m_cur_grid->GetSelectedRows(); - D(printf("topLeft.Count():%zd botRight:Count():%zd\n", topLeft.Count(), botRight.Count() );) + DBG(printf("topLeft.Count():%zd botRight:Count():%zd\n", topLeft.Count(), botRight.Count() );) if( topLeft.Count() && botRight.Count() ) { @@ -284,7 +284,7 @@ class DIALOG_FP_LIB_TABLE : public DIALOG_FP_LIB_TABLE_BASE selColCount = 0; } - // D(printf("selRowStart:%d selColStart:%d selRowCount:%d selColCount:%d\n", selRowStart, selColStart, selRowCount, selColCount );) + // DBG(printf("selRowStart:%d selColStart:%d selRowCount:%d selColCount:%d\n", selRowStart, selColStart, selRowCount, selColCount );) } void rightClickCellPopupMenu() @@ -353,7 +353,7 @@ class DIALOG_FP_LIB_TABLE : public DIALOG_FP_LIB_TABLE_BASE break; case ID_PASTE: - D(printf( "paste\n" );) + DBG(printf( "paste\n" );) // assume format came from a spreadsheet or us. if( wxTheClipboard->Open() ) { @@ -471,7 +471,7 @@ class DIALOG_FP_LIB_TABLE : public DIALOG_FP_LIB_TABLE_BASE m_cur_grid->SetGridCursor( curRow, curCol ); } - D(printf("%s\n", __func__);) + DBG(printf("%s\n", __func__);) } void onCancelButtonClick( wxCommandEvent& event ) @@ -522,7 +522,7 @@ class DIALOG_FP_LIB_TABLE : public DIALOG_FP_LIB_TABLE_BASE m_cur_row = event.GetRow(); m_cur_col = event.GetCol(); - D(printf("change cursor(%d,%d)\n", m_cur_row, m_cur_col );) + DBG(printf("change cursor(%d,%d)\n", m_cur_row, m_cur_col );) // somebody else wants this event.Skip(); diff --git a/pcbnew/eagle_plugin.cpp b/pcbnew/eagle_plugin.cpp index 00df1c0879..e9b77f57d1 100644 --- a/pcbnew/eagle_plugin.cpp +++ b/pcbnew/eagle_plugin.cpp @@ -2674,7 +2674,7 @@ LAYER_NUM EAGLE_PLUGIN::kicad_layer( int aEagleLayer ) const case 95: kiLayer = ECO1_N; break; case 96: kiLayer = ECO2_N; break; default: - D( printf( "unsupported eagle layer: %d\n", aEagleLayer );) + DBG( printf( "unsupported eagle layer: %d\n", aEagleLayer );) kiLayer = -1; break; // some layers do not map to KiCad } } diff --git a/pcbnew/editrack.cpp b/pcbnew/editrack.cpp index ab538b6a9c..8df058fddf 100644 --- a/pcbnew/editrack.cpp +++ b/pcbnew/editrack.cpp @@ -153,11 +153,11 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC ) GetBoard()->SetHighLightNet( zone->GetNet() ); } - D( g_CurrentTrackList.VerifyListIntegrity() ); + DBG( g_CurrentTrackList.VerifyListIntegrity() ); BuildAirWiresTargetsList( LockPoint, wxPoint( 0, 0 ), true ); - D( g_CurrentTrackList.VerifyListIntegrity() ); + DBG( g_CurrentTrackList.VerifyListIntegrity() ); GetBoard()->HighLightON(); GetBoard()->DrawHighLight( m_canvas, aDC, GetBoard()->GetHighLightNetCode() ); @@ -191,7 +191,7 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC ) // Create 2nd segment g_CurrentTrackList.PushBack( (TRACK*)g_CurrentTrackSegment->Clone() ); - D( g_CurrentTrackList.VerifyListIntegrity(); ); + DBG( g_CurrentTrackList.VerifyListIntegrity(); ); g_CurrentTrackSegment->start = g_FirstTrackSegment; g_FirstTrackSegment->end = g_CurrentTrackSegment; @@ -199,7 +199,7 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC ) g_FirstTrackSegment->SetState( BEGIN_ONPAD | END_ONPAD, false ); } - D( g_CurrentTrackList.VerifyListIntegrity(); ); + DBG( g_CurrentTrackList.VerifyListIntegrity(); ); SetMsgPanel( g_CurrentTrackSegment ); SetCurItem( g_CurrentTrackSegment, false ); @@ -246,11 +246,11 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC ) if( CanCreateNewSegment ) { // Erase old track on screen - D( g_CurrentTrackList.VerifyListIntegrity(); ); + DBG( g_CurrentTrackList.VerifyListIntegrity(); ); ShowNewTrackWhenMovingCursor( m_canvas, aDC, wxDefaultPosition, false ); - D( g_CurrentTrackList.VerifyListIntegrity(); ); + DBG( g_CurrentTrackList.VerifyListIntegrity(); ); if( g_Raccord_45_Auto ) Add45DegreeSegment( aDC ); @@ -273,7 +273,7 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC ) newTrack->start = previousTrack->end; - D( g_CurrentTrackList.VerifyListIntegrity(); ); + DBG( g_CurrentTrackList.VerifyListIntegrity(); ); newTrack->SetStart( newTrack->GetEnd() ); @@ -282,7 +282,7 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC ) if( !GetBoard()->GetDesignSettings().m_UseConnectedTrackWidth ) newTrack->SetWidth( GetBoard()->GetCurrentTrackWidth() ); - D( g_CurrentTrackList.VerifyListIntegrity(); ); + DBG( g_CurrentTrackList.VerifyListIntegrity(); ); // Show the new position ShowNewTrackWhenMovingCursor( m_canvas, aDC, wxDefaultPosition, false ); @@ -422,7 +422,7 @@ bool PCB_EDIT_FRAME::End_Route( TRACK* aTrack, wxDC* aDC ) // Saving the coordinate of end point of the trace wxPoint pos = g_CurrentTrackSegment->GetEnd(); - D( g_CurrentTrackList.VerifyListIntegrity(); ); + DBG( g_CurrentTrackList.VerifyListIntegrity(); ); if( Begin_Route( aTrack, aDC ) == NULL ) return false; @@ -439,7 +439,7 @@ bool PCB_EDIT_FRAME::End_Route( TRACK* aTrack, wxDC* aDC ) * } */ - D( g_CurrentTrackList.VerifyListIntegrity(); ); + DBG( g_CurrentTrackList.VerifyListIntegrity(); ); /* The track here is now chained to the list of track segments. @@ -670,7 +670,7 @@ inline void DrawViaCirclesWhenEditingNewTrack( EDA_RECT* aPanelClipBox, void ShowNewTrackWhenMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition, bool aErase ) { -// D( g_CurrentTrackList.VerifyListIntegrity(); ); +// DBG( g_CurrentTrackList.VerifyListIntegrity(); ); PCB_SCREEN* screen = (PCB_SCREEN*) aPanel->GetScreen(); PCB_BASE_FRAME* frame = (PCB_BASE_FRAME*) aPanel->GetParent(); @@ -764,7 +764,7 @@ void ShowNewTrackWhenMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPo } // Redraw the new track - D( g_CurrentTrackList.VerifyListIntegrity(); ); + DBG( g_CurrentTrackList.VerifyListIntegrity(); ); DrawTraces( aPanel, aDC, g_FirstTrackSegment, g_CurrentTrackList.GetCount(), GR_XOR ); if( showTrackClearanceMode >= SHOW_CLEARANCE_NEW_TRACKS_AND_VIA_AREAS ) diff --git a/pcbnew/gen_modules_placefile.cpp b/pcbnew/gen_modules_placefile.cpp index f78316ef81..950b3e0758 100644 --- a/pcbnew/gen_modules_placefile.cpp +++ b/pcbnew/gen_modules_placefile.cpp @@ -376,7 +376,7 @@ int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName, if( module->GetAttributes() & MOD_VIRTUAL ) { - D( printf( "skipping module %s because it's virtual\n", + DBG( printf( "skipping module %s because it's virtual\n", TO_UTF8( module->GetReference() ) );) continue; } @@ -393,7 +393,7 @@ int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName, } else { - D(printf( "skipping %s because its attribute is not CMS and it has non SMD pins\n", + DBG(printf( "skipping %s because its attribute is not CMS and it has non SMD pins\n", TO_UTF8(module->GetReference()) ) ); continue; } diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index 96b027c217..36ed48d018 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -601,7 +601,7 @@ PADSTACK* SPECCTRA_DB::makePADSTACK( BOARD* aBoard, D_PAD* aPad ) polygon->AppendPoint( lowerRight ); } - D( printf( "m_DeltaSize: %d,%d\n", aPad->GetDelta().x, aPad->GetDelta().y ); ) + DBG( printf( "m_DeltaSize: %d,%d\n", aPad->GetDelta().x, aPad->GetDelta().y ); ) // this string _must_ be unique for a given physical shape snprintf( name, sizeof(name), "Trapz%sPad_%.6gx%.6g_%c%.6gx%c%.6g_um", @@ -793,7 +793,7 @@ IMAGE* SPECCTRA_DB::makeIMAGE( BOARD* aBoard, MODULE* aModule ) case S_RECT: case S_ARC: default: - D( printf( "makeIMAGE(): unsupported shape %s\n", + DBG( printf( "makeIMAGE(): unsupported shape %s\n", TO_UTF8( BOARD_ITEM::ShowShape( (STROKE_T) graphic->GetShape() ) ) ); ) continue; } @@ -908,7 +908,7 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) throw( IO_ER } else // remove graphics not on EDGE_N layer { - D( items[i]->Show( 0, std::cout );) + DBG( items[i]->Show( 0, std::cout );) ++i; } } From 85a8a71fc5d9440543fe0e3bd47e2a90ae64bbfa Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Tue, 10 Sep 2013 13:43:09 +0200 Subject: [PATCH 292/415] common: minimum version of the shape library --- common/CMakeLists.txt | 4 + common/geometry/seg.cpp | 150 ++++++++ common/geometry/shape_collisions.cpp | 210 +++++++++++ common/geometry/shape_line_chain.cpp | 465 +++++++++++++++++++++++ include/geometry/seg.h | 361 ++++++++++++++++++ include/geometry/shape.h | 141 +++++++ include/geometry/shape_circle.h | 78 ++++ include/geometry/shape_index.h | 290 +++++++++++++++ include/geometry/shape_line_chain.h | 531 +++++++++++++++++++++++++++ include/geometry/shape_rect.h | 142 +++++++ 10 files changed, 2372 insertions(+) create mode 100644 common/geometry/seg.cpp create mode 100644 common/geometry/shape_collisions.cpp create mode 100644 common/geometry/shape_line_chain.cpp create mode 100644 include/geometry/seg.h create mode 100644 include/geometry/shape.h create mode 100644 include/geometry/shape_circle.h create mode 100644 include/geometry/shape_index.h create mode 100644 include/geometry/shape_line_chain.h create mode 100644 include/geometry/shape_rect.h diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 67b27f893d..f80862e264 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -162,6 +162,10 @@ set(COMMON_SRCS tool/tool_event.cpp tool/tool_interactive.cpp tool/context_menu.cpp + + geometry/seg.cpp + geometry/shape_line_chain.cpp + geometry/shape_collisions.cpp ) add_library(common STATIC ${COMMON_SRCS}) diff --git a/common/geometry/seg.cpp b/common/geometry/seg.cpp new file mode 100644 index 0000000000..abc80688ca --- /dev/null +++ b/common/geometry/seg.cpp @@ -0,0 +1,150 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + + +#include + +template int sgn(T val) { + return (T(0) < val) - (val < T(0)); +} + +bool SEG::PointCloserThan (const VECTOR2I& aP, int dist) const +{ + VECTOR2I d = b - a; + ecoord dist_sq = (ecoord) dist * dist; + + SEG::ecoord l_squared = d.Dot(d); + SEG::ecoord t = d.Dot(aP - a); + + + if( t <= 0 || !l_squared ) + return (aP - a).SquaredEuclideanNorm() < dist_sq; + else if( t >= l_squared ) + return (aP - b).SquaredEuclideanNorm() < dist_sq; + + + int dxdy = abs(d.x) - abs(d.y); + + if( (dxdy >= -1 && dxdy <= 1) || abs(d.x) <= 1 || abs(d.y) <= 1) + { + int ca = -sgn(d.y); + int cb = sgn(d.x); + int cc = -ca * a.x - cb * a.y; + + ecoord num = ca * aP.x + cb * aP.y + cc; + num *= num; + + if(ca && cb) + num >>= 1; + + if(num > (dist_sq + 100)) + return false; + else if(num < (dist_sq - 100)) + return true; + } + + VECTOR2I nearest; + nearest.x = a.x + rescale(t, (ecoord)d.x, l_squared); + nearest.y = a.y + rescale(t, (ecoord)d.y, l_squared); + + return (nearest - aP).SquaredEuclideanNorm() <= dist_sq; +} + +SEG::ecoord SEG::SquaredDistance( const SEG& aSeg ) const +{ + // fixme: rather inefficient.... + if(Intersect(aSeg)) + return 0; + + const VECTOR2I pts[4] = + { + aSeg.NearestPoint(a) - a, + aSeg.NearestPoint(b) - b, + NearestPoint(aSeg.a) - aSeg.a, + NearestPoint(aSeg.b) - aSeg.b + }; + + ecoord m = VECTOR2I::ECOORD_MAX; + for (int i = 0; i<4 ; i++) + m = std::min(m, pts[i].SquaredEuclideanNorm()); + return m; +} + +OPT_VECTOR2I SEG::Intersect( const SEG& aSeg, bool aIgnoreEndpoints, bool aLines ) const +{ + const VECTOR2I e (b - a); + const VECTOR2I f (aSeg.b - aSeg.a); + const VECTOR2I ac (aSeg.a - a); + + ecoord d = f.Cross(e); + ecoord p = f.Cross(ac); + ecoord q = e.Cross(ac); + + if(d == 0) + return OPT_VECTOR2I(); + if (!aLines && d > 0 && (q < 0 || q > d || p < 0 || p > d)) + return OPT_VECTOR2I(); + if (!aLines && d < 0 && (q < d || p < d || p > 0 || q > 0)) + return OPT_VECTOR2I(); + if (!aLines && aIgnoreEndpoints && (q == 0 || q == d) && (p == 0 || p == d)) + return OPT_VECTOR2I(); + + + VECTOR2I ip ( aSeg.a.x + rescale(q, (ecoord)f.x, d), + aSeg.a.y + rescale(q, (ecoord)f.y, d) ); + + return ip; +} + + +bool SEG::ccw ( const VECTOR2I& a, const VECTOR2I& b, const VECTOR2I &c ) const +{ + return (ecoord)(c.y - a.y) * (b.x - a.x) > (ecoord)(b.y - a.y) * (c.x - a.x); +} + +bool SEG::Collide( const SEG& aSeg, int aClearance ) const +{ + // check for intersection + // fixme: move to a method + if( ccw(a,aSeg.a,aSeg.b) != ccw(b,aSeg.a,aSeg.b) && ccw(a,b,aSeg.a) != ccw(a,b,aSeg.b) ) + return true; + +#define CHK(_seg, _pt) \ + if( (_seg).PointCloserThan (_pt, aClearance ) ) return true; + + CHK(*this, aSeg.a); + CHK(*this, aSeg.b); + CHK(aSeg, a); + CHK(aSeg, b); + +#undef CHK + + return false; +} + +bool SEG::Contains(const VECTOR2I& aP) const +{ + return PointCloserThan(aP, 1); +} + diff --git a/common/geometry/shape_collisions.cpp b/common/geometry/shape_collisions.cpp new file mode 100644 index 0000000000..cf2c348ee5 --- /dev/null +++ b/common/geometry/shape_collisions.cpp @@ -0,0 +1,210 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +#include +#include +#include +#include + +typedef typename VECTOR2I::extended_type ecoord; + +static inline bool Collide( const SHAPE_CIRCLE& a, const SHAPE_CIRCLE& b, int clearance, bool needMTV, VECTOR2I& aMTV ) +{ + ecoord min_dist = clearance + a.GetRadius() + b.GetRadius(); + ecoord min_dist_sq = min_dist * min_dist; + + const VECTOR2I delta = b.GetCenter() - a.GetCenter(); + + ecoord dist_sq = delta.SquaredEuclideanNorm(); + + if ( dist_sq >= min_dist_sq ) + return false; + + if ( needMTV ) + aMTV = delta.Resize( sqrt (abs(min_dist_sq - dist_sq)) + 1); + + return true; +} + +static inline bool Collide( const SHAPE_RECT& a, const SHAPE_CIRCLE& b, int clearance, bool needMTV, VECTOR2I& aMTV ) +{ + const VECTOR2I c = b.GetCenter(); + const VECTOR2I p0 = a.GetPosition(); + const VECTOR2I size = a.GetSize(); + const ecoord r = b.GetRadius(); + const ecoord min_dist = clearance + r; + const ecoord min_dist_sq = min_dist * min_dist; + + if (a.BBox(0).Contains(c)) + return true; + + const VECTOR2I vts[] = { + VECTOR2I(p0.x, p0.y), + VECTOR2I(p0.x, p0.y + size.y), + VECTOR2I(p0.x + size.x, p0.y + size.y), + VECTOR2I(p0.x + size.x, p0.y), + VECTOR2I(p0.x, p0.y) }; + + ecoord nearest_seg_dist_sq = VECTOR2I::ECOORD_MAX; + VECTOR2I nearest; + + bool inside = c.x >= p0.x && c.x <= (p0.x + size.x) + && c.y >= p0.y && c.y <= (p0.y + size.y); + + if(!inside) + { + + for (int i = 0; i < 4; i++) + { + const SEG seg (vts[i], vts[i+1]); + ecoord dist_sq = seg.SquaredDistance ( c ); + + + if(dist_sq < min_dist_sq) + { + if(!needMTV) + return true; + else + { + nearest = seg.NearestPoint ( c ); + nearest_seg_dist_sq = dist_sq; + } + } + } + } + + if(nearest_seg_dist_sq >= min_dist_sq && !inside) + return false; + + VECTOR2I delta = c - nearest; + + if(!needMTV) + return true; + + if(inside) + aMTV = -delta.Resize(sqrt(abs(r * r + nearest_seg_dist_sq) + 1)); + else + aMTV = delta.Resize(sqrt(abs(r * r - nearest_seg_dist_sq) + 1)); + + return true; +} + +static inline bool Collide( const SHAPE_CIRCLE& a, const SHAPE_LINE_CHAIN& b, int clearance, bool needMTV, VECTOR2I& aMTV ) +{ + for (int s = 0; s < b.SegmentCount(); s++) + { + if ( a.Collide (b.CSegment(s), clearance)) + return true; + } + + return false; +} + +static inline bool Collide( const SHAPE_LINE_CHAIN& a, const SHAPE_LINE_CHAIN& b, int clearance, bool needMTV, VECTOR2I& aMTV ) +{ + for( int i = 0; i < b.SegmentCount() ;i++) + if(a.Collide(b.CSegment(i), clearance)) + return true; + return false; +} + + +static inline bool Collide( const SHAPE_RECT& a, const SHAPE_LINE_CHAIN& b, int clearance, bool needMTV, VECTOR2I& aMTV ) +{ + for (int s = 0; s < b.SegmentCount(); s++) + { + SEG seg = b.CSegment(s); + if ( a.Collide (seg, clearance)) + return true; + } + + return false; +} + + + +bool CollideShapes ( const SHAPE *a, const SHAPE *b, int clearance, bool needMTV, VECTOR2I& aMTV ) +{ + switch(a->Type()) + { + case SH_RECT: + switch(b->Type()) + { + case SH_CIRCLE: + return Collide( *static_cast (a), *static_cast (b), clearance, needMTV, aMTV ); + case SH_LINE_CHAIN: + return Collide( *static_cast (a), *static_cast (b), clearance, needMTV, aMTV ); + default: + break; + } + + case SH_CIRCLE: + switch(b->Type()) + { + case SH_RECT: + return Collide( *static_cast (b), *static_cast (a), clearance, needMTV, aMTV ); + case SH_CIRCLE: + return Collide( *static_cast (a), *static_cast (b), clearance, needMTV, aMTV ); + case SH_LINE_CHAIN: + return Collide( *static_cast (a), *static_cast (b), clearance, needMTV, aMTV ); + default: + break; + } + + case SH_LINE_CHAIN: + switch(b->Type()) + { + case SH_RECT: + return Collide( *static_cast (b), *static_cast (a), clearance, needMTV, aMTV ); + case SH_CIRCLE: + return Collide( *static_cast (b), *static_cast (a), clearance, needMTV, aMTV ); + case SH_LINE_CHAIN: + return Collide( *static_cast (a), *static_cast (b), clearance, needMTV, aMTV ); + default: + break; + } + default: + break; + } + + bool unsupported_collision = true; + + assert(unsupported_collision == false); + return false; +} + + +bool SHAPE::Collide ( const SHAPE *aShape, int aClerance, VECTOR2I& aMTV ) const +{ + return CollideShapes( this, aShape, aClerance, true, aMTV); +} + +bool SHAPE::Collide ( const SHAPE *aShape, int aClerance ) const +{ + VECTOR2I dummy; + return CollideShapes( this, aShape, aClerance, false, dummy); +} + \ No newline at end of file diff --git a/common/geometry/shape_line_chain.cpp b/common/geometry/shape_line_chain.cpp new file mode 100644 index 0000000000..44c7bad7f4 --- /dev/null +++ b/common/geometry/shape_line_chain.cpp @@ -0,0 +1,465 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include + +using namespace std; +using boost::optional; + +bool SHAPE_LINE_CHAIN::Collide ( const VECTOR2I& aP, int aClearance ) const +{ + assert(false); + return false; +} + +bool SHAPE_LINE_CHAIN::Collide ( const BOX2I& aBox, int aClearance ) const +{ + assert(false); + return false; +} + +bool SHAPE_LINE_CHAIN::Collide ( const SEG& aSeg, int aClearance ) const +{ + BOX2I box_a(aSeg.a, aSeg.b - aSeg.a); + BOX2I::ecoord_type dist_sq = (BOX2I::ecoord_type) aClearance * aClearance; + + for( int i = 0; i < SegmentCount() ;i++) + { + const SEG& s = CSegment(i); + BOX2I box_b(s.a, s.b - s.a); + + BOX2I::ecoord_type d = box_a.SquaredDistance ( box_b ); + + if(d < dist_sq) + { + if(s.Collide(aSeg, aClearance)) + return true; + } + } + return false; +} + +const SHAPE_LINE_CHAIN SHAPE_LINE_CHAIN::Reverse() const +{ + SHAPE_LINE_CHAIN a (*this); + reverse(a.m_points.begin(), a.m_points.end()); + a.m_closed = m_closed; + + return a; +} + + +int SHAPE_LINE_CHAIN::Length() const +{ + int l = 0; + for (int i = 0; i < SegmentCount(); i++) + l += CSegment(i).Length(); + return l; +} + +void SHAPE_LINE_CHAIN::Replace( int start_index, int end_index, const VECTOR2I& aP) +{ + if(end_index < 0) + end_index += PointCount(); + if(start_index < 0) + start_index += PointCount(); + + if (start_index == end_index) + m_points [start_index] = aP; + else { + m_points.erase (m_points.begin() + start_index + 1, m_points.begin() + end_index + 1); + m_points [start_index] = aP; + } +} + +void SHAPE_LINE_CHAIN::Replace( int start_index, int end_index, const SHAPE_LINE_CHAIN& aLine) +{ + if(end_index < 0) + end_index += PointCount(); + if(start_index < 0) + start_index += PointCount(); + + m_points.erase (m_points.begin() + start_index, m_points.begin() + end_index + 1); + m_points.insert (m_points.begin() + start_index, aLine.m_points.begin(), aLine.m_points.end()); +} + +void SHAPE_LINE_CHAIN::Remove( int start_index, int end_index) +{ + if(end_index < 0) + end_index += PointCount(); + if(start_index < 0) + start_index += PointCount(); + + m_points.erase (m_points.begin() + start_index, m_points.begin() + end_index + 1); +} + +int SHAPE_LINE_CHAIN::Distance( const VECTOR2I & aP ) const +{ + int d = INT_MAX; + for (int s = 0; s < SegmentCount(); s++) + d = min (d, CSegment(s).Distance(aP)); + return d; +} + +int SHAPE_LINE_CHAIN::Split( const VECTOR2I & aP ) +{ + int ii = -1; + int min_dist = 2; + + ii = Find(aP); + + if(ii >= 0) + return ii; + + for (int s = 0; s < SegmentCount(); s++) + { + const SEG seg = CSegment(s); + int dist = seg.Distance(aP); + + // make sure we are not producing a 'slightly concave' primitive. This might happen + // if aP lies very close to one of already existing points. + if(dist < min_dist && seg.a != aP && seg.b != aP) + { + min_dist = dist; + ii = s; + } + } + + if(ii >= 0) + { + m_points.insert(m_points.begin() + ii + 1, aP); + return ii + 1; + } + + return -1; +} + +int SHAPE_LINE_CHAIN::Find ( const VECTOR2I& aP ) const +{ + for (int s = 0; s< PointCount(); s++) + if(CPoint(s) == aP) + return s; + return -1; +} + +const SHAPE_LINE_CHAIN SHAPE_LINE_CHAIN::Slice( int start_index, int end_index ) const +{ + SHAPE_LINE_CHAIN rv; + + if(end_index < 0) + end_index += PointCount(); + if(start_index < 0) + start_index += PointCount(); + + for(int i = start_index; i<= end_index; i++) + rv.Append(m_points[i]); + return rv; +} + +struct compareOriginDistance { + compareOriginDistance( VECTOR2I& aOrigin ): + m_origin(aOrigin) {}; + + bool operator()(const SHAPE_LINE_CHAIN::Intersection &a, const SHAPE_LINE_CHAIN::Intersection& b) + { + return (m_origin - a.p).EuclideanNorm() < (m_origin - b.p).EuclideanNorm(); + } + + VECTOR2I m_origin; +}; + + +int SHAPE_LINE_CHAIN::Intersect ( const SEG& aSeg, Intersections& aIp ) const +{ + for (int s = 0; s < SegmentCount(); s++) + { + OPT_VECTOR2I p = CSegment(s).Intersect(aSeg); + if(p) + { + Intersection is; + is.our = CSegment(s); + is.their = aSeg; + is.p = *p; + aIp.push_back(is); + } + } + + compareOriginDistance comp(aSeg.a); + sort(aIp.begin(), aIp.end(), comp); + return aIp.size(); +}; + +int SHAPE_LINE_CHAIN::Intersect( const SHAPE_LINE_CHAIN &aChain, Intersections& aIp ) const +{ +BOX2I bb_other = aChain.BBox(); + + for (int s1 = 0; s1 < SegmentCount(); s1++) + { + const SEG& a = CSegment(s1); + const BOX2I bb_cur (a.a, a.b - a.a); + + if(! bb_other.Intersects( bb_cur )) + continue; + + for (int s2 = 0; s2 < aChain.SegmentCount(); s2++) + { + const SEG& b = aChain.CSegment(s2); + Intersection is; + + + if(a.Collinear(b)) + { + if(a.Contains(b.a)) { is.p = b.a; aIp.push_back(is); } + if(a.Contains(b.b)) { is.p = b.b; aIp.push_back(is); } + if(b.Contains(a.a)) { is.p = a.a; aIp.push_back(is); } + if(b.Contains(a.b)) { is.p = a.b; aIp.push_back(is); } + } else { + OPT_VECTOR2I p = a.Intersect(b); + + if(p) + { + is.p = *p; + is.our = a; + is.their = b; + aIp.push_back(is); + } + } + } + } + + return aIp.size(); + + for (int s1 = 0; s1 < SegmentCount(); s1++) + for (int s2 = 0; s2 < aChain.SegmentCount(); s2++) + { + const SEG& a = CSegment(s1); + const SEG& b = aChain.CSegment(s2); + OPT_VECTOR2I p = a.Intersect(b); + Intersection is; + + if(p) + { + is.p = *p; + is.our = a; + is.their = b; + aIp.push_back(is); + } else if (a.Collinear(b)) + { + if(a.a != b.a && a.a != b.b && b.Contains(a.a) ) + { + is.p = a.a; + is.our = a; + is.their = b; + aIp.push_back(is); + } + else if(a.b != b.a && a.b != b.b && b.Contains(a.b) ) + { + is.p = a.b; + is.our = a; + is.their = b; + aIp.push_back(is); + } + + } + } + return aIp.size(); +} + +int SHAPE_LINE_CHAIN::PathLength (const VECTOR2I& aP ) const +{ + int sum = 0; + for (int i = 0; i < SegmentCount(); i++) + { + const SEG seg = CSegment(i); + int d = seg.Distance(aP); + if (d <= 1) + { + sum += (aP - seg.a).EuclideanNorm(); + return sum; + } + else + sum += seg.Length(); + } + return -1; +} + +bool SHAPE_LINE_CHAIN::PointInside( const VECTOR2I& aP) const +{ + if(!m_closed || SegmentCount() < 3) + return false; + + int cur = CSegment(0).Side(aP); + if(cur == 0) + return false; + + for( int i = 1; i < SegmentCount(); i++) + { + const SEG s = CSegment(i); + if(aP == s.a || aP == s.b) // edge does not belong to the interior! + return false; + if (s.Side(aP) != cur) + return false; + } + return true; +} + +bool SHAPE_LINE_CHAIN::PointOnEdge( const VECTOR2I& aP) const +{ + if(SegmentCount() < 1) + return m_points[0] == aP; + + for( int i = 1; i < SegmentCount(); i++) + { + const SEG s = CSegment(i); + if(s.a == aP || s.b == aP) + return true; + + if(s.Distance(aP) <= 1) + return true; + } + return false; +} + +const optional SHAPE_LINE_CHAIN::SelfIntersecting() const +{ + for (int s1 = 0; s1 < SegmentCount(); s1++) + for (int s2 = s1 + 1; s2 < SegmentCount(); s2++) + { + const VECTOR2I s2a = CSegment(s2).a, s2b = CSegment(s2).b; + if(s1 + 1 != s2 && CSegment(s1).Contains(s2a)) + { + Intersection is; + is.our = CSegment(s1); + is.their = CSegment(s2); + is.p = s2a; + return is; + } else if (CSegment(s1).Contains(s2b)) { + Intersection is; + is.our = CSegment(s1); + is.their = CSegment(s2); + is.p = s2b; + return is; + + } else { + OPT_VECTOR2I p = CSegment(s1).Intersect(CSegment(s2), true); + + if(p) + { + Intersection is; + is.our = CSegment(s1); + is.their = CSegment(s2); + is.p = *p; + return is; + } + } + } + return optional(); +} + + +SHAPE_LINE_CHAIN& SHAPE_LINE_CHAIN::Simplify() +{ + vector pts_unique; + + if (PointCount() < 2) + { + return *this; + } else if (PointCount() == 2) { + if(m_points[0] == m_points[1]) + m_points.erase(m_points.end()); + return *this; + } + + int i = 0; + int np = PointCount(); + + // stage 1: eliminate duplicate vertices + while ( i < np ) + { + int j = i+1; + while(j < np && CPoint(i) == CPoint(j)) + j ++; + pts_unique.push_back(CPoint(i)); + i = j; + } + + m_points.clear(); + np = pts_unique.size(); + + i = 0; + // stage 1: eliminate collinear segments + while (i < np - 2) + { + const VECTOR2I p0 = pts_unique[i]; + const VECTOR2I p1 = pts_unique[i+1]; + int n = i; + while(n < np - 2 && SEG(p0, p1).LineDistance(pts_unique[n + 2]) <= 1) + n++; + + m_points.push_back(p0); + if (n > i) + i = n; + if (n == np) + { + m_points.push_back(pts_unique[n-1]); + return *this; + } + i ++; + } + + if(np > 1) + m_points.push_back(pts_unique[np-2]); + m_points.push_back(pts_unique[np-1]); + + return *this; +} + +const VECTOR2I SHAPE_LINE_CHAIN::NearestPoint(const VECTOR2I& aP) const +{ + int min_d = INT_MAX; + int nearest; + for ( int i = 0; i < SegmentCount() ; i++ ) + { + int d = CSegment(i).Distance(aP); + if( d < min_d ) + { + min_d = d; + nearest = i; + } + } + return CSegment(nearest).NearestPoint(aP); +} + +const string SHAPE_LINE_CHAIN::Format() const +{ + stringstream ss; + + ss << m_points.size() << " " << (m_closed ? 1 : 0) << " " ; + + for(int i = 0; i + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __SEG_H +#define __SEG_H + +#include +#include + +#include + +#include + +typedef boost::optional OPT_VECTOR2I; + +class SEG { + + private: + typedef VECTOR2I::extended_type ecoord; + + public: + + friend inline std::ostream& operator<<( std::ostream& aStream, const SEG& aSeg ); + + /* Start and the of the segment. Public, to make access simpler. These are references + * to an object the segment belongs to (e.g. a line chain) or references to locally stored points + * (m_a, m_b). + */ + VECTOR2I& a, b; + + /** Default constructor + * Creates an empty (0, 0) segment, locally-referenced + */ + SEG(): a(m_a), b(m_b) + { + a = m_a; + b = m_b; + m_is_local = true; + m_index = -1; + } + + /** + * Constructor + * Creates a segment between (x1, y1) and (x2, y2), locally referenced + */ + SEG ( int x1, int y1, int x2, int y2 ) : a(m_a), b(m_b) + { + m_a = VECTOR2I(x1, y1); + m_b = VECTOR2I(x2, y2); + a = m_a; + b = m_b; + m_is_local = true; + m_index = -1; + } + + /** + * Constructor + * Creates a segment between (aA) and (aB), locally referenced + */ + SEG ( const VECTOR2I& aA, const VECTOR2I& aB ): a(m_a), b(m_b), m_a(aA), m_b(aB) + { + a = m_a; + b = m_b; + m_is_local = true; + m_index = -1; + } + + /** + * Constructor + * Creates a segment between (aA) and (aB), referenced to a multi-segment shape + * @param aA reference to the start point in the parent shape + * @param aB reference to the end point in the parent shape + * @param aIndex index of the segment within the parent shape + */ + SEG ( VECTOR2I& aA, VECTOR2I& aB, int aIndex ): a(aA), b(aB) + { + m_is_local = false; + m_index = aIndex; + } + + /** + * Copy constructor + */ + SEG ( const SEG& seg ): a(m_a), b(m_b) + { + if (seg.m_is_local) + { + m_a = seg.m_a; + m_b = seg.m_b; + a = m_a; + b = m_b; + m_is_local = true; + m_index = -1; + } else { + a = seg.a; + b = seg.b; + m_index = seg.m_index; + m_is_local = false; + } + } + + SEG& operator=(const SEG& seg) + { + a = seg.a; + b = seg.b; + m_a = seg.m_a; + m_b = seg.m_b; + m_index = seg.m_index; + m_is_local = seg.m_is_local; + return *this; + } + + /** + * Function LineProject() + * + * Computes the perpendicular projection point of aP on a line passing through + * ends of the segment. + * @param aP point to project + * @return projected point + */ + VECTOR2I LineProject( const VECTOR2I& aP ) const; + + /** + * Function Side() + * + * Determines on which side of directed line passing via segment ends point aP lies. + * @param aP point to determine the orientation wrs to self + * @return: < 0: left, 0 : on the line, > 0 : right + */ + int Side( const VECTOR2I& aP ) const + { + const ecoord det = (b - a).Cross(aP - a); + return det < 0 ? -1 : (det > 0 ? 1 : 0); + } + + /** + * Function LineDistance() + * + * Returns the closest Euclidean distance between point aP and the line defined by + * the ends of segment (this). + * @param aDetermineSide: when true, the sign of the returned value indicates + * the side of the line at which we are (negative = left) + * @return the distance + */ + int LineDistance( const VECTOR2I& aP, bool aDetermineSide = false ) const; + + /** + * Function NearestPoint() + * + * Computes a point on the segment (this) that is closest to point aP. + * @return: nearest point + */ + const VECTOR2I NearestPoint( const VECTOR2I &aP ) const; + + + /** + * Function Intersect() + * + * Computes intersection point of segment (this) with segment aSeg. + * @param aSeg: segment to intersect with + * @param aIgnoreEndpoints: don't treat corner cases (i.e. end of one segment touching the other) + * as intersections. + * @param aLines: treat segments as infinite lines + * @return intersection point, if exists + */ + OPT_VECTOR2I Intersect( const SEG& aSeg, bool aIgnoreEndpoints = false, bool aLines = false ) const; + + + + /** + * Function IntersectLines() + * + * Computes the intersection point of lines passing through ends of (this) and aSeg + * @param aSeg segment defining the line to intersect with + * @return intersection point, if exists + */ + OPT_VECTOR2I IntersectLines( const SEG& aSeg ) const + { + return Intersect ( aSeg, false, true ); + } + + bool Collide( const SEG& aSeg, int aClearance ) const; + + /** + * Function Distance() + * + * Computes minimum Euclidean distance to segment aSeg. + * @param aSeg other segment + * @return minimum distance + */ + + ecoord SquaredDistance( const SEG& aSeg ) const ; + + int Distance( const SEG& aSeg ) const + { + return sqrt ( SquaredDistance(aSeg) ); + } + + + /** + * Function Distance() + * + * Computes minimum Euclidean distance to point aP. + * @param aP the point + * @return minimum distance + */ + + ecoord SquaredDistance( const VECTOR2I& aP ) const + { + return (NearestPoint(aP) - aP).SquaredEuclideanNorm(); + } + + int Distance( const VECTOR2I& aP ) const + { + return sqrt ( SquaredDistance( aP) ); + } + + + /** + * Function Collinear() + * + * Checks if segment aSeg lies on the same line as (this). + * @param aSeg the segment to chech colinearity with + * @return true, when segments are collinear. + */ + + bool Collinear( const SEG& aSeg ) const + { + ecoord qa1 = a.y - b.y; + ecoord qb1 = b.x - a.x; + ecoord qc1 = -qa1 * a.x - qb1 * a.y; + ecoord qa2 = aSeg.a.y - aSeg.b.y; + ecoord qb2 = aSeg.b.x - aSeg.a.x; + ecoord qc2 = -qa2 * aSeg.a.x - qb2 * aSeg.a.y; + + return (qa1 == qa2) && (qb1 == qb2) && (qc1 == qc2); + } + + /** + * Function Length() + * + * Returns the length (this) + * @return length + */ + int Length() const + { + return (a - b).EuclideanNorm(); + } + + /** + * Function Index() + * + * Return the index of this segment in its parent shape (applicable only to non-local segments) + * @return index value + */ + int Index() const + { + return m_index; + } + + + bool Contains(const VECTOR2I& aP) const; + + bool PointCloserThan ( const VECTOR2I& aP, int dist) const; + + // friend std::ostream& operator<<( std::ostream& stream, const SEG& aSeg ); + private: + + bool ccw ( const VECTOR2I& a, const VECTOR2I& b, const VECTOR2I &c ) const; + + ///> locally stored start/end coordinates (used when m_is_local == true) + VECTOR2I m_a, m_b; + ///> index withing the parent shape (used when m_is_local == false) + int m_index; + ///> locality flag + bool m_is_local; +}; + +inline VECTOR2I SEG::LineProject( const VECTOR2I& aP ) const +{ + // fixme: numerical errors for large integers + assert(false); + /*const VECTOR2I d = aB - aA; + ecoord det = d.Dot(d); + ecoord dxdy = (ecoord) d.x * d.y; + + ecoord qx = + ( (extended_type) aA.x * d.y * d.y + (extended_type) d.x * d.x * x - dxdy * + (aA.y - y) ) / det; + extended_type qy = + ( (extended_type) aA.y * d.x * d.x + (extended_type) d.y * d.y * y - dxdy * + (aA.x - x) ) / det; + + return VECTOR2 ( (T) qx, (T) qy );*/ +} + + + +inline int SEG::LineDistance( const VECTOR2I& aP, bool aDetermineSide ) const +{ + ecoord p = a.y - b.y; + ecoord q = b.x - a.x; + ecoord r = -p * a.x - q * a.y; + + ecoord dist = ( p * aP.x + q * aP.y + r ) / sqrt( p * p + q * q ); + return aDetermineSide ? dist : abs(dist); +} + + + +inline const VECTOR2I SEG::NearestPoint(const VECTOR2I& aP) const +{ + VECTOR2I d = b - a; + ecoord l_squared = d.Dot(d); + + if( l_squared == 0 ) + return a; + + ecoord t = d.Dot(aP - a); + + if( t < 0 ) + return a; + else if( t > l_squared ) + return b; + + int xp = rescale(t, (ecoord)d.x, l_squared); + int yp = rescale(t, (ecoord)d.y, l_squared); + + return a + VECTOR2I(xp, yp); +} + +inline std::ostream& operator<<( std::ostream& aStream, const SEG& aSeg ) +{ + if(aSeg.m_is_local) + aStream << "[ local " << aSeg.a << " - " << aSeg.b << " ]"; + return aStream; +} + +#endif // __SEG_H + diff --git a/include/geometry/shape.h b/include/geometry/shape.h new file mode 100644 index 0000000000..6d56fef79a --- /dev/null +++ b/include/geometry/shape.h @@ -0,0 +1,141 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __SHAPE_H +#define __SHAPE_H + +#include +#include + +#include + +/** + * Enum ShapeType + * Lists all supported shapes + */ + +enum ShapeType { + SH_RECT = 0, ///> axis-aligned rectangle + SH_SEGMENT, ///> line segment + SH_LINE_CHAIN, ///> line chain (polyline) + SH_CIRCLE ///> circle +}; + +/** + * Class SHAPE + * + * Represents an abstract shape on 2D plane. All SHAPEs implement SHAPE interface. + */ +class SHAPE { + protected: + typedef typename VECTOR2I::extended_type ecoord; + + public: + /** + * Constructor + * + * Creates an empty shape of type aType + */ + + SHAPE ( ShapeType aType ): m_type( aType ) { }; + + // Destructor + virtual ~SHAPE() {}; + + /** + * Function Type() + * + * Returns the type of the shape. + * @retval the type + */ + ShapeType Type() const { return m_type; } + + /** + * Function Clone() + * + * Returns a dynamically allocated copy of the shape + * @retval copy of the shape + */ + virtual SHAPE* Clone() const { assert(false); }; + + /** + * Function Collide() + * + * Checks if the boundary of shape (this) lies closer to the point aP than aClearance, indicating + * a collision. + * @return true, if there is a collision. + */ + virtual bool Collide ( const VECTOR2I& aP, int aClearance = 0 ) const + { + return Collide(SEG(aP, aP), aClearance); + } + + /** + * Function Collide() + * + * Checks if the boundary of shape (this) lies closer to the shape aShape than aClearance, indicating + * a collision. + * @return true, if there is a collision. + */ + virtual bool Collide ( const SHAPE *aShape, int aClerance, VECTOR2I& aMTV ) const; + virtual bool Collide ( const SHAPE *aShape, int aClerance = 0 ) const; + /** + * Function Collide() + * + * Checks if the boundary of shape (this) lies closer to the segment aSeg than aClearance, indicating + * a collision. + * @return true, if there is a collision. + */ + virtual bool Collide ( const SEG& aSeg, int aClearance = 0) const = 0; + + /** + * Function Collide() + * + * Computes a bounding box of the shape, with a margin of aClearance + * a collision. + * @aClearance how much the bounding box is expanded wrs to the minimum enclosing rectangle for the shape. + * @return the bounding box. + */ + virtual const BOX2I BBox ( int aClearance = 0 ) const = 0; + + /** + * Function Centre() + * + * Computes a center-of-mass of the shape + * @return the center-of-mass point + */ + virtual VECTOR2I Centre() const + { + return BBox(0).Centre(); // if nothing better is available.... + } + + private: + ///> type of our shape + ShapeType m_type; + +}; + +bool CollideShapes ( const SHAPE *a, const SHAPE *b, int clearance, bool needMTV, VECTOR2I& aMTV ); + +#endif // __SHAPE_H diff --git a/include/geometry/shape_circle.h b/include/geometry/shape_circle.h new file mode 100644 index 0000000000..3e5a7ba89b --- /dev/null +++ b/include/geometry/shape_circle.h @@ -0,0 +1,78 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __SHAPE_CIRCLE_H +#define __SHAPE_CIRCLE_H + +#include "shape.h" + +class SHAPE_CIRCLE : public SHAPE { + +public: + SHAPE_CIRCLE(): + SHAPE( SH_CIRCLE ), m_radius (0) {}; + + SHAPE_CIRCLE( const VECTOR2I& aCenter, int aRadius ): + SHAPE( SH_CIRCLE ), m_radius (aRadius), m_center(aCenter) {}; + + ~SHAPE_CIRCLE() {}; + + const BOX2I BBox(int aClearance = 0) const + { + const VECTOR2I rc (m_radius + aClearance, m_radius + aClearance); + return BOX2I (m_center - rc, rc * 2); + } + + + bool Collide(const SEG& aSeg, int aClearance = 0) const + { + int rc = aClearance + m_radius; + return aSeg.Distance(m_center) <= rc; + } + + void SetRadius(int aRadius) + { + m_radius = aRadius; + } + + void SetCenter (const VECTOR2I& aCenter) + { + m_center = aCenter; + } + + int GetRadius() const + { + return m_radius; + } + + const VECTOR2I GetCenter() const + { + return m_center; + } +private: + int m_radius; + VECTOR2I m_center; +}; + +#endif diff --git a/include/geometry/shape_index.h b/include/geometry/shape_index.h new file mode 100644 index 0000000000..4040cc2549 --- /dev/null +++ b/include/geometry/shape_index.h @@ -0,0 +1,290 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __SHAPE_INDEX_H +#define __SHAPE_INDEX_H + +#include + +template const SHAPE *defaultShapeFunctor( const T aItem ) +{ + return aItem->GetShape(); +} + +template > + +class SHAPE_INDEX_LIST { + + struct ShapeEntry { + ShapeEntry(T aParent) + { + shape = ShapeFunctor(aParent); + bbox = shape->BBox(0); + parent = aParent; + } + + ~ShapeEntry() + { + + } + + T parent; + const SHAPE *shape; + BOX2I bbox; + }; + + typedef std::vector ShapeVec; + typedef typename std::vector::iterator ShapeVecIter; + +public: + +// "Normal" iterator interface, for STL algorithms. + class iterator { + + public: + iterator() {}; + + iterator( ShapeVecIter aCurrent) + : m_current(aCurrent) {}; + + iterator(const iterator &b) : + m_current(b.m_current) {}; + + T operator*() const + { + return (*m_current).parent; + } + + void operator++() + { + ++m_current; + } + + iterator& operator++(int dummy) + { + ++m_current; + return *this; + } + + bool operator ==( const iterator& rhs ) const + { + return m_current == rhs.m_current; + } + + bool operator !=( const iterator& rhs ) const + { + return m_current != rhs.m_current; + } + + const iterator& operator=(const iterator& rhs) + { + m_current = rhs.m_current; + return *this; + } + + private: + ShapeVecIter m_current; + }; + +// "Query" iterator, for iterating over a set of spatially matching shapes. + class query_iterator { + public: + + query_iterator() + { + + } + + query_iterator( ShapeVecIter aCurrent, ShapeVecIter aEnd, SHAPE *aShape, int aMinDistance, bool aExact) + : m_end(aEnd), + m_current(aCurrent), + m_shape(aShape), + m_minDistance(aMinDistance), + m_exact(aExact) + { + if(aShape) + { + m_refBBox = aShape->BBox(); + next(); + } + } + + query_iterator(const query_iterator &b) + : m_end(b.m_end), + m_current(b.m_current), + m_shape(b.m_shape), + m_minDistance(b.m_minDistance), + m_exact(b.m_exact), + m_refBBox(b.m_refBBox) + { + + } + + + T operator*() const + { + return (*m_current).parent; + } + + query_iterator& operator++() + { + ++m_current; + next(); + return *this; + } + + query_iterator& operator++(int dummy) + { + ++m_current; + next(); + return *this; + } + + bool operator ==( const query_iterator& rhs ) const + { + return m_current == rhs.m_current; + } + + bool operator !=( const query_iterator& rhs ) const + { + return m_current != rhs.m_current; + } + + const query_iterator& operator=(const query_iterator& rhs) + { + m_end = rhs.m_end; + m_current = rhs.m_current; + m_shape = rhs.m_shape; + m_minDistance = rhs.m_minDistance; + m_exact = rhs.m_exact; + m_refBBox = rhs.m_refBBox; + return *this; + } + + private: + + void next() + { + while(m_current != m_end) + { + if (m_refBBox.Distance(m_current->bbox) <= m_minDistance) + { + if(!m_exact || m_current->shape->Collide(m_shape, m_minDistance)) + return; + } + ++m_current; + } + } + + ShapeVecIter m_end; + ShapeVecIter m_current; + BOX2I m_refBBox; + bool m_exact; + SHAPE *m_shape; + int m_minDistance; + }; + + void Add(T aItem) + { + ShapeEntry s (aItem); + + m_shapes.push_back(s); + } + + void Remove(const T aItem) + { + ShapeVecIter i; + + for(i=m_shapes.begin(); i!=m_shapes.end();++i) + { + if(i->parent == aItem) + break; + } + + if(i == m_shapes.end()) + return; + + m_shapes.erase(i); + } + + int Size() const + { + return m_shapes.size(); + } + + template + int Query( const SHAPE *aShape, int aMinDistance, Visitor &v, bool aExact = true) //const + { + ShapeVecIter i; + int n = 0; + VECTOR2I::extended_type minDistSq = (VECTOR2I::extended_type) aMinDistance * aMinDistance; + + BOX2I refBBox = aShape->BBox(); + + for(i = m_shapes.begin(); i!=m_shapes.end(); ++i) + { + if (refBBox.SquaredDistance(i->bbox) <= minDistSq) + { + if(!aExact || i->shape->Collide(aShape, aMinDistance)) + { + n++; + if(!v( i->parent )) + return n; + } + } + } + return n; + } + + void Clear() + { + m_shapes.clear(); + } + + query_iterator qbegin( SHAPE *aShape, int aMinDistance, bool aExact ) + { + return query_iterator( m_shapes.begin(), m_shapes.end(), aShape, aMinDistance, aExact); + } + + const query_iterator qend() + { + return query_iterator( m_shapes.end(), m_shapes.end(), NULL, 0, false ); + } + + iterator begin() + { + return iterator( m_shapes.begin() ); + } + + iterator end() + { + return iterator( m_shapes.end() ); + } + +private: + + ShapeVec m_shapes; +}; + +#endif diff --git a/include/geometry/shape_line_chain.h b/include/geometry/shape_line_chain.h new file mode 100644 index 0000000000..54e4662b23 --- /dev/null +++ b/include/geometry/shape_line_chain.h @@ -0,0 +1,531 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __SHAPE_LINE_CHAIN +#define __SHAPE_LINE_CHAIN + +#include +#include + +#include + +#include +#include +#include + +/** + * Class SHAPE_LINE_CHAIN + * + * Represents a polyline (an zero-thickness chain of connected line segments). + * I purposedly didn't name it "polyline" to avoid confusion with the existing CPolyLine class in pcbnew. + * + * SHAPE_LINE_CHAIN class shall not be used for polygons! + */ +class SHAPE_LINE_CHAIN : public SHAPE { + + private: + typedef std::vector::iterator point_iter; + typedef std::vector::const_iterator point_citer; + + public: + + /** + * Struct Intersection + * + * Represents an intersection between two line segments + */ + struct Intersection { + /// segment belonging from the (this) argument of Intersect() + SEG our; + /// segment belonging from the aOther argument of Intersect() + SEG their; + /// point of intersection between our and their. + VECTOR2I p; + }; + + typedef std::vector Intersections; + + /** + * Constructor + * Initializes an empty line chain. + */ + SHAPE_LINE_CHAIN(): + SHAPE (SH_LINE_CHAIN), m_closed(false) {}; + + /** + * Copy Constructor + */ + SHAPE_LINE_CHAIN(const SHAPE_LINE_CHAIN& aShape): + SHAPE (SH_LINE_CHAIN), m_points(aShape.m_points), m_closed(aShape.m_closed) {}; + + /** + * Constructor + * Initializes a 2-point line chain (a single segment) + */ + SHAPE_LINE_CHAIN(const VECTOR2I& a, const VECTOR2I& b): + SHAPE (SH_LINE_CHAIN), + m_closed(false) + { + m_points.resize(2); + m_points[0] = a; + m_points[1] = b; + } + + SHAPE_LINE_CHAIN(const VECTOR2I& a, const VECTOR2I& b, const VECTOR2I& c): + SHAPE (SH_LINE_CHAIN), + m_closed(false) + { + m_points.resize(3); + m_points[0] = a; + m_points[1] = b; + m_points[2] = c; + } + + + SHAPE_LINE_CHAIN(const VECTOR2I *v, int count): + SHAPE (SH_LINE_CHAIN), + m_closed(false) + { + m_points.resize(count); + for(int i = 0; i < count ; i++) + m_points[i] = *v++; + } + + ~SHAPE_LINE_CHAIN() {}; + + /** + * Function Clear() + * Removes all points from the line chain. + */ + void Clear() { + m_points.clear(); + m_closed = false; + } + + /** + * Function SetClosed() + * + * Marks the line chain as closed (i.e. with a segment connecting the last point with the first point). + * @param aClosed: whether the line chain is to be closed or not. + */ + void SetClosed(bool aClosed) + { + m_closed = aClosed; + } + + /** + * Function IsClosed() + * + * @return aClosed: true, when our line is closed. + */ + bool IsClosed() const + { + return m_closed; + } + + /** + * Function SegmentCount() + * + * Returns number of segments in this line chain. + * @return number of segments + */ + int SegmentCount() const + { + int c = m_points.size() - 1; + if(m_closed) + c++; + return std::max(0, c); + } + + /** + * Function PointCount() + * + * Returns the number of points (vertices) in this line chain + * @return number of points + */ + int PointCount() const + { + return m_points.size(); + }; + + /** + * Function Segment() + * + * Returns a segment referencing to the segment (index) in the line chain. + * Modifying ends of the returned segment will modify corresponding points in the line chain. + * @param index: index of the segment in the line chain. Negative values are counted from the end (i.e. -1 means + * the last segment in the line chain) + * @return SEG referenced to given segment in the line chain + */ + SEG Segment ( int index ) + { + if(index < 0) + index += SegmentCount(); + + if(index == (m_points.size() - 1) && m_closed ) + return SEG ( m_points[index], m_points[0], index ); + else + return SEG ( m_points[index], m_points[index + 1], index ); + } + + /** + * Function CSegment() + * + * Returns a read-only segment referencing to the segment (index) in the line chain. + * @param index: index of the segment in the line chain. Negative values are counted from the end (i.e. -1 means + * the last segment in the line chain) + * @return SEG referenced to given segment in the line chain + */ + const SEG CSegment ( int index ) const + { + if(index < 0) + index += SegmentCount(); + + if(index == (m_points.size() - 1) && m_closed ) + return SEG ( const_cast(m_points[index]), + const_cast(m_points[0]), index ); + else + return SEG ( const_cast(m_points[index]), + const_cast(m_points[index + 1]), index ); + } + + /** + * Function Point() + * + * Returns a reference to a given point in the line chain. + * @param index index of the point + * @return reference to the point + */ + VECTOR2I& Point ( int index ) + { + if(index < 0) + index += PointCount(); + return m_points[index]; + } + + /** + * Function CPoint() + * + * Returns a const reference to a given point in the line chain. + * @param index index of the point + * @return const reference to the point + */ + const VECTOR2I& CPoint ( int index ) const + { + if(index < 0) + index += PointCount(); + return m_points[index]; + } + + /// @copydoc SHAPE::BBox() + const BOX2I BBox ( int aClearance = 0 ) const + { + BOX2I bbox; + bbox.Compute(m_points); + return bbox; + } + + + /** + * Function Collide() + * + * Checks if point aP lies closer to us than aClearance. + * @param aP the point to check for collisions with + * @param aClearance minimum distance that does not qualify as a collision. + * @return true, when a collision has been found + */ + bool Collide ( const VECTOR2I& aP, int aClearance = 0 ) const; + + /** + * Function Collide() + * + * Checks if box aBox lies closer to us than aClearance. + * @param aP the box to check for collisions with + * @param aClearance minimum distance that does not qualify as a collision. + * @return true, when a collision has been found + */ + bool Collide ( const BOX2I& aBox, int aClearance = 0 ) const; + + /** + * Function Collide() + * + * Checks if segment aSeg lies closer to us than aClearance. + * @param aSeg the segment to check for collisions with + * @param aClearance minimum distance that does not qualify as a collision. + * @return true, when a collision has been found + */ + bool Collide ( const SEG& aSeg, int aClearance = 0 ) const; + + + /** + * Function Distance() + * + * Computes the minimum distance between the line chain and a point aP. + * @param aP the point + * @return minimum distance. + */ + int Distance( const VECTOR2I & aP ) const; + + /** + * Function Reverse() + * + * Reverses point order in the line chain. + * @return line chain with reversed point order (original A-B-C-D: returned D-C-B-A) + */ + const SHAPE_LINE_CHAIN Reverse() const; + + /** + * Function Length() + * + * Returns length of the line chain in Euclidean metric. + * @return length of the line chain + */ + int Length() const; + + /** + * Function Append() + * + * Appends a new point at the end of the line chain. + * @param x X coordinate of the new point + * @param y Y coordinate of the new point + */ + void Append(int x, int y) + { + VECTOR2I v(x, y); + Append(v); + } + + /** + * Function Append() + * + * Appends a new point at the end of the line chain. + * @param aP the new point + */ + void Append(const VECTOR2I& aP) + { + if(m_points.size() == 0) + m_bbox = BOX2I(aP, VECTOR2I(0, 0)); + + if (m_points.size() == 0 || CPoint(-1) != aP) + { + m_points.push_back(aP); + m_bbox.Merge(aP); + } + } + + /** + * Function Append() + * + * Appends another line chain at the end. + * @param aOtherLine the line chain to be appended. + */ + void Append(const SHAPE_LINE_CHAIN& aOtherLine) + { + if(aOtherLine.PointCount() == 0) + return; + else if(PointCount() == 0 || aOtherLine.CPoint(0) != CPoint(-1)) + { + const VECTOR2I p = aOtherLine.CPoint(0); + m_points.push_back(p); + m_bbox.Merge(p); + } + + for(int i = 1; i SelfIntersecting() const; + + /** + * Function Simplify() + * + * Simplifies the line chain by removing colinear adjacent segments and duplicate vertices. + * @return reference to self. + */ + SHAPE_LINE_CHAIN& Simplify(); + + /** + * Function NearestPoint() + * + * Finds a point on the line chain that is closest to point aP. + * @return the nearest point. + */ + const VECTOR2I NearestPoint(const VECTOR2I& aP) const; + + /// @copydoc SHAPE::Format() + const std::string Format() const; + + bool operator!=(const SHAPE_LINE_CHAIN& rhs) const + { + if(PointCount() != rhs.PointCount()) + return true; + for(int i = 0; i < PointCount(); i++) + if( CPoint(i) != rhs.CPoint(i) ) + return true; + return false; + } + + private: + /// array of vertices + std::vector m_points; + /// is the line chain closed? + bool m_closed; + /// cached bounding box + BOX2I m_bbox; +}; + +#endif // __SHAPE_LINE_CHAIN diff --git a/include/geometry/shape_rect.h b/include/geometry/shape_rect.h new file mode 100644 index 0000000000..eee04ae956 --- /dev/null +++ b/include/geometry/shape_rect.h @@ -0,0 +1,142 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __SHAPE_RECT_H +#define __SHAPE_RECT_H + +#include +#include +#include +#include + +class SHAPE_RECT : public SHAPE { + public: + /** + * Constructor + * Creates an empty (0-sized) rectangle + */ + SHAPE_RECT(): + SHAPE( SH_RECT ), m_w (0), m_h(0) {}; + + /** + * Constructor + * Creates a rectangle defined by top-left corner (x0, y0), width w and height h. + */ + SHAPE_RECT( int x0, int y0, int w, int h ): + SHAPE(SH_RECT), m_p0(x0, y0), m_w(w), m_h(h) {}; + + /** + * Constructor + * Creates a rectangle defined by top-left corner p0, width w and height h. + */ + SHAPE_RECT( const VECTOR2I &p0, int w, int h ): + SHAPE(SH_RECT), m_p0(p0), m_w(w), m_h(h) {}; + + /// @copydoc SHAPE::BBox() + const BOX2I BBox(int aClearance = 0) const + { + BOX2I bbox( VECTOR2I (m_p0.x - aClearance, m_p0.y - aClearance ), + VECTOR2I (m_w + 2 * aClearance, m_h + 2 * aClearance )); + //printf("bb : %s\n",bbox.Format().c_str()); + return bbox; + } + + /** + * Function Diagonal() + * + * Returns length of the diagonal of the rectangle + * @return diagonal length + */ + int Diagonal() const + { + return VECTOR2I(m_w, m_h).EuclideanNorm(); + } + + /// @copydoc SHAPE::Collide() + bool Collide(const SEG& aSeg, int aClearance = 0) const + { + //VECTOR2I pmin = VECTOR2I(std::min(aSeg.a.x, aSeg.b.x), std::min(aSeg.a.y, aSeg.b.y)); + //VECTOR2I pmax = VECTOR2I(std::max(aSeg.a.x, aSeg.b.x), std::max(aSeg.a.y, aSeg.b.y)); + //BOX2I r(pmin, VECTOR2I(pmax.x - pmin.x, pmax.y - pmin.y)); + + //if (BBox(0).SquaredDistance(r) > aClearance * aClearance) + // return false; + + if(BBox(0).Contains(aSeg.a) || BBox(0).Contains(aSeg.b)) + return true; + + VECTOR2I vts[] = { VECTOR2I(m_p0.x, m_p0.y), + VECTOR2I(m_p0.x, m_p0.y + m_h), + VECTOR2I(m_p0.x + m_w, m_p0.y + m_h), + VECTOR2I(m_p0.x + m_w, m_p0.y), + VECTOR2I(m_p0.x, m_p0.y) }; + + for (int i = 0; i < 4; i++) + { + SEG s(vts[i], vts[i+1], i); + if(s.Distance(aSeg) <= aClearance) + return true; + } + + return false; + }; + + /** + * Function GetPosition() + * + * @return top-left corner of the rectangle + */ + const VECTOR2I& GetPosition() const { return m_p0; } + + /** + * Function GetSize() + * + * @return size of the rectangle + */ + const VECTOR2I GetSize() const { return VECTOR2I(m_w, m_h); } + + /** + * Function GetWidth() + * + * @return width of the rectangle + */ + const int GetWidth() const { return m_w; } + + /** + * Function GetHeight() + * + * @return height of the rectangle + */ + const int GetHeight() const { return m_h; } + + private: + ///> Top-left corner + VECTOR2I m_p0; + ///> Width + int m_w; + ///> Height + int m_h; + }; + +#endif // __SHAPE_RECT_H From 57a1201b118491106ca550df9b4f6e519cbdf5f6 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 10 Sep 2013 13:57:28 +0200 Subject: [PATCH 293/415] PCB items are refreshed on GAL switching (changes made using default renderer are displayed by GAL). --- common/drawframe.cpp | 16 ++--- include/wxBasePcbFrame.h | 4 ++ include/wxstruct.h | 2 +- pcbnew/basepcbframe.cpp | 128 ++++++++++++++++++++++----------------- 4 files changed, 85 insertions(+), 65 deletions(-) diff --git a/common/drawframe.cpp b/common/drawframe.cpp index 88f73d7c44..9c0e500778 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -981,18 +981,18 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) // Switch to GAL rendering if( !m_galCanvasActive ) { - // Change view settings only if GAL was not active previously + // Set up grid settings + gal->SetGridVisibility( IsGridVisible() ); + gal->SetGridSize( VECTOR2D( screen->GetGridSize().x, screen->GetGridSize().y ) ); + gal->SetGridOrigin( VECTOR2D( screen->GetGridOrigin() ) ); + gal->SetGridOriginMarkerSize( 15 ); + gal->SetGridDrawThreshold( 10 ); + + // Set up viewport double zoom = 1.0 / ( zoomFactor * m_canvas->GetZoom() ); view->SetScale( zoom ); view->SetCenter( VECTOR2D( m_canvas->GetScreenCenterLogicalPosition() ) ); } - - // Set up grid settings - gal->SetGridVisibility( IsGridVisible() ); - gal->SetGridSize( VECTOR2D( screen->GetGridSize().x, screen->GetGridSize().y ) ); - gal->SetGridOrigin( VECTOR2D( screen->GetGridOrigin() ) ); - gal->SetGridOriginMarkerSize( 15 ); - gal->SetGridDrawThreshold( 10 ); } else { diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index 1912d2a755..874349dfd0 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -174,6 +174,8 @@ public: return m_Pcb; } + void ViewReloadBoard( const BOARD* aBoard ) const; + // General virtual void OnCloseWindow( wxCloseEvent& Event ) = 0; virtual void RedrawActiveWindow( wxDC* DC, bool EraseBg ) { } @@ -671,6 +673,8 @@ public: void OnUpdateSelectGrid( wxUpdateUIEvent& aEvent ); void OnUpdateSelectZoom( wxUpdateUIEvent& aEvent ); + virtual void UseGalCanvas( bool aEnable ); + DECLARE_EVENT_TABLE() }; diff --git a/include/wxstruct.h b/include/wxstruct.h index 76e5987b50..6cdd0fec65 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -903,7 +903,7 @@ public: * * @param aEnable True for GAL-based canvas, false for standard canvas. */ - void UseGalCanvas( bool aEnable ); + virtual void UseGalCanvas( bool aEnable ); /** * Function IsNewCanvasActive diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index bd5e71781a..4d418d0e57 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -136,71 +136,79 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) if( m_galCanvas ) { KiGfx::VIEW* view = m_galCanvas->GetView(); - view->Clear(); - // All of PCB drawing elements should be added to the VIEW - // in order to be displayed - - // Load zones - for( int i = 0; i < m_Pcb->GetAreaCount(); ++i ) - { - view->Add( (KiGfx::VIEW_ITEM*) ( m_Pcb->GetArea( i ) ) ); - } - - // Load drawings - for( BOARD_ITEM* drawing = m_Pcb->m_Drawings; drawing; drawing = drawing->Next() ) - { - view->Add( drawing ); - } - - // Load tracks - for( TRACK* track = m_Pcb->m_Track; track; track = track->Next() ) - { - view->Add( track ); - } - - // Load modules and its additional elements - for( MODULE* module = m_Pcb->m_Modules; module; module = module->Next() ) - { - // Load module's pads - for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) - { - view->Add( pad ); - } - - // Load module's drawing (mostly silkscreen) - for( BOARD_ITEM* drawing = module->GraphicalItems().GetFirst(); drawing; - drawing = drawing->Next() ) - { - view->Add( drawing ); - } - - // Load module's texts (name and value) - view->Add( &module->Reference() ); - view->Add( &module->Value() ); - - // Add the module itself - view->Add( module ); - } - - // Segzones (equivalent of ZONE_CONTAINER for legacy boards) - for( SEGZONE* zone = m_Pcb->m_Zone; zone; zone = zone->Next() ) - { - view->Add( zone ); - } - - view->RecacheAllItems( true ); - if( m_galCanvasActive ) - m_galCanvas->Refresh(); + ViewReloadBoard( m_Pcb ); // update the tool manager with the new board and its view. if( m_toolManager ) m_toolManager->SetEnvironment( m_Pcb, view, m_galCanvas->GetViewControls(), this ); - } } +void PCB_BASE_FRAME::ViewReloadBoard( const BOARD* aBoard ) const +{ + KiGfx::VIEW* view = m_galCanvas->GetView(); + view->Clear(); + + // All of PCB drawing elements should be added to the VIEW + // in order to be displayed + + // Load zones + for( int i = 0; i < aBoard->GetAreaCount(); ++i ) + { + view->Add( (KiGfx::VIEW_ITEM*) ( aBoard->GetArea( i ) ) ); + } + + // Load drawings + for( BOARD_ITEM* drawing = aBoard->m_Drawings; drawing; drawing = drawing->Next() ) + { + view->Add( drawing ); + } + + // Load tracks + for( TRACK* track = aBoard->m_Track; track; track = track->Next() ) + { + view->Add( track ); + } + + // Load modules and its additional elements + for( MODULE* module = aBoard->m_Modules; module; module = module->Next() ) + { + // Load module's pads + for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) + { + view->Add( pad ); + } + + // Load module's drawing (mostly silkscreen) + for( BOARD_ITEM* drawing = module->GraphicalItems().GetFirst(); drawing; + drawing = drawing->Next() ) + { + view->Add( drawing ); + } + + // Load module's texts (name and value) + view->Add( &module->Reference() ); + view->Add( &module->Value() ); + + // Add the module itself + view->Add( module ); + } + + // Segzones (equivalent of ZONE_CONTAINER for legacy boards) + for( SEGZONE* zone = aBoard->m_Zone; zone; zone = zone->Next() ) + { + view->Add( zone ); + } + + view->RecacheAllItems( true ); + + if( m_galCanvasActive ) + m_galCanvas->Refresh(); +} + + void PCB_BASE_FRAME::SetPageSettings( const PAGE_INFO& aPageSettings ) { wxASSERT( m_Pcb ); @@ -523,6 +531,14 @@ void PCB_BASE_FRAME::OnUpdateSelectZoom( wxUpdateUIEvent& aEvent ) } +void PCB_BASE_FRAME::UseGalCanvas( bool aEnable ) +{ + EDA_DRAW_FRAME::UseGalCanvas( aEnable ); + + ViewReloadBoard( m_Pcb ); +} + + void PCB_BASE_FRAME::ProcessItemSelection( wxCommandEvent& aEvent ) { int id = aEvent.GetId(); From eac742e3dbb785aac8737d1c66f2c7fe5a52be2c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 10 Sep 2013 14:31:52 +0200 Subject: [PATCH 294/415] Added const modifiers where applicable. --- include/worksheet_shape_builder.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/worksheet_shape_builder.h b/include/worksheet_shape_builder.h index a7d4644172..a29ddfe55e 100644 --- a/include/worksheet_shape_builder.h +++ b/include/worksheet_shape_builder.h @@ -108,9 +108,9 @@ public: } // Accessors: - int GetPenWidth() { return m_penWidth; } - const wxPoint& GetStart() { return m_start; } - const wxPoint& GetEnd() { return m_end; } + int GetPenWidth() const { return m_penWidth; } + const wxPoint& GetStart() const { return m_start; } + const wxPoint& GetEnd() const { return m_end; } /** The function to draw a WS_DRAW_ITEM_LINE */ @@ -158,9 +158,9 @@ public: } // Accessors: - int GetPenWidth() { return m_penWidth; } - bool IsFilled() { return m_fill; } - const wxPoint& GetPosition() { return m_pos; } + int GetPenWidth() const { return m_penWidth; } + bool IsFilled() const { return m_fill; } + const wxPoint& GetPosition() const { return m_pos; } /** The function to draw a WS_DRAW_ITEM_POLYGON */ From b4d05af28f1876e51e6f6612b673181247e6372d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 10 Sep 2013 14:35:10 +0200 Subject: [PATCH 295/415] Modified default grid/origin settings. --- common/drawframe.cpp | 12 +++++------- common/gal/graphics_abstraction_layer.cpp | 4 +++- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common/drawframe.cpp b/common/drawframe.cpp index 9c0e500778..b0f27cc002 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -981,18 +981,16 @@ void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) // Switch to GAL rendering if( !m_galCanvasActive ) { - // Set up grid settings - gal->SetGridVisibility( IsGridVisible() ); - gal->SetGridSize( VECTOR2D( screen->GetGridSize().x, screen->GetGridSize().y ) ); - gal->SetGridOrigin( VECTOR2D( screen->GetGridOrigin() ) ); - gal->SetGridOriginMarkerSize( 15 ); - gal->SetGridDrawThreshold( 10 ); - // Set up viewport double zoom = 1.0 / ( zoomFactor * m_canvas->GetZoom() ); view->SetScale( zoom ); view->SetCenter( VECTOR2D( m_canvas->GetScreenCenterLogicalPosition() ) ); } + + // Set up grid settings + gal->SetGridVisibility( IsGridVisible() ); + gal->SetGridSize( VECTOR2D( screen->GetGridSize().x, screen->GetGridSize().y ) ); + gal->SetGridOrigin( VECTOR2D( screen->GetGridOrigin() ) ); } else { diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index 50e3d5723d..0a4c9a4dd9 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -48,12 +48,14 @@ GAL::GAL() : // Set grid defaults SetGridVisibility( true ); SetGridStyle( GRID_STYLE_LINES ); + SetGridOriginMarkerSize( 15 ); + SetGridDrawThreshold( 10 ); SetCoarseGrid( 10 ); SetGridLineWidth( 0.5 ); // Initialize the cursor shape SetCursorColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); - SetCursorSize( 20 ); + SetCursorSize( 15 ); SetCursorEnabled( true ); strokeFont.LoadNewStrokeFont( newstroke_font, newstroke_font_bufsize ); From 4551ded37e103fb9fc19f5ccf9f25e82e975412e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 10 Sep 2013 17:07:46 +0200 Subject: [PATCH 296/415] Some more missing D()->DBG() changes. --- .../dialogs/dialog_edit_component_in_schematic.cpp | 12 ++++++------ .../dialogs/dialog_edit_libentry_fields_in_lib.cpp | 12 ++++++------ eeschema/eeschema_config.cpp | 6 +++--- eeschema/lib_field.cpp | 2 +- eeschema/netform.cpp | 4 ++-- eeschema/template_fieldnames.cpp | 4 ++-- gerbview/class_aperture_macro.cpp | 2 +- gerbview/rs274x.cpp | 6 +++--- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index 926d2d6080..2dfb3045b9 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -188,7 +188,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( wxWindow void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnListItemDeselected( wxListEvent& event ) { - D( printf( "OnListItemDeselected()\n" ); ) + DBG( printf( "OnListItemDeselected()\n" ); ) if( !m_skipCopyFromPanel ) { @@ -200,7 +200,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnListItemDeselected( wxListEvent& even void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnListItemSelected( wxListEvent& event ) { - D( printf( "OnListItemSelected()\n" ); ) + DBG( printf( "OnListItemSelected()\n" ); ) // remember the selected row, statically s_SelectedRow = event.GetIndex(); @@ -448,7 +448,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::moveUpButtonHandler( wxCommandEvent& ev // and in the fieldListCtrl SCH_FIELD tmp = m_FieldsBuf[fieldNdx - 1]; - D( printf( "tmp.m_Text=\"%s\" tmp.m_Name=\"%s\"\n", + DBG( printf( "tmp.m_Text=\"%s\" tmp.m_Name=\"%s\"\n", TO_UTF8( tmp.GetText() ), TO_UTF8( tmp.GetName( false ) ) ); ) m_FieldsBuf[fieldNdx - 1] = m_FieldsBuf[fieldNdx]; @@ -866,12 +866,12 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyOptionsToPanel() if( mirror == CMP_MIRROR_X ) { mirrorRadioBox->SetSelection( 1 ); - D( printf( "mirror=X,1\n" ); ) + DBG( printf( "mirror=X,1\n" ); ) } else if( mirror == CMP_MIRROR_Y ) { mirrorRadioBox->SetSelection( 2 ); - D( printf( "mirror=Y,2\n" ); ) + DBG( printf( "mirror=Y,2\n" ); ) } else mirrorRadioBox->SetSelection( 0 ); @@ -891,7 +891,7 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyOptionsToPanel() // Show the "Parts Locked" option? if( !m_LibEntry || !m_LibEntry->UnitsLocked() ) { - D( printf( "partsAreLocked->false\n" ); ) + DBG( printf( "partsAreLocked->false\n" ); ) partsAreLockedLabel->Show( false ); } diff --git a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp index d4f5b2159e..8fe7d7c2a5 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp @@ -472,7 +472,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::initBuffers() // fixed fields: for( int i=0; im_Name ) ); ) + DBG( printf( "add template:%s\n", TO_UTF8( it->m_Name ) ); ) fld.SetName( it->m_Name ); fld.SetText( it->m_Value ); // empty? ok too. @@ -509,7 +509,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::initBuffers() } else { - D( printf( "match template:%s\n", TO_UTF8( libField->GetName() ) ); ) + DBG( printf( "match template:%s\n", TO_UTF8( libField->GetName() ) ); ) fld = *libField; // copy values from component, m_Name too } @@ -525,7 +525,7 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::initBuffers() if( !buf ) { - D( printf( "add cmp:%s\n", TO_UTF8( cmp->GetName() ) ); ) + DBG( printf( "add cmp:%s\n", TO_UTF8( cmp->GetName() ) ); ) m_FieldsBuf.push_back( *cmp ); } } @@ -721,11 +721,11 @@ bool DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copyPanelToSelectedField() if( field.GetId() >= MANDATORY_FIELDS ) { wxString name = fieldNameTextCtrl->GetValue(); - D( printf("name:%s\n", TO_UTF8( name ) ); ) + DBG( printf("name:%s\n", TO_UTF8( name ) ); ) field.SetName( name ); } - D( printf("setname:%s\n", TO_UTF8( field.GetName() ) ); ) + DBG( printf("setname:%s\n", TO_UTF8( field.GetName() ) ); ) setRowItem( fieldNdx, field ); // update fieldListCtrl diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index 832a2b274f..2cd3e3931e 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -292,7 +292,7 @@ void SCH_EDIT_FRAME::OnSetOptions( wxCommandEvent& event ) for( unsigned i=0; i=0 && m_id < MANDATORY_FIELDS ) { - D(printf( "trying to set a MANDATORY_FIELD's name\n" );) + DBG(printf( "trying to set a MANDATORY_FIELD's name\n" );) return; } diff --git a/eeschema/netform.cpp b/eeschema/netform.cpp index fbb16a245b..3b2ae8b74a 100644 --- a/eeschema/netform.cpp +++ b/eeschema/netform.cpp @@ -417,7 +417,7 @@ bool SCH_EDIT_FRAME::WriteNetListFile( int aFormat, const wxString& aFullFileNam wxFileName tmpFile = aFullFileName; tmpFile.SetExt( INTERMEDIATE_NETLIST_EXT ); - D(printf("tmpFile:'%s'\n", TO_UTF8( tmpFile.GetFullPath() ) );) + DBG(printf("tmpFile:'%s'\n", TO_UTF8( tmpFile.GetFullPath() ) );) ret = helper.WriteGENERICNetList( tmpFile.GetFullPath() ); if( !ret ) @@ -435,7 +435,7 @@ bool SCH_EDIT_FRAME::WriteNetListFile( int aFormat, const wxString& aFullFileNam tmpFile.GetFullPath(), aFullFileName ); - D(printf("commandLine:'%s'\n", TO_UTF8( commandLine ) );) + DBG(printf("commandLine:'%s'\n", TO_UTF8( commandLine ) );) ProcessExecute( commandLine, wxEXEC_SYNC ); diff --git a/eeschema/template_fieldnames.cpp b/eeschema/template_fieldnames.cpp index c3c1730659..92ef9a90e9 100644 --- a/eeschema/template_fieldnames.cpp +++ b/eeschema/template_fieldnames.cpp @@ -151,7 +151,7 @@ int TEMPLATES::AddTemplateFieldName( const TEMPLATE_FIELDNAME& aFieldName ) { if( m_Fields[i].m_Name == aFieldName.m_Name ) { - D( printf( "inserting template fieldname:'%s' at %d\n", + DBG( printf( "inserting template fieldname:'%s' at %d\n", TO_UTF8( aFieldName.m_Name ), i ); ) m_Fields[i] = aFieldName; @@ -159,7 +159,7 @@ int TEMPLATES::AddTemplateFieldName( const TEMPLATE_FIELDNAME& aFieldName ) } } - // D(printf("appending template fieldname:'%s'\n", aFieldName.m_Name.utf8_str() );) + // DBG(printf("appending template fieldname:'%s'\n", aFieldName.m_Name.utf8_str() );) // the name is legal and not previously added to the config container, append // it and return its index within the container. diff --git a/gerbview/class_aperture_macro.cpp b/gerbview/class_aperture_macro.cpp index 28dabd5e19..3ea87648e1 100644 --- a/gerbview/class_aperture_macro.cpp +++ b/gerbview/class_aperture_macro.cpp @@ -409,7 +409,7 @@ void AM_PRIMITIVE::DrawBasicShape( GERBER_DRAW_ITEM* aParent, case AMP_UNKNOWN: default: - D( printf( "AM_PRIMITIVE::DrawBasicShape() err: unknown prim id %d\n",primitive_id) ); + DBG( printf( "AM_PRIMITIVE::DrawBasicShape() err: unknown prim id %d\n",primitive_id) ); break; } } diff --git a/gerbview/rs274x.cpp b/gerbview/rs274x.cpp index d65cc3bafa..e35c94bd2e 100644 --- a/gerbview/rs274x.cpp +++ b/gerbview/rs274x.cpp @@ -167,7 +167,7 @@ bool GERBER_IMAGE::ExecuteRS274XCommand( int command, if( m_GerbMetric ) conv_scale /= 25.4; -// D( printf( "%22s: Command <%c%c>\n", __func__, (command >> 8) & 0xFF, command & 0xFF ); ) +// DBG( printf( "%22s: Command <%c%c>\n", __func__, (command >> 8) & 0xFF, command & 0xFF ); ) switch( command ) { @@ -521,7 +521,7 @@ bool GERBER_IMAGE::ExecuteRS274XCommand( int command, m_ImageNegative = true; else m_ImageNegative = false; - D( printf( "%22s: IMAGE_POLARITY m_ImageNegative=%s\n", __func__, + DBG( printf( "%22s: IMAGE_POLARITY m_ImageNegative=%s\n", __func__, m_ImageNegative ? "true" : "false" ); ) break; @@ -531,7 +531,7 @@ bool GERBER_IMAGE::ExecuteRS274XCommand( int command, else GetLayerParams().m_LayerNegative = false; - D( printf( "%22s: LAYER_POLARITY m_LayerNegative=%s\n", __func__, + DBG( printf( "%22s: LAYER_POLARITY m_LayerNegative=%s\n", __func__, GetLayerParams().m_LayerNegative ? "true" : "false" ); ) break; From 2c287965fcd5e63a88809396a6037492ec925b31 Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Tue, 10 Sep 2013 19:22:38 +0200 Subject: [PATCH 297/415] TOOL_DISPATCHER: improve mouse handling --- common/tool/tool_dispatcher.cpp | 32 +++++++++++++++++++------------- include/tool/tool_dispatcher.h | 2 ++ 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 89da297fa9..2bc544f686 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -55,6 +55,8 @@ struct TOOL_DISPATCHER::ButtonState bool pressed; VECTOR2D dragOrigin; + VECTOR2D downPosition; + double dragMaxDelta; TOOL_MouseButtons button; @@ -117,13 +119,21 @@ int TOOL_DISPATCHER::decodeModifiers( const wxKeyboardState* aState ) const return mods; } +wxPoint TOOL_DISPATCHER::getCurrentMousePos() +{ + wxPoint msp = wxGetMousePosition() ; + wxPoint winp = m_editFrame->GetGalCanvas()->GetScreenPosition(); + + return wxPoint(msp.x - winp.x, msp.y - winp.y); +} bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMotion ) { ButtonState* st = m_buttons[aIndex]; wxEventType type = aEvent.GetEventType(); optional evt; - + bool isClick = false; + bool up = type == st->upEvent; bool down = type == st->downEvent; @@ -134,20 +144,20 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti { st->downTimestamp = wxGetLocalTimeMillis(); st->dragOrigin = m_lastMousePos; + st->downPosition = m_lastMousePos; st->dragMaxDelta = 0; st->pressed = true; evt = TOOL_EVENT( TC_Mouse, TA_MouseDown, args ); } else if( up ) { - bool isClick = false; st->pressed = false; if( st->dragging ) { wxLongLong t = wxGetLocalTimeMillis(); - if( t - st->downTimestamp < DragTimeThreshold && + if( t - st->downTimestamp < DragTimeThreshold || st->dragMaxDelta < DragDistanceThreshold ) isClick = true; else @@ -158,13 +168,7 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti if( isClick ) - { - if( st->triggerContextMenu && !mods ) - {} - // evt = TOOL_EVENT( TC_Command, TA_ContextMenu ); - else - evt = TOOL_EVENT( TC_Mouse, TA_MouseClick, args ); - } + evt = TOOL_EVENT( TC_Mouse, TA_MouseClick, args ); st->dragging = false; } @@ -177,7 +181,7 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti wxLongLong t = wxGetLocalTimeMillis(); - if( t - st->downTimestamp > DragTimeThreshold || st->dragMaxDelta > DragDistanceThreshold ) + if( t - st->downTimestamp > DragTimeThreshold && st->dragMaxDelta > DragDistanceThreshold ) { evt = TOOL_EVENT( TC_Mouse, TA_MouseDrag, args ); evt->SetMouseDragOrigin( st->dragOrigin ); @@ -187,7 +191,7 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti if( evt ) { - evt->SetMousePosition( m_lastMousePos ); + evt->SetMousePosition( isClick ? st->downPosition : m_lastMousePos ); m_toolMgr->ProcessEvent( *evt ); return true; @@ -212,7 +216,9 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) type == wxEVT_RIGHT_DOWN || type == wxEVT_RIGHT_UP ) { wxMouseEvent* me = static_cast( &aEvent ); - pos = getView()->ToWorld( VECTOR2D( me->GetX(), me->GetY() ) ); + + + pos = getView()->ToWorld ( getCurrentMousePos() ); if( pos != m_lastMousePos ) { motion = true; diff --git a/include/tool/tool_dispatcher.h b/include/tool/tool_dispatcher.h index 8072274dfe..1222291123 100644 --- a/include/tool/tool_dispatcher.h +++ b/include/tool/tool_dispatcher.h @@ -73,6 +73,8 @@ private: bool handleMouseButton( wxEvent& aEvent, int aIndex, bool aMotion ); bool handlePopupMenu( wxEvent& aEvent ); + wxPoint getCurrentMousePos(); + int decodeModifiers( const wxKeyboardState* aState ) const; struct ButtonState; From bf26cf175f9ddf09c2f88c5e6261228e601999d0 Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Tue, 10 Sep 2013 19:23:15 +0200 Subject: [PATCH 298/415] TOOL_MANAGER: open menu on right mouse button when requested --- common/tool/tool_manager.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 1601b7aece..16990abda3 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -81,8 +81,11 @@ struct TOOL_MANAGER::TOOL_STATE }; -TOOL_MANAGER::TOOL_MANAGER() +TOOL_MANAGER::TOOL_MANAGER() : + m_model (NULL), + m_view (NULL) { + } @@ -276,11 +279,17 @@ bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) { TOOL_STATE* st = m_toolIdIndex[toolId]; - if( st->contextMenuTrigger == CMENU_NOW ) + if( st->contextMenuTrigger != CMENU_OFF ) { + if(st->contextMenuTrigger == CMENU_BUTTON && !aEvent.IsClick( MB_Right ) ) + break; + st->pendingWait = true; st->waitEvents = TOOL_EVENT( TC_Any, TA_Any ); - st->contextMenuTrigger = CMENU_OFF; + + if(st->contextMenuTrigger == CMENU_NOW) + st->contextMenuTrigger = CMENU_OFF; + GetEditFrame()->PopupMenu( st->contextMenu->GetMenu() ); TOOL_EVENT evt( TC_Command, TA_ContextMenuChoice ); From 3254bfa619d30e4df6efd8f995557fea377a220f Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Tue, 10 Sep 2013 19:25:02 +0200 Subject: [PATCH 299/415] VIEW_GROUP: added FreeItems() method --- common/view/view_group.cpp | 17 ++++++++--------- include/view/view_group.h | 9 ++++++++- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/common/view/view_group.cpp b/common/view/view_group.cpp index f7ff19da96..8f1eb82b03 100644 --- a/common/view/view_group.cpp +++ b/common/view/view_group.cpp @@ -73,6 +73,14 @@ void VIEW_GROUP::Clear() updateBbox(); } +void VIEW_GROUP::FreeItems() +{ + BOOST_FOREACH( VIEW_ITEM* item, m_items ) + { + delete item; + } + m_items.clear(); +} unsigned int VIEW_GROUP::GetSize() const { @@ -125,15 +133,6 @@ void VIEW_GROUP::ViewGetLayers( int aLayers[], int& aCount ) const } -void VIEW_GROUP::ViewUpdate( int aUpdateFlags, bool aForceImmediateRedraw ) -{ - BOOST_FOREACH( VIEW_ITEM* item, m_items ) - { - item->ViewUpdate( aUpdateFlags, aForceImmediateRedraw ); - } -} - - void VIEW_GROUP::updateBbox() { // Save the used VIEW, as it used nulled during Remove() diff --git a/include/view/view_group.h b/include/view/view_group.h index 4439234e0d..1f50da5046 100644 --- a/include/view/view_group.h +++ b/include/view/view_group.h @@ -121,7 +121,7 @@ public: virtual void ViewGetLayers( int aLayers[], int& aCount ) const; /// @copydoc VIEW_ITEM::ViewUpdate() - virtual void ViewUpdate( int aUpdateFlags, bool aForceImmediateRedraw ); + //virtual void ViewUpdate( int aUpdateFlags, bool aForceImmediateRedraw ); /** * Function SetLayer() @@ -134,6 +134,13 @@ public: m_layer = aLayer; } + void FreeItems(); + + KiGfx::VIEW *GetView() const + { + return m_view; + } + protected: /// These functions cannot be used with VIEW_GROUP as they are intended only to work with /// singular VIEW_ITEMs (there is only one-to-one relation between item/layer combination and From b4ff4df808b041df34c2f2808b6a5fa8f12d164e Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Tue, 10 Sep 2013 19:26:44 +0200 Subject: [PATCH 300/415] pcbnew: start integrating P&S router --- common/tool/tool_dispatcher.cpp | 4 ++++ pcbnew/CMakeLists.txt | 4 ++++ pcbnew/basepcbframe.cpp | 2 +- pcbnew/menubar_pcbframe.cpp | 5 +++++ pcbnew/pcbframe.cpp | 4 +++- pcbnew/pcbnew_id.h | 3 ++- pcbnew/tools/pcb_tools.cpp | 2 ++ 7 files changed, 21 insertions(+), 3 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 2bc544f686..06702b6817 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -269,6 +269,10 @@ void TOOL_DISPATCHER::DispatchWxCommand( wxCommandEvent &aEvent ) switch( aEvent.GetId() ) { + case ID_PNS_ROUTER_TOOL: + toolName = "pcbnew.InteractiveRouter"; + activateTool = true; + break; case ID_SELECTION_TOOL: toolName = "pcbnew.InteractiveSelection"; activateTool = true; diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 79b78b9b1a..176bb6a04d 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -1,4 +1,5 @@ add_definitions(-DPCBNEW) +add_subdirectory(router) if (KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripting) @@ -117,6 +118,7 @@ set(PCBNEW_AUTOROUTER_SRCS autorouter/work.cpp ) + set(PCBNEW_CLASS_SRCS tool_modview.cpp modview.cpp @@ -324,6 +326,7 @@ if (KICAD_SCRIPTING_MODULES) swig_link_libraries(pcbnew 3d-viewer pcbcommon + pnsrouter common pcad2kicadpcb polygon @@ -420,6 +423,7 @@ endif(APPLE) target_link_libraries(pcbnew 3d-viewer pcbcommon + pnsrouter common pcad2kicadpcb polygon diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 1308addc82..5aeb153541 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -815,7 +815,7 @@ void PCB_BASE_FRAME::LoadSettings() { // Copper layers are required for netname layers view->SetRequired( GetNetnameLayer( layer ), layer ); - view->SetLayerTarget( layer, KiGfx::TARGET_CACHED ); + view->SetLayerTarget( layer, KiGfx::TARGET_NONCACHED ); } else if( IsNetnameLayer( layer ) ) { diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index 5eb3b28a96..03793ca68b 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -305,6 +305,11 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() _( "Interactive selection and drag&drop tool." ), KiBitmap( tools_xpm ) ); + AddMenuItem( editMenu, ID_PNS_ROUTER_TOOL, + _( "Interactive router" ), + _( "Interactive router drag&drop tool." ), + KiBitmap( tools_xpm ) ); + /** Create View menu **/ wxMenu* viewMenu = new wxMenu; diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index fe9e5ee01d..640399172b 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -120,8 +120,10 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) // menu Config /* Tom's hacks start */ - EVT_MENU ( ID_SELECTION_TOOL, PCB_EDIT_FRAME::onGenericCommand ) + EVT_MENU ( ID_SELECTION_TOOL, PCB_EDIT_FRAME::onGenericCommand ) EVT_TOOL ( ID_SELECTION_TOOL, PCB_EDIT_FRAME::onGenericCommand ) + EVT_MENU ( ID_PNS_ROUTER_TOOL, PCB_EDIT_FRAME::onGenericCommand ) + EVT_TOOL ( ID_PNS_ROUTER_TOOL, PCB_EDIT_FRAME::onGenericCommand ) /* Tom's hacks end */ EVT_MENU( ID_PCB_DRAWINGS_WIDTHS_SETUP, PCB_EDIT_FRAME::OnConfigurePcbOptions ) diff --git a/pcbnew/pcbnew_id.h b/pcbnew/pcbnew_id.h index ba479ffe65..ff4bb6062f 100644 --- a/pcbnew/pcbnew_id.h +++ b/pcbnew/pcbnew_id.h @@ -366,7 +366,8 @@ enum pcbnew_ids ID_FOOTPRINT_WIZARD_SELECT_WIZARD, ID_FOOTPRINT_WIZARD_EXPORT_TO_BOARD, - ID_SELECTION_TOOL + ID_SELECTION_TOOL, + ID_PNS_ROUTER_TOOL }; #endif // PCBNEW_ID_H_ diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 4ee70cde94..3137f00628 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -35,6 +35,7 @@ #include #include "selection_tool.h" +#include void PCB_EDIT_FRAME::setupTools() { @@ -45,6 +46,7 @@ void PCB_EDIT_FRAME::setupTools() // register our selection tool. m_toolManager->RegisterTool( new SELECTION_TOOL ); + m_toolManager->RegisterTool( new ROUTER_TOOL ); } From fa85685baae9f173ad64468485d789daee83d0ae Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 11 Sep 2013 10:30:39 +0200 Subject: [PATCH 301/415] Fixed COLOR4D( EDA_COLOR_T aColor ) and added asserts. --- common/gal/color4d.cpp | 6 +++--- include/gal/color4d.h | 13 +++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/common/gal/color4d.cpp b/common/gal/color4d.cpp index b28b4d1b68..e2cd0af05e 100644 --- a/common/gal/color4d.cpp +++ b/common/gal/color4d.cpp @@ -30,9 +30,9 @@ using namespace KiGfx; COLOR4D::COLOR4D( EDA_COLOR_T aColor ) { - r = g_ColorRefs[aColor].m_Red; - g = g_ColorRefs[aColor].m_Green; - b = g_ColorRefs[aColor].m_Blue; + r = g_ColorRefs[aColor].m_Red / 255.0; + g = g_ColorRefs[aColor].m_Green / 255.0; + b = g_ColorRefs[aColor].m_Blue / 255.0; a = 1.0; } diff --git a/include/gal/color4d.h b/include/gal/color4d.h index d89a629c47..7398d796e8 100644 --- a/include/gal/color4d.h +++ b/include/gal/color4d.h @@ -28,6 +28,7 @@ #define COLOR4D_H_ #include +#include namespace KiGfx { @@ -55,6 +56,10 @@ public: COLOR4D( double aRed, double aGreen, double aBlue, double aAlpha ) : r( aRed ), g( aGreen ), b( aBlue ), a( aAlpha ) { + assert( r >= 0.0 && r <= 1.0 ); + assert( g >= 0.0 && g <= 1.0 ); + assert( b >= 0.0 && b <= 1.0 ); + assert( a >= 0.0 && a <= 1.0 ); } /** @@ -82,6 +87,8 @@ public: */ COLOR4D& Brighten( double aFactor ) { + assert( aFactor >= 0.0 && aFactor <= 1.0 ); + r = r * ( 1.0 - aFactor ) + aFactor; g = g * ( 1.0 - aFactor ) + aFactor; b = b * ( 1.0 - aFactor ) + aFactor; @@ -97,6 +104,8 @@ public: */ COLOR4D& Darken( double aFactor ) { + assert( aFactor >= 0.0 && aFactor <= 1.0 ); + r = r * ( 1.0 - aFactor ); g = g * ( 1.0 - aFactor ); b = b * ( 1.0 - aFactor ); @@ -126,6 +135,8 @@ public: */ COLOR4D Brightened( double aFactor ) const { + assert( aFactor >= 0.0 && aFactor <= 1.0 ); + return COLOR4D( r * ( 1.0 - aFactor ) + aFactor, g * ( 1.0 - aFactor ) + aFactor, b * ( 1.0 - aFactor ) + aFactor, @@ -140,6 +151,8 @@ public: */ COLOR4D Darkened( double aFactor ) const { + assert( aFactor >= 0.0 && aFactor <= 1.0 ); + return COLOR4D( r * ( 1.0 - aFactor ), g * ( 1.0 - aFactor ), b * ( 1.0 - aFactor ), From c0b6d159fc1d0764a4dd37da372e554872cc9627 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 11 Sep 2013 11:11:27 +0200 Subject: [PATCH 302/415] Added one more function to convert colors. --- common/gr_basic.cpp | 20 ++++++++++---------- include/colors.h | 8 ++++++++ 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/common/gr_basic.cpp b/common/gr_basic.cpp index 7eaef89d57..8c7f70131d 100644 --- a/common/gr_basic.cpp +++ b/common/gr_basic.cpp @@ -1488,12 +1488,12 @@ bool ColorIsLight( EDA_COLOR_T aColor ) EDA_COLOR_T ColorFindNearest( const wxColour &aColor ) { - EDA_COLOR_T candidate = BLACK; + return ColorFindNearest( aColor.Red(), aColor.Green(), aColor.Blue() ); +} - // These are ints because we will subtract them later - int r = aColor.Red(); - int g = aColor.Green(); - int b = aColor.Blue(); +EDA_COLOR_T ColorFindNearest( int aR, int aG, int aB ) +{ + EDA_COLOR_T candidate = BLACK; /* Find the 'nearest' color in the palette. This is fun. There is a gazilion of metrics for the color space and no one of the @@ -1511,11 +1511,11 @@ EDA_COLOR_T ColorFindNearest( const wxColour &aColor ) for( EDA_COLOR_T trying = BLACK; trying < NBCOLORS; trying = NextColor(trying) ) { const StructColors &c = g_ColorRefs[trying]; - int distance = (r - c.m_Red) * (r - c.m_Red) + - (g - c.m_Green) * (g - c.m_Green) + - (b - c.m_Blue) * (b - c.m_Blue); - if( distance < nearest_distance && c.m_Red >= r && - c.m_Green >= g && c.m_Blue >= b ) + int distance = (aR - c.m_Red) * (aR - c.m_Red) + + (aG - c.m_Green) * (aG - c.m_Green) + + (aB - c.m_Blue) * (aB - c.m_Blue); + if( distance < nearest_distance && c.m_Red >= aR && + c.m_Green >= aG && c.m_Blue >= aB ) { nearest_distance = distance; candidate = trying; diff --git a/include/colors.h b/include/colors.h index 7074b68abb..4cca37efa9 100644 --- a/include/colors.h +++ b/include/colors.h @@ -139,6 +139,14 @@ EDA_COLOR_T ColorByName( const wxChar *aName ); /// Find the nearest color match EDA_COLOR_T ColorFindNearest( const wxColour &aColor ); +/** + * Find the nearest color match + * @param aR is the red component of the color to be matched (in range 0-255) + * @param aG is the green component of the color to be matched (in range 0-255) + * @param aG is the blue component of the color to be matched (in range 0-255) + */ +EDA_COLOR_T ColorFindNearest( int aR, int aG, int aB ); + /** * Check if a color is light i.e. if black would be more readable than * white on it From f6b7ab79946413f5f007bce919e56b936ebebf6f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 11 Sep 2013 11:34:10 +0200 Subject: [PATCH 303/415] Changed some 'magic numbers' into constants. Added const modifier in appropriate spots. --- common/gal/graphics_abstraction_layer.cpp | 5 ++--- common/worksheet.cpp | 2 +- eeschema/schframe.cpp | 2 +- include/gal/graphics_abstraction_layer.h | 6 ++++++ include/painter.h | 2 +- include/wxEeschemaStruct.h | 2 +- include/wxstruct.h | 2 +- pcbnew/tools/selection_area.h | 2 +- 8 files changed, 14 insertions(+), 9 deletions(-) diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index 0a4c9a4dd9..0282e69327 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -29,7 +29,6 @@ #include #include - using namespace KiGfx; GAL::GAL() : @@ -41,7 +40,7 @@ GAL::GAL() : SetFillColor( COLOR4D( 0.0, 0.0, 0.0, 0.0 ) ); SetStrokeColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); SetZoomFactor( 1.0 ); - SetDepthRange( VECTOR2D( -2048, 2047 ) ); + SetDepthRange( VECTOR2D( GAL::MIN_DEPTH, GAL::MAX_DEPTH ) ); SetFlip( false, false ); SetLineWidth( 1.0 ); @@ -114,7 +113,7 @@ void GAL::DrawGrid() // Draw the origin marker double origSize = static_cast( gridOriginMarkerSize ) / worldScale; - SetLayerDepth( 0.0 ); + SetLayerDepth( GAL::GRID_DEPTH ); SetIsFill( false ); SetIsStroke( true ); SetStrokeColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); diff --git a/common/worksheet.cpp b/common/worksheet.cpp index 4e2b1d116c..75f65b25cc 100644 --- a/common/worksheet.cpp +++ b/common/worksheet.cpp @@ -101,7 +101,7 @@ void EDA_DRAW_FRAME::DrawWorkSheet( wxDC* aDC, BASE_SCREEN* aScreen, int aLineWi } -wxString EDA_DRAW_FRAME::GetScreenDesc() +wxString EDA_DRAW_FRAME::GetScreenDesc() const { // Virtual function. In basic class, returns // an empty string. diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index 653709f516..b295d8ec04 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -324,7 +324,7 @@ SCH_SCREEN* SCH_EDIT_FRAME::GetScreen() const } -wxString SCH_EDIT_FRAME::GetScreenDesc() +wxString SCH_EDIT_FRAME::GetScreenDesc() const { wxString s = m_CurrentSheet->PathHumanReadable(); diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 2b87606de0..77cb3c48a8 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -818,6 +818,9 @@ public: depthStack.pop(); } + /// Depth level on which the grid is drawn + static const int GRID_DEPTH = 1024; + protected: std::stack depthStack; ///< Stored depth values VECTOR2D screenSize; ///< Screen size in screen coordinates @@ -884,6 +887,9 @@ protected: * @param aCursorSize is the size of the cursor. */ virtual void initCursor( int aCursorSize ) = 0; + + static const int MIN_DEPTH = -2048; + static const int MAX_DEPTH = 2047; }; } // namespace KiGfx diff --git a/include/painter.h b/include/painter.h index d546981369..3a8a7c392f 100644 --- a/include/painter.h +++ b/include/painter.h @@ -195,7 +195,7 @@ public: * Returns pointer to current settings that are going to be used when drawing items. * @return Current rendering settings. */ - virtual RENDER_SETTINGS* GetSettings() + virtual RENDER_SETTINGS* GetSettings() const { return m_settings; } diff --git a/include/wxEeschemaStruct.h b/include/wxEeschemaStruct.h index 8607c835f7..bcd4194409 100644 --- a/include/wxEeschemaStruct.h +++ b/include/wxEeschemaStruct.h @@ -356,7 +356,7 @@ public: */ void OnModify(); - virtual wxString GetScreenDesc(); + virtual wxString GetScreenDesc() const; void InstallConfigFrame( wxCommandEvent& event ); diff --git a/include/wxstruct.h b/include/wxstruct.h index 6cdd0fec65..d5dfd47842 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -499,7 +499,7 @@ public: EDA_DRAW_PANEL* GetCanvas() { return m_canvas; } - virtual wxString GetScreenDesc(); + virtual wxString GetScreenDesc() const; /** * Function GetScreen diff --git a/pcbnew/tools/selection_area.h b/pcbnew/tools/selection_area.h index 8cc380b4ab..28bf0f8b63 100644 --- a/pcbnew/tools/selection_area.h +++ b/pcbnew/tools/selection_area.h @@ -63,7 +63,7 @@ public: m_end = aEnd; } - void Show( int x, std::ostream& st) const + void Show( int x, std::ostream& st ) const { } From efa1ac380767e35d469eef95900fe272a9f53f3c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 11 Sep 2013 11:39:46 +0200 Subject: [PATCH 304/415] Moved GetColor() from PAINTER to RENDER_SETTINGS. Fixed recaching of custom items. --- common/view/view.cpp | 7 +-- include/painter.h | 20 ++++----- pcbnew/pcb_painter.cpp | 98 +++++++++++++++++++++--------------------- pcbnew/pcb_painter.h | 6 +-- 4 files changed, 66 insertions(+), 65 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index f8ba2db28f..4c16035a36 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -370,7 +370,7 @@ struct VIEW::updateItemsColor void operator()( VIEW_ITEM* aItem ) { // Obtain the color that should be used for coloring the item - const COLOR4D color = painter->GetColor( aItem, layer ); + const COLOR4D color = painter->GetSettings()->GetColor( aItem, layer ); int group = aItem->getGroup( layer ); if( group >= 0 ) @@ -672,7 +672,8 @@ struct VIEW::recacheLayer { int group = gal->BeginGroup(); aItem->setGroup( layer, group ); - view->m_painter->Draw( static_cast( aItem ), layer ); + if( !view->m_painter->Draw( aItem, layer ) ) + aItem->ViewDraw( layer, gal, BOX2I() ); // Alternative drawing method gal->EndGroup(); } else @@ -836,7 +837,7 @@ void VIEW::updateItemColor( VIEW_ITEM* aItem, int aLayer ) wxASSERT( (unsigned) aLayer < m_layers.size() ); // Obtain the color that should be used for coloring the item on the specific layerId - const COLOR4D color = m_painter->GetColor( aItem, aLayer ); + const COLOR4D color = m_painter->GetSettings()->GetColor( aItem, aLayer ); int group = aItem->getGroup( aLayer ); // Change the color, only if it has group assigned diff --git a/include/painter.h b/include/painter.h index 3a8a7c392f..7384b37c10 100644 --- a/include/painter.h +++ b/include/painter.h @@ -113,6 +113,16 @@ public: m_hiContrastEnabled = aEnabled; } + /** + * Function GetColor + * Returns the color that should be used to draw the specific VIEW_ITEM on the specific layer + * using currently used render settings. + * @param aItem is the VIEW_ITEM. + * @param aLayer is the layer. + * @return The color. + */ + virtual const COLOR4D& GetColor( const VIEW_ITEM* aItem, int aLayer ) const = 0; + protected: /** * Function update @@ -217,16 +227,6 @@ public: */ virtual void DrawBrightened( const VIEW_ITEM* aItem ); - /** - * Function GetColor - * Returns the color that should be used to draw the specific VIEW_ITEM on the specific layer - * using currently used render settings. - * @param aItem is the VIEW_ITEM. - * @param aLayer is the layer. - * @return The color. - */ - virtual const COLOR4D& GetColor( const VIEW_ITEM* aItem, int aLayer ) = 0; - protected: /// Instance of graphic abstraction layer that gives an interface to call /// commands used to draw (eg. DrawLine, DrawCircle, etc.) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 45841207ed..21936aa3ca 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -137,6 +137,41 @@ void PCB_RENDER_SETTINGS::LoadDisplayOptions( const DISPLAY_OPTIONS& aOptions ) } +const COLOR4D& PCB_RENDER_SETTINGS::GetColor( const VIEW_ITEM* aItem, int aLayer ) const +{ + int netCode = -1; + + if( aItem ) + { + if( static_cast( aItem )->IsSelected() ) + { + return m_layerColorsSel[aLayer]; + } + + // Try to obtain the netcode for the item + const BOARD_CONNECTED_ITEM* item = dynamic_cast( aItem ); + if( item ) + netCode = item->GetNet(); + } + + // Return grayish color for non-highlighted layers in the high contrast mode + if( m_hiContrastEnabled && m_activeLayers.count( aLayer ) == 0 ) + return m_hiContrastColor; + + // Single net highlight mode + if( m_highlightEnabled ) + { + if( netCode == m_highlightNetcode ) + return m_layerColorsHi[aLayer]; + else + return m_layerColorsDark[aLayer]; + } + + // No special modificators enabled + return m_layerColors[aLayer]; +} + + void PCB_RENDER_SETTINGS::update() { // Calculate darkened/highlighted variants of layer colors @@ -159,41 +194,6 @@ PCB_PAINTER::PCB_PAINTER( GAL* aGal ) : } -const COLOR4D& PCB_PAINTER::GetColor( const VIEW_ITEM* aItem, int aLayer ) -{ - int netCode = -1; - - if( aItem ) - { - if( static_cast( aItem )->IsSelected() ) - { - return m_pcbSettings->m_layerColorsSel[aLayer]; - } - - // Try to obtain the netcode for the item - const BOARD_CONNECTED_ITEM* item = dynamic_cast( aItem ); - if( item ) - netCode = item->GetNet(); - } - - // Return grayish color for non-highlighted layers in the high contrast mode - if( m_pcbSettings->m_hiContrastEnabled && m_pcbSettings->m_activeLayers.count( aLayer ) == 0 ) - return m_pcbSettings->m_hiContrastColor; - - // Single net highlight mode - if( m_pcbSettings->m_highlightEnabled ) - { - if( netCode == m_pcbSettings->m_highlightNetcode ) - return m_pcbSettings->m_layerColorsHi[aLayer]; - else - return m_pcbSettings->m_layerColorsDark[aLayer]; - } - - // No special modificators enabled - return m_pcbSettings->m_layerColors[aLayer]; -} - - bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) { const BOARD_ITEM* item = static_cast( aItem ); @@ -280,8 +280,8 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) double textSize = std::min( static_cast( width ), length / netName.length() ); // Set a proper color for the label - color = GetColor( aTrack, aTrack->GetLayer() ); - COLOR4D labelColor = GetColor( NULL, aLayer ); + color = m_pcbSettings->GetColor( aTrack, aTrack->GetLayer() ); + COLOR4D labelColor = m_pcbSettings->GetColor( NULL, aLayer ); if( color.GetBrightness() > 0.5 ) m_gal->SetStrokeColor( labelColor.Inverted() ); @@ -301,7 +301,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) else if( IsCopperLayer( aLayer )) { // Draw a regular track - color = GetColor( aTrack, aLayer ); + color = m_pcbSettings->GetColor( aTrack, aLayer ); m_gal->SetStrokeColor( color ); m_gal->SetIsStroke( true ); @@ -340,7 +340,7 @@ void PCB_PAINTER::draw( const SEGVIA* aVia, int aLayer ) else return; - color = GetColor( aVia, aLayer ); + color = m_pcbSettings->GetColor( aVia, aLayer ); if( m_pcbSettings->m_sketchModeSelect[VIAS_VISIBLE] ) { @@ -419,8 +419,8 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) m_gal->SetMirrored( false ); // Set a proper color for the label - color = GetColor( aPad, aPad->GetLayer() ); - COLOR4D labelColor = GetColor( NULL, aLayer ); + color = m_pcbSettings->GetColor( aPad, aPad->GetLayer() ); + COLOR4D labelColor = m_pcbSettings->GetColor( NULL, aLayer ); if( color.GetBrightness() > 0.5 ) m_gal->SetStrokeColor( labelColor.Inverted() ); @@ -466,7 +466,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) } // Pad drawing - color = GetColor( aPad, aLayer ); + color = m_pcbSettings->GetColor( aPad, aLayer ); if( m_pcbSettings->m_sketchModeSelect[PADS_VISIBLE] ) { // Outline mode @@ -619,7 +619,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment ) { - COLOR4D color = GetColor( NULL, aSegment->GetLayer() ); + COLOR4D color = m_pcbSettings->GetColor( NULL, aSegment->GetLayer() ); m_gal->SetIsFill( false ); m_gal->SetIsStroke( true ); @@ -708,7 +708,7 @@ void PCB_PAINTER::draw( const TEXTE_PCB* aText, int aLayer ) if( aText->GetText().Length() == 0 ) return; - COLOR4D strokeColor = GetColor( NULL, aText->GetLayer() ); + COLOR4D strokeColor = m_pcbSettings->GetColor( NULL, aText->GetLayer() ); VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y ); double orientation = aText->GetOrientation() * M_PI / 1800.0; @@ -732,8 +732,8 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) if( aText->GetLength() == 0 ) return; - COLOR4D strokeColor = GetColor( NULL, aLayer ); - VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y); + COLOR4D strokeColor = m_pcbSettings->GetColor( NULL, aLayer ); + VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y ); double orientation = aText->GetDrawRotation() * M_PI / 1800.0; m_gal->SetStrokeColor( strokeColor ); @@ -747,7 +747,7 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone ) { - COLOR4D color = GetColor( NULL, aZone->GetLayer() ); + COLOR4D color = m_pcbSettings->GetColor( NULL, aZone->GetLayer() ); std::deque corners; PCB_RENDER_SETTINGS::DisplayZonesMode displayMode = m_pcbSettings->m_displayZoneMode; @@ -824,7 +824,7 @@ void PCB_PAINTER::draw( const DIMENSION* aDimension, int aLayer ) else { int layer = aDimension->GetLayer(); - COLOR4D strokeColor = GetColor( NULL, layer ); + COLOR4D strokeColor = m_pcbSettings->GetColor( NULL, layer ); m_gal->SetStrokeColor( strokeColor ); m_gal->SetIsFill( false ); @@ -850,7 +850,7 @@ void PCB_PAINTER::draw( const DIMENSION* aDimension, int aLayer ) void PCB_PAINTER::draw( const PCB_TARGET* aTarget ) { - COLOR4D strokeColor = GetColor( NULL, aTarget->GetLayer() ); + COLOR4D strokeColor = m_pcbSettings->GetColor( NULL, aTarget->GetLayer() ); VECTOR2D position( aTarget->GetPosition() ); double size, radius; diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 952a042f39..c8ce09a4bb 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -85,6 +85,9 @@ public: */ void LoadDisplayOptions( const DISPLAY_OPTIONS& aOptions ); + /// @copydoc RENDER_SETTINGS::GetColor() + virtual const COLOR4D& GetColor( const VIEW_ITEM* aItem, int aLayer ) const; + protected: /// @copydoc RENDER_SETTINGS::Update() void update(); @@ -130,9 +133,6 @@ public: m_pcbSettings = dynamic_cast( aSettings ); } - /// @copydoc PAINTER::GetColor() - virtual const COLOR4D& GetColor( const VIEW_ITEM* aItem, int aLayer ); - protected: PCB_RENDER_SETTINGS* m_pcbSettings; From 60c84abfe4779f4392522a58849874ee371ee03d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 11 Sep 2013 12:09:22 +0200 Subject: [PATCH 305/415] Changed lifetime of RENDER_SETTINGS (now they are accessible right after PAINTER object is created). --- common/painter.cpp | 5 ++--- include/painter.h | 11 ++++------- pcbnew/pcb_painter.cpp | 2 ++ pcbnew/pcb_painter.h | 4 +++- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/common/painter.cpp b/common/painter.cpp index 5787b5427c..8b9d1c6568 100644 --- a/common/painter.cpp +++ b/common/painter.cpp @@ -64,14 +64,13 @@ void RENDER_SETTINGS::update() PAINTER::PAINTER( GAL* aGal ) : - m_gal( aGal ), m_settings( NULL ), m_brightenedColor( 0.0, 1.0, 0.0, 0.9 ) + m_gal( aGal ), m_brightenedColor( 0.0, 1.0, 0.0, 0.9 ) { } PAINTER::~PAINTER() { - delete m_settings; } @@ -91,7 +90,7 @@ void PAINTER::DrawBrightened( const VIEW_ITEM* aItem ) m_gal->PushDepth(); m_gal->SetLayerDepth( -1.0 ); - // Draw semitransparent box that marks items as brightened + // Draw an outline that marks items as brightened m_gal->SetIsStroke( true ); m_gal->SetLineWidth( 100000.0 ); m_gal->SetStrokeColor( m_brightenedColor ); diff --git a/include/painter.h b/include/painter.h index 7384b37c10..c846bdc98d 100644 --- a/include/painter.h +++ b/include/painter.h @@ -32,7 +32,7 @@ #include #include - +#include class EDA_ITEM; class COLORS_DESIGN_SETTINGS; @@ -187,10 +187,7 @@ public: */ virtual void ApplySettings( RENDER_SETTINGS* aSettings ) { - if( m_settings ) - delete m_settings; - - m_settings = aSettings; + m_settings.reset( aSettings ); } /** @@ -207,7 +204,7 @@ public: */ virtual RENDER_SETTINGS* GetSettings() const { - return m_settings; + return m_settings.get(); } /** @@ -233,7 +230,7 @@ protected: GAL* m_gal; /// Colors and display modes settings that are going to be used when drawing items. - RENDER_SETTINGS* m_settings; + boost::shared_ptr m_settings; /// Color of brightened item frame COLOR4D m_brightenedColor; diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 21936aa3ca..742ef0e188 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -191,6 +191,8 @@ void PCB_RENDER_SETTINGS::update() PCB_PAINTER::PCB_PAINTER( GAL* aGal ) : PAINTER( aGal ) { + m_settings.reset( new PCB_RENDER_SETTINGS() ); + m_pcbSettings = (PCB_RENDER_SETTINGS*) m_settings.get(); } diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index c8ce09a4bb..d7f922e623 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -27,6 +27,7 @@ #define __CLASS_PCB_PAINTER_H #include +#include #include class EDA_ITEM; @@ -130,10 +131,11 @@ public: PAINTER::ApplySettings( aSettings ); // Store PCB specific render settings - m_pcbSettings = dynamic_cast( aSettings ); + m_pcbSettings = (PCB_RENDER_SETTINGS*) m_settings.get(); //dynamic_cast( aSettings ); } protected: + /// Just a properly casted pointer to settings PCB_RENDER_SETTINGS* m_pcbSettings; // Drawing functions for various types of PCB-specific items From 7da892b49acc276ecbea1385f58596028a023901 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 11 Sep 2013 14:42:12 +0200 Subject: [PATCH 306/415] Added drawing of worksheet layout. --- common/CMakeLists.txt | 15 +- common/painter.cpp | 15 +- common/worksheet_item.cpp | 205 ++++++++++++++++++++++ include/layers_id_colors_and_visibility.h | 4 +- include/painter.h | 7 + include/worksheet_item.h | 163 +++++++++++++++++ pcbnew/basepcbframe.cpp | 15 ++ pcbnew/pcb_painter.cpp | 1 + 8 files changed, 410 insertions(+), 15 deletions(-) create mode 100644 common/worksheet_item.cpp create mode 100644 include/worksheet_item.h diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 67b27f893d..3c3630b85a 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -32,6 +32,7 @@ set(GAL_SRCS # Common part drawpanel_gal.cpp painter.cpp + worksheet_item.cpp gal/graphics_abstraction_layer.cpp gal/stroke_font.cpp gal/color4d.cpp @@ -156,13 +157,13 @@ set(COMMON_SRCS system/fcontext.s - tool/tool_base.cpp - tool/tool_manager.cpp - tool/tool_dispatcher.cpp - tool/tool_event.cpp - tool/tool_interactive.cpp - tool/context_menu.cpp - ) + tool/tool_base.cpp + tool/tool_manager.cpp + tool/tool_dispatcher.cpp + tool/tool_event.cpp + tool/tool_interactive.cpp + tool/context_menu.cpp +) add_library(common STATIC ${COMMON_SRCS}) diff --git a/common/painter.cpp b/common/painter.cpp index 8b9d1c6568..ddff0c9820 100644 --- a/common/painter.cpp +++ b/common/painter.cpp @@ -32,13 +32,14 @@ using namespace KiGfx; RENDER_SETTINGS::RENDER_SETTINGS() { // Set the default initial values - m_highlightFactor = 0.5; - m_selectFactor = 0.5; - m_layerOpacity = 0.8; - m_highlightEnabled = false; - m_hiContrastEnabled = false; - m_hiContrastFactor = 0.2; - m_outlineWidth = 1; + m_highlightFactor = 0.5; + m_selectFactor = 0.5; + m_layerOpacity = 0.8; + m_highlightEnabled = false; + m_hiContrastEnabled = false; + m_hiContrastFactor = 0.2; + m_outlineWidth = 1; + m_worksheetLineWidth = 100000; // Store the predefined colors used in KiCad in format used by GAL for( int i = 0; i < NBCOLORS; i++ ) diff --git a/common/worksheet_item.cpp b/common/worksheet_item.cpp new file mode 100644 index 0000000000..40790de477 --- /dev/null +++ b/common/worksheet_item.cpp @@ -0,0 +1,205 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file worksheet_item.cpp + * @brief Class that handles properties and drawing of worksheet layout. + */ + +#include +#include +#include +#include +#include +#include + +using namespace KiGfx; + +WORKSHEET_ITEM::WORKSHEET_ITEM( const std::string& aFileName, const std::string& aSheetName, + const PAGE_INFO* aPageInfo, const TITLE_BLOCK* aTitleBlock ) : + EDA_ITEM( NOT_USED ), // this item is never added to a BOARD so it needs no type + m_fileName( aFileName ), m_sheetName( aSheetName ), + m_titleBlock( aTitleBlock ), m_pageInfo( aPageInfo ), m_sheetNumber( 1 ), m_sheetCount( 1 ) {} + + +void WORKSHEET_ITEM::SetPageInfo( const PAGE_INFO* aPageInfo ) +{ + m_pageInfo = aPageInfo; + ViewUpdate( GEOMETRY ); +} + + +void WORKSHEET_ITEM::SetTitleBlock( const TITLE_BLOCK* aTitleBlock ) +{ + m_titleBlock = aTitleBlock; + ViewUpdate( GEOMETRY ); +} + + +const BOX2I WORKSHEET_ITEM::ViewBBox() const +{ + BOX2I bbox; + + if( m_pageInfo != NULL ) + { + bbox.SetOrigin( VECTOR2I( 0, 0 ) ); + bbox.SetEnd( VECTOR2I( m_pageInfo->GetWidthMils() * 25400, + m_pageInfo->GetHeightMils() * 25400 ) ); + } + else + { + bbox.SetMaximum(); + } + + return bbox; +} + + +void WORKSHEET_ITEM::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const +{ + RENDER_SETTINGS* settings = m_view->GetPainter()->GetSettings(); + wxString fileName( m_fileName ); + wxString sheetName( m_sheetName ); + WS_DRAW_ITEM_LIST drawList; + + drawList.SetPenSize( settings->GetWorksheetLineWidth() ); + // Sorry,but I don't get this multi #ifdef from include/convert_to_biu.h, so here goes a magic + // number. IU_PER_MILS should be 25400 (as in a different compiltion unit), but somehow + // it equals 1 in this case.. + drawList.SetMilsToIUfactor( 25400 /* IU_PER_MILS */ ); + drawList.SetSheetNumber( m_sheetNumber ); + drawList.SetSheetCount( m_sheetCount ); + drawList.SetFileName( fileName ); + drawList.SetSheetName( sheetName ); + + COLOR4D color = settings->GetColor( this, aLayer ); + EDA_COLOR_T edaColor = ColorFindNearest( color.r * 255, color.g * 255, color.b * 255 ); + drawList.BuildWorkSheetGraphicList( *m_pageInfo, *m_titleBlock, edaColor, edaColor ); + + // Draw gray line that outlines the sheet size + drawBorder( aGal ); + + // Draw all the components that make the page layout + WS_DRAW_ITEM_BASE* item = drawList.GetFirst(); + while( item ) + { + switch( item->GetType() ) + { + case WS_DRAW_ITEM_BASE::wsg_line: + draw( static_cast( item ), aGal ); + break; + + case WS_DRAW_ITEM_BASE::wsg_rect: + draw( static_cast( item ), aGal ); + break; + + case WS_DRAW_ITEM_BASE::wsg_poly: + draw( static_cast( item ), aGal ); + break; + + case WS_DRAW_ITEM_BASE::wsg_text: + draw( static_cast( item ), aGal ); + break; + } + + item = drawList.GetNext(); + } +} + + +void WORKSHEET_ITEM::ViewGetLayers( int aLayers[], int& aCount ) const +{ + aCount = 1; + aLayers[0] = ITEM_GAL_LAYER( WORKSHEET ); +} + + +void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_LINE* aItem, GAL* aGal ) const +{ + aGal->SetIsStroke( true ); + aGal->SetIsFill( false ); + aGal->SetStrokeColor( COLOR4D( aItem->GetColor() ) ); + aGal->SetLineWidth( aItem->GetPenWidth() ); + aGal->DrawLine( VECTOR2D( aItem->GetStart() ), VECTOR2D( aItem->GetEnd() ) ); +} + + +void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_RECT* aItem, GAL* aGal ) const +{ + aGal->SetIsStroke( true ); + aGal->SetIsFill( false ); + aGal->SetStrokeColor( COLOR4D( aItem->GetColor() ) ); + aGal->SetLineWidth( aItem->GetPenWidth() ); + aGal->DrawRectangle( VECTOR2D( aItem->GetStart() ), VECTOR2D( aItem->GetEnd() ) ); +} + + +void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_POLYGON* aItem, GAL* aGal ) const +{ + std::deque corners; + BOOST_FOREACH( wxPoint point, aItem->m_Corners ) + { + corners.push_back( VECTOR2D( point ) ); + } + + if( aItem->IsFilled() ) + { + aGal->SetFillColor( COLOR4D( aItem->GetColor() ) ); + aGal->SetIsFill( true ); + aGal->SetIsStroke( false ); + aGal->DrawPolygon( corners ); + } + else + { + aGal->SetStrokeColor( COLOR4D( aItem->GetColor() ) ); + aGal->SetIsFill( false ); + aGal->SetIsStroke( true ); + aGal->SetLineWidth( aItem->GetPenWidth() ); + aGal->DrawPolyline( corners ); + } +} + + +void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_TEXT* aItem, GAL* aGal ) const +{ + VECTOR2D position( aItem->GetTextPosition().x, aItem->GetTextPosition().y ); + + aGal->SetStrokeColor( COLOR4D( aItem->GetColor() ) ); + aGal->SetLineWidth( aItem->GetThickness() ); + aGal->SetTextAttributes( aItem ); + aGal->StrokeText( std::string( aItem->GetText().mb_str() ), position, 0.0 ); +} + + +void WORKSHEET_ITEM::drawBorder( GAL* aGal ) const +{ + VECTOR2D origin = VECTOR2D( 0.0, 0.0 ); + VECTOR2D end = VECTOR2D( m_pageInfo->GetWidthMils() * 25400, + m_pageInfo->GetHeightMils() * 25400 ); + + aGal->SetIsStroke( true ); + aGal->SetIsFill( false ); + aGal->SetStrokeColor( COLOR4D( 0.5, 0.5, 0.5, 1.0 ) ); + aGal->DrawRectangle( origin, end ); +} diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index 3ab011d3b5..6959ad3fd7 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -241,6 +241,7 @@ enum PCB_VISIBLE PADS_NETNAMES_VISIBLE, SELECTION, + WORKSHEET, GP_OVERLAY, // General purpose overlay END_PCB_VISIBLE_LIST // sentinel @@ -290,7 +291,8 @@ const LAYER_NUM GalLayerOrder[] = ITEM_GAL_LAYER( LAYER_1_NETNAMES_VISIBLE ), LAYER_N_BACK, ADHESIVE_N_BACK, SOLDERPASTE_N_BACK, SILKSCREEN_N_BACK, - ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ) + ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ), + ITEM_GAL_LAYER( WORKSHEET ) }; /** diff --git a/include/painter.h b/include/painter.h index c846bdc98d..1cbd2df94b 100644 --- a/include/painter.h +++ b/include/painter.h @@ -32,6 +32,7 @@ #include #include +#include #include class EDA_ITEM; @@ -123,6 +124,11 @@ public: */ virtual const COLOR4D& GetColor( const VIEW_ITEM* aItem, int aLayer ) const = 0; + float GetWorksheetLineWidth() const + { + return m_worksheetLineWidth; + } + protected: /** * Function update @@ -147,6 +153,7 @@ protected: float m_selectFactor; ///< Specifies how color of selected items is changed float m_layerOpacity; ///< Determines opacity of all layers float m_outlineWidth; ///< Line width used when drawing outlines + float m_worksheetLineWidth; ///< Line width used when drawing worksheet /// Map of colors that were usually used for display std::map m_legacyColorMap; diff --git a/include/worksheet_item.h b/include/worksheet_item.h new file mode 100644 index 0000000000..e4cff49fa3 --- /dev/null +++ b/include/worksheet_item.h @@ -0,0 +1,163 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file worksheet_item.h + * @brief Class that handles properties and drawing of worksheet layout. + */ + +#ifndef WORKSHEET_ITEM_H +#define WORKSHEET_ITEM_H + +#include + +class BOARD; +class PAGE_INFO; +class TITLE_BLOCK; +class WS_DRAW_ITEM_LINE; +class WS_DRAW_ITEM_RECT; +class WS_DRAW_ITEM_POLYGON; +class WS_DRAW_ITEM_TEXT; + +namespace KiGfx +{ +class GAL; + +class WORKSHEET_ITEM : public EDA_ITEM +{ +public: + WORKSHEET_ITEM( const std::string& aFileName, const std::string& aSheetName, + const PAGE_INFO* aPageInfo, const TITLE_BLOCK* aTitleBlock ); + ~WORKSHEET_ITEM() {} + + /** + * Function SetFileName() + * Sets the file name displayed in the title block. + * + * @param aFileName is the new file name. + */ + void SetFileName( const std::string& aFileName ) + { + m_fileName = aFileName; + ViewUpdate( GEOMETRY ); + } + + /** + * Function SetSheetName() + * Sets the sheet name displayed in the title block. + * + * @param aSheetName is the new sheet name. + */ + void SetSheetName( const std::string& aSheetName ) + { + m_sheetName = aSheetName; + ViewUpdate( GEOMETRY ); + } + + /** + * Function SetPageInfo() + * Changes the PAGE_INFO object used to draw the worksheet. + * + * @param aPageInfo is the new PAGE_INFO object. + */ + void SetPageInfo( const PAGE_INFO* aPageInfo ); + + /** + * Function SetTitleBlock() + * Changes the TITLE_BLOCK object used to draw the worksheet. + * + * @param aTitleBlock is the new TITLE_BLOCK object. + */ + void SetTitleBlock( const TITLE_BLOCK* aTitleBlock ); + + /** + * Function SetSheetNumber() + * Changes the sheet number displayed in the title block. + * + * @param aSheetNumber is the new sheet number. + */ + void SetSheetNumber( int aSheetNumber ) + { + m_sheetNumber = aSheetNumber; + ViewUpdate( GEOMETRY ); + + } + + /** + * Function SetSheetCount() + * Changes the sheets count number displayed in the title block. + * + * @param aSheetCount is the new sheets count number. + */ + void SetSheetCount( int aSheetCount ) + { + m_sheetCount = aSheetCount; + ViewUpdate( GEOMETRY ); + } + + /// @copydoc VIEW_ITEM::ViewBBox() + const BOX2I ViewBBox() const; + + /// @copydoc VIEW_ITEM::ViewDraw() + void ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const; + + /// @copydoc VIEW_ITEM::ViewGetLayers() + void ViewGetLayers( int aLayers[], int& aCount ) const; + + /// @copydoc EDA_ITEM::Show() + void Show( int x, std::ostream& st ) const + { + } + +protected: + /// File name displayed in the title block + std::string m_fileName; + + /// Sheet name displayed in the title block + std::string m_sheetName; + + /// Title block that contains properties of the title block displayed in the worksheet. + const TITLE_BLOCK* m_titleBlock; + + /// Worksheet page information. + const PAGE_INFO* m_pageInfo; + + /// Sheet number displayed in the title block. + int m_sheetNumber; + + /// Sheets count number displayed in the title block. + int m_sheetCount; + + // Functions for drawing items that makes a worksheet + void draw( const WS_DRAW_ITEM_LINE* aItem, GAL* aGal ) const; + void draw( const WS_DRAW_ITEM_RECT* aItem, GAL* aGal ) const; + void draw( const WS_DRAW_ITEM_POLYGON* aItem, GAL* aGal ) const; + void draw( const WS_DRAW_ITEM_TEXT* aItem, GAL* aGal ) const; + + /// Draws a border that determines the page size. + void drawBorder( GAL* aGal ) const; +}; +} + +#endif /* WORKSHEET_ITEM_H */ diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 4d418d0e57..9692ba9738 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -202,6 +203,20 @@ void PCB_BASE_FRAME::ViewReloadBoard( const BOARD* aBoard ) const view->Add( zone ); } + // Add an entry for the worksheet layout + KiGfx::WORKSHEET_ITEM* worksheet = new KiGfx::WORKSHEET_ITEM( + std::string( aBoard->GetFileName().mb_str() ), + std::string( GetScreenDesc().mb_str() ), + &GetPageSettings(), &GetTitleBlock() ); + BASE_SCREEN* screen = GetScreen(); + if( screen != NULL ) + { + worksheet->SetSheetNumber( GetScreen()->m_ScreenNumber ); + worksheet->SetSheetCount( GetScreen()->m_NumberOfScreens ); + } + + view->Add( worksheet ); + view->RecacheAllItems( true ); if( m_galCanvasActive ) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 742ef0e188..9fccb84562 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -75,6 +75,7 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings m_layerColors[ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); m_layerColors[ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); m_layerColors[ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); + m_layerColors[ITEM_GAL_LAYER( WORKSHEET )] = COLOR4D( 0.5, 0.0, 0.0, 1.0 ); // Netnames for copper layers for( LAYER_NUM layer = FIRST_COPPER_LAYER; layer <= LAST_COPPER_LAYER; ++layer ) From e38019d74e1e81b20c5ac02987be2a5b7aed885c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 11 Sep 2013 16:38:40 +0200 Subject: [PATCH 307/415] Removed some dead code. --- common/view/view.cpp | 6 +++--- common/view/view_group.cpp | 4 ++-- common/view/view_item.cpp | 7 +------ common/worksheet_item.cpp | 6 +++--- include/view/view_group.h | 3 +-- include/view/view_item.h | 9 ++------- include/worksheet_item.h | 2 +- pcbnew/tools/selection_area.cpp | 2 +- pcbnew/tools/selection_area.h | 2 +- 9 files changed, 15 insertions(+), 26 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 4c16035a36..ac72ab9157 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -586,7 +586,7 @@ void VIEW::draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate ) const group = m_gal->BeginGroup(); aItem->setGroup( aLayer, group ); if( !m_painter->Draw( aItem, aLayer ) ) - aItem->ViewDraw( aLayer, m_gal, BOX2I() ); // Alternative drawing method + aItem->ViewDraw( aLayer, m_gal ); // Alternative drawing method m_gal->EndGroup(); } } @@ -594,7 +594,7 @@ void VIEW::draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate ) const { // Immediate mode if( !m_painter->Draw( aItem, aLayer ) ) - aItem->ViewDraw( aLayer, m_gal, BOX2I() ); // Alternative drawing method + aItem->ViewDraw( aLayer, m_gal ); // Alternative drawing method } // Draws a bright contour around the item @@ -673,7 +673,7 @@ struct VIEW::recacheLayer int group = gal->BeginGroup(); aItem->setGroup( layer, group ); if( !view->m_painter->Draw( aItem, layer ) ) - aItem->ViewDraw( layer, gal, BOX2I() ); // Alternative drawing method + aItem->ViewDraw( layer, gal ); // Alternative drawing method gal->EndGroup(); } else diff --git a/common/view/view_group.cpp b/common/view/view_group.cpp index d4cc2472bc..d6f90bb0ba 100644 --- a/common/view/view_group.cpp +++ b/common/view/view_group.cpp @@ -85,7 +85,7 @@ const BOX2I VIEW_GROUP::ViewBBox() const } -void VIEW_GROUP::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const +void VIEW_GROUP::ViewDraw( int aLayer, GAL* aGal ) const { PAINTER* painter = m_view->GetPainter(); @@ -103,7 +103,7 @@ void VIEW_GROUP::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) co aGal->SetLayerDepth( m_view->GetLayerOrder( layers[i] ) ); if( !painter->Draw( item, layers[i] ) ) - item->ViewDraw( layers[i], aGal, aVisibleArea ); // Alternative drawing method + item->ViewDraw( layers[i], aGal ); // Alternative drawing method } } } diff --git a/common/view/view_item.cpp b/common/view/view_item.cpp index 4104d06c1a..94b4ccafe7 100644 --- a/common/view/view_item.cpp +++ b/common/view/view_item.cpp @@ -48,17 +48,12 @@ void VIEW_ITEM::ViewSetVisible( bool aIsVisible ) } -void VIEW_ITEM::ViewUpdate( int aUpdateFlags, bool aForceImmediateRedraw ) +void VIEW_ITEM::ViewUpdate( int aUpdateFlags ) { if( !m_view ) return; m_view->invalidateItem( this, aUpdateFlags ); - - if( aForceImmediateRedraw ) - { - m_view->Redraw(); - } } diff --git a/common/worksheet_item.cpp b/common/worksheet_item.cpp index 40790de477..9845e48f92 100644 --- a/common/worksheet_item.cpp +++ b/common/worksheet_item.cpp @@ -76,7 +76,7 @@ const BOX2I WORKSHEET_ITEM::ViewBBox() const } -void WORKSHEET_ITEM::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const +void WORKSHEET_ITEM::ViewDraw( int aLayer, GAL* aGal ) const { RENDER_SETTINGS* settings = m_view->GetPainter()->GetSettings(); wxString fileName( m_fileName ); @@ -84,8 +84,8 @@ void WORKSHEET_ITEM::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea WS_DRAW_ITEM_LIST drawList; drawList.SetPenSize( settings->GetWorksheetLineWidth() ); - // Sorry,but I don't get this multi #ifdef from include/convert_to_biu.h, so here goes a magic - // number. IU_PER_MILS should be 25400 (as in a different compiltion unit), but somehow + // Sorry, but I don't get this multi #ifdef from include/convert_to_biu.h, so here goes a magic + // number. IU_PER_MILS should be 25400 (as in a different compilation unit), but somehow // it equals 1 in this case.. drawList.SetMilsToIUfactor( 25400 /* IU_PER_MILS */ ); drawList.SetSheetNumber( m_sheetNumber ); diff --git a/include/view/view_group.h b/include/view/view_group.h index ab48e80028..514000bac3 100644 --- a/include/view/view_group.h +++ b/include/view/view_group.h @@ -107,9 +107,8 @@ public: * * @param aLayer is the layer which should be drawn. * @param aGal is the GAL that should be used for drawing. - * @param aVisibleArea is limiting the drawing area. */ - virtual void ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const; + virtual void ViewDraw( int aLayer, GAL* aGal ) const; /** * Function ViewGetLayers() diff --git a/include/view/view_item.h b/include/view/view_item.h index 49f0b7d492..5200acb973 100644 --- a/include/view/view_item.h +++ b/include/view/view_item.h @@ -101,11 +101,8 @@ public: * * @param aLayer: current drawing layer * @param aGal: pointer to the GAL device we are drawing on - * @param aVisibleArea: area (in world space coordinates) that is relevant for drawing. For - * example, when drawing a bitmap, one can clip the blitting area to aVisibleArea, reducing - * drawing time. */ - virtual void ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const { }; + virtual void ViewDraw( int aLayer, GAL* aGal ) const {}; /** * Function ViewGetLayers() @@ -155,10 +152,8 @@ public: * this item has changed. For static views calling has no effect. * * @param aUpdateFlags: how much the object has changed - * @param aForceImmediateRedraw: when true, the VIEW is redrawn immediately, - * otherwise, it will be redrawn upon next call of VIEW::Update() */ - virtual void ViewUpdate( int aUpdateFlags = ALL, bool aForceImmediateRedraw = false ); + virtual void ViewUpdate( int aUpdateFlags = ALL ); /** * Function ViewRelease() diff --git a/include/worksheet_item.h b/include/worksheet_item.h index e4cff49fa3..b26ec01085 100644 --- a/include/worksheet_item.h +++ b/include/worksheet_item.h @@ -120,7 +120,7 @@ public: const BOX2I ViewBBox() const; /// @copydoc VIEW_ITEM::ViewDraw() - void ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const; + void ViewDraw( int aLayer, GAL* aGal ) const; /// @copydoc VIEW_ITEM::ViewGetLayers() void ViewGetLayers( int aLayers[], int& aCount ) const; diff --git a/pcbnew/tools/selection_area.cpp b/pcbnew/tools/selection_area.cpp index 5c30de222c..33d73d6d68 100644 --- a/pcbnew/tools/selection_area.cpp +++ b/pcbnew/tools/selection_area.cpp @@ -47,7 +47,7 @@ void SELECTION_AREA::ViewGetLayers( int aLayers[], int& aCount ) const } -void SELECTION_AREA::ViewDraw( int aLayer, GAL* aGal, const BOX2I& aVisibleArea ) const +void SELECTION_AREA::ViewDraw( int aLayer, GAL* aGal ) const { aGal->SetLineWidth( 1.0 ); aGal->SetStrokeColor( COLOR4D( 1.0, 1.0, 0.4, 1.0 ) ); diff --git a/pcbnew/tools/selection_area.h b/pcbnew/tools/selection_area.h index 28bf0f8b63..50db94f927 100644 --- a/pcbnew/tools/selection_area.h +++ b/pcbnew/tools/selection_area.h @@ -50,7 +50,7 @@ public: virtual const BOX2I ViewBBox() const; - void ViewDraw( int aLayer, KiGfx::GAL* aGal, const BOX2I& aVisibleArea ) const; + void ViewDraw( int aLayer, KiGfx::GAL* aGal ) const; void ViewGetLayers( int aLayers[], int& aCount ) const; void SetOrigin ( VECTOR2I aOrigin ) From f8ae1a9997fdf7b49ef2fdca19c659a970c4969c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 11 Sep 2013 19:37:52 +0200 Subject: [PATCH 308/415] Removed some potential memory leaks. --- common/tool/tool_manager.cpp | 13 +++++++++++++ include/wxBasePcbFrame.h | 4 ++-- include/wxPcbStruct.h | 1 + pcbnew/pcbframe.cpp | 1 + pcbnew/tools/pcb_tools.cpp | 7 +++++++ 5 files changed, 24 insertions(+), 2 deletions(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 03250f8fff..0c7a97538c 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -86,6 +86,19 @@ TOOL_MANAGER::TOOL_MANAGER() } +TOOL_MANAGER::~TOOL_MANAGER() +{ + std::map::iterator it, it_end; + + for( it = m_toolState.begin(), it_end = m_toolState.end(); it != it_end; ++it ) + { + delete it->second->cofunc; // delete cofunction + delete it->second; // delete TOOL_STATE + delete it->first; // delete the tool itself + } +} + + void TOOL_MANAGER::RegisterTool( TOOL_BASE* aTool ) { TOOL_STATE* st = new TOOL_STATE; diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index 874349dfd0..fdaaa1f767 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -95,8 +95,8 @@ protected: /// main window. wxAuiToolBar* m_auxiliaryToolBar; - TOOL_MANAGER *m_toolManager; - TOOL_DISPATCHER *m_toolDispatcher; + TOOL_MANAGER* m_toolManager; + TOOL_DISPATCHER* m_toolDispatcher; void updateGridSelectBox(); void updateZoomSelectBox(); diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 29a65a34e5..af93d93bf0 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -118,6 +118,7 @@ protected: // to know the footprint name of components. void setupTools(); + void destroyTools(); void onGenericCommand( wxCommandEvent& aEvent ); // we'll use lower case function names for private member functions. diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 7a7a6f6e4e..8904b35e81 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -485,6 +485,7 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( wxWindow* parent, const wxString& title, PCB_EDIT_FRAME::~PCB_EDIT_FRAME() { + destroyTools(); m_RecordingMacros = -1; for( int i = 0; i < 10; i++ ) diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 0dc342a17d..30692560d8 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -50,6 +50,13 @@ void PCB_EDIT_FRAME::setupTools() } +void PCB_EDIT_FRAME::destroyTools() +{ + delete m_toolDispatcher; + delete m_toolManager; +} + + void PCB_EDIT_FRAME::onGenericCommand( wxCommandEvent &aEvent ) { m_toolDispatcher->DispatchWxCommand( aEvent ); From 944a61100b1e42976cef39b72c5bcc3100c5fa05 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 12 Sep 2013 09:44:57 +0200 Subject: [PATCH 309/415] Fixed memory leaks in containers. --- common/gal/opengl/cached_container.cpp | 149 ++++++++++++---------- common/gal/opengl/noncached_container.cpp | 5 - common/gal/opengl/opengl_gal.cpp | 2 + common/gal/opengl/vertex_manager.cpp | 9 +- common/view/view_item.cpp | 6 - include/gal/opengl/cached_container.h | 21 +-- include/gal/opengl/noncached_container.h | 4 +- include/gal/opengl/vertex_container.h | 14 +- include/gal/opengl/vertex_manager.h | 6 + include/view/view_item.h | 10 +- 10 files changed, 126 insertions(+), 100 deletions(-) diff --git a/common/gal/opengl/cached_container.cpp b/common/gal/opengl/cached_container.cpp index ea718530ce..12682d858f 100644 --- a/common/gal/opengl/cached_container.cpp +++ b/common/gal/opengl/cached_container.cpp @@ -42,7 +42,7 @@ using namespace KiGfx; CACHED_CONTAINER::CACHED_CONTAINER( unsigned int aSize ) : - VERTEX_CONTAINER( aSize ) + VERTEX_CONTAINER( aSize ), m_item( NULL ) { // In the beginning there is only free space m_freeChunks.insert( Chunk( aSize, 0 ) ); @@ -51,35 +51,45 @@ CACHED_CONTAINER::CACHED_CONTAINER( unsigned int aSize ) : void CACHED_CONTAINER::SetItem( VERTEX_ITEM* aItem ) { - if( aItem == NULL ) - { - wxASSERT( m_item != NULL ); + wxASSERT( aItem != NULL ); - // Finishing the item - if( m_itemSize < m_chunkSize ) - { - // There is some not used but reserved memory left, so we should return it to the pool - int itemOffset = m_item->GetOffset(); + m_item = aItem; + m_itemSize = m_item->GetSize(); + m_chunkSize = m_itemSize; - // Add the not used memory back to the pool - m_freeChunks.insert( Chunk( m_chunkSize - m_itemSize, itemOffset + m_itemSize ) ); - m_freeSpace += ( m_chunkSize - m_itemSize ); - // mergeFreeChunks(); - } - - m_item = NULL; - } + if( m_itemSize == 0 ) + m_items.insert( m_item ); // The item was not stored before else - { - m_item = aItem; - m_itemSize = m_item->GetSize(); - m_chunkSize = m_itemSize; + m_chunkOffset = m_item->GetOffset(); - if( m_itemSize == 0 ) - m_items.insert( m_item ); // The item was not stored before - else - m_chunkOffset = m_item->GetOffset(); +#if CACHED_CONTAINER_TEST > 1 + wxLogDebug( wxT( "Adding/editing item 0x%08lx (size %d)" ), (long) m_item, m_itemSize ); +#endif +} + + +void CACHED_CONTAINER::FinishItem() +{ + wxASSERT( m_item != NULL ); + wxASSERT( m_item->GetSize() == m_itemSize ); + + // Finishing the previously edited item + if( m_itemSize < m_chunkSize ) + { + // There is some not used but reserved memory left, so we should return it to the pool + int itemOffset = m_item->GetOffset(); + + // Add the not used memory back to the pool + m_freeChunks.insert( Chunk( m_chunkSize - m_itemSize, itemOffset + m_itemSize ) ); + m_freeSpace += ( m_chunkSize - m_itemSize ); + // mergeFreeChunks(); // veery slow and buggy } + +#if CACHED_CONTAINER_TEST > 1 + wxLogDebug( wxT( "Finishing item 0x%08lx (size %d)" ), (long) m_item, m_itemSize ); + test(); + m_item = NULL; // electric fence +#endif } @@ -109,6 +119,7 @@ VERTEX* CACHED_CONTAINER::Allocate( unsigned int aSize ) VERTEX* reserved = &m_vertices[m_chunkOffset + m_itemSize]; m_itemSize += aSize; + // Now the item officially possesses the memory chunk m_item->setSize( m_itemSize ); // The content has to be updated @@ -117,16 +128,40 @@ VERTEX* CACHED_CONTAINER::Allocate( unsigned int aSize ) #if CACHED_CONTAINER_TEST > 1 test(); #endif +#if CACHED_CONTAINER_TEST > 2 + showFreeChunks(); + showReservedChunks(); +#endif return reserved; } -void CACHED_CONTAINER::Erase() +void CACHED_CONTAINER::Delete( VERTEX_ITEM* aItem ) { - wxASSERT( m_item != NULL ); + wxASSERT( aItem != NULL ); + wxASSERT( m_items.find( aItem ) != m_items.end() ); - freeItem( m_item ); + int size = aItem->GetSize(); + int offset = aItem->GetOffset(); + +#if CACHED_CONTAINER_TEST > 1 + wxLogDebug( wxT( "Removing 0x%08lx (size %d offset %d)" ), (long) aItem, size, offset ); +#endif + + // Insert a free memory chunk entry in the place where item was stored + if( size > 0 ) + { + m_freeChunks.insert( Chunk( size, offset ) ); + m_freeSpace += size; + // Indicate that the item is not stored in the container anymore + aItem->setSize( 0 ); + } + m_items.erase( aItem ); + +#if CACHED_CONTAINER_TEST > 1 + test(); +#endif // Dynamic memory freeing, there is no point in holding // a large amount of memory when there is no use for it @@ -176,10 +211,10 @@ VERTEX* CACHED_CONTAINER::GetVertices( const VERTEX_ITEM* aItem ) const unsigned int CACHED_CONTAINER::reallocate( unsigned int aSize ) { + wxASSERT( aSize > 0 ); + #if CACHED_CONTAINER_TEST > 2 - wxLogDebug( wxT( "Resize 0x%08x to %d" ), (int) m_item, aSize ); - showFreeChunks(); - showReservedChunks(); + wxLogDebug( wxT( "Resize 0x%08lx from %d to %d" ), (long) m_item, m_itemSize, aSize ); #endif // Is there enough space to store vertices? @@ -203,7 +238,7 @@ unsigned int CACHED_CONTAINER::reallocate( unsigned int aSize ) return UINT_MAX; } - // Look for the free space of at least given size + // Look for the free space chunk of at least given size FreeChunkMap::iterator newChunk = m_freeChunks.lower_bound( aSize ); if( newChunk == m_freeChunks.end() ) @@ -240,6 +275,7 @@ unsigned int CACHED_CONTAINER::reallocate( unsigned int aSize ) m_itemSize * VertexSize ); // Free the space previously used by the chunk + wxASSERT( m_itemSize > 0 ); m_freeChunks.insert( Chunk( m_itemSize, m_chunkOffset ) ); m_freeSpace += m_itemSize; } @@ -254,15 +290,10 @@ unsigned int CACHED_CONTAINER::reallocate( unsigned int aSize ) } m_freeSpace -= aSize; - // mergeFreeChunks(); + // mergeFreeChunks(); // veery slow and buggy m_item->setOffset( chunkOffset ); -#if CACHED_CONTAINER_TEST > 2 - showFreeChunks(); - showReservedChunks(); -#endif - return chunkOffset; } @@ -271,11 +302,10 @@ bool CACHED_CONTAINER::defragment( VERTEX* aTarget ) { #if CACHED_CONTAINER_TEST > 0 wxLogDebug( wxT( "Defragmenting" ) ); -#endif -#ifdef __WXDEBUG__ + prof_counter totalTime; prof_start( &totalTime, false ); -#endif /* __WXDEBUG__ */ +#endif if( aTarget == NULL ) { @@ -313,14 +343,15 @@ bool CACHED_CONTAINER::defragment( VERTEX* aTarget ) // Now there is only one big chunk of free memory m_freeChunks.clear(); + wxASSERT( m_freeSpace > 0 ); m_freeChunks.insert( Chunk( m_freeSpace, m_currentSize - m_freeSpace ) ); -#ifdef __WXDEBUG__ +#if CACHED_CONTAINER_TEST > 0 prof_end( &totalTime ); wxLogDebug( wxT( "Defragmented the container storing %d vertices / %.1f ms" ), m_currentSize - m_freeSpace, (double) totalTime.value / 1000.0 ); -#endif /* __WXDEBUG__ */ +#endif return true; } @@ -331,10 +362,10 @@ void CACHED_CONTAINER::mergeFreeChunks() if( m_freeChunks.size() <= 1 ) // There are no chunks that can be merged return; -#ifdef __WXDEBUG__ +#ifdef CACHED_CONTAINER_TEST > 0 prof_counter totalTime; prof_start( &totalTime, false ); -#endif /* __WXDEBUG__ */ +#endif // Reversed free chunks map - this one stores chunk size with its offset as the key std::list freeChunks; @@ -375,11 +406,11 @@ void CACHED_CONTAINER::mergeFreeChunks() // Add the last one m_freeChunks.insert( std::make_pair( size, offset ) ); -#ifdef __WXDEBUG__ +#ifdef CACHED_CONTAINER_TEST > 0 prof_end( &totalTime ); wxLogDebug( wxT( "Merged free chunks / %.1f ms" ), (double) totalTime.value / 1000.0 ); -#endif /* __WXDEBUG__ */ +#endif test(); } @@ -387,6 +418,8 @@ void CACHED_CONTAINER::mergeFreeChunks() bool CACHED_CONTAINER::resizeContainer( unsigned int aNewSize ) { + wxASSERT( aNewSize != m_currentSize ); + #if CACHED_CONTAINER_TEST > 0 wxLogDebug( wxT( "Resizing container from %d to %d" ), m_currentSize, aNewSize ); #endif @@ -413,6 +446,7 @@ bool CACHED_CONTAINER::resizeContainer( unsigned int aNewSize ) // We have to correct freeChunks after defragmentation m_freeChunks.clear(); + wxASSERT( aNewSize - reservedSpace() > 0 ); m_freeChunks.insert( Chunk( aNewSize - reservedSpace(), reservedSpace() ) ); } else @@ -439,21 +473,6 @@ bool CACHED_CONTAINER::resizeContainer( unsigned int aNewSize ) } -void CACHED_CONTAINER::freeItem( VERTEX_ITEM* aItem ) -{ - int size = aItem->GetSize(); - int offset = aItem->GetOffset(); - - // Insert a free memory chunk entry in the place where item was stored - m_freeChunks.insert( Chunk( size, offset ) ); - m_freeSpace += size; - m_items.erase( aItem ); - - // Indicate that the item is not stored in the container anymore - aItem->setSize( 0 ); -} - - unsigned int CACHED_CONTAINER::getPowerOf2( unsigned int aNumber ) const { unsigned int power = 1; @@ -476,6 +495,7 @@ void CACHED_CONTAINER::showFreeChunks() { unsigned int offset = getChunkOffset( *it ); unsigned int size = getChunkSize( *it ); + wxASSERT( size > 0 ); wxLogDebug( wxT( "[0x%08x-0x%08x] (size %d)" ), offset, offset + size - 1, size ); @@ -494,9 +514,10 @@ void CACHED_CONTAINER::showReservedChunks() VERTEX_ITEM* item = *it; unsigned int offset = item->GetOffset(); unsigned int size = item->GetSize(); + wxASSERT( size > 0 ); - wxLogDebug( wxT( "[0x%08x-0x%08x] @ 0x%08x (size %d)" ), - offset, offset + size - 1, (int) item, size ); + wxLogDebug( wxT( "[0x%08x-0x%08x] @ 0x%08lx (size %d)" ), + offset, offset + size - 1, (long) item, size ); } } diff --git a/common/gal/opengl/noncached_container.cpp b/common/gal/opengl/noncached_container.cpp index f7eb3f897a..9c2ab066f8 100644 --- a/common/gal/opengl/noncached_container.cpp +++ b/common/gal/opengl/noncached_container.cpp @@ -82,11 +82,6 @@ VERTEX* NONCACHED_CONTAINER::Allocate( unsigned int aSize ) } -void NONCACHED_CONTAINER::Erase() -{ -} - - void NONCACHED_CONTAINER::Clear() { m_freePtr = 0; diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 4d40e28978..f1b9b95031 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -638,6 +638,7 @@ int OPENGL_GAL::BeginGroup() void OPENGL_GAL::EndGroup() { + cachedManager.FinishItem(); isGrouping = false; } @@ -662,6 +663,7 @@ void OPENGL_GAL::ChangeGroupDepth( int aGroupNumber, int aDepth ) void OPENGL_GAL::DeleteGroup( int aGroupNumber ) { + // Frees memory in the container as well groups.erase( aGroupNumber ); } diff --git a/common/gal/opengl/vertex_manager.cpp b/common/gal/opengl/vertex_manager.cpp index 876a793241..65a80826f7 100644 --- a/common/gal/opengl/vertex_manager.cpp +++ b/common/gal/opengl/vertex_manager.cpp @@ -88,10 +88,15 @@ void VERTEX_MANAGER::SetItem( VERTEX_ITEM& aItem ) const } +void VERTEX_MANAGER::FinishItem() const +{ + m_container->FinishItem(); +} + + void VERTEX_MANAGER::FreeItem( VERTEX_ITEM& aItem ) const { - m_container->SetItem( &aItem ); - m_container->Erase(); + m_container->Delete( &aItem ); } diff --git a/common/view/view_item.cpp b/common/view/view_item.cpp index 94b4ccafe7..d7e563109b 100644 --- a/common/view/view_item.cpp +++ b/common/view/view_item.cpp @@ -137,9 +137,3 @@ void VIEW_ITEM::deleteGroups() m_groups = NULL; m_groupsSize = 0; } - - -bool VIEW_ITEM::storesGroups() const -{ - return ( m_groupsSize > 0 ); -} diff --git a/include/gal/opengl/cached_container.h b/include/gal/opengl/cached_container.h index 6409d34356..d770f9bc46 100644 --- a/include/gal/opengl/cached_container.h +++ b/include/gal/opengl/cached_container.h @@ -36,10 +36,8 @@ #include #include -#ifdef __WXDEBUG__ // Debug messages verbosity level -// #define CACHED_CONTAINER_TEST 2 -#endif +//#define CACHED_CONTAINER_TEST 1 namespace KiGfx { @@ -54,11 +52,14 @@ public: ///< @copydoc VERTEX_CONTAINER::SetItem() virtual void SetItem( VERTEX_ITEM* aItem ); + ///< @copydoc VERTEX_CONTAINER::FinishItem() + virtual void FinishItem(); + ///< @copydoc VERTEX_CONTAINER::Allocate() virtual VERTEX* Allocate( unsigned int aSize ); - ///< @copydoc VERTEX_CONTAINER::Erase() - virtual void Erase(); + ///< @copydoc VERTEX_CONTAINER::Delete() + virtual void Delete( VERTEX_ITEM* aItem ); ///< @copydoc VERTEX_CONTAINER::Clear() virtual void Clear(); @@ -130,14 +131,6 @@ protected: */ virtual bool resizeContainer( unsigned int aNewSize ); - /** - * Function freeItem() - * frees the space occupied by the item and returns it to the free space pool. - * - * @param aItem is the item to be freed. - */ - virtual void freeItem( VERTEX_ITEM* aItem ); - /** * Function getPowerOf2() * returns the nearest power of 2, bigger than aNumber. @@ -170,7 +163,7 @@ private: } /// Debug & test functions -#ifdef CACHED_CONTAINER_TEST +#if CACHED_CONTAINER_TEST > 0 void showFreeChunks(); void showReservedChunks(); void test(); diff --git a/include/gal/opengl/noncached_container.h b/include/gal/opengl/noncached_container.h index 0ff2f20a27..3cb6d1bf85 100644 --- a/include/gal/opengl/noncached_container.h +++ b/include/gal/opengl/noncached_container.h @@ -50,8 +50,8 @@ public: ///< @copydoc VERTEX_CONTAINER::Allocate() virtual VERTEX* Allocate( unsigned int aSize ); - ///< @copydoc VERTEX_CONTAINER::Erase() - virtual void Erase(); + ///< @copydoc VERTEX_CONTAINER::Delete() + void Delete( VERTEX_ITEM* aItem ) {}; ///< @copydoc VERTEX_CONTAINER::Clear() virtual void Clear(); diff --git a/include/gal/opengl/vertex_container.h b/include/gal/opengl/vertex_container.h index efca90b2f8..fb2a404846 100644 --- a/include/gal/opengl/vertex_container.h +++ b/include/gal/opengl/vertex_container.h @@ -54,6 +54,12 @@ public: */ virtual void SetItem( VERTEX_ITEM* aItem ) = 0; + /** + * Function FinishItem() + * does the cleaning after adding an item. + */ + virtual void FinishItem() {}; + /** * Function Allocate() * returns allocated space (possibly resizing the reserved memory chunk or allocating a new @@ -66,10 +72,12 @@ public: virtual VERTEX* Allocate( unsigned int aSize ) = 0; /** - * Function Erase() - * erases all vertices associated with the current item (set by SetItem()). + * Function Delete() + * erases the selected item. + * + * @param aItem is the item to be erased. */ - virtual void Erase() = 0; + virtual void Delete( VERTEX_ITEM* aItem ) = 0; /** * Function Clear() diff --git a/include/gal/opengl/vertex_manager.h b/include/gal/opengl/vertex_manager.h index bacb99867e..79f9dbd64b 100644 --- a/include/gal/opengl/vertex_manager.h +++ b/include/gal/opengl/vertex_manager.h @@ -232,6 +232,12 @@ public: */ void SetItem( VERTEX_ITEM& aItem ) const; + /** + * Function FinishItem() + * does the cleaning after adding an item. + */ + void FinishItem() const; + /** * Function FreeItem() * frees the memory occupied by the item, so it is no longer stored in the container. diff --git a/include/view/view_item.h b/include/view/view_item.h index 5200acb973..8004c4264b 100644 --- a/include/view/view_item.h +++ b/include/view/view_item.h @@ -70,8 +70,7 @@ public: ALL = 0xff }; - VIEW_ITEM() : m_view( NULL ), m_visible( true ), m_groups( NULL ), - m_groupsSize( 0 ) {} + VIEW_ITEM() : m_view( NULL ), m_visible( true ), m_groups( NULL ), m_groupsSize( 0 ) {} /** * Destructor. For dynamic views, removes the item from the view. @@ -236,7 +235,10 @@ protected: * * @returns true in case it is cached at least for one layer. */ - virtual bool storesGroups() const; + inline virtual bool storesGroups() const + { + return ( m_groupsSize > 0 ); + } /// Stores layer numbers used by the item. std::bitset m_layers; @@ -253,7 +255,7 @@ protected: m_layers.reset(); for( int i = 0; i < aCount; ++i ) - m_layers.set(aLayers[i]); + m_layers.set( aLayers[i] ); } }; From b57331f450100ce29b98fba6f8111bde8641eadd Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 12 Sep 2013 10:24:23 +0200 Subject: [PATCH 310/415] Move tool is activated when drag event starts nearby selected items. --- pcbnew/tools/selection_tool.cpp | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 63689482b5..ec4d661a24 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -111,8 +111,28 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) } else { - // Now user wants to drag the selected items - m_toolMgr->InvokeTool( "pcbnew.InteractiveMove" ); + bool runTool = false; + + // Check if dragging event started within the currently selected items bounding box + std::set::iterator it, it_end; + for( it = m_selectedItems.begin(), it_end = m_selectedItems.end(); it != it_end; ++it ) + { + BOX2I itemBox = (*it)->ViewBBox(); + itemBox.Inflate( 500000 ); // Give some margin for gripping an item + + if( itemBox.Contains( evt->Position() ) ) + { + // Click event occurred within a selected item bounding box + // -> user wants to drag selected items + runTool = true; + break; + } + } + + if( runTool ) + m_toolMgr->InvokeTool( "pcbnew.InteractiveMove" ); + else + clearSelection(); } } else if( dragging ) @@ -131,7 +151,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) { - if( m_selectedItems.find( aItem ) != m_selectedItems.end() ) + if( aItem->IsSelected() ) { aItem->ClearSelected(); m_selectedItems.erase( aItem ); From fcfbe920d5a2997cb3414e5a96dd65d23f54d855 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 12 Sep 2013 10:46:22 +0200 Subject: [PATCH 311/415] Removed selection disambiguation in case when there is a choice between a footprint and a smaller component (smaller components have priority). --- pcbnew/tools/selection_tool.cpp | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index ec4d661a24..277f7ccb2c 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -151,7 +151,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) { - if( aItem->IsSelected() ) + if( m_selectedItems.find( aItem ) != m_selectedItems.end() ) { aItem->ClearSelected(); m_selectedItems.erase( aItem ); @@ -204,9 +204,29 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) break; default: - item = disambiguationMenu( &collector ); - if( item ) - toggleSelection( item ); + // Remove footprints, they have to be selected by clicking on area that does not + // contain anything but footprint + for( int i = 0; i < collector.GetCount(); ++i ) + { + BOARD_ITEM* boardItem = ( collector )[i]; + if( boardItem->Type() == PCB_MODULE_T ) + { + wxLogDebug( wxT( "Removing %s" ), boardItem->GetSelectMenuText() ); + collector.Remove( i ); + } + } + + // Let's see if there is still disambiguation in selection.. + if( collector.GetCount() == 1 ) + { + toggleSelection( collector[0] ); + } + else + { + item = disambiguationMenu( &collector ); + if( item ) + toggleSelection( item ); + } break; } } @@ -326,7 +346,7 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) for( int i = 0; i < limit; ++i ) { wxString text; - BOARD_ITEM *item = ( *aCollector )[i]; + BOARD_ITEM* item = ( *aCollector )[i]; text = item->GetSelectMenuText(); m_menu->Add( text, i ); } From 9b2a45013388499460362f776077ebdf4d48946f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 12 Sep 2013 10:54:11 +0200 Subject: [PATCH 312/415] Fixed rollback of traces movement. --- pcbnew/tools/move_tool.cpp | 2 +- pcbnew/tools/move_tool.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp index f0783f6a40..f7839211c1 100644 --- a/pcbnew/tools/move_tool.cpp +++ b/pcbnew/tools/move_tool.cpp @@ -61,7 +61,7 @@ void MOVE_TOOL::Reset() } // the tool launches upon reception of activate ("pcbnew.InteractiveMove") - Go( &MOVE_TOOL::Main, TOOL_EVENT( TC_Command, TA_ActivateTool, GetName() ) ); //"pcbnew.InteractiveMove")); + Go( &MOVE_TOOL::Main, TOOL_EVENT( TC_Command, TA_ActivateTool, GetName() ) ); } diff --git a/pcbnew/tools/move_tool.h b/pcbnew/tools/move_tool.h index 1022230a69..1645237527 100644 --- a/pcbnew/tools/move_tool.h +++ b/pcbnew/tools/move_tool.h @@ -89,7 +89,8 @@ private: void RestorePosition() { - item->SetPosition( wxPoint( position.x, position.y ) ); + wxPoint curPosition = item->GetPosition(); + item->Move( wxPoint( position.x - curPosition.x, position.y - curPosition.y ) ); } void RestoreVisibility() From 802a0117a749f936a1f6c3a6f83c226b21c2bed3 Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Thu, 12 Sep 2013 11:35:42 +0200 Subject: [PATCH 313/415] COLOR4D: added Saturate(), FromHSV(), ToHSV() methods. Used in highlighting/routing code. --- common/gal/color4d.cpp | 102 +++++++++++++++++++++++++++++++++++++++++ include/gal/color4d.h | 9 ++++ 2 files changed, 111 insertions(+) diff --git a/common/gal/color4d.cpp b/common/gal/color4d.cpp index b28b4d1b68..bf93cfb736 100644 --- a/common/gal/color4d.cpp +++ b/common/gal/color4d.cpp @@ -58,3 +58,105 @@ const bool COLOR4D::operator!=( const COLOR4D& aColor ) { return a != aColor.a || r != aColor.r || g != aColor.g || b != aColor.b; } + +void COLOR4D::ToHSV(double& out_h, double& out_s, double& out_v) const +{ + double min, max, delta; + + min = r < g ? r : g; + min = min < b ? min : b; + + max = r > g ? r : g; + max = max > b ? max : b; + + out_v = max; // v + delta = max - min; + + if( max > 0.0 ) { + out_s = (delta / max); // s + } else { + // r = g = b = 0 // s = 0, v is undefined + out_s = 0.0; + out_h = NAN; // its now undefined + return; + } + if( r >= max ) // > is bogus, just keeps compilor happy + out_h = ( g - b ) / delta; // between yellow & magenta + else + if( g >= max ) + out_h = 2.0 + ( b - r ) / delta; // between cyan & yellow + else + out_h = 4.0 + ( r - g ) / delta; // between magenta & cyan + + out_h *= 60.0; // degrees + + if( out_h < 0.0 ) + out_h += 360.0; +} + +void COLOR4D::FromHSV(double in_h, double in_s, double in_v) +{ + double hh, p, q, t, ff; + long i; + + if(in_s <= 0.0) { // < is bogus, just shuts up warnings + r = in_v; + g = in_v; + b = in_v; + return; + } + hh = in_h; + if(hh >= 360.0) hh = 0.0; + hh /= 60.0; + i = (long)hh; + ff = hh - i; + p = in_v * (1.0 - in_s); + q = in_v * (1.0 - (in_s * ff)); + t = in_v * (1.0 - (in_s * (1.0 - ff))); + + switch(i) { + case 0: + r = in_v; + g = t; + b = p; + break; + case 1: + r = q; + g = in_v; + b = p; + break; + case 2: + r = p; + g = in_v; + b = t; + break; + + case 3: + r = p; + g = q; + b = in_v; + break; + case 4: + r = t; + g = p; + b = in_v; + break; + case 5: + default: + r = in_v; + g = p; + b = q; + break; + } + +} + +COLOR4D& COLOR4D::Saturate( double aFactor ) +{ + double h, s, v; + ToHSV(h, s, v); + FromHSV(h, aFactor, 1.0); + + return *this; +} + \ No newline at end of file diff --git a/include/gal/color4d.h b/include/gal/color4d.h index d89a629c47..2ee0ddfc41 100644 --- a/include/gal/color4d.h +++ b/include/gal/color4d.h @@ -118,6 +118,11 @@ public: return *this; } + /** + * Saturates the color to a given factor (in HSV model) + */ + COLOR4D& Saturate( double aFactor ); + /** * Function Brightened * Returns a color that is brighter by a given factor, without modifying object. @@ -167,6 +172,10 @@ public: return ( r * 0.299 + g * 0.587 + b * 0.117 ); } + void ToHSV(double& out_h, double& out_s, double& out_v) const; + void FromHSV(double in_h, double in_s, double in_v); + + /// @brief Equality operator, are two colors equal const bool operator==( const COLOR4D& aColor ); From c817deb652a23cf2146f57b56c963502c62924bc Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Thu, 12 Sep 2013 11:36:19 +0200 Subject: [PATCH 314/415] CONTEXT_MENU: null pointer check bugfix. --- common/tool/context_menu.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index a2247efe4d..98925eb704 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -47,7 +47,8 @@ public: else if( type == wxEVT_COMMAND_MENU_SELECTED ) evt = TOOL_EVENT( TC_Command, TA_ContextMenuChoice, aEvent.GetId() ); - m_menu->m_tool->GetManager()->ProcessEvent( evt ); + if(m_menu->m_tool) + m_menu->m_tool->GetManager()->ProcessEvent( evt ); } private: From 61778974a490c0788c50a7aafa25e94e95a51ee7 Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Thu, 12 Sep 2013 11:40:16 +0200 Subject: [PATCH 315/415] EDA_DRAW_PANEL_GAL: redraw stuff in a single place, with "coalescing" Redraws can be requested way too often than it is required. This commit adds redraw timeout: - if the view became dirty and there has been no redraw for longer than certain time, it is redrawed immediately - otherwise, we wait for the next frame This in general improves smoothness of rendering. --- common/drawpanel_gal.cpp | 33 ++++++++++++++++++++++++++++++-- common/view/wx_view_controls.cpp | 3 +-- include/class_drawpanel_gal.h | 7 +++++++ include/view/view.h | 5 +++++ 4 files changed, 44 insertions(+), 4 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index cb259aba39..9363e099f6 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -91,6 +91,11 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin Connect( wxEVT_KEY_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_KEY_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_ENTER_WINDOW, wxEventHandler (EDA_DRAW_PANEL_GAL::onEnter ), NULL, this ); + + + m_refreshTimer.SetOwner( this ); + Connect( wxEVT_TIMER, wxTimerEventHandler( EDA_DRAW_PANEL_GAL::onRefreshTimer ), NULL, this ); + this->SetFocus(); } @@ -113,6 +118,9 @@ EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL() void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) ) { + m_pendingRefresh = false; + m_lastRefresh = wxGetLocalTimeMillis(); + #ifdef __WXDEBUG__ prof_counter time; prof_start( &time, false ); @@ -147,13 +155,33 @@ void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent ) } -void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) +void EDA_DRAW_PANEL_GAL::onRefreshTimer( wxTimerEvent& aEvent ) { wxPaintEvent redrawEvent; wxPostEvent( this, redrawEvent ); } +void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) +{ + if(m_pendingRefresh) + return; + + wxLongLong t = wxGetLocalTimeMillis(); + wxLongLong delta = t - m_lastRefresh; + + if(t >= MinRefreshPeriod) + { + wxPaintEvent redrawEvent; + wxPostEvent( this, redrawEvent ); + m_pendingRefresh = true; + } else { + m_refreshTimer.Start ( (MinRefreshPeriod - t).ToLong(), true ); + m_pendingRefresh = true; + } +} + + void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) { // Do not do anything if the currently used GAL is correct @@ -208,7 +236,8 @@ void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent ) m_eventDispatcher->DispatchWxEvent( aEvent ); } - Refresh(); + if(m_view->IsDirty()) + Refresh(); } diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 838f5b82a0..5cbc97f9cf 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -196,8 +196,7 @@ void WX_VIEW_CONTROLS::onTimer( wxTimerEvent& aEvent ) dir = m_view->ToWorld( dir, false ); m_view->SetCenter( m_view->GetCenter() + dir * m_autoPanSpeed ); - - m_parentPanel->Refresh(); + m_view->MakeDirty(); } break; diff --git a/include/class_drawpanel_gal.h b/include/class_drawpanel_gal.h index 7daee84a6b..8d6a789db2 100644 --- a/include/class_drawpanel_gal.h +++ b/include/class_drawpanel_gal.h @@ -116,8 +116,15 @@ protected: void onSize( wxSizeEvent& aEvent ); void onEvent( wxEvent& aEvent ); void onEnter( wxEvent& aEvent ); + void onRefreshTimer ( wxTimerEvent& aEvent ); void skipEvent( wxEvent& aEvent ); + static const int MinRefreshPeriod = 17; ///< 60 FPS. + + wxLongLong m_lastRefresh; ///< Last time the panel was refreshed + bool m_pendingRefresh; + wxTimer m_refreshTimer; + KiGfx::GAL* m_gal; ///< Interface for drawing objects on a 2D-surface KiGfx::VIEW* m_view; ///< Stores view settings (scale, center, etc.) ///< and items to be drawn diff --git a/include/view/view.h b/include/view/view.h index 29cb5ecb0e..dbbdd60744 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -443,6 +443,11 @@ public: return ( m_layers.at( aLayer ).target == TARGET_CACHED ); } + void MakeDirty() + { + for(int i = 0; i < TARGETS_NUMBER; i++) + m_dirtyTargets[i] = true; + } static const int VIEW_MAX_LAYERS = 128; ///* maximum number of layers that may be shown From 73949712f6afa9a59b3f45163aae0b18bccb30b3 Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Thu, 12 Sep 2013 11:49:24 +0200 Subject: [PATCH 316/415] added note why there's no P&S sources yet... --- pcbnew/router/readme.txt | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 pcbnew/router/readme.txt diff --git a/pcbnew/router/readme.txt b/pcbnew/router/readme.txt new file mode 100644 index 0000000000..933b93a817 --- /dev/null +++ b/pcbnew/router/readme.txt @@ -0,0 +1,4 @@ +You'll see the P&S router sources here, but just not right now. +We are still dealing with some non-technical issues that should be solved by the next week. + +Tom \ No newline at end of file From 7d41dc16164ace37f30cccebb9a8cb435b92c12e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 12 Sep 2013 18:24:53 +0200 Subject: [PATCH 317/415] Currently selected layer is displayed on the top. --- common/tool/tool_dispatcher.cpp | 2 - common/view/view.cpp | 6 +- include/wxPcbStruct.h | 18 ++-- pcbnew/class_pcb_layer_widget.cpp | 4 +- pcbnew/deltrack.cpp | 4 +- pcbnew/dialogs/dialog_general_options.cpp | 4 +- pcbnew/dialogs/dialog_global_deletion.cpp | 2 +- pcbnew/dialogs/dialog_layers_setup.cpp | 10 +- pcbnew/dimension.cpp | 2 +- pcbnew/edit.cpp | 20 ++-- pcbnew/editedge.cpp | 4 +- pcbnew/editrack-part2.cpp | 12 +-- pcbnew/hotkeys_board_editor.cpp | 10 +- pcbnew/onleftclick.cpp | 6 +- pcbnew/pcbframe.cpp | 117 +++++++++++++++------- pcbnew/tool_pcb.cpp | 2 +- pcbnew/toolbars_update_user_interface.cpp | 2 +- pcbnew/zones_by_polygon.cpp | 8 +- 18 files changed, 139 insertions(+), 94 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 018e54b566..eb3b777b20 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -217,8 +217,6 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) type == wxEVT_MIDDLE_DOWN || type == wxEVT_MIDDLE_UP || type == wxEVT_RIGHT_DOWN || type == wxEVT_RIGHT_UP ) { - wxMouseEvent* me = static_cast( &aEvent ); - pos = getView()->ToWorld ( getCurrentMousePos() ); if( pos != m_lastMousePos ) { diff --git a/common/view/view.cpp b/common/view/view.cpp index ac72ab9157..a24b7ac4e5 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -41,7 +41,7 @@ using namespace KiGfx; VIEW::VIEW( bool aIsDynamic ) : - m_enableOrderModifier( false ), + m_enableOrderModifier( true ), m_scale( 1.0 ), m_painter( NULL ), m_gal( NULL ), @@ -415,6 +415,8 @@ void VIEW::UpdateAllLayersColor() updateItemsColor visitor( l->id, m_painter, m_gal ); l->items->Query( r, visitor ); } + + MarkDirty(); } @@ -525,6 +527,8 @@ void VIEW::UpdateAllLayersOrder() { ChangeLayerDepth( l.first, l.second.renderingOrder ); } + + MarkDirty(); } diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index af93d93bf0..2110eb75d9 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -136,21 +136,13 @@ protected: * will change the currently active layer to \a aLayer and also * update the PCB_LAYER_WIDGET. */ - void setActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate = true ) - { - ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer = aLayer; - - setHighContrastLayer( aLayer ); - - if( doLayerWidgetUpdate ) - syncLayerWidgetLayer(); - } + void setCurrentLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate = true ); /** * Function getActiveLayer * returns the active layer */ - LAYER_NUM getActiveLayer() + LAYER_NUM getCurrentLayer() { return ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer; } @@ -161,6 +153,12 @@ protected: */ void setHighContrastLayer( LAYER_NUM aLayer ); + /** + * Function setTopLayer + * moves the selected layer to the top, so it is displayed above all others. + */ + void setTopLayer( LAYER_NUM aLayer ); + /** * Function syncLayerWidgetLayer * updates the currently layer "selection" within the PCB_LAYER_WIDGET. diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index 07b46f4fa9..e334c05d59 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -183,7 +183,7 @@ void PCB_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event ) if( IsCopperLayer( layer ) ) { bool loc_visible = visible; - if( force_active_layer_visible && (layer == myframe->getActiveLayer() ) ) + if( force_active_layer_visible && (layer == myframe->getCurrentLayer() ) ) loc_visible = true; cb->SetValue( loc_visible ); @@ -354,7 +354,7 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer ) { // the layer change from the PCB_LAYER_WIDGET can be denied by returning // false from this function. - myframe->setActiveLayer( aLayer, false ); + myframe->setCurrentLayer( aLayer, false ); if( m_alwaysShowActiveCopperLayer ) OnLayerSelected(); diff --git a/pcbnew/deltrack.cpp b/pcbnew/deltrack.cpp index 2a77f9faec..6833543db9 100644 --- a/pcbnew/deltrack.cpp +++ b/pcbnew/deltrack.cpp @@ -53,7 +53,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack ) { if( g_CurrentTrackList.GetCount() > 0 ) { - LAYER_NUM previous_layer = getActiveLayer(); + LAYER_NUM previous_layer = getCurrentLayer(); DBG( g_CurrentTrackList.VerifyListIntegrity(); ) @@ -86,7 +86,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack ) // Correct active layer which could change if a via // has been erased - setActiveLayer( previous_layer ); + setCurrentLayer( previous_layer ); UpdateStatusBar(); diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index 37854ac88f..2d10c8d6ea 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -238,8 +238,8 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) // Apply new display options to the GAL canvas (this is faster than recaching) settings->LoadDisplayOptions( DisplayOpt ); - setHighContrastLayer( getActiveLayer() ); - m_galCanvas->GetView()->EnableTopLayer( state ); + setHighContrastLayer( getCurrentLayer() ); +// m_galCanvas->GetView()->EnableTopLayer( state ); if( m_galCanvasActive ) m_galCanvas->Refresh(); diff --git a/pcbnew/dialogs/dialog_global_deletion.cpp b/pcbnew/dialogs/dialog_global_deletion.cpp index 3048f5b7c0..7812296232 100644 --- a/pcbnew/dialogs/dialog_global_deletion.cpp +++ b/pcbnew/dialogs/dialog_global_deletion.cpp @@ -37,7 +37,7 @@ DIALOG_GLOBAL_DELETION::DIALOG_GLOBAL_DELETION( PCB_EDIT_FRAME* parent ) void PCB_EDIT_FRAME::InstallPcbGlobalDeleteFrame( const wxPoint& pos ) { DIALOG_GLOBAL_DELETION dlg( this ); - dlg.SetCurrentLayer( getActiveLayer() ); + dlg.SetCurrentLayer( getCurrentLayer() ); dlg.ShowModal(); } diff --git a/pcbnew/dialogs/dialog_layers_setup.cpp b/pcbnew/dialogs/dialog_layers_setup.cpp index d06f501394..ab8f18c97e 100644 --- a/pcbnew/dialogs/dialog_layers_setup.cpp +++ b/pcbnew/dialogs/dialog_layers_setup.cpp @@ -669,11 +669,11 @@ void PCB_EDIT_FRAME::InstallDialogLayerSetup() if( dlg.ShowModal() == wxID_CANCEL ) return; - wxLogDebug( wxT( "Current layer selected %d." ), getActiveLayer() ); + wxLogDebug( wxT( "Current layer selected %d." ), getCurrentLayer() ); // If the current active layer was removed, find the next avaiable layer to set as the // active layer. - if( !( GetLayerMask( getActiveLayer() ) & GetBoard()->GetEnabledLayers() ) ) + if( !( GetLayerMask( getCurrentLayer() ) & GetBoard()->GetEnabledLayers() ) ) { for( LAYER_NUM i = FIRST_LAYER; i < NB_LAYERS; ++i ) { @@ -684,14 +684,14 @@ void PCB_EDIT_FRAME::InstallDialogLayerSetup() if( GetLayerMask( tmp ) & GetBoard()->GetEnabledLayers() ) { - wxLogDebug( wxT( "Setting current layer to %d." ), getActiveLayer() ); - setActiveLayer( tmp, true ); + wxLogDebug( wxT( "Setting current layer to %d." ), getCurrentLayer() ); + setCurrentLayer( tmp, true ); break; } } } else { - setActiveLayer( getActiveLayer(), true ); + setCurrentLayer( getCurrentLayer(), true ); } } diff --git a/pcbnew/dimension.cpp b/pcbnew/dimension.cpp index 391addb6f9..bf72fdfc8a 100644 --- a/pcbnew/dimension.cpp +++ b/pcbnew/dimension.cpp @@ -245,7 +245,7 @@ DIMENSION* PCB_EDIT_FRAME::EditDimension( DIMENSION* aDimension, wxDC* aDC ) aDimension = new DIMENSION( GetBoard() ); aDimension->SetFlags( IS_NEW ); - aDimension->SetLayer( getActiveLayer() ); + aDimension->SetLayer( getCurrentLayer() ); aDimension->m_crossBarO = aDimension->m_crossBarF = pos; aDimension->m_featureLineDO = aDimension->m_featureLineDF = pos; diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 47e60041ba..65974bc83b 100755 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -917,10 +917,10 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_POPUP_PCB_SELECT_LAYER: - itmp = SelectLayer( getActiveLayer(), UNDEFINED_LAYER, UNDEFINED_LAYER ); + itmp = SelectLayer( getCurrentLayer(), UNDEFINED_LAYER, UNDEFINED_LAYER ); if( itmp >= 0 ) - setActiveLayer( itmp ); + setCurrentLayer( itmp ); m_canvas->MoveCursorToCrossHair(); break; @@ -930,19 +930,19 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_POPUP_PCB_SELECT_NO_CU_LAYER: - itmp = SelectLayer( getActiveLayer(), FIRST_NON_COPPER_LAYER, UNDEFINED_LAYER ); + itmp = SelectLayer( getCurrentLayer(), FIRST_NON_COPPER_LAYER, UNDEFINED_LAYER ); if( itmp >= 0 ) - setActiveLayer( itmp ); + setCurrentLayer( itmp ); m_canvas->MoveCursorToCrossHair(); break; case ID_POPUP_PCB_SELECT_CU_LAYER: - itmp = SelectLayer( getActiveLayer(), UNDEFINED_LAYER, LAST_COPPER_LAYER ); + itmp = SelectLayer( getCurrentLayer(), UNDEFINED_LAYER, LAST_COPPER_LAYER ); if( itmp >= 0 ) - setActiveLayer( itmp ); + setCurrentLayer( itmp ); break; @@ -952,7 +952,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_TOOLBARH_PCB_SELECT_LAYER: - setActiveLayer( m_SelLayerBox->GetLayerSelection() ); + setCurrentLayer( m_SelLayerBox->GetLayerSelection() ); if( DisplayOpt.ContrastModeDisplay ) m_canvas->Refresh( true ); @@ -1240,7 +1240,7 @@ void PCB_EDIT_FRAME::RemoveStruct( BOARD_ITEM* Item, wxDC* DC ) void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) { - LAYER_NUM curLayer = getActiveLayer(); + LAYER_NUM curLayer = getCurrentLayer(); // Check if the specified layer matches the present layer if( layer == curLayer ) @@ -1282,7 +1282,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) GetScreen()->m_Route_Layer_TOP = curLayer; GetScreen()->m_Route_Layer_BOTTOM = layer; - setActiveLayer( curLayer ); + setCurrentLayer( curLayer ); if( Other_Layer_Route( (TRACK*) GetScreen()->GetCurItem(), DC ) ) { @@ -1303,7 +1303,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) // and a non-copper layer, or vice-versa? // ... - setActiveLayer( layer ); + setCurrentLayer( layer ); if( DisplayOpt.ContrastModeDisplay ) RefreshCanvas(); diff --git a/pcbnew/editedge.cpp b/pcbnew/editedge.cpp index acc881c687..1bc862c958 100644 --- a/pcbnew/editedge.cpp +++ b/pcbnew/editedge.cpp @@ -246,7 +246,7 @@ DRAWSEGMENT* PCB_EDIT_FRAME::Begin_DrawSegment( DRAWSEGMENT* Segment, STROKE_T s s_large = GetDesignSettings().m_DrawSegmentWidth; - if( getActiveLayer() == EDGE_N ) + if( getCurrentLayer() == EDGE_N ) { s_large = GetDesignSettings().m_EdgeSegmentWidth; } @@ -255,7 +255,7 @@ DRAWSEGMENT* PCB_EDIT_FRAME::Begin_DrawSegment( DRAWSEGMENT* Segment, STROKE_T s { SetCurItem( Segment = new DRAWSEGMENT( GetBoard() ) ); Segment->SetFlags( IS_NEW ); - Segment->SetLayer( getActiveLayer() ); + Segment->SetLayer( getCurrentLayer() ); Segment->SetWidth( s_large ); Segment->SetShape( shape ); Segment->SetAngle( 900 ); diff --git a/pcbnew/editrack-part2.cpp b/pcbnew/editrack-part2.cpp index e36a3a92a1..40c5f73eb3 100644 --- a/pcbnew/editrack-part2.cpp +++ b/pcbnew/editrack-part2.cpp @@ -52,10 +52,10 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) if( aTrack == NULL ) { - if( getActiveLayer() != ((PCB_SCREEN*)GetScreen())->m_Route_Layer_TOP ) - setActiveLayer( ((PCB_SCREEN*)GetScreen())->m_Route_Layer_TOP ); + if( getCurrentLayer() != ((PCB_SCREEN*)GetScreen())->m_Route_Layer_TOP ) + setCurrentLayer( ((PCB_SCREEN*)GetScreen())->m_Route_Layer_TOP ); else - setActiveLayer(((PCB_SCREEN*)GetScreen())->m_Route_Layer_BOTTOM ); + setCurrentLayer(((PCB_SCREEN*)GetScreen())->m_Route_Layer_BOTTOM ); UpdateStatusBar(); return true; @@ -109,7 +109,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) via->SetLayerPair( LAYER_N_BACK, LAYER_N_FRONT ); via->SetDrill( GetBoard()->GetCurrentViaDrill() ); - LAYER_NUM first_layer = getActiveLayer(); + LAYER_NUM first_layer = getCurrentLayer(); LAYER_NUM last_layer; // prepare switch to new active layer: @@ -172,7 +172,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) return false; } - setActiveLayer( last_layer ); + setCurrentLayer( last_layer ); TRACK* lastNonVia = g_CurrentTrackSegment; @@ -194,7 +194,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) */ // set the layer to the new value - track->SetLayer( getActiveLayer() ); + track->SetLayer( getCurrentLayer() ); /* the start point is the via position and the end point is the cursor * which also is on the via (will change when moving mouse) diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index 30b07f55b2..eeedca4df2 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -243,7 +243,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit break; case HK_SWITCH_LAYER_TO_PREVIOUS: - ll = getActiveLayer(); + ll = getCurrentLayer(); if( (ll <= LAYER_N_BACK) || (ll > LAYER_N_FRONT) ) break; @@ -259,7 +259,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit break; case HK_SWITCH_LAYER_TO_NEXT: - ll = getActiveLayer(); + ll = getCurrentLayer(); if( (ll < LAYER_N_BACK) || (ll >= LAYER_N_FRONT) ) break; @@ -365,7 +365,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit break; case HK_BACK_SPACE: - if( /*m_ID_current_state == ID_TRACK_BUTT &&*/ (getActiveLayer() <= LAYER_N_FRONT) ) + if( /*m_ID_current_state == ID_TRACK_BUTT &&*/ (getCurrentLayer() <= LAYER_N_FRONT) ) { if( !itemCurrentlyEdited ) { @@ -572,7 +572,7 @@ bool PCB_EDIT_FRAME::OnHotkeyDeleteItem( wxDC* aDC ) switch( GetToolId() ) { case ID_TRACK_BUTT: - if( getActiveLayer() > LAYER_N_FRONT ) + if( getCurrentLayer() > LAYER_N_FRONT ) return false; if( ItemFree ) @@ -941,7 +941,7 @@ bool PCB_EDIT_FRAME::OnHotkeyPlaceItem( wxDC* aDC ) */ TRACK * PCB_EDIT_FRAME::OnHotkeyBeginRoute( wxDC* aDC ) { - if( getActiveLayer() > LAYER_N_FRONT ) + if( getCurrentLayer() > LAYER_N_FRONT ) return NULL; bool itemCurrentlyEdited = (GetCurItem() && GetCurItem()->GetFlags()); diff --git a/pcbnew/onleftclick.cpp b/pcbnew/onleftclick.cpp index f655b1a6a0..62e11ddacb 100644 --- a/pcbnew/onleftclick.cpp +++ b/pcbnew/onleftclick.cpp @@ -243,7 +243,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) if( GetToolId() == ID_PCB_ARC_BUTT ) shape = S_ARC; - if( IsCopperLayer( getActiveLayer() ) ) + if( IsCopperLayer( getCurrentLayer() ) ) { DisplayError( this, _( "Graphic not allowed on Copper layers" ) ); break; @@ -267,7 +267,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) break; case ID_TRACK_BUTT: - if( !IsCopperLayer( getActiveLayer() ) ) + if( !IsCopperLayer( getCurrentLayer() ) ) { DisplayError( this, _( "Tracks on Copper layers only " ) ); break; @@ -367,7 +367,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) break; case ID_PCB_DIMENSION_BUTT: - if( IsCopperLayer( getActiveLayer() ) ) + if( IsCopperLayer( getCurrentLayer() ) ) { DisplayError( this, _( "Dimension not allowed on Copper layers" ) ); break; diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index bc257d29cc..b970df681f 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -730,7 +730,7 @@ void PCB_EDIT_FRAME::SetGridColor(EDA_COLOR_T aColor) bool PCB_EDIT_FRAME::IsMicroViaAcceptable( void ) { int copperlayercnt = GetBoard()->GetCopperLayerCount( ); - LAYER_NUM currLayer = getActiveLayer(); + LAYER_NUM currLayer = getCurrentLayer(); if( !GetDesignSettings().m_MicroViasAllowed ) return false; // Obvious.. @@ -754,55 +754,100 @@ void PCB_EDIT_FRAME::setHighContrastLayer( LAYER_NUM aLayer ) KiGfx::VIEW* view = m_galCanvas->GetView(); KiGfx::RENDER_SETTINGS* rSettings = view->GetPainter()->GetSettings(); -// if( DisplayOpt.ContrastModeDisplay ) + setTopLayer( aLayer ); + + rSettings->ClearActiveLayers(); + rSettings->SetActiveLayer( aLayer ); + + if( IsCopperLayer( aLayer ) ) { - view->ClearTopLayers(); - view->SetTopLayer( aLayer ); + // Bring some other layers to the front in case of copper layers and make them colored + // fixme do not like the idea of storing the list of layers here, + // should be done in some other way I guess.. + LAYER_NUM layers[] = { + GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIAS_VISIBLE ), + ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), + ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ) + }; - rSettings->ClearActiveLayers(); - rSettings->SetActiveLayer( aLayer ); + for( unsigned int i = 0; i < sizeof( layers ) / sizeof( LAYER_NUM ); ++i ) + rSettings->SetActiveLayer( layers[i] ); - if( IsCopperLayer( aLayer ) ) + // Pads should be shown too + if( aLayer == FIRST_COPPER_LAYER ) { - // Bring some other layers to the front in case of copper layers and make them colored - LAYER_NUM layers[] = { - GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIAS_VISIBLE ), - ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), - ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ) - }; + rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); + rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ) ); + } + else if( aLayer == LAST_COPPER_LAYER ) + { + rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); + rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ) ); + } + } - for( unsigned int i = 0; i < sizeof( layers ) / sizeof( LAYER_NUM ); ++i ) - { - view->SetTopLayer( layers[i] ); - rSettings->SetActiveLayer( layers[i] ); - } + view->UpdateAllLayersColor(); +} - // Pads should be shown too - if( aLayer == FIRST_COPPER_LAYER ) - { - view->SetTopLayer( ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); - view->SetTopLayer( ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ) ); - rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); - rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ) ); - } - else if( aLayer == LAST_COPPER_LAYER ) - { - view->SetTopLayer( ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); - view->SetTopLayer( ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ) ); - rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); - rSettings->SetActiveLayer( ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ) ); - } + +void PCB_EDIT_FRAME::setTopLayer( LAYER_NUM aLayer ) +{ + // Set display settings for high contrast mode + KiGfx::VIEW* view = m_galCanvas->GetView(); + + view->ClearTopLayers(); + view->SetTopLayer( aLayer ); + + if( IsCopperLayer( aLayer ) ) + { + // Bring some other layers to the front in case of copper layers and make them colored + // fixme do not like the idea of storing the list of layers here, + // should be done in some other way I guess.. + LAYER_NUM layers[] = { + GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIAS_VISIBLE ), + ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), + ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ) + }; + + for( unsigned int i = 0; i < sizeof( layers ) / sizeof( LAYER_NUM ); ++i ) + { + view->SetTopLayer( layers[i] ); } - view->UpdateAllLayersOrder(); - view->UpdateAllLayersColor(); + // Pads should be shown too + if( aLayer == FIRST_COPPER_LAYER ) + { + view->SetTopLayer( ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); + view->SetTopLayer( ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ) ); + } + else if( aLayer == LAST_COPPER_LAYER ) + { + view->SetTopLayer( ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); + view->SetTopLayer( ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ) ); + } } + + view->UpdateAllLayersOrder(); +} + + +void PCB_EDIT_FRAME::setCurrentLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate ) +{ + ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer = aLayer; + + setHighContrastLayer( aLayer ); + + if( doLayerWidgetUpdate ) + syncLayerWidgetLayer(); + + if( m_galCanvasActive ) + m_galCanvas->Refresh(); } void PCB_EDIT_FRAME::syncLayerWidgetLayer() { - m_Layers->SelectLayer( getActiveLayer() ); + m_Layers->SelectLayer( getCurrentLayer() ); m_Layers->OnLayerSelected(); } diff --git a/pcbnew/tool_pcb.cpp b/pcbnew/tool_pcb.cpp index 5b6fe3b95f..533106bf9b 100644 --- a/pcbnew/tool_pcb.cpp +++ b/pcbnew/tool_pcb.cpp @@ -105,7 +105,7 @@ void PCB_EDIT_FRAME::PrepareLayerIndicator() previous_Route_Layer_BOTTOM_color, previous_via_color; /* get colors, and redraw bitmap button only on changes */ - active_layer_color = GetBoard()->GetLayerColor(getActiveLayer()); + active_layer_color = GetBoard()->GetLayerColor(getCurrentLayer()); if( previous_active_layer_color != active_layer_color ) { diff --git a/pcbnew/toolbars_update_user_interface.cpp b/pcbnew/toolbars_update_user_interface.cpp index 23d850d2b1..bd77618169 100644 --- a/pcbnew/toolbars_update_user_interface.cpp +++ b/pcbnew/toolbars_update_user_interface.cpp @@ -96,7 +96,7 @@ void PCB_EDIT_FRAME::OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent ) void PCB_EDIT_FRAME::OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent ) { - m_SelLayerBox->SetLayerSelection( getActiveLayer() ); + m_SelLayerBox->SetLayerSelection( getCurrentLayer() ); } diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index 8973ffccb3..05d57bd5bb 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -518,7 +518,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) if( !GetBoard()->m_CurrentZoneContour ) { if( GetToolId() == ID_PCB_KEEPOUT_AREA_BUTT && - getActiveLayer() >= FIRST_NON_COPPER_LAYER ) + getCurrentLayer() >= FIRST_NON_COPPER_LAYER ) { DisplayError( this, _( "Error: a keepout area is allowed only on copper layers" ) ); @@ -537,7 +537,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) ZONE_EDIT_T edited; // Init zone params to reasonable values - zone->SetLayer( getActiveLayer() ); + zone->SetLayer( getCurrentLayer() ); // Prompt user for parameters: m_canvas->SetIgnoreMouseEvents( true ); @@ -602,7 +602,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) return 0; // Switch active layer to the selected zone layer - setActiveLayer( zoneInfo.m_CurrentZone_Layer ); + setCurrentLayer( zoneInfo.m_CurrentZone_Layer ); SetZoneSettings( zoneInfo ); } @@ -612,7 +612,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) // zone (add cutout or similar zone) zoneInfo.m_CurrentZone_Layer = s_CurrentZone->GetLayer(); - setActiveLayer( s_CurrentZone->GetLayer() ); + setCurrentLayer( s_CurrentZone->GetLayer() ); zoneInfo << *s_CurrentZone; From 87d81a6d920cc4d8aa146f893486d30f6d8f4c0e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 13 Sep 2013 10:26:08 +0200 Subject: [PATCH 318/415] Mouse movement events are sent during autopanning, as the cursor position changes in the world coordinates (even if it stays still in the screen coordinates). It allows tools to update their state, as if the mouse was moved. --- common/drawpanel_gal.cpp | 9 ++++++--- common/tool/tool_dispatcher.cpp | 7 +++++-- common/view/wx_view_controls.cpp | 5 ++++- include/tool/tool_dispatcher.h | 3 +++ 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index fa0b004e49..2d169b37db 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -87,10 +87,12 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin Connect( wxEVT_MIDDLE_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_MIDDLE_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_MOUSEWHEEL, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); -// Connect( wxEVT_CHAR_HOOK, wxEventHandler( EDA_DRAW_PANEL_GAL::skipEvent ) ); + Connect( wxEVT_CHAR_HOOK, wxEventHandler( EDA_DRAW_PANEL_GAL::skipEvent ) ); Connect( wxEVT_KEY_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_KEY_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); -// Connect( wxEVT_ENTER_WINDOW, wxEventHandler( EDA_DRAW_PANEL_GAL::onEnter ), NULL, this ); + Connect( wxEVT_ENTER_WINDOW, wxEventHandler( EDA_DRAW_PANEL_GAL::onEnter ), NULL, this ); + Connect( TOOL_DISPATCHER::EVT_REFRESH_MOUSE, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), + NULL, this ); m_refreshTimer.SetOwner( this ); Connect( wxEVT_TIMER, wxTimerEventHandler( EDA_DRAW_PANEL_GAL::onRefreshTimer ), NULL, this ); @@ -243,8 +245,9 @@ void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent ) } -void EDA_DRAW_PANEL_GAL::onEnter ( wxEvent& aEvent ) +void EDA_DRAW_PANEL_GAL::onEnter( wxEvent& aEvent ) { + // Getting focus is necessary in order to receive key events properly SetFocus(); } diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index eb3b777b20..03ff9ef9b3 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -41,6 +41,8 @@ using boost::optional; +const wxEventType TOOL_DISPATCHER::EVT_REFRESH_MOUSE = wxNewEventType(); + struct TOOL_DISPATCHER::ButtonState { ButtonState( TOOL_MouseButtons aButton, const wxEventType& aDownEvent, @@ -215,10 +217,11 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) if( type == wxEVT_MOTION || type == wxEVT_MOUSEWHEEL || type == wxEVT_LEFT_DOWN || type == wxEVT_LEFT_UP || type == wxEVT_MIDDLE_DOWN || type == wxEVT_MIDDLE_UP || - type == wxEVT_RIGHT_DOWN || type == wxEVT_RIGHT_UP ) + type == wxEVT_RIGHT_DOWN || type == wxEVT_RIGHT_UP || + type == EVT_REFRESH_MOUSE ) { pos = getView()->ToWorld ( getCurrentMousePos() ); - if( pos != m_lastMousePos ) + if( pos != m_lastMousePos || type == EVT_REFRESH_MOUSE ) { motion = true; m_lastMousePos = pos; diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 838f5b82a0..1349948501 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -28,6 +28,7 @@ #include #include #include +#include using namespace KiGfx; @@ -197,7 +198,9 @@ void WX_VIEW_CONTROLS::onTimer( wxTimerEvent& aEvent ) dir = m_view->ToWorld( dir, false ); m_view->SetCenter( m_view->GetCenter() + dir * m_autoPanSpeed ); - m_parentPanel->Refresh(); + // Notify tools that the cursor position has changed in the world coordinates + wxCommandEvent moveEvent( TOOL_DISPATCHER::EVT_REFRESH_MOUSE ); + wxPostEvent( m_parentPanel, moveEvent ); } break; diff --git a/include/tool/tool_dispatcher.h b/include/tool/tool_dispatcher.h index ae1db0c4d2..f5b7bacae0 100644 --- a/include/tool/tool_dispatcher.h +++ b/include/tool/tool_dispatcher.h @@ -65,6 +65,9 @@ public: virtual void DispatchWxEvent( wxEvent& aEvent ); virtual void DispatchWxCommand( wxCommandEvent& aEvent ); + /// Event that forces mouse move event in the dispatcher + static const wxEventType EVT_REFRESH_MOUSE; + private: static const int MouseButtonCount = 3; static const int DragTimeThreshold = 300; From 404bfdcf306299a878efc4569610cd072e421561 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 13 Sep 2013 11:28:47 +0200 Subject: [PATCH 319/415] Changed VIEW::PrepareTargets() to more appropriate name VIEW::ClearTargets(). Added SELECTION layer to always-on-top list. --- common/drawpanel_gal.cpp | 5 ++--- common/view/view.cpp | 2 +- include/view/view.h | 4 ++-- pcbnew/pcbframe.cpp | 6 ++++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 2d169b37db..7087d1e86d 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -131,7 +131,7 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) ) m_gal->SetBackgroundColor( KiGfx::COLOR4D( 0.0, 0.0, 0.0, 1.0 ) ); m_gal->ClearScreen(); - m_view->PrepareTargets(); + m_view->ClearTargets(); // Grid has to be redrawn only when the NONCACHED target is redrawn if( m_view->IsTargetDirty( KiGfx::TARGET_NONCACHED ) ) m_gal->DrawGrid(); @@ -240,8 +240,7 @@ void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent ) m_eventDispatcher->DispatchWxEvent( aEvent ); } -// if( m_view->IsDirty() ) - Refresh(); + Refresh(); } diff --git a/common/view/view.cpp b/common/view/view.cpp index a24b7ac4e5..8531688714 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -714,7 +714,7 @@ void VIEW::Clear() } -void VIEW::PrepareTargets() +void VIEW::ClearTargets() { if( IsTargetDirty( TARGET_CACHED ) || IsTargetDirty( TARGET_NONCACHED ) ) { diff --git a/include/view/view.h b/include/view/view.h index c5146d3540..8d4329b3d9 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -377,10 +377,10 @@ public: void UpdateAllLayersOrder(); /** - * Function PrepareTargets() + * Function ClearTargets() * Clears targets that are marked as dirty. */ - void PrepareTargets(); + void ClearTargets(); /** * Function Redraw() diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index b970df681f..bf15c21989 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -767,7 +767,8 @@ void PCB_EDIT_FRAME::setHighContrastLayer( LAYER_NUM aLayer ) LAYER_NUM layers[] = { GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), - ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ) + ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), + ITEM_GAL_LAYER( SELECTION ) }; for( unsigned int i = 0; i < sizeof( layers ) / sizeof( LAYER_NUM ); ++i ) @@ -806,7 +807,8 @@ void PCB_EDIT_FRAME::setTopLayer( LAYER_NUM aLayer ) LAYER_NUM layers[] = { GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), - ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ) + ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), + ITEM_GAL_LAYER( SELECTION ) }; for( unsigned int i = 0; i < sizeof( layers ) / sizeof( LAYER_NUM ); ++i ) From fa57fee9bbdfd99fc8ce3a31d11ca7a24d987fd9 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 13 Sep 2013 11:38:16 +0200 Subject: [PATCH 320/415] Removed VIEW_LAYER.isDirty flag. --- common/view/view.cpp | 20 ++++---------------- include/view/view.h | 1 - 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 8531688714..4409806c3c 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -80,7 +80,6 @@ void VIEW::AddLayer( int aLayer, bool aDisplayOnly ) m_layers[aLayer].items = new VIEW_RTREE(); m_layers[aLayer].renderingOrder = aLayer; m_layers[aLayer].enabled = true; - m_layers[aLayer].isDirty = false; m_layers[aLayer].displayOnly = aDisplayOnly; m_layers[aLayer].target = TARGET_CACHED; } @@ -100,7 +99,7 @@ void VIEW::Add( VIEW_ITEM* aItem ) { VIEW_LAYER& l = m_layers[layers[i]]; l.items->Insert( aItem ); - l.isDirty = true; + MarkTargetDirty( l.target ); } if( m_dynamic ) @@ -120,7 +119,6 @@ void VIEW::Remove( VIEW_ITEM* aItem ) { VIEW_LAYER& l = m_layers[layers[i]]; l.items->Remove( aItem ); - l.isDirty = true; } } @@ -568,8 +566,6 @@ void VIEW::redrawRect( const BOX2I& aRect ) m_gal->SetLayerDepth( l->renderingOrder ); l->items->Query( aRect, drawFunc ); } - - l->isDirty = false; } } @@ -815,8 +811,7 @@ void VIEW::invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ) } // Mark those layers as dirty, so the VIEW will be refreshed - m_layers[layerId].isDirty = true; - MarkTargetDirty( m_layers[layerId].target ); // TODO remove? + MarkTargetDirty( m_layers[layerId].target ); } } @@ -876,7 +871,7 @@ void VIEW::updateBbox( VIEW_ITEM* aItem ) VIEW_LAYER& l = m_layers[layers[i]]; l.items->Remove( aItem ); l.items->Insert( aItem ); - l.isDirty = true; + MarkTargetDirty( l.target ); } } @@ -920,7 +915,7 @@ void VIEW::RecacheAllItems( bool aImmediately ) m_gal->SetLayerDepth( l->renderingOrder ); recacheLayer visitor( this, m_gal, l->id, aImmediately ); l->items->Query( r, visitor ); - l->isDirty = true; + MarkTargetDirty( l->target ); } } @@ -941,12 +936,5 @@ bool VIEW::IsTargetDirty( int aTarget ) const if( m_dirtyTargets[aTarget] ) return true; - // Check if any of layers belonging to the target is dirty - BOOST_FOREACH( VIEW_LAYER* l, m_orderedLayers ) - { - if( l->target == aTarget && l->isDirty ) - return true; - } - return false; } diff --git a/include/view/view.h b/include/view/view.h index 8d4329b3d9..5013fdaf91 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -459,7 +459,6 @@ private: struct VIEW_LAYER { bool enabled; ///* is the layer to be rendered? - bool isDirty; ///* does it contain any dirty items (updated since last redraw) bool displayOnly; ///* is the layer display only? VIEW_RTREE* items; ///* R-tree indexing all items on this layer. int renderingOrder; ///* rendering order of this layer From 5e41599d1310dd6834c0f7f35bbe7e85f62fe4fd Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 13 Sep 2013 15:05:57 +0200 Subject: [PATCH 321/415] Removed unnecessary debug message --- pcbnew/tools/selection_tool.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 277f7ccb2c..cd1a4be5a1 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -210,10 +210,7 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) { BOARD_ITEM* boardItem = ( collector )[i]; if( boardItem->Type() == PCB_MODULE_T ) - { - wxLogDebug( wxT( "Removing %s" ), boardItem->GetSelectMenuText() ); collector.Remove( i ); - } } // Let's see if there is still disambiguation in selection.. From 128b1a423f1029fc6c5e6d59ff1f2e626b13b303 Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Fri, 13 Sep 2013 15:25:03 +0200 Subject: [PATCH 322/415] SEG: added SquaredLength() method --- include/geometry/seg.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/geometry/seg.h b/include/geometry/seg.h index 9989c76be7..bb215aa05f 100644 --- a/include/geometry/seg.h +++ b/include/geometry/seg.h @@ -267,6 +267,12 @@ class SEG { { return (a - b).EuclideanNorm(); } + + ecoord SquaredLength() const + { + return (a - b).SquaredEuclideanNorm(); + } + /** * Function Index() From b662a577ea3105df98fff895beaebaa25bb6da59 Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Fri, 13 Sep 2013 15:28:20 +0200 Subject: [PATCH 323/415] polygon: added poly2tri library. Requied for constrained Delaunay triangulation (P&S/ratsnest) and zone tesselation (GAL). --- polygon/CMakeLists.txt | 8 +- polygon/poly2tri/common/shapes.cc | 367 ++++++++++ polygon/poly2tri/common/shapes.h | 325 +++++++++ polygon/poly2tri/common/utils.h | 123 ++++ polygon/poly2tri/poly2tri.h | 39 ++ polygon/poly2tri/sweep/advancing_front.cc | 109 +++ polygon/poly2tri/sweep/advancing_front.h | 118 ++++ polygon/poly2tri/sweep/cdt.cc | 72 ++ polygon/poly2tri/sweep/cdt.h | 105 +++ polygon/poly2tri/sweep/sweep.cc | 813 ++++++++++++++++++++++ polygon/poly2tri/sweep/sweep.h | 285 ++++++++ polygon/poly2tri/sweep/sweep_context.cc | 216 ++++++ polygon/poly2tri/sweep/sweep_context.h | 186 +++++ 13 files changed, 2765 insertions(+), 1 deletion(-) create mode 100644 polygon/poly2tri/common/shapes.cc create mode 100644 polygon/poly2tri/common/shapes.h create mode 100644 polygon/poly2tri/common/utils.h create mode 100644 polygon/poly2tri/poly2tri.h create mode 100644 polygon/poly2tri/sweep/advancing_front.cc create mode 100644 polygon/poly2tri/sweep/advancing_front.h create mode 100644 polygon/poly2tri/sweep/cdt.cc create mode 100644 polygon/poly2tri/sweep/cdt.h create mode 100644 polygon/poly2tri/sweep/sweep.cc create mode 100644 polygon/poly2tri/sweep/sweep.h create mode 100644 polygon/poly2tri/sweep/sweep_context.cc create mode 100644 polygon/poly2tri/sweep/sweep_context.h diff --git a/polygon/CMakeLists.txt b/polygon/CMakeLists.txt index 52068b52af..482c3a1170 100644 --- a/polygon/CMakeLists.txt +++ b/polygon/CMakeLists.txt @@ -9,6 +9,12 @@ set(POLYGON_SRCS PolyLine.cpp polygon_test_point_inside.cpp clipper.cpp - ) + + poly2tri/common/shapes.cc + poly2tri/sweep/sweep.cc + poly2tri/sweep/cdt.cc + poly2tri/sweep/advancing_front.cc + poly2tri/sweep/sweep_context.cc +) add_library(polygon STATIC ${POLYGON_SRCS}) diff --git a/polygon/poly2tri/common/shapes.cc b/polygon/poly2tri/common/shapes.cc new file mode 100644 index 0000000000..77bafa1501 --- /dev/null +++ b/polygon/poly2tri/common/shapes.cc @@ -0,0 +1,367 @@ +/* + * Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors + * http://code.google.com/p/poly2tri/ + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of Poly2Tri nor the names of its contributors may be + * used to endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "shapes.h" +#include + +namespace p2t { + +Triangle::Triangle(Point& a, Point& b, Point& c) +{ + points_[0] = &a; points_[1] = &b; points_[2] = &c; + neighbors_[0] = NULL; neighbors_[1] = NULL; neighbors_[2] = NULL; + constrained_edge[0] = constrained_edge[1] = constrained_edge[2] = false; + delaunay_edge[0] = delaunay_edge[1] = delaunay_edge[2] = false; + interior_ = false; +} + +// Update neighbor pointers +void Triangle::MarkNeighbor(Point* p1, Point* p2, Triangle* t) +{ + if ((p1 == points_[2] && p2 == points_[1]) || (p1 == points_[1] && p2 == points_[2])) + neighbors_[0] = t; + else if ((p1 == points_[0] && p2 == points_[2]) || (p1 == points_[2] && p2 == points_[0])) + neighbors_[1] = t; + else if ((p1 == points_[0] && p2 == points_[1]) || (p1 == points_[1] && p2 == points_[0])) + neighbors_[2] = t; + else + assert(0); +} + +// Exhaustive search to update neighbor pointers +void Triangle::MarkNeighbor(Triangle& t) +{ + if (t.Contains(points_[1], points_[2])) { + neighbors_[0] = &t; + t.MarkNeighbor(points_[1], points_[2], this); + } else if (t.Contains(points_[0], points_[2])) { + neighbors_[1] = &t; + t.MarkNeighbor(points_[0], points_[2], this); + } else if (t.Contains(points_[0], points_[1])) { + neighbors_[2] = &t; + t.MarkNeighbor(points_[0], points_[1], this); + } +} + +/** + * Clears all references to all other triangles and points + */ +void Triangle::Clear() +{ + Triangle *t; + for( int i=0; i<3; i++ ) + { + t = neighbors_[i]; + if( t != NULL ) + { + t->ClearNeighbor( this ); + } + } + ClearNeighbors(); + points_[0]=points_[1]=points_[2] = NULL; +} + +void Triangle::ClearNeighbor(Triangle *triangle ) +{ + if( neighbors_[0] == triangle ) + { + neighbors_[0] = NULL; + } + else if( neighbors_[1] == triangle ) + { + neighbors_[1] = NULL; + } + else + { + neighbors_[2] = NULL; + } +} + +void Triangle::ClearNeighbors() +{ + neighbors_[0] = NULL; + neighbors_[1] = NULL; + neighbors_[2] = NULL; +} + +void Triangle::ClearDelunayEdges() +{ + delaunay_edge[0] = delaunay_edge[1] = delaunay_edge[2] = false; +} + +Point* Triangle::OppositePoint(Triangle& t, Point& p) +{ + Point *cw = t.PointCW(p); + double x = cw->x; + double y = cw->y; + x = p.x; + y = p.y; + return PointCW(*cw); +} + +// Legalized triangle by rotating clockwise around point(0) +void Triangle::Legalize(Point& point) +{ + points_[1] = points_[0]; + points_[0] = points_[2]; + points_[2] = &point; +} + +// Legalize triagnle by rotating clockwise around oPoint +void Triangle::Legalize(Point& opoint, Point& npoint) +{ + if (&opoint == points_[0]) { + points_[1] = points_[0]; + points_[0] = points_[2]; + points_[2] = &npoint; + } else if (&opoint == points_[1]) { + points_[2] = points_[1]; + points_[1] = points_[0]; + points_[0] = &npoint; + } else if (&opoint == points_[2]) { + points_[0] = points_[2]; + points_[2] = points_[1]; + points_[1] = &npoint; + } else { + assert(0); + } +} + +int Triangle::Index(const Point* p) +{ + if (p == points_[0]) { + return 0; + } else if (p == points_[1]) { + return 1; + } else if (p == points_[2]) { + return 2; + } + assert(0); +} + +int Triangle::EdgeIndex(const Point* p1, const Point* p2) +{ + if (points_[0] == p1) { + if (points_[1] == p2) { + return 2; + } else if (points_[2] == p2) { + return 1; + } + } else if (points_[1] == p1) { + if (points_[2] == p2) { + return 0; + } else if (points_[0] == p2) { + return 2; + } + } else if (points_[2] == p1) { + if (points_[0] == p2) { + return 1; + } else if (points_[1] == p2) { + return 0; + } + } + return -1; +} + +void Triangle::MarkConstrainedEdge(const int index) +{ + constrained_edge[index] = true; +} + +void Triangle::MarkConstrainedEdge(Edge& edge) +{ + MarkConstrainedEdge(edge.p, edge.q); +} + +// Mark edge as constrained +void Triangle::MarkConstrainedEdge(Point* p, Point* q) +{ + if ((q == points_[0] && p == points_[1]) || (q == points_[1] && p == points_[0])) { + constrained_edge[2] = true; + } else if ((q == points_[0] && p == points_[2]) || (q == points_[2] && p == points_[0])) { + constrained_edge[1] = true; + } else if ((q == points_[1] && p == points_[2]) || (q == points_[2] && p == points_[1])) { + constrained_edge[0] = true; + } +} + +// The point counter-clockwise to given point +Point* Triangle::PointCW(Point& point) +{ + if (&point == points_[0]) { + return points_[2]; + } else if (&point == points_[1]) { + return points_[0]; + } else if (&point == points_[2]) { + return points_[1]; + } + assert(0); +} + +// The point counter-clockwise to given point +Point* Triangle::PointCCW(Point& point) +{ + if (&point == points_[0]) { + return points_[1]; + } else if (&point == points_[1]) { + return points_[2]; + } else if (&point == points_[2]) { + return points_[0]; + } + assert(0); +} + +// The neighbor clockwise to given point +Triangle* Triangle::NeighborCW(Point& point) +{ + if (&point == points_[0]) { + return neighbors_[1]; + } else if (&point == points_[1]) { + return neighbors_[2]; + } + return neighbors_[0]; +} + +// The neighbor counter-clockwise to given point +Triangle* Triangle::NeighborCCW(Point& point) +{ + if (&point == points_[0]) { + return neighbors_[2]; + } else if (&point == points_[1]) { + return neighbors_[0]; + } + return neighbors_[1]; +} + +bool Triangle::GetConstrainedEdgeCCW(Point& p) +{ + if (&p == points_[0]) { + return constrained_edge[2]; + } else if (&p == points_[1]) { + return constrained_edge[0]; + } + return constrained_edge[1]; +} + +bool Triangle::GetConstrainedEdgeCW(Point& p) +{ + if (&p == points_[0]) { + return constrained_edge[1]; + } else if (&p == points_[1]) { + return constrained_edge[2]; + } + return constrained_edge[0]; +} + +void Triangle::SetConstrainedEdgeCCW(Point& p, bool ce) +{ + if (&p == points_[0]) { + constrained_edge[2] = ce; + } else if (&p == points_[1]) { + constrained_edge[0] = ce; + } else { + constrained_edge[1] = ce; + } +} + +void Triangle::SetConstrainedEdgeCW(Point& p, bool ce) +{ + if (&p == points_[0]) { + constrained_edge[1] = ce; + } else if (&p == points_[1]) { + constrained_edge[2] = ce; + } else { + constrained_edge[0] = ce; + } +} + +bool Triangle::GetDelunayEdgeCCW(Point& p) +{ + if (&p == points_[0]) { + return delaunay_edge[2]; + } else if (&p == points_[1]) { + return delaunay_edge[0]; + } + return delaunay_edge[1]; +} + +bool Triangle::GetDelunayEdgeCW(Point& p) +{ + if (&p == points_[0]) { + return delaunay_edge[1]; + } else if (&p == points_[1]) { + return delaunay_edge[2]; + } + return delaunay_edge[0]; +} + +void Triangle::SetDelunayEdgeCCW(Point& p, bool e) +{ + if (&p == points_[0]) { + delaunay_edge[2] = e; + } else if (&p == points_[1]) { + delaunay_edge[0] = e; + } else { + delaunay_edge[1] = e; + } +} + +void Triangle::SetDelunayEdgeCW(Point& p, bool e) +{ + if (&p == points_[0]) { + delaunay_edge[1] = e; + } else if (&p == points_[1]) { + delaunay_edge[2] = e; + } else { + delaunay_edge[0] = e; + } +} + +// The neighbor across to given point +Triangle& Triangle::NeighborAcross(Point& opoint) +{ + if (&opoint == points_[0]) { + return *neighbors_[0]; + } else if (&opoint == points_[1]) { + return *neighbors_[1]; + } + return *neighbors_[2]; +} + +void Triangle::DebugPrint() +{ + using namespace std; + cout << points_[0]->x << "," << points_[0]->y << " "; + cout << points_[1]->x << "," << points_[1]->y << " "; + cout << points_[2]->x << "," << points_[2]->y << endl; +} + +} + diff --git a/polygon/poly2tri/common/shapes.h b/polygon/poly2tri/common/shapes.h new file mode 100644 index 0000000000..8c19d91ef8 --- /dev/null +++ b/polygon/poly2tri/common/shapes.h @@ -0,0 +1,325 @@ +/* + * Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors + * http://code.google.com/p/poly2tri/ + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of Poly2Tri nor the names of its contributors may be + * used to endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +// Include guard +#ifndef SHAPES_H +#define SHAPES_H + +#include +#include +#include +#include + +namespace p2t { + +struct Edge; + +struct Point { + + double x, y; + + /// Default constructor does nothing (for performance). + Point() + { + x = 0.0; + y = 0.0; + } + + /// The edges this point constitutes an upper ending point + std::vector edge_list; + + /// Construct using coordinates. + Point(double x, double y) : x(x), y(y) {} + + /// Set this point to all zeros. + void set_zero() + { + x = 0.0; + y = 0.0; + } + + /// Set this point to some specified coordinates. + void set(double x_, double y_) + { + x = x_; + y = y_; + } + + /// Negate this point. + Point operator -() const + { + Point v; + v.set(-x, -y); + return v; + } + + /// Add a point to this point. + void operator +=(const Point& v) + { + x += v.x; + y += v.y; + } + + /// Subtract a point from this point. + void operator -=(const Point& v) + { + x -= v.x; + y -= v.y; + } + + /// Multiply this point by a scalar. + void operator *=(double a) + { + x *= a; + y *= a; + } + + /// Get the length of this point (the norm). + double Length() const + { + return sqrt(x * x + y * y); + } + + /// Convert this point into a unit point. Returns the Length. + double Normalize() + { + double len = Length(); + x /= len; + y /= len; + return len; + } + +}; + +// Represents a simple polygon's edge +struct Edge { + + Point* p, *q; + + /// Constructor + Edge(Point& p1, Point& p2) : p(&p1), q(&p2) + { + if (p1.y > p2.y) { + q = &p1; + p = &p2; + } else if (p1.y == p2.y) { + if (p1.x > p2.x) { + q = &p1; + p = &p2; + } else if (p1.x == p2.x) { + // Repeat points + assert(false); + } + } + + q->edge_list.push_back(this); + } +}; + +// Triangle-based data structures are know to have better performance than quad-edge structures +// See: J. Shewchuk, "Triangle: Engineering a 2D Quality Mesh Generator and Delaunay Triangulator" +// "Triangulations in CGAL" +class Triangle { +public: + +/// Constructor +Triangle(Point& a, Point& b, Point& c); + +/// Flags to determine if an edge is a Constrained edge +bool constrained_edge[3]; +/// Flags to determine if an edge is a Delauney edge +bool delaunay_edge[3]; + +Point* GetPoint(const int& index); +Point* PointCW(Point& point); +Point* PointCCW(Point& point); +Point* OppositePoint(Triangle& t, Point& p); + +Triangle* GetNeighbor(const int& index); +void MarkNeighbor(Point* p1, Point* p2, Triangle* t); +void MarkNeighbor(Triangle& t); + +void MarkConstrainedEdge(const int index); +void MarkConstrainedEdge(Edge& edge); +void MarkConstrainedEdge(Point* p, Point* q); + +int Index(const Point* p); +int EdgeIndex(const Point* p1, const Point* p2); + +Triangle* NeighborCW(Point& point); +Triangle* NeighborCCW(Point& point); +bool GetConstrainedEdgeCCW(Point& p); +bool GetConstrainedEdgeCW(Point& p); +void SetConstrainedEdgeCCW(Point& p, bool ce); +void SetConstrainedEdgeCW(Point& p, bool ce); +bool GetDelunayEdgeCCW(Point& p); +bool GetDelunayEdgeCW(Point& p); +void SetDelunayEdgeCCW(Point& p, bool e); +void SetDelunayEdgeCW(Point& p, bool e); + +bool Contains(Point* p); +bool Contains(const Edge& e); +bool Contains(Point* p, Point* q); +void Legalize(Point& point); +void Legalize(Point& opoint, Point& npoint); +/** + * Clears all references to all other triangles and points + */ +void Clear(); +void ClearNeighbor(Triangle *triangle ); +void ClearNeighbors(); +void ClearDelunayEdges(); + +inline bool IsInterior(); +inline void IsInterior(bool b); + +Triangle& NeighborAcross(Point& opoint); + +void DebugPrint(); + +private: + +/// Triangle points +Point* points_[3]; +/// Neighbor list +Triangle* neighbors_[3]; + +/// Has this triangle been marked as an interior triangle? +bool interior_; +}; + +inline bool cmp(const Point* a, const Point* b) +{ + if (a->y < b->y) { + return true; + } else if (a->y == b->y) { + // Make sure q is point with greater x value + if (a->x < b->x) { + return true; + } + } + return false; +} + +/// Add two points_ component-wise. +inline Point operator +(const Point& a, const Point& b) +{ + return Point(a.x + b.x, a.y + b.y); +} + +/// Subtract two points_ component-wise. +inline Point operator -(const Point& a, const Point& b) +{ + return Point(a.x - b.x, a.y - b.y); +} + +/// Multiply point by scalar +inline Point operator *(double s, const Point& a) +{ + return Point(s * a.x, s * a.y); +} + +inline bool operator ==(const Point& a, const Point& b) +{ + return a.x == b.x && a.y == b.y; +} + +inline bool operator !=(const Point& a, const Point& b) +{ + return !(a.x == b.x) && !(a.y == b.y); +} + +/// Peform the dot product on two vectors. +inline double Dot(const Point& a, const Point& b) +{ + return a.x * b.x + a.y * b.y; +} + +/// Perform the cross product on two vectors. In 2D this produces a scalar. +inline double Cross(const Point& a, const Point& b) +{ + return a.x * b.y - a.y * b.x; +} + +/// Perform the cross product on a point and a scalar. In 2D this produces +/// a point. +inline Point Cross(const Point& a, double s) +{ + return Point(s * a.y, -s * a.x); +} + +/// Perform the cross product on a scalar and a point. In 2D this produces +/// a point. +inline Point Cross(const double s, const Point& a) +{ + return Point(-s * a.y, s * a.x); +} + +inline Point* Triangle::GetPoint(const int& index) +{ + return points_[index]; +} + +inline Triangle* Triangle::GetNeighbor(const int& index) +{ + return neighbors_[index]; +} + +inline bool Triangle::Contains(Point* p) +{ + return p == points_[0] || p == points_[1] || p == points_[2]; +} + +inline bool Triangle::Contains(const Edge& e) +{ + return Contains(e.p) && Contains(e.q); +} + +inline bool Triangle::Contains(Point* p, Point* q) +{ + return Contains(p) && Contains(q); +} + +inline bool Triangle::IsInterior() +{ + return interior_; +} + +inline void Triangle::IsInterior(bool b) +{ + interior_ = b; +} + +} + +#endif + + diff --git a/polygon/poly2tri/common/utils.h b/polygon/poly2tri/common/utils.h new file mode 100644 index 0000000000..ad27efa85b --- /dev/null +++ b/polygon/poly2tri/common/utils.h @@ -0,0 +1,123 @@ +/* + * Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors + * http://code.google.com/p/poly2tri/ + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of Poly2Tri nor the names of its contributors may be + * used to endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef UTILS_H +#define UTILS_H + +// Otherwise #defines like M_PI are undeclared under Visual Studio +#define _USE_MATH_DEFINES + +#include +#include + +namespace p2t { + +const double PI_3div4 = 3 * M_PI / 4; +const double PI_div2 = 1.57079632679489661923; +const double EPSILON = 1e-12; + +enum Orientation { CW, CCW, COLLINEAR }; + +/** + * Forumla to calculate signed area
+ * Positive if CCW
+ * Negative if CW
+ * 0 if collinear
+ *
+ * A[P1,P2,P3]  =  (x1*y2 - y1*x2) + (x2*y3 - y2*x3) + (x3*y1 - y3*x1)
+ *              =  (x1-x3)*(y2-y3) - (y1-y3)*(x2-x3)
+ * 
+ */ +Orientation Orient2d(Point& pa, Point& pb, Point& pc) +{ + double detleft = (pa.x - pc.x) * (pb.y - pc.y); + double detright = (pa.y - pc.y) * (pb.x - pc.x); + double val = detleft - detright; + if (val > -EPSILON && val < EPSILON) { + return COLLINEAR; + } else if (val > 0) { + return CCW; + } + return CW; +} + +/* +bool InScanArea(Point& pa, Point& pb, Point& pc, Point& pd) +{ + double pdx = pd.x; + double pdy = pd.y; + double adx = pa.x - pdx; + double ady = pa.y - pdy; + double bdx = pb.x - pdx; + double bdy = pb.y - pdy; + + double adxbdy = adx * bdy; + double bdxady = bdx * ady; + double oabd = adxbdy - bdxady; + + if (oabd <= EPSILON) { + return false; + } + + double cdx = pc.x - pdx; + double cdy = pc.y - pdy; + + double cdxady = cdx * ady; + double adxcdy = adx * cdy; + double ocad = cdxady - adxcdy; + + if (ocad <= EPSILON) { + return false; + } + + return true; +} + +*/ + +bool InScanArea(Point& pa, Point& pb, Point& pc, Point& pd) +{ + double oadb = (pa.x - pb.x)*(pd.y - pb.y) - (pd.x - pb.x)*(pa.y - pb.y); + if (oadb >= -EPSILON) { + return false; + } + + double oadc = (pa.x - pc.x)*(pd.y - pc.y) - (pd.x - pc.x)*(pa.y - pc.y); + if (oadc <= EPSILON) { + return false; + } + return true; +} + +} + +#endif + diff --git a/polygon/poly2tri/poly2tri.h b/polygon/poly2tri/poly2tri.h new file mode 100644 index 0000000000..487755e2e9 --- /dev/null +++ b/polygon/poly2tri/poly2tri.h @@ -0,0 +1,39 @@ +/* + * Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors + * http://code.google.com/p/poly2tri/ + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of Poly2Tri nor the names of its contributors may be + * used to endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef POLY2TRI_H +#define POLY2TRI_H + +#include "common/shapes.h" +#include "sweep/cdt.h" + +#endif + diff --git a/polygon/poly2tri/sweep/advancing_front.cc b/polygon/poly2tri/sweep/advancing_front.cc new file mode 100644 index 0000000000..019df4a6eb --- /dev/null +++ b/polygon/poly2tri/sweep/advancing_front.cc @@ -0,0 +1,109 @@ +/* + * Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors + * http://code.google.com/p/poly2tri/ + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of Poly2Tri nor the names of its contributors may be + * used to endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "advancing_front.h" + +namespace p2t { + +AdvancingFront::AdvancingFront(Node& head, Node& tail) +{ + head_ = &head; + tail_ = &tail; + search_node_ = &head; +} + +Node* AdvancingFront::LocateNode(const double& x) +{ + Node* node = search_node_; + + if (x < node->value) { + while ((node = node->prev) != NULL) { + if (x >= node->value) { + search_node_ = node; + return node; + } + } + } else { + while ((node = node->next) != NULL) { + if (x < node->value) { + search_node_ = node->prev; + return node->prev; + } + } + } + return NULL; +} + +Node* AdvancingFront::FindSearchNode(const double& x) +{ + (void)x; // suppress compiler warnings "unused parameter 'x'" + // TODO: implement BST index + return search_node_; +} + +Node* AdvancingFront::LocatePoint(const Point* point) +{ + const double px = point->x; + Node* node = FindSearchNode(px); + const double nx = node->point->x; + + if (px == nx) { + if (point != node->point) { + // We might have two nodes with same x value for a short time + if (point == node->prev->point) { + node = node->prev; + } else if (point == node->next->point) { + node = node->next; + } else { + assert(0); + } + } + } else if (px < nx) { + while ((node = node->prev) != NULL) { + if (point == node->point) { + break; + } + } + } else { + while ((node = node->next) != NULL) { + if (point == node->point) + break; + } + } + if(node) search_node_ = node; + return node; +} + +AdvancingFront::~AdvancingFront() +{ +} + +} + diff --git a/polygon/poly2tri/sweep/advancing_front.h b/polygon/poly2tri/sweep/advancing_front.h new file mode 100644 index 0000000000..bab73d449c --- /dev/null +++ b/polygon/poly2tri/sweep/advancing_front.h @@ -0,0 +1,118 @@ +/* + * Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors + * http://code.google.com/p/poly2tri/ + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of Poly2Tri nor the names of its contributors may be + * used to endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef ADVANCED_FRONT_H +#define ADVANCED_FRONT_H + +#include "../common/shapes.h" + +namespace p2t { + +struct Node; + +// Advancing front node +struct Node { + Point* point; + Triangle* triangle; + + Node* next; + Node* prev; + + double value; + + Node(Point& p) : point(&p), triangle(NULL), next(NULL), prev(NULL), value(p.x) + { + } + + Node(Point& p, Triangle& t) : point(&p), triangle(&t), next(NULL), prev(NULL), value(p.x) + { + } + +}; + +// Advancing front +class AdvancingFront { +public: + +AdvancingFront(Node& head, Node& tail); +// Destructor +~AdvancingFront(); + +Node* head(); +void set_head(Node* node); +Node* tail(); +void set_tail(Node* node); +Node* search(); +void set_search(Node* node); + +/// Locate insertion point along advancing front +Node* LocateNode(const double& x); + +Node* LocatePoint(const Point* point); + +private: + +Node* head_, *tail_, *search_node_; + +Node* FindSearchNode(const double& x); +}; + +inline Node* AdvancingFront::head() +{ + return head_; +} +inline void AdvancingFront::set_head(Node* node) +{ + head_ = node; +} + +inline Node* AdvancingFront::tail() +{ + return tail_; +} +inline void AdvancingFront::set_tail(Node* node) +{ + tail_ = node; +} + +inline Node* AdvancingFront::search() +{ + return search_node_; +} + +inline void AdvancingFront::set_search(Node* node) +{ + search_node_ = node; +} + +} + +#endif diff --git a/polygon/poly2tri/sweep/cdt.cc b/polygon/poly2tri/sweep/cdt.cc new file mode 100644 index 0000000000..f013e47e37 --- /dev/null +++ b/polygon/poly2tri/sweep/cdt.cc @@ -0,0 +1,72 @@ +/* + * Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors + * http://code.google.com/p/poly2tri/ + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of Poly2Tri nor the names of its contributors may be + * used to endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "cdt.h" + +namespace p2t { + +CDT::CDT(std::vector polyline) +{ + sweep_context_ = new SweepContext(polyline); + sweep_ = new Sweep; +} + +void CDT::AddHole(std::vector polyline) +{ + sweep_context_->AddHole(polyline); +} + +void CDT::AddPoint(Point* point) { + sweep_context_->AddPoint(point); +} + +void CDT::Triangulate() +{ + sweep_->Triangulate(*sweep_context_); +} + +std::vector CDT::GetTriangles() +{ + return sweep_context_->GetTriangles(); +} + +std::list CDT::GetMap() +{ + return sweep_context_->GetMap(); +} + +CDT::~CDT() +{ + delete sweep_context_; + delete sweep_; +} + +} + diff --git a/polygon/poly2tri/sweep/cdt.h b/polygon/poly2tri/sweep/cdt.h new file mode 100644 index 0000000000..baf6ca7ddd --- /dev/null +++ b/polygon/poly2tri/sweep/cdt.h @@ -0,0 +1,105 @@ +/* + * Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors + * http://code.google.com/p/poly2tri/ + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of Poly2Tri nor the names of its contributors may be + * used to endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef CDT_H +#define CDT_H + +#include "advancing_front.h" +#include "sweep_context.h" +#include "sweep.h" + +/** + * + * @author Mason Green + * + */ + +namespace p2t { + +class CDT +{ +public: + + /** + * Constructor - add polyline with non repeating points + * + * @param polyline + */ + CDT(std::vector polyline); + + /** + * Destructor - clean up memory + */ + ~CDT(); + + /** + * Add a hole + * + * @param polyline + */ + void AddHole(std::vector polyline); + + /** + * Add a steiner point + * + * @param point + */ + void AddPoint(Point* point); + + /** + * Triangulate - do this AFTER you've added the polyline, holes, and Steiner points + */ + void Triangulate(); + + /** + * Get CDT triangles + */ + std::vector GetTriangles(); + + /** + * Get triangle map + */ + std::list GetMap(); + + private: + + /** + * Internals + */ + + SweepContext* sweep_context_; + Sweep* sweep_; + +}; + +} + +#endif diff --git a/polygon/poly2tri/sweep/sweep.cc b/polygon/poly2tri/sweep/sweep.cc new file mode 100644 index 0000000000..992f0e5160 --- /dev/null +++ b/polygon/poly2tri/sweep/sweep.cc @@ -0,0 +1,813 @@ +/* + * Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors + * http://code.google.com/p/poly2tri/ + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of Poly2Tri nor the names of its contributors may be + * used to endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include +#include "sweep.h" +#include "sweep_context.h" +#include "advancing_front.h" +#include "../common/utils.h" + +namespace p2t { + +// Triangulate simple polygon with holes +void Sweep::Triangulate(SweepContext& tcx) +{ + tcx.InitTriangulation(); + tcx.CreateAdvancingFront(nodes_); + // Sweep points; build mesh + SweepPoints(tcx); + // Clean up + FinalizationPolygon(tcx); +} + +void Sweep::SweepPoints(SweepContext& tcx) +{ + for (int i = 1; i < tcx.point_count(); i++) { + Point& point = *tcx.GetPoint(i); + Node* node = &PointEvent(tcx, point); + for (unsigned int i = 0; i < point.edge_list.size(); i++) { + EdgeEvent(tcx, point.edge_list[i], node); + } + } +} + +void Sweep::FinalizationPolygon(SweepContext& tcx) +{ + // Get an Internal triangle to start with + Triangle* t = tcx.front()->head()->next->triangle; + Point* p = tcx.front()->head()->next->point; + while (!t->GetConstrainedEdgeCW(*p)) { + t = t->NeighborCCW(*p); + } + + // Collect interior triangles constrained by edges + tcx.MeshClean(*t); +} + +Node& Sweep::PointEvent(SweepContext& tcx, Point& point) +{ + Node& node = tcx.LocateNode(point); + Node& new_node = NewFrontTriangle(tcx, point, node); + + // Only need to check +epsilon since point never have smaller + // x value than node due to how we fetch nodes from the front + if (point.x <= node.point->x + EPSILON) { + Fill(tcx, node); + } + + //tcx.AddNode(new_node); + + FillAdvancingFront(tcx, new_node); + return new_node; +} + +void Sweep::EdgeEvent(SweepContext& tcx, Edge* edge, Node* node) +{ + tcx.edge_event.constrained_edge = edge; + tcx.edge_event.right = (edge->p->x > edge->q->x); + + if (IsEdgeSideOfTriangle(*node->triangle, *edge->p, *edge->q)) { + return; + } + + // For now we will do all needed filling + // TODO: integrate with flip process might give some better performance + // but for now this avoid the issue with cases that needs both flips and fills + FillEdgeEvent(tcx, edge, node); + EdgeEvent(tcx, *edge->p, *edge->q, node->triangle, *edge->q); +} + +void Sweep::EdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle* triangle, Point& point) +{ + if (IsEdgeSideOfTriangle(*triangle, ep, eq)) { + return; + } + + Point* p1 = triangle->PointCCW(point); + Orientation o1 = Orient2d(eq, *p1, ep); + if (o1 == COLLINEAR) { + if( triangle->Contains(&eq, p1)) { + triangle->MarkConstrainedEdge(&eq, p1 ); + // We are modifying the constraint maybe it would be better to + // not change the given constraint and just keep a variable for the new constraint + tcx.edge_event.constrained_edge->q = p1; + triangle = &triangle->NeighborAcross(point); + EdgeEvent( tcx, ep, *p1, triangle, *p1 ); + } else { + std::runtime_error("EdgeEvent - collinear points not supported"); + assert(0); + } + return; + } + + Point* p2 = triangle->PointCW(point); + Orientation o2 = Orient2d(eq, *p2, ep); + if (o2 == COLLINEAR) { + if( triangle->Contains(&eq, p2)) { + triangle->MarkConstrainedEdge(&eq, p2 ); + // We are modifying the constraint maybe it would be better to + // not change the given constraint and just keep a variable for the new constraint + tcx.edge_event.constrained_edge->q = p2; + triangle = &triangle->NeighborAcross(point); + EdgeEvent( tcx, ep, *p2, triangle, *p2 ); + } else { + std::runtime_error("EdgeEvent - collinear points not supported"); + assert(0); + } + return; + } + + if (o1 == o2) { + // Need to decide if we are rotating CW or CCW to get to a triangle + // that will cross edge + if (o1 == CW) { + triangle = triangle->NeighborCCW(point); + } else{ + triangle = triangle->NeighborCW(point); + } + EdgeEvent(tcx, ep, eq, triangle, point); + } else { + // This triangle crosses constraint so lets flippin start! + FlipEdgeEvent(tcx, ep, eq, triangle, point); + } +} + +bool Sweep::IsEdgeSideOfTriangle(Triangle& triangle, Point& ep, Point& eq) +{ + int index = triangle.EdgeIndex(&ep, &eq); + + if (index != -1) { + triangle.MarkConstrainedEdge(index); + Triangle* t = triangle.GetNeighbor(index); + if (t) { + t->MarkConstrainedEdge(&ep, &eq); + } + return true; + } + return false; +} + +Node& Sweep::NewFrontTriangle(SweepContext& tcx, Point& point, Node& node) +{ + Triangle* triangle = new Triangle(point, *node.point, *node.next->point); + + triangle->MarkNeighbor(*node.triangle); + tcx.AddToMap(triangle); + + Node* new_node = new Node(point); + nodes_.push_back(new_node); + + new_node->next = node.next; + new_node->prev = &node; + node.next->prev = new_node; + node.next = new_node; + + if (!Legalize(tcx, *triangle)) { + tcx.MapTriangleToNodes(*triangle); + } + + return *new_node; +} + +void Sweep::Fill(SweepContext& tcx, Node& node) +{ + Triangle* triangle = new Triangle(*node.prev->point, *node.point, *node.next->point); + + // TODO: should copy the constrained_edge value from neighbor triangles + // for now constrained_edge values are copied during the legalize + triangle->MarkNeighbor(*node.prev->triangle); + triangle->MarkNeighbor(*node.triangle); + + tcx.AddToMap(triangle); + + // Update the advancing front + node.prev->next = node.next; + node.next->prev = node.prev; + + // If it was legalized the triangle has already been mapped + if (!Legalize(tcx, *triangle)) { + tcx.MapTriangleToNodes(*triangle); + } + +} + +void Sweep::FillAdvancingFront(SweepContext& tcx, Node& n) +{ + + // Fill right holes + Node* node = n.next; + + while (node->next) { + // if HoleAngle exceeds 90 degrees then break. + if (LargeHole_DontFill(node)) break; + Fill(tcx, *node); + node = node->next; + } + + // Fill left holes + node = n.prev; + + while (node->prev) { + // if HoleAngle exceeds 90 degrees then break. + if (LargeHole_DontFill(node)) break; + Fill(tcx, *node); + node = node->prev; + } + + // Fill right basins + if (n.next && n.next->next) { + double angle = BasinAngle(n); + if (angle < PI_3div4) { + FillBasin(tcx, n); + } + } +} + +// True if HoleAngle exceeds 90 degrees. +bool Sweep::LargeHole_DontFill(Node* node) { + + Node* nextNode = node->next; + Node* prevNode = node->prev; + if (!AngleExceeds90Degrees(node->point, nextNode->point, prevNode->point)) + return false; + + // Check additional points on front. + Node* next2Node = nextNode->next; + // "..Plus.." because only want angles on same side as point being added. + if ((next2Node != NULL) && !AngleExceedsPlus90DegreesOrIsNegative(node->point, next2Node->point, prevNode->point)) + return false; + + Node* prev2Node = prevNode->prev; + // "..Plus.." because only want angles on same side as point being added. + if ((prev2Node != NULL) && !AngleExceedsPlus90DegreesOrIsNegative(node->point, nextNode->point, prev2Node->point)) + return false; + + return true; +} + +bool Sweep::AngleExceeds90Degrees(Point* origin, Point* pa, Point* pb) { + double angle = Angle(*origin, *pa, *pb); + bool exceeds90Degrees = ((angle > PI_div2) || (angle < -PI_div2)); + return exceeds90Degrees; +} + +bool Sweep::AngleExceedsPlus90DegreesOrIsNegative(Point* origin, Point* pa, Point* pb) { + double angle = Angle(*origin, *pa, *pb); + bool exceedsPlus90DegreesOrIsNegative = (angle > PI_div2) || (angle < 0); + return exceedsPlus90DegreesOrIsNegative; +} + +double Sweep::Angle(Point& origin, Point& pa, Point& pb) { + /* Complex plane + * ab = cosA +i*sinA + * ab = (ax + ay*i)(bx + by*i) = (ax*bx + ay*by) + i(ax*by-ay*bx) + * atan2(y,x) computes the principal value of the argument function + * applied to the complex number x+iy + * Where x = ax*bx + ay*by + * y = ax*by - ay*bx + */ + double px = origin.x; + double py = origin.y; + double ax = pa.x- px; + double ay = pa.y - py; + double bx = pb.x - px; + double by = pb.y - py; + double x = ax * by - ay * bx; + double y = ax * bx + ay * by; + double angle = atan2(x, y); + return angle; +} + +double Sweep::BasinAngle(Node& node) +{ + double ax = node.point->x - node.next->next->point->x; + double ay = node.point->y - node.next->next->point->y; + return atan2(ay, ax); +} + +double Sweep::HoleAngle(Node& node) +{ + /* Complex plane + * ab = cosA +i*sinA + * ab = (ax + ay*i)(bx + by*i) = (ax*bx + ay*by) + i(ax*by-ay*bx) + * atan2(y,x) computes the principal value of the argument function + * applied to the complex number x+iy + * Where x = ax*bx + ay*by + * y = ax*by - ay*bx + */ + double ax = node.next->point->x - node.point->x; + double ay = node.next->point->y - node.point->y; + double bx = node.prev->point->x - node.point->x; + double by = node.prev->point->y - node.point->y; + return atan2(ax * by - ay * bx, ax * bx + ay * by); +} + +bool Sweep::Legalize(SweepContext& tcx, Triangle& t) +{ + // To legalize a triangle we start by finding if any of the three edges + // violate the Delaunay condition + for (int i = 0; i < 3; i++) { + if (t.delaunay_edge[i]) + continue; + + Triangle* ot = t.GetNeighbor(i); + + if (ot) { + Point* p = t.GetPoint(i); + Point* op = ot->OppositePoint(t, *p); + int oi = ot->Index(op); + + // If this is a Constrained Edge or a Delaunay Edge(only during recursive legalization) + // then we should not try to legalize + if (ot->constrained_edge[oi] || ot->delaunay_edge[oi]) { + t.constrained_edge[i] = ot->constrained_edge[oi]; + continue; + } + + bool inside = Incircle(*p, *t.PointCCW(*p), *t.PointCW(*p), *op); + + if (inside) { + // Lets mark this shared edge as Delaunay + t.delaunay_edge[i] = true; + ot->delaunay_edge[oi] = true; + + // Lets rotate shared edge one vertex CW to legalize it + RotateTrianglePair(t, *p, *ot, *op); + + // We now got one valid Delaunay Edge shared by two triangles + // This gives us 4 new edges to check for Delaunay + + // Make sure that triangle to node mapping is done only one time for a specific triangle + bool not_legalized = !Legalize(tcx, t); + if (not_legalized) { + tcx.MapTriangleToNodes(t); + } + + not_legalized = !Legalize(tcx, *ot); + if (not_legalized) + tcx.MapTriangleToNodes(*ot); + + // Reset the Delaunay edges, since they only are valid Delaunay edges + // until we add a new triangle or point. + // XXX: need to think about this. Can these edges be tried after we + // return to previous recursive level? + t.delaunay_edge[i] = false; + ot->delaunay_edge[oi] = false; + + // If triangle have been legalized no need to check the other edges since + // the recursive legalization will handles those so we can end here. + return true; + } + } + } + return false; +} + +bool Sweep::Incircle(Point& pa, Point& pb, Point& pc, Point& pd) +{ + double adx = pa.x - pd.x; + double ady = pa.y - pd.y; + double bdx = pb.x - pd.x; + double bdy = pb.y - pd.y; + + double adxbdy = adx * bdy; + double bdxady = bdx * ady; + double oabd = adxbdy - bdxady; + + if (oabd <= 0) + return false; + + double cdx = pc.x - pd.x; + double cdy = pc.y - pd.y; + + double cdxady = cdx * ady; + double adxcdy = adx * cdy; + double ocad = cdxady - adxcdy; + + if (ocad <= 0) + return false; + + double bdxcdy = bdx * cdy; + double cdxbdy = cdx * bdy; + + double alift = adx * adx + ady * ady; + double blift = bdx * bdx + bdy * bdy; + double clift = cdx * cdx + cdy * cdy; + + double det = alift * (bdxcdy - cdxbdy) + blift * ocad + clift * oabd; + + return det > 0; +} + +void Sweep::RotateTrianglePair(Triangle& t, Point& p, Triangle& ot, Point& op) +{ + Triangle* n1, *n2, *n3, *n4; + n1 = t.NeighborCCW(p); + n2 = t.NeighborCW(p); + n3 = ot.NeighborCCW(op); + n4 = ot.NeighborCW(op); + + bool ce1, ce2, ce3, ce4; + ce1 = t.GetConstrainedEdgeCCW(p); + ce2 = t.GetConstrainedEdgeCW(p); + ce3 = ot.GetConstrainedEdgeCCW(op); + ce4 = ot.GetConstrainedEdgeCW(op); + + bool de1, de2, de3, de4; + de1 = t.GetDelunayEdgeCCW(p); + de2 = t.GetDelunayEdgeCW(p); + de3 = ot.GetDelunayEdgeCCW(op); + de4 = ot.GetDelunayEdgeCW(op); + + t.Legalize(p, op); + ot.Legalize(op, p); + + // Remap delaunay_edge + ot.SetDelunayEdgeCCW(p, de1); + t.SetDelunayEdgeCW(p, de2); + t.SetDelunayEdgeCCW(op, de3); + ot.SetDelunayEdgeCW(op, de4); + + // Remap constrained_edge + ot.SetConstrainedEdgeCCW(p, ce1); + t.SetConstrainedEdgeCW(p, ce2); + t.SetConstrainedEdgeCCW(op, ce3); + ot.SetConstrainedEdgeCW(op, ce4); + + // Remap neighbors + // XXX: might optimize the markNeighbor by keeping track of + // what side should be assigned to what neighbor after the + // rotation. Now mark neighbor does lots of testing to find + // the right side. + t.ClearNeighbors(); + ot.ClearNeighbors(); + if (n1) ot.MarkNeighbor(*n1); + if (n2) t.MarkNeighbor(*n2); + if (n3) t.MarkNeighbor(*n3); + if (n4) ot.MarkNeighbor(*n4); + t.MarkNeighbor(ot); +} + +void Sweep::FillBasin(SweepContext& tcx, Node& node) +{ + if (Orient2d(*node.point, *node.next->point, *node.next->next->point) == CCW) { + tcx.basin.left_node = node.next->next; + } else { + tcx.basin.left_node = node.next; + } + + // Find the bottom and right node + tcx.basin.bottom_node = tcx.basin.left_node; + while (tcx.basin.bottom_node->next + && tcx.basin.bottom_node->point->y >= tcx.basin.bottom_node->next->point->y) { + tcx.basin.bottom_node = tcx.basin.bottom_node->next; + } + if (tcx.basin.bottom_node == tcx.basin.left_node) { + // No valid basin + return; + } + + tcx.basin.right_node = tcx.basin.bottom_node; + while (tcx.basin.right_node->next + && tcx.basin.right_node->point->y < tcx.basin.right_node->next->point->y) { + tcx.basin.right_node = tcx.basin.right_node->next; + } + if (tcx.basin.right_node == tcx.basin.bottom_node) { + // No valid basins + return; + } + + tcx.basin.width = tcx.basin.right_node->point->x - tcx.basin.left_node->point->x; + tcx.basin.left_highest = tcx.basin.left_node->point->y > tcx.basin.right_node->point->y; + + FillBasinReq(tcx, tcx.basin.bottom_node); +} + +void Sweep::FillBasinReq(SweepContext& tcx, Node* node) +{ + // if shallow stop filling + if (IsShallow(tcx, *node)) { + return; + } + + Fill(tcx, *node); + + if (node->prev == tcx.basin.left_node && node->next == tcx.basin.right_node) { + return; + } else if (node->prev == tcx.basin.left_node) { + Orientation o = Orient2d(*node->point, *node->next->point, *node->next->next->point); + if (o == CW) { + return; + } + node = node->next; + } else if (node->next == tcx.basin.right_node) { + Orientation o = Orient2d(*node->point, *node->prev->point, *node->prev->prev->point); + if (o == CCW) { + return; + } + node = node->prev; + } else { + // Continue with the neighbor node with lowest Y value + if (node->prev->point->y < node->next->point->y) { + node = node->prev; + } else { + node = node->next; + } + } + + FillBasinReq(tcx, node); +} + +bool Sweep::IsShallow(SweepContext& tcx, Node& node) +{ + double height; + + if (tcx.basin.left_highest) { + height = tcx.basin.left_node->point->y - node.point->y; + } else { + height = tcx.basin.right_node->point->y - node.point->y; + } + + // if shallow stop filling + if (tcx.basin.width > height) { + return true; + } + return false; +} + +void Sweep::FillEdgeEvent(SweepContext& tcx, Edge* edge, Node* node) +{ + if (tcx.edge_event.right) { + FillRightAboveEdgeEvent(tcx, edge, node); + } else { + FillLeftAboveEdgeEvent(tcx, edge, node); + } +} + +void Sweep::FillRightAboveEdgeEvent(SweepContext& tcx, Edge* edge, Node* node) +{ + while (node->next->point->x < edge->p->x) { + // Check if next node is below the edge + if (Orient2d(*edge->q, *node->next->point, *edge->p) == CCW) { + FillRightBelowEdgeEvent(tcx, edge, *node); + } else { + node = node->next; + } + } +} + +void Sweep::FillRightBelowEdgeEvent(SweepContext& tcx, Edge* edge, Node& node) +{ + if (node.point->x < edge->p->x) { + if (Orient2d(*node.point, *node.next->point, *node.next->next->point) == CCW) { + // Concave + FillRightConcaveEdgeEvent(tcx, edge, node); + } else{ + // Convex + FillRightConvexEdgeEvent(tcx, edge, node); + // Retry this one + FillRightBelowEdgeEvent(tcx, edge, node); + } + } +} + +void Sweep::FillRightConcaveEdgeEvent(SweepContext& tcx, Edge* edge, Node& node) +{ + Fill(tcx, *node.next); + if (node.next->point != edge->p) { + // Next above or below edge? + if (Orient2d(*edge->q, *node.next->point, *edge->p) == CCW) { + // Below + if (Orient2d(*node.point, *node.next->point, *node.next->next->point) == CCW) { + // Next is concave + FillRightConcaveEdgeEvent(tcx, edge, node); + } else { + // Next is convex + } + } + } + +} + +void Sweep::FillRightConvexEdgeEvent(SweepContext& tcx, Edge* edge, Node& node) +{ + // Next concave or convex? + if (Orient2d(*node.next->point, *node.next->next->point, *node.next->next->next->point) == CCW) { + // Concave + FillRightConcaveEdgeEvent(tcx, edge, *node.next); + } else{ + // Convex + // Next above or below edge? + if (Orient2d(*edge->q, *node.next->next->point, *edge->p) == CCW) { + // Below + FillRightConvexEdgeEvent(tcx, edge, *node.next); + } else{ + // Above + } + } +} + +void Sweep::FillLeftAboveEdgeEvent(SweepContext& tcx, Edge* edge, Node* node) +{ + while (node->prev->point->x > edge->p->x) { + // Check if next node is below the edge + if (Orient2d(*edge->q, *node->prev->point, *edge->p) == CW) { + FillLeftBelowEdgeEvent(tcx, edge, *node); + } else { + node = node->prev; + } + } +} + +void Sweep::FillLeftBelowEdgeEvent(SweepContext& tcx, Edge* edge, Node& node) +{ + if (node.point->x > edge->p->x) { + if (Orient2d(*node.point, *node.prev->point, *node.prev->prev->point) == CW) { + // Concave + FillLeftConcaveEdgeEvent(tcx, edge, node); + } else { + // Convex + FillLeftConvexEdgeEvent(tcx, edge, node); + // Retry this one + FillLeftBelowEdgeEvent(tcx, edge, node); + } + } +} + +void Sweep::FillLeftConvexEdgeEvent(SweepContext& tcx, Edge* edge, Node& node) +{ + // Next concave or convex? + if (Orient2d(*node.prev->point, *node.prev->prev->point, *node.prev->prev->prev->point) == CW) { + // Concave + FillLeftConcaveEdgeEvent(tcx, edge, *node.prev); + } else{ + // Convex + // Next above or below edge? + if (Orient2d(*edge->q, *node.prev->prev->point, *edge->p) == CW) { + // Below + FillLeftConvexEdgeEvent(tcx, edge, *node.prev); + } else{ + // Above + } + } +} + +void Sweep::FillLeftConcaveEdgeEvent(SweepContext& tcx, Edge* edge, Node& node) +{ + Fill(tcx, *node.prev); + if (node.prev->point != edge->p) { + // Next above or below edge? + if (Orient2d(*edge->q, *node.prev->point, *edge->p) == CW) { + // Below + if (Orient2d(*node.point, *node.prev->point, *node.prev->prev->point) == CW) { + // Next is concave + FillLeftConcaveEdgeEvent(tcx, edge, node); + } else{ + // Next is convex + } + } + } + +} + +void Sweep::FlipEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle* t, Point& p) +{ + Triangle& ot = t->NeighborAcross(p); + Point& op = *ot.OppositePoint(*t, p); + + if (&ot == NULL) { + // If we want to integrate the fillEdgeEvent do it here + // With current implementation we should never get here + //throw new RuntimeException( "[BUG:FIXME] FLIP failed due to missing triangle"); + assert(0); + } + + if (InScanArea(p, *t->PointCCW(p), *t->PointCW(p), op)) { + // Lets rotate shared edge one vertex CW + RotateTrianglePair(*t, p, ot, op); + tcx.MapTriangleToNodes(*t); + tcx.MapTriangleToNodes(ot); + + if (p == eq && op == ep) { + if (eq == *tcx.edge_event.constrained_edge->q && ep == *tcx.edge_event.constrained_edge->p) { + t->MarkConstrainedEdge(&ep, &eq); + ot.MarkConstrainedEdge(&ep, &eq); + Legalize(tcx, *t); + Legalize(tcx, ot); + } else { + // XXX: I think one of the triangles should be legalized here? + } + } else { + Orientation o = Orient2d(eq, op, ep); + t = &NextFlipTriangle(tcx, (int)o, *t, ot, p, op); + FlipEdgeEvent(tcx, ep, eq, t, p); + } + } else { + Point& newP = NextFlipPoint(ep, eq, ot, op); + FlipScanEdgeEvent(tcx, ep, eq, *t, ot, newP); + EdgeEvent(tcx, ep, eq, t, p); + } +} + +Triangle& Sweep::NextFlipTriangle(SweepContext& tcx, int o, Triangle& t, Triangle& ot, Point& p, Point& op) +{ + if (o == CCW) { + // ot is not crossing edge after flip + int edge_index = ot.EdgeIndex(&p, &op); + ot.delaunay_edge[edge_index] = true; + Legalize(tcx, ot); + ot.ClearDelunayEdges(); + return t; + } + + // t is not crossing edge after flip + int edge_index = t.EdgeIndex(&p, &op); + + t.delaunay_edge[edge_index] = true; + Legalize(tcx, t); + t.ClearDelunayEdges(); + return ot; +} + +Point& Sweep::NextFlipPoint(Point& ep, Point& eq, Triangle& ot, Point& op) +{ + Orientation o2d = Orient2d(eq, op, ep); + if (o2d == CW) { + // Right + return *ot.PointCCW(op); + } else if (o2d == CCW) { + // Left + return *ot.PointCW(op); + } else{ + //throw new RuntimeException("[Unsupported] Opposing point on constrained edge"); + assert(0); + } +} + +void Sweep::FlipScanEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle& flip_triangle, + Triangle& t, Point& p) +{ + Triangle& ot = t.NeighborAcross(p); + Point& op = *ot.OppositePoint(t, p); + + if (&t.NeighborAcross(p) == NULL) { + // If we want to integrate the fillEdgeEvent do it here + // With current implementation we should never get here + //throw new RuntimeException( "[BUG:FIXME] FLIP failed due to missing triangle"); + assert(0); + } + + if (InScanArea(eq, *flip_triangle.PointCCW(eq), *flip_triangle.PointCW(eq), op)) { + // flip with new edge op->eq + FlipEdgeEvent(tcx, eq, op, &ot, op); + // TODO: Actually I just figured out that it should be possible to + // improve this by getting the next ot and op before the the above + // flip and continue the flipScanEdgeEvent here + // set new ot and op here and loop back to inScanArea test + // also need to set a new flip_triangle first + // Turns out at first glance that this is somewhat complicated + // so it will have to wait. + } else{ + Point& newP = NextFlipPoint(ep, eq, ot, op); + FlipScanEdgeEvent(tcx, ep, eq, flip_triangle, ot, newP); + } +} + +Sweep::~Sweep() { + + // Clean up memory + for(int i = 0; i < nodes_.size(); i++) { + delete nodes_[i]; + } + +} + +} + diff --git a/polygon/poly2tri/sweep/sweep.h b/polygon/poly2tri/sweep/sweep.h new file mode 100644 index 0000000000..f62c4cc3f2 --- /dev/null +++ b/polygon/poly2tri/sweep/sweep.h @@ -0,0 +1,285 @@ +/* + * Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors + * http://code.google.com/p/poly2tri/ + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of Poly2Tri nor the names of its contributors may be + * used to endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +/** + * Sweep-line, Constrained Delauney Triangulation (CDT) See: Domiter, V. and + * Zalik, B.(2008)'Sweep-line algorithm for constrained Delaunay triangulation', + * International Journal of Geographical Information Science + * + * "FlipScan" Constrained Edge Algorithm invented by Thomas Åhlén, thahlen@gmail.com + */ + +#ifndef SWEEP_H +#define SWEEP_H + +#include + +namespace p2t { + +class SweepContext; +struct Node; +struct Point; +struct Edge; +class Triangle; + +class Sweep +{ +public: + + /** + * Triangulate + * + * @param tcx + */ + void Triangulate(SweepContext& tcx); + + /** + * Destructor - clean up memory + */ + ~Sweep(); + +private: + + /** + * Start sweeping the Y-sorted point set from bottom to top + * + * @param tcx + */ + void SweepPoints(SweepContext& tcx); + + /** + * Find closes node to the left of the new point and + * create a new triangle. If needed new holes and basins + * will be filled to. + * + * @param tcx + * @param point + * @return + */ + Node& PointEvent(SweepContext& tcx, Point& point); + + /** + * + * + * @param tcx + * @param edge + * @param node + */ + void EdgeEvent(SweepContext& tcx, Edge* edge, Node* node); + + void EdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle* triangle, Point& point); + + /** + * Creates a new front triangle and legalize it + * + * @param tcx + * @param point + * @param node + * @return + */ + Node& NewFrontTriangle(SweepContext& tcx, Point& point, Node& node); + + /** + * Adds a triangle to the advancing front to fill a hole. + * @param tcx + * @param node - middle node, that is the bottom of the hole + */ + void Fill(SweepContext& tcx, Node& node); + + /** + * Returns true if triangle was legalized + */ + bool Legalize(SweepContext& tcx, Triangle& t); + + /** + * Requirement:
+ * 1. a,b and c form a triangle.
+ * 2. a and d is know to be on opposite side of bc
+ *
+   *                a
+   *                +
+   *               / \
+   *              /   \
+   *            b/     \c
+   *            +-------+
+   *           /    d    \
+   *          /           \
+   * 
+ * Fact: d has to be in area B to have a chance to be inside the circle formed by + * a,b and c
+ * d is outside B if orient2d(a,b,d) or orient2d(c,a,d) is CW
+ * This preknowledge gives us a way to optimize the incircle test + * @param a - triangle point, opposite d + * @param b - triangle point + * @param c - triangle point + * @param d - point opposite a + * @return true if d is inside circle, false if on circle edge + */ + bool Incircle(Point& pa, Point& pb, Point& pc, Point& pd); + + /** + * Rotates a triangle pair one vertex CW + *
+   *       n2                    n2
+   *  P +-----+             P +-----+
+   *    | t  /|               |\  t |
+   *    |   / |               | \   |
+   *  n1|  /  |n3           n1|  \  |n3
+   *    | /   |    after CW   |   \ |
+   *    |/ oT |               | oT \|
+   *    +-----+ oP            +-----+
+   *       n4                    n4
+   * 
+ */ + void RotateTrianglePair(Triangle& t, Point& p, Triangle& ot, Point& op); + + /** + * Fills holes in the Advancing Front + * + * + * @param tcx + * @param n + */ + void FillAdvancingFront(SweepContext& tcx, Node& n); + + // Decision-making about when to Fill hole. + // Contributed by ToolmakerSteve2 + bool LargeHole_DontFill(Node* node); + bool AngleExceeds90Degrees(Point* origin, Point* pa, Point* pb); + bool AngleExceedsPlus90DegreesOrIsNegative(Point* origin, Point* pa, Point* pb); + double Angle(Point& origin, Point& pa, Point& pb); + + /** + * + * @param node - middle node + * @return the angle between 3 front nodes + */ + double HoleAngle(Node& node); + + /** + * The basin angle is decided against the horizontal line [1,0] + */ + double BasinAngle(Node& node); + + /** + * Fills a basin that has formed on the Advancing Front to the right + * of given node.
+ * First we decide a left,bottom and right node that forms the + * boundaries of the basin. Then we do a reqursive fill. + * + * @param tcx + * @param node - starting node, this or next node will be left node + */ + void FillBasin(SweepContext& tcx, Node& node); + + /** + * Recursive algorithm to fill a Basin with triangles + * + * @param tcx + * @param node - bottom_node + * @param cnt - counter used to alternate on even and odd numbers + */ + void FillBasinReq(SweepContext& tcx, Node* node); + + bool IsShallow(SweepContext& tcx, Node& node); + + bool IsEdgeSideOfTriangle(Triangle& triangle, Point& ep, Point& eq); + + void FillEdgeEvent(SweepContext& tcx, Edge* edge, Node* node); + + void FillRightAboveEdgeEvent(SweepContext& tcx, Edge* edge, Node* node); + + void FillRightBelowEdgeEvent(SweepContext& tcx, Edge* edge, Node& node); + + void FillRightConcaveEdgeEvent(SweepContext& tcx, Edge* edge, Node& node); + + void FillRightConvexEdgeEvent(SweepContext& tcx, Edge* edge, Node& node); + + void FillLeftAboveEdgeEvent(SweepContext& tcx, Edge* edge, Node* node); + + void FillLeftBelowEdgeEvent(SweepContext& tcx, Edge* edge, Node& node); + + void FillLeftConcaveEdgeEvent(SweepContext& tcx, Edge* edge, Node& node); + + void FillLeftConvexEdgeEvent(SweepContext& tcx, Edge* edge, Node& node); + + void FlipEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle* t, Point& p); + + /** + * After a flip we have two triangles and know that only one will still be + * intersecting the edge. So decide which to contiune with and legalize the other + * + * @param tcx + * @param o - should be the result of an orient2d( eq, op, ep ) + * @param t - triangle 1 + * @param ot - triangle 2 + * @param p - a point shared by both triangles + * @param op - another point shared by both triangles + * @return returns the triangle still intersecting the edge + */ + Triangle& NextFlipTriangle(SweepContext& tcx, int o, Triangle& t, Triangle& ot, Point& p, Point& op); + + /** + * When we need to traverse from one triangle to the next we need + * the point in current triangle that is the opposite point to the next + * triangle. + * + * @param ep + * @param eq + * @param ot + * @param op + * @return + */ + Point& NextFlipPoint(Point& ep, Point& eq, Triangle& ot, Point& op); + + /** + * Scan part of the FlipScan algorithm
+ * When a triangle pair isn't flippable we will scan for the next + * point that is inside the flip triangle scan area. When found + * we generate a new flipEdgeEvent + * + * @param tcx + * @param ep - last point on the edge we are traversing + * @param eq - first point on the edge we are traversing + * @param flipTriangle - the current triangle sharing the point eq with edge + * @param t + * @param p + */ + void FlipScanEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle& flip_triangle, Triangle& t, Point& p); + + void FinalizationPolygon(SweepContext& tcx); + + std::vector nodes_; + +}; + +} + +#endif diff --git a/polygon/poly2tri/sweep/sweep_context.cc b/polygon/poly2tri/sweep/sweep_context.cc new file mode 100644 index 0000000000..6c0b0447dd --- /dev/null +++ b/polygon/poly2tri/sweep/sweep_context.cc @@ -0,0 +1,216 @@ +/* + * Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors + * http://code.google.com/p/poly2tri/ + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of Poly2Tri nor the names of its contributors may be + * used to endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "sweep_context.h" +#include +#include "advancing_front.h" + +namespace p2t { + +SweepContext::SweepContext(std::vector polyline) : + front_(0), + head_(0), + tail_(0), + af_head_(0), + af_middle_(0), + af_tail_(0) +{ + basin = Basin(); + edge_event = EdgeEvent(); + + points_ = polyline; + + InitEdges(points_); +} + +void SweepContext::AddHole(std::vector polyline) +{ + InitEdges(polyline); + for(unsigned int i = 0; i < polyline.size(); i++) { + points_.push_back(polyline[i]); + } +} + +void SweepContext::AddPoint(Point* point) { + points_.push_back(point); +} + +std::vector SweepContext::GetTriangles() +{ + return triangles_; +} + +std::list SweepContext::GetMap() +{ + return map_; +} + +void SweepContext::InitTriangulation() +{ + double xmax(points_[0]->x), xmin(points_[0]->x); + double ymax(points_[0]->y), ymin(points_[0]->y); + + // Calculate bounds. + for (unsigned int i = 0; i < points_.size(); i++) { + Point& p = *points_[i]; + if (p.x > xmax) + xmax = p.x; + if (p.x < xmin) + xmin = p.x; + if (p.y > ymax) + ymax = p.y; + if (p.y < ymin) + ymin = p.y; + } + + double dx = kAlpha * (xmax - xmin); + double dy = kAlpha * (ymax - ymin); + head_ = new Point(xmax + dx, ymin - dy); + tail_ = new Point(xmin - dx, ymin - dy); + + // Sort points along y-axis + std::sort(points_.begin(), points_.end(), cmp); + +} + +void SweepContext::InitEdges(std::vector polyline) +{ + int num_points = polyline.size(); + for (int i = 0; i < num_points; i++) { + int j = i < num_points - 1 ? i + 1 : 0; + edge_list.push_back(new Edge(*polyline[i], *polyline[j])); + } +} + +Point* SweepContext::GetPoint(const int& index) +{ + return points_[index]; +} + +void SweepContext::AddToMap(Triangle* triangle) +{ + map_.push_back(triangle); +} + +Node& SweepContext::LocateNode(Point& point) +{ + // TODO implement search tree + return *front_->LocateNode(point.x); +} + +void SweepContext::CreateAdvancingFront(std::vector nodes) +{ + + (void) nodes; + // Initial triangle + Triangle* triangle = new Triangle(*points_[0], *tail_, *head_); + + map_.push_back(triangle); + + af_head_ = new Node(*triangle->GetPoint(1), *triangle); + af_middle_ = new Node(*triangle->GetPoint(0), *triangle); + af_tail_ = new Node(*triangle->GetPoint(2)); + front_ = new AdvancingFront(*af_head_, *af_tail_); + + // TODO: More intuitive if head is middles next and not previous? + // so swap head and tail + af_head_->next = af_middle_; + af_middle_->next = af_tail_; + af_middle_->prev = af_head_; + af_tail_->prev = af_middle_; +} + +void SweepContext::RemoveNode(Node* node) +{ + delete node; +} + +void SweepContext::MapTriangleToNodes(Triangle& t) +{ + for (int i = 0; i < 3; i++) { + if (!t.GetNeighbor(i)) { + Node* n = front_->LocatePoint(t.PointCW(*t.GetPoint(i))); + if (n) + n->triangle = &t; + } + } +} + +void SweepContext::RemoveFromMap(Triangle* triangle) +{ + map_.remove(triangle); +} + +void SweepContext::MeshClean(Triangle& triangle) +{ + std::vector triangles; + triangles.push_back(&triangle); + + while(!triangles.empty()){ + Triangle *t = triangles.back(); + triangles.pop_back(); + + if (t != NULL && !t->IsInterior()) { + t->IsInterior(true); + triangles_.push_back(t); + for (int i = 0; i < 3; i++) { + if (!t->constrained_edge[i]) + triangles.push_back(t->GetNeighbor(i)); + } + } + } +} + +SweepContext::~SweepContext() +{ + + // Clean up memory + + delete head_; + delete tail_; + delete front_; + delete af_head_; + delete af_middle_; + delete af_tail_; + + typedef std::list type_list; + + for(type_list::iterator iter = map_.begin(); iter != map_.end(); ++iter) { + Triangle* ptr = *iter; + delete ptr; + } + + for(unsigned int i = 0; i < edge_list.size(); i++) { + delete edge_list[i]; + } + +} + +} diff --git a/polygon/poly2tri/sweep/sweep_context.h b/polygon/poly2tri/sweep/sweep_context.h new file mode 100644 index 0000000000..266408dc2e --- /dev/null +++ b/polygon/poly2tri/sweep/sweep_context.h @@ -0,0 +1,186 @@ +/* + * Poly2Tri Copyright (c) 2009-2010, Poly2Tri Contributors + * http://code.google.com/p/poly2tri/ + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of Poly2Tri nor the names of its contributors may be + * used to endorse or promote products derived from this software without specific + * prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef SWEEP_CONTEXT_H +#define SWEEP_CONTEXT_H + +#include +#include +#include + +namespace p2t { + +// Inital triangle factor, seed triangle will extend 30% of +// PointSet width to both left and right. +const double kAlpha = 0.3; + +struct Point; +class Triangle; +struct Node; +struct Edge; +class AdvancingFront; + +class SweepContext { +public: + +/// Constructor +SweepContext(std::vector polyline); +/// Destructor +~SweepContext(); + +void set_head(Point* p1); + +Point* head(); + +void set_tail(Point* p1); + +Point* tail(); + +int point_count(); + +Node& LocateNode(Point& point); + +void RemoveNode(Node* node); + +void CreateAdvancingFront(std::vector nodes); + +/// Try to map a node to all sides of this triangle that don't have a neighbor +void MapTriangleToNodes(Triangle& t); + +void AddToMap(Triangle* triangle); + +Point* GetPoint(const int& index); + +Point* GetPoints(); + +void RemoveFromMap(Triangle* triangle); + +void AddHole(std::vector polyline); + +void AddPoint(Point* point); + +AdvancingFront* front(); + +void MeshClean(Triangle& triangle); + +std::vector GetTriangles(); +std::list GetMap(); + +std::vector edge_list; + +struct Basin { + Node* left_node; + Node* bottom_node; + Node* right_node; + double width; + bool left_highest; + + Basin() : left_node(NULL), bottom_node(NULL), right_node(NULL), width(0.0), left_highest(false) + { + } + + void Clear() + { + left_node = NULL; + bottom_node = NULL; + right_node = NULL; + width = 0.0; + left_highest = false; + } +}; + +struct EdgeEvent { + Edge* constrained_edge; + bool right; + + EdgeEvent() : constrained_edge(NULL), right(false) + { + } +}; + +Basin basin; +EdgeEvent edge_event; + +private: + +friend class Sweep; + +std::vector triangles_; +std::list map_; +std::vector points_; + +// Advancing front +AdvancingFront* front_; +// head point used with advancing front +Point* head_; +// tail point used with advancing front +Point* tail_; + +Node *af_head_, *af_middle_, *af_tail_; + +void InitTriangulation(); +void InitEdges(std::vector polyline); + +}; + +inline AdvancingFront* SweepContext::front() +{ + return front_; +} + +inline int SweepContext::point_count() +{ + return points_.size(); +} + +inline void SweepContext::set_head(Point* p1) +{ + head_ = p1; +} + +inline Point* SweepContext::head() +{ + return head_; +} + +inline void SweepContext::set_tail(Point* p1) +{ + tail_ = p1; +} + +inline Point* SweepContext::tail() +{ + return tail_; +} + +} + +#endif From a6cbdccadc843bc7d1e44991ecfcfb2d54859949 Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Fri, 13 Sep 2013 15:28:51 +0200 Subject: [PATCH 324/415] common/profile.h: fix incorrect #endif --- common/profile.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/profile.h b/common/profile.h index 82ecdf199e..f779dfae59 100644 --- a/common/profile.h +++ b/common/profile.h @@ -27,8 +27,8 @@ * @brief Simple profiling functions for measuring code execution time. */ -#ifndef __PROFILE_H -#define __PROFILE_H +#ifndef __TPROFILE_H +#define __TPROFILE_H #include #include @@ -96,7 +96,6 @@ static inline uint64_t get_tics() gettimeofday( &tv, NULL ); return (uint64_t) tv.tv_sec * 1000000ULL + (uint64_t) tv.tv_usec; -#endif } @@ -144,3 +143,5 @@ static inline void prof_end( prof_counter* cnt ) else cnt->value = get_tics() - cnt->value; } + +#endif From 5a461f5bb3465bc70a62f6d3883d2603b077e375 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 13 Sep 2013 15:30:45 +0200 Subject: [PATCH 325/415] Caps for lines are drawn only when segments are wider than 1.0 --- common/gal/opengl/opengl_gal.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index f1b9b95031..07b5238cf1 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -233,8 +233,11 @@ void OPENGL_GAL::DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoin drawLineQuad( aStartPoint, aEndPoint ); // Line caps - drawFilledSemiCircle( aStartPoint, lineWidth / 2, lineAngle + M_PI / 2 ); - drawFilledSemiCircle( aEndPoint, lineWidth / 2, lineAngle - M_PI / 2 ); + if( lineWidth > 1.0 ) + { + drawFilledSemiCircle( aStartPoint, lineWidth / 2, lineAngle + M_PI / 2 ); + drawFilledSemiCircle( aEndPoint, lineWidth / 2, lineAngle - M_PI / 2 ); + } } From 5700075b7a117ae9f1f8a752a58458d8a9d4c83a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 13 Sep 2013 15:31:19 +0200 Subject: [PATCH 326/415] Added missing functions for checking type of keyboard event --- include/tool/tool_event.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index 1033a2f51a..592624c321 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -229,6 +229,16 @@ public: return m_keyCode; } + bool IsKeyUp() const + { + return m_actions == TA_KeyUp; + } + + bool IsKeyDown() const + { + return m_actions == TA_KeyDown; + } + void Ignore(); void SetMouseDragOrigin( const VECTOR2D &aP ) From 1b00dede02b568458a9ca8248b6b22bd9fc01244 Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Fri, 13 Sep 2013 15:43:33 +0200 Subject: [PATCH 327/415] geometry: r-tree based shape index --- include/geometry/rtree.h | 1908 +++++++++++++++++++++++++++ include/geometry/shape_index.h | 515 ++++---- include/geometry/shape_index_list.h | 290 ++++ 3 files changed, 2487 insertions(+), 226 deletions(-) create mode 100644 include/geometry/rtree.h create mode 100644 include/geometry/shape_index_list.h diff --git a/include/geometry/rtree.h b/include/geometry/rtree.h new file mode 100644 index 0000000000..d64d7a074a --- /dev/null +++ b/include/geometry/rtree.h @@ -0,0 +1,1908 @@ +//TITLE +// +// R-TREES: A DYNAMIC INDEX STRUCTURE FOR SPATIAL SEARCHING +// +//DESCRIPTION +// +// A C++ templated version of the RTree algorithm. +// For more information please read the comments in RTree.h +// +//AUTHORS +// +// * 1983 Original algorithm and test code by Antonin Guttman and Michael Stonebraker, UC Berkely +// * 1994 ANCI C ported from original test code by Melinda Green - melinda@superliminal.com +// * 1995 Sphere volume fix for degeneracy problem submitted by Paul Brook +// * 2004 Templated C++ port by Greg Douglas +// * 2013 CERN (www.cern.ch) +// +//LICENSE: +// +// Entirely free for all uses. Enjoy! + +#ifndef RTREE_H +#define RTREE_H + +// NOTE This file compiles under MSVC 6 SP5 and MSVC .Net 2003 it may not work on other compilers without modification. + +// NOTE These next few lines may be win32 specific, you may need to modify them to compile on other platform +#include +#include +#include +#include + +#define ASSERT assert // RTree uses ASSERT( condition ) +#ifndef Min + #define Min std::min +#endif // Min +#ifndef Max + #define Max std::max +#endif // Max + +// +// RTree.h +// + +#define RTREE_TEMPLATE template +#define RTREE_SEARCH_TEMPLATE template +#define RTREE_QUAL RTree +#define RTREE_SEARCH_QUAL RTree + +#define RTREE_DONT_USE_MEMPOOLS // This version does not contain a fixed memory allocator, fill in lines with EXAMPLE to implement one. +#define RTREE_USE_SPHERICAL_VOLUME // Better split classification, may be slower on some systems + +// Fwd decl +class RTFileStream; // File I/O helper class, look below for implementation and notes. + + +/// \class RTree +/// Implementation of RTree, a multidimensional bounding rectangle tree. +/// Example usage: For a 3-dimensional tree use RTree myTree; +/// +/// This modified, templated C++ version by Greg Douglas at Auran (http://www.auran.com) +/// +/// DATATYPE Referenced data, should be int, void*, obj* etc. no larger than sizeof and simple type +/// ELEMTYPE Type of element such as int or float +/// NUMDIMS Number of dimensions such as 2 or 3 +/// ELEMTYPEREAL Type of element that allows fractional and large values such as float or double, for use in volume calcs +/// +/// NOTES: Inserting and removing data requires the knowledge of its constant Minimal Bounding Rectangle. +/// This version uses new/delete for nodes, I recommend using a fixed size allocator for efficiency. +/// Instead of using a callback function for returned results, I recommend and efficient pre-sized, grow-only memory +/// array similar to MFC CArray or STL Vector for returning search query result. +/// +template +class RTree +{ +protected: + + struct Node; // Fwd decl. Used by other internal structs and iterator +public: + + // These constant must be declared after Branch and before Node struct + // Stuck up here for MSVC 6 compiler. NSVC .NET 2003 is much happier. + enum { + MAXNODES = TMAXNODES, ///< Max elements in node + MINNODES = TMINNODES, ///< Min elements in node + }; + + struct Statistics { + int maxDepth; + int avgDepth; + + int maxNodeLoad; + int avgNodeLoad; + int totalItems; + }; + +public: + + RTree(); + virtual ~RTree(); + + /// Insert entry + /// \param a_min Min of bounding rect + /// \param a_max Max of bounding rect + /// \param a_dataId Positive Id of data. Maybe zero, but negative numbers not allowed. + void Insert( const ELEMTYPE a_min[NUMDIMS], + const ELEMTYPE a_max[NUMDIMS], + const DATATYPE& a_dataId ); + + /// Remove entry + /// \param a_min Min of bounding rect + /// \param a_max Max of bounding rect + /// \param a_dataId Positive Id of data. Maybe zero, but negative numbers not allowed. + void Remove( const ELEMTYPE a_min[NUMDIMS], + const ELEMTYPE a_max[NUMDIMS], + const DATATYPE& a_dataId ); + + /// Find all within search rectangle + /// \param a_min Min of search bounding rect + /// \param a_max Max of search bounding rect + /// \param a_searchResult Search result array. Caller should set grow size. Function will reset, not append to array. + /// \param a_resultCallback Callback function to return result. Callback should return 'true' to continue searching + /// \param a_context User context to pass as parameter to a_resultCallback + /// \return Returns the number of entries found + int Search( const ELEMTYPE a_min[NUMDIMS], + const ELEMTYPE a_max[NUMDIMS], + bool a_resultCallback( DATATYPE a_data, void* a_context ), + void* a_context ); + + template + int Search( const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], VISITOR& a_visitor ) + { + #ifdef _DEBUG + + for( int index = 0; index 0; } + + /// Access the current data element. Caller must be sure iterator is not NULL first. + DATATYPE& operator*() + { + ASSERT( IsNotNull() ); + StackElement& curTos = m_stack[m_tos - 1]; + return curTos.m_node->m_branch[curTos.m_branchIndex].m_data; + } + + /// Access the current data element. Caller must be sure iterator is not NULL first. + const DATATYPE& operator*() const + { + ASSERT( IsNotNull() ); + StackElement& curTos = m_stack[m_tos - 1]; + return curTos.m_node->m_branch[curTos.m_branchIndex].m_data; + } + + /// Find the next data element + bool operator++() { return FindNextData(); } + + /// Get the bounds for this node + void GetBounds( ELEMTYPE a_min[NUMDIMS], ELEMTYPE a_max[NUMDIMS] ) + { + ASSERT( IsNotNull() ); + StackElement& curTos = m_stack[m_tos - 1]; + Branch& curBranch = curTos.m_node->m_branch[curTos.m_branchIndex]; + + for( int index = 0; index < NUMDIMS; ++index ) + { + a_min[index] = curBranch.m_rect.m_min[index]; + a_max[index] = curBranch.m_rect.m_max[index]; + } + } + + private: + + /// Reset iterator + void Init() { m_tos = 0; } + + /// Find the next data element in the tree (For internal use only) + bool FindNextData() + { + for( ; ; ) + { + if( m_tos <= 0 ) + { + return false; + } + + StackElement curTos = Pop(); // Copy stack top cause it may change as we use it + + if( curTos.m_node->IsLeaf() ) + { + // Keep walking through data while we can + if( curTos.m_branchIndex + 1 < curTos.m_node->m_count ) + { + // There is more data, just point to the next one + Push( curTos.m_node, curTos.m_branchIndex + 1 ); + return true; + } + + // No more data, so it will fall back to previous level + } + else + { + if( curTos.m_branchIndex + 1 < curTos.m_node->m_count ) + { + // Push sibling on for future tree walk + // This is the 'fall back' node when we finish with the current level + Push( curTos.m_node, curTos.m_branchIndex + 1 ); + } + + // Since cur node is not a leaf, push first of next level to get deeper into the tree + Node* nextLevelnode = curTos.m_node->m_branch[curTos.m_branchIndex].m_child; + Push( nextLevelnode, 0 ); + + // If we pushed on a new leaf, exit as the data is ready at TOS + if( nextLevelnode->IsLeaf() ) + { + return true; + } + } + } + } + + /// Push node and branch onto iteration stack (For internal use only) + void Push( Node* a_node, int a_branchIndex ) + { + m_stack[m_tos].m_node = a_node; + m_stack[m_tos].m_branchIndex = a_branchIndex; + ++m_tos; + ASSERT( m_tos <= MAX_STACK ); + } + + /// Pop element off iteration stack (For internal use only) + StackElement& Pop() + { + ASSERT( m_tos > 0 ); + --m_tos; + return m_stack[m_tos]; + } + + StackElement m_stack[MAX_STACK]; ///< Stack as we are doing iteration instead of recursion + int m_tos; ///< Top Of Stack index + + friend class RTree; // Allow hiding of non-public functions while allowing manipulation by logical owner + }; + + + /// Get 'first' for iteration + void GetFirst( Iterator& a_it ) + { + a_it.Init(); + Node* first = m_root; + + while( first ) + { + if( first->IsInternalNode() && first->m_count > 1 ) + { + a_it.Push( first, 1 ); // Descend sibling branch later + } + else if( first->IsLeaf() ) + { + if( first->m_count ) + { + a_it.Push( first, 0 ); + } + + break; + } + + first = first->m_branch[0].m_child; + } + } + + /// Get Next for iteration + void GetNext( Iterator& a_it ) { ++a_it; } + + /// Is iterator NULL, or at end? + bool IsNull( Iterator& a_it ) { return a_it.IsNull(); } + + /// Get object at iterator position + DATATYPE& GetAt( Iterator& a_it ) { return *a_it; } +protected: + + /// Minimal bounding rectangle (n-dimensional) + struct Rect + { + ELEMTYPE m_min[NUMDIMS]; ///< Min dimensions of bounding box + ELEMTYPE m_max[NUMDIMS]; ///< Max dimensions of bounding box + }; + + /// May be data or may be another subtree + /// The parents level determines this. + /// If the parents level is 0, then this is data + struct Branch + { + Rect m_rect; ///< Bounds + union + { + Node* m_child; ///< Child node + DATATYPE m_data; ///< Data Id or Ptr + }; + }; + + /// Node for each branch level + struct Node + { + bool IsInternalNode() { return m_level > 0; } // Not a leaf, but a internal node + bool IsLeaf() { return m_level == 0; } // A leaf, contains data + + int m_count; ///< Count + int m_level; ///< Leaf is zero, others positive + Branch m_branch[MAXNODES]; ///< Branch + }; + + /// A link list of nodes for reinsertion after a delete operation + struct ListNode + { + ListNode* m_next; ///< Next in list + Node* m_node; ///< Node + }; + + /// Variables for finding a split partition + struct PartitionVars + { + int m_partition[MAXNODES + 1]; + int m_total; + int m_minFill; + int m_taken[MAXNODES + 1]; + int m_count[2]; + Rect m_cover[2]; + ELEMTYPEREAL m_area[2]; + + Branch m_branchBuf[MAXNODES + 1]; + int m_branchCount; + Rect m_coverSplit; + ELEMTYPEREAL m_coverSplitArea; + }; + + /// Data structure used for Nearest Neighbor search implementation + struct NNNode + { + Branch m_branch; + ELEMTYPE minDist; + bool isLeaf; + }; + + Node* AllocNode(); + void FreeNode( Node* a_node ); + void InitNode( Node* a_node ); + void InitRect( Rect* a_rect ); + bool InsertRectRec( Rect* a_rect, + const DATATYPE& a_id, + Node* a_node, + Node** a_newNode, + int a_level ); + bool InsertRect( Rect* a_rect, const DATATYPE& a_id, Node** a_root, int a_level ); + Rect NodeCover( Node* a_node ); + bool AddBranch( Branch* a_branch, Node* a_node, Node** a_newNode ); + void DisconnectBranch( Node* a_node, int a_index ); + int PickBranch( Rect* a_rect, Node* a_node ); + Rect CombineRect( Rect* a_rectA, Rect* a_rectB ); + void SplitNode( Node* a_node, Branch* a_branch, Node** a_newNode ); + ELEMTYPEREAL RectSphericalVolume( Rect* a_rect ); + ELEMTYPEREAL RectVolume( Rect* a_rect ); + ELEMTYPEREAL CalcRectVolume( Rect* a_rect ); + void GetBranches( Node* a_node, Branch* a_branch, PartitionVars* a_parVars ); + void ChoosePartition( PartitionVars* a_parVars, int a_minFill ); + void LoadNodes( Node* a_nodeA, Node* a_nodeB, PartitionVars* a_parVars ); + void InitParVars( PartitionVars* a_parVars, int a_maxRects, int a_minFill ); + void PickSeeds( PartitionVars* a_parVars ); + void Classify( int a_index, int a_group, PartitionVars* a_parVars ); + bool RemoveRect( Rect* a_rect, const DATATYPE& a_id, Node** a_root ); + bool RemoveRectRec( Rect* a_rect, + const DATATYPE& a_id, + Node* a_node, + ListNode** a_listNode ); + ListNode* AllocListNode(); + void FreeListNode( ListNode* a_listNode ); + bool Overlap( Rect* a_rectA, Rect* a_rectB ); + void ReInsert( Node* a_node, ListNode** a_listNode ); + ELEMTYPE MinDist( const ELEMTYPE a_point[NUMDIMS], Rect* a_rect ); + void InsertNNListSorted( std::vector* nodeList, NNNode* newNode ); + + bool Search( Node * a_node, Rect * a_rect, int& a_foundCount, bool a_resultCallback( + DATATYPE a_data, + void* a_context ), void* a_context ); + + template + bool Search( Node* a_node, Rect* a_rect, VISITOR& a_visitor, int& a_foundCount ) + { + ASSERT( a_node ); + ASSERT( a_node->m_level >= 0 ); + ASSERT( a_rect ); + + if( a_node->IsInternalNode() ) // This is an internal node in the tree + { + for( int index = 0; index < a_node->m_count; ++index ) + { + if( Overlap( a_rect, &a_node->m_branch[index].m_rect ) ) + { + if( !Search( a_node->m_branch[index].m_child, a_rect, a_visitor, a_foundCount ) ) + { + return false; // Don't continue searching + } + } + } + } + else // This is a leaf node + { + for( int index = 0; index < a_node->m_count; ++index ) + { + if( Overlap( a_rect, &a_node->m_branch[index].m_rect ) ) + { + DATATYPE& id = a_node->m_branch[index].m_data; + + if( !a_visitor( id ) ) + return false; + + a_foundCount++; + } + } + } + + return true; // Continue searching + } + + void RemoveAllRec( Node* a_node ); + void Reset(); + void CountRec( Node* a_node, int& a_count ); + + bool SaveRec( Node* a_node, RTFileStream& a_stream ); + bool LoadRec( Node* a_node, RTFileStream& a_stream ); + + Node* m_root; ///< Root of tree + ELEMTYPEREAL m_unitSphereVolume; ///< Unit sphere constant for required number of dimensions +}; + + +// Because there is not stream support, this is a quick and dirty file I/O helper. +// Users will likely replace its usage with a Stream implementation from their favorite API. +class RTFileStream +{ + FILE* m_file; +public: + + + RTFileStream() + { + m_file = NULL; + } + + ~RTFileStream() + { + Close(); + } + + bool OpenRead( const char* a_fileName ) + { + m_file = fopen( a_fileName, "rb" ); + + if( !m_file ) + { + return false; + } + + return true; + } + + bool OpenWrite( const char* a_fileName ) + { + m_file = fopen( a_fileName, "wb" ); + + if( !m_file ) + { + return false; + } + + return true; + } + + void Close() + { + if( m_file ) + { + fclose( m_file ); + m_file = NULL; + } + } + + template + size_t Write( const TYPE& a_value ) + { + ASSERT( m_file ); + return fwrite( (void*) &a_value, sizeof(a_value), 1, m_file ); + } + + template + size_t WriteArray( const TYPE* a_array, int a_count ) + { + ASSERT( m_file ); + return fwrite( (void*) a_array, sizeof(TYPE) * a_count, 1, m_file ); + } + + template + size_t Read( TYPE& a_value ) + { + ASSERT( m_file ); + return fread( (void*) &a_value, sizeof(a_value), 1, m_file ); + } + + template + size_t ReadArray( TYPE* a_array, int a_count ) + { + ASSERT( m_file ); + return fread( (void*) a_array, sizeof(TYPE) * a_count, 1, m_file ); + } +}; + + +RTREE_TEMPLATE RTREE_QUAL::RTree() +{ + ASSERT( MAXNODES > MINNODES ); + ASSERT( MINNODES > 0 ); + + + // We only support machine word size simple data type eg. integer index or object pointer. + // Since we are storing as union with non data branch + ASSERT( sizeof(DATATYPE) == sizeof(void*) || sizeof(DATATYPE) == sizeof(int) ); + + // Precomputed volumes of the unit spheres for the first few dimensions + const float UNIT_SPHERE_VOLUMES[] = + { + 0.000000f, 2.000000f, 3.141593f, // Dimension 0,1,2 + 4.188790f, 4.934802f, 5.263789f, // Dimension 3,4,5 + 5.167713f, 4.724766f, 4.058712f, // Dimension 6,7,8 + 3.298509f, 2.550164f, 1.884104f, // Dimension 9,10,11 + 1.335263f, 0.910629f, 0.599265f, // Dimension 12,13,14 + 0.381443f, 0.235331f, 0.140981f, // Dimension 15,16,17 + 0.082146f, 0.046622f, 0.025807f, // Dimension 18,19,20 + }; + + m_root = AllocNode(); + m_root->m_level = 0; + m_unitSphereVolume = (ELEMTYPEREAL) UNIT_SPHERE_VOLUMES[NUMDIMS]; +} + + +RTREE_TEMPLATE +RTREE_QUAL::~RTree() { + Reset(); // Free, or reset node memory +} + + +RTREE_TEMPLATE +void RTREE_QUAL::Insert( const ELEMTYPE a_min[NUMDIMS], + const ELEMTYPE a_max[NUMDIMS], + const DATATYPE& a_dataId ) +{ +#ifdef _DEBUG + + for( int index = 0; indexNearestNeighbor( a_point, 0, 0 ); +} + + +RTREE_TEMPLATE +DATATYPE RTREE_QUAL::NearestNeighbor( const ELEMTYPE a_point[NUMDIMS], + ELEMTYPE a_squareDistanceCallback( const ELEMTYPE a_point[NUMDIMS], DATATYPE a_data ), + ELEMTYPE* a_squareDistance ) +{ + typedef typename std::vector::iterator iterator; + std::vector nodeList; + Node* node = m_root; + NNNode* closestNode = 0; + while( !closestNode || !closestNode->isLeaf ) + { + //check every node on this level + for( int index = 0; index < node->m_count; ++index ) + { + NNNode* newNode = new NNNode; + newNode->isLeaf = node->IsLeaf(); + newNode->m_branch = node->m_branch[index]; + if( newNode->isLeaf && a_squareDistanceCallback ) + newNode->minDist = a_squareDistanceCallback( a_point, newNode->m_branch.m_data ); + else + newNode->minDist = this->MinDist( a_point, &(node->m_branch[index].m_rect) ); + + //TODO: a custom list could be more efficient than a vector + this->InsertNNListSorted( &nodeList, newNode ); + } + if( nodeList.size() == 0 ) + { + return 0; + } + closestNode = nodeList.back(); + node = closestNode->m_branch.m_child; + nodeList.pop_back(); + free(closestNode); + } + + // free memory used for remaining NNNodes in nodeList + for( iterator iter = nodeList.begin(); iter != nodeList.end(); ++iter ) + { + NNNode* node = *iter; + free(node); + } + + *a_squareDistance = closestNode->minDist; + return closestNode->m_branch.m_data; +} + + +RTREE_TEMPLATE +int RTREE_QUAL::Count() +{ + int count = 0; + + CountRec( m_root, count ); + + return count; +} + + +RTREE_TEMPLATE +void RTREE_QUAL::CountRec( Node* a_node, int& a_count ) +{ + if( a_node->IsInternalNode() ) // not a leaf node + { + for( int index = 0; index < a_node->m_count; ++index ) + { + CountRec( a_node->m_branch[index].m_child, a_count ); + } + } + else // A leaf node + { + a_count += a_node->m_count; + } +} + + +RTREE_TEMPLATE +bool RTREE_QUAL::Load( const char* a_fileName ) +{ + RemoveAll(); // Clear existing tree + + RTFileStream stream; + + if( !stream.OpenRead( a_fileName ) ) + { + return false; + } + + bool result = Load( stream ); + + stream.Close(); + + return result; +}; + + +RTREE_TEMPLATE +bool RTREE_QUAL::Load( RTFileStream& a_stream ) +{ + // Write some kind of header + int _dataFileId = ('R' << 0) | ('T' << 8) | ('R' << 16) | ('E' << 24); + int _dataSize = sizeof(DATATYPE); + int _dataNumDims = NUMDIMS; + int _dataElemSize = sizeof(ELEMTYPE); + int _dataElemRealSize = sizeof(ELEMTYPEREAL); + int _dataMaxNodes = TMAXNODES; + int _dataMinNodes = TMINNODES; + + int dataFileId = 0; + int dataSize = 0; + int dataNumDims = 0; + int dataElemSize = 0; + int dataElemRealSize = 0; + int dataMaxNodes = 0; + int dataMinNodes = 0; + + a_stream.Read( dataFileId ); + a_stream.Read( dataSize ); + a_stream.Read( dataNumDims ); + a_stream.Read( dataElemSize ); + a_stream.Read( dataElemRealSize ); + a_stream.Read( dataMaxNodes ); + a_stream.Read( dataMinNodes ); + + bool result = false; + + // Test if header was valid and compatible + if( (dataFileId == _dataFileId) + && (dataSize == _dataSize) + && (dataNumDims == _dataNumDims) + && (dataElemSize == _dataElemSize) + && (dataElemRealSize == _dataElemRealSize) + && (dataMaxNodes == _dataMaxNodes) + && (dataMinNodes == _dataMinNodes) + ) + { + // Recursively load tree + result = LoadRec( m_root, a_stream ); + } + + return result; +} + + +RTREE_TEMPLATE +bool RTREE_QUAL::LoadRec( Node* a_node, RTFileStream& a_stream ) +{ + a_stream.Read( a_node->m_level ); + a_stream.Read( a_node->m_count ); + + if( a_node->IsInternalNode() ) // not a leaf node + { + for( int index = 0; index < a_node->m_count; ++index ) + { + Branch* curBranch = &a_node->m_branch[index]; + + a_stream.ReadArray( curBranch->m_rect.m_min, NUMDIMS ); + a_stream.ReadArray( curBranch->m_rect.m_max, NUMDIMS ); + + curBranch->m_child = AllocNode(); + LoadRec( curBranch->m_child, a_stream ); + } + } + else // A leaf node + { + for( int index = 0; index < a_node->m_count; ++index ) + { + Branch* curBranch = &a_node->m_branch[index]; + + a_stream.ReadArray( curBranch->m_rect.m_min, NUMDIMS ); + a_stream.ReadArray( curBranch->m_rect.m_max, NUMDIMS ); + + a_stream.Read( curBranch->m_data ); + } + } + + return true; // Should do more error checking on I/O operations +} + + +RTREE_TEMPLATE +bool RTREE_QUAL::Save( const char* a_fileName ) +{ + RTFileStream stream; + + if( !stream.OpenWrite( a_fileName ) ) + { + return false; + } + + bool result = Save( stream ); + + stream.Close(); + + return result; +} + + +RTREE_TEMPLATE +bool RTREE_QUAL::Save( RTFileStream& a_stream ) +{ + // Write some kind of header + int dataFileId = ('R' << 0) | ('T' << 8) | ('R' << 16) | ('E' << 24); + int dataSize = sizeof(DATATYPE); + int dataNumDims = NUMDIMS; + int dataElemSize = sizeof(ELEMTYPE); + int dataElemRealSize = sizeof(ELEMTYPEREAL); + int dataMaxNodes = TMAXNODES; + int dataMinNodes = TMINNODES; + + a_stream.Write( dataFileId ); + a_stream.Write( dataSize ); + a_stream.Write( dataNumDims ); + a_stream.Write( dataElemSize ); + a_stream.Write( dataElemRealSize ); + a_stream.Write( dataMaxNodes ); + a_stream.Write( dataMinNodes ); + + // Recursively save tree + bool result = SaveRec( m_root, a_stream ); + + return result; +} + + +RTREE_TEMPLATE +bool RTREE_QUAL::SaveRec( Node* a_node, RTFileStream& a_stream ) +{ + a_stream.Write( a_node->m_level ); + a_stream.Write( a_node->m_count ); + + if( a_node->IsInternalNode() ) // not a leaf node + { + for( int index = 0; index < a_node->m_count; ++index ) + { + Branch* curBranch = &a_node->m_branch[index]; + + a_stream.WriteArray( curBranch->m_rect.m_min, NUMDIMS ); + a_stream.WriteArray( curBranch->m_rect.m_max, NUMDIMS ); + + SaveRec( curBranch->m_child, a_stream ); + } + } + else // A leaf node + { + for( int index = 0; index < a_node->m_count; ++index ) + { + Branch* curBranch = &a_node->m_branch[index]; + + a_stream.WriteArray( curBranch->m_rect.m_min, NUMDIMS ); + a_stream.WriteArray( curBranch->m_rect.m_max, NUMDIMS ); + + a_stream.Write( curBranch->m_data ); + } + } + + return true; // Should do more error checking on I/O operations +} + + +RTREE_TEMPLATE +void RTREE_QUAL::RemoveAll() +{ + // Delete all existing nodes + Reset(); + + m_root = AllocNode(); + m_root->m_level = 0; +} + + +RTREE_TEMPLATE +void RTREE_QUAL::Reset() +{ +#ifdef RTREE_DONT_USE_MEMPOOLS + // Delete all existing nodes + RemoveAllRec( m_root ); +#else // RTREE_DONT_USE_MEMPOOLS + // Just reset memory pools. We are not using complex types + // EXAMPLE +#endif // RTREE_DONT_USE_MEMPOOLS +} + + +RTREE_TEMPLATE +void RTREE_QUAL::RemoveAllRec( Node* a_node ) +{ + ASSERT( a_node ); + ASSERT( a_node->m_level >= 0 ); + + if( a_node->IsInternalNode() ) // This is an internal node in the tree + { + for( int index = 0; index < a_node->m_count; ++index ) + { + RemoveAllRec( a_node->m_branch[index].m_child ); + } + } + + FreeNode( a_node ); +} + + +RTREE_TEMPLATE +typename RTREE_QUAL::Node* RTREE_QUAL::AllocNode() +{ + Node* newNode; + +#ifdef RTREE_DONT_USE_MEMPOOLS + newNode = new Node; +#else // RTREE_DONT_USE_MEMPOOLS + // EXAMPLE +#endif // RTREE_DONT_USE_MEMPOOLS + InitNode( newNode ); + return newNode; +} + + +RTREE_TEMPLATE +void RTREE_QUAL::FreeNode( Node* a_node ) +{ + ASSERT( a_node ); + +#ifdef RTREE_DONT_USE_MEMPOOLS + delete a_node; +#else // RTREE_DONT_USE_MEMPOOLS + // EXAMPLE +#endif // RTREE_DONT_USE_MEMPOOLS +} + + +// Allocate space for a node in the list used in DeletRect to +// store Nodes that are too empty. +RTREE_TEMPLATE +typename RTREE_QUAL::ListNode* RTREE_QUAL::AllocListNode() +{ +#ifdef RTREE_DONT_USE_MEMPOOLS + return new ListNode; +#else // RTREE_DONT_USE_MEMPOOLS + // EXAMPLE +#endif // RTREE_DONT_USE_MEMPOOLS +} + + +RTREE_TEMPLATE +void RTREE_QUAL::FreeListNode( ListNode* a_listNode ) +{ +#ifdef RTREE_DONT_USE_MEMPOOLS + delete a_listNode; +#else // RTREE_DONT_USE_MEMPOOLS + // EXAMPLE +#endif // RTREE_DONT_USE_MEMPOOLS +} + + +RTREE_TEMPLATE +void RTREE_QUAL::InitNode( Node* a_node ) +{ + a_node->m_count = 0; + a_node->m_level = -1; +} + + +RTREE_TEMPLATE +void RTREE_QUAL::InitRect( Rect* a_rect ) +{ + for( int index = 0; index < NUMDIMS; ++index ) + { + a_rect->m_min[index] = (ELEMTYPE) 0; + a_rect->m_max[index] = (ELEMTYPE) 0; + } +} + + +// Inserts a new data rectangle into the index structure. +// Recursively descends tree, propagates splits back up. +// Returns 0 if node was not split. Old node updated. +// If node was split, returns 1 and sets the pointer pointed to by +// new_node to point to the new node. Old node updated to become one of two. +// The level argument specifies the number of steps up from the leaf +// level to insert; e.g. a data rectangle goes in at level = 0. +RTREE_TEMPLATE +bool RTREE_QUAL::InsertRectRec( Rect* a_rect, + const DATATYPE& a_id, + Node* a_node, + Node** a_newNode, + int a_level ) +{ + ASSERT( a_rect && a_node && a_newNode ); + ASSERT( a_level >= 0 && a_level <= a_node->m_level ); + + int index; + Branch branch; + Node* otherNode; + + // Still above level for insertion, go down tree recursively + if( a_node->m_level > a_level ) + { + index = PickBranch( a_rect, a_node ); + + if( !InsertRectRec( a_rect, a_id, a_node->m_branch[index].m_child, &otherNode, a_level ) ) + { + // Child was not split + a_node->m_branch[index].m_rect = + CombineRect( a_rect, &(a_node->m_branch[index].m_rect) ); + return false; + } + else // Child was split + { + a_node->m_branch[index].m_rect = NodeCover( a_node->m_branch[index].m_child ); + branch.m_child = otherNode; + branch.m_rect = NodeCover( otherNode ); + return AddBranch( &branch, a_node, a_newNode ); + } + } + else if( a_node->m_level == a_level ) // Have reached level for insertion. Add rect, split if necessary + { + branch.m_rect = *a_rect; + branch.m_child = (Node*) a_id; + // Child field of leaves contains id of data record + return AddBranch( &branch, a_node, a_newNode ); + } + else + { + // Should never occur + ASSERT( 0 ); + return false; + } +} + + +// Insert a data rectangle into an index structure. +// InsertRect provides for splitting the root; +// returns 1 if root was split, 0 if it was not. +// The level argument specifies the number of steps up from the leaf +// level to insert; e.g. a data rectangle goes in at level = 0. +// InsertRect2 does the recursion. +// +RTREE_TEMPLATE +bool RTREE_QUAL::InsertRect( Rect* a_rect, const DATATYPE& a_id, Node** a_root, int a_level ) +{ + ASSERT( a_rect && a_root ); + ASSERT( a_level >= 0 && a_level <= (*a_root)->m_level ); +#ifdef _DEBUG + + for( int index = 0; index < NUMDIMS; ++index ) + { + ASSERT( a_rect->m_min[index] <= a_rect->m_max[index] ); + } + +#endif // _DEBUG + + Node* newRoot; + Node* newNode; + Branch branch; + + if( InsertRectRec( a_rect, a_id, *a_root, &newNode, a_level ) ) // Root split + { + newRoot = AllocNode(); // Grow tree taller and new root + newRoot->m_level = (*a_root)->m_level + 1; + branch.m_rect = NodeCover( *a_root ); + branch.m_child = *a_root; + AddBranch( &branch, newRoot, NULL ); + branch.m_rect = NodeCover( newNode ); + branch.m_child = newNode; + AddBranch( &branch, newRoot, NULL ); + *a_root = newRoot; + return true; + } + + return false; +} + + +// Find the smallest rectangle that includes all rectangles in branches of a node. +RTREE_TEMPLATE +typename RTREE_QUAL::Rect RTREE_QUAL::NodeCover( Node* a_node ) +{ + ASSERT( a_node ); + + int firstTime = true; + Rect rect; + InitRect( &rect ); + + for( int index = 0; index < a_node->m_count; ++index ) + { + if( firstTime ) + { + rect = a_node->m_branch[index].m_rect; + firstTime = false; + } + else + { + rect = CombineRect( &rect, &(a_node->m_branch[index].m_rect) ); + } + } + + return rect; +} + + +// Add a branch to a node. Split the node if necessary. +// Returns 0 if node not split. Old node updated. +// Returns 1 if node split, sets *new_node to address of new node. +// Old node updated, becomes one of two. +RTREE_TEMPLATE +bool RTREE_QUAL::AddBranch( Branch* a_branch, Node* a_node, Node** a_newNode ) +{ + ASSERT( a_branch ); + ASSERT( a_node ); + + if( a_node->m_count < MAXNODES ) // Split won't be necessary + { + a_node->m_branch[a_node->m_count] = *a_branch; + ++a_node->m_count; + + return false; + } + else + { + ASSERT( a_newNode ); + + SplitNode( a_node, a_branch, a_newNode ); + return true; + } +} + + +// Disconnect a dependent node. +// Caller must return (or stop using iteration index) after this as count has changed +RTREE_TEMPLATE +void RTREE_QUAL::DisconnectBranch( Node* a_node, int a_index ) +{ + ASSERT( a_node && (a_index >= 0) && (a_index < MAXNODES) ); + ASSERT( a_node->m_count > 0 ); + + // Remove element by swapping with the last element to prevent gaps in array + a_node->m_branch[a_index] = a_node->m_branch[a_node->m_count - 1]; + + --a_node->m_count; +} + + +// Pick a branch. Pick the one that will need the smallest increase +// in area to accomodate the new rectangle. This will result in the +// least total area for the covering rectangles in the current node. +// In case of a tie, pick the one which was smaller before, to get +// the best resolution when searching. +RTREE_TEMPLATE +int RTREE_QUAL::PickBranch( Rect* a_rect, Node* a_node ) +{ + ASSERT( a_rect && a_node ); + + bool firstTime = true; + ELEMTYPEREAL increase; + ELEMTYPEREAL bestIncr = (ELEMTYPEREAL) -1; + ELEMTYPEREAL area; + ELEMTYPEREAL bestArea; + int best; + Rect tempRect; + + for( int index = 0; index < a_node->m_count; ++index ) + { + Rect* curRect = &a_node->m_branch[index].m_rect; + area = CalcRectVolume( curRect ); + tempRect = CombineRect( a_rect, curRect ); + increase = CalcRectVolume( &tempRect ) - area; + + if( (increase < bestIncr) || firstTime ) + { + best = index; + bestArea = area; + bestIncr = increase; + firstTime = false; + } + else if( (increase == bestIncr) && (area < bestArea) ) + { + best = index; + bestArea = area; + bestIncr = increase; + } + } + + return best; +} + + +// Combine two rectangles into larger one containing both +RTREE_TEMPLATE +typename RTREE_QUAL::Rect RTREE_QUAL::CombineRect( Rect* a_rectA, Rect* a_rectB ) +{ + ASSERT( a_rectA && a_rectB ); + + Rect newRect; + + for( int index = 0; index < NUMDIMS; ++index ) + { + newRect.m_min[index] = Min( a_rectA->m_min[index], a_rectB->m_min[index] ); + newRect.m_max[index] = Max( a_rectA->m_max[index], a_rectB->m_max[index] ); + } + + return newRect; +} + + +// Split a node. +// Divides the nodes branches and the extra one between two nodes. +// Old node is one of the new ones, and one really new one is created. +// Tries more than one method for choosing a partition, uses best result. +RTREE_TEMPLATE +void RTREE_QUAL::SplitNode( Node* a_node, Branch* a_branch, Node** a_newNode ) +{ + ASSERT( a_node ); + ASSERT( a_branch ); + + // Could just use local here, but member or external is faster since it is reused + PartitionVars localVars; + PartitionVars* parVars = &localVars; + int level; + + // Load all the branches into a buffer, initialize old node + level = a_node->m_level; + GetBranches( a_node, a_branch, parVars ); + + // Find partition + ChoosePartition( parVars, MINNODES ); + + // Put branches from buffer into 2 nodes according to chosen partition + *a_newNode = AllocNode(); + (*a_newNode)->m_level = a_node->m_level = level; + LoadNodes( a_node, *a_newNode, parVars ); + + ASSERT( (a_node->m_count + (*a_newNode)->m_count) == parVars->m_total ); +} + + +// Calculate the n-dimensional volume of a rectangle +RTREE_TEMPLATE +ELEMTYPEREAL RTREE_QUAL::RectVolume( Rect* a_rect ) +{ + ASSERT( a_rect ); + + ELEMTYPEREAL volume = (ELEMTYPEREAL) 1; + + for( int index = 0; indexm_max[index] - a_rect->m_min[index]; + } + + ASSERT( volume >= (ELEMTYPEREAL) 0 ); + + return volume; +} + + +// The exact volume of the bounding sphere for the given Rect +RTREE_TEMPLATE +ELEMTYPEREAL RTREE_QUAL::RectSphericalVolume( Rect* a_rect ) +{ + ASSERT( a_rect ); + + ELEMTYPEREAL sumOfSquares = (ELEMTYPEREAL) 0; + ELEMTYPEREAL radius; + + for( int index = 0; index < NUMDIMS; ++index ) + { + ELEMTYPEREAL halfExtent = + ( (ELEMTYPEREAL) a_rect->m_max[index] - (ELEMTYPEREAL) a_rect->m_min[index] ) * 0.5f; + sumOfSquares += halfExtent * halfExtent; + } + + radius = (ELEMTYPEREAL) sqrt( sumOfSquares ); + + // Pow maybe slow, so test for common dims like 2,3 and just use x*x, x*x*x. + if( NUMDIMS == 3 ) + { + return radius * radius * radius * m_unitSphereVolume; + } + else if( NUMDIMS == 2 ) + { + return radius * radius * m_unitSphereVolume; + } + else + { + return (ELEMTYPEREAL) (pow( radius, NUMDIMS ) * m_unitSphereVolume); + } +} + + +// Use one of the methods to calculate retangle volume +RTREE_TEMPLATE +ELEMTYPEREAL RTREE_QUAL::CalcRectVolume( Rect* a_rect ) +{ +#ifdef RTREE_USE_SPHERICAL_VOLUME + return RectSphericalVolume( a_rect ); // Slower but helps certain merge cases +#else // RTREE_USE_SPHERICAL_VOLUME + return RectVolume( a_rect ); // Faster but can cause poor merges +#endif // RTREE_USE_SPHERICAL_VOLUME +} + + +// Load branch buffer with branches from full node plus the extra branch. +RTREE_TEMPLATE +void RTREE_QUAL::GetBranches( Node* a_node, Branch* a_branch, PartitionVars* a_parVars ) +{ + ASSERT( a_node ); + ASSERT( a_branch ); + + ASSERT( a_node->m_count == MAXNODES ); + + // Load the branch buffer + for( int index = 0; index < MAXNODES; ++index ) + { + a_parVars->m_branchBuf[index] = a_node->m_branch[index]; + } + + a_parVars->m_branchBuf[MAXNODES] = *a_branch; + a_parVars->m_branchCount = MAXNODES + 1; + + // Calculate rect containing all in the set + a_parVars->m_coverSplit = a_parVars->m_branchBuf[0].m_rect; + + for( int index = 1; index < MAXNODES + 1; ++index ) + { + a_parVars->m_coverSplit = + CombineRect( &a_parVars->m_coverSplit, &a_parVars->m_branchBuf[index].m_rect ); + } + + a_parVars->m_coverSplitArea = CalcRectVolume( &a_parVars->m_coverSplit ); + + InitNode( a_node ); +} + + +// Method #0 for choosing a partition: +// As the seeds for the two groups, pick the two rects that would waste the +// most area if covered by a single rectangle, i.e. evidently the worst pair +// to have in the same group. +// Of the remaining, one at a time is chosen to be put in one of the two groups. +// The one chosen is the one with the greatest difference in area expansion +// depending on which group - the rect most strongly attracted to one group +// and repelled from the other. +// If one group gets too full (more would force other group to violate min +// fill requirement) then other group gets the rest. +// These last are the ones that can go in either group most easily. +RTREE_TEMPLATE +void RTREE_QUAL::ChoosePartition( PartitionVars* a_parVars, int a_minFill ) +{ + ASSERT( a_parVars ); + + ELEMTYPEREAL biggestDiff; + int group, chosen, betterGroup; + + InitParVars( a_parVars, a_parVars->m_branchCount, a_minFill ); + PickSeeds( a_parVars ); + + while( ( (a_parVars->m_count[0] + a_parVars->m_count[1]) < a_parVars->m_total ) + && ( a_parVars->m_count[0] < (a_parVars->m_total - a_parVars->m_minFill) ) + && ( a_parVars->m_count[1] < (a_parVars->m_total - a_parVars->m_minFill) ) ) + { + biggestDiff = (ELEMTYPEREAL) -1; + + for( int index = 0; indexm_total; ++index ) + { + if( !a_parVars->m_taken[index] ) + { + Rect* curRect = &a_parVars->m_branchBuf[index].m_rect; + Rect rect0 = CombineRect( curRect, &a_parVars->m_cover[0] ); + Rect rect1 = CombineRect( curRect, &a_parVars->m_cover[1] ); + ELEMTYPEREAL growth0 = CalcRectVolume( &rect0 ) - a_parVars->m_area[0]; + ELEMTYPEREAL growth1 = CalcRectVolume( &rect1 ) - a_parVars->m_area[1]; + ELEMTYPEREAL diff = growth1 - growth0; + + if( diff >= 0 ) + { + group = 0; + } + else + { + group = 1; + diff = -diff; + } + + if( diff > biggestDiff ) + { + biggestDiff = diff; + chosen = index; + betterGroup = group; + } + else if( (diff == biggestDiff) + && (a_parVars->m_count[group] < a_parVars->m_count[betterGroup]) ) + { + chosen = index; + betterGroup = group; + } + } + } + + Classify( chosen, betterGroup, a_parVars ); + } + + // If one group too full, put remaining rects in the other + if( (a_parVars->m_count[0] + a_parVars->m_count[1]) < a_parVars->m_total ) + { + if( a_parVars->m_count[0] >= a_parVars->m_total - a_parVars->m_minFill ) + { + group = 1; + } + else + { + group = 0; + } + + for( int index = 0; indexm_total; ++index ) + { + if( !a_parVars->m_taken[index] ) + { + Classify( index, group, a_parVars ); + } + } + } + + ASSERT( (a_parVars->m_count[0] + a_parVars->m_count[1]) == a_parVars->m_total ); + ASSERT( (a_parVars->m_count[0] >= a_parVars->m_minFill) + && (a_parVars->m_count[1] >= a_parVars->m_minFill) ); +} + + +// Copy branches from the buffer into two nodes according to the partition. +RTREE_TEMPLATE +void RTREE_QUAL::LoadNodes( Node* a_nodeA, Node* a_nodeB, PartitionVars* a_parVars ) +{ + ASSERT( a_nodeA ); + ASSERT( a_nodeB ); + ASSERT( a_parVars ); + + for( int index = 0; index < a_parVars->m_total; ++index ) + { + ASSERT( a_parVars->m_partition[index] == 0 || a_parVars->m_partition[index] == 1 ); + + if( a_parVars->m_partition[index] == 0 ) + { + AddBranch( &a_parVars->m_branchBuf[index], a_nodeA, NULL ); + } + else if( a_parVars->m_partition[index] == 1 ) + { + AddBranch( &a_parVars->m_branchBuf[index], a_nodeB, NULL ); + } + } +} + + +// Initialize a PartitionVars structure. +RTREE_TEMPLATE +void RTREE_QUAL::InitParVars( PartitionVars* a_parVars, int a_maxRects, int a_minFill ) +{ + ASSERT( a_parVars ); + + a_parVars->m_count[0] = a_parVars->m_count[1] = 0; + a_parVars->m_area[0] = a_parVars->m_area[1] = (ELEMTYPEREAL) 0; + a_parVars->m_total = a_maxRects; + a_parVars->m_minFill = a_minFill; + + for( int index = 0; index < a_maxRects; ++index ) + { + a_parVars->m_taken[index] = false; + a_parVars->m_partition[index] = -1; + } +} + + +RTREE_TEMPLATE +void RTREE_QUAL::PickSeeds( PartitionVars* a_parVars ) +{ + int seed0, seed1; + ELEMTYPEREAL worst, waste; + ELEMTYPEREAL area[MAXNODES + 1]; + + for( int index = 0; indexm_total; ++index ) + { + area[index] = CalcRectVolume( &a_parVars->m_branchBuf[index].m_rect ); + } + + worst = -a_parVars->m_coverSplitArea - 1; + + for( int indexA = 0; indexA < a_parVars->m_total - 1; ++indexA ) + { + for( int indexB = indexA + 1; indexB < a_parVars->m_total; ++indexB ) + { + Rect oneRect = CombineRect( &a_parVars->m_branchBuf[indexA].m_rect, + &a_parVars->m_branchBuf[indexB].m_rect ); + waste = CalcRectVolume( &oneRect ) - area[indexA] - area[indexB]; + + if( waste > worst ) + { + worst = waste; + seed0 = indexA; + seed1 = indexB; + } + } + } + + Classify( seed0, 0, a_parVars ); + Classify( seed1, 1, a_parVars ); +} + + +// Put a branch in one of the groups. +RTREE_TEMPLATE +void RTREE_QUAL::Classify( int a_index, int a_group, PartitionVars* a_parVars ) +{ + ASSERT( a_parVars ); + ASSERT( !a_parVars->m_taken[a_index] ); + + a_parVars->m_partition[a_index] = a_group; + a_parVars->m_taken[a_index] = true; + + if( a_parVars->m_count[a_group] == 0 ) + { + a_parVars->m_cover[a_group] = a_parVars->m_branchBuf[a_index].m_rect; + } + else + { + a_parVars->m_cover[a_group] = CombineRect( &a_parVars->m_branchBuf[a_index].m_rect, + &a_parVars->m_cover[a_group] ); + } + + a_parVars->m_area[a_group] = CalcRectVolume( &a_parVars->m_cover[a_group] ); + ++a_parVars->m_count[a_group]; +} + + +// Delete a data rectangle from an index structure. +// Pass in a pointer to a Rect, the tid of the record, ptr to ptr to root node. +// Returns 1 if record not found, 0 if success. +// RemoveRect provides for eliminating the root. +RTREE_TEMPLATE +bool RTREE_QUAL::RemoveRect( Rect* a_rect, const DATATYPE& a_id, Node** a_root ) +{ + ASSERT( a_rect && a_root ); + ASSERT( *a_root ); + + Node* tempNode; + ListNode* reInsertList = NULL; + + if( !RemoveRectRec( a_rect, a_id, *a_root, &reInsertList ) ) + { + // Found and deleted a data item + // Reinsert any branches from eliminated nodes + while( reInsertList ) + { + tempNode = reInsertList->m_node; + + for( int index = 0; index < tempNode->m_count; ++index ) + { + InsertRect( &(tempNode->m_branch[index].m_rect), + tempNode->m_branch[index].m_data, + a_root, + tempNode->m_level ); + } + + ListNode* remLNode = reInsertList; + reInsertList = reInsertList->m_next; + + FreeNode( remLNode->m_node ); + FreeListNode( remLNode ); + } + + // Check for redundant root (not leaf, 1 child) and eliminate + if( (*a_root)->m_count == 1 && (*a_root)->IsInternalNode() ) + { + tempNode = (*a_root)->m_branch[0].m_child; + + ASSERT( tempNode ); + FreeNode( *a_root ); + *a_root = tempNode; + } + + return false; + } + else + { + return true; + } +} + + +// Delete a rectangle from non-root part of an index structure. +// Called by RemoveRect. Descends tree recursively, +// merges branches on the way back up. +// Returns 1 if record not found, 0 if success. +RTREE_TEMPLATE +bool RTREE_QUAL::RemoveRectRec( Rect* a_rect, + const DATATYPE& a_id, + Node* a_node, + ListNode** a_listNode ) +{ + ASSERT( a_rect && a_node && a_listNode ); + ASSERT( a_node->m_level >= 0 ); + + if( a_node->IsInternalNode() ) // not a leaf node + { + for( int index = 0; index < a_node->m_count; ++index ) + { + if( Overlap( a_rect, &(a_node->m_branch[index].m_rect) ) ) + { + if( !RemoveRectRec( a_rect, a_id, a_node->m_branch[index].m_child, a_listNode ) ) + { + if( a_node->m_branch[index].m_child->m_count >= MINNODES ) + { + // child removed, just resize parent rect + a_node->m_branch[index].m_rect = + NodeCover( a_node->m_branch[index].m_child ); + } + else + { + // child removed, not enough entries in node, eliminate node + ReInsert( a_node->m_branch[index].m_child, a_listNode ); + DisconnectBranch( a_node, index ); // Must return after this call as count has changed + } + + return false; + } + } + } + + return true; + } + else // A leaf node + { + for( int index = 0; index < a_node->m_count; ++index ) + { + if( a_node->m_branch[index].m_child == (Node*) a_id ) + { + DisconnectBranch( a_node, index ); // Must return after this call as count has changed + return false; + } + } + + return true; + } +} + + +// Decide whether two rectangles overlap. +RTREE_TEMPLATE +bool RTREE_QUAL::Overlap( Rect* a_rectA, Rect* a_rectB ) +{ + ASSERT( a_rectA && a_rectB ); + + for( int index = 0; index < NUMDIMS; ++index ) + { + if( a_rectA->m_min[index] > a_rectB->m_max[index] + || a_rectB->m_min[index] > a_rectA->m_max[index] ) + { + return false; + } + } + + return true; +} + + +// Add a node to the reinsertion list. All its branches will later +// be reinserted into the index structure. +RTREE_TEMPLATE +void RTREE_QUAL::ReInsert( Node* a_node, ListNode** a_listNode ) +{ + ListNode* newListNode; + + newListNode = AllocListNode(); + newListNode->m_node = a_node; + newListNode->m_next = *a_listNode; + *a_listNode = newListNode; +} + + +// Search in an index tree or subtree for all data retangles that overlap the argument rectangle. +RTREE_TEMPLATE +bool RTREE_QUAL::Search( Node* a_node, Rect* a_rect, int& a_foundCount, bool a_resultCallback( + DATATYPE a_data, + void* a_context ), void* a_context ) +{ + ASSERT( a_node ); + ASSERT( a_node->m_level >= 0 ); + ASSERT( a_rect ); + + if( a_node->IsInternalNode() ) // This is an internal node in the tree + { + for( int index = 0; index < a_node->m_count; ++index ) + { + if( Overlap( a_rect, &a_node->m_branch[index].m_rect ) ) + { + if( !Search( a_node->m_branch[index].m_child, a_rect, a_foundCount, + a_resultCallback, a_context ) ) + { + return false; // Don't continue searching + } + } + } + } + else // This is a leaf node + { + for( int index = 0; index < a_node->m_count; ++index ) + { + if( Overlap( a_rect, &a_node->m_branch[index].m_rect ) ) + { + DATATYPE& id = a_node->m_branch[index].m_data; + + // NOTE: There are different ways to return results. Here's where to modify + if( &a_resultCallback ) + { + ++a_foundCount; + + if( !a_resultCallback( id, a_context ) ) + { + return false; // Don't continue searching + } + } + } + } + } + + return true; // Continue searching +} + + + + +//calculate the minimum distance between a point and a rectangle as defined by Manolopoulos et al. +//it uses the square distance to avoid the use of ELEMTYPEREAL values, which are slower. +RTREE_TEMPLATE +ELEMTYPE RTREE_QUAL::MinDist( const ELEMTYPE a_point[NUMDIMS], Rect* a_rect ) +{ + ELEMTYPE *q, *s, *t; + q = (ELEMTYPE*) a_point; + s = a_rect->m_min; + t = a_rect->m_max; + int minDist = 0; + for( int index = 0; index < NUMDIMS; index++ ) + { + int r = q[index]; + if( q[index] < s[index] ) + { + r = s[index]; + } + else if( q[index] >t[index] ) + { + r = t[index]; + } + int addend = q[index] - r; + minDist += addend * addend; + } + return minDist; +} + + +//insert a NNNode in a list sorted by its minDist (desc.) +RTREE_TEMPLATE +void RTREE_QUAL::InsertNNListSorted( std::vector* nodeList, NNNode* newNode ) +{ + typedef typename std::vector::iterator iterator; + iterator iter = nodeList->begin(); + while( iter != nodeList->end() && (*iter)->minDist > newNode->minDist ) + { + ++iter; + } + nodeList->insert(iter, newNode); +} + + +#undef RTREE_TEMPLATE +#undef RTREE_QUAL +#undef RTREE_SEARCH_TEMPLATE +#undef RTREE_SEARCH_QUAL + +#endif // RTREE_H diff --git a/include/geometry/shape_index.h b/include/geometry/shape_index.h index 4040cc2549..a36ecff97d 100644 --- a/include/geometry/shape_index.h +++ b/include/geometry/shape_index.h @@ -2,6 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2013 CERN + * @author Jacobo Aragunde Pérez * @author Tomasz Wlostowski * * This program is free software; you can redistribute it and/or @@ -25,266 +26,328 @@ #ifndef __SHAPE_INDEX_H #define __SHAPE_INDEX_H -#include +#include +#include +#include -template const SHAPE *defaultShapeFunctor( const T aItem ) + +/** + * shapeFunctor template function + * + * It is used by SHAPE_INDEX to get a SHAPE* from another type. + * By default relies on T::GetShape() method, should be specialized if the T object + * doesn't allow that method. + * @param object generic T object + * @return a SHAPE* object equivalent to object. + */ +template +static const SHAPE* shapeFunctor( T aItem ) { - return aItem->GetShape(); + return aItem->GetShape(); } -template > +/** + * shapeFunctor template function: specialization for T = SHAPE* + */ +template<> +const SHAPE* shapeFunctor( SHAPE* aItem ) +{ + return aItem; +} -class SHAPE_INDEX_LIST { - - struct ShapeEntry { - ShapeEntry(T aParent) - { - shape = ShapeFunctor(aParent); - bbox = shape->BBox(0); - parent = aParent; - } +/** + * boundingBox template method + * + * It is used by SHAPE_INDEX to get the bounding box of a generic T object. + * By default relies on T::BBox() method, should be specialized if the T object + * doesn't allow that method. + * @param object generic T object + * @return a BOX2I object containing the bounding box of the T object. + */ +template +BOX2I boundingBox( T object ) +{ + return shapeFunctor(object)->BBox(); +} - ~ShapeEntry() - { - - } +/** + * acceptVisitor template method + * + * It is used by SHAPE_INDEX to implement Accept(). + * By default relies on V::operation() redefinition, should be specialized if V class + * doesn't have its () operation defined to accept T objects. + * @param object generic T object + * @param visitor V visitor object + */ +template +void acceptVisitor( T object, V visitor ) +{ + visitor(object); +} - T parent; - const SHAPE *shape; - BOX2I bbox; - }; +/** + * collide template method + * + * It is used by SHAPE_INDEX to implement Query(). + * By default relies on T::Collide(U) method, should be specialized if the T object + * doesn't allow that method. + * @param object generic T object + * @param anotherObject generic U object + * @param minDistance minimum collision distance + * @return if object and anotherObject collide + */ +template +bool collide( T object, U anotherObject, int minDistance ) +{ + return shapeFunctor(object)->Collide( anotherObject, minDistance ); +} - typedef std::vector ShapeVec; - typedef typename std::vector::iterator ShapeVecIter; - -public: +template +bool queryCallback(T shape, void* context) { + V* visitor = (V*) context; + acceptVisitor(shape, *visitor); + return true; +} -// "Normal" iterator interface, for STL algorithms. - class iterator { +template +class SHAPE_INDEX { - public: - iterator() {}; + public: - iterator( ShapeVecIter aCurrent) - : m_current(aCurrent) {}; + SHAPE_INDEX(); - iterator(const iterator &b) : - m_current(b.m_current) {}; + ~SHAPE_INDEX(); - T operator*() const - { - return (*m_current).parent; - } + /** + * Function Add() + * + * Adds a SHAPE to the index. + * @param shape the new SHAPE + */ + void Add( T shape ); - void operator++() - { - ++m_current; - } + /** + * Function Remove() + * + * Removes a SHAPE to the index. + * @param shape the new SHAPE + */ + void Remove( T shape ); - iterator& operator++(int dummy) - { - ++m_current; - return *this; - } + /** + * Function RemoveAll() + * + * Removes all the contents of the index. + */ + void RemoveAll(); - bool operator ==( const iterator& rhs ) const - { - return m_current == rhs.m_current; - } + /** + * Function Accept() + * + * Accepts a visitor for every SHAPE object contained in this INDEX. + * @param visitor Visitor object to be run + */ + template + void Accept( V visitor ) + { + SHAPE_INDEX::Iterator iter = this->Begin(); + while(!iter.IsNull()) { + T shape = *iter; + acceptVisitor(shape, visitor); + iter++; + } + } - bool operator !=( const iterator& rhs ) const - { - return m_current != rhs.m_current; - } + /** + * Function Reindex() + * + * Rebuilds the index. This should be used if the geometry of the objects + * contained by the index has changed. + */ + void Reindex(); - const iterator& operator=(const iterator& rhs) - { - m_current = rhs.m_current; - return *this; - } + /** + * Function Query() + * + * Runs a callback on every SHAPE object contained in the bounding box of (shape). + * @param shape shape to search against + * @param minDistance distance threshold + * @param visitor object to be invoked on every object contained in the search area. + */ - private: - ShapeVecIter m_current; - }; + template + int Query( const SHAPE *shape, int minDistance, V& visitor, bool aExact ) + { + BOX2I box = shape->BBox(); + box.Inflate(minDistance); + + int min[2] = {box.GetX(), box.GetY()}; + int max[2] = {box.GetRight(), box.GetBottom()}; -// "Query" iterator, for iterating over a set of spatially matching shapes. - class query_iterator { - public: + return this->m_tree->Search(min, max, visitor); + } - query_iterator() - { + class Iterator + { + private: - } + typedef typename RTree::Iterator RTreeIterator; + RTreeIterator iterator; - query_iterator( ShapeVecIter aCurrent, ShapeVecIter aEnd, SHAPE *aShape, int aMinDistance, bool aExact) - : m_end(aEnd), - m_current(aCurrent), - m_shape(aShape), - m_minDistance(aMinDistance), - m_exact(aExact) - { - if(aShape) - { - m_refBBox = aShape->BBox(); - next(); - } - } + /** + * Function Init() + * + * Setup the internal tree iterator. + * @param tree pointer to a RTREE object + */ + void Init(RTree* tree) { + tree->GetFirst(iterator); + } - query_iterator(const query_iterator &b) - : m_end(b.m_end), - m_current(b.m_current), - m_shape(b.m_shape), - m_minDistance(b.m_minDistance), - m_exact(b.m_exact), - m_refBBox(b.m_refBBox) - { + public: - } + /** + * Iterator constructor + * + * Creates an iterator for the index object + * @param index SHAPE_INDEX object to iterate + */ + Iterator(SHAPE_INDEX* index) { + Init(index->m_tree); + } - - T operator*() const - { - return (*m_current).parent; - } + /** + * Operator * (prefix) + * + * Returns the next data element. + */ + T operator*() { + return *iterator; + } - query_iterator& operator++() - { - ++m_current; - next(); - return *this; - } + /** + * Operator ++ (prefix) + * + * Shifts the iterator to the next element. + */ + bool operator++() { + return ++iterator; + } - query_iterator& operator++(int dummy) - { - ++m_current; - next(); - return *this; - } + /** + * Operator ++ (postfix) + * + * Shifts the iterator to the next element. + */ + bool operator++(int) { + return ++iterator; + } - bool operator ==( const query_iterator& rhs ) const - { - return m_current == rhs.m_current; - } + /** + * Function IsNull() + * + * Checks if the iterator has reached the end. + * @return true if it is in an invalid position (data finished) + */ + bool IsNull() { + return iterator.IsNull(); + } - bool operator !=( const query_iterator& rhs ) const - { - return m_current != rhs.m_current; - } + /** + * Function IsNotNull() + * + * Checks if the iterator has not reached the end. + * @return true if it is in an valid position (data not finished) + */ + bool IsNotNull() { + return iterator.IsNotNull(); + } - const query_iterator& operator=(const query_iterator& rhs) - { - m_end = rhs.m_end; - m_current = rhs.m_current; - m_shape = rhs.m_shape; - m_minDistance = rhs.m_minDistance; - m_exact = rhs.m_exact; - m_refBBox = rhs.m_refBBox; - return *this; - } + /** + * Function Next() + * + * Returns the current element of the iterator and moves to the next + * position. + * @return SHAPE object pointed by the iterator before moving to the + * next position. + */ + T Next() { + T object = *iterator; + ++iterator; + return object; + } + }; - private: + /** + * Function Begin() + * + * Creates an iterator for the current index object + * @return iterator + */ + Iterator Begin(); - void next() - { - while(m_current != m_end) - { - if (m_refBBox.Distance(m_current->bbox) <= m_minDistance) - { - if(!m_exact || m_current->shape->Collide(m_shape, m_minDistance)) - return; - } - ++m_current; - } - } + private: - ShapeVecIter m_end; - ShapeVecIter m_current; - BOX2I m_refBBox; - bool m_exact; - SHAPE *m_shape; - int m_minDistance; - }; - - void Add(T aItem) - { - ShapeEntry s (aItem); - - m_shapes.push_back(s); - } - - void Remove(const T aItem) - { - ShapeVecIter i; - - for(i=m_shapes.begin(); i!=m_shapes.end();++i) - { - if(i->parent == aItem) - break; - } - - if(i == m_shapes.end()) - return; - - m_shapes.erase(i); - } - - int Size() const - { - return m_shapes.size(); - } - - template - int Query( const SHAPE *aShape, int aMinDistance, Visitor &v, bool aExact = true) //const - { - ShapeVecIter i; - int n = 0; - VECTOR2I::extended_type minDistSq = (VECTOR2I::extended_type) aMinDistance * aMinDistance; - - BOX2I refBBox = aShape->BBox(); - - for(i = m_shapes.begin(); i!=m_shapes.end(); ++i) - { - if (refBBox.SquaredDistance(i->bbox) <= minDistSq) - { - if(!aExact || i->shape->Collide(aShape, aMinDistance)) - { - n++; - if(!v( i->parent )) - return n; - } - } - } - return n; - } - - void Clear() - { - m_shapes.clear(); - } - - query_iterator qbegin( SHAPE *aShape, int aMinDistance, bool aExact ) - { - return query_iterator( m_shapes.begin(), m_shapes.end(), aShape, aMinDistance, aExact); - } - - const query_iterator qend() - { - return query_iterator( m_shapes.end(), m_shapes.end(), NULL, 0, false ); - } - - iterator begin() - { - return iterator( m_shapes.begin() ); - } - - iterator end() - { - return iterator( m_shapes.end() ); - } - -private: - - ShapeVec m_shapes; + RTree* m_tree; }; +/* + * Class members implementation + */ + +template +SHAPE_INDEX::SHAPE_INDEX() { + this->m_tree = new RTree(); +} + +template +SHAPE_INDEX::~SHAPE_INDEX() { + delete this->m_tree; +} + +template +void SHAPE_INDEX::Add(T shape) { + BOX2I box = boundingBox(shape); + int min[2]= {box.GetX(), box.GetY()}; + int max[2] = {box.GetRight(), box.GetBottom()}; + this->m_tree->Insert(min, max, shape); +} + +template +void SHAPE_INDEX::Remove(T shape) { + BOX2I box = boundingBox(shape); + int min[2]= {box.GetX(), box.GetY()}; + int max[2] = {box.GetRight(), box.GetBottom()}; + this->m_tree->Remove(min, max, shape); +} + +template +void SHAPE_INDEX::RemoveAll() { + this->m_tree->RemoveAll(); +} + +template +void SHAPE_INDEX::Reindex() { + RTree* newTree; + newTree = new RTree(); + + SHAPE_INDEX::Iterator iter = this->Begin(); + while(!iter.IsNull()) { + T shape = *iter; + BOX2I box = boundingBox(shape); + int min[2]= {box.GetX(), box.GetY()}; + int max[2] = {box.GetRight(), box.GetBottom()}; + newTree->Insert(min, max, shape); + iter++; + } + delete this->m_tree; + this->m_tree = newTree; +} + +template +typename SHAPE_INDEX::Iterator SHAPE_INDEX::Begin() { + return Iterator(this); +} + + #endif diff --git a/include/geometry/shape_index_list.h b/include/geometry/shape_index_list.h new file mode 100644 index 0000000000..47c5d98c97 --- /dev/null +++ b/include/geometry/shape_index_list.h @@ -0,0 +1,290 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __SHAPE_INDEX_LIST_H +#define __SHAPE_INDEX_LIST_H + +#include + +template const SHAPE *defaultShapeFunctor( const T aItem ) +{ + return aItem->GetShape(); +} + +template > + +class SHAPE_INDEX_LIST { + + struct ShapeEntry { + ShapeEntry(T aParent) + { + shape = ShapeFunctor(aParent); + bbox = shape->BBox(0); + parent = aParent; + } + + ~ShapeEntry() + { + + } + + T parent; + const SHAPE *shape; + BOX2I bbox; + }; + + typedef std::vector ShapeVec; + typedef typename std::vector::iterator ShapeVecIter; + +public: + +// "Normal" iterator interface, for STL algorithms. + class iterator { + + public: + iterator() {}; + + iterator( ShapeVecIter aCurrent) + : m_current(aCurrent) {}; + + iterator(const iterator &b) : + m_current(b.m_current) {}; + + T operator*() const + { + return (*m_current).parent; + } + + void operator++() + { + ++m_current; + } + + iterator& operator++(int dummy) + { + ++m_current; + return *this; + } + + bool operator ==( const iterator& rhs ) const + { + return m_current == rhs.m_current; + } + + bool operator !=( const iterator& rhs ) const + { + return m_current != rhs.m_current; + } + + const iterator& operator=(const iterator& rhs) + { + m_current = rhs.m_current; + return *this; + } + + private: + ShapeVecIter m_current; + }; + +// "Query" iterator, for iterating over a set of spatially matching shapes. + class query_iterator { + public: + + query_iterator() + { + + } + + query_iterator( ShapeVecIter aCurrent, ShapeVecIter aEnd, SHAPE *aShape, int aMinDistance, bool aExact) + : m_end(aEnd), + m_current(aCurrent), + m_shape(aShape), + m_minDistance(aMinDistance), + m_exact(aExact) + { + if(aShape) + { + m_refBBox = aShape->BBox(); + next(); + } + } + + query_iterator(const query_iterator &b) + : m_end(b.m_end), + m_current(b.m_current), + m_shape(b.m_shape), + m_minDistance(b.m_minDistance), + m_exact(b.m_exact), + m_refBBox(b.m_refBBox) + { + + } + + + T operator*() const + { + return (*m_current).parent; + } + + query_iterator& operator++() + { + ++m_current; + next(); + return *this; + } + + query_iterator& operator++(int dummy) + { + ++m_current; + next(); + return *this; + } + + bool operator ==( const query_iterator& rhs ) const + { + return m_current == rhs.m_current; + } + + bool operator !=( const query_iterator& rhs ) const + { + return m_current != rhs.m_current; + } + + const query_iterator& operator=(const query_iterator& rhs) + { + m_end = rhs.m_end; + m_current = rhs.m_current; + m_shape = rhs.m_shape; + m_minDistance = rhs.m_minDistance; + m_exact = rhs.m_exact; + m_refBBox = rhs.m_refBBox; + return *this; + } + + private: + + void next() + { + while(m_current != m_end) + { + if (m_refBBox.Distance(m_current->bbox) <= m_minDistance) + { + if(!m_exact || m_current->shape->Collide(m_shape, m_minDistance)) + return; + } + ++m_current; + } + } + + ShapeVecIter m_end; + ShapeVecIter m_current; + BOX2I m_refBBox; + bool m_exact; + SHAPE *m_shape; + int m_minDistance; + }; + + void Add(T aItem) + { + ShapeEntry s (aItem); + + m_shapes.push_back(s); + } + + void Remove(const T aItem) + { + ShapeVecIter i; + + for(i=m_shapes.begin(); i!=m_shapes.end();++i) + { + if(i->parent == aItem) + break; + } + + if(i == m_shapes.end()) + return; + + m_shapes.erase(i); + } + + int Size() const + { + return m_shapes.size(); + } + + template + int Query( const SHAPE *aShape, int aMinDistance, Visitor &v, bool aExact = true) //const + { + ShapeVecIter i; + int n = 0; + VECTOR2I::extended_type minDistSq = (VECTOR2I::extended_type) aMinDistance * aMinDistance; + + BOX2I refBBox = aShape->BBox(); + + for(i = m_shapes.begin(); i!=m_shapes.end(); ++i) + { + if (refBBox.SquaredDistance(i->bbox) <= minDistSq) + { + if(!aExact || i->shape->Collide(aShape, aMinDistance)) + { + n++; + if(!v( i->parent )) + return n; + } + } + } + return n; + } + + void Clear() + { + m_shapes.clear(); + } + + query_iterator qbegin( SHAPE *aShape, int aMinDistance, bool aExact ) + { + return query_iterator( m_shapes.begin(), m_shapes.end(), aShape, aMinDistance, aExact); + } + + const query_iterator qend() + { + return query_iterator( m_shapes.end(), m_shapes.end(), NULL, 0, false ); + } + + iterator begin() + { + return iterator( m_shapes.begin() ); + } + + iterator end() + { + return iterator( m_shapes.end() ); + } + +private: + + ShapeVec m_shapes; +}; + +#endif From 6dad482efa4be305f5341532d0570fc5a49ad825 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 13 Sep 2013 17:45:40 +0200 Subject: [PATCH 328/415] Added more required layers for pads (adhesive, solder paste & solder mask) --- pcbnew/basepcbframe.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 9692ba9738..bd23efa35c 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -857,8 +857,17 @@ void PCB_BASE_FRAME::LoadSettings() view->SetRequired( ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( VIAS_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ) ); view->SetRequired( ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ) ); + view->SetRequired( ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); + view->SetRequired( ADHESIVE_N_FRONT, ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); + view->SetRequired( SOLDERPASTE_N_FRONT, ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); + view->SetRequired( SOLDERMASK_N_FRONT, ITEM_GAL_LAYER( PAD_FR_VISIBLE ) ); + view->SetRequired( ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); + view->SetRequired( ADHESIVE_N_BACK, ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); + view->SetRequired( SOLDERPASTE_N_BACK, ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); + view->SetRequired( SOLDERMASK_N_BACK, ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); + view->SetLayerTarget( ITEM_GAL_LAYER( SELECTION ), KiGfx::TARGET_OVERLAY ); view->SetLayerTarget( ITEM_GAL_LAYER( GP_OVERLAY ), KiGfx::TARGET_OVERLAY ); From ef47f6cfd290f56ed14182452b203a9f98b50bca Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 16 Sep 2013 09:51:24 +0200 Subject: [PATCH 329/415] Changed alignment. --- common/system/jump_x86_64_sysv_elf_gas.S | 2 +- common/system/make_x86_64_sysv_elf_gas.S | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/common/system/jump_x86_64_sysv_elf_gas.S b/common/system/jump_x86_64_sysv_elf_gas.S index 40b65d7db6..c22f6e8038 100644 --- a/common/system/jump_x86_64_sysv_elf_gas.S +++ b/common/system/jump_x86_64_sysv_elf_gas.S @@ -41,7 +41,7 @@ .text .globl jump_fcontext .type jump_fcontext,@function -.align 16 +.align 8 jump_fcontext: movq %rbx, (%rdi) /* save RBX */ movq %r12, 0x8(%rdi) /* save R12 */ diff --git a/common/system/make_x86_64_sysv_elf_gas.S b/common/system/make_x86_64_sysv_elf_gas.S index ba040d0519..188cc931e5 100644 --- a/common/system/make_x86_64_sysv_elf_gas.S +++ b/common/system/make_x86_64_sysv_elf_gas.S @@ -40,8 +40,12 @@ .text .globl make_fcontext + +#ifndef __APPLE__ .type make_fcontext,@function -.align 16 +#endif + +.align 8 make_fcontext: leaq -0x58(%rdi), %rax /* reserve space for fcontext_t at top of context stack */ @@ -70,5 +74,8 @@ finish: xorq %rdi, %rdi /* exit code is zero */ call _exit@PLT /* exit application */ hlt -.size make_fcontext,.-make_fcontext + +#ifndef __APPLE__ +.size make_fcontext,.-make_fcontext +#endif From 6a9a25fc54fd538882ff9426521ca466b1709751 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 16 Sep 2013 09:51:53 +0200 Subject: [PATCH 330/415] Fixed drawing outlined track segments. --- common/gal/opengl/opengl_gal.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 07b5238cf1..78cb44962e 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -278,10 +278,8 @@ void OPENGL_GAL::DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndP VECTOR2D( lineLength, -aWidth / 2.0 ) ); // Draw line caps - drawStrokedSemiCircle( VECTOR2D( 0.0, 0.0 ), - ( aWidth + lineWidth ) / 2, M_PI / 2 ); - drawStrokedSemiCircle( VECTOR2D( lineLength, 0.0 ), - ( aWidth + lineWidth ) / 2, -M_PI / 2 ); + drawStrokedSemiCircle( VECTOR2D( 0.0, 0.0 ), aWidth / 2, M_PI / 2 ); + drawStrokedSemiCircle( VECTOR2D( lineLength, 0.0 ), aWidth / 2, -M_PI / 2 ); Restore(); } From 11f1dd1623e98bf2ad880c53b7578509fd8d428d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 16 Sep 2013 09:52:47 +0200 Subject: [PATCH 331/415] Sorted out headers. --- pcbnew/tools/selection_area.cpp | 8 +++----- pcbnew/tools/selection_area.h | 13 ++++++------- pcbnew/tools/selection_tool.cpp | 2 ++ 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/pcbnew/tools/selection_area.cpp b/pcbnew/tools/selection_area.cpp index 33d73d6d68..c96751cb31 100644 --- a/pcbnew/tools/selection_area.cpp +++ b/pcbnew/tools/selection_area.cpp @@ -22,11 +22,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include - -#include - #include "selection_area.h" +#include +#include using namespace KiGfx; @@ -47,7 +45,7 @@ void SELECTION_AREA::ViewGetLayers( int aLayers[], int& aCount ) const } -void SELECTION_AREA::ViewDraw( int aLayer, GAL* aGal ) const +void SELECTION_AREA::ViewDraw( int aLayer, KiGfx::GAL* aGal ) const { aGal->SetLineWidth( 1.0 ); aGal->SetStrokeColor( COLOR4D( 1.0, 1.0, 0.4, 1.0 ) ); diff --git a/pcbnew/tools/selection_area.h b/pcbnew/tools/selection_area.h index 50db94f927..10079dccd5 100644 --- a/pcbnew/tools/selection_area.h +++ b/pcbnew/tools/selection_area.h @@ -25,15 +25,14 @@ #ifndef __SELECTION_AREA_H #define __SELECTION_AREA_H -#include -#include - -#include - -#include -#include #include #include +#include + +namespace KiGfx +{ +class GAL; +} /** * Class SELECTION_AREA diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index cd1a4be5a1..d9045a3b02 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -36,6 +36,8 @@ #include #include +#include +#include #include "selection_tool.h" #include "selection_area.h" From b579262869791d894b49f40d631d6a6c3741735c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 16 Sep 2013 11:00:59 +0200 Subject: [PATCH 332/415] Better way of marking 'brightened' mode for items. --- common/painter.cpp | 22 ---------------------- common/view/view.cpp | 6 ------ include/base_struct.h | 4 ++-- include/painter.h | 7 ------- pcbnew/CMakeLists.txt | 1 + pcbnew/tools/selection_tool.cpp | 20 +++++++++++++++----- 6 files changed, 18 insertions(+), 42 deletions(-) diff --git a/common/painter.cpp b/common/painter.cpp index ddff0c9820..b6181c4210 100644 --- a/common/painter.cpp +++ b/common/painter.cpp @@ -79,25 +79,3 @@ void PAINTER::SetGAL( GAL* aGal ) { m_gal = aGal; } - - -void PAINTER::DrawBrightened( const VIEW_ITEM* aItem ) -{ - BOX2I box = aItem->ViewBBox(); - - RenderTarget oldTarget = m_gal->GetTarget(); - m_gal->SetTarget( TARGET_OVERLAY ); - - m_gal->PushDepth(); - m_gal->SetLayerDepth( -1.0 ); - - // Draw an outline that marks items as brightened - m_gal->SetIsStroke( true ); - m_gal->SetLineWidth( 100000.0 ); - m_gal->SetStrokeColor( m_brightenedColor ); - - m_gal->DrawRectangle( box.GetOrigin(), box.GetOrigin() + box.GetSize() ); - m_gal->PopDepth(); - - m_gal->SetTarget( oldTarget ); -} diff --git a/common/view/view.cpp b/common/view/view.cpp index 4409806c3c..1aa45473d2 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -596,12 +596,6 @@ void VIEW::draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate ) const if( !m_painter->Draw( aItem, aLayer ) ) aItem->ViewDraw( aLayer, m_gal ); // Alternative drawing method } - - // Draws a bright contour around the item - if( static_cast( aItem )->IsBrightened() ) - { - m_painter->DrawBrightened( aItem ); - } } diff --git a/include/base_struct.h b/include/base_struct.h index b61368e0d1..5843fc52fd 100644 --- a/include/base_struct.h +++ b/include/base_struct.h @@ -474,11 +474,11 @@ public: inline void SetSelected() { SetFlags( SELECTED ); ViewUpdate( COLOR ); } inline void SetHighlighted() { SetFlags( HIGHLIGHTED ); ViewUpdate( COLOR ); } - inline void SetBrightened() { SetFlags( BRIGHTENED ); ViewUpdate( COLOR ); } + inline void SetBrightened() { SetFlags( BRIGHTENED ); } inline void ClearSelected() { ClearFlags( SELECTED ); ViewUpdate( COLOR ); } inline void ClearHighlighted() { ClearFlags( HIGHLIGHTED ); ViewUpdate( COLOR ); } - inline void ClearBrightened() { ClearFlags( BRIGHTENED ); ViewUpdate( COLOR ); } + inline void ClearBrightened() { ClearFlags( BRIGHTENED ); } void SetModified(); diff --git a/include/painter.h b/include/painter.h index 1cbd2df94b..43b0363c2b 100644 --- a/include/painter.h +++ b/include/painter.h @@ -224,13 +224,6 @@ public: */ virtual bool Draw( const VIEW_ITEM* aItem, int aLayer ) = 0; - /** - * Function DrawBrightened - * Draws a special marking for the item. - * @param aItem is the item that is going to be marked. - */ - virtual void DrawBrightened( const VIEW_ITEM* aItem ); - protected: /// Instance of graphic abstraction layer that gives an interface to call /// commands used to draw (eg. DrawLine, DrawCircle, etc.) diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 02c943d0d9..bce6beeaa3 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -221,6 +221,7 @@ set(PCBNEW_CLASS_SRCS tools/selection_tool.cpp tools/selection_area.cpp + tools/bright_box.cpp tools/move_tool.cpp tools/pcb_tools.cpp ) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index d9045a3b02..b64eebbe00 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -41,6 +41,7 @@ #include "selection_tool.h" #include "selection_area.h" +#include "bright_box.h" using namespace KiGfx; using boost::optional; @@ -334,8 +335,8 @@ bool SELECTION_TOOL::selectMultiple() BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) { - OPT_TOOL_EVENT evt; BOARD_ITEM* current = NULL; + boost::shared_ptr brightBox; m_menu.reset( new CONTEXT_MENU() ); m_menu->SetTitle( _( "Clarify selection" ) ); @@ -352,10 +353,13 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) SetContextMenu( m_menu.get(), CMENU_NOW ); - while( evt = Wait() ) + while( OPT_TOOL_EVENT evt = Wait() ) { + wxLogDebug( wxT( "disambiguation menu event") ); + if( evt->Action() == TA_ContextMenuUpdate ) { + // User has pointed an item, so show it in a different way if( current ) current->ClearBrightened(); @@ -380,14 +384,20 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) { current = ( *aCollector )[*id]; current->SetSelected(); - return current; } - return NULL; + break; + } + + if( current && current->IsBrightened() ) + { + brightBox.reset( new BRIGHT_BOX( current ) ); + getView()->Add( brightBox.get() ); } } - return NULL; + getView()->MarkTargetDirty( TARGET_OVERLAY ); + return current; } From ccdeb6dc0a5ed3c4a453e4feebe98d276cd5398c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 16 Sep 2013 11:08:31 +0200 Subject: [PATCH 333/415] More careful check on the net number while drawing net labels for tracks. --- pcbnew/pcb_painter.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 6810f5049f..da3e69313b 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -273,7 +273,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) if( m_pcbSettings->m_netNamesOnTracks && IsNetnameLayer( aLayer ) ) { // If there is a net name - display it on the track - if( netNumber != 0 ) + if( netNumber > 0 ) { VECTOR2D line = ( end - start ); double length = line.EuclideanNorm(); @@ -283,6 +283,9 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) return; NETINFO_ITEM* net = ( (BOARD*) aTrack->GetParent() )->FindNet( netNumber ); + if( net == NULL ) + return; + std::string netName = std::string( net->GetShortNetname().mb_str() ); VECTOR2D textPosition = start + line / 2.0; // center of the track double textOrientation = -atan( line.y / line.x ); From 66fcd4c5a21510d9941d76607c98c2cf06dc2aa1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 16 Sep 2013 14:44:03 +0200 Subject: [PATCH 334/415] Fixed bounding box for dimension. --- pcbnew/class_dimension.cpp | 19 +++++++++++++++++++ pcbnew/class_dimension.h | 3 +++ 2 files changed, 22 insertions(+) diff --git a/pcbnew/class_dimension.cpp b/pcbnew/class_dimension.cpp index c6dab49476..f7dacdc2a6 100644 --- a/pcbnew/class_dimension.cpp +++ b/pcbnew/class_dimension.cpp @@ -468,6 +468,15 @@ EDA_RECT DIMENSION::GetBoundingBox() const ymax = std::max( ymax, m_featureLineGO.y ); ymax = std::max( ymax, m_featureLineGF.y ); + xmin = std::min( xmin, m_featureLineDO.x ); + xmin = std::min( xmin, m_featureLineDF.x ); + ymin = std::min( ymin, m_featureLineDO.y ); + ymin = std::min( ymin, m_featureLineDF.y ); + xmax = std::max( xmax, m_featureLineDO.x ); + xmax = std::max( xmax, m_featureLineDF.x ); + ymax = std::max( ymax, m_featureLineDO.y ); + ymax = std::max( ymax, m_featureLineDF.y ); + bBox.SetX( xmin ); bBox.SetY( ymin ); bBox.SetWidth( xmax - xmin + 1 ); @@ -489,6 +498,16 @@ wxString DIMENSION::GetSelectMenuText() const } +const BOX2I DIMENSION::ViewBBox() const +{ + BOX2I dimBBox = BOX2I( VECTOR2I( GetBoundingBox().GetPosition() ), + VECTOR2I( GetBoundingBox().GetSize() ) ); + dimBBox.Merge( m_Text.ViewBBox() ); + + return dimBBox; +} + + void DIMENSION::ViewGetLayers( int aLayers[], int& aCount ) const { // Layer that simply displays the text diff --git a/pcbnew/class_dimension.h b/pcbnew/class_dimension.h index c92aae7433..25baeca80f 100644 --- a/pcbnew/class_dimension.h +++ b/pcbnew/class_dimension.h @@ -144,6 +144,9 @@ public: EDA_ITEM* Clone() const; + /// @copydoc VIEW_ITEM::ViewBBox() + virtual const BOX2I ViewBBox() const; + /// @copydoc VIEW_ITEM::ViewGetLayers() virtual void ViewGetLayers( int aLayers[], int& aCount ) const; From fe27b0e2bacfabbf93bcfa2811f1fb7d60304865 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 16 Sep 2013 15:19:48 +0200 Subject: [PATCH 335/415] Changed to worksheet border color to match the rest of the worksheet layout. --- common/worksheet_item.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/common/worksheet_item.cpp b/common/worksheet_item.cpp index 9845e48f92..900770040c 100644 --- a/common/worksheet_item.cpp +++ b/common/worksheet_item.cpp @@ -200,6 +200,5 @@ void WORKSHEET_ITEM::drawBorder( GAL* aGal ) const aGal->SetIsStroke( true ); aGal->SetIsFill( false ); - aGal->SetStrokeColor( COLOR4D( 0.5, 0.5, 0.5, 1.0 ) ); aGal->DrawRectangle( origin, end ); } From 32a12d1d6f88d9f66e5512ddf2af95c498a9d8c7 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 16 Sep 2013 16:18:43 +0200 Subject: [PATCH 336/415] Unified marking of selected items. --- pcbnew/pcb_painter.cpp | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index da3e69313b..b85e0874e6 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -631,7 +631,7 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment ) { - COLOR4D color = m_pcbSettings->GetColor( NULL, aSegment->GetLayer() ); + COLOR4D color = m_pcbSettings->GetColor( aSegment, aSegment->GetLayer() ); m_gal->SetIsFill( false ); m_gal->SetIsStroke( true ); @@ -720,7 +720,7 @@ void PCB_PAINTER::draw( const TEXTE_PCB* aText, int aLayer ) if( aText->GetText().Length() == 0 ) return; - COLOR4D strokeColor = m_pcbSettings->GetColor( NULL, aText->GetLayer() ); + COLOR4D strokeColor = m_pcbSettings->GetColor( aText, aText->GetLayer() ); VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y ); double orientation = aText->GetOrientation() * M_PI / 1800.0; @@ -744,7 +744,7 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) if( aText->GetLength() == 0 ) return; - COLOR4D strokeColor = m_pcbSettings->GetColor( NULL, aLayer ); + COLOR4D strokeColor = m_pcbSettings->GetColor( aText, aLayer ); VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y ); double orientation = aText->GetDrawRotation() * M_PI / 1800.0; @@ -759,7 +759,7 @@ void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone ) { - COLOR4D color = m_pcbSettings->GetColor( NULL, aZone->GetLayer() ); + COLOR4D color = m_pcbSettings->GetColor( aZone, aZone->GetLayer() ); std::deque corners; PCB_RENDER_SETTINGS::DisplayZonesMode displayMode = m_pcbSettings->m_displayZoneMode; @@ -836,7 +836,7 @@ void PCB_PAINTER::draw( const DIMENSION* aDimension, int aLayer ) else { int layer = aDimension->GetLayer(); - COLOR4D strokeColor = m_pcbSettings->GetColor( NULL, layer ); + COLOR4D strokeColor = m_pcbSettings->GetColor( aDimension, layer ); m_gal->SetStrokeColor( strokeColor ); m_gal->SetIsFill( false ); @@ -855,14 +855,20 @@ void PCB_PAINTER::draw( const DIMENSION* aDimension, int aLayer ) m_gal->DrawLine( VECTOR2D( aDimension->m_arrowG2O ), VECTOR2D( aDimension->m_arrowG2F ) ); // Draw text - draw( &aDimension->Text(), layer ); + TEXTE_PCB& text = aDimension->Text(); + VECTOR2D position( text.GetTextPosition().x, text.GetTextPosition().y ); + double orientation = text.GetOrientation() * M_PI / 1800.0; + + m_gal->SetLineWidth( text.GetThickness() ); + m_gal->SetTextAttributes( &text ); + m_gal->StrokeText( std::string( text.GetText().mb_str() ), position, orientation ); } } void PCB_PAINTER::draw( const PCB_TARGET* aTarget ) { - COLOR4D strokeColor = m_pcbSettings->GetColor( NULL, aTarget->GetLayer() ); + COLOR4D strokeColor = m_pcbSettings->GetColor( aTarget, aTarget->GetLayer() ); VECTOR2D position( aTarget->GetPosition() ); double size, radius; @@ -888,10 +894,8 @@ void PCB_PAINTER::draw( const PCB_TARGET* aTarget ) radius = aTarget->GetSize() / 3.0; } - m_gal->DrawLine( VECTOR2D( -size, 0.0 ), - VECTOR2D( size, 0.0 ) ); - m_gal->DrawLine( VECTOR2D( 0.0, -size ), - VECTOR2D( 0.0, size ) ); + m_gal->DrawLine( VECTOR2D( -size, 0.0 ), VECTOR2D( size, 0.0 ) ); + m_gal->DrawLine( VECTOR2D( 0.0, -size ), VECTOR2D( 0.0, size ) ); m_gal->DrawCircle( VECTOR2D( 0.0, 0.0 ), radius ); m_gal->Restore(); From 033b25de326442d60fa01014fe39f425e9ccd186 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 16 Sep 2013 16:46:02 +0200 Subject: [PATCH 337/415] Reenabled snapping for tools. --- common/tool/tool_dispatcher.cpp | 14 +++----------- common/view/wx_view_controls.cpp | 23 ++++++++++++++++++----- include/tool/tool_dispatcher.h | 2 -- include/view/view_controls.h | 24 ++---------------------- include/view/wx_view_controls.h | 6 ++++++ 5 files changed, 29 insertions(+), 40 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 03ff9ef9b3..ad3a38c857 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -122,15 +123,6 @@ int TOOL_DISPATCHER::decodeModifiers( const wxKeyboardState* aState ) const } -wxPoint TOOL_DISPATCHER::getCurrentMousePos() const -{ - wxPoint msp = wxGetMousePosition(); - wxPoint winp = m_editFrame->GetGalCanvas()->GetScreenPosition(); - - return wxPoint( msp.x - winp.x, msp.y - winp.y ); -} - - bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMotion ) { ButtonState* st = m_buttons[aIndex]; @@ -208,7 +200,6 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) { bool motion = false, buttonEvents = false; - VECTOR2D pos; optional evt; int type = aEvent.GetEventType(); @@ -220,7 +211,8 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) type == wxEVT_RIGHT_DOWN || type == wxEVT_RIGHT_UP || type == EVT_REFRESH_MOUSE ) { - pos = getView()->ToWorld ( getCurrentMousePos() ); + VECTOR2D screenPos = m_toolMgr->GetViewControls()->GetCursorPosition(); + VECTOR2D pos = getView()->ToWorld( screenPos ); if( pos != m_lastMousePos || type == EVT_REFRESH_MOUSE ) { motion = true; diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 1349948501..9776710676 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -65,11 +65,6 @@ void WX_VIEW_CONTROLS::onMotion( wxMouseEvent& aEvent ) m_mousePosition.x = aEvent.GetX(); m_mousePosition.y = aEvent.GetY(); - if( m_snappingEnabled ) - m_cursorPosition = m_view->GetGAL()->GetGridPoint( m_mousePosition ); - else - m_cursorPosition = m_mousePosition; - bool isAutoPanning = false; if( m_autoPanEnabled ) @@ -222,6 +217,24 @@ void WX_VIEW_CONTROLS::SetGrabMouse( bool aEnabled ) } +const VECTOR2D WX_VIEW_CONTROLS::GetMousePosition() const +{ + wxPoint msp = wxGetMousePosition(); + wxPoint winp = m_parentPanel->GetScreenPosition(); + + return VECTOR2D( msp.x - winp.x, msp.y - winp.y ); +} + + +const VECTOR2D WX_VIEW_CONTROLS::GetCursorPosition() const +{ + if( m_snappingEnabled ) + return m_view->GetGAL()->GetGridPoint( GetMousePosition() ); + else + return GetMousePosition(); +} + + bool WX_VIEW_CONTROLS::handleAutoPanning( const wxMouseEvent& aEvent ) { VECTOR2D p( aEvent.GetX(), aEvent.GetY() ); diff --git a/include/tool/tool_dispatcher.h b/include/tool/tool_dispatcher.h index f5b7bacae0..cb3273f744 100644 --- a/include/tool/tool_dispatcher.h +++ b/include/tool/tool_dispatcher.h @@ -76,8 +76,6 @@ private: bool handleMouseButton( wxEvent& aEvent, int aIndex, bool aMotion ); bool handlePopupMenu( wxEvent& aEvent ); - wxPoint getCurrentMousePos() const; - int decodeModifiers( const wxKeyboardState* aState ) const; struct ButtonState; diff --git a/include/view/view_controls.h b/include/view/view_controls.h index 3b686d966c..ca539f467c 100644 --- a/include/view/view_controls.h +++ b/include/view/view_controls.h @@ -110,10 +110,7 @@ public: * * @return The current mouse pointer position. */ - virtual const VECTOR2D& GetMousePosition() const - { - return m_mousePosition; - } + virtual const VECTOR2D GetMousePosition() const = 0; /** * Function GetCursorPosition() @@ -122,21 +119,7 @@ public: * * @return The current cursor position in screen coordinates. */ - virtual const VECTOR2D& GetCursorPosition() const - { - return m_cursorPosition; - } - - /** - * Function SetCursorPosition() - * Allows to move the cursor to a different location. - * - * @param aPosition is the new location expressed in screen coordinates. - */ - virtual void SetCursorPosition( const VECTOR2D& aPosition ) - { - m_cursorPosition = aPosition; - } + virtual const VECTOR2D GetCursorPosition() const = 0; protected: /// Pointer to controlled VIEW. @@ -145,9 +128,6 @@ protected: /// Current mouse position VECTOR2D m_mousePosition; - /// Current cursor position - VECTOR2D m_cursorPosition; - /// Should the cursor snap to grid or move freely bool m_snappingEnabled; diff --git a/include/view/wx_view_controls.h b/include/view/wx_view_controls.h index 7c905f2f9c..8562afbb82 100644 --- a/include/view/wx_view_controls.h +++ b/include/view/wx_view_controls.h @@ -78,6 +78,12 @@ public: m_state = IDLE; } + /// @copydoc VIEW_CONTROLS::GetMousePosition() + virtual const VECTOR2D GetMousePosition() const; + + /// @copydoc VIEW_CONTROLS::GetCursorPosition() + virtual const VECTOR2D GetCursorPosition() const; + private: /// Possible states for WX_VIEW_CONTROLS enum State { From ee841278923f05ac8882bbcbdc2e0a66489585eb Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 17 Sep 2013 11:19:15 +0200 Subject: [PATCH 338/415] Added get functions for high contrast mode fields. --- include/painter.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/include/painter.h b/include/painter.h index 43b0363c2b..5f9631506a 100644 --- a/include/painter.h +++ b/include/painter.h @@ -80,6 +80,16 @@ public: m_activeLayers.erase( aLayerId ); } + /** + * Function GetActiveLayers() + * Returns the set of currently active layers. + * @return The set of currently active layers. + */ + const std::set GetActiveLayers() + { + return m_activeLayers; + } + /** * Function ClearActiveLayers * Clears the list of active layers. @@ -89,6 +99,16 @@ public: m_activeLayers.clear(); } + /** + * Function IsActiveLayer + * Returns information whether the queried layer is marked as active. + * @return True if the queried layer is marked as active. + */ + inline bool IsActiveLayer( int aLayerId ) const + { + return ( m_activeLayers.count( aLayerId ) > 0 ); + } + /** * Function SetHighlight * Turns on/off highlighting - it may be done for the active layer or the specified net. @@ -114,6 +134,16 @@ public: m_hiContrastEnabled = aEnabled; } + /** + * Function GetHighContrast + * Returns information about high contrast display mode. + * @return True if the high contrast mode is on, false otherwise. + */ + inline bool GetHighContrast() const + { + return m_hiContrastEnabled; + } + /** * Function GetColor * Returns the color that should be used to draw the specific VIEW_ITEM on the specific layer From 278b4547f494d8084c553b1c013a59c52d349dff Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 17 Sep 2013 11:21:42 +0200 Subject: [PATCH 339/415] Modules are marked to be on copper layer too. --- pcbnew/class_module.cpp | 3 ++- pcbnew/pcb_painter.cpp | 11 +++++++---- pcbnew/pcb_painter.h | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index 0b68f61e64..680be27848 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -1027,6 +1027,7 @@ void MODULE::SetOrientation( double newangle ) void MODULE::ViewGetLayers( int aLayers[], int& aCount ) const { - aCount = 1; + aCount = 2; aLayers[0] = ITEM_GAL_LAYER( SELECTION ); // Selection box + aLayers[1] = m_Layer; } diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index b85e0874e6..ea89ecd81d 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -229,7 +229,7 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) break; case PCB_MODULE_T: - draw( (MODULE*) aItem ); + draw( (MODULE*) aItem, aLayer ); break; case PCB_TEXT_T: @@ -700,11 +700,14 @@ void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment ) } -void PCB_PAINTER::draw( const MODULE* aModule ) +void PCB_PAINTER::draw( const MODULE* aModule, int aLayer ) { // For modules we have to draw a selection box if needed - if( aModule->IsSelected() ) - drawSelectionBox( aModule ); + if( aLayer == ITEM_GAL_LAYER( SELECTION ) ) + { + if( aModule->IsSelected() ) + drawSelectionBox( aModule ); + } } diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 2e106f2b93..6899c54979 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -145,7 +145,7 @@ protected: void draw( const SEGVIA*, int ); void draw( const D_PAD*, int ); void draw( const DRAWSEGMENT* ); - void draw( const MODULE* ); + void draw( const MODULE*, int ); void draw( const TEXTE_PCB*, int ); void draw( const TEXTE_MODULE*, int ); void draw( const ZONE_CONTAINER* ); From 2d097d0fd7e6d7d7c12866a1869cd754436ce7eb Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 17 Sep 2013 11:23:00 +0200 Subject: [PATCH 340/415] Selection box color is put into render settings. Selection layer is removed from active layers. --- pcbnew/pcb_painter.cpp | 3 ++- pcbnew/pcbframe.cpp | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index ea89ecd81d..a2cae1c427 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -76,6 +76,7 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings m_layerColors[ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); m_layerColors[ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); m_layerColors[ITEM_GAL_LAYER( WORKSHEET )] = COLOR4D( 0.5, 0.0, 0.0, 1.0 ); + m_layerColors[ITEM_GAL_LAYER( SELECTION )] = COLOR4D( 1.0, 1.0, 1.0, 0.5 ); // Netnames for copper layers for( LAYER_NUM layer = FIRST_COPPER_LAYER; layer <= LAST_COPPER_LAYER; ++layer ) @@ -911,6 +912,6 @@ void PCB_PAINTER::drawSelectionBox( const VIEW_ITEM* aItem ) const m_gal->SetIsStroke( false ); m_gal->SetIsFill( true ); - m_gal->SetFillColor( COLOR4D( 1.0, 1.0, 1.0, 0.5 ) ); + m_gal->SetFillColor( m_pcbSettings->GetLayerColor( ITEM_GAL_LAYER( SELECTION ) ) ); m_gal->DrawRectangle( boundingBox.GetOrigin(), boundingBox.GetEnd() ); } diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index bf15c21989..e581f53a32 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -767,8 +767,7 @@ void PCB_EDIT_FRAME::setHighContrastLayer( LAYER_NUM aLayer ) LAYER_NUM layers[] = { GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), - ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), - ITEM_GAL_LAYER( SELECTION ) + ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ) }; for( unsigned int i = 0; i < sizeof( layers ) / sizeof( LAYER_NUM ); ++i ) From d4e07e981aac7622c1e39eb8da92182d764aeaea Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 17 Sep 2013 11:32:47 +0200 Subject: [PATCH 341/415] Selection in high contrast mode selects only items that are shown as active. --- pcbnew/tools/selection_tool.cpp | 46 ++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index b64eebbe00..6324937d73 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -118,7 +119,8 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) // Check if dragging event started within the currently selected items bounding box std::set::iterator it, it_end; - for( it = m_selectedItems.begin(), it_end = m_selectedItems.end(); it != it_end; ++it ) + for( it = m_selectedItems.begin(), it_end = m_selectedItems.end(); + it != it_end; ++it ) { BOX2I itemBox = (*it)->ViewBBox(); itemBox.Inflate( 500000 ); // Give some margin for gripping an item @@ -207,8 +209,8 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) break; default: - // Remove footprints, they have to be selected by clicking on area that does not - // contain anything but footprint + // Remove modules, they have to be selected by clicking on area that does not + // contain anything but module footprint for( int i = 0; i < collector.GetCount(); ++i ) { BOARD_ITEM* boardItem = ( collector )[i]; @@ -343,20 +345,26 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) int limit = std::min( 10, aCollector->GetCount() ); + int addedItems = 0; for( int i = 0; i < limit; ++i ) { wxString text; BOARD_ITEM* item = ( *aCollector )[i]; - text = item->GetSelectMenuText(); - m_menu->Add( text, i ); + if( selectable( item ) ) + { + text = item->GetSelectMenuText(); + m_menu->Add( text, i ); + addedItems++; + } } + if( addedItems == 0 ) // none of items was selectable + return NULL; + SetContextMenu( m_menu.get(), CMENU_NOW ); while( OPT_TOOL_EVENT evt = Wait() ) { - wxLogDebug( wxT( "disambiguation menu event") ); - if( evt->Action() == TA_ContextMenuUpdate ) { // User has pointed an item, so show it in a different way @@ -404,6 +412,30 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) { BOARD* board = getModel( PCB_T ); + bool highContrast = getView()->GetPainter()->GetSettings()->GetHighContrast(); + + if( highContrast ) + { + bool onActive = false; + int layers[KiGfx::VIEW::VIEW_MAX_LAYERS], layers_count; + + // Filter out items that do not belong to active layers + std::set activeLayers = getView()->GetPainter()-> + GetSettings()->GetActiveLayers(); + aItem->ViewGetLayers( layers, layers_count ); + + for( int i = 0; i < layers_count; ++i ) + { + if( activeLayers.count( layers[i] ) > 0 ) // Item is on at least one active layer + { + onActive = true; + break; + } + } + + if( !onActive ) + return false; + } switch( aItem->Type() ) { From b03359a3db53ba55ce240fa974bb412d02874b2e Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 17 Sep 2013 13:47:33 +0200 Subject: [PATCH 342/415] The last fix to selection rules. --- pcbnew/tools/selection_tool.cpp | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 6324937d73..8559e81f6a 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -210,11 +210,11 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) default: // Remove modules, they have to be selected by clicking on area that does not - // contain anything but module footprint - for( int i = 0; i < collector.GetCount(); ++i ) + // contain anything but module footprint and not selectable items + for( int i = collector.GetCount() - 1; i >= 0 ; --i ) { BOARD_ITEM* boardItem = ( collector )[i]; - if( boardItem->Type() == PCB_MODULE_T ) + if( boardItem->Type() == PCB_MODULE_T || !selectable( boardItem ) ) collector.Remove( i ); } @@ -223,7 +223,7 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) { toggleSelection( collector[0] ); } - else + else if( collector.GetCount() > 1 ) { item = disambiguationMenu( &collector ); if( item ) @@ -345,22 +345,14 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) int limit = std::min( 10, aCollector->GetCount() ); - int addedItems = 0; for( int i = 0; i < limit; ++i ) { wxString text; BOARD_ITEM* item = ( *aCollector )[i]; - if( selectable( item ) ) - { - text = item->GetSelectMenuText(); - m_menu->Add( text, i ); - addedItems++; - } + text = item->GetSelectMenuText(); + m_menu->Add( text, i ); } - if( addedItems == 0 ) // none of items was selectable - return NULL; - SetContextMenu( m_menu.get(), CMENU_NOW ); while( OPT_TOOL_EVENT evt = Wait() ) @@ -411,7 +403,6 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) { - BOARD* board = getModel( PCB_T ); bool highContrast = getView()->GetPainter()->GetSettings()->GetHighContrast(); if( highContrast ) @@ -437,6 +428,7 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) return false; } + BOARD* board = getModel( PCB_T ); switch( aItem->Type() ) { case PCB_VIA_T: From ed4966a3ff999edf66abe6c8fe380ae959580d55 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 17 Sep 2013 14:46:48 +0200 Subject: [PATCH 343/415] Fixed random color of worksheet border. --- common/worksheet_item.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/worksheet_item.cpp b/common/worksheet_item.cpp index 900770040c..9eefc3d908 100644 --- a/common/worksheet_item.cpp +++ b/common/worksheet_item.cpp @@ -97,9 +97,6 @@ void WORKSHEET_ITEM::ViewDraw( int aLayer, GAL* aGal ) const EDA_COLOR_T edaColor = ColorFindNearest( color.r * 255, color.g * 255, color.b * 255 ); drawList.BuildWorkSheetGraphicList( *m_pageInfo, *m_titleBlock, edaColor, edaColor ); - // Draw gray line that outlines the sheet size - drawBorder( aGal ); - // Draw all the components that make the page layout WS_DRAW_ITEM_BASE* item = drawList.GetFirst(); while( item ) @@ -125,6 +122,9 @@ void WORKSHEET_ITEM::ViewDraw( int aLayer, GAL* aGal ) const item = drawList.GetNext(); } + + // Draw gray line that outlines the sheet size + drawBorder( aGal ); } From 1ea78293d04fd1b4841a50a1af265f82d62bb4db Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Wed, 18 Sep 2013 13:13:03 +0200 Subject: [PATCH 344/415] gal: make the cursor a bit bigger and hidden by default --- common/gal/graphics_abstraction_layer.cpp | 4 ++-- common/gal/opengl/opengl_gal.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index 0282e69327..70e761f5c9 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -54,8 +54,8 @@ GAL::GAL() : // Initialize the cursor shape SetCursorColor( COLOR4D( 1.0, 1.0, 1.0, 1.0 ) ); - SetCursorSize( 15 ); - SetCursorEnabled( true ); + SetCursorSize( 80 ); + SetCursorEnabled( false ); strokeFont.LoadNewStrokeFont( newstroke_font, newstroke_font_bufsize ); } diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 07b5238cf1..6cb6421f92 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -82,7 +82,7 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, SetSize( aParent->GetSize() ); screenSize = VECTOR2D( aParent->GetSize() ); - initCursor( 20 ); + initCursor( 80 ); // Grid color settings are different in Cairo and OpenGL SetGridColor( COLOR4D( 0.8, 0.8, 0.8, 0.1 ) ); From e2736f4db1a3a64886c88f01225a824a63b0578a Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Wed, 18 Sep 2013 13:14:13 +0200 Subject: [PATCH 345/415] geometry: killed compiler warnings --- common/geometry/shape_line_chain.cpp | 2 +- include/geometry/seg.h | 13 +------------ include/geometry/shape.h | 5 ++++- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/common/geometry/shape_line_chain.cpp b/common/geometry/shape_line_chain.cpp index 44c7bad7f4..6edc0d2b14 100644 --- a/common/geometry/shape_line_chain.cpp +++ b/common/geometry/shape_line_chain.cpp @@ -439,7 +439,7 @@ SHAPE_LINE_CHAIN& SHAPE_LINE_CHAIN::Simplify() const VECTOR2I SHAPE_LINE_CHAIN::NearestPoint(const VECTOR2I& aP) const { int min_d = INT_MAX; - int nearest; + int nearest = 0; for ( int i = 0; i < SegmentCount() ; i++ ) { int d = CSegment(i).Distance(aP); diff --git a/include/geometry/seg.h b/include/geometry/seg.h index bb215aa05f..7b5f64ac2f 100644 --- a/include/geometry/seg.h +++ b/include/geometry/seg.h @@ -307,18 +307,7 @@ inline VECTOR2I SEG::LineProject( const VECTOR2I& aP ) const { // fixme: numerical errors for large integers assert(false); - /*const VECTOR2I d = aB - aA; - ecoord det = d.Dot(d); - ecoord dxdy = (ecoord) d.x * d.y; - - ecoord qx = - ( (extended_type) aA.x * d.y * d.y + (extended_type) d.x * d.x * x - dxdy * - (aA.y - y) ) / det; - extended_type qy = - ( (extended_type) aA.y * d.x * d.x + (extended_type) d.y * d.y * y - dxdy * - (aA.x - x) ) / det; - - return VECTOR2 ( (T) qx, (T) qy );*/ + return VECTOR2I(0, 0); } diff --git a/include/geometry/shape.h b/include/geometry/shape.h index 6d56fef79a..c759b0bbd6 100644 --- a/include/geometry/shape.h +++ b/include/geometry/shape.h @@ -77,7 +77,10 @@ class SHAPE { * Returns a dynamically allocated copy of the shape * @retval copy of the shape */ - virtual SHAPE* Clone() const { assert(false); }; + virtual SHAPE* Clone() const { + assert(false); + return NULL; + }; /** * Function Collide() From 0e23e23a7cbad258193e90e85d07e25df0c6c398 Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Wed, 18 Sep 2013 13:14:57 +0200 Subject: [PATCH 346/415] VIEW: added GetTopLayer() method --- common/view/view.cpp | 8 ++++++++ include/view/view.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/common/view/view.cpp b/common/view/view.cpp index 4409806c3c..ca21e29ed8 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -452,6 +452,14 @@ void VIEW::ChangeLayerDepth( int aLayer, int aDepth ) m_layers[aLayer].items->Query( r, visitor ); } +int VIEW::GetTopLayer( ) const +{ + if( m_topLayers.size() == 0 ) + return 0; + + return *m_topLayers.begin(); +} + void VIEW::SetTopLayer( int aLayer, bool aEnabled ) { diff --git a/include/view/view.h b/include/view/view.h index 5013fdaf91..714283ef44 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -362,6 +362,8 @@ public: */ void EnableTopLayer( bool aEnable ); + int GetTopLayer() const; + /** * Function ClearTopLayers() * Removes all layers from the on-the-top set (they are no longer displayed over the rest of From 5d3dda7a9da6b8a96bf5c353a510c4b4c00800cf Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Wed, 18 Sep 2013 13:15:42 +0200 Subject: [PATCH 347/415] VIEW_CONTROLS: added ForceCursorPosition() and ShowCursor() methods --- common/view/wx_view_controls.cpp | 43 +++++++++++++++++--------------- include/view/view_controls.h | 23 +++++++++++------ 2 files changed, 39 insertions(+), 27 deletions(-) diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 1349948501..cbbe289cef 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -28,7 +28,6 @@ #include #include #include -#include using namespace KiGfx; @@ -59,13 +58,19 @@ WX_VIEW_CONTROLS::WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ) : WX_VIEW_CONTROLS::onTimer ), NULL, this ); } +void VIEW_CONTROLS::ShowCursor ( bool aEnabled ) +{ + m_view->GetGAL()->SetCursorEnabled( aEnabled ); +} void WX_VIEW_CONTROLS::onMotion( wxMouseEvent& aEvent ) { m_mousePosition.x = aEvent.GetX(); m_mousePosition.y = aEvent.GetY(); - if( m_snappingEnabled ) + if( m_forceCursorPosition ) + m_cursorPosition = m_view->ToScreen (m_forcedPosition); + else if( m_snappingEnabled ) m_cursorPosition = m_view->GetGAL()->GetGridPoint( m_mousePosition ); else m_cursorPosition = m_mousePosition; @@ -185,28 +190,26 @@ void WX_VIEW_CONTROLS::onTimer( wxTimerEvent& aEvent ) { switch( m_state ) { - case AUTO_PANNING: - { - double borderSize = std::min( m_autoPanMargin * m_view->GetScreenPixelSize().x, - m_autoPanMargin * m_view->GetScreenPixelSize().y ); + case AUTO_PANNING: + { + double borderSize = std::min( m_autoPanMargin * m_view->GetScreenPixelSize().x, + m_autoPanMargin * m_view->GetScreenPixelSize().y ); - VECTOR2D dir( m_panDirection ); + VECTOR2D dir( m_panDirection ); - if( dir.EuclideanNorm() > borderSize ) - dir = dir.Resize( borderSize ); + if( dir.EuclideanNorm() > borderSize ) + dir = dir.Resize( borderSize ); - dir = m_view->ToWorld( dir, false ); - m_view->SetCenter( m_view->GetCenter() + dir * m_autoPanSpeed ); - - // Notify tools that the cursor position has changed in the world coordinates - wxCommandEvent moveEvent( TOOL_DISPATCHER::EVT_REFRESH_MOUSE ); - wxPostEvent( m_parentPanel, moveEvent ); - } - break; - - case IDLE: // Just remove unnecessary warnings - case DRAG_PANNING: + dir = m_view->ToWorld( dir, false ); + m_view->SetCenter( m_view->GetCenter() + dir * m_autoPanSpeed ); + m_parentPanel->Refresh(); + + } break; + + case IDLE: // Just remove unnecessary warnings + case DRAG_PANNING: + break; } } diff --git a/include/view/view_controls.h b/include/view/view_controls.h index 3b686d966c..af664da11c 100644 --- a/include/view/view_controls.h +++ b/include/view/view_controls.h @@ -127,17 +127,21 @@ public: return m_cursorPosition; } - /** - * Function SetCursorPosition() - * Allows to move the cursor to a different location. - * - * @param aPosition is the new location expressed in screen coordinates. + + /** + * Function ForceCursorPosition() + * Places the cursor immediately at a given point. Mouse movement is ignored. + * @param aEnabled enable forced cursor position + * @param aPosition the position */ - virtual void SetCursorPosition( const VECTOR2D& aPosition ) + virtual void ForceCursorPosition( bool aEnabled, const VECTOR2D& aPosition = VECTOR2D(0, 0) ) { - m_cursorPosition = aPosition; + m_forcedPosition = aPosition; + m_forceCursorPosition = aEnabled; } + virtual void ShowCursor ( bool aEnabled ); + protected: /// Pointer to controlled VIEW. VIEW* m_view; @@ -148,6 +152,9 @@ protected: /// Current cursor position VECTOR2D m_cursorPosition; + /// Forced cursor position + VECTOR2D m_forcedPosition; + /// Should the cursor snap to grid or move freely bool m_snappingEnabled; @@ -157,6 +164,8 @@ protected: /// Flag for turning on autopanning bool m_autoPanEnabled; + bool m_forceCursorPosition; + /// Distance from cursor to VIEW edge when panning is active float m_autoPanMargin; From 8bb3bba7e85505bdc3bb93dc6a79d703cfa60e4c Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Wed, 18 Sep 2013 13:16:57 +0200 Subject: [PATCH 348/415] PCB_PAINTER: fix segfault when item has no net assigned --- pcbnew/pcb_painter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 6810f5049f..3889963c3e 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -283,6 +283,9 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) return; NETINFO_ITEM* net = ( (BOARD*) aTrack->GetParent() )->FindNet( netNumber ); + if(!net) + return; + std::string netName = std::string( net->GetShortNetname().mb_str() ); VECTOR2D textPosition = start + line / 2.0; // center of the track double textOrientation = -atan( line.y / line.x ); From 17cd564ba6e6037015f7823e789746c8e8fc606e Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Wed, 18 Sep 2013 13:37:20 +0200 Subject: [PATCH 349/415] PCB_EDIT_FRAME: public SetTopLayer() method --- include/wxPcbStruct.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index 2110eb75d9..de4c55d0b2 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -1690,6 +1690,11 @@ public: */ void UpdateTitle(); + void SetTopLayer( LAYER_NUM aLayer ) + { + setTopLayer( aLayer ); + } + DECLARE_EVENT_TABLE() }; From 3d767ffcc76f7b696db57656ae037470c8b7208c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 18 Sep 2013 17:04:07 +0200 Subject: [PATCH 350/415] Moved Type() method from EDA_ITEM to VIEW_ITEM. --- include/base_struct.h | 105 +------------------------------------ include/view/view_item.h | 109 +++++++++++++++++++++++++++++++++++++++ pcbnew/pcb_painter.cpp | 2 +- 3 files changed, 111 insertions(+), 105 deletions(-) diff --git a/include/base_struct.h b/include/base_struct.h index 5843fc52fd..9f615dc946 100644 --- a/include/base_struct.h +++ b/include/base_struct.h @@ -47,104 +47,6 @@ extern std::ostream& operator <<( std::ostream& out, const wxPoint& pt ); #endif -/** - * Enum KICAD_T - * is the set of class identification values, stored in EDA_ITEM::m_StructType - */ -enum KICAD_T { - NOT_USED = -1, ///< the 3d code uses this value - - EOT = 0, ///< search types array terminator (End Of Types) - - TYPE_NOT_INIT = 0, - PCB_T, - SCREEN_T, ///< not really an item, used to identify a screen - - // Items in pcb - PCB_MODULE_T, ///< class MODULE, a footprint - PCB_PAD_T, ///< class D_PAD, a pad in a footprint - PCB_LINE_T, ///< class DRAWSEGMENT, a segment not on copper layers - PCB_TEXT_T, ///< class TEXTE_PCB, text on a layer - PCB_MODULE_TEXT_T, ///< class TEXTE_MODULE, text in a footprint - PCB_MODULE_EDGE_T, ///< class EDGE_MODULE, a footprint edge - PCB_TRACE_T, ///< class TRACKE, a track segment (segment on a copper layer) - PCB_VIA_T, ///< class SEGVIA, a via (like a track segment on a copper layer) - PCB_ZONE_T, ///< class SEGZONE, a segment used to fill a zone area (segment on a - ///< copper layer) - PCB_MARKER_T, ///< class MARKER_PCB, a marker used to show something - PCB_DIMENSION_T, ///< class DIMENSION, a dimension (graphic item) - PCB_TARGET_T, ///< class PCB_TARGET, a target (graphic item) - PCB_ZONE_AREA_T, ///< class ZONE_CONTAINER, a zone area - PCB_ITEM_LIST_T, ///< class BOARD_ITEM_LIST, a list of board items - - // Schematic draw Items. The order of these items effects the sort order. - // It is currently ordered to mimic the old Eeschema locate behavior where - // the smallest item is the selected item. - SCH_MARKER_T, - SCH_JUNCTION_T, - SCH_NO_CONNECT_T, - SCH_BUS_WIRE_ENTRY_T, - SCH_BUS_BUS_ENTRY_T, - SCH_LINE_T, - SCH_BITMAP_T, - SCH_TEXT_T, - SCH_LABEL_T, - SCH_GLOBAL_LABEL_T, - SCH_HIERARCHICAL_LABEL_T, - SCH_FIELD_T, - SCH_COMPONENT_T, - SCH_SHEET_PIN_T, - SCH_SHEET_T, - - // Be prudent with these 3 types: - // they should be used only to locate a specific field type - // among SCH_FIELD_T items types - SCH_FIELD_LOCATE_REFERENCE_T, - SCH_FIELD_LOCATE_VALUE_T, - SCH_FIELD_LOCATE_FOOTPRINT_T, - - // General - SCH_SCREEN_T, - - /* - * Draw items in library component. - * - * The order of these items effects the sort order for items inside the - * "DRAW/ENDDRAW" section of the component definition in a library file. - * If you add a new draw item, type, please make sure you add it so the - * sort order is logical. - */ - LIB_COMPONENT_T, - LIB_ALIAS_T, - LIB_ARC_T, - LIB_CIRCLE_T, - LIB_TEXT_T, - LIB_RECTANGLE_T, - LIB_POLYLINE_T, - LIB_BEZIER_T, - LIB_PIN_T, - - /* - * Fields are not saved inside the "DRAW/ENDDRAW". Add new draw item - * types before this line. - */ - LIB_FIELD_T, - - /* - * For GerbView: items type: - */ - TYPE_GERBER_DRAW_ITEM, - - /* - * for Pl_Editor, in undo/redo commands - */ - TYPE_PL_EDITOR_LAYOUT, - - // End value - MAX_STRUCT_TYPE_ID -}; - - /** * Enum FILL_T * is the set of fill types used in plotting or drawing enclosed areas. @@ -440,12 +342,7 @@ public: EDA_ITEM( const EDA_ITEM& base ); virtual ~EDA_ITEM() { }; - /** - * Function Type - * returns the type of object. This attribute should never be changed - * after a constructor sets it, so there is no public "setter" method. - * @return KICAD_T - the type of object. - */ + /// @copydoc VIEW_ITEM::Type() KICAD_T Type() const { return m_StructType; } void SetTimeStamp( time_t aNewTimeStamp ) { m_TimeStamp = aNewTimeStamp; } diff --git a/include/view/view_item.h b/include/view/view_item.h index 8004c4264b..cbf8be7967 100644 --- a/include/view/view_item.h +++ b/include/view/view_item.h @@ -36,6 +36,104 @@ #include #include +/** + * Enum KICAD_T + * is the set of class identification values, stored in EDA_ITEM::m_StructType + */ +enum KICAD_T { + NOT_USED = -1, ///< the 3d code uses this value + + EOT = 0, ///< search types array terminator (End Of Types) + + TYPE_NOT_INIT = 0, + PCB_T, + SCREEN_T, ///< not really an item, used to identify a screen + + // Items in pcb + PCB_MODULE_T, ///< class MODULE, a footprint + PCB_PAD_T, ///< class D_PAD, a pad in a footprint + PCB_LINE_T, ///< class DRAWSEGMENT, a segment not on copper layers + PCB_TEXT_T, ///< class TEXTE_PCB, text on a layer + PCB_MODULE_TEXT_T, ///< class TEXTE_MODULE, text in a footprint + PCB_MODULE_EDGE_T, ///< class EDGE_MODULE, a footprint edge + PCB_TRACE_T, ///< class TRACKE, a track segment (segment on a copper layer) + PCB_VIA_T, ///< class SEGVIA, a via (like a track segment on a copper layer) + PCB_ZONE_T, ///< class SEGZONE, a segment used to fill a zone area (segment on a + ///< copper layer) + PCB_MARKER_T, ///< class MARKER_PCB, a marker used to show something + PCB_DIMENSION_T, ///< class DIMENSION, a dimension (graphic item) + PCB_TARGET_T, ///< class PCB_TARGET, a target (graphic item) + PCB_ZONE_AREA_T, ///< class ZONE_CONTAINER, a zone area + PCB_ITEM_LIST_T, ///< class BOARD_ITEM_LIST, a list of board items + + // Schematic draw Items. The order of these items effects the sort order. + // It is currently ordered to mimic the old Eeschema locate behavior where + // the smallest item is the selected item. + SCH_MARKER_T, + SCH_JUNCTION_T, + SCH_NO_CONNECT_T, + SCH_BUS_WIRE_ENTRY_T, + SCH_BUS_BUS_ENTRY_T, + SCH_LINE_T, + SCH_BITMAP_T, + SCH_TEXT_T, + SCH_LABEL_T, + SCH_GLOBAL_LABEL_T, + SCH_HIERARCHICAL_LABEL_T, + SCH_FIELD_T, + SCH_COMPONENT_T, + SCH_SHEET_PIN_T, + SCH_SHEET_T, + + // Be prudent with these 3 types: + // they should be used only to locate a specific field type + // among SCH_FIELD_T items types + SCH_FIELD_LOCATE_REFERENCE_T, + SCH_FIELD_LOCATE_VALUE_T, + SCH_FIELD_LOCATE_FOOTPRINT_T, + + // General + SCH_SCREEN_T, + + /* + * Draw items in library component. + * + * The order of these items effects the sort order for items inside the + * "DRAW/ENDDRAW" section of the component definition in a library file. + * If you add a new draw item, type, please make sure you add it so the + * sort order is logical. + */ + LIB_COMPONENT_T, + LIB_ALIAS_T, + LIB_ARC_T, + LIB_CIRCLE_T, + LIB_TEXT_T, + LIB_RECTANGLE_T, + LIB_POLYLINE_T, + LIB_BEZIER_T, + LIB_PIN_T, + + /* + * Fields are not saved inside the "DRAW/ENDDRAW". Add new draw item + * types before this line. + */ + LIB_FIELD_T, + + /* + * For GerbView: items type: + */ + TYPE_GERBER_DRAW_ITEM, + + /* + * for Pl_Editor, in undo/redo commands + */ + TYPE_PL_EDITOR_LAYOUT, + + // End value + MAX_STRUCT_TYPE_ID +}; + + namespace KiGfx { // Forward declarations @@ -81,6 +179,17 @@ public: delete[] m_groups; }; + /** + * Function Type + * returns the type of object. This attribute should never be changed + * after a constructor sets it, so there is no public "setter" method. + * @return KICAD_T - the type of object. + */ + virtual KICAD_T Type() const + { + return NOT_USED; + } + /** * Function ViewBBox() * returns the bounding box of the item covering all its layers. diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 5fa4c10e2e..dbc023eba7 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -207,7 +207,7 @@ PCB_PAINTER::PCB_PAINTER( GAL* aGal ) : bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) { // the "cast" applied in here clarifies which overloaded draw() is called - switch( item->Type() ) + switch( aItem->Type() ) { case PCB_ZONE_T: case PCB_TRACE_T: From fcd3bbecdfde7bbc97006a9f53d953f6a96ed946 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 18 Sep 2013 17:36:54 +0200 Subject: [PATCH 351/415] Added limits for VIEW scale values & panning area. --- common/view/view.cpp | 24 +++++++++++++++++++++++- include/view/view.h | 29 +++++++++++++++++++++++++++++ pcbnew/basepcbframe.cpp | 1 + 3 files changed, 53 insertions(+), 1 deletion(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 529b966d49..5d529f4559 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -45,8 +45,11 @@ VIEW::VIEW( bool aIsDynamic ) : m_scale( 1.0 ), m_painter( NULL ), m_gal( NULL ), - m_dynamic( aIsDynamic ) + m_dynamic( aIsDynamic ), + m_scaleLimits( 15000.0, 1.0 ) { + m_panBoundary.SetMaximum(); + // Redraw everything at the beginning for( int i = 0; i < TARGETS_NUMBER; ++i ) MarkTargetDirty( i ); @@ -290,6 +293,11 @@ void VIEW::SetScale( double aScale ) void VIEW::SetScale( double aScale, const VECTOR2D& aAnchor ) { + if( aScale > m_scaleLimits.x ) + aScale = m_scaleLimits.x; + else if( aScale < m_scaleLimits.y ) + aScale = m_scaleLimits.y; + VECTOR2D a = ToScreen( aAnchor ); m_gal->SetZoomFactor( aScale ); @@ -308,6 +316,20 @@ void VIEW::SetScale( double aScale, const VECTOR2D& aAnchor ) void VIEW::SetCenter( const VECTOR2D& aCenter ) { m_center = aCenter; + + if( !m_panBoundary.Contains( aCenter ) ) + { + if( aCenter.x < m_panBoundary.GetLeft() ) + m_center.x = m_panBoundary.GetLeft(); + else if( aCenter.x > m_panBoundary.GetRight() ) + m_center.x = m_panBoundary.GetRight(); + + if( aCenter.y < m_panBoundary.GetTop() ) + m_center.y = m_panBoundary.GetTop(); + else if( aCenter.y > m_panBoundary.GetBottom() ) + m_center.y = m_panBoundary.GetBottom(); + } + m_gal->SetLookAtPoint( m_center ); m_gal->ComputeWorldScreenMatrix(); diff --git a/include/view/view.h b/include/view/view.h index 714283ef44..dc6a27691a 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -455,6 +455,29 @@ public: m_dirtyTargets[i] = true; } + /** + * Function SetPanBoundary() + * Sets limits for panning area. + * @param aBoundary is the box that limits panning area. + */ + void SetPanBoundary( const BOX2I& aBoundary ) + { + m_panBoundary = aBoundary; + } + + /** + * Function SetScaleLimits() + * Sets minimum and maximum values for scale. + * @param aMaximum is the maximum value for scale.. + * @param aMinimum is the minimum value for scale. + */ + void SetScaleLimits( double aMaximum, double aMinimum ) + { + wxASSERT_MSG( aMaximum > aMinimum, wxT( "I guess you passed parameters in wrong order" ) ); + + m_scaleLimits = VECTOR2D( aMaximum, aMinimum ); + } + static const int VIEW_MAX_LAYERS = 128; ///* maximum number of layers that may be shown private: @@ -588,6 +611,12 @@ private: /// Rendering order modifier for layers that are marked as top layers static const int TOP_LAYER_MODIFIER = -VIEW_MAX_LAYERS; + + /// Panning boundaries + BOX2I m_panBoundary; + + /// Zoom limits + VECTOR2D m_scaleLimits; }; } // namespace KiGfx diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index bd23efa35c..a6c0ec42ec 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -217,6 +217,7 @@ void PCB_BASE_FRAME::ViewReloadBoard( const BOARD* aBoard ) const view->Add( worksheet ); + view->SetPanBoundary( worksheet->ViewBBox() ); view->RecacheAllItems( true ); if( m_galCanvasActive ) From 1b29805fc9d595deac82b6a691ff9340cc645fbf Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Wed, 18 Sep 2013 19:37:56 +0200 Subject: [PATCH 352/415] geometry/rtree.h: fix compiler warnings --- include/geometry/rtree.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/geometry/rtree.h b/include/geometry/rtree.h index d64d7a074a..abc7833286 100644 --- a/include/geometry/rtree.h +++ b/include/geometry/rtree.h @@ -1287,7 +1287,7 @@ int RTREE_QUAL::PickBranch( Rect* a_rect, Node* a_node ) ELEMTYPEREAL bestIncr = (ELEMTYPEREAL) -1; ELEMTYPEREAL area; ELEMTYPEREAL bestArea; - int best; + int best = 0; Rect tempRect; for( int index = 0; index < a_node->m_count; ++index ) @@ -1480,7 +1480,7 @@ void RTREE_QUAL::ChoosePartition( PartitionVars* a_parVars, int a_minFill ) ASSERT( a_parVars ); ELEMTYPEREAL biggestDiff; - int group, chosen, betterGroup; + int group, chosen = 0, betterGroup = 0; InitParVars( a_parVars, a_parVars->m_branchCount, a_minFill ); PickSeeds( a_parVars ); @@ -1603,7 +1603,7 @@ void RTREE_QUAL::InitParVars( PartitionVars* a_parVars, int a_maxRects, int a_mi RTREE_TEMPLATE void RTREE_QUAL::PickSeeds( PartitionVars* a_parVars ) { - int seed0, seed1; + int seed0 = 0, seed1 = 0; ELEMTYPEREAL worst, waste; ELEMTYPEREAL area[MAXNODES + 1]; From 67fadf0c947f48f0bdfd6f1aae571c8dc9233ce9 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 18 Sep 2013 19:51:57 +0200 Subject: [PATCH 353/415] Added missing files --- pcbnew/tools/bright_box.cpp | 72 +++++++++++++++++++++++++++++++++++++ pcbnew/tools/bright_box.h | 62 ++++++++++++++++++++++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 pcbnew/tools/bright_box.cpp create mode 100644 pcbnew/tools/bright_box.h diff --git a/pcbnew/tools/bright_box.cpp b/pcbnew/tools/bright_box.cpp new file mode 100644 index 0000000000..f1c0802522 --- /dev/null +++ b/pcbnew/tools/bright_box.cpp @@ -0,0 +1,72 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "bright_box.h" +#include +#include + +using namespace KiGfx; + +BRIGHT_BOX::BRIGHT_BOX( BOARD_ITEM* aItem ) : + EDA_ITEM( NOT_USED ), // this item is never added to a BOARD so it needs no type + item( aItem ) +{ +} + + +const BOX2I BRIGHT_BOX::ViewBBox() const +{ + return item->ViewBBox(); +} + + +void BRIGHT_BOX::ViewGetLayers( int aLayers[], int& aCount ) const +{ + aLayers[0] = BrightBoxLayer; + aCount = 1; +} + + +void BRIGHT_BOX::ViewDraw( int aLayer, GAL* aGal ) const +{ + aGal->SetIsStroke( true ); + aGal->SetIsFill( false ); + aGal->SetLineWidth( LineWidth ); + aGal->SetStrokeColor( BrightColor ); + + if( item->Type() == PCB_TRACE_T ) + { + const TRACK* track = static_cast( item ); + + aGal->DrawSegment( track->GetStart(), track->GetEnd(), track->GetWidth() ); + } + else + { + BOX2I box = item->ViewBBox(); + + aGal->DrawRectangle( box.GetOrigin(), box.GetOrigin() + box.GetSize() ); + } +} + +const COLOR4D BRIGHT_BOX::BrightColor = KiGfx::COLOR4D( 0.0, 1.0, 0.0, 1.0 ); diff --git a/pcbnew/tools/bright_box.h b/pcbnew/tools/bright_box.h new file mode 100644 index 0000000000..e1748dbd28 --- /dev/null +++ b/pcbnew/tools/bright_box.h @@ -0,0 +1,62 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __BRIGHT_BOX_H +#define __BRIGHT_BOX_H + +#include +#include +#include +#include +#include + +/** + * Class BRIGHT_BOX + * + * Draws a decoration to indicate a brightened item. + */ +class BRIGHT_BOX : public EDA_ITEM +{ +public: + BRIGHT_BOX( BOARD_ITEM* aItem ); + ~BRIGHT_BOX() {}; + + virtual const BOX2I ViewBBox() const; + + void ViewDraw( int aLayer, KiGfx::GAL* aGal ) const; + void ViewGetLayers( int aLayers[], int& aCount ) const; + + void Show( int x, std::ostream& st ) const + { + } + +private: + static const int BrightBoxLayer = ITEM_GAL_LAYER( SELECTION ); + static const KiGfx::COLOR4D BrightColor; + static const double LineWidth = 100000.0; + + BOARD_ITEM* item; +}; + +#endif From abf37168de084c19e15d28fdbd1d594e5126b0b8 Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Wed, 18 Sep 2013 19:55:16 +0200 Subject: [PATCH 354/415] Initial version of the P&S router. Buggy and crappy. --- pcbnew/router/CMakeLists.txt | 50 ++ pcbnew/router/direction.h | 295 +++++++++ pcbnew/router/pns_index.h | 241 +++++++ pcbnew/router/pns_item.cpp | 72 ++ pcbnew/router/pns_item.h | 155 +++++ pcbnew/router/pns_itemset.cpp | 73 +++ pcbnew/router/pns_itemset.h | 62 ++ pcbnew/router/pns_joint.h | 188 ++++++ pcbnew/router/pns_layerset.h | 118 ++++ pcbnew/router/pns_line.cpp | 704 ++++++++++++++++++++ pcbnew/router/pns_line.h | 251 +++++++ pcbnew/router/pns_line_placer.cpp | 715 ++++++++++++++++++++ pcbnew/router/pns_line_placer.h | 156 +++++ pcbnew/router/pns_node.cpp | 901 ++++++++++++++++++++++++++ pcbnew/router/pns_node.h | 260 ++++++++ pcbnew/router/pns_optimizer.cpp | 704 ++++++++++++++++++++ pcbnew/router/pns_optimizer.h | 164 +++++ pcbnew/router/pns_router.cpp | 774 ++++++++++++++++++++++ pcbnew/router/pns_router.h | 197 ++++++ pcbnew/router/pns_routing_settings.h | 53 ++ pcbnew/router/pns_segment.h | 119 ++++ pcbnew/router/pns_shove.cpp | 469 ++++++++++++++ pcbnew/router/pns_shove.h | 82 +++ pcbnew/router/pns_solid.cpp | 64 ++ pcbnew/router/pns_solid.h | 70 ++ pcbnew/router/pns_utils.cpp | 42 ++ pcbnew/router/pns_utils.h | 33 + pcbnew/router/pns_via.cpp | 148 +++++ pcbnew/router/pns_via.h | 118 ++++ pcbnew/router/pns_walkaround.cpp | 221 +++++++ pcbnew/router/pns_walkaround.h | 99 +++ pcbnew/router/router_preview_item.cpp | 197 ++++++ pcbnew/router/router_preview_item.h | 103 +++ pcbnew/router/router_tool.cpp | 397 ++++++++++++ pcbnew/router/router_tool.h | 79 +++ pcbnew/router/trace.h | 51 ++ 36 files changed, 8425 insertions(+) create mode 100644 pcbnew/router/CMakeLists.txt create mode 100644 pcbnew/router/direction.h create mode 100644 pcbnew/router/pns_index.h create mode 100644 pcbnew/router/pns_item.cpp create mode 100644 pcbnew/router/pns_item.h create mode 100644 pcbnew/router/pns_itemset.cpp create mode 100644 pcbnew/router/pns_itemset.h create mode 100644 pcbnew/router/pns_joint.h create mode 100644 pcbnew/router/pns_layerset.h create mode 100644 pcbnew/router/pns_line.cpp create mode 100644 pcbnew/router/pns_line.h create mode 100644 pcbnew/router/pns_line_placer.cpp create mode 100644 pcbnew/router/pns_line_placer.h create mode 100644 pcbnew/router/pns_node.cpp create mode 100644 pcbnew/router/pns_node.h create mode 100644 pcbnew/router/pns_optimizer.cpp create mode 100644 pcbnew/router/pns_optimizer.h create mode 100644 pcbnew/router/pns_router.cpp create mode 100644 pcbnew/router/pns_router.h create mode 100644 pcbnew/router/pns_routing_settings.h create mode 100644 pcbnew/router/pns_segment.h create mode 100644 pcbnew/router/pns_shove.cpp create mode 100644 pcbnew/router/pns_shove.h create mode 100644 pcbnew/router/pns_solid.cpp create mode 100644 pcbnew/router/pns_solid.h create mode 100644 pcbnew/router/pns_utils.cpp create mode 100644 pcbnew/router/pns_utils.h create mode 100644 pcbnew/router/pns_via.cpp create mode 100644 pcbnew/router/pns_via.h create mode 100644 pcbnew/router/pns_walkaround.cpp create mode 100644 pcbnew/router/pns_walkaround.h create mode 100644 pcbnew/router/router_preview_item.cpp create mode 100644 pcbnew/router/router_preview_item.h create mode 100644 pcbnew/router/router_tool.cpp create mode 100644 pcbnew/router/router_tool.h create mode 100644 pcbnew/router/trace.h diff --git a/pcbnew/router/CMakeLists.txt b/pcbnew/router/CMakeLists.txt new file mode 100644 index 0000000000..7995cb4af9 --- /dev/null +++ b/pcbnew/router/CMakeLists.txt @@ -0,0 +1,50 @@ +include_directories(BEFORE ${INC_BEFORE}) + +include_directories( + ./ + ../ + ../../include + ../../pcbnew + ../../polygon + ${INC_AFTER} + ) + +set(PCBNEW_PNS_SRCS + direction.h + pns_via.h + pns_routing_settings.h + pns_shove.cpp + pns_line.cpp + pns_utils.h + pns_layerset.h + trace.h + pns_line.h + pns_walkaround.cpp + pns_node.h + pns_line_placer.cpp + pns_utils.cpp + pns_solid.h + pns_item.cpp + pns_via.cpp + pns_node.cpp + pns_solid.cpp + pns_line_placer.h + pns_optimizer.h + pns_walkaround.h + pns_shove.h + pns_router.h + pns_router.cpp + pns_index.h + pns_item.h + pns_optimizer.cpp + pns_joint.h + pns_segment.h + pns_itemset.h + pns_itemset.cpp + router_tool.cpp + router_tool.h + router_preview_item.cpp + router_preview_item.h + ) + +add_library(pnsrouter STATIC ${PCBNEW_PNS_SRCS}) diff --git a/pcbnew/router/direction.h b/pcbnew/router/direction.h new file mode 100644 index 0000000000..9df3523987 --- /dev/null +++ b/pcbnew/router/direction.h @@ -0,0 +1,295 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef __DIRECTION_H +#define __DIRECTION_H + +#include +#include + +/** + * Class DIRECTION_45. + * Represents route directions & corner angles in a 45-degree metric. + */ + +class DIRECTION_45 +{ + +public: + + /** + * Enum Directions + * Represents available directions - there are 8 of them, as on a rectilinear map (north = up) + + * an extra undefined direction, reserved for traces that don't respect 45-degree routing regime. + */ + enum Directions { + N = 0, + NE = 1, + E = 2, + SE = 3, + S = 4, + SW = 5, + W = 6, + NW = 7, + UNDEFINED = -1 + }; + + /** + * Enum AngleType + * Represents kind of angle formed by vectors heading in two DIRECTION_45s. + */ + enum AngleType { + ANG_OBTUSE = 0x1, + ANG_RIGHT = 0x2, + ANG_ACUTE = 0x4, + ANG_STRAIGHT = 0x8, + ANG_HALF_FULL = 0x10, + ANG_UNDEFINED = 0x20 + }; + + DIRECTION_45(Directions aDir = UNDEFINED): m_dir(aDir) {}; + + /** + * Constructor + * @param aVec vector, whose direction will be translated into a DIRECTION_45. + */ + DIRECTION_45(const VECTOR2I& aVec) + { + construct(aVec); + } + + /** + * Constructor + * @param aSeg segment, whose direction will be translated into a DIRECTION_45. + */ + DIRECTION_45(const SEG& aSeg) + { + construct( aSeg.b - aSeg.a ); + } + + /** + * Function Format() + * Formats the direction in a human readable word. + * @return name of the direction + */ + const std::string Format() const + { + switch(m_dir) + { + case N : return "north"; + case NE : return "north-east"; + case E : return "east"; + case SE : return "south-east"; + case S : return "south"; + case SW : return "south-west"; + case W : return "west"; + case NW : return "north-west"; + case UNDEFINED : return "undefined"; + default: return ""; + } + } + + /** + * Function Opposite() + * Returns a direction opposite (180 degree) to (this) + * @return opposite direction + */ + DIRECTION_45 Opposite() const + { + if(m_dir == UNDEFINED) + return UNDEFINED; + const Directions OppositeMap[] = { S, SW, W, NW, N, NE, E, SE } ; + return OppositeMap[m_dir]; + } + + /** + * Function Angle() + * Returns the type of angle between directions (this) and aOther. + * @param aOther direction to compare angle with + */ + AngleType Angle(const DIRECTION_45& aOther) const + { + if(m_dir == UNDEFINED || aOther.m_dir == UNDEFINED) + return ANG_UNDEFINED; + + int d = std::abs(m_dir - aOther.m_dir); + + if(d == 1 || d == 7) + return ANG_OBTUSE; + else if(d == 2 || d == 6) + return ANG_RIGHT; + else if(d == 3 || d == 5) + return ANG_ACUTE; + else if(d == 4) + return ANG_HALF_FULL; + else + return ANG_STRAIGHT; + } + + /** + * Function IsObtuse() + * @return true, when (this) forms an obtuse angle with aOther + */ + bool IsObtuse(const DIRECTION_45& aOther) const + { + return Angle(aOther) == ANG_OBTUSE; + } + + /** + * Function IsDiagonal() + * Returns true if the direction is diagonal (e.g. North-West, South-East, etc) + * @return true, when diagonal. + */ + bool IsDiagonal() const + { + return (m_dir % 2) == 1; + } + + /** + * Function BuildInitialTrace() + * + * Builds a 2-segment line chain between points aP0 and aP1 and following 45-degree routing + * regime. If aStartDiagonal is true, the trace starts with a diagonal segment. + * @param aP0 starting point + * @param aP1 ending point + * @param aStartDiagonal whether the first segment has to be diagonal + * @return the trace + */ + const SHAPE_LINE_CHAIN BuildInitialTrace(const VECTOR2I& aP0, const VECTOR2I &aP1, bool aStartDiagonal = false) const + { + int w = abs(aP1.x - aP0.x); + int h = abs(aP1.y - aP0.y); + int sw = sign(aP1.x - aP0.x); + int sh = sign(aP1.y - aP0.y); + + VECTOR2I mp0, mp1; + + // we are more horizontal than vertical? + if(w > h) + { + mp0 = VECTOR2I((w - h) * sw, 0); // direction: E + mp1 = VECTOR2I(h * sw, h * sh); // direction: NE + } else { + mp0 = VECTOR2I(0, sh * (h - w)); // direction: N + mp1 = VECTOR2I(sw * w, sh * w); // direction: NE + } + + bool start_diagonal; + + if(m_dir == UNDEFINED) + start_diagonal = aStartDiagonal; + else + start_diagonal = IsDiagonal(); + + SHAPE_LINE_CHAIN pl; + + pl.Append(aP0); + if (start_diagonal) + pl.Append(aP0 + mp1); + else + pl.Append(aP0 + mp0); + + pl.Append(aP1); + pl.Simplify(); + return pl; + }; + + bool operator==(const DIRECTION_45& aOther) const + { + return aOther.m_dir == m_dir; + } + + bool operator!=(const DIRECTION_45& aOther) const + { + return aOther.m_dir != m_dir; + } + + const DIRECTION_45 Right() const + { + DIRECTION_45 r; + r.m_dir = (Directions) (m_dir + 1); + if(r.m_dir == NW) + r.m_dir = N; + return r; + } + +private: + + template int sign(T val) const { + return (T(0) < val) - (val < T(0)); + } + + /** + * Function construct() + * Calculates the direction from a vector. If the vector's angle is not a multiple of 45 + * degrees, the direction is rounded to the nearest octant. + * @param aVec our vector + */ + void construct(const VECTOR2I& aVec) + { + m_dir = UNDEFINED; + if(aVec.x == 0 && aVec.y == 0) + return; + + double mag = 360.0 - (180.0 / M_PI * atan2 ((double) aVec.y, (double) aVec.x )) + 90.0; + if (mag >= 360.0) + mag -= 360.0; + if(mag < 0.0) + mag += 360.0; + + m_dir = (Directions) ((mag + 22.5) / 45.0); + + if(m_dir >= 8) + m_dir = (Directions) (m_dir - 8); + if(m_dir < 0) + m_dir = (Directions) (m_dir + 8); + + return ; + if(aVec.y < 0) + { + if(aVec.x > 0) + m_dir = NE; + else if(aVec.x < 0) + m_dir = NW; + else + m_dir = N; + } + else if(aVec.y == 0) + { + if(aVec.x > 0) + m_dir = E; + else + m_dir = W; + } + else // aVec.y>0 + { + if(aVec.x > 0) + m_dir = SE; + else if(aVec.x < 0) + m_dir = SW; + else + m_dir = S; + } + } + + Directions m_dir; ///> our actual direction +}; + +#endif // __DIRECTION_H diff --git a/pcbnew/router/pns_index.h b/pcbnew/router/pns_index.h new file mode 100644 index 0000000000..c7f8704202 --- /dev/null +++ b/pcbnew/router/pns_index.h @@ -0,0 +1,241 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef __PNS_INDEX_H +#define __PNS_INDEX_H + +#include +#include + +#include +#include + +#include "pns_item.h" + +/** + * Class PNS_INDEX + * + * Custom spatial index, holding our board items and allowing for very fast searches. Items + * are assigned to separate R-Tree subundices depending on their type and spanned layers, reducing + * overlap and improving search time. + **/ + +class PNS_INDEX { + +public: + + typedef std::list NetItemsList; + typedef SHAPE_INDEX ItemShapeIndex; + typedef boost::unordered_set ItemSet; + + PNS_INDEX(); + ~PNS_INDEX(); + + void Add( PNS_ITEM *aItem ); + void Remove ( PNS_ITEM *aItem ); + void Replace ( PNS_ITEM *aOldItem, PNS_ITEM *aNewItem ); + + template + int Query( const PNS_ITEM *aItem, int aMinDistance, Visitor &v); + template + int Query( const SHAPE *aShape, int aMinDistance, Visitor &v); + + void Clear(); + + NetItemsList* GetItemsForNet ( int aNet ) ; + + ItemSet::iterator begin() { return m_allItems.begin(); } + ItemSet::iterator end() { return m_allItems.end(); } + + bool Contains ( PNS_ITEM *aItem ) const { + return m_allItems.find(aItem) != m_allItems.end(); + } + + int Size() const { return m_allItems.size(); } + +private: + + + static const int MaxSubIndices = 64; + static const int SI_Multilayer = 2; + static const int SI_SegDiagonal = 0; + static const int SI_SegStraight = 1; + static const int SI_Traces = 3; + static const int SI_PadsTop = 0; + static const int SI_PadsBottom = 1; + + template + int querySingle( int index, const SHAPE *aShape, int aMinDistance, Visitor &v); + + ItemShapeIndex *getSubindex( const PNS_ITEM *aItem ); + + ItemShapeIndex *m_subIndices[ MaxSubIndices ]; + std::map m_netMap; + ItemSet m_allItems; +}; + +PNS_INDEX::PNS_INDEX() +{ + memset(m_subIndices, 0, sizeof(m_subIndices)); +} + +PNS_INDEX::ItemShapeIndex *PNS_INDEX::getSubindex(const PNS_ITEM *aItem ) +{ + int idx_n = -1; + + const PNS_LAYERSET l = aItem->GetLayers(); + + switch(aItem->GetKind()) + { + case PNS_ITEM::VIA: + idx_n = SI_Multilayer; + break; + case PNS_ITEM::SOLID: + { + if( l.IsMultilayer() ) + idx_n = SI_Multilayer; + else if (l.Start() == 0) // fixme: use kicad layer codes + idx_n = SI_PadsTop; + else if (l.Start() == 15) + idx_n = SI_PadsBottom; + break; + } + case PNS_ITEM::SEGMENT: + case PNS_ITEM::LINE: + idx_n = SI_Traces + 2 * l.Start() + SI_SegStraight; + break; + default: + break; + } + assert(idx_n >= 0 && idx_n < MaxSubIndices); + + if(!m_subIndices[idx_n]) + m_subIndices[idx_n] = new ItemShapeIndex; + + return m_subIndices[idx_n]; +} + +void PNS_INDEX::Add( PNS_ITEM *aItem ) +{ + ItemShapeIndex *idx = getSubindex(aItem); + + + idx->Add(aItem); + m_allItems.insert(aItem); + int net = aItem->GetNet(); + if(net >= 0) + { + m_netMap[net].push_back(aItem); + } +} + +void PNS_INDEX::Remove( PNS_ITEM *aItem ) +{ + ItemShapeIndex *idx = getSubindex(aItem); + idx->Remove(aItem); + m_allItems.erase (aItem); + + int net = aItem->GetNet(); + + if(net >= 0 && m_netMap.find(net) != m_netMap.end()) + m_netMap[net].remove(aItem); +} + +void PNS_INDEX::Replace( PNS_ITEM *aOldItem, PNS_ITEM *aNewItem ) +{ + Remove(aOldItem); + Add(aNewItem); +} + +template + int PNS_INDEX::querySingle( int index, const SHAPE *aShape, int aMinDistance, Visitor &v) + { + if(!m_subIndices[index]) + return 0; + return m_subIndices[index] -> Query(aShape, aMinDistance, v, false); + } + +template + int PNS_INDEX::Query( const PNS_ITEM *aItem, int aMinDistance, Visitor &v) + { + const SHAPE *shape = aItem->GetShape(); + int total = 0; + + + total += querySingle(SI_Multilayer, shape, aMinDistance, v); + + const PNS_LAYERSET layers = aItem->GetLayers(); + + if(layers.IsMultilayer()) + { + total += querySingle(SI_PadsTop, shape, aMinDistance, v); + total += querySingle(SI_PadsBottom, shape, aMinDistance, v); + + + for(int i = layers.Start(); i <= layers.End(); ++i ) + total += querySingle( SI_Traces + 2 * i + SI_SegStraight, shape, aMinDistance, v); + + } else { + int l = layers.Start(); + + if(l == 0) + total += querySingle(SI_PadsTop, shape, aMinDistance, v); + else if(l == 15) + total += querySingle(SI_PadsBottom, shape, aMinDistance, v); + total += querySingle ( SI_Traces + 2 * l + SI_SegStraight, shape, aMinDistance, v); + } + + return total; + } + +template + int PNS_INDEX::Query( const SHAPE *aShape, int aMinDistance, Visitor &v) + { + int total = 0; + for(int i = 0; i < MaxSubIndices; i++) + total += querySingle(i, aShape, aMinDistance, v); + return total; + } + + +void PNS_INDEX::Clear() +{ + for(int i = 0; i < MaxSubIndices; ++i) + { + ItemShapeIndex *idx = m_subIndices[i]; + if(idx) + delete idx; + m_subIndices[i] = NULL; + } +} + +PNS_INDEX::~PNS_INDEX() +{ + Clear(); +} + +PNS_INDEX::NetItemsList* PNS_INDEX::GetItemsForNet ( int aNet ) +{ + if(m_netMap.find(aNet) == m_netMap.end()) + return NULL; + return &m_netMap[aNet]; +} + +#endif diff --git a/pcbnew/router/pns_item.cpp b/pcbnew/router/pns_item.cpp new file mode 100644 index 0000000000..43a6b97976 --- /dev/null +++ b/pcbnew/router/pns_item.cpp @@ -0,0 +1,72 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "pns_item.h" +#include "pns_line.h" + +bool PNS_ITEM::collideSimple ( const PNS_ITEM *aOther, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) const +{ + // same nets? no collision! + if( m_net == aOther->m_net ) + return false; + + // check if we are not on completely different layers first + if (!m_layers.Overlaps (aOther->m_layers)) + return false; + + return GetShape()->Collide ( aOther->GetShape(), aClearance ); + + // fixme: MTV +} + +bool PNS_ITEM::Collide( const PNS_ITEM *aOther, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) const +{ + if( collideSimple( aOther, aClearance, aNeedMTV, aMTV ) ) + return true; + + // special case for "head" line with a via attached at the end. + if( aOther->m_kind == LINE ) + { + const PNS_LINE *line = static_cast (aOther); + if(line -> EndsWithVia()) + return collideSimple( &line->GetVia(), aClearance - line->GetWidth() / 2, aNeedMTV, aMTV ); + } + + return false; +} + +const std::string PNS_ITEM::GetKindStr() const +{ + switch(m_kind) + { + case LINE: return "line"; + case SEGMENT: return "segment"; + case VIA: return "via"; + case JOINT: return "joint"; + case SOLID: return "solid"; + default: return "unknown"; + } +} + +PNS_ITEM::~PNS_ITEM() +{ + +} + \ No newline at end of file diff --git a/pcbnew/router/pns_item.h b/pcbnew/router/pns_item.h new file mode 100644 index 0000000000..22114ed6af --- /dev/null +++ b/pcbnew/router/pns_item.h @@ -0,0 +1,155 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef __PNS_ITEM_H +#define __PNS_ITEM_H + +#include + +#include +#include + +#include "pns_layerset.h" + +class BOARD_ITEM; +class PNS_NODE; + +/** + * Class PNS_ITEM + * + * Base class for PNS router board items. Implements the shared properties of all PCB items - + * net, spanned layers, geometric shape & refererence to owning model. + */ + +class PNS_ITEM +{ +public: + + static const int UnusedNet = INT_MAX; + + ///> Supported item types + enum PnsKind { + SOLID = 1, + LINE = 2, + JOINT = 4, + SEGMENT = 8, + VIA = 16, + ANY = 0xff + }; + + PNS_ITEM(PnsKind aKind) + { + m_net = UnusedNet; + m_movable = true; + m_kind = aKind; + m_parent = NULL; + m_world = NULL; + m_owner = NULL; + } + + PNS_ITEM( const PNS_ITEM& aOther ) + { + m_layers = aOther.m_layers; + m_net = aOther.m_net; + m_movable = aOther.m_movable; + m_kind = aOther.m_kind; + m_world = aOther.m_world; + m_parent = aOther.m_parent; + m_owner = NULL; + } + + virtual ~PNS_ITEM(); + + virtual PNS_ITEM *Clone() const = 0; + + ///> Returns a convex polygon "hull" of a the item, that is used as the walkaround + /// path. + /// aClearance defines how far from the body of the item the hull should be, + /// aWalkaroundThickness is the width of the line that walks around this hull. + virtual const SHAPE_LINE_CHAIN Hull(int aClearance = 0, int aWalkaroundThickness = 0) const + { + return SHAPE_LINE_CHAIN(); + }; + + + + PnsKind GetKind() const { return m_kind; } + bool OfKind( int aKind ) const { return (aKind & m_kind) != 0; } + + const std::string GetKindStr() const; + + ///> Gets/Sets the corresponding parent object in the host application's model (pcbnew) + void SetParent(BOARD_ITEM *aParent) { m_parent = aParent; } + BOARD_ITEM *GetParent() const { return m_parent; } + + ///> Net accessors + int GetNet() const { return m_net; } + void SetNet(int aNet) { m_net = aNet; } + + ///> Layers accessors + const PNS_LAYERSET& GetLayers() const { return m_layers; } + void SetLayers ( const PNS_LAYERSET& aLayers ) { m_layers = aLayers; } + void SetLayer ( int aLayer ) { m_layers = PNS_LAYERSET (aLayer, aLayer); } + + ///> Ownership management. An item can belong to a single PNS_NODE or stay unowned. + void SetOwner (PNS_NODE *aOwner) { m_owner = aOwner; } + bool BelongsTo (PNS_NODE *aNode) const { return m_owner == aNode; } + PNS_NODE *GetOwner() const { return m_owner; } + + ///> Sets the world that is used for collision resolution. + void SetWorld (PNS_NODE *aWorld) { m_world = aWorld; } + PNS_NODE *GetWorld() const { return m_world; } + + + ///> Collision function. Checks if the item aOther is closer to us than + /// aClearance and returns true if so. It can also calculate a minimum translation vector that resolves the + /// collision if needed. + virtual bool Collide( const PNS_ITEM *aOther, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) const; + + ///> A shortcut without MTV calculation + bool Collide( const PNS_ITEM *aOther, int aClearance ) const + { + VECTOR2I dummy; + return Collide(aOther, aClearance, false, dummy); + } + + ///> Returns the geometric shape of the item + virtual const SHAPE* GetShape() const { + return NULL; + } + +private: + bool collideSimple ( const PNS_ITEM *aOther, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) const; + +protected: + + PnsKind m_kind; + + BOARD_ITEM *m_parent; + PNS_NODE *m_world; + PNS_NODE *m_owner; + PNS_LAYERSET m_layers; + + bool m_movable; + int m_net; +}; + +#endif // __PNS_ITEM_H + diff --git a/pcbnew/router/pns_itemset.cpp b/pcbnew/router/pns_itemset.cpp new file mode 100644 index 0000000000..494c1a07a9 --- /dev/null +++ b/pcbnew/router/pns_itemset.cpp @@ -0,0 +1,73 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include + +#include "pns_itemset.h" + + +PNS_ITEMSET::PNS_ITEMSET() +{ + +} + +PNS_ITEMSET::~PNS_ITEMSET() +{ + +} + +PNS_ITEMSET& PNS_ITEMSET::FilterLayers ( int aStart, int aEnd ) +{ + ItemVector newItems; + PNS_LAYERSET l; + if(aEnd < 0) + l = PNS_LAYERSET(aStart); + else + l = PNS_LAYERSET(aStart, aEnd); + + BOOST_FOREACH( PNS_ITEM *item, m_items ) + if(item->GetLayers(). Overlaps ( l )) + newItems.push_back(item); + m_items = newItems; + return *this; +} + +PNS_ITEMSET& PNS_ITEMSET::FilterKinds ( int aKindMask ) +{ + ItemVector newItems; + + BOOST_FOREACH( PNS_ITEM *item, m_items ) + if(item->GetKind() & aKindMask ) + newItems.push_back(item); + m_items = newItems; + return *this; +} + +PNS_ITEMSET& PNS_ITEMSET::FilterNet ( int aNet ) +{ + ItemVector newItems; + + BOOST_FOREACH( PNS_ITEM *item, m_items ) + if(item->GetNet() == aNet) + newItems.push_back(item); + m_items = newItems; + return *this; +} + diff --git a/pcbnew/router/pns_itemset.h b/pcbnew/router/pns_itemset.h new file mode 100644 index 0000000000..91ebea1a20 --- /dev/null +++ b/pcbnew/router/pns_itemset.h @@ -0,0 +1,62 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef __PNS_ITEMSET_H +#define __PNS_ITEMSET_H + +#include + +#include "pns_item.h" + +/** + * Class PNS_ITEMSET + * + * Holds a list of board items, that can be filtered against net, kinds, layers, etc. + **/ + +class PNS_ITEMSET +{ +public: + + typedef std::vector ItemVector; + + PNS_ITEMSET(); + ~PNS_ITEMSET(); + + ItemVector& Items() { return m_items; } + + PNS_ITEMSET& FilterLayers ( int aStart, int aEnd = -1 ); + PNS_ITEMSET& FilterKinds ( int aKindMask ); + PNS_ITEMSET& FilterNet ( int aNet ); + + int Size() { return m_items.size(); } + + void Add(PNS_ITEM *item) + { + m_items.push_back(item); + } + + PNS_ITEM *Get( int index ) const { return m_items[index]; } + +private: + ItemVector m_items; +}; + +#endif diff --git a/pcbnew/router/pns_joint.h b/pcbnew/router/pns_joint.h new file mode 100644 index 0000000000..88f7477a75 --- /dev/null +++ b/pcbnew/router/pns_joint.h @@ -0,0 +1,188 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef __PNS_JOINT_H +#define __PNS_JOINT_H + +#include +#include + +#include + +#include "pns_item.h" +#include "pns_segment.h" + +/** + * Class PNS_JOINT + * + * Represents a 2D point on a given set of layers and belonging to a certain net, + * that links together a number of board items. + * A hash table of joints is used by the router to follow connectivity between the items. + **/ + +class PNS_JOINT : public PNS_ITEM +{ +public: + typedef std::vector LinkedItems; + + ///> joints are hashed by their position, layers and net. Linked items are, obviously, not hashed + struct HashTag { + VECTOR2I pos; + int net; + }; + + PNS_JOINT(): + PNS_ITEM(JOINT) {} + + PNS_JOINT(const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aNet = -1): + PNS_ITEM(JOINT) + { + m_tag.pos = aPos; + m_tag.net = aNet; + m_layers = aLayers; + } + + PNS_JOINT(const PNS_JOINT& b): + PNS_ITEM(JOINT) + { + m_layers = b.m_layers; + m_tag.pos = b.m_tag.pos; + m_tag.net = b.m_tag.net; + m_linkedItems = b.m_linkedItems; + m_layers = b.m_layers; + } + + PNS_ITEM *Clone() const + { + assert(false); + return NULL; + } + + ///> returns true if the joint is a trivial line corner, connecting two segments of the same net, on the same layer. + bool IsLineCorner() const + { + if(m_linkedItems.size() != 2) + return false; + + if( m_linkedItems[0]->GetKind() != SEGMENT || m_linkedItems[1]->GetKind() != SEGMENT ) + return false; + + PNS_SEGMENT *seg1 = static_cast (m_linkedItems[0]); + PNS_SEGMENT *seg2 = static_cast (m_linkedItems[1]); + + // joints between segments of different widths are not trivial. + return (seg1->GetWidth() == seg2->GetWidth()); + } + + ///> Links the joint to a given board item (when it's added to the PNS_NODE) + void Link ( PNS_ITEM *aItem ) + { + LinkedItems::iterator f = std::find(m_linkedItems.begin(), m_linkedItems.end(), aItem); + if(f != m_linkedItems.end()) + return; + m_linkedItems.push_back(aItem); + } + + ///> Unlinks a given board item from the joint (upon its removal from a PNS_NODE) + ///> Returns true if the joint became dangling after unlinking. + bool Unlink ( PNS_ITEM *aItem ) + { + LinkedItems::iterator f = std::find(m_linkedItems.begin(), m_linkedItems.end(), aItem); + if(f != m_linkedItems.end()) + m_linkedItems.erase(f); + return (m_linkedItems.size() == 0); + } + + ///> For trivial joints, returns the segment adjacent to (aCurrent). For non-trival ones, returns + ///> NULL, indicating the end of line. + PNS_SEGMENT* NextSegment( PNS_SEGMENT* aCurrent) const + { + if(!IsLineCorner()) + return NULL; + + return static_cast (m_linkedItems [ m_linkedItems[0] == aCurrent ? 1 : 0 ] ); + } + + /// trivial accessors + const HashTag& GetTag() const { return m_tag; } + const VECTOR2I& GetPos() const { return m_tag.pos; } + int GetNet() const { return m_tag.net; } + LinkedItems & GetLinkList() { return m_linkedItems; }; + + ///> Returns the number of linked items of types listed in aMask. + int LinkCount( int aMask = -1 ) const + { + int n = 0; + for(LinkedItems::const_iterator i = m_linkedItems.begin(); i!= m_linkedItems.end(); ++i) + if( (*i)->GetKind() & aMask ) + n++; + return n; + } + + void Dump() const; + + bool operator==(const PNS_JOINT& rhs) const + { + return m_tag.pos == rhs.m_tag.pos && m_tag.net == rhs.m_tag.net; + } + + void Merge( const PNS_JOINT& aJoint ) + { + if(!Overlaps(aJoint)) + return; + + m_layers.Merge (aJoint.m_layers); + + // fixme: duplicate links (?) + for(LinkedItems::const_iterator i =aJoint.m_linkedItems.begin(); i!=aJoint.m_linkedItems.end();++i) + m_linkedItems.push_back(*i); + } + + bool Overlaps(const PNS_JOINT& rhs) const + { + return m_tag.pos == rhs.m_tag.pos && m_tag.net == rhs.m_tag.net && m_layers.Overlaps(rhs.m_layers); + } + +private: + + ///> hash tag for unordered_multimap + HashTag m_tag; + + ///> list of items linked to this joint + LinkedItems m_linkedItems; +}; + + +// hash function & comparison operator for boost::unordered_map<> +inline bool operator==(PNS_JOINT::HashTag const& p1, PNS_JOINT::HashTag const& p2) +{ + return p1.pos == p2.pos && p1.net == p2.net; +} + +inline std::size_t hash_value(PNS_JOINT::HashTag const& p) +{ + std::size_t seed = 0; + boost::hash_combine(seed, p.pos.x); + boost::hash_combine(seed, p.pos.y); + boost::hash_combine(seed, p.net); + return seed; +} + +#endif // __PNS_JOINT_H diff --git a/pcbnew/router/pns_layerset.h b/pcbnew/router/pns_layerset.h new file mode 100644 index 0000000000..2809eb485c --- /dev/null +++ b/pcbnew/router/pns_layerset.h @@ -0,0 +1,118 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef __PNS_LAYERSET_H +#define __PNS_LAYERSET_H + +#include + +/** + * Class PNS_LAYERSET + * + * Represents a contiguous set of PCB layers. + */ + +class PNS_LAYERSET +{ + public: + + PNS_LAYERSET(): + m_start(-1), + m_end(-1) + {}; + + PNS_LAYERSET (int aStart, int aEnd) + { + if(aStart > aEnd) + std::swap(aStart, aEnd); + m_start = aStart; + m_end = aEnd; + } + + PNS_LAYERSET (int aLayer) + { + m_start = m_end = aLayer; + } + + PNS_LAYERSET(const PNS_LAYERSET &b) : + m_start(b.m_start), + m_end (b.m_end) + {} + + ~PNS_LAYERSET () {}; + + const PNS_LAYERSET& operator= ( const PNS_LAYERSET& b) + { + m_start = b.m_start; + m_end = b.m_end; + return *this; + } + + bool Overlaps ( const PNS_LAYERSET& aOther ) const + { + return m_end >= aOther.m_start && m_start <= aOther.m_end; + } + + bool Overlaps ( const int aLayer ) const + { + return aLayer >= m_start && aLayer <= m_end; + } + + bool IsMultilayer ( ) const + { + return m_start != m_end; + } + + int Start() const { + return m_start; + } + + int End() const { + return m_end; + } + + void Merge ( const PNS_LAYERSET& aOther ) + { + if(m_start < 0 || m_end < 0) + { + m_start = aOther.m_start; + m_end = aOther.m_end; + return; + } + + if(aOther.m_start < m_start) + m_start = aOther.m_start; + if(aOther.m_end > m_end) + m_end = aOther.m_end; + } + + ///> Shortcut for comparisons/overlap tests + static PNS_LAYERSET All() + { + return PNS_LAYERSET(0, 256); + } + + private: + + int m_start; + int m_end; +}; + +#endif // __PNS_LAYERSET_H diff --git a/pcbnew/router/pns_line.cpp b/pcbnew/router/pns_line.cpp new file mode 100644 index 0000000000..cb729f96d0 --- /dev/null +++ b/pcbnew/router/pns_line.cpp @@ -0,0 +1,704 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include +#include + +#include + + +#include "pns_line.h" +#include "pns_node.h" +#include "pns_via.h" +#include "pns_utils.h" +#include "pns_router.h" + +using namespace std; +using boost::optional; + +PNS_LINE *PNS_LINE::Clone() const +{ + PNS_LINE *l = new PNS_LINE(); + + l->m_line = m_line; + l->m_width = m_width; + l->m_layers = m_layers; + l->m_net = m_net; + l->m_movable = m_movable; + l->m_segmentRefs = NULL; + l->m_hasVia = m_hasVia; + l->m_via = m_via; + + return l; +} + +PNS_LINE *PNS_LINE::CloneProperties() const +{ + PNS_LINE *l = new PNS_LINE(); + + l->m_width = m_width; + l->m_layers = m_layers; + l->m_net = m_net; + l->m_movable = m_movable; + + return l; +} + +PNS_SEGMENT *PNS_SEGMENT::Clone() const +{ + PNS_SEGMENT *s = new PNS_SEGMENT; + s->m_width = m_width; + s->m_net = m_net; + s->m_shape = m_shape; + s->m_layers = m_layers; + + return s; //assert(false); +} + +#if 1 +bool PNS_LINE::MergeObtuseSegments( ) +{ + int step = m_line.PointCount() - 3; + int iter = 0; + + int segs_pre = m_line.SegmentCount(); + + if(step < 0) + return false; + + SHAPE_LINE_CHAIN current_path (m_line); + + while(1) + { + iter++; + int n_segs = current_path.SegmentCount(); + int max_step = n_segs - 2; + if(step > max_step) + step = max_step; + + if(step < 2) + { + m_line = current_path; + return current_path.SegmentCount() < segs_pre; + } + + bool found_anything = false; + int n = 0; + + while (n < n_segs - step) + { + const SEG s1 = current_path.CSegment(n); + const SEG s2 = current_path.CSegment(n + step); + SEG s1opt, s2opt; + + if (DIRECTION_45(s1).IsObtuse(DIRECTION_45(s2))) + { + VECTOR2I ip = *s1.IntersectLines(s2); + + if(s1.Distance(ip) <= 1 || s2.Distance(ip) <= 1) + { + s1opt = SEG(s1.a, ip); + s2opt = SEG(ip, s2.b); + } else { + s1opt = SEG(s1.a, ip); + s2opt = SEG(ip, s2.b); + } + + + if (DIRECTION_45(s1opt).IsObtuse(DIRECTION_45(s2opt))) + { + SHAPE_LINE_CHAIN opt_path; + opt_path.Append(s1opt.a); + opt_path.Append(s1opt.b); + opt_path.Append(s2opt.b); + + PNS_LINE opt_track (*this, opt_path); + + if(!m_world->CheckColliding(&opt_track, PNS_ITEM::ANY)) + { + current_path.Replace(s1.Index() + 1, s2.Index(), ip); + n_segs = current_path.SegmentCount(); + found_anything = true; + break; + } + } + } + n++; + } + + if(!found_anything) + { + if( step <= 2 ) + { + m_line = current_path; + return m_line.SegmentCount() < segs_pre; + } + step --; + } + } + return m_line.SegmentCount() < segs_pre; +} + +bool PNS_LINE::MergeSegments( ) +{ + int step = m_line.PointCount() - 3; + int iter = 0; + + int segs_pre = m_line.SegmentCount(); + + if(step < 0) + return false; + + SHAPE_LINE_CHAIN current_path (m_line); + + while(1) + { + iter++; + int n_segs = current_path.SegmentCount(); + int max_step = n_segs - 2; + if(step > max_step) + step = max_step; + + if(step < 2) + { + m_line = current_path; + return current_path.SegmentCount() < segs_pre; + } + + bool found_anything = false; + int n = 0; + + while (n < n_segs - step) + { + const SEG s1 = current_path.CSegment(n); + const SEG s2 = current_path.CSegment(n + step); + SEG s1opt, s2opt; + + if(n > 0) + { + SHAPE_LINE_CHAIN path_straight = DIRECTION_45().BuildInitialTrace(s1.a, s2.a, false); + SHAPE_LINE_CHAIN path_diagonal = DIRECTION_45().BuildInitialTrace(s1.a, s2.a, true); + + + + } + + if (DIRECTION_45(s1) == DIRECTION_45(s2)) + { + if(s1.Collinear(s2)) + { + //printf("Colinear: np %d step %d n1 %d n2 %d\n", n_segs, step, n, n+step); + + SHAPE_LINE_CHAIN opt_path; + opt_path.Append(s1.a); + opt_path.Append(s2.b); + + PNS_LINE tmp (*this, opt_path); + + if(!m_world->CheckColliding(&tmp, PNS_ITEM::ANY)) + { + current_path.Remove(s1.Index() + 1, s2.Index()); + n_segs = current_path.SegmentCount(); + found_anything = true; + break; + } + + } + + + } + else if (DIRECTION_45(s1).IsObtuse(DIRECTION_45(s2))) + { + VECTOR2I ip = *s1.IntersectLines(s2); + + if(s1.Distance(ip) <= 1 || s2.Distance(ip) <= 1) + { + s1opt = SEG(s1.a, ip); + s2opt = SEG(ip, s2.b); + } else { + s1opt = SEG(s1.a, ip); + s2opt = SEG(ip, s2.b); + } + + + if (DIRECTION_45(s1opt).IsObtuse(DIRECTION_45(s2opt))) + { + SHAPE_LINE_CHAIN opt_path; + opt_path.Append(s1opt.a); + opt_path.Append(s1opt.b); + opt_path.Append(s2opt.b); + + PNS_LINE opt_track (*this, opt_path); + + if(!m_world->CheckColliding(&opt_track, PNS_ITEM::ANY)) + { + current_path.Replace(s1.Index() + 1, s2.Index(), ip); + n_segs = current_path.SegmentCount(); + found_anything = true; + break; + } + } + + } + n++; + } + + if(!found_anything) + { + if( step <= 2 ) + { + m_line = current_path; + return m_line.SegmentCount() < segs_pre; + } + step --; + } + } + return m_line.SegmentCount() < segs_pre; +} + + +#endif + +int PNS_LINE::CountCorners(int aAngles) +{ + int count = 0; + for(int i = 0; i < m_line.SegmentCount() - 1; i ++) + { + const SEG seg1 = m_line.CSegment(i); + const SEG seg2 = m_line.CSegment(i + 1); + + const DIRECTION_45 dir1(seg1); + const DIRECTION_45 dir2(seg2); + + DIRECTION_45::AngleType a = dir1.Angle(dir2); + if(a & aAngles) + count++; + } + return count; +} + +//#define DUMP_TEST_CASES + +// fixme: damn f*****g inefficient and incredibly crappily written +void PNS_LINE::NewWalkaround( const SHAPE_LINE_CHAIN& aObstacle, + SHAPE_LINE_CHAIN& aPrePath, + SHAPE_LINE_CHAIN& aWalkaroundPath, + SHAPE_LINE_CHAIN& aPostPath, + bool aCw ) const +{ + + typedef SHAPE_LINE_CHAIN::Intersection Intersection; + + SHAPE_LINE_CHAIN l_orig(m_line); + SHAPE_LINE_CHAIN l_hull; + vector outside, on_edge, inside; + SHAPE_LINE_CHAIN path; + + vector isects; + + // don't calculate walkaround for empty lines + if(m_line.PointCount() < 2) + return; + +#ifdef DUMP_TEST_CASES + printf("%s\n", m_line.Format().c_str()); + printf("%s\n", aObstacle.Format().c_str()); +#endif + + aObstacle.Intersect(m_line, isects); + //printf("NewWalk intersectiosn :%d\n" ,isects.size()); + if( !aCw ) + l_hull = aObstacle.Reverse(); + else + l_hull = aObstacle; + + BOOST_FOREACH( Intersection isect, isects ) + { + l_orig.Split(isect.p); + l_hull.Split(isect.p); + } + + +#ifdef DUMP_TEST_CASES + printf("%s\n", m_line.Format().c_str()); + printf("%s\n", aObstacle.Format().c_str()); + printf("%s\n", l_orig.Format().c_str()); + printf("%s\n", l_hull.Format().c_str()); +#endif + + + //printf("Pts: line %d hull %d\n", l_orig.PointCount(), l_hull.PointCount()); + + int first_post = -1; + int last_pre = -1; + + for (int i = 0; i < l_orig.PointCount(); i++) + { + int ei = l_hull.Find(l_orig.CPoint(i)) ; + bool edge = ei >= 0; + bool in = l_hull.PointInside( l_orig.CPoint(i)) && !edge; + bool out = !( in || edge); + + outside.push_back( out ); + on_edge.push_back( edge ); + inside.push_back( in ); + } + + + for(int i = l_orig.PointCount() - 1; i >= 1; i --) + if(inside[i] && outside[i-1]) + { + SHAPE_LINE_CHAIN::Intersections ips; + l_hull.Intersect( SEG( l_orig.CPoint(i), l_orig.CPoint(i - 1) ), ips ); + l_orig.Remove(i, -1); + l_orig.Append(ips[0].p); + break; + } + else if (inside[i] && on_edge[i-1]) + { + l_orig.Remove(i, -1); + //n = i; + } else if(!inside[i]) + break; + + if(!outside.size() && on_edge.size() < 2) + return; + + for (int i = 0; i < l_orig.PointCount(); i++) + { + const VECTOR2I p = l_orig.Point(i); + + if( outside[i] || (on_edge[i] && i == (l_orig.PointCount() - 1))) + { + if(last_pre < 0) + aPrePath.Append(p); + path.Append(p); + } + else if ( on_edge[i] ) + { + int li = -1; + if(last_pre < 0) + { + aPrePath.Append(p); + last_pre = path.PointCount(); + } + if( i == l_orig.PointCount() - 1 || outside[i+1]) + { + path.Append(p); + } + else + { + int vi2 = l_hull.Find( l_orig.CPoint(i) ); + + path.Append(l_hull.CPoint(vi2)); + for(int j = (vi2 + 1) % l_hull.PointCount(); j != vi2; j = (j + 1) % l_hull.PointCount()) + { + path.Append(l_hull.CPoint(j)); + li = l_orig.Find(l_hull.CPoint(j)); + if(li >= 0 && (li == (l_orig.PointCount() - 1) || outside[li+1])) + break; + } + + if(li >= 0) { + if(i >= li) + break; + else { + i = li; + } + } + } + + first_post = path.PointCount() - 1; + } + } + + if(last_pre < 0 && first_post < 0) + return; + + aWalkaroundPath = path.Slice( last_pre, first_post ); + if(first_post >= 0) + aPostPath = path.Slice( first_post, -1 ); + +} + +bool PNS_LINE::onEdge(const SHAPE_LINE_CHAIN &obstacle, VECTOR2I p, int& ei, bool& is_vertex) const +{ + int vtx = obstacle.Find(p); + + if(vtx >= 0) + { + ei = vtx; + is_vertex =true; + return true; + } + + for(int s = 0; s< obstacle.SegmentCount(); s++) + { + if(obstacle.CSegment(s).Contains(p)) + { + ei = s; + is_vertex = false; + return true; + } + } + + return false; +} + +bool PNS_LINE::walkScan(const SHAPE_LINE_CHAIN &line, const SHAPE_LINE_CHAIN &obstacle, bool reverse, VECTOR2I &ip, int& index_o, int& index_l, bool& is_vertex) const +{ + int sc = line.SegmentCount(); + for(int i = 0; i < line.SegmentCount(); i++) + { + + printf("check-seg rev %d %d/%d %d\n",reverse, i, sc, sc - 1 - i); + SEG tmp = line.CSegment(reverse ? sc - 1 - i : i); + SEG s (tmp.a, tmp.b); + if(reverse) + { + s.a = tmp.b; + s.b = tmp.a; + } + + if(onEdge(obstacle, s.a, index_o, is_vertex)) + { + index_l = (reverse ? sc-1-i : i); + ip = s.a; + printf("vertex %d on-%s %d\n", index_l, is_vertex?"vertex":"edge",index_o); + return true; + } + + if(onEdge(obstacle, s.b, index_o, is_vertex)) + { + index_l = (reverse? sc-1-i-1 : i + 1); + ip = s.b; + printf("vertex %d on-%s %d\n", index_l, is_vertex?"vertex":"edge",index_o); + return true; + } + + SHAPE_LINE_CHAIN::Intersections ips; + int n_is = obstacle.Intersect ( s, ips ); + + if (n_is > 0) + { + index_o = ips[0].our.Index(); + index_l = reverse ?sc-1-i:i; + printf("segment-%d intersects edge-%d\n", index_l, index_o); + ip = ips[0].p; + return true; + } + } + return false; +} + +bool PNS_LINE::Walkaround(SHAPE_LINE_CHAIN obstacle, SHAPE_LINE_CHAIN &pre, SHAPE_LINE_CHAIN &walk, SHAPE_LINE_CHAIN &post, bool cw) const +{ + const SHAPE_LINE_CHAIN &line = GetCLine(); + VECTOR2I ip_start; + int index_o_start, index_l_start; + VECTOR2I ip_end; + int index_o_end, index_l_end; + + bool is_vertex_start, is_vertex_end; + + if(line.SegmentCount() < 1) + return false; + + if(obstacle.PointInside(line.CPoint(0)) || obstacle.PointInside(line.CPoint(-1))) + return false; + +// printf("forward:\n"); + bool found = walkScan(line, obstacle, false, ip_start, index_o_start, index_l_start, is_vertex_start); + //printf("reverse:\n"); + found |= walkScan(line, obstacle, true, ip_end, index_o_end, index_l_end, is_vertex_end); + + if(!found || ip_start == ip_end) + { + pre = line; + return true; + } + + + pre = line.Slice ( 0, index_l_start ); + pre.Append (ip_start); + walk.Clear(); + walk.Append(ip_start); + + if(cw) + { + int is = (index_o_start + 1) % obstacle.PointCount(); + int ie = (is_vertex_end ? index_o_end : index_o_end + 1) % obstacle.PointCount(); + + while(1) + { + printf("is %d\n", is); + walk.Append(obstacle.CPoint(is)); + + if(is == ie) + break; + + is ++; + if (is == obstacle.PointCount() ) + is = 0; + } + } else { + int is = index_o_start; + int ie = (is_vertex_end ? index_o_end : index_o_end) % obstacle.PointCount(); + + while(1) + { + printf("is %d\n", is); + walk.Append(obstacle.CPoint(is)); + if(is == ie) + break; + + is --; + if ( is < 0 ) + is = obstacle.PointCount() - 1; + } + + + } + + walk.Append(ip_end); + + post.Clear(); + post.Append(ip_end); + post.Append(line.Slice (is_vertex_end ? index_l_end : index_l_end + 1 , -1)); + + //for(int i = (index_o_start + 1) % obstacle.PointCount(); + // i != (index_o_end + 1) % obstacle.PointCount(); i=(i+1) % obstacle.PointCount()) + //{ + //printf("append %d\n", i); + //walk.Append(obstacle.CPoint(i)); + //} + + return true; + +} + + + +void PNS_LINE::NewWalkaround( const SHAPE_LINE_CHAIN& aObstacle, + SHAPE_LINE_CHAIN& aPath, + bool aCw ) const +{ + SHAPE_LINE_CHAIN walk, post; + NewWalkaround(aObstacle, aPath, walk, post, aCw); + aPath.Append(walk); + aPath.Append(post); + aPath.Simplify(); +} + +void PNS_LINE::Walkaround( const SHAPE_LINE_CHAIN& aObstacle, + SHAPE_LINE_CHAIN& aPath, + bool aCw ) const +{ + SHAPE_LINE_CHAIN walk, post; + Walkaround(aObstacle, aPath, walk, post, aCw); + aPath.Append(walk); + aPath.Append(post); + aPath.Simplify(); +} + + +const SHAPE_LINE_CHAIN PNS_SEGMENT::Hull(int aClearance, int aWalkaroundThickness) const +{ + int d = aClearance + 10; + int x = (int) (2.0 / (1.0 + M_SQRT2) * d) + 2; + + const VECTOR2I a = m_shape.CPoint(0); + const VECTOR2I b = m_shape.CPoint(1); + + VECTOR2I dir = b - a; + + VECTOR2I p0 = dir.Perpendicular().Resize(d); + + + VECTOR2I ds = dir.Perpendicular().Resize(x / 2); + VECTOR2I pd = dir.Resize(x / 2); + VECTOR2I dp = dir.Resize(d); + + + SHAPE_LINE_CHAIN s; + s.SetClosed( true ); + + s.Append(b + p0 + pd); + s.Append(b + dp + ds); + s.Append(b + dp - ds); + s.Append(b - p0 + pd); + s.Append(a - p0 - pd); + s.Append(a - dp - ds); + s.Append(a - dp + ds); + s.Append(a + p0 - pd); + + // make sure the hull outline is always clockwise + if(s.CSegment(0).Side(a) < 0) + return s.Reverse(); + else + return s; + +} + + +bool PNS_LINE::Is45Degree() +{ + for(int i = 0; i < m_line.SegmentCount(); i++) + { + const SEG &s = m_line.CSegment(i); + + double angle = 180.0 / M_PI * atan2((double)s.b.y - (double)s.a.y, (double)s.b.x - (double)s.a.x); + + if(angle < 0) + angle+=360.0; + + double angle_a = fabs(fmod(angle, 45.0)); + if(angle_a > 1.0 && angle_a < 44.0) + return false; + } + return true; +} + +const PNS_LINE PNS_LINE::ClipToNearestObstacle( PNS_NODE *aNode ) const +{ + PNS_LINE l (*this); + + PNS_NODE::OptObstacle obs = aNode->NearestObstacle ( &l ); + + if(obs) + { + l.RemoveVia(); + int p = l.GetLine().Split(obs -> ip_first); + l.GetLine().Remove(p + 1, -1); + } + + return l; +} + +void PNS_LINE::ShowLinks() +{ + if(!m_segmentRefs) + { + printf("line %p: no links\n", this); + return; + } + printf("line %p: %d linked segs\n", this, m_segmentRefs->size()); + for (int i= 0; i<(int)m_segmentRefs->size(); i++) printf("seg %d: %p\n", i, (*m_segmentRefs)[i]) ; +} diff --git a/pcbnew/router/pns_line.h b/pcbnew/router/pns_line.h new file mode 100644 index 0000000000..cd47005606 --- /dev/null +++ b/pcbnew/router/pns_line.h @@ -0,0 +1,251 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef __PNS_LINE_H +#define __PNS_LINE_H + +#include + +#include +#include +#include + +#include "direction.h" +#include "pns_item.h" +#include "pns_via.h" + +class PNS_NODE; +class PNS_SEGMENT; +class PNS_VIA; + +/** + * Class PNS_LINE + * + * Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads, + * junctions between multiple traces or two traces different widths and combinations of these). + * PNS_LINEs are NOT stored in the model (PNS_NODE) - instead, they are assembled on-the-fly, based on + * a via/pad/segment that belongs/begins them. + * + * PNS_LINEs can be either loose (consisting of segments that do not belong to any PNS_NODE) or owned (with segments + * taken from a PNS_NODE) - these are returned by PNS_NODE::AssembleLine and friends. + * + * A PNS_LINE may have a PNS_VIA attached at its and - this is used by via dragging/force propagation stuff. + */ + +class PNS_LINE : public PNS_ITEM +{ +public: + typedef std::vector LinkedSegments; + + PNS_LINE (): + PNS_ITEM(LINE) + { + m_segmentRefs = NULL; + m_hasVia = false; + m_affectedRangeStart = -1; + }; + + PNS_LINE (int aLayer, int aWidth, const SHAPE_LINE_CHAIN& aLine) : + PNS_ITEM(LINE) + { + m_line = aLine; + m_width = aWidth; + m_segmentRefs = NULL; + m_hasVia = false; + m_affectedRangeStart = -1; + SetLayer(aLayer); + + } + + PNS_LINE(const PNS_LINE& aOther) : + PNS_ITEM(aOther), + m_line(aOther.m_line), + m_width(aOther.m_width) + { + m_net = aOther.m_net; + m_movable = aOther.m_movable; + m_world = aOther.m_world; + m_layers = aOther.m_layers; + m_segmentRefs = NULL; + m_via = aOther.m_via; + m_hasVia = aOther.m_hasVia; + m_affectedRangeStart = -1; + } + + /** + * Constructor + * copies properties (net, layers from a base line), and replaces the shape + * by aLine + **/ + PNS_LINE(const PNS_LINE& aBase, const SHAPE_LINE_CHAIN& aLine) : + PNS_ITEM(aBase), + m_line(aLine), + m_width(aBase.m_width) + { + m_net = aBase.m_net; + m_layers = aBase.m_layers; + m_segmentRefs = NULL; + m_hasVia = false; + m_affectedRangeStart = -1; + } + + ~PNS_LINE () + { + if(m_segmentRefs) + delete m_segmentRefs; + }; + + virtual PNS_LINE *Clone() const ; + + ///> clones the line without cloning the shape (just the properties - net, width, layers, etc.) + PNS_LINE *CloneProperties() const ; + + int GetLayer() const { return GetLayers().Start(); } + + ///> Geometry accessors + void SetShape(const SHAPE_LINE_CHAIN& aLine) { m_line = aLine; } + const SHAPE* GetShape() const { return &m_line; } + SHAPE_LINE_CHAIN& GetLine() { return m_line; } + const SHAPE_LINE_CHAIN& GetCLine() const { return m_line; } + + ///> Width accessors + void SetWidth( int aWidth ) { m_width = aWidth; } + int GetWidth () const { return m_width; } + + ///> Links a segment from a PNS_NODE to this line, making it owned by the node + void LinkSegment(PNS_SEGMENT *aSeg) + { + if(!m_segmentRefs) + m_segmentRefs = new std::vector (); + m_segmentRefs->push_back(aSeg); + } + + ///> Returns a list of segments from the owning node that constitute this line (or NULL if + ///> the line is loose) + LinkedSegments* GetLinkedSegments() + { + return m_segmentRefs; + } + + bool ContainsSegment (PNS_SEGMENT *aSeg) const + { + if (!m_segmentRefs) + return false; + + return std::find( m_segmentRefs->begin(), m_segmentRefs->end(), aSeg) != m_segmentRefs->end(); + } + + ///> Returns this line, but clipped to the nearest obstacle along, to avoid collision. + const PNS_LINE ClipToNearestObstacle( PNS_NODE *aNode ) const; + + ///> DEPRECATED optimization functions (moved to PNS_OPTIMIZER) + bool MergeObtuseSegments(); + bool MergeSegments(); + + ///> Returns the number of corners of angles specified by mask aAngles. + int CountCorners(int aAngles); + + + ///> Calculates a line thightly wrapping a convex hull of an obstacle object (aObstacle). + ///> aPrePath = path from origin to the obstacle + ///> aWalkaroundPath = path around the obstacle + ///> aPostPath = past from obstacle till the end + ///> aCW = whether to walkaround in clockwise or counter-clockwise direction. + void NewWalkaround( const SHAPE_LINE_CHAIN& aObstacle, + SHAPE_LINE_CHAIN& aPrePath, + SHAPE_LINE_CHAIN& aWalkaroundPath, + SHAPE_LINE_CHAIN& aPostPath, + bool aCw ) const; + + void NewWalkaround( const SHAPE_LINE_CHAIN& aObstacle, + SHAPE_LINE_CHAIN& aPath, + bool aCw ) const; + + + bool Walkaround(SHAPE_LINE_CHAIN obstacle, SHAPE_LINE_CHAIN &pre, SHAPE_LINE_CHAIN &walk, SHAPE_LINE_CHAIN &post, bool cw) const; + + void Walkaround( const SHAPE_LINE_CHAIN& aObstacle, + SHAPE_LINE_CHAIN& aPath, + bool aCw ) const; + + + bool Is45Degree(); + + ///> Prints out all linked segments + void ShowLinks(); + + bool EndsWithVia() const { return m_hasVia; } + + void AppendVia ( const PNS_VIA &aVia ) { + m_hasVia = true; + m_via = aVia; + m_via.SetNet ( m_net ) ; + } + + void RemoveVia() { m_hasVia = false; } + const PNS_VIA& GetVia() const { return m_via; } + + void SetAffectedRange ( int aStart, int aEnd ) + { + m_affectedRangeStart = aStart; + m_affectedRangeEnd = aEnd; + } + + void ClearAffectedRange ( ) + { + m_affectedRangeStart = -1; + } + + bool GetAffectedRange ( int& aStart, int& aEnd ) + { + if(m_affectedRangeStart >= 0) + { + aStart = m_affectedRangeStart; + aEnd = m_affectedRangeEnd; + return true; + } else { + aStart = 0; + aEnd = m_line.PointCount(); + return false; + } + } + +private: + bool onEdge(const SHAPE_LINE_CHAIN &obstacle, VECTOR2I p, int& ei, bool& is_vertex) const; + bool walkScan(const SHAPE_LINE_CHAIN &line, const SHAPE_LINE_CHAIN &obstacle, bool reverse, VECTOR2I &ip, int& index_o, int& index_l, bool& is_vertex) const; + + ///> List of semgments in a PNS_NODE (PNS_ITEM::m_owner) that constitute this line. + LinkedSegments* m_segmentRefs; + + ///> Shape of the line + SHAPE_LINE_CHAIN m_line; + + int m_width; + ///> Via at the end and a flag indicating if it's enabled. + PNS_VIA m_via; + bool m_hasVia; + + int m_affectedRangeStart; + int m_affectedRangeEnd; +}; + + +#endif // __PNS_LINE_H + diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp new file mode 100644 index 0000000000..1057dc9062 --- /dev/null +++ b/pcbnew/router/pns_line_placer.cpp @@ -0,0 +1,715 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include +#include +#include + +#include "trace.h" + +#include "pns_node.h" +#include "pns_line_placer.h" +#include "pns_walkaround.h" +#include "pns_shove.h" +#include "pns_utils.h" + +using namespace std; +using boost::optional; + +PNS_LINE_PLACER::PNS_LINE_PLACER( PNS_NODE *aWorld ) +{ + m_initial_direction = DIRECTION_45(DIRECTION_45::N); + m_follow_mouse = false; + m_smoothing_step = 100000; + m_smooth_mouse = false; + m_iteration = 0; + m_world = aWorld; + m_mode = RM_Smart; + m_follow_mouse = true; + m_shove = NULL; +}; + +PNS_LINE_PLACER::~PNS_LINE_PLACER() +{ + if(m_shove) + delete m_shove; +} + +void PNS_LINE_PLACER::ApplySettings ( const PNS_ROUTING_SETTINGS& aSettings ) +{ + m_follow_mouse = aSettings.m_followMouse; + m_mode = aSettings.m_routingMode; + m_walkaroundIterationLimit = aSettings.m_walkaroundIterationLimit; + m_smartPads = aSettings.m_smartPads; +} + +void PNS_LINE_PLACER::StartPlacement(const VECTOR2I& aStart, int aNet, int aWidth, int aLayer ) +{ + m_direction = m_initial_direction; + TRACE(1, "world %p, intitial-direction %s layer %d\n", m_world % m_direction.Format().c_str() % aLayer); + m_head.SetNet(aNet); + m_tail.SetNet(aNet); + m_head.SetWidth(aWidth); + m_tail.SetWidth(aWidth); + m_head.GetLine().Clear(); + m_tail.GetLine().Clear(); + m_head.SetLayer(aLayer); + m_tail.SetLayer(aLayer); + m_iteration = 0; + m_p_start = aStart; + m_currentNode = m_world->Branch(); + m_head.SetWorld(m_currentNode); + m_tail.SetWorld(m_currentNode); + //if(m_shove) + // delete m_shove; + m_shove = new PNS_SHOVE(m_currentNode); + m_placingVia = false; +} + +void PNS_LINE_PLACER::SetInitialDirection(const DIRECTION_45& aDirection) +{ + m_initial_direction = aDirection; + + if(m_tail.GetCLine().SegmentCount() == 0) + m_direction = aDirection; +} + +/** + * Function handleSelfIntersections() + * + * Checks if the head of the track intersects its tail. If so, cuts the tail up to the + * intersecting segment and fixes the head direction to match the last segment before the cut. + * @return true if the line has been changed. + */ +bool PNS_LINE_PLACER::handleSelfIntersections() +{ + SHAPE_LINE_CHAIN::Intersections ips; + SHAPE_LINE_CHAIN& head = m_head.GetLine(); + SHAPE_LINE_CHAIN& tail = m_tail.GetLine(); + + // if there is no tail, there is nothing to intersect with + if(tail.PointCount() < 2) + return false; + + tail.Intersect(head, ips); + + // no intesection points - nothing to reduce + if (ips.empty()) + return false; + + int n = INT_MAX; + VECTOR2I ipoint; + + // if there is more than one intersection, find the one that is + // closest to the beginning of the tail. + BOOST_FOREACH(SHAPE_LINE_CHAIN::Intersection i, ips) + { + if (i.our.Index() < n) + { + n = i.our.Index(); + ipoint = i.p; + } + } + + // ignore the point where head and tail meet + if(ipoint == head.CPoint(0) || ipoint == tail.CPoint(-1)) + return false; + + // Intersection point is on the first or the second segment: just start routing + // from the beginning + if (n < 2) + { + m_p_start = tail.Point(0); + m_direction = m_initial_direction; + tail.Clear(); + head.Clear(); + return true; + } else { + // Clip till the last tail segment before intersection. + // Set the direction to the one of this segment. + const SEG last = tail.CSegment(n - 1); + m_p_start = last.a; + m_direction = DIRECTION_45(last); + tail.Remove(n, -1); + return true; + } + return false; +} + +/** + * Function handlePullback() + * + * Deals with pull-back: reduces the tail if head trace is moved backwards wrs + * to the current tail direction. + * @return true if the line has been changed. + */ +bool PNS_LINE_PLACER::handlePullback() +{ + SHAPE_LINE_CHAIN& head = m_head.GetLine(); + SHAPE_LINE_CHAIN& tail = m_tail.GetLine(); + + int n = tail.PointCount(); + + if(n == 0) + return false; + else if (n == 1) + { + m_p_start = tail.CPoint(0); + tail.Clear(); + return true; + } + + DIRECTION_45 first_head (head.Segment(0)); + DIRECTION_45 last_tail (tail.Segment(-1)); + DIRECTION_45::AngleType angle = first_head.Angle(last_tail); + + // case 1: we have a defined routing direction, and the currently computed head + // goes in different one. + bool pullback_1 = false;//(m_direction != DIRECTION_45::UNDEFINED && m_direction != first_head); + + // case 2: regardless of the current routing direction, if the tail/head extremities form + // an acute or right angle, reduce the tail by one segment (and hope that further iterations) + // will result with a cleaner trace + bool pullback_2 = (angle == DIRECTION_45::ANG_RIGHT || angle == DIRECTION_45::ANG_ACUTE); + + if(pullback_1 || pullback_2) + { + + const SEG last = tail.CSegment(-1); + m_direction = DIRECTION_45(last); + m_p_start = last.a; + + + TRACE(0, "Placer: pullback triggered [%d] [%s %s]", n % last_tail.Format().c_str() % first_head.Format().c_str()); + // erase the last point in the tail, hoping that the next iteration will result with a head + // trace that starts with a segment following our current direction. + if(n < 2) + tail.Clear(); // don't leave a single-point tail + else + tail.Remove(-1, -1); + + if( !tail.SegmentCount() ) + m_direction = m_initial_direction; + + return true; + } + + return false; +} + +/** + * Function reduceTail() + * + * Attempts to reduce the numer of segments in the tail by trying to replace a certain number + * of latest tail segments with a direct trace leading to aEnd that does not collide with anything. + * @param aEnd: current routing destination point. + * @return true if the line has been changed. + */ +bool PNS_LINE_PLACER::reduceTail(const VECTOR2I& aEnd) +{ + SHAPE_LINE_CHAIN& head = m_head.GetLine(); + SHAPE_LINE_CHAIN& tail = m_tail.GetLine(); + + int n = tail.SegmentCount(); + + // Don't attempt this for too short tails + if (n < 2) + return false; + + // Start from the segment farthest from the end of the tail + //int start_index = std::max(n - 1 - ReductionDepth, 0); + + DIRECTION_45 new_direction; + VECTOR2I new_start; + int reduce_index = -1; + + DIRECTION_45 head_dir ( head.Segment(0) ); + + for(int i = tail.SegmentCount() - 1; i >= 0; i--) + { + const SEG s = tail.CSegment(i); + DIRECTION_45 dir (s); + + // calculate a replacement route and check if it matches the direction of the segment to be replaced + SHAPE_LINE_CHAIN replacement = dir.BuildInitialTrace(s.a, aEnd); + + PNS_LINE tmp (m_tail, replacement); + + if (m_currentNode->CheckColliding(&tmp, PNS_ITEM::ANY)) + break; + + if(DIRECTION_45(replacement.Segment(0)) == dir) + { + new_start = s.a; + new_direction = dir; + reduce_index = i; + } + } + + if(reduce_index >= 0) + { + + TRACE(0, "Placer: reducing tail: %d", reduce_index); + SHAPE_LINE_CHAIN reducedLine = new_direction.BuildInitialTrace(new_start, aEnd); + + m_p_start = new_start; + m_direction = new_direction; + tail.Remove(reduce_index+1, -1); + head.Clear(); + return true; + } + + if( !tail.SegmentCount() ) + m_direction = m_initial_direction; + + return false; +} + + +/** + * Function checkObtusity() + * + * Helper that checks if segments a and b form an obtuse angle (in 45-degree regime). + * @return true, if angle (a, b) is obtuse + */ +bool PNS_LINE_PLACER::checkObtusity(const SEG& a, const SEG& b) const +{ + const DIRECTION_45 dir_a(a); + const DIRECTION_45 dir_b(b); + return dir_a.IsObtuse(dir_b) || dir_a == dir_b; +} + + +/** + * Function mergeHead() + * + * Moves "estabished" segments from the head to the tail if certain conditions are met. + * @return true, if the line has been changed. + */ +bool PNS_LINE_PLACER::mergeHead() +{ + SHAPE_LINE_CHAIN& head = m_head.GetLine(); + SHAPE_LINE_CHAIN& tail = m_tail.GetLine(); + + const int ForbiddenAngles = DIRECTION_45::ANG_ACUTE | DIRECTION_45::ANG_HALF_FULL | DIRECTION_45::ANG_UNDEFINED; + + head.Simplify(); + tail.Simplify(); + + int n_head = head.SegmentCount(); + int n_tail = tail.SegmentCount(); + + if( n_head < 3 ) + { + TRACEn(4, "Merge failed: not enough head segs."); + return false; + } + + if (n_tail && head.CPoint(0) != tail.CPoint(-1)) + { + TRACEn(4, "Merge failed: head and tail discontinuous."); + return false; + } + + if( m_head.CountCorners(ForbiddenAngles) != 0 ) + return false; + + DIRECTION_45 dir_tail, dir_head; + + dir_head = DIRECTION_45(head.CSegment(0)); + + if(n_tail) + { + dir_tail = DIRECTION_45(tail.CSegment(-1)); + if(dir_head.Angle(dir_tail) & ForbiddenAngles) + return false; + } + + if(!n_tail) + tail.Append(head.CSegment(0).a); + + for (int i = 0; i < n_head - 2; i++) + { + tail.Append(head.CSegment(i).b); + } + + tail.Simplify(); + + SEG last = tail.CSegment(-1); + + m_p_start = last.b; + m_direction = DIRECTION_45(last).Right(); + + + head.Remove(0, n_head - 2); + + TRACE(0, "Placer: merge %d, new direction: %s", n_head % m_direction.Format().c_str()); + + + head.Simplify(); + tail.Simplify(); + + return true; +} + +bool PNS_LINE_PLACER::handleViaPlacement ( PNS_LINE& aHead ) +{ + if(!m_placingVia) + return true; + + PNS_LAYERSET allLayers (0, 15); + PNS_VIA v (aHead.GetCLine().CPoint(-1), allLayers, m_viaDiameter, aHead.GetNet()); + v.SetDrill(m_viaDrill); + + VECTOR2I force; + VECTOR2I lead = aHead.GetCLine().CPoint(-1) - aHead.GetCLine().CPoint(0); + + + if( v.PushoutForce ( m_shove->GetCurrentNode(), lead, force, true, 20 ) ) + { + SHAPE_LINE_CHAIN line = m_direction.BuildInitialTrace(aHead.GetCLine().CPoint(0), aHead.GetCLine().CPoint(-1) + force); + aHead = PNS_LINE(aHead, line); + + v.SetPos(v.GetPos() + force); + return true; + } + + return false; +} + +/** + * Function routeHead() + * + * Computes the head trace between the current start point (m_p_start) and point aP, + * starting with direction defined in m_direction. The trace walks around all + * colliding solid or non-movable items. Movable segments are ignored, as they'll be handled + * later by the shove algorithm. + */ +bool PNS_LINE_PLACER::routeHead(const VECTOR2I& aP, PNS_LINE& aNewHead, bool aCwWalkaround) +{ + // STAGE 1: route a simple two-segment trace between m_p_start and aP... + SHAPE_LINE_CHAIN line = m_direction.BuildInitialTrace(m_p_start, aP); + + PNS_LINE initTrack (m_head, line); + PNS_LINE walkFull, walkSolids; + + + if(m_mode == RM_Ignore) + { + aNewHead = initTrack; + return true; + } + handleViaPlacement(initTrack); + + m_currentNode = m_shove->GetCurrentNode(); + + PNS_OPTIMIZER optimizer(m_currentNode); + PNS_WALKAROUND walkaround( m_currentNode ); + + walkaround.SetSolidsOnly(false); + walkaround.SetIterationLimit(m_mode == RM_Walkaround ? 8 : 5 ); + //walkaround.SetApproachCursor(true, aP); + + PNS_WALKAROUND::WalkaroundStatus wf = walkaround.Route(initTrack, walkFull); + +#if 0 + + if(m_mode == RM_Walkaround) + { + // walkaround. +// PNSDisplayDebugLine (walkFull.GetCLine(), 4); + + if(wf == PNS_WALKAROUND::STUCK) + { + aNewHead = m_head; + aNewHead.SetShape(walkFull.GetCLine()); + aNewHead = aNewHead.ClipToNearestObstacle(m_currentNode); + return false; + } + + aNewHead = m_head; + aNewHead.SetShape(walkFull.GetCLine()); + +// printf("nh w %d l %d\n", aNewHead.GetWidth(), aNewHead.GetLayers().Start()); + return true; + } +#endif + + PNS_COST_ESTIMATOR cost_walk, cost_orig; + + walkaround.SetApproachCursor ( false, aP ); + walkaround.SetSolidsOnly(true); + walkaround.SetIterationLimit( 10 ); + PNS_WALKAROUND::WalkaroundStatus stat_solids = walkaround.Route(initTrack, walkSolids); + + optimizer.SetEffortLevel ( PNS_OPTIMIZER::MERGE_SEGMENTS ); + optimizer.SetCollisionMask (PNS_ITEM::SOLID); + optimizer.Optimize(&walkSolids); + #if 0 + optimizer.SetCollisionMask (-1); + optimizer.Optimize(&walkFull); + #endif + cost_orig.Add(initTrack); + cost_walk.Add(walkFull); + + if(m_mode == RM_Smart || m_mode == RM_Shove) + { + PNS_LINE l2; + + bool walk_better = cost_orig.IsBetter(cost_walk, 1.5, 10.0); + walk_better = false; + +#if 0 + printf("RtTrk width %d %d %d", initTrack.GetWidth(), walkFull.GetWidth(), walkSolids.GetWidth()); + printf("init-coll %d\n", m_currentNode->CheckColliding(&initTrack)? 1: 0); + printf("total cost: walk cor %.0f len %.0f orig cor %.0f len %.0f walk-better %d\n", + cost_walk.GetCornerCost(), cost_walk.GetLengthCost(), + cost_orig.GetCornerCost(), cost_orig.GetLengthCost(), + walk_better ); +#endif + + if(m_mode == RM_Smart && wf == PNS_WALKAROUND::DONE && walk_better && walkFull.GetCLine().CPoint(-1) == initTrack.GetCLine().CPoint(-1)) + l2 = walkFull; + else if (stat_solids == PNS_WALKAROUND::DONE) + l2 = walkSolids; + else + l2 = initTrack.ClipToNearestObstacle(m_shove->GetCurrentNode()); + + PNS_LINE l ( m_tail ); + l.GetLine().Append( l2.GetCLine() ); + l.GetLine().Simplify(); + + if(m_placingVia) + { + PNS_LAYERSET allLayers(0,15); + PNS_VIA v1( l.GetCLine().CPoint(-1), allLayers, m_viaDiameter ); + PNS_VIA v2( l2.GetCLine().CPoint(-1), allLayers, m_viaDiameter ); + v1.SetDrill(m_viaDrill); + v2.SetDrill(m_viaDrill); + + l.AppendVia ( v1 ); + l2.AppendVia ( v2 ); + } + + PNS_SHOVE::ShoveStatus status = m_shove->ShoveLines(&l); + m_currentNode = m_shove->GetCurrentNode(); + + if (status == PNS_SHOVE::SH_OK) + { + + optimizer.SetWorld (m_currentNode); + optimizer.ClearCache(); + optimizer.SetEffortLevel( PNS_OPTIMIZER::MERGE_OBTUSE | PNS_OPTIMIZER::SMART_PADS ); + optimizer.SetCollisionMask (-1); + optimizer.Optimize(&l2); + + aNewHead = l2; + + return true; + } else { + walkaround.SetWorld( m_currentNode ); + walkaround.SetSolidsOnly(false); + walkaround.SetIterationLimit( 10 ); + walkaround.SetApproachCursor ( true, aP ); + walkaround.Route(initTrack, l2); + aNewHead = l2.ClipToNearestObstacle (m_shove->GetCurrentNode()); + //aNewHead = l2; + + return false; + } + + } + + return false; +} + + +/** + * Function optimizeTailHeadTransition() + * + * Tries to reduce the corner count of the most recent part of tail/head by merging + * obtuse/collinear segments. + * @return true, if the line has been changed. + */ +bool PNS_LINE_PLACER::optimizeTailHeadTransition() +{ + SHAPE_LINE_CHAIN& head = m_head.GetLine(); + SHAPE_LINE_CHAIN& tail = m_tail.GetLine(); + + const int TailLookbackSegments = 5; + + int threshold = min(tail.PointCount(), TailLookbackSegments + 1); + + if(tail.SegmentCount() < 3) + return false; + + // assemble TailLookbackSegments tail segments with the current head + SHAPE_LINE_CHAIN opt_line = tail.Slice(-threshold, -1); + + opt_line.Append(head); +// opt_line.Simplify(); + + PNS_LINE new_head(m_tail, opt_line); + + // and see if it could be made simpler by merging obtuse/collnear segments. If so, + // replace the (threshold) last tail points and the head with the optimized line + + //if(PNS_OPTIMIZER::Optimize(&new_head, PNS_OPTIMIZER::MERGE_SEGMENTS)) + + + if(new_head.MergeSegments()) + { + PNS_LINE tmp(m_tail, opt_line); + + TRACE(0, "Placer: optimize tail-head [%d]", threshold); + + head.Clear(); + tail.Replace(-threshold, -1, new_head.GetCLine()); + tail.Simplify(); + + m_p_start = new_head.GetCLine().CPoint(-1); + m_direction = DIRECTION_45(new_head.GetCLine().CSegment(-1)); + + return true; + } + + return false; +} + +/** + * Function routeStep() + * + * Performs a single routing alorithm step, for the end point aP. + * @param aP ending point of current route + * @return true, if the line has been changed. + */ + + +void PNS_LINE_PLACER::routeStep(const VECTOR2I& aP) +{ + bool fail = false; + bool go_back = false; + + int i, n_iter = 1; + + PNS_LINE new_head; + + m_follow_mouse = true; + + TRACE(2,"INIT-DIR: %s head: %d, tail: %d segs\n", m_initial_direction.Format().c_str() % m_head.GetCLine().SegmentCount() % m_tail.GetCLine().SegmentCount()); + + for(i = 0; i < n_iter; i++) + { + + if(!go_back && m_follow_mouse) + reduceTail(aP); + + go_back = false; + + if(!routeHead(aP, new_head, true)) + fail = true; + + if(!new_head.Is45Degree()) + fail = true; + + if(!m_follow_mouse) + return; + + m_head = new_head; + + if(handleSelfIntersections()) + { + n_iter++; + go_back = true; + } + + if(!go_back && handlePullback()) + { + n_iter++; + go_back = true; + } + } + + if(!fail) + { + if(optimizeTailHeadTransition()) + return; + mergeHead(); + } + +} + +/** + * Function Route() + * + * Re-routes the current track to point aP. Returns true, when routing has completed + * successfully (i.e. the trace end has reached point aP), and false if the trace was stuck somewhere + * on the way. May call routeStep() repetitively due to mouse smoothing. + * @param aP ending point of current route. + * @return true, if the routing is complete. + */ +bool PNS_LINE_PLACER::Route(const VECTOR2I& aP) +{ + if(m_smooth_mouse) + { + VECTOR2I p_cur = m_p_start; + VECTOR2I step = (aP - m_p_start).Resize(m_smoothing_step); + + do + { + if ((p_cur - aP).EuclideanNorm() <= m_smoothing_step) + p_cur = aP; + else + p_cur += step; + + routeStep(p_cur); + + } while (p_cur != aP); + } else + routeStep(aP); + + return CurrentEnd() == aP; +} + + +const PNS_LINE PNS_LINE_PLACER::GetTrace() const +{ + PNS_LINE tmp(m_head); + tmp.SetShape( m_tail.GetCLine() ); + tmp.GetLine().Append( m_head.GetCLine() ); + tmp.GetLine().Simplify(); + return tmp; +} + +void PNS_LINE_PLACER::FlipPosture() +{ + m_initial_direction = m_initial_direction.Right(); + m_direction = m_direction.Right(); +} + +void PNS_LINE_PLACER::GetUpdatedItems( PNS_NODE::ItemVector& aRemoved, PNS_NODE::ItemVector& aAdded) +{ + return m_shove->GetCurrentNode()->GetUpdatedItems(aRemoved, aAdded); +} + +PNS_NODE *PNS_LINE_PLACER::GetCurrentNode() const +{ + return m_shove->GetCurrentNode(); +} \ No newline at end of file diff --git a/pcbnew/router/pns_line_placer.h b/pcbnew/router/pns_line_placer.h new file mode 100644 index 0000000000..40d769cc88 --- /dev/null +++ b/pcbnew/router/pns_line_placer.h @@ -0,0 +1,156 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef __PNS_LINE_PLACER_H +#define __PNS_LINE_PLACER_H + +#include + +#include +#include + +#include "pns_node.h" +#include "pns_via.h" +#include "pns_line.h" +#include "pns_routing_settings.h" + +class PNS_ROUTER; +class PNS_SHOVE; +class PNS_OPTIMIZER; +class PNS_ROUTER_BASE; + +/** + * Class PNS_LINE_PLACER + * + * Interactively routes a single track. Runs shove and walkaround algorithms when needed. + */ + +class PNS_LINE_PLACER +{ + public: + PNS_LINE_PLACER( PNS_NODE *aWorld ); + ~PNS_LINE_PLACER(); + + ///> Appends a via at the end of currently placed line. + void AddVia ( bool aEnabled, int aDiameter, int aDrill ) + { + m_viaDiameter = aDiameter; + m_viaDrill = aDrill; + m_placingVia = aEnabled; + } + + ///> Starts placement of a line at point aStart. + void StartPlacement(const VECTOR2I& aStart, int aNet, int aWidth, int aLayer); + + ///> Updates the routed line with a new ending point. + bool Route(const VECTOR2I& aP); + + ///> Sets initial routing direction/posture + void SetInitialDirection(const DIRECTION_45& aDirection); + + void ApplySettings ( const PNS_ROUTING_SETTINGS& aSettings ); + + ///> Returns the "head" of the line being placed, that is the volatile part that has not been settled yet + const PNS_LINE& GetHead() const { return m_head; } + ///> Returns the "tail" of the line being placed the part that has been fixed already (follow mouse mode only) + const PNS_LINE& GetTail() const { return m_tail; } + + ///> Returns the whole routed line + const PNS_LINE GetTrace() const; + + ///> Returns the current end of the line being placed. It may not be equal to the cursor position due to collisions. + const VECTOR2I& CurrentEnd() const + { + if(m_head.GetCLine().PointCount() > 0) + return m_head.GetCLine().CPoint(-1); + else if(m_tail.GetCLine().PointCount() > 0) + return m_tail.GetCLine().CPoint(-1); + else + return m_p_start; + } + + + ///> Returns all items in the world that have been affected by the routing operation. Used + /// to update data structures of the host application + void GetUpdatedItems( PNS_NODE::ItemVector& aRemoved, PNS_NODE::ItemVector& aAdded); + + ///> Toggles the current posture (straight/diagonal) of the trace head. + void FlipPosture(); + + ///> Returns the most recent world state + PNS_NODE *GetCurrentNode() const; + + private: + + static const double m_shoveLengthThreshold = 1.7; + + bool handleViaPlacement ( PNS_LINE& aHead ); + + bool checkObtusity(const SEG& a, const SEG& b) const; + bool handleSelfIntersections(); + bool handlePullback(); + bool mergeHead(); + bool reduceTail(const VECTOR2I& aEnd); + void fixHeadPosture(); + bool optimizeTailHeadTransition(); + + bool routeHead(const VECTOR2I& aP, PNS_LINE& aNewHead, bool aCwWalkaround = true); + void routeStep(const VECTOR2I& aP); + + ///> routing mode (walkaround, shove, etc.) + PNS_MODE m_mode; + ///> follow mouse trail by attaching new segments to the head as the cursor moves + bool m_follow_mouse; + ///> mouse smoothing active + bool m_smooth_mouse; + ///> mouse smoothing step (in world units) + int m_smoothing_step; + ///> current routing direction + DIRECTION_45 m_direction; + ///> routing direction for new traces + DIRECTION_45 m_initial_direction; + ///> routing "head": volatile part of the track from the previously + /// analyzed point to the current routing destination + PNS_LINE m_head; + ///> routing "tail": part of the track that has been already fixed due to collisions with obstacles + PNS_LINE m_tail; + ///> current algorithm iteration + int m_iteration; + ///> pointer to world to search colliding items + PNS_NODE *m_world; + ///> current routing start point (end of tail, beginning of head) + VECTOR2I m_p_start; + ///> The shove engine + PNS_SHOVE *m_shove; + ///> Current world state + PNS_NODE *m_currentNode; + ///> Are we placing a via? + bool m_placingVia; + ///> current via diameter + int m_viaDiameter; + ///> current via drill + int m_viaDrill; + ///> walkaround algorithm iteration limit + int m_walkaroundIterationLimit; + ///> smart pads optimizer enabled. + bool m_smartPads; +}; + +#endif // __PNS_LINE_PLACER_H diff --git a/pcbnew/router/pns_node.cpp b/pcbnew/router/pns_node.cpp new file mode 100644 index 0000000000..5a1932f1e6 --- /dev/null +++ b/pcbnew/router/pns_node.cpp @@ -0,0 +1,901 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include +#include + +#include + +#include +#include +#include +#include + +#include "trace.h" +#include "pns_item.h" +#include "pns_line.h" +#include "pns_node.h" +#include "pns_via.h" +#include "pns_solid.h" +#include "pns_joint.h" +#include "pns_index.h" + +using namespace std; + +using boost::unordered_set; +using boost::unordered_map; + +static boost::unordered_set allocNodes; + +PNS_NODE::PNS_NODE() +{ + //printf("MakeNode [%p, total = %d]\n", this, allocNodes.size()); + m_root = this; + m_parent = NULL; + m_maxClearance = 800000; // fixme: depends on how thick traces are. + m_index = new PNS_INDEX; + allocNodes.insert(this); +} + +PNS_NODE::~PNS_NODE() +{ + if(!m_children.empty()) + { + TRACEn(0, "attempting to free a node that has kids.\n"); + assert(false); + } + + if(allocNodes.find(this) == allocNodes.end()) + { + TRACEn(0, "attempting to free an already-free'd node.\n"); + assert(false); + } + + allocNodes.erase(this); + + for(PNS_INDEX::ItemSet::iterator i = m_index->begin(); i != m_index->end(); ++i) + if( (*i) ->BelongsTo(this)) + delete *i; + + unlinkParent(); + delete m_index; +} + + +int PNS_NODE::GetClearance(const PNS_ITEM *a, const PNS_ITEM *b) const +{ + int clearance = (* m_clearanceFunctor) (a, b); + + if( a->OfKind (PNS_ITEM::SEGMENT) ) + clearance += static_cast(a) -> GetWidth() / 2; + + if( a->OfKind (PNS_ITEM::LINE) ) + clearance += static_cast(a) -> GetWidth() / 2; + + if( b->OfKind (PNS_ITEM::SEGMENT) ) + clearance += static_cast(b) -> GetWidth() / 2; + + if( b->OfKind (PNS_ITEM::LINE) ) + clearance += static_cast(b) -> GetWidth() / 2; + + return clearance; +} + +PNS_NODE* PNS_NODE::Branch() +{ + PNS_NODE *child = new PNS_NODE; + m_children.push_back(child); + + child->m_parent = this; + child->m_clearanceFunctor = m_clearanceFunctor; + child->m_root = isRoot() ? this : m_root; + + // immmediate offspring of the root branch needs not copy anything. For the rest, + // deep-copy joints, overridden item map and pointers to stored items. + if(!isRoot()) + { + JointMap::iterator j; + + for(PNS_INDEX::ItemSet::iterator i = m_index->begin(); i != m_index->end(); ++i) + child->m_index->Add(*i); + + child->m_joints = m_joints; + child->m_override = m_override; + } + + TRACE(2, "%d items, %d joints, %d overrides", child->m_index->Size() % child->m_joints.size() % child->m_override.size()); + + return child; +} + +void PNS_NODE::unlinkParent ( ) +{ + if( isRoot() ) + return; + + for( vector::iterator i = m_parent->m_children.begin(); i != m_parent->m_children.end(); ++i) + { + if (*i == this) + { + m_parent->m_children.erase(i); + return; + } + } +} + + +// function object that visits potential obstacles and performs the actual collision refining +struct PNS_NODE::obstacleVisitor { +///> node we are searching in (either root or a branch) + PNS_NODE *m_node; +///> node that overrides root entries + PNS_NODE *m_override; +///> list of encountered obstacles + Obstacles& m_tab; +///> the item we are looking for collisions with + const PNS_ITEM* m_item; +///> acccepted kinds of colliding items (solids, vias, segments, etc...) + int m_kindMask; +///> max number of hits + int m_limitCount; +///> number of items found so far + int m_matchCount; + + obstacleVisitor( PNS_NODE::Obstacles& aTab, + const PNS_ITEM* aItem, + int aKindMask ) + : m_tab(aTab), + m_item(aItem), + m_kindMask(aKindMask), + m_limitCount(-1), + m_matchCount(0) + { }; + + void SetCountLimit(int aLimit) + { + m_limitCount = aLimit; + } + + void SetWorld(PNS_NODE *aNode, PNS_NODE *aOverride = NULL) + { + m_node = aNode; + m_override = aOverride; + } + + bool operator()( PNS_ITEM *aItem ) + { + if( !aItem->OfKind(m_kindMask)) + return true; + // check if there is a more recent branch with a newer (possibily modified) version of this item. + if ( m_override && m_override -> overrides (aItem) ) + return true; + + int clearance = m_node->GetClearance(aItem, m_item); + if(!aItem->Collide(m_item, clearance)) + return true; + + PNS_OBSTACLE obs; + + obs.item = aItem; + m_tab.push_back(obs); + + m_matchCount ++; + + if(m_limitCount > 0 && m_matchCount >= m_limitCount) + return false; + return true; + }; +}; + +int PNS_NODE::QueryColliding( const PNS_ITEM* aItem, PNS_NODE::Obstacles& aObstacles, int aKindMask, int aLimitCount) +{ + obstacleVisitor visitor ( aObstacles, aItem, aKindMask ); + + assert(allocNodes.find(this) != allocNodes.end()); + + visitor.SetCountLimit(aLimitCount); + visitor.SetWorld( this, NULL ); + + // first, look for colliding items ourselves + m_index->Query(aItem, m_maxClearance, visitor); + + // if we haven't found enough items, look in the root branch as well. + if(!isRoot() && ( visitor.m_matchCount < aLimitCount || aLimitCount < 0) ) + { + visitor.SetWorld ( m_root, this ); + m_root->m_index->Query(aItem, m_maxClearance, visitor); + } + + return aObstacles.size(); +} + +PNS_NODE::OptObstacle PNS_NODE::NearestObstacle( const PNS_LINE *aItem, int aKindMask) +{ + Obstacles obs_list; + bool found_isects = false; + + const SHAPE_LINE_CHAIN &line = aItem->GetCLine(); + + obs_list.reserve(100); + + int n = 0; + for(int i = 0; i < line.SegmentCount(); i++) + { + const PNS_SEGMENT s ( *aItem, line.CSegment(i)); + n += QueryColliding ( &s, obs_list, aKindMask ); + } + + if( aItem->EndsWithVia () ) + n += QueryColliding ( &aItem->GetVia(), obs_list, aKindMask ); + + //if(! QueryColliding ( aItem, obs_list, aKindMask )) + if(!n) + return OptObstacle(); + + PNS_LINE& aLine = (PNS_LINE&) *aItem; + + PNS_OBSTACLE nearest; + nearest.item = NULL; + nearest.dist_first = INT_MAX; + + BOOST_FOREACH(PNS_OBSTACLE obs, obs_list) + { + VECTOR2I ip_first, ip_last; + int dist_max = INT_MIN; + + vector isect_list; + + int clearance = GetClearance(obs.item, &aLine); + + SHAPE_LINE_CHAIN hull = obs.item->Hull ( clearance ); + + if(aLine.EndsWithVia()) + { + int clearance = GetClearance(obs.item, &aLine.GetVia()); + + SHAPE_LINE_CHAIN viaHull = aLine.GetVia().Hull (clearance); + + viaHull.Intersect(hull, isect_list); + + BOOST_FOREACH(SHAPE_LINE_CHAIN::Intersection isect, isect_list) + { + + int dist = aLine.GetCLine().Length() + (isect.p - aLine.GetVia().GetPos()).EuclideanNorm(); + + if(dist < nearest.dist_first) + { + found_isects = true; + nearest.dist_first = dist; + nearest.ip_first = isect.p; + nearest.item = obs.item; + nearest.hull = hull; + } + + if(dist > dist_max) + { + dist_max = dist; + ip_last = isect.p; + } + } + } + + isect_list.clear(); + + hull.Intersect(aLine.GetCLine(), isect_list); + + BOOST_FOREACH(SHAPE_LINE_CHAIN::Intersection isect, isect_list) + { + + int dist = aLine.GetCLine().PathLength(isect.p); + + if(dist < nearest.dist_first) + { + found_isects = true; + nearest.dist_first = dist; + nearest.ip_first = isect.p; + nearest.item = obs.item; + nearest.hull = hull; + } + + if(dist > dist_max) + { + dist_max = dist; + ip_last = isect.p; + } + + } + + nearest.ip_last = ip_last; + nearest.dist_last = dist_max; + } + + return found_isects ? nearest : OptObstacle(); +} + +PNS_NODE::OptObstacle PNS_NODE::CheckColliding( const PNS_ITEM *aItemA, int aKindMask ) +{ + Obstacles obs; + obs.reserve(100); + + if(aItemA->GetKind() == PNS_ITEM::LINE) + { + int n = 0; + const PNS_LINE *line = static_cast(aItemA); + const SHAPE_LINE_CHAIN &l = line->GetCLine(); + + for(int i = 0; i < l.SegmentCount(); i++) + { + const PNS_SEGMENT s ( *line, l.CSegment(i)); + n += QueryColliding ( &s, obs, aKindMask, 1 ); + if(n) + return OptObstacle(obs[0]); + } + + if( line->EndsWithVia () ) + { + n += QueryColliding ( &line->GetVia(), obs, aKindMask, 1 ); + if(n) + return OptObstacle(obs[0]); + } + + } else if (QueryColliding(aItemA, obs, aKindMask, 1) > 0) + return OptObstacle(obs[0]); + return OptObstacle(); +} + +bool PNS_NODE::CheckColliding( const PNS_ITEM *aItemA, const PNS_ITEM *aItemB, int aKindMask ) +{ + Obstacles dummy; + + assert(aItemB); + // return QueryColliding(aItemA, dummy, aKindMask, 1) > 0; + + return aItemA->Collide(aItemB, GetClearance(aItemA, aItemB)); +} + +struct hitVisitor { + PNS_ITEMSET& m_items; + const VECTOR2I& m_point; + PNS_NODE *m_world; + + hitVisitor( PNS_ITEMSET& aTab, + const VECTOR2I& aPoint, + PNS_NODE *aWorld ) + : m_items(aTab), m_point(aPoint), m_world(aWorld) { }; + + bool operator()( PNS_ITEM *aItem ) { + SHAPE_CIRCLE cp (m_point, 0); + + int cl = 0; + if(aItem->GetKind() == PNS_ITEM::SEGMENT) + cl += static_cast(aItem)->GetWidth() / 2; + + if(aItem->GetShape()->Collide(&cp, cl)) + m_items.Add(aItem); + return true; + } +}; + +const PNS_ITEMSET PNS_NODE::HitTest( const VECTOR2I& aPoint ) +{ + PNS_ITEMSET items; + SHAPE_CIRCLE s (aPoint, 0); // fixme: we treat a point as an infinitely small circle - this is inefficient. + hitVisitor visitor ( items, aPoint, this ); + + m_index->Query(&s, m_maxClearance, visitor); + + if( ! isRoot() ) // fixme: could be made cleaner + { + PNS_ITEMSET items_root; + hitVisitor visitor_root ( items_root, aPoint, m_root ); + m_root->m_index->Query( &s, m_maxClearance, visitor_root ); + + BOOST_FOREACH(PNS_ITEM *item, items_root.Items()) + { + if (!overrides(item)) + items.Add(item); + } + } + + return items; +} + +void PNS_NODE::addSolid(PNS_SOLID *aSolid) +{ + linkJoint( aSolid->GetCenter(), aSolid->GetLayers(), aSolid->GetNet(), aSolid ); + m_index->Add(aSolid); +} + +void PNS_NODE::addVia(PNS_VIA *aVia) +{ + linkJoint( aVia->GetPos(), aVia->GetLayers(), aVia->GetNet(), aVia ); + m_index->Add(aVia); +} + +void PNS_NODE::addLine( PNS_LINE *aLine ) +{ + const SHAPE_LINE_CHAIN& l = aLine->GetLine(); + + for(int i = 0; i < l.SegmentCount(); i++) + { + SEG s = l.CSegment(i); + + if(s.a != s.b) + { + PNS_SEGMENT *pseg = new PNS_SEGMENT(*aLine, s); + + pseg->SetOwner(this); + + linkJoint( s.a, pseg->GetLayers(), aLine->GetNet(), pseg ); + linkJoint( s.b, pseg->GetLayers(), aLine->GetNet(), pseg ); + + aLine->LinkSegment(pseg); + + m_index->Add(pseg); + } + } +} + +void PNS_NODE::addSegment( PNS_SEGMENT *aSeg ) +{ + if(aSeg->GetSeg().a == aSeg->GetSeg().b) + { + TRACEn(0, "attempting to add a segment with same end coordinates, ignoring.") + return; + } + + aSeg->SetOwner (this); + + linkJoint( aSeg->GetSeg().a, aSeg->GetLayers(), aSeg->GetNet(), aSeg ); + linkJoint( aSeg->GetSeg().b, aSeg->GetLayers(), aSeg->GetNet(), aSeg ); + + m_index->Add(aSeg); +} + +void PNS_NODE::Add(PNS_ITEM* aItem) +{ + + aItem->SetOwner(this); + + switch(aItem -> GetKind()) + { + case PNS_ITEM::SOLID: + addSolid(static_cast(aItem)); + break; + + case PNS_ITEM::SEGMENT: + addSegment(static_cast(aItem)); + break; + + case PNS_ITEM::LINE: + addLine( static_cast (aItem)); + break; + + case PNS_ITEM::VIA: + addVia (static_cast(aItem)); + break; + + default: + assert (false); + } +} + + +void PNS_NODE::doRemove ( PNS_ITEM *aItem ) +{ + // case 1: removing an item that is stored in the root node from any branch: mark it as overridden, but do not remove + if( aItem->BelongsTo(m_root) && !isRoot() ) + m_override.insert(aItem); + + // case 2: the item belongs to this branch or a parent, non-root branch, or the root itself and we are the root: remove from the index + else if( !aItem->BelongsTo(m_root) || isRoot() ) + m_index->Remove( aItem ); + + // the item belongs to this particular branch: un-reference it + if( aItem->BelongsTo( this )) + aItem->SetOwner(NULL); +} + +void PNS_NODE::removeSegment (PNS_SEGMENT *aSeg ) +{ + unlinkJoint(aSeg->GetSeg().a, aSeg->GetLayers(), aSeg->GetNet(), aSeg); + unlinkJoint(aSeg->GetSeg().b, aSeg->GetLayers(), aSeg->GetNet(), aSeg); + + doRemove(aSeg); +} + +void PNS_NODE::removeLine( PNS_LINE *aLine ) +{ + vector *segRefs = aLine->GetLinkedSegments(); + + if(!segRefs) + return; + + assert ( aLine->GetOwner () ); + + BOOST_FOREACH(PNS_SEGMENT *seg, *segRefs) + { + removeSegment(seg); + } + + aLine->SetOwner(NULL); +} + +void PNS_NODE::removeVia ( PNS_VIA *aVia ) +{ + unlinkJoint(aVia->GetPos(), aVia->GetLayers(), aVia->GetNet(), aVia); + + doRemove(aVia); +} + +void PNS_NODE::Replace(PNS_ITEM *aOldItem, PNS_ITEM *aNewItem) +{ + Remove(aOldItem); + Add(aNewItem); +} + +void PNS_NODE::Remove(PNS_ITEM *aItem) +{ + + switch(aItem -> GetKind()) + { + case PNS_ITEM::SOLID: + assert(false); + break; + case PNS_ITEM::SEGMENT: + removeSegment(static_cast(aItem)); + break; + case PNS_ITEM::LINE: + removeLine(static_cast(aItem)); + break; + case PNS_ITEM::VIA: + removeVia(static_cast(aItem)); + break; + + default: + break; + } +} + +void PNS_NODE::followLine(PNS_SEGMENT *current, bool scanDirection, int& pos, int limit, VECTOR2I *corners, PNS_SEGMENT **segments) +{ + bool prevReversed = false; + + for(;;) + { + const VECTOR2I p = (scanDirection ^ prevReversed) ? current->GetSeg().b : current->GetSeg().a; + const OptJoint jt = FindJoint(p, current->GetLayer(), current->GetNet()); + + assert (jt); + assert (pos > 0 && pos < limit); + + corners [pos] = jt->GetPos(); + segments [pos] = current; + + pos += (scanDirection ? 1 : -1); + + if(!jt->IsLineCorner()) + break; + + current = jt->NextSegment( current ); + prevReversed = (jt->GetPos() == (scanDirection ? current->GetSeg().b : current->GetSeg().a )); + } +} + +PNS_LINE *PNS_NODE::AssembleLine(PNS_SEGMENT *aSeg, const OptJoint& a, const OptJoint& b) +{ + const int MaxVerts = 1024; + + VECTOR2I corners [ MaxVerts + 1 ]; + PNS_SEGMENT *segs [ MaxVerts + 1 ]; + + PNS_LINE *pl = new PNS_LINE; + int i_start = MaxVerts/2, i_end = i_start + 1; + + pl->SetWidth( aSeg->GetWidth() ); + pl->SetLayers( aSeg->GetLayers() ); + pl->SetNet ( aSeg->GetNet() ); + pl->SetOwner(this); + + //pl->LinkSegment(aSeg); + + followLine (aSeg, false, i_start, MaxVerts, corners, segs ); + followLine (aSeg, true, i_end, MaxVerts, corners, segs ); + + + int clip_start = -1, clip_end = -1; + for(int i = i_start+1 ; i < i_end ; i++) + { + const VECTOR2I &p = corners[i]; + + if (a && (p == a->GetPos() || p == b->GetPos() ) ) + { + clip_start = std::min(clip_start, i); + clip_end = std::max(clip_end, i); + } + + pl->GetLine().Append(p); + if(segs[i-1] != segs[i]) + pl->LinkSegment(segs[i]); + } + + return pl; +} + +void PNS_NODE::FindLineEnds (PNS_LINE *aLine, PNS_JOINT& a, PNS_JOINT& b ) +{ + a = *FindJoint(aLine->GetCLine().CPoint(0), aLine->GetLayers().Start(), aLine->GetNet()); + b = *FindJoint(aLine->GetCLine().CPoint(-1), aLine->GetLayers().Start(), aLine->GetNet()); +} + + +int PNS_NODE::FindLinesBetweenJoints( PNS_JOINT& a, PNS_JOINT& b, vector &aLines ) +{ + BOOST_FOREACH(PNS_ITEM *item, a.GetLinkList()) + { + if(item->GetKind() == PNS_ITEM::SEGMENT) + { + PNS_SEGMENT *seg = static_cast(item); + PNS_LINE *line = AssembleLine(seg); + + PNS_JOINT j_start, j_end; + FindLineEnds( line, j_start, j_end ); + if( (j_start == a && j_end == b )|| (j_end == a && j_start == b)) + aLines.push_back(line); + else + delete line; + } + } + return 0; +} + +const PNS_NODE::OptJoint PNS_NODE::FindJoint(const VECTOR2I &aPos, int aLayer, int aNet ) +{ + PNS_JOINT::HashTag tag; + + tag.net = aNet; + tag.pos = aPos; + + JointMap::iterator f = m_joints.find(tag), end = m_joints.end(); + + if(f == end && !isRoot()) + { + end = m_root->m_joints.end(); + f = m_root->m_joints.find(tag); //m_root->FindJoint(aPos, aLayer, aNet); + } + + if(f == end) + return OptJoint(); + + while (f != end) + { + if(f->second.GetLayers().Overlaps(aLayer)) + return f->second; + ++f; + } + return OptJoint(); +} + +PNS_JOINT& PNS_NODE::touchJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aNet ) +{ + PNS_JOINT::HashTag tag; + + tag.pos = aPos; + tag.net = aNet; + + // try to find the joint in this node. + JointMap::iterator f = m_joints.find(tag); + + pair range; + + // not found and we are not root? find in the root and copy results here. + if(f == m_joints.end() && !isRoot()) + { + range = m_root->m_joints.equal_range(tag); + for( f = range.first; f != range.second; ++f) + m_joints.insert( *f ); + } + + // now insert and combine overlapping joints + PNS_JOINT jt (aPos, aLayers, aNet); + + bool merged; + + do + { + merged = false; + range = m_joints.equal_range(tag); + + if(range.first == m_joints.end()) + break; + + for(f = range.first; f != range.second; ++f) + { + if(aLayers.Overlaps (f->second.GetLayers())) + { + jt.Merge(f->second); + m_joints.erase(f); + merged = true; + break; + } + } + } while (merged); + + return m_joints.insert ( TagJointPair(tag, jt) )->second; +} + +void PNS_JOINT::Dump() const +{ + printf("joint layers %d-%d, net %d, pos %s, links: %d\n", m_layers.Start(), m_layers.End(), m_tag.net, m_tag.pos.Format().c_str(), LinkCount() ); +} + + +void PNS_NODE::linkJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aNet, PNS_ITEM *aWhere ) +{ + PNS_JOINT& jt = touchJoint( aPos, aLayers, aNet ); + jt.Link(aWhere); +} + +void PNS_NODE::unlinkJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aNet, PNS_ITEM *aWhere ) +{ + // fixme: remove dangling joints + PNS_JOINT& jt = touchJoint( aPos, aLayers, aNet ); + jt.Unlink(aWhere); +} + + +void PNS_NODE::Dump(bool aLong) +{ +#if 0 + boost::unordered_set all_segs; + SHAPE_INDEX_LIST::iterator i; + + for(i = m_items.begin(); i != m_items.end() ; i++) + { + if((*i)->GetKind() == PNS_ITEM::SEGMENT) + all_segs.insert(static_cast(*i)); + } + + if(!isRoot()) + for(i = m_root->m_items.begin(); i != m_root->m_items.end() ; i++) + { + if((*i)->GetKind() == PNS_ITEM::SEGMENT && !overrides(*i)) + all_segs.insert(static_cast(*i)); + } + + + JointMap::iterator j; + if(aLong) + for(j=m_joints.begin(); j!=m_joints.end(); ++j) + { + printf("joint : %s, links : %d\n", j->second.GetPos().Format().c_str(), j->second.LinkCount()); + PNS_JOINT::LinkedItems::const_iterator k; + for(k = j->second.GetLinkList().begin(); k != j->second.GetLinkList().end(); ++k) + { + const PNS_ITEM *item = *k; + + switch(item->GetKind()) + { + case PNS_ITEM::SEGMENT: + { + const PNS_SEGMENT *seg = static_cast(item); + printf(" -> seg %s %s\n", seg->GetSeg().a.Format().c_str(), seg->GetSeg().b.Format().c_str()); + break; + } + default: + break; + } + } + } + + int lines_count = 0; + while(!all_segs.empty()) + { + PNS_SEGMENT *s = *all_segs.begin(); + PNS_LINE *l = AssembleLine(s); + + PNS_LINE::LinkedSegments* seg_refs = l->GetLinkedSegments(); + + if(aLong) + printf("Line: %s, net %d ", l->GetLine().Format().c_str(), l->GetNet() ); + + + for(vector::iterator j = seg_refs->begin(); j != seg_refs->end(); ++j) + { + printf("%s ", (*j)->GetSeg().a.Format().c_str() ); + if(j+1 == seg_refs->end()) + printf("%s\n", (*j)->GetSeg().b.Format().c_str() ); + all_segs.erase(*j); + } + lines_count++; + } + + printf("Local joints: %d, lines : %d \n", m_joints.size(), lines_count); +#endif +} + +void PNS_NODE::GetUpdatedItems( ItemVector& aRemoved, ItemVector& aAdded) +{ + aRemoved.reserve(m_override.size()); + aAdded.reserve(m_index->Size()); + + if(isRoot ()) + return; + + BOOST_FOREACH(PNS_ITEM *item, m_override) + aRemoved.push_back(item); + + for(PNS_INDEX::ItemSet::iterator i = m_index->begin(); i!=m_index->end(); ++i) + aAdded.push_back(*i); +} + +void PNS_NODE::releaseChildren () +{ + // copy the kids as the PNS_NODE destructor erases the item from the parent node. + vector kids = m_children; + + BOOST_FOREACH(PNS_NODE *node, kids) + { + node->releaseChildren(); + delete node; + } +} + +void PNS_NODE::Commit( PNS_NODE *aNode ) +{ + + if(aNode->isRoot()) + return; + + BOOST_FOREACH( PNS_ITEM *item, aNode->m_override ) + Remove(item); + + for(PNS_INDEX::ItemSet::iterator i = aNode->m_index->begin(); i!= aNode ->m_index->end(); ++i) + Add(*i); + + releaseChildren(); +} + +void PNS_NODE::KillChildren() +{ + assert (isRoot()); + + releaseChildren(); +} + + + +void PNS_NODE::AllItemsInNet ( int aNet, std::list& aItems) +{ + PNS_INDEX::NetItemsList* l_cur = m_index->GetItemsForNet ( aNet ); + + if(!l_cur) + return; + + std::copy(aItems.begin(), l_cur->begin(), l_cur->end() ); + if( !isRoot () ) + { + PNS_INDEX::NetItemsList* l_root = m_root->m_index->GetItemsForNet ( aNet ); + + for(PNS_INDEX::NetItemsList::iterator i = l_root->begin(); i!= l_root->end(); ++i) + if( !overrides( *i )) + aItems.push_back(*i); + } +} diff --git a/pcbnew/router/pns_node.h b/pcbnew/router/pns_node.h new file mode 100644 index 0000000000..25056cbd02 --- /dev/null +++ b/pcbnew/router/pns_node.h @@ -0,0 +1,260 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ +#ifndef __PNS_NODE_H +#define __PNS_NODE_H + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include "pns_item.h" +#include "pns_joint.h" +#include "pns_itemset.h" + +class PNS_SEGMENT; +class PNS_LINE; +class PNS_SOLID; +class PNS_VIA; +class PNS_RATSNEST; +class PNS_INDEX; + +using boost::shared_ptr; + +class PNS_CLEARANCE_FUNC { + public: + virtual int operator() ( const PNS_ITEM *a , const PNS_ITEM *b) = 0; +}; + +/** + * Struct PNS_OBSTACLE + * + * Holds an object colliding with another object, along with + * some useful data about the collision. + **/ +struct PNS_OBSTACLE +{ + ///> Item we search collisions with + PNS_ITEM *head; + + ///> Item found to be colliding with head + PNS_ITEM *item; + + ///> Hull of the colliding item + SHAPE_LINE_CHAIN hull; + + ///> First and last intersection point between the head item and the hull of the + //// colliding item + VECTOR2I ip_first, ip_last; + + ///> ... and the distance thereof + int dist_first, dist_last; +}; + +/** + * Class PNS_NODE + * + * Keeps the router "world" - i.e. all the tracks, vias, solids in a hierarchical and indexed way. + * Features: + * - spatial-indexed container for PCB item shapes + * - collision search (with clearance checking) + * - assembly of lines connecting joints, finding loops and unique paths + * - lightweight cloning/branching (for recursive optimization and shove springback) + **/ + +class PNS_NODE { + +public: + + typedef boost::optional OptObstacle; + typedef std::vector ItemVector; + typedef std::vector Obstacles; + typedef boost::optional OptJoint; + + PNS_NODE (); + ~PNS_NODE (); + + ///> Returns the expected clearance between items a and b. + int GetClearance(const PNS_ITEM *a, const PNS_ITEM *b) const; + + ///> Returns the pre-set worst case clearance between any pair of items + int GetMaxClearance() const + { + return m_maxClearance; + } + + void SetMaxClearance( int aClearance ) + { + m_maxClearance = aClearance; + } + + void SetClearanceFunctor (PNS_CLEARANCE_FUNC *aFunc) + { + m_clearanceFunctor = aFunc; + } + + ///> Finds items that collide with aItem and stores collision information in aObstacles. + int QueryColliding( const PNS_ITEM* aItem, Obstacles& aObstacles, int aKindMask = PNS_ITEM::ANY, int aLimitCount = -1); + + ///> Finds the nearest item that collides with aItem. + OptObstacle NearestObstacle( const PNS_LINE *aItem, int aKindMask = PNS_ITEM::ANY); + + ///> Checks if the item collides with anything else in the world, and returns it if so. + OptObstacle CheckColliding ( const PNS_ITEM *aItem, int aKindMask = PNS_ITEM::ANY); + + ///> Checks if two items collide [deprecated]. + bool CheckColliding( const PNS_ITEM *aItemA, const PNS_ITEM *aItemB, int aKindMask = PNS_ITEM::ANY); + + ///> Hit detection + const PNS_ITEMSET HitTest( const VECTOR2I& aPoint ); + + void Add(PNS_ITEM *aItem); + void Remove(PNS_ITEM *aItem); + void Replace(PNS_ITEM *aOldItem, PNS_ITEM *aNewItem); + + ///> Creates a lightweight copy ("branch") of self. Note that if there are any branches + /// in use, their parents must NOT be deleted. + PNS_NODE *Branch(); + + ///> Assembles a line connecting two non-trivial joints the segment aSeg belongs to. + PNS_LINE *AssembleLine(PNS_SEGMENT *aSeg, const OptJoint& a = OptJoint(), const OptJoint& b = OptJoint()); + + ///> Dumps the contents and joints structure + void Dump(bool aLong = false); + + ///> Returns the number of joints + int JointCount() const + { + return m_joints.size(); + } + + ///> Returns the lists of items removed and added in this branch, with respect + ///> to the root. + void GetUpdatedItems( ItemVector& aRemoved, ItemVector& aAdded); + + ///> Copies the changes from a given branch (aNode) to the root. Called on + ///> a non-root branch will fail. + void Commit (PNS_NODE *aNode); + + ///> finds a joint at a given position, layer and nets + const OptJoint FindJoint(const VECTOR2I &aPos, int aLayer, int aNet); + + ///> finds all linest between a pair of joints. Used by the loop removal engine. + int FindLinesBetweenJoints( PNS_JOINT& a, PNS_JOINT& b, std::vector &aLines ); + + ///> finds the joints corresponding to the ends of line aLine + void FindLineEnds (PNS_LINE *aLine, PNS_JOINT& a, PNS_JOINT& b ); + + ///> finds all joints that have an (in)direct connection(s) (i.e. segments/vias) with the joint aJoint. + void FindConnectedJoints( const PNS_JOINT& aJoint, std::vector &aConnectedJoints ); + + ///> Destroys all child nodes. Applicable only to the root node. + void KillChildren(); + + void AllItemsInNet ( int aNet, std::list& aItems); + +private: + + struct obstacleVisitor; + typedef boost::unordered_multimap JointMap; + typedef JointMap::value_type TagJointPair; + + /// nodes are not copyable + PNS_NODE( const PNS_NODE& b); + PNS_NODE &operator=(const PNS_NODE& b); + + ///> tries to find matching joint and creates a new one if not found + PNS_JOINT& touchJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aNet ); + + ///> touches a joint and links it to an item + void linkJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aNet, PNS_ITEM *aWhere ); + + ///> unlinks an item from a joint + void unlinkJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aNet, PNS_ITEM *aWhere ); + + ///> helpers for adding/removing items + + void addSolid( PNS_SOLID *aSeg ); + void addSegment( PNS_SEGMENT *aSeg ); + void addLine( PNS_LINE *aLine ); + void addVia( PNS_VIA *aVia ); + void removeSolid( PNS_SOLID *aSeg ); + void removeLine( PNS_LINE *aLine ); + void removeSegment (PNS_SEGMENT *aSeg ); + void removeVia (PNS_VIA *aVia ); + + void doRemove( PNS_ITEM *aItem ); + void unlinkParent ( ); + void releaseChildren (); + + bool isRoot() const + { + return m_parent == NULL; + } + + ///> checks if this branch contains an updated version of the item from the root branch. + bool overrides ( PNS_ITEM * aItem ) const + { + return m_override.find(aItem) != m_override.end(); + } + + ///> scans the joint map, forming a line starting from segment (current). + void followLine(PNS_SEGMENT *current, bool scanDirection, int& pos, int limit, VECTOR2I *corners, PNS_SEGMENT **segments); + + ///> spatial index of all items + //SHAPE_INDEX_LIST m_items; + + ///> hash table with the joints, linking the items. Joints are hashed by their + ///> position, layer set and net. + JointMap m_joints; + + ///> node this node was branched from + PNS_NODE *m_parent; + + ///> root node of the whole hierarchy + PNS_NODE *m_root; + + ///> list of nodes branched from this one + std::vector m_children; + + ///> hash of root's items that are more recent in this node + boost::unordered_set m_override; + + ///> worst case item-item clearance + int m_maxClearance; + + ///> Clearance resolution functor + PNS_CLEARANCE_FUNC *m_clearanceFunctor; + + ///> Geometric/Net index of the items + PNS_INDEX *m_index; + + ///> list of currently processed obstacles. + Obstacles m_obstacleList; +}; + +#endif diff --git a/pcbnew/router/pns_optimizer.cpp b/pcbnew/router/pns_optimizer.cpp new file mode 100644 index 0000000000..7291fba1ce --- /dev/null +++ b/pcbnew/router/pns_optimizer.cpp @@ -0,0 +1,704 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ +#include + +#include +#include + +#include "pns_line.h" +#include "pns_node.h" +#include "pns_optimizer.h" +#include "pns_utils.h" + + +using namespace std; + +/** + +Cost Estimator Methods + +**/ + +int PNS_COST_ESTIMATOR::CornerCost( const SEG& a, const SEG& b) +{ + DIRECTION_45 dir_a(a), dir_b(b); + + switch(dir_a.Angle(dir_b)) + { + case DIRECTION_45::ANG_OBTUSE: + return 1; + case DIRECTION_45::ANG_STRAIGHT: + return 0; + case DIRECTION_45::ANG_ACUTE: + return 50; + case DIRECTION_45::ANG_RIGHT: + return 30; + case DIRECTION_45::ANG_HALF_FULL: + return 60; + default: + return 100; + } +} + +int PNS_COST_ESTIMATOR::CornerCost ( const SHAPE_LINE_CHAIN& aLine ) +{ + int total = 0; + for (int i = 0; i < aLine.SegmentCount() - 1; ++i) + total += CornerCost(aLine.CSegment(i), aLine.CSegment(i + 1)); + return total; +} + + +int PNS_COST_ESTIMATOR::CornerCost ( const PNS_LINE& aLine ) +{ + return CornerCost(aLine.GetCLine()); +} + +void PNS_COST_ESTIMATOR::Add(PNS_LINE &aLine) +{ + m_lengthCost += aLine.GetCLine().Length(); + m_cornerCost += CornerCost(aLine); +} + +void PNS_COST_ESTIMATOR::Remove(PNS_LINE &aLine) +{ + m_lengthCost -= aLine.GetCLine().Length(); + m_cornerCost -= CornerCost(aLine); +} + +void PNS_COST_ESTIMATOR::Replace(PNS_LINE &aOldLine, PNS_LINE& aNewLine) +{ + m_lengthCost -= aOldLine.GetCLine().Length(); + m_cornerCost -= CornerCost(aOldLine); + m_lengthCost += aNewLine.GetCLine().Length(); + m_cornerCost += CornerCost(aNewLine); +} + + +bool PNS_COST_ESTIMATOR::IsBetter( PNS_COST_ESTIMATOR& aOther, double aLengthTollerance, double aCornerTollerance ) const +{ + if(aOther.m_cornerCost < m_cornerCost && aOther.m_lengthCost < m_lengthCost) + return true; + else if(aOther.m_cornerCost < m_cornerCost * aCornerTollerance && aOther.m_lengthCost < m_lengthCost * aLengthTollerance) + return true; + + return false; +} + + +/** + +Optimizer + +**/ + + +PNS_OPTIMIZER::PNS_OPTIMIZER( PNS_NODE *aWorld ) : + m_world( aWorld ), m_collisionKindMask (PNS_ITEM::ANY), m_effortLevel(MERGE_SEGMENTS) + { + // m_cache = new SHAPE_INDEX_LIST(); + } + + +PNS_OPTIMIZER::~PNS_OPTIMIZER ( ) +{ + //delete m_cache; +} + + +struct PNS_OPTIMIZER::CacheVisitor +{ + + CacheVisitor( const PNS_ITEM * aOurItem, PNS_NODE *aNode, int aMask ) : + m_ourItem(aOurItem), + m_collidingItem(NULL), + m_node(aNode), + m_mask(aMask) + {}; + + bool operator() (PNS_ITEM *aOtherItem) + { + if(! m_mask & aOtherItem->GetKind()) + return true; + + int clearance = m_node->GetClearance(aOtherItem, m_ourItem); + + if(!aOtherItem->Collide(m_ourItem, clearance)) + return true; + + m_collidingItem = aOtherItem; + return false; + } + + const PNS_ITEM *m_ourItem; + PNS_ITEM *m_collidingItem; + PNS_NODE *m_node; + int m_mask; +}; + +void PNS_OPTIMIZER::cacheAdd( PNS_ITEM *aItem, bool aIsStatic = false) +{ + if(m_cacheTags.find(aItem) != m_cacheTags.end()) + return; + + m_cache.Add(aItem); + m_cacheTags[aItem].hits = 1; + m_cacheTags[aItem].isStatic = aIsStatic; +} + +void PNS_OPTIMIZER::removeCachedSegments (PNS_LINE *aLine, int aStartVertex, int aEndVertex) +{ + std::vector *segs = aLine->GetLinkedSegments(); + + if(!segs) + return; + + if(aEndVertex < 0) + aEndVertex += aLine->GetCLine().PointCount(); + + for(int i = aStartVertex; i < aEndVertex - 1; i++) + { + PNS_SEGMENT *s = (*segs)[i]; + m_cacheTags.erase(s); + m_cache.Remove(s); + }//*cacheRemove( (*segs)[i] ); +} + +void PNS_OPTIMIZER::CacheRemove ( PNS_ITEM *aItem ) +{ + if(aItem->GetKind() == PNS_ITEM::LINE) + removeCachedSegments(static_cast (aItem)); +} + +void PNS_OPTIMIZER::CacheStaticItem (PNS_ITEM *aItem) +{ + cacheAdd(aItem, true); +} + +void PNS_OPTIMIZER::ClearCache( bool aStaticOnly ) +{ + if(!aStaticOnly) + { + m_cacheTags.clear(); + m_cache.Clear(); + return; + } + + for(CachedItemTags::iterator i = m_cacheTags.begin(); i!= m_cacheTags.end(); ++i) + { + if(i->second.isStatic) + { + m_cache.Remove(i->first); + m_cacheTags.erase(i->first); + } + } +} + +bool PNS_OPTIMIZER::checkColliding ( PNS_ITEM *aItem, bool aUpdateCache ) +{ + CacheVisitor v(aItem, m_world, m_collisionKindMask); + + return m_world->CheckColliding(aItem); + + // something is wrong with the cache, need to investigate. + m_cache.Query(aItem->GetShape(), m_world->GetMaxClearance(), v, false); + + if(!v.m_collidingItem) + { + PNS_NODE::OptObstacle obs = m_world->CheckColliding(aItem); + + if(obs) { + + if(aUpdateCache) + cacheAdd(obs->item); + return true; + } + } else { + m_cacheTags[v.m_collidingItem].hits++; + return true; + } + + return false; +} + +bool PNS_OPTIMIZER::checkColliding( PNS_LINE *aLine, const SHAPE_LINE_CHAIN& aOptPath ) +{ + PNS_LINE tmp(*aLine, aOptPath); + return checkColliding(&tmp); +} + +bool PNS_OPTIMIZER::mergeObtuse (PNS_LINE *aLine) +{ + SHAPE_LINE_CHAIN &line = aLine->GetLine(); + + int step = line.PointCount() - 3; + int iter = 0; + int segs_pre = line.SegmentCount(); + + if(step < 0) + return false; + + SHAPE_LINE_CHAIN current_path (line); + + while(1) + { + iter++; + int n_segs = current_path.SegmentCount(); + int max_step = n_segs - 2; + if(step > max_step) + step = max_step; + + if(step < 2) + { + line = current_path; + return current_path.SegmentCount() < segs_pre; + } + + bool found_anything = false; + int n = 0; + + while (n < n_segs - step) + { + const SEG s1 = current_path.CSegment(n); + const SEG s2 = current_path.CSegment(n + step); + SEG s1opt, s2opt; + + if (DIRECTION_45(s1).IsObtuse(DIRECTION_45(s2))) + { + VECTOR2I ip = *s1.IntersectLines(s2); + + if(s1.Distance(ip) <= 1 || s2.Distance(ip) <= 1) + { + s1opt = SEG(s1.a, ip); + s2opt = SEG(ip, s2.b); + } else { + s1opt = SEG(s1.a, ip); + s2opt = SEG(ip, s2.b); + } + + + if (DIRECTION_45(s1opt).IsObtuse(DIRECTION_45(s2opt))) + { + SHAPE_LINE_CHAIN opt_path; + opt_path.Append(s1opt.a); + opt_path.Append(s1opt.b); + opt_path.Append(s2opt.b); + + PNS_LINE opt_track (*aLine, opt_path); + + if(!checkColliding(&opt_track)) + { + current_path.Replace(s1.Index() + 1, s2.Index(), ip); + //removeCachedSegments(aLine, s1.Index(), s2.Index()); + n_segs = current_path.SegmentCount(); + found_anything = true; + break; + } + } + } + n++; + } + + if(!found_anything) + { + if( step <= 2 ) + { + line = current_path; + return line.SegmentCount() < segs_pre; + } + step --; + } + } + return line.SegmentCount() < segs_pre; +} + + +bool PNS_OPTIMIZER::mergeFull(PNS_LINE *aLine) +{ + SHAPE_LINE_CHAIN &line = aLine->GetLine(); + int step = line.SegmentCount() - 1; + + int segs_pre = line.SegmentCount(); + + line.Simplify(); + + if(step < 0) + return false; + + SHAPE_LINE_CHAIN current_path (line); + + while(1) + { + int n_segs = current_path.SegmentCount(); + int max_step = n_segs - 2; + + if(step > max_step) + step = max_step; + + if(step < 1) + break; + + bool found_anything = mergeStep(aLine, current_path, step); + + if(!found_anything) + step --; + + + } + + aLine->SetShape(current_path); + + return current_path.SegmentCount() < segs_pre; +} + +bool PNS_OPTIMIZER::Optimize ( PNS_LINE *aLine, PNS_LINE *aResult , int aStartVertex , int aEndVertex ) +{ + if(!aResult) + aResult = aLine; + else + *aResult = *aLine; + + m_keepPostures = false; + + bool rv = false; + if(m_effortLevel & MERGE_SEGMENTS) + rv |= mergeFull(aResult); + if(m_effortLevel & MERGE_OBTUSE) + rv |= mergeObtuse(aResult); + if(m_effortLevel & SMART_PADS) + rv |= runSmartPads(aResult); + + return rv; +} + + +bool PNS_OPTIMIZER::mergeStep ( PNS_LINE *aLine, SHAPE_LINE_CHAIN& aCurrentPath, int step ) +{ + int n = 0; + int n_segs = aCurrentPath.SegmentCount(); + + int cost_orig = PNS_COST_ESTIMATOR::CornerCost(aCurrentPath); + + + if(aLine->GetCLine().SegmentCount() < 4) + return false; + + DIRECTION_45 orig_start (aLine->GetCLine().CSegment(0)); + DIRECTION_45 orig_end (aLine->GetCLine().CSegment(-1)); + + while (n < n_segs - step ) + { + const SEG s1 = aCurrentPath.CSegment(n); + const SEG s2 = aCurrentPath.CSegment(n + step); + + SHAPE_LINE_CHAIN path[2], *picked = NULL; + int cost[2]; + + for(int i = 0; i < 2; i++) + { + bool postureMatch = true; + SHAPE_LINE_CHAIN bypass = DIRECTION_45().BuildInitialTrace(s1.a, s2.b, i); + cost[i] = INT_MAX; + + + if ( n == 0 && orig_start != DIRECTION_45( bypass.CSegment(0) ) ) + postureMatch = false; + else if (n == n_segs-step && orig_end != DIRECTION_45( bypass.CSegment(-1))) + postureMatch = false; + + if((postureMatch || !m_keepPostures) && !checkColliding(aLine, bypass)) + { + path[i] = aCurrentPath; + path[i].Replace(s1.Index(), s2.Index(), bypass); + path[i].Simplify(); + cost[i] = PNS_COST_ESTIMATOR::CornerCost(path[i]); + } + } + + if(cost[0] < cost_orig && cost[0] < cost[1]) + picked = &path[0]; + else if (cost[1] < cost_orig) + picked = &path[1]; + + if(picked) + { + n_segs = aCurrentPath.SegmentCount(); + aCurrentPath = *picked; + return true; + } + n++; + } + + return false; +} + +PNS_OPTIMIZER::BreakoutList PNS_OPTIMIZER::circleBreakouts( int aWidth, const SHAPE *aShape, bool aPermitDiagonal ) const +{ + BreakoutList breakouts; + + for(int angle = 0; angle < 360; angle += 45) + { + const SHAPE_CIRCLE *cir = static_cast (aShape); + SHAPE_LINE_CHAIN l; + VECTOR2I p0 = cir->GetCenter (); + VECTOR2I v0 (cir->GetRadius() * M_SQRT2, 0); + l.Append ( p0 ); + l.Append ( p0 + v0.Rotate ( angle * M_PI / 180.0 ) ); + breakouts.push_back(l); + } + return breakouts; +} + + +PNS_OPTIMIZER::BreakoutList PNS_OPTIMIZER::rectBreakouts( int aWidth, const SHAPE *aShape, bool aPermitDiagonal ) const +{ + const SHAPE_RECT *rect = static_cast(aShape); + VECTOR2I s = rect->GetSize(), c = rect->GetPosition() + VECTOR2I (s.x / 2, s.y / 2); + BreakoutList breakouts; + + VECTOR2I d_offset; + + d_offset.x = (s.x > s.y) ? (s.x - s.y) / 2 : 0; + d_offset.y = (s.x < s.y) ? (s.y - s.x) / 2 : 0; + + VECTOR2I d_vert = VECTOR2I ( 0, s.y / 2 + aWidth); + VECTOR2I d_horiz = VECTOR2I ( s.x / 2 + aWidth, 0); + + + breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c + d_horiz ) ); + breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c - d_horiz ) ); + breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c + d_vert ) ); + breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c - d_vert ) ); + + if(aPermitDiagonal) + { + int l = aWidth + std::min(s.x, s.y) / 2; + VECTOR2I d_diag ; + + if(s.x >= s.y) + { + breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c + d_offset, c + d_offset + VECTOR2I(l, l))); + breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c + d_offset, c + d_offset - VECTOR2I(-l, l))); + breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c - d_offset, c - d_offset + VECTOR2I(-l, l))); + breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c - d_offset, c - d_offset - VECTOR2I(l, l))); + } else { + // fixme: this could be done more efficiently + breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c + d_offset, c + d_offset + VECTOR2I(l, l))); + breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c - d_offset, c - d_offset - VECTOR2I(-l, l))); + breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c + d_offset, c + d_offset + VECTOR2I(-l, l))); + breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c - d_offset, c - d_offset - VECTOR2I(l, l))); + + } + } + + return breakouts; +} + + + +PNS_OPTIMIZER::BreakoutList PNS_OPTIMIZER::computeBreakouts( int aWidth, const PNS_ITEM *aItem, bool aPermitDiagonal ) const +{ + switch(aItem->GetKind()) + { + case PNS_ITEM::VIA: + { + const PNS_VIA *via = static_cast (aItem); + return circleBreakouts ( aWidth, via->GetShape(), aPermitDiagonal ); + } + + case PNS_ITEM::SOLID: + { + const SHAPE *shape = aItem->GetShape(); + switch(shape->Type()) + { + case SH_RECT: + return rectBreakouts (aWidth, shape, aPermitDiagonal); + case SH_CIRCLE: + return circleBreakouts (aWidth, shape, aPermitDiagonal); + default: + break; + } + } + default: + break; + } + return BreakoutList(); +} + +PNS_ITEM *PNS_OPTIMIZER::findPadOrVia ( int aLayer, int aNet, const VECTOR2I& aP) const +{ + PNS_NODE::OptJoint jt = m_world->FindJoint ( aP, aLayer, aNet ); + if(!jt) + return NULL; + + BOOST_FOREACH (PNS_ITEM *item, jt->GetLinkList() ) + { + if(item->GetKind() == PNS_ITEM::VIA || item->GetKind() == PNS_ITEM::SOLID) + return item; + } + return NULL; +} + +int PNS_OPTIMIZER::smartPadsSingle( PNS_LINE *aLine, PNS_ITEM *aPad, bool aEnd, int aEndVertex ) +{ + int min_cost = INT_MAX;//PNS_COST_ESTIMATOR::CornerCost( line ); + int min_len = INT_MAX; + DIRECTION_45 dir; + + const int ForbiddenAngles = DIRECTION_45::ANG_ACUTE | DIRECTION_45::ANG_RIGHT | DIRECTION_45::ANG_HALF_FULL | DIRECTION_45::ANG_UNDEFINED; + + typedef pair RtVariant; + vector variants; + + BreakoutList breakouts = computeBreakouts( aLine->GetWidth(), aPad, true ); + + SHAPE_LINE_CHAIN line = (aEnd ? aLine->GetCLine().Reverse() : aLine->GetCLine()); + + //bool startDiagonal = DIRECTION_45( line.CSegment(0) ).IsDiagonal(); + + int p_end = min (aEndVertex, min (3 , line.PointCount() - 1)); + + for (int p = 1; p <= p_end; p++) + { + BOOST_FOREACH(SHAPE_LINE_CHAIN& l, breakouts) + { + //PNSDisplayDebugLine (l, 0); + + + for(int diag = 0; diag < 2; diag++) + { + SHAPE_LINE_CHAIN v; + SHAPE_LINE_CHAIN connect = dir.BuildInitialTrace( l.CPoint(-1), line.CPoint(p), diag == 0); + + DIRECTION_45 dir_bkout ( l.CSegment(-1 )); + //DIRECTION_45 dir_head ( line.CSegment(p + 1)); + + int ang1 = dir_bkout.Angle ( DIRECTION_45(connect.CSegment(0) )); + int ang2 = 0; + //int ang2 = dir_head.Angle ( DIRECTION_45(connect.CSegment(-1) )); + + if( (ang1 | ang2) & ForbiddenAngles ) + continue; + + if(l.Length() > line.Length()) + continue; + + v = l; + + v.Append ( connect ); + + for(int i = p + 1; i < line.PointCount(); i++) + v.Append( line.CPoint(i) ); + + PNS_LINE tmp(*aLine, v); + //tmp.GetLine().Simplify(); + int cc = tmp.CountCorners(ForbiddenAngles); + + if(cc == 0) + { + RtVariant vp; + vp.first = p; + vp.second = aEnd ? v.Reverse() : v; + vp.second.Simplify(); + variants.push_back(vp); + } + + } + } + } + + SHAPE_LINE_CHAIN l_best; + bool found = false; + int p_best = -1; + + BOOST_FOREACH(RtVariant& vp, variants) + { + PNS_LINE tmp (*aLine, vp.second); + int cost = PNS_COST_ESTIMATOR::CornerCost(vp.second); + int len = vp.second.Length(); + + if(!checkColliding(&tmp)) + { + + +/* if(aEnd) + PNSDisplayDebugLine (l_best, 6); + else + PNSDisplayDebugLine (l_best, 5);*/ + + if(cost < min_cost || (cost == min_cost && len < min_len)) + { + l_best = vp.second; + p_best = vp.first; + found = true; + + //if(cost == min_cost) + if(cost == min_cost) + min_len = std::min(len, min_len); + min_cost = std::min(cost, min_cost); + } + + } + } + + if(found) + { +// printf("end: %d, p-best: %d, p-end: %d, p-total: %d\n", aEnd, p_best, p_end, l_best.PointCount()); + +// if(!aEnd) +// PNSDisplayDebugLine (l_best, 5); +// else + + aLine->SetShape(l_best); + return p_best; + } + return -1; +} + +bool PNS_OPTIMIZER::runSmartPads(PNS_LINE *aLine) +{ + SHAPE_LINE_CHAIN& line = aLine->GetLine(); + + if (line.PointCount() < 3) + return false; + + VECTOR2I p_start = line.CPoint(0), p_end = line.CPoint(-1); + + PNS_ITEM *startPad = findPadOrVia( aLine->GetLayer(), aLine->GetNet(), p_start); + PNS_ITEM *endPad = findPadOrVia( aLine->GetLayer(), aLine->GetNet(), p_end); + + int vtx = -1; + + if(startPad) + vtx = smartPadsSingle(aLine, startPad, false, 3); + if(endPad) + smartPadsSingle(aLine, endPad, true, vtx < 0 ? line.PointCount() - 1 : line.PointCount() - 1 - vtx); + + aLine->GetLine().Simplify(); + return true; +} + +bool PNS_OPTIMIZER::Optimize ( PNS_LINE *aLine, int aEffortLevel, PNS_NODE *aWorld ) +{ + PNS_OPTIMIZER opt( aWorld ? aWorld : aLine->GetWorld() ); + opt.SetEffortLevel (aEffortLevel); + opt.SetCollisionMask(-1); + return opt.Optimize(aLine); +} diff --git a/pcbnew/router/pns_optimizer.h b/pcbnew/router/pns_optimizer.h new file mode 100644 index 0000000000..f090528273 --- /dev/null +++ b/pcbnew/router/pns_optimizer.h @@ -0,0 +1,164 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ +#ifndef __PNS_OPTIMIZER_H +#define __PNS_OPTIMIZER_H + +#include +#include + +#include +#include + +class PNS_NODE; +class PNS_LINE; +class PNS_ROUTER; + + +/** + * Class PNS_COST_ESTIMATOR + * + * Calculates the cost of a given line, taking corner angles and total length into account. + **/ + +class PNS_COST_ESTIMATOR +{ + public: + PNS_COST_ESTIMATOR(): + m_lengthCost (0), + m_cornerCost (0) + {}; + + PNS_COST_ESTIMATOR(const PNS_COST_ESTIMATOR &b): + m_lengthCost (b.m_lengthCost), + m_cornerCost (b.m_cornerCost) + {}; + + ~PNS_COST_ESTIMATOR() {}; + + static int CornerCost ( const SEG& a, const SEG& b); + static int CornerCost ( const SHAPE_LINE_CHAIN& aLine ); + static int CornerCost ( const PNS_LINE& aLine); + + void Add(PNS_LINE &aLine); + void Remove (PNS_LINE &aLine); + void Replace(PNS_LINE &aOldLine, PNS_LINE& aNewLine); + + bool IsBetter( PNS_COST_ESTIMATOR& aOther, double aLengthTollerance, double aCornerTollerace ) const; + + double GetLengthCost() const { return m_lengthCost; } + double GetCornerCost() const { return m_cornerCost; } + + private: + double m_lengthCost; + int m_cornerCost; +}; + +/** + * Class PNS_OPTIMIZER + * + * Performs various optimizations of the lines being routed, attempting to make the lines shorter + * and less cornery. There are 3 kinds of optimizations so far: + * - Merging obtuse segments (MERGE_OBTUSE): tries to join together as many + * obtuse segments as possible without causing collisions + * - Rerouting path between pair of line corners with a 2-segment "\__" line and iteratively repeating + * the procedure as long as the total cost of the line keeps decreasing + * - "Smart Pads" - that is, rerouting pad/via exits to make them look nice (SMART_PADS). + **/ + +class PNS_OPTIMIZER +{ + public: + + enum OptimizationEffort { + MERGE_SEGMENTS = 0x1, + SMART_PADS = 0x2, + MERGE_OBTUSE = 0x4 + }; + + PNS_OPTIMIZER( PNS_NODE *aWorld ); + ~PNS_OPTIMIZER(); + + ///> a quick shortcut to optmize a line without creating and setting up an optimizer + static bool Optimize ( PNS_LINE *aLine, int aEffortLevel, PNS_NODE *aWorld = NULL ); + + bool Optimize ( PNS_LINE *aLine, PNS_LINE *aResult = NULL, int aStartVertex = 0, int aEndVertex = -1); + + void SetWorld(PNS_NODE *aNode) { m_world = aNode; } + void CacheStaticItem (PNS_ITEM *aItem); + void CacheRemove( PNS_ITEM *aItem ); + void ClearCache( bool aStaticOnly = false ); + + void SetCollisionMask ( int aMask ) + { + m_collisionKindMask = aMask; + } + + void SetEffortLevel ( int aEffort ) + { + m_effortLevel = aEffort; + } + + private: + + static const int MaxCachedItems = 256; + + typedef std::vector BreakoutList; + + struct CacheVisitor; + + struct CachedItem + { + int hits; + bool isStatic; + }; + + bool mergeObtuse (PNS_LINE *aLine); + bool mergeFull (PNS_LINE *aLine); + bool removeUglyCorners (PNS_LINE *aLine); + bool runSmartPads(PNS_LINE *aLine); + bool mergeStep ( PNS_LINE *aLine, SHAPE_LINE_CHAIN& aCurrentLine, int step ); + + bool checkColliding( PNS_ITEM *aItem, bool aUpdateCache = true ); + bool checkColliding( PNS_LINE *aLine, const SHAPE_LINE_CHAIN& aOptPath ); + + + void cacheAdd( PNS_ITEM *aItem, bool aIsStatic ); + void removeCachedSegments (PNS_LINE *aLine, int aStartVertex = 0, int aEndVertex = -1); + + BreakoutList circleBreakouts( int aWidth, const SHAPE *aShape, bool aPermitDiagonal ) const; + BreakoutList rectBreakouts( int aWidth, const SHAPE *aShape, bool aPermitDiagonal ) const; + BreakoutList ovalBreakouts( int aWidth, const SHAPE *aShape, bool aPermitDiagonal ) const; + BreakoutList computeBreakouts( int aWidth, const PNS_ITEM *aItem, bool aPermitDiagonal ) const; + + int smartPadsSingle( PNS_LINE *aLine, PNS_ITEM *aPad, bool aEnd, int aEndVertex ); + + PNS_ITEM *findPadOrVia ( int aLayer, int aNet, const VECTOR2I& aP) const; + + SHAPE_INDEX_LIST m_cache; + + typedef boost::unordered_map CachedItemTags; + CachedItemTags m_cacheTags; + PNS_NODE *m_world; + int m_collisionKindMask; + int m_effortLevel; + bool m_keepPostures; +}; + +#endif diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp new file mode 100644 index 0000000000..720d4f06e0 --- /dev/null +++ b/pcbnew/router/pns_router.cpp @@ -0,0 +1,774 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ +#include +#include + +#include + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include "trace.h" +#include "pns_node.h" +#include "pns_line_placer.h" +#include "pns_line.h" +#include "pns_solid.h" +#include "pns_utils.h" +#include "pns_router.h" + +#include + +#include +#include +#include +#include +#include + +using namespace std; + +// an ugly singleton for drawing debug items within the router context. To be fixed sometime in the future. +static PNS_ROUTER *theRouter; + +class PCBNEW_CLEARANCE_FUNC : public PNS_CLEARANCE_FUNC +{ + public: + PCBNEW_CLEARANCE_FUNC( BOARD *aBoard ) + { + m_clearanceCache.resize(aBoard->GetNetCount()); + + for(unsigned int i = 0; i < aBoard->GetNetCount(); i++) + { + NETINFO_ITEM *ni = aBoard->FindNet(i); + wxString netClassName = ni->GetClassName(); + NETCLASS *nc = aBoard->m_NetClasses.Find(netClassName); + int clearance = nc->GetClearance(); + m_clearanceCache[i] = clearance; + TRACE(1, "Add net %d netclass %s clearance %d", i % netClassName.mb_str() % clearance); + } + + m_defaultClearance = 254000;//aBoard->m_NetClasses.Find ("Default clearance")->GetClearance(); + } + + int operator() (const PNS_ITEM *a , const PNS_ITEM *b) + { + int net_a = a->GetNet(); + int cl_a = (net_a >= 0 ? m_clearanceCache[net_a] : m_defaultClearance); + int net_b = b->GetNet(); + int cl_b = (net_b >= 0 ? m_clearanceCache[net_b] : m_defaultClearance); + return std::max(cl_a, cl_b); + } + + private: + + vector m_clearanceCache; + int m_defaultClearance; +}; + +PNS_ITEM *PNS_ROUTER::syncPad( D_PAD *aPad ) +{ + PNS_LAYERSET layers; + + switch(aPad->GetAttribute()) + { + case PAD_STANDARD: + layers = PNS_LAYERSET(0, 15); + break; + case PAD_SMD: + case PAD_CONN: + { + LAYER_MSK lmsk = aPad->GetLayerMask(); + int i; + + for(i = FIRST_COPPER_LAYER; i <= LAST_COPPER_LAYER; i++) + if( lmsk & (1<GetAttribute()); + return NULL; + } + + PNS_SOLID *solid = new PNS_SOLID; + + solid->SetLayers(layers); + solid->SetNet( aPad->GetNet() ); + wxPoint wx_c = aPad->GetPosition(); + wxSize wx_sz = aPad->GetSize(); + + VECTOR2I c(wx_c.x, wx_c.y); + VECTOR2I sz(wx_sz.x, wx_sz.y); + + solid->SetCenter( c ); + + + double orient = aPad->GetOrientation() / 10.0; + + if(orient == 90.0 || orient == 270.0) + sz = VECTOR2I(sz.y, sz.x); + else if (orient != 0.0 && orient != 180.0) + { + TRACEn(0, "non-orthogonal pad rotations not supported yet"); + delete solid; + return NULL; + } + + switch(aPad->GetShape()) + { + case PAD_CIRCLE: + solid->SetShape ( new SHAPE_CIRCLE ( c, sz.x / 2) ); + break; + case PAD_OVAL: + if(sz.x == sz.y) + solid->SetShape ( new SHAPE_CIRCLE ( c, sz.x / 2) ); + else + solid->SetShape ( new SHAPE_RECT ( c - sz / 2, sz.x, sz.y) ); + break; + + case PAD_RECT: + solid->SetShape ( new SHAPE_RECT ( c - sz / 2, sz.x, sz.y) ); + break; + + default: + TRACEn(0, "unsupported pad shape"); + delete solid; + return NULL; + } + + + solid->SetParent(aPad); + return solid; +} + +PNS_ITEM *PNS_ROUTER::syncTrack( TRACK *aTrack ) +{ + + PNS_SEGMENT *s = new PNS_SEGMENT( SEG (aTrack->GetStart(), aTrack->GetEnd() ), aTrack->GetNet() ); + + s->SetWidth( aTrack->GetWidth() ); + s->SetLayers (PNS_LAYERSET(aTrack->GetLayer())); + s->SetParent(aTrack); + return s; +} + + +PNS_ITEM *PNS_ROUTER::syncVia( SEGVIA *aVia ) +{ + PNS_VIA *v = new PNS_VIA( + aVia->GetPosition(), + PNS_LAYERSET(0, 15), + aVia->GetWidth(), + aVia->GetNet()); + + v->SetParent(aVia); + return v; +} + +void PNS_ROUTER::SetBoard( BOARD *aBoard ) +{ + m_board = aBoard; + TRACE(1, "m_board = %p\n", m_board); +} + +int PNS_ROUTER::NextCopperLayer( bool aUp ) +{ + LAYER_MSK mask = m_board->GetEnabledLayers() & m_board->GetVisibleLayers(); + LAYER_NUM l = m_currentLayer; + + do { + l += (aUp ? 1 : -1); + if(l > LAST_COPPER_LAYER) + l = FIRST_COPPER_LAYER; + + if(l < FIRST_COPPER_LAYER) + l = LAST_COPPER_LAYER; + + if(mask & GetLayerMask(l)) + return l; + + } while (l != m_currentLayer); + + return l; +} + +void PNS_ROUTER::SyncWorld() +{ + vector pads; + + if(!m_board) + { + TRACEn(0,"No board attached, aborting sync."); + return; + } + + ClearWorld(); + + + m_clearanceFunc = new PCBNEW_CLEARANCE_FUNC(m_board); + m_world = new PNS_NODE(); + m_world->SetClearanceFunctor ( m_clearanceFunc ); + m_world->SetMaxClearance ( 1000000 ); //m_board->GetBiggestClearanceValue()); + pads = m_board->GetPads(); + + BOOST_FOREACH( D_PAD *pad, pads ) + { + PNS_ITEM *solid = syncPad(pad); + if(solid) + m_world->Add(solid); + } + + for(TRACK *t = m_board->m_Track; t; t = t->Next()) + { + KICAD_T type = t->Type(); + PNS_ITEM *item = NULL; + if(type == PCB_TRACE_T) + item = syncTrack ( t ); + else if( type == PCB_VIA_T ) + item = syncVia (static_cast (t)); + + if(item) + m_world->Add(item); + } + + m_placer = new PNS_LINE_PLACER ( m_world ); +} + +PNS_ROUTER::PNS_ROUTER() +{ + theRouter = this; + + m_clearanceFunc = NULL; + + m_currentLayer = 1; + m_placingVia = false; + m_currentNet = -1; + m_state = IDLE; + m_world = NULL; + m_placer = NULL; + m_previewItems = NULL; + m_start_diagonal = false; + m_board = NULL; + + TRACE(1, "m_board = %p\n", m_board); +} + + +void PNS_ROUTER::SetView(KiGfx::VIEW *aView) +{ + if(m_previewItems) + { + m_previewItems->FreeItems(); + delete m_previewItems; + } + + m_view = aView; + m_previewItems = new KiGfx::VIEW_GROUP(m_view); + m_previewItems->SetLayer(ITEM_GAL_LAYER( GP_OVERLAY )); + m_view -> Add (m_previewItems); + m_previewItems->ViewSetVisible(true); + +} + +PNS_ROUTER *PNS_ROUTER::GetInstance() +{ + return theRouter; +} + +PNS_ROUTER::~PNS_ROUTER() +{ + ClearWorld(); + theRouter = NULL; +} + +void PNS_ROUTER::ClearWorld() +{ + if(m_world) + delete m_world; + if(m_clearanceFunc) + delete m_clearanceFunc; + if(m_placer) + delete m_placer; + + m_clearanceFunc = NULL; + m_world = NULL; + m_placer = NULL; +} + +void PNS_ROUTER::SetCurrentWidth (int w ) +{ + // fixme: change width while routing + m_currentWidth = w; +} + +bool PNS_ROUTER::RoutingInProgress() const +{ + return m_state != IDLE; +} + + +const PNS_ITEMSET PNS_ROUTER::QueryHoverItems(const VECTOR2I&aP) +{ + if(m_state == IDLE) + return m_world->HitTest( aP ); + else + return m_placer->GetCurrentNode() -> HitTest(aP); +} + + +const VECTOR2I PNS_ROUTER::SnapToItem( PNS_ITEM *item, VECTOR2I aP, bool& aSplitsSegment ) +{ + VECTOR2I anchor; + + if(!item) + { + aSplitsSegment = false; + return aP; + } + + switch(item->GetKind()) + { + case PNS_ITEM::SOLID: + anchor = static_cast(item)->GetCenter(); + aSplitsSegment = false; + break; + case PNS_ITEM::VIA: + anchor = static_cast(item)->GetPos(); + aSplitsSegment = false; + break; + case PNS_ITEM::SEGMENT: + { + PNS_SEGMENT *seg = static_cast(item); + const SEG& s = seg->GetSeg(); + int w = seg->GetWidth(); + + aSplitsSegment = false; + + if ((aP - s.a).EuclideanNorm() < w / 2) + anchor = s.a; + else if ((aP - s.b).EuclideanNorm() < w / 2) + anchor = s.b; + else { + anchor = s.NearestPoint(aP); + aSplitsSegment = true; + } + break; + } + default: + break; + } + return anchor; +} + + +void PNS_ROUTER::StartRouting(const VECTOR2I& aP, PNS_ITEM *aStartItem) +{ + VECTOR2I p; + + static int unknowNetIdx = 0;//-10000; + + m_placingVia = false; + m_startsOnVia = false; + m_currentNet = -1; + + bool splitSeg = false; + + p = SnapToItem( aStartItem, aP, splitSeg ); + + if(!aStartItem || aStartItem->GetNet() < 0) + m_currentNet = unknowNetIdx--; + else + m_currentNet = aStartItem->GetNet(); + + m_currentStart = p; + m_originalStart = p; + m_currentEnd = p; + + m_placer->SetInitialDirection(m_start_diagonal ? DIRECTION_45(DIRECTION_45::NE) : DIRECTION_45(DIRECTION_45::N)); + m_placer->StartPlacement(m_originalStart, m_currentNet, m_currentWidth, m_currentLayer); + m_state = ROUTE_TRACK; + + if(splitSeg) + splitAdjacentSegments(m_placer->GetCurrentNode(), aStartItem, p); + + +} + +const VECTOR2I PNS_ROUTER::GetCurrentEnd( ) const +{ + return m_currentEnd; +} + +void PNS_ROUTER::EraseView() +{ + BOOST_FOREACH(BOARD_ITEM *item, m_hiddenItems) + { + item->ViewSetVisible(true); + } + + if(m_previewItems) + m_previewItems->FreeItems(); + m_previewItems->ViewUpdate( KiGfx::VIEW_ITEM::GEOMETRY ); +} + +void PNS_ROUTER::DisplayItem(const PNS_ITEM* aItem, bool aIsHead) +{ + + ROUTER_PREVIEW_ITEM * pitem = new ROUTER_PREVIEW_ITEM (aItem, m_previewItems); + + m_previewItems->Add (pitem); + if(aIsHead) + pitem->MarkAsHead(); + + pitem->ViewSetVisible(true); + m_previewItems->ViewUpdate( KiGfx::VIEW_ITEM::GEOMETRY | KiGfx::VIEW_ITEM::APPEARANCE ); +} + +void PNS_ROUTER::DisplayDebugLine ( const SHAPE_LINE_CHAIN &aLine, int aType, int aWidth) +{ + ROUTER_PREVIEW_ITEM * pitem = new ROUTER_PREVIEW_ITEM (NULL, m_previewItems); + + pitem->DebugLine (aLine, aWidth, aType ); + m_previewItems->Add (pitem); + pitem->ViewSetVisible(true); + m_previewItems->ViewUpdate( KiGfx::VIEW_ITEM::GEOMETRY | KiGfx::VIEW_ITEM::APPEARANCE ); +} + +void PNS_ROUTER::DisplayDebugBox ( const BOX2I& aBox, int aType , int aWidth ) +{ + +} + + +void PNS_ROUTER::Move(const VECTOR2I& aP, PNS_ITEM *endItem) +{ + PNS_NODE::ItemVector removed, added; + VECTOR2I p = aP; + + if(m_state == IDLE) + return; + + if(m_state == START_ROUTING) + { + + } + + EraseView(); + + m_currentEnd = p; + m_placer->Route(p); + + PNS_LINE current = m_placer->GetTrace(); + + DisplayItem (¤t, true); + + if(current.EndsWithVia()) + DisplayItem( ¤t.GetVia(), true ); + + m_placer->GetCurrentNode()->GetUpdatedItems(removed, added); + + BOOST_FOREACH(PNS_ITEM *item, added) + { + DisplayItem(item); + } + + BOOST_FOREACH(PNS_ITEM *item, removed) + { + BOARD_ITEM *parent = item->GetParent(); + + if(parent) + { + if(parent->ViewIsVisible()) + m_hiddenItems.insert(parent); + + parent->ViewSetVisible(false); + parent->ViewUpdate (KiGfx::VIEW_ITEM::APPEARANCE); + } + } +} + +void PNS_ROUTER::splitAdjacentSegments(PNS_NODE *aNode, PNS_ITEM *aSeg, const VECTOR2I& aP ) +{ + if(aSeg && aSeg->OfKind( PNS_ITEM::SEGMENT )) + { + PNS_NODE::OptJoint jt = aNode->FindJoint ( aP, aSeg->GetLayers().Start(), aSeg->GetNet()); + + if(jt && jt->LinkCount() >= 1) + return; + + PNS_SEGMENT *s_old = static_cast(aSeg); + PNS_SEGMENT *s_new [2]; + + s_new[0] = s_old->Clone(); + s_new[1] = s_old->Clone(); + + s_new[0]->SetEnds (s_old->GetSeg().a, aP); + s_new[1]->SetEnds (aP, s_old->GetSeg().b); + + + aNode->Remove( s_old ); + aNode->Add( s_new [0] ); + aNode->Add( s_new [1] ); + } +} + +void PNS_ROUTER::commitRouting( PNS_NODE *aNode ) +{ + PNS_NODE::ItemVector removed, added; + + aNode->GetUpdatedItems(removed, added); + + for(unsigned int i = 0; i < removed.size(); i++) + { + BOARD_ITEM *parent = removed[i]->GetParent(); + + if(parent) + { + m_view->Remove(parent); + m_board->Remove(parent); + } + } + + BOOST_FOREACH(PNS_ITEM *item, added) + { + BOARD_ITEM *newBI = NULL; + switch(item->GetKind()) + { + case PNS_ITEM::SEGMENT: + { + PNS_SEGMENT *seg = static_cast(item); + TRACK *track = new TRACK(m_board); + const SEG& s = seg->GetSeg(); + + track->SetStart( wxPoint(s.a.x, s.a.y)); + track->SetEnd( wxPoint(s.b.x, s.b.y )); + track->SetWidth(seg->GetWidth()); + track->SetLayer(seg->GetLayers().Start()); + track->SetNet(seg->GetNet()); + newBI = track; + break; + } + + case PNS_ITEM::VIA: + { + SEGVIA *via_board = new SEGVIA(m_board); + PNS_VIA *via = static_cast(item); + via_board->SetPosition ( wxPoint(via->GetPos().x, via->GetPos().y )); + via_board->SetWidth ( via->GetDiameter() ); + via_board->SetNet ( via->GetNet() ); + newBI = via_board; + break; + } + + default: + break; + } + + if(newBI) + { + item->SetParent(newBI); + newBI->ClearFlags(); + m_view->Add(newBI); + m_board->Add(newBI); + newBI->ViewUpdate( KiGfx::VIEW_ITEM::GEOMETRY ); + } + } + + m_world->Commit( aNode ); +} + +PNS_VIA *PNS_ROUTER::checkLoneVia ( PNS_JOINT* aJoint ) const +{ + PNS_VIA *theVia = NULL; + PNS_LAYERSET l; + + BOOST_FOREACH(PNS_ITEM *item, aJoint->GetLinkList()) + { + if(item->GetKind() == PNS_ITEM::VIA) + theVia = static_cast(item); + + + l.Merge (item->GetLayers()); + } + + if(l.Start() == l.End()) + return theVia; + return NULL; +} + +PNS_NODE *PNS_ROUTER::removeLoops ( PNS_NODE *aNode, PNS_SEGMENT *aLatestSeg ) +{ + PNS_LINE *ourLine = aNode->AssembleLine(aLatestSeg); + PNS_NODE *cleaned = aNode->Branch(); + PNS_JOINT a, b; + vector lines; + + + cleaned->FindLineEnds (ourLine, a, b); + cleaned->FindLinesBetweenJoints( a, b, lines); + + BOOST_FOREACH(PNS_LINE *line, lines) + { + if(! (line->ContainsSegment (aLatestSeg) ) ) + { + cleaned->Remove(line); + } + } + + return cleaned; +} + + + +bool PNS_ROUTER::FixRoute(const VECTOR2I& aP, PNS_ITEM *aEndItem) + { + bool real_end = false; + + PNS_LINE pl = m_placer->GetTrace(); + const SHAPE_LINE_CHAIN& l = pl.GetCLine(); + + if(!l.SegmentCount()) + return true; + + VECTOR2I p_pre_last = l.CPoint(-1); + const VECTOR2I p_last = l.CPoint(-1); + DIRECTION_45 d_last (l.CSegment(-1)); + + if(l.PointCount() > 2) + p_pre_last = l.CPoint(-2); + + if(aEndItem && m_currentNet >= 0 && m_currentNet == aEndItem->GetNet()) + real_end = true; + + int last = (real_end || m_placingVia) ? l.SegmentCount() : max(1, l.SegmentCount() - 1); + + PNS_NODE *latest = m_placer->GetCurrentNode(); + + if(real_end) + splitAdjacentSegments(latest, aEndItem, aP); + + PNS_SEGMENT *lastSeg = NULL; + for (int i = 0; i < last; i++) + { + const SEG& s = pl.GetCLine().CSegment(i); + PNS_SEGMENT *seg = new PNS_SEGMENT( s, m_currentNet ); + seg->SetWidth(pl.GetWidth()); + seg->SetLayer(m_currentLayer); + latest->Add(seg); + lastSeg = seg; + } + + if( pl.EndsWithVia() ) + latest->Add(pl.GetVia().Clone()); + + if(real_end) + latest = removeLoops( latest, lastSeg ); + + commitRouting(latest); + + EraseView(); + + if(real_end) + { + m_state = IDLE; + //m_world->KillChildren(); + } else { + + m_state = ROUTE_TRACK; + m_placer->SetInitialDirection(d_last); + m_currentStart = m_placingVia ? p_last : p_pre_last; + + if(m_placingVia) + m_currentLayer = NextCopperLayer(true); + + m_placer->StartPlacement(m_currentStart, m_currentNet, m_currentWidth, m_currentLayer); + + m_startsOnVia = m_placingVia; + m_placingVia = false; + + } + + + return real_end; +} + +void PNS_ROUTER::StopRouting() +{ + if(!RoutingInProgress()) + return; + + //highlightCurrent(false); + + EraseView(); + + m_state = IDLE; + m_world->KillChildren(); +} + +void PNS_ROUTER::FlipPosture() +{ + if(m_placer->GetTail().GetCLine().SegmentCount() == 0) + { + m_start_diagonal = !m_start_diagonal; + m_placer->SetInitialDirection(m_start_diagonal ? DIRECTION_45(DIRECTION_45::NE) : DIRECTION_45(DIRECTION_45::N)); + } else + m_placer->FlipPosture(); + + Move(m_currentEnd, NULL); +} + +void PNS_ROUTER::SwitchLayer(int layer) +{ + switch(m_state) + { + case IDLE: + m_currentLayer = layer; + break; + case ROUTE_TRACK: + if(m_startsOnVia) + { + m_currentLayer = layer; + m_placer->StartPlacement(m_currentStart, m_currentNet, m_currentWidth, m_currentLayer); + } + default: + break; + } +} + +void PNS_ROUTER::ToggleViaPlacement () +{ + if(m_state == ROUTE_TRACK) + { + m_placingVia = !m_placingVia; + m_placer->AddVia(m_placingVia, m_currentViaDiameter, m_currentViaDrill); + } +} + diff --git a/pcbnew/router/pns_router.h b/pcbnew/router/pns_router.h new file mode 100644 index 0000000000..e0016b2dc8 --- /dev/null +++ b/pcbnew/router/pns_router.h @@ -0,0 +1,197 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ +#ifndef __PNS_ROUTER_H +#define __PNS_ROUTER_H + +#include + +#include +#include + +#include + +#include "pns_routing_settings.h" +#include "pns_item.h" +#include "pns_itemset.h" + +class BOARD; +class BOARD_ITEM; +class D_PAD; +class TRACK; +class SEGVIA; +class PNS_NODE; +class PNS_LINE_PLACER; +class PNS_ITEM; +class PNS_LINE; +class PNS_SOLID; +class PNS_SEGMENT; +class PNS_JOINT; +class PNS_VIA; +class PNS_CLEARANCE_FUNC; +class VIEW_GROUP; + +namespace KiGfx { + class VIEW; + class VIEW_GROUP; +}; + + +/** + * Class PNS_ROUTER + * + * Main router class. + */ + +class PNS_ROUTER { + +private: + enum RouterState { + IDLE, + START_ROUTING, + ROUTE_TRACK, + FINISH_TRACK + }; + +public: + + PNS_ROUTER (); + ~PNS_ROUTER (); + + static PNS_ROUTER *GetInstance(); + + void ClearWorld(); + void SetBoard( BOARD *aBoard ); + void SyncWorld(); + + void SetView(KiGfx::VIEW *aView); + + bool RoutingInProgress() const; + void StartRouting(const VECTOR2I& aP, PNS_ITEM *aItem); + void Move(const VECTOR2I& aP, PNS_ITEM *aItem); + bool FixRoute(const VECTOR2I& aP, PNS_ITEM *aItem); + + void StopRouting(); + + const VECTOR2I GetCurrentEnd() const; + + int GetClearance(const PNS_ITEM* a, const PNS_ITEM *b ) const; + + PNS_NODE* GetWorld() const + { + return m_world; + } + + void FlipPosture(); + + void DisplayItem ( const PNS_ITEM *aItem, bool aIsHead = false ); + void DisplayDebugLine ( const SHAPE_LINE_CHAIN &aLine, int aType = 0, int aWidth = 0); + void DisplayDebugBox ( const BOX2I& aBox, int aType = 0, int aWidth = 0); + + void EraseView ( ); + void SwitchLayer (int layer ); + int GetCurrentLayer() const { return m_currentLayer; } + void ToggleViaPlacement (); + + void SetCurrentWidth(int w); + void SetCurrentViaDiameter(int d) { m_currentViaDiameter = d;} + void SetCurrentViaDrill(int d) { m_currentViaDrill = d;} + int GetCurrentWidth() const { return m_currentWidth; } + int GetCurrentViaDiameter() const { return m_currentViaDiameter; } + int GetCurrentViaDrill() const { return m_currentViaDrill; } + int GetCurrentNet() const { return m_currentNet; } + + PNS_CLEARANCE_FUNC *GetClearanceFunc() const + { + return m_clearanceFunc; + } + + bool IsPlacingVia() const + { + return m_placingVia; + } + + + int NextCopperLayer( bool aUp ); + + //typedef boost::optional optHoverItem; + + const PNS_ITEMSET QueryHoverItems(const VECTOR2I& aP); + const VECTOR2I SnapToItem( PNS_ITEM *item, VECTOR2I aP, bool& aSplitsSegment ); + + +private: + + + + void clearViewFlags(); + + //optHoverItem queryHoverItemEx(const VECTOR2I& aP); + + PNS_ITEM *pickSingleItem ( PNS_ITEMSET &aItems ) const; //std::vector aItems) const; + void splitAdjacentSegments(PNS_NODE *aNode, PNS_ITEM *aSeg, const VECTOR2I& aP ); //optHoverItem& aItem); + void commitRouting ( PNS_NODE *aNode ); + PNS_NODE *removeLoops ( PNS_NODE *aNode, PNS_SEGMENT *aLatestSeg ); + PNS_NODE *removeLoops ( PNS_NODE *aNode, PNS_LINE *aNewLine ); + PNS_VIA *checkLoneVia ( PNS_JOINT* aJoint ) const; + + PNS_ITEM *syncPad( D_PAD *aPad ); + PNS_ITEM *syncTrack( TRACK *aTrack ); + PNS_ITEM *syncVia( SEGVIA *aVia ); + + void commitPad( PNS_SOLID *aPad ); + void commitSegment( PNS_SEGMENT *aTrack ); + void commitVia( PNS_VIA *aVia ); + + void highlightCurrent( bool enabled ); + + + int m_currentLayer; + int m_currentNet; + int m_currentWidth; + int m_currentViaDiameter; + int m_currentViaDrill; + + bool m_start_diagonal; + + RouterState m_state; + + BOARD *m_board; + PNS_NODE *m_world; + PNS_LINE_PLACER *m_placer; + + KiGfx::VIEW *m_view; + KiGfx::VIEW_GROUP *m_previewItems; + + VECTOR2I m_currentEnd; + VECTOR2I m_currentStart; + VECTOR2I m_originalStart; + bool m_placingVia; + bool m_startsOnVia; + +// optHoverItem m_startItem, m_endItem; + + PNS_ROUTING_SETTINGS m_settings; + PNS_CLEARANCE_FUNC *m_clearanceFunc; + + boost::unordered_set m_hiddenItems; + +}; + +#endif \ No newline at end of file diff --git a/pcbnew/router/pns_routing_settings.h b/pcbnew/router/pns_routing_settings.h new file mode 100644 index 0000000000..86c955dfc1 --- /dev/null +++ b/pcbnew/router/pns_routing_settings.h @@ -0,0 +1,53 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef __PNS_ROUTER_SETTINGS +#define __PNS_ROUTER_SETTINGS + +///> Routing modes +enum PNS_MODE { + RM_Ignore = 0, ///> Ignore collisions + RM_Shove, ///> Only shove + RM_Walkaround, ///> Only walkaround + RM_Smart ///> Guess what's better +}; + +class PNS_ROUTING_SETTINGS +{ + public: + PNS_MODE m_routingMode; + + bool m_removeLoops; + bool m_smartPads; + bool m_suggestEnding; + bool m_shoveOnRequest; + bool m_changePostures; + bool m_followMouse; + + int m_lineWidth; + int m_viaDiameter; + int m_viaDrill; + int m_preferredLayer; + int m_walkaroundIterationLimit; + int m_shoveIterationLimit; +}; + +#endif + diff --git a/pcbnew/router/pns_segment.h b/pcbnew/router/pns_segment.h new file mode 100644 index 0000000000..6cef1b15a6 --- /dev/null +++ b/pcbnew/router/pns_segment.h @@ -0,0 +1,119 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef __PNS_SEGMENT_H +#define __PNS_SEGMENT_H + +#include + +#include +#include +#include + +#include "pns_item.h" +#include "pns_line.h" + +class PNS_NODE; + +class PNS_SEGMENT : public PNS_ITEM { +public: + PNS_SEGMENT (): + PNS_ITEM(SEGMENT) + {}; + + PNS_SEGMENT (const SEG& aSeg, int aNet): + PNS_ITEM(SEGMENT) + { + m_net = aNet; + m_shape.Clear(); + m_shape.Append(aSeg.a); + m_shape.Append(aSeg.b); + }; + + PNS_SEGMENT (const PNS_LINE &aParentLine, const SEG& aSeg): + PNS_ITEM(SEGMENT) + { + m_net = aParentLine.GetNet(); + m_layers = aParentLine.GetLayers(); + m_width = aParentLine.GetWidth(); + m_shape.Clear(); + m_shape.Append(aSeg.a); + m_shape.Append(aSeg.b); + }; + + + PNS_SEGMENT *Clone() const; + + const SHAPE* GetShape() const { + return static_cast(&m_shape); + } + + void SetLayer (int aLayer) + { + SetLayers (PNS_LAYERSET ( aLayer )); + } + + int GetLayer() const + { + return GetLayers().Start(); + } + + const SHAPE_LINE_CHAIN& GetCLine() const + { + return m_shape; + } + + void SetWidth( int aWidth ) + { + m_width = aWidth; + } + + int GetWidth() const { + return m_width; + } + + const SEG GetSeg() const { + assert(m_shape.PointCount() >= 1); + if(m_shape.PointCount() == 1) + return SEG(m_shape.CPoint(0), m_shape.CPoint(0)); + return SEG(m_shape.CPoint(0), m_shape.CPoint(1)); + } + + void SetEnds ( const VECTOR2I& a, const VECTOR2I& b) + { + m_shape.Clear(); + m_shape.Append(a); + m_shape.Append(b); + } + + void SwapEnds() + { + m_shape = m_shape.Reverse(); + } + + const SHAPE_LINE_CHAIN Hull(int aClearance, int aWalkaroundThickness) const; + +private: + + SHAPE_LINE_CHAIN m_shape; + int m_width; +}; + +#endif diff --git a/pcbnew/router/pns_shove.cpp b/pcbnew/router/pns_shove.cpp new file mode 100644 index 0000000000..bd3e12b72e --- /dev/null +++ b/pcbnew/router/pns_shove.cpp @@ -0,0 +1,469 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include +#include + +#include + +#include "trace.h" + +#include "pns_line.h" +#include "pns_node.h" +#include "pns_walkaround.h" +#include "pns_shove.h" +#include "pns_optimizer.h" +#include "pns_via.h" +#include "pns_utils.h" + +#include + +using namespace std; + +PNS_SHOVE::PNS_SHOVE( PNS_NODE *aWorld ) +{ + m_root = aWorld; + m_iterLimit = 100; +}; + +PNS_SHOVE::~PNS_SHOVE() +{ +} + +struct range { + range() + { + min_v = max_v = -1; + } + + void add ( int x ) + { + if(min_v < 0) min_v = x; + if(max_v < 0) max_v = x; + + if(x < min_v) + min_v = x; + else if (x > max_v) + max_v = x; + } + + int start() + { + return min_v; + } + + int end() + { + return max_v; + } + + int min_v, max_v; +}; + +// fixme: this is damn f***ing inefficient. And fails much too often due to broken direction finding algorithm. +bool PNS_SHOVE::tryShove(PNS_NODE *aNode, PNS_LINE *aHead, PNS_LINE *aObstacle, PNS_SEGMENT& aObstacleSeg, PNS_LINE *aResult, bool aInvertWinding ) +{ + const SHAPE_LINE_CHAIN &head = aHead->GetCLine(); + bool cw = false; + int i; + + if(aHead->EndsWithVia() && !aHead->GetLayers().Overlaps(aObstacle->GetLayers())) + { + int clearance = aNode->GetClearance(aHead, aObstacle); + SHAPE_LINE_CHAIN hull = aHead->GetVia().Hull( clearance - aObstacle->GetWidth() / 2 ); + + //SHAPE_LINE_CHAIN path_pre, path_walk_cw, path_walk_ccw, path_post; + + SHAPE_LINE_CHAIN path_cw, path_ccw, *path; + + aObstacle->NewWalkaround(hull, path_cw, true); + aObstacle->NewWalkaround(hull, path_ccw, false); + + path = path_ccw.Length() < path_cw.Length() ? &path_ccw : &path_cw; + aResult->SetShape(*path); + + //PNSDisplayDebugLine (*path, 5); + + if(!aResult->Is45Degree()) + { + //printf("polyset non-45\npoly %s\nendpolyset\n", aResult->GetCLine().Format().c_str()); + } + /*... special case for vias? */ + + return !aNode->CheckColliding(aResult, aHead); + } + + int ns = head.SegmentCount(); + if(aHead->EndsWithVia()) + ns ++; + + for(i = 0; i < head.SegmentCount(); i++) + { + const PNS_SEGMENT hs (*aHead, head.CSegment(i)); + + + + if(aNode->CheckColliding(&hs, aObstacle)) + { + VECTOR2I v1 = hs.GetSeg().b - hs.GetSeg().a; + VECTOR2I v2 = aObstacleSeg.GetSeg().b - aObstacleSeg.GetSeg().a; + + VECTOR2I::extended_type det = v1.Cross(v2); + + if(det > 0) + cw = true; + else + cw = false; + + break; + } + } + + if(aInvertWinding) + { + if(cw) + cw = false; + else + cw = true; + } + + PNS_LINE shoved (*aObstacle); + + int clearance = aNode->GetClearance(aHead, aObstacle); + + range r; + + for(i = 0; i < ns; i++) + { + SHAPE_LINE_CHAIN hull; + + if(i < head.SegmentCount()) + { + const PNS_SEGMENT hs (*aHead, head.CSegment(i)); + hull = hs.Hull( clearance, 0 ); + } else + hull = aHead->GetVia().Hull( clearance - aObstacle->GetWidth() / 2); + + SHAPE_LINE_CHAIN path_pre, path_walk, path_post, tmp; + SHAPE_LINE_CHAIN path_pre2, path_walk2, path_post2; + + //shoved.NewWalkaround(hull, path_pre, path_walk, path_post, cw); + shoved.NewWalkaround(hull, path_pre, path_walk, path_post, cw); + + /*if(path_pre != path_pre2 || path_post != path_post2 || path_walk != path_walk2 ) + { + TRACE(5, "polyset orig\npoly %s\npoly %s\npoly %s\nendpolyset\n", path_pre.Format().c_str() % path_walk.Format().c_str() % path_post.Format().c_str()); + TRACE(5, "polyset err\npoly %s\npoly %s\npoly %s\nendpolyset\n", path_pre2.Format().c_str() % path_walk2.Format().c_str() % path_post2.Format().c_str()); + }*/ + + tmp = shoved.GetCLine(); + if(path_walk.SegmentCount()) + r.add(i); + + path_pre.Append(path_walk); + path_pre.Append(path_post); + path_pre.Simplify(); + shoved.SetShape(path_pre); +// shoved.SetAffectedRange ( start, end ); + *aResult = shoved; + + if(!aResult->Is45Degree()) + { + //TRACE(5, "polyset non-45\npoly %s\npoly %s\npoly %s\nendpolyset\n", tmp.Format().c_str() % hull.Format().c_str() % aResult->GetCLine().Format().c_str()); + } + + } + + TRACE(2, "CW %d affectedRange %d-%d [total %d]", (cw?1:0) % r.start() % r.end() % ns); + + return !aNode->CheckColliding(aResult, aHead); +} + +PNS_SHOVE::ShoveStatus PNS_SHOVE::shoveSingleLine(PNS_NODE *aNode, PNS_LINE *aCurrent, PNS_LINE *aObstacle, PNS_SEGMENT& aObstacleSeg, PNS_LINE *aResult ) +{ + bool rv = tryShove(aNode, aCurrent, aObstacle, aObstacleSeg, aResult, false); + + if( !rv ) + rv = tryShove(aNode, aCurrent, aObstacle, aObstacleSeg, aResult, true); + + if( !rv ) + { + TRACEn(2, "Shove failed" ); + return SH_INCOMPLETE; + } + + aResult->GetLine().Simplify(); + + const SHAPE_LINE_CHAIN& sh_shoved = aResult->GetCLine(); + const SHAPE_LINE_CHAIN& sh_orig = aObstacle->GetCLine(); + + if(sh_shoved.SegmentCount() > 1 && sh_shoved.CPoint(0) == sh_orig.CPoint(0) && sh_shoved.CPoint(-1) == sh_orig.CPoint(-1) ) + return SH_OK; + else if (!sh_shoved.SegmentCount()) + return SH_NULL; + else + return SH_INCOMPLETE; +} + +bool PNS_SHOVE::reduceSpringback( PNS_LINE *aHead ) +{ + bool rv = false; + + while(!m_nodeStack.empty()) + { + SpringbackTag st_stack = m_nodeStack.back(); + bool tail_ok = true; + + if(!st_stack.node->CheckColliding(aHead) && tail_ok) + { + rv = true; + delete st_stack.node; + m_nodeStack.pop_back(); + } else + break; + } + + return rv; +} + +bool PNS_SHOVE::pushSpringback( PNS_NODE *aNode, PNS_LINE *aHead, const PNS_COST_ESTIMATOR& aCost ) +{ + BOX2I headBB = aHead->GetCLine().BBox(); + SpringbackTag st; + + st.node = aNode; + st.cost = aCost; + st.length = std::max(headBB.GetWidth(), headBB.GetHeight());; + m_nodeStack.push_back(st); + return true; +} + +const PNS_COST_ESTIMATOR PNS_SHOVE::TotalCost() const +{ + if(m_nodeStack.empty()) + return PNS_COST_ESTIMATOR(); + else + return m_nodeStack.back().cost; +} + +PNS_SHOVE::ShoveStatus PNS_SHOVE::ShoveLines(PNS_LINE* aCurrentHead) +{ + stack lineStack; + PNS_NODE *node, *parent; + PNS_VIA *headVia = NULL; + bool fail = false; + int iter = 0; + + PNS_LINE *head = aCurrentHead->Clone(); + + reduceSpringback(aCurrentHead); + + parent = m_nodeStack.empty() ? m_root : m_nodeStack.back().node; + node = parent->Branch(); + + lineStack.push(head); + + //node->Add(tail); + node->Add(head); + + if(head->EndsWithVia()) + { + headVia = head->GetVia().Clone(); + node->Add( headVia ); + } + + PNS_OPTIMIZER optimizer (node); + + optimizer.SetEffortLevel (PNS_OPTIMIZER::MERGE_SEGMENTS | PNS_OPTIMIZER::SMART_PADS); + optimizer.SetCollisionMask( -1 ); + PNS_NODE::OptObstacle nearest; + + optimizer.CacheStaticItem(head); + if(headVia) + optimizer.CacheStaticItem(headVia); + + TRACE(1, "ShoveStart [root: %d jts, node: %d jts]", m_root->JointCount() % node->JointCount()); + + //PNS_ITEM *lastWalkSolid = NULL; + prof_counter totalRealTime; + + + wxLongLong t_start = wxGetLocalTimeMillis(); + + while(!lineStack.empty()) + { + + wxLongLong t_cur = wxGetLocalTimeMillis(); + + if ((t_cur - t_start).ToLong() > ShoveTimeLimit) + { + fail = true; + break; + } + + iter++; + + if(iter > m_iterLimit) + { + fail = true; + break; + } + + PNS_LINE *currentLine = lineStack.top(); + + prof_start( &totalRealTime, false ); + nearest = node->NearestObstacle(currentLine, PNS_ITEM::ANY); + prof_end( &totalRealTime ); + + TRACE(2,"t-nearestObstacle %lld us", (totalRealTime.value )); + + if(!nearest) + { + if(lineStack.size() > 1) + { + PNS_LINE *original = lineStack.top(); + PNS_LINE optimized; + int r_start, r_end; + + original->GetAffectedRange(r_start, r_end); + + TRACE(1, "Iter %d optimize-line [range %d-%d, total %d]", iter % r_start % r_end % original->GetCLine().PointCount() ); + //lastWalkSolid = NULL; + prof_start( &totalRealTime, false ); + + if( optimizer.Optimize(original, &optimized) ) + { + node->Remove(original); + optimizer.CacheRemove(original); + node->Add(&optimized); + + if(original->BelongsTo(node)) + delete original; + } + prof_end( &totalRealTime ); + + TRACE(2,"t-optimizeObstacle %lld us", (totalRealTime.value )); + + } + lineStack.pop(); + } else { + + switch(nearest->item->GetKind()) + { + case PNS_ITEM::SEGMENT: + { + TRACE(1, "Iter %d shove-line", iter ); + + PNS_SEGMENT *pseg = static_cast(nearest->item); + PNS_LINE *collidingLine = node->AssembleLine(pseg); + PNS_LINE *shovedLine = collidingLine->CloneProperties(); + + prof_start( &totalRealTime, false ); + ShoveStatus st = shoveSingleLine(node, currentLine, collidingLine, *pseg, shovedLine); + prof_end( &totalRealTime ); + + TRACE(2,"t-shoveSingle %lld us", (totalRealTime.value )); + + if(st == SH_OK) + { + node->Replace(collidingLine, shovedLine); + + if(collidingLine->BelongsTo( node )) + delete collidingLine; + + optimizer.CacheRemove(collidingLine); + lineStack.push( shovedLine ); + } else + fail = true; + + //lastWalkSolid = NULL; + + break; + } // case SEGMENT + + case PNS_ITEM::SOLID: + case PNS_ITEM::VIA: + { + TRACE(1, "Iter %d walkaround-solid [%p]", iter % nearest->item ); + + if(lineStack.size() == 1) + { + fail = true; + break; + } + +/* if(lastWalkSolid == nearest->item) + { + fail = true; + break; + }*/ + + PNS_WALKAROUND walkaround (node); + PNS_LINE *walkaroundLine = currentLine->CloneProperties(); + + walkaround.SetSolidsOnly(true); + walkaround.SetSingleDirection(true); + + prof_start( &totalRealTime, false ); + walkaround.Route(*currentLine, *walkaroundLine, false); + prof_end( &totalRealTime ); + + TRACE(2,"t-walkSolid %lld us", (totalRealTime.value )); + + + node->Replace(currentLine, walkaroundLine); + + if(currentLine->BelongsTo( node )) + delete currentLine; + + optimizer.CacheRemove(currentLine); + lineStack.top() = walkaroundLine; + + //lastWalkSolid = nearest->item; + break; + } + default: + break; + } // switch + if(fail) + break; + } + } + + node->Remove(head); + delete head; + + if(headVia) + { + node->Remove(headVia); + delete headVia; + } + + TRACE(1, "Shove status : %s after %d iterations" , (fail ? "FAILED" : "OK") % iter ); + if(!fail) + { + pushSpringback(node, aCurrentHead, PNS_COST_ESTIMATOR()); + return SH_OK; + } else { + delete node; + return SH_INCOMPLETE; + } +} + diff --git a/pcbnew/router/pns_shove.h b/pcbnew/router/pns_shove.h new file mode 100644 index 0000000000..c40dbe9858 --- /dev/null +++ b/pcbnew/router/pns_shove.h @@ -0,0 +1,82 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef __PNS_SHOVE_H +#define __PNS_SHOVE_H + +#include +#include + +#include "pns_optimizer.h" + +class PNS_LINE; +class PNS_NODE; +class PNS_ROUTER; + +class PNS_SHOVE { + + public: + PNS_SHOVE(PNS_NODE *aWorld); + ~PNS_SHOVE(); + + enum ShoveStatus { + SH_OK = 0, + SH_NULL, + SH_INCOMPLETE + }; + + ShoveStatus ShoveLines(PNS_LINE* aCurrentHead); + + PNS_NODE *GetCurrentNode() + { + return m_nodeStack.empty() ? m_root : m_nodeStack.back().node; + } + + const PNS_COST_ESTIMATOR TotalCost() const; + + void Reset(); + void KillChildNodes(); + + private: + + static const int ShoveTimeLimit = 3000; + + bool tryShove(PNS_NODE *aWorld, PNS_LINE *aTrack, PNS_LINE * aObstacle, PNS_SEGMENT& aObstacleSeg, PNS_LINE *aResult, bool aInvertWinding ); + + ShoveStatus shoveSingleLine(PNS_NODE *aNode, PNS_LINE *aCurrent, PNS_LINE *aObstacle, PNS_SEGMENT& aObstacleSeg, PNS_LINE *aResult ); + + bool reduceSpringback( PNS_LINE *aHead ); + bool pushSpringback( PNS_NODE *aNode, PNS_LINE *aHead, const PNS_COST_ESTIMATOR& aCost ); + + struct SpringbackTag { + int64_t length; + int segments; + VECTOR2I p; + PNS_NODE *node; + PNS_COST_ESTIMATOR cost; + }; + + std::vector m_nodeStack; + PNS_NODE *m_root; + PNS_NODE *m_currentNode; + int m_iterLimit; +}; + +#endif diff --git a/pcbnew/router/pns_solid.cpp b/pcbnew/router/pns_solid.cpp new file mode 100644 index 0000000000..e3841e72ca --- /dev/null +++ b/pcbnew/router/pns_solid.cpp @@ -0,0 +1,64 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include + +#include +#include +#include +#include + +#include "pns_solid.h" +#include "pns_utils.h" + +const SHAPE_LINE_CHAIN PNS_SOLID::Hull(int aClearance, int aWalkaroundThickness) const +{ + switch(m_shape->Type()) + { + case SH_RECT: + { + SHAPE_RECT *rect = static_cast (m_shape); + return OctagonalHull( rect->GetPosition(), + rect->GetSize(), + aClearance + 1, + 0.2 * aClearance ); + } + + case SH_CIRCLE: + { + SHAPE_CIRCLE *circle = static_cast (m_shape); + int r = circle->GetRadius(); + return OctagonalHull( circle->GetCenter() - VECTOR2I(r, r), + VECTOR2I(2 * r, 2 * r), + aClearance + 1, + 0.52 * (r + aClearance) ); + } + default: + break; + } + + return SHAPE_LINE_CHAIN(); +} + +PNS_ITEM *PNS_SOLID::Clone() const +{ + // solids are never cloned as the shove algorithm never moves them + assert(false); +} \ No newline at end of file diff --git a/pcbnew/router/pns_solid.h b/pcbnew/router/pns_solid.h new file mode 100644 index 0000000000..d89135d00f --- /dev/null +++ b/pcbnew/router/pns_solid.h @@ -0,0 +1,70 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef __PNS_SOLID_H +#define __PNS_SOLID_H + +#include + +#include +#include +#include + +#include "pns_item.h" + +class PNS_SOLID : public PNS_ITEM { +public: + PNS_SOLID() : PNS_ITEM(SOLID) + { + m_movable = false; + m_shape = NULL; + } + + PNS_ITEM *Clone() const; + + const SHAPE* GetShape() const { return m_shape; } + + const SHAPE_LINE_CHAIN Hull(int aClearance = 0, int aWalkaroundThickness = 0) const; + + void SetShape( SHAPE* shape) + { + if(m_shape) + delete m_shape; + m_shape = shape; + } + + const VECTOR2I& GetCenter() const + { + return m_center; + } + + void SetCenter( const VECTOR2I& aCenter ) + { + m_center = aCenter; + } + +private: + + VECTOR2I m_center; + SHAPE* m_shape; +}; + +#endif + diff --git a/pcbnew/router/pns_utils.cpp b/pcbnew/router/pns_utils.cpp new file mode 100644 index 0000000000..6a2fbb49b3 --- /dev/null +++ b/pcbnew/router/pns_utils.cpp @@ -0,0 +1,42 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "pns_utils.h" +#include "pns_line.h" +#include "pns_router.h" + +const SHAPE_LINE_CHAIN OctagonalHull(const VECTOR2I& aP0, const VECTOR2I& aSize, int aClearance, int aChamfer) +{ + SHAPE_LINE_CHAIN s; + + s.SetClosed( true ); + + s.Append(aP0.x - aClearance , aP0.y - aClearance + aChamfer); + s.Append(aP0.x - aClearance + aChamfer, aP0.y - aClearance); + s.Append(aP0.x + aSize.x + aClearance - aChamfer, aP0.y - aClearance); + s.Append(aP0.x + aSize.x + aClearance, aP0.y - aClearance + aChamfer); + s.Append(aP0.x + aSize.x + aClearance, aP0.y + aSize.y + aClearance - aChamfer); + s.Append(aP0.x + aSize.x + aClearance - aChamfer, aP0.y + aSize.y + aClearance); + s.Append(aP0.x - aClearance + aChamfer, aP0.y + aSize.y + aClearance); + s.Append(aP0.x - aClearance, aP0.y + aSize.y + aClearance - aChamfer); + + return s; +} + diff --git a/pcbnew/router/pns_utils.h b/pcbnew/router/pns_utils.h new file mode 100644 index 0000000000..97ce5d9884 --- /dev/null +++ b/pcbnew/router/pns_utils.h @@ -0,0 +1,33 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef __PNS_UTILS_H +#define __PNS_UTILS_H + +#include +#include + + +/** Various utility functions */ + +const SHAPE_LINE_CHAIN OctagonalHull(const VECTOR2I& aP0, const VECTOR2I& aSize, int aClearance, int aChamfer); + +#endif // __PNS_UTILS_H + diff --git a/pcbnew/router/pns_via.cpp b/pcbnew/router/pns_via.cpp new file mode 100644 index 0000000000..81a3d56ef2 --- /dev/null +++ b/pcbnew/router/pns_via.cpp @@ -0,0 +1,148 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "pns_via.h" +#include "pns_node.h" +#include "pns_utils.h" + +#include + +static bool Circle2Circle( VECTOR2I p1, VECTOR2I p2, int r1, int r2, VECTOR2I& force ) +{ + + int mindist = r1 + r2; + VECTOR2I delta = p2 - p1; + int dist = delta.EuclideanNorm(); + + if(dist >= mindist) + return false; + + force = delta.Resize(abs(mindist - dist) + 1); + return true; +}; + +static bool Rect2Circle( VECTOR2I rp0, VECTOR2I rsize, VECTOR2I cc, int cr, VECTOR2I& force ) +{ + VECTOR2I vts[] = { VECTOR2I(rp0.x, rp0.y), + VECTOR2I(rp0.x, rp0.y + rsize.y), + VECTOR2I(rp0.x + rsize.x, rp0.y + rsize.y), + VECTOR2I(rp0.x + rsize.x, rp0.y), + VECTOR2I(rp0.x, rp0.y) }; + + int dist = INT_MAX; + VECTOR2I nearest; + + for (int i = 0; i < 4; i++) + { + SEG s(vts[i], vts[i+1]); + + VECTOR2I pn = s.NearestPoint( cc ); + + int d = (pn - cc).EuclideanNorm(); + if( d < dist ) + { + nearest = pn; + dist = d; + } + } + + bool inside = cc.x >= rp0.x && cc.x <= (rp0.x + rsize.x) + && cc.y >= rp0.y && cc.y <= (rp0.y + rsize.y); + + VECTOR2I delta = cc - nearest; + + if(dist >= cr && !inside) + return false; + + if(inside) + force = -delta.Resize(abs(cr + dist) + 1); + else + force = delta.Resize(abs(cr - dist) + 1); + + return true; +}; + + +static bool ShPushoutForce ( const SHAPE *shape, VECTOR2I p, int r, VECTOR2I& force, int clearance) +{ + switch(shape->Type()) + { + case SH_CIRCLE: + { + const SHAPE_CIRCLE *cir = static_cast(shape); + return Circle2Circle( cir->GetCenter(), p, cir->GetRadius(), r + clearance + 1, force ); + } + case SH_RECT: + { + const SHAPE_RECT *rect = static_cast(shape); + return Rect2Circle( rect->GetPosition(), rect->GetSize(), p, r + clearance + 1, force ); + } + default: + return false; + + } + return false; +} + + +bool PNS_VIA::PushoutForce ( PNS_NODE *aNode, const VECTOR2I &aDirection, VECTOR2I& aForce, bool aSolidsOnly, int aMaxIterations) +{ + int iter = 0; + PNS_VIA mv ( *this); + VECTOR2I force, totalForce; + + while(iter < aMaxIterations) + { + PNS_NODE::OptObstacle obs = aNode->CheckColliding( &mv, aSolidsOnly ? PNS_ITEM::SOLID : PNS_ITEM::ANY); + + if(!obs) + break; + + int clearance = aNode->GetClearance(obs->item, &mv); + + if(iter > 10) + { + VECTOR2I l = - aDirection.Resize(m_diameter / 4); + totalForce += l; + mv.SetPos(mv.GetPos() + l); + } + + if( ShPushoutForce(obs->item->GetShape(), mv.GetPos(), mv.GetDiameter() / 2, force, clearance) ) + { + totalForce += force; + mv.SetPos(mv.GetPos() + force); + } + + + iter++; + } + + if(iter == aMaxIterations) + return false; + + aForce = totalForce; + return true; +} + +const SHAPE_LINE_CHAIN PNS_VIA::Hull(int aClearance, int aWalkaroundThickness) const +{ + return OctagonalHull( m_pos - VECTOR2I(m_diameter/2, m_diameter/2), VECTOR2I(m_diameter, m_diameter), aClearance + 1, (2*aClearance + m_diameter) * 0.26); +} + \ No newline at end of file diff --git a/pcbnew/router/pns_via.h b/pcbnew/router/pns_via.h new file mode 100644 index 0000000000..3fdd8f8508 --- /dev/null +++ b/pcbnew/router/pns_via.h @@ -0,0 +1,118 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef __PNS_VIA_H +#define __PNS_VIA_H + +#include +#include + +#include "pns_item.h" + +class PNS_NODE; + +class PNS_VIA : public PNS_ITEM +{ + public: + PNS_VIA( ): + PNS_ITEM (VIA) {}; + + PNS_VIA( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aDiameter, int aNet = -1) : + PNS_ITEM (VIA) { + SetNet(aNet); + SetLayers(aLayers); + m_pos = aPos; + m_diameter = aDiameter; + m_shape = SHAPE_CIRCLE(aPos, aDiameter/2); + }; + + + PNS_VIA(const PNS_VIA& b) : PNS_ITEM(VIA) + { + SetNet(b.GetNet()); + SetLayers(b.GetLayers()); + m_pos = b.m_pos; + m_diameter = b.m_diameter; + m_shape = SHAPE_CIRCLE(m_pos, m_diameter/2); + } + + const VECTOR2I& GetPos() const + { + return m_pos; + } + + void SetPos( const VECTOR2I& aPos ) + { + m_pos = aPos; + m_shape.SetCenter(aPos); + } + + int GetDiameter() const + { + return m_diameter; + } + + void SetDiameter(int aDiameter) + { + m_diameter = aDiameter; + m_shape.SetRadius(m_diameter/2); + } + + int GetDrill() const + { + return m_drill; + } + + void SetDrill(int aDrill) + { + m_drill = aDrill; + } + + bool PushoutForce ( PNS_NODE *aNode, const VECTOR2I &aDirection, VECTOR2I& aForce, bool aSolidsOnly = true, int aMaxIterations = 10); + + const SHAPE *GetShape() const + { + return &m_shape; + } + + PNS_VIA *Clone() const + { + PNS_VIA *v = new PNS_VIA(); + + v->SetNet(GetNet()); + v->SetLayers(GetLayers()); + v->m_pos = m_pos; + v->m_diameter = m_diameter; + v->m_shape = SHAPE_CIRCLE(m_pos, m_diameter/2); + + return v; + } + + const SHAPE_LINE_CHAIN Hull(int aClearance = 0, int aWalkaroundThickness = 0) const; + + private: + + int m_diameter; + int m_drill; + VECTOR2I m_pos; + SHAPE_CIRCLE m_shape; +}; + +#endif diff --git a/pcbnew/router/pns_walkaround.cpp b/pcbnew/router/pns_walkaround.cpp new file mode 100644 index 0000000000..c384fdbee5 --- /dev/null +++ b/pcbnew/router/pns_walkaround.cpp @@ -0,0 +1,221 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include + +#include +#include + +#include + +#include "pns_walkaround.h" +#include "pns_optimizer.h" +#include "pns_utils.h" +#include "pns_router.h" + +using namespace std; +using boost::optional; + +void PNS_WALKAROUND::start( const PNS_LINE& aInitialPath ) +{ + m_iteration = 0; + m_iteration_limit = 50; +} + + +PNS_NODE::OptObstacle PNS_WALKAROUND::nearestObstacle(const PNS_LINE& aPath) +{ + return m_world->NearestObstacle ( &aPath, m_solids_only ? (PNS_ITEM::SOLID | PNS_ITEM::VIA) : PNS_ITEM::ANY ); +} + + +PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::singleStep(PNS_LINE& aPath, bool aWindingDirection) +{ + optional& current_obs = aWindingDirection ? m_currentObstacle[0] : m_currentObstacle[1]; + bool& prev_recursive = aWindingDirection ? m_recursiveCollision[0] : m_recursiveCollision[1]; + + if(!current_obs) + return DONE; + + SHAPE_LINE_CHAIN path_pre[2], path_walk[2], path_post[2]; + + VECTOR2I last = aPath.GetCLine().CPoint(-1); + + if((current_obs->hull).PointInside(last)) + { + m_recursiveBlockageCount ++; + + if(m_recursiveBlockageCount < 3) + aPath.GetLine().Append( current_obs->hull.NearestPoint(last) ); + else { + aPath = aPath.ClipToNearestObstacle(m_world); + return STUCK; + } + } + + aPath.NewWalkaround(current_obs->hull, path_pre[0], path_walk[0], path_post[0], aWindingDirection); + aPath.NewWalkaround(current_obs->hull, path_pre[1], path_walk[1], path_post[1], !aWindingDirection); + + + int len_pre = path_walk[0].Length(); + int len_alt = path_walk[1].Length(); + + PNS_LINE walk_path (aPath, path_walk[1]); + + bool alt_collides = m_world->CheckColliding(&walk_path, m_solids_only ? PNS_ITEM::SOLID : PNS_ITEM::ANY); + + SHAPE_LINE_CHAIN pnew; + + if(!m_forceSingleDirection && len_alt < len_pre && !alt_collides && !prev_recursive) + { + pnew = path_pre[1]; + pnew.Append(path_walk[1]); + pnew.Append(path_post[1]); + + current_obs = nearestObstacle(PNS_LINE(aPath, path_post[1])); + prev_recursive = false; + } else { + pnew = path_pre[0]; + pnew.Append(path_walk[0]); + pnew.Append(path_post[0]); + + current_obs = nearestObstacle(PNS_LINE(aPath, path_walk[0])); + + if(!current_obs) + { + prev_recursive = false; + current_obs = nearestObstacle(PNS_LINE(aPath, path_post[0])); + } else + prev_recursive = true; + } + + + pnew.Simplify(); + aPath.SetShape(pnew); + + return IN_PROGRESS; +} + +PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::Route( const PNS_LINE& aInitialPath, PNS_LINE& aWalkPath, bool aOptimize ) +{ + PNS_LINE path_cw(aInitialPath), path_ccw(aInitialPath); + WalkaroundStatus s_cw = IN_PROGRESS, s_ccw = IN_PROGRESS; + SHAPE_LINE_CHAIN best_path; + + start(aInitialPath); + + m_currentObstacle[0] = m_currentObstacle[1] = nearestObstacle(aInitialPath); + m_recursiveBlockageCount = 0; + + aWalkPath = aInitialPath; + + while(m_iteration < m_iteration_limit) + { + if(s_cw != STUCK) + s_cw = singleStep(path_cw, true); + + if(s_ccw != STUCK) + s_ccw = singleStep(path_ccw, false); + + if((s_cw == DONE && s_ccw == DONE) || (s_cw == STUCK && s_ccw == STUCK)) + { + int len_cw = path_cw.GetCLine().Length(); + int len_ccw = path_ccw.GetCLine().Length(); + + + if(m_forceLongerPath) + aWalkPath = (len_cw > len_ccw ? path_cw : path_ccw); + else + aWalkPath = (len_cw < len_ccw ? path_cw : path_ccw); + + break; + } else if(s_cw == DONE && !m_forceLongerPath) { + aWalkPath = path_cw; + break; + } else if (s_ccw == DONE && !m_forceLongerPath) { + aWalkPath = path_ccw; + break; + } + + + m_iteration++; + } + + if(m_iteration == m_iteration_limit) + { + int len_cw = path_cw.GetCLine().Length(); + int len_ccw = path_ccw.GetCLine().Length(); + + + if(m_forceLongerPath) + aWalkPath = (len_cw > len_ccw ? path_cw : path_ccw); + else + aWalkPath = (len_cw < len_ccw ? path_cw : path_ccw); + + } + + if(m_cursorApproachMode) + { + //int len_cw = path_cw.GetCLine().Length(); + //int len_ccw = path_ccw.GetCLine().Length(); + bool found = false; + + SHAPE_LINE_CHAIN l = aWalkPath.GetCLine(); + + + for(int i = 0; i < l.SegmentCount(); i++) + { + const SEG s = l.Segment(i); + + VECTOR2I nearest = s.NearestPoint(m_cursorPos); + VECTOR2I::extended_type dist_a = (s.a - m_cursorPos).SquaredEuclideanNorm(); + VECTOR2I::extended_type dist_b = (s.b - m_cursorPos).SquaredEuclideanNorm(); + VECTOR2I::extended_type dist_n = (nearest - m_cursorPos).SquaredEuclideanNorm(); + + + + if(dist_n <= dist_a && dist_n < dist_b) + { + //PNSDisplayDebugLine(l, 3); + l.Remove(i + 1, -1); + l.Append( nearest ); + l.Simplify(); + found = true; + break; + } + } + if(found) + { + aWalkPath = aInitialPath; + aWalkPath.SetShape(l); + } + } + + + aWalkPath.SetWorld(m_world); + aWalkPath.GetLine().Simplify(); + + WalkaroundStatus st = s_ccw == DONE || s_cw == DONE ? DONE : STUCK; + + if(aOptimize && st == DONE) + PNS_OPTIMIZER::Optimize(&aWalkPath, PNS_OPTIMIZER::MERGE_OBTUSE, m_world); + + return st; +} diff --git a/pcbnew/router/pns_walkaround.h b/pcbnew/router/pns_walkaround.h new file mode 100644 index 0000000000..0c71e0f190 --- /dev/null +++ b/pcbnew/router/pns_walkaround.h @@ -0,0 +1,99 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef __PNS_WALKAROUND_H +#define __PNS_WALKAROUND_H + +#include "pns_line.h" +#include "pns_node.h" + +class PNS_WALKAROUND { + + static const int DefaultIterationLimit = 50; + + + + public: + PNS_WALKAROUND( PNS_NODE *aWorld ): + m_world(aWorld), m_iteration_limit(DefaultIterationLimit) { + m_forceSingleDirection = false; + m_forceLongerPath = false; + m_cursorApproachMode = false; + }; + ~PNS_WALKAROUND() {}; + + enum WalkaroundStatus { + IN_PROGRESS = 0, + DONE, + STUCK + }; + + void SetWorld ( PNS_NODE *aNode ) + { + m_world = aNode; + } + + void SetIterationLimit( const int aIterLimit ) + { + m_iteration_limit = aIterLimit; + } + + void SetSolidsOnly ( bool aSolidsOnly ) + { + m_solids_only = aSolidsOnly; + } + + + void SetSingleDirection (bool aForceSingleDirection ) + { + m_forceSingleDirection = aForceSingleDirection; + m_forceLongerPath = true; + } + + void SetApproachCursor ( bool aEnabled, const VECTOR2I& aPos ) + { + m_cursorPos = aPos; + m_cursorApproachMode = aEnabled; + } + + + WalkaroundStatus Route( const PNS_LINE& aInitialPath, PNS_LINE& aWalkPath, bool aOptimize = true); + + private: + void start( const PNS_LINE& aInitialPath ); + + WalkaroundStatus singleStep(PNS_LINE& aPath, bool aWindingDirection); + PNS_NODE::OptObstacle nearestObstacle(const PNS_LINE& aPath); + + PNS_NODE *m_world; + + int m_recursiveBlockageCount; + int m_iteration; + int m_iteration_limit; + bool m_solids_only; + bool m_forceSingleDirection, m_forceLongerPath; + bool m_cursorApproachMode; + VECTOR2I m_cursorPos; + PNS_NODE::OptObstacle m_currentObstacle[2]; + bool m_recursiveCollision[2]; +}; + +#endif // __PNS_WALKAROUND_H + diff --git a/pcbnew/router/router_preview_item.cpp b/pcbnew/router/router_preview_item.cpp new file mode 100644 index 0000000000..b63233c821 --- /dev/null +++ b/pcbnew/router/router_preview_item.cpp @@ -0,0 +1,197 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include + +#include "class_track.h" +#include + +#include "router_preview_item.h" + +#include "pns_line.h" +#include "pns_segment.h" +#include "pns_via.h" + +using namespace KiGfx; + +ROUTER_PREVIEW_ITEM::ROUTER_PREVIEW_ITEM( const PNS_ITEM *aItem, VIEW_GROUP *aParent ) + : EDA_ITEM( NOT_USED ) + { + m_Flags = 0; + m_parent = aParent; + if(aItem) + Update(aItem); + } + +ROUTER_PREVIEW_ITEM::~ROUTER_PREVIEW_ITEM() +{ + +} + +void ROUTER_PREVIEW_ITEM::Update(const PNS_ITEM *aItem) +{ + m_layer = aItem->GetLayers().Start(); + + + m_color = getLayerColor( m_layer ); + m_color.a = 0.8; + + switch(aItem->GetKind()) + { + case PNS_ITEM::LINE: + m_type = PR_LINE; + m_width = static_cast(aItem)->GetWidth(); + m_line = * static_cast(aItem->GetShape()); + break; + + case PNS_ITEM::SEGMENT: + m_type = PR_LINE; + m_width = static_cast(aItem)->GetWidth(); + m_line = * static_cast(aItem->GetShape()); + break; + + case PNS_ITEM::VIA: + m_type = PR_VIA; + m_color = COLOR4D(0.7, 0.7, 0.7, 0.8); + m_width = static_cast(aItem)->GetDiameter(); + m_viaCenter = static_cast(aItem)->GetPos(); + break; + + default: + break; + } + + ViewSetVisible(true); + ViewUpdate(GEOMETRY | APPEARANCE); +} + +void ROUTER_PREVIEW_ITEM::MarkAsHead( ) +{ + if(m_type != PR_VIA) + m_color.Saturate(1.0); +} + +const BOX2I ROUTER_PREVIEW_ITEM::ViewBBox() const +{ + BOX2I bbox; + + switch(m_type) + { + case PR_LINE: + bbox = m_line.BBox(); + bbox.Inflate( m_width / 2); + return bbox; + case PR_VIA: + bbox = BOX2I( m_viaCenter, VECTOR2I(0, 0)); + bbox.Inflate( m_width / 2); + return bbox; + default: + break; + } + return bbox; +} + +void ROUTER_PREVIEW_ITEM::ViewDraw( int aLayer, KiGfx::GAL* aGal ) const +{ + switch( m_type ) + { + case PR_LINE: + + aGal->SetLayerDepth(-100.0); + aGal->SetLineWidth(m_width); + aGal->SetStrokeColor(m_color); + aGal->SetIsStroke(true); + aGal->SetIsFill(false); + for(int s= 0 ; s < m_line.SegmentCount(); s++) + aGal->DrawLine(m_line.CSegment(s).a, m_line.CSegment(s).b); + if(m_line.IsClosed()) + aGal->DrawLine(m_line.CSegment(-1).b, m_line.CSegment(0).a); + break; + case PR_VIA: + + aGal->SetLayerDepth(-101.0); + aGal->SetIsStroke(false); + aGal->SetIsFill(true); + aGal->SetFillColor(m_color); + aGal->DrawCircle(m_viaCenter, m_width / 2); + break; + default: + break; + } +} + + +void ROUTER_PREVIEW_ITEM::DebugLine ( const SHAPE_LINE_CHAIN& aLine, int aWidth , int aStyle ) +{ +#if 0 + m_line = aLine; + m_width = aWidth; + m_color = assignColor(aStyle); + + + m_type = PR_LINE; + ViewUpdate(GEOMETRY | APPEARANCE); +#endif +} + +void ROUTER_PREVIEW_ITEM::DebugBox ( const BOX2I& aBox, int aStyle ) +{ +#if 0 + assert(false); + + m_line.Clear(); + m_line.Append( aBox.GetX(), aBox.GetY() ); + m_line.Append( aBox.GetX() + aBox.GetWidth(), aBox.GetY() + aBox.GetHeight()); + m_line.Append( aBox.GetX() + aBox.GetWidth(), aBox.GetY() + aBox.GetHeight()); + m_line.Append( aBox.GetX(), aBox.GetY() + aBox.GetHeight()); + m_line.SetClosed(true); + m_width = 20000; + m_color = assignColor(aStyle); + m_type = PR_LINE; + ViewUpdate(GEOMETRY | APPEARANCE); +#endif +} + +const COLOR4D ROUTER_PREVIEW_ITEM::getLayerColor (int layer ) const +{ + //assert (m_view != NULL); + + PCB_RENDER_SETTINGS *settings = static_cast (m_parent -> GetView() -> GetPainter() -> GetSettings()); + return settings->GetLayerColor(layer); +} + + +const COLOR4D ROUTER_PREVIEW_ITEM::assignColor ( int style ) const +{ + COLOR4D color; + switch(style) + { + case 0: color =COLOR4D(0, 1, 0, 1);break; + case 1: color =COLOR4D(1, 0, 0, 0.3);break; + case 2: color =COLOR4D(1, 0.5, 0.5, 1);break; + case 3: color =COLOR4D(0, 0, 1, 1);break; + case 4: color =COLOR4D(1, 1, 1, 1); break; + case 5: color =COLOR4D(1, 1, 0, 1); break; + case 6: color =COLOR4D(0, 1, 1, 1); break; + case 32: color =COLOR4D(0, 0, 1, 0.5); break; + default: break; + } + return color; +} diff --git a/pcbnew/router/router_preview_item.h b/pcbnew/router/router_preview_item.h new file mode 100644 index 0000000000..bedd8a0c2a --- /dev/null +++ b/pcbnew/router/router_preview_item.h @@ -0,0 +1,103 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef __ROUTER_PREVIEW_ITEM_H +#define __ROUTER_PREVIEW_ITEM_H + +#include + +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include + +class PNS_ITEM; +class PNS_ROUTER; + +class ROUTER_PREVIEW_ITEM : public EDA_ITEM +{ + public: + enum ItemType { + PR_VIA, + PR_LINE, + PR_STUCK_MARKER + }; + + enum ItemFlags { + PR_SUGGESTION = 1 + }; + + ROUTER_PREVIEW_ITEM( const PNS_ITEM *aItem = NULL, KiGfx::VIEW_GROUP *aParent = NULL ); + ~ROUTER_PREVIEW_ITEM(); + + void Update ( const PNS_ITEM *aItem); + + void StuckMarker( VECTOR2I& aPosition ); + void DebugLine ( const SHAPE_LINE_CHAIN& aLine, int aWidth = 0, int aStyle = 0 ); + void DebugBox ( const BOX2I& aBox, int aStyle = 0); + void Show(int a, std::ostream& b) const {}; + + const BOX2I ViewBBox() const; + + + virtual void ViewDraw( int aLayer, KiGfx::GAL* aGal ) const; + + virtual void ViewGetLayers( int aLayers[], int& aCount ) const + { + aLayers[0] = GP_OVERLAY; + aCount = 1; + } + + void MarkAsHead( ); + + private: + + const KiGfx::COLOR4D assignColor ( int style ) const; + const KiGfx::COLOR4D getLayerColor (int layer ) const; + + KiGfx::VIEW_GROUP *m_parent; + + PNS_ROUTER *m_router; + SHAPE_LINE_CHAIN m_line; + + ItemType m_type; + int m_style; + int m_width; + int m_layer; + + KiGfx::COLOR4D m_color; + + VECTOR2I m_stuckPosition; + VECTOR2I m_viaCenter; + +}; + + +#endif diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp new file mode 100644 index 0000000000..7583dce6ce --- /dev/null +++ b/pcbnew/router/router_tool.cpp @@ -0,0 +1,397 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include +#include + +#include "class_drawpanel_gal.h" +#include "class_board_item.h" +#include "class_board.h" + +#include +#include +#include +#include + +#include +#include + +#include "router_tool.h" +#include "pns_segment.h" +#include "pns_router.h" +#include "trace.h" + +using namespace KiGfx; +using namespace std; +using boost::optional; + +static TOOL_ACTION ACT_AutoEndRoute ( "AutoEndRoute", SCOPE_CONTEXT, 'F' ); +static TOOL_ACTION ACT_PlaceVia ( "PlaceVia", SCOPE_CONTEXT, 'V' ); +static TOOL_ACTION ACT_OpenRouteOptions ( "OpenRouterOptions", SCOPE_CONTEXT, 'E' ); +static TOOL_ACTION ACT_SwitchPosture ( "SwitchPosture", SCOPE_CONTEXT, '/' ); +static TOOL_ACTION ACT_EndTrack ( "SwitchPosture", SCOPE_CONTEXT, WXK_END ); + +ROUTER_TOOL::ROUTER_TOOL() : + TOOL_INTERACTIVE( "pcbnew.InteractiveRouter" ) +{ + m_router = NULL; + m_menu = new CONTEXT_MENU ; + + m_menu->SetTitle( wxT( "Interactive router") ); // fixme: not implemented yet. Sorry. + m_menu->Add( wxT ("Cancel"), 0); + m_menu->Add( wxT ("New track"), 1); + m_menu->Add( wxT ("End track"), 2); + m_menu->Add( wxT ("Auto-end track"), 2); + m_menu->Add( wxT ("Place via"), 3); + m_menu->Add( wxT ("Switch posture"), 4); + + m_menu->Add( wxT ("Routing options..."), 5); +} + + +ROUTER_TOOL::~ROUTER_TOOL() +{ + delete m_router; +} + + +void ROUTER_TOOL::Reset() +{ + + if(m_router) + delete m_router; + + m_router = new PNS_ROUTER; + + TRACEn(0,"Reset"); + m_router->ClearWorld(); + m_router->SetBoard( getModel (PCB_T) ); + m_router->SyncWorld(); + + if(getView()) + m_router->SetView( getView() ); + + Go( &ROUTER_TOOL::Main, TOOL_EVENT( TC_Command, TA_ActivateTool, GetName() ) ); +} + +int ROUTER_TOOL::getDefaultWidth( int aNetCode ) +{ + int w, d1, d2; + getNetclassDimensions( aNetCode, w, d1, d2); + return w; +} + +void ROUTER_TOOL::getNetclassDimensions ( int aNetCode, int& aWidth, int& aViaDiameter, int& aViaDrill) +{ + BOARD *board = getModel (PCB_T); + + NETCLASS* netClass = NULL; + NETINFO_ITEM *ni = board->FindNet(aNetCode); + + if(ni) + { + wxString netClassName = ni->GetClassName(); + netClass = board->m_NetClasses.Find( netClassName ); + } + + if( !netClass ) + netClass = board->m_NetClasses.GetDefault(); + + aWidth = netClass->GetTrackWidth(); + aViaDiameter = netClass->GetViaDiameter(); + aViaDrill = netClass->GetViaDrill(); +} + + +PNS_ITEM *ROUTER_TOOL::pickSingleItem( const VECTOR2I& aWhere, int aNet, int aLayer ) +{ + int tl = getView()->GetTopLayer(); + + if(aLayer > 0) + tl = aLayer; + + PNS_ITEM *picked_seg = NULL, *picked_via = NULL; + PNS_ITEMSET candidates = m_router->QueryHoverItems(aWhere); + + BOOST_FOREACH( PNS_ITEM *item, candidates.Items() ) + { + if( !IsCopperLayer(item->GetLayers().Start()) ) + continue; + + if( item->GetParent() && !item->GetParent()->ViewIsVisible() ) + continue; + + if( aNet < 0 || item->GetNet() == aNet ) + { + if( item->OfKind (PNS_ITEM::VIA | PNS_ITEM::SOLID) ) + { + if(item->GetLayers().Overlaps(tl) || !picked_via) + picked_via = item; + } else { + if(item->GetLayers().Overlaps(tl) || !picked_seg) + picked_seg = item; + } + } + } + + if( DisplayOpt.ContrastModeDisplay ) + { + if( picked_seg && !picked_seg->GetLayers().Overlaps(tl)) + picked_seg = NULL; + } + + PNS_ITEM *rv = picked_via ? picked_via : picked_seg; + + if( rv && aLayer >= 0 && !rv-> GetLayers().Overlaps(aLayer) ) + rv = NULL; + + if(rv) + TRACE(0, "%s, layer : %d, tl: %d", rv->GetKindStr().c_str() % rv->GetLayers().Start() % tl); + + return rv; +} + + + +void ROUTER_TOOL::setMsgPanel ( bool enabled, int entry, const wxString& aUpperMessage, const wxString& aLowerMessage ) +{ + PCB_EDIT_FRAME *frame = getEditFrame (); + + if(m_panelItems.size() <= (unsigned int) entry) + m_panelItems.resize(entry + 1); + + m_panelItems[entry] = MSG_PANEL_ITEM( aUpperMessage, aLowerMessage, BLACK ); + frame->SetMsgPanel(m_panelItems); +} + +void ROUTER_TOOL::clearMsgPanel() +{ + PCB_EDIT_FRAME *frame = getEditFrame (); + + frame->ClearMsgPanel(); +} + +void ROUTER_TOOL::highlightNet(bool enabled, int netcode) +{ + RENDER_SETTINGS *rs = getView()->GetPainter()->GetSettings(); + + if(netcode >= 0 && enabled) + rs->SetHighlight(true, netcode); + else + rs->SetHighlight(false); + + getView()->UpdateAllLayersColor(); +} + +void ROUTER_TOOL::updateStartItem( TOOL_EVENT& aEvent ) +{ + VIEW_CONTROLS *ctls = getViewControls(); + int tl = getView()->GetTopLayer(); + PNS_ITEM *startItem = NULL; + + if( aEvent.IsMotion() || aEvent.IsClick() ) + { + VECTOR2I p = aEvent.Position(); + startItem = pickSingleItem(p); + + + + if(startItem && startItem->GetNet() >= 0) + { + bool dummy; + VECTOR2I cursorPos = m_router->SnapToItem (startItem, p, dummy); + ctls->ForceCursorPosition(true, cursorPos); + + m_startSnapPoint = cursorPos; + if(startItem->GetLayers().IsMultilayer()) + m_startLayer = tl; + else + m_startLayer = startItem->GetLayers().Start(); + + m_startItem = startItem; + } else { + m_startItem = NULL; + m_startSnapPoint = p; + m_startLayer = tl; + ctls->ForceCursorPosition(false); + } + } +} + +void ROUTER_TOOL::updateEndItem( TOOL_EVENT& aEvent ) +{ + VIEW_CONTROLS *ctls = getViewControls(); + VECTOR2I p = aEvent.Position(); + int layer; + + if(m_router->GetCurrentNet() < 0 || !m_startItem) + { + m_endItem = NULL; + m_endSnapPoint = p; + return; + } + + bool dummy; + + if(m_router->IsPlacingVia()) + layer = -1; + else + layer = m_router->GetCurrentLayer(); + + PNS_ITEM *endItem = pickSingleItem(p, m_startItem->GetNet(), layer ); + + if(endItem) + { + VECTOR2I cursorPos = m_router->SnapToItem (endItem, p, dummy); + ctls->ForceCursorPosition(true, cursorPos); + m_endItem = endItem; + m_endSnapPoint = cursorPos; + } else { + m_endItem = NULL; + m_endSnapPoint = p; + ctls->ForceCursorPosition(false); + } + + if(m_endItem) + TRACE(0, "%s, layer : %d", m_endItem->GetKindStr().c_str() % m_endItem->GetLayers().Start() ); +} + +void ROUTER_TOOL::startRouting ( ) +{ + VIEW_CONTROLS *ctls = getViewControls(); + + int width = getDefaultWidth( m_startItem ? m_startItem->GetNet() : -1); + if(m_startItem && m_startItem->OfKind(PNS_ITEM::SEGMENT)) + width = static_cast(m_startItem)->GetWidth(); + + m_router->SetCurrentWidth(width); + m_router->SwitchLayer(m_startLayer); + + getEditFrame() -> SetTopLayer (m_startLayer); + + if(m_startItem && m_startItem->GetNet() >= 0) + highlightNet(true, m_startItem->GetNet() ); + + ctls->ForceCursorPosition(false); + ctls->SetAutoPan(true); + + m_router->StartRouting( m_startSnapPoint, m_startItem ); + + m_endItem = NULL; + m_endSnapPoint = m_startSnapPoint; + + while( OPT_TOOL_EVENT evt = Wait() ) + { + if( evt->IsCancel() ) + break; + else if (evt->IsMotion()) + { + updateEndItem( *evt ); + m_router->Move ( m_endSnapPoint, m_endItem ); + } + else if (evt->IsClick (MB_Left )) + { + updateEndItem( *evt ); + if(m_router->FixRoute(m_endSnapPoint, m_endItem)) + break; + m_router->Move ( m_endSnapPoint, m_endItem ); + } else if (evt->IsKeyUp()) + { + switch( evt->KeyCode() ) + { + case 'V': + { + int w, diameter, drill; + getNetclassDimensions( m_router->GetCurrentNet(), w, diameter, drill ); + m_router->SetCurrentViaDiameter(diameter); + m_router->SetCurrentViaDrill(drill); + m_router->ToggleViaPlacement(); + getEditFrame() -> SetTopLayer (m_router->GetCurrentLayer()); + m_router->Move ( m_endSnapPoint, m_endItem ); + break; + } + + case '/': + m_router->FlipPosture(); + break; + + case '+': + case '=': + m_router->SwitchLayer ( m_router->NextCopperLayer (true) ); + updateEndItem( *evt ); + getEditFrame() -> SetTopLayer (m_router->GetCurrentLayer()); + m_router->Move ( m_endSnapPoint, m_endItem ); + + break; + + case '-': + m_router->SwitchLayer ( m_router->NextCopperLayer (false) ); + getEditFrame() -> SetTopLayer (m_router->GetCurrentLayer()); + m_router->Move ( m_endSnapPoint, m_endItem ); + break; + } + } + } + + if(m_router->RoutingInProgress()) + m_router->StopRouting(); + + ctls->SetAutoPan(false); + ctls->ForceCursorPosition(false); + highlightNet(false); +} + + +int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) +{ + VIEW_CONTROLS *ctls = getViewControls(); + + //SetContextMenu ( m_menu ); + //setMsgPanel(true, 0, wxT("KiRouter"), wxT("Pick an item to start routing")); + + ctls->SetSnapping ( true ); + ctls->ShowCursor( true ); + + // Main loop: keep receiving events + while( OPT_TOOL_EVENT evt = Wait() ) + { + + if( evt->IsCancel() ) + break; // Finish + else if( evt->IsMotion( ) ) + updateStartItem( *evt ); + else if( evt->IsClick ( MB_Left ) ) + { + updateStartItem( *evt ); + startRouting( ); + } + } + + + //clearMsgPanel(); + + // Restore the default settings + ctls->SetAutoPan( false ); + ctls->ShowCursor( false ); + + return 0; +} + + diff --git a/pcbnew/router/router_tool.h b/pcbnew/router/router_tool.h new file mode 100644 index 0000000000..abf7dabb38 --- /dev/null +++ b/pcbnew/router/router_tool.h @@ -0,0 +1,79 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef __ROUTER_TOOL_H +#define __ROUTER_TOOL_H + +#include +#include + +#include +#include + +#include +#include + +#include "pns_layerset.h" + +class PNS_ROUTER; +class PNS_ITEM; + +class ROUTER_TOOL : public TOOL_INTERACTIVE +{ +public: + ROUTER_TOOL(); + ~ROUTER_TOOL(); + + void Reset(); + int Main( TOOL_EVENT& aEvent ); + +private: + + PNS_ITEM *pickSingleItem( const VECTOR2I& aWhere, int aNet = -1, int aLayer = -1 ); + + + void setMsgPanel ( bool enabled, int entry, const wxString& aUpperMessage = wxT(""), const wxString& aLowerMessage = wxT("") ); + void clearMsgPanel(); + + int getDefaultWidth( int aNetCode ); + void startRouting ( ); + void highlightNet(bool enabled, int netcode = -1); + + void updateStartItem( TOOL_EVENT& aEvent ); + void updateEndItem( TOOL_EVENT& aEvent ); + + void getNetclassDimensions ( int aNetCode, int& aWidth, int& aViaDiameter, int& aViaDrill); + + MSG_PANEL_ITEMS m_panelItems; + + PNS_ROUTER *m_router; + + PNS_ITEM *m_startItem; + int m_startLayer; + VECTOR2I m_startSnapPoint; + + PNS_ITEM *m_endItem; + VECTOR2I m_endSnapPoint; + + /*boost::shared_ptr m_menu;*/ + CONTEXT_MENU * m_menu; +}; + +#endif diff --git a/pcbnew/router/trace.h b/pcbnew/router/trace.h new file mode 100644 index 0000000000..afce94d148 --- /dev/null +++ b/pcbnew/router/trace.h @@ -0,0 +1,51 @@ +/* + * KiRouter - a push-and-(sometimes-)shove PCB router + * + * Copyright (C) 2013 CERN + * Author: Tomasz Wlostowski + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#ifndef __TRACE_H +#define __TRACE_H + + +#ifdef DEBUG + +#include +#include +#include + +static void _trace_print(const char *funcName, int level, const std::string& msg) +{ + std::cerr << "trace[" << level << "]: " << funcName << ": " << msg << std::endl; +} + + + +#define TRACE(level, fmt, ...) \ + _trace_print(__FUNCTION__, level, (boost::format(fmt) % __VA_ARGS__).str() ); + +#define TRACEn(level, msg) \ + _trace_print(__FUNCTION__, level, std::string(msg)); + +#else + +#define TRACE(level, fmt, ...) +#define TRACEn(level, msg) + +#endif + +#endif From dca79490dabb2a4f1adc6a23fca3aff79dc21e80 Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Wed, 18 Sep 2013 19:56:37 +0200 Subject: [PATCH 355/415] P&S router: some missing files --- include/profile.h | 147 +++++++++++++++++++++++++++++++++++++ include/tool/tool_action.h | 86 ++++++++++++++++++++++ 2 files changed, 233 insertions(+) create mode 100644 include/profile.h create mode 100644 include/tool/tool_action.h diff --git a/include/profile.h b/include/profile.h new file mode 100644 index 0000000000..f779dfae59 --- /dev/null +++ b/include/profile.h @@ -0,0 +1,147 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file profile.h: + * @brief Simple profiling functions for measuring code execution time. + */ + +#ifndef __TPROFILE_H +#define __TPROFILE_H + +#include +#include + +/** + * Function rdtsc + * Returns processor's time-stamp counter. Main purpose is precise time measuring of code + * execution time. + * @return unsigned long long - Value of time-stamp counter. + */ +#if defined(__i386__) +static __inline__ unsigned long long rdtsc() +{ + unsigned long long int x; + __asm__ volatile ( ".byte 0x0f, 0x31" : "=A" ( x ) ); + + return x; +} + + +#elif defined(__x86_64__) +static __inline__ unsigned long long rdtsc() +{ + unsigned hi, lo; + __asm__ __volatile__ ( "rdtsc" : "=a" ( lo ), "=d" ( hi ) ); + + return ( (unsigned long long) lo ) | ( ( (unsigned long long) hi ) << 32 ); +} + + +#elif defined(__powerpc__) +static __inline__ unsigned long long rdtsc() +{ + unsigned long long int result = 0; + unsigned long int upper, lower, tmp; + __asm__ volatile ( + "0: \n" + "\tmftbu %0 \n" + "\tmftb %1 \n" + "\tmftbu %2 \n" + "\tcmpw %2,%0 \n" + "\tbne 0b \n" + : "=r" ( upper ), "=r" ( lower ), "=r" ( tmp ) + ); + + result = upper; + result = result << 32; + result = result | lower; + + return result; +} + + +#endif /* __powerpc__ */ + +// Fixme: OS X version +/** + * Function get_tics + * Returns the number of microseconds that have elapsed since the system was started. + * @return uint64_t Number of microseconds. + */ +static inline uint64_t get_tics() +{ + struct timeval tv; + gettimeofday( &tv, NULL ); + + return (uint64_t) tv.tv_sec * 1000000ULL + (uint64_t) tv.tv_usec; +} + + +/** + * Structure for storing data related to profiling counters. + */ +struct prof_counter +{ + uint64_t value; /// Stored timer value + bool use_rdtsc; /// Method of time measuring (rdtsc or tics) +}; + +/** + * Function prof_start + * Begins code execution time counting for a given profiling counter. + * @param cnt is the counter which should be started. + * @param use_rdtsc tells if processor's time-stamp counter should be used for time counting. + * Otherwise is system tics method will be used. IMPORTANT: time-stamp counter should not + * be used on multicore machines executing threaded code. + */ +static inline void prof_start( prof_counter* cnt, bool use_rdtsc ) +{ + cnt->use_rdtsc = use_rdtsc; + + if( use_rdtsc ) + { + cnt->value = rdtsc(); + } + else + { + cnt->value = get_tics(); + } +} + + +/** + * Function prof_stop + * Ends code execution time counting for a given profiling counter. + * @param cnt is the counter which should be stopped. + */ +static inline void prof_end( prof_counter* cnt ) +{ + if( cnt->use_rdtsc ) + cnt->value = rdtsc() - cnt->value; + else + cnt->value = get_tics() - cnt->value; +} + +#endif diff --git a/include/tool/tool_action.h b/include/tool/tool_action.h new file mode 100644 index 0000000000..e2eced3359 --- /dev/null +++ b/include/tool/tool_action.h @@ -0,0 +1,86 @@ +#ifndef __TOOL_ACTION_H +#define __TOOL_ACTION_H + +#include +#include + +#include + +///> Scope of tool actions +enum TOOL_ActionScope { + SCOPE_CONTEXT = 1, ///> Action belongs to a particular tool (i.e. a part of a pop-up menu) + SCOPE_GLOBAL ///> Global action (toolbar/main menu event, global shortcut) +}; + +// TOOL_ACTION - represents a single action. For instance: +// - changing layer to top by pressing PgUp +// - running the DRC from the menu +// and so on, and so forth.... +class TOOL_ACTION +{ + public: + + + TOOL_ACTION + ( + const std::string& name, + TOOL_ActionScope scope = SCOPE_GLOBAL, + int aDefaultHotKey = 0, + const wxString& menuItem = wxT(""), + const wxString& menuDesc = wxT("") + ) : + m_name(name), + m_scope(scope), + m_defaultHotKey(aDefaultHotKey), + m_currentHotKey(aDefaultHotKey), + m_menuItem(menuItem), + m_menuDescription(menuDesc) {} + + bool operator == ( const TOOL_ACTION& rhs ) const + { + return m_id == rhs.m_id; + } + + bool operator != ( const TOOL_ACTION& rhs ) const + { + return m_id != rhs.m_id; + } + + bool hasHotKey() const + { + return m_currentHotKey > 0; + } + + private: + friend class TOOL_MANAGER; + + void setId ( int aId ) + { + m_id = aId; + } + + + // name of the action (convention is: app.[tool.]action.name) + std::string m_name; + TOOL_ActionScope m_scope; + int m_defaultHotKey; + int m_currentHotKey; + + // Menu item text + wxString m_menuItem; + // Pop-up help + wxString m_menuDescription; + + //KiBitmap m_bitmap; + + // Unique ID for fast matching. Assigned by TOOL_MANAGER + int m_id; + + // Origin of the action + TOOL_BASE *m_origin; + + // Originating UI object + wxWindow *m_uiOrigin; +}; + +#endif From d04d93eb9b696772963c78c3cc005a684c7d89cf Mon Sep 17 00:00:00 2001 From: "tomasz.wlostowski@cern.ch" Date: Wed, 18 Sep 2013 20:11:21 +0200 Subject: [PATCH 356/415] A very short insturction for the P&S Router. --- Documentation/pns_router.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Documentation/pns_router.txt diff --git a/Documentation/pns_router.txt b/Documentation/pns_router.txt new file mode 100644 index 0000000000..209a950931 --- /dev/null +++ b/Documentation/pns_router.txt @@ -0,0 +1,11 @@ +So, finally we've got an integrated interactive, push-and-sometimes-shove router, although with a very limited user interface: + +- Edit->Interactive router launches the tool, +- while routing: 'V' key places a via, +- '+' and '-' keys cycle through available layers, +- '/' key switches track posture. + +Via/track dimensions are taken from the netclasses. +There are no other options available for the time being - promise to add them soon :) + +Tom \ No newline at end of file From 2d52cb1d552e7efc2993e4a8979698be6d4e20a8 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 19 Sep 2013 09:55:37 +0200 Subject: [PATCH 357/415] Moved GalLayersOrder from layers_id_colors_and_visibility.h to PCB_BASE_FRAME. --- include/layers_id_colors_and_visibility.h | 39 --------------------- include/wxBasePcbFrame.h | 2 ++ pcbnew/basepcbframe.cpp | 42 +++++++++++++++++++++-- 3 files changed, 42 insertions(+), 41 deletions(-) diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index 6959ad3fd7..1ecfef9a80 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -256,45 +256,6 @@ enum PCB_VISIBLE /// number of *all* layers including PCB and item layers #define TOTAL_LAYER_COUNT 128 //(NB_LAYERS + END_PCB_VISIBLE_LIST) -/// Rendering order of layers on GAL-based canvas (lower index in the array -/// means that layer is displayed closer to the user, ie. on the top). -const LAYER_NUM GalLayerOrder[] = -{ - ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( SELECTION ), - ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), - DRAW_N, COMMENT_N, ECO1_N, ECO2_N, EDGE_N, - UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31, - ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ), - ITEM_GAL_LAYER( MOD_REFERENCES_VISIBLE), ITEM_GAL_LAYER( MOD_VALUES_VISIBLE ), - - ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), - ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), - - ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ), SOLDERMASK_N_FRONT, - ITEM_GAL_LAYER( LAYER_16_NETNAMES_VISIBLE ), LAYER_N_FRONT, - SILKSCREEN_N_FRONT, SOLDERPASTE_N_FRONT, ADHESIVE_N_FRONT, - ITEM_GAL_LAYER( LAYER_15_NETNAMES_VISIBLE ), LAYER_N_15, - ITEM_GAL_LAYER( LAYER_14_NETNAMES_VISIBLE ), LAYER_N_14, - ITEM_GAL_LAYER( LAYER_13_NETNAMES_VISIBLE ), LAYER_N_13, - ITEM_GAL_LAYER( LAYER_12_NETNAMES_VISIBLE ), LAYER_N_12, - ITEM_GAL_LAYER( LAYER_11_NETNAMES_VISIBLE ), LAYER_N_11, - ITEM_GAL_LAYER( LAYER_10_NETNAMES_VISIBLE ), LAYER_N_10, - ITEM_GAL_LAYER( LAYER_9_NETNAMES_VISIBLE ), LAYER_N_9, - ITEM_GAL_LAYER( LAYER_8_NETNAMES_VISIBLE ), LAYER_N_8, - ITEM_GAL_LAYER( LAYER_7_NETNAMES_VISIBLE ), LAYER_N_7, - ITEM_GAL_LAYER( LAYER_6_NETNAMES_VISIBLE ), LAYER_N_6, - ITEM_GAL_LAYER( LAYER_5_NETNAMES_VISIBLE ), LAYER_N_5, - ITEM_GAL_LAYER( LAYER_4_NETNAMES_VISIBLE ), LAYER_N_4, - ITEM_GAL_LAYER( LAYER_3_NETNAMES_VISIBLE ), LAYER_N_3, - ITEM_GAL_LAYER( LAYER_2_NETNAMES_VISIBLE ), LAYER_N_2, - ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ), SOLDERMASK_N_BACK, - ITEM_GAL_LAYER( LAYER_1_NETNAMES_VISIBLE ), LAYER_N_BACK, - - ADHESIVE_N_BACK, SOLDERPASTE_N_BACK, SILKSCREEN_N_BACK, - ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ), - ITEM_GAL_LAYER( WORKSHEET ) -}; - /** * Function IsValidLayer * tests whether a given integer is a valid layer index, i.e. can diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index fdaaa1f767..4d82b8ed73 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -115,6 +115,8 @@ protected: MODULE* loadFootprint( const FPID& aFootprintId ) throw( IO_ERROR, PARSE_ERROR ); + static const LAYER_NUM GAL_LAYER_ORDER[]; + public: PCB_BASE_FRAME( wxWindow* aParent, ID_DRAWFRAME_TYPE aFrameType, const wxString& aTitle, diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index a6c0ec42ec..7344211827 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -70,6 +70,44 @@ static const wxString DisplayModuleTextEntry( wxT( "DiModTx" ) ); static const wxString FastGrid1Entry( wxT( "FastGrid1" ) ); static const wxString FastGrid2Entry( wxT( "FastGrid2" ) ); +/// Rendering order of layers on GAL-based canvas (lower index in the array +/// means that layer is displayed closer to the user, ie. on the top). +const LAYER_NUM PCB_BASE_FRAME::GAL_LAYER_ORDER[] = +{ + ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( SELECTION ), + ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), + DRAW_N, COMMENT_N, ECO1_N, ECO2_N, EDGE_N, + UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31, + ITEM_GAL_LAYER( MOD_TEXT_FR_VISIBLE ), + ITEM_GAL_LAYER( MOD_REFERENCES_VISIBLE), ITEM_GAL_LAYER( MOD_VALUES_VISIBLE ), + + ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), + ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), + + ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_FR_VISIBLE ), SOLDERMASK_N_FRONT, + ITEM_GAL_LAYER( LAYER_16_NETNAMES_VISIBLE ), LAYER_N_FRONT, + SILKSCREEN_N_FRONT, SOLDERPASTE_N_FRONT, ADHESIVE_N_FRONT, + ITEM_GAL_LAYER( LAYER_15_NETNAMES_VISIBLE ), LAYER_N_15, + ITEM_GAL_LAYER( LAYER_14_NETNAMES_VISIBLE ), LAYER_N_14, + ITEM_GAL_LAYER( LAYER_13_NETNAMES_VISIBLE ), LAYER_N_13, + ITEM_GAL_LAYER( LAYER_12_NETNAMES_VISIBLE ), LAYER_N_12, + ITEM_GAL_LAYER( LAYER_11_NETNAMES_VISIBLE ), LAYER_N_11, + ITEM_GAL_LAYER( LAYER_10_NETNAMES_VISIBLE ), LAYER_N_10, + ITEM_GAL_LAYER( LAYER_9_NETNAMES_VISIBLE ), LAYER_N_9, + ITEM_GAL_LAYER( LAYER_8_NETNAMES_VISIBLE ), LAYER_N_8, + ITEM_GAL_LAYER( LAYER_7_NETNAMES_VISIBLE ), LAYER_N_7, + ITEM_GAL_LAYER( LAYER_6_NETNAMES_VISIBLE ), LAYER_N_6, + ITEM_GAL_LAYER( LAYER_5_NETNAMES_VISIBLE ), LAYER_N_5, + ITEM_GAL_LAYER( LAYER_4_NETNAMES_VISIBLE ), LAYER_N_4, + ITEM_GAL_LAYER( LAYER_3_NETNAMES_VISIBLE ), LAYER_N_3, + ITEM_GAL_LAYER( LAYER_2_NETNAMES_VISIBLE ), LAYER_N_2, + ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE ), ITEM_GAL_LAYER( PAD_BK_VISIBLE ), SOLDERMASK_N_BACK, + ITEM_GAL_LAYER( LAYER_1_NETNAMES_VISIBLE ), LAYER_N_BACK, + + ADHESIVE_N_BACK, SOLDERPASTE_N_BACK, SILKSCREEN_N_BACK, + ITEM_GAL_LAYER( MOD_TEXT_BK_VISIBLE ), + ITEM_GAL_LAYER( WORKSHEET ) +}; BEGIN_EVENT_TABLE( PCB_BASE_FRAME, EDA_DRAW_FRAME ) EVT_MENU_RANGE( ID_POPUP_PCB_ITEM_SELECTION_START, ID_POPUP_PCB_ITEM_SELECTION_END, @@ -833,9 +871,9 @@ void PCB_BASE_FRAME::LoadSettings() KiGfx::VIEW* view = m_galCanvas->GetView(); // Set rendering order and properties of layers - for( LAYER_NUM i = 0; (unsigned) i < sizeof(GalLayerOrder) / sizeof(LAYER_NUM); ++i ) + for( LAYER_NUM i = 0; (unsigned) i < sizeof(GAL_LAYER_ORDER) / sizeof(LAYER_NUM); ++i ) { - LAYER_NUM layer = GalLayerOrder[i]; + LAYER_NUM layer = GAL_LAYER_ORDER[i]; wxASSERT( layer < KiGfx::VIEW::VIEW_MAX_LAYERS ); view->SetLayerOrder( layer, i ); From e07a8fbe316c27ca05b7135cd6e4fcb15b00d488 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 19 Sep 2013 17:02:57 +0200 Subject: [PATCH 358/415] Removed TA_ActivateTool (now tools are invoked by sending TA_Action event, with the tool name as string parameter). Developed TOOL_Action class & added ActionManager. Hot keys registered by tools are processed. Selection & move tool can be invoked by a hot key. --- common/CMakeLists.txt | 1 + common/tool/tool_event.cpp | 2 +- common/tool/tool_manager.cpp | 123 ++++++++++++++---- include/tool/tool_action.h | 219 +++++++++++++++++++++++--------- include/tool/tool_event.h | 43 +++++-- include/tool/tool_manager.h | 140 ++++++++++++++++++-- include/view/view_group.h | 2 +- pcbnew/router/router_tool.cpp | 12 +- pcbnew/tools/move_tool.cpp | 78 ++++++------ pcbnew/tools/move_tool.h | 19 ++- pcbnew/tools/selection_tool.cpp | 108 ++++++++-------- pcbnew/tools/selection_tool.h | 18 ++- 12 files changed, 545 insertions(+), 220 deletions(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 7ccb9764c2..5b690eca51 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -162,6 +162,7 @@ set(COMMON_SRCS tool/tool_dispatcher.cpp tool/tool_event.cpp tool/tool_interactive.cpp + tool/action_manager.cpp tool/context_menu.cpp geometry/seg.cpp diff --git a/common/tool/tool_event.cpp b/common/tool/tool_event.cpp index 4c5a0c2f98..cf40310534 100644 --- a/common/tool/tool_event.cpp +++ b/common/tool/tool_event.cpp @@ -83,9 +83,9 @@ const std::string TOOL_EVENT::Format() const { TA_ViewDirty, "view-dirty" }, { TA_ChangeLayer, "change-layer" }, { TA_CancelTool, "cancel-tool" }, - { TA_ActivateTool, "activate-tool" }, { TA_ContextMenuUpdate, "context-menu-update" }, { TA_ContextMenuChoice, "context-menu-choice" }, + { TA_Action, "action" }, { 0, "" } }; diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 9e0b4ac621..1fd03b62e2 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -82,9 +82,8 @@ struct TOOL_MANAGER::TOOL_STATE TOOL_MANAGER::TOOL_MANAGER() : - m_model( NULL ), m_view( NULL ) + m_actionMgr( this ), m_model( NULL ), m_view( NULL ) { - } @@ -128,38 +127,79 @@ bool TOOL_MANAGER::InvokeTool( TOOL_ID aToolId ) TOOL_BASE* tool = FindTool( aToolId ); if( tool && tool->GetType() == TOOL_Interactive ) - { - // If the tool is already active, do not invoke it again - if( m_toolIdIndex[aToolId]->idle == false ) - return false; - - m_toolIdIndex[aToolId]->idle = false; - static_cast( tool )->Reset(); - - TOOL_EVENT evt( TC_Command, TA_ActivateTool, tool->GetName() ); - ProcessEvent( evt ); - - // Save the tool on the front of the processing queue - m_activeTools.push_front( aToolId ); - - return true; - } + return invokeTool( tool ); return false; } -bool TOOL_MANAGER::InvokeTool( const std::string& aName ) +bool TOOL_MANAGER::InvokeTool( const std::string& aToolName ) { - TOOL_BASE* tool = FindTool( aName ); + TOOL_BASE* tool = FindTool( aToolName ); - if( tool ) - return InvokeTool( tool->GetId() ); + if( tool && tool->GetType() == TOOL_Interactive ) + return invokeTool( tool ); return false; } +bool TOOL_MANAGER::invokeTool( TOOL_BASE* aTool ) +{ + wxASSERT( aTool != NULL ); + + TOOL_EVENT evt( TC_Command, TA_Action, aTool->GetName() ); + ProcessEvent( evt ); + + return true; +} + + +bool TOOL_MANAGER::runTool( TOOL_ID aToolId ) +{ + TOOL_BASE* tool = FindTool( aToolId ); + + if( tool && tool->GetType() == TOOL_Interactive ) + return runTool( tool ); + + return false; +} + + +bool TOOL_MANAGER::runTool( const std::string& aToolName ) +{ + TOOL_BASE* tool = FindTool( aToolName ); + + if( tool && tool->GetType() == TOOL_Interactive ) + return runTool( tool ); + + return false; +} + + +bool TOOL_MANAGER::runTool( TOOL_BASE* aTool ) +{ + wxASSERT( aTool != NULL ); + + if( !isRegistered( aTool ) ) + return false; + + TOOL_STATE* state = m_toolState[aTool]; + + // If the tool is already active, do not invoke it again + if( state->idle == false ) + return false; + state->idle = false; + + static_cast( aTool )->Reset(); + + // Add the tool on the front of the processing queue (it gets events first) + m_activeTools.push_front( aTool->GetId() ); + + return true; +} + + TOOL_BASE* TOOL_MANAGER::FindTool( int aId ) const { std::map::const_iterator it = m_toolIdIndex.find( aId ); @@ -228,7 +268,8 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) finishTool( st ); } - // The tool requested to stop propagating event to other tools + // If the tool did not request to propagate + // the event to other tools, we should stop it now if( !m_passEvent ) break; } @@ -269,6 +310,21 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) } +bool TOOL_MANAGER::dispatchActivation( TOOL_EVENT& aEvent ) +{ + BOOST_FOREACH( TOOL_STATE* st, m_toolState | boost::adaptors::map_values ) + { + if( st->theTool->GetName() == aEvent.m_commandStr ) + { + runTool( st->theTool ); + return true; + } + } + + return false; +} + + void TOOL_MANAGER::finishTool( TOOL_STATE* aState ) { wxASSERT( m_activeTools.front() == aState->theTool->GetId() ); @@ -286,8 +342,18 @@ bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) { // wxLogDebug( "event: %s", aEvent.Format().c_str() ); + if( aEvent.Action() == TA_KeyUp ) + { + // Check if there is a hotkey associated + if( m_actionMgr.RunHotKey( aEvent.Modifier() | aEvent.KeyCode() ) ) + return false; // hotkey event was handled so it does not go any further + } else if( aEvent.Category() == TC_Command ) // it may be a tool activation event + { + dispatchActivation( aEvent ); + } + dispatchInternal( aEvent ); - + BOOST_FOREACH( TOOL_ID toolId, m_activeTools ) { TOOL_STATE* st = m_toolIdIndex[toolId]; @@ -359,3 +425,12 @@ void TOOL_MANAGER::SetEnvironment( EDA_ITEM* aModel, KiGfx::VIEW* aView, static_cast( tool )->Reset(); } } + + +bool TOOL_MANAGER::isActive( TOOL_BASE* aTool ) +{ + if( !isRegistered( aTool ) ) + return false; + + return !m_toolState[aTool]->idle; +} diff --git a/include/tool/tool_action.h b/include/tool/tool_action.h index e2eced3359..61ef7ad886 100644 --- a/include/tool/tool_action.h +++ b/include/tool/tool_action.h @@ -1,3 +1,27 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #ifndef __TOOL_ACTION_H #define __TOOL_ACTION_H @@ -5,82 +29,157 @@ #include #include - -///> Scope of tool actions -enum TOOL_ActionScope { - SCOPE_CONTEXT = 1, ///> Action belongs to a particular tool (i.e. a part of a pop-up menu) - SCOPE_GLOBAL ///> Global action (toolbar/main menu event, global shortcut) -}; +#include // TOOL_ACTION - represents a single action. For instance: // - changing layer to top by pressing PgUp // - running the DRC from the menu // and so on, and so forth.... -class TOOL_ACTION +class TOOL_ACTION { - public: - +public: + TOOL_ACTION( const std::string& aName, TOOL_ActionScope aScope = AS_CONTEXT, int aDefaultHotKey = 0, + const wxString& aMenuItem = wxT( "" ), const wxString& aMenuDesc = wxT( "" ) ) : + m_name( aName ), m_scope( aScope ), m_defaultHotKey( aDefaultHotKey ), + m_currentHotKey( aDefaultHotKey ), m_menuItem( aMenuItem ), + m_menuDescription( aMenuDesc ), m_id( -1 ), m_actionMgr( NULL ) + { + } - TOOL_ACTION - ( - const std::string& name, - TOOL_ActionScope scope = SCOPE_GLOBAL, - int aDefaultHotKey = 0, - const wxString& menuItem = wxT(""), - const wxString& menuDesc = wxT("") - ) : - m_name(name), - m_scope(scope), - m_defaultHotKey(aDefaultHotKey), - m_currentHotKey(aDefaultHotKey), - m_menuItem(menuItem), - m_menuDescription(menuDesc) {} + ~TOOL_ACTION() + { + if( m_actionMgr ) + m_actionMgr->UnregisterAction( this ); + } - bool operator == ( const TOOL_ACTION& rhs ) const - { - return m_id == rhs.m_id; - } + bool operator==( const TOOL_ACTION& aRhs ) const + { + return m_id == aRhs.m_id; + } - bool operator != ( const TOOL_ACTION& rhs ) const - { - return m_id != rhs.m_id; - } + bool operator!=( const TOOL_ACTION& aRhs ) const + { + return m_id != aRhs.m_id; + } - bool hasHotKey() const - { - return m_currentHotKey > 0; - } + /** + * Function GetName() + * Returns name of the action. It is the same one that is contained in TOOL_EVENT that is + * sent by activating the TOOL_ACTION. + * + * @return Name of the action. + */ + const std::string& GetName() const + { + return m_name; + } - private: - friend class TOOL_MANAGER; + /** + * Function GetId() + * Returns the unique id of the TOOL_ACTION object. It is valid only after registering the + * TOOL_ACTION by ACTION_MANAGER. + * + * @return The unique identification number. If the number is negative, then it is not valid. + */ + int GetId() const + { + return m_id; + } - void setId ( int aId ) - { - m_id = aId; - } + /** + * Function ChangeHotKey() + * Assigns a new hot key. + * + * @param aNewHotKey is the new hot key. + */ + void ChangeHotKey( int aNewHotKey ) + { + wxASSERT_MSG( false, wxT( "It is not fully implemented yet") ); + // I mean it has to be changed in the ACTION_MANAGER, or change the implementation + m_currentHotKey = aNewHotKey; + } + /** + * Function RestoreHotKey() + * Changes the assigned hot key to the default one. + */ + void RestoreHotKey() + { + wxASSERT_MSG( false, wxT( "It is not fully implemented yet") ); + // I mean it has to be changed in the ACTION_MANAGER, or change the implementation + m_currentHotKey = m_defaultHotKey; + } - // name of the action (convention is: app.[tool.]action.name) - std::string m_name; - TOOL_ActionScope m_scope; - int m_defaultHotKey; - int m_currentHotKey; - - // Menu item text - wxString m_menuItem; - // Pop-up help - wxString m_menuDescription; - - //KiBitmap m_bitmap; + /** + * Function HasHotKey() + * Checks if the action has a hot key assigned. + * + * @return True if there is a hot key assigned, false otherwise. + * + */ + bool HasHotKey() const + { + return m_currentHotKey > 0; + } - // Unique ID for fast matching. Assigned by TOOL_MANAGER - int m_id; + /** + * Function GetEvent() + * Returns the event associated with the action (ie. the event that will be sent after + * activating the action). + * + * @return The event associated with the action. + */ + TOOL_EVENT GetEvent() const + { + return TOOL_EVENT( TC_Command, TA_Action, m_name, m_scope ); + } - // Origin of the action - TOOL_BASE *m_origin; +private: + friend class ACTION_MANAGER; - // Originating UI object - wxWindow *m_uiOrigin; + /// Assigns an unique identifier. It is given by an instance of ACTION_MANAGER. + void setId( int aId ) + { + m_id = aId; + } + + /// Assigns ACTION_MANAGER object that handles the TOOL_ACTION. + void setActionMgr( ACTION_MANAGER* aManager ) + { + m_actionMgr = aManager; + } + + /// Name of the action (convention is: app.[tool.]action.name) + std::string m_name; + + /// Scope of the action (ie. the event that is issued after activation). + TOOL_ActionScope m_scope; + + /// Default hot key that activates the action. + const int m_defaultHotKey; + + /// Custom assigned hot key that activates the action. + int m_currentHotKey; + + /// Menu entry text + wxString m_menuItem; + + /// Pop-up help + wxString m_menuDescription; + + // Icon for menu entry + //KiBitmap m_bitmap; + + /// Unique ID for fast matching. Assigned by ACTION_MANAGER. + int m_id; + + /// Action manager that handles this TOOL_ACTION. + ACTION_MANAGER* m_actionMgr; + + /// Origin of the action +// const TOOL_BASE* m_origin; + + /// Originating UI object +// wxWindow* m_uiOrigin; }; - #endif diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index 592624c321..60c8eba326 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -74,15 +74,16 @@ enum TOOL_Actions // Tool cancel event. Issued automagically when the user hits escape or selects End Tool from the context menu. TA_CancelTool = 0x2000, - // Tool activation event. Issued by the GUI upon pressing a button/menu selection. - TA_ActivateTool = 0x4000, - // Context menu update. Issued whenever context menu is open and the user hovers the mouse over one of choices. // Used in dynamic highligting in disambiguation menu - TA_ContextMenuUpdate = 0x8000, + TA_ContextMenuUpdate = 0x4000, // Context menu choice. Sent if the user picked something from the context menu or closed it without selecting anything. - TA_ContextMenuChoice = 0x10000, + TA_ContextMenuChoice = 0x8000, + + // Tool action + TA_Action = 0x10000, + TA_Any = 0xffffffff }; @@ -104,7 +105,15 @@ enum TOOL_Modifiers MD_ModifierMask = MD_ModShift | MD_ModCtrl | MD_ModAlt, }; -// Defines when a context menu is opened. +/// Scope of tool actions +enum TOOL_ActionScope +{ + AS_CONTEXT = 1, ///> Action belongs to a particular tool (i.e. a part of a pop-up menu) + AS_ACTIVE, ///> All active tools + AS_GLOBAL ///> Global action (toolbar/main menu event, global shortcut) +}; + +/// Defines when a context menu is opened. enum CONTEXT_MENU_TRIGGER { CMENU_BUTTON = 0, // On the right button @@ -122,16 +131,19 @@ class TOOL_EVENT public: const std::string Format() const; - TOOL_EVENT( TOOL_EventCategory aCategory = TC_None, TOOL_Actions aAction = TA_None ) : + TOOL_EVENT( TOOL_EventCategory aCategory = TC_None, TOOL_Actions aAction = TA_None, + TOOL_ActionScope aScope = AS_GLOBAL ) : m_category( aCategory ), m_actions( aAction ), + m_scope( aScope ), m_mouseButtons( 0 ), m_keyCode( 0 ), m_modifiers( 0 ) {} - TOOL_EVENT( TOOL_EventCategory aCategory, TOOL_Actions aAction, int aExtraParam ) : + TOOL_EVENT( TOOL_EventCategory aCategory, TOOL_Actions aAction, int aExtraParam, TOOL_ActionScope aScope = AS_GLOBAL ) : m_category( aCategory ), - m_actions( aAction ) + m_actions( aAction ), + m_scope( aScope ) { if( aCategory == TC_Mouse ) { @@ -153,16 +165,16 @@ public: } TOOL_EVENT( TOOL_EventCategory aCategory, TOOL_Actions aAction, - const std::string& aExtraParam ) : + const std::string& aExtraParam, TOOL_ActionScope aScope = AS_GLOBAL ) : m_category( aCategory ), m_actions( aAction ), + m_scope( aScope ), m_mouseButtons( 0 ) { if( aCategory == TC_Command ) m_commandStr = aExtraParam; } - TOOL_EventCategory Category() const { return m_category; @@ -285,6 +297,7 @@ private: TOOL_EventCategory m_category; TOOL_Actions m_actions; + TOOL_ActionScope m_scope; VECTOR2D m_mouseDelta; VECTOR2D m_mousePos; @@ -314,9 +327,15 @@ public: TOOL_EVENT_LIST() {}; TOOL_EVENT_LIST( const TOOL_EVENT& aSingleEvent ) { - m_events.push_back(aSingleEvent); + m_events.push_back( aSingleEvent ); } + /** + * Function Format() + * Returns information about event in form of a human-readable string. + * + * @return Event information. + */ const std::string Format() const; boost::optional Matches( const TOOL_EVENT &b ) const diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index cfafb609c0..c2a8310f5c 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -25,17 +25,14 @@ #ifndef __TOOL_MANAGER_H #define __TOOL_MANAGER_H -#include #include -#include #include -#include - #include #include #include +#include class TOOL_BASE; class CONTEXT_MENU; @@ -69,24 +66,61 @@ public: /** * Function InvokeTool() - * Calls a tool by sending a tool activation event to tool of given ID or name. - * An user-defined parameter object can be also passed + * Calls a tool by sending a tool activation event to tool of given ID. * + * @param aToolId is the ID number of the requested tool. * @return True if the requested tool was invoked successfully. */ bool InvokeTool( TOOL_ID aToolId ); - bool InvokeTool( const std::string& aName ); - template - void InvokeTool( const std::string& aName, const Parameters& aToolParams ); + /** + * Function InvokeTool() + * Calls a tool by sending a tool activation event to tool of given name. + * + * @param aToolName is the name of the requested tool. + * @return True if the requested tool was invoked successfully. + */ + bool InvokeTool( const std::string& aToolName ); + + /** + * Function RegisterAction() + * Registers an action that can be used to control tools (eg. invoke, trigger specific + * behaviours). + * + * @param aAction is the action to be registered. + */ + void RegisterAction( TOOL_ACTION* aAction ) + { + m_actionMgr.RegisterAction( aAction ); + } + + /** + * Function UnregisterAction() + * Unregisters an action, so it is no longer active. + * + * @param aAction is the action to be unregistered. + */ + void UnregisterAction( TOOL_ACTION* aAction ) + { + m_actionMgr.UnregisterAction( aAction ); + } /** * Function FindTool() - * Searches for a tool with given name or ID + * Searches for a tool with given ID. * - * @return Pointer to the request tool of NULL in case of failure. + * @param aId is the ID number of the requested tool. + * @return Pointer to the requested tool or NULL in case of failure. */ TOOL_BASE* FindTool( int aId ) const; + + /** + * Function FindTool() + * Searches for a tool with given name. + * + * @param aName is the name of the requested tool. + * @return Pointer to the requested tool or NULL in case of failure. + */ TOOL_BASE* FindTool( const std::string& aName ) const; /** @@ -170,19 +204,103 @@ private: typedef std::pair TRANSITION; void dispatchInternal( TOOL_EVENT& aEvent ); + + /** + * Function dispatchActivation() + * Checks if it is a valid activation event and invokes a proper tool. + * @param aEvent is an event to be tested. + * @return True if a tool was invoked, false otherwise. + */ + bool dispatchActivation( TOOL_EVENT& aEvent ); + + /** + * Function invokeTool() + * Invokes a tool by sending a proper event. + * @param aTool is the tool to be invoked. + */ + bool invokeTool( TOOL_BASE* aTool ); + + /** + * Function runTool() + * Makes a tool active, so it can receive events and react to them. Activated tool is pushed + * on the active tools stack, so the last activated tool receives events first. + * + * @param aToolId is the ID number of tool to be run. + */ + bool runTool( TOOL_ID aToolId ); + + /** + * Function runTool() + * Makes a tool active, so it can receive events and react to them. Activated tool is pushed + * on the active tools stack, so the last activated tool receives events first. + * + * @param aToolId is the name of tool to be run. + */ + bool runTool( const std::string& aName ); + + /** + * Function runTool() + * Makes a tool active, so it can receive events and react to them. Activated tool is pushed + * on the active tools stack, so the last activated tool receives events first. + * + * @param aToolId is the tool to be run. + */ + bool runTool( TOOL_BASE* aTool ); + + template + void invokeTool( const std::string& aName, const Parameters& aToolParams ); + + /** + * Function finishTool() + * Deactivates a tool and does the necessary clean up. + * + * @param aState is the state variable of the tool to be stopped. + */ void finishTool( TOOL_STATE* aState ); + /** + * Function isRegistered() + * Returns information about a tool registration status. + * + * @param aTool is the tool to be checked. + * @return True if the tool is in the registered tools list, false otherwise. + */ + bool isRegistered( TOOL_BASE* aTool ) const + { + return ( m_toolState.count( aTool ) > 0 ); + } + + /** + * Function isActive() + * Returns information about a tool activation status. + * + * @param aTool is the tool to be checked. + * @return True if the tool is on the active tools stack, false otherwise. + */ + bool isActive( TOOL_BASE* aTool ); + + /// Index of registered tools current states, associated by tools' objects. std::map m_toolState; + + /// Index of the registered tools current states, associated by tools' names. std::map m_toolNameIndex; + + /// Index of the registered tools current states, associated by tools' ID numbers. std::map m_toolIdIndex; + + /// Stack of the active tools std::deque m_activeTools; + ACTION_MANAGER m_actionMgr; EDA_ITEM* m_model; KiGfx::VIEW* m_view; KiGfx::VIEW_CONTROLS* m_viewControls; wxWindow* m_editFrame; + + /// Flag saying if the currently processed event should be passed to other tools. bool m_passEvent; + /// Pointer to the tool on the top of the active tools stack. TOOL_STATE* m_currentTool; }; diff --git a/include/view/view_group.h b/include/view/view_group.h index 7664060560..54dbd16521 100644 --- a/include/view/view_group.h +++ b/include/view/view_group.h @@ -42,7 +42,7 @@ namespace KiGfx class VIEW_GROUP : public VIEW_ITEM { public: - VIEW_GROUP( VIEW* aView ); + VIEW_GROUP( VIEW* aView = NULL ); virtual ~VIEW_GROUP(); /** diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 7583dce6ce..5bc84708ac 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -42,11 +42,11 @@ using namespace KiGfx; using namespace std; using boost::optional; -static TOOL_ACTION ACT_AutoEndRoute ( "AutoEndRoute", SCOPE_CONTEXT, 'F' ); -static TOOL_ACTION ACT_PlaceVia ( "PlaceVia", SCOPE_CONTEXT, 'V' ); -static TOOL_ACTION ACT_OpenRouteOptions ( "OpenRouterOptions", SCOPE_CONTEXT, 'E' ); -static TOOL_ACTION ACT_SwitchPosture ( "SwitchPosture", SCOPE_CONTEXT, '/' ); -static TOOL_ACTION ACT_EndTrack ( "SwitchPosture", SCOPE_CONTEXT, WXK_END ); +static TOOL_ACTION ACT_AutoEndRoute ( "AutoEndRoute", AS_CONTEXT, 'F' ); +static TOOL_ACTION ACT_PlaceVia ( "PlaceVia", AS_CONTEXT, 'V' ); +static TOOL_ACTION ACT_OpenRouteOptions ( "OpenRouterOptions", AS_CONTEXT, 'E' ); +static TOOL_ACTION ACT_SwitchPosture ( "SwitchPosture", AS_CONTEXT, '/' ); +static TOOL_ACTION ACT_EndTrack ( "SwitchPosture", AS_CONTEXT, WXK_END ); ROUTER_TOOL::ROUTER_TOOL() : TOOL_INTERACTIVE( "pcbnew.InteractiveRouter" ) @@ -88,7 +88,7 @@ void ROUTER_TOOL::Reset() if(getView()) m_router->SetView( getView() ); - Go( &ROUTER_TOOL::Main, TOOL_EVENT( TC_Command, TA_ActivateTool, GetName() ) ); + Go( &ROUTER_TOOL::Main, TOOL_EVENT( TC_Command, TA_Action, GetName() ) ); } int ROUTER_TOOL::getDefaultWidth( int aNetCode ) diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp index f7839211c1..5143f5b3a0 100644 --- a/pcbnew/tools/move_tool.cpp +++ b/pcbnew/tools/move_tool.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include "selection_tool.h" @@ -35,7 +35,8 @@ using namespace KiGfx; using boost::optional; MOVE_TOOL::MOVE_TOOL() : - TOOL_INTERACTIVE( "pcbnew.InteractiveMove" ), m_selectionTool( NULL ) + TOOL_INTERACTIVE( "pcbnew.InteractiveMove" ), m_selectionTool( NULL ), + m_activate( m_toolName, AS_GLOBAL, 'M', "Move", "Moves the selected item(s)" ) { } @@ -47,6 +48,8 @@ MOVE_TOOL::~MOVE_TOOL() void MOVE_TOOL::Reset() { + m_toolMgr->RegisterAction( &m_activate ); + // Find the selection tool, so they can cooperate TOOL_BASE* selectionTool = m_toolMgr->FindTool( std::string( "pcbnew.InteractiveSelection" ) ); @@ -60,8 +63,8 @@ void MOVE_TOOL::Reset() return; } - // the tool launches upon reception of activate ("pcbnew.InteractiveMove") - Go( &MOVE_TOOL::Main, TOOL_EVENT( TC_Command, TA_ActivateTool, GetName() ) ); + // the tool launches upon reception of action event ("pcbnew.InteractiveMove") + Go( &MOVE_TOOL::Main, m_activate.GetEvent() ); } @@ -69,13 +72,12 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) { VECTOR2D dragPosition; bool dragging = false; - bool restore = false; + bool restore = false; // Should items' state be restored when finishing the tool? VIEW* view = m_toolMgr->GetView(); - std::set selection; - VIEW_GROUP items( view ); - view->Add( &items ); - m_toolMgr->GetViewControls()->SetSnapping( true ); + view->Add( &m_items ); + getViewControls()->SetSnapping( true ); + getViewControls()->SetAutoPan( true ); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) @@ -83,73 +85,68 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) if( evt->IsCancel() ) { restore = true; - m_toolMgr->PassEvent(); break; // Finish } - if( evt->IsDrag( MB_Left ) ) + if( evt->IsMotion() || evt->IsDrag( MB_Left ) ) { if( dragging ) { - // Dragging is alre + // Dragging is already active VECTOR2D movement = ( evt->Position() - dragPosition ); - std::set::iterator it, it_end; - for( it = selection.begin(), it_end = selection.end(); it != it_end; ++it ) - { + + // so move all the selected items + for( it = m_selection.begin(), it_end = m_selection.end(); it != it_end; ++it ) (*it)->Move( wxPoint( movement.x, movement.y ) ); - } - items.ViewUpdate( VIEW_ITEM::GEOMETRY ); } else { - // Begin dragging - selection = m_selectionTool->GetSelection(); + // Prepare to drag + m_selection = m_selectionTool->GetSelection(); + if( m_selection.empty() ) + break; // there are no items to operate on std::set::iterator it; - for( it = selection.begin(); it != selection.end(); ++it ) + for( it = m_selection.begin(); it != m_selection.end(); ++it ) { - viewGroupAdd( *it, &items ); + // Gather all selected items into one VIEW_GROUP + viewGroupAdd( *it, &m_items ); - // but if a MODULE was selected, then we need to redraw all of it's parts + // Modules are treated in a special way - when they are moved, we have to + // move all the parts that make the module, not the module itself if( (*it)->Type() == PCB_MODULE_T ) { MODULE* module = static_cast( *it ); - // Move everything that belongs to the module + // Add everything that belongs to the module (besides the module itself) for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) - viewGroupAdd( pad, &items ); + viewGroupAdd( pad, &m_items ); for( BOARD_ITEM* drawing = module->GraphicalItems().GetFirst(); drawing; drawing = drawing->Next() ) - viewGroupAdd( drawing, &items ); + viewGroupAdd( drawing, &m_items ); - viewGroupAdd( &module->Reference(), &items ); - viewGroupAdd( &module->Value(), &items ); + viewGroupAdd( &module->Reference(), &m_items ); + viewGroupAdd( &module->Value(), &m_items ); } - } - items.ViewUpdate( VIEW_ITEM::GEOMETRY ); dragging = true; } + m_items.ViewUpdate( VIEW_ITEM::GEOMETRY ); dragPosition = evt->Position(); } - else if( evt->Category() == TC_Mouse ) // Filter out other events - { - if( dragging ) - { - break; // Finish - } - } + else if( evt->IsMouseUp( MB_Left ) || evt->IsClick( MB_Left ) ) + break; // Finish } // Clean-up after movement std::deque::iterator it, it_end; if( restore ) { - // Movement has to be rollbacked, so restore previous state of items + // Movement has to be rollbacked, so restore the previous state of items for( it = m_itemsState.begin(), it_end = m_itemsState.end(); it != it_end; ++it ) it->Restore(); } @@ -164,9 +161,10 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) } m_itemsState.clear(); - items.Clear(); - view->Remove( &items ); - m_toolMgr->GetViewControls()->SetSnapping( false ); + m_items.Clear(); + view->Remove( &m_items ); + getViewControls()->SetSnapping( false ); + getViewControls()->SetAutoPan( false ); return 0; } diff --git a/pcbnew/tools/move_tool.h b/pcbnew/tools/move_tool.h index 1645237527..2a3c4f7981 100644 --- a/pcbnew/tools/move_tool.h +++ b/pcbnew/tools/move_tool.h @@ -27,6 +27,7 @@ #include #include +#include class BOARD_ITEM; class SELECTION_TOOL; @@ -38,13 +39,8 @@ class VIEW_GROUP; /** * Class MOVE_TOOL - * /// TODO DOCS!! - * Our sample move tool: currently supports: - * - pick single objects (click LMB) - * - add objects to existing move (Shift+LMB) - * - draw move box (drag LMB) * - * WORK IN PROGRESS. CONSIDER AS A DEMO! + * Our sample move tool. Allows to move items selected by pcbnew.InteractiveSelection. */ class MOVE_TOOL : public TOOL_INTERACTIVE @@ -68,6 +64,7 @@ public: int Main( TOOL_EVENT& aEvent ); private: + /// Adds an item to the VIEW_GROUP that holds all moved items and displays them on the overlay void viewGroupAdd( BOARD_ITEM* aItem, KiGfx::VIEW_GROUP* aGroup ); /// Structure for (re)storing BOARD_ITEM state @@ -108,7 +105,17 @@ private: /// Selection tool used for obtaining selected items SELECTION_TOOL* m_selectionTool; + /// Stores the initial state of moved items (so it is possible to rollback changes) std::deque m_itemsState; + + /// Set of selected items (obtained from pcbnew. + std::set m_selection; + + /// VIEW_GROUP that helds currently moved items + KiGfx::VIEW_GROUP m_items; + + /// Register hotkey fot activation of the move tool + TOOL_ACTION m_activate; }; #endif diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 8559e81f6a..fd970863f9 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -3,6 +3,7 @@ * * Copyright (C) 2013 CERN * @author Tomasz Wlostowski + * @author Maciej Suminski * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -48,7 +49,8 @@ using namespace KiGfx; using boost::optional; SELECTION_TOOL::SELECTION_TOOL() : - TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ), m_multiple( false ) + TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ), m_multiple( false ), + m_activate( m_toolName, AS_GLOBAL, 'S', "Selection tool", "Allows to select items" ) { m_selArea = new SELECTION_AREA; } @@ -63,93 +65,63 @@ SELECTION_TOOL::~SELECTION_TOOL() void SELECTION_TOOL::Reset() { + m_toolMgr->RegisterAction( &m_activate ); m_selectedItems.clear(); - // The tool launches upon reception of activate ("pcbnew.InteractiveSelection") - Go( &SELECTION_TOOL::Main, TOOL_EVENT( TC_Command, TA_ActivateTool, GetName() ) ); + // The tool launches upon reception of action event ("pcbnew.InteractiveSelection") + Go( &SELECTION_TOOL::Main, m_activate.GetEvent() ); } int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) { - bool dragging = false; - bool allowMultiple = true; BOARD* board = getModel( PCB_T ); - if( !board ) - return 0; + wxASSERT( board != NULL ); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { + // Should selected items be added to the current selection or + // become the new selection (discarding previously selected items) m_additive = evt->Modifier( MD_ModShift ); if( evt->IsCancel() ) { - if( !m_selectedItems.empty() ) + if( !m_selectedItems.empty() ) // Cancel event deselects items... clearSelection(); - else - break; // Finish + else // ...unless there is nothing selected + break; } // single click? Select single object if( evt->IsClick( MB_Left ) ) selectSingle( evt->Position() ); - // unlock the multiple selection box - if( evt->IsMouseUp( MB_Left ) ) - allowMultiple = true; - // drag with LMB? Select multiple objects (or at least draw a selection box) or drag them if( evt->IsDrag( MB_Left ) ) { - dragging = true; - getViewControls()->SetAutoPan( true ); - if( m_selectedItems.empty() || m_additive ) { // If nothings has been selected or user wants to select more // draw the selection box - if( allowMultiple ) - allowMultiple = !selectMultiple(); + selectMultiple(); } else { - bool runTool = false; - - // Check if dragging event started within the currently selected items bounding box - std::set::iterator it, it_end; - for( it = m_selectedItems.begin(), it_end = m_selectedItems.end(); - it != it_end; ++it ) + if( containsSelected( evt->Position() ) ) { - BOX2I itemBox = (*it)->ViewBBox(); - itemBox.Inflate( 500000 ); // Give some margin for gripping an item - - if( itemBox.Contains( evt->Position() ) ) - { - // Click event occurred within a selected item bounding box - // -> user wants to drag selected items - runTool = true; - break; - } - } - - if( runTool ) m_toolMgr->InvokeTool( "pcbnew.InteractiveMove" ); + Wait(); + } else + { clearSelection(); + } } } - else if( dragging ) - { - dragging = false; - getViewControls()->SetAutoPan( false ); - } } - // Restore the default settings - getViewControls()->SetAutoPan( false ); - return 0; } @@ -166,7 +138,7 @@ void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) if( !m_additive ) clearSelection(); - // Prevent selection of invisible items + // Prevent selection of invisible or inactive items if( selectable( aItem ) ) { aItem->SetSelected(); @@ -272,17 +244,17 @@ BOARD_ITEM* SELECTION_TOOL::pickSmallestComponent( GENERAL_COLLECTOR* aCollector bool SELECTION_TOOL::selectMultiple() { - OPT_TOOL_EVENT evt; - VIEW* v = getView(); + VIEW* view = getView(); bool cancelled = false; - m_multiple = true; + m_multiple = true; // Multiple selection mode is active + getViewControls()->SetAutoPan( true ); // Those 2 lines remove the blink-in-the-random-place effect m_selArea->SetOrigin( VECTOR2I( 0, 0 ) ); m_selArea->SetEnd( VECTOR2I( 0, 0 ) ); - v->Add( m_selArea ); + view->Add( m_selArea ); - while( evt = Wait() ) + while( OPT_TOOL_EVENT evt = Wait() ) { if( evt->IsCancel() ) { @@ -307,17 +279,17 @@ bool SELECTION_TOOL::selectMultiple() // End drawing a selection box m_selArea->ViewSetVisible( false ); - // Mark items within a box as selected + // Mark items within the selection box as selected std::vector selectedItems; BOX2I selectionBox = m_selArea->ViewBBox(); + view->Query( selectionBox, selectedItems ); // Get the list of selected items - v->Query( selectionBox, selectedItems ); std::vector::iterator it, it_end; for( it = selectedItems.begin(), it_end = selectedItems.end(); it != it_end; ++it ) { BOARD_ITEM* item = static_cast( it->first ); - // Add only those items which are visible and fully within the selection box + // Add only those items that are visible and fully within the selection box if( selectable( item ) && selectionBox.Contains( item->ViewBBox() ) ) { item->SetSelected(); @@ -328,8 +300,9 @@ bool SELECTION_TOOL::selectMultiple() } } - v->Remove( m_selArea ); - m_multiple = false; + view->Remove( m_selArea ); + m_multiple = false; // Multiple selection mode is inactive + getViewControls()->SetAutoPan( false ); return cancelled; } @@ -359,12 +332,12 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) { if( evt->Action() == TA_ContextMenuUpdate ) { - // User has pointed an item, so show it in a different way if( current ) current->ClearBrightened(); int id = *evt->GetCommandId(); + // User has pointed an item, so show it in a different way if( id >= 0 ) { current = ( *aCollector )[id]; @@ -389,6 +362,7 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) break; } + // Draw a mark to show which item is available to be selected if( current && current->IsBrightened() ) { brightBox.reset( new BRIGHT_BOX( current ) ); @@ -474,3 +448,21 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) // All other items are selected only if the layer on which they exist is visible return board->IsLayerVisible( aItem->GetLayer() ); } + + +bool SELECTION_TOOL::containsSelected( const VECTOR2I& aPoint ) const +{ + // Check if the point is located within any of the currently selected items bounding boxes + std::set::iterator it, it_end; + for( it = m_selectedItems.begin(), it_end = m_selectedItems.end(); + it != it_end; ++it ) + { + BOX2I itemBox = (*it)->ViewBBox(); + itemBox.Inflate( 500000 ); // Give some margin for gripping an item + + if( itemBox.Contains( aPoint ) ) + return true; + } + + return false; +} diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index c76743d266..622a9bcfa6 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -3,6 +3,7 @@ * * Copyright (C) 2013 CERN * @author Tomasz Wlostowski + * @author Maciej Suminski * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -30,6 +31,7 @@ #include #include +#include class SELECTION_AREA; class BOARD_ITEM; @@ -42,6 +44,9 @@ class GENERAL_COLLECTOR; * - pick single objects (click LMB) * - add objects to existing selection (Shift+LMB) * - draw selection box (drag LMB) + * - handles MODULEs properly (ie. selects either MODULE or its PADs, TEXTs, etc.) + * - takes into account high-contrast & layer visibility settings + * - invokes InteractiveMove tool when user starts to drag selected items */ class SELECTION_TOOL : public TOOL_INTERACTIVE @@ -131,10 +136,18 @@ private: */ bool selectable( const BOARD_ITEM* aItem ); + /** + * Function containsSelected() + * Checks if the given point is placed within any of selected items' bounding box. + * + * @return True if the given point is contained in any of selected items' bouding box. + */ + bool containsSelected( const VECTOR2I& aPoint ) const; + /// Container storing currently selected items std::set m_selectedItems; - /// Visual representation of selection area + /// Visual representation of selection box SELECTION_AREA* m_selArea; /// Menu shown in case of selection ambiguity @@ -145,6 +158,9 @@ private: /// Flag saying if multiple selection mode is active bool m_multiple; + + /// Register hotkey fot activation of the selection tool + TOOL_ACTION m_activate; }; #endif From 1efec52b3362fcaaafc44ee718b1a26a2b067210 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 20 Sep 2013 15:01:08 +0200 Subject: [PATCH 359/415] Added cursor for the move tool --- pcbnew/tools/move_tool.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp index 5143f5b3a0..7ab86b1b7a 100644 --- a/pcbnew/tools/move_tool.cpp +++ b/pcbnew/tools/move_tool.cpp @@ -73,11 +73,13 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) VECTOR2D dragPosition; bool dragging = false; bool restore = false; // Should items' state be restored when finishing the tool? - VIEW* view = m_toolMgr->GetView(); + VIEW* view = getView(); + VIEW_CONTROLS* controls = getViewControls(); view->Add( &m_items ); - getViewControls()->SetSnapping( true ); - getViewControls()->SetAutoPan( true ); + controls->ShowCursor( true ); + controls->SetSnapping( true ); + controls->SetAutoPan( true ); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) @@ -163,8 +165,9 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) m_itemsState.clear(); m_items.Clear(); view->Remove( &m_items ); - getViewControls()->SetSnapping( false ); - getViewControls()->SetAutoPan( false ); + controls->ShowCursor( false ); + controls->SetSnapping( false ); + controls->SetAutoPan( false ); return 0; } From c9318006425ddd7b4408c4ad4cdaa2727c3e7309 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 20 Sep 2013 16:32:11 +0200 Subject: [PATCH 360/415] Restored previous function names. --- include/wxPcbStruct.h | 4 ++-- pcbnew/class_pcb_layer_widget.cpp | 4 ++-- pcbnew/deltrack.cpp | 4 ++-- pcbnew/dialogs/dialog_general_options.cpp | 2 +- pcbnew/dialogs/dialog_global_deletion.cpp | 2 +- pcbnew/dialogs/dialog_layers_setup.cpp | 10 +++++----- pcbnew/dimension.cpp | 2 +- pcbnew/edit.cpp | 20 ++++++++++---------- pcbnew/editedge.cpp | 4 ++-- pcbnew/editrack-part2.cpp | 12 ++++++------ pcbnew/hotkeys_board_editor.cpp | 10 +++++----- pcbnew/onleftclick.cpp | 6 +++--- pcbnew/pcbframe.cpp | 6 +++--- pcbnew/tool_pcb.cpp | 2 +- pcbnew/toolbars_update_user_interface.cpp | 2 +- pcbnew/tools/selection_tool.cpp | 5 ----- pcbnew/zones_by_polygon.cpp | 8 ++++---- 17 files changed, 49 insertions(+), 54 deletions(-) diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index a888d2f4fa..386bbf4755 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -136,13 +136,13 @@ protected: * will change the currently active layer to \a aLayer and also * update the PCB_LAYER_WIDGET. */ - void setCurrentLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate = true ); + void setActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate = true ); /** * Function getActiveLayer * returns the active layer */ - LAYER_NUM getCurrentLayer() + LAYER_NUM getActiveLayer() { return ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer; } diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index e334c05d59..07b46f4fa9 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -183,7 +183,7 @@ void PCB_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event ) if( IsCopperLayer( layer ) ) { bool loc_visible = visible; - if( force_active_layer_visible && (layer == myframe->getCurrentLayer() ) ) + if( force_active_layer_visible && (layer == myframe->getActiveLayer() ) ) loc_visible = true; cb->SetValue( loc_visible ); @@ -354,7 +354,7 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer ) { // the layer change from the PCB_LAYER_WIDGET can be denied by returning // false from this function. - myframe->setCurrentLayer( aLayer, false ); + myframe->setActiveLayer( aLayer, false ); if( m_alwaysShowActiveCopperLayer ) OnLayerSelected(); diff --git a/pcbnew/deltrack.cpp b/pcbnew/deltrack.cpp index 6833543db9..2a77f9faec 100644 --- a/pcbnew/deltrack.cpp +++ b/pcbnew/deltrack.cpp @@ -53,7 +53,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack ) { if( g_CurrentTrackList.GetCount() > 0 ) { - LAYER_NUM previous_layer = getCurrentLayer(); + LAYER_NUM previous_layer = getActiveLayer(); DBG( g_CurrentTrackList.VerifyListIntegrity(); ) @@ -86,7 +86,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack ) // Correct active layer which could change if a via // has been erased - setCurrentLayer( previous_layer ); + setActiveLayer( previous_layer ); UpdateStatusBar(); diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index 2d10c8d6ea..1187cba6b8 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -238,7 +238,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) // Apply new display options to the GAL canvas (this is faster than recaching) settings->LoadDisplayOptions( DisplayOpt ); - setHighContrastLayer( getCurrentLayer() ); + setHighContrastLayer( getActiveLayer() ); // m_galCanvas->GetView()->EnableTopLayer( state ); if( m_galCanvasActive ) diff --git a/pcbnew/dialogs/dialog_global_deletion.cpp b/pcbnew/dialogs/dialog_global_deletion.cpp index 7812296232..3048f5b7c0 100644 --- a/pcbnew/dialogs/dialog_global_deletion.cpp +++ b/pcbnew/dialogs/dialog_global_deletion.cpp @@ -37,7 +37,7 @@ DIALOG_GLOBAL_DELETION::DIALOG_GLOBAL_DELETION( PCB_EDIT_FRAME* parent ) void PCB_EDIT_FRAME::InstallPcbGlobalDeleteFrame( const wxPoint& pos ) { DIALOG_GLOBAL_DELETION dlg( this ); - dlg.SetCurrentLayer( getCurrentLayer() ); + dlg.SetCurrentLayer( getActiveLayer() ); dlg.ShowModal(); } diff --git a/pcbnew/dialogs/dialog_layers_setup.cpp b/pcbnew/dialogs/dialog_layers_setup.cpp index ab8f18c97e..d06f501394 100644 --- a/pcbnew/dialogs/dialog_layers_setup.cpp +++ b/pcbnew/dialogs/dialog_layers_setup.cpp @@ -669,11 +669,11 @@ void PCB_EDIT_FRAME::InstallDialogLayerSetup() if( dlg.ShowModal() == wxID_CANCEL ) return; - wxLogDebug( wxT( "Current layer selected %d." ), getCurrentLayer() ); + wxLogDebug( wxT( "Current layer selected %d." ), getActiveLayer() ); // If the current active layer was removed, find the next avaiable layer to set as the // active layer. - if( !( GetLayerMask( getCurrentLayer() ) & GetBoard()->GetEnabledLayers() ) ) + if( !( GetLayerMask( getActiveLayer() ) & GetBoard()->GetEnabledLayers() ) ) { for( LAYER_NUM i = FIRST_LAYER; i < NB_LAYERS; ++i ) { @@ -684,14 +684,14 @@ void PCB_EDIT_FRAME::InstallDialogLayerSetup() if( GetLayerMask( tmp ) & GetBoard()->GetEnabledLayers() ) { - wxLogDebug( wxT( "Setting current layer to %d." ), getCurrentLayer() ); - setCurrentLayer( tmp, true ); + wxLogDebug( wxT( "Setting current layer to %d." ), getActiveLayer() ); + setActiveLayer( tmp, true ); break; } } } else { - setCurrentLayer( getCurrentLayer(), true ); + setActiveLayer( getActiveLayer(), true ); } } diff --git a/pcbnew/dimension.cpp b/pcbnew/dimension.cpp index a798e9c4e3..85de08fee1 100644 --- a/pcbnew/dimension.cpp +++ b/pcbnew/dimension.cpp @@ -245,7 +245,7 @@ DIMENSION* PCB_EDIT_FRAME::EditDimension( DIMENSION* aDimension, wxDC* aDC ) aDimension = new DIMENSION( GetBoard() ); aDimension->SetFlags( IS_NEW ); - aDimension->SetLayer( getCurrentLayer() ); + aDimension->SetLayer( getActiveLayer() ); aDimension->m_crossBarO = aDimension->m_crossBarF = pos; aDimension->m_featureLineDO = aDimension->m_featureLineDF = pos; diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 25e6b95bc9..6f3cc20048 100755 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -917,10 +917,10 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_POPUP_PCB_SELECT_LAYER: - itmp = SelectLayer( getCurrentLayer(), UNDEFINED_LAYER, UNDEFINED_LAYER ); + itmp = SelectLayer( getActiveLayer(), UNDEFINED_LAYER, UNDEFINED_LAYER ); if( itmp >= 0 ) - setCurrentLayer( itmp ); + setActiveLayer( itmp ); m_canvas->MoveCursorToCrossHair(); break; @@ -930,19 +930,19 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_POPUP_PCB_SELECT_NO_CU_LAYER: - itmp = SelectLayer( getCurrentLayer(), FIRST_NON_COPPER_LAYER, UNDEFINED_LAYER ); + itmp = SelectLayer( getActiveLayer(), FIRST_NON_COPPER_LAYER, UNDEFINED_LAYER ); if( itmp >= 0 ) - setCurrentLayer( itmp ); + setActiveLayer( itmp ); m_canvas->MoveCursorToCrossHair(); break; case ID_POPUP_PCB_SELECT_CU_LAYER: - itmp = SelectLayer( getCurrentLayer(), UNDEFINED_LAYER, LAST_COPPER_LAYER ); + itmp = SelectLayer( getActiveLayer(), UNDEFINED_LAYER, LAST_COPPER_LAYER ); if( itmp >= 0 ) - setCurrentLayer( itmp ); + setActiveLayer( itmp ); break; @@ -952,7 +952,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_TOOLBARH_PCB_SELECT_LAYER: - setCurrentLayer( m_SelLayerBox->GetLayerSelection() ); + setActiveLayer( m_SelLayerBox->GetLayerSelection() ); if( DisplayOpt.ContrastModeDisplay ) m_canvas->Refresh( true ); @@ -1244,7 +1244,7 @@ void PCB_EDIT_FRAME::RemoveStruct( BOARD_ITEM* Item, wxDC* DC ) void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) { - LAYER_NUM curLayer = getCurrentLayer(); + LAYER_NUM curLayer = getActiveLayer(); // Check if the specified layer matches the present layer if( layer == curLayer ) @@ -1286,7 +1286,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) GetScreen()->m_Route_Layer_TOP = curLayer; GetScreen()->m_Route_Layer_BOTTOM = layer; - setCurrentLayer( curLayer ); + setActiveLayer( curLayer ); if( Other_Layer_Route( (TRACK*) GetScreen()->GetCurItem(), DC ) ) { @@ -1307,7 +1307,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) // and a non-copper layer, or vice-versa? // ... - setCurrentLayer( layer ); + setActiveLayer( layer ); if( DisplayOpt.ContrastModeDisplay ) RefreshCanvas(); diff --git a/pcbnew/editedge.cpp b/pcbnew/editedge.cpp index d36487d3d7..a85a0bf26e 100644 --- a/pcbnew/editedge.cpp +++ b/pcbnew/editedge.cpp @@ -246,7 +246,7 @@ DRAWSEGMENT* PCB_EDIT_FRAME::Begin_DrawSegment( DRAWSEGMENT* Segment, STROKE_T s s_large = GetDesignSettings().m_DrawSegmentWidth; - if( getCurrentLayer() == EDGE_N ) + if( getActiveLayer() == EDGE_N ) { s_large = GetDesignSettings().m_EdgeSegmentWidth; } @@ -255,7 +255,7 @@ DRAWSEGMENT* PCB_EDIT_FRAME::Begin_DrawSegment( DRAWSEGMENT* Segment, STROKE_T s { SetCurItem( Segment = new DRAWSEGMENT( GetBoard() ) ); Segment->SetFlags( IS_NEW ); - Segment->SetLayer( getCurrentLayer() ); + Segment->SetLayer( getActiveLayer() ); Segment->SetWidth( s_large ); Segment->SetShape( shape ); Segment->SetAngle( 900 ); diff --git a/pcbnew/editrack-part2.cpp b/pcbnew/editrack-part2.cpp index 40c5f73eb3..e36a3a92a1 100644 --- a/pcbnew/editrack-part2.cpp +++ b/pcbnew/editrack-part2.cpp @@ -52,10 +52,10 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) if( aTrack == NULL ) { - if( getCurrentLayer() != ((PCB_SCREEN*)GetScreen())->m_Route_Layer_TOP ) - setCurrentLayer( ((PCB_SCREEN*)GetScreen())->m_Route_Layer_TOP ); + if( getActiveLayer() != ((PCB_SCREEN*)GetScreen())->m_Route_Layer_TOP ) + setActiveLayer( ((PCB_SCREEN*)GetScreen())->m_Route_Layer_TOP ); else - setCurrentLayer(((PCB_SCREEN*)GetScreen())->m_Route_Layer_BOTTOM ); + setActiveLayer(((PCB_SCREEN*)GetScreen())->m_Route_Layer_BOTTOM ); UpdateStatusBar(); return true; @@ -109,7 +109,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) via->SetLayerPair( LAYER_N_BACK, LAYER_N_FRONT ); via->SetDrill( GetBoard()->GetCurrentViaDrill() ); - LAYER_NUM first_layer = getCurrentLayer(); + LAYER_NUM first_layer = getActiveLayer(); LAYER_NUM last_layer; // prepare switch to new active layer: @@ -172,7 +172,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) return false; } - setCurrentLayer( last_layer ); + setActiveLayer( last_layer ); TRACK* lastNonVia = g_CurrentTrackSegment; @@ -194,7 +194,7 @@ bool PCB_EDIT_FRAME::Other_Layer_Route( TRACK* aTrack, wxDC* DC ) */ // set the layer to the new value - track->SetLayer( getCurrentLayer() ); + track->SetLayer( getActiveLayer() ); /* the start point is the via position and the end point is the cursor * which also is on the via (will change when moving mouse) diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index 60fe2afc04..cc72a9af84 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -240,7 +240,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit break; case HK_SWITCH_LAYER_TO_PREVIOUS: - ll = getCurrentLayer(); + ll = getActiveLayer(); if( (ll <= LAYER_N_BACK) || (ll > LAYER_N_FRONT) ) break; @@ -256,7 +256,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit break; case HK_SWITCH_LAYER_TO_NEXT: - ll = getCurrentLayer(); + ll = getActiveLayer(); if( (ll < LAYER_N_BACK) || (ll >= LAYER_N_FRONT) ) break; @@ -374,7 +374,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit break; case HK_BACK_SPACE: - if( /*m_ID_current_state == ID_TRACK_BUTT &&*/ (getCurrentLayer() <= LAYER_N_FRONT) ) + if( /*m_ID_current_state == ID_TRACK_BUTT &&*/ (getActiveLayer() <= LAYER_N_FRONT) ) { if( !itemCurrentlyEdited ) { @@ -580,7 +580,7 @@ bool PCB_EDIT_FRAME::OnHotkeyDeleteItem( wxDC* aDC ) switch( GetToolId() ) { case ID_TRACK_BUTT: - if( getCurrentLayer() > LAYER_N_FRONT ) + if( getActiveLayer() > LAYER_N_FRONT ) return false; if( ItemFree ) @@ -949,7 +949,7 @@ bool PCB_EDIT_FRAME::OnHotkeyPlaceItem( wxDC* aDC ) */ TRACK * PCB_EDIT_FRAME::OnHotkeyBeginRoute( wxDC* aDC ) { - if( getCurrentLayer() > LAYER_N_FRONT ) + if( getActiveLayer() > LAYER_N_FRONT ) return NULL; bool itemCurrentlyEdited = (GetCurItem() && GetCurItem()->GetFlags()); diff --git a/pcbnew/onleftclick.cpp b/pcbnew/onleftclick.cpp index f96022591a..53703e3166 100644 --- a/pcbnew/onleftclick.cpp +++ b/pcbnew/onleftclick.cpp @@ -243,7 +243,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) if( GetToolId() == ID_PCB_ARC_BUTT ) shape = S_ARC; - if( IsCopperLayer( getCurrentLayer() ) ) + if( IsCopperLayer( getActiveLayer() ) ) { DisplayError( this, _( "Graphic not allowed on Copper layers" ) ); break; @@ -267,7 +267,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) break; case ID_TRACK_BUTT: - if( !IsCopperLayer( getCurrentLayer() ) ) + if( !IsCopperLayer( getActiveLayer() ) ) { DisplayError( this, _( "Tracks on Copper layers only " ) ); break; @@ -367,7 +367,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) break; case ID_PCB_DIMENSION_BUTT: - if( IsCopperLayer( getCurrentLayer() ) ) + if( IsCopperLayer( getActiveLayer() ) ) { DisplayError( this, _( "Dimension not allowed on Copper layers" ) ); break; diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index e581f53a32..84d0a214e1 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -730,7 +730,7 @@ void PCB_EDIT_FRAME::SetGridColor(EDA_COLOR_T aColor) bool PCB_EDIT_FRAME::IsMicroViaAcceptable( void ) { int copperlayercnt = GetBoard()->GetCopperLayerCount( ); - LAYER_NUM currLayer = getCurrentLayer(); + LAYER_NUM currLayer = getActiveLayer(); if( !GetDesignSettings().m_MicroViasAllowed ) return false; // Obvious.. @@ -832,7 +832,7 @@ void PCB_EDIT_FRAME::setTopLayer( LAYER_NUM aLayer ) } -void PCB_EDIT_FRAME::setCurrentLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate ) +void PCB_EDIT_FRAME::setActiveLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate ) { ( (PCB_SCREEN*) GetScreen() )->m_Active_Layer = aLayer; @@ -848,7 +848,7 @@ void PCB_EDIT_FRAME::setCurrentLayer( LAYER_NUM aLayer, bool doLayerWidgetUpdate void PCB_EDIT_FRAME::syncLayerWidgetLayer() { - m_Layers->SelectLayer( getCurrentLayer() ); + m_Layers->SelectLayer( getActiveLayer() ); m_Layers->OnLayerSelected(); } diff --git a/pcbnew/tool_pcb.cpp b/pcbnew/tool_pcb.cpp index 533106bf9b..5b6fe3b95f 100644 --- a/pcbnew/tool_pcb.cpp +++ b/pcbnew/tool_pcb.cpp @@ -105,7 +105,7 @@ void PCB_EDIT_FRAME::PrepareLayerIndicator() previous_Route_Layer_BOTTOM_color, previous_via_color; /* get colors, and redraw bitmap button only on changes */ - active_layer_color = GetBoard()->GetLayerColor(getCurrentLayer()); + active_layer_color = GetBoard()->GetLayerColor(getActiveLayer()); if( previous_active_layer_color != active_layer_color ) { diff --git a/pcbnew/toolbars_update_user_interface.cpp b/pcbnew/toolbars_update_user_interface.cpp index bd77618169..23d850d2b1 100644 --- a/pcbnew/toolbars_update_user_interface.cpp +++ b/pcbnew/toolbars_update_user_interface.cpp @@ -96,7 +96,7 @@ void PCB_EDIT_FRAME::OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent ) void PCB_EDIT_FRAME::OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent ) { - m_SelLayerBox->SetLayerSelection( getCurrentLayer() ); + m_SelLayerBox->SetLayerSelection( getActiveLayer() ); } diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index a70b2962be..fd970863f9 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -96,16 +96,11 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) // single click? Select single object if( evt->IsClick( MB_Left ) ) - { - wxLogDebug( wxT( "click ") ); selectSingle( evt->Position() ); - } // drag with LMB? Select multiple objects (or at least draw a selection box) or drag them if( evt->IsDrag( MB_Left ) ) { - wxLogDebug( wxT( "drag" ) ); - if( m_selectedItems.empty() || m_additive ) { // If nothings has been selected or user wants to select more diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index d8608ca726..e015bf061f 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -518,7 +518,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) if( !GetBoard()->m_CurrentZoneContour ) { if( GetToolId() == ID_PCB_KEEPOUT_AREA_BUTT && - getCurrentLayer() >= FIRST_NON_COPPER_LAYER ) + getActiveLayer() >= FIRST_NON_COPPER_LAYER ) { DisplayError( this, _( "Error: a keepout area is allowed only on copper layers" ) ); @@ -537,7 +537,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) ZONE_EDIT_T edited; // Init zone params to reasonable values - zone->SetLayer( getCurrentLayer() ); + zone->SetLayer( getActiveLayer() ); // Prompt user for parameters: m_canvas->SetIgnoreMouseEvents( true ); @@ -602,7 +602,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) return 0; // Switch active layer to the selected zone layer - setCurrentLayer( zoneInfo.m_CurrentZone_Layer ); + setActiveLayer( zoneInfo.m_CurrentZone_Layer ); SetZoneSettings( zoneInfo ); } @@ -612,7 +612,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) // zone (add cutout or similar zone) zoneInfo.m_CurrentZone_Layer = s_CurrentZone->GetLayer(); - setCurrentLayer( s_CurrentZone->GetLayer() ); + setActiveLayer( s_CurrentZone->GetLayer() ); zoneInfo << *s_CurrentZone; From 04cdb15cebe410ab3a0a0c28b0aa2e0ee5b61710 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 20 Sep 2013 17:29:32 +0200 Subject: [PATCH 361/415] Changed the way of refreshing canvases (both standard & GAL). --- common/dialogs/dialog_page_settings.cpp | 2 +- common/drawframe.cpp | 4 ++-- common/drawpanel.cpp | 13 ++++++++++ common/zoom.cpp | 15 +++--------- include/class_drawpanel.h | 3 +++ include/view/view.h | 4 ++-- include/wxstruct.h | 6 ----- pcbnew/autorouter/automove.cpp | 2 +- pcbnew/basepcbframe.cpp | 8 +++---- pcbnew/board_undo_redo.cpp | 6 ++--- pcbnew/class_pcb_layer_widget.cpp | 10 ++++---- pcbnew/dialogs/dialog_display_options.cpp | 2 +- pcbnew/dialogs/dialog_drc.cpp | 2 +- pcbnew/dialogs/dialog_general_options.cpp | 24 ++++++------------- pcbnew/dialogs/dialog_global_deletion.cpp | 2 +- .../dialog_global_edit_tracks_and_vias.cpp | 2 +- .../dialog_global_modules_fields_edition.cpp | 2 +- pcbnew/dialogs/dialog_orient_footprints.cpp | 2 +- pcbnew/dialogs/dialog_set_grid.cpp | 2 +- pcbnew/edit.cpp | 16 ++++++------- pcbnew/edit_pcb_text.cpp | 8 +++---- pcbnew/editmod.cpp | 4 ++-- pcbnew/edtxtmod.cpp | 2 +- pcbnew/event_handlers_tracks_vias_sizes.cpp | 2 +- pcbnew/footprint_wizard.cpp | 2 +- pcbnew/footprint_wizard_frame.cpp | 4 ++-- pcbnew/hotkeys_board_editor.cpp | 6 ++--- pcbnew/modedit.cpp | 18 +++++++------- pcbnew/modedit_onclick.cpp | 12 +++++----- pcbnew/modedit_undo_redo.cpp | 4 ++-- pcbnew/modules.cpp | 6 ++--- pcbnew/modview.cpp | 2 +- pcbnew/modview_frame.cpp | 6 ++--- pcbnew/move_or_drag_track.cpp | 2 +- pcbnew/netlist.cpp | 2 +- pcbnew/sel_layer.cpp | 2 +- pcbnew/xchgmod.cpp | 6 ++--- pcbnew/zones_by_polygon.cpp | 2 +- pcbnew/zones_by_polygon_fill_functions.cpp | 2 +- 39 files changed, 105 insertions(+), 114 deletions(-) diff --git a/common/dialogs/dialog_page_settings.cpp b/common/dialogs/dialog_page_settings.cpp index b788ceb16d..9886bd070b 100644 --- a/common/dialogs/dialog_page_settings.cpp +++ b/common/dialogs/dialog_page_settings.cpp @@ -222,7 +222,7 @@ void DIALOG_PAGES_SETTINGS::OnOkClick( wxCommandEvent& event ) if( SavePageSettings() ) { m_screen->SetModify(); - m_parent->RefreshCanvas(); + m_parent->GetCanvas()->Refresh(); if( m_localPrjConfigChanged ) m_parent->SaveProjectSettings( true ); diff --git a/common/drawframe.cpp b/common/drawframe.cpp index 5dbfcbd6be..691c4acd03 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -234,7 +234,7 @@ void EDA_DRAW_FRAME::OnToggleGridState( wxCommandEvent& aEvent ) m_galCanvas->GetView()->MarkTargetDirty( KiGfx::TARGET_NONCACHED ); } - RefreshCanvas(); + m_canvas->Refresh(); } @@ -394,7 +394,7 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event ) m_galCanvas->GetView()->MarkTargetDirty( KiGfx::TARGET_NONCACHED ); } - RefreshCanvas(); + m_canvas->Refresh(); } diff --git a/common/drawpanel.cpp b/common/drawpanel.cpp index aa428d63f1..d733d49584 100644 --- a/common/drawpanel.cpp +++ b/common/drawpanel.cpp @@ -296,6 +296,19 @@ void EDA_DRAW_PANEL::RefreshDrawingRect( const EDA_RECT& aRect, bool aEraseBackg } +void EDA_DRAW_PANEL::Refresh( bool eraseBackground, const wxRect* rect ) +{ + if( GetParent()->IsGalCanvasActive() ) + { + GetParent()->GetGalCanvas()->Refresh(); + } + else + { + wxScrolledWindow::Refresh( eraseBackground, rect ); + } +} + + wxPoint EDA_DRAW_PANEL::GetScreenCenterLogicalPosition() { wxSize size = GetClientSize() / 2; diff --git a/common/zoom.cpp b/common/zoom.cpp index d641eac5da..de9223dfff 100644 --- a/common/zoom.cpp +++ b/common/zoom.cpp @@ -52,7 +52,7 @@ void EDA_DRAW_FRAME::RedrawScreen( const wxPoint& aCenterPoint, bool aWarpPointe if( aWarpPointer ) m_canvas->MoveCursorToCrossHair(); - RefreshCanvas(); + m_canvas->Refresh(); m_canvas->Update(); } @@ -64,20 +64,11 @@ void EDA_DRAW_FRAME::RedrawScreen2( const wxPoint& posBefore ) AdjustScrollBars( newCenter ); - RefreshCanvas(); + m_canvas->Refresh(); m_canvas->Update(); } -void EDA_DRAW_FRAME::RefreshCanvas() -{ - if( m_galCanvasActive ) - m_galCanvas->Refresh(); - else - m_canvas->Refresh(); -} - - void EDA_DRAW_FRAME::Zoom_Automatique( bool aWarpPointer ) { BASE_SCREEN* screen = GetScreen(); @@ -169,7 +160,7 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event ) break; case ID_ZOOM_REDRAW: - RefreshCanvas(); + m_canvas->Refresh(); break; case ID_POPUP_ZOOM_CENTER: diff --git a/include/class_drawpanel.h b/include/class_drawpanel.h index 270999ac7e..3a9c3735b7 100644 --- a/include/class_drawpanel.h +++ b/include/class_drawpanel.h @@ -317,6 +317,9 @@ public: */ void RefreshDrawingRect( const EDA_RECT& aRect, bool aEraseBackground = true ); + /// @copydoc wxWindow::Refresh() + virtual void Refresh( bool eraseBackground = true, const wxRect* rect = NULL ); + /** * Function GetScreenCenterLogicalPosition * @return The current screen center position in logical (drawing) units. diff --git a/include/view/view.h b/include/view/view.h index dc6a27691a..b287ce5199 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -262,8 +262,8 @@ public: /** * Function SetLayerVisible() * Controls the visibility of a particular layer. - * @param aLayer: the layer to show/hide - * @param aVisible: the obvious + * @param aLayer: the layer to show/hide. + * @param aVisible: the obvious. */ inline void SetLayerVisible( int aLayer, bool aVisible = true ) { diff --git a/include/wxstruct.h b/include/wxstruct.h index 68bbf3eec2..bee386d10a 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -771,12 +771,6 @@ public: */ void RedrawScreen2( const wxPoint& posBefore ); - /** - * Function RefreshCanvas - * Depending on the current state of GAL - it refreshes the default canvas of the GAL canvas. - */ - void RefreshCanvas(); - /** * Function Zoom_Automatique * redraws the screen with best zoom level and the best centering diff --git a/pcbnew/autorouter/automove.cpp b/pcbnew/autorouter/automove.cpp index ad6856abf6..19d04e5885 100644 --- a/pcbnew/autorouter/automove.cpp +++ b/pcbnew/autorouter/automove.cpp @@ -293,7 +293,7 @@ void PCB_EDIT_FRAME::AutoMoveModulesOnPcb( bool PlaceModulesHorsPcb ) if( newList.GetCount() ) SaveCopyInUndoList( newList, UR_CHANGED ); - RefreshCanvas(); + m_canvas->Refresh(); } diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 4d8f98a42d..be2c8d756e 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -505,7 +505,7 @@ void PCB_BASE_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) GetScreen()->m_Active_Layer = layer; if( DisplayOpt.ContrastModeDisplay ) - RefreshCanvas(); + m_canvas->Refresh(); } @@ -529,7 +529,7 @@ void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent ) settings->LoadDisplayOptions( DisplayOpt ); m_galCanvas->GetView()->RecacheAllItems( true ); - RefreshCanvas(); + m_canvas->Refresh(); } @@ -704,8 +704,8 @@ void PCB_BASE_FRAME::SetToolID( int aId, int aCursor, const wxString& aToolMsg ) // must do this after the tool has been set, otherwise pad::Draw() does // not show proper color when DisplayOpt.ContrastModeDisplay is true. - if( redraw && m_canvas ) - RefreshCanvas(); + if( redraw && m_canvas) + m_canvas->Refresh(); } diff --git a/pcbnew/board_undo_redo.cpp b/pcbnew/board_undo_redo.cpp index 1b132fa1a2..88cfaa49b1 100644 --- a/pcbnew/board_undo_redo.cpp +++ b/pcbnew/board_undo_redo.cpp @@ -367,7 +367,7 @@ void PCB_EDIT_FRAME::SaveCopyInUndoList( BOARD_ITEM* aItem, if( aItem->Type() == PCB_MODULE_T ) if( ((MODULE*)aItem)->GetFlags() & MODULE_to_PLACE ) break; - RefreshCanvas(); + m_canvas->Refresh(); #endif case UR_MOVED: case UR_FLIPPED: @@ -622,7 +622,7 @@ void PCB_EDIT_FRAME::GetBoardFromUndoList( wxCommandEvent& event ) GetScreen()->PushCommandToRedoList( List ); OnModify(); - RefreshCanvas(); + m_canvas->Refresh(); } @@ -650,7 +650,7 @@ void PCB_EDIT_FRAME::GetBoardFromRedoList( wxCommandEvent& event ) GetScreen()->PushCommandToUndoList( List ); OnModify(); - RefreshCanvas(); + m_canvas->Refresh(); } diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index 07b46f4fa9..ee08c4056f 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -346,7 +346,7 @@ void PCB_LAYER_WIDGET::OnLayerColorChange( LAYER_NUM aLayer, EDA_COLOR_T aColor { myframe->GetBoard()->SetLayerColor( aLayer, aColor ); myframe->ReCreateLayerBox( NULL ); - myframe->RefreshCanvas(); + myframe->GetCanvas()->Refresh(); } @@ -359,7 +359,7 @@ bool PCB_LAYER_WIDGET::OnLayerSelect( LAYER_NUM aLayer ) if( m_alwaysShowActiveCopperLayer ) OnLayerSelected(); else if( DisplayOpt.ContrastModeDisplay ) - myframe->RefreshCanvas(); + myframe->GetCanvas()->Refresh(); return true; } @@ -401,13 +401,13 @@ void PCB_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool is } if( isFinal ) - myframe->RefreshCanvas(); + myframe->GetCanvas()->Refresh(); } void PCB_LAYER_WIDGET::OnRenderColorChange( int aId, EDA_COLOR_T aColor ) { myframe->GetBoard()->SetVisibleElementColor( aId, aColor ); - myframe->RefreshCanvas(); + myframe->GetCanvas()->Refresh(); } void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled ) @@ -425,7 +425,7 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled ) if( myframe->IsGalCanvasActive() ) galCanvas->Refresh(); else - myframe->RefreshCanvas(); + myframe->GetCanvas()->Refresh(); } //----------------------------------------------- diff --git a/pcbnew/dialogs/dialog_display_options.cpp b/pcbnew/dialogs/dialog_display_options.cpp index 4f5fb1cbea..8b44757d90 100644 --- a/pcbnew/dialogs/dialog_display_options.cpp +++ b/pcbnew/dialogs/dialog_display_options.cpp @@ -180,7 +180,7 @@ void DIALOG_DISPLAY_OPTIONS::OnOkClick(wxCommandEvent& event) if( m_Parent->IsGalCanvasActive() ) m_Parent->GetGalCanvas()->Refresh(); else - m_Parent->RefreshCanvas(); + m_Parent->GetCanvas()->Refresh(); EndModal( 1 ); } diff --git a/pcbnew/dialogs/dialog_drc.cpp b/pcbnew/dialogs/dialog_drc.cpp index 0a779540b3..d65d497784 100644 --- a/pcbnew/dialogs/dialog_drc.cpp +++ b/pcbnew/dialogs/dialog_drc.cpp @@ -548,7 +548,7 @@ void DIALOG_DRC_CONTROL::OnUnconnectedSelectionEvent( wxCommandEvent& event ) void DIALOG_DRC_CONTROL::RedrawDrawPanel() { - m_Parent->RefreshCanvas(); + m_Parent->GetCanvas()->Refresh(); } diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index 1187cba6b8..f6f21655ac 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -185,7 +185,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) if( state && (GetBoard()->m_Status_Pcb & LISTE_RATSNEST_ITEM_OK) == 0 ) Compile_Ratsnest( NULL, true ); - RefreshCanvas(); + m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_MODULE_RATSNEST: @@ -199,36 +199,31 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) case ID_TB_OPTIONS_SHOW_ZONES: DisplayOpt.DisplayZonesMode = 0; recache = true; - if( !m_galCanvasActive ) - RefreshCanvas(); + m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_ZONES_DISABLE: DisplayOpt.DisplayZonesMode = 1; recache = true; - if( !m_galCanvasActive ) - RefreshCanvas(); + m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY: DisplayOpt.DisplayZonesMode = 2; recache = true; - if( !m_galCanvasActive ) - RefreshCanvas(); + m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_VIAS_SKETCH: m_DisplayViaFill = DisplayOpt.DisplayViaFill = !state; recache = true; - if( !m_galCanvasActive ) - RefreshCanvas(); + m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_TRACKS_SKETCH: m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill = !state; recache = true; - if( !m_galCanvasActive ) - RefreshCanvas(); + m_canvas->Refresh(); break; case ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE: @@ -239,12 +234,7 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) settings->LoadDisplayOptions( DisplayOpt ); setHighContrastLayer( getActiveLayer() ); -// m_galCanvas->GetView()->EnableTopLayer( state ); - - if( m_galCanvasActive ) - m_galCanvas->Refresh(); - else - RefreshCanvas(); + m_canvas->Refresh(); break; } diff --git a/pcbnew/dialogs/dialog_global_deletion.cpp b/pcbnew/dialogs/dialog_global_deletion.cpp index 3048f5b7c0..cce6a7b4b5 100644 --- a/pcbnew/dialogs/dialog_global_deletion.cpp +++ b/pcbnew/dialogs/dialog_global_deletion.cpp @@ -182,7 +182,7 @@ void DIALOG_GLOBAL_DELETION::AcceptPcbDelete( ) m_Parent->Compile_Ratsnest( NULL, true ); } - m_Parent->RefreshCanvas(); + m_Parent->GetCanvas()->Refresh(); m_Parent->OnModify(); EndModal( 1 ); diff --git a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp index 8fd7b9f040..b5114a0ce8 100644 --- a/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp +++ b/pcbnew/dialogs/dialog_global_edit_tracks_and_vias.cpp @@ -206,7 +206,7 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::OnOkClick( wxCommandEvent& event ) EndModal( 1 ); if( change ) - m_Parent->RefreshCanvas(); + m_Parent->GetCanvas()->Refresh(); } diff --git a/pcbnew/dialogs/dialog_global_modules_fields_edition.cpp b/pcbnew/dialogs/dialog_global_modules_fields_edition.cpp index 55fa8efdc7..aa8f2c9186 100644 --- a/pcbnew/dialogs/dialog_global_modules_fields_edition.cpp +++ b/pcbnew/dialogs/dialog_global_modules_fields_edition.cpp @@ -136,7 +136,7 @@ void PCB_EDIT_FRAME::OnResetModuleTextSizes( wxCommandEvent& event ) DIALOG_GLOBAL_MODULES_FIELDS_EDITION dlg(this); dlg.ShowModal(); - RefreshCanvas(); + m_canvas->Refresh(); } void PCB_BASE_FRAME::ResetModuleTextSizes( const wxString & aFilter, bool aRef, diff --git a/pcbnew/dialogs/dialog_orient_footprints.cpp b/pcbnew/dialogs/dialog_orient_footprints.cpp index 20b31aab44..4c6dd832d5 100644 --- a/pcbnew/dialogs/dialog_orient_footprints.cpp +++ b/pcbnew/dialogs/dialog_orient_footprints.cpp @@ -104,7 +104,7 @@ void PCB_EDIT_FRAME::OnOrientFootprints( wxCommandEvent& event ) if( ReOrientModules( text, dlg.GetOrientation(), dlg.ApplyToLockedModules() ) ) { - RefreshCanvas(); + m_canvas->Refresh(); Compile_Ratsnest( NULL, true ); } } diff --git a/pcbnew/dialogs/dialog_set_grid.cpp b/pcbnew/dialogs/dialog_set_grid.cpp index 6b2356704b..d22890b572 100644 --- a/pcbnew/dialogs/dialog_set_grid.cpp +++ b/pcbnew/dialogs/dialog_set_grid.cpp @@ -223,7 +223,7 @@ bool PCB_BASE_FRAME::InvokeDialogGrid() if( GetScreen()->GetGridId() == ID_POPUP_GRID_USER ) GetScreen()->SetGrid( ID_POPUP_GRID_USER ); - RefreshCanvas(); + m_canvas->Refresh(); return true; } diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 6f3cc20048..a74c844019 100755 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -399,7 +399,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) GetDesignSettings().m_CurrentViaType = v_type; if( DisplayOpt.ContrastModeDisplay ) - RefreshCanvas(); + m_canvas->Refresh(); } break; @@ -572,7 +572,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_POPUP_PCB_FILL_ALL_ZONES: m_canvas->MoveCursorToCrossHair(); Fill_All_Zones( this ); - RefreshCanvas(); + m_canvas->Refresh(); SetMsgPanel( GetBoard() ); break; @@ -584,7 +584,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) TestNetConnection( NULL, zone_container->GetNet() ); OnModify(); SetMsgPanel( GetBoard() ); - RefreshCanvas(); + m_canvas->Refresh(); } SetCurItem( NULL ); break; @@ -604,7 +604,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) TestForActiveLinksInRatsnest( 0 ); // Recalculate the active ratsnest, i.e. the unconnected links OnModify(); SetMsgPanel( GetBoard() ); - RefreshCanvas(); + m_canvas->Refresh(); break; case ID_POPUP_PCB_FILL_ZONE: @@ -612,7 +612,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) Fill_Zone( (ZONE_CONTAINER*) GetCurItem() ); TestNetConnection( NULL, ( (ZONE_CONTAINER*) GetCurItem() )->GetNet() ); SetMsgPanel( GetBoard() ); - RefreshCanvas(); + m_canvas->Refresh(); break; case ID_POPUP_PCB_MOVE_TEXTEPCB_REQUEST: @@ -1040,7 +1040,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) Delete_Drawings_All_Layer( GetCurItem()->GetLayer() ); SetCurItem( NULL ); m_canvas->MoveCursorToCrossHair(); - RefreshCanvas(); + m_canvas->Refresh(); break; case ID_POPUP_PCB_EDIT_DRAWING: @@ -1291,7 +1291,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) if( Other_Layer_Route( (TRACK*) GetScreen()->GetCurItem(), DC ) ) { if( DisplayOpt.ContrastModeDisplay ) - RefreshCanvas(); + m_canvas->Refresh(); } // if the via was allowed by DRC, then the layer swap has already @@ -1310,7 +1310,7 @@ void PCB_EDIT_FRAME::SwitchLayer( wxDC* DC, LAYER_NUM layer ) setActiveLayer( layer ); if( DisplayOpt.ContrastModeDisplay ) - RefreshCanvas(); + m_canvas->Refresh(); } diff --git a/pcbnew/edit_pcb_text.cpp b/pcbnew/edit_pcb_text.cpp index 26d3edd44d..7c518322e4 100644 --- a/pcbnew/edit_pcb_text.cpp +++ b/pcbnew/edit_pcb_text.cpp @@ -126,7 +126,7 @@ void PCB_EDIT_FRAME::Place_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ) TextePcb->ClearFlags(); #ifdef USE_WX_OVERLAY - RefreshCanvas(); + m_canvas->Refresh(); #endif } @@ -144,7 +144,7 @@ void PCB_EDIT_FRAME::StartMoveTextePcb( TEXTE_PCB* aTextePcb, wxDC* aDC, bool aE SetMsgPanel( aTextePcb ); #ifdef USE_WX_OVERLAY - RefreshCanvas(); + m_canvas->Refresh(); #endif SetCrossHairPosition( aTextePcb->GetTextPosition() ); @@ -257,7 +257,7 @@ void PCB_EDIT_FRAME::Rotate_Texte_Pcb( TEXTE_PCB* TextePcb, wxDC* DC ) OnModify(); #ifdef USE_WX_OVERLAY - RefreshCanvas(); + m_canvas->Refresh(); #endif } @@ -281,6 +281,6 @@ void PCB_EDIT_FRAME::FlipTextePcb( TEXTE_PCB* aTextePcb, wxDC* aDC ) OnModify(); #ifdef USE_WX_OVERLAY - RefreshCanvas(); + m_canvas->Refresh(); #endif } diff --git a/pcbnew/editmod.cpp b/pcbnew/editmod.cpp index 9f4e01a7f0..1f217d6194 100644 --- a/pcbnew/editmod.cpp +++ b/pcbnew/editmod.cpp @@ -68,7 +68,7 @@ void PCB_EDIT_FRAME::InstallModuleOptionsFrame( MODULE* Module, wxDC* DC ) #ifdef __WXMAC__ // If something edited, push a refresh request if (retvalue == 0 || retvalue == 1) - RefreshCanvas(); + m_canvas->Refresh(); #endif if( retvalue == 2 ) @@ -120,7 +120,7 @@ void FOOTPRINT_EDIT_FRAME::RemoveStruct( EDA_ITEM* Item ) case PCB_MODULE_EDGE_T: Delete_Edge_Module( (EDGE_MODULE*) Item ); - RefreshCanvas(); + m_canvas->Refresh(); break; case PCB_MODULE_T: diff --git a/pcbnew/edtxtmod.cpp b/pcbnew/edtxtmod.cpp index 17d9faa90d..d180cd00cd 100644 --- a/pcbnew/edtxtmod.cpp +++ b/pcbnew/edtxtmod.cpp @@ -349,7 +349,7 @@ void PCB_BASE_FRAME::ResetTextSize( BOARD_ITEM* aItem, wxDC* aDC ) text->SetThickness( newThickness ); if( aDC ) - RefreshCanvas(); + m_canvas->Refresh(); OnModify(); } diff --git a/pcbnew/event_handlers_tracks_vias_sizes.cpp b/pcbnew/event_handlers_tracks_vias_sizes.cpp index 33f975b07c..52428a3834 100644 --- a/pcbnew/event_handlers_tracks_vias_sizes.cpp +++ b/pcbnew/event_handlers_tracks_vias_sizes.cpp @@ -118,5 +118,5 @@ void PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event( wxCommandEvent& event ) }*/ //+hp //Refresh canvas, that we can see changes instantly. I use this because it dont,t throw mouse up-left corner. - RefreshCanvas(); + m_canvas->Refresh(); } diff --git a/pcbnew/footprint_wizard.cpp b/pcbnew/footprint_wizard.cpp index e8e5a53ab0..cf5ed55307 100644 --- a/pcbnew/footprint_wizard.cpp +++ b/pcbnew/footprint_wizard.cpp @@ -120,7 +120,7 @@ void FOOTPRINT_WIZARD_FRAME::ReloadFootprint() DBG(printf( "footprintWizard->GetModule() returns NULL\n" );) } - RefreshCanvas(); + m_canvas->Refresh(); } diff --git a/pcbnew/footprint_wizard_frame.cpp b/pcbnew/footprint_wizard_frame.cpp index efce1ccf90..1804286618 100644 --- a/pcbnew/footprint_wizard_frame.cpp +++ b/pcbnew/footprint_wizard_frame.cpp @@ -409,7 +409,7 @@ void FOOTPRINT_WIZARD_FRAME::ReCreatePageList() ReCreateParameterList(); ReCreateHToolbar(); DisplayWizardInfos(); - RefreshCanvas(); + m_canvas->Refresh(); } @@ -507,7 +507,7 @@ void FOOTPRINT_WIZARD_FRAME::ClickOnPageList( wxCommandEvent& event ) return; ReCreateParameterList(); - RefreshCanvas(); + m_canvas->Refresh(); DisplayWizardInfos(); } diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index cc72a9af84..61ee1a9c1d 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -366,7 +366,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit DisplayOpt.DisplayPcbTrackFill ^= 1; DisplayOpt.DisplayPcbTrackFill &= 1; m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill; - RefreshCanvas(); + m_canvas->Refresh(); break; case HK_DELETE: @@ -463,7 +463,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit { Other_Layer_Route( NULL, aDC ); if( DisplayOpt.ContrastModeDisplay ) - RefreshCanvas(); + m_canvas->Refresh(); break; } @@ -546,7 +546,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit case HK_SWITCH_HIGHCONTRAST_MODE: // switch to high contrast mode and refresh the canvas DisplayOpt.ContrastModeDisplay = !DisplayOpt.ContrastModeDisplay; - RefreshCanvas(); + m_canvas->Refresh(); break; case HK_CANVAS_CAIRO: diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index a2623769e8..ca026f9f11 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -541,7 +541,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) GetScreen()->GetCurItem()->ClearFlags(); if( ret > 0 ) - RefreshCanvas(); + m_canvas->Refresh(); } break; @@ -571,7 +571,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) m_canvas->MoveCursorToCrossHair(); if( ret > 0 ) - RefreshCanvas(); + m_canvas->Refresh(); } break; @@ -660,38 +660,38 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) m_canvas->MoveCursorToCrossHair(); if( edge ) - RefreshCanvas(); + m_canvas->Refresh(); } break; case ID_POPUP_MODEDIT_EDIT_BODY_ITEM : m_canvas->MoveCursorToCrossHair(); InstallFootprintBodyItemPropertiesDlg( (EDGE_MODULE*) GetScreen()->GetCurItem() ); - RefreshCanvas(); + m_canvas->Refresh(); break; case ID_POPUP_MODEDIT_EDIT_WIDTH_CURRENT_EDGE: m_canvas->MoveCursorToCrossHair(); Edit_Edge_Width( (EDGE_MODULE*) GetScreen()->GetCurItem() ); - RefreshCanvas(); + m_canvas->Refresh(); break; case ID_POPUP_MODEDIT_EDIT_WIDTH_ALL_EDGE: m_canvas->MoveCursorToCrossHair(); Edit_Edge_Width( NULL ); - RefreshCanvas(); + m_canvas->Refresh(); break; case ID_POPUP_MODEDIT_EDIT_LAYER_CURRENT_EDGE: m_canvas->MoveCursorToCrossHair(); Edit_Edge_Layer( (EDGE_MODULE*) GetScreen()->GetCurItem() ); - RefreshCanvas(); + m_canvas->Refresh(); break; case ID_POPUP_MODEDIT_EDIT_LAYER_ALL_EDGE: m_canvas->MoveCursorToCrossHair(); Edit_Edge_Layer( NULL ); - RefreshCanvas(); + m_canvas->Refresh(); break; case ID_POPUP_PCB_DELETE_EDGE: @@ -774,7 +774,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) } if( redraw ) - RefreshCanvas(); + m_canvas->Refresh(); } diff --git a/pcbnew/modedit_onclick.cpp b/pcbnew/modedit_onclick.cpp index 65aa33ead2..7571d66955 100644 --- a/pcbnew/modedit_onclick.cpp +++ b/pcbnew/modedit_onclick.cpp @@ -97,13 +97,13 @@ void FOOTPRINT_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) { End_Edge_Module( (EDGE_MODULE*) item ); SetCurItem( NULL ); - RefreshCanvas(); + m_canvas->Refresh(); } else if( ( (EDGE_MODULE*) item )->GetShape() == S_ARC ) { End_Edge_Module( (EDGE_MODULE*) item ); SetCurItem( NULL ); - RefreshCanvas(); + m_canvas->Refresh(); } else if( ( (EDGE_MODULE*) item )->GetShape() == S_SEGMENT ) { @@ -149,7 +149,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) // so deselect the active tool SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString ); SetCurItem( NULL ); - RefreshCanvas(); + m_canvas->Refresh(); } break; @@ -435,7 +435,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) m_canvas->MoveCursorToCrossHair(); if( ret > 0 ) - RefreshCanvas(); + m_canvas->Refresh(); } break; @@ -447,7 +447,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) case PCB_MODULE_EDGE_T : m_canvas->MoveCursorToCrossHair(); InstallFootprintBodyItemPropertiesDlg( (EDGE_MODULE*) item ); - RefreshCanvas(); + m_canvas->Refresh(); break; default: @@ -462,7 +462,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& MousePos ) { End_Edge_Module( (EDGE_MODULE*) item ); SetCurItem( NULL ); - RefreshCanvas(); + m_canvas->Refresh(); } break; diff --git a/pcbnew/modedit_undo_redo.cpp b/pcbnew/modedit_undo_redo.cpp index 8d4fea8620..5e1fc518cc 100644 --- a/pcbnew/modedit_undo_redo.cpp +++ b/pcbnew/modedit_undo_redo.cpp @@ -72,7 +72,7 @@ void FOOTPRINT_EDIT_FRAME::GetComponentFromRedoList( wxCommandEvent& event ) SetCurItem( NULL ); OnModify(); - RefreshCanvas(); + m_canvas->Refresh(); } @@ -101,5 +101,5 @@ void FOOTPRINT_EDIT_FRAME::GetComponentFromUndoList( wxCommandEvent& event ) SetCurItem( NULL ); OnModify(); - RefreshCanvas(); + m_canvas->Refresh(); } diff --git a/pcbnew/modules.cpp b/pcbnew/modules.cpp index d8100ceaca..477feacaf6 100644 --- a/pcbnew/modules.cpp +++ b/pcbnew/modules.cpp @@ -285,7 +285,7 @@ bool PCB_EDIT_FRAME::Delete_Module( MODULE* aModule, wxDC* aDC, bool aAskBeforeD // Redraw the full screen to ensure perfect display of board and ratsnest. if( aDC ) - RefreshCanvas(); + m_canvas->Refresh(); return true; } @@ -421,7 +421,7 @@ void PCB_BASE_FRAME::PlaceModule( MODULE* aModule, wxDC* aDC, bool aDoNotRecreat Compile_Ratsnest( aDC, true ); if( aDC ) - RefreshCanvas(); + m_canvas->Refresh(); SetMsgPanel( aModule ); } @@ -490,7 +490,7 @@ void PCB_BASE_FRAME::Rotate_Module( wxDC* DC, MODULE* module, double angle, bool } if( module->GetFlags() == 0 ) // module not in edit: redraw full screen - RefreshCanvas(); + m_canvas->Refresh(); } } diff --git a/pcbnew/modview.cpp b/pcbnew/modview.cpp index bfeed514cc..2fb378ef84 100644 --- a/pcbnew/modview.cpp +++ b/pcbnew/modview.cpp @@ -165,7 +165,7 @@ void FOOTPRINT_VIEWER_FRAME::SelectCurrentFootprint( wxCommandEvent& event ) SetCurItem( NULL ); Zoom_Automatique( false ); - RefreshCanvas(); + m_canvas->Refresh(); Update3D_Frame(); m_FootprintList->SetStringSelection( m_footprintName ); } diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index 52c2d2f57d..b8cf54629f 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -411,7 +411,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList() ReCreateFootprintList(); ReCreateHToolbar(); DisplayLibInfos(); - RefreshCanvas(); + m_canvas->Refresh(); } @@ -477,7 +477,7 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnLibList( wxCommandEvent& event ) m_libraryName = name; ReCreateFootprintList(); - RefreshCanvas(); + m_canvas->Refresh(); DisplayLibInfos(); ReCreateHToolbar(); } @@ -525,7 +525,7 @@ void FOOTPRINT_VIEWER_FRAME::ClickOnFootprintList( wxCommandEvent& event ) DisplayLibInfos(); Zoom_Automatique( false ); - RefreshCanvas(); + m_canvas->Refresh(); Update3D_Frame(); } } diff --git a/pcbnew/move_or_drag_track.cpp b/pcbnew/move_or_drag_track.cpp index ca4374942f..3a5b1bb271 100644 --- a/pcbnew/move_or_drag_track.cpp +++ b/pcbnew/move_or_drag_track.cpp @@ -892,7 +892,7 @@ bool PCB_EDIT_FRAME::PlaceDraggedOrMovedTrackSegment( TRACK* Track, wxDC* DC ) if( current_net_code > 0 ) TestNetConnection( DC, current_net_code ); - RefreshCanvas(); + m_canvas->Refresh(); return true; } diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index 4900e3ecae..d0a80154e5 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -112,7 +112,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName, // Rebuild the board connectivity: Compile_Ratsnest( NULL, true ); SetMsgPanel( GetBoard() ); - RefreshCanvas(); + m_canvas->Refresh(); } diff --git a/pcbnew/sel_layer.cpp b/pcbnew/sel_layer.cpp index e2e524beb2..5e265a26dc 100644 --- a/pcbnew/sel_layer.cpp +++ b/pcbnew/sel_layer.cpp @@ -243,7 +243,7 @@ void PCB_BASE_FRAME::SelectLayerPair() // because the PAD_SMD pads may change color. if( result >= 0 && DisplayOpt.ContrastModeDisplay ) { - RefreshCanvas(); + m_canvas->Refresh(); } } diff --git a/pcbnew/xchgmod.cpp b/pcbnew/xchgmod.cpp index 59f7b46f8c..d40a95a8b6 100644 --- a/pcbnew/xchgmod.cpp +++ b/pcbnew/xchgmod.cpp @@ -281,7 +281,7 @@ void DIALOG_EXCHANGE_MODULE::Change_Current_Module() if( m_Parent->GetBoard()->IsElementVisible( RATSNEST_VISIBLE ) ) m_Parent->Compile_Ratsnest( NULL, true ); - m_Parent->RefreshCanvas(); + m_Parent->GetCanvas()->Refresh(); } if( pickList.GetCount() ) @@ -370,7 +370,7 @@ void DIALOG_EXCHANGE_MODULE::Change_ModuleId( bool aUseValue ) if( m_Parent->GetBoard()->IsElementVisible( RATSNEST_VISIBLE ) ) m_Parent->Compile_Ratsnest( NULL, true ); - m_Parent->RefreshCanvas(); + m_Parent->GetCanvas()->Refresh(); } if( pickList.GetCount() ) @@ -423,7 +423,7 @@ void DIALOG_EXCHANGE_MODULE::Change_ModuleAll() if( m_Parent->GetBoard()->IsElementVisible( RATSNEST_VISIBLE ) ) m_Parent->Compile_Ratsnest( NULL, true ); - m_Parent->RefreshCanvas(); + m_Parent->GetCanvas()->Refresh(); } if( pickList.GetCount() ) diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index e015bf061f..19dcfe5f2a 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -333,7 +333,7 @@ void PCB_EDIT_FRAME::End_Move_Zone_Corner_Or_Outlines( wxDC* DC, ZONE_CONTAINER* // Combine zones if possible wxBusyCursor dummy; GetBoard()->OnAreaPolygonModified( &s_AuxiliaryList, aZone ); - RefreshCanvas(); + m_canvas->Refresh(); int ii = GetBoard()->GetAreaIndex( aZone ); // test if aZone exists diff --git a/pcbnew/zones_by_polygon_fill_functions.cpp b/pcbnew/zones_by_polygon_fill_functions.cpp index 2697f03e6e..61324cb6c7 100644 --- a/pcbnew/zones_by_polygon_fill_functions.cpp +++ b/pcbnew/zones_by_polygon_fill_functions.cpp @@ -80,7 +80,7 @@ void PCB_EDIT_FRAME::Delete_OldZone_Fill( SEGZONE* aZone, time_t aTimestamp ) if( modify ) { OnModify(); - RefreshCanvas(); + m_canvas->Refresh(); } } From 607fe8ed4ba0001f32e3f2c04c83665d04290488 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 20 Sep 2013 18:21:01 +0200 Subject: [PATCH 362/415] Added missing files --- common/tool/action_manager.cpp | 106 +++++++++++++++++++++++++++++++++ include/tool/action_manager.h | 100 +++++++++++++++++++++++++++++++ 2 files changed, 206 insertions(+) create mode 100644 common/tool/action_manager.cpp create mode 100644 include/tool/action_manager.h diff --git a/common/tool/action_manager.cpp b/common/tool/action_manager.cpp new file mode 100644 index 0000000000..2cd67b8464 --- /dev/null +++ b/common/tool/action_manager.cpp @@ -0,0 +1,106 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include + +ACTION_MANAGER::ACTION_MANAGER( TOOL_MANAGER* aToolManager ) : + m_toolMgr( aToolManager ) +{ +} + + +ACTION_MANAGER::~ACTION_MANAGER() +{ +} + + +void ACTION_MANAGER::RegisterAction( TOOL_ACTION* aAction ) +{ + int aId = MakeActionId( aAction->m_name ); + aAction->setId( aId ); + + m_actionNameIndex[aAction->m_name] = aAction; + m_actionIdIndex[aAction->m_id] = aAction; + + if( aAction->HasHotKey() ) + m_actionHotKeys[aAction->m_currentHotKey] = aAction; + + aAction->setActionMgr( this ); +} + + +void ACTION_MANAGER::UnregisterAction( TOOL_ACTION* aAction ) +{ + // Indicate that we no longer care about the object + aAction->setActionMgr( NULL ); + + m_actionNameIndex.erase( aAction->m_name ); + m_actionIdIndex.erase( aAction->m_id ); + + if( aAction->HasHotKey() ) + m_actionHotKeys.erase( aAction->m_currentHotKey ); +} + + +int ACTION_MANAGER::MakeActionId( const std::string& aActionName ) +{ + static int currentActionId = 0; + return currentActionId++; +} + + +bool ACTION_MANAGER::RunAction( const std::string& aActionName ) const +{ + std::map::const_iterator it = m_actionNameIndex.find( aActionName ); + + if( it == m_actionNameIndex.end() ) + return false; + + runAction( it->second ); + + return true; +} + + +bool ACTION_MANAGER::RunHotKey( int aHotKey ) const +{ + std::map::const_iterator it = m_actionHotKeys.find( aHotKey ); + + if( it == m_actionHotKeys.end() ) + return false; + + runAction( it->second ); + + return true; +} + + +void ACTION_MANAGER::runAction( const TOOL_ACTION* aAction ) const +{ + TOOL_EVENT event = aAction->GetEvent(); + m_toolMgr->ProcessEvent( event ); +} diff --git a/include/tool/action_manager.h b/include/tool/action_manager.h new file mode 100644 index 0000000000..c21d8f33ae --- /dev/null +++ b/include/tool/action_manager.h @@ -0,0 +1,100 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef ACTION_MANAGER_H_ +#define ACTION_MANAGER_H_ + +#include +#include + +class TOOL_BASE; +class TOOL_MANAGER; +class TOOL_ACTION; + +class ACTION_MANAGER +{ +public: + /** + * Constructor. + * @param aToolManager is a tool manager instance that is used to pass events to tools. + */ + ACTION_MANAGER( TOOL_MANAGER* aToolManager ); + ~ACTION_MANAGER(); + + /** + * Function RegisterAction() + * Adds a tool action to the manager set and sets it up. After that is is possible to invoke + * the action using hotkeys or its name. + * @param aAction: action to be added. Ownership is not transferred. + */ + void RegisterAction( TOOL_ACTION* aAction ); + + /** + * Function UnregisterAction() + * Removes a tool action from the manager set and makes it unavailable for further usage. + * @param aAction: action to be removed. + */ + void UnregisterAction( TOOL_ACTION* aAction ); + + /** + * Generates an unique ID from for a tool with given name. + */ + static int MakeActionId( const std::string& aActionName ); + + /** + * Function RunAction() + * Runs an action with a given name (if there is one available). + * @param aActionName is the name of action to be run. + * @return True if there was an action associated with the name, false otherwise. + */ + bool RunAction( const std::string& aActionName ) const; + + // TODO to be considered + //bool RunAction( int aActionId ) const; + //bool RunAction( TOOL_ACTION* aAction ) const; + + /** + * Function RunHotKey() + * Runs an action associated with a hotkey (if there is one available). + * @param aHotKey is the hotkey to be served. + * @return True if there was an action associated with the hotkey, false otherwise. + */ + bool RunHotKey( int aHotKey ) const; + +private: + TOOL_MANAGER* m_toolMgr; + std::map m_actionIdIndex; + std::map m_actionNameIndex; + std::map m_actionHotKeys; + + /** + * Function runAction() + * Prepares an appropriate event and sends it to the destination specified in a TOOL_ACTION + * object. + * @param aAction is the action to be run. + */ + void runAction( const TOOL_ACTION* aAction ) const; +}; + +#endif /* ACTION_MANAGER_H_ */ From e9e4df8d01aa0f52bda1ad87b3af24b69a9bcca1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 23 Sep 2013 10:02:01 +0200 Subject: [PATCH 363/415] FIxed TOOL_EVENT::Modifier() (now it returns value for current modifier, not only if there is one active or not). --- include/tool/tool_event.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index 60c8eba326..15438c8dd8 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -231,7 +231,7 @@ public: return m_actions == TA_CancelTool; } - bool Modifier( int aMask = MD_ModifierMask ) const + int Modifier( int aMask = MD_ModifierMask ) const { return ( m_modifiers & aMask ); } From 5e3f579431ea08c50c6597ce2959e5de41ce552f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 23 Sep 2013 17:02:25 +0200 Subject: [PATCH 364/415] Fixed build for Mac OS --- common/CMakeLists.txt | 18 +-- common/geometry/shape_collisions.cpp | 4 +- common/geometry/shape_index.cpp | 33 +++++ common/math/math_util.cpp | 80 +++++++++++ common/system/fcontext.s | 39 ++++-- common/system/jump_i386_sysv_macho_gas.S | 70 ++++++++++ common/system/jump_x86_64_sysv_macho_gas.S | 80 +++++++++++ common/system/make_i386_sysv_macho_gas.S | 71 ++++++++++ common/system/make_x86_64_sysv_macho_gas.S | 71 ++++++++++ include/geometry/shape.h | 2 +- include/geometry/shape_index.h | 153 ++++++++++----------- include/math/math_util.h | 57 +------- include/tool/coroutine.h | 8 +- 13 files changed, 528 insertions(+), 158 deletions(-) create mode 100644 common/geometry/shape_index.cpp create mode 100644 common/math/math_util.cpp create mode 100644 common/system/jump_i386_sysv_macho_gas.S create mode 100644 common/system/jump_x86_64_sysv_macho_gas.S create mode 100644 common/system/make_i386_sysv_macho_gas.S create mode 100644 common/system/make_x86_64_sysv_macho_gas.S diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 01e99c78b2..bbe7d2934f 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -151,12 +151,13 @@ enable_language(C CXX ASM) set_source_files_properties(system/fcontext.s PROPERTIES COMPILE_FLAGS "-x assembler-with-cpp") set(COMMON_SRCS - ${COMMON_SRCS} - view/view.cpp - view/view_item.cpp - view/view_group.cpp + ${COMMON_SRCS} + view/view.cpp + view/view_item.cpp + view/view_group.cpp - system/fcontext.s + math/math_util.cpp + system/fcontext.s tool/tool_base.cpp tool/tool_manager.cpp @@ -166,9 +167,10 @@ set(COMMON_SRCS tool/action_manager.cpp tool/context_menu.cpp - geometry/seg.cpp - geometry/shape_line_chain.cpp - geometry/shape_collisions.cpp + geometry/seg.cpp + geometry/shape_line_chain.cpp + geometry/shape_collisions.cpp + geometry/shape_index.cpp ) add_library(common STATIC ${COMMON_SRCS}) diff --git a/common/geometry/shape_collisions.cpp b/common/geometry/shape_collisions.cpp index cf2c348ee5..c67a371e68 100644 --- a/common/geometry/shape_collisions.cpp +++ b/common/geometry/shape_collisions.cpp @@ -29,7 +29,7 @@ #include #include -typedef typename VECTOR2I::extended_type ecoord; +typedef VECTOR2I::extended_type ecoord; static inline bool Collide( const SHAPE_CIRCLE& a, const SHAPE_CIRCLE& b, int clearance, bool needMTV, VECTOR2I& aMTV ) { @@ -207,4 +207,4 @@ bool SHAPE::Collide ( const SHAPE *aShape, int aClerance ) const VECTOR2I dummy; return CollideShapes( this, aShape, aClerance, false, dummy); } - \ No newline at end of file + diff --git a/common/geometry/shape_index.cpp b/common/geometry/shape_index.cpp new file mode 100644 index 0000000000..4552881082 --- /dev/null +++ b/common/geometry/shape_index.cpp @@ -0,0 +1,33 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Jacobo Aragunde Pérez + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +template<> +const SHAPE* shapeFunctor( SHAPE* aItem ) +{ + return aItem; +} + diff --git a/common/math/math_util.cpp b/common/math/math_util.cpp new file mode 100644 index 0000000000..ff939964b3 --- /dev/null +++ b/common/math/math_util.cpp @@ -0,0 +1,80 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (c) 2005 Michael Niedermayer + * Copyright (C) CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +// explicit specializations for integer types, taking care of overflow. +template<> int rescale( int numerator, int value, int denominator ) +{ + return (int) ( (int64_t) numerator * (int64_t) value / (int64_t) denominator ); +} + +template<> int64_t rescale( int64_t numerator, int64_t value, int64_t denominator ) +{ + uint64_t r = 0; + int64_t sign = ( ( numerator < 0) ? -1 : 1 ) * ( denominator < 0 ? - 1: 1 ) * (value < 0 ? - 1 : 1); + + uint64_t a = abs( numerator ); + uint64_t b = abs( value ); + uint64_t c = abs( denominator ); + + r = c / 2; + + if( b <= INT_MAX && c <= INT_MAX ) + { + if( a <= INT_MAX ) + return sign * ( (a * b + r ) / c ); + else + return sign * (a / c * b + (a % c * b + r) / c); + } else { + uint64_t a0 = a & 0xFFFFFFFF; + uint64_t a1 = a >> 32; + uint64_t b0 = b & 0xFFFFFFFF; + uint64_t b1 = b >> 32; + uint64_t t1 = a0 * b1 + a1 * b0; + uint64_t t1a = t1 << 32; + int i; + + a0 = a0 * b0 + t1a; + a1 = a1 * b1 + (t1 >> 32) + (a0 < t1a); + a0 += r; + a1 += a0 < r; + + for( i = 63; i >= 0; i-- ) + { + a1 += a1 + ( (a0 >> i) & 1 ); + t1 += t1; + + if( c <= a1 ) + { + a1 -= c; + t1++; + } + } + + return t1 * sign; + } +}; + diff --git a/common/system/fcontext.s b/common/system/fcontext.s index 16b291e4bd..c5d5905a06 100644 --- a/common/system/fcontext.s +++ b/common/system/fcontext.s @@ -3,19 +3,38 @@ which may be unpleasant, in particular under Windows (we don't support VC++, while boost::context does not support mingw */ +#ifdef __APPLE__ -#if __i386__ + #if __i386__ + #include "jump_i386_sysv_macho_gas.S" + #include "make_i386_sysv_macho_gas.S" + + #elif __x86_64__ + #include "jump_x86_64_sysv_macho_gas.S" + #include "make_x86_64_sysv_macho_gas.S" - #ifdef __WIN32__ - #include "jump_i386_pe_gas.S" - #include "make_i386_pe_gas.S" #else - #include "jump_i386_sysv_elf_gas.S" - #include "make_i386_sysv_elf_gas.S" + #error "Missing make_fcontext & jump_fcontext routines for this architecture" #endif -#elif __x86_64__ - #include "jump_x86_64_sysv_elf_gas.S" - #include "make_x86_64_sysv_elf_gas.S" -#endif +#else + #if __i386__ + + #ifdef __WIN32__ + #include "jump_i386_pe_gas.S" + #include "make_i386_pe_gas.S" + #else + #include "jump_i386_sysv_elf_gas.S" + #include "make_i386_sysv_elf_gas.S" + #endif + + #elif __x86_64__ + #include "jump_x86_64_sysv_elf_gas.S" + #include "make_x86_64_sysv_elf_gas.S" + + #else + #error "Missing make_fcontext & jump_fcontext routines for this architecture" + #endif + +#endif diff --git a/common/system/jump_i386_sysv_macho_gas.S b/common/system/jump_i386_sysv_macho_gas.S new file mode 100644 index 0000000000..38e5cde958 --- /dev/null +++ b/common/system/jump_i386_sysv_macho_gas.S @@ -0,0 +1,70 @@ +/* + Copyright Oliver Kowalke 2009. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +*/ + +/******************************************************************** + * * + * -------------------------------------------------------------- * + * | 0 | 1 | 2 | 3 | 4 | 5 | * + * -------------------------------------------------------------- * + * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | * + * -------------------------------------------------------------- * + * | EDI | ESI | EBX | EBP | ESP | EIP | * + * -------------------------------------------------------------- * + * -------------------------------------------------------------- * + * | 6 | 7 | | * + * -------------------------------------------------------------- * + * | 0x18 | 0x1c | | * + * -------------------------------------------------------------- * + * | sp | size | | * + * -------------------------------------------------------------- * + * -------------------------------------------------------------- * + * | 8 | 9 | | * + * -------------------------------------------------------------- * + * | 0x20 | 0x24 | | * + * -------------------------------------------------------------- * + * | fc_mxcsr|fc_x87_cw| | * + * -------------------------------------------------------------- * + * * + * *****************************************************************/ + +.text +.globl _jump_fcontext +.align 2 +_jump_fcontext: + movl 0x4(%esp), %ecx /* load address of the first fcontext_t arg */ + movl %edi, (%ecx) /* save EDI */ + movl %esi, 0x4(%ecx) /* save ESI */ + movl %ebx, 0x8(%ecx) /* save EBX */ + movl %ebp, 0xc(%ecx) /* save EBP */ + + leal 0x4(%esp), %eax /* exclude the return address */ + movl %eax, 0x10(%ecx) /* save as stack pointer */ + movl (%esp), %eax /* load return address */ + movl %eax, 0x14(%ecx) /* save return address */ + + movl 0x8(%esp), %edx /* load address of the second fcontext_t arg */ + movl (%edx), %edi /* restore EDI */ + movl 0x4(%edx), %esi /* restore ESI */ + movl 0x8(%edx), %ebx /* restore EBX */ + movl 0xc(%edx), %ebp /* restore EBP */ + + movl 0x10(%esp), %eax /* check if fpu enve preserving was requested */ + test %eax, %eax + je 1f + + stmxcsr 0x20(%ecx) /* save MMX control and status word */ + fnstcw 0x24(%ecx) /* save x87 control word */ + ldmxcsr 0x20(%edx) /* restore MMX control and status word */ + fldcw 0x24(%edx) /* restore x87 control word */ +1: + movl 0xc(%esp), %eax /* use third arg as return value after jump */ + + movl 0x10(%edx), %esp /* restore ESP */ + movl %eax, 0x4(%esp) /* use third arg as first arg in context function */ + movl 0x14(%edx), %edx /* fetch the address to return to */ + + jmp *%edx /* indirect jump to context */ diff --git a/common/system/jump_x86_64_sysv_macho_gas.S b/common/system/jump_x86_64_sysv_macho_gas.S new file mode 100644 index 0000000000..53d8362da2 --- /dev/null +++ b/common/system/jump_x86_64_sysv_macho_gas.S @@ -0,0 +1,80 @@ +/* + Copyright Oliver Kowalke 2009. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +*/ + +/**************************************************************************************** + * * + * ---------------------------------------------------------------------------------- * + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * + * ---------------------------------------------------------------------------------- * + * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * + * ---------------------------------------------------------------------------------- * + * | RBX | R12 | R13 | R14 | * + * ---------------------------------------------------------------------------------- * + * ---------------------------------------------------------------------------------- * + * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * + * ---------------------------------------------------------------------------------- * + * | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | * + * ---------------------------------------------------------------------------------- * + * | R15 | RBP | RSP | RIP | * + * ---------------------------------------------------------------------------------- * + * ---------------------------------------------------------------------------------- * + * | 16 | 17 | 18 | 19 | | * + * ---------------------------------------------------------------------------------- * + * | 0x40 | 0x44 | 0x48 | 0x4c | | * + * ---------------------------------------------------------------------------------- * + * | sp | size | | * + * ---------------------------------------------------------------------------------- * + * ---------------------------------------------------------------------------------- * + * | 20 | 21 | | * + * ---------------------------------------------------------------------------------- * + * | 0x50 | 0x54 | | * + * ---------------------------------------------------------------------------------- * + * | fc_mxcsr|fc_x87_cw| | * + * ---------------------------------------------------------------------------------- * + * * + * **************************************************************************************/ + +.text +.globl _jump_fcontext +.align 8 +_jump_fcontext: + movq %rbx, (%rdi) /* save RBX */ + movq %r12, 0x8(%rdi) /* save R12 */ + movq %r13, 0x10(%rdi) /* save R13 */ + movq %r14, 0x18(%rdi) /* save R14 */ + movq %r15, 0x20(%rdi) /* save R15 */ + movq %rbp, 0x28(%rdi) /* save RBP */ + + cmp $0, %rcx + je 1f + + stmxcsr 0x50(%rdi) /* save MMX control and status word */ + fnstcw 0x54(%rdi) /* save x87 control word */ + + ldmxcsr 0x50(%rsi) /* restore MMX control and status word */ + fldcw 0x54(%rsi) /* restore x87 control word */ +1: + + leaq 0x8(%rsp), %rax /* exclude the return address and save as stack pointer */ + movq %rax, 0x30(%rdi) /* save as stack pointer */ + movq (%rsp), %rax /* save return address */ + movq %rax, 0x38(%rdi) /* save return address as RIP */ + + movq (%rsi), %rbx /* restore RBX */ + movq 0x8(%rsi), %r12 /* restore R12 */ + movq 0x10(%rsi), %r13 /* restore R13 */ + movq 0x18(%rsi), %r14 /* restore R14 */ + movq 0x20(%rsi), %r15 /* restore R15 */ + movq 0x28(%rsi), %rbp /* restore RBP */ + + movq 0x30(%rsi), %rsp /* restore RSP */ + movq 0x38(%rsi), %rcx /* fetch the address to return to */ + + movq %rdx, %rax /* use third arg as return value after jump */ + movq %rdx, %rdi /* use third arg as first arg in context function */ + + jmp *%rcx /* indirect jump to context */ diff --git a/common/system/make_i386_sysv_macho_gas.S b/common/system/make_i386_sysv_macho_gas.S new file mode 100644 index 0000000000..5db42eb37d --- /dev/null +++ b/common/system/make_i386_sysv_macho_gas.S @@ -0,0 +1,71 @@ +/* + Copyright Oliver Kowalke 2009. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +*/ + +/******************************************************************** + * * + * -------------------------------------------------------------- * + * | 0 | 1 | 2 | 3 | 4 | 5 | * + * -------------------------------------------------------------- * + * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | * + * -------------------------------------------------------------- * + * | EDI | ESI | EBX | EBP | ESP | EIP | * + * -------------------------------------------------------------- * + * -------------------------------------------------------------- * + * | 6 | 7 | | * + * -------------------------------------------------------------- * + * | 0x18 | 0x1c | | * + * -------------------------------------------------------------- * + * | sp | size | | * + * -------------------------------------------------------------- * + * -------------------------------------------------------------- * + * | 8 | 9 | | * + * -------------------------------------------------------------- * + * | 0x20 | 0x24 | | * + * -------------------------------------------------------------- * + * | fc_mxcsr|fc_x87_cw| | * + * -------------------------------------------------------------- * + * * + * *****************************************************************/ + +.text +.globl _make_fcontext +.align 2 +_make_fcontext: + movl 0x4(%esp), %eax /* load 1. arg of make_fcontext, pointer to context stack (base) */ + leal -0x28(%eax), %eax /* reserve space for fcontext_t at top of context stack */ + + /* shift address in EAX to lower 16 byte boundary */ + /* == pointer to fcontext_t and address of context stack */ + andl $-16, %eax + + movl 0x4(%esp), %edx /* load 1. arg of make_fcontext, pointer to context stack (base) */ + movl %edx, 0x18(%eax) /* save address of stack pointer (base) in fcontext_t */ + movl 0x8(%esp), %edx /* load 2. arg of make_fcontext, context stack size */ + movl %edx, 0x1c(%eax) /* save stack size in fcontext_t */ + movl 0xc(%esp), %edx /* load 3. arg of make_fcontext, pointer to context function */ + movl %edx, 0x14(%eax) /* save address of context fcuntion in fcontext_t */ + + stmxcsr 0x20(%eax) /* save MMX control and status word */ + fnstcw 0x24(%eax) /* save x87 control word */ + + leal -0x14(%eax), %edx /* reserve space for the last frame on context stack */ + movl %edx, 0x10(%eax) /* save address in EDX as stack pointer for context function */ + + call 1f +1: popl %ecx /* address of label 1 */ + addl $finish-1b, %ecx /* compute abs address of label finish */ + movl %ecx, (%edx) /* save address of finish as return address for context function */ + /* entered after context function returns */ + + ret + +finish: + /* ESP points to same address as ESP on entry of context function + 0x4 */ + xorl %eax, %eax + movl %eax, (%esp) /* exit code is zero */ + call __exit /* exit application */ + hlt diff --git a/common/system/make_x86_64_sysv_macho_gas.S b/common/system/make_x86_64_sysv_macho_gas.S new file mode 100644 index 0000000000..8f950f3eda --- /dev/null +++ b/common/system/make_x86_64_sysv_macho_gas.S @@ -0,0 +1,71 @@ +/* + Copyright Oliver Kowalke 2009. + Distributed under the Boost Software License, Version 1.0. + (See accompanying file LICENSE_1_0.txt or copy at + http://www.boost.org/LICENSE_1_0.txt) +*/ + +/**************************************************************************************** + * * + * ---------------------------------------------------------------------------------- * + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | * + * ---------------------------------------------------------------------------------- * + * | 0x0 | 0x4 | 0x8 | 0xc | 0x10 | 0x14 | 0x18 | 0x1c | * + * ---------------------------------------------------------------------------------- * + * | RBX | R12 | R13 | R14 | * + * ---------------------------------------------------------------------------------- * + * ---------------------------------------------------------------------------------- * + * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | * + * ---------------------------------------------------------------------------------- * + * | 0x20 | 0x24 | 0x28 | 0x2c | 0x30 | 0x34 | 0x38 | 0x3c | * + * ---------------------------------------------------------------------------------- * + * | R15 | RBP | RSP | RIP | * + * ---------------------------------------------------------------------------------- * + * ---------------------------------------------------------------------------------- * + * | 16 | 17 | 18 | 19 | | * + * ---------------------------------------------------------------------------------- * + * | 0x40 | 0x44 | 0x48 | 0x4c | | * + * ---------------------------------------------------------------------------------- * + * | sp | size | | * + * ---------------------------------------------------------------------------------- * + * ---------------------------------------------------------------------------------- * + * | 20 | 21 | | * + * ---------------------------------------------------------------------------------- * + * | 0x50 | 0x54 | | * + * ---------------------------------------------------------------------------------- * + * | fc_mxcsr|fc_x87_cw| | * + * ---------------------------------------------------------------------------------- * + * * + * **************************************************************************************/ + +.text +.globl _make_fcontext +.align 8 +_make_fcontext: + leaq -0x58(%rdi), %rax /* reserve space for fcontext_t at top of context stack */ + + /* shift address in RAX to lower 16 byte boundary */ + /* == pointer to fcontext_t and address of context stack */ + movabs $-16, %r8 + andq %r8, %rax + + movq %rdi, 0x40(%rax) /* save address of stack pointer (base) in fcontext_t */ + movq %rsi, 0x48(%rax) /* save stack size in fcontext_t */ + movq %rdx, 0x38(%rax) /* save address of context function in fcontext_t */ + + stmxcsr 0x50(%rax) /* save MMX control and status word */ + fnstcw 0x54(%rax) /* save x87 control word */ + + leaq -0x8(%rax), %rdx /* reserve space for the return address on context stack, (RSP - 0x8) % 16 == 0 */ + movq %rdx, 0x30(%rax) /* save address in RDX as stack pointer for context function */ + + leaq finish(%rip), %rcx /* compute abs address of label finish */ + movq %rcx, (%rdx) /* save address of finish as return address for context function */ + /* entered after context function returns */ + + ret /* return pointer to fcontext_t placed on context stack */ + +finish: + /* RSP points to same address as RSP on entry of context function + 0x8 */ + xorq %rdi, %rdi /* exit code is zero */ + call __exit /* exit application */ diff --git a/include/geometry/shape.h b/include/geometry/shape.h index c759b0bbd6..18895553ef 100644 --- a/include/geometry/shape.h +++ b/include/geometry/shape.h @@ -49,7 +49,7 @@ enum ShapeType { */ class SHAPE { protected: - typedef typename VECTOR2I::extended_type ecoord; + typedef VECTOR2I::extended_type ecoord; public: /** diff --git a/include/geometry/shape_index.h b/include/geometry/shape_index.h index a36ecff97d..6f505fb574 100644 --- a/include/geometry/shape_index.h +++ b/include/geometry/shape_index.h @@ -50,10 +50,7 @@ static const SHAPE* shapeFunctor( T aItem ) * shapeFunctor template function: specialization for T = SHAPE* */ template<> -const SHAPE* shapeFunctor( SHAPE* aItem ) -{ - return aItem; -} +const SHAPE* shapeFunctor( SHAPE* aItem ); /** * boundingBox template method @@ -114,79 +111,6 @@ class SHAPE_INDEX { public: - SHAPE_INDEX(); - - ~SHAPE_INDEX(); - - /** - * Function Add() - * - * Adds a SHAPE to the index. - * @param shape the new SHAPE - */ - void Add( T shape ); - - /** - * Function Remove() - * - * Removes a SHAPE to the index. - * @param shape the new SHAPE - */ - void Remove( T shape ); - - /** - * Function RemoveAll() - * - * Removes all the contents of the index. - */ - void RemoveAll(); - - /** - * Function Accept() - * - * Accepts a visitor for every SHAPE object contained in this INDEX. - * @param visitor Visitor object to be run - */ - template - void Accept( V visitor ) - { - SHAPE_INDEX::Iterator iter = this->Begin(); - while(!iter.IsNull()) { - T shape = *iter; - acceptVisitor(shape, visitor); - iter++; - } - } - - /** - * Function Reindex() - * - * Rebuilds the index. This should be used if the geometry of the objects - * contained by the index has changed. - */ - void Reindex(); - - /** - * Function Query() - * - * Runs a callback on every SHAPE object contained in the bounding box of (shape). - * @param shape shape to search against - * @param minDistance distance threshold - * @param visitor object to be invoked on every object contained in the search area. - */ - - template - int Query( const SHAPE *shape, int minDistance, V& visitor, bool aExact ) - { - BOX2I box = shape->BBox(); - box.Inflate(minDistance); - - int min[2] = {box.GetX(), box.GetY()}; - int max[2] = {box.GetRight(), box.GetBottom()}; - - return this->m_tree->Search(min, max, visitor); - } - class Iterator { private: @@ -278,6 +202,79 @@ class SHAPE_INDEX { } }; + SHAPE_INDEX(); + + ~SHAPE_INDEX(); + + /** + * Function Add() + * + * Adds a SHAPE to the index. + * @param shape the new SHAPE + */ + void Add( T shape ); + + /** + * Function Remove() + * + * Removes a SHAPE to the index. + * @param shape the new SHAPE + */ + void Remove( T shape ); + + /** + * Function RemoveAll() + * + * Removes all the contents of the index. + */ + void RemoveAll(); + + /** + * Function Accept() + * + * Accepts a visitor for every SHAPE object contained in this INDEX. + * @param visitor Visitor object to be run + */ + template + void Accept( V visitor ) + { + Iterator iter = this->Begin(); + while(!iter.IsNull()) { + T shape = *iter; + acceptVisitor(shape, visitor); + iter++; + } + } + + /** + * Function Reindex() + * + * Rebuilds the index. This should be used if the geometry of the objects + * contained by the index has changed. + */ + void Reindex(); + + /** + * Function Query() + * + * Runs a callback on every SHAPE object contained in the bounding box of (shape). + * @param shape shape to search against + * @param minDistance distance threshold + * @param visitor object to be invoked on every object contained in the search area. + */ + + template + int Query( const SHAPE *shape, int minDistance, V& visitor, bool aExact ) + { + BOX2I box = shape->BBox(); + box.Inflate(minDistance); + + int min[2] = {box.GetX(), box.GetY()}; + int max[2] = {box.GetRight(), box.GetBottom()}; + + return this->m_tree->Search(min, max, visitor); + } + /** * Function Begin() * @@ -331,7 +328,7 @@ void SHAPE_INDEX::Reindex() { RTree* newTree; newTree = new RTree(); - SHAPE_INDEX::Iterator iter = this->Begin(); + Iterator iter = this->Begin(); while(!iter.IsNull()) { T shape = *iter; BOX2I box = boundingBox(shape); diff --git a/include/math/math_util.h b/include/math/math_util.h index 9145b7fa89..5340f67f71 100644 --- a/include/math/math_util.h +++ b/include/math/math_util.h @@ -29,6 +29,7 @@ #include #include #include +#include /** * Function rescale() @@ -36,63 +37,9 @@ * Scales a number (value) by rational (numerator/denominator). Numerator must be <= denominator. */ -template static T rescale( T numerator, T value, T denominator ) +template T rescale( T numerator, T value, T denominator ) { return numerator * value / denominator; } - -// explicit specializations for integer types, taking care of overflow. -template<> int rescale( int numerator, int value, int denominator ) -{ - return (int) ( (int64_t) numerator * (int64_t) value / (int64_t) denominator ); -} - -template<> int64_t rescale( int64_t numerator, int64_t value, int64_t denominator ) -{ - int64_t r = 0; - int64_t sign = ( ( numerator < 0) ? -1 : 1 ) * ( denominator < 0 ? - 1: 1 ) * (value < 0 ? - 1 : 1); - - int64_t a = std::abs( numerator ); - int64_t b = std::abs( value ); - int64_t c = std::abs( denominator ); - - r = c / 2; - - if( b <= INT_MAX && c <= INT_MAX ) - { - if( a <= INT_MAX ) - return sign * ( (a * b + r ) / c ); - else - return sign * (a / c * b + (a % c * b + r) / c); - } else { - uint64_t a0 = a & 0xFFFFFFFF; - uint64_t a1 = a >> 32; - uint64_t b0 = b & 0xFFFFFFFF; - uint64_t b1 = b >> 32; - uint64_t t1 = a0 * b1 + a1 * b0; - uint64_t t1a = t1 << 32; - int i; - - a0 = a0 * b0 + t1a; - a1 = a1 * b1 + (t1 >> 32) + (a0 < t1a); - a0 += r; - a1 += ((uint64_t)a0) < r; - - for( i = 63; i >= 0; i-- ) - { - a1 += a1 + ( (a0 >> i) & 1 ); - t1 += t1; - - if( (uint64_t)c <= a1 ) - { - a1 -= c; - t1++; - } - } - - return t1 * sign; - } -}; - #endif // __MATH_UTIL_H diff --git a/include/tool/coroutine.h b/include/tool/coroutine.h index ddd460cc1f..f38029a9c8 100644 --- a/include/tool/coroutine.h +++ b/include/tool/coroutine.h @@ -98,7 +98,7 @@ public: */ void Yield() { - jump_fcontext( m_self, m_saved, 0 ); + boost::context::jump_fcontext( m_self, m_saved, 0 ); } /** @@ -110,11 +110,11 @@ public: void Yield( ReturnType& retVal ) { m_retVal = retVal; - jump_fcontext( m_self, m_saved, 0 ); + boost::context::jump_fcontext( m_self, m_saved, 0 ); } /** - * Function SetEntry() + * Function SetEntry() * * Defines the entry point for the coroutine, if not set in the constructor. */ @@ -156,7 +156,7 @@ public: */ bool Resume() { - jump_fcontext( m_saved, m_self, 0 ); + boost::context::jump_fcontext( m_saved, m_self, 0 ); return m_running; } From 634039d81ab9bc7383ca5cbe9211942c0af1aba7 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 24 Sep 2013 15:47:07 +0200 Subject: [PATCH 365/415] Added possibility to cancel a tool that is not on the top of the tool stack. --- common/tool/tool_manager.cpp | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 1fd03b62e2..e5dee7dea2 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -78,6 +78,16 @@ struct TOOL_MANAGER::TOOL_STATE /// List of possible transitions (ie. association of events and functions that are executed /// upon the event reception std::vector transitions; + + bool operator==( const TOOL_MANAGER::TOOL_STATE& aRhs ) const + { + return ( aRhs.theTool == this->theTool ); + } + + bool operator!=( const TOOL_MANAGER::TOOL_STATE& aRhs ) const + { + return ( aRhs.theTool != this->theTool ); + } }; @@ -262,7 +272,7 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) st->wakeupEvent = aEvent; st->pendingWait = false; st->waitEvents.clear(); - if( !st->cofunc->Resume() ) + if( st->cofunc && !st->cofunc->Resume() ) { // The couroutine has finished finishTool( st ); @@ -327,12 +337,20 @@ bool TOOL_MANAGER::dispatchActivation( TOOL_EVENT& aEvent ) void TOOL_MANAGER::finishTool( TOOL_STATE* aState ) { - wxASSERT( m_activeTools.front() == aState->theTool->GetId() ); + // Find the tool to be deactivated + std::deque::iterator it, it_end; + for( it = m_activeTools.begin(), it_end = m_activeTools.end(); it != it_end; ++it ) + { + if( aState == m_toolIdIndex[*it] ) + break; + } + + if( it != m_activeTools.end() ) + m_activeTools.erase( it ); + else + wxLogWarning( wxT( "Tried to finish not active tool" ) ); - // Deactivate the most recent tool and remove it from the active tools queue aState->idle = true; - m_activeTools.erase( m_activeTools.begin() ); - delete aState->cofunc; aState->cofunc = NULL; } From 57a8622e9af6a3e6144859a3b5e8680991444954 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 24 Sep 2013 15:48:04 +0200 Subject: [PATCH 366/415] Added functions for refreshing the layer set occupied by a VIEW_ITEM. --- common/view/view.cpp | 41 +++++++++++++++++++++++++++++++++------ common/view/view_item.cpp | 1 - include/view/view.h | 3 +++ include/view/view_item.h | 1 + 4 files changed, 39 insertions(+), 7 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 5d529f4559..10d52c62d7 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -633,7 +633,7 @@ void VIEW::draw( VIEW_ITEM* aItem, bool aImmediate ) const { int layers[VIEW_MAX_LAYERS], layers_count; - aItem->getLayers( layers, layers_count ); + aItem->ViewGetLayers( layers, layers_count ); // Sorting is needed for drawing order dependent GALs (like Cairo) SortLayers( layers, layers_count ); @@ -813,19 +813,23 @@ void VIEW::clearGroupCache() void VIEW::invalidateItem( VIEW_ITEM* aItem, int aUpdateFlags ) { - int layers[VIEW_MAX_LAYERS], layers_count; - aItem->getLayers( layers, layers_count ); - - if( aUpdateFlags & VIEW_ITEM::GEOMETRY ) + // updateLayers updates geometry too, so we do not have to update both of them at the same time + if( aUpdateFlags & VIEW_ITEM::LAYERS ) + updateLayers( aItem ); + else if( aUpdateFlags & VIEW_ITEM::GEOMETRY ) updateBbox( aItem ); + int layers[VIEW_MAX_LAYERS], layers_count; + aItem->ViewGetLayers( layers, layers_count ); + // Iterate through layers used by the item and recache it immediately for( int i = 0; i < layers_count; i++ ) { int layerId = layers[i]; - if( aUpdateFlags & VIEW_ITEM::GEOMETRY ) + if( aUpdateFlags & ( VIEW_ITEM::GEOMETRY | VIEW_ITEM::LAYERS ) ) { + // Redraw if( IsCached( layerId ) ) updateItemGeometry( aItem, layerId ); } @@ -900,6 +904,31 @@ void VIEW::updateBbox( VIEW_ITEM* aItem ) } +void VIEW::updateLayers( VIEW_ITEM* aItem ) +{ + int layers[VIEW_MAX_LAYERS], layers_count; + + // Remove the item from previous layer set + aItem->getLayers( layers, layers_count ); + for( int i = 0; i < layers_count; i++ ) + { + VIEW_LAYER& l = m_layers[layers[i]]; + l.items->Remove( aItem ); + MarkTargetDirty( l.target ); + } + + // Add the item to new layer set + aItem->ViewGetLayers( layers, layers_count ); + aItem->saveLayers( layers, layers_count ); + for( int i = 0; i < layers_count; i++ ) + { + VIEW_LAYER& l = m_layers[layers[i]]; + l.items->Insert( aItem ); + MarkTargetDirty( l.target ); + } +} + + bool VIEW::areRequiredLayersEnabled( int aLayerId ) const { wxASSERT( (unsigned) aLayerId < m_layers.size() ); diff --git a/common/view/view_item.cpp b/common/view/view_item.cpp index d7e563109b..2daf2ec837 100644 --- a/common/view/view_item.cpp +++ b/common/view/view_item.cpp @@ -73,7 +73,6 @@ void VIEW_ITEM::getLayers( int* aLayers, int& aCount ) const { if( m_layers[i] ) *layersPtr++ = i; - } aCount = m_layers.count(); diff --git a/include/view/view.h b/include/view/view.h index b287ce5199..0dd12e803a 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -569,6 +569,9 @@ private: /// Updates bounding box of an item void updateBbox( VIEW_ITEM* aItem ); + /// Updates set of layers that an item occupies + void updateLayers( VIEW_ITEM* aItem ); + /// Determines rendering order of layers. Used in display order sorting function. static bool compareRenderingOrder( VIEW_LAYER* i, VIEW_LAYER* j ) { diff --git a/include/view/view_item.h b/include/view/view_item.h index cbf8be7967..13f7ec0d6b 100644 --- a/include/view/view_item.h +++ b/include/view/view_item.h @@ -165,6 +165,7 @@ public: APPEARANCE = 0x01, /// Visibility flag has changed COLOR = 0x02, /// Color has changed GEOMETRY = 0x04, /// Position or shape has changed + LAYERS = 0x08, /// Layers have changed ALL = 0xff }; From 133e60410cac8f7dfe103bff7fe82109720082ab Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 24 Sep 2013 15:49:43 +0200 Subject: [PATCH 367/415] Added rotate & flip to the pcbnew.InteractiveMove tool, hotkeys for them and undoing all the operations on cancelling the tool. --- pcbnew/tools/move_tool.cpp | 125 +++++++++++++++++++++++-------------- pcbnew/tools/move_tool.h | 57 ++++++----------- 2 files changed, 95 insertions(+), 87 deletions(-) diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp index 7ab86b1b7a..b1fdd28c0b 100644 --- a/pcbnew/tools/move_tool.cpp +++ b/pcbnew/tools/move_tool.cpp @@ -36,7 +36,9 @@ using boost::optional; MOVE_TOOL::MOVE_TOOL() : TOOL_INTERACTIVE( "pcbnew.InteractiveMove" ), m_selectionTool( NULL ), - m_activate( m_toolName, AS_GLOBAL, 'M', "Move", "Moves the selected item(s)" ) + m_activate( m_toolName, AS_GLOBAL, 'M', "Move", "Moves the selected item(s)" ), + m_rotate( m_toolName + ".rotate", AS_CONTEXT, ' ', "Rotate", "Rotates selected item(s)" ), + m_flip( m_toolName + ".flip", AS_CONTEXT, 'F', "Flip", "Flips selected item(s)" ) { } @@ -48,8 +50,6 @@ MOVE_TOOL::~MOVE_TOOL() void MOVE_TOOL::Reset() { - m_toolMgr->RegisterAction( &m_activate ); - // Find the selection tool, so they can cooperate TOOL_BASE* selectionTool = m_toolMgr->FindTool( std::string( "pcbnew.InteractiveSelection" ) ); @@ -63,6 +63,11 @@ void MOVE_TOOL::Reset() return; } + // Activate hotkeys + m_toolMgr->RegisterAction( &m_activate ); + m_toolMgr->RegisterAction( &m_rotate ); + m_toolMgr->RegisterAction( &m_flip ); + // the tool launches upon reception of action event ("pcbnew.InteractiveMove") Go( &MOVE_TOOL::Main, m_activate.GetEvent() ); } @@ -90,17 +95,30 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) break; // Finish } - if( evt->IsMotion() || evt->IsDrag( MB_Left ) ) + // Dispatch TOOL_ACTIONs + else if( evt->Category() == TC_Command ) + { + VECTOR2D cursorPos = getView()->ToWorld( getViewControls()->GetCursorPosition() ); + + if( evt->Matches( m_rotate.GetEvent() ) ) + { + m_state.Rotate( cursorPos, 900.0 ); + m_items.ViewUpdate( VIEW_ITEM::GEOMETRY ); + } + else if( evt->Matches( m_flip.GetEvent() ) ) + { + m_state.Flip( cursorPos ); + m_items.ViewUpdate( VIEW_ITEM::GEOMETRY ); + } + } + + else if( evt->IsMotion() || evt->IsDrag( MB_Left ) ) { if( dragging ) { - // Dragging is already active + // Drag items to the current cursor position VECTOR2D movement = ( evt->Position() - dragPosition ); - std::set::iterator it, it_end; - - // so move all the selected items - for( it = m_selection.begin(), it_end = m_selection.end(); it != it_end; ++it ) - (*it)->Move( wxPoint( movement.x, movement.y ) ); + m_state.Move( movement ); } else { @@ -112,28 +130,17 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) std::set::iterator it; for( it = m_selection.begin(); it != m_selection.end(); ++it ) { + // Save the state of the selected items, in case it has to be restored + m_state.Save( *it ); + // Gather all selected items into one VIEW_GROUP viewGroupAdd( *it, &m_items ); - - // Modules are treated in a special way - when they are moved, we have to - // move all the parts that make the module, not the module itself - if( (*it)->Type() == PCB_MODULE_T ) - { - MODULE* module = static_cast( *it ); - - // Add everything that belongs to the module (besides the module itself) - for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) - viewGroupAdd( pad, &m_items ); - - for( BOARD_ITEM* drawing = module->GraphicalItems().GetFirst(); drawing; - drawing = drawing->Next() ) - viewGroupAdd( drawing, &m_items ); - - viewGroupAdd( &module->Reference(), &m_items ); - viewGroupAdd( &module->Value(), &m_items ); - } } + // Hide the original items, they are temporarily shown in VIEW_GROUP on overlay + vgSetVisibility( &m_items, false ); + vgUpdate( &m_items, VIEW_ITEM::APPEARANCE ); + dragging = true; } @@ -144,25 +151,21 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) break; // Finish } - // Clean-up after movement - std::deque::iterator it, it_end; + // Restore visibility of the original items + vgSetVisibility( &m_items, true ); + + // Movement has to be rollbacked, so restore the previous state of items if( restore ) { - // Movement has to be rollbacked, so restore the previous state of items - for( it = m_itemsState.begin(), it_end = m_itemsState.end(); it != it_end; ++it ) - it->Restore(); + vgUpdate( &m_items, VIEW_ITEM::APPEARANCE ); + m_state.RestoreAll(); } else { - // Apply changes - for( it = m_itemsState.begin(), it_end = m_itemsState.end(); it != it_end; ++it ) - { - it->RestoreVisibility(); - it->item->ViewUpdate( VIEW_ITEM::GEOMETRY ); - } + vgUpdate( &m_items, m_state.GetUpdateFlag() ); + m_state.Apply(); } - m_itemsState.clear(); m_items.Clear(); view->Remove( &m_items ); controls->ShowCursor( false ); @@ -173,17 +176,43 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) } -void MOVE_TOOL::viewGroupAdd( BOARD_ITEM* aItem, KiGfx::VIEW_GROUP* aGroup ) +void MOVE_TOOL::viewGroupAdd( BOARD_ITEM* aItem, VIEW_GROUP* aGroup ) { - // Save the state of the selected items, in case it has to be restored - ITEM_STATE state; - state.Save( aItem ); - m_itemsState.push_back( state ); + // Modules are treated in a special way - when they are moved, we have to + // move all the parts that make the module, not the module itself + if( aItem->Type() == PCB_MODULE_T ) + { + MODULE* module = static_cast( aItem ); + + // Add everything that belongs to the module (besides the module itself) + for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) + viewGroupAdd( pad, &m_items ); + + for( BOARD_ITEM* drawing = module->GraphicalItems().GetFirst(); drawing; + drawing = drawing->Next() ) + viewGroupAdd( drawing, &m_items ); + + viewGroupAdd( &module->Reference(), &m_items ); + viewGroupAdd( &module->Value(), &m_items ); + } // Add items to the VIEW_GROUP, so they will be displayed on the overlay // while dragging aGroup->Add( aItem ); - - // Set the original item as invisible - aItem->ViewSetVisible( false ); +} + + +void MOVE_TOOL::vgSetVisibility( VIEW_GROUP* aGroup, bool aVisible ) const +{ + std::set::const_iterator it, it_end; + for( it = aGroup->Begin(), it_end = aGroup->End(); it != it_end; ++it ) + (*it)->ViewSetVisible( aVisible ); +} + + +void MOVE_TOOL::vgUpdate( VIEW_GROUP* aGroup, VIEW_ITEM::ViewUpdateFlags aFlags ) const +{ + std::set::const_iterator it, it_end; + for( it = aGroup->Begin(), it_end = aGroup->End(); it != it_end; ++it ) + (*it)->ViewUpdate( aFlags ); } diff --git a/pcbnew/tools/move_tool.h b/pcbnew/tools/move_tool.h index 2a3c4f7981..400af0d077 100644 --- a/pcbnew/tools/move_tool.h +++ b/pcbnew/tools/move_tool.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2013 CERN - * @author @author Maciej Suminski + * @author Maciej Suminski * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -27,6 +27,7 @@ #include #include +#include #include class BOARD_ITEM; @@ -40,7 +41,8 @@ class VIEW_GROUP; /** * Class MOVE_TOOL * - * Our sample move tool. Allows to move items selected by pcbnew.InteractiveSelection. + * Our sample move tool. Allows to move, rotate and flip items selected by + * pcbnew.InteractiveSelection tool. */ class MOVE_TOOL : public TOOL_INTERACTIVE @@ -67,55 +69,32 @@ private: /// Adds an item to the VIEW_GROUP that holds all moved items and displays them on the overlay void viewGroupAdd( BOARD_ITEM* aItem, KiGfx::VIEW_GROUP* aGroup ); - /// Structure for (re)storing BOARD_ITEM state - typedef struct - { - BOARD_ITEM* item; /// Pointer to the item - VECTOR2D position; /// Original position of the item - bool visible; /// Original visibility flag + /// Changes visibility settings for items stored in a VIEW_GROUP + void vgSetVisibility( KiGfx::VIEW_GROUP* aGroup, bool aVisible ) const; - void Save( BOARD_ITEM* aItem ) - { - wxPoint pos = aItem->GetPosition(); + /// Updates items stored in a VIEW_GROUP with selected update flag + void vgUpdate( KiGfx::VIEW_GROUP* aGroup, KiGfx::VIEW_ITEM::ViewUpdateFlags aFlags ) const; - item = aItem; - position.x = pos.x; - position.y = pos.y; - visible = aItem->ViewIsVisible(); - } - - void RestorePosition() - { - wxPoint curPosition = item->GetPosition(); - item->Move( wxPoint( position.x - curPosition.x, position.y - curPosition.y ) ); - } - - void RestoreVisibility() - { - item->ViewSetVisible( visible ); - } - - void Restore() - { - RestorePosition(); - RestoreVisibility(); - } - } ITEM_STATE; + /// Saves the state of items and allows to restore them + ITEM_STATE m_state; /// Selection tool used for obtaining selected items SELECTION_TOOL* m_selectionTool; - /// Stores the initial state of moved items (so it is possible to rollback changes) - std::deque m_itemsState; - - /// Set of selected items (obtained from pcbnew. + /// Set of selected items (obtained from pcbnew.InteractiveSelection tool) std::set m_selection; /// VIEW_GROUP that helds currently moved items KiGfx::VIEW_GROUP m_items; - /// Register hotkey fot activation of the move tool + /// Register hotkey for activation of the move tool TOOL_ACTION m_activate; + + /// Register hotkey for rotation of selected objects + TOOL_ACTION m_rotate; + + /// Register hotkey for flipping of selected objects + TOOL_ACTION m_flip; }; #endif From 5789f20794026c338ccd41ab6ae5ebe10552ee68 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 24 Sep 2013 16:00:21 +0200 Subject: [PATCH 368/415] Added protection from redrawing while GAL backend is being switched. --- common/drawpanel_gal.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 7087d1e86d..221e158f2c 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -188,6 +188,10 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) { + // Protect from refreshing during backend switch + m_pendingRefresh = true; + m_refreshTimer.Stop(); + // Do not do anything if the currently used GAL is correct if( aGalType == m_currentGal && m_gal != NULL ) return; @@ -225,6 +229,7 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) } m_currentGal = aGalType; + m_pendingRefresh = false; } From 8ea74c38c3d5385873d868d6915133809218e9e4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 24 Sep 2013 16:12:02 +0200 Subject: [PATCH 369/415] Fixed cvpcb build. --- common/drawpanel_gal.cpp | 5 ++--- common/tool/tool_dispatcher.cpp | 11 +++-------- common/view/wx_view_controls.cpp | 4 +++- include/tool/tool_dispatcher.h | 5 +---- include/view/wx_view_controls.h | 3 +++ 5 files changed, 12 insertions(+), 16 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index 221e158f2c..fd907a1ca6 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -47,7 +47,6 @@ #define METRIC_UNIT_LENGTH (1e9) - EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWindowId, const wxPoint& aPosition, const wxSize& aSize, GalType aGalType ) : @@ -91,8 +90,8 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin Connect( wxEVT_KEY_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_KEY_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_ENTER_WINDOW, wxEventHandler( EDA_DRAW_PANEL_GAL::onEnter ), NULL, this ); - Connect( TOOL_DISPATCHER::EVT_REFRESH_MOUSE, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), - NULL, this ); + Connect( KiGfx::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE, + wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); m_refreshTimer.SetOwner( this ); Connect( wxEVT_TIMER, wxTimerEventHandler( EDA_DRAW_PANEL_GAL::onRefreshTimer ), NULL, this ); diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index ad3a38c857..638f9d0dd5 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -22,16 +22,13 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include - #include #include #include #include #include -#include +#include #include @@ -42,8 +39,6 @@ using boost::optional; -const wxEventType TOOL_DISPATCHER::EVT_REFRESH_MOUSE = wxNewEventType(); - struct TOOL_DISPATCHER::ButtonState { ButtonState( TOOL_MouseButtons aButton, const wxEventType& aDownEvent, @@ -209,11 +204,11 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) type == wxEVT_LEFT_DOWN || type == wxEVT_LEFT_UP || type == wxEVT_MIDDLE_DOWN || type == wxEVT_MIDDLE_UP || type == wxEVT_RIGHT_DOWN || type == wxEVT_RIGHT_UP || - type == EVT_REFRESH_MOUSE ) + type == KiGfx::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE ) { VECTOR2D screenPos = m_toolMgr->GetViewControls()->GetCursorPosition(); VECTOR2D pos = getView()->ToWorld( screenPos ); - if( pos != m_lastMousePos || type == EVT_REFRESH_MOUSE ) + if( pos != m_lastMousePos || type == KiGfx::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE ) { motion = true; m_lastMousePos = pos; diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 4aa69d2d61..ed6602fb81 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -32,6 +32,8 @@ using namespace KiGfx; +const wxEventType WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE = wxNewEventType(); + WX_VIEW_CONTROLS::WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ) : VIEW_CONTROLS( aView ), m_state( IDLE ), @@ -207,7 +209,7 @@ void WX_VIEW_CONTROLS::onTimer( wxTimerEvent& aEvent ) m_view->SetCenter( m_view->GetCenter() + dir * m_autoPanSpeed ); // Notify tools that the cursor position has changed in the world coordinates - wxCommandEvent moveEvent( TOOL_DISPATCHER::EVT_REFRESH_MOUSE ); + wxCommandEvent moveEvent( EVT_REFRESH_MOUSE ); wxPostEvent( m_parentPanel, moveEvent ); } break; diff --git a/include/tool/tool_dispatcher.h b/include/tool/tool_dispatcher.h index cb3273f744..a95464f38e 100644 --- a/include/tool/tool_dispatcher.h +++ b/include/tool/tool_dispatcher.h @@ -29,7 +29,7 @@ #include -#include +//#include #include class TOOL_MANAGER; @@ -65,9 +65,6 @@ public: virtual void DispatchWxEvent( wxEvent& aEvent ); virtual void DispatchWxCommand( wxCommandEvent& aEvent ); - /// Event that forces mouse move event in the dispatcher - static const wxEventType EVT_REFRESH_MOUSE; - private: static const int MouseButtonCount = 3; static const int DragTimeThreshold = 300; diff --git a/include/view/wx_view_controls.h b/include/view/wx_view_controls.h index 8562afbb82..fd80e90d76 100644 --- a/include/view/wx_view_controls.h +++ b/include/view/wx_view_controls.h @@ -84,6 +84,9 @@ public: /// @copydoc VIEW_CONTROLS::GetCursorPosition() virtual const VECTOR2D GetCursorPosition() const; + /// Event that forces mouse move event in the dispatcher + static const wxEventType EVT_REFRESH_MOUSE; + private: /// Possible states for WX_VIEW_CONTROLS enum State { From b1c0d614a30e78090d17c3394a9d901043bbe136 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 26 Sep 2013 11:22:59 +0200 Subject: [PATCH 370/415] Added some const modifiers. --- common/tool/tool_base.cpp | 8 ++++---- include/tool/tool_base.h | 16 ++++++++-------- include/tool/tool_manager.h | 8 ++++---- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/common/tool/tool_base.cpp b/common/tool/tool_base.cpp index 15409d1a8c..066d85dd33 100644 --- a/common/tool/tool_base.cpp +++ b/common/tool/tool_base.cpp @@ -25,25 +25,25 @@ #include #include -KiGfx::VIEW* TOOL_BASE::getView() +KiGfx::VIEW* TOOL_BASE::getView() const { return m_toolMgr->GetView(); } -KiGfx::VIEW_CONTROLS* TOOL_BASE::getViewControls() +KiGfx::VIEW_CONTROLS* TOOL_BASE::getViewControls() const { return m_toolMgr->GetViewControls(); } -wxWindow* TOOL_BASE::getEditFrameInt() +wxWindow* TOOL_BASE::getEditFrameInt() const { return m_toolMgr->GetEditFrame(); } -EDA_ITEM* TOOL_BASE::getModelInt() +EDA_ITEM* TOOL_BASE::getModelInt() const { return m_toolMgr->GetModel(); } diff --git a/include/tool/tool_base.h b/include/tool/tool_base.h index 0925e4edb1..1b9da87305 100644 --- a/include/tool/tool_base.h +++ b/include/tool/tool_base.h @@ -80,7 +80,7 @@ public: return m_toolName; } - TOOL_MANAGER* GetManager() + TOOL_MANAGER* GetManager() const { return m_toolMgr; } @@ -96,8 +96,8 @@ protected: */ void attachManager( TOOL_MANAGER* aManager ); - KiGfx::VIEW* getView(); - KiGfx::VIEW_CONTROLS* getViewControls(); + KiGfx::VIEW* getView() const; + KiGfx::VIEW_CONTROLS* getViewControls() const; /** * Function getEditFrame() @@ -106,7 +106,7 @@ protected: * run-time type check */ template - T* getEditFrame() + T* getEditFrame() const { return static_cast( getEditFrameInt() ); } @@ -117,10 +117,10 @@ protected: * Returns the model object if it matches the requested type. */ template - T* getModel( KICAD_T modelType ) + T* getModel( KICAD_T modelType ) const { EDA_ITEM* m = getModelInt(); -// assert(modelType == m->Type()); + return static_cast( m ); } @@ -132,8 +132,8 @@ protected: private: // hide the implementation to avoid spreading half of // kicad and wxWidgets headers to the tools that may not need them at all! - EDA_ITEM* getModelInt(); - wxWindow* getEditFrameInt(); + EDA_ITEM* getModelInt() const; + wxWindow* getEditFrameInt() const; }; #endif diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index c2a8310f5c..eac8371268 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -144,22 +144,22 @@ public: KiGfx::VIEW_CONTROLS* aViewControls, wxWindow* aFrame ); /* Accessors for the environment objects (view, model, etc.) */ - KiGfx::VIEW* GetView() + KiGfx::VIEW* GetView() const { return m_view; } - KiGfx::VIEW_CONTROLS* GetViewControls() + KiGfx::VIEW_CONTROLS* GetViewControls() const { return m_viewControls; } - EDA_ITEM* GetModel() + EDA_ITEM* GetModel() const { return m_model; } - wxWindow* GetEditFrame() + wxWindow* GetEditFrame() const { return m_editFrame; } From 50980882376924554a3a2f58a1a6a9edde863633 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 26 Sep 2013 14:09:18 +0200 Subject: [PATCH 371/415] Added functions for handling hotkeys, interface for adding TOOL_ACTIONs to CONTEXT_MENU. Less objects are allocated dynamically. CONTEXT_MENU is being run using its copy (it saves a hassle of following the lifetime of object). --- common/tool/context_menu.cpp | 134 +++++++++++++++++++++-------------- common/tool/tool_manager.cpp | 10 +-- include/tool/context_menu.h | 38 +++++++--- include/tool/tool_action.h | 49 ++++++++++--- 4 files changed, 155 insertions(+), 76 deletions(-) diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index 951351017a..281a083df0 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -22,62 +22,45 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#include -#include - #include #include #include - #include +#include -class CONTEXT_MENU::CMEventHandler : public wxEvtHandler +CONTEXT_MENU::CONTEXT_MENU() : + m_titleSet( false ), m_handler( this ), m_tool( NULL ) { -public: - CMEventHandler( CONTEXT_MENU* aMenu ): - m_menu( aMenu ) {}; - - void onEvent( wxEvent& aEvent ) - { - TOOL_EVENT evt; - wxEventType type = aEvent.GetEventType(); - - if( type == wxEVT_MENU_HIGHLIGHT ) - evt = TOOL_EVENT( TC_Command, TA_ContextMenuUpdate, aEvent.GetId() ); - else if( type == wxEVT_COMMAND_MENU_SELECTED ) - evt = TOOL_EVENT( TC_Command, TA_ContextMenuChoice, aEvent.GetId() ); - - if( m_menu->m_tool ) - m_menu->m_tool->GetManager()->ProcessEvent( evt ); - } - -private: - CONTEXT_MENU* m_menu; -}; - - -CONTEXT_MENU::CONTEXT_MENU() -{ - m_tool = NULL; - m_menu = new wxMenu(); - m_handler = new CMEventHandler( this ); - m_menu->Connect( wxEVT_MENU_HIGHLIGHT, wxEventHandler( CMEventHandler::onEvent ), - NULL, m_handler ); - m_menu->Connect( wxEVT_COMMAND_MENU_SELECTED, wxEventHandler( CMEventHandler::onEvent ), - NULL, m_handler ); + m_menu.Connect( wxEVT_MENU_HIGHLIGHT, wxEventHandler( CMEventHandler::onEvent ), + NULL, &m_handler ); + m_menu.Connect( wxEVT_COMMAND_MENU_SELECTED, wxEventHandler( CMEventHandler::onEvent ), + NULL, &m_handler ); // Workaround for the case when mouse cursor never reaches menu (it hangs up tools using menu) - wxMenuEvent menuEvent( wxEVT_MENU_HIGHLIGHT, 0, m_menu ); - m_menu->AddPendingEvent( menuEvent ); - - m_titleSet = false; + wxMenuEvent menuEvent( wxEVT_MENU_HIGHLIGHT, 0, &m_menu ); + m_menu.AddPendingEvent( menuEvent ); } -CONTEXT_MENU::~CONTEXT_MENU() +CONTEXT_MENU::CONTEXT_MENU( const CONTEXT_MENU& aMenu ) : + m_titleSet( aMenu.m_titleSet ), m_handler( this ), m_tool( aMenu.m_tool ) { - delete m_menu; - delete m_handler; + m_menu.Connect( wxEVT_MENU_HIGHLIGHT, wxEventHandler( CMEventHandler::onEvent ), + NULL, &m_handler ); + m_menu.Connect( wxEVT_COMMAND_MENU_SELECTED, wxEventHandler( CMEventHandler::onEvent ), + NULL, &m_handler ); + + // Workaround for the case when mouse cursor never reaches menu (it hangs up tools using menu) + wxMenuEvent menuEvent( wxEVT_MENU_HIGHLIGHT, 0, &m_menu ); + m_menu.AddPendingEvent( menuEvent ); + + // Copy all the menu entries + for( unsigned i = 0; i < aMenu.m_menu.GetMenuItemCount(); ++i ) + { + wxMenuItem* item = aMenu.m_menu.FindItemByPosition( i ); + m_menu.Append( new wxMenuItem( &m_menu, item->GetId(), item->GetItemLabel(), + wxEmptyString, wxITEM_NORMAL ) ); + } } @@ -86,23 +69,70 @@ void CONTEXT_MENU::SetTitle( const wxString& aTitle ) // Unfortunately wxMenu::SetTitle() does nothing.. if( m_titleSet ) { - m_menu->Delete( m_menu->FindItemByPosition( 0 ) ); // fixme: this is LAME! - m_menu->Delete( m_menu->FindItemByPosition( 0 ) ); + m_menu.FindItemByPosition( 0 )->SetItemLabel( aTitle ); + } + else + { + m_menu.InsertSeparator( 0 ); + m_menu.Insert( 0, new wxMenuItem( &m_menu, -1, aTitle, wxEmptyString, wxITEM_NORMAL ) ); + m_titleSet = true; } - - m_menu->InsertSeparator( 0 ); - m_menu->Insert( 0, new wxMenuItem( m_menu, -1, aTitle, wxEmptyString, wxITEM_NORMAL ) ); - m_titleSet = true; } -void CONTEXT_MENU::Add( const wxString& aItem, int aId ) +void CONTEXT_MENU::Add( const wxString& aLabel, int aId ) { - m_menu->Append( new wxMenuItem( m_menu, aId, aItem, wxEmptyString, wxITEM_NORMAL ) ); + m_menu.Append( new wxMenuItem( &m_menu, aId, aLabel, wxEmptyString, wxITEM_NORMAL ) ); +} + + +void CONTEXT_MENU::Add( const TOOL_ACTION& aAction, int aId ) +{ + m_menu.Append( new wxMenuItem( &m_menu, aId, + wxString( aAction.GetDescription() + '\t' + getHotKeyDescription( aAction ) ), + wxEmptyString, wxITEM_NORMAL ) ); } void CONTEXT_MENU::Clear() { m_titleSet = false; + + for( unsigned i = 0; i < m_menu.GetMenuItemCount(); ++i ) + m_menu.Destroy( m_menu.FindItemByPosition( 0 ) ); +} + + +std::string CONTEXT_MENU::getHotKeyDescription( const TOOL_ACTION& aAction ) const +{ + int hotkey = aAction.GetHotKey(); + + std::string description = ""; + + if( hotkey & MD_ModAlt ) + description += "ALT+"; + if( hotkey & MD_ModCtrl ) + description += "CTRL+"; + if( hotkey & MD_ModShift ) + description += "SHIFT+"; + + // TODO dispatch keys such as Fx, TAB, PG_UP/DN, HOME, END, etc. + description += char( hotkey & ~MD_ModifierMask ); + + return description; +} + + +void CONTEXT_MENU::CMEventHandler::onEvent( wxEvent& aEvent ) +{ + TOOL_EVENT evt; + wxEventType type = aEvent.GetEventType(); + + if( type == wxEVT_MENU_HIGHLIGHT ) + evt = TOOL_EVENT( TC_Command, TA_ContextMenuUpdate, aEvent.GetId() ); + else if( type == wxEVT_COMMAND_MENU_SELECTED ) + evt = TOOL_EVENT( TC_Command, TA_ContextMenuChoice, aEvent.GetId() ); + + if( m_menu->m_tool ) + m_menu->m_tool->GetManager()->ProcessEvent( evt ); } diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index e5dee7dea2..20333af66d 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -380,14 +381,15 @@ bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) { if( st->contextMenuTrigger == CMENU_BUTTON && !aEvent.IsClick( MB_Right ) ) break; - + st->pendingWait = true; st->waitEvents = TOOL_EVENT( TC_Any, TA_Any ); - + if( st->contextMenuTrigger == CMENU_NOW ) st->contextMenuTrigger = CMENU_OFF; - - GetEditFrame()->PopupMenu( st->contextMenu->GetMenu() ); + + boost::scoped_ptr menu( new CONTEXT_MENU( *st->contextMenu ) ); + GetEditFrame()->PopupMenu( menu->GetMenu() ); TOOL_EVENT evt( TC_Command, TA_ContextMenuChoice ); dispatchInternal( evt ); diff --git a/include/tool/context_menu.h b/include/tool/context_menu.h index b62a55a041..cb518feb69 100644 --- a/include/tool/context_menu.h +++ b/include/tool/context_menu.h @@ -25,7 +25,8 @@ #ifndef __CONTEXT_MENU_H #define __CONTEXT_MENU_H -#include +#include +#include class wxMenu; class TOOL_INTERACTIVE; @@ -41,23 +42,29 @@ class CONTEXT_MENU public: CONTEXT_MENU(); - ~CONTEXT_MENU(); + CONTEXT_MENU( const CONTEXT_MENU& aMenu ); void SetTitle( const wxString& aTitle ); - void Add( const wxString& aItem, int aId ); - - // fixme: unimplemented - // void Add ( const TOOL_ACTION& aAction, int aId = -1 ); - + void Add( const wxString& aLabel, int aId ); + void Add( const TOOL_ACTION& aAction, int aId = -1 ); void Clear(); wxMenu* GetMenu() const { - return m_menu; + return const_cast( &m_menu ); } private: - class CMEventHandler; + class CMEventHandler : public wxEvtHandler + { + public: + CMEventHandler( CONTEXT_MENU* aMenu ) : m_menu( aMenu ) {}; + + void onEvent( wxEvent& aEvent ); + + private: + CONTEXT_MENU* m_menu; + }; friend class TOOL_INTERACTIVE; @@ -66,10 +73,19 @@ private: m_tool = aTool; } + /** + * Returns a hot key in the string format accepted by wxMenu. + * + * @param aAction is the action with hot key to be converted. + * @return Hot key in the string format compatible with wxMenu. + */ + std::string getHotKeyDescription( const TOOL_ACTION& aAction ) const; + + /// Flag indicating that the menu title was set up bool m_titleSet; - wxMenu* m_menu; - CMEventHandler* m_handler; + wxMenu m_menu; + CMEventHandler m_handler; TOOL_INTERACTIVE* m_tool; }; diff --git a/include/tool/tool_action.h b/include/tool/tool_action.h index 61ef7ad886..cc1559983d 100644 --- a/include/tool/tool_action.h +++ b/include/tool/tool_action.h @@ -26,7 +26,7 @@ #define __TOOL_ACTION_H #include -#include +#include #include #include @@ -38,8 +38,9 @@ class TOOL_ACTION { public: - TOOL_ACTION( const std::string& aName, TOOL_ActionScope aScope = AS_CONTEXT, int aDefaultHotKey = 0, - const wxString& aMenuItem = wxT( "" ), const wxString& aMenuDesc = wxT( "" ) ) : + TOOL_ACTION( const std::string& aName, TOOL_ActionScope aScope = AS_CONTEXT, + int aDefaultHotKey = 0, const std::string& aMenuItem = std::string( "" ), + const std::string& aMenuDesc = std::string( "" ) ) : m_name( aName ), m_scope( aScope ), m_defaultHotKey( aDefaultHotKey ), m_currentHotKey( aDefaultHotKey ), m_menuItem( aMenuItem ), m_menuDescription( aMenuDesc ), m_id( -1 ), m_actionMgr( NULL ) @@ -86,6 +87,15 @@ public: return m_id; } + /** + * Function GetHotKey() + * Returns the associated hot key. + */ + int GetHotKey() const + { + return m_currentHotKey; + } + /** * Function ChangeHotKey() * Assigns a new hot key. @@ -94,8 +104,8 @@ public: */ void ChangeHotKey( int aNewHotKey ) { - wxASSERT_MSG( false, wxT( "It is not fully implemented yet") ); - // I mean it has to be changed in the ACTION_MANAGER, or change the implementation + assert( false ); + // hotkey has to be changed in the ACTION_MANAGER, or change the implementation m_currentHotKey = aNewHotKey; } @@ -105,8 +115,8 @@ public: */ void RestoreHotKey() { - wxASSERT_MSG( false, wxT( "It is not fully implemented yet") ); - // I mean it has to be changed in the ACTION_MANAGER, or change the implementation + assert( false ); + // hotkey has to be changed in the ACTION_MANAGER, or change the implementation m_currentHotKey = m_defaultHotKey; } @@ -134,6 +144,26 @@ public: return TOOL_EVENT( TC_Command, TA_Action, m_name, m_scope ); } + const std::string& GetMenuItem() const + { + return m_menuItem; + } + + void SetMenuItem( const std::string& aItem ) + { + m_menuItem = aItem; + } + + const std::string& GetDescription() const + { + return m_menuDescription; + } + + void SetDescription( const std::string& aDescription ) + { + m_menuDescription = aDescription; + } + private: friend class ACTION_MANAGER; @@ -162,10 +192,10 @@ private: int m_currentHotKey; /// Menu entry text - wxString m_menuItem; + std::string m_menuItem; /// Pop-up help - wxString m_menuDescription; + std::string m_menuDescription; // Icon for menu entry //KiBitmap m_bitmap; @@ -182,4 +212,5 @@ private: /// Originating UI object // wxWindow* m_uiOrigin; }; + #endif From e47790c3f87b3d38cf8282a4940c6e53fd8b4c3b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 26 Sep 2013 14:09:56 +0200 Subject: [PATCH 372/415] Different way of handling CONTEXT_MENU in the selection tool. Removed some unnecessary lines. --- pcbnew/tools/selection_tool.cpp | 23 ++++++++++------------- pcbnew/tools/selection_tool.h | 6 +----- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index fd970863f9..c3c1467f74 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -312,21 +312,19 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) { BOARD_ITEM* current = NULL; boost::shared_ptr brightBox; - - m_menu.reset( new CONTEXT_MENU() ); - m_menu->SetTitle( _( "Clarify selection" ) ); + CONTEXT_MENU m_menu; int limit = std::min( 10, aCollector->GetCount() ); - for( int i = 0; i < limit; ++i ) { wxString text; BOARD_ITEM* item = ( *aCollector )[i]; text = item->GetSelectMenuText(); - m_menu->Add( text, i ); + m_menu.Add( text, i ); } - SetContextMenu( m_menu.get(), CMENU_NOW ); + m_menu.SetTitle( _( "Clarify selection" ) ); + SetContextMenu( &m_menu, CMENU_NOW ); while( OPT_TOOL_EVENT evt = Wait() ) { @@ -350,14 +348,8 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) { optional id = evt->GetCommandId(); - if( current ) - current->ClearSelected(); - if( id && ( *id >= 0 ) ) - { current = ( *aCollector )[*id]; - current->SetSelected(); - } break; } @@ -371,11 +363,12 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) } getView()->MarkTargetDirty( TARGET_OVERLAY ); + return current; } -bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) +bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const { bool highContrast = getView()->GetPainter()->GetSettings()->GetHighContrast(); @@ -443,8 +436,12 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) // These are not selectable, otherwise silkscreen drawings would be easily destroyed return false; break; + + default: // Suppress warnings + break; } + // All other items are selected only if the layer on which they exist is visible return board->IsLayerVisible( aItem->GetLayer() ); } diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 622a9bcfa6..6540a57c99 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -27,7 +27,6 @@ #define __SELECTION_TOOL_H #include -#include #include #include @@ -134,7 +133,7 @@ private: * * @return True if the item fulfills conditions to be selected. */ - bool selectable( const BOARD_ITEM* aItem ); + bool selectable( const BOARD_ITEM* aItem ) const; /** * Function containsSelected() @@ -150,9 +149,6 @@ private: /// Visual representation of selection box SELECTION_AREA* m_selArea; - /// Menu shown in case of selection ambiguity - boost::shared_ptr m_menu; - /// Flag saying if items should be added to the current selection or rather replace it bool m_additive; From b4585ce13ac39cdc9b84d48e77c32a773e20f311 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 26 Sep 2013 14:29:47 +0200 Subject: [PATCH 373/415] Fixed premature highlighting of options in CONTEXT_MENU. --- common/tool/context_menu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index 281a083df0..1751bde93b 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -37,7 +37,7 @@ CONTEXT_MENU::CONTEXT_MENU() : NULL, &m_handler ); // Workaround for the case when mouse cursor never reaches menu (it hangs up tools using menu) - wxMenuEvent menuEvent( wxEVT_MENU_HIGHLIGHT, 0, &m_menu ); + wxMenuEvent menuEvent( wxEVT_MENU_HIGHLIGHT, -1, &m_menu ); m_menu.AddPendingEvent( menuEvent ); } @@ -51,7 +51,7 @@ CONTEXT_MENU::CONTEXT_MENU( const CONTEXT_MENU& aMenu ) : NULL, &m_handler ); // Workaround for the case when mouse cursor never reaches menu (it hangs up tools using menu) - wxMenuEvent menuEvent( wxEVT_MENU_HIGHLIGHT, 0, &m_menu ); + wxMenuEvent menuEvent( wxEVT_MENU_HIGHLIGHT, -1, &m_menu ); m_menu.AddPendingEvent( menuEvent ); // Copy all the menu entries From 9bef4cb7974a3fe19409b95065cb66120acd3111 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 26 Sep 2013 18:38:58 +0200 Subject: [PATCH 374/415] Added Init() to TOOL_INTERACTIVE, allowing to set up things that are needed to be initialized only once. TOOL_ACTIONs can be run from CONTEXT_MENU after adding them. Move tool actions are available to be run from CONTEXT_MENU displayed after right mouse button click on selected items. Added some asserts to check the code. --- common/tool/action_manager.cpp | 11 +++---- common/tool/context_menu.cpp | 34 +++++++++++++++++---- common/tool/tool_manager.cpp | 16 +++++++++- include/tool/action_manager.h | 1 - include/tool/context_menu.h | 9 +++++- include/tool/tool_interactive.h | 11 +++++++ pcbnew/tools/move_tool.cpp | 29 ++++++++++++------ pcbnew/tools/move_tool.h | 9 +++--- pcbnew/tools/pcb_tools.cpp | 2 +- pcbnew/tools/selection_tool.cpp | 50 ++++++++++++++++++++++--------- pcbnew/tools/selection_tool.h | 52 +++++++++++++++++++++++++++++---- 11 files changed, 175 insertions(+), 49 deletions(-) diff --git a/common/tool/action_manager.cpp b/common/tool/action_manager.cpp index 2cd67b8464..0c56199711 100644 --- a/common/tool/action_manager.cpp +++ b/common/tool/action_manager.cpp @@ -26,6 +26,7 @@ #include #include #include +#include ACTION_MANAGER::ACTION_MANAGER( TOOL_MANAGER* aToolManager ) : m_toolMgr( aToolManager ) @@ -33,15 +34,11 @@ ACTION_MANAGER::ACTION_MANAGER( TOOL_MANAGER* aToolManager ) : } -ACTION_MANAGER::~ACTION_MANAGER() -{ -} - - void ACTION_MANAGER::RegisterAction( TOOL_ACTION* aAction ) { - int aId = MakeActionId( aAction->m_name ); - aAction->setId( aId ); + assert( aAction->GetId() == -1 ); // Check if the TOOL_ACTION was not registered before + + aAction->setId( MakeActionId( aAction->m_name ) ); m_actionNameIndex[aAction->m_name] = aAction; m_actionIdIndex[aAction->m_id] = aAction; diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index 1751bde93b..25ef5b0a0f 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -61,6 +61,9 @@ CONTEXT_MENU::CONTEXT_MENU( const CONTEXT_MENU& aMenu ) : m_menu.Append( new wxMenuItem( &m_menu, item->GetId(), item->GetItemLabel(), wxEmptyString, wxITEM_NORMAL ) ); } + + // Copy tool actions that are available to choose from menu + m_toolActions = aMenu.m_toolActions; } @@ -86,11 +89,20 @@ void CONTEXT_MENU::Add( const wxString& aLabel, int aId ) } -void CONTEXT_MENU::Add( const TOOL_ACTION& aAction, int aId ) +void CONTEXT_MENU::Add( const TOOL_ACTION& aAction ) { - m_menu.Append( new wxMenuItem( &m_menu, aId, - wxString( aAction.GetDescription() + '\t' + getHotKeyDescription( aAction ) ), - wxEmptyString, wxITEM_NORMAL ) ); + int id = m_actionId + aAction.GetId(); + wxString menuEntry; + + if( aAction.HasHotKey() ) + menuEntry = wxString( aAction.GetMenuItem() + '\t' + getHotKeyDescription( aAction ) ); + else + menuEntry = wxString( aAction.GetMenuItem() ); + + m_menu.Append( new wxMenuItem( &m_menu, id, menuEntry, + wxString( aAction.GetDescription() ), wxITEM_NORMAL ) ); + + m_toolActions[id] = &aAction; } @@ -100,6 +112,8 @@ void CONTEXT_MENU::Clear() for( unsigned i = 0; i < m_menu.GetMenuItemCount(); ++i ) m_menu.Destroy( m_menu.FindItemByPosition( 0 ) ); + + m_toolActions.clear(); } @@ -131,7 +145,17 @@ void CONTEXT_MENU::CMEventHandler::onEvent( wxEvent& aEvent ) if( type == wxEVT_MENU_HIGHLIGHT ) evt = TOOL_EVENT( TC_Command, TA_ContextMenuUpdate, aEvent.GetId() ); else if( type == wxEVT_COMMAND_MENU_SELECTED ) - evt = TOOL_EVENT( TC_Command, TA_ContextMenuChoice, aEvent.GetId() ); + { + if( aEvent.GetId() > m_actionId ) + { + if( m_menu->m_toolActions.count( aEvent.GetId() ) == 1 ) + evt = m_menu->m_toolActions[aEvent.GetId()]->GetEvent(); + } + else + { + evt = TOOL_EVENT( TC_Command, TA_ContextMenuChoice, aEvent.GetId() ); + } + } if( m_menu->m_tool ) m_menu->m_tool->GetManager()->ProcessEvent( evt ); diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 20333af66d..e261e37c2c 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -129,7 +129,21 @@ void TOOL_MANAGER::RegisterTool( TOOL_BASE* aTool ) aTool->m_toolMgr = this; if( aTool->GetType() == TOOL_Interactive ) - static_cast( aTool )->Reset(); + { + bool initState = static_cast( aTool )->Init(); + if( !initState ) + { + wxLogError( wxT( "Initialization of the %s tool failed" ), aTool->GetName() ); + + // Unregister the tool + m_toolState.erase( aTool ); + m_toolNameIndex.erase( aTool->GetName() ); + m_toolIdIndex.erase( aTool->GetId() ); + + delete st; + delete aTool; + } + } } diff --git a/include/tool/action_manager.h b/include/tool/action_manager.h index c21d8f33ae..78943a92fa 100644 --- a/include/tool/action_manager.h +++ b/include/tool/action_manager.h @@ -40,7 +40,6 @@ public: * @param aToolManager is a tool manager instance that is used to pass events to tools. */ ACTION_MANAGER( TOOL_MANAGER* aToolManager ); - ~ACTION_MANAGER(); /** * Function RegisterAction() diff --git a/include/tool/context_menu.h b/include/tool/context_menu.h index cb518feb69..cf4d752405 100644 --- a/include/tool/context_menu.h +++ b/include/tool/context_menu.h @@ -27,6 +27,7 @@ #include #include +#include class wxMenu; class TOOL_INTERACTIVE; @@ -46,7 +47,7 @@ public: void SetTitle( const wxString& aTitle ); void Add( const wxString& aLabel, int aId ); - void Add( const TOOL_ACTION& aAction, int aId = -1 ); + void Add( const TOOL_ACTION& aAction ); void Clear(); wxMenu* GetMenu() const @@ -87,6 +88,12 @@ private: wxMenu m_menu; CMEventHandler m_handler; TOOL_INTERACTIVE* m_tool; + + /// Menu items with ID higher than that are considered TOOL_ACTIONs + static const int m_actionId = 10000; + + /// Stores tool actions that are choosable from the menu. Does not take the ownership. + std::map m_toolActions; }; #endif diff --git a/include/tool/tool_interactive.h b/include/tool/tool_interactive.h index 0a2be56f10..14fd2dccbb 100644 --- a/include/tool/tool_interactive.h +++ b/include/tool/tool_interactive.h @@ -51,6 +51,17 @@ public: */ virtual void Reset() = 0; + /** + * Function Init() + * Init() is called once upon a registration of the tool. + * + * @return True if the initialization went fine, false - otherwise. + */ + virtual bool Init() + { + return true; + } + /** * Function SetContextMenu() * diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp index b1fdd28c0b..96e348a941 100644 --- a/pcbnew/tools/move_tool.cpp +++ b/pcbnew/tools/move_tool.cpp @@ -49,27 +49,38 @@ MOVE_TOOL::~MOVE_TOOL() void MOVE_TOOL::Reset() +{ + // The tool launches upon reception of action event ("pcbnew.InteractiveMove") + Go( &MOVE_TOOL::Main, m_activate.GetEvent() ); +} + + +bool MOVE_TOOL::Init() { // Find the selection tool, so they can cooperate - TOOL_BASE* selectionTool = m_toolMgr->FindTool( std::string( "pcbnew.InteractiveSelection" ) ); + TOOL_BASE* selectionTool = m_toolMgr->FindTool( "pcbnew.InteractiveSelection" ); if( selectionTool ) { m_selectionTool = static_cast( selectionTool ); + + // Activate hot keys + m_toolMgr->RegisterAction( &m_activate ); + m_toolMgr->RegisterAction( &m_rotate ); + m_toolMgr->RegisterAction( &m_flip ); + + // Add context menu entries for the selection tool + m_selectionTool->AddMenuItem( m_activate ); + m_selectionTool->AddMenuItem( m_rotate ); + m_selectionTool->AddMenuItem( m_flip ); } else { wxLogError( "pcbnew.InteractiveSelection tool is not available" ); - return; + return false; } - // Activate hotkeys - m_toolMgr->RegisterAction( &m_activate ); - m_toolMgr->RegisterAction( &m_rotate ); - m_toolMgr->RegisterAction( &m_flip ); - - // the tool launches upon reception of action event ("pcbnew.InteractiveMove") - Go( &MOVE_TOOL::Main, m_activate.GetEvent() ); + return true; } diff --git a/pcbnew/tools/move_tool.h b/pcbnew/tools/move_tool.h index 400af0d077..fdb0e2e450 100644 --- a/pcbnew/tools/move_tool.h +++ b/pcbnew/tools/move_tool.h @@ -51,13 +51,12 @@ public: MOVE_TOOL(); ~MOVE_TOOL(); - /** - * Function Reset() - * - * Resets the tool and initializes it. - */ + /// @copydoc TOOL_INTERACTIVE::Reset() void Reset(); + /// @copydoc TOOL_INTERACTIVE::Init() + bool Init(); + /** * Function Main() * diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 9d2457c5ec..0cece9dffd 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -45,7 +45,7 @@ void PCB_EDIT_FRAME::setupTools() m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager, this ); m_galCanvas->SetEventDispatcher( m_toolDispatcher ); - // Register tools. + // Register tools m_toolManager->RegisterTool( new SELECTION_TOOL ); m_toolManager->RegisterTool( new ROUTER_TOOL ); m_toolManager->RegisterTool( new MOVE_TOOL ); diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index c3c1467f74..72cc54a1be 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -37,7 +38,6 @@ #include #include -#include #include #include @@ -65,7 +65,6 @@ SELECTION_TOOL::~SELECTION_TOOL() void SELECTION_TOOL::Reset() { - m_toolMgr->RegisterAction( &m_activate ); m_selectedItems.clear(); // The tool launches upon reception of action event ("pcbnew.InteractiveSelection") @@ -73,11 +72,19 @@ void SELECTION_TOOL::Reset() } +bool SELECTION_TOOL::Init() +{ + m_toolMgr->RegisterAction( &m_activate ); + + return true; +} + + int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) { BOARD* board = getModel( PCB_T ); - wxASSERT( board != NULL ); + assert( board != NULL ); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) @@ -91,7 +98,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) if( !m_selectedItems.empty() ) // Cancel event deselects items... clearSelection(); else // ...unless there is nothing selected - break; + break; // then exit the tool } // single click? Select single object @@ -126,12 +133,19 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) } +void SELECTION_TOOL::AddMenuItem( const TOOL_ACTION& aAction ) +{ + assert( aAction.GetId() > 0 ); // Check if the action was registered before + + m_menu.Add( aAction ); +} + + void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) { if( m_selectedItems.find( aItem ) != m_selectedItems.end() ) { - aItem->ClearSelected(); - m_selectedItems.erase( aItem ); + deselectItem( aItem ); } else { @@ -140,10 +154,7 @@ void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) // Prevent selection of invisible or inactive items if( selectable( aItem ) ) - { - aItem->SetSelected(); - m_selectedItems.insert( aItem ); - } + selectItem( aItem ); } } @@ -156,6 +167,9 @@ void SELECTION_TOOL::clearSelection() } m_selectedItems.clear(); + + // Do not show the context menu when there is nothing selected + SetContextMenu( &m_menu, CMENU_OFF ); } @@ -198,6 +212,7 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) else if( collector.GetCount() > 1 ) { item = disambiguationMenu( &collector ); + if( item ) toggleSelection( item ); } @@ -296,6 +311,10 @@ bool SELECTION_TOOL::selectMultiple() m_selectedItems.insert( item ); } } + + // Now the context menu should be enabled + if( !m_selectedItems.empty() ) + SetContextMenu( &m_menu, CMENU_BUTTON ); break; } } @@ -312,7 +331,7 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) { BOARD_ITEM* current = NULL; boost::shared_ptr brightBox; - CONTEXT_MENU m_menu; + CONTEXT_MENU menu; int limit = std::min( 10, aCollector->GetCount() ); for( int i = 0; i < limit; ++i ) @@ -320,11 +339,11 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) wxString text; BOARD_ITEM* item = ( *aCollector )[i]; text = item->GetSelectMenuText(); - m_menu.Add( text, i ); + menu.Add( text, i ); } - m_menu.SetTitle( _( "Clarify selection" ) ); - SetContextMenu( &m_menu, CMENU_NOW ); + menu.SetTitle( _( "Clarify selection" ) ); + SetContextMenu( &menu, CMENU_NOW ); while( OPT_TOOL_EVENT evt = Wait() ) { @@ -364,6 +383,9 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) getView()->MarkTargetDirty( TARGET_OVERLAY ); + // Restore the original menu + SetContextMenu( &m_menu, CMENU_BUTTON ); + return current; } diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 6540a57c99..928aa4bf6f 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -31,6 +31,7 @@ #include #include #include +#include class SELECTION_AREA; class BOARD_ITEM; @@ -54,13 +55,12 @@ public: SELECTION_TOOL(); ~SELECTION_TOOL(); - /** - * Function Reset() - * - * Initializes the selection tool. - */ + /// @copydoc TOOL_INTERACTIVE::Reset() void Reset(); + /// @copydoc TOOL_INTERACTIVE::Init() + bool Init(); + /** * Function Main() * @@ -78,6 +78,14 @@ public: return m_selectedItems; } + /** + * Function AddAction() + * + * Adds a menu entry to run a TOOL_ACTION on selected items. + * @param aAction is a menu entry to be added. + */ + void AddMenuItem( const TOOL_ACTION& aAction ); + private: /** * Function selectSingle() @@ -135,6 +143,37 @@ private: */ bool selectable( const BOARD_ITEM* aItem ) const; + /** + * Function selectItem() + * Takes necessary action mark an item as selected. + * + * @param aItem is an item to be selected. + */ + void selectItem( BOARD_ITEM* aItem ) + { + aItem->SetSelected(); + m_selectedItems.insert( aItem ); + + // Now the context menu should be enabled + SetContextMenu( &m_menu, CMENU_BUTTON ); + } + + /** + * Function deselectItem() + * Takes necessary action mark an item as deselected. + * + * @param aItem is an item to be deselected. + */ + void deselectItem( BOARD_ITEM* aItem ) + { + aItem->ClearSelected(); + m_selectedItems.erase( aItem ); + + if( m_selectedItems.empty() ) + // If there is nothing selected, disable the context menu + SetContextMenu( &m_menu, CMENU_OFF ); + } + /** * Function containsSelected() * Checks if the given point is placed within any of selected items' bounding box. @@ -157,6 +196,9 @@ private: /// Register hotkey fot activation of the selection tool TOOL_ACTION m_activate; + + /// Right click popup menu + CONTEXT_MENU m_menu; }; #endif From 85d1048762bfe318ea36d0eaba67cb84c3ee6ccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Sumi=C5=84ski?= Date: Thu, 26 Sep 2013 23:53:54 +0200 Subject: [PATCH 375/415] Uncrustifying push&shove router --- pcbnew/router/CMakeLists.txt | 93 +- pcbnew/router/direction.h | 513 ++++---- pcbnew/router/pns_index.h | 312 ++--- pcbnew/router/pns_item.cpp | 85 +- pcbnew/router/pns_item.h | 189 +-- pcbnew/router/pns_itemset.cpp | 75 +- pcbnew/router/pns_itemset.h | 39 +- pcbnew/router/pns_joint.h | 261 +++-- pcbnew/router/pns_layerset.h | 146 +-- pcbnew/router/pns_line.cpp | 1189 ++++++++++--------- pcbnew/router/pns_line.h | 371 +++--- pcbnew/router/pns_line_placer.cpp | 1113 +++++++++--------- pcbnew/router/pns_line_placer.h | 303 +++-- pcbnew/router/pns_node.cpp | 1542 +++++++++++++------------ pcbnew/router/pns_node.h | 329 +++--- pcbnew/router/pns_optimizer.cpp | 1172 ++++++++++--------- pcbnew/router/pns_optimizer.h | 183 +-- pcbnew/router/pns_router.cpp | 1117 +++++++++--------- pcbnew/router/pns_router.h | 209 ++-- pcbnew/router/pns_routing_settings.h | 49 +- pcbnew/router/pns_segment.h | 152 +-- pcbnew/router/pns_shove.cpp | 675 +++++------ pcbnew/router/pns_shove.h | 82 +- pcbnew/router/pns_solid.cpp | 61 +- pcbnew/router/pns_solid.h | 63 +- pcbnew/router/pns_utils.cpp | 37 +- pcbnew/router/pns_utils.h | 12 +- pcbnew/router/pns_via.cpp | 191 +-- pcbnew/router/pns_via.h | 149 +-- pcbnew/router/pns_walkaround.cpp | 302 ++--- pcbnew/router/pns_walkaround.h | 121 +- pcbnew/router/readme.txt | 4 - pcbnew/router/router_preview_item.cpp | 287 +++-- pcbnew/router/router_preview_item.h | 94 +- pcbnew/router/router_tool.cpp | 355 +++--- pcbnew/router/router_tool.h | 45 +- pcbnew/router/trace.h | 27 +- 37 files changed, 6255 insertions(+), 5692 deletions(-) delete mode 100644 pcbnew/router/readme.txt diff --git a/pcbnew/router/CMakeLists.txt b/pcbnew/router/CMakeLists.txt index 7995cb4af9..2d1c4de6b2 100644 --- a/pcbnew/router/CMakeLists.txt +++ b/pcbnew/router/CMakeLists.txt @@ -1,50 +1,51 @@ -include_directories(BEFORE ${INC_BEFORE}) +include_directories( BEFORE ${INC_BEFORE} ) include_directories( - ./ - ../ - ../../include - ../../pcbnew - ../../polygon - ${INC_AFTER} - ) + ./ + ../ + ../../ include + ../../ pcbnew + ../../ polygon + $ { INC_AFTER } +) -set(PCBNEW_PNS_SRCS - direction.h - pns_via.h - pns_routing_settings.h - pns_shove.cpp - pns_line.cpp - pns_utils.h - pns_layerset.h - trace.h - pns_line.h - pns_walkaround.cpp - pns_node.h - pns_line_placer.cpp - pns_utils.cpp - pns_solid.h - pns_item.cpp - pns_via.cpp - pns_node.cpp - pns_solid.cpp - pns_line_placer.h - pns_optimizer.h - pns_walkaround.h - pns_shove.h - pns_router.h - pns_router.cpp - pns_index.h - pns_item.h - pns_optimizer.cpp - pns_joint.h - pns_segment.h - pns_itemset.h - pns_itemset.cpp - router_tool.cpp - router_tool.h - router_preview_item.cpp - router_preview_item.h - ) +set( PCBNEW_PNS_SRCS + direction.h + pns_via.h + pns_routing_settings.h + pns_shove.cpp + pns_line.cpp + pns_utils.h + pns_layerset.h + trace.h + pns_line.h + pns_walkaround.cpp + pns_node.h + pns_line_placer.cpp + pns_utils.cpp + pns_solid.h + pns_item.cpp + pns_via.cpp + pns_node.cpp + pns_solid.cpp + pns_line_placer.h + pns_optimizer.h + pns_walkaround.h + pns_shove.h + pns_router.h + pns_router.cpp + pns_index.h + pns_item.h + pns_optimizer.cpp + pns_joint.h + pns_segment.h + pns_itemset.h + pns_itemset.cpp + router_tool.cpp + router_tool.h + router_preview_item.cpp + router_preview_item.h +) + +add_library( pnsrouter STATIC ${PCBNEW_PNS_SRCS} ) -add_library(pnsrouter STATIC ${PCBNEW_PNS_SRCS}) diff --git a/pcbnew/router/direction.h b/pcbnew/router/direction.h index 9df3523987..d8584f6ff7 100644 --- a/pcbnew/router/direction.h +++ b/pcbnew/router/direction.h @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -31,265 +31,302 @@ class DIRECTION_45 { - public: - - /** - * Enum Directions - * Represents available directions - there are 8 of them, as on a rectilinear map (north = up) + - * an extra undefined direction, reserved for traces that don't respect 45-degree routing regime. - */ - enum Directions { - N = 0, - NE = 1, - E = 2, - SE = 3, - S = 4, - SW = 5, - W = 6, - NW = 7, - UNDEFINED = -1 - }; - /** - * Enum AngleType - * Represents kind of angle formed by vectors heading in two DIRECTION_45s. - */ - enum AngleType { - ANG_OBTUSE = 0x1, - ANG_RIGHT = 0x2, - ANG_ACUTE = 0x4, - ANG_STRAIGHT = 0x8, - ANG_HALF_FULL = 0x10, - ANG_UNDEFINED = 0x20 - }; + /** + * Enum Directions + * Represents available directions - there are 8 of them, as on a rectilinear map (north = up) + + * an extra undefined direction, reserved for traces that don't respect 45-degree routing regime. + */ + enum Directions + { + N = 0, + NE = 1, + E = 2, + SE = 3, + S = 4, + SW = 5, + W = 6, + NW = 7, + UNDEFINED = -1 + }; - DIRECTION_45(Directions aDir = UNDEFINED): m_dir(aDir) {}; - - /** - * Constructor - * @param aVec vector, whose direction will be translated into a DIRECTION_45. - */ - DIRECTION_45(const VECTOR2I& aVec) - { - construct(aVec); - } + /** + * Enum AngleType + * Represents kind of angle formed by vectors heading in two DIRECTION_45s. + */ + enum AngleType + { + ANG_OBTUSE = 0x01, + ANG_RIGHT = 0x02, + ANG_ACUTE = 0x04, + ANG_STRAIGHT = 0x08, + ANG_HALF_FULL = 0x10, + ANG_UNDEFINED = 0x20 + }; - /** - * Constructor - * @param aSeg segment, whose direction will be translated into a DIRECTION_45. - */ - DIRECTION_45(const SEG& aSeg) - { - construct( aSeg.b - aSeg.a ); - } + DIRECTION_45( Directions aDir = UNDEFINED ) : m_dir( aDir ) {}; - /** - * Function Format() - * Formats the direction in a human readable word. - * @return name of the direction - */ - const std::string Format() const - { - switch(m_dir) - { - case N : return "north"; - case NE : return "north-east"; - case E : return "east"; - case SE : return "south-east"; - case S : return "south"; - case SW : return "south-west"; - case W : return "west"; - case NW : return "north-west"; - case UNDEFINED : return "undefined"; - default: return ""; - } - } - - /** - * Function Opposite() - * Returns a direction opposite (180 degree) to (this) - * @return opposite direction - */ - DIRECTION_45 Opposite() const - { - if(m_dir == UNDEFINED) - return UNDEFINED; - const Directions OppositeMap[] = { S, SW, W, NW, N, NE, E, SE } ; - return OppositeMap[m_dir]; - } + /** + * Constructor + * @param aVec vector, whose direction will be translated into a DIRECTION_45. + */ + DIRECTION_45( const VECTOR2I& aVec ) + { + construct( aVec ); + } - /** - * Function Angle() - * Returns the type of angle between directions (this) and aOther. - * @param aOther direction to compare angle with - */ - AngleType Angle(const DIRECTION_45& aOther) const - { - if(m_dir == UNDEFINED || aOther.m_dir == UNDEFINED) - return ANG_UNDEFINED; + /** + * Constructor + * @param aSeg segment, whose direction will be translated into a DIRECTION_45. + */ + DIRECTION_45( const SEG& aSeg ) + { + construct( aSeg.b - aSeg.a ); + } - int d = std::abs(m_dir - aOther.m_dir); + /** + * Function Format() + * Formats the direction in a human readable word. + * @return name of the direction + */ + const std::string Format() const + { + switch( m_dir ) + { + case N: + return "north"; - if(d == 1 || d == 7) - return ANG_OBTUSE; - else if(d == 2 || d == 6) - return ANG_RIGHT; - else if(d == 3 || d == 5) - return ANG_ACUTE; - else if(d == 4) - return ANG_HALF_FULL; - else - return ANG_STRAIGHT; - } + case NE: + return "north-east"; - /** - * Function IsObtuse() - * @return true, when (this) forms an obtuse angle with aOther - */ - bool IsObtuse(const DIRECTION_45& aOther) const - { - return Angle(aOther) == ANG_OBTUSE; - } + case E: + return "east"; - /** - * Function IsDiagonal() - * Returns true if the direction is diagonal (e.g. North-West, South-East, etc) - * @return true, when diagonal. - */ - bool IsDiagonal() const - { - return (m_dir % 2) == 1; - } - - /** - * Function BuildInitialTrace() - * - * Builds a 2-segment line chain between points aP0 and aP1 and following 45-degree routing - * regime. If aStartDiagonal is true, the trace starts with a diagonal segment. - * @param aP0 starting point - * @param aP1 ending point - * @param aStartDiagonal whether the first segment has to be diagonal - * @return the trace - */ - const SHAPE_LINE_CHAIN BuildInitialTrace(const VECTOR2I& aP0, const VECTOR2I &aP1, bool aStartDiagonal = false) const - { - int w = abs(aP1.x - aP0.x); - int h = abs(aP1.y - aP0.y); - int sw = sign(aP1.x - aP0.x); - int sh = sign(aP1.y - aP0.y); + case SE: + return "south-east"; - VECTOR2I mp0, mp1; - - // we are more horizontal than vertical? - if(w > h) - { - mp0 = VECTOR2I((w - h) * sw, 0); // direction: E - mp1 = VECTOR2I(h * sw, h * sh); // direction: NE - } else { - mp0 = VECTOR2I(0, sh * (h - w)); // direction: N - mp1 = VECTOR2I(sw * w, sh * w); // direction: NE - } + case S: + return "south"; - bool start_diagonal; + case SW: + return "south-west"; - if(m_dir == UNDEFINED) - start_diagonal = aStartDiagonal; - else - start_diagonal = IsDiagonal(); + case W: + return "west"; - SHAPE_LINE_CHAIN pl; + case NW: + return "north-west"; - pl.Append(aP0); - if (start_diagonal) - pl.Append(aP0 + mp1); - else - pl.Append(aP0 + mp0); - - pl.Append(aP1); - pl.Simplify(); - return pl; - }; + case UNDEFINED: + return "undefined"; - bool operator==(const DIRECTION_45& aOther) const - { - return aOther.m_dir == m_dir; - } + default: + return ""; + } + } - bool operator!=(const DIRECTION_45& aOther) const - { - return aOther.m_dir != m_dir; - } + /** + * Function Opposite() + * Returns a direction opposite (180 degree) to (this) + * @return opposite direction + */ + DIRECTION_45 Opposite() const + { + if( m_dir == UNDEFINED ) + return UNDEFINED; - const DIRECTION_45 Right() const - { - DIRECTION_45 r; - r.m_dir = (Directions) (m_dir + 1); - if(r.m_dir == NW) - r.m_dir = N; - return r; - } + const Directions OppositeMap[] = { S, SW, W, NW, N, NE, E, SE }; + return OppositeMap[m_dir]; + } + + /** + * Function Angle() + * Returns the type of angle between directions (this) and aOther. + * @param aOther direction to compare angle with + */ + AngleType Angle( const DIRECTION_45& aOther ) const + { + if( m_dir == UNDEFINED || aOther.m_dir == UNDEFINED ) + return ANG_UNDEFINED; + + int d = std::abs( m_dir - aOther.m_dir ); + + if( d == 1 || d == 7 ) + return ANG_OBTUSE; + else if( d == 2 || d == 6 ) + return ANG_RIGHT; + else if( d == 3 || d == 5 ) + return ANG_ACUTE; + else if( d == 4 ) + return ANG_HALF_FULL; + else + return ANG_STRAIGHT; + } + + /** + * Function IsObtuse() + * @return true, when (this) forms an obtuse angle with aOther + */ + bool IsObtuse( const DIRECTION_45& aOther ) const + { + return Angle( aOther ) == ANG_OBTUSE; + } + + /** + * Function IsDiagonal() + * Returns true if the direction is diagonal (e.g. North-West, South-East, etc) + * @return true, when diagonal. + */ + bool IsDiagonal() const + { + return ( m_dir % 2 ) == 1; + } + + /** + * Function BuildInitialTrace() + * + * Builds a 2-segment line chain between points aP0 and aP1 and following 45-degree routing + * regime. If aStartDiagonal is true, the trace starts with a diagonal segment. + * @param aP0 starting point + * @param aP1 ending point + * @param aStartDiagonal whether the first segment has to be diagonal + * @return the trace + */ + const SHAPE_LINE_CHAIN BuildInitialTrace( const VECTOR2I& aP0, + const VECTOR2I& aP1, + bool aStartDiagonal = false ) const + { + int w = abs( aP1.x - aP0.x ); + int h = abs( aP1.y - aP0.y ); + int sw = sign( aP1.x - aP0.x ); + int sh = sign( aP1.y - aP0.y ); + + VECTOR2I mp0, mp1; + + // we are more horizontal than vertical? + if( w > h ) + { + mp0 = VECTOR2I( (w - h) * sw, 0 ); // direction: E + mp1 = VECTOR2I( h * sw, h * sh ); // direction: NE + } + else + { + mp0 = VECTOR2I( 0, sh * (h - w) ); // direction: N + mp1 = VECTOR2I( sw * w, sh * w ); // direction: NE + } + + bool start_diagonal; + + if( m_dir == UNDEFINED ) + start_diagonal = aStartDiagonal; + else + start_diagonal = IsDiagonal(); + + SHAPE_LINE_CHAIN pl; + + pl.Append( aP0 ); + + if( start_diagonal ) + pl.Append( aP0 + mp1 ); + else + pl.Append( aP0 + mp0 ); + + pl.Append( aP1 ); + pl.Simplify(); + return pl; + }; + + bool operator==( const DIRECTION_45& aOther ) const + { + return aOther.m_dir == m_dir; + } + + bool operator!=( const DIRECTION_45& aOther ) const + { + return aOther.m_dir != m_dir; + } + + const DIRECTION_45 Right() const + { + DIRECTION_45 r; + + r.m_dir = (Directions) (m_dir + 1); + + if( r.m_dir == NW ) + r.m_dir = N; + + return r; + } private: - template int sign(T val) const { - return (T(0) < val) - (val < T(0)); - } + template + int sign( T val ) const + { + return (T( 0 ) < val) - ( val < T( 0 ) ); + } - /** - * Function construct() - * Calculates the direction from a vector. If the vector's angle is not a multiple of 45 - * degrees, the direction is rounded to the nearest octant. - * @param aVec our vector - */ - void construct(const VECTOR2I& aVec) - { - m_dir = UNDEFINED; - if(aVec.x == 0 && aVec.y == 0) - return; + /** + * Function construct() + * Calculates the direction from a vector. If the vector's angle is not a multiple of 45 + * degrees, the direction is rounded to the nearest octant. + * @param aVec our vector + */ + void construct( const VECTOR2I& aVec ) + { + m_dir = UNDEFINED; - double mag = 360.0 - (180.0 / M_PI * atan2 ((double) aVec.y, (double) aVec.x )) + 90.0; - if (mag >= 360.0) - mag -= 360.0; - if(mag < 0.0) - mag += 360.0; - - m_dir = (Directions) ((mag + 22.5) / 45.0); + if( aVec.x == 0 && aVec.y == 0 ) + return; - if(m_dir >= 8) - m_dir = (Directions) (m_dir - 8); - if(m_dir < 0) - m_dir = (Directions) (m_dir + 8); + double mag = 360.0 - ( 180.0 / M_PI * atan2( (double) aVec.y, (double) aVec.x ) ) + 90.0; - return ; - if(aVec.y < 0) - { - if(aVec.x > 0) - m_dir = NE; - else if(aVec.x < 0) - m_dir = NW; - else - m_dir = N; - } - else if(aVec.y == 0) - { - if(aVec.x > 0) - m_dir = E; - else - m_dir = W; - } - else // aVec.y>0 - { - if(aVec.x > 0) - m_dir = SE; - else if(aVec.x < 0) - m_dir = SW; - else - m_dir = S; - } - } + if( mag >= 360.0 ) + mag -= 360.0; - Directions m_dir; ///> our actual direction -}; + if( mag < 0.0 ) + mag += 360.0; + + m_dir = (Directions)( ( mag + 22.5 ) / 45.0 ); + + if( m_dir >= 8 ) + m_dir = (Directions)( m_dir - 8 ); + + if( m_dir < 0 ) + m_dir = (Directions)( m_dir + 8 ); + + return; + + if( aVec.y < 0 ) + { + if( aVec.x > 0 ) + m_dir = NE; + else if( aVec.x < 0 ) + m_dir = NW; + else + m_dir = N; + } + else if( aVec.y == 0 ) + { + if( aVec.x > 0 ) + m_dir = E; + else + m_dir = W; + } + else // aVec.y>0 + { + if( aVec.x > 0 ) + m_dir = SE; + else if( aVec.x < 0 ) + m_dir = SW; + else + m_dir = S; + } + } + + Directions m_dir; ///> our actual direction +}; + +#endif // __DIRECTION_H -#endif // __DIRECTION_H diff --git a/pcbnew/router/pns_index.h b/pcbnew/router/pns_index.h index c7f8704202..6bd556b460 100644 --- a/pcbnew/router/pns_index.h +++ b/pcbnew/router/pns_index.h @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -37,205 +37,227 @@ * overlap and improving search time. **/ -class PNS_INDEX { - +class PNS_INDEX +{ public: - - typedef std::list NetItemsList; - typedef SHAPE_INDEX ItemShapeIndex; - typedef boost::unordered_set ItemSet; + typedef std::list NetItemsList; + typedef SHAPE_INDEX ItemShapeIndex; + typedef boost::unordered_set ItemSet; - PNS_INDEX(); - ~PNS_INDEX(); + PNS_INDEX(); + ~PNS_INDEX(); - void Add( PNS_ITEM *aItem ); - void Remove ( PNS_ITEM *aItem ); - void Replace ( PNS_ITEM *aOldItem, PNS_ITEM *aNewItem ); + void Add( PNS_ITEM* aItem ); + void Remove( PNS_ITEM* aItem ); + void Replace( PNS_ITEM* aOldItem, PNS_ITEM* aNewItem ); - template - int Query( const PNS_ITEM *aItem, int aMinDistance, Visitor &v); - template - int Query( const SHAPE *aShape, int aMinDistance, Visitor &v); + template + int Query( const PNS_ITEM* aItem, int aMinDistance, Visitor& v ); - void Clear(); + template + int Query( const SHAPE* aShape, int aMinDistance, Visitor& v ); - NetItemsList* GetItemsForNet ( int aNet ) ; + void Clear(); - ItemSet::iterator begin() { return m_allItems.begin(); } - ItemSet::iterator end() { return m_allItems.end(); } + NetItemsList* GetItemsForNet( int aNet ); - bool Contains ( PNS_ITEM *aItem ) const { - return m_allItems.find(aItem) != m_allItems.end(); - } + ItemSet::iterator begin() { return m_allItems.begin(); } + ItemSet::iterator end() { return m_allItems.end(); } - int Size() const { return m_allItems.size(); } + bool Contains( PNS_ITEM* aItem ) const + { + return m_allItems.find( aItem ) != m_allItems.end(); + } + + int Size() const { return m_allItems.size(); } private: - + static const int MaxSubIndices = 64; + static const int SI_Multilayer = 2; + static const int SI_SegDiagonal = 0; + static const int SI_SegStraight = 1; + static const int SI_Traces = 3; + static const int SI_PadsTop = 0; + static const int SI_PadsBottom = 1; - static const int MaxSubIndices = 64; - static const int SI_Multilayer = 2; - static const int SI_SegDiagonal = 0; - static const int SI_SegStraight = 1; - static const int SI_Traces = 3; - static const int SI_PadsTop = 0; - static const int SI_PadsBottom = 1; + template + int querySingle( int index, const SHAPE* aShape, int aMinDistance, Visitor& v ); - template - int querySingle( int index, const SHAPE *aShape, int aMinDistance, Visitor &v); + ItemShapeIndex* getSubindex( const PNS_ITEM* aItem ); - ItemShapeIndex *getSubindex( const PNS_ITEM *aItem ); - - ItemShapeIndex *m_subIndices[ MaxSubIndices ]; - std::map m_netMap; - ItemSet m_allItems; + ItemShapeIndex* m_subIndices[MaxSubIndices]; + std::map m_netMap; + ItemSet m_allItems; }; + PNS_INDEX::PNS_INDEX() { - memset(m_subIndices, 0, sizeof(m_subIndices)); + memset( m_subIndices, 0, sizeof( m_subIndices ) ); } -PNS_INDEX::ItemShapeIndex *PNS_INDEX::getSubindex(const PNS_ITEM *aItem ) + +PNS_INDEX::ItemShapeIndex* PNS_INDEX::getSubindex( const PNS_ITEM* aItem ) { - int idx_n = -1; + int idx_n = -1; - const PNS_LAYERSET l = aItem->GetLayers(); - - switch(aItem->GetKind()) - { - case PNS_ITEM::VIA: - idx_n = SI_Multilayer; - break; - case PNS_ITEM::SOLID: - { - if( l.IsMultilayer() ) - idx_n = SI_Multilayer; - else if (l.Start() == 0) // fixme: use kicad layer codes - idx_n = SI_PadsTop; - else if (l.Start() == 15) - idx_n = SI_PadsBottom; - break; - } - case PNS_ITEM::SEGMENT: - case PNS_ITEM::LINE: - idx_n = SI_Traces + 2 * l.Start() + SI_SegStraight; - break; - default: - break; - } - assert(idx_n >= 0 && idx_n < MaxSubIndices); + const PNS_LAYERSET l = aItem->GetLayers(); - if(!m_subIndices[idx_n]) - m_subIndices[idx_n] = new ItemShapeIndex; + switch( aItem->GetKind() ) + { + case PNS_ITEM::VIA: + idx_n = SI_Multilayer; + break; - return m_subIndices[idx_n]; + case PNS_ITEM::SOLID: + { + if( l.IsMultilayer() ) + idx_n = SI_Multilayer; + else if( l.Start() == 0 ) // fixme: use kicad layer codes + idx_n = SI_PadsTop; + else if( l.Start() == 15 ) + idx_n = SI_PadsBottom; + + break; + } + + case PNS_ITEM::SEGMENT: + case PNS_ITEM::LINE: + idx_n = SI_Traces + 2 * l.Start() + SI_SegStraight; + break; + + default: + break; + } + + assert( idx_n >= 0 && idx_n < MaxSubIndices ); + + if( !m_subIndices[idx_n] ) + m_subIndices[idx_n] = new ItemShapeIndex; + + return m_subIndices[idx_n]; } -void PNS_INDEX::Add( PNS_ITEM *aItem ) + +void PNS_INDEX::Add( PNS_ITEM* aItem ) { - ItemShapeIndex *idx = getSubindex(aItem); - + ItemShapeIndex* idx = getSubindex( aItem ); - idx->Add(aItem); - m_allItems.insert(aItem); - int net = aItem->GetNet(); - if(net >= 0) - { - m_netMap[net].push_back(aItem); - } + idx->Add( aItem ); + m_allItems.insert( aItem ); + int net = aItem->GetNet(); + + if( net >= 0 ) + { + m_netMap[net].push_back( aItem ); + } } -void PNS_INDEX::Remove( PNS_ITEM *aItem ) + +void PNS_INDEX::Remove( PNS_ITEM* aItem ) { - ItemShapeIndex *idx = getSubindex(aItem); - idx->Remove(aItem); - m_allItems.erase (aItem); + ItemShapeIndex* idx = getSubindex( aItem ); - int net = aItem->GetNet(); - - if(net >= 0 && m_netMap.find(net) != m_netMap.end()) - m_netMap[net].remove(aItem); + idx->Remove( aItem ); + m_allItems.erase( aItem ); + + int net = aItem->GetNet(); + + if( net >= 0 && m_netMap.find( net ) != m_netMap.end() ) + m_netMap[net].remove( aItem ); } -void PNS_INDEX::Replace( PNS_ITEM *aOldItem, PNS_ITEM *aNewItem ) + +void PNS_INDEX::Replace( PNS_ITEM* aOldItem, PNS_ITEM* aNewItem ) { - Remove(aOldItem); - Add(aNewItem); + Remove( aOldItem ); + Add( aNewItem ); } + template - int PNS_INDEX::querySingle( int index, const SHAPE *aShape, int aMinDistance, Visitor &v) - { - if(!m_subIndices[index]) - return 0; - return m_subIndices[index] -> Query(aShape, aMinDistance, v, false); - } +int PNS_INDEX::querySingle( int index, const SHAPE* aShape, int aMinDistance, Visitor& v ) +{ + if( !m_subIndices[index] ) + return 0; + + return m_subIndices[index]->Query( aShape, aMinDistance, v, false ); +} + template - int PNS_INDEX::Query( const PNS_ITEM *aItem, int aMinDistance, Visitor &v) - { - const SHAPE *shape = aItem->GetShape(); - int total = 0; - - - total += querySingle(SI_Multilayer, shape, aMinDistance, v); +int PNS_INDEX::Query( const PNS_ITEM* aItem, int aMinDistance, Visitor& v ) +{ + const SHAPE* shape = aItem->GetShape(); + int total = 0; - const PNS_LAYERSET layers = aItem->GetLayers(); - - if(layers.IsMultilayer()) - { - total += querySingle(SI_PadsTop, shape, aMinDistance, v); - total += querySingle(SI_PadsBottom, shape, aMinDistance, v); + total += querySingle( SI_Multilayer, shape, aMinDistance, v ); - - for(int i = layers.Start(); i <= layers.End(); ++i ) - total += querySingle( SI_Traces + 2 * i + SI_SegStraight, shape, aMinDistance, v); + const PNS_LAYERSET layers = aItem->GetLayers(); - } else { - int l = layers.Start(); + if( layers.IsMultilayer() ) + { + total += querySingle( SI_PadsTop, shape, aMinDistance, v ); + total += querySingle( SI_PadsBottom, shape, aMinDistance, v ); - if(l == 0) - total += querySingle(SI_PadsTop, shape, aMinDistance, v); - else if(l == 15) - total += querySingle(SI_PadsBottom, shape, aMinDistance, v); - total += querySingle ( SI_Traces + 2 * l + SI_SegStraight, shape, aMinDistance, v); - } + for( int i = layers.Start(); i <= layers.End(); ++i ) + total += querySingle( SI_Traces + 2 * i + SI_SegStraight, shape, aMinDistance, v ); + } + else + { + int l = layers.Start(); + + if( l == 0 ) + total += querySingle( SI_PadsTop, shape, aMinDistance, v ); + else if( l == 15 ) + total += querySingle( SI_PadsBottom, shape, aMinDistance, v ); + + total += querySingle( SI_Traces + 2 * l + SI_SegStraight, shape, aMinDistance, v ); + } + + return total; +} - return total; - } template - int PNS_INDEX::Query( const SHAPE *aShape, int aMinDistance, Visitor &v) - { - int total = 0; - for(int i = 0; i < MaxSubIndices; i++) - total += querySingle(i, aShape, aMinDistance, v); - return total; - } +int PNS_INDEX::Query( const SHAPE* aShape, int aMinDistance, Visitor& v ) +{ + int total = 0; + + for( int i = 0; i < MaxSubIndices; i++ ) + total += querySingle( i, aShape, aMinDistance, v ); + + return total; +} + - void PNS_INDEX::Clear() { - for(int i = 0; i < MaxSubIndices; ++i) - { - ItemShapeIndex *idx = m_subIndices[i]; - if(idx) - delete idx; - m_subIndices[i] = NULL; - } + for( int i = 0; i < MaxSubIndices; ++i ) + { + ItemShapeIndex* idx = m_subIndices[i]; + + if( idx ) + delete idx; + + m_subIndices[i] = NULL; + } } + PNS_INDEX::~PNS_INDEX() { - Clear(); + Clear(); } -PNS_INDEX::NetItemsList* PNS_INDEX::GetItemsForNet ( int aNet ) + +PNS_INDEX::NetItemsList* PNS_INDEX::GetItemsForNet( int aNet ) { - if(m_netMap.find(aNet) == m_netMap.end()) - return NULL; - return &m_netMap[aNet]; + if( m_netMap.find( aNet ) == m_netMap.end() ) + return NULL; + + return &m_netMap[aNet]; } #endif + diff --git a/pcbnew/router/pns_item.cpp b/pcbnew/router/pns_item.cpp index 43a6b97976..d2b79dddb9 100644 --- a/pcbnew/router/pns_item.cpp +++ b/pcbnew/router/pns_item.cpp @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -21,52 +21,69 @@ #include "pns_item.h" #include "pns_line.h" -bool PNS_ITEM::collideSimple ( const PNS_ITEM *aOther, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) const +bool PNS_ITEM::collideSimple( const PNS_ITEM* aOther, int aClearance, bool aNeedMTV, + VECTOR2I& aMTV ) const { - // same nets? no collision! - if( m_net == aOther->m_net ) - return false; + // same nets? no collision! + if( m_net == aOther->m_net ) + return false; - // check if we are not on completely different layers first - if (!m_layers.Overlaps (aOther->m_layers)) - return false; + // check if we are not on completely different layers first + if( !m_layers.Overlaps( aOther->m_layers ) ) + return false; - return GetShape()->Collide ( aOther->GetShape(), aClearance ); + return GetShape()->Collide( aOther->GetShape(), aClearance ); - // fixme: MTV + // fixme: MTV } -bool PNS_ITEM::Collide( const PNS_ITEM *aOther, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) const + +bool PNS_ITEM::Collide( const PNS_ITEM* aOther, int aClearance, bool aNeedMTV, + VECTOR2I& aMTV ) const { - if( collideSimple( aOther, aClearance, aNeedMTV, aMTV ) ) - return true; + if( collideSimple( aOther, aClearance, aNeedMTV, aMTV ) ) + return true; - // special case for "head" line with a via attached at the end. - if( aOther->m_kind == LINE ) - { - const PNS_LINE *line = static_cast (aOther); - if(line -> EndsWithVia()) - return collideSimple( &line->GetVia(), aClearance - line->GetWidth() / 2, aNeedMTV, aMTV ); - } + // special case for "head" line with a via attached at the end. + if( aOther->m_kind == LINE ) + { + const PNS_LINE* line = static_cast( aOther ); - return false; + if( line->EndsWithVia() ) + return collideSimple( &line->GetVia(), aClearance - line->GetWidth() / 2, aNeedMTV, + aMTV ); + } + + return false; } + const std::string PNS_ITEM::GetKindStr() const { - switch(m_kind) - { - case LINE: return "line"; - case SEGMENT: return "segment"; - case VIA: return "via"; - case JOINT: return "joint"; - case SOLID: return "solid"; - default: return "unknown"; - } + switch( m_kind ) + { + case LINE: + return "line"; + + case SEGMENT: + return "segment"; + + case VIA: + return "via"; + + case JOINT: + return "joint"; + + case SOLID: + return "solid"; + + default: + return "unknown"; + } } + PNS_ITEM::~PNS_ITEM() { - } - \ No newline at end of file + diff --git a/pcbnew/router/pns_item.h b/pcbnew/router/pns_item.h index 22114ed6af..a9b2da49e4 100644 --- a/pcbnew/router/pns_item.h +++ b/pcbnew/router/pns_item.h @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -37,119 +37,122 @@ class PNS_NODE; * Base class for PNS router board items. Implements the shared properties of all PCB items - * net, spanned layers, geometric shape & refererence to owning model. */ - -class PNS_ITEM + +class PNS_ITEM { public: + static const int UnusedNet = INT_MAX; - static const int UnusedNet = INT_MAX; + ///> Supported item types + enum PnsKind + { + SOLID = 1, + LINE = 2, + JOINT = 4, + SEGMENT = 8, + VIA = 16, + ANY = 0xff + }; - ///> Supported item types - enum PnsKind { - SOLID = 1, - LINE = 2, - JOINT = 4, - SEGMENT = 8, - VIA = 16, - ANY = 0xff - }; + PNS_ITEM( PnsKind aKind ) + { + m_net = UnusedNet; + m_movable = true; + m_kind = aKind; + m_parent = NULL; + m_world = NULL; + m_owner = NULL; + } - PNS_ITEM(PnsKind aKind) - { - m_net = UnusedNet; - m_movable = true; - m_kind = aKind; - m_parent = NULL; - m_world = NULL; - m_owner = NULL; - } + PNS_ITEM( const PNS_ITEM& aOther ) + { + m_layers = aOther.m_layers; + m_net = aOther.m_net; + m_movable = aOther.m_movable; + m_kind = aOther.m_kind; + m_world = aOther.m_world; + m_parent = aOther.m_parent; + m_owner = NULL; + } - PNS_ITEM( const PNS_ITEM& aOther ) - { - m_layers = aOther.m_layers; - m_net = aOther.m_net; - m_movable = aOther.m_movable; - m_kind = aOther.m_kind; - m_world = aOther.m_world; - m_parent = aOther.m_parent; - m_owner = NULL; - } + virtual ~PNS_ITEM(); - virtual ~PNS_ITEM(); - - virtual PNS_ITEM *Clone() const = 0; + virtual PNS_ITEM* Clone() const = 0; - ///> Returns a convex polygon "hull" of a the item, that is used as the walkaround - /// path. - /// aClearance defines how far from the body of the item the hull should be, - /// aWalkaroundThickness is the width of the line that walks around this hull. - virtual const SHAPE_LINE_CHAIN Hull(int aClearance = 0, int aWalkaroundThickness = 0) const - { - return SHAPE_LINE_CHAIN(); - }; + ///> Returns a convex polygon "hull" of a the item, that is used as the walkaround + /// path. + /// aClearance defines how far from the body of the item the hull should be, + /// aWalkaroundThickness is the width of the line that walks around this hull. + virtual const SHAPE_LINE_CHAIN Hull( int aClearance = 0, int aWalkaroundThickness = 0 ) const + { + return SHAPE_LINE_CHAIN(); + }; + PnsKind GetKind() const { return m_kind; } + bool OfKind( int aKind ) const { return (aKind & m_kind) != 0; } - - PnsKind GetKind() const { return m_kind; } - bool OfKind( int aKind ) const { return (aKind & m_kind) != 0; } - - const std::string GetKindStr() const; - - ///> Gets/Sets the corresponding parent object in the host application's model (pcbnew) - void SetParent(BOARD_ITEM *aParent) { m_parent = aParent; } - BOARD_ITEM *GetParent() const { return m_parent; } + const std::string GetKindStr() const; - ///> Net accessors - int GetNet() const { return m_net; } - void SetNet(int aNet) { m_net = aNet; } + ///> Gets/Sets the corresponding parent object in the host application's model (pcbnew) + void SetParent( BOARD_ITEM* aParent ) { m_parent = aParent; } + BOARD_ITEM* GetParent() const { return m_parent; } - ///> Layers accessors - const PNS_LAYERSET& GetLayers() const { return m_layers; } - void SetLayers ( const PNS_LAYERSET& aLayers ) { m_layers = aLayers; } - void SetLayer ( int aLayer ) { m_layers = PNS_LAYERSET (aLayer, aLayer); } + ///> Net accessors + int GetNet() const { return m_net; } + void SetNet( int aNet ) { m_net = aNet; } - ///> Ownership management. An item can belong to a single PNS_NODE or stay unowned. - void SetOwner (PNS_NODE *aOwner) { m_owner = aOwner; } - bool BelongsTo (PNS_NODE *aNode) const { return m_owner == aNode; } - PNS_NODE *GetOwner() const { return m_owner; } + ///> Layers accessors + const PNS_LAYERSET& GetLayers() const { return m_layers; } + void SetLayers( const PNS_LAYERSET& aLayers ) { m_layers = aLayers; } + void SetLayer( int aLayer ) + { + m_layers = PNS_LAYERSET( aLayer, aLayer ); + } - ///> Sets the world that is used for collision resolution. - void SetWorld (PNS_NODE *aWorld) { m_world = aWorld; } - PNS_NODE *GetWorld() const { return m_world; } + ///> Ownership management. An item can belong to a single PNS_NODE or stay unowned. + void SetOwner( PNS_NODE* aOwner ) { m_owner = aOwner; } + bool BelongsTo( PNS_NODE* aNode ) const { return m_owner == aNode; } + PNS_NODE* GetOwner() const { return m_owner; } + ///> Sets the world that is used for collision resolution. + void SetWorld( PNS_NODE* aWorld ) { m_world = aWorld; } + PNS_NODE* GetWorld() const { return m_world; } - ///> Collision function. Checks if the item aOther is closer to us than - /// aClearance and returns true if so. It can also calculate a minimum translation vector that resolves the - /// collision if needed. - virtual bool Collide( const PNS_ITEM *aOther, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) const; + ///> Collision function. Checks if the item aOther is closer to us than + /// aClearance and returns true if so. It can also calculate a minimum translation vector that + /// resolves the collision if needed. + virtual bool Collide( const PNS_ITEM* aOther, int aClearance, bool aNeedMTV, + VECTOR2I& aMTV ) const; - ///> A shortcut without MTV calculation - bool Collide( const PNS_ITEM *aOther, int aClearance ) const - { - VECTOR2I dummy; - return Collide(aOther, aClearance, false, dummy); - } - - ///> Returns the geometric shape of the item - virtual const SHAPE* GetShape() const { - return NULL; - } + ///> A shortcut without MTV calculation + bool Collide( const PNS_ITEM* aOther, int aClearance ) const + { + VECTOR2I dummy; + + return Collide( aOther, aClearance, false, dummy ); + } + + ///> Returns the geometric shape of the item + virtual const SHAPE* GetShape() const + { + return NULL; + } private: - bool collideSimple ( const PNS_ITEM *aOther, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) const; + bool collideSimple( const PNS_ITEM* aOther, int aClearance, bool aNeedMTV, + VECTOR2I& aMTV ) const; protected: + PnsKind m_kind; - PnsKind m_kind; - - BOARD_ITEM *m_parent; - PNS_NODE *m_world; - PNS_NODE *m_owner; - PNS_LAYERSET m_layers; + BOARD_ITEM* m_parent; + PNS_NODE* m_world; + PNS_NODE* m_owner; + PNS_LAYERSET m_layers; - bool m_movable; - int m_net; + bool m_movable; + int m_net; }; -#endif // __PNS_ITEM_H +#endif // __PNS_ITEM_Ha diff --git a/pcbnew/router/pns_itemset.cpp b/pcbnew/router/pns_itemset.cpp index 494c1a07a9..1e6a603ae6 100644 --- a/pcbnew/router/pns_itemset.cpp +++ b/pcbnew/router/pns_itemset.cpp @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -25,49 +25,58 @@ PNS_ITEMSET::PNS_ITEMSET() { - } + PNS_ITEMSET::~PNS_ITEMSET() { - } -PNS_ITEMSET& PNS_ITEMSET::FilterLayers ( int aStart, int aEnd ) + +PNS_ITEMSET& PNS_ITEMSET::FilterLayers( int aStart, int aEnd ) { - ItemVector newItems; - PNS_LAYERSET l; - if(aEnd < 0) - l = PNS_LAYERSET(aStart); - else - l = PNS_LAYERSET(aStart, aEnd); + ItemVector newItems; + PNS_LAYERSET l; - BOOST_FOREACH( PNS_ITEM *item, m_items ) - if(item->GetLayers(). Overlaps ( l )) - newItems.push_back(item); - m_items = newItems; - return *this; + if( aEnd < 0 ) + l = PNS_LAYERSET( aStart ); + else + l = PNS_LAYERSET( aStart, aEnd ); + + BOOST_FOREACH( PNS_ITEM * item, m_items ) + + if( item->GetLayers().Overlaps( l ) ) + newItems.push_back( item ); + + m_items = newItems; + return *this; } -PNS_ITEMSET& PNS_ITEMSET::FilterKinds ( int aKindMask ) + +PNS_ITEMSET& PNS_ITEMSET::FilterKinds( int aKindMask ) { - ItemVector newItems; - - BOOST_FOREACH( PNS_ITEM *item, m_items ) - if(item->GetKind() & aKindMask ) - newItems.push_back(item); - m_items = newItems; - return *this; + ItemVector newItems; + + BOOST_FOREACH( PNS_ITEM * item, m_items ) + + if( item->GetKind() & aKindMask ) + newItems.push_back( item ); + + m_items = newItems; + return *this; } -PNS_ITEMSET& PNS_ITEMSET::FilterNet ( int aNet ) + +PNS_ITEMSET& PNS_ITEMSET::FilterNet( int aNet ) { - ItemVector newItems; - - BOOST_FOREACH( PNS_ITEM *item, m_items ) - if(item->GetNet() == aNet) - newItems.push_back(item); - m_items = newItems; - return *this; + ItemVector newItems; + + BOOST_FOREACH( PNS_ITEM * item, m_items ) + + if( item->GetNet() == aNet ) + newItems.push_back( item ); + + m_items = newItems; + return *this; } diff --git a/pcbnew/router/pns_itemset.h b/pcbnew/router/pns_itemset.h index 91ebea1a20..ae13ae78e9 100644 --- a/pcbnew/router/pns_itemset.h +++ b/pcbnew/router/pns_itemset.h @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -28,35 +28,36 @@ /** * Class PNS_ITEMSET * - * Holds a list of board items, that can be filtered against net, kinds, layers, etc. + * Holds a list of board items, that can be filtered against net, kinds, + * layers, etc. **/ class PNS_ITEMSET { public: + typedef std::vector ItemVector; - typedef std::vector ItemVector; + PNS_ITEMSET(); + ~PNS_ITEMSET(); - PNS_ITEMSET(); - ~PNS_ITEMSET(); + ItemVector& Items() { return m_items; } - ItemVector& Items() { return m_items; } + PNS_ITEMSET& FilterLayers( int aStart, int aEnd = -1 ); + PNS_ITEMSET& FilterKinds( int aKindMask ); + PNS_ITEMSET& FilterNet( int aNet ); - PNS_ITEMSET& FilterLayers ( int aStart, int aEnd = -1 ); - PNS_ITEMSET& FilterKinds ( int aKindMask ); - PNS_ITEMSET& FilterNet ( int aNet ); - - int Size() { return m_items.size(); } + int Size() { return m_items.size(); } - void Add(PNS_ITEM *item) - { - m_items.push_back(item); - } + void Add( PNS_ITEM* item ) + { + m_items.push_back( item ); + } - PNS_ITEM *Get( int index ) const { return m_items[index]; } + PNS_ITEM* Get( int index ) const { return m_items[index]; } private: - ItemVector m_items; + ItemVector m_items; }; #endif + diff --git a/pcbnew/router/pns_joint.h b/pcbnew/router/pns_joint.h index 88f7477a75..a4ad7340a0 100644 --- a/pcbnew/router/pns_joint.h +++ b/pcbnew/router/pns_joint.h @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -31,158 +31,177 @@ /** * Class PNS_JOINT - * - * Represents a 2D point on a given set of layers and belonging to a certain net, - * that links together a number of board items. - * A hash table of joints is used by the router to follow connectivity between the items. + * + * Represents a 2D point on a given set of layers and belonging to a certain + * net, that links together a number of board items. + * A hash table of joints is used by the router to follow connectivity between + * the items. **/ - class PNS_JOINT : public PNS_ITEM { public: - typedef std::vector LinkedItems; + typedef std::vector LinkedItems; - ///> joints are hashed by their position, layers and net. Linked items are, obviously, not hashed - struct HashTag { - VECTOR2I pos; - int net; - }; - - PNS_JOINT(): - PNS_ITEM(JOINT) {} + ///> Joints are hashed by their position, layers and net. + /// Linked items are, obviously, not hashed + struct HashTag + { + VECTOR2I pos; + int net; + }; - PNS_JOINT(const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aNet = -1): - PNS_ITEM(JOINT) - { - m_tag.pos = aPos; - m_tag.net = aNet; - m_layers = aLayers; - } + PNS_JOINT() : + PNS_ITEM( JOINT ) {} - PNS_JOINT(const PNS_JOINT& b): - PNS_ITEM(JOINT) - { - m_layers = b.m_layers; - m_tag.pos = b.m_tag.pos; - m_tag.net = b.m_tag.net; - m_linkedItems = b.m_linkedItems; - m_layers = b.m_layers; - } + PNS_JOINT( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, + int aNet = -1 ) : + PNS_ITEM( JOINT ) + { + m_tag.pos = aPos; + m_tag.net = aNet; + m_layers = aLayers; + } - PNS_ITEM *Clone() const - { - assert(false); - return NULL; - } + PNS_JOINT( const PNS_JOINT& b ) : + PNS_ITEM( JOINT ) + { + m_layers = b.m_layers; + m_tag.pos = b.m_tag.pos; + m_tag.net = b.m_tag.net; + m_linkedItems = b.m_linkedItems; + m_layers = b.m_layers; + } - ///> returns true if the joint is a trivial line corner, connecting two segments of the same net, on the same layer. - bool IsLineCorner() const - { - if(m_linkedItems.size() != 2) - return false; + PNS_ITEM* Clone() const + { + assert( false ); + return NULL; + } - if( m_linkedItems[0]->GetKind() != SEGMENT || m_linkedItems[1]->GetKind() != SEGMENT ) - return false; + ///> Returns true if the joint is a trivial line corner, connecting two + /// segments of the same net, on the same layer. + bool IsLineCorner() const + { + if( m_linkedItems.size() != 2 ) + return false; - PNS_SEGMENT *seg1 = static_cast (m_linkedItems[0]); - PNS_SEGMENT *seg2 = static_cast (m_linkedItems[1]); + if( m_linkedItems[0]->GetKind() != SEGMENT || + m_linkedItems[1]->GetKind() != SEGMENT ) + return false; - // joints between segments of different widths are not trivial. - return (seg1->GetWidth() == seg2->GetWidth()); - } + PNS_SEGMENT* seg1 = static_cast (m_linkedItems[0]); + PNS_SEGMENT* seg2 = static_cast (m_linkedItems[1]); - ///> Links the joint to a given board item (when it's added to the PNS_NODE) - void Link ( PNS_ITEM *aItem ) - { - LinkedItems::iterator f = std::find(m_linkedItems.begin(), m_linkedItems.end(), aItem); - if(f != m_linkedItems.end()) - return; - m_linkedItems.push_back(aItem); - } + // joints between segments of different widths are not trivial. + return seg1->GetWidth() == seg2->GetWidth(); + } - ///> Unlinks a given board item from the joint (upon its removal from a PNS_NODE) - ///> Returns true if the joint became dangling after unlinking. - bool Unlink ( PNS_ITEM *aItem ) - { - LinkedItems::iterator f = std::find(m_linkedItems.begin(), m_linkedItems.end(), aItem); - if(f != m_linkedItems.end()) - m_linkedItems.erase(f); - return (m_linkedItems.size() == 0); - } + ///> Links the joint to a given board item (when it's added to the PNS_NODE) + void Link( PNS_ITEM* aItem ) + { + LinkedItems::iterator f = std::find( m_linkedItems.begin(), + m_linkedItems.end(), aItem ); - ///> For trivial joints, returns the segment adjacent to (aCurrent). For non-trival ones, returns - ///> NULL, indicating the end of line. - PNS_SEGMENT* NextSegment( PNS_SEGMENT* aCurrent) const - { - if(!IsLineCorner()) - return NULL; - - return static_cast (m_linkedItems [ m_linkedItems[0] == aCurrent ? 1 : 0 ] ); - } + if( f != m_linkedItems.end() ) + return; - /// trivial accessors - const HashTag& GetTag() const { return m_tag; } - const VECTOR2I& GetPos() const { return m_tag.pos; } - int GetNet() const { return m_tag.net; } - LinkedItems & GetLinkList() { return m_linkedItems; }; + m_linkedItems.push_back( aItem ); + } - ///> Returns the number of linked items of types listed in aMask. - int LinkCount( int aMask = -1 ) const - { - int n = 0; - for(LinkedItems::const_iterator i = m_linkedItems.begin(); i!= m_linkedItems.end(); ++i) - if( (*i)->GetKind() & aMask ) - n++; - return n; - } + ///> Unlinks a given board item from the joint (upon its removal from a PNS_NODE) + ///> Returns true if the joint became dangling after unlinking. + bool Unlink( PNS_ITEM* aItem ) + { + LinkedItems::iterator f = std::find( m_linkedItems.begin(), + m_linkedItems.end(), aItem ); - void Dump() const; - - bool operator==(const PNS_JOINT& rhs) const - { - return m_tag.pos == rhs.m_tag.pos && m_tag.net == rhs.m_tag.net; - } + if( f != m_linkedItems.end() ) + m_linkedItems.erase( f ); - void Merge( const PNS_JOINT& aJoint ) - { - if(!Overlaps(aJoint)) - return; - - m_layers.Merge (aJoint.m_layers); + return m_linkedItems.size() == 0; + } - // fixme: duplicate links (?) - for(LinkedItems::const_iterator i =aJoint.m_linkedItems.begin(); i!=aJoint.m_linkedItems.end();++i) - m_linkedItems.push_back(*i); - } + ///> For trivial joints, returns the segment adjacent to (aCurrent). For non-trival ones, returns + ///> NULL, indicating the end of line. + PNS_SEGMENT* NextSegment( PNS_SEGMENT* aCurrent ) const + { + if( !IsLineCorner() ) + return NULL; - bool Overlaps(const PNS_JOINT& rhs) const - { - return m_tag.pos == rhs.m_tag.pos && m_tag.net == rhs.m_tag.net && m_layers.Overlaps(rhs.m_layers); - } + return static_cast( m_linkedItems[m_linkedItems[0] == aCurrent ? 1 : 0] ); + } + + /// trivial accessors + const HashTag& GetTag() const { return m_tag; } + const VECTOR2I& GetPos() const { return m_tag.pos; } + int GetNet() const { return m_tag.net; } + LinkedItems& GetLinkList() { return m_linkedItems; }; + + ///> Returns the number of linked items of types listed in aMask. + int LinkCount( int aMask = -1 ) const + { + int n = 0; + + for( LinkedItems::const_iterator i = m_linkedItems.begin(); + i != m_linkedItems.end(); ++i ) + if( (*i)->GetKind() & aMask ) + n++; + + return n; + } + + void Dump() const; + + bool operator==( const PNS_JOINT& rhs ) const + { + return m_tag.pos == rhs.m_tag.pos && m_tag.net == rhs.m_tag.net; + } + + void Merge( const PNS_JOINT& aJoint ) + { + if( !Overlaps( aJoint ) ) + return; + + m_layers.Merge( aJoint.m_layers ); + + // fixme: duplicate links (?) + for( LinkedItems::const_iterator i = aJoint.m_linkedItems.begin(); + i != aJoint.m_linkedItems.end(); ++i ) + m_linkedItems.push_back( *i ); + } + + bool Overlaps( const PNS_JOINT& rhs ) const + { + return m_tag.pos == rhs.m_tag.pos && + m_tag.net == rhs.m_tag.net && m_layers.Overlaps( rhs.m_layers ); + } private: + ///> hash tag for unordered_multimap + HashTag m_tag; - ///> hash tag for unordered_multimap - HashTag m_tag; - - ///> list of items linked to this joint - LinkedItems m_linkedItems; + ///> list of items linked to this joint + LinkedItems m_linkedItems; }; // hash function & comparison operator for boost::unordered_map<> -inline bool operator==(PNS_JOINT::HashTag const& p1, PNS_JOINT::HashTag const& p2) +inline bool operator==( PNS_JOINT::HashTag const& p1, + PNS_JOINT::HashTag const& p2 ) { return p1.pos == p2.pos && p1.net == p2.net; } -inline std::size_t hash_value(PNS_JOINT::HashTag const& p) + +inline std::size_t hash_value( PNS_JOINT::HashTag const& p ) { std::size_t seed = 0; - boost::hash_combine(seed, p.pos.x); - boost::hash_combine(seed, p.pos.y); - boost::hash_combine(seed, p.net); + boost::hash_combine( seed, p.pos.x ); + boost::hash_combine( seed, p.pos.y ); + boost::hash_combine( seed, p.net ); + return seed; } -#endif // __PNS_JOINT_H +#endif // __PNS_JOINT_H + diff --git a/pcbnew/router/pns_layerset.h b/pcbnew/router/pns_layerset.h index 2809eb485c..6baa9b51f8 100644 --- a/pcbnew/router/pns_layerset.h +++ b/pcbnew/router/pns_layerset.h @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -26,93 +26,95 @@ /** * Class PNS_LAYERSET * - * Represents a contiguous set of PCB layers. + * Represents a contiguous set of PCB layers. */ - class PNS_LAYERSET { - public: +public: + PNS_LAYERSET() : + m_start( -1 ), + m_end( -1 ) + {}; - PNS_LAYERSET(): - m_start(-1), - m_end(-1) - {}; + PNS_LAYERSET( int aStart, int aEnd ) + { + if( aStart > aEnd ) + std::swap( aStart, aEnd ); - PNS_LAYERSET (int aStart, int aEnd) - { - if(aStart > aEnd) - std::swap(aStart, aEnd); - m_start = aStart; - m_end = aEnd; - } + m_start = aStart; + m_end = aEnd; + } - PNS_LAYERSET (int aLayer) - { - m_start = m_end = aLayer; - } + PNS_LAYERSET( int aLayer ) + { + m_start = m_end = aLayer; + } - PNS_LAYERSET(const PNS_LAYERSET &b) : - m_start(b.m_start), - m_end (b.m_end) - {} + PNS_LAYERSET( const PNS_LAYERSET& b ) : + m_start( b.m_start ), + m_end( b.m_end ) + {} - ~PNS_LAYERSET () {}; + ~PNS_LAYERSET() {}; - const PNS_LAYERSET& operator= ( const PNS_LAYERSET& b) - { - m_start = b.m_start; - m_end = b.m_end; - return *this; - } + const PNS_LAYERSET& operator=( const PNS_LAYERSET& b ) + { + m_start = b.m_start; + m_end = b.m_end; + return *this; + } - bool Overlaps ( const PNS_LAYERSET& aOther ) const - { - return m_end >= aOther.m_start && m_start <= aOther.m_end; - } + bool Overlaps( const PNS_LAYERSET& aOther ) const + { + return m_end >= aOther.m_start && m_start <= aOther.m_end; + } - bool Overlaps ( const int aLayer ) const - { - return aLayer >= m_start && aLayer <= m_end; - } + bool Overlaps( const int aLayer ) const + { + return aLayer >= m_start && aLayer <= m_end; + } - bool IsMultilayer ( ) const - { - return m_start != m_end; - } + bool IsMultilayer() const + { + return m_start != m_end; + } - int Start() const { - return m_start; - } + int Start() const + { + return m_start; + } - int End() const { - return m_end; - } + int End() const + { + return m_end; + } - void Merge ( const PNS_LAYERSET& aOther ) - { - if(m_start < 0 || m_end < 0) - { - m_start = aOther.m_start; - m_end = aOther.m_end; - return; - } + void Merge( const PNS_LAYERSET& aOther ) + { + if( m_start < 0 || m_end < 0 ) + { + m_start = aOther.m_start; + m_end = aOther.m_end; + return; + } - if(aOther.m_start < m_start) - m_start = aOther.m_start; - if(aOther.m_end > m_end) - m_end = aOther.m_end; - } + if( aOther.m_start < m_start ) + m_start = aOther.m_start; - ///> Shortcut for comparisons/overlap tests - static PNS_LAYERSET All() - { - return PNS_LAYERSET(0, 256); - } + if( aOther.m_end > m_end ) + m_end = aOther.m_end; + } - private: + ///> Shortcut for comparisons/overlap tests + static PNS_LAYERSET All() + { + return PNS_LAYERSET( 0, 256 ); + } - int m_start; - int m_end; +private: + int m_start; + int m_end; }; -#endif // __PNS_LAYERSET_H +#endif // __PNS_LAYERSET_H + diff --git a/pcbnew/router/pns_line.cpp b/pcbnew/router/pns_line.cpp index cb729f96d0..172a0188a7 100644 --- a/pcbnew/router/pns_line.cpp +++ b/pcbnew/router/pns_line.cpp @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -23,7 +23,6 @@ #include - #include "pns_line.h" #include "pns_node.h" #include "pns_via.h" @@ -33,672 +32,732 @@ using namespace std; using boost::optional; -PNS_LINE *PNS_LINE::Clone() const +PNS_LINE* PNS_LINE::Clone() const { - PNS_LINE *l = new PNS_LINE(); + PNS_LINE* l = new PNS_LINE(); - l->m_line = m_line; - l->m_width = m_width; - l->m_layers = m_layers; - l->m_net = m_net; - l->m_movable = m_movable; - l->m_segmentRefs = NULL; - l->m_hasVia = m_hasVia; - l->m_via = m_via; - - return l; + l->m_line = m_line; + l->m_width = m_width; + l->m_layers = m_layers; + l->m_net = m_net; + l->m_movable = m_movable; + l->m_segmentRefs = NULL; + l->m_hasVia = m_hasVia; + l->m_via = m_via; + + return l; } -PNS_LINE *PNS_LINE::CloneProperties() const + +PNS_LINE* PNS_LINE::CloneProperties() const { - PNS_LINE *l = new PNS_LINE(); + PNS_LINE* l = new PNS_LINE(); - l->m_width = m_width; - l->m_layers = m_layers; - l->m_net = m_net; - l->m_movable = m_movable; + l->m_width = m_width; + l->m_layers = m_layers; + l->m_net = m_net; + l->m_movable = m_movable; - return l; -} - -PNS_SEGMENT *PNS_SEGMENT::Clone() const -{ - PNS_SEGMENT *s = new PNS_SEGMENT; - s->m_width = m_width; - s->m_net = m_net; - s->m_shape = m_shape; - s->m_layers = m_layers; - - return s; //assert(false); + return l; } + +PNS_SEGMENT* PNS_SEGMENT::Clone() const +{ + PNS_SEGMENT* s = new PNS_SEGMENT; + + s->m_width = m_width; + s->m_net = m_net; + s->m_shape = m_shape; + s->m_layers = m_layers; + + return s; // assert(false); +} + + #if 1 -bool PNS_LINE::MergeObtuseSegments( ) +bool PNS_LINE::MergeObtuseSegments() { - int step = m_line.PointCount() - 3; - int iter = 0; - - int segs_pre = m_line.SegmentCount(); + int step = m_line.PointCount() - 3; + int iter = 0; - if(step < 0) - return false; + int segs_pre = m_line.SegmentCount(); - SHAPE_LINE_CHAIN current_path (m_line); + if( step < 0 ) + return false; - while(1) - { - iter++; - int n_segs = current_path.SegmentCount(); - int max_step = n_segs - 2; - if(step > max_step) - step = max_step; + SHAPE_LINE_CHAIN current_path( m_line ); - if(step < 2) - { - m_line = current_path; - return current_path.SegmentCount() < segs_pre; - } + while( 1 ) + { + iter++; + int n_segs = current_path.SegmentCount(); + int max_step = n_segs - 2; - bool found_anything = false; - int n = 0; + if( step > max_step ) + step = max_step; - while (n < n_segs - step) - { - const SEG s1 = current_path.CSegment(n); - const SEG s2 = current_path.CSegment(n + step); - SEG s1opt, s2opt; + if( step < 2 ) + { + m_line = current_path; + return current_path.SegmentCount() < segs_pre; + } - if (DIRECTION_45(s1).IsObtuse(DIRECTION_45(s2))) - { - VECTOR2I ip = *s1.IntersectLines(s2); + bool found_anything = false; + int n = 0; - if(s1.Distance(ip) <= 1 || s2.Distance(ip) <= 1) - { - s1opt = SEG(s1.a, ip); - s2opt = SEG(ip, s2.b); - } else { - s1opt = SEG(s1.a, ip); - s2opt = SEG(ip, s2.b); - } - - - if (DIRECTION_45(s1opt).IsObtuse(DIRECTION_45(s2opt))) - { - SHAPE_LINE_CHAIN opt_path; - opt_path.Append(s1opt.a); - opt_path.Append(s1opt.b); - opt_path.Append(s2opt.b); + while( n < n_segs - step ) + { + const SEG s1 = current_path.CSegment( n ); + const SEG s2 = current_path.CSegment( n + step ); + SEG s1opt, s2opt; - PNS_LINE opt_track (*this, opt_path); + if( DIRECTION_45( s1 ).IsObtuse( DIRECTION_45( s2 ) ) ) + { + VECTOR2I ip = *s1.IntersectLines( s2 ); - if(!m_world->CheckColliding(&opt_track, PNS_ITEM::ANY)) - { - current_path.Replace(s1.Index() + 1, s2.Index(), ip); - n_segs = current_path.SegmentCount(); - found_anything = true; - break; - } - } - } - n++; - } + if( s1.Distance( ip ) <= 1 || s2.Distance( ip ) <= 1 ) + { + s1opt = SEG( s1.a, ip ); + s2opt = SEG( ip, s2.b ); + } + else + { + s1opt = SEG( s1.a, ip ); + s2opt = SEG( ip, s2.b ); + } - if(!found_anything) - { - if( step <= 2 ) - { - m_line = current_path; - return m_line.SegmentCount() < segs_pre; - } - step --; - } - } - return m_line.SegmentCount() < segs_pre; -} -bool PNS_LINE::MergeSegments( ) -{ - int step = m_line.PointCount() - 3; - int iter = 0; - - int segs_pre = m_line.SegmentCount(); + if( DIRECTION_45( s1opt ).IsObtuse( DIRECTION_45( s2opt ) ) ) + { + SHAPE_LINE_CHAIN opt_path; + opt_path.Append( s1opt.a ); + opt_path.Append( s1opt.b ); + opt_path.Append( s2opt.b ); - if(step < 0) - return false; + PNS_LINE opt_track( *this, opt_path ); - SHAPE_LINE_CHAIN current_path (m_line); + if( !m_world->CheckColliding( &opt_track, PNS_ITEM::ANY ) ) + { + current_path.Replace( s1.Index() + 1, s2.Index(), ip ); + n_segs = current_path.SegmentCount(); + found_anything = true; + break; + } + } + } - while(1) - { - iter++; - int n_segs = current_path.SegmentCount(); - int max_step = n_segs - 2; - if(step > max_step) - step = max_step; + n++; + } - if(step < 2) - { - m_line = current_path; - return current_path.SegmentCount() < segs_pre; - } + if( !found_anything ) + { + if( step <= 2 ) + { + m_line = current_path; + return m_line.SegmentCount() < segs_pre; + } - bool found_anything = false; - int n = 0; + step--; + } + } - while (n < n_segs - step) - { - const SEG s1 = current_path.CSegment(n); - const SEG s2 = current_path.CSegment(n + step); - SEG s1opt, s2opt; - - if(n > 0) - { - SHAPE_LINE_CHAIN path_straight = DIRECTION_45().BuildInitialTrace(s1.a, s2.a, false); - SHAPE_LINE_CHAIN path_diagonal = DIRECTION_45().BuildInitialTrace(s1.a, s2.a, true); - - - - } - - if (DIRECTION_45(s1) == DIRECTION_45(s2)) - { - if(s1.Collinear(s2)) - { - //printf("Colinear: np %d step %d n1 %d n2 %d\n", n_segs, step, n, n+step); - - SHAPE_LINE_CHAIN opt_path; - opt_path.Append(s1.a); - opt_path.Append(s2.b); - - PNS_LINE tmp (*this, opt_path); - - if(!m_world->CheckColliding(&tmp, PNS_ITEM::ANY)) - { - current_path.Remove(s1.Index() + 1, s2.Index()); - n_segs = current_path.SegmentCount(); - found_anything = true; - break; - } - - } - - - } - else if (DIRECTION_45(s1).IsObtuse(DIRECTION_45(s2))) - { - VECTOR2I ip = *s1.IntersectLines(s2); - - if(s1.Distance(ip) <= 1 || s2.Distance(ip) <= 1) - { - s1opt = SEG(s1.a, ip); - s2opt = SEG(ip, s2.b); - } else { - s1opt = SEG(s1.a, ip); - s2opt = SEG(ip, s2.b); - } - - - if (DIRECTION_45(s1opt).IsObtuse(DIRECTION_45(s2opt))) - { - SHAPE_LINE_CHAIN opt_path; - opt_path.Append(s1opt.a); - opt_path.Append(s1opt.b); - opt_path.Append(s2opt.b); - - PNS_LINE opt_track (*this, opt_path); - - if(!m_world->CheckColliding(&opt_track, PNS_ITEM::ANY)) - { - current_path.Replace(s1.Index() + 1, s2.Index(), ip); - n_segs = current_path.SegmentCount(); - found_anything = true; - break; - } - } - - } - n++; - } - - if(!found_anything) - { - if( step <= 2 ) - { - m_line = current_path; - return m_line.SegmentCount() < segs_pre; - } - step --; - } - } - return m_line.SegmentCount() < segs_pre; + return m_line.SegmentCount() < segs_pre; } +bool PNS_LINE::MergeSegments() +{ + int step = m_line.PointCount() - 3; + int iter = 0; + + int segs_pre = m_line.SegmentCount(); + + if( step < 0 ) + return false; + + SHAPE_LINE_CHAIN current_path( m_line ); + + while( 1 ) + { + iter++; + int n_segs = current_path.SegmentCount(); + int max_step = n_segs - 2; + + if( step > max_step ) + step = max_step; + + if( step < 2 ) + { + m_line = current_path; + return current_path.SegmentCount() < segs_pre; + } + + bool found_anything = false; + int n = 0; + + while( n < n_segs - step ) + { + const SEG s1 = current_path.CSegment( n ); + const SEG s2 = current_path.CSegment( n + step ); + SEG s1opt, s2opt; + + if( n > 0 ) + { + SHAPE_LINE_CHAIN path_straight = DIRECTION_45().BuildInitialTrace( s1.a, + s2.a, + false ); + SHAPE_LINE_CHAIN path_diagonal = DIRECTION_45().BuildInitialTrace( s1.a, + s2.a, + true ); + } + + if( DIRECTION_45( s1 ) == DIRECTION_45( s2 ) ) + { + if( s1.Collinear( s2 ) ) + { + // printf("Colinear: np %d step %d n1 %d n2 %d\n", n_segs, step, n, n+step); + + SHAPE_LINE_CHAIN opt_path; + opt_path.Append( s1.a ); + opt_path.Append( s2.b ); + + PNS_LINE tmp( *this, opt_path ); + + if( !m_world->CheckColliding( &tmp, PNS_ITEM::ANY ) ) + { + current_path.Remove( s1.Index() + 1, s2.Index() ); + n_segs = current_path.SegmentCount(); + found_anything = true; + break; + } + } + } + else if( DIRECTION_45( s1 ).IsObtuse( DIRECTION_45( s2 ) ) ) + { + VECTOR2I ip = *s1.IntersectLines( s2 ); + + if( s1.Distance( ip ) <= 1 || s2.Distance( ip ) <= 1 ) + { + s1opt = SEG( s1.a, ip ); + s2opt = SEG( ip, s2.b ); + } + else + { + s1opt = SEG( s1.a, ip ); + s2opt = SEG( ip, s2.b ); + } + + + if( DIRECTION_45( s1opt ).IsObtuse( DIRECTION_45( s2opt ) ) ) + { + SHAPE_LINE_CHAIN opt_path; + opt_path.Append( s1opt.a ); + opt_path.Append( s1opt.b ); + opt_path.Append( s2opt.b ); + + PNS_LINE opt_track( *this, opt_path ); + + if( !m_world->CheckColliding( &opt_track, PNS_ITEM::ANY ) ) + { + current_path.Replace( s1.Index() + 1, s2.Index(), ip ); + n_segs = current_path.SegmentCount(); + found_anything = true; + break; + } + } + } + + n++; + } + + if( !found_anything ) + { + if( step <= 2 ) + { + m_line = current_path; + return m_line.SegmentCount() < segs_pre; + } + + step--; + } + } + + return m_line.SegmentCount() < segs_pre; +} #endif -int PNS_LINE::CountCorners(int aAngles) + +int PNS_LINE::CountCorners( int aAngles ) { - int count = 0; - for(int i = 0; i < m_line.SegmentCount() - 1; i ++) - { - const SEG seg1 = m_line.CSegment(i); - const SEG seg2 = m_line.CSegment(i + 1); + int count = 0; - const DIRECTION_45 dir1(seg1); - const DIRECTION_45 dir2(seg2); + for( int i = 0; i < m_line.SegmentCount() - 1; i++ ) + { + const SEG seg1 = m_line.CSegment( i ); + const SEG seg2 = m_line.CSegment( i + 1 ); - DIRECTION_45::AngleType a = dir1.Angle(dir2); - if(a & aAngles) - count++; - } - return count; + const DIRECTION_45 dir1( seg1 ); + const DIRECTION_45 dir2( seg2 ); + + DIRECTION_45::AngleType a = dir1.Angle( dir2 ); + + if( a & aAngles ) + count++; + } + + return count; } -//#define DUMP_TEST_CASES + +// #define DUMP_TEST_CASES // fixme: damn f*****g inefficient and incredibly crappily written -void PNS_LINE::NewWalkaround( const SHAPE_LINE_CHAIN& aObstacle, - SHAPE_LINE_CHAIN& aPrePath, - SHAPE_LINE_CHAIN& aWalkaroundPath, - SHAPE_LINE_CHAIN& aPostPath, - bool aCw ) const +void PNS_LINE::NewWalkaround( const SHAPE_LINE_CHAIN& aObstacle, + SHAPE_LINE_CHAIN& aPrePath, + SHAPE_LINE_CHAIN& aWalkaroundPath, + SHAPE_LINE_CHAIN& aPostPath, + bool aCw ) const { + typedef SHAPE_LINE_CHAIN::Intersection Intersection; - typedef SHAPE_LINE_CHAIN::Intersection Intersection; + SHAPE_LINE_CHAIN l_orig( m_line ); + SHAPE_LINE_CHAIN l_hull; + vector outside, on_edge, inside; + SHAPE_LINE_CHAIN path; - SHAPE_LINE_CHAIN l_orig(m_line); - SHAPE_LINE_CHAIN l_hull; - vector outside, on_edge, inside; - SHAPE_LINE_CHAIN path; - - vector isects; + vector isects; - // don't calculate walkaround for empty lines - if(m_line.PointCount() < 2) - return; + // don't calculate walkaround for empty lines + if( m_line.PointCount() < 2 ) + return; #ifdef DUMP_TEST_CASES - printf("%s\n", m_line.Format().c_str()); - printf("%s\n", aObstacle.Format().c_str()); + printf( "%s\n", m_line.Format().c_str() ); + printf( "%s\n", aObstacle.Format().c_str() ); #endif - aObstacle.Intersect(m_line, isects); - //printf("NewWalk intersectiosn :%d\n" ,isects.size()); - if( !aCw ) - l_hull = aObstacle.Reverse(); - else - l_hull = aObstacle; + aObstacle.Intersect( m_line, isects ); - BOOST_FOREACH( Intersection isect, isects ) - { - l_orig.Split(isect.p); - l_hull.Split(isect.p); - } + // printf("NewWalk intersectiosn :%d\n" ,isects.size()); + if( !aCw ) + l_hull = aObstacle.Reverse(); + else + l_hull = aObstacle; + + BOOST_FOREACH( Intersection isect, isects ) { + l_orig.Split( isect.p ); + l_hull.Split( isect.p ); + } #ifdef DUMP_TEST_CASES - printf("%s\n", m_line.Format().c_str()); - printf("%s\n", aObstacle.Format().c_str()); - printf("%s\n", l_orig.Format().c_str()); - printf("%s\n", l_hull.Format().c_str()); + printf( "%s\n", m_line.Format().c_str() ); + printf( "%s\n", aObstacle.Format().c_str() ); + printf( "%s\n", l_orig.Format().c_str() ); + printf( "%s\n", l_hull.Format().c_str() ); #endif - //printf("Pts: line %d hull %d\n", l_orig.PointCount(), l_hull.PointCount()); + // printf("Pts: line %d hull %d\n", l_orig.PointCount(), l_hull.PointCount()); - int first_post = -1; - int last_pre = -1; + int first_post = -1; + int last_pre = -1; - for (int i = 0; i < l_orig.PointCount(); i++) - { - int ei = l_hull.Find(l_orig.CPoint(i)) ; - bool edge = ei >= 0; - bool in = l_hull.PointInside( l_orig.CPoint(i)) && !edge; - bool out = !( in || edge); - - outside.push_back( out ); - on_edge.push_back( edge ); - inside.push_back( in ); - } - + for( int i = 0; i < l_orig.PointCount(); i++ ) + { + int ei = l_hull.Find( l_orig.CPoint( i ) ); + bool edge = ei >= 0; + bool in = l_hull.PointInside( l_orig.CPoint( i ) ) && !edge; + bool out = !( in || edge); - for(int i = l_orig.PointCount() - 1; i >= 1; i --) - if(inside[i] && outside[i-1]) - { - SHAPE_LINE_CHAIN::Intersections ips; - l_hull.Intersect( SEG( l_orig.CPoint(i), l_orig.CPoint(i - 1) ), ips ); - l_orig.Remove(i, -1); - l_orig.Append(ips[0].p); - break; - } - else if (inside[i] && on_edge[i-1]) - { - l_orig.Remove(i, -1); - //n = i; - } else if(!inside[i]) - break; + outside.push_back( out ); + on_edge.push_back( edge ); + inside.push_back( in ); + } - if(!outside.size() && on_edge.size() < 2) - return; + for( int i = l_orig.PointCount() - 1; i >= 1; i-- ) + if( inside[i] && outside[i - 1] ) + { + SHAPE_LINE_CHAIN::Intersections ips; + l_hull.Intersect( SEG( l_orig.CPoint( i ), l_orig.CPoint( i - 1 ) ), ips ); + l_orig.Remove( i, -1 ); + l_orig.Append( ips[0].p ); + break; + } + else if( inside[i] && on_edge[i - 1] ) + { + l_orig.Remove( i, -1 ); + // n = i; + } + else if( !inside[i] ) + break; - for (int i = 0; i < l_orig.PointCount(); i++) - { - const VECTOR2I p = l_orig.Point(i); - - if( outside[i] || (on_edge[i] && i == (l_orig.PointCount() - 1))) - { - if(last_pre < 0) - aPrePath.Append(p); - path.Append(p); - } - else if ( on_edge[i] ) - { - int li = -1; - if(last_pre < 0) - { - aPrePath.Append(p); - last_pre = path.PointCount(); - } - if( i == l_orig.PointCount() - 1 || outside[i+1]) - { - path.Append(p); - } - else - { - int vi2 = l_hull.Find( l_orig.CPoint(i) ); - - path.Append(l_hull.CPoint(vi2)); - for(int j = (vi2 + 1) % l_hull.PointCount(); j != vi2; j = (j + 1) % l_hull.PointCount()) - { - path.Append(l_hull.CPoint(j)); - li = l_orig.Find(l_hull.CPoint(j)); - if(li >= 0 && (li == (l_orig.PointCount() - 1) || outside[li+1])) - break; - } + if( !outside.size() && on_edge.size() < 2 ) + return; - if(li >= 0) { - if(i >= li) - break; - else { - i = li; - } - } - } + for( int i = 0; i < l_orig.PointCount(); i++ ) + { + const VECTOR2I p = l_orig.Point( i ); - first_post = path.PointCount() - 1; - } - } + if( outside[i] || ( on_edge[i] && i == ( l_orig.PointCount() - 1 ) ) ) + { + if( last_pre < 0 ) + aPrePath.Append( p ); - if(last_pre < 0 && first_post < 0) - return; + path.Append( p ); + } + else if( on_edge[i] ) + { + int li = -1; - aWalkaroundPath = path.Slice( last_pre, first_post ); - if(first_post >= 0) - aPostPath = path.Slice( first_post, -1 ); + if( last_pre < 0 ) + { + aPrePath.Append( p ); + last_pre = path.PointCount(); + } -} + if( i == l_orig.PointCount() - 1 || outside[i + 1] ) + { + path.Append( p ); + } + else + { + int vi2 = l_hull.Find( l_orig.CPoint( i ) ); -bool PNS_LINE::onEdge(const SHAPE_LINE_CHAIN &obstacle, VECTOR2I p, int& ei, bool& is_vertex) const -{ - int vtx = obstacle.Find(p); + path.Append( l_hull.CPoint( vi2 ) ); - if(vtx >= 0) - { - ei = vtx; - is_vertex =true; - return true; - } - - for(int s = 0; s< obstacle.SegmentCount(); s++) - { - if(obstacle.CSegment(s).Contains(p)) - { - ei = s; - is_vertex = false; - return true; - } - } + for( int j = (vi2 + 1) % l_hull.PointCount(); + j != vi2; + j = (j + 1) % l_hull.PointCount() ) + { + path.Append( l_hull.CPoint( j ) ); + li = l_orig.Find( l_hull.CPoint( j ) ); - return false; -} + if( li >= 0 && ( li == (l_orig.PointCount() - 1 ) || + outside[li + 1]) ) + break; + } -bool PNS_LINE::walkScan(const SHAPE_LINE_CHAIN &line, const SHAPE_LINE_CHAIN &obstacle, bool reverse, VECTOR2I &ip, int& index_o, int& index_l, bool& is_vertex) const -{ - int sc = line.SegmentCount(); - for(int i = 0; i < line.SegmentCount(); i++) - { + if( li >= 0 ) + { + if( i >= li ) + break; + else + i = li; + } + } - printf("check-seg rev %d %d/%d %d\n",reverse, i, sc, sc - 1 - i); - SEG tmp = line.CSegment(reverse ? sc - 1 - i : i); - SEG s (tmp.a, tmp.b); - if(reverse) - { - s.a = tmp.b; - s.b = tmp.a; - } + first_post = path.PointCount() - 1; + } + } - if(onEdge(obstacle, s.a, index_o, is_vertex)) - { - index_l = (reverse ? sc-1-i : i); - ip = s.a; - printf("vertex %d on-%s %d\n", index_l, is_vertex?"vertex":"edge",index_o); - return true; - } + if( last_pre < 0 && first_post < 0 ) + return; - if(onEdge(obstacle, s.b, index_o, is_vertex)) - { - index_l = (reverse? sc-1-i-1 : i + 1); - ip = s.b; - printf("vertex %d on-%s %d\n", index_l, is_vertex?"vertex":"edge",index_o); - return true; - } - - SHAPE_LINE_CHAIN::Intersections ips; - int n_is = obstacle.Intersect ( s, ips ); - - if (n_is > 0) - { - index_o = ips[0].our.Index(); - index_l = reverse ?sc-1-i:i; - printf("segment-%d intersects edge-%d\n", index_l, index_o); - ip = ips[0].p; - return true; - } - } - return false; -} - -bool PNS_LINE::Walkaround(SHAPE_LINE_CHAIN obstacle, SHAPE_LINE_CHAIN &pre, SHAPE_LINE_CHAIN &walk, SHAPE_LINE_CHAIN &post, bool cw) const -{ - const SHAPE_LINE_CHAIN &line = GetCLine(); - VECTOR2I ip_start; - int index_o_start, index_l_start; - VECTOR2I ip_end; - int index_o_end, index_l_end; - - bool is_vertex_start, is_vertex_end; - - if(line.SegmentCount() < 1) - return false; - - if(obstacle.PointInside(line.CPoint(0)) || obstacle.PointInside(line.CPoint(-1))) - return false; - -// printf("forward:\n"); - bool found = walkScan(line, obstacle, false, ip_start, index_o_start, index_l_start, is_vertex_start); - //printf("reverse:\n"); - found |= walkScan(line, obstacle, true, ip_end, index_o_end, index_l_end, is_vertex_end); - - if(!found || ip_start == ip_end) - { - pre = line; - return true; - } - - - pre = line.Slice ( 0, index_l_start ); - pre.Append (ip_start); - walk.Clear(); - walk.Append(ip_start); - - if(cw) - { - int is = (index_o_start + 1) % obstacle.PointCount(); - int ie = (is_vertex_end ? index_o_end : index_o_end + 1) % obstacle.PointCount(); - - while(1) - { - printf("is %d\n", is); - walk.Append(obstacle.CPoint(is)); - - if(is == ie) - break; - - is ++; - if (is == obstacle.PointCount() ) - is = 0; - } - } else { - int is = index_o_start; - int ie = (is_vertex_end ? index_o_end : index_o_end) % obstacle.PointCount(); - - while(1) - { - printf("is %d\n", is); - walk.Append(obstacle.CPoint(is)); - if(is == ie) - break; - - is --; - if ( is < 0 ) - is = obstacle.PointCount() - 1; - } - - - } - - walk.Append(ip_end); - - post.Clear(); - post.Append(ip_end); - post.Append(line.Slice (is_vertex_end ? index_l_end : index_l_end + 1 , -1)); - - //for(int i = (index_o_start + 1) % obstacle.PointCount(); - // i != (index_o_end + 1) % obstacle.PointCount(); i=(i+1) % obstacle.PointCount()) - //{ - //printf("append %d\n", i); - //walk.Append(obstacle.CPoint(i)); - //} - - return true; + aWalkaroundPath = path.Slice( last_pre, first_post ); + if( first_post >= 0 ) + aPostPath = path.Slice( first_post, -1 ); } - -void PNS_LINE::NewWalkaround( const SHAPE_LINE_CHAIN& aObstacle, - SHAPE_LINE_CHAIN& aPath, - bool aCw ) const +bool PNS_LINE::onEdge( const SHAPE_LINE_CHAIN& obstacle, VECTOR2I p, int& ei, + bool& is_vertex ) const { - SHAPE_LINE_CHAIN walk, post; - NewWalkaround(aObstacle, aPath, walk, post, aCw); - aPath.Append(walk); - aPath.Append(post); - aPath.Simplify(); -} + int vtx = obstacle.Find( p ); -void PNS_LINE::Walkaround( const SHAPE_LINE_CHAIN& aObstacle, - SHAPE_LINE_CHAIN& aPath, - bool aCw ) const -{ - SHAPE_LINE_CHAIN walk, post; - Walkaround(aObstacle, aPath, walk, post, aCw); - aPath.Append(walk); - aPath.Append(post); - aPath.Simplify(); + if( vtx >= 0 ) + { + ei = vtx; + is_vertex = true; + return true; + } + + for( int s = 0; s < obstacle.SegmentCount(); s++ ) + { + if( obstacle.CSegment( s ).Contains( p ) ) + { + ei = s; + is_vertex = false; + return true; + } + } + + return false; } -const SHAPE_LINE_CHAIN PNS_SEGMENT::Hull(int aClearance, int aWalkaroundThickness) const +bool PNS_LINE::walkScan( const SHAPE_LINE_CHAIN& line, + const SHAPE_LINE_CHAIN& obstacle, + bool reverse, + VECTOR2I& ip, + int& index_o, + int& index_l, + bool& is_vertex ) const { - int d = aClearance + 10; - int x = (int) (2.0 / (1.0 + M_SQRT2) * d) + 2; + int sc = line.SegmentCount(); - const VECTOR2I a = m_shape.CPoint(0); - const VECTOR2I b = m_shape.CPoint(1); - - VECTOR2I dir = b - a; + for( int i = 0; i < line.SegmentCount(); i++ ) + { + printf( "check-seg rev %d %d/%d %d\n", reverse, i, sc, sc - 1 - i ); + SEG tmp = line.CSegment( reverse ? sc - 1 - i : i ); + SEG s( tmp.a, tmp.b ); - VECTOR2I p0 = dir.Perpendicular().Resize(d); + if( reverse ) + { + s.a = tmp.b; + s.b = tmp.a; + } - - VECTOR2I ds = dir.Perpendicular().Resize(x / 2); - VECTOR2I pd = dir.Resize(x / 2); - VECTOR2I dp = dir.Resize(d); + if( onEdge( obstacle, s.a, index_o, is_vertex ) ) + { + index_l = (reverse ? sc - 1 - i : i); + ip = s.a; + printf( "vertex %d on-%s %d\n", index_l, + is_vertex ? "vertex" : "edge", index_o ); + return true; + } + + if( onEdge( obstacle, s.b, index_o, is_vertex ) ) + { + index_l = (reverse ? sc - 1 - i - 1 : i + 1); + ip = s.b; + printf( "vertex %d on-%s %d\n", index_l, + is_vertex ? "vertex" : "edge", index_o ); + return true; + } + + SHAPE_LINE_CHAIN::Intersections ips; + int n_is = obstacle.Intersect( s, ips ); + + if( n_is > 0 ) + { + index_o = ips[0].our.Index(); + index_l = reverse ? sc - 1 - i : i; + printf( "segment-%d intersects edge-%d\n", index_l, index_o ); + ip = ips[0].p; + return true; + } + } + + return false; +} - SHAPE_LINE_CHAIN s; - s.SetClosed( true ); +bool PNS_LINE::Walkaround( SHAPE_LINE_CHAIN obstacle, + SHAPE_LINE_CHAIN& pre, + SHAPE_LINE_CHAIN& walk, + SHAPE_LINE_CHAIN& post, + bool cw ) const +{ + const SHAPE_LINE_CHAIN& line = GetCLine(); + VECTOR2I ip_start; + int index_o_start, index_l_start; + VECTOR2I ip_end; + int index_o_end, index_l_end; - s.Append(b + p0 + pd); - s.Append(b + dp + ds); - s.Append(b + dp - ds); - s.Append(b - p0 + pd); - s.Append(a - p0 - pd); - s.Append(a - dp - ds); - s.Append(a - dp + ds); - s.Append(a + p0 - pd); - - // make sure the hull outline is always clockwise - if(s.CSegment(0).Side(a) < 0) - return s.Reverse(); - else - return s; + bool is_vertex_start, is_vertex_end; + if( line.SegmentCount() < 1 ) + return false; + + if( obstacle.PointInside( line.CPoint( 0 ) ) || + obstacle.PointInside( line.CPoint( -1 ) ) ) + return false; + +// printf("forward:\n"); + bool found = walkScan( line, + obstacle, + false, + ip_start, + index_o_start, + index_l_start, + is_vertex_start ); + // printf("reverse:\n"); + found |= walkScan( line, obstacle, true, ip_end, index_o_end, index_l_end, is_vertex_end ); + + if( !found || ip_start == ip_end ) + { + pre = line; + return true; + } + + pre = line.Slice( 0, index_l_start ); + pre.Append( ip_start ); + walk.Clear(); + walk.Append( ip_start ); + + if( cw ) + { + int is = ( index_o_start + 1 ) % obstacle.PointCount(); + int ie = ( is_vertex_end ? index_o_end : index_o_end + 1 ) % obstacle.PointCount(); + + while( 1 ) + { + printf( "is %d\n", is ); + walk.Append( obstacle.CPoint( is ) ); + + if( is == ie ) + break; + + is++; + + if( is == obstacle.PointCount() ) + is = 0; + } + } + else + { + int is = index_o_start; + int ie = ( is_vertex_end ? index_o_end : index_o_end ) % obstacle.PointCount(); + + while( 1 ) + { + printf( "is %d\n", is ); + walk.Append( obstacle.CPoint( is ) ); + + if( is == ie ) + break; + + is--; + + if( is < 0 ) + is = obstacle.PointCount() - 1; + } + } + + walk.Append( ip_end ); + + post.Clear(); + post.Append( ip_end ); + post.Append( line.Slice( is_vertex_end ? index_l_end : index_l_end + 1, -1 ) ); + + // for(int i = (index_o_start + 1) % obstacle.PointCount(); + // i != (index_o_end + 1) % obstacle.PointCount(); i=(i+1) % obstacle.PointCount()) + // { + // printf("append %d\n", i); + // walk.Append(obstacle.CPoint(i)); + // } + + return true; +} + + +void PNS_LINE::NewWalkaround( const SHAPE_LINE_CHAIN& aObstacle, + SHAPE_LINE_CHAIN& aPath, + bool aCw ) const +{ + SHAPE_LINE_CHAIN walk, post; + + NewWalkaround( aObstacle, aPath, walk, post, aCw ); + aPath.Append( walk ); + aPath.Append( post ); + aPath.Simplify(); +} + + +void PNS_LINE::Walkaround( const SHAPE_LINE_CHAIN& aObstacle, + SHAPE_LINE_CHAIN& aPath, + bool aCw ) const +{ + SHAPE_LINE_CHAIN walk, post; + + Walkaround( aObstacle, aPath, walk, post, aCw ); + aPath.Append( walk ); + aPath.Append( post ); + aPath.Simplify(); +} + + +const SHAPE_LINE_CHAIN PNS_SEGMENT::Hull( int aClearance, int aWalkaroundThickness ) const +{ + int d = aClearance + 10; + int x = (int)( 2.0 / ( 1.0 + M_SQRT2 ) * d ) + 2; + + const VECTOR2I a = m_shape.CPoint( 0 ); + const VECTOR2I b = m_shape.CPoint( 1 ); + + VECTOR2I dir = b - a; + + VECTOR2I p0 = dir.Perpendicular().Resize( d ); + + VECTOR2I ds = dir.Perpendicular().Resize( x / 2 ); + VECTOR2I pd = dir.Resize( x / 2 ); + VECTOR2I dp = dir.Resize( d ); + + SHAPE_LINE_CHAIN s; + + s.SetClosed( true ); + + s.Append( b + p0 + pd ); + s.Append( b + dp + ds ); + s.Append( b + dp - ds ); + s.Append( b - p0 + pd ); + s.Append( a - p0 - pd ); + s.Append( a - dp - ds ); + s.Append( a - dp + ds ); + s.Append( a + p0 - pd ); + + // make sure the hull outline is always clockwise + if( s.CSegment( 0 ).Side( a ) < 0 ) + return s.Reverse(); + else + return s; } bool PNS_LINE::Is45Degree() { - for(int i = 0; i < m_line.SegmentCount(); i++) - { - const SEG &s = m_line.CSegment(i); + for( int i = 0; i < m_line.SegmentCount(); i++ ) + { + const SEG& s = m_line.CSegment( i ); - double angle = 180.0 / M_PI * atan2((double)s.b.y - (double)s.a.y, (double)s.b.x - (double)s.a.x); - - if(angle < 0) - angle+=360.0; + double angle = 180.0 / M_PI * + atan2( (double) s.b.y - (double) s.a.y, + (double) s.b.x - (double) s.a.x ); - double angle_a = fabs(fmod(angle, 45.0)); - if(angle_a > 1.0 && angle_a < 44.0) - return false; - } - return true; + if( angle < 0 ) + angle += 360.0; + + double angle_a = fabs( fmod( angle, 45.0 ) ); + + if( angle_a > 1.0 && angle_a < 44.0 ) + return false; + } + + return true; } -const PNS_LINE PNS_LINE::ClipToNearestObstacle( PNS_NODE *aNode ) const + +const PNS_LINE PNS_LINE::ClipToNearestObstacle( PNS_NODE* aNode ) const { - PNS_LINE l (*this); + PNS_LINE l( *this ); - PNS_NODE::OptObstacle obs = aNode->NearestObstacle ( &l ); + PNS_NODE::OptObstacle obs = aNode->NearestObstacle( &l ); - if(obs) - { - l.RemoveVia(); - int p = l.GetLine().Split(obs -> ip_first); - l.GetLine().Remove(p + 1, -1); - } + if( obs ) + { + l.RemoveVia(); + int p = l.GetLine().Split( obs->ip_first ); + l.GetLine().Remove( p + 1, -1 ); + } - return l; + return l; } + void PNS_LINE::ShowLinks() { - if(!m_segmentRefs) - { - printf("line %p: no links\n", this); - return; - } - printf("line %p: %d linked segs\n", this, m_segmentRefs->size()); - for (int i= 0; i<(int)m_segmentRefs->size(); i++) printf("seg %d: %p\n", i, (*m_segmentRefs)[i]) ; + if( !m_segmentRefs ) + { + printf( "line %p: no links\n", this ); + return; + } + + printf( "line %p: %d linked segs\n", this, m_segmentRefs->size() ); + + for( int i = 0; i < (int) m_segmentRefs->size(); i++ ) + printf( "seg %d: %p\n", i, (*m_segmentRefs)[i] ); } + diff --git a/pcbnew/router/pns_line.h b/pcbnew/router/pns_line.h index cd47005606..1fb341572c 100644 --- a/pcbnew/router/pns_line.h +++ b/pcbnew/router/pns_line.h @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -38,214 +38,227 @@ class PNS_VIA; /** * Class PNS_LINE * - * Represents a track on a PCB, connecting two non-trivial joints (that is, vias, pads, - * junctions between multiple traces or two traces different widths and combinations of these). - * PNS_LINEs are NOT stored in the model (PNS_NODE) - instead, they are assembled on-the-fly, based on - * a via/pad/segment that belongs/begins them. + * Represents a track on a PCB, connecting two non-trivial joints (that is, + * vias, pads, junctions between multiple traces or two traces different widths + * and combinations of these). PNS_LINEs are NOT stored in the model (PNS_NODE). + * Instead, they are assembled on-the-fly, based on a via/pad/segment that + * belongs/begins them. * - * PNS_LINEs can be either loose (consisting of segments that do not belong to any PNS_NODE) or owned (with segments - * taken from a PNS_NODE) - these are returned by PNS_NODE::AssembleLine and friends. - * - * A PNS_LINE may have a PNS_VIA attached at its and - this is used by via dragging/force propagation stuff. + * PNS_LINEs can be either loose (consisting of segments that do not belong to + * any PNS_NODE) or owned (with segments taken from a PNS_NODE) - these are + * returned by PNS_NODE::AssembleLine and friends. + * + * A PNS_LINE may have a PNS_VIA attached at its and - this is used by via + * dragging/force propagation stuff. */ -class PNS_LINE : public PNS_ITEM +class PNS_LINE : public PNS_ITEM { public: - typedef std::vector LinkedSegments; + typedef std::vector LinkedSegments; - PNS_LINE (): - PNS_ITEM(LINE) - { - m_segmentRefs = NULL; - m_hasVia = false; - m_affectedRangeStart = -1; - }; + PNS_LINE() : + PNS_ITEM( LINE ) + { + m_segmentRefs = NULL; + m_hasVia = false; + m_affectedRangeStart = -1; + }; - PNS_LINE (int aLayer, int aWidth, const SHAPE_LINE_CHAIN& aLine) : - PNS_ITEM(LINE) - { - m_line = aLine; - m_width = aWidth; - m_segmentRefs = NULL; - m_hasVia = false; - m_affectedRangeStart = -1; - SetLayer(aLayer); + PNS_LINE( int aLayer, int aWidth, const SHAPE_LINE_CHAIN& aLine ) : + PNS_ITEM( LINE ) + { + m_line = aLine; + m_width = aWidth; + m_segmentRefs = NULL; + m_hasVia = false; + m_affectedRangeStart = -1; + SetLayer( aLayer ); + } - } + PNS_LINE( const PNS_LINE& aOther ) : + PNS_ITEM( aOther ), + m_line( aOther.m_line ), + m_width( aOther.m_width ) + { + m_net = aOther.m_net; + m_movable = aOther.m_movable; + m_world = aOther.m_world; + m_layers = aOther.m_layers; + m_segmentRefs = NULL; + m_via = aOther.m_via; + m_hasVia = aOther.m_hasVia; + m_affectedRangeStart = -1; + } - PNS_LINE(const PNS_LINE& aOther) : - PNS_ITEM(aOther), - m_line(aOther.m_line), - m_width(aOther.m_width) - { - m_net = aOther.m_net; - m_movable = aOther.m_movable; - m_world = aOther.m_world; - m_layers = aOther.m_layers; - m_segmentRefs = NULL; - m_via = aOther.m_via; - m_hasVia = aOther.m_hasVia; - m_affectedRangeStart = -1; - } + /** + * Constructor + * copies properties (net, layers from a base line), and replaces the shape + * by aLine + **/ + PNS_LINE( const PNS_LINE& aBase, const SHAPE_LINE_CHAIN& aLine ) : + PNS_ITEM( aBase ), + m_line( aLine ), + m_width( aBase.m_width ) + { + m_net = aBase.m_net; + m_layers = aBase.m_layers; + m_segmentRefs = NULL; + m_hasVia = false; + m_affectedRangeStart = -1; + } - /** - * Constructor - * copies properties (net, layers from a base line), and replaces the shape - * by aLine - **/ - PNS_LINE(const PNS_LINE& aBase, const SHAPE_LINE_CHAIN& aLine) : - PNS_ITEM(aBase), - m_line(aLine), - m_width(aBase.m_width) - { - m_net = aBase.m_net; - m_layers = aBase.m_layers; - m_segmentRefs = NULL; - m_hasVia = false; - m_affectedRangeStart = -1; - } + ~PNS_LINE() + { + if( m_segmentRefs ) + delete m_segmentRefs; + }; - ~PNS_LINE () - { - if(m_segmentRefs) - delete m_segmentRefs; - }; - - virtual PNS_LINE *Clone() const ; - - ///> clones the line without cloning the shape (just the properties - net, width, layers, etc.) - PNS_LINE *CloneProperties() const ; - - int GetLayer() const { return GetLayers().Start(); } + virtual PNS_LINE* Clone() const; - ///> Geometry accessors - void SetShape(const SHAPE_LINE_CHAIN& aLine) { m_line = aLine; } - const SHAPE* GetShape() const { return &m_line; } - SHAPE_LINE_CHAIN& GetLine() { return m_line; } - const SHAPE_LINE_CHAIN& GetCLine() const { return m_line; } + ///> clones the line without cloning the shape + ///> (just the properties - net, width, layers, etc.) + PNS_LINE* CloneProperties() const; - ///> Width accessors - void SetWidth( int aWidth ) { m_width = aWidth; } - int GetWidth () const { return m_width; } + int GetLayer() const { return GetLayers().Start(); } - ///> Links a segment from a PNS_NODE to this line, making it owned by the node - void LinkSegment(PNS_SEGMENT *aSeg) - { - if(!m_segmentRefs) - m_segmentRefs = new std::vector (); - m_segmentRefs->push_back(aSeg); - } + ///> Geometry accessors + void SetShape( const SHAPE_LINE_CHAIN& aLine ) { m_line = aLine; } + const SHAPE* GetShape() const { return &m_line; } + SHAPE_LINE_CHAIN& GetLine() { return m_line; } + const SHAPE_LINE_CHAIN& GetCLine() const { return m_line; } - ///> Returns a list of segments from the owning node that constitute this line (or NULL if - ///> the line is loose) - LinkedSegments* GetLinkedSegments() - { - return m_segmentRefs; - } + ///> Width accessors + void SetWidth( int aWidth ) { m_width = aWidth; } + int GetWidth() const { return m_width; } - bool ContainsSegment (PNS_SEGMENT *aSeg) const - { - if (!m_segmentRefs) - return false; + ///> Links a segment from a PNS_NODE to this line, making it owned by the node + void LinkSegment( PNS_SEGMENT* aSeg ) + { + if( !m_segmentRefs ) + m_segmentRefs = new std::vector (); - return std::find( m_segmentRefs->begin(), m_segmentRefs->end(), aSeg) != m_segmentRefs->end(); - } + m_segmentRefs->push_back( aSeg ); + } - ///> Returns this line, but clipped to the nearest obstacle along, to avoid collision. - const PNS_LINE ClipToNearestObstacle( PNS_NODE *aNode ) const; - - ///> DEPRECATED optimization functions (moved to PNS_OPTIMIZER) - bool MergeObtuseSegments(); - bool MergeSegments(); - - ///> Returns the number of corners of angles specified by mask aAngles. - int CountCorners(int aAngles); + ///> Returns a list of segments from the owning node that constitute this + ///> line (or NULL if the line is loose) + LinkedSegments* GetLinkedSegments() + { + return m_segmentRefs; + } + + bool ContainsSegment( PNS_SEGMENT* aSeg ) const + { + if( !m_segmentRefs ) + return false; + + return std::find( m_segmentRefs->begin(), m_segmentRefs->end(), + aSeg ) != m_segmentRefs->end(); + } + + ///> Returns this line, but clipped to the nearest obstacle + ///> along, to avoid collision. + const PNS_LINE ClipToNearestObstacle( PNS_NODE* aNode ) const; + + ///> DEPRECATED optimization functions (moved to PNS_OPTIMIZER) + bool MergeObtuseSegments(); + bool MergeSegments(); + + ///> Returns the number of corners of angles specified by mask aAngles. + int CountCorners( int aAngles ); + + ///> Calculates a line thightly wrapping a convex hull + ///> of an obstacle object (aObstacle). + ///> aPrePath = path from origin to the obstacle + ///> aWalkaroundPath = path around the obstacle + ///> aPostPath = past from obstacle till the end + ///> aCW = whether to walkaround in clockwise or counter-clockwise direction. + void NewWalkaround( const SHAPE_LINE_CHAIN& aObstacle, + SHAPE_LINE_CHAIN& aPrePath, + SHAPE_LINE_CHAIN& aWalkaroundPath, + SHAPE_LINE_CHAIN& aPostPath, + bool aCw ) const; + + void NewWalkaround( const SHAPE_LINE_CHAIN& aObstacle, + SHAPE_LINE_CHAIN& aPath, + bool aCw ) const; - ///> Calculates a line thightly wrapping a convex hull of an obstacle object (aObstacle). - ///> aPrePath = path from origin to the obstacle - ///> aWalkaroundPath = path around the obstacle - ///> aPostPath = past from obstacle till the end - ///> aCW = whether to walkaround in clockwise or counter-clockwise direction. - void NewWalkaround( const SHAPE_LINE_CHAIN& aObstacle, - SHAPE_LINE_CHAIN& aPrePath, - SHAPE_LINE_CHAIN& aWalkaroundPath, - SHAPE_LINE_CHAIN& aPostPath, - bool aCw ) const; + bool Walkaround( SHAPE_LINE_CHAIN obstacle, + SHAPE_LINE_CHAIN& pre, + SHAPE_LINE_CHAIN& walk, + SHAPE_LINE_CHAIN& post, + bool cw ) const; - void NewWalkaround( const SHAPE_LINE_CHAIN& aObstacle, - SHAPE_LINE_CHAIN& aPath, - bool aCw ) const; - - - bool Walkaround(SHAPE_LINE_CHAIN obstacle, SHAPE_LINE_CHAIN &pre, SHAPE_LINE_CHAIN &walk, SHAPE_LINE_CHAIN &post, bool cw) const; + void Walkaround( const SHAPE_LINE_CHAIN& aObstacle, + SHAPE_LINE_CHAIN& aPath, + bool aCw ) const; - void Walkaround( const SHAPE_LINE_CHAIN& aObstacle, - SHAPE_LINE_CHAIN& aPath, - bool aCw ) const; - + bool Is45Degree(); - bool Is45Degree(); + ///> Prints out all linked segments + void ShowLinks(); - ///> Prints out all linked segments - void ShowLinks(); + bool EndsWithVia() const { return m_hasVia; } - bool EndsWithVia() const { return m_hasVia; } - - void AppendVia ( const PNS_VIA &aVia ) { - m_hasVia = true; - m_via = aVia; - m_via.SetNet ( m_net ) ; - } + void AppendVia( const PNS_VIA& aVia ) + { + m_hasVia = true; + m_via = aVia; + m_via.SetNet( m_net ); + } - void RemoveVia() { m_hasVia = false; } - const PNS_VIA& GetVia() const { return m_via; } + void RemoveVia() { m_hasVia = false; } + const PNS_VIA& GetVia() const { return m_via; } - void SetAffectedRange ( int aStart, int aEnd ) - { - m_affectedRangeStart = aStart; - m_affectedRangeEnd = aEnd; - } + void SetAffectedRange( int aStart, int aEnd ) + { + m_affectedRangeStart = aStart; + m_affectedRangeEnd = aEnd; + } - void ClearAffectedRange ( ) - { - m_affectedRangeStart = -1; - } + void ClearAffectedRange() + { + m_affectedRangeStart = -1; + } - bool GetAffectedRange ( int& aStart, int& aEnd ) - { - if(m_affectedRangeStart >= 0) - { - aStart = m_affectedRangeStart; - aEnd = m_affectedRangeEnd; - return true; - } else { - aStart = 0; - aEnd = m_line.PointCount(); - return false; - } - } + bool GetAffectedRange( int& aStart, int& aEnd ) + { + if( m_affectedRangeStart >= 0 ) + { + aStart = m_affectedRangeStart; + aEnd = m_affectedRangeEnd; + return true; + } + else + { + aStart = 0; + aEnd = m_line.PointCount(); + return false; + } + } private: - bool onEdge(const SHAPE_LINE_CHAIN &obstacle, VECTOR2I p, int& ei, bool& is_vertex) const; - bool walkScan(const SHAPE_LINE_CHAIN &line, const SHAPE_LINE_CHAIN &obstacle, bool reverse, VECTOR2I &ip, int& index_o, int& index_l, bool& is_vertex) const; - - ///> List of semgments in a PNS_NODE (PNS_ITEM::m_owner) that constitute this line. - LinkedSegments* m_segmentRefs; - - ///> Shape of the line - SHAPE_LINE_CHAIN m_line; - - int m_width; - ///> Via at the end and a flag indicating if it's enabled. - PNS_VIA m_via; - bool m_hasVia; + bool onEdge( const SHAPE_LINE_CHAIN& obstacle, VECTOR2I p, int& ei, bool& is_vertex ) const; + bool walkScan( const SHAPE_LINE_CHAIN& line, const SHAPE_LINE_CHAIN& obstacle, + bool reverse, VECTOR2I& ip, int& index_o, int& index_l, bool& is_vertex ) const; - int m_affectedRangeStart; - int m_affectedRangeEnd; + ///> List of semgments in a PNS_NODE (PNS_ITEM::m_owner) that constitute this line. + LinkedSegments* m_segmentRefs; + + ///> Shape of the line + SHAPE_LINE_CHAIN m_line; + + int m_width; + + ///> Via at the end and a flag indicating if it's enabled. + PNS_VIA m_via; + bool m_hasVia; + + int m_affectedRangeStart; + int m_affectedRangeEnd; }; - -#endif // __PNS_LINE_H +#endif // __PNS_LINE_H diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp index 1057dc9062..00e5655a4f 100644 --- a/pcbnew/router/pns_line_placer.cpp +++ b/pcbnew/router/pns_line_placer.cpp @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -33,683 +33,648 @@ using namespace std; using boost::optional; -PNS_LINE_PLACER::PNS_LINE_PLACER( PNS_NODE *aWorld ) +PNS_LINE_PLACER::PNS_LINE_PLACER( PNS_NODE* aWorld ) { - m_initial_direction = DIRECTION_45(DIRECTION_45::N); - m_follow_mouse = false; - m_smoothing_step = 100000; - m_smooth_mouse = false; - m_iteration = 0; - m_world = aWorld; - m_mode = RM_Smart; - m_follow_mouse = true; - m_shove = NULL; + m_initial_direction = DIRECTION_45( DIRECTION_45::N ); + m_follow_mouse = false; + m_smoothing_step = 100000; + m_smooth_mouse = false; + m_iteration = 0; + m_world = aWorld; + m_mode = RM_Smart; + m_follow_mouse = true; + m_shove = NULL; }; -PNS_LINE_PLACER::~PNS_LINE_PLACER() + +PNS_LINE_PLACER::~PNS_LINE_PLACER() { - if(m_shove) - delete m_shove; -} - -void PNS_LINE_PLACER::ApplySettings ( const PNS_ROUTING_SETTINGS& aSettings ) -{ - m_follow_mouse = aSettings.m_followMouse; - m_mode = aSettings.m_routingMode; - m_walkaroundIterationLimit = aSettings.m_walkaroundIterationLimit; - m_smartPads = aSettings.m_smartPads; -} - -void PNS_LINE_PLACER::StartPlacement(const VECTOR2I& aStart, int aNet, int aWidth, int aLayer ) -{ - m_direction = m_initial_direction; - TRACE(1, "world %p, intitial-direction %s layer %d\n", m_world % m_direction.Format().c_str() % aLayer); - m_head.SetNet(aNet); - m_tail.SetNet(aNet); - m_head.SetWidth(aWidth); - m_tail.SetWidth(aWidth); - m_head.GetLine().Clear(); - m_tail.GetLine().Clear(); - m_head.SetLayer(aLayer); - m_tail.SetLayer(aLayer); - m_iteration = 0; - m_p_start = aStart; - m_currentNode = m_world->Branch(); - m_head.SetWorld(m_currentNode); - m_tail.SetWorld(m_currentNode); - //if(m_shove) - // delete m_shove; - m_shove = new PNS_SHOVE(m_currentNode); - m_placingVia = false; -} - -void PNS_LINE_PLACER::SetInitialDirection(const DIRECTION_45& aDirection) -{ - m_initial_direction = aDirection; - - if(m_tail.GetCLine().SegmentCount() == 0) - m_direction = aDirection; -} - -/** - * Function handleSelfIntersections() - * - * Checks if the head of the track intersects its tail. If so, cuts the tail up to the - * intersecting segment and fixes the head direction to match the last segment before the cut. - * @return true if the line has been changed. - */ -bool PNS_LINE_PLACER::handleSelfIntersections() -{ - SHAPE_LINE_CHAIN::Intersections ips; - SHAPE_LINE_CHAIN& head = m_head.GetLine(); - SHAPE_LINE_CHAIN& tail = m_tail.GetLine(); - - // if there is no tail, there is nothing to intersect with - if(tail.PointCount() < 2) - return false; - - tail.Intersect(head, ips); - - // no intesection points - nothing to reduce - if (ips.empty()) - return false; - - int n = INT_MAX; - VECTOR2I ipoint; - - // if there is more than one intersection, find the one that is - // closest to the beginning of the tail. - BOOST_FOREACH(SHAPE_LINE_CHAIN::Intersection i, ips) - { - if (i.our.Index() < n) - { - n = i.our.Index(); - ipoint = i.p; - } - } - - // ignore the point where head and tail meet - if(ipoint == head.CPoint(0) || ipoint == tail.CPoint(-1)) - return false; - - // Intersection point is on the first or the second segment: just start routing - // from the beginning - if (n < 2) - { - m_p_start = tail.Point(0); - m_direction = m_initial_direction; - tail.Clear(); - head.Clear(); - return true; - } else { - // Clip till the last tail segment before intersection. - // Set the direction to the one of this segment. - const SEG last = tail.CSegment(n - 1); - m_p_start = last.a; - m_direction = DIRECTION_45(last); - tail.Remove(n, -1); - return true; - } - return false; -} - -/** - * Function handlePullback() - * - * Deals with pull-back: reduces the tail if head trace is moved backwards wrs - * to the current tail direction. - * @return true if the line has been changed. - */ -bool PNS_LINE_PLACER::handlePullback() -{ - SHAPE_LINE_CHAIN& head = m_head.GetLine(); - SHAPE_LINE_CHAIN& tail = m_tail.GetLine(); - - int n = tail.PointCount(); - - if(n == 0) - return false; - else if (n == 1) - { - m_p_start = tail.CPoint(0); - tail.Clear(); - return true; - } - - DIRECTION_45 first_head (head.Segment(0)); - DIRECTION_45 last_tail (tail.Segment(-1)); - DIRECTION_45::AngleType angle = first_head.Angle(last_tail); - - // case 1: we have a defined routing direction, and the currently computed head - // goes in different one. - bool pullback_1 = false;//(m_direction != DIRECTION_45::UNDEFINED && m_direction != first_head); - - // case 2: regardless of the current routing direction, if the tail/head extremities form - // an acute or right angle, reduce the tail by one segment (and hope that further iterations) - // will result with a cleaner trace - bool pullback_2 = (angle == DIRECTION_45::ANG_RIGHT || angle == DIRECTION_45::ANG_ACUTE); - - if(pullback_1 || pullback_2) - { - - const SEG last = tail.CSegment(-1); - m_direction = DIRECTION_45(last); - m_p_start = last.a; - - - TRACE(0, "Placer: pullback triggered [%d] [%s %s]", n % last_tail.Format().c_str() % first_head.Format().c_str()); - // erase the last point in the tail, hoping that the next iteration will result with a head - // trace that starts with a segment following our current direction. - if(n < 2) - tail.Clear(); // don't leave a single-point tail - else - tail.Remove(-1, -1); - - if( !tail.SegmentCount() ) - m_direction = m_initial_direction; - - return true; - } - - return false; -} - -/** - * Function reduceTail() - * - * Attempts to reduce the numer of segments in the tail by trying to replace a certain number - * of latest tail segments with a direct trace leading to aEnd that does not collide with anything. - * @param aEnd: current routing destination point. - * @return true if the line has been changed. - */ -bool PNS_LINE_PLACER::reduceTail(const VECTOR2I& aEnd) -{ - SHAPE_LINE_CHAIN& head = m_head.GetLine(); - SHAPE_LINE_CHAIN& tail = m_tail.GetLine(); - - int n = tail.SegmentCount(); - - // Don't attempt this for too short tails - if (n < 2) - return false; - - // Start from the segment farthest from the end of the tail - //int start_index = std::max(n - 1 - ReductionDepth, 0); - - DIRECTION_45 new_direction; - VECTOR2I new_start; - int reduce_index = -1; - - DIRECTION_45 head_dir ( head.Segment(0) ); - - for(int i = tail.SegmentCount() - 1; i >= 0; i--) - { - const SEG s = tail.CSegment(i); - DIRECTION_45 dir (s); - - // calculate a replacement route and check if it matches the direction of the segment to be replaced - SHAPE_LINE_CHAIN replacement = dir.BuildInitialTrace(s.a, aEnd); - - PNS_LINE tmp (m_tail, replacement); - - if (m_currentNode->CheckColliding(&tmp, PNS_ITEM::ANY)) - break; - - if(DIRECTION_45(replacement.Segment(0)) == dir) - { - new_start = s.a; - new_direction = dir; - reduce_index = i; - } - } - - if(reduce_index >= 0) - { - - TRACE(0, "Placer: reducing tail: %d", reduce_index); - SHAPE_LINE_CHAIN reducedLine = new_direction.BuildInitialTrace(new_start, aEnd); - - m_p_start = new_start; - m_direction = new_direction; - tail.Remove(reduce_index+1, -1); - head.Clear(); - return true; - } - - if( !tail.SegmentCount() ) - m_direction = m_initial_direction; - - return false; + if( m_shove ) + delete m_shove; } -/** - * Function checkObtusity() - * - * Helper that checks if segments a and b form an obtuse angle (in 45-degree regime). - * @return true, if angle (a, b) is obtuse - */ -bool PNS_LINE_PLACER::checkObtusity(const SEG& a, const SEG& b) const +void PNS_LINE_PLACER::ApplySettings( const PNS_ROUTING_SETTINGS& aSettings ) { - const DIRECTION_45 dir_a(a); - const DIRECTION_45 dir_b(b); - return dir_a.IsObtuse(dir_b) || dir_a == dir_b; + m_follow_mouse = aSettings.m_followMouse; + m_mode = aSettings.m_routingMode; + m_walkaroundIterationLimit = aSettings.m_walkaroundIterationLimit; + m_smartPads = aSettings.m_smartPads; +} + + +void PNS_LINE_PLACER::StartPlacement( const VECTOR2I& aStart, int aNet, + int aWidth, int aLayer ) +{ + m_direction = m_initial_direction; + TRACE( 1, "world %p, intitial-direction %s layer %d\n", + m_world % m_direction.Format().c_str() % aLayer ); + m_head.SetNet( aNet ); + m_tail.SetNet( aNet ); + m_head.SetWidth( aWidth ); + m_tail.SetWidth( aWidth ); + m_head.GetLine().Clear(); + m_tail.GetLine().Clear(); + m_head.SetLayer( aLayer ); + m_tail.SetLayer( aLayer ); + m_iteration = 0; + m_p_start = aStart; + m_currentNode = m_world->Branch(); + m_head.SetWorld( m_currentNode ); + m_tail.SetWorld( m_currentNode ); + // if(m_shove) + // delete m_shove; + m_shove = new PNS_SHOVE( m_currentNode ); + m_placingVia = false; +} + + +void PNS_LINE_PLACER::SetInitialDirection( const DIRECTION_45& aDirection ) +{ + m_initial_direction = aDirection; + + if( m_tail.GetCLine().SegmentCount() == 0 ) + m_direction = aDirection; +} + + +bool PNS_LINE_PLACER::handleSelfIntersections() +{ + SHAPE_LINE_CHAIN::Intersections ips; + SHAPE_LINE_CHAIN& head = m_head.GetLine(); + SHAPE_LINE_CHAIN& tail = m_tail.GetLine(); + + // if there is no tail, there is nothing to intersect with + if( tail.PointCount() < 2 ) + return false; + + tail.Intersect( head, ips ); + + // no intesection points - nothing to reduce + if( ips.empty() ) + return false; + + int n = INT_MAX; + VECTOR2I ipoint; + + // if there is more than one intersection, find the one that is + // closest to the beginning of the tail. + BOOST_FOREACH( SHAPE_LINE_CHAIN::Intersection i, ips ) + { + if( i.our.Index() < n ) + { + n = i.our.Index(); + ipoint = i.p; + } + } + + // ignore the point where head and tail meet + if( ipoint == head.CPoint( 0 ) || ipoint == tail.CPoint( -1 ) ) + return false; + + // Intersection point is on the first or the second segment: just start routing + // from the beginning + if( n < 2 ) + { + m_p_start = tail.Point( 0 ); + m_direction = m_initial_direction; + tail.Clear(); + head.Clear(); + return true; + } + else + { + // Clip till the last tail segment before intersection. + // Set the direction to the one of this segment. + const SEG last = tail.CSegment( n - 1 ); + m_p_start = last.a; + m_direction = DIRECTION_45( last ); + tail.Remove( n, -1 ); + return true; + } + + return false; +} + + +bool PNS_LINE_PLACER::handlePullback() +{ + SHAPE_LINE_CHAIN& head = m_head.GetLine(); + SHAPE_LINE_CHAIN& tail = m_tail.GetLine(); + + int n = tail.PointCount(); + + if( n == 0 ) + return false; + else if( n == 1 ) + { + m_p_start = tail.CPoint( 0 ); + tail.Clear(); + return true; + } + + DIRECTION_45 first_head( head.Segment( 0 ) ); + DIRECTION_45 last_tail( tail.Segment( -1 ) ); + DIRECTION_45::AngleType angle = first_head.Angle( last_tail ); + + // case 1: we have a defined routing direction, and the currently computed + // head goes in different one. + bool pullback_1 = false; // (m_direction != DIRECTION_45::UNDEFINED && m_direction != first_head); + + // case 2: regardless of the current routing direction, if the tail/head + // extremities form an acute or right angle, reduce the tail by one segment + // (and hope that further iterations) will result with a cleaner trace + bool pullback_2 = (angle == DIRECTION_45::ANG_RIGHT || + angle == DIRECTION_45::ANG_ACUTE); + + if( pullback_1 || pullback_2 ) + { + const SEG last = tail.CSegment( -1 ); + m_direction = DIRECTION_45( last ); + m_p_start = last.a; + + TRACE( 0, "Placer: pullback triggered [%d] [%s %s]", + n % last_tail.Format().c_str() % first_head.Format().c_str() ); + + // erase the last point in the tail, hoping that the next iteration will + // result with a head trace that starts with a segment following our + // current direction. + if( n < 2 ) + tail.Clear(); // don't leave a single-point tail + else + tail.Remove( -1, -1 ); + + if( !tail.SegmentCount() ) + m_direction = m_initial_direction; + + return true; + } + + return false; +} + + +bool PNS_LINE_PLACER::reduceTail( const VECTOR2I& aEnd ) +{ + SHAPE_LINE_CHAIN& head = m_head.GetLine(); + SHAPE_LINE_CHAIN& tail = m_tail.GetLine(); + + int n = tail.SegmentCount(); + + // Don't attempt this for too short tails + if( n < 2 ) + return false; + + // Start from the segment farthest from the end of the tail + // int start_index = std::max(n - 1 - ReductionDepth, 0); + + DIRECTION_45 new_direction; + VECTOR2I new_start; + int reduce_index = -1; + + DIRECTION_45 head_dir( head.Segment( 0 ) ); + + for( int i = tail.SegmentCount() - 1; i >= 0; i-- ) + { + const SEG s = tail.CSegment( i ); + DIRECTION_45 dir( s ); + + // calculate a replacement route and check if it matches + // the direction of the segment to be replaced + SHAPE_LINE_CHAIN replacement = dir.BuildInitialTrace( s.a, aEnd ); + + PNS_LINE tmp( m_tail, replacement ); + + if( m_currentNode->CheckColliding( &tmp, PNS_ITEM::ANY ) ) + break; + + if( DIRECTION_45( replacement.Segment( 0 ) ) == dir ) + { + new_start = s.a; + new_direction = dir; + reduce_index = i; + } + } + + if( reduce_index >= 0 ) + { + TRACE( 0, "Placer: reducing tail: %d", reduce_index ); + SHAPE_LINE_CHAIN reducedLine = new_direction.BuildInitialTrace( new_start, aEnd ); + + m_p_start = new_start; + m_direction = new_direction; + tail.Remove( reduce_index + 1, -1 ); + head.Clear(); + return true; + } + + if( !tail.SegmentCount() ) + m_direction = m_initial_direction; + + return false; +} + + +bool PNS_LINE_PLACER::checkObtusity( const SEG& a, const SEG& b ) const +{ + const DIRECTION_45 dir_a( a ); + const DIRECTION_45 dir_b( b ); + + return dir_a.IsObtuse( dir_b ) || dir_a == dir_b; } -/** - * Function mergeHead() - * - * Moves "estabished" segments from the head to the tail if certain conditions are met. - * @return true, if the line has been changed. - */ bool PNS_LINE_PLACER::mergeHead() { - SHAPE_LINE_CHAIN& head = m_head.GetLine(); - SHAPE_LINE_CHAIN& tail = m_tail.GetLine(); + SHAPE_LINE_CHAIN& head = m_head.GetLine(); + SHAPE_LINE_CHAIN& tail = m_tail.GetLine(); - const int ForbiddenAngles = DIRECTION_45::ANG_ACUTE | DIRECTION_45::ANG_HALF_FULL | DIRECTION_45::ANG_UNDEFINED; + const int ForbiddenAngles = DIRECTION_45::ANG_ACUTE | + DIRECTION_45::ANG_HALF_FULL | + DIRECTION_45::ANG_UNDEFINED; - head.Simplify(); - tail.Simplify(); + head.Simplify(); + tail.Simplify(); - int n_head = head.SegmentCount(); - int n_tail = tail.SegmentCount(); + int n_head = head.SegmentCount(); + int n_tail = tail.SegmentCount(); - if( n_head < 3 ) - { - TRACEn(4, "Merge failed: not enough head segs."); - return false; - } + if( n_head < 3 ) + { + TRACEn( 4, "Merge failed: not enough head segs." ); + return false; + } - if (n_tail && head.CPoint(0) != tail.CPoint(-1)) - { - TRACEn(4, "Merge failed: head and tail discontinuous."); - return false; - } + if( n_tail && head.CPoint( 0 ) != tail.CPoint( -1 ) ) + { + TRACEn( 4, "Merge failed: head and tail discontinuous." ); + return false; + } - if( m_head.CountCorners(ForbiddenAngles) != 0 ) - return false; + if( m_head.CountCorners( ForbiddenAngles ) != 0 ) + return false; - DIRECTION_45 dir_tail, dir_head; + DIRECTION_45 dir_tail, dir_head; - dir_head = DIRECTION_45(head.CSegment(0)); + dir_head = DIRECTION_45( head.CSegment( 0 ) ); - if(n_tail) - { - dir_tail = DIRECTION_45(tail.CSegment(-1)); - if(dir_head.Angle(dir_tail) & ForbiddenAngles) - return false; - } + if( n_tail ) + { + dir_tail = DIRECTION_45( tail.CSegment( -1 ) ); - if(!n_tail) - tail.Append(head.CSegment(0).a); + if( dir_head.Angle( dir_tail ) & ForbiddenAngles ) + return false; + } - for (int i = 0; i < n_head - 2; i++) - { - tail.Append(head.CSegment(i).b); - } + if( !n_tail ) + tail.Append( head.CSegment( 0 ).a ); - tail.Simplify(); + for( int i = 0; i < n_head - 2; i++ ) + { + tail.Append( head.CSegment( i ).b ); + } - SEG last = tail.CSegment(-1); - - m_p_start = last.b; - m_direction = DIRECTION_45(last).Right(); + tail.Simplify(); + SEG last = tail.CSegment( -1 ); - head.Remove(0, n_head - 2); + m_p_start = last.b; + m_direction = DIRECTION_45( last ).Right(); - TRACE(0, "Placer: merge %d, new direction: %s", n_head % m_direction.Format().c_str()); - + head.Remove( 0, n_head - 2 ); - head.Simplify(); - tail.Simplify(); + TRACE( 0, "Placer: merge %d, new direction: %s", n_head % m_direction.Format().c_str() ); - return true; + head.Simplify(); + tail.Simplify(); + + return true; } -bool PNS_LINE_PLACER::handleViaPlacement ( PNS_LINE& aHead ) + +bool PNS_LINE_PLACER::handleViaPlacement( PNS_LINE& aHead ) { - if(!m_placingVia) - return true; + if( !m_placingVia ) + return true; - PNS_LAYERSET allLayers (0, 15); - PNS_VIA v (aHead.GetCLine().CPoint(-1), allLayers, m_viaDiameter, aHead.GetNet()); - v.SetDrill(m_viaDrill); + PNS_LAYERSET allLayers( 0, 15 ); + PNS_VIA v( aHead.GetCLine().CPoint( -1 ), allLayers, m_viaDiameter, aHead.GetNet() ); + v.SetDrill( m_viaDrill ); - VECTOR2I force; - VECTOR2I lead = aHead.GetCLine().CPoint(-1) - aHead.GetCLine().CPoint(0); + VECTOR2I force; + VECTOR2I lead = aHead.GetCLine().CPoint( -1 ) - aHead.GetCLine().CPoint( 0 ); - - if( v.PushoutForce ( m_shove->GetCurrentNode(), lead, force, true, 20 ) ) - { - SHAPE_LINE_CHAIN line = m_direction.BuildInitialTrace(aHead.GetCLine().CPoint(0), aHead.GetCLine().CPoint(-1) + force); - aHead = PNS_LINE(aHead, line); + if( v.PushoutForce( m_shove->GetCurrentNode(), lead, force, true, 20 ) ) + { + SHAPE_LINE_CHAIN line = m_direction.BuildInitialTrace( + aHead.GetCLine().CPoint( 0 ), + aHead.GetCLine().CPoint( -1 ) + force ); + aHead = PNS_LINE( aHead, line ); - v.SetPos(v.GetPos() + force); - return true; - } - - return false; + v.SetPos( v.GetPos() + force ); + return true; + } + + return false; } -/** - * Function routeHead() - * - * Computes the head trace between the current start point (m_p_start) and point aP, - * starting with direction defined in m_direction. The trace walks around all - * colliding solid or non-movable items. Movable segments are ignored, as they'll be handled - * later by the shove algorithm. - */ -bool PNS_LINE_PLACER::routeHead(const VECTOR2I& aP, PNS_LINE& aNewHead, bool aCwWalkaround) + +bool PNS_LINE_PLACER::routeHead( const VECTOR2I& aP, PNS_LINE& aNewHead, + bool aCwWalkaround ) { - // STAGE 1: route a simple two-segment trace between m_p_start and aP... - SHAPE_LINE_CHAIN line = m_direction.BuildInitialTrace(m_p_start, aP); + // STAGE 1: route a simple two-segment trace between m_p_start and aP... + SHAPE_LINE_CHAIN line = m_direction.BuildInitialTrace( m_p_start, aP ); - PNS_LINE initTrack (m_head, line); - PNS_LINE walkFull, walkSolids; + PNS_LINE initTrack( m_head, line ); + PNS_LINE walkFull, walkSolids; + if( m_mode == RM_Ignore ) + { + aNewHead = initTrack; + return true; + } - if(m_mode == RM_Ignore) - { - aNewHead = initTrack; - return true; - } - handleViaPlacement(initTrack); + handleViaPlacement( initTrack ); - m_currentNode = m_shove->GetCurrentNode(); + m_currentNode = m_shove->GetCurrentNode(); - PNS_OPTIMIZER optimizer(m_currentNode); - PNS_WALKAROUND walkaround( m_currentNode ); + PNS_OPTIMIZER optimizer( m_currentNode ); + PNS_WALKAROUND walkaround( m_currentNode ); - walkaround.SetSolidsOnly(false); - walkaround.SetIterationLimit(m_mode == RM_Walkaround ? 8 : 5 ); - //walkaround.SetApproachCursor(true, aP); - - PNS_WALKAROUND::WalkaroundStatus wf = walkaround.Route(initTrack, walkFull); + walkaround.SetSolidsOnly( false ); + walkaround.SetIterationLimit( m_mode == RM_Walkaround ? 8 : 5 ); + // walkaround.SetApproachCursor(true, aP); + + PNS_WALKAROUND::WalkaroundStatus wf = walkaround.Route( initTrack, walkFull ); #if 0 - - if(m_mode == RM_Walkaround) - { - // walkaround. -// PNSDisplayDebugLine (walkFull.GetCLine(), 4); - if(wf == PNS_WALKAROUND::STUCK) - { - aNewHead = m_head; - aNewHead.SetShape(walkFull.GetCLine()); - aNewHead = aNewHead.ClipToNearestObstacle(m_currentNode); - return false; - } - - aNewHead = m_head; - aNewHead.SetShape(walkFull.GetCLine()); + if( m_mode == RM_Walkaround ) + { + // walkaround. +// PNSDisplayDebugLine (walkFull.GetCLine(), 4); + + if( wf == PNS_WALKAROUND::STUCK ) + { + aNewHead = m_head; + aNewHead.SetShape( walkFull.GetCLine() ); + aNewHead = aNewHead.ClipToNearestObstacle( m_currentNode ); + return false; + } + + aNewHead = m_head; + aNewHead.SetShape( walkFull.GetCLine() ); + +// printf("nh w %d l %d\n", aNewHead.GetWidth(), aNewHead.GetLayers().Start()); + return true; + } -// printf("nh w %d l %d\n", aNewHead.GetWidth(), aNewHead.GetLayers().Start()); - return true; - } #endif - PNS_COST_ESTIMATOR cost_walk, cost_orig; - - walkaround.SetApproachCursor ( false, aP ); - walkaround.SetSolidsOnly(true); - walkaround.SetIterationLimit( 10 ); - PNS_WALKAROUND::WalkaroundStatus stat_solids = walkaround.Route(initTrack, walkSolids); + PNS_COST_ESTIMATOR cost_walk, cost_orig; - optimizer.SetEffortLevel ( PNS_OPTIMIZER::MERGE_SEGMENTS ); - optimizer.SetCollisionMask (PNS_ITEM::SOLID); - optimizer.Optimize(&walkSolids); - #if 0 - optimizer.SetCollisionMask (-1); - optimizer.Optimize(&walkFull); - #endif - cost_orig.Add(initTrack); - cost_walk.Add(walkFull); + walkaround.SetApproachCursor( false, aP ); + walkaround.SetSolidsOnly( true ); + walkaround.SetIterationLimit( 10 ); + PNS_WALKAROUND::WalkaroundStatus stat_solids = walkaround.Route( initTrack, walkSolids ); - if(m_mode == RM_Smart || m_mode == RM_Shove) - { - PNS_LINE l2; + optimizer.SetEffortLevel( PNS_OPTIMIZER::MERGE_SEGMENTS ); + optimizer.SetCollisionMask( PNS_ITEM::SOLID ); + optimizer.Optimize( &walkSolids ); + #if 0 + optimizer.SetCollisionMask( -1 ); + optimizer.Optimize( &walkFull ); + #endif + cost_orig.Add( initTrack ); + cost_walk.Add( walkFull ); - bool walk_better = cost_orig.IsBetter(cost_walk, 1.5, 10.0); - walk_better = false; + if( m_mode == RM_Smart || m_mode == RM_Shove ) + { + PNS_LINE l2; + + bool walk_better = cost_orig.IsBetter( cost_walk, 1.5, 10.0 ); + walk_better = false; #if 0 - printf("RtTrk width %d %d %d", initTrack.GetWidth(), walkFull.GetWidth(), walkSolids.GetWidth()); - printf("init-coll %d\n", m_currentNode->CheckColliding(&initTrack)? 1: 0); - printf("total cost: walk cor %.0f len %.0f orig cor %.0f len %.0f walk-better %d\n", - cost_walk.GetCornerCost(), cost_walk.GetLengthCost(), - cost_orig.GetCornerCost(), cost_orig.GetLengthCost(), - walk_better ); + printf( "RtTrk width %d %d %d", initTrack.GetWidth(), + walkFull.GetWidth(), walkSolids.GetWidth() ); + printf( "init-coll %d\n", m_currentNode->CheckColliding( &initTrack ) ? 1 : 0 ); + printf( "total cost: walk cor %.0f len %.0f orig cor %.0f len %.0f walk-better %d\n", + cost_walk.GetCornerCost(), cost_walk.GetLengthCost(), + cost_orig.GetCornerCost(), cost_orig.GetLengthCost(), + walk_better ); #endif - if(m_mode == RM_Smart && wf == PNS_WALKAROUND::DONE && walk_better && walkFull.GetCLine().CPoint(-1) == initTrack.GetCLine().CPoint(-1)) - l2 = walkFull; - else if (stat_solids == PNS_WALKAROUND::DONE) - l2 = walkSolids; - else - l2 = initTrack.ClipToNearestObstacle(m_shove->GetCurrentNode()); + if( m_mode == RM_Smart && wf == PNS_WALKAROUND::DONE && walk_better + && walkFull.GetCLine().CPoint( -1 ) == initTrack.GetCLine().CPoint( -1 ) ) + l2 = walkFull; + else if( stat_solids == PNS_WALKAROUND::DONE ) + l2 = walkSolids; + else + l2 = initTrack.ClipToNearestObstacle( m_shove->GetCurrentNode() ); - PNS_LINE l ( m_tail ); - l.GetLine().Append( l2.GetCLine() ); - l.GetLine().Simplify(); + PNS_LINE l( m_tail ); + l.GetLine().Append( l2.GetCLine() ); + l.GetLine().Simplify(); - if(m_placingVia) - { - PNS_LAYERSET allLayers(0,15); - PNS_VIA v1( l.GetCLine().CPoint(-1), allLayers, m_viaDiameter ); - PNS_VIA v2( l2.GetCLine().CPoint(-1), allLayers, m_viaDiameter ); - v1.SetDrill(m_viaDrill); - v2.SetDrill(m_viaDrill); - - l.AppendVia ( v1 ); - l2.AppendVia ( v2 ); - } + if( m_placingVia ) + { + PNS_LAYERSET allLayers( 0, 15 ); + PNS_VIA v1( l.GetCLine().CPoint( -1 ), allLayers, m_viaDiameter ); + PNS_VIA v2( l2.GetCLine().CPoint( -1 ), allLayers, m_viaDiameter ); + v1.SetDrill( m_viaDrill ); + v2.SetDrill( m_viaDrill ); - PNS_SHOVE::ShoveStatus status = m_shove->ShoveLines(&l); - m_currentNode = m_shove->GetCurrentNode(); + l.AppendVia( v1 ); + l2.AppendVia( v2 ); + } - if (status == PNS_SHOVE::SH_OK) - { - - optimizer.SetWorld (m_currentNode); - optimizer.ClearCache(); - optimizer.SetEffortLevel( PNS_OPTIMIZER::MERGE_OBTUSE | PNS_OPTIMIZER::SMART_PADS ); - optimizer.SetCollisionMask (-1); - optimizer.Optimize(&l2); - - aNewHead = l2; - - return true; - } else { - walkaround.SetWorld( m_currentNode ); - walkaround.SetSolidsOnly(false); - walkaround.SetIterationLimit( 10 ); - walkaround.SetApproachCursor ( true, aP ); - walkaround.Route(initTrack, l2); - aNewHead = l2.ClipToNearestObstacle (m_shove->GetCurrentNode()); - //aNewHead = l2; - - return false; - } - - } + PNS_SHOVE::ShoveStatus status = m_shove->ShoveLines( &l ); + m_currentNode = m_shove->GetCurrentNode(); - return false; + if( status == PNS_SHOVE::SH_OK ) + { + optimizer.SetWorld( m_currentNode ); + optimizer.ClearCache(); + optimizer.SetEffortLevel( PNS_OPTIMIZER::MERGE_OBTUSE | PNS_OPTIMIZER::SMART_PADS ); + optimizer.SetCollisionMask( -1 ); + optimizer.Optimize( &l2 ); + + aNewHead = l2; + + return true; + } + else + { + walkaround.SetWorld( m_currentNode ); + walkaround.SetSolidsOnly( false ); + walkaround.SetIterationLimit( 10 ); + walkaround.SetApproachCursor( true, aP ); + walkaround.Route( initTrack, l2 ); + aNewHead = l2.ClipToNearestObstacle( m_shove->GetCurrentNode() ); + // aNewHead = l2; + + return false; + } + } + + return false; } -/** - * Function optimizeTailHeadTransition() - * - * Tries to reduce the corner count of the most recent part of tail/head by merging - * obtuse/collinear segments. - * @return true, if the line has been changed. - */ bool PNS_LINE_PLACER::optimizeTailHeadTransition() { - SHAPE_LINE_CHAIN& head = m_head.GetLine(); - SHAPE_LINE_CHAIN& tail = m_tail.GetLine(); + SHAPE_LINE_CHAIN& head = m_head.GetLine(); + SHAPE_LINE_CHAIN& tail = m_tail.GetLine(); - const int TailLookbackSegments = 5; - - int threshold = min(tail.PointCount(), TailLookbackSegments + 1); - - if(tail.SegmentCount() < 3) - return false; + const int TailLookbackSegments = 5; - // assemble TailLookbackSegments tail segments with the current head - SHAPE_LINE_CHAIN opt_line = tail.Slice(-threshold, -1); + int threshold = min( tail.PointCount(), TailLookbackSegments + 1 ); - opt_line.Append(head); -// opt_line.Simplify(); + if( tail.SegmentCount() < 3 ) + return false; - PNS_LINE new_head(m_tail, opt_line); - - // and see if it could be made simpler by merging obtuse/collnear segments. If so, - // replace the (threshold) last tail points and the head with the optimized line + // assemble TailLookbackSegments tail segments with the current head + SHAPE_LINE_CHAIN opt_line = tail.Slice( -threshold, -1 ); - //if(PNS_OPTIMIZER::Optimize(&new_head, PNS_OPTIMIZER::MERGE_SEGMENTS)) + opt_line.Append( head ); +// opt_line.Simplify(); + PNS_LINE new_head( m_tail, opt_line ); - if(new_head.MergeSegments()) - { - PNS_LINE tmp(m_tail, opt_line); - - TRACE(0, "Placer: optimize tail-head [%d]", threshold); - - head.Clear(); - tail.Replace(-threshold, -1, new_head.GetCLine()); - tail.Simplify(); + // and see if it could be made simpler by merging obtuse/collnear segments. + // If so, replace the (threshold) last tail points and the head with + // the optimized line - m_p_start = new_head.GetCLine().CPoint(-1); - m_direction = DIRECTION_45(new_head.GetCLine().CSegment(-1)); + // if(PNS_OPTIMIZER::Optimize(&new_head, PNS_OPTIMIZER::MERGE_SEGMENTS)) - return true; - } + if( new_head.MergeSegments() ) + { + PNS_LINE tmp( m_tail, opt_line ); - return false; + TRACE( 0, "Placer: optimize tail-head [%d]", threshold ); + + head.Clear(); + tail.Replace( -threshold, -1, new_head.GetCLine() ); + tail.Simplify(); + + m_p_start = new_head.GetCLine().CPoint( -1 ); + m_direction = DIRECTION_45( new_head.GetCLine().CSegment( -1 ) ); + + return true; + } + + return false; } -/** - * Function routeStep() - * - * Performs a single routing alorithm step, for the end point aP. - * @param aP ending point of current route - * @return true, if the line has been changed. - */ - -void PNS_LINE_PLACER::routeStep(const VECTOR2I& aP) +void PNS_LINE_PLACER::routeStep( const VECTOR2I& aP ) { - bool fail = false; - bool go_back = false; - - int i, n_iter = 1; + bool fail = false; + bool go_back = false; - PNS_LINE new_head; - - m_follow_mouse = true; + int i, n_iter = 1; - TRACE(2,"INIT-DIR: %s head: %d, tail: %d segs\n", m_initial_direction.Format().c_str() % m_head.GetCLine().SegmentCount() % m_tail.GetCLine().SegmentCount()); + PNS_LINE new_head; - for(i = 0; i < n_iter; i++) - { - - if(!go_back && m_follow_mouse) - reduceTail(aP); - - go_back = false; + m_follow_mouse = true; - if(!routeHead(aP, new_head, true)) - fail = true; - - if(!new_head.Is45Degree()) - fail = true; - - if(!m_follow_mouse) - return; - - m_head = new_head; + TRACE( 2, "INIT-DIR: %s head: %d, tail: %d segs\n", + m_initial_direction.Format().c_str() % m_head.GetCLine().SegmentCount() % + m_tail.GetCLine().SegmentCount() ); - if(handleSelfIntersections()) - { - n_iter++; - go_back = true; - } + for( i = 0; i < n_iter; i++ ) + { + if( !go_back && m_follow_mouse ) + reduceTail( aP ); - if(!go_back && handlePullback()) - { - n_iter++; - go_back = true; - } - } + go_back = false; - if(!fail) - { - if(optimizeTailHeadTransition()) - return; - mergeHead(); - } - + if( !routeHead( aP, new_head, true ) ) + fail = true; + + if( !new_head.Is45Degree() ) + fail = true; + + if( !m_follow_mouse ) + return; + + m_head = new_head; + + if( handleSelfIntersections() ) + { + n_iter++; + go_back = true; + } + + if( !go_back && handlePullback() ) + { + n_iter++; + go_back = true; + } + } + + if( !fail ) + { + if( optimizeTailHeadTransition() ) + return; + + mergeHead(); + } } -/** - * Function Route() - * - * Re-routes the current track to point aP. Returns true, when routing has completed - * successfully (i.e. the trace end has reached point aP), and false if the trace was stuck somewhere - * on the way. May call routeStep() repetitively due to mouse smoothing. - * @param aP ending point of current route. - * @return true, if the routing is complete. - */ -bool PNS_LINE_PLACER::Route(const VECTOR2I& aP) + +bool PNS_LINE_PLACER::Route( const VECTOR2I& aP ) { - if(m_smooth_mouse) - { - VECTOR2I p_cur = m_p_start; - VECTOR2I step = (aP - m_p_start).Resize(m_smoothing_step); + if( m_smooth_mouse ) + { + VECTOR2I p_cur = m_p_start; + VECTOR2I step = (aP - m_p_start).Resize( m_smoothing_step ); - do - { - if ((p_cur - aP).EuclideanNorm() <= m_smoothing_step) - p_cur = aP; - else - p_cur += step; + do + { + if( (p_cur - aP).EuclideanNorm() <= m_smoothing_step ) + p_cur = aP; + else + p_cur += step; - routeStep(p_cur); + routeStep( p_cur ); + } while( p_cur != aP ); + } + else + routeStep( aP ); - } while (p_cur != aP); - } else - routeStep(aP); - - return CurrentEnd() == aP; + return CurrentEnd() == aP; } const PNS_LINE PNS_LINE_PLACER::GetTrace() const { - PNS_LINE tmp(m_head); - tmp.SetShape( m_tail.GetCLine() ); - tmp.GetLine().Append( m_head.GetCLine() ); - tmp.GetLine().Simplify(); - return tmp; + PNS_LINE tmp( m_head ); + + tmp.SetShape( m_tail.GetCLine() ); + tmp.GetLine().Append( m_head.GetCLine() ); + tmp.GetLine().Simplify(); + return tmp; } + void PNS_LINE_PLACER::FlipPosture() { - m_initial_direction = m_initial_direction.Right(); - m_direction = m_direction.Right(); -} - -void PNS_LINE_PLACER::GetUpdatedItems( PNS_NODE::ItemVector& aRemoved, PNS_NODE::ItemVector& aAdded) -{ - return m_shove->GetCurrentNode()->GetUpdatedItems(aRemoved, aAdded); + m_initial_direction = m_initial_direction.Right(); + m_direction = m_direction.Right(); } -PNS_NODE *PNS_LINE_PLACER::GetCurrentNode() const + +void PNS_LINE_PLACER::GetUpdatedItems( PNS_NODE::ItemVector& aRemoved, + PNS_NODE::ItemVector& aAdded ) { - return m_shove->GetCurrentNode(); -} \ No newline at end of file + return m_shove->GetCurrentNode()->GetUpdatedItems( aRemoved, aAdded ); +} + + +PNS_NODE* PNS_LINE_PLACER::GetCurrentNode() const +{ + return m_shove->GetCurrentNode(); +} + diff --git a/pcbnew/router/pns_line_placer.h b/pcbnew/router/pns_line_placer.h index 40d769cc88..f9bbfc7524 100644 --- a/pcbnew/router/pns_line_placer.h +++ b/pcbnew/router/pns_line_placer.h @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -30,7 +30,7 @@ #include "pns_via.h" #include "pns_line.h" #include "pns_routing_settings.h" - + class PNS_ROUTER; class PNS_SHOVE; class PNS_OPTIMIZER; @@ -39,118 +39,217 @@ class PNS_ROUTER_BASE; /** * Class PNS_LINE_PLACER * - * Interactively routes a single track. Runs shove and walkaround algorithms when needed. + * Interactively routes a single track. Runs shove and walkaround + * algorithms when needed. */ class PNS_LINE_PLACER { - public: - PNS_LINE_PLACER( PNS_NODE *aWorld ); - ~PNS_LINE_PLACER(); +public: + PNS_LINE_PLACER( PNS_NODE* aWorld ); + ~PNS_LINE_PLACER(); - ///> Appends a via at the end of currently placed line. - void AddVia ( bool aEnabled, int aDiameter, int aDrill ) - { - m_viaDiameter = aDiameter; - m_viaDrill = aDrill; - m_placingVia = aEnabled; - } + ///> Appends a via at the end of currently placed line. + void AddVia( bool aEnabled, int aDiameter, int aDrill ) + { + m_viaDiameter = aDiameter; + m_viaDrill = aDrill; + m_placingVia = aEnabled; + } - ///> Starts placement of a line at point aStart. - void StartPlacement(const VECTOR2I& aStart, int aNet, int aWidth, int aLayer); - - ///> Updates the routed line with a new ending point. - bool Route(const VECTOR2I& aP); - - ///> Sets initial routing direction/posture - void SetInitialDirection(const DIRECTION_45& aDirection); - - void ApplySettings ( const PNS_ROUTING_SETTINGS& aSettings ); + ///> Starts placement of a line at point aStart. + void StartPlacement( const VECTOR2I& aStart, int aNet, int aWidth, int aLayer ); - ///> Returns the "head" of the line being placed, that is the volatile part that has not been settled yet - const PNS_LINE& GetHead() const { return m_head; } - ///> Returns the "tail" of the line being placed the part that has been fixed already (follow mouse mode only) - const PNS_LINE& GetTail() const { return m_tail; } + /** + * Function Route() + * + * Re-routes the current track to point aP. Returns true, when routing has + * completed successfully (i.e. the trace end has reached point aP), and false + * if the trace was stuck somewhere on the way. May call routeStep() + * repetitively due to mouse smoothing. + * @param aP ending point of current route. + * @return true, if the routing is complete. + */ + bool Route( const VECTOR2I& aP ); - ///> Returns the whole routed line - const PNS_LINE GetTrace() const; + ///> Sets initial routing direction/posture + void SetInitialDirection( const DIRECTION_45& aDirection ); - ///> Returns the current end of the line being placed. It may not be equal to the cursor position due to collisions. - const VECTOR2I& CurrentEnd() const - { - if(m_head.GetCLine().PointCount() > 0) - return m_head.GetCLine().CPoint(-1); - else if(m_tail.GetCLine().PointCount() > 0) - return m_tail.GetCLine().CPoint(-1); - else - return m_p_start; - } + void ApplySettings( const PNS_ROUTING_SETTINGS& aSettings ); + ///> Returns the "head" of the line being placed, that is the volatile part + ///> that has not been settled yet + const PNS_LINE& GetHead() const { return m_head; } + ///> Returns the "tail" of the line being placed the part that has been + ///> fixed already (follow mouse mode only) + const PNS_LINE& GetTail() const { return m_tail; } - ///> Returns all items in the world that have been affected by the routing operation. Used - /// to update data structures of the host application - void GetUpdatedItems( PNS_NODE::ItemVector& aRemoved, PNS_NODE::ItemVector& aAdded); - - ///> Toggles the current posture (straight/diagonal) of the trace head. - void FlipPosture(); + ///> Returns the whole routed line + const PNS_LINE GetTrace() const; - ///> Returns the most recent world state - PNS_NODE *GetCurrentNode() const; + ///> Returns the current end of the line being placed. It may not be equal + ///> to the cursor position due to collisions. + const VECTOR2I& CurrentEnd() const + { + if( m_head.GetCLine().PointCount() > 0 ) + return m_head.GetCLine().CPoint( -1 ); + else if( m_tail.GetCLine().PointCount() > 0 ) + return m_tail.GetCLine().CPoint( -1 ); + else + return m_p_start; + } - private: - - static const double m_shoveLengthThreshold = 1.7; + ///> Returns all items in the world that have been affected by the routing + ///> operation. Used to update data structures of the host application + void GetUpdatedItems( PNS_NODE::ItemVector& aRemoved, + PNS_NODE::ItemVector& aAdded ); - bool handleViaPlacement ( PNS_LINE& aHead ); + ///> Toggles the current posture (straight/diagonal) of the trace head. + void FlipPosture(); - bool checkObtusity(const SEG& a, const SEG& b) const; - bool handleSelfIntersections(); - bool handlePullback(); - bool mergeHead(); - bool reduceTail(const VECTOR2I& aEnd); - void fixHeadPosture(); - bool optimizeTailHeadTransition(); - - bool routeHead(const VECTOR2I& aP, PNS_LINE& aNewHead, bool aCwWalkaround = true); - void routeStep(const VECTOR2I& aP); + ///> Returns the most recent world state + PNS_NODE* GetCurrentNode() const; - ///> routing mode (walkaround, shove, etc.) - PNS_MODE m_mode; - ///> follow mouse trail by attaching new segments to the head as the cursor moves - bool m_follow_mouse; - ///> mouse smoothing active - bool m_smooth_mouse; - ///> mouse smoothing step (in world units) - int m_smoothing_step; - ///> current routing direction - DIRECTION_45 m_direction; - ///> routing direction for new traces - DIRECTION_45 m_initial_direction; - ///> routing "head": volatile part of the track from the previously - /// analyzed point to the current routing destination - PNS_LINE m_head; - ///> routing "tail": part of the track that has been already fixed due to collisions with obstacles - PNS_LINE m_tail; - ///> current algorithm iteration - int m_iteration; - ///> pointer to world to search colliding items - PNS_NODE *m_world; - ///> current routing start point (end of tail, beginning of head) - VECTOR2I m_p_start; - ///> The shove engine - PNS_SHOVE *m_shove; - ///> Current world state - PNS_NODE *m_currentNode; - ///> Are we placing a via? - bool m_placingVia; - ///> current via diameter - int m_viaDiameter; - ///> current via drill - int m_viaDrill; - ///> walkaround algorithm iteration limit - int m_walkaroundIterationLimit; - ///> smart pads optimizer enabled. - bool m_smartPads; +private: + static const double m_shoveLengthThreshold = 1.7; + + bool handleViaPlacement( PNS_LINE& aHead ); + + /** + * Function checkObtusity() + * + * Helper that checks if segments a and b form an obtuse angle + * (in 45-degree regime). + * @return true, if angle (a, b) is obtuse + */ + bool checkObtusity( const SEG& a, const SEG& b ) const; + + /** + * Function handleSelfIntersections() + * + * Checks if the head of the track intersects its tail. If so, cuts the + * tail up to the intersecting segment and fixes the head direction to match + * the last segment before the cut. + * @return true if the line has been changed. + */ + bool handleSelfIntersections(); + + /** + * Function handlePullback() + * + * Deals with pull-back: reduces the tail if head trace is moved backwards + * wrs to the current tail direction. + * @return true if the line has been changed. + */ + bool handlePullback(); + + /** + * Function mergeHead() + * + * Moves "estabished" segments from the head to the tail if certain + * conditions are met. + * @return true, if the line has been changed. + */ + bool mergeHead(); + + /** + * Function reduceTail() + * + * Attempts to reduce the numer of segments in the tail by trying to replace a + * certain number of latest tail segments with a direct trace leading to aEnd + * that does not collide with anything. + * @param aEnd: current routing destination point. + * @return true if the line has been changed. + */ + bool reduceTail( const VECTOR2I& aEnd ); + + void fixHeadPosture(); + + /** + * Function optimizeTailHeadTransition() + * + * Tries to reduce the corner count of the most recent part of tail/head by + * merging obtuse/collinear segments. + * @return true, if the line has been changed. + */ + bool optimizeTailHeadTransition(); + + /** + * Function routeHead() + * + * Computes the head trace between the current start point (m_p_start) and + * point aP, starting with direction defined in m_direction. The trace walks + * around all colliding solid or non-movable items. Movable segments are + * ignored, as they'll be handled later by the shove algorithm. + */ + bool routeHead( const VECTOR2I& aP, PNS_LINE& aNewHead, + bool aCwWalkaround = true ); + + /** + * Function routeStep() + * + * Performs a single routing alorithm step, for the end point aP. + * @param aP ending point of current route + * @return true, if the line has been changed. + */ + void routeStep( const VECTOR2I& aP ); + + ///> routing mode (walkaround, shove, etc.) + PNS_MODE m_mode; + + ///> follow mouse trail by attaching new segments to the head + ///> as the cursor moves + bool m_follow_mouse; + + ///> mouse smoothing active + bool m_smooth_mouse; + + ///> mouse smoothing step (in world units) + int m_smoothing_step; + + ///> current routing direction + DIRECTION_45 m_direction; + + ///> routing direction for new traces + DIRECTION_45 m_initial_direction; + + ///> routing "head": volatile part of the track from the previously + /// analyzed point to the current routing destination + PNS_LINE m_head; + + ///> routing "tail": part of the track that has been already fixed due to collisions with obstacles + PNS_LINE m_tail; + + ///> current algorithm iteration + int m_iteration; + + ///> pointer to world to search colliding items + PNS_NODE* m_world; + + ///> current routing start point (end of tail, beginning of head) + VECTOR2I m_p_start; + + ///> The shove engine + PNS_SHOVE* m_shove; + + ///> Current world state + PNS_NODE* m_currentNode; + + ///> Are we placing a via? + bool m_placingVia; + + ///> current via diameter + int m_viaDiameter; + + ///> current via drill + int m_viaDrill; + + ///> walkaround algorithm iteration limit + int m_walkaroundIterationLimit; + + ///> smart pads optimizer enabled. + bool m_smartPads; }; - -#endif // __PNS_LINE_PLACER_H + +#endif // __PNS_LINE_PLACER_H + diff --git a/pcbnew/router/pns_node.cpp b/pcbnew/router/pns_node.cpp index 5a1932f1e6..d17b053e70 100644 --- a/pcbnew/router/pns_node.cpp +++ b/pcbnew/router/pns_node.cpp @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -42,860 +42,946 @@ using namespace std; using boost::unordered_set; using boost::unordered_map; -static boost::unordered_set allocNodes; +static boost::unordered_set allocNodes; PNS_NODE::PNS_NODE() { - //printf("MakeNode [%p, total = %d]\n", this, allocNodes.size()); - m_root = this; - m_parent = NULL; - m_maxClearance = 800000; // fixme: depends on how thick traces are. - m_index = new PNS_INDEX; - allocNodes.insert(this); + // printf("MakeNode [%p, total = %d]\n", this, allocNodes.size()); + m_root = this; + m_parent = NULL; + m_maxClearance = 800000; // fixme: depends on how thick traces are. + m_index = new PNS_INDEX; + allocNodes.insert( this ); } + PNS_NODE::~PNS_NODE() { - if(!m_children.empty()) - { - TRACEn(0, "attempting to free a node that has kids.\n"); - assert(false); - } - - if(allocNodes.find(this) == allocNodes.end()) - { - TRACEn(0, "attempting to free an already-free'd node.\n"); - assert(false); - } + if( !m_children.empty() ) + { + TRACEn( 0, "attempting to free a node that has kids.\n" ); + assert( false ); + } - allocNodes.erase(this); + if( allocNodes.find( this ) == allocNodes.end() ) + { + TRACEn( 0, "attempting to free an already-free'd node.\n" ); + assert( false ); + } - for(PNS_INDEX::ItemSet::iterator i = m_index->begin(); i != m_index->end(); ++i) - if( (*i) ->BelongsTo(this)) - delete *i; + allocNodes.erase( this ); - unlinkParent(); - delete m_index; + for( PNS_INDEX::ItemSet::iterator i = m_index->begin(); + i != m_index->end(); ++i ) + if( (*i)->BelongsTo( this ) ) + delete *i; + + unlinkParent(); + delete m_index; } -int PNS_NODE::GetClearance(const PNS_ITEM *a, const PNS_ITEM *b) const +int PNS_NODE::GetClearance( const PNS_ITEM* a, const PNS_ITEM* b ) const { - int clearance = (* m_clearanceFunctor) (a, b); + int clearance = (*m_clearanceFunctor)( a, b ); - if( a->OfKind (PNS_ITEM::SEGMENT) ) - clearance += static_cast(a) -> GetWidth() / 2; + if( a->OfKind( PNS_ITEM::SEGMENT ) ) + clearance += static_cast(a)->GetWidth() / 2; - if( a->OfKind (PNS_ITEM::LINE) ) - clearance += static_cast(a) -> GetWidth() / 2; + if( a->OfKind( PNS_ITEM::LINE ) ) + clearance += static_cast(a)->GetWidth() / 2; - if( b->OfKind (PNS_ITEM::SEGMENT) ) - clearance += static_cast(b) -> GetWidth() / 2; + if( b->OfKind( PNS_ITEM::SEGMENT ) ) + clearance += static_cast(b)->GetWidth() / 2; - if( b->OfKind (PNS_ITEM::LINE) ) - clearance += static_cast(b) -> GetWidth() / 2; + if( b->OfKind( PNS_ITEM::LINE ) ) + clearance += static_cast(b)->GetWidth() / 2; - return clearance; + return clearance; } + PNS_NODE* PNS_NODE::Branch() { - PNS_NODE *child = new PNS_NODE; - m_children.push_back(child); + PNS_NODE* child = new PNS_NODE; - child->m_parent = this; - child->m_clearanceFunctor = m_clearanceFunctor; - child->m_root = isRoot() ? this : m_root; - - // immmediate offspring of the root branch needs not copy anything. For the rest, - // deep-copy joints, overridden item map and pointers to stored items. - if(!isRoot()) - { - JointMap::iterator j; - - for(PNS_INDEX::ItemSet::iterator i = m_index->begin(); i != m_index->end(); ++i) - child->m_index->Add(*i); + m_children.push_back( child ); - child->m_joints = m_joints; - child->m_override = m_override; - } - - TRACE(2, "%d items, %d joints, %d overrides", child->m_index->Size() % child->m_joints.size() % child->m_override.size()); - - return child; + child->m_parent = this; + child->m_clearanceFunctor = m_clearanceFunctor; + child->m_root = isRoot() ? this : m_root; + + // immmediate offspring of the root branch needs not copy anything. + // For the rest, deep-copy joints, overridden item map and pointers + // to stored items. + if( !isRoot() ) + { + JointMap::iterator j; + + for( PNS_INDEX::ItemSet::iterator i = m_index->begin(); + i != m_index->end(); ++i ) + child->m_index->Add( *i ); + + child->m_joints = m_joints; + child->m_override = m_override; + } + + TRACE( 2, "%d items, %d joints, %d overrides", + child->m_index->Size() % child->m_joints.size() % child->m_override.size() ); + + return child; } - -void PNS_NODE::unlinkParent ( ) + + +void PNS_NODE::unlinkParent() { - if( isRoot() ) - return; + if( isRoot() ) + return; - for( vector::iterator i = m_parent->m_children.begin(); i != m_parent->m_children.end(); ++i) - { - if (*i == this) - { - m_parent->m_children.erase(i); - return; - } - } + for( vector::iterator i = m_parent->m_children.begin(); + i != m_parent->m_children.end(); ++i ) + { + if( *i == this ) + { + m_parent->m_children.erase( i ); + return; + } + } } - -// function object that visits potential obstacles and performs the actual collision refining -struct PNS_NODE::obstacleVisitor { -///> node we are searching in (either root or a branch) - PNS_NODE *m_node; -///> node that overrides root entries - PNS_NODE *m_override; -///> list of encountered obstacles - Obstacles& m_tab; -///> the item we are looking for collisions with - const PNS_ITEM* m_item; -///> acccepted kinds of colliding items (solids, vias, segments, etc...) - int m_kindMask; -///> max number of hits - int m_limitCount; -///> number of items found so far - int m_matchCount; - obstacleVisitor( PNS_NODE::Obstacles& aTab, - const PNS_ITEM* aItem, - int aKindMask ) - : m_tab(aTab), - m_item(aItem), - m_kindMask(aKindMask), - m_limitCount(-1), - m_matchCount(0) - { }; - - void SetCountLimit(int aLimit) - { - m_limitCount = aLimit; - } - - void SetWorld(PNS_NODE *aNode, PNS_NODE *aOverride = NULL) - { - m_node = aNode; - m_override = aOverride; - } - - bool operator()( PNS_ITEM *aItem ) - { - if( !aItem->OfKind(m_kindMask)) - return true; - // check if there is a more recent branch with a newer (possibily modified) version of this item. - if ( m_override && m_override -> overrides (aItem) ) - return true; - - int clearance = m_node->GetClearance(aItem, m_item); - if(!aItem->Collide(m_item, clearance)) - return true; - - PNS_OBSTACLE obs; - - obs.item = aItem; - m_tab.push_back(obs); - - m_matchCount ++; - - if(m_limitCount > 0 && m_matchCount >= m_limitCount) - return false; - return true; - }; -}; - -int PNS_NODE::QueryColliding( const PNS_ITEM* aItem, PNS_NODE::Obstacles& aObstacles, int aKindMask, int aLimitCount) +// function object that visits potential obstacles and performs +// the actual collision refining +struct PNS_NODE::obstacleVisitor { - obstacleVisitor visitor ( aObstacles, aItem, aKindMask ); + ///> node we are searching in (either root or a branch) + PNS_NODE* m_node; - assert(allocNodes.find(this) != allocNodes.end()); + ///> node that overrides root entries + PNS_NODE* m_override; - visitor.SetCountLimit(aLimitCount); - visitor.SetWorld( this, NULL ); + ///> list of encountered obstacles + Obstacles& m_tab; - // first, look for colliding items ourselves - m_index->Query(aItem, m_maxClearance, visitor); + ///> the item we are looking for collisions with + const PNS_ITEM* m_item; - // if we haven't found enough items, look in the root branch as well. - if(!isRoot() && ( visitor.m_matchCount < aLimitCount || aLimitCount < 0) ) - { - visitor.SetWorld ( m_root, this ); - m_root->m_index->Query(aItem, m_maxClearance, visitor); - } + ///> acccepted kinds of colliding items (solids, vias, segments, etc...) + int m_kindMask; - return aObstacles.size(); -} + ///> max number of hits + int m_limitCount; -PNS_NODE::OptObstacle PNS_NODE::NearestObstacle( const PNS_LINE *aItem, int aKindMask) + ///> number of items found so far + int m_matchCount; + + obstacleVisitor( PNS_NODE::Obstacles& aTab, const PNS_ITEM* aItem, + int aKindMask ) : + m_tab( aTab ), + m_item( aItem ), + m_kindMask( aKindMask ), + m_limitCount( -1 ), + m_matchCount( 0 ) + {}; + + void SetCountLimit( int aLimit ) + { + m_limitCount = aLimit; + } + + void SetWorld( PNS_NODE* aNode, PNS_NODE* aOverride = NULL ) + { + m_node = aNode; + m_override = aOverride; + } + + bool operator()( PNS_ITEM* aItem ) + { + if( !aItem->OfKind( m_kindMask ) ) + return true; + + // check if there is a more recent branch with a newer + // (possibily modified) version of this item. + if( m_override && m_override->overrides( aItem ) ) + return true; + + int clearance = m_node->GetClearance( aItem, m_item ); + + if( !aItem->Collide( m_item, clearance ) ) + return true; + + PNS_OBSTACLE obs; + + obs.item = aItem; + m_tab.push_back( obs ); + + m_matchCount++; + + if( m_limitCount > 0 && m_matchCount >= m_limitCount ) + return false; + + return true; + }; +}; + + +int PNS_NODE::QueryColliding( const PNS_ITEM* aItem, + PNS_NODE::Obstacles& aObstacles, int aKindMask, int aLimitCount ) { - Obstacles obs_list; - bool found_isects = false; + obstacleVisitor visitor( aObstacles, aItem, aKindMask ); - const SHAPE_LINE_CHAIN &line = aItem->GetCLine(); - - obs_list.reserve(100); + assert( allocNodes.find( this ) != allocNodes.end() ); - int n = 0; - for(int i = 0; i < line.SegmentCount(); i++) - { - const PNS_SEGMENT s ( *aItem, line.CSegment(i)); - n += QueryColliding ( &s, obs_list, aKindMask ); - } + visitor.SetCountLimit( aLimitCount ); + visitor.SetWorld( this, NULL ); - if( aItem->EndsWithVia () ) - n += QueryColliding ( &aItem->GetVia(), obs_list, aKindMask ); + // first, look for colliding items ourselves + m_index->Query( aItem, m_maxClearance, visitor ); - //if(! QueryColliding ( aItem, obs_list, aKindMask )) - if(!n) - return OptObstacle(); + // if we haven't found enough items, look in the root branch as well. + if( !isRoot() && ( visitor.m_matchCount < aLimitCount || aLimitCount < 0) ) + { + visitor.SetWorld( m_root, this ); + m_root->m_index->Query( aItem, m_maxClearance, visitor ); + } - PNS_LINE& aLine = (PNS_LINE&) *aItem; - - PNS_OBSTACLE nearest; - nearest.item = NULL; - nearest.dist_first = INT_MAX; - - BOOST_FOREACH(PNS_OBSTACLE obs, obs_list) - { - VECTOR2I ip_first, ip_last; - int dist_max = INT_MIN; - - vector isect_list; - - int clearance = GetClearance(obs.item, &aLine); - - SHAPE_LINE_CHAIN hull = obs.item->Hull ( clearance ); - - if(aLine.EndsWithVia()) - { - int clearance = GetClearance(obs.item, &aLine.GetVia()); - - SHAPE_LINE_CHAIN viaHull = aLine.GetVia().Hull (clearance); - - viaHull.Intersect(hull, isect_list); - - BOOST_FOREACH(SHAPE_LINE_CHAIN::Intersection isect, isect_list) - { - - int dist = aLine.GetCLine().Length() + (isect.p - aLine.GetVia().GetPos()).EuclideanNorm(); - - if(dist < nearest.dist_first) - { - found_isects = true; - nearest.dist_first = dist; - nearest.ip_first = isect.p; - nearest.item = obs.item; - nearest.hull = hull; - } - - if(dist > dist_max) - { - dist_max = dist; - ip_last = isect.p; - } - } - } - - isect_list.clear(); - - hull.Intersect(aLine.GetCLine(), isect_list); - - BOOST_FOREACH(SHAPE_LINE_CHAIN::Intersection isect, isect_list) - { - - int dist = aLine.GetCLine().PathLength(isect.p); - - if(dist < nearest.dist_first) - { - found_isects = true; - nearest.dist_first = dist; - nearest.ip_first = isect.p; - nearest.item = obs.item; - nearest.hull = hull; - } - - if(dist > dist_max) - { - dist_max = dist; - ip_last = isect.p; - } - - } - - nearest.ip_last = ip_last; - nearest.dist_last = dist_max; - } - - return found_isects ? nearest : OptObstacle(); + return aObstacles.size(); } -PNS_NODE::OptObstacle PNS_NODE::CheckColliding( const PNS_ITEM *aItemA, int aKindMask ) + +PNS_NODE::OptObstacle PNS_NODE::NearestObstacle( const PNS_LINE* aItem, int aKindMask ) { - Obstacles obs; - obs.reserve(100); + Obstacles obs_list; + bool found_isects = false; - if(aItemA->GetKind() == PNS_ITEM::LINE) - { - int n = 0; - const PNS_LINE *line = static_cast(aItemA); - const SHAPE_LINE_CHAIN &l = line->GetCLine(); + const SHAPE_LINE_CHAIN& line = aItem->GetCLine(); - for(int i = 0; i < l.SegmentCount(); i++) - { - const PNS_SEGMENT s ( *line, l.CSegment(i)); - n += QueryColliding ( &s, obs, aKindMask, 1 ); - if(n) - return OptObstacle(obs[0]); - } - - if( line->EndsWithVia () ) - { - n += QueryColliding ( &line->GetVia(), obs, aKindMask, 1 ); - if(n) - return OptObstacle(obs[0]); - } + obs_list.reserve( 100 ); - } else if (QueryColliding(aItemA, obs, aKindMask, 1) > 0) - return OptObstacle(obs[0]); - return OptObstacle(); + int n = 0; + + for( int i = 0; i < line.SegmentCount(); i++ ) + { + const PNS_SEGMENT s( *aItem, line.CSegment( i ) ); + n += QueryColliding( &s, obs_list, aKindMask ); + } + + if( aItem->EndsWithVia() ) + n += QueryColliding( &aItem->GetVia(), obs_list, aKindMask ); + + // if(! QueryColliding ( aItem, obs_list, aKindMask )) + if( !n ) + return OptObstacle(); + + PNS_LINE& aLine = (PNS_LINE&) *aItem; + + PNS_OBSTACLE nearest; + nearest.item = NULL; + nearest.dist_first = INT_MAX; + + BOOST_FOREACH( PNS_OBSTACLE obs, obs_list ) + { + VECTOR2I ip_first, ip_last; + int dist_max = INT_MIN; + + vector isect_list; + + int clearance = GetClearance( obs.item, &aLine ); + + SHAPE_LINE_CHAIN hull = obs.item->Hull( clearance ); + + if( aLine.EndsWithVia() ) + { + int clearance = GetClearance( obs.item, &aLine.GetVia() ); + + SHAPE_LINE_CHAIN viaHull = aLine.GetVia().Hull( clearance ); + + viaHull.Intersect( hull, isect_list ); + + BOOST_FOREACH( SHAPE_LINE_CHAIN::Intersection isect, isect_list ) + { + int dist = aLine.GetCLine().Length() + + ( isect.p - aLine.GetVia().GetPos() ).EuclideanNorm(); + + if( dist < nearest.dist_first ) + { + found_isects = true; + nearest.dist_first = dist; + nearest.ip_first = isect.p; + nearest.item = obs.item; + nearest.hull = hull; + } + + if( dist > dist_max ) + { + dist_max = dist; + ip_last = isect.p; + } + } + } + + isect_list.clear(); + + hull.Intersect( aLine.GetCLine(), isect_list ); + + BOOST_FOREACH( SHAPE_LINE_CHAIN::Intersection isect, isect_list ) + { + int dist = aLine.GetCLine().PathLength( isect.p ); + + if( dist < nearest.dist_first ) + { + found_isects = true; + nearest.dist_first = dist; + nearest.ip_first = isect.p; + nearest.item = obs.item; + nearest.hull = hull; + } + + if( dist > dist_max ) + { + dist_max = dist; + ip_last = isect.p; + } + } + + nearest.ip_last = ip_last; + nearest.dist_last = dist_max; + } + + return found_isects ? nearest : OptObstacle(); } -bool PNS_NODE::CheckColliding( const PNS_ITEM *aItemA, const PNS_ITEM *aItemB, int aKindMask ) + +PNS_NODE::OptObstacle PNS_NODE::CheckColliding( const PNS_ITEM* aItemA, int aKindMask ) { - Obstacles dummy; + Obstacles obs; - assert(aItemB); - // return QueryColliding(aItemA, dummy, aKindMask, 1) > 0; + obs.reserve( 100 ); - return aItemA->Collide(aItemB, GetClearance(aItemA, aItemB)); + if( aItemA->GetKind() == PNS_ITEM::LINE ) + { + int n = 0; + const PNS_LINE* line = static_cast(aItemA); + const SHAPE_LINE_CHAIN& l = line->GetCLine(); + + for( int i = 0; i < l.SegmentCount(); i++ ) + { + const PNS_SEGMENT s( *line, l.CSegment( i ) ); + n += QueryColliding( &s, obs, aKindMask, 1 ); + + if( n ) + return OptObstacle( obs[0] ); + } + + if( line->EndsWithVia() ) + { + n += QueryColliding( &line->GetVia(), obs, aKindMask, 1 ); + + if( n ) + return OptObstacle( obs[0] ); + } + } + else if( QueryColliding( aItemA, obs, aKindMask, 1 ) > 0 ) + return OptObstacle( obs[0] ); + + return OptObstacle(); } -struct hitVisitor { - PNS_ITEMSET& m_items; - const VECTOR2I& m_point; - PNS_NODE *m_world; - hitVisitor( PNS_ITEMSET& aTab, - const VECTOR2I& aPoint, - PNS_NODE *aWorld ) - : m_items(aTab), m_point(aPoint), m_world(aWorld) { }; +bool PNS_NODE::CheckColliding( const PNS_ITEM* aItemA, const PNS_ITEM* aItemB, int aKindMask ) +{ + Obstacles dummy; - bool operator()( PNS_ITEM *aItem ) { - SHAPE_CIRCLE cp (m_point, 0); + assert( aItemB ); + // return QueryColliding(aItemA, dummy, aKindMask, 1) > 0; + + return aItemA->Collide( aItemB, GetClearance( aItemA, aItemB ) ); +} + + +struct hitVisitor +{ + PNS_ITEMSET& m_items; + const VECTOR2I& m_point; + PNS_NODE* m_world; + + hitVisitor( PNS_ITEMSET& aTab, const VECTOR2I& aPoint, PNS_NODE* aWorld ) : + m_items( aTab ), m_point( aPoint ), m_world( aWorld ) {}; + + bool operator()( PNS_ITEM* aItem ) + { + SHAPE_CIRCLE cp( m_point, 0 ); + + int cl = 0; + + if( aItem->GetKind() == PNS_ITEM::SEGMENT ) + cl += static_cast(aItem)->GetWidth() / 2; + + if( aItem->GetShape()->Collide( &cp, cl ) ) + m_items.Add( aItem ); + + return true; + } +}; - int cl = 0; - if(aItem->GetKind() == PNS_ITEM::SEGMENT) - cl += static_cast(aItem)->GetWidth() / 2; - - if(aItem->GetShape()->Collide(&cp, cl)) - m_items.Add(aItem); - return true; - } -}; const PNS_ITEMSET PNS_NODE::HitTest( const VECTOR2I& aPoint ) { - PNS_ITEMSET items; - SHAPE_CIRCLE s (aPoint, 0); // fixme: we treat a point as an infinitely small circle - this is inefficient. - hitVisitor visitor ( items, aPoint, this ); - - m_index->Query(&s, m_maxClearance, visitor); - - if( ! isRoot() ) // fixme: could be made cleaner - { - PNS_ITEMSET items_root; - hitVisitor visitor_root ( items_root, aPoint, m_root ); - m_root->m_index->Query( &s, m_maxClearance, visitor_root ); + PNS_ITEMSET items; + // fixme: we treat a point as an infinitely small circle - this is inefficient. + SHAPE_CIRCLE s( aPoint, 0 ); + hitVisitor visitor( items, aPoint, this ); - BOOST_FOREACH(PNS_ITEM *item, items_root.Items()) - { - if (!overrides(item)) - items.Add(item); - } - } + m_index->Query( &s, m_maxClearance, visitor ); - return items; -} + if( !isRoot() ) // fixme: could be made cleaner + { + PNS_ITEMSET items_root; + hitVisitor visitor_root( items_root, aPoint, m_root ); + m_root->m_index->Query( &s, m_maxClearance, visitor_root ); -void PNS_NODE::addSolid(PNS_SOLID *aSolid) -{ - linkJoint( aSolid->GetCenter(), aSolid->GetLayers(), aSolid->GetNet(), aSolid ); - m_index->Add(aSolid); -} + BOOST_FOREACH( PNS_ITEM * item, items_root.Items() ) + { + if( !overrides( item ) ) + items.Add( item ); + } + } -void PNS_NODE::addVia(PNS_VIA *aVia) -{ - linkJoint( aVia->GetPos(), aVia->GetLayers(), aVia->GetNet(), aVia ); - m_index->Add(aVia); -} - -void PNS_NODE::addLine( PNS_LINE *aLine ) -{ - const SHAPE_LINE_CHAIN& l = aLine->GetLine(); - - for(int i = 0; i < l.SegmentCount(); i++) - { - SEG s = l.CSegment(i); - - if(s.a != s.b) - { - PNS_SEGMENT *pseg = new PNS_SEGMENT(*aLine, s); - - pseg->SetOwner(this); - - linkJoint( s.a, pseg->GetLayers(), aLine->GetNet(), pseg ); - linkJoint( s.b, pseg->GetLayers(), aLine->GetNet(), pseg ); - - aLine->LinkSegment(pseg); - - m_index->Add(pseg); - } - } -} - -void PNS_NODE::addSegment( PNS_SEGMENT *aSeg ) -{ - if(aSeg->GetSeg().a == aSeg->GetSeg().b) - { - TRACEn(0, "attempting to add a segment with same end coordinates, ignoring.") - return; - } - - aSeg->SetOwner (this); - - linkJoint( aSeg->GetSeg().a, aSeg->GetLayers(), aSeg->GetNet(), aSeg ); - linkJoint( aSeg->GetSeg().b, aSeg->GetLayers(), aSeg->GetNet(), aSeg ); - - m_index->Add(aSeg); -} - -void PNS_NODE::Add(PNS_ITEM* aItem) -{ - - aItem->SetOwner(this); - - switch(aItem -> GetKind()) - { - case PNS_ITEM::SOLID: - addSolid(static_cast(aItem)); - break; - - case PNS_ITEM::SEGMENT: - addSegment(static_cast(aItem)); - break; - - case PNS_ITEM::LINE: - addLine( static_cast (aItem)); - break; - - case PNS_ITEM::VIA: - addVia (static_cast(aItem)); - break; - - default: - assert (false); - } -} - - -void PNS_NODE::doRemove ( PNS_ITEM *aItem ) -{ - // case 1: removing an item that is stored in the root node from any branch: mark it as overridden, but do not remove - if( aItem->BelongsTo(m_root) && !isRoot() ) - m_override.insert(aItem); - - // case 2: the item belongs to this branch or a parent, non-root branch, or the root itself and we are the root: remove from the index - else if( !aItem->BelongsTo(m_root) || isRoot() ) - m_index->Remove( aItem ); - - // the item belongs to this particular branch: un-reference it - if( aItem->BelongsTo( this )) - aItem->SetOwner(NULL); -} - -void PNS_NODE::removeSegment (PNS_SEGMENT *aSeg ) -{ - unlinkJoint(aSeg->GetSeg().a, aSeg->GetLayers(), aSeg->GetNet(), aSeg); - unlinkJoint(aSeg->GetSeg().b, aSeg->GetLayers(), aSeg->GetNet(), aSeg); - - doRemove(aSeg); -} - -void PNS_NODE::removeLine( PNS_LINE *aLine ) -{ - vector *segRefs = aLine->GetLinkedSegments(); - - if(!segRefs) - return; - - assert ( aLine->GetOwner () ); - - BOOST_FOREACH(PNS_SEGMENT *seg, *segRefs) - { - removeSegment(seg); - } - - aLine->SetOwner(NULL); -} - -void PNS_NODE::removeVia ( PNS_VIA *aVia ) -{ - unlinkJoint(aVia->GetPos(), aVia->GetLayers(), aVia->GetNet(), aVia); - - doRemove(aVia); -} - -void PNS_NODE::Replace(PNS_ITEM *aOldItem, PNS_ITEM *aNewItem) -{ - Remove(aOldItem); - Add(aNewItem); -} - -void PNS_NODE::Remove(PNS_ITEM *aItem) -{ - - switch(aItem -> GetKind()) - { - case PNS_ITEM::SOLID: - assert(false); - break; - case PNS_ITEM::SEGMENT: - removeSegment(static_cast(aItem)); - break; - case PNS_ITEM::LINE: - removeLine(static_cast(aItem)); - break; - case PNS_ITEM::VIA: - removeVia(static_cast(aItem)); - break; - - default: - break; - } -} - -void PNS_NODE::followLine(PNS_SEGMENT *current, bool scanDirection, int& pos, int limit, VECTOR2I *corners, PNS_SEGMENT **segments) -{ - bool prevReversed = false; - - for(;;) - { - const VECTOR2I p = (scanDirection ^ prevReversed) ? current->GetSeg().b : current->GetSeg().a; - const OptJoint jt = FindJoint(p, current->GetLayer(), current->GetNet()); - - assert (jt); - assert (pos > 0 && pos < limit); - - corners [pos] = jt->GetPos(); - segments [pos] = current; - - pos += (scanDirection ? 1 : -1); - - if(!jt->IsLineCorner()) - break; - - current = jt->NextSegment( current ); - prevReversed = (jt->GetPos() == (scanDirection ? current->GetSeg().b : current->GetSeg().a )); - } -} - -PNS_LINE *PNS_NODE::AssembleLine(PNS_SEGMENT *aSeg, const OptJoint& a, const OptJoint& b) -{ - const int MaxVerts = 1024; - - VECTOR2I corners [ MaxVerts + 1 ]; - PNS_SEGMENT *segs [ MaxVerts + 1 ]; - - PNS_LINE *pl = new PNS_LINE; - int i_start = MaxVerts/2, i_end = i_start + 1; - - pl->SetWidth( aSeg->GetWidth() ); - pl->SetLayers( aSeg->GetLayers() ); - pl->SetNet ( aSeg->GetNet() ); - pl->SetOwner(this); - - //pl->LinkSegment(aSeg); - - followLine (aSeg, false, i_start, MaxVerts, corners, segs ); - followLine (aSeg, true, i_end, MaxVerts, corners, segs ); - - - int clip_start = -1, clip_end = -1; - for(int i = i_start+1 ; i < i_end ; i++) - { - const VECTOR2I &p = corners[i]; - - if (a && (p == a->GetPos() || p == b->GetPos() ) ) - { - clip_start = std::min(clip_start, i); - clip_end = std::max(clip_end, i); - } - - pl->GetLine().Append(p); - if(segs[i-1] != segs[i]) - pl->LinkSegment(segs[i]); - } - - return pl; -} - -void PNS_NODE::FindLineEnds (PNS_LINE *aLine, PNS_JOINT& a, PNS_JOINT& b ) -{ - a = *FindJoint(aLine->GetCLine().CPoint(0), aLine->GetLayers().Start(), aLine->GetNet()); - b = *FindJoint(aLine->GetCLine().CPoint(-1), aLine->GetLayers().Start(), aLine->GetNet()); + return items; } -int PNS_NODE::FindLinesBetweenJoints( PNS_JOINT& a, PNS_JOINT& b, vector &aLines ) +void PNS_NODE::addSolid( PNS_SOLID* aSolid ) { - BOOST_FOREACH(PNS_ITEM *item, a.GetLinkList()) - { - if(item->GetKind() == PNS_ITEM::SEGMENT) - { - PNS_SEGMENT *seg = static_cast(item); - PNS_LINE *line = AssembleLine(seg); - - PNS_JOINT j_start, j_end; - FindLineEnds( line, j_start, j_end ); - if( (j_start == a && j_end == b )|| (j_end == a && j_start == b)) - aLines.push_back(line); - else - delete line; - } - } - return 0; + linkJoint( aSolid->GetCenter(), aSolid->GetLayers(), aSolid->GetNet(), aSolid ); + m_index->Add( aSolid ); } -const PNS_NODE::OptJoint PNS_NODE::FindJoint(const VECTOR2I &aPos, int aLayer, int aNet ) + +void PNS_NODE::addVia( PNS_VIA* aVia ) { - PNS_JOINT::HashTag tag; - - tag.net = aNet; - tag.pos = aPos; - - JointMap::iterator f = m_joints.find(tag), end = m_joints.end(); - - if(f == end && !isRoot()) - { - end = m_root->m_joints.end(); - f = m_root->m_joints.find(tag); //m_root->FindJoint(aPos, aLayer, aNet); - } - - if(f == end) - return OptJoint(); - - while (f != end) - { - if(f->second.GetLayers().Overlaps(aLayer)) - return f->second; - ++f; - } - return OptJoint(); + linkJoint( aVia->GetPos(), aVia->GetLayers(), aVia->GetNet(), aVia ); + m_index->Add( aVia ); } + +void PNS_NODE::addLine( PNS_LINE* aLine ) +{ + const SHAPE_LINE_CHAIN& l = aLine->GetLine(); + + for( int i = 0; i < l.SegmentCount(); i++ ) + { + SEG s = l.CSegment( i ); + + if( s.a != s.b ) + { + PNS_SEGMENT* pseg = new PNS_SEGMENT( *aLine, s ); + + pseg->SetOwner( this ); + + linkJoint( s.a, pseg->GetLayers(), aLine->GetNet(), pseg ); + linkJoint( s.b, pseg->GetLayers(), aLine->GetNet(), pseg ); + + aLine->LinkSegment( pseg ); + + m_index->Add( pseg ); + } + } +} + + +void PNS_NODE::addSegment( PNS_SEGMENT* aSeg ) +{ + if( aSeg->GetSeg().a == aSeg->GetSeg().b ) + { + TRACEn( 0, "attempting to add a segment with same end coordinates, ignoring." ) + return; + } + + aSeg->SetOwner( this ); + + linkJoint( aSeg->GetSeg().a, aSeg->GetLayers(), aSeg->GetNet(), aSeg ); + linkJoint( aSeg->GetSeg().b, aSeg->GetLayers(), aSeg->GetNet(), aSeg ); + + m_index->Add( aSeg ); +} + + +void PNS_NODE::Add( PNS_ITEM* aItem ) +{ + aItem->SetOwner( this ); + + switch( aItem->GetKind() ) + { + case PNS_ITEM::SOLID: + addSolid( static_cast( aItem ) ); + break; + + case PNS_ITEM::SEGMENT: + addSegment( static_cast( aItem ) ); + break; + + case PNS_ITEM::LINE: + addLine( static_cast (aItem) ); + break; + + case PNS_ITEM::VIA: + addVia( static_cast(aItem) ); + break; + + default: + assert( false ); + } +} + + +void PNS_NODE::doRemove( PNS_ITEM* aItem ) +{ + // case 1: removing an item that is stored in the root node from any branch: + // mark it as overridden, but do not remove + if( aItem->BelongsTo( m_root ) && !isRoot() ) + m_override.insert( aItem ); + + // case 2: the item belongs to this branch or a parent, non-root branch, + // or the root itself and we are the root: remove from the index + else if( !aItem->BelongsTo( m_root ) || isRoot() ) + m_index->Remove( aItem ); + + // the item belongs to this particular branch: un-reference it + if( aItem->BelongsTo( this ) ) + aItem->SetOwner( NULL ); +} + + +void PNS_NODE::removeSegment( PNS_SEGMENT* aSeg ) +{ + unlinkJoint( aSeg->GetSeg().a, aSeg->GetLayers(), aSeg->GetNet(), aSeg ); + unlinkJoint( aSeg->GetSeg().b, aSeg->GetLayers(), aSeg->GetNet(), aSeg ); + + doRemove( aSeg ); +} + + +void PNS_NODE::removeLine( PNS_LINE* aLine ) +{ + vector* segRefs = aLine->GetLinkedSegments(); + + if( !segRefs ) + return; + + assert( aLine->GetOwner() ); + + BOOST_FOREACH( PNS_SEGMENT* seg, *segRefs ) + { + removeSegment( seg ); + } + + aLine->SetOwner( NULL ); +} + + +void PNS_NODE::removeVia( PNS_VIA* aVia ) +{ + unlinkJoint( aVia->GetPos(), aVia->GetLayers(), aVia->GetNet(), aVia ); + + doRemove( aVia ); +} + + +void PNS_NODE::Replace( PNS_ITEM* aOldItem, PNS_ITEM* aNewItem ) +{ + Remove( aOldItem ); + Add( aNewItem ); +} + + +void PNS_NODE::Remove( PNS_ITEM* aItem ) +{ + switch( aItem->GetKind() ) + { + case PNS_ITEM::SOLID: + assert( false ); + break; + + case PNS_ITEM::SEGMENT: + removeSegment( static_cast( aItem ) ); + break; + + case PNS_ITEM::LINE: + removeLine( static_cast( aItem ) ); + break; + + case PNS_ITEM::VIA: + removeVia( static_cast( aItem ) ); + break; + + default: + break; + } +} + + +void PNS_NODE::followLine( PNS_SEGMENT* current, bool scanDirection, int& pos, + int limit, VECTOR2I* corners, PNS_SEGMENT** segments ) +{ + bool prevReversed = false; + + for( ; ; ) + { + const VECTOR2I p = + (scanDirection ^ prevReversed) ? current->GetSeg().b : current->GetSeg().a; + const OptJoint jt = FindJoint( p, current->GetLayer(), current->GetNet() ); + + assert( jt ); + assert( pos > 0 && pos < limit ); + + corners[pos] = jt->GetPos(); + segments[pos] = current; + + pos += (scanDirection ? 1 : -1); + + if( !jt->IsLineCorner() ) + break; + + current = jt->NextSegment( current ); + prevReversed = + ( jt->GetPos() == (scanDirection ? current->GetSeg().b : current->GetSeg().a ) ); + } +} + + +PNS_LINE* PNS_NODE::AssembleLine( PNS_SEGMENT* aSeg, const OptJoint& a, const OptJoint& b ) +{ + const int MaxVerts = 1024; + + VECTOR2I corners[MaxVerts + 1]; + PNS_SEGMENT* segs[MaxVerts + 1]; + + PNS_LINE* pl = new PNS_LINE; + int i_start = MaxVerts / 2, i_end = i_start + 1; + + pl->SetWidth( aSeg->GetWidth() ); + pl->SetLayers( aSeg->GetLayers() ); + pl->SetNet( aSeg->GetNet() ); + pl->SetOwner( this ); + + // pl->LinkSegment(aSeg); + + followLine( aSeg, false, i_start, MaxVerts, corners, segs ); + followLine( aSeg, true, i_end, MaxVerts, corners, segs ); + + + int clip_start = -1, clip_end = -1; + + for( int i = i_start + 1; i < i_end; i++ ) + { + const VECTOR2I& p = corners[i]; + + if( a && ( p == a->GetPos() || p == b->GetPos() ) ) + { + clip_start = std::min( clip_start, i ); + clip_end = std::max( clip_end, i ); + } + + pl->GetLine().Append( p ); + + if( segs[i - 1] != segs[i] ) + pl->LinkSegment( segs[i] ); + } + + return pl; +} + + +void PNS_NODE::FindLineEnds( PNS_LINE* aLine, PNS_JOINT& a, PNS_JOINT& b ) +{ + a = *FindJoint( aLine->GetCLine().CPoint( 0 ), aLine->GetLayers().Start(), aLine->GetNet() ); + b = *FindJoint( aLine->GetCLine().CPoint( -1 ), aLine->GetLayers().Start(), aLine->GetNet() ); +} + + +int PNS_NODE::FindLinesBetweenJoints( PNS_JOINT& a, PNS_JOINT& b, vector& aLines ) +{ + BOOST_FOREACH( PNS_ITEM * item, a.GetLinkList() ) + { + if( item->GetKind() == PNS_ITEM::SEGMENT ) + { + PNS_SEGMENT* seg = static_cast(item); + PNS_LINE* line = AssembleLine( seg ); + + PNS_JOINT j_start, j_end; + FindLineEnds( line, j_start, j_end ); + + if( (j_start == a && j_end == b )|| (j_end == a && j_start == b) ) + aLines.push_back( line ); + else + delete line; + } + } + + return 0; +} + + +const PNS_NODE::OptJoint PNS_NODE::FindJoint( const VECTOR2I& aPos, int aLayer, int aNet ) +{ + PNS_JOINT::HashTag tag; + + tag.net = aNet; + tag.pos = aPos; + + JointMap::iterator f = m_joints.find( tag ), end = m_joints.end(); + + if( f == end && !isRoot() ) + { + end = m_root->m_joints.end(); + f = m_root->m_joints.find( tag ); // m_root->FindJoint(aPos, aLayer, aNet); + } + + if( f == end ) + return OptJoint(); + + while( f != end ) + { + if( f->second.GetLayers().Overlaps( aLayer ) ) + return f->second; + + ++f; + } + + return OptJoint(); +} + + PNS_JOINT& PNS_NODE::touchJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aNet ) { - PNS_JOINT::HashTag tag; - - tag.pos = aPos; - tag.net = aNet; + PNS_JOINT::HashTag tag; - // try to find the joint in this node. - JointMap::iterator f = m_joints.find(tag); + tag.pos = aPos; + tag.net = aNet; - pair range; - - // not found and we are not root? find in the root and copy results here. - if(f == m_joints.end() && !isRoot()) - { - range = m_root->m_joints.equal_range(tag); - for( f = range.first; f != range.second; ++f) - m_joints.insert( *f ); - } + // try to find the joint in this node. + JointMap::iterator f = m_joints.find( tag ); - // now insert and combine overlapping joints - PNS_JOINT jt (aPos, aLayers, aNet); + pair range; - bool merged; + // not found and we are not root? find in the root and copy results here. + if( f == m_joints.end() && !isRoot() ) + { + range = m_root->m_joints.equal_range( tag ); - do - { - merged = false; - range = m_joints.equal_range(tag); + for( f = range.first; f != range.second; ++f ) + m_joints.insert( *f ); + } - if(range.first == m_joints.end()) - break; + // now insert and combine overlapping joints + PNS_JOINT jt( aPos, aLayers, aNet ); - for(f = range.first; f != range.second; ++f) - { - if(aLayers.Overlaps (f->second.GetLayers())) - { - jt.Merge(f->second); - m_joints.erase(f); - merged = true; - break; - } - } - } while (merged); - - return m_joints.insert ( TagJointPair(tag, jt) )->second; + bool merged; + + do + { + merged = false; + range = m_joints.equal_range( tag ); + + if( range.first == m_joints.end() ) + break; + + for( f = range.first; f != range.second; ++f ) + { + if( aLayers.Overlaps( f->second.GetLayers() ) ) + { + jt.Merge( f->second ); + m_joints.erase( f ); + merged = true; + break; + } + } + } while( merged ); + + return m_joints.insert( TagJointPair( tag, jt ) )->second; } + void PNS_JOINT::Dump() const { - printf("joint layers %d-%d, net %d, pos %s, links: %d\n", m_layers.Start(), m_layers.End(), m_tag.net, m_tag.pos.Format().c_str(), LinkCount() ); + printf( "joint layers %d-%d, net %d, pos %s, links: %d\n", m_layers.Start(), + m_layers.End(), m_tag.net, m_tag.pos.Format().c_str(), LinkCount() ); } - -void PNS_NODE::linkJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aNet, PNS_ITEM *aWhere ) + +void PNS_NODE::linkJoint( const VECTOR2I& aPos, + const PNS_LAYERSET& aLayers, + int aNet, + PNS_ITEM* aWhere ) { - PNS_JOINT& jt = touchJoint( aPos, aLayers, aNet ); - jt.Link(aWhere); + PNS_JOINT& jt = touchJoint( aPos, aLayers, aNet ); + + jt.Link( aWhere ); } -void PNS_NODE::unlinkJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aNet, PNS_ITEM *aWhere ) + +void PNS_NODE::unlinkJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, + int aNet, PNS_ITEM* aWhere ) { - // fixme: remove dangling joints - PNS_JOINT& jt = touchJoint( aPos, aLayers, aNet ); - jt.Unlink(aWhere); + // fixme: remove dangling joints + PNS_JOINT& jt = touchJoint( aPos, aLayers, aNet ); + + jt.Unlink( aWhere ); } -void PNS_NODE::Dump(bool aLong) +void PNS_NODE::Dump( bool aLong ) { #if 0 - boost::unordered_set all_segs; - SHAPE_INDEX_LIST::iterator i; + boost::unordered_set all_segs; + SHAPE_INDEX_LIST::iterator i; - for(i = m_items.begin(); i != m_items.end() ; i++) - { - if((*i)->GetKind() == PNS_ITEM::SEGMENT) - all_segs.insert(static_cast(*i)); - } + for( i = m_items.begin(); i != m_items.end(); i++ ) + { + if( (*i)->GetKind() == PNS_ITEM::SEGMENT ) + all_segs.insert( static_cast(*i) ); + } - if(!isRoot()) - for(i = m_root->m_items.begin(); i != m_root->m_items.end() ; i++) - { - if((*i)->GetKind() == PNS_ITEM::SEGMENT && !overrides(*i)) - all_segs.insert(static_cast(*i)); - } + if( !isRoot() ) + for( i = m_root->m_items.begin(); i != m_root->m_items.end(); i++ ) + { + if( (*i)->GetKind() == PNS_ITEM::SEGMENT && !overrides( *i ) ) + all_segs.insert( static_cast(*i) ); + } - - JointMap::iterator j; - if(aLong) - for(j=m_joints.begin(); j!=m_joints.end(); ++j) - { - printf("joint : %s, links : %d\n", j->second.GetPos().Format().c_str(), j->second.LinkCount()); - PNS_JOINT::LinkedItems::const_iterator k; - for(k = j->second.GetLinkList().begin(); k != j->second.GetLinkList().end(); ++k) - { - const PNS_ITEM *item = *k; + JointMap::iterator j; - switch(item->GetKind()) - { - case PNS_ITEM::SEGMENT: - { - const PNS_SEGMENT *seg = static_cast(item); - printf(" -> seg %s %s\n", seg->GetSeg().a.Format().c_str(), seg->GetSeg().b.Format().c_str()); - break; - } - default: - break; - } - } - } - - int lines_count = 0; - while(!all_segs.empty()) - { - PNS_SEGMENT *s = *all_segs.begin(); - PNS_LINE *l = AssembleLine(s); - - PNS_LINE::LinkedSegments* seg_refs = l->GetLinkedSegments(); - - if(aLong) - printf("Line: %s, net %d ", l->GetLine().Format().c_str(), l->GetNet() ); - - - for(vector::iterator j = seg_refs->begin(); j != seg_refs->end(); ++j) - { - printf("%s ", (*j)->GetSeg().a.Format().c_str() ); - if(j+1 == seg_refs->end()) - printf("%s\n", (*j)->GetSeg().b.Format().c_str() ); - all_segs.erase(*j); - } - lines_count++; - } - - printf("Local joints: %d, lines : %d \n", m_joints.size(), lines_count); + if( aLong ) + for( j = m_joints.begin(); j!=m_joints.end(); ++j ) + { + printf( "joint : %s, links : %d\n", + j->second.GetPos().Format().c_str(), j->second.LinkCount() ); + PNS_JOINT::LinkedItems::const_iterator k; + + for( k = j->second.GetLinkList().begin(); k != j->second.GetLinkList().end(); ++k ) + { + const PNS_ITEM* item = *k; + + switch( item->GetKind() ) + { + case PNS_ITEM::SEGMENT: + { + const PNS_SEGMENT* seg = static_cast(item); + printf( " -> seg %s %s\n", seg->GetSeg().a.Format().c_str(), + seg->GetSeg().b.Format().c_str() ); + break; + } + + default: + break; + } + } + } + + + + int lines_count = 0; + + while( !all_segs.empty() ) + { + PNS_SEGMENT* s = *all_segs.begin(); + PNS_LINE* l = AssembleLine( s ); + + PNS_LINE::LinkedSegments* seg_refs = l->GetLinkedSegments(); + + if( aLong ) + printf( "Line: %s, net %d ", l->GetLine().Format().c_str(), l->GetNet() ); + + + for( vector::iterator j = seg_refs->begin(); j != seg_refs->end(); ++j ) + { + printf( "%s ", (*j)->GetSeg().a.Format().c_str() ); + + if( j + 1 == seg_refs->end() ) + printf( "%s\n", (*j)->GetSeg().b.Format().c_str() ); + + all_segs.erase( *j ); + } + + lines_count++; + } + + printf( "Local joints: %d, lines : %d \n", m_joints.size(), lines_count ); #endif } -void PNS_NODE::GetUpdatedItems( ItemVector& aRemoved, ItemVector& aAdded) + +void PNS_NODE::GetUpdatedItems( ItemVector& aRemoved, ItemVector& aAdded ) { - aRemoved.reserve(m_override.size()); - aAdded.reserve(m_index->Size()); + aRemoved.reserve( m_override.size() ); + aAdded.reserve( m_index->Size() ); - if(isRoot ()) - return; + if( isRoot() ) + return; - BOOST_FOREACH(PNS_ITEM *item, m_override) - aRemoved.push_back(item); - - for(PNS_INDEX::ItemSet::iterator i = m_index->begin(); i!=m_index->end(); ++i) - aAdded.push_back(*i); + BOOST_FOREACH( PNS_ITEM * item, m_override ) + aRemoved.push_back( item ); + + for( PNS_INDEX::ItemSet::iterator i = m_index->begin(); i!=m_index->end(); ++i ) + aAdded.push_back( *i ); } -void PNS_NODE::releaseChildren () -{ - // copy the kids as the PNS_NODE destructor erases the item from the parent node. - vector kids = m_children; - BOOST_FOREACH(PNS_NODE *node, kids) - { - node->releaseChildren(); - delete node; - } +void PNS_NODE::releaseChildren() +{ + // copy the kids as the PNS_NODE destructor erases the item from the parent node. + vector kids = m_children; + + BOOST_FOREACH( PNS_NODE * node, kids ) { + node->releaseChildren(); + delete node; + } } -void PNS_NODE::Commit( PNS_NODE *aNode ) + +void PNS_NODE::Commit( PNS_NODE* aNode ) { + if( aNode->isRoot() ) + return; - if(aNode->isRoot()) - return; + BOOST_FOREACH( PNS_ITEM * item, aNode->m_override ) + Remove( item ); - BOOST_FOREACH( PNS_ITEM *item, aNode->m_override ) - Remove(item); + for( PNS_INDEX::ItemSet::iterator i = aNode->m_index->begin(); + i != aNode->m_index->end(); ++i ) + Add( *i ); - for(PNS_INDEX::ItemSet::iterator i = aNode->m_index->begin(); i!= aNode ->m_index->end(); ++i) - Add(*i); - - releaseChildren(); + releaseChildren(); } + void PNS_NODE::KillChildren() { - assert (isRoot()); + assert( isRoot() ); - releaseChildren(); + releaseChildren(); } - -void PNS_NODE::AllItemsInNet ( int aNet, std::list& aItems) +void PNS_NODE::AllItemsInNet( int aNet, std::list& aItems ) { - PNS_INDEX::NetItemsList* l_cur = m_index->GetItemsForNet ( aNet ); + PNS_INDEX::NetItemsList* l_cur = m_index->GetItemsForNet( aNet ); - if(!l_cur) - return; + if( !l_cur ) + return; - std::copy(aItems.begin(), l_cur->begin(), l_cur->end() ); - if( !isRoot () ) - { - PNS_INDEX::NetItemsList* l_root = m_root->m_index->GetItemsForNet ( aNet ); + std::copy( aItems.begin(), l_cur->begin(), l_cur->end() ); - for(PNS_INDEX::NetItemsList::iterator i = l_root->begin(); i!= l_root->end(); ++i) - if( !overrides( *i )) - aItems.push_back(*i); - } + if( !isRoot() ) + { + PNS_INDEX::NetItemsList* l_root = m_root->m_index->GetItemsForNet( aNet ); + + for( PNS_INDEX::NetItemsList::iterator i = l_root->begin(); i!= l_root->end(); ++i ) + if( !overrides( *i ) ) + aItems.push_back( *i ); + + + } } + diff --git a/pcbnew/router/pns_node.h b/pcbnew/router/pns_node.h index 25056cbd02..67debc3b9f 100644 --- a/pcbnew/router/pns_node.h +++ b/pcbnew/router/pns_node.h @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -45,9 +45,10 @@ class PNS_INDEX; using boost::shared_ptr; -class PNS_CLEARANCE_FUNC { - public: - virtual int operator() ( const PNS_ITEM *a , const PNS_ITEM *b) = 0; +class PNS_CLEARANCE_FUNC +{ +public: + virtual int operator()( const PNS_ITEM* a, const PNS_ITEM* b ) = 0; }; /** @@ -56,205 +57,225 @@ class PNS_CLEARANCE_FUNC { * Holds an object colliding with another object, along with * some useful data about the collision. **/ -struct PNS_OBSTACLE +struct PNS_OBSTACLE { - ///> Item we search collisions with - PNS_ITEM *head; - - ///> Item found to be colliding with head - PNS_ITEM *item; + ///> Item we search collisions with + PNS_ITEM* head; - ///> Hull of the colliding item - SHAPE_LINE_CHAIN hull; - - ///> First and last intersection point between the head item and the hull of the - //// colliding item - VECTOR2I ip_first, ip_last; - - ///> ... and the distance thereof - int dist_first, dist_last; + ///> Item found to be colliding with head + PNS_ITEM* item; + + ///> Hull of the colliding item + SHAPE_LINE_CHAIN hull; + + ///> First and last intersection point between the head item and the hull + ///> of the colliding item + VECTOR2I ip_first, ip_last; + + ///> ... and the distance thereof + int dist_first, dist_last; }; /** * Class PNS_NODE * - * Keeps the router "world" - i.e. all the tracks, vias, solids in a hierarchical and indexed way. + * Keeps the router "world" - i.e. all the tracks, vias, solids in a + * hierarchical and indexed way. * Features: * - spatial-indexed container for PCB item shapes * - collision search (with clearance checking) * - assembly of lines connecting joints, finding loops and unique paths - * - lightweight cloning/branching (for recursive optimization and shove springback) + * - lightweight cloning/branching (for recursive optimization and shove + * springback) **/ -class PNS_NODE { - +class PNS_NODE +{ public: - - typedef boost::optional OptObstacle; - typedef std::vector ItemVector; - typedef std::vector Obstacles; - typedef boost::optional OptJoint; + typedef boost::optional OptObstacle; + typedef std::vector ItemVector; + typedef std::vector Obstacles; + typedef boost::optional OptJoint; - PNS_NODE (); - ~PNS_NODE (); + PNS_NODE(); + ~PNS_NODE(); - ///> Returns the expected clearance between items a and b. - int GetClearance(const PNS_ITEM *a, const PNS_ITEM *b) const; - - ///> Returns the pre-set worst case clearance between any pair of items - int GetMaxClearance() const - { - return m_maxClearance; - } + ///> Returns the expected clearance between items a and b. + int GetClearance( const PNS_ITEM* a, const PNS_ITEM* b ) const; - void SetMaxClearance( int aClearance ) - { - m_maxClearance = aClearance; - } + ///> Returns the pre-set worst case clearance between any pair of items + int GetMaxClearance() const + { + return m_maxClearance; + } - void SetClearanceFunctor (PNS_CLEARANCE_FUNC *aFunc) - { - m_clearanceFunctor = aFunc; - } + void SetMaxClearance( int aClearance ) + { + m_maxClearance = aClearance; + } - ///> Finds items that collide with aItem and stores collision information in aObstacles. - int QueryColliding( const PNS_ITEM* aItem, Obstacles& aObstacles, int aKindMask = PNS_ITEM::ANY, int aLimitCount = -1); + void SetClearanceFunctor( PNS_CLEARANCE_FUNC* aFunc ) + { + m_clearanceFunctor = aFunc; + } - ///> Finds the nearest item that collides with aItem. - OptObstacle NearestObstacle( const PNS_LINE *aItem, int aKindMask = PNS_ITEM::ANY); + ///> Finds items that collide with aItem and stores collision information + ///> in aObstacles. + int QueryColliding( const PNS_ITEM* aItem, + Obstacles& aObstacles, + int aKindMask = PNS_ITEM::ANY, + int aLimitCount = -1 ); - ///> Checks if the item collides with anything else in the world, and returns it if so. - OptObstacle CheckColliding ( const PNS_ITEM *aItem, int aKindMask = PNS_ITEM::ANY); + ///> Finds the nearest item that collides with aItem. + OptObstacle NearestObstacle( const PNS_LINE* aItem, int aKindMask = PNS_ITEM::ANY ); - ///> Checks if two items collide [deprecated]. - bool CheckColliding( const PNS_ITEM *aItemA, const PNS_ITEM *aItemB, int aKindMask = PNS_ITEM::ANY); + ///> Checks if the item collides with anything else in the world, + ///> and returns it if so. + OptObstacle CheckColliding( const PNS_ITEM* aItem, int aKindMask = PNS_ITEM::ANY ); - ///> Hit detection - const PNS_ITEMSET HitTest( const VECTOR2I& aPoint ); + ///> Checks if two items collide [deprecated]. + bool CheckColliding( const PNS_ITEM* aItemA, + const PNS_ITEM* aItemB, + int aKindMask = PNS_ITEM::ANY ); - void Add(PNS_ITEM *aItem); - void Remove(PNS_ITEM *aItem); - void Replace(PNS_ITEM *aOldItem, PNS_ITEM *aNewItem); + ///> Hit detection + const PNS_ITEMSET HitTest( const VECTOR2I& aPoint ); - ///> Creates a lightweight copy ("branch") of self. Note that if there are any branches - /// in use, their parents must NOT be deleted. - PNS_NODE *Branch(); + void Add( PNS_ITEM* aItem ); + void Remove( PNS_ITEM* aItem ); + void Replace( PNS_ITEM* aOldItem, PNS_ITEM* aNewItem ); - ///> Assembles a line connecting two non-trivial joints the segment aSeg belongs to. - PNS_LINE *AssembleLine(PNS_SEGMENT *aSeg, const OptJoint& a = OptJoint(), const OptJoint& b = OptJoint()); - - ///> Dumps the contents and joints structure - void Dump(bool aLong = false); + ///> Creates a lightweight copy ("branch") of self. Note that if there are + ///> any branches in use, their parents must NOT be deleted. + PNS_NODE* Branch(); - ///> Returns the number of joints - int JointCount() const - { - return m_joints.size(); - } + ///> Assembles a line connecting two non-trivial joints the + ///> segment aSeg belongs to. + PNS_LINE* AssembleLine( PNS_SEGMENT* aSeg, + const OptJoint& a = OptJoint(), const OptJoint& b = OptJoint() ); - ///> Returns the lists of items removed and added in this branch, with respect - ///> to the root. - void GetUpdatedItems( ItemVector& aRemoved, ItemVector& aAdded); + ///> Dumps the contents and joints structure + void Dump( bool aLong = false ); - ///> Copies the changes from a given branch (aNode) to the root. Called on - ///> a non-root branch will fail. - void Commit (PNS_NODE *aNode); + ///> Returns the number of joints + int JointCount() const + { + return m_joints.size(); + } - ///> finds a joint at a given position, layer and nets - const OptJoint FindJoint(const VECTOR2I &aPos, int aLayer, int aNet); + ///> Returns the lists of items removed and added in this branch, with + ///> respect to the root. + void GetUpdatedItems( ItemVector& aRemoved, ItemVector& aAdded ); - ///> finds all linest between a pair of joints. Used by the loop removal engine. - int FindLinesBetweenJoints( PNS_JOINT& a, PNS_JOINT& b, std::vector &aLines ); + ///> Copies the changes from a given branch (aNode) to the root. Called on + ///> a non-root branch will fail. + void Commit( PNS_NODE* aNode ); - ///> finds the joints corresponding to the ends of line aLine - void FindLineEnds (PNS_LINE *aLine, PNS_JOINT& a, PNS_JOINT& b ); + ///> finds a joint at a given position, layer and nets + const OptJoint FindJoint( const VECTOR2I& aPos, int aLayer, int aNet ); - ///> finds all joints that have an (in)direct connection(s) (i.e. segments/vias) with the joint aJoint. - void FindConnectedJoints( const PNS_JOINT& aJoint, std::vector &aConnectedJoints ); + ///> finds all linest between a pair of joints. Used by the loop removal engine. + int FindLinesBetweenJoints( PNS_JOINT& a, PNS_JOINT& b, + std::vector& aLines ); - ///> Destroys all child nodes. Applicable only to the root node. - void KillChildren(); + ///> finds the joints corresponding to the ends of line aLine + void FindLineEnds( PNS_LINE* aLine, PNS_JOINT& a, PNS_JOINT& b ); - void AllItemsInNet ( int aNet, std::list& aItems); + ///> finds all joints that have an (in)direct connection(s) + ///> (i.e. segments/vias) with the joint aJoint. + void FindConnectedJoints( const PNS_JOINT& aJoint, + std::vector& aConnectedJoints ); + + ///> Destroys all child nodes. Applicable only to the root node. + void KillChildren(); + + void AllItemsInNet( int aNet, std::list& aItems ); private: + struct obstacleVisitor; + typedef boost::unordered_multimap JointMap; + typedef JointMap::value_type TagJointPair; - struct obstacleVisitor; - typedef boost::unordered_multimap JointMap; - typedef JointMap::value_type TagJointPair; + /// nodes are not copyable + PNS_NODE( const PNS_NODE& b ); + PNS_NODE& operator=( const PNS_NODE& b ); - /// nodes are not copyable - PNS_NODE( const PNS_NODE& b); - PNS_NODE &operator=(const PNS_NODE& b); - - ///> tries to find matching joint and creates a new one if not found - PNS_JOINT& touchJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aNet ); - - ///> touches a joint and links it to an item - void linkJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aNet, PNS_ITEM *aWhere ); + ///> tries to find matching joint and creates a new one if not found + PNS_JOINT& touchJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, + int aNet ); - ///> unlinks an item from a joint - void unlinkJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aNet, PNS_ITEM *aWhere ); - - ///> helpers for adding/removing items + ///> touches a joint and links it to an item + void linkJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, + int aNet, PNS_ITEM* aWhere ); - void addSolid( PNS_SOLID *aSeg ); - void addSegment( PNS_SEGMENT *aSeg ); - void addLine( PNS_LINE *aLine ); - void addVia( PNS_VIA *aVia ); - void removeSolid( PNS_SOLID *aSeg ); - void removeLine( PNS_LINE *aLine ); - void removeSegment (PNS_SEGMENT *aSeg ); - void removeVia (PNS_VIA *aVia ); + ///> unlinks an item from a joint + void unlinkJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, + int aNet, PNS_ITEM* aWhere ); - void doRemove( PNS_ITEM *aItem ); - void unlinkParent ( ); - void releaseChildren (); - - bool isRoot() const - { - return m_parent == NULL; - } + ///> helpers for adding/removing items + void addSolid( PNS_SOLID* aSeg ); + void addSegment( PNS_SEGMENT* aSeg ); + void addLine( PNS_LINE* aLine ); + void addVia( PNS_VIA* aVia ); + void removeSolid( PNS_SOLID* aSeg ); + void removeLine( PNS_LINE* aLine ); + void removeSegment( PNS_SEGMENT* aSeg ); + void removeVia( PNS_VIA* aVia ); - ///> checks if this branch contains an updated version of the item from the root branch. - bool overrides ( PNS_ITEM * aItem ) const - { - return m_override.find(aItem) != m_override.end(); - } + void doRemove( PNS_ITEM* aItem ); + void unlinkParent(); + void releaseChildren(); - ///> scans the joint map, forming a line starting from segment (current). - void followLine(PNS_SEGMENT *current, bool scanDirection, int& pos, int limit, VECTOR2I *corners, PNS_SEGMENT **segments); + bool isRoot() const + { + return m_parent == NULL; + } - ///> spatial index of all items - //SHAPE_INDEX_LIST m_items; - - ///> hash table with the joints, linking the items. Joints are hashed by their - ///> position, layer set and net. - JointMap m_joints; + ///> checks if this branch contains an updated version of the item + ///> from the root branch. + bool overrides( PNS_ITEM* aItem ) const + { + return m_override.find( aItem ) != m_override.end(); + } - ///> node this node was branched from - PNS_NODE *m_parent; + ///> scans the joint map, forming a line starting from segment (current). + void followLine( PNS_SEGMENT* current, + bool scanDirection, + int& pos, + int limit, + VECTOR2I* corners, + PNS_SEGMENT** segments ); - ///> root node of the whole hierarchy - PNS_NODE *m_root; - - ///> list of nodes branched from this one - std::vector m_children; + ///> spatial index of all items + // SHAPE_INDEX_LIST m_items; - ///> hash of root's items that are more recent in this node - boost::unordered_set m_override; + ///> hash table with the joints, linking the items. Joints are hashed by + ///> their position, layer set and net. + JointMap m_joints; - ///> worst case item-item clearance - int m_maxClearance; - - ///> Clearance resolution functor - PNS_CLEARANCE_FUNC *m_clearanceFunctor; + ///> node this node was branched from + PNS_NODE* m_parent; - ///> Geometric/Net index of the items - PNS_INDEX *m_index; + ///> root node of the whole hierarchy + PNS_NODE* m_root; - ///> list of currently processed obstacles. - Obstacles m_obstacleList; + ///> list of nodes branched from this one + std::vector m_children; + + ///> hash of root's items that are more recent in this node + boost::unordered_set m_override; + + ///> worst case item-item clearance + int m_maxClearance; + + ///> Clearance resolution functor + PNS_CLEARANCE_FUNC* m_clearanceFunctor; + + ///> Geometric/Net index of the items + PNS_INDEX* m_index; + + ///> list of currently processed obstacles. + Obstacles m_obstacleList; }; #endif diff --git a/pcbnew/router/pns_optimizer.cpp b/pcbnew/router/pns_optimizer.cpp index 7291fba1ce..43cbfb52a0 100644 --- a/pcbnew/router/pns_optimizer.cpp +++ b/pcbnew/router/pns_optimizer.cpp @@ -3,20 +3,21 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ + #include #include @@ -27,678 +28,737 @@ #include "pns_optimizer.h" #include "pns_utils.h" - using namespace std; /** + * + * Cost Estimator Methods + * + **/ -Cost Estimator Methods - -**/ - -int PNS_COST_ESTIMATOR::CornerCost( const SEG& a, const SEG& b) +int PNS_COST_ESTIMATOR::CornerCost( const SEG& a, const SEG& b ) { - DIRECTION_45 dir_a(a), dir_b(b); + DIRECTION_45 dir_a( a ), dir_b( b ); - switch(dir_a.Angle(dir_b)) - { - case DIRECTION_45::ANG_OBTUSE: - return 1; - case DIRECTION_45::ANG_STRAIGHT: - return 0; - case DIRECTION_45::ANG_ACUTE: - return 50; - case DIRECTION_45::ANG_RIGHT: - return 30; - case DIRECTION_45::ANG_HALF_FULL: - return 60; - default: - return 100; - } -} + switch( dir_a.Angle( dir_b ) ) + { + case DIRECTION_45::ANG_OBTUSE: + return 1; -int PNS_COST_ESTIMATOR::CornerCost ( const SHAPE_LINE_CHAIN& aLine ) -{ - int total = 0; - for (int i = 0; i < aLine.SegmentCount() - 1; ++i) - total += CornerCost(aLine.CSegment(i), aLine.CSegment(i + 1)); - return total; + case DIRECTION_45::ANG_STRAIGHT: + return 0; + + case DIRECTION_45::ANG_ACUTE: + return 50; + + case DIRECTION_45::ANG_RIGHT: + return 30; + + case DIRECTION_45::ANG_HALF_FULL: + return 60; + + default: + return 100; + } } -int PNS_COST_ESTIMATOR::CornerCost ( const PNS_LINE& aLine ) +int PNS_COST_ESTIMATOR::CornerCost( const SHAPE_LINE_CHAIN& aLine ) { - return CornerCost(aLine.GetCLine()); -} + int total = 0; -void PNS_COST_ESTIMATOR::Add(PNS_LINE &aLine) -{ - m_lengthCost += aLine.GetCLine().Length(); - m_cornerCost += CornerCost(aLine); -} + for( int i = 0; i < aLine.SegmentCount() - 1; ++i ) + total += CornerCost( aLine.CSegment( i ), aLine.CSegment( i + 1 ) ); -void PNS_COST_ESTIMATOR::Remove(PNS_LINE &aLine) -{ - m_lengthCost -= aLine.GetCLine().Length(); - m_cornerCost -= CornerCost(aLine); -} - -void PNS_COST_ESTIMATOR::Replace(PNS_LINE &aOldLine, PNS_LINE& aNewLine) -{ - m_lengthCost -= aOldLine.GetCLine().Length(); - m_cornerCost -= CornerCost(aOldLine); - m_lengthCost += aNewLine.GetCLine().Length(); - m_cornerCost += CornerCost(aNewLine); + return total; } -bool PNS_COST_ESTIMATOR::IsBetter( PNS_COST_ESTIMATOR& aOther, double aLengthTollerance, double aCornerTollerance ) const +int PNS_COST_ESTIMATOR::CornerCost( const PNS_LINE& aLine ) { - if(aOther.m_cornerCost < m_cornerCost && aOther.m_lengthCost < m_lengthCost) - return true; - else if(aOther.m_cornerCost < m_cornerCost * aCornerTollerance && aOther.m_lengthCost < m_lengthCost * aLengthTollerance) - return true; + return CornerCost( aLine.GetCLine() ); +} - return false; + +void PNS_COST_ESTIMATOR::Add( PNS_LINE& aLine ) +{ + m_lengthCost += aLine.GetCLine().Length(); + m_cornerCost += CornerCost( aLine ); +} + + +void PNS_COST_ESTIMATOR::Remove( PNS_LINE& aLine ) +{ + m_lengthCost -= aLine.GetCLine().Length(); + m_cornerCost -= CornerCost( aLine ); +} + + +void PNS_COST_ESTIMATOR::Replace( PNS_LINE& aOldLine, PNS_LINE& aNewLine ) +{ + m_lengthCost -= aOldLine.GetCLine().Length(); + m_cornerCost -= CornerCost( aOldLine ); + m_lengthCost += aNewLine.GetCLine().Length(); + m_cornerCost += CornerCost( aNewLine ); +} + + +bool PNS_COST_ESTIMATOR::IsBetter( PNS_COST_ESTIMATOR& aOther, + double aLengthTollerance, + double aCornerTollerance ) const +{ + if( aOther.m_cornerCost < m_cornerCost && aOther.m_lengthCost < m_lengthCost ) + return true; + + else if( aOther.m_cornerCost < m_cornerCost * aCornerTollerance && aOther.m_lengthCost < + m_lengthCost * aLengthTollerance ) + return true; + + return false; } /** - -Optimizer - -**/ - - -PNS_OPTIMIZER::PNS_OPTIMIZER( PNS_NODE *aWorld ) : - m_world( aWorld ), m_collisionKindMask (PNS_ITEM::ANY), m_effortLevel(MERGE_SEGMENTS) - { - // m_cache = new SHAPE_INDEX_LIST(); - } - - -PNS_OPTIMIZER::~PNS_OPTIMIZER ( ) + * + * Optimizer + * + **/ +PNS_OPTIMIZER::PNS_OPTIMIZER( PNS_NODE* aWorld ) : + m_world( aWorld ), m_collisionKindMask( PNS_ITEM::ANY ), m_effortLevel( MERGE_SEGMENTS ) { - //delete m_cache; + // m_cache = new SHAPE_INDEX_LIST(); } -struct PNS_OPTIMIZER::CacheVisitor +PNS_OPTIMIZER::~PNS_OPTIMIZER() { + // delete m_cache; +} - CacheVisitor( const PNS_ITEM * aOurItem, PNS_NODE *aNode, int aMask ) : - m_ourItem(aOurItem), - m_collidingItem(NULL), - m_node(aNode), - m_mask(aMask) - {}; - bool operator() (PNS_ITEM *aOtherItem) - { - if(! m_mask & aOtherItem->GetKind()) - return true; +struct PNS_OPTIMIZER::CacheVisitor +{ + CacheVisitor( const PNS_ITEM* aOurItem, PNS_NODE* aNode, int aMask ) : + m_ourItem( aOurItem ), + m_collidingItem( NULL ), + m_node( aNode ), + m_mask( aMask ) + {}; - int clearance = m_node->GetClearance(aOtherItem, m_ourItem); + bool operator()( PNS_ITEM* aOtherItem ) + { + if( !m_mask & aOtherItem->GetKind() ) + return true; - if(!aOtherItem->Collide(m_ourItem, clearance)) - return true; + int clearance = m_node->GetClearance( aOtherItem, m_ourItem ); - m_collidingItem = aOtherItem; - return false; - } + if( !aOtherItem->Collide( m_ourItem, clearance ) ) + return true; - const PNS_ITEM *m_ourItem; - PNS_ITEM *m_collidingItem; - PNS_NODE *m_node; - int m_mask; + m_collidingItem = aOtherItem; + return false; + } + + const PNS_ITEM* m_ourItem; + PNS_ITEM* m_collidingItem; + PNS_NODE* m_node; + int m_mask; }; -void PNS_OPTIMIZER::cacheAdd( PNS_ITEM *aItem, bool aIsStatic = false) -{ - if(m_cacheTags.find(aItem) != m_cacheTags.end()) - return; - m_cache.Add(aItem); - m_cacheTags[aItem].hits = 1; - m_cacheTags[aItem].isStatic = aIsStatic; +void PNS_OPTIMIZER::cacheAdd( PNS_ITEM* aItem, bool aIsStatic = false ) +{ + if( m_cacheTags.find( aItem ) != m_cacheTags.end() ) + return; + + m_cache.Add( aItem ); + m_cacheTags[aItem].hits = 1; + m_cacheTags[aItem].isStatic = aIsStatic; } -void PNS_OPTIMIZER::removeCachedSegments (PNS_LINE *aLine, int aStartVertex, int aEndVertex) + +void PNS_OPTIMIZER::removeCachedSegments( PNS_LINE* aLine, int aStartVertex, int aEndVertex ) { - std::vector *segs = aLine->GetLinkedSegments(); + std::vector* segs = aLine->GetLinkedSegments(); - if(!segs) - return; + if( !segs ) + return; - if(aEndVertex < 0) - aEndVertex += aLine->GetCLine().PointCount(); + if( aEndVertex < 0 ) + aEndVertex += aLine->GetCLine().PointCount(); - for(int i = aStartVertex; i < aEndVertex - 1; i++) - { - PNS_SEGMENT *s = (*segs)[i]; - m_cacheTags.erase(s); - m_cache.Remove(s); - }//*cacheRemove( (*segs)[i] ); + for( int i = aStartVertex; i < aEndVertex - 1; i++ ) + { + PNS_SEGMENT* s = (*segs)[i]; + m_cacheTags.erase( s ); + m_cache.Remove( s ); + } // *cacheRemove( (*segs)[i] ); } -void PNS_OPTIMIZER::CacheRemove ( PNS_ITEM *aItem ) + +void PNS_OPTIMIZER::CacheRemove( PNS_ITEM* aItem ) { - if(aItem->GetKind() == PNS_ITEM::LINE) - removeCachedSegments(static_cast (aItem)); + if( aItem->GetKind() == PNS_ITEM::LINE ) + removeCachedSegments( static_cast (aItem) ); } -void PNS_OPTIMIZER::CacheStaticItem (PNS_ITEM *aItem) + +void PNS_OPTIMIZER::CacheStaticItem( PNS_ITEM* aItem ) { - cacheAdd(aItem, true); + cacheAdd( aItem, true ); } + void PNS_OPTIMIZER::ClearCache( bool aStaticOnly ) { - if(!aStaticOnly) - { - m_cacheTags.clear(); - m_cache.Clear(); - return; - } - - for(CachedItemTags::iterator i = m_cacheTags.begin(); i!= m_cacheTags.end(); ++i) - { - if(i->second.isStatic) - { - m_cache.Remove(i->first); - m_cacheTags.erase(i->first); - } - } -} + if( !aStaticOnly ) + { + m_cacheTags.clear(); + m_cache.Clear(); + return; + } -bool PNS_OPTIMIZER::checkColliding ( PNS_ITEM *aItem, bool aUpdateCache ) -{ - CacheVisitor v(aItem, m_world, m_collisionKindMask); - - return m_world->CheckColliding(aItem); - - // something is wrong with the cache, need to investigate. - m_cache.Query(aItem->GetShape(), m_world->GetMaxClearance(), v, false); - - if(!v.m_collidingItem) - { - PNS_NODE::OptObstacle obs = m_world->CheckColliding(aItem); - - if(obs) { - - if(aUpdateCache) - cacheAdd(obs->item); - return true; - } - } else { - m_cacheTags[v.m_collidingItem].hits++; - return true; - } - - return false; -} - -bool PNS_OPTIMIZER::checkColliding( PNS_LINE *aLine, const SHAPE_LINE_CHAIN& aOptPath ) -{ - PNS_LINE tmp(*aLine, aOptPath); - return checkColliding(&tmp); -} - -bool PNS_OPTIMIZER::mergeObtuse (PNS_LINE *aLine) -{ - SHAPE_LINE_CHAIN &line = aLine->GetLine(); - - int step = line.PointCount() - 3; - int iter = 0; - int segs_pre = line.SegmentCount(); - - if(step < 0) - return false; - - SHAPE_LINE_CHAIN current_path (line); - - while(1) - { - iter++; - int n_segs = current_path.SegmentCount(); - int max_step = n_segs - 2; - if(step > max_step) - step = max_step; - - if(step < 2) - { - line = current_path; - return current_path.SegmentCount() < segs_pre; - } - - bool found_anything = false; - int n = 0; - - while (n < n_segs - step) - { - const SEG s1 = current_path.CSegment(n); - const SEG s2 = current_path.CSegment(n + step); - SEG s1opt, s2opt; - - if (DIRECTION_45(s1).IsObtuse(DIRECTION_45(s2))) - { - VECTOR2I ip = *s1.IntersectLines(s2); - - if(s1.Distance(ip) <= 1 || s2.Distance(ip) <= 1) - { - s1opt = SEG(s1.a, ip); - s2opt = SEG(ip, s2.b); - } else { - s1opt = SEG(s1.a, ip); - s2opt = SEG(ip, s2.b); - } - - - if (DIRECTION_45(s1opt).IsObtuse(DIRECTION_45(s2opt))) - { - SHAPE_LINE_CHAIN opt_path; - opt_path.Append(s1opt.a); - opt_path.Append(s1opt.b); - opt_path.Append(s2opt.b); - - PNS_LINE opt_track (*aLine, opt_path); - - if(!checkColliding(&opt_track)) - { - current_path.Replace(s1.Index() + 1, s2.Index(), ip); - //removeCachedSegments(aLine, s1.Index(), s2.Index()); - n_segs = current_path.SegmentCount(); - found_anything = true; - break; - } - } - } - n++; - } - - if(!found_anything) - { - if( step <= 2 ) - { - line = current_path; - return line.SegmentCount() < segs_pre; - } - step --; - } - } - return line.SegmentCount() < segs_pre; + for( CachedItemTags::iterator i = m_cacheTags.begin(); i!= m_cacheTags.end(); ++i ) + { + if( i->second.isStatic ) + { + m_cache.Remove( i->first ); + m_cacheTags.erase( i->first ); + } + } } -bool PNS_OPTIMIZER::mergeFull(PNS_LINE *aLine) +bool PNS_OPTIMIZER::checkColliding( PNS_ITEM* aItem, bool aUpdateCache ) { - SHAPE_LINE_CHAIN &line = aLine->GetLine(); - int step = line.SegmentCount() - 1; - - int segs_pre = line.SegmentCount(); + CacheVisitor v( aItem, m_world, m_collisionKindMask ); - line.Simplify(); + return m_world->CheckColliding( aItem ); - if(step < 0) - return false; + // something is wrong with the cache, need to investigate. + m_cache.Query( aItem->GetShape(), m_world->GetMaxClearance(), v, false ); - SHAPE_LINE_CHAIN current_path (line); + if( !v.m_collidingItem ) + { + PNS_NODE::OptObstacle obs = m_world->CheckColliding( aItem ); - while(1) - { - int n_segs = current_path.SegmentCount(); - int max_step = n_segs - 2; - - if(step > max_step) - step = max_step; + if( obs ) + { + if( aUpdateCache ) + cacheAdd( obs->item ); - if(step < 1) - break; - - bool found_anything = mergeStep(aLine, current_path, step); - - if(!found_anything) - step --; + return true; + } + } + else + { + m_cacheTags[v.m_collidingItem].hits++; + return true; + } - - } - - aLine->SetShape(current_path); - - return current_path.SegmentCount() < segs_pre; -} - -bool PNS_OPTIMIZER::Optimize ( PNS_LINE *aLine, PNS_LINE *aResult , int aStartVertex , int aEndVertex ) -{ - if(!aResult) - aResult = aLine; - else - *aResult = *aLine; - - m_keepPostures = false; - - bool rv = false; - if(m_effortLevel & MERGE_SEGMENTS) - rv |= mergeFull(aResult); - if(m_effortLevel & MERGE_OBTUSE) - rv |= mergeObtuse(aResult); - if(m_effortLevel & SMART_PADS) - rv |= runSmartPads(aResult); - - return rv; + return false; } -bool PNS_OPTIMIZER::mergeStep ( PNS_LINE *aLine, SHAPE_LINE_CHAIN& aCurrentPath, int step ) +bool PNS_OPTIMIZER::checkColliding( PNS_LINE* aLine, const SHAPE_LINE_CHAIN& aOptPath ) { - int n = 0; - int n_segs = aCurrentPath.SegmentCount(); - - int cost_orig = PNS_COST_ESTIMATOR::CornerCost(aCurrentPath); + PNS_LINE tmp( *aLine, aOptPath ); - - if(aLine->GetCLine().SegmentCount() < 4) - return false; - - DIRECTION_45 orig_start (aLine->GetCLine().CSegment(0)); - DIRECTION_45 orig_end (aLine->GetCLine().CSegment(-1)); - - while (n < n_segs - step ) - { - const SEG s1 = aCurrentPath.CSegment(n); - const SEG s2 = aCurrentPath.CSegment(n + step); - - SHAPE_LINE_CHAIN path[2], *picked = NULL; - int cost[2]; - - for(int i = 0; i < 2; i++) - { - bool postureMatch = true; - SHAPE_LINE_CHAIN bypass = DIRECTION_45().BuildInitialTrace(s1.a, s2.b, i); - cost[i] = INT_MAX; - - - if ( n == 0 && orig_start != DIRECTION_45( bypass.CSegment(0) ) ) - postureMatch = false; - else if (n == n_segs-step && orig_end != DIRECTION_45( bypass.CSegment(-1))) - postureMatch = false; - - if((postureMatch || !m_keepPostures) && !checkColliding(aLine, bypass)) - { - path[i] = aCurrentPath; - path[i].Replace(s1.Index(), s2.Index(), bypass); - path[i].Simplify(); - cost[i] = PNS_COST_ESTIMATOR::CornerCost(path[i]); - } - } - - if(cost[0] < cost_orig && cost[0] < cost[1]) - picked = &path[0]; - else if (cost[1] < cost_orig) - picked = &path[1]; - - if(picked) - { - n_segs = aCurrentPath.SegmentCount(); - aCurrentPath = *picked; - return true; - } - n++; - } - - return false; -} - -PNS_OPTIMIZER::BreakoutList PNS_OPTIMIZER::circleBreakouts( int aWidth, const SHAPE *aShape, bool aPermitDiagonal ) const -{ - BreakoutList breakouts; - - for(int angle = 0; angle < 360; angle += 45) - { - const SHAPE_CIRCLE *cir = static_cast (aShape); - SHAPE_LINE_CHAIN l; - VECTOR2I p0 = cir->GetCenter (); - VECTOR2I v0 (cir->GetRadius() * M_SQRT2, 0); - l.Append ( p0 ); - l.Append ( p0 + v0.Rotate ( angle * M_PI / 180.0 ) ); - breakouts.push_back(l); - } - return breakouts; + return checkColliding( &tmp ); } -PNS_OPTIMIZER::BreakoutList PNS_OPTIMIZER::rectBreakouts( int aWidth, const SHAPE *aShape, bool aPermitDiagonal ) const +bool PNS_OPTIMIZER::mergeObtuse( PNS_LINE* aLine ) { - const SHAPE_RECT *rect = static_cast(aShape); - VECTOR2I s = rect->GetSize(), c = rect->GetPosition() + VECTOR2I (s.x / 2, s.y / 2); - BreakoutList breakouts; + SHAPE_LINE_CHAIN& line = aLine->GetLine(); - VECTOR2I d_offset; + int step = line.PointCount() - 3; + int iter = 0; + int segs_pre = line.SegmentCount(); - d_offset.x = (s.x > s.y) ? (s.x - s.y) / 2 : 0; - d_offset.y = (s.x < s.y) ? (s.y - s.x) / 2 : 0; + if( step < 0 ) + return false; - VECTOR2I d_vert = VECTOR2I ( 0, s.y / 2 + aWidth); - VECTOR2I d_horiz = VECTOR2I ( s.x / 2 + aWidth, 0); + SHAPE_LINE_CHAIN current_path( line ); + + while( 1 ) + { + iter++; + int n_segs = current_path.SegmentCount(); + int max_step = n_segs - 2; + + if( step > max_step ) + step = max_step; + + if( step < 2 ) + { + line = current_path; + return current_path.SegmentCount() < segs_pre; + } + + bool found_anything = false; + int n = 0; + + while( n < n_segs - step ) + { + const SEG s1 = current_path.CSegment( n ); + const SEG s2 = current_path.CSegment( n + step ); + SEG s1opt, s2opt; + + if( DIRECTION_45( s1 ).IsObtuse( DIRECTION_45( s2 ) ) ) + { + VECTOR2I ip = *s1.IntersectLines( s2 ); + + if( s1.Distance( ip ) <= 1 || s2.Distance( ip ) <= 1 ) + { + s1opt = SEG( s1.a, ip ); + s2opt = SEG( ip, s2.b ); + } + else + { + s1opt = SEG( s1.a, ip ); + s2opt = SEG( ip, s2.b ); + } - breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c + d_horiz ) ); - breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c - d_horiz ) ); - breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c + d_vert ) ); - breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c - d_vert ) ); + if( DIRECTION_45( s1opt ).IsObtuse( DIRECTION_45( s2opt ) ) ) + { + SHAPE_LINE_CHAIN opt_path; + opt_path.Append( s1opt.a ); + opt_path.Append( s1opt.b ); + opt_path.Append( s2opt.b ); - if(aPermitDiagonal) - { - int l = aWidth + std::min(s.x, s.y) / 2; - VECTOR2I d_diag ; - - if(s.x >= s.y) - { - breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c + d_offset, c + d_offset + VECTOR2I(l, l))); - breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c + d_offset, c + d_offset - VECTOR2I(-l, l))); - breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c - d_offset, c - d_offset + VECTOR2I(-l, l))); - breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c - d_offset, c - d_offset - VECTOR2I(l, l))); - } else { - // fixme: this could be done more efficiently - breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c + d_offset, c + d_offset + VECTOR2I(l, l))); - breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c - d_offset, c - d_offset - VECTOR2I(-l, l))); - breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c + d_offset, c + d_offset + VECTOR2I(-l, l))); - breakouts.push_back ( SHAPE_LINE_CHAIN ( c, c - d_offset, c - d_offset - VECTOR2I(l, l))); - - } - } + PNS_LINE opt_track( *aLine, opt_path ); - return breakouts; -} - - + if( !checkColliding( &opt_track ) ) + { + current_path.Replace( s1.Index() + 1, s2.Index(), ip ); + // removeCachedSegments(aLine, s1.Index(), s2.Index()); + n_segs = current_path.SegmentCount(); + found_anything = true; + break; + } + } + } -PNS_OPTIMIZER::BreakoutList PNS_OPTIMIZER::computeBreakouts( int aWidth, const PNS_ITEM *aItem, bool aPermitDiagonal ) const -{ - switch(aItem->GetKind()) - { - case PNS_ITEM::VIA: - { - const PNS_VIA *via = static_cast (aItem); - return circleBreakouts ( aWidth, via->GetShape(), aPermitDiagonal ); - } + n++; + } - case PNS_ITEM::SOLID: - { - const SHAPE *shape = aItem->GetShape(); - switch(shape->Type()) - { - case SH_RECT: - return rectBreakouts (aWidth, shape, aPermitDiagonal); - case SH_CIRCLE: - return circleBreakouts (aWidth, shape, aPermitDiagonal); - default: - break; - } - } - default: - break; - } - return BreakoutList(); + if( !found_anything ) + { + if( step <= 2 ) + { + line = current_path; + return line.SegmentCount() < segs_pre; + } + + step--; + } + } + + return line.SegmentCount() < segs_pre; } -PNS_ITEM *PNS_OPTIMIZER::findPadOrVia ( int aLayer, int aNet, const VECTOR2I& aP) const -{ - PNS_NODE::OptJoint jt = m_world->FindJoint ( aP, aLayer, aNet ); - if(!jt) - return NULL; - BOOST_FOREACH (PNS_ITEM *item, jt->GetLinkList() ) - { - if(item->GetKind() == PNS_ITEM::VIA || item->GetKind() == PNS_ITEM::SOLID) - return item; - } - return NULL; +bool PNS_OPTIMIZER::mergeFull( PNS_LINE* aLine ) +{ + SHAPE_LINE_CHAIN& line = aLine->GetLine(); + int step = line.SegmentCount() - 1; + + int segs_pre = line.SegmentCount(); + + line.Simplify(); + + if( step < 0 ) + return false; + + SHAPE_LINE_CHAIN current_path( line ); + + while( 1 ) + { + int n_segs = current_path.SegmentCount(); + int max_step = n_segs - 2; + + if( step > max_step ) + step = max_step; + + if( step < 1 ) + break; + + bool found_anything = mergeStep( aLine, current_path, step ); + + if( !found_anything ) + step--; + } + + aLine->SetShape( current_path ); + + return current_path.SegmentCount() < segs_pre; } -int PNS_OPTIMIZER::smartPadsSingle( PNS_LINE *aLine, PNS_ITEM *aPad, bool aEnd, int aEndVertex ) + +bool PNS_OPTIMIZER::Optimize( PNS_LINE* aLine, PNS_LINE* aResult, int aStartVertex, int aEndVertex ) { - int min_cost = INT_MAX;//PNS_COST_ESTIMATOR::CornerCost( line ); - int min_len = INT_MAX; - DIRECTION_45 dir; - - const int ForbiddenAngles = DIRECTION_45::ANG_ACUTE | DIRECTION_45::ANG_RIGHT | DIRECTION_45::ANG_HALF_FULL | DIRECTION_45::ANG_UNDEFINED; + if( !aResult ) + aResult = aLine; + else + *aResult = *aLine; - typedef pair RtVariant; - vector variants; + m_keepPostures = false; - BreakoutList breakouts = computeBreakouts( aLine->GetWidth(), aPad, true ); + bool rv = false; - SHAPE_LINE_CHAIN line = (aEnd ? aLine->GetCLine().Reverse() : aLine->GetCLine()); + if( m_effortLevel & MERGE_SEGMENTS ) + rv |= mergeFull( aResult ); - //bool startDiagonal = DIRECTION_45( line.CSegment(0) ).IsDiagonal(); + if( m_effortLevel & MERGE_OBTUSE ) + rv |= mergeObtuse( aResult ); - int p_end = min (aEndVertex, min (3 , line.PointCount() - 1)); + if( m_effortLevel & SMART_PADS ) + rv |= runSmartPads( aResult ); - for (int p = 1; p <= p_end; p++) - { - BOOST_FOREACH(SHAPE_LINE_CHAIN& l, breakouts) - { - //PNSDisplayDebugLine (l, 0); - - - for(int diag = 0; diag < 2; diag++) - { - SHAPE_LINE_CHAIN v; - SHAPE_LINE_CHAIN connect = dir.BuildInitialTrace( l.CPoint(-1), line.CPoint(p), diag == 0); - - DIRECTION_45 dir_bkout ( l.CSegment(-1 )); - //DIRECTION_45 dir_head ( line.CSegment(p + 1)); + return rv; +} - int ang1 = dir_bkout.Angle ( DIRECTION_45(connect.CSegment(0) )); - int ang2 = 0; - //int ang2 = dir_head.Angle ( DIRECTION_45(connect.CSegment(-1) )); - if( (ang1 | ang2) & ForbiddenAngles ) - continue; +bool PNS_OPTIMIZER::mergeStep( PNS_LINE* aLine, SHAPE_LINE_CHAIN& aCurrentPath, int step ) +{ + int n = 0; + int n_segs = aCurrentPath.SegmentCount(); - if(l.Length() > line.Length()) - continue; + int cost_orig = PNS_COST_ESTIMATOR::CornerCost( aCurrentPath ); - v = l; - v.Append ( connect ); + if( aLine->GetCLine().SegmentCount() < 4 ) + return false; - for(int i = p + 1; i < line.PointCount(); i++) - v.Append( line.CPoint(i) ); - - PNS_LINE tmp(*aLine, v); - //tmp.GetLine().Simplify(); - int cc = tmp.CountCorners(ForbiddenAngles); + DIRECTION_45 orig_start( aLine->GetCLine().CSegment( 0 ) ); + DIRECTION_45 orig_end( aLine->GetCLine().CSegment( -1 ) ); - if(cc == 0) - { - RtVariant vp; - vp.first = p; - vp.second = aEnd ? v.Reverse() : v; - vp.second.Simplify(); - variants.push_back(vp); - } - - } - } - } + while( n < n_segs - step ) + { + const SEG s1 = aCurrentPath.CSegment( n ); + const SEG s2 = aCurrentPath.CSegment( n + step ); - SHAPE_LINE_CHAIN l_best; - bool found = false; - int p_best = -1; + SHAPE_LINE_CHAIN path[2], * picked = NULL; + int cost[2]; - BOOST_FOREACH(RtVariant& vp, variants) - { - PNS_LINE tmp (*aLine, vp.second); - int cost = PNS_COST_ESTIMATOR::CornerCost(vp.second); - int len = vp.second.Length(); + for( int i = 0; i < 2; i++ ) + { + bool postureMatch = true; + SHAPE_LINE_CHAIN bypass = DIRECTION_45().BuildInitialTrace( s1.a, s2.b, i ); + cost[i] = INT_MAX; - if(!checkColliding(&tmp)) - { - + if( n == 0 && orig_start != DIRECTION_45( bypass.CSegment( 0 ) ) ) + postureMatch = false; + else if( n == n_segs - step && orig_end != DIRECTION_45( bypass.CSegment( -1 ) ) ) + postureMatch = false; + + if( (postureMatch || !m_keepPostures) && !checkColliding( aLine, bypass ) ) + { + path[i] = aCurrentPath; + path[i].Replace( s1.Index(), s2.Index(), bypass ); + path[i].Simplify(); + cost[i] = PNS_COST_ESTIMATOR::CornerCost( path[i] ); + } + } + + if( cost[0] < cost_orig && cost[0] < cost[1] ) + picked = &path[0]; + else if( cost[1] < cost_orig ) + picked = &path[1]; + + if( picked ) + { + n_segs = aCurrentPath.SegmentCount(); + aCurrentPath = *picked; + return true; + } + + n++; + } + + return false; +} + + +PNS_OPTIMIZER::BreakoutList PNS_OPTIMIZER::circleBreakouts( int aWidth, + const SHAPE* aShape, bool aPermitDiagonal ) const +{ + BreakoutList breakouts; + + for( int angle = 0; angle < 360; angle += 45 ) + { + const SHAPE_CIRCLE* cir = static_cast( aShape ); + SHAPE_LINE_CHAIN l; + VECTOR2I p0 = cir->GetCenter(); + VECTOR2I v0( cir->GetRadius() * M_SQRT2, 0 ); + l.Append( p0 ); + l.Append( p0 + v0.Rotate( angle * M_PI / 180.0 ) ); + breakouts.push_back( l ); + } + + return breakouts; +} + + +PNS_OPTIMIZER::BreakoutList PNS_OPTIMIZER::rectBreakouts( int aWidth, + const SHAPE* aShape, bool aPermitDiagonal ) const +{ + const SHAPE_RECT* rect = static_cast(aShape); + VECTOR2I s = rect->GetSize(), c = rect->GetPosition() + VECTOR2I( s.x / 2, s.y / 2 ); + BreakoutList breakouts; + + VECTOR2I d_offset; + + d_offset.x = (s.x > s.y) ? (s.x - s.y) / 2 : 0; + d_offset.y = (s.x < s.y) ? (s.y - s.x) / 2 : 0; + + VECTOR2I d_vert = VECTOR2I( 0, s.y / 2 + aWidth ); + VECTOR2I d_horiz = VECTOR2I( s.x / 2 + aWidth, 0 ); + + + breakouts.push_back( SHAPE_LINE_CHAIN( c, c + d_horiz ) ); + breakouts.push_back( SHAPE_LINE_CHAIN( c, c - d_horiz ) ); + breakouts.push_back( SHAPE_LINE_CHAIN( c, c + d_vert ) ); + breakouts.push_back( SHAPE_LINE_CHAIN( c, c - d_vert ) ); + + if( aPermitDiagonal ) + { + int l = aWidth + std::min( s.x, s.y ) / 2; + VECTOR2I d_diag; + + if( s.x >= s.y ) + { + breakouts.push_back( SHAPE_LINE_CHAIN( c, c + d_offset, + c + d_offset + VECTOR2I( l, l ) ) ); + breakouts.push_back( SHAPE_LINE_CHAIN( c, c + d_offset, + c + d_offset - VECTOR2I( -l, l ) ) ); + breakouts.push_back( SHAPE_LINE_CHAIN( c, c - d_offset, + c - d_offset + VECTOR2I( -l, l ) ) ); + breakouts.push_back( SHAPE_LINE_CHAIN( c, c - d_offset, + c - d_offset - VECTOR2I( l, l ) ) ); + } + else + { + // fixme: this could be done more efficiently + breakouts.push_back( SHAPE_LINE_CHAIN( c, c + d_offset, + c + d_offset + VECTOR2I( l, l ) ) ); + breakouts.push_back( SHAPE_LINE_CHAIN( c, c - d_offset, + c - d_offset - VECTOR2I( -l, l ) ) ); + breakouts.push_back( SHAPE_LINE_CHAIN( c, c + d_offset, + c + d_offset + VECTOR2I( -l, l ) ) ); + breakouts.push_back( SHAPE_LINE_CHAIN( c, c - d_offset, + c - d_offset - VECTOR2I( l, l ) ) ); + } + } + + return breakouts; +} + + +PNS_OPTIMIZER::BreakoutList PNS_OPTIMIZER::computeBreakouts( int aWidth, + const PNS_ITEM* aItem, bool aPermitDiagonal ) const +{ + switch( aItem->GetKind() ) + { + case PNS_ITEM::VIA: + { + const PNS_VIA* via = static_cast( aItem ); + return circleBreakouts( aWidth, via->GetShape(), aPermitDiagonal ); + } + + case PNS_ITEM::SOLID: + { + const SHAPE* shape = aItem->GetShape(); + + switch( shape->Type() ) + { + case SH_RECT: + return rectBreakouts( aWidth, shape, aPermitDiagonal ); + + case SH_CIRCLE: + return circleBreakouts( aWidth, shape, aPermitDiagonal ); + + default: + break; + } + } + + default: + break; + } + + return BreakoutList(); +} + + +PNS_ITEM* PNS_OPTIMIZER::findPadOrVia( int aLayer, int aNet, const VECTOR2I& aP ) const +{ + PNS_NODE::OptJoint jt = m_world->FindJoint( aP, aLayer, aNet ); + + if( !jt ) + return NULL; + + BOOST_FOREACH( PNS_ITEM * item, jt->GetLinkList() ) + { + if( item->GetKind() == PNS_ITEM::VIA || item->GetKind() == PNS_ITEM::SOLID ) + return item; + } + + return NULL; +} + + +int PNS_OPTIMIZER::smartPadsSingle( PNS_LINE* aLine, PNS_ITEM* aPad, bool aEnd, int aEndVertex ) +{ + int min_cost = INT_MAX; // PNS_COST_ESTIMATOR::CornerCost( line ); + int min_len = INT_MAX; + DIRECTION_45 dir; + + const int ForbiddenAngles = DIRECTION_45::ANG_ACUTE | DIRECTION_45::ANG_RIGHT | + DIRECTION_45::ANG_HALF_FULL | DIRECTION_45::ANG_UNDEFINED; + + typedef pair RtVariant; + vector variants; + + BreakoutList breakouts = computeBreakouts( aLine->GetWidth(), aPad, true ); + + SHAPE_LINE_CHAIN line = ( aEnd ? aLine->GetCLine().Reverse() : aLine->GetCLine() ); + + // bool startDiagonal = DIRECTION_45( line.CSegment(0) ).IsDiagonal(); + + int p_end = min( aEndVertex, min( 3, line.PointCount() - 1 ) ); + + for( int p = 1; p <= p_end; p++ ) + { + BOOST_FOREACH( SHAPE_LINE_CHAIN & l, breakouts ) { + // PNSDisplayDebugLine (l, 0); + + + for( int diag = 0; diag < 2; diag++ ) + { + SHAPE_LINE_CHAIN v; + SHAPE_LINE_CHAIN connect = dir.BuildInitialTrace( l.CPoint( -1 ), + line.CPoint( p ), diag == 0 ); + + DIRECTION_45 dir_bkout( l.CSegment( -1 ) ); + // DIRECTION_45 dir_head ( line.CSegment(p + 1)); + + int ang1 = dir_bkout.Angle( DIRECTION_45( connect.CSegment( 0 ) ) ); + int ang2 = 0; + // int ang2 = dir_head.Angle ( DIRECTION_45(connect.CSegment(-1) )); + + if( (ang1 | ang2) & ForbiddenAngles ) + continue; + + if( l.Length() > line.Length() ) + continue; + + v = l; + + v.Append( connect ); + + for( int i = p + 1; i < line.PointCount(); i++ ) + v.Append( line.CPoint( i ) ); + + PNS_LINE tmp( *aLine, v ); + // tmp.GetLine().Simplify(); + int cc = tmp.CountCorners( ForbiddenAngles ); + + if( cc == 0 ) + { + RtVariant vp; + vp.first = p; + vp.second = aEnd ? v.Reverse() : v; + vp.second.Simplify(); + variants.push_back( vp ); + } + } + } + } + + SHAPE_LINE_CHAIN l_best; + bool found = false; + int p_best = -1; + + BOOST_FOREACH( RtVariant & vp, variants ) + { + PNS_LINE tmp( *aLine, vp.second ); + int cost = PNS_COST_ESTIMATOR::CornerCost( vp.second ); + int len = vp.second.Length(); + + if( !checkColliding( &tmp ) ) + { /* if(aEnd) - PNSDisplayDebugLine (l_best, 6); - else - PNSDisplayDebugLine (l_best, 5);*/ + * PNSDisplayDebugLine (l_best, 6); + * else + * PNSDisplayDebugLine (l_best, 5);*/ - if(cost < min_cost || (cost == min_cost && len < min_len)) - { - l_best = vp.second; - p_best = vp.first; - found = true; - - //if(cost == min_cost) - if(cost == min_cost) - min_len = std::min(len, min_len); - min_cost = std::min(cost, min_cost); - } - - } - } + if( cost < min_cost || ( cost == min_cost && len < min_len ) ) + { + l_best = vp.second; + p_best = vp.first; + found = true; - if(found) - { -// printf("end: %d, p-best: %d, p-end: %d, p-total: %d\n", aEnd, p_best, p_end, l_best.PointCount()); + // if(cost == min_cost) + if( cost == min_cost ) + min_len = std::min( len, min_len ); -// if(!aEnd) -// PNSDisplayDebugLine (l_best, 5); -// else + min_cost = std::min( cost, min_cost ); + } + } + } - aLine->SetShape(l_best); - return p_best; - } - return -1; + if( found ) + { +// printf("end: %d, p-best: %d, p-end: %d, p-total: %d\n", aEnd, p_best, p_end, l_best.PointCount()); + +// if(!aEnd) +// PNSDisplayDebugLine (l_best, 5); +// else + + aLine->SetShape( l_best ); + return p_best; + } + + return -1; } -bool PNS_OPTIMIZER::runSmartPads(PNS_LINE *aLine) + +bool PNS_OPTIMIZER::runSmartPads( PNS_LINE* aLine ) { - SHAPE_LINE_CHAIN& line = aLine->GetLine(); + SHAPE_LINE_CHAIN& line = aLine->GetLine(); - if (line.PointCount() < 3) - return false; + if( line.PointCount() < 3 ) + return false; - VECTOR2I p_start = line.CPoint(0), p_end = line.CPoint(-1); + VECTOR2I p_start = line.CPoint( 0 ), p_end = line.CPoint( -1 ); - PNS_ITEM *startPad = findPadOrVia( aLine->GetLayer(), aLine->GetNet(), p_start); - PNS_ITEM *endPad = findPadOrVia( aLine->GetLayer(), aLine->GetNet(), p_end); + PNS_ITEM* startPad = findPadOrVia( aLine->GetLayer(), aLine->GetNet(), p_start ); + PNS_ITEM* endPad = findPadOrVia( aLine->GetLayer(), aLine->GetNet(), p_end ); - int vtx = -1; + int vtx = -1; - if(startPad) - vtx = smartPadsSingle(aLine, startPad, false, 3); - if(endPad) - smartPadsSingle(aLine, endPad, true, vtx < 0 ? line.PointCount() - 1 : line.PointCount() - 1 - vtx); + if( startPad ) + vtx = smartPadsSingle( aLine, startPad, false, 3 ); - aLine->GetLine().Simplify(); - return true; + if( endPad ) + smartPadsSingle( aLine, endPad, true, + vtx < 0 ? line.PointCount() - 1 : line.PointCount() - 1 - vtx ); + + aLine->GetLine().Simplify(); + return true; } -bool PNS_OPTIMIZER::Optimize ( PNS_LINE *aLine, int aEffortLevel, PNS_NODE *aWorld ) + +bool PNS_OPTIMIZER::Optimize( PNS_LINE* aLine, int aEffortLevel, PNS_NODE* aWorld ) { - PNS_OPTIMIZER opt( aWorld ? aWorld : aLine->GetWorld() ); - opt.SetEffortLevel (aEffortLevel); - opt.SetCollisionMask(-1); - return opt.Optimize(aLine); + PNS_OPTIMIZER opt( aWorld ? aWorld : aLine->GetWorld() ); + + opt.SetEffortLevel( aEffortLevel ); + opt.SetCollisionMask( -1 ); + return opt.Optimize( aLine ); } + diff --git a/pcbnew/router/pns_optimizer.h b/pcbnew/router/pns_optimizer.h index f090528273..bafc88bc0a 100644 --- a/pcbnew/router/pns_optimizer.h +++ b/pcbnew/router/pns_optimizer.h @@ -3,20 +3,21 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ + #ifndef __PNS_OPTIMIZER_H #define __PNS_OPTIMIZER_H @@ -30,135 +31,137 @@ class PNS_NODE; class PNS_LINE; class PNS_ROUTER; - /** * Class PNS_COST_ESTIMATOR * * Calculates the cost of a given line, taking corner angles and total length into account. - **/ + **/ -class PNS_COST_ESTIMATOR +class PNS_COST_ESTIMATOR { - public: - PNS_COST_ESTIMATOR(): - m_lengthCost (0), - m_cornerCost (0) - {}; +public: + PNS_COST_ESTIMATOR() : + m_lengthCost( 0 ), + m_cornerCost( 0 ) + {}; - PNS_COST_ESTIMATOR(const PNS_COST_ESTIMATOR &b): - m_lengthCost (b.m_lengthCost), - m_cornerCost (b.m_cornerCost) - {}; + PNS_COST_ESTIMATOR( const PNS_COST_ESTIMATOR& b ) : + m_lengthCost( b.m_lengthCost ), + m_cornerCost( b.m_cornerCost ) + {}; - ~PNS_COST_ESTIMATOR() {}; - - static int CornerCost ( const SEG& a, const SEG& b); - static int CornerCost ( const SHAPE_LINE_CHAIN& aLine ); - static int CornerCost ( const PNS_LINE& aLine); + ~PNS_COST_ESTIMATOR() {}; - void Add(PNS_LINE &aLine); - void Remove (PNS_LINE &aLine); - void Replace(PNS_LINE &aOldLine, PNS_LINE& aNewLine); - - bool IsBetter( PNS_COST_ESTIMATOR& aOther, double aLengthTollerance, double aCornerTollerace ) const; + static int CornerCost( const SEG& a, const SEG& b ); + static int CornerCost( const SHAPE_LINE_CHAIN& aLine ); + static int CornerCost( const PNS_LINE& aLine ); - double GetLengthCost() const { return m_lengthCost; } - double GetCornerCost() const { return m_cornerCost; } + void Add( PNS_LINE& aLine ); + void Remove( PNS_LINE& aLine ); + void Replace( PNS_LINE& aOldLine, PNS_LINE& aNewLine ); - private: - double m_lengthCost; - int m_cornerCost; + bool IsBetter( PNS_COST_ESTIMATOR& aOther, double aLengthTollerance, + double aCornerTollerace ) const; + + double GetLengthCost() const { return m_lengthCost; } + double GetCornerCost() const { return m_cornerCost; } + +private: + double m_lengthCost; + int m_cornerCost; }; /** * Class PNS_OPTIMIZER - * + * * Performs various optimizations of the lines being routed, attempting to make the lines shorter * and less cornery. There are 3 kinds of optimizations so far: - * - Merging obtuse segments (MERGE_OBTUSE): tries to join together as many + * - Merging obtuse segments (MERGE_OBTUSE): tries to join together as many * obtuse segments as possible without causing collisions * - Rerouting path between pair of line corners with a 2-segment "\__" line and iteratively repeating * the procedure as long as the total cost of the line keeps decreasing - * - "Smart Pads" - that is, rerouting pad/via exits to make them look nice (SMART_PADS). + * - "Smart Pads" - that is, rerouting pad/via exits to make them look nice (SMART_PADS). **/ -class PNS_OPTIMIZER +class PNS_OPTIMIZER { - public: +public: + enum OptimizationEffort + { + MERGE_SEGMENTS = 0x01, + SMART_PADS = 0x02, + MERGE_OBTUSE = 0x04 + }; - enum OptimizationEffort { - MERGE_SEGMENTS = 0x1, - SMART_PADS = 0x2, - MERGE_OBTUSE = 0x4 - }; + PNS_OPTIMIZER( PNS_NODE* aWorld ); + ~PNS_OPTIMIZER(); - PNS_OPTIMIZER( PNS_NODE *aWorld ); - ~PNS_OPTIMIZER(); + ///> a quick shortcut to optmize a line without creating and setting up an optimizer + static bool Optimize( PNS_LINE* aLine, int aEffortLevel, PNS_NODE* aWorld = NULL ); - ///> a quick shortcut to optmize a line without creating and setting up an optimizer - static bool Optimize ( PNS_LINE *aLine, int aEffortLevel, PNS_NODE *aWorld = NULL ); + bool Optimize( PNS_LINE* aLine, PNS_LINE* aResult = NULL, + int aStartVertex = 0, int aEndVertex = -1 ); - bool Optimize ( PNS_LINE *aLine, PNS_LINE *aResult = NULL, int aStartVertex = 0, int aEndVertex = -1); + void SetWorld( PNS_NODE* aNode ) { m_world = aNode; } + void CacheStaticItem( PNS_ITEM* aItem ); + void CacheRemove( PNS_ITEM* aItem ); + void ClearCache( bool aStaticOnly = false ); - void SetWorld(PNS_NODE *aNode) { m_world = aNode; } - void CacheStaticItem (PNS_ITEM *aItem); - void CacheRemove( PNS_ITEM *aItem ); - void ClearCache( bool aStaticOnly = false ); + void SetCollisionMask( int aMask ) + { + m_collisionKindMask = aMask; + } - void SetCollisionMask ( int aMask ) - { - m_collisionKindMask = aMask; - } + void SetEffortLevel( int aEffort ) + { + m_effortLevel = aEffort; + } - void SetEffortLevel ( int aEffort ) - { - m_effortLevel = aEffort; - } - - private: +private: + static const int MaxCachedItems = 256; - static const int MaxCachedItems = 256; + typedef std::vector BreakoutList; - typedef std::vector BreakoutList; + struct CacheVisitor; - struct CacheVisitor; - - struct CachedItem - { - int hits; - bool isStatic; - }; + struct CachedItem + { + int hits; + bool isStatic; + }; - bool mergeObtuse (PNS_LINE *aLine); - bool mergeFull (PNS_LINE *aLine); - bool removeUglyCorners (PNS_LINE *aLine); - bool runSmartPads(PNS_LINE *aLine); - bool mergeStep ( PNS_LINE *aLine, SHAPE_LINE_CHAIN& aCurrentLine, int step ); + bool mergeObtuse( PNS_LINE* aLine ); + bool mergeFull( PNS_LINE* aLine ); + bool removeUglyCorners( PNS_LINE* aLine ); + bool runSmartPads( PNS_LINE* aLine ); + bool mergeStep( PNS_LINE* aLine, SHAPE_LINE_CHAIN& aCurrentLine, int step ); - bool checkColliding( PNS_ITEM *aItem, bool aUpdateCache = true ); - bool checkColliding( PNS_LINE *aLine, const SHAPE_LINE_CHAIN& aOptPath ); + bool checkColliding( PNS_ITEM* aItem, bool aUpdateCache = true ); + bool checkColliding( PNS_LINE* aLine, const SHAPE_LINE_CHAIN& aOptPath ); - void cacheAdd( PNS_ITEM *aItem, bool aIsStatic ); - void removeCachedSegments (PNS_LINE *aLine, int aStartVertex = 0, int aEndVertex = -1); + void cacheAdd( PNS_ITEM* aItem, bool aIsStatic ); + void removeCachedSegments( PNS_LINE* aLine, int aStartVertex = 0, int aEndVertex = -1 ); - BreakoutList circleBreakouts( int aWidth, const SHAPE *aShape, bool aPermitDiagonal ) const; - BreakoutList rectBreakouts( int aWidth, const SHAPE *aShape, bool aPermitDiagonal ) const; - BreakoutList ovalBreakouts( int aWidth, const SHAPE *aShape, bool aPermitDiagonal ) const; - BreakoutList computeBreakouts( int aWidth, const PNS_ITEM *aItem, bool aPermitDiagonal ) const; + BreakoutList circleBreakouts( int aWidth, const SHAPE* aShape, bool aPermitDiagonal ) const; + BreakoutList rectBreakouts( int aWidth, const SHAPE* aShape, bool aPermitDiagonal ) const; + BreakoutList ovalBreakouts( int aWidth, const SHAPE* aShape, bool aPermitDiagonal ) const; + BreakoutList computeBreakouts( int aWidth, const PNS_ITEM* aItem, + bool aPermitDiagonal ) const; - int smartPadsSingle( PNS_LINE *aLine, PNS_ITEM *aPad, bool aEnd, int aEndVertex ); + int smartPadsSingle( PNS_LINE* aLine, PNS_ITEM* aPad, bool aEnd, int aEndVertex ); - PNS_ITEM *findPadOrVia ( int aLayer, int aNet, const VECTOR2I& aP) const; + PNS_ITEM* findPadOrVia( int aLayer, int aNet, const VECTOR2I& aP ) const; - SHAPE_INDEX_LIST m_cache; + SHAPE_INDEX_LIST m_cache; - typedef boost::unordered_map CachedItemTags; - CachedItemTags m_cacheTags; - PNS_NODE *m_world; - int m_collisionKindMask; - int m_effortLevel; - bool m_keepPostures; + typedef boost::unordered_map CachedItemTags; + CachedItemTags m_cacheTags; + PNS_NODE* m_world; + int m_collisionKindMask; + int m_effortLevel; + bool m_keepPostures; }; #endif + diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 720d4f06e0..8f13031c47 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -3,20 +3,21 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ + #include #include @@ -33,7 +34,7 @@ #include #include #include - + #include "trace.h" #include "pns_node.h" #include "pns_line_placer.h" @@ -48,727 +49,765 @@ #include #include #include -#include +#include using namespace std; -// an ugly singleton for drawing debug items within the router context. To be fixed sometime in the future. -static PNS_ROUTER *theRouter; +// an ugly singleton for drawing debug items within the router context. +// To be fixed sometime in the future. +static PNS_ROUTER* theRouter; -class PCBNEW_CLEARANCE_FUNC : public PNS_CLEARANCE_FUNC +class PCBNEW_CLEARANCE_FUNC : public PNS_CLEARANCE_FUNC { - public: - PCBNEW_CLEARANCE_FUNC( BOARD *aBoard ) - { - m_clearanceCache.resize(aBoard->GetNetCount()); +public: + PCBNEW_CLEARANCE_FUNC( BOARD* aBoard ) + { + m_clearanceCache.resize( aBoard->GetNetCount() ); - for(unsigned int i = 0; i < aBoard->GetNetCount(); i++) - { - NETINFO_ITEM *ni = aBoard->FindNet(i); - wxString netClassName = ni->GetClassName(); - NETCLASS *nc = aBoard->m_NetClasses.Find(netClassName); - int clearance = nc->GetClearance(); - m_clearanceCache[i] = clearance; - TRACE(1, "Add net %d netclass %s clearance %d", i % netClassName.mb_str() % clearance); - } + for( unsigned int i = 0; i < aBoard->GetNetCount(); i++ ) + { + NETINFO_ITEM* ni = aBoard->FindNet( i ); + wxString netClassName = ni->GetClassName(); + NETCLASS* nc = aBoard->m_NetClasses.Find( netClassName ); + int clearance = nc->GetClearance(); + m_clearanceCache[i] = clearance; + TRACE( 1, "Add net %d netclass %s clearance %d", i % netClassName.mb_str() % + clearance ); + } - m_defaultClearance = 254000;//aBoard->m_NetClasses.Find ("Default clearance")->GetClearance(); - } + m_defaultClearance = 254000; // aBoard->m_NetClasses.Find ("Default clearance")->GetClearance(); + } - int operator() (const PNS_ITEM *a , const PNS_ITEM *b) - { - int net_a = a->GetNet(); - int cl_a = (net_a >= 0 ? m_clearanceCache[net_a] : m_defaultClearance); - int net_b = b->GetNet(); - int cl_b = (net_b >= 0 ? m_clearanceCache[net_b] : m_defaultClearance); - return std::max(cl_a, cl_b); - } - - private: + int operator()( const PNS_ITEM* a, const PNS_ITEM* b ) + { + int net_a = a->GetNet(); + int cl_a = (net_a >= 0 ? m_clearanceCache[net_a] : m_defaultClearance); + int net_b = b->GetNet(); + int cl_b = (net_b >= 0 ? m_clearanceCache[net_b] : m_defaultClearance); - vector m_clearanceCache; - int m_defaultClearance; + return std::max( cl_a, cl_b ); + } + +private: + vector m_clearanceCache; + int m_defaultClearance; }; -PNS_ITEM *PNS_ROUTER::syncPad( D_PAD *aPad ) +PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad ) { - PNS_LAYERSET layers; + PNS_LAYERSET layers; - switch(aPad->GetAttribute()) - { - case PAD_STANDARD: - layers = PNS_LAYERSET(0, 15); - break; - case PAD_SMD: - case PAD_CONN: - { - LAYER_MSK lmsk = aPad->GetLayerMask(); - int i; + switch( aPad->GetAttribute() ) + { + case PAD_STANDARD: + layers = PNS_LAYERSET( 0, 15 ); + break; - for(i = FIRST_COPPER_LAYER; i <= LAST_COPPER_LAYER; i++) - if( lmsk & (1<GetAttribute()); - return NULL; - } + case PAD_SMD: + case PAD_CONN: + { + LAYER_MSK lmsk = aPad->GetLayerMask(); + int i; - PNS_SOLID *solid = new PNS_SOLID; - - solid->SetLayers(layers); - solid->SetNet( aPad->GetNet() ); - wxPoint wx_c = aPad->GetPosition(); - wxSize wx_sz = aPad->GetSize(); - - VECTOR2I c(wx_c.x, wx_c.y); - VECTOR2I sz(wx_sz.x, wx_sz.y); - - solid->SetCenter( c ); - - - double orient = aPad->GetOrientation() / 10.0; - - if(orient == 90.0 || orient == 270.0) - sz = VECTOR2I(sz.y, sz.x); - else if (orient != 0.0 && orient != 180.0) - { - TRACEn(0, "non-orthogonal pad rotations not supported yet"); - delete solid; - return NULL; - } - - switch(aPad->GetShape()) - { - case PAD_CIRCLE: - solid->SetShape ( new SHAPE_CIRCLE ( c, sz.x / 2) ); - break; - case PAD_OVAL: - if(sz.x == sz.y) - solid->SetShape ( new SHAPE_CIRCLE ( c, sz.x / 2) ); - else - solid->SetShape ( new SHAPE_RECT ( c - sz / 2, sz.x, sz.y) ); - break; - - case PAD_RECT: - solid->SetShape ( new SHAPE_RECT ( c - sz / 2, sz.x, sz.y) ); - break; - - default: - TRACEn(0, "unsupported pad shape"); - delete solid; - return NULL; - } + for( i = FIRST_COPPER_LAYER; i <= LAST_COPPER_LAYER; i++ ) + if( lmsk & (1 << i) ) + { + layers = PNS_LAYERSET( i ); + break; + } - solid->SetParent(aPad); - return solid; -} - -PNS_ITEM *PNS_ROUTER::syncTrack( TRACK *aTrack ) -{ + break; + } - PNS_SEGMENT *s = new PNS_SEGMENT( SEG (aTrack->GetStart(), aTrack->GetEnd() ), aTrack->GetNet() ); - - s->SetWidth( aTrack->GetWidth() ); - s->SetLayers (PNS_LAYERSET(aTrack->GetLayer())); - s->SetParent(aTrack); - return s; + default: + TRACE( 0, "unsupported pad type 0x%x", aPad->GetAttribute() ); + return NULL; + } + + PNS_SOLID* solid = new PNS_SOLID; + + solid->SetLayers( layers ); + solid->SetNet( aPad->GetNet() ); + wxPoint wx_c = aPad->GetPosition(); + wxSize wx_sz = aPad->GetSize(); + + VECTOR2I c( wx_c.x, wx_c.y ); + VECTOR2I sz( wx_sz.x, wx_sz.y ); + + solid->SetCenter( c ); + + double orient = aPad->GetOrientation() / 10.0; + + if( orient == 90.0 || orient == 270.0 ) + sz = VECTOR2I( sz.y, sz.x ); + else if( orient != 0.0 && orient != 180.0 ) + { + TRACEn( 0, "non-orthogonal pad rotations not supported yet" ); + delete solid; + return NULL; + } + + switch( aPad->GetShape() ) + { + case PAD_CIRCLE: + solid->SetShape( new SHAPE_CIRCLE( c, sz.x / 2 ) ); + break; + + case PAD_OVAL: + if( sz.x == sz.y ) + solid->SetShape( new SHAPE_CIRCLE( c, sz.x / 2 ) ); + else + solid->SetShape( new SHAPE_RECT( c - sz / 2, sz.x, sz.y ) ); + break; + + case PAD_RECT: + solid->SetShape( new SHAPE_RECT( c - sz / 2, sz.x, sz.y ) ); + break; + + default: + TRACEn( 0, "unsupported pad shape" ); + delete solid; + return NULL; + } + + solid->SetParent( aPad ); + return solid; } - -PNS_ITEM *PNS_ROUTER::syncVia( SEGVIA *aVia ) -{ - PNS_VIA *v = new PNS_VIA( - aVia->GetPosition(), - PNS_LAYERSET(0, 15), - aVia->GetWidth(), - aVia->GetNet()); - v->SetParent(aVia); - return v; +PNS_ITEM* PNS_ROUTER::syncTrack( TRACK* aTrack ) +{ + PNS_SEGMENT* s = + new PNS_SEGMENT( SEG( aTrack->GetStart(), aTrack->GetEnd() ), aTrack->GetNet() ); + + s->SetWidth( aTrack->GetWidth() ); + s->SetLayers( PNS_LAYERSET( aTrack->GetLayer() ) ); + s->SetParent( aTrack ); + return s; } -void PNS_ROUTER::SetBoard( BOARD *aBoard ) + +PNS_ITEM* PNS_ROUTER::syncVia( SEGVIA* aVia ) { - m_board = aBoard; - TRACE(1, "m_board = %p\n", m_board); + PNS_VIA* v = new PNS_VIA( + aVia->GetPosition(), + PNS_LAYERSET( 0, 15 ), + aVia->GetWidth(), + aVia->GetNet() ); + + v->SetParent( aVia ); + return v; } - + + +void PNS_ROUTER::SetBoard( BOARD* aBoard ) +{ + m_board = aBoard; + TRACE( 1, "m_board = %p\n", m_board ); +} + + int PNS_ROUTER::NextCopperLayer( bool aUp ) { - LAYER_MSK mask = m_board->GetEnabledLayers() & m_board->GetVisibleLayers(); - LAYER_NUM l = m_currentLayer; + LAYER_MSK mask = m_board->GetEnabledLayers() & m_board->GetVisibleLayers(); + LAYER_NUM l = m_currentLayer; - do { - l += (aUp ? 1 : -1); - if(l > LAST_COPPER_LAYER) - l = FIRST_COPPER_LAYER; - - if(l < FIRST_COPPER_LAYER) - l = LAST_COPPER_LAYER; + do { + l += ( aUp ? 1 : -1 ); - if(mask & GetLayerMask(l)) - return l; - - } while (l != m_currentLayer); + if( l > LAST_COPPER_LAYER ) + l = FIRST_COPPER_LAYER; - return l; + if( l < FIRST_COPPER_LAYER ) + l = LAST_COPPER_LAYER; + + if( mask & GetLayerMask( l ) ) + return l; + } while( l != m_currentLayer ); + + return l; } + void PNS_ROUTER::SyncWorld() { - vector pads; + vector pads; - if(!m_board) - { - TRACEn(0,"No board attached, aborting sync."); - return; - } - - ClearWorld(); - + if( !m_board ) + { + TRACEn( 0, "No board attached, aborting sync." ); + return; + } - m_clearanceFunc = new PCBNEW_CLEARANCE_FUNC(m_board); - m_world = new PNS_NODE(); - m_world->SetClearanceFunctor ( m_clearanceFunc ); - m_world->SetMaxClearance ( 1000000 ); //m_board->GetBiggestClearanceValue()); - pads = m_board->GetPads(); + ClearWorld(); - BOOST_FOREACH( D_PAD *pad, pads ) - { - PNS_ITEM *solid = syncPad(pad); - if(solid) - m_world->Add(solid); - } - for(TRACK *t = m_board->m_Track; t; t = t->Next()) - { - KICAD_T type = t->Type(); - PNS_ITEM *item = NULL; - if(type == PCB_TRACE_T) - item = syncTrack ( t ); - else if( type == PCB_VIA_T ) - item = syncVia (static_cast (t)); + m_clearanceFunc = new PCBNEW_CLEARANCE_FUNC( m_board ); + m_world = new PNS_NODE(); + m_world->SetClearanceFunctor( m_clearanceFunc ); + m_world->SetMaxClearance( 1000000 ); // m_board->GetBiggestClearanceValue()); + pads = m_board->GetPads(); - if(item) - m_world->Add(item); - } + BOOST_FOREACH( D_PAD * pad, pads ) { + PNS_ITEM* solid = syncPad( pad ); - m_placer = new PNS_LINE_PLACER ( m_world ); + if( solid ) + m_world->Add( solid ); + } + + for( TRACK* t = m_board->m_Track; t; t = t->Next() ) + { + KICAD_T type = t->Type(); + PNS_ITEM* item = NULL; + + if( type == PCB_TRACE_T ) + item = syncTrack( t ); + else if( type == PCB_VIA_T ) + item = syncVia( static_cast (t) ); + + if( item ) + m_world->Add( item ); + } + + m_placer = new PNS_LINE_PLACER( m_world ); } + PNS_ROUTER::PNS_ROUTER() { - theRouter = this; + theRouter = this; - m_clearanceFunc = NULL; + m_clearanceFunc = NULL; - m_currentLayer = 1; - m_placingVia = false; - m_currentNet = -1; - m_state = IDLE; - m_world = NULL; - m_placer = NULL; - m_previewItems = NULL; - m_start_diagonal = false; - m_board = NULL; + m_currentLayer = 1; + m_placingVia = false; + m_currentNet = -1; + m_state = IDLE; + m_world = NULL; + m_placer = NULL; + m_previewItems = NULL; + m_start_diagonal = false; + m_board = NULL; - TRACE(1, "m_board = %p\n", m_board); + TRACE( 1, "m_board = %p\n", m_board ); } -void PNS_ROUTER::SetView(KiGfx::VIEW *aView) +void PNS_ROUTER::SetView( KiGfx::VIEW* aView ) { - if(m_previewItems) - { - m_previewItems->FreeItems(); - delete m_previewItems; - } - - m_view = aView; - m_previewItems = new KiGfx::VIEW_GROUP(m_view); - m_previewItems->SetLayer(ITEM_GAL_LAYER( GP_OVERLAY )); - m_view -> Add (m_previewItems); - m_previewItems->ViewSetVisible(true); + if( m_previewItems ) + { + m_previewItems->FreeItems(); + delete m_previewItems; + } + m_view = aView; + m_previewItems = new KiGfx::VIEW_GROUP( m_view ); + m_previewItems->SetLayer( ITEM_GAL_LAYER( GP_OVERLAY ) ); + m_view->Add( m_previewItems ); + m_previewItems->ViewSetVisible( true ); } -PNS_ROUTER *PNS_ROUTER::GetInstance() + +PNS_ROUTER* PNS_ROUTER::GetInstance() { - return theRouter; + return theRouter; } + PNS_ROUTER::~PNS_ROUTER() { - ClearWorld(); - theRouter = NULL; + ClearWorld(); + theRouter = NULL; } + void PNS_ROUTER::ClearWorld() { - if(m_world) - delete m_world; - if(m_clearanceFunc) - delete m_clearanceFunc; - if(m_placer) - delete m_placer; + if( m_world ) + delete m_world; - m_clearanceFunc = NULL; - m_world = NULL; - m_placer = NULL; + if( m_clearanceFunc ) + delete m_clearanceFunc; + + if( m_placer ) + delete m_placer; + + m_clearanceFunc = NULL; + m_world = NULL; + m_placer = NULL; } -void PNS_ROUTER::SetCurrentWidth (int w ) + +void PNS_ROUTER::SetCurrentWidth( int w ) { - // fixme: change width while routing - m_currentWidth = w; + // fixme: change width while routing + m_currentWidth = w; } + bool PNS_ROUTER::RoutingInProgress() const { - return m_state != IDLE; + return m_state != IDLE; } -const PNS_ITEMSET PNS_ROUTER::QueryHoverItems(const VECTOR2I&aP) +const PNS_ITEMSET PNS_ROUTER::QueryHoverItems( const VECTOR2I& aP ) { - if(m_state == IDLE) - return m_world->HitTest( aP ); - else - return m_placer->GetCurrentNode() -> HitTest(aP); + if( m_state == IDLE ) + return m_world->HitTest( aP ); + else + return m_placer->GetCurrentNode()->HitTest( aP ); } -const VECTOR2I PNS_ROUTER::SnapToItem( PNS_ITEM *item, VECTOR2I aP, bool& aSplitsSegment ) +const VECTOR2I PNS_ROUTER::SnapToItem( PNS_ITEM* item, VECTOR2I aP, bool& aSplitsSegment ) { - VECTOR2I anchor; + VECTOR2I anchor; - if(!item) - { - aSplitsSegment = false; - return aP; - } + if( !item ) + { + aSplitsSegment = false; + return aP; + } - switch(item->GetKind()) - { - case PNS_ITEM::SOLID: - anchor = static_cast(item)->GetCenter(); - aSplitsSegment = false; - break; - case PNS_ITEM::VIA: - anchor = static_cast(item)->GetPos(); - aSplitsSegment = false; - break; - case PNS_ITEM::SEGMENT: - { - PNS_SEGMENT *seg = static_cast(item); - const SEG& s = seg->GetSeg(); - int w = seg->GetWidth(); + switch( item->GetKind() ) + { + case PNS_ITEM::SOLID: + anchor = static_cast(item)->GetCenter(); + aSplitsSegment = false; + break; - aSplitsSegment = false; + case PNS_ITEM::VIA: + anchor = static_cast(item)->GetPos(); + aSplitsSegment = false; + break; - if ((aP - s.a).EuclideanNorm() < w / 2) - anchor = s.a; - else if ((aP - s.b).EuclideanNorm() < w / 2) - anchor = s.b; - else { - anchor = s.NearestPoint(aP); - aSplitsSegment = true; - } - break; - } - default: - break; - } - return anchor; + case PNS_ITEM::SEGMENT: + { + PNS_SEGMENT* seg = static_cast(item); + const SEG& s = seg->GetSeg(); + int w = seg->GetWidth(); + + aSplitsSegment = false; + + if( (aP - s.a).EuclideanNorm() < w / 2 ) + anchor = s.a; + else if( (aP - s.b).EuclideanNorm() < w / 2 ) + anchor = s.b; + else + { + anchor = s.NearestPoint( aP ); + aSplitsSegment = true; + } + + break; + } + + default: + break; + } + + return anchor; } -void PNS_ROUTER::StartRouting(const VECTOR2I& aP, PNS_ITEM *aStartItem) +void PNS_ROUTER::StartRouting( const VECTOR2I& aP, PNS_ITEM* aStartItem ) { - VECTOR2I p; - - static int unknowNetIdx = 0;//-10000; - - m_placingVia = false; - m_startsOnVia = false; - m_currentNet = -1; + VECTOR2I p; - bool splitSeg = false; + static int unknowNetIdx = 0; // -10000; - p = SnapToItem( aStartItem, aP, splitSeg ); + m_placingVia = false; + m_startsOnVia = false; + m_currentNet = -1; - if(!aStartItem || aStartItem->GetNet() < 0) - m_currentNet = unknowNetIdx--; - else - m_currentNet = aStartItem->GetNet(); + bool splitSeg = false; - m_currentStart = p; - m_originalStart = p; - m_currentEnd = p; + p = SnapToItem( aStartItem, aP, splitSeg ); - m_placer->SetInitialDirection(m_start_diagonal ? DIRECTION_45(DIRECTION_45::NE) : DIRECTION_45(DIRECTION_45::N)); - m_placer->StartPlacement(m_originalStart, m_currentNet, m_currentWidth, m_currentLayer); - m_state = ROUTE_TRACK; + if( !aStartItem || aStartItem->GetNet() < 0 ) + m_currentNet = unknowNetIdx--; + else + m_currentNet = aStartItem->GetNet(); - if(splitSeg) - splitAdjacentSegments(m_placer->GetCurrentNode(), aStartItem, p); + m_currentStart = p; + m_originalStart = p; + m_currentEnd = p; + m_placer->SetInitialDirection( m_start_diagonal ? DIRECTION_45( + DIRECTION_45::NE ) : DIRECTION_45( DIRECTION_45::N ) ); + m_placer->StartPlacement( m_originalStart, m_currentNet, m_currentWidth, m_currentLayer ); + m_state = ROUTE_TRACK; + if( splitSeg ) + splitAdjacentSegments( m_placer->GetCurrentNode(), aStartItem, p ); } -const VECTOR2I PNS_ROUTER::GetCurrentEnd( ) const + +const VECTOR2I PNS_ROUTER::GetCurrentEnd() const { - return m_currentEnd; + return m_currentEnd; } + void PNS_ROUTER::EraseView() { - BOOST_FOREACH(BOARD_ITEM *item, m_hiddenItems) - { - item->ViewSetVisible(true); - } - - if(m_previewItems) - m_previewItems->FreeItems(); - m_previewItems->ViewUpdate( KiGfx::VIEW_ITEM::GEOMETRY ); + BOOST_FOREACH( BOARD_ITEM* item, m_hiddenItems ) + { + item->ViewSetVisible( true ); + } + + if( m_previewItems ) + m_previewItems->FreeItems(); + + m_previewItems->ViewUpdate( KiGfx::VIEW_ITEM::GEOMETRY ); } -void PNS_ROUTER::DisplayItem(const PNS_ITEM* aItem, bool aIsHead) + +void PNS_ROUTER::DisplayItem( const PNS_ITEM* aItem, bool aIsHead ) { + ROUTER_PREVIEW_ITEM* pitem = new ROUTER_PREVIEW_ITEM( aItem, m_previewItems ); - ROUTER_PREVIEW_ITEM * pitem = new ROUTER_PREVIEW_ITEM (aItem, m_previewItems); - - m_previewItems->Add (pitem); - if(aIsHead) - pitem->MarkAsHead(); + m_previewItems->Add( pitem ); - pitem->ViewSetVisible(true); - m_previewItems->ViewUpdate( KiGfx::VIEW_ITEM::GEOMETRY | KiGfx::VIEW_ITEM::APPEARANCE ); + if( aIsHead ) + pitem->MarkAsHead(); + + pitem->ViewSetVisible( true ); + m_previewItems->ViewUpdate( KiGfx::VIEW_ITEM::GEOMETRY | KiGfx::VIEW_ITEM::APPEARANCE ); } -void PNS_ROUTER::DisplayDebugLine ( const SHAPE_LINE_CHAIN &aLine, int aType, int aWidth) + +void PNS_ROUTER::DisplayDebugLine( const SHAPE_LINE_CHAIN& aLine, int aType, int aWidth ) { - ROUTER_PREVIEW_ITEM * pitem = new ROUTER_PREVIEW_ITEM (NULL, m_previewItems); - - pitem->DebugLine (aLine, aWidth, aType ); - m_previewItems->Add (pitem); - pitem->ViewSetVisible(true); - m_previewItems->ViewUpdate( KiGfx::VIEW_ITEM::GEOMETRY | KiGfx::VIEW_ITEM::APPEARANCE ); + ROUTER_PREVIEW_ITEM* pitem = new ROUTER_PREVIEW_ITEM( NULL, m_previewItems ); + + pitem->DebugLine( aLine, aWidth, aType ); + m_previewItems->Add( pitem ); + pitem->ViewSetVisible( true ); + m_previewItems->ViewUpdate( KiGfx::VIEW_ITEM::GEOMETRY | KiGfx::VIEW_ITEM::APPEARANCE ); } -void PNS_ROUTER::DisplayDebugBox ( const BOX2I& aBox, int aType , int aWidth ) + +void PNS_ROUTER::DisplayDebugBox( const BOX2I& aBox, int aType, int aWidth ) { - } - -void PNS_ROUTER::Move(const VECTOR2I& aP, PNS_ITEM *endItem) + +void PNS_ROUTER::Move( const VECTOR2I& aP, PNS_ITEM* endItem ) { - PNS_NODE::ItemVector removed, added; - VECTOR2I p = aP; + PNS_NODE::ItemVector removed, added; + VECTOR2I p = aP; - if(m_state == IDLE) - return; + if( m_state == IDLE ) + return; - if(m_state == START_ROUTING) - { - - } + // TODO is something missing here? + if( m_state == START_ROUTING ) + { + } - EraseView(); + EraseView(); - m_currentEnd = p; - m_placer->Route(p); + m_currentEnd = p; + m_placer->Route( p ); - PNS_LINE current = m_placer->GetTrace(); + PNS_LINE current = m_placer->GetTrace(); - DisplayItem (¤t, true); + DisplayItem( ¤t, true ); - if(current.EndsWithVia()) - DisplayItem( ¤t.GetVia(), true ); + if( current.EndsWithVia() ) + DisplayItem( ¤t.GetVia(), true ); - m_placer->GetCurrentNode()->GetUpdatedItems(removed, added); + m_placer->GetCurrentNode()->GetUpdatedItems( removed, added ); - BOOST_FOREACH(PNS_ITEM *item, added) - { - DisplayItem(item); - } + BOOST_FOREACH( PNS_ITEM* item, added ) { + DisplayItem( item ); + } - BOOST_FOREACH(PNS_ITEM *item, removed) - { - BOARD_ITEM *parent = item->GetParent(); + BOOST_FOREACH( PNS_ITEM* item, removed ) + { + BOARD_ITEM* parent = item->GetParent(); - if(parent) - { - if(parent->ViewIsVisible()) - m_hiddenItems.insert(parent); + if( parent ) + { + if( parent->ViewIsVisible() ) + m_hiddenItems.insert( parent ); - parent->ViewSetVisible(false); - parent->ViewUpdate (KiGfx::VIEW_ITEM::APPEARANCE); - } - } + parent->ViewSetVisible( false ); + parent->ViewUpdate( KiGfx::VIEW_ITEM::APPEARANCE ); + } + } } -void PNS_ROUTER::splitAdjacentSegments(PNS_NODE *aNode, PNS_ITEM *aSeg, const VECTOR2I& aP ) + +void PNS_ROUTER::splitAdjacentSegments( PNS_NODE* aNode, PNS_ITEM* aSeg, const VECTOR2I& aP ) { - if(aSeg && aSeg->OfKind( PNS_ITEM::SEGMENT )) - { - PNS_NODE::OptJoint jt = aNode->FindJoint ( aP, aSeg->GetLayers().Start(), aSeg->GetNet()); + if( aSeg && aSeg->OfKind( PNS_ITEM::SEGMENT ) ) + { + PNS_NODE::OptJoint jt = aNode->FindJoint( aP, aSeg->GetLayers().Start(), aSeg->GetNet() ); - if(jt && jt->LinkCount() >= 1) - return; - - PNS_SEGMENT *s_old = static_cast(aSeg); - PNS_SEGMENT *s_new [2]; + if( jt && jt->LinkCount() >= 1 ) + return; - s_new[0] = s_old->Clone(); - s_new[1] = s_old->Clone(); + PNS_SEGMENT* s_old = static_cast(aSeg); + PNS_SEGMENT* s_new[2]; - s_new[0]->SetEnds (s_old->GetSeg().a, aP); - s_new[1]->SetEnds (aP, s_old->GetSeg().b); + s_new[0] = s_old->Clone(); + s_new[1] = s_old->Clone(); + s_new[0]->SetEnds( s_old->GetSeg().a, aP ); + s_new[1]->SetEnds( aP, s_old->GetSeg().b ); - aNode->Remove( s_old ); - aNode->Add( s_new [0] ); - aNode->Add( s_new [1] ); - } + aNode->Remove( s_old ); + aNode->Add( s_new[0] ); + aNode->Add( s_new[1] ); + } } -void PNS_ROUTER::commitRouting( PNS_NODE *aNode ) + +void PNS_ROUTER::commitRouting( PNS_NODE* aNode ) { - PNS_NODE::ItemVector removed, added; + PNS_NODE::ItemVector removed, added; - aNode->GetUpdatedItems(removed, added); + aNode->GetUpdatedItems( removed, added ); - for(unsigned int i = 0; i < removed.size(); i++) - { - BOARD_ITEM *parent = removed[i]->GetParent(); + for( unsigned int i = 0; i < removed.size(); i++ ) + { + BOARD_ITEM* parent = removed[i]->GetParent(); - if(parent) - { - m_view->Remove(parent); - m_board->Remove(parent); - } - } + if( parent ) + { + m_view->Remove( parent ); + m_board->Remove( parent ); + } + } - BOOST_FOREACH(PNS_ITEM *item, added) - { - BOARD_ITEM *newBI = NULL; - switch(item->GetKind()) - { - case PNS_ITEM::SEGMENT: - { - PNS_SEGMENT *seg = static_cast(item); - TRACK *track = new TRACK(m_board); - const SEG& s = seg->GetSeg(); + BOOST_FOREACH( PNS_ITEM* item, added ) + { + BOARD_ITEM* newBI = NULL; - track->SetStart( wxPoint(s.a.x, s.a.y)); - track->SetEnd( wxPoint(s.b.x, s.b.y )); - track->SetWidth(seg->GetWidth()); - track->SetLayer(seg->GetLayers().Start()); - track->SetNet(seg->GetNet()); - newBI = track; - break; - } - - case PNS_ITEM::VIA: - { - SEGVIA *via_board = new SEGVIA(m_board); - PNS_VIA *via = static_cast(item); - via_board->SetPosition ( wxPoint(via->GetPos().x, via->GetPos().y )); - via_board->SetWidth ( via->GetDiameter() ); - via_board->SetNet ( via->GetNet() ); - newBI = via_board; - break; - } + switch( item->GetKind() ) + { + case PNS_ITEM::SEGMENT: + { + PNS_SEGMENT* seg = static_cast( item ); + TRACK* track = new TRACK( m_board ); + const SEG& s = seg->GetSeg(); - default: - break; - } + track->SetStart( wxPoint( s.a.x, s.a.y ) ); + track->SetEnd( wxPoint( s.b.x, s.b.y ) ); + track->SetWidth( seg->GetWidth() ); + track->SetLayer( seg->GetLayers().Start() ); + track->SetNet( seg->GetNet() ); + newBI = track; + break; + } - if(newBI) - { - item->SetParent(newBI); - newBI->ClearFlags(); - m_view->Add(newBI); - m_board->Add(newBI); - newBI->ViewUpdate( KiGfx::VIEW_ITEM::GEOMETRY ); - } - } - - m_world->Commit( aNode ); + case PNS_ITEM::VIA: + { + SEGVIA* via_board = new SEGVIA( m_board ); + PNS_VIA* via = static_cast( item ); + via_board->SetPosition( wxPoint( via->GetPos().x, via->GetPos().y ) ); + via_board->SetWidth( via->GetDiameter() ); + via_board->SetNet( via->GetNet() ); + newBI = via_board; + break; + } + + default: + break; + } + + if( newBI ) + { + item->SetParent( newBI ); + newBI->ClearFlags(); + m_view->Add( newBI ); + m_board->Add( newBI ); + newBI->ViewUpdate( KiGfx::VIEW_ITEM::GEOMETRY ); + } + } + + m_world->Commit( aNode ); } -PNS_VIA *PNS_ROUTER::checkLoneVia ( PNS_JOINT* aJoint ) const + +PNS_VIA* PNS_ROUTER::checkLoneVia( PNS_JOINT* aJoint ) const { - PNS_VIA *theVia = NULL; - PNS_LAYERSET l; + PNS_VIA* theVia = NULL; + PNS_LAYERSET l; - BOOST_FOREACH(PNS_ITEM *item, aJoint->GetLinkList()) - { - if(item->GetKind() == PNS_ITEM::VIA) - theVia = static_cast(item); + BOOST_FOREACH( PNS_ITEM* item, aJoint->GetLinkList() ) + { + if( item->GetKind() == PNS_ITEM::VIA ) + theVia = static_cast( item ); - - l.Merge (item->GetLayers()); - } + l.Merge( item->GetLayers() ); + } - if(l.Start() == l.End()) - return theVia; - return NULL; + if( l.Start() == l.End() ) + return theVia; + + return NULL; } -PNS_NODE *PNS_ROUTER::removeLoops ( PNS_NODE *aNode, PNS_SEGMENT *aLatestSeg ) + +PNS_NODE* PNS_ROUTER::removeLoops( PNS_NODE* aNode, PNS_SEGMENT* aLatestSeg ) { - PNS_LINE *ourLine = aNode->AssembleLine(aLatestSeg); - PNS_NODE *cleaned = aNode->Branch(); - PNS_JOINT a, b; - vector lines; - + PNS_LINE* ourLine = aNode->AssembleLine( aLatestSeg ); + PNS_NODE* cleaned = aNode->Branch(); + PNS_JOINT a, b; - cleaned->FindLineEnds (ourLine, a, b); - cleaned->FindLinesBetweenJoints( a, b, lines); - - BOOST_FOREACH(PNS_LINE *line, lines) - { - if(! (line->ContainsSegment (aLatestSeg) ) ) - { - cleaned->Remove(line); - } - } + vector lines; - return cleaned; + cleaned->FindLineEnds( ourLine, a, b ); + cleaned->FindLinesBetweenJoints( a, b, lines ); + + BOOST_FOREACH( PNS_LINE* line, lines ) + { + if( !( line->ContainsSegment( aLatestSeg ) ) ) + { + cleaned->Remove( line ); + } + } + + return cleaned; } +bool PNS_ROUTER::FixRoute( const VECTOR2I& aP, PNS_ITEM* aEndItem ) +{ + bool real_end = false; -bool PNS_ROUTER::FixRoute(const VECTOR2I& aP, PNS_ITEM *aEndItem) - { - bool real_end = false; - - PNS_LINE pl = m_placer->GetTrace(); - const SHAPE_LINE_CHAIN& l = pl.GetCLine(); + PNS_LINE pl = m_placer->GetTrace(); + const SHAPE_LINE_CHAIN& l = pl.GetCLine(); - if(!l.SegmentCount()) - return true; + if( !l.SegmentCount() ) + return true; - VECTOR2I p_pre_last = l.CPoint(-1); - const VECTOR2I p_last = l.CPoint(-1); - DIRECTION_45 d_last (l.CSegment(-1)); + VECTOR2I p_pre_last = l.CPoint( -1 ); + const VECTOR2I p_last = l.CPoint( -1 ); + DIRECTION_45 d_last( l.CSegment( -1 ) ); - if(l.PointCount() > 2) - p_pre_last = l.CPoint(-2); + if( l.PointCount() > 2 ) + p_pre_last = l.CPoint( -2 ); - if(aEndItem && m_currentNet >= 0 && m_currentNet == aEndItem->GetNet()) - real_end = true; - - int last = (real_end || m_placingVia) ? l.SegmentCount() : max(1, l.SegmentCount() - 1); + if( aEndItem && m_currentNet >= 0 && m_currentNet == aEndItem->GetNet() ) + real_end = true; - PNS_NODE *latest = m_placer->GetCurrentNode(); + int last = ( real_end || m_placingVia ) ? l.SegmentCount() : max( 1, l.SegmentCount() - 1 ); - if(real_end) - splitAdjacentSegments(latest, aEndItem, aP); - - PNS_SEGMENT *lastSeg = NULL; - for (int i = 0; i < last; i++) - { - const SEG& s = pl.GetCLine().CSegment(i); - PNS_SEGMENT *seg = new PNS_SEGMENT( s, m_currentNet ); - seg->SetWidth(pl.GetWidth()); - seg->SetLayer(m_currentLayer); - latest->Add(seg); - lastSeg = seg; - } + PNS_NODE* latest = m_placer->GetCurrentNode(); - if( pl.EndsWithVia() ) - latest->Add(pl.GetVia().Clone()); + if( real_end ) + splitAdjacentSegments( latest, aEndItem, aP ); - if(real_end) - latest = removeLoops( latest, lastSeg ); - - commitRouting(latest); + PNS_SEGMENT* lastSeg = NULL; - EraseView(); - - if(real_end) - { - m_state = IDLE; - //m_world->KillChildren(); - } else { - - m_state = ROUTE_TRACK; - m_placer->SetInitialDirection(d_last); - m_currentStart = m_placingVia ? p_last : p_pre_last; - - if(m_placingVia) - m_currentLayer = NextCopperLayer(true); + for( int i = 0; i < last; i++ ) + { + const SEG& s = pl.GetCLine().CSegment( i ); + PNS_SEGMENT* seg = new PNS_SEGMENT( s, m_currentNet ); + seg->SetWidth( pl.GetWidth() ); + seg->SetLayer( m_currentLayer ); + latest->Add( seg ); + lastSeg = seg; + } - m_placer->StartPlacement(m_currentStart, m_currentNet, m_currentWidth, m_currentLayer); + if( pl.EndsWithVia() ) + latest->Add( pl.GetVia().Clone() ); - m_startsOnVia = m_placingVia; - m_placingVia = false; + if( real_end ) + latest = removeLoops( latest, lastSeg ); - } - + commitRouting( latest ); - return real_end; + EraseView(); + + if( real_end ) + { + m_state = IDLE; + // m_world->KillChildren(); + } + else + { + m_state = ROUTE_TRACK; + m_placer->SetInitialDirection( d_last ); + m_currentStart = m_placingVia ? p_last : p_pre_last; + + if( m_placingVia ) + m_currentLayer = NextCopperLayer( true ); + + m_placer->StartPlacement( m_currentStart, m_currentNet, m_currentWidth, m_currentLayer ); + + m_startsOnVia = m_placingVia; + m_placingVia = false; + } + + return real_end; } + void PNS_ROUTER::StopRouting() { - if(!RoutingInProgress()) - return; + if( !RoutingInProgress() ) + return; - //highlightCurrent(false); - - EraseView(); - - m_state = IDLE; - m_world->KillChildren(); + // highlightCurrent(false); + + EraseView(); + + m_state = IDLE; + m_world->KillChildren(); } + void PNS_ROUTER::FlipPosture() { - if(m_placer->GetTail().GetCLine().SegmentCount() == 0) - { - m_start_diagonal = !m_start_diagonal; - m_placer->SetInitialDirection(m_start_diagonal ? DIRECTION_45(DIRECTION_45::NE) : DIRECTION_45(DIRECTION_45::N)); - } else - m_placer->FlipPosture(); - - Move(m_currentEnd, NULL); + if( m_placer->GetTail().GetCLine().SegmentCount() == 0 ) + { + m_start_diagonal = !m_start_diagonal; + m_placer->SetInitialDirection( m_start_diagonal ? DIRECTION_45( + DIRECTION_45::NE ) : DIRECTION_45( DIRECTION_45::N ) ); + } + else + m_placer->FlipPosture(); + + Move( m_currentEnd, NULL ); } -void PNS_ROUTER::SwitchLayer(int layer) + +void PNS_ROUTER::SwitchLayer( int layer ) { - switch(m_state) - { - case IDLE: - m_currentLayer = layer; - break; - case ROUTE_TRACK: - if(m_startsOnVia) - { - m_currentLayer = layer; - m_placer->StartPlacement(m_currentStart, m_currentNet, m_currentWidth, m_currentLayer); - } - default: - break; - } + switch( m_state ) + { + case IDLE: + m_currentLayer = layer; + break; + + case ROUTE_TRACK: + if( m_startsOnVia ) + { + m_currentLayer = layer; + m_placer->StartPlacement( m_currentStart, m_currentNet, m_currentWidth, + m_currentLayer ); + } + + default: + break; + } } -void PNS_ROUTER::ToggleViaPlacement () -{ - if(m_state == ROUTE_TRACK) - { - m_placingVia = !m_placingVia; - m_placer->AddVia(m_placingVia, m_currentViaDiameter, m_currentViaDrill); - } -} + +void PNS_ROUTER::ToggleViaPlacement() +{ + if( m_state == ROUTE_TRACK ) + { + m_placingVia = !m_placingVia; + m_placer->AddVia( m_placingVia, m_currentViaDiameter, m_currentViaDrill ); + } +} diff --git a/pcbnew/router/pns_router.h b/pcbnew/router/pns_router.h index e0016b2dc8..d762f14783 100644 --- a/pcbnew/router/pns_router.h +++ b/pcbnew/router/pns_router.h @@ -3,20 +3,21 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ + #ifndef __PNS_ROUTER_H #define __PNS_ROUTER_H @@ -48,150 +49,146 @@ class PNS_CLEARANCE_FUNC; class VIEW_GROUP; namespace KiGfx { - class VIEW; - class VIEW_GROUP; +class VIEW; +class VIEW_GROUP; }; -/** +/** * Class PNS_ROUTER - * - * Main router class. + * + * Main router class. */ -class PNS_ROUTER { - -private: - enum RouterState { - IDLE, - START_ROUTING, - ROUTE_TRACK, - FINISH_TRACK - }; +class PNS_ROUTER +{ +private: + enum RouterState + { + IDLE, + START_ROUTING, + ROUTE_TRACK, + FINISH_TRACK + }; public: + PNS_ROUTER(); + ~PNS_ROUTER(); - PNS_ROUTER (); - ~PNS_ROUTER (); + static PNS_ROUTER* GetInstance(); - static PNS_ROUTER *GetInstance(); + void ClearWorld(); + void SetBoard( BOARD* aBoard ); + void SyncWorld(); - void ClearWorld(); - void SetBoard( BOARD *aBoard ); - void SyncWorld(); + void SetView( KiGfx::VIEW* aView ); - void SetView(KiGfx::VIEW *aView); + bool RoutingInProgress() const; + void StartRouting( const VECTOR2I& aP, PNS_ITEM* aItem ); + void Move( const VECTOR2I& aP, PNS_ITEM* aItem ); + bool FixRoute( const VECTOR2I& aP, PNS_ITEM* aItem ); - bool RoutingInProgress() const; - void StartRouting(const VECTOR2I& aP, PNS_ITEM *aItem); - void Move(const VECTOR2I& aP, PNS_ITEM *aItem); - bool FixRoute(const VECTOR2I& aP, PNS_ITEM *aItem); + void StopRouting(); - void StopRouting(); + const VECTOR2I GetCurrentEnd() const; - const VECTOR2I GetCurrentEnd() const; + int GetClearance( const PNS_ITEM* a, const PNS_ITEM* b ) const; - int GetClearance(const PNS_ITEM* a, const PNS_ITEM *b ) const; + PNS_NODE* GetWorld() const + { + return m_world; + } - PNS_NODE* GetWorld() const - { - return m_world; - } + void FlipPosture(); - void FlipPosture(); - - void DisplayItem ( const PNS_ITEM *aItem, bool aIsHead = false ); - void DisplayDebugLine ( const SHAPE_LINE_CHAIN &aLine, int aType = 0, int aWidth = 0); - void DisplayDebugBox ( const BOX2I& aBox, int aType = 0, int aWidth = 0); - - void EraseView ( ); - void SwitchLayer (int layer ); - int GetCurrentLayer() const { return m_currentLayer; } - void ToggleViaPlacement (); + void DisplayItem( const PNS_ITEM* aItem, bool aIsHead = false ); + void DisplayDebugLine( const SHAPE_LINE_CHAIN& aLine, int aType = 0, int aWidth = 0 ); + void DisplayDebugBox( const BOX2I& aBox, int aType = 0, int aWidth = 0 ); - void SetCurrentWidth(int w); - void SetCurrentViaDiameter(int d) { m_currentViaDiameter = d;} - void SetCurrentViaDrill(int d) { m_currentViaDrill = d;} - int GetCurrentWidth() const { return m_currentWidth; } - int GetCurrentViaDiameter() const { return m_currentViaDiameter; } - int GetCurrentViaDrill() const { return m_currentViaDrill; } - int GetCurrentNet() const { return m_currentNet; } + void EraseView(); + void SwitchLayer( int layer ); - PNS_CLEARANCE_FUNC *GetClearanceFunc() const - { - return m_clearanceFunc; - } + int GetCurrentLayer() const { return m_currentLayer; } + void ToggleViaPlacement(); - bool IsPlacingVia() const - { - return m_placingVia; - } + void SetCurrentWidth( int w ); + void SetCurrentViaDiameter( int d ) { m_currentViaDiameter = d; } + void SetCurrentViaDrill( int d ) { m_currentViaDrill = d; } + int GetCurrentWidth() const { return m_currentWidth; } + int GetCurrentViaDiameter() const { return m_currentViaDiameter; } + int GetCurrentViaDrill() const { return m_currentViaDrill; } + int GetCurrentNet() const { return m_currentNet; } - int NextCopperLayer( bool aUp ); + PNS_CLEARANCE_FUNC* GetClearanceFunc() const + { + return m_clearanceFunc; + } - //typedef boost::optional optHoverItem; + bool IsPlacingVia() const + { + return m_placingVia; + } - const PNS_ITEMSET QueryHoverItems(const VECTOR2I& aP); - const VECTOR2I SnapToItem( PNS_ITEM *item, VECTOR2I aP, bool& aSplitsSegment ); + int NextCopperLayer( bool aUp ); + // typedef boost::optional optHoverItem; + + const PNS_ITEMSET QueryHoverItems( const VECTOR2I& aP ); + const VECTOR2I SnapToItem( PNS_ITEM* item, VECTOR2I aP, bool& aSplitsSegment ); private: + void clearViewFlags(); + // optHoverItem queryHoverItemEx(const VECTOR2I& aP); + PNS_ITEM* pickSingleItem( PNS_ITEMSET& aItems ) const; // std::vector aItems) const; + void splitAdjacentSegments( PNS_NODE* aNode, PNS_ITEM* aSeg, const VECTOR2I& aP ); // optHoverItem& aItem); + void commitRouting( PNS_NODE* aNode ); + PNS_NODE* removeLoops( PNS_NODE* aNode, PNS_SEGMENT* aLatestSeg ); + PNS_NODE* removeLoops( PNS_NODE* aNode, PNS_LINE* aNewLine ); + PNS_VIA* checkLoneVia( PNS_JOINT* aJoint ) const; - void clearViewFlags(); - - //optHoverItem queryHoverItemEx(const VECTOR2I& aP); - - PNS_ITEM *pickSingleItem ( PNS_ITEMSET &aItems ) const; //std::vector aItems) const; - void splitAdjacentSegments(PNS_NODE *aNode, PNS_ITEM *aSeg, const VECTOR2I& aP ); //optHoverItem& aItem); - void commitRouting ( PNS_NODE *aNode ); - PNS_NODE *removeLoops ( PNS_NODE *aNode, PNS_SEGMENT *aLatestSeg ); - PNS_NODE *removeLoops ( PNS_NODE *aNode, PNS_LINE *aNewLine ); - PNS_VIA *checkLoneVia ( PNS_JOINT* aJoint ) const; + PNS_ITEM* syncPad( D_PAD* aPad ); + PNS_ITEM* syncTrack( TRACK* aTrack ); + PNS_ITEM* syncVia( SEGVIA* aVia ); - PNS_ITEM *syncPad( D_PAD *aPad ); - PNS_ITEM *syncTrack( TRACK *aTrack ); - PNS_ITEM *syncVia( SEGVIA *aVia ); + void commitPad( PNS_SOLID* aPad ); + void commitSegment( PNS_SEGMENT* aTrack ); + void commitVia( PNS_VIA* aVia ); - void commitPad( PNS_SOLID *aPad ); - void commitSegment( PNS_SEGMENT *aTrack ); - void commitVia( PNS_VIA *aVia ); + void highlightCurrent( bool enabled ); - void highlightCurrent( bool enabled ); + int m_currentLayer; + int m_currentNet; + int m_currentWidth; + int m_currentViaDiameter; + int m_currentViaDrill; + bool m_start_diagonal; - int m_currentLayer; - int m_currentNet; - int m_currentWidth; - int m_currentViaDiameter; - int m_currentViaDrill; + RouterState m_state; - bool m_start_diagonal; + BOARD* m_board; + PNS_NODE* m_world; + PNS_LINE_PLACER* m_placer; - RouterState m_state; + KiGfx::VIEW* m_view; + KiGfx::VIEW_GROUP* m_previewItems; - BOARD *m_board; - PNS_NODE *m_world; - PNS_LINE_PLACER *m_placer; + VECTOR2I m_currentEnd; + VECTOR2I m_currentStart; + VECTOR2I m_originalStart; + bool m_placingVia; + bool m_startsOnVia; - KiGfx::VIEW *m_view; - KiGfx::VIEW_GROUP *m_previewItems; +// optHoverItem m_startItem, m_endItem; - VECTOR2I m_currentEnd; - VECTOR2I m_currentStart; - VECTOR2I m_originalStart; - bool m_placingVia; - bool m_startsOnVia; - -// optHoverItem m_startItem, m_endItem; - - PNS_ROUTING_SETTINGS m_settings; - PNS_CLEARANCE_FUNC *m_clearanceFunc; - - boost::unordered_set m_hiddenItems; + PNS_ROUTING_SETTINGS m_settings; + PNS_CLEARANCE_FUNC* m_clearanceFunc; + boost::unordered_set m_hiddenItems; }; -#endif \ No newline at end of file +#endif + diff --git a/pcbnew/router/pns_routing_settings.h b/pcbnew/router/pns_routing_settings.h index 86c955dfc1..e61e69b746 100644 --- a/pcbnew/router/pns_routing_settings.h +++ b/pcbnew/router/pns_routing_settings.h @@ -3,50 +3,51 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ - + #ifndef __PNS_ROUTER_SETTINGS #define __PNS_ROUTER_SETTINGS ///> Routing modes -enum PNS_MODE { - RM_Ignore = 0, ///> Ignore collisions - RM_Shove, ///> Only shove - RM_Walkaround, ///> Only walkaround - RM_Smart ///> Guess what's better +enum PNS_MODE +{ + RM_Ignore = 0, ///> Ignore collisions + RM_Shove, ///> Only shove + RM_Walkaround, ///> Only walkaround + RM_Smart ///> Guess what's better }; -class PNS_ROUTING_SETTINGS +class PNS_ROUTING_SETTINGS { - public: - PNS_MODE m_routingMode; +public: + PNS_MODE m_routingMode; - bool m_removeLoops; - bool m_smartPads; - bool m_suggestEnding; - bool m_shoveOnRequest; - bool m_changePostures; - bool m_followMouse; + bool m_removeLoops; + bool m_smartPads; + bool m_suggestEnding; + bool m_shoveOnRequest; + bool m_changePostures; + bool m_followMouse; - int m_lineWidth; - int m_viaDiameter; - int m_viaDrill; - int m_preferredLayer; - int m_walkaroundIterationLimit; - int m_shoveIterationLimit; + int m_lineWidth; + int m_viaDiameter; + int m_viaDrill; + int m_preferredLayer; + int m_walkaroundIterationLimit; + int m_shoveIterationLimit; }; #endif diff --git a/pcbnew/router/pns_segment.h b/pcbnew/router/pns_segment.h index 6cef1b15a6..b8e6e43d34 100644 --- a/pcbnew/router/pns_segment.h +++ b/pcbnew/router/pns_segment.h @@ -3,21 +3,21 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ - + #ifndef __PNS_SEGMENT_H #define __PNS_SEGMENT_H @@ -32,88 +32,94 @@ class PNS_NODE; -class PNS_SEGMENT : public PNS_ITEM { +class PNS_SEGMENT : public PNS_ITEM +{ public: - PNS_SEGMENT (): - PNS_ITEM(SEGMENT) - {}; + PNS_SEGMENT() : + PNS_ITEM( SEGMENT ) + {}; - PNS_SEGMENT (const SEG& aSeg, int aNet): - PNS_ITEM(SEGMENT) - { - m_net = aNet; - m_shape.Clear(); - m_shape.Append(aSeg.a); - m_shape.Append(aSeg.b); - }; - - PNS_SEGMENT (const PNS_LINE &aParentLine, const SEG& aSeg): - PNS_ITEM(SEGMENT) - { - m_net = aParentLine.GetNet(); - m_layers = aParentLine.GetLayers(); - m_width = aParentLine.GetWidth(); - m_shape.Clear(); - m_shape.Append(aSeg.a); - m_shape.Append(aSeg.b); - }; - + PNS_SEGMENT( const SEG& aSeg, int aNet ) : + PNS_ITEM( SEGMENT ) + { + m_net = aNet; + m_shape.Clear(); + m_shape.Append( aSeg.a ); + m_shape.Append( aSeg.b ); + }; - PNS_SEGMENT *Clone() const; - - const SHAPE* GetShape() const { - return static_cast(&m_shape); - } + PNS_SEGMENT( const PNS_LINE& aParentLine, const SEG& aSeg ) : + PNS_ITEM( SEGMENT ) + { + m_net = aParentLine.GetNet(); + m_layers = aParentLine.GetLayers(); + m_width = aParentLine.GetWidth(); + m_shape.Clear(); + m_shape.Append( aSeg.a ); + m_shape.Append( aSeg.b ); + }; - void SetLayer (int aLayer) - { - SetLayers (PNS_LAYERSET ( aLayer )); - } - int GetLayer() const - { - return GetLayers().Start(); - } + PNS_SEGMENT* Clone() const; - const SHAPE_LINE_CHAIN& GetCLine() const - { - return m_shape; - } + const SHAPE* GetShape() const + { + return static_cast( &m_shape ); + } - void SetWidth( int aWidth ) - { - m_width = aWidth; - } + void SetLayer( int aLayer ) + { + SetLayers( PNS_LAYERSET( aLayer ) ); + } - int GetWidth() const { - return m_width; - } - - const SEG GetSeg() const { - assert(m_shape.PointCount() >= 1); - if(m_shape.PointCount() == 1) - return SEG(m_shape.CPoint(0), m_shape.CPoint(0)); - return SEG(m_shape.CPoint(0), m_shape.CPoint(1)); - } + int GetLayer() const + { + return GetLayers().Start(); + } - void SetEnds ( const VECTOR2I& a, const VECTOR2I& b) - { - m_shape.Clear(); - m_shape.Append(a); - m_shape.Append(b); - } + const SHAPE_LINE_CHAIN& GetCLine() const + { + return m_shape; + } - void SwapEnds() - { - m_shape = m_shape.Reverse(); - } + void SetWidth( int aWidth ) + { + m_width = aWidth; + } - const SHAPE_LINE_CHAIN Hull(int aClearance, int aWalkaroundThickness) const; + int GetWidth() const + { + return m_width; + } + + const SEG GetSeg() const + { + assert( m_shape.PointCount() >= 1 ); + + if( m_shape.PointCount() == 1 ) + return SEG( m_shape.CPoint( 0 ), m_shape.CPoint( 0 ) ); + + return SEG( m_shape.CPoint( 0 ), m_shape.CPoint( 1 ) ); + } + + void SetEnds( const VECTOR2I& a, const VECTOR2I& b ) + { + m_shape.Clear(); + m_shape.Append( a ); + m_shape.Append( b ); + } + + void SwapEnds() + { + m_shape = m_shape.Reverse(); + } + + const SHAPE_LINE_CHAIN Hull( int aClearance, int aWalkaroundThickness ) const; private: - - SHAPE_LINE_CHAIN m_shape; - int m_width; + SHAPE_LINE_CHAIN m_shape; + int m_width; }; #endif + diff --git a/pcbnew/router/pns_shove.cpp b/pcbnew/router/pns_shove.cpp index bd3e12b72e..018ff7da35 100644 --- a/pcbnew/router/pns_shove.cpp +++ b/pcbnew/router/pns_shove.cpp @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -37,433 +37,458 @@ using namespace std; -PNS_SHOVE::PNS_SHOVE( PNS_NODE *aWorld ) +PNS_SHOVE::PNS_SHOVE( PNS_NODE* aWorld ) { - m_root = aWorld; - m_iterLimit = 100; + m_root = aWorld; + m_iterLimit = 100; }; + PNS_SHOVE::~PNS_SHOVE() { } -struct range { - range() - { - min_v = max_v = -1; - } - void add ( int x ) - { - if(min_v < 0) min_v = x; - if(max_v < 0) max_v = x; +struct range +{ + range() + { + min_v = max_v = -1; + } - if(x < min_v) - min_v = x; - else if (x > max_v) - max_v = x; - } + void add( int x ) + { + if( min_v < 0 ) min_v = x; - int start() - { - return min_v; - } + if( max_v < 0 ) max_v = x; - int end() - { - return max_v; - } + if( x < min_v ) + min_v = x; + else if( x > max_v ) + max_v = x; + } - int min_v, max_v; + int start() + { + return min_v; + } + + int end() + { + return max_v; + } + + int min_v, max_v; }; // fixme: this is damn f***ing inefficient. And fails much too often due to broken direction finding algorithm. -bool PNS_SHOVE::tryShove(PNS_NODE *aNode, PNS_LINE *aHead, PNS_LINE *aObstacle, PNS_SEGMENT& aObstacleSeg, PNS_LINE *aResult, bool aInvertWinding ) +bool PNS_SHOVE::tryShove( PNS_NODE* aNode, PNS_LINE* aHead, PNS_LINE* aObstacle, + PNS_SEGMENT& aObstacleSeg, PNS_LINE* aResult, bool aInvertWinding ) { - const SHAPE_LINE_CHAIN &head = aHead->GetCLine(); - bool cw = false; - int i; + const SHAPE_LINE_CHAIN& head = aHead->GetCLine(); + bool cw = false; + int i; - if(aHead->EndsWithVia() && !aHead->GetLayers().Overlaps(aObstacle->GetLayers())) - { - int clearance = aNode->GetClearance(aHead, aObstacle); - SHAPE_LINE_CHAIN hull = aHead->GetVia().Hull( clearance - aObstacle->GetWidth() / 2 ); + if( aHead->EndsWithVia() && !aHead->GetLayers().Overlaps( aObstacle->GetLayers() ) ) + { + int clearance = aNode->GetClearance( aHead, aObstacle ); + SHAPE_LINE_CHAIN hull = aHead->GetVia().Hull( clearance - aObstacle->GetWidth() / 2 ); - //SHAPE_LINE_CHAIN path_pre, path_walk_cw, path_walk_ccw, path_post; + // SHAPE_LINE_CHAIN path_pre, path_walk_cw, path_walk_ccw, path_post; - SHAPE_LINE_CHAIN path_cw, path_ccw, *path; + SHAPE_LINE_CHAIN path_cw, path_ccw, * path; - aObstacle->NewWalkaround(hull, path_cw, true); - aObstacle->NewWalkaround(hull, path_ccw, false); + aObstacle->NewWalkaround( hull, path_cw, true ); + aObstacle->NewWalkaround( hull, path_ccw, false ); - path = path_ccw.Length() < path_cw.Length() ? &path_ccw : &path_cw; - aResult->SetShape(*path); + path = path_ccw.Length() < path_cw.Length() ? &path_ccw : &path_cw; + aResult->SetShape( *path ); - //PNSDisplayDebugLine (*path, 5); + // PNSDisplayDebugLine (*path, 5); - if(!aResult->Is45Degree()) - { - //printf("polyset non-45\npoly %s\nendpolyset\n", aResult->GetCLine().Format().c_str()); - } - /*... special case for vias? */ + if( !aResult->Is45Degree() ) + { + // printf("polyset non-45\npoly %s\nendpolyset\n", aResult->GetCLine().Format().c_str()); + } - return !aNode->CheckColliding(aResult, aHead); - } + /*... special case for vias? */ - int ns = head.SegmentCount(); - if(aHead->EndsWithVia()) - ns ++; + return !aNode->CheckColliding( aResult, aHead ); + } - for(i = 0; i < head.SegmentCount(); i++) - { - const PNS_SEGMENT hs (*aHead, head.CSegment(i)); + int ns = head.SegmentCount(); + + if( aHead->EndsWithVia() ) + ns++; + + for( i = 0; i < head.SegmentCount(); i++ ) + { + const PNS_SEGMENT hs( *aHead, head.CSegment( i ) ); + if( aNode->CheckColliding( &hs, aObstacle ) ) + { + VECTOR2I v1 = hs.GetSeg().b - hs.GetSeg().a; + VECTOR2I v2 = aObstacleSeg.GetSeg().b - aObstacleSeg.GetSeg().a; - if(aNode->CheckColliding(&hs, aObstacle)) - { - VECTOR2I v1 = hs.GetSeg().b - hs.GetSeg().a; - VECTOR2I v2 = aObstacleSeg.GetSeg().b - aObstacleSeg.GetSeg().a; - - VECTOR2I::extended_type det = v1.Cross(v2); + VECTOR2I::extended_type det = v1.Cross( v2 ); - if(det > 0) - cw = true; - else - cw = false; - - break; - } - } + if( det > 0 ) + cw = true; + else + cw = false; - if(aInvertWinding) - { - if(cw) - cw = false; - else - cw = true; - } + break; + } + } - PNS_LINE shoved (*aObstacle); + if( aInvertWinding ) + { + if( cw ) + cw = false; + else + cw = true; + } - int clearance = aNode->GetClearance(aHead, aObstacle); + PNS_LINE shoved( *aObstacle ); - range r; + int clearance = aNode->GetClearance( aHead, aObstacle ); - for(i = 0; i < ns; i++) - { - SHAPE_LINE_CHAIN hull; - - if(i < head.SegmentCount()) - { - const PNS_SEGMENT hs (*aHead, head.CSegment(i)); - hull = hs.Hull( clearance, 0 ); - } else - hull = aHead->GetVia().Hull( clearance - aObstacle->GetWidth() / 2); - - SHAPE_LINE_CHAIN path_pre, path_walk, path_post, tmp; - SHAPE_LINE_CHAIN path_pre2, path_walk2, path_post2; + range r; - //shoved.NewWalkaround(hull, path_pre, path_walk, path_post, cw); - shoved.NewWalkaround(hull, path_pre, path_walk, path_post, cw); + for( i = 0; i < ns; i++ ) + { + SHAPE_LINE_CHAIN hull; - /*if(path_pre != path_pre2 || path_post != path_post2 || path_walk != path_walk2 ) - { - TRACE(5, "polyset orig\npoly %s\npoly %s\npoly %s\nendpolyset\n", path_pre.Format().c_str() % path_walk.Format().c_str() % path_post.Format().c_str()); - TRACE(5, "polyset err\npoly %s\npoly %s\npoly %s\nendpolyset\n", path_pre2.Format().c_str() % path_walk2.Format().c_str() % path_post2.Format().c_str()); - }*/ + if( i < head.SegmentCount() ) + { + const PNS_SEGMENT hs( *aHead, head.CSegment( i ) ); + hull = hs.Hull( clearance, 0 ); + } + else + hull = aHead->GetVia().Hull( clearance - aObstacle->GetWidth() / 2 ); - tmp = shoved.GetCLine(); - if(path_walk.SegmentCount()) - r.add(i); + SHAPE_LINE_CHAIN path_pre, path_walk, path_post, tmp; + SHAPE_LINE_CHAIN path_pre2, path_walk2, path_post2; - path_pre.Append(path_walk); - path_pre.Append(path_post); - path_pre.Simplify(); - shoved.SetShape(path_pre); -// shoved.SetAffectedRange ( start, end ); - *aResult = shoved; - - if(!aResult->Is45Degree()) - { - //TRACE(5, "polyset non-45\npoly %s\npoly %s\npoly %s\nendpolyset\n", tmp.Format().c_str() % hull.Format().c_str() % aResult->GetCLine().Format().c_str()); - } - - } + // shoved.NewWalkaround(hull, path_pre, path_walk, path_post, cw); + shoved.NewWalkaround( hull, path_pre, path_walk, path_post, cw ); - TRACE(2, "CW %d affectedRange %d-%d [total %d]", (cw?1:0) % r.start() % r.end() % ns); + /*if(path_pre != path_pre2 || path_post != path_post2 || path_walk != path_walk2 ) + * { + * TRACE(5, "polyset orig\npoly %s\npoly %s\npoly %s\nendpolyset\n", path_pre.Format().c_str() % path_walk.Format().c_str() % path_post.Format().c_str()); + * TRACE(5, "polyset err\npoly %s\npoly %s\npoly %s\nendpolyset\n", path_pre2.Format().c_str() % path_walk2.Format().c_str() % path_post2.Format().c_str()); + * }*/ - return !aNode->CheckColliding(aResult, aHead); + tmp = shoved.GetCLine(); + + if( path_walk.SegmentCount() ) + r.add( i ); + + path_pre.Append( path_walk ); + path_pre.Append( path_post ); + path_pre.Simplify(); + shoved.SetShape( path_pre ); +// shoved.SetAffectedRange ( start, end ); + *aResult = shoved; + + if( !aResult->Is45Degree() ) + { + // TRACE(5, "polyset non-45\npoly %s\npoly %s\npoly %s\nendpolyset\n", tmp.Format().c_str() % hull.Format().c_str() % aResult->GetCLine().Format().c_str()); + } + } + + TRACE( 2, "CW %d affectedRange %d-%d [total %d]", (cw ? 1 : 0) % r.start() % r.end() % ns ); + + return !aNode->CheckColliding( aResult, aHead ); } -PNS_SHOVE::ShoveStatus PNS_SHOVE::shoveSingleLine(PNS_NODE *aNode, PNS_LINE *aCurrent, PNS_LINE *aObstacle, PNS_SEGMENT& aObstacleSeg, PNS_LINE *aResult ) + +PNS_SHOVE::ShoveStatus PNS_SHOVE::shoveSingleLine( PNS_NODE* aNode, PNS_LINE* aCurrent, + PNS_LINE* aObstacle, PNS_SEGMENT& aObstacleSeg, PNS_LINE* aResult ) { - bool rv = tryShove(aNode, aCurrent, aObstacle, aObstacleSeg, aResult, false); + bool rv = tryShove( aNode, aCurrent, aObstacle, aObstacleSeg, aResult, false ); - if( !rv ) - rv = tryShove(aNode, aCurrent, aObstacle, aObstacleSeg, aResult, true); + if( !rv ) + rv = tryShove( aNode, aCurrent, aObstacle, aObstacleSeg, aResult, true ); - if( !rv ) - { - TRACEn(2, "Shove failed" ); - return SH_INCOMPLETE; - } + if( !rv ) + { + TRACEn( 2, "Shove failed" ); + return SH_INCOMPLETE; + } - aResult->GetLine().Simplify(); + aResult->GetLine().Simplify(); - const SHAPE_LINE_CHAIN& sh_shoved = aResult->GetCLine(); - const SHAPE_LINE_CHAIN& sh_orig = aObstacle->GetCLine(); + const SHAPE_LINE_CHAIN& sh_shoved = aResult->GetCLine(); + const SHAPE_LINE_CHAIN& sh_orig = aObstacle->GetCLine(); - if(sh_shoved.SegmentCount() > 1 && sh_shoved.CPoint(0) == sh_orig.CPoint(0) && sh_shoved.CPoint(-1) == sh_orig.CPoint(-1) ) - return SH_OK; - else if (!sh_shoved.SegmentCount()) - return SH_NULL; - else - return SH_INCOMPLETE; + if( sh_shoved.SegmentCount() > 1 && sh_shoved.CPoint( 0 ) == sh_orig.CPoint( 0 ) + && sh_shoved.CPoint( -1 ) == sh_orig.CPoint( -1 ) ) + return SH_OK; + else if( !sh_shoved.SegmentCount() ) + return SH_NULL; + else + return SH_INCOMPLETE; } -bool PNS_SHOVE::reduceSpringback( PNS_LINE *aHead ) -{ - bool rv = false; - - while(!m_nodeStack.empty()) - { - SpringbackTag st_stack = m_nodeStack.back(); - bool tail_ok = true; - - if(!st_stack.node->CheckColliding(aHead) && tail_ok) - { - rv = true; - delete st_stack.node; - m_nodeStack.pop_back(); - } else - break; - } - return rv; +bool PNS_SHOVE::reduceSpringback( PNS_LINE* aHead ) +{ + bool rv = false; + + while( !m_nodeStack.empty() ) + { + SpringbackTag st_stack = m_nodeStack.back(); + bool tail_ok = true; + + if( !st_stack.node->CheckColliding( aHead ) && tail_ok ) + { + rv = true; + delete st_stack.node; + m_nodeStack.pop_back(); + } + else + break; + } + + return rv; } -bool PNS_SHOVE::pushSpringback( PNS_NODE *aNode, PNS_LINE *aHead, const PNS_COST_ESTIMATOR& aCost ) + +bool PNS_SHOVE::pushSpringback( PNS_NODE* aNode, PNS_LINE* aHead, const PNS_COST_ESTIMATOR& aCost ) { - BOX2I headBB = aHead->GetCLine().BBox(); - SpringbackTag st; - - st.node = aNode; - st.cost = aCost; - st.length = std::max(headBB.GetWidth(), headBB.GetHeight());; - m_nodeStack.push_back(st); - return true; + BOX2I headBB = aHead->GetCLine().BBox(); + SpringbackTag st; + + st.node = aNode; + st.cost = aCost; + st.length = std::max( headBB.GetWidth(), headBB.GetHeight() );; + m_nodeStack.push_back( st ); + return true; } + const PNS_COST_ESTIMATOR PNS_SHOVE::TotalCost() const { - if(m_nodeStack.empty()) - return PNS_COST_ESTIMATOR(); - else - return m_nodeStack.back().cost; + if( m_nodeStack.empty() ) + return PNS_COST_ESTIMATOR(); + else + return m_nodeStack.back().cost; } -PNS_SHOVE::ShoveStatus PNS_SHOVE::ShoveLines(PNS_LINE* aCurrentHead) + +PNS_SHOVE::ShoveStatus PNS_SHOVE::ShoveLines( PNS_LINE* aCurrentHead ) { - stack lineStack; - PNS_NODE *node, *parent; - PNS_VIA *headVia = NULL; - bool fail = false; - int iter = 0; + stack lineStack; + PNS_NODE* node, * parent; + PNS_VIA* headVia = NULL; + bool fail = false; + int iter = 0; - PNS_LINE *head = aCurrentHead->Clone(); + PNS_LINE* head = aCurrentHead->Clone(); - reduceSpringback(aCurrentHead); + reduceSpringback( aCurrentHead ); - parent = m_nodeStack.empty() ? m_root : m_nodeStack.back().node; - node = parent->Branch(); + parent = m_nodeStack.empty() ? m_root : m_nodeStack.back().node; + node = parent->Branch(); - lineStack.push(head); + lineStack.push( head ); - //node->Add(tail); - node->Add(head); + // node->Add(tail); + node->Add( head ); - if(head->EndsWithVia()) - { - headVia = head->GetVia().Clone(); - node->Add( headVia ); - } + if( head->EndsWithVia() ) + { + headVia = head->GetVia().Clone(); + node->Add( headVia ); + } - PNS_OPTIMIZER optimizer (node); + PNS_OPTIMIZER optimizer( node ); - optimizer.SetEffortLevel (PNS_OPTIMIZER::MERGE_SEGMENTS | PNS_OPTIMIZER::SMART_PADS); - optimizer.SetCollisionMask( -1 ); - PNS_NODE::OptObstacle nearest; + optimizer.SetEffortLevel( PNS_OPTIMIZER::MERGE_SEGMENTS | PNS_OPTIMIZER::SMART_PADS ); + optimizer.SetCollisionMask( -1 ); + PNS_NODE::OptObstacle nearest; - optimizer.CacheStaticItem(head); - if(headVia) - optimizer.CacheStaticItem(headVia); + optimizer.CacheStaticItem( head ); - TRACE(1, "ShoveStart [root: %d jts, node: %d jts]", m_root->JointCount() % node->JointCount()); - - //PNS_ITEM *lastWalkSolid = NULL; - prof_counter totalRealTime; + if( headVia ) + optimizer.CacheStaticItem( headVia ); + TRACE( 1, "ShoveStart [root: %d jts, node: %d jts]", m_root->JointCount() % + node->JointCount() ); - wxLongLong t_start = wxGetLocalTimeMillis(); + // PNS_ITEM *lastWalkSolid = NULL; + prof_counter totalRealTime; - while(!lineStack.empty()) - { + wxLongLong t_start = wxGetLocalTimeMillis(); - wxLongLong t_cur = wxGetLocalTimeMillis(); + while( !lineStack.empty() ) + { + wxLongLong t_cur = wxGetLocalTimeMillis(); - if ((t_cur - t_start).ToLong() > ShoveTimeLimit) - { - fail = true; - break; - } + if( (t_cur - t_start).ToLong() > ShoveTimeLimit ) + { + fail = true; + break; + } - iter++; - - if(iter > m_iterLimit) - { - fail = true; - break; - } - - PNS_LINE *currentLine = lineStack.top(); + iter++; - prof_start( &totalRealTime, false ); - nearest = node->NearestObstacle(currentLine, PNS_ITEM::ANY); - prof_end( &totalRealTime ); + if( iter > m_iterLimit ) + { + fail = true; + break; + } - TRACE(2,"t-nearestObstacle %lld us", (totalRealTime.value )); + PNS_LINE* currentLine = lineStack.top(); - if(!nearest) - { - if(lineStack.size() > 1) - { - PNS_LINE *original = lineStack.top(); - PNS_LINE optimized; - int r_start, r_end; + prof_start( &totalRealTime, false ); + nearest = node->NearestObstacle( currentLine, PNS_ITEM::ANY ); + prof_end( &totalRealTime ); - original->GetAffectedRange(r_start, r_end); + TRACE( 2, "t-nearestObstacle %lld us", (totalRealTime.value ) ); - TRACE(1, "Iter %d optimize-line [range %d-%d, total %d]", iter % r_start % r_end % original->GetCLine().PointCount() ); - //lastWalkSolid = NULL; - prof_start( &totalRealTime, false ); + if( !nearest ) + { + if( lineStack.size() > 1 ) + { + PNS_LINE* original = lineStack.top(); + PNS_LINE optimized; + int r_start, r_end; - if( optimizer.Optimize(original, &optimized) ) - { - node->Remove(original); - optimizer.CacheRemove(original); - node->Add(&optimized); + original->GetAffectedRange( r_start, r_end ); - if(original->BelongsTo(node)) - delete original; - } - prof_end( &totalRealTime ); + TRACE( 1, "Iter %d optimize-line [range %d-%d, total %d]", + iter % r_start % r_end % original->GetCLine().PointCount() ); + // lastWalkSolid = NULL; + prof_start( &totalRealTime, false ); - TRACE(2,"t-optimizeObstacle %lld us", (totalRealTime.value )); + if( optimizer.Optimize( original, &optimized ) ) + { + node->Remove( original ); + optimizer.CacheRemove( original ); + node->Add( &optimized ); - } - lineStack.pop(); - } else { + if( original->BelongsTo( node ) ) + delete original; + } - switch(nearest->item->GetKind()) - { - case PNS_ITEM::SEGMENT: - { - TRACE(1, "Iter %d shove-line", iter ); + prof_end( &totalRealTime ); - PNS_SEGMENT *pseg = static_cast(nearest->item); - PNS_LINE *collidingLine = node->AssembleLine(pseg); - PNS_LINE *shovedLine = collidingLine->CloneProperties(); - - prof_start( &totalRealTime, false ); - ShoveStatus st = shoveSingleLine(node, currentLine, collidingLine, *pseg, shovedLine); - prof_end( &totalRealTime ); + TRACE( 2, "t-optimizeObstacle %lld us", (totalRealTime.value ) ); + } - TRACE(2,"t-shoveSingle %lld us", (totalRealTime.value )); + lineStack.pop(); + } + else + { + switch( nearest->item->GetKind() ) + { + case PNS_ITEM::SEGMENT: + { + TRACE( 1, "Iter %d shove-line", iter ); - if(st == SH_OK) - { - node->Replace(collidingLine, shovedLine); + PNS_SEGMENT* pseg = static_cast(nearest->item); + PNS_LINE* collidingLine = node->AssembleLine( pseg ); + PNS_LINE* shovedLine = collidingLine->CloneProperties(); - if(collidingLine->BelongsTo( node )) - delete collidingLine; + prof_start( &totalRealTime, false ); + ShoveStatus st = shoveSingleLine( node, currentLine, collidingLine, + *pseg, shovedLine ); + prof_end( &totalRealTime ); - optimizer.CacheRemove(collidingLine); - lineStack.push( shovedLine ); - } else - fail = true; - - //lastWalkSolid = NULL; + TRACE( 2, "t-shoveSingle %lld us", (totalRealTime.value ) ); - break; - } // case SEGMENT + if( st == SH_OK ) + { + node->Replace( collidingLine, shovedLine ); - case PNS_ITEM::SOLID: - case PNS_ITEM::VIA: - { - TRACE(1, "Iter %d walkaround-solid [%p]", iter % nearest->item ); - - if(lineStack.size() == 1) - { - fail = true; - break; - } + if( collidingLine->BelongsTo( node ) ) + delete collidingLine; + + optimizer.CacheRemove( collidingLine ); + lineStack.push( shovedLine ); + } + else + fail = true; + + // lastWalkSolid = NULL; + + break; + } // case SEGMENT + + case PNS_ITEM::SOLID: + case PNS_ITEM::VIA: + { + TRACE( 1, "Iter %d walkaround-solid [%p]", iter % nearest->item ); + + if( lineStack.size() == 1 ) + { + fail = true; + break; + } /* if(lastWalkSolid == nearest->item) - { - fail = true; - break; - }*/ + * { + * fail = true; + * break; + * }*/ - PNS_WALKAROUND walkaround (node); - PNS_LINE *walkaroundLine = currentLine->CloneProperties(); + PNS_WALKAROUND walkaround( node ); + PNS_LINE* walkaroundLine = currentLine->CloneProperties(); - walkaround.SetSolidsOnly(true); - walkaround.SetSingleDirection(true); - - prof_start( &totalRealTime, false ); - walkaround.Route(*currentLine, *walkaroundLine, false); - prof_end( &totalRealTime ); + walkaround.SetSolidsOnly( true ); + walkaround.SetSingleDirection( true ); - TRACE(2,"t-walkSolid %lld us", (totalRealTime.value )); + prof_start( &totalRealTime, false ); + walkaround.Route( *currentLine, *walkaroundLine, false ); + prof_end( &totalRealTime ); + + TRACE( 2, "t-walkSolid %lld us", (totalRealTime.value ) ); - node->Replace(currentLine, walkaroundLine); + node->Replace( currentLine, walkaroundLine ); - if(currentLine->BelongsTo( node )) - delete currentLine; + if( currentLine->BelongsTo( node ) ) + delete currentLine; - optimizer.CacheRemove(currentLine); - lineStack.top() = walkaroundLine; + optimizer.CacheRemove( currentLine ); + lineStack.top() = walkaroundLine; - //lastWalkSolid = nearest->item; - break; - } - default: - break; - } // switch - if(fail) - break; - } - } - - node->Remove(head); - delete head; - - if(headVia) - { - node->Remove(headVia); - delete headVia; - } + // lastWalkSolid = nearest->item; + break; + } - TRACE(1, "Shove status : %s after %d iterations" , (fail ? "FAILED" : "OK") % iter ); - if(!fail) - { - pushSpringback(node, aCurrentHead, PNS_COST_ESTIMATOR()); - return SH_OK; - } else { - delete node; - return SH_INCOMPLETE; - } + default: + break; + } // switch + + if( fail ) + break; + } + } + + node->Remove( head ); + delete head; + + if( headVia ) + { + node->Remove( headVia ); + delete headVia; + } + + TRACE( 1, "Shove status : %s after %d iterations", (fail ? "FAILED" : "OK") % iter ); + + if( !fail ) + { + pushSpringback( node, aCurrentHead, PNS_COST_ESTIMATOR() ); + return SH_OK; + } + else + { + delete node; + return SH_INCOMPLETE; + } } diff --git a/pcbnew/router/pns_shove.h b/pcbnew/router/pns_shove.h index c40dbe9858..9d5fca0f88 100644 --- a/pcbnew/router/pns_shove.h +++ b/pcbnew/router/pns_shove.h @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -30,53 +30,57 @@ class PNS_LINE; class PNS_NODE; class PNS_ROUTER; -class PNS_SHOVE { +class PNS_SHOVE +{ +public: + PNS_SHOVE( PNS_NODE* aWorld ); + ~PNS_SHOVE(); - public: - PNS_SHOVE(PNS_NODE *aWorld); - ~PNS_SHOVE(); + enum ShoveStatus + { + SH_OK = 0, + SH_NULL, + SH_INCOMPLETE + }; - enum ShoveStatus { - SH_OK = 0, - SH_NULL, - SH_INCOMPLETE - }; + ShoveStatus ShoveLines( PNS_LINE* aCurrentHead ); - ShoveStatus ShoveLines(PNS_LINE* aCurrentHead); + PNS_NODE* GetCurrentNode() + { + return m_nodeStack.empty() ? m_root : m_nodeStack.back().node; + } - PNS_NODE *GetCurrentNode() - { - return m_nodeStack.empty() ? m_root : m_nodeStack.back().node; - } + const PNS_COST_ESTIMATOR TotalCost() const; - const PNS_COST_ESTIMATOR TotalCost() const; + void Reset(); + void KillChildNodes(); - void Reset(); - void KillChildNodes(); +private: + static const int ShoveTimeLimit = 3000; - private: + bool tryShove( PNS_NODE* aWorld, PNS_LINE* aTrack, PNS_LINE* aObstacle, + PNS_SEGMENT& aObstacleSeg, PNS_LINE* aResult, bool aInvertWinding ); - static const int ShoveTimeLimit = 3000; + ShoveStatus shoveSingleLine( PNS_NODE* aNode, PNS_LINE* aCurrent, PNS_LINE* aObstacle, + PNS_SEGMENT& aObstacleSeg, PNS_LINE* aResult ); - bool tryShove(PNS_NODE *aWorld, PNS_LINE *aTrack, PNS_LINE * aObstacle, PNS_SEGMENT& aObstacleSeg, PNS_LINE *aResult, bool aInvertWinding ); + bool reduceSpringback( PNS_LINE* aHead ); + bool pushSpringback( PNS_NODE* aNode, PNS_LINE* aHead, const PNS_COST_ESTIMATOR& aCost ); - ShoveStatus shoveSingleLine(PNS_NODE *aNode, PNS_LINE *aCurrent, PNS_LINE *aObstacle, PNS_SEGMENT& aObstacleSeg, PNS_LINE *aResult ); + struct SpringbackTag + { + int64_t length; + int segments; + VECTOR2I p; + PNS_NODE* node; + PNS_COST_ESTIMATOR cost; + }; - bool reduceSpringback( PNS_LINE *aHead ); - bool pushSpringback( PNS_NODE *aNode, PNS_LINE *aHead, const PNS_COST_ESTIMATOR& aCost ); - - struct SpringbackTag { - int64_t length; - int segments; - VECTOR2I p; - PNS_NODE *node; - PNS_COST_ESTIMATOR cost; - }; - - std::vector m_nodeStack; - PNS_NODE *m_root; - PNS_NODE *m_currentNode; - int m_iterLimit; + std::vector m_nodeStack; + PNS_NODE* m_root; + PNS_NODE* m_currentNode; + int m_iterLimit; }; #endif + diff --git a/pcbnew/router/pns_solid.cpp b/pcbnew/router/pns_solid.cpp index e3841e72ca..fb9e1d2a9e 100644 --- a/pcbnew/router/pns_solid.cpp +++ b/pcbnew/router/pns_solid.cpp @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -28,37 +28,36 @@ #include "pns_solid.h" #include "pns_utils.h" -const SHAPE_LINE_CHAIN PNS_SOLID::Hull(int aClearance, int aWalkaroundThickness) const +const SHAPE_LINE_CHAIN PNS_SOLID::Hull( int aClearance, int aWalkaroundThickness ) const { - switch(m_shape->Type()) - { - case SH_RECT: - { - SHAPE_RECT *rect = static_cast (m_shape); - return OctagonalHull( rect->GetPosition(), - rect->GetSize(), - aClearance + 1, - 0.2 * aClearance ); - } + switch( m_shape->Type() ) + { + case SH_RECT: + { + SHAPE_RECT* rect = static_cast( m_shape ); + return OctagonalHull( rect->GetPosition(), rect->GetSize(), + aClearance + 1, 0.2 * aClearance ); + } - case SH_CIRCLE: - { - SHAPE_CIRCLE *circle = static_cast (m_shape); - int r = circle->GetRadius(); - return OctagonalHull( circle->GetCenter() - VECTOR2I(r, r), - VECTOR2I(2 * r, 2 * r), - aClearance + 1, - 0.52 * (r + aClearance) ); - } - default: - break; - } + case SH_CIRCLE: + { + SHAPE_CIRCLE* circle = static_cast( m_shape ); + int r = circle->GetRadius(); + return OctagonalHull( circle->GetCenter() - VECTOR2I( r, r ), VECTOR2I( 2 * r, 2 * r ), + aClearance + 1, 0.52 * (r + aClearance) ); + } - return SHAPE_LINE_CHAIN(); + default: + break; + } + + return SHAPE_LINE_CHAIN(); } -PNS_ITEM *PNS_SOLID::Clone() const + +PNS_ITEM* PNS_SOLID::Clone() const { - // solids are never cloned as the shove algorithm never moves them - assert(false); -} \ No newline at end of file + // solids are never cloned as the shove algorithm never moves them + assert( false ); +} + diff --git a/pcbnew/router/pns_solid.h b/pcbnew/router/pns_solid.h index d89135d00f..f2367eb38b 100644 --- a/pcbnew/router/pns_solid.h +++ b/pcbnew/router/pns_solid.h @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -29,41 +29,42 @@ #include "pns_item.h" -class PNS_SOLID : public PNS_ITEM { +class PNS_SOLID : public PNS_ITEM +{ public: - PNS_SOLID() : PNS_ITEM(SOLID) - { - m_movable = false; - m_shape = NULL; - } - - PNS_ITEM *Clone() const; - - const SHAPE* GetShape() const { return m_shape; } + PNS_SOLID() : PNS_ITEM( SOLID ) + { + m_movable = false; + m_shape = NULL; + } - const SHAPE_LINE_CHAIN Hull(int aClearance = 0, int aWalkaroundThickness = 0) const; + PNS_ITEM* Clone() const; - void SetShape( SHAPE* shape) - { - if(m_shape) - delete m_shape; - m_shape = shape; - } + const SHAPE* GetShape() const { return m_shape; } - const VECTOR2I& GetCenter() const - { - return m_center; - } + const SHAPE_LINE_CHAIN Hull( int aClearance = 0, int aWalkaroundThickness = 0 ) const; - void SetCenter( const VECTOR2I& aCenter ) - { - m_center = aCenter; - } + void SetShape( SHAPE* shape ) + { + if( m_shape ) + delete m_shape; + + m_shape = shape; + } + + const VECTOR2I& GetCenter() const + { + return m_center; + } + + void SetCenter( const VECTOR2I& aCenter ) + { + m_center = aCenter; + } private: - - VECTOR2I m_center; - SHAPE* m_shape; + VECTOR2I m_center; + SHAPE* m_shape; }; #endif diff --git a/pcbnew/router/pns_utils.cpp b/pcbnew/router/pns_utils.cpp index 6a2fbb49b3..a91d787c9d 100644 --- a/pcbnew/router/pns_utils.cpp +++ b/pcbnew/router/pns_utils.cpp @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -22,21 +22,24 @@ #include "pns_line.h" #include "pns_router.h" -const SHAPE_LINE_CHAIN OctagonalHull(const VECTOR2I& aP0, const VECTOR2I& aSize, int aClearance, int aChamfer) +const SHAPE_LINE_CHAIN OctagonalHull( const VECTOR2I& aP0, + const VECTOR2I& aSize, + int aClearance, + int aChamfer ) { - SHAPE_LINE_CHAIN s; + SHAPE_LINE_CHAIN s; - s.SetClosed( true ); - - s.Append(aP0.x - aClearance , aP0.y - aClearance + aChamfer); - s.Append(aP0.x - aClearance + aChamfer, aP0.y - aClearance); - s.Append(aP0.x + aSize.x + aClearance - aChamfer, aP0.y - aClearance); - s.Append(aP0.x + aSize.x + aClearance, aP0.y - aClearance + aChamfer); - s.Append(aP0.x + aSize.x + aClearance, aP0.y + aSize.y + aClearance - aChamfer); - s.Append(aP0.x + aSize.x + aClearance - aChamfer, aP0.y + aSize.y + aClearance); - s.Append(aP0.x - aClearance + aChamfer, aP0.y + aSize.y + aClearance); - s.Append(aP0.x - aClearance, aP0.y + aSize.y + aClearance - aChamfer); - - return s; + s.SetClosed( true ); + + s.Append( aP0.x - aClearance, aP0.y - aClearance + aChamfer ); + s.Append( aP0.x - aClearance + aChamfer, aP0.y - aClearance ); + s.Append( aP0.x + aSize.x + aClearance - aChamfer, aP0.y - aClearance ); + s.Append( aP0.x + aSize.x + aClearance, aP0.y - aClearance + aChamfer ); + s.Append( aP0.x + aSize.x + aClearance, aP0.y + aSize.y + aClearance - aChamfer ); + s.Append( aP0.x + aSize.x + aClearance - aChamfer, aP0.y + aSize.y + aClearance ); + s.Append( aP0.x - aClearance + aChamfer, aP0.y + aSize.y + aClearance ); + s.Append( aP0.x - aClearance, aP0.y + aSize.y + aClearance - aChamfer ); + + return s; } diff --git a/pcbnew/router/pns_utils.h b/pcbnew/router/pns_utils.h index 97ce5d9884..016ce73611 100644 --- a/pcbnew/router/pns_utils.h +++ b/pcbnew/router/pns_utils.h @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -24,10 +24,10 @@ #include #include - /** Various utility functions */ -const SHAPE_LINE_CHAIN OctagonalHull(const VECTOR2I& aP0, const VECTOR2I& aSize, int aClearance, int aChamfer); +const SHAPE_LINE_CHAIN OctagonalHull( const VECTOR2I& aP0, const VECTOR2I& aSize, + int aClearance, int aChamfer ); -#endif // __PNS_UTILS_H +#endif // __PNS_UTILS_H diff --git a/pcbnew/router/pns_via.cpp b/pcbnew/router/pns_via.cpp index 81a3d56ef2..30666d78ab 100644 --- a/pcbnew/router/pns_via.cpp +++ b/pcbnew/router/pns_via.cpp @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -26,123 +26,136 @@ static bool Circle2Circle( VECTOR2I p1, VECTOR2I p2, int r1, int r2, VECTOR2I& force ) { + int mindist = r1 + r2; + VECTOR2I delta = p2 - p1; + int dist = delta.EuclideanNorm(); - int mindist = r1 + r2; - VECTOR2I delta = p2 - p1; - int dist = delta.EuclideanNorm(); - - if(dist >= mindist) - return false; - - force = delta.Resize(abs(mindist - dist) + 1); - return true; + if( dist >= mindist ) + return false; + + force = delta.Resize( abs( mindist - dist ) + 1 ); + return true; }; static bool Rect2Circle( VECTOR2I rp0, VECTOR2I rsize, VECTOR2I cc, int cr, VECTOR2I& force ) { - VECTOR2I vts[] = { VECTOR2I(rp0.x, rp0.y), - VECTOR2I(rp0.x, rp0.y + rsize.y), - VECTOR2I(rp0.x + rsize.x, rp0.y + rsize.y), - VECTOR2I(rp0.x + rsize.x, rp0.y), - VECTOR2I(rp0.x, rp0.y) }; + VECTOR2I vts[] = + { + VECTOR2I( rp0.x, rp0.y ), + VECTOR2I( rp0.x, rp0.y + rsize.y ), + VECTOR2I( rp0.x + rsize.x, rp0.y + rsize.y ), + VECTOR2I( rp0.x + rsize.x, rp0.y ), + VECTOR2I( rp0.x, rp0.y ) + }; - int dist = INT_MAX; - VECTOR2I nearest; + int dist = INT_MAX; + VECTOR2I nearest; - for (int i = 0; i < 4; i++) - { - SEG s(vts[i], vts[i+1]); - - VECTOR2I pn = s.NearestPoint( cc ); + for( int i = 0; i < 4; i++ ) + { + SEG s( vts[i], vts[i + 1] ); - int d = (pn - cc).EuclideanNorm(); - if( d < dist ) - { - nearest = pn; - dist = d; - } - } + VECTOR2I pn = s.NearestPoint( cc ); - bool inside = cc.x >= rp0.x && cc.x <= (rp0.x + rsize.x) - && cc.y >= rp0.y && cc.y <= (rp0.y + rsize.y); + int d = (pn - cc).EuclideanNorm(); - VECTOR2I delta = cc - nearest; + if( d < dist ) + { + nearest = pn; + dist = d; + } + } - if(dist >= cr && !inside) - return false; + bool inside = cc.x >= rp0.x && cc.x <= (rp0.x + rsize.x) + && cc.y >= rp0.y && cc.y <= (rp0.y + rsize.y); - if(inside) - force = -delta.Resize(abs(cr + dist) + 1); - else - force = delta.Resize(abs(cr - dist) + 1); + VECTOR2I delta = cc - nearest; - return true; + if( dist >= cr && !inside ) + return false; + + if( inside ) + force = -delta.Resize( abs( cr + dist ) + 1 ); + else + force = delta.Resize( abs( cr - dist ) + 1 ); + + return true; }; -static bool ShPushoutForce ( const SHAPE *shape, VECTOR2I p, int r, VECTOR2I& force, int clearance) +static bool ShPushoutForce( const SHAPE* shape, VECTOR2I p, int r, VECTOR2I& force, int clearance ) { - switch(shape->Type()) - { - case SH_CIRCLE: - { - const SHAPE_CIRCLE *cir = static_cast(shape); - return Circle2Circle( cir->GetCenter(), p, cir->GetRadius(), r + clearance + 1, force ); - } - case SH_RECT: - { - const SHAPE_RECT *rect = static_cast(shape); - return Rect2Circle( rect->GetPosition(), rect->GetSize(), p, r + clearance + 1, force ); - } - default: - return false; + switch( shape->Type() ) + { + case SH_CIRCLE: + { + const SHAPE_CIRCLE* cir = static_cast(shape); + return Circle2Circle( cir->GetCenter(), p, cir->GetRadius(), r + clearance + 1, force ); + } - } - return false; + case SH_RECT: + { + const SHAPE_RECT* rect = static_cast(shape); + return Rect2Circle( rect->GetPosition(), rect->GetSize(), p, r + clearance + 1, force ); + } + + default: + return false; + } + + return false; } -bool PNS_VIA::PushoutForce ( PNS_NODE *aNode, const VECTOR2I &aDirection, VECTOR2I& aForce, bool aSolidsOnly, int aMaxIterations) +bool PNS_VIA::PushoutForce( PNS_NODE* aNode, + const VECTOR2I& aDirection, + VECTOR2I& aForce, + bool aSolidsOnly, + int aMaxIterations ) { - int iter = 0; - PNS_VIA mv ( *this); - VECTOR2I force, totalForce; + int iter = 0; + PNS_VIA mv( *this ); + VECTOR2I force, totalForce; - while(iter < aMaxIterations) - { - PNS_NODE::OptObstacle obs = aNode->CheckColliding( &mv, aSolidsOnly ? PNS_ITEM::SOLID : PNS_ITEM::ANY); - - if(!obs) - break; + while( iter < aMaxIterations ) + { + PNS_NODE::OptObstacle obs = aNode->CheckColliding( &mv, + aSolidsOnly ? PNS_ITEM::SOLID : PNS_ITEM::ANY ); - int clearance = aNode->GetClearance(obs->item, &mv); + if( !obs ) + break; - if(iter > 10) - { - VECTOR2I l = - aDirection.Resize(m_diameter / 4); - totalForce += l; - mv.SetPos(mv.GetPos() + l); - } + int clearance = aNode->GetClearance( obs->item, &mv ); - if( ShPushoutForce(obs->item->GetShape(), mv.GetPos(), mv.GetDiameter() / 2, force, clearance) ) - { - totalForce += force; - mv.SetPos(mv.GetPos() + force); - } + if( iter > 10 ) + { + VECTOR2I l = -aDirection.Resize( m_diameter / 4 ); + totalForce += l; + mv.SetPos( mv.GetPos() + l ); + } + + if( ShPushoutForce( obs->item->GetShape(), mv.GetPos(), mv.GetDiameter() / 2, force, + clearance ) ) + { + totalForce += force; + mv.SetPos( mv.GetPos() + force ); + } - iter++; - } + iter++; + } - if(iter == aMaxIterations) - return false; + if( iter == aMaxIterations ) + return false; - aForce = totalForce; - return true; + aForce = totalForce; + return true; } -const SHAPE_LINE_CHAIN PNS_VIA::Hull(int aClearance, int aWalkaroundThickness) const + +const SHAPE_LINE_CHAIN PNS_VIA::Hull( int aClearance, int aWalkaroundThickness ) const { - return OctagonalHull( m_pos - VECTOR2I(m_diameter/2, m_diameter/2), VECTOR2I(m_diameter, m_diameter), aClearance + 1, (2*aClearance + m_diameter) * 0.26); + return OctagonalHull( m_pos - + VECTOR2I( m_diameter / 2, m_diameter / 2 ), VECTOR2I( m_diameter, + m_diameter ), aClearance + 1, (2 * aClearance + m_diameter) * 0.26 ); } - \ No newline at end of file diff --git a/pcbnew/router/pns_via.h b/pcbnew/router/pns_via.h index 3fdd8f8508..1a0fc2a2bd 100644 --- a/pcbnew/router/pns_via.h +++ b/pcbnew/router/pns_via.h @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -28,91 +28,96 @@ class PNS_NODE; -class PNS_VIA : public PNS_ITEM +class PNS_VIA : public PNS_ITEM { - public: - PNS_VIA( ): - PNS_ITEM (VIA) {}; +public: + PNS_VIA() : + PNS_ITEM( VIA ) {}; - PNS_VIA( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aDiameter, int aNet = -1) : - PNS_ITEM (VIA) { - SetNet(aNet); - SetLayers(aLayers); - m_pos = aPos; - m_diameter = aDiameter; - m_shape = SHAPE_CIRCLE(aPos, aDiameter/2); - }; + PNS_VIA( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aDiameter, int aNet = -1 ) : + PNS_ITEM( VIA ) + { + SetNet( aNet ); + SetLayers( aLayers ); + m_pos = aPos; + m_diameter = aDiameter; + m_shape = SHAPE_CIRCLE( aPos, aDiameter / 2 ); + }; - PNS_VIA(const PNS_VIA& b) : PNS_ITEM(VIA) - { - SetNet(b.GetNet()); - SetLayers(b.GetLayers()); - m_pos = b.m_pos; - m_diameter = b.m_diameter; - m_shape = SHAPE_CIRCLE(m_pos, m_diameter/2); - } + PNS_VIA( const PNS_VIA& b ) : PNS_ITEM( VIA ) + { + SetNet( b.GetNet() ); + SetLayers( b.GetLayers() ); + m_pos = b.m_pos; + m_diameter = b.m_diameter; + m_shape = SHAPE_CIRCLE( m_pos, m_diameter / 2 ); + } - const VECTOR2I& GetPos() const - { - return m_pos; - } + const VECTOR2I& GetPos() const + { + return m_pos; + } - void SetPos( const VECTOR2I& aPos ) - { - m_pos = aPos; - m_shape.SetCenter(aPos); - } + void SetPos( const VECTOR2I& aPos ) + { + m_pos = aPos; + m_shape.SetCenter( aPos ); + } - int GetDiameter() const - { - return m_diameter; - } + int GetDiameter() const + { + return m_diameter; + } - void SetDiameter(int aDiameter) - { - m_diameter = aDiameter; - m_shape.SetRadius(m_diameter/2); - } + void SetDiameter( int aDiameter ) + { + m_diameter = aDiameter; + m_shape.SetRadius( m_diameter / 2 ); + } - int GetDrill() const - { - return m_drill; - } + int GetDrill() const + { + return m_drill; + } - void SetDrill(int aDrill) - { - m_drill = aDrill; - } + void SetDrill( int aDrill ) + { + m_drill = aDrill; + } - bool PushoutForce ( PNS_NODE *aNode, const VECTOR2I &aDirection, VECTOR2I& aForce, bool aSolidsOnly = true, int aMaxIterations = 10); + bool PushoutForce( PNS_NODE* aNode, + const VECTOR2I& aDirection, + VECTOR2I& aForce, + bool aSolidsOnly = true, + int aMaxIterations = 10 ); - const SHAPE *GetShape() const - { - return &m_shape; - } + const SHAPE* GetShape() const + { + return &m_shape; + } - PNS_VIA *Clone() const - { - PNS_VIA *v = new PNS_VIA(); + PNS_VIA* Clone() const + { + PNS_VIA* v = new PNS_VIA(); - v->SetNet(GetNet()); - v->SetLayers(GetLayers()); - v->m_pos = m_pos; - v->m_diameter = m_diameter; - v->m_shape = SHAPE_CIRCLE(m_pos, m_diameter/2); - - return v; - } + v->SetNet( GetNet() ); + v->SetLayers( GetLayers() ); + v->m_pos = m_pos; + v->m_diameter = m_diameter; + v->m_shape = SHAPE_CIRCLE( m_pos, m_diameter / 2 ); - const SHAPE_LINE_CHAIN Hull(int aClearance = 0, int aWalkaroundThickness = 0) const; + return v; + } - private: - - int m_diameter; - int m_drill; - VECTOR2I m_pos; - SHAPE_CIRCLE m_shape; + const SHAPE_LINE_CHAIN Hull( int aClearance = 0, int aWalkaroundThickness = 0 ) const; + +private: + + int m_diameter; + int m_drill; + VECTOR2I m_pos; + SHAPE_CIRCLE m_shape; }; #endif diff --git a/pcbnew/router/pns_walkaround.cpp b/pcbnew/router/pns_walkaround.cpp index c384fdbee5..ee3cb9c09c 100644 --- a/pcbnew/router/pns_walkaround.cpp +++ b/pcbnew/router/pns_walkaround.cpp @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -35,187 +35,197 @@ using boost::optional; void PNS_WALKAROUND::start( const PNS_LINE& aInitialPath ) { - m_iteration = 0; - m_iteration_limit = 50; + m_iteration = 0; + m_iteration_limit = 50; } -PNS_NODE::OptObstacle PNS_WALKAROUND::nearestObstacle(const PNS_LINE& aPath) +PNS_NODE::OptObstacle PNS_WALKAROUND::nearestObstacle( const PNS_LINE& aPath ) { - return m_world->NearestObstacle ( &aPath, m_solids_only ? (PNS_ITEM::SOLID | PNS_ITEM::VIA) : PNS_ITEM::ANY ); + return m_world->NearestObstacle( &aPath, + m_solids_only ? (PNS_ITEM::SOLID | PNS_ITEM::VIA) : PNS_ITEM::ANY ); } -PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::singleStep(PNS_LINE& aPath, bool aWindingDirection) +PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::singleStep( PNS_LINE& aPath, + bool aWindingDirection ) { - optional& current_obs = aWindingDirection ? m_currentObstacle[0] : m_currentObstacle[1]; - bool& prev_recursive = aWindingDirection ? m_recursiveCollision[0] : m_recursiveCollision[1]; - - if(!current_obs) - return DONE; + optional& current_obs = + aWindingDirection ? m_currentObstacle[0] : m_currentObstacle[1]; + bool& prev_recursive = aWindingDirection ? m_recursiveCollision[0] : m_recursiveCollision[1]; - SHAPE_LINE_CHAIN path_pre[2], path_walk[2], path_post[2]; + if( !current_obs ) + return DONE; - VECTOR2I last = aPath.GetCLine().CPoint(-1); + SHAPE_LINE_CHAIN path_pre[2], path_walk[2], path_post[2]; - if((current_obs->hull).PointInside(last)) - { - m_recursiveBlockageCount ++; + VECTOR2I last = aPath.GetCLine().CPoint( -1 ); - if(m_recursiveBlockageCount < 3) - aPath.GetLine().Append( current_obs->hull.NearestPoint(last) ); - else { - aPath = aPath.ClipToNearestObstacle(m_world); - return STUCK; - } - } + if( ( current_obs->hull ).PointInside( last ) ) + { + m_recursiveBlockageCount++; - aPath.NewWalkaround(current_obs->hull, path_pre[0], path_walk[0], path_post[0], aWindingDirection); - aPath.NewWalkaround(current_obs->hull, path_pre[1], path_walk[1], path_post[1], !aWindingDirection); + if( m_recursiveBlockageCount < 3 ) + aPath.GetLine().Append( current_obs->hull.NearestPoint( last ) ); + else + { + aPath = aPath.ClipToNearestObstacle( m_world ); + return STUCK; + } + } + aPath.NewWalkaround( current_obs->hull, path_pre[0], path_walk[0], + path_post[0], aWindingDirection ); + aPath.NewWalkaround( current_obs->hull, path_pre[1], path_walk[1], + path_post[1], !aWindingDirection ); - int len_pre = path_walk[0].Length(); - int len_alt = path_walk[1].Length(); - - PNS_LINE walk_path (aPath, path_walk[1]); - - bool alt_collides = m_world->CheckColliding(&walk_path, m_solids_only ? PNS_ITEM::SOLID : PNS_ITEM::ANY); + int len_pre = path_walk[0].Length(); + int len_alt = path_walk[1].Length(); - SHAPE_LINE_CHAIN pnew; + PNS_LINE walk_path( aPath, path_walk[1] ); - if(!m_forceSingleDirection && len_alt < len_pre && !alt_collides && !prev_recursive) - { - pnew = path_pre[1]; - pnew.Append(path_walk[1]); - pnew.Append(path_post[1]); - - current_obs = nearestObstacle(PNS_LINE(aPath, path_post[1])); - prev_recursive = false; - } else { - pnew = path_pre[0]; - pnew.Append(path_walk[0]); - pnew.Append(path_post[0]); - - current_obs = nearestObstacle(PNS_LINE(aPath, path_walk[0])); + bool alt_collides = m_world->CheckColliding( &walk_path, + m_solids_only ? PNS_ITEM::SOLID : PNS_ITEM::ANY ); - if(!current_obs) - { - prev_recursive = false; - current_obs = nearestObstacle(PNS_LINE(aPath, path_post[0])); - } else - prev_recursive = true; - } + SHAPE_LINE_CHAIN pnew; - - pnew.Simplify(); - aPath.SetShape(pnew); + if( !m_forceSingleDirection && len_alt < len_pre && !alt_collides && !prev_recursive ) + { + pnew = path_pre[1]; + pnew.Append( path_walk[1] ); + pnew.Append( path_post[1] ); - return IN_PROGRESS; + current_obs = nearestObstacle( PNS_LINE( aPath, path_post[1] ) ); + prev_recursive = false; + } + else + { + pnew = path_pre[0]; + pnew.Append( path_walk[0] ); + pnew.Append( path_post[0] ); + + current_obs = nearestObstacle( PNS_LINE( aPath, path_walk[0] ) ); + + if( !current_obs ) + { + prev_recursive = false; + current_obs = nearestObstacle( PNS_LINE( aPath, path_post[0] ) ); + } + else + prev_recursive = true; + } + + pnew.Simplify(); + aPath.SetShape( pnew ); + + return IN_PROGRESS; } -PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::Route( const PNS_LINE& aInitialPath, PNS_LINE& aWalkPath, bool aOptimize ) + +PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::Route( const PNS_LINE& aInitialPath, + PNS_LINE& aWalkPath, + bool aOptimize ) { - PNS_LINE path_cw(aInitialPath), path_ccw(aInitialPath); - WalkaroundStatus s_cw = IN_PROGRESS, s_ccw = IN_PROGRESS; - SHAPE_LINE_CHAIN best_path; + PNS_LINE path_cw( aInitialPath ), path_ccw( aInitialPath ); + WalkaroundStatus s_cw = IN_PROGRESS, s_ccw = IN_PROGRESS; + SHAPE_LINE_CHAIN best_path; - start(aInitialPath); + start( aInitialPath ); - m_currentObstacle[0] = m_currentObstacle[1] = nearestObstacle(aInitialPath); - m_recursiveBlockageCount = 0; + m_currentObstacle[0] = m_currentObstacle[1] = nearestObstacle( aInitialPath ); + m_recursiveBlockageCount = 0; - aWalkPath = aInitialPath; + aWalkPath = aInitialPath; - while(m_iteration < m_iteration_limit) - { - if(s_cw != STUCK) - s_cw = singleStep(path_cw, true); - - if(s_ccw != STUCK) - s_ccw = singleStep(path_ccw, false); + while( m_iteration < m_iteration_limit ) + { + if( s_cw != STUCK ) + s_cw = singleStep( path_cw, true ); - if((s_cw == DONE && s_ccw == DONE) || (s_cw == STUCK && s_ccw == STUCK)) - { - int len_cw = path_cw.GetCLine().Length(); - int len_ccw = path_ccw.GetCLine().Length(); + if( s_ccw != STUCK ) + s_ccw = singleStep( path_ccw, false ); + + if( ( s_cw == DONE && s_ccw == DONE ) || ( s_cw == STUCK && s_ccw == STUCK ) ) + { + int len_cw = path_cw.GetCLine().Length(); + int len_ccw = path_ccw.GetCLine().Length(); + + if( m_forceLongerPath ) + aWalkPath = (len_cw > len_ccw ? path_cw : path_ccw); + else + aWalkPath = (len_cw < len_ccw ? path_cw : path_ccw); + + break; + } + else if( s_cw == DONE && !m_forceLongerPath ) + { + aWalkPath = path_cw; + break; + } + else if( s_ccw == DONE && !m_forceLongerPath ) + { + aWalkPath = path_ccw; + break; + } + + m_iteration++; + } + + if( m_iteration == m_iteration_limit ) + { + int len_cw = path_cw.GetCLine().Length(); + int len_ccw = path_ccw.GetCLine().Length(); - if(m_forceLongerPath) - aWalkPath = (len_cw > len_ccw ? path_cw : path_ccw); - else - aWalkPath = (len_cw < len_ccw ? path_cw : path_ccw); + if( m_forceLongerPath ) + aWalkPath = (len_cw > len_ccw ? path_cw : path_ccw); + else + aWalkPath = (len_cw < len_ccw ? path_cw : path_ccw); + } - break; - } else if(s_cw == DONE && !m_forceLongerPath) { - aWalkPath = path_cw; - break; - } else if (s_ccw == DONE && !m_forceLongerPath) { - aWalkPath = path_ccw; - break; - } + if( m_cursorApproachMode ) + { + // int len_cw = path_cw.GetCLine().Length(); + // int len_ccw = path_ccw.GetCLine().Length(); + bool found = false; + SHAPE_LINE_CHAIN l = aWalkPath.GetCLine(); - m_iteration++; - } + for( int i = 0; i < l.SegmentCount(); i++ ) + { + const SEG s = l.Segment( i ); - if(m_iteration == m_iteration_limit) - { - int len_cw = path_cw.GetCLine().Length(); - int len_ccw = path_ccw.GetCLine().Length(); + VECTOR2I nearest = s.NearestPoint( m_cursorPos ); + VECTOR2I::extended_type dist_a = (s.a - m_cursorPos).SquaredEuclideanNorm(); + VECTOR2I::extended_type dist_b = (s.b - m_cursorPos).SquaredEuclideanNorm(); + VECTOR2I::extended_type dist_n = (nearest - m_cursorPos).SquaredEuclideanNorm(); + if( dist_n <= dist_a && dist_n < dist_b ) + { + // PNSDisplayDebugLine(l, 3); + l.Remove( i + 1, -1 ); + l.Append( nearest ); + l.Simplify(); + found = true; + break; + } + } - if(m_forceLongerPath) - aWalkPath = (len_cw > len_ccw ? path_cw : path_ccw); - else - aWalkPath = (len_cw < len_ccw ? path_cw : path_ccw); + if( found ) + { + aWalkPath = aInitialPath; + aWalkPath.SetShape( l ); + } + } - } + aWalkPath.SetWorld( m_world ); + aWalkPath.GetLine().Simplify(); - if(m_cursorApproachMode) - { - //int len_cw = path_cw.GetCLine().Length(); - //int len_ccw = path_ccw.GetCLine().Length(); - bool found = false; + WalkaroundStatus st = s_ccw == DONE || s_cw == DONE ? DONE : STUCK; - SHAPE_LINE_CHAIN l = aWalkPath.GetCLine(); + if( aOptimize && st == DONE ) + PNS_OPTIMIZER::Optimize( &aWalkPath, PNS_OPTIMIZER::MERGE_OBTUSE, m_world ); - - for(int i = 0; i < l.SegmentCount(); i++) - { - const SEG s = l.Segment(i); - - VECTOR2I nearest = s.NearestPoint(m_cursorPos); - VECTOR2I::extended_type dist_a = (s.a - m_cursorPos).SquaredEuclideanNorm(); - VECTOR2I::extended_type dist_b = (s.b - m_cursorPos).SquaredEuclideanNorm(); - VECTOR2I::extended_type dist_n = (nearest - m_cursorPos).SquaredEuclideanNorm(); - - - - if(dist_n <= dist_a && dist_n < dist_b) - { - //PNSDisplayDebugLine(l, 3); - l.Remove(i + 1, -1); - l.Append( nearest ); - l.Simplify(); - found = true; - break; - } - } - if(found) - { - aWalkPath = aInitialPath; - aWalkPath.SetShape(l); - } - } - - - aWalkPath.SetWorld(m_world); - aWalkPath.GetLine().Simplify(); - - WalkaroundStatus st = s_ccw == DONE || s_cw == DONE ? DONE : STUCK; - - if(aOptimize && st == DONE) - PNS_OPTIMIZER::Optimize(&aWalkPath, PNS_OPTIMIZER::MERGE_OBTUSE, m_world); - - return st; + return st; } + diff --git a/pcbnew/router/pns_walkaround.h b/pcbnew/router/pns_walkaround.h index 0c71e0f190..830748553d 100644 --- a/pcbnew/router/pns_walkaround.h +++ b/pcbnew/router/pns_walkaround.h @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -24,76 +24,75 @@ #include "pns_line.h" #include "pns_node.h" -class PNS_WALKAROUND { - - static const int DefaultIterationLimit = 50; +class PNS_WALKAROUND +{ + static const int DefaultIterationLimit = 50; +public: + PNS_WALKAROUND( PNS_NODE* aWorld ) : + m_world( aWorld ), m_iteration_limit( DefaultIterationLimit ) + { + m_forceSingleDirection = false; + m_forceLongerPath = false; + m_cursorApproachMode = false; + }; + ~PNS_WALKAROUND() {}; + enum WalkaroundStatus + { + IN_PROGRESS = 0, + DONE, + STUCK + }; - public: - PNS_WALKAROUND( PNS_NODE *aWorld ): - m_world(aWorld), m_iteration_limit(DefaultIterationLimit) { - m_forceSingleDirection = false; - m_forceLongerPath = false; - m_cursorApproachMode = false; - }; - ~PNS_WALKAROUND() {}; + void SetWorld( PNS_NODE* aNode ) + { + m_world = aNode; + } - enum WalkaroundStatus { - IN_PROGRESS = 0, - DONE, - STUCK - }; + void SetIterationLimit( const int aIterLimit ) + { + m_iteration_limit = aIterLimit; + } - void SetWorld ( PNS_NODE *aNode ) - { - m_world = aNode; - } + void SetSolidsOnly( bool aSolidsOnly ) + { + m_solids_only = aSolidsOnly; + } - void SetIterationLimit( const int aIterLimit ) - { - m_iteration_limit = aIterLimit; - } + void SetSingleDirection( bool aForceSingleDirection ) + { + m_forceSingleDirection = aForceSingleDirection; + m_forceLongerPath = true; + } - void SetSolidsOnly ( bool aSolidsOnly ) - { - m_solids_only = aSolidsOnly; - } + void SetApproachCursor( bool aEnabled, const VECTOR2I& aPos ) + { + m_cursorPos = aPos; + m_cursorApproachMode = aEnabled; + } + WalkaroundStatus Route( const PNS_LINE& aInitialPath, PNS_LINE& aWalkPath, + bool aOptimize = true ); - void SetSingleDirection (bool aForceSingleDirection ) - { - m_forceSingleDirection = aForceSingleDirection; - m_forceLongerPath = true; - } +private: + void start( const PNS_LINE& aInitialPath ); - void SetApproachCursor ( bool aEnabled, const VECTOR2I& aPos ) - { - m_cursorPos = aPos; - m_cursorApproachMode = aEnabled; - } - + WalkaroundStatus singleStep( PNS_LINE& aPath, bool aWindingDirection ); + PNS_NODE::OptObstacle nearestObstacle( const PNS_LINE& aPath ); - WalkaroundStatus Route( const PNS_LINE& aInitialPath, PNS_LINE& aWalkPath, bool aOptimize = true); + PNS_NODE* m_world; - private: - void start( const PNS_LINE& aInitialPath ); - - WalkaroundStatus singleStep(PNS_LINE& aPath, bool aWindingDirection); - PNS_NODE::OptObstacle nearestObstacle(const PNS_LINE& aPath); - - PNS_NODE *m_world; - - int m_recursiveBlockageCount; - int m_iteration; - int m_iteration_limit; - bool m_solids_only; - bool m_forceSingleDirection, m_forceLongerPath; - bool m_cursorApproachMode; - VECTOR2I m_cursorPos; - PNS_NODE::OptObstacle m_currentObstacle[2]; - bool m_recursiveCollision[2]; + int m_recursiveBlockageCount; + int m_iteration; + int m_iteration_limit; + bool m_solids_only; + bool m_forceSingleDirection, m_forceLongerPath; + bool m_cursorApproachMode; + VECTOR2I m_cursorPos; + PNS_NODE::OptObstacle m_currentObstacle[2]; + bool m_recursiveCollision[2]; }; -#endif // __PNS_WALKAROUND_H +#endif // __PNS_WALKAROUND_H diff --git a/pcbnew/router/readme.txt b/pcbnew/router/readme.txt deleted file mode 100644 index 933b93a817..0000000000 --- a/pcbnew/router/readme.txt +++ /dev/null @@ -1,4 +0,0 @@ -You'll see the P&S router sources here, but just not right now. -We are still dealing with some non-technical issues that should be solved by the next week. - -Tom \ No newline at end of file diff --git a/pcbnew/router/router_preview_item.cpp b/pcbnew/router/router_preview_item.cpp index b63233c821..5cae19f317 100644 --- a/pcbnew/router/router_preview_item.cpp +++ b/pcbnew/router/router_preview_item.cpp @@ -3,21 +3,21 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ - + #include #include "class_track.h" @@ -31,167 +31,200 @@ using namespace KiGfx; -ROUTER_PREVIEW_ITEM::ROUTER_PREVIEW_ITEM( const PNS_ITEM *aItem, VIEW_GROUP *aParent ) - : EDA_ITEM( NOT_USED ) - { - m_Flags = 0; - m_parent = aParent; - if(aItem) - Update(aItem); - } - +ROUTER_PREVIEW_ITEM::ROUTER_PREVIEW_ITEM( const PNS_ITEM* aItem, VIEW_GROUP* aParent ) : + EDA_ITEM( NOT_USED ) +{ + m_Flags = 0; + m_parent = aParent; + + if( aItem ) + Update( aItem ); +} + + ROUTER_PREVIEW_ITEM::~ROUTER_PREVIEW_ITEM() { - } - -void ROUTER_PREVIEW_ITEM::Update(const PNS_ITEM *aItem) + + +void ROUTER_PREVIEW_ITEM::Update( const PNS_ITEM* aItem ) { - m_layer = aItem->GetLayers().Start(); + m_layer = aItem->GetLayers().Start(); + m_color = getLayerColor( m_layer ); + m_color.a = 0.8; - m_color = getLayerColor( m_layer ); - m_color.a = 0.8; - - switch(aItem->GetKind()) - { - case PNS_ITEM::LINE: - m_type = PR_LINE; - m_width = static_cast(aItem)->GetWidth(); - m_line = * static_cast(aItem->GetShape()); - break; + switch( aItem->GetKind() ) + { + case PNS_ITEM::LINE: + m_type = PR_LINE; + m_width = static_cast(aItem)->GetWidth(); + m_line = *static_cast( aItem->GetShape() ); + break; - case PNS_ITEM::SEGMENT: - m_type = PR_LINE; - m_width = static_cast(aItem)->GetWidth(); - m_line = * static_cast(aItem->GetShape()); - break; + case PNS_ITEM::SEGMENT: + m_type = PR_LINE; + m_width = static_cast(aItem)->GetWidth(); + m_line = *static_cast( aItem->GetShape() ); + break; - case PNS_ITEM::VIA: - m_type = PR_VIA; - m_color = COLOR4D(0.7, 0.7, 0.7, 0.8); - m_width = static_cast(aItem)->GetDiameter(); - m_viaCenter = static_cast(aItem)->GetPos(); - break; + case PNS_ITEM::VIA: + m_type = PR_VIA; + m_color = COLOR4D( 0.7, 0.7, 0.7, 0.8 ); + m_width = static_cast(aItem)->GetDiameter(); + m_viaCenter = static_cast(aItem)->GetPos(); + break; - default: - break; - } - - ViewSetVisible(true); - ViewUpdate(GEOMETRY | APPEARANCE); + default: + break; + } + + ViewSetVisible( true ); + ViewUpdate( GEOMETRY | APPEARANCE ); } -void ROUTER_PREVIEW_ITEM::MarkAsHead( ) + +void ROUTER_PREVIEW_ITEM::MarkAsHead() { - if(m_type != PR_VIA) - m_color.Saturate(1.0); + if( m_type != PR_VIA ) + m_color.Saturate( 1.0 ); } -const BOX2I ROUTER_PREVIEW_ITEM::ViewBBox() const + +const BOX2I ROUTER_PREVIEW_ITEM::ViewBBox() const { - BOX2I bbox; + BOX2I bbox; - switch(m_type) - { - case PR_LINE: - bbox = m_line.BBox(); - bbox.Inflate( m_width / 2); - return bbox; - case PR_VIA: - bbox = BOX2I( m_viaCenter, VECTOR2I(0, 0)); - bbox.Inflate( m_width / 2); - return bbox; - default: - break; - } - return bbox; + switch( m_type ) + { + case PR_LINE: + bbox = m_line.BBox(); + bbox.Inflate( m_width / 2 ); + return bbox; + + case PR_VIA: + bbox = BOX2I( m_viaCenter, VECTOR2I( 0, 0 ) ); + bbox.Inflate( m_width / 2 ); + return bbox; + + default: + break; + } + + return bbox; } + void ROUTER_PREVIEW_ITEM::ViewDraw( int aLayer, KiGfx::GAL* aGal ) const { - switch( m_type ) - { - case PR_LINE: + switch( m_type ) + { + case PR_LINE: + aGal->SetLayerDepth( -100.0 ); + aGal->SetLineWidth( m_width ); + aGal->SetStrokeColor( m_color ); + aGal->SetIsStroke( true ); + aGal->SetIsFill( false ); - aGal->SetLayerDepth(-100.0); - aGal->SetLineWidth(m_width); - aGal->SetStrokeColor(m_color); - aGal->SetIsStroke(true); - aGal->SetIsFill(false); - for(int s= 0 ; s < m_line.SegmentCount(); s++) - aGal->DrawLine(m_line.CSegment(s).a, m_line.CSegment(s).b); - if(m_line.IsClosed()) - aGal->DrawLine(m_line.CSegment(-1).b, m_line.CSegment(0).a); - break; - case PR_VIA: - - aGal->SetLayerDepth(-101.0); - aGal->SetIsStroke(false); - aGal->SetIsFill(true); - aGal->SetFillColor(m_color); - aGal->DrawCircle(m_viaCenter, m_width / 2); - break; - default: - break; - } + for( int s = 0; s < m_line.SegmentCount(); s++ ) + aGal->DrawLine( m_line.CSegment( s ).a, m_line.CSegment( s ).b ); + + if( m_line.IsClosed() ) + aGal->DrawLine( m_line.CSegment( -1 ).b, m_line.CSegment( 0 ).a ); + break; + + case PR_VIA: + aGal->SetLayerDepth( -101.0 ); + aGal->SetIsStroke( false ); + aGal->SetIsFill( true ); + aGal->SetFillColor( m_color ); + aGal->DrawCircle( m_viaCenter, m_width / 2 ); + break; + + default: + break; + } } -void ROUTER_PREVIEW_ITEM::DebugLine ( const SHAPE_LINE_CHAIN& aLine, int aWidth , int aStyle ) +void ROUTER_PREVIEW_ITEM::DebugLine( const SHAPE_LINE_CHAIN& aLine, int aWidth, int aStyle ) { #if 0 - m_line = aLine; - m_width = aWidth; - m_color = assignColor(aStyle); - + m_line = aLine; + m_width = aWidth; + m_color = assignColor( aStyle ); - m_type = PR_LINE; - ViewUpdate(GEOMETRY | APPEARANCE); + + m_type = PR_LINE; + ViewUpdate( GEOMETRY | APPEARANCE ); #endif } -void ROUTER_PREVIEW_ITEM::DebugBox ( const BOX2I& aBox, int aStyle ) + +void ROUTER_PREVIEW_ITEM::DebugBox( const BOX2I& aBox, int aStyle ) { #if 0 - assert(false); + assert( false ); - m_line.Clear(); - m_line.Append( aBox.GetX(), aBox.GetY() ); - m_line.Append( aBox.GetX() + aBox.GetWidth(), aBox.GetY() + aBox.GetHeight()); - m_line.Append( aBox.GetX() + aBox.GetWidth(), aBox.GetY() + aBox.GetHeight()); - m_line.Append( aBox.GetX(), aBox.GetY() + aBox.GetHeight()); - m_line.SetClosed(true); - m_width = 20000; - m_color = assignColor(aStyle); - m_type = PR_LINE; - ViewUpdate(GEOMETRY | APPEARANCE); + m_line.Clear(); + m_line.Append( aBox.GetX(), aBox.GetY() ); + m_line.Append( aBox.GetX() + aBox.GetWidth(), aBox.GetY() + aBox.GetHeight() ); + m_line.Append( aBox.GetX() + aBox.GetWidth(), aBox.GetY() + aBox.GetHeight() ); + m_line.Append( aBox.GetX(), aBox.GetY() + aBox.GetHeight() ); + m_line.SetClosed( true ); + m_width = 20000; + m_color = assignColor( aStyle ); + m_type = PR_LINE; + ViewUpdate( GEOMETRY | APPEARANCE ); #endif } - -const COLOR4D ROUTER_PREVIEW_ITEM::getLayerColor (int layer ) const -{ - //assert (m_view != NULL); - PCB_RENDER_SETTINGS *settings = static_cast (m_parent -> GetView() -> GetPainter() -> GetSettings()); - return settings->GetLayerColor(layer); + +const COLOR4D ROUTER_PREVIEW_ITEM::getLayerColor( int aLayer ) const +{ + // assert (m_view != NULL); + + PCB_RENDER_SETTINGS* settings = + static_cast ( m_parent->GetView()->GetPainter()->GetSettings() ); + + return settings->GetLayerColor( aLayer ); } -const COLOR4D ROUTER_PREVIEW_ITEM::assignColor ( int style ) const +const COLOR4D ROUTER_PREVIEW_ITEM::assignColor( int aStyle ) const { - COLOR4D color; - switch(style) - { - case 0: color =COLOR4D(0, 1, 0, 1);break; - case 1: color =COLOR4D(1, 0, 0, 0.3);break; - case 2: color =COLOR4D(1, 0.5, 0.5, 1);break; - case 3: color =COLOR4D(0, 0, 1, 1);break; - case 4: color =COLOR4D(1, 1, 1, 1); break; - case 5: color =COLOR4D(1, 1, 0, 1); break; - case 6: color =COLOR4D(0, 1, 1, 1); break; - case 32: color =COLOR4D(0, 0, 1, 0.5); break; - default: break; - } - return color; + COLOR4D color; + + switch( aStyle ) + { + case 0: + color = COLOR4D( 0, 1, 0, 1 ); break; + + case 1: + color = COLOR4D( 1, 0, 0, 0.3 ); break; + + case 2: + color = COLOR4D( 1, 0.5, 0.5, 1 ); break; + + case 3: + color = COLOR4D( 0, 0, 1, 1 ); break; + + case 4: + color = COLOR4D( 1, 1, 1, 1 ); break; + + case 5: + color = COLOR4D( 1, 1, 0, 1 ); break; + + case 6: + color = COLOR4D( 0, 1, 1, 1 ); break; + + case 32: + color = COLOR4D( 0, 0, 1, 0.5 ); break; + + default: + break; + } + + return color; } + diff --git a/pcbnew/router/router_preview_item.h b/pcbnew/router/router_preview_item.h index bedd8a0c2a..9c5d2e3497 100644 --- a/pcbnew/router/router_preview_item.h +++ b/pcbnew/router/router_preview_item.h @@ -3,21 +3,21 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ - + #ifndef __ROUTER_PREVIEW_ITEM_H #define __ROUTER_PREVIEW_ITEM_H @@ -43,61 +43,61 @@ class PNS_ROUTER; class ROUTER_PREVIEW_ITEM : public EDA_ITEM { - public: - enum ItemType { - PR_VIA, - PR_LINE, - PR_STUCK_MARKER - }; +public: + enum ItemType + { + PR_VIA, + PR_LINE, + PR_STUCK_MARKER + }; - enum ItemFlags { - PR_SUGGESTION = 1 - }; + enum ItemFlags + { + PR_SUGGESTION = 1 + }; - ROUTER_PREVIEW_ITEM( const PNS_ITEM *aItem = NULL, KiGfx::VIEW_GROUP *aParent = NULL ); - ~ROUTER_PREVIEW_ITEM(); - - void Update ( const PNS_ITEM *aItem); + ROUTER_PREVIEW_ITEM( const PNS_ITEM* aItem = NULL, KiGfx::VIEW_GROUP* aParent = NULL ); + ~ROUTER_PREVIEW_ITEM(); - void StuckMarker( VECTOR2I& aPosition ); - void DebugLine ( const SHAPE_LINE_CHAIN& aLine, int aWidth = 0, int aStyle = 0 ); - void DebugBox ( const BOX2I& aBox, int aStyle = 0); - void Show(int a, std::ostream& b) const {}; + void Update( const PNS_ITEM* aItem ); - const BOX2I ViewBBox() const; - - - virtual void ViewDraw( int aLayer, KiGfx::GAL* aGal ) const; - - virtual void ViewGetLayers( int aLayers[], int& aCount ) const - { - aLayers[0] = GP_OVERLAY; - aCount = 1; - } - - void MarkAsHead( ); + void StuckMarker( VECTOR2I& aPosition ); + void DebugLine( const SHAPE_LINE_CHAIN& aLine, int aWidth = 0, int aStyle = 0 ); + void DebugBox( const BOX2I& aBox, int aStyle = 0 ); - private: + void Show( int a, std::ostream& b ) const {}; - const KiGfx::COLOR4D assignColor ( int style ) const; - const KiGfx::COLOR4D getLayerColor (int layer ) const; + const BOX2I ViewBBox() const; - KiGfx::VIEW_GROUP *m_parent; + virtual void ViewDraw( int aLayer, KiGfx::GAL* aGal ) const; - PNS_ROUTER *m_router; - SHAPE_LINE_CHAIN m_line; + virtual void ViewGetLayers( int aLayers[], int& aCount ) const + { + aLayers[0] = GP_OVERLAY; + aCount = 1; + } - ItemType m_type; - int m_style; - int m_width; - int m_layer; + void MarkAsHead(); - KiGfx::COLOR4D m_color; +private: + const KiGfx::COLOR4D assignColor( int aStyle ) const; + const KiGfx::COLOR4D getLayerColor( int aLayer ) const; - VECTOR2I m_stuckPosition; - VECTOR2I m_viaCenter; + KiGfx::VIEW_GROUP* m_parent; + PNS_ROUTER* m_router; + SHAPE_LINE_CHAIN m_line; + + ItemType m_type; + int m_style; + int m_width; + int m_layer; + + KiGfx::COLOR4D m_color; + + VECTOR2I m_stuckPosition; + VECTOR2I m_viaCenter; }; - #endif + diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 5bc84708ac..6ab7688b59 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -42,70 +42,73 @@ using namespace KiGfx; using namespace std; using boost::optional; -static TOOL_ACTION ACT_AutoEndRoute ( "AutoEndRoute", AS_CONTEXT, 'F' ); -static TOOL_ACTION ACT_PlaceVia ( "PlaceVia", AS_CONTEXT, 'V' ); -static TOOL_ACTION ACT_OpenRouteOptions ( "OpenRouterOptions", AS_CONTEXT, 'E' ); -static TOOL_ACTION ACT_SwitchPosture ( "SwitchPosture", AS_CONTEXT, '/' ); -static TOOL_ACTION ACT_EndTrack ( "SwitchPosture", AS_CONTEXT, WXK_END ); +static TOOL_ACTION ACT_AutoEndRoute( "AutoEndRoute", AS_CONTEXT, 'F' ); +static TOOL_ACTION ACT_PlaceVia( "PlaceVia", AS_CONTEXT, 'V' ); +static TOOL_ACTION ACT_OpenRouteOptions( "OpenRouterOptions", AS_CONTEXT, 'E' ); +static TOOL_ACTION ACT_SwitchPosture( "SwitchPosture", AS_CONTEXT, '/' ); +static TOOL_ACTION ACT_EndTrack( "SwitchPosture", AS_CONTEXT, WXK_END ); ROUTER_TOOL::ROUTER_TOOL() : - TOOL_INTERACTIVE( "pcbnew.InteractiveRouter" ) + TOOL_INTERACTIVE( "pcbnew.InteractiveRouter" ) { - m_router = NULL; - m_menu = new CONTEXT_MENU ; + m_router = NULL; + m_menu = new CONTEXT_MENU; - m_menu->SetTitle( wxT( "Interactive router") ); // fixme: not implemented yet. Sorry. - m_menu->Add( wxT ("Cancel"), 0); - m_menu->Add( wxT ("New track"), 1); - m_menu->Add( wxT ("End track"), 2); - m_menu->Add( wxT ("Auto-end track"), 2); - m_menu->Add( wxT ("Place via"), 3); - m_menu->Add( wxT ("Switch posture"), 4); - - m_menu->Add( wxT ("Routing options..."), 5); + m_menu->SetTitle( wxT( "Interactive router" ) ); // fixme: not implemented yet. Sorry. + m_menu->Add( wxT( "Cancel" ), 0 ); + m_menu->Add( wxT( "New track" ), 1 ); + m_menu->Add( wxT( "End track" ), 2 ); + m_menu->Add( wxT( "Auto-end track" ), 2 ); + m_menu->Add( wxT( "Place via" ), 3 ); + m_menu->Add( wxT( "Switch posture" ), 4 ); + + m_menu->Add( wxT( "Routing options..." ), 5 ); } ROUTER_TOOL::~ROUTER_TOOL() { - delete m_router; + delete m_router; } void ROUTER_TOOL::Reset() { - - if(m_router) + if( m_router ) delete m_router; m_router = new PNS_ROUTER; - TRACEn(0,"Reset"); + TRACEn( 0, "Reset" ); m_router->ClearWorld(); - m_router->SetBoard( getModel (PCB_T) ); + m_router->SetBoard( getModel( PCB_T ) ); m_router->SyncWorld(); - if(getView()) + if( getView() ) m_router->SetView( getView() ); Go( &ROUTER_TOOL::Main, TOOL_EVENT( TC_Command, TA_Action, GetName() ) ); } + int ROUTER_TOOL::getDefaultWidth( int aNetCode ) { int w, d1, d2; - getNetclassDimensions( aNetCode, w, d1, d2); + + getNetclassDimensions( aNetCode, w, d1, d2 ); return w; } -void ROUTER_TOOL::getNetclassDimensions ( int aNetCode, int& aWidth, int& aViaDiameter, int& aViaDrill) + +void ROUTER_TOOL::getNetclassDimensions( int aNetCode, int& aWidth, + int& aViaDiameter, int& aViaDrill ) { - BOARD *board = getModel (PCB_T); - + BOARD* board = getModel( PCB_T ); + NETCLASS* netClass = NULL; - NETINFO_ITEM *ni = board->FindNet(aNetCode); - - if(ni) + NETINFO_ITEM* ni = board->FindNet( aNetCode ); + + if( ni ) { wxString netClassName = ni->GetClassName(); netClass = board->m_NetClasses.Find( netClassName ); @@ -113,26 +116,27 @@ void ROUTER_TOOL::getNetclassDimensions ( int aNetCode, int& aWidth, int& aViaDi if( !netClass ) netClass = board->m_NetClasses.GetDefault(); - + aWidth = netClass->GetTrackWidth(); aViaDiameter = netClass->GetViaDiameter(); aViaDrill = netClass->GetViaDrill(); } -PNS_ITEM *ROUTER_TOOL::pickSingleItem( const VECTOR2I& aWhere, int aNet, int aLayer ) +PNS_ITEM* ROUTER_TOOL::pickSingleItem( const VECTOR2I& aWhere, int aNet, int aLayer ) { int tl = getView()->GetTopLayer(); - if(aLayer > 0) + if( aLayer > 0 ) tl = aLayer; - PNS_ITEM *picked_seg = NULL, *picked_via = NULL; - PNS_ITEMSET candidates = m_router->QueryHoverItems(aWhere); + PNS_ITEM* picked_seg = NULL; + PNS_ITEM* picked_via = NULL; + PNS_ITEMSET candidates = m_router->QueryHoverItems( aWhere ); - BOOST_FOREACH( PNS_ITEM *item, candidates.Items() ) + BOOST_FOREACH( PNS_ITEM* item, candidates.Items() ) { - if( !IsCopperLayer(item->GetLayers().Start()) ) + if( !IsCopperLayer( item->GetLayers().Start() ) ) continue; if( item->GetParent() && !item->GetParent()->ViewIsVisible() ) @@ -140,108 +144,116 @@ PNS_ITEM *ROUTER_TOOL::pickSingleItem( const VECTOR2I& aWhere, int aNet, int aLa if( aNet < 0 || item->GetNet() == aNet ) { - if( item->OfKind (PNS_ITEM::VIA | PNS_ITEM::SOLID) ) + if( item->OfKind( PNS_ITEM::VIA | PNS_ITEM::SOLID ) ) { - if(item->GetLayers().Overlaps(tl) || !picked_via) - picked_via = item; - } else { - if(item->GetLayers().Overlaps(tl) || !picked_seg) - picked_seg = item; + if( item->GetLayers().Overlaps( tl ) || !picked_via ) + picked_via = item; + } + else + { + if( item->GetLayers().Overlaps( tl ) || !picked_seg ) + picked_seg = item; } } } if( DisplayOpt.ContrastModeDisplay ) { - if( picked_seg && !picked_seg->GetLayers().Overlaps(tl)) + if( picked_seg && !picked_seg->GetLayers().Overlaps( tl ) ) picked_seg = NULL; } - - PNS_ITEM *rv = picked_via ? picked_via : picked_seg; - if( rv && aLayer >= 0 && !rv-> GetLayers().Overlaps(aLayer) ) + PNS_ITEM* rv = picked_via ? picked_via : picked_seg; + + if( rv && aLayer >= 0 && !rv->GetLayers().Overlaps( aLayer ) ) rv = NULL; - if(rv) - TRACE(0, "%s, layer : %d, tl: %d", rv->GetKindStr().c_str() % rv->GetLayers().Start() % tl); + if( rv ) + TRACE( 0, "%s, layer : %d, tl: %d", rv->GetKindStr().c_str() % rv->GetLayers().Start() % + tl ); return rv; } - -void ROUTER_TOOL::setMsgPanel ( bool enabled, int entry, const wxString& aUpperMessage, const wxString& aLowerMessage ) +void ROUTER_TOOL::setMsgPanel( bool aEnabled, int aEntry, + const wxString& aUpperMessage, const wxString& aLowerMessage ) { - PCB_EDIT_FRAME *frame = getEditFrame (); - - if(m_panelItems.size() <= (unsigned int) entry) - m_panelItems.resize(entry + 1); - - m_panelItems[entry] = MSG_PANEL_ITEM( aUpperMessage, aLowerMessage, BLACK ); - frame->SetMsgPanel(m_panelItems); + PCB_EDIT_FRAME* frame = getEditFrame (); + + if( m_panelItems.size() <= (unsigned int) aEntry ) + m_panelItems.resize( aEntry + 1 ); + + m_panelItems[aEntry] = MSG_PANEL_ITEM( aUpperMessage, aLowerMessage, BLACK ); + frame->SetMsgPanel( m_panelItems ); } + void ROUTER_TOOL::clearMsgPanel() { - PCB_EDIT_FRAME *frame = getEditFrame (); + PCB_EDIT_FRAME* frame = getEditFrame (); frame->ClearMsgPanel(); } -void ROUTER_TOOL::highlightNet(bool enabled, int netcode) + +void ROUTER_TOOL::highlightNet( bool aEnabled, int aNetcode ) { - RENDER_SETTINGS *rs = getView()->GetPainter()->GetSettings(); - - if(netcode >= 0 && enabled) - rs->SetHighlight(true, netcode); - else - rs->SetHighlight(false); + RENDER_SETTINGS* rs = getView()->GetPainter()->GetSettings(); + + if( aNetcode >= 0 && aEnabled ) + rs->SetHighlight( true, aNetcode ); + else + rs->SetHighlight( false ); getView()->UpdateAllLayersColor(); } + void ROUTER_TOOL::updateStartItem( TOOL_EVENT& aEvent ) { - VIEW_CONTROLS *ctls = getViewControls(); + VIEW_CONTROLS* ctls = getViewControls(); int tl = getView()->GetTopLayer(); - PNS_ITEM *startItem = NULL; + PNS_ITEM* startItem = NULL; if( aEvent.IsMotion() || aEvent.IsClick() ) { VECTOR2I p = aEvent.Position(); - startItem = pickSingleItem(p); + startItem = pickSingleItem( p ); - - - if(startItem && startItem->GetNet() >= 0) + if( startItem && startItem->GetNet() >= 0 ) { bool dummy; - VECTOR2I cursorPos = m_router->SnapToItem (startItem, p, dummy); - ctls->ForceCursorPosition(true, cursorPos); + VECTOR2I cursorPos = m_router->SnapToItem( startItem, p, dummy ); + ctls->ForceCursorPosition( true, cursorPos ); m_startSnapPoint = cursorPos; - if(startItem->GetLayers().IsMultilayer()) + + if( startItem->GetLayers().IsMultilayer() ) m_startLayer = tl; else m_startLayer = startItem->GetLayers().Start(); - + m_startItem = startItem; - } else { + } + else + { m_startItem = NULL; m_startSnapPoint = p; m_startLayer = tl; - ctls->ForceCursorPosition(false); + ctls->ForceCursorPosition( false ); } } } + void ROUTER_TOOL::updateEndItem( TOOL_EVENT& aEvent ) { - VIEW_CONTROLS *ctls = getViewControls(); + VIEW_CONTROLS* ctls = getViewControls(); VECTOR2I p = aEvent.Position(); int layer; - if(m_router->GetCurrentNet() < 0 || !m_startItem) + if( m_router->GetCurrentNet() < 0 || !m_startItem ) { m_endItem = NULL; m_endSnapPoint = p; @@ -250,48 +262,53 @@ void ROUTER_TOOL::updateEndItem( TOOL_EVENT& aEvent ) bool dummy; - if(m_router->IsPlacingVia()) + if( m_router->IsPlacingVia() ) layer = -1; - else + else layer = m_router->GetCurrentLayer(); - - PNS_ITEM *endItem = pickSingleItem(p, m_startItem->GetNet(), layer ); - if(endItem) + PNS_ITEM* endItem = pickSingleItem( p, m_startItem->GetNet(), layer ); + + if( endItem ) { - VECTOR2I cursorPos = m_router->SnapToItem (endItem, p, dummy); - ctls->ForceCursorPosition(true, cursorPos); + VECTOR2I cursorPos = m_router->SnapToItem( endItem, p, dummy ); + ctls->ForceCursorPosition( true, cursorPos ); m_endItem = endItem; m_endSnapPoint = cursorPos; - } else { + } + else + { m_endItem = NULL; m_endSnapPoint = p; - ctls->ForceCursorPosition(false); + ctls->ForceCursorPosition( false ); } - - if(m_endItem) - TRACE(0, "%s, layer : %d", m_endItem->GetKindStr().c_str() % m_endItem->GetLayers().Start() ); + + if( m_endItem ) + TRACE( 0, "%s, layer : %d", m_endItem->GetKindStr().c_str() % + m_endItem->GetLayers().Start() ); } -void ROUTER_TOOL::startRouting ( ) + +void ROUTER_TOOL::startRouting() { - VIEW_CONTROLS *ctls = getViewControls(); - - int width = getDefaultWidth( m_startItem ? m_startItem->GetNet() : -1); - if(m_startItem && m_startItem->OfKind(PNS_ITEM::SEGMENT)) - width = static_cast(m_startItem)->GetWidth(); + VIEW_CONTROLS* ctls = getViewControls(); - m_router->SetCurrentWidth(width); - m_router->SwitchLayer(m_startLayer); + int width = getDefaultWidth( m_startItem ? m_startItem->GetNet() : -1 ); - getEditFrame() -> SetTopLayer (m_startLayer); + if( m_startItem && m_startItem->OfKind( PNS_ITEM::SEGMENT ) ) + width = static_cast( m_startItem )->GetWidth(); - if(m_startItem && m_startItem->GetNet() >= 0) - highlightNet(true, m_startItem->GetNet() ); + m_router->SetCurrentWidth( width ); + m_router->SwitchLayer( m_startLayer ); + + getEditFrame()->SetTopLayer( m_startLayer ); + + if( m_startItem && m_startItem->GetNet() >= 0 ) + highlightNet( true, m_startItem->GetNet() ); + + ctls->ForceCursorPosition( false ); + ctls->SetAutoPan( true ); - ctls->ForceCursorPosition(false); - ctls->SetAutoPan(true); - m_router->StartRouting( m_startSnapPoint, m_startItem ); m_endItem = NULL; @@ -299,93 +316,94 @@ void ROUTER_TOOL::startRouting ( ) while( OPT_TOOL_EVENT evt = Wait() ) { - if( evt->IsCancel() ) - break; - else if (evt->IsMotion()) - { + if( evt->IsCancel() ) + break; + else if( evt->IsMotion() ) + { updateEndItem( *evt ); - m_router->Move ( m_endSnapPoint, m_endItem ); - } - else if (evt->IsClick (MB_Left )) - { + m_router->Move( m_endSnapPoint, m_endItem ); + } + else if( evt->IsClick( MB_Left ) ) + { updateEndItem( *evt ); - if(m_router->FixRoute(m_endSnapPoint, m_endItem)) + + if( m_router->FixRoute( m_endSnapPoint, m_endItem ) ) break; - m_router->Move ( m_endSnapPoint, m_endItem ); - } else if (evt->IsKeyUp()) - { + + m_router->Move( m_endSnapPoint, m_endItem ); + } + else if( evt->IsKeyUp() ) + { switch( evt->KeyCode() ) { - case 'V': - { - int w, diameter, drill; - getNetclassDimensions( m_router->GetCurrentNet(), w, diameter, drill ); - m_router->SetCurrentViaDiameter(diameter); - m_router->SetCurrentViaDrill(drill); - m_router->ToggleViaPlacement(); - getEditFrame() -> SetTopLayer (m_router->GetCurrentLayer()); - m_router->Move ( m_endSnapPoint, m_endItem ); - break; - } - - case '/': - m_router->FlipPosture(); - break; - - case '+': - case '=': - m_router->SwitchLayer ( m_router->NextCopperLayer (true) ); - updateEndItem( *evt ); - getEditFrame() -> SetTopLayer (m_router->GetCurrentLayer()); - m_router->Move ( m_endSnapPoint, m_endItem ); - - break; - - case '-': - m_router->SwitchLayer ( m_router->NextCopperLayer (false) ); - getEditFrame() -> SetTopLayer (m_router->GetCurrentLayer()); - m_router->Move ( m_endSnapPoint, m_endItem ); - break; + case 'V': + { + int w, diameter, drill; + getNetclassDimensions( m_router->GetCurrentNet(), w, diameter, drill ); + m_router->SetCurrentViaDiameter( diameter ); + m_router->SetCurrentViaDrill( drill ); + m_router->ToggleViaPlacement(); + getEditFrame()->SetTopLayer( m_router->GetCurrentLayer() ); + m_router->Move( m_endSnapPoint, m_endItem ); + break; } - } + + case '/': + m_router->FlipPosture(); + break; + + case '+': + case '=': + m_router->SwitchLayer( m_router->NextCopperLayer( true ) ); + updateEndItem( *evt ); + getEditFrame()->SetTopLayer( m_router->GetCurrentLayer() ); + m_router->Move( m_endSnapPoint, m_endItem ); + + break; + + case '-': + m_router->SwitchLayer( m_router->NextCopperLayer( false ) ); + getEditFrame()->SetTopLayer( m_router->GetCurrentLayer() ); + m_router->Move( m_endSnapPoint, m_endItem ); + break; + } + } } - if(m_router->RoutingInProgress()) + if( m_router->RoutingInProgress() ) m_router->StopRouting(); - - ctls->SetAutoPan(false); - ctls->ForceCursorPosition(false); - highlightNet(false); + + ctls->SetAutoPan( false ); + ctls->ForceCursorPosition( false ); + highlightNet( false ); } int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) { - VIEW_CONTROLS *ctls = getViewControls(); + VIEW_CONTROLS* ctls = getViewControls(); - //SetContextMenu ( m_menu ); - //setMsgPanel(true, 0, wxT("KiRouter"), wxT("Pick an item to start routing")); + // SetContextMenu ( m_menu ); + // setMsgPanel(true, 0, wxT("KiRouter"), wxT("Pick an item to start routing")); - ctls->SetSnapping ( true ); + ctls->SetSnapping( true ); ctls->ShowCursor( true ); // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { - if( evt->IsCancel() ) - break; // Finish - else if( evt->IsMotion( ) ) + break; // Finish + else if( evt->IsMotion() ) updateStartItem( *evt ); - else if( evt->IsClick ( MB_Left ) ) + else if( evt->IsClick( MB_Left ) ) { updateStartItem( *evt ); - startRouting( ); + startRouting(); } } - - //clearMsgPanel(); + // clearMsgPanel(); // Restore the default settings ctls->SetAutoPan( false ); @@ -394,4 +412,3 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) return 0; } - diff --git a/pcbnew/router/router_tool.h b/pcbnew/router/router_tool.h index abf7dabb38..92e2fe208e 100644 --- a/pcbnew/router/router_tool.h +++ b/pcbnew/router/router_tool.h @@ -3,17 +3,17 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -45,35 +45,36 @@ public: int Main( TOOL_EVENT& aEvent ); private: - - PNS_ITEM *pickSingleItem( const VECTOR2I& aWhere, int aNet = -1, int aLayer = -1 ); - - void setMsgPanel ( bool enabled, int entry, const wxString& aUpperMessage = wxT(""), const wxString& aLowerMessage = wxT("") ); - void clearMsgPanel(); + PNS_ITEM* pickSingleItem( const VECTOR2I& aWhere, int aNet = -1, int aLayer = -1 ); - int getDefaultWidth( int aNetCode ); - void startRouting ( ); - void highlightNet(bool enabled, int netcode = -1); + void setMsgPanel( bool enabled, int entry, const wxString& aUpperMessage = wxT(""), + const wxString& aLowerMessage = wxT("") ); + void clearMsgPanel(); - void updateStartItem( TOOL_EVENT& aEvent ); - void updateEndItem( TOOL_EVENT& aEvent ); + int getDefaultWidth( int aNetCode ); + void startRouting(); + void highlightNet( bool enabled, int netcode = -1 ); - void getNetclassDimensions ( int aNetCode, int& aWidth, int& aViaDiameter, int& aViaDrill); + void updateStartItem( TOOL_EVENT& aEvent ); + void updateEndItem( TOOL_EVENT& aEvent ); - MSG_PANEL_ITEMS m_panelItems; + void getNetclassDimensions( int aNetCode, int& aWidth, int& aViaDiameter, int& aViaDrill ); - PNS_ROUTER *m_router; + MSG_PANEL_ITEMS m_panelItems; - PNS_ITEM *m_startItem; - int m_startLayer; - VECTOR2I m_startSnapPoint; + PNS_ROUTER* m_router; - PNS_ITEM *m_endItem; - VECTOR2I m_endSnapPoint; + PNS_ITEM* m_startItem; + int m_startLayer; + VECTOR2I m_startSnapPoint; + + PNS_ITEM* m_endItem; + VECTOR2I m_endSnapPoint; /*boost::shared_ptr m_menu;*/ - CONTEXT_MENU * m_menu; + CONTEXT_MENU* m_menu; }; #endif + diff --git a/pcbnew/router/trace.h b/pcbnew/router/trace.h index afce94d148..5b7cbbf2ba 100644 --- a/pcbnew/router/trace.h +++ b/pcbnew/router/trace.h @@ -3,48 +3,45 @@ * * Copyright (C) 2013 CERN * Author: Tomasz Wlostowski - * + * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ - + #ifndef __TRACE_H #define __TRACE_H - #ifdef DEBUG #include #include #include -static void _trace_print(const char *funcName, int level, const std::string& msg) +static void _trace_print( const char* funcName, int level, const std::string& msg ) { - std::cerr << "trace[" << level << "]: " << funcName << ": " << msg << std::endl; + std::cerr << "trace[" << level << "]: " << funcName << ": " << msg << std::endl; } +#define TRACE( level, fmt, ... ) \ + _trace_print( __FUNCTION__, level, (boost::format( fmt ) % __VA_ARGS__).str() ); - -#define TRACE(level, fmt, ...) \ - _trace_print(__FUNCTION__, level, (boost::format(fmt) % __VA_ARGS__).str() ); - -#define TRACEn(level, msg) \ - _trace_print(__FUNCTION__, level, std::string(msg)); +#define TRACEn( level, msg ) \ + _trace_print( __FUNCTION__, level, std::string( msg ) ); #else -#define TRACE(level, fmt, ...) -#define TRACEn(level, msg) +#define TRACE( level, fmt, ... ) +#define TRACEn( level, msg ) #endif From 4c67f4cc26724009913e6cdfee637b36c5c18aa7 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 27 Sep 2013 14:29:07 +0200 Subject: [PATCH 376/415] Added missing header --- include/tool/item_state.h | 281 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 281 insertions(+) create mode 100644 include/tool/item_state.h diff --git a/include/tool/item_state.h b/include/tool/item_state.h new file mode 100644 index 0000000000..8226d6e66c --- /dev/null +++ b/include/tool/item_state.h @@ -0,0 +1,281 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * Class ITEM_STATE + * + * Provides means for modifying properties of groups of items and gives possibility of rolling back + * the introduced changes. Does not take ownership of modified items, neither takes care of + * refreshing. + */ + +#ifndef ITEM_STATE_H_ +#define ITEM_STATE_H_ + +#include +#include + +class ITEM_STATE +{ +public: + ITEM_STATE() : + m_movement( 0.0, 0.0 ), m_flips( 0 ), m_rotation( 0.0 ) + { +#ifdef __WXDEBUG__ + m_canSave = true; +#endif + } + + /** + * Function Save() + * + * Adds an item and saves it's state. + * @param aItem is the item to be added. + */ + void Save( BOARD_ITEM* aItem ) + { +#ifdef __WXDEBUG__ + wxASSERT_MSG( m_canSave, "You cannot save items after issuing commands. " + "You have either RestoreAll() or Apply() before adding items!" ); +#endif + m_items.push_back( aItem ); + } + + /** + * Function RestoreAll() + * + * Rollbacks all the changes to the initial state. + */ + void RestoreAll() + { + // Check if there is a not saved movement command + saveMovement(); + + std::deque::iterator it, it_end; + std::deque::iterator cmd, cmd_end; + for( it = m_items.begin(), it_end = m_items.end(); it != it_end; ++it ) + { + for( cmd = m_commands.begin(), cmd_end = m_commands.end(); cmd != cmd_end; ++cmd ) + cmd->Revert( *it ); + } + + reset(); + } + + /** + * Function Apply() + * + * Resets the state, clears the list of items & changes, so the object can be reused for + * other items. + */ + void Apply() + { + reset(); + } + + /** + * Function Move() + * + * Moves stored items by a given vector. + * @param aMovement is the movement vector. + */ + void Move( const VECTOR2D& aMovement ) + { +#ifdef __WXDEBUG__ + m_canSave = false; +#endif + std::deque::iterator it, it_end; + for( it = m_items.begin(), it_end = m_items.end(); it != it_end; ++it ) + (*it)->Move( wxPoint( aMovement.x, aMovement.y ) ); + + m_movement += aMovement; + } + + /** + * Function Rotate() + * + * Rotates stored items by a given angle. + * @param aAngle is the angle (in decidegrees). + */ + void Rotate( const VECTOR2D& aPoint, double aAngle ) + { +#ifdef __WXDEBUG__ + m_canSave = false; +#endif + saveMovement(); + m_commands.push_front( COMMAND( COMMAND::ROTATE, aPoint, aAngle ) ); + + std::deque::iterator it, it_end; + for( it = m_items.begin(), it_end = m_items.end(); it != it_end; ++it ) + (*it)->Rotate( wxPoint( aPoint.x, aPoint.y ), aAngle ); + + m_rotation += aAngle; + } + + /** + * Function Flip() + * + * Changes the board side for stored items. + * @param aPoint is the rotation point. + */ + void Flip( const VECTOR2D& aPoint ) + { +#ifdef __WXDEBUG__ + m_canSave = false; +#endif + saveMovement(); + m_commands.push_front( COMMAND( COMMAND::FLIP, aPoint ) ); + + std::deque::iterator it, it_end; + for( it = m_items.begin(), it_end = m_items.end(); it != it_end; ++it ) + (*it)->Flip( wxPoint( aPoint.x, aPoint.y ) ); + + m_flips++; + } + + /** + * Function ToggleVisibility() + * + * Switches the visibility property of stored items. + */ + void ToggleVisibility() + { +#ifdef __WXDEBUG__ + m_canSave = false; +#endif + m_commands.push_front( COMMAND( COMMAND::VISIBILITY ) ); + + std::deque::iterator it, it_end; + for( it = m_items.begin(), it_end = m_items.end(); it != it_end; ++it ) + (*it)->ViewSetVisible( !(*it)->ViewIsVisible() ); + } + + /** + * Function GetUpdateFlag() + * + * Returns information on what kind of update should be applied to items in order to display + * them properly. + * @return Flag required to refresh items. + */ + KiGfx::VIEW_ITEM::ViewUpdateFlags GetUpdateFlag() const + { + if( m_flips % 2 == 1 ) // If number of flips is odd, then we need to change layers + return KiGfx::VIEW_ITEM::LAYERS; + else if( m_movement.x != 0.0 || m_movement.y != 0.0 || m_rotation != 0.0 ) + return KiGfx::VIEW_ITEM::GEOMETRY; + + return KiGfx::VIEW_ITEM::APPEARANCE; + } + +private: + /// COMMAND stores modifications that were done to items + struct COMMAND + { + /// Type of command + enum TYPE { MOVE, ROTATE, FLIP, VISIBILITY }; + TYPE m_type; + + /// Point where flip/rotation occurred or movement vector + VECTOR2D m_point; + + /// Used only for rotation + double m_angle; + + COMMAND( TYPE aType, VECTOR2D aPoint = VECTOR2D( 0.0, 0.0 ), double aAngle = 0.0 ) : + m_type( aType ), m_point( aPoint ), m_angle( aAngle ) {}; + + void Revert( BOARD_ITEM* aItem ) + { + switch( m_type ) + { + case MOVE: + aItem->Move( wxPoint( -m_point.x, -m_point.y ) ); + break; + + case ROTATE: + aItem->Rotate( wxPoint( m_point.x, m_point.y ), -m_angle ); + break; + + case FLIP: + aItem->Flip( wxPoint( m_point.x, m_point.y ) ); + break; + + case VISIBILITY: + aItem->ViewSetVisible( !aItem->ViewIsVisible() ); + break; + } + } + }; + + /// Adds a MOVEMENT command basing on the current movement vector + void saveMovement() + { + if( m_movement.x != 0.0 || m_movement.y != 0.0 ) + { + m_commands.push_front( COMMAND( COMMAND::MOVE, m_movement ) ); + + m_movement.x = 0.0; + m_movement.y = 0.0; + } + } + + /// Restores the initial state + void reset() + { + m_movement.x = 0.0; + m_movement.y = 0.0; + m_flips = 0; + m_rotation = 0.0; + + m_items.clear(); + m_commands.clear(); + +#ifdef __WXDEBUG__ + m_canSave = true; +#endif + } + + /// List of issued commands + std::deque m_items; + + /// List of items that are affected by commands + std::deque m_commands; + + /// Current movement vector (updated by Move() command) + VECTOR2D m_movement; + + /// Number of flips applied to items + unsigned int m_flips; + + /// Total rotation applied to items + double m_rotation; + +#ifdef __WXDEBUG__ + /// Debug flag assuring that functions are called in proper order + bool m_canSave; +#endif +}; + +#endif /* ITEM_STATE_H_ */ + From 276d867ab2ba56a73287f7967165a75a46bbbacf Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 27 Sep 2013 16:23:43 +0200 Subject: [PATCH 377/415] Some more comments and code formatting. --- common/drawpanel_gal.cpp | 11 - common/geometry/seg.cpp | 120 ++++---- common/geometry/shape_collisions.cpp | 119 ++++---- common/geometry/shape_index.cpp | 1 - common/geometry/shape_line_chain.cpp | 401 +++++++++++++++------------ common/tool/action_manager.cpp | 7 +- common/tool/context_menu.cpp | 14 +- common/tool/tool_dispatcher.cpp | 38 ++- common/tool/tool_event.cpp | 2 +- common/tool/tool_manager.cpp | 10 +- include/geometry/shape_index.h | 134 +++++---- include/geometry/shape_line_chain.h | 238 ++++++++-------- include/tool/action_manager.h | 15 +- include/tool/context_menu.h | 58 +++- include/tool/tool_base.h | 59 +++- include/tool/tool_dispatcher.h | 41 ++- include/tool/tool_event.h | 60 +++- include/tool/tool_interactive.h | 20 +- pcbnew/tools/move_tool.cpp | 16 +- pcbnew/tools/selection_area.h | 1 + pcbnew/tools/selection_tool.cpp | 27 +- 21 files changed, 853 insertions(+), 539 deletions(-) diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index fd907a1ca6..fcdf12bae3 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -121,11 +121,6 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) ) m_pendingRefresh = false; m_lastRefresh = wxGetLocalTimeMillis(); -#ifdef __WXDEBUG__ - prof_counter time; - prof_start( &time, false ); -#endif /* __WXDEBUG__ */ - m_gal->BeginDrawing(); m_gal->SetBackgroundColor( KiGfx::COLOR4D( 0.0, 0.0, 0.0, 1.0 ) ); m_gal->ClearScreen(); @@ -138,12 +133,6 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) ) m_gal->DrawCursor( m_viewControls->GetCursorPosition() ); m_gal->EndDrawing(); - -#ifdef __WXDEBUG__ - prof_end( &time ); - wxLogDebug( wxT( "EDA_DRAW_PANEL_GAL::Refresh: %.0f ms (%.0f fps)" ), - static_cast( time.value ) / 1000.0, 1000000.0 / static_cast( time.value ) ); -#endif /* __WXDEBUG__ */ } diff --git a/common/geometry/seg.cpp b/common/geometry/seg.cpp index abc80688ca..68dda76675 100644 --- a/common/geometry/seg.cpp +++ b/common/geometry/seg.cpp @@ -25,126 +25,128 @@ #include -template int sgn(T val) { - return (T(0) < val) - (val < T(0)); +template int sgn( T val ) { + return ( T( 0 ) < val ) - ( val < T( 0 ) ); } -bool SEG::PointCloserThan (const VECTOR2I& aP, int dist) const + +bool SEG::PointCloserThan( const VECTOR2I& aP, int dist ) const { VECTOR2I d = b - a; ecoord dist_sq = (ecoord) dist * dist; - SEG::ecoord l_squared = d.Dot(d); - SEG::ecoord t = d.Dot(aP - a); - + SEG::ecoord l_squared = d.Dot( d ); + SEG::ecoord t = d.Dot( aP - a ); if( t <= 0 || !l_squared ) - return (aP - a).SquaredEuclideanNorm() < dist_sq; + return ( aP - a ).SquaredEuclideanNorm() < dist_sq; else if( t >= l_squared ) - return (aP - b).SquaredEuclideanNorm() < dist_sq; + return ( aP - b ).SquaredEuclideanNorm() < dist_sq; + int dxdy = abs( d.x ) - abs( d.y ); - int dxdy = abs(d.x) - abs(d.y); - - if( (dxdy >= -1 && dxdy <= 1) || abs(d.x) <= 1 || abs(d.y) <= 1) + if( ( dxdy >= -1 && dxdy <= 1 ) || abs( d.x ) <= 1 || abs( d.y ) <= 1 ) { - int ca = -sgn(d.y); - int cb = sgn(d.x); + int ca = -sgn( d.y ); + int cb = sgn( d.x ); int cc = -ca * a.x - cb * a.y; ecoord num = ca * aP.x + cb * aP.y + cc; num *= num; - if(ca && cb) + if( ca && cb ) num >>= 1; - if(num > (dist_sq + 100)) + if( num > ( dist_sq + 100 ) ) return false; - else if(num < (dist_sq - 100)) + else if( num < ( dist_sq - 100 ) ) return true; } VECTOR2I nearest; - nearest.x = a.x + rescale(t, (ecoord)d.x, l_squared); - nearest.y = a.y + rescale(t, (ecoord)d.y, l_squared); + nearest.x = a.x + rescale( t, (ecoord)d.x, l_squared ); + nearest.y = a.y + rescale( t, (ecoord)d.y, l_squared ); - return (nearest - aP).SquaredEuclideanNorm() <= dist_sq; + return ( nearest - aP ).SquaredEuclideanNorm() <= dist_sq; } + SEG::ecoord SEG::SquaredDistance( const SEG& aSeg ) const { - // fixme: rather inefficient.... - if(Intersect(aSeg)) - return 0; + // fixme: rather inefficient.... + if( Intersect( aSeg ) ) + return 0; - const VECTOR2I pts[4] = - { - aSeg.NearestPoint(a) - a, - aSeg.NearestPoint(b) - b, - NearestPoint(aSeg.a) - aSeg.a, - NearestPoint(aSeg.b) - aSeg.b - }; + const VECTOR2I pts[4] = + { + aSeg.NearestPoint( a ) - a, + aSeg.NearestPoint( b ) - b, + NearestPoint( aSeg.a ) - aSeg.a, + NearestPoint( aSeg.b ) - aSeg.b + }; - ecoord m = VECTOR2I::ECOORD_MAX; - for (int i = 0; i<4 ; i++) - m = std::min(m, pts[i].SquaredEuclideanNorm()); - return m; + ecoord m = VECTOR2I::ECOORD_MAX; + for( int i = 0; i < 4; i++ ) + m = std::min( m, pts[i].SquaredEuclideanNorm() ); + + return m; } + OPT_VECTOR2I SEG::Intersect( const SEG& aSeg, bool aIgnoreEndpoints, bool aLines ) const { - const VECTOR2I e (b - a); - const VECTOR2I f (aSeg.b - aSeg.a); - const VECTOR2I ac (aSeg.a - a); + const VECTOR2I e ( b - a ); + const VECTOR2I f ( aSeg.b - aSeg.a ); + const VECTOR2I ac ( aSeg.a - a ); - ecoord d = f.Cross(e); - ecoord p = f.Cross(ac); - ecoord q = e.Cross(ac); + ecoord d = f.Cross( e ); + ecoord p = f.Cross( ac ); + ecoord q = e.Cross( ac ); - if(d == 0) + if( d == 0 ) return OPT_VECTOR2I(); - if (!aLines && d > 0 && (q < 0 || q > d || p < 0 || p > d)) + if ( !aLines && d > 0 && ( q < 0 || q > d || p < 0 || p > d ) ) return OPT_VECTOR2I(); - if (!aLines && d < 0 && (q < d || p < d || p > 0 || q > 0)) + if ( !aLines && d < 0 && ( q < d || p < d || p > 0 || q > 0 ) ) return OPT_VECTOR2I(); - if (!aLines && aIgnoreEndpoints && (q == 0 || q == d) && (p == 0 || p == d)) + if ( !aLines && aIgnoreEndpoints && ( q == 0 || q == d ) && ( p == 0 || p == d ) ) return OPT_VECTOR2I(); - - VECTOR2I ip ( aSeg.a.x + rescale(q, (ecoord)f.x, d), - aSeg.a.y + rescale(q, (ecoord)f.y, d) ); + VECTOR2I ip( aSeg.a.x + rescale( q, (ecoord)f.x, d ), + aSeg.a.y + rescale( q, (ecoord)f.y, d ) ); return ip; } -bool SEG::ccw ( const VECTOR2I& a, const VECTOR2I& b, const VECTOR2I &c ) const +bool SEG::ccw( const VECTOR2I& a, const VECTOR2I& b, const VECTOR2I& c ) const { - return (ecoord)(c.y - a.y) * (b.x - a.x) > (ecoord)(b.y - a.y) * (c.x - a.x); + return (ecoord)( c.y - a.y ) * ( b.x - a.x ) > (ecoord)( b.y - a.y ) * ( c.x - a.x ); } + bool SEG::Collide( const SEG& aSeg, int aClearance ) const { // check for intersection // fixme: move to a method - if( ccw(a,aSeg.a,aSeg.b) != ccw(b,aSeg.a,aSeg.b) && ccw(a,b,aSeg.a) != ccw(a,b,aSeg.b) ) + if( ccw( a, aSeg.a, aSeg.b ) != ccw( b, aSeg.a, aSeg.b ) && + ccw( a, b, aSeg.a ) != ccw( a, b, aSeg.b ) ) return true; #define CHK(_seg, _pt) \ if( (_seg).PointCloserThan (_pt, aClearance ) ) return true; - CHK(*this, aSeg.a); - CHK(*this, aSeg.b); - CHK(aSeg, a); - CHK(aSeg, b); - + CHK( *this, aSeg.a ); + CHK( *this, aSeg.b ); + CHK( aSeg, a ); + CHK( aSeg, b ); #undef CHK return false; } - -bool SEG::Contains(const VECTOR2I& aP) const -{ - return PointCloserThan(aP, 1); -} + +bool SEG::Contains( const VECTOR2I& aP ) const +{ + return PointCloserThan( aP, 1 ); +} diff --git a/common/geometry/shape_collisions.cpp b/common/geometry/shape_collisions.cpp index c67a371e68..b678e0faa2 100644 --- a/common/geometry/shape_collisions.cpp +++ b/common/geometry/shape_collisions.cpp @@ -31,7 +31,8 @@ typedef VECTOR2I::extended_type ecoord; -static inline bool Collide( const SHAPE_CIRCLE& a, const SHAPE_CIRCLE& b, int clearance, bool needMTV, VECTOR2I& aMTV ) +static inline bool Collide( const SHAPE_CIRCLE& a, const SHAPE_CIRCLE& b, int clearance, + bool needMTV, VECTOR2I& aMTV ) { ecoord min_dist = clearance + a.GetRadius() + b.GetRadius(); ecoord min_dist_sq = min_dist * min_dist; @@ -44,12 +45,13 @@ static inline bool Collide( const SHAPE_CIRCLE& a, const SHAPE_CIRCLE& b, int cl return false; if ( needMTV ) - aMTV = delta.Resize( sqrt (abs(min_dist_sq - dist_sq)) + 1); + aMTV = delta.Resize( sqrt ( abs( min_dist_sq - dist_sq ) ) + 1 ); return true; } -static inline bool Collide( const SHAPE_RECT& a, const SHAPE_CIRCLE& b, int clearance, bool needMTV, VECTOR2I& aMTV ) +static inline bool Collide( const SHAPE_RECT& a, const SHAPE_CIRCLE& b, int clearance, + bool needMTV, VECTOR2I& aMTV ) { const VECTOR2I c = b.GetCenter(); const VECTOR2I p0 = a.GetPosition(); @@ -58,7 +60,7 @@ static inline bool Collide( const SHAPE_RECT& a, const SHAPE_CIRCLE& b, int cle const ecoord min_dist = clearance + r; const ecoord min_dist_sq = min_dist * min_dist; - if (a.BBox(0).Contains(c)) + if ( a.BBox( 0 ).Contains( c ) ) return true; const VECTOR2I vts[] = { @@ -71,73 +73,77 @@ static inline bool Collide( const SHAPE_RECT& a, const SHAPE_CIRCLE& b, int cle ecoord nearest_seg_dist_sq = VECTOR2I::ECOORD_MAX; VECTOR2I nearest; - bool inside = c.x >= p0.x && c.x <= (p0.x + size.x) - && c.y >= p0.y && c.y <= (p0.y + size.y); + bool inside = c.x >= p0.x && c.x <= ( p0.x + size.x ) + && c.y >= p0.y && c.y <= ( p0.y + size.y ); - if(!inside) + if( !inside ) { - for (int i = 0; i < 4; i++) + for( int i = 0; i < 4; i++ ) { - const SEG seg (vts[i], vts[i+1]); - ecoord dist_sq = seg.SquaredDistance ( c ); + const SEG seg( vts[i], vts[i+1] ); + ecoord dist_sq = seg.SquaredDistance( c ); - - if(dist_sq < min_dist_sq) + if( dist_sq < min_dist_sq ) { - if(!needMTV) + if( !needMTV ) return true; else { - nearest = seg.NearestPoint ( c ); + nearest = seg.NearestPoint( c ); nearest_seg_dist_sq = dist_sq; } } } } - if(nearest_seg_dist_sq >= min_dist_sq && !inside) + if( nearest_seg_dist_sq >= min_dist_sq && !inside ) return false; VECTOR2I delta = c - nearest; - if(!needMTV) + if( !needMTV ) return true; - if(inside) - aMTV = -delta.Resize(sqrt(abs(r * r + nearest_seg_dist_sq) + 1)); + if( inside ) + aMTV = -delta.Resize( sqrt( abs( r * r + nearest_seg_dist_sq ) + 1 ) ); else - aMTV = delta.Resize(sqrt(abs(r * r - nearest_seg_dist_sq) + 1)); + aMTV = delta.Resize( sqrt( abs( r * r - nearest_seg_dist_sq ) + 1 ) ); return true; } -static inline bool Collide( const SHAPE_CIRCLE& a, const SHAPE_LINE_CHAIN& b, int clearance, bool needMTV, VECTOR2I& aMTV ) + +static inline bool Collide( const SHAPE_CIRCLE& a, const SHAPE_LINE_CHAIN& b, int clearance, + bool needMTV, VECTOR2I& aMTV ) { - for (int s = 0; s < b.SegmentCount(); s++) + for( int s = 0; s < b.SegmentCount(); s++ ) { - if ( a.Collide (b.CSegment(s), clearance)) + if ( a.Collide( b.CSegment( s ), clearance ) ) return true; } return false; } -static inline bool Collide( const SHAPE_LINE_CHAIN& a, const SHAPE_LINE_CHAIN& b, int clearance, bool needMTV, VECTOR2I& aMTV ) + +static inline bool Collide( const SHAPE_LINE_CHAIN& a, const SHAPE_LINE_CHAIN& b, int clearance, + bool needMTV, VECTOR2I& aMTV ) { - for( int i = 0; i < b.SegmentCount() ;i++) - if(a.Collide(b.CSegment(i), clearance)) + for( int i = 0; i < b.SegmentCount(); i++ ) + if( a.Collide( b.CSegment(i), clearance ) ) return true; return false; } -static inline bool Collide( const SHAPE_RECT& a, const SHAPE_LINE_CHAIN& b, int clearance, bool needMTV, VECTOR2I& aMTV ) +static inline bool Collide( const SHAPE_RECT& a, const SHAPE_LINE_CHAIN& b, int clearance, + bool needMTV, VECTOR2I& aMTV ) { - for (int s = 0; s < b.SegmentCount(); s++) + for( int s = 0; s < b.SegmentCount(); s++ ) { - SEG seg = b.CSegment(s); - if ( a.Collide (seg, clearance)) + SEG seg = b.CSegment( s ); + if( a.Collide( seg, clearance ) ) return true; } @@ -145,66 +151,83 @@ static inline bool Collide( const SHAPE_RECT& a, const SHAPE_LINE_CHAIN& b, int } - -bool CollideShapes ( const SHAPE *a, const SHAPE *b, int clearance, bool needMTV, VECTOR2I& aMTV ) +bool CollideShapes( const SHAPE* a, const SHAPE* b, int clearance, bool needMTV, VECTOR2I& aMTV ) { - switch(a->Type()) + switch( a->Type() ) { case SH_RECT: - switch(b->Type()) + switch( b->Type() ) { case SH_CIRCLE: - return Collide( *static_cast (a), *static_cast (b), clearance, needMTV, aMTV ); + return Collide( *static_cast( a ), + *static_cast( b ), clearance, needMTV, aMTV ); + case SH_LINE_CHAIN: - return Collide( *static_cast (a), *static_cast (b), clearance, needMTV, aMTV ); + return Collide( *static_cast( a ), + *static_cast( b ), clearance, needMTV, aMTV ); + default: break; } case SH_CIRCLE: - switch(b->Type()) + switch( b->Type() ) { case SH_RECT: - return Collide( *static_cast (b), *static_cast (a), clearance, needMTV, aMTV ); + return Collide( *static_cast( b ), + *static_cast( a ), clearance, needMTV, aMTV ); + case SH_CIRCLE: - return Collide( *static_cast (a), *static_cast (b), clearance, needMTV, aMTV ); + return Collide( *static_cast( a ), + *static_cast( b ), clearance, needMTV, aMTV ); + case SH_LINE_CHAIN: - return Collide( *static_cast (a), *static_cast (b), clearance, needMTV, aMTV ); + return Collide( *static_cast( a ), + *static_cast( b ), clearance, needMTV, aMTV ); + default: break; } case SH_LINE_CHAIN: - switch(b->Type()) + switch( b->Type() ) { case SH_RECT: - return Collide( *static_cast (b), *static_cast (a), clearance, needMTV, aMTV ); + return Collide( *static_cast( b ), + *static_cast( a ), clearance, needMTV, aMTV ); + case SH_CIRCLE: - return Collide( *static_cast (b), *static_cast (a), clearance, needMTV, aMTV ); + return Collide( *static_cast( b ), + *static_cast( a ), clearance, needMTV, aMTV ); + case SH_LINE_CHAIN: - return Collide( *static_cast (a), *static_cast (b), clearance, needMTV, aMTV ); + return Collide( *static_cast( a ), + *static_cast( b ), clearance, needMTV, aMTV ); + default: break; } + default: break; } bool unsupported_collision = true; - assert(unsupported_collision == false); + assert( unsupported_collision == false ); + return false; } -bool SHAPE::Collide ( const SHAPE *aShape, int aClerance, VECTOR2I& aMTV ) const +bool SHAPE::Collide( const SHAPE* aShape, int aClerance, VECTOR2I& aMTV ) const { return CollideShapes( this, aShape, aClerance, true, aMTV); } -bool SHAPE::Collide ( const SHAPE *aShape, int aClerance ) const + +bool SHAPE::Collide ( const SHAPE* aShape, int aClerance ) const { VECTOR2I dummy; - return CollideShapes( this, aShape, aClerance, false, dummy); + return CollideShapes( this, aShape, aClerance, false, dummy ); } - diff --git a/common/geometry/shape_index.cpp b/common/geometry/shape_index.cpp index 4552881082..986dd0c0bd 100644 --- a/common/geometry/shape_index.cpp +++ b/common/geometry/shape_index.cpp @@ -30,4 +30,3 @@ const SHAPE* shapeFunctor( SHAPE* aItem ) { return aItem; } - diff --git a/common/geometry/shape_line_chain.cpp b/common/geometry/shape_line_chain.cpp index 6edc0d2b14..909a1832a0 100644 --- a/common/geometry/shape_line_chain.cpp +++ b/common/geometry/shape_line_chain.cpp @@ -28,43 +28,46 @@ using namespace std; using boost::optional; -bool SHAPE_LINE_CHAIN::Collide ( const VECTOR2I& aP, int aClearance ) const +bool SHAPE_LINE_CHAIN::Collide( const VECTOR2I& aP, int aClearance ) const { - assert(false); + assert( false ); return false; } -bool SHAPE_LINE_CHAIN::Collide ( const BOX2I& aBox, int aClearance ) const + +bool SHAPE_LINE_CHAIN::Collide( const BOX2I& aBox, int aClearance ) const { - assert(false); + assert( false ); return false; } -bool SHAPE_LINE_CHAIN::Collide ( const SEG& aSeg, int aClearance ) const + +bool SHAPE_LINE_CHAIN::Collide( const SEG& aSeg, int aClearance ) const { - BOX2I box_a(aSeg.a, aSeg.b - aSeg.a); + BOX2I box_a( aSeg.a, aSeg.b - aSeg.a ); BOX2I::ecoord_type dist_sq = (BOX2I::ecoord_type) aClearance * aClearance; - for( int i = 0; i < SegmentCount() ;i++) + for( int i = 0; i < SegmentCount() ;i++ ) { - const SEG& s = CSegment(i); - BOX2I box_b(s.a, s.b - s.a); + const SEG& s = CSegment( i ); + BOX2I box_b( s.a, s.b - s.a ); BOX2I::ecoord_type d = box_a.SquaredDistance ( box_b ); - if(d < dist_sq) + if( d < dist_sq ) { - if(s.Collide(aSeg, aClearance)) + if( s.Collide( aSeg, aClearance ) ) return true; } } + return false; } const SHAPE_LINE_CHAIN SHAPE_LINE_CHAIN::Reverse() const { - SHAPE_LINE_CHAIN a (*this); - reverse(a.m_points.begin(), a.m_points.end()); + SHAPE_LINE_CHAIN a( *this ); + reverse( a.m_points.begin(), a.m_points.end() ); a.m_closed = m_closed; return a; @@ -74,176 +77,195 @@ const SHAPE_LINE_CHAIN SHAPE_LINE_CHAIN::Reverse() const int SHAPE_LINE_CHAIN::Length() const { int l = 0; - for (int i = 0; i < SegmentCount(); i++) - l += CSegment(i).Length(); + for( int i = 0; i < SegmentCount(); i++ ) + l += CSegment( i ).Length(); + return l; } -void SHAPE_LINE_CHAIN::Replace( int start_index, int end_index, const VECTOR2I& aP) -{ - if(end_index < 0) - end_index += PointCount(); - if(start_index < 0) - start_index += PointCount(); - if (start_index == end_index) - m_points [start_index] = aP; - else { - m_points.erase (m_points.begin() + start_index + 1, m_points.begin() + end_index + 1); - m_points [start_index] = aP; +void SHAPE_LINE_CHAIN::Replace( int aStartIndex, int aEndIndex, const VECTOR2I& aP ) +{ + if( aEndIndex < 0 ) + aEndIndex += PointCount(); + if( aStartIndex < 0 ) + aStartIndex += PointCount(); + + if( aStartIndex == aEndIndex ) + m_points [aStartIndex] = aP; + else + { + m_points.erase( m_points.begin() + aStartIndex + 1, m_points.begin() + aEndIndex + 1 ); + m_points[aStartIndex] = aP; } } -void SHAPE_LINE_CHAIN::Replace( int start_index, int end_index, const SHAPE_LINE_CHAIN& aLine) -{ - if(end_index < 0) - end_index += PointCount(); - if(start_index < 0) - start_index += PointCount(); - m_points.erase (m_points.begin() + start_index, m_points.begin() + end_index + 1); - m_points.insert (m_points.begin() + start_index, aLine.m_points.begin(), aLine.m_points.end()); +void SHAPE_LINE_CHAIN::Replace( int aStartIndex, int aEndIndex, const SHAPE_LINE_CHAIN& aLine ) +{ + if( aEndIndex < 0 ) + aEndIndex += PointCount(); + if( aStartIndex < 0 ) + aStartIndex += PointCount(); + + m_points.erase( m_points.begin() + aStartIndex, m_points.begin() + aEndIndex + 1 ); + m_points.insert( m_points.begin() + aStartIndex, aLine.m_points.begin(), aLine.m_points.end() ); } -void SHAPE_LINE_CHAIN::Remove( int start_index, int end_index) -{ - if(end_index < 0) - end_index += PointCount(); - if(start_index < 0) - start_index += PointCount(); - m_points.erase (m_points.begin() + start_index, m_points.begin() + end_index + 1); +void SHAPE_LINE_CHAIN::Remove( int aStartIndex, int aEndIndex ) +{ + if(aEndIndex < 0) + aEndIndex += PointCount(); + if(aStartIndex < 0) + aStartIndex += PointCount(); + + m_points.erase( m_points.begin() + aStartIndex, m_points.begin() + aEndIndex + 1 ); } -int SHAPE_LINE_CHAIN::Distance( const VECTOR2I & aP ) const + +int SHAPE_LINE_CHAIN::Distance( const VECTOR2I& aP ) const { int d = INT_MAX; - for (int s = 0; s < SegmentCount(); s++) - d = min (d, CSegment(s).Distance(aP)); + for( int s = 0; s < SegmentCount(); s++ ) + d = min( d, CSegment( s ).Distance( aP ) ); + return d; } - -int SHAPE_LINE_CHAIN::Split( const VECTOR2I & aP ) + + +int SHAPE_LINE_CHAIN::Split( const VECTOR2I& aP ) { int ii = -1; int min_dist = 2; - ii = Find(aP); + ii = Find( aP ); - if(ii >= 0) + if( ii >= 0 ) return ii; - for (int s = 0; s < SegmentCount(); s++) + for( int s = 0; s < SegmentCount(); s++ ) { - const SEG seg = CSegment(s); - int dist = seg.Distance(aP); + const SEG seg = CSegment( s ); + int dist = seg.Distance( aP ); // make sure we are not producing a 'slightly concave' primitive. This might happen // if aP lies very close to one of already existing points. - if(dist < min_dist && seg.a != aP && seg.b != aP) + if( dist < min_dist && seg.a != aP && seg.b != aP ) { min_dist = dist; ii = s; } } - if(ii >= 0) + if( ii >= 0 ) { - m_points.insert(m_points.begin() + ii + 1, aP); + m_points.insert( m_points.begin() + ii + 1, aP ); + return ii + 1; } return -1; } -int SHAPE_LINE_CHAIN::Find ( const VECTOR2I& aP ) const + +int SHAPE_LINE_CHAIN::Find( const VECTOR2I& aP ) const { - for (int s = 0; s< PointCount(); s++) - if(CPoint(s) == aP) + for( int s = 0; s< PointCount(); s++ ) + if( CPoint( s ) == aP ) return s; + return -1; } -const SHAPE_LINE_CHAIN SHAPE_LINE_CHAIN::Slice( int start_index, int end_index ) const + +const SHAPE_LINE_CHAIN SHAPE_LINE_CHAIN::Slice( int aStartIndex, int aEndIndex ) const { SHAPE_LINE_CHAIN rv; - if(end_index < 0) - end_index += PointCount(); - if(start_index < 0) - start_index += PointCount(); + if( aEndIndex < 0 ) + aEndIndex += PointCount(); + if( aStartIndex < 0 ) + aStartIndex += PointCount(); + + for( int i = aStartIndex; i <= aEndIndex; i++ ) + rv.Append( m_points[i] ); - for(int i = start_index; i<= end_index; i++) - rv.Append(m_points[i]); return rv; } -struct compareOriginDistance { - compareOriginDistance( VECTOR2I& aOrigin ): - m_origin(aOrigin) {}; - bool operator()(const SHAPE_LINE_CHAIN::Intersection &a, const SHAPE_LINE_CHAIN::Intersection& b) +struct compareOriginDistance +{ + compareOriginDistance( VECTOR2I& aOrigin ): + m_origin( aOrigin ) {}; + + bool operator()( const SHAPE_LINE_CHAIN::Intersection& aA, + const SHAPE_LINE_CHAIN::Intersection& aB ) { - return (m_origin - a.p).EuclideanNorm() < (m_origin - b.p).EuclideanNorm(); + return ( m_origin - aA.p ).EuclideanNorm() < ( m_origin - aB.p ).EuclideanNorm(); } VECTOR2I m_origin; }; -int SHAPE_LINE_CHAIN::Intersect ( const SEG& aSeg, Intersections& aIp ) const +int SHAPE_LINE_CHAIN::Intersect( const SEG& aSeg, Intersections& aIp ) const { - for (int s = 0; s < SegmentCount(); s++) + for( int s = 0; s < SegmentCount(); s++ ) { - OPT_VECTOR2I p = CSegment(s).Intersect(aSeg); - if(p) + OPT_VECTOR2I p = CSegment( s ).Intersect( aSeg ); + if( p ) { Intersection is; - is.our = CSegment(s); + is.our = CSegment( s ); is.their = aSeg; is.p = *p; - aIp.push_back(is); + aIp.push_back( is ); } } - compareOriginDistance comp(aSeg.a); - sort(aIp.begin(), aIp.end(), comp); + compareOriginDistance comp( aSeg.a ); + sort( aIp.begin(), aIp.end(), comp ); + return aIp.size(); -}; +} -int SHAPE_LINE_CHAIN::Intersect( const SHAPE_LINE_CHAIN &aChain, Intersections& aIp ) const + +int SHAPE_LINE_CHAIN::Intersect( const SHAPE_LINE_CHAIN& aChain, Intersections& aIp ) const { -BOX2I bb_other = aChain.BBox(); + BOX2I bb_other = aChain.BBox(); - for (int s1 = 0; s1 < SegmentCount(); s1++) + for ( int s1 = 0; s1 < SegmentCount(); s1++ ) { - const SEG& a = CSegment(s1); - const BOX2I bb_cur (a.a, a.b - a.a); + const SEG& a = CSegment( s1 ); + const BOX2I bb_cur( a.a, a.b - a.a ); - if(! bb_other.Intersects( bb_cur )) + if( !bb_other.Intersects( bb_cur ) ) continue; - for (int s2 = 0; s2 < aChain.SegmentCount(); s2++) + for( int s2 = 0; s2 < aChain.SegmentCount(); s2++ ) { - const SEG& b = aChain.CSegment(s2); + const SEG& b = aChain.CSegment( s2 ); Intersection is; - - if(a.Collinear(b)) + if( a.Collinear( b ) ) { - if(a.Contains(b.a)) { is.p = b.a; aIp.push_back(is); } - if(a.Contains(b.b)) { is.p = b.b; aIp.push_back(is); } - if(b.Contains(a.a)) { is.p = a.a; aIp.push_back(is); } - if(b.Contains(a.b)) { is.p = a.b; aIp.push_back(is); } - } else { - OPT_VECTOR2I p = a.Intersect(b); + if( a.Contains( b.a ) ) { is.p = b.a; aIp.push_back( is ); } + if( a.Contains( b.b ) ) { is.p = b.b; aIp.push_back( is ); } + if( b.Contains( a.a ) ) { is.p = a.a; aIp.push_back( is ); } + if( b.Contains( a.b ) ) { is.p = a.b; aIp.push_back( is ); } + } + else + { + OPT_VECTOR2I p = a.Intersect( b ); - if(p) + if( p ) { is.p = *p; is.our = a; is.their = b; - aIp.push_back(is); + aIp.push_back( is ); } } } @@ -251,130 +273,152 @@ BOX2I bb_other = aChain.BBox(); return aIp.size(); - for (int s1 = 0; s1 < SegmentCount(); s1++) - for (int s2 = 0; s2 < aChain.SegmentCount(); s2++) + for( int s1 = 0; s1 < SegmentCount(); s1++ ) + { + for( int s2 = 0; s2 < aChain.SegmentCount(); s2++ ) { - const SEG& a = CSegment(s1); - const SEG& b = aChain.CSegment(s2); - OPT_VECTOR2I p = a.Intersect(b); + const SEG& a = CSegment( s1 ); + const SEG& b = aChain.CSegment( s2 ); + OPT_VECTOR2I p = a.Intersect( b ); Intersection is; - if(p) + if( p ) { is.p = *p; is.our = a; is.their = b; - aIp.push_back(is); - } else if (a.Collinear(b)) + aIp.push_back( is ); + } + else if( a.Collinear( b ) ) { - if(a.a != b.a && a.a != b.b && b.Contains(a.a) ) + if( a.a != b.a && a.a != b.b && b.Contains( a.a ) ) { is.p = a.a; is.our = a; is.their = b; - aIp.push_back(is); + aIp.push_back( is ); } - else if(a.b != b.a && a.b != b.b && b.Contains(a.b) ) + else if( a.b != b.a && a.b != b.b && b.Contains( a.b ) ) { is.p = a.b; is.our = a; is.their = b; - aIp.push_back(is); + aIp.push_back( is ); } } } + } + return aIp.size(); } - -int SHAPE_LINE_CHAIN::PathLength (const VECTOR2I& aP ) const + + +int SHAPE_LINE_CHAIN::PathLength( const VECTOR2I& aP ) const { int sum = 0; - for (int i = 0; i < SegmentCount(); i++) + for( int i = 0; i < SegmentCount(); i++ ) { - const SEG seg = CSegment(i); - int d = seg.Distance(aP); - if (d <= 1) + const SEG seg = CSegment( i ); + int d = seg.Distance( aP ); + + if( d <= 1 ) { - sum += (aP - seg.a).EuclideanNorm(); + sum += ( aP - seg.a ).EuclideanNorm(); return sum; } else sum += seg.Length(); } + return -1; } - -bool SHAPE_LINE_CHAIN::PointInside( const VECTOR2I& aP) const + + +bool SHAPE_LINE_CHAIN::PointInside( const VECTOR2I& aP ) const { - if(!m_closed || SegmentCount() < 3) + if( !m_closed || SegmentCount() < 3 ) return false; - int cur = CSegment(0).Side(aP); - if(cur == 0) + int cur = CSegment(0).Side( aP ); + + if( cur == 0 ) return false; - for( int i = 1; i < SegmentCount(); i++) + for( int i = 1; i < SegmentCount(); i++ ) { - const SEG s = CSegment(i); - if(aP == s.a || aP == s.b) // edge does not belong to the interior! + const SEG s = CSegment( i ); + + if( aP == s.a || aP == s.b ) // edge does not belong to the interior! return false; - if (s.Side(aP) != cur) + + if( s.Side(aP) != cur ) return false; - } + } + return true; } -bool SHAPE_LINE_CHAIN::PointOnEdge( const VECTOR2I& aP) const + +bool SHAPE_LINE_CHAIN::PointOnEdge( const VECTOR2I& aP ) const { - if(SegmentCount() < 1) + if( SegmentCount() < 1 ) return m_points[0] == aP; - - for( int i = 1; i < SegmentCount(); i++) + + for( int i = 1; i < SegmentCount(); i++ ) { - const SEG s = CSegment(i); - if(s.a == aP || s.b == aP) + const SEG s = CSegment( i ); + + if( s.a == aP || s.b == aP ) return true; - if(s.Distance(aP) <= 1) + if( s.Distance(aP) <= 1 ) return true; } + return false; } + const optional SHAPE_LINE_CHAIN::SelfIntersecting() const { - for (int s1 = 0; s1 < SegmentCount(); s1++) - for (int s2 = s1 + 1; s2 < SegmentCount(); s2++) + for( int s1 = 0; s1 < SegmentCount(); s1++ ) + { + for( int s2 = s1 + 1; s2 < SegmentCount(); s2++ ) { - const VECTOR2I s2a = CSegment(s2).a, s2b = CSegment(s2).b; - if(s1 + 1 != s2 && CSegment(s1).Contains(s2a)) + const VECTOR2I s2a = CSegment( s2 ).a, s2b = CSegment( s2 ).b; + if( s1 + 1 != s2 && CSegment( s1 ).Contains( s2a ) ) { Intersection is; - is.our = CSegment(s1); - is.their = CSegment(s2); + is.our = CSegment( s1 ); + is.their = CSegment( s2 ); is.p = s2a; return is; - } else if (CSegment(s1).Contains(s2b)) { + } + else if( CSegment( s1 ).Contains(s2b ) ) + { Intersection is; - is.our = CSegment(s1); - is.their = CSegment(s2); + is.our = CSegment( s1 ); + is.their = CSegment( s2 ); is.p = s2b; return is; - - } else { - OPT_VECTOR2I p = CSegment(s1).Intersect(CSegment(s2), true); + } + else + { + OPT_VECTOR2I p = CSegment( s1 ).Intersect( CSegment( s2 ), true ); - if(p) + if( p ) { Intersection is; - is.our = CSegment(s1); - is.their = CSegment(s2); + is.our = CSegment( s1 ); + is.their = CSegment( s2 ); is.p = *p; return is; } } } + } + return optional(); } @@ -383,12 +427,15 @@ SHAPE_LINE_CHAIN& SHAPE_LINE_CHAIN::Simplify() { vector pts_unique; - if (PointCount() < 2) + if( PointCount() < 2 ) { return *this; - } else if (PointCount() == 2) { - if(m_points[0] == m_points[1]) - m_points.erase(m_points.end()); + } + else if( PointCount() == 2 ) + { + if( m_points[0] == m_points[1] ) + m_points.erase( m_points.end() ); + return *this; } @@ -398,10 +445,11 @@ SHAPE_LINE_CHAIN& SHAPE_LINE_CHAIN::Simplify() // stage 1: eliminate duplicate vertices while ( i < np ) { - int j = i+1; - while(j < np && CPoint(i) == CPoint(j)) - j ++; - pts_unique.push_back(CPoint(i)); + int j = i + 1; + while( j < np && CPoint(i) == CPoint( j ) ) + j++; + + pts_unique.push_back( CPoint( i ) ); i = j; } @@ -410,56 +458,63 @@ SHAPE_LINE_CHAIN& SHAPE_LINE_CHAIN::Simplify() i = 0; // stage 1: eliminate collinear segments - while (i < np - 2) + while( i < np - 2 ) { const VECTOR2I p0 = pts_unique[i]; const VECTOR2I p1 = pts_unique[i+1]; int n = i; - while(n < np - 2 && SEG(p0, p1).LineDistance(pts_unique[n + 2]) <= 1) + + while( n < np - 2 && SEG( p0, p1 ).LineDistance( pts_unique[n + 2] ) <= 1 ) n++; - m_points.push_back(p0); - if (n > i) + m_points.push_back( p0 ); + if( n > i ) i = n; - if (n == np) + + if( n == np ) { - m_points.push_back(pts_unique[n-1]); + m_points.push_back( pts_unique[n - 1] ); return *this; } - i ++; + + i++; } - if(np > 1) - m_points.push_back(pts_unique[np-2]); - m_points.push_back(pts_unique[np-1]); + if( np > 1 ) + m_points.push_back( pts_unique[np - 2] ); + + m_points.push_back( pts_unique[np - 1] ); return *this; } -const VECTOR2I SHAPE_LINE_CHAIN::NearestPoint(const VECTOR2I& aP) const + +const VECTOR2I SHAPE_LINE_CHAIN::NearestPoint( const VECTOR2I& aP ) const { int min_d = INT_MAX; int nearest = 0; - for ( int i = 0; i < SegmentCount() ; i++ ) + for ( int i = 0; i < SegmentCount(); i++ ) { - int d = CSegment(i).Distance(aP); + int d = CSegment( i ).Distance( aP ); if( d < min_d ) { min_d = d; nearest = i; } } - return CSegment(nearest).NearestPoint(aP); + + return CSegment( nearest ).NearestPoint( aP ); } - + + const string SHAPE_LINE_CHAIN::Format() const { stringstream ss; - ss << m_points.size() << " " << (m_closed ? 1 : 0) << " " ; + ss << m_points.size() << " " << ( m_closed ? 1 : 0 ) << " " ; - for(int i = 0; isetActionMgr( NULL ); + aAction->setId( -1 ); m_actionNameIndex.erase( aAction->m_name ); m_actionIdIndex.erase( aAction->m_id ); @@ -75,7 +76,7 @@ bool ACTION_MANAGER::RunAction( const std::string& aActionName ) const std::map::const_iterator it = m_actionNameIndex.find( aActionName ); if( it == m_actionNameIndex.end() ) - return false; + return false; // no action with given name found runAction( it->second ); @@ -88,7 +89,7 @@ bool ACTION_MANAGER::RunHotKey( int aHotKey ) const std::map::const_iterator it = m_actionHotKeys.find( aHotKey ); if( it == m_actionHotKeys.end() ) - return false; + return false; // no appropriate action found for the hotkey runAction( it->second ); diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index 25ef5b0a0f..d01bc3f0ef 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -62,13 +62,15 @@ CONTEXT_MENU::CONTEXT_MENU( const CONTEXT_MENU& aMenu ) : wxEmptyString, wxITEM_NORMAL ) ); } - // Copy tool actions that are available to choose from menu + // Copy tool actions that are available to choose from context menu m_toolActions = aMenu.m_toolActions; } void CONTEXT_MENU::SetTitle( const wxString& aTitle ) { + // TODO handle an empty string (remove title and separator) + // Unfortunately wxMenu::SetTitle() does nothing.. if( m_titleSet ) { @@ -85,12 +87,18 @@ void CONTEXT_MENU::SetTitle( const wxString& aTitle ) void CONTEXT_MENU::Add( const wxString& aLabel, int aId ) { +#ifdef DEBUG + if( m_menu.FindItem( aId ) != NULL ) + wxLogWarning( wxT( "Adding more than one menu entry with the same ID may result in" + "undefined behaviour" ) ); +#endif m_menu.Append( new wxMenuItem( &m_menu, aId, aLabel, wxEmptyString, wxITEM_NORMAL ) ); } void CONTEXT_MENU::Add( const TOOL_ACTION& aAction ) { + /// ID numbers for tool actions need to have a value higher than m_actionId int id = m_actionId + aAction.GetId(); wxString menuEntry; @@ -110,6 +118,7 @@ void CONTEXT_MENU::Clear() { m_titleSet = false; + // Remove all the entries from context menu for( unsigned i = 0; i < m_menu.GetMenuItemCount(); ++i ) m_menu.Destroy( m_menu.FindItemByPosition( 0 ) ); @@ -144,15 +153,18 @@ void CONTEXT_MENU::CMEventHandler::onEvent( wxEvent& aEvent ) if( type == wxEVT_MENU_HIGHLIGHT ) evt = TOOL_EVENT( TC_Command, TA_ContextMenuUpdate, aEvent.GetId() ); + else if( type == wxEVT_COMMAND_MENU_SELECTED ) { if( aEvent.GetId() > m_actionId ) { + // Handling TOOL_ACTIONs if( m_menu->m_toolActions.count( aEvent.GetId() ) == 1 ) evt = m_menu->m_toolActions[aEvent.GetId()]->GetEvent(); } else { + // Handling common menu entries evt = TOOL_EVENT( TC_Command, TA_ContextMenuChoice, aEvent.GetId() ); } } diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 638f9d0dd5..09847b8518 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -42,28 +42,41 @@ using boost::optional; struct TOOL_DISPATCHER::ButtonState { ButtonState( TOOL_MouseButtons aButton, const wxEventType& aDownEvent, - const wxEventType& aUpEvent, bool aTriggerMenu = false ) : + const wxEventType& aUpEvent ) : button( aButton ), downEvent( aDownEvent ), - upEvent( aUpEvent ), - triggerContextMenu( aTriggerMenu ) + upEvent( aUpEvent ) {}; + ///> Flag indicating that dragging is active for the given button. bool dragging; + + ///> Flag indicating that the given button is pressed. bool pressed; + ///> Point where dragging has started (in world coordinates). VECTOR2D dragOrigin; + + ///> Point where click event has occurred. VECTOR2D downPosition; + ///> Difference between drag origin point and current mouse position (expressed as distance in + ///> pixels). double dragMaxDelta; + ///> Determines the mouse button for which information are stored. TOOL_MouseButtons button; + + ///> The type of wxEvent that determines mouse button press. wxEventType downEvent; + + ///> The type of wxEvent that determines mouse button release. wxEventType upEvent; - bool triggerContextMenu; - + + ///> Time stamp for the last mouse button press event. wxLongLong downTimestamp; + ///> Restores initial state. void Reset() { dragging = false; @@ -76,7 +89,7 @@ TOOL_DISPATCHER::TOOL_DISPATCHER( TOOL_MANAGER* aToolMgr, PCB_BASE_FRAME* aEditF m_toolMgr( aToolMgr ), m_editFrame( aEditFrame ) { m_buttons.push_back( new ButtonState( MB_Left, wxEVT_LEFT_DOWN, wxEVT_LEFT_UP ) ); - m_buttons.push_back( new ButtonState( MB_Right, wxEVT_RIGHT_DOWN, wxEVT_RIGHT_UP, true ) ); + m_buttons.push_back( new ButtonState( MB_Right, wxEVT_RIGHT_DOWN, wxEVT_RIGHT_UP ) ); m_buttons.push_back( new ButtonState( MB_Middle, wxEVT_MIDDLE_DOWN, wxEVT_MIDDLE_UP ) ); ResetState(); @@ -124,14 +137,14 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti wxEventType type = aEvent.GetEventType(); optional evt; bool isClick = false; - + bool up = type == st->upEvent; bool down = type == st->downEvent; - + int mods = decodeModifiers( static_cast( &aEvent ) ); int args = st->button | mods; - if( down ) + if( down ) // Handle mouse button press { st->downTimestamp = wxGetLocalTimeMillis(); st->dragOrigin = m_lastMousePos; @@ -140,7 +153,7 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti st->pressed = true; evt = TOOL_EVENT( TC_Mouse, TA_MouseDown, args ); } - else if( up ) + else if( up ) // Handle mouse button release { st->pressed = false; @@ -148,6 +161,7 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti { wxLongLong t = wxGetLocalTimeMillis(); + // Determine if it was just a single click or beginning of dragging if( t - st->downTimestamp < DragTimeThreshold && st->dragMaxDelta < DragDistanceThreshold ) isClick = true; @@ -156,7 +170,6 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti } else isClick = true; - if( isClick ) evt = TOOL_EVENT( TC_Mouse, TA_MouseClick, args ); @@ -208,6 +221,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) { VECTOR2D screenPos = m_toolMgr->GetViewControls()->GetCursorPosition(); VECTOR2D pos = getView()->ToWorld( screenPos ); + if( pos != m_lastMousePos || type == KiGfx::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE ) { motion = true; @@ -251,7 +265,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) } -void TOOL_DISPATCHER::DispatchWxCommand( wxCommandEvent& aEvent ) +void TOOL_DISPATCHER::DispatchWxCommand( const wxCommandEvent& aEvent ) { bool activateTool = false; std::string toolName; diff --git a/common/tool/tool_event.cpp b/common/tool/tool_event.cpp index cf40310534..00397f8ee4 100644 --- a/common/tool/tool_event.cpp +++ b/common/tool/tool_event.cpp @@ -25,7 +25,7 @@ #include #include -#include +//#include #include #include diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index e261e37c2c..4e4985ad52 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -288,10 +288,7 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) st->pendingWait = false; st->waitEvents.clear(); if( st->cofunc && !st->cofunc->Resume() ) - { - // The couroutine has finished - finishTool( st ); - } + finishTool( st ); // The couroutine has finished // If the tool did not request to propagate // the event to other tools, we should stop it now @@ -303,6 +300,7 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) BOOST_FOREACH( TOOL_STATE* st, m_toolState | boost::adaptors::map_values ) { + // the tool state handler is waiting for events (i.e. called Wait() method) if( !st->pendingWait ) { // no state handler in progress - check if there are any transitions (defined by @@ -324,9 +322,7 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) st->cofunc->Call( aEvent ); if( !st->cofunc->Running() ) - { - finishTool( st ); - } + finishTool( st ); // The couroutine has finished } } } diff --git a/include/geometry/shape_index.h b/include/geometry/shape_index.h index 6f505fb574..578c237685 100644 --- a/include/geometry/shape_index.h +++ b/include/geometry/shape_index.h @@ -93,28 +93,27 @@ void acceptVisitor( T object, V visitor ) * @param minDistance minimum collision distance * @return if object and anotherObject collide */ -template +template bool collide( T object, U anotherObject, int minDistance ) { - return shapeFunctor(object)->Collide( anotherObject, minDistance ); + return shapeFunctor( object )->Collide( anotherObject, minDistance ); } template -bool queryCallback(T shape, void* context) { +bool queryCallback(T shape, void* context) +{ V* visitor = (V*) context; - acceptVisitor(shape, *visitor); + acceptVisitor( shape, *visitor ); + return true; } -template +template class SHAPE_INDEX { - public: - class Iterator { private: - typedef typename RTree::Iterator RTreeIterator; RTreeIterator iterator; @@ -124,20 +123,21 @@ class SHAPE_INDEX { * Setup the internal tree iterator. * @param tree pointer to a RTREE object */ - void Init(RTree* tree) { - tree->GetFirst(iterator); + void Init( RTree* tree ) + { + tree->GetFirst( iterator ); } public: - /** * Iterator constructor * * Creates an iterator for the index object * @param index SHAPE_INDEX object to iterate */ - Iterator(SHAPE_INDEX* index) { - Init(index->m_tree); + Iterator( SHAPE_INDEX* index ) + { + Init( index->m_tree ); } /** @@ -145,7 +145,8 @@ class SHAPE_INDEX { * * Returns the next data element. */ - T operator*() { + T operator*() + { return *iterator; } @@ -154,7 +155,8 @@ class SHAPE_INDEX { * * Shifts the iterator to the next element. */ - bool operator++() { + bool operator++() + { return ++iterator; } @@ -163,7 +165,8 @@ class SHAPE_INDEX { * * Shifts the iterator to the next element. */ - bool operator++(int) { + bool operator++( int ) + { return ++iterator; } @@ -173,7 +176,8 @@ class SHAPE_INDEX { * Checks if the iterator has reached the end. * @return true if it is in an invalid position (data finished) */ - bool IsNull() { + bool IsNull() + { return iterator.IsNull(); } @@ -183,7 +187,8 @@ class SHAPE_INDEX { * Checks if the iterator has not reached the end. * @return true if it is in an valid position (data not finished) */ - bool IsNotNull() { + bool IsNotNull() + { return iterator.IsNotNull(); } @@ -192,12 +197,13 @@ class SHAPE_INDEX { * * Returns the current element of the iterator and moves to the next * position. - * @return SHAPE object pointed by the iterator before moving to the - * next position. + * @return SHAPE object pointed by the iterator before moving to the next position. */ - T Next() { + T Next() + { T object = *iterator; ++iterator; + return object; } }; @@ -210,17 +216,17 @@ class SHAPE_INDEX { * Function Add() * * Adds a SHAPE to the index. - * @param shape the new SHAPE + * @param aShape is the new SHAPE. */ - void Add( T shape ); + void Add( T aShape ); /** * Function Remove() * * Removes a SHAPE to the index. - * @param shape the new SHAPE + * @param aShape is the new SHAPE. */ - void Remove( T shape ); + void Remove( T aShape ); /** * Function RemoveAll() @@ -236,12 +242,14 @@ class SHAPE_INDEX { * @param visitor Visitor object to be run */ template - void Accept( V visitor ) + void Accept( V aVisitor ) { Iterator iter = this->Begin(); - while(!iter.IsNull()) { + + while( !iter.IsNull() ) + { T shape = *iter; - acceptVisitor(shape, visitor); + acceptVisitor( shape, aVisitor ); iter++; } } @@ -262,17 +270,16 @@ class SHAPE_INDEX { * @param minDistance distance threshold * @param visitor object to be invoked on every object contained in the search area. */ - - template - int Query( const SHAPE *shape, int minDistance, V& visitor, bool aExact ) + template + int Query( const SHAPE *aShape, int aMinDistance, V& aVisitor, bool aExact ) { - BOX2I box = shape->BBox(); - box.Inflate(minDistance); + BOX2I box = aShape->BBox(); + box.Inflate( aMinDistance ); - int min[2] = {box.GetX(), box.GetY()}; - int max[2] = {box.GetRight(), box.GetBottom()}; + int min[2] = { box.GetX(), box.GetY() }; + int max[2] = { box.GetRight(), box.GetBottom() }; - return this->m_tree->Search(min, max, visitor); + return this->m_tree->Search( min, max, aVisitor ); } /** @@ -284,7 +291,6 @@ class SHAPE_INDEX { Iterator Begin(); private: - RTree* m_tree; }; @@ -293,58 +299,68 @@ class SHAPE_INDEX { */ template -SHAPE_INDEX::SHAPE_INDEX() { +SHAPE_INDEX::SHAPE_INDEX() +{ this->m_tree = new RTree(); } template -SHAPE_INDEX::~SHAPE_INDEX() { +SHAPE_INDEX::~SHAPE_INDEX() +{ delete this->m_tree; } template -void SHAPE_INDEX::Add(T shape) { - BOX2I box = boundingBox(shape); - int min[2]= {box.GetX(), box.GetY()}; - int max[2] = {box.GetRight(), box.GetBottom()}; - this->m_tree->Insert(min, max, shape); +void SHAPE_INDEX::Add( T aShape ) +{ + BOX2I box = boundingBox( aShape ); + int min[2] = { box.GetX(), box.GetY() }; + int max[2] = { box.GetRight(), box.GetBottom() }; + + this->m_tree->Insert( min, max, aShape ); } template -void SHAPE_INDEX::Remove(T shape) { - BOX2I box = boundingBox(shape); - int min[2]= {box.GetX(), box.GetY()}; - int max[2] = {box.GetRight(), box.GetBottom()}; - this->m_tree->Remove(min, max, shape); +void SHAPE_INDEX::Remove(T aShape) +{ + BOX2I box = boundingBox( aShape ); + int min[2] = { box.GetX(), box.GetY() }; + int max[2] = { box.GetRight(), box.GetBottom() }; + + this->m_tree->Remove( min, max, aShape ); } template -void SHAPE_INDEX::RemoveAll() { +void SHAPE_INDEX::RemoveAll() +{ this->m_tree->RemoveAll(); } template -void SHAPE_INDEX::Reindex() { +void SHAPE_INDEX::Reindex() +{ RTree* newTree; newTree = new RTree(); Iterator iter = this->Begin(); - while(!iter.IsNull()) { + while( !iter.IsNull() ) + { T shape = *iter; - BOX2I box = boundingBox(shape); - int min[2]= {box.GetX(), box.GetY()}; - int max[2] = {box.GetRight(), box.GetBottom()}; - newTree->Insert(min, max, shape); + BOX2I box = boundingBox( shape ); + int min[2] = { box.GetX(), box.GetY() }; + int max[2] = { box.GetRight(), box.GetBottom() }; + newTree->Insert( min, max, shape ); iter++; } + delete this->m_tree; this->m_tree = newTree; } template -typename SHAPE_INDEX::Iterator SHAPE_INDEX::Begin() { - return Iterator(this); +typename SHAPE_INDEX::Iterator SHAPE_INDEX::Begin() +{ + return Iterator( this ); } - #endif diff --git a/include/geometry/shape_line_chain.h b/include/geometry/shape_line_chain.h index 54e4662b23..ab865ae555 100644 --- a/include/geometry/shape_line_chain.h +++ b/include/geometry/shape_line_chain.h @@ -43,7 +43,6 @@ * SHAPE_LINE_CHAIN class shall not be used for polygons! */ class SHAPE_LINE_CHAIN : public SHAPE { - private: typedef std::vector::iterator point_iter; typedef std::vector::const_iterator point_citer; @@ -55,7 +54,8 @@ class SHAPE_LINE_CHAIN : public SHAPE { * * Represents an intersection between two line segments */ - struct Intersection { + struct Intersection + { /// segment belonging from the (this) argument of Intersect() SEG our; /// segment belonging from the aOther argument of Intersect() @@ -71,45 +71,45 @@ class SHAPE_LINE_CHAIN : public SHAPE { * Initializes an empty line chain. */ SHAPE_LINE_CHAIN(): - SHAPE (SH_LINE_CHAIN), m_closed(false) {}; + SHAPE( SH_LINE_CHAIN ), m_closed( false ) {}; /** * Copy Constructor */ - SHAPE_LINE_CHAIN(const SHAPE_LINE_CHAIN& aShape): - SHAPE (SH_LINE_CHAIN), m_points(aShape.m_points), m_closed(aShape.m_closed) {}; + SHAPE_LINE_CHAIN( const SHAPE_LINE_CHAIN& aShape ) : + SHAPE( SH_LINE_CHAIN ), m_points( aShape.m_points ), m_closed( aShape.m_closed ) {}; /** * Constructor * Initializes a 2-point line chain (a single segment) */ - SHAPE_LINE_CHAIN(const VECTOR2I& a, const VECTOR2I& b): - SHAPE (SH_LINE_CHAIN), - m_closed(false) + SHAPE_LINE_CHAIN( const VECTOR2I& aA, const VECTOR2I& aB ) : + SHAPE( SH_LINE_CHAIN ), + m_closed( false ) { - m_points.resize(2); - m_points[0] = a; - m_points[1] = b; + m_points.resize( 2 ); + m_points[0] = aA; + m_points[1] = aB; } - SHAPE_LINE_CHAIN(const VECTOR2I& a, const VECTOR2I& b, const VECTOR2I& c): - SHAPE (SH_LINE_CHAIN), - m_closed(false) + SHAPE_LINE_CHAIN( const VECTOR2I& aA, const VECTOR2I& aB, const VECTOR2I& aC ): + SHAPE( SH_LINE_CHAIN ), + m_closed( false ) { - m_points.resize(3); - m_points[0] = a; - m_points[1] = b; - m_points[2] = c; + m_points.resize( 3 ); + m_points[0] = aA; + m_points[1] = aB; + m_points[2] = aC; } - - SHAPE_LINE_CHAIN(const VECTOR2I *v, int count): - SHAPE (SH_LINE_CHAIN), - m_closed(false) + SHAPE_LINE_CHAIN(const VECTOR2I* aV, int aCount ) : + SHAPE( SH_LINE_CHAIN ), + m_closed( false ) { - m_points.resize(count); - for(int i = 0; i < count ; i++) - m_points[i] = *v++; + m_points.resize( aCount ); + + for( int i = 0; i < aCount; i++ ) + m_points[i] = *aV++; } ~SHAPE_LINE_CHAIN() {}; @@ -118,7 +118,8 @@ class SHAPE_LINE_CHAIN : public SHAPE { * Function Clear() * Removes all points from the line chain. */ - void Clear() { + void Clear() + { m_points.clear(); m_closed = false; } @@ -129,7 +130,7 @@ class SHAPE_LINE_CHAIN : public SHAPE { * Marks the line chain as closed (i.e. with a segment connecting the last point with the first point). * @param aClosed: whether the line chain is to be closed or not. */ - void SetClosed(bool aClosed) + void SetClosed( bool aClosed ) { m_closed = aClosed; } @@ -153,9 +154,10 @@ class SHAPE_LINE_CHAIN : public SHAPE { int SegmentCount() const { int c = m_points.size() - 1; - if(m_closed) + if( m_closed ) c++; - return std::max(0, c); + + return std::max( 0, c ); } /** @@ -167,86 +169,88 @@ class SHAPE_LINE_CHAIN : public SHAPE { int PointCount() const { return m_points.size(); - }; + } /** * Function Segment() * * Returns a segment referencing to the segment (index) in the line chain. * Modifying ends of the returned segment will modify corresponding points in the line chain. - * @param index: index of the segment in the line chain. Negative values are counted from the end (i.e. -1 means + * @param aIndex: index of the segment in the line chain. Negative values are counted from the end (i.e. -1 means * the last segment in the line chain) * @return SEG referenced to given segment in the line chain */ - SEG Segment ( int index ) + SEG Segment( int aIndex ) { - if(index < 0) - index += SegmentCount(); + if( aIndex < 0 ) + aIndex += SegmentCount(); - if(index == (m_points.size() - 1) && m_closed ) - return SEG ( m_points[index], m_points[0], index ); + if( aIndex == ( m_points.size() - 1 ) && m_closed ) + return SEG( m_points[aIndex], m_points[0], aIndex ); else - return SEG ( m_points[index], m_points[index + 1], index ); + return SEG( m_points[aIndex], m_points[aIndex + 1], aIndex ); } /** * Function CSegment() * * Returns a read-only segment referencing to the segment (index) in the line chain. - * @param index: index of the segment in the line chain. Negative values are counted from the end (i.e. -1 means + * @param aIndex: index of the segment in the line chain. Negative values are counted from the end (i.e. -1 means * the last segment in the line chain) * @return SEG referenced to given segment in the line chain */ - const SEG CSegment ( int index ) const + const SEG CSegment( int aIndex ) const { - if(index < 0) - index += SegmentCount(); + if( aIndex < 0 ) + aIndex += SegmentCount(); - if(index == (m_points.size() - 1) && m_closed ) - return SEG ( const_cast(m_points[index]), - const_cast(m_points[0]), index ); + if( aIndex == ( m_points.size() - 1 ) && m_closed ) + return SEG( const_cast( m_points[aIndex] ), + const_cast( m_points[0] ), aIndex ); else - return SEG ( const_cast(m_points[index]), - const_cast(m_points[index + 1]), index ); + return SEG( const_cast( m_points[aIndex] ), + const_cast( m_points[aIndex + 1] ), aIndex ); } /** * Function Point() * * Returns a reference to a given point in the line chain. - * @param index index of the point + * @param aIndex index of the point * @return reference to the point */ - VECTOR2I& Point ( int index ) + VECTOR2I& Point( int aIndex ) { - if(index < 0) - index += PointCount(); - return m_points[index]; + if( aIndex < 0 ) + aIndex += PointCount(); + + return m_points[aIndex]; } /** * Function CPoint() * * Returns a const reference to a given point in the line chain. - * @param index index of the point + * @param aIndex index of the point * @return const reference to the point */ - const VECTOR2I& CPoint ( int index ) const + const VECTOR2I& CPoint( int aIndex ) const { - if(index < 0) - index += PointCount(); - return m_points[index]; + if( aIndex < 0 ) + aIndex += PointCount(); + + return m_points[aIndex]; } /// @copydoc SHAPE::BBox() - const BOX2I BBox ( int aClearance = 0 ) const + const BOX2I BBox( int aClearance = 0 ) const { BOX2I bbox; - bbox.Compute(m_points); + bbox.Compute( m_points ); + return bbox; } - /** * Function Collide() * @@ -255,7 +259,7 @@ class SHAPE_LINE_CHAIN : public SHAPE { * @param aClearance minimum distance that does not qualify as a collision. * @return true, when a collision has been found */ - bool Collide ( const VECTOR2I& aP, int aClearance = 0 ) const; + bool Collide( const VECTOR2I& aP, int aClearance = 0 ) const; /** * Function Collide() @@ -265,7 +269,7 @@ class SHAPE_LINE_CHAIN : public SHAPE { * @param aClearance minimum distance that does not qualify as a collision. * @return true, when a collision has been found */ - bool Collide ( const BOX2I& aBox, int aClearance = 0 ) const; + bool Collide( const BOX2I& aBox, int aClearance = 0 ) const; /** * Function Collide() @@ -275,9 +279,8 @@ class SHAPE_LINE_CHAIN : public SHAPE { * @param aClearance minimum distance that does not qualify as a collision. * @return true, when a collision has been found */ - bool Collide ( const SEG& aSeg, int aClearance = 0 ) const; + bool Collide( const SEG& aSeg, int aClearance = 0 ) const; - /** * Function Distance() * @@ -285,7 +288,7 @@ class SHAPE_LINE_CHAIN : public SHAPE { * @param aP the point * @return minimum distance. */ - int Distance( const VECTOR2I & aP ) const; + int Distance( const VECTOR2I& aP ) const; /** * Function Reverse() @@ -307,13 +310,13 @@ class SHAPE_LINE_CHAIN : public SHAPE { * Function Append() * * Appends a new point at the end of the line chain. - * @param x X coordinate of the new point - * @param y Y coordinate of the new point + * @param aX is X coordinate of the new point + * @param aY is Y coordinate of the new point */ - void Append(int x, int y) + void Append( int aX, int aY ) { - VECTOR2I v(x, y); - Append(v); + VECTOR2I v( aX, aY ); + Append( v ); } /** @@ -322,15 +325,15 @@ class SHAPE_LINE_CHAIN : public SHAPE { * Appends a new point at the end of the line chain. * @param aP the new point */ - void Append(const VECTOR2I& aP) + void Append( const VECTOR2I& aP ) { - if(m_points.size() == 0) - m_bbox = BOX2I(aP, VECTOR2I(0, 0)); + if( m_points.size() == 0 ) + m_bbox = BOX2I( aP, VECTOR2I( 0, 0 ) ); - if (m_points.size() == 0 || CPoint(-1) != aP) + if( m_points.size() == 0 || CPoint( -1 ) != aP ) { - m_points.push_back(aP); - m_bbox.Merge(aP); + m_points.push_back( aP ); + m_bbox.Merge( aP ); } } @@ -340,22 +343,23 @@ class SHAPE_LINE_CHAIN : public SHAPE { * Appends another line chain at the end. * @param aOtherLine the line chain to be appended. */ - void Append(const SHAPE_LINE_CHAIN& aOtherLine) + void Append( const SHAPE_LINE_CHAIN& aOtherLine ) { - if(aOtherLine.PointCount() == 0) + if( aOtherLine.PointCount() == 0 ) return; - else if(PointCount() == 0 || aOtherLine.CPoint(0) != CPoint(-1)) + + else if( PointCount() == 0 || aOtherLine.CPoint( 0 ) != CPoint( -1 ) ) { - const VECTOR2I p = aOtherLine.CPoint(0); - m_points.push_back(p); - m_bbox.Merge(p); + const VECTOR2I p = aOtherLine.CPoint( 0 ); + m_points.push_back( p ); + m_bbox.Merge( p ); } - for(int i = 1; i m_points; + /// is the line chain closed? bool m_closed; + /// cached bounding box BOX2I m_bbox; }; diff --git a/include/tool/action_manager.h b/include/tool/action_manager.h index 78943a92fa..9f54c1f305 100644 --- a/include/tool/action_manager.h +++ b/include/tool/action_manager.h @@ -43,21 +43,21 @@ public: /** * Function RegisterAction() - * Adds a tool action to the manager set and sets it up. After that is is possible to invoke - * the action using hotkeys or its name. + * Adds a tool action to the manager and sets it up. After that is is possible to invoke + * the action using hotkeys or sending a command event with its name. * @param aAction: action to be added. Ownership is not transferred. */ void RegisterAction( TOOL_ACTION* aAction ); /** * Function UnregisterAction() - * Removes a tool action from the manager set and makes it unavailable for further usage. + * Removes a tool action from the manager and makes it unavailable for further usage. * @param aAction: action to be removed. */ void UnregisterAction( TOOL_ACTION* aAction ); /** - * Generates an unique ID from for a tool with given name. + * Generates an unique ID from for an action with given name. */ static int MakeActionId( const std::string& aActionName ); @@ -82,9 +82,16 @@ public: bool RunHotKey( int aHotKey ) const; private: + ///> Tool manager needed to run actions TOOL_MANAGER* m_toolMgr; + + ///> Map for indexing actions by their IDs std::map m_actionIdIndex; + + ///> Map for indexing actions by their names std::map m_actionNameIndex; + + ///> Map for indexing actions by their hotkeys std::map m_actionHotKeys; /** diff --git a/include/tool/context_menu.h b/include/tool/context_menu.h index cf4d752405..d4d5e2b532 100644 --- a/include/tool/context_menu.h +++ b/include/tool/context_menu.h @@ -29,7 +29,6 @@ #include #include -class wxMenu; class TOOL_INTERACTIVE; /** @@ -40,53 +39,102 @@ class TOOL_INTERACTIVE; */ class CONTEXT_MENU { - public: + ///> Default constructor CONTEXT_MENU(); + + ///> Copy constructor CONTEXT_MENU( const CONTEXT_MENU& aMenu ); + /** + * Function SetTitle() + * Sets title for the context menu. The title is shown as a text label shown on the top of + * the menu. + * @param aTitle is the new title. + */ void SetTitle( const wxString& aTitle ); + + /** + * Function Add() + * Adds an entry to the menu. After highlighting/selecting the entry, a TOOL_EVENT command is + * sent that contains ID of the entry. + * @param aLabel is the text label show in the menu. + * @param aId is the ID that is sent in the TOOL_EVENT. It should be unique for every entry. + */ void Add( const wxString& aLabel, int aId ); + + /** + * Function Add() + * Adds an entry to the menu, basing on the TOOL_ACTION object. After selecting the entry, + * a TOOL_EVENT command containing name of the action is sent. + * @param aAction is the action to be added to menu entry. + */ void Add( const TOOL_ACTION& aAction ); + + /** + * Function Clear() + * Removes all the entries from the menu (as well as its title). It leaves the menu in the + * initial state. + */ void Clear(); + /** + * Function GetMenu() + * Returns the instance of wxMenu object used to display the menu. + */ wxMenu* GetMenu() const { return const_cast( &m_menu ); } private: + ///> Class CMEventHandler takes care of handling menu events. After reception of particular + ///> events, it translates them to TOOL_EVENTs that may control tools. class CMEventHandler : public wxEvtHandler { public: + ///> Default constructor + ///> aMenu is the CONTEXT_MENU instance for which it handles events. CMEventHandler( CONTEXT_MENU* aMenu ) : m_menu( aMenu ) {}; + ///> Handler for menu events. void onEvent( wxEvent& aEvent ); private: + ///> CONTEXT_MENU instance for which it handles events. CONTEXT_MENU* m_menu; }; friend class TOOL_INTERACTIVE; + /** + * Function setTool() + * Sets a tool that is the creator of the menu. + * @param aTool is the tool that created the menu. + */ void setTool( TOOL_INTERACTIVE* aTool ) { m_tool = aTool; } /** + * Function getHotKeyDescription() * Returns a hot key in the string format accepted by wxMenu. - * - * @param aAction is the action with hot key to be converted. + * @param aAction is the action with hot key to be translated.. * @return Hot key in the string format compatible with wxMenu. */ std::string getHotKeyDescription( const TOOL_ACTION& aAction ) const; - /// Flag indicating that the menu title was set up + ///> Flag indicating that the menu title was set up. bool m_titleSet; + ///> Instance of wxMenu used for display of the context menu. wxMenu m_menu; + + ///> Instance of menu event handler. CMEventHandler m_handler; + + ///> Creator of the menu TOOL_INTERACTIVE* m_tool; /// Menu items with ID higher than that are considered TOOL_ACTIONs diff --git a/include/tool/tool_base.h b/include/tool/tool_base.h index 1b9da87305..ff26d95e59 100644 --- a/include/tool/tool_base.h +++ b/include/tool/tool_base.h @@ -42,17 +42,21 @@ class VIEW_CONTROLS; enum TOOL_Type { - TOOL_Interactive = 0x1, - TOOL_Batch = 0x2 + ///> Tool that interacts with the user + TOOL_Interactive = 0x01, + + ///> Tool that runs in the background without any user intervention + TOOL_Batch = 0x02 }; +/// Unique identifier for tools typedef int TOOL_ID; typedef DELEGATE TOOL_STATE_FUNC; /** * Class TOOL_BASE * - * Base abstract interface for all kinds of tools + * Base abstract interface for all kinds of tools. */ class TOOL_BASE @@ -61,25 +65,49 @@ public: TOOL_BASE( TOOL_Type aType, TOOL_ID aId, const std::string& aName = std::string( "" ) ) : m_type( aType ), m_toolId( aId ), - m_toolName( aName ) {}; + m_toolName( aName ), + m_toolMgr( NULL ){}; virtual ~TOOL_BASE() {}; + /** + * Function GetType() + * Returns the type of the tool. + * @return The type of the tool. + */ TOOL_Type GetType() const { return m_type; } + /** + * Function GetId() + * Returns the unique identifier of the tool. The identifier is set by an instance of + * TOOL_MANAGER. + * @return Identifier of the tool. + */ TOOL_ID GetId() const { return m_toolId; } + /** + * Function GetName() + * Returns the name of the tool. Tool names are expected to obey the format: + * application.ToolName (eg. pcbnew.InteractiveSelection). + * @return The name of the tool. + */ const std::string& GetName() const { return m_toolName; } + /** + * Function GetManager() + * Returns the instance of TOOL_MANAGER that takes care of the tool. + * @return Instance of the TOOL_MANAGER. If there is no TOOL_MANAGER associated, it returns + * NULL. + */ TOOL_MANAGER* GetManager() const { return m_toolMgr; @@ -96,14 +124,27 @@ protected: */ void attachManager( TOOL_MANAGER* aManager ); + /** + * Function getView() + * + * Returns the instance of VIEW object used in the application. It allows tools to draw. + * @return The instance of VIEW. + */ KiGfx::VIEW* getView() const; + + /** + * Function getViewControls() + * + * Returns the instance of VIEW_CONTROLS object used in the application. It allows tools to + * read & modify user input and its settings (eg. show cursor, enable snapping to grid, etc.) + * @return The instance of VIEW_CONTROLS. + */ KiGfx::VIEW_CONTROLS* getViewControls() const; /** * Function getEditFrame() * - * Returns the application window object, casted to requested user type, possibly with - * run-time type check + * Returns the application window object, casted to requested user type. */ template T* getEditFrame() const @@ -124,8 +165,14 @@ protected: return static_cast( m ); } + ///> Stores the type of the tool. TOOL_Type m_type; + + ///> Unique identifier for the tool, assigned by a TOOL_MANAGER instance. TOOL_ID m_toolId; + + ///> Name of the tool. Names are expected to obey the format application.ToolName + ///> (eg. pcbnew.InteractiveSelection). std::string m_toolName; TOOL_MANAGER* m_toolMgr; diff --git a/include/tool/tool_dispatcher.h b/include/tool/tool_dispatcher.h index a95464f38e..ac298226ae 100644 --- a/include/tool/tool_dispatcher.h +++ b/include/tool/tool_dispatcher.h @@ -29,7 +29,6 @@ #include -//#include #include class TOOL_MANAGER; @@ -61,26 +60,62 @@ public: TOOL_DISPATCHER( TOOL_MANAGER* aToolMgr, PCB_BASE_FRAME* aEditFrame ); virtual ~TOOL_DISPATCHER(); + /** + * Function ResetState() + * Brings the dispatcher to its initial state. + */ virtual void ResetState(); + + /** + * Function DispatchWxEvent() + * Processes wxEvents (mostly UI events), translates them to TOOL_EVENTs, and makes tools + * handle those. + * @param aEvent is the wxWidgets event to be processed. + */ virtual void DispatchWxEvent( wxEvent& aEvent ); - virtual void DispatchWxCommand( wxCommandEvent& aEvent ); + + /** + * Function DispatchWxCommand() + * Processes wxCommands (mostly menu related events) and runs appropriate actions (eg. run the + * specified tool). + * @param aEvent is the wxCommandEvent to be processed. + */ + virtual void DispatchWxCommand( const wxCommandEvent& aEvent ); private: + ///> Number of mouse buttons that is handled in events. static const int MouseButtonCount = 3; + + ///> The time threshold for a mouse button press that distinguishes between a single mouse + ///> click and a beginning of drag event (expressed in milliseconds). static const int DragTimeThreshold = 300; + + ///> The distance threshold for mouse cursor that disinguishes between a single mouse click + ///> and a beginning of drag event (expressed in screen pixels). static const int DragDistanceThreshold = 8; + ///> Handles mouse related events (click, motion, dragging) bool handleMouseButton( wxEvent& aEvent, int aIndex, bool aMotion ); - bool handlePopupMenu( wxEvent& aEvent ); + ///> Saves the state of key modifiers (Alt, Ctrl and so on). int decodeModifiers( const wxKeyboardState* aState ) const; + ///> Stores all the informations regarding a mouse button state. struct ButtonState; + + ///> The last mouse cursor position (in world coordinates). VECTOR2D m_lastMousePos; + + ///> State of mouse buttons. std::vector m_buttons; + ///> Returns the instance of VIEW, used by the application. KiGfx::VIEW* getView(); + + ///> Instance of tool manager that cooperates with the dispatcher. TOOL_MANAGER* m_toolMgr; + + ///> Instance of wxFrame that is the source of UI events. PCB_BASE_FRAME* m_editFrame; }; diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index 15438c8dd8..609b72326a 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -29,6 +29,7 @@ #include #include +#include #include @@ -71,17 +72,19 @@ enum TOOL_Actions TA_ViewDirty = 0x0800, TA_ChangeLayer = 0x1000, - // Tool cancel event. Issued automagically when the user hits escape or selects End Tool from the context menu. + // Tool cancel event. Issued automagically when the user hits escape or selects End Tool from + // the context menu. TA_CancelTool = 0x2000, - // Context menu update. Issued whenever context menu is open and the user hovers the mouse over one of choices. - // Used in dynamic highligting in disambiguation menu + // Context menu update. Issued whenever context menu is open and the user hovers the mouse + // over one of choices. Used in dynamic highligting in disambiguation menu TA_ContextMenuUpdate = 0x4000, - // Context menu choice. Sent if the user picked something from the context menu or closed it without selecting anything. + // Context menu choice. Sent if the user picked something from the context menu or + // closed it without selecting anything. TA_ContextMenuChoice = 0x8000, - // Tool action + // Tool action (allows to control tools) TA_Action = 0x10000, TA_Any = 0xffffffff @@ -129,6 +132,12 @@ enum CONTEXT_MENU_TRIGGER class TOOL_EVENT { public: + /** + * Function Format() + * Returns information about event in form of a human-readable string. + * + * @return Event information. + */ const std::string Format() const; TOOL_EVENT( TOOL_EventCategory aCategory = TC_None, TOOL_Actions aAction = TA_None, @@ -175,33 +184,44 @@ public: m_commandStr = aExtraParam; } + ///> Returns the category (eg. mouse/keyboard/action) of an event.. TOOL_EventCategory Category() const { return m_category; } + ///> Returns more specific information about the type of an event. TOOL_Actions Action() const { return m_actions; } + ///> Returns information about difference between current mouse cursor position and the place + ///> where dragging has started. const VECTOR2D Delta() const { + assert( m_category == TC_Mouse ); // this should be used only with mouse events return m_mouseDelta; } + ///> Returns mouse cursor position in world coordinates. const VECTOR2D& Position() const { + assert( m_category == TC_Mouse ); // this should be used only with mouse events return m_mousePos; } + ///> Returns the point where dragging has started. const VECTOR2D& DragOrigin() const { + assert( m_category == TC_Mouse ); // this should be used only with mouse events return m_mouseDragOrigin; } + ///> Returns information about mouse buttons state. int Buttons() const { + assert( m_category == TC_Mouse ); // this should be used only with mouse events return m_mouseButtons; } @@ -231,6 +251,7 @@ public: return m_actions == TA_CancelTool; } + ///> Returns information about key modifiers state (Ctrl, Alt, etc.) int Modifier( int aMask = MD_ModifierMask ) const { return ( m_modifiers & aMask ); @@ -251,8 +272,6 @@ public: return m_actions == TA_KeyDown; } - void Ignore(); - void SetMouseDragOrigin( const VECTOR2D &aP ) { m_mouseDragOrigin = aP; @@ -268,6 +287,13 @@ public: m_mouseDelta = aP; } + /** + * Function Matches() + * Tests whether two events match in terms of category & action or command. + * + * @param aEvent is the event to test against. + * @return True if two events match, false otherwise. + */ bool Matches( const TOOL_EVENT& aEvent ) const { if( !( m_category & aEvent.m_category ) ) @@ -299,13 +325,25 @@ private: TOOL_Actions m_actions; TOOL_ActionScope m_scope; + ///> Difference between mouse cursor position and + ///> the point where dragging event has started VECTOR2D m_mouseDelta; + + ///> Current mouse cursor position VECTOR2D m_mousePos; + + ///> Point where dragging has started VECTOR2D m_mouseDragOrigin; + ///> State of mouse buttons int m_mouseButtons; + + ///> Stores code of pressed/released key int m_keyCode; + + ///> State of key modifierts (Ctrl/Alt/etc.) int m_modifiers; + boost::optional m_commandId; boost::optional m_commandStr; }; @@ -324,7 +362,10 @@ public: typedef std::deque::iterator iterator; typedef std::deque::const_iterator const_iterator; + ///> Default constructor. Creates an empty list. TOOL_EVENT_LIST() {}; + + ///> Constructor for a list containing only one TOOL_EVENT. TOOL_EVENT_LIST( const TOOL_EVENT& aSingleEvent ) { m_events.push_back( aSingleEvent ); @@ -346,6 +387,11 @@ public: return boost::optional(); } + /** + * Function Add() + * Adds a tool event to the list. + * @param aEvent is the tool event to be addded. + */ void Add( const TOOL_EVENT& aEvent ) { m_events.push_back( aEvent ); diff --git a/include/tool/tool_interactive.h b/include/tool/tool_interactive.h index 14fd2dccbb..7915f225a8 100644 --- a/include/tool/tool_interactive.h +++ b/include/tool/tool_interactive.h @@ -35,6 +35,10 @@ class CONTEXT_MENU; class TOOL_INTERACTIVE : public TOOL_BASE { public: + /** + * Constructor + * + * Creates a tool with given id & name. The name must be unique. */ TOOL_INTERACTIVE( TOOL_ID aId, const std::string& aName ); /** @@ -46,8 +50,8 @@ public: /** * Function Reset() - * Brings the tool to a known, initial state. If the tool claimed anything from the model or the view, - * it must release it when its reset. + * Brings the tool to a known, initial state. If the tool claimed anything from + * the model or the view, it must release it when its reset. */ virtual void Reset() = 0; @@ -65,7 +69,9 @@ public: /** * Function SetContextMenu() * - * Assigns a context menu and tells when it should be activated + * Assigns a context menu and tells when it should be activated. + * @param aMenu is the menu to be assigned. + * @param aTrigger determines conditions upon which the context menu is activated. */ void SetContextMenu( CONTEXT_MENU* aMenu, CONTEXT_MENU_TRIGGER aTrigger = CMENU_BUTTON ); @@ -87,9 +93,8 @@ public: */ OPT_TOOL_EVENT Wait( const TOOL_EVENT_LIST& aEventList = TOOL_EVENT ( TC_Any, TA_Any ) ); - /** functions below are not yet implemented - their interface may change */ - template + /*template bool InvokeTool( const std::string& aToolName, const Parameters& parameters, ReturnValue& returnValue ); @@ -98,11 +103,10 @@ public: ReturnValue& returnValue ); template - void Yield( const T& returnValue ); + void Yield( const T& returnValue );*/ protected: - /* helper functions for constructing events for Wait() and Go() with - less typing */ + /* helper functions for constructing events for Wait() and Go() with less typing */ const TOOL_EVENT evActivate( std::string aToolName = "" ); const TOOL_EVENT evCommand( int aCommandId = -1 ); const TOOL_EVENT evCommand( std::string aCommandStr = "" ); diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp index 96e348a941..69d2d00dba 100644 --- a/pcbnew/tools/move_tool.cpp +++ b/pcbnew/tools/move_tool.cpp @@ -36,6 +36,8 @@ using boost::optional; MOVE_TOOL::MOVE_TOOL() : TOOL_INTERACTIVE( "pcbnew.InteractiveMove" ), m_selectionTool( NULL ), + + // Available actions: m_activate( m_toolName, AS_GLOBAL, 'M', "Move", "Moves the selected item(s)" ), m_rotate( m_toolName + ".rotate", AS_CONTEXT, ' ', "Rotate", "Rotates selected item(s)" ), m_flip( m_toolName + ".flip", AS_CONTEXT, 'F', "Flip", "Flips selected item(s)" ) @@ -69,7 +71,7 @@ bool MOVE_TOOL::Init() m_toolMgr->RegisterAction( &m_rotate ); m_toolMgr->RegisterAction( &m_flip ); - // Add context menu entries for the selection tool + // Add context menu entries that are displayed when selection tool is active m_selectionTool->AddMenuItem( m_activate ); m_selectionTool->AddMenuItem( m_rotate ); m_selectionTool->AddMenuItem( m_flip ); @@ -92,7 +94,9 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) VIEW* view = getView(); VIEW_CONTROLS* controls = getViewControls(); + // Add a VIEW_GROUP that will hold all modified items view->Add( &m_items ); + controls->ShowCursor( true ); controls->SetSnapping( true ); controls->SetAutoPan( true ); @@ -102,7 +106,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) { if( evt->IsCancel() ) { - restore = true; + restore = true; // Cancelling the tool means that items have to be restored break; // Finish } @@ -111,12 +115,12 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) { VECTOR2D cursorPos = getView()->ToWorld( getViewControls()->GetCursorPosition() ); - if( evt->Matches( m_rotate.GetEvent() ) ) + if( evt->Matches( m_rotate.GetEvent() ) ) // got rotation event? { m_state.Rotate( cursorPos, 900.0 ); m_items.ViewUpdate( VIEW_ITEM::GEOMETRY ); } - else if( evt->Matches( m_flip.GetEvent() ) ) + else if( evt->Matches( m_flip.GetEvent() ) ) // got flip event? { m_state.Flip( cursorPos ); m_items.ViewUpdate( VIEW_ITEM::GEOMETRY ); @@ -165,20 +169,22 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) // Restore visibility of the original items vgSetVisibility( &m_items, true ); - // Movement has to be rollbacked, so restore the previous state of items if( restore ) { + // Modifications has to be rollbacked, so restore the previous state of items vgUpdate( &m_items, VIEW_ITEM::APPEARANCE ); m_state.RestoreAll(); } else { + // Changes are applied, so update the items vgUpdate( &m_items, m_state.GetUpdateFlag() ); m_state.Apply(); } m_items.Clear(); view->Remove( &m_items ); + controls->ShowCursor( false ); controls->SetSnapping( false ); controls->SetAutoPan( false ); diff --git a/pcbnew/tools/selection_area.h b/pcbnew/tools/selection_area.h index 10079dccd5..6c0f4dcf06 100644 --- a/pcbnew/tools/selection_area.h +++ b/pcbnew/tools/selection_area.h @@ -50,6 +50,7 @@ public: virtual const BOX2I ViewBBox() const; void ViewDraw( int aLayer, KiGfx::GAL* aGal ) const; + void ViewGetLayers( int aLayers[], int& aCount ) const; void SetOrigin ( VECTOR2I aOrigin ) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 72cc54a1be..c1133de729 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -83,7 +83,6 @@ bool SELECTION_TOOL::Init() int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) { BOARD* board = getModel( PCB_T ); - assert( board != NULL ); // Main loop: keep receiving events @@ -116,13 +115,16 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) } else { + // Check if dragging has started within any of selected items bounding box if( containsSelected( evt->Position() ) ) { + // Yes -> run the move tool and wait till it finishes m_toolMgr->InvokeTool( "pcbnew.InteractiveMove" ); Wait(); } else { + // No -> clear the selection list clearSelection(); } } @@ -135,7 +137,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) void SELECTION_TOOL::AddMenuItem( const TOOL_ACTION& aAction ) { - assert( aAction.GetId() > 0 ); // Check if the action was registered before + assert( aAction.GetId() > 0 ); // Check if the action was registered before in ACTION_MANAGER m_menu.Add( aAction ); } @@ -259,9 +261,9 @@ BOARD_ITEM* SELECTION_TOOL::pickSmallestComponent( GENERAL_COLLECTOR* aCollector bool SELECTION_TOOL::selectMultiple() { - VIEW* view = getView(); - bool cancelled = false; + bool cancelled = false; // Was the tool cancelled while it was running? m_multiple = true; // Multiple selection mode is active + VIEW* view = getView(); getViewControls()->SetAutoPan( true ); // Those 2 lines remove the blink-in-the-random-place effect @@ -291,7 +293,7 @@ bool SELECTION_TOOL::selectMultiple() if( evt->IsMouseUp( MB_Left ) ) { - // End drawing a selection box + // End drawing the selection box m_selArea->ViewSetVisible( false ); // Mark items within the selection box as selected @@ -315,6 +317,7 @@ bool SELECTION_TOOL::selectMultiple() // Now the context menu should be enabled if( !m_selectedItems.empty() ) SetContextMenu( &m_menu, CMENU_BUTTON ); + break; } } @@ -367,6 +370,7 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) { optional id = evt->GetCommandId(); + // User has selected an item, so this one will be returned if( id && ( *id >= 0 ) ) current = ( *aCollector )[*id]; @@ -392,11 +396,12 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const { + // Is high contrast mode enabled? bool highContrast = getView()->GetPainter()->GetSettings()->GetHighContrast(); if( highContrast ) { - bool onActive = false; + bool onActive = false; // Is the item on any of active layers? int layers[KiGfx::VIEW::VIEW_MAX_LAYERS], layers_count; // Filter out items that do not belong to active layers @@ -406,14 +411,14 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const for( int i = 0; i < layers_count; ++i ) { - if( activeLayers.count( layers[i] ) > 0 ) // Item is on at least one active layer + if( activeLayers.count( layers[i] ) > 0 ) // Item is on at least one of active layers { onActive = true; break; } } - if( !onActive ) + if( !onActive ) // We do not want to select items that are in the background return false; } @@ -426,8 +431,7 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const LAYER_NUM top, bottom; static_cast( aItem )->ReturnLayerPair( &top, &bottom ); - return ( board->IsLayerVisible( top ) || - board->IsLayerVisible( bottom ) ); + return ( board->IsLayerVisible( top ) || board->IsLayerVisible( bottom ) ); } break; @@ -473,8 +477,7 @@ bool SELECTION_TOOL::containsSelected( const VECTOR2I& aPoint ) const { // Check if the point is located within any of the currently selected items bounding boxes std::set::iterator it, it_end; - for( it = m_selectedItems.begin(), it_end = m_selectedItems.end(); - it != it_end; ++it ) + for( it = m_selectedItems.begin(), it_end = m_selectedItems.end(); it != it_end; ++it ) { BOX2I itemBox = (*it)->ViewBBox(); itemBox.Inflate( 500000 ); // Give some margin for gripping an item From a3a73426bf10f7bbf3b190b5d16a810da5631352 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 27 Sep 2013 18:51:21 +0200 Subject: [PATCH 378/415] Even more code comments and reformatting. --- common/geometry/shape_collisions.cpp | 98 ++++++------ common/tool/action_manager.cpp | 3 +- common/tool/context_menu.cpp | 14 +- common/tool/tool_dispatcher.cpp | 8 +- common/tool/tool_event.cpp | 9 +- common/tool/tool_manager.cpp | 95 +++++++---- include/geometry/seg.h | 125 +++++++-------- include/geometry/shape.h | 25 +-- include/geometry/shape_circle.h | 19 ++- include/geometry/shape_index.h | 31 ++-- include/geometry/shape_index_list.h | 165 ++++++++++---------- include/geometry/shape_rect.h | 46 +++--- include/tool/action_manager.h | 6 + include/tool/context_menu.h | 2 +- include/tool/coroutine.h | 2 +- include/tool/tool_action.h | 19 ++- include/tool/tool_dispatcher.h | 5 +- include/tool/tool_event.h | 9 ++ include/tool/tool_manager.h | 29 ++-- include/view/wx_view_controls.h | 9 +- {include/tool => pcbnew/tools}/item_state.h | 14 +- pcbnew/tools/move_tool.cpp | 6 +- pcbnew/tools/move_tool.h | 2 +- pcbnew/tools/selection_tool.cpp | 9 +- 24 files changed, 412 insertions(+), 338 deletions(-) rename {include/tool => pcbnew/tools}/item_state.h (99%) diff --git a/common/geometry/shape_collisions.cpp b/common/geometry/shape_collisions.cpp index b678e0faa2..f4391760b4 100644 --- a/common/geometry/shape_collisions.cpp +++ b/common/geometry/shape_collisions.cpp @@ -31,36 +31,36 @@ typedef VECTOR2I::extended_type ecoord; -static inline bool Collide( const SHAPE_CIRCLE& a, const SHAPE_CIRCLE& b, int clearance, - bool needMTV, VECTOR2I& aMTV ) +static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_CIRCLE& aB, int aClearance, + bool aNeedMTV, VECTOR2I& aMTV ) { - ecoord min_dist = clearance + a.GetRadius() + b.GetRadius(); + ecoord min_dist = aClearance + aA.GetRadius() + aB.GetRadius(); ecoord min_dist_sq = min_dist * min_dist; - const VECTOR2I delta = b.GetCenter() - a.GetCenter(); + const VECTOR2I delta = aB.GetCenter() - aA.GetCenter(); ecoord dist_sq = delta.SquaredEuclideanNorm(); if ( dist_sq >= min_dist_sq ) return false; - if ( needMTV ) + if ( aNeedMTV ) aMTV = delta.Resize( sqrt ( abs( min_dist_sq - dist_sq ) ) + 1 ); return true; } -static inline bool Collide( const SHAPE_RECT& a, const SHAPE_CIRCLE& b, int clearance, - bool needMTV, VECTOR2I& aMTV ) +static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_CIRCLE& aB, int aClearance, + bool aNeedMTV, VECTOR2I& aMTV ) { - const VECTOR2I c = b.GetCenter(); - const VECTOR2I p0 = a.GetPosition(); - const VECTOR2I size = a.GetSize(); - const ecoord r = b.GetRadius(); - const ecoord min_dist = clearance + r; + const VECTOR2I c = aB.GetCenter(); + const VECTOR2I p0 = aA.GetPosition(); + const VECTOR2I size = aA.GetSize(); + const ecoord r = aB.GetRadius(); + const ecoord min_dist = aClearance + r; const ecoord min_dist_sq = min_dist * min_dist; - if ( a.BBox( 0 ).Contains( c ) ) + if ( aA.BBox( 0 ).Contains( c ) ) return true; const VECTOR2I vts[] = { @@ -86,7 +86,7 @@ static inline bool Collide( const SHAPE_RECT& a, const SHAPE_CIRCLE& b, int cle if( dist_sq < min_dist_sq ) { - if( !needMTV ) + if( !aNeedMTV ) return true; else { @@ -102,7 +102,7 @@ static inline bool Collide( const SHAPE_RECT& a, const SHAPE_CIRCLE& b, int cle VECTOR2I delta = c - nearest; - if( !needMTV ) + if( !aNeedMTV ) return true; if( inside ) @@ -114,12 +114,12 @@ static inline bool Collide( const SHAPE_RECT& a, const SHAPE_CIRCLE& b, int cle } -static inline bool Collide( const SHAPE_CIRCLE& a, const SHAPE_LINE_CHAIN& b, int clearance, - bool needMTV, VECTOR2I& aMTV ) +static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_LINE_CHAIN& aB, int aClearance, + bool aNeedMTV, VECTOR2I& aMTV ) { - for( int s = 0; s < b.SegmentCount(); s++ ) + for( int s = 0; s < aB.SegmentCount(); s++ ) { - if ( a.Collide( b.CSegment( s ), clearance ) ) + if ( aA.Collide( aB.CSegment( s ), aClearance ) ) return true; } @@ -127,23 +127,23 @@ static inline bool Collide( const SHAPE_CIRCLE& a, const SHAPE_LINE_CHAIN& b, in } -static inline bool Collide( const SHAPE_LINE_CHAIN& a, const SHAPE_LINE_CHAIN& b, int clearance, - bool needMTV, VECTOR2I& aMTV ) +static inline bool Collide( const SHAPE_LINE_CHAIN& aA, const SHAPE_LINE_CHAIN& aB, int aClearance, + bool aNeedMTV, VECTOR2I& aMTV ) { - for( int i = 0; i < b.SegmentCount(); i++ ) - if( a.Collide( b.CSegment(i), clearance ) ) + for( int i = 0; i < aB.SegmentCount(); i++ ) + if( aA.Collide( aB.CSegment(i), aClearance ) ) return true; return false; } -static inline bool Collide( const SHAPE_RECT& a, const SHAPE_LINE_CHAIN& b, int clearance, - bool needMTV, VECTOR2I& aMTV ) +static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_LINE_CHAIN& aB, int aClearance, + bool aNeedMTV, VECTOR2I& aMTV ) { - for( int s = 0; s < b.SegmentCount(); s++ ) + for( int s = 0; s < aB.SegmentCount(); s++ ) { - SEG seg = b.CSegment( s ); - if( a.Collide( seg, clearance ) ) + SEG seg = aB.CSegment( s ); + if( aA.Collide( seg, aClearance ) ) return true; } @@ -151,58 +151,58 @@ static inline bool Collide( const SHAPE_RECT& a, const SHAPE_LINE_CHAIN& b, int } -bool CollideShapes( const SHAPE* a, const SHAPE* b, int clearance, bool needMTV, VECTOR2I& aMTV ) +bool CollideShapes( const SHAPE* aA, const SHAPE* aB, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) { - switch( a->Type() ) + switch( aA->Type() ) { case SH_RECT: - switch( b->Type() ) + switch( aB->Type() ) { case SH_CIRCLE: - return Collide( *static_cast( a ), - *static_cast( b ), clearance, needMTV, aMTV ); + return Collide( *static_cast( aA ), + *static_cast( aB ), aClearance, aNeedMTV, aMTV ); case SH_LINE_CHAIN: - return Collide( *static_cast( a ), - *static_cast( b ), clearance, needMTV, aMTV ); + return Collide( *static_cast( aA ), + *static_cast( aB ), aClearance, aNeedMTV, aMTV ); default: break; } case SH_CIRCLE: - switch( b->Type() ) + switch( aB->Type() ) { case SH_RECT: - return Collide( *static_cast( b ), - *static_cast( a ), clearance, needMTV, aMTV ); + return Collide( *static_cast( aB ), + *static_cast( aA ), aClearance, aNeedMTV, aMTV ); case SH_CIRCLE: - return Collide( *static_cast( a ), - *static_cast( b ), clearance, needMTV, aMTV ); + return Collide( *static_cast( aA ), + *static_cast( aB ), aClearance, aNeedMTV, aMTV ); case SH_LINE_CHAIN: - return Collide( *static_cast( a ), - *static_cast( b ), clearance, needMTV, aMTV ); + return Collide( *static_cast( aA ), + *static_cast( aB ), aClearance, aNeedMTV, aMTV ); default: break; } case SH_LINE_CHAIN: - switch( b->Type() ) + switch( aB->Type() ) { case SH_RECT: - return Collide( *static_cast( b ), - *static_cast( a ), clearance, needMTV, aMTV ); + return Collide( *static_cast( aB ), + *static_cast( aA ), aClearance, aNeedMTV, aMTV ); case SH_CIRCLE: - return Collide( *static_cast( b ), - *static_cast( a ), clearance, needMTV, aMTV ); + return Collide( *static_cast( aB ), + *static_cast( aA ), aClearance, aNeedMTV, aMTV ); case SH_LINE_CHAIN: - return Collide( *static_cast( a ), - *static_cast( b ), clearance, needMTV, aMTV ); + return Collide( *static_cast( aA ), + *static_cast( aB ), aClearance, aNeedMTV, aMTV ); default: break; diff --git a/common/tool/action_manager.cpp b/common/tool/action_manager.cpp index fcd5318852..78fbefd2da 100644 --- a/common/tool/action_manager.cpp +++ b/common/tool/action_manager.cpp @@ -99,6 +99,7 @@ bool ACTION_MANAGER::RunHotKey( int aHotKey ) const void ACTION_MANAGER::runAction( const TOOL_ACTION* aAction ) const { - TOOL_EVENT event = aAction->GetEvent(); + TOOL_EVENT event = aAction->MakeEvent(); + m_toolMgr->ProcessEvent( event ); } diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index d01bc3f0ef..96a877abf8 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -151,24 +151,28 @@ void CONTEXT_MENU::CMEventHandler::onEvent( wxEvent& aEvent ) TOOL_EVENT evt; wxEventType type = aEvent.GetEventType(); + // When the currently chosen item in the menu is changed, an update event is issued. + // For example, the selection tool can use this to dynamically highlight the current item + // from selection clarification popup. if( type == wxEVT_MENU_HIGHLIGHT ) evt = TOOL_EVENT( TC_Command, TA_ContextMenuUpdate, aEvent.GetId() ); + // One of menu entries was selected.. else if( type == wxEVT_COMMAND_MENU_SELECTED ) { - if( aEvent.GetId() > m_actionId ) + // Check if there is a TOOL_ACTION for the given ID + if( m_menu->m_toolActions.count( aEvent.GetId() ) == 1 ) { - // Handling TOOL_ACTIONs - if( m_menu->m_toolActions.count( aEvent.GetId() ) == 1 ) - evt = m_menu->m_toolActions[aEvent.GetId()]->GetEvent(); + evt = m_menu->m_toolActions[aEvent.GetId()]->MakeEvent(); } else { - // Handling common menu entries + // Handling non-action menu entries (e.g. items in clarification list) evt = TOOL_EVENT( TC_Command, TA_ContextMenuChoice, aEvent.GetId() ); } } + // forward the action/update event to the TOOL_MANAGER if( m_menu->m_tool ) m_menu->m_tool->GetManager()->ProcessEvent( evt ); } diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 09847b8518..9d2ad52482 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -39,6 +39,7 @@ using boost::optional; +///> Stores information about a mouse button state struct TOOL_DISPATCHER::ButtonState { ButtonState( TOOL_MouseButtons aButton, const wxEventType& aDownEvent, @@ -217,6 +218,8 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) type == wxEVT_LEFT_DOWN || type == wxEVT_LEFT_UP || type == wxEVT_MIDDLE_DOWN || type == wxEVT_MIDDLE_UP || type == wxEVT_RIGHT_DOWN || type == wxEVT_RIGHT_UP || + // Event issued whem mouse retains position in screen coordinates, + // but changes in world coordinates (eg. autopanning) type == KiGfx::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE ) { VECTOR2D screenPos = m_toolMgr->GetViewControls()->GetCursorPosition(); @@ -247,7 +250,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) if( type == wxEVT_KEY_UP ) { - if( key == WXK_ESCAPE ) + if( key == WXK_ESCAPE ) // ESC is the special key for cancelling tools evt = TOOL_EVENT( TC_Command, TA_CancelTool ); else evt = TOOL_EVENT( TC_Keyboard, TA_KeyUp, key | mods ); @@ -261,6 +264,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) if( evt ) m_toolMgr->ProcessEvent( *evt ); + // pass the event to the GUI, it might still be interested in it aEvent.Skip(); } @@ -270,6 +274,7 @@ void TOOL_DISPATCHER::DispatchWxCommand( const wxCommandEvent& aEvent ) bool activateTool = false; std::string toolName; + // fixme: use TOOL_ACTIONs here switch( aEvent.GetId() ) { case ID_PNS_ROUTER_TOOL: @@ -282,6 +287,7 @@ void TOOL_DISPATCHER::DispatchWxCommand( const wxCommandEvent& aEvent ) break; } + // do nothing if the legacy view is active if( activateTool && m_editFrame->IsGalCanvasActive() ) m_toolMgr->InvokeTool( toolName ); } diff --git a/common/tool/tool_event.cpp b/common/tool/tool_event.cpp index 00397f8ee4..2db95231d0 100644 --- a/common/tool/tool_event.cpp +++ b/common/tool/tool_event.cpp @@ -25,9 +25,8 @@ #include #include -//#include - #include +#include #include #include @@ -55,6 +54,12 @@ static const std::string flag2string( int flag, const FlagString* exps ) } +bool TOOL_EVENT::IsAction( const TOOL_ACTION* aAction ) const +{ + return Matches( aAction->MakeEvent() ); +} + + const std::string TOOL_EVENT::Format() const { std::string ev; diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 4e4985ad52..2350994b6b 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -3,6 +3,7 @@ * * Copyright (C) 2013 CERN * @author Tomasz Wlostowski + * @author Maciej Suminski * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -39,6 +40,7 @@ #include #include #include +#include #include #include @@ -46,37 +48,38 @@ using boost::optional; using namespace std; -/// Struct describing the current state of a TOOL +/// Struct describing the current execution state of a TOOL struct TOOL_MANAGER::TOOL_STATE { /// The tool itself TOOL_BASE* theTool; - /// Is the tool active or idle at the moment + /// Is the tool active (pending execution) or disabled at the moment bool idle; - /// Flag defining if the tool is waiting for any event + /// Flag defining if the tool is waiting for any event (i.e. if it + /// issued a Wait() call). bool pendingWait; - /// Is there a context menu to be displayed + /// Is there a context menu being displayed bool pendingContextMenu; - /// Context menu used by the tool + /// Context menu currently used by the tool CONTEXT_MENU* contextMenu; - /// Defines when a context menu is opened + /// Defines when the context menu is opened CONTEXT_MENU_TRIGGER contextMenuTrigger; - /// Coroutine launched upon an event trigger + /// Tool execution context COROUTINE* cofunc; - /// The event that triggered the coroutine + /// The event that triggered the execution/wakeup of the tool after Wait() call TOOL_EVENT wakeupEvent; - /// List of events that are triggering the coroutine + /// List of events the tool is currently waiting for TOOL_EVENT_LIST waitEvents; - /// List of possible transitions (ie. association of events and functions that are executed + /// List of possible transitions (ie. association of events and state handlers that are executed /// upon the event reception std::vector transitions; @@ -93,8 +96,9 @@ struct TOOL_MANAGER::TOOL_STATE TOOL_MANAGER::TOOL_MANAGER() : - m_actionMgr( this ), m_model( NULL ), m_view( NULL ) + m_model( NULL ), m_view( NULL ) { + m_actionMgr = new ACTION_MANAGER( this ); } @@ -108,6 +112,8 @@ TOOL_MANAGER::~TOOL_MANAGER() delete it->second; // delete TOOL_STATE delete it->first; // delete the tool itself } + + delete m_actionMgr; } @@ -154,7 +160,7 @@ bool TOOL_MANAGER::InvokeTool( TOOL_ID aToolId ) if( tool && tool->GetType() == TOOL_Interactive ) return invokeTool( tool ); - return false; + return false; // there is no tool with the given id } @@ -165,7 +171,19 @@ bool TOOL_MANAGER::InvokeTool( const std::string& aToolName ) if( tool && tool->GetType() == TOOL_Interactive ) return invokeTool( tool ); - return false; + return false; // there is no tool with the given name +} + + +void TOOL_MANAGER::RegisterAction( TOOL_ACTION* aAction ) +{ + m_actionMgr->RegisterAction( aAction ); +} + + +void TOOL_MANAGER::UnregisterAction( TOOL_ACTION* aAction ) +{ + m_actionMgr->UnregisterAction( aAction ); } @@ -187,7 +205,7 @@ bool TOOL_MANAGER::runTool( TOOL_ID aToolId ) if( tool && tool->GetType() == TOOL_Interactive ) return runTool( tool ); - return false; + return false; // there is no tool with the given id } @@ -198,7 +216,7 @@ bool TOOL_MANAGER::runTool( const std::string& aToolName ) if( tool && tool->GetType() == TOOL_Interactive ) return runTool( tool ); - return false; + return false; // there is no tool with the given name } @@ -260,8 +278,12 @@ optional TOOL_MANAGER::ScheduleWait( TOOL_BASE* aTool, { TOOL_STATE* st = m_toolState[aTool]; + // indicate to the manager that we are going to sleep and we shall be + // woken up when an event matching aConditions arrive st->pendingWait = true; st->waitEvents = aConditions; + + // switch context back to event dispatcher loop st->cofunc->Yield(); return st->wakeupEvent; @@ -300,7 +322,7 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) BOOST_FOREACH( TOOL_STATE* st, m_toolState | boost::adaptors::map_values ) { - // the tool state handler is waiting for events (i.e. called Wait() method) + // the tool scheduled next state(s) by calling Go() if( !st->pendingWait ) { // no state handler in progress - check if there are any transitions (defined by @@ -313,6 +335,7 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) { st->transitions.clear(); + // no tool context allocated yet? Create one. if( !st->cofunc ) st->cofunc = new COROUTINE( tr.second ); else @@ -322,7 +345,7 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) st->cofunc->Call( aEvent ); if( !st->cofunc->Running() ) - finishTool( st ); // The couroutine has finished + finishTool( st ); // The couroutine has finished immediately? } } } @@ -331,8 +354,27 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) } +bool TOOL_MANAGER::dispatchStandardEvents( TOOL_EVENT& aEvent ) +{ + if( aEvent.Action() == TA_KeyUp ) + { + // Check if there is a hotkey associated + if( m_actionMgr->RunHotKey( aEvent.Modifier() | aEvent.KeyCode() ) ) + return false; // hotkey event was handled so it does not go any further + } + else if( aEvent.Category() == TC_Command ) // it may be a tool activation event + { + dispatchActivation( aEvent ); + // do not return false, as the event has to go on to the destined tool + } + + return true; +} + + bool TOOL_MANAGER::dispatchActivation( TOOL_EVENT& aEvent ) { + // Look for the tool that has the same name as parameter in the processed command TOOL_EVENT BOOST_FOREACH( TOOL_STATE* st, m_toolState | boost::adaptors::map_values ) { if( st->theTool->GetName() == aEvent.m_commandStr ) @@ -359,7 +401,7 @@ void TOOL_MANAGER::finishTool( TOOL_STATE* aState ) if( it != m_activeTools.end() ) m_activeTools.erase( it ); else - wxLogWarning( wxT( "Tried to finish not active tool" ) ); + wxLogWarning( wxT( "Tried to finish inactive tool" ) ); aState->idle = true; delete aState->cofunc; @@ -371,22 +413,19 @@ bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) { // wxLogDebug( "event: %s", aEvent.Format().c_str() ); - if( aEvent.Action() == TA_KeyUp ) - { - // Check if there is a hotkey associated - if( m_actionMgr.RunHotKey( aEvent.Modifier() | aEvent.KeyCode() ) ) - return false; // hotkey event was handled so it does not go any further - } else if( aEvent.Category() == TC_Command ) // it may be a tool activation event - { - dispatchActivation( aEvent ); - } + // Early dispatch of events destined for the TOOL_MANAGER + if( !dispatchStandardEvents( aEvent ) ) + return false; dispatchInternal( aEvent ); + // popup menu handling BOOST_FOREACH( TOOL_ID toolId, m_activeTools ) { TOOL_STATE* st = m_toolIdIndex[toolId]; + // the tool requested a context menu. The menu is activated on RMB click (CMENU_BUTTON mode) + // or immediately (CMENU_NOW) mode. The latter is used for clarification lists. if( st->contextMenuTrigger != CMENU_OFF ) { if( st->contextMenuTrigger == CMENU_BUTTON && !aEvent.IsClick( MB_Right ) ) @@ -401,6 +440,7 @@ bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) boost::scoped_ptr menu( new CONTEXT_MENU( *st->contextMenu ) ); GetEditFrame()->PopupMenu( menu->GetMenu() ); + // TOOL_EVENT evt( TC_Command, TA_ContextMenuChoice ); dispatchInternal( evt ); @@ -426,6 +466,7 @@ void TOOL_MANAGER::ScheduleContextMenu( TOOL_BASE* aTool, CONTEXT_MENU* aMenu, st->contextMenu = aMenu; st->contextMenuTrigger = aTrigger; + // the tool wants the menu immediately? Preempt it and do so :) if( aTrigger == CMENU_NOW ) st->cofunc->Yield(); } diff --git a/include/geometry/seg.h b/include/geometry/seg.h index 7b5f64ac2f..c5a93dbe19 100644 --- a/include/geometry/seg.h +++ b/include/geometry/seg.h @@ -34,8 +34,8 @@ typedef boost::optional OPT_VECTOR2I; -class SEG { - +class SEG +{ private: typedef VECTOR2I::extended_type ecoord; @@ -52,7 +52,7 @@ class SEG { /** Default constructor * Creates an empty (0, 0) segment, locally-referenced */ - SEG(): a(m_a), b(m_b) + SEG() : a( m_a ), b( m_b ) { a = m_a; b = m_b; @@ -62,12 +62,12 @@ class SEG { /** * Constructor - * Creates a segment between (x1, y1) and (x2, y2), locally referenced + * Creates a segment between (aX1, aY1) and (aX2, aY2), locally referenced */ - SEG ( int x1, int y1, int x2, int y2 ) : a(m_a), b(m_b) + SEG( int aX1, int aY1, int aX2, int aY2 ) : a( m_a ), b( m_b ) { - m_a = VECTOR2I(x1, y1); - m_b = VECTOR2I(x2, y2); + m_a = VECTOR2I( aX1, aY1 ); + m_b = VECTOR2I( aX2, aY2 ); a = m_a; b = m_b; m_is_local = true; @@ -78,7 +78,7 @@ class SEG { * Constructor * Creates a segment between (aA) and (aB), locally referenced */ - SEG ( const VECTOR2I& aA, const VECTOR2I& aB ): a(m_a), b(m_b), m_a(aA), m_b(aB) + SEG( const VECTOR2I& aA, const VECTOR2I& aB ) : a( m_a ), b( m_b ), m_a( aA ), m_b( aB ) { a = m_a; b = m_b; @@ -93,7 +93,7 @@ class SEG { * @param aB reference to the end point in the parent shape * @param aIndex index of the segment within the parent shape */ - SEG ( VECTOR2I& aA, VECTOR2I& aB, int aIndex ): a(aA), b(aB) + SEG ( VECTOR2I& aA, VECTOR2I& aB, int aIndex ) : a( aA ), b( aB ) { m_is_local = false; m_index = aIndex; @@ -102,32 +102,32 @@ class SEG { /** * Copy constructor */ - SEG ( const SEG& seg ): a(m_a), b(m_b) + SEG ( const SEG& aSeg ) : a( m_a ), b( m_b ) { - if (seg.m_is_local) + if (aSeg.m_is_local) { - m_a = seg.m_a; - m_b = seg.m_b; + m_a = aSeg.m_a; + m_b = aSeg.m_b; a = m_a; b = m_b; m_is_local = true; m_index = -1; } else { - a = seg.a; - b = seg.b; - m_index = seg.m_index; + a = aSeg.a; + b = aSeg.b; + m_index = aSeg.m_index; m_is_local = false; } } - SEG& operator=(const SEG& seg) + SEG& operator=( const SEG& aSeg ) { - a = seg.a; - b = seg.b; - m_a = seg.m_a; - m_b = seg.m_b; - m_index = seg.m_index; - m_is_local = seg.m_is_local; + a = aSeg.a; + b = aSeg.b; + m_a = aSeg.m_a; + m_b = aSeg.m_b; + m_index = aSeg.m_index; + m_is_local = aSeg.m_is_local; return *this; } @@ -150,8 +150,9 @@ class SEG { */ int Side( const VECTOR2I& aP ) const { - const ecoord det = (b - a).Cross(aP - a); - return det < 0 ? -1 : (det > 0 ? 1 : 0); + const ecoord det = ( b - a ).Cross( aP - a ); + + return det < 0 ? -1 : ( det > 0 ? 1 : 0 ); } /** @@ -173,7 +174,6 @@ class SEG { */ const VECTOR2I NearestPoint( const VECTOR2I &aP ) const; - /** * Function Intersect() * @@ -186,8 +186,6 @@ class SEG { */ OPT_VECTOR2I Intersect( const SEG& aSeg, bool aIgnoreEndpoints = false, bool aLines = false ) const; - - /** * Function IntersectLines() * @@ -195,9 +193,9 @@ class SEG { * @param aSeg segment defining the line to intersect with * @return intersection point, if exists */ - OPT_VECTOR2I IntersectLines( const SEG& aSeg ) const + OPT_VECTOR2I IntersectLines( const SEG& aSeg ) const { - return Intersect ( aSeg, false, true ); + return Intersect( aSeg, false, true ); } bool Collide( const SEG& aSeg, int aClearance ) const; @@ -210,14 +208,13 @@ class SEG { * @return minimum distance */ - ecoord SquaredDistance( const SEG& aSeg ) const ; + ecoord SquaredDistance( const SEG& aSeg ) const; int Distance( const SEG& aSeg ) const { - return sqrt ( SquaredDistance(aSeg) ); + return sqrt( SquaredDistance( aSeg ) ); } - /** * Function Distance() * @@ -225,18 +222,16 @@ class SEG { * @param aP the point * @return minimum distance */ - ecoord SquaredDistance( const VECTOR2I& aP ) const { - return (NearestPoint(aP) - aP).SquaredEuclideanNorm(); + return ( NearestPoint( aP ) - aP ).SquaredEuclideanNorm(); } int Distance( const VECTOR2I& aP ) const { - return sqrt ( SquaredDistance( aP) ); + return sqrt( SquaredDistance( aP ) ); } - /** * Function Collinear() * @@ -244,7 +239,6 @@ class SEG { * @param aSeg the segment to chech colinearity with * @return true, when segments are collinear. */ - bool Collinear( const SEG& aSeg ) const { ecoord qa1 = a.y - b.y; @@ -254,7 +248,7 @@ class SEG { ecoord qb2 = aSeg.b.x - aSeg.a.x; ecoord qc2 = -qa2 * aSeg.a.x - qb2 * aSeg.a.y; - return (qa1 == qa2) && (qb1 == qb2) && (qc1 == qc2); + return ( qa1 == qa2 ) && ( qb1 == qb2 ) && ( qc1 == qc2 ); } /** @@ -265,15 +259,14 @@ class SEG { */ int Length() const { - return (a - b).EuclideanNorm(); + return ( a - b ).EuclideanNorm(); } - ecoord SquaredLength() const + ecoord SquaredLength() const { - return (a - b).SquaredEuclideanNorm(); + return ( a - b ).SquaredEuclideanNorm(); } - /** * Function Index() * @@ -285,20 +278,20 @@ class SEG { return m_index; } + bool Contains( const VECTOR2I& aP ) const; - bool Contains(const VECTOR2I& aP) const; - - bool PointCloserThan ( const VECTOR2I& aP, int dist) const; + bool PointCloserThan( const VECTOR2I& aP, int aDist ) const; // friend std::ostream& operator<<( std::ostream& stream, const SEG& aSeg ); private: - - bool ccw ( const VECTOR2I& a, const VECTOR2I& b, const VECTOR2I &c ) const; + bool ccw( const VECTOR2I& aA, const VECTOR2I& aB, const VECTOR2I &aC ) const; ///> locally stored start/end coordinates (used when m_is_local == true) VECTOR2I m_a, m_b; + ///> index withing the parent shape (used when m_is_local == false) int m_index; + ///> locality flag bool m_is_local; }; @@ -306,49 +299,47 @@ class SEG { inline VECTOR2I SEG::LineProject( const VECTOR2I& aP ) const { // fixme: numerical errors for large integers - assert(false); - return VECTOR2I(0, 0); + assert( false ); + return VECTOR2I( 0, 0 ); } - - inline int SEG::LineDistance( const VECTOR2I& aP, bool aDetermineSide ) const { - ecoord p = a.y - b.y; - ecoord q = b.x - a.x; - ecoord r = -p * a.x - q * a.y; + ecoord p = a.y - b.y; + ecoord q = b.x - a.x; + ecoord r = -p * a.x - q * a.y; - ecoord dist = ( p * aP.x + q * aP.y + r ) / sqrt( p * p + q * q ); - return aDetermineSide ? dist : abs(dist); + ecoord dist = ( p * aP.x + q * aP.y + r ) / sqrt( p * p + q * q ); + + return aDetermineSide ? dist : abs( dist ); } - - -inline const VECTOR2I SEG::NearestPoint(const VECTOR2I& aP) const +inline const VECTOR2I SEG::NearestPoint( const VECTOR2I& aP ) const { - VECTOR2I d = b - a; - ecoord l_squared = d.Dot(d); + VECTOR2I d = b - a; + ecoord l_squared = d.Dot( d ); if( l_squared == 0 ) return a; - ecoord t = d.Dot(aP - a); + ecoord t = d.Dot( aP - a ); if( t < 0 ) return a; else if( t > l_squared ) return b; - int xp = rescale(t, (ecoord)d.x, l_squared); - int yp = rescale(t, (ecoord)d.y, l_squared); + int xp = rescale( t, (ecoord)d.x, l_squared ); + int yp = rescale( t, (ecoord)d.y, l_squared ); - return a + VECTOR2I(xp, yp); + return a + VECTOR2I( xp, yp ); } inline std::ostream& operator<<( std::ostream& aStream, const SEG& aSeg ) { - if(aSeg.m_is_local) + if( aSeg.m_is_local ) aStream << "[ local " << aSeg.a << " - " << aSeg.b << " ]"; + return aStream; } diff --git a/include/geometry/shape.h b/include/geometry/shape.h index 18895553ef..2a42659c20 100644 --- a/include/geometry/shape.h +++ b/include/geometry/shape.h @@ -45,7 +45,7 @@ enum ShapeType { /** * Class SHAPE * - * Represents an abstract shape on 2D plane. All SHAPEs implement SHAPE interface. + * Represents an abstract shape on 2D plane. */ class SHAPE { protected: @@ -58,7 +58,7 @@ class SHAPE { * Creates an empty shape of type aType */ - SHAPE ( ShapeType aType ): m_type( aType ) { }; + SHAPE ( ShapeType aType ) : m_type( aType ) { }; // Destructor virtual ~SHAPE() {}; @@ -78,7 +78,7 @@ class SHAPE { * @retval copy of the shape */ virtual SHAPE* Clone() const { - assert(false); + assert( false ); return NULL; }; @@ -89,9 +89,9 @@ class SHAPE { * a collision. * @return true, if there is a collision. */ - virtual bool Collide ( const VECTOR2I& aP, int aClearance = 0 ) const + virtual bool Collide( const VECTOR2I& aP, int aClearance = 0 ) const { - return Collide(SEG(aP, aP), aClearance); + return Collide( SEG( aP, aP ), aClearance ); } /** @@ -99,10 +99,13 @@ class SHAPE { * * Checks if the boundary of shape (this) lies closer to the shape aShape than aClearance, indicating * a collision. + * @param aShape shape to check collision against + * @param aClearance minimum clearance + * @param aMTV minimum translation vector * @return true, if there is a collision. */ - virtual bool Collide ( const SHAPE *aShape, int aClerance, VECTOR2I& aMTV ) const; - virtual bool Collide ( const SHAPE *aShape, int aClerance = 0 ) const; + virtual bool Collide( const SHAPE* aShape, int aClerance, VECTOR2I& aMTV ) const; + virtual bool Collide( const SHAPE* aShape, int aClerance = 0 ) const; /** * Function Collide() * @@ -110,7 +113,7 @@ class SHAPE { * a collision. * @return true, if there is a collision. */ - virtual bool Collide ( const SEG& aSeg, int aClearance = 0) const = 0; + virtual bool Collide( const SEG& aSeg, int aClearance = 0 ) const = 0; /** * Function Collide() @@ -120,7 +123,7 @@ class SHAPE { * @aClearance how much the bounding box is expanded wrs to the minimum enclosing rectangle for the shape. * @return the bounding box. */ - virtual const BOX2I BBox ( int aClearance = 0 ) const = 0; + virtual const BOX2I BBox( int aClearance = 0 ) const = 0; /** * Function Centre() @@ -130,7 +133,7 @@ class SHAPE { */ virtual VECTOR2I Centre() const { - return BBox(0).Centre(); // if nothing better is available.... + return BBox( 0 ).Centre(); // if nothing better is available.... } private: @@ -139,6 +142,6 @@ class SHAPE { }; -bool CollideShapes ( const SHAPE *a, const SHAPE *b, int clearance, bool needMTV, VECTOR2I& aMTV ); +bool CollideShapes( const SHAPE *aA, const SHAPE *aB, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ); #endif // __SHAPE_H diff --git a/include/geometry/shape_circle.h b/include/geometry/shape_circle.h index 3e5a7ba89b..d6732a0c64 100644 --- a/include/geometry/shape_circle.h +++ b/include/geometry/shape_circle.h @@ -31,32 +31,31 @@ class SHAPE_CIRCLE : public SHAPE { public: SHAPE_CIRCLE(): - SHAPE( SH_CIRCLE ), m_radius (0) {}; + SHAPE( SH_CIRCLE ), m_radius( 0 ) {}; SHAPE_CIRCLE( const VECTOR2I& aCenter, int aRadius ): - SHAPE( SH_CIRCLE ), m_radius (aRadius), m_center(aCenter) {}; + SHAPE( SH_CIRCLE ), m_radius( aRadius ), m_center( aCenter ) {}; ~SHAPE_CIRCLE() {}; - const BOX2I BBox(int aClearance = 0) const + const BOX2I BBox( int aClearance = 0 ) const { - const VECTOR2I rc (m_radius + aClearance, m_radius + aClearance); - return BOX2I (m_center - rc, rc * 2); + const VECTOR2I rc( m_radius + aClearance, m_radius + aClearance ); + return BOX2I( m_center - rc, rc * 2 ); } - - bool Collide(const SEG& aSeg, int aClearance = 0) const + bool Collide( const SEG& aSeg, int aClearance = 0 ) const { int rc = aClearance + m_radius; - return aSeg.Distance(m_center) <= rc; + return aSeg.Distance( m_center ) <= rc; } - void SetRadius(int aRadius) + void SetRadius( int aRadius ) { m_radius = aRadius; } - void SetCenter (const VECTOR2I& aCenter) + void SetCenter( const VECTOR2I& aCenter ) { m_center = aCenter; } diff --git a/include/geometry/shape_index.h b/include/geometry/shape_index.h index 578c237685..956829ae87 100644 --- a/include/geometry/shape_index.h +++ b/include/geometry/shape_index.h @@ -62,9 +62,9 @@ const SHAPE* shapeFunctor( SHAPE* aItem ); * @return a BOX2I object containing the bounding box of the T object. */ template -BOX2I boundingBox( T object ) +BOX2I boundingBox( T aObject ) { - return shapeFunctor(object)->BBox(); + return shapeFunctor( aObject )->BBox(); } /** @@ -77,9 +77,9 @@ BOX2I boundingBox( T object ) * @param visitor V visitor object */ template -void acceptVisitor( T object, V visitor ) +void acceptVisitor( T aObject, V aVisitor ) { - visitor(object); + aVisitor( aObject ); } /** @@ -94,22 +94,23 @@ void acceptVisitor( T object, V visitor ) * @return if object and anotherObject collide */ template -bool collide( T object, U anotherObject, int minDistance ) +bool collide( T aObject, U aAnotherObject, int aMinDistance ) { - return shapeFunctor( object )->Collide( anotherObject, minDistance ); + return shapeFunctor( aObject )->Collide( aAnotherObject, aMinDistance ); } template -bool queryCallback(T shape, void* context) +bool queryCallback( T aShape, void* aContext ) { - V* visitor = (V*) context; - acceptVisitor( shape, *visitor ); + V* visitor = (V*) aContext; + acceptVisitor( aShape, *visitor ); return true; } template -class SHAPE_INDEX { +class SHAPE_INDEX +{ public: class Iterator { @@ -123,9 +124,9 @@ class SHAPE_INDEX { * Setup the internal tree iterator. * @param tree pointer to a RTREE object */ - void Init( RTree* tree ) + void Init( RTree* aTree ) { - tree->GetFirst( iterator ); + aTree->GetFirst( iterator ); } public: @@ -135,9 +136,9 @@ class SHAPE_INDEX { * Creates an iterator for the index object * @param index SHAPE_INDEX object to iterate */ - Iterator( SHAPE_INDEX* index ) + Iterator( SHAPE_INDEX* aIndex ) { - Init( index->m_tree ); + Init( aIndex->m_tree ); } /** @@ -321,7 +322,7 @@ void SHAPE_INDEX::Add( T aShape ) } template -void SHAPE_INDEX::Remove(T aShape) +void SHAPE_INDEX::Remove( T aShape ) { BOX2I box = boundingBox( aShape ); int min[2] = { box.GetX(), box.GetY() }; diff --git a/include/geometry/shape_index_list.h b/include/geometry/shape_index_list.h index 47c5d98c97..fc210f80a6 100644 --- a/include/geometry/shape_index_list.h +++ b/include/geometry/shape_index_list.h @@ -27,30 +27,29 @@ #include -template const SHAPE *defaultShapeFunctor( const T aItem ) +template const SHAPE* defaultShapeFunctor( const T aItem ) { return aItem->GetShape(); } -template > +template > class SHAPE_INDEX_LIST { struct ShapeEntry { - ShapeEntry(T aParent) + ShapeEntry( T aParent ) { - shape = ShapeFunctor(aParent); - bbox = shape->BBox(0); + shape = ShapeFunctor( aParent ); + bbox = shape->BBox( 0 ); parent = aParent; } ~ShapeEntry() { - } T parent; - const SHAPE *shape; + const SHAPE* shape; BOX2I bbox; }; @@ -58,18 +57,16 @@ class SHAPE_INDEX_LIST { typedef typename std::vector::iterator ShapeVecIter; public: - -// "Normal" iterator interface, for STL algorithms. + // "Normal" iterator interface, for STL algorithms. class iterator { - public: iterator() {}; - iterator( ShapeVecIter aCurrent) - : m_current(aCurrent) {}; + iterator( ShapeVecIter aCurrent ) + : m_current( aCurrent ) {}; - iterator(const iterator &b) : - m_current(b.m_current) {}; + iterator( const iterator &aB ) : + m_current( aB.m_current ) {}; T operator*() const { @@ -81,25 +78,25 @@ public: ++m_current; } - iterator& operator++(int dummy) + iterator& operator++( int aDummy ) { ++m_current; return *this; } - bool operator ==( const iterator& rhs ) const + bool operator==( const iterator& aRhs ) const { - return m_current == rhs.m_current; + return m_current == aRhs.m_current; } - bool operator !=( const iterator& rhs ) const + bool operator!=( const iterator& aRhs ) const { - return m_current != rhs.m_current; + return m_current != aRhs.m_current; } - const iterator& operator=(const iterator& rhs) + const iterator& operator=( const iterator& aRhs ) { - m_current = rhs.m_current; + m_current = aRhs.m_current; return *this; } @@ -107,40 +104,37 @@ public: ShapeVecIter m_current; }; -// "Query" iterator, for iterating over a set of spatially matching shapes. + // "Query" iterator, for iterating over a set of spatially matching shapes. class query_iterator { public: - query_iterator() { - } - query_iterator( ShapeVecIter aCurrent, ShapeVecIter aEnd, SHAPE *aShape, int aMinDistance, bool aExact) - : m_end(aEnd), - m_current(aCurrent), - m_shape(aShape), - m_minDistance(aMinDistance), - m_exact(aExact) + query_iterator( ShapeVecIter aCurrent, ShapeVecIter aEnd, SHAPE* aShape, + int aMinDistance, bool aExact ) : + m_end( aEnd ), + m_current( aCurrent ), + m_shape( aShape ), + m_minDistance( aMinDistance ), + m_exact( aExact ) { - if(aShape) + if( aShape ) { m_refBBox = aShape->BBox(); next(); } } - query_iterator(const query_iterator &b) - : m_end(b.m_end), - m_current(b.m_current), - m_shape(b.m_shape), - m_minDistance(b.m_minDistance), - m_exact(b.m_exact), - m_refBBox(b.m_refBBox) + query_iterator( const query_iterator &aB ) : + m_end( aB.m_end ), + m_current( aB.m_current ), + m_shape( aB.m_shape ), + m_minDistance( aB.m_minDistance ), + m_exact( aB.m_exact ), + m_refBBox( aB.m_refBBox ) { - } - T operator*() const { @@ -154,45 +148,45 @@ public: return *this; } - query_iterator& operator++(int dummy) + query_iterator& operator++( int aDummy ) { ++m_current; next(); return *this; } - bool operator ==( const query_iterator& rhs ) const + bool operator==( const query_iterator& aRhs ) const { - return m_current == rhs.m_current; + return m_current == aRhs.m_current; } - bool operator !=( const query_iterator& rhs ) const + bool operator!=( const query_iterator& aRhs ) const { - return m_current != rhs.m_current; + return m_current != aRhs.m_current; } - const query_iterator& operator=(const query_iterator& rhs) + const query_iterator& operator=( const query_iterator& aRhs ) { - m_end = rhs.m_end; - m_current = rhs.m_current; - m_shape = rhs.m_shape; - m_minDistance = rhs.m_minDistance; - m_exact = rhs.m_exact; - m_refBBox = rhs.m_refBBox; + m_end = aRhs.m_end; + m_current = aRhs.m_current; + m_shape = aRhs.m_shape; + m_minDistance = aRhs.m_minDistance; + m_exact = aRhs.m_exact; + m_refBBox = aRhs.m_refBBox; return *this; } private: - void next() { - while(m_current != m_end) + while( m_current != m_end ) { - if (m_refBBox.Distance(m_current->bbox) <= m_minDistance) + if( m_refBBox.Distance( m_current->bbox ) <= m_minDistance ) { - if(!m_exact || m_current->shape->Collide(m_shape, m_minDistance)) + if( !m_exact || m_current->shape->Collide( m_shape, m_minDistance ) ) return; } + ++m_current; } } @@ -205,27 +199,27 @@ public: int m_minDistance; }; - void Add(T aItem) + void Add( T aItem ) { - ShapeEntry s (aItem); + ShapeEntry s( aItem ); m_shapes.push_back(s); } - void Remove(const T aItem) + void Remove( const T aItem ) { ShapeVecIter i; - for(i=m_shapes.begin(); i!=m_shapes.end();++i) + for( i = m_shapes.begin(); i != m_shapes.end(); ++i ) { - if(i->parent == aItem) + if( i->parent == aItem ) break; } - if(i == m_shapes.end()) + if( i == m_shapes.end() ) return; - m_shapes.erase(i); + m_shapes.erase( i ); } int Size() const @@ -234,37 +228,37 @@ public: } template - int Query( const SHAPE *aShape, int aMinDistance, Visitor &v, bool aExact = true) //const - { - ShapeVecIter i; - int n = 0; - VECTOR2I::extended_type minDistSq = (VECTOR2I::extended_type) aMinDistance * aMinDistance; + int Query( const SHAPE *aShape, int aMinDistance, Visitor &aV, bool aExact = true ) //const + { + ShapeVecIter i; + int n = 0; + VECTOR2I::extended_type minDistSq = (VECTOR2I::extended_type) aMinDistance * aMinDistance; - BOX2I refBBox = aShape->BBox(); + BOX2I refBBox = aShape->BBox(); - for(i = m_shapes.begin(); i!=m_shapes.end(); ++i) - { - if (refBBox.SquaredDistance(i->bbox) <= minDistSq) - { - if(!aExact || i->shape->Collide(aShape, aMinDistance)) - { - n++; - if(!v( i->parent )) - return n; - } - } - } - return n; - } + for( i = m_shapes.begin(); i != m_shapes.end(); ++i ) + { + if( refBBox.SquaredDistance( i->bbox ) <= minDistSq ) + { + if( !aExact || i->shape->Collide( aShape, aMinDistance ) ) + { + n++; + if( !aV( i->parent ) ) + return n; + } + } + } + return n; + } void Clear() { m_shapes.clear(); } - query_iterator qbegin( SHAPE *aShape, int aMinDistance, bool aExact ) + query_iterator qbegin( SHAPE* aShape, int aMinDistance, bool aExact ) { - return query_iterator( m_shapes.begin(), m_shapes.end(), aShape, aMinDistance, aExact); + return query_iterator( m_shapes.begin(), m_shapes.end(), aShape, aMinDistance, aExact ); } const query_iterator qend() @@ -283,7 +277,6 @@ public: } private: - ShapeVec m_shapes; }; diff --git a/include/geometry/shape_rect.h b/include/geometry/shape_rect.h index eee04ae956..6784d6b27e 100644 --- a/include/geometry/shape_rect.h +++ b/include/geometry/shape_rect.h @@ -36,28 +36,28 @@ class SHAPE_RECT : public SHAPE { * Constructor * Creates an empty (0-sized) rectangle */ - SHAPE_RECT(): - SHAPE( SH_RECT ), m_w (0), m_h(0) {}; + SHAPE_RECT() : + SHAPE( SH_RECT ), m_w( 0 ), m_h( 0 ) {}; /** * Constructor - * Creates a rectangle defined by top-left corner (x0, y0), width w and height h. + * Creates a rectangle defined by top-left corner (aX0, aY0), width aW and height aH. */ - SHAPE_RECT( int x0, int y0, int w, int h ): - SHAPE(SH_RECT), m_p0(x0, y0), m_w(w), m_h(h) {}; + SHAPE_RECT( int aX0, int aY0, int aW, int aH ) : + SHAPE( SH_RECT ), m_p0( aX0, aY0 ), m_w( aW ), m_h( aH ) {}; /** * Constructor - * Creates a rectangle defined by top-left corner p0, width w and height h. + * Creates a rectangle defined by top-left corner aP0, width aW and height aH. */ - SHAPE_RECT( const VECTOR2I &p0, int w, int h ): - SHAPE(SH_RECT), m_p0(p0), m_w(w), m_h(h) {}; + SHAPE_RECT( const VECTOR2I &aP0, int aW, int aH ) : + SHAPE( SH_RECT ), m_p0( aP0 ), m_w( aW ), m_h( aH ) {}; /// @copydoc SHAPE::BBox() const BOX2I BBox(int aClearance = 0) const { - BOX2I bbox( VECTOR2I (m_p0.x - aClearance, m_p0.y - aClearance ), - VECTOR2I (m_w + 2 * aClearance, m_h + 2 * aClearance )); + BOX2I bbox( VECTOR2I( m_p0.x - aClearance, m_p0.y - aClearance ), + VECTOR2I( m_w + 2 * aClearance, m_h + 2 * aClearance ) ); //printf("bb : %s\n",bbox.Format().c_str()); return bbox; } @@ -70,11 +70,11 @@ class SHAPE_RECT : public SHAPE { */ int Diagonal() const { - return VECTOR2I(m_w, m_h).EuclideanNorm(); + return VECTOR2I( m_w, m_h ).EuclideanNorm(); } /// @copydoc SHAPE::Collide() - bool Collide(const SEG& aSeg, int aClearance = 0) const + bool Collide( const SEG& aSeg, int aClearance = 0 ) const { //VECTOR2I pmin = VECTOR2I(std::min(aSeg.a.x, aSeg.b.x), std::min(aSeg.a.y, aSeg.b.y)); //VECTOR2I pmax = VECTOR2I(std::max(aSeg.a.x, aSeg.b.x), std::max(aSeg.a.y, aSeg.b.y)); @@ -83,19 +83,19 @@ class SHAPE_RECT : public SHAPE { //if (BBox(0).SquaredDistance(r) > aClearance * aClearance) // return false; - if(BBox(0).Contains(aSeg.a) || BBox(0).Contains(aSeg.b)) + if( BBox( 0 ).Contains( aSeg.a ) || BBox( 0 ).Contains( aSeg.b ) ) return true; - VECTOR2I vts[] = { VECTOR2I(m_p0.x, m_p0.y), - VECTOR2I(m_p0.x, m_p0.y + m_h), - VECTOR2I(m_p0.x + m_w, m_p0.y + m_h), - VECTOR2I(m_p0.x + m_w, m_p0.y), - VECTOR2I(m_p0.x, m_p0.y) }; + VECTOR2I vts[] = { VECTOR2I( m_p0.x, m_p0.y ), + VECTOR2I( m_p0.x, m_p0.y + m_h ), + VECTOR2I( m_p0.x + m_w, m_p0.y + m_h ), + VECTOR2I( m_p0.x + m_w, m_p0.y ), + VECTOR2I( m_p0.x, m_p0.y ) }; - for (int i = 0; i < 4; i++) + for( int i = 0; i < 4; i++ ) { - SEG s(vts[i], vts[i+1], i); - if(s.Distance(aSeg) <= aClearance) + SEG s( vts[i], vts[i + 1], i ); + if( s.Distance( aSeg ) <= aClearance ) return true; } @@ -114,7 +114,7 @@ class SHAPE_RECT : public SHAPE { * * @return size of the rectangle */ - const VECTOR2I GetSize() const { return VECTOR2I(m_w, m_h); } + const VECTOR2I GetSize() const { return VECTOR2I( m_w, m_h ); } /** * Function GetWidth() @@ -133,8 +133,10 @@ class SHAPE_RECT : public SHAPE { private: ///> Top-left corner VECTOR2I m_p0; + ///> Width int m_w; + ///> Height int m_h; }; diff --git a/include/tool/action_manager.h b/include/tool/action_manager.h index 9f54c1f305..6d2a408a8a 100644 --- a/include/tool/action_manager.h +++ b/include/tool/action_manager.h @@ -32,6 +32,12 @@ class TOOL_BASE; class TOOL_MANAGER; class TOOL_ACTION; +/** + * Class ACTION_MANAGER + * + * Takes care of TOOL_ACTION objects. Registers them and allows to run them using associated + * hot keys, names or ids. + */ class ACTION_MANAGER { public: diff --git a/include/tool/context_menu.h b/include/tool/context_menu.h index d4d5e2b532..c707088be2 100644 --- a/include/tool/context_menu.h +++ b/include/tool/context_menu.h @@ -140,7 +140,7 @@ private: /// Menu items with ID higher than that are considered TOOL_ACTIONs static const int m_actionId = 10000; - /// Stores tool actions that are choosable from the menu. Does not take the ownership. + /// Associates tool actions with menu item IDs. Non-owning. std::map m_toolActions; }; diff --git a/include/tool/coroutine.h b/include/tool/coroutine.h index f38029a9c8..8a398685b2 100644 --- a/include/tool/coroutine.h +++ b/include/tool/coroutine.h @@ -181,7 +181,7 @@ public: } private: - static const int c_defaultStackSize = 2000000; + static const int c_defaultStackSize = 2000000; // fixme: make configurable /* real entry point of the coroutine */ static void callerStub( intptr_t data ) diff --git a/include/tool/tool_action.h b/include/tool/tool_action.h index cc1559983d..10ca6f6c6e 100644 --- a/include/tool/tool_action.h +++ b/include/tool/tool_action.h @@ -3,6 +3,7 @@ * * Copyright (C) 2013 CERN * @author Tomasz Wlostowski + * @author Maciej Suminski * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -31,10 +32,16 @@ #include #include -// TOOL_ACTION - represents a single action. For instance: -// - changing layer to top by pressing PgUp -// - running the DRC from the menu -// and so on, and so forth.... +/** + * Class TOOL_ACTION + * + * Represents a single user action. For instance: + * - changing layer to top by pressing PgUp + * - running the DRC from the menu + * and so on, and so forth.... + * Action class groups all necessary properties of an action, including explanation, + * icons, hotkeys,.menu items, etc. + */ class TOOL_ACTION { public: @@ -133,13 +140,13 @@ public: } /** - * Function GetEvent() + * Function MakeEvent() * Returns the event associated with the action (ie. the event that will be sent after * activating the action). * * @return The event associated with the action. */ - TOOL_EVENT GetEvent() const + TOOL_EVENT MakeEvent() const { return TOOL_EVENT( TC_Command, TA_Action, m_name, m_scope ); } diff --git a/include/tool/tool_dispatcher.h b/include/tool/tool_dispatcher.h index ac298226ae..15c0b73eb4 100644 --- a/include/tool/tool_dispatcher.h +++ b/include/tool/tool_dispatcher.h @@ -42,10 +42,10 @@ namespace KiGfx { * Class TOOL_DISPATCHER * * - takes wx events, - * - fixes all wx quirks (mouse warping, etc) + * - fixes all wx quirks (mouse warping, panning, ordering problems, etc) * - translates coordinates to world space * - low-level input conditioning (drag/click threshold), updating mouse position during view auto-scroll/pan. - * - issues TOOL_EVENTS to the manager + * - issues TOOL_EVENTS to the tool manager */ class TOOL_DISPATCHER @@ -100,6 +100,7 @@ private: ///> Saves the state of key modifiers (Alt, Ctrl and so on). int decodeModifiers( const wxKeyboardState* aState ) const; + ///> Stores all the informations regarding a mouse button state. struct ButtonState; diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index 609b72326a..434156d343 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -33,6 +33,7 @@ #include +class TOOL_ACTION; class TOOL_MANAGER; /** @@ -313,6 +314,14 @@ public: return true; } + /** + * Function IsAction() + * Tests if the event contains an action issued upon activation of the given TOOL_ACTION. + * @param aAction is the TOOL_ACTION to be checked against. + * @return True if it matches the given TOOL_ACTION. + */ + bool IsAction( const TOOL_ACTION* aAction ) const; + boost::optional GetCommandId() { return m_commandId; diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index eac8371268..ace86ee5eb 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -3,6 +3,7 @@ * * Copyright (C) 2013 CERN * @author Tomasz Wlostowski + * @author Maciej Suminski * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -30,11 +31,10 @@ #include -#include #include -#include class TOOL_BASE; +class ACTION_MANAGER; class CONTEXT_MENU; class wxWindow; @@ -89,10 +89,7 @@ public: * * @param aAction is the action to be registered. */ - void RegisterAction( TOOL_ACTION* aAction ) - { - m_actionMgr.RegisterAction( aAction ); - } + void RegisterAction( TOOL_ACTION* aAction ); /** * Function UnregisterAction() @@ -100,10 +97,7 @@ public: * * @param aAction is the action to be unregistered. */ - void UnregisterAction( TOOL_ACTION* aAction ) - { - m_actionMgr.UnregisterAction( aAction ); - } + void UnregisterAction( TOOL_ACTION* aAction ); /** * Function FindTool() @@ -205,6 +199,14 @@ private: void dispatchInternal( TOOL_EVENT& aEvent ); + /** + * Function dispatchStandardEvents() + * Handles specific events, that are intended for TOOL_MANAGER rather than tools. + * @aEvent is the event to be processed. + * @return False if the event was processed and should not go any further. + */ + bool dispatchStandardEvents( TOOL_EVENT& aEvent ); + /** * Function dispatchActivation() * Checks if it is a valid activation event and invokes a proper tool. @@ -215,7 +217,8 @@ private: /** * Function invokeTool() - * Invokes a tool by sending a proper event. + * Invokes a tool by sending a proper event (in contrary to runTool, which makes the tool run + * for real). * @param aTool is the tool to be invoked. */ bool invokeTool( TOOL_BASE* aTool ); @@ -291,7 +294,9 @@ private: /// Stack of the active tools std::deque m_activeTools; - ACTION_MANAGER m_actionMgr; + /// Instance of ACTION_MANAGER that handles TOOL_ACTIONs + ACTION_MANAGER* m_actionMgr; + EDA_ITEM* m_model; KiGfx::VIEW* m_view; KiGfx::VIEW_CONTROLS* m_viewControls; diff --git a/include/view/wx_view_controls.h b/include/view/wx_view_controls.h index fd80e90d76..1c2ef1ea0f 100644 --- a/include/view/wx_view_controls.h +++ b/include/view/wx_view_controls.h @@ -84,15 +84,16 @@ public: /// @copydoc VIEW_CONTROLS::GetCursorPosition() virtual const VECTOR2D GetCursorPosition() const; - /// Event that forces mouse move event in the dispatcher + /// Event that forces mouse move event in the dispatcher (eg. used in autopanning, when mouse + /// cursor does not move in screen coordinates, but does in world coordinates) static const wxEventType EVT_REFRESH_MOUSE; private: /// Possible states for WX_VIEW_CONTROLS enum State { - IDLE = 1, - DRAG_PANNING, - AUTO_PANNING, + IDLE = 1, /// Nothing is happening + DRAG_PANNING, /// Panning with mouse button pressed + AUTO_PANNING, /// Panning on approaching borders of the frame }; /** diff --git a/include/tool/item_state.h b/pcbnew/tools/item_state.h similarity index 99% rename from include/tool/item_state.h rename to pcbnew/tools/item_state.h index 8226d6e66c..72270afe1a 100644 --- a/include/tool/item_state.h +++ b/pcbnew/tools/item_state.h @@ -22,6 +22,12 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#ifndef ITEM_STATE_H_ +#define ITEM_STATE_H_ + +#include +#include + /** * Class ITEM_STATE * @@ -29,13 +35,6 @@ * the introduced changes. Does not take ownership of modified items, neither takes care of * refreshing. */ - -#ifndef ITEM_STATE_H_ -#define ITEM_STATE_H_ - -#include -#include - class ITEM_STATE { public: @@ -278,4 +277,3 @@ private: }; #endif /* ITEM_STATE_H_ */ - diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp index 69d2d00dba..768785f7f3 100644 --- a/pcbnew/tools/move_tool.cpp +++ b/pcbnew/tools/move_tool.cpp @@ -53,7 +53,7 @@ MOVE_TOOL::~MOVE_TOOL() void MOVE_TOOL::Reset() { // The tool launches upon reception of action event ("pcbnew.InteractiveMove") - Go( &MOVE_TOOL::Main, m_activate.GetEvent() ); + Go( &MOVE_TOOL::Main, m_activate.MakeEvent() ); } @@ -115,12 +115,12 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) { VECTOR2D cursorPos = getView()->ToWorld( getViewControls()->GetCursorPosition() ); - if( evt->Matches( m_rotate.GetEvent() ) ) // got rotation event? + if( evt->IsAction( &m_rotate ) ) // got rotation event? { m_state.Rotate( cursorPos, 900.0 ); m_items.ViewUpdate( VIEW_ITEM::GEOMETRY ); } - else if( evt->Matches( m_flip.GetEvent() ) ) // got flip event? + else if( evt->IsAction( &m_flip ) ) // got flip event? { m_state.Flip( cursorPos ); m_items.ViewUpdate( VIEW_ITEM::GEOMETRY ); diff --git a/pcbnew/tools/move_tool.h b/pcbnew/tools/move_tool.h index fdb0e2e450..d96a7ca023 100644 --- a/pcbnew/tools/move_tool.h +++ b/pcbnew/tools/move_tool.h @@ -27,8 +27,8 @@ #include #include -#include #include +#include "item_state.h" class BOARD_ITEM; class SELECTION_TOOL; diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index c1133de729..995a380417 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -68,7 +68,7 @@ void SELECTION_TOOL::Reset() m_selectedItems.clear(); // The tool launches upon reception of action event ("pcbnew.InteractiveSelection") - Go( &SELECTION_TOOL::Main, m_activate.GetEvent() ); + Go( &SELECTION_TOOL::Main, m_activate.MakeEvent() ); } @@ -266,7 +266,7 @@ bool SELECTION_TOOL::selectMultiple() VIEW* view = getView(); getViewControls()->SetAutoPan( true ); - // Those 2 lines remove the blink-in-the-random-place effect + // These 2 lines remove the blink-in-the-random-place effect m_selArea->SetOrigin( VECTOR2I( 0, 0 ) ); m_selArea->SetEnd( VECTOR2I( 0, 0 ) ); view->Add( m_selArea ); @@ -467,7 +467,6 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const break; } - // All other items are selected only if the layer on which they exist is visible return board->IsLayerVisible( aItem->GetLayer() ); } @@ -475,12 +474,14 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const bool SELECTION_TOOL::containsSelected( const VECTOR2I& aPoint ) const { + const unsigned GRIP_MARGIN = 500000; + // Check if the point is located within any of the currently selected items bounding boxes std::set::iterator it, it_end; for( it = m_selectedItems.begin(), it_end = m_selectedItems.end(); it != it_end; ++it ) { BOX2I itemBox = (*it)->ViewBBox(); - itemBox.Inflate( 500000 ); // Give some margin for gripping an item + itemBox.Inflate( GRIP_MARGIN ); // Give some margin for gripping an item if( itemBox.Contains( aPoint ) ) return true; From 745b5328ebfa0e106058c487200d7a8a1cb17dde Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 27 Sep 2013 20:52:34 +0200 Subject: [PATCH 379/415] Moved common actions to a separate file. --- common/tool/action_manager.cpp | 2 +- pcbnew/CMakeLists.txt | 1 + pcbnew/tools/common_actions.cpp | 44 +++++++++++++++++++++++++++++ pcbnew/tools/common_actions.h | 49 +++++++++++++++++++++++++++++++++ pcbnew/tools/move_tool.cpp | 26 ++++++----------- pcbnew/tools/move_tool.h | 9 ------ pcbnew/tools/pcb_tools.cpp | 12 ++++++++ pcbnew/tools/selection_tool.cpp | 14 ++-------- pcbnew/tools/selection_tool.h | 7 ----- 9 files changed, 118 insertions(+), 46 deletions(-) create mode 100644 pcbnew/tools/common_actions.cpp create mode 100644 pcbnew/tools/common_actions.h diff --git a/common/tool/action_manager.cpp b/common/tool/action_manager.cpp index 78fbefd2da..5828d03247 100644 --- a/common/tool/action_manager.cpp +++ b/common/tool/action_manager.cpp @@ -66,7 +66,7 @@ void ACTION_MANAGER::UnregisterAction( TOOL_ACTION* aAction ) int ACTION_MANAGER::MakeActionId( const std::string& aActionName ) { - static int currentActionId = 0; + static int currentActionId = 1; return currentActionId++; } diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 06c2960ba9..8026cc4c80 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -228,6 +228,7 @@ set( PCBNEW_CLASS_SRCS tools/bright_box.cpp tools/move_tool.cpp tools/pcb_tools.cpp + tools/common_actions.cpp ) set( PCBNEW_SRCS ${PCBNEW_AUTOROUTER_SRCS} ${PCBNEW_CLASS_SRCS} ${PCBNEW_DIALOGS} ) diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp new file mode 100644 index 0000000000..9605302924 --- /dev/null +++ b/pcbnew/tools/common_actions.cpp @@ -0,0 +1,44 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "common_actions.h" +#include + +// Selection tool actions +TOOL_ACTION COMMON_ACTIONS::selectionActivate( "pcbnew.InteractiveSelection", + AS_GLOBAL, 'S', + "Selection tool", "Allows to select items" ); + +// Move tool actions +TOOL_ACTION COMMON_ACTIONS::moveActivate( "pcbnew.InteractiveMove", + AS_GLOBAL, 'M', + "Move", "Moves the selected item(s)" ); + +TOOL_ACTION COMMON_ACTIONS::rotate( "pcbnew.InteractiveMove.rotate", + AS_CONTEXT, ' ', + "Rotate", "Rotates selected item(s)" ); + +TOOL_ACTION COMMON_ACTIONS::flip( "pcbnew.InteractiveMove.flip", + AS_CONTEXT, 'F', + "Flip", "Flips selected item(s)" ); diff --git a/pcbnew/tools/common_actions.h b/pcbnew/tools/common_actions.h new file mode 100644 index 0000000000..547b86f814 --- /dev/null +++ b/pcbnew/tools/common_actions.h @@ -0,0 +1,49 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Maciej Suminski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include + +class ACTION_MANAGER; + +/** + * Class COMMON_ACTIONS + * + * Gathers all the actions that are shared by tools. The instance of COMMON_ACTIOSN is created + * inside of ACTION_MANAGER object and registers them. + */ +class COMMON_ACTIONS +{ +public: + /// Activation of the move tool + static TOOL_ACTION moveActivate; + + /// Activation of the selection tool + static TOOL_ACTION selectionActivate; + + /// Rotation of selected objects + static TOOL_ACTION rotate; + + /// Flipping of selected objects + static TOOL_ACTION flip; +}; diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp index 768785f7f3..b21a0a19da 100644 --- a/pcbnew/tools/move_tool.cpp +++ b/pcbnew/tools/move_tool.cpp @@ -25,9 +25,9 @@ #include #include #include -#include #include +#include "common_actions.h" #include "selection_tool.h" #include "move_tool.h" @@ -35,12 +35,7 @@ using namespace KiGfx; using boost::optional; MOVE_TOOL::MOVE_TOOL() : - TOOL_INTERACTIVE( "pcbnew.InteractiveMove" ), m_selectionTool( NULL ), - - // Available actions: - m_activate( m_toolName, AS_GLOBAL, 'M', "Move", "Moves the selected item(s)" ), - m_rotate( m_toolName + ".rotate", AS_CONTEXT, ' ', "Rotate", "Rotates selected item(s)" ), - m_flip( m_toolName + ".flip", AS_CONTEXT, 'F', "Flip", "Flips selected item(s)" ) + TOOL_INTERACTIVE( "pcbnew.InteractiveMove" ), m_selectionTool( NULL ) { } @@ -53,7 +48,7 @@ MOVE_TOOL::~MOVE_TOOL() void MOVE_TOOL::Reset() { // The tool launches upon reception of action event ("pcbnew.InteractiveMove") - Go( &MOVE_TOOL::Main, m_activate.MakeEvent() ); + Go( &MOVE_TOOL::Main, COMMON_ACTIONS::moveActivate.MakeEvent() ); } @@ -66,15 +61,10 @@ bool MOVE_TOOL::Init() { m_selectionTool = static_cast( selectionTool ); - // Activate hot keys - m_toolMgr->RegisterAction( &m_activate ); - m_toolMgr->RegisterAction( &m_rotate ); - m_toolMgr->RegisterAction( &m_flip ); - // Add context menu entries that are displayed when selection tool is active - m_selectionTool->AddMenuItem( m_activate ); - m_selectionTool->AddMenuItem( m_rotate ); - m_selectionTool->AddMenuItem( m_flip ); + m_selectionTool->AddMenuItem( COMMON_ACTIONS::moveActivate ); + m_selectionTool->AddMenuItem( COMMON_ACTIONS::rotate ); + m_selectionTool->AddMenuItem( COMMON_ACTIONS::flip ); } else { @@ -115,12 +105,12 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) { VECTOR2D cursorPos = getView()->ToWorld( getViewControls()->GetCursorPosition() ); - if( evt->IsAction( &m_rotate ) ) // got rotation event? + if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) // got rotation event? { m_state.Rotate( cursorPos, 900.0 ); m_items.ViewUpdate( VIEW_ITEM::GEOMETRY ); } - else if( evt->IsAction( &m_flip ) ) // got flip event? + else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) // got flip event? { m_state.Flip( cursorPos ); m_items.ViewUpdate( VIEW_ITEM::GEOMETRY ); diff --git a/pcbnew/tools/move_tool.h b/pcbnew/tools/move_tool.h index d96a7ca023..0074ba70b4 100644 --- a/pcbnew/tools/move_tool.h +++ b/pcbnew/tools/move_tool.h @@ -85,15 +85,6 @@ private: /// VIEW_GROUP that helds currently moved items KiGfx::VIEW_GROUP m_items; - - /// Register hotkey for activation of the move tool - TOOL_ACTION m_activate; - - /// Register hotkey for rotation of selected objects - TOOL_ACTION m_rotate; - - /// Register hotkey for flipping of selected objects - TOOL_ACTION m_flip; }; #endif diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index 0cece9dffd..f2e1885821 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -36,6 +36,7 @@ #include "selection_tool.h" #include "move_tool.h" +#include "common_actions.h" #include void PCB_EDIT_FRAME::setupTools() @@ -45,6 +46,12 @@ void PCB_EDIT_FRAME::setupTools() m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager, this ); m_galCanvas->SetEventDispatcher( m_toolDispatcher ); + // Register tool actions + m_toolManager->RegisterAction( &COMMON_ACTIONS::moveActivate ); + m_toolManager->RegisterAction( &COMMON_ACTIONS::selectionActivate ); + m_toolManager->RegisterAction( &COMMON_ACTIONS::rotate ); + m_toolManager->RegisterAction( &COMMON_ACTIONS::flip ); + // Register tools m_toolManager->RegisterTool( new SELECTION_TOOL ); m_toolManager->RegisterTool( new ROUTER_TOOL ); @@ -54,6 +61,11 @@ void PCB_EDIT_FRAME::setupTools() void PCB_EDIT_FRAME::destroyTools() { + m_toolManager->UnregisterAction( &COMMON_ACTIONS::moveActivate ); + m_toolManager->UnregisterAction( &COMMON_ACTIONS::selectionActivate ); + m_toolManager->UnregisterAction( &COMMON_ACTIONS::rotate ); + m_toolManager->UnregisterAction( &COMMON_ACTIONS::flip ); + delete m_toolDispatcher; delete m_toolManager; } diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 995a380417..00854f133f 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -44,13 +44,13 @@ #include "selection_tool.h" #include "selection_area.h" #include "bright_box.h" +#include "common_actions.h" using namespace KiGfx; using boost::optional; SELECTION_TOOL::SELECTION_TOOL() : - TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ), m_multiple( false ), - m_activate( m_toolName, AS_GLOBAL, 'S', "Selection tool", "Allows to select items" ) + TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ), m_multiple( false ) { m_selArea = new SELECTION_AREA; } @@ -68,15 +68,7 @@ void SELECTION_TOOL::Reset() m_selectedItems.clear(); // The tool launches upon reception of action event ("pcbnew.InteractiveSelection") - Go( &SELECTION_TOOL::Main, m_activate.MakeEvent() ); -} - - -bool SELECTION_TOOL::Init() -{ - m_toolMgr->RegisterAction( &m_activate ); - - return true; + Go( &SELECTION_TOOL::Main, COMMON_ACTIONS::selectionActivate.MakeEvent() ); } diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 928aa4bf6f..8dc8982bd6 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -30,7 +30,6 @@ #include #include -#include #include class SELECTION_AREA; @@ -58,9 +57,6 @@ public: /// @copydoc TOOL_INTERACTIVE::Reset() void Reset(); - /// @copydoc TOOL_INTERACTIVE::Init() - bool Init(); - /** * Function Main() * @@ -194,9 +190,6 @@ private: /// Flag saying if multiple selection mode is active bool m_multiple; - /// Register hotkey fot activation of the selection tool - TOOL_ACTION m_activate; - /// Right click popup menu CONTEXT_MENU m_menu; }; From a64fb40d7e7cf06764de0644e0e79adc8745c75b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Sumi=C5=84ski?= Date: Sun, 29 Sep 2013 12:57:20 +0200 Subject: [PATCH 380/415] Fixed strings for wxWidgets 2.8 --- common/tool/context_menu.cpp | 7 ++++--- common/tool/tool_manager.cpp | 2 +- common/worksheet_item.cpp | 4 ++-- pcbnew/tools/move_tool.cpp | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index 96a877abf8..66546bb793 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -103,12 +103,13 @@ void CONTEXT_MENU::Add( const TOOL_ACTION& aAction ) wxString menuEntry; if( aAction.HasHotKey() ) - menuEntry = wxString( aAction.GetMenuItem() + '\t' + getHotKeyDescription( aAction ) ); + menuEntry = wxString( ( aAction.GetMenuItem() + '\t' + getHotKeyDescription( aAction ) ).c_str(), + wxConvUTF8 ); else - menuEntry = wxString( aAction.GetMenuItem() ); + menuEntry = wxString( aAction.GetMenuItem().c_str(), wxConvUTF8 ); m_menu.Append( new wxMenuItem( &m_menu, id, menuEntry, - wxString( aAction.GetDescription() ), wxITEM_NORMAL ) ); + wxString( aAction.GetDescription().c_str(), wxConvUTF8 ), wxITEM_NORMAL ) ); m_toolActions[id] = &aAction; } diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 2350994b6b..d062faa9c4 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -139,7 +139,7 @@ void TOOL_MANAGER::RegisterTool( TOOL_BASE* aTool ) bool initState = static_cast( aTool )->Init(); if( !initState ) { - wxLogError( wxT( "Initialization of the %s tool failed" ), aTool->GetName() ); + wxLogError( wxT( "Initialization of the %s tool failed" ), aTool->GetName().c_str() ); // Unregister the tool m_toolState.erase( aTool ); diff --git a/common/worksheet_item.cpp b/common/worksheet_item.cpp index 9eefc3d908..e46d3e2822 100644 --- a/common/worksheet_item.cpp +++ b/common/worksheet_item.cpp @@ -79,8 +79,8 @@ const BOX2I WORKSHEET_ITEM::ViewBBox() const void WORKSHEET_ITEM::ViewDraw( int aLayer, GAL* aGal ) const { RENDER_SETTINGS* settings = m_view->GetPainter()->GetSettings(); - wxString fileName( m_fileName ); - wxString sheetName( m_sheetName ); + wxString fileName( m_fileName.c_str(), wxConvUTF8 ); + wxString sheetName( m_sheetName.c_str(), wxConvUTF8 ); WS_DRAW_ITEM_LIST drawList; drawList.SetPenSize( settings->GetWorksheetLineWidth() ); diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp index b21a0a19da..3e2170a051 100644 --- a/pcbnew/tools/move_tool.cpp +++ b/pcbnew/tools/move_tool.cpp @@ -68,7 +68,7 @@ bool MOVE_TOOL::Init() } else { - wxLogError( "pcbnew.InteractiveSelection tool is not available" ); + wxLogError( wxT( "pcbnew.InteractiveSelection tool is not available" ) ); return false; } From ca84ed7e632cde51fbf6227b2e2284dbce1f3912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Sumi=C5=84ski?= Date: Sun, 29 Sep 2013 13:56:32 +0200 Subject: [PATCH 381/415] Fixed menu entry ids for the p&s router context menu. --- pcbnew/router/router_tool.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 6ab7688b59..075cb17f7d 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -58,11 +58,11 @@ ROUTER_TOOL::ROUTER_TOOL() : m_menu->Add( wxT( "Cancel" ), 0 ); m_menu->Add( wxT( "New track" ), 1 ); m_menu->Add( wxT( "End track" ), 2 ); - m_menu->Add( wxT( "Auto-end track" ), 2 ); - m_menu->Add( wxT( "Place via" ), 3 ); - m_menu->Add( wxT( "Switch posture" ), 4 ); + m_menu->Add( wxT( "Auto-end track" ), 3 ); + m_menu->Add( wxT( "Place via" ), 4 ); + m_menu->Add( wxT( "Switch posture" ), 5 ); - m_menu->Add( wxT( "Routing options..." ), 5 ); + m_menu->Add( wxT( "Routing options..." ), 6 ); } From 5c0bc4913ec6d8bb75d8c0b151101d7fb612d1c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Sumi=C5=84ski?= Date: Sun, 29 Sep 2013 14:25:04 +0200 Subject: [PATCH 382/415] wxWidgets 2.8 compatibility fix (removed wx/kbdstate.h) --- common/tool/tool_dispatcher.cpp | 19 ++----------------- include/tool/tool_dispatcher.h | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 9d2ad52482..9e32598854 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -117,21 +117,6 @@ KiGfx::VIEW* TOOL_DISPATCHER::getView() } -int TOOL_DISPATCHER::decodeModifiers( const wxKeyboardState* aState ) const -{ - int mods = 0; - - if( aState->ControlDown() ) - mods |= MD_ModCtrl; - if( aState->AltDown() ) - mods |= MD_ModAlt; - if( aState->ShiftDown() ) - mods |= MD_ModShift; - - return mods; -} - - bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMotion ) { ButtonState* st = m_buttons[aIndex]; @@ -142,7 +127,7 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti bool up = type == st->upEvent; bool down = type == st->downEvent; - int mods = decodeModifiers( static_cast( &aEvent ) ); + int mods = decodeModifiers( static_cast( &aEvent ) ); int args = st->button | mods; if( down ) // Handle mouse button press @@ -246,7 +231,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) { wxKeyEvent* ke = static_cast( &aEvent ); int key = ke->GetKeyCode(); - int mods = decodeModifiers( ke ); + int mods = decodeModifiers( ke ); if( type == wxEVT_KEY_UP ) { diff --git a/include/tool/tool_dispatcher.h b/include/tool/tool_dispatcher.h index 15c0b73eb4..1c8c3fe579 100644 --- a/include/tool/tool_dispatcher.h +++ b/include/tool/tool_dispatcher.h @@ -29,8 +29,6 @@ #include -#include - class TOOL_MANAGER; class PCB_BASE_FRAME; @@ -98,7 +96,20 @@ private: bool handleMouseButton( wxEvent& aEvent, int aIndex, bool aMotion ); ///> Saves the state of key modifiers (Alt, Ctrl and so on). - int decodeModifiers( const wxKeyboardState* aState ) const; + template + static int decodeModifiers( const EventType* aState ) + { + int mods = 0; + + if( aState->ControlDown() ) + mods |= MD_ModCtrl; + if( aState->AltDown() ) + mods |= MD_ModAlt; + if( aState->ShiftDown() ) + mods |= MD_ModShift; + + return mods; + } ///> Stores all the informations regarding a mouse button state. From 248e37c29270bdacf0ae78e749903eac31a75891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Sumi=C5=84ski?= Date: Sun, 29 Sep 2013 21:23:45 +0200 Subject: [PATCH 383/415] Fixed selection disambiguation menu for wx2.8 --- pcbnew/tools/selection_tool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 00854f133f..b6299e8208 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -350,7 +350,7 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) int id = *evt->GetCommandId(); // User has pointed an item, so show it in a different way - if( id >= 0 ) + if( id >= 0 && id < limit ) { current = ( *aCollector )[id]; current->SetBrightened(); From db4903cdc479f2bb2690e0a1ad94cfb88cedebda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Sumi=C5=84ski?= Date: Sun, 29 Sep 2013 21:29:28 +0200 Subject: [PATCH 384/415] Restored previous version of math_utils.h. WARNING: Mac OS build is probably broken now. --- common/CMakeLists.txt | 2 +- common/math/math_util.cpp | 80 --------------------------------------- include/math/math_util.h | 57 +++++++++++++++++++++++++++- 3 files changed, 56 insertions(+), 83 deletions(-) delete mode 100644 common/math/math_util.cpp diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index bbe7d2934f..5421d9df4c 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -156,7 +156,7 @@ set(COMMON_SRCS view/view_item.cpp view/view_group.cpp - math/math_util.cpp +# math/math_util.cpp system/fcontext.s tool/tool_base.cpp diff --git a/common/math/math_util.cpp b/common/math/math_util.cpp deleted file mode 100644 index ff939964b3..0000000000 --- a/common/math/math_util.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* - * This program source code file is part of KICAD, a free EDA CAD application. - * - * Copyright (c) 2005 Michael Niedermayer - * Copyright (C) CERN - * @author Tomasz Wlostowski - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, you may find one here: - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * or you may search the http://www.gnu.org website for the version 2 license, - * or you may write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include - -// explicit specializations for integer types, taking care of overflow. -template<> int rescale( int numerator, int value, int denominator ) -{ - return (int) ( (int64_t) numerator * (int64_t) value / (int64_t) denominator ); -} - -template<> int64_t rescale( int64_t numerator, int64_t value, int64_t denominator ) -{ - uint64_t r = 0; - int64_t sign = ( ( numerator < 0) ? -1 : 1 ) * ( denominator < 0 ? - 1: 1 ) * (value < 0 ? - 1 : 1); - - uint64_t a = abs( numerator ); - uint64_t b = abs( value ); - uint64_t c = abs( denominator ); - - r = c / 2; - - if( b <= INT_MAX && c <= INT_MAX ) - { - if( a <= INT_MAX ) - return sign * ( (a * b + r ) / c ); - else - return sign * (a / c * b + (a % c * b + r) / c); - } else { - uint64_t a0 = a & 0xFFFFFFFF; - uint64_t a1 = a >> 32; - uint64_t b0 = b & 0xFFFFFFFF; - uint64_t b1 = b >> 32; - uint64_t t1 = a0 * b1 + a1 * b0; - uint64_t t1a = t1 << 32; - int i; - - a0 = a0 * b0 + t1a; - a1 = a1 * b1 + (t1 >> 32) + (a0 < t1a); - a0 += r; - a1 += a0 < r; - - for( i = 63; i >= 0; i-- ) - { - a1 += a1 + ( (a0 >> i) & 1 ); - t1 += t1; - - if( c <= a1 ) - { - a1 -= c; - t1++; - } - } - - return t1 * sign; - } -}; - diff --git a/include/math/math_util.h b/include/math/math_util.h index 5340f67f71..9145b7fa89 100644 --- a/include/math/math_util.h +++ b/include/math/math_util.h @@ -29,7 +29,6 @@ #include #include #include -#include /** * Function rescale() @@ -37,9 +36,63 @@ * Scales a number (value) by rational (numerator/denominator). Numerator must be <= denominator. */ -template T rescale( T numerator, T value, T denominator ) +template static T rescale( T numerator, T value, T denominator ) { return numerator * value / denominator; } + +// explicit specializations for integer types, taking care of overflow. +template<> int rescale( int numerator, int value, int denominator ) +{ + return (int) ( (int64_t) numerator * (int64_t) value / (int64_t) denominator ); +} + +template<> int64_t rescale( int64_t numerator, int64_t value, int64_t denominator ) +{ + int64_t r = 0; + int64_t sign = ( ( numerator < 0) ? -1 : 1 ) * ( denominator < 0 ? - 1: 1 ) * (value < 0 ? - 1 : 1); + + int64_t a = std::abs( numerator ); + int64_t b = std::abs( value ); + int64_t c = std::abs( denominator ); + + r = c / 2; + + if( b <= INT_MAX && c <= INT_MAX ) + { + if( a <= INT_MAX ) + return sign * ( (a * b + r ) / c ); + else + return sign * (a / c * b + (a % c * b + r) / c); + } else { + uint64_t a0 = a & 0xFFFFFFFF; + uint64_t a1 = a >> 32; + uint64_t b0 = b & 0xFFFFFFFF; + uint64_t b1 = b >> 32; + uint64_t t1 = a0 * b1 + a1 * b0; + uint64_t t1a = t1 << 32; + int i; + + a0 = a0 * b0 + t1a; + a1 = a1 * b1 + (t1 >> 32) + (a0 < t1a); + a0 += r; + a1 += ((uint64_t)a0) < r; + + for( i = 63; i >= 0; i-- ) + { + a1 += a1 + ( (a0 >> i) & 1 ); + t1 += t1; + + if( (uint64_t)c <= a1 ) + { + a1 -= c; + t1++; + } + } + + return t1 * sign; + } +}; + #endif // __MATH_UTIL_H From 5f1a04cfa0a6d6d0c6c008991be2acf22b90196d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 30 Sep 2013 09:45:42 +0200 Subject: [PATCH 385/415] Fixed Mac OS build & removed one warning. --- common/CMakeLists.txt | 2 +- include/math/math_util.h | 57 +++------------------------------------- pcbnew/pcb_painter.cpp | 2 ++ pcbnew/pcb_painter.h | 2 +- 4 files changed, 7 insertions(+), 56 deletions(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 5421d9df4c..bbe7d2934f 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -156,7 +156,7 @@ set(COMMON_SRCS view/view_item.cpp view/view_group.cpp -# math/math_util.cpp + math/math_util.cpp system/fcontext.s tool/tool_base.cpp diff --git a/include/math/math_util.h b/include/math/math_util.h index 9145b7fa89..00be8584f8 100644 --- a/include/math/math_util.h +++ b/include/math/math_util.h @@ -26,8 +26,6 @@ #ifndef __MATH_UTIL_H #define __MATH_UTIL_H -#include -#include #include /** @@ -36,63 +34,14 @@ * Scales a number (value) by rational (numerator/denominator). Numerator must be <= denominator. */ -template static T rescale( T numerator, T value, T denominator ) +template T rescale( T numerator, T value, T denominator ) { return numerator * value / denominator; } // explicit specializations for integer types, taking care of overflow. -template<> int rescale( int numerator, int value, int denominator ) -{ - return (int) ( (int64_t) numerator * (int64_t) value / (int64_t) denominator ); -} - -template<> int64_t rescale( int64_t numerator, int64_t value, int64_t denominator ) -{ - int64_t r = 0; - int64_t sign = ( ( numerator < 0) ? -1 : 1 ) * ( denominator < 0 ? - 1: 1 ) * (value < 0 ? - 1 : 1); - - int64_t a = std::abs( numerator ); - int64_t b = std::abs( value ); - int64_t c = std::abs( denominator ); - - r = c / 2; - - if( b <= INT_MAX && c <= INT_MAX ) - { - if( a <= INT_MAX ) - return sign * ( (a * b + r ) / c ); - else - return sign * (a / c * b + (a % c * b + r) / c); - } else { - uint64_t a0 = a & 0xFFFFFFFF; - uint64_t a1 = a >> 32; - uint64_t b0 = b & 0xFFFFFFFF; - uint64_t b1 = b >> 32; - uint64_t t1 = a0 * b1 + a1 * b0; - uint64_t t1a = t1 << 32; - int i; - - a0 = a0 * b0 + t1a; - a1 = a1 * b1 + (t1 >> 32) + (a0 < t1a); - a0 += r; - a1 += ((uint64_t)a0) < r; - - for( i = 63; i >= 0; i-- ) - { - a1 += a1 + ( (a0 >> i) & 1 ); - t1 += t1; - - if( (uint64_t)c <= a1 ) - { - a1 -= c; - t1++; - } - } - - return t1 * sign; - } -}; +template<> int rescale( int numerator, int value, int denominator ); +template<> int64_t rescale( int64_t numerator, int64_t value, int64_t denominator ); #endif // __MATH_UTIL_H diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index dbc023eba7..a0c29c5602 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -913,3 +913,5 @@ void PCB_PAINTER::drawSelectionBox( const VIEW_ITEM* aItem ) const m_gal->SetFillColor( m_pcbSettings->GetLayerColor( ITEM_GAL_LAYER( SELECTION ) ) ); m_gal->DrawRectangle( boundingBox.GetOrigin(), boundingBox.GetEnd() ); } + +const double PCB_RENDER_SETTINGS::MAX_FONT_SIZE = 100000000; diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index fcba27d3c1..4532fc49b6 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -108,7 +108,7 @@ protected: bool m_netNamesOnTracks; /// Maximum font size for netnames (and other dynamically shown strings) - static const double MAX_FONT_SIZE = 100000000; + static const double MAX_FONT_SIZE; /// Option for different display modes for zones DisplayZonesMode m_displayZoneMode; From 04db1ff7cb256c00b8c60d033f60a38517a384bb Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 30 Sep 2013 16:28:21 +0200 Subject: [PATCH 386/415] Added missing file --- common/math/math_util.cpp | 82 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 common/math/math_util.cpp diff --git a/common/math/math_util.cpp b/common/math/math_util.cpp new file mode 100644 index 0000000000..f796efc1e1 --- /dev/null +++ b/common/math/math_util.cpp @@ -0,0 +1,82 @@ +/* + * This program source code file is part of KICAD, a free EDA CAD application. + * + * Copyright (c) 2005 Michael Niedermayer + * Copyright (C) CERN + * @author Tomasz Wlostowski + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include +#include +#include +#include + +template<> int rescale( int numerator, int value, int denominator ) +{ + return (int) ( (int64_t) numerator * (int64_t) value / (int64_t) denominator ); +} + + +template<> int64_t rescale( int64_t numerator, int64_t value, int64_t denominator ) +{ + int64_t r = 0; + int64_t sign = ( ( numerator < 0) ? -1 : 1 ) * ( denominator < 0 ? - 1: 1 ) * (value < 0 ? - 1 : 1); + + int64_t a = std::abs( numerator ); + int64_t b = std::abs( value ); + int64_t c = std::abs( denominator ); + + r = c / 2; + + if( b <= INT_MAX && c <= INT_MAX ) + { + if( a <= INT_MAX ) + return sign * ( (a * b + r ) / c ); + else + return sign * (a / c * b + (a % c * b + r) / c); + } else { + uint64_t a0 = a & 0xFFFFFFFF; + uint64_t a1 = a >> 32; + uint64_t b0 = b & 0xFFFFFFFF; + uint64_t b1 = b >> 32; + uint64_t t1 = a0 * b1 + a1 * b0; + uint64_t t1a = t1 << 32; + int i; + + a0 = a0 * b0 + t1a; + a1 = a1 * b1 + (t1 >> 32) + (a0 < t1a); + a0 += r; + a1 += ((uint64_t)a0) < r; + + for( i = 63; i >= 0; i-- ) + { + a1 += a1 + ( (a0 >> i) & 1 ); + t1 += t1; + + if( (uint64_t)c <= a1 ) + { + a1 -= c; + t1++; + } + } + + return t1 * sign; + } +} From 3715af2172620d1e42d971f44559ea92b265f8f6 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 1 Oct 2013 10:21:32 +0200 Subject: [PATCH 387/415] Comments, refactoring --- include/worksheet_item.h | 1 - include/wxBasePcbFrame.h | 2 ++ pcbnew/basepcbframe.cpp | 2 -- pcbnew/tools/move_tool.cpp | 12 ++++++------ pcbnew/tools/move_tool.h | 2 +- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/include/worksheet_item.h b/include/worksheet_item.h index b26ec01085..8b2b7d2165 100644 --- a/include/worksheet_item.h +++ b/include/worksheet_item.h @@ -49,7 +49,6 @@ class WORKSHEET_ITEM : public EDA_ITEM public: WORKSHEET_ITEM( const std::string& aFileName, const std::string& aSheetName, const PAGE_INFO* aPageInfo, const TITLE_BLOCK* aTitleBlock ); - ~WORKSHEET_ITEM() {} /** * Function SetFileName() diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index 58ddac8154..7e1605895f 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -115,6 +115,8 @@ protected: MODULE* loadFootprint( const FPID& aFootprintId ) throw( IO_ERROR, PARSE_ERROR ); + ///> Rendering order of layers on GAL-based canvas (lower index in the array + ///> means that layer is displayed closer to the user, ie. on the top). static const LAYER_NUM GAL_LAYER_ORDER[]; public: diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index be2c8d756e..63e3636314 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -70,8 +70,6 @@ static const wxString DisplayModuleTextEntry( wxT( "DiModTx" ) ); static const wxString FastGrid1Entry( wxT( "FastGrid1" ) ); static const wxString FastGrid2Entry( wxT( "FastGrid2" ) ); -/// Rendering order of layers on GAL-based canvas (lower index in the array -/// means that layer is displayed closer to the user, ie. on the top). const LAYER_NUM PCB_BASE_FRAME::GAL_LAYER_ORDER[] = { ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( SELECTION ), diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp index 3e2170a051..8ee55879e1 100644 --- a/pcbnew/tools/move_tool.cpp +++ b/pcbnew/tools/move_tool.cpp @@ -139,7 +139,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) m_state.Save( *it ); // Gather all selected items into one VIEW_GROUP - viewGroupAdd( *it, &m_items ); + vgAdd( *it, &m_items ); } // Hide the original items, they are temporarily shown in VIEW_GROUP on overlay @@ -183,7 +183,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) } -void MOVE_TOOL::viewGroupAdd( BOARD_ITEM* aItem, VIEW_GROUP* aGroup ) +void MOVE_TOOL::vgAdd( BOARD_ITEM* aItem, VIEW_GROUP* aGroup ) { // Modules are treated in a special way - when they are moved, we have to // move all the parts that make the module, not the module itself @@ -193,14 +193,14 @@ void MOVE_TOOL::viewGroupAdd( BOARD_ITEM* aItem, VIEW_GROUP* aGroup ) // Add everything that belongs to the module (besides the module itself) for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) - viewGroupAdd( pad, &m_items ); + aGroup->Add( pad ); for( BOARD_ITEM* drawing = module->GraphicalItems().GetFirst(); drawing; drawing = drawing->Next() ) - viewGroupAdd( drawing, &m_items ); + aGroup->Add( drawing ); - viewGroupAdd( &module->Reference(), &m_items ); - viewGroupAdd( &module->Value(), &m_items ); + aGroup->Add( &module->Reference() ); + aGroup->Add( &module->Value() ); } // Add items to the VIEW_GROUP, so they will be displayed on the overlay diff --git a/pcbnew/tools/move_tool.h b/pcbnew/tools/move_tool.h index 0074ba70b4..e564879bca 100644 --- a/pcbnew/tools/move_tool.h +++ b/pcbnew/tools/move_tool.h @@ -66,7 +66,7 @@ public: private: /// Adds an item to the VIEW_GROUP that holds all moved items and displays them on the overlay - void viewGroupAdd( BOARD_ITEM* aItem, KiGfx::VIEW_GROUP* aGroup ); + void vgAdd( BOARD_ITEM* aItem, KiGfx::VIEW_GROUP* aGroup ); /// Changes visibility settings for items stored in a VIEW_GROUP void vgSetVisibility( KiGfx::VIEW_GROUP* aGroup, bool aVisible ) const; From 5acd895e0dbd1e06c675159de9497200eb2460a9 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 1 Oct 2013 16:55:33 +0200 Subject: [PATCH 388/415] VIEW_GROUP now does not change depth during drawing. Introduced functions for manipulating stored items. FIxed problem of overlay being covered by other layers while panning. Few minor fixes. --- common/view/view_group.cpp | 45 ++++++++++++++++++------ include/gal/definitions.h | 8 ++--- include/gal/graphics_abstraction_layer.h | 2 +- include/view/view_group.h | 16 +++++++++ pcbnew/pcbframe.cpp | 5 +-- 5 files changed, 57 insertions(+), 19 deletions(-) diff --git a/common/view/view_group.cpp b/common/view/view_group.cpp index dfaf595c5c..996350b1f3 100644 --- a/common/view/view_group.cpp +++ b/common/view/view_group.cpp @@ -71,16 +71,6 @@ void VIEW_GROUP::Clear() } -void VIEW_GROUP::FreeItems() -{ - BOOST_FOREACH( VIEW_ITEM* item, m_items ) - { - delete item; - } - m_items.clear(); -} - - unsigned int VIEW_GROUP::GetSize() const { return m_items.size(); @@ -98,6 +88,7 @@ const BOX2I VIEW_GROUP::ViewBBox() const void VIEW_GROUP::ViewDraw( int aLayer, GAL* aGal ) const { PAINTER* painter = m_view->GetPainter(); + aGal->PushDepth(); // Draw all items immediately (without caching) BOOST_FOREACH( VIEW_ITEM* item, m_items ) @@ -110,13 +101,15 @@ void VIEW_GROUP::ViewDraw( int aLayer, GAL* aGal ) const { if( m_view->IsCached( layers[i] ) && m_view->IsLayerVisible( layers[i] ) ) { - aGal->SetLayerDepth( m_view->GetLayerOrder( layers[i] ) ); + aGal->AdvanceDepth(); if( !painter->Draw( item, layers[i] ) ) item->ViewDraw( layers[i], aGal ); // Alternative drawing method } } } + + aGal->PopDepth(); } @@ -128,6 +121,34 @@ void VIEW_GROUP::ViewGetLayers( int aLayers[], int& aCount ) const } +void VIEW_GROUP::FreeItems() +{ + BOOST_FOREACH( VIEW_ITEM* item, m_items ) + { + delete item; + } + m_items.clear(); +} + + +void VIEW_GROUP::ItemsSetVisibility( bool aVisible ) +{ + std::set::const_iterator it, it_end; + + for( it = m_items.begin(), it_end = m_items.end(); it != it_end; ++it ) + (*it)->ViewSetVisible( aVisible ); +} + + +void VIEW_GROUP::ItemsViewUpdate( VIEW_ITEM::ViewUpdateFlags aFlags ) +{ + std::set::const_iterator it, it_end; + + for( it = m_items.begin(), it_end = m_items.end(); it != it_end; ++it ) + (*it)->ViewUpdate( aFlags ); +} + + void VIEW_GROUP::updateBbox() { // Save the used VIEW, as it used nulled during Remove() @@ -137,3 +158,5 @@ void VIEW_GROUP::updateBbox() view->Remove( this ); view->Add( this ); } + + diff --git a/include/gal/definitions.h b/include/gal/definitions.h index ce18235bd1..8a506852c2 100644 --- a/include/gal/definitions.h +++ b/include/gal/definitions.h @@ -38,13 +38,11 @@ namespace KiGfx */ enum RenderTarget { - TARGET_CACHED, ///< Main rendering target (cached) + TARGET_CACHED = 0, ///< Main rendering target (cached) TARGET_NONCACHED, ///< Auxiliary rendering target (noncached) - TARGET_OVERLAY ///< Items that may change while the view stays the same (noncached) + TARGET_OVERLAY, ///< Items that may change while the view stays the same (noncached) + TARGETS_NUMBER ///< Number of available rendering targets }; - - /// Number of available rendering targets - static const int TARGETS_NUMBER = 3; } #endif /* DEFINITIONS_H_ */ diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 77cb3c48a8..098635d96c 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -798,7 +798,7 @@ public: */ inline void AdvanceDepth() { - layerDepth -= std::numeric_limits::epsilon(); + layerDepth -= 0.001; } /** diff --git a/include/view/view_group.h b/include/view/view_group.h index 54dbd16521..5414b041f2 100644 --- a/include/view/view_group.h +++ b/include/view/view_group.h @@ -147,6 +147,22 @@ public: return m_view; } + /** + * Function ItemsSetVisibility() + * Sets visibility of items stored in the VIEW_GROUP. + * + * @param aVisible decides if items should be visible or not. + */ + virtual void ItemsSetVisibility( bool aVisible ); + + /** + * Function ItemsViewUpdate() + * Updates items stored in the VIEW_GROUP. + * + * @param aFlags determines the way in which items will be updated. + */ + virtual void ItemsViewUpdate( VIEW_ITEM::ViewUpdateFlags aFlags ); + protected: /// These functions cannot be used with VIEW_GROUP as they are intended only to work with /// singular VIEW_ITEMs (there is only one-to-one relation between item/layer combination and diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 082ffb7bed..67f905f5fc 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -790,7 +790,8 @@ void PCB_EDIT_FRAME::setHighContrastLayer( LAYER_NUM aLayer ) LAYER_NUM layers[] = { GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), - ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ) + ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), + ITEM_GAL_LAYER( SELECTION ), ITEM_GAL_LAYER( GP_OVERLAY ) }; for( unsigned int i = 0; i < sizeof( layers ) / sizeof( LAYER_NUM ); ++i ) @@ -830,7 +831,7 @@ void PCB_EDIT_FRAME::setTopLayer( LAYER_NUM aLayer ) GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), - ITEM_GAL_LAYER( SELECTION ) + ITEM_GAL_LAYER( SELECTION ), ITEM_GAL_LAYER( GP_OVERLAY ) }; for( unsigned int i = 0; i < sizeof( layers ) / sizeof( LAYER_NUM ); ++i ) From 3cdc207b505a33f4a32359461e3876bcf0c3239f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 2 Oct 2013 10:19:48 +0200 Subject: [PATCH 389/415] Added typedefs for VIEW_GROUP iterators. Fixed improper order of layer drawing for VIEW_GROUP items. --- common/view/view_group.cpp | 9 ++++----- include/view/view_group.h | 8 ++++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/common/view/view_group.cpp b/common/view/view_group.cpp index 996350b1f3..62ef738c82 100644 --- a/common/view/view_group.cpp +++ b/common/view/view_group.cpp @@ -88,11 +88,12 @@ const BOX2I VIEW_GROUP::ViewBBox() const void VIEW_GROUP::ViewDraw( int aLayer, GAL* aGal ) const { PAINTER* painter = m_view->GetPainter(); - aGal->PushDepth(); // Draw all items immediately (without caching) BOOST_FOREACH( VIEW_ITEM* item, m_items ) { + aGal->PushDepth(); + int layers[VIEW::VIEW_MAX_LAYERS], layers_count; item->ViewGetLayers( layers, layers_count ); m_view->SortLayers( layers, layers_count ); @@ -107,9 +108,9 @@ void VIEW_GROUP::ViewDraw( int aLayer, GAL* aGal ) const item->ViewDraw( layers[i], aGal ); // Alternative drawing method } } - } - aGal->PopDepth(); + aGal->PopDepth(); + } } @@ -158,5 +159,3 @@ void VIEW_GROUP::updateBbox() view->Remove( this ); view->Add( this ); } - - diff --git a/include/view/view_group.h b/include/view/view_group.h index 5414b041f2..bdec53eacb 100644 --- a/include/view/view_group.h +++ b/include/view/view_group.h @@ -45,6 +45,10 @@ public: VIEW_GROUP( VIEW* aView = NULL ); virtual ~VIEW_GROUP(); + /// Helper typedefs + typedef std::set::const_iterator const_iter; + typedef std::set::iterator iter; + /** * Function Add() * Adds an item to the group. @@ -71,7 +75,7 @@ public: * Function Begin() * Returns iterator to beginning. */ - inline std::set::const_iterator Begin() const + inline const_iter Begin() const { return m_items.begin(); } @@ -80,7 +84,7 @@ public: * Function End() * Returns iterator to end. */ - inline std::set::const_iterator End() const + inline const_iter End() const { return m_items.end(); } From 3d9fc4c40fe6be0b2266f2c1c5b1cc6040045864 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 2 Oct 2013 10:21:05 +0200 Subject: [PATCH 390/415] Moved VIEW_GROUP creation to the selection tool. In this way selected items are always drawn on overlay, not only when dragged. --- pcbnew/tools/move_tool.cpp | 80 +++---------------- pcbnew/tools/move_tool.h | 15 ---- pcbnew/tools/selection_tool.cpp | 137 +++++++++++++++++++++++++++----- pcbnew/tools/selection_tool.h | 46 ++++++----- 4 files changed, 152 insertions(+), 126 deletions(-) diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp index 8ee55879e1..f3a027e410 100644 --- a/pcbnew/tools/move_tool.cpp +++ b/pcbnew/tools/move_tool.cpp @@ -78,15 +78,15 @@ bool MOVE_TOOL::Init() int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) { + const SELECTION_TOOL::SELECTION selection = m_selectionTool->GetSelection(); + if( selection.Empty() ) + return 0; // there are no items to operate on + VECTOR2D dragPosition; bool dragging = false; bool restore = false; // Should items' state be restored when finishing the tool? - VIEW* view = getView(); + VIEW_CONTROLS* controls = getViewControls(); - - // Add a VIEW_GROUP that will hold all modified items - view->Add( &m_items ); - controls->ShowCursor( true ); controls->SetSnapping( true ); controls->SetAutoPan( true ); @@ -108,12 +108,12 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) if( evt->IsAction( &COMMON_ACTIONS::rotate ) ) // got rotation event? { m_state.Rotate( cursorPos, 900.0 ); - m_items.ViewUpdate( VIEW_ITEM::GEOMETRY ); + selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); } else if( evt->IsAction( &COMMON_ACTIONS::flip ) ) // got flip event? { m_state.Flip( cursorPos ); - m_items.ViewUpdate( VIEW_ITEM::GEOMETRY ); + selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); } } @@ -128,98 +128,38 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) else { // Prepare to drag - m_selection = m_selectionTool->GetSelection(); - if( m_selection.empty() ) - break; // there are no items to operate on - std::set::iterator it; - for( it = m_selection.begin(); it != m_selection.end(); ++it ) + for( it = selection.items.begin(); it != selection.items.end(); ++it ) { // Save the state of the selected items, in case it has to be restored m_state.Save( *it ); - - // Gather all selected items into one VIEW_GROUP - vgAdd( *it, &m_items ); } - // Hide the original items, they are temporarily shown in VIEW_GROUP on overlay - vgSetVisibility( &m_items, false ); - vgUpdate( &m_items, VIEW_ITEM::APPEARANCE ); - dragging = true; } - m_items.ViewUpdate( VIEW_ITEM::GEOMETRY ); + selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); dragPosition = evt->Position(); } else if( evt->IsMouseUp( MB_Left ) || evt->IsClick( MB_Left ) ) break; // Finish } - // Restore visibility of the original items - vgSetVisibility( &m_items, true ); - if( restore ) { // Modifications has to be rollbacked, so restore the previous state of items - vgUpdate( &m_items, VIEW_ITEM::APPEARANCE ); m_state.RestoreAll(); } else { // Changes are applied, so update the items - vgUpdate( &m_items, m_state.GetUpdateFlag() ); + selection.group->ItemsViewUpdate( m_state.GetUpdateFlag() ); m_state.Apply(); } - m_items.Clear(); - view->Remove( &m_items ); - controls->ShowCursor( false ); controls->SetSnapping( false ); controls->SetAutoPan( false ); return 0; } - - -void MOVE_TOOL::vgAdd( BOARD_ITEM* aItem, VIEW_GROUP* aGroup ) -{ - // Modules are treated in a special way - when they are moved, we have to - // move all the parts that make the module, not the module itself - if( aItem->Type() == PCB_MODULE_T ) - { - MODULE* module = static_cast( aItem ); - - // Add everything that belongs to the module (besides the module itself) - for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) - aGroup->Add( pad ); - - for( BOARD_ITEM* drawing = module->GraphicalItems().GetFirst(); drawing; - drawing = drawing->Next() ) - aGroup->Add( drawing ); - - aGroup->Add( &module->Reference() ); - aGroup->Add( &module->Value() ); - } - - // Add items to the VIEW_GROUP, so they will be displayed on the overlay - // while dragging - aGroup->Add( aItem ); -} - - -void MOVE_TOOL::vgSetVisibility( VIEW_GROUP* aGroup, bool aVisible ) const -{ - std::set::const_iterator it, it_end; - for( it = aGroup->Begin(), it_end = aGroup->End(); it != it_end; ++it ) - (*it)->ViewSetVisible( aVisible ); -} - - -void MOVE_TOOL::vgUpdate( VIEW_GROUP* aGroup, VIEW_ITEM::ViewUpdateFlags aFlags ) const -{ - std::set::const_iterator it, it_end; - for( it = aGroup->Begin(), it_end = aGroup->End(); it != it_end; ++it ) - (*it)->ViewUpdate( aFlags ); -} diff --git a/pcbnew/tools/move_tool.h b/pcbnew/tools/move_tool.h index e564879bca..665663853d 100644 --- a/pcbnew/tools/move_tool.h +++ b/pcbnew/tools/move_tool.h @@ -65,26 +65,11 @@ public: int Main( TOOL_EVENT& aEvent ); private: - /// Adds an item to the VIEW_GROUP that holds all moved items and displays them on the overlay - void vgAdd( BOARD_ITEM* aItem, KiGfx::VIEW_GROUP* aGroup ); - - /// Changes visibility settings for items stored in a VIEW_GROUP - void vgSetVisibility( KiGfx::VIEW_GROUP* aGroup, bool aVisible ) const; - - /// Updates items stored in a VIEW_GROUP with selected update flag - void vgUpdate( KiGfx::VIEW_GROUP* aGroup, KiGfx::VIEW_ITEM::ViewUpdateFlags aFlags ) const; - /// Saves the state of items and allows to restore them ITEM_STATE m_state; /// Selection tool used for obtaining selected items SELECTION_TOOL* m_selectionTool; - - /// Set of selected items (obtained from pcbnew.InteractiveSelection tool) - std::set m_selection; - - /// VIEW_GROUP that helds currently moved items - KiGfx::VIEW_GROUP m_items; }; #endif diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index b6299e8208..39abf86c22 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -53,20 +54,19 @@ SELECTION_TOOL::SELECTION_TOOL() : TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ), m_multiple( false ) { m_selArea = new SELECTION_AREA; + m_selection.group = new KiGfx::VIEW_GROUP; } SELECTION_TOOL::~SELECTION_TOOL() { - if( m_selArea ) - delete m_selArea; + delete m_selArea; + delete m_selection.group; } void SELECTION_TOOL::Reset() { - m_selectedItems.clear(); - // The tool launches upon reception of action event ("pcbnew.InteractiveSelection") Go( &SELECTION_TOOL::Main, COMMON_ACTIONS::selectionActivate.MakeEvent() ); } @@ -75,8 +75,11 @@ void SELECTION_TOOL::Reset() int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) { BOARD* board = getModel( PCB_T ); + VIEW* view = getView(); assert( board != NULL ); + view->Add( m_selection.group ); + // Main loop: keep receiving events while( OPT_TOOL_EVENT evt = Wait() ) { @@ -86,7 +89,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) if( evt->IsCancel() ) { - if( !m_selectedItems.empty() ) // Cancel event deselects items... + if( !m_selection.Empty() ) // Cancel event deselects items... clearSelection(); else // ...unless there is nothing selected break; // then exit the tool @@ -99,7 +102,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) // drag with LMB? Select multiple objects (or at least draw a selection box) or drag them if( evt->IsDrag( MB_Left ) ) { - if( m_selectedItems.empty() || m_additive ) + if( m_selection.Empty() || m_additive ) { // If nothings has been selected or user wants to select more // draw the selection box @@ -112,7 +115,6 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) { // Yes -> run the move tool and wait till it finishes m_toolMgr->InvokeTool( "pcbnew.InteractiveMove" ); - Wait(); } else { @@ -123,6 +125,9 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) } } + m_selection.group->Clear(); + view->Remove( m_selection.group ); + return 0; } @@ -137,9 +142,13 @@ void SELECTION_TOOL::AddMenuItem( const TOOL_ACTION& aAction ) void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) { - if( m_selectedItems.find( aItem ) != m_selectedItems.end() ) + if( m_selection.items.find( aItem ) != m_selection.items.end() ) { deselectItem( aItem ); + + // If there is nothing selected, disable the context menu + if( m_selection.Empty() ) + SetContextMenu( &m_menu, CMENU_OFF ); } else { @@ -148,19 +157,29 @@ void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) // Prevent selection of invisible or inactive items if( selectable( aItem ) ) + { selectItem( aItem ); + + // Now the context menu should be enabled + SetContextMenu( &m_menu, CMENU_BUTTON ); + } } } void SELECTION_TOOL::clearSelection() { - BOOST_FOREACH( BOARD_ITEM* item, m_selectedItems ) + VIEW_GROUP::const_iter it, it_end; + for( it = m_selection.group->Begin(), it_end = m_selection.group->End(); it != it_end; ++it ) { + BOARD_ITEM* item = static_cast( *it ); + + item->ViewSetVisible( true ); item->ClearSelected(); } - m_selectedItems.clear(); + m_selection.group->Clear(); + m_selection.items.clear(); // Do not show the context menu when there is nothing selected SetContextMenu( &m_menu, CMENU_OFF ); @@ -258,9 +277,6 @@ bool SELECTION_TOOL::selectMultiple() VIEW* view = getView(); getViewControls()->SetAutoPan( true ); - // These 2 lines remove the blink-in-the-random-place effect - m_selArea->SetOrigin( VECTOR2I( 0, 0 ) ); - m_selArea->SetEnd( VECTOR2I( 0, 0 ) ); view->Add( m_selArea ); while( OPT_TOOL_EVENT evt = Wait() ) @@ -300,14 +316,11 @@ bool SELECTION_TOOL::selectMultiple() // Add only those items that are visible and fully within the selection box if( selectable( item ) && selectionBox.Contains( item->ViewBBox() ) ) - { - item->SetSelected(); - m_selectedItems.insert( item ); - } + selectItem( item ); } // Now the context menu should be enabled - if( !m_selectedItems.empty() ) + if( !m_selection.Empty() ) SetContextMenu( &m_menu, CMENU_BUTTON ); break; @@ -377,6 +390,7 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) } } + // Removes possible brighten mark getView()->MarkTargetDirty( TARGET_OVERLAY ); // Restore the original menu @@ -464,13 +478,98 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const } +void SELECTION_TOOL::selectItem( BOARD_ITEM* aItem ) +{ + /// Selecting an item needs a few operations, so they are wrapped in a functor + class selectBase_ + { + SELECTION& s; + + public: + selectBase_( SELECTION& s_ ) : s( s_ ) {} + + void operator()( BOARD_ITEM* item ) + { + s.group->Add( item ); + // Hide the original item, so it is shown only on overlay + item->ViewSetVisible( false ); + item->SetSelected(); + } + } selectBase( m_selection ); + + // Modules are treated in a special way - when they are moved, we have to + // move all the parts that make the module, not the module itself + if( aItem->Type() == PCB_MODULE_T ) + { + MODULE* module = static_cast( aItem ); + + // Add everything that belongs to the module (besides the module itself) + for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) + selectBase( pad ); + + for( BOARD_ITEM* drawing = module->GraphicalItems().GetFirst(); drawing; + drawing = drawing->Next() ) + selectBase( drawing ); + + selectBase( &module->Reference() ); + selectBase( &module->Value() ); + } + + // Add items to the VIEW_GROUP, so they will be displayed on the overlay + selectBase( aItem ); + m_selection.items.insert( aItem ); +} + + +void SELECTION_TOOL::deselectItem( BOARD_ITEM* aItem ) +{ + /// Deselecting an item needs a few operations, so they are wrapped in a functor + class deselectBase_ + { + SELECTION& s; + + public: + deselectBase_( SELECTION& s_ ) : s( s_ ) {} + + void operator()( BOARD_ITEM* item ) + { + s.group->Remove( item ); + // Restore original item visibility + item->ViewSetVisible( true ); + item->ClearSelected(); + } + } deselectBase( m_selection ); + + // Modules are treated in a special way - when they are moved, we have to + // move all the parts that make the module, not the module itself + if( aItem->Type() == PCB_MODULE_T ) + { + MODULE* module = static_cast( aItem ); + + // Add everything that belongs to the module (besides the module itself) + for( D_PAD* pad = module->Pads().GetFirst(); pad; pad = pad->Next() ) + deselectBase( pad ); + + for( BOARD_ITEM* drawing = module->GraphicalItems().GetFirst(); drawing; + drawing = drawing->Next() ) + deselectBase( drawing ); + + deselectBase( &module->Reference() ); + deselectBase( &module->Value() ); + } + + deselectBase( aItem ); + m_selection.items.erase( aItem ); +} + + bool SELECTION_TOOL::containsSelected( const VECTOR2I& aPoint ) const { const unsigned GRIP_MARGIN = 500000; // Check if the point is located within any of the currently selected items bounding boxes std::set::iterator it, it_end; - for( it = m_selectedItems.begin(), it_end = m_selectedItems.end(); it != it_end; ++it ) + for( it = m_selection.items.begin(), it_end = m_selection.items.end(); it != it_end; ++it ) { BOX2I itemBox = (*it)->ViewBBox(); itemBox.Inflate( GRIP_MARGIN ); // Give some margin for gripping an item diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 8dc8982bd6..8960779a4a 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -36,6 +36,11 @@ class SELECTION_AREA; class BOARD_ITEM; class GENERAL_COLLECTOR; +namespace KiGfx +{ +class VIEW_GROUP; +} + /** * Class SELECTION_TOOL * @@ -54,6 +59,18 @@ public: SELECTION_TOOL(); ~SELECTION_TOOL(); + struct SELECTION + { + /// Set of selected items + std::set items; + + /// VIEW_GROUP that holds currently selected items + KiGfx::VIEW_GROUP* group; + + /// Checks if there is anything selected + bool Empty() const { return items.empty(); } + }; + /// @copydoc TOOL_INTERACTIVE::Reset() void Reset(); @@ -69,9 +86,9 @@ public: * * Returns the set of currently selected items. */ - const std::set& GetSelection() const + const SELECTION& GetSelection() const { - return m_selectedItems; + return m_selection; } /** @@ -145,14 +162,7 @@ private: * * @param aItem is an item to be selected. */ - void selectItem( BOARD_ITEM* aItem ) - { - aItem->SetSelected(); - m_selectedItems.insert( aItem ); - - // Now the context menu should be enabled - SetContextMenu( &m_menu, CMENU_BUTTON ); - } + void selectItem( BOARD_ITEM* aItem ); /** * Function deselectItem() @@ -160,15 +170,7 @@ private: * * @param aItem is an item to be deselected. */ - void deselectItem( BOARD_ITEM* aItem ) - { - aItem->ClearSelected(); - m_selectedItems.erase( aItem ); - - if( m_selectedItems.empty() ) - // If there is nothing selected, disable the context menu - SetContextMenu( &m_menu, CMENU_OFF ); - } + void deselectItem( BOARD_ITEM* aItem ); /** * Function containsSelected() @@ -178,12 +180,12 @@ private: */ bool containsSelected( const VECTOR2I& aPoint ) const; - /// Container storing currently selected items - std::set m_selectedItems; - /// Visual representation of selection box SELECTION_AREA* m_selArea; + /// Current state of selection + SELECTION m_selection; + /// Flag saying if items should be added to the current selection or rather replace it bool m_additive; From 094d6de8e0e83322fb5b7d8735858f650741cb93 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 2 Oct 2013 11:21:17 +0200 Subject: [PATCH 391/415] Fixed reset for the selection tool. --- pcbnew/tools/selection_tool.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 39abf86c22..757a846712 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -67,6 +67,13 @@ SELECTION_TOOL::~SELECTION_TOOL() void SELECTION_TOOL::Reset() { + m_selection.group->Clear(); + m_selection.items.clear(); + + // Reinsert the VIEW_GROUP, in case it was removed from the VIEW + getView()->Remove( m_selection.group ); + getView()->Add( m_selection.group ); + // The tool launches upon reception of action event ("pcbnew.InteractiveSelection") Go( &SELECTION_TOOL::Main, COMMON_ACTIONS::selectionActivate.MakeEvent() ); } From 93fc797b2e4d7dd4fa431af0235044e9cf181a7c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 2 Oct 2013 11:25:04 +0200 Subject: [PATCH 392/415] Added missing ViewUpdate flag --- pcbnew/tools/move_tool.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp index f3a027e410..39324538d1 100644 --- a/pcbnew/tools/move_tool.cpp +++ b/pcbnew/tools/move_tool.cpp @@ -148,6 +148,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) if( restore ) { // Modifications has to be rollbacked, so restore the previous state of items + selection.group->ItemsViewUpdate( VIEW_ITEM::APPEARANCE ); m_state.RestoreAll(); } else From eeeffd1ad121716653c79ebfca989f0285e8dade Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 2 Oct 2013 11:39:08 +0200 Subject: [PATCH 393/415] Removed SELECTION layer. --- include/layers_id_colors_and_visibility.h | 1 - pcbnew/basepcbframe.cpp | 3 +- pcbnew/class_dimension.cpp | 12 -- pcbnew/class_dimension.h | 3 - pcbnew/class_module.cpp | 7 -- pcbnew/class_module.h | 3 - pcbnew/class_pcb_text.cpp | 11 -- pcbnew/class_pcb_text.h | 3 - pcbnew/class_text_mod.cpp | 5 +- pcbnew/pcb_painter.cpp | 132 +++++++--------------- pcbnew/pcb_painter.h | 4 - pcbnew/pcbframe.cpp | 4 +- pcbnew/tools/bright_box.h | 2 +- 13 files changed, 45 insertions(+), 145 deletions(-) diff --git a/include/layers_id_colors_and_visibility.h b/include/layers_id_colors_and_visibility.h index 71a3309dbc..49b0b03508 100644 --- a/include/layers_id_colors_and_visibility.h +++ b/include/layers_id_colors_and_visibility.h @@ -261,7 +261,6 @@ enum PCB_VISIBLE PAD_BK_NETNAMES_VISIBLE, PADS_NETNAMES_VISIBLE, - SELECTION, WORKSHEET, GP_OVERLAY, // General purpose overlay diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 63e3636314..c41f2cf618 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -72,7 +72,7 @@ static const wxString FastGrid2Entry( wxT( "FastGrid2" ) ); const LAYER_NUM PCB_BASE_FRAME::GAL_LAYER_ORDER[] = { - ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( SELECTION ), + ITEM_GAL_LAYER( GP_OVERLAY ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), DRAW_N, COMMENT_N, ECO1_N, ECO2_N, EDGE_N, UNUSED_LAYER_29, UNUSED_LAYER_30, UNUSED_LAYER_31, @@ -895,7 +895,6 @@ void PCB_BASE_FRAME::LoadSettings() view->SetRequired( SOLDERPASTE_N_BACK, ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); view->SetRequired( SOLDERMASK_N_BACK, ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); - view->SetLayerTarget( ITEM_GAL_LAYER( SELECTION ), KiGfx::TARGET_OVERLAY ); view->SetLayerTarget( ITEM_GAL_LAYER( GP_OVERLAY ), KiGfx::TARGET_OVERLAY ); // Apply layer coloring scheme & display options diff --git a/pcbnew/class_dimension.cpp b/pcbnew/class_dimension.cpp index f7dacdc2a6..da5b9d9201 100644 --- a/pcbnew/class_dimension.cpp +++ b/pcbnew/class_dimension.cpp @@ -508,18 +508,6 @@ const BOX2I DIMENSION::ViewBBox() const } -void DIMENSION::ViewGetLayers( int aLayers[], int& aCount ) const -{ - // Layer that simply displays the text - aLayers[0] = m_Layer; - - // On the general purpose overlay there is a selection box displayed - aLayers[1] = ITEM_GAL_LAYER( SELECTION ); - - aCount = 2; -} - - EDA_ITEM* DIMENSION::Clone() const { return new DIMENSION( *this ); diff --git a/pcbnew/class_dimension.h b/pcbnew/class_dimension.h index 25baeca80f..efb5a28d3f 100644 --- a/pcbnew/class_dimension.h +++ b/pcbnew/class_dimension.h @@ -147,9 +147,6 @@ public: /// @copydoc VIEW_ITEM::ViewBBox() virtual const BOX2I ViewBBox() const; - /// @copydoc VIEW_ITEM::ViewGetLayers() - virtual void ViewGetLayers( int aLayers[], int& aCount ) const; - #if defined(DEBUG) virtual void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override #endif diff --git a/pcbnew/class_module.cpp b/pcbnew/class_module.cpp index 16ec8401d5..aef466c887 100644 --- a/pcbnew/class_module.cpp +++ b/pcbnew/class_module.cpp @@ -1024,10 +1024,3 @@ void MODULE::SetOrientation( double newangle ) CalculateBoundingBox(); } - -void MODULE::ViewGetLayers( int aLayers[], int& aCount ) const -{ - aCount = 2; - aLayers[0] = ITEM_GAL_LAYER( SELECTION ); // Selection box - aLayers[1] = m_Layer; -} diff --git a/pcbnew/class_module.h b/pcbnew/class_module.h index 1ea961ec37..ad83e94f8c 100644 --- a/pcbnew/class_module.h +++ b/pcbnew/class_module.h @@ -499,9 +499,6 @@ public: /// Return the initial comments block or NULL if none, without transfer of ownership. const wxArrayString* GetInitialComments() const { return m_initial_comments; } - /// @copydoc VIEW_ITEM::ViewGetLayers() - virtual void ViewGetLayers( int aLayers[], int& aCount ) const; - #if defined(DEBUG) virtual void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override #endif diff --git a/pcbnew/class_pcb_text.cpp b/pcbnew/class_pcb_text.cpp index 15920fa968..ac14a42e05 100644 --- a/pcbnew/class_pcb_text.cpp +++ b/pcbnew/class_pcb_text.cpp @@ -224,14 +224,3 @@ const BOX2I TEXTE_PCB::ViewBBox() const } } - -void TEXTE_PCB::ViewGetLayers( int aLayers[], int& aCount ) const -{ - // Layer that simply displays the text - aLayers[0] = m_Layer; - - // On the general purpose overlay there is a selection box displayed - aLayers[1] = ITEM_GAL_LAYER( SELECTION ); - - aCount = 2; -} diff --git a/pcbnew/class_pcb_text.h b/pcbnew/class_pcb_text.h index d8896d7ea9..e577489be9 100644 --- a/pcbnew/class_pcb_text.h +++ b/pcbnew/class_pcb_text.h @@ -134,9 +134,6 @@ public: /// @copydoc VIEW_ITEM::ViewBBox() virtual const BOX2I ViewBBox() const; - /// @copydoc VIEW_ITEM::ViewGetLayers() - virtual void ViewGetLayers( int aLayers[], int& aCount ) const; - #if defined(DEBUG) virtual void Show( int nestLevel, std::ostream& os ) const { ShowDummy( os ); } // override #endif diff --git a/pcbnew/class_text_mod.cpp b/pcbnew/class_text_mod.cpp index e4f28f31b1..31b6a4d595 100644 --- a/pcbnew/class_text_mod.cpp +++ b/pcbnew/class_text_mod.cpp @@ -472,8 +472,5 @@ void TEXTE_MODULE::ViewGetLayers( int aLayers[], int& aCount ) const break; } - // On the general purpose overlay there is a selection box displayed - aLayers[1] = ITEM_GAL_LAYER( SELECTION ); - - aCount = 2; + aCount = 1; } diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index a0c29c5602..d721cc1a05 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -76,7 +76,6 @@ void PCB_RENDER_SETTINGS::ImportLegacyColors( COLORS_DESIGN_SETTINGS* aSettings m_layerColors[ITEM_GAL_LAYER( PAD_FR_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); m_layerColors[ITEM_GAL_LAYER( PAD_BK_NETNAMES_VISIBLE )] = COLOR4D( 0.8, 0.8, 0.8, 0.7 ); m_layerColors[ITEM_GAL_LAYER( WORKSHEET )] = COLOR4D( 0.5, 0.0, 0.0, 1.0 ); - m_layerColors[ITEM_GAL_LAYER( SELECTION )] = COLOR4D( 1.0, 1.0, 1.0, 0.5 ); // Netnames for copper layers for( LAYER_NUM layer = FIRST_COPPER_LAYER; layer <= LAST_COPPER_LAYER; ++layer ) @@ -227,10 +226,6 @@ bool PCB_PAINTER::Draw( const VIEW_ITEM* aItem, int aLayer ) draw( (DRAWSEGMENT*) aItem ); break; - case PCB_MODULE_T: - draw( (MODULE*) aItem, aLayer ); - break; - case PCB_TEXT_T: draw( (TEXTE_PCB*) aItem, aLayer ); break; @@ -699,63 +694,35 @@ void PCB_PAINTER::draw( const DRAWSEGMENT* aSegment ) } -void PCB_PAINTER::draw( const MODULE* aModule, int aLayer ) -{ - // For modules we have to draw a selection box if needed - if( aLayer == ITEM_GAL_LAYER( SELECTION ) ) - { - if( aModule->IsSelected() ) - drawSelectionBox( aModule ); - } -} - - void PCB_PAINTER::draw( const TEXTE_PCB* aText, int aLayer ) { - if( aLayer == ITEM_GAL_LAYER( SELECTION ) ) - { - if( aText->IsSelected() ) - drawSelectionBox( aText ); - } - else - { - if( aText->GetText().Length() == 0 ) - return; + if( aText->GetText().Length() == 0 ) + return; - COLOR4D strokeColor = m_pcbSettings->GetColor( aText, aText->GetLayer() ); - VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y ); - double orientation = aText->GetOrientation() * M_PI / 1800.0; + COLOR4D strokeColor = m_pcbSettings->GetColor( aText, aText->GetLayer() ); + VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y ); + double orientation = aText->GetOrientation() * M_PI / 1800.0; - m_gal->SetStrokeColor( strokeColor ); - m_gal->SetLineWidth( aText->GetThickness() ); - m_gal->SetTextAttributes( aText ); - m_gal->StrokeText( std::string( aText->GetText().mb_str() ), position, orientation ); - } + m_gal->SetStrokeColor( strokeColor ); + m_gal->SetLineWidth( aText->GetThickness() ); + m_gal->SetTextAttributes( aText ); + m_gal->StrokeText( std::string( aText->GetText().mb_str() ), position, orientation ); } void PCB_PAINTER::draw( const TEXTE_MODULE* aText, int aLayer ) { - if( aLayer == ITEM_GAL_LAYER( SELECTION ) ) - { - if( aText->IsSelected() ) - drawSelectionBox( aText ); - } - else - { - if( aText->GetLength() == 0 ) - return; + if( aText->GetLength() == 0 ) + return; - COLOR4D strokeColor = m_pcbSettings->GetColor( aText, aLayer ); - VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y ); - double orientation = aText->GetDrawRotation() * M_PI / 1800.0; - - m_gal->SetStrokeColor( strokeColor ); - m_gal->SetLineWidth( aText->GetThickness() ); - m_gal->SetTextAttributes( aText ); - m_gal->StrokeText( std::string( aText->GetText().mb_str() ), position, orientation ); - } + COLOR4D strokeColor = m_pcbSettings->GetColor( aText, aLayer ); + VECTOR2D position( aText->GetTextPosition().x, aText->GetTextPosition().y ); + double orientation = aText->GetDrawRotation() * M_PI / 1800.0; + m_gal->SetStrokeColor( strokeColor ); + m_gal->SetLineWidth( aText->GetThickness() ); + m_gal->SetTextAttributes( aText ); + m_gal->StrokeText( std::string( aText->GetText().mb_str() ), position, orientation ); } @@ -830,41 +797,32 @@ void PCB_PAINTER::draw( const ZONE_CONTAINER* aZone ) void PCB_PAINTER::draw( const DIMENSION* aDimension, int aLayer ) { - if( aLayer == ITEM_GAL_LAYER( SELECTION ) ) - { - if( aDimension->IsSelected() ) - drawSelectionBox( aDimension ); - } - else - { - int layer = aDimension->GetLayer(); - COLOR4D strokeColor = m_pcbSettings->GetColor( aDimension, layer ); + COLOR4D strokeColor = m_pcbSettings->GetColor( aDimension, aLayer ); - m_gal->SetStrokeColor( strokeColor ); - m_gal->SetIsFill( false ); - m_gal->SetIsStroke( true ); - m_gal->SetLineWidth( aDimension->GetWidth() ); + m_gal->SetStrokeColor( strokeColor ); + m_gal->SetIsFill( false ); + m_gal->SetIsStroke( true ); + m_gal->SetLineWidth( aDimension->GetWidth() ); - // Draw an arrow - m_gal->DrawLine( VECTOR2D( aDimension->m_crossBarO ), VECTOR2D( aDimension->m_crossBarF ) ); - m_gal->DrawLine( VECTOR2D( aDimension->m_featureLineGO ), - VECTOR2D( aDimension->m_featureLineGF ) ); - m_gal->DrawLine( VECTOR2D( aDimension->m_featureLineDO ), - VECTOR2D( aDimension->m_featureLineDF ) ); - m_gal->DrawLine( VECTOR2D( aDimension->m_arrowD1O ), VECTOR2D( aDimension->m_arrowD1F ) ); - m_gal->DrawLine( VECTOR2D( aDimension->m_arrowD2O ), VECTOR2D( aDimension->m_arrowD2F ) ); - m_gal->DrawLine( VECTOR2D( aDimension->m_arrowG1O ), VECTOR2D( aDimension->m_arrowG1F ) ); - m_gal->DrawLine( VECTOR2D( aDimension->m_arrowG2O ), VECTOR2D( aDimension->m_arrowG2F ) ); + // Draw an arrow + m_gal->DrawLine( VECTOR2D( aDimension->m_crossBarO ), VECTOR2D( aDimension->m_crossBarF ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_featureLineGO ), + VECTOR2D( aDimension->m_featureLineGF ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_featureLineDO ), + VECTOR2D( aDimension->m_featureLineDF ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_arrowD1O ), VECTOR2D( aDimension->m_arrowD1F ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_arrowD2O ), VECTOR2D( aDimension->m_arrowD2F ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_arrowG1O ), VECTOR2D( aDimension->m_arrowG1F ) ); + m_gal->DrawLine( VECTOR2D( aDimension->m_arrowG2O ), VECTOR2D( aDimension->m_arrowG2F ) ); - // Draw text - TEXTE_PCB& text = aDimension->Text(); - VECTOR2D position( text.GetTextPosition().x, text.GetTextPosition().y ); - double orientation = text.GetOrientation() * M_PI / 1800.0; + // Draw text + TEXTE_PCB& text = aDimension->Text(); + VECTOR2D position( text.GetTextPosition().x, text.GetTextPosition().y ); + double orientation = text.GetOrientation() * M_PI / 1800.0; - m_gal->SetLineWidth( text.GetThickness() ); - m_gal->SetTextAttributes( &text ); - m_gal->StrokeText( std::string( text.GetText().mb_str() ), position, orientation ); - } + m_gal->SetLineWidth( text.GetThickness() ); + m_gal->SetTextAttributes( &text ); + m_gal->StrokeText( std::string( text.GetText().mb_str() ), position, orientation ); } @@ -904,14 +862,4 @@ void PCB_PAINTER::draw( const PCB_TARGET* aTarget ) } -void PCB_PAINTER::drawSelectionBox( const VIEW_ITEM* aItem ) const -{ - BOX2I boundingBox = aItem->ViewBBox(); - - m_gal->SetIsStroke( false ); - m_gal->SetIsFill( true ); - m_gal->SetFillColor( m_pcbSettings->GetLayerColor( ITEM_GAL_LAYER( SELECTION ) ) ); - m_gal->DrawRectangle( boundingBox.GetOrigin(), boundingBox.GetEnd() ); -} - const double PCB_RENDER_SETTINGS::MAX_FONT_SIZE = 100000000; diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 4532fc49b6..7f9844ee41 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -146,15 +146,11 @@ protected: void draw( const SEGVIA*, int ); void draw( const D_PAD*, int ); void draw( const DRAWSEGMENT* ); - void draw( const MODULE*, int ); void draw( const TEXTE_PCB*, int ); void draw( const TEXTE_MODULE*, int ); void draw( const ZONE_CONTAINER* ); void draw( const DIMENSION*, int ); void draw( const PCB_TARGET* ); - - /// Draws a white semitransparent box indicating an item as selected - void drawSelectionBox( const VIEW_ITEM* aItem ) const; }; } // namespace KiGfx diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 67f905f5fc..a5b7b933ee 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -791,7 +791,7 @@ void PCB_EDIT_FRAME::setHighContrastLayer( LAYER_NUM aLayer ) GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), - ITEM_GAL_LAYER( SELECTION ), ITEM_GAL_LAYER( GP_OVERLAY ) + ITEM_GAL_LAYER( GP_OVERLAY ) }; for( unsigned int i = 0; i < sizeof( layers ) / sizeof( LAYER_NUM ); ++i ) @@ -831,7 +831,7 @@ void PCB_EDIT_FRAME::setTopLayer( LAYER_NUM aLayer ) GetNetnameLayer( aLayer ), ITEM_GAL_LAYER( VIAS_VISIBLE ), ITEM_GAL_LAYER( VIAS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_VISIBLE ), ITEM_GAL_LAYER( PADS_HOLES_VISIBLE ), ITEM_GAL_LAYER( PADS_NETNAMES_VISIBLE ), - ITEM_GAL_LAYER( SELECTION ), ITEM_GAL_LAYER( GP_OVERLAY ) + ITEM_GAL_LAYER( GP_OVERLAY ) }; for( unsigned int i = 0; i < sizeof( layers ) / sizeof( LAYER_NUM ); ++i ) diff --git a/pcbnew/tools/bright_box.h b/pcbnew/tools/bright_box.h index e1748dbd28..e07a4b37e1 100644 --- a/pcbnew/tools/bright_box.h +++ b/pcbnew/tools/bright_box.h @@ -52,7 +52,7 @@ public: } private: - static const int BrightBoxLayer = ITEM_GAL_LAYER( SELECTION ); + static const int BrightBoxLayer = ITEM_GAL_LAYER( GP_OVERLAY ); static const KiGfx::COLOR4D BrightColor; static const double LineWidth = 100000.0; From dfdacba6498e7e6ad6863cd5d9132fd942ac331c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 2 Oct 2013 12:02:25 +0200 Subject: [PATCH 394/415] Worksheet is not selectable anymore. --- pcbnew/tools/selection_tool.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 757a846712..e03a9e9a2f 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -471,10 +471,12 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const return false; break; + // These are not selectable, otherwise silkscreen drawings would be easily destroyed case PCB_MODULE_EDGE_T: - // These are not selectable, otherwise silkscreen drawings would be easily destroyed + // and some other stuff that should be selected + case NOT_USED: + case TYPE_NOT_INIT: return false; - break; default: // Suppress warnings break; From 8223f9742e5d8cf0713c333468fe80970326c3c6 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 2 Oct 2013 13:57:21 +0200 Subject: [PATCH 395/415] Fixed memory leak caused by ViewUpdate() with VIEW_ITEM::GEOMETRY/LAYER parameters. --- common/view/view.cpp | 12 +++++++----- include/view/view.h | 2 +- pcbnew/tools/move_tool.cpp | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/common/view/view.cpp b/common/view/view.cpp index 10d52c62d7..b8c54e3025 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -676,9 +676,9 @@ struct VIEW::unlinkItem }; -struct VIEW::recacheLayer +struct VIEW::recacheItem { - recacheLayer( VIEW* aView, GAL* aGal, int aLayer, bool aImmediately ) : + recacheItem( VIEW* aView, GAL* aGal, int aLayer, bool aImmediately ) : view( aView ), gal( aGal ), layer( aLayer ), immediately( aImmediately ) { } @@ -688,9 +688,7 @@ struct VIEW::recacheLayer // Remove previously cached group int prevGroup = aItem->getGroup( layer ); if( prevGroup >= 0 ) - { gal->DeleteGroup( prevGroup ); - } if( immediately ) { @@ -882,6 +880,10 @@ void VIEW::updateItemGeometry( VIEW_ITEM* aItem, int aLayer ) m_gal->SetLayerDepth( l.renderingOrder ); // Redraw the item from scratch + int prevGroup = aItem->getGroup( aLayer ); + if( prevGroup >= 0 ) + m_gal->DeleteGroup( prevGroup ); + int group = m_gal->BeginGroup(); aItem->setGroup( aLayer, group ); m_painter->Draw( static_cast( aItem ), aLayer ); @@ -966,7 +968,7 @@ void VIEW::RecacheAllItems( bool aImmediately ) { m_gal->SetTarget( l->target ); m_gal->SetLayerDepth( l->renderingOrder ); - recacheLayer visitor( this, m_gal, l->id, aImmediately ); + recacheItem visitor( this, m_gal, l->id, aImmediately ); l->items->Query( r, visitor ); MarkTargetDirty( l->target ); } diff --git a/include/view/view.h b/include/view/view.h index 0dd12e803a..9abf733f47 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -500,7 +500,7 @@ private: // Function objects that need to access VIEW/VIEW_ITEM private/protected members struct clearLayerCache; - struct recacheLayer; + struct recacheItem; struct drawItem; struct unlinkItem; struct updateItemsColor; diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp index 39324538d1..6642984ca1 100644 --- a/pcbnew/tools/move_tool.cpp +++ b/pcbnew/tools/move_tool.cpp @@ -78,7 +78,7 @@ bool MOVE_TOOL::Init() int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) { - const SELECTION_TOOL::SELECTION selection = m_selectionTool->GetSelection(); + const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); if( selection.Empty() ) return 0; // there are no items to operate on From ebb42aa419fb6a4187b52751e71cb59059574f14 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 2 Oct 2013 14:26:14 +0200 Subject: [PATCH 396/415] Renamed WORKSHEET_ITEM to WORKSHEET_VIEWITEM. --- common/CMakeLists.txt | 2 +- ...ksheet_item.cpp => worksheet_viewitem.cpp} | 26 +++++++++---------- ...{worksheet_item.h => worksheet_viewitem.h} | 12 ++++----- pcbnew/basepcbframe.cpp | 4 +-- 4 files changed, 22 insertions(+), 22 deletions(-) rename common/{worksheet_item.cpp => worksheet_viewitem.cpp} (86%) rename include/{worksheet_item.h => worksheet_viewitem.h} (94%) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index bbe7d2934f..7c195331d7 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -32,7 +32,7 @@ set(GAL_SRCS # Common part drawpanel_gal.cpp painter.cpp - worksheet_item.cpp + worksheet_viewitem.cpp gal/graphics_abstraction_layer.cpp gal/stroke_font.cpp gal/color4d.cpp diff --git a/common/worksheet_item.cpp b/common/worksheet_viewitem.cpp similarity index 86% rename from common/worksheet_item.cpp rename to common/worksheet_viewitem.cpp index e46d3e2822..80028a3236 100644 --- a/common/worksheet_item.cpp +++ b/common/worksheet_viewitem.cpp @@ -23,11 +23,11 @@ */ /** - * @file worksheet_item.cpp + * @file worksheet_viewitem.cpp * @brief Class that handles properties and drawing of worksheet layout. */ -#include +#include #include #include #include @@ -36,28 +36,28 @@ using namespace KiGfx; -WORKSHEET_ITEM::WORKSHEET_ITEM( const std::string& aFileName, const std::string& aSheetName, +WORKSHEET_VIEWITEM::WORKSHEET_VIEWITEM( const std::string& aFileName, const std::string& aSheetName, const PAGE_INFO* aPageInfo, const TITLE_BLOCK* aTitleBlock ) : EDA_ITEM( NOT_USED ), // this item is never added to a BOARD so it needs no type m_fileName( aFileName ), m_sheetName( aSheetName ), m_titleBlock( aTitleBlock ), m_pageInfo( aPageInfo ), m_sheetNumber( 1 ), m_sheetCount( 1 ) {} -void WORKSHEET_ITEM::SetPageInfo( const PAGE_INFO* aPageInfo ) +void WORKSHEET_VIEWITEM::SetPageInfo( const PAGE_INFO* aPageInfo ) { m_pageInfo = aPageInfo; ViewUpdate( GEOMETRY ); } -void WORKSHEET_ITEM::SetTitleBlock( const TITLE_BLOCK* aTitleBlock ) +void WORKSHEET_VIEWITEM::SetTitleBlock( const TITLE_BLOCK* aTitleBlock ) { m_titleBlock = aTitleBlock; ViewUpdate( GEOMETRY ); } -const BOX2I WORKSHEET_ITEM::ViewBBox() const +const BOX2I WORKSHEET_VIEWITEM::ViewBBox() const { BOX2I bbox; @@ -76,7 +76,7 @@ const BOX2I WORKSHEET_ITEM::ViewBBox() const } -void WORKSHEET_ITEM::ViewDraw( int aLayer, GAL* aGal ) const +void WORKSHEET_VIEWITEM::ViewDraw( int aLayer, GAL* aGal ) const { RENDER_SETTINGS* settings = m_view->GetPainter()->GetSettings(); wxString fileName( m_fileName.c_str(), wxConvUTF8 ); @@ -128,14 +128,14 @@ void WORKSHEET_ITEM::ViewDraw( int aLayer, GAL* aGal ) const } -void WORKSHEET_ITEM::ViewGetLayers( int aLayers[], int& aCount ) const +void WORKSHEET_VIEWITEM::ViewGetLayers( int aLayers[], int& aCount ) const { aCount = 1; aLayers[0] = ITEM_GAL_LAYER( WORKSHEET ); } -void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_LINE* aItem, GAL* aGal ) const +void WORKSHEET_VIEWITEM::draw( const WS_DRAW_ITEM_LINE* aItem, GAL* aGal ) const { aGal->SetIsStroke( true ); aGal->SetIsFill( false ); @@ -145,7 +145,7 @@ void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_LINE* aItem, GAL* aGal ) const } -void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_RECT* aItem, GAL* aGal ) const +void WORKSHEET_VIEWITEM::draw( const WS_DRAW_ITEM_RECT* aItem, GAL* aGal ) const { aGal->SetIsStroke( true ); aGal->SetIsFill( false ); @@ -155,7 +155,7 @@ void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_RECT* aItem, GAL* aGal ) const } -void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_POLYGON* aItem, GAL* aGal ) const +void WORKSHEET_VIEWITEM::draw( const WS_DRAW_ITEM_POLYGON* aItem, GAL* aGal ) const { std::deque corners; BOOST_FOREACH( wxPoint point, aItem->m_Corners ) @@ -181,7 +181,7 @@ void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_POLYGON* aItem, GAL* aGal ) const } -void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_TEXT* aItem, GAL* aGal ) const +void WORKSHEET_VIEWITEM::draw( const WS_DRAW_ITEM_TEXT* aItem, GAL* aGal ) const { VECTOR2D position( aItem->GetTextPosition().x, aItem->GetTextPosition().y ); @@ -192,7 +192,7 @@ void WORKSHEET_ITEM::draw( const WS_DRAW_ITEM_TEXT* aItem, GAL* aGal ) const } -void WORKSHEET_ITEM::drawBorder( GAL* aGal ) const +void WORKSHEET_VIEWITEM::drawBorder( GAL* aGal ) const { VECTOR2D origin = VECTOR2D( 0.0, 0.0 ); VECTOR2D end = VECTOR2D( m_pageInfo->GetWidthMils() * 25400, diff --git a/include/worksheet_item.h b/include/worksheet_viewitem.h similarity index 94% rename from include/worksheet_item.h rename to include/worksheet_viewitem.h index 8b2b7d2165..fd7595f626 100644 --- a/include/worksheet_item.h +++ b/include/worksheet_viewitem.h @@ -23,12 +23,12 @@ */ /** - * @file worksheet_item.h + * @file worksheet_viewitem.h * @brief Class that handles properties and drawing of worksheet layout. */ -#ifndef WORKSHEET_ITEM_H -#define WORKSHEET_ITEM_H +#ifndef WORKSHEET_VIEWITEM_H +#define WORKSHEET_VIEWITEM_H #include @@ -44,10 +44,10 @@ namespace KiGfx { class GAL; -class WORKSHEET_ITEM : public EDA_ITEM +class WORKSHEET_VIEWITEM : public EDA_ITEM { public: - WORKSHEET_ITEM( const std::string& aFileName, const std::string& aSheetName, + WORKSHEET_VIEWITEM( const std::string& aFileName, const std::string& aSheetName, const PAGE_INFO* aPageInfo, const TITLE_BLOCK* aTitleBlock ); /** @@ -159,4 +159,4 @@ protected: }; } -#endif /* WORKSHEET_ITEM_H */ +#endif /* WORKSHEET_VIEWITEM_H */ diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index c41f2cf618..472992216e 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include @@ -240,7 +240,7 @@ void PCB_BASE_FRAME::ViewReloadBoard( const BOARD* aBoard ) const } // Add an entry for the worksheet layout - KiGfx::WORKSHEET_ITEM* worksheet = new KiGfx::WORKSHEET_ITEM( + KiGfx::WORKSHEET_VIEWITEM* worksheet = new KiGfx::WORKSHEET_VIEWITEM( std::string( aBoard->GetFileName().mb_str() ), std::string( GetScreenDesc().mb_str() ), &GetPageSettings(), &GetTitleBlock() ); From 5964e4c332a8bbe5403e73030fead682b16194d1 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 8 Oct 2013 10:17:49 +0200 Subject: [PATCH 397/415] Removed unused variable. --- pcbnew/pcb_painter.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index d721cc1a05..2a304d77a4 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -588,8 +588,6 @@ void PCB_PAINTER::draw( const D_PAD* aPad, int aLayer ) VECTOR2D deltaPadSize = size - padSize; // = solder[Paste/Mask]Margin or 0 VECTOR2D delta = VECTOR2D( aPad->GetDelta().x / 2, aPad->GetDelta().y / 2 ); - VECTOR2D inflate = VECTOR2D( delta.y * ( deltaPadSize.x / size.x ), - delta.x * ( deltaPadSize.y / size.y ) ); aPad->BuildPadPolygon( corners, wxSize( deltaPadSize.x, deltaPadSize.y ), 0.0 ); pointList.push_back( VECTOR2D( corners[0] ) ); From f690b8e5053a07c88fe1514c4b5cfc7dc529f15b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Fri, 11 Oct 2013 14:26:09 +0200 Subject: [PATCH 398/415] Fixed IDs for the push and shove router menu --- pcbnew/router/router_tool.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 075cb17f7d..e38b77379c 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -55,14 +55,14 @@ ROUTER_TOOL::ROUTER_TOOL() : m_menu = new CONTEXT_MENU; m_menu->SetTitle( wxT( "Interactive router" ) ); // fixme: not implemented yet. Sorry. - m_menu->Add( wxT( "Cancel" ), 0 ); - m_menu->Add( wxT( "New track" ), 1 ); - m_menu->Add( wxT( "End track" ), 2 ); - m_menu->Add( wxT( "Auto-end track" ), 3 ); - m_menu->Add( wxT( "Place via" ), 4 ); - m_menu->Add( wxT( "Switch posture" ), 5 ); + m_menu->Add( wxT( "Cancel" ), 1 ); + m_menu->Add( wxT( "New track" ), 2 ); + m_menu->Add( wxT( "End track" ), 3 ); + m_menu->Add( wxT( "Auto-end track" ), 4 ); + m_menu->Add( wxT( "Place via" ), 5 ); + m_menu->Add( wxT( "Switch posture" ), 6 ); - m_menu->Add( wxT( "Routing options..." ), 6 ); + m_menu->Add( wxT( "Routing options..." ), 7 ); } From 8aeb204c8aedf4efa7552b1d2d22b03be751816a Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 14 Oct 2013 08:37:58 +0200 Subject: [PATCH 399/415] Marked pnsrouter as dependent on boost --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec2cdaea69..7a7bf0c001 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -415,6 +415,7 @@ add_dependencies( 3d-viewer boost ) add_dependencies( pcad2kicadpcb boost ) add_dependencies( polygon boost ) add_dependencies( pl_editor boost ) +add_dependencies( pnsrouter boost ) ############# From cc79e5ca834c99f65d025f5234f3c2b8a35edcfd Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 14 Oct 2013 11:39:21 +0200 Subject: [PATCH 400/415] Added error messages for OpenGL framebuffer errors. This should eliminate quiet segfaults in case of drivers that cannot handle multiple attachment points for framebuffers. --- common/gal/opengl/opengl_compositor.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/common/gal/opengl/opengl_compositor.cpp b/common/gal/opengl/opengl_compositor.cpp index 0a212af554..0dd5697191 100644 --- a/common/gal/opengl/opengl_compositor.cpp +++ b/common/gal/opengl/opengl_compositor.cpp @@ -95,8 +95,13 @@ unsigned int OPENGL_COMPOSITOR::CreateBuffer() { wxASSERT( m_initialized ); - if( m_buffers.size() >= m_maxBuffers ) + //if( usedBuffers() >= m_maxBuffers ) + { + wxLogError( wxT( "Cannot create more framebuffers. OpenGL rendering backend requires at" + "least 3 framebuffers. You may try to update/change " + "your graphic drivers." ) ); return 0; // Unfortunately we have no more free buffers left + } // GL_COLOR_ATTACHMENTn are consecutive integers GLuint attachmentPoint = GL_COLOR_ATTACHMENT0 + usedBuffers(); @@ -165,6 +170,8 @@ unsigned int OPENGL_COMPOSITOR::CreateBuffer() wxLogFatalError( wxT( "Cannot create the framebuffer." ) ); break; } + + return 0; } ClearBuffer(); @@ -218,6 +225,11 @@ void OPENGL_COMPOSITOR::ClearBuffer() void OPENGL_COMPOSITOR::DrawBuffer( unsigned int aBufferHandle ) { wxASSERT( m_initialized ); + if( aBufferHandle == 0 || aBufferHandle > usedBuffers() ) + { + wxLogError( wxT( "Wrong framebuffer handle" ) ); + return; + } // Switch to the main framebuffer and blit the scene glBindFramebuffer( GL_FRAMEBUFFER, DIRECT_RENDERING ); From 8253899a7007e18cac1679a23b941bc61321888c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 14 Oct 2013 13:43:57 +0200 Subject: [PATCH 401/415] Converted tabs to spaces. Removed trailing whitespaces. --- common/drawpanel_gal.cpp | 40 +- common/gal/color4d.cpp | 5 +- common/gal/opengl/opengl_gal.cpp | 2 +- common/gal/opengl/shader.frag | 2 +- common/gal/opengl/shader.vert | 16 +- common/geometry/seg.cpp | 114 +-- common/geometry/shape_collisions.cpp | 260 +++--- common/geometry/shape_line_chain.cpp | 664 +++++++-------- common/system/fcontext.s | 6 +- common/system/make_i386_pe_gas.S | 66 +- common/tool/context_menu.cpp | 40 +- common/tool/tool_base.cpp | 10 +- common/tool/tool_dispatcher.cpp | 292 +++---- common/tool/tool_event.cpp | 162 ++-- common/tool/tool_interactive.cpp | 16 +- common/tool/tool_manager.cpp | 310 +++---- include/class_drawpanel_gal.h | 2 +- include/gal/color4d.h | 2 +- include/gal/opengl/shader.h | 10 +- include/geometry/seg.h | 478 +++++------ include/geometry/shape.h | 180 ++-- include/geometry/shape_circle.h | 68 +- include/geometry/shape_index.h | 8 +- include/geometry/shape_index_list.h | 372 ++++---- include/geometry/shape_line_chain.h | 896 ++++++++++---------- include/geometry/shape_rect.h | 192 ++--- include/math/box2.h | 4 +- include/math/vector2d.h | 2 +- include/tool/context_menu.h | 160 ++-- include/tool/coroutine.h | 270 +++--- include/tool/delegate.h | 94 +- include/tool/examples/coroutine_example.cpp | 58 +- include/tool/examples/delegate_example.cpp | 36 +- include/tool/tool_base.h | 208 ++--- include/tool/tool_dispatcher.h | 6 +- include/tool/tool_event.h | 108 +-- include/tool/tool_interactive.h | 120 +-- include/view/view_controls.h | 2 +- pcbnew/edit.cpp | 0 pcbnew/pcb_painter.cpp | 2 +- pcbnew/router/pns_itemset.h | 2 +- pcbnew/router/pns_joint.h | 22 +- pcbnew/router/pns_line.cpp | 10 +- pcbnew/router/pns_line.h | 20 +- pcbnew/router/pns_line_placer.cpp | 20 +- pcbnew/router/pns_line_placer.h | 48 +- pcbnew/router/pns_node.cpp | 22 +- pcbnew/router/pns_node.h | 24 +- pcbnew/router/pns_optimizer.cpp | 16 +- pcbnew/router/pns_router.cpp | 2 +- pcbnew/router/pns_shove.cpp | 2 +- pcbnew/router/pns_shove.h | 2 +- pcbnew/router/pns_walkaround.cpp | 2 +- pcbnew/router/pns_walkaround.h | 2 +- pcbnew/router/router_tool.cpp | 2 +- 55 files changed, 2739 insertions(+), 2740 deletions(-) mode change 100755 => 100644 pcbnew/edit.cpp diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index fcdf12bae3..ef07cf8b7b 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -78,21 +78,21 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this ); /* Generic events for the Tool Dispatcher */ - Connect( wxEVT_MOTION, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_LEFT_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_LEFT_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_RIGHT_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_RIGHT_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_MIDDLE_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_MIDDLE_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_MOUSEWHEEL, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_CHAR_HOOK, wxEventHandler( EDA_DRAW_PANEL_GAL::skipEvent ) ); - Connect( wxEVT_KEY_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - Connect( wxEVT_KEY_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_MOTION, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_LEFT_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_LEFT_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_RIGHT_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_RIGHT_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_MIDDLE_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_MIDDLE_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_MOUSEWHEEL, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_CHAR_HOOK, wxEventHandler( EDA_DRAW_PANEL_GAL::skipEvent ) ); + Connect( wxEVT_KEY_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); + Connect( wxEVT_KEY_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_ENTER_WINDOW, wxEventHandler( EDA_DRAW_PANEL_GAL::onEnter ), NULL, this ); Connect( KiGfx::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); - + m_refreshTimer.SetOwner( this ); Connect( wxEVT_TIMER, wxTimerEventHandler( EDA_DRAW_PANEL_GAL::onRefreshTimer ), NULL, this ); @@ -171,7 +171,7 @@ void EDA_DRAW_PANEL_GAL::Refresh( bool eraseBackground, const wxRect* rect ) m_refreshTimer.Start( ( MinRefreshPeriod - delta ).ToLong(), true ); m_pendingRefresh = true; } -} +} void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) @@ -223,13 +223,13 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) void EDA_DRAW_PANEL_GAL::onEvent( wxEvent& aEvent ) { - if( !m_eventDispatcher ) - { - aEvent.Skip(); - return; - } - else - { + if( !m_eventDispatcher ) + { + aEvent.Skip(); + return; + } + else + { m_eventDispatcher->DispatchWxEvent( aEvent ); } diff --git a/common/gal/color4d.cpp b/common/gal/color4d.cpp index b9f6557204..a41d2846c9 100644 --- a/common/gal/color4d.cpp +++ b/common/gal/color4d.cpp @@ -159,7 +159,6 @@ void COLOR4D::FromHSV( double aInH, double aInS, double aInV ) b = q; break; } - } @@ -168,7 +167,7 @@ COLOR4D& COLOR4D::Saturate( double aFactor ) double h, s, v; ToHSV( h, s, v ); FromHSV( h, aFactor, 1.0 ); - + return *this; } - + diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index e1859d9869..623a222f76 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -127,7 +127,7 @@ void OPENGL_GAL::BeginDrawing() glViewport( 0, 0, (GLsizei) screenSize.x, (GLsizei) screenSize.y ); // Create the screen transformation - glOrtho( 0, (GLint) screenSize.x, 0, (GLsizei) screenSize.y, + glOrtho( 0, (GLint) screenSize.x, 0, (GLsizei) screenSize.y, -depthRange.x, -depthRange.y ); // Prepare rendering target buffers diff --git a/common/gal/opengl/shader.frag b/common/gal/opengl/shader.frag index e53c33674e..a4cba0ebed 100644 --- a/common/gal/opengl/shader.frag +++ b/common/gal/opengl/shader.frag @@ -49,7 +49,7 @@ void strokedCircle( vec2 aCoord, float aRadius, float aWidth ) float innerRadius = aRadius - ( aWidth / 2 ); float relWidth = innerRadius / outerRadius; - if( ( dot( aCoord, aCoord ) < 1.0f ) && + if( ( dot( aCoord, aCoord ) < 1.0f ) && ( dot( aCoord, aCoord ) > relWidth * relWidth ) ) gl_FragColor = gl_Color; else diff --git a/common/gal/opengl/shader.vert b/common/gal/opengl/shader.vert index f22a582b6b..f5777408a8 100644 --- a/common/gal/opengl/shader.vert +++ b/common/gal/opengl/shader.vert @@ -42,23 +42,23 @@ void main() { // Pass attributes to the fragment shader shaderParams = attrShaderParams; - + if( shaderParams[0] == SHADER_LINE ) { float lineWidth = shaderParams[3]; float worldScale = gl_ModelViewMatrix[0][0]; float scale; - + // Make lines appear to be at least 1 pixel wide if( worldScale * lineWidth < MIN_WIDTH ) scale = MIN_WIDTH / ( worldScale * lineWidth ); else scale = 1.0f; - - gl_Position = gl_ModelViewProjectionMatrix * + + gl_Position = gl_ModelViewProjectionMatrix * ( gl_Vertex + vec4( shaderParams.yz * scale, 0.0, 0.0 ) ); } - else if( ( shaderParams[0] == SHADER_STROKED_CIRCLE ) || + else if( ( shaderParams[0] == SHADER_STROKED_CIRCLE ) || ( shaderParams[0] == SHADER_FILLED_CIRCLE ) ) { // Compute relative circle coordinates basing on indices @@ -69,7 +69,7 @@ void main() circleCoords = vec2( sqrt( 3.0f ), -1.0f ); else if( shaderParams[1] == 3.0f ) circleCoords = vec2( 0.0f, 2.0f ); - + // Semicircle else if( shaderParams[1] == 4.0f ) circleCoords = vec2( -3.0f / sqrt( 3.0f ), 0.0f ); @@ -81,7 +81,7 @@ void main() // Make the line appear to be at least 1 pixel wide float lineWidth = shaderParams[3]; float worldScale = gl_ModelViewMatrix[0][0]; - + // Make lines appear to be at least 1 pixel width if( worldScale * lineWidth < MIN_WIDTH ) shaderParams[3] = shaderParams[3] / ( worldScale * lineWidth ); @@ -93,7 +93,7 @@ void main() // Pass through the coordinates like in the fixed pipeline gl_Position = ftransform(); } - + gl_FrontColor = gl_Color; } diff --git a/common/geometry/seg.cpp b/common/geometry/seg.cpp index 68dda76675..765652e64e 100644 --- a/common/geometry/seg.cpp +++ b/common/geometry/seg.cpp @@ -32,38 +32,38 @@ template int sgn( T val ) { bool SEG::PointCloserThan( const VECTOR2I& aP, int dist ) const { - VECTOR2I d = b - a; - ecoord dist_sq = (ecoord) dist * dist; + VECTOR2I d = b - a; + ecoord dist_sq = (ecoord) dist * dist; - SEG::ecoord l_squared = d.Dot( d ); + SEG::ecoord l_squared = d.Dot( d ); SEG::ecoord t = d.Dot( aP - a ); if( t <= 0 || !l_squared ) - return ( aP - a ).SquaredEuclideanNorm() < dist_sq; - else if( t >= l_squared ) - return ( aP - b ).SquaredEuclideanNorm() < dist_sq; + return ( aP - a ).SquaredEuclideanNorm() < dist_sq; + else if( t >= l_squared ) + return ( aP - b ).SquaredEuclideanNorm() < dist_sq; - int dxdy = abs( d.x ) - abs( d.y ); + int dxdy = abs( d.x ) - abs( d.y ); if( ( dxdy >= -1 && dxdy <= 1 ) || abs( d.x ) <= 1 || abs( d.y ) <= 1 ) { - int ca = -sgn( d.y ); - int cb = sgn( d.x ); - int cc = -ca * a.x - cb * a.y; - - ecoord num = ca * aP.x + cb * aP.y + cc; - num *= num; + int ca = -sgn( d.y ); + int cb = sgn( d.x ); + int cc = -ca * a.x - cb * a.y; - if( ca && cb ) - num >>= 1; + ecoord num = ca * aP.x + cb * aP.y + cc; + num *= num; - if( num > ( dist_sq + 100 ) ) - return false; - else if( num < ( dist_sq - 100 ) ) - return true; + if( ca && cb ) + num >>= 1; + + if( num > ( dist_sq + 100 ) ) + return false; + else if( num < ( dist_sq - 100 ) ) + return true; } - VECTOR2I nearest; + VECTOR2I nearest; nearest.x = a.x + rescale( t, (ecoord)d.x, l_squared ); nearest.y = a.y + rescale( t, (ecoord)d.y, l_squared ); @@ -71,7 +71,7 @@ bool SEG::PointCloserThan( const VECTOR2I& aP, int dist ) const } -SEG::ecoord SEG::SquaredDistance( const SEG& aSeg ) const +SEG::ecoord SEG::SquaredDistance( const SEG& aSeg ) const { // fixme: rather inefficient.... if( Intersect( aSeg ) ) @@ -91,62 +91,62 @@ SEG::ecoord SEG::SquaredDistance( const SEG& aSeg ) const return m; } - + OPT_VECTOR2I SEG::Intersect( const SEG& aSeg, bool aIgnoreEndpoints, bool aLines ) const { - const VECTOR2I e ( b - a ); - const VECTOR2I f ( aSeg.b - aSeg.a ); - const VECTOR2I ac ( aSeg.a - a ); - - ecoord d = f.Cross( e ); - ecoord p = f.Cross( ac ); - ecoord q = e.Cross( ac ); - - if( d == 0 ) - return OPT_VECTOR2I(); - if ( !aLines && d > 0 && ( q < 0 || q > d || p < 0 || p > d ) ) - return OPT_VECTOR2I(); - if ( !aLines && d < 0 && ( q < d || p < d || p > 0 || q > 0 ) ) - return OPT_VECTOR2I(); - if ( !aLines && aIgnoreEndpoints && ( q == 0 || q == d ) && ( p == 0 || p == d ) ) - return OPT_VECTOR2I(); - - VECTOR2I ip( aSeg.a.x + rescale( q, (ecoord)f.x, d ), - aSeg.a.y + rescale( q, (ecoord)f.y, d ) ); + const VECTOR2I e ( b - a ); + const VECTOR2I f ( aSeg.b - aSeg.a ); + const VECTOR2I ac ( aSeg.a - a ); - return ip; + ecoord d = f.Cross( e ); + ecoord p = f.Cross( ac ); + ecoord q = e.Cross( ac ); + + if( d == 0 ) + return OPT_VECTOR2I(); + if ( !aLines && d > 0 && ( q < 0 || q > d || p < 0 || p > d ) ) + return OPT_VECTOR2I(); + if ( !aLines && d < 0 && ( q < d || p < d || p > 0 || q > 0 ) ) + return OPT_VECTOR2I(); + if ( !aLines && aIgnoreEndpoints && ( q == 0 || q == d ) && ( p == 0 || p == d ) ) + return OPT_VECTOR2I(); + + VECTOR2I ip( aSeg.a.x + rescale( q, (ecoord)f.x, d ), + aSeg.a.y + rescale( q, (ecoord)f.y, d ) ); + + return ip; } bool SEG::ccw( const VECTOR2I& a, const VECTOR2I& b, const VECTOR2I& c ) const { - return (ecoord)( c.y - a.y ) * ( b.x - a.x ) > (ecoord)( b.y - a.y ) * ( c.x - a.x ); + return (ecoord)( c.y - a.y ) * ( b.x - a.x ) > (ecoord)( b.y - a.y ) * ( c.x - a.x ); } -bool SEG::Collide( const SEG& aSeg, int aClearance ) const +bool SEG::Collide( const SEG& aSeg, int aClearance ) const { - // check for intersection - // fixme: move to a method - if( ccw( a, aSeg.a, aSeg.b ) != ccw( b, aSeg.a, aSeg.b ) && - ccw( a, b, aSeg.a ) != ccw( a, b, aSeg.b ) ) - return true; + // check for intersection + // fixme: move to a method + if( ccw( a, aSeg.a, aSeg.b ) != ccw( b, aSeg.a, aSeg.b ) && + ccw( a, b, aSeg.a ) != ccw( a, b, aSeg.b ) ) + return true; #define CHK(_seg, _pt) \ - if( (_seg).PointCloserThan (_pt, aClearance ) ) return true; - - CHK( *this, aSeg.a ); - CHK( *this, aSeg.b ); - CHK( aSeg, a ); - CHK( aSeg, b ); + if( (_seg).PointCloserThan (_pt, aClearance ) ) return true; + + CHK( *this, aSeg.a ); + CHK( *this, aSeg.b ); + CHK( aSeg, a ); + CHK( aSeg, b ); #undef CHK - return false; + return false; } bool SEG::Contains( const VECTOR2I& aP ) const { - return PointCloserThan( aP, 1 ); + return PointCloserThan( aP, 1 ); } diff --git a/common/geometry/shape_collisions.cpp b/common/geometry/shape_collisions.cpp index f4391760b4..4fbdcf79db 100644 --- a/common/geometry/shape_collisions.cpp +++ b/common/geometry/shape_collisions.cpp @@ -34,200 +34,200 @@ typedef VECTOR2I::extended_type ecoord; static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_CIRCLE& aB, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) { - ecoord min_dist = aClearance + aA.GetRadius() + aB.GetRadius(); - ecoord min_dist_sq = min_dist * min_dist; - - const VECTOR2I delta = aB.GetCenter() - aA.GetCenter(); + ecoord min_dist = aClearance + aA.GetRadius() + aB.GetRadius(); + ecoord min_dist_sq = min_dist * min_dist; - ecoord dist_sq = delta.SquaredEuclideanNorm(); + const VECTOR2I delta = aB.GetCenter() - aA.GetCenter(); - if ( dist_sq >= min_dist_sq ) - return false; - - if ( aNeedMTV ) - aMTV = delta.Resize( sqrt ( abs( min_dist_sq - dist_sq ) ) + 1 ); + ecoord dist_sq = delta.SquaredEuclideanNorm(); - return true; + if ( dist_sq >= min_dist_sq ) + return false; + + if ( aNeedMTV ) + aMTV = delta.Resize( sqrt ( abs( min_dist_sq - dist_sq ) ) + 1 ); + + return true; } static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_CIRCLE& aB, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) { - const VECTOR2I c = aB.GetCenter(); - const VECTOR2I p0 = aA.GetPosition(); - const VECTOR2I size = aA.GetSize(); - const ecoord r = aB.GetRadius(); - const ecoord min_dist = aClearance + r; - const ecoord min_dist_sq = min_dist * min_dist; + const VECTOR2I c = aB.GetCenter(); + const VECTOR2I p0 = aA.GetPosition(); + const VECTOR2I size = aA.GetSize(); + const ecoord r = aB.GetRadius(); + const ecoord min_dist = aClearance + r; + const ecoord min_dist_sq = min_dist * min_dist; - if ( aA.BBox( 0 ).Contains( c ) ) - return true; - - const VECTOR2I vts[] = { - VECTOR2I(p0.x, p0.y), - VECTOR2I(p0.x, p0.y + size.y), - VECTOR2I(p0.x + size.x, p0.y + size.y), - VECTOR2I(p0.x + size.x, p0.y), - VECTOR2I(p0.x, p0.y) }; + if ( aA.BBox( 0 ).Contains( c ) ) + return true; - ecoord nearest_seg_dist_sq = VECTOR2I::ECOORD_MAX; - VECTOR2I nearest; + const VECTOR2I vts[] = { + VECTOR2I(p0.x, p0.y), + VECTOR2I(p0.x, p0.y + size.y), + VECTOR2I(p0.x + size.x, p0.y + size.y), + VECTOR2I(p0.x + size.x, p0.y), + VECTOR2I(p0.x, p0.y) }; - bool inside = c.x >= p0.x && c.x <= ( p0.x + size.x ) - && c.y >= p0.y && c.y <= ( p0.y + size.y ); + ecoord nearest_seg_dist_sq = VECTOR2I::ECOORD_MAX; + VECTOR2I nearest; - if( !inside ) - { + bool inside = c.x >= p0.x && c.x <= ( p0.x + size.x ) + && c.y >= p0.y && c.y <= ( p0.y + size.y ); - for( int i = 0; i < 4; i++ ) - { - const SEG seg( vts[i], vts[i+1] ); - ecoord dist_sq = seg.SquaredDistance( c ); - - if( dist_sq < min_dist_sq ) - { - if( !aNeedMTV ) - return true; - else - { - nearest = seg.NearestPoint( c ); - nearest_seg_dist_sq = dist_sq; - } - } - } - } + if( !inside ) + { - if( nearest_seg_dist_sq >= min_dist_sq && !inside ) - return false; + for( int i = 0; i < 4; i++ ) + { + const SEG seg( vts[i], vts[i+1] ); + ecoord dist_sq = seg.SquaredDistance( c ); - VECTOR2I delta = c - nearest; + if( dist_sq < min_dist_sq ) + { + if( !aNeedMTV ) + return true; + else + { + nearest = seg.NearestPoint( c ); + nearest_seg_dist_sq = dist_sq; + } + } + } + } - if( !aNeedMTV ) - return true; + if( nearest_seg_dist_sq >= min_dist_sq && !inside ) + return false; - if( inside ) - aMTV = -delta.Resize( sqrt( abs( r * r + nearest_seg_dist_sq ) + 1 ) ); - else - aMTV = delta.Resize( sqrt( abs( r * r - nearest_seg_dist_sq ) + 1 ) ); + VECTOR2I delta = c - nearest; - return true; + if( !aNeedMTV ) + return true; + + if( inside ) + aMTV = -delta.Resize( sqrt( abs( r * r + nearest_seg_dist_sq ) + 1 ) ); + else + aMTV = delta.Resize( sqrt( abs( r * r - nearest_seg_dist_sq ) + 1 ) ); + + return true; } static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_LINE_CHAIN& aB, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) { - for( int s = 0; s < aB.SegmentCount(); s++ ) - { - if ( aA.Collide( aB.CSegment( s ), aClearance ) ) - return true; - } - - return false; + for( int s = 0; s < aB.SegmentCount(); s++ ) + { + if ( aA.Collide( aB.CSegment( s ), aClearance ) ) + return true; + } + + return false; } static inline bool Collide( const SHAPE_LINE_CHAIN& aA, const SHAPE_LINE_CHAIN& aB, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) { - for( int i = 0; i < aB.SegmentCount(); i++ ) - if( aA.Collide( aB.CSegment(i), aClearance ) ) - return true; - return false; + for( int i = 0; i < aB.SegmentCount(); i++ ) + if( aA.Collide( aB.CSegment(i), aClearance ) ) + return true; + return false; } static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_LINE_CHAIN& aB, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) { - for( int s = 0; s < aB.SegmentCount(); s++ ) - { - SEG seg = aB.CSegment( s ); - if( aA.Collide( seg, aClearance ) ) - return true; - } + for( int s = 0; s < aB.SegmentCount(); s++ ) + { + SEG seg = aB.CSegment( s ); + if( aA.Collide( seg, aClearance ) ) + return true; + } - return false; + return false; } bool CollideShapes( const SHAPE* aA, const SHAPE* aB, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) { - switch( aA->Type() ) - { - case SH_RECT: - switch( aB->Type() ) - { - case SH_CIRCLE: - return Collide( *static_cast( aA ), - *static_cast( aB ), aClearance, aNeedMTV, aMTV ); + switch( aA->Type() ) + { + case SH_RECT: + switch( aB->Type() ) + { + case SH_CIRCLE: + return Collide( *static_cast( aA ), + *static_cast( aB ), aClearance, aNeedMTV, aMTV ); - case SH_LINE_CHAIN: - return Collide( *static_cast( aA ), - *static_cast( aB ), aClearance, aNeedMTV, aMTV ); + case SH_LINE_CHAIN: + return Collide( *static_cast( aA ), + *static_cast( aB ), aClearance, aNeedMTV, aMTV ); - default: - break; - } + default: + break; + } - case SH_CIRCLE: - switch( aB->Type() ) - { - case SH_RECT: - return Collide( *static_cast( aB ), - *static_cast( aA ), aClearance, aNeedMTV, aMTV ); + case SH_CIRCLE: + switch( aB->Type() ) + { + case SH_RECT: + return Collide( *static_cast( aB ), + *static_cast( aA ), aClearance, aNeedMTV, aMTV ); - case SH_CIRCLE: - return Collide( *static_cast( aA ), - *static_cast( aB ), aClearance, aNeedMTV, aMTV ); + case SH_CIRCLE: + return Collide( *static_cast( aA ), + *static_cast( aB ), aClearance, aNeedMTV, aMTV ); - case SH_LINE_CHAIN: - return Collide( *static_cast( aA ), - *static_cast( aB ), aClearance, aNeedMTV, aMTV ); + case SH_LINE_CHAIN: + return Collide( *static_cast( aA ), + *static_cast( aB ), aClearance, aNeedMTV, aMTV ); - default: - break; - } + default: + break; + } - case SH_LINE_CHAIN: - switch( aB->Type() ) - { - case SH_RECT: - return Collide( *static_cast( aB ), - *static_cast( aA ), aClearance, aNeedMTV, aMTV ); + case SH_LINE_CHAIN: + switch( aB->Type() ) + { + case SH_RECT: + return Collide( *static_cast( aB ), + *static_cast( aA ), aClearance, aNeedMTV, aMTV ); - case SH_CIRCLE: - return Collide( *static_cast( aB ), - *static_cast( aA ), aClearance, aNeedMTV, aMTV ); + case SH_CIRCLE: + return Collide( *static_cast( aB ), + *static_cast( aA ), aClearance, aNeedMTV, aMTV ); - case SH_LINE_CHAIN: - return Collide( *static_cast( aA ), - *static_cast( aB ), aClearance, aNeedMTV, aMTV ); + case SH_LINE_CHAIN: + return Collide( *static_cast( aA ), + *static_cast( aB ), aClearance, aNeedMTV, aMTV ); - default: - break; - } + default: + break; + } - default: - break; - } + default: + break; + } - bool unsupported_collision = true; + bool unsupported_collision = true; - assert( unsupported_collision == false ); + assert( unsupported_collision == false ); - return false; + return false; } bool SHAPE::Collide( const SHAPE* aShape, int aClerance, VECTOR2I& aMTV ) const { - return CollideShapes( this, aShape, aClerance, true, aMTV); + return CollideShapes( this, aShape, aClerance, true, aMTV); } bool SHAPE::Collide ( const SHAPE* aShape, int aClerance ) const { - VECTOR2I dummy; - return CollideShapes( this, aShape, aClerance, false, dummy ); + VECTOR2I dummy; + return CollideShapes( this, aShape, aClerance, false, dummy ); } diff --git a/common/geometry/shape_line_chain.cpp b/common/geometry/shape_line_chain.cpp index 909a1832a0..15b5f208c7 100644 --- a/common/geometry/shape_line_chain.cpp +++ b/common/geometry/shape_line_chain.cpp @@ -30,491 +30,491 @@ using boost::optional; bool SHAPE_LINE_CHAIN::Collide( const VECTOR2I& aP, int aClearance ) const { - assert( false ); - return false; + assert( false ); + return false; } bool SHAPE_LINE_CHAIN::Collide( const BOX2I& aBox, int aClearance ) const { - assert( false ); - return false; + assert( false ); + return false; } bool SHAPE_LINE_CHAIN::Collide( const SEG& aSeg, int aClearance ) const { - BOX2I box_a( aSeg.a, aSeg.b - aSeg.a ); - BOX2I::ecoord_type dist_sq = (BOX2I::ecoord_type) aClearance * aClearance; + BOX2I box_a( aSeg.a, aSeg.b - aSeg.a ); + BOX2I::ecoord_type dist_sq = (BOX2I::ecoord_type) aClearance * aClearance; - for( int i = 0; i < SegmentCount() ;i++ ) - { - const SEG& s = CSegment( i ); - BOX2I box_b( s.a, s.b - s.a ); - - BOX2I::ecoord_type d = box_a.SquaredDistance ( box_b ); + for( int i = 0; i < SegmentCount() ;i++ ) + { + const SEG& s = CSegment( i ); + BOX2I box_b( s.a, s.b - s.a ); - if( d < dist_sq ) - { - if( s.Collide( aSeg, aClearance ) ) - return true; - } - } + BOX2I::ecoord_type d = box_a.SquaredDistance ( box_b ); - return false; + if( d < dist_sq ) + { + if( s.Collide( aSeg, aClearance ) ) + return true; + } + } + + return false; } -const SHAPE_LINE_CHAIN SHAPE_LINE_CHAIN::Reverse() const +const SHAPE_LINE_CHAIN SHAPE_LINE_CHAIN::Reverse() const { - SHAPE_LINE_CHAIN a( *this ); - reverse( a.m_points.begin(), a.m_points.end() ); - a.m_closed = m_closed; + SHAPE_LINE_CHAIN a( *this ); + reverse( a.m_points.begin(), a.m_points.end() ); + a.m_closed = m_closed; - return a; + return a; } - + int SHAPE_LINE_CHAIN::Length() const { - int l = 0; - for( int i = 0; i < SegmentCount(); i++ ) - l += CSegment( i ).Length(); + int l = 0; + for( int i = 0; i < SegmentCount(); i++ ) + l += CSegment( i ).Length(); - return l; + return l; } void SHAPE_LINE_CHAIN::Replace( int aStartIndex, int aEndIndex, const VECTOR2I& aP ) { - if( aEndIndex < 0 ) - aEndIndex += PointCount(); - if( aStartIndex < 0 ) - aStartIndex += PointCount(); + if( aEndIndex < 0 ) + aEndIndex += PointCount(); + if( aStartIndex < 0 ) + aStartIndex += PointCount(); - if( aStartIndex == aEndIndex ) - m_points [aStartIndex] = aP; - else - { - m_points.erase( m_points.begin() + aStartIndex + 1, m_points.begin() + aEndIndex + 1 ); - m_points[aStartIndex] = aP; - } + if( aStartIndex == aEndIndex ) + m_points [aStartIndex] = aP; + else + { + m_points.erase( m_points.begin() + aStartIndex + 1, m_points.begin() + aEndIndex + 1 ); + m_points[aStartIndex] = aP; + } } void SHAPE_LINE_CHAIN::Replace( int aStartIndex, int aEndIndex, const SHAPE_LINE_CHAIN& aLine ) { - if( aEndIndex < 0 ) - aEndIndex += PointCount(); - if( aStartIndex < 0 ) - aStartIndex += PointCount(); + if( aEndIndex < 0 ) + aEndIndex += PointCount(); + if( aStartIndex < 0 ) + aStartIndex += PointCount(); - m_points.erase( m_points.begin() + aStartIndex, m_points.begin() + aEndIndex + 1 ); - m_points.insert( m_points.begin() + aStartIndex, aLine.m_points.begin(), aLine.m_points.end() ); + m_points.erase( m_points.begin() + aStartIndex, m_points.begin() + aEndIndex + 1 ); + m_points.insert( m_points.begin() + aStartIndex, aLine.m_points.begin(), aLine.m_points.end() ); } void SHAPE_LINE_CHAIN::Remove( int aStartIndex, int aEndIndex ) { - if(aEndIndex < 0) - aEndIndex += PointCount(); - if(aStartIndex < 0) - aStartIndex += PointCount(); + if(aEndIndex < 0) + aEndIndex += PointCount(); + if(aStartIndex < 0) + aStartIndex += PointCount(); - m_points.erase( m_points.begin() + aStartIndex, m_points.begin() + aEndIndex + 1 ); + m_points.erase( m_points.begin() + aStartIndex, m_points.begin() + aEndIndex + 1 ); } int SHAPE_LINE_CHAIN::Distance( const VECTOR2I& aP ) const { - int d = INT_MAX; - for( int s = 0; s < SegmentCount(); s++ ) - d = min( d, CSegment( s ).Distance( aP ) ); + int d = INT_MAX; + for( int s = 0; s < SegmentCount(); s++ ) + d = min( d, CSegment( s ).Distance( aP ) ); - return d; + return d; } int SHAPE_LINE_CHAIN::Split( const VECTOR2I& aP ) { - int ii = -1; - int min_dist = 2; + int ii = -1; + int min_dist = 2; - ii = Find( aP ); + ii = Find( aP ); - if( ii >= 0 ) - return ii; + if( ii >= 0 ) + return ii; - for( int s = 0; s < SegmentCount(); s++ ) - { - const SEG seg = CSegment( s ); - int dist = seg.Distance( aP ); + for( int s = 0; s < SegmentCount(); s++ ) + { + const SEG seg = CSegment( s ); + int dist = seg.Distance( aP ); - // make sure we are not producing a 'slightly concave' primitive. This might happen - // if aP lies very close to one of already existing points. - if( dist < min_dist && seg.a != aP && seg.b != aP ) - { - min_dist = dist; - ii = s; - } - } + // make sure we are not producing a 'slightly concave' primitive. This might happen + // if aP lies very close to one of already existing points. + if( dist < min_dist && seg.a != aP && seg.b != aP ) + { + min_dist = dist; + ii = s; + } + } - if( ii >= 0 ) - { - m_points.insert( m_points.begin() + ii + 1, aP ); + if( ii >= 0 ) + { + m_points.insert( m_points.begin() + ii + 1, aP ); - return ii + 1; - } + return ii + 1; + } - return -1; + return -1; } int SHAPE_LINE_CHAIN::Find( const VECTOR2I& aP ) const { - for( int s = 0; s< PointCount(); s++ ) - if( CPoint( s ) == aP ) - return s; + for( int s = 0; s< PointCount(); s++ ) + if( CPoint( s ) == aP ) + return s; - return -1; + return -1; } const SHAPE_LINE_CHAIN SHAPE_LINE_CHAIN::Slice( int aStartIndex, int aEndIndex ) const { - SHAPE_LINE_CHAIN rv; - - if( aEndIndex < 0 ) - aEndIndex += PointCount(); - if( aStartIndex < 0 ) - aStartIndex += PointCount(); + SHAPE_LINE_CHAIN rv; - for( int i = aStartIndex; i <= aEndIndex; i++ ) - rv.Append( m_points[i] ); + if( aEndIndex < 0 ) + aEndIndex += PointCount(); + if( aStartIndex < 0 ) + aStartIndex += PointCount(); - return rv; + for( int i = aStartIndex; i <= aEndIndex; i++ ) + rv.Append( m_points[i] ); + + return rv; } struct compareOriginDistance { - compareOriginDistance( VECTOR2I& aOrigin ): - m_origin( aOrigin ) {}; + compareOriginDistance( VECTOR2I& aOrigin ): + m_origin( aOrigin ) {}; - bool operator()( const SHAPE_LINE_CHAIN::Intersection& aA, - const SHAPE_LINE_CHAIN::Intersection& aB ) - { - return ( m_origin - aA.p ).EuclideanNorm() < ( m_origin - aB.p ).EuclideanNorm(); - } + bool operator()( const SHAPE_LINE_CHAIN::Intersection& aA, + const SHAPE_LINE_CHAIN::Intersection& aB ) + { + return ( m_origin - aA.p ).EuclideanNorm() < ( m_origin - aB.p ).EuclideanNorm(); + } - VECTOR2I m_origin; + VECTOR2I m_origin; }; - + int SHAPE_LINE_CHAIN::Intersect( const SEG& aSeg, Intersections& aIp ) const { - for( int s = 0; s < SegmentCount(); s++ ) - { - OPT_VECTOR2I p = CSegment( s ).Intersect( aSeg ); - if( p ) - { - Intersection is; - is.our = CSegment( s ); - is.their = aSeg; - is.p = *p; - aIp.push_back( is ); - } - } + for( int s = 0; s < SegmentCount(); s++ ) + { + OPT_VECTOR2I p = CSegment( s ).Intersect( aSeg ); + if( p ) + { + Intersection is; + is.our = CSegment( s ); + is.their = aSeg; + is.p = *p; + aIp.push_back( is ); + } + } - compareOriginDistance comp( aSeg.a ); - sort( aIp.begin(), aIp.end(), comp ); + compareOriginDistance comp( aSeg.a ); + sort( aIp.begin(), aIp.end(), comp ); - return aIp.size(); + return aIp.size(); } int SHAPE_LINE_CHAIN::Intersect( const SHAPE_LINE_CHAIN& aChain, Intersections& aIp ) const { BOX2I bb_other = aChain.BBox(); - - for ( int s1 = 0; s1 < SegmentCount(); s1++ ) - { - const SEG& a = CSegment( s1 ); - const BOX2I bb_cur( a.a, a.b - a.a ); - if( !bb_other.Intersects( bb_cur ) ) - continue; + for ( int s1 = 0; s1 < SegmentCount(); s1++ ) + { + const SEG& a = CSegment( s1 ); + const BOX2I bb_cur( a.a, a.b - a.a ); - for( int s2 = 0; s2 < aChain.SegmentCount(); s2++ ) - { - const SEG& b = aChain.CSegment( s2 ); - Intersection is; - - if( a.Collinear( b ) ) - { - if( a.Contains( b.a ) ) { is.p = b.a; aIp.push_back( is ); } - if( a.Contains( b.b ) ) { is.p = b.b; aIp.push_back( is ); } - if( b.Contains( a.a ) ) { is.p = a.a; aIp.push_back( is ); } - if( b.Contains( a.b ) ) { is.p = a.b; aIp.push_back( is ); } - } - else - { - OPT_VECTOR2I p = a.Intersect( b ); - - if( p ) - { - is.p = *p; - is.our = a; - is.their = b; - aIp.push_back( is ); - } - } - } - } - - return aIp.size(); + if( !bb_other.Intersects( bb_cur ) ) + continue; - for( int s1 = 0; s1 < SegmentCount(); s1++ ) - { - for( int s2 = 0; s2 < aChain.SegmentCount(); s2++ ) - { - const SEG& a = CSegment( s1 ); - const SEG& b = aChain.CSegment( s2 ); - OPT_VECTOR2I p = a.Intersect( b ); - Intersection is; - - if( p ) - { - is.p = *p; - is.our = a; - is.their = b; - aIp.push_back( is ); - } - else if( a.Collinear( b ) ) - { - if( a.a != b.a && a.a != b.b && b.Contains( a.a ) ) - { - is.p = a.a; - is.our = a; - is.their = b; - aIp.push_back( is ); - } - else if( a.b != b.a && a.b != b.b && b.Contains( a.b ) ) - { - is.p = a.b; - is.our = a; - is.their = b; - aIp.push_back( is ); - } + for( int s2 = 0; s2 < aChain.SegmentCount(); s2++ ) + { + const SEG& b = aChain.CSegment( s2 ); + Intersection is; - } - } - } + if( a.Collinear( b ) ) + { + if( a.Contains( b.a ) ) { is.p = b.a; aIp.push_back( is ); } + if( a.Contains( b.b ) ) { is.p = b.b; aIp.push_back( is ); } + if( b.Contains( a.a ) ) { is.p = a.a; aIp.push_back( is ); } + if( b.Contains( a.b ) ) { is.p = a.b; aIp.push_back( is ); } + } + else + { + OPT_VECTOR2I p = a.Intersect( b ); - return aIp.size(); + if( p ) + { + is.p = *p; + is.our = a; + is.their = b; + aIp.push_back( is ); + } + } + } + } + + return aIp.size(); + + for( int s1 = 0; s1 < SegmentCount(); s1++ ) + { + for( int s2 = 0; s2 < aChain.SegmentCount(); s2++ ) + { + const SEG& a = CSegment( s1 ); + const SEG& b = aChain.CSegment( s2 ); + OPT_VECTOR2I p = a.Intersect( b ); + Intersection is; + + if( p ) + { + is.p = *p; + is.our = a; + is.their = b; + aIp.push_back( is ); + } + else if( a.Collinear( b ) ) + { + if( a.a != b.a && a.a != b.b && b.Contains( a.a ) ) + { + is.p = a.a; + is.our = a; + is.their = b; + aIp.push_back( is ); + } + else if( a.b != b.a && a.b != b.b && b.Contains( a.b ) ) + { + is.p = a.b; + is.our = a; + is.their = b; + aIp.push_back( is ); + } + + } + } + } + + return aIp.size(); } int SHAPE_LINE_CHAIN::PathLength( const VECTOR2I& aP ) const { - int sum = 0; - for( int i = 0; i < SegmentCount(); i++ ) - { - const SEG seg = CSegment( i ); - int d = seg.Distance( aP ); + int sum = 0; + for( int i = 0; i < SegmentCount(); i++ ) + { + const SEG seg = CSegment( i ); + int d = seg.Distance( aP ); - if( d <= 1 ) - { - sum += ( aP - seg.a ).EuclideanNorm(); - return sum; - } - else - sum += seg.Length(); - } + if( d <= 1 ) + { + sum += ( aP - seg.a ).EuclideanNorm(); + return sum; + } + else + sum += seg.Length(); + } - return -1; + return -1; } bool SHAPE_LINE_CHAIN::PointInside( const VECTOR2I& aP ) const { - if( !m_closed || SegmentCount() < 3 ) - return false; + if( !m_closed || SegmentCount() < 3 ) + return false; - int cur = CSegment(0).Side( aP ); + int cur = CSegment(0).Side( aP ); - if( cur == 0 ) - return false; + if( cur == 0 ) + return false; - for( int i = 1; i < SegmentCount(); i++ ) - { - const SEG s = CSegment( i ); + for( int i = 1; i < SegmentCount(); i++ ) + { + const SEG s = CSegment( i ); - if( aP == s.a || aP == s.b ) // edge does not belong to the interior! - return false; + if( aP == s.a || aP == s.b ) // edge does not belong to the interior! + return false; - if( s.Side(aP) != cur ) - return false; + if( s.Side(aP) != cur ) + return false; } - return true; + return true; } - + bool SHAPE_LINE_CHAIN::PointOnEdge( const VECTOR2I& aP ) const { - if( SegmentCount() < 1 ) - return m_points[0] == aP; + if( SegmentCount() < 1 ) + return m_points[0] == aP; - for( int i = 1; i < SegmentCount(); i++ ) - { - const SEG s = CSegment( i ); - - if( s.a == aP || s.b == aP ) - return true; + for( int i = 1; i < SegmentCount(); i++ ) + { + const SEG s = CSegment( i ); - if( s.Distance(aP) <= 1 ) - return true; - } + if( s.a == aP || s.b == aP ) + return true; - return false; + if( s.Distance(aP) <= 1 ) + return true; + } + + return false; } const optional SHAPE_LINE_CHAIN::SelfIntersecting() const { - for( int s1 = 0; s1 < SegmentCount(); s1++ ) - { - for( int s2 = s1 + 1; s2 < SegmentCount(); s2++ ) - { - const VECTOR2I s2a = CSegment( s2 ).a, s2b = CSegment( s2 ).b; - if( s1 + 1 != s2 && CSegment( s1 ).Contains( s2a ) ) - { - Intersection is; - is.our = CSegment( s1 ); - is.their = CSegment( s2 ); - is.p = s2a; - return is; - } - else if( CSegment( s1 ).Contains(s2b ) ) - { - Intersection is; - is.our = CSegment( s1 ); - is.their = CSegment( s2 ); - is.p = s2b; - return is; - } - else - { - OPT_VECTOR2I p = CSegment( s1 ).Intersect( CSegment( s2 ), true ); - - if( p ) - { - Intersection is; - is.our = CSegment( s1 ); - is.their = CSegment( s2 ); - is.p = *p; - return is; - } - } - } - } + for( int s1 = 0; s1 < SegmentCount(); s1++ ) + { + for( int s2 = s1 + 1; s2 < SegmentCount(); s2++ ) + { + const VECTOR2I s2a = CSegment( s2 ).a, s2b = CSegment( s2 ).b; + if( s1 + 1 != s2 && CSegment( s1 ).Contains( s2a ) ) + { + Intersection is; + is.our = CSegment( s1 ); + is.their = CSegment( s2 ); + is.p = s2a; + return is; + } + else if( CSegment( s1 ).Contains(s2b ) ) + { + Intersection is; + is.our = CSegment( s1 ); + is.their = CSegment( s2 ); + is.p = s2b; + return is; + } + else + { + OPT_VECTOR2I p = CSegment( s1 ).Intersect( CSegment( s2 ), true ); - return optional(); + if( p ) + { + Intersection is; + is.our = CSegment( s1 ); + is.their = CSegment( s2 ); + is.p = *p; + return is; + } + } + } + } + + return optional(); } - + SHAPE_LINE_CHAIN& SHAPE_LINE_CHAIN::Simplify() { - vector pts_unique; - - if( PointCount() < 2 ) - { - return *this; - } - else if( PointCount() == 2 ) - { - if( m_points[0] == m_points[1] ) - m_points.erase( m_points.end() ); + vector pts_unique; - return *this; - } + if( PointCount() < 2 ) + { + return *this; + } + else if( PointCount() == 2 ) + { + if( m_points[0] == m_points[1] ) + m_points.erase( m_points.end() ); - int i = 0; - int np = PointCount(); - - // stage 1: eliminate duplicate vertices - while ( i < np ) - { - int j = i + 1; - while( j < np && CPoint(i) == CPoint( j ) ) - j++; + return *this; + } - pts_unique.push_back( CPoint( i ) ); - i = j; - } + int i = 0; + int np = PointCount(); - m_points.clear(); - np = pts_unique.size(); + // stage 1: eliminate duplicate vertices + while ( i < np ) + { + int j = i + 1; + while( j < np && CPoint(i) == CPoint( j ) ) + j++; - i = 0; - // stage 1: eliminate collinear segments - while( i < np - 2 ) - { - const VECTOR2I p0 = pts_unique[i]; - const VECTOR2I p1 = pts_unique[i+1]; - int n = i; + pts_unique.push_back( CPoint( i ) ); + i = j; + } - while( n < np - 2 && SEG( p0, p1 ).LineDistance( pts_unique[n + 2] ) <= 1 ) - n++; - - m_points.push_back( p0 ); - if( n > i ) - i = n; + m_points.clear(); + np = pts_unique.size(); - if( n == np ) - { - m_points.push_back( pts_unique[n - 1] ); - return *this; - } + i = 0; + // stage 1: eliminate collinear segments + while( i < np - 2 ) + { + const VECTOR2I p0 = pts_unique[i]; + const VECTOR2I p1 = pts_unique[i+1]; + int n = i; - i++; - } + while( n < np - 2 && SEG( p0, p1 ).LineDistance( pts_unique[n + 2] ) <= 1 ) + n++; - if( np > 1 ) - m_points.push_back( pts_unique[np - 2] ); + m_points.push_back( p0 ); + if( n > i ) + i = n; - m_points.push_back( pts_unique[np - 1] ); + if( n == np ) + { + m_points.push_back( pts_unique[n - 1] ); + return *this; + } - return *this; + i++; + } + + if( np > 1 ) + m_points.push_back( pts_unique[np - 2] ); + + m_points.push_back( pts_unique[np - 1] ); + + return *this; } const VECTOR2I SHAPE_LINE_CHAIN::NearestPoint( const VECTOR2I& aP ) const { - int min_d = INT_MAX; - int nearest = 0; - for ( int i = 0; i < SegmentCount(); i++ ) - { - int d = CSegment( i ).Distance( aP ); - if( d < min_d ) - { - min_d = d; - nearest = i; - } - } + int min_d = INT_MAX; + int nearest = 0; + for ( int i = 0; i < SegmentCount(); i++ ) + { + int d = CSegment( i ).Distance( aP ); + if( d < min_d ) + { + min_d = d; + nearest = i; + } + } - return CSegment( nearest ).NearestPoint( aP ); + return CSegment( nearest ).NearestPoint( aP ); } const string SHAPE_LINE_CHAIN::Format() const { - stringstream ss; + stringstream ss; - ss << m_points.size() << " " << ( m_closed ? 1 : 0 ) << " " ; + ss << m_points.size() << " " << ( m_closed ? 1 : 0 ) << " " ; - for( int i = 0; i < PointCount(); i++ ) - ss << m_points[i].x << " " << m_points[i].y << " ";// Format() << " "; - - return ss.str(); + for( int i = 0; i < PointCount(); i++ ) + ss << m_points[i].x << " " << m_points[i].y << " ";// Format() << " "; + + return ss.str(); } diff --git a/common/system/fcontext.s b/common/system/fcontext.s index c5d5905a06..7e6e8f9a86 100644 --- a/common/system/fcontext.s +++ b/common/system/fcontext.s @@ -1,7 +1,7 @@ /* - Boost::Context assembly wrapper - done to avoid compiling the whole boost binary library - which may be unpleasant, in particular under Windows (we don't support VC++, while boost::context - does not support mingw */ + Boost::Context assembly wrapper - done to avoid compiling the whole boost binary library + which may be unpleasant, in particular under Windows (we don't support VC++, while boost::context + does not support mingw */ #ifdef __APPLE__ diff --git a/common/system/make_i386_pe_gas.S b/common/system/make_i386_pe_gas.S index f0d9a60078..e55f73d6e4 100644 --- a/common/system/make_i386_pe_gas.S +++ b/common/system/make_i386_pe_gas.S @@ -9,39 +9,39 @@ .align 2 _make_fcontext: - mov 0x4(%esp),%eax - lea -0x34(%eax),%eax - and $0xfffffff0,%eax - mov 0x4(%esp),%ecx - mov %ecx,0x18(%eax) - mov 0x8(%esp),%edx - mov %edx,0x1c(%eax) - neg %edx - lea (%edx,%ecx,1),%ecx - mov %ecx,0x20(%eax) - mov 0xc(%esp),%ecx - mov %ecx,0x14(%eax) - stmxcsr 0x2c(%eax) - fnstcw 0x30(%eax) - lea -0x1c(%eax),%edx - mov %edx,0x10(%eax) - mov $0x0,%ecx - mov %ecx,(%edx) - mov %fs:0x18,%ecx - mov (%ecx),%edx - inc %edx - je _make_fcontext+0x4c // <_make_fcontext+0x4c> - dec %edx - xchg %edx,%ecx - jmp _make_fcontext+0x42 // <_make_fcontext+0x42> - mov 0x4(%ecx),%ecx - mov 0x10(%eax),%edx - mov %ecx,0x18(%edx) - mov $0xffffffff,%ecx - mov %ecx,0x14(%edx) - lea 0x14(%edx),%ecx - mov %ecx,0x24(%eax) - ret + mov 0x4(%esp),%eax + lea -0x34(%eax),%eax + and $0xfffffff0,%eax + mov 0x4(%esp),%ecx + mov %ecx,0x18(%eax) + mov 0x8(%esp),%edx + mov %edx,0x1c(%eax) + neg %edx + lea (%edx,%ecx,1),%ecx + mov %ecx,0x20(%eax) + mov 0xc(%esp),%ecx + mov %ecx,0x14(%eax) + stmxcsr 0x2c(%eax) + fnstcw 0x30(%eax) + lea -0x1c(%eax),%edx + mov %edx,0x10(%eax) + mov $0x0,%ecx + mov %ecx,(%edx) + mov %fs:0x18,%ecx + mov (%ecx),%edx + inc %edx + je _make_fcontext+0x4c // <_make_fcontext+0x4c> + dec %edx + xchg %edx,%ecx + jmp _make_fcontext+0x42 // <_make_fcontext+0x42> + mov 0x4(%ecx),%ecx + mov 0x10(%eax),%edx + mov %ecx,0x18(%edx) + mov $0xffffffff,%ecx + mov %ecx,0x14(%edx) + lea 0x14(%edx),%ecx + mov %ecx,0x24(%eax) + ret finish: xor %eax,%eax diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index 66546bb793..54f395cd9c 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -31,14 +31,14 @@ CONTEXT_MENU::CONTEXT_MENU() : m_titleSet( false ), m_handler( this ), m_tool( NULL ) { - m_menu.Connect( wxEVT_MENU_HIGHLIGHT, wxEventHandler( CMEventHandler::onEvent ), - NULL, &m_handler ); - m_menu.Connect( wxEVT_COMMAND_MENU_SELECTED, wxEventHandler( CMEventHandler::onEvent ), - NULL, &m_handler ); + m_menu.Connect( wxEVT_MENU_HIGHLIGHT, wxEventHandler( CMEventHandler::onEvent ), + NULL, &m_handler ); + m_menu.Connect( wxEVT_COMMAND_MENU_SELECTED, wxEventHandler( CMEventHandler::onEvent ), + NULL, &m_handler ); - // Workaround for the case when mouse cursor never reaches menu (it hangs up tools using menu) - wxMenuEvent menuEvent( wxEVT_MENU_HIGHLIGHT, -1, &m_menu ); - m_menu.AddPendingEvent( menuEvent ); + // Workaround for the case when mouse cursor never reaches menu (it hangs up tools using menu) + wxMenuEvent menuEvent( wxEVT_MENU_HIGHLIGHT, -1, &m_menu ); + m_menu.AddPendingEvent( menuEvent ); } @@ -72,16 +72,16 @@ void CONTEXT_MENU::SetTitle( const wxString& aTitle ) // TODO handle an empty string (remove title and separator) // Unfortunately wxMenu::SetTitle() does nothing.. - if( m_titleSet ) - { + if( m_titleSet ) + { m_menu.FindItemByPosition( 0 )->SetItemLabel( aTitle ); - } - else - { + } + else + { m_menu.InsertSeparator( 0 ); m_menu.Insert( 0, new wxMenuItem( &m_menu, -1, aTitle, wxEmptyString, wxITEM_NORMAL ) ); m_titleSet = true; - } + } } @@ -92,7 +92,7 @@ void CONTEXT_MENU::Add( const wxString& aLabel, int aId ) wxLogWarning( wxT( "Adding more than one menu entry with the same ID may result in" "undefined behaviour" ) ); #endif - m_menu.Append( new wxMenuItem( &m_menu, aId, aLabel, wxEmptyString, wxITEM_NORMAL ) ); + m_menu.Append( new wxMenuItem( &m_menu, aId, aLabel, wxEmptyString, wxITEM_NORMAL ) ); } @@ -104,7 +104,7 @@ void CONTEXT_MENU::Add( const TOOL_ACTION& aAction ) if( aAction.HasHotKey() ) menuEntry = wxString( ( aAction.GetMenuItem() + '\t' + getHotKeyDescription( aAction ) ).c_str(), - wxConvUTF8 ); + wxConvUTF8 ); else menuEntry = wxString( aAction.GetMenuItem().c_str(), wxConvUTF8 ); @@ -117,13 +117,13 @@ void CONTEXT_MENU::Add( const TOOL_ACTION& aAction ) void CONTEXT_MENU::Clear() { - m_titleSet = false; + m_titleSet = false; - // Remove all the entries from context menu - for( unsigned i = 0; i < m_menu.GetMenuItemCount(); ++i ) - m_menu.Destroy( m_menu.FindItemByPosition( 0 ) ); + // Remove all the entries from context menu + for( unsigned i = 0; i < m_menu.GetMenuItemCount(); ++i ) + m_menu.Destroy( m_menu.FindItemByPosition( 0 ) ); - m_toolActions.clear(); + m_toolActions.clear(); } diff --git a/common/tool/tool_base.cpp b/common/tool/tool_base.cpp index 066d85dd33..2124559a7b 100644 --- a/common/tool/tool_base.cpp +++ b/common/tool/tool_base.cpp @@ -27,23 +27,23 @@ KiGfx::VIEW* TOOL_BASE::getView() const { - return m_toolMgr->GetView(); + return m_toolMgr->GetView(); } KiGfx::VIEW_CONTROLS* TOOL_BASE::getViewControls() const -{ - return m_toolMgr->GetViewControls(); +{ + return m_toolMgr->GetViewControls(); } wxWindow* TOOL_BASE::getEditFrameInt() const { - return m_toolMgr->GetEditFrame(); + return m_toolMgr->GetEditFrame(); } EDA_ITEM* TOOL_BASE::getModelInt() const { - return m_toolMgr->GetModel(); + return m_toolMgr->GetModel(); } diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 9e32598854..cf580ebb06 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -42,52 +42,52 @@ using boost::optional; ///> Stores information about a mouse button state struct TOOL_DISPATCHER::ButtonState { - ButtonState( TOOL_MouseButtons aButton, const wxEventType& aDownEvent, - const wxEventType& aUpEvent ) : - button( aButton ), - downEvent( aDownEvent ), - upEvent( aUpEvent ) - {}; + ButtonState( TOOL_MouseButtons aButton, const wxEventType& aDownEvent, + const wxEventType& aUpEvent ) : + button( aButton ), + downEvent( aDownEvent ), + upEvent( aUpEvent ) + {}; - ///> Flag indicating that dragging is active for the given button. - bool dragging; + ///> Flag indicating that dragging is active for the given button. + bool dragging; - ///> Flag indicating that the given button is pressed. - bool pressed; - - ///> Point where dragging has started (in world coordinates). - VECTOR2D dragOrigin; + ///> Flag indicating that the given button is pressed. + bool pressed; - ///> Point where click event has occurred. - VECTOR2D downPosition; + ///> Point where dragging has started (in world coordinates). + VECTOR2D dragOrigin; - ///> Difference between drag origin point and current mouse position (expressed as distance in - ///> pixels). - double dragMaxDelta; - - ///> Determines the mouse button for which information are stored. - TOOL_MouseButtons button; + ///> Point where click event has occurred. + VECTOR2D downPosition; - ///> The type of wxEvent that determines mouse button press. - wxEventType downEvent; + ///> Difference between drag origin point and current mouse position (expressed as distance in + ///> pixels). + double dragMaxDelta; - ///> The type of wxEvent that determines mouse button release. - wxEventType upEvent; + ///> Determines the mouse button for which information are stored. + TOOL_MouseButtons button; - ///> Time stamp for the last mouse button press event. - wxLongLong downTimestamp; + ///> The type of wxEvent that determines mouse button press. + wxEventType downEvent; - ///> Restores initial state. - void Reset() - { - dragging = false; - pressed = false; - } + ///> The type of wxEvent that determines mouse button release. + wxEventType upEvent; + + ///> Time stamp for the last mouse button press event. + wxLongLong downTimestamp; + + ///> Restores initial state. + void Reset() + { + dragging = false; + pressed = false; + } }; TOOL_DISPATCHER::TOOL_DISPATCHER( TOOL_MANAGER* aToolMgr, PCB_BASE_FRAME* aEditFrame ) : - m_toolMgr( aToolMgr ), m_editFrame( aEditFrame ) + m_toolMgr( aToolMgr ), m_editFrame( aEditFrame ) { m_buttons.push_back( new ButtonState( MB_Left, wxEVT_LEFT_DOWN, wxEVT_LEFT_UP ) ); m_buttons.push_back( new ButtonState( MB_Right, wxEVT_RIGHT_DOWN, wxEVT_RIGHT_UP ) ); @@ -99,135 +99,135 @@ TOOL_DISPATCHER::TOOL_DISPATCHER( TOOL_MANAGER* aToolMgr, PCB_BASE_FRAME* aEditF TOOL_DISPATCHER::~TOOL_DISPATCHER() { - BOOST_FOREACH( ButtonState* st, m_buttons ) - delete st; + BOOST_FOREACH( ButtonState* st, m_buttons ) + delete st; } void TOOL_DISPATCHER::ResetState() { - BOOST_FOREACH( ButtonState* st, m_buttons ) - st->Reset(); + BOOST_FOREACH( ButtonState* st, m_buttons ) + st->Reset(); } KiGfx::VIEW* TOOL_DISPATCHER::getView() { - return m_editFrame->GetGalCanvas()->GetView(); + return m_editFrame->GetGalCanvas()->GetView(); } bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMotion ) { - ButtonState* st = m_buttons[aIndex]; - wxEventType type = aEvent.GetEventType(); - optional evt; - bool isClick = false; + ButtonState* st = m_buttons[aIndex]; + wxEventType type = aEvent.GetEventType(); + optional evt; + bool isClick = false; - bool up = type == st->upEvent; - bool down = type == st->downEvent; + bool up = type == st->upEvent; + bool down = type == st->downEvent; - int mods = decodeModifiers( static_cast( &aEvent ) ); - int args = st->button | mods; + int mods = decodeModifiers( static_cast( &aEvent ) ); + int args = st->button | mods; - if( down ) // Handle mouse button press - { - st->downTimestamp = wxGetLocalTimeMillis(); - st->dragOrigin = m_lastMousePos; - st->downPosition = m_lastMousePos; - st->dragMaxDelta = 0; - st->pressed = true; - evt = TOOL_EVENT( TC_Mouse, TA_MouseDown, args ); - } - else if( up ) // Handle mouse button release - { - st->pressed = false; + if( down ) // Handle mouse button press + { + st->downTimestamp = wxGetLocalTimeMillis(); + st->dragOrigin = m_lastMousePos; + st->downPosition = m_lastMousePos; + st->dragMaxDelta = 0; + st->pressed = true; + evt = TOOL_EVENT( TC_Mouse, TA_MouseDown, args ); + } + else if( up ) // Handle mouse button release + { + st->pressed = false; - if( st->dragging ) - { - wxLongLong t = wxGetLocalTimeMillis(); + if( st->dragging ) + { + wxLongLong t = wxGetLocalTimeMillis(); - // Determine if it was just a single click or beginning of dragging - if( t - st->downTimestamp < DragTimeThreshold && - st->dragMaxDelta < DragDistanceThreshold ) - isClick = true; - else - evt = TOOL_EVENT( TC_Mouse, TA_MouseUp, args ); - } - else - isClick = true; - - if( isClick ) - evt = TOOL_EVENT( TC_Mouse, TA_MouseClick, args ); + // Determine if it was just a single click or beginning of dragging + if( t - st->downTimestamp < DragTimeThreshold && + st->dragMaxDelta < DragDistanceThreshold ) + isClick = true; + else + evt = TOOL_EVENT( TC_Mouse, TA_MouseUp, args ); + } + else + isClick = true; - st->dragging = false; - } + if( isClick ) + evt = TOOL_EVENT( TC_Mouse, TA_MouseClick, args ); - if( st->pressed && aMotion ) - { - st->dragging = true; - double dragPixelDistance = getView()->ToScreen( m_lastMousePos - st->dragOrigin, false ).EuclideanNorm(); - st->dragMaxDelta = std::max( st->dragMaxDelta, dragPixelDistance ); + st->dragging = false; + } - wxLongLong t = wxGetLocalTimeMillis(); + if( st->pressed && aMotion ) + { + st->dragging = true; + double dragPixelDistance = getView()->ToScreen( m_lastMousePos - st->dragOrigin, false ).EuclideanNorm(); + st->dragMaxDelta = std::max( st->dragMaxDelta, dragPixelDistance ); - if( t - st->downTimestamp > DragTimeThreshold || st->dragMaxDelta > DragDistanceThreshold ) - { - evt = TOOL_EVENT( TC_Mouse, TA_MouseDrag, args ); - evt->SetMouseDragOrigin( st->dragOrigin ); - evt->SetMouseDelta( m_lastMousePos - st->dragOrigin ); - } - } + wxLongLong t = wxGetLocalTimeMillis(); - if( evt ) - { - evt->SetMousePosition( isClick ? st->downPosition : m_lastMousePos ); - m_toolMgr->ProcessEvent( *evt ); + if( t - st->downTimestamp > DragTimeThreshold || st->dragMaxDelta > DragDistanceThreshold ) + { + evt = TOOL_EVENT( TC_Mouse, TA_MouseDrag, args ); + evt->SetMouseDragOrigin( st->dragOrigin ); + evt->SetMouseDelta( m_lastMousePos - st->dragOrigin ); + } + } - return true; - } + if( evt ) + { + evt->SetMousePosition( isClick ? st->downPosition : m_lastMousePos ); + m_toolMgr->ProcessEvent( *evt ); - return false; + return true; + } + + return false; } void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) { - bool motion = false, buttonEvents = false; - optional evt; - - int type = aEvent.GetEventType(); + bool motion = false, buttonEvents = false; + optional evt; - // Mouse handling - if( type == wxEVT_MOTION || type == wxEVT_MOUSEWHEEL || - type == wxEVT_LEFT_DOWN || type == wxEVT_LEFT_UP || - type == wxEVT_MIDDLE_DOWN || type == wxEVT_MIDDLE_UP || - type == wxEVT_RIGHT_DOWN || type == wxEVT_RIGHT_UP || - // Event issued whem mouse retains position in screen coordinates, - // but changes in world coordinates (eg. autopanning) - type == KiGfx::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE ) - { + int type = aEvent.GetEventType(); + + // Mouse handling + if( type == wxEVT_MOTION || type == wxEVT_MOUSEWHEEL || + type == wxEVT_LEFT_DOWN || type == wxEVT_LEFT_UP || + type == wxEVT_MIDDLE_DOWN || type == wxEVT_MIDDLE_UP || + type == wxEVT_RIGHT_DOWN || type == wxEVT_RIGHT_UP || + // Event issued whem mouse retains position in screen coordinates, + // but changes in world coordinates (eg. autopanning) + type == KiGfx::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE ) + { VECTOR2D screenPos = m_toolMgr->GetViewControls()->GetCursorPosition(); VECTOR2D pos = getView()->ToWorld( screenPos ); - if( pos != m_lastMousePos || type == KiGfx::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE ) - { - motion = true; - m_lastMousePos = pos; - } + if( pos != m_lastMousePos || type == KiGfx::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE ) + { + motion = true; + m_lastMousePos = pos; + } - for( unsigned int i = 0; i < m_buttons.size(); i++ ) - buttonEvents |= handleMouseButton( aEvent, i, motion ); + for( unsigned int i = 0; i < m_buttons.size(); i++ ) + buttonEvents |= handleMouseButton( aEvent, i, motion ); - if( !buttonEvents && motion ) - { - evt = TOOL_EVENT( TC_Mouse, TA_MouseMotion ); - evt->SetMousePosition( pos ); - } - } + if( !buttonEvents && motion ) + { + evt = TOOL_EVENT( TC_Mouse, TA_MouseMotion ); + evt->SetMousePosition( pos ); + } + } - // Keyboard handling - else if( type == wxEVT_KEY_UP || type == wxEVT_KEY_DOWN ) + // Keyboard handling + else if( type == wxEVT_KEY_UP || type == wxEVT_KEY_DOWN ) { wxKeyEvent* ke = static_cast( &aEvent ); int key = ke->GetKeyCode(); @@ -246,33 +246,33 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) } } - if( evt ) - m_toolMgr->ProcessEvent( *evt ); + if( evt ) + m_toolMgr->ProcessEvent( *evt ); - // pass the event to the GUI, it might still be interested in it - aEvent.Skip(); + // pass the event to the GUI, it might still be interested in it + aEvent.Skip(); } void TOOL_DISPATCHER::DispatchWxCommand( const wxCommandEvent& aEvent ) { - bool activateTool = false; - std::string toolName; - - // fixme: use TOOL_ACTIONs here - switch( aEvent.GetId() ) - { - case ID_PNS_ROUTER_TOOL: - toolName = "pcbnew.InteractiveRouter"; - activateTool = true; - break; - case ID_SELECTION_TOOL: - toolName = "pcbnew.InteractiveSelection"; - activateTool = true; - break; - } + bool activateTool = false; + std::string toolName; - // do nothing if the legacy view is active - if( activateTool && m_editFrame->IsGalCanvasActive() ) - m_toolMgr->InvokeTool( toolName ); + // fixme: use TOOL_ACTIONs here + switch( aEvent.GetId() ) + { + case ID_PNS_ROUTER_TOOL: + toolName = "pcbnew.InteractiveRouter"; + activateTool = true; + break; + case ID_SELECTION_TOOL: + toolName = "pcbnew.InteractiveSelection"; + activateTool = true; + break; + } + + // do nothing if the legacy view is active + if( activateTool && m_editFrame->IsGalCanvasActive() ) + m_toolMgr->InvokeTool( toolName ); } diff --git a/common/tool/tool_event.cpp b/common/tool/tool_event.cpp index 2db95231d0..d8df6a54d2 100644 --- a/common/tool/tool_event.cpp +++ b/common/tool/tool_event.cpp @@ -35,22 +35,22 @@ using namespace std; struct FlagString { - int flag; - std::string str; + int flag; + std::string str; }; static const std::string flag2string( int flag, const FlagString* exps ) { - std::string rv; + std::string rv; - for( int i = 0; exps[i].str.length(); i++ ) - { - if( exps[i].flag & flag ) - rv += exps[i].str + " "; - } + for( int i = 0; exps[i].str.length(); i++ ) + { + if( exps[i].flag & flag ) + rv += exps[i].str + " "; + } - return rv; + return rv; } @@ -62,97 +62,97 @@ bool TOOL_EVENT::IsAction( const TOOL_ACTION* aAction ) const const std::string TOOL_EVENT::Format() const { - std::string ev; + std::string ev; - const FlagString categories[] = { - { TC_Mouse, "mouse" }, - { TC_Keyboard, "keyboard" }, - { TC_Command, "command" }, - { TC_Message, "message" }, - { TC_View, "view" }, - { 0, "" } - }; + const FlagString categories[] = { + { TC_Mouse, "mouse" }, + { TC_Keyboard, "keyboard" }, + { TC_Command, "command" }, + { TC_Message, "message" }, + { TC_View, "view" }, + { 0, "" } + }; - const FlagString actions[] = { - { TA_MouseClick, "click" }, - { TA_MouseUp, "button-up" }, - { TA_MouseDown, "button-down" }, - { TA_MouseDrag, "drag" }, - { TA_MouseMotion, "motion" }, - { TA_MouseWheel, "wheel" }, - { TA_KeyUp, "key-up" }, - { TA_KeyDown, "key-down" }, - { TA_ViewRefresh, "view-refresh" }, - { TA_ViewZoom, "view-zoom" }, - { TA_ViewPan, "view-pan" }, - { TA_ViewDirty, "view-dirty" }, - { TA_ChangeLayer, "change-layer" }, - { TA_CancelTool, "cancel-tool" }, - { TA_ContextMenuUpdate, "context-menu-update" }, - { TA_ContextMenuChoice, "context-menu-choice" }, - { TA_Action, "action" }, - { 0, "" } - }; + const FlagString actions[] = { + { TA_MouseClick, "click" }, + { TA_MouseUp, "button-up" }, + { TA_MouseDown, "button-down" }, + { TA_MouseDrag, "drag" }, + { TA_MouseMotion, "motion" }, + { TA_MouseWheel, "wheel" }, + { TA_KeyUp, "key-up" }, + { TA_KeyDown, "key-down" }, + { TA_ViewRefresh, "view-refresh" }, + { TA_ViewZoom, "view-zoom" }, + { TA_ViewPan, "view-pan" }, + { TA_ViewDirty, "view-dirty" }, + { TA_ChangeLayer, "change-layer" }, + { TA_CancelTool, "cancel-tool" }, + { TA_ContextMenuUpdate, "context-menu-update" }, + { TA_ContextMenuChoice, "context-menu-choice" }, + { TA_Action, "action" }, + { 0, "" } + }; - const FlagString buttons[] = { - { MB_None, "none" }, - { MB_Left, "left" }, - { MB_Right, "right" }, - { MB_Middle, "middle" }, - { 0, "" } - }; + const FlagString buttons[] = { + { MB_None, "none" }, + { MB_Left, "left" }, + { MB_Right, "right" }, + { MB_Middle, "middle" }, + { 0, "" } + }; - const FlagString modifiers[] = { + const FlagString modifiers[] = { { MD_ModShift, "shift" }, { MD_ModCtrl, "ctrl" }, { MD_ModAlt, "alt" }, { 0, "" } - }; + }; - ev = "category: "; - ev += flag2string( m_category, categories ); - ev += " action: "; - ev += flag2string( m_actions, actions ); - - if( m_actions & TA_Mouse ) - { - ev += " btns: "; - ev += flag2string( m_mouseButtons, buttons ); - } + ev = "category: "; + ev += flag2string( m_category, categories ); + ev += " action: "; + ev += flag2string( m_actions, actions ); - if( m_actions & TA_Keyboard ) - { + if( m_actions & TA_Mouse ) + { + ev += " btns: "; + ev += flag2string( m_mouseButtons, buttons ); + } + + if( m_actions & TA_Keyboard ) + { char tmp[128]; sprintf( tmp, "key: %d", m_keyCode ); ev += tmp; - } - - if( m_actions & ( TA_Mouse | TA_Keyboard ) ) - { - ev += " mods: "; - ev += flag2string( m_modifiers, modifiers ); - } + } - if( m_commandId ) - { - char tmp[128]; - sprintf( tmp, "cmd-id: %d", *m_commandId ); - ev += tmp; - } + if( m_actions & ( TA_Mouse | TA_Keyboard ) ) + { + ev += " mods: "; + ev += flag2string( m_modifiers, modifiers ); + } - if( m_commandStr ) - ev += "cmd-str: " + ( *m_commandStr ); - - return ev; + if( m_commandId ) + { + char tmp[128]; + sprintf( tmp, "cmd-id: %d", *m_commandId ); + ev += tmp; + } + + if( m_commandStr ) + ev += "cmd-str: " + ( *m_commandStr ); + + return ev; } const std::string TOOL_EVENT_LIST::Format() const { - string s; + string s; - BOOST_FOREACH( TOOL_EVENT e, m_events ) - s += e.Format() + " "; - - return s; + BOOST_FOREACH( TOOL_EVENT e, m_events ) + s += e.Format() + " "; + + return s; } diff --git a/common/tool/tool_interactive.cpp b/common/tool/tool_interactive.cpp index 5d3ee77fcc..1d195c02a3 100644 --- a/common/tool/tool_interactive.cpp +++ b/common/tool/tool_interactive.cpp @@ -30,13 +30,13 @@ #include TOOL_INTERACTIVE::TOOL_INTERACTIVE( TOOL_ID aId, const std::string& aName ) : - TOOL_BASE( TOOL_Interactive, aId, aName ) - {}; + TOOL_BASE( TOOL_Interactive, aId, aName ) + {}; TOOL_INTERACTIVE::TOOL_INTERACTIVE( const std::string& aName ) : - TOOL_BASE( TOOL_Interactive, TOOL_MANAGER::MakeToolId( aName ), aName ) - {}; + TOOL_BASE( TOOL_Interactive, TOOL_MANAGER::MakeToolId( aName ), aName ) + {}; TOOL_INTERACTIVE::~TOOL_INTERACTIVE() @@ -46,18 +46,18 @@ TOOL_INTERACTIVE::~TOOL_INTERACTIVE() OPT_TOOL_EVENT TOOL_INTERACTIVE::Wait( const TOOL_EVENT_LIST& aEventList ) { - return m_toolMgr->ScheduleWait( this, aEventList ); + return m_toolMgr->ScheduleWait( this, aEventList ); } void TOOL_INTERACTIVE::goInternal( TOOL_STATE_FUNC& aState, const TOOL_EVENT_LIST& aConditions ) { - m_toolMgr->ScheduleNextState( this, aState, aConditions ); + m_toolMgr->ScheduleNextState( this, aState, aConditions ); } void TOOL_INTERACTIVE::SetContextMenu( CONTEXT_MENU* aMenu, CONTEXT_MENU_TRIGGER aTrigger ) { - aMenu->setTool( this ); - m_toolMgr->ScheduleContextMenu( this, aMenu, aTrigger ); + aMenu->setTool( this ); + m_toolMgr->ScheduleContextMenu( this, aMenu, aTrigger ); } diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index d062faa9c4..b42afaafe6 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -52,50 +52,50 @@ using namespace std; struct TOOL_MANAGER::TOOL_STATE { /// The tool itself - TOOL_BASE* theTool; - - /// Is the tool active (pending execution) or disabled at the moment - bool idle; + TOOL_BASE* theTool; - /// Flag defining if the tool is waiting for any event (i.e. if it - /// issued a Wait() call). - bool pendingWait; + /// Is the tool active (pending execution) or disabled at the moment + bool idle; - /// Is there a context menu being displayed - bool pendingContextMenu; + /// Flag defining if the tool is waiting for any event (i.e. if it + /// issued a Wait() call). + bool pendingWait; - /// Context menu currently used by the tool - CONTEXT_MENU* contextMenu; + /// Is there a context menu being displayed + bool pendingContextMenu; - /// Defines when the context menu is opened - CONTEXT_MENU_TRIGGER contextMenuTrigger; + /// Context menu currently used by the tool + CONTEXT_MENU* contextMenu; - /// Tool execution context - COROUTINE* cofunc; - - /// The event that triggered the execution/wakeup of the tool after Wait() call - TOOL_EVENT wakeupEvent; + /// Defines when the context menu is opened + CONTEXT_MENU_TRIGGER contextMenuTrigger; - /// List of events the tool is currently waiting for - TOOL_EVENT_LIST waitEvents; + /// Tool execution context + COROUTINE* cofunc; - /// List of possible transitions (ie. association of events and state handlers that are executed - /// upon the event reception - std::vector transitions; + /// The event that triggered the execution/wakeup of the tool after Wait() call + TOOL_EVENT wakeupEvent; - bool operator==( const TOOL_MANAGER::TOOL_STATE& aRhs ) const + /// List of events the tool is currently waiting for + TOOL_EVENT_LIST waitEvents; + + /// List of possible transitions (ie. association of events and state handlers that are executed + /// upon the event reception + std::vector transitions; + + bool operator==( const TOOL_MANAGER::TOOL_STATE& aRhs ) const { - return ( aRhs.theTool == this->theTool ); + return ( aRhs.theTool == this->theTool ); } - bool operator!=( const TOOL_MANAGER::TOOL_STATE& aRhs ) const + bool operator!=( const TOOL_MANAGER::TOOL_STATE& aRhs ) const { - return ( aRhs.theTool != this->theTool ); + return ( aRhs.theTool != this->theTool ); } }; -TOOL_MANAGER::TOOL_MANAGER() : +TOOL_MANAGER::TOOL_MANAGER() : m_model( NULL ), m_view( NULL ) { m_actionMgr = new ACTION_MANAGER( this ); @@ -119,37 +119,37 @@ TOOL_MANAGER::~TOOL_MANAGER() void TOOL_MANAGER::RegisterTool( TOOL_BASE* aTool ) { - TOOL_STATE* st = new TOOL_STATE; + TOOL_STATE* st = new TOOL_STATE; - st->theTool = aTool; - st->idle = true; - st->pendingWait = false; - st->pendingContextMenu = false; - st->cofunc = NULL; - st->contextMenuTrigger = CMENU_OFF; + st->theTool = aTool; + st->idle = true; + st->pendingWait = false; + st->pendingContextMenu = false; + st->cofunc = NULL; + st->contextMenuTrigger = CMENU_OFF; - m_toolState[aTool] = st; - m_toolNameIndex[aTool->GetName()] = st; - m_toolIdIndex[aTool->GetId()] = st; - - aTool->m_toolMgr = this; - - if( aTool->GetType() == TOOL_Interactive ) - { - bool initState = static_cast( aTool )->Init(); - if( !initState ) - { - wxLogError( wxT( "Initialization of the %s tool failed" ), aTool->GetName().c_str() ); + m_toolState[aTool] = st; + m_toolNameIndex[aTool->GetName()] = st; + m_toolIdIndex[aTool->GetId()] = st; - // Unregister the tool - m_toolState.erase( aTool ); - m_toolNameIndex.erase( aTool->GetName() ); - m_toolIdIndex.erase( aTool->GetId() ); + aTool->m_toolMgr = this; - delete st; - delete aTool; - } - } + if( aTool->GetType() == TOOL_Interactive ) + { + bool initState = static_cast( aTool )->Init(); + if( !initState ) + { + wxLogError( wxT( "Initialization of the %s tool failed" ), aTool->GetName().c_str() ); + + // Unregister the tool + m_toolState.erase( aTool ); + m_toolNameIndex.erase( aTool->GetName() ); + m_toolIdIndex.erase( aTool->GetId() ); + + delete st; + delete aTool; + } + } } @@ -268,89 +268,89 @@ TOOL_BASE* TOOL_MANAGER::FindTool( const std::string& aName ) const void TOOL_MANAGER::ScheduleNextState( TOOL_BASE* aTool, TOOL_STATE_FUNC& aHandler, const TOOL_EVENT_LIST& aConditions ) { - TOOL_STATE* st = m_toolState[aTool]; - st->transitions.push_back( TRANSITION( aConditions, aHandler ) ); + TOOL_STATE* st = m_toolState[aTool]; + st->transitions.push_back( TRANSITION( aConditions, aHandler ) ); } optional TOOL_MANAGER::ScheduleWait( TOOL_BASE* aTool, const TOOL_EVENT_LIST& aConditions ) { - TOOL_STATE* st = m_toolState[aTool]; - - // indicate to the manager that we are going to sleep and we shall be - // woken up when an event matching aConditions arrive - st->pendingWait = true; - st->waitEvents = aConditions; + TOOL_STATE* st = m_toolState[aTool]; - // switch context back to event dispatcher loop - st->cofunc->Yield(); + // indicate to the manager that we are going to sleep and we shall be + // woken up when an event matching aConditions arrive + st->pendingWait = true; + st->waitEvents = aConditions; - return st->wakeupEvent; + // switch context back to event dispatcher loop + st->cofunc->Yield(); + + return st->wakeupEvent; } void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) { - // iterate over all registered tools + // iterate over all registered tools BOOST_FOREACH( TOOL_ID toolId, m_activeTools ) { TOOL_STATE* st = m_toolIdIndex[toolId]; - // the tool state handler is waiting for events (i.e. called Wait() method) - if( st->pendingWait ) - { - if( st->waitEvents.Matches( aEvent ) ) - { - // By default, already processed events are not passed further - m_passEvent = false; + // the tool state handler is waiting for events (i.e. called Wait() method) + if( st->pendingWait ) + { + if( st->waitEvents.Matches( aEvent ) ) + { + // By default, already processed events are not passed further + m_passEvent = false; - // got matching event? clear wait list and wake up the coroutine - st->wakeupEvent = aEvent; - st->pendingWait = false; - st->waitEvents.clear(); - if( st->cofunc && !st->cofunc->Resume() ) - finishTool( st ); // The couroutine has finished + // got matching event? clear wait list and wake up the coroutine + st->wakeupEvent = aEvent; + st->pendingWait = false; + st->waitEvents.clear(); + if( st->cofunc && !st->cofunc->Resume() ) + finishTool( st ); // The couroutine has finished - // If the tool did not request to propagate - // the event to other tools, we should stop it now - if( !m_passEvent ) - break; - } - } + // If the tool did not request to propagate + // the event to other tools, we should stop it now + if( !m_passEvent ) + break; + } + } } BOOST_FOREACH( TOOL_STATE* st, m_toolState | boost::adaptors::map_values ) { // the tool scheduled next state(s) by calling Go() - if( !st->pendingWait ) - { - // no state handler in progress - check if there are any transitions (defined by - // Go() method that match the event. - if( st->transitions.size() ) - { - BOOST_FOREACH( TRANSITION tr, st->transitions ) - { - if( tr.first.Matches( aEvent ) ) - { - st->transitions.clear(); + if( !st->pendingWait ) + { + // no state handler in progress - check if there are any transitions (defined by + // Go() method that match the event. + if( st->transitions.size() ) + { + BOOST_FOREACH( TRANSITION tr, st->transitions ) + { + if( tr.first.Matches( aEvent ) ) + { + st->transitions.clear(); - // no tool context allocated yet? Create one. - if( !st->cofunc ) - st->cofunc = new COROUTINE( tr.second ); - else - st->cofunc->SetEntry( tr.second ); - - // got match? Run the handler. - st->cofunc->Call( aEvent ); - - if( !st->cofunc->Running() ) - finishTool( st ); // The couroutine has finished immediately? - } - } - } - } - } + // no tool context allocated yet? Create one. + if( !st->cofunc ) + st->cofunc = new COROUTINE( tr.second ); + else + st->cofunc->SetEntry( tr.second ); + + // got match? Run the handler. + st->cofunc->Call( aEvent ); + + if( !st->cofunc->Running() ) + finishTool( st ); // The couroutine has finished immediately? + } + } + } + } + } } @@ -411,90 +411,90 @@ void TOOL_MANAGER::finishTool( TOOL_STATE* aState ) bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) { -// wxLogDebug( "event: %s", aEvent.Format().c_str() ); +// wxLogDebug( "event: %s", aEvent.Format().c_str() ); // Early dispatch of events destined for the TOOL_MANAGER if( !dispatchStandardEvents( aEvent ) ) return false; - dispatchInternal( aEvent ); + dispatchInternal( aEvent ); - // popup menu handling + // popup menu handling BOOST_FOREACH( TOOL_ID toolId, m_activeTools ) { TOOL_STATE* st = m_toolIdIndex[toolId]; // the tool requested a context menu. The menu is activated on RMB click (CMENU_BUTTON mode) // or immediately (CMENU_NOW) mode. The latter is used for clarification lists. - if( st->contextMenuTrigger != CMENU_OFF ) - { - if( st->contextMenuTrigger == CMENU_BUTTON && !aEvent.IsClick( MB_Right ) ) - break; + if( st->contextMenuTrigger != CMENU_OFF ) + { + if( st->contextMenuTrigger == CMENU_BUTTON && !aEvent.IsClick( MB_Right ) ) + break; - st->pendingWait = true; - st->waitEvents = TOOL_EVENT( TC_Any, TA_Any ); + st->pendingWait = true; + st->waitEvents = TOOL_EVENT( TC_Any, TA_Any ); - if( st->contextMenuTrigger == CMENU_NOW ) - st->contextMenuTrigger = CMENU_OFF; + if( st->contextMenuTrigger == CMENU_NOW ) + st->contextMenuTrigger = CMENU_OFF; boost::scoped_ptr menu( new CONTEXT_MENU( *st->contextMenu ) ); GetEditFrame()->PopupMenu( menu->GetMenu() ); // - TOOL_EVENT evt( TC_Command, TA_ContextMenuChoice ); - dispatchInternal( evt ); + TOOL_EVENT evt( TC_Command, TA_ContextMenuChoice ); + dispatchInternal( evt ); - break; - } - } + break; + } + } - if( m_view->IsDirty() ) - { - PCB_EDIT_FRAME* f = static_cast( GetEditFrame() ); - f->GetGalCanvas()->Refresh(); // fixme: ugly hack, provide a method in TOOL_DISPATCHER. - } + if( m_view->IsDirty() ) + { + PCB_EDIT_FRAME* f = static_cast( GetEditFrame() ); + f->GetGalCanvas()->Refresh(); // fixme: ugly hack, provide a method in TOOL_DISPATCHER. + } - return false; + return false; } void TOOL_MANAGER::ScheduleContextMenu( TOOL_BASE* aTool, CONTEXT_MENU* aMenu, CONTEXT_MENU_TRIGGER aTrigger ) { - TOOL_STATE* st = m_toolState[aTool]; + TOOL_STATE* st = m_toolState[aTool]; - st->contextMenu = aMenu; - st->contextMenuTrigger = aTrigger; - - // the tool wants the menu immediately? Preempt it and do so :) - if( aTrigger == CMENU_NOW ) - st->cofunc->Yield(); + st->contextMenu = aMenu; + st->contextMenuTrigger = aTrigger; + + // the tool wants the menu immediately? Preempt it and do so :) + if( aTrigger == CMENU_NOW ) + st->cofunc->Yield(); } TOOL_ID TOOL_MANAGER::MakeToolId( const std::string& aToolName ) { - static int currentId; - return currentId++; + static int currentId; + return currentId++; } void TOOL_MANAGER::SetEnvironment( EDA_ITEM* aModel, KiGfx::VIEW* aView, KiGfx::VIEW_CONTROLS* aViewControls, wxWindow* aFrame ) { - m_model = aModel; - m_view = aView; - m_viewControls = aViewControls; - m_editFrame = aFrame; + m_model = aModel; + m_view = aView; + m_viewControls = aViewControls; + m_editFrame = aFrame; - // Reset state of the registered tools - BOOST_FOREACH( TOOL_ID toolId, m_activeTools ) - { - TOOL_BASE* tool = m_toolIdIndex[toolId]->theTool; + // Reset state of the registered tools + BOOST_FOREACH( TOOL_ID toolId, m_activeTools ) + { + TOOL_BASE* tool = m_toolIdIndex[toolId]->theTool; - if( tool->GetType() == TOOL_Interactive ) - static_cast( tool )->Reset(); - } + if( tool->GetType() == TOOL_Interactive ) + static_cast( tool )->Reset(); + } } diff --git a/include/class_drawpanel_gal.h b/include/class_drawpanel_gal.h index 8d6a789db2..6f9e0d2e8f 100644 --- a/include/class_drawpanel_gal.h +++ b/include/class_drawpanel_gal.h @@ -87,7 +87,7 @@ public: { return m_view; } - + /** * Function GetViewControls() * Returns a pointer to the VIEW_CONTROLS instance used in the panel. diff --git a/include/gal/color4d.h b/include/gal/color4d.h index 5d0ca571a3..28fbde2469 100644 --- a/include/gal/color4d.h +++ b/include/gal/color4d.h @@ -131,7 +131,7 @@ public: * Saturates the color to a given factor (in HSV model) */ COLOR4D& Saturate( double aFactor ); - + /** * Function Brightened * Returns a color that is brighter by a given factor, without modifying object. diff --git a/include/gal/opengl/shader.h b/include/gal/opengl/shader.h index b9dcbf88ba..a647a6733a 100644 --- a/include/gal/opengl/shader.h +++ b/include/gal/opengl/shader.h @@ -172,11 +172,11 @@ private: void programInfo( GLuint aProgram ); /** - * @brief Get the shader information. - * - * @param aShader is the shader number. - */ - void shaderInfo( GLuint aShader ); + * @brief Get the shader information. + * + * @param aShader is the shader number. + */ + void shaderInfo( GLuint aShader ); /** * @brief Read the shader source file diff --git a/include/geometry/seg.h b/include/geometry/seg.h index c5a93dbe19..24d2d490d2 100644 --- a/include/geometry/seg.h +++ b/include/geometry/seg.h @@ -36,278 +36,278 @@ typedef boost::optional OPT_VECTOR2I; class SEG { - private: - typedef VECTOR2I::extended_type ecoord; + private: + typedef VECTOR2I::extended_type ecoord; - public: + public: - friend inline std::ostream& operator<<( std::ostream& aStream, const SEG& aSeg ); + friend inline std::ostream& operator<<( std::ostream& aStream, const SEG& aSeg ); - /* Start and the of the segment. Public, to make access simpler. These are references - * to an object the segment belongs to (e.g. a line chain) or references to locally stored points - * (m_a, m_b). - */ - VECTOR2I& a, b; + /* Start and the of the segment. Public, to make access simpler. These are references + * to an object the segment belongs to (e.g. a line chain) or references to locally stored points + * (m_a, m_b). + */ + VECTOR2I& a, b; - /** Default constructor - * Creates an empty (0, 0) segment, locally-referenced - */ - SEG() : a( m_a ), b( m_b ) - { - a = m_a; - b = m_b; - m_is_local = true; - m_index = -1; - } + /** Default constructor + * Creates an empty (0, 0) segment, locally-referenced + */ + SEG() : a( m_a ), b( m_b ) + { + a = m_a; + b = m_b; + m_is_local = true; + m_index = -1; + } - /** - * Constructor - * Creates a segment between (aX1, aY1) and (aX2, aY2), locally referenced - */ - SEG( int aX1, int aY1, int aX2, int aY2 ) : a( m_a ), b( m_b ) - { - m_a = VECTOR2I( aX1, aY1 ); - m_b = VECTOR2I( aX2, aY2 ); - a = m_a; - b = m_b; - m_is_local = true; - m_index = -1; - } + /** + * Constructor + * Creates a segment between (aX1, aY1) and (aX2, aY2), locally referenced + */ + SEG( int aX1, int aY1, int aX2, int aY2 ) : a( m_a ), b( m_b ) + { + m_a = VECTOR2I( aX1, aY1 ); + m_b = VECTOR2I( aX2, aY2 ); + a = m_a; + b = m_b; + m_is_local = true; + m_index = -1; + } - /** - * Constructor - * Creates a segment between (aA) and (aB), locally referenced - */ - SEG( const VECTOR2I& aA, const VECTOR2I& aB ) : a( m_a ), b( m_b ), m_a( aA ), m_b( aB ) - { - a = m_a; - b = m_b; - m_is_local = true; - m_index = -1; - } - - /** - * Constructor - * Creates a segment between (aA) and (aB), referenced to a multi-segment shape - * @param aA reference to the start point in the parent shape - * @param aB reference to the end point in the parent shape - * @param aIndex index of the segment within the parent shape - */ - SEG ( VECTOR2I& aA, VECTOR2I& aB, int aIndex ) : a( aA ), b( aB ) - { - m_is_local = false; - m_index = aIndex; - } + /** + * Constructor + * Creates a segment between (aA) and (aB), locally referenced + */ + SEG( const VECTOR2I& aA, const VECTOR2I& aB ) : a( m_a ), b( m_b ), m_a( aA ), m_b( aB ) + { + a = m_a; + b = m_b; + m_is_local = true; + m_index = -1; + } - /** - * Copy constructor - */ - SEG ( const SEG& aSeg ) : a( m_a ), b( m_b ) - { - if (aSeg.m_is_local) - { - m_a = aSeg.m_a; - m_b = aSeg.m_b; - a = m_a; - b = m_b; - m_is_local = true; - m_index = -1; - } else { - a = aSeg.a; - b = aSeg.b; - m_index = aSeg.m_index; - m_is_local = false; - } - } + /** + * Constructor + * Creates a segment between (aA) and (aB), referenced to a multi-segment shape + * @param aA reference to the start point in the parent shape + * @param aB reference to the end point in the parent shape + * @param aIndex index of the segment within the parent shape + */ + SEG ( VECTOR2I& aA, VECTOR2I& aB, int aIndex ) : a( aA ), b( aB ) + { + m_is_local = false; + m_index = aIndex; + } - SEG& operator=( const SEG& aSeg ) - { - a = aSeg.a; - b = aSeg.b; - m_a = aSeg.m_a; - m_b = aSeg.m_b; - m_index = aSeg.m_index; - m_is_local = aSeg.m_is_local; - return *this; - } + /** + * Copy constructor + */ + SEG ( const SEG& aSeg ) : a( m_a ), b( m_b ) + { + if (aSeg.m_is_local) + { + m_a = aSeg.m_a; + m_b = aSeg.m_b; + a = m_a; + b = m_b; + m_is_local = true; + m_index = -1; + } else { + a = aSeg.a; + b = aSeg.b; + m_index = aSeg.m_index; + m_is_local = false; + } + } - /** - * Function LineProject() - * - * Computes the perpendicular projection point of aP on a line passing through - * ends of the segment. - * @param aP point to project - * @return projected point - */ - VECTOR2I LineProject( const VECTOR2I& aP ) const; + SEG& operator=( const SEG& aSeg ) + { + a = aSeg.a; + b = aSeg.b; + m_a = aSeg.m_a; + m_b = aSeg.m_b; + m_index = aSeg.m_index; + m_is_local = aSeg.m_is_local; + return *this; + } - /** - * Function Side() - * - * Determines on which side of directed line passing via segment ends point aP lies. - * @param aP point to determine the orientation wrs to self - * @return: < 0: left, 0 : on the line, > 0 : right - */ - int Side( const VECTOR2I& aP ) const - { - const ecoord det = ( b - a ).Cross( aP - a ); + /** + * Function LineProject() + * + * Computes the perpendicular projection point of aP on a line passing through + * ends of the segment. + * @param aP point to project + * @return projected point + */ + VECTOR2I LineProject( const VECTOR2I& aP ) const; - return det < 0 ? -1 : ( det > 0 ? 1 : 0 ); - } + /** + * Function Side() + * + * Determines on which side of directed line passing via segment ends point aP lies. + * @param aP point to determine the orientation wrs to self + * @return: < 0: left, 0 : on the line, > 0 : right + */ + int Side( const VECTOR2I& aP ) const + { + const ecoord det = ( b - a ).Cross( aP - a ); - /** - * Function LineDistance() - * - * Returns the closest Euclidean distance between point aP and the line defined by - * the ends of segment (this). - * @param aDetermineSide: when true, the sign of the returned value indicates - * the side of the line at which we are (negative = left) - * @return the distance - */ - int LineDistance( const VECTOR2I& aP, bool aDetermineSide = false ) const; + return det < 0 ? -1 : ( det > 0 ? 1 : 0 ); + } - /** - * Function NearestPoint() - * - * Computes a point on the segment (this) that is closest to point aP. - * @return: nearest point - */ - const VECTOR2I NearestPoint( const VECTOR2I &aP ) const; + /** + * Function LineDistance() + * + * Returns the closest Euclidean distance between point aP and the line defined by + * the ends of segment (this). + * @param aDetermineSide: when true, the sign of the returned value indicates + * the side of the line at which we are (negative = left) + * @return the distance + */ + int LineDistance( const VECTOR2I& aP, bool aDetermineSide = false ) const; - /** - * Function Intersect() - * - * Computes intersection point of segment (this) with segment aSeg. - * @param aSeg: segment to intersect with - * @param aIgnoreEndpoints: don't treat corner cases (i.e. end of one segment touching the other) - * as intersections. - * @param aLines: treat segments as infinite lines - * @return intersection point, if exists - */ - OPT_VECTOR2I Intersect( const SEG& aSeg, bool aIgnoreEndpoints = false, bool aLines = false ) const; + /** + * Function NearestPoint() + * + * Computes a point on the segment (this) that is closest to point aP. + * @return: nearest point + */ + const VECTOR2I NearestPoint( const VECTOR2I &aP ) const; - /** - * Function IntersectLines() - * - * Computes the intersection point of lines passing through ends of (this) and aSeg - * @param aSeg segment defining the line to intersect with - * @return intersection point, if exists - */ - OPT_VECTOR2I IntersectLines( const SEG& aSeg ) const - { - return Intersect( aSeg, false, true ); - } + /** + * Function Intersect() + * + * Computes intersection point of segment (this) with segment aSeg. + * @param aSeg: segment to intersect with + * @param aIgnoreEndpoints: don't treat corner cases (i.e. end of one segment touching the other) + * as intersections. + * @param aLines: treat segments as infinite lines + * @return intersection point, if exists + */ + OPT_VECTOR2I Intersect( const SEG& aSeg, bool aIgnoreEndpoints = false, bool aLines = false ) const; - bool Collide( const SEG& aSeg, int aClearance ) const; + /** + * Function IntersectLines() + * + * Computes the intersection point of lines passing through ends of (this) and aSeg + * @param aSeg segment defining the line to intersect with + * @return intersection point, if exists + */ + OPT_VECTOR2I IntersectLines( const SEG& aSeg ) const + { + return Intersect( aSeg, false, true ); + } - /** - * Function Distance() - * - * Computes minimum Euclidean distance to segment aSeg. - * @param aSeg other segment - * @return minimum distance - */ - - ecoord SquaredDistance( const SEG& aSeg ) const; - - int Distance( const SEG& aSeg ) const - { - return sqrt( SquaredDistance( aSeg ) ); - } - - /** - * Function Distance() - * - * Computes minimum Euclidean distance to point aP. - * @param aP the point - * @return minimum distance - */ - ecoord SquaredDistance( const VECTOR2I& aP ) const - { - return ( NearestPoint( aP ) - aP ).SquaredEuclideanNorm(); - } + bool Collide( const SEG& aSeg, int aClearance ) const; - int Distance( const VECTOR2I& aP ) const - { - return sqrt( SquaredDistance( aP ) ); - } + /** + * Function Distance() + * + * Computes minimum Euclidean distance to segment aSeg. + * @param aSeg other segment + * @return minimum distance + */ - /** - * Function Collinear() - * - * Checks if segment aSeg lies on the same line as (this). - * @param aSeg the segment to chech colinearity with - * @return true, when segments are collinear. - */ - bool Collinear( const SEG& aSeg ) const - { - ecoord qa1 = a.y - b.y; - ecoord qb1 = b.x - a.x; - ecoord qc1 = -qa1 * a.x - qb1 * a.y; - ecoord qa2 = aSeg.a.y - aSeg.b.y; - ecoord qb2 = aSeg.b.x - aSeg.a.x; - ecoord qc2 = -qa2 * aSeg.a.x - qb2 * aSeg.a.y; + ecoord SquaredDistance( const SEG& aSeg ) const; - return ( qa1 == qa2 ) && ( qb1 == qb2 ) && ( qc1 == qc2 ); - } + int Distance( const SEG& aSeg ) const + { + return sqrt( SquaredDistance( aSeg ) ); + } - /** - * Function Length() - * - * Returns the length (this) - * @return length - */ - int Length() const - { - return ( a - b ).EuclideanNorm(); - } - - ecoord SquaredLength() const - { - return ( a - b ).SquaredEuclideanNorm(); - } + /** + * Function Distance() + * + * Computes minimum Euclidean distance to point aP. + * @param aP the point + * @return minimum distance + */ + ecoord SquaredDistance( const VECTOR2I& aP ) const + { + return ( NearestPoint( aP ) - aP ).SquaredEuclideanNorm(); + } - /** - * Function Index() - * - * Return the index of this segment in its parent shape (applicable only to non-local segments) - * @return index value - */ - int Index() const - { - return m_index; - } + int Distance( const VECTOR2I& aP ) const + { + return sqrt( SquaredDistance( aP ) ); + } - bool Contains( const VECTOR2I& aP ) const; + /** + * Function Collinear() + * + * Checks if segment aSeg lies on the same line as (this). + * @param aSeg the segment to chech colinearity with + * @return true, when segments are collinear. + */ + bool Collinear( const SEG& aSeg ) const + { + ecoord qa1 = a.y - b.y; + ecoord qb1 = b.x - a.x; + ecoord qc1 = -qa1 * a.x - qb1 * a.y; + ecoord qa2 = aSeg.a.y - aSeg.b.y; + ecoord qb2 = aSeg.b.x - aSeg.a.x; + ecoord qc2 = -qa2 * aSeg.a.x - qb2 * aSeg.a.y; - bool PointCloserThan( const VECTOR2I& aP, int aDist ) const; + return ( qa1 == qa2 ) && ( qb1 == qb2 ) && ( qc1 == qc2 ); + } - // friend std::ostream& operator<<( std::ostream& stream, const SEG& aSeg ); - private: - bool ccw( const VECTOR2I& aA, const VECTOR2I& aB, const VECTOR2I &aC ) const; - - ///> locally stored start/end coordinates (used when m_is_local == true) - VECTOR2I m_a, m_b; + /** + * Function Length() + * + * Returns the length (this) + * @return length + */ + int Length() const + { + return ( a - b ).EuclideanNorm(); + } - ///> index withing the parent shape (used when m_is_local == false) - int m_index; + ecoord SquaredLength() const + { + return ( a - b ).SquaredEuclideanNorm(); + } - ///> locality flag - bool m_is_local; + /** + * Function Index() + * + * Return the index of this segment in its parent shape (applicable only to non-local segments) + * @return index value + */ + int Index() const + { + return m_index; + } + + bool Contains( const VECTOR2I& aP ) const; + + bool PointCloserThan( const VECTOR2I& aP, int aDist ) const; + + // friend std::ostream& operator<<( std::ostream& stream, const SEG& aSeg ); + private: + bool ccw( const VECTOR2I& aA, const VECTOR2I& aB, const VECTOR2I &aC ) const; + + ///> locally stored start/end coordinates (used when m_is_local == true) + VECTOR2I m_a, m_b; + + ///> index withing the parent shape (used when m_is_local == false) + int m_index; + + ///> locality flag + bool m_is_local; }; inline VECTOR2I SEG::LineProject( const VECTOR2I& aP ) const { - // fixme: numerical errors for large integers - assert( false ); - return VECTOR2I( 0, 0 ); + // fixme: numerical errors for large integers + assert( false ); + return VECTOR2I( 0, 0 ); } inline int SEG::LineDistance( const VECTOR2I& aP, bool aDetermineSide ) const { ecoord p = a.y - b.y; ecoord q = b.x - a.x; - ecoord r = -p * a.x - q * a.y; + ecoord r = -p * a.x - q * a.y; ecoord dist = ( p * aP.x + q * aP.y + r ) / sqrt( p * p + q * q ); @@ -321,14 +321,14 @@ inline const VECTOR2I SEG::NearestPoint( const VECTOR2I& aP ) const if( l_squared == 0 ) return a; - + ecoord t = d.Dot( aP - a ); - + if( t < 0 ) return a; else if( t > l_squared ) return b; - + int xp = rescale( t, (ecoord)d.x, l_squared ); int yp = rescale( t, (ecoord)d.y, l_squared ); @@ -338,7 +338,7 @@ inline const VECTOR2I SEG::NearestPoint( const VECTOR2I& aP ) const inline std::ostream& operator<<( std::ostream& aStream, const SEG& aSeg ) { if( aSeg.m_is_local ) - aStream << "[ local " << aSeg.a << " - " << aSeg.b << " ]"; + aStream << "[ local " << aSeg.a << " - " << aSeg.b << " ]"; return aStream; } diff --git a/include/geometry/shape.h b/include/geometry/shape.h index 2a42659c20..32bd57bea9 100644 --- a/include/geometry/shape.h +++ b/include/geometry/shape.h @@ -36,109 +36,109 @@ */ enum ShapeType { - SH_RECT = 0, ///> axis-aligned rectangle - SH_SEGMENT, ///> line segment - SH_LINE_CHAIN, ///> line chain (polyline) - SH_CIRCLE ///> circle + SH_RECT = 0, ///> axis-aligned rectangle + SH_SEGMENT, ///> line segment + SH_LINE_CHAIN, ///> line chain (polyline) + SH_CIRCLE ///> circle }; /** * Class SHAPE - * + * * Represents an abstract shape on 2D plane. - */ + */ class SHAPE { - protected: - typedef VECTOR2I::extended_type ecoord; + protected: + typedef VECTOR2I::extended_type ecoord; - public: - /** - * Constructor - * - * Creates an empty shape of type aType - */ + public: + /** + * Constructor + * + * Creates an empty shape of type aType + */ - SHAPE ( ShapeType aType ) : m_type( aType ) { }; - - // Destructor - virtual ~SHAPE() {}; + SHAPE ( ShapeType aType ) : m_type( aType ) { }; - /** - * Function Type() - * - * Returns the type of the shape. - * @retval the type - */ - ShapeType Type() const { return m_type; } + // Destructor + virtual ~SHAPE() {}; - /** - * Function Clone() - * - * Returns a dynamically allocated copy of the shape - * @retval copy of the shape - */ - virtual SHAPE* Clone() const { - assert( false ); - return NULL; - }; + /** + * Function Type() + * + * Returns the type of the shape. + * @retval the type + */ + ShapeType Type() const { return m_type; } - /** - * Function Collide() - * - * Checks if the boundary of shape (this) lies closer to the point aP than aClearance, indicating - * a collision. - * @return true, if there is a collision. - */ - virtual bool Collide( const VECTOR2I& aP, int aClearance = 0 ) const - { - return Collide( SEG( aP, aP ), aClearance ); - } - - /** - * Function Collide() - * - * Checks if the boundary of shape (this) lies closer to the shape aShape than aClearance, indicating - * a collision. - * @param aShape shape to check collision against - * @param aClearance minimum clearance - * @param aMTV minimum translation vector - * @return true, if there is a collision. - */ - virtual bool Collide( const SHAPE* aShape, int aClerance, VECTOR2I& aMTV ) const; - virtual bool Collide( const SHAPE* aShape, int aClerance = 0 ) const; - /** - * Function Collide() - * - * Checks if the boundary of shape (this) lies closer to the segment aSeg than aClearance, indicating - * a collision. - * @return true, if there is a collision. - */ - virtual bool Collide( const SEG& aSeg, int aClearance = 0 ) const = 0; - - /** - * Function Collide() - * - * Computes a bounding box of the shape, with a margin of aClearance - * a collision. - * @aClearance how much the bounding box is expanded wrs to the minimum enclosing rectangle for the shape. - * @return the bounding box. - */ - virtual const BOX2I BBox( int aClearance = 0 ) const = 0; + /** + * Function Clone() + * + * Returns a dynamically allocated copy of the shape + * @retval copy of the shape + */ + virtual SHAPE* Clone() const { + assert( false ); + return NULL; + }; - /** - * Function Centre() - * - * Computes a center-of-mass of the shape - * @return the center-of-mass point - */ - virtual VECTOR2I Centre() const - { - return BBox( 0 ).Centre(); // if nothing better is available.... - } + /** + * Function Collide() + * + * Checks if the boundary of shape (this) lies closer to the point aP than aClearance, indicating + * a collision. + * @return true, if there is a collision. + */ + virtual bool Collide( const VECTOR2I& aP, int aClearance = 0 ) const + { + return Collide( SEG( aP, aP ), aClearance ); + } - private: - ///> type of our shape - ShapeType m_type; + /** + * Function Collide() + * + * Checks if the boundary of shape (this) lies closer to the shape aShape than aClearance, indicating + * a collision. + * @param aShape shape to check collision against + * @param aClearance minimum clearance + * @param aMTV minimum translation vector + * @return true, if there is a collision. + */ + virtual bool Collide( const SHAPE* aShape, int aClerance, VECTOR2I& aMTV ) const; + virtual bool Collide( const SHAPE* aShape, int aClerance = 0 ) const; + /** + * Function Collide() + * + * Checks if the boundary of shape (this) lies closer to the segment aSeg than aClearance, indicating + * a collision. + * @return true, if there is a collision. + */ + virtual bool Collide( const SEG& aSeg, int aClearance = 0 ) const = 0; + + /** + * Function Collide() + * + * Computes a bounding box of the shape, with a margin of aClearance + * a collision. + * @aClearance how much the bounding box is expanded wrs to the minimum enclosing rectangle for the shape. + * @return the bounding box. + */ + virtual const BOX2I BBox( int aClearance = 0 ) const = 0; + + /** + * Function Centre() + * + * Computes a center-of-mass of the shape + * @return the center-of-mass point + */ + virtual VECTOR2I Centre() const + { + return BBox( 0 ).Centre(); // if nothing better is available.... + } + + private: + ///> type of our shape + ShapeType m_type; }; diff --git a/include/geometry/shape_circle.h b/include/geometry/shape_circle.h index d6732a0c64..31d174f3d9 100644 --- a/include/geometry/shape_circle.h +++ b/include/geometry/shape_circle.h @@ -30,48 +30,48 @@ class SHAPE_CIRCLE : public SHAPE { public: - SHAPE_CIRCLE(): - SHAPE( SH_CIRCLE ), m_radius( 0 ) {}; - - SHAPE_CIRCLE( const VECTOR2I& aCenter, int aRadius ): - SHAPE( SH_CIRCLE ), m_radius( aRadius ), m_center( aCenter ) {}; + SHAPE_CIRCLE(): + SHAPE( SH_CIRCLE ), m_radius( 0 ) {}; - ~SHAPE_CIRCLE() {}; + SHAPE_CIRCLE( const VECTOR2I& aCenter, int aRadius ): + SHAPE( SH_CIRCLE ), m_radius( aRadius ), m_center( aCenter ) {}; - const BOX2I BBox( int aClearance = 0 ) const - { - const VECTOR2I rc( m_radius + aClearance, m_radius + aClearance ); - return BOX2I( m_center - rc, rc * 2 ); - } + ~SHAPE_CIRCLE() {}; - bool Collide( const SEG& aSeg, int aClearance = 0 ) const - { - int rc = aClearance + m_radius; - return aSeg.Distance( m_center ) <= rc; - } + const BOX2I BBox( int aClearance = 0 ) const + { + const VECTOR2I rc( m_radius + aClearance, m_radius + aClearance ); + return BOX2I( m_center - rc, rc * 2 ); + } - void SetRadius( int aRadius ) - { - m_radius = aRadius; - } + bool Collide( const SEG& aSeg, int aClearance = 0 ) const + { + int rc = aClearance + m_radius; + return aSeg.Distance( m_center ) <= rc; + } - void SetCenter( const VECTOR2I& aCenter ) - { - m_center = aCenter; - } + void SetRadius( int aRadius ) + { + m_radius = aRadius; + } - int GetRadius() const - { - return m_radius; - } + void SetCenter( const VECTOR2I& aCenter ) + { + m_center = aCenter; + } - const VECTOR2I GetCenter() const - { - return m_center; - } + int GetRadius() const + { + return m_radius; + } + + const VECTOR2I GetCenter() const + { + return m_center; + } private: - int m_radius; - VECTOR2I m_center; + int m_radius; + VECTOR2I m_center; }; #endif diff --git a/include/geometry/shape_index.h b/include/geometry/shape_index.h index 956829ae87..5686eb28e6 100644 --- a/include/geometry/shape_index.h +++ b/include/geometry/shape_index.h @@ -276,11 +276,11 @@ class SHAPE_INDEX { BOX2I box = aShape->BBox(); box.Inflate( aMinDistance ); - - int min[2] = { box.GetX(), box.GetY() }; - int max[2] = { box.GetRight(), box.GetBottom() }; - return this->m_tree->Search( min, max, aVisitor ); + int min[2] = { box.GetX(), box.GetY() }; + int max[2] = { box.GetRight(), box.GetBottom() }; + + return this->m_tree->Search( min, max, aVisitor ); } /** diff --git a/include/geometry/shape_index_list.h b/include/geometry/shape_index_list.h index fc210f80a6..9f849ab83c 100644 --- a/include/geometry/shape_index_list.h +++ b/include/geometry/shape_index_list.h @@ -29,205 +29,205 @@ template const SHAPE* defaultShapeFunctor( const T aItem ) { - return aItem->GetShape(); + return aItem->GetShape(); } template > class SHAPE_INDEX_LIST { - - struct ShapeEntry { - ShapeEntry( T aParent ) - { - shape = ShapeFunctor( aParent ); - bbox = shape->BBox( 0 ); - parent = aParent; - } - ~ShapeEntry() - { - } + struct ShapeEntry { + ShapeEntry( T aParent ) + { + shape = ShapeFunctor( aParent ); + bbox = shape->BBox( 0 ); + parent = aParent; + } - T parent; - const SHAPE* shape; - BOX2I bbox; - }; + ~ShapeEntry() + { + } + + T parent; + const SHAPE* shape; + BOX2I bbox; + }; + + typedef std::vector ShapeVec; + typedef typename std::vector::iterator ShapeVecIter; - typedef std::vector ShapeVec; - typedef typename std::vector::iterator ShapeVecIter; - public: - // "Normal" iterator interface, for STL algorithms. - class iterator { - public: - iterator() {}; + // "Normal" iterator interface, for STL algorithms. + class iterator { + public: + iterator() {}; - iterator( ShapeVecIter aCurrent ) - : m_current( aCurrent ) {}; + iterator( ShapeVecIter aCurrent ) + : m_current( aCurrent ) {}; - iterator( const iterator &aB ) : - m_current( aB.m_current ) {}; + iterator( const iterator &aB ) : + m_current( aB.m_current ) {}; - T operator*() const - { - return (*m_current).parent; - } + T operator*() const + { + return (*m_current).parent; + } - void operator++() - { - ++m_current; - } + void operator++() + { + ++m_current; + } - iterator& operator++( int aDummy ) - { - ++m_current; - return *this; - } + iterator& operator++( int aDummy ) + { + ++m_current; + return *this; + } - bool operator==( const iterator& aRhs ) const - { - return m_current == aRhs.m_current; - } + bool operator==( const iterator& aRhs ) const + { + return m_current == aRhs.m_current; + } - bool operator!=( const iterator& aRhs ) const - { - return m_current != aRhs.m_current; - } + bool operator!=( const iterator& aRhs ) const + { + return m_current != aRhs.m_current; + } - const iterator& operator=( const iterator& aRhs ) - { - m_current = aRhs.m_current; - return *this; - } + const iterator& operator=( const iterator& aRhs ) + { + m_current = aRhs.m_current; + return *this; + } - private: - ShapeVecIter m_current; - }; + private: + ShapeVecIter m_current; + }; - // "Query" iterator, for iterating over a set of spatially matching shapes. - class query_iterator { - public: - query_iterator() - { - } + // "Query" iterator, for iterating over a set of spatially matching shapes. + class query_iterator { + public: + query_iterator() + { + } - query_iterator( ShapeVecIter aCurrent, ShapeVecIter aEnd, SHAPE* aShape, - int aMinDistance, bool aExact ) : - m_end( aEnd ), - m_current( aCurrent ), - m_shape( aShape ), - m_minDistance( aMinDistance ), - m_exact( aExact ) - { - if( aShape ) - { - m_refBBox = aShape->BBox(); - next(); - } - } + query_iterator( ShapeVecIter aCurrent, ShapeVecIter aEnd, SHAPE* aShape, + int aMinDistance, bool aExact ) : + m_end( aEnd ), + m_current( aCurrent ), + m_shape( aShape ), + m_minDistance( aMinDistance ), + m_exact( aExact ) + { + if( aShape ) + { + m_refBBox = aShape->BBox(); + next(); + } + } - query_iterator( const query_iterator &aB ) : - m_end( aB.m_end ), - m_current( aB.m_current ), - m_shape( aB.m_shape ), - m_minDistance( aB.m_minDistance ), - m_exact( aB.m_exact ), - m_refBBox( aB.m_refBBox ) - { - } - - T operator*() const - { - return (*m_current).parent; - } + query_iterator( const query_iterator &aB ) : + m_end( aB.m_end ), + m_current( aB.m_current ), + m_shape( aB.m_shape ), + m_minDistance( aB.m_minDistance ), + m_exact( aB.m_exact ), + m_refBBox( aB.m_refBBox ) + { + } - query_iterator& operator++() - { - ++m_current; - next(); - return *this; - } + T operator*() const + { + return (*m_current).parent; + } - query_iterator& operator++( int aDummy ) - { - ++m_current; - next(); - return *this; - } + query_iterator& operator++() + { + ++m_current; + next(); + return *this; + } - bool operator==( const query_iterator& aRhs ) const - { - return m_current == aRhs.m_current; - } + query_iterator& operator++( int aDummy ) + { + ++m_current; + next(); + return *this; + } - bool operator!=( const query_iterator& aRhs ) const - { - return m_current != aRhs.m_current; - } + bool operator==( const query_iterator& aRhs ) const + { + return m_current == aRhs.m_current; + } - const query_iterator& operator=( const query_iterator& aRhs ) - { - m_end = aRhs.m_end; - m_current = aRhs.m_current; - m_shape = aRhs.m_shape; - m_minDistance = aRhs.m_minDistance; - m_exact = aRhs.m_exact; - m_refBBox = aRhs.m_refBBox; - return *this; - } + bool operator!=( const query_iterator& aRhs ) const + { + return m_current != aRhs.m_current; + } - private: - void next() - { - while( m_current != m_end ) - { - if( m_refBBox.Distance( m_current->bbox ) <= m_minDistance ) - { - if( !m_exact || m_current->shape->Collide( m_shape, m_minDistance ) ) - return; - } + const query_iterator& operator=( const query_iterator& aRhs ) + { + m_end = aRhs.m_end; + m_current = aRhs.m_current; + m_shape = aRhs.m_shape; + m_minDistance = aRhs.m_minDistance; + m_exact = aRhs.m_exact; + m_refBBox = aRhs.m_refBBox; + return *this; + } - ++m_current; - } - } + private: + void next() + { + while( m_current != m_end ) + { + if( m_refBBox.Distance( m_current->bbox ) <= m_minDistance ) + { + if( !m_exact || m_current->shape->Collide( m_shape, m_minDistance ) ) + return; + } - ShapeVecIter m_end; - ShapeVecIter m_current; - BOX2I m_refBBox; - bool m_exact; - SHAPE *m_shape; - int m_minDistance; - }; + ++m_current; + } + } - void Add( T aItem ) - { - ShapeEntry s( aItem ); + ShapeVecIter m_end; + ShapeVecIter m_current; + BOX2I m_refBBox; + bool m_exact; + SHAPE *m_shape; + int m_minDistance; + }; - m_shapes.push_back(s); - } - - void Remove( const T aItem ) - { - ShapeVecIter i; - - for( i = m_shapes.begin(); i != m_shapes.end(); ++i ) - { - if( i->parent == aItem ) - break; - } + void Add( T aItem ) + { + ShapeEntry s( aItem ); - if( i == m_shapes.end() ) - return; + m_shapes.push_back(s); + } - m_shapes.erase( i ); - } + void Remove( const T aItem ) + { + ShapeVecIter i; - int Size() const - { - return m_shapes.size(); - } + for( i = m_shapes.begin(); i != m_shapes.end(); ++i ) + { + if( i->parent == aItem ) + break; + } - template + if( i == m_shapes.end() ) + return; + + m_shapes.erase( i ); + } + + int Size() const + { + return m_shapes.size(); + } + + template int Query( const SHAPE *aShape, int aMinDistance, Visitor &aV, bool aExact = true ) //const { ShapeVecIter i; @@ -251,33 +251,33 @@ public: return n; } - void Clear() - { - m_shapes.clear(); - } - - query_iterator qbegin( SHAPE* aShape, int aMinDistance, bool aExact ) - { - return query_iterator( m_shapes.begin(), m_shapes.end(), aShape, aMinDistance, aExact ); - } + void Clear() + { + m_shapes.clear(); + } - const query_iterator qend() - { - return query_iterator( m_shapes.end(), m_shapes.end(), NULL, 0, false ); - } + query_iterator qbegin( SHAPE* aShape, int aMinDistance, bool aExact ) + { + return query_iterator( m_shapes.begin(), m_shapes.end(), aShape, aMinDistance, aExact ); + } - iterator begin() - { - return iterator( m_shapes.begin() ); - } + const query_iterator qend() + { + return query_iterator( m_shapes.end(), m_shapes.end(), NULL, 0, false ); + } - iterator end() - { - return iterator( m_shapes.end() ); - } + iterator begin() + { + return iterator( m_shapes.begin() ); + } + + iterator end() + { + return iterator( m_shapes.end() ); + } private: - ShapeVec m_shapes; + ShapeVec m_shapes; }; #endif diff --git a/include/geometry/shape_line_chain.h b/include/geometry/shape_line_chain.h index ab865ae555..6a2e61372e 100644 --- a/include/geometry/shape_line_chain.h +++ b/include/geometry/shape_line_chain.h @@ -38,504 +38,504 @@ * Class SHAPE_LINE_CHAIN * * Represents a polyline (an zero-thickness chain of connected line segments). - * I purposedly didn't name it "polyline" to avoid confusion with the existing CPolyLine class in pcbnew. + * I purposedly didn't name it "polyline" to avoid confusion with the existing CPolyLine class in pcbnew. * * SHAPE_LINE_CHAIN class shall not be used for polygons! */ class SHAPE_LINE_CHAIN : public SHAPE { - private: - typedef std::vector::iterator point_iter; - typedef std::vector::const_iterator point_citer; + private: + typedef std::vector::iterator point_iter; + typedef std::vector::const_iterator point_citer; - public: + public: - /** - * Struct Intersection - * - * Represents an intersection between two line segments - */ - struct Intersection - { - /// segment belonging from the (this) argument of Intersect() - SEG our; - /// segment belonging from the aOther argument of Intersect() - SEG their; - /// point of intersection between our and their. - VECTOR2I p; - }; + /** + * Struct Intersection + * + * Represents an intersection between two line segments + */ + struct Intersection + { + /// segment belonging from the (this) argument of Intersect() + SEG our; + /// segment belonging from the aOther argument of Intersect() + SEG their; + /// point of intersection between our and their. + VECTOR2I p; + }; - typedef std::vector Intersections; + typedef std::vector Intersections; - /** - * Constructor - * Initializes an empty line chain. - */ - SHAPE_LINE_CHAIN(): - SHAPE( SH_LINE_CHAIN ), m_closed( false ) {}; + /** + * Constructor + * Initializes an empty line chain. + */ + SHAPE_LINE_CHAIN(): + SHAPE( SH_LINE_CHAIN ), m_closed( false ) {}; - /** - * Copy Constructor - */ - SHAPE_LINE_CHAIN( const SHAPE_LINE_CHAIN& aShape ) : - SHAPE( SH_LINE_CHAIN ), m_points( aShape.m_points ), m_closed( aShape.m_closed ) {}; + /** + * Copy Constructor + */ + SHAPE_LINE_CHAIN( const SHAPE_LINE_CHAIN& aShape ) : + SHAPE( SH_LINE_CHAIN ), m_points( aShape.m_points ), m_closed( aShape.m_closed ) {}; - /** - * Constructor - * Initializes a 2-point line chain (a single segment) - */ - SHAPE_LINE_CHAIN( const VECTOR2I& aA, const VECTOR2I& aB ) : - SHAPE( SH_LINE_CHAIN ), - m_closed( false ) - { - m_points.resize( 2 ); - m_points[0] = aA; - m_points[1] = aB; - } + /** + * Constructor + * Initializes a 2-point line chain (a single segment) + */ + SHAPE_LINE_CHAIN( const VECTOR2I& aA, const VECTOR2I& aB ) : + SHAPE( SH_LINE_CHAIN ), + m_closed( false ) + { + m_points.resize( 2 ); + m_points[0] = aA; + m_points[1] = aB; + } - SHAPE_LINE_CHAIN( const VECTOR2I& aA, const VECTOR2I& aB, const VECTOR2I& aC ): - SHAPE( SH_LINE_CHAIN ), - m_closed( false ) - { - m_points.resize( 3 ); - m_points[0] = aA; - m_points[1] = aB; - m_points[2] = aC; - } + SHAPE_LINE_CHAIN( const VECTOR2I& aA, const VECTOR2I& aB, const VECTOR2I& aC ): + SHAPE( SH_LINE_CHAIN ), + m_closed( false ) + { + m_points.resize( 3 ); + m_points[0] = aA; + m_points[1] = aB; + m_points[2] = aC; + } - SHAPE_LINE_CHAIN(const VECTOR2I* aV, int aCount ) : - SHAPE( SH_LINE_CHAIN ), - m_closed( false ) - { - m_points.resize( aCount ); + SHAPE_LINE_CHAIN(const VECTOR2I* aV, int aCount ) : + SHAPE( SH_LINE_CHAIN ), + m_closed( false ) + { + m_points.resize( aCount ); - for( int i = 0; i < aCount; i++ ) - m_points[i] = *aV++; - } + for( int i = 0; i < aCount; i++ ) + m_points[i] = *aV++; + } - ~SHAPE_LINE_CHAIN() {}; + ~SHAPE_LINE_CHAIN() {}; - /** - * Function Clear() - * Removes all points from the line chain. - */ - void Clear() - { - m_points.clear(); - m_closed = false; - } + /** + * Function Clear() + * Removes all points from the line chain. + */ + void Clear() + { + m_points.clear(); + m_closed = false; + } - /** - * Function SetClosed() - * - * Marks the line chain as closed (i.e. with a segment connecting the last point with the first point). - * @param aClosed: whether the line chain is to be closed or not. - */ - void SetClosed( bool aClosed ) - { - m_closed = aClosed; - } + /** + * Function SetClosed() + * + * Marks the line chain as closed (i.e. with a segment connecting the last point with the first point). + * @param aClosed: whether the line chain is to be closed or not. + */ + void SetClosed( bool aClosed ) + { + m_closed = aClosed; + } - /** - * Function IsClosed() - * - * @return aClosed: true, when our line is closed. - */ - bool IsClosed() const - { - return m_closed; - } + /** + * Function IsClosed() + * + * @return aClosed: true, when our line is closed. + */ + bool IsClosed() const + { + return m_closed; + } - /** - * Function SegmentCount() - * - * Returns number of segments in this line chain. - * @return number of segments - */ - int SegmentCount() const - { - int c = m_points.size() - 1; - if( m_closed ) - c++; + /** + * Function SegmentCount() + * + * Returns number of segments in this line chain. + * @return number of segments + */ + int SegmentCount() const + { + int c = m_points.size() - 1; + if( m_closed ) + c++; - return std::max( 0, c ); - } + return std::max( 0, c ); + } - /** - * Function PointCount() - * - * Returns the number of points (vertices) in this line chain - * @return number of points - */ - int PointCount() const - { - return m_points.size(); - } + /** + * Function PointCount() + * + * Returns the number of points (vertices) in this line chain + * @return number of points + */ + int PointCount() const + { + return m_points.size(); + } - /** - * Function Segment() - * - * Returns a segment referencing to the segment (index) in the line chain. - * Modifying ends of the returned segment will modify corresponding points in the line chain. - * @param aIndex: index of the segment in the line chain. Negative values are counted from the end (i.e. -1 means - * the last segment in the line chain) - * @return SEG referenced to given segment in the line chain - */ - SEG Segment( int aIndex ) - { - if( aIndex < 0 ) - aIndex += SegmentCount(); + /** + * Function Segment() + * + * Returns a segment referencing to the segment (index) in the line chain. + * Modifying ends of the returned segment will modify corresponding points in the line chain. + * @param aIndex: index of the segment in the line chain. Negative values are counted from the end (i.e. -1 means + * the last segment in the line chain) + * @return SEG referenced to given segment in the line chain + */ + SEG Segment( int aIndex ) + { + if( aIndex < 0 ) + aIndex += SegmentCount(); - if( aIndex == ( m_points.size() - 1 ) && m_closed ) - return SEG( m_points[aIndex], m_points[0], aIndex ); - else - return SEG( m_points[aIndex], m_points[aIndex + 1], aIndex ); - } + if( aIndex == ( m_points.size() - 1 ) && m_closed ) + return SEG( m_points[aIndex], m_points[0], aIndex ); + else + return SEG( m_points[aIndex], m_points[aIndex + 1], aIndex ); + } - /** - * Function CSegment() - * - * Returns a read-only segment referencing to the segment (index) in the line chain. - * @param aIndex: index of the segment in the line chain. Negative values are counted from the end (i.e. -1 means - * the last segment in the line chain) - * @return SEG referenced to given segment in the line chain - */ - const SEG CSegment( int aIndex ) const - { - if( aIndex < 0 ) - aIndex += SegmentCount(); + /** + * Function CSegment() + * + * Returns a read-only segment referencing to the segment (index) in the line chain. + * @param aIndex: index of the segment in the line chain. Negative values are counted from the end (i.e. -1 means + * the last segment in the line chain) + * @return SEG referenced to given segment in the line chain + */ + const SEG CSegment( int aIndex ) const + { + if( aIndex < 0 ) + aIndex += SegmentCount(); - if( aIndex == ( m_points.size() - 1 ) && m_closed ) - return SEG( const_cast( m_points[aIndex] ), - const_cast( m_points[0] ), aIndex ); - else - return SEG( const_cast( m_points[aIndex] ), - const_cast( m_points[aIndex + 1] ), aIndex ); - } + if( aIndex == ( m_points.size() - 1 ) && m_closed ) + return SEG( const_cast( m_points[aIndex] ), + const_cast( m_points[0] ), aIndex ); + else + return SEG( const_cast( m_points[aIndex] ), + const_cast( m_points[aIndex + 1] ), aIndex ); + } - /** - * Function Point() - * - * Returns a reference to a given point in the line chain. - * @param aIndex index of the point - * @return reference to the point - */ - VECTOR2I& Point( int aIndex ) - { - if( aIndex < 0 ) - aIndex += PointCount(); + /** + * Function Point() + * + * Returns a reference to a given point in the line chain. + * @param aIndex index of the point + * @return reference to the point + */ + VECTOR2I& Point( int aIndex ) + { + if( aIndex < 0 ) + aIndex += PointCount(); - return m_points[aIndex]; - } + return m_points[aIndex]; + } - /** - * Function CPoint() - * - * Returns a const reference to a given point in the line chain. - * @param aIndex index of the point - * @return const reference to the point - */ - const VECTOR2I& CPoint( int aIndex ) const - { - if( aIndex < 0 ) - aIndex += PointCount(); + /** + * Function CPoint() + * + * Returns a const reference to a given point in the line chain. + * @param aIndex index of the point + * @return const reference to the point + */ + const VECTOR2I& CPoint( int aIndex ) const + { + if( aIndex < 0 ) + aIndex += PointCount(); - return m_points[aIndex]; - } + return m_points[aIndex]; + } - /// @copydoc SHAPE::BBox() - const BOX2I BBox( int aClearance = 0 ) const - { - BOX2I bbox; - bbox.Compute( m_points ); + /// @copydoc SHAPE::BBox() + const BOX2I BBox( int aClearance = 0 ) const + { + BOX2I bbox; + bbox.Compute( m_points ); - return bbox; - } + return bbox; + } - /** - * Function Collide() - * - * Checks if point aP lies closer to us than aClearance. - * @param aP the point to check for collisions with - * @param aClearance minimum distance that does not qualify as a collision. - * @return true, when a collision has been found - */ - bool Collide( const VECTOR2I& aP, int aClearance = 0 ) const; - - /** - * Function Collide() - * - * Checks if box aBox lies closer to us than aClearance. - * @param aP the box to check for collisions with - * @param aClearance minimum distance that does not qualify as a collision. - * @return true, when a collision has been found - */ - bool Collide( const BOX2I& aBox, int aClearance = 0 ) const; - - /** - * Function Collide() - * - * Checks if segment aSeg lies closer to us than aClearance. - * @param aSeg the segment to check for collisions with - * @param aClearance minimum distance that does not qualify as a collision. - * @return true, when a collision has been found - */ - bool Collide( const SEG& aSeg, int aClearance = 0 ) const; - - /** - * Function Distance() - * - * Computes the minimum distance between the line chain and a point aP. - * @param aP the point - * @return minimum distance. - */ - int Distance( const VECTOR2I& aP ) const; + /** + * Function Collide() + * + * Checks if point aP lies closer to us than aClearance. + * @param aP the point to check for collisions with + * @param aClearance minimum distance that does not qualify as a collision. + * @return true, when a collision has been found + */ + bool Collide( const VECTOR2I& aP, int aClearance = 0 ) const; - /** - * Function Reverse() - * - * Reverses point order in the line chain. - * @return line chain with reversed point order (original A-B-C-D: returned D-C-B-A) - */ - const SHAPE_LINE_CHAIN Reverse() const; + /** + * Function Collide() + * + * Checks if box aBox lies closer to us than aClearance. + * @param aP the box to check for collisions with + * @param aClearance minimum distance that does not qualify as a collision. + * @return true, when a collision has been found + */ + bool Collide( const BOX2I& aBox, int aClearance = 0 ) const; - /** - * Function Length() - * - * Returns length of the line chain in Euclidean metric. - * @return length of the line chain - */ - int Length() const; - - /** - * Function Append() - * - * Appends a new point at the end of the line chain. - * @param aX is X coordinate of the new point - * @param aY is Y coordinate of the new point - */ - void Append( int aX, int aY ) - { - VECTOR2I v( aX, aY ); - Append( v ); - } + /** + * Function Collide() + * + * Checks if segment aSeg lies closer to us than aClearance. + * @param aSeg the segment to check for collisions with + * @param aClearance minimum distance that does not qualify as a collision. + * @return true, when a collision has been found + */ + bool Collide( const SEG& aSeg, int aClearance = 0 ) const; - /** - * Function Append() - * - * Appends a new point at the end of the line chain. - * @param aP the new point - */ - void Append( const VECTOR2I& aP ) - { - if( m_points.size() == 0 ) - m_bbox = BOX2I( aP, VECTOR2I( 0, 0 ) ); - - if( m_points.size() == 0 || CPoint( -1 ) != aP ) - { - m_points.push_back( aP ); - m_bbox.Merge( aP ); - } - } + /** + * Function Distance() + * + * Computes the minimum distance between the line chain and a point aP. + * @param aP the point + * @return minimum distance. + */ + int Distance( const VECTOR2I& aP ) const; - /** - * Function Append() - * - * Appends another line chain at the end. - * @param aOtherLine the line chain to be appended. - */ - void Append( const SHAPE_LINE_CHAIN& aOtherLine ) - { - if( aOtherLine.PointCount() == 0 ) - return; + /** + * Function Reverse() + * + * Reverses point order in the line chain. + * @return line chain with reversed point order (original A-B-C-D: returned D-C-B-A) + */ + const SHAPE_LINE_CHAIN Reverse() const; - else if( PointCount() == 0 || aOtherLine.CPoint( 0 ) != CPoint( -1 ) ) - { - const VECTOR2I p = aOtherLine.CPoint( 0 ); - m_points.push_back( p ); - m_bbox.Merge( p ); - } + /** + * Function Length() + * + * Returns length of the line chain in Euclidean metric. + * @return length of the line chain + */ + int Length() const; - for( int i = 1; i < aOtherLine.PointCount(); i++ ) - { - const VECTOR2I p = aOtherLine.CPoint( i ); - m_points.push_back( p ); - m_bbox.Merge( p ); - } - } + /** + * Function Append() + * + * Appends a new point at the end of the line chain. + * @param aX is X coordinate of the new point + * @param aY is Y coordinate of the new point + */ + void Append( int aX, int aY ) + { + VECTOR2I v( aX, aY ); + Append( v ); + } - /** - * Function Replace() - * - * Replaces points with indices in range [start_index, end_index] with a single - * point aP. - * @param aStartIndex start of the point range to be replaced (inclusive) - * @param aEndIndex end of the point range to be replaced (inclusive) - * @param aP replacement point - */ - void Replace( int aStartIndex, int aEndIndex, const VECTOR2I& aP ); + /** + * Function Append() + * + * Appends a new point at the end of the line chain. + * @param aP the new point + */ + void Append( const VECTOR2I& aP ) + { + if( m_points.size() == 0 ) + m_bbox = BOX2I( aP, VECTOR2I( 0, 0 ) ); - /** - * Function Replace() - * - * Replaces points with indices in range [start_index, end_index] with the points from - * line chain aLine. - * @param aStartIndex start of the point range to be replaced (inclusive) - * @param aEndIndex end of the point range to be replaced (inclusive) - * @param aLine replacement line chain. - */ - void Replace( int aStartIndex, int aEndIndex, const SHAPE_LINE_CHAIN& aLine ); + if( m_points.size() == 0 || CPoint( -1 ) != aP ) + { + m_points.push_back( aP ); + m_bbox.Merge( aP ); + } + } - /** - * Function Remove() - * - * Removes the range of points [start_index, end_index] from the line chain. - * @param aStartIndex start of the point range to be replaced (inclusive) - * @param aEndIndex end of the point range to be replaced (inclusive) - */ - void Remove( int aStartIndex, int aEndIndex ); - - /** - * Function Split() - * - * Inserts the point aP belonging to one of the our segments, splitting the adjacent - * segment in two. - * @param aP the point to be inserted - * @return index of the newly inserted point (or a negative value if aP does not lie on our line) - */ - int Split( const VECTOR2I& aP ); - - /** - * Function Find() - * - * Searches for point aP. - * @param aP the point to be looked for - * @return index of the correspoinding point in the line chain or negative when not found. - */ - int Find ( const VECTOR2I& aP ) const; - - /** - * Function Slice() - * - * Returns a subset of this line chain containing the [start_index, end_index] range of points. - * @param aStartIndex start of the point range to be returned (inclusive) - * @param aEndIndex end of the point range to be returned (inclusive) - * @return cut line chain. - */ - const SHAPE_LINE_CHAIN Slice( int aStartIndex, int aEndIndex = -1) const; + /** + * Function Append() + * + * Appends another line chain at the end. + * @param aOtherLine the line chain to be appended. + */ + void Append( const SHAPE_LINE_CHAIN& aOtherLine ) + { + if( aOtherLine.PointCount() == 0 ) + return; - struct compareOriginDistance - { - compareOriginDistance( VECTOR2I& aOrigin ): - m_origin( aOrigin ) {}; + else if( PointCount() == 0 || aOtherLine.CPoint( 0 ) != CPoint( -1 ) ) + { + const VECTOR2I p = aOtherLine.CPoint( 0 ); + m_points.push_back( p ); + m_bbox.Merge( p ); + } - bool operator()( const Intersection& aA, const Intersection& aB ) - { - return ( m_origin - aA.p ).EuclideanNorm() < ( m_origin - aB.p ).EuclideanNorm(); - } + for( int i = 1; i < aOtherLine.PointCount(); i++ ) + { + const VECTOR2I p = aOtherLine.CPoint( i ); + m_points.push_back( p ); + m_bbox.Merge( p ); + } + } - VECTOR2I m_origin; - }; + /** + * Function Replace() + * + * Replaces points with indices in range [start_index, end_index] with a single + * point aP. + * @param aStartIndex start of the point range to be replaced (inclusive) + * @param aEndIndex end of the point range to be replaced (inclusive) + * @param aP replacement point + */ + void Replace( int aStartIndex, int aEndIndex, const VECTOR2I& aP ); - /** - * Function Intersect() - * - * Finds all intersection points between our line chain and the segment aSeg. - * @param aSeg the segment chain to find intersections with - * @param aIp reference to a vector to store found intersections. Intersection points - * are sorted with increasing distances from point aSeg.a. - * @return number of intersections found - */ - int Intersect ( const SEG& aSeg, Intersections& aIp ) const; - - /** - * Function Intersect() - * - * Finds all intersection points between our line chain and the line chain aChain. - * @param aChain the line chain to find intersections with - * @param aIp reference to a vector to store found intersections. Intersection points - * are sorted with increasing path lengths from the starting point of aChain. - * @return number of intersections found - */ - int Intersect( const SHAPE_LINE_CHAIN& aChain, Intersections& aIp ) const; - - /** - * Function PathLength() - * - * Computes the walk path length from the beginning of the line chain and - * the point aP belonging to our line. - * @return: path length in Euclidean metric or negative if aP does not belong to the line chain. - */ - int PathLength( const VECTOR2I& aP ) const; - - /** - * Function PointInside() - * - * Checks if point aP lies inside a convex polygon defined by the line chain. For closed - * shapes only. - * @param aP point to check - * @return true if the point is inside the shape (edge is not treated as being inside). - */ - bool PointInside( const VECTOR2I& aP ) const; - - /** - * Function PointOnEdge() - * - * Checks if point aP lies on an edge or vertex of the line chain. - * @param aP point to check - * @return true if the point lies on the edge. - */ - bool PointOnEdge( const VECTOR2I& aP ) const; - - /** - * Function SelfIntersecting() - * - * Checks if the line chain is self-intersecting. - * @return (optional) first found self-intersection point. - */ - const boost::optional SelfIntersecting() const; - - /** - * Function Simplify() - * - * Simplifies the line chain by removing colinear adjacent segments and duplicate vertices. - * @return reference to self. - */ - SHAPE_LINE_CHAIN& Simplify(); - - /** - * Function NearestPoint() - * - * Finds a point on the line chain that is closest to point aP. - * @return the nearest point. - */ - const VECTOR2I NearestPoint( const VECTOR2I& aP ) const; - - /// @copydoc SHAPE::Format() - const std::string Format() const; + /** + * Function Replace() + * + * Replaces points with indices in range [start_index, end_index] with the points from + * line chain aLine. + * @param aStartIndex start of the point range to be replaced (inclusive) + * @param aEndIndex end of the point range to be replaced (inclusive) + * @param aLine replacement line chain. + */ + void Replace( int aStartIndex, int aEndIndex, const SHAPE_LINE_CHAIN& aLine ); - bool operator!=( const SHAPE_LINE_CHAIN& aRhs ) const - { - if( PointCount() != aRhs.PointCount() ) - return true; + /** + * Function Remove() + * + * Removes the range of points [start_index, end_index] from the line chain. + * @param aStartIndex start of the point range to be replaced (inclusive) + * @param aEndIndex end of the point range to be replaced (inclusive) + */ + void Remove( int aStartIndex, int aEndIndex ); - for( int i = 0; i < PointCount(); i++ ) - { - if( CPoint( i ) != aRhs.CPoint( i ) ) - return true; - } + /** + * Function Split() + * + * Inserts the point aP belonging to one of the our segments, splitting the adjacent + * segment in two. + * @param aP the point to be inserted + * @return index of the newly inserted point (or a negative value if aP does not lie on our line) + */ + int Split( const VECTOR2I& aP ); - return false; - } + /** + * Function Find() + * + * Searches for point aP. + * @param aP the point to be looked for + * @return index of the correspoinding point in the line chain or negative when not found. + */ + int Find ( const VECTOR2I& aP ) const; - private: - /// array of vertices - std::vector m_points; + /** + * Function Slice() + * + * Returns a subset of this line chain containing the [start_index, end_index] range of points. + * @param aStartIndex start of the point range to be returned (inclusive) + * @param aEndIndex end of the point range to be returned (inclusive) + * @return cut line chain. + */ + const SHAPE_LINE_CHAIN Slice( int aStartIndex, int aEndIndex = -1) const; - /// is the line chain closed? - bool m_closed; + struct compareOriginDistance + { + compareOriginDistance( VECTOR2I& aOrigin ): + m_origin( aOrigin ) {}; - /// cached bounding box - BOX2I m_bbox; + bool operator()( const Intersection& aA, const Intersection& aB ) + { + return ( m_origin - aA.p ).EuclideanNorm() < ( m_origin - aB.p ).EuclideanNorm(); + } + + VECTOR2I m_origin; + }; + + /** + * Function Intersect() + * + * Finds all intersection points between our line chain and the segment aSeg. + * @param aSeg the segment chain to find intersections with + * @param aIp reference to a vector to store found intersections. Intersection points + * are sorted with increasing distances from point aSeg.a. + * @return number of intersections found + */ + int Intersect ( const SEG& aSeg, Intersections& aIp ) const; + + /** + * Function Intersect() + * + * Finds all intersection points between our line chain and the line chain aChain. + * @param aChain the line chain to find intersections with + * @param aIp reference to a vector to store found intersections. Intersection points + * are sorted with increasing path lengths from the starting point of aChain. + * @return number of intersections found + */ + int Intersect( const SHAPE_LINE_CHAIN& aChain, Intersections& aIp ) const; + + /** + * Function PathLength() + * + * Computes the walk path length from the beginning of the line chain and + * the point aP belonging to our line. + * @return: path length in Euclidean metric or negative if aP does not belong to the line chain. + */ + int PathLength( const VECTOR2I& aP ) const; + + /** + * Function PointInside() + * + * Checks if point aP lies inside a convex polygon defined by the line chain. For closed + * shapes only. + * @param aP point to check + * @return true if the point is inside the shape (edge is not treated as being inside). + */ + bool PointInside( const VECTOR2I& aP ) const; + + /** + * Function PointOnEdge() + * + * Checks if point aP lies on an edge or vertex of the line chain. + * @param aP point to check + * @return true if the point lies on the edge. + */ + bool PointOnEdge( const VECTOR2I& aP ) const; + + /** + * Function SelfIntersecting() + * + * Checks if the line chain is self-intersecting. + * @return (optional) first found self-intersection point. + */ + const boost::optional SelfIntersecting() const; + + /** + * Function Simplify() + * + * Simplifies the line chain by removing colinear adjacent segments and duplicate vertices. + * @return reference to self. + */ + SHAPE_LINE_CHAIN& Simplify(); + + /** + * Function NearestPoint() + * + * Finds a point on the line chain that is closest to point aP. + * @return the nearest point. + */ + const VECTOR2I NearestPoint( const VECTOR2I& aP ) const; + + /// @copydoc SHAPE::Format() + const std::string Format() const; + + bool operator!=( const SHAPE_LINE_CHAIN& aRhs ) const + { + if( PointCount() != aRhs.PointCount() ) + return true; + + for( int i = 0; i < PointCount(); i++ ) + { + if( CPoint( i ) != aRhs.CPoint( i ) ) + return true; + } + + return false; + } + + private: + /// array of vertices + std::vector m_points; + + /// is the line chain closed? + bool m_closed; + + /// cached bounding box + BOX2I m_bbox; }; #endif // __SHAPE_LINE_CHAIN diff --git a/include/geometry/shape_rect.h b/include/geometry/shape_rect.h index 6784d6b27e..d81ef02959 100644 --- a/include/geometry/shape_rect.h +++ b/include/geometry/shape_rect.h @@ -31,114 +31,114 @@ #include class SHAPE_RECT : public SHAPE { - public: - /** - * Constructor - * Creates an empty (0-sized) rectangle - */ - SHAPE_RECT() : - SHAPE( SH_RECT ), m_w( 0 ), m_h( 0 ) {}; - - /** - * Constructor - * Creates a rectangle defined by top-left corner (aX0, aY0), width aW and height aH. - */ - SHAPE_RECT( int aX0, int aY0, int aW, int aH ) : - SHAPE( SH_RECT ), m_p0( aX0, aY0 ), m_w( aW ), m_h( aH ) {}; + public: + /** + * Constructor + * Creates an empty (0-sized) rectangle + */ + SHAPE_RECT() : + SHAPE( SH_RECT ), m_w( 0 ), m_h( 0 ) {}; - /** - * Constructor - * Creates a rectangle defined by top-left corner aP0, width aW and height aH. - */ - SHAPE_RECT( const VECTOR2I &aP0, int aW, int aH ) : - SHAPE( SH_RECT ), m_p0( aP0 ), m_w( aW ), m_h( aH ) {}; + /** + * Constructor + * Creates a rectangle defined by top-left corner (aX0, aY0), width aW and height aH. + */ + SHAPE_RECT( int aX0, int aY0, int aW, int aH ) : + SHAPE( SH_RECT ), m_p0( aX0, aY0 ), m_w( aW ), m_h( aH ) {}; - /// @copydoc SHAPE::BBox() - const BOX2I BBox(int aClearance = 0) const - { - BOX2I bbox( VECTOR2I( m_p0.x - aClearance, m_p0.y - aClearance ), - VECTOR2I( m_w + 2 * aClearance, m_h + 2 * aClearance ) ); - //printf("bb : %s\n",bbox.Format().c_str()); - return bbox; - } + /** + * Constructor + * Creates a rectangle defined by top-left corner aP0, width aW and height aH. + */ + SHAPE_RECT( const VECTOR2I &aP0, int aW, int aH ) : + SHAPE( SH_RECT ), m_p0( aP0 ), m_w( aW ), m_h( aH ) {}; - /** - * Function Diagonal() - * - * Returns length of the diagonal of the rectangle - * @return diagonal length - */ - int Diagonal() const - { - return VECTOR2I( m_w, m_h ).EuclideanNorm(); - } + /// @copydoc SHAPE::BBox() + const BOX2I BBox(int aClearance = 0) const + { + BOX2I bbox( VECTOR2I( m_p0.x - aClearance, m_p0.y - aClearance ), + VECTOR2I( m_w + 2 * aClearance, m_h + 2 * aClearance ) ); + //printf("bb : %s\n",bbox.Format().c_str()); + return bbox; + } - /// @copydoc SHAPE::Collide() - bool Collide( const SEG& aSeg, int aClearance = 0 ) const - { - //VECTOR2I pmin = VECTOR2I(std::min(aSeg.a.x, aSeg.b.x), std::min(aSeg.a.y, aSeg.b.y)); - //VECTOR2I pmax = VECTOR2I(std::max(aSeg.a.x, aSeg.b.x), std::max(aSeg.a.y, aSeg.b.y)); - //BOX2I r(pmin, VECTOR2I(pmax.x - pmin.x, pmax.y - pmin.y)); + /** + * Function Diagonal() + * + * Returns length of the diagonal of the rectangle + * @return diagonal length + */ + int Diagonal() const + { + return VECTOR2I( m_w, m_h ).EuclideanNorm(); + } - //if (BBox(0).SquaredDistance(r) > aClearance * aClearance) - // return false; - - if( BBox( 0 ).Contains( aSeg.a ) || BBox( 0 ).Contains( aSeg.b ) ) - return true; + /// @copydoc SHAPE::Collide() + bool Collide( const SEG& aSeg, int aClearance = 0 ) const + { + //VECTOR2I pmin = VECTOR2I(std::min(aSeg.a.x, aSeg.b.x), std::min(aSeg.a.y, aSeg.b.y)); + //VECTOR2I pmax = VECTOR2I(std::max(aSeg.a.x, aSeg.b.x), std::max(aSeg.a.y, aSeg.b.y)); + //BOX2I r(pmin, VECTOR2I(pmax.x - pmin.x, pmax.y - pmin.y)); - VECTOR2I vts[] = { VECTOR2I( m_p0.x, m_p0.y ), - VECTOR2I( m_p0.x, m_p0.y + m_h ), - VECTOR2I( m_p0.x + m_w, m_p0.y + m_h ), - VECTOR2I( m_p0.x + m_w, m_p0.y ), - VECTOR2I( m_p0.x, m_p0.y ) }; + //if (BBox(0).SquaredDistance(r) > aClearance * aClearance) + // return false; - for( int i = 0; i < 4; i++ ) - { - SEG s( vts[i], vts[i + 1], i ); - if( s.Distance( aSeg ) <= aClearance ) - return true; - } - - return false; - }; + if( BBox( 0 ).Contains( aSeg.a ) || BBox( 0 ).Contains( aSeg.b ) ) + return true; - /** - * Function GetPosition() - * - * @return top-left corner of the rectangle - */ - const VECTOR2I& GetPosition() const { return m_p0; } - - /** - * Function GetSize() - * - * @return size of the rectangle - */ - const VECTOR2I GetSize() const { return VECTOR2I( m_w, m_h ); } + VECTOR2I vts[] = { VECTOR2I( m_p0.x, m_p0.y ), + VECTOR2I( m_p0.x, m_p0.y + m_h ), + VECTOR2I( m_p0.x + m_w, m_p0.y + m_h ), + VECTOR2I( m_p0.x + m_w, m_p0.y ), + VECTOR2I( m_p0.x, m_p0.y ) }; - /** - * Function GetWidth() - * - * @return width of the rectangle - */ - const int GetWidth() const { return m_w; } + for( int i = 0; i < 4; i++ ) + { + SEG s( vts[i], vts[i + 1], i ); + if( s.Distance( aSeg ) <= aClearance ) + return true; + } - /** - * Function GetHeight() - * - * @return height of the rectangle - */ - const int GetHeight() const { return m_h; } + return false; + }; - private: - ///> Top-left corner - VECTOR2I m_p0; + /** + * Function GetPosition() + * + * @return top-left corner of the rectangle + */ + const VECTOR2I& GetPosition() const { return m_p0; } - ///> Width - int m_w; + /** + * Function GetSize() + * + * @return size of the rectangle + */ + const VECTOR2I GetSize() const { return VECTOR2I( m_w, m_h ); } - ///> Height - int m_h; - }; + /** + * Function GetWidth() + * + * @return width of the rectangle + */ + const int GetWidth() const { return m_w; } + + /** + * Function GetHeight() + * + * @return height of the rectangle + */ + const int GetHeight() const { return m_h; } + + private: + ///> Top-left corner + VECTOR2I m_p0; + + ///> Width + int m_w; + + ///> Height + int m_h; + }; #endif // __SHAPE_RECT_H diff --git a/include/math/box2.h b/include/math/box2.h index 4390b8e7f4..383d034746 100644 --- a/include/math/box2.h +++ b/include/math/box2.h @@ -66,7 +66,7 @@ public: BOX2( const Vec& aPos, const Vec& aSize ) : m_Pos( aPos ), m_Size( aSize ) - { + { Normalize(); } @@ -420,7 +420,7 @@ public: ecoord_type y2 = m_Pos.y + m_Size.y; ecoord_type xdiff = std::max( aP.x < m_Pos.x ? m_Pos.x - aP.x : m_Pos.x - x2, (ecoord_type)0 ); ecoord_type ydiff = std::max( aP.y < m_Pos.y ? m_Pos.y - aP.y : m_Pos.y - y2, (ecoord_type)0 ); - return xdiff * xdiff + ydiff * ydiff; + return xdiff * xdiff + ydiff * ydiff; } ecoord_type Distance( const Vec& aP ) const diff --git a/include/math/vector2d.h b/include/math/vector2d.h index 44b72c515a..639e2d76aa 100644 --- a/include/math/vector2d.h +++ b/include/math/vector2d.h @@ -224,7 +224,7 @@ public: /// Division with a factor VECTOR2 operator/( const T& aFactor ) const; - + /// Equality operator const bool operator==( const VECTOR2& aVector ) const; diff --git a/include/tool/context_menu.h b/include/tool/context_menu.h index c707088be2..90a5e106e8 100644 --- a/include/tool/context_menu.h +++ b/include/tool/context_menu.h @@ -37,105 +37,105 @@ class TOOL_INTERACTIVE; * Defines the structure of a context (usually right-click) popup menu * for a given tool. */ -class CONTEXT_MENU +class CONTEXT_MENU { public: ///> Default constructor - CONTEXT_MENU(); + CONTEXT_MENU(); - ///> Copy constructor - CONTEXT_MENU( const CONTEXT_MENU& aMenu ); + ///> Copy constructor + CONTEXT_MENU( const CONTEXT_MENU& aMenu ); - /** - * Function SetTitle() - * Sets title for the context menu. The title is shown as a text label shown on the top of - * the menu. - * @param aTitle is the new title. - */ - void SetTitle( const wxString& aTitle ); + /** + * Function SetTitle() + * Sets title for the context menu. The title is shown as a text label shown on the top of + * the menu. + * @param aTitle is the new title. + */ + void SetTitle( const wxString& aTitle ); - /** - * Function Add() - * Adds an entry to the menu. After highlighting/selecting the entry, a TOOL_EVENT command is - * sent that contains ID of the entry. - * @param aLabel is the text label show in the menu. - * @param aId is the ID that is sent in the TOOL_EVENT. It should be unique for every entry. - */ - void Add( const wxString& aLabel, int aId ); + /** + * Function Add() + * Adds an entry to the menu. After highlighting/selecting the entry, a TOOL_EVENT command is + * sent that contains ID of the entry. + * @param aLabel is the text label show in the menu. + * @param aId is the ID that is sent in the TOOL_EVENT. It should be unique for every entry. + */ + void Add( const wxString& aLabel, int aId ); - /** - * Function Add() - * Adds an entry to the menu, basing on the TOOL_ACTION object. After selecting the entry, - * a TOOL_EVENT command containing name of the action is sent. - * @param aAction is the action to be added to menu entry. - */ - void Add( const TOOL_ACTION& aAction ); + /** + * Function Add() + * Adds an entry to the menu, basing on the TOOL_ACTION object. After selecting the entry, + * a TOOL_EVENT command containing name of the action is sent. + * @param aAction is the action to be added to menu entry. + */ + void Add( const TOOL_ACTION& aAction ); - /** - * Function Clear() - * Removes all the entries from the menu (as well as its title). It leaves the menu in the - * initial state. - */ - void Clear(); + /** + * Function Clear() + * Removes all the entries from the menu (as well as its title). It leaves the menu in the + * initial state. + */ + void Clear(); - /** - * Function GetMenu() - * Returns the instance of wxMenu object used to display the menu. - */ - wxMenu* GetMenu() const - { - return const_cast( &m_menu ); - } + /** + * Function GetMenu() + * Returns the instance of wxMenu object used to display the menu. + */ + wxMenu* GetMenu() const + { + return const_cast( &m_menu ); + } private: - ///> Class CMEventHandler takes care of handling menu events. After reception of particular - ///> events, it translates them to TOOL_EVENTs that may control tools. - class CMEventHandler : public wxEvtHandler - { - public: - ///> Default constructor - ///> aMenu is the CONTEXT_MENU instance for which it handles events. - CMEventHandler( CONTEXT_MENU* aMenu ) : m_menu( aMenu ) {}; + ///> Class CMEventHandler takes care of handling menu events. After reception of particular + ///> events, it translates them to TOOL_EVENTs that may control tools. + class CMEventHandler : public wxEvtHandler + { + public: + ///> Default constructor + ///> aMenu is the CONTEXT_MENU instance for which it handles events. + CMEventHandler( CONTEXT_MENU* aMenu ) : m_menu( aMenu ) {}; - ///> Handler for menu events. - void onEvent( wxEvent& aEvent ); + ///> Handler for menu events. + void onEvent( wxEvent& aEvent ); - private: - ///> CONTEXT_MENU instance for which it handles events. - CONTEXT_MENU* m_menu; - }; - - friend class TOOL_INTERACTIVE; + private: + ///> CONTEXT_MENU instance for which it handles events. + CONTEXT_MENU* m_menu; + }; - /** - * Function setTool() - * Sets a tool that is the creator of the menu. - * @param aTool is the tool that created the menu. - */ - void setTool( TOOL_INTERACTIVE* aTool ) - { - m_tool = aTool; - } + friend class TOOL_INTERACTIVE; - /** - * Function getHotKeyDescription() - * Returns a hot key in the string format accepted by wxMenu. - * @param aAction is the action with hot key to be translated.. - * @return Hot key in the string format compatible with wxMenu. - */ - std::string getHotKeyDescription( const TOOL_ACTION& aAction ) const; + /** + * Function setTool() + * Sets a tool that is the creator of the menu. + * @param aTool is the tool that created the menu. + */ + void setTool( TOOL_INTERACTIVE* aTool ) + { + m_tool = aTool; + } - ///> Flag indicating that the menu title was set up. - bool m_titleSet; + /** + * Function getHotKeyDescription() + * Returns a hot key in the string format accepted by wxMenu. + * @param aAction is the action with hot key to be translated.. + * @return Hot key in the string format compatible with wxMenu. + */ + std::string getHotKeyDescription( const TOOL_ACTION& aAction ) const; - ///> Instance of wxMenu used for display of the context menu. - wxMenu m_menu; + ///> Flag indicating that the menu title was set up. + bool m_titleSet; - ///> Instance of menu event handler. - CMEventHandler m_handler; + ///> Instance of wxMenu used for display of the context menu. + wxMenu m_menu; - ///> Creator of the menu - TOOL_INTERACTIVE* m_tool; + ///> Instance of menu event handler. + CMEventHandler m_handler; + + ///> Creator of the menu + TOOL_INTERACTIVE* m_tool; /// Menu items with ID higher than that are considered TOOL_ACTIONs static const int m_actionId = 10000; diff --git a/include/tool/coroutine.h b/include/tool/coroutine.h index 8a398685b2..bbe6409fd6 100644 --- a/include/tool/coroutine.h +++ b/include/tool/coroutine.h @@ -34,13 +34,13 @@ /** Class COROUNTINE. Implements a coroutine. Wikipedia has a good explanation: - - "Coroutines are computer program components that generalize subroutines to - allow multiple entry points for suspending and resuming execution at certain locations. - Coroutines are well-suited for implementing more familiar program components such as cooperative + + "Coroutines are computer program components that generalize subroutines to + allow multiple entry points for suspending and resuming execution at certain locations. + Coroutines are well-suited for implementing more familiar program components such as cooperative tasks, exceptions, event loop, iterators, infinite lists and pipes." - In other words, a coroutine can be considered a lightweight thread - which can be + In other words, a coroutine can be considered a lightweight thread - which can be preempted only when it deliberately yields the control to the caller. This way, we avoid concurrency problems such as locking / race conditions. @@ -56,82 +56,82 @@ template class COROUTINE { public: - COROUTINE() - { - m_stackSize = c_defaultStackSize; - m_stack = NULL; - m_saved = NULL; - } - - /** - * Constructor - * Creates a coroutine from a member method of an object - */ - template - COROUTINE( T* object, ReturnType (T::*ptr)( ArgType ) ) : - m_func( object, ptr ), m_saved( NULL ), m_stack( NULL ), m_stackSize( c_defaultStackSize ) - { - } + COROUTINE() + { + m_stackSize = c_defaultStackSize; + m_stack = NULL; + m_saved = NULL; + } - /** - * Constructor - * Creates a coroutine from a delegate object - */ - COROUTINE( DELEGATE aEntry ) : + /** + * Constructor + * Creates a coroutine from a member method of an object + */ + template + COROUTINE( T* object, ReturnType (T::*ptr)( ArgType ) ) : + m_func( object, ptr ), m_saved( NULL ), m_stack( NULL ), m_stackSize( c_defaultStackSize ) + { + } + + /** + * Constructor + * Creates a coroutine from a delegate object + */ + COROUTINE( DELEGATE aEntry ) : m_func( aEntry ), m_saved( NULL ), m_stack( NULL ), m_stackSize( c_defaultStackSize ) - {}; + {}; - ~COROUTINE() - { + ~COROUTINE() + { if( m_saved ) delete m_saved; if( m_stack ) free( m_stack ); - } + } - /** - * Function Yield() - * - * Stops execution of the coroutine and returns control to the caller. - * After a yield, Call() or Resume() methods invoked by the caller will - * immediately return true, indicating that we are not done yet, just asleep. - */ - void Yield() - { - boost::context::jump_fcontext( m_self, m_saved, 0 ); - } + /** + * Function Yield() + * + * Stops execution of the coroutine and returns control to the caller. + * After a yield, Call() or Resume() methods invoked by the caller will + * immediately return true, indicating that we are not done yet, just asleep. + */ + void Yield() + { + boost::context::jump_fcontext( m_self, m_saved, 0 ); + } - /** - * Function Yield() - * - * Yield with a value - passes a value of given type to the caller. - * Useful for implementing generator objects. - */ - void Yield( ReturnType& retVal ) - { - m_retVal = retVal; - boost::context::jump_fcontext( m_self, m_saved, 0 ); - } + /** + * Function Yield() + * + * Yield with a value - passes a value of given type to the caller. + * Useful for implementing generator objects. + */ + void Yield( ReturnType& retVal ) + { + m_retVal = retVal; + boost::context::jump_fcontext( m_self, m_saved, 0 ); + } - /** - * Function SetEntry() - * - * Defines the entry point for the coroutine, if not set in the constructor. - */ - void SetEntry( DELEGATE aEntry ) - { - m_func = aEntry; - } + /** + * Function SetEntry() + * + * Defines the entry point for the coroutine, if not set in the constructor. + */ + void SetEntry( DELEGATE aEntry ) + { + m_func = aEntry; + } - /* Function Call() - * - * Starts execution of a coroutine, passing args as its arguments. - * @return true, if the coroutine has yielded and false if it has finished its - * execution (returned). - */ - bool Call( ArgType args ) - { - // fixme: Clean up stack stuff. Add a guard + /* Function Call() + * + * Starts execution of a coroutine, passing args as its arguments. + * @return true, if the coroutine has yielded and false if it has finished its + * execution (returned). + */ + bool Call( ArgType args ) + { + // fixme: Clean up stack stuff. Add a guard m_stack = malloc( c_defaultStackSize ); // align to 16 bytes @@ -145,87 +145,87 @@ public: // off we go! boost::context::jump_fcontext( m_saved, m_self, reinterpret_cast( this ) ); return m_running; - } + } - /** - * Function Resume() - * - * Resumes execution of a previously yielded coroutine. - * @return true, if the coroutine has yielded again and false if it has finished its - * execution (returned). - */ - bool Resume() - { + /** + * Function Resume() + * + * Resumes execution of a previously yielded coroutine. + * @return true, if the coroutine has yielded again and false if it has finished its + * execution (returned). + */ + bool Resume() + { boost::context::jump_fcontext( m_saved, m_self, 0 ); return m_running; - } + } - /** - * Function ReturnValue() - * - * Returns the yielded value (the argument Yield() was called with) - */ - const ReturnType& ReturnValue() const - { - return m_retVal; - } + /** + * Function ReturnValue() + * + * Returns the yielded value (the argument Yield() was called with) + */ + const ReturnType& ReturnValue() const + { + return m_retVal; + } - /** - * Function Running() - * - * @return true, if the coroutine is active - */ - bool Running() const - { - return m_running; - } + /** + * Function Running() + * + * @return true, if the coroutine is active + */ + bool Running() const + { + return m_running; + } private: - static const int c_defaultStackSize = 2000000; // fixme: make configurable + static const int c_defaultStackSize = 2000000; // fixme: make configurable - /* real entry point of the coroutine */ - static void callerStub( intptr_t data ) - { - // get pointer to self - COROUTINE* cor = reinterpret_cast*>( data ); + /* real entry point of the coroutine */ + static void callerStub( intptr_t data ) + { + // get pointer to self + COROUTINE* cor = reinterpret_cast*>( data ); - // call the coroutine method - cor->m_retVal = cor->m_func( *cor->m_args ); - cor->m_running = false; + // call the coroutine method + cor->m_retVal = cor->m_func( *cor->m_args ); + cor->m_running = false; - // go back to wherever we came from. - boost::context::jump_fcontext( cor->m_self, cor->m_saved, 0 ); //reinterpret_cast( this )); - } + // go back to wherever we came from. + boost::context::jump_fcontext( cor->m_self, cor->m_saved, 0 ); //reinterpret_cast( this )); + } - template struct strip_ref - { - typedef T result; - }; + template struct strip_ref + { + typedef T result; + }; - template struct strip_ref - { - typedef T result; - }; + template struct strip_ref + { + typedef T result; + }; - DELEGATE m_func; - - ///< pointer to coroutine entry arguments. Stripped of references - ///< to avoid compiler errors. - typename strip_ref::result* m_args; - ReturnType m_retVal; - - ///< saved caller context - boost::context::fcontext_t* m_saved; - - ///< saved coroutine context - boost::context::fcontext_t* m_self; + DELEGATE m_func; - ///< coroutine stack - void* m_stack; + ///< pointer to coroutine entry arguments. Stripped of references + ///< to avoid compiler errors. + typename strip_ref::result* m_args; + ReturnType m_retVal; - size_t m_stackSize; + ///< saved caller context + boost::context::fcontext_t* m_saved; - bool m_running; + ///< saved coroutine context + boost::context::fcontext_t* m_self; + + ///< coroutine stack + void* m_stack; + + size_t m_stackSize; + + bool m_running; }; #endif diff --git a/include/tool/delegate.h b/include/tool/delegate.h index f2841bb4ff..32165b3031 100644 --- a/include/tool/delegate.h +++ b/include/tool/delegate.h @@ -28,38 +28,38 @@ /** * class DELEGATE - * A trivial delegate (pointer to member method of an object) pattern implementation. + * A trivial delegate (pointer to member method of an object) pattern implementation. * Check delegate_example.cpp for a coding sample. */ template - class DELEGATE { - public: - typedef ReturnType (DELEGATE::*MemberPointer)( Arg ); - typedef ReturnType _ReturnType; - typedef Arg _ArgType; + class DELEGATE { + public: + typedef ReturnType (DELEGATE::*MemberPointer)( Arg ); + typedef ReturnType _ReturnType; + typedef Arg _ArgType; - DELEGATE () - { - } + DELEGATE () + { + } - template - DELEGATE ( T* object, ReturnType (T::*ptr)( Arg ) ) - { - m_ptr = reinterpret_cast( ptr ); - m_object = reinterpret_cast( object ); - }; + template + DELEGATE ( T* object, ReturnType (T::*ptr)( Arg ) ) + { + m_ptr = reinterpret_cast( ptr ); + m_object = reinterpret_cast( object ); + }; - - ReturnType operator()( Arg a ) const - { - DELEGATE *casted = reinterpret_cast*>( m_object ); - return (casted->*m_ptr)(a); - } -private: - MemberPointer m_ptr; - void *m_object; + ReturnType operator()( Arg a ) const + { + DELEGATE *casted = reinterpret_cast*>( m_object ); + return (casted->*m_ptr)(a); + } + +private: + MemberPointer m_ptr; + void *m_object; }; /** @@ -67,32 +67,32 @@ private: * Same as DELEGATE, but with no arguments. */ template - class DELEGATE0 { - public: - typedef ReturnType ( DELEGATE0::*MemberPointer )(); - typedef ReturnType _ReturnType; - - DELEGATE0 () - { - } + class DELEGATE0 { + public: + typedef ReturnType ( DELEGATE0::*MemberPointer )(); + typedef ReturnType _ReturnType; - template - DELEGATE0 ( T* object, ReturnType (T::*ptr)( ) ) - { - m_ptr = reinterpret_cast( ptr ); - m_object = reinterpret_cast( object ); - }; + DELEGATE0 () + { + } - - ReturnType operator()( ) const - { - DELEGATE0* casted = reinterpret_cast*>( m_object ); - return ( casted->*m_ptr )(); - } + template + DELEGATE0 ( T* object, ReturnType (T::*ptr)( ) ) + { + m_ptr = reinterpret_cast( ptr ); + m_object = reinterpret_cast( object ); + }; -private: - MemberPointer m_ptr; - void *m_object; + + ReturnType operator()( ) const + { + DELEGATE0* casted = reinterpret_cast*>( m_object ); + return ( casted->*m_ptr )(); + } + +private: + MemberPointer m_ptr; + void *m_object; }; #endif diff --git a/include/tool/examples/coroutine_example.cpp b/include/tool/examples/coroutine_example.cpp index b5ad730145..f300da492a 100644 --- a/include/tool/examples/coroutine_example.cpp +++ b/include/tool/examples/coroutine_example.cpp @@ -9,40 +9,40 @@ typedef COROUTINE MyCoroutine; class MyClass { - public: - int CountTo(int n) - { - printf("%s: Coroutine says hi. I will count from 1 to %d and yield each value.\n", __FUNCTION__, n); - for(int i = 1; i <= n; i++) - { - printf("%s: Yielding %d\n", __FUNCTION__, i); - cofunc.Yield(i); - } - } + public: + int CountTo(int n) + { + printf("%s: Coroutine says hi. I will count from 1 to %d and yield each value.\n", __FUNCTION__, n); + for(int i = 1; i <= n; i++) + { + printf("%s: Yielding %d\n", __FUNCTION__, i); + cofunc.Yield(i); + } + } - void Run() - { - cofunc = MyCoroutine (this, &MyClass::CountTo); - printf("%s: Calling coroutine that will count from 1 to 5.\n", __FUNCTION__); - cofunc.Call(5); - while (cofunc.Running()) - { - printf("%s: Got value: %d\n", __FUNCTION__, cofunc.ReturnValue()); - cofunc.Resume(); - } - - printf("%s: Done!\n", __FUNCTION__); - } + void Run() + { + cofunc = MyCoroutine (this, &MyClass::CountTo); + printf("%s: Calling coroutine that will count from 1 to 5.\n", __FUNCTION__); + cofunc.Call(5); + while (cofunc.Running()) + { + printf("%s: Got value: %d\n", __FUNCTION__, cofunc.ReturnValue()); + cofunc.Resume(); + } - MyCoroutine cofunc; + printf("%s: Done!\n", __FUNCTION__); + } + + MyCoroutine cofunc; }; main() { - MyClass obj; + MyClass obj; - obj.Run(); - - return 0; -} + obj.Run(); + + return 0; +} diff --git a/include/tool/examples/delegate_example.cpp b/include/tool/examples/delegate_example.cpp index 2c872e72a5..d5e86a60df 100644 --- a/include/tool/examples/delegate_example.cpp +++ b/include/tool/examples/delegate_example.cpp @@ -7,29 +7,29 @@ using namespace std; class MyClass { - public: - int MyMethod(const string &arg) - { - printf("MyClass(this = %p)::MyMethod() called with string '%s', length %d\n", this, arg.c_str(), arg.length()); - return arg.length(); - } + public: + int MyMethod(const string &arg) + { + printf("MyClass(this = %p)::MyMethod() called with string '%s', length %d\n", this, arg.c_str(), arg.length()); + return arg.length(); + } }; typedef DELEGATE MyDelegate; main() { - MyClass t1; - MyClass t2; - - - MyDelegate ptr1 (&t1, &MyClass::MyMethod); - MyDelegate ptr2 (&t2, &MyClass::MyMethod); - - int retval1, retval2; + MyClass t1; + MyClass t2; + + + MyDelegate ptr1 (&t1, &MyClass::MyMethod); + MyDelegate ptr2 (&t2, &MyClass::MyMethod); + + int retval1, retval2; retval1 = ptr1("apples"); retval2 = ptr2("cherries"); - - printf("Object 1 returned %d, object 2 returned %d\n", retval1, retval2); - return 0; -} + + printf("Object 1 returned %d, object 2 returned %d\n", retval1, retval2); + return 0; +} diff --git a/include/tool/tool_base.h b/include/tool/tool_base.h index ff26d95e59..1717b00124 100644 --- a/include/tool/tool_base.h +++ b/include/tool/tool_base.h @@ -59,128 +59,128 @@ typedef DELEGATE TOOL_STATE_FUNC; * Base abstract interface for all kinds of tools. */ -class TOOL_BASE +class TOOL_BASE { public: - TOOL_BASE( TOOL_Type aType, TOOL_ID aId, const std::string& aName = std::string( "" ) ) : - m_type( aType ), - m_toolId( aId ), - m_toolName( aName ), - m_toolMgr( NULL ){}; + TOOL_BASE( TOOL_Type aType, TOOL_ID aId, const std::string& aName = std::string( "" ) ) : + m_type( aType ), + m_toolId( aId ), + m_toolName( aName ), + m_toolMgr( NULL ){}; - virtual ~TOOL_BASE() {}; + virtual ~TOOL_BASE() {}; - /** - * Function GetType() - * Returns the type of the tool. - * @return The type of the tool. - */ - TOOL_Type GetType() const - { - return m_type; - } + /** + * Function GetType() + * Returns the type of the tool. + * @return The type of the tool. + */ + TOOL_Type GetType() const + { + return m_type; + } - /** - * Function GetId() - * Returns the unique identifier of the tool. The identifier is set by an instance of - * TOOL_MANAGER. - * @return Identifier of the tool. - */ - TOOL_ID GetId() const - { - return m_toolId; - } + /** + * Function GetId() + * Returns the unique identifier of the tool. The identifier is set by an instance of + * TOOL_MANAGER. + * @return Identifier of the tool. + */ + TOOL_ID GetId() const + { + return m_toolId; + } - /** - * Function GetName() - * Returns the name of the tool. Tool names are expected to obey the format: - * application.ToolName (eg. pcbnew.InteractiveSelection). - * @return The name of the tool. - */ - const std::string& GetName() const - { - return m_toolName; - } + /** + * Function GetName() + * Returns the name of the tool. Tool names are expected to obey the format: + * application.ToolName (eg. pcbnew.InteractiveSelection). + * @return The name of the tool. + */ + const std::string& GetName() const + { + return m_toolName; + } + + /** + * Function GetManager() + * Returns the instance of TOOL_MANAGER that takes care of the tool. + * @return Instance of the TOOL_MANAGER. If there is no TOOL_MANAGER associated, it returns + * NULL. + */ + TOOL_MANAGER* GetManager() const + { + return m_toolMgr; + } - /** - * Function GetManager() - * Returns the instance of TOOL_MANAGER that takes care of the tool. - * @return Instance of the TOOL_MANAGER. If there is no TOOL_MANAGER associated, it returns - * NULL. - */ - TOOL_MANAGER* GetManager() const - { - return m_toolMgr; - } - protected: - friend class TOOL_MANAGER; + friend class TOOL_MANAGER; - /** - * Function attachManager() - * - * Sets the TOOL_MANAGER the tool will belong to. - * Called by TOOL_MANAGER::RegisterTool() - */ - void attachManager( TOOL_MANAGER* aManager ); + /** + * Function attachManager() + * + * Sets the TOOL_MANAGER the tool will belong to. + * Called by TOOL_MANAGER::RegisterTool() + */ + void attachManager( TOOL_MANAGER* aManager ); - /** - * Function getView() - * - * Returns the instance of VIEW object used in the application. It allows tools to draw. - * @return The instance of VIEW. - */ - KiGfx::VIEW* getView() const; + /** + * Function getView() + * + * Returns the instance of VIEW object used in the application. It allows tools to draw. + * @return The instance of VIEW. + */ + KiGfx::VIEW* getView() const; - /** - * Function getViewControls() - * - * Returns the instance of VIEW_CONTROLS object used in the application. It allows tools to - * read & modify user input and its settings (eg. show cursor, enable snapping to grid, etc.) - * @return The instance of VIEW_CONTROLS. - */ - KiGfx::VIEW_CONTROLS* getViewControls() const; - - /** - * Function getEditFrame() - * - * Returns the application window object, casted to requested user type. - */ - template - T* getEditFrame() const - { - return static_cast( getEditFrameInt() ); - } + /** + * Function getViewControls() + * + * Returns the instance of VIEW_CONTROLS object used in the application. It allows tools to + * read & modify user input and its settings (eg. show cursor, enable snapping to grid, etc.) + * @return The instance of VIEW_CONTROLS. + */ + KiGfx::VIEW_CONTROLS* getViewControls() const; - /** - * Function getModel() - * - * Returns the model object if it matches the requested type. - */ - template - T* getModel( KICAD_T modelType ) const - { - EDA_ITEM* m = getModelInt(); + /** + * Function getEditFrame() + * + * Returns the application window object, casted to requested user type. + */ + template + T* getEditFrame() const + { + return static_cast( getEditFrameInt() ); + } - return static_cast( m ); - } + /** + * Function getModel() + * + * Returns the model object if it matches the requested type. + */ + template + T* getModel( KICAD_T modelType ) const + { + EDA_ITEM* m = getModelInt(); - ///> Stores the type of the tool. - TOOL_Type m_type; + return static_cast( m ); + } - ///> Unique identifier for the tool, assigned by a TOOL_MANAGER instance. - TOOL_ID m_toolId; + ///> Stores the type of the tool. + TOOL_Type m_type; - ///> Name of the tool. Names are expected to obey the format application.ToolName - ///> (eg. pcbnew.InteractiveSelection). - std::string m_toolName; - TOOL_MANAGER* m_toolMgr; + ///> Unique identifier for the tool, assigned by a TOOL_MANAGER instance. + TOOL_ID m_toolId; + + ///> Name of the tool. Names are expected to obey the format application.ToolName + ///> (eg. pcbnew.InteractiveSelection). + std::string m_toolName; + TOOL_MANAGER* m_toolMgr; private: - // hide the implementation to avoid spreading half of - // kicad and wxWidgets headers to the tools that may not need them at all! - EDA_ITEM* getModelInt() const; - wxWindow* getEditFrameInt() const; + // hide the implementation to avoid spreading half of + // kicad and wxWidgets headers to the tools that may not need them at all! + EDA_ITEM* getModelInt() const; + wxWindow* getEditFrameInt() const; }; #endif diff --git a/include/tool/tool_dispatcher.h b/include/tool/tool_dispatcher.h index 1c8c3fe579..a9f9c524ec 100644 --- a/include/tool/tool_dispatcher.h +++ b/include/tool/tool_dispatcher.h @@ -33,12 +33,12 @@ class TOOL_MANAGER; class PCB_BASE_FRAME; namespace KiGfx { - class VIEW; + class VIEW; }; -/** +/** * Class TOOL_DISPATCHER - * + * * - takes wx events, * - fixes all wx quirks (mouse warping, panning, ordering problems, etc) * - translates coordinates to world space diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index 434156d343..9d9a1e8bd3 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -42,63 +42,63 @@ class TOOL_MANAGER; */ enum TOOL_EventCategory { - TC_None = 0x00, - TC_Mouse = 0x01, - TC_Keyboard = 0x02, - TC_Command = 0x04, - TC_Message = 0x08, - TC_View = 0x10, - TC_Any = 0xffffffff + TC_None = 0x00, + TC_Mouse = 0x01, + TC_Keyboard = 0x02, + TC_Command = 0x04, + TC_Message = 0x08, + TC_View = 0x10, + TC_Any = 0xffffffff }; enum TOOL_Actions { // UI input events - TA_None = 0x0000, - TA_MouseClick = 0x0001, - TA_MouseUp = 0x0002, - TA_MouseDown = 0x0004, - TA_MouseDrag = 0x0008, - TA_MouseMotion = 0x0010, - TA_MouseWheel = 0x0020, - TA_Mouse = 0x003f, - TA_KeyUp = 0x0040, + TA_None = 0x0000, + TA_MouseClick = 0x0001, + TA_MouseUp = 0x0002, + TA_MouseDown = 0x0004, + TA_MouseDrag = 0x0008, + TA_MouseMotion = 0x0010, + TA_MouseWheel = 0x0020, + TA_Mouse = 0x003f, + TA_KeyUp = 0x0040, TA_KeyDown = 0x0080, TA_Keyboard = TA_KeyUp | TA_KeyDown, // View related events - TA_ViewRefresh = 0x0100, - TA_ViewZoom = 0x0200, - TA_ViewPan = 0x0400, - TA_ViewDirty = 0x0800, - TA_ChangeLayer = 0x1000, + TA_ViewRefresh = 0x0100, + TA_ViewZoom = 0x0200, + TA_ViewPan = 0x0400, + TA_ViewDirty = 0x0800, + TA_ChangeLayer = 0x1000, - // Tool cancel event. Issued automagically when the user hits escape or selects End Tool from - // the context menu. - TA_CancelTool = 0x2000, + // Tool cancel event. Issued automagically when the user hits escape or selects End Tool from + // the context menu. + TA_CancelTool = 0x2000, - // Context menu update. Issued whenever context menu is open and the user hovers the mouse - // over one of choices. Used in dynamic highligting in disambiguation menu - TA_ContextMenuUpdate = 0x4000, + // Context menu update. Issued whenever context menu is open and the user hovers the mouse + // over one of choices. Used in dynamic highligting in disambiguation menu + TA_ContextMenuUpdate = 0x4000, - // Context menu choice. Sent if the user picked something from the context menu or - // closed it without selecting anything. - TA_ContextMenuChoice = 0x8000, + // Context menu choice. Sent if the user picked something from the context menu or + // closed it without selecting anything. + TA_ContextMenuChoice = 0x8000, - // Tool action (allows to control tools) - TA_Action = 0x10000, + // Tool action (allows to control tools) + TA_Action = 0x10000, - TA_Any = 0xffffffff + TA_Any = 0xffffffff }; enum TOOL_MouseButtons { - MB_None = 0x0, - MB_Left = 0x1, - MB_Right = 0x2, - MB_Middle = 0x4, - MB_ButtonMask = MB_Left | MB_Right | MB_Middle, - MB_Any = 0xffffffff + MB_None = 0x0, + MB_Left = 0x1, + MB_Right = 0x2, + MB_Middle = 0x4, + MB_ButtonMask = MB_Left | MB_Right | MB_Middle, + MB_Any = 0xffffffff }; enum TOOL_Modifiers @@ -120,14 +120,14 @@ enum TOOL_ActionScope /// Defines when a context menu is opened. enum CONTEXT_MENU_TRIGGER { - CMENU_BUTTON = 0, // On the right button - CMENU_NOW, // Right now (after TOOL_INTERACTIVE::SetContextMenu) - CMENU_OFF // Never + CMENU_BUTTON = 0, // On the right button + CMENU_NOW, // Right now (after TOOL_INTERACTIVE::SetContextMenu) + CMENU_OFF // Never }; -/** +/** * Class TOOL_EVENT - * + * * Generic, UI-independent tool event. */ class TOOL_EVENT @@ -359,9 +359,9 @@ private: typedef boost::optional OPT_TOOL_EVENT; -/** +/** * Class TOOL_EVENT_LIST - * + * * A list of TOOL_EVENTs, with overloaded || operators allowing for * concatenating TOOL_EVENTs with little code. */ @@ -473,20 +473,20 @@ private: inline const TOOL_EVENT_LIST operator||( const TOOL_EVENT& a, const TOOL_EVENT& b ) { - TOOL_EVENT_LIST l; + TOOL_EVENT_LIST l; - l.Add( a ); - l.Add( b ); + l.Add( a ); + l.Add( b ); - return l; + return l; } inline const TOOL_EVENT_LIST operator||( const TOOL_EVENT& a, const TOOL_EVENT_LIST& b ) { - TOOL_EVENT_LIST l( b ); - - l.Add( a ); - return l; + TOOL_EVENT_LIST l( b ); + + l.Add( a ); + return l; } #endif diff --git a/include/tool/tool_interactive.h b/include/tool/tool_interactive.h index 7915f225a8..45259c7616 100644 --- a/include/tool/tool_interactive.h +++ b/include/tool/tool_interactive.h @@ -39,23 +39,23 @@ public: * Constructor * * Creates a tool with given id & name. The name must be unique. */ - TOOL_INTERACTIVE( TOOL_ID aId, const std::string& aName ); - - /** - * Constructor - * - * Creates a tool with given name. The name must be unique. */ - TOOL_INTERACTIVE( const std::string& aName ); - virtual ~TOOL_INTERACTIVE(); + TOOL_INTERACTIVE( TOOL_ID aId, const std::string& aName ); - /** - * Function Reset() - * Brings the tool to a known, initial state. If the tool claimed anything from - * the model or the view, it must release it when its reset. - */ - virtual void Reset() = 0; + /** + * Constructor + * + * Creates a tool with given name. The name must be unique. */ + TOOL_INTERACTIVE( const std::string& aName ); + virtual ~TOOL_INTERACTIVE(); - /** + /** + * Function Reset() + * Brings the tool to a known, initial state. If the tool claimed anything from + * the model or the view, it must release it when its reset. + */ + virtual void Reset() = 0; + + /** * Function Init() * Init() is called once upon a registration of the tool. * @@ -66,58 +66,58 @@ public: return true; } - /** - * Function SetContextMenu() - * - * Assigns a context menu and tells when it should be activated. - * @param aMenu is the menu to be assigned. - * @param aTrigger determines conditions upon which the context menu is activated. - */ - void SetContextMenu( CONTEXT_MENU* aMenu, CONTEXT_MENU_TRIGGER aTrigger = CMENU_BUTTON ); + /** + * Function SetContextMenu() + * + * Assigns a context menu and tells when it should be activated. + * @param aMenu is the menu to be assigned. + * @param aTrigger determines conditions upon which the context menu is activated. + */ + void SetContextMenu( CONTEXT_MENU* aMenu, CONTEXT_MENU_TRIGGER aTrigger = CMENU_BUTTON ); - /** - * Function Go() - * - * Defines which state (aStateFunc) to go when a certain event arrives (aConditions). - * No conditions means any event. - */ - template - void Go( int (T::*aStateFunc)( TOOL_EVENT& ), - const TOOL_EVENT_LIST& aConditions = TOOL_EVENT( TC_Any, TA_Any ) ); + /** + * Function Go() + * + * Defines which state (aStateFunc) to go when a certain event arrives (aConditions). + * No conditions means any event. + */ + template + void Go( int (T::*aStateFunc)( TOOL_EVENT& ), + const TOOL_EVENT_LIST& aConditions = TOOL_EVENT( TC_Any, TA_Any ) ); - /** - * Function Wait() - * - * Suspends execution of the tool until an event specified in aEventList arrives. - * No parameters means waiting for any event. - */ - OPT_TOOL_EVENT Wait( const TOOL_EVENT_LIST& aEventList = TOOL_EVENT ( TC_Any, TA_Any ) ); + /** + * Function Wait() + * + * Suspends execution of the tool until an event specified in aEventList arrives. + * No parameters means waiting for any event. + */ + OPT_TOOL_EVENT Wait( const TOOL_EVENT_LIST& aEventList = TOOL_EVENT ( TC_Any, TA_Any ) ); - /** functions below are not yet implemented - their interface may change */ - /*template - bool InvokeTool( const std::string& aToolName, const Parameters& parameters, - ReturnValue& returnValue ); + /** functions below are not yet implemented - their interface may change */ + /*template + bool InvokeTool( const std::string& aToolName, const Parameters& parameters, + ReturnValue& returnValue ); - template - bool InvokeWindow( const std::string& aWindowName, const Parameters& parameters, - ReturnValue& returnValue ); + template + bool InvokeWindow( const std::string& aWindowName, const Parameters& parameters, + ReturnValue& returnValue ); - template - void Yield( const T& returnValue );*/ + template + void Yield( const T& returnValue );*/ protected: - /* helper functions for constructing events for Wait() and Go() with less typing */ - const TOOL_EVENT evActivate( std::string aToolName = "" ); - const TOOL_EVENT evCommand( int aCommandId = -1 ); - const TOOL_EVENT evCommand( std::string aCommandStr = "" ); - const TOOL_EVENT evMotion(); - const TOOL_EVENT evClick( int aButton = MB_Any ); - const TOOL_EVENT evDrag( int aButton = MB_Any ); - const TOOL_EVENT evButtonUp( int aButton = MB_Any ); - const TOOL_EVENT evButtonDown(int aButton = MB_Any ); + /* helper functions for constructing events for Wait() and Go() with less typing */ + const TOOL_EVENT evActivate( std::string aToolName = "" ); + const TOOL_EVENT evCommand( int aCommandId = -1 ); + const TOOL_EVENT evCommand( std::string aCommandStr = "" ); + const TOOL_EVENT evMotion(); + const TOOL_EVENT evClick( int aButton = MB_Any ); + const TOOL_EVENT evDrag( int aButton = MB_Any ); + const TOOL_EVENT evButtonUp( int aButton = MB_Any ); + const TOOL_EVENT evButtonDown(int aButton = MB_Any ); private: - void goInternal( TOOL_STATE_FUNC& aState, const TOOL_EVENT_LIST& aConditions ); + void goInternal( TOOL_STATE_FUNC& aState, const TOOL_EVENT_LIST& aConditions ); }; // hide TOOL_MANAGER implementation @@ -125,8 +125,8 @@ template void TOOL_INTERACTIVE::Go( int (T::*aStateFunc)( TOOL_EVENT& ), const TOOL_EVENT_LIST& aConditions ) { - TOOL_STATE_FUNC sptr( static_cast( this ), aStateFunc ); - goInternal( sptr, aConditions ); + TOOL_STATE_FUNC sptr( static_cast( this ), aStateFunc ); + goInternal( sptr, aConditions ); } #endif diff --git a/include/view/view_controls.h b/include/view/view_controls.h index 7bf11860cb..f160de287a 100644 --- a/include/view/view_controls.h +++ b/include/view/view_controls.h @@ -122,7 +122,7 @@ public: virtual const VECTOR2D GetCursorPosition() const = 0; - /** + /** * Function ForceCursorPosition() * Places the cursor immediately at a given point. Mouse movement is ignored. * @param aEnabled enable forced cursor position diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp old mode 100755 new mode 100644 diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index 2a304d77a4..bf0c7d3b94 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -279,7 +279,7 @@ void PCB_PAINTER::draw( const TRACK* aTrack, int aLayer ) NETINFO_ITEM* net = ( (BOARD*) aTrack->GetParent() )->FindNet( netNumber ); if( !net ) return; - + std::string netName = std::string( net->GetShortNetname().mb_str() ); VECTOR2D textPosition = start + line / 2.0; // center of the track double textOrientation = -atan( line.y / line.x ); diff --git a/pcbnew/router/pns_itemset.h b/pcbnew/router/pns_itemset.h index ae13ae78e9..fa46241337 100644 --- a/pcbnew/router/pns_itemset.h +++ b/pcbnew/router/pns_itemset.h @@ -28,7 +28,7 @@ /** * Class PNS_ITEMSET * - * Holds a list of board items, that can be filtered against net, kinds, + * Holds a list of board items, that can be filtered against net, kinds, * layers, etc. **/ diff --git a/pcbnew/router/pns_joint.h b/pcbnew/router/pns_joint.h index a4ad7340a0..d9b351e700 100644 --- a/pcbnew/router/pns_joint.h +++ b/pcbnew/router/pns_joint.h @@ -32,9 +32,9 @@ /** * Class PNS_JOINT * - * Represents a 2D point on a given set of layers and belonging to a certain + * Represents a 2D point on a given set of layers and belonging to a certain * net, that links together a number of board items. - * A hash table of joints is used by the router to follow connectivity between + * A hash table of joints is used by the router to follow connectivity between * the items. **/ class PNS_JOINT : public PNS_ITEM @@ -53,8 +53,8 @@ public: PNS_JOINT() : PNS_ITEM( JOINT ) {} - PNS_JOINT( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, - int aNet = -1 ) : + PNS_JOINT( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, + int aNet = -1 ) : PNS_ITEM( JOINT ) { m_tag.pos = aPos; @@ -78,14 +78,14 @@ public: return NULL; } - ///> Returns true if the joint is a trivial line corner, connecting two + ///> Returns true if the joint is a trivial line corner, connecting two /// segments of the same net, on the same layer. bool IsLineCorner() const { if( m_linkedItems.size() != 2 ) return false; - if( m_linkedItems[0]->GetKind() != SEGMENT || + if( m_linkedItems[0]->GetKind() != SEGMENT || m_linkedItems[1]->GetKind() != SEGMENT ) return false; @@ -99,7 +99,7 @@ public: ///> Links the joint to a given board item (when it's added to the PNS_NODE) void Link( PNS_ITEM* aItem ) { - LinkedItems::iterator f = std::find( m_linkedItems.begin(), + LinkedItems::iterator f = std::find( m_linkedItems.begin(), m_linkedItems.end(), aItem ); if( f != m_linkedItems.end() ) @@ -112,7 +112,7 @@ public: ///> Returns true if the joint became dangling after unlinking. bool Unlink( PNS_ITEM* aItem ) { - LinkedItems::iterator f = std::find( m_linkedItems.begin(), + LinkedItems::iterator f = std::find( m_linkedItems.begin(), m_linkedItems.end(), aItem ); if( f != m_linkedItems.end() ) @@ -142,7 +142,7 @@ public: { int n = 0; - for( LinkedItems::const_iterator i = m_linkedItems.begin(); + for( LinkedItems::const_iterator i = m_linkedItems.begin(); i != m_linkedItems.end(); ++i ) if( (*i)->GetKind() & aMask ) n++; @@ -172,7 +172,7 @@ public: bool Overlaps( const PNS_JOINT& rhs ) const { - return m_tag.pos == rhs.m_tag.pos && + return m_tag.pos == rhs.m_tag.pos && m_tag.net == rhs.m_tag.net && m_layers.Overlaps( rhs.m_layers ); } @@ -186,7 +186,7 @@ private: // hash function & comparison operator for boost::unordered_map<> -inline bool operator==( PNS_JOINT::HashTag const& p1, +inline bool operator==( PNS_JOINT::HashTag const& p1, PNS_JOINT::HashTag const& p2 ) { return p1.pos == p2.pos && p1.net == p2.net; diff --git a/pcbnew/router/pns_line.cpp b/pcbnew/router/pns_line.cpp index c1ff5f639b..65e4386004 100644 --- a/pcbnew/router/pns_line.cpp +++ b/pcbnew/router/pns_line.cpp @@ -434,7 +434,7 @@ void PNS_LINE::NewWalkaround( const SHAPE_LINE_CHAIN& aObstacle, path.Append( l_hull.CPoint( j ) ); li = l_orig.Find( l_hull.CPoint( j ) ); - if( li >= 0 && ( li == (l_orig.PointCount() - 1 ) || + if( li >= 0 && ( li == (l_orig.PointCount() - 1 ) || outside[li + 1]) ) break; } @@ -514,7 +514,7 @@ bool PNS_LINE::walkScan( const SHAPE_LINE_CHAIN& line, { index_l = (reverse ? sc - 1 - i : i); ip = s.a; - printf( "vertex %d on-%s %d\n", index_l, + printf( "vertex %d on-%s %d\n", index_l, is_vertex ? "vertex" : "edge", index_o ); return true; } @@ -523,7 +523,7 @@ bool PNS_LINE::walkScan( const SHAPE_LINE_CHAIN& line, { index_l = (reverse ? sc - 1 - i - 1 : i + 1); ip = s.b; - printf( "vertex %d on-%s %d\n", index_l, + printf( "vertex %d on-%s %d\n", index_l, is_vertex ? "vertex" : "edge", index_o ); return true; } @@ -562,7 +562,7 @@ bool PNS_LINE::Walkaround( SHAPE_LINE_CHAIN obstacle, if( line.SegmentCount() < 1 ) return false; - if( obstacle.PointInside( line.CPoint( 0 ) ) || + if( obstacle.PointInside( line.CPoint( 0 ) ) || obstacle.PointInside( line.CPoint( -1 ) ) ) return false; @@ -714,7 +714,7 @@ bool PNS_LINE::Is45Degree() const SEG& s = m_line.CSegment( i ); double angle = 180.0 / M_PI * - atan2( (double) s.b.y - (double) s.a.y, + atan2( (double) s.b.y - (double) s.a.y, (double) s.b.x - (double) s.a.x ); if( angle < 0 ) diff --git a/pcbnew/router/pns_line.h b/pcbnew/router/pns_line.h index 1fb341572c..375c34e804 100644 --- a/pcbnew/router/pns_line.h +++ b/pcbnew/router/pns_line.h @@ -38,17 +38,17 @@ class PNS_VIA; /** * Class PNS_LINE * - * Represents a track on a PCB, connecting two non-trivial joints (that is, - * vias, pads, junctions between multiple traces or two traces different widths - * and combinations of these). PNS_LINEs are NOT stored in the model (PNS_NODE). - * Instead, they are assembled on-the-fly, based on a via/pad/segment that + * Represents a track on a PCB, connecting two non-trivial joints (that is, + * vias, pads, junctions between multiple traces or two traces different widths + * and combinations of these). PNS_LINEs are NOT stored in the model (PNS_NODE). + * Instead, they are assembled on-the-fly, based on a via/pad/segment that * belongs/begins them. * - * PNS_LINEs can be either loose (consisting of segments that do not belong to - * any PNS_NODE) or owned (with segments taken from a PNS_NODE) - these are + * PNS_LINEs can be either loose (consisting of segments that do not belong to + * any PNS_NODE) or owned (with segments taken from a PNS_NODE) - these are * returned by PNS_NODE::AssembleLine and friends. * - * A PNS_LINE may have a PNS_VIA attached at its and - this is used by via + * A PNS_LINE may have a PNS_VIA attached at its and - this is used by via * dragging/force propagation stuff. */ @@ -141,7 +141,7 @@ public: m_segmentRefs->push_back( aSeg ); } - ///> Returns a list of segments from the owning node that constitute this + ///> Returns a list of segments from the owning node that constitute this ///> line (or NULL if the line is loose) LinkedSegments* GetLinkedSegments() { @@ -157,7 +157,7 @@ public: aSeg ) != m_segmentRefs->end(); } - ///> Returns this line, but clipped to the nearest obstacle + ///> Returns this line, but clipped to the nearest obstacle ///> along, to avoid collision. const PNS_LINE ClipToNearestObstacle( PNS_NODE* aNode ) const; @@ -168,7 +168,7 @@ public: ///> Returns the number of corners of angles specified by mask aAngles. int CountCorners( int aAngles ); - ///> Calculates a line thightly wrapping a convex hull + ///> Calculates a line thightly wrapping a convex hull ///> of an obstacle object (aObstacle). ///> aPrePath = path from origin to the obstacle ///> aWalkaroundPath = path around the obstacle diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp index 00e5655a4f..b374be34e8 100644 --- a/pcbnew/router/pns_line_placer.cpp +++ b/pcbnew/router/pns_line_placer.cpp @@ -63,7 +63,7 @@ void PNS_LINE_PLACER::ApplySettings( const PNS_ROUTING_SETTINGS& aSettings ) } -void PNS_LINE_PLACER::StartPlacement( const VECTOR2I& aStart, int aNet, +void PNS_LINE_PLACER::StartPlacement( const VECTOR2I& aStart, int aNet, int aWidth, int aLayer ) { m_direction = m_initial_direction; @@ -177,14 +177,14 @@ bool PNS_LINE_PLACER::handlePullback() DIRECTION_45 last_tail( tail.Segment( -1 ) ); DIRECTION_45::AngleType angle = first_head.Angle( last_tail ); - // case 1: we have a defined routing direction, and the currently computed + // case 1: we have a defined routing direction, and the currently computed // head goes in different one. bool pullback_1 = false; // (m_direction != DIRECTION_45::UNDEFINED && m_direction != first_head); - // case 2: regardless of the current routing direction, if the tail/head + // case 2: regardless of the current routing direction, if the tail/head // extremities form an acute or right angle, reduce the tail by one segment // (and hope that further iterations) will result with a cleaner trace - bool pullback_2 = (angle == DIRECTION_45::ANG_RIGHT || + bool pullback_2 = (angle == DIRECTION_45::ANG_RIGHT || angle == DIRECTION_45::ANG_ACUTE); if( pullback_1 || pullback_2 ) @@ -197,7 +197,7 @@ bool PNS_LINE_PLACER::handlePullback() n % last_tail.Format().c_str() % first_head.Format().c_str() ); // erase the last point in the tail, hoping that the next iteration will - // result with a head trace that starts with a segment following our + // result with a head trace that starts with a segment following our // current direction. if( n < 2 ) tail.Clear(); // don't leave a single-point tail @@ -239,7 +239,7 @@ bool PNS_LINE_PLACER::reduceTail( const VECTOR2I& aEnd ) const SEG s = tail.CSegment( i ); DIRECTION_45 dir( s ); - // calculate a replacement route and check if it matches + // calculate a replacement route and check if it matches // the direction of the segment to be replaced SHAPE_LINE_CHAIN replacement = dir.BuildInitialTrace( s.a, aEnd ); @@ -289,7 +289,7 @@ bool PNS_LINE_PLACER::mergeHead() SHAPE_LINE_CHAIN& head = m_head.GetLine(); SHAPE_LINE_CHAIN& tail = m_tail.GetLine(); - const int ForbiddenAngles = DIRECTION_45::ANG_ACUTE | + const int ForbiddenAngles = DIRECTION_45::ANG_ACUTE | DIRECTION_45::ANG_HALF_FULL | DIRECTION_45::ANG_UNDEFINED; @@ -366,7 +366,7 @@ bool PNS_LINE_PLACER::handleViaPlacement( PNS_LINE& aHead ) if( v.PushoutForce( m_shove->GetCurrentNode(), lead, force, true, 20 ) ) { - SHAPE_LINE_CHAIN line = m_direction.BuildInitialTrace( + SHAPE_LINE_CHAIN line = m_direction.BuildInitialTrace( aHead.GetCLine().CPoint( 0 ), aHead.GetCLine().CPoint( -1 ) + force ); aHead = PNS_LINE( aHead, line ); @@ -379,7 +379,7 @@ bool PNS_LINE_PLACER::handleViaPlacement( PNS_LINE& aHead ) } -bool PNS_LINE_PLACER::routeHead( const VECTOR2I& aP, PNS_LINE& aNewHead, +bool PNS_LINE_PLACER::routeHead( const VECTOR2I& aP, PNS_LINE& aNewHead, bool aCwWalkaround ) { // STAGE 1: route a simple two-segment trace between m_p_start and aP... @@ -543,7 +543,7 @@ bool PNS_LINE_PLACER::optimizeTailHeadTransition() PNS_LINE new_head( m_tail, opt_line ); // and see if it could be made simpler by merging obtuse/collnear segments. - // If so, replace the (threshold) last tail points and the head with + // If so, replace the (threshold) last tail points and the head with // the optimized line // if(PNS_OPTIMIZER::Optimize(&new_head, PNS_OPTIMIZER::MERGE_SEGMENTS)) diff --git a/pcbnew/router/pns_line_placer.h b/pcbnew/router/pns_line_placer.h index f9bbfc7524..614e650901 100644 --- a/pcbnew/router/pns_line_placer.h +++ b/pcbnew/router/pns_line_placer.h @@ -39,7 +39,7 @@ class PNS_ROUTER_BASE; /** * Class PNS_LINE_PLACER * - * Interactively routes a single track. Runs shove and walkaround + * Interactively routes a single track. Runs shove and walkaround * algorithms when needed. */ @@ -63,9 +63,9 @@ public: /** * Function Route() * - * Re-routes the current track to point aP. Returns true, when routing has - * completed successfully (i.e. the trace end has reached point aP), and false - * if the trace was stuck somewhere on the way. May call routeStep() + * Re-routes the current track to point aP. Returns true, when routing has + * completed successfully (i.e. the trace end has reached point aP), and false + * if the trace was stuck somewhere on the way. May call routeStep() * repetitively due to mouse smoothing. * @param aP ending point of current route. * @return true, if the routing is complete. @@ -80,7 +80,7 @@ public: ///> Returns the "head" of the line being placed, that is the volatile part ///> that has not been settled yet const PNS_LINE& GetHead() const { return m_head; } - ///> Returns the "tail" of the line being placed the part that has been + ///> Returns the "tail" of the line being placed the part that has been ///> fixed already (follow mouse mode only) const PNS_LINE& GetTail() const { return m_tail; } @@ -99,9 +99,9 @@ public: return m_p_start; } - ///> Returns all items in the world that have been affected by the routing + ///> Returns all items in the world that have been affected by the routing ///> operation. Used to update data structures of the host application - void GetUpdatedItems( PNS_NODE::ItemVector& aRemoved, + void GetUpdatedItems( PNS_NODE::ItemVector& aRemoved, PNS_NODE::ItemVector& aAdded ); ///> Toggles the current posture (straight/diagonal) of the trace head. @@ -114,30 +114,30 @@ private: static const double m_shoveLengthThreshold = 1.7; bool handleViaPlacement( PNS_LINE& aHead ); - + /** * Function checkObtusity() * - * Helper that checks if segments a and b form an obtuse angle + * Helper that checks if segments a and b form an obtuse angle * (in 45-degree regime). * @return true, if angle (a, b) is obtuse */ bool checkObtusity( const SEG& a, const SEG& b ) const; - + /** * Function handleSelfIntersections() * - * Checks if the head of the track intersects its tail. If so, cuts the + * Checks if the head of the track intersects its tail. If so, cuts the * tail up to the intersecting segment and fixes the head direction to match * the last segment before the cut. * @return true if the line has been changed. */ bool handleSelfIntersections(); - + /** * Function handlePullback() * - * Deals with pull-back: reduces the tail if head trace is moved backwards + * Deals with pull-back: reduces the tail if head trace is moved backwards * wrs to the current tail direction. * @return true if the line has been changed. */ @@ -146,7 +146,7 @@ private: /** * Function mergeHead() * - * Moves "estabished" segments from the head to the tail if certain + * Moves "estabished" segments from the head to the tail if certain * conditions are met. * @return true, if the line has been changed. */ @@ -155,20 +155,20 @@ private: /** * Function reduceTail() * - * Attempts to reduce the numer of segments in the tail by trying to replace a - * certain number of latest tail segments with a direct trace leading to aEnd + * Attempts to reduce the numer of segments in the tail by trying to replace a + * certain number of latest tail segments with a direct trace leading to aEnd * that does not collide with anything. * @param aEnd: current routing destination point. * @return true if the line has been changed. */ bool reduceTail( const VECTOR2I& aEnd ); - + void fixHeadPosture(); - + /** * Function optimizeTailHeadTransition() * - * Tries to reduce the corner count of the most recent part of tail/head by + * Tries to reduce the corner count of the most recent part of tail/head by * merging obtuse/collinear segments. * @return true, if the line has been changed. */ @@ -177,12 +177,12 @@ private: /** * Function routeHead() * - * Computes the head trace between the current start point (m_p_start) and - * point aP, starting with direction defined in m_direction. The trace walks - * around all colliding solid or non-movable items. Movable segments are + * Computes the head trace between the current start point (m_p_start) and + * point aP, starting with direction defined in m_direction. The trace walks + * around all colliding solid or non-movable items. Movable segments are * ignored, as they'll be handled later by the shove algorithm. */ - bool routeHead( const VECTOR2I& aP, PNS_LINE& aNewHead, + bool routeHead( const VECTOR2I& aP, PNS_LINE& aNewHead, bool aCwWalkaround = true ); /** @@ -197,7 +197,7 @@ private: ///> routing mode (walkaround, shove, etc.) PNS_MODE m_mode; - ///> follow mouse trail by attaching new segments to the head + ///> follow mouse trail by attaching new segments to the head ///> as the cursor moves bool m_follow_mouse; diff --git a/pcbnew/router/pns_node.cpp b/pcbnew/router/pns_node.cpp index d17b053e70..2fb1410c8a 100644 --- a/pcbnew/router/pns_node.cpp +++ b/pcbnew/router/pns_node.cpp @@ -71,7 +71,7 @@ PNS_NODE::~PNS_NODE() allocNodes.erase( this ); - for( PNS_INDEX::ItemSet::iterator i = m_index->begin(); + for( PNS_INDEX::ItemSet::iterator i = m_index->begin(); i != m_index->end(); ++i ) if( (*i)->BelongsTo( this ) ) delete *i; @@ -111,14 +111,14 @@ PNS_NODE* PNS_NODE::Branch() child->m_clearanceFunctor = m_clearanceFunctor; child->m_root = isRoot() ? this : m_root; - // immmediate offspring of the root branch needs not copy anything. - // For the rest, deep-copy joints, overridden item map and pointers + // immmediate offspring of the root branch needs not copy anything. + // For the rest, deep-copy joints, overridden item map and pointers // to stored items. if( !isRoot() ) { JointMap::iterator j; - for( PNS_INDEX::ItemSet::iterator i = m_index->begin(); + for( PNS_INDEX::ItemSet::iterator i = m_index->begin(); i != m_index->end(); ++i ) child->m_index->Add( *i ); @@ -150,7 +150,7 @@ void PNS_NODE::unlinkParent() } -// function object that visits potential obstacles and performs +// function object that visits potential obstacles and performs // the actual collision refining struct PNS_NODE::obstacleVisitor { @@ -200,7 +200,7 @@ struct PNS_NODE::obstacleVisitor if( !aItem->OfKind( m_kindMask ) ) return true; - // check if there is a more recent branch with a newer + // check if there is a more recent branch with a newer // (possibily modified) version of this item. if( m_override && m_override->overrides( aItem ) ) return true; @@ -428,8 +428,8 @@ struct hitVisitor const PNS_ITEMSET PNS_NODE::HitTest( const VECTOR2I& aPoint ) { PNS_ITEMSET items; - // fixme: we treat a point as an infinitely small circle - this is inefficient. - SHAPE_CIRCLE s( aPoint, 0 ); + // fixme: we treat a point as an infinitely small circle - this is inefficient. + SHAPE_CIRCLE s( aPoint, 0 ); hitVisitor visitor( items, aPoint, this ); m_index->Query( &s, m_maxClearance, visitor ); @@ -537,12 +537,12 @@ void PNS_NODE::Add( PNS_ITEM* aItem ) void PNS_NODE::doRemove( PNS_ITEM* aItem ) { - // case 1: removing an item that is stored in the root node from any branch: + // case 1: removing an item that is stored in the root node from any branch: // mark it as overridden, but do not remove if( aItem->BelongsTo( m_root ) && !isRoot() ) m_override.insert( aItem ); - // case 2: the item belongs to this branch or a parent, non-root branch, + // case 2: the item belongs to this branch or a parent, non-root branch, // or the root itself and we are the root: remove from the index else if( !aItem->BelongsTo( m_root ) || isRoot() ) m_index->Remove( aItem ); @@ -948,7 +948,7 @@ void PNS_NODE::Commit( PNS_NODE* aNode ) BOOST_FOREACH( PNS_ITEM * item, aNode->m_override ) Remove( item ); - for( PNS_INDEX::ItemSet::iterator i = aNode->m_index->begin(); + for( PNS_INDEX::ItemSet::iterator i = aNode->m_index->begin(); i != aNode->m_index->end(); ++i ) Add( *i ); diff --git a/pcbnew/router/pns_node.h b/pcbnew/router/pns_node.h index 67debc3b9f..bec5c1bce4 100644 --- a/pcbnew/router/pns_node.h +++ b/pcbnew/router/pns_node.h @@ -79,13 +79,13 @@ struct PNS_OBSTACLE /** * Class PNS_NODE * - * Keeps the router "world" - i.e. all the tracks, vias, solids in a + * Keeps the router "world" - i.e. all the tracks, vias, solids in a * hierarchical and indexed way. * Features: * - spatial-indexed container for PCB item shapes * - collision search (with clearance checking) * - assembly of lines connecting joints, finding loops and unique paths - * - lightweight cloning/branching (for recursive optimization and shove + * - lightweight cloning/branching (for recursive optimization and shove * springback) **/ @@ -145,11 +145,11 @@ public: void Remove( PNS_ITEM* aItem ); void Replace( PNS_ITEM* aOldItem, PNS_ITEM* aNewItem ); - ///> Creates a lightweight copy ("branch") of self. Note that if there are + ///> Creates a lightweight copy ("branch") of self. Note that if there are ///> any branches in use, their parents must NOT be deleted. PNS_NODE* Branch(); - ///> Assembles a line connecting two non-trivial joints the + ///> Assembles a line connecting two non-trivial joints the ///> segment aSeg belongs to. PNS_LINE* AssembleLine( PNS_SEGMENT* aSeg, const OptJoint& a = OptJoint(), const OptJoint& b = OptJoint() ); @@ -175,15 +175,15 @@ public: const OptJoint FindJoint( const VECTOR2I& aPos, int aLayer, int aNet ); ///> finds all linest between a pair of joints. Used by the loop removal engine. - int FindLinesBetweenJoints( PNS_JOINT& a, PNS_JOINT& b, + int FindLinesBetweenJoints( PNS_JOINT& a, PNS_JOINT& b, std::vector& aLines ); ///> finds the joints corresponding to the ends of line aLine void FindLineEnds( PNS_LINE* aLine, PNS_JOINT& a, PNS_JOINT& b ); - ///> finds all joints that have an (in)direct connection(s) + ///> finds all joints that have an (in)direct connection(s) ///> (i.e. segments/vias) with the joint aJoint. - void FindConnectedJoints( const PNS_JOINT& aJoint, + void FindConnectedJoints( const PNS_JOINT& aJoint, std::vector& aConnectedJoints ); ///> Destroys all child nodes. Applicable only to the root node. @@ -201,15 +201,15 @@ private: PNS_NODE& operator=( const PNS_NODE& b ); ///> tries to find matching joint and creates a new one if not found - PNS_JOINT& touchJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, + PNS_JOINT& touchJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aNet ); ///> touches a joint and links it to an item - void linkJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, + void linkJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aNet, PNS_ITEM* aWhere ); ///> unlinks an item from a joint - void unlinkJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, + void unlinkJoint( const VECTOR2I& aPos, const PNS_LAYERSET& aLayers, int aNet, PNS_ITEM* aWhere ); ///> helpers for adding/removing items @@ -231,7 +231,7 @@ private: return m_parent == NULL; } - ///> checks if this branch contains an updated version of the item + ///> checks if this branch contains an updated version of the item ///> from the root branch. bool overrides( PNS_ITEM* aItem ) const { @@ -249,7 +249,7 @@ private: ///> spatial index of all items // SHAPE_INDEX_LIST m_items; - ///> hash table with the joints, linking the items. Joints are hashed by + ///> hash table with the joints, linking the items. Joints are hashed by ///> their position, layer set and net. JointMap m_joints; diff --git a/pcbnew/router/pns_optimizer.cpp b/pcbnew/router/pns_optimizer.cpp index 43cbfb52a0..e519eab6ea 100644 --- a/pcbnew/router/pns_optimizer.cpp +++ b/pcbnew/router/pns_optimizer.cpp @@ -109,7 +109,7 @@ bool PNS_COST_ESTIMATOR::IsBetter( PNS_COST_ESTIMATOR& aOther, { if( aOther.m_cornerCost < m_cornerCost && aOther.m_lengthCost < m_lengthCost ) return true; - + else if( aOther.m_cornerCost < m_cornerCost * aCornerTollerance && aOther.m_lengthCost < m_lengthCost * aLengthTollerance ) return true; @@ -531,19 +531,19 @@ PNS_OPTIMIZER::BreakoutList PNS_OPTIMIZER::rectBreakouts( int aWidth, if( s.x >= s.y ) { - breakouts.push_back( SHAPE_LINE_CHAIN( c, c + d_offset, + breakouts.push_back( SHAPE_LINE_CHAIN( c, c + d_offset, c + d_offset + VECTOR2I( l, l ) ) ); - breakouts.push_back( SHAPE_LINE_CHAIN( c, c + d_offset, + breakouts.push_back( SHAPE_LINE_CHAIN( c, c + d_offset, c + d_offset - VECTOR2I( -l, l ) ) ); - breakouts.push_back( SHAPE_LINE_CHAIN( c, c - d_offset, + breakouts.push_back( SHAPE_LINE_CHAIN( c, c - d_offset, c - d_offset + VECTOR2I( -l, l ) ) ); - breakouts.push_back( SHAPE_LINE_CHAIN( c, c - d_offset, + breakouts.push_back( SHAPE_LINE_CHAIN( c, c - d_offset, c - d_offset - VECTOR2I( l, l ) ) ); } else { // fixme: this could be done more efficiently - breakouts.push_back( SHAPE_LINE_CHAIN( c, c + d_offset, + breakouts.push_back( SHAPE_LINE_CHAIN( c, c + d_offset, c + d_offset + VECTOR2I( l, l ) ) ); breakouts.push_back( SHAPE_LINE_CHAIN( c, c - d_offset, c - d_offset - VECTOR2I( -l, l ) ) ); @@ -640,7 +640,7 @@ int PNS_OPTIMIZER::smartPadsSingle( PNS_LINE* aLine, PNS_ITEM* aPad, bool aEnd, for( int diag = 0; diag < 2; diag++ ) { SHAPE_LINE_CHAIN v; - SHAPE_LINE_CHAIN connect = dir.BuildInitialTrace( l.CPoint( -1 ), + SHAPE_LINE_CHAIN connect = dir.BuildInitialTrace( l.CPoint( -1 ), line.CPoint( p ), diag == 0 ); DIRECTION_45 dir_bkout( l.CSegment( -1 ) ); @@ -691,7 +691,7 @@ int PNS_OPTIMIZER::smartPadsSingle( PNS_LINE* aLine, PNS_ITEM* aPad, bool aEnd, if( !checkColliding( &tmp ) ) { -/* if(aEnd) +/* if(aEnd) * PNSDisplayDebugLine (l_best, 6); * else * PNSDisplayDebugLine (l_best, 5);*/ diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 8f13031c47..f38275fd99 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -53,7 +53,7 @@ using namespace std; -// an ugly singleton for drawing debug items within the router context. +// an ugly singleton for drawing debug items within the router context. // To be fixed sometime in the future. static PNS_ROUTER* theRouter; diff --git a/pcbnew/router/pns_shove.cpp b/pcbnew/router/pns_shove.cpp index 018ff7da35..e9222ee8f7 100644 --- a/pcbnew/router/pns_shove.cpp +++ b/pcbnew/router/pns_shove.cpp @@ -429,7 +429,7 @@ PNS_SHOVE::ShoveStatus PNS_SHOVE::ShoveLines( PNS_LINE* aCurrentHead ) break; } -/* if(lastWalkSolid == nearest->item) +/* if(lastWalkSolid == nearest->item) * { * fail = true; * break; diff --git a/pcbnew/router/pns_shove.h b/pcbnew/router/pns_shove.h index 9d5fca0f88..0e778e7fd2 100644 --- a/pcbnew/router/pns_shove.h +++ b/pcbnew/router/pns_shove.h @@ -58,7 +58,7 @@ public: private: static const int ShoveTimeLimit = 3000; - bool tryShove( PNS_NODE* aWorld, PNS_LINE* aTrack, PNS_LINE* aObstacle, + bool tryShove( PNS_NODE* aWorld, PNS_LINE* aTrack, PNS_LINE* aObstacle, PNS_SEGMENT& aObstacleSeg, PNS_LINE* aResult, bool aInvertWinding ); ShoveStatus shoveSingleLine( PNS_NODE* aNode, PNS_LINE* aCurrent, PNS_LINE* aObstacle, diff --git a/pcbnew/router/pns_walkaround.cpp b/pcbnew/router/pns_walkaround.cpp index ee3cb9c09c..c03320a7e5 100644 --- a/pcbnew/router/pns_walkaround.cpp +++ b/pcbnew/router/pns_walkaround.cpp @@ -74,7 +74,7 @@ PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::singleStep( PNS_LINE& aPath, } } - aPath.NewWalkaround( current_obs->hull, path_pre[0], path_walk[0], + aPath.NewWalkaround( current_obs->hull, path_pre[0], path_walk[0], path_post[0], aWindingDirection ); aPath.NewWalkaround( current_obs->hull, path_pre[1], path_walk[1], path_post[1], !aWindingDirection ); diff --git a/pcbnew/router/pns_walkaround.h b/pcbnew/router/pns_walkaround.h index 830748553d..32f642d277 100644 --- a/pcbnew/router/pns_walkaround.h +++ b/pcbnew/router/pns_walkaround.h @@ -72,7 +72,7 @@ public: m_cursorApproachMode = aEnabled; } - WalkaroundStatus Route( const PNS_LINE& aInitialPath, PNS_LINE& aWalkPath, + WalkaroundStatus Route( const PNS_LINE& aInitialPath, PNS_LINE& aWalkPath, bool aOptimize = true ); private: diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index e38b77379c..1318f7dee0 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -100,7 +100,7 @@ int ROUTER_TOOL::getDefaultWidth( int aNetCode ) } -void ROUTER_TOOL::getNetclassDimensions( int aNetCode, int& aWidth, +void ROUTER_TOOL::getNetclassDimensions( int aNetCode, int& aWidth, int& aViaDiameter, int& aViaDrill ) { BOARD* board = getModel( PCB_T ); From 988aee863c666bc7cad412852a074b9715dfec52 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 14 Oct 2013 14:42:35 +0200 Subject: [PATCH 402/415] Fixed unnecessary comment --- common/gal/opengl/opengl_compositor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/gal/opengl/opengl_compositor.cpp b/common/gal/opengl/opengl_compositor.cpp index 0dd5697191..d9e0aab945 100644 --- a/common/gal/opengl/opengl_compositor.cpp +++ b/common/gal/opengl/opengl_compositor.cpp @@ -95,7 +95,7 @@ unsigned int OPENGL_COMPOSITOR::CreateBuffer() { wxASSERT( m_initialized ); - //if( usedBuffers() >= m_maxBuffers ) + if( usedBuffers() >= m_maxBuffers ) { wxLogError( wxT( "Cannot create more framebuffers. OpenGL rendering backend requires at" "least 3 framebuffers. You may try to update/change " From e66a4ce337fb3126c3b80356c341bd3dada7f6de Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 14 Oct 2013 16:13:35 +0200 Subject: [PATCH 403/415] Namespace KiGfx->KIGFX. template<> -> template <> Some more reformatting according to uncrustify results. --- CMakeModules/Shaders.cmake | 3 +- common/drawframe.cpp | 12 +- common/drawpanel_gal.cpp | 20 +-- common/gal/cairo/cairo_compositor.cpp | 3 +- common/gal/cairo/cairo_gal.cpp | 7 +- common/gal/color4d.cpp | 24 ++-- common/gal/graphics_abstraction_layer.cpp | 4 +- common/gal/opengl/cached_container.cpp | 8 +- common/gal/opengl/gpu_manager.cpp | 2 +- common/gal/opengl/noncached_container.cpp | 2 +- common/gal/opengl/opengl_compositor.cpp | 10 +- common/gal/opengl/opengl_gal.cpp | 10 +- common/gal/opengl/shader.cpp | 6 +- common/gal/opengl/shader.frag | 1 - common/gal/opengl/shader.vert | 1 - common/gal/opengl/vertex_container.cpp | 2 +- common/gal/opengl/vertex_item.cpp | 2 +- common/gal/opengl/vertex_manager.cpp | 4 +- common/gal/stroke_font.cpp | 4 +- common/geometry/seg.cpp | 38 +++--- common/geometry/shape_collisions.cpp | 44 ++++--- common/geometry/shape_line_chain.cpp | 51 ++++--- common/math/math_util.cpp | 20 +-- common/painter.cpp | 2 +- common/tool/action_manager.cpp | 7 +- common/tool/context_menu.cpp | 5 +- common/tool/tool_base.cpp | 4 +- common/tool/tool_dispatcher.cpp | 40 +++--- common/tool/tool_event.cpp | 68 +++++----- common/tool/tool_interactive.cpp | 6 +- common/tool/tool_manager.cpp | 26 ++-- common/view/view.cpp | 28 +++- common/view/view_group.cpp | 7 +- common/view/view_item.cpp | 3 +- common/view/wx_view_controls.cpp | 28 ++-- common/worksheet_viewitem.cpp | 2 +- common/zoom.cpp | 4 +- include/base_struct.h | 2 +- include/class_drawpanel_gal.h | 18 +-- include/gal/cairo/cairo_compositor.h | 4 +- include/gal/cairo/cairo_gal.h | 12 +- include/gal/color4d.h | 6 +- include/gal/compositor.h | 4 +- include/gal/definitions.h | 24 ++-- include/gal/graphics_abstraction_layer.h | 4 +- include/gal/opengl/cached_container.h | 6 +- include/gal/opengl/gpu_manager.h | 17 ++- include/gal/opengl/noncached_container.h | 4 +- include/gal/opengl/opengl_compositor.h | 4 +- include/gal/opengl/opengl_gal.h | 7 +- include/gal/opengl/shader.h | 6 +- include/gal/opengl/vertex_common.h | 8 +- include/gal/opengl/vertex_container.h | 5 +- include/gal/opengl/vertex_item.h | 4 +- include/gal/opengl/vertex_manager.h | 4 +- include/gal/stroke_font.h | 4 +- include/geometry/rtree.h | 4 +- include/geometry/seg.h | 65 +++++---- include/geometry/shape.h | 21 +-- include/geometry/shape_circle.h | 11 +- include/geometry/shape_index.h | 33 +++-- include/geometry/shape_index_list.h | 139 ++++++++++---------- include/geometry/shape_rect.h | 37 ++++-- include/length.h.usuned | 4 +- include/macros.h | 4 +- include/math/box2.h | 12 +- include/math/math_util.h | 10 +- include/math/matrix3x3.h | 67 ++++++---- include/math/vector2d.h | 56 ++++---- include/painter.h | 4 +- include/rtree.h | 4 +- include/tool/action_manager.h | 4 +- include/tool/coroutine.h | 64 ++++----- include/tool/delegate.h | 84 ++++++------ include/tool/examples/coroutine_example.cpp | 53 ++++---- include/tool/examples/delegate_example.cpp | 31 ++--- include/tool/tool_action.h | 16 +-- include/tool/tool_base.h | 12 +- include/tool/tool_dispatcher.h | 11 +- include/tool/tool_event.h | 85 ++++++------ include/tool/tool_interactive.h | 21 +-- include/tool/tool_manager.h | 22 ++-- include/view/view.h | 114 ++++++++-------- include/view/view_controls.h | 4 +- include/view/view_group.h | 7 +- include/view/view_item.h | 10 +- include/view/view_rtree.h | 4 +- include/view/wx_view_controls.h | 8 +- include/worksheet_viewitem.h | 2 +- pcbnew/basepcbframe.cpp | 28 ++-- pcbnew/class_pcb_layer_widget.cpp | 4 +- pcbnew/dialogs/dialog_display_options.cpp | 8 +- pcbnew/dialogs/dialog_general_options.cpp | 8 +- pcbnew/pcb_painter.cpp | 2 +- pcbnew/pcb_painter.h | 4 +- pcbnew/pcbframe.cpp | 8 +- pcbnew/router/direction.h | 1 - pcbnew/router/pns_index.h | 1 - pcbnew/router/pns_item.cpp | 1 - pcbnew/router/pns_item.h | 7 +- pcbnew/router/pns_itemset.cpp | 1 - pcbnew/router/pns_itemset.h | 1 - pcbnew/router/pns_joint.h | 7 +- pcbnew/router/pns_layerset.h | 1 - pcbnew/router/pns_line.cpp | 9 +- pcbnew/router/pns_line.h | 1 - pcbnew/router/pns_line_placer.cpp | 8 +- pcbnew/router/pns_line_placer.h | 1 - pcbnew/router/pns_node.cpp | 18 +-- pcbnew/router/pns_optimizer.cpp | 17 ++- pcbnew/router/pns_optimizer.h | 1 - pcbnew/router/pns_router.cpp | 70 +++++----- pcbnew/router/pns_router.h | 11 +- pcbnew/router/pns_routing_settings.h | 1 - pcbnew/router/pns_segment.h | 1 - pcbnew/router/pns_shove.cpp | 1 - pcbnew/router/pns_shove.h | 1 - pcbnew/router/pns_solid.cpp | 1 - pcbnew/router/pns_solid.h | 1 - pcbnew/router/pns_utils.cpp | 1 - pcbnew/router/pns_utils.h | 1 - pcbnew/router/pns_walkaround.cpp | 13 +- pcbnew/router/pns_walkaround.h | 1 - pcbnew/router/router_preview_item.cpp | 5 +- pcbnew/router/router_preview_item.h | 13 +- pcbnew/router/router_tool.cpp | 2 +- pcbnew/router/router_tool.h | 1 - pcbnew/router/trace.h | 6 +- pcbnew/tools/bright_box.cpp | 11 +- pcbnew/tools/bright_box.h | 4 +- pcbnew/tools/common_actions.cpp | 16 +-- pcbnew/tools/item_state.h | 15 ++- pcbnew/tools/move_tool.cpp | 14 +- pcbnew/tools/move_tool.h | 2 +- pcbnew/tools/pcb_tools.cpp | 21 ++- pcbnew/tools/selection_area.cpp | 13 +- pcbnew/tools/selection_area.h | 8 +- pcbnew/tools/selection_tool.cpp | 36 +++-- pcbnew/tools/selection_tool.h | 4 +- 139 files changed, 1120 insertions(+), 965 deletions(-) diff --git a/CMakeModules/Shaders.cmake b/CMakeModules/Shaders.cmake index 68036f9728..c7f0e570ac 100644 --- a/CMakeModules/Shaders.cmake +++ b/CMakeModules/Shaders.cmake @@ -24,7 +24,8 @@ file( WRITE ${outputFile} "// Do not edit this file, it is autogenerated by CMak #define SHADER_SRC_H const unsigned int shaders_number = ${shadersNumber}; -const char *shaders_src[] = {\n" ) +const char* shaders_src[] = +{\n" ) foreach( inputFile ${inputFiles} ) # put the input file name into the output file diff --git a/common/drawframe.cpp b/common/drawframe.cpp index 691c4acd03..3aabc8bd48 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -231,7 +231,7 @@ void EDA_DRAW_FRAME::OnToggleGridState( wxCommandEvent& aEvent ) if( m_galCanvasActive ) { m_galCanvas->GetGAL()->SetGridVisibility( IsGridVisible() ); - m_galCanvas->GetView()->MarkTargetDirty( KiGfx::TARGET_NONCACHED ); + m_galCanvas->GetView()->MarkTargetDirty( KIGFX::TARGET_NONCACHED ); } m_canvas->Refresh(); @@ -391,7 +391,7 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event ) { m_galCanvas->GetGAL()->SetGridSize( VECTOR2D( screen->GetGrid().m_Size.x, screen->GetGrid().m_Size.y ) ); - m_galCanvas->GetView()->MarkTargetDirty( KiGfx::TARGET_NONCACHED ); + m_galCanvas->GetView()->MarkTargetDirty( KIGFX::TARGET_NONCACHED ); } m_canvas->Refresh(); @@ -425,8 +425,8 @@ void EDA_DRAW_FRAME::OnSelectZoom( wxCommandEvent& event ) if( m_galCanvasActive ) { // Apply computed view settings to GAL - KiGfx::VIEW* view = m_galCanvas->GetView(); - KiGfx::GAL* gal = m_galCanvas->GetGAL(); + KIGFX::VIEW* view = m_galCanvas->GetView(); + KIGFX::GAL* gal = m_galCanvas->GetGAL(); double zoomFactor = gal->GetWorldScale() / gal->GetZoomFactor(); double zoom = 1.0 / ( zoomFactor * GetZoom() ); @@ -954,8 +954,8 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU ) void EDA_DRAW_FRAME::UseGalCanvas( bool aEnable ) { - KiGfx::VIEW* view = m_galCanvas->GetView(); - KiGfx::GAL* gal = m_galCanvas->GetGAL(); + KIGFX::VIEW* view = m_galCanvas->GetView(); + KIGFX::GAL* gal = m_galCanvas->GetGAL(); double zoomFactor = gal->GetWorldScale() / gal->GetZoomFactor(); diff --git a/common/drawpanel_gal.cpp b/common/drawpanel_gal.cpp index ef07cf8b7b..e7471286d6 100644 --- a/common/drawpanel_gal.cpp +++ b/common/drawpanel_gal.cpp @@ -66,13 +66,13 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin m_gal->SetZoomFactor( 1.0 ); m_gal->ComputeWorldScreenMatrix(); - m_painter = new KiGfx::PCB_PAINTER( m_gal ); + m_painter = new KIGFX::PCB_PAINTER( m_gal ); - m_view = new KiGfx::VIEW( true ); + m_view = new KIGFX::VIEW( true ); m_view->SetPainter( m_painter ); m_view->SetGAL( m_gal ); - m_viewControls = new KiGfx::WX_VIEW_CONTROLS( m_view, this ); + m_viewControls = new KIGFX::WX_VIEW_CONTROLS( m_view, this ); Connect( wxEVT_PAINT, wxPaintEventHandler( EDA_DRAW_PANEL_GAL::onPaint ), NULL, this ); Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this ); @@ -90,7 +90,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin Connect( wxEVT_KEY_UP, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_KEY_DOWN, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); Connect( wxEVT_ENTER_WINDOW, wxEventHandler( EDA_DRAW_PANEL_GAL::onEnter ), NULL, this ); - Connect( KiGfx::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE, + Connect( KIGFX::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE, wxEventHandler( EDA_DRAW_PANEL_GAL::onEvent ), NULL, this ); m_refreshTimer.SetOwner( this ); @@ -122,12 +122,12 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) ) m_lastRefresh = wxGetLocalTimeMillis(); m_gal->BeginDrawing(); - m_gal->SetBackgroundColor( KiGfx::COLOR4D( 0.0, 0.0, 0.0, 1.0 ) ); + m_gal->SetBackgroundColor( KIGFX::COLOR4D( 0.0, 0.0, 0.0, 1.0 ) ); m_gal->ClearScreen(); m_view->ClearTargets(); // Grid has to be redrawn only when the NONCACHED target is redrawn - if( m_view->IsTargetDirty( KiGfx::TARGET_NONCACHED ) ) + if( m_view->IsTargetDirty( KIGFX::TARGET_NONCACHED ) ) m_gal->DrawGrid(); m_view->Redraw(); m_gal->DrawCursor( m_viewControls->GetCursorPosition() ); @@ -139,8 +139,8 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) ) void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent ) { m_gal->ResizeScreen( aEvent.GetSize().x, aEvent.GetSize().y ); - m_view->MarkTargetDirty( KiGfx::TARGET_CACHED ); - m_view->MarkTargetDirty( KiGfx::TARGET_NONCACHED ); + m_view->MarkTargetDirty( KIGFX::TARGET_CACHED ); + m_view->MarkTargetDirty( KIGFX::TARGET_NONCACHED ); } @@ -189,11 +189,11 @@ void EDA_DRAW_PANEL_GAL::SwitchBackend( GalType aGalType ) switch( aGalType ) { case GAL_TYPE_OPENGL: - m_gal = new KiGfx::OPENGL_GAL( this, this, this ); + m_gal = new KIGFX::OPENGL_GAL( this, this, this ); break; case GAL_TYPE_CAIRO: - m_gal = new KiGfx::CAIRO_GAL( this, this, this ); + m_gal = new KIGFX::CAIRO_GAL( this, this, this ); break; case GAL_TYPE_NONE: diff --git a/common/gal/cairo/cairo_compositor.cpp b/common/gal/cairo/cairo_compositor.cpp index b700dc6874..67467dae1a 100644 --- a/common/gal/cairo/cairo_compositor.cpp +++ b/common/gal/cairo/cairo_compositor.cpp @@ -31,7 +31,7 @@ #include #include -using namespace KiGfx; +using namespace KIGFX; CAIRO_COMPOSITOR::CAIRO_COMPOSITOR( cairo_t** aMainContext ) : m_current( 0 ), m_currentContext( aMainContext ), m_mainContext( *aMainContext ) @@ -67,6 +67,7 @@ unsigned int CAIRO_COMPOSITOR::CreateBuffer() { // Pixel storage BitmapPtr bitmap( new unsigned int[m_bufferSize] ); + memset( bitmap.get(), 0x00, m_bufferSize * sizeof(int) ); // Create the Cairo surface diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index d66a2cb725..d274d994ff 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -33,10 +33,10 @@ #include -using namespace KiGfx; +using namespace KIGFX; CAIRO_GAL::CAIRO_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, - wxEvtHandler* aPaintListener, const wxString& aName ) : + wxEvtHandler* aPaintListener, const wxString& aName ) : wxWindow( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxEXPAND, aName ) { parentWindow = aParent; @@ -92,6 +92,7 @@ CAIRO_GAL::~CAIRO_GAL() void CAIRO_GAL::BeginDrawing() { initSurface(); + if( !validCompositor ) setCompositor(); @@ -284,6 +285,7 @@ void CAIRO_GAL::ResizeScreen( int aWidth, int aHeight ) if( validCompositor ) compositor->Resize( aWidth, aHeight ); + validCompositor = false; SetSize( wxSize( aWidth, aHeight ) ); @@ -788,6 +790,7 @@ void CAIRO_GAL::ClearTarget( RenderTarget aTarget ) compositor->SetBuffer( overlayBuffer ); break; } + compositor->ClearBuffer(); // Restore the previous state diff --git a/common/gal/color4d.cpp b/common/gal/color4d.cpp index a41d2846c9..3b509d3317 100644 --- a/common/gal/color4d.cpp +++ b/common/gal/color4d.cpp @@ -26,7 +26,7 @@ #include -using namespace KiGfx; +using namespace KIGFX; COLOR4D::COLOR4D( EDA_COLOR_T aColor ) { @@ -85,14 +85,14 @@ void COLOR4D::ToHSV( double& aOutH, double& aOutS, double& aOutV ) const return; } - if( r >= max ) // > is bogus, just keeps compiler happy - aOutH = ( g - b ) / delta; // between yellow & magenta + if( r >= max ) // > is bogus, just keeps compiler happy + aOutH = ( g - b ) / delta; // between yellow & magenta else if( g >= max ) - aOutH = 2.0 + ( b - r ) / delta; // between cyan & yellow + aOutH = 2.0 + ( b - r ) / delta; // between cyan & yellow else - aOutH = 4.0 + ( r - g ) / delta; // between magenta & cyan + aOutH = 4.0 + ( r - g ) / delta; // between magenta & cyan - aOutH *= 60.0; // degrees + aOutH *= 60.0; // degrees if( aOutH < 0.0 ) aOutH += 360.0; @@ -104,7 +104,7 @@ void COLOR4D::FromHSV( double aInH, double aInS, double aInV ) double hh, p, q, t, ff; long i; - if( aInS <= 0.0 ) // < is bogus, just shuts up warnings + if( aInS <= 0.0 ) // < is bogus, just shuts up warnings { r = aInV; g = aInV; @@ -113,8 +113,10 @@ void COLOR4D::FromHSV( double aInH, double aInS, double aInV ) } hh = aInH; + if( hh >= 360.0 ) hh = 0.0; + hh /= 60.0; i = (long) hh; @@ -124,18 +126,20 @@ void COLOR4D::FromHSV( double aInH, double aInS, double aInV ) q = aInV * ( 1.0 - ( aInS * ff ) ); t = aInV * ( 1.0 - ( aInS * ( 1.0 - ff ) ) ); - switch (i) + switch( i ) { case 0: r = aInV; g = t; b = p; break; + case 1: r = q; g = aInV; b = p; break; + case 2: r = p; g = aInV; @@ -147,11 +151,13 @@ void COLOR4D::FromHSV( double aInH, double aInS, double aInV ) g = q; b = aInV; break; + case 4: r = t; g = p; b = aInV; break; + case 5: default: r = aInV; @@ -165,9 +171,9 @@ void COLOR4D::FromHSV( double aInH, double aInS, double aInV ) COLOR4D& COLOR4D::Saturate( double aFactor ) { double h, s, v; + ToHSV( h, s, v ); FromHSV( h, aFactor, 1.0 ); return *this; } - diff --git a/common/gal/graphics_abstraction_layer.cpp b/common/gal/graphics_abstraction_layer.cpp index 70e761f5c9..6fa929b062 100644 --- a/common/gal/graphics_abstraction_layer.cpp +++ b/common/gal/graphics_abstraction_layer.cpp @@ -29,10 +29,10 @@ #include #include -using namespace KiGfx; +using namespace KIGFX; GAL::GAL() : - strokeFont( this ) + strokeFont( this ) { // Set the default values for the internal variables SetIsFill( false ); diff --git a/common/gal/opengl/cached_container.cpp b/common/gal/opengl/cached_container.cpp index d893bbb9cf..b7126d5dff 100644 --- a/common/gal/opengl/cached_container.cpp +++ b/common/gal/opengl/cached_container.cpp @@ -39,7 +39,7 @@ #include #endif /* __WXDEBUG__ */ -using namespace KiGfx; +using namespace KIGFX; CACHED_CONTAINER::CACHED_CONTAINER( unsigned int aSize ) : VERTEX_CONTAINER( aSize ), m_item( NULL ) @@ -88,7 +88,7 @@ void CACHED_CONTAINER::FinishItem() #if CACHED_CONTAINER_TEST > 1 wxLogDebug( wxT( "Finishing item 0x%08lx (size %d)" ), (long) m_item, m_itemSize ); test(); - m_item = NULL; // electric fence + m_item = NULL; // electric fence #endif } @@ -157,6 +157,7 @@ void CACHED_CONTAINER::Delete( VERTEX_ITEM* aItem ) // Indicate that the item is not stored in the container anymore aItem->setSize( 0 ); } + m_items.erase( aItem ); #if CACHED_CONTAINER_TEST > 1 @@ -371,6 +372,7 @@ void CACHED_CONTAINER::mergeFreeChunks() std::list freeChunks; FreeChunkMap::const_iterator it, it_end; + for( it = m_freeChunks.begin(), it_end = m_freeChunks.end(); it != it_end; ++it ) { freeChunks.push_back( std::make_pair( it->second, it->first ) ); @@ -527,6 +529,7 @@ void CACHED_CONTAINER::test() // Free space check unsigned int freeSpace = 0; FreeChunkMap::iterator itf; + for( itf = m_freeChunks.begin(); itf != m_freeChunks.end(); ++itf ) freeSpace += getChunkSize( *itf ); @@ -543,4 +546,5 @@ void CACHED_CONTAINER::test() // Overlapping check TBD } + #endif /* CACHED_CONTAINER_TEST */ diff --git a/common/gal/opengl/gpu_manager.cpp b/common/gal/opengl/gpu_manager.cpp index d5d263a930..98259db78e 100644 --- a/common/gal/opengl/gpu_manager.cpp +++ b/common/gal/opengl/gpu_manager.cpp @@ -37,7 +37,7 @@ #include #endif -using namespace KiGfx; +using namespace KIGFX; GPU_MANAGER* GPU_MANAGER::MakeManager( VERTEX_CONTAINER* aContainer ) { diff --git a/common/gal/opengl/noncached_container.cpp b/common/gal/opengl/noncached_container.cpp index 9c2ab066f8..c902c4725d 100644 --- a/common/gal/opengl/noncached_container.cpp +++ b/common/gal/opengl/noncached_container.cpp @@ -31,7 +31,7 @@ #include #include -using namespace KiGfx; +using namespace KIGFX; NONCACHED_CONTAINER::NONCACHED_CONTAINER( unsigned int aSize ) : VERTEX_CONTAINER( aSize ), m_freePtr( 0 ) diff --git a/common/gal/opengl/opengl_compositor.cpp b/common/gal/opengl/opengl_compositor.cpp index 0dd5697191..b543dc017f 100644 --- a/common/gal/opengl/opengl_compositor.cpp +++ b/common/gal/opengl/opengl_compositor.cpp @@ -31,7 +31,7 @@ #include #include -using namespace KiGfx; +using namespace KIGFX; OPENGL_COMPOSITOR::OPENGL_COMPOSITOR() : m_initialized( false ), m_current( 0 ) @@ -95,12 +95,12 @@ unsigned int OPENGL_COMPOSITOR::CreateBuffer() { wxASSERT( m_initialized ); - //if( usedBuffers() >= m_maxBuffers ) + if( usedBuffers() >= m_maxBuffers ) { wxLogError( wxT( "Cannot create more framebuffers. OpenGL rendering backend requires at" "least 3 framebuffers. You may try to update/change " "your graphic drivers." ) ); - return 0; // Unfortunately we have no more free buffers left + return 0; // Unfortunately we have no more free buffers left } // GL_COLOR_ATTACHMENTn are consecutive integers @@ -145,7 +145,7 @@ unsigned int OPENGL_COMPOSITOR::CreateBuffer() case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER: wxLogFatalError( wxT( "The framebuffer does not have at least " - "one image attached to it." ) ); + "one image attached to it." ) ); break; case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER: @@ -225,6 +225,7 @@ void OPENGL_COMPOSITOR::ClearBuffer() void OPENGL_COMPOSITOR::DrawBuffer( unsigned int aBufferHandle ) { wxASSERT( m_initialized ); + if( aBufferHandle == 0 || aBufferHandle > usedBuffers() ) { wxLogError( wxT( "Wrong framebuffer handle" ) ); @@ -281,6 +282,7 @@ void OPENGL_COMPOSITOR::clean() glDeleteRenderbuffers( 1, &m_depthBuffer ); OPENGL_BUFFERS::const_iterator it; + for( it = m_buffers.begin(); it != m_buffers.end(); ++it ) { glDeleteTextures( 1, &it->textureTarget ); diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 623a222f76..e40ace14a6 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -37,7 +37,7 @@ #include -using namespace KiGfx; +using namespace KIGFX; // Prototypes void InitTesselatorCallbacks( GLUtesselator* aTesselator ); @@ -90,10 +90,12 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, // Tesselator initialization tesselator = gluNewTess(); InitTesselatorCallbacks( tesselator ); + if( tesselator == NULL ) { wxLogFatalError( wxT( "Could not create the tesselator" ) ); } + gluTessProperty( tesselator, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_POSITIVE ); } @@ -367,7 +369,8 @@ void OPENGL_GAL::DrawArc( const VECTOR2D& aCenterPoint, double aRadius, double a currentManager->Color( strokeColor.r, strokeColor.g, strokeColor.b, strokeColor.a ); VECTOR2D p( cos( aStartAngle ) * aRadius, sin( aStartAngle ) * aRadius ); - double alpha; + double alpha; + for( alpha = aStartAngle + alphaIncrement; alpha < aEndAngle; alpha += alphaIncrement ) { VECTOR2D p_next( cos( alpha ) * aRadius, sin( alpha ) * aRadius ); @@ -570,7 +573,7 @@ void OPENGL_GAL::ClearScreen() void OPENGL_GAL::SetStrokeColor( const COLOR4D& aColor ) { - strokeColor = aColor; + strokeColor = aColor; // This is the default drawing color currentManager->Color( aColor.r, aColor.g, aColor.b, aColor.a ); @@ -734,6 +737,7 @@ void OPENGL_GAL::ClearTarget( RenderTarget aTarget ) compositor.SetBuffer( overlayBuffer ); break; } + compositor.ClearBuffer(); // Restore the previous state diff --git a/common/gal/opengl/shader.cpp b/common/gal/opengl/shader.cpp index 5fbd8378da..e44dab4926 100644 --- a/common/gal/opengl/shader.cpp +++ b/common/gal/opengl/shader.cpp @@ -34,7 +34,7 @@ #include #include "shader_src.h" -using namespace KiGfx; +using namespace KIGFX; SHADER::SHADER() : isProgramCreated( false ), @@ -101,17 +101,19 @@ bool SHADER::Link() (GLint*) &isShaderLinked ); #ifdef __WXDEBUG__ + if( !isShaderLinked ) { int maxLength; glGetProgramiv( programNumber, GL_INFO_LOG_LENGTH, &maxLength ); maxLength = maxLength + 1; - char *linkInfoLog = new char[maxLength]; + char* linkInfoLog = new char[maxLength]; glGetProgramInfoLog( programNumber, maxLength, &maxLength, linkInfoLog ); std::cerr << "Shader linking error:" << std::endl; std::cerr << linkInfoLog; delete[] linkInfoLog; } + #endif /* __WXDEBUG__ */ return isShaderLinked; diff --git a/common/gal/opengl/shader.frag b/common/gal/opengl/shader.frag index a4cba0ebed..09db9ecef2 100644 --- a/common/gal/opengl/shader.frag +++ b/common/gal/opengl/shader.frag @@ -73,4 +73,3 @@ void main() gl_FragColor = gl_Color; } } - diff --git a/common/gal/opengl/shader.vert b/common/gal/opengl/shader.vert index f5777408a8..82517d5e43 100644 --- a/common/gal/opengl/shader.vert +++ b/common/gal/opengl/shader.vert @@ -96,4 +96,3 @@ void main() gl_FrontColor = gl_Color; } - diff --git a/common/gal/opengl/vertex_container.cpp b/common/gal/opengl/vertex_container.cpp index 02de36e4df..82658e11ae 100644 --- a/common/gal/opengl/vertex_container.cpp +++ b/common/gal/opengl/vertex_container.cpp @@ -33,7 +33,7 @@ #include #include -using namespace KiGfx; +using namespace KIGFX; VERTEX_CONTAINER* VERTEX_CONTAINER::MakeContainer( bool aCached ) { diff --git a/common/gal/opengl/vertex_item.cpp b/common/gal/opengl/vertex_item.cpp index f5cddc6661..a6fd352766 100644 --- a/common/gal/opengl/vertex_item.cpp +++ b/common/gal/opengl/vertex_item.cpp @@ -31,7 +31,7 @@ #include #include -using namespace KiGfx; +using namespace KIGFX; VERTEX_ITEM::VERTEX_ITEM( const VERTEX_MANAGER& aManager ) : m_manager( aManager ), m_offset( 0 ), m_size( 0 ) diff --git a/common/gal/opengl/vertex_manager.cpp b/common/gal/opengl/vertex_manager.cpp index 65a80826f7..78179c8200 100644 --- a/common/gal/opengl/vertex_manager.cpp +++ b/common/gal/opengl/vertex_manager.cpp @@ -34,7 +34,7 @@ #include #include -using namespace KiGfx; +using namespace KIGFX; VERTEX_MANAGER::VERTEX_MANAGER( bool aCached ) : m_noTransform( true ), m_transform( 1.0f ) @@ -106,6 +106,7 @@ void VERTEX_MANAGER::ChangeItemColor( const VERTEX_ITEM& aItem, const COLOR4D& a unsigned int offset = aItem.GetOffset(); VERTEX* vertex = m_container->GetVertices( offset ); + for( unsigned int i = 0; i < size; ++i ) { vertex->r = aColor.r * 255.0; @@ -125,6 +126,7 @@ void VERTEX_MANAGER::ChangeItemDepth( const VERTEX_ITEM& aItem, GLfloat aDepth ) unsigned int offset = aItem.GetOffset(); VERTEX* vertex = m_container->GetVertices( offset ); + for( unsigned int i = 0; i < size; ++i ) { vertex->z = aDepth; diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp index 242a9f7125..df449c616a 100644 --- a/common/gal/stroke_font.cpp +++ b/common/gal/stroke_font.cpp @@ -27,7 +27,7 @@ #include #include -using namespace KiGfx; +using namespace KIGFX; const double STROKE_FONT::LINE_HEIGHT_RATIO = 1.6; @@ -177,11 +177,13 @@ void STROKE_FONT::Draw( std::string aText, const VECTOR2D& aPosition, double aRo case GR_TEXT_HJUSTIFY_RIGHT: if( !m_mirrored ) m_gal->Translate( VECTOR2D( -textsize.x, 0 ) ); + break; case GR_TEXT_HJUSTIFY_LEFT: if( m_mirrored ) m_gal->Translate( VECTOR2D( -textsize.x, 0 ) ); + break; default: diff --git a/common/geometry/seg.cpp b/common/geometry/seg.cpp index 765652e64e..4668899e8d 100644 --- a/common/geometry/seg.cpp +++ b/common/geometry/seg.cpp @@ -25,7 +25,9 @@ #include -template int sgn( T val ) { +template +int sgn( T val ) +{ return ( T( 0 ) < val ) - ( val < T( 0 ) ); } @@ -64,8 +66,8 @@ bool SEG::PointCloserThan( const VECTOR2I& aP, int dist ) const } VECTOR2I nearest; - nearest.x = a.x + rescale( t, (ecoord)d.x, l_squared ); - nearest.y = a.y + rescale( t, (ecoord)d.y, l_squared ); + nearest.x = a.x + rescale( t, (ecoord) d.x, l_squared ); + nearest.y = a.y + rescale( t, (ecoord) d.y, l_squared ); return ( nearest - aP ).SquaredEuclideanNorm() <= dist_sq; } @@ -86,6 +88,7 @@ SEG::ecoord SEG::SquaredDistance( const SEG& aSeg ) const }; ecoord m = VECTOR2I::ECOORD_MAX; + for( int i = 0; i < 4; i++ ) m = std::min( m, pts[i].SquaredEuclideanNorm() ); @@ -95,9 +98,9 @@ SEG::ecoord SEG::SquaredDistance( const SEG& aSeg ) const OPT_VECTOR2I SEG::Intersect( const SEG& aSeg, bool aIgnoreEndpoints, bool aLines ) const { - const VECTOR2I e ( b - a ); - const VECTOR2I f ( aSeg.b - aSeg.a ); - const VECTOR2I ac ( aSeg.a - a ); + const VECTOR2I e( b - a ); + const VECTOR2I f( aSeg.b - aSeg.a ); + const VECTOR2I ac( aSeg.a - a ); ecoord d = f.Cross( e ); ecoord p = f.Cross( ac ); @@ -105,15 +108,18 @@ OPT_VECTOR2I SEG::Intersect( const SEG& aSeg, bool aIgnoreEndpoints, bool aLines if( d == 0 ) return OPT_VECTOR2I(); - if ( !aLines && d > 0 && ( q < 0 || q > d || p < 0 || p > d ) ) - return OPT_VECTOR2I(); - if ( !aLines && d < 0 && ( q < d || p < d || p > 0 || q > 0 ) ) - return OPT_VECTOR2I(); - if ( !aLines && aIgnoreEndpoints && ( q == 0 || q == d ) && ( p == 0 || p == d ) ) + + if( !aLines && d > 0 && ( q < 0 || q > d || p < 0 || p > d ) ) return OPT_VECTOR2I(); - VECTOR2I ip( aSeg.a.x + rescale( q, (ecoord)f.x, d ), - aSeg.a.y + rescale( q, (ecoord)f.y, d ) ); + if( !aLines && d < 0 && ( q < d || p < d || p > 0 || q > 0 ) ) + return OPT_VECTOR2I(); + + if( !aLines && aIgnoreEndpoints && ( q == 0 || q == d ) && ( p == 0 || p == d ) ) + return OPT_VECTOR2I(); + + VECTOR2I ip( aSeg.a.x + rescale( q, (ecoord) f.x, d ), + aSeg.a.y + rescale( q, (ecoord) f.y, d ) ); return ip; } @@ -121,7 +127,7 @@ OPT_VECTOR2I SEG::Intersect( const SEG& aSeg, bool aIgnoreEndpoints, bool aLines bool SEG::ccw( const VECTOR2I& a, const VECTOR2I& b, const VECTOR2I& c ) const { - return (ecoord)( c.y - a.y ) * ( b.x - a.x ) > (ecoord)( b.y - a.y ) * ( c.x - a.x ); + return (ecoord) ( c.y - a.y ) * ( b.x - a.x ) > (ecoord) ( b.y - a.y ) * ( c.x - a.x ); } @@ -133,8 +139,8 @@ bool SEG::Collide( const SEG& aSeg, int aClearance ) const ccw( a, b, aSeg.a ) != ccw( a, b, aSeg.b ) ) return true; -#define CHK(_seg, _pt) \ - if( (_seg).PointCloserThan (_pt, aClearance ) ) return true; +#define CHK( _seg, _pt ) \ + if( (_seg).PointCloserThan( _pt, aClearance ) ) return true; CHK( *this, aSeg.a ); CHK( *this, aSeg.b ); diff --git a/common/geometry/shape_collisions.cpp b/common/geometry/shape_collisions.cpp index 4fbdcf79db..ea6d856615 100644 --- a/common/geometry/shape_collisions.cpp +++ b/common/geometry/shape_collisions.cpp @@ -41,11 +41,11 @@ static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_CIRCLE& aB, int ecoord dist_sq = delta.SquaredEuclideanNorm(); - if ( dist_sq >= min_dist_sq ) + if( dist_sq >= min_dist_sq ) return false; - if ( aNeedMTV ) - aMTV = delta.Resize( sqrt ( abs( min_dist_sq - dist_sq ) ) + 1 ); + if( aNeedMTV ) + aMTV = delta.Resize( sqrt( abs( min_dist_sq - dist_sq ) ) + 1 ); return true; } @@ -60,28 +60,29 @@ static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_CIRCLE& aB, int a const ecoord min_dist = aClearance + r; const ecoord min_dist_sq = min_dist * min_dist; - if ( aA.BBox( 0 ).Contains( c ) ) + if( aA.BBox( 0 ).Contains( c ) ) return true; - const VECTOR2I vts[] = { - VECTOR2I(p0.x, p0.y), - VECTOR2I(p0.x, p0.y + size.y), - VECTOR2I(p0.x + size.x, p0.y + size.y), - VECTOR2I(p0.x + size.x, p0.y), - VECTOR2I(p0.x, p0.y) }; + const VECTOR2I vts[] = + { + VECTOR2I( p0.x, p0.y ), + VECTOR2I( p0.x, p0.y + size.y ), + VECTOR2I( p0.x + size.x, p0.y + size.y ), + VECTOR2I( p0.x + size.x, p0.y ), + VECTOR2I( p0.x, p0.y ) + }; ecoord nearest_seg_dist_sq = VECTOR2I::ECOORD_MAX; VECTOR2I nearest; - bool inside = c.x >= p0.x && c.x <= ( p0.x + size.x ) - && c.y >= p0.y && c.y <= ( p0.y + size.y ); + bool inside = c.x >= p0.x && c.x <= ( p0.x + size.x ) + && c.y >= p0.y && c.y <= ( p0.y + size.y ); if( !inside ) { - for( int i = 0; i < 4; i++ ) { - const SEG seg( vts[i], vts[i+1] ); + const SEG seg( vts[i], vts[i + 1] ); ecoord dist_sq = seg.SquaredDistance( c ); if( dist_sq < min_dist_sq ) @@ -119,7 +120,7 @@ static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_LINE_CHAIN& aB, { for( int s = 0; s < aB.SegmentCount(); s++ ) { - if ( aA.Collide( aB.CSegment( s ), aClearance ) ) + if( aA.Collide( aB.CSegment( s ), aClearance ) ) return true; } @@ -131,8 +132,9 @@ static inline bool Collide( const SHAPE_LINE_CHAIN& aA, const SHAPE_LINE_CHAIN& bool aNeedMTV, VECTOR2I& aMTV ) { for( int i = 0; i < aB.SegmentCount(); i++ ) - if( aA.Collide( aB.CSegment(i), aClearance ) ) + if( aA.Collide( aB.CSegment( i ), aClearance ) ) return true; + return false; } @@ -143,8 +145,9 @@ static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_LINE_CHAIN& aB, in for( int s = 0; s < aB.SegmentCount(); s++ ) { SEG seg = aB.CSegment( s ); - if( aA.Collide( seg, aClearance ) ) - return true; + + if( aA.Collide( seg, aClearance ) ) + return true; } return false; @@ -222,12 +225,13 @@ bool CollideShapes( const SHAPE* aA, const SHAPE* aB, int aClearance, bool aNeed bool SHAPE::Collide( const SHAPE* aShape, int aClerance, VECTOR2I& aMTV ) const { - return CollideShapes( this, aShape, aClerance, true, aMTV); + return CollideShapes( this, aShape, aClerance, true, aMTV ); } -bool SHAPE::Collide ( const SHAPE* aShape, int aClerance ) const +bool SHAPE::Collide( const SHAPE* aShape, int aClerance ) const { VECTOR2I dummy; + return CollideShapes( this, aShape, aClerance, false, dummy ); } diff --git a/common/geometry/shape_line_chain.cpp b/common/geometry/shape_line_chain.cpp index 15b5f208c7..2587c3f14d 100644 --- a/common/geometry/shape_line_chain.cpp +++ b/common/geometry/shape_line_chain.cpp @@ -47,12 +47,12 @@ bool SHAPE_LINE_CHAIN::Collide( const SEG& aSeg, int aClearance ) const BOX2I box_a( aSeg.a, aSeg.b - aSeg.a ); BOX2I::ecoord_type dist_sq = (BOX2I::ecoord_type) aClearance * aClearance; - for( int i = 0; i < SegmentCount() ;i++ ) + for( int i = 0; i < SegmentCount(); i++ ) { const SEG& s = CSegment( i ); BOX2I box_b( s.a, s.b - s.a ); - BOX2I::ecoord_type d = box_a.SquaredDistance ( box_b ); + BOX2I::ecoord_type d = box_a.SquaredDistance( box_b ); if( d < dist_sq ) { @@ -64,9 +64,11 @@ bool SHAPE_LINE_CHAIN::Collide( const SEG& aSeg, int aClearance ) const return false; } + const SHAPE_LINE_CHAIN SHAPE_LINE_CHAIN::Reverse() const { SHAPE_LINE_CHAIN a( *this ); + reverse( a.m_points.begin(), a.m_points.end() ); a.m_closed = m_closed; @@ -77,6 +79,7 @@ const SHAPE_LINE_CHAIN SHAPE_LINE_CHAIN::Reverse() const int SHAPE_LINE_CHAIN::Length() const { int l = 0; + for( int i = 0; i < SegmentCount(); i++ ) l += CSegment( i ).Length(); @@ -88,11 +91,12 @@ void SHAPE_LINE_CHAIN::Replace( int aStartIndex, int aEndIndex, const VECTOR2I& { if( aEndIndex < 0 ) aEndIndex += PointCount(); + if( aStartIndex < 0 ) aStartIndex += PointCount(); if( aStartIndex == aEndIndex ) - m_points [aStartIndex] = aP; + m_points[aStartIndex] = aP; else { m_points.erase( m_points.begin() + aStartIndex + 1, m_points.begin() + aEndIndex + 1 ); @@ -105,6 +109,7 @@ void SHAPE_LINE_CHAIN::Replace( int aStartIndex, int aEndIndex, const SHAPE_LINE { if( aEndIndex < 0 ) aEndIndex += PointCount(); + if( aStartIndex < 0 ) aStartIndex += PointCount(); @@ -115,9 +120,10 @@ void SHAPE_LINE_CHAIN::Replace( int aStartIndex, int aEndIndex, const SHAPE_LINE void SHAPE_LINE_CHAIN::Remove( int aStartIndex, int aEndIndex ) { - if(aEndIndex < 0) + if( aEndIndex < 0 ) aEndIndex += PointCount(); - if(aStartIndex < 0) + + if( aStartIndex < 0 ) aStartIndex += PointCount(); m_points.erase( m_points.begin() + aStartIndex, m_points.begin() + aEndIndex + 1 ); @@ -127,6 +133,7 @@ void SHAPE_LINE_CHAIN::Remove( int aStartIndex, int aEndIndex ) int SHAPE_LINE_CHAIN::Distance( const VECTOR2I& aP ) const { int d = INT_MAX; + for( int s = 0; s < SegmentCount(); s++ ) d = min( d, CSegment( s ).Distance( aP ) ); @@ -185,6 +192,7 @@ const SHAPE_LINE_CHAIN SHAPE_LINE_CHAIN::Slice( int aStartIndex, int aEndIndex ) if( aEndIndex < 0 ) aEndIndex += PointCount(); + if( aStartIndex < 0 ) aStartIndex += PointCount(); @@ -197,7 +205,7 @@ const SHAPE_LINE_CHAIN SHAPE_LINE_CHAIN::Slice( int aStartIndex, int aEndIndex ) struct compareOriginDistance { - compareOriginDistance( VECTOR2I& aOrigin ): + compareOriginDistance( VECTOR2I& aOrigin ) : m_origin( aOrigin ) {}; bool operator()( const SHAPE_LINE_CHAIN::Intersection& aA, @@ -215,6 +223,7 @@ int SHAPE_LINE_CHAIN::Intersect( const SEG& aSeg, Intersections& aIp ) const for( int s = 0; s < SegmentCount(); s++ ) { OPT_VECTOR2I p = CSegment( s ).Intersect( aSeg ); + if( p ) { Intersection is; @@ -236,7 +245,7 @@ int SHAPE_LINE_CHAIN::Intersect( const SHAPE_LINE_CHAIN& aChain, Intersections& { BOX2I bb_other = aChain.BBox(); - for ( int s1 = 0; s1 < SegmentCount(); s1++ ) + for( int s1 = 0; s1 < SegmentCount(); s1++ ) { const SEG& a = CSegment( s1 ); const BOX2I bb_cur( a.a, a.b - a.a ); @@ -305,7 +314,6 @@ int SHAPE_LINE_CHAIN::Intersect( const SHAPE_LINE_CHAIN& aChain, Intersections& is.their = b; aIp.push_back( is ); } - } } } @@ -317,6 +325,7 @@ int SHAPE_LINE_CHAIN::Intersect( const SHAPE_LINE_CHAIN& aChain, Intersections& int SHAPE_LINE_CHAIN::PathLength( const VECTOR2I& aP ) const { int sum = 0; + for( int i = 0; i < SegmentCount(); i++ ) { const SEG seg = CSegment( i ); @@ -340,7 +349,7 @@ bool SHAPE_LINE_CHAIN::PointInside( const VECTOR2I& aP ) const if( !m_closed || SegmentCount() < 3 ) return false; - int cur = CSegment(0).Side( aP ); + int cur = CSegment( 0 ).Side( aP ); if( cur == 0 ) return false; @@ -352,7 +361,7 @@ bool SHAPE_LINE_CHAIN::PointInside( const VECTOR2I& aP ) const if( aP == s.a || aP == s.b ) // edge does not belong to the interior! return false; - if( s.Side(aP) != cur ) + if( s.Side( aP ) != cur ) return false; } @@ -372,7 +381,7 @@ bool SHAPE_LINE_CHAIN::PointOnEdge( const VECTOR2I& aP ) const if( s.a == aP || s.b == aP ) return true; - if( s.Distance(aP) <= 1 ) + if( s.Distance( aP ) <= 1 ) return true; } @@ -387,6 +396,7 @@ const optional SHAPE_LINE_CHAIN::SelfIntersectin for( int s2 = s1 + 1; s2 < SegmentCount(); s2++ ) { const VECTOR2I s2a = CSegment( s2 ).a, s2b = CSegment( s2 ).b; + if( s1 + 1 != s2 && CSegment( s1 ).Contains( s2a ) ) { Intersection is; @@ -395,7 +405,7 @@ const optional SHAPE_LINE_CHAIN::SelfIntersectin is.p = s2a; return is; } - else if( CSegment( s1 ).Contains(s2b ) ) + else if( CSegment( s1 ).Contains( s2b ) ) { Intersection is; is.our = CSegment( s1 ); @@ -443,10 +453,11 @@ SHAPE_LINE_CHAIN& SHAPE_LINE_CHAIN::Simplify() int np = PointCount(); // stage 1: eliminate duplicate vertices - while ( i < np ) + while( i < np ) { int j = i + 1; - while( j < np && CPoint(i) == CPoint( j ) ) + + while( j < np && CPoint( i ) == CPoint( j ) ) j++; pts_unique.push_back( CPoint( i ) ); @@ -457,17 +468,19 @@ SHAPE_LINE_CHAIN& SHAPE_LINE_CHAIN::Simplify() np = pts_unique.size(); i = 0; + // stage 1: eliminate collinear segments while( i < np - 2 ) { const VECTOR2I p0 = pts_unique[i]; - const VECTOR2I p1 = pts_unique[i+1]; + const VECTOR2I p1 = pts_unique[i + 1]; int n = i; while( n < np - 2 && SEG( p0, p1 ).LineDistance( pts_unique[n + 2] ) <= 1 ) n++; m_points.push_back( p0 ); + if( n > i ) i = n; @@ -493,9 +506,11 @@ const VECTOR2I SHAPE_LINE_CHAIN::NearestPoint( const VECTOR2I& aP ) const { int min_d = INT_MAX; int nearest = 0; - for ( int i = 0; i < SegmentCount(); i++ ) + + for( int i = 0; i < SegmentCount(); i++ ) { int d = CSegment( i ).Distance( aP ); + if( d < min_d ) { min_d = d; @@ -511,10 +526,10 @@ const string SHAPE_LINE_CHAIN::Format() const { stringstream ss; - ss << m_points.size() << " " << ( m_closed ? 1 : 0 ) << " " ; + ss << m_points.size() << " " << ( m_closed ? 1 : 0 ) << " "; for( int i = 0; i < PointCount(); i++ ) - ss << m_points[i].x << " " << m_points[i].y << " ";// Format() << " "; + ss << m_points[i].x << " " << m_points[i].y << " "; // Format() << " "; return ss.str(); } diff --git a/common/math/math_util.cpp b/common/math/math_util.cpp index f796efc1e1..c8d462b0b0 100644 --- a/common/math/math_util.cpp +++ b/common/math/math_util.cpp @@ -28,16 +28,18 @@ #include #include -template<> int rescale( int numerator, int value, int denominator ) +template<> +int rescale( int numerator, int value, int denominator ) { return (int) ( (int64_t) numerator * (int64_t) value / (int64_t) denominator ); } -template<> int64_t rescale( int64_t numerator, int64_t value, int64_t denominator ) +template<> +int64_t rescale( int64_t numerator, int64_t value, int64_t denominator ) { int64_t r = 0; - int64_t sign = ( ( numerator < 0) ? -1 : 1 ) * ( denominator < 0 ? - 1: 1 ) * (value < 0 ? - 1 : 1); + int64_t sign = ( ( numerator < 0) ? -1 : 1 ) * ( denominator < 0 ? -1 : 1 ) * ( value < 0 ? -1 : 1 ); int64_t a = std::abs( numerator ); int64_t b = std::abs( value ); @@ -51,7 +53,9 @@ template<> int64_t rescale( int64_t numerator, int64_t value, int64_t denominato return sign * ( (a * b + r ) / c ); else return sign * (a / c * b + (a % c * b + r) / c); - } else { + } + else + { uint64_t a0 = a & 0xFFFFFFFF; uint64_t a1 = a >> 32; uint64_t b0 = b & 0xFFFFFFFF; @@ -61,16 +65,16 @@ template<> int64_t rescale( int64_t numerator, int64_t value, int64_t denominato int i; a0 = a0 * b0 + t1a; - a1 = a1 * b1 + (t1 >> 32) + (a0 < t1a); + a1 = a1 * b1 + ( t1 >> 32 ) + ( a0 < t1a ); a0 += r; - a1 += ((uint64_t)a0) < r; + a1 += ( (uint64_t) a0 ) < r; for( i = 63; i >= 0; i-- ) { - a1 += a1 + ( (a0 >> i) & 1 ); + a1 += a1 + ( ( a0 >> i ) & 1 ); t1 += t1; - if( (uint64_t)c <= a1 ) + if( (uint64_t) c <= a1 ) { a1 -= c; t1++; diff --git a/common/painter.cpp b/common/painter.cpp index b6181c4210..7828623377 100644 --- a/common/painter.cpp +++ b/common/painter.cpp @@ -27,7 +27,7 @@ #include #include -using namespace KiGfx; +using namespace KIGFX; RENDER_SETTINGS::RENDER_SETTINGS() { diff --git a/common/tool/action_manager.cpp b/common/tool/action_manager.cpp index 5828d03247..be90ef055f 100644 --- a/common/tool/action_manager.cpp +++ b/common/tool/action_manager.cpp @@ -36,7 +36,7 @@ ACTION_MANAGER::ACTION_MANAGER( TOOL_MANAGER* aToolManager ) : void ACTION_MANAGER::RegisterAction( TOOL_ACTION* aAction ) { - assert( aAction->GetId() == -1 ); // Check if the TOOL_ACTION was not registered before + assert( aAction->GetId() == -1 ); // Check if the TOOL_ACTION was not registered before aAction->setId( MakeActionId( aAction->m_name ) ); @@ -67,6 +67,7 @@ void ACTION_MANAGER::UnregisterAction( TOOL_ACTION* aAction ) int ACTION_MANAGER::MakeActionId( const std::string& aActionName ) { static int currentActionId = 1; + return currentActionId++; } @@ -76,7 +77,7 @@ bool ACTION_MANAGER::RunAction( const std::string& aActionName ) const std::map::const_iterator it = m_actionNameIndex.find( aActionName ); if( it == m_actionNameIndex.end() ) - return false; // no action with given name found + return false; // no action with given name found runAction( it->second ); @@ -89,7 +90,7 @@ bool ACTION_MANAGER::RunHotKey( int aHotKey ) const std::map::const_iterator it = m_actionHotKeys.find( aHotKey ); if( it == m_actionHotKeys.end() ) - return false; // no appropriate action found for the hotkey + return false; // no appropriate action found for the hotkey runAction( it->second ); diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index 54f395cd9c..9ea4770eed 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -88,6 +88,7 @@ void CONTEXT_MENU::SetTitle( const wxString& aTitle ) void CONTEXT_MENU::Add( const wxString& aLabel, int aId ) { #ifdef DEBUG + if( m_menu.FindItem( aId ) != NULL ) wxLogWarning( wxT( "Adding more than one menu entry with the same ID may result in" "undefined behaviour" ) ); @@ -135,13 +136,15 @@ std::string CONTEXT_MENU::getHotKeyDescription( const TOOL_ACTION& aAction ) con if( hotkey & MD_ModAlt ) description += "ALT+"; + if( hotkey & MD_ModCtrl ) description += "CTRL+"; + if( hotkey & MD_ModShift ) description += "SHIFT+"; // TODO dispatch keys such as Fx, TAB, PG_UP/DN, HOME, END, etc. - description += char( hotkey & ~MD_ModifierMask ); + description += char(hotkey & ~MD_ModifierMask); return description; } diff --git a/common/tool/tool_base.cpp b/common/tool/tool_base.cpp index 2124559a7b..0134fcb6e5 100644 --- a/common/tool/tool_base.cpp +++ b/common/tool/tool_base.cpp @@ -25,13 +25,13 @@ #include #include -KiGfx::VIEW* TOOL_BASE::getView() const +KIGFX::VIEW* TOOL_BASE::getView() const { return m_toolMgr->GetView(); } -KiGfx::VIEW_CONTROLS* TOOL_BASE::getViewControls() const +KIGFX::VIEW_CONTROLS* TOOL_BASE::getViewControls() const { return m_toolMgr->GetViewControls(); } diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index cf580ebb06..d9e8744283 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -111,7 +111,7 @@ void TOOL_DISPATCHER::ResetState() } -KiGfx::VIEW* TOOL_DISPATCHER::getView() +KIGFX::VIEW* TOOL_DISPATCHER::getView() { return m_editFrame->GetGalCanvas()->GetView(); } @@ -139,7 +139,7 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti st->pressed = true; evt = TOOL_EVENT( TC_Mouse, TA_MouseDown, args ); } - else if( up ) // Handle mouse button release + else if( up ) // Handle mouse button release { st->pressed = false; @@ -166,7 +166,8 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti if( st->pressed && aMotion ) { st->dragging = true; - double dragPixelDistance = getView()->ToScreen( m_lastMousePos - st->dragOrigin, false ).EuclideanNorm(); + double dragPixelDistance = + getView()->ToScreen( m_lastMousePos - st->dragOrigin, false ).EuclideanNorm(); st->dragMaxDelta = std::max( st->dragMaxDelta, dragPixelDistance ); wxLongLong t = wxGetLocalTimeMillis(); @@ -200,17 +201,17 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) // Mouse handling if( type == wxEVT_MOTION || type == wxEVT_MOUSEWHEEL || - type == wxEVT_LEFT_DOWN || type == wxEVT_LEFT_UP || - type == wxEVT_MIDDLE_DOWN || type == wxEVT_MIDDLE_UP || - type == wxEVT_RIGHT_DOWN || type == wxEVT_RIGHT_UP || - // Event issued whem mouse retains position in screen coordinates, - // but changes in world coordinates (eg. autopanning) - type == KiGfx::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE ) + type == wxEVT_LEFT_DOWN || type == wxEVT_LEFT_UP || + type == wxEVT_MIDDLE_DOWN || type == wxEVT_MIDDLE_UP || + type == wxEVT_RIGHT_DOWN || type == wxEVT_RIGHT_UP || + // Event issued whem mouse retains position in screen coordinates, + // but changes in world coordinates (eg. autopanning) + type == KIGFX::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE ) { VECTOR2D screenPos = m_toolMgr->GetViewControls()->GetCursorPosition(); VECTOR2D pos = getView()->ToWorld( screenPos ); - if( pos != m_lastMousePos || type == KiGfx::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE ) + if( pos != m_lastMousePos || type == KIGFX::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE ) { motion = true; m_lastMousePos = pos; @@ -235,7 +236,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) if( type == wxEVT_KEY_UP ) { - if( key == WXK_ESCAPE ) // ESC is the special key for cancelling tools + if( key == WXK_ESCAPE ) // ESC is the special key for cancelling tools evt = TOOL_EVENT( TC_Command, TA_CancelTool ); else evt = TOOL_EVENT( TC_Keyboard, TA_KeyUp, key | mods ); @@ -262,14 +263,15 @@ void TOOL_DISPATCHER::DispatchWxCommand( const wxCommandEvent& aEvent ) // fixme: use TOOL_ACTIONs here switch( aEvent.GetId() ) { - case ID_PNS_ROUTER_TOOL: - toolName = "pcbnew.InteractiveRouter"; - activateTool = true; - break; - case ID_SELECTION_TOOL: - toolName = "pcbnew.InteractiveSelection"; - activateTool = true; - break; + case ID_PNS_ROUTER_TOOL: + toolName = "pcbnew.InteractiveRouter"; + activateTool = true; + break; + + case ID_SELECTION_TOOL: + toolName = "pcbnew.InteractiveSelection"; + activateTool = true; + break; } // do nothing if the legacy view is active diff --git a/common/tool/tool_event.cpp b/common/tool/tool_event.cpp index d8df6a54d2..641ccb6dff 100644 --- a/common/tool/tool_event.cpp +++ b/common/tool/tool_event.cpp @@ -64,49 +64,53 @@ const std::string TOOL_EVENT::Format() const { std::string ev; - const FlagString categories[] = { - { TC_Mouse, "mouse" }, + const FlagString categories[] = + { + { TC_Mouse, "mouse" }, { TC_Keyboard, "keyboard" }, - { TC_Command, "command" }, - { TC_Message, "message" }, - { TC_View, "view" }, - { 0, "" } + { TC_Command, "command" }, + { TC_Message, "message" }, + { TC_View, "view" }, + { 0, "" } }; - const FlagString actions[] = { - { TA_MouseClick, "click" }, - { TA_MouseUp, "button-up" }, - { TA_MouseDown, "button-down" }, - { TA_MouseDrag, "drag" }, - { TA_MouseMotion, "motion" }, - { TA_MouseWheel, "wheel" }, - { TA_KeyUp, "key-up" }, - { TA_KeyDown, "key-down" }, - { TA_ViewRefresh, "view-refresh" }, - { TA_ViewZoom, "view-zoom" }, - { TA_ViewPan, "view-pan" }, - { TA_ViewDirty, "view-dirty" }, - { TA_ChangeLayer, "change-layer" }, - { TA_CancelTool, "cancel-tool" }, + const FlagString actions[] = + { + { TA_MouseClick, "click" }, + { TA_MouseUp, "button-up" }, + { TA_MouseDown, "button-down" }, + { TA_MouseDrag, "drag" }, + { TA_MouseMotion, "motion" }, + { TA_MouseWheel, "wheel" }, + { TA_KeyUp, "key-up" }, + { TA_KeyDown, "key-down" }, + { TA_ViewRefresh, "view-refresh" }, + { TA_ViewZoom, "view-zoom" }, + { TA_ViewPan, "view-pan" }, + { TA_ViewDirty, "view-dirty" }, + { TA_ChangeLayer, "change-layer" }, + { TA_CancelTool, "cancel-tool" }, { TA_ContextMenuUpdate, "context-menu-update" }, { TA_ContextMenuChoice, "context-menu-choice" }, - { TA_Action, "action" }, - { 0, "" } + { TA_Action, "action" }, + { 0, "" } }; - const FlagString buttons[] = { - { MB_None, "none" }, - { MB_Left, "left" }, - { MB_Right, "right" }, + const FlagString buttons[] = + { + { MB_None, "none" }, + { MB_Left, "left" }, + { MB_Right, "right" }, { MB_Middle, "middle" }, - { 0, "" } + { 0, "" } }; - const FlagString modifiers[] = { + const FlagString modifiers[] = + { { MD_ModShift, "shift" }, - { MD_ModCtrl, "ctrl" }, - { MD_ModAlt, "alt" }, - { 0, "" } + { MD_ModCtrl, "ctrl" }, + { MD_ModAlt, "alt" }, + { 0, "" } }; ev = "category: "; diff --git a/common/tool/tool_interactive.cpp b/common/tool/tool_interactive.cpp index 1d195c02a3..efc764684c 100644 --- a/common/tool/tool_interactive.cpp +++ b/common/tool/tool_interactive.cpp @@ -31,12 +31,14 @@ TOOL_INTERACTIVE::TOOL_INTERACTIVE( TOOL_ID aId, const std::string& aName ) : TOOL_BASE( TOOL_Interactive, aId, aName ) - {}; +{ +} TOOL_INTERACTIVE::TOOL_INTERACTIVE( const std::string& aName ) : TOOL_BASE( TOOL_Interactive, TOOL_MANAGER::MakeToolId( aName ), aName ) - {}; +{ +} TOOL_INTERACTIVE::~TOOL_INTERACTIVE() diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index b42afaafe6..9952127c33 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -85,12 +85,12 @@ struct TOOL_MANAGER::TOOL_STATE bool operator==( const TOOL_MANAGER::TOOL_STATE& aRhs ) const { - return ( aRhs.theTool == this->theTool ); + return aRhs.theTool == this->theTool; } bool operator!=( const TOOL_MANAGER::TOOL_STATE& aRhs ) const { - return ( aRhs.theTool != this->theTool ); + return aRhs.theTool != this->theTool; } }; @@ -137,6 +137,7 @@ void TOOL_MANAGER::RegisterTool( TOOL_BASE* aTool ) if( aTool->GetType() == TOOL_Interactive ) { bool initState = static_cast( aTool )->Init(); + if( !initState ) { wxLogError( wxT( "Initialization of the %s tool failed" ), aTool->GetName().c_str() ); @@ -232,6 +233,7 @@ bool TOOL_MANAGER::runTool( TOOL_BASE* aTool ) // If the tool is already active, do not invoke it again if( state->idle == false ) return false; + state->idle = false; static_cast( aTool )->Reset(); @@ -269,6 +271,7 @@ void TOOL_MANAGER::ScheduleNextState( TOOL_BASE* aTool, TOOL_STATE_FUNC& aHandle const TOOL_EVENT_LIST& aConditions ) { TOOL_STATE* st = m_toolState[aTool]; + st->transitions.push_back( TRANSITION( aConditions, aHandler ) ); } @@ -309,8 +312,9 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) st->wakeupEvent = aEvent; st->pendingWait = false; st->waitEvents.clear(); + if( st->cofunc && !st->cofunc->Resume() ) - finishTool( st ); // The couroutine has finished + finishTool( st ); // The couroutine has finished // If the tool did not request to propagate // the event to other tools, we should stop it now @@ -345,7 +349,7 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) st->cofunc->Call( aEvent ); if( !st->cofunc->Running() ) - finishTool( st ); // The couroutine has finished immediately? + finishTool( st ); // The couroutine has finished immediately? } } } @@ -360,9 +364,9 @@ bool TOOL_MANAGER::dispatchStandardEvents( TOOL_EVENT& aEvent ) { // Check if there is a hotkey associated if( m_actionMgr->RunHotKey( aEvent.Modifier() | aEvent.KeyCode() ) ) - return false; // hotkey event was handled so it does not go any further + return false; // hotkey event was handled so it does not go any further } - else if( aEvent.Category() == TC_Command ) // it may be a tool activation event + else if( aEvent.Category() == TC_Command ) // it may be a tool activation event { dispatchActivation( aEvent ); // do not return false, as the event has to go on to the destined tool @@ -392,6 +396,7 @@ void TOOL_MANAGER::finishTool( TOOL_STATE* aState ) { // Find the tool to be deactivated std::deque::iterator it, it_end; + for( it = m_activeTools.begin(), it_end = m_activeTools.end(); it != it_end; ++it ) { if( aState == m_toolIdIndex[*it] ) @@ -411,7 +416,7 @@ void TOOL_MANAGER::finishTool( TOOL_STATE* aState ) bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) { -// wxLogDebug( "event: %s", aEvent.Format().c_str() ); +// wxLogDebug( "event: %s", aEvent.Format().c_str() ); // Early dispatch of events destined for the TOOL_MANAGER if( !dispatchStandardEvents( aEvent ) ) @@ -451,7 +456,7 @@ bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) if( m_view->IsDirty() ) { PCB_EDIT_FRAME* f = static_cast( GetEditFrame() ); - f->GetGalCanvas()->Refresh(); // fixme: ugly hack, provide a method in TOOL_DISPATCHER. + f->GetGalCanvas()->Refresh(); // fixme: ugly hack, provide a method in TOOL_DISPATCHER. } return false; @@ -475,12 +480,13 @@ void TOOL_MANAGER::ScheduleContextMenu( TOOL_BASE* aTool, CONTEXT_MENU* aMenu, TOOL_ID TOOL_MANAGER::MakeToolId( const std::string& aToolName ) { static int currentId; + return currentId++; } -void TOOL_MANAGER::SetEnvironment( EDA_ITEM* aModel, KiGfx::VIEW* aView, - KiGfx::VIEW_CONTROLS* aViewControls, wxWindow* aFrame ) +void TOOL_MANAGER::SetEnvironment( EDA_ITEM* aModel, KIGFX::VIEW* aView, + KIGFX::VIEW_CONTROLS* aViewControls, wxWindow* aFrame ) { m_model = aModel; m_view = aView; diff --git a/common/view/view.cpp b/common/view/view.cpp index b8c54e3025..bee8903722 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -38,7 +38,7 @@ #include #endif /* __WXDEBUG__ */ -using namespace KiGfx; +using namespace KIGFX; VIEW::VIEW( bool aIsDynamic ) : m_enableOrderModifier( true ), @@ -348,7 +348,7 @@ void VIEW::SetLayerOrder( int aLayer, int aRenderingOrder ) int VIEW::GetLayerOrder( int aLayer ) const { - return m_layers.at(aLayer).renderingOrder; + return m_layers.at( aLayer ).renderingOrder; } @@ -383,7 +383,7 @@ void VIEW::SortLayers( int aLayers[], int& aCount ) const struct VIEW::updateItemsColor { updateItemsColor( int aLayer, PAINTER* aPainter, GAL* aGal ) : - layer( aLayer ), painter( aPainter), gal( aGal ) + layer( aLayer ), painter( aPainter ), gal( aGal ) { } @@ -474,7 +474,8 @@ void VIEW::ChangeLayerDepth( int aLayer, int aDepth ) m_layers[aLayer].items->Query( r, visitor ); } -int VIEW::GetTopLayer( ) const + +int VIEW::GetTopLayer() const { if( m_topLayers.size() == 0 ) return 0; @@ -512,10 +513,13 @@ void VIEW::SetTopLayer( int aLayer, bool aEnabled ) void VIEW::EnableTopLayer( bool aEnable ) { - if( aEnable == m_enableOrderModifier ) return; + if( aEnable == m_enableOrderModifier ) + return; + m_enableOrderModifier = aEnable; std::set::iterator it; + if( aEnable ) { for( it = m_topLayers.begin(); it != m_topLayers.end(); ++it ) @@ -615,8 +619,10 @@ void VIEW::draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate ) const { group = m_gal->BeginGroup(); aItem->setGroup( aLayer, group ); + if( !m_painter->Draw( aItem, aLayer ) ) aItem->ViewDraw( aLayer, m_gal ); // Alternative drawing method + m_gal->EndGroup(); } } @@ -648,6 +654,7 @@ void VIEW::draw( VIEW_ITEM* aItem, bool aImmediate ) const void VIEW::draw( VIEW_GROUP* aGroup, bool aImmediate ) const { std::set::const_iterator it; + for( it = aGroup->Begin(); it != aGroup->End(); ++it ) { draw( *it, aImmediate ); @@ -687,6 +694,7 @@ struct VIEW::recacheItem { // Remove previously cached group int prevGroup = aItem->getGroup( layer ); + if( prevGroup >= 0 ) gal->DeleteGroup( prevGroup ); @@ -694,8 +702,10 @@ struct VIEW::recacheItem { int group = gal->BeginGroup(); aItem->setGroup( layer, group ); + if( !view->m_painter->Draw( aItem, layer ) ) aItem->ViewDraw( layer, gal ); // Alternative drawing method + gal->EndGroup(); } else @@ -803,7 +813,7 @@ void VIEW::clearGroupCache() for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) { - VIEW_LAYER* l = & ( ( *i ).second ); + VIEW_LAYER* l = &( ( *i ).second ); l->items->Query( r, visitor ); } } @@ -881,6 +891,7 @@ void VIEW::updateItemGeometry( VIEW_ITEM* aItem, int aLayer ) // Redraw the item from scratch int prevGroup = aItem->getGroup( aLayer ); + if( prevGroup >= 0 ) m_gal->DeleteGroup( prevGroup ); @@ -894,6 +905,7 @@ void VIEW::updateItemGeometry( VIEW_ITEM* aItem, int aLayer ) void VIEW::updateBbox( VIEW_ITEM* aItem ) { int layers[VIEW_MAX_LAYERS], layers_count; + aItem->ViewGetLayers( layers, layers_count ); for( int i = 0; i < layers_count; i++ ) @@ -912,6 +924,7 @@ void VIEW::updateLayers( VIEW_ITEM* aItem ) // Remove the item from previous layer set aItem->getLayers( layers, layers_count ); + for( int i = 0; i < layers_count; i++ ) { VIEW_LAYER& l = m_layers[layers[i]]; @@ -922,6 +935,7 @@ void VIEW::updateLayers( VIEW_ITEM* aItem ) // Add the item to new layer set aItem->ViewGetLayers( layers, layers_count ); aItem->saveLayers( layers, layers_count ); + for( int i = 0; i < layers_count; i++ ) { VIEW_LAYER& l = m_layers[layers[i]]; @@ -938,7 +952,7 @@ bool VIEW::areRequiredLayersEnabled( int aLayerId ) const std::set::iterator it, it_end; for( it = m_layers.at( aLayerId ).requiredLayers.begin(), - it_end = m_layers.at( aLayerId ).requiredLayers.end(); it != it_end; ++it ) + it_end = m_layers.at( aLayerId ).requiredLayers.end(); it != it_end; ++it ) { // That is enough if just one layer is not enabled if( !m_layers.at( *it ).enabled ) diff --git a/common/view/view_group.cpp b/common/view/view_group.cpp index 62ef738c82..7cc187c397 100644 --- a/common/view/view_group.cpp +++ b/common/view/view_group.cpp @@ -39,10 +39,10 @@ #include #include -using namespace KiGfx; +using namespace KIGFX; VIEW_GROUP::VIEW_GROUP( VIEW* aView ) : - m_layer( ITEM_GAL_LAYER( GP_OVERLAY ) ) + m_layer( ITEM_GAL_LAYER( GP_OVERLAY ) ) { m_view = aView; } @@ -80,6 +80,7 @@ unsigned int VIEW_GROUP::GetSize() const const BOX2I VIEW_GROUP::ViewBBox() const { BOX2I maxBox; + maxBox.SetMaximum(); return maxBox; } @@ -105,7 +106,7 @@ void VIEW_GROUP::ViewDraw( int aLayer, GAL* aGal ) const aGal->AdvanceDepth(); if( !painter->Draw( item, layers[i] ) ) - item->ViewDraw( layers[i], aGal ); // Alternative drawing method + item->ViewDraw( layers[i], aGal ); // Alternative drawing method } } diff --git a/common/view/view_item.cpp b/common/view/view_item.cpp index 4ec72208da..1521c88a9e 100644 --- a/common/view/view_item.cpp +++ b/common/view/view_item.cpp @@ -27,7 +27,7 @@ #include #include -using namespace KiGfx; +using namespace KIGFX; void VIEW_ITEM::ViewSetVisible( bool aIsVisible ) { @@ -69,6 +69,7 @@ void VIEW_ITEM::ViewRelease() void VIEW_ITEM::getLayers( int* aLayers, int& aCount ) const { int* layersPtr = aLayers; + for( unsigned int i = 0; i < m_layers.size(); ++i ) { if( m_layers[i] ) diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index ed6602fb81..8a2f16c8d6 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -30,7 +30,7 @@ #include #include -using namespace KiGfx; +using namespace KIGFX; const wxEventType WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE = wxNewEventType(); @@ -40,25 +40,25 @@ WX_VIEW_CONTROLS::WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ) : m_parentPanel( aParentPanel ) { m_parentPanel->Connect( wxEVT_MOTION, wxMouseEventHandler( - WX_VIEW_CONTROLS::onMotion ), NULL, this ); + WX_VIEW_CONTROLS::onMotion ), NULL, this ); m_parentPanel->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( - WX_VIEW_CONTROLS::onWheel ), NULL, this ); + WX_VIEW_CONTROLS::onWheel ), NULL, this ); m_parentPanel->Connect( wxEVT_MIDDLE_UP, wxMouseEventHandler( - WX_VIEW_CONTROLS::onButton ), NULL, this ); + WX_VIEW_CONTROLS::onButton ), NULL, this ); m_parentPanel->Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( - WX_VIEW_CONTROLS::onButton ), NULL, this ); + WX_VIEW_CONTROLS::onButton ), NULL, this ); m_parentPanel->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( - WX_VIEW_CONTROLS::onButton ), NULL, this ); + WX_VIEW_CONTROLS::onButton ), NULL, this ); m_parentPanel->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( - WX_VIEW_CONTROLS::onButton ), NULL, this ); + WX_VIEW_CONTROLS::onButton ), NULL, this ); #if defined _WIN32 || defined _WIN64 m_parentPanel->Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( - WX_VIEW_CONTROLS::onEnter ), NULL, this ); + WX_VIEW_CONTROLS::onEnter ), NULL, this ); #endif m_panTimer.SetOwner( this ); this->Connect( wxEVT_TIMER, wxTimerEventHandler( - WX_VIEW_CONTROLS::onTimer ), NULL, this ); + WX_VIEW_CONTROLS::onTimer ), NULL, this ); } @@ -133,7 +133,7 @@ void WX_VIEW_CONTROLS::onWheel( wxMouseEvent& aEvent ) double timeDiff = timeStamp.ToDouble() - m_timeStamp.ToDouble(); m_timeStamp = timeStamp; - double zoomScale; + double zoomScale; // Set scaling speed depending on scroll wheel event interval if( timeDiff < 500 && timeDiff > 0 ) @@ -171,6 +171,7 @@ void WX_VIEW_CONTROLS::onButton( wxMouseEvent& aEvent ) { m_state = IDLE; // Stop autopanning when user release left mouse button } + break; case DRAG_PANNING: @@ -178,6 +179,7 @@ void WX_VIEW_CONTROLS::onButton( wxMouseEvent& aEvent ) { m_state = IDLE; } + break; } @@ -214,7 +216,7 @@ void WX_VIEW_CONTROLS::onTimer( wxTimerEvent& aEvent ) } break; - case IDLE: // Just remove unnecessary warnings + case IDLE: // Just remove unnecessary warnings case DRAG_PANNING: break; } @@ -284,6 +286,7 @@ bool WX_VIEW_CONTROLS::handleAutoPanning( const wxMouseEvent& aEvent ) return false; } + return true; break; @@ -295,6 +298,7 @@ bool WX_VIEW_CONTROLS::handleAutoPanning( const wxMouseEvent& aEvent ) return true; } + return false; break; @@ -303,5 +307,5 @@ bool WX_VIEW_CONTROLS::handleAutoPanning( const wxMouseEvent& aEvent ) } wxASSERT_MSG( false, wxT( "This line should never be reached" ) ); - return false; // Should not be reached, just avoid the compiler warnings.. + return false; // Should not be reached, just avoid the compiler warnings.. } diff --git a/common/worksheet_viewitem.cpp b/common/worksheet_viewitem.cpp index 80028a3236..9b153d3129 100644 --- a/common/worksheet_viewitem.cpp +++ b/common/worksheet_viewitem.cpp @@ -34,7 +34,7 @@ #include #include -using namespace KiGfx; +using namespace KIGFX; WORKSHEET_VIEWITEM::WORKSHEET_VIEWITEM( const std::string& aFileName, const std::string& aSheetName, const PAGE_INFO* aPageInfo, const TITLE_BLOCK* aTitleBlock ) : diff --git a/common/zoom.cpp b/common/zoom.cpp index de9223dfff..f839684ae2 100644 --- a/common/zoom.cpp +++ b/common/zoom.cpp @@ -197,8 +197,8 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event ) if( m_galCanvasActive ) { // Apply computed view settings to GAL - KiGfx::VIEW* view = m_galCanvas->GetView(); - KiGfx::GAL* gal = m_galCanvas->GetGAL(); + KIGFX::VIEW* view = m_galCanvas->GetView(); + KIGFX::GAL* gal = m_galCanvas->GetGAL(); double zoomFactor = gal->GetWorldScale() / gal->GetZoomFactor(); double zoom = 1.0 / ( zoomFactor * GetZoom() ); diff --git a/include/base_struct.h b/include/base_struct.h index 9f615dc946..0e7ae53d65 100644 --- a/include/base_struct.h +++ b/include/base_struct.h @@ -301,7 +301,7 @@ typedef unsigned STATUS_FLAGS; * is a base class for most all the KiCad significant classes, used in * schematics and boards. */ -class EDA_ITEM : public KiGfx::VIEW_ITEM +class EDA_ITEM : public KIGFX::VIEW_ITEM { private: diff --git a/include/class_drawpanel_gal.h b/include/class_drawpanel_gal.h index 6f9e0d2e8f..cba546afd4 100644 --- a/include/class_drawpanel_gal.h +++ b/include/class_drawpanel_gal.h @@ -38,7 +38,7 @@ class BOARD; class TOOL_DISPATCHER; -namespace KiGfx +namespace KIGFX { class GAL; class VIEW; @@ -73,7 +73,7 @@ public: * Returns a pointer to the GAL instance used in the panel. * @return The instance of GAL. */ - KiGfx::GAL* GetGAL() const + KIGFX::GAL* GetGAL() const { return m_gal; } @@ -83,7 +83,7 @@ public: * Returns a pointer to the VIEW instance used in the panel. * @return The instance of VIEW. */ - KiGfx::VIEW* GetView() const + KIGFX::VIEW* GetView() const { return m_view; } @@ -93,9 +93,9 @@ public: * Returns a pointer to the VIEW_CONTROLS instance used in the panel. * @return The instance of VIEW_CONTROLS. */ - KiGfx::VIEW_CONTROLS* GetViewControls() const + KIGFX::VIEW_CONTROLS* GetViewControls() const { - return (KiGfx::VIEW_CONTROLS*)( m_viewControls ); + return (KIGFX::VIEW_CONTROLS*)( m_viewControls ); } /// @copydoc wxWindow::Refresh() @@ -125,12 +125,12 @@ protected: bool m_pendingRefresh; wxTimer m_refreshTimer; - KiGfx::GAL* m_gal; ///< Interface for drawing objects on a 2D-surface - KiGfx::VIEW* m_view; ///< Stores view settings (scale, center, etc.) + KIGFX::GAL* m_gal; ///< Interface for drawing objects on a 2D-surface + KIGFX::VIEW* m_view; ///< Stores view settings (scale, center, etc.) ///< and items to be drawn - KiGfx::PAINTER* m_painter; ///< Contains information about how to draw items + KIGFX::PAINTER* m_painter; ///< Contains information about how to draw items ///< using GAL - KiGfx::WX_VIEW_CONTROLS* m_viewControls; ///< Control for VIEW (moving, zooming, etc.) + KIGFX::WX_VIEW_CONTROLS* m_viewControls; ///< Control for VIEW (moving, zooming, etc.) GalType m_currentGal; ///< Currently used GAL TOOL_DISPATCHER* m_eventDispatcher; ///< Processes and forwards events to tools }; diff --git a/include/gal/cairo/cairo_compositor.h b/include/gal/cairo/cairo_compositor.h index 116cfd7c0d..6d5d74a451 100644 --- a/include/gal/cairo/cairo_compositor.h +++ b/include/gal/cairo/cairo_compositor.h @@ -36,7 +36,7 @@ #include #include -namespace KiGfx +namespace KIGFX { class CAIRO_COMPOSITOR : public COMPOSITOR { @@ -122,6 +122,6 @@ protected: return m_buffers.size(); } }; -} // namespace KiGfx +} // namespace KIGFX #endif /* COMPOSITOR_H_ */ diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 77ba5c0a1e..09a2793273 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -40,9 +40,9 @@ #define SCREEN_DEPTH 24 #else #if wxCHECK_VERSION( 2, 9, 0 ) -#define SCREEN_DEPTH wxBITMAP_SCREEN_DEPTH +#define SCREEN_DEPTH wxBITMAP_SCREEN_DEPTH #else -#define SCREEN_DEPTH 32 +#define SCREEN_DEPTH 32 #endif #endif @@ -58,7 +58,7 @@ * of KiCad graphics surfaces as well. * */ -namespace KiGfx +namespace KIGFX { class CAIRO_COMPOSITOR; @@ -126,7 +126,7 @@ public: // -------------- /// @brief Resizes the canvas. - virtual void ResizeScreen ( int aWidth, int aHeight ); + virtual void ResizeScreen( int aWidth, int aHeight ); /// @brief Shows/hides the GAL canvas virtual bool Show( bool aShow ); @@ -386,6 +386,6 @@ private: /// Format used to store pixels static const cairo_format_t GAL_FORMAT = CAIRO_FORMAT_RGB24; }; -} // namespace KiGfx +} // namespace KIGFX -#endif // CAIROGAL_H_ +#endif // CAIROGAL_H_ diff --git a/include/gal/color4d.h b/include/gal/color4d.h index 28fbde2469..c476f10e0e 100644 --- a/include/gal/color4d.h +++ b/include/gal/color4d.h @@ -30,7 +30,7 @@ #include #include -namespace KiGfx +namespace KIGFX { /** * Class COLOR4D @@ -182,7 +182,7 @@ public: double GetBrightness() const { // Weighted W3C formula - return ( r * 0.299 + g * 0.587 + b * 0.117 ); + return r * 0.299 + g * 0.587 + b * 0.117; } /** @@ -217,6 +217,6 @@ public: double b; ///< Blue component double a; ///< Alpha component }; -} // namespace KiGfx +} // namespace KIGFX #endif /* COLOR4D_H_ */ diff --git a/include/gal/compositor.h b/include/gal/compositor.h index 1a9d924426..cd1d636a9a 100644 --- a/include/gal/compositor.h +++ b/include/gal/compositor.h @@ -31,7 +31,7 @@ #ifndef COMPOSITOR_H_ #define COMPOSITOR_H_ -namespace KiGfx +namespace KIGFX { class COMPOSITOR @@ -101,6 +101,6 @@ protected: unsigned int m_height; ///< Height of the buffer (in pixels) }; -} // namespace KiGfx +} // namespace KIGFX #endif /* COMPOSITOR_H_ */ diff --git a/include/gal/definitions.h b/include/gal/definitions.h index 8a506852c2..87db4103be 100644 --- a/include/gal/definitions.h +++ b/include/gal/definitions.h @@ -31,18 +31,18 @@ #define SWAP( varA, condition, varB ) if( varA condition varB ) { double tmp = varA; varA = varB; \ varB = tmp; } -namespace KiGfx +namespace KIGFX { - /** - * RenderTarget: Possible rendering targets - */ - enum RenderTarget - { - TARGET_CACHED = 0, ///< Main rendering target (cached) - TARGET_NONCACHED, ///< Auxiliary rendering target (noncached) - TARGET_OVERLAY, ///< Items that may change while the view stays the same (noncached) - TARGETS_NUMBER ///< Number of available rendering targets - }; -} +/** + * RenderTarget: Possible rendering targets + */ +enum RenderTarget +{ + TARGET_CACHED = 0, ///< Main rendering target (cached) + TARGET_NONCACHED, ///< Auxiliary rendering target (noncached) + TARGET_OVERLAY, ///< Items that may change while the view stays the same (noncached) + TARGETS_NUMBER ///< Number of available rendering targets +}; +} // namespace KIGFX #endif /* DEFINITIONS_H_ */ diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 098635d96c..6bb796c9cd 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -40,7 +40,7 @@ #include #include -namespace KiGfx +namespace KIGFX { /** * GridStyle: Type definition of the grid style @@ -891,6 +891,6 @@ protected: static const int MIN_DEPTH = -2048; static const int MAX_DEPTH = 2047; }; -} // namespace KiGfx +} // namespace KIGFX #endif /* GRAPHICSABSTRACTIONLAYER_H_ */ diff --git a/include/gal/opengl/cached_container.h b/include/gal/opengl/cached_container.h index d770f9bc46..3c99fd0ea3 100644 --- a/include/gal/opengl/cached_container.h +++ b/include/gal/opengl/cached_container.h @@ -37,9 +37,9 @@ #include // Debug messages verbosity level -//#define CACHED_CONTAINER_TEST 1 +// #define CACHED_CONTAINER_TEST 1 -namespace KiGfx +namespace KIGFX { class VERTEX_ITEM; class SHADER; @@ -173,6 +173,6 @@ private: inline void test() {} #endif /* CACHED_CONTAINER_TEST */ }; -} // namespace KiGfx +} // namespace KIGFX #endif /* CACHED_CONTAINER_H_ */ diff --git a/include/gal/opengl/gpu_manager.h b/include/gal/opengl/gpu_manager.h index 9476bc724c..0088d2942c 100644 --- a/include/gal/opengl/gpu_manager.h +++ b/include/gal/opengl/gpu_manager.h @@ -33,7 +33,7 @@ #include #include -namespace KiGfx +namespace KIGFX { class SHADER; class VERTEX_CONTAINER; @@ -90,14 +90,14 @@ protected: GPU_MANAGER( VERTEX_CONTAINER* aContainer ); ///< Drawing status flag. - bool m_isDrawing; + bool m_isDrawing; ///< Container that stores vertices data. VERTEX_CONTAINER* m_container; ///< Shader handling SHADER* m_shader; - int m_shaderAttrib; ///< Location of shader attributes (for glVertexAttribPointer) + int m_shaderAttrib; ///< Location of shader attributes (for glVertexAttribPointer) }; @@ -130,12 +130,11 @@ public: virtual void uploadToGpu(); protected: - bool m_buffersInitialized; + bool m_buffersInitialized; boost::scoped_array m_indices; - GLuint* m_indicesPtr; - GLuint m_verticesBuffer; - unsigned int m_indicesSize; - + GLuint* m_indicesPtr; + GLuint m_verticesBuffer; + unsigned int m_indicesSize; }; @@ -159,5 +158,5 @@ public: ///< @copydoc GPU_MANAGER::EndDrawing() virtual void EndDrawing(); }; -} // namespace KiGfx +} // namespace KIGFX #endif /* GPU_MANAGER_H_ */ diff --git a/include/gal/opengl/noncached_container.h b/include/gal/opengl/noncached_container.h index 3cb6d1bf85..07e1ca5d99 100644 --- a/include/gal/opengl/noncached_container.h +++ b/include/gal/opengl/noncached_container.h @@ -33,7 +33,7 @@ #include -namespace KiGfx +namespace KIGFX { class VERTEX_ITEM; class SHADER; @@ -68,6 +68,6 @@ protected: ///< Index of the free first space where a vertex can be stored unsigned int m_freePtr; }; -} // namespace KiGfx +} // namespace KIGFX #endif /* NONCACHED_CONTAINER_H_ */ diff --git a/include/gal/opengl/opengl_compositor.h b/include/gal/opengl/opengl_compositor.h index 8b587fd3c6..642a7f7bbc 100644 --- a/include/gal/opengl/opengl_compositor.h +++ b/include/gal/opengl/opengl_compositor.h @@ -35,7 +35,7 @@ #include #include -namespace KiGfx +namespace KIGFX { class OPENGL_COMPOSITOR : public COMPOSITOR { @@ -105,6 +105,6 @@ protected: return m_buffers.size(); } }; -} // namespace KiGfx +} // namespace KIGFX #endif /* COMPOSITOR_H_ */ diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index f8c0addee9..6d64035195 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -57,7 +57,7 @@ #define CALLBACK #endif -namespace KiGfx +namespace KIGFX { class SHADER; @@ -253,6 +253,7 @@ public: { /// Manager used for storing new vertices VERTEX_MANAGER* vboManager; + /// Intersect points, that have to be freed after tessellation std::deque< boost::shared_array >& intersectPoints; } TessParams; @@ -377,6 +378,6 @@ private: */ unsigned int getNewGroupNumber(); }; -} // namespace KiGfx +} // namespace KIGFX -#endif // OPENGLGAL_H_ +#endif // OPENGLGAL_H_ diff --git a/include/gal/opengl/shader.h b/include/gal/opengl/shader.h index a647a6733a..4ac02cf2ab 100644 --- a/include/gal/opengl/shader.h +++ b/include/gal/opengl/shader.h @@ -34,14 +34,14 @@ #include #include -namespace KiGfx +namespace KIGFX { class OPENGL_GAL; /// Type definition for the shader enum ShaderType { - SHADER_TYPE_VERTEX = GL_VERTEX_SHADER, ///< Vertex shader + SHADER_TYPE_VERTEX = GL_VERTEX_SHADER, ///< Vertex shader SHADER_TYPE_FRAGMENT = GL_FRAGMENT_SHADER, ///< Fragment shader SHADER_TYPE_GEOMETRY = GL_GEOMETRY_SHADER ///< Geometry shader }; @@ -205,6 +205,6 @@ private: GLuint geomOutputType; ///< Output type [e.g. GL_LINES, GL_TRIANGLES, GL_QUADS etc.] std::deque parameterLocation; ///< Location of the parameter }; -} // namespace KiGfx +} // namespace KIGFX #endif /* SHADER_H_ */ diff --git a/include/gal/opengl/vertex_common.h b/include/gal/opengl/vertex_common.h index 626ed5a6cf..2610ffb0ef 100644 --- a/include/gal/opengl/vertex_common.h +++ b/include/gal/opengl/vertex_common.h @@ -32,10 +32,11 @@ #include -namespace KiGfx +namespace KIGFX { // Possible types of shaders -enum SHADER_TYPE { +enum SHADER_TYPE +{ SHADER_NONE = 0, SHADER_LINE, SHADER_FILLED_CIRCLE, @@ -68,7 +69,6 @@ const unsigned int ShaderSize = sizeof(VERTEX().shader); const unsigned int ShaderStride = ShaderSize / sizeof(GLfloat); const unsigned int IndexSize = sizeof(GLuint); - -} // namespace KiGfx +} // namespace KIGFX #endif /* VERTEX_COMMON_H_ */ diff --git a/include/gal/opengl/vertex_container.h b/include/gal/opengl/vertex_container.h index fb2a404846..50c8d7fec1 100644 --- a/include/gal/opengl/vertex_container.h +++ b/include/gal/opengl/vertex_container.h @@ -32,7 +32,7 @@ #include -namespace KiGfx +namespace KIGFX { class VERTEX_ITEM; class SHADER; @@ -45,6 +45,7 @@ public: * Returns a pointer to a new container of an appropriate type. */ static VERTEX_CONTAINER* MakeContainer( bool aCached ); + virtual ~VERTEX_CONTAINER(); /** @@ -170,6 +171,6 @@ protected: ///< Default initial size of a container (expressed in vertices) static const unsigned int defaultInitSize = 1048576; }; -} // namespace KiGfx +} // namespace KIGFX #endif /* VERTEX_CONTAINER_H_ */ diff --git a/include/gal/opengl/vertex_item.h b/include/gal/opengl/vertex_item.h index 4dd6b084f2..1905b9511e 100644 --- a/include/gal/opengl/vertex_item.h +++ b/include/gal/opengl/vertex_item.h @@ -34,7 +34,7 @@ #include #include -namespace KiGfx +namespace KIGFX { class VERTEX_MANAGER; @@ -98,6 +98,6 @@ private: m_size = aSize; } }; -} // namespace KiGfx +} // namespace KIGFX #endif /* VERTEX_ITEM_H_ */ diff --git a/include/gal/opengl/vertex_manager.h b/include/gal/opengl/vertex_manager.h index 79f9dbd64b..56c84a6beb 100644 --- a/include/gal/opengl/vertex_manager.h +++ b/include/gal/opengl/vertex_manager.h @@ -40,7 +40,7 @@ #include #include -namespace KiGfx +namespace KIGFX { class SHADER; class VERTEX_ITEM; @@ -342,6 +342,6 @@ protected: GLfloat m_shader[ShaderStride]; }; -} // namespace KiGfx +} // namespace KIGFX #endif /* VERTEX_MANAGER_H_ */ diff --git a/include/gal/stroke_font.h b/include/gal/stroke_font.h index 7af3b618cb..034214e296 100644 --- a/include/gal/stroke_font.h +++ b/include/gal/stroke_font.h @@ -34,7 +34,7 @@ #include -namespace KiGfx +namespace KIGFX { class GAL; @@ -184,6 +184,6 @@ private: static const double LINE_HEIGHT_RATIO; }; -} // namespace KiGfx +} // namespace KIGFX #endif /* STROKE_FONT_H_ */ diff --git a/include/geometry/rtree.h b/include/geometry/rtree.h index abc7833286..efc0f6e082 100644 --- a/include/geometry/rtree.h +++ b/include/geometry/rtree.h @@ -42,9 +42,9 @@ // RTree.h // -#define RTREE_TEMPLATE template -#define RTREE_SEARCH_TEMPLATE template #define RTREE_QUAL RTree diff --git a/include/geometry/seg.h b/include/geometry/seg.h index 24d2d490d2..4a2e8ccecc 100644 --- a/include/geometry/seg.h +++ b/include/geometry/seg.h @@ -36,43 +36,42 @@ typedef boost::optional OPT_VECTOR2I; class SEG { - private: - typedef VECTOR2I::extended_type ecoord; +private: + typedef VECTOR2I::extended_type ecoord; - public: +public: + friend inline std::ostream& operator<<( std::ostream& aStream, const SEG& aSeg ); - friend inline std::ostream& operator<<( std::ostream& aStream, const SEG& aSeg ); + /* Start and the of the segment. Public, to make access simpler. These are references + * to an object the segment belongs to (e.g. a line chain) or references to locally stored points + * (m_a, m_b). + */ + VECTOR2I& a, b; - /* Start and the of the segment. Public, to make access simpler. These are references - * to an object the segment belongs to (e.g. a line chain) or references to locally stored points - * (m_a, m_b). - */ - VECTOR2I& a, b; + /** Default constructor + * Creates an empty (0, 0) segment, locally-referenced + */ + SEG() : a( m_a ), b( m_b ) + { + a = m_a; + b = m_b; + m_is_local = true; + m_index = -1; + } - /** Default constructor - * Creates an empty (0, 0) segment, locally-referenced - */ - SEG() : a( m_a ), b( m_b ) - { - a = m_a; - b = m_b; - m_is_local = true; - m_index = -1; - } - - /** - * Constructor - * Creates a segment between (aX1, aY1) and (aX2, aY2), locally referenced - */ - SEG( int aX1, int aY1, int aX2, int aY2 ) : a( m_a ), b( m_b ) - { - m_a = VECTOR2I( aX1, aY1 ); - m_b = VECTOR2I( aX2, aY2 ); - a = m_a; - b = m_b; - m_is_local = true; - m_index = -1; - } + /** + * Constructor + * Creates a segment between (aX1, aY1) and (aX2, aY2), locally referenced + */ + SEG( int aX1, int aY1, int aX2, int aY2 ) : a( m_a ), b( m_b ) + { + m_a = VECTOR2I( aX1, aY1 ); + m_b = VECTOR2I( aX2, aY2 ); + a = m_a; + b = m_b; + m_is_local = true; + m_index = -1; + } /** * Constructor diff --git a/include/geometry/shape.h b/include/geometry/shape.h index 32bd57bea9..ff273e2160 100644 --- a/include/geometry/shape.h +++ b/include/geometry/shape.h @@ -35,11 +35,12 @@ * Lists all supported shapes */ -enum ShapeType { - SH_RECT = 0, ///> axis-aligned rectangle - SH_SEGMENT, ///> line segment - SH_LINE_CHAIN, ///> line chain (polyline) - SH_CIRCLE ///> circle +enum ShapeType +{ + SH_RECT = 0, ///> axis-aligned rectangle + SH_SEGMENT, ///> line segment + SH_LINE_CHAIN, ///> line chain (polyline) + SH_CIRCLE ///> circle }; /** @@ -47,7 +48,8 @@ enum ShapeType { * * Represents an abstract shape on 2D plane. */ -class SHAPE { +class SHAPE +{ protected: typedef VECTOR2I::extended_type ecoord; @@ -77,7 +79,8 @@ class SHAPE { * Returns a dynamically allocated copy of the shape * @retval copy of the shape */ - virtual SHAPE* Clone() const { + virtual SHAPE* Clone() const + { assert( false ); return NULL; }; @@ -106,6 +109,7 @@ class SHAPE { */ virtual bool Collide( const SHAPE* aShape, int aClerance, VECTOR2I& aMTV ) const; virtual bool Collide( const SHAPE* aShape, int aClerance = 0 ) const; + /** * Function Collide() * @@ -139,9 +143,8 @@ class SHAPE { private: ///> type of our shape ShapeType m_type; - }; -bool CollideShapes( const SHAPE *aA, const SHAPE *aB, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ); +bool CollideShapes( const SHAPE* aA, const SHAPE* aB, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ); #endif // __SHAPE_H diff --git a/include/geometry/shape_circle.h b/include/geometry/shape_circle.h index 31d174f3d9..2e2745401a 100644 --- a/include/geometry/shape_circle.h +++ b/include/geometry/shape_circle.h @@ -27,13 +27,13 @@ #include "shape.h" -class SHAPE_CIRCLE : public SHAPE { - +class SHAPE_CIRCLE : public SHAPE +{ public: - SHAPE_CIRCLE(): + SHAPE_CIRCLE() : SHAPE( SH_CIRCLE ), m_radius( 0 ) {}; - SHAPE_CIRCLE( const VECTOR2I& aCenter, int aRadius ): + SHAPE_CIRCLE( const VECTOR2I& aCenter, int aRadius ) : SHAPE( SH_CIRCLE ), m_radius( aRadius ), m_center( aCenter ) {}; ~SHAPE_CIRCLE() {}; @@ -41,12 +41,14 @@ public: const BOX2I BBox( int aClearance = 0 ) const { const VECTOR2I rc( m_radius + aClearance, m_radius + aClearance ); + return BOX2I( m_center - rc, rc * 2 ); } bool Collide( const SEG& aSeg, int aClearance = 0 ) const { int rc = aClearance + m_radius; + return aSeg.Distance( m_center ) <= rc; } @@ -69,6 +71,7 @@ public: { return m_center; } + private: int m_radius; VECTOR2I m_center; diff --git a/include/geometry/shape_index.h b/include/geometry/shape_index.h index 5686eb28e6..24b174e1fa 100644 --- a/include/geometry/shape_index.h +++ b/include/geometry/shape_index.h @@ -46,10 +46,11 @@ static const SHAPE* shapeFunctor( T aItem ) return aItem->GetShape(); } + /** * shapeFunctor template function: specialization for T = SHAPE* */ -template<> +template <> const SHAPE* shapeFunctor( SHAPE* aItem ); /** @@ -67,6 +68,7 @@ BOX2I boundingBox( T aObject ) return shapeFunctor( aObject )->BBox(); } + /** * acceptVisitor template method * @@ -82,6 +84,7 @@ void acceptVisitor( T aObject, V aVisitor ) aVisitor( aObject ); } + /** * collide template method * @@ -93,22 +96,23 @@ void acceptVisitor( T aObject, V aVisitor ) * @param minDistance minimum collision distance * @return if object and anotherObject collide */ -template +template bool collide( T aObject, U aAnotherObject, int aMinDistance ) { return shapeFunctor( aObject )->Collide( aAnotherObject, aMinDistance ); } -template +template bool queryCallback( T aShape, void* aContext ) { V* visitor = (V*) aContext; - acceptVisitor( aShape, *visitor ); + + acceptVisitor( aShape, *visitor ); return true; } -template +template class SHAPE_INDEX { public: @@ -242,7 +246,7 @@ class SHAPE_INDEX * Accepts a visitor for every SHAPE object contained in this INDEX. * @param visitor Visitor object to be run */ - template + template void Accept( V aVisitor ) { Iterator iter = this->Begin(); @@ -271,7 +275,7 @@ class SHAPE_INDEX * @param minDistance distance threshold * @param visitor object to be invoked on every object contained in the search area. */ - template + template int Query( const SHAPE *aShape, int aMinDistance, V& aVisitor, bool aExact ) { BOX2I box = aShape->BBox(); @@ -299,19 +303,19 @@ class SHAPE_INDEX * Class members implementation */ -template +template SHAPE_INDEX::SHAPE_INDEX() { this->m_tree = new RTree(); } -template +template SHAPE_INDEX::~SHAPE_INDEX() { delete this->m_tree; } -template +template void SHAPE_INDEX::Add( T aShape ) { BOX2I box = boundingBox( aShape ); @@ -321,7 +325,7 @@ void SHAPE_INDEX::Add( T aShape ) this->m_tree->Insert( min, max, aShape ); } -template +template void SHAPE_INDEX::Remove( T aShape ) { BOX2I box = boundingBox( aShape ); @@ -331,19 +335,20 @@ void SHAPE_INDEX::Remove( T aShape ) this->m_tree->Remove( min, max, aShape ); } -template +template void SHAPE_INDEX::RemoveAll() { this->m_tree->RemoveAll(); } -template +template void SHAPE_INDEX::Reindex() { RTree* newTree; newTree = new RTree(); Iterator iter = this->Begin(); + while( !iter.IsNull() ) { T shape = *iter; @@ -358,7 +363,7 @@ void SHAPE_INDEX::Reindex() this->m_tree = newTree; } -template +template typename SHAPE_INDEX::Iterator SHAPE_INDEX::Begin() { return Iterator( this ); diff --git a/include/geometry/shape_index_list.h b/include/geometry/shape_index_list.h index 9f849ab83c..b021ccff8d 100644 --- a/include/geometry/shape_index_list.h +++ b/include/geometry/shape_index_list.h @@ -27,16 +27,17 @@ #include -template const SHAPE* defaultShapeFunctor( const T aItem ) +template +const SHAPE* defaultShapeFunctor( const T aItem ) { return aItem->GetShape(); } -template > - -class SHAPE_INDEX_LIST { - - struct ShapeEntry { +template > +class SHAPE_INDEX_LIST +{ + struct ShapeEntry + { ShapeEntry( T aParent ) { shape = ShapeFunctor( aParent ); @@ -58,75 +59,77 @@ class SHAPE_INDEX_LIST { public: // "Normal" iterator interface, for STL algorithms. - class iterator { - public: - iterator() {}; + class iterator + { + public: + iterator() {}; - iterator( ShapeVecIter aCurrent ) - : m_current( aCurrent ) {}; + iterator( ShapeVecIter aCurrent ) : + m_current( aCurrent ) {}; - iterator( const iterator &aB ) : - m_current( aB.m_current ) {}; + iterator( const iterator& aB ) : + m_current( aB.m_current ) {}; - T operator*() const - { - return (*m_current).parent; - } + T operator*() const + { + return (*m_current).parent; + } - void operator++() - { - ++m_current; - } + void operator++() + { + ++m_current; + } - iterator& operator++( int aDummy ) - { - ++m_current; - return *this; - } + iterator& operator++( int aDummy ) + { + ++m_current; + return *this; + } - bool operator==( const iterator& aRhs ) const - { - return m_current == aRhs.m_current; - } + bool operator==( const iterator& aRhs ) const + { + return m_current == aRhs.m_current; + } - bool operator!=( const iterator& aRhs ) const - { - return m_current != aRhs.m_current; - } + bool operator!=( const iterator& aRhs ) const + { + return m_current != aRhs.m_current; + } - const iterator& operator=( const iterator& aRhs ) - { - m_current = aRhs.m_current; - return *this; - } + const iterator& operator=( const iterator& aRhs ) + { + m_current = aRhs.m_current; + return *this; + } - private: - ShapeVecIter m_current; + private: + ShapeVecIter m_current; }; // "Query" iterator, for iterating over a set of spatially matching shapes. - class query_iterator { - public: - query_iterator() - { - } + class query_iterator + { + public: + query_iterator() + { + } - query_iterator( ShapeVecIter aCurrent, ShapeVecIter aEnd, SHAPE* aShape, - int aMinDistance, bool aExact ) : - m_end( aEnd ), - m_current( aCurrent ), - m_shape( aShape ), - m_minDistance( aMinDistance ), - m_exact( aExact ) - { - if( aShape ) - { + query_iterator( ShapeVecIter aCurrent, ShapeVecIter aEnd, SHAPE* aShape, + int aMinDistance, bool aExact ) : + m_end( aEnd ), + m_current( aCurrent ), + m_shape( aShape ), + m_minDistance( aMinDistance ), + m_exact( aExact ) + { + if( aShape ) + { m_refBBox = aShape->BBox(); next(); } } - query_iterator( const query_iterator &aB ) : + query_iterator( const query_iterator& aB ) : m_end( aB.m_end ), m_current( aB.m_current ), m_shape( aB.m_shape ), @@ -191,19 +194,19 @@ public: } } - ShapeVecIter m_end; - ShapeVecIter m_current; - BOX2I m_refBBox; - bool m_exact; - SHAPE *m_shape; - int m_minDistance; + ShapeVecIter m_end; + ShapeVecIter m_current; + BOX2I m_refBBox; + bool m_exact; + SHAPE* m_shape; + int m_minDistance; }; void Add( T aItem ) { ShapeEntry s( aItem ); - m_shapes.push_back(s); + m_shapes.push_back( s ); } void Remove( const T aItem ) @@ -227,8 +230,8 @@ public: return m_shapes.size(); } - template - int Query( const SHAPE *aShape, int aMinDistance, Visitor &aV, bool aExact = true ) //const + template + int Query( const SHAPE* aShape, int aMinDistance, Visitor& aV, bool aExact = true ) // const { ShapeVecIter i; int n = 0; @@ -243,11 +246,13 @@ public: if( !aExact || i->shape->Collide( aShape, aMinDistance ) ) { n++; + if( !aV( i->parent ) ) return n; } } } + return n; } @@ -263,7 +268,7 @@ public: const query_iterator qend() { - return query_iterator( m_shapes.end(), m_shapes.end(), NULL, 0, false ); + return query_iterator( m_shapes.end(), m_shapes.end(), NULL, 0, false ); } iterator begin() diff --git a/include/geometry/shape_rect.h b/include/geometry/shape_rect.h index d81ef02959..59e372dfd9 100644 --- a/include/geometry/shape_rect.h +++ b/include/geometry/shape_rect.h @@ -30,7 +30,8 @@ #include #include -class SHAPE_RECT : public SHAPE { +class SHAPE_RECT : public SHAPE +{ public: /** * Constructor @@ -50,11 +51,11 @@ class SHAPE_RECT : public SHAPE { * Constructor * Creates a rectangle defined by top-left corner aP0, width aW and height aH. */ - SHAPE_RECT( const VECTOR2I &aP0, int aW, int aH ) : + SHAPE_RECT( const VECTOR2I& aP0, int aW, int aH ) : SHAPE( SH_RECT ), m_p0( aP0 ), m_w( aW ), m_h( aH ) {}; /// @copydoc SHAPE::BBox() - const BOX2I BBox(int aClearance = 0) const + const BOX2I BBox( int aClearance = 0 ) const { BOX2I bbox( VECTOR2I( m_p0.x - aClearance, m_p0.y - aClearance ), VECTOR2I( m_w + 2 * aClearance, m_h + 2 * aClearance ) ); @@ -76,17 +77,17 @@ class SHAPE_RECT : public SHAPE { /// @copydoc SHAPE::Collide() bool Collide( const SEG& aSeg, int aClearance = 0 ) const { - //VECTOR2I pmin = VECTOR2I(std::min(aSeg.a.x, aSeg.b.x), std::min(aSeg.a.y, aSeg.b.y)); - //VECTOR2I pmax = VECTOR2I(std::max(aSeg.a.x, aSeg.b.x), std::max(aSeg.a.y, aSeg.b.y)); - //BOX2I r(pmin, VECTOR2I(pmax.x - pmin.x, pmax.y - pmin.y)); + //VECTOR2I pmin = VECTOR2I( std::min( aSeg.a.x, aSeg.b.x ), std::min( aSeg.a.y, aSeg.b.y ) ); + //VECTOR2I pmax = VECTOR2I( std::max( aSeg.a.x, aSeg.b.x ), std::max( aSeg.a.y, aSeg.b.y )); + //BOX2I r( pmin, VECTOR2I( pmax.x - pmin.x, pmax.y - pmin.y ) ); - //if (BBox(0).SquaredDistance(r) > aClearance * aClearance) + //if( BBox( 0 ).SquaredDistance( r ) > aClearance * aClearance ) // return false; if( BBox( 0 ).Contains( aSeg.a ) || BBox( 0 ).Contains( aSeg.b ) ) return true; - VECTOR2I vts[] = { VECTOR2I( m_p0.x, m_p0.y ), + VECTOR2I vts[] = { VECTOR2I( m_p0.x, m_p0.y ), VECTOR2I( m_p0.x, m_p0.y + m_h ), VECTOR2I( m_p0.x + m_w, m_p0.y + m_h ), VECTOR2I( m_p0.x + m_w, m_p0.y ), @@ -107,28 +108,40 @@ class SHAPE_RECT : public SHAPE { * * @return top-left corner of the rectangle */ - const VECTOR2I& GetPosition() const { return m_p0; } + const VECTOR2I& GetPosition() const + { + return m_p0; + } /** * Function GetSize() * * @return size of the rectangle */ - const VECTOR2I GetSize() const { return VECTOR2I( m_w, m_h ); } + const VECTOR2I GetSize() const + { + return VECTOR2I( m_w, m_h ); + } /** * Function GetWidth() * * @return width of the rectangle */ - const int GetWidth() const { return m_w; } + const int GetWidth() const + { + return m_w; + } /** * Function GetHeight() * * @return height of the rectangle */ - const int GetHeight() const { return m_h; } + const int GetHeight() const + { + return m_h; + } private: ///> Top-left corner diff --git a/include/length.h.usuned b/include/length.h.usuned index 537b01dacb..abd7f2d701 100644 --- a/include/length.h.usuned +++ b/include/length.h.usuned @@ -67,7 +67,7 @@ template < typename T > struct LENGTH_TRAITS< T, 0 > typedef T flat; }; -template< typename T, int P > class LENGTH +template < typename T, int P > class LENGTH { friend class LENGTH_UNITS< T >; friend class LENGTH_TRAITS< T, P >; @@ -109,7 +109,7 @@ public: this->m_U = y.m_U; return *this; } - template operator LENGTH< Y, P > ( void ) + template operator LENGTH< Y, P > ( void ) { return this->m_U; } diff --git a/include/macros.h b/include/macros.h index 35634311c8..391323272f 100644 --- a/include/macros.h +++ b/include/macros.h @@ -58,7 +58,7 @@ static inline const wxChar* GetChars( const wxString& s ) } // This really needs a function? well, it is used *a lot* of times -template inline void NEGATE( T &x ) { x = -x; } +template inline void NEGATE( T &x ) { x = -x; } /// # of elements in an array #define DIM( x ) unsigned( sizeof(x) / sizeof( (x)[0] ) ) // not size_t @@ -67,7 +67,7 @@ template inline void NEGATE( T &x ) { x = -x; } // std::swap works only with arguments of the same type (which is saner); // here the compiler will figure out what to do (I hope to get rid of // this soon or late) -template inline void EXCHG( T& a, T2& b ) +template inline void EXCHG( T& a, T2& b ) { T temp = a; a = b; diff --git a/include/math/box2.h b/include/math/box2.h index 383d034746..8ed1621935 100644 --- a/include/math/box2.h +++ b/include/math/box2.h @@ -39,7 +39,8 @@ template <> class BOX2_TRAITS { public: - enum { + enum + { c_max_size = INT_MAX - 1, c_min_coord_value = INT_MIN / 2 + 1 }; @@ -61,7 +62,7 @@ public: typedef typename Vec::coord_type coord_type; typedef typename Vec::extended_type ecoord_type; - BOX2() { }; + BOX2() {}; BOX2( const Vec& aPos, const Vec& aSize ) : m_Pos( aPos ), @@ -91,6 +92,7 @@ public: void Compute( const Container& aPointList ) { Vec vmin, vmax; + typename Container::const_iterator i; if( !aPointList.size() ) @@ -164,7 +166,7 @@ public: rel_pos.y += size.y; } - return (rel_pos.x >= 0) && (rel_pos.y >= 0) && ( rel_pos.y <= size.y) && ( rel_pos.x <= size.x); + return ( rel_pos.x >= 0 ) && ( rel_pos.y >= 0 ) && ( rel_pos.y <= size.y) && ( rel_pos.x <= size.x); } /** @@ -418,8 +420,8 @@ public: { ecoord_type x2 = m_Pos.x + m_Size.x; ecoord_type y2 = m_Pos.y + m_Size.y; - ecoord_type xdiff = std::max( aP.x < m_Pos.x ? m_Pos.x - aP.x : m_Pos.x - x2, (ecoord_type)0 ); - ecoord_type ydiff = std::max( aP.y < m_Pos.y ? m_Pos.y - aP.y : m_Pos.y - y2, (ecoord_type)0 ); + ecoord_type xdiff = std::max( aP.x < m_Pos.x ? m_Pos.x - aP.x : m_Pos.x - x2, (ecoord_type) 0 ); + ecoord_type ydiff = std::max( aP.y < m_Pos.y ? m_Pos.y - aP.y : m_Pos.y - y2, (ecoord_type) 0 ); return xdiff * xdiff + ydiff * ydiff; } diff --git a/include/math/math_util.h b/include/math/math_util.h index 00be8584f8..0b82203bea 100644 --- a/include/math/math_util.h +++ b/include/math/math_util.h @@ -34,14 +34,18 @@ * Scales a number (value) by rational (numerator/denominator). Numerator must be <= denominator. */ -template T rescale( T numerator, T value, T denominator ) +template +T rescale( T numerator, T value, T denominator ) { return numerator * value / denominator; } // explicit specializations for integer types, taking care of overflow. -template<> int rescale( int numerator, int value, int denominator ); -template<> int64_t rescale( int64_t numerator, int64_t value, int64_t denominator ); +template <> +int rescale( int numerator, int value, int denominator ); + +template <> +int64_t rescale( int64_t numerator, int64_t value, int64_t denominator ); #endif // __MATH_UTIL_H diff --git a/include/math/matrix3x3.h b/include/math/matrix3x3.h index 597d049405..8d0cc68235 100644 --- a/include/math/matrix3x3.h +++ b/include/math/matrix3x3.h @@ -51,8 +51,11 @@ */ // Forward declaration for template friends -template class MATRIX3x3; -template std::ostream& operator<<( std::ostream& stream, const MATRIX3x3& matrix ); +template +class MATRIX3x3; + +template +std::ostream& operator<<( std::ostream& stream, const MATRIX3x3& matrix ); template class MATRIX3x3 @@ -164,20 +167,21 @@ public: // Operators //! @brief Matrix multiplication -template MATRIX3x3 const operator*( MATRIX3x3 const& a, MATRIX3x3 const& b ); +template MATRIX3x3 const operator*( MATRIX3x3 const& a, MATRIX3x3 const& b ); //! @brief Multiplication with a 2D vector, the 3rd z-component is assumed to be 1 -template VECTOR2 const operator*( MATRIX3x3 const& a, VECTOR2 const& b ); +template VECTOR2 const operator*( MATRIX3x3 const& a, VECTOR2 const& b ); //! @brief Multiplication with a scalar -template MATRIX3x3 const operator*( MATRIX3x3 const& a, T scalar ); -template MATRIX3x3 const operator*( T scalar, MATRIX3x3 const& matrix ); +template MATRIX3x3 const operator*( MATRIX3x3 const& a, T scalar ); +template MATRIX3x3 const operator*( T scalar, MATRIX3x3 const& matrix ); // ---------------------- // --- Implementation --- // ---------------------- -template MATRIX3x3::MATRIX3x3() +template +MATRIX3x3::MATRIX3x3() { for( int j = 0; j < 3; j++ ) { @@ -189,8 +193,8 @@ template MATRIX3x3::MATRIX3x3() } -template MATRIX3x3::MATRIX3x3( T a00, T a01, T a02, T a10, T a11, T a12, T a20, T a21, - T a22 ) +template +MATRIX3x3::MATRIX3x3( T a00, T a01, T a02, T a10, T a11, T a12, T a20, T a21, T a22 ) { m_data[0][0] = a00; m_data[0][1] = a01; @@ -206,7 +210,8 @@ template MATRIX3x3::MATRIX3x3( T a00, T a01, T a02, T a10, T a11, T } -template void MATRIX3x3::SetIdentity( void ) +template +void MATRIX3x3::SetIdentity( void ) { for( int j = 0; j < 3; j++ ) { @@ -221,14 +226,16 @@ template void MATRIX3x3::SetIdentity( void ) } -template void MATRIX3x3::SetTranslation( VECTOR2 aTranslation ) +template +void MATRIX3x3::SetTranslation( VECTOR2 aTranslation ) { m_data[0][2] = aTranslation.x; m_data[1][2] = aTranslation.y; } -template VECTOR2 MATRIX3x3::GetTranslation( void ) const +template +VECTOR2 MATRIX3x3::GetTranslation( void ) const { VECTOR2 result; result.x = m_data[0][2]; @@ -237,7 +244,8 @@ template VECTOR2 MATRIX3x3::GetTranslation( void ) const } -template void MATRIX3x3::SetRotation( T aAngle ) +template +void MATRIX3x3::SetRotation( T aAngle ) { T cosValue = cos( aAngle ); T sinValue = sin( aAngle ); @@ -248,21 +256,24 @@ template void MATRIX3x3::SetRotation( T aAngle ) } -template void MATRIX3x3::SetScale( VECTOR2 aScale ) +template +void MATRIX3x3::SetScale( VECTOR2 aScale ) { m_data[0][0] = aScale.x; m_data[1][1] = aScale.y; } -template VECTOR2 MATRIX3x3::GetScale( void ) const +template +VECTOR2 MATRIX3x3::GetScale( void ) const { VECTOR2 result( m_data[0][0], m_data[1][1] ); return result; } -template MATRIX3x3 const operator*( MATRIX3x3 const& a, MATRIX3x3 const& b ) +template +MATRIX3x3 const operator*( MATRIX3x3 const& a, MATRIX3x3 const& b ) { MATRIX3x3 result; @@ -279,8 +290,9 @@ template MATRIX3x3 const operator*( MATRIX3x3 const& a, MATRIX3x3 } -template VECTOR2 const operator*( MATRIX3x3 const& matrix, - VECTOR2 const& vector ) +template +VECTOR2 const operator*( MATRIX3x3 const& matrix, + VECTOR2 const& vector ) { VECTOR2 result( 0, 0 ); result.x = matrix.m_data[0][0] * vector.x + matrix.m_data[0][1] * vector.y @@ -292,7 +304,8 @@ template VECTOR2 const operator*( MATRIX3x3 const& matrix, } -template T MATRIX3x3::Determinant( void ) const +template +T MATRIX3x3::Determinant( void ) const { return m_data[0][0] * ( m_data[1][1] * m_data[2][2] - m_data[1][2] * m_data[2][1] ) - m_data[0][1] * ( m_data[1][0] * m_data[2][2] - m_data[1][2] * m_data[2][0] ) @@ -300,7 +313,8 @@ template T MATRIX3x3::Determinant( void ) const } -template MATRIX3x3 const operator*( MATRIX3x3 const& matrix, S scalar ) +template +MATRIX3x3 const operator*( MATRIX3x3 const& matrix, S scalar ) { MATRIX3x3 result; @@ -316,13 +330,15 @@ template MATRIX3x3 const operator*( MATRIX3x3 const& mat } -template MATRIX3x3 const operator*( S scalar, MATRIX3x3 const& matrix ) +template +MATRIX3x3 const operator*( S scalar, MATRIX3x3 const& matrix ) { return matrix * scalar; } -template MATRIX3x3 MATRIX3x3::Inverse( void ) const +template +MATRIX3x3 MATRIX3x3::Inverse() const { MATRIX3x3 result; @@ -342,7 +358,8 @@ template MATRIX3x3 MATRIX3x3::Inverse( void ) const } -template MATRIX3x3 MATRIX3x3::Transpose( void ) const +template +MATRIX3x3 MATRIX3x3::Transpose() const { MATRIX3x3 result; @@ -358,7 +375,8 @@ template MATRIX3x3 MATRIX3x3::Transpose( void ) const } -template std::ostream& operator<<( std::ostream& aStream, const MATRIX3x3& aMatrix ) +template +std::ostream& operator<<( std::ostream& aStream, const MATRIX3x3& aMatrix ) { for( int i = 0; i < 3; i++ ) { @@ -377,6 +395,7 @@ template std::ostream& operator<<( std::ostream& aStream, const MATRIX3 return aStream; } + /* Default specializations */ typedef MATRIX3x3 MATRIX3x3D; diff --git a/include/math/vector2d.h b/include/math/vector2d.h index 639e2d76aa..514008401e 100644 --- a/include/math/vector2d.h +++ b/include/math/vector2d.h @@ -102,8 +102,8 @@ public: template VECTOR2( const VECTOR2& aVec ) { - x = (T) aVec.x; - y = (T) aVec.y; + x = (T) aVec.x; + y = (T) aVec.y; } /// Casts a vector to another specialized subclass. Beware of rouding @@ -131,7 +131,7 @@ public: * It is used to calculate the length of the vector. * @return Scalar, the euclidean norm */ - extended_type SquaredEuclideanNorm() const; + extended_type SquaredEuclideanNorm() const; /** @@ -258,24 +258,24 @@ VECTOR2::VECTOR2() template VECTOR2::VECTOR2( wxPoint const& aPoint ) { - x = T( aPoint.x ); - y = T( aPoint.y ); + x = T( aPoint.x ); + y = T( aPoint.y ); } template VECTOR2::VECTOR2( wxSize const& aSize ) { - x = T( aSize.x ); - y = T( aSize.y ); + x = T( aSize.x ); + y = T( aSize.y ); } #endif template VECTOR2::VECTOR2( T aX, T aY ) { - x = aX; - y = aY; + x = aX; + y = aY; } @@ -285,14 +285,14 @@ T VECTOR2::EuclideanNorm() const return sqrt( (extended_type) x * x + (extended_type) y * y ); } + template typename VECTOR2::extended_type VECTOR2::SquaredEuclideanNorm() const { - return (extended_type)x * x + (extended_type) y * y ; + return (extended_type) x * x + (extended_type) y * y; } - template double VECTOR2::Angle() const { @@ -311,8 +311,8 @@ VECTOR2 VECTOR2::Perpendicular() const template VECTOR2& VECTOR2::operator=( const VECTOR2& aVector ) { - x = aVector.x; - y = aVector.y; + x = aVector.x; + y = aVector.y; return *this; } @@ -320,8 +320,8 @@ VECTOR2& VECTOR2::operator=( const VECTOR2& aVector ) template VECTOR2& VECTOR2::operator+=( const VECTOR2& aVector ) { - x += aVector.x; - y += aVector.y; + x += aVector.x; + y += aVector.y; return *this; } @@ -329,8 +329,8 @@ VECTOR2& VECTOR2::operator+=( const VECTOR2& aVector ) template VECTOR2& VECTOR2::operator+=( const T& aScalar ) { - x += aScalar; - y += aScalar; + x += aScalar; + y += aScalar; return *this; } @@ -338,8 +338,8 @@ VECTOR2& VECTOR2::operator+=( const T& aScalar ) template VECTOR2& VECTOR2::operator-=( const VECTOR2& aVector ) { - x -= aVector.x; - y -= aVector.y; + x -= aVector.x; + y -= aVector.y; return *this; } @@ -347,8 +347,8 @@ VECTOR2& VECTOR2::operator-=( const VECTOR2& aVector ) template VECTOR2& VECTOR2::operator-=( const T& aScalar ) { - x -= aScalar; - y -= aScalar; + x -= aScalar; + y -= aScalar; return *this; } template @@ -365,15 +365,15 @@ VECTOR2 VECTOR2::Rotate( double aAngle ) const template VECTOR2 VECTOR2::Resize( T aNewLength ) const { - if(x == 0 && y == 0) - return VECTOR2 (0, 0); + if( x == 0 && y == 0 ) + return VECTOR2 ( 0, 0 ); - extended_type l_sq_current = (extended_type)this->x * this->x + (extended_type)this->y * this->y; - extended_type l_sq_new = (extended_type) aNewLength * aNewLength; + extended_type l_sq_current = (extended_type) x * x + (extended_type) y * y; + extended_type l_sq_new = (extended_type) aNewLength * aNewLength; - return VECTOR2 ( - (this->x < 0 ? -1 : 1 ) * sqrt(rescale(l_sq_new, (extended_type) x * x, l_sq_current)), - (this->y < 0 ? -1 : 1 ) * sqrt(rescale(l_sq_new, (extended_type) y * y, l_sq_current))); + return VECTOR2 ( + ( x < 0 ? -1 : 1 ) * sqrt( rescale( l_sq_new, (extended_type) x * x, l_sq_current ) ), + ( y < 0 ? -1 : 1 ) * sqrt( rescale( l_sq_new, (extended_type) y * y, l_sq_current ) ) ); } diff --git a/include/painter.h b/include/painter.h index 5f9631506a..004c93e35e 100644 --- a/include/painter.h +++ b/include/painter.h @@ -38,7 +38,7 @@ class EDA_ITEM; class COLORS_DESIGN_SETTINGS; -namespace KiGfx +namespace KIGFX { class GAL; class VIEW_ITEM; @@ -265,6 +265,6 @@ protected: /// Color of brightened item frame COLOR4D m_brightenedColor; }; -} // namespace KiGfx +} // namespace KIGFX #endif /* __CLASS_PAINTER_H */ diff --git a/include/rtree.h b/include/rtree.h index d507f84e11..ec2d30a806 100644 --- a/include/rtree.h +++ b/include/rtree.h @@ -36,9 +36,9 @@ // RTree.h // -#define RTREE_TEMPLATE template -#define RTREE_SEARCH_TEMPLATE template #define RTREE_QUAL RTree diff --git a/include/tool/action_manager.h b/include/tool/action_manager.h index 6d2a408a8a..239ad606b7 100644 --- a/include/tool/action_manager.h +++ b/include/tool/action_manager.h @@ -76,8 +76,8 @@ public: bool RunAction( const std::string& aActionName ) const; // TODO to be considered - //bool RunAction( int aActionId ) const; - //bool RunAction( TOOL_ACTION* aAction ) const; + // bool RunAction( int aActionId ) const; + // bool RunAction( TOOL_ACTION* aAction ) const; /** * Function RunHotKey() diff --git a/include/tool/coroutine.h b/include/tool/coroutine.h index bbe6409fd6..188034863a 100644 --- a/include/tool/coroutine.h +++ b/include/tool/coroutine.h @@ -32,27 +32,27 @@ #include "delegate.h" /** - Class COROUNTINE. - Implements a coroutine. Wikipedia has a good explanation: - - "Coroutines are computer program components that generalize subroutines to - allow multiple entry points for suspending and resuming execution at certain locations. - Coroutines are well-suited for implementing more familiar program components such as cooperative - tasks, exceptions, event loop, iterators, infinite lists and pipes." - - In other words, a coroutine can be considered a lightweight thread - which can be - preempted only when it deliberately yields the control to the caller. This way, - we avoid concurrency problems such as locking / race conditions. - - Uses boost::context library to do the actual context switching. - - This particular version takes a DELEGATE as an entry point, so it can invoke - methods within a given object as separate coroutines. - - See coroutine_example.cpp for sample code. + * Class COROUNTINE. + * Implements a coroutine. Wikipedia has a good explanation: + * + * "Coroutines are computer program components that generalize subroutines to + * allow multiple entry points for suspending and resuming execution at certain locations. + * Coroutines are well-suited for implementing more familiar program components such as cooperative + * tasks, exceptions, event loop, iterators, infinite lists and pipes." + * + * In other words, a coroutine can be considered a lightweight thread - which can be + * preempted only when it deliberately yields the control to the caller. This way, + * we avoid concurrency problems such as locking / race conditions. + * + * Uses boost::context library to do the actual context switching. + * + * This particular version takes a DELEGATE as an entry point, so it can invoke + * methods within a given object as separate coroutines. + * + * See coroutine_example.cpp for sample code. */ -template +template class COROUTINE { public: @@ -67,8 +67,8 @@ public: * Constructor * Creates a coroutine from a member method of an object */ - template - COROUTINE( T* object, ReturnType (T::*ptr)( ArgType ) ) : + template + COROUTINE( T* object, ReturnType(T::* ptr)( ArgType ) ) : m_func( object, ptr ), m_saved( NULL ), m_stack( NULL ), m_stackSize( c_defaultStackSize ) { } @@ -78,13 +78,14 @@ public: * Creates a coroutine from a delegate object */ COROUTINE( DELEGATE aEntry ) : - m_func( aEntry ), m_saved( NULL ), m_stack( NULL ), m_stackSize( c_defaultStackSize ) + m_func( aEntry ), m_saved( NULL ), m_stack( NULL ), m_stackSize( c_defaultStackSize ) {}; ~COROUTINE() { if( m_saved ) delete m_saved; + if( m_stack ) free( m_stack ); } @@ -114,7 +115,7 @@ public: } /** - * Function SetEntry() + * * Function SetEntry() * * Defines the entry point for the coroutine, if not set in the constructor. */ @@ -135,7 +136,7 @@ public: m_stack = malloc( c_defaultStackSize ); // align to 16 bytes - void *sp = (void *) ( ( ( (ptrdiff_t) m_stack ) + m_stackSize - 0xf ) & ( ~0x0f ) ); + void* sp = (void*) ( ( ( (ptrdiff_t) m_stack ) + m_stackSize - 0xf ) & ( ~0x0f ) ); m_args = &args; m_self = boost::context::make_fcontext( sp, m_stackSize, callerStub ); @@ -157,6 +158,7 @@ public: bool Resume() { boost::context::jump_fcontext( m_saved, m_self, 0 ); + return m_running; } @@ -181,7 +183,7 @@ public: } private: - static const int c_defaultStackSize = 2000000; // fixme: make configurable + static const int c_defaultStackSize = 2000000; // fixme: make configurable /* real entry point of the coroutine */ static void callerStub( intptr_t data ) @@ -194,17 +196,19 @@ private: cor->m_running = false; // go back to wherever we came from. - boost::context::jump_fcontext( cor->m_self, cor->m_saved, 0 ); //reinterpret_cast( this )); + boost::context::jump_fcontext( cor->m_self, cor->m_saved, 0 ); // reinterpret_cast( this )); } - template struct strip_ref + template + struct strip_ref { - typedef T result; + typedef T result; }; - template struct strip_ref + template + struct strip_ref { - typedef T result; + typedef T result; }; DELEGATE m_func; diff --git a/include/tool/delegate.h b/include/tool/delegate.h index 32165b3031..101e10dfa8 100644 --- a/include/tool/delegate.h +++ b/include/tool/delegate.h @@ -32,67 +32,69 @@ * Check delegate_example.cpp for a coding sample. */ -template - class DELEGATE { - public: - typedef ReturnType (DELEGATE::*MemberPointer)( Arg ); - typedef ReturnType _ReturnType; - typedef Arg _ArgType; +template +class DELEGATE +{ +public: + typedef ReturnType (DELEGATE::* MemberPointer)( Arg ); + typedef ReturnType _ReturnType; + typedef Arg _ArgType; - DELEGATE () - { - } + DELEGATE() + { + } - template - DELEGATE ( T* object, ReturnType (T::*ptr)( Arg ) ) - { - m_ptr = reinterpret_cast( ptr ); - m_object = reinterpret_cast( object ); - }; + template + DELEGATE( T* object, ReturnType(T::* ptr)( Arg ) ) + { + m_ptr = reinterpret_cast( ptr ); + m_object = reinterpret_cast( object ); + }; - ReturnType operator()( Arg a ) const - { - DELEGATE *casted = reinterpret_cast*>( m_object ); - return (casted->*m_ptr)(a); - } + ReturnType operator()( Arg a ) const + { + DELEGATE* casted = reinterpret_cast*>( m_object ); + return (casted->*m_ptr)( a ); + } private: MemberPointer m_ptr; - void *m_object; + void* m_object; }; /** * Class DELEGATE0 * Same as DELEGATE, but with no arguments. */ -template - class DELEGATE0 { - public: - typedef ReturnType ( DELEGATE0::*MemberPointer )(); - typedef ReturnType _ReturnType; +template +class DELEGATE0 +{ +public: + typedef ReturnType ( DELEGATE0::* MemberPointer )(); + typedef ReturnType _ReturnType; - DELEGATE0 () - { - } + DELEGATE0() + { + } - template - DELEGATE0 ( T* object, ReturnType (T::*ptr)( ) ) - { - m_ptr = reinterpret_cast( ptr ); - m_object = reinterpret_cast( object ); - }; + template + DELEGATE0( T* object, ReturnType(T::* ptr)() ) + { + m_ptr = reinterpret_cast( ptr ); + m_object = reinterpret_cast( object ); + }; - ReturnType operator()( ) const - { - DELEGATE0* casted = reinterpret_cast*>( m_object ); - return ( casted->*m_ptr )(); - } + ReturnType operator()() const + { + DELEGATE0* casted = reinterpret_cast*>( m_object ); + return ( casted->*m_ptr )(); + } private: MemberPointer m_ptr; - void *m_object; + void* m_object; }; #endif diff --git a/include/tool/examples/coroutine_example.cpp b/include/tool/examples/coroutine_example.cpp index f300da492a..64fbcdc518 100644 --- a/include/tool/examples/coroutine_example.cpp +++ b/include/tool/examples/coroutine_example.cpp @@ -7,39 +7,42 @@ using namespace std; typedef COROUTINE MyCoroutine; -class MyClass { +class MyClass +{ +public: + int CountTo( int n ) + { + printf( "%s: Coroutine says hi. I will count from 1 to %d and yield each value.\n", + __FUNCTION__, + n ); - public: - int CountTo(int n) + for( int i = 1; i <= n; i++ ) { - printf("%s: Coroutine says hi. I will count from 1 to %d and yield each value.\n", __FUNCTION__, n); - for(int i = 1; i <= n; i++) - { - printf("%s: Yielding %d\n", __FUNCTION__, i); - cofunc.Yield(i); - } + printf( "%s: Yielding %d\n", __FUNCTION__, i ); + cofunc.Yield( i ); + } + } + + void Run() + { + cofunc = MyCoroutine( this, &MyClass::CountTo ); + printf( "%s: Calling coroutine that will count from 1 to 5.\n", __FUNCTION__ ); + cofunc.Call( 5 ); + + while( cofunc.Running() ) + { + printf( "%s: Got value: %d\n", __FUNCTION__, cofunc.ReturnValue() ); + cofunc.Resume(); } - void Run() - { - cofunc = MyCoroutine (this, &MyClass::CountTo); - printf("%s: Calling coroutine that will count from 1 to 5.\n", __FUNCTION__); - cofunc.Call(5); - while (cofunc.Running()) - { - printf("%s: Got value: %d\n", __FUNCTION__, cofunc.ReturnValue()); - cofunc.Resume(); - } + printf( "%s: Done!\n", __FUNCTION__ ); + } - printf("%s: Done!\n", __FUNCTION__); - } - - MyCoroutine cofunc; + MyCoroutine cofunc; }; -main() -{ +main() { MyClass obj; obj.Run(); diff --git a/include/tool/examples/delegate_example.cpp b/include/tool/examples/delegate_example.cpp index d5e86a60df..b01a5caeea 100644 --- a/include/tool/examples/delegate_example.cpp +++ b/include/tool/examples/delegate_example.cpp @@ -5,14 +5,15 @@ using namespace std; -class MyClass { - - public: - int MyMethod(const string &arg) - { - printf("MyClass(this = %p)::MyMethod() called with string '%s', length %d\n", this, arg.c_str(), arg.length()); - return arg.length(); - } +class MyClass +{ +public: + int MyMethod( const string& arg ) + { + printf( "MyClass(this = %p)::MyMethod() called with string '%s', length %d\n", this, + arg.c_str(), arg.length() ); + return arg.length(); + } }; typedef DELEGATE MyDelegate; @@ -22,14 +23,14 @@ main() MyClass t1; MyClass t2; + MyDelegate ptr1( &t1, &MyClass::MyMethod ); + MyDelegate ptr2( &t2, &MyClass::MyMethod ); - MyDelegate ptr1 (&t1, &MyClass::MyMethod); - MyDelegate ptr2 (&t2, &MyClass::MyMethod); + int retval1, retval2; - int retval1, retval2; - retval1 = ptr1("apples"); - retval2 = ptr2("cherries"); + retval1 = ptr1( "apples" ); + retval2 = ptr2( "cherries" ); - printf("Object 1 returned %d, object 2 returned %d\n", retval1, retval2); - return 0; + printf( "Object 1 returned %d, object 2 returned %d\n", retval1, retval2 ); + return 0; } diff --git a/include/tool/tool_action.h b/include/tool/tool_action.h index 10ca6f6c6e..af06a1d091 100644 --- a/include/tool/tool_action.h +++ b/include/tool/tool_action.h @@ -46,11 +46,11 @@ class TOOL_ACTION { public: TOOL_ACTION( const std::string& aName, TOOL_ActionScope aScope = AS_CONTEXT, - int aDefaultHotKey = 0, const std::string& aMenuItem = std::string( "" ), - const std::string& aMenuDesc = std::string( "" ) ) : - m_name( aName ), m_scope( aScope ), m_defaultHotKey( aDefaultHotKey ), - m_currentHotKey( aDefaultHotKey ), m_menuItem( aMenuItem ), - m_menuDescription( aMenuDesc ), m_id( -1 ), m_actionMgr( NULL ) + int aDefaultHotKey = 0, const std::string& aMenuItem = std::string( "" ), + const std::string& aMenuDesc = std::string( "" ) ) : + m_name( aName ), m_scope( aScope ), m_defaultHotKey( aDefaultHotKey ), + m_currentHotKey( aDefaultHotKey ), m_menuItem( aMenuItem ), + m_menuDescription( aMenuDesc ), m_id( -1 ), m_actionMgr( NULL ) { } @@ -205,7 +205,7 @@ private: std::string m_menuDescription; // Icon for menu entry - //KiBitmap m_bitmap; + // KiBitmap m_bitmap; /// Unique ID for fast matching. Assigned by ACTION_MANAGER. int m_id; @@ -214,10 +214,10 @@ private: ACTION_MANAGER* m_actionMgr; /// Origin of the action -// const TOOL_BASE* m_origin; +// const TOOL_BASE* m_origin; /// Originating UI object -// wxWindow* m_uiOrigin; +// wxWindow* m_uiOrigin; }; #endif diff --git a/include/tool/tool_base.h b/include/tool/tool_base.h index 1717b00124..c635859b38 100644 --- a/include/tool/tool_base.h +++ b/include/tool/tool_base.h @@ -34,7 +34,7 @@ class EDA_ITEM; class TOOL_MANAGER; -namespace KiGfx +namespace KIGFX { class VIEW; class VIEW_CONTROLS; @@ -66,7 +66,7 @@ public: m_type( aType ), m_toolId( aId ), m_toolName( aName ), - m_toolMgr( NULL ){}; + m_toolMgr( NULL ) {}; virtual ~TOOL_BASE() {}; @@ -130,7 +130,7 @@ protected: * Returns the instance of VIEW object used in the application. It allows tools to draw. * @return The instance of VIEW. */ - KiGfx::VIEW* getView() const; + KIGFX::VIEW* getView() const; /** * Function getViewControls() @@ -139,14 +139,14 @@ protected: * read & modify user input and its settings (eg. show cursor, enable snapping to grid, etc.) * @return The instance of VIEW_CONTROLS. */ - KiGfx::VIEW_CONTROLS* getViewControls() const; + KIGFX::VIEW_CONTROLS* getViewControls() const; /** * Function getEditFrame() * * Returns the application window object, casted to requested user type. */ - template + template T* getEditFrame() const { return static_cast( getEditFrameInt() ); @@ -157,7 +157,7 @@ protected: * * Returns the model object if it matches the requested type. */ - template + template T* getModel( KICAD_T modelType ) const { EDA_ITEM* m = getModelInt(); diff --git a/include/tool/tool_dispatcher.h b/include/tool/tool_dispatcher.h index a9f9c524ec..8bd9783a79 100644 --- a/include/tool/tool_dispatcher.h +++ b/include/tool/tool_dispatcher.h @@ -32,8 +32,8 @@ class TOOL_MANAGER; class PCB_BASE_FRAME; -namespace KiGfx { - class VIEW; +namespace KIGFX { +class VIEW; }; /** @@ -96,22 +96,23 @@ private: bool handleMouseButton( wxEvent& aEvent, int aIndex, bool aMotion ); ///> Saves the state of key modifiers (Alt, Ctrl and so on). - template + template static int decodeModifiers( const EventType* aState ) { int mods = 0; if( aState->ControlDown() ) mods |= MD_ModCtrl; + if( aState->AltDown() ) mods |= MD_ModAlt; + if( aState->ShiftDown() ) mods |= MD_ModShift; return mods; } - ///> Stores all the informations regarding a mouse button state. struct ButtonState; @@ -122,7 +123,7 @@ private: std::vector m_buttons; ///> Returns the instance of VIEW, used by the application. - KiGfx::VIEW* getView(); + KIGFX::VIEW* getView(); ///> Instance of tool manager that cooperates with the dispatcher. TOOL_MANAGER* m_toolMgr; diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index 9d9a1e8bd3..f35f8d1023 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -142,7 +142,7 @@ public: const std::string Format() const; TOOL_EVENT( TOOL_EventCategory aCategory = TC_None, TOOL_Actions aAction = TA_None, - TOOL_ActionScope aScope = AS_GLOBAL ) : + TOOL_ActionScope aScope = AS_GLOBAL ) : m_category( aCategory ), m_actions( aAction ), m_scope( aScope ), @@ -150,40 +150,43 @@ public: m_keyCode( 0 ), m_modifiers( 0 ) {} - TOOL_EVENT( TOOL_EventCategory aCategory, TOOL_Actions aAction, int aExtraParam, TOOL_ActionScope aScope = AS_GLOBAL ) : + TOOL_EVENT( TOOL_EventCategory aCategory, + TOOL_Actions aAction, + int aExtraParam, + TOOL_ActionScope aScope = AS_GLOBAL ) : m_category( aCategory ), m_actions( aAction ), m_scope( aScope ) + { + if( aCategory == TC_Mouse ) { - if( aCategory == TC_Mouse ) - { - m_mouseButtons = aExtraParam & MB_ButtonMask; - } - else if( aCategory == TC_Keyboard ) - { - m_keyCode = aExtraParam & ~MD_ModifierMask; // Filter out modifiers - } - else if ( aCategory == TC_Command ) - { - m_commandId = aExtraParam; - } - - if( aCategory & ( TC_Mouse | TC_Keyboard ) ) - { - m_modifiers = aExtraParam & MD_ModifierMask; - } + m_mouseButtons = aExtraParam & MB_ButtonMask; + } + else if( aCategory == TC_Keyboard ) + { + m_keyCode = aExtraParam & ~MD_ModifierMask; // Filter out modifiers + } + else if( aCategory == TC_Command ) + { + m_commandId = aExtraParam; } + if( aCategory & ( TC_Mouse | TC_Keyboard ) ) + { + m_modifiers = aExtraParam & MD_ModifierMask; + } + } + TOOL_EVENT( TOOL_EventCategory aCategory, TOOL_Actions aAction, - const std::string& aExtraParam, TOOL_ActionScope aScope = AS_GLOBAL ) : + const std::string& aExtraParam, TOOL_ActionScope aScope = AS_GLOBAL ) : m_category( aCategory ), m_actions( aAction ), m_scope( aScope ), m_mouseButtons( 0 ) - { - if( aCategory == TC_Command ) - m_commandStr = aExtraParam; - } + { + if( aCategory == TC_Command ) + m_commandStr = aExtraParam; + } ///> Returns the category (eg. mouse/keyboard/action) of an event.. TOOL_EventCategory Category() const @@ -201,35 +204,35 @@ public: ///> where dragging has started. const VECTOR2D Delta() const { - assert( m_category == TC_Mouse ); // this should be used only with mouse events + assert( m_category == TC_Mouse ); // this should be used only with mouse events return m_mouseDelta; } ///> Returns mouse cursor position in world coordinates. const VECTOR2D& Position() const { - assert( m_category == TC_Mouse ); // this should be used only with mouse events + assert( m_category == TC_Mouse ); // this should be used only with mouse events return m_mousePos; } ///> Returns the point where dragging has started. const VECTOR2D& DragOrigin() const { - assert( m_category == TC_Mouse ); // this should be used only with mouse events + assert( m_category == TC_Mouse ); // this should be used only with mouse events return m_mouseDragOrigin; } ///> Returns information about mouse buttons state. int Buttons() const { - assert( m_category == TC_Mouse ); // this should be used only with mouse events + assert( m_category == TC_Mouse ); // this should be used only with mouse events return m_mouseButtons; } bool IsClick( int aButtonMask = MB_Any ) const { return ( m_actions == TA_MouseClick ) - && ( ( m_mouseButtons & aButtonMask ) == aButtonMask ); + && ( ( m_mouseButtons & aButtonMask ) == aButtonMask ); } bool IsDrag( int aButtonMask = MB_Any ) const @@ -244,7 +247,7 @@ public: bool IsMotion() const { - return ( m_actions == TA_MouseMotion ); + return m_actions == TA_MouseMotion; } bool IsCancel() const @@ -255,7 +258,7 @@ public: ///> Returns information about key modifiers state (Ctrl, Alt, etc.) int Modifier( int aMask = MD_ModifierMask ) const { - return ( m_modifiers & aMask ); + return m_modifiers & aMask; } int KeyCode() const @@ -273,7 +276,7 @@ public: return m_actions == TA_KeyDown; } - void SetMouseDragOrigin( const VECTOR2D &aP ) + void SetMouseDragOrigin( const VECTOR2D& aP ) { m_mouseDragOrigin = aP; } @@ -306,9 +309,10 @@ public: if( m_category == TC_Command ) { if( m_commandStr && aEvent.m_commandStr ) - return ( *m_commandStr == *aEvent.m_commandStr ); + return *m_commandStr == *aEvent.m_commandStr; + if( m_commandId && aEvent.m_commandId ) - return ( *m_commandId == *aEvent.m_commandId ); + return *m_commandId == *aEvent.m_commandId; } return true; @@ -365,7 +369,8 @@ typedef boost::optional OPT_TOOL_EVENT; * A list of TOOL_EVENTs, with overloaded || operators allowing for * concatenating TOOL_EVENTs with little code. */ -class TOOL_EVENT_LIST { +class TOOL_EVENT_LIST +{ public: typedef TOOL_EVENT value_type; typedef std::deque::iterator iterator; @@ -388,11 +393,12 @@ public: */ const std::string Format() const; - boost::optional Matches( const TOOL_EVENT &b ) const + boost::optional Matches( const TOOL_EVENT& b ) const { for( const_iterator i = m_events.begin(); i != m_events.end(); ++i ) - if ( i->Matches( b ) ) + if( i->Matches( b ) ) return *i; + return boost::optional(); } @@ -441,9 +447,9 @@ public: m_events.clear(); for( std::deque::const_iterator i = b.m_events.begin(); - i != b.m_events.end(); ++i ) + i != b.m_events.end(); ++i ) { - m_events.push_back(*i); + m_events.push_back( *i ); } return *this; @@ -481,6 +487,7 @@ inline const TOOL_EVENT_LIST operator||( const TOOL_EVENT& a, const TOOL_EVENT& return l; } + inline const TOOL_EVENT_LIST operator||( const TOOL_EVENT& a, const TOOL_EVENT_LIST& b ) { TOOL_EVENT_LIST l( b ); diff --git a/include/tool/tool_interactive.h b/include/tool/tool_interactive.h index 45259c7616..a6a7e76310 100644 --- a/include/tool/tool_interactive.h +++ b/include/tool/tool_interactive.h @@ -81,9 +81,9 @@ public: * Defines which state (aStateFunc) to go when a certain event arrives (aConditions). * No conditions means any event. */ - template - void Go( int (T::*aStateFunc)( TOOL_EVENT& ), - const TOOL_EVENT_LIST& aConditions = TOOL_EVENT( TC_Any, TA_Any ) ); + template + void Go( int (T::* aStateFunc)( TOOL_EVENT& ), + const TOOL_EVENT_LIST& aConditions = TOOL_EVENT( TC_Any, TA_Any ) ); /** * Function Wait() @@ -91,18 +91,18 @@ public: * Suspends execution of the tool until an event specified in aEventList arrives. * No parameters means waiting for any event. */ - OPT_TOOL_EVENT Wait( const TOOL_EVENT_LIST& aEventList = TOOL_EVENT ( TC_Any, TA_Any ) ); + OPT_TOOL_EVENT Wait( const TOOL_EVENT_LIST& aEventList = TOOL_EVENT (TC_Any, TA_Any) ); /** functions below are not yet implemented - their interface may change */ - /*template + /*template bool InvokeTool( const std::string& aToolName, const Parameters& parameters, ReturnValue& returnValue ); - template + template bool InvokeWindow( const std::string& aWindowName, const Parameters& parameters, ReturnValue& returnValue ); - template + template void Yield( const T& returnValue );*/ protected: @@ -121,11 +121,12 @@ private: }; // hide TOOL_MANAGER implementation -template -void TOOL_INTERACTIVE::Go( int (T::*aStateFunc)( TOOL_EVENT& ), - const TOOL_EVENT_LIST& aConditions ) +template +void TOOL_INTERACTIVE::Go( int (T::* aStateFunc)( TOOL_EVENT& ), + const TOOL_EVENT_LIST& aConditions ) { TOOL_STATE_FUNC sptr( static_cast( this ), aStateFunc ); + goInternal( sptr, aConditions ); } diff --git a/include/tool/tool_manager.h b/include/tool/tool_manager.h index ace86ee5eb..38a2879ccd 100644 --- a/include/tool/tool_manager.h +++ b/include/tool/tool_manager.h @@ -134,16 +134,16 @@ public: * These are made available to the tool. Called by the parent frame (PCB_EDIT_FRAME) * when the board is set up. */ - void SetEnvironment( EDA_ITEM* aModel, KiGfx::VIEW* aView, - KiGfx::VIEW_CONTROLS* aViewControls, wxWindow* aFrame ); + void SetEnvironment( EDA_ITEM* aModel, KIGFX::VIEW* aView, + KIGFX::VIEW_CONTROLS* aViewControls, wxWindow* aFrame ); /* Accessors for the environment objects (view, model, etc.) */ - KiGfx::VIEW* GetView() const + KIGFX::VIEW* GetView() const { return m_view; } - KiGfx::VIEW_CONTROLS* GetViewControls() const + KIGFX::VIEW_CONTROLS* GetViewControls() const { return m_viewControls; } @@ -163,7 +163,7 @@ public: * to be called. Called by TOOL_INTERACTIVE::Go(). May be called from a coroutine context. */ void ScheduleNextState( TOOL_BASE* aTool, TOOL_STATE_FUNC& aHandler, - const TOOL_EVENT_LIST& aConditions ); + const TOOL_EVENT_LIST& aConditions ); /** * Pauses execution of a given tool until one or more events matching aConditions arrives. @@ -171,7 +171,7 @@ public: * Called only from coroutines. */ boost::optional ScheduleWait( TOOL_BASE* aTool, - const TOOL_EVENT_LIST& aConditions ); + const TOOL_EVENT_LIST& aConditions ); /** * Sets behaviour of the tool's context popup menu. @@ -183,7 +183,7 @@ public: * May be called from a coroutine context. */ void ScheduleContextMenu( TOOL_BASE* aTool, CONTEXT_MENU* aMenu, - CONTEXT_MENU_TRIGGER aTrigger ); + CONTEXT_MENU_TRIGGER aTrigger ); /** * Allows a tool to pass the already handled event to the next tool on the stack. @@ -251,7 +251,7 @@ private: bool runTool( TOOL_BASE* aTool ); template - void invokeTool( const std::string& aName, const Parameters& aToolParams ); + void invokeTool( const std::string& aName, const Parameters& aToolParams ); /** * Function finishTool() @@ -270,7 +270,7 @@ private: */ bool isRegistered( TOOL_BASE* aTool ) const { - return ( m_toolState.count( aTool ) > 0 ); + return m_toolState.count( aTool ) > 0; } /** @@ -298,8 +298,8 @@ private: ACTION_MANAGER* m_actionMgr; EDA_ITEM* m_model; - KiGfx::VIEW* m_view; - KiGfx::VIEW_CONTROLS* m_viewControls; + KIGFX::VIEW* m_view; + KIGFX::VIEW_CONTROLS* m_viewControls; wxWindow* m_editFrame; /// Flag saying if the currently processed event should be passed to other tools. diff --git a/include/view/view.h b/include/view/view.h index 9abf733f47..31268839ba 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -32,7 +32,7 @@ #include #include -namespace KiGfx +namespace KIGFX { class PAINTER; class GAL; @@ -76,14 +76,14 @@ public: * Adds a VIEW_ITEM to the view. * @param aItem: item to be added. No ownership is given */ - void Add( VIEW_ITEM* aItem ); + void Add( VIEW_ITEM* aItem ); /** * Function Remove() * Removes a VIEW_ITEM from the view. * @param aItem: item to be removed. Caller must dispose the removed item if necessary */ - void Remove( VIEW_ITEM* aItem ); + void Remove( VIEW_ITEM* aItem ); /** * Function Query() @@ -94,7 +94,7 @@ public: * first). * @return Number of found items. */ - int Query( const BOX2I& aRect, std::vector& aResult ); + int Query( const BOX2I& aRect, std::vector& aResult ); /** * Function SetRequired() @@ -104,19 +104,19 @@ public: * @param aRequiredId is the id of the required layer. * @param aRequired tells if the required layer should be added or removed from the list. */ - void SetRequired( int aLayerId, int aRequiredId, bool aRequired = true ); + void SetRequired( int aLayerId, int aRequiredId, bool aRequired = true ); /** * Function CopySettings() * Copies layers and visibility settings from another view. * @param aOtherView: view from which settings will be copied. */ - void CopySettings( const VIEW* aOtherView ); + void CopySettings( const VIEW* aOtherView ); /* * Convenience wrappers for adding multiple items - * template void AddItems( const T& aItems ); - * template void RemoveItems( const T& aItems ); + * template void AddItems( const T& aItems ); + * template void RemoveItems( const T& aItems ); */ /** @@ -124,27 +124,27 @@ public: * Assigns a rendering device for the VIEW. * @param aGal: pointer to the GAL output device */ - void SetGAL( GAL* aGal ); + void SetGAL( GAL* aGal ); /** * Function GetGAL() * Returns the GAL this view is using to draw graphical primitives. * @return Pointer to the currently used GAL instance. */ - GAL* GetGAL() const { return m_gal; } + GAL* GetGAL() const { return m_gal; } /** * Function SetPainter() * Sets the painter object used by the view for drawing VIEW_ITEMS. */ - void SetPainter( PAINTER* aPainter ); + void SetPainter( PAINTER* aPainter ); /** * Function GetPainter() * Returns the painter object used by the view for drawing VIEW_ITEMS. * @return Pointer to the currently used Painter instance. */ - PAINTER* GetPainter() const { return m_painter; }; + PAINTER* GetPainter() const { return m_painter; }; /** * Function SetViewport() @@ -152,14 +152,14 @@ public: * @param aViewport: desired visible area, in world space coordinates. * @param aKeepProportions: when true, the X/Y size proportions are kept. */ - void SetViewport( const BOX2D& aViewport, bool aKeepProportions = true ); + void SetViewport( const BOX2D& aViewport, bool aKeepProportions = true ); /** * Function GetViewport() * Returns the current viewport visible area rectangle. * @return Current viewport rectangle */ - BOX2D GetViewport() const; + BOX2D GetViewport() const; /** * Function SetMirror() @@ -167,7 +167,7 @@ public: * @param aMirrorX: when true, the X axis is mirrored * @param aMirrorY: when true, the Y axis is mirrored. */ - void SetMirror( bool aMirrorX, bool aMirrorY ); + void SetMirror( bool aMirrorX, bool aMirrorY ); /** * Function SetScale() @@ -175,7 +175,7 @@ public: * (depending on correct GAL unit length & DPI settings). * @param aScale: the scalefactor */ - void SetScale( double aScale ); + void SetScale( double aScale ); /** * Function SetScale() @@ -183,7 +183,7 @@ public: * (depending on correct GAL unit length & DPI settings). * @param aScale: the scale factor */ - void SetScale( double aScale, const VECTOR2D& aAnchor ); + void SetScale( double aScale, const VECTOR2D& aAnchor ); /** * Function GetScale() @@ -197,7 +197,7 @@ public: * of the screen). * @param aCenter: the new center point, in world space coordinates. */ - void SetCenter( const VECTOR2D& aCenter ); + void SetCenter( const VECTOR2D& aCenter ); /** * Function GetCenter() @@ -212,7 +212,7 @@ public: * @param aCoord: the point/vector to be converted * @param aAbsolute: when true, aCoord is treated as a point, otherwise - as a direction (vector) */ - VECTOR2D ToWorld( const VECTOR2D& aCoord, bool aAbsolute = true ) const; + VECTOR2D ToWorld( const VECTOR2D& aCoord, bool aAbsolute = true ) const; /** * Function ToScreen() @@ -220,7 +220,7 @@ public: * @param aCoord: the point/vector to be converted * @param aAbsolute: when true, aCoord is treated as a point, otherwise - as a direction (vector) */ - VECTOR2D ToScreen( const VECTOR2D& aCoord, bool aAbsolute = true ) const; + VECTOR2D ToScreen( const VECTOR2D& aCoord, bool aAbsolute = true ) const; /** * Function ToScreen() @@ -228,14 +228,14 @@ public: * @param aCoord: the coordinate to be transformed. * @param aAbsolute: when true, aCoord is treated as a point, otherwise - as a direction (vector) */ - double ToScreen( double aCoord, bool aAbsolute = true ) const; + double ToScreen( double aCoord, bool aAbsolute = true ) const; /** * Function GetScreenPixelSize() * Returns the size of the our rendering area, in pixels. * @return viewport screen size */ - VECTOR2D GetScreenPixelSize() const; + VECTOR2D GetScreenPixelSize() const; /** * Function AddLayer() @@ -244,20 +244,20 @@ public: * @param aDisplayOnly: layer is display-only (example: selection boxes, floating hints/menus). * Objects belonging to this layer are not taken into account by Query() method. */ - void AddLayer( int aLayer, bool aDisplayOnly = false ); + void AddLayer( int aLayer, bool aDisplayOnly = false ); /** * Function ClearLayer() * Removes all items from a given layer. * @param aLayer: ID of the layer to be cleared */ - void ClearLayer( int aLayer ); + void ClearLayer( int aLayer ); /** * Function Clear() * Removes all items from the view. */ - void Clear(); + void Clear(); /** * Function SetLayerVisible() @@ -302,7 +302,7 @@ public: * @param aLayer: the layer * @param aRenderingOrder: arbitrary number denoting the rendering order. */ - void SetLayerOrder( int aLayer, int aRenderingOrder ); + void SetLayerOrder( int aLayer, int aRenderingOrder ); /** * Function GetLayerOrder() @@ -310,7 +310,7 @@ public: * @param aLayer: the layer * @return Rendering order of a particular layer. */ - int GetLayerOrder( int aLayer ) const; + int GetLayerOrder( int aLayer ) const; /** * Function SortLayers() @@ -320,7 +320,7 @@ public: * @param aLayers stores id of layers to be sorted. * @param aCount stores the number of layers. */ - void SortLayers( int aLayers[], int& aCount ) const; + void SortLayers( int aLayers[], int& aCount ) const; /** * Function UpdateLayerColor() @@ -328,14 +328,14 @@ public: * @param aLayer is a number of the layer to be updated. * @see RENDER_SETTINGS */ - void UpdateLayerColor( int aLayer ); + void UpdateLayerColor( int aLayer ); /** * Function UpdateAllLayersColor() * Applies the new coloring scheme to all layers. The used scheme is held by RENDER_SETTINGS. * @see RENDER_SETTINGS */ - void UpdateAllLayersColor(); + void UpdateAllLayersColor(); /** * Function ChangeLayerDepth() @@ -343,7 +343,7 @@ public: * @param aLayer is a number of the layer to be updated. * @param aDepth is the new depth. */ - void ChangeLayerDepth( int aLayer, int aDepth ); + void ChangeLayerDepth( int aLayer, int aDepth ); /** * Function SetTopLayer() @@ -351,7 +351,7 @@ public: * @param aLayer: the layer or -1 in case when no particular layer should * be displayed on the top. */ - void SetTopLayer( int aLayer, bool aEnabled = true ); + void SetTopLayer( int aLayer, bool aEnabled = true ); /** * Function EnableTopLayer() @@ -360,42 +360,42 @@ public: * layer set previously with SetTopLayer function. * @param aEnabled: whether to enable or disable display of the top layer. */ - void EnableTopLayer( bool aEnable ); + void EnableTopLayer( bool aEnable ); - int GetTopLayer() const; + int GetTopLayer() const; /** * Function ClearTopLayers() * Removes all layers from the on-the-top set (they are no longer displayed over the rest of * layers). */ - void ClearTopLayers(); + void ClearTopLayers(); /** * Function UpdateLayerOrder() * Does everything that is needed to apply the rendering order of layers. It has to be called * after modification of renderingOrder field of LAYER. */ - void UpdateAllLayersOrder(); + void UpdateAllLayersOrder(); /** * Function ClearTargets() * Clears targets that are marked as dirty. */ - void ClearTargets(); + void ClearTargets(); /** * Function Redraw() * Immediately redraws the whole view. */ - void Redraw(); + void Redraw(); /** * Function PartialRedraw() * Redraws only the parts of the view that have been affected by items * for which ViewUpdate() function has been called since last redraw. */ - void PartialRedraw(); + void PartialRedraw(); /** * Function RecacheAllItems() @@ -403,21 +403,21 @@ public: * @param aForceNow decides if every item should be instantly recached. Otherwise items are * going to be recached when they become visible. */ - void RecacheAllItems( bool aForceNow = false ); + void RecacheAllItems( bool aForceNow = false ); /** * Function IsDynamic() * Tells if the VIEW is dynamic (ie. can be changed, for example displaying PCBs in a window) * or static (that cannot be modified, eg. displaying image/PDF). */ - bool IsDynamic() const { return m_dynamic; } + bool IsDynamic() const { return m_dynamic; } /** * Function IsDirty() * Returns true if any of the VIEW layers needs to be refreshened. * @return True in case if any of layers is marked as dirty. */ - bool IsDirty() const; + bool IsDirty() const; /** * Function IsTargetDirty() @@ -442,7 +442,7 @@ public: /// Returns true if the layer is cached inline bool IsCached( int aLayer ) const { - return ( m_layers.at( aLayer ).target == TARGET_CACHED ); + return m_layers.at( aLayer ).target == TARGET_CACHED; } /** @@ -526,7 +526,7 @@ private: * @param aImmediate dictates the way of drawing - it allows to force immediate drawing mode * for cached items. */ - void draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate = false ) const; + void draw( VIEW_ITEM* aItem, int aLayer, bool aImmediate = false ) const; /** * Function draw() @@ -536,7 +536,7 @@ private: * @param aImmediate dictates the way of drawing - it allows to force immediate drawing mode * for cached items. */ - void draw( VIEW_ITEM* aItem, bool aImmediate = false ) const; + void draw( VIEW_ITEM* aItem, bool aImmediate = false ) const; /** * Function draw() @@ -546,7 +546,7 @@ private: * @param aImmediate dictates the way of drawing - it allows to force immediate drawing mode * for cached items. */ - void draw( VIEW_GROUP* aGroup, bool aImmediate = false ) const; + void draw( VIEW_GROUP* aGroup, bool aImmediate = false ) const; ///* Manages dirty flags & redraw queueing when updating an item. Called internally @@ -585,42 +585,42 @@ private: bool m_enableOrderModifier; /// Contains set of possible displayed layers and its properties - LayerMap m_layers; + LayerMap m_layers; /// Sorted list of pointers to members of m_layers - LayerOrder m_orderedLayers; + LayerOrder m_orderedLayers; /// Stores set of layers that are displayed on the top std::set m_topLayers; /// Center point of the VIEW (the point at which we are looking at) - VECTOR2D m_center; + VECTOR2D m_center; /// Scale of displayed VIEW_ITEMs - double m_scale; + double m_scale; /// PAINTER contains information how do draw items - PAINTER* m_painter; + PAINTER* m_painter; /// Gives interface to PAINTER, that is used to draw items - GAL* m_gal; + GAL* m_gal; /// Dynamic VIEW (eg. display PCB in window) allows changes once it is built, /// static (eg. image/PDF) - does not. - bool m_dynamic; + bool m_dynamic; /// Flags to mark targets as dirty, so they have to be redrawn on the next refresh event - bool m_dirtyTargets[TARGETS_NUMBER]; + bool m_dirtyTargets[TARGETS_NUMBER]; /// Rendering order modifier for layers that are marked as top layers static const int TOP_LAYER_MODIFIER = -VIEW_MAX_LAYERS; /// Panning boundaries - BOX2I m_panBoundary; + BOX2I m_panBoundary; /// Zoom limits - VECTOR2D m_scaleLimits; + VECTOR2D m_scaleLimits; }; -} // namespace KiGfx +} // namespace KIGFX #endif diff --git a/include/view/view_controls.h b/include/view/view_controls.h index f160de287a..df8311da1d 100644 --- a/include/view/view_controls.h +++ b/include/view/view_controls.h @@ -34,7 +34,7 @@ #include -namespace KiGfx +namespace KIGFX { class VIEW; @@ -167,6 +167,6 @@ protected: /// How fast is panning when in auto mode float m_autoPanSpeed; }; -} // namespace KiGfx +} // namespace KIGFX #endif diff --git a/include/view/view_group.h b/include/view/view_group.h index bdec53eacb..711d1b4031 100644 --- a/include/view/view_group.h +++ b/include/view/view_group.h @@ -36,9 +36,8 @@ #include #include -namespace KiGfx +namespace KIGFX { - class VIEW_GROUP : public VIEW_ITEM { public: @@ -146,7 +145,7 @@ public: * * @return Pointer to the VIEW instance. */ - KiGfx::VIEW* GetView() const + KIGFX::VIEW* GetView() const { return m_view; } @@ -186,6 +185,6 @@ private: /// Container for storing VIEW_ITEMs std::set m_items; }; -} // namespace KiGfx +} // namespace KIGFX #endif // VIEW_GROUP_H_ diff --git a/include/view/view_item.h b/include/view/view_item.h index 13f7ec0d6b..8ecf1ecc00 100644 --- a/include/view/view_item.h +++ b/include/view/view_item.h @@ -40,7 +40,8 @@ * Enum KICAD_T * is the set of class identification values, stored in EDA_ITEM::m_StructType */ -enum KICAD_T { +enum KICAD_T +{ NOT_USED = -1, ///< the 3d code uses this value EOT = 0, ///< search types array terminator (End Of Types) @@ -134,7 +135,7 @@ enum KICAD_T { }; -namespace KiGfx +namespace KIGFX { // Forward declarations class GAL; @@ -347,7 +348,7 @@ protected: */ inline virtual bool storesGroups() const { - return ( m_groupsSize > 0 ); + return m_groupsSize > 0; } /// Stores layer numbers used by the item. @@ -367,8 +368,7 @@ protected: for( int i = 0; i < aCount; ++i ) m_layers.set( aLayers[i] ); } - }; -} // namespace KiGfx +} // namespace KIGFX #endif diff --git a/include/view/view_rtree.h b/include/view/view_rtree.h index 168cf280dc..973ac7943e 100644 --- a/include/view/view_rtree.h +++ b/include/view/view_rtree.h @@ -29,7 +29,7 @@ #include -namespace KiGfx +namespace KIGFX { typedef RTree VIEW_RTREE_BASE; @@ -88,6 +88,6 @@ public: private: }; -} // namespace KiGfx +} // namespace KIGFX #endif diff --git a/include/view/wx_view_controls.h b/include/view/wx_view_controls.h index 1c2ef1ea0f..6d946e0184 100644 --- a/include/view/wx_view_controls.h +++ b/include/view/wx_view_controls.h @@ -38,7 +38,7 @@ class EDA_DRAW_PANEL_GAL; -namespace KiGfx +namespace KIGFX { /** * Class WX_VIEW_CONTROLS @@ -74,6 +74,7 @@ public: void SetAutoPan( bool aEnabled ) { m_autoPanEnabled = aEnabled; + if( m_state == AUTO_PANNING ) m_state = IDLE; } @@ -90,7 +91,8 @@ public: private: /// Possible states for WX_VIEW_CONTROLS - enum State { + enum State + { IDLE = 1, /// Nothing is happening DRAG_PANNING, /// Panning with mouse button pressed AUTO_PANNING, /// Panning on approaching borders of the frame @@ -127,6 +129,6 @@ private: /// Timer repsonsible for handling autopanning wxTimer m_panTimer; }; -} // namespace KiGfx +} // namespace KIGFX #endif diff --git a/include/worksheet_viewitem.h b/include/worksheet_viewitem.h index fd7595f626..6380af9fd8 100644 --- a/include/worksheet_viewitem.h +++ b/include/worksheet_viewitem.h @@ -40,7 +40,7 @@ class WS_DRAW_ITEM_RECT; class WS_DRAW_ITEM_POLYGON; class WS_DRAW_ITEM_TEXT; -namespace KiGfx +namespace KIGFX { class GAL; diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 472992216e..842b70f72d 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -172,7 +172,7 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) if( m_galCanvas ) { - KiGfx::VIEW* view = m_galCanvas->GetView(); + KIGFX::VIEW* view = m_galCanvas->GetView(); ViewReloadBoard( m_Pcb ); @@ -185,7 +185,7 @@ void PCB_BASE_FRAME::SetBoard( BOARD* aBoard ) void PCB_BASE_FRAME::ViewReloadBoard( const BOARD* aBoard ) const { - KiGfx::VIEW* view = m_galCanvas->GetView(); + KIGFX::VIEW* view = m_galCanvas->GetView(); view->Clear(); // All of PCB drawing elements should be added to the VIEW @@ -194,7 +194,7 @@ void PCB_BASE_FRAME::ViewReloadBoard( const BOARD* aBoard ) const // Load zones for( int i = 0; i < aBoard->GetAreaCount(); ++i ) { - view->Add( (KiGfx::VIEW_ITEM*) ( aBoard->GetArea( i ) ) ); + view->Add( (KIGFX::VIEW_ITEM*) ( aBoard->GetArea( i ) ) ); } // Load drawings @@ -240,7 +240,7 @@ void PCB_BASE_FRAME::ViewReloadBoard( const BOARD* aBoard ) const } // Add an entry for the worksheet layout - KiGfx::WORKSHEET_VIEWITEM* worksheet = new KiGfx::WORKSHEET_VIEWITEM( + KIGFX::WORKSHEET_VIEWITEM* worksheet = new KIGFX::WORKSHEET_VIEWITEM( std::string( aBoard->GetFileName().mb_str() ), std::string( GetScreenDesc().mb_str() ), &GetPageSettings(), &GetTitleBlock() ); @@ -520,10 +520,10 @@ void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent ) m_DisplayPadFill = DisplayOpt.DisplayPadFill = !m_DisplayPadFill; // Apply new display options to the GAL canvas - KiGfx::PCB_PAINTER* painter = - static_cast ( m_galCanvas->GetView()->GetPainter() ); - KiGfx::PCB_RENDER_SETTINGS* settings = - static_cast ( painter->GetSettings() ); + KIGFX::PCB_PAINTER* painter = + static_cast ( m_galCanvas->GetView()->GetPainter() ); + KIGFX::PCB_RENDER_SETTINGS* settings = + static_cast ( painter->GetSettings() ); settings->LoadDisplayOptions( DisplayOpt ); m_galCanvas->GetView()->RecacheAllItems( true ); @@ -856,13 +856,13 @@ void PCB_BASE_FRAME::LoadSettings() m_DisplayModText = FILLED; // Apply display settings for GAL - KiGfx::VIEW* view = m_galCanvas->GetView(); + KIGFX::VIEW* view = m_galCanvas->GetView(); // Set rendering order and properties of layers for( LAYER_NUM i = 0; (unsigned) i < sizeof(GAL_LAYER_ORDER) / sizeof(LAYER_NUM); ++i ) { LAYER_NUM layer = GAL_LAYER_ORDER[i]; - wxASSERT( layer < KiGfx::VIEW::VIEW_MAX_LAYERS ); + wxASSERT( layer < KIGFX::VIEW::VIEW_MAX_LAYERS ); view->SetLayerOrder( layer, i ); @@ -870,13 +870,13 @@ void PCB_BASE_FRAME::LoadSettings() { // Copper layers are required for netname layers view->SetRequired( GetNetnameLayer( layer ), layer ); - view->SetLayerTarget( layer, KiGfx::TARGET_CACHED ); + view->SetLayerTarget( layer, KIGFX::TARGET_CACHED ); } else if( IsNetnameLayer( layer ) ) { // Netnames are drawn only when scale is sufficient (level of details) // so there is no point in caching them - view->SetLayerTarget( layer, KiGfx::TARGET_NONCACHED ); + view->SetLayerTarget( layer, KIGFX::TARGET_NONCACHED ); } } @@ -895,12 +895,12 @@ void PCB_BASE_FRAME::LoadSettings() view->SetRequired( SOLDERPASTE_N_BACK, ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); view->SetRequired( SOLDERMASK_N_BACK, ITEM_GAL_LAYER( PAD_BK_VISIBLE ) ); - view->SetLayerTarget( ITEM_GAL_LAYER( GP_OVERLAY ), KiGfx::TARGET_OVERLAY ); + view->SetLayerTarget( ITEM_GAL_LAYER( GP_OVERLAY ), KIGFX::TARGET_OVERLAY ); // Apply layer coloring scheme & display options if( view->GetPainter() ) { - KiGfx::PCB_RENDER_SETTINGS* settings = new KiGfx::PCB_RENDER_SETTINGS(); + KIGFX::PCB_RENDER_SETTINGS* settings = new KIGFX::PCB_RENDER_SETTINGS(); // Load layers' colors from PCB data settings->ImportLegacyColors( m_Pcb->GetColorsSettings() ); diff --git a/pcbnew/class_pcb_layer_widget.cpp b/pcbnew/class_pcb_layer_widget.cpp index f7cf1e2a98..68811af01d 100644 --- a/pcbnew/class_pcb_layer_widget.cpp +++ b/pcbnew/class_pcb_layer_widget.cpp @@ -396,7 +396,7 @@ void PCB_LAYER_WIDGET::OnLayerVisible( LAYER_NUM aLayer, bool isVisible, bool is EDA_DRAW_PANEL_GAL* galCanvas = myframe->GetGalCanvas(); if( galCanvas ) { - KiGfx::VIEW* view = galCanvas->GetView(); + KIGFX::VIEW* view = galCanvas->GetView(); view->SetLayerVisible( aLayer, isVisible ); } @@ -418,7 +418,7 @@ void PCB_LAYER_WIDGET::OnRenderEnable( int aId, bool isEnabled ) EDA_DRAW_PANEL_GAL *galCanvas = myframe->GetGalCanvas(); if( galCanvas ) { - KiGfx::VIEW* view = galCanvas->GetView(); + KIGFX::VIEW* view = galCanvas->GetView(); view->SetLayerVisible( ITEM_GAL_LAYER( aId ), isEnabled ); } diff --git a/pcbnew/dialogs/dialog_display_options.cpp b/pcbnew/dialogs/dialog_display_options.cpp index 8b44757d90..0aa91d1302 100644 --- a/pcbnew/dialogs/dialog_display_options.cpp +++ b/pcbnew/dialogs/dialog_display_options.cpp @@ -170,10 +170,10 @@ void DIALOG_DISPLAY_OPTIONS::OnOkClick(wxCommandEvent& event) DisplayOpt.DisplayNetNamesMode = m_ShowNetNamesOption->GetSelection(); // Apply changes to the GAL - KiGfx::VIEW* view = m_Parent->GetGalCanvas()->GetView(); - KiGfx::PCB_PAINTER* painter = static_cast( view->GetPainter() ); - KiGfx::PCB_RENDER_SETTINGS* settings = - static_cast( painter->GetSettings() ); + KIGFX::VIEW* view = m_Parent->GetGalCanvas()->GetView(); + KIGFX::PCB_PAINTER* painter = static_cast( view->GetPainter() ); + KIGFX::PCB_RENDER_SETTINGS* settings = + static_cast( painter->GetSettings() ); settings->LoadDisplayOptions( DisplayOpt ); view->RecacheAllItems( true ); diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index f6f21655ac..0c4e43290b 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -159,10 +159,10 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) { int id = event.GetId(); bool state = event.IsChecked(); - KiGfx::PCB_PAINTER* painter = - static_cast ( m_galCanvas->GetView()->GetPainter() ); - KiGfx::PCB_RENDER_SETTINGS* settings = - static_cast ( painter->GetSettings() ); + KIGFX::PCB_PAINTER* painter = + static_cast ( m_galCanvas->GetView()->GetPainter() ); + KIGFX::PCB_RENDER_SETTINGS* settings = + static_cast ( painter->GetSettings() ); bool recache = false; switch( id ) diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index bf0c7d3b94..4cbf44d190 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -41,7 +41,7 @@ #include #include -using namespace KiGfx; +using namespace KIGFX; PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS() { diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 7f9844ee41..7427e3756f 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -49,7 +49,7 @@ class TEXTE_MODULE; class DIMENSION; class PCB_TARGET; -namespace KiGfx +namespace KIGFX { class GAL; @@ -152,6 +152,6 @@ protected: void draw( const DIMENSION*, int ); void draw( const PCB_TARGET* ); }; -} // namespace KiGfx +} // namespace KIGFX #endif /* __CLASS_PAINTER_H */ diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index a5b7b933ee..6a414fc60d 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -774,8 +774,8 @@ bool PCB_EDIT_FRAME::IsMicroViaAcceptable( void ) void PCB_EDIT_FRAME::setHighContrastLayer( LAYER_NUM aLayer ) { // Set display settings for high contrast mode - KiGfx::VIEW* view = m_galCanvas->GetView(); - KiGfx::RENDER_SETTINGS* rSettings = view->GetPainter()->GetSettings(); + KIGFX::VIEW* view = m_galCanvas->GetView(); + KIGFX::RENDER_SETTINGS* rSettings = view->GetPainter()->GetSettings(); setTopLayer( aLayer ); @@ -817,7 +817,7 @@ void PCB_EDIT_FRAME::setHighContrastLayer( LAYER_NUM aLayer ) void PCB_EDIT_FRAME::setTopLayer( LAYER_NUM aLayer ) { // Set display settings for high contrast mode - KiGfx::VIEW* view = m_galCanvas->GetView(); + KIGFX::VIEW* view = m_galCanvas->GetView(); view->ClearTopLayers(); view->SetTopLayer( aLayer ); @@ -887,7 +887,7 @@ void PCB_EDIT_FRAME::syncLayerVisibilities() { m_Layers->SyncLayerVisibilities(); - KiGfx::VIEW* view = m_galCanvas->GetView(); + KIGFX::VIEW* view = m_galCanvas->GetView(); // Load layer & elements visibility settings for( LAYER_NUM i = 0; i < NB_LAYERS; ++i ) { diff --git a/pcbnew/router/direction.h b/pcbnew/router/direction.h index d8584f6ff7..a984d965cb 100644 --- a/pcbnew/router/direction.h +++ b/pcbnew/router/direction.h @@ -329,4 +329,3 @@ private: }; #endif // __DIRECTION_H - diff --git a/pcbnew/router/pns_index.h b/pcbnew/router/pns_index.h index 6bd556b460..05d612e597 100644 --- a/pcbnew/router/pns_index.h +++ b/pcbnew/router/pns_index.h @@ -260,4 +260,3 @@ PNS_INDEX::NetItemsList* PNS_INDEX::GetItemsForNet( int aNet ) } #endif - diff --git a/pcbnew/router/pns_item.cpp b/pcbnew/router/pns_item.cpp index d2b79dddb9..68e04a41c0 100644 --- a/pcbnew/router/pns_item.cpp +++ b/pcbnew/router/pns_item.cpp @@ -86,4 +86,3 @@ const std::string PNS_ITEM::GetKindStr() const PNS_ITEM::~PNS_ITEM() { } - diff --git a/pcbnew/router/pns_item.h b/pcbnew/router/pns_item.h index a9b2da49e4..e9c856e086 100644 --- a/pcbnew/router/pns_item.h +++ b/pcbnew/router/pns_item.h @@ -150,9 +150,8 @@ protected: PNS_NODE* m_owner; PNS_LAYERSET m_layers; - bool m_movable; - int m_net; + bool m_movable; + int m_net; }; -#endif // __PNS_ITEM_Ha - +#endif // __PNS_ITEM_H diff --git a/pcbnew/router/pns_itemset.cpp b/pcbnew/router/pns_itemset.cpp index 1e6a603ae6..ebe69dc555 100644 --- a/pcbnew/router/pns_itemset.cpp +++ b/pcbnew/router/pns_itemset.cpp @@ -79,4 +79,3 @@ PNS_ITEMSET& PNS_ITEMSET::FilterNet( int aNet ) m_items = newItems; return *this; } - diff --git a/pcbnew/router/pns_itemset.h b/pcbnew/router/pns_itemset.h index fa46241337..da2c4a6634 100644 --- a/pcbnew/router/pns_itemset.h +++ b/pcbnew/router/pns_itemset.h @@ -60,4 +60,3 @@ private: }; #endif - diff --git a/pcbnew/router/pns_joint.h b/pcbnew/router/pns_joint.h index d9b351e700..4fd63e177a 100644 --- a/pcbnew/router/pns_joint.h +++ b/pcbnew/router/pns_joint.h @@ -89,8 +89,8 @@ public: m_linkedItems[1]->GetKind() != SEGMENT ) return false; - PNS_SEGMENT* seg1 = static_cast (m_linkedItems[0]); - PNS_SEGMENT* seg2 = static_cast (m_linkedItems[1]); + PNS_SEGMENT* seg1 = static_cast( m_linkedItems[0] ); + PNS_SEGMENT* seg2 = static_cast( m_linkedItems[1] ); // joints between segments of different widths are not trivial. return seg1->GetWidth() == seg2->GetWidth(); @@ -166,7 +166,7 @@ public: // fixme: duplicate links (?) for( LinkedItems::const_iterator i = aJoint.m_linkedItems.begin(); - i != aJoint.m_linkedItems.end(); ++i ) + i != aJoint.m_linkedItems.end(); ++i ) m_linkedItems.push_back( *i ); } @@ -204,4 +204,3 @@ inline std::size_t hash_value( PNS_JOINT::HashTag const& p ) } #endif // __PNS_JOINT_H - diff --git a/pcbnew/router/pns_layerset.h b/pcbnew/router/pns_layerset.h index 6baa9b51f8..eedc00e31e 100644 --- a/pcbnew/router/pns_layerset.h +++ b/pcbnew/router/pns_layerset.h @@ -117,4 +117,3 @@ private: }; #endif // __PNS_LAYERSET_H - diff --git a/pcbnew/router/pns_line.cpp b/pcbnew/router/pns_line.cpp index 65e4386004..0f3583ff59 100644 --- a/pcbnew/router/pns_line.cpp +++ b/pcbnew/router/pns_line.cpp @@ -37,7 +37,7 @@ PNS_LINE* PNS_LINE::Clone() const PNS_LINE* l = new PNS_LINE(); l->m_line = m_line; - l->m_width = m_width; + l->m_width = m_width; l->m_layers = m_layers; l->m_net = m_net; l->m_movable = m_movable; @@ -434,8 +434,8 @@ void PNS_LINE::NewWalkaround( const SHAPE_LINE_CHAIN& aObstacle, path.Append( l_hull.CPoint( j ) ); li = l_orig.Find( l_hull.CPoint( j ) ); - if( li >= 0 && ( li == (l_orig.PointCount() - 1 ) || - outside[li + 1]) ) + if( li >= 0 && ( li == ( l_orig.PointCount() - 1 ) || + outside[li + 1] ) ) break; } @@ -755,9 +755,8 @@ void PNS_LINE::ShowLinks() return; } - printf( "line %p: %d linked segs\n", this, (int)m_segmentRefs->size() ); + printf( "line %p: %d linked segs\n", this, (int) m_segmentRefs->size() ); for( int i = 0; i < (int) m_segmentRefs->size(); i++ ) printf( "seg %d: %p\n", i, (*m_segmentRefs)[i] ); } - diff --git a/pcbnew/router/pns_line.h b/pcbnew/router/pns_line.h index 375c34e804..ebd07750cf 100644 --- a/pcbnew/router/pns_line.h +++ b/pcbnew/router/pns_line.h @@ -261,4 +261,3 @@ private: }; #endif // __PNS_LINE_H - diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp index b374be34e8..bda0d661c0 100644 --- a/pcbnew/router/pns_line_placer.cpp +++ b/pcbnew/router/pns_line_placer.cpp @@ -64,7 +64,7 @@ void PNS_LINE_PLACER::ApplySettings( const PNS_ROUTING_SETTINGS& aSettings ) void PNS_LINE_PLACER::StartPlacement( const VECTOR2I& aStart, int aNet, - int aWidth, int aLayer ) + int aWidth, int aLayer ) { m_direction = m_initial_direction; TRACE( 1, "world %p, intitial-direction %s layer %d\n", @@ -184,8 +184,7 @@ bool PNS_LINE_PLACER::handlePullback() // case 2: regardless of the current routing direction, if the tail/head // extremities form an acute or right angle, reduce the tail by one segment // (and hope that further iterations) will result with a cleaner trace - bool pullback_2 = (angle == DIRECTION_45::ANG_RIGHT || - angle == DIRECTION_45::ANG_ACUTE); + bool pullback_2 = (angle == DIRECTION_45::ANG_RIGHT || angle == DIRECTION_45::ANG_ACUTE); if( pullback_1 || pullback_2 ) { @@ -380,7 +379,7 @@ bool PNS_LINE_PLACER::handleViaPlacement( PNS_LINE& aHead ) bool PNS_LINE_PLACER::routeHead( const VECTOR2I& aP, PNS_LINE& aNewHead, - bool aCwWalkaround ) + bool aCwWalkaround ) { // STAGE 1: route a simple two-segment trace between m_p_start and aP... SHAPE_LINE_CHAIN line = m_direction.BuildInitialTrace( m_p_start, aP ); @@ -677,4 +676,3 @@ PNS_NODE* PNS_LINE_PLACER::GetCurrentNode() const { return m_shove->GetCurrentNode(); } - diff --git a/pcbnew/router/pns_line_placer.h b/pcbnew/router/pns_line_placer.h index 614e650901..e4ab966e59 100644 --- a/pcbnew/router/pns_line_placer.h +++ b/pcbnew/router/pns_line_placer.h @@ -252,4 +252,3 @@ private: }; #endif // __PNS_LINE_PLACER_H - diff --git a/pcbnew/router/pns_node.cpp b/pcbnew/router/pns_node.cpp index 2fb1410c8a..1de4ca8995 100644 --- a/pcbnew/router/pns_node.cpp +++ b/pcbnew/router/pns_node.cpp @@ -72,7 +72,7 @@ PNS_NODE::~PNS_NODE() allocNodes.erase( this ); for( PNS_INDEX::ItemSet::iterator i = m_index->begin(); - i != m_index->end(); ++i ) + i != m_index->end(); ++i ) if( (*i)->BelongsTo( this ) ) delete *i; @@ -119,7 +119,7 @@ PNS_NODE* PNS_NODE::Branch() JointMap::iterator j; for( PNS_INDEX::ItemSet::iterator i = m_index->begin(); - i != m_index->end(); ++i ) + i != m_index->end(); ++i ) child->m_index->Add( *i ); child->m_joints = m_joints; @@ -307,9 +307,9 @@ PNS_NODE::OptObstacle PNS_NODE::NearestObstacle( const PNS_LINE* aItem, int aKin { found_isects = true; nearest.dist_first = dist; - nearest.ip_first = isect.p; - nearest.item = obs.item; - nearest.hull = hull; + nearest.ip_first = isect.p; + nearest.item = obs.item; + nearest.hull = hull; } if( dist > dist_max ) @@ -702,7 +702,7 @@ void PNS_NODE::FindLineEnds( PNS_LINE* aLine, PNS_JOINT& a, PNS_JOINT& b ) int PNS_NODE::FindLinesBetweenJoints( PNS_JOINT& a, PNS_JOINT& b, vector& aLines ) { - BOOST_FOREACH( PNS_ITEM * item, a.GetLinkList() ) + BOOST_FOREACH( PNS_ITEM* item, a.GetLinkList() ) { if( item->GetKind() == PNS_ITEM::SEGMENT ) { @@ -844,11 +844,13 @@ void PNS_NODE::Dump( bool aLong ) } if( !isRoot() ) + { for( i = m_root->m_items.begin(); i != m_root->m_items.end(); i++ ) { if( (*i)->GetKind() == PNS_ITEM::SEGMENT && !overrides( *i ) ) all_segs.insert( static_cast(*i) ); } + } JointMap::iterator j; @@ -880,7 +882,6 @@ void PNS_NODE::Dump( bool aLong ) } - int lines_count = 0; while( !all_segs.empty() ) @@ -949,7 +950,7 @@ void PNS_NODE::Commit( PNS_NODE* aNode ) Remove( item ); for( PNS_INDEX::ItemSet::iterator i = aNode->m_index->begin(); - i != aNode->m_index->end(); ++i ) + i != aNode->m_index->end(); ++i ) Add( *i ); releaseChildren(); @@ -984,4 +985,3 @@ void PNS_NODE::AllItemsInNet( int aNet, std::list& aItems ) } } - diff --git a/pcbnew/router/pns_optimizer.cpp b/pcbnew/router/pns_optimizer.cpp index e519eab6ea..12999a4f3b 100644 --- a/pcbnew/router/pns_optimizer.cpp +++ b/pcbnew/router/pns_optimizer.cpp @@ -301,8 +301,8 @@ bool PNS_OPTIMIZER::mergeObtuse( PNS_LINE* aLine ) while( n < n_segs - step ) { - const SEG s1 = current_path.CSegment( n ); - const SEG s2 = current_path.CSegment( n + step ); + const SEG s1 = current_path.CSegment( n ); + const SEG s2 = current_path.CSegment( n + step ); SEG s1opt, s2opt; if( DIRECTION_45( s1 ).IsObtuse( DIRECTION_45( s2 ) ) ) @@ -512,8 +512,8 @@ PNS_OPTIMIZER::BreakoutList PNS_OPTIMIZER::rectBreakouts( int aWidth, VECTOR2I d_offset; - d_offset.x = (s.x > s.y) ? (s.x - s.y) / 2 : 0; - d_offset.y = (s.x < s.y) ? (s.y - s.x) / 2 : 0; + d_offset.x = ( s.x > s.y ) ? ( s.x - s.y ) / 2 : 0; + d_offset.y = ( s.x < s.y ) ? ( s.y - s.x ) / 2 : 0; VECTOR2I d_vert = VECTOR2I( 0, s.y / 2 + aWidth ); VECTOR2I d_horiz = VECTOR2I( s.x / 2 + aWidth, 0 ); @@ -601,7 +601,7 @@ PNS_ITEM* PNS_OPTIMIZER::findPadOrVia( int aLayer, int aNet, const VECTOR2I& aP if( !jt ) return NULL; - BOOST_FOREACH( PNS_ITEM * item, jt->GetLinkList() ) + BOOST_FOREACH( PNS_ITEM* item, jt->GetLinkList() ) { if( item->GetKind() == PNS_ITEM::VIA || item->GetKind() == PNS_ITEM::SOLID ) return item; @@ -680,10 +680,10 @@ int PNS_OPTIMIZER::smartPadsSingle( PNS_LINE* aLine, PNS_ITEM* aPad, bool aEnd, } SHAPE_LINE_CHAIN l_best; - bool found = false; - int p_best = -1; + bool found = false; + int p_best = -1; - BOOST_FOREACH( RtVariant & vp, variants ) + BOOST_FOREACH( RtVariant& vp, variants ) { PNS_LINE tmp( *aLine, vp.second ); int cost = PNS_COST_ESTIMATOR::CornerCost( vp.second ); @@ -761,4 +761,3 @@ bool PNS_OPTIMIZER::Optimize( PNS_LINE* aLine, int aEffortLevel, PNS_NODE* aWorl opt.SetCollisionMask( -1 ); return opt.Optimize( aLine ); } - diff --git a/pcbnew/router/pns_optimizer.h b/pcbnew/router/pns_optimizer.h index bafc88bc0a..916e77bb69 100644 --- a/pcbnew/router/pns_optimizer.h +++ b/pcbnew/router/pns_optimizer.h @@ -164,4 +164,3 @@ private: }; #endif - diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index f38275fd99..7b43f370ea 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -105,20 +105,20 @@ PNS_ITEM* PNS_ROUTER::syncPad( D_PAD* aPad ) case PAD_SMD: case PAD_CONN: - { - LAYER_MSK lmsk = aPad->GetLayerMask(); - int i; + { + LAYER_MSK lmsk = aPad->GetLayerMask(); + int i; - for( i = FIRST_COPPER_LAYER; i <= LAST_COPPER_LAYER; i++ ) - if( lmsk & (1 << i) ) - { - layers = PNS_LAYERSET( i ); - break; - } - - - break; - } + for( i = FIRST_COPPER_LAYER; i <= LAST_COPPER_LAYER; i++ ) + { + if( lmsk & (1 << i) ) + { + layers = PNS_LAYERSET( i ); + break; + } + } + break; + } default: TRACE( 0, "unsupported pad type 0x%x", aPad->GetAttribute() ); @@ -280,9 +280,9 @@ PNS_ROUTER::PNS_ROUTER() m_clearanceFunc = NULL; - m_currentLayer = 1; - m_placingVia = false; - m_currentNet = -1; + m_currentLayer = 1; + m_placingVia = false; + m_currentNet = -1; m_state = IDLE; m_world = NULL; m_placer = NULL; @@ -294,7 +294,7 @@ PNS_ROUTER::PNS_ROUTER() } -void PNS_ROUTER::SetView( KiGfx::VIEW* aView ) +void PNS_ROUTER::SetView( KIGFX::VIEW* aView ) { if( m_previewItems ) { @@ -303,7 +303,7 @@ void PNS_ROUTER::SetView( KiGfx::VIEW* aView ) } m_view = aView; - m_previewItems = new KiGfx::VIEW_GROUP( m_view ); + m_previewItems = new KIGFX::VIEW_GROUP( m_view ); m_previewItems->SetLayer( ITEM_GAL_LAYER( GP_OVERLAY ) ); m_view->Add( m_previewItems ); m_previewItems->ViewSetVisible( true ); @@ -386,7 +386,7 @@ const VECTOR2I PNS_ROUTER::SnapToItem( PNS_ITEM* item, VECTOR2I aP, bool& aSplit case PNS_ITEM::SEGMENT: { - PNS_SEGMENT* seg = static_cast(item); + PNS_SEGMENT* seg = static_cast( item ); const SEG& s = seg->GetSeg(); int w = seg->GetWidth(); @@ -462,7 +462,7 @@ void PNS_ROUTER::EraseView() if( m_previewItems ) m_previewItems->FreeItems(); - m_previewItems->ViewUpdate( KiGfx::VIEW_ITEM::GEOMETRY ); + m_previewItems->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } @@ -476,7 +476,7 @@ void PNS_ROUTER::DisplayItem( const PNS_ITEM* aItem, bool aIsHead ) pitem->MarkAsHead(); pitem->ViewSetVisible( true ); - m_previewItems->ViewUpdate( KiGfx::VIEW_ITEM::GEOMETRY | KiGfx::VIEW_ITEM::APPEARANCE ); + m_previewItems->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY | KIGFX::VIEW_ITEM::APPEARANCE ); } @@ -487,7 +487,7 @@ void PNS_ROUTER::DisplayDebugLine( const SHAPE_LINE_CHAIN& aLine, int aType, int pitem->DebugLine( aLine, aWidth, aType ); m_previewItems->Add( pitem ); pitem->ViewSetVisible( true ); - m_previewItems->ViewUpdate( KiGfx::VIEW_ITEM::GEOMETRY | KiGfx::VIEW_ITEM::APPEARANCE ); + m_previewItems->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY | KIGFX::VIEW_ITEM::APPEARANCE ); } @@ -523,7 +523,8 @@ void PNS_ROUTER::Move( const VECTOR2I& aP, PNS_ITEM* endItem ) m_placer->GetCurrentNode()->GetUpdatedItems( removed, added ); - BOOST_FOREACH( PNS_ITEM* item, added ) { + BOOST_FOREACH( PNS_ITEM* item, added ) + { DisplayItem( item ); } @@ -537,7 +538,7 @@ void PNS_ROUTER::Move( const VECTOR2I& aP, PNS_ITEM* endItem ) m_hiddenItems.insert( parent ); parent->ViewSetVisible( false ); - parent->ViewUpdate( KiGfx::VIEW_ITEM::APPEARANCE ); + parent->ViewUpdate( KIGFX::VIEW_ITEM::APPEARANCE ); } } } @@ -552,7 +553,7 @@ void PNS_ROUTER::splitAdjacentSegments( PNS_NODE* aNode, PNS_ITEM* aSeg, const V if( jt && jt->LinkCount() >= 1 ) return; - PNS_SEGMENT* s_old = static_cast(aSeg); + PNS_SEGMENT* s_old = static_cast( aSeg ); PNS_SEGMENT* s_new[2]; s_new[0] = s_old->Clone(); @@ -627,7 +628,7 @@ void PNS_ROUTER::commitRouting( PNS_NODE* aNode ) newBI->ClearFlags(); m_view->Add( newBI ); m_board->Add( newBI ); - newBI->ViewUpdate( KiGfx::VIEW_ITEM::GEOMETRY ); + newBI->ViewUpdate( KIGFX::VIEW_ITEM::GEOMETRY ); } } @@ -770,8 +771,8 @@ void PNS_ROUTER::FlipPosture() if( m_placer->GetTail().GetCLine().SegmentCount() == 0 ) { m_start_diagonal = !m_start_diagonal; - m_placer->SetInitialDirection( m_start_diagonal ? DIRECTION_45( - DIRECTION_45::NE ) : DIRECTION_45( DIRECTION_45::N ) ); + m_placer->SetInitialDirection( m_start_diagonal ? + DIRECTION_45( DIRECTION_45::NE ) : DIRECTION_45( DIRECTION_45::N ) ); } else m_placer->FlipPosture(); @@ -789,12 +790,12 @@ void PNS_ROUTER::SwitchLayer( int layer ) break; case ROUTE_TRACK: - if( m_startsOnVia ) - { - m_currentLayer = layer; - m_placer->StartPlacement( m_currentStart, m_currentNet, m_currentWidth, - m_currentLayer ); - } + if( m_startsOnVia ) + { + m_currentLayer = layer; + m_placer->StartPlacement( m_currentStart, m_currentNet, m_currentWidth, + m_currentLayer ); + } default: break; @@ -810,4 +811,3 @@ void PNS_ROUTER::ToggleViaPlacement() m_placer->AddVia( m_placingVia, m_currentViaDiameter, m_currentViaDrill ); } } - diff --git a/pcbnew/router/pns_router.h b/pcbnew/router/pns_router.h index d762f14783..0bb882fa25 100644 --- a/pcbnew/router/pns_router.h +++ b/pcbnew/router/pns_router.h @@ -48,7 +48,7 @@ class PNS_VIA; class PNS_CLEARANCE_FUNC; class VIEW_GROUP; -namespace KiGfx { +namespace KIGFX { class VIEW; class VIEW_GROUP; }; @@ -81,7 +81,7 @@ public: void SetBoard( BOARD* aBoard ); void SyncWorld(); - void SetView( KiGfx::VIEW* aView ); + void SetView( KIGFX::VIEW* aView ); bool RoutingInProgress() const; void StartRouting( const VECTOR2I& aP, PNS_ITEM* aItem ); @@ -142,7 +142,7 @@ private: // optHoverItem queryHoverItemEx(const VECTOR2I& aP); - PNS_ITEM* pickSingleItem( PNS_ITEMSET& aItems ) const; // std::vector aItems) const; + PNS_ITEM* pickSingleItem( PNS_ITEMSET& aItems ) const; // std::vector aItems) const; void splitAdjacentSegments( PNS_NODE* aNode, PNS_ITEM* aSeg, const VECTOR2I& aP ); // optHoverItem& aItem); void commitRouting( PNS_NODE* aNode ); PNS_NODE* removeLoops( PNS_NODE* aNode, PNS_SEGMENT* aLatestSeg ); @@ -173,8 +173,8 @@ private: PNS_NODE* m_world; PNS_LINE_PLACER* m_placer; - KiGfx::VIEW* m_view; - KiGfx::VIEW_GROUP* m_previewItems; + KIGFX::VIEW* m_view; + KIGFX::VIEW_GROUP* m_previewItems; VECTOR2I m_currentEnd; VECTOR2I m_currentStart; @@ -191,4 +191,3 @@ private: }; #endif - diff --git a/pcbnew/router/pns_routing_settings.h b/pcbnew/router/pns_routing_settings.h index e61e69b746..72a4babef0 100644 --- a/pcbnew/router/pns_routing_settings.h +++ b/pcbnew/router/pns_routing_settings.h @@ -51,4 +51,3 @@ public: }; #endif - diff --git a/pcbnew/router/pns_segment.h b/pcbnew/router/pns_segment.h index b8e6e43d34..3c7565aa9c 100644 --- a/pcbnew/router/pns_segment.h +++ b/pcbnew/router/pns_segment.h @@ -122,4 +122,3 @@ private: }; #endif - diff --git a/pcbnew/router/pns_shove.cpp b/pcbnew/router/pns_shove.cpp index e9222ee8f7..fd666780ea 100644 --- a/pcbnew/router/pns_shove.cpp +++ b/pcbnew/router/pns_shove.cpp @@ -491,4 +491,3 @@ PNS_SHOVE::ShoveStatus PNS_SHOVE::ShoveLines( PNS_LINE* aCurrentHead ) return SH_INCOMPLETE; } } - diff --git a/pcbnew/router/pns_shove.h b/pcbnew/router/pns_shove.h index 0e778e7fd2..581d2f49f9 100644 --- a/pcbnew/router/pns_shove.h +++ b/pcbnew/router/pns_shove.h @@ -83,4 +83,3 @@ private: }; #endif - diff --git a/pcbnew/router/pns_solid.cpp b/pcbnew/router/pns_solid.cpp index fb9e1d2a9e..fbc4322488 100644 --- a/pcbnew/router/pns_solid.cpp +++ b/pcbnew/router/pns_solid.cpp @@ -60,4 +60,3 @@ PNS_ITEM* PNS_SOLID::Clone() const // solids are never cloned as the shove algorithm never moves them assert( false ); } - diff --git a/pcbnew/router/pns_solid.h b/pcbnew/router/pns_solid.h index f2367eb38b..db52c808c4 100644 --- a/pcbnew/router/pns_solid.h +++ b/pcbnew/router/pns_solid.h @@ -68,4 +68,3 @@ private: }; #endif - diff --git a/pcbnew/router/pns_utils.cpp b/pcbnew/router/pns_utils.cpp index a91d787c9d..c787753534 100644 --- a/pcbnew/router/pns_utils.cpp +++ b/pcbnew/router/pns_utils.cpp @@ -42,4 +42,3 @@ const SHAPE_LINE_CHAIN OctagonalHull( const VECTOR2I& aP0, return s; } - diff --git a/pcbnew/router/pns_utils.h b/pcbnew/router/pns_utils.h index 016ce73611..655720f1f1 100644 --- a/pcbnew/router/pns_utils.h +++ b/pcbnew/router/pns_utils.h @@ -30,4 +30,3 @@ const SHAPE_LINE_CHAIN OctagonalHull( const VECTOR2I& aP0, const VECTOR2I& aSize int aClearance, int aChamfer ); #endif // __PNS_UTILS_H - diff --git a/pcbnew/router/pns_walkaround.cpp b/pcbnew/router/pns_walkaround.cpp index c03320a7e5..6368a40442 100644 --- a/pcbnew/router/pns_walkaround.cpp +++ b/pcbnew/router/pns_walkaround.cpp @@ -75,9 +75,9 @@ PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::singleStep( PNS_LINE& aPath, } aPath.NewWalkaround( current_obs->hull, path_pre[0], path_walk[0], - path_post[0], aWindingDirection ); + path_post[0], aWindingDirection ); aPath.NewWalkaround( current_obs->hull, path_pre[1], path_walk[1], - path_post[1], !aWindingDirection ); + path_post[1], !aWindingDirection ); int len_pre = path_walk[0].Length(); int len_alt = path_walk[1].Length(); @@ -196,13 +196,13 @@ PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::Route( const PNS_LINE& aInitial const SEG s = l.Segment( i ); VECTOR2I nearest = s.NearestPoint( m_cursorPos ); - VECTOR2I::extended_type dist_a = (s.a - m_cursorPos).SquaredEuclideanNorm(); - VECTOR2I::extended_type dist_b = (s.b - m_cursorPos).SquaredEuclideanNorm(); - VECTOR2I::extended_type dist_n = (nearest - m_cursorPos).SquaredEuclideanNorm(); + VECTOR2I::extended_type dist_a = ( s.a - m_cursorPos ).SquaredEuclideanNorm(); + VECTOR2I::extended_type dist_b = ( s.b - m_cursorPos ).SquaredEuclideanNorm(); + VECTOR2I::extended_type dist_n = ( nearest - m_cursorPos ).SquaredEuclideanNorm(); if( dist_n <= dist_a && dist_n < dist_b ) { - // PNSDisplayDebugLine(l, 3); + // PNSDisplayDebugLine( l, 3 ); l.Remove( i + 1, -1 ); l.Append( nearest ); l.Simplify(); @@ -228,4 +228,3 @@ PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::Route( const PNS_LINE& aInitial return st; } - diff --git a/pcbnew/router/pns_walkaround.h b/pcbnew/router/pns_walkaround.h index 32f642d277..609b80d2ce 100644 --- a/pcbnew/router/pns_walkaround.h +++ b/pcbnew/router/pns_walkaround.h @@ -95,4 +95,3 @@ private: }; #endif // __PNS_WALKAROUND_H - diff --git a/pcbnew/router/router_preview_item.cpp b/pcbnew/router/router_preview_item.cpp index 5cae19f317..72321aff88 100644 --- a/pcbnew/router/router_preview_item.cpp +++ b/pcbnew/router/router_preview_item.cpp @@ -29,7 +29,7 @@ #include "pns_segment.h" #include "pns_via.h" -using namespace KiGfx; +using namespace KIGFX; ROUTER_PREVIEW_ITEM::ROUTER_PREVIEW_ITEM( const PNS_ITEM* aItem, VIEW_GROUP* aParent ) : EDA_ITEM( NOT_USED ) @@ -115,7 +115,7 @@ const BOX2I ROUTER_PREVIEW_ITEM::ViewBBox() const } -void ROUTER_PREVIEW_ITEM::ViewDraw( int aLayer, KiGfx::GAL* aGal ) const +void ROUTER_PREVIEW_ITEM::ViewDraw( int aLayer, KIGFX::GAL* aGal ) const { switch( m_type ) { @@ -227,4 +227,3 @@ const COLOR4D ROUTER_PREVIEW_ITEM::assignColor( int aStyle ) const return color; } - diff --git a/pcbnew/router/router_preview_item.h b/pcbnew/router/router_preview_item.h index 9c5d2e3497..f891f3bf66 100644 --- a/pcbnew/router/router_preview_item.h +++ b/pcbnew/router/router_preview_item.h @@ -56,7 +56,7 @@ public: PR_SUGGESTION = 1 }; - ROUTER_PREVIEW_ITEM( const PNS_ITEM* aItem = NULL, KiGfx::VIEW_GROUP* aParent = NULL ); + ROUTER_PREVIEW_ITEM( const PNS_ITEM* aItem = NULL, KIGFX::VIEW_GROUP* aParent = NULL ); ~ROUTER_PREVIEW_ITEM(); void Update( const PNS_ITEM* aItem ); @@ -69,7 +69,7 @@ public: const BOX2I ViewBBox() const; - virtual void ViewDraw( int aLayer, KiGfx::GAL* aGal ) const; + virtual void ViewDraw( int aLayer, KIGFX::GAL* aGal ) const; virtual void ViewGetLayers( int aLayers[], int& aCount ) const { @@ -80,10 +80,10 @@ public: void MarkAsHead(); private: - const KiGfx::COLOR4D assignColor( int aStyle ) const; - const KiGfx::COLOR4D getLayerColor( int aLayer ) const; + const KIGFX::COLOR4D assignColor( int aStyle ) const; + const KIGFX::COLOR4D getLayerColor( int aLayer ) const; - KiGfx::VIEW_GROUP* m_parent; + KIGFX::VIEW_GROUP* m_parent; PNS_ROUTER* m_router; SHAPE_LINE_CHAIN m_line; @@ -93,11 +93,10 @@ private: int m_width; int m_layer; - KiGfx::COLOR4D m_color; + KIGFX::COLOR4D m_color; VECTOR2I m_stuckPosition; VECTOR2I m_viaCenter; }; #endif - diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 1318f7dee0..db92452662 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -38,7 +38,7 @@ #include "pns_router.h" #include "trace.h" -using namespace KiGfx; +using namespace KIGFX; using namespace std; using boost::optional; diff --git a/pcbnew/router/router_tool.h b/pcbnew/router/router_tool.h index 92e2fe208e..da2a36601d 100644 --- a/pcbnew/router/router_tool.h +++ b/pcbnew/router/router_tool.h @@ -77,4 +77,3 @@ private: }; #endif - diff --git a/pcbnew/router/trace.h b/pcbnew/router/trace.h index 5b7cbbf2ba..b1acfd688f 100644 --- a/pcbnew/router/trace.h +++ b/pcbnew/router/trace.h @@ -27,13 +27,13 @@ #include #include -static void _trace_print( const char* funcName, int level, const std::string& msg ) +static void _trace_print( const char* aFuncName, int level, const std::string& aMsg ) { - std::cerr << "trace[" << level << "]: " << funcName << ": " << msg << std::endl; + std::cerr << "trace[" << level << "]: " << aFuncName << ": " << aMsg << std::endl; } #define TRACE( level, fmt, ... ) \ - _trace_print( __FUNCTION__, level, (boost::format( fmt ) % __VA_ARGS__).str() ); + _trace_print( __FUNCTION__, level, ( boost::format( fmt ) % __VA_ARGS__ ).str() ); #define TRACEn( level, msg ) \ _trace_print( __FUNCTION__, level, std::string( msg ) ); diff --git a/pcbnew/tools/bright_box.cpp b/pcbnew/tools/bright_box.cpp index f1c0802522..b0fd4aec81 100644 --- a/pcbnew/tools/bright_box.cpp +++ b/pcbnew/tools/bright_box.cpp @@ -26,18 +26,18 @@ #include #include -using namespace KiGfx; +using namespace KIGFX; BRIGHT_BOX::BRIGHT_BOX( BOARD_ITEM* aItem ) : - EDA_ITEM( NOT_USED ), // this item is never added to a BOARD so it needs no type - item( aItem ) + EDA_ITEM( NOT_USED ), // this item is never added to a BOARD so it needs no type + item( aItem ) { } const BOX2I BRIGHT_BOX::ViewBBox() const { - return item->ViewBBox(); + return item->ViewBBox(); } @@ -69,4 +69,5 @@ void BRIGHT_BOX::ViewDraw( int aLayer, GAL* aGal ) const } } -const COLOR4D BRIGHT_BOX::BrightColor = KiGfx::COLOR4D( 0.0, 1.0, 0.0, 1.0 ); + +const COLOR4D BRIGHT_BOX::BrightColor = KIGFX::COLOR4D( 0.0, 1.0, 0.0, 1.0 ); diff --git a/pcbnew/tools/bright_box.h b/pcbnew/tools/bright_box.h index e07a4b37e1..14966db9ac 100644 --- a/pcbnew/tools/bright_box.h +++ b/pcbnew/tools/bright_box.h @@ -44,7 +44,7 @@ public: virtual const BOX2I ViewBBox() const; - void ViewDraw( int aLayer, KiGfx::GAL* aGal ) const; + void ViewDraw( int aLayer, KIGFX::GAL* aGal ) const; void ViewGetLayers( int aLayers[], int& aCount ) const; void Show( int x, std::ostream& st ) const @@ -53,7 +53,7 @@ public: private: static const int BrightBoxLayer = ITEM_GAL_LAYER( GP_OVERLAY ); - static const KiGfx::COLOR4D BrightColor; + static const KIGFX::COLOR4D BrightColor; static const double LineWidth = 100000.0; BOARD_ITEM* item; diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 9605302924..a61ebc52b0 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -27,18 +27,18 @@ // Selection tool actions TOOL_ACTION COMMON_ACTIONS::selectionActivate( "pcbnew.InteractiveSelection", - AS_GLOBAL, 'S', - "Selection tool", "Allows to select items" ); + AS_GLOBAL, 'S', + "Selection tool", "Allows to select items" ); // Move tool actions TOOL_ACTION COMMON_ACTIONS::moveActivate( "pcbnew.InteractiveMove", - AS_GLOBAL, 'M', - "Move", "Moves the selected item(s)" ); + AS_GLOBAL, 'M', + "Move", "Moves the selected item(s)" ); TOOL_ACTION COMMON_ACTIONS::rotate( "pcbnew.InteractiveMove.rotate", - AS_CONTEXT, ' ', - "Rotate", "Rotates selected item(s)" ); + AS_CONTEXT, ' ', + "Rotate", "Rotates selected item(s)" ); TOOL_ACTION COMMON_ACTIONS::flip( "pcbnew.InteractiveMove.flip", - AS_CONTEXT, 'F', - "Flip", "Flips selected item(s)" ); + AS_CONTEXT, 'F', + "Flip", "Flips selected item(s)" ); diff --git a/pcbnew/tools/item_state.h b/pcbnew/tools/item_state.h index 72270afe1a..5708ac122b 100644 --- a/pcbnew/tools/item_state.h +++ b/pcbnew/tools/item_state.h @@ -73,6 +73,7 @@ public: std::deque::iterator it, it_end; std::deque::iterator cmd, cmd_end; + for( it = m_items.begin(), it_end = m_items.end(); it != it_end; ++it ) { for( cmd = m_commands.begin(), cmd_end = m_commands.end(); cmd != cmd_end; ++cmd ) @@ -105,6 +106,7 @@ public: m_canSave = false; #endif std::deque::iterator it, it_end; + for( it = m_items.begin(), it_end = m_items.end(); it != it_end; ++it ) (*it)->Move( wxPoint( aMovement.x, aMovement.y ) ); @@ -126,6 +128,7 @@ public: m_commands.push_front( COMMAND( COMMAND::ROTATE, aPoint, aAngle ) ); std::deque::iterator it, it_end; + for( it = m_items.begin(), it_end = m_items.end(); it != it_end; ++it ) (*it)->Rotate( wxPoint( aPoint.x, aPoint.y ), aAngle ); @@ -147,6 +150,7 @@ public: m_commands.push_front( COMMAND( COMMAND::FLIP, aPoint ) ); std::deque::iterator it, it_end; + for( it = m_items.begin(), it_end = m_items.end(); it != it_end; ++it ) (*it)->Flip( wxPoint( aPoint.x, aPoint.y ) ); @@ -166,6 +170,7 @@ public: m_commands.push_front( COMMAND( COMMAND::VISIBILITY ) ); std::deque::iterator it, it_end; + for( it = m_items.begin(), it_end = m_items.end(); it != it_end; ++it ) (*it)->ViewSetVisible( !(*it)->ViewIsVisible() ); } @@ -177,14 +182,14 @@ public: * them properly. * @return Flag required to refresh items. */ - KiGfx::VIEW_ITEM::ViewUpdateFlags GetUpdateFlag() const + KIGFX::VIEW_ITEM::ViewUpdateFlags GetUpdateFlag() const { - if( m_flips % 2 == 1 ) // If number of flips is odd, then we need to change layers - return KiGfx::VIEW_ITEM::LAYERS; + if( m_flips % 2 == 1 ) // If number of flips is odd, then we need to change layers + return KIGFX::VIEW_ITEM::LAYERS; else if( m_movement.x != 0.0 || m_movement.y != 0.0 || m_rotation != 0.0 ) - return KiGfx::VIEW_ITEM::GEOMETRY; + return KIGFX::VIEW_ITEM::GEOMETRY; - return KiGfx::VIEW_ITEM::APPEARANCE; + return KIGFX::VIEW_ITEM::APPEARANCE; } private: diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp index 6642984ca1..2164e1cb7e 100644 --- a/pcbnew/tools/move_tool.cpp +++ b/pcbnew/tools/move_tool.cpp @@ -31,11 +31,11 @@ #include "selection_tool.h" #include "move_tool.h" -using namespace KiGfx; +using namespace KIGFX; using boost::optional; MOVE_TOOL::MOVE_TOOL() : - TOOL_INTERACTIVE( "pcbnew.InteractiveMove" ), m_selectionTool( NULL ) + TOOL_INTERACTIVE( "pcbnew.InteractiveMove" ), m_selectionTool( NULL ) { } @@ -79,8 +79,9 @@ bool MOVE_TOOL::Init() int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) { const SELECTION_TOOL::SELECTION& selection = m_selectionTool->GetSelection(); + if( selection.Empty() ) - return 0; // there are no items to operate on + return 0; // there are no items to operate on VECTOR2D dragPosition; bool dragging = false; @@ -96,8 +97,8 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) { if( evt->IsCancel() ) { - restore = true; // Cancelling the tool means that items have to be restored - break; // Finish + restore = true; // Cancelling the tool means that items have to be restored + break; // Finish } // Dispatch TOOL_ACTIONs @@ -129,6 +130,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) { // Prepare to drag std::set::iterator it; + for( it = selection.items.begin(); it != selection.items.end(); ++it ) { // Save the state of the selected items, in case it has to be restored @@ -142,7 +144,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) dragPosition = evt->Position(); } else if( evt->IsMouseUp( MB_Left ) || evt->IsClick( MB_Left ) ) - break; // Finish + break; // Finish } if( restore ) diff --git a/pcbnew/tools/move_tool.h b/pcbnew/tools/move_tool.h index 665663853d..1140d0067e 100644 --- a/pcbnew/tools/move_tool.h +++ b/pcbnew/tools/move_tool.h @@ -33,7 +33,7 @@ class BOARD_ITEM; class SELECTION_TOOL; -namespace KiGfx +namespace KIGFX { class VIEW_GROUP; } diff --git a/pcbnew/tools/pcb_tools.cpp b/pcbnew/tools/pcb_tools.cpp index f2e1885821..f3749a0c94 100644 --- a/pcbnew/tools/pcb_tools.cpp +++ b/pcbnew/tools/pcb_tools.cpp @@ -41,10 +41,10 @@ void PCB_EDIT_FRAME::setupTools() { - // Create the manager and dispatcher & route draw panel events to the dispatcher - m_toolManager = new TOOL_MANAGER; - m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager, this ); - m_galCanvas->SetEventDispatcher( m_toolDispatcher ); + // Create the manager and dispatcher & route draw panel events to the dispatcher + m_toolManager = new TOOL_MANAGER; + m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager, this ); + m_galCanvas->SetEventDispatcher( m_toolDispatcher ); // Register tool actions m_toolManager->RegisterAction( &COMMON_ACTIONS::moveActivate ); @@ -52,10 +52,10 @@ void PCB_EDIT_FRAME::setupTools() m_toolManager->RegisterAction( &COMMON_ACTIONS::rotate ); m_toolManager->RegisterAction( &COMMON_ACTIONS::flip ); - // Register tools - m_toolManager->RegisterTool( new SELECTION_TOOL ); - m_toolManager->RegisterTool( new ROUTER_TOOL ); - m_toolManager->RegisterTool( new MOVE_TOOL ); + // Register tools + m_toolManager->RegisterTool( new SELECTION_TOOL ); + m_toolManager->RegisterTool( new ROUTER_TOOL ); + m_toolManager->RegisterTool( new MOVE_TOOL ); } @@ -71,8 +71,7 @@ void PCB_EDIT_FRAME::destroyTools() } -void PCB_EDIT_FRAME::onGenericCommand( wxCommandEvent &aEvent ) +void PCB_EDIT_FRAME::onGenericCommand( wxCommandEvent& aEvent ) { - m_toolDispatcher->DispatchWxCommand( aEvent ); + m_toolDispatcher->DispatchWxCommand( aEvent ); } - diff --git a/pcbnew/tools/selection_area.cpp b/pcbnew/tools/selection_area.cpp index c96751cb31..8bfdcec020 100644 --- a/pcbnew/tools/selection_area.cpp +++ b/pcbnew/tools/selection_area.cpp @@ -26,15 +26,16 @@ #include #include -using namespace KiGfx; +using namespace KIGFX; const BOX2I SELECTION_AREA::ViewBBox() const { - BOX2I tmp; + BOX2I tmp; + tmp.SetOrigin( m_origin ); tmp.SetEnd( m_end ); - tmp.Normalize(); - return tmp; + tmp.Normalize(); + return tmp; } @@ -45,7 +46,7 @@ void SELECTION_AREA::ViewGetLayers( int aLayers[], int& aCount ) const } -void SELECTION_AREA::ViewDraw( int aLayer, KiGfx::GAL* aGal ) const +void SELECTION_AREA::ViewDraw( int aLayer, KIGFX::GAL* aGal ) const { aGal->SetLineWidth( 1.0 ); aGal->SetStrokeColor( COLOR4D( 1.0, 1.0, 0.4, 1.0 ) ); @@ -57,6 +58,6 @@ void SELECTION_AREA::ViewDraw( int aLayer, KiGfx::GAL* aGal ) const SELECTION_AREA::SELECTION_AREA() : - EDA_ITEM( NOT_USED ) // this item is never added to a BOARD so it needs no type. + EDA_ITEM( NOT_USED ) // this item is never added to a BOARD so it needs no type. { } diff --git a/pcbnew/tools/selection_area.h b/pcbnew/tools/selection_area.h index 6c0f4dcf06..533a516091 100644 --- a/pcbnew/tools/selection_area.h +++ b/pcbnew/tools/selection_area.h @@ -29,7 +29,7 @@ #include #include -namespace KiGfx +namespace KIGFX { class GAL; } @@ -49,16 +49,16 @@ public: virtual const BOX2I ViewBBox() const; - void ViewDraw( int aLayer, KiGfx::GAL* aGal ) const; + void ViewDraw( int aLayer, KIGFX::GAL* aGal ) const; void ViewGetLayers( int aLayers[], int& aCount ) const; - void SetOrigin ( VECTOR2I aOrigin ) + void SetOrigin( VECTOR2I aOrigin ) { m_origin = aOrigin; } - void SetEnd ( VECTOR2I aEnd ) + void SetEnd( VECTOR2I aEnd ) { m_end = aEnd; } diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index e03a9e9a2f..9dcc9ed6bf 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -47,14 +47,14 @@ #include "bright_box.h" #include "common_actions.h" -using namespace KiGfx; +using namespace KIGFX; using boost::optional; SELECTION_TOOL::SELECTION_TOOL() : - TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ), m_multiple( false ) + TOOL_INTERACTIVE( "pcbnew.InteractiveSelection" ), m_multiple( false ) { m_selArea = new SELECTION_AREA; - m_selection.group = new KiGfx::VIEW_GROUP; + m_selection.group = new KIGFX::VIEW_GROUP; } @@ -98,8 +98,8 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) { if( !m_selection.Empty() ) // Cancel event deselects items... clearSelection(); - else // ...unless there is nothing selected - break; // then exit the tool + else // ...unless there is nothing selected + break; // then exit the tool } // single click? Select single object @@ -141,7 +141,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) void SELECTION_TOOL::AddMenuItem( const TOOL_ACTION& aAction ) { - assert( aAction.GetId() > 0 ); // Check if the action was registered before in ACTION_MANAGER + assert( aAction.GetId() > 0 ); // Check if the action was registered before in ACTION_MANAGER m_menu.Add( aAction ); } @@ -177,6 +177,7 @@ void SELECTION_TOOL::toggleSelection( BOARD_ITEM* aItem ) void SELECTION_TOOL::clearSelection() { VIEW_GROUP::const_iter it, it_end; + for( it = m_selection.group->Begin(), it_end = m_selection.group->End(); it != it_end; ++it ) { BOARD_ITEM* item = static_cast( *it ); @@ -208,6 +209,7 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) case 0: if( !m_additive ) clearSelection(); + break; case 1: @@ -220,6 +222,7 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) for( int i = collector.GetCount() - 1; i >= 0 ; --i ) { BOARD_ITEM* boardItem = ( collector )[i]; + if( boardItem->Type() == PCB_MODULE_T || !selectable( boardItem ) ) collector.Remove( i ); } @@ -236,6 +239,7 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) if( item ) toggleSelection( item ); } + break; } } @@ -244,6 +248,7 @@ void SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere ) BOARD_ITEM* SELECTION_TOOL::pickSmallestComponent( GENERAL_COLLECTOR* aCollector ) { int count = aCollector->GetPrimaryCount(); // try to use preferred layer + if( 0 == count ) count = aCollector->GetCount(); @@ -259,7 +264,7 @@ BOARD_ITEM* SELECTION_TOOL::pickSmallestComponent( GENERAL_COLLECTOR* aCollector for( int i = 0; i < count; ++i ) { - MODULE* module = (MODULE*)( *aCollector )[i]; + MODULE* module = (MODULE*) ( *aCollector )[i]; int lx = module->GetBoundingBox().GetWidth(); int ly = module->GetBoundingBox().GetHeight(); @@ -317,6 +322,7 @@ bool SELECTION_TOOL::selectMultiple() view->Query( selectionBox, selectedItems ); // Get the list of selected items std::vector::iterator it, it_end; + for( it = selectedItems.begin(), it_end = selectedItems.end(); it != it_end; ++it ) { BOARD_ITEM* item = static_cast( it->first ); @@ -349,6 +355,7 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) CONTEXT_MENU menu; int limit = std::min( 10, aCollector->GetCount() ); + for( int i = 0; i < limit; ++i ) { wxString text; @@ -415,27 +422,28 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const if( highContrast ) { bool onActive = false; // Is the item on any of active layers? - int layers[KiGfx::VIEW::VIEW_MAX_LAYERS], layers_count; + int layers[KIGFX::VIEW::VIEW_MAX_LAYERS], layers_count; // Filter out items that do not belong to active layers std::set activeLayers = getView()->GetPainter()-> - GetSettings()->GetActiveLayers(); + GetSettings()->GetActiveLayers(); aItem->ViewGetLayers( layers, layers_count ); for( int i = 0; i < layers_count; ++i ) { - if( activeLayers.count( layers[i] ) > 0 ) // Item is on at least one of active layers + if( activeLayers.count( layers[i] ) > 0 ) // Item is on at least one of active layers { onActive = true; break; } } - if( !onActive ) // We do not want to select items that are in the background + if( !onActive ) // We do not want to select items that are in the background return false; } BOARD* board = getModel( PCB_T ); + switch( aItem->Type() ) { case PCB_VIA_T: @@ -444,7 +452,7 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const LAYER_NUM top, bottom; static_cast( aItem )->ReturnLayerPair( &top, &bottom ); - return ( board->IsLayerVisible( top ) || board->IsLayerVisible( bottom ) ); + return board->IsLayerVisible( top ) || board->IsLayerVisible( bottom ); } break; @@ -469,6 +477,7 @@ bool SELECTION_TOOL::selectable( const BOARD_ITEM* aItem ) const // Module texts are not selectable in multiple selection mode if( m_multiple ) return false; + break; // These are not selectable, otherwise silkscreen drawings would be easily destroyed @@ -494,7 +503,7 @@ void SELECTION_TOOL::selectItem( BOARD_ITEM* aItem ) { SELECTION& s; - public: + public: selectBase_( SELECTION& s_ ) : s( s_ ) {} void operator()( BOARD_ITEM* item ) @@ -578,6 +587,7 @@ bool SELECTION_TOOL::containsSelected( const VECTOR2I& aPoint ) const // Check if the point is located within any of the currently selected items bounding boxes std::set::iterator it, it_end; + for( it = m_selection.items.begin(), it_end = m_selection.items.end(); it != it_end; ++it ) { BOX2I itemBox = (*it)->ViewBBox(); diff --git a/pcbnew/tools/selection_tool.h b/pcbnew/tools/selection_tool.h index 8960779a4a..ee8cf45003 100644 --- a/pcbnew/tools/selection_tool.h +++ b/pcbnew/tools/selection_tool.h @@ -36,7 +36,7 @@ class SELECTION_AREA; class BOARD_ITEM; class GENERAL_COLLECTOR; -namespace KiGfx +namespace KIGFX { class VIEW_GROUP; } @@ -65,7 +65,7 @@ public: std::set items; /// VIEW_GROUP that holds currently selected items - KiGfx::VIEW_GROUP* group; + KIGFX::VIEW_GROUP* group; /// Checks if there is anything selected bool Empty() const { return items.empty(); } From f9f23806ed6664a3d3dd67d350263c2f3538db82 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 14 Oct 2013 20:40:36 +0200 Subject: [PATCH 404/415] Mainly case changes. --- common/gal/cairo/cairo_gal.cpp | 38 +- common/gal/opengl/cached_container.cpp | 30 +- common/gal/opengl/opengl_gal.cpp | 6 +- common/gal/opengl/shader.cpp | 6 +- common/gal/stroke_font.cpp | 18 +- common/geometry/seg.cpp | 59 +- common/geometry/shape_collisions.cpp | 23 +- common/geometry/shape_index.cpp | 2 +- common/geometry/shape_line_chain.cpp | 60 +- common/math/math_util.cpp | 23 +- common/tool/context_menu.cpp | 16 +- common/tool/tool_dispatcher.cpp | 34 +- common/tool/tool_event.cpp | 76 +- common/tool/tool_interactive.cpp | 4 +- common/tool/tool_manager.cpp | 24 +- common/view/view.cpp | 20 +- common/view/view_group.cpp | 2 +- common/view/wx_view_controls.cpp | 32 +- include/gal/cairo/cairo_gal.h | 21 +- include/gal/definitions.h | 4 +- include/gal/graphics_abstraction_layer.h | 6 +- include/gal/opengl/cached_container.h | 34 +- include/gal/opengl/gpu_manager.h | 39 +- include/gal/opengl/opengl_gal.h | 15 +- include/gal/opengl/shader.h | 8 +- include/gal/opengl/vertex_common.h | 2 +- include/gal/stroke_font.h | 8 +- include/geometry/seg.h | 425 +++++----- include/geometry/shape.h | 177 +++-- include/geometry/shape_circle.h | 9 +- include/geometry/shape_index_list.h | 159 ++-- include/geometry/shape_line_chain.h | 962 ++++++++++++----------- include/geometry/shape_rect.h | 220 +++--- include/math/math_util.h | 8 +- include/math/matrix3x3.h | 58 +- include/math/vector2d.h | 4 +- include/tool/coroutine.h | 12 +- include/tool/delegate.h | 16 +- include/tool/tool_action.h | 6 +- include/tool/tool_base.h | 14 +- include/tool/tool_dispatcher.h | 13 +- include/tool/tool_event.h | 194 ++--- include/tool/tool_interactive.h | 14 +- include/view/view.h | 51 +- include/view/view_controls.h | 12 +- include/view/view_group.h | 27 +- include/view/view_item.h | 7 +- include/view/wx_view_controls.h | 11 +- pcbnew/router/direction.h | 2 +- pcbnew/router/pns_line.cpp | 167 ++-- pcbnew/router/pns_line_placer.cpp | 18 +- pcbnew/router/pns_node.cpp | 34 +- pcbnew/router/pns_optimizer.cpp | 16 +- pcbnew/router/pns_router.cpp | 16 +- pcbnew/router/pns_segment.h | 8 +- pcbnew/router/pns_shove.cpp | 4 +- pcbnew/router/pns_walkaround.cpp | 4 +- pcbnew/router/router_preview_item.cpp | 4 +- pcbnew/router/router_tool.cpp | 6 +- pcbnew/tools/item_state.h | 2 +- pcbnew/tools/move_tool.cpp | 6 +- pcbnew/tools/selection_tool.cpp | 18 +- 62 files changed, 1697 insertions(+), 1617 deletions(-) diff --git a/common/gal/cairo/cairo_gal.cpp b/common/gal/cairo/cairo_gal.cpp index d274d994ff..a12b33dc7c 100644 --- a/common/gal/cairo/cairo_gal.cpp +++ b/common/gal/cairo/cairo_gal.cpp @@ -325,7 +325,7 @@ void CAIRO_GAL::SetIsFill( bool aIsFillEnabled ) if( isGrouping ) { - GroupElement groupElement; + GROUP_ELEMENT groupElement; groupElement.command = CMD_SET_FILL; groupElement.boolArgument = aIsFillEnabled; currentGroup->push_back( groupElement ); @@ -340,7 +340,7 @@ void CAIRO_GAL::SetIsStroke( bool aIsStrokeEnabled ) if( isGrouping ) { - GroupElement groupElement; + GROUP_ELEMENT groupElement; groupElement.command = CMD_SET_STROKE; groupElement.boolArgument = aIsStrokeEnabled; currentGroup->push_back( groupElement ); @@ -355,7 +355,7 @@ void CAIRO_GAL::SetStrokeColor( const COLOR4D& aColor ) if( isGrouping ) { - GroupElement groupElement; + GROUP_ELEMENT groupElement; groupElement.command = CMD_SET_STROKECOLOR; groupElement.arguments[0] = strokeColor.r; groupElement.arguments[1] = strokeColor.g; @@ -373,7 +373,7 @@ void CAIRO_GAL::SetFillColor( const COLOR4D& aColor ) if( isGrouping ) { - GroupElement groupElement; + GROUP_ELEMENT groupElement; groupElement.command = CMD_SET_FILLCOLOR; groupElement.arguments[0] = fillColor.r; groupElement.arguments[1] = fillColor.g; @@ -392,7 +392,7 @@ void CAIRO_GAL::SetLineWidth( double aLineWidth ) if( isGrouping ) { - GroupElement groupElement; + GROUP_ELEMENT groupElement; groupElement.command = CMD_SET_LINE_WIDTH; groupElement.arguments[0] = aLineWidth; currentGroup->push_back( groupElement ); @@ -446,7 +446,7 @@ void CAIRO_GAL::Rotate( double aAngle ) if( isGrouping ) { - GroupElement groupElement; + GROUP_ELEMENT groupElement; groupElement.command = CMD_ROTATE; groupElement.arguments[0] = aAngle; currentGroup->push_back( groupElement ); @@ -464,7 +464,7 @@ void CAIRO_GAL::Translate( const VECTOR2D& aTranslation ) if( isGrouping ) { - GroupElement groupElement; + GROUP_ELEMENT groupElement; groupElement.command = CMD_TRANSLATE; groupElement.arguments[0] = aTranslation.x; groupElement.arguments[1] = aTranslation.y; @@ -483,7 +483,7 @@ void CAIRO_GAL::Scale( const VECTOR2D& aScale ) if( isGrouping ) { - GroupElement groupElement; + GROUP_ELEMENT groupElement; groupElement.command = CMD_SCALE; groupElement.arguments[0] = aScale.x; groupElement.arguments[1] = aScale.y; @@ -502,7 +502,7 @@ void CAIRO_GAL::Save() if( isGrouping ) { - GroupElement groupElement; + GROUP_ELEMENT groupElement; groupElement.command = CMD_SAVE; currentGroup->push_back( groupElement ); } @@ -519,7 +519,7 @@ void CAIRO_GAL::Restore() if( isGrouping ) { - GroupElement groupElement; + GROUP_ELEMENT groupElement; groupElement.command = CMD_RESTORE; currentGroup->push_back( groupElement ); } @@ -538,7 +538,7 @@ int CAIRO_GAL::BeginGroup() // a attribute was changed or when grouping stops with the end group method. storePath(); - Group group; + GROUP group; int groupNumber = getNewGroupNumber(); groups.insert( std::make_pair( groupNumber, group ) ); currentGroup = &groups[groupNumber]; @@ -564,7 +564,7 @@ void CAIRO_GAL::DrawGroup( int aGroupNumber ) storePath(); - for( Group::iterator it = groups[aGroupNumber].begin(); + for( GROUP::iterator it = groups[aGroupNumber].begin(); it != groups[aGroupNumber].end(); ++it ) { switch( it->command ) @@ -649,7 +649,7 @@ void CAIRO_GAL::ChangeGroupColor( int aGroupNumber, const COLOR4D& aNewColor ) { storePath(); - for( Group::iterator it = groups[aGroupNumber].begin(); + for( GROUP::iterator it = groups[aGroupNumber].begin(); it != groups[aGroupNumber].end(); ++it ) { if( it->command == CMD_SET_FILLCOLOR || it->command == CMD_SET_STROKECOLOR ) @@ -675,7 +675,7 @@ void CAIRO_GAL::DeleteGroup( int aGroupNumber ) storePath(); // Delete the Cairo paths - std::deque::iterator it, end; + std::deque::iterator it, end; for( it = groups[aGroupNumber].begin(), end = groups[aGroupNumber].end(); it != end; ++it ) { @@ -730,7 +730,7 @@ void CAIRO_GAL::RestoreScreen() } -void CAIRO_GAL::SetTarget( RenderTarget aTarget ) +void CAIRO_GAL::SetTarget( RENDER_TARGET aTarget ) { // If the compositor is not set, that means that there is a recaching process going on // and we do not need the compositor now @@ -766,13 +766,13 @@ void CAIRO_GAL::SetTarget( RenderTarget aTarget ) } -RenderTarget CAIRO_GAL::GetTarget() const +RENDER_TARGET CAIRO_GAL::GetTarget() const { return currentTarget; } -void CAIRO_GAL::ClearTarget( RenderTarget aTarget ) +void CAIRO_GAL::ClearTarget( RENDER_TARGET aTarget ) { // Save the current state unsigned int currentBuffer = compositor->GetBuffer(); @@ -844,7 +844,7 @@ void CAIRO_GAL::storePath() // add this command to the group list; if( isStrokeEnabled ) { - GroupElement groupElement; + GROUP_ELEMENT groupElement; groupElement.cairoPath = cairo_copy_path( currentContext ); groupElement.command = CMD_STROKE_PATH; currentGroup->push_back( groupElement ); @@ -852,7 +852,7 @@ void CAIRO_GAL::storePath() if( isFillEnabled ) { - GroupElement groupElement; + GROUP_ELEMENT groupElement; groupElement.cairoPath = cairo_copy_path( currentContext ); groupElement.command = CMD_FILL_PATH; currentGroup->push_back( groupElement ); diff --git a/common/gal/opengl/cached_container.cpp b/common/gal/opengl/cached_container.cpp index b7126d5dff..dda078fd7f 100644 --- a/common/gal/opengl/cached_container.cpp +++ b/common/gal/opengl/cached_container.cpp @@ -45,7 +45,7 @@ CACHED_CONTAINER::CACHED_CONTAINER( unsigned int aSize ) : VERTEX_CONTAINER( aSize ), m_item( NULL ) { // In the beginning there is only free space - m_freeChunks.insert( Chunk( aSize, 0 ) ); + m_freeChunks.insert( CHUNK( aSize, 0 ) ); } @@ -80,7 +80,7 @@ void CACHED_CONTAINER::FinishItem() int itemOffset = m_item->GetOffset(); // Add the not used memory back to the pool - m_freeChunks.insert( Chunk( m_chunkSize - m_itemSize, itemOffset + m_itemSize ) ); + m_freeChunks.insert( CHUNK( m_chunkSize - m_itemSize, itemOffset + m_itemSize ) ); m_freeSpace += ( m_chunkSize - m_itemSize ); // mergeFreeChunks(); // veery slow and buggy } @@ -152,7 +152,7 @@ void CACHED_CONTAINER::Delete( VERTEX_ITEM* aItem ) // Insert a free memory chunk entry in the place where item was stored if( size > 0 ) { - m_freeChunks.insert( Chunk( size, offset ) ); + m_freeChunks.insert( CHUNK( size, offset ) ); m_freeSpace += size; // Indicate that the item is not stored in the container anymore aItem->setSize( 0 ); @@ -186,7 +186,7 @@ void CACHED_CONTAINER::Clear() // Set the size of all the stored VERTEX_ITEMs to 0, so it is clear that they are not held // in the container anymore - Items::iterator it; + ITEMS::iterator it; for( it = m_items.begin(); it != m_items.end(); ++it ) { @@ -198,7 +198,7 @@ void CACHED_CONTAINER::Clear() // Now there is only free space left m_freeChunks.clear(); - m_freeChunks.insert( Chunk( m_freeSpace, 0 ) ); + m_freeChunks.insert( CHUNK( m_freeSpace, 0 ) ); } @@ -240,7 +240,7 @@ unsigned int CACHED_CONTAINER::reallocate( unsigned int aSize ) } // Look for the free space chunk of at least given size - FreeChunkMap::iterator newChunk = m_freeChunks.lower_bound( aSize ); + FREE_CHUNK_MAP::iterator newChunk = m_freeChunks.lower_bound( aSize ); if( newChunk == m_freeChunks.end() ) { @@ -277,7 +277,7 @@ unsigned int CACHED_CONTAINER::reallocate( unsigned int aSize ) // Free the space previously used by the chunk wxASSERT( m_itemSize > 0 ); - m_freeChunks.insert( Chunk( m_itemSize, m_chunkOffset ) ); + m_freeChunks.insert( CHUNK( m_itemSize, m_chunkOffset ) ); m_freeSpace += m_itemSize; } @@ -287,7 +287,7 @@ unsigned int CACHED_CONTAINER::reallocate( unsigned int aSize ) // If there is some space left, return it to the pool - add an entry for it if( chunkSize > aSize ) { - m_freeChunks.insert( Chunk( chunkSize - aSize, chunkOffset + aSize ) ); + m_freeChunks.insert( CHUNK( chunkSize - aSize, chunkOffset + aSize ) ); } m_freeSpace -= aSize; @@ -321,7 +321,7 @@ bool CACHED_CONTAINER::defragment( VERTEX* aTarget ) } int newOffset = 0; - Items::iterator it, it_end; + ITEMS::iterator it, it_end; for( it = m_items.begin(), it_end = m_items.end(); it != it_end; ++it ) { @@ -345,7 +345,7 @@ bool CACHED_CONTAINER::defragment( VERTEX* aTarget ) // Now there is only one big chunk of free memory m_freeChunks.clear(); wxASSERT( m_freeSpace > 0 ); - m_freeChunks.insert( Chunk( m_freeSpace, m_currentSize - m_freeSpace ) ); + m_freeChunks.insert( CHUNK( m_freeSpace, m_currentSize - m_freeSpace ) ); #if CACHED_CONTAINER_TEST > 0 prof_end( &totalTime ); @@ -369,9 +369,9 @@ void CACHED_CONTAINER::mergeFreeChunks() #endif // Reversed free chunks map - this one stores chunk size with its offset as the key - std::list freeChunks; + std::list freeChunks; - FreeChunkMap::const_iterator it, it_end; + FREE_CHUNK_MAP::const_iterator it, it_end; for( it = m_freeChunks.begin(), it_end = m_freeChunks.end(); it != it_end; ++it ) { @@ -381,7 +381,7 @@ void CACHED_CONTAINER::mergeFreeChunks() m_freeChunks.clear(); freeChunks.sort(); - std::list::const_iterator itf, itf_end; + std::list::const_iterator itf, itf_end; unsigned int offset = freeChunks.front().first; unsigned int size = freeChunks.front().second; freeChunks.pop_front(); @@ -449,7 +449,7 @@ bool CACHED_CONTAINER::resizeContainer( unsigned int aNewSize ) // We have to correct freeChunks after defragmentation m_freeChunks.clear(); wxASSERT( aNewSize - reservedSpace() > 0 ); - m_freeChunks.insert( Chunk( aNewSize - reservedSpace(), reservedSpace() ) ); + m_freeChunks.insert( CHUNK( aNewSize - reservedSpace(), reservedSpace() ) ); } else { @@ -463,7 +463,7 @@ bool CACHED_CONTAINER::resizeContainer( unsigned int aNewSize ) } // Add an entry for the new memory chunk at the end of the container - m_freeChunks.insert( Chunk( aNewSize - m_currentSize, m_currentSize ) ); + m_freeChunks.insert( CHUNK( aNewSize - m_currentSize, m_currentSize ) ); } m_vertices = newContainer; diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index e40ace14a6..1da1bd1788 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -691,7 +691,7 @@ void OPENGL_GAL::RestoreScreen() } -void OPENGL_GAL::SetTarget( RenderTarget aTarget ) +void OPENGL_GAL::SetTarget( RENDER_TARGET aTarget ) { switch( aTarget ) { @@ -713,13 +713,13 @@ void OPENGL_GAL::SetTarget( RenderTarget aTarget ) } -RenderTarget OPENGL_GAL::GetTarget() const +RENDER_TARGET OPENGL_GAL::GetTarget() const { return currentTarget; } -void OPENGL_GAL::ClearTarget( RenderTarget aTarget ) +void OPENGL_GAL::ClearTarget( RENDER_TARGET aTarget ) { // Save the current state unsigned int oldTarget = compositor.GetBuffer(); diff --git a/common/gal/opengl/shader.cpp b/common/gal/opengl/shader.cpp index e44dab4926..bddd40ca4c 100644 --- a/common/gal/opengl/shader.cpp +++ b/common/gal/opengl/shader.cpp @@ -63,7 +63,7 @@ SHADER::~SHADER() } -bool SHADER::LoadBuiltinShader( unsigned int aShaderNumber, ShaderType aShaderType ) +bool SHADER::LoadBuiltinShader( unsigned int aShaderNumber, SHADER_TYPE aShaderType ) { if( aShaderNumber >= shaders_number ) return false; @@ -72,7 +72,7 @@ bool SHADER::LoadBuiltinShader( unsigned int aShaderNumber, ShaderType aShaderTy } -bool SHADER::LoadShaderFromFile( const std::string& aShaderSourceName, ShaderType aShaderType ) +bool SHADER::LoadShaderFromFile( const std::string& aShaderSourceName, SHADER_TYPE aShaderType ) { // Load shader sources const std::string shaderSource = readSource( aShaderSourceName ); @@ -219,7 +219,7 @@ std::string SHADER::readSource( std::string aShaderSourceName ) } -bool SHADER::addSource( const std::string& aShaderSource, ShaderType aShaderType ) +bool SHADER::addSource( const std::string& aShaderSource, SHADER_TYPE aShaderType ) { if( isShaderLinked ) { diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp index df449c616a..655a16c33f 100644 --- a/common/gal/stroke_font.cpp +++ b/common/gal/stroke_font.cpp @@ -59,7 +59,7 @@ bool STROKE_FONT::LoadNewStrokeFont( const char* const aNewStrokeFont[], int aNe for( int j = 0; j < aNewStrokeFontSize; j++ ) { - Glyph glyph; + GLYPH glyph; double glyphStartX = 0.0; double glyphEndX = 0.0; VECTOR2D glyphBoundingX; @@ -118,21 +118,21 @@ bool STROKE_FONT::LoadNewStrokeFont( const char* const aNewStrokeFont[], int aNe } -BOX2D STROKE_FONT::computeBoundingBox( const Glyph& aGlyph, const VECTOR2D& aGlyphBoundingX ) const +BOX2D STROKE_FONT::computeBoundingBox( const GLYPH& aGLYPH, const VECTOR2D& aGLYPHBoundingX ) const { BOX2D boundingBox; std::deque boundingPoints; - boundingPoints.push_back( VECTOR2D( aGlyphBoundingX.x, 0 ) ); - boundingPoints.push_back( VECTOR2D( aGlyphBoundingX.y, 0 ) ); + boundingPoints.push_back( VECTOR2D( aGLYPHBoundingX.x, 0 ) ); + boundingPoints.push_back( VECTOR2D( aGLYPHBoundingX.y, 0 ) ); - for( Glyph::const_iterator pointListIt = aGlyph.begin(); pointListIt != aGlyph.end(); ++pointListIt ) + for( GLYPH::const_iterator pointListIt = aGLYPH.begin(); pointListIt != aGLYPH.end(); ++pointListIt ) { for( std::deque::const_iterator pointIt = pointListIt->begin(); pointIt != pointListIt->end(); ++pointIt ) { - boundingPoints.push_back( VECTOR2D( aGlyphBoundingX.x, pointIt->y ) ); + boundingPoints.push_back( VECTOR2D( aGLYPHBoundingX.x, pointIt->y ) ); } } @@ -241,15 +241,15 @@ void STROKE_FONT::Draw( std::string aText, const VECTOR2D& aPosition, double aRo continue; } - GlyphList::iterator glyphIt = m_glyphs.begin(); + GLYPH_LIST::iterator glyphIt = m_glyphs.begin(); std::deque::iterator bbIt = m_glyphBoundingBoxes.begin(); advance( glyphIt, (int) ( *chIt ) - (int) ' ' ); advance( bbIt, (int) ( *chIt ) - (int) ' ' ); - Glyph glyph = *glyphIt; + GLYPH glyph = *glyphIt; - for( Glyph::iterator pointListIt = glyph.begin(); pointListIt != glyph.end(); + for( GLYPH::iterator pointListIt = glyph.begin(); pointListIt != glyph.end(); pointListIt++ ) { std::deque pointListScaled; diff --git a/common/geometry/seg.cpp b/common/geometry/seg.cpp index 4668899e8d..daff746f98 100644 --- a/common/geometry/seg.cpp +++ b/common/geometry/seg.cpp @@ -22,28 +22,27 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ - #include -template -int sgn( T val ) +template +int sgn( T aVal ) { - return ( T( 0 ) < val ) - ( val < T( 0 ) ); + return ( T( 0 ) < aVal ) - ( aVal < T( 0 ) ); } -bool SEG::PointCloserThan( const VECTOR2I& aP, int dist ) const +bool SEG::PointCloserThan( const VECTOR2I& aP, int aDist ) const { - VECTOR2I d = b - a; - ecoord dist_sq = (ecoord) dist * dist; + VECTOR2I d = B - A; + ecoord dist_sq = (ecoord) aDist * aDist; SEG::ecoord l_squared = d.Dot( d ); - SEG::ecoord t = d.Dot( aP - a ); + SEG::ecoord t = d.Dot( aP - A ); if( t <= 0 || !l_squared ) - return ( aP - a ).SquaredEuclideanNorm() < dist_sq; + return ( aP - A ).SquaredEuclideanNorm() < dist_sq; else if( t >= l_squared ) - return ( aP - b ).SquaredEuclideanNorm() < dist_sq; + return ( aP - B ).SquaredEuclideanNorm() < dist_sq; int dxdy = abs( d.x ) - abs( d.y ); @@ -51,7 +50,7 @@ bool SEG::PointCloserThan( const VECTOR2I& aP, int dist ) const { int ca = -sgn( d.y ); int cb = sgn( d.x ); - int cc = -ca * a.x - cb * a.y; + int cc = -ca * A.x - cb * A.y; ecoord num = ca * aP.x + cb * aP.y + cc; num *= num; @@ -66,8 +65,8 @@ bool SEG::PointCloserThan( const VECTOR2I& aP, int dist ) const } VECTOR2I nearest; - nearest.x = a.x + rescale( t, (ecoord) d.x, l_squared ); - nearest.y = a.y + rescale( t, (ecoord) d.y, l_squared ); + nearest.x = A.x + rescale( t, (ecoord) d.x, l_squared ); + nearest.y = A.y + rescale( t, (ecoord) d.y, l_squared ); return ( nearest - aP ).SquaredEuclideanNorm() <= dist_sq; } @@ -81,10 +80,10 @@ SEG::ecoord SEG::SquaredDistance( const SEG& aSeg ) const const VECTOR2I pts[4] = { - aSeg.NearestPoint( a ) - a, - aSeg.NearestPoint( b ) - b, - NearestPoint( aSeg.a ) - aSeg.a, - NearestPoint( aSeg.b ) - aSeg.b + aSeg.NearestPoint( A ) - A, + aSeg.NearestPoint( B ) - B, + NearestPoint( aSeg.A ) - aSeg.A, + NearestPoint( aSeg.B ) - aSeg.B }; ecoord m = VECTOR2I::ECOORD_MAX; @@ -98,9 +97,9 @@ SEG::ecoord SEG::SquaredDistance( const SEG& aSeg ) const OPT_VECTOR2I SEG::Intersect( const SEG& aSeg, bool aIgnoreEndpoints, bool aLines ) const { - const VECTOR2I e( b - a ); - const VECTOR2I f( aSeg.b - aSeg.a ); - const VECTOR2I ac( aSeg.a - a ); + const VECTOR2I e( B - A ); + const VECTOR2I f( aSeg.B - aSeg.A ); + const VECTOR2I ac( aSeg.A - A ); ecoord d = f.Cross( e ); ecoord p = f.Cross( ac ); @@ -118,16 +117,16 @@ OPT_VECTOR2I SEG::Intersect( const SEG& aSeg, bool aIgnoreEndpoints, bool aLines if( !aLines && aIgnoreEndpoints && ( q == 0 || q == d ) && ( p == 0 || p == d ) ) return OPT_VECTOR2I(); - VECTOR2I ip( aSeg.a.x + rescale( q, (ecoord) f.x, d ), - aSeg.a.y + rescale( q, (ecoord) f.y, d ) ); + VECTOR2I ip( aSeg.A.x + rescale( q, (ecoord) f.x, d ), + aSeg.A.y + rescale( q, (ecoord) f.y, d ) ); return ip; } -bool SEG::ccw( const VECTOR2I& a, const VECTOR2I& b, const VECTOR2I& c ) const +bool SEG::ccw( const VECTOR2I& aA, const VECTOR2I& aB, const VECTOR2I& aC ) const { - return (ecoord) ( c.y - a.y ) * ( b.x - a.x ) > (ecoord) ( b.y - a.y ) * ( c.x - a.x ); + return (ecoord) ( aC.y - aA.y ) * ( aB.x - aA.x ) > (ecoord) ( aB.y - aA.y ) * ( aC.x - aA.x ); } @@ -135,17 +134,17 @@ bool SEG::Collide( const SEG& aSeg, int aClearance ) const { // check for intersection // fixme: move to a method - if( ccw( a, aSeg.a, aSeg.b ) != ccw( b, aSeg.a, aSeg.b ) && - ccw( a, b, aSeg.a ) != ccw( a, b, aSeg.b ) ) + if( ccw( A, aSeg.A, aSeg.B ) != ccw( B, aSeg.A, aSeg.B ) && + ccw( A, B, aSeg.A ) != ccw( A, B, aSeg.B ) ) return true; #define CHK( _seg, _pt ) \ if( (_seg).PointCloserThan( _pt, aClearance ) ) return true; - CHK( *this, aSeg.a ); - CHK( *this, aSeg.b ); - CHK( aSeg, a ); - CHK( aSeg, b ); + CHK( *this, aSeg.A ); + CHK( *this, aSeg.B ); + CHK( aSeg, A ); + CHK( aSeg, B ); #undef CHK return false; diff --git a/common/geometry/shape_collisions.cpp b/common/geometry/shape_collisions.cpp index ea6d856615..abd13caccf 100644 --- a/common/geometry/shape_collisions.cpp +++ b/common/geometry/shape_collisions.cpp @@ -50,6 +50,7 @@ static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_CIRCLE& aB, int return true; } + static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_CIRCLE& aB, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) { @@ -154,7 +155,8 @@ static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_LINE_CHAIN& aB, in } -bool CollideShapes( const SHAPE* aA, const SHAPE* aB, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ) +bool CollideShapes( const SHAPE* aA, const SHAPE* aB, int aClearance, + bool aNeedMTV, VECTOR2I& aMTV ) { switch( aA->Type() ) { @@ -163,53 +165,56 @@ bool CollideShapes( const SHAPE* aA, const SHAPE* aB, int aClearance, bool aNeed { case SH_CIRCLE: return Collide( *static_cast( aA ), - *static_cast( aB ), aClearance, aNeedMTV, aMTV ); + *static_cast( aB ), aClearance, aNeedMTV, aMTV ); case SH_LINE_CHAIN: return Collide( *static_cast( aA ), - *static_cast( aB ), aClearance, aNeedMTV, aMTV ); + *static_cast( aB ), aClearance, aNeedMTV, aMTV ); default: break; } + break; case SH_CIRCLE: switch( aB->Type() ) { case SH_RECT: return Collide( *static_cast( aB ), - *static_cast( aA ), aClearance, aNeedMTV, aMTV ); + *static_cast( aA ), aClearance, aNeedMTV, aMTV ); case SH_CIRCLE: return Collide( *static_cast( aA ), - *static_cast( aB ), aClearance, aNeedMTV, aMTV ); + *static_cast( aB ), aClearance, aNeedMTV, aMTV ); case SH_LINE_CHAIN: return Collide( *static_cast( aA ), - *static_cast( aB ), aClearance, aNeedMTV, aMTV ); + *static_cast( aB ), aClearance, aNeedMTV, aMTV ); default: break; } + break; case SH_LINE_CHAIN: switch( aB->Type() ) { case SH_RECT: return Collide( *static_cast( aB ), - *static_cast( aA ), aClearance, aNeedMTV, aMTV ); + *static_cast( aA ), aClearance, aNeedMTV, aMTV ); case SH_CIRCLE: return Collide( *static_cast( aB ), - *static_cast( aA ), aClearance, aNeedMTV, aMTV ); + *static_cast( aA ), aClearance, aNeedMTV, aMTV ); case SH_LINE_CHAIN: return Collide( *static_cast( aA ), - *static_cast( aB ), aClearance, aNeedMTV, aMTV ); + *static_cast( aB ), aClearance, aNeedMTV, aMTV ); default: break; } + break; default: break; diff --git a/common/geometry/shape_index.cpp b/common/geometry/shape_index.cpp index 986dd0c0bd..0af0e444ab 100644 --- a/common/geometry/shape_index.cpp +++ b/common/geometry/shape_index.cpp @@ -25,7 +25,7 @@ #include -template<> +template <> const SHAPE* shapeFunctor( SHAPE* aItem ) { return aItem; diff --git a/common/geometry/shape_line_chain.cpp b/common/geometry/shape_line_chain.cpp index 2587c3f14d..a78e94a584 100644 --- a/common/geometry/shape_line_chain.cpp +++ b/common/geometry/shape_line_chain.cpp @@ -31,6 +31,7 @@ using boost::optional; bool SHAPE_LINE_CHAIN::Collide( const VECTOR2I& aP, int aClearance ) const { assert( false ); + return false; } @@ -38,19 +39,20 @@ bool SHAPE_LINE_CHAIN::Collide( const VECTOR2I& aP, int aClearance ) const bool SHAPE_LINE_CHAIN::Collide( const BOX2I& aBox, int aClearance ) const { assert( false ); + return false; } bool SHAPE_LINE_CHAIN::Collide( const SEG& aSeg, int aClearance ) const { - BOX2I box_a( aSeg.a, aSeg.b - aSeg.a ); + BOX2I box_a( aSeg.A, aSeg.B - aSeg.A ); BOX2I::ecoord_type dist_sq = (BOX2I::ecoord_type) aClearance * aClearance; for( int i = 0; i < SegmentCount(); i++ ) { const SEG& s = CSegment( i ); - BOX2I box_b( s.a, s.b - s.a ); + BOX2I box_b( s.A, s.B - s.A ); BOX2I::ecoord_type d = box_a.SquaredDistance( box_b ); @@ -158,7 +160,7 @@ int SHAPE_LINE_CHAIN::Split( const VECTOR2I& aP ) // make sure we are not producing a 'slightly concave' primitive. This might happen // if aP lies very close to one of already existing points. - if( dist < min_dist && seg.a != aP && seg.b != aP ) + if( dist < min_dist && seg.A != aP && seg.B != aP ) { min_dist = dist; ii = s; @@ -208,8 +210,8 @@ struct compareOriginDistance compareOriginDistance( VECTOR2I& aOrigin ) : m_origin( aOrigin ) {}; - bool operator()( const SHAPE_LINE_CHAIN::Intersection& aA, - const SHAPE_LINE_CHAIN::Intersection& aB ) + bool operator()( const SHAPE_LINE_CHAIN::INTERSECTION& aA, + const SHAPE_LINE_CHAIN::INTERSECTION& aB ) { return ( m_origin - aA.p ).EuclideanNorm() < ( m_origin - aB.p ).EuclideanNorm(); } @@ -218,7 +220,7 @@ struct compareOriginDistance }; -int SHAPE_LINE_CHAIN::Intersect( const SEG& aSeg, Intersections& aIp ) const +int SHAPE_LINE_CHAIN::Intersect( const SEG& aSeg, INTERSECTIONS& aIp ) const { for( int s = 0; s < SegmentCount(); s++ ) { @@ -226,7 +228,7 @@ int SHAPE_LINE_CHAIN::Intersect( const SEG& aSeg, Intersections& aIp ) const if( p ) { - Intersection is; + INTERSECTION is; is.our = CSegment( s ); is.their = aSeg; is.p = *p; @@ -234,21 +236,21 @@ int SHAPE_LINE_CHAIN::Intersect( const SEG& aSeg, Intersections& aIp ) const } } - compareOriginDistance comp( aSeg.a ); + compareOriginDistance comp( aSeg.A ); sort( aIp.begin(), aIp.end(), comp ); return aIp.size(); } -int SHAPE_LINE_CHAIN::Intersect( const SHAPE_LINE_CHAIN& aChain, Intersections& aIp ) const +int SHAPE_LINE_CHAIN::Intersect( const SHAPE_LINE_CHAIN& aChain, INTERSECTIONS& aIp ) const { BOX2I bb_other = aChain.BBox(); for( int s1 = 0; s1 < SegmentCount(); s1++ ) { const SEG& a = CSegment( s1 ); - const BOX2I bb_cur( a.a, a.b - a.a ); + const BOX2I bb_cur( a.A, a.B - a.A ); if( !bb_other.Intersects( bb_cur ) ) continue; @@ -256,14 +258,14 @@ int SHAPE_LINE_CHAIN::Intersect( const SHAPE_LINE_CHAIN& aChain, Intersections& for( int s2 = 0; s2 < aChain.SegmentCount(); s2++ ) { const SEG& b = aChain.CSegment( s2 ); - Intersection is; + INTERSECTION is; if( a.Collinear( b ) ) { - if( a.Contains( b.a ) ) { is.p = b.a; aIp.push_back( is ); } - if( a.Contains( b.b ) ) { is.p = b.b; aIp.push_back( is ); } - if( b.Contains( a.a ) ) { is.p = a.a; aIp.push_back( is ); } - if( b.Contains( a.b ) ) { is.p = a.b; aIp.push_back( is ); } + if( a.Contains( b.A ) ) { is.p = b.A; aIp.push_back( is ); } + if( a.Contains( b.B ) ) { is.p = b.B; aIp.push_back( is ); } + if( b.Contains( a.A ) ) { is.p = a.A; aIp.push_back( is ); } + if( b.Contains( a.B ) ) { is.p = a.B; aIp.push_back( is ); } } else { @@ -289,7 +291,7 @@ int SHAPE_LINE_CHAIN::Intersect( const SHAPE_LINE_CHAIN& aChain, Intersections& const SEG& a = CSegment( s1 ); const SEG& b = aChain.CSegment( s2 ); OPT_VECTOR2I p = a.Intersect( b ); - Intersection is; + INTERSECTION is; if( p ) { @@ -300,16 +302,16 @@ int SHAPE_LINE_CHAIN::Intersect( const SHAPE_LINE_CHAIN& aChain, Intersections& } else if( a.Collinear( b ) ) { - if( a.a != b.a && a.a != b.b && b.Contains( a.a ) ) + if( a.A != b.A && a.A != b.B && b.Contains( a.A ) ) { - is.p = a.a; + is.p = a.A; is.our = a; is.their = b; aIp.push_back( is ); } - else if( a.b != b.a && a.b != b.b && b.Contains( a.b ) ) + else if( a.B != b.A && a.B != b.B && b.Contains( a.B ) ) { - is.p = a.b; + is.p = a.B; is.our = a; is.their = b; aIp.push_back( is ); @@ -333,7 +335,7 @@ int SHAPE_LINE_CHAIN::PathLength( const VECTOR2I& aP ) const if( d <= 1 ) { - sum += ( aP - seg.a ).EuclideanNorm(); + sum += ( aP - seg.A ).EuclideanNorm(); return sum; } else @@ -358,7 +360,7 @@ bool SHAPE_LINE_CHAIN::PointInside( const VECTOR2I& aP ) const { const SEG s = CSegment( i ); - if( aP == s.a || aP == s.b ) // edge does not belong to the interior! + if( aP == s.A || aP == s.B ) // edge does not belong to the interior! return false; if( s.Side( aP ) != cur ) @@ -378,7 +380,7 @@ bool SHAPE_LINE_CHAIN::PointOnEdge( const VECTOR2I& aP ) const { const SEG s = CSegment( i ); - if( s.a == aP || s.b == aP ) + if( s.A == aP || s.B == aP ) return true; if( s.Distance( aP ) <= 1 ) @@ -389,17 +391,17 @@ bool SHAPE_LINE_CHAIN::PointOnEdge( const VECTOR2I& aP ) const } -const optional SHAPE_LINE_CHAIN::SelfIntersecting() const +const optional SHAPE_LINE_CHAIN::SelfIntersecting() const { for( int s1 = 0; s1 < SegmentCount(); s1++ ) { for( int s2 = s1 + 1; s2 < SegmentCount(); s2++ ) { - const VECTOR2I s2a = CSegment( s2 ).a, s2b = CSegment( s2 ).b; + const VECTOR2I s2a = CSegment( s2 ).A, s2b = CSegment( s2 ).B; if( s1 + 1 != s2 && CSegment( s1 ).Contains( s2a ) ) { - Intersection is; + INTERSECTION is; is.our = CSegment( s1 ); is.their = CSegment( s2 ); is.p = s2a; @@ -407,7 +409,7 @@ const optional SHAPE_LINE_CHAIN::SelfIntersectin } else if( CSegment( s1 ).Contains( s2b ) ) { - Intersection is; + INTERSECTION is; is.our = CSegment( s1 ); is.their = CSegment( s2 ); is.p = s2b; @@ -419,7 +421,7 @@ const optional SHAPE_LINE_CHAIN::SelfIntersectin if( p ) { - Intersection is; + INTERSECTION is; is.our = CSegment( s1 ); is.their = CSegment( s2 ); is.p = *p; @@ -429,7 +431,7 @@ const optional SHAPE_LINE_CHAIN::SelfIntersectin } } - return optional(); + return optional(); } diff --git a/common/math/math_util.cpp b/common/math/math_util.cpp index c8d462b0b0..9743acb1b2 100644 --- a/common/math/math_util.cpp +++ b/common/math/math_util.cpp @@ -28,31 +28,32 @@ #include #include -template<> -int rescale( int numerator, int value, int denominator ) +template <> +int rescale( int aNumerator, int aValue, int aDenominator ) { - return (int) ( (int64_t) numerator * (int64_t) value / (int64_t) denominator ); + return (int) ( (int64_t) aNumerator * (int64_t) aValue / (int64_t) aDenominator ); } -template<> -int64_t rescale( int64_t numerator, int64_t value, int64_t denominator ) +template <> +int64_t rescale( int64_t aNumerator, int64_t aValue, int64_t aDenominator ) { int64_t r = 0; - int64_t sign = ( ( numerator < 0) ? -1 : 1 ) * ( denominator < 0 ? -1 : 1 ) * ( value < 0 ? -1 : 1 ); + int64_t sign = ( ( aNumerator < 0 ) ? -1 : 1 ) * ( aDenominator < 0 ? -1 : 1 ) * + ( aValue < 0 ? -1 : 1 ); - int64_t a = std::abs( numerator ); - int64_t b = std::abs( value ); - int64_t c = std::abs( denominator ); + int64_t a = std::abs( aNumerator ); + int64_t b = std::abs( aValue ); + int64_t c = std::abs( aDenominator ); r = c / 2; if( b <= INT_MAX && c <= INT_MAX ) { if( a <= INT_MAX ) - return sign * ( (a * b + r ) / c ); + return sign * ( ( a * b + r ) / c ); else - return sign * (a / c * b + (a % c * b + r) / c); + return sign * ( a / c * b + ( a % c * b + r ) / c); } else { diff --git a/common/tool/context_menu.cpp b/common/tool/context_menu.cpp index 9ea4770eed..e20dfdf115 100644 --- a/common/tool/context_menu.cpp +++ b/common/tool/context_menu.cpp @@ -104,8 +104,8 @@ void CONTEXT_MENU::Add( const TOOL_ACTION& aAction ) wxString menuEntry; if( aAction.HasHotKey() ) - menuEntry = wxString( ( aAction.GetMenuItem() + '\t' + getHotKeyDescription( aAction ) ).c_str(), - wxConvUTF8 ); + menuEntry = wxString( ( aAction.GetMenuItem() + '\t' + + getHotKeyDescription( aAction ) ).c_str(), wxConvUTF8 ); else menuEntry = wxString( aAction.GetMenuItem().c_str(), wxConvUTF8 ); @@ -134,17 +134,17 @@ std::string CONTEXT_MENU::getHotKeyDescription( const TOOL_ACTION& aAction ) con std::string description = ""; - if( hotkey & MD_ModAlt ) + if( hotkey & MD_ALT ) description += "ALT+"; - if( hotkey & MD_ModCtrl ) + if( hotkey & MD_CTRL ) description += "CTRL+"; - if( hotkey & MD_ModShift ) + if( hotkey & MD_SHIFT ) description += "SHIFT+"; // TODO dispatch keys such as Fx, TAB, PG_UP/DN, HOME, END, etc. - description += char(hotkey & ~MD_ModifierMask); + description += char( hotkey & ~MD_MODIFIER_MASK ); return description; } @@ -159,7 +159,7 @@ void CONTEXT_MENU::CMEventHandler::onEvent( wxEvent& aEvent ) // For example, the selection tool can use this to dynamically highlight the current item // from selection clarification popup. if( type == wxEVT_MENU_HIGHLIGHT ) - evt = TOOL_EVENT( TC_Command, TA_ContextMenuUpdate, aEvent.GetId() ); + evt = TOOL_EVENT( TC_COMMAND, TA_CONTEXT_MENU_UPDATE, aEvent.GetId() ); // One of menu entries was selected.. else if( type == wxEVT_COMMAND_MENU_SELECTED ) @@ -172,7 +172,7 @@ void CONTEXT_MENU::CMEventHandler::onEvent( wxEvent& aEvent ) else { // Handling non-action menu entries (e.g. items in clarification list) - evt = TOOL_EVENT( TC_Command, TA_ContextMenuChoice, aEvent.GetId() ); + evt = TOOL_EVENT( TC_COMMAND, TA_CONTEXT_MENU_CHOICE, aEvent.GetId() ); } } diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index d9e8744283..71c0998b6d 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -40,9 +40,9 @@ using boost::optional; ///> Stores information about a mouse button state -struct TOOL_DISPATCHER::ButtonState +struct TOOL_DISPATCHER::BUTTON_STATE { - ButtonState( TOOL_MouseButtons aButton, const wxEventType& aDownEvent, + BUTTON_STATE( TOOL_MOUSE_BUTTONS aButton, const wxEventType& aDownEvent, const wxEventType& aUpEvent ) : button( aButton ), downEvent( aDownEvent ), @@ -66,7 +66,7 @@ struct TOOL_DISPATCHER::ButtonState double dragMaxDelta; ///> Determines the mouse button for which information are stored. - TOOL_MouseButtons button; + TOOL_MOUSE_BUTTONS button; ///> The type of wxEvent that determines mouse button press. wxEventType downEvent; @@ -89,9 +89,9 @@ struct TOOL_DISPATCHER::ButtonState TOOL_DISPATCHER::TOOL_DISPATCHER( TOOL_MANAGER* aToolMgr, PCB_BASE_FRAME* aEditFrame ) : m_toolMgr( aToolMgr ), m_editFrame( aEditFrame ) { - m_buttons.push_back( new ButtonState( MB_Left, wxEVT_LEFT_DOWN, wxEVT_LEFT_UP ) ); - m_buttons.push_back( new ButtonState( MB_Right, wxEVT_RIGHT_DOWN, wxEVT_RIGHT_UP ) ); - m_buttons.push_back( new ButtonState( MB_Middle, wxEVT_MIDDLE_DOWN, wxEVT_MIDDLE_UP ) ); + m_buttons.push_back( new BUTTON_STATE( MB_LEFT, wxEVT_LEFT_DOWN, wxEVT_LEFT_UP ) ); + m_buttons.push_back( new BUTTON_STATE( MB_RIGHT, wxEVT_RIGHT_DOWN, wxEVT_RIGHT_UP ) ); + m_buttons.push_back( new BUTTON_STATE( MB_MIDDLE, wxEVT_MIDDLE_DOWN, wxEVT_MIDDLE_UP ) ); ResetState(); } @@ -99,14 +99,14 @@ TOOL_DISPATCHER::TOOL_DISPATCHER( TOOL_MANAGER* aToolMgr, PCB_BASE_FRAME* aEditF TOOL_DISPATCHER::~TOOL_DISPATCHER() { - BOOST_FOREACH( ButtonState* st, m_buttons ) + BOOST_FOREACH( BUTTON_STATE* st, m_buttons ) delete st; } void TOOL_DISPATCHER::ResetState() { - BOOST_FOREACH( ButtonState* st, m_buttons ) + BOOST_FOREACH( BUTTON_STATE* st, m_buttons ) st->Reset(); } @@ -119,7 +119,7 @@ KIGFX::VIEW* TOOL_DISPATCHER::getView() bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMotion ) { - ButtonState* st = m_buttons[aIndex]; + BUTTON_STATE* st = m_buttons[aIndex]; wxEventType type = aEvent.GetEventType(); optional evt; bool isClick = false; @@ -137,7 +137,7 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti st->downPosition = m_lastMousePos; st->dragMaxDelta = 0; st->pressed = true; - evt = TOOL_EVENT( TC_Mouse, TA_MouseDown, args ); + evt = TOOL_EVENT( TC_MOUSE, TA_MOUSE_DOWN, args ); } else if( up ) // Handle mouse button release { @@ -152,13 +152,13 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti st->dragMaxDelta < DragDistanceThreshold ) isClick = true; else - evt = TOOL_EVENT( TC_Mouse, TA_MouseUp, args ); + evt = TOOL_EVENT( TC_MOUSE, TA_MOUSE_UP, args ); } else isClick = true; if( isClick ) - evt = TOOL_EVENT( TC_Mouse, TA_MouseClick, args ); + evt = TOOL_EVENT( TC_MOUSE, TA_MOUSE_CLICK, args ); st->dragging = false; } @@ -174,7 +174,7 @@ bool TOOL_DISPATCHER::handleMouseButton( wxEvent& aEvent, int aIndex, bool aMoti if( t - st->downTimestamp > DragTimeThreshold || st->dragMaxDelta > DragDistanceThreshold ) { - evt = TOOL_EVENT( TC_Mouse, TA_MouseDrag, args ); + evt = TOOL_EVENT( TC_MOUSE, TA_MOUSE_DRAG, args ); evt->SetMouseDragOrigin( st->dragOrigin ); evt->SetMouseDelta( m_lastMousePos - st->dragOrigin ); } @@ -222,7 +222,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) if( !buttonEvents && motion ) { - evt = TOOL_EVENT( TC_Mouse, TA_MouseMotion ); + evt = TOOL_EVENT( TC_MOUSE, TA_MOUSE_MOTION ); evt->SetMousePosition( pos ); } } @@ -237,13 +237,13 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent ) if( type == wxEVT_KEY_UP ) { if( key == WXK_ESCAPE ) // ESC is the special key for cancelling tools - evt = TOOL_EVENT( TC_Command, TA_CancelTool ); + evt = TOOL_EVENT( TC_COMMAND, TA_CANCEL_TOOL ); else - evt = TOOL_EVENT( TC_Keyboard, TA_KeyUp, key | mods ); + evt = TOOL_EVENT( TC_KEYBOARD, TA_KEY_UP, key | mods ); } else { - evt = TOOL_EVENT( TC_Keyboard, TA_KeyDown, key | mods ); + evt = TOOL_EVENT( TC_KEYBOARD, TA_KEY_DOWN, key | mods ); } } diff --git a/common/tool/tool_event.cpp b/common/tool/tool_event.cpp index 641ccb6dff..b064b87624 100644 --- a/common/tool/tool_event.cpp +++ b/common/tool/tool_event.cpp @@ -40,14 +40,14 @@ struct FlagString }; -static const std::string flag2string( int flag, const FlagString* exps ) +static const std::string flag2string( int aFlag, const FlagString* aExps ) { std::string rv; - for( int i = 0; exps[i].str.length(); i++ ) + for( int i = 0; aExps[i].str.length(); i++ ) { - if( exps[i].flag & flag ) - rv += exps[i].str + " "; + if( aExps[i].flag & aFlag ) + rv += aExps[i].str + " "; } return rv; @@ -66,51 +66,51 @@ const std::string TOOL_EVENT::Format() const const FlagString categories[] = { - { TC_Mouse, "mouse" }, - { TC_Keyboard, "keyboard" }, - { TC_Command, "command" }, - { TC_Message, "message" }, - { TC_View, "view" }, + { TC_MOUSE, "mouse" }, + { TC_KEYBOARD, "keyboard" }, + { TC_COMMAND, "command" }, + { TC_MESSAGE, "message" }, + { TC_VIEW, "view" }, { 0, "" } }; const FlagString actions[] = { - { TA_MouseClick, "click" }, - { TA_MouseUp, "button-up" }, - { TA_MouseDown, "button-down" }, - { TA_MouseDrag, "drag" }, - { TA_MouseMotion, "motion" }, - { TA_MouseWheel, "wheel" }, - { TA_KeyUp, "key-up" }, - { TA_KeyDown, "key-down" }, - { TA_ViewRefresh, "view-refresh" }, - { TA_ViewZoom, "view-zoom" }, - { TA_ViewPan, "view-pan" }, - { TA_ViewDirty, "view-dirty" }, - { TA_ChangeLayer, "change-layer" }, - { TA_CancelTool, "cancel-tool" }, - { TA_ContextMenuUpdate, "context-menu-update" }, - { TA_ContextMenuChoice, "context-menu-choice" }, - { TA_Action, "action" }, - { 0, "" } + { TA_MOUSE_CLICK, "click" }, + { TA_MOUSE_UP, "button-up" }, + { TA_MOUSE_DOWN, "button-down" }, + { TA_MOUSE_DRAG, "drag" }, + { TA_MOUSE_MOTION, "motion" }, + { TA_MOUSE_WHEEL, "wheel" }, + { TA_KEY_UP, "key-up" }, + { TA_KEY_DOWN, "key-down" }, + { TA_VIEW_REFRESH, "view-refresh" }, + { TA_VIEW_ZOOM, "view-zoom" }, + { TA_VIEW_PAN, "view-pan" }, + { TA_VIEW_DIRTY, "view-dirty" }, + { TA_CHANGE_LAYER, "change-layer" }, + { TA_CANCEL_TOOL, "cancel-tool" }, + { TA_CONTEXT_MENU_UPDATE, "context-menu-update" }, + { TA_CONTEXT_MENU_CHOICE, "context-menu-choice" }, + { TA_ACTION, "action" }, + { 0, "" } }; const FlagString buttons[] = { - { MB_None, "none" }, - { MB_Left, "left" }, - { MB_Right, "right" }, - { MB_Middle, "middle" }, + { MB_NONE, "none" }, + { MB_LEFT, "left" }, + { MB_RIGHT, "right" }, + { MB_MIDDLE, "middle" }, { 0, "" } }; const FlagString modifiers[] = { - { MD_ModShift, "shift" }, - { MD_ModCtrl, "ctrl" }, - { MD_ModAlt, "alt" }, - { 0, "" } + { MD_SHIFT, "shift" }, + { MD_CTRL, "ctrl" }, + { MD_ALT, "alt" }, + { 0, "" } }; ev = "category: "; @@ -118,20 +118,20 @@ const std::string TOOL_EVENT::Format() const ev += " action: "; ev += flag2string( m_actions, actions ); - if( m_actions & TA_Mouse ) + if( m_actions & TA_MOUSE ) { ev += " btns: "; ev += flag2string( m_mouseButtons, buttons ); } - if( m_actions & TA_Keyboard ) + if( m_actions & TA_KEYBOARD ) { char tmp[128]; sprintf( tmp, "key: %d", m_keyCode ); ev += tmp; } - if( m_actions & ( TA_Mouse | TA_Keyboard ) ) + if( m_actions & ( TA_MOUSE | TA_KEYBOARD ) ) { ev += " mods: "; ev += flag2string( m_modifiers, modifiers ); diff --git a/common/tool/tool_interactive.cpp b/common/tool/tool_interactive.cpp index efc764684c..33756cf3d8 100644 --- a/common/tool/tool_interactive.cpp +++ b/common/tool/tool_interactive.cpp @@ -30,13 +30,13 @@ #include TOOL_INTERACTIVE::TOOL_INTERACTIVE( TOOL_ID aId, const std::string& aName ) : - TOOL_BASE( TOOL_Interactive, aId, aName ) + TOOL_BASE( INTERACTIVE, aId, aName ) { } TOOL_INTERACTIVE::TOOL_INTERACTIVE( const std::string& aName ) : - TOOL_BASE( TOOL_Interactive, TOOL_MANAGER::MakeToolId( aName ), aName ) + TOOL_BASE( INTERACTIVE, TOOL_MANAGER::MakeToolId( aName ), aName ) { } diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 9952127c33..0604aa80f3 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -134,7 +134,7 @@ void TOOL_MANAGER::RegisterTool( TOOL_BASE* aTool ) aTool->m_toolMgr = this; - if( aTool->GetType() == TOOL_Interactive ) + if( aTool->GetType() == INTERACTIVE ) { bool initState = static_cast( aTool )->Init(); @@ -158,7 +158,7 @@ bool TOOL_MANAGER::InvokeTool( TOOL_ID aToolId ) { TOOL_BASE* tool = FindTool( aToolId ); - if( tool && tool->GetType() == TOOL_Interactive ) + if( tool && tool->GetType() == INTERACTIVE ) return invokeTool( tool ); return false; // there is no tool with the given id @@ -169,7 +169,7 @@ bool TOOL_MANAGER::InvokeTool( const std::string& aToolName ) { TOOL_BASE* tool = FindTool( aToolName ); - if( tool && tool->GetType() == TOOL_Interactive ) + if( tool && tool->GetType() == INTERACTIVE ) return invokeTool( tool ); return false; // there is no tool with the given name @@ -192,7 +192,7 @@ bool TOOL_MANAGER::invokeTool( TOOL_BASE* aTool ) { wxASSERT( aTool != NULL ); - TOOL_EVENT evt( TC_Command, TA_Action, aTool->GetName() ); + TOOL_EVENT evt( TC_COMMAND, TA_ACTION, aTool->GetName() ); ProcessEvent( evt ); return true; @@ -203,7 +203,7 @@ bool TOOL_MANAGER::runTool( TOOL_ID aToolId ) { TOOL_BASE* tool = FindTool( aToolId ); - if( tool && tool->GetType() == TOOL_Interactive ) + if( tool && tool->GetType() == INTERACTIVE ) return runTool( tool ); return false; // there is no tool with the given id @@ -214,7 +214,7 @@ bool TOOL_MANAGER::runTool( const std::string& aToolName ) { TOOL_BASE* tool = FindTool( aToolName ); - if( tool && tool->GetType() == TOOL_Interactive ) + if( tool && tool->GetType() == INTERACTIVE ) return runTool( tool ); return false; // there is no tool with the given name @@ -360,13 +360,13 @@ void TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent ) bool TOOL_MANAGER::dispatchStandardEvents( TOOL_EVENT& aEvent ) { - if( aEvent.Action() == TA_KeyUp ) + if( aEvent.Action() == TA_KEY_UP ) { // Check if there is a hotkey associated if( m_actionMgr->RunHotKey( aEvent.Modifier() | aEvent.KeyCode() ) ) return false; // hotkey event was handled so it does not go any further } - else if( aEvent.Category() == TC_Command ) // it may be a tool activation event + else if( aEvent.Category() == TC_COMMAND ) // it may be a tool activation event { dispatchActivation( aEvent ); // do not return false, as the event has to go on to the destined tool @@ -433,11 +433,11 @@ bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) // or immediately (CMENU_NOW) mode. The latter is used for clarification lists. if( st->contextMenuTrigger != CMENU_OFF ) { - if( st->contextMenuTrigger == CMENU_BUTTON && !aEvent.IsClick( MB_Right ) ) + if( st->contextMenuTrigger == CMENU_BUTTON && !aEvent.IsClick( MB_RIGHT ) ) break; st->pendingWait = true; - st->waitEvents = TOOL_EVENT( TC_Any, TA_Any ); + st->waitEvents = TOOL_EVENT( TC_ANY, TA_ANY ); if( st->contextMenuTrigger == CMENU_NOW ) st->contextMenuTrigger = CMENU_OFF; @@ -446,7 +446,7 @@ bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) GetEditFrame()->PopupMenu( menu->GetMenu() ); // - TOOL_EVENT evt( TC_Command, TA_ContextMenuChoice ); + TOOL_EVENT evt( TC_COMMAND, TA_CONTEXT_MENU_CHOICE ); dispatchInternal( evt ); break; @@ -498,7 +498,7 @@ void TOOL_MANAGER::SetEnvironment( EDA_ITEM* aModel, KIGFX::VIEW* aView, { TOOL_BASE* tool = m_toolIdIndex[toolId]->theTool; - if( tool->GetType() == TOOL_Interactive ) + if( tool->GetType() == INTERACTIVE ) static_cast( tool )->Reset(); } } diff --git a/common/view/view.cpp b/common/view/view.cpp index bee8903722..8ecb887086 100644 --- a/common/view/view.cpp +++ b/common/view/view.cpp @@ -67,7 +67,7 @@ VIEW::VIEW( bool aIsDynamic ) : VIEW::~VIEW() { - BOOST_FOREACH( LayerMap::value_type& l, m_layers ) + BOOST_FOREACH( LAYER_MAP::value_type& l, m_layers ) { delete l.second.items; } @@ -156,7 +156,7 @@ struct queryVisitor void operator()( VIEW_ITEM* aItem ) { if( aItem->ViewIsVisible() ) - m_cont.push_back( VIEW::LayerItemPair( aItem, m_layer ) ); + m_cont.push_back( VIEW::LAYER_ITEM_PAIR( aItem, m_layer ) ); } Container& m_cont; @@ -164,7 +164,7 @@ struct queryVisitor }; -int VIEW::Query( const BOX2I& aRect, std::vector& aResult ) +int VIEW::Query( const BOX2I& aRect, std::vector& aResult ) { if( m_orderedLayers.empty() ) return 0; @@ -179,7 +179,7 @@ int VIEW::Query( const BOX2I& aRect, std::vector& aResult ) if( ( *i )->displayOnly ) continue; - queryVisitor > visitor( aResult, ( *i )->id ); + queryVisitor > visitor( aResult, ( *i )->id ); ( *i )->items->Query( aRect, visitor ); } @@ -424,7 +424,7 @@ void VIEW::UpdateAllLayersColor() r.SetMaximum(); - for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) + for( LAYER_MAP_ITER i = m_layers.begin(); i != m_layers.end(); ++i ) { VIEW_LAYER* l = &( ( *i ).second ); @@ -555,7 +555,7 @@ void VIEW::UpdateAllLayersOrder() { sortLayers(); - BOOST_FOREACH( LayerMap::value_type& l, m_layers ) + BOOST_FOREACH( LAYER_MAP::value_type& l, m_layers ) { ChangeLayerDepth( l.first, l.second.renderingOrder ); } @@ -727,7 +727,7 @@ void VIEW::Clear() r.SetMaximum(); - for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) + for( LAYER_MAP_ITER i = m_layers.begin(); i != m_layers.end(); ++i ) { VIEW_LAYER* l = &( ( *i ).second ); unlinkItem v; @@ -811,7 +811,7 @@ void VIEW::clearGroupCache() r.SetMaximum(); clearLayerCache visitor( this ); - for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) + for( LAYER_MAP_ITER i = m_layers.begin(); i != m_layers.end(); ++i ) { VIEW_LAYER* l = &( ( *i ).second ); l->items->Query( r, visitor ); @@ -858,7 +858,7 @@ void VIEW::sortLayers() m_orderedLayers.resize( m_layers.size() ); - for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) + for( LAYER_MAP_ITER i = m_layers.begin(); i != m_layers.end(); ++i ) m_orderedLayers[n++] = &i->second; sort( m_orderedLayers.begin(), m_orderedLayers.end(), compareRenderingOrder ); @@ -974,7 +974,7 @@ void VIEW::RecacheAllItems( bool aImmediately ) prof_start( &totalRealTime, false ); #endif /* __WXDEBUG__ */ - for( LayerMapIter i = m_layers.begin(); i != m_layers.end(); ++i ) + for( LAYER_MAP_ITER i = m_layers.begin(); i != m_layers.end(); ++i ) { VIEW_LAYER* l = &( ( *i ).second ); diff --git a/common/view/view_group.cpp b/common/view/view_group.cpp index 7cc187c397..1459954902 100644 --- a/common/view/view_group.cpp +++ b/common/view/view_group.cpp @@ -142,7 +142,7 @@ void VIEW_GROUP::ItemsSetVisibility( bool aVisible ) } -void VIEW_GROUP::ItemsViewUpdate( VIEW_ITEM::ViewUpdateFlags aFlags ) +void VIEW_GROUP::ItemsViewUpdate( VIEW_ITEM::VIEW_UPDATE_FLAGS aFlags ) { std::set::const_iterator it, it_end; diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 8a2f16c8d6..7f7308d935 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -39,26 +39,26 @@ WX_VIEW_CONTROLS::WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ) : m_state( IDLE ), m_parentPanel( aParentPanel ) { - m_parentPanel->Connect( wxEVT_MOTION, wxMouseEventHandler( - WX_VIEW_CONTROLS::onMotion ), NULL, this ); - m_parentPanel->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( - WX_VIEW_CONTROLS::onWheel ), NULL, this ); - m_parentPanel->Connect( wxEVT_MIDDLE_UP, wxMouseEventHandler( - WX_VIEW_CONTROLS::onButton ), NULL, this ); - m_parentPanel->Connect( wxEVT_MIDDLE_DOWN, wxMouseEventHandler( - WX_VIEW_CONTROLS::onButton ), NULL, this ); - m_parentPanel->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( - WX_VIEW_CONTROLS::onButton ), NULL, this ); - m_parentPanel->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( - WX_VIEW_CONTROLS::onButton ), NULL, this ); + m_parentPanel->Connect( wxEVT_MOTION, + wxMouseEventHandler( WX_VIEW_CONTROLS::onMotion ), NULL, this ); + m_parentPanel->Connect( wxEVT_MOUSEWHEEL, + wxMouseEventHandler( WX_VIEW_CONTROLS::onWheel ), NULL, this ); + m_parentPanel->Connect( wxEVT_MIDDLE_UP, + wxMouseEventHandler( WX_VIEW_CONTROLS::onButton ), NULL, this ); + m_parentPanel->Connect( wxEVT_MIDDLE_DOWN, + wxMouseEventHandler( WX_VIEW_CONTROLS::onButton ), NULL, this ); + m_parentPanel->Connect( wxEVT_LEFT_UP, + wxMouseEventHandler( WX_VIEW_CONTROLS::onButton ), NULL, this ); + m_parentPanel->Connect( wxEVT_LEFT_DOWN, + wxMouseEventHandler( WX_VIEW_CONTROLS::onButton ), NULL, this ); #if defined _WIN32 || defined _WIN64 - m_parentPanel->Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( - WX_VIEW_CONTROLS::onEnter ), NULL, this ); + m_parentPanel->Connect( wxEVT_ENTER_WINDOW, + wxMouseEventHandler( WX_VIEW_CONTROLS::onEnter ), NULL, this ); #endif m_panTimer.SetOwner( this ); - this->Connect( wxEVT_TIMER, wxTimerEventHandler( - WX_VIEW_CONTROLS::onTimer ), NULL, this ); + this->Connect( wxEVT_TIMER, + wxTimerEventHandler( WX_VIEW_CONTROLS::onTimer ), NULL, this ); } diff --git a/include/gal/cairo/cairo_gal.h b/include/gal/cairo/cairo_gal.h index 09a2793273..20477db08a 100644 --- a/include/gal/cairo/cairo_gal.h +++ b/include/gal/cairo/cairo_gal.h @@ -217,13 +217,13 @@ public: virtual void RestoreScreen(); /// @copydoc GAL::SetTarget() - virtual void SetTarget( RenderTarget aTarget ); + virtual void SetTarget( RENDER_TARGET aTarget ); /// @copydoc GAL::GetTarget() - virtual RenderTarget GetTarget() const; + virtual RENDER_TARGET GetTarget() const; /// @copydoc GAL::ClearTarget() - virtual void ClearTarget( RenderTarget aTarget ); + virtual void ClearTarget( RENDER_TARGET aTarget ); // ------- // Cursor @@ -267,7 +267,7 @@ private: boost::shared_ptr compositor; ///< Object for layers compositing unsigned int mainBuffer; ///< Handle to the main buffer unsigned int overlayBuffer; ///< Handle to the overlay buffer - RenderTarget currentTarget; ///< Current rendering target + RENDER_TARGET currentTarget; ///< Current rendering target bool validCompositor; ///< Compositor initialization flag // Variables related to wxWidgets @@ -290,7 +290,8 @@ private: static const int MAX_CAIRO_ARGUMENTS = 6; /// Definitions for the command recorder - enum GraphicsCommand { + enum GRAPHICS_COMMAND + { CMD_SET_FILL, ///< Enable/disable filling CMD_SET_STROKE, ///< Enable/disable stroking CMD_SET_FILLCOLOR, ///< Set the fill color @@ -310,20 +311,20 @@ private: /// Type definition for an graphics group element typedef struct { - GraphicsCommand command; ///< Command to execute + GRAPHICS_COMMAND command; ///< Command to execute double arguments[MAX_CAIRO_ARGUMENTS]; ///< Arguments for Cairo commands bool boolArgument; ///< A bool argument int intArgument; ///< An int argument cairo_path_t* cairoPath; ///< Pointer to a Cairo path - } GroupElement; + } GROUP_ELEMENT; // Variables for the grouping function bool isGrouping; ///< Is grouping enabled ? bool isElementAdded; ///< Was an graphic element added ? - typedef std::deque Group; ///< A graphic group type definition - std::map groups; ///< List of graphic groups + typedef std::deque GROUP; ///< A graphic group type definition + std::map groups; ///< List of graphic groups unsigned int groupCounter; ///< Counter used for generating keys for groups - Group* currentGroup; ///< Currently used group + GROUP* currentGroup; ///< Currently used group // Variables related to Cairo <-> wxWidgets cairo_matrix_t cairoWorldScreenMatrix; ///< Cairo world to screen transformation matrix diff --git a/include/gal/definitions.h b/include/gal/definitions.h index 87db4103be..4ee1d6f077 100644 --- a/include/gal/definitions.h +++ b/include/gal/definitions.h @@ -34,9 +34,9 @@ namespace KIGFX { /** - * RenderTarget: Possible rendering targets + * RENDER_TARGET: Possible rendering targets */ -enum RenderTarget +enum RENDER_TARGET { TARGET_CACHED = 0, ///< Main rendering target (cached) TARGET_NONCACHED, ///< Auxiliary rendering target (noncached) diff --git a/include/gal/graphics_abstraction_layer.h b/include/gal/graphics_abstraction_layer.h index 6bb796c9cd..f374979531 100644 --- a/include/gal/graphics_abstraction_layer.h +++ b/include/gal/graphics_abstraction_layer.h @@ -589,21 +589,21 @@ public: * * @param aTarget is the new target for rendering. */ - virtual void SetTarget( RenderTarget aTarget ) = 0; + virtual void SetTarget( RENDER_TARGET aTarget ) = 0; /** * @brief Gets the currently used target for rendering. * * @return The current rendering target. */ - virtual RenderTarget GetTarget() const = 0; + virtual RENDER_TARGET GetTarget() const = 0; /** * @brief Clears the target for rendering. * * @param aTarget is the target to be cleared. */ - virtual void ClearTarget( RenderTarget aTarget ) = 0; + virtual void ClearTarget( RENDER_TARGET aTarget ) = 0; // ------------- // Grid methods diff --git a/include/gal/opengl/cached_container.h b/include/gal/opengl/cached_container.h index 3c99fd0ea3..e4547ceaee 100644 --- a/include/gal/opengl/cached_container.h +++ b/include/gal/opengl/cached_container.h @@ -49,19 +49,19 @@ class CACHED_CONTAINER : public VERTEX_CONTAINER public: CACHED_CONTAINER( unsigned int aSize = defaultInitSize ); - ///< @copydoc VERTEX_CONTAINER::SetItem() + ///> @copydoc VERTEX_CONTAINER::SetItem() virtual void SetItem( VERTEX_ITEM* aItem ); - ///< @copydoc VERTEX_CONTAINER::FinishItem() + ///> @copydoc VERTEX_CONTAINER::FinishItem() virtual void FinishItem(); - ///< @copydoc VERTEX_CONTAINER::Allocate() + ///> @copydoc VERTEX_CONTAINER::Allocate() virtual VERTEX* Allocate( unsigned int aSize ); - ///< @copydoc VERTEX_CONTAINER::Delete() + ///> @copydoc VERTEX_CONTAINER::Delete() virtual void Delete( VERTEX_ITEM* aItem ); - ///< @copydoc VERTEX_CONTAINER::Clear() + ///> @copydoc VERTEX_CONTAINER::Clear() virtual void Clear(); /** @@ -73,23 +73,23 @@ public: virtual VERTEX* GetVertices( const VERTEX_ITEM* aItem ) const; protected: - ///< Maps size of free memory chunks to their offsets - typedef std::pair Chunk; - typedef std::multimap FreeChunkMap; + ///> Maps size of free memory chunks to their offsets + typedef std::pair CHUNK; + typedef std::multimap FREE_CHUNK_MAP; /// List of all the stored items - typedef std::set Items; + typedef std::set ITEMS; - ///< Stores size & offset of free chunks. - FreeChunkMap m_freeChunks; + ///> Stores size & offset of free chunks. + FREE_CHUNK_MAP m_freeChunks; - ///< Stored VERTEX_ITEMs - Items m_items; + ///> Stored VERTEX_ITEMs + ITEMS m_items; - ///< Currently modified item + ///> Currently modified item VERTEX_ITEM* m_item; - ///< Properties of currently modified chunk & item + ///> Properties of currently modified chunk & item unsigned int m_chunkSize; unsigned int m_chunkOffset; unsigned int m_itemSize; @@ -146,7 +146,7 @@ private: * * @param aChunk is the chunk. */ - inline int getChunkSize( const Chunk& aChunk ) const + inline int getChunkSize( const CHUNK& aChunk ) const { return aChunk.first; } @@ -157,7 +157,7 @@ private: * * @param aChunk is the chunk. */ - inline unsigned int getChunkOffset( const Chunk& aChunk ) const + inline unsigned int getChunkOffset( const CHUNK& aChunk ) const { return aChunk.second; } diff --git a/include/gal/opengl/gpu_manager.h b/include/gal/opengl/gpu_manager.h index 0088d2942c..7415ac5cfc 100644 --- a/include/gal/opengl/gpu_manager.h +++ b/include/gal/opengl/gpu_manager.h @@ -89,15 +89,17 @@ public: protected: GPU_MANAGER( VERTEX_CONTAINER* aContainer ); - ///< Drawing status flag. + ///> Drawing status flag. bool m_isDrawing; - ///< Container that stores vertices data. + ///> Container that stores vertices data. VERTEX_CONTAINER* m_container; - ///< Shader handling + ///> Shader handling SHADER* m_shader; - int m_shaderAttrib; ///< Location of shader attributes (for glVertexAttribPointer) + + ///> Location of shader attributes (for glVertexAttribPointer) + int m_shaderAttrib; }; @@ -107,19 +109,19 @@ public: GPU_CACHED_MANAGER( VERTEX_CONTAINER* aContainer ); ~GPU_CACHED_MANAGER(); - ///< @copydoc GPU_MANAGER::Initialize() + ///> @copydoc GPU_MANAGER::Initialize() virtual void Initialize(); - ///< @copydoc GPU_MANAGER::BeginDrawing() + ///> @copydoc GPU_MANAGER::BeginDrawing() virtual void BeginDrawing(); - ///< @copydoc GPU_MANAGER::DrawIndices() + ///> @copydoc GPU_MANAGER::DrawIndices() virtual void DrawIndices( unsigned int aOffset, unsigned int aSize ); - ///< @copydoc GPU_MANAGER::DrawAll() + ///> @copydoc GPU_MANAGER::DrawAll() virtual void DrawAll(); - ///< @copydoc GPU_MANAGER::EndDrawing() + ///> @copydoc GPU_MANAGER::EndDrawing() virtual void EndDrawing(); /** @@ -130,10 +132,19 @@ public: virtual void uploadToGpu(); protected: + ///> Buffers initialization flag bool m_buffersInitialized; + + ///> Pointer to the current indices buffer boost::scoped_array m_indices; + + ///> Pointer to the first free cell in the indices buffer GLuint* m_indicesPtr; + + ///> Handle to vertices buffer GLuint m_verticesBuffer; + + ///> Number of indices stored in the indices buffer unsigned int m_indicesSize; }; @@ -143,19 +154,19 @@ class GPU_NONCACHED_MANAGER : public GPU_MANAGER public: GPU_NONCACHED_MANAGER( VERTEX_CONTAINER* aContainer ); - ///< @copydoc GPU_MANAGER::Initialize() + ///> @copydoc GPU_MANAGER::Initialize() virtual void Initialize(); - ///< @copydoc GPU_MANAGER::BeginDrawing() + ///> @copydoc GPU_MANAGER::BeginDrawing() virtual void BeginDrawing(); - ///< @copydoc GPU_MANAGER::DrawIndices() + ///> @copydoc GPU_MANAGER::DrawIndices() virtual void DrawIndices( unsigned int aOffset, unsigned int aSize ); - ///< @copydoc GPU_MANAGER::DrawAll() + ///> @copydoc GPU_MANAGER::DrawAll() virtual void DrawAll(); - ///< @copydoc GPU_MANAGER::EndDrawing() + ///> @copydoc GPU_MANAGER::EndDrawing() virtual void EndDrawing(); }; } // namespace KIGFX diff --git a/include/gal/opengl/opengl_gal.h b/include/gal/opengl/opengl_gal.h index 6d64035195..401f0a4411 100644 --- a/include/gal/opengl/opengl_gal.h +++ b/include/gal/opengl/opengl_gal.h @@ -106,7 +106,8 @@ public: virtual void DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ); /// @copydoc GAL::DrawSegment() - virtual void DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aWidth ); + virtual void DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, + double aWidth ); /// @copydoc GAL::DrawCircle() virtual void DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ); @@ -209,13 +210,13 @@ public: virtual void RestoreScreen(); /// @copydoc GAL::SetTarget() - virtual void SetTarget( RenderTarget aTarget ); + virtual void SetTarget( RENDER_TARGET aTarget ); /// @copydoc GAL::GetTarget() - virtual RenderTarget GetTarget() const; + virtual RENDER_TARGET GetTarget() const; /// @copydoc GAL::ClearTarget() - virtual void ClearTarget( RenderTarget aTarget ); + virtual void ClearTarget( RENDER_TARGET aTarget ); // ------- // Cursor @@ -275,8 +276,8 @@ private: wxEvtHandler* paintListener; // Vertex buffer objects related fields - typedef std::map< unsigned int, boost::shared_ptr > GroupsMap; - GroupsMap groups; ///< Stores informations about VBO objects (groups) + typedef std::map< unsigned int, boost::shared_ptr > GROUPS_MAP; + GROUPS_MAP groups; ///< Stores informations about VBO objects (groups) unsigned int groupCounter; ///< Counter used for generating keys for groups VERTEX_MANAGER* currentManager; ///< Currently used VERTEX_MANAGER (for storing VERTEX_ITEMs) VERTEX_MANAGER cachedManager; ///< Container for storing cached VERTEX_ITEMs @@ -287,7 +288,7 @@ private: OPENGL_COMPOSITOR compositor; ///< Handles multiple rendering targets unsigned int mainBuffer; ///< Main rendering target unsigned int overlayBuffer; ///< Auxiliary rendering target (for menus etc.) - RenderTarget currentTarget; ///< Current rendering target + RENDER_TARGET currentTarget; ///< Current rendering target // Shader SHADER shader; ///< There is only one shader used for different objects diff --git a/include/gal/opengl/shader.h b/include/gal/opengl/shader.h index 4ac02cf2ab..a83de846e3 100644 --- a/include/gal/opengl/shader.h +++ b/include/gal/opengl/shader.h @@ -39,7 +39,7 @@ namespace KIGFX class OPENGL_GAL; /// Type definition for the shader -enum ShaderType +enum SHADER_TYPE { SHADER_TYPE_VERTEX = GL_VERTEX_SHADER, ///< Vertex shader SHADER_TYPE_FRAGMENT = GL_FRAGMENT_SHADER, ///< Fragment shader @@ -77,7 +77,7 @@ public: * @param aShaderType is the type of the shader. * @return True in case of success, false otherwise. */ - bool LoadBuiltinShader( unsigned int aShaderNumber, ShaderType aShaderType ); + bool LoadBuiltinShader( unsigned int aShaderNumber, SHADER_TYPE aShaderType ); /** * @brief Loads one of the built-in shaders and compiles it. @@ -86,7 +86,7 @@ public: * @param aShaderType is the type of the shader. * @return True in case of success, false otherwise. */ - bool LoadShaderFromFile( const std::string& aShaderSourceName, ShaderType aShaderType ); + bool LoadShaderFromFile( const std::string& aShaderSourceName, SHADER_TYPE aShaderType ); /** * @brief Link the shaders. @@ -193,7 +193,7 @@ private: * @param aShaderType is the type of the shader. * @return True in case of success, false otherwise. */ - bool addSource( const std::string& aShaderSource, ShaderType aShaderType ); + bool addSource( const std::string& aShaderSource, SHADER_TYPE aShaderType ); std::deque shaderNumbers; ///< Shader number list GLuint programNumber; ///< Shader program number diff --git a/include/gal/opengl/vertex_common.h b/include/gal/opengl/vertex_common.h index 2610ffb0ef..9ec8d9bf2f 100644 --- a/include/gal/opengl/vertex_common.h +++ b/include/gal/opengl/vertex_common.h @@ -35,7 +35,7 @@ namespace KIGFX { // Possible types of shaders -enum SHADER_TYPE +enum SHADER_MODE { SHADER_NONE = 0, SHADER_LINE, diff --git a/include/gal/stroke_font.h b/include/gal/stroke_font.h index 034214e296..50882ee142 100644 --- a/include/gal/stroke_font.h +++ b/include/gal/stroke_font.h @@ -38,8 +38,8 @@ namespace KIGFX { class GAL; -typedef std::deque< std::deque > Glyph; -typedef std::deque GlyphList; +typedef std::deque< std::deque > GLYPH; +typedef std::deque GLYPH_LIST; /** * @brief Class STROKE_FONT implements stroke font drawing. @@ -157,7 +157,7 @@ public: private: GAL* m_gal; ///< Pointer to the GAL - GlyphList m_glyphs; ///< Glyph list + GLYPH_LIST m_glyphs; ///< Glyph list std::deque m_glyphBoundingBoxes; ///< Bounding boxes of the glyphs double m_scaleFactor; ///< Scale factor for the glyph VECTOR2D m_glyphSize; ///< Size of the glyphs @@ -172,7 +172,7 @@ private: * @param aGlyphBoundingX is the x-component of the bounding box size. * @return is the complete bounding box size. */ - BOX2D computeBoundingBox( const Glyph& aGlyph, const VECTOR2D& aGlyphBoundingX ) const; + BOX2D computeBoundingBox( const GLYPH& aGlyph, const VECTOR2D& aGlyphBoundingX ) const; /** * @brief Compute the size of a given text. diff --git a/include/geometry/seg.h b/include/geometry/seg.h index 4a2e8ccecc..b400930ef2 100644 --- a/include/geometry/seg.h +++ b/include/geometry/seg.h @@ -43,18 +43,18 @@ public: friend inline std::ostream& operator<<( std::ostream& aStream, const SEG& aSeg ); /* Start and the of the segment. Public, to make access simpler. These are references - * to an object the segment belongs to (e.g. a line chain) or references to locally stored points - * (m_a, m_b). + * to an object the segment belongs to (e.g. a line chain) or references to locally stored + * points (m_a, m_b). */ - VECTOR2I& a, b; + VECTOR2I& A, B; /** Default constructor * Creates an empty (0, 0) segment, locally-referenced */ - SEG() : a( m_a ), b( m_b ) + SEG() : A( m_a ), B( m_b ) { - a = m_a; - b = m_b; + A = m_a; + B = m_b; m_is_local = true; m_index = -1; } @@ -63,238 +63,243 @@ public: * Constructor * Creates a segment between (aX1, aY1) and (aX2, aY2), locally referenced */ - SEG( int aX1, int aY1, int aX2, int aY2 ) : a( m_a ), b( m_b ) + SEG( int aX1, int aY1, int aX2, int aY2 ) : A( m_a ), B( m_b ) { m_a = VECTOR2I( aX1, aY1 ); m_b = VECTOR2I( aX2, aY2 ); - a = m_a; - b = m_b; + A = m_a; + B = m_b; m_is_local = true; m_index = -1; } - /** - * Constructor - * Creates a segment between (aA) and (aB), locally referenced - */ - SEG( const VECTOR2I& aA, const VECTOR2I& aB ) : a( m_a ), b( m_b ), m_a( aA ), m_b( aB ) + /** + * Constructor + * Creates a segment between (aA) and (aB), locally referenced + */ + SEG( const VECTOR2I& aA, const VECTOR2I& aB ) : A( m_a ), B( m_b ), m_a( aA ), m_b( aB ) + { + A = m_a; + B = m_b; + m_is_local = true; + m_index = -1; + } + + /** + * Constructor + * Creates a segment between (aA) and (aB), referenced to a multi-segment shape + * @param aA reference to the start point in the parent shape + * @param aB reference to the end point in the parent shape + * @param aIndex index of the segment within the parent shape + */ + SEG ( VECTOR2I& aA, VECTOR2I& aB, int aIndex ) : A( aA ), B( aB ) + { + m_is_local = false; + m_index = aIndex; + } + + /** + * Copy constructor + */ + SEG ( const SEG& aSeg ) : A( m_a ), B( m_b ) + { + if( aSeg.m_is_local ) { - a = m_a; - b = m_b; + m_a = aSeg.m_a; + m_b = aSeg.m_b; + A = m_a; + B = m_b; m_is_local = true; m_index = -1; } - - /** - * Constructor - * Creates a segment between (aA) and (aB), referenced to a multi-segment shape - * @param aA reference to the start point in the parent shape - * @param aB reference to the end point in the parent shape - * @param aIndex index of the segment within the parent shape - */ - SEG ( VECTOR2I& aA, VECTOR2I& aB, int aIndex ) : a( aA ), b( aB ) + else { - m_is_local = false; - m_index = aIndex; - } - - /** - * Copy constructor - */ - SEG ( const SEG& aSeg ) : a( m_a ), b( m_b ) - { - if (aSeg.m_is_local) - { - m_a = aSeg.m_a; - m_b = aSeg.m_b; - a = m_a; - b = m_b; - m_is_local = true; - m_index = -1; - } else { - a = aSeg.a; - b = aSeg.b; - m_index = aSeg.m_index; - m_is_local = false; - } - } - - SEG& operator=( const SEG& aSeg ) - { - a = aSeg.a; - b = aSeg.b; - m_a = aSeg.m_a; - m_b = aSeg.m_b; + A = aSeg.A; + B = aSeg.B; m_index = aSeg.m_index; - m_is_local = aSeg.m_is_local; - return *this; + m_is_local = false; } + } - /** - * Function LineProject() - * - * Computes the perpendicular projection point of aP on a line passing through - * ends of the segment. - * @param aP point to project - * @return projected point - */ - VECTOR2I LineProject( const VECTOR2I& aP ) const; + SEG& operator=( const SEG& aSeg ) + { + A = aSeg.A; + B = aSeg.B; + m_a = aSeg.m_a; + m_b = aSeg.m_b; + m_index = aSeg.m_index; + m_is_local = aSeg.m_is_local; - /** - * Function Side() - * - * Determines on which side of directed line passing via segment ends point aP lies. - * @param aP point to determine the orientation wrs to self - * @return: < 0: left, 0 : on the line, > 0 : right - */ - int Side( const VECTOR2I& aP ) const - { - const ecoord det = ( b - a ).Cross( aP - a ); + return *this; + } - return det < 0 ? -1 : ( det > 0 ? 1 : 0 ); - } + /** + * Function LineProject() + * + * Computes the perpendicular projection point of aP on a line passing through + * ends of the segment. + * @param aP point to project + * @return projected point + */ + VECTOR2I LineProject( const VECTOR2I& aP ) const; - /** - * Function LineDistance() - * - * Returns the closest Euclidean distance between point aP and the line defined by - * the ends of segment (this). - * @param aDetermineSide: when true, the sign of the returned value indicates - * the side of the line at which we are (negative = left) - * @return the distance - */ - int LineDistance( const VECTOR2I& aP, bool aDetermineSide = false ) const; + /** + * Function Side() + * + * Determines on which side of directed line passing via segment ends point aP lies. + * @param aP point to determine the orientation wrs to self + * @return: < 0: left, 0 : on the line, > 0 : right + */ + int Side( const VECTOR2I& aP ) const + { + const ecoord det = ( B - A ).Cross( aP - A ); - /** - * Function NearestPoint() - * - * Computes a point on the segment (this) that is closest to point aP. - * @return: nearest point - */ - const VECTOR2I NearestPoint( const VECTOR2I &aP ) const; + return det < 0 ? -1 : ( det > 0 ? 1 : 0 ); + } - /** - * Function Intersect() - * - * Computes intersection point of segment (this) with segment aSeg. - * @param aSeg: segment to intersect with - * @param aIgnoreEndpoints: don't treat corner cases (i.e. end of one segment touching the other) - * as intersections. - * @param aLines: treat segments as infinite lines - * @return intersection point, if exists - */ - OPT_VECTOR2I Intersect( const SEG& aSeg, bool aIgnoreEndpoints = false, bool aLines = false ) const; + /** + * Function LineDistance() + * + * Returns the closest Euclidean distance between point aP and the line defined by + * the ends of segment (this). + * @param aDetermineSide: when true, the sign of the returned value indicates + * the side of the line at which we are (negative = left) + * @return the distance + */ + int LineDistance( const VECTOR2I& aP, bool aDetermineSide = false ) const; - /** - * Function IntersectLines() - * - * Computes the intersection point of lines passing through ends of (this) and aSeg - * @param aSeg segment defining the line to intersect with - * @return intersection point, if exists - */ - OPT_VECTOR2I IntersectLines( const SEG& aSeg ) const - { - return Intersect( aSeg, false, true ); - } + /** + * Function NearestPoint() + * + * Computes a point on the segment (this) that is closest to point aP. + * @return: nearest point + */ + const VECTOR2I NearestPoint( const VECTOR2I &aP ) const; - bool Collide( const SEG& aSeg, int aClearance ) const; + /** + * Function Intersect() + * + * Computes intersection point of segment (this) with segment aSeg. + * @param aSeg: segment to intersect with + * @param aIgnoreEndpoints: don't treat corner cases (i.e. end of one segment touching the + * other) as intersections. + * @param aLines: treat segments as infinite lines + * @return intersection point, if exists + */ + OPT_VECTOR2I Intersect( const SEG& aSeg, bool aIgnoreEndpoints = false, + bool aLines = false ) const; - /** - * Function Distance() - * - * Computes minimum Euclidean distance to segment aSeg. - * @param aSeg other segment - * @return minimum distance - */ + /** + * Function IntersectLines() + * + * Computes the intersection point of lines passing through ends of (this) and aSeg + * @param aSeg segment defining the line to intersect with + * @return intersection point, if exists + */ + OPT_VECTOR2I IntersectLines( const SEG& aSeg ) const + { + return Intersect( aSeg, false, true ); + } - ecoord SquaredDistance( const SEG& aSeg ) const; + bool Collide( const SEG& aSeg, int aClearance ) const; - int Distance( const SEG& aSeg ) const - { - return sqrt( SquaredDistance( aSeg ) ); - } + /** + * Function Distance() + * + * Computes minimum Euclidean distance to segment aSeg. + * @param aSeg other segment + * @return minimum distance + */ - /** - * Function Distance() - * - * Computes minimum Euclidean distance to point aP. - * @param aP the point - * @return minimum distance - */ - ecoord SquaredDistance( const VECTOR2I& aP ) const - { - return ( NearestPoint( aP ) - aP ).SquaredEuclideanNorm(); - } + ecoord SquaredDistance( const SEG& aSeg ) const; - int Distance( const VECTOR2I& aP ) const - { - return sqrt( SquaredDistance( aP ) ); - } + int Distance( const SEG& aSeg ) const + { + return sqrt( SquaredDistance( aSeg ) ); + } - /** - * Function Collinear() - * - * Checks if segment aSeg lies on the same line as (this). - * @param aSeg the segment to chech colinearity with - * @return true, when segments are collinear. - */ - bool Collinear( const SEG& aSeg ) const - { - ecoord qa1 = a.y - b.y; - ecoord qb1 = b.x - a.x; - ecoord qc1 = -qa1 * a.x - qb1 * a.y; - ecoord qa2 = aSeg.a.y - aSeg.b.y; - ecoord qb2 = aSeg.b.x - aSeg.a.x; - ecoord qc2 = -qa2 * aSeg.a.x - qb2 * aSeg.a.y; + /** + * Function Distance() + * + * Computes minimum Euclidean distance to point aP. + * @param aP the point + * @return minimum distance + */ + ecoord SquaredDistance( const VECTOR2I& aP ) const + { + return ( NearestPoint( aP ) - aP ).SquaredEuclideanNorm(); + } - return ( qa1 == qa2 ) && ( qb1 == qb2 ) && ( qc1 == qc2 ); - } + int Distance( const VECTOR2I& aP ) const + { + return sqrt( SquaredDistance( aP ) ); + } - /** - * Function Length() - * - * Returns the length (this) - * @return length - */ - int Length() const - { - return ( a - b ).EuclideanNorm(); - } + /** + * Function Collinear() + * + * Checks if segment aSeg lies on the same line as (this). + * @param aSeg the segment to chech colinearity with + * @return true, when segments are collinear. + */ + bool Collinear( const SEG& aSeg ) const + { + ecoord qa1 = A.y - B.y; + ecoord qb1 = B.x - A.x; + ecoord qc1 = -qa1 * A.x - qb1 * A.y; + ecoord qa2 = aSeg.A.y - aSeg.B.y; + ecoord qb2 = aSeg.B.x - aSeg.A.x; + ecoord qc2 = -qa2 * aSeg.A.x - qb2 * aSeg.A.y; - ecoord SquaredLength() const - { - return ( a - b ).SquaredEuclideanNorm(); - } + return ( qa1 == qa2 ) && ( qb1 == qb2 ) && ( qc1 == qc2 ); + } - /** - * Function Index() - * - * Return the index of this segment in its parent shape (applicable only to non-local segments) - * @return index value - */ - int Index() const - { - return m_index; - } + /** + * Function Length() + * + * Returns the length (this) + * @return length + */ + int Length() const + { + return ( A - B ).EuclideanNorm(); + } - bool Contains( const VECTOR2I& aP ) const; + ecoord SquaredLength() const + { + return ( A - B ).SquaredEuclideanNorm(); + } - bool PointCloserThan( const VECTOR2I& aP, int aDist ) const; + /** + * Function Index() + * + * Return the index of this segment in its parent shape (applicable only to non-local segments) + * @return index value + */ + int Index() const + { + return m_index; + } - // friend std::ostream& operator<<( std::ostream& stream, const SEG& aSeg ); - private: - bool ccw( const VECTOR2I& aA, const VECTOR2I& aB, const VECTOR2I &aC ) const; + bool Contains( const VECTOR2I& aP ) const; - ///> locally stored start/end coordinates (used when m_is_local == true) - VECTOR2I m_a, m_b; + bool PointCloserThan( const VECTOR2I& aP, int aDist ) const; - ///> index withing the parent shape (used when m_is_local == false) - int m_index; +// friend std::ostream& operator<<( std::ostream& stream, const SEG& aSeg ); +private: + bool ccw( const VECTOR2I& aA, const VECTOR2I& aB, const VECTOR2I &aC ) const; - ///> locality flag - bool m_is_local; + ///> locally stored start/end coordinates (used when m_is_local == true) + VECTOR2I m_a, m_b; + + ///> index withing the parent shape (used when m_is_local == false) + int m_index; + + ///> locality flag + bool m_is_local; }; + inline VECTOR2I SEG::LineProject( const VECTOR2I& aP ) const { // fixme: numerical errors for large integers @@ -302,45 +307,47 @@ inline VECTOR2I SEG::LineProject( const VECTOR2I& aP ) const return VECTOR2I( 0, 0 ); } + inline int SEG::LineDistance( const VECTOR2I& aP, bool aDetermineSide ) const { - ecoord p = a.y - b.y; - ecoord q = b.x - a.x; - ecoord r = -p * a.x - q * a.y; + ecoord p = A.y - B.y; + ecoord q = B.x - A.x; + ecoord r = -p * A.x - q * A.y; ecoord dist = ( p * aP.x + q * aP.y + r ) / sqrt( p * p + q * q ); return aDetermineSide ? dist : abs( dist ); } + inline const VECTOR2I SEG::NearestPoint( const VECTOR2I& aP ) const { - VECTOR2I d = b - a; + VECTOR2I d = B - A; ecoord l_squared = d.Dot( d ); if( l_squared == 0 ) - return a; + return A; - ecoord t = d.Dot( aP - a ); + ecoord t = d.Dot( aP - A ); if( t < 0 ) - return a; + return A; else if( t > l_squared ) - return b; + return B; int xp = rescale( t, (ecoord)d.x, l_squared ); int yp = rescale( t, (ecoord)d.y, l_squared ); - return a + VECTOR2I( xp, yp ); + return A + VECTOR2I( xp, yp ); } + inline std::ostream& operator<<( std::ostream& aStream, const SEG& aSeg ) { if( aSeg.m_is_local ) - aStream << "[ local " << aSeg.a << " - " << aSeg.b << " ]"; + aStream << "[ local " << aSeg.A << " - " << aSeg.B << " ]"; return aStream; } #endif // __SEG_H - diff --git a/include/geometry/shape.h b/include/geometry/shape.h index ff273e2160..98c8ffcd82 100644 --- a/include/geometry/shape.h +++ b/include/geometry/shape.h @@ -31,11 +31,11 @@ #include /** - * Enum ShapeType + * Enum SHAPE_TYPE * Lists all supported shapes */ -enum ShapeType +enum SHAPE_TYPE { SH_RECT = 0, ///> axis-aligned rectangle SH_SEGMENT, ///> line segment @@ -50,101 +50,108 @@ enum ShapeType */ class SHAPE { - protected: - typedef VECTOR2I::extended_type ecoord; +protected: + typedef VECTOR2I::extended_type ecoord; - public: - /** - * Constructor - * - * Creates an empty shape of type aType - */ +public: + /** + * Constructor + * + * Creates an empty shape of type aType + */ - SHAPE ( ShapeType aType ) : m_type( aType ) { }; + SHAPE ( SHAPE_TYPE aType ) : m_type( aType ) + {} - // Destructor - virtual ~SHAPE() {}; + // Destructor + virtual ~SHAPE() + {} - /** - * Function Type() - * - * Returns the type of the shape. - * @retval the type - */ - ShapeType Type() const { return m_type; } + /** + * Function Type() + * + * Returns the type of the shape. + * @retval the type + */ + SHAPE_TYPE Type() const + { + return m_type; + } - /** - * Function Clone() - * - * Returns a dynamically allocated copy of the shape - * @retval copy of the shape - */ - virtual SHAPE* Clone() const - { - assert( false ); - return NULL; - }; + /** + * Function Clone() + * + * Returns a dynamically allocated copy of the shape + * @retval copy of the shape + */ + virtual SHAPE* Clone() const + { + assert( false ); + return NULL; + }; - /** - * Function Collide() - * - * Checks if the boundary of shape (this) lies closer to the point aP than aClearance, indicating - * a collision. - * @return true, if there is a collision. - */ - virtual bool Collide( const VECTOR2I& aP, int aClearance = 0 ) const - { - return Collide( SEG( aP, aP ), aClearance ); - } + /** + * Function Collide() + * + * Checks if the boundary of shape (this) lies closer to the point aP than aClearance, + * indicating a collision. + * @return true, if there is a collision. + */ + virtual bool Collide( const VECTOR2I& aP, int aClearance = 0 ) const + { + return Collide( SEG( aP, aP ), aClearance ); + } - /** - * Function Collide() - * - * Checks if the boundary of shape (this) lies closer to the shape aShape than aClearance, indicating - * a collision. - * @param aShape shape to check collision against - * @param aClearance minimum clearance - * @param aMTV minimum translation vector - * @return true, if there is a collision. - */ - virtual bool Collide( const SHAPE* aShape, int aClerance, VECTOR2I& aMTV ) const; - virtual bool Collide( const SHAPE* aShape, int aClerance = 0 ) const; + /** + * Function Collide() + * + * Checks if the boundary of shape (this) lies closer to the shape aShape than aClearance, + * indicating a collision. + * @param aShape shape to check collision against + * @param aClearance minimum clearance + * @param aMTV minimum translation vector + * @return true, if there is a collision. + */ + virtual bool Collide( const SHAPE* aShape, int aClerance, VECTOR2I& aMTV ) const; + virtual bool Collide( const SHAPE* aShape, int aClerance = 0 ) const; - /** - * Function Collide() - * - * Checks if the boundary of shape (this) lies closer to the segment aSeg than aClearance, indicating - * a collision. - * @return true, if there is a collision. - */ - virtual bool Collide( const SEG& aSeg, int aClearance = 0 ) const = 0; + /** + * Function Collide() + * + * Checks if the boundary of shape (this) lies closer to the segment aSeg than aClearance, + * indicating a collision. + * @return true, if there is a collision. + */ + virtual bool Collide( const SEG& aSeg, int aClearance = 0 ) const = 0; - /** - * Function Collide() - * - * Computes a bounding box of the shape, with a margin of aClearance - * a collision. - * @aClearance how much the bounding box is expanded wrs to the minimum enclosing rectangle for the shape. - * @return the bounding box. - */ - virtual const BOX2I BBox( int aClearance = 0 ) const = 0; + /** + * Function Collide() + * + * Computes a bounding box of the shape, with a margin of aClearance + * a collision. + * @aClearance how much the bounding box is expanded wrs to the minimum enclosing rectangle + * for the shape. + * @return the bounding box. + */ + virtual const BOX2I BBox( int aClearance = 0 ) const = 0; - /** - * Function Centre() - * - * Computes a center-of-mass of the shape - * @return the center-of-mass point - */ - virtual VECTOR2I Centre() const - { - return BBox( 0 ).Centre(); // if nothing better is available.... - } + /** + * Function Centre() + * + * Computes a center-of-mass of the shape + * @return the center-of-mass point + */ + virtual VECTOR2I Centre() const + { + return BBox( 0 ).Centre(); // if nothing better is available.... + } - private: - ///> type of our shape - ShapeType m_type; +private: + ///> type of our shape + SHAPE_TYPE m_type; }; -bool CollideShapes( const SHAPE* aA, const SHAPE* aB, int aClearance, bool aNeedMTV, VECTOR2I& aMTV ); +bool CollideShapes( const SHAPE* aA, const SHAPE* aB, int aClearance, + bool aNeedMTV, VECTOR2I& aMTV ); #endif // __SHAPE_H diff --git a/include/geometry/shape_circle.h b/include/geometry/shape_circle.h index 2e2745401a..a11cd4da8f 100644 --- a/include/geometry/shape_circle.h +++ b/include/geometry/shape_circle.h @@ -31,12 +31,15 @@ class SHAPE_CIRCLE : public SHAPE { public: SHAPE_CIRCLE() : - SHAPE( SH_CIRCLE ), m_radius( 0 ) {}; + SHAPE( SH_CIRCLE ), m_radius( 0 ) + {} SHAPE_CIRCLE( const VECTOR2I& aCenter, int aRadius ) : - SHAPE( SH_CIRCLE ), m_radius( aRadius ), m_center( aCenter ) {}; + SHAPE( SH_CIRCLE ), m_radius( aRadius ), m_center( aCenter ) + {} - ~SHAPE_CIRCLE() {}; + ~SHAPE_CIRCLE() + {} const BOX2I BBox( int aClearance = 0 ) const { diff --git a/include/geometry/shape_index_list.h b/include/geometry/shape_index_list.h index b021ccff8d..0d0e644803 100644 --- a/include/geometry/shape_index_list.h +++ b/include/geometry/shape_index_list.h @@ -36,16 +36,16 @@ const SHAPE* defaultShapeFunctor( const T aItem ) template > class SHAPE_INDEX_LIST { - struct ShapeEntry + struct SHAPE_ENTRY { - ShapeEntry( T aParent ) + SHAPE_ENTRY( T aParent ) { shape = ShapeFunctor( aParent ); bbox = shape->BBox( 0 ); parent = aParent; } - ~ShapeEntry() + ~SHAPE_ENTRY() { } @@ -54,21 +54,24 @@ class SHAPE_INDEX_LIST BOX2I bbox; }; - typedef std::vector ShapeVec; - typedef typename std::vector::iterator ShapeVecIter; + typedef std::vector SHAPE_VEC; + typedef typename std::vector::iterator SHAPE_VEC_ITER; public: // "Normal" iterator interface, for STL algorithms. class iterator { public: - iterator() {}; + iterator() + {} - iterator( ShapeVecIter aCurrent ) : - m_current( aCurrent ) {}; + iterator( SHAPE_VEC_ITER aCurrent ) : + m_current( aCurrent ) + {} iterator( const iterator& aB ) : - m_current( aB.m_current ) {}; + m_current( aB.m_current ) + {} T operator*() const { @@ -103,7 +106,7 @@ public: } private: - ShapeVecIter m_current; + SHAPE_VEC_ITER m_current; }; // "Query" iterator, for iterating over a set of spatially matching shapes. @@ -114,7 +117,7 @@ public: { } - query_iterator( ShapeVecIter aCurrent, ShapeVecIter aEnd, SHAPE* aShape, + query_iterator( SHAPE_VEC_ITER aCurrent, SHAPE_VEC_ITER aEnd, SHAPE* aShape, int aMinDistance, bool aExact ) : m_end( aEnd ), m_current( aCurrent ), @@ -122,80 +125,80 @@ public: m_minDistance( aMinDistance ), m_exact( aExact ) { - if( aShape ) - { - m_refBBox = aShape->BBox(); - next(); - } - } - - query_iterator( const query_iterator& aB ) : - m_end( aB.m_end ), - m_current( aB.m_current ), - m_shape( aB.m_shape ), - m_minDistance( aB.m_minDistance ), - m_exact( aB.m_exact ), - m_refBBox( aB.m_refBBox ) - { - } - - T operator*() const - { - return (*m_current).parent; - } - - query_iterator& operator++() - { - ++m_current; + if( aShape ) + { + m_refBBox = aShape->BBox(); next(); - return *this; } + } - query_iterator& operator++( int aDummy ) - { - ++m_current; - next(); - return *this; - } + query_iterator( const query_iterator& aB ) : + m_end( aB.m_end ), + m_current( aB.m_current ), + m_shape( aB.m_shape ), + m_minDistance( aB.m_minDistance ), + m_exact( aB.m_exact ), + m_refBBox( aB.m_refBBox ) + { + } - bool operator==( const query_iterator& aRhs ) const - { - return m_current == aRhs.m_current; - } + T operator*() const + { + return (*m_current).parent; + } - bool operator!=( const query_iterator& aRhs ) const - { - return m_current != aRhs.m_current; - } + query_iterator& operator++() + { + ++m_current; + next(); + return *this; + } - const query_iterator& operator=( const query_iterator& aRhs ) - { - m_end = aRhs.m_end; - m_current = aRhs.m_current; - m_shape = aRhs.m_shape; - m_minDistance = aRhs.m_minDistance; - m_exact = aRhs.m_exact; - m_refBBox = aRhs.m_refBBox; - return *this; - } + query_iterator& operator++( int aDummy ) + { + ++m_current; + next(); + return *this; + } - private: - void next() + bool operator==( const query_iterator& aRhs ) const + { + return m_current == aRhs.m_current; + } + + bool operator!=( const query_iterator& aRhs ) const + { + return m_current != aRhs.m_current; + } + + const query_iterator& operator=( const query_iterator& aRhs ) + { + m_end = aRhs.m_end; + m_current = aRhs.m_current; + m_shape = aRhs.m_shape; + m_minDistance = aRhs.m_minDistance; + m_exact = aRhs.m_exact; + m_refBBox = aRhs.m_refBBox; + return *this; + } + + private: + void next() + { + while( m_current != m_end ) { - while( m_current != m_end ) + if( m_refBBox.Distance( m_current->bbox ) <= m_minDistance ) { - if( m_refBBox.Distance( m_current->bbox ) <= m_minDistance ) - { - if( !m_exact || m_current->shape->Collide( m_shape, m_minDistance ) ) - return; - } - - ++m_current; + if( !m_exact || m_current->shape->Collide( m_shape, m_minDistance ) ) + return; } - } - ShapeVecIter m_end; - ShapeVecIter m_current; + ++m_current; + } + } + + SHAPE_VEC_ITER m_end; + SHAPE_VEC_ITER m_current; BOX2I m_refBBox; bool m_exact; SHAPE* m_shape; @@ -204,14 +207,14 @@ public: void Add( T aItem ) { - ShapeEntry s( aItem ); + SHAPE_ENTRY s( aItem ); m_shapes.push_back( s ); } void Remove( const T aItem ) { - ShapeVecIter i; + SHAPE_VEC_ITER i; for( i = m_shapes.begin(); i != m_shapes.end(); ++i ) { @@ -233,7 +236,7 @@ public: template int Query( const SHAPE* aShape, int aMinDistance, Visitor& aV, bool aExact = true ) // const { - ShapeVecIter i; + SHAPE_VEC_ITER i; int n = 0; VECTOR2I::extended_type minDistSq = (VECTOR2I::extended_type) aMinDistance * aMinDistance; @@ -282,7 +285,7 @@ public: } private: - ShapeVec m_shapes; + SHAPE_VEC m_shapes; }; #endif diff --git a/include/geometry/shape_line_chain.h b/include/geometry/shape_line_chain.h index 6a2e61372e..44505a3668 100644 --- a/include/geometry/shape_line_chain.h +++ b/include/geometry/shape_line_chain.h @@ -38,504 +38,510 @@ * Class SHAPE_LINE_CHAIN * * Represents a polyline (an zero-thickness chain of connected line segments). - * I purposedly didn't name it "polyline" to avoid confusion with the existing CPolyLine class in pcbnew. + * I purposedly didn't name it "polyline" to avoid confusion with the existing CPolyLine + * class in pcbnew. * * SHAPE_LINE_CHAIN class shall not be used for polygons! */ -class SHAPE_LINE_CHAIN : public SHAPE { - private: - typedef std::vector::iterator point_iter; - typedef std::vector::const_iterator point_citer; +class SHAPE_LINE_CHAIN : public SHAPE +{ +private: + typedef std::vector::iterator point_iter; + typedef std::vector::const_iterator point_citer; - public: +public: + /** + * Struct INTERSECTION + * + * Represents an intersection between two line segments + */ + struct INTERSECTION + { + /// segment belonging from the (this) argument of Intersect() + SEG our; + /// segment belonging from the aOther argument of Intersect() + SEG their; + /// point of intersection between our and their. + VECTOR2I p; + }; - /** - * Struct Intersection - * - * Represents an intersection between two line segments - */ - struct Intersection + typedef std::vector INTERSECTIONS; + + /** + * Constructor + * Initializes an empty line chain. + */ + SHAPE_LINE_CHAIN() : + SHAPE( SH_LINE_CHAIN ), m_closed( false ) + {} + + /** + * Copy Constructor + */ + SHAPE_LINE_CHAIN( const SHAPE_LINE_CHAIN& aShape ) : + SHAPE( SH_LINE_CHAIN ), m_points( aShape.m_points ), m_closed( aShape.m_closed ) + {} + + /** + * Constructor + * Initializes a 2-point line chain (a single segment) + */ + SHAPE_LINE_CHAIN( const VECTOR2I& aA, const VECTOR2I& aB ) : + SHAPE( SH_LINE_CHAIN ), m_closed( false ) + { + m_points.resize( 2 ); + m_points[0] = aA; + m_points[1] = aB; + } + + SHAPE_LINE_CHAIN( const VECTOR2I& aA, const VECTOR2I& aB, const VECTOR2I& aC ) : + SHAPE( SH_LINE_CHAIN ), m_closed( false ) + { + m_points.resize( 3 ); + m_points[0] = aA; + m_points[1] = aB; + m_points[2] = aC; + } + + SHAPE_LINE_CHAIN(const VECTOR2I* aV, int aCount ) : + SHAPE( SH_LINE_CHAIN ), + m_closed( false ) + { + m_points.resize( aCount ); + + for( int i = 0; i < aCount; i++ ) + m_points[i] = *aV++; + } + + ~SHAPE_LINE_CHAIN() + {} + + /** + * Function Clear() + * Removes all points from the line chain. + */ + void Clear() + { + m_points.clear(); + m_closed = false; + } + + /** + * Function SetClosed() + * + * Marks the line chain as closed (i.e. with a segment connecting the last point with + * the first point). + * @param aClosed: whether the line chain is to be closed or not. + */ + void SetClosed( bool aClosed ) + { + m_closed = aClosed; + } + + /** + * Function IsClosed() + * + * @return aClosed: true, when our line is closed. + */ + bool IsClosed() const + { + return m_closed; + } + + /** + * Function SegmentCount() + * + * Returns number of segments in this line chain. + * @return number of segments + */ + int SegmentCount() const + { + int c = m_points.size() - 1; + if( m_closed ) + c++; + + return std::max( 0, c ); + } + + /** + * Function PointCount() + * + * Returns the number of points (vertices) in this line chain + * @return number of points + */ + int PointCount() const + { + return m_points.size(); + } + + /** + * Function Segment() + * + * Returns a segment referencing to the segment (index) in the line chain. + * Modifying ends of the returned segment will modify corresponding points in the line chain. + * @param aIndex: index of the segment in the line chain. Negative values are counted from + * the end (i.e. -1 means the last segment in the line chain) + * @return SEG referenced to given segment in the line chain + */ + SEG Segment( int aIndex ) + { + if( aIndex < 0 ) + aIndex += SegmentCount(); + + if( aIndex == ( m_points.size() - 1 ) && m_closed ) + return SEG( m_points[aIndex], m_points[0], aIndex ); + else + return SEG( m_points[aIndex], m_points[aIndex + 1], aIndex ); + } + + /** + * Function CSegment() + * + * Returns a read-only segment referencing to the segment (index) in the line chain. + * @param aIndex: index of the segment in the line chain. Negative values are counted from + * the end (i.e. -1 means the last segment in the line chain) + * @return SEG referenced to given segment in the line chain + */ + const SEG CSegment( int aIndex ) const + { + if( aIndex < 0 ) + aIndex += SegmentCount(); + + if( aIndex == ( m_points.size() - 1 ) && m_closed ) + return SEG( const_cast( m_points[aIndex] ), + const_cast( m_points[0] ), aIndex ); + else + return SEG( const_cast( m_points[aIndex] ), + const_cast( m_points[aIndex + 1] ), aIndex ); + } + + /** + * Function Point() + * + * Returns a reference to a given point in the line chain. + * @param aIndex index of the point + * @return reference to the point + */ + VECTOR2I& Point( int aIndex ) + { + if( aIndex < 0 ) + aIndex += PointCount(); + + return m_points[aIndex]; + } + + /** + * Function CPoint() + * + * Returns a const reference to a given point in the line chain. + * @param aIndex index of the point + * @return const reference to the point + */ + const VECTOR2I& CPoint( int aIndex ) const + { + if( aIndex < 0 ) + aIndex += PointCount(); + + return m_points[aIndex]; + } + + /// @copydoc SHAPE::BBox() + const BOX2I BBox( int aClearance = 0 ) const + { + BOX2I bbox; + bbox.Compute( m_points ); + + return bbox; + } + + /** + * Function Collide() + * + * Checks if point aP lies closer to us than aClearance. + * @param aP the point to check for collisions with + * @param aClearance minimum distance that does not qualify as a collision. + * @return true, when a collision has been found + */ + bool Collide( const VECTOR2I& aP, int aClearance = 0 ) const; + + /** + * Function Collide() + * + * Checks if box aBox lies closer to us than aClearance. + * @param aP the box to check for collisions with + * @param aClearance minimum distance that does not qualify as a collision. + * @return true, when a collision has been found + */ + bool Collide( const BOX2I& aBox, int aClearance = 0 ) const; + + /** + * Function Collide() + * + * Checks if segment aSeg lies closer to us than aClearance. + * @param aSeg the segment to check for collisions with + * @param aClearance minimum distance that does not qualify as a collision. + * @return true, when a collision has been found + */ + bool Collide( const SEG& aSeg, int aClearance = 0 ) const; + + /** + * Function Distance() + * + * Computes the minimum distance between the line chain and a point aP. + * @param aP the point + * @return minimum distance. + */ + int Distance( const VECTOR2I& aP ) const; + + /** + * Function Reverse() + * + * Reverses point order in the line chain. + * @return line chain with reversed point order (original A-B-C-D: returned D-C-B-A) + */ + const SHAPE_LINE_CHAIN Reverse() const; + + /** + * Function Length() + * + * Returns length of the line chain in Euclidean metric. + * @return length of the line chain + */ + int Length() const; + + /** + * Function Append() + * + * Appends a new point at the end of the line chain. + * @param aX is X coordinate of the new point + * @param aY is Y coordinate of the new point + */ + void Append( int aX, int aY ) + { + VECTOR2I v( aX, aY ); + Append( v ); + } + + /** + * Function Append() + * + * Appends a new point at the end of the line chain. + * @param aP the new point + */ + void Append( const VECTOR2I& aP ) + { + if( m_points.size() == 0 ) + m_bbox = BOX2I( aP, VECTOR2I( 0, 0 ) ); + + if( m_points.size() == 0 || CPoint( -1 ) != aP ) { - /// segment belonging from the (this) argument of Intersect() - SEG our; - /// segment belonging from the aOther argument of Intersect() - SEG their; - /// point of intersection between our and their. - VECTOR2I p; - }; + m_points.push_back( aP ); + m_bbox.Merge( aP ); + } + } - typedef std::vector Intersections; + /** + * Function Append() + * + * Appends another line chain at the end. + * @param aOtherLine the line chain to be appended. + */ + void Append( const SHAPE_LINE_CHAIN& aOtherLine ) + { + if( aOtherLine.PointCount() == 0 ) + return; - /** - * Constructor - * Initializes an empty line chain. - */ - SHAPE_LINE_CHAIN(): - SHAPE( SH_LINE_CHAIN ), m_closed( false ) {}; - - /** - * Copy Constructor - */ - SHAPE_LINE_CHAIN( const SHAPE_LINE_CHAIN& aShape ) : - SHAPE( SH_LINE_CHAIN ), m_points( aShape.m_points ), m_closed( aShape.m_closed ) {}; - - /** - * Constructor - * Initializes a 2-point line chain (a single segment) - */ - SHAPE_LINE_CHAIN( const VECTOR2I& aA, const VECTOR2I& aB ) : - SHAPE( SH_LINE_CHAIN ), - m_closed( false ) - { - m_points.resize( 2 ); - m_points[0] = aA; - m_points[1] = aB; - } - - SHAPE_LINE_CHAIN( const VECTOR2I& aA, const VECTOR2I& aB, const VECTOR2I& aC ): - SHAPE( SH_LINE_CHAIN ), - m_closed( false ) - { - m_points.resize( 3 ); - m_points[0] = aA; - m_points[1] = aB; - m_points[2] = aC; - } - - SHAPE_LINE_CHAIN(const VECTOR2I* aV, int aCount ) : - SHAPE( SH_LINE_CHAIN ), - m_closed( false ) + else if( PointCount() == 0 || aOtherLine.CPoint( 0 ) != CPoint( -1 ) ) { - m_points.resize( aCount ); - - for( int i = 0; i < aCount; i++ ) - m_points[i] = *aV++; + const VECTOR2I p = aOtherLine.CPoint( 0 ); + m_points.push_back( p ); + m_bbox.Merge( p ); } - ~SHAPE_LINE_CHAIN() {}; - - /** - * Function Clear() - * Removes all points from the line chain. - */ - void Clear() + for( int i = 1; i < aOtherLine.PointCount(); i++ ) { - m_points.clear(); - m_closed = false; + const VECTOR2I p = aOtherLine.CPoint( i ); + m_points.push_back( p ); + m_bbox.Merge( p ); + } + } + + /** + * Function Replace() + * + * Replaces points with indices in range [start_index, end_index] with a single + * point aP. + * @param aStartIndex start of the point range to be replaced (inclusive) + * @param aEndIndex end of the point range to be replaced (inclusive) + * @param aP replacement point + */ + void Replace( int aStartIndex, int aEndIndex, const VECTOR2I& aP ); + + /** + * Function Replace() + * + * Replaces points with indices in range [start_index, end_index] with the points from + * line chain aLine. + * @param aStartIndex start of the point range to be replaced (inclusive) + * @param aEndIndex end of the point range to be replaced (inclusive) + * @param aLine replacement line chain. + */ + void Replace( int aStartIndex, int aEndIndex, const SHAPE_LINE_CHAIN& aLine ); + + /** + * Function Remove() + * + * Removes the range of points [start_index, end_index] from the line chain. + * @param aStartIndex start of the point range to be replaced (inclusive) + * @param aEndIndex end of the point range to be replaced (inclusive) + */ + void Remove( int aStartIndex, int aEndIndex ); + + /** + * Function Split() + * + * Inserts the point aP belonging to one of the our segments, splitting the adjacent + * segment in two. + * @param aP the point to be inserted + * @return index of the newly inserted point (or a negative value if aP does not lie on + * our line) + */ + int Split( const VECTOR2I& aP ); + + /** + * Function Find() + * + * Searches for point aP. + * @param aP the point to be looked for + * @return index of the correspoinding point in the line chain or negative when not found. + */ + int Find ( const VECTOR2I& aP ) const; + + /** + * Function Slice() + * + * Returns a subset of this line chain containing the [start_index, end_index] range of points. + * @param aStartIndex start of the point range to be returned (inclusive) + * @param aEndIndex end of the point range to be returned (inclusive) + * @return cut line chain. + */ + const SHAPE_LINE_CHAIN Slice( int aStartIndex, int aEndIndex = -1 ) const; + + struct compareOriginDistance + { + compareOriginDistance( VECTOR2I& aOrigin ): + m_origin( aOrigin ) + {} + + bool operator()( const INTERSECTION& aA, const INTERSECTION& aB ) + { + return ( m_origin - aA.p ).EuclideanNorm() < ( m_origin - aB.p ).EuclideanNorm(); } - /** - * Function SetClosed() - * - * Marks the line chain as closed (i.e. with a segment connecting the last point with the first point). - * @param aClosed: whether the line chain is to be closed or not. - */ - void SetClosed( bool aClosed ) + VECTOR2I m_origin; + }; + + /** + * Function Intersect() + * + * Finds all intersection points between our line chain and the segment aSeg. + * @param aSeg the segment chain to find intersections with + * @param aIp reference to a vector to store found intersections. Intersection points + * are sorted with increasing distances from point aSeg.a. + * @return number of intersections found + */ + int Intersect( const SEG& aSeg, INTERSECTIONS& aIp ) const; + + /** + * Function Intersect() + * + * Finds all intersection points between our line chain and the line chain aChain. + * @param aChain the line chain to find intersections with + * @param aIp reference to a vector to store found intersections. Intersection points + * are sorted with increasing path lengths from the starting point of aChain. + * @return number of intersections found + */ + int Intersect( const SHAPE_LINE_CHAIN& aChain, INTERSECTIONS& aIp ) const; + + /** + * Function PathLength() + * + * Computes the walk path length from the beginning of the line chain and + * the point aP belonging to our line. + * @return: path length in Euclidean metric or negative if aP does not belong to + * the line chain. + */ + int PathLength( const VECTOR2I& aP ) const; + + /** + * Function PointInside() + * + * Checks if point aP lies inside a convex polygon defined by the line chain. For closed + * shapes only. + * @param aP point to check + * @return true if the point is inside the shape (edge is not treated as being inside). + */ + bool PointInside( const VECTOR2I& aP ) const; + + /** + * Function PointOnEdge() + * + * Checks if point aP lies on an edge or vertex of the line chain. + * @param aP point to check + * @return true if the point lies on the edge. + */ + bool PointOnEdge( const VECTOR2I& aP ) const; + + /** + * Function SelfIntersecting() + * + * Checks if the line chain is self-intersecting. + * @return (optional) first found self-intersection point. + */ + const boost::optional SelfIntersecting() const; + + /** + * Function Simplify() + * + * Simplifies the line chain by removing colinear adjacent segments and duplicate vertices. + * @return reference to self. + */ + SHAPE_LINE_CHAIN& Simplify(); + + /** + * Function NearestPoint() + * + * Finds a point on the line chain that is closest to point aP. + * @return the nearest point. + */ + const VECTOR2I NearestPoint( const VECTOR2I& aP ) const; + + /// @copydoc SHAPE::Format() + const std::string Format() const; + + bool operator!=( const SHAPE_LINE_CHAIN& aRhs ) const + { + if( PointCount() != aRhs.PointCount() ) + return true; + + for( int i = 0; i < PointCount(); i++ ) { - m_closed = aClosed; - } - - /** - * Function IsClosed() - * - * @return aClosed: true, when our line is closed. - */ - bool IsClosed() const - { - return m_closed; - } - - /** - * Function SegmentCount() - * - * Returns number of segments in this line chain. - * @return number of segments - */ - int SegmentCount() const - { - int c = m_points.size() - 1; - if( m_closed ) - c++; - - return std::max( 0, c ); - } - - /** - * Function PointCount() - * - * Returns the number of points (vertices) in this line chain - * @return number of points - */ - int PointCount() const - { - return m_points.size(); - } - - /** - * Function Segment() - * - * Returns a segment referencing to the segment (index) in the line chain. - * Modifying ends of the returned segment will modify corresponding points in the line chain. - * @param aIndex: index of the segment in the line chain. Negative values are counted from the end (i.e. -1 means - * the last segment in the line chain) - * @return SEG referenced to given segment in the line chain - */ - SEG Segment( int aIndex ) - { - if( aIndex < 0 ) - aIndex += SegmentCount(); - - if( aIndex == ( m_points.size() - 1 ) && m_closed ) - return SEG( m_points[aIndex], m_points[0], aIndex ); - else - return SEG( m_points[aIndex], m_points[aIndex + 1], aIndex ); - } - - /** - * Function CSegment() - * - * Returns a read-only segment referencing to the segment (index) in the line chain. - * @param aIndex: index of the segment in the line chain. Negative values are counted from the end (i.e. -1 means - * the last segment in the line chain) - * @return SEG referenced to given segment in the line chain - */ - const SEG CSegment( int aIndex ) const - { - if( aIndex < 0 ) - aIndex += SegmentCount(); - - if( aIndex == ( m_points.size() - 1 ) && m_closed ) - return SEG( const_cast( m_points[aIndex] ), - const_cast( m_points[0] ), aIndex ); - else - return SEG( const_cast( m_points[aIndex] ), - const_cast( m_points[aIndex + 1] ), aIndex ); - } - - /** - * Function Point() - * - * Returns a reference to a given point in the line chain. - * @param aIndex index of the point - * @return reference to the point - */ - VECTOR2I& Point( int aIndex ) - { - if( aIndex < 0 ) - aIndex += PointCount(); - - return m_points[aIndex]; - } - - /** - * Function CPoint() - * - * Returns a const reference to a given point in the line chain. - * @param aIndex index of the point - * @return const reference to the point - */ - const VECTOR2I& CPoint( int aIndex ) const - { - if( aIndex < 0 ) - aIndex += PointCount(); - - return m_points[aIndex]; - } - - /// @copydoc SHAPE::BBox() - const BOX2I BBox( int aClearance = 0 ) const - { - BOX2I bbox; - bbox.Compute( m_points ); - - return bbox; - } - - /** - * Function Collide() - * - * Checks if point aP lies closer to us than aClearance. - * @param aP the point to check for collisions with - * @param aClearance minimum distance that does not qualify as a collision. - * @return true, when a collision has been found - */ - bool Collide( const VECTOR2I& aP, int aClearance = 0 ) const; - - /** - * Function Collide() - * - * Checks if box aBox lies closer to us than aClearance. - * @param aP the box to check for collisions with - * @param aClearance minimum distance that does not qualify as a collision. - * @return true, when a collision has been found - */ - bool Collide( const BOX2I& aBox, int aClearance = 0 ) const; - - /** - * Function Collide() - * - * Checks if segment aSeg lies closer to us than aClearance. - * @param aSeg the segment to check for collisions with - * @param aClearance minimum distance that does not qualify as a collision. - * @return true, when a collision has been found - */ - bool Collide( const SEG& aSeg, int aClearance = 0 ) const; - - /** - * Function Distance() - * - * Computes the minimum distance between the line chain and a point aP. - * @param aP the point - * @return minimum distance. - */ - int Distance( const VECTOR2I& aP ) const; - - /** - * Function Reverse() - * - * Reverses point order in the line chain. - * @return line chain with reversed point order (original A-B-C-D: returned D-C-B-A) - */ - const SHAPE_LINE_CHAIN Reverse() const; - - /** - * Function Length() - * - * Returns length of the line chain in Euclidean metric. - * @return length of the line chain - */ - int Length() const; - - /** - * Function Append() - * - * Appends a new point at the end of the line chain. - * @param aX is X coordinate of the new point - * @param aY is Y coordinate of the new point - */ - void Append( int aX, int aY ) - { - VECTOR2I v( aX, aY ); - Append( v ); - } - - /** - * Function Append() - * - * Appends a new point at the end of the line chain. - * @param aP the new point - */ - void Append( const VECTOR2I& aP ) - { - if( m_points.size() == 0 ) - m_bbox = BOX2I( aP, VECTOR2I( 0, 0 ) ); - - if( m_points.size() == 0 || CPoint( -1 ) != aP ) - { - m_points.push_back( aP ); - m_bbox.Merge( aP ); - } - } - - /** - * Function Append() - * - * Appends another line chain at the end. - * @param aOtherLine the line chain to be appended. - */ - void Append( const SHAPE_LINE_CHAIN& aOtherLine ) - { - if( aOtherLine.PointCount() == 0 ) - return; - - else if( PointCount() == 0 || aOtherLine.CPoint( 0 ) != CPoint( -1 ) ) - { - const VECTOR2I p = aOtherLine.CPoint( 0 ); - m_points.push_back( p ); - m_bbox.Merge( p ); - } - - for( int i = 1; i < aOtherLine.PointCount(); i++ ) - { - const VECTOR2I p = aOtherLine.CPoint( i ); - m_points.push_back( p ); - m_bbox.Merge( p ); - } - } - - /** - * Function Replace() - * - * Replaces points with indices in range [start_index, end_index] with a single - * point aP. - * @param aStartIndex start of the point range to be replaced (inclusive) - * @param aEndIndex end of the point range to be replaced (inclusive) - * @param aP replacement point - */ - void Replace( int aStartIndex, int aEndIndex, const VECTOR2I& aP ); - - /** - * Function Replace() - * - * Replaces points with indices in range [start_index, end_index] with the points from - * line chain aLine. - * @param aStartIndex start of the point range to be replaced (inclusive) - * @param aEndIndex end of the point range to be replaced (inclusive) - * @param aLine replacement line chain. - */ - void Replace( int aStartIndex, int aEndIndex, const SHAPE_LINE_CHAIN& aLine ); - - /** - * Function Remove() - * - * Removes the range of points [start_index, end_index] from the line chain. - * @param aStartIndex start of the point range to be replaced (inclusive) - * @param aEndIndex end of the point range to be replaced (inclusive) - */ - void Remove( int aStartIndex, int aEndIndex ); - - /** - * Function Split() - * - * Inserts the point aP belonging to one of the our segments, splitting the adjacent - * segment in two. - * @param aP the point to be inserted - * @return index of the newly inserted point (or a negative value if aP does not lie on our line) - */ - int Split( const VECTOR2I& aP ); - - /** - * Function Find() - * - * Searches for point aP. - * @param aP the point to be looked for - * @return index of the correspoinding point in the line chain or negative when not found. - */ - int Find ( const VECTOR2I& aP ) const; - - /** - * Function Slice() - * - * Returns a subset of this line chain containing the [start_index, end_index] range of points. - * @param aStartIndex start of the point range to be returned (inclusive) - * @param aEndIndex end of the point range to be returned (inclusive) - * @return cut line chain. - */ - const SHAPE_LINE_CHAIN Slice( int aStartIndex, int aEndIndex = -1) const; - - struct compareOriginDistance - { - compareOriginDistance( VECTOR2I& aOrigin ): - m_origin( aOrigin ) {}; - - bool operator()( const Intersection& aA, const Intersection& aB ) - { - return ( m_origin - aA.p ).EuclideanNorm() < ( m_origin - aB.p ).EuclideanNorm(); - } - - VECTOR2I m_origin; - }; - - /** - * Function Intersect() - * - * Finds all intersection points between our line chain and the segment aSeg. - * @param aSeg the segment chain to find intersections with - * @param aIp reference to a vector to store found intersections. Intersection points - * are sorted with increasing distances from point aSeg.a. - * @return number of intersections found - */ - int Intersect ( const SEG& aSeg, Intersections& aIp ) const; - - /** - * Function Intersect() - * - * Finds all intersection points between our line chain and the line chain aChain. - * @param aChain the line chain to find intersections with - * @param aIp reference to a vector to store found intersections. Intersection points - * are sorted with increasing path lengths from the starting point of aChain. - * @return number of intersections found - */ - int Intersect( const SHAPE_LINE_CHAIN& aChain, Intersections& aIp ) const; - - /** - * Function PathLength() - * - * Computes the walk path length from the beginning of the line chain and - * the point aP belonging to our line. - * @return: path length in Euclidean metric or negative if aP does not belong to the line chain. - */ - int PathLength( const VECTOR2I& aP ) const; - - /** - * Function PointInside() - * - * Checks if point aP lies inside a convex polygon defined by the line chain. For closed - * shapes only. - * @param aP point to check - * @return true if the point is inside the shape (edge is not treated as being inside). - */ - bool PointInside( const VECTOR2I& aP ) const; - - /** - * Function PointOnEdge() - * - * Checks if point aP lies on an edge or vertex of the line chain. - * @param aP point to check - * @return true if the point lies on the edge. - */ - bool PointOnEdge( const VECTOR2I& aP ) const; - - /** - * Function SelfIntersecting() - * - * Checks if the line chain is self-intersecting. - * @return (optional) first found self-intersection point. - */ - const boost::optional SelfIntersecting() const; - - /** - * Function Simplify() - * - * Simplifies the line chain by removing colinear adjacent segments and duplicate vertices. - * @return reference to self. - */ - SHAPE_LINE_CHAIN& Simplify(); - - /** - * Function NearestPoint() - * - * Finds a point on the line chain that is closest to point aP. - * @return the nearest point. - */ - const VECTOR2I NearestPoint( const VECTOR2I& aP ) const; - - /// @copydoc SHAPE::Format() - const std::string Format() const; - - bool operator!=( const SHAPE_LINE_CHAIN& aRhs ) const - { - if( PointCount() != aRhs.PointCount() ) + if( CPoint( i ) != aRhs.CPoint( i ) ) return true; - - for( int i = 0; i < PointCount(); i++ ) - { - if( CPoint( i ) != aRhs.CPoint( i ) ) - return true; - } - - return false; } - private: - /// array of vertices - std::vector m_points; + return false; + } - /// is the line chain closed? - bool m_closed; +private: + /// array of vertices + std::vector m_points; - /// cached bounding box - BOX2I m_bbox; + /// is the line chain closed? + bool m_closed; + + /// cached bounding box + BOX2I m_bbox; }; #endif // __SHAPE_LINE_CHAIN diff --git a/include/geometry/shape_rect.h b/include/geometry/shape_rect.h index 59e372dfd9..d2c5f22a33 100644 --- a/include/geometry/shape_rect.h +++ b/include/geometry/shape_rect.h @@ -32,126 +32,130 @@ class SHAPE_RECT : public SHAPE { - public: - /** - * Constructor - * Creates an empty (0-sized) rectangle - */ - SHAPE_RECT() : - SHAPE( SH_RECT ), m_w( 0 ), m_h( 0 ) {}; +public: + /** + * Constructor + * Creates an empty (0-sized) rectangle + */ + SHAPE_RECT() : + SHAPE( SH_RECT ), m_w( 0 ), m_h( 0 ) + {} - /** - * Constructor - * Creates a rectangle defined by top-left corner (aX0, aY0), width aW and height aH. - */ - SHAPE_RECT( int aX0, int aY0, int aW, int aH ) : - SHAPE( SH_RECT ), m_p0( aX0, aY0 ), m_w( aW ), m_h( aH ) {}; + /** + * Constructor + * Creates a rectangle defined by top-left corner (aX0, aY0), width aW and height aH. + */ + SHAPE_RECT( int aX0, int aY0, int aW, int aH ) : + SHAPE( SH_RECT ), m_p0( aX0, aY0 ), m_w( aW ), m_h( aH ) + {} - /** - * Constructor - * Creates a rectangle defined by top-left corner aP0, width aW and height aH. - */ - SHAPE_RECT( const VECTOR2I& aP0, int aW, int aH ) : - SHAPE( SH_RECT ), m_p0( aP0 ), m_w( aW ), m_h( aH ) {}; + /** + * Constructor + * Creates a rectangle defined by top-left corner aP0, width aW and height aH. + */ + SHAPE_RECT( const VECTOR2I& aP0, int aW, int aH ) : + SHAPE( SH_RECT ), m_p0( aP0 ), m_w( aW ), m_h( aH ) + {} - /// @copydoc SHAPE::BBox() - const BOX2I BBox( int aClearance = 0 ) const + /// @copydoc SHAPE::BBox() + const BOX2I BBox( int aClearance = 0 ) const + { + BOX2I bbox( VECTOR2I( m_p0.x - aClearance, m_p0.y - aClearance ), + VECTOR2I( m_w + 2 * aClearance, m_h + 2 * aClearance ) ); + //printf("bb : %s\n",bbox.Format().c_str()); + return bbox; + } + + /** + * Function Diagonal() + * + * Returns length of the diagonal of the rectangle + * @return diagonal length + */ + int Diagonal() const + { + return VECTOR2I( m_w, m_h ).EuclideanNorm(); + } + + /// @copydoc SHAPE::Collide() + bool Collide( const SEG& aSeg, int aClearance = 0 ) const + { + //VECTOR2I pmin = VECTOR2I( std::min( aSeg.a.x, aSeg.b.x ), std::min( aSeg.a.y, aSeg.b.y ) ); + //VECTOR2I pmax = VECTOR2I( std::max( aSeg.a.x, aSeg.b.x ), std::max( aSeg.a.y, aSeg.b.y )); + //BOX2I r( pmin, VECTOR2I( pmax.x - pmin.x, pmax.y - pmin.y ) ); + + //if( BBox( 0 ).SquaredDistance( r ) > aClearance * aClearance ) + // return false; + + if( BBox( 0 ).Contains( aSeg.A ) || BBox( 0 ).Contains( aSeg.B ) ) + return true; + + VECTOR2I vts[] = { VECTOR2I( m_p0.x, m_p0.y ), + VECTOR2I( m_p0.x, m_p0.y + m_h ), + VECTOR2I( m_p0.x + m_w, m_p0.y + m_h ), + VECTOR2I( m_p0.x + m_w, m_p0.y ), + VECTOR2I( m_p0.x, m_p0.y ) }; + + for( int i = 0; i < 4; i++ ) { - BOX2I bbox( VECTOR2I( m_p0.x - aClearance, m_p0.y - aClearance ), - VECTOR2I( m_w + 2 * aClearance, m_h + 2 * aClearance ) ); - //printf("bb : %s\n",bbox.Format().c_str()); - return bbox; - } + SEG s( vts[i], vts[i + 1], i ); - /** - * Function Diagonal() - * - * Returns length of the diagonal of the rectangle - * @return diagonal length - */ - int Diagonal() const - { - return VECTOR2I( m_w, m_h ).EuclideanNorm(); - } - - /// @copydoc SHAPE::Collide() - bool Collide( const SEG& aSeg, int aClearance = 0 ) const - { - //VECTOR2I pmin = VECTOR2I( std::min( aSeg.a.x, aSeg.b.x ), std::min( aSeg.a.y, aSeg.b.y ) ); - //VECTOR2I pmax = VECTOR2I( std::max( aSeg.a.x, aSeg.b.x ), std::max( aSeg.a.y, aSeg.b.y )); - //BOX2I r( pmin, VECTOR2I( pmax.x - pmin.x, pmax.y - pmin.y ) ); - - //if( BBox( 0 ).SquaredDistance( r ) > aClearance * aClearance ) - // return false; - - if( BBox( 0 ).Contains( aSeg.a ) || BBox( 0 ).Contains( aSeg.b ) ) + if( s.Distance( aSeg ) <= aClearance ) return true; - - VECTOR2I vts[] = { VECTOR2I( m_p0.x, m_p0.y ), - VECTOR2I( m_p0.x, m_p0.y + m_h ), - VECTOR2I( m_p0.x + m_w, m_p0.y + m_h ), - VECTOR2I( m_p0.x + m_w, m_p0.y ), - VECTOR2I( m_p0.x, m_p0.y ) }; - - for( int i = 0; i < 4; i++ ) - { - SEG s( vts[i], vts[i + 1], i ); - if( s.Distance( aSeg ) <= aClearance ) - return true; - } - - return false; - }; - - /** - * Function GetPosition() - * - * @return top-left corner of the rectangle - */ - const VECTOR2I& GetPosition() const - { - return m_p0; } - /** - * Function GetSize() - * - * @return size of the rectangle - */ - const VECTOR2I GetSize() const - { - return VECTOR2I( m_w, m_h ); - } + return false; + } - /** - * Function GetWidth() - * - * @return width of the rectangle - */ - const int GetWidth() const - { - return m_w; - } + /** + * Function GetPosition() + * + * @return top-left corner of the rectangle + */ + const VECTOR2I& GetPosition() const + { + return m_p0; + } - /** - * Function GetHeight() - * - * @return height of the rectangle - */ - const int GetHeight() const - { - return m_h; - } + /** + * Function GetSize() + * + * @return size of the rectangle + */ + const VECTOR2I GetSize() const + { + return VECTOR2I( m_w, m_h ); + } - private: - ///> Top-left corner - VECTOR2I m_p0; + /** + * Function GetWidth() + * + * @return width of the rectangle + */ + const int GetWidth() const + { + return m_w; + } - ///> Width - int m_w; + /** + * Function GetHeight() + * + * @return height of the rectangle + */ + const int GetHeight() const + { + return m_h; + } - ///> Height - int m_h; - }; +private: + ///> Top-left corner + VECTOR2I m_p0; + + ///> Width + int m_w; + + ///> Height + int m_h; +}; #endif // __SHAPE_RECT_H diff --git a/include/math/math_util.h b/include/math/math_util.h index 0b82203bea..812b52fba8 100644 --- a/include/math/math_util.h +++ b/include/math/math_util.h @@ -35,17 +35,17 @@ */ template -T rescale( T numerator, T value, T denominator ) +T rescale( T aNumerator, T aValue, T aDenominator ) { - return numerator * value / denominator; + return aNumerator * aValue / aDenominator; } // explicit specializations for integer types, taking care of overflow. template <> -int rescale( int numerator, int value, int denominator ); +int rescale( int aNumerator, int aValue, int aDenominator ); template <> -int64_t rescale( int64_t numerator, int64_t value, int64_t denominator ); +int64_t rescale( int64_t aNumerator, int64_t aValue, int64_t aDenominator ); #endif // __MATH_UTIL_H diff --git a/include/math/matrix3x3.h b/include/math/matrix3x3.h index 8d0cc68235..dd27b08eac 100644 --- a/include/math/matrix3x3.h +++ b/include/math/matrix3x3.h @@ -55,7 +55,7 @@ template class MATRIX3x3; template -std::ostream& operator<<( std::ostream& stream, const MATRIX3x3& matrix ); +std::ostream& operator<<( std::ostream& aStream, const MATRIX3x3& aMatrix ); template class MATRIX3x3 @@ -92,7 +92,7 @@ public: * * The diagonal components of the matrix are set to 1. */ - void SetIdentity( void ); + void SetIdentity(); /** * @brief Set the translation components of the matrix. @@ -106,7 +106,7 @@ public: * * @return is the translation (2D-vector). */ - VECTOR2 GetTranslation( void ) const; + VECTOR2 GetTranslation() const; /** * @brief Set the rotation components of the matrix. @@ -129,14 +129,14 @@ public: * * @return the scale factors, specified as 2D-vector. */ - VECTOR2 GetScale( void ) const; + VECTOR2 GetScale() const; /** * @brief Compute the determinant of the matrix. * * @return the determinant value. */ - T Determinant( void ) const; + T Determinant() const; /** * @brief Determine the inverse of the matrix. @@ -148,33 +148,33 @@ public: * * @return the inverse matrix. */ - MATRIX3x3 Inverse( void ) const; + MATRIX3x3 Inverse() const; /** * @brief Get the transpose of the matrix. * * @return the transpose matrix. */ - MATRIX3x3 Transpose( void ) const; + MATRIX3x3 Transpose() const; /** * @brief Output to a stream. */ - friend std::ostream& operator<<( std::ostream& stream, const MATRIX3x3& matrix ); + friend std::ostream& operator<<( std::ostream& aStream, const MATRIX3x3& aMatrix ); }; // Operators //! @brief Matrix multiplication -template MATRIX3x3 const operator*( MATRIX3x3 const& a, MATRIX3x3 const& b ); +template MATRIX3x3 const operator*( MATRIX3x3 const& aA, MATRIX3x3 const& aB ); //! @brief Multiplication with a 2D vector, the 3rd z-component is assumed to be 1 -template VECTOR2 const operator*( MATRIX3x3 const& a, VECTOR2 const& b ); +template VECTOR2 const operator*( MATRIX3x3 const& aA, VECTOR2 const& aB ); //! @brief Multiplication with a scalar -template MATRIX3x3 const operator*( MATRIX3x3 const& a, T scalar ); -template MATRIX3x3 const operator*( T scalar, MATRIX3x3 const& matrix ); +template MATRIX3x3 const operator*( MATRIX3x3 const& aA, T aScalar ); +template MATRIX3x3 const operator*( T aScalar, MATRIX3x3 const& aMatrix ); // ---------------------- // --- Implementation --- @@ -235,11 +235,12 @@ void MATRIX3x3::SetTranslation( VECTOR2 aTranslation ) template -VECTOR2 MATRIX3x3::GetTranslation( void ) const +VECTOR2 MATRIX3x3::GetTranslation() const { VECTOR2 result; result.x = m_data[0][2]; result.y = m_data[1][2]; + return result; } @@ -265,15 +266,16 @@ void MATRIX3x3::SetScale( VECTOR2 aScale ) template -VECTOR2 MATRIX3x3::GetScale( void ) const +VECTOR2 MATRIX3x3::GetScale() const { VECTOR2 result( m_data[0][0], m_data[1][1] ); + return result; } template -MATRIX3x3 const operator*( MATRIX3x3 const& a, MATRIX3x3 const& b ) +MATRIX3x3 const operator*( MATRIX3x3 const& aA, MATRIX3x3 const& aB ) { MATRIX3x3 result; @@ -281,8 +283,9 @@ MATRIX3x3 const operator*( MATRIX3x3 const& a, MATRIX3x3 const& b ) { for( int j = 0; j < 3; j++ ) { - result.m_data[i][j] = a.m_data[i][0] * b.m_data[0][j] + a.m_data[i][1] * b.m_data[1][j] - + a.m_data[i][2] * b.m_data[2][j]; + result.m_data[i][j] = aA.m_data[i][0] * aB.m_data[0][j] + + aA.m_data[i][1] * aB.m_data[1][j] + + aA.m_data[i][2] * aB.m_data[2][j]; } } @@ -291,21 +294,20 @@ MATRIX3x3 const operator*( MATRIX3x3 const& a, MATRIX3x3 const& b ) template -VECTOR2 const operator*( MATRIX3x3 const& matrix, - VECTOR2 const& vector ) +VECTOR2 const operator*( MATRIX3x3 const& aMatrix, VECTOR2 const& aVector ) { VECTOR2 result( 0, 0 ); - result.x = matrix.m_data[0][0] * vector.x + matrix.m_data[0][1] * vector.y - + matrix.m_data[0][2]; - result.y = matrix.m_data[1][0] * vector.x + matrix.m_data[1][1] * vector.y - + matrix.m_data[1][2]; + result.x = aMatrix.m_data[0][0] * aVector.x + aMatrix.m_data[0][1] * aVector.y + + aMatrix.m_data[0][2]; + result.y = aMatrix.m_data[1][0] * aVector.x + aMatrix.m_data[1][1] * aVector.y + + aMatrix.m_data[1][2]; return result; } template -T MATRIX3x3::Determinant( void ) const +T MATRIX3x3::Determinant() const { return m_data[0][0] * ( m_data[1][1] * m_data[2][2] - m_data[1][2] * m_data[2][1] ) - m_data[0][1] * ( m_data[1][0] * m_data[2][2] - m_data[1][2] * m_data[2][0] ) @@ -314,7 +316,7 @@ T MATRIX3x3::Determinant( void ) const template -MATRIX3x3 const operator*( MATRIX3x3 const& matrix, S scalar ) +MATRIX3x3 const operator*( MATRIX3x3 const& aMatrix, S aScalar ) { MATRIX3x3 result; @@ -322,7 +324,7 @@ MATRIX3x3 const operator*( MATRIX3x3 const& matrix, S scalar ) { for( int j = 0; j < 3; j++ ) { - result.m_data[i][j] = matrix.m_data[i][j] * scalar; + result.m_data[i][j] = aMatrix.m_data[i][j] * aScalar; } } @@ -331,9 +333,9 @@ MATRIX3x3 const operator*( MATRIX3x3 const& matrix, S scalar ) template -MATRIX3x3 const operator*( S scalar, MATRIX3x3 const& matrix ) +MATRIX3x3 const operator*( S aScalar, MATRIX3x3 const& aMatrix ) { - return matrix * scalar; + return aMatrix * aScalar; } diff --git a/include/math/vector2d.h b/include/math/vector2d.h index 514008401e..09cae7b31f 100644 --- a/include/math/vector2d.h +++ b/include/math/vector2d.h @@ -62,7 +62,7 @@ struct VECTOR2_TRAITS template class VECTOR2; template -std::ostream& operator<<( std::ostream& stream, const VECTOR2& vector ); +std::ostream& operator<<( std::ostream& aStream, const VECTOR2& aVector ); /** * Class VECTOR2 @@ -351,6 +351,8 @@ VECTOR2& VECTOR2::operator-=( const T& aScalar ) y -= aScalar; return *this; } + + template VECTOR2 VECTOR2::Rotate( double aAngle ) const { diff --git a/include/tool/coroutine.h b/include/tool/coroutine.h index 188034863a..9d502ff5c4 100644 --- a/include/tool/coroutine.h +++ b/include/tool/coroutine.h @@ -108,9 +108,9 @@ public: * Yield with a value - passes a value of given type to the caller. * Useful for implementing generator objects. */ - void Yield( ReturnType& retVal ) + void Yield( ReturnType& aRetVal ) { - m_retVal = retVal; + m_retVal = aRetVal; boost::context::jump_fcontext( m_self, m_saved, 0 ); } @@ -130,7 +130,7 @@ public: * @return true, if the coroutine has yielded and false if it has finished its * execution (returned). */ - bool Call( ArgType args ) + bool Call( ArgType aArgs ) { // fixme: Clean up stack stuff. Add a guard m_stack = malloc( c_defaultStackSize ); @@ -138,7 +138,7 @@ public: // align to 16 bytes void* sp = (void*) ( ( ( (ptrdiff_t) m_stack ) + m_stackSize - 0xf ) & ( ~0x0f ) ); - m_args = &args; + m_args = &aArgs; m_self = boost::context::make_fcontext( sp, m_stackSize, callerStub ); m_saved = new boost::context::fcontext_t(); @@ -186,10 +186,10 @@ private: static const int c_defaultStackSize = 2000000; // fixme: make configurable /* real entry point of the coroutine */ - static void callerStub( intptr_t data ) + static void callerStub( intptr_t aData ) { // get pointer to self - COROUTINE* cor = reinterpret_cast*>( data ); + COROUTINE* cor = reinterpret_cast*>( aData ); // call the coroutine method cor->m_retVal = cor->m_func( *cor->m_args ); diff --git a/include/tool/delegate.h b/include/tool/delegate.h index 101e10dfa8..a350dec799 100644 --- a/include/tool/delegate.h +++ b/include/tool/delegate.h @@ -45,17 +45,17 @@ public: } template - DELEGATE( T* object, ReturnType(T::* ptr)( Arg ) ) + DELEGATE( T* aObject, ReturnType(T::* aPtr)( Arg ) ) { - m_ptr = reinterpret_cast( ptr ); - m_object = reinterpret_cast( object ); + m_ptr = reinterpret_cast( aPtr ); + m_object = reinterpret_cast( aObject ); }; - ReturnType operator()( Arg a ) const + ReturnType operator()( Arg aA ) const { DELEGATE* casted = reinterpret_cast*>( m_object ); - return (casted->*m_ptr)( a ); + return (casted->*m_ptr)( aA ); } private: @@ -79,10 +79,10 @@ public: } template - DELEGATE0( T* object, ReturnType(T::* ptr)() ) + DELEGATE0( T* aObject, ReturnType(T::* aPtr)() ) { - m_ptr = reinterpret_cast( ptr ); - m_object = reinterpret_cast( object ); + m_ptr = reinterpret_cast( aPtr ); + m_object = reinterpret_cast( aObject ); }; diff --git a/include/tool/tool_action.h b/include/tool/tool_action.h index af06a1d091..8a3e7c4111 100644 --- a/include/tool/tool_action.h +++ b/include/tool/tool_action.h @@ -45,7 +45,7 @@ class TOOL_ACTION { public: - TOOL_ACTION( const std::string& aName, TOOL_ActionScope aScope = AS_CONTEXT, + TOOL_ACTION( const std::string& aName, TOOL_ACTION_SCOPE aScope = AS_CONTEXT, int aDefaultHotKey = 0, const std::string& aMenuItem = std::string( "" ), const std::string& aMenuDesc = std::string( "" ) ) : m_name( aName ), m_scope( aScope ), m_defaultHotKey( aDefaultHotKey ), @@ -148,7 +148,7 @@ public: */ TOOL_EVENT MakeEvent() const { - return TOOL_EVENT( TC_Command, TA_Action, m_name, m_scope ); + return TOOL_EVENT( TC_COMMAND, TA_ACTION, m_name, m_scope ); } const std::string& GetMenuItem() const @@ -190,7 +190,7 @@ private: std::string m_name; /// Scope of the action (ie. the event that is issued after activation). - TOOL_ActionScope m_scope; + TOOL_ACTION_SCOPE m_scope; /// Default hot key that activates the action. const int m_defaultHotKey; diff --git a/include/tool/tool_base.h b/include/tool/tool_base.h index c635859b38..7425ea8801 100644 --- a/include/tool/tool_base.h +++ b/include/tool/tool_base.h @@ -40,13 +40,13 @@ class VIEW; class VIEW_CONTROLS; }; -enum TOOL_Type +enum TOOL_TYPE { ///> Tool that interacts with the user - TOOL_Interactive = 0x01, + INTERACTIVE = 0x01, ///> Tool that runs in the background without any user intervention - TOOL_Batch = 0x02 + BATCH = 0x02 }; /// Unique identifier for tools @@ -62,7 +62,7 @@ typedef DELEGATE TOOL_STATE_FUNC; class TOOL_BASE { public: - TOOL_BASE( TOOL_Type aType, TOOL_ID aId, const std::string& aName = std::string( "" ) ) : + TOOL_BASE( TOOL_TYPE aType, TOOL_ID aId, const std::string& aName = std::string( "" ) ) : m_type( aType ), m_toolId( aId ), m_toolName( aName ), @@ -75,7 +75,7 @@ public: * Returns the type of the tool. * @return The type of the tool. */ - TOOL_Type GetType() const + TOOL_TYPE GetType() const { return m_type; } @@ -158,7 +158,7 @@ protected: * Returns the model object if it matches the requested type. */ template - T* getModel( KICAD_T modelType ) const + T* getModel( KICAD_T aModelType ) const { EDA_ITEM* m = getModelInt(); @@ -166,7 +166,7 @@ protected: } ///> Stores the type of the tool. - TOOL_Type m_type; + TOOL_TYPE m_type; ///> Unique identifier for the tool, assigned by a TOOL_MANAGER instance. TOOL_ID m_toolId; diff --git a/include/tool/tool_dispatcher.h b/include/tool/tool_dispatcher.h index 8bd9783a79..3a9be1ac64 100644 --- a/include/tool/tool_dispatcher.h +++ b/include/tool/tool_dispatcher.h @@ -32,7 +32,8 @@ class TOOL_MANAGER; class PCB_BASE_FRAME; -namespace KIGFX { +namespace KIGFX +{ class VIEW; }; @@ -102,25 +103,25 @@ private: int mods = 0; if( aState->ControlDown() ) - mods |= MD_ModCtrl; + mods |= MD_CTRL; if( aState->AltDown() ) - mods |= MD_ModAlt; + mods |= MD_ALT; if( aState->ShiftDown() ) - mods |= MD_ModShift; + mods |= MD_SHIFT; return mods; } ///> Stores all the informations regarding a mouse button state. - struct ButtonState; + struct BUTTON_STATE; ///> The last mouse cursor position (in world coordinates). VECTOR2D m_lastMousePos; ///> State of mouse buttons. - std::vector m_buttons; + std::vector m_buttons; ///> Returns the instance of VIEW, used by the application. KIGFX::VIEW* getView(); diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index f35f8d1023..33f512b668 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -40,77 +40,77 @@ class TOOL_MANAGER; * Internal (GUI-independent) event definitions. * Enums are mostly self-explanatory. */ -enum TOOL_EventCategory +enum TOOL_EVENT_CATEGORY { - TC_None = 0x00, - TC_Mouse = 0x01, - TC_Keyboard = 0x02, - TC_Command = 0x04, - TC_Message = 0x08, - TC_View = 0x10, - TC_Any = 0xffffffff + TC_NONE = 0x00, + TC_MOUSE = 0x01, + TC_KEYBOARD = 0x02, + TC_COMMAND = 0x04, + TC_MESSAGE = 0x08, + TC_VIEW = 0x10, + TC_ANY = 0xffffffff }; -enum TOOL_Actions +enum TOOL_ACTIONS { // UI input events - TA_None = 0x0000, - TA_MouseClick = 0x0001, - TA_MouseUp = 0x0002, - TA_MouseDown = 0x0004, - TA_MouseDrag = 0x0008, - TA_MouseMotion = 0x0010, - TA_MouseWheel = 0x0020, - TA_Mouse = 0x003f, - TA_KeyUp = 0x0040, - TA_KeyDown = 0x0080, - TA_Keyboard = TA_KeyUp | TA_KeyDown, + TA_NONE = 0x0000, + TA_MOUSE_CLICK = 0x0001, + TA_MOUSE_UP = 0x0002, + TA_MOUSE_DOWN = 0x0004, + TA_MOUSE_DRAG = 0x0008, + TA_MOUSE_MOTION = 0x0010, + TA_MOUSE_WHEEL = 0x0020, + TA_MOUSE = 0x003f, + TA_KEY_UP = 0x0040, + TA_KEY_DOWN = 0x0080, + TA_KEYBOARD = TA_KEY_UP | TA_KEY_DOWN, // View related events - TA_ViewRefresh = 0x0100, - TA_ViewZoom = 0x0200, - TA_ViewPan = 0x0400, - TA_ViewDirty = 0x0800, - TA_ChangeLayer = 0x1000, + TA_VIEW_REFRESH = 0x0100, + TA_VIEW_ZOOM = 0x0200, + TA_VIEW_PAN = 0x0400, + TA_VIEW_DIRTY = 0x0800, + TA_CHANGE_LAYER = 0x1000, // Tool cancel event. Issued automagically when the user hits escape or selects End Tool from // the context menu. - TA_CancelTool = 0x2000, + TA_CANCEL_TOOL = 0x2000, // Context menu update. Issued whenever context menu is open and the user hovers the mouse // over one of choices. Used in dynamic highligting in disambiguation menu - TA_ContextMenuUpdate = 0x4000, + TA_CONTEXT_MENU_UPDATE = 0x4000, // Context menu choice. Sent if the user picked something from the context menu or // closed it without selecting anything. - TA_ContextMenuChoice = 0x8000, + TA_CONTEXT_MENU_CHOICE = 0x8000, // Tool action (allows to control tools) - TA_Action = 0x10000, + TA_ACTION = 0x10000, - TA_Any = 0xffffffff + TA_ANY = 0xffffffff }; -enum TOOL_MouseButtons +enum TOOL_MOUSE_BUTTONS { - MB_None = 0x0, - MB_Left = 0x1, - MB_Right = 0x2, - MB_Middle = 0x4, - MB_ButtonMask = MB_Left | MB_Right | MB_Middle, - MB_Any = 0xffffffff + MB_NONE = 0x0, + MB_LEFT = 0x1, + MB_RIGHT = 0x2, + MB_MIDDLE = 0x4, + MB_BUTTON_MASK = MB_LEFT | MB_RIGHT | MB_MIDDLE, + MB_ANY = 0xffffffff }; -enum TOOL_Modifiers +enum TOOL_MODIFIERS { - MD_ModShift = 0x1000, - MD_ModCtrl = 0x2000, - MD_ModAlt = 0x4000, - MD_ModifierMask = MD_ModShift | MD_ModCtrl | MD_ModAlt, + MD_SHIFT = 0x1000, + MD_CTRL = 0x2000, + MD_ALT = 0x4000, + MD_MODIFIER_MASK = MD_SHIFT | MD_CTRL | MD_ALT, }; /// Scope of tool actions -enum TOOL_ActionScope +enum TOOL_ACTION_SCOPE { AS_CONTEXT = 1, ///> Action belongs to a particular tool (i.e. a part of a pop-up menu) AS_ACTIVE, ///> All active tools @@ -141,8 +141,8 @@ public: */ const std::string Format() const; - TOOL_EVENT( TOOL_EventCategory aCategory = TC_None, TOOL_Actions aAction = TA_None, - TOOL_ActionScope aScope = AS_GLOBAL ) : + TOOL_EVENT( TOOL_EVENT_CATEGORY aCategory = TC_NONE, TOOL_ACTIONS aAction = TA_NONE, + TOOL_ACTION_SCOPE aScope = AS_GLOBAL ) : m_category( aCategory ), m_actions( aAction ), m_scope( aScope ), @@ -150,52 +150,50 @@ public: m_keyCode( 0 ), m_modifiers( 0 ) {} - TOOL_EVENT( TOOL_EventCategory aCategory, - TOOL_Actions aAction, - int aExtraParam, - TOOL_ActionScope aScope = AS_GLOBAL ) : + TOOL_EVENT( TOOL_EVENT_CATEGORY aCategory, TOOL_ACTIONS aAction, int aExtraParam, + TOOL_ACTION_SCOPE aScope = AS_GLOBAL ) : m_category( aCategory ), m_actions( aAction ), m_scope( aScope ) { - if( aCategory == TC_Mouse ) + if( aCategory == TC_MOUSE ) { - m_mouseButtons = aExtraParam & MB_ButtonMask; + m_mouseButtons = aExtraParam & MB_BUTTON_MASK; } - else if( aCategory == TC_Keyboard ) + else if( aCategory == TC_KEYBOARD ) { - m_keyCode = aExtraParam & ~MD_ModifierMask; // Filter out modifiers + m_keyCode = aExtraParam & ~MD_MODIFIER_MASK; // Filter out modifiers } - else if( aCategory == TC_Command ) + else if( aCategory == TC_COMMAND ) { m_commandId = aExtraParam; } - if( aCategory & ( TC_Mouse | TC_Keyboard ) ) + if( aCategory & ( TC_MOUSE | TC_KEYBOARD ) ) { - m_modifiers = aExtraParam & MD_ModifierMask; + m_modifiers = aExtraParam & MD_MODIFIER_MASK; } } - TOOL_EVENT( TOOL_EventCategory aCategory, TOOL_Actions aAction, - const std::string& aExtraParam, TOOL_ActionScope aScope = AS_GLOBAL ) : + TOOL_EVENT( TOOL_EVENT_CATEGORY aCategory, TOOL_ACTIONS aAction, + const std::string& aExtraParam, TOOL_ACTION_SCOPE aScope = AS_GLOBAL ) : m_category( aCategory ), m_actions( aAction ), m_scope( aScope ), m_mouseButtons( 0 ) { - if( aCategory == TC_Command ) + if( aCategory == TC_COMMAND ) m_commandStr = aExtraParam; } ///> Returns the category (eg. mouse/keyboard/action) of an event.. - TOOL_EventCategory Category() const + TOOL_EVENT_CATEGORY Category() const { return m_category; } ///> Returns more specific information about the type of an event. - TOOL_Actions Action() const + TOOL_ACTIONS Action() const { return m_actions; } @@ -204,59 +202,59 @@ public: ///> where dragging has started. const VECTOR2D Delta() const { - assert( m_category == TC_Mouse ); // this should be used only with mouse events + assert( m_category == TC_MOUSE ); // this should be used only with mouse events return m_mouseDelta; } ///> Returns mouse cursor position in world coordinates. const VECTOR2D& Position() const { - assert( m_category == TC_Mouse ); // this should be used only with mouse events + assert( m_category == TC_MOUSE ); // this should be used only with mouse events return m_mousePos; } ///> Returns the point where dragging has started. const VECTOR2D& DragOrigin() const { - assert( m_category == TC_Mouse ); // this should be used only with mouse events + assert( m_category == TC_MOUSE ); // this should be used only with mouse events return m_mouseDragOrigin; } ///> Returns information about mouse buttons state. int Buttons() const { - assert( m_category == TC_Mouse ); // this should be used only with mouse events + assert( m_category == TC_MOUSE ); // this should be used only with mouse events return m_mouseButtons; } - bool IsClick( int aButtonMask = MB_Any ) const + bool IsClick( int aButtonMask = MB_ANY ) const { - return ( m_actions == TA_MouseClick ) + return ( m_actions == TA_MOUSE_CLICK ) && ( ( m_mouseButtons & aButtonMask ) == aButtonMask ); } - bool IsDrag( int aButtonMask = MB_Any ) const + bool IsDrag( int aButtonMask = MB_ANY ) const { - return ( m_actions == TA_MouseDrag ) && ( ( m_mouseButtons & aButtonMask ) == aButtonMask ); + return ( m_actions == TA_MOUSE_DRAG ) && ( ( m_mouseButtons & aButtonMask ) == aButtonMask ); } - bool IsMouseUp( int aButtonMask = MB_Any ) const + bool IsMouseUp( int aButtonMask = MB_ANY ) const { - return ( m_actions == TA_MouseUp ) && ( ( m_mouseButtons & aButtonMask ) == aButtonMask ); + return ( m_actions == TA_MOUSE_UP ) && ( ( m_mouseButtons & aButtonMask ) == aButtonMask ); } bool IsMotion() const { - return m_actions == TA_MouseMotion; + return m_actions == TA_MOUSE_MOTION; } bool IsCancel() const { - return m_actions == TA_CancelTool; + return m_actions == TA_CANCEL_TOOL; } ///> Returns information about key modifiers state (Ctrl, Alt, etc.) - int Modifier( int aMask = MD_ModifierMask ) const + int Modifier( int aMask = MD_MODIFIER_MASK ) const { return m_modifiers & aMask; } @@ -268,12 +266,12 @@ public: bool IsKeyUp() const { - return m_actions == TA_KeyUp; + return m_actions == TA_KEY_UP; } bool IsKeyDown() const { - return m_actions == TA_KeyDown; + return m_actions == TA_KEY_DOWN; } void SetMouseDragOrigin( const VECTOR2D& aP ) @@ -306,7 +304,7 @@ public: if( !( m_actions & aEvent.m_actions ) ) return false; - if( m_category == TC_Command ) + if( m_category == TC_COMMAND ) { if( m_commandStr && aEvent.m_commandStr ) return *m_commandStr == *aEvent.m_commandStr; @@ -334,9 +332,9 @@ public: private: friend class TOOL_MANAGER; - TOOL_EventCategory m_category; - TOOL_Actions m_actions; - TOOL_ActionScope m_scope; + TOOL_EVENT_CATEGORY m_category; + TOOL_ACTIONS m_actions; + TOOL_ACTION_SCOPE m_scope; ///> Difference between mouse cursor position and ///> the point where dragging event has started @@ -377,7 +375,8 @@ public: typedef std::deque::const_iterator const_iterator; ///> Default constructor. Creates an empty list. - TOOL_EVENT_LIST() {}; + TOOL_EVENT_LIST() + {} ///> Constructor for a list containing only one TOOL_EVENT. TOOL_EVENT_LIST( const TOOL_EVENT& aSingleEvent ) @@ -393,10 +392,10 @@ public: */ const std::string Format() const; - boost::optional Matches( const TOOL_EVENT& b ) const + boost::optional Matches( const TOOL_EVENT& aEvent ) const { for( const_iterator i = m_events.begin(); i != m_events.end(); ++i ) - if( i->Matches( b ) ) + if( i->Matches( aEvent ) ) return *i; return boost::optional(); @@ -442,12 +441,12 @@ public: m_events.clear(); } - TOOL_EVENT_LIST& operator=( const TOOL_EVENT_LIST& b ) + TOOL_EVENT_LIST& operator=( const TOOL_EVENT_LIST& aEventList ) { m_events.clear(); - for( std::deque::const_iterator i = b.m_events.begin(); - i != b.m_events.end(); ++i ) + for( std::deque::const_iterator i = aEventList.m_events.begin(); + i != aEventList.m_events.end(); ++i ) { m_events.push_back( *i ); } @@ -455,20 +454,20 @@ public: return *this; } - TOOL_EVENT_LIST& operator=( const TOOL_EVENT& b ) + TOOL_EVENT_LIST& operator=( const TOOL_EVENT& aEvent ) { m_events.clear(); - m_events.push_back( b ); + m_events.push_back( aEvent ); return *this; } - TOOL_EVENT_LIST& operator||( const TOOL_EVENT& b ) + TOOL_EVENT_LIST& operator||( const TOOL_EVENT& aEvent ) { - Add( b ); + Add( aEvent ); return *this; } - TOOL_EVENT_LIST& operator||( const TOOL_EVENT_LIST& b ) + TOOL_EVENT_LIST& operator||( const TOOL_EVENT_LIST& aEvent ) { return *this; } @@ -477,22 +476,23 @@ private: std::deque m_events; }; -inline const TOOL_EVENT_LIST operator||( const TOOL_EVENT& a, const TOOL_EVENT& b ) +inline const TOOL_EVENT_LIST operator||( const TOOL_EVENT& aEventA, const TOOL_EVENT& aEventB ) { TOOL_EVENT_LIST l; - l.Add( a ); - l.Add( b ); + l.Add( aEventA ); + l.Add( aEventB ); return l; } -inline const TOOL_EVENT_LIST operator||( const TOOL_EVENT& a, const TOOL_EVENT_LIST& b ) +inline const TOOL_EVENT_LIST operator||( const TOOL_EVENT& aEvent, + const TOOL_EVENT_LIST& aEventList ) { - TOOL_EVENT_LIST l( b ); + TOOL_EVENT_LIST l( aEventList ); - l.Add( a ); + l.Add( aEvent ); return l; } diff --git a/include/tool/tool_interactive.h b/include/tool/tool_interactive.h index a6a7e76310..d66b17ae05 100644 --- a/include/tool/tool_interactive.h +++ b/include/tool/tool_interactive.h @@ -83,7 +83,7 @@ public: */ template void Go( int (T::* aStateFunc)( TOOL_EVENT& ), - const TOOL_EVENT_LIST& aConditions = TOOL_EVENT( TC_Any, TA_Any ) ); + const TOOL_EVENT_LIST& aConditions = TOOL_EVENT( TC_ANY, TA_ANY ) ); /** * Function Wait() @@ -91,7 +91,7 @@ public: * Suspends execution of the tool until an event specified in aEventList arrives. * No parameters means waiting for any event. */ - OPT_TOOL_EVENT Wait( const TOOL_EVENT_LIST& aEventList = TOOL_EVENT (TC_Any, TA_Any) ); + OPT_TOOL_EVENT Wait( const TOOL_EVENT_LIST& aEventList = TOOL_EVENT( TC_ANY, TA_ANY ) ); /** functions below are not yet implemented - their interface may change */ /*template @@ -111,10 +111,10 @@ protected: const TOOL_EVENT evCommand( int aCommandId = -1 ); const TOOL_EVENT evCommand( std::string aCommandStr = "" ); const TOOL_EVENT evMotion(); - const TOOL_EVENT evClick( int aButton = MB_Any ); - const TOOL_EVENT evDrag( int aButton = MB_Any ); - const TOOL_EVENT evButtonUp( int aButton = MB_Any ); - const TOOL_EVENT evButtonDown(int aButton = MB_Any ); + const TOOL_EVENT evClick( int aButton = MB_ANY ); + const TOOL_EVENT evDrag( int aButton = MB_ANY ); + const TOOL_EVENT evButtonUp( int aButton = MB_ANY ); + const TOOL_EVENT evButtonDown(int aButton = MB_ANY ); private: void goInternal( TOOL_STATE_FUNC& aState, const TOOL_EVENT_LIST& aConditions ); @@ -123,7 +123,7 @@ private: // hide TOOL_MANAGER implementation template void TOOL_INTERACTIVE::Go( int (T::* aStateFunc)( TOOL_EVENT& ), - const TOOL_EVENT_LIST& aConditions ) + const TOOL_EVENT_LIST& aConditions ) { TOOL_STATE_FUNC sptr( static_cast( this ), aStateFunc ); diff --git a/include/view/view.h b/include/view/view.h index 31268839ba..a5e0756219 100644 --- a/include/view/view.h +++ b/include/view/view.h @@ -60,7 +60,7 @@ class VIEW public: friend class VIEW_ITEM; - typedef std::pair LayerItemPair; + typedef std::pair LAYER_ITEM_PAIR; /** * Constructor. @@ -94,7 +94,7 @@ public: * first). * @return Number of found items. */ - int Query( const BOX2I& aRect, std::vector& aResult ); + int Query( const BOX2I& aRect, std::vector& aResult ); /** * Function SetRequired() @@ -131,7 +131,10 @@ public: * Returns the GAL this view is using to draw graphical primitives. * @return Pointer to the currently used GAL instance. */ - GAL* GetGAL() const { return m_gal; } + GAL* GetGAL() const + { + return m_gal; + } /** * Function SetPainter() @@ -144,7 +147,10 @@ public: * Returns the painter object used by the view for drawing VIEW_ITEMS. * @return Pointer to the currently used Painter instance. */ - PAINTER* GetPainter() const { return m_painter; }; + PAINTER* GetPainter() const + { + return m_painter; + } /** * Function SetViewport() @@ -189,7 +195,10 @@ public: * Function GetScale() * @return Current scalefactor of this VIEW */ - double GetScale() const { return m_scale; } + double GetScale() const + { + return m_scale; + } /** * Function SetCenter() @@ -204,7 +213,10 @@ public: * Returns the center point of this VIEW (in world space coordinates) * @return center point of the view */ - const VECTOR2D& GetCenter() const { return m_center; } + const VECTOR2D& GetCenter() const + { + return m_center; + } /** * Function ToWorld() @@ -291,7 +303,7 @@ public: * @param aLayer is the layer. * @param aTarget is the rendering target. */ - inline void SetLayerTarget( int aLayer, RenderTarget aTarget ) + inline void SetLayerTarget( int aLayer, RENDER_TARGET aTarget ) { m_layers[aLayer].target = aTarget; } @@ -410,7 +422,10 @@ public: * Tells if the VIEW is dynamic (ie. can be changed, for example displaying PCBs in a window) * or static (that cannot be modified, eg. displaying image/PDF). */ - bool IsDynamic() const { return m_dynamic; } + bool IsDynamic() const + { + return m_dynamic; + } /** * Function IsDirty() @@ -488,15 +503,15 @@ private: VIEW_RTREE* items; ///* R-tree indexing all items on this layer. int renderingOrder; ///* rendering order of this layer int id; ///* layer ID - RenderTarget target; ///* where the layer should be rendered - std::set requiredLayers; ///* layers that are required to be enabled to show the layer + RENDER_TARGET target; ///* where the layer should be rendered + std::set requiredLayers; ///* layers that have to be enabled to show the layer }; // Convenience typedefs - typedef boost::unordered_map LayerMap; - typedef LayerMap::iterator LayerMapIter; - typedef std::vector LayerOrder; - typedef std::vector::iterator LayerOrderIter; + typedef boost::unordered_map LAYER_MAP; + typedef LAYER_MAP::iterator LAYER_MAP_ITER; + typedef std::vector LAYER_ORDER; + typedef std::vector::iterator LAYER_ORDER_ITER; // Function objects that need to access VIEW/VIEW_ITEM private/protected members struct clearLayerCache; @@ -573,9 +588,9 @@ private: void updateLayers( VIEW_ITEM* aItem ); /// Determines rendering order of layers. Used in display order sorting function. - static bool compareRenderingOrder( VIEW_LAYER* i, VIEW_LAYER* j ) + static bool compareRenderingOrder( VIEW_LAYER* aI, VIEW_LAYER* aJ ) { - return i->renderingOrder > j->renderingOrder; + return aI->renderingOrder > aJ->renderingOrder; } /// Checks if every layer required by the aLayerId layer is enabled. @@ -585,10 +600,10 @@ private: bool m_enableOrderModifier; /// Contains set of possible displayed layers and its properties - LayerMap m_layers; + LAYER_MAP m_layers; /// Sorted list of pointers to members of m_layers - LayerOrder m_orderedLayers; + LAYER_ORDER m_orderedLayers; /// Stores set of layers that are displayed on the top std::set m_topLayers; diff --git a/include/view/view_controls.h b/include/view/view_controls.h index df8311da1d..a51048dca3 100644 --- a/include/view/view_controls.h +++ b/include/view/view_controls.h @@ -48,8 +48,11 @@ class VIEW_CONTROLS public: VIEW_CONTROLS( VIEW* aView ) : m_view( aView ), m_forceCursorPosition( false ), m_snappingEnabled( false ), m_grabMouse( false ), m_autoPanEnabled( false ), - m_autoPanMargin( 0.1 ), m_autoPanSpeed( 0.15 ) {}; - virtual ~VIEW_CONTROLS() {}; + m_autoPanMargin( 0.1 ), m_autoPanSpeed( 0.15 ) + {} + + virtual ~VIEW_CONTROLS() + {} /** * Function SetSnapping() @@ -134,6 +137,11 @@ public: m_forceCursorPosition = aEnabled; } + /** + * Function ShowCursor() + * Enables or disables display of cursor. + * @param aEnabled decides if the cursor should be shown. + */ virtual void ShowCursor( bool aEnabled ); protected: diff --git a/include/view/view_group.h b/include/view/view_group.h index 711d1b4031..2a1ad62756 100644 --- a/include/view/view_group.h +++ b/include/view/view_group.h @@ -164,17 +164,32 @@ public: * * @param aFlags determines the way in which items will be updated. */ - virtual void ItemsViewUpdate( VIEW_ITEM::ViewUpdateFlags aFlags ); + virtual void ItemsViewUpdate( VIEW_ITEM::VIEW_UPDATE_FLAGS aFlags ); protected: /// These functions cannot be used with VIEW_GROUP as they are intended only to work with /// singular VIEW_ITEMs (there is only one-to-one relation between item/layer combination and /// its group). - int getGroup( int aLayer ) const { return -1; }; - std::vector getAllGroups() const { return std::vector(); }; - void setGroup( int aLayer, int aGroup ) {}; - void deleteGroups() {}; - bool storesGroups() const { return false; }; + int getGroup( int aLayer ) const + { + return -1; + } + + std::vector getAllGroups() const + { + return std::vector(); + } + + void setGroup( int aLayer, int aGroup ) + {} + + void deleteGroups() + {} + + bool storesGroups() const + { + return false; + } /// Layer on which the group is drawn int m_layer; diff --git a/include/view/view_item.h b/include/view/view_item.h index 8ecf1ecc00..11d826322d 100644 --- a/include/view/view_item.h +++ b/include/view/view_item.h @@ -155,14 +155,14 @@ class VIEW_ITEM { public: /** - * Enum ViewUpdateFlags. + * Enum VIEW_UPDATE_FLAGS. * Defines the how severely the shape/appearance of the item has been changed: * - APPEARANCE: shape or layer set of the item have not been affected, * only colors or visibility. * - GEOMETRY: shape or layer set of the item have changed, VIEW may need to reindex it. * - ALL: all flags above */ - enum ViewUpdateFlags { + enum VIEW_UPDATE_FLAGS { APPEARANCE = 0x01, /// Visibility flag has changed COLOR = 0x02, /// Color has changed GEOMETRY = 0x04, /// Position or shape has changed @@ -212,7 +212,8 @@ public: * @param aLayer: current drawing layer * @param aGal: pointer to the GAL device we are drawing on */ - virtual void ViewDraw( int aLayer, GAL* aGal ) const {}; + virtual void ViewDraw( int aLayer, GAL* aGal ) const + {} /** * Function ViewGetLayers() diff --git a/include/view/wx_view_controls.h b/include/view/wx_view_controls.h index 6d946e0184..f5561f7d2d 100644 --- a/include/view/wx_view_controls.h +++ b/include/view/wx_view_controls.h @@ -48,7 +48,8 @@ class WX_VIEW_CONTROLS : public VIEW_CONTROLS, public wxEvtHandler { public: WX_VIEW_CONTROLS( VIEW* aView, wxWindow* aParentPanel ); - ~WX_VIEW_CONTROLS() {}; + ~WX_VIEW_CONTROLS() + {} /// Handler functions void onWheel( wxMouseEvent& aEvent ); @@ -80,10 +81,10 @@ public: } /// @copydoc VIEW_CONTROLS::GetMousePosition() - virtual const VECTOR2D GetMousePosition() const; + const VECTOR2D GetMousePosition() const; /// @copydoc VIEW_CONTROLS::GetCursorPosition() - virtual const VECTOR2D GetCursorPosition() const; + const VECTOR2D GetCursorPosition() const; /// Event that forces mouse move event in the dispatcher (eg. used in autopanning, when mouse /// cursor does not move in screen coordinates, but does in world coordinates) @@ -91,7 +92,7 @@ public: private: /// Possible states for WX_VIEW_CONTROLS - enum State + enum STATE { IDLE = 1, /// Nothing is happening DRAG_PANNING, /// Panning with mouse button pressed @@ -109,7 +110,7 @@ private: bool handleAutoPanning( const wxMouseEvent& aEvent ); /// Current state of VIEW_CONTROLS - State m_state; + STATE m_state; /// Panel that is affected by VIEW_CONTROLS wxWindow* m_parentPanel; diff --git a/pcbnew/router/direction.h b/pcbnew/router/direction.h index a984d965cb..0b7d8cb62d 100644 --- a/pcbnew/router/direction.h +++ b/pcbnew/router/direction.h @@ -82,7 +82,7 @@ public: */ DIRECTION_45( const SEG& aSeg ) { - construct( aSeg.b - aSeg.a ); + construct( aSeg.B - aSeg.A ); } /** diff --git a/pcbnew/router/pns_line.cpp b/pcbnew/router/pns_line.cpp index 0f3583ff59..7600d65400 100644 --- a/pcbnew/router/pns_line.cpp +++ b/pcbnew/router/pns_line.cpp @@ -118,22 +118,22 @@ bool PNS_LINE::MergeObtuseSegments() if( s1.Distance( ip ) <= 1 || s2.Distance( ip ) <= 1 ) { - s1opt = SEG( s1.a, ip ); - s2opt = SEG( ip, s2.b ); + s1opt = SEG( s1.A, ip ); + s2opt = SEG( ip, s2.B ); } else { - s1opt = SEG( s1.a, ip ); - s2opt = SEG( ip, s2.b ); + s1opt = SEG( s1.A, ip ); + s2opt = SEG( ip, s2.B ); } if( DIRECTION_45( s1opt ).IsObtuse( DIRECTION_45( s2opt ) ) ) { SHAPE_LINE_CHAIN opt_path; - opt_path.Append( s1opt.a ); - opt_path.Append( s1opt.b ); - opt_path.Append( s2opt.b ); + opt_path.Append( s1opt.A ); + opt_path.Append( s1opt.B ); + opt_path.Append( s2opt.B ); PNS_LINE opt_track( *this, opt_path ); @@ -204,12 +204,10 @@ bool PNS_LINE::MergeSegments() if( n > 0 ) { - SHAPE_LINE_CHAIN path_straight = DIRECTION_45().BuildInitialTrace( s1.a, - s2.a, - false ); - SHAPE_LINE_CHAIN path_diagonal = DIRECTION_45().BuildInitialTrace( s1.a, - s2.a, - true ); + SHAPE_LINE_CHAIN path_straight = DIRECTION_45().BuildInitialTrace( s1.A, + s2.A, false ); + SHAPE_LINE_CHAIN path_diagonal = DIRECTION_45().BuildInitialTrace( s1.A, + s2.A, true ); } if( DIRECTION_45( s1 ) == DIRECTION_45( s2 ) ) @@ -219,8 +217,8 @@ bool PNS_LINE::MergeSegments() // printf("Colinear: np %d step %d n1 %d n2 %d\n", n_segs, step, n, n+step); SHAPE_LINE_CHAIN opt_path; - opt_path.Append( s1.a ); - opt_path.Append( s2.b ); + opt_path.Append( s1.A ); + opt_path.Append( s2.B ); PNS_LINE tmp( *this, opt_path ); @@ -239,22 +237,22 @@ bool PNS_LINE::MergeSegments() if( s1.Distance( ip ) <= 1 || s2.Distance( ip ) <= 1 ) { - s1opt = SEG( s1.a, ip ); - s2opt = SEG( ip, s2.b ); + s1opt = SEG( s1.A, ip ); + s2opt = SEG( ip, s2.B ); } else { - s1opt = SEG( s1.a, ip ); - s2opt = SEG( ip, s2.b ); + s1opt = SEG( s1.A, ip ); + s2opt = SEG( ip, s2.B ); } if( DIRECTION_45( s1opt ).IsObtuse( DIRECTION_45( s2opt ) ) ) { SHAPE_LINE_CHAIN opt_path; - opt_path.Append( s1opt.a ); - opt_path.Append( s1opt.b ); - opt_path.Append( s2opt.b ); + opt_path.Append( s1opt.A ); + opt_path.Append( s1opt.B ); + opt_path.Append( s2opt.B ); PNS_LINE opt_track( *this, opt_path ); @@ -319,14 +317,14 @@ void PNS_LINE::NewWalkaround( const SHAPE_LINE_CHAIN& aObstacle, SHAPE_LINE_CHAIN& aPostPath, bool aCw ) const { - typedef SHAPE_LINE_CHAIN::Intersection Intersection; + typedef SHAPE_LINE_CHAIN::INTERSECTION INTERSECTION; SHAPE_LINE_CHAIN l_orig( m_line ); SHAPE_LINE_CHAIN l_hull; vector outside, on_edge, inside; SHAPE_LINE_CHAIN path; - vector isects; + vector isects; // don't calculate walkaround for empty lines if( m_line.PointCount() < 2 ) @@ -345,7 +343,7 @@ void PNS_LINE::NewWalkaround( const SHAPE_LINE_CHAIN& aObstacle, else l_hull = aObstacle; - BOOST_FOREACH( Intersection isect, isects ) { + BOOST_FOREACH( INTERSECTION isect, isects ) { l_orig.Split( isect.p ); l_hull.Split( isect.p ); } @@ -379,7 +377,7 @@ void PNS_LINE::NewWalkaround( const SHAPE_LINE_CHAIN& aObstacle, for( int i = l_orig.PointCount() - 1; i >= 1; i-- ) if( inside[i] && outside[i - 1] ) { - SHAPE_LINE_CHAIN::Intersections ips; + SHAPE_LINE_CHAIN::INTERSECTIONS ips; l_hull.Intersect( SEG( l_orig.CPoint( i ), l_orig.CPoint( i - 1 ) ), ips ); l_orig.Remove( i, -1 ); l_orig.Append( ips[0].p ); @@ -488,55 +486,50 @@ bool PNS_LINE::onEdge( const SHAPE_LINE_CHAIN& obstacle, VECTOR2I p, int& ei, } -bool PNS_LINE::walkScan( const SHAPE_LINE_CHAIN& line, - const SHAPE_LINE_CHAIN& obstacle, - bool reverse, - VECTOR2I& ip, - int& index_o, - int& index_l, - bool& is_vertex ) const +bool PNS_LINE::walkScan( const SHAPE_LINE_CHAIN& aLine, const SHAPE_LINE_CHAIN& aObstacle, + bool aReverse, VECTOR2I& aIp, int& aIndexO, int& aIndexL, bool& aIsVertex ) const { - int sc = line.SegmentCount(); + int sc = aLine.SegmentCount(); - for( int i = 0; i < line.SegmentCount(); i++ ) + for( int i = 0; i < aLine.SegmentCount(); i++ ) { - printf( "check-seg rev %d %d/%d %d\n", reverse, i, sc, sc - 1 - i ); - SEG tmp = line.CSegment( reverse ? sc - 1 - i : i ); - SEG s( tmp.a, tmp.b ); + printf( "check-seg rev %d %d/%d %d\n", aReverse, i, sc, sc - 1 - i ); + SEG tmp = aLine.CSegment( aReverse ? sc - 1 - i : i ); + SEG s( tmp.A, tmp.B ); - if( reverse ) + if( aReverse ) { - s.a = tmp.b; - s.b = tmp.a; + s.A = tmp.B; + s.B = tmp.A; } - if( onEdge( obstacle, s.a, index_o, is_vertex ) ) + if( onEdge( aObstacle, s.A, aIndexO, aIsVertex ) ) { - index_l = (reverse ? sc - 1 - i : i); - ip = s.a; - printf( "vertex %d on-%s %d\n", index_l, - is_vertex ? "vertex" : "edge", index_o ); + aIndexL = (aReverse ? sc - 1 - i : i); + aIp = s.A; + printf( "vertex %d on-%s %d\n", aIndexL, + aIsVertex ? "vertex" : "edge", aIndexO ); return true; } - if( onEdge( obstacle, s.b, index_o, is_vertex ) ) + if( onEdge( aObstacle, s.B, aIndexO, aIsVertex ) ) { - index_l = (reverse ? sc - 1 - i - 1 : i + 1); - ip = s.b; - printf( "vertex %d on-%s %d\n", index_l, - is_vertex ? "vertex" : "edge", index_o ); + aIndexL = (aReverse ? sc - 1 - i - 1 : i + 1); + aIp = s.B; + printf( "vertex %d on-%s %d\n", aIndexL, + aIsVertex ? "vertex" : "edge", aIndexO ); return true; } - SHAPE_LINE_CHAIN::Intersections ips; - int n_is = obstacle.Intersect( s, ips ); + SHAPE_LINE_CHAIN::INTERSECTIONS ips; + int n_is = aObstacle.Intersect( s, ips ); if( n_is > 0 ) { - index_o = ips[0].our.Index(); - index_l = reverse ? sc - 1 - i : i; - printf( "segment-%d intersects edge-%d\n", index_l, index_o ); - ip = ips[0].p; + aIndexO = ips[0].our.Index(); + aIndexL = aReverse ? sc - 1 - i : i; + printf( "segment-%d intersects edge-%d\n", aIndexL, aIndexO ); + aIp = ips[0].p; return true; } } @@ -545,11 +538,8 @@ bool PNS_LINE::walkScan( const SHAPE_LINE_CHAIN& line, } -bool PNS_LINE::Walkaround( SHAPE_LINE_CHAIN obstacle, - SHAPE_LINE_CHAIN& pre, - SHAPE_LINE_CHAIN& walk, - SHAPE_LINE_CHAIN& post, - bool cw ) const +bool PNS_LINE::Walkaround( SHAPE_LINE_CHAIN aObstacle, SHAPE_LINE_CHAIN& aPre, + SHAPE_LINE_CHAIN& aWalk, SHAPE_LINE_CHAIN& aPost, bool aCw ) const { const SHAPE_LINE_CHAIN& line = GetCLine(); VECTOR2I ip_start; @@ -562,60 +552,55 @@ bool PNS_LINE::Walkaround( SHAPE_LINE_CHAIN obstacle, if( line.SegmentCount() < 1 ) return false; - if( obstacle.PointInside( line.CPoint( 0 ) ) || - obstacle.PointInside( line.CPoint( -1 ) ) ) + if( aObstacle.PointInside( line.CPoint( 0 ) ) || + aObstacle.PointInside( line.CPoint( -1 ) ) ) return false; // printf("forward:\n"); - bool found = walkScan( line, - obstacle, - false, - ip_start, - index_o_start, - index_l_start, - is_vertex_start ); + bool found = walkScan( line, aObstacle, false, ip_start, index_o_start, + index_l_start, is_vertex_start ); // printf("reverse:\n"); - found |= walkScan( line, obstacle, true, ip_end, index_o_end, index_l_end, is_vertex_end ); + found |= walkScan( line, aObstacle, true, ip_end, index_o_end, index_l_end, is_vertex_end ); if( !found || ip_start == ip_end ) { - pre = line; + aPre = line; return true; } - pre = line.Slice( 0, index_l_start ); - pre.Append( ip_start ); - walk.Clear(); - walk.Append( ip_start ); + aPre = line.Slice( 0, index_l_start ); + aPre.Append( ip_start ); + aWalk.Clear(); + aWalk.Append( ip_start ); - if( cw ) + if( aCw ) { - int is = ( index_o_start + 1 ) % obstacle.PointCount(); - int ie = ( is_vertex_end ? index_o_end : index_o_end + 1 ) % obstacle.PointCount(); + int is = ( index_o_start + 1 ) % aObstacle.PointCount(); + int ie = ( is_vertex_end ? index_o_end : index_o_end + 1 ) % aObstacle.PointCount(); while( 1 ) { printf( "is %d\n", is ); - walk.Append( obstacle.CPoint( is ) ); + aWalk.Append( aObstacle.CPoint( is ) ); if( is == ie ) break; is++; - if( is == obstacle.PointCount() ) + if( is == aObstacle.PointCount() ) is = 0; } } else { int is = index_o_start; - int ie = ( is_vertex_end ? index_o_end : index_o_end ) % obstacle.PointCount(); + int ie = ( is_vertex_end ? index_o_end : index_o_end ) % aObstacle.PointCount(); while( 1 ) { printf( "is %d\n", is ); - walk.Append( obstacle.CPoint( is ) ); + aWalk.Append( aObstacle.CPoint( is ) ); if( is == ie ) break; @@ -623,15 +608,15 @@ bool PNS_LINE::Walkaround( SHAPE_LINE_CHAIN obstacle, is--; if( is < 0 ) - is = obstacle.PointCount() - 1; + is = aObstacle.PointCount() - 1; } } - walk.Append( ip_end ); + aWalk.Append( ip_end ); - post.Clear(); - post.Append( ip_end ); - post.Append( line.Slice( is_vertex_end ? index_l_end : index_l_end + 1, -1 ) ); + aPost.Clear(); + aPost.Append( ip_end ); + aPost.Append( line.Slice( is_vertex_end ? index_l_end : index_l_end + 1, -1 ) ); // for(int i = (index_o_start + 1) % obstacle.PointCount(); // i != (index_o_end + 1) % obstacle.PointCount(); i=(i+1) % obstacle.PointCount()) @@ -714,8 +699,8 @@ bool PNS_LINE::Is45Degree() const SEG& s = m_line.CSegment( i ); double angle = 180.0 / M_PI * - atan2( (double) s.b.y - (double) s.a.y, - (double) s.b.x - (double) s.a.x ); + atan2( (double) s.B.y - (double) s.A.y, + (double) s.B.x - (double) s.A.x ); if( angle < 0 ) angle += 360.0; diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp index bda0d661c0..294da09695 100644 --- a/pcbnew/router/pns_line_placer.cpp +++ b/pcbnew/router/pns_line_placer.cpp @@ -100,7 +100,7 @@ void PNS_LINE_PLACER::SetInitialDirection( const DIRECTION_45& aDirection ) bool PNS_LINE_PLACER::handleSelfIntersections() { - SHAPE_LINE_CHAIN::Intersections ips; + SHAPE_LINE_CHAIN::INTERSECTIONS ips; SHAPE_LINE_CHAIN& head = m_head.GetLine(); SHAPE_LINE_CHAIN& tail = m_tail.GetLine(); @@ -119,7 +119,7 @@ bool PNS_LINE_PLACER::handleSelfIntersections() // if there is more than one intersection, find the one that is // closest to the beginning of the tail. - BOOST_FOREACH( SHAPE_LINE_CHAIN::Intersection i, ips ) + BOOST_FOREACH( SHAPE_LINE_CHAIN::INTERSECTION i, ips ) { if( i.our.Index() < n ) { @@ -147,7 +147,7 @@ bool PNS_LINE_PLACER::handleSelfIntersections() // Clip till the last tail segment before intersection. // Set the direction to the one of this segment. const SEG last = tail.CSegment( n - 1 ); - m_p_start = last.a; + m_p_start = last.A; m_direction = DIRECTION_45( last ); tail.Remove( n, -1 ); return true; @@ -190,7 +190,7 @@ bool PNS_LINE_PLACER::handlePullback() { const SEG last = tail.CSegment( -1 ); m_direction = DIRECTION_45( last ); - m_p_start = last.a; + m_p_start = last.A; TRACE( 0, "Placer: pullback triggered [%d] [%s %s]", n % last_tail.Format().c_str() % first_head.Format().c_str() ); @@ -240,7 +240,7 @@ bool PNS_LINE_PLACER::reduceTail( const VECTOR2I& aEnd ) // calculate a replacement route and check if it matches // the direction of the segment to be replaced - SHAPE_LINE_CHAIN replacement = dir.BuildInitialTrace( s.a, aEnd ); + SHAPE_LINE_CHAIN replacement = dir.BuildInitialTrace( s.A, aEnd ); PNS_LINE tmp( m_tail, replacement ); @@ -249,7 +249,7 @@ bool PNS_LINE_PLACER::reduceTail( const VECTOR2I& aEnd ) if( DIRECTION_45( replacement.Segment( 0 ) ) == dir ) { - new_start = s.a; + new_start = s.A; new_direction = dir; reduce_index = i; } @@ -326,18 +326,18 @@ bool PNS_LINE_PLACER::mergeHead() } if( !n_tail ) - tail.Append( head.CSegment( 0 ).a ); + tail.Append( head.CSegment( 0 ).A ); for( int i = 0; i < n_head - 2; i++ ) { - tail.Append( head.CSegment( i ).b ); + tail.Append( head.CSegment( i ).B ); } tail.Simplify(); SEG last = tail.CSegment( -1 ); - m_p_start = last.b; + m_p_start = last.B; m_direction = DIRECTION_45( last ).Right(); head.Remove( 0, n_head - 2 ); diff --git a/pcbnew/router/pns_node.cpp b/pcbnew/router/pns_node.cpp index 1de4ca8995..c1a14d81a8 100644 --- a/pcbnew/router/pns_node.cpp +++ b/pcbnew/router/pns_node.cpp @@ -284,7 +284,7 @@ PNS_NODE::OptObstacle PNS_NODE::NearestObstacle( const PNS_LINE* aItem, int aKin VECTOR2I ip_first, ip_last; int dist_max = INT_MIN; - vector isect_list; + vector isect_list; int clearance = GetClearance( obs.item, &aLine ); @@ -298,7 +298,7 @@ PNS_NODE::OptObstacle PNS_NODE::NearestObstacle( const PNS_LINE* aItem, int aKin viaHull.Intersect( hull, isect_list ); - BOOST_FOREACH( SHAPE_LINE_CHAIN::Intersection isect, isect_list ) + BOOST_FOREACH( SHAPE_LINE_CHAIN::INTERSECTION isect, isect_list ) { int dist = aLine.GetCLine().Length() + ( isect.p - aLine.GetVia().GetPos() ).EuclideanNorm(); @@ -324,7 +324,7 @@ PNS_NODE::OptObstacle PNS_NODE::NearestObstacle( const PNS_LINE* aItem, int aKin hull.Intersect( aLine.GetCLine(), isect_list ); - BOOST_FOREACH( SHAPE_LINE_CHAIN::Intersection isect, isect_list ) + BOOST_FOREACH( SHAPE_LINE_CHAIN::INTERSECTION isect, isect_list ) { int dist = aLine.GetCLine().PathLength( isect.p ); @@ -473,14 +473,14 @@ void PNS_NODE::addLine( PNS_LINE* aLine ) { SEG s = l.CSegment( i ); - if( s.a != s.b ) + if( s.A != s.B ) { PNS_SEGMENT* pseg = new PNS_SEGMENT( *aLine, s ); pseg->SetOwner( this ); - linkJoint( s.a, pseg->GetLayers(), aLine->GetNet(), pseg ); - linkJoint( s.b, pseg->GetLayers(), aLine->GetNet(), pseg ); + linkJoint( s.A, pseg->GetLayers(), aLine->GetNet(), pseg ); + linkJoint( s.B, pseg->GetLayers(), aLine->GetNet(), pseg ); aLine->LinkSegment( pseg ); @@ -492,7 +492,7 @@ void PNS_NODE::addLine( PNS_LINE* aLine ) void PNS_NODE::addSegment( PNS_SEGMENT* aSeg ) { - if( aSeg->GetSeg().a == aSeg->GetSeg().b ) + if( aSeg->GetSeg().A == aSeg->GetSeg().B ) { TRACEn( 0, "attempting to add a segment with same end coordinates, ignoring." ) return; @@ -500,8 +500,8 @@ void PNS_NODE::addSegment( PNS_SEGMENT* aSeg ) aSeg->SetOwner( this ); - linkJoint( aSeg->GetSeg().a, aSeg->GetLayers(), aSeg->GetNet(), aSeg ); - linkJoint( aSeg->GetSeg().b, aSeg->GetLayers(), aSeg->GetNet(), aSeg ); + linkJoint( aSeg->GetSeg().A, aSeg->GetLayers(), aSeg->GetNet(), aSeg ); + linkJoint( aSeg->GetSeg().B, aSeg->GetLayers(), aSeg->GetNet(), aSeg ); m_index->Add( aSeg ); } @@ -555,8 +555,8 @@ void PNS_NODE::doRemove( PNS_ITEM* aItem ) void PNS_NODE::removeSegment( PNS_SEGMENT* aSeg ) { - unlinkJoint( aSeg->GetSeg().a, aSeg->GetLayers(), aSeg->GetNet(), aSeg ); - unlinkJoint( aSeg->GetSeg().b, aSeg->GetLayers(), aSeg->GetNet(), aSeg ); + unlinkJoint( aSeg->GetSeg().A, aSeg->GetLayers(), aSeg->GetNet(), aSeg ); + unlinkJoint( aSeg->GetSeg().B, aSeg->GetLayers(), aSeg->GetNet(), aSeg ); doRemove( aSeg ); } @@ -629,7 +629,7 @@ void PNS_NODE::followLine( PNS_SEGMENT* current, bool scanDirection, int& pos, for( ; ; ) { const VECTOR2I p = - (scanDirection ^ prevReversed) ? current->GetSeg().b : current->GetSeg().a; + (scanDirection ^ prevReversed) ? current->GetSeg().B : current->GetSeg().A; const OptJoint jt = FindJoint( p, current->GetLayer(), current->GetNet() ); assert( jt ); @@ -645,7 +645,7 @@ void PNS_NODE::followLine( PNS_SEGMENT* current, bool scanDirection, int& pos, current = jt->NextSegment( current ); prevReversed = - ( jt->GetPos() == (scanDirection ? current->GetSeg().b : current->GetSeg().a ) ); + ( jt->GetPos() == (scanDirection ? current->GetSeg().B : current->GetSeg().A ) ); } } @@ -870,8 +870,8 @@ void PNS_NODE::Dump( bool aLong ) case PNS_ITEM::SEGMENT: { const PNS_SEGMENT* seg = static_cast(item); - printf( " -> seg %s %s\n", seg->GetSeg().a.Format().c_str(), - seg->GetSeg().b.Format().c_str() ); + printf( " -> seg %s %s\n", seg->GetSeg().A.Format().c_str(), + seg->GetSeg().B.Format().c_str() ); break; } @@ -897,10 +897,10 @@ void PNS_NODE::Dump( bool aLong ) for( vector::iterator j = seg_refs->begin(); j != seg_refs->end(); ++j ) { - printf( "%s ", (*j)->GetSeg().a.Format().c_str() ); + printf( "%s ", (*j)->GetSeg().A.Format().c_str() ); if( j + 1 == seg_refs->end() ) - printf( "%s\n", (*j)->GetSeg().b.Format().c_str() ); + printf( "%s\n", (*j)->GetSeg().B.Format().c_str() ); all_segs.erase( *j ); } diff --git a/pcbnew/router/pns_optimizer.cpp b/pcbnew/router/pns_optimizer.cpp index 12999a4f3b..49e3f8cc5c 100644 --- a/pcbnew/router/pns_optimizer.cpp +++ b/pcbnew/router/pns_optimizer.cpp @@ -311,22 +311,22 @@ bool PNS_OPTIMIZER::mergeObtuse( PNS_LINE* aLine ) if( s1.Distance( ip ) <= 1 || s2.Distance( ip ) <= 1 ) { - s1opt = SEG( s1.a, ip ); - s2opt = SEG( ip, s2.b ); + s1opt = SEG( s1.A, ip ); + s2opt = SEG( ip, s2.B ); } else { - s1opt = SEG( s1.a, ip ); - s2opt = SEG( ip, s2.b ); + s1opt = SEG( s1.A, ip ); + s2opt = SEG( ip, s2.B ); } if( DIRECTION_45( s1opt ).IsObtuse( DIRECTION_45( s2opt ) ) ) { SHAPE_LINE_CHAIN opt_path; - opt_path.Append( s1opt.a ); - opt_path.Append( s1opt.b ); - opt_path.Append( s2opt.b ); + opt_path.Append( s1opt.A ); + opt_path.Append( s1opt.B ); + opt_path.Append( s2opt.B ); PNS_LINE opt_track( *aLine, opt_path ); @@ -446,7 +446,7 @@ bool PNS_OPTIMIZER::mergeStep( PNS_LINE* aLine, SHAPE_LINE_CHAIN& aCurrentPath, for( int i = 0; i < 2; i++ ) { bool postureMatch = true; - SHAPE_LINE_CHAIN bypass = DIRECTION_45().BuildInitialTrace( s1.a, s2.b, i ); + SHAPE_LINE_CHAIN bypass = DIRECTION_45().BuildInitialTrace( s1.A, s2.B, i ); cost[i] = INT_MAX; diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 7b43f370ea..7921feab19 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -392,10 +392,10 @@ const VECTOR2I PNS_ROUTER::SnapToItem( PNS_ITEM* item, VECTOR2I aP, bool& aSplit aSplitsSegment = false; - if( (aP - s.a).EuclideanNorm() < w / 2 ) - anchor = s.a; - else if( (aP - s.b).EuclideanNorm() < w / 2 ) - anchor = s.b; + if( ( aP - s.A ).EuclideanNorm() < w / 2 ) + anchor = s.A; + else if( ( aP - s.B ).EuclideanNorm() < w / 2 ) + anchor = s.B; else { anchor = s.NearestPoint( aP ); @@ -559,8 +559,8 @@ void PNS_ROUTER::splitAdjacentSegments( PNS_NODE* aNode, PNS_ITEM* aSeg, const V s_new[0] = s_old->Clone(); s_new[1] = s_old->Clone(); - s_new[0]->SetEnds( s_old->GetSeg().a, aP ); - s_new[1]->SetEnds( aP, s_old->GetSeg().b ); + s_new[0]->SetEnds( s_old->GetSeg().A, aP ); + s_new[1]->SetEnds( aP, s_old->GetSeg().B ); aNode->Remove( s_old ); aNode->Add( s_new[0] ); @@ -598,8 +598,8 @@ void PNS_ROUTER::commitRouting( PNS_NODE* aNode ) TRACK* track = new TRACK( m_board ); const SEG& s = seg->GetSeg(); - track->SetStart( wxPoint( s.a.x, s.a.y ) ); - track->SetEnd( wxPoint( s.b.x, s.b.y ) ); + track->SetStart( wxPoint( s.A.x, s.A.y ) ); + track->SetEnd( wxPoint( s.B.x, s.B.y ) ); track->SetWidth( seg->GetWidth() ); track->SetLayer( seg->GetLayers().Start() ); track->SetNet( seg->GetNet() ); diff --git a/pcbnew/router/pns_segment.h b/pcbnew/router/pns_segment.h index 3c7565aa9c..06ab41dfa0 100644 --- a/pcbnew/router/pns_segment.h +++ b/pcbnew/router/pns_segment.h @@ -44,8 +44,8 @@ public: { m_net = aNet; m_shape.Clear(); - m_shape.Append( aSeg.a ); - m_shape.Append( aSeg.b ); + m_shape.Append( aSeg.A ); + m_shape.Append( aSeg.B ); }; PNS_SEGMENT( const PNS_LINE& aParentLine, const SEG& aSeg ) : @@ -55,8 +55,8 @@ public: m_layers = aParentLine.GetLayers(); m_width = aParentLine.GetWidth(); m_shape.Clear(); - m_shape.Append( aSeg.a ); - m_shape.Append( aSeg.b ); + m_shape.Append( aSeg.A ); + m_shape.Append( aSeg.B ); }; diff --git a/pcbnew/router/pns_shove.cpp b/pcbnew/router/pns_shove.cpp index fd666780ea..ebde946a93 100644 --- a/pcbnew/router/pns_shove.cpp +++ b/pcbnew/router/pns_shove.cpp @@ -128,8 +128,8 @@ bool PNS_SHOVE::tryShove( PNS_NODE* aNode, PNS_LINE* aHead, PNS_LINE* aObstacle, if( aNode->CheckColliding( &hs, aObstacle ) ) { - VECTOR2I v1 = hs.GetSeg().b - hs.GetSeg().a; - VECTOR2I v2 = aObstacleSeg.GetSeg().b - aObstacleSeg.GetSeg().a; + VECTOR2I v1 = hs.GetSeg().B - hs.GetSeg().A; + VECTOR2I v2 = aObstacleSeg.GetSeg().B - aObstacleSeg.GetSeg().A; VECTOR2I::extended_type det = v1.Cross( v2 ); diff --git a/pcbnew/router/pns_walkaround.cpp b/pcbnew/router/pns_walkaround.cpp index 6368a40442..e2a13ac358 100644 --- a/pcbnew/router/pns_walkaround.cpp +++ b/pcbnew/router/pns_walkaround.cpp @@ -196,8 +196,8 @@ PNS_WALKAROUND::WalkaroundStatus PNS_WALKAROUND::Route( const PNS_LINE& aInitial const SEG s = l.Segment( i ); VECTOR2I nearest = s.NearestPoint( m_cursorPos ); - VECTOR2I::extended_type dist_a = ( s.a - m_cursorPos ).SquaredEuclideanNorm(); - VECTOR2I::extended_type dist_b = ( s.b - m_cursorPos ).SquaredEuclideanNorm(); + VECTOR2I::extended_type dist_a = ( s.A - m_cursorPos ).SquaredEuclideanNorm(); + VECTOR2I::extended_type dist_b = ( s.B - m_cursorPos ).SquaredEuclideanNorm(); VECTOR2I::extended_type dist_n = ( nearest - m_cursorPos ).SquaredEuclideanNorm(); if( dist_n <= dist_a && dist_n < dist_b ) diff --git a/pcbnew/router/router_preview_item.cpp b/pcbnew/router/router_preview_item.cpp index 72321aff88..b29caf7322 100644 --- a/pcbnew/router/router_preview_item.cpp +++ b/pcbnew/router/router_preview_item.cpp @@ -127,10 +127,10 @@ void ROUTER_PREVIEW_ITEM::ViewDraw( int aLayer, KIGFX::GAL* aGal ) const aGal->SetIsFill( false ); for( int s = 0; s < m_line.SegmentCount(); s++ ) - aGal->DrawLine( m_line.CSegment( s ).a, m_line.CSegment( s ).b ); + aGal->DrawLine( m_line.CSegment( s ).A, m_line.CSegment( s ).B ); if( m_line.IsClosed() ) - aGal->DrawLine( m_line.CSegment( -1 ).b, m_line.CSegment( 0 ).a ); + aGal->DrawLine( m_line.CSegment( -1 ).B, m_line.CSegment( 0 ).A ); break; case PR_VIA: diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index db92452662..1d97f0c2a4 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -87,7 +87,7 @@ void ROUTER_TOOL::Reset() if( getView() ) m_router->SetView( getView() ); - Go( &ROUTER_TOOL::Main, TOOL_EVENT( TC_Command, TA_Action, GetName() ) ); + Go( &ROUTER_TOOL::Main, TOOL_EVENT( TC_COMMAND, TA_ACTION, GetName() ) ); } @@ -323,7 +323,7 @@ void ROUTER_TOOL::startRouting() updateEndItem( *evt ); m_router->Move( m_endSnapPoint, m_endItem ); } - else if( evt->IsClick( MB_Left ) ) + else if( evt->IsClick( MB_LEFT ) ) { updateEndItem( *evt ); @@ -396,7 +396,7 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) break; // Finish else if( evt->IsMotion() ) updateStartItem( *evt ); - else if( evt->IsClick( MB_Left ) ) + else if( evt->IsClick( MB_LEFT ) ) { updateStartItem( *evt ); startRouting(); diff --git a/pcbnew/tools/item_state.h b/pcbnew/tools/item_state.h index 5708ac122b..61e4e6e767 100644 --- a/pcbnew/tools/item_state.h +++ b/pcbnew/tools/item_state.h @@ -182,7 +182,7 @@ public: * them properly. * @return Flag required to refresh items. */ - KIGFX::VIEW_ITEM::ViewUpdateFlags GetUpdateFlag() const + KIGFX::VIEW_ITEM::VIEW_UPDATE_FLAGS GetUpdateFlag() const { if( m_flips % 2 == 1 ) // If number of flips is odd, then we need to change layers return KIGFX::VIEW_ITEM::LAYERS; diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp index 2164e1cb7e..016b2c4071 100644 --- a/pcbnew/tools/move_tool.cpp +++ b/pcbnew/tools/move_tool.cpp @@ -102,7 +102,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) } // Dispatch TOOL_ACTIONs - else if( evt->Category() == TC_Command ) + else if( evt->Category() == TC_COMMAND ) { VECTOR2D cursorPos = getView()->ToWorld( getViewControls()->GetCursorPosition() ); @@ -118,7 +118,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) } } - else if( evt->IsMotion() || evt->IsDrag( MB_Left ) ) + else if( evt->IsMotion() || evt->IsDrag( MB_LEFT ) ) { if( dragging ) { @@ -143,7 +143,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); dragPosition = evt->Position(); } - else if( evt->IsMouseUp( MB_Left ) || evt->IsClick( MB_Left ) ) + else if( evt->IsMouseUp( MB_LEFT ) || evt->IsClick( MB_LEFT ) ) break; // Finish } diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 9dcc9ed6bf..ca36c73281 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -92,7 +92,7 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) { // Should selected items be added to the current selection or // become the new selection (discarding previously selected items) - m_additive = evt->Modifier( MD_ModShift ); + m_additive = evt->Modifier( MD_SHIFT ); if( evt->IsCancel() ) { @@ -103,11 +103,11 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) } // single click? Select single object - if( evt->IsClick( MB_Left ) ) + if( evt->IsClick( MB_LEFT ) ) selectSingle( evt->Position() ); // drag with LMB? Select multiple objects (or at least draw a selection box) or drag them - if( evt->IsDrag( MB_Left ) ) + if( evt->IsDrag( MB_LEFT ) ) { if( m_selection.Empty() || m_additive ) { @@ -299,7 +299,7 @@ bool SELECTION_TOOL::selectMultiple() break; } - if( evt->IsDrag( MB_Left ) ) + if( evt->IsDrag( MB_LEFT ) ) { if( !m_additive ) clearSelection(); @@ -311,17 +311,17 @@ bool SELECTION_TOOL::selectMultiple() m_selArea->ViewUpdate( VIEW_ITEM::GEOMETRY ); } - if( evt->IsMouseUp( MB_Left ) ) + if( evt->IsMouseUp( MB_LEFT ) ) { // End drawing the selection box m_selArea->ViewSetVisible( false ); // Mark items within the selection box as selected - std::vector selectedItems; + std::vector selectedItems; BOX2I selectionBox = m_selArea->ViewBBox(); view->Query( selectionBox, selectedItems ); // Get the list of selected items - std::vector::iterator it, it_end; + std::vector::iterator it, it_end; for( it = selectedItems.begin(), it_end = selectedItems.end(); it != it_end; ++it ) { @@ -369,7 +369,7 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) while( OPT_TOOL_EVENT evt = Wait() ) { - if( evt->Action() == TA_ContextMenuUpdate ) + if( evt->Action() == TA_CONTEXT_MENU_UPDATE ) { if( current ) current->ClearBrightened(); @@ -385,7 +385,7 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector ) else current = NULL; } - else if( evt->Action() == TA_ContextMenuChoice ) + else if( evt->Action() == TA_CONTEXT_MENU_CHOICE ) { optional id = evt->GetCommandId(); From 4bf49bf6a6c2fd6743ab99098355edb1880bb21f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 15 Oct 2013 10:41:00 +0200 Subject: [PATCH 405/415] Renamed TOOL_MOUSE_BUTTONS constants to avoid name conflict with Windows MB_RIGHT constant. --- common/tool/tool_dispatcher.cpp | 6 +++--- common/tool/tool_event.cpp | 8 ++++---- common/tool/tool_manager.cpp | 2 +- include/tool/tool_event.h | 20 ++++++++++---------- include/tool/tool_interactive.h | 8 ++++---- pcbnew/router/router_tool.cpp | 4 ++-- pcbnew/tools/move_tool.cpp | 4 ++-- pcbnew/tools/selection_tool.cpp | 8 ++++---- 8 files changed, 30 insertions(+), 30 deletions(-) diff --git a/common/tool/tool_dispatcher.cpp b/common/tool/tool_dispatcher.cpp index 71c0998b6d..49ab4382ac 100644 --- a/common/tool/tool_dispatcher.cpp +++ b/common/tool/tool_dispatcher.cpp @@ -89,9 +89,9 @@ struct TOOL_DISPATCHER::BUTTON_STATE TOOL_DISPATCHER::TOOL_DISPATCHER( TOOL_MANAGER* aToolMgr, PCB_BASE_FRAME* aEditFrame ) : m_toolMgr( aToolMgr ), m_editFrame( aEditFrame ) { - m_buttons.push_back( new BUTTON_STATE( MB_LEFT, wxEVT_LEFT_DOWN, wxEVT_LEFT_UP ) ); - m_buttons.push_back( new BUTTON_STATE( MB_RIGHT, wxEVT_RIGHT_DOWN, wxEVT_RIGHT_UP ) ); - m_buttons.push_back( new BUTTON_STATE( MB_MIDDLE, wxEVT_MIDDLE_DOWN, wxEVT_MIDDLE_UP ) ); + m_buttons.push_back( new BUTTON_STATE( BUT_LEFT, wxEVT_LEFT_DOWN, wxEVT_LEFT_UP ) ); + m_buttons.push_back( new BUTTON_STATE( BUT_RIGHT, wxEVT_RIGHT_DOWN, wxEVT_RIGHT_UP ) ); + m_buttons.push_back( new BUTTON_STATE( BUT_MIDDLE, wxEVT_MIDDLE_DOWN, wxEVT_MIDDLE_UP ) ); ResetState(); } diff --git a/common/tool/tool_event.cpp b/common/tool/tool_event.cpp index b064b87624..15ae3314e7 100644 --- a/common/tool/tool_event.cpp +++ b/common/tool/tool_event.cpp @@ -98,10 +98,10 @@ const std::string TOOL_EVENT::Format() const const FlagString buttons[] = { - { MB_NONE, "none" }, - { MB_LEFT, "left" }, - { MB_RIGHT, "right" }, - { MB_MIDDLE, "middle" }, + { BUT_NONE, "none" }, + { BUT_LEFT, "left" }, + { BUT_RIGHT, "right" }, + { BUT_MIDDLE, "middle" }, { 0, "" } }; diff --git a/common/tool/tool_manager.cpp b/common/tool/tool_manager.cpp index 0604aa80f3..02019f25ef 100644 --- a/common/tool/tool_manager.cpp +++ b/common/tool/tool_manager.cpp @@ -433,7 +433,7 @@ bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent ) // or immediately (CMENU_NOW) mode. The latter is used for clarification lists. if( st->contextMenuTrigger != CMENU_OFF ) { - if( st->contextMenuTrigger == CMENU_BUTTON && !aEvent.IsClick( MB_RIGHT ) ) + if( st->contextMenuTrigger == CMENU_BUTTON && !aEvent.IsClick( BUT_RIGHT ) ) break; st->pendingWait = true; diff --git a/include/tool/tool_event.h b/include/tool/tool_event.h index 33f512b668..44cb4379cd 100644 --- a/include/tool/tool_event.h +++ b/include/tool/tool_event.h @@ -93,12 +93,12 @@ enum TOOL_ACTIONS enum TOOL_MOUSE_BUTTONS { - MB_NONE = 0x0, - MB_LEFT = 0x1, - MB_RIGHT = 0x2, - MB_MIDDLE = 0x4, - MB_BUTTON_MASK = MB_LEFT | MB_RIGHT | MB_MIDDLE, - MB_ANY = 0xffffffff + BUT_NONE = 0x0, + BUT_LEFT = 0x1, + BUT_RIGHT = 0x2, + BUT_MIDDLE = 0x4, + BUT_BUTTON_MASK = BUT_LEFT | BUT_RIGHT | BUT_MIDDLE, + BUT_ANY = 0xffffffff }; enum TOOL_MODIFIERS @@ -158,7 +158,7 @@ public: { if( aCategory == TC_MOUSE ) { - m_mouseButtons = aExtraParam & MB_BUTTON_MASK; + m_mouseButtons = aExtraParam & BUT_BUTTON_MASK; } else if( aCategory == TC_KEYBOARD ) { @@ -227,18 +227,18 @@ public: return m_mouseButtons; } - bool IsClick( int aButtonMask = MB_ANY ) const + bool IsClick( int aButtonMask = BUT_ANY ) const { return ( m_actions == TA_MOUSE_CLICK ) && ( ( m_mouseButtons & aButtonMask ) == aButtonMask ); } - bool IsDrag( int aButtonMask = MB_ANY ) const + bool IsDrag( int aButtonMask = BUT_ANY ) const { return ( m_actions == TA_MOUSE_DRAG ) && ( ( m_mouseButtons & aButtonMask ) == aButtonMask ); } - bool IsMouseUp( int aButtonMask = MB_ANY ) const + bool IsMouseUp( int aButtonMask = BUT_ANY ) const { return ( m_actions == TA_MOUSE_UP ) && ( ( m_mouseButtons & aButtonMask ) == aButtonMask ); } diff --git a/include/tool/tool_interactive.h b/include/tool/tool_interactive.h index d66b17ae05..855f84af5c 100644 --- a/include/tool/tool_interactive.h +++ b/include/tool/tool_interactive.h @@ -111,10 +111,10 @@ protected: const TOOL_EVENT evCommand( int aCommandId = -1 ); const TOOL_EVENT evCommand( std::string aCommandStr = "" ); const TOOL_EVENT evMotion(); - const TOOL_EVENT evClick( int aButton = MB_ANY ); - const TOOL_EVENT evDrag( int aButton = MB_ANY ); - const TOOL_EVENT evButtonUp( int aButton = MB_ANY ); - const TOOL_EVENT evButtonDown(int aButton = MB_ANY ); + const TOOL_EVENT evClick( int aButton = BUT_ANY ); + const TOOL_EVENT evDrag( int aButton = BUT_ANY ); + const TOOL_EVENT evButtonUp( int aButton = BUT_ANY ); + const TOOL_EVENT evButtonDown(int aButton = BUT_ANY ); private: void goInternal( TOOL_STATE_FUNC& aState, const TOOL_EVENT_LIST& aConditions ); diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 1d97f0c2a4..d85b1470ae 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -323,7 +323,7 @@ void ROUTER_TOOL::startRouting() updateEndItem( *evt ); m_router->Move( m_endSnapPoint, m_endItem ); } - else if( evt->IsClick( MB_LEFT ) ) + else if( evt->IsClick( BUT_LEFT ) ) { updateEndItem( *evt ); @@ -396,7 +396,7 @@ int ROUTER_TOOL::Main( TOOL_EVENT& aEvent ) break; // Finish else if( evt->IsMotion() ) updateStartItem( *evt ); - else if( evt->IsClick( MB_LEFT ) ) + else if( evt->IsClick( BUT_LEFT ) ) { updateStartItem( *evt ); startRouting(); diff --git a/pcbnew/tools/move_tool.cpp b/pcbnew/tools/move_tool.cpp index 016b2c4071..6eaea40418 100644 --- a/pcbnew/tools/move_tool.cpp +++ b/pcbnew/tools/move_tool.cpp @@ -118,7 +118,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) } } - else if( evt->IsMotion() || evt->IsDrag( MB_LEFT ) ) + else if( evt->IsMotion() || evt->IsDrag( BUT_LEFT ) ) { if( dragging ) { @@ -143,7 +143,7 @@ int MOVE_TOOL::Main( TOOL_EVENT& aEvent ) selection.group->ViewUpdate( VIEW_ITEM::GEOMETRY ); dragPosition = evt->Position(); } - else if( evt->IsMouseUp( MB_LEFT ) || evt->IsClick( MB_LEFT ) ) + else if( evt->IsMouseUp( BUT_LEFT ) || evt->IsClick( BUT_LEFT ) ) break; // Finish } diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index ca36c73281..45523ab76a 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -103,11 +103,11 @@ int SELECTION_TOOL::Main( TOOL_EVENT& aEvent ) } // single click? Select single object - if( evt->IsClick( MB_LEFT ) ) + if( evt->IsClick( BUT_LEFT ) ) selectSingle( evt->Position() ); // drag with LMB? Select multiple objects (or at least draw a selection box) or drag them - if( evt->IsDrag( MB_LEFT ) ) + if( evt->IsDrag( BUT_LEFT ) ) { if( m_selection.Empty() || m_additive ) { @@ -299,7 +299,7 @@ bool SELECTION_TOOL::selectMultiple() break; } - if( evt->IsDrag( MB_LEFT ) ) + if( evt->IsDrag( BUT_LEFT ) ) { if( !m_additive ) clearSelection(); @@ -311,7 +311,7 @@ bool SELECTION_TOOL::selectMultiple() m_selArea->ViewUpdate( VIEW_ITEM::GEOMETRY ); } - if( evt->IsMouseUp( MB_LEFT ) ) + if( evt->IsMouseUp( BUT_LEFT ) ) { // End drawing the selection box m_selArea->ViewSetVisible( false ); From 68e3516075ef16e66f5a1cb96376e22192f6eeb3 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 15 Oct 2013 15:15:29 +0200 Subject: [PATCH 406/415] Hides the GAL subwindow in cvpcb module view frame. --- cvpcb/class_DisplayFootprintsFrame.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cvpcb/class_DisplayFootprintsFrame.cpp b/cvpcb/class_DisplayFootprintsFrame.cpp index 4d4a1e6f74..c2f075d4a2 100644 --- a/cvpcb/class_DisplayFootprintsFrame.cpp +++ b/cvpcb/class_DisplayFootprintsFrame.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -121,7 +122,7 @@ DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( CVPCB_MAINFRAME* parent, EDA_PANEINFO mesg; mesg.MessageToolbarPane(); - + m_galCanvas->Hide(); m_auimgr.AddPane( m_mainToolBar, wxAuiPaneInfo( horiz ).Name( wxT( "m_mainToolBar" ) ).Top(). Row( 0 ) ); From cdd2967087e3c84638e3ab3ac729b31318daf9ca Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 24 Oct 2013 18:44:38 +0200 Subject: [PATCH 407/415] Add a DXF file import to create board outlines --- CMakeLists.txt | 1 + lib_dxf/CMakeLists.txt | 12 + lib_dxf/drw_base.h | 473 + lib_dxf/drw_entities.cpp | 1429 ++ lib_dxf/drw_entities.h | 1300 ++ lib_dxf/drw_interface.h | 223 + lib_dxf/drw_objects.cpp | 1315 ++ lib_dxf/drw_objects.h | 680 + lib_dxf/intern/drw_cptable932.h | 7812 ++++++++ lib_dxf/intern/drw_cptable936.h | 21943 ++++++++++++++++++++++ lib_dxf/intern/drw_cptable949.h | 17199 +++++++++++++++++ lib_dxf/intern/drw_cptable950.h | 13654 ++++++++++++++ lib_dxf/intern/drw_cptables.h | 1330 ++ lib_dxf/intern/drw_textcodec.cpp | 498 + lib_dxf/intern/drw_textcodec.h | 84 + lib_dxf/intern/dxfreader.cpp | 263 + lib_dxf/intern/dxfreader.h | 89 + lib_dxf/intern/dxfwriter.cpp | 281 + lib_dxf/intern/dxfwriter.h | 64 + lib_dxf/libdxfrw.cpp | 3818 ++++ lib_dxf/libdxfrw.h | 143 + pcbnew/CMakeLists.txt | 10 + pcbnew/edit.cpp | 8 +- pcbnew/import_dxf/dialog_dxf_import.cpp | 29 + pcbnew/import_dxf/dxf2brd_items.cpp | 557 + pcbnew/import_dxf/dxf2brd_items.h | 155 + pcbnew/invoke_pcb_dialog.h | 15 +- pcbnew/menubar_pcbframe.cpp | 5 + pcbnew/pcbframe.cpp | 1 + pcbnew/pcbnew_id.h | 1 + 30 files changed, 73388 insertions(+), 4 deletions(-) create mode 100644 lib_dxf/CMakeLists.txt create mode 100644 lib_dxf/drw_base.h create mode 100644 lib_dxf/drw_entities.cpp create mode 100644 lib_dxf/drw_entities.h create mode 100644 lib_dxf/drw_interface.h create mode 100644 lib_dxf/drw_objects.cpp create mode 100644 lib_dxf/drw_objects.h create mode 100644 lib_dxf/intern/drw_cptable932.h create mode 100644 lib_dxf/intern/drw_cptable936.h create mode 100644 lib_dxf/intern/drw_cptable949.h create mode 100644 lib_dxf/intern/drw_cptable950.h create mode 100644 lib_dxf/intern/drw_cptables.h create mode 100644 lib_dxf/intern/drw_textcodec.cpp create mode 100644 lib_dxf/intern/drw_textcodec.h create mode 100644 lib_dxf/intern/dxfreader.cpp create mode 100644 lib_dxf/intern/dxfreader.h create mode 100644 lib_dxf/intern/dxfwriter.cpp create mode 100644 lib_dxf/intern/dxfwriter.h create mode 100644 lib_dxf/libdxfrw.cpp create mode 100644 lib_dxf/libdxfrw.h create mode 100644 pcbnew/import_dxf/dialog_dxf_import.cpp create mode 100644 pcbnew/import_dxf/dxf2brd_items.cpp create mode 100644 pcbnew/import_dxf/dxf2brd_items.h diff --git a/CMakeLists.txt b/CMakeLists.txt index cd80fd5c94..296008fff7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -360,6 +360,7 @@ add_subdirectory( cvpcb ) add_subdirectory( eeschema ) add_subdirectory( gerbview ) add_subdirectory( kicad ) +add_subdirectory( lib_dxf ) add_subdirectory( pcbnew ) add_subdirectory( polygon ) add_subdirectory( pagelayout_editor ) diff --git a/lib_dxf/CMakeLists.txt b/lib_dxf/CMakeLists.txt new file mode 100644 index 0000000000..1a729823e2 --- /dev/null +++ b/lib_dxf/CMakeLists.txt @@ -0,0 +1,12 @@ +include_directories(intern) + +set(LIBDXF_SRCS + libdxfrw.cpp + intern/dxfwriter.cpp + intern/drw_textcodec.cpp + intern/dxfreader.cpp + drw_objects.cpp + drw_entities.cpp + ) + +add_library(lib_dxf STATIC ${LIBDXF_SRCS}) diff --git a/lib_dxf/drw_base.h b/lib_dxf/drw_base.h new file mode 100644 index 0000000000..0be3367524 --- /dev/null +++ b/lib_dxf/drw_base.h @@ -0,0 +1,473 @@ +/****************************************************************************** +** libDXFrw - Library to read/write DXF files (ascii & binary) ** +** ** +** Copyright (C) 2011 Rallaz, rallazz@gmail.com ** +** ** +** This library is free software, licensed under the terms of the GNU ** +** General Public License as published by the Free Software Foundation, ** +** either version 2 of the License, or (at your option) any later version. ** +** You should have received a copy of the GNU General Public License ** +** along with this program. If not, see . ** +******************************************************************************/ + +#ifndef DRW_BASE_H +#define DRW_BASE_H + +#define DRW_VERSION "0.5.10" + +#include +#include + +using std::string; + +#define UTF8STRING std::string +#define DRW_UNUSED( x ) (void) x + +#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__) +# define DRW_WIN +#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) +# define DRW_WIN +#elif defined(__MWERKS__) && defined(__INTEL__) +# define DRW_WIN +#else +# define DRW_POSIX +#endif + +#ifndef M_PI + #define M_PI 3.141592653589793238462643 +#endif +#ifndef M_PI_2 + #define M_PI_2 1.57079632679489661923 +#endif +#define M_PIx2 6.283185307179586 // 2*PI +#define ARAD 57.29577951308232 + +namespace DRW { +// ! Version numbers for the DXF Format. +enum Version { + UNKNOWNV, /*!< UNKNOWN VERSION. */ + AC1006, /*!< R10. */ + AC1009, /*!< R11 & R12. */ + AC1012, /*!< R13. */ + AC1014, /*!< R14. */ + AC1015, /*!< ACAD 2000. */ + AC1018, /*!< ACAD 2004. */ + AC1021, /*!< ACAD 2007. */ + AC1024 /*!< ACAD 2010. */ +}; + +enum error { + BAD_NONE, /*!< No error. */ + BAD_UNKNOWN, /*!< UNKNOWN. */ + BAD_OPEN, /*!< error opening file. */ + BAD_VERSION, /*!< unsupported version. */ + BAD_READ_FILE_HEADER, /*!< error in file header read process. */ + BAD_READ_HEADER, /*!< error in header vars read process. */ + BAD_READ_OFFSETS, /*!< error in object map read process. */ + BAD_READ_CLASSES, /*!< error in classes read process. */ + BAD_READ_TABLES, /*!< error in tables read process. */ + BAD_READ_ENTITIES /*!< error in entities read process. */ +}; +} + +// ! Class to handle 3D coordinate point +/*! + * Class to handle 3D coordinate point + * @author Rallaz + */ +class DRW_Coord +{ +public: + DRW_Coord() { x = 0; y = 0; z = 0; } + DRW_Coord( double ix, double iy, double iz ) + { + x = ix; y = iy; z = iz; + } + + DRW_Coord operator =( const DRW_Coord& data ) + { + x = data.x; y = data.y; z = data.z; + return *this; + } + +/*!< convert to unitary vector */ + void unitize() + { + double dist; + + dist = sqrt( x * x + y * y + z * z ); + + if( dist > 0.0 ) + { + x = x / dist; + y = y / dist; + z = z / dist; + } + } + +public: + double x; + double y; + double z; +}; + + +// ! Class to handle vertex +/*! + * Class to handle vertex for lwpolyline entity + * @author Rallaz + */ +class DRW_Vertex2D +{ +public: + DRW_Vertex2D() + { +// eType = DRW::LWPOLYLINE; + stawidth = endwidth = bulge = 0; + } + + DRW_Vertex2D( double sx, double sy, double b ) + { + stawidth = endwidth = 0; + x = sx; + y = sy; + bulge = b; + } + +public: + double x; /*!< x coordinate, code 10 */ + double y; /*!< y coordinate, code 20 */ + double stawidth; /*!< Start width, code 40 */ + double endwidth; /*!< End width, code 41 */ + double bulge; /*!< bulge, code 42 */ +}; + + +// ! Class to handle header vars +/*! + * Class to handle header vars + * @author Rallaz + */ +class DRW_Variant +{ +public: + enum TYPE { + STRING, + INTEGER, + DOUBLE, + COORD, + INVALID + }; + + DRW_Variant() + { + type = INVALID; + } + + ~DRW_Variant() + { + if( type == COORD ) + delete content.v; + } + + enum TYPE type; + + void addString( UTF8STRING s ) { setType( STRING ); data = s; content.s = &data; } + void addInt( int i ) { setType( INTEGER ); content.i = i; } + void addDouble( double d ) { setType( DOUBLE ); content.d = d; } + void addCoord( DRW_Coord* v ) { setType( COORD ); content.v = v; } + void setType( enum TYPE t ) + { + if( type == COORD ) + delete content.v; + + type = t; + } + + void setCoordX( double d ) { if( type == COORD ) content.v->x = d; } + void setCoordY( double d ) { if( type == COORD ) content.v->y = d; } + void setCoordZ( double d ) { if( type == COORD ) content.v->z = d; } +private: + typedef union + { + UTF8STRING* s; + int i; + double d; + DRW_Coord* v; + } DRW_VarContent; +public: + DRW_VarContent content; +public: + int code; +// string version; +// string codepage; +private: +// DRW_VarContent content; + string data; +}; + + +// ! Class to convert between line width and integer +/*! + * Class to convert between line width and integer + * verifing valid values, if value is not valid + * returns widthDefault. + * @author Rallaz + */ +class DRW_LW_Conv +{ +public: + enum lineWidth { + width00 = 0, /*!< 0.00mm (dxf 0)*/ + width01 = 1, /*!< 0.05mm (dxf 5)*/ + width02 = 2, /*!< 0.09mm (dxf 9)*/ + width03 = 3, /*!< 0.13mm (dxf 13)*/ + width04 = 4, /*!< 0.15mm (dxf 15)*/ + width05 = 5, /*!< 0.18mm (dxf 18)*/ + width06 = 6, /*!< 0.20mm (dxf 20)*/ + width07 = 7, /*!< 0.25mm (dxf 25)*/ + width08 = 8, /*!< 0.30mm (dxf 30)*/ + width09 = 9, /*!< 0.35mm (dxf 35)*/ + width10 = 10, /*!< 0.40mm (dxf 40)*/ + width11 = 11, /*!< 0.50mm (dxf 50)*/ + width12 = 12, /*!< 0.53mm (dxf 53)*/ + width13 = 13, /*!< 0.60mm (dxf 60)*/ + width14 = 14, /*!< 0.70mm (dxf 70)*/ + width15 = 15, /*!< 0.80mm (dxf 80)*/ + width16 = 16, /*!< 0.90mm (dxf 90)*/ + width17 = 17, /*!< 1.00mm (dxf 100)*/ + width18 = 18, /*!< 1.06mm (dxf 106)*/ + width19 = 19, /*!< 1.20mm (dxf 120)*/ + width20 = 20, /*!< 1.40mm (dxf 140)*/ + width21 = 21, /*!< 1.58mm (dxf 158)*/ + width22 = 22, /*!< 2.00mm (dxf 200)*/ + width23 = 23, /*!< 2.11mm (dxf 211)*/ + widthByLayer = 29, /*!< by layer (dxf -1) */ + widthByBlock = 30, /*!< by block (dxf -2) */ + widthDefault = 31 /*!< by default (dxf -3) */ + }; + + static int lineWidth2dxfInt( enum lineWidth lw ) + { + switch( lw ) + { + case widthByLayer: + return -1; + + case widthByBlock: + return -2; + + case widthDefault: + return -3; + + case width00: + return 0; + + case width01: + return 5; + + case width02: + return 9; + + case width03: + return 13; + + case width04: + return 15; + + case width05: + return 18; + + case width06: + return 20; + + case width07: + return 25; + + case width08: + return 30; + + case width09: + return 35; + + case width10: + return 40; + + case width11: + return 50; + + case width12: + return 53; + + case width13: + return 60; + + case width14: + return 70; + + case width15: + return 80; + + case width16: + return 90; + + case width17: + return 100; + + case width18: + return 106; + + case width19: + return 120; + + case width20: + return 140; + + case width21: + return 158; + + case width22: + return 200; + + case width23: + return 211; + + default: + return -3; + } + + return static_cast (lw); + } + + static int lineWidth2dwgInt( enum lineWidth lw ) + { + return static_cast (lw); + } + + static enum lineWidth dxfInt2lineWidth( int i ) + { + if( i<0 ) + { + if( i==-1 ) + return widthByLayer; + else if( i==-2 ) + return widthByBlock; + else if( i==-3 ) + return widthDefault; + } + else if( i<3 ) + { + return width00; + } + else if( i<7 ) + { + return width01; + } + else if( i<11 ) + { + return width02; + } + else if( i<14 ) + { + return width03; + } + else if( i<16 ) + { + return width04; + } + else if( i<19 ) + { + return width05; + } + else if( i<22 ) + { + return width06; + } + else if( i<27 ) + { + return width07; + } + else if( i<32 ) + { + return width08; + } + else if( i<37 ) + { + return width09; + } + else if( i<45 ) + { + return width10; + } + else if( i<52 ) + { + return width11; + } + else if( i<57 ) + { + return width12; + } + else if( i<65 ) + { + return width13; + } + else if( i<75 ) + { + return width14; + } + else if( i<85 ) + { + return width15; + } + else if( i<95 ) + { + return width16; + } + else if( i<103 ) + { + return width17; + } + else if( i<112 ) + { + return width18; + } + else if( i<130 ) + { + return width19; + } + else if( i<149 ) + { + return width20; + } + else if( i<180 ) + { + return width21; + } + else if( i<205 ) + { + return width22; + } + else + { + return width23; + } + + // default by default + return widthDefault; + } + + static enum lineWidth dwgInt2lineWidth( int i ) + { + if( (i>-1 && i<24) || (i>28 && i<32) ) + { + return static_cast (i); + } + + // default by default + return widthDefault; + } +}; + +#endif + +// EOF diff --git a/lib_dxf/drw_entities.cpp b/lib_dxf/drw_entities.cpp new file mode 100644 index 0000000000..93107e9ba7 --- /dev/null +++ b/lib_dxf/drw_entities.cpp @@ -0,0 +1,1429 @@ +/****************************************************************************** +** libDXFrw - Library to read/write DXF files (ascii & binary) ** +** ** +** Copyright (C) 2011 Rallaz, rallazz@gmail.com ** +** ** +** This library is free software, licensed under the terms of the GNU ** +** General Public License as published by the Free Software Foundation, ** +** either version 2 of the License, or (at your option) any later version. ** +** You should have received a copy of the GNU General Public License ** +** along with this program. If not, see . ** +******************************************************************************/ + +#include +#include "drw_entities.h" +#include "intern/dxfreader.h" + + +// ! Calculate arbitary axis +/*! + * Calculate arbitary axis for apply extrusions + * @author Rallaz + */ +void DRW_Entity::calculateAxis( DRW_Coord extPoint ) +{ + if( fabs( extPoint.x ) < 0.015625 && fabs( extPoint.y ) < 0.015625 ) + { + extAxisX.x = extPoint.z; + extAxisX.y = 0; + extAxisX.z = -extPoint.x; + } + else + { + extAxisX.x = -extPoint.y; + extAxisX.y = extPoint.x; + extAxisX.z = 0; + } + + extAxisX.unitize(); + extAxisY.x = (extPoint.y * extAxisX.z) - (extAxisX.y * extPoint.z); + extAxisY.y = (extPoint.z * extAxisX.x) - (extAxisX.z * extPoint.x); + extAxisY.z = (extPoint.x * extAxisX.y) - (extAxisX.x * extPoint.y); + extAxisY.unitize(); +} + + +// ! Extrude a point using arbitary axis +/*! + * apply extrusion in a point using arbitary axis (previous calculated) + * @author Rallaz + */ +void DRW_Entity::extrudePoint( DRW_Coord extPoint, DRW_Coord* point ) +{ + double px, py, pz; + + px = (extAxisX.x * point->x) + (extAxisY.x * point->y) + (extPoint.x * point->z); + py = (extAxisX.y * point->x) + (extAxisY.y * point->y) + (extPoint.y * point->z); + pz = (extAxisX.z * point->x) + (extAxisY.z * point->y) + (extPoint.z * point->z); + + point->x = px; + point->y = py; + point->z = pz; +} + + +void DRW_Entity::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 5: + handle = reader->getHandleString(); + break; + + case 330: + handleBlock = reader->getHandleString(); + break; + + case 8: + layer = reader->getUtf8String(); + break; + + case 6: + lineType = reader->getUtf8String(); + break; + + case 62: + color = reader->getInt32(); + break; + + case 370: + lWeight = DRW_LW_Conv::dxfInt2lineWidth( reader->getInt32() ); + break; + + case 48: + ltypeScale = reader->getDouble(); + break; + + case 60: + visible = reader->getBool(); + break; + + case 420: + color24 = reader->getInt32(); + break; + + case 430: + colorName = reader->getString(); + break; + + case 67: + space = reader->getInt32(); + break; + + default: + break; + } +} + + +void DRW_Point::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 10: + basePoint.x = reader->getDouble(); + break; + + case 20: + basePoint.y = reader->getDouble(); + break; + + case 30: + basePoint.z = reader->getDouble(); + break; + + case 39: + thickness = reader->getDouble(); + break; + + case 210: + haveExtrusion = true; + extPoint.x = reader->getDouble(); + break; + + case 220: + extPoint.y = reader->getDouble(); + break; + + case 230: + extPoint.z = reader->getDouble(); + break; + + default: + DRW_Entity::parseCode( code, reader ); + break; + } +} + + +void DRW_Line::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 11: + secPoint.x = reader->getDouble(); + break; + + case 21: + secPoint.y = reader->getDouble(); + break; + + case 31: + secPoint.z = reader->getDouble(); + break; + + default: + DRW_Point::parseCode( code, reader ); + break; + } +} + + +void DRW_Circle::applyExtrusion() +{ + if( haveExtrusion ) + { + calculateAxis( extPoint ); + extrudePoint( extPoint, &basePoint ); + } +} + + +void DRW_Circle::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 40: + radious = reader->getDouble(); + break; + + default: + DRW_Point::parseCode( code, reader ); + break; + } +} + + +void DRW_Arc::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 50: + staangle = reader->getDouble() / ARAD; + break; + + case 51: + endangle = reader->getDouble() / ARAD; + break; + + default: + DRW_Circle::parseCode( code, reader ); + break; + } +} + + +void DRW_Ellipse::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 40: + ratio = reader->getDouble(); + break; + + case 41: + staparam = reader->getDouble(); + break; + + case 42: + endparam = reader->getDouble(); + break; + + default: + DRW_Line::parseCode( code, reader ); + break; + } +} + + +void DRW_Ellipse::applyExtrusion() +{ + if( haveExtrusion ) + { + calculateAxis( extPoint ); + extrudePoint( extPoint, &secPoint ); + double intialparam = staparam; + + if( extPoint.z < 0. ) + { + staparam = M_PIx2 - endparam; + endparam = M_PIx2 - intialparam; + } + } +} + + +// if ratio > 1 minor axis are greather than major axis, correct it +void DRW_Ellipse::correctAxis() +{ + bool complete = false; + + if( staparam == endparam ) + { + staparam = 0.0; + endparam = M_PIx2; // 2*M_PI; + complete = true; + } + + if( ratio > 1 ) + { + if( fabs( endparam - staparam - M_PIx2 ) < 1.0e-10 ) + complete = true; + + double incX = secPoint.x; + secPoint.x = -(secPoint.y * ratio); + secPoint.y = incX * ratio; + ratio = 1 / ratio; + + if( !complete ) + { + if( staparam < M_PI_2 ) + staparam += M_PI * 2; + + if( endparam < M_PI_2 ) + endparam += M_PI * 2; + + endparam -= M_PI_2; + staparam -= M_PI_2; + } + } +} + + +// parts are the number of vertex to split polyline, default 128 +void DRW_Ellipse::toPolyline( DRW_Polyline* pol, int parts ) +{ + double radMajor, radMinor, cosRot, sinRot, incAngle, curAngle; + double cosCurr, sinCurr; + + radMajor = sqrt( secPoint.x * secPoint.x + secPoint.y * secPoint.y ); + radMinor = radMajor * ratio; + // calculate sin & cos of included angle + incAngle = atan2( secPoint.y, secPoint.x ); + cosRot = cos( incAngle ); + sinRot = sin( incAngle ); + incAngle = M_PIx2 / parts; + curAngle = staparam; + int i = curAngle / incAngle; + + do { + if( curAngle > endparam ) + { + curAngle = endparam; + i = parts + 2; + } + + cosCurr = cos( curAngle ); + sinCurr = sin( curAngle ); + double x = basePoint.x + (cosCurr * cosRot * radMajor) - (sinCurr * sinRot * radMinor); + double y = basePoint.y + (cosCurr * sinRot * radMajor) + (sinCurr * cosRot * radMinor); + pol->addVertex( DRW_Vertex( x, y, 0.0, 0.0 ) ); + curAngle = (++i) * incAngle; + } while( iflags = 1; + } + + pol->layer = this->layer; + pol->lineType = this->lineType; + pol->color = this->color; + pol->lWeight = this->lWeight; + pol->extPoint = this->extPoint; +} + + +void DRW_Trace::applyExtrusion() +{ + if( haveExtrusion ) + { + calculateAxis( extPoint ); + extrudePoint( extPoint, &basePoint ); + extrudePoint( extPoint, &secPoint ); + extrudePoint( extPoint, &thirdPoint ); + extrudePoint( extPoint, &fourPoint ); + } +} + + +void DRW_Trace::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 12: + thirdPoint.x = reader->getDouble(); + break; + + case 22: + thirdPoint.y = reader->getDouble(); + break; + + case 32: + thirdPoint.z = reader->getDouble(); + break; + + case 13: + fourPoint.x = reader->getDouble(); + break; + + case 23: + fourPoint.y = reader->getDouble(); + break; + + case 33: + fourPoint.z = reader->getDouble(); + break; + + default: + DRW_Line::parseCode( code, reader ); + break; + } +} + + +void DRW_Solid::parseCode( int code, dxfReader* reader ) +{ + DRW_Trace::parseCode( code, reader ); +} + + +void DRW_3Dface::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 70: + invisibleflag = reader->getInt32(); + break; + + default: + DRW_Trace::parseCode( code, reader ); + break; + } +} + + +void DRW_Block::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 2: + name = reader->getUtf8String(); + break; + + case 70: + flags = reader->getInt32(); + break; + + default: + DRW_Point::parseCode( code, reader ); + break; + } +} + + +void DRW_Insert::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 2: + name = reader->getUtf8String(); + break; + + case 41: + xscale = reader->getDouble(); + break; + + case 42: + yscale = reader->getDouble(); + break; + + case 43: + zscale = reader->getDouble(); + break; + + case 50: + angle = reader->getDouble(); + break; + + case 70: + colcount = reader->getInt32(); + break; + + case 71: + rowcount = reader->getInt32(); + break; + + case 44: + colspace = reader->getDouble(); + break; + + case 45: + rowspace = reader->getDouble(); + break; + + default: + DRW_Point::parseCode( code, reader ); + break; + } +} + + +void DRW_LWPolyline::applyExtrusion() +{ + if( haveExtrusion ) + { + calculateAxis( extPoint ); + + for( unsigned int i = 0; ix, vert->y, elevation ); + extrudePoint( extPoint, &v ); + vert->x = v.x; + vert->y = v.y; + } + } +} + + +void DRW_LWPolyline::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 10: + { + vertex = new DRW_Vertex2D(); + vertlist.push_back( vertex ); + vertex->x = reader->getDouble(); + break; + } + + case 20: + + if( vertex != NULL ) + vertex->y = reader->getDouble(); + + break; + + case 40: + + if( vertex != NULL ) + vertex->stawidth = reader->getDouble(); + + break; + + case 41: + + if( vertex != NULL ) + vertex->endwidth = reader->getDouble(); + + break; + + case 42: + + if( vertex != NULL ) + vertex->bulge = reader->getDouble(); + + break; + + case 38: + elevation = reader->getDouble(); + break; + + case 39: + thickness = reader->getDouble(); + break; + + case 43: + width = reader->getDouble(); + break; + + case 70: + flags = reader->getInt32(); + break; + + case 90: + vertexnum = reader->getInt32(); + vertlist.reserve( vertexnum ); + break; + + case 210: + haveExtrusion = true; + extPoint.x = reader->getDouble(); + break; + + case 220: + extPoint.y = reader->getDouble(); + break; + + case 230: + extPoint.z = reader->getDouble(); + break; + + default: + DRW_Entity::parseCode( code, reader ); + break; + } +} + + +void DRW_Text::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 40: + height = reader->getDouble(); + break; + + case 41: + widthscale = reader->getDouble(); + break; + + case 50: + angle = reader->getDouble(); + break; + + case 51: + oblique = reader->getDouble(); + break; + + case 71: + textgen = reader->getInt32(); + break; + + case 72: + alignH = (HAlign) reader->getInt32(); + break; + + case 73: + alignV = (VAlign) reader->getInt32(); + break; + + case 1: + text = reader->getUtf8String(); + break; + + case 7: + style = reader->getUtf8String(); + break; + + default: + DRW_Line::parseCode( code, reader ); + break; + } +} + + +void DRW_MText::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 1: + text += reader->getString(); + text = reader->toUtf8String( text ); + break; + + case 11: + haveXAxis = true; + DRW_Text::parseCode( code, reader ); + break; + + case 3: + text += reader->getString(); + break; + + case 44: + interlin = reader->getDouble(); + break; + + default: + DRW_Text::parseCode( code, reader ); + break; + } +} + + +void DRW_MText::updateAngle() +{ + if( haveXAxis ) + { + angle = atan2( secPoint.y, secPoint.x ) * 180 / M_PI; + } +} + + +void DRW_Polyline::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 70: + flags = reader->getInt32(); + break; + + case 40: + defstawidth = reader->getDouble(); + break; + + case 41: + defendwidth = reader->getDouble(); + break; + + case 71: + vertexcount = reader->getInt32(); + break; + + case 72: + facecount = reader->getInt32(); + break; + + case 73: + smoothM = reader->getInt32(); + break; + + case 74: + smoothN = reader->getInt32(); + break; + + case 75: + curvetype = reader->getInt32(); + break; + + default: + DRW_Point::parseCode( code, reader ); + break; + } +} + + +void DRW_Vertex::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 70: + flags = reader->getInt32(); + break; + + case 40: + stawidth = reader->getDouble(); + break; + + case 41: + endwidth = reader->getDouble(); + break; + + case 42: + bulge = reader->getDouble(); + break; + + case 50: + tgdir = reader->getDouble(); + break; + + case 71: + vindex1 = reader->getInt32(); + break; + + case 72: + vindex2 = reader->getInt32(); + break; + + case 73: + vindex3 = reader->getInt32(); + break; + + case 74: + vindex4 = reader->getInt32(); + break; + + case 91: + identifier = reader->getInt32(); + break; + + default: + DRW_Point::parseCode( code, reader ); + break; + } +} + + +void DRW_Hatch::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 2: + name = reader->getUtf8String(); + break; + + case 70: + solid = reader->getInt32(); + break; + + case 71: + associative = reader->getInt32(); + break; + + case 72: /*edge type*/ + + if( ispol ) // if is polyline is a as_bulge flag + { + break; + } + else if( reader->getInt32() == 1 ) // line + { + addLine(); + } + else if( reader->getInt32() == 2 ) // arc + { + addArc(); + } + else if( reader->getInt32() == 3 ) // elliptic arc + { + addEllipse(); + } + else if( reader->getInt32() == 4 ) // spline + { + addSpline(); + } + + break; + + case 10: + + if( pt ) + pt->basePoint.x = reader->getDouble(); + else if( pline ) + { + plvert = pline->addVertex(); + plvert->x = reader->getDouble(); + } + + break; + + case 20: + + if( pt ) + pt->basePoint.y = reader->getDouble(); + else if( plvert ) + plvert->y = reader->getDouble(); + + break; + + case 11: + + if( line ) + line->secPoint.x = reader->getDouble(); + else if( ellipse ) + ellipse->secPoint.x = reader->getDouble(); + + break; + + case 21: + + if( line ) + line->secPoint.y = reader->getDouble(); + else if( ellipse ) + ellipse->secPoint.y = reader->getDouble(); + + break; + + case 40: + + if( arc ) + arc->radious = reader->getDouble(); + else if( ellipse ) + ellipse->ratio = reader->getDouble(); + + break; + + case 41: + scale = reader->getDouble(); + break; + + case 42: + + if( plvert ) + plvert->bulge = reader->getDouble(); + + break; + + case 50: + + if( arc ) + arc->staangle = reader->getDouble() / ARAD; + else if( ellipse ) + ellipse->staparam = reader->getDouble() / ARAD; + + break; + + case 51: + + if( arc ) + arc->endangle = reader->getDouble() / ARAD; + else if( ellipse ) + ellipse->endparam = reader->getDouble() / ARAD; + + break; + + case 52: + angle = reader->getDouble(); + break; + + case 73: + + if( arc ) + arc->isccw = reader->getInt32(); + else if( pline ) + pline->flags = reader->getInt32(); + + break; + + case 75: + hstyle = reader->getInt32(); + break; + + case 76: + hpattern = reader->getInt32(); + break; + + case 77: + doubleflag = reader->getInt32(); + break; + + case 78: + deflines = reader->getInt32(); + break; + + case 91: + loopsnum = reader->getInt32(); + looplist.reserve( loopsnum ); + break; + + case 92: + loop = new DRW_HatchLoop( reader->getInt32() ); + looplist.push_back( loop ); + + if( reader->getInt32() & 2 ) + { + ispol = true; + clearEntities(); + pline = new DRW_LWPolyline; + loop->objlist.push_back( pline ); + } + else + ispol = false; + + break; + + case 93: + + if( pline ) + pline->vertexnum = reader->getInt32(); + else + loop->numedges = reader->getInt32(); // aqui reserve + + break; + + case 98: // seed points ?? + clearEntities(); + break; + + default: + DRW_Point::parseCode( code, reader ); + break; + } +} + + +void DRW_Spline::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 210: + ex = reader->getDouble(); + break; + + case 220: + ey = reader->getDouble(); + break; + + case 230: + ez = reader->getDouble(); + break; + + case 12: + tgsx = reader->getDouble(); + break; + + case 22: + tgsy = reader->getDouble(); + break; + + case 32: + tgsz = reader->getDouble(); + break; + + case 13: + tgex = reader->getDouble(); + break; + + case 23: + tgey = reader->getDouble(); + break; + + case 33: + tgez = reader->getDouble(); + break; + + case 70: + flags = reader->getInt32(); + break; + + case 71: + degree = reader->getInt32(); + break; + + case 72: + nknots = reader->getInt32(); + break; + + case 73: + ncontrol = reader->getInt32(); + break; + + case 74: + nfit = reader->getInt32(); + break; + + case 42: + tolknot = reader->getDouble(); + break; + + case 43: + tolcontrol = reader->getDouble(); + break; + + case 44: + tolfit = reader->getDouble(); + break; + + case 10: + { + controlpoint = new DRW_Coord(); + controllist.push_back( controlpoint ); + controlpoint->x = reader->getDouble(); + break; + } + + case 20: + + if( controlpoint != NULL ) + controlpoint->y = reader->getDouble(); + + break; + + case 30: + + if( controlpoint != NULL ) + controlpoint->z = reader->getDouble(); + + break; + + case 11: + { + fitpoint = new DRW_Coord(); + fitlist.push_back( fitpoint ); + fitpoint->x = reader->getDouble(); + break; + } + + case 21: + + if( fitpoint != NULL ) + fitpoint->y = reader->getDouble(); + + break; + + case 31: + + if( fitpoint != NULL ) + fitpoint->z = reader->getDouble(); + + break; + + case 40: + knotslist.push_back( reader->getDouble() ); + break; + +// case 41: +// break; + default: + DRW_Entity::parseCode( code, reader ); + break; + } +} + + +void DRW_Image::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 12: + vx = reader->getDouble(); + break; + + case 22: + vy = reader->getDouble(); + break; + + case 32: + vz = reader->getDouble(); + break; + + case 13: + sizeu = reader->getDouble(); + break; + + case 23: + sizev = reader->getDouble(); + break; + + case 340: + ref = reader->getString(); + break; + + case 280: + clip = reader->getInt32(); + break; + + case 281: + brightness = reader->getInt32(); + break; + + case 282: + contrast = reader->getInt32(); + break; + + case 283: + fade = reader->getInt32(); + break; + + default: + DRW_Line::parseCode( code, reader ); + break; + } +} + + +void DRW_Dimension::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 1: + text = reader->getUtf8String(); + break; + + case 2: + name = reader->getString(); + break; + + case 3: + style = reader->getUtf8String(); + break; + + case 70: + type = reader->getInt32(); + break; + + case 71: + align = reader->getInt32(); + break; + + case 72: + linesty = reader->getInt32(); + break; + + case 10: + defPoint.x = reader->getDouble(); + break; + + case 20: + defPoint.y = reader->getDouble(); + break; + + case 30: + defPoint.z = reader->getDouble(); + break; + + case 11: + textPoint.x = reader->getDouble(); + break; + + case 21: + textPoint.y = reader->getDouble(); + break; + + case 31: + textPoint.z = reader->getDouble(); + break; + + case 12: + clonePoint.x = reader->getDouble(); + break; + + case 22: + clonePoint.y = reader->getDouble(); + break; + + case 32: + clonePoint.z = reader->getDouble(); + break; + + case 13: + def1.x = reader->getDouble(); + break; + + case 23: + def1.y = reader->getDouble(); + break; + + case 33: + def1.z = reader->getDouble(); + break; + + case 14: + def2.x = reader->getDouble(); + break; + + case 24: + def2.y = reader->getDouble(); + break; + + case 34: + def2.z = reader->getDouble(); + break; + + case 15: + circlePoint.x = reader->getDouble(); + break; + + case 25: + circlePoint.y = reader->getDouble(); + break; + + case 35: + circlePoint.z = reader->getDouble(); + break; + + case 16: + arcPoint.x = reader->getDouble(); + break; + + case 26: + arcPoint.y = reader->getDouble(); + break; + + case 36: + arcPoint.z = reader->getDouble(); + break; + + case 41: + linefactor = reader->getDouble(); + break; + + case 53: + rot = reader->getDouble(); + break; + + case 50: + angle = reader->getDouble(); + break; + + case 52: + oblique = reader->getDouble(); + break; + + case 40: + length = reader->getDouble(); + break; + +/* case 51: + * hdir = reader->getDouble(); + * break;*/ + default: + DRW_Entity::parseCode( code, reader ); + break; + } +} + + +void DRW_Leader::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 3: + style = reader->getUtf8String(); + break; + + case 71: + arrow = reader->getInt32(); + break; + + case 72: + leadertype = reader->getInt32(); + break; + + case 73: + flag = reader->getInt32(); + break; + + case 74: + hookline = reader->getInt32(); + break; + + case 75: + hookflag = reader->getInt32(); + break; + + case 76: + vertnum = reader->getInt32(); + break; + + case 77: + coloruse = reader->getInt32(); + break; + + case 40: + textheight = reader->getDouble(); + break; + + case 41: + textwidth = reader->getDouble(); + break; + + case 10: + { + vertexpoint = new DRW_Coord(); + vertexlist.push_back( vertexpoint ); + vertexpoint->x = reader->getDouble(); + break; + } + + case 20: + + if( vertexpoint != NULL ) + vertexpoint->y = reader->getDouble(); + + break; + + case 30: + + if( vertexpoint != NULL ) + vertexpoint->z = reader->getDouble(); + + break; + + case 340: + handle = reader->getString(); + break; + + case 210: + extrusionPoint.x = reader->getDouble(); + break; + + case 220: + extrusionPoint.y = reader->getDouble(); + break; + + case 230: + extrusionPoint.z = reader->getDouble(); + break; + + case 211: + horizdir.x = reader->getDouble(); + break; + + case 221: + horizdir.y = reader->getDouble(); + break; + + case 231: + horizdir.z = reader->getDouble(); + break; + + case 212: + offsetblock.x = reader->getDouble(); + break; + + case 222: + offsetblock.y = reader->getDouble(); + break; + + case 232: + offsetblock.z = reader->getDouble(); + break; + + case 213: + offsettext.x = reader->getDouble(); + break; + + case 223: + offsettext.y = reader->getDouble(); + break; + + case 233: + offsettext.z = reader->getDouble(); + break; + + default: + DRW_Entity::parseCode( code, reader ); + break; + } +} + + +void DRW_Viewport::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 40: + pswidth = reader->getDouble(); + break; + + case 41: + psheight = reader->getDouble(); + break; + + case 68: + vpstatus = reader->getInt32(); + break; + + case 69: + vpID = reader->getInt32(); + break; + + case 12: + { + centerPX = reader->getDouble(); + break; + } + + case 22: + centerPY = reader->getDouble(); + break; + + default: + DRW_Point::parseCode( code, reader ); + break; + } +} diff --git a/lib_dxf/drw_entities.h b/lib_dxf/drw_entities.h new file mode 100644 index 0000000000..7aaf18e7e7 --- /dev/null +++ b/lib_dxf/drw_entities.h @@ -0,0 +1,1300 @@ +/****************************************************************************** +** libDXFrw - Library to read/write DXF files (ascii & binary) ** +** ** +** Copyright (C) 2011 Rallaz, rallazz@gmail.com ** +** ** +** This library is free software, licensed under the terms of the GNU ** +** General Public License as published by the Free Software Foundation, ** +** either version 2 of the License, or (at your option) any later version. ** +** You should have received a copy of the GNU General Public License ** +** along with this program. If not, see . ** +******************************************************************************/ + +#ifndef DRW_ENTITIES_H +#define DRW_ENTITIES_H + + +#include +#include +#include "drw_base.h" + +class dxfReader; +class DRW_Polyline; + +using std::string; + +namespace DRW { +// ! Entity's type. +enum ETYPE { + POINT, + LINE, + CIRCLE, + ARC, + ELLIPSE, + TRACE, + SOLID, + BLOCK, + INSERT, + LWPOLYLINE, + POLYLINE, + VERTEX, + SPLINE, + HATCH, + TEXT, + MTEXT, + E3DFACE, + IMAGE, + LEADER, + DIMENSION, + DIMALIGNED, + DIMLINEAR, + DIMRADIAL, + DIMDIAMETRIC, + DIMANGULAR, + DIMANGULAR3P, + DIMORDINATE, + +// OVERLAYBOX, +// CONSTRUCTIONLINE, + RAY, + XLINE, + VIEWPORT, + UNKNOWN +}; +} + +// ! Base class for entities +/*! + * Base class for entities + * @author Rallaz + */ +class DRW_Entity +{ +public: + // initializes default values + DRW_Entity() + { + eType = DRW::UNKNOWN; + lineType = "BYLAYER"; + color = 256; // default BYLAYER (256) + ltypeScale = 1.0; + visible = true; + layer = "0"; + lWeight = DRW_LW_Conv::widthByLayer; // default BYLAYER (dxf -1, dwg 29) + handleBlock = space = 0; // default ModelSpace (0) & handleBlock = no handle (0) + haveExtrusion = false; + color24 = -1; // default -1 not set + } + + virtual ~DRW_Entity() {} + + DRW_Entity( const DRW_Entity& d ) + { + eType = d.eType; + handle = d.handle; + handleBlock = d.handleBlock; + layer = d.layer; + lineType = d.lineType; + color = d.color; + color24 = d.color24; + colorName = d.colorName; + ltypeScale = d.ltypeScale; + visible = d.visible; + lWeight = d.lWeight; + space = d.space; + haveExtrusion = d.haveExtrusion; + } + + virtual void applyExtrusion() = 0; + +protected: + void parseCode( int code, dxfReader* reader ); + void calculateAxis( DRW_Coord extPoint ); + void extrudePoint( DRW_Coord extPoint, DRW_Coord* point ); + +public: + enum DRW::ETYPE eType; /*!< enum: entity type, code 0 */ + int handle; /*!< entity identifier, code 5 */ + int handleBlock; /*!< Soft-pointer ID/handle to owner BLOCK_RECORD object, code 330 */ + UTF8STRING layer; /*!< layer name, code 8 */ + UTF8STRING lineType; /*!< line type, code 6 */ + int color; /*!< entity color, code 62 */ + enum DRW_LW_Conv::lineWidth lWeight; /*!< entity lineweight, code 370 */ + double ltypeScale; /*!< linetype scale, code 48 */ + bool visible; /*!< entity visibility, code 60 */ + int color24; /*!< 24-bit color, code 420 */ + string colorName; /*!< color name, code 430 */ + int space; /*!< space indicator 0 = model, 1 paper, code 67*/ + bool haveExtrusion; /*!< set to true if the entity have extrusion*/ +private: + DRW_Coord extAxisX; + DRW_Coord extAxisY; +}; + + +// ! Class to handle point entity +/*! + * Class to handle point entity + * @author Rallaz + */ +class DRW_Point : public DRW_Entity +{ +public: + DRW_Point() + { + eType = DRW::POINT; + basePoint.z = extPoint.x = extPoint.y = 0; + extPoint.z = 1; + thickness = 0; + } + + virtual void applyExtrusion() {} + + void parseCode( int code, dxfReader* reader ); + +public: + DRW_Coord basePoint; /*!< base point, code 10, 20 & 30 */ + double thickness; /*!< thickness, code 39 */ + DRW_Coord extPoint; /*!< Dir extrusion normal vector, code 210, 220 & 230 */ +}; + +// ! Class to handle line entity +/*! + * Class to handle line entity + * @author Rallaz + */ +class DRW_Line : public DRW_Point +{ +public: + DRW_Line() + { + eType = DRW::LINE; + secPoint.z = 0; + } + + virtual void applyExtrusion() {} + void parseCode( int code, dxfReader* reader ); + +public: + DRW_Coord secPoint; /*!< second point, code 11, 21 & 31 */ +}; + +// ! Class to handle ray entity +/*! + * Class to handle ray entity + * @author Rallaz + */ +class DRW_Ray : public DRW_Line +{ +public: + DRW_Ray() + { + eType = DRW::RAY; + } +}; + +// ! Class to handle xline entity +/*! + * Class to handle xline entity + * @author Rallaz + */ +class DRW_Xline : public DRW_Line +{ +public: + DRW_Xline() + { + eType = DRW::XLINE; + } +}; + +// ! Class to handle circle entity +/*! + * Class to handle circle entity + * @author Rallaz + */ +class DRW_Circle : public DRW_Point +{ +public: + DRW_Circle() + { + eType = DRW::CIRCLE; + } + + virtual void applyExtrusion(); + void parseCode( int code, dxfReader* reader ); + +public: + double radious; /*!< radius, code 40 */ +}; + +// ! Class to handle arc entity +/*! + * Class to handle arc entity + * @author Rallaz + */ +class DRW_Arc : public DRW_Circle +{ +public: + DRW_Arc() + { + eType = DRW::ARC; + isccw = 1; + } + + virtual void applyExtrusion() { DRW_Circle::applyExtrusion(); } + void parseCode( int code, dxfReader* reader ); + +public: + double staangle; /*!< start angle, code 50 in radians*/ + double endangle; /*!< end angle, code 51 in radians */ + int isccw; /*!< is counter clockwise arc?, only used in hatch, code 73 */ +}; + +// ! Class to handle ellipse entity +/*! + * Class to handle ellipse and elliptic arc entity + * Note: start/end parameter are in radians for ellipse entity but + * for hatch boundary are in degrees + * @author Rallaz + */ +class DRW_Ellipse : public DRW_Line +{ +public: + DRW_Ellipse() + { + eType = DRW::ELLIPSE; + isccw = 1; + } + + void parseCode( int code, dxfReader* reader ); + void toPolyline( DRW_Polyline* pol, int parts = 128 ); + virtual void applyExtrusion(); + void correctAxis(); + +public: + double ratio; /*!< ratio, code 40 */ + double staparam; /*!< start parameter, code 41, 0.0 for full ellipse*/ + double endparam; /*!< end parameter, code 42, 2*PI for full ellipse */ + int isccw; /*!< is counter clockwise arc?, only used in hatch, code 73 */ +}; + +// ! Class to handle trace entity +/*! + * Class to handle trace entity + * @author Rallaz + */ +class DRW_Trace : public DRW_Line +{ +public: + DRW_Trace() + { + eType = DRW::TRACE; + thirdPoint.z = 0; + fourPoint.z = 0; + } + + virtual void applyExtrusion(); + void parseCode( int code, dxfReader* reader ); + +public: + DRW_Coord thirdPoint; /*!< third point, code 12, 22 & 32 */ + DRW_Coord fourPoint; /*!< four point, code 13, 23 & 33 */ +}; + +// ! Class to handle solid entity +/*! + * Class to handle solid entity + * @author Rallaz + */ +class DRW_Solid : public DRW_Trace +{ +public: + DRW_Solid() + { + eType = DRW::SOLID; + } + + void parseCode( int code, dxfReader* reader ); +}; + +// ! Class to handle 3dface entity +/*! + * Class to handle 3dface entity + * @author Rallaz + */ +class DRW_3Dface : public DRW_Trace +{ +public: + DRW_3Dface() + { + eType = DRW::E3DFACE; + invisibleflag = 0; + } + + virtual void applyExtrusion() {} + void parseCode( int code, dxfReader* reader ); + +public: + int invisibleflag; /*!< invisible edge flag, code 70 */ +}; + +// ! Class to handle block entries +/*! + * Class to handle block entries + * @author Rallaz + */ +class DRW_Block : public DRW_Point +{ +public: + DRW_Block() + { + eType = DRW::BLOCK; + layer = "0"; + flags = 0; + name = "*U0"; + } + + virtual void applyExtrusion() {} + void parseCode( int code, dxfReader* reader ); + +public: + UTF8STRING name; /*!< block name, code 2 */ + int flags; /*!< block type, code 70 */ +}; + + +// ! Class to handle insert entries +/*! + * Class to handle insert entries + * @author Rallaz + */ +class DRW_Insert : public DRW_Point +{ +public: + DRW_Insert() + { + eType = DRW::INSERT; + xscale = 1; + yscale = 1; + zscale = 1; + angle = 0; + colcount = 1; + rowcount = 1; + colspace = 0; + rowspace = 0; + } + + virtual void applyExtrusion() { DRW_Point::applyExtrusion(); } + void parseCode( int code, dxfReader* reader ); + +public: + UTF8STRING name; /*!< block name, code 2 */ + double xscale; /*!< x scale factor, code 41 */ + double yscale; /*!< y scale factor, code 42 */ + double zscale; /*!< z scale factor, code 43 */ + double angle; /*!< rotation angle, code 50 */ + int colcount; /*!< column count, code 70 */ + int rowcount; /*!< row count, code 71 */ + double colspace; /*!< column space, code 44 */ + double rowspace; /*!< row space, code 45 */ +}; + +// ! Class to handle lwpolyline entity +/*! + * Class to handle lwpolyline entity + * @author Rallaz + */ +class DRW_LWPolyline : public DRW_Entity +{ +public: + DRW_LWPolyline() + { + eType = DRW::LWPOLYLINE; + elevation = thickness = width = 0.0; + flags = 0; + extPoint.x = extPoint.y = 0; + extPoint.z = 1; + vertex = NULL; + } + + ~DRW_LWPolyline() + { + while( !vertlist.empty() ) + { + vertlist.pop_back(); + } + } + + virtual void applyExtrusion(); + + void addVertex( DRW_Vertex2D v ) + { + DRW_Vertex2D* vert = new DRW_Vertex2D(); + + vert->x = v.x; + vert->y = v.y; + vert->stawidth = v.stawidth; + vert->endwidth = v.endwidth; + vert->bulge = v.bulge; + vertlist.push_back( vert ); + } + + DRW_Vertex2D* addVertex() + { + DRW_Vertex2D* vert = new DRW_Vertex2D(); + + vert->stawidth = 0; + vert->endwidth = 0; + vert->bulge = 0; + vertlist.push_back( vert ); + return vert; + } + + void parseCode( int code, dxfReader* reader ); + +public: + int vertexnum; /*!< number of vertex, code 90 */ + int flags; /*!< polyline flag, code 70, default 0 */ + double width; /*!< constant width, code 43 */ + double elevation; /*!< elevation, code 38 */ + double thickness; /*!< thickness, code 39 */ + DRW_Coord extPoint; /*!< Dir extrusion normal vector, code 210, 220 & 230 */ + DRW_Vertex2D* vertex; /*!< current vertex to add data */ + std::vector vertlist; /*!< vertex list */ +}; + +// ! Class to handle insert entries +/*! + * Class to handle insert entries + * @author Rallaz + */ +class DRW_Text : public DRW_Line +{ +public: + // ! Vertical alignments. + enum VAlign { + VBaseLine = 0, /*!< Top = 0 */ + VBottom, /*!< Bottom = 1 */ + VMiddle, /*!< Middle = 2 */ + VTop /*!< Top = 3 */ + }; + + // ! Horizontal alignments. + enum HAlign { + HLeft = 0, /*!< Left = 0 */ + HCenter, /*!< Centered = 1 */ + HRight, /*!< Right = 2 */ + HAligned, /*!< Aligned = 3 (if VAlign==0) */ + HMiddle, /*!< middle = 4 (if VAlign==0) */ + HFit /*!< fit into point = 5 (if VAlign==0) */ + }; + + DRW_Text() + { + eType = DRW::TEXT; + angle = 0; + widthscale = 1; + oblique = 0; + style = "STANDARD"; + textgen = 0; + alignH = HLeft; + alignV = VBaseLine; + } + + virtual void applyExtrusion() {} // RLZ TODO + void parseCode( int code, dxfReader* reader ); + +public: + double height; /*!< height text, code 40 */ + UTF8STRING text; /*!< text string, code 1 */ + double angle; /*!< rotation angle in degrees (360), code 50 */ + double widthscale; /*!< width factor, code 41 */ + double oblique; /*!< oblique angle, code 51 */ + UTF8STRING style; /*!< style name, code 7 */ + int textgen; /*!< text generation, code 71 */ + enum HAlign alignH; /*!< horizontal align, code 72 */ + enum VAlign alignV; /*!< vertical align, code 73 */ +}; + +// ! Class to handle insert entries +/*! + * Class to handle insert entries + * @author Rallaz + */ +class DRW_MText : public DRW_Text +{ +public: + // ! Attachments. + enum Attach { + TopLeft = 1, + TopCenter, + TopRight, + MiddleLeft, + MiddleCenter, + MiddleRight, + BottomLeft, + BottomCenter, + BottomRight + }; + + DRW_MText() + { + eType = DRW::MTEXT; + interlin = 1; + alignV = (VAlign) TopLeft; + textgen = 1; + haveXAxis = false; // if true needed to recalculate angle + } + + void parseCode( int code, dxfReader* reader ); + void updateAngle(); // recalculate angle if 'haveXAxis' is true + +public: + double interlin; /*!< width factor, code 44 */ +private: + bool haveXAxis; +}; + +// ! Class to handle vertex +/*! + * Class to handle vertex for polyline entity + * @author Rallaz + */ +class DRW_Vertex : public DRW_Point +{ +public: + DRW_Vertex() + { + eType = DRW::VERTEX; + stawidth = endwidth = bulge = 0; + vindex1 = vindex2 = vindex3 = vindex4 = 0; + flags = identifier = 0; + } + + DRW_Vertex( double sx, double sy, double sz, double b ) + { + stawidth = endwidth = 0; + vindex1 = vindex2 = vindex3 = vindex4 = 0; + flags = identifier = 0; + basePoint.x = sx; + basePoint.y = sy; + basePoint.z = sz; + bulge = b; + } + + void parseCode( int code, dxfReader* reader ); + +public: + double stawidth; /*!< Start width, code 40 */ + double endwidth; /*!< End width, code 41 */ + double bulge; /*!< bulge, code 42 */ + + int flags; /*!< vertex flag, code 70, default 0 */ + double tgdir; /*!< curve fit tangent direction, code 50 */ + int vindex1; /*!< polyface mesh vertex index, code 71, default 0 */ + int vindex2; /*!< polyface mesh vertex index, code 72, default 0 */ + int vindex3; /*!< polyface mesh vertex index, code 73, default 0 */ + int vindex4; /*!< polyface mesh vertex index, code 74, default 0 */ + int identifier; /*!< vertex identifier, code 91, default 0 */ +}; + +// ! Class to handle polyline entity +/*! + * Class to handle polyline entity + * @author Rallaz + */ +class DRW_Polyline : public DRW_Point +{ +public: + DRW_Polyline() + { + eType = DRW::POLYLINE; + defstawidth = defendwidth = 0.0; + basePoint.x = basePoint.y = 0.0; + flags = vertexcount = facecount = 0; + smoothM = smoothN = curvetype = 0; + } + + ~DRW_Polyline() + { + while( !vertlist.empty() ) + { + vertlist.pop_back(); + } + } + + void addVertex( DRW_Vertex v ) + { + DRW_Vertex* vert = new DRW_Vertex(); + + vert->basePoint.x = v.basePoint.x; + vert->basePoint.y = v.basePoint.y; + vert->basePoint.z = v.basePoint.z; + vert->stawidth = v.stawidth; + vert->endwidth = v.endwidth; + vert->bulge = v.bulge; + vertlist.push_back( vert ); + } + + void appendVertex( DRW_Vertex* v ) + { + vertlist.push_back( v ); + } + + void parseCode( int code, dxfReader* reader ); + +public: + int flags; /*!< polyline flag, code 70, default 0 */ + double defstawidth; /*!< Start width, code 40, default 0 */ + double defendwidth; /*!< End width, code 41, default 0 */ + int vertexcount; /*!< polygon mesh M vertex or polyface vertex num, code 71, default 0 */ + int facecount; /*!< polygon mesh N vertex or polyface face num, code 72, default 0 */ + int smoothM; /*!< smooth surface M density, code 73, default 0 */ + int smoothN; /*!< smooth surface M density, code 74, default 0 */ + int curvetype; /*!< curves & smooth surface type, code 75, default 0 */ + + std::vector vertlist; /*!< vertex list */ +}; + + +// ! Class to handle spline entity +/*! + * Class to handle spline entity + * @author Rallaz + */ +class DRW_Spline : public DRW_Entity +{ +public: + DRW_Spline() + { + eType = DRW::SPLINE; + flags = nknots = ncontrol = nfit = 0; + ex = ey = 0.0; + ez = 1.0; + tolknot = tolcontrol = tolfit = 0.0000001; + } + + ~DRW_Spline() + { + while( !controllist.empty() ) + { + controllist.pop_back(); + } + + while( !fitlist.empty() ) + { + fitlist.pop_back(); + } + } + + virtual void applyExtrusion() {} + + void parseCode( int code, dxfReader* reader ); + +public: + double ex; /*!< normal vector x coordinate, code 210 */ + double ey; /*!< normal vector y coordinate, code 220 */ + double ez; /*!< normal vector z coordinate, code 230 */ + double tgsx; /*!< start tangent x coordinate, code 12 */ + double tgsy; /*!< start tangent y coordinate, code 22 */ + double tgsz; /*!< start tangent z coordinate, code 32 */ + double tgex; /*!< end tangent x coordinate, code 13 */ + double tgey; /*!< end tangent y coordinate, code 23 */ + double tgez; /*!< end tangent z coordinate, code 33 */ + int flags; /*!< spline flag, code 70 */ + int degree; /*!< degree of the spline, code 71 */ + int nknots; /*!< number of knots, code 72, default 0 */ + int ncontrol; /*!< number of control points, code 73, default 0 */ + int nfit; /*!< number of fit points, code 74, default 0 */ + double tolknot; /*!< knot tolerance, code 42, default 0.0000001 */ + double tolcontrol; /*!< control point tolerance, code 43, default 0.0000001 */ + double tolfit; /*!< fit point tolerance, code 44, default 0.0000001 */ + + std::vector knotslist; /*!< knots list, code 40 */ + std::vector controllist; /*!< control points list, code 10, 20 & 30 */ + std::vector fitlist; /*!< fit points list, code 11, 21 & 31 */ +private: + DRW_Coord* controlpoint; /*!< current control point to add data */ + DRW_Coord* fitpoint; /*!< current fit point to add data */ +}; + +// ! Class to handle hatch loop +/*! + * Class to handle hatch loop + * @author Rallaz + */ +class DRW_HatchLoop +{ +public: + DRW_HatchLoop( int t ) + { + type = t; + numedges = 0; + } + + ~DRW_HatchLoop() + { +/* while (!pollist.empty()) { + * pollist.pop_back(); + * }*/ + while( !objlist.empty() ) + { + objlist.pop_back(); + } + } + + void update() + { + numedges = objlist.size(); + } + +public: + int type; /*!< boundary path type, code 92, polyline=2, default=0 */ + int numedges; /*!< number of edges (if not a polyline), code 93 */ +// TODO: store lwpolylines as entities +// std::vector pollist; /*!< polyline list */ + std::vector objlist; /*!< entities list */ +}; + +// ! Class to handle hatch entity +/*! + * Class to handle hatch entity + * @author Rallaz + */ +// TODO: handle lwpolylines, splines and ellipses +class DRW_Hatch : public DRW_Point +{ +public: + DRW_Hatch() + { + eType = DRW::HATCH; + angle = scale = 0.0; + basePoint.x = basePoint.y = basePoint.z = 0.0; + loopsnum = hstyle = associative = 0; + solid = hpattern = 1; + deflines = doubleflag = 0; + loop = NULL; + clearEntities(); + } + + ~DRW_Hatch() + { + while( !looplist.empty() ) + { + looplist.pop_back(); + } + } + + void appendLoop( DRW_HatchLoop* v ) + { + looplist.push_back( v ); + } + + virtual void applyExtrusion() {} + void parseCode( int code, dxfReader* reader ); + +public: + UTF8STRING name; /*!< hatch pattern name, code 2 */ + int solid; /*!< solid fill flag, code 70, solid=1, pattern=0 */ + int associative; /*!< associativity, code 71, associatve=1, non-assoc.=0 */ + int hstyle; /*!< hatch style, code 75 */ + int hpattern; /*!< hatch pattern type, code 76 */ + int doubleflag; /*!< hatch pattern double flag, code 77, double=1, single=0 */ + int loopsnum; /*!< namber of boundary paths (loops), code 91 */ + double angle; /*!< hatch pattern angle, code 52 */ + double scale; /*!< hatch pattern scale, code 41 */ + int deflines; /*!< number of pattern definition lines, code 78 */ + + std::vector looplist; /*!< polyline list */ +private: + void clearEntities() + { + pt = line = NULL; + pline = NULL; + arc = NULL; + ellipse = NULL; + spline = NULL; + plvert = NULL; + } + + void addLine() + { + clearEntities(); + + if( loop ) + { + pt = line = new DRW_Line; + loop->objlist.push_back( line ); + } + } + + void addArc() + { + clearEntities(); + + if( loop ) + { + pt = arc = new DRW_Arc; + loop->objlist.push_back( arc ); + } + } + + void addEllipse() + { + clearEntities(); + + if( loop ) + { + pt = ellipse = new DRW_Ellipse; + loop->objlist.push_back( ellipse ); + } + } + + void addSpline() + { + clearEntities(); + + if( loop ) + { + pt = NULL; + spline = new DRW_Spline; + loop->objlist.push_back( spline ); + } + } + + DRW_HatchLoop* loop; /*!< current loop to add data */ + DRW_Line* line; + DRW_Arc* arc; + DRW_Ellipse* ellipse; + DRW_Spline* spline; + DRW_LWPolyline* pline; + DRW_Point* pt; + DRW_Vertex2D* plvert; + bool ispol; +}; + +// ! Class to handle image entity +/*! + * Class to handle image entity + * @author Rallaz + */ +class DRW_Image : public DRW_Line +{ +public: + DRW_Image() + { + eType = DRW::IMAGE; + vz = fade = clip = 0; + brightness = contrast = 50; + } + + void parseCode( int code, dxfReader* reader ); + +public: + string ref; /*!< Hard reference to imagedef object, code 340 */ + double vx; /*!< V-vector of single pixel, x coordinate, code 12 */ + double vy; /*!< V-vector of single pixel, y coordinate, code 22 */ + double vz; /*!< V-vector of single pixel, z coordinate, code 32 */ + double sizeu; /*!< image size in pixels, U value, code 13 */ + double sizev; /*!< image size in pixels, V value, code 23 */ + double dz; /*!< z coordinate, code 33 */ + int clip; /*!< Clipping state, code 280, 0=off 1=on */ + int brightness; /*!< Brightness value, code 281, (0-100) default 50 */ + int contrast; /*!< Brightness value, code 282, (0-100) default 50 */ + int fade; /*!< Brightness value, code 283, (0-100) default 0 */ +}; + + +// ! Base class for dimension entity +/*! + * Base class for dimension entity + * @author Rallaz + */ +class DRW_Dimension : public DRW_Entity +{ +public: + DRW_Dimension() + { + eType = DRW::DIMENSION; + linesty = 1; + linefactor = extPoint.z = 1.0; + angle = oblique = rot = 0.0; + align = 5; + style = "STANDARD"; + defPoint.z = extPoint.x = extPoint.y = 0; + textPoint.z = rot = 0; + clonePoint.x = clonePoint.y = clonePoint.z = 0; + } + + DRW_Dimension( const DRW_Dimension& d ) : DRW_Entity( d ) + { + eType = DRW::DIMENSION; + type = d.type; + name = d.name; + defPoint = d.defPoint; + textPoint = d.textPoint; + text = d.text; + style = d.style; + align = d.align; + linesty = d.linesty; + linefactor = d.linefactor; + rot = d.rot; + extPoint = d.extPoint; + clonePoint = d.clonePoint; + def1 = d.def1; + def2 = d.def2; + angle = d.angle; + oblique = d.oblique; + arcPoint = d.arcPoint; + circlePoint = d.circlePoint; + length = d.length; + } + + virtual ~DRW_Dimension() {} + + void parseCode( int code, dxfReader* reader ); + + virtual void applyExtrusion() {} + + DRW_Coord getDefPoint() const { return defPoint; } /*!< Definition point, code 10, 20 & 30 */ + void setDefPoint( const DRW_Coord p ) { defPoint = p; } + DRW_Coord getTextPoint() const { return textPoint; } /*!< Middle point of text, code 11, 21 & 31 */ + void setTextPoint( const DRW_Coord p ) { textPoint = p; } + string getStyle() const { return style; } /*!< Dimension style, code 3 */ + void setStyle( const string s ) { style = s; } + int getAlign() const { return align; } /*!< attachment point, code 71 */ + void setAlign( const int a ) { align = a; } + int getTextLineStyle() const { return linesty; } /*!< Dimension text line spacing style, code 72, default 1 */ + void setTextLineStyle( const int l ) { linesty = l; } + string getText() const { return text; } /*!< Dimension text explicitly entered by the user, code 1 */ + void setText( const string t ) { text = t; } + double getTextLineFactor() const { return linefactor; } /*!< Dimension text line spacing factor, code 41, default 1? */ + void setTextLineFactor( const double l ) { linefactor = l; } + double getDir() const { return rot; } /*!< rotation angle of the dimension text, code 53 (optional) default 0 */ + void setDir( const double d ) { rot = d; } + + DRW_Coord getExtrusion() { return extPoint; } /*!< extrusion, code 210, 220 & 230 */ + void setExtrusion( const DRW_Coord p ) { extPoint = p; } + string getName() { return name; } /*!< Name of the block that contains the entities, code 2 */ + void setName( const string s ) { name = s; } +// int getType(){ return type;} /*!< Dimension type, code 70 */ +protected: + DRW_Coord getPt2() const { return clonePoint; } + void setPt2( const DRW_Coord p ) { clonePoint = p; } + DRW_Coord getPt3() const { return def1; } + void setPt3( const DRW_Coord p ) { def1 = p; } + DRW_Coord getPt4() const { return def2; } + void setPt4( const DRW_Coord p ) { def2 = p; } + DRW_Coord getPt5() const { return circlePoint; } + void setPt5( const DRW_Coord p ) { circlePoint = p; } + DRW_Coord getPt6() const { return arcPoint; } + void setPt6( const DRW_Coord p ) { arcPoint = p; } + double getAn50() const { return angle; } /*!< Angle of rotated, horizontal, or vertical dimensions, code 50 */ + void setAn50( const double d ) { angle = d; } + double getOb52() const { return oblique; } /*!< oblique angle, code 52 */ + void setOb52( const double d ) { oblique = d; } + double getRa40() const { return length; } /*!< Leader length, code 40 */ + void setRa40( const double d ) { length = d; } +public: + int type; /*!< Dimension type, code 70 */ +private: + string name; /*!< Name of the block that contains the entities, code 2 */ + DRW_Coord defPoint; /*!< definition point, code 10, 20 & 30 (WCS) */ + DRW_Coord textPoint; /*!< Middle point of text, code 11, 21 & 31 (OCS) */ + UTF8STRING text; /*!< Dimension text explicitly entered by the user, code 1 */ + UTF8STRING style; /*!< Dimension style, code 3 */ + int align; /*!< attachment point, code 71 */ + int linesty; /*!< Dimension text line spacing style, code 72, default 1 */ + double linefactor; /*!< Dimension text line spacing factor, code 41, default 1? (value range 0.25 to 4.00*/ + double rot; /*!< rotation angle of the dimension text, code 53 */ + DRW_Coord extPoint; /*!< extrusion normal vector, code 210, 220 & 230 */ + + // double hdir; /*!< horizontal direction for the dimension, code 51, default ? */ + DRW_Coord clonePoint; /*!< Insertion point for clones (Baseline & Continue), code 12, 22 & 32 (OCS) */ + DRW_Coord def1; /*!< Definition point 1for linear & angular, code 13, 23 & 33 (WCS) */ + DRW_Coord def2; /*!< Definition point 2, code 14, 24 & 34 (WCS) */ + double angle; /*!< Angle of rotated, horizontal, or vertical dimensions, code 50 */ + double oblique; /*!< oblique angle, code 52 */ + + DRW_Coord circlePoint; /*!< Definition point for diameter, radius & angular dims code 15, 25 & 35 (WCS) */ + DRW_Coord arcPoint; /*!< Point defining dimension arc, x coordinate, code 16, 26 & 36 (OCS) */ + double length; /*!< Leader length, code 40 */ +}; + + +// ! Class to handle aligned dimension entity +/*! + * Class to handle aligned dimension entity + * @author Rallaz + */ +class DRW_DimAligned : public DRW_Dimension +{ +public: + DRW_DimAligned() + { + eType = DRW::DIMALIGNED; + } + + DRW_DimAligned( const DRW_Dimension& d ) : DRW_Dimension( d ) + { + eType = DRW::DIMALIGNED; + } + + DRW_Coord getClonepoint() const { return getPt2(); } /*!< Insertion for clones (Baseline & Continue), 12, 22 & 32 */ + void setClonePoint( DRW_Coord c ) { setPt2( c ); } + + DRW_Coord getDimPoint() const { return getDefPoint(); } /*!< dim line location point, code 10, 20 & 30 */ + void setDimPoint( const DRW_Coord p ) { setDefPoint( p ); } + DRW_Coord getDef1Point() const { return getPt3(); } /*!< Definition point 1, code 13, 23 & 33 */ + void setDef1Point( const DRW_Coord p ) { setPt3( p ); } + DRW_Coord getDef2Point() const { return getPt4(); } /*!< Definition point 2, code 14, 24 & 34 */ + void setDef2Point( const DRW_Coord p ) { setPt4( p ); } +}; + +// ! Class to handle linear or rotated dimension entity +/*! + * Class to handle linear or rotated dimension entity + * @author Rallaz + */ +class DRW_DimLinear : public DRW_DimAligned +{ +public: + DRW_DimLinear() + { + eType = DRW::DIMLINEAR; + } + + DRW_DimLinear( const DRW_Dimension& d ) : DRW_DimAligned( d ) + { + eType = DRW::DIMLINEAR; + } + + double getAngle() const { return getAn50(); } /*!< Angle of rotated, horizontal, or vertical dimensions, code 50 */ + void setAngle( const double d ) { setAn50( d ); } + double getOblique() const { return getOb52(); } /*!< oblique angle, code 52 */ + void setOblique( const double d ) { setOb52( d ); } +}; + +// ! Class to handle radial dimension entity +/*! + * Class to handle aligned, linear or rotated dimension entity + * @author Rallaz + */ +class DRW_DimRadial : public DRW_Dimension +{ +public: + DRW_DimRadial() + { + eType = DRW::DIMRADIAL; + } + + DRW_DimRadial( const DRW_Dimension& d ) : DRW_Dimension( d ) + { + eType = DRW::DIMRADIAL; + } + + DRW_Coord getCenterPoint() const { return getDefPoint(); } /*!< center point, code 10, 20 & 30 */ + void setCenterPoint( const DRW_Coord p ) { setDefPoint( p ); } + DRW_Coord getDiameterPoint() const { return getPt5(); } /*!< Definition point for radius, code 15, 25 & 35 */ + void setDiameterPoint( const DRW_Coord p ) { setPt5( p ); } + double getLeaderLength() const { return getRa40(); } /*!< Leader length, code 40 */ + void setLeaderLength( const double d ) { setRa40( d ); } +}; + +// ! Class to handle radial dimension entity +/*! + * Class to handle aligned, linear or rotated dimension entity + * @author Rallaz + */ +class DRW_DimDiametric : public DRW_Dimension +{ +public: + DRW_DimDiametric() + { + eType = DRW::DIMDIAMETRIC; + } + + DRW_DimDiametric( const DRW_Dimension& d ) : DRW_Dimension( d ) + { + eType = DRW::DIMDIAMETRIC; + } + + DRW_Coord getDiameter1Point() const { return getPt5(); } /*!< First definition point for diameter, code 15, 25 & 35 */ + void setDiameter1Point( const DRW_Coord p ) { setPt5( p ); } + DRW_Coord getDiameter2Point() const { return getDefPoint(); } /*!< Oposite point for diameter, code 10, 20 & 30 */ + void setDiameter2Point( const DRW_Coord p ) { setDefPoint( p ); } + double getLeaderLength() const { return getRa40(); } /*!< Leader length, code 40 */ + void setLeaderLength( const double d ) { setRa40( d ); } +}; + +// ! Class to handle angular dimension entity +/*! + * Class to handle angular dimension entity + * @author Rallaz + */ +class DRW_DimAngular : public DRW_Dimension +{ +public: + DRW_DimAngular() + { + eType = DRW::DIMANGULAR; + } + + DRW_DimAngular( const DRW_Dimension& d ) : DRW_Dimension( d ) + { + eType = DRW::DIMANGULAR; + } + + DRW_Coord getFirstLine1() const { return getPt3(); } /*!< Definition point line 1-1, code 13, 23 & 33 */ + void setFirstLine1( const DRW_Coord p ) { setPt3( p ); } + DRW_Coord getFirstLine2() const { return getPt4(); } /*!< Definition point line 1-2, code 14, 24 & 34 */ + void setFirstLine2( const DRW_Coord p ) { setPt4( p ); } + DRW_Coord getSecondLine1() const { return getPt5(); } /*!< Definition point line 2-1, code 15, 25 & 35 */ + void setSecondLine1( const DRW_Coord p ) { setPt5( p ); } + DRW_Coord getSecondLine2() const { return getDefPoint(); } /*!< Definition point line 2-2, code 10, 20 & 30 */ + void setSecondLine2( const DRW_Coord p ) { setDefPoint( p ); } + DRW_Coord getDimPoint() const { return getPt6(); } /*!< Dimension definition point, code 16, 26 & 36 */ + void setDimPoint( const DRW_Coord p ) { setPt6( p ); } +}; + + +// ! Class to handle angular 3p dimension entity +/*! + * Class to handle angular 3p dimension entity + * @author Rallaz + */ +class DRW_DimAngular3p : public DRW_Dimension +{ +public: + DRW_DimAngular3p() + { + eType = DRW::DIMANGULAR3P; + } + + DRW_DimAngular3p( const DRW_Dimension& d ) : DRW_Dimension( d ) + { + eType = DRW::DIMANGULAR3P; + } + + DRW_Coord getFirstLine() const { return getPt3(); } /*!< Definition point line 1, code 13, 23 & 33 */ + void setFirstLine( const DRW_Coord p ) { setPt3( p ); } + DRW_Coord getSecondLine() const { return getPt4(); } /*!< Definition point line 2, code 14, 24 & 34 */ + void setSecondLine( const DRW_Coord p ) { setPt4( p ); } + DRW_Coord getVertexPoint() const { return getPt5(); } /*!< Vertex point, code 15, 25 & 35 */ + void SetVertexPoint( const DRW_Coord p ) { setPt5( p ); } + DRW_Coord getDimPoint() const { return getDefPoint(); } /*!< Dimension definition point, code 10, 20 & 30 */ + void setDimPoint( const DRW_Coord p ) { setDefPoint( p ); } +}; + +// ! Class to handle ordinate dimension entity +/*! + * Class to handle ordinate dimension entity + * @author Rallaz + */ +class DRW_DimOrdinate : public DRW_Dimension +{ +public: + DRW_DimOrdinate() + { + eType = DRW::DIMORDINATE; + } + + DRW_DimOrdinate( const DRW_Dimension& d ) : DRW_Dimension( d ) + { + eType = DRW::DIMORDINATE; + } + + DRW_Coord getOriginPoint() const { return getDefPoint(); } /*!< Origin definition point, code 10, 20 & 30 */ + void setOriginPoint( const DRW_Coord p ) { setDefPoint( p ); } + DRW_Coord getFirstLine() const { return getPt3(); } /*!< Feature location point, code 13, 23 & 33 */ + void setFirstLine( const DRW_Coord p ) { setPt3( p ); } + DRW_Coord getSecondLine() const { return getPt4(); } /*!< Leader end point, code 14, 24 & 34 */ + void setSecondLine( const DRW_Coord p ) { setPt4( p ); } +}; + + +// ! Class to handle leader entity +/*! + * Class to handle leader entity + * @author Rallaz + */ +class DRW_Leader : public DRW_Entity +{ +public: + DRW_Leader() + { + eType = DRW::LEADER; + flag = 3; + hookflag = vertnum = leadertype = 0; + extrusionPoint.x = extrusionPoint.y = 0.0; + arrow = 1; + extrusionPoint.z = 1.0; + } + + ~DRW_Leader() + { + while( !vertexlist.empty() ) + { + vertexlist.pop_back(); + } + } + + virtual void applyExtrusion() {} + void parseCode( int code, dxfReader* reader ); + +public: + UTF8STRING style; /*!< Dimension style name, code 3 */ + int arrow; /*!< Arrowhead flag, code 71, 0=Disabled; 1=Enabled */ + int leadertype; /*!< Leader path type, code 72, 0=Straight line segments; 1=Spline */ + int flag; /*!< Leader creation flag, code 73, default 3 */ + int hookline; /*!< Hook line direction flag, code 74, default 1 */ + int hookflag; /*!< Hook line flag, code 75 */ + double textheight; /*!< Text annotation height, code 40 */ + double textwidth; /*!< Text annotation width, code 41 */ + int vertnum; /*!< Number of vertices, code 76 */ + int coloruse; /*!< Color to use if leader's DIMCLRD = BYBLOCK, code 77 */ + string handle; /*!< Hard reference to associated annotation, code 340 */ + DRW_Coord extrusionPoint; /*!< Normal vector, code 210, 220 & 230 */ + DRW_Coord horizdir; /*!< "Horizontal" direction for leader, code 211, 221 & 231 */ + DRW_Coord offsetblock; /*!< Offset of last leader vertex from block, code 212, 222 & 232 */ + DRW_Coord offsettext; /*!< Offset of last leader vertex from annotation, code 213, 223 & 233 */ + + std::vector vertexlist; /*!< vertex points list, code 10, 20 & 30 */ +private: + DRW_Coord* vertexpoint; /*!< current control point to add data */ +}; + +// ! Class to handle viewport entity +/*! + * Class to handle viewport entity + * @author Rallaz + */ +class DRW_Viewport : public DRW_Point +{ +public: + DRW_Viewport() + { + eType = DRW::VIEWPORT; + vpstatus = 0; + pswidth = 205; + psheight = 156; + centerPX = 128.5; + centerPY = 97.5; + } + + virtual void applyExtrusion() {} + void parseCode( int code, dxfReader* reader ); + +public: + double pswidth; /*!< Width in paper space units, code 40 */ + double psheight; /*!< Height in paper space units, code 41 */ + int vpstatus; /*!< Viewport status, code 68 */ + int vpID; /*!< Viewport ID, code 69 */ + double centerPX; /*!< view center piont X, code 12 */ + double centerPY; /*!< view center piont Y, code 22 */ +}; + + +#endif + +// EOF diff --git a/lib_dxf/drw_interface.h b/lib_dxf/drw_interface.h new file mode 100644 index 0000000000..52fbe84f16 --- /dev/null +++ b/lib_dxf/drw_interface.h @@ -0,0 +1,223 @@ +/****************************************************************************** +** libDXFrw - Library to read/write DXF files (ascii & binary) ** +** ** +** Copyright (C) 2011 Rallaz, rallazz@gmail.com ** +** ** +** This library is free software, licensed under the terms of the GNU ** +** General Public License as published by the Free Software Foundation, ** +** either version 2 of the License, or (at your option) any later version. ** +** You should have received a copy of the GNU General Public License ** +** along with this program. If not, see . ** +******************************************************************************/ + +#ifndef DRW_INTERFACE_H +#define DRW_INTERFACE_H + +#include + +#include "drw_entities.h" +#include "drw_objects.h" +// #include "dl_extrusion.h" + +/** + * Abstract class (interface) for comunicate dxfReader with the application. + * Inherit your class which takes care of the entities in the + * processed DXF file from this interface. + * + * @author Rallaz + */ +class DRW_Interface +{ +public: + DRW_Interface() + { +// extrusion = new DL_Extrusion; + } + + virtual ~DRW_Interface() + { +// delete extrusion; + } + + /** Called when header is parsed. */ + virtual void addHeader( const DRW_Header* data ) = 0; + + /** Called for every line Type. */ + virtual void addLType( const DRW_LType& data ) = 0; + + /** Called for every layer. */ + virtual void addLayer( const DRW_Layer& data ) = 0; + + /** Called for every dim style. */ + virtual void addDimStyle( const DRW_Dimstyle& data ) = 0; + + /** Called for every VPORT table. */ + virtual void addVport( const DRW_Vport& data ) = 0; + + /** Called for every text style. */ + virtual void addTextStyle( const DRW_Textstyle& data ) = 0; + + /** + * Called for every block. Note: all entities added after this + * command go into this block until endBlock() is called. + * + * @see endBlock() + */ + virtual void addBlock( const DRW_Block& data ) = 0; + + /** + * In DWG called when the following entities corresponding to a + * block different from the current. Note: all entities added after this + * command go into this block until setBlock() is called already. + * + * int handle are the value of DRW_Block::handleBlock added with addBlock() + */ + virtual void setBlock( const int handle ) = 0; + + /** Called to end the current block */ + virtual void endBlock() = 0; + + /** Called for every point */ + virtual void addPoint( const DRW_Point& data ) = 0; + + /** Called for every line */ + virtual void addLine( const DRW_Line& data ) = 0; + + /** Called for every ray */ + virtual void addRay( const DRW_Ray& data ) = 0; + + /** Called for every xline */ + virtual void addXline( const DRW_Xline& data ) = 0; + + /** Called for every arc */ + virtual void addArc( const DRW_Arc& data ) = 0; + + /** Called for every circle */ + virtual void addCircle( const DRW_Circle& data ) = 0; + + /** Called for every ellipse */ + virtual void addEllipse( const DRW_Ellipse& data ) = 0; + + /** Called for every lwpolyline */ + virtual void addLWPolyline( const DRW_LWPolyline& data ) = 0; + + /** Called for every polyline start */ + virtual void addPolyline( const DRW_Polyline& data ) = 0; + + /** Called for every spline */ + virtual void addSpline( const DRW_Spline* data ) = 0; + + /** Called for every spline knot value */ + virtual void addKnot( const DRW_Entity& data ) = 0; + + /** Called for every insert. */ + virtual void addInsert( const DRW_Insert& data ) = 0; + + /** Called for every trace start */ + virtual void addTrace( const DRW_Trace& data ) = 0; + + /** Called for every 3dface start */ + virtual void add3dFace( const DRW_3Dface& data ) = 0; + + /** Called for every solid start */ + virtual void addSolid( const DRW_Solid& data ) = 0; + + + /** Called for every Multi Text entity. */ + virtual void addMText( const DRW_MText& data ) = 0; + + /** Called for every Text entity. */ + virtual void addText( const DRW_Text& data ) = 0; + + /** + * Called for every aligned dimension entity. + */ + virtual void addDimAlign( const DRW_DimAligned* data ) = 0; + + /** + * Called for every linear or rotated dimension entity. + */ + virtual void addDimLinear( const DRW_DimLinear* data ) = 0; + + /** + * Called for every radial dimension entity. + */ + virtual void addDimRadial( const DRW_DimRadial* data ) = 0; + + /** + * Called for every diametric dimension entity. + */ + virtual void addDimDiametric( const DRW_DimDiametric* data ) = 0; + + /** + * Called for every angular dimension (2 lines version) entity. + */ + virtual void addDimAngular( const DRW_DimAngular* data ) = 0; + + /** + * Called for every angular dimension (3 points version) entity. + */ + virtual void addDimAngular3P( const DRW_DimAngular3p* data ) = 0; + + /** + * Called for every ordinate dimension entity. + */ + virtual void addDimOrdinate( const DRW_DimOrdinate* data ) = 0; + + /** + * Called for every leader start. + */ + virtual void addLeader( const DRW_Leader* data ) = 0; + + /** + * Called for every hatch entity. + */ + virtual void addHatch( const DRW_Hatch* data ) = 0; + + /** + * Called for every viewport entity. + */ + virtual void addViewport( const DRW_Viewport& data ) = 0; + + /** + * Called for every image entity. + */ + virtual void addImage( const DRW_Image* data ) = 0; + + /** + * Called for every image definition. + */ + virtual void linkImage( const DRW_ImageDef* data ) = 0; + + /** + * Called for every comment in the DXF file (code 999). + */ + virtual void addComment( const char* comment ) = 0; + + /** Sets the current attributes for entities. */ +/* void setExtrusion(double dx, double dy, double dz, double elevation) { + * extrusion->setDirection(dx, dy, dz); + * extrusion->setElevation(elevation); + * }*/ + + /** @return the current attributes used for new entities. */ +// DL_Extrusion* getExtrusion() { +// return extrusion; +// } + + virtual void writeHeader( DRW_Header& data ) = 0; + virtual void writeBlocks() = 0; + virtual void writeBlockRecords() = 0; + virtual void writeEntities() = 0; + virtual void writeLTypes() = 0; + virtual void writeLayers() = 0; + virtual void writeTextstyles() = 0; + virtual void writeVports() = 0; + virtual void writeDimstyles() = 0; + +protected: +// DL_Attributes attributes; +// DL_Extrusion *extrusion; +}; + +#endif diff --git a/lib_dxf/drw_objects.cpp b/lib_dxf/drw_objects.cpp new file mode 100644 index 0000000000..03f644c686 --- /dev/null +++ b/lib_dxf/drw_objects.cpp @@ -0,0 +1,1315 @@ +/****************************************************************************** +** libDXFrw - Library to read/write DXF files (ascii & binary) ** +** ** +** Copyright (C) 2011 Rallaz, rallazz@gmail.com ** +** ** +** This library is free software, licensed under the terms of the GNU ** +** General Public License as published by the Free Software Foundation, ** +** either version 2 of the License, or (at your option) any later version. ** +** You should have received a copy of the GNU General Public License ** +** along with this program. If not, see . ** +******************************************************************************/ + +#include +#include +#include "drw_objects.h" +#include "intern/dxfreader.h" +#include "intern/dxfwriter.h" + +// ! Base class for tables entries +/*! + * Base class for tables entries + * @author Rallaz + */ +void DRW_TableEntry::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 5: + handle = reader->getHandleString(); + break; + + case 330: + handleBlock = reader->getHandleString(); + break; + + case 2: + name = reader->getUtf8String(); + break; + + case 70: + flags = reader->getInt32(); + break; + + default: + break; + } +} + + +// ! Class to handle dimstyle entries +/*! + * Class to handle ldim style symbol table entries + * @author Rallaz + */ +void DRW_Dimstyle::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 105: + handle = reader->getHandleString(); + break; + + case 3: + dimpost = reader->getUtf8String(); + break; + + case 4: + dimapost = reader->getUtf8String(); + break; + + case 5: + dimblk = reader->getUtf8String(); + break; + + case 6: + dimblk1 = reader->getUtf8String(); + break; + + case 7: + dimblk2 = reader->getUtf8String(); + break; + + case 40: + dimscale = reader->getDouble(); + break; + + case 41: + dimasz = reader->getDouble(); + break; + + case 42: + dimexo = reader->getDouble(); + break; + + case 43: + dimdli = reader->getDouble(); + break; + + case 44: + dimexe = reader->getDouble(); + break; + + case 45: + dimrnd = reader->getDouble(); + break; + + case 46: + dimdle = reader->getDouble(); + break; + + case 47: + dimtp = reader->getDouble(); + break; + + case 48: + dimtm = reader->getDouble(); + break; + + case 140: + dimtxt = reader->getDouble(); + break; + + case 141: + dimcen = reader->getDouble(); + break; + + case 142: + dimtsz = reader->getDouble(); + break; + + case 143: + dimaltf = reader->getDouble(); + break; + + case 144: + dimlfac = reader->getDouble(); + break; + + case 145: + dimtvp = reader->getDouble(); + break; + + case 146: + dimtfac = reader->getDouble(); + break; + + case 147: + dimgap = reader->getDouble(); + break; + + case 148: + dimaltrnd = reader->getDouble(); + break; + + case 71: + dimtol = reader->getInt32(); + break; + + case 72: + dimlim = reader->getInt32(); + break; + + case 73: + dimtih = reader->getInt32(); + break; + + case 74: + dimtoh = reader->getInt32(); + break; + + case 75: + dimse1 = reader->getInt32(); + break; + + case 76: + dimse2 = reader->getInt32(); + break; + + case 77: + dimtad = reader->getInt32(); + break; + + case 78: + dimzin = reader->getInt32(); + break; + + case 79: + dimazin = reader->getInt32(); + break; + + case 170: + dimalt = reader->getInt32(); + break; + + case 171: + dimaltd = reader->getInt32(); + break; + + case 172: + dimtofl = reader->getInt32(); + break; + + case 173: + dimsah = reader->getInt32(); + break; + + case 174: + dimtix = reader->getInt32(); + break; + + case 175: + dimsoxd = reader->getInt32(); + break; + + case 176: + dimclrd = reader->getInt32(); + break; + + case 177: + dimclre = reader->getInt32(); + break; + + case 178: + dimclrt = reader->getInt32(); + break; + + case 179: + dimadec = reader->getInt32(); + break; + + case 270: + dimunit = reader->getInt32(); + break; + + case 271: + dimdec = reader->getInt32(); + break; + + case 272: + dimtdec = reader->getInt32(); + break; + + case 273: + dimaltu = reader->getInt32(); + break; + + case 274: + dimalttd = reader->getInt32(); + break; + + case 275: + dimaunit = reader->getInt32(); + break; + + case 276: + dimfrac = reader->getInt32(); + break; + + case 277: + dimlunit = reader->getInt32(); + break; + + case 278: + dimdsep = reader->getInt32(); + break; + + case 279: + dimtmove = reader->getInt32(); + break; + + case 280: + dimjust = reader->getInt32(); + break; + + case 281: + dimsd1 = reader->getInt32(); + break; + + case 282: + dimsd2 = reader->getInt32(); + break; + + case 283: + dimtolj = reader->getInt32(); + break; + + case 284: + dimtzin = reader->getInt32(); + break; + + case 285: + dimaltz = reader->getInt32(); + break; + + case 286: + dimaltttz = reader->getInt32(); + break; + + case 287: + dimfit = reader->getInt32(); + break; + + case 288: + dimupt = reader->getInt32(); + break; + + case 289: + dimatfit = reader->getInt32(); + break; + + case 340: + dimtxsty = reader->getUtf8String(); + break; + + case 341: + dimldrblk = reader->getUtf8String(); + break; + + case 342: + dimblk = reader->getUtf8String(); + break; + + case 343: + dimblk1 = reader->getUtf8String(); + break; + + case 344: + dimblk2 = reader->getUtf8String(); + break; + + default: + DRW_TableEntry::parseCode( code, reader ); + break; + } +} + + +// ! Class to handle line type entries +/*! + * Class to handle line type symbol table entries + * @author Rallaz + */ +void DRW_LType::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 3: + desc = reader->getUtf8String(); + break; + + case 73: + size = reader->getInt32(); + path.reserve( size ); + break; + + case 40: + length = reader->getDouble(); + break; + + case 49: + path.push_back( reader->getDouble() ); + pathIdx++; + break; + +/* case 74: + * haveShape = reader->getInt32(); + * break;*/ + default: + DRW_TableEntry::parseCode( code, reader ); + break; + } +} + + +// ! Update line type +/*! + * Update the size and length of line type acording to the path + * @author Rallaz + */ +/*TODO: control max length permited */ +void DRW_LType::update() +{ + double d = 0; + + size = path.size(); + + for( int i = 0; i< size; i++ ) + { + d += fabs( path.at( i ) ); + } + + length = d; +} + + +// ! Class to handle layer entries +/*! + * Class to handle layer symbol table entries + * @author Rallaz + */ +void DRW_Layer::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 6: + lineType = reader->getUtf8String(); + break; + + case 62: + color = reader->getInt32(); + break; + + case 290: + plotF = reader->getBool(); + break; + + case 370: + lWeight = DRW_LW_Conv::dxfInt2lineWidth( reader->getInt32() ); + break; + + case 390: + handlePlotS = reader->getString(); + break; + + case 347: + handlePlotM = reader->getString(); + break; + + case 420: + color24 = reader->getInt32(); + break; + + default: + DRW_TableEntry::parseCode( code, reader ); + break; + } +} + + +// ! Class to handle text style entries +/*! + * Class to handle text style symbol table entries + * @author Rallaz + */ +void DRW_Textstyle::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 3: + font = reader->getUtf8String(); + break; + + case 4: + bigFont = reader->getUtf8String(); + break; + + case 40: + height = reader->getDouble(); + break; + + case 41: + width = reader->getDouble(); + break; + + case 50: + oblique = reader->getDouble(); + break; + + case 42: + lastHeight = reader->getDouble(); + break; + + case 71: + genFlag = reader->getInt32(); + break; + + case 1071: + fontFamily = reader->getInt32(); + break; + + default: + DRW_TableEntry::parseCode( code, reader ); + break; + } +} + + +// ! Class to handle vport entries +/*! + * Class to handle vport symbol table entries + * @author Rallaz + */ +void DRW_Vport::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 10: + lowerLeft.x = reader->getDouble(); + break; + + case 20: + lowerLeft.y = reader->getDouble(); + break; + + case 11: + UpperRight.x = reader->getDouble(); + break; + + case 21: + UpperRight.y = reader->getDouble(); + break; + + case 12: + center.x = reader->getDouble(); + break; + + case 22: + center.y = reader->getDouble(); + break; + + case 13: + snapBase.x = reader->getDouble(); + break; + + case 23: + snapBase.y = reader->getDouble(); + break; + + case 14: + snapSpacing.x = reader->getDouble(); + break; + + case 24: + snapSpacing.y = reader->getDouble(); + break; + + case 15: + gridSpacing.x = reader->getDouble(); + break; + + case 25: + gridSpacing.y = reader->getDouble(); + break; + + case 16: + viewDir.x = reader->getDouble(); + break; + + case 26: + viewDir.y = reader->getDouble(); + break; + + case 36: + viewDir.z = reader->getDouble(); + break; + + case 17: + viewTarget.x = reader->getDouble(); + break; + + case 27: + viewTarget.y = reader->getDouble(); + break; + + case 37: + viewTarget.z = reader->getDouble(); + break; + + case 40: + height = reader->getDouble(); + break; + + case 41: + ratio = reader->getDouble(); + break; + + case 42: + lensHeight = reader->getDouble(); + break; + + case 43: + frontClip = reader->getDouble(); + break; + + case 44: + backClip = reader->getDouble(); + break; + + case 50: + snapAngle = reader->getDouble(); + break; + + case 51: + twistAngle = reader->getDouble(); + break; + + case 71: + viewMode = reader->getInt32(); + break; + + case 72: + circleZoom = reader->getInt32(); + break; + + case 73: + fastZoom = reader->getInt32(); + break; + + case 74: + ucsIcon = reader->getInt32(); + break; + + case 75: + snap = reader->getInt32(); + break; + + case 76: + grid = reader->getInt32(); + break; + + case 77: + snapStyle = reader->getInt32(); + break; + + case 78: + snapIsopair = reader->getInt32(); + break; + + default: + DRW_TableEntry::parseCode( code, reader ); + break; + } +} + + +void DRW_ImageDef::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 1: + name = reader->getUtf8String(); + break; + + case 5: + handle = reader->getString(); + break; + + case 10: + u = reader->getDouble(); + break; + + case 20: + v = reader->getDouble(); + break; + + case 11: + up = reader->getDouble(); + break; + + case 12: + vp = reader->getDouble(); + break; + + case 21: + vp = reader->getDouble(); + break; + + case 280: + loaded = reader->getInt32(); + break; + + case 281: + resolution = reader->getInt32(); + break; + + default: + break; + } +} + + +void DRW_Header::addComment( string c ) +{ + if( !comments.empty() ) + comments += '\n'; + + comments += c; +} + + +void DRW_Header::parseCode( int code, dxfReader* reader ) +{ + switch( code ) + { + case 9: + curr = new DRW_Variant(); + name = reader->getString(); + + if( version < DRW::AC1015 && name == "$DIMUNIT" ) + name = "$DIMLUNIT"; + + vars[name] = curr; + break; + + case 1: + curr->addString( reader->getUtf8String() ); + + if( name =="$ACADVER" ) + { + reader->setVersion( curr->content.s ); + version = reader->getVersion(); + } + + curr->code = code; + break; + + case 2: + curr->addString( reader->getUtf8String() ); + curr->code = code; + break; + + case 3: + curr->addString( reader->getUtf8String() ); + + if( name =="$DWGCODEPAGE" ) + { + reader->setCodePage( curr->content.s ); + curr->addString( reader->getCodePage() ); + } + + curr->code = code; + break; + + case 6: + curr->addString( reader->getUtf8String() ); + curr->code = code; + break; + + case 7: + curr->addString( reader->getUtf8String() ); + curr->code = code; + break; + + case 8: + curr->addString( reader->getUtf8String() ); + curr->code = code; + break; + + case 10: + curr->addCoord( new DRW_Coord() ); + curr->setCoordX( reader->getDouble() ); + curr->code = code; + break; + + case 20: + curr->setCoordY( reader->getDouble() ); + break; + + case 30: + curr->setCoordZ( reader->getDouble() ); + curr->code = code; + break; + + case 40: + curr->addDouble( reader->getDouble() ); + curr->code = code; + break; + + case 50: + curr->addDouble( reader->getDouble() ); + curr->code = code; + break; + + case 62: + curr->addInt( reader->getInt32() ); + curr->code = code; + break; + + case 70: + curr->addInt( reader->getInt32() ); + curr->code = code; + break; + + case 280: + curr->addInt( reader->getInt32() ); + curr->code = code; + break; + + case 290: + curr->addInt( reader->getInt32() ); + curr->code = code; + break; + + case 370: + curr->addInt( reader->getInt32() ); + curr->code = code; + break; + + case 380: + curr->addInt( reader->getInt32() ); + curr->code = code; + break; + + case 390: + curr->addString( reader->getUtf8String() ); + curr->code = code; + break; + + default: + break; + } +} + + +void DRW_Header::write( dxfWriter* writer, DRW::Version ver ) +{ +/*RLZ: TODO complete all vars to AC1024*/ + double varDouble; + int varInt; + std::string varStr; + DRW_Coord varCoord; + + writer->writeString( 2, "HEADER" ); + writer->writeString( 9, "$ACADVER" ); + + switch( ver ) + { + case DRW::AC1006: // unsupported version acad 10 + case DRW::AC1009: // acad 11 & 12 + varStr = "AC1009"; + break; + + case DRW::AC1012: // unsupported version acad 13 + case DRW::AC1014: // acad 14 + varStr = "AC1014"; + break; + + case DRW::AC1015: // acad 2000 + varStr = "AC1015"; + break; + + case DRW::AC1018: // acad 2004 + varStr = "AC1018"; + break; + +/* case DRW::AC1021: //acad 2007 + * varStr = "AC1021"; + * break;*/ + case DRW::AC1024: // acad 2010 + varStr = "AC1024"; + break; + + default: // acad 2007 default version + varStr = "AC1021"; + break; + } + + writer->writeString( 1, varStr ); + writer->setVersion( &varStr ); + + if( ver > DRW::AC1012 ) + { + writer->writeString( 9, "$HANDSEED" ); +// RLZ dxfHex(5, 0xFFFF); + writer->writeString( 5, "20000" ); + } + + if( !getStr( "$DWGCODEPAGE", &varStr ) ) + { + varStr = "ANSI_1252"; + } + + writer->writeString( 9, "$DWGCODEPAGE" ); + writer->setCodePage( &varStr ); + writer->writeString( 3, writer->getCodePage() ); + writer->writeString( 9, "$INSBASE" ); + + if( getCoord( "$INSBASE", &varCoord ) ) + { + writer->writeDouble( 10, varCoord.x ); + writer->writeDouble( 20, varCoord.y ); + writer->writeDouble( 30, varCoord.z ); + } + else + { + writer->writeDouble( 10, 0.0 ); + writer->writeDouble( 20, 0.0 ); + writer->writeDouble( 30, 0.0 ); + } + + writer->writeString( 9, "$EXTMIN" ); + + if( getCoord( "$EXTMIN", &varCoord ) ) + { + writer->writeDouble( 10, varCoord.x ); + writer->writeDouble( 20, varCoord.y ); + writer->writeDouble( 30, varCoord.z ); + } + else + { + writer->writeDouble( 10, 1.0000000000000000E+020 ); + writer->writeDouble( 20, 1.0000000000000000E+020 ); + writer->writeDouble( 30, 1.0000000000000000E+020 ); + } + + writer->writeString( 9, "$EXTMAX" ); + + if( getCoord( "$EXTMAX", &varCoord ) ) + { + writer->writeDouble( 10, varCoord.x ); + writer->writeDouble( 20, varCoord.y ); + writer->writeDouble( 30, varCoord.z ); + } + else + { + writer->writeDouble( 10, -1.0000000000000000E+020 ); + writer->writeDouble( 20, -1.0000000000000000E+020 ); + writer->writeDouble( 30, -1.0000000000000000E+020 ); + } + + writer->writeString( 9, "$LIMMIN" ); + + if( getCoord( "$LIMMIN", &varCoord ) ) + { + writer->writeDouble( 10, varCoord.x ); + writer->writeDouble( 20, varCoord.y ); + } + else + { + writer->writeDouble( 10, 0.0 ); + writer->writeDouble( 20, 0.0 ); + } + + writer->writeString( 9, "$LIMMAX" ); + + if( getCoord( "$LIMMAX", &varCoord ) ) + { + writer->writeDouble( 10, varCoord.x ); + writer->writeDouble( 20, varCoord.y ); + } + else + { + writer->writeDouble( 10, 420.0 ); + writer->writeDouble( 20, 297.0 ); + } + + writer->writeString( 9, "$ORTHOMODE" ); + + if( getInt( "$ORTHOMODE", &varInt ) ) + writer->writeInt16( 70, varInt ); + else + writer->writeInt16( 70, 0 ); + + writer->writeString( 9, "$LTSCALE" ); + + if( getDouble( "$LTSCALE", &varDouble ) ) + writer->writeDouble( 40, varDouble ); + else + writer->writeDouble( 40, 1.0 ); + + writer->writeString( 9, "$TEXTSTYLE" ); + + if( getStr( "$TEXTSTYLE", &varStr ) ) + if( ver == DRW::AC1009 ) + writer->writeUtf8Caps( 7, varStr ); + else + writer->writeUtf8String( 7, varStr ); + + + else + writer->writeString( 7, "STANDARD" ); + + writer->writeString( 9, "$DIMASZ" ); + + if( getDouble( "$DIMASZ", &varDouble ) ) + writer->writeDouble( 40, varDouble ); + else + writer->writeDouble( 40, 2.5 ); + + writer->writeString( 9, "$DIMSCALE" ); + + if( getDouble( "$DIMSCALE", &varDouble ) ) + writer->writeDouble( 40, varDouble ); + else + writer->writeDouble( 40, 1.0 ); + + writer->writeString( 9, "$DIMEXO" ); + + if( getDouble( "$DIMEXO", &varDouble ) ) + writer->writeDouble( 40, varDouble ); + else + writer->writeDouble( 40, 0.625 ); + + writer->writeString( 9, "$DIMEXE" ); + + if( getDouble( "$DIMEXE", &varDouble ) ) + writer->writeDouble( 40, varDouble ); + else + writer->writeDouble( 40, 1.25 ); + + writer->writeString( 9, "$DIMTXT" ); + + if( getDouble( "$DIMTXT", &varDouble ) ) + writer->writeDouble( 40, varDouble ); + else + writer->writeDouble( 40, 2.5 ); + + writer->writeString( 9, "$DIMTSZ" ); + + if( getDouble( "$DIMTSZ", &varDouble ) ) + writer->writeDouble( 40, varDouble ); + else + writer->writeDouble( 40, 0.0 ); + + if( ver > DRW::AC1009 ) + { + writer->writeString( 9, "$DIMAUNIT" ); + + if( getInt( "$DIMAUNIT", &varInt ) ) + writer->writeInt16( 70, varInt ); + else + writer->writeInt16( 70, 0 ); + + writer->writeString( 9, "$DIMADEC" ); + + if( getInt( "$DIMADEC", &varInt ) ) + writer->writeInt16( 70, varInt ); + else + writer->writeInt16( 70, 0 ); + } + + // verify if exist "$DIMLUNIT" or obsolete "$DIMUNIT" (pre v2000) + if( !getInt( "$DIMLUNIT", &varInt ) ) + { + if( !getInt( "$DIMUNIT", &varInt ) ) + varInt = 2; + } + + // verify valid values from 1 to 6 + if( varInt<1 || varInt>6 ) + varInt = 2; + + if( ver > DRW::AC1014 ) + { + writer->writeString( 9, "$DIMLUNIT" ); + writer->writeInt16( 70, varInt ); + } + else + { + writer->writeString( 9, "$DIMUNIT" ); + writer->writeInt16( 70, varInt ); + } + + writer->writeString( 9, "$DIMSTYLE" ); + + if( getStr( "$DIMSTYLE", &varStr ) ) + if( ver == DRW::AC1009 ) + writer->writeUtf8Caps( 2, varStr ); + else + writer->writeUtf8String( 2, varStr ); + + + else + writer->writeString( 2, "STANDARD" ); + + writer->writeString( 9, "$DIMGAP" ); + + if( getDouble( "$DIMGAP", &varDouble ) ) + writer->writeDouble( 40, varDouble ); + else + writer->writeDouble( 40, 0.625 ); + + writer->writeString( 9, "$DIMTIH" ); + + if( getInt( "$DIMTIH", &varInt ) ) + writer->writeInt16( 70, varInt ); + else + writer->writeInt16( 70, 0 ); + + writer->writeString( 9, "$LUNITS" ); + + if( getInt( "$LUNITS", &varInt ) ) + writer->writeInt16( 70, varInt ); + else + writer->writeInt16( 70, 2 ); + + writer->writeString( 9, "$LUPREC" ); + + if( getInt( "$LUPREC", &varInt ) ) + writer->writeInt16( 70, varInt ); + else + writer->writeInt16( 70, 4 ); + + writer->writeString( 9, "$AUNITS" ); + + if( getInt( "$AUNITS", &varInt ) ) + writer->writeInt16( 70, varInt ); + else + writer->writeInt16( 70, 0 ); + + writer->writeString( 9, "$AUPREC" ); + + if( getInt( "$AUPREC", &varInt ) ) + writer->writeInt16( 70, varInt ); + else + writer->writeInt16( 70, 2 ); + + if( ver > DRW::AC1009 ) + { + writer->writeString( 9, "$SPLINESEGS" ); + + if( getInt( "$SPLINESEGS", &varInt ) ) + { + writer->writeInt16( 70, varInt ); + } + else + writer->writeInt16( 70, 8 ); + } + +/* RLZ: moved to active VPORT, but can write in header if present*/ + if( getInt( "$GRIDMODE", &varInt ) ) + { + writer->writeString( 9, "$GRIDMODE" ); + writer->writeInt16( 70, varInt ); + } + + if( getInt( "$SNAPSTYLE", &varInt ) ) + { + writer->writeString( 9, "$SNAPSTYLE" ); + writer->writeInt16( 70, varInt ); + } + + if( getCoord( "$GRIDUNIT", &varCoord ) ) + { + writer->writeString( 9, "$GRIDUNIT" ); + writer->writeDouble( 10, varCoord.x ); + writer->writeDouble( 20, varCoord.y ); + } + + if( getCoord( "$VIEWCTR", &varCoord ) ) + { + writer->writeString( 9, "$VIEWCTR" ); + writer->writeDouble( 10, varCoord.x ); + writer->writeDouble( 20, varCoord.y ); + } + +/* RLZ: moved to active VPORT, but can write in header if present*/ + + if( ver > DRW::AC1009 ) + { + writer->writeString( 9, "$PINSBASE" ); + + if( getCoord( "$PINSBASE", &varCoord ) ) + { + writer->writeDouble( 10, varCoord.x ); + writer->writeDouble( 20, varCoord.y ); + writer->writeDouble( 30, varCoord.z ); + } + else + { + writer->writeDouble( 10, 0.0 ); + writer->writeDouble( 20, 0.0 ); + writer->writeDouble( 30, 0.0 ); + } + } + + writer->writeString( 9, "$PLIMMIN" ); + + if( getCoord( "$PLIMMIN", &varCoord ) ) + { + writer->writeDouble( 10, varCoord.x ); + writer->writeDouble( 20, varCoord.y ); + } + else + { + writer->writeDouble( 10, 0.0 ); + writer->writeDouble( 20, 0.0 ); + } + + writer->writeString( 9, "$PLIMMAX" ); + + if( getCoord( "$PLIMMAX", &varCoord ) ) + { + writer->writeDouble( 10, varCoord.x ); + writer->writeDouble( 20, varCoord.y ); + } + else + { + writer->writeDouble( 10, 297.0 ); + writer->writeDouble( 20, 210.0 ); + } + + if( ver > DRW::AC1014 ) + { + writer->writeString( 9, "$INSUNITS" ); + + if( getInt( "$INSUNITS", &varInt ) ) + writer->writeInt16( 70, varInt ); + else + writer->writeInt16( 70, 0 ); + } + + if( ver > DRW::AC1009 ) + { + writer->writeString( 9, "$PSVPSCALE" ); + + if( getDouble( "$PSVPSCALE", &varDouble ) ) + writer->writeDouble( 40, varDouble ); + else + writer->writeDouble( 40, 0.0 ); + } + + std::map::const_iterator it; + + for( it = vars.begin(); it != vars.end(); it++ ) + { + std::cerr << (*it).first << std::endl; + } +} + + +bool DRW_Header::getDouble( string key, double* varDouble ) +{ + bool result = false; + std::map::iterator it; + + it = vars.find( key ); + + if( it != vars.end() ) + { + DRW_Variant* var = (*it).second; + + if( var->type == DRW_Variant::DOUBLE ) + { + *varDouble = var->content.d; + result = true; + } + + vars.erase( it ); + } + + return result; +} + + +bool DRW_Header::getInt( string key, int* varInt ) +{ + bool result = false; + std::map::iterator it; + + it = vars.find( key ); + + if( it != vars.end() ) + { + DRW_Variant* var = (*it).second; + + if( var->type == DRW_Variant::INTEGER ) + { + *varInt = var->content.i; + result = true; + } + + vars.erase( it ); + } + + return result; +} + + +bool DRW_Header::getStr( string key, std::string* varStr ) +{ + bool result = false; + std::map::iterator it; + + it = vars.find( key ); + + if( it != vars.end() ) + { + DRW_Variant* var = (*it).second; + + if( var->type == DRW_Variant::STRING ) + { + *varStr = *var->content.s; + result = true; + } + + vars.erase( it ); + } + + return result; +} + + +bool DRW_Header::getCoord( string key, DRW_Coord* varCoord ) +{ + bool result = false; + std::map::iterator it; + + it = vars.find( key ); + + if( it != vars.end() ) + { + DRW_Variant* var = (*it).second; + + if( var->type == DRW_Variant::COORD ) + { + *varCoord = *var->content.v; + result = true; + } + + vars.erase( it ); + } + + return result; +} diff --git a/lib_dxf/drw_objects.h b/lib_dxf/drw_objects.h new file mode 100644 index 0000000000..502a507245 --- /dev/null +++ b/lib_dxf/drw_objects.h @@ -0,0 +1,680 @@ +/****************************************************************************** +** libDXFrw - Library to read/write DXF files (ascii & binary) ** +** ** +** Copyright (C) 2011 Rallaz, rallazz@gmail.com ** +** ** +** This library is free software, licensed under the terms of the GNU ** +** General Public License as published by the Free Software Foundation, ** +** either version 2 of the License, or (at your option) any later version. ** +** You should have received a copy of the GNU General Public License ** +** along with this program. If not, see . ** +******************************************************************************/ + +#ifndef DRW_OBJECTS_H +#define DRW_OBJECTS_H + + +#include +#include +#include +#include "drw_base.h" + +class dxfReader; +class dxfWriter; + +using std::string; + +namespace DRW { +// ! Table entries type. +enum TTYPE { + UNKNOWNT, + LTYPE, + LAYER, + STYLE, + DIMSTYLE, + VPORT, + BLOCK_RECORD +}; +} + +// ! Base class for tables entries +/*! + * Base class for tables entries + * @author Rallaz + */ +class DRW_TableEntry +{ +public: + // initializes default values + DRW_TableEntry() + { + tType = DRW::UNKNOWNT; + flags = 0; + } + + virtual ~DRW_TableEntry() {} +protected: + void parseCode( int code, dxfReader* reader ); + +public: + enum DRW::TTYPE tType; /*!< enum: entity type, code 0 */ + int handle; /*!< entity identifier, code 5 */ + int handleBlock; /*!< Soft-pointer ID/handle to owner BLOCK_RECORD object, code 330 */ + UTF8STRING name; /*!< entry name, code 2 */ + int flags; /*!< Flags relevant to entry, code 70 */ +}; + + +// ! Class to handle dimstyle entries +/*! + * Class to handle dim style symbol table entries + * @author Rallaz + */ +class DRW_Dimstyle : public DRW_TableEntry +{ +public: + DRW_Dimstyle() { reset(); } + + void reset() + { + tType = DRW::DIMSTYLE; + dimasz = dimtxt = dimexe = 0.18; + dimexo = 0.0625; + dimgap = dimcen = 0.09; + dimtxsty = "Standard"; + dimscale = dimlfac = dimtfac = 1.0; + dimdli = 0.38; + dimrnd = dimdle = dimtp = dimtm = dimtsz = dimtvp = 0.0; + dimaltf = 25.4; + dimtol = dimlim = dimse1 = dimse2 = dimtad = dimzin = 0; + dimtoh = dimtolj = 1; + dimalt = dimtofl = dimsah = dimtix = dimsoxd = 0; + dimaltd = dimunit = dimaltu = dimalttd = dimlunit = 2; + dimclrd = dimclre = dimclrt = dimjust = dimupt = 0; + dimazin = dimaltz = dimaltttz = dimtzin = dimfrac = 0; + dimtih = dimadec = dimaunit = dimsd1 = dimsd2 = dimtmove = 0; + dimaltrnd = 0.0; + dimdec = dimtdec = 4; + dimfit = dimatfit = 3; + dimdsep = '.'; + dimlwd = dimlwe = -2; + } + + void parseCode( int code, dxfReader* reader ); + +public: + // V12 + UTF8STRING dimpost; /*!< code 3 */ + UTF8STRING dimapost; /*!< code 4 */ +/* handle are code 105 */ + UTF8STRING dimblk; /*!< code 5, code 342 V2000+ */ + UTF8STRING dimblk1; /*!< code 6, code 343 V2000+ */ + UTF8STRING dimblk2; /*!< code 7, code 344 V2000+ */ + double dimscale; /*!< code 40 */ + double dimasz; /*!< code 41 */ + double dimexo; /*!< code 42 */ + double dimdli; /*!< code 43 */ + double dimexe; /*!< code 44 */ + double dimrnd; /*!< code 45 */ + double dimdle; /*!< code 46 */ + double dimtp; /*!< code 47 */ + double dimtm; /*!< code 48 */ + double dimtxt; /*!< code 140 */ + double dimcen; /*!< code 141 */ + double dimtsz; /*!< code 142 */ + double dimaltf; /*!< code 143 */ + double dimlfac; /*!< code 144 */ + double dimtvp; /*!< code 145 */ + double dimtfac; /*!< code 146 */ + double dimgap; /*!< code 147 */ + double dimaltrnd; /*!< code 148 V2000+ */ + int dimtol; /*!< code 71 */ + int dimlim; /*!< code 72 */ + int dimtih; /*!< code 73 */ + int dimtoh; /*!< code 74 */ + int dimse1; /*!< code 75 */ + int dimse2; /*!< code 76 */ + int dimtad; /*!< code 77 */ + int dimzin; /*!< code 78 */ + int dimazin; /*!< code 79 V2000+ */ + int dimalt; /*!< code 170 */ + int dimaltd; /*!< code 171 */ + int dimtofl; /*!< code 172 */ + int dimsah; /*!< code 173 */ + int dimtix; /*!< code 174 */ + int dimsoxd; /*!< code 175 */ + int dimclrd; /*!< code 176 */ + int dimclre; /*!< code 177 */ + int dimclrt; /*!< code 178 */ + int dimadec; /*!< code 179 V2000+ */ + int dimunit; /*!< code 270 R13+ (obsolete 2000+, use dimlunit & dimfrac) */ + int dimdec; /*!< code 271 R13+ */ + int dimtdec; /*!< code 272 R13+ */ + int dimaltu; /*!< code 273 R13+ */ + int dimalttd; /*!< code 274 R13+ */ + int dimaunit; /*!< code 275 R13+ */ + int dimfrac; /*!< code 276 V2000+ */ + int dimlunit; /*!< code 277 V2000+ */ + int dimdsep; /*!< code 278 V2000+ */ + int dimtmove; /*!< code 279 V2000+ */ + int dimjust; /*!< code 280 R13+ */ + int dimsd1; /*!< code 281 R13+ */ + int dimsd2; /*!< code 282 R13+ */ + int dimtolj; /*!< code 283 R13+ */ + int dimtzin; /*!< code 284 R13+ */ + int dimaltz; /*!< code 285 R13+ */ + int dimaltttz; /*!< code 286 R13+ */ + int dimfit; /*!< code 287 R13+ (obsolete 2000+, use dimatfit & dimtmove)*/ + int dimupt; /*!< code 288 R13+ */ + int dimatfit; /*!< code 289 V2000+ */ + UTF8STRING dimtxsty; /*!< code 340 R13+ */ + UTF8STRING dimldrblk; /*!< code 341 V2000+ */ + int dimlwd; /*!< code 371 V2000+ */ + int dimlwe; /*!< code 372 V2000+ */ +}; + + +// ! Class to handle line type entries +/*! + * Class to handle line type symbol table entries + * @author Rallaz + */ +/*TODO: handle complex lineType*/ +class DRW_LType : public DRW_TableEntry +{ +public: + DRW_LType() { reset(); } + + void reset() + { + tType = DRW::LTYPE; + desc = ""; + size = 0; + length = 0.0; + pathIdx = 0; +/* color = 256; // default BYLAYER (256) + * plotF = true; // default TRUE (plot yes) + * lWeight = -1; // default BYLAYER (-1)*/ +// align = 65; //always 65 + } + + void parseCode( int code, dxfReader* reader ); + void update(); + +public: + UTF8STRING desc; /*!< descriptive string, code 3 */ +// int align; /*!< align code, always 65 ('A') code 72 */ + int size; /*!< element number, code 73 */ + double length; /*!< total length of pattern, code 40 */ +// int haveShape; /*!< complex linetype type, code 74 */ + std::vector path; /*!< trace, point or space length sequence, code 49 */ +private: + int pathIdx; +}; + + +// ! Class to handle layer entries +/*! + * Class to handle layer symbol table entries + * @author Rallaz + */ +class DRW_Layer : public DRW_TableEntry +{ +public: + DRW_Layer() { reset(); } + + void reset() + { + tType = DRW::LAYER; + lineType = "CONTINUOUS"; + color = 7; // default BYLAYER (256) + plotF = true; // default TRUE (plot yes) + lWeight = DRW_LW_Conv::widthDefault; // default BYDEFAULT (dxf -3, dwg 31) + color24 = -1; // default -1 not set + } + + void parseCode( int code, dxfReader* reader ); + +public: + UTF8STRING lineType; /*!< line type, code 6 */ + int color; /*!< layer color, code 62 */ + int color24; /*!< 24-bit color, code 420 */ + bool plotF; /*!< Plot flag, code 290 */ + enum DRW_LW_Conv::lineWidth lWeight; /*!< layer lineweight, code 370 */ + string handlePlotS; /*!< Hard-pointer ID/handle of plotstyle, code 390 */ + string handlePlotM; /*!< Hard-pointer ID/handle of materialstyle, code 347 */ +}; + +// ! Class to handle text style entries +/*! + * Class to handle text style symbol table entries + * @author Rallaz + */ +class DRW_Textstyle : public DRW_TableEntry +{ +public: + DRW_Textstyle() { reset(); } + + void reset() + { + tType = DRW::STYLE; + height = oblique = 0.0; + width = lastHeight = 1.0; + font = "txt"; + genFlag = 0; // 2= X mirror, 4= Y mirror + fontFamily = 0; + } + + void parseCode( int code, dxfReader* reader ); + +public: + double height; /*!< Fixed text height (0 not set), code 40 */ + double width; /*!< Width factor, code 41 */ + double oblique; /*!< Oblique angle, code 50 */ + int genFlag; /*!< Text generation flags, code 71 */ + double lastHeight; /*!< Last height used, code 42 */ + UTF8STRING font; /*!< primary font file name, code 3 */ + UTF8STRING bigFont; /*!< bigfont file name or blank if none, code 4 */ + int fontFamily; /*!< ttf font family, italic and bold flags, code 1071 */ +}; + +// ! Class to handle vport entries +/*! + * Class to handle vport symbol table entries + * @author Rallaz + */ +class DRW_Vport : public DRW_TableEntry +{ +public: + DRW_Vport() { reset(); } + + void reset() + { + UpperRight.x = UpperRight.y = 1.0; + snapSpacing.x = snapSpacing.y = 10.0; + gridSpacing = snapSpacing; + center.x = 0.651828; + center.y = -0.16; + viewDir.z = 1; + height = 5.13732; + ratio = 2.4426877; + lensHeight = 50; + frontClip = backClip = snapAngle = twistAngle = 0.0; + viewMode = snap = grid = snapStyle = snapIsopair = 0; + fastZoom = 1; + circleZoom = 100; + ucsIcon = 3; + gridBehavior = 7; + } + + void parseCode( int code, dxfReader* reader ); + +public: + DRW_Coord lowerLeft; /*!< Lower left corner, code 10 & 20 */ + DRW_Coord UpperRight; /*!< Upper right corner, code 11 & 21 */ + DRW_Coord center; /*!< center point in WCS, code 12 & 22 */ + DRW_Coord snapBase; /*!< snap base point in DCS, code 13 & 23 */ + DRW_Coord snapSpacing; /*!< snap Spacing, code 14 & 24 */ + DRW_Coord gridSpacing; /*!< grid Spacing, code 15 & 25 */ + DRW_Coord viewDir; /*!< view direction from target point, code 16, 26 & 36 */ + DRW_Coord viewTarget; /*!< view target point, code 17, 27 & 37 */ + double height; /*!< view height, code 40 */ + double ratio; /*!< viewport aspect ratio, code 41 */ + double lensHeight; /*!< lens height, code 42 */ + double frontClip; /*!< front clipping plane, code 43 */ + double backClip; /*!< back clipping plane, code 44 */ + double snapAngle; /*!< snap rotation angle, code 50 */ + double twistAngle; /*!< view twist angle, code 51 */ + int viewMode; /*!< view mode, code 71 */ + int circleZoom; /*!< circle zoom percent, code 72 */ + int fastZoom; /*!< fast zoom setting, code 73 */ + int ucsIcon; /*!< UCSICON setting, code 74 */ + int snap; /*!< snap on/off, code 75 */ + int grid; /*!< grid on/off, code 76 */ + int snapStyle; /*!< snap style, code 77 */ + int snapIsopair; /*!< snap isopair, code 78 */ + int gridBehavior; /*!< grid behavior, code 60, undocummented */ + /** code 60, bit coded possible value are + * bit 1 (1) show out of limits + * bit 2 (2) adaptive grid + * bit 3 (4) allow subdivision + * bit 4 (8) follow dinamic SCP + **/ +}; + + +// ! Class to handle imagedef entries +/*! + * Class to handle image definitions object entries + * @author Rallaz + */ +class DRW_ImageDef +{ +public: + DRW_ImageDef() + { + version = 0; + } + + void parseCode( int code, dxfReader* reader ); + +public: + string handle; /*!< entity identifier, code 5 */ + UTF8STRING name; /*!< File name of image, code 1 */ + int version; /*!< class version, code 90, 0=R14 version */ + double u; /*!< image size in pixels U value, code 10 */ + double v; /*!< image size in pixels V value, code 20 */ + double up; /*!< default size of one pixel U value, code 11 */ + double vp; /*!< default size of one pixel V value, code 12 really is 21*/ + int loaded; /*!< image is loaded flag, code 280, 0=unloaded, 1=loaded */ + int resolution; /*!< resolution units, code 281, 0=no, 2=centimeters, 5=inch */ + + std::map reactors; +}; + + +// ! Class to handle header entries +/*! + * Class to handle layer symbol table entries + * @author Rallaz + */ +class DRW_Header +{ +public: + DRW_Header() + { + } + + ~DRW_Header() + { + vars.clear(); + } + + void parseCode( int code, dxfReader* reader ); + void write( dxfWriter* writer, DRW::Version ver ); + void addComment( string c ); + + string getComments() const { return comments; } +private: + bool getDouble( string key, double* varDouble ); + bool getInt( string key, int* varInt ); + bool getStr( string key, string* varStr ); + bool getCoord( string key, DRW_Coord* varStr ); + +public: + std::map vars; +private: + string comments; + string name; + DRW_Variant* curr; + int version; // to use on read +}; + +namespace DRW { +// Extended color palette: +// The first entry is only for direct indexing starting with [1] +// Color 1 is red (1,0,0) +const unsigned char dxfColors[][3] = +{ + { 0, 0, 0 }, // unused + { 255, 0, 0 }, // 1 red + { 255, 255, 0 }, // 2 yellow + { 0, 255, 0 }, // 3 green + { 0, 255, 255 }, // 4 cyan + { 0, 0, 255 }, // 5 blue + { 255, 0, 255 }, // 6 magenta + { 0, 0, 0 }, // 7 black or white + { 128, 128, 128 }, // 8 50% gray + { 192, 192, 192 }, // 9 75% gray + { 255, 0, 0 }, // 10 + { 255, 127, 127 }, + { 204, 0, 0 }, + { 204, 102, 102 }, + { 153, 0, 0 }, + { 153, 76, 76 }, // 15 + { 127, 0, 0 }, + { 127, 63, 63 }, + { 76, 0, 0 }, + { 76, 38, 38 }, + { 255, 63, 0 }, // 20 + { 255, 159, 127 }, + { 204, 51, 0 }, + { 204, 127, 102 }, + { 153, 38, 0 }, + { 153, 95, 76 }, // 25 + { 127, 31, 0 }, + { 127, 79, 63 }, + { 76, 19, 0 }, + { 76, 47, 38 }, + { 255, 127, 0 }, // 30 + { 255, 191, 127 }, + { 204, 102, 0 }, + { 204, 153, 102 }, + { 153, 76, 0 }, + { 153, 114, 76 }, // 35 + { 127, 63, 0 }, + { 127, 95, 63 }, + { 76, 38, 0 }, + { 76, 57, 38 }, + { 255, 191, 0 }, // 40 + { 255, 223, 127 }, + { 204, 153, 0 }, + { 204, 178, 102 }, + { 153, 114, 0 }, + { 153, 133, 76 }, // 45 + { 127, 95, 0 }, + { 127, 111, 63 }, + { 76, 57, 0 }, + { 76, 66, 38 }, + { 255, 255, 0 }, // 50 + { 255, 255, 127 }, + { 204, 204, 0 }, + { 204, 204, 102 }, + { 153, 153, 0 }, + { 153, 153, 76 }, // 55 + { 127, 127, 0 }, + { 127, 127, 63 }, + { 76, 76, 0 }, + { 76, 76, 38 }, + { 191, 255, 0 }, // 60 + { 223, 255, 127 }, + { 153, 204, 0 }, + { 178, 204, 102 }, + { 114, 153, 0 }, + { 133, 153, 76 }, // 65 + { 95, 127, 0 }, + { 111, 127, 63 }, + { 57, 76, 0 }, + { 66, 76, 38 }, + { 127, 255, 0 }, // 70 + { 191, 255, 127 }, + { 102, 204, 0 }, + { 153, 204, 102 }, + { 76, 153, 0 }, + { 114, 153, 76 }, // 75 + { 63, 127, 0 }, + { 95, 127, 63 }, + { 38, 76, 0 }, + { 57, 76, 38 }, + { 63, 255, 0 }, // 80 + { 159, 255, 127 }, + { 51, 204, 0 }, + { 127, 204, 102 }, + { 38, 153, 0 }, + { 95, 153, 76 }, // 85 + { 31, 127, 0 }, + { 79, 127, 63 }, + { 19, 76, 0 }, + { 47, 76, 38 }, + { 0, 255, 0 }, // 90 + { 127, 255, 127 }, + { 0, 204, 0 }, + { 102, 204, 102 }, + { 0, 153, 0 }, + { 76, 153, 76 }, // 95 + { 0, 127, 0 }, + { 63, 127, 63 }, + { 0, 76, 0 }, + { 38, 76, 38 }, + { 0, 255, 63 }, // 100 + { 127, 255, 159 }, + { 0, 204, 51 }, + { 102, 204, 127 }, + { 0, 153, 38 }, + { 76, 153, 95 }, // 105 + { 0, 127, 31 }, + { 63, 127, 79 }, + { 0, 76, 19 }, + { 38, 76, 47 }, + { 0, 255, 127 }, // 110 + { 127, 255, 191 }, + { 0, 204, 102 }, + { 102, 204, 153 }, + { 0, 153, 76 }, + { 76, 153, 114 }, // 115 + { 0, 127, 63 }, + { 63, 127, 95 }, + { 0, 76, 38 }, + { 38, 76, 57 }, + { 0, 255, 191 }, // 120 + { 127, 255, 223 }, + { 0, 204, 153 }, + { 102, 204, 178 }, + { 0, 153, 114 }, + { 76, 153, 133 }, // 125 + { 0, 127, 95 }, + { 63, 127, 111 }, + { 0, 76, 57 }, + { 38, 76, 66 }, + { 0, 255, 255 }, // 130 + { 127, 255, 255 }, + { 0, 204, 204 }, + { 102, 204, 204 }, + { 0, 153, 153 }, + { 76, 153, 153 }, // 135 + { 0, 127, 127 }, + { 63, 127, 127 }, + { 0, 76, 76 }, + { 38, 76, 76 }, + { 0, 191, 255 }, // 140 + { 127, 223, 255 }, + { 0, 153, 204 }, + { 102, 178, 204 }, + { 0, 114, 153 }, + { 76, 133, 153 }, // 145 + { 0, 95, 127 }, + { 63, 111, 127 }, + { 0, 57, 76 }, + { 38, 66, 76 }, + { 0, 127, 255 }, // 150 + { 127, 191, 255 }, + { 0, 102, 204 }, + { 102, 153, 204 }, + { 0, 76, 153 }, + { 76, 114, 153 }, // 155 + { 0, 63, 127 }, + { 63, 95, 127 }, + { 0, 38, 76 }, + { 38, 57, 76 }, + { 0, 66, 255 }, // 160 + { 127, 159, 255 }, + { 0, 51, 204 }, + { 102, 127, 204 }, + { 0, 38, 153 }, + { 76, 95, 153 }, // 165 + { 0, 31, 127 }, + { 63, 79, 127 }, + { 0, 19, 76 }, + { 38, 47, 76 }, + { 0, 0, 255 }, // 170 + { 127, 127, 255 }, + { 0, 0, 204 }, + { 102, 102, 204 }, + { 0, 0, 153 }, + { 76, 76, 153 }, // 175 + { 0, 0, 127 }, + { 63, 63, 127 }, + { 0, 0, 76 }, + { 38, 38, 76 }, + { 63, 0, 255 }, // 180 + { 159, 127, 255 }, + { 50, 0, 204 }, + { 127, 102, 204 }, + { 38, 0, 153 }, + { 95, 76, 153 }, // 185 + { 31, 0, 127 }, + { 79, 63, 127 }, + { 19, 0, 76 }, + { 47, 38, 76 }, + { 127, 0, 255 }, // 190 + { 191, 127, 255 }, + { 102, 0, 204 }, + { 153, 102, 204 }, + { 76, 0, 153 }, + { 114, 76, 153 }, // 195 + { 63, 0, 127 }, + { 95, 63, 127 }, + { 38, 0, 76 }, + { 57, 38, 76 }, + { 191, 0, 255 }, // 200 + { 223, 127, 255 }, + { 153, 0, 204 }, + { 178, 102, 204 }, + { 114, 0, 153 }, + { 133, 76, 153 }, // 205 + { 95, 0, 127 }, + { 111, 63, 127 }, + { 57, 0, 76 }, + { 66, 38, 76 }, + { 255, 0, 255 }, // 210 + { 255, 127, 255 }, + { 204, 0, 204 }, + { 204, 102, 204 }, + { 153, 0, 153 }, + { 153, 76, 153 }, // 215 + { 127, 0, 127 }, + { 127, 63, 127 }, + { 76, 0, 76 }, + { 76, 38, 76 }, + { 255, 0, 191 }, // 220 + { 255, 127, 223 }, + { 204, 0, 153 }, + { 204, 102, 178 }, + { 153, 0, 114 }, + { 153, 76, 133 }, // 225 + { 127, 0, 95 }, + { 127, 63, 11 }, + { 76, 0, 57 }, + { 76, 38, 66 }, + { 255, 0, 127 }, // 230 + { 255, 127, 191 }, + { 204, 0, 102 }, + { 204, 102, 153 }, + { 153, 0, 76 }, + { 153, 76, 114 }, // 235 + { 127, 0, 63 }, + { 127, 63, 95 }, + { 76, 0, 38 }, + { 76, 38, 57 }, + { 255, 0, 63 }, // 240 + { 255, 127, 159 }, + { 204, 0, 51 }, + { 204, 102, 127 }, + { 153, 0, 38 }, + { 153, 76, 95 }, // 245 + { 127, 0, 31 }, + { 127, 63, 79 }, + { 76, 0, 19 }, + { 76, 38, 47 }, + { 51, 51, 51 }, // 250 + { 91, 91, 91 }, + { 132, 132, 132 }, + { 173, 173, 173 }, + { 214, 214, 214 }, + { 255, 255, 255 } // 255 +}; +} + +#endif + +// EOF diff --git a/lib_dxf/intern/drw_cptable932.h b/lib_dxf/intern/drw_cptable932.h new file mode 100644 index 0000000000..0d9be10530 --- /dev/null +++ b/lib_dxf/intern/drw_cptable932.h @@ -0,0 +1,7812 @@ +#ifndef DRW_CPTABLE932_H +#define DRW_CPTABLE932_H + +//Japanese + +//first entry in this table are 0xA1 +#define CPOFFSET932 0xFEC0 +//#define CP1LENGHT932 63 +#define CPLENGHT932 7724 +#define NOTFOUND932 0x30FB + +//Table 932 one byte are +//from 0xA1 -> 0xFF61 +//to 0xDF .> 0xFF9F +static const int DRW_Table932[1] = { +}; + +//Table 932 lead byte +//pairs of start/end in DRW_DoubleTable932 +static const int DRW_LeadTable932[] = { + 0, //1 #DBCS LEAD BYTE 0x81 + 147, //2 #DBCS LEAD BYTE 0x82 + 292, //3 #DBCS LEAD BYTE 0x83 + 426, //4 #DBCS LEAD BYTE 0x84 + 524, //5 #DBCS LEAD BYTE 0x85, empty + 524, //6 #DBCS LEAD BYTE 0x86, empty + 524, //7 #DBCS LEAD BYTE 0x87 + 607, //8 #DBCS LEAD BYTE 0x88 + 701, //9 #DBCS LEAD BYTE 0x89 + 889, //10 #DBCS LEAD BYTE 0x8A + 1077, //11 #DBCS LEAD BYTE 0x8B + 1265, //12 #DBCS LEAD BYTE 0x8C + 1453, //13 #DBCS LEAD BYTE 0x8D + 1641, //14 #DBCS LEAD BYTE 0x8E + 1829, //15 #DBCS LEAD BYTE 0x8F + 2017, //16 #DBCS LEAD BYTE 0x90 + 2205, //17 #DBCS LEAD BYTE 0x91 + 2393, //18 #DBCS LEAD BYTE 0x92 + 2581, //19 #DBCS LEAD BYTE 0x93 + 2769, //20 #DBCS LEAD BYTE 0x94 + 2957, //21 #DBCS LEAD BYTE 0x95 + 3145, //22 #DBCS LEAD BYTE 0x96 + 3333, //23 #DBCS LEAD BYTE 0x97 + 3521, //24 #DBCS LEAD BYTE 0x98 + 3666, //25 #DBCS LEAD BYTE 0x99 + 3854, //26 #DBCS LEAD BYTE 0x9A + 4042, //27 #DBCS LEAD BYTE 0x9B + 4230, //28 #DBCS LEAD BYTE 0x9C + 4418, //29 #DBCS LEAD BYTE 0x9D + 4606, //30 #DBCS LEAD BYTE 0x9E + 4794, //31 #DBCS LEAD BYTE 0x9F +//0xA0 to 0xDF are empty + 4982, //32 #DBCS LEAD BYTE 0xE0 + 5170, //33 #DBCS LEAD BYTE 0xE1 + 5358, //34 #DBCS LEAD BYTE 0xE2 + 5546, //35 #DBCS LEAD BYTE 0xE3 + 5734, //36 #DBCS LEAD BYTE 0xE4 + 5922, //37 #DBCS LEAD BYTE 0xE5 + 6110, //38 #DBCS LEAD BYTE 0xE6 + 6298, //39 #DBCS LEAD BYTE 0xE7 + 6486, //40 #DBCS LEAD BYTE 0xE8 + 6674, //41 #DBCS LEAD BYTE 0xE9 + 6862, //42 #DBCS LEAD BYTE 0xEA + 6962, //43 #DBCS LEAD BYTE 0xEB, empty + 6962, //44 #DBCS LEAD BYTE 0xEC, empty + 6962, //45 #DBCS LEAD BYTE 0xED + 7150, //46 #DBCS LEAD BYTE 0xEE + 7336, //47 #DBCS LEAD BYTE 0xEF, empty + 7336, //48 #DBCS LEAD BYTE 0xF0, empty + 7336, //49 #DBCS LEAD BYTE 0xF1, empty + 7336, //50 #DBCS LEAD BYTE 0xF2, empty + 7336, //51 #DBCS LEAD BYTE 0xF3, empty + 7336, //52 #DBCS LEAD BYTE 0xF4, empty + 7336, //53 #DBCS LEAD BYTE 0xF5, empty + 7336, //54 #DBCS LEAD BYTE 0xF6, empty + 7336, //55 #DBCS LEAD BYTE 0xF7, empty + 7336, //56 #DBCS LEAD BYTE 0xF8, empty + 7336, //57 #DBCS LEAD BYTE 0xF9, empty + 7336, //58 #DBCS LEAD BYTE 0xFA + 7524, //59 #DBCS LEAD BYTE 0xFB + 7712, //60 #DBCS LEAD BYTE 0xFC + 7724 //61 #END OF TABLE 0xFD +}; + +//Table 932 tail byte +static const int DRW_DoubleTable932[][2] = { + {0x8140, 0x3000}, //1 #IDEOGRAPHIC SPACE + {0x8141, 0x3001}, //2 #IDEOGRAPHIC COMMA + {0x8142, 0x3002}, //3 #IDEOGRAPHIC FULL STOP + {0x8143, 0xFF0C}, //4 #FULLWIDTH COMMA + {0x8144, 0xFF0E}, //5 #FULLWIDTH FULL STOP + {0x8145, 0x30FB}, //6 #KATAKANA MIDDLE DOT + {0x8146, 0xFF1A}, //7 #FULLWIDTH COLON + {0x8147, 0xFF1B}, //8 #FULLWIDTH SEMICOLON + {0x8148, 0xFF1F}, //9 #FULLWIDTH QUESTION MARK + {0x8149, 0xFF01}, //10 #FULLWIDTH EXCLAMATION MARK + {0x814A, 0x309B}, //11 #KATAKANA-HIRAGANA VOICED SOUND MARK + {0x814B, 0x309C}, //12 #KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK + {0x814C, 0x00B4}, //13 #ACUTE ACCENT + {0x814D, 0xFF40}, //14 #FULLWIDTH GRAVE ACCENT + {0x814E, 0x00A8}, //15 #DIAERESIS + {0x814F, 0xFF3E}, //16 #FULLWIDTH CIRCUMFLEX ACCENT + {0x8150, 0xFFE3}, //17 #FULLWIDTH MACRON + {0x8151, 0xFF3F}, //18 #FULLWIDTH LOW LINE + {0x8152, 0x30FD}, //19 #KATAKANA ITERATION MARK + {0x8153, 0x30FE}, //20 #KATAKANA VOICED ITERATION MARK + {0x8154, 0x309D}, //21 #HIRAGANA ITERATION MARK + {0x8155, 0x309E}, //22 #HIRAGANA VOICED ITERATION MARK + {0x8156, 0x3003}, //23 #DITTO MARK + {0x8157, 0x4EDD}, //24 #CJK UNIFIED IDEOGRAPH + {0x8158, 0x3005}, //25 #IDEOGRAPHIC ITERATION MARK + {0x8159, 0x3006}, //26 #IDEOGRAPHIC CLOSING MARK + {0x815A, 0x3007}, //27 #IDEOGRAPHIC NUMBER ZERO + {0x815B, 0x30FC}, //28 #KATAKANA-HIRAGANA PROLONGED SOUND MARK + {0x815C, 0x2015}, //29 #HORIZONTAL BAR + {0x815D, 0x2010}, //30 #HYPHEN + {0x815E, 0xFF0F}, //31 #FULLWIDTH SOLIDUS + {0x815F, 0xFF3C}, //32 #FULLWIDTH REVERSE SOLIDUS + {0x8160, 0xFF5E}, //33 #FULLWIDTH TILDE + {0x8161, 0x2225}, //34 #PARALLEL TO + {0x8162, 0xFF5C}, //35 #FULLWIDTH VERTICAL LINE + {0x8163, 0x2026}, //36 #HORIZONTAL ELLIPSIS + {0x8164, 0x2025}, //37 #TWO DOT LEADER + {0x8165, 0x2018}, //38 #LEFT SINGLE QUOTATION MARK + {0x8166, 0x2019}, //39 #RIGHT SINGLE QUOTATION MARK + {0x8167, 0x201C}, //40 #LEFT DOUBLE QUOTATION MARK + {0x8168, 0x201D}, //41 #RIGHT DOUBLE QUOTATION MARK + {0x8169, 0xFF08}, //42 #FULLWIDTH LEFT PARENTHESIS + {0x816A, 0xFF09}, //43 #FULLWIDTH RIGHT PARENTHESIS + {0x816B, 0x3014}, //44 #LEFT TORTOISE SHELL BRACKET + {0x816C, 0x3015}, //45 #RIGHT TORTOISE SHELL BRACKET + {0x816D, 0xFF3B}, //46 #FULLWIDTH LEFT SQUARE BRACKET + {0x816E, 0xFF3D}, //47 #FULLWIDTH RIGHT SQUARE BRACKET + {0x816F, 0xFF5B}, //48 #FULLWIDTH LEFT CURLY BRACKET + {0x8170, 0xFF5D}, //49 #FULLWIDTH RIGHT CURLY BRACKET + {0x8171, 0x3008}, //50 #LEFT ANGLE BRACKET + {0x8172, 0x3009}, //51 #RIGHT ANGLE BRACKET + {0x8173, 0x300A}, //52 #LEFT DOUBLE ANGLE BRACKET + {0x8174, 0x300B}, //53 #RIGHT DOUBLE ANGLE BRACKET + {0x8175, 0x300C}, //54 #LEFT CORNER BRACKET + {0x8176, 0x300D}, //55 #RIGHT CORNER BRACKET + {0x8177, 0x300E}, //56 #LEFT WHITE CORNER BRACKET + {0x8178, 0x300F}, //57 #RIGHT WHITE CORNER BRACKET + {0x8179, 0x3010}, //58 #LEFT BLACK LENTICULAR BRACKET + {0x817A, 0x3011}, //59 #RIGHT BLACK LENTICULAR BRACKET + {0x817B, 0xFF0B}, //60 #FULLWIDTH PLUS SIGN + {0x817C, 0xFF0D}, //61 #FULLWIDTH HYPHEN-MINUS + {0x817D, 0x00B1}, //62 #PLUS-MINUS SIGN + {0x817E, 0x00D7}, //63 #MULTIPLICATION SIGN + {0x8180, 0x00F7}, //64 #DIVISION SIGN + {0x8181, 0xFF1D}, //65 #FULLWIDTH EQUALS SIGN + {0x8182, 0x2260}, //66 #NOT EQUAL TO + {0x8183, 0xFF1C}, //67 #FULLWIDTH LESS-THAN SIGN + {0x8184, 0xFF1E}, //68 #FULLWIDTH GREATER-THAN SIGN + {0x8185, 0x2266}, //69 #LESS-THAN OVER EQUAL TO + {0x8186, 0x2267}, //70 #GREATER-THAN OVER EQUAL TO + {0x8187, 0x221E}, //71 #INFINITY + {0x8188, 0x2234}, //72 #THEREFORE + {0x8189, 0x2642}, //73 #MALE SIGN + {0x818A, 0x2640}, //74 #FEMALE SIGN + {0x818B, 0x00B0}, //75 #DEGREE SIGN + {0x818C, 0x2032}, //76 #PRIME + {0x818D, 0x2033}, //77 #DOUBLE PRIME + {0x818E, 0x2103}, //78 #DEGREE CELSIUS + {0x818F, 0xFFE5}, //79 #FULLWIDTH YEN SIGN + {0x8190, 0xFF04}, //80 #FULLWIDTH DOLLAR SIGN + {0x8191, 0xFFE0}, //81 #FULLWIDTH CENT SIGN + {0x8192, 0xFFE1}, //82 #FULLWIDTH POUND SIGN + {0x8193, 0xFF05}, //83 #FULLWIDTH PERCENT SIGN + {0x8194, 0xFF03}, //84 #FULLWIDTH NUMBER SIGN + {0x8195, 0xFF06}, //85 #FULLWIDTH AMPERSAND + {0x8196, 0xFF0A}, //86 #FULLWIDTH ASTERISK + {0x8197, 0xFF20}, //87 #FULLWIDTH COMMERCIAL AT + {0x8198, 0x00A7}, //88 #SECTION SIGN + {0x8199, 0x2606}, //89 #WHITE STAR + {0x819A, 0x2605}, //90 #BLACK STAR + {0x819B, 0x25CB}, //91 #WHITE CIRCLE + {0x819C, 0x25CF}, //92 #BLACK CIRCLE + {0x819D, 0x25CE}, //93 #BULLSEYE + {0x819E, 0x25C7}, //94 #WHITE DIAMOND + {0x819F, 0x25C6}, //95 #BLACK DIAMOND + {0x81A0, 0x25A1}, //96 #WHITE SQUARE + {0x81A1, 0x25A0}, //97 #BLACK SQUARE + {0x81A2, 0x25B3}, //98 #WHITE UP-POINTING TRIANGLE + {0x81A3, 0x25B2}, //99 #BLACK UP-POINTING TRIANGLE + {0x81A4, 0x25BD}, //100 #WHITE DOWN-POINTING TRIANGLE + {0x81A5, 0x25BC}, //101 #BLACK DOWN-POINTING TRIANGLE + {0x81A6, 0x203B}, //102 #REFERENCE MARK + {0x81A7, 0x3012}, //103 #POSTAL MARK + {0x81A8, 0x2192}, //104 #RIGHTWARDS ARROW + {0x81A9, 0x2190}, //105 #LEFTWARDS ARROW + {0x81AA, 0x2191}, //106 #UPWARDS ARROW + {0x81AB, 0x2193}, //107 #DOWNWARDS ARROW + {0x81AC, 0x3013}, //108 #GETA MARK + {0x81B8, 0x2208}, //109 #ELEMENT OF + {0x81B9, 0x220B}, //110 #CONTAINS AS MEMBER + {0x81BA, 0x2286}, //111 #SUBSET OF OR EQUAL TO + {0x81BB, 0x2287}, //112 #SUPERSET OF OR EQUAL TO + {0x81BC, 0x2282}, //113 #SUBSET OF + {0x81BD, 0x2283}, //114 #SUPERSET OF + {0x81BE, 0x222A}, //115 #UNION + {0x81BF, 0x2229}, //116 #INTERSECTION + {0x81C8, 0x2227}, //117 #LOGICAL AND + {0x81C9, 0x2228}, //118 #LOGICAL OR + {0x81CA, 0xFFE2}, //119 #FULLWIDTH NOT SIGN + {0x81CB, 0x21D2}, //120 #RIGHTWARDS DOUBLE ARROW + {0x81CC, 0x21D4}, //121 #LEFT RIGHT DOUBLE ARROW + {0x81CD, 0x2200}, //122 #FOR ALL + {0x81CE, 0x2203}, //123 #THERE EXISTS + {0x81DA, 0x2220}, //124 #ANGLE + {0x81DB, 0x22A5}, //125 #UP TACK + {0x81DC, 0x2312}, //126 #ARC + {0x81DD, 0x2202}, //127 #PARTIAL DIFFERENTIAL + {0x81DE, 0x2207}, //128 #NABLA + {0x81DF, 0x2261}, //129 #IDENTICAL TO + {0x81E0, 0x2252}, //130 #APPROXIMATELY EQUAL TO OR THE IMAGE OF + {0x81E1, 0x226A}, //131 #MUCH LESS-THAN + {0x81E2, 0x226B}, //132 #MUCH GREATER-THAN + {0x81E3, 0x221A}, //133 #SQUARE ROOT + {0x81E4, 0x223D}, //134 #REVERSED TILDE + {0x81E5, 0x221D}, //135 #PROPORTIONAL TO + {0x81E6, 0x2235}, //136 #BECAUSE + {0x81E7, 0x222B}, //137 #INTEGRAL + {0x81E8, 0x222C}, //138 #DOUBLE INTEGRAL + {0x81F0, 0x212B}, //139 #ANGSTROM SIGN + {0x81F1, 0x2030}, //140 #PER MILLE SIGN + {0x81F2, 0x266F}, //141 #MUSIC SHARP SIGN + {0x81F3, 0x266D}, //142 #MUSIC FLAT SIGN + {0x81F4, 0x266A}, //143 #EIGHTH NOTE + {0x81F5, 0x2020}, //144 #DAGGER + {0x81F6, 0x2021}, //145 #DOUBLE DAGGER + {0x81F7, 0x00B6}, //146 #PILCROW SIGN + {0x81FC, 0x25EF}, //147 #LARGE CIRCLE + {0x824F, 0xFF10}, //148 #FULLWIDTH DIGIT ZERO + {0x8250, 0xFF11}, //149 #FULLWIDTH DIGIT ONE + {0x8251, 0xFF12}, //150 #FULLWIDTH DIGIT TWO + {0x8252, 0xFF13}, //151 #FULLWIDTH DIGIT THREE + {0x8253, 0xFF14}, //152 #FULLWIDTH DIGIT FOUR + {0x8254, 0xFF15}, //153 #FULLWIDTH DIGIT FIVE + {0x8255, 0xFF16}, //154 #FULLWIDTH DIGIT SIX + {0x8256, 0xFF17}, //155 #FULLWIDTH DIGIT SEVEN + {0x8257, 0xFF18}, //156 #FULLWIDTH DIGIT EIGHT + {0x8258, 0xFF19}, //157 #FULLWIDTH DIGIT NINE + {0x8260, 0xFF21}, //158 #FULLWIDTH LATIN CAPITAL LETTER A + {0x8261, 0xFF22}, //159 #FULLWIDTH LATIN CAPITAL LETTER B + {0x8262, 0xFF23}, //160 #FULLWIDTH LATIN CAPITAL LETTER C + {0x8263, 0xFF24}, //161 #FULLWIDTH LATIN CAPITAL LETTER D + {0x8264, 0xFF25}, //162 #FULLWIDTH LATIN CAPITAL LETTER E + {0x8265, 0xFF26}, //163 #FULLWIDTH LATIN CAPITAL LETTER F + {0x8266, 0xFF27}, //164 #FULLWIDTH LATIN CAPITAL LETTER G + {0x8267, 0xFF28}, //165 #FULLWIDTH LATIN CAPITAL LETTER H + {0x8268, 0xFF29}, //166 #FULLWIDTH LATIN CAPITAL LETTER I + {0x8269, 0xFF2A}, //167 #FULLWIDTH LATIN CAPITAL LETTER J + {0x826A, 0xFF2B}, //168 #FULLWIDTH LATIN CAPITAL LETTER K + {0x826B, 0xFF2C}, //169 #FULLWIDTH LATIN CAPITAL LETTER L + {0x826C, 0xFF2D}, //170 #FULLWIDTH LATIN CAPITAL LETTER M + {0x826D, 0xFF2E}, //171 #FULLWIDTH LATIN CAPITAL LETTER N + {0x826E, 0xFF2F}, //172 #FULLWIDTH LATIN CAPITAL LETTER O + {0x826F, 0xFF30}, //173 #FULLWIDTH LATIN CAPITAL LETTER P + {0x8270, 0xFF31}, //174 #FULLWIDTH LATIN CAPITAL LETTER Q + {0x8271, 0xFF32}, //175 #FULLWIDTH LATIN CAPITAL LETTER R + {0x8272, 0xFF33}, //176 #FULLWIDTH LATIN CAPITAL LETTER S + {0x8273, 0xFF34}, //177 #FULLWIDTH LATIN CAPITAL LETTER T + {0x8274, 0xFF35}, //178 #FULLWIDTH LATIN CAPITAL LETTER U + {0x8275, 0xFF36}, //179 #FULLWIDTH LATIN CAPITAL LETTER V + {0x8276, 0xFF37}, //180 #FULLWIDTH LATIN CAPITAL LETTER W + {0x8277, 0xFF38}, //181 #FULLWIDTH LATIN CAPITAL LETTER X + {0x8278, 0xFF39}, //182 #FULLWIDTH LATIN CAPITAL LETTER Y + {0x8279, 0xFF3A}, //183 #FULLWIDTH LATIN CAPITAL LETTER Z + {0x8281, 0xFF41}, //184 #FULLWIDTH LATIN SMALL LETTER A + {0x8282, 0xFF42}, //185 #FULLWIDTH LATIN SMALL LETTER B + {0x8283, 0xFF43}, //186 #FULLWIDTH LATIN SMALL LETTER C + {0x8284, 0xFF44}, //187 #FULLWIDTH LATIN SMALL LETTER D + {0x8285, 0xFF45}, //188 #FULLWIDTH LATIN SMALL LETTER E + {0x8286, 0xFF46}, //189 #FULLWIDTH LATIN SMALL LETTER F + {0x8287, 0xFF47}, //190 #FULLWIDTH LATIN SMALL LETTER G + {0x8288, 0xFF48}, //191 #FULLWIDTH LATIN SMALL LETTER H + {0x8289, 0xFF49}, //192 #FULLWIDTH LATIN SMALL LETTER I + {0x828A, 0xFF4A}, //193 #FULLWIDTH LATIN SMALL LETTER J + {0x828B, 0xFF4B}, //194 #FULLWIDTH LATIN SMALL LETTER K + {0x828C, 0xFF4C}, //195 #FULLWIDTH LATIN SMALL LETTER L + {0x828D, 0xFF4D}, //196 #FULLWIDTH LATIN SMALL LETTER M + {0x828E, 0xFF4E}, //197 #FULLWIDTH LATIN SMALL LETTER N + {0x828F, 0xFF4F}, //198 #FULLWIDTH LATIN SMALL LETTER O + {0x8290, 0xFF50}, //199 #FULLWIDTH LATIN SMALL LETTER P + {0x8291, 0xFF51}, //200 #FULLWIDTH LATIN SMALL LETTER Q + {0x8292, 0xFF52}, //201 #FULLWIDTH LATIN SMALL LETTER R + {0x8293, 0xFF53}, //202 #FULLWIDTH LATIN SMALL LETTER S + {0x8294, 0xFF54}, //203 #FULLWIDTH LATIN SMALL LETTER T + {0x8295, 0xFF55}, //204 #FULLWIDTH LATIN SMALL LETTER U + {0x8296, 0xFF56}, //205 #FULLWIDTH LATIN SMALL LETTER V + {0x8297, 0xFF57}, //206 #FULLWIDTH LATIN SMALL LETTER W + {0x8298, 0xFF58}, //207 #FULLWIDTH LATIN SMALL LETTER X + {0x8299, 0xFF59}, //208 #FULLWIDTH LATIN SMALL LETTER Y + {0x829A, 0xFF5A}, //209 #FULLWIDTH LATIN SMALL LETTER Z + {0x829F, 0x3041}, //210 #HIRAGANA LETTER SMALL A + {0x82A0, 0x3042}, //211 #HIRAGANA LETTER A + {0x82A1, 0x3043}, //212 #HIRAGANA LETTER SMALL I + {0x82A2, 0x3044}, //213 #HIRAGANA LETTER I + {0x82A3, 0x3045}, //214 #HIRAGANA LETTER SMALL U + {0x82A4, 0x3046}, //215 #HIRAGANA LETTER U + {0x82A5, 0x3047}, //216 #HIRAGANA LETTER SMALL E + {0x82A6, 0x3048}, //217 #HIRAGANA LETTER E + {0x82A7, 0x3049}, //218 #HIRAGANA LETTER SMALL O + {0x82A8, 0x304A}, //219 #HIRAGANA LETTER O + {0x82A9, 0x304B}, //220 #HIRAGANA LETTER KA + {0x82AA, 0x304C}, //221 #HIRAGANA LETTER GA + {0x82AB, 0x304D}, //222 #HIRAGANA LETTER KI + {0x82AC, 0x304E}, //223 #HIRAGANA LETTER GI + {0x82AD, 0x304F}, //224 #HIRAGANA LETTER KU + {0x82AE, 0x3050}, //225 #HIRAGANA LETTER GU + {0x82AF, 0x3051}, //226 #HIRAGANA LETTER KE + {0x82B0, 0x3052}, //227 #HIRAGANA LETTER GE + {0x82B1, 0x3053}, //228 #HIRAGANA LETTER KO + {0x82B2, 0x3054}, //229 #HIRAGANA LETTER GO + {0x82B3, 0x3055}, //230 #HIRAGANA LETTER SA + {0x82B4, 0x3056}, //231 #HIRAGANA LETTER ZA + {0x82B5, 0x3057}, //232 #HIRAGANA LETTER SI + {0x82B6, 0x3058}, //233 #HIRAGANA LETTER ZI + {0x82B7, 0x3059}, //234 #HIRAGANA LETTER SU + {0x82B8, 0x305A}, //235 #HIRAGANA LETTER ZU + {0x82B9, 0x305B}, //236 #HIRAGANA LETTER SE + {0x82BA, 0x305C}, //237 #HIRAGANA LETTER ZE + {0x82BB, 0x305D}, //238 #HIRAGANA LETTER SO + {0x82BC, 0x305E}, //239 #HIRAGANA LETTER ZO + {0x82BD, 0x305F}, //240 #HIRAGANA LETTER TA + {0x82BE, 0x3060}, //241 #HIRAGANA LETTER DA + {0x82BF, 0x3061}, //242 #HIRAGANA LETTER TI + {0x82C0, 0x3062}, //243 #HIRAGANA LETTER DI + {0x82C1, 0x3063}, //244 #HIRAGANA LETTER SMALL TU + {0x82C2, 0x3064}, //245 #HIRAGANA LETTER TU + {0x82C3, 0x3065}, //246 #HIRAGANA LETTER DU + {0x82C4, 0x3066}, //247 #HIRAGANA LETTER TE + {0x82C5, 0x3067}, //248 #HIRAGANA LETTER DE + {0x82C6, 0x3068}, //249 #HIRAGANA LETTER TO + {0x82C7, 0x3069}, //250 #HIRAGANA LETTER DO + {0x82C8, 0x306A}, //251 #HIRAGANA LETTER NA + {0x82C9, 0x306B}, //252 #HIRAGANA LETTER NI + {0x82CA, 0x306C}, //253 #HIRAGANA LETTER NU + {0x82CB, 0x306D}, //254 #HIRAGANA LETTER NE + {0x82CC, 0x306E}, //255 #HIRAGANA LETTER NO + {0x82CD, 0x306F}, //256 #HIRAGANA LETTER HA + {0x82CE, 0x3070}, //257 #HIRAGANA LETTER BA + {0x82CF, 0x3071}, //258 #HIRAGANA LETTER PA + {0x82D0, 0x3072}, //259 #HIRAGANA LETTER HI + {0x82D1, 0x3073}, //260 #HIRAGANA LETTER BI + {0x82D2, 0x3074}, //261 #HIRAGANA LETTER PI + {0x82D3, 0x3075}, //262 #HIRAGANA LETTER HU + {0x82D4, 0x3076}, //263 #HIRAGANA LETTER BU + {0x82D5, 0x3077}, //264 #HIRAGANA LETTER PU + {0x82D6, 0x3078}, //265 #HIRAGANA LETTER HE + {0x82D7, 0x3079}, //266 #HIRAGANA LETTER BE + {0x82D8, 0x307A}, //267 #HIRAGANA LETTER PE + {0x82D9, 0x307B}, //268 #HIRAGANA LETTER HO + {0x82DA, 0x307C}, //269 #HIRAGANA LETTER BO + {0x82DB, 0x307D}, //270 #HIRAGANA LETTER PO + {0x82DC, 0x307E}, //271 #HIRAGANA LETTER MA + {0x82DD, 0x307F}, //272 #HIRAGANA LETTER MI + {0x82DE, 0x3080}, //273 #HIRAGANA LETTER MU + {0x82DF, 0x3081}, //274 #HIRAGANA LETTER ME + {0x82E0, 0x3082}, //275 #HIRAGANA LETTER MO + {0x82E1, 0x3083}, //276 #HIRAGANA LETTER SMALL YA + {0x82E2, 0x3084}, //277 #HIRAGANA LETTER YA + {0x82E3, 0x3085}, //278 #HIRAGANA LETTER SMALL YU + {0x82E4, 0x3086}, //279 #HIRAGANA LETTER YU + {0x82E5, 0x3087}, //280 #HIRAGANA LETTER SMALL YO + {0x82E6, 0x3088}, //281 #HIRAGANA LETTER YO + {0x82E7, 0x3089}, //282 #HIRAGANA LETTER RA + {0x82E8, 0x308A}, //283 #HIRAGANA LETTER RI + {0x82E9, 0x308B}, //284 #HIRAGANA LETTER RU + {0x82EA, 0x308C}, //285 #HIRAGANA LETTER RE + {0x82EB, 0x308D}, //286 #HIRAGANA LETTER RO + {0x82EC, 0x308E}, //287 #HIRAGANA LETTER SMALL WA + {0x82ED, 0x308F}, //288 #HIRAGANA LETTER WA + {0x82EE, 0x3090}, //289 #HIRAGANA LETTER WI + {0x82EF, 0x3091}, //290 #HIRAGANA LETTER WE + {0x82F0, 0x3092}, //291 #HIRAGANA LETTER WO + {0x82F1, 0x3093}, //292 #HIRAGANA LETTER N + {0x8340, 0x30A1}, //293 #KATAKANA LETTER SMALL A + {0x8341, 0x30A2}, //294 #KATAKANA LETTER A + {0x8342, 0x30A3}, //295 #KATAKANA LETTER SMALL I + {0x8343, 0x30A4}, //296 #KATAKANA LETTER I + {0x8344, 0x30A5}, //297 #KATAKANA LETTER SMALL U + {0x8345, 0x30A6}, //298 #KATAKANA LETTER U + {0x8346, 0x30A7}, //299 #KATAKANA LETTER SMALL E + {0x8347, 0x30A8}, //300 #KATAKANA LETTER E + {0x8348, 0x30A9}, //301 #KATAKANA LETTER SMALL O + {0x8349, 0x30AA}, //302 #KATAKANA LETTER O + {0x834A, 0x30AB}, //303 #KATAKANA LETTER KA + {0x834B, 0x30AC}, //304 #KATAKANA LETTER GA + {0x834C, 0x30AD}, //305 #KATAKANA LETTER KI + {0x834D, 0x30AE}, //306 #KATAKANA LETTER GI + {0x834E, 0x30AF}, //307 #KATAKANA LETTER KU + {0x834F, 0x30B0}, //308 #KATAKANA LETTER GU + {0x8350, 0x30B1}, //309 #KATAKANA LETTER KE + {0x8351, 0x30B2}, //310 #KATAKANA LETTER GE + {0x8352, 0x30B3}, //311 #KATAKANA LETTER KO + {0x8353, 0x30B4}, //312 #KATAKANA LETTER GO + {0x8354, 0x30B5}, //313 #KATAKANA LETTER SA + {0x8355, 0x30B6}, //314 #KATAKANA LETTER ZA + {0x8356, 0x30B7}, //315 #KATAKANA LETTER SI + {0x8357, 0x30B8}, //316 #KATAKANA LETTER ZI + {0x8358, 0x30B9}, //317 #KATAKANA LETTER SU + {0x8359, 0x30BA}, //318 #KATAKANA LETTER ZU + {0x835A, 0x30BB}, //319 #KATAKANA LETTER SE + {0x835B, 0x30BC}, //320 #KATAKANA LETTER ZE + {0x835C, 0x30BD}, //321 #KATAKANA LETTER SO + {0x835D, 0x30BE}, //322 #KATAKANA LETTER ZO + {0x835E, 0x30BF}, //323 #KATAKANA LETTER TA + {0x835F, 0x30C0}, //324 #KATAKANA LETTER DA + {0x8360, 0x30C1}, //325 #KATAKANA LETTER TI + {0x8361, 0x30C2}, //326 #KATAKANA LETTER DI + {0x8362, 0x30C3}, //327 #KATAKANA LETTER SMALL TU + {0x8363, 0x30C4}, //328 #KATAKANA LETTER TU + {0x8364, 0x30C5}, //329 #KATAKANA LETTER DU + {0x8365, 0x30C6}, //330 #KATAKANA LETTER TE + {0x8366, 0x30C7}, //331 #KATAKANA LETTER DE + {0x8367, 0x30C8}, //332 #KATAKANA LETTER TO + {0x8368, 0x30C9}, //333 #KATAKANA LETTER DO + {0x8369, 0x30CA}, //334 #KATAKANA LETTER NA + {0x836A, 0x30CB}, //335 #KATAKANA LETTER NI + {0x836B, 0x30CC}, //336 #KATAKANA LETTER NU + {0x836C, 0x30CD}, //337 #KATAKANA LETTER NE + {0x836D, 0x30CE}, //338 #KATAKANA LETTER NO + {0x836E, 0x30CF}, //339 #KATAKANA LETTER HA + {0x836F, 0x30D0}, //340 #KATAKANA LETTER BA + {0x8370, 0x30D1}, //341 #KATAKANA LETTER PA + {0x8371, 0x30D2}, //342 #KATAKANA LETTER HI + {0x8372, 0x30D3}, //343 #KATAKANA LETTER BI + {0x8373, 0x30D4}, //344 #KATAKANA LETTER PI + {0x8374, 0x30D5}, //345 #KATAKANA LETTER HU + {0x8375, 0x30D6}, //346 #KATAKANA LETTER BU + {0x8376, 0x30D7}, //347 #KATAKANA LETTER PU + {0x8377, 0x30D8}, //348 #KATAKANA LETTER HE + {0x8378, 0x30D9}, //349 #KATAKANA LETTER BE + {0x8379, 0x30DA}, //350 #KATAKANA LETTER PE + {0x837A, 0x30DB}, //351 #KATAKANA LETTER HO + {0x837B, 0x30DC}, //352 #KATAKANA LETTER BO + {0x837C, 0x30DD}, //353 #KATAKANA LETTER PO + {0x837D, 0x30DE}, //354 #KATAKANA LETTER MA + {0x837E, 0x30DF}, //355 #KATAKANA LETTER MI + {0x8380, 0x30E0}, //356 #KATAKANA LETTER MU + {0x8381, 0x30E1}, //357 #KATAKANA LETTER ME + {0x8382, 0x30E2}, //358 #KATAKANA LETTER MO + {0x8383, 0x30E3}, //359 #KATAKANA LETTER SMALL YA + {0x8384, 0x30E4}, //360 #KATAKANA LETTER YA + {0x8385, 0x30E5}, //361 #KATAKANA LETTER SMALL YU + {0x8386, 0x30E6}, //362 #KATAKANA LETTER YU + {0x8387, 0x30E7}, //363 #KATAKANA LETTER SMALL YO + {0x8388, 0x30E8}, //364 #KATAKANA LETTER YO + {0x8389, 0x30E9}, //365 #KATAKANA LETTER RA + {0x838A, 0x30EA}, //366 #KATAKANA LETTER RI + {0x838B, 0x30EB}, //367 #KATAKANA LETTER RU + {0x838C, 0x30EC}, //368 #KATAKANA LETTER RE + {0x838D, 0x30ED}, //369 #KATAKANA LETTER RO + {0x838E, 0x30EE}, //370 #KATAKANA LETTER SMALL WA + {0x838F, 0x30EF}, //371 #KATAKANA LETTER WA + {0x8390, 0x30F0}, //372 #KATAKANA LETTER WI + {0x8391, 0x30F1}, //373 #KATAKANA LETTER WE + {0x8392, 0x30F2}, //374 #KATAKANA LETTER WO + {0x8393, 0x30F3}, //375 #KATAKANA LETTER N + {0x8394, 0x30F4}, //376 #KATAKANA LETTER VU + {0x8395, 0x30F5}, //377 #KATAKANA LETTER SMALL KA + {0x8396, 0x30F6}, //378 #KATAKANA LETTER SMALL KE + {0x839F, 0x0391}, //379 #GREEK CAPITAL LETTER ALPHA + {0x83A0, 0x0392}, //380 #GREEK CAPITAL LETTER BETA + {0x83A1, 0x0393}, //381 #GREEK CAPITAL LETTER GAMMA + {0x83A2, 0x0394}, //382 #GREEK CAPITAL LETTER DELTA + {0x83A3, 0x0395}, //383 #GREEK CAPITAL LETTER EPSILON + {0x83A4, 0x0396}, //384 #GREEK CAPITAL LETTER ZETA + {0x83A5, 0x0397}, //385 #GREEK CAPITAL LETTER ETA + {0x83A6, 0x0398}, //386 #GREEK CAPITAL LETTER THETA + {0x83A7, 0x0399}, //387 #GREEK CAPITAL LETTER IOTA + {0x83A8, 0x039A}, //388 #GREEK CAPITAL LETTER KAPPA + {0x83A9, 0x039B}, //389 #GREEK CAPITAL LETTER LAMDA + {0x83AA, 0x039C}, //390 #GREEK CAPITAL LETTER MU + {0x83AB, 0x039D}, //391 #GREEK CAPITAL LETTER NU + {0x83AC, 0x039E}, //392 #GREEK CAPITAL LETTER XI + {0x83AD, 0x039F}, //393 #GREEK CAPITAL LETTER OMICRON + {0x83AE, 0x03A0}, //394 #GREEK CAPITAL LETTER PI + {0x83AF, 0x03A1}, //395 #GREEK CAPITAL LETTER RHO + {0x83B0, 0x03A3}, //396 #GREEK CAPITAL LETTER SIGMA + {0x83B1, 0x03A4}, //397 #GREEK CAPITAL LETTER TAU + {0x83B2, 0x03A5}, //398 #GREEK CAPITAL LETTER UPSILON + {0x83B3, 0x03A6}, //399 #GREEK CAPITAL LETTER PHI + {0x83B4, 0x03A7}, //400 #GREEK CAPITAL LETTER CHI + {0x83B5, 0x03A8}, //401 #GREEK CAPITAL LETTER PSI + {0x83B6, 0x03A9}, //402 #GREEK CAPITAL LETTER OMEGA + {0x83BF, 0x03B1}, //403 #GREEK SMALL LETTER ALPHA + {0x83C0, 0x03B2}, //404 #GREEK SMALL LETTER BETA + {0x83C1, 0x03B3}, //405 #GREEK SMALL LETTER GAMMA + {0x83C2, 0x03B4}, //406 #GREEK SMALL LETTER DELTA + {0x83C3, 0x03B5}, //407 #GREEK SMALL LETTER EPSILON + {0x83C4, 0x03B6}, //408 #GREEK SMALL LETTER ZETA + {0x83C5, 0x03B7}, //409 #GREEK SMALL LETTER ETA + {0x83C6, 0x03B8}, //410 #GREEK SMALL LETTER THETA + {0x83C7, 0x03B9}, //411 #GREEK SMALL LETTER IOTA + {0x83C8, 0x03BA}, //412 #GREEK SMALL LETTER KAPPA + {0x83C9, 0x03BB}, //413 #GREEK SMALL LETTER LAMDA + {0x83CA, 0x03BC}, //414 #GREEK SMALL LETTER MU + {0x83CB, 0x03BD}, //415 #GREEK SMALL LETTER NU + {0x83CC, 0x03BE}, //416 #GREEK SMALL LETTER XI + {0x83CD, 0x03BF}, //417 #GREEK SMALL LETTER OMICRON + {0x83CE, 0x03C0}, //418 #GREEK SMALL LETTER PI + {0x83CF, 0x03C1}, //419 #GREEK SMALL LETTER RHO + {0x83D0, 0x03C3}, //420 #GREEK SMALL LETTER SIGMA + {0x83D1, 0x03C4}, //421 #GREEK SMALL LETTER TAU + {0x83D2, 0x03C5}, //422 #GREEK SMALL LETTER UPSILON + {0x83D3, 0x03C6}, //423 #GREEK SMALL LETTER PHI + {0x83D4, 0x03C7}, //424 #GREEK SMALL LETTER CHI + {0x83D5, 0x03C8}, //425 #GREEK SMALL LETTER PSI + {0x83D6, 0x03C9}, //426 #GREEK SMALL LETTER OMEGA + {0x8440, 0x0410}, //427 #CYRILLIC CAPITAL LETTER A + {0x8441, 0x0411}, //428 #CYRILLIC CAPITAL LETTER BE + {0x8442, 0x0412}, //429 #CYRILLIC CAPITAL LETTER VE + {0x8443, 0x0413}, //430 #CYRILLIC CAPITAL LETTER GHE + {0x8444, 0x0414}, //431 #CYRILLIC CAPITAL LETTER DE + {0x8445, 0x0415}, //432 #CYRILLIC CAPITAL LETTER IE + {0x8446, 0x0401}, //433 #CYRILLIC CAPITAL LETTER IO + {0x8447, 0x0416}, //434 #CYRILLIC CAPITAL LETTER ZHE + {0x8448, 0x0417}, //435 #CYRILLIC CAPITAL LETTER ZE + {0x8449, 0x0418}, //436 #CYRILLIC CAPITAL LETTER I + {0x844A, 0x0419}, //437 #CYRILLIC CAPITAL LETTER SHORT I + {0x844B, 0x041A}, //438 #CYRILLIC CAPITAL LETTER KA + {0x844C, 0x041B}, //439 #CYRILLIC CAPITAL LETTER EL + {0x844D, 0x041C}, //440 #CYRILLIC CAPITAL LETTER EM + {0x844E, 0x041D}, //441 #CYRILLIC CAPITAL LETTER EN + {0x844F, 0x041E}, //442 #CYRILLIC CAPITAL LETTER O + {0x8450, 0x041F}, //443 #CYRILLIC CAPITAL LETTER PE + {0x8451, 0x0420}, //444 #CYRILLIC CAPITAL LETTER ER + {0x8452, 0x0421}, //445 #CYRILLIC CAPITAL LETTER ES + {0x8453, 0x0422}, //446 #CYRILLIC CAPITAL LETTER TE + {0x8454, 0x0423}, //447 #CYRILLIC CAPITAL LETTER U + {0x8455, 0x0424}, //448 #CYRILLIC CAPITAL LETTER EF + {0x8456, 0x0425}, //449 #CYRILLIC CAPITAL LETTER HA + {0x8457, 0x0426}, //450 #CYRILLIC CAPITAL LETTER TSE + {0x8458, 0x0427}, //451 #CYRILLIC CAPITAL LETTER CHE + {0x8459, 0x0428}, //452 #CYRILLIC CAPITAL LETTER SHA + {0x845A, 0x0429}, //453 #CYRILLIC CAPITAL LETTER SHCHA + {0x845B, 0x042A}, //454 #CYRILLIC CAPITAL LETTER HARD SIGN + {0x845C, 0x042B}, //455 #CYRILLIC CAPITAL LETTER YERU + {0x845D, 0x042C}, //456 #CYRILLIC CAPITAL LETTER SOFT SIGN + {0x845E, 0x042D}, //457 #CYRILLIC CAPITAL LETTER E + {0x845F, 0x042E}, //458 #CYRILLIC CAPITAL LETTER YU + {0x8460, 0x042F}, //459 #CYRILLIC CAPITAL LETTER YA + {0x8470, 0x0430}, //460 #CYRILLIC SMALL LETTER A + {0x8471, 0x0431}, //461 #CYRILLIC SMALL LETTER BE + {0x8472, 0x0432}, //462 #CYRILLIC SMALL LETTER VE + {0x8473, 0x0433}, //463 #CYRILLIC SMALL LETTER GHE + {0x8474, 0x0434}, //464 #CYRILLIC SMALL LETTER DE + {0x8475, 0x0435}, //465 #CYRILLIC SMALL LETTER IE + {0x8476, 0x0451}, //466 #CYRILLIC SMALL LETTER IO + {0x8477, 0x0436}, //467 #CYRILLIC SMALL LETTER ZHE + {0x8478, 0x0437}, //468 #CYRILLIC SMALL LETTER ZE + {0x8479, 0x0438}, //469 #CYRILLIC SMALL LETTER I + {0x847A, 0x0439}, //470 #CYRILLIC SMALL LETTER SHORT I + {0x847B, 0x043A}, //471 #CYRILLIC SMALL LETTER KA + {0x847C, 0x043B}, //472 #CYRILLIC SMALL LETTER EL + {0x847D, 0x043C}, //473 #CYRILLIC SMALL LETTER EM + {0x847E, 0x043D}, //474 #CYRILLIC SMALL LETTER EN + {0x8480, 0x043E}, //475 #CYRILLIC SMALL LETTER O + {0x8481, 0x043F}, //476 #CYRILLIC SMALL LETTER PE + {0x8482, 0x0440}, //477 #CYRILLIC SMALL LETTER ER + {0x8483, 0x0441}, //478 #CYRILLIC SMALL LETTER ES + {0x8484, 0x0442}, //479 #CYRILLIC SMALL LETTER TE + {0x8485, 0x0443}, //480 #CYRILLIC SMALL LETTER U + {0x8486, 0x0444}, //481 #CYRILLIC SMALL LETTER EF + {0x8487, 0x0445}, //482 #CYRILLIC SMALL LETTER HA + {0x8488, 0x0446}, //483 #CYRILLIC SMALL LETTER TSE + {0x8489, 0x0447}, //484 #CYRILLIC SMALL LETTER CHE + {0x848A, 0x0448}, //485 #CYRILLIC SMALL LETTER SHA + {0x848B, 0x0449}, //486 #CYRILLIC SMALL LETTER SHCHA + {0x848C, 0x044A}, //487 #CYRILLIC SMALL LETTER HARD SIGN + {0x848D, 0x044B}, //488 #CYRILLIC SMALL LETTER YERU + {0x848E, 0x044C}, //489 #CYRILLIC SMALL LETTER SOFT SIGN + {0x848F, 0x044D}, //490 #CYRILLIC SMALL LETTER E + {0x8490, 0x044E}, //491 #CYRILLIC SMALL LETTER YU + {0x8491, 0x044F}, //492 #CYRILLIC SMALL LETTER YA + {0x849F, 0x2500}, //493 #BOX DRAWINGS LIGHT HORIZONTAL + {0x84A0, 0x2502}, //494 #BOX DRAWINGS LIGHT VERTICAL + {0x84A1, 0x250C}, //495 #BOX DRAWINGS LIGHT DOWN AND RIGHT + {0x84A2, 0x2510}, //496 #BOX DRAWINGS LIGHT DOWN AND LEFT + {0x84A3, 0x2518}, //497 #BOX DRAWINGS LIGHT UP AND LEFT + {0x84A4, 0x2514}, //498 #BOX DRAWINGS LIGHT UP AND RIGHT + {0x84A5, 0x251C}, //499 #BOX DRAWINGS LIGHT VERTICAL AND RIGHT + {0x84A6, 0x252C}, //500 #BOX DRAWINGS LIGHT DOWN AND HORIZONTAL + {0x84A7, 0x2524}, //501 #BOX DRAWINGS LIGHT VERTICAL AND LEFT + {0x84A8, 0x2534}, //502 #BOX DRAWINGS LIGHT UP AND HORIZONTAL + {0x84A9, 0x253C}, //503 #BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL + {0x84AA, 0x2501}, //504 #BOX DRAWINGS HEAVY HORIZONTAL + {0x84AB, 0x2503}, //505 #BOX DRAWINGS HEAVY VERTICAL + {0x84AC, 0x250F}, //506 #BOX DRAWINGS HEAVY DOWN AND RIGHT + {0x84AD, 0x2513}, //507 #BOX DRAWINGS HEAVY DOWN AND LEFT + {0x84AE, 0x251B}, //508 #BOX DRAWINGS HEAVY UP AND LEFT + {0x84AF, 0x2517}, //509 #BOX DRAWINGS HEAVY UP AND RIGHT + {0x84B0, 0x2523}, //510 #BOX DRAWINGS HEAVY VERTICAL AND RIGHT + {0x84B1, 0x2533}, //511 #BOX DRAWINGS HEAVY DOWN AND HORIZONTAL + {0x84B2, 0x252B}, //512 #BOX DRAWINGS HEAVY VERTICAL AND LEFT + {0x84B3, 0x253B}, //513 #BOX DRAWINGS HEAVY UP AND HORIZONTAL + {0x84B4, 0x254B}, //514 #BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL + {0x84B5, 0x2520}, //515 #BOX DRAWINGS VERTICAL HEAVY AND RIGHT LIGHT + {0x84B6, 0x252F}, //516 #BOX DRAWINGS DOWN LIGHT AND HORIZONTAL HEAVY + {0x84B7, 0x2528}, //517 #BOX DRAWINGS VERTICAL HEAVY AND LEFT LIGHT + {0x84B8, 0x2537}, //518 #BOX DRAWINGS UP LIGHT AND HORIZONTAL HEAVY + {0x84B9, 0x253F}, //519 #BOX DRAWINGS VERTICAL LIGHT AND HORIZONTAL HEAVY + {0x84BA, 0x251D}, //520 #BOX DRAWINGS VERTICAL LIGHT AND RIGHT HEAVY + {0x84BB, 0x2530}, //521 #BOX DRAWINGS DOWN HEAVY AND HORIZONTAL LIGHT + {0x84BC, 0x2525}, //522 #BOX DRAWINGS VERTICAL LIGHT AND LEFT HEAVY + {0x84BD, 0x2538}, //523 #BOX DRAWINGS UP HEAVY AND HORIZONTAL LIGHT + {0x84BE, 0x2542}, //524 #BOX DRAWINGS VERTICAL HEAVY AND HORIZONTAL LIGHT + {0x8740, 0x2460}, //525 #CIRCLED DIGIT ONE + {0x8741, 0x2461}, //526 #CIRCLED DIGIT TWO + {0x8742, 0x2462}, //527 #CIRCLED DIGIT THREE + {0x8743, 0x2463}, //528 #CIRCLED DIGIT FOUR + {0x8744, 0x2464}, //529 #CIRCLED DIGIT FIVE + {0x8745, 0x2465}, //530 #CIRCLED DIGIT SIX + {0x8746, 0x2466}, //531 #CIRCLED DIGIT SEVEN + {0x8747, 0x2467}, //532 #CIRCLED DIGIT EIGHT + {0x8748, 0x2468}, //533 #CIRCLED DIGIT NINE + {0x8749, 0x2469}, //534 #CIRCLED NUMBER TEN + {0x874A, 0x246A}, //535 #CIRCLED NUMBER ELEVEN + {0x874B, 0x246B}, //536 #CIRCLED NUMBER TWELVE + {0x874C, 0x246C}, //537 #CIRCLED NUMBER THIRTEEN + {0x874D, 0x246D}, //538 #CIRCLED NUMBER FOURTEEN + {0x874E, 0x246E}, //539 #CIRCLED NUMBER FIFTEEN + {0x874F, 0x246F}, //540 #CIRCLED NUMBER SIXTEEN + {0x8750, 0x2470}, //541 #CIRCLED NUMBER SEVENTEEN + {0x8751, 0x2471}, //542 #CIRCLED NUMBER EIGHTEEN + {0x8752, 0x2472}, //543 #CIRCLED NUMBER NINETEEN + {0x8753, 0x2473}, //544 #CIRCLED NUMBER TWENTY + {0x8754, 0x2160}, //545 #ROMAN NUMERAL ONE + {0x8755, 0x2161}, //546 #ROMAN NUMERAL TWO + {0x8756, 0x2162}, //547 #ROMAN NUMERAL THREE + {0x8757, 0x2163}, //548 #ROMAN NUMERAL FOUR + {0x8758, 0x2164}, //549 #ROMAN NUMERAL FIVE + {0x8759, 0x2165}, //550 #ROMAN NUMERAL SIX + {0x875A, 0x2166}, //551 #ROMAN NUMERAL SEVEN + {0x875B, 0x2167}, //552 #ROMAN NUMERAL EIGHT + {0x875C, 0x2168}, //553 #ROMAN NUMERAL NINE + {0x875D, 0x2169}, //554 #ROMAN NUMERAL TEN + {0x875F, 0x3349}, //555 #SQUARE MIRI + {0x8760, 0x3314}, //556 #SQUARE KIRO + {0x8761, 0x3322}, //557 #SQUARE SENTI + {0x8762, 0x334D}, //558 #SQUARE MEETORU + {0x8763, 0x3318}, //559 #SQUARE GURAMU + {0x8764, 0x3327}, //560 #SQUARE TON + {0x8765, 0x3303}, //561 #SQUARE AARU + {0x8766, 0x3336}, //562 #SQUARE HEKUTAARU + {0x8767, 0x3351}, //563 #SQUARE RITTORU + {0x8768, 0x3357}, //564 #SQUARE WATTO + {0x8769, 0x330D}, //565 #SQUARE KARORII + {0x876A, 0x3326}, //566 #SQUARE DORU + {0x876B, 0x3323}, //567 #SQUARE SENTO + {0x876C, 0x332B}, //568 #SQUARE PAASENTO + {0x876D, 0x334A}, //569 #SQUARE MIRIBAARU + {0x876E, 0x333B}, //570 #SQUARE PEEZI + {0x876F, 0x339C}, //571 #SQUARE MM + {0x8770, 0x339D}, //572 #SQUARE CM + {0x8771, 0x339E}, //573 #SQUARE KM + {0x8772, 0x338E}, //574 #SQUARE MG + {0x8773, 0x338F}, //575 #SQUARE KG + {0x8774, 0x33C4}, //576 #SQUARE CC + {0x8775, 0x33A1}, //577 #SQUARE M SQUARED + {0x877E, 0x337B}, //578 #SQUARE ERA NAME HEISEI + {0x8780, 0x301D}, //579 #REVERSED DOUBLE PRIME QUOTATION MARK + {0x8781, 0x301F}, //580 #LOW DOUBLE PRIME QUOTATION MARK + {0x8782, 0x2116}, //581 #NUMERO SIGN + {0x8783, 0x33CD}, //582 #SQUARE KK + {0x8784, 0x2121}, //583 #TELEPHONE SIGN + {0x8785, 0x32A4}, //584 #CIRCLED IDEOGRAPH HIGH + {0x8786, 0x32A5}, //585 #CIRCLED IDEOGRAPH CENTRE + {0x8787, 0x32A6}, //586 #CIRCLED IDEOGRAPH LOW + {0x8788, 0x32A7}, //587 #CIRCLED IDEOGRAPH LEFT + {0x8789, 0x32A8}, //588 #CIRCLED IDEOGRAPH RIGHT + {0x878A, 0x3231}, //589 #PARENTHESIZED IDEOGRAPH STOCK + {0x878B, 0x3232}, //590 #PARENTHESIZED IDEOGRAPH HAVE + {0x878C, 0x3239}, //591 #PARENTHESIZED IDEOGRAPH REPRESENT + {0x878D, 0x337E}, //592 #SQUARE ERA NAME MEIZI + {0x878E, 0x337D}, //593 #SQUARE ERA NAME TAISYOU + {0x878F, 0x337C}, //594 #SQUARE ERA NAME SYOUWA + {0x8790, 0x2252}, //595 #APPROXIMATELY EQUAL TO OR THE IMAGE OF + {0x8791, 0x2261}, //596 #IDENTICAL TO + {0x8792, 0x222B}, //597 #INTEGRAL + {0x8793, 0x222E}, //598 #CONTOUR INTEGRAL + {0x8794, 0x2211}, //599 #N-ARY SUMMATION + {0x8795, 0x221A}, //600 #SQUARE ROOT + {0x8796, 0x22A5}, //601 #UP TACK + {0x8797, 0x2220}, //602 #ANGLE + {0x8798, 0x221F}, //603 #RIGHT ANGLE + {0x8799, 0x22BF}, //604 #RIGHT TRIANGLE + {0x879A, 0x2235}, //605 #BECAUSE + {0x879B, 0x2229}, //606 #INTERSECTION + {0x879C, 0x222A}, //607 #UNION + {0x889F, 0x4E9C}, //608 #CJK UNIFIED IDEOGRAPH + {0x88A0, 0x5516}, //609 #CJK UNIFIED IDEOGRAPH + {0x88A1, 0x5A03}, //610 #CJK UNIFIED IDEOGRAPH + {0x88A2, 0x963F}, //611 #CJK UNIFIED IDEOGRAPH + {0x88A3, 0x54C0}, //612 #CJK UNIFIED IDEOGRAPH + {0x88A4, 0x611B}, //613 #CJK UNIFIED IDEOGRAPH + {0x88A5, 0x6328}, //614 #CJK UNIFIED IDEOGRAPH + {0x88A6, 0x59F6}, //615 #CJK UNIFIED IDEOGRAPH + {0x88A7, 0x9022}, //616 #CJK UNIFIED IDEOGRAPH + {0x88A8, 0x8475}, //617 #CJK UNIFIED IDEOGRAPH + {0x88A9, 0x831C}, //618 #CJK UNIFIED IDEOGRAPH + {0x88AA, 0x7A50}, //619 #CJK UNIFIED IDEOGRAPH + {0x88AB, 0x60AA}, //620 #CJK UNIFIED IDEOGRAPH + {0x88AC, 0x63E1}, //621 #CJK UNIFIED IDEOGRAPH + {0x88AD, 0x6E25}, //622 #CJK UNIFIED IDEOGRAPH + {0x88AE, 0x65ED}, //623 #CJK UNIFIED IDEOGRAPH + {0x88AF, 0x8466}, //624 #CJK UNIFIED IDEOGRAPH + {0x88B0, 0x82A6}, //625 #CJK UNIFIED IDEOGRAPH + {0x88B1, 0x9BF5}, //626 #CJK UNIFIED IDEOGRAPH + {0x88B2, 0x6893}, //627 #CJK UNIFIED IDEOGRAPH + {0x88B3, 0x5727}, //628 #CJK UNIFIED IDEOGRAPH + {0x88B4, 0x65A1}, //629 #CJK UNIFIED IDEOGRAPH + {0x88B5, 0x6271}, //630 #CJK UNIFIED IDEOGRAPH + {0x88B6, 0x5B9B}, //631 #CJK UNIFIED IDEOGRAPH + {0x88B7, 0x59D0}, //632 #CJK UNIFIED IDEOGRAPH + {0x88B8, 0x867B}, //633 #CJK UNIFIED IDEOGRAPH + {0x88B9, 0x98F4}, //634 #CJK UNIFIED IDEOGRAPH + {0x88BA, 0x7D62}, //635 #CJK UNIFIED IDEOGRAPH + {0x88BB, 0x7DBE}, //636 #CJK UNIFIED IDEOGRAPH + {0x88BC, 0x9B8E}, //637 #CJK UNIFIED IDEOGRAPH + {0x88BD, 0x6216}, //638 #CJK UNIFIED IDEOGRAPH + {0x88BE, 0x7C9F}, //639 #CJK UNIFIED IDEOGRAPH + {0x88BF, 0x88B7}, //640 #CJK UNIFIED IDEOGRAPH + {0x88C0, 0x5B89}, //641 #CJK UNIFIED IDEOGRAPH + {0x88C1, 0x5EB5}, //642 #CJK UNIFIED IDEOGRAPH + {0x88C2, 0x6309}, //643 #CJK UNIFIED IDEOGRAPH + {0x88C3, 0x6697}, //644 #CJK UNIFIED IDEOGRAPH + {0x88C4, 0x6848}, //645 #CJK UNIFIED IDEOGRAPH + {0x88C5, 0x95C7}, //646 #CJK UNIFIED IDEOGRAPH + {0x88C6, 0x978D}, //647 #CJK UNIFIED IDEOGRAPH + {0x88C7, 0x674F}, //648 #CJK UNIFIED IDEOGRAPH + {0x88C8, 0x4EE5}, //649 #CJK UNIFIED IDEOGRAPH + {0x88C9, 0x4F0A}, //650 #CJK UNIFIED IDEOGRAPH + {0x88CA, 0x4F4D}, //651 #CJK UNIFIED IDEOGRAPH + {0x88CB, 0x4F9D}, //652 #CJK UNIFIED IDEOGRAPH + {0x88CC, 0x5049}, //653 #CJK UNIFIED IDEOGRAPH + {0x88CD, 0x56F2}, //654 #CJK UNIFIED IDEOGRAPH + {0x88CE, 0x5937}, //655 #CJK UNIFIED IDEOGRAPH + {0x88CF, 0x59D4}, //656 #CJK UNIFIED IDEOGRAPH + {0x88D0, 0x5A01}, //657 #CJK UNIFIED IDEOGRAPH + {0x88D1, 0x5C09}, //658 #CJK UNIFIED IDEOGRAPH + {0x88D2, 0x60DF}, //659 #CJK UNIFIED IDEOGRAPH + {0x88D3, 0x610F}, //660 #CJK UNIFIED IDEOGRAPH + {0x88D4, 0x6170}, //661 #CJK UNIFIED IDEOGRAPH + {0x88D5, 0x6613}, //662 #CJK UNIFIED IDEOGRAPH + {0x88D6, 0x6905}, //663 #CJK UNIFIED IDEOGRAPH + {0x88D7, 0x70BA}, //664 #CJK UNIFIED IDEOGRAPH + {0x88D8, 0x754F}, //665 #CJK UNIFIED IDEOGRAPH + {0x88D9, 0x7570}, //666 #CJK UNIFIED IDEOGRAPH + {0x88DA, 0x79FB}, //667 #CJK UNIFIED IDEOGRAPH + {0x88DB, 0x7DAD}, //668 #CJK UNIFIED IDEOGRAPH + {0x88DC, 0x7DEF}, //669 #CJK UNIFIED IDEOGRAPH + {0x88DD, 0x80C3}, //670 #CJK UNIFIED IDEOGRAPH + {0x88DE, 0x840E}, //671 #CJK UNIFIED IDEOGRAPH + {0x88DF, 0x8863}, //672 #CJK UNIFIED IDEOGRAPH + {0x88E0, 0x8B02}, //673 #CJK UNIFIED IDEOGRAPH + {0x88E1, 0x9055}, //674 #CJK UNIFIED IDEOGRAPH + {0x88E2, 0x907A}, //675 #CJK UNIFIED IDEOGRAPH + {0x88E3, 0x533B}, //676 #CJK UNIFIED IDEOGRAPH + {0x88E4, 0x4E95}, //677 #CJK UNIFIED IDEOGRAPH + {0x88E5, 0x4EA5}, //678 #CJK UNIFIED IDEOGRAPH + {0x88E6, 0x57DF}, //679 #CJK UNIFIED IDEOGRAPH + {0x88E7, 0x80B2}, //680 #CJK UNIFIED IDEOGRAPH + {0x88E8, 0x90C1}, //681 #CJK UNIFIED IDEOGRAPH + {0x88E9, 0x78EF}, //682 #CJK UNIFIED IDEOGRAPH + {0x88EA, 0x4E00}, //683 #CJK UNIFIED IDEOGRAPH + {0x88EB, 0x58F1}, //684 #CJK UNIFIED IDEOGRAPH + {0x88EC, 0x6EA2}, //685 #CJK UNIFIED IDEOGRAPH + {0x88ED, 0x9038}, //686 #CJK UNIFIED IDEOGRAPH + {0x88EE, 0x7A32}, //687 #CJK UNIFIED IDEOGRAPH + {0x88EF, 0x8328}, //688 #CJK UNIFIED IDEOGRAPH + {0x88F0, 0x828B}, //689 #CJK UNIFIED IDEOGRAPH + {0x88F1, 0x9C2F}, //690 #CJK UNIFIED IDEOGRAPH + {0x88F2, 0x5141}, //691 #CJK UNIFIED IDEOGRAPH + {0x88F3, 0x5370}, //692 #CJK UNIFIED IDEOGRAPH + {0x88F4, 0x54BD}, //693 #CJK UNIFIED IDEOGRAPH + {0x88F5, 0x54E1}, //694 #CJK UNIFIED IDEOGRAPH + {0x88F6, 0x56E0}, //695 #CJK UNIFIED IDEOGRAPH + {0x88F7, 0x59FB}, //696 #CJK UNIFIED IDEOGRAPH + {0x88F8, 0x5F15}, //697 #CJK UNIFIED IDEOGRAPH + {0x88F9, 0x98F2}, //698 #CJK UNIFIED IDEOGRAPH + {0x88FA, 0x6DEB}, //699 #CJK UNIFIED IDEOGRAPH + {0x88FB, 0x80E4}, //700 #CJK UNIFIED IDEOGRAPH + {0x88FC, 0x852D}, //701 #CJK UNIFIED IDEOGRAPH + {0x8940, 0x9662}, //702 #CJK UNIFIED IDEOGRAPH + {0x8941, 0x9670}, //703 #CJK UNIFIED IDEOGRAPH + {0x8942, 0x96A0}, //704 #CJK UNIFIED IDEOGRAPH + {0x8943, 0x97FB}, //705 #CJK UNIFIED IDEOGRAPH + {0x8944, 0x540B}, //706 #CJK UNIFIED IDEOGRAPH + {0x8945, 0x53F3}, //707 #CJK UNIFIED IDEOGRAPH + {0x8946, 0x5B87}, //708 #CJK UNIFIED IDEOGRAPH + {0x8947, 0x70CF}, //709 #CJK UNIFIED IDEOGRAPH + {0x8948, 0x7FBD}, //710 #CJK UNIFIED IDEOGRAPH + {0x8949, 0x8FC2}, //711 #CJK UNIFIED IDEOGRAPH + {0x894A, 0x96E8}, //712 #CJK UNIFIED IDEOGRAPH + {0x894B, 0x536F}, //713 #CJK UNIFIED IDEOGRAPH + {0x894C, 0x9D5C}, //714 #CJK UNIFIED IDEOGRAPH + {0x894D, 0x7ABA}, //715 #CJK UNIFIED IDEOGRAPH + {0x894E, 0x4E11}, //716 #CJK UNIFIED IDEOGRAPH + {0x894F, 0x7893}, //717 #CJK UNIFIED IDEOGRAPH + {0x8950, 0x81FC}, //718 #CJK UNIFIED IDEOGRAPH + {0x8951, 0x6E26}, //719 #CJK UNIFIED IDEOGRAPH + {0x8952, 0x5618}, //720 #CJK UNIFIED IDEOGRAPH + {0x8953, 0x5504}, //721 #CJK UNIFIED IDEOGRAPH + {0x8954, 0x6B1D}, //722 #CJK UNIFIED IDEOGRAPH + {0x8955, 0x851A}, //723 #CJK UNIFIED IDEOGRAPH + {0x8956, 0x9C3B}, //724 #CJK UNIFIED IDEOGRAPH + {0x8957, 0x59E5}, //725 #CJK UNIFIED IDEOGRAPH + {0x8958, 0x53A9}, //726 #CJK UNIFIED IDEOGRAPH + {0x8959, 0x6D66}, //727 #CJK UNIFIED IDEOGRAPH + {0x895A, 0x74DC}, //728 #CJK UNIFIED IDEOGRAPH + {0x895B, 0x958F}, //729 #CJK UNIFIED IDEOGRAPH + {0x895C, 0x5642}, //730 #CJK UNIFIED IDEOGRAPH + {0x895D, 0x4E91}, //731 #CJK UNIFIED IDEOGRAPH + {0x895E, 0x904B}, //732 #CJK UNIFIED IDEOGRAPH + {0x895F, 0x96F2}, //733 #CJK UNIFIED IDEOGRAPH + {0x8960, 0x834F}, //734 #CJK UNIFIED IDEOGRAPH + {0x8961, 0x990C}, //735 #CJK UNIFIED IDEOGRAPH + {0x8962, 0x53E1}, //736 #CJK UNIFIED IDEOGRAPH + {0x8963, 0x55B6}, //737 #CJK UNIFIED IDEOGRAPH + {0x8964, 0x5B30}, //738 #CJK UNIFIED IDEOGRAPH + {0x8965, 0x5F71}, //739 #CJK UNIFIED IDEOGRAPH + {0x8966, 0x6620}, //740 #CJK UNIFIED IDEOGRAPH + {0x8967, 0x66F3}, //741 #CJK UNIFIED IDEOGRAPH + {0x8968, 0x6804}, //742 #CJK UNIFIED IDEOGRAPH + {0x8969, 0x6C38}, //743 #CJK UNIFIED IDEOGRAPH + {0x896A, 0x6CF3}, //744 #CJK UNIFIED IDEOGRAPH + {0x896B, 0x6D29}, //745 #CJK UNIFIED IDEOGRAPH + {0x896C, 0x745B}, //746 #CJK UNIFIED IDEOGRAPH + {0x896D, 0x76C8}, //747 #CJK UNIFIED IDEOGRAPH + {0x896E, 0x7A4E}, //748 #CJK UNIFIED IDEOGRAPH + {0x896F, 0x9834}, //749 #CJK UNIFIED IDEOGRAPH + {0x8970, 0x82F1}, //750 #CJK UNIFIED IDEOGRAPH + {0x8971, 0x885B}, //751 #CJK UNIFIED IDEOGRAPH + {0x8972, 0x8A60}, //752 #CJK UNIFIED IDEOGRAPH + {0x8973, 0x92ED}, //753 #CJK UNIFIED IDEOGRAPH + {0x8974, 0x6DB2}, //754 #CJK UNIFIED IDEOGRAPH + {0x8975, 0x75AB}, //755 #CJK UNIFIED IDEOGRAPH + {0x8976, 0x76CA}, //756 #CJK UNIFIED IDEOGRAPH + {0x8977, 0x99C5}, //757 #CJK UNIFIED IDEOGRAPH + {0x8978, 0x60A6}, //758 #CJK UNIFIED IDEOGRAPH + {0x8979, 0x8B01}, //759 #CJK UNIFIED IDEOGRAPH + {0x897A, 0x8D8A}, //760 #CJK UNIFIED IDEOGRAPH + {0x897B, 0x95B2}, //761 #CJK UNIFIED IDEOGRAPH + {0x897C, 0x698E}, //762 #CJK UNIFIED IDEOGRAPH + {0x897D, 0x53AD}, //763 #CJK UNIFIED IDEOGRAPH + {0x897E, 0x5186}, //764 #CJK UNIFIED IDEOGRAPH + {0x8980, 0x5712}, //765 #CJK UNIFIED IDEOGRAPH + {0x8981, 0x5830}, //766 #CJK UNIFIED IDEOGRAPH + {0x8982, 0x5944}, //767 #CJK UNIFIED IDEOGRAPH + {0x8983, 0x5BB4}, //768 #CJK UNIFIED IDEOGRAPH + {0x8984, 0x5EF6}, //769 #CJK UNIFIED IDEOGRAPH + {0x8985, 0x6028}, //770 #CJK UNIFIED IDEOGRAPH + {0x8986, 0x63A9}, //771 #CJK UNIFIED IDEOGRAPH + {0x8987, 0x63F4}, //772 #CJK UNIFIED IDEOGRAPH + {0x8988, 0x6CBF}, //773 #CJK UNIFIED IDEOGRAPH + {0x8989, 0x6F14}, //774 #CJK UNIFIED IDEOGRAPH + {0x898A, 0x708E}, //775 #CJK UNIFIED IDEOGRAPH + {0x898B, 0x7114}, //776 #CJK UNIFIED IDEOGRAPH + {0x898C, 0x7159}, //777 #CJK UNIFIED IDEOGRAPH + {0x898D, 0x71D5}, //778 #CJK UNIFIED IDEOGRAPH + {0x898E, 0x733F}, //779 #CJK UNIFIED IDEOGRAPH + {0x898F, 0x7E01}, //780 #CJK UNIFIED IDEOGRAPH + {0x8990, 0x8276}, //781 #CJK UNIFIED IDEOGRAPH + {0x8991, 0x82D1}, //782 #CJK UNIFIED IDEOGRAPH + {0x8992, 0x8597}, //783 #CJK UNIFIED IDEOGRAPH + {0x8993, 0x9060}, //784 #CJK UNIFIED IDEOGRAPH + {0x8994, 0x925B}, //785 #CJK UNIFIED IDEOGRAPH + {0x8995, 0x9D1B}, //786 #CJK UNIFIED IDEOGRAPH + {0x8996, 0x5869}, //787 #CJK UNIFIED IDEOGRAPH + {0x8997, 0x65BC}, //788 #CJK UNIFIED IDEOGRAPH + {0x8998, 0x6C5A}, //789 #CJK UNIFIED IDEOGRAPH + {0x8999, 0x7525}, //790 #CJK UNIFIED IDEOGRAPH + {0x899A, 0x51F9}, //791 #CJK UNIFIED IDEOGRAPH + {0x899B, 0x592E}, //792 #CJK UNIFIED IDEOGRAPH + {0x899C, 0x5965}, //793 #CJK UNIFIED IDEOGRAPH + {0x899D, 0x5F80}, //794 #CJK UNIFIED IDEOGRAPH + {0x899E, 0x5FDC}, //795 #CJK UNIFIED IDEOGRAPH + {0x899F, 0x62BC}, //796 #CJK UNIFIED IDEOGRAPH + {0x89A0, 0x65FA}, //797 #CJK UNIFIED IDEOGRAPH + {0x89A1, 0x6A2A}, //798 #CJK UNIFIED IDEOGRAPH + {0x89A2, 0x6B27}, //799 #CJK UNIFIED IDEOGRAPH + {0x89A3, 0x6BB4}, //800 #CJK UNIFIED IDEOGRAPH + {0x89A4, 0x738B}, //801 #CJK UNIFIED IDEOGRAPH + {0x89A5, 0x7FC1}, //802 #CJK UNIFIED IDEOGRAPH + {0x89A6, 0x8956}, //803 #CJK UNIFIED IDEOGRAPH + {0x89A7, 0x9D2C}, //804 #CJK UNIFIED IDEOGRAPH + {0x89A8, 0x9D0E}, //805 #CJK UNIFIED IDEOGRAPH + {0x89A9, 0x9EC4}, //806 #CJK UNIFIED IDEOGRAPH + {0x89AA, 0x5CA1}, //807 #CJK UNIFIED IDEOGRAPH + {0x89AB, 0x6C96}, //808 #CJK UNIFIED IDEOGRAPH + {0x89AC, 0x837B}, //809 #CJK UNIFIED IDEOGRAPH + {0x89AD, 0x5104}, //810 #CJK UNIFIED IDEOGRAPH + {0x89AE, 0x5C4B}, //811 #CJK UNIFIED IDEOGRAPH + {0x89AF, 0x61B6}, //812 #CJK UNIFIED IDEOGRAPH + {0x89B0, 0x81C6}, //813 #CJK UNIFIED IDEOGRAPH + {0x89B1, 0x6876}, //814 #CJK UNIFIED IDEOGRAPH + {0x89B2, 0x7261}, //815 #CJK UNIFIED IDEOGRAPH + {0x89B3, 0x4E59}, //816 #CJK UNIFIED IDEOGRAPH + {0x89B4, 0x4FFA}, //817 #CJK UNIFIED IDEOGRAPH + {0x89B5, 0x5378}, //818 #CJK UNIFIED IDEOGRAPH + {0x89B6, 0x6069}, //819 #CJK UNIFIED IDEOGRAPH + {0x89B7, 0x6E29}, //820 #CJK UNIFIED IDEOGRAPH + {0x89B8, 0x7A4F}, //821 #CJK UNIFIED IDEOGRAPH + {0x89B9, 0x97F3}, //822 #CJK UNIFIED IDEOGRAPH + {0x89BA, 0x4E0B}, //823 #CJK UNIFIED IDEOGRAPH + {0x89BB, 0x5316}, //824 #CJK UNIFIED IDEOGRAPH + {0x89BC, 0x4EEE}, //825 #CJK UNIFIED IDEOGRAPH + {0x89BD, 0x4F55}, //826 #CJK UNIFIED IDEOGRAPH + {0x89BE, 0x4F3D}, //827 #CJK UNIFIED IDEOGRAPH + {0x89BF, 0x4FA1}, //828 #CJK UNIFIED IDEOGRAPH + {0x89C0, 0x4F73}, //829 #CJK UNIFIED IDEOGRAPH + {0x89C1, 0x52A0}, //830 #CJK UNIFIED IDEOGRAPH + {0x89C2, 0x53EF}, //831 #CJK UNIFIED IDEOGRAPH + {0x89C3, 0x5609}, //832 #CJK UNIFIED IDEOGRAPH + {0x89C4, 0x590F}, //833 #CJK UNIFIED IDEOGRAPH + {0x89C5, 0x5AC1}, //834 #CJK UNIFIED IDEOGRAPH + {0x89C6, 0x5BB6}, //835 #CJK UNIFIED IDEOGRAPH + {0x89C7, 0x5BE1}, //836 #CJK UNIFIED IDEOGRAPH + {0x89C8, 0x79D1}, //837 #CJK UNIFIED IDEOGRAPH + {0x89C9, 0x6687}, //838 #CJK UNIFIED IDEOGRAPH + {0x89CA, 0x679C}, //839 #CJK UNIFIED IDEOGRAPH + {0x89CB, 0x67B6}, //840 #CJK UNIFIED IDEOGRAPH + {0x89CC, 0x6B4C}, //841 #CJK UNIFIED IDEOGRAPH + {0x89CD, 0x6CB3}, //842 #CJK UNIFIED IDEOGRAPH + {0x89CE, 0x706B}, //843 #CJK UNIFIED IDEOGRAPH + {0x89CF, 0x73C2}, //844 #CJK UNIFIED IDEOGRAPH + {0x89D0, 0x798D}, //845 #CJK UNIFIED IDEOGRAPH + {0x89D1, 0x79BE}, //846 #CJK UNIFIED IDEOGRAPH + {0x89D2, 0x7A3C}, //847 #CJK UNIFIED IDEOGRAPH + {0x89D3, 0x7B87}, //848 #CJK UNIFIED IDEOGRAPH + {0x89D4, 0x82B1}, //849 #CJK UNIFIED IDEOGRAPH + {0x89D5, 0x82DB}, //850 #CJK UNIFIED IDEOGRAPH + {0x89D6, 0x8304}, //851 #CJK UNIFIED IDEOGRAPH + {0x89D7, 0x8377}, //852 #CJK UNIFIED IDEOGRAPH + {0x89D8, 0x83EF}, //853 #CJK UNIFIED IDEOGRAPH + {0x89D9, 0x83D3}, //854 #CJK UNIFIED IDEOGRAPH + {0x89DA, 0x8766}, //855 #CJK UNIFIED IDEOGRAPH + {0x89DB, 0x8AB2}, //856 #CJK UNIFIED IDEOGRAPH + {0x89DC, 0x5629}, //857 #CJK UNIFIED IDEOGRAPH + {0x89DD, 0x8CA8}, //858 #CJK UNIFIED IDEOGRAPH + {0x89DE, 0x8FE6}, //859 #CJK UNIFIED IDEOGRAPH + {0x89DF, 0x904E}, //860 #CJK UNIFIED IDEOGRAPH + {0x89E0, 0x971E}, //861 #CJK UNIFIED IDEOGRAPH + {0x89E1, 0x868A}, //862 #CJK UNIFIED IDEOGRAPH + {0x89E2, 0x4FC4}, //863 #CJK UNIFIED IDEOGRAPH + {0x89E3, 0x5CE8}, //864 #CJK UNIFIED IDEOGRAPH + {0x89E4, 0x6211}, //865 #CJK UNIFIED IDEOGRAPH + {0x89E5, 0x7259}, //866 #CJK UNIFIED IDEOGRAPH + {0x89E6, 0x753B}, //867 #CJK UNIFIED IDEOGRAPH + {0x89E7, 0x81E5}, //868 #CJK UNIFIED IDEOGRAPH + {0x89E8, 0x82BD}, //869 #CJK UNIFIED IDEOGRAPH + {0x89E9, 0x86FE}, //870 #CJK UNIFIED IDEOGRAPH + {0x89EA, 0x8CC0}, //871 #CJK UNIFIED IDEOGRAPH + {0x89EB, 0x96C5}, //872 #CJK UNIFIED IDEOGRAPH + {0x89EC, 0x9913}, //873 #CJK UNIFIED IDEOGRAPH + {0x89ED, 0x99D5}, //874 #CJK UNIFIED IDEOGRAPH + {0x89EE, 0x4ECB}, //875 #CJK UNIFIED IDEOGRAPH + {0x89EF, 0x4F1A}, //876 #CJK UNIFIED IDEOGRAPH + {0x89F0, 0x89E3}, //877 #CJK UNIFIED IDEOGRAPH + {0x89F1, 0x56DE}, //878 #CJK UNIFIED IDEOGRAPH + {0x89F2, 0x584A}, //879 #CJK UNIFIED IDEOGRAPH + {0x89F3, 0x58CA}, //880 #CJK UNIFIED IDEOGRAPH + {0x89F4, 0x5EFB}, //881 #CJK UNIFIED IDEOGRAPH + {0x89F5, 0x5FEB}, //882 #CJK UNIFIED IDEOGRAPH + {0x89F6, 0x602A}, //883 #CJK UNIFIED IDEOGRAPH + {0x89F7, 0x6094}, //884 #CJK UNIFIED IDEOGRAPH + {0x89F8, 0x6062}, //885 #CJK UNIFIED IDEOGRAPH + {0x89F9, 0x61D0}, //886 #CJK UNIFIED IDEOGRAPH + {0x89FA, 0x6212}, //887 #CJK UNIFIED IDEOGRAPH + {0x89FB, 0x62D0}, //888 #CJK UNIFIED IDEOGRAPH + {0x89FC, 0x6539}, //889 #CJK UNIFIED IDEOGRAPH + {0x8A40, 0x9B41}, //890 #CJK UNIFIED IDEOGRAPH + {0x8A41, 0x6666}, //891 #CJK UNIFIED IDEOGRAPH + {0x8A42, 0x68B0}, //892 #CJK UNIFIED IDEOGRAPH + {0x8A43, 0x6D77}, //893 #CJK UNIFIED IDEOGRAPH + {0x8A44, 0x7070}, //894 #CJK UNIFIED IDEOGRAPH + {0x8A45, 0x754C}, //895 #CJK UNIFIED IDEOGRAPH + {0x8A46, 0x7686}, //896 #CJK UNIFIED IDEOGRAPH + {0x8A47, 0x7D75}, //897 #CJK UNIFIED IDEOGRAPH + {0x8A48, 0x82A5}, //898 #CJK UNIFIED IDEOGRAPH + {0x8A49, 0x87F9}, //899 #CJK UNIFIED IDEOGRAPH + {0x8A4A, 0x958B}, //900 #CJK UNIFIED IDEOGRAPH + {0x8A4B, 0x968E}, //901 #CJK UNIFIED IDEOGRAPH + {0x8A4C, 0x8C9D}, //902 #CJK UNIFIED IDEOGRAPH + {0x8A4D, 0x51F1}, //903 #CJK UNIFIED IDEOGRAPH + {0x8A4E, 0x52BE}, //904 #CJK UNIFIED IDEOGRAPH + {0x8A4F, 0x5916}, //905 #CJK UNIFIED IDEOGRAPH + {0x8A50, 0x54B3}, //906 #CJK UNIFIED IDEOGRAPH + {0x8A51, 0x5BB3}, //907 #CJK UNIFIED IDEOGRAPH + {0x8A52, 0x5D16}, //908 #CJK UNIFIED IDEOGRAPH + {0x8A53, 0x6168}, //909 #CJK UNIFIED IDEOGRAPH + {0x8A54, 0x6982}, //910 #CJK UNIFIED IDEOGRAPH + {0x8A55, 0x6DAF}, //911 #CJK UNIFIED IDEOGRAPH + {0x8A56, 0x788D}, //912 #CJK UNIFIED IDEOGRAPH + {0x8A57, 0x84CB}, //913 #CJK UNIFIED IDEOGRAPH + {0x8A58, 0x8857}, //914 #CJK UNIFIED IDEOGRAPH + {0x8A59, 0x8A72}, //915 #CJK UNIFIED IDEOGRAPH + {0x8A5A, 0x93A7}, //916 #CJK UNIFIED IDEOGRAPH + {0x8A5B, 0x9AB8}, //917 #CJK UNIFIED IDEOGRAPH + {0x8A5C, 0x6D6C}, //918 #CJK UNIFIED IDEOGRAPH + {0x8A5D, 0x99A8}, //919 #CJK UNIFIED IDEOGRAPH + {0x8A5E, 0x86D9}, //920 #CJK UNIFIED IDEOGRAPH + {0x8A5F, 0x57A3}, //921 #CJK UNIFIED IDEOGRAPH + {0x8A60, 0x67FF}, //922 #CJK UNIFIED IDEOGRAPH + {0x8A61, 0x86CE}, //923 #CJK UNIFIED IDEOGRAPH + {0x8A62, 0x920E}, //924 #CJK UNIFIED IDEOGRAPH + {0x8A63, 0x5283}, //925 #CJK UNIFIED IDEOGRAPH + {0x8A64, 0x5687}, //926 #CJK UNIFIED IDEOGRAPH + {0x8A65, 0x5404}, //927 #CJK UNIFIED IDEOGRAPH + {0x8A66, 0x5ED3}, //928 #CJK UNIFIED IDEOGRAPH + {0x8A67, 0x62E1}, //929 #CJK UNIFIED IDEOGRAPH + {0x8A68, 0x64B9}, //930 #CJK UNIFIED IDEOGRAPH + {0x8A69, 0x683C}, //931 #CJK UNIFIED IDEOGRAPH + {0x8A6A, 0x6838}, //932 #CJK UNIFIED IDEOGRAPH + {0x8A6B, 0x6BBB}, //933 #CJK UNIFIED IDEOGRAPH + {0x8A6C, 0x7372}, //934 #CJK UNIFIED IDEOGRAPH + {0x8A6D, 0x78BA}, //935 #CJK UNIFIED IDEOGRAPH + {0x8A6E, 0x7A6B}, //936 #CJK UNIFIED IDEOGRAPH + {0x8A6F, 0x899A}, //937 #CJK UNIFIED IDEOGRAPH + {0x8A70, 0x89D2}, //938 #CJK UNIFIED IDEOGRAPH + {0x8A71, 0x8D6B}, //939 #CJK UNIFIED IDEOGRAPH + {0x8A72, 0x8F03}, //940 #CJK UNIFIED IDEOGRAPH + {0x8A73, 0x90ED}, //941 #CJK UNIFIED IDEOGRAPH + {0x8A74, 0x95A3}, //942 #CJK UNIFIED IDEOGRAPH + {0x8A75, 0x9694}, //943 #CJK UNIFIED IDEOGRAPH + {0x8A76, 0x9769}, //944 #CJK UNIFIED IDEOGRAPH + {0x8A77, 0x5B66}, //945 #CJK UNIFIED IDEOGRAPH + {0x8A78, 0x5CB3}, //946 #CJK UNIFIED IDEOGRAPH + {0x8A79, 0x697D}, //947 #CJK UNIFIED IDEOGRAPH + {0x8A7A, 0x984D}, //948 #CJK UNIFIED IDEOGRAPH + {0x8A7B, 0x984E}, //949 #CJK UNIFIED IDEOGRAPH + {0x8A7C, 0x639B}, //950 #CJK UNIFIED IDEOGRAPH + {0x8A7D, 0x7B20}, //951 #CJK UNIFIED IDEOGRAPH + {0x8A7E, 0x6A2B}, //952 #CJK UNIFIED IDEOGRAPH + {0x8A80, 0x6A7F}, //953 #CJK UNIFIED IDEOGRAPH + {0x8A81, 0x68B6}, //954 #CJK UNIFIED IDEOGRAPH + {0x8A82, 0x9C0D}, //955 #CJK UNIFIED IDEOGRAPH + {0x8A83, 0x6F5F}, //956 #CJK UNIFIED IDEOGRAPH + {0x8A84, 0x5272}, //957 #CJK UNIFIED IDEOGRAPH + {0x8A85, 0x559D}, //958 #CJK UNIFIED IDEOGRAPH + {0x8A86, 0x6070}, //959 #CJK UNIFIED IDEOGRAPH + {0x8A87, 0x62EC}, //960 #CJK UNIFIED IDEOGRAPH + {0x8A88, 0x6D3B}, //961 #CJK UNIFIED IDEOGRAPH + {0x8A89, 0x6E07}, //962 #CJK UNIFIED IDEOGRAPH + {0x8A8A, 0x6ED1}, //963 #CJK UNIFIED IDEOGRAPH + {0x8A8B, 0x845B}, //964 #CJK UNIFIED IDEOGRAPH + {0x8A8C, 0x8910}, //965 #CJK UNIFIED IDEOGRAPH + {0x8A8D, 0x8F44}, //966 #CJK UNIFIED IDEOGRAPH + {0x8A8E, 0x4E14}, //967 #CJK UNIFIED IDEOGRAPH + {0x8A8F, 0x9C39}, //968 #CJK UNIFIED IDEOGRAPH + {0x8A90, 0x53F6}, //969 #CJK UNIFIED IDEOGRAPH + {0x8A91, 0x691B}, //970 #CJK UNIFIED IDEOGRAPH + {0x8A92, 0x6A3A}, //971 #CJK UNIFIED IDEOGRAPH + {0x8A93, 0x9784}, //972 #CJK UNIFIED IDEOGRAPH + {0x8A94, 0x682A}, //973 #CJK UNIFIED IDEOGRAPH + {0x8A95, 0x515C}, //974 #CJK UNIFIED IDEOGRAPH + {0x8A96, 0x7AC3}, //975 #CJK UNIFIED IDEOGRAPH + {0x8A97, 0x84B2}, //976 #CJK UNIFIED IDEOGRAPH + {0x8A98, 0x91DC}, //977 #CJK UNIFIED IDEOGRAPH + {0x8A99, 0x938C}, //978 #CJK UNIFIED IDEOGRAPH + {0x8A9A, 0x565B}, //979 #CJK UNIFIED IDEOGRAPH + {0x8A9B, 0x9D28}, //980 #CJK UNIFIED IDEOGRAPH + {0x8A9C, 0x6822}, //981 #CJK UNIFIED IDEOGRAPH + {0x8A9D, 0x8305}, //982 #CJK UNIFIED IDEOGRAPH + {0x8A9E, 0x8431}, //983 #CJK UNIFIED IDEOGRAPH + {0x8A9F, 0x7CA5}, //984 #CJK UNIFIED IDEOGRAPH + {0x8AA0, 0x5208}, //985 #CJK UNIFIED IDEOGRAPH + {0x8AA1, 0x82C5}, //986 #CJK UNIFIED IDEOGRAPH + {0x8AA2, 0x74E6}, //987 #CJK UNIFIED IDEOGRAPH + {0x8AA3, 0x4E7E}, //988 #CJK UNIFIED IDEOGRAPH + {0x8AA4, 0x4F83}, //989 #CJK UNIFIED IDEOGRAPH + {0x8AA5, 0x51A0}, //990 #CJK UNIFIED IDEOGRAPH + {0x8AA6, 0x5BD2}, //991 #CJK UNIFIED IDEOGRAPH + {0x8AA7, 0x520A}, //992 #CJK UNIFIED IDEOGRAPH + {0x8AA8, 0x52D8}, //993 #CJK UNIFIED IDEOGRAPH + {0x8AA9, 0x52E7}, //994 #CJK UNIFIED IDEOGRAPH + {0x8AAA, 0x5DFB}, //995 #CJK UNIFIED IDEOGRAPH + {0x8AAB, 0x559A}, //996 #CJK UNIFIED IDEOGRAPH + {0x8AAC, 0x582A}, //997 #CJK UNIFIED IDEOGRAPH + {0x8AAD, 0x59E6}, //998 #CJK UNIFIED IDEOGRAPH + {0x8AAE, 0x5B8C}, //999 #CJK UNIFIED IDEOGRAPH + {0x8AAF, 0x5B98}, //1000 #CJK UNIFIED IDEOGRAPH + {0x8AB0, 0x5BDB}, //1001 #CJK UNIFIED IDEOGRAPH + {0x8AB1, 0x5E72}, //1002 #CJK UNIFIED IDEOGRAPH + {0x8AB2, 0x5E79}, //1003 #CJK UNIFIED IDEOGRAPH + {0x8AB3, 0x60A3}, //1004 #CJK UNIFIED IDEOGRAPH + {0x8AB4, 0x611F}, //1005 #CJK UNIFIED IDEOGRAPH + {0x8AB5, 0x6163}, //1006 #CJK UNIFIED IDEOGRAPH + {0x8AB6, 0x61BE}, //1007 #CJK UNIFIED IDEOGRAPH + {0x8AB7, 0x63DB}, //1008 #CJK UNIFIED IDEOGRAPH + {0x8AB8, 0x6562}, //1009 #CJK UNIFIED IDEOGRAPH + {0x8AB9, 0x67D1}, //1010 #CJK UNIFIED IDEOGRAPH + {0x8ABA, 0x6853}, //1011 #CJK UNIFIED IDEOGRAPH + {0x8ABB, 0x68FA}, //1012 #CJK UNIFIED IDEOGRAPH + {0x8ABC, 0x6B3E}, //1013 #CJK UNIFIED IDEOGRAPH + {0x8ABD, 0x6B53}, //1014 #CJK UNIFIED IDEOGRAPH + {0x8ABE, 0x6C57}, //1015 #CJK UNIFIED IDEOGRAPH + {0x8ABF, 0x6F22}, //1016 #CJK UNIFIED IDEOGRAPH + {0x8AC0, 0x6F97}, //1017 #CJK UNIFIED IDEOGRAPH + {0x8AC1, 0x6F45}, //1018 #CJK UNIFIED IDEOGRAPH + {0x8AC2, 0x74B0}, //1019 #CJK UNIFIED IDEOGRAPH + {0x8AC3, 0x7518}, //1020 #CJK UNIFIED IDEOGRAPH + {0x8AC4, 0x76E3}, //1021 #CJK UNIFIED IDEOGRAPH + {0x8AC5, 0x770B}, //1022 #CJK UNIFIED IDEOGRAPH + {0x8AC6, 0x7AFF}, //1023 #CJK UNIFIED IDEOGRAPH + {0x8AC7, 0x7BA1}, //1024 #CJK UNIFIED IDEOGRAPH + {0x8AC8, 0x7C21}, //1025 #CJK UNIFIED IDEOGRAPH + {0x8AC9, 0x7DE9}, //1026 #CJK UNIFIED IDEOGRAPH + {0x8ACA, 0x7F36}, //1027 #CJK UNIFIED IDEOGRAPH + {0x8ACB, 0x7FF0}, //1028 #CJK UNIFIED IDEOGRAPH + {0x8ACC, 0x809D}, //1029 #CJK UNIFIED IDEOGRAPH + {0x8ACD, 0x8266}, //1030 #CJK UNIFIED IDEOGRAPH + {0x8ACE, 0x839E}, //1031 #CJK UNIFIED IDEOGRAPH + {0x8ACF, 0x89B3}, //1032 #CJK UNIFIED IDEOGRAPH + {0x8AD0, 0x8ACC}, //1033 #CJK UNIFIED IDEOGRAPH + {0x8AD1, 0x8CAB}, //1034 #CJK UNIFIED IDEOGRAPH + {0x8AD2, 0x9084}, //1035 #CJK UNIFIED IDEOGRAPH + {0x8AD3, 0x9451}, //1036 #CJK UNIFIED IDEOGRAPH + {0x8AD4, 0x9593}, //1037 #CJK UNIFIED IDEOGRAPH + {0x8AD5, 0x9591}, //1038 #CJK UNIFIED IDEOGRAPH + {0x8AD6, 0x95A2}, //1039 #CJK UNIFIED IDEOGRAPH + {0x8AD7, 0x9665}, //1040 #CJK UNIFIED IDEOGRAPH + {0x8AD8, 0x97D3}, //1041 #CJK UNIFIED IDEOGRAPH + {0x8AD9, 0x9928}, //1042 #CJK UNIFIED IDEOGRAPH + {0x8ADA, 0x8218}, //1043 #CJK UNIFIED IDEOGRAPH + {0x8ADB, 0x4E38}, //1044 #CJK UNIFIED IDEOGRAPH + {0x8ADC, 0x542B}, //1045 #CJK UNIFIED IDEOGRAPH + {0x8ADD, 0x5CB8}, //1046 #CJK UNIFIED IDEOGRAPH + {0x8ADE, 0x5DCC}, //1047 #CJK UNIFIED IDEOGRAPH + {0x8ADF, 0x73A9}, //1048 #CJK UNIFIED IDEOGRAPH + {0x8AE0, 0x764C}, //1049 #CJK UNIFIED IDEOGRAPH + {0x8AE1, 0x773C}, //1050 #CJK UNIFIED IDEOGRAPH + {0x8AE2, 0x5CA9}, //1051 #CJK UNIFIED IDEOGRAPH + {0x8AE3, 0x7FEB}, //1052 #CJK UNIFIED IDEOGRAPH + {0x8AE4, 0x8D0B}, //1053 #CJK UNIFIED IDEOGRAPH + {0x8AE5, 0x96C1}, //1054 #CJK UNIFIED IDEOGRAPH + {0x8AE6, 0x9811}, //1055 #CJK UNIFIED IDEOGRAPH + {0x8AE7, 0x9854}, //1056 #CJK UNIFIED IDEOGRAPH + {0x8AE8, 0x9858}, //1057 #CJK UNIFIED IDEOGRAPH + {0x8AE9, 0x4F01}, //1058 #CJK UNIFIED IDEOGRAPH + {0x8AEA, 0x4F0E}, //1059 #CJK UNIFIED IDEOGRAPH + {0x8AEB, 0x5371}, //1060 #CJK UNIFIED IDEOGRAPH + {0x8AEC, 0x559C}, //1061 #CJK UNIFIED IDEOGRAPH + {0x8AED, 0x5668}, //1062 #CJK UNIFIED IDEOGRAPH + {0x8AEE, 0x57FA}, //1063 #CJK UNIFIED IDEOGRAPH + {0x8AEF, 0x5947}, //1064 #CJK UNIFIED IDEOGRAPH + {0x8AF0, 0x5B09}, //1065 #CJK UNIFIED IDEOGRAPH + {0x8AF1, 0x5BC4}, //1066 #CJK UNIFIED IDEOGRAPH + {0x8AF2, 0x5C90}, //1067 #CJK UNIFIED IDEOGRAPH + {0x8AF3, 0x5E0C}, //1068 #CJK UNIFIED IDEOGRAPH + {0x8AF4, 0x5E7E}, //1069 #CJK UNIFIED IDEOGRAPH + {0x8AF5, 0x5FCC}, //1070 #CJK UNIFIED IDEOGRAPH + {0x8AF6, 0x63EE}, //1071 #CJK UNIFIED IDEOGRAPH + {0x8AF7, 0x673A}, //1072 #CJK UNIFIED IDEOGRAPH + {0x8AF8, 0x65D7}, //1073 #CJK UNIFIED IDEOGRAPH + {0x8AF9, 0x65E2}, //1074 #CJK UNIFIED IDEOGRAPH + {0x8AFA, 0x671F}, //1075 #CJK UNIFIED IDEOGRAPH + {0x8AFB, 0x68CB}, //1076 #CJK UNIFIED IDEOGRAPH + {0x8AFC, 0x68C4}, //1077 #CJK UNIFIED IDEOGRAPH + {0x8B40, 0x6A5F}, //1078 #CJK UNIFIED IDEOGRAPH + {0x8B41, 0x5E30}, //1079 #CJK UNIFIED IDEOGRAPH + {0x8B42, 0x6BC5}, //1080 #CJK UNIFIED IDEOGRAPH + {0x8B43, 0x6C17}, //1081 #CJK UNIFIED IDEOGRAPH + {0x8B44, 0x6C7D}, //1082 #CJK UNIFIED IDEOGRAPH + {0x8B45, 0x757F}, //1083 #CJK UNIFIED IDEOGRAPH + {0x8B46, 0x7948}, //1084 #CJK UNIFIED IDEOGRAPH + {0x8B47, 0x5B63}, //1085 #CJK UNIFIED IDEOGRAPH + {0x8B48, 0x7A00}, //1086 #CJK UNIFIED IDEOGRAPH + {0x8B49, 0x7D00}, //1087 #CJK UNIFIED IDEOGRAPH + {0x8B4A, 0x5FBD}, //1088 #CJK UNIFIED IDEOGRAPH + {0x8B4B, 0x898F}, //1089 #CJK UNIFIED IDEOGRAPH + {0x8B4C, 0x8A18}, //1090 #CJK UNIFIED IDEOGRAPH + {0x8B4D, 0x8CB4}, //1091 #CJK UNIFIED IDEOGRAPH + {0x8B4E, 0x8D77}, //1092 #CJK UNIFIED IDEOGRAPH + {0x8B4F, 0x8ECC}, //1093 #CJK UNIFIED IDEOGRAPH + {0x8B50, 0x8F1D}, //1094 #CJK UNIFIED IDEOGRAPH + {0x8B51, 0x98E2}, //1095 #CJK UNIFIED IDEOGRAPH + {0x8B52, 0x9A0E}, //1096 #CJK UNIFIED IDEOGRAPH + {0x8B53, 0x9B3C}, //1097 #CJK UNIFIED IDEOGRAPH + {0x8B54, 0x4E80}, //1098 #CJK UNIFIED IDEOGRAPH + {0x8B55, 0x507D}, //1099 #CJK UNIFIED IDEOGRAPH + {0x8B56, 0x5100}, //1100 #CJK UNIFIED IDEOGRAPH + {0x8B57, 0x5993}, //1101 #CJK UNIFIED IDEOGRAPH + {0x8B58, 0x5B9C}, //1102 #CJK UNIFIED IDEOGRAPH + {0x8B59, 0x622F}, //1103 #CJK UNIFIED IDEOGRAPH + {0x8B5A, 0x6280}, //1104 #CJK UNIFIED IDEOGRAPH + {0x8B5B, 0x64EC}, //1105 #CJK UNIFIED IDEOGRAPH + {0x8B5C, 0x6B3A}, //1106 #CJK UNIFIED IDEOGRAPH + {0x8B5D, 0x72A0}, //1107 #CJK UNIFIED IDEOGRAPH + {0x8B5E, 0x7591}, //1108 #CJK UNIFIED IDEOGRAPH + {0x8B5F, 0x7947}, //1109 #CJK UNIFIED IDEOGRAPH + {0x8B60, 0x7FA9}, //1110 #CJK UNIFIED IDEOGRAPH + {0x8B61, 0x87FB}, //1111 #CJK UNIFIED IDEOGRAPH + {0x8B62, 0x8ABC}, //1112 #CJK UNIFIED IDEOGRAPH + {0x8B63, 0x8B70}, //1113 #CJK UNIFIED IDEOGRAPH + {0x8B64, 0x63AC}, //1114 #CJK UNIFIED IDEOGRAPH + {0x8B65, 0x83CA}, //1115 #CJK UNIFIED IDEOGRAPH + {0x8B66, 0x97A0}, //1116 #CJK UNIFIED IDEOGRAPH + {0x8B67, 0x5409}, //1117 #CJK UNIFIED IDEOGRAPH + {0x8B68, 0x5403}, //1118 #CJK UNIFIED IDEOGRAPH + {0x8B69, 0x55AB}, //1119 #CJK UNIFIED IDEOGRAPH + {0x8B6A, 0x6854}, //1120 #CJK UNIFIED IDEOGRAPH + {0x8B6B, 0x6A58}, //1121 #CJK UNIFIED IDEOGRAPH + {0x8B6C, 0x8A70}, //1122 #CJK UNIFIED IDEOGRAPH + {0x8B6D, 0x7827}, //1123 #CJK UNIFIED IDEOGRAPH + {0x8B6E, 0x6775}, //1124 #CJK UNIFIED IDEOGRAPH + {0x8B6F, 0x9ECD}, //1125 #CJK UNIFIED IDEOGRAPH + {0x8B70, 0x5374}, //1126 #CJK UNIFIED IDEOGRAPH + {0x8B71, 0x5BA2}, //1127 #CJK UNIFIED IDEOGRAPH + {0x8B72, 0x811A}, //1128 #CJK UNIFIED IDEOGRAPH + {0x8B73, 0x8650}, //1129 #CJK UNIFIED IDEOGRAPH + {0x8B74, 0x9006}, //1130 #CJK UNIFIED IDEOGRAPH + {0x8B75, 0x4E18}, //1131 #CJK UNIFIED IDEOGRAPH + {0x8B76, 0x4E45}, //1132 #CJK UNIFIED IDEOGRAPH + {0x8B77, 0x4EC7}, //1133 #CJK UNIFIED IDEOGRAPH + {0x8B78, 0x4F11}, //1134 #CJK UNIFIED IDEOGRAPH + {0x8B79, 0x53CA}, //1135 #CJK UNIFIED IDEOGRAPH + {0x8B7A, 0x5438}, //1136 #CJK UNIFIED IDEOGRAPH + {0x8B7B, 0x5BAE}, //1137 #CJK UNIFIED IDEOGRAPH + {0x8B7C, 0x5F13}, //1138 #CJK UNIFIED IDEOGRAPH + {0x8B7D, 0x6025}, //1139 #CJK UNIFIED IDEOGRAPH + {0x8B7E, 0x6551}, //1140 #CJK UNIFIED IDEOGRAPH + {0x8B80, 0x673D}, //1141 #CJK UNIFIED IDEOGRAPH + {0x8B81, 0x6C42}, //1142 #CJK UNIFIED IDEOGRAPH + {0x8B82, 0x6C72}, //1143 #CJK UNIFIED IDEOGRAPH + {0x8B83, 0x6CE3}, //1144 #CJK UNIFIED IDEOGRAPH + {0x8B84, 0x7078}, //1145 #CJK UNIFIED IDEOGRAPH + {0x8B85, 0x7403}, //1146 #CJK UNIFIED IDEOGRAPH + {0x8B86, 0x7A76}, //1147 #CJK UNIFIED IDEOGRAPH + {0x8B87, 0x7AAE}, //1148 #CJK UNIFIED IDEOGRAPH + {0x8B88, 0x7B08}, //1149 #CJK UNIFIED IDEOGRAPH + {0x8B89, 0x7D1A}, //1150 #CJK UNIFIED IDEOGRAPH + {0x8B8A, 0x7CFE}, //1151 #CJK UNIFIED IDEOGRAPH + {0x8B8B, 0x7D66}, //1152 #CJK UNIFIED IDEOGRAPH + {0x8B8C, 0x65E7}, //1153 #CJK UNIFIED IDEOGRAPH + {0x8B8D, 0x725B}, //1154 #CJK UNIFIED IDEOGRAPH + {0x8B8E, 0x53BB}, //1155 #CJK UNIFIED IDEOGRAPH + {0x8B8F, 0x5C45}, //1156 #CJK UNIFIED IDEOGRAPH + {0x8B90, 0x5DE8}, //1157 #CJK UNIFIED IDEOGRAPH + {0x8B91, 0x62D2}, //1158 #CJK UNIFIED IDEOGRAPH + {0x8B92, 0x62E0}, //1159 #CJK UNIFIED IDEOGRAPH + {0x8B93, 0x6319}, //1160 #CJK UNIFIED IDEOGRAPH + {0x8B94, 0x6E20}, //1161 #CJK UNIFIED IDEOGRAPH + {0x8B95, 0x865A}, //1162 #CJK UNIFIED IDEOGRAPH + {0x8B96, 0x8A31}, //1163 #CJK UNIFIED IDEOGRAPH + {0x8B97, 0x8DDD}, //1164 #CJK UNIFIED IDEOGRAPH + {0x8B98, 0x92F8}, //1165 #CJK UNIFIED IDEOGRAPH + {0x8B99, 0x6F01}, //1166 #CJK UNIFIED IDEOGRAPH + {0x8B9A, 0x79A6}, //1167 #CJK UNIFIED IDEOGRAPH + {0x8B9B, 0x9B5A}, //1168 #CJK UNIFIED IDEOGRAPH + {0x8B9C, 0x4EA8}, //1169 #CJK UNIFIED IDEOGRAPH + {0x8B9D, 0x4EAB}, //1170 #CJK UNIFIED IDEOGRAPH + {0x8B9E, 0x4EAC}, //1171 #CJK UNIFIED IDEOGRAPH + {0x8B9F, 0x4F9B}, //1172 #CJK UNIFIED IDEOGRAPH + {0x8BA0, 0x4FA0}, //1173 #CJK UNIFIED IDEOGRAPH + {0x8BA1, 0x50D1}, //1174 #CJK UNIFIED IDEOGRAPH + {0x8BA2, 0x5147}, //1175 #CJK UNIFIED IDEOGRAPH + {0x8BA3, 0x7AF6}, //1176 #CJK UNIFIED IDEOGRAPH + {0x8BA4, 0x5171}, //1177 #CJK UNIFIED IDEOGRAPH + {0x8BA5, 0x51F6}, //1178 #CJK UNIFIED IDEOGRAPH + {0x8BA6, 0x5354}, //1179 #CJK UNIFIED IDEOGRAPH + {0x8BA7, 0x5321}, //1180 #CJK UNIFIED IDEOGRAPH + {0x8BA8, 0x537F}, //1181 #CJK UNIFIED IDEOGRAPH + {0x8BA9, 0x53EB}, //1182 #CJK UNIFIED IDEOGRAPH + {0x8BAA, 0x55AC}, //1183 #CJK UNIFIED IDEOGRAPH + {0x8BAB, 0x5883}, //1184 #CJK UNIFIED IDEOGRAPH + {0x8BAC, 0x5CE1}, //1185 #CJK UNIFIED IDEOGRAPH + {0x8BAD, 0x5F37}, //1186 #CJK UNIFIED IDEOGRAPH + {0x8BAE, 0x5F4A}, //1187 #CJK UNIFIED IDEOGRAPH + {0x8BAF, 0x602F}, //1188 #CJK UNIFIED IDEOGRAPH + {0x8BB0, 0x6050}, //1189 #CJK UNIFIED IDEOGRAPH + {0x8BB1, 0x606D}, //1190 #CJK UNIFIED IDEOGRAPH + {0x8BB2, 0x631F}, //1191 #CJK UNIFIED IDEOGRAPH + {0x8BB3, 0x6559}, //1192 #CJK UNIFIED IDEOGRAPH + {0x8BB4, 0x6A4B}, //1193 #CJK UNIFIED IDEOGRAPH + {0x8BB5, 0x6CC1}, //1194 #CJK UNIFIED IDEOGRAPH + {0x8BB6, 0x72C2}, //1195 #CJK UNIFIED IDEOGRAPH + {0x8BB7, 0x72ED}, //1196 #CJK UNIFIED IDEOGRAPH + {0x8BB8, 0x77EF}, //1197 #CJK UNIFIED IDEOGRAPH + {0x8BB9, 0x80F8}, //1198 #CJK UNIFIED IDEOGRAPH + {0x8BBA, 0x8105}, //1199 #CJK UNIFIED IDEOGRAPH + {0x8BBB, 0x8208}, //1200 #CJK UNIFIED IDEOGRAPH + {0x8BBC, 0x854E}, //1201 #CJK UNIFIED IDEOGRAPH + {0x8BBD, 0x90F7}, //1202 #CJK UNIFIED IDEOGRAPH + {0x8BBE, 0x93E1}, //1203 #CJK UNIFIED IDEOGRAPH + {0x8BBF, 0x97FF}, //1204 #CJK UNIFIED IDEOGRAPH + {0x8BC0, 0x9957}, //1205 #CJK UNIFIED IDEOGRAPH + {0x8BC1, 0x9A5A}, //1206 #CJK UNIFIED IDEOGRAPH + {0x8BC2, 0x4EF0}, //1207 #CJK UNIFIED IDEOGRAPH + {0x8BC3, 0x51DD}, //1208 #CJK UNIFIED IDEOGRAPH + {0x8BC4, 0x5C2D}, //1209 #CJK UNIFIED IDEOGRAPH + {0x8BC5, 0x6681}, //1210 #CJK UNIFIED IDEOGRAPH + {0x8BC6, 0x696D}, //1211 #CJK UNIFIED IDEOGRAPH + {0x8BC7, 0x5C40}, //1212 #CJK UNIFIED IDEOGRAPH + {0x8BC8, 0x66F2}, //1213 #CJK UNIFIED IDEOGRAPH + {0x8BC9, 0x6975}, //1214 #CJK UNIFIED IDEOGRAPH + {0x8BCA, 0x7389}, //1215 #CJK UNIFIED IDEOGRAPH + {0x8BCB, 0x6850}, //1216 #CJK UNIFIED IDEOGRAPH + {0x8BCC, 0x7C81}, //1217 #CJK UNIFIED IDEOGRAPH + {0x8BCD, 0x50C5}, //1218 #CJK UNIFIED IDEOGRAPH + {0x8BCE, 0x52E4}, //1219 #CJK UNIFIED IDEOGRAPH + {0x8BCF, 0x5747}, //1220 #CJK UNIFIED IDEOGRAPH + {0x8BD0, 0x5DFE}, //1221 #CJK UNIFIED IDEOGRAPH + {0x8BD1, 0x9326}, //1222 #CJK UNIFIED IDEOGRAPH + {0x8BD2, 0x65A4}, //1223 #CJK UNIFIED IDEOGRAPH + {0x8BD3, 0x6B23}, //1224 #CJK UNIFIED IDEOGRAPH + {0x8BD4, 0x6B3D}, //1225 #CJK UNIFIED IDEOGRAPH + {0x8BD5, 0x7434}, //1226 #CJK UNIFIED IDEOGRAPH + {0x8BD6, 0x7981}, //1227 #CJK UNIFIED IDEOGRAPH + {0x8BD7, 0x79BD}, //1228 #CJK UNIFIED IDEOGRAPH + {0x8BD8, 0x7B4B}, //1229 #CJK UNIFIED IDEOGRAPH + {0x8BD9, 0x7DCA}, //1230 #CJK UNIFIED IDEOGRAPH + {0x8BDA, 0x82B9}, //1231 #CJK UNIFIED IDEOGRAPH + {0x8BDB, 0x83CC}, //1232 #CJK UNIFIED IDEOGRAPH + {0x8BDC, 0x887F}, //1233 #CJK UNIFIED IDEOGRAPH + {0x8BDD, 0x895F}, //1234 #CJK UNIFIED IDEOGRAPH + {0x8BDE, 0x8B39}, //1235 #CJK UNIFIED IDEOGRAPH + {0x8BDF, 0x8FD1}, //1236 #CJK UNIFIED IDEOGRAPH + {0x8BE0, 0x91D1}, //1237 #CJK UNIFIED IDEOGRAPH + {0x8BE1, 0x541F}, //1238 #CJK UNIFIED IDEOGRAPH + {0x8BE2, 0x9280}, //1239 #CJK UNIFIED IDEOGRAPH + {0x8BE3, 0x4E5D}, //1240 #CJK UNIFIED IDEOGRAPH + {0x8BE4, 0x5036}, //1241 #CJK UNIFIED IDEOGRAPH + {0x8BE5, 0x53E5}, //1242 #CJK UNIFIED IDEOGRAPH + {0x8BE6, 0x533A}, //1243 #CJK UNIFIED IDEOGRAPH + {0x8BE7, 0x72D7}, //1244 #CJK UNIFIED IDEOGRAPH + {0x8BE8, 0x7396}, //1245 #CJK UNIFIED IDEOGRAPH + {0x8BE9, 0x77E9}, //1246 #CJK UNIFIED IDEOGRAPH + {0x8BEA, 0x82E6}, //1247 #CJK UNIFIED IDEOGRAPH + {0x8BEB, 0x8EAF}, //1248 #CJK UNIFIED IDEOGRAPH + {0x8BEC, 0x99C6}, //1249 #CJK UNIFIED IDEOGRAPH + {0x8BED, 0x99C8}, //1250 #CJK UNIFIED IDEOGRAPH + {0x8BEE, 0x99D2}, //1251 #CJK UNIFIED IDEOGRAPH + {0x8BEF, 0x5177}, //1252 #CJK UNIFIED IDEOGRAPH + {0x8BF0, 0x611A}, //1253 #CJK UNIFIED IDEOGRAPH + {0x8BF1, 0x865E}, //1254 #CJK UNIFIED IDEOGRAPH + {0x8BF2, 0x55B0}, //1255 #CJK UNIFIED IDEOGRAPH + {0x8BF3, 0x7A7A}, //1256 #CJK UNIFIED IDEOGRAPH + {0x8BF4, 0x5076}, //1257 #CJK UNIFIED IDEOGRAPH + {0x8BF5, 0x5BD3}, //1258 #CJK UNIFIED IDEOGRAPH + {0x8BF6, 0x9047}, //1259 #CJK UNIFIED IDEOGRAPH + {0x8BF7, 0x9685}, //1260 #CJK UNIFIED IDEOGRAPH + {0x8BF8, 0x4E32}, //1261 #CJK UNIFIED IDEOGRAPH + {0x8BF9, 0x6ADB}, //1262 #CJK UNIFIED IDEOGRAPH + {0x8BFA, 0x91E7}, //1263 #CJK UNIFIED IDEOGRAPH + {0x8BFB, 0x5C51}, //1264 #CJK UNIFIED IDEOGRAPH + {0x8BFC, 0x5C48}, //1265 #CJK UNIFIED IDEOGRAPH + {0x8C40, 0x6398}, //1266 #CJK UNIFIED IDEOGRAPH + {0x8C41, 0x7A9F}, //1267 #CJK UNIFIED IDEOGRAPH + {0x8C42, 0x6C93}, //1268 #CJK UNIFIED IDEOGRAPH + {0x8C43, 0x9774}, //1269 #CJK UNIFIED IDEOGRAPH + {0x8C44, 0x8F61}, //1270 #CJK UNIFIED IDEOGRAPH + {0x8C45, 0x7AAA}, //1271 #CJK UNIFIED IDEOGRAPH + {0x8C46, 0x718A}, //1272 #CJK UNIFIED IDEOGRAPH + {0x8C47, 0x9688}, //1273 #CJK UNIFIED IDEOGRAPH + {0x8C48, 0x7C82}, //1274 #CJK UNIFIED IDEOGRAPH + {0x8C49, 0x6817}, //1275 #CJK UNIFIED IDEOGRAPH + {0x8C4A, 0x7E70}, //1276 #CJK UNIFIED IDEOGRAPH + {0x8C4B, 0x6851}, //1277 #CJK UNIFIED IDEOGRAPH + {0x8C4C, 0x936C}, //1278 #CJK UNIFIED IDEOGRAPH + {0x8C4D, 0x52F2}, //1279 #CJK UNIFIED IDEOGRAPH + {0x8C4E, 0x541B}, //1280 #CJK UNIFIED IDEOGRAPH + {0x8C4F, 0x85AB}, //1281 #CJK UNIFIED IDEOGRAPH + {0x8C50, 0x8A13}, //1282 #CJK UNIFIED IDEOGRAPH + {0x8C51, 0x7FA4}, //1283 #CJK UNIFIED IDEOGRAPH + {0x8C52, 0x8ECD}, //1284 #CJK UNIFIED IDEOGRAPH + {0x8C53, 0x90E1}, //1285 #CJK UNIFIED IDEOGRAPH + {0x8C54, 0x5366}, //1286 #CJK UNIFIED IDEOGRAPH + {0x8C55, 0x8888}, //1287 #CJK UNIFIED IDEOGRAPH + {0x8C56, 0x7941}, //1288 #CJK UNIFIED IDEOGRAPH + {0x8C57, 0x4FC2}, //1289 #CJK UNIFIED IDEOGRAPH + {0x8C58, 0x50BE}, //1290 #CJK UNIFIED IDEOGRAPH + {0x8C59, 0x5211}, //1291 #CJK UNIFIED IDEOGRAPH + {0x8C5A, 0x5144}, //1292 #CJK UNIFIED IDEOGRAPH + {0x8C5B, 0x5553}, //1293 #CJK UNIFIED IDEOGRAPH + {0x8C5C, 0x572D}, //1294 #CJK UNIFIED IDEOGRAPH + {0x8C5D, 0x73EA}, //1295 #CJK UNIFIED IDEOGRAPH + {0x8C5E, 0x578B}, //1296 #CJK UNIFIED IDEOGRAPH + {0x8C5F, 0x5951}, //1297 #CJK UNIFIED IDEOGRAPH + {0x8C60, 0x5F62}, //1298 #CJK UNIFIED IDEOGRAPH + {0x8C61, 0x5F84}, //1299 #CJK UNIFIED IDEOGRAPH + {0x8C62, 0x6075}, //1300 #CJK UNIFIED IDEOGRAPH + {0x8C63, 0x6176}, //1301 #CJK UNIFIED IDEOGRAPH + {0x8C64, 0x6167}, //1302 #CJK UNIFIED IDEOGRAPH + {0x8C65, 0x61A9}, //1303 #CJK UNIFIED IDEOGRAPH + {0x8C66, 0x63B2}, //1304 #CJK UNIFIED IDEOGRAPH + {0x8C67, 0x643A}, //1305 #CJK UNIFIED IDEOGRAPH + {0x8C68, 0x656C}, //1306 #CJK UNIFIED IDEOGRAPH + {0x8C69, 0x666F}, //1307 #CJK UNIFIED IDEOGRAPH + {0x8C6A, 0x6842}, //1308 #CJK UNIFIED IDEOGRAPH + {0x8C6B, 0x6E13}, //1309 #CJK UNIFIED IDEOGRAPH + {0x8C6C, 0x7566}, //1310 #CJK UNIFIED IDEOGRAPH + {0x8C6D, 0x7A3D}, //1311 #CJK UNIFIED IDEOGRAPH + {0x8C6E, 0x7CFB}, //1312 #CJK UNIFIED IDEOGRAPH + {0x8C6F, 0x7D4C}, //1313 #CJK UNIFIED IDEOGRAPH + {0x8C70, 0x7D99}, //1314 #CJK UNIFIED IDEOGRAPH + {0x8C71, 0x7E4B}, //1315 #CJK UNIFIED IDEOGRAPH + {0x8C72, 0x7F6B}, //1316 #CJK UNIFIED IDEOGRAPH + {0x8C73, 0x830E}, //1317 #CJK UNIFIED IDEOGRAPH + {0x8C74, 0x834A}, //1318 #CJK UNIFIED IDEOGRAPH + {0x8C75, 0x86CD}, //1319 #CJK UNIFIED IDEOGRAPH + {0x8C76, 0x8A08}, //1320 #CJK UNIFIED IDEOGRAPH + {0x8C77, 0x8A63}, //1321 #CJK UNIFIED IDEOGRAPH + {0x8C78, 0x8B66}, //1322 #CJK UNIFIED IDEOGRAPH + {0x8C79, 0x8EFD}, //1323 #CJK UNIFIED IDEOGRAPH + {0x8C7A, 0x981A}, //1324 #CJK UNIFIED IDEOGRAPH + {0x8C7B, 0x9D8F}, //1325 #CJK UNIFIED IDEOGRAPH + {0x8C7C, 0x82B8}, //1326 #CJK UNIFIED IDEOGRAPH + {0x8C7D, 0x8FCE}, //1327 #CJK UNIFIED IDEOGRAPH + {0x8C7E, 0x9BE8}, //1328 #CJK UNIFIED IDEOGRAPH + {0x8C80, 0x5287}, //1329 #CJK UNIFIED IDEOGRAPH + {0x8C81, 0x621F}, //1330 #CJK UNIFIED IDEOGRAPH + {0x8C82, 0x6483}, //1331 #CJK UNIFIED IDEOGRAPH + {0x8C83, 0x6FC0}, //1332 #CJK UNIFIED IDEOGRAPH + {0x8C84, 0x9699}, //1333 #CJK UNIFIED IDEOGRAPH + {0x8C85, 0x6841}, //1334 #CJK UNIFIED IDEOGRAPH + {0x8C86, 0x5091}, //1335 #CJK UNIFIED IDEOGRAPH + {0x8C87, 0x6B20}, //1336 #CJK UNIFIED IDEOGRAPH + {0x8C88, 0x6C7A}, //1337 #CJK UNIFIED IDEOGRAPH + {0x8C89, 0x6F54}, //1338 #CJK UNIFIED IDEOGRAPH + {0x8C8A, 0x7A74}, //1339 #CJK UNIFIED IDEOGRAPH + {0x8C8B, 0x7D50}, //1340 #CJK UNIFIED IDEOGRAPH + {0x8C8C, 0x8840}, //1341 #CJK UNIFIED IDEOGRAPH + {0x8C8D, 0x8A23}, //1342 #CJK UNIFIED IDEOGRAPH + {0x8C8E, 0x6708}, //1343 #CJK UNIFIED IDEOGRAPH + {0x8C8F, 0x4EF6}, //1344 #CJK UNIFIED IDEOGRAPH + {0x8C90, 0x5039}, //1345 #CJK UNIFIED IDEOGRAPH + {0x8C91, 0x5026}, //1346 #CJK UNIFIED IDEOGRAPH + {0x8C92, 0x5065}, //1347 #CJK UNIFIED IDEOGRAPH + {0x8C93, 0x517C}, //1348 #CJK UNIFIED IDEOGRAPH + {0x8C94, 0x5238}, //1349 #CJK UNIFIED IDEOGRAPH + {0x8C95, 0x5263}, //1350 #CJK UNIFIED IDEOGRAPH + {0x8C96, 0x55A7}, //1351 #CJK UNIFIED IDEOGRAPH + {0x8C97, 0x570F}, //1352 #CJK UNIFIED IDEOGRAPH + {0x8C98, 0x5805}, //1353 #CJK UNIFIED IDEOGRAPH + {0x8C99, 0x5ACC}, //1354 #CJK UNIFIED IDEOGRAPH + {0x8C9A, 0x5EFA}, //1355 #CJK UNIFIED IDEOGRAPH + {0x8C9B, 0x61B2}, //1356 #CJK UNIFIED IDEOGRAPH + {0x8C9C, 0x61F8}, //1357 #CJK UNIFIED IDEOGRAPH + {0x8C9D, 0x62F3}, //1358 #CJK UNIFIED IDEOGRAPH + {0x8C9E, 0x6372}, //1359 #CJK UNIFIED IDEOGRAPH + {0x8C9F, 0x691C}, //1360 #CJK UNIFIED IDEOGRAPH + {0x8CA0, 0x6A29}, //1361 #CJK UNIFIED IDEOGRAPH + {0x8CA1, 0x727D}, //1362 #CJK UNIFIED IDEOGRAPH + {0x8CA2, 0x72AC}, //1363 #CJK UNIFIED IDEOGRAPH + {0x8CA3, 0x732E}, //1364 #CJK UNIFIED IDEOGRAPH + {0x8CA4, 0x7814}, //1365 #CJK UNIFIED IDEOGRAPH + {0x8CA5, 0x786F}, //1366 #CJK UNIFIED IDEOGRAPH + {0x8CA6, 0x7D79}, //1367 #CJK UNIFIED IDEOGRAPH + {0x8CA7, 0x770C}, //1368 #CJK UNIFIED IDEOGRAPH + {0x8CA8, 0x80A9}, //1369 #CJK UNIFIED IDEOGRAPH + {0x8CA9, 0x898B}, //1370 #CJK UNIFIED IDEOGRAPH + {0x8CAA, 0x8B19}, //1371 #CJK UNIFIED IDEOGRAPH + {0x8CAB, 0x8CE2}, //1372 #CJK UNIFIED IDEOGRAPH + {0x8CAC, 0x8ED2}, //1373 #CJK UNIFIED IDEOGRAPH + {0x8CAD, 0x9063}, //1374 #CJK UNIFIED IDEOGRAPH + {0x8CAE, 0x9375}, //1375 #CJK UNIFIED IDEOGRAPH + {0x8CAF, 0x967A}, //1376 #CJK UNIFIED IDEOGRAPH + {0x8CB0, 0x9855}, //1377 #CJK UNIFIED IDEOGRAPH + {0x8CB1, 0x9A13}, //1378 #CJK UNIFIED IDEOGRAPH + {0x8CB2, 0x9E78}, //1379 #CJK UNIFIED IDEOGRAPH + {0x8CB3, 0x5143}, //1380 #CJK UNIFIED IDEOGRAPH + {0x8CB4, 0x539F}, //1381 #CJK UNIFIED IDEOGRAPH + {0x8CB5, 0x53B3}, //1382 #CJK UNIFIED IDEOGRAPH + {0x8CB6, 0x5E7B}, //1383 #CJK UNIFIED IDEOGRAPH + {0x8CB7, 0x5F26}, //1384 #CJK UNIFIED IDEOGRAPH + {0x8CB8, 0x6E1B}, //1385 #CJK UNIFIED IDEOGRAPH + {0x8CB9, 0x6E90}, //1386 #CJK UNIFIED IDEOGRAPH + {0x8CBA, 0x7384}, //1387 #CJK UNIFIED IDEOGRAPH + {0x8CBB, 0x73FE}, //1388 #CJK UNIFIED IDEOGRAPH + {0x8CBC, 0x7D43}, //1389 #CJK UNIFIED IDEOGRAPH + {0x8CBD, 0x8237}, //1390 #CJK UNIFIED IDEOGRAPH + {0x8CBE, 0x8A00}, //1391 #CJK UNIFIED IDEOGRAPH + {0x8CBF, 0x8AFA}, //1392 #CJK UNIFIED IDEOGRAPH + {0x8CC0, 0x9650}, //1393 #CJK UNIFIED IDEOGRAPH + {0x8CC1, 0x4E4E}, //1394 #CJK UNIFIED IDEOGRAPH + {0x8CC2, 0x500B}, //1395 #CJK UNIFIED IDEOGRAPH + {0x8CC3, 0x53E4}, //1396 #CJK UNIFIED IDEOGRAPH + {0x8CC4, 0x547C}, //1397 #CJK UNIFIED IDEOGRAPH + {0x8CC5, 0x56FA}, //1398 #CJK UNIFIED IDEOGRAPH + {0x8CC6, 0x59D1}, //1399 #CJK UNIFIED IDEOGRAPH + {0x8CC7, 0x5B64}, //1400 #CJK UNIFIED IDEOGRAPH + {0x8CC8, 0x5DF1}, //1401 #CJK UNIFIED IDEOGRAPH + {0x8CC9, 0x5EAB}, //1402 #CJK UNIFIED IDEOGRAPH + {0x8CCA, 0x5F27}, //1403 #CJK UNIFIED IDEOGRAPH + {0x8CCB, 0x6238}, //1404 #CJK UNIFIED IDEOGRAPH + {0x8CCC, 0x6545}, //1405 #CJK UNIFIED IDEOGRAPH + {0x8CCD, 0x67AF}, //1406 #CJK UNIFIED IDEOGRAPH + {0x8CCE, 0x6E56}, //1407 #CJK UNIFIED IDEOGRAPH + {0x8CCF, 0x72D0}, //1408 #CJK UNIFIED IDEOGRAPH + {0x8CD0, 0x7CCA}, //1409 #CJK UNIFIED IDEOGRAPH + {0x8CD1, 0x88B4}, //1410 #CJK UNIFIED IDEOGRAPH + {0x8CD2, 0x80A1}, //1411 #CJK UNIFIED IDEOGRAPH + {0x8CD3, 0x80E1}, //1412 #CJK UNIFIED IDEOGRAPH + {0x8CD4, 0x83F0}, //1413 #CJK UNIFIED IDEOGRAPH + {0x8CD5, 0x864E}, //1414 #CJK UNIFIED IDEOGRAPH + {0x8CD6, 0x8A87}, //1415 #CJK UNIFIED IDEOGRAPH + {0x8CD7, 0x8DE8}, //1416 #CJK UNIFIED IDEOGRAPH + {0x8CD8, 0x9237}, //1417 #CJK UNIFIED IDEOGRAPH + {0x8CD9, 0x96C7}, //1418 #CJK UNIFIED IDEOGRAPH + {0x8CDA, 0x9867}, //1419 #CJK UNIFIED IDEOGRAPH + {0x8CDB, 0x9F13}, //1420 #CJK UNIFIED IDEOGRAPH + {0x8CDC, 0x4E94}, //1421 #CJK UNIFIED IDEOGRAPH + {0x8CDD, 0x4E92}, //1422 #CJK UNIFIED IDEOGRAPH + {0x8CDE, 0x4F0D}, //1423 #CJK UNIFIED IDEOGRAPH + {0x8CDF, 0x5348}, //1424 #CJK UNIFIED IDEOGRAPH + {0x8CE0, 0x5449}, //1425 #CJK UNIFIED IDEOGRAPH + {0x8CE1, 0x543E}, //1426 #CJK UNIFIED IDEOGRAPH + {0x8CE2, 0x5A2F}, //1427 #CJK UNIFIED IDEOGRAPH + {0x8CE3, 0x5F8C}, //1428 #CJK UNIFIED IDEOGRAPH + {0x8CE4, 0x5FA1}, //1429 #CJK UNIFIED IDEOGRAPH + {0x8CE5, 0x609F}, //1430 #CJK UNIFIED IDEOGRAPH + {0x8CE6, 0x68A7}, //1431 #CJK UNIFIED IDEOGRAPH + {0x8CE7, 0x6A8E}, //1432 #CJK UNIFIED IDEOGRAPH + {0x8CE8, 0x745A}, //1433 #CJK UNIFIED IDEOGRAPH + {0x8CE9, 0x7881}, //1434 #CJK UNIFIED IDEOGRAPH + {0x8CEA, 0x8A9E}, //1435 #CJK UNIFIED IDEOGRAPH + {0x8CEB, 0x8AA4}, //1436 #CJK UNIFIED IDEOGRAPH + {0x8CEC, 0x8B77}, //1437 #CJK UNIFIED IDEOGRAPH + {0x8CED, 0x9190}, //1438 #CJK UNIFIED IDEOGRAPH + {0x8CEE, 0x4E5E}, //1439 #CJK UNIFIED IDEOGRAPH + {0x8CEF, 0x9BC9}, //1440 #CJK UNIFIED IDEOGRAPH + {0x8CF0, 0x4EA4}, //1441 #CJK UNIFIED IDEOGRAPH + {0x8CF1, 0x4F7C}, //1442 #CJK UNIFIED IDEOGRAPH + {0x8CF2, 0x4FAF}, //1443 #CJK UNIFIED IDEOGRAPH + {0x8CF3, 0x5019}, //1444 #CJK UNIFIED IDEOGRAPH + {0x8CF4, 0x5016}, //1445 #CJK UNIFIED IDEOGRAPH + {0x8CF5, 0x5149}, //1446 #CJK UNIFIED IDEOGRAPH + {0x8CF6, 0x516C}, //1447 #CJK UNIFIED IDEOGRAPH + {0x8CF7, 0x529F}, //1448 #CJK UNIFIED IDEOGRAPH + {0x8CF8, 0x52B9}, //1449 #CJK UNIFIED IDEOGRAPH + {0x8CF9, 0x52FE}, //1450 #CJK UNIFIED IDEOGRAPH + {0x8CFA, 0x539A}, //1451 #CJK UNIFIED IDEOGRAPH + {0x8CFB, 0x53E3}, //1452 #CJK UNIFIED IDEOGRAPH + {0x8CFC, 0x5411}, //1453 #CJK UNIFIED IDEOGRAPH + {0x8D40, 0x540E}, //1454 #CJK UNIFIED IDEOGRAPH + {0x8D41, 0x5589}, //1455 #CJK UNIFIED IDEOGRAPH + {0x8D42, 0x5751}, //1456 #CJK UNIFIED IDEOGRAPH + {0x8D43, 0x57A2}, //1457 #CJK UNIFIED IDEOGRAPH + {0x8D44, 0x597D}, //1458 #CJK UNIFIED IDEOGRAPH + {0x8D45, 0x5B54}, //1459 #CJK UNIFIED IDEOGRAPH + {0x8D46, 0x5B5D}, //1460 #CJK UNIFIED IDEOGRAPH + {0x8D47, 0x5B8F}, //1461 #CJK UNIFIED IDEOGRAPH + {0x8D48, 0x5DE5}, //1462 #CJK UNIFIED IDEOGRAPH + {0x8D49, 0x5DE7}, //1463 #CJK UNIFIED IDEOGRAPH + {0x8D4A, 0x5DF7}, //1464 #CJK UNIFIED IDEOGRAPH + {0x8D4B, 0x5E78}, //1465 #CJK UNIFIED IDEOGRAPH + {0x8D4C, 0x5E83}, //1466 #CJK UNIFIED IDEOGRAPH + {0x8D4D, 0x5E9A}, //1467 #CJK UNIFIED IDEOGRAPH + {0x8D4E, 0x5EB7}, //1468 #CJK UNIFIED IDEOGRAPH + {0x8D4F, 0x5F18}, //1469 #CJK UNIFIED IDEOGRAPH + {0x8D50, 0x6052}, //1470 #CJK UNIFIED IDEOGRAPH + {0x8D51, 0x614C}, //1471 #CJK UNIFIED IDEOGRAPH + {0x8D52, 0x6297}, //1472 #CJK UNIFIED IDEOGRAPH + {0x8D53, 0x62D8}, //1473 #CJK UNIFIED IDEOGRAPH + {0x8D54, 0x63A7}, //1474 #CJK UNIFIED IDEOGRAPH + {0x8D55, 0x653B}, //1475 #CJK UNIFIED IDEOGRAPH + {0x8D56, 0x6602}, //1476 #CJK UNIFIED IDEOGRAPH + {0x8D57, 0x6643}, //1477 #CJK UNIFIED IDEOGRAPH + {0x8D58, 0x66F4}, //1478 #CJK UNIFIED IDEOGRAPH + {0x8D59, 0x676D}, //1479 #CJK UNIFIED IDEOGRAPH + {0x8D5A, 0x6821}, //1480 #CJK UNIFIED IDEOGRAPH + {0x8D5B, 0x6897}, //1481 #CJK UNIFIED IDEOGRAPH + {0x8D5C, 0x69CB}, //1482 #CJK UNIFIED IDEOGRAPH + {0x8D5D, 0x6C5F}, //1483 #CJK UNIFIED IDEOGRAPH + {0x8D5E, 0x6D2A}, //1484 #CJK UNIFIED IDEOGRAPH + {0x8D5F, 0x6D69}, //1485 #CJK UNIFIED IDEOGRAPH + {0x8D60, 0x6E2F}, //1486 #CJK UNIFIED IDEOGRAPH + {0x8D61, 0x6E9D}, //1487 #CJK UNIFIED IDEOGRAPH + {0x8D62, 0x7532}, //1488 #CJK UNIFIED IDEOGRAPH + {0x8D63, 0x7687}, //1489 #CJK UNIFIED IDEOGRAPH + {0x8D64, 0x786C}, //1490 #CJK UNIFIED IDEOGRAPH + {0x8D65, 0x7A3F}, //1491 #CJK UNIFIED IDEOGRAPH + {0x8D66, 0x7CE0}, //1492 #CJK UNIFIED IDEOGRAPH + {0x8D67, 0x7D05}, //1493 #CJK UNIFIED IDEOGRAPH + {0x8D68, 0x7D18}, //1494 #CJK UNIFIED IDEOGRAPH + {0x8D69, 0x7D5E}, //1495 #CJK UNIFIED IDEOGRAPH + {0x8D6A, 0x7DB1}, //1496 #CJK UNIFIED IDEOGRAPH + {0x8D6B, 0x8015}, //1497 #CJK UNIFIED IDEOGRAPH + {0x8D6C, 0x8003}, //1498 #CJK UNIFIED IDEOGRAPH + {0x8D6D, 0x80AF}, //1499 #CJK UNIFIED IDEOGRAPH + {0x8D6E, 0x80B1}, //1500 #CJK UNIFIED IDEOGRAPH + {0x8D6F, 0x8154}, //1501 #CJK UNIFIED IDEOGRAPH + {0x8D70, 0x818F}, //1502 #CJK UNIFIED IDEOGRAPH + {0x8D71, 0x822A}, //1503 #CJK UNIFIED IDEOGRAPH + {0x8D72, 0x8352}, //1504 #CJK UNIFIED IDEOGRAPH + {0x8D73, 0x884C}, //1505 #CJK UNIFIED IDEOGRAPH + {0x8D74, 0x8861}, //1506 #CJK UNIFIED IDEOGRAPH + {0x8D75, 0x8B1B}, //1507 #CJK UNIFIED IDEOGRAPH + {0x8D76, 0x8CA2}, //1508 #CJK UNIFIED IDEOGRAPH + {0x8D77, 0x8CFC}, //1509 #CJK UNIFIED IDEOGRAPH + {0x8D78, 0x90CA}, //1510 #CJK UNIFIED IDEOGRAPH + {0x8D79, 0x9175}, //1511 #CJK UNIFIED IDEOGRAPH + {0x8D7A, 0x9271}, //1512 #CJK UNIFIED IDEOGRAPH + {0x8D7B, 0x783F}, //1513 #CJK UNIFIED IDEOGRAPH + {0x8D7C, 0x92FC}, //1514 #CJK UNIFIED IDEOGRAPH + {0x8D7D, 0x95A4}, //1515 #CJK UNIFIED IDEOGRAPH + {0x8D7E, 0x964D}, //1516 #CJK UNIFIED IDEOGRAPH + {0x8D80, 0x9805}, //1517 #CJK UNIFIED IDEOGRAPH + {0x8D81, 0x9999}, //1518 #CJK UNIFIED IDEOGRAPH + {0x8D82, 0x9AD8}, //1519 #CJK UNIFIED IDEOGRAPH + {0x8D83, 0x9D3B}, //1520 #CJK UNIFIED IDEOGRAPH + {0x8D84, 0x525B}, //1521 #CJK UNIFIED IDEOGRAPH + {0x8D85, 0x52AB}, //1522 #CJK UNIFIED IDEOGRAPH + {0x8D86, 0x53F7}, //1523 #CJK UNIFIED IDEOGRAPH + {0x8D87, 0x5408}, //1524 #CJK UNIFIED IDEOGRAPH + {0x8D88, 0x58D5}, //1525 #CJK UNIFIED IDEOGRAPH + {0x8D89, 0x62F7}, //1526 #CJK UNIFIED IDEOGRAPH + {0x8D8A, 0x6FE0}, //1527 #CJK UNIFIED IDEOGRAPH + {0x8D8B, 0x8C6A}, //1528 #CJK UNIFIED IDEOGRAPH + {0x8D8C, 0x8F5F}, //1529 #CJK UNIFIED IDEOGRAPH + {0x8D8D, 0x9EB9}, //1530 #CJK UNIFIED IDEOGRAPH + {0x8D8E, 0x514B}, //1531 #CJK UNIFIED IDEOGRAPH + {0x8D8F, 0x523B}, //1532 #CJK UNIFIED IDEOGRAPH + {0x8D90, 0x544A}, //1533 #CJK UNIFIED IDEOGRAPH + {0x8D91, 0x56FD}, //1534 #CJK UNIFIED IDEOGRAPH + {0x8D92, 0x7A40}, //1535 #CJK UNIFIED IDEOGRAPH + {0x8D93, 0x9177}, //1536 #CJK UNIFIED IDEOGRAPH + {0x8D94, 0x9D60}, //1537 #CJK UNIFIED IDEOGRAPH + {0x8D95, 0x9ED2}, //1538 #CJK UNIFIED IDEOGRAPH + {0x8D96, 0x7344}, //1539 #CJK UNIFIED IDEOGRAPH + {0x8D97, 0x6F09}, //1540 #CJK UNIFIED IDEOGRAPH + {0x8D98, 0x8170}, //1541 #CJK UNIFIED IDEOGRAPH + {0x8D99, 0x7511}, //1542 #CJK UNIFIED IDEOGRAPH + {0x8D9A, 0x5FFD}, //1543 #CJK UNIFIED IDEOGRAPH + {0x8D9B, 0x60DA}, //1544 #CJK UNIFIED IDEOGRAPH + {0x8D9C, 0x9AA8}, //1545 #CJK UNIFIED IDEOGRAPH + {0x8D9D, 0x72DB}, //1546 #CJK UNIFIED IDEOGRAPH + {0x8D9E, 0x8FBC}, //1547 #CJK UNIFIED IDEOGRAPH + {0x8D9F, 0x6B64}, //1548 #CJK UNIFIED IDEOGRAPH + {0x8DA0, 0x9803}, //1549 #CJK UNIFIED IDEOGRAPH + {0x8DA1, 0x4ECA}, //1550 #CJK UNIFIED IDEOGRAPH + {0x8DA2, 0x56F0}, //1551 #CJK UNIFIED IDEOGRAPH + {0x8DA3, 0x5764}, //1552 #CJK UNIFIED IDEOGRAPH + {0x8DA4, 0x58BE}, //1553 #CJK UNIFIED IDEOGRAPH + {0x8DA5, 0x5A5A}, //1554 #CJK UNIFIED IDEOGRAPH + {0x8DA6, 0x6068}, //1555 #CJK UNIFIED IDEOGRAPH + {0x8DA7, 0x61C7}, //1556 #CJK UNIFIED IDEOGRAPH + {0x8DA8, 0x660F}, //1557 #CJK UNIFIED IDEOGRAPH + {0x8DA9, 0x6606}, //1558 #CJK UNIFIED IDEOGRAPH + {0x8DAA, 0x6839}, //1559 #CJK UNIFIED IDEOGRAPH + {0x8DAB, 0x68B1}, //1560 #CJK UNIFIED IDEOGRAPH + {0x8DAC, 0x6DF7}, //1561 #CJK UNIFIED IDEOGRAPH + {0x8DAD, 0x75D5}, //1562 #CJK UNIFIED IDEOGRAPH + {0x8DAE, 0x7D3A}, //1563 #CJK UNIFIED IDEOGRAPH + {0x8DAF, 0x826E}, //1564 #CJK UNIFIED IDEOGRAPH + {0x8DB0, 0x9B42}, //1565 #CJK UNIFIED IDEOGRAPH + {0x8DB1, 0x4E9B}, //1566 #CJK UNIFIED IDEOGRAPH + {0x8DB2, 0x4F50}, //1567 #CJK UNIFIED IDEOGRAPH + {0x8DB3, 0x53C9}, //1568 #CJK UNIFIED IDEOGRAPH + {0x8DB4, 0x5506}, //1569 #CJK UNIFIED IDEOGRAPH + {0x8DB5, 0x5D6F}, //1570 #CJK UNIFIED IDEOGRAPH + {0x8DB6, 0x5DE6}, //1571 #CJK UNIFIED IDEOGRAPH + {0x8DB7, 0x5DEE}, //1572 #CJK UNIFIED IDEOGRAPH + {0x8DB8, 0x67FB}, //1573 #CJK UNIFIED IDEOGRAPH + {0x8DB9, 0x6C99}, //1574 #CJK UNIFIED IDEOGRAPH + {0x8DBA, 0x7473}, //1575 #CJK UNIFIED IDEOGRAPH + {0x8DBB, 0x7802}, //1576 #CJK UNIFIED IDEOGRAPH + {0x8DBC, 0x8A50}, //1577 #CJK UNIFIED IDEOGRAPH + {0x8DBD, 0x9396}, //1578 #CJK UNIFIED IDEOGRAPH + {0x8DBE, 0x88DF}, //1579 #CJK UNIFIED IDEOGRAPH + {0x8DBF, 0x5750}, //1580 #CJK UNIFIED IDEOGRAPH + {0x8DC0, 0x5EA7}, //1581 #CJK UNIFIED IDEOGRAPH + {0x8DC1, 0x632B}, //1582 #CJK UNIFIED IDEOGRAPH + {0x8DC2, 0x50B5}, //1583 #CJK UNIFIED IDEOGRAPH + {0x8DC3, 0x50AC}, //1584 #CJK UNIFIED IDEOGRAPH + {0x8DC4, 0x518D}, //1585 #CJK UNIFIED IDEOGRAPH + {0x8DC5, 0x6700}, //1586 #CJK UNIFIED IDEOGRAPH + {0x8DC6, 0x54C9}, //1587 #CJK UNIFIED IDEOGRAPH + {0x8DC7, 0x585E}, //1588 #CJK UNIFIED IDEOGRAPH + {0x8DC8, 0x59BB}, //1589 #CJK UNIFIED IDEOGRAPH + {0x8DC9, 0x5BB0}, //1590 #CJK UNIFIED IDEOGRAPH + {0x8DCA, 0x5F69}, //1591 #CJK UNIFIED IDEOGRAPH + {0x8DCB, 0x624D}, //1592 #CJK UNIFIED IDEOGRAPH + {0x8DCC, 0x63A1}, //1593 #CJK UNIFIED IDEOGRAPH + {0x8DCD, 0x683D}, //1594 #CJK UNIFIED IDEOGRAPH + {0x8DCE, 0x6B73}, //1595 #CJK UNIFIED IDEOGRAPH + {0x8DCF, 0x6E08}, //1596 #CJK UNIFIED IDEOGRAPH + {0x8DD0, 0x707D}, //1597 #CJK UNIFIED IDEOGRAPH + {0x8DD1, 0x91C7}, //1598 #CJK UNIFIED IDEOGRAPH + {0x8DD2, 0x7280}, //1599 #CJK UNIFIED IDEOGRAPH + {0x8DD3, 0x7815}, //1600 #CJK UNIFIED IDEOGRAPH + {0x8DD4, 0x7826}, //1601 #CJK UNIFIED IDEOGRAPH + {0x8DD5, 0x796D}, //1602 #CJK UNIFIED IDEOGRAPH + {0x8DD6, 0x658E}, //1603 #CJK UNIFIED IDEOGRAPH + {0x8DD7, 0x7D30}, //1604 #CJK UNIFIED IDEOGRAPH + {0x8DD8, 0x83DC}, //1605 #CJK UNIFIED IDEOGRAPH + {0x8DD9, 0x88C1}, //1606 #CJK UNIFIED IDEOGRAPH + {0x8DDA, 0x8F09}, //1607 #CJK UNIFIED IDEOGRAPH + {0x8DDB, 0x969B}, //1608 #CJK UNIFIED IDEOGRAPH + {0x8DDC, 0x5264}, //1609 #CJK UNIFIED IDEOGRAPH + {0x8DDD, 0x5728}, //1610 #CJK UNIFIED IDEOGRAPH + {0x8DDE, 0x6750}, //1611 #CJK UNIFIED IDEOGRAPH + {0x8DDF, 0x7F6A}, //1612 #CJK UNIFIED IDEOGRAPH + {0x8DE0, 0x8CA1}, //1613 #CJK UNIFIED IDEOGRAPH + {0x8DE1, 0x51B4}, //1614 #CJK UNIFIED IDEOGRAPH + {0x8DE2, 0x5742}, //1615 #CJK UNIFIED IDEOGRAPH + {0x8DE3, 0x962A}, //1616 #CJK UNIFIED IDEOGRAPH + {0x8DE4, 0x583A}, //1617 #CJK UNIFIED IDEOGRAPH + {0x8DE5, 0x698A}, //1618 #CJK UNIFIED IDEOGRAPH + {0x8DE6, 0x80B4}, //1619 #CJK UNIFIED IDEOGRAPH + {0x8DE7, 0x54B2}, //1620 #CJK UNIFIED IDEOGRAPH + {0x8DE8, 0x5D0E}, //1621 #CJK UNIFIED IDEOGRAPH + {0x8DE9, 0x57FC}, //1622 #CJK UNIFIED IDEOGRAPH + {0x8DEA, 0x7895}, //1623 #CJK UNIFIED IDEOGRAPH + {0x8DEB, 0x9DFA}, //1624 #CJK UNIFIED IDEOGRAPH + {0x8DEC, 0x4F5C}, //1625 #CJK UNIFIED IDEOGRAPH + {0x8DED, 0x524A}, //1626 #CJK UNIFIED IDEOGRAPH + {0x8DEE, 0x548B}, //1627 #CJK UNIFIED IDEOGRAPH + {0x8DEF, 0x643E}, //1628 #CJK UNIFIED IDEOGRAPH + {0x8DF0, 0x6628}, //1629 #CJK UNIFIED IDEOGRAPH + {0x8DF1, 0x6714}, //1630 #CJK UNIFIED IDEOGRAPH + {0x8DF2, 0x67F5}, //1631 #CJK UNIFIED IDEOGRAPH + {0x8DF3, 0x7A84}, //1632 #CJK UNIFIED IDEOGRAPH + {0x8DF4, 0x7B56}, //1633 #CJK UNIFIED IDEOGRAPH + {0x8DF5, 0x7D22}, //1634 #CJK UNIFIED IDEOGRAPH + {0x8DF6, 0x932F}, //1635 #CJK UNIFIED IDEOGRAPH + {0x8DF7, 0x685C}, //1636 #CJK UNIFIED IDEOGRAPH + {0x8DF8, 0x9BAD}, //1637 #CJK UNIFIED IDEOGRAPH + {0x8DF9, 0x7B39}, //1638 #CJK UNIFIED IDEOGRAPH + {0x8DFA, 0x5319}, //1639 #CJK UNIFIED IDEOGRAPH + {0x8DFB, 0x518A}, //1640 #CJK UNIFIED IDEOGRAPH + {0x8DFC, 0x5237}, //1641 #CJK UNIFIED IDEOGRAPH + {0x8E40, 0x5BDF}, //1642 #CJK UNIFIED IDEOGRAPH + {0x8E41, 0x62F6}, //1643 #CJK UNIFIED IDEOGRAPH + {0x8E42, 0x64AE}, //1644 #CJK UNIFIED IDEOGRAPH + {0x8E43, 0x64E6}, //1645 #CJK UNIFIED IDEOGRAPH + {0x8E44, 0x672D}, //1646 #CJK UNIFIED IDEOGRAPH + {0x8E45, 0x6BBA}, //1647 #CJK UNIFIED IDEOGRAPH + {0x8E46, 0x85A9}, //1648 #CJK UNIFIED IDEOGRAPH + {0x8E47, 0x96D1}, //1649 #CJK UNIFIED IDEOGRAPH + {0x8E48, 0x7690}, //1650 #CJK UNIFIED IDEOGRAPH + {0x8E49, 0x9BD6}, //1651 #CJK UNIFIED IDEOGRAPH + {0x8E4A, 0x634C}, //1652 #CJK UNIFIED IDEOGRAPH + {0x8E4B, 0x9306}, //1653 #CJK UNIFIED IDEOGRAPH + {0x8E4C, 0x9BAB}, //1654 #CJK UNIFIED IDEOGRAPH + {0x8E4D, 0x76BF}, //1655 #CJK UNIFIED IDEOGRAPH + {0x8E4E, 0x6652}, //1656 #CJK UNIFIED IDEOGRAPH + {0x8E4F, 0x4E09}, //1657 #CJK UNIFIED IDEOGRAPH + {0x8E50, 0x5098}, //1658 #CJK UNIFIED IDEOGRAPH + {0x8E51, 0x53C2}, //1659 #CJK UNIFIED IDEOGRAPH + {0x8E52, 0x5C71}, //1660 #CJK UNIFIED IDEOGRAPH + {0x8E53, 0x60E8}, //1661 #CJK UNIFIED IDEOGRAPH + {0x8E54, 0x6492}, //1662 #CJK UNIFIED IDEOGRAPH + {0x8E55, 0x6563}, //1663 #CJK UNIFIED IDEOGRAPH + {0x8E56, 0x685F}, //1664 #CJK UNIFIED IDEOGRAPH + {0x8E57, 0x71E6}, //1665 #CJK UNIFIED IDEOGRAPH + {0x8E58, 0x73CA}, //1666 #CJK UNIFIED IDEOGRAPH + {0x8E59, 0x7523}, //1667 #CJK UNIFIED IDEOGRAPH + {0x8E5A, 0x7B97}, //1668 #CJK UNIFIED IDEOGRAPH + {0x8E5B, 0x7E82}, //1669 #CJK UNIFIED IDEOGRAPH + {0x8E5C, 0x8695}, //1670 #CJK UNIFIED IDEOGRAPH + {0x8E5D, 0x8B83}, //1671 #CJK UNIFIED IDEOGRAPH + {0x8E5E, 0x8CDB}, //1672 #CJK UNIFIED IDEOGRAPH + {0x8E5F, 0x9178}, //1673 #CJK UNIFIED IDEOGRAPH + {0x8E60, 0x9910}, //1674 #CJK UNIFIED IDEOGRAPH + {0x8E61, 0x65AC}, //1675 #CJK UNIFIED IDEOGRAPH + {0x8E62, 0x66AB}, //1676 #CJK UNIFIED IDEOGRAPH + {0x8E63, 0x6B8B}, //1677 #CJK UNIFIED IDEOGRAPH + {0x8E64, 0x4ED5}, //1678 #CJK UNIFIED IDEOGRAPH + {0x8E65, 0x4ED4}, //1679 #CJK UNIFIED IDEOGRAPH + {0x8E66, 0x4F3A}, //1680 #CJK UNIFIED IDEOGRAPH + {0x8E67, 0x4F7F}, //1681 #CJK UNIFIED IDEOGRAPH + {0x8E68, 0x523A}, //1682 #CJK UNIFIED IDEOGRAPH + {0x8E69, 0x53F8}, //1683 #CJK UNIFIED IDEOGRAPH + {0x8E6A, 0x53F2}, //1684 #CJK UNIFIED IDEOGRAPH + {0x8E6B, 0x55E3}, //1685 #CJK UNIFIED IDEOGRAPH + {0x8E6C, 0x56DB}, //1686 #CJK UNIFIED IDEOGRAPH + {0x8E6D, 0x58EB}, //1687 #CJK UNIFIED IDEOGRAPH + {0x8E6E, 0x59CB}, //1688 #CJK UNIFIED IDEOGRAPH + {0x8E6F, 0x59C9}, //1689 #CJK UNIFIED IDEOGRAPH + {0x8E70, 0x59FF}, //1690 #CJK UNIFIED IDEOGRAPH + {0x8E71, 0x5B50}, //1691 #CJK UNIFIED IDEOGRAPH + {0x8E72, 0x5C4D}, //1692 #CJK UNIFIED IDEOGRAPH + {0x8E73, 0x5E02}, //1693 #CJK UNIFIED IDEOGRAPH + {0x8E74, 0x5E2B}, //1694 #CJK UNIFIED IDEOGRAPH + {0x8E75, 0x5FD7}, //1695 #CJK UNIFIED IDEOGRAPH + {0x8E76, 0x601D}, //1696 #CJK UNIFIED IDEOGRAPH + {0x8E77, 0x6307}, //1697 #CJK UNIFIED IDEOGRAPH + {0x8E78, 0x652F}, //1698 #CJK UNIFIED IDEOGRAPH + {0x8E79, 0x5B5C}, //1699 #CJK UNIFIED IDEOGRAPH + {0x8E7A, 0x65AF}, //1700 #CJK UNIFIED IDEOGRAPH + {0x8E7B, 0x65BD}, //1701 #CJK UNIFIED IDEOGRAPH + {0x8E7C, 0x65E8}, //1702 #CJK UNIFIED IDEOGRAPH + {0x8E7D, 0x679D}, //1703 #CJK UNIFIED IDEOGRAPH + {0x8E7E, 0x6B62}, //1704 #CJK UNIFIED IDEOGRAPH + {0x8E80, 0x6B7B}, //1705 #CJK UNIFIED IDEOGRAPH + {0x8E81, 0x6C0F}, //1706 #CJK UNIFIED IDEOGRAPH + {0x8E82, 0x7345}, //1707 #CJK UNIFIED IDEOGRAPH + {0x8E83, 0x7949}, //1708 #CJK UNIFIED IDEOGRAPH + {0x8E84, 0x79C1}, //1709 #CJK UNIFIED IDEOGRAPH + {0x8E85, 0x7CF8}, //1710 #CJK UNIFIED IDEOGRAPH + {0x8E86, 0x7D19}, //1711 #CJK UNIFIED IDEOGRAPH + {0x8E87, 0x7D2B}, //1712 #CJK UNIFIED IDEOGRAPH + {0x8E88, 0x80A2}, //1713 #CJK UNIFIED IDEOGRAPH + {0x8E89, 0x8102}, //1714 #CJK UNIFIED IDEOGRAPH + {0x8E8A, 0x81F3}, //1715 #CJK UNIFIED IDEOGRAPH + {0x8E8B, 0x8996}, //1716 #CJK UNIFIED IDEOGRAPH + {0x8E8C, 0x8A5E}, //1717 #CJK UNIFIED IDEOGRAPH + {0x8E8D, 0x8A69}, //1718 #CJK UNIFIED IDEOGRAPH + {0x8E8E, 0x8A66}, //1719 #CJK UNIFIED IDEOGRAPH + {0x8E8F, 0x8A8C}, //1720 #CJK UNIFIED IDEOGRAPH + {0x8E90, 0x8AEE}, //1721 #CJK UNIFIED IDEOGRAPH + {0x8E91, 0x8CC7}, //1722 #CJK UNIFIED IDEOGRAPH + {0x8E92, 0x8CDC}, //1723 #CJK UNIFIED IDEOGRAPH + {0x8E93, 0x96CC}, //1724 #CJK UNIFIED IDEOGRAPH + {0x8E94, 0x98FC}, //1725 #CJK UNIFIED IDEOGRAPH + {0x8E95, 0x6B6F}, //1726 #CJK UNIFIED IDEOGRAPH + {0x8E96, 0x4E8B}, //1727 #CJK UNIFIED IDEOGRAPH + {0x8E97, 0x4F3C}, //1728 #CJK UNIFIED IDEOGRAPH + {0x8E98, 0x4F8D}, //1729 #CJK UNIFIED IDEOGRAPH + {0x8E99, 0x5150}, //1730 #CJK UNIFIED IDEOGRAPH + {0x8E9A, 0x5B57}, //1731 #CJK UNIFIED IDEOGRAPH + {0x8E9B, 0x5BFA}, //1732 #CJK UNIFIED IDEOGRAPH + {0x8E9C, 0x6148}, //1733 #CJK UNIFIED IDEOGRAPH + {0x8E9D, 0x6301}, //1734 #CJK UNIFIED IDEOGRAPH + {0x8E9E, 0x6642}, //1735 #CJK UNIFIED IDEOGRAPH + {0x8E9F, 0x6B21}, //1736 #CJK UNIFIED IDEOGRAPH + {0x8EA0, 0x6ECB}, //1737 #CJK UNIFIED IDEOGRAPH + {0x8EA1, 0x6CBB}, //1738 #CJK UNIFIED IDEOGRAPH + {0x8EA2, 0x723E}, //1739 #CJK UNIFIED IDEOGRAPH + {0x8EA3, 0x74BD}, //1740 #CJK UNIFIED IDEOGRAPH + {0x8EA4, 0x75D4}, //1741 #CJK UNIFIED IDEOGRAPH + {0x8EA5, 0x78C1}, //1742 #CJK UNIFIED IDEOGRAPH + {0x8EA6, 0x793A}, //1743 #CJK UNIFIED IDEOGRAPH + {0x8EA7, 0x800C}, //1744 #CJK UNIFIED IDEOGRAPH + {0x8EA8, 0x8033}, //1745 #CJK UNIFIED IDEOGRAPH + {0x8EA9, 0x81EA}, //1746 #CJK UNIFIED IDEOGRAPH + {0x8EAA, 0x8494}, //1747 #CJK UNIFIED IDEOGRAPH + {0x8EAB, 0x8F9E}, //1748 #CJK UNIFIED IDEOGRAPH + {0x8EAC, 0x6C50}, //1749 #CJK UNIFIED IDEOGRAPH + {0x8EAD, 0x9E7F}, //1750 #CJK UNIFIED IDEOGRAPH + {0x8EAE, 0x5F0F}, //1751 #CJK UNIFIED IDEOGRAPH + {0x8EAF, 0x8B58}, //1752 #CJK UNIFIED IDEOGRAPH + {0x8EB0, 0x9D2B}, //1753 #CJK UNIFIED IDEOGRAPH + {0x8EB1, 0x7AFA}, //1754 #CJK UNIFIED IDEOGRAPH + {0x8EB2, 0x8EF8}, //1755 #CJK UNIFIED IDEOGRAPH + {0x8EB3, 0x5B8D}, //1756 #CJK UNIFIED IDEOGRAPH + {0x8EB4, 0x96EB}, //1757 #CJK UNIFIED IDEOGRAPH + {0x8EB5, 0x4E03}, //1758 #CJK UNIFIED IDEOGRAPH + {0x8EB6, 0x53F1}, //1759 #CJK UNIFIED IDEOGRAPH + {0x8EB7, 0x57F7}, //1760 #CJK UNIFIED IDEOGRAPH + {0x8EB8, 0x5931}, //1761 #CJK UNIFIED IDEOGRAPH + {0x8EB9, 0x5AC9}, //1762 #CJK UNIFIED IDEOGRAPH + {0x8EBA, 0x5BA4}, //1763 #CJK UNIFIED IDEOGRAPH + {0x8EBB, 0x6089}, //1764 #CJK UNIFIED IDEOGRAPH + {0x8EBC, 0x6E7F}, //1765 #CJK UNIFIED IDEOGRAPH + {0x8EBD, 0x6F06}, //1766 #CJK UNIFIED IDEOGRAPH + {0x8EBE, 0x75BE}, //1767 #CJK UNIFIED IDEOGRAPH + {0x8EBF, 0x8CEA}, //1768 #CJK UNIFIED IDEOGRAPH + {0x8EC0, 0x5B9F}, //1769 #CJK UNIFIED IDEOGRAPH + {0x8EC1, 0x8500}, //1770 #CJK UNIFIED IDEOGRAPH + {0x8EC2, 0x7BE0}, //1771 #CJK UNIFIED IDEOGRAPH + {0x8EC3, 0x5072}, //1772 #CJK UNIFIED IDEOGRAPH + {0x8EC4, 0x67F4}, //1773 #CJK UNIFIED IDEOGRAPH + {0x8EC5, 0x829D}, //1774 #CJK UNIFIED IDEOGRAPH + {0x8EC6, 0x5C61}, //1775 #CJK UNIFIED IDEOGRAPH + {0x8EC7, 0x854A}, //1776 #CJK UNIFIED IDEOGRAPH + {0x8EC8, 0x7E1E}, //1777 #CJK UNIFIED IDEOGRAPH + {0x8EC9, 0x820E}, //1778 #CJK UNIFIED IDEOGRAPH + {0x8ECA, 0x5199}, //1779 #CJK UNIFIED IDEOGRAPH + {0x8ECB, 0x5C04}, //1780 #CJK UNIFIED IDEOGRAPH + {0x8ECC, 0x6368}, //1781 #CJK UNIFIED IDEOGRAPH + {0x8ECD, 0x8D66}, //1782 #CJK UNIFIED IDEOGRAPH + {0x8ECE, 0x659C}, //1783 #CJK UNIFIED IDEOGRAPH + {0x8ECF, 0x716E}, //1784 #CJK UNIFIED IDEOGRAPH + {0x8ED0, 0x793E}, //1785 #CJK UNIFIED IDEOGRAPH + {0x8ED1, 0x7D17}, //1786 #CJK UNIFIED IDEOGRAPH + {0x8ED2, 0x8005}, //1787 #CJK UNIFIED IDEOGRAPH + {0x8ED3, 0x8B1D}, //1788 #CJK UNIFIED IDEOGRAPH + {0x8ED4, 0x8ECA}, //1789 #CJK UNIFIED IDEOGRAPH + {0x8ED5, 0x906E}, //1790 #CJK UNIFIED IDEOGRAPH + {0x8ED6, 0x86C7}, //1791 #CJK UNIFIED IDEOGRAPH + {0x8ED7, 0x90AA}, //1792 #CJK UNIFIED IDEOGRAPH + {0x8ED8, 0x501F}, //1793 #CJK UNIFIED IDEOGRAPH + {0x8ED9, 0x52FA}, //1794 #CJK UNIFIED IDEOGRAPH + {0x8EDA, 0x5C3A}, //1795 #CJK UNIFIED IDEOGRAPH + {0x8EDB, 0x6753}, //1796 #CJK UNIFIED IDEOGRAPH + {0x8EDC, 0x707C}, //1797 #CJK UNIFIED IDEOGRAPH + {0x8EDD, 0x7235}, //1798 #CJK UNIFIED IDEOGRAPH + {0x8EDE, 0x914C}, //1799 #CJK UNIFIED IDEOGRAPH + {0x8EDF, 0x91C8}, //1800 #CJK UNIFIED IDEOGRAPH + {0x8EE0, 0x932B}, //1801 #CJK UNIFIED IDEOGRAPH + {0x8EE1, 0x82E5}, //1802 #CJK UNIFIED IDEOGRAPH + {0x8EE2, 0x5BC2}, //1803 #CJK UNIFIED IDEOGRAPH + {0x8EE3, 0x5F31}, //1804 #CJK UNIFIED IDEOGRAPH + {0x8EE4, 0x60F9}, //1805 #CJK UNIFIED IDEOGRAPH + {0x8EE5, 0x4E3B}, //1806 #CJK UNIFIED IDEOGRAPH + {0x8EE6, 0x53D6}, //1807 #CJK UNIFIED IDEOGRAPH + {0x8EE7, 0x5B88}, //1808 #CJK UNIFIED IDEOGRAPH + {0x8EE8, 0x624B}, //1809 #CJK UNIFIED IDEOGRAPH + {0x8EE9, 0x6731}, //1810 #CJK UNIFIED IDEOGRAPH + {0x8EEA, 0x6B8A}, //1811 #CJK UNIFIED IDEOGRAPH + {0x8EEB, 0x72E9}, //1812 #CJK UNIFIED IDEOGRAPH + {0x8EEC, 0x73E0}, //1813 #CJK UNIFIED IDEOGRAPH + {0x8EED, 0x7A2E}, //1814 #CJK UNIFIED IDEOGRAPH + {0x8EEE, 0x816B}, //1815 #CJK UNIFIED IDEOGRAPH + {0x8EEF, 0x8DA3}, //1816 #CJK UNIFIED IDEOGRAPH + {0x8EF0, 0x9152}, //1817 #CJK UNIFIED IDEOGRAPH + {0x8EF1, 0x9996}, //1818 #CJK UNIFIED IDEOGRAPH + {0x8EF2, 0x5112}, //1819 #CJK UNIFIED IDEOGRAPH + {0x8EF3, 0x53D7}, //1820 #CJK UNIFIED IDEOGRAPH + {0x8EF4, 0x546A}, //1821 #CJK UNIFIED IDEOGRAPH + {0x8EF5, 0x5BFF}, //1822 #CJK UNIFIED IDEOGRAPH + {0x8EF6, 0x6388}, //1823 #CJK UNIFIED IDEOGRAPH + {0x8EF7, 0x6A39}, //1824 #CJK UNIFIED IDEOGRAPH + {0x8EF8, 0x7DAC}, //1825 #CJK UNIFIED IDEOGRAPH + {0x8EF9, 0x9700}, //1826 #CJK UNIFIED IDEOGRAPH + {0x8EFA, 0x56DA}, //1827 #CJK UNIFIED IDEOGRAPH + {0x8EFB, 0x53CE}, //1828 #CJK UNIFIED IDEOGRAPH + {0x8EFC, 0x5468}, //1829 #CJK UNIFIED IDEOGRAPH + {0x8F40, 0x5B97}, //1830 #CJK UNIFIED IDEOGRAPH + {0x8F41, 0x5C31}, //1831 #CJK UNIFIED IDEOGRAPH + {0x8F42, 0x5DDE}, //1832 #CJK UNIFIED IDEOGRAPH + {0x8F43, 0x4FEE}, //1833 #CJK UNIFIED IDEOGRAPH + {0x8F44, 0x6101}, //1834 #CJK UNIFIED IDEOGRAPH + {0x8F45, 0x62FE}, //1835 #CJK UNIFIED IDEOGRAPH + {0x8F46, 0x6D32}, //1836 #CJK UNIFIED IDEOGRAPH + {0x8F47, 0x79C0}, //1837 #CJK UNIFIED IDEOGRAPH + {0x8F48, 0x79CB}, //1838 #CJK UNIFIED IDEOGRAPH + {0x8F49, 0x7D42}, //1839 #CJK UNIFIED IDEOGRAPH + {0x8F4A, 0x7E4D}, //1840 #CJK UNIFIED IDEOGRAPH + {0x8F4B, 0x7FD2}, //1841 #CJK UNIFIED IDEOGRAPH + {0x8F4C, 0x81ED}, //1842 #CJK UNIFIED IDEOGRAPH + {0x8F4D, 0x821F}, //1843 #CJK UNIFIED IDEOGRAPH + {0x8F4E, 0x8490}, //1844 #CJK UNIFIED IDEOGRAPH + {0x8F4F, 0x8846}, //1845 #CJK UNIFIED IDEOGRAPH + {0x8F50, 0x8972}, //1846 #CJK UNIFIED IDEOGRAPH + {0x8F51, 0x8B90}, //1847 #CJK UNIFIED IDEOGRAPH + {0x8F52, 0x8E74}, //1848 #CJK UNIFIED IDEOGRAPH + {0x8F53, 0x8F2F}, //1849 #CJK UNIFIED IDEOGRAPH + {0x8F54, 0x9031}, //1850 #CJK UNIFIED IDEOGRAPH + {0x8F55, 0x914B}, //1851 #CJK UNIFIED IDEOGRAPH + {0x8F56, 0x916C}, //1852 #CJK UNIFIED IDEOGRAPH + {0x8F57, 0x96C6}, //1853 #CJK UNIFIED IDEOGRAPH + {0x8F58, 0x919C}, //1854 #CJK UNIFIED IDEOGRAPH + {0x8F59, 0x4EC0}, //1855 #CJK UNIFIED IDEOGRAPH + {0x8F5A, 0x4F4F}, //1856 #CJK UNIFIED IDEOGRAPH + {0x8F5B, 0x5145}, //1857 #CJK UNIFIED IDEOGRAPH + {0x8F5C, 0x5341}, //1858 #CJK UNIFIED IDEOGRAPH + {0x8F5D, 0x5F93}, //1859 #CJK UNIFIED IDEOGRAPH + {0x8F5E, 0x620E}, //1860 #CJK UNIFIED IDEOGRAPH + {0x8F5F, 0x67D4}, //1861 #CJK UNIFIED IDEOGRAPH + {0x8F60, 0x6C41}, //1862 #CJK UNIFIED IDEOGRAPH + {0x8F61, 0x6E0B}, //1863 #CJK UNIFIED IDEOGRAPH + {0x8F62, 0x7363}, //1864 #CJK UNIFIED IDEOGRAPH + {0x8F63, 0x7E26}, //1865 #CJK UNIFIED IDEOGRAPH + {0x8F64, 0x91CD}, //1866 #CJK UNIFIED IDEOGRAPH + {0x8F65, 0x9283}, //1867 #CJK UNIFIED IDEOGRAPH + {0x8F66, 0x53D4}, //1868 #CJK UNIFIED IDEOGRAPH + {0x8F67, 0x5919}, //1869 #CJK UNIFIED IDEOGRAPH + {0x8F68, 0x5BBF}, //1870 #CJK UNIFIED IDEOGRAPH + {0x8F69, 0x6DD1}, //1871 #CJK UNIFIED IDEOGRAPH + {0x8F6A, 0x795D}, //1872 #CJK UNIFIED IDEOGRAPH + {0x8F6B, 0x7E2E}, //1873 #CJK UNIFIED IDEOGRAPH + {0x8F6C, 0x7C9B}, //1874 #CJK UNIFIED IDEOGRAPH + {0x8F6D, 0x587E}, //1875 #CJK UNIFIED IDEOGRAPH + {0x8F6E, 0x719F}, //1876 #CJK UNIFIED IDEOGRAPH + {0x8F6F, 0x51FA}, //1877 #CJK UNIFIED IDEOGRAPH + {0x8F70, 0x8853}, //1878 #CJK UNIFIED IDEOGRAPH + {0x8F71, 0x8FF0}, //1879 #CJK UNIFIED IDEOGRAPH + {0x8F72, 0x4FCA}, //1880 #CJK UNIFIED IDEOGRAPH + {0x8F73, 0x5CFB}, //1881 #CJK UNIFIED IDEOGRAPH + {0x8F74, 0x6625}, //1882 #CJK UNIFIED IDEOGRAPH + {0x8F75, 0x77AC}, //1883 #CJK UNIFIED IDEOGRAPH + {0x8F76, 0x7AE3}, //1884 #CJK UNIFIED IDEOGRAPH + {0x8F77, 0x821C}, //1885 #CJK UNIFIED IDEOGRAPH + {0x8F78, 0x99FF}, //1886 #CJK UNIFIED IDEOGRAPH + {0x8F79, 0x51C6}, //1887 #CJK UNIFIED IDEOGRAPH + {0x8F7A, 0x5FAA}, //1888 #CJK UNIFIED IDEOGRAPH + {0x8F7B, 0x65EC}, //1889 #CJK UNIFIED IDEOGRAPH + {0x8F7C, 0x696F}, //1890 #CJK UNIFIED IDEOGRAPH + {0x8F7D, 0x6B89}, //1891 #CJK UNIFIED IDEOGRAPH + {0x8F7E, 0x6DF3}, //1892 #CJK UNIFIED IDEOGRAPH + {0x8F80, 0x6E96}, //1893 #CJK UNIFIED IDEOGRAPH + {0x8F81, 0x6F64}, //1894 #CJK UNIFIED IDEOGRAPH + {0x8F82, 0x76FE}, //1895 #CJK UNIFIED IDEOGRAPH + {0x8F83, 0x7D14}, //1896 #CJK UNIFIED IDEOGRAPH + {0x8F84, 0x5DE1}, //1897 #CJK UNIFIED IDEOGRAPH + {0x8F85, 0x9075}, //1898 #CJK UNIFIED IDEOGRAPH + {0x8F86, 0x9187}, //1899 #CJK UNIFIED IDEOGRAPH + {0x8F87, 0x9806}, //1900 #CJK UNIFIED IDEOGRAPH + {0x8F88, 0x51E6}, //1901 #CJK UNIFIED IDEOGRAPH + {0x8F89, 0x521D}, //1902 #CJK UNIFIED IDEOGRAPH + {0x8F8A, 0x6240}, //1903 #CJK UNIFIED IDEOGRAPH + {0x8F8B, 0x6691}, //1904 #CJK UNIFIED IDEOGRAPH + {0x8F8C, 0x66D9}, //1905 #CJK UNIFIED IDEOGRAPH + {0x8F8D, 0x6E1A}, //1906 #CJK UNIFIED IDEOGRAPH + {0x8F8E, 0x5EB6}, //1907 #CJK UNIFIED IDEOGRAPH + {0x8F8F, 0x7DD2}, //1908 #CJK UNIFIED IDEOGRAPH + {0x8F90, 0x7F72}, //1909 #CJK UNIFIED IDEOGRAPH + {0x8F91, 0x66F8}, //1910 #CJK UNIFIED IDEOGRAPH + {0x8F92, 0x85AF}, //1911 #CJK UNIFIED IDEOGRAPH + {0x8F93, 0x85F7}, //1912 #CJK UNIFIED IDEOGRAPH + {0x8F94, 0x8AF8}, //1913 #CJK UNIFIED IDEOGRAPH + {0x8F95, 0x52A9}, //1914 #CJK UNIFIED IDEOGRAPH + {0x8F96, 0x53D9}, //1915 #CJK UNIFIED IDEOGRAPH + {0x8F97, 0x5973}, //1916 #CJK UNIFIED IDEOGRAPH + {0x8F98, 0x5E8F}, //1917 #CJK UNIFIED IDEOGRAPH + {0x8F99, 0x5F90}, //1918 #CJK UNIFIED IDEOGRAPH + {0x8F9A, 0x6055}, //1919 #CJK UNIFIED IDEOGRAPH + {0x8F9B, 0x92E4}, //1920 #CJK UNIFIED IDEOGRAPH + {0x8F9C, 0x9664}, //1921 #CJK UNIFIED IDEOGRAPH + {0x8F9D, 0x50B7}, //1922 #CJK UNIFIED IDEOGRAPH + {0x8F9E, 0x511F}, //1923 #CJK UNIFIED IDEOGRAPH + {0x8F9F, 0x52DD}, //1924 #CJK UNIFIED IDEOGRAPH + {0x8FA0, 0x5320}, //1925 #CJK UNIFIED IDEOGRAPH + {0x8FA1, 0x5347}, //1926 #CJK UNIFIED IDEOGRAPH + {0x8FA2, 0x53EC}, //1927 #CJK UNIFIED IDEOGRAPH + {0x8FA3, 0x54E8}, //1928 #CJK UNIFIED IDEOGRAPH + {0x8FA4, 0x5546}, //1929 #CJK UNIFIED IDEOGRAPH + {0x8FA5, 0x5531}, //1930 #CJK UNIFIED IDEOGRAPH + {0x8FA6, 0x5617}, //1931 #CJK UNIFIED IDEOGRAPH + {0x8FA7, 0x5968}, //1932 #CJK UNIFIED IDEOGRAPH + {0x8FA8, 0x59BE}, //1933 #CJK UNIFIED IDEOGRAPH + {0x8FA9, 0x5A3C}, //1934 #CJK UNIFIED IDEOGRAPH + {0x8FAA, 0x5BB5}, //1935 #CJK UNIFIED IDEOGRAPH + {0x8FAB, 0x5C06}, //1936 #CJK UNIFIED IDEOGRAPH + {0x8FAC, 0x5C0F}, //1937 #CJK UNIFIED IDEOGRAPH + {0x8FAD, 0x5C11}, //1938 #CJK UNIFIED IDEOGRAPH + {0x8FAE, 0x5C1A}, //1939 #CJK UNIFIED IDEOGRAPH + {0x8FAF, 0x5E84}, //1940 #CJK UNIFIED IDEOGRAPH + {0x8FB0, 0x5E8A}, //1941 #CJK UNIFIED IDEOGRAPH + {0x8FB1, 0x5EE0}, //1942 #CJK UNIFIED IDEOGRAPH + {0x8FB2, 0x5F70}, //1943 #CJK UNIFIED IDEOGRAPH + {0x8FB3, 0x627F}, //1944 #CJK UNIFIED IDEOGRAPH + {0x8FB4, 0x6284}, //1945 #CJK UNIFIED IDEOGRAPH + {0x8FB5, 0x62DB}, //1946 #CJK UNIFIED IDEOGRAPH + {0x8FB6, 0x638C}, //1947 #CJK UNIFIED IDEOGRAPH + {0x8FB7, 0x6377}, //1948 #CJK UNIFIED IDEOGRAPH + {0x8FB8, 0x6607}, //1949 #CJK UNIFIED IDEOGRAPH + {0x8FB9, 0x660C}, //1950 #CJK UNIFIED IDEOGRAPH + {0x8FBA, 0x662D}, //1951 #CJK UNIFIED IDEOGRAPH + {0x8FBB, 0x6676}, //1952 #CJK UNIFIED IDEOGRAPH + {0x8FBC, 0x677E}, //1953 #CJK UNIFIED IDEOGRAPH + {0x8FBD, 0x68A2}, //1954 #CJK UNIFIED IDEOGRAPH + {0x8FBE, 0x6A1F}, //1955 #CJK UNIFIED IDEOGRAPH + {0x8FBF, 0x6A35}, //1956 #CJK UNIFIED IDEOGRAPH + {0x8FC0, 0x6CBC}, //1957 #CJK UNIFIED IDEOGRAPH + {0x8FC1, 0x6D88}, //1958 #CJK UNIFIED IDEOGRAPH + {0x8FC2, 0x6E09}, //1959 #CJK UNIFIED IDEOGRAPH + {0x8FC3, 0x6E58}, //1960 #CJK UNIFIED IDEOGRAPH + {0x8FC4, 0x713C}, //1961 #CJK UNIFIED IDEOGRAPH + {0x8FC5, 0x7126}, //1962 #CJK UNIFIED IDEOGRAPH + {0x8FC6, 0x7167}, //1963 #CJK UNIFIED IDEOGRAPH + {0x8FC7, 0x75C7}, //1964 #CJK UNIFIED IDEOGRAPH + {0x8FC8, 0x7701}, //1965 #CJK UNIFIED IDEOGRAPH + {0x8FC9, 0x785D}, //1966 #CJK UNIFIED IDEOGRAPH + {0x8FCA, 0x7901}, //1967 #CJK UNIFIED IDEOGRAPH + {0x8FCB, 0x7965}, //1968 #CJK UNIFIED IDEOGRAPH + {0x8FCC, 0x79F0}, //1969 #CJK UNIFIED IDEOGRAPH + {0x8FCD, 0x7AE0}, //1970 #CJK UNIFIED IDEOGRAPH + {0x8FCE, 0x7B11}, //1971 #CJK UNIFIED IDEOGRAPH + {0x8FCF, 0x7CA7}, //1972 #CJK UNIFIED IDEOGRAPH + {0x8FD0, 0x7D39}, //1973 #CJK UNIFIED IDEOGRAPH + {0x8FD1, 0x8096}, //1974 #CJK UNIFIED IDEOGRAPH + {0x8FD2, 0x83D6}, //1975 #CJK UNIFIED IDEOGRAPH + {0x8FD3, 0x848B}, //1976 #CJK UNIFIED IDEOGRAPH + {0x8FD4, 0x8549}, //1977 #CJK UNIFIED IDEOGRAPH + {0x8FD5, 0x885D}, //1978 #CJK UNIFIED IDEOGRAPH + {0x8FD6, 0x88F3}, //1979 #CJK UNIFIED IDEOGRAPH + {0x8FD7, 0x8A1F}, //1980 #CJK UNIFIED IDEOGRAPH + {0x8FD8, 0x8A3C}, //1981 #CJK UNIFIED IDEOGRAPH + {0x8FD9, 0x8A54}, //1982 #CJK UNIFIED IDEOGRAPH + {0x8FDA, 0x8A73}, //1983 #CJK UNIFIED IDEOGRAPH + {0x8FDB, 0x8C61}, //1984 #CJK UNIFIED IDEOGRAPH + {0x8FDC, 0x8CDE}, //1985 #CJK UNIFIED IDEOGRAPH + {0x8FDD, 0x91A4}, //1986 #CJK UNIFIED IDEOGRAPH + {0x8FDE, 0x9266}, //1987 #CJK UNIFIED IDEOGRAPH + {0x8FDF, 0x937E}, //1988 #CJK UNIFIED IDEOGRAPH + {0x8FE0, 0x9418}, //1989 #CJK UNIFIED IDEOGRAPH + {0x8FE1, 0x969C}, //1990 #CJK UNIFIED IDEOGRAPH + {0x8FE2, 0x9798}, //1991 #CJK UNIFIED IDEOGRAPH + {0x8FE3, 0x4E0A}, //1992 #CJK UNIFIED IDEOGRAPH + {0x8FE4, 0x4E08}, //1993 #CJK UNIFIED IDEOGRAPH + {0x8FE5, 0x4E1E}, //1994 #CJK UNIFIED IDEOGRAPH + {0x8FE6, 0x4E57}, //1995 #CJK UNIFIED IDEOGRAPH + {0x8FE7, 0x5197}, //1996 #CJK UNIFIED IDEOGRAPH + {0x8FE8, 0x5270}, //1997 #CJK UNIFIED IDEOGRAPH + {0x8FE9, 0x57CE}, //1998 #CJK UNIFIED IDEOGRAPH + {0x8FEA, 0x5834}, //1999 #CJK UNIFIED IDEOGRAPH + {0x8FEB, 0x58CC}, //2000 #CJK UNIFIED IDEOGRAPH + {0x8FEC, 0x5B22}, //2001 #CJK UNIFIED IDEOGRAPH + {0x8FED, 0x5E38}, //2002 #CJK UNIFIED IDEOGRAPH + {0x8FEE, 0x60C5}, //2003 #CJK UNIFIED IDEOGRAPH + {0x8FEF, 0x64FE}, //2004 #CJK UNIFIED IDEOGRAPH + {0x8FF0, 0x6761}, //2005 #CJK UNIFIED IDEOGRAPH + {0x8FF1, 0x6756}, //2006 #CJK UNIFIED IDEOGRAPH + {0x8FF2, 0x6D44}, //2007 #CJK UNIFIED IDEOGRAPH + {0x8FF3, 0x72B6}, //2008 #CJK UNIFIED IDEOGRAPH + {0x8FF4, 0x7573}, //2009 #CJK UNIFIED IDEOGRAPH + {0x8FF5, 0x7A63}, //2010 #CJK UNIFIED IDEOGRAPH + {0x8FF6, 0x84B8}, //2011 #CJK UNIFIED IDEOGRAPH + {0x8FF7, 0x8B72}, //2012 #CJK UNIFIED IDEOGRAPH + {0x8FF8, 0x91B8}, //2013 #CJK UNIFIED IDEOGRAPH + {0x8FF9, 0x9320}, //2014 #CJK UNIFIED IDEOGRAPH + {0x8FFA, 0x5631}, //2015 #CJK UNIFIED IDEOGRAPH + {0x8FFB, 0x57F4}, //2016 #CJK UNIFIED IDEOGRAPH + {0x8FFC, 0x98FE}, //2017 #CJK UNIFIED IDEOGRAPH + {0x9040, 0x62ED}, //2018 #CJK UNIFIED IDEOGRAPH + {0x9041, 0x690D}, //2019 #CJK UNIFIED IDEOGRAPH + {0x9042, 0x6B96}, //2020 #CJK UNIFIED IDEOGRAPH + {0x9043, 0x71ED}, //2021 #CJK UNIFIED IDEOGRAPH + {0x9044, 0x7E54}, //2022 #CJK UNIFIED IDEOGRAPH + {0x9045, 0x8077}, //2023 #CJK UNIFIED IDEOGRAPH + {0x9046, 0x8272}, //2024 #CJK UNIFIED IDEOGRAPH + {0x9047, 0x89E6}, //2025 #CJK UNIFIED IDEOGRAPH + {0x9048, 0x98DF}, //2026 #CJK UNIFIED IDEOGRAPH + {0x9049, 0x8755}, //2027 #CJK UNIFIED IDEOGRAPH + {0x904A, 0x8FB1}, //2028 #CJK UNIFIED IDEOGRAPH + {0x904B, 0x5C3B}, //2029 #CJK UNIFIED IDEOGRAPH + {0x904C, 0x4F38}, //2030 #CJK UNIFIED IDEOGRAPH + {0x904D, 0x4FE1}, //2031 #CJK UNIFIED IDEOGRAPH + {0x904E, 0x4FB5}, //2032 #CJK UNIFIED IDEOGRAPH + {0x904F, 0x5507}, //2033 #CJK UNIFIED IDEOGRAPH + {0x9050, 0x5A20}, //2034 #CJK UNIFIED IDEOGRAPH + {0x9051, 0x5BDD}, //2035 #CJK UNIFIED IDEOGRAPH + {0x9052, 0x5BE9}, //2036 #CJK UNIFIED IDEOGRAPH + {0x9053, 0x5FC3}, //2037 #CJK UNIFIED IDEOGRAPH + {0x9054, 0x614E}, //2038 #CJK UNIFIED IDEOGRAPH + {0x9055, 0x632F}, //2039 #CJK UNIFIED IDEOGRAPH + {0x9056, 0x65B0}, //2040 #CJK UNIFIED IDEOGRAPH + {0x9057, 0x664B}, //2041 #CJK UNIFIED IDEOGRAPH + {0x9058, 0x68EE}, //2042 #CJK UNIFIED IDEOGRAPH + {0x9059, 0x699B}, //2043 #CJK UNIFIED IDEOGRAPH + {0x905A, 0x6D78}, //2044 #CJK UNIFIED IDEOGRAPH + {0x905B, 0x6DF1}, //2045 #CJK UNIFIED IDEOGRAPH + {0x905C, 0x7533}, //2046 #CJK UNIFIED IDEOGRAPH + {0x905D, 0x75B9}, //2047 #CJK UNIFIED IDEOGRAPH + {0x905E, 0x771F}, //2048 #CJK UNIFIED IDEOGRAPH + {0x905F, 0x795E}, //2049 #CJK UNIFIED IDEOGRAPH + {0x9060, 0x79E6}, //2050 #CJK UNIFIED IDEOGRAPH + {0x9061, 0x7D33}, //2051 #CJK UNIFIED IDEOGRAPH + {0x9062, 0x81E3}, //2052 #CJK UNIFIED IDEOGRAPH + {0x9063, 0x82AF}, //2053 #CJK UNIFIED IDEOGRAPH + {0x9064, 0x85AA}, //2054 #CJK UNIFIED IDEOGRAPH + {0x9065, 0x89AA}, //2055 #CJK UNIFIED IDEOGRAPH + {0x9066, 0x8A3A}, //2056 #CJK UNIFIED IDEOGRAPH + {0x9067, 0x8EAB}, //2057 #CJK UNIFIED IDEOGRAPH + {0x9068, 0x8F9B}, //2058 #CJK UNIFIED IDEOGRAPH + {0x9069, 0x9032}, //2059 #CJK UNIFIED IDEOGRAPH + {0x906A, 0x91DD}, //2060 #CJK UNIFIED IDEOGRAPH + {0x906B, 0x9707}, //2061 #CJK UNIFIED IDEOGRAPH + {0x906C, 0x4EBA}, //2062 #CJK UNIFIED IDEOGRAPH + {0x906D, 0x4EC1}, //2063 #CJK UNIFIED IDEOGRAPH + {0x906E, 0x5203}, //2064 #CJK UNIFIED IDEOGRAPH + {0x906F, 0x5875}, //2065 #CJK UNIFIED IDEOGRAPH + {0x9070, 0x58EC}, //2066 #CJK UNIFIED IDEOGRAPH + {0x9071, 0x5C0B}, //2067 #CJK UNIFIED IDEOGRAPH + {0x9072, 0x751A}, //2068 #CJK UNIFIED IDEOGRAPH + {0x9073, 0x5C3D}, //2069 #CJK UNIFIED IDEOGRAPH + {0x9074, 0x814E}, //2070 #CJK UNIFIED IDEOGRAPH + {0x9075, 0x8A0A}, //2071 #CJK UNIFIED IDEOGRAPH + {0x9076, 0x8FC5}, //2072 #CJK UNIFIED IDEOGRAPH + {0x9077, 0x9663}, //2073 #CJK UNIFIED IDEOGRAPH + {0x9078, 0x976D}, //2074 #CJK UNIFIED IDEOGRAPH + {0x9079, 0x7B25}, //2075 #CJK UNIFIED IDEOGRAPH + {0x907A, 0x8ACF}, //2076 #CJK UNIFIED IDEOGRAPH + {0x907B, 0x9808}, //2077 #CJK UNIFIED IDEOGRAPH + {0x907C, 0x9162}, //2078 #CJK UNIFIED IDEOGRAPH + {0x907D, 0x56F3}, //2079 #CJK UNIFIED IDEOGRAPH + {0x907E, 0x53A8}, //2080 #CJK UNIFIED IDEOGRAPH + {0x9080, 0x9017}, //2081 #CJK UNIFIED IDEOGRAPH + {0x9081, 0x5439}, //2082 #CJK UNIFIED IDEOGRAPH + {0x9082, 0x5782}, //2083 #CJK UNIFIED IDEOGRAPH + {0x9083, 0x5E25}, //2084 #CJK UNIFIED IDEOGRAPH + {0x9084, 0x63A8}, //2085 #CJK UNIFIED IDEOGRAPH + {0x9085, 0x6C34}, //2086 #CJK UNIFIED IDEOGRAPH + {0x9086, 0x708A}, //2087 #CJK UNIFIED IDEOGRAPH + {0x9087, 0x7761}, //2088 #CJK UNIFIED IDEOGRAPH + {0x9088, 0x7C8B}, //2089 #CJK UNIFIED IDEOGRAPH + {0x9089, 0x7FE0}, //2090 #CJK UNIFIED IDEOGRAPH + {0x908A, 0x8870}, //2091 #CJK UNIFIED IDEOGRAPH + {0x908B, 0x9042}, //2092 #CJK UNIFIED IDEOGRAPH + {0x908C, 0x9154}, //2093 #CJK UNIFIED IDEOGRAPH + {0x908D, 0x9310}, //2094 #CJK UNIFIED IDEOGRAPH + {0x908E, 0x9318}, //2095 #CJK UNIFIED IDEOGRAPH + {0x908F, 0x968F}, //2096 #CJK UNIFIED IDEOGRAPH + {0x9090, 0x745E}, //2097 #CJK UNIFIED IDEOGRAPH + {0x9091, 0x9AC4}, //2098 #CJK UNIFIED IDEOGRAPH + {0x9092, 0x5D07}, //2099 #CJK UNIFIED IDEOGRAPH + {0x9093, 0x5D69}, //2100 #CJK UNIFIED IDEOGRAPH + {0x9094, 0x6570}, //2101 #CJK UNIFIED IDEOGRAPH + {0x9095, 0x67A2}, //2102 #CJK UNIFIED IDEOGRAPH + {0x9096, 0x8DA8}, //2103 #CJK UNIFIED IDEOGRAPH + {0x9097, 0x96DB}, //2104 #CJK UNIFIED IDEOGRAPH + {0x9098, 0x636E}, //2105 #CJK UNIFIED IDEOGRAPH + {0x9099, 0x6749}, //2106 #CJK UNIFIED IDEOGRAPH + {0x909A, 0x6919}, //2107 #CJK UNIFIED IDEOGRAPH + {0x909B, 0x83C5}, //2108 #CJK UNIFIED IDEOGRAPH + {0x909C, 0x9817}, //2109 #CJK UNIFIED IDEOGRAPH + {0x909D, 0x96C0}, //2110 #CJK UNIFIED IDEOGRAPH + {0x909E, 0x88FE}, //2111 #CJK UNIFIED IDEOGRAPH + {0x909F, 0x6F84}, //2112 #CJK UNIFIED IDEOGRAPH + {0x90A0, 0x647A}, //2113 #CJK UNIFIED IDEOGRAPH + {0x90A1, 0x5BF8}, //2114 #CJK UNIFIED IDEOGRAPH + {0x90A2, 0x4E16}, //2115 #CJK UNIFIED IDEOGRAPH + {0x90A3, 0x702C}, //2116 #CJK UNIFIED IDEOGRAPH + {0x90A4, 0x755D}, //2117 #CJK UNIFIED IDEOGRAPH + {0x90A5, 0x662F}, //2118 #CJK UNIFIED IDEOGRAPH + {0x90A6, 0x51C4}, //2119 #CJK UNIFIED IDEOGRAPH + {0x90A7, 0x5236}, //2120 #CJK UNIFIED IDEOGRAPH + {0x90A8, 0x52E2}, //2121 #CJK UNIFIED IDEOGRAPH + {0x90A9, 0x59D3}, //2122 #CJK UNIFIED IDEOGRAPH + {0x90AA, 0x5F81}, //2123 #CJK UNIFIED IDEOGRAPH + {0x90AB, 0x6027}, //2124 #CJK UNIFIED IDEOGRAPH + {0x90AC, 0x6210}, //2125 #CJK UNIFIED IDEOGRAPH + {0x90AD, 0x653F}, //2126 #CJK UNIFIED IDEOGRAPH + {0x90AE, 0x6574}, //2127 #CJK UNIFIED IDEOGRAPH + {0x90AF, 0x661F}, //2128 #CJK UNIFIED IDEOGRAPH + {0x90B0, 0x6674}, //2129 #CJK UNIFIED IDEOGRAPH + {0x90B1, 0x68F2}, //2130 #CJK UNIFIED IDEOGRAPH + {0x90B2, 0x6816}, //2131 #CJK UNIFIED IDEOGRAPH + {0x90B3, 0x6B63}, //2132 #CJK UNIFIED IDEOGRAPH + {0x90B4, 0x6E05}, //2133 #CJK UNIFIED IDEOGRAPH + {0x90B5, 0x7272}, //2134 #CJK UNIFIED IDEOGRAPH + {0x90B6, 0x751F}, //2135 #CJK UNIFIED IDEOGRAPH + {0x90B7, 0x76DB}, //2136 #CJK UNIFIED IDEOGRAPH + {0x90B8, 0x7CBE}, //2137 #CJK UNIFIED IDEOGRAPH + {0x90B9, 0x8056}, //2138 #CJK UNIFIED IDEOGRAPH + {0x90BA, 0x58F0}, //2139 #CJK UNIFIED IDEOGRAPH + {0x90BB, 0x88FD}, //2140 #CJK UNIFIED IDEOGRAPH + {0x90BC, 0x897F}, //2141 #CJK UNIFIED IDEOGRAPH + {0x90BD, 0x8AA0}, //2142 #CJK UNIFIED IDEOGRAPH + {0x90BE, 0x8A93}, //2143 #CJK UNIFIED IDEOGRAPH + {0x90BF, 0x8ACB}, //2144 #CJK UNIFIED IDEOGRAPH + {0x90C0, 0x901D}, //2145 #CJK UNIFIED IDEOGRAPH + {0x90C1, 0x9192}, //2146 #CJK UNIFIED IDEOGRAPH + {0x90C2, 0x9752}, //2147 #CJK UNIFIED IDEOGRAPH + {0x90C3, 0x9759}, //2148 #CJK UNIFIED IDEOGRAPH + {0x90C4, 0x6589}, //2149 #CJK UNIFIED IDEOGRAPH + {0x90C5, 0x7A0E}, //2150 #CJK UNIFIED IDEOGRAPH + {0x90C6, 0x8106}, //2151 #CJK UNIFIED IDEOGRAPH + {0x90C7, 0x96BB}, //2152 #CJK UNIFIED IDEOGRAPH + {0x90C8, 0x5E2D}, //2153 #CJK UNIFIED IDEOGRAPH + {0x90C9, 0x60DC}, //2154 #CJK UNIFIED IDEOGRAPH + {0x90CA, 0x621A}, //2155 #CJK UNIFIED IDEOGRAPH + {0x90CB, 0x65A5}, //2156 #CJK UNIFIED IDEOGRAPH + {0x90CC, 0x6614}, //2157 #CJK UNIFIED IDEOGRAPH + {0x90CD, 0x6790}, //2158 #CJK UNIFIED IDEOGRAPH + {0x90CE, 0x77F3}, //2159 #CJK UNIFIED IDEOGRAPH + {0x90CF, 0x7A4D}, //2160 #CJK UNIFIED IDEOGRAPH + {0x90D0, 0x7C4D}, //2161 #CJK UNIFIED IDEOGRAPH + {0x90D1, 0x7E3E}, //2162 #CJK UNIFIED IDEOGRAPH + {0x90D2, 0x810A}, //2163 #CJK UNIFIED IDEOGRAPH + {0x90D3, 0x8CAC}, //2164 #CJK UNIFIED IDEOGRAPH + {0x90D4, 0x8D64}, //2165 #CJK UNIFIED IDEOGRAPH + {0x90D5, 0x8DE1}, //2166 #CJK UNIFIED IDEOGRAPH + {0x90D6, 0x8E5F}, //2167 #CJK UNIFIED IDEOGRAPH + {0x90D7, 0x78A9}, //2168 #CJK UNIFIED IDEOGRAPH + {0x90D8, 0x5207}, //2169 #CJK UNIFIED IDEOGRAPH + {0x90D9, 0x62D9}, //2170 #CJK UNIFIED IDEOGRAPH + {0x90DA, 0x63A5}, //2171 #CJK UNIFIED IDEOGRAPH + {0x90DB, 0x6442}, //2172 #CJK UNIFIED IDEOGRAPH + {0x90DC, 0x6298}, //2173 #CJK UNIFIED IDEOGRAPH + {0x90DD, 0x8A2D}, //2174 #CJK UNIFIED IDEOGRAPH + {0x90DE, 0x7A83}, //2175 #CJK UNIFIED IDEOGRAPH + {0x90DF, 0x7BC0}, //2176 #CJK UNIFIED IDEOGRAPH + {0x90E0, 0x8AAC}, //2177 #CJK UNIFIED IDEOGRAPH + {0x90E1, 0x96EA}, //2178 #CJK UNIFIED IDEOGRAPH + {0x90E2, 0x7D76}, //2179 #CJK UNIFIED IDEOGRAPH + {0x90E3, 0x820C}, //2180 #CJK UNIFIED IDEOGRAPH + {0x90E4, 0x8749}, //2181 #CJK UNIFIED IDEOGRAPH + {0x90E5, 0x4ED9}, //2182 #CJK UNIFIED IDEOGRAPH + {0x90E6, 0x5148}, //2183 #CJK UNIFIED IDEOGRAPH + {0x90E7, 0x5343}, //2184 #CJK UNIFIED IDEOGRAPH + {0x90E8, 0x5360}, //2185 #CJK UNIFIED IDEOGRAPH + {0x90E9, 0x5BA3}, //2186 #CJK UNIFIED IDEOGRAPH + {0x90EA, 0x5C02}, //2187 #CJK UNIFIED IDEOGRAPH + {0x90EB, 0x5C16}, //2188 #CJK UNIFIED IDEOGRAPH + {0x90EC, 0x5DDD}, //2189 #CJK UNIFIED IDEOGRAPH + {0x90ED, 0x6226}, //2190 #CJK UNIFIED IDEOGRAPH + {0x90EE, 0x6247}, //2191 #CJK UNIFIED IDEOGRAPH + {0x90EF, 0x64B0}, //2192 #CJK UNIFIED IDEOGRAPH + {0x90F0, 0x6813}, //2193 #CJK UNIFIED IDEOGRAPH + {0x90F1, 0x6834}, //2194 #CJK UNIFIED IDEOGRAPH + {0x90F2, 0x6CC9}, //2195 #CJK UNIFIED IDEOGRAPH + {0x90F3, 0x6D45}, //2196 #CJK UNIFIED IDEOGRAPH + {0x90F4, 0x6D17}, //2197 #CJK UNIFIED IDEOGRAPH + {0x90F5, 0x67D3}, //2198 #CJK UNIFIED IDEOGRAPH + {0x90F6, 0x6F5C}, //2199 #CJK UNIFIED IDEOGRAPH + {0x90F7, 0x714E}, //2200 #CJK UNIFIED IDEOGRAPH + {0x90F8, 0x717D}, //2201 #CJK UNIFIED IDEOGRAPH + {0x90F9, 0x65CB}, //2202 #CJK UNIFIED IDEOGRAPH + {0x90FA, 0x7A7F}, //2203 #CJK UNIFIED IDEOGRAPH + {0x90FB, 0x7BAD}, //2204 #CJK UNIFIED IDEOGRAPH + {0x90FC, 0x7DDA}, //2205 #CJK UNIFIED IDEOGRAPH + {0x9140, 0x7E4A}, //2206 #CJK UNIFIED IDEOGRAPH + {0x9141, 0x7FA8}, //2207 #CJK UNIFIED IDEOGRAPH + {0x9142, 0x817A}, //2208 #CJK UNIFIED IDEOGRAPH + {0x9143, 0x821B}, //2209 #CJK UNIFIED IDEOGRAPH + {0x9144, 0x8239}, //2210 #CJK UNIFIED IDEOGRAPH + {0x9145, 0x85A6}, //2211 #CJK UNIFIED IDEOGRAPH + {0x9146, 0x8A6E}, //2212 #CJK UNIFIED IDEOGRAPH + {0x9147, 0x8CCE}, //2213 #CJK UNIFIED IDEOGRAPH + {0x9148, 0x8DF5}, //2214 #CJK UNIFIED IDEOGRAPH + {0x9149, 0x9078}, //2215 #CJK UNIFIED IDEOGRAPH + {0x914A, 0x9077}, //2216 #CJK UNIFIED IDEOGRAPH + {0x914B, 0x92AD}, //2217 #CJK UNIFIED IDEOGRAPH + {0x914C, 0x9291}, //2218 #CJK UNIFIED IDEOGRAPH + {0x914D, 0x9583}, //2219 #CJK UNIFIED IDEOGRAPH + {0x914E, 0x9BAE}, //2220 #CJK UNIFIED IDEOGRAPH + {0x914F, 0x524D}, //2221 #CJK UNIFIED IDEOGRAPH + {0x9150, 0x5584}, //2222 #CJK UNIFIED IDEOGRAPH + {0x9151, 0x6F38}, //2223 #CJK UNIFIED IDEOGRAPH + {0x9152, 0x7136}, //2224 #CJK UNIFIED IDEOGRAPH + {0x9153, 0x5168}, //2225 #CJK UNIFIED IDEOGRAPH + {0x9154, 0x7985}, //2226 #CJK UNIFIED IDEOGRAPH + {0x9155, 0x7E55}, //2227 #CJK UNIFIED IDEOGRAPH + {0x9156, 0x81B3}, //2228 #CJK UNIFIED IDEOGRAPH + {0x9157, 0x7CCE}, //2229 #CJK UNIFIED IDEOGRAPH + {0x9158, 0x564C}, //2230 #CJK UNIFIED IDEOGRAPH + {0x9159, 0x5851}, //2231 #CJK UNIFIED IDEOGRAPH + {0x915A, 0x5CA8}, //2232 #CJK UNIFIED IDEOGRAPH + {0x915B, 0x63AA}, //2233 #CJK UNIFIED IDEOGRAPH + {0x915C, 0x66FE}, //2234 #CJK UNIFIED IDEOGRAPH + {0x915D, 0x66FD}, //2235 #CJK UNIFIED IDEOGRAPH + {0x915E, 0x695A}, //2236 #CJK UNIFIED IDEOGRAPH + {0x915F, 0x72D9}, //2237 #CJK UNIFIED IDEOGRAPH + {0x9160, 0x758F}, //2238 #CJK UNIFIED IDEOGRAPH + {0x9161, 0x758E}, //2239 #CJK UNIFIED IDEOGRAPH + {0x9162, 0x790E}, //2240 #CJK UNIFIED IDEOGRAPH + {0x9163, 0x7956}, //2241 #CJK UNIFIED IDEOGRAPH + {0x9164, 0x79DF}, //2242 #CJK UNIFIED IDEOGRAPH + {0x9165, 0x7C97}, //2243 #CJK UNIFIED IDEOGRAPH + {0x9166, 0x7D20}, //2244 #CJK UNIFIED IDEOGRAPH + {0x9167, 0x7D44}, //2245 #CJK UNIFIED IDEOGRAPH + {0x9168, 0x8607}, //2246 #CJK UNIFIED IDEOGRAPH + {0x9169, 0x8A34}, //2247 #CJK UNIFIED IDEOGRAPH + {0x916A, 0x963B}, //2248 #CJK UNIFIED IDEOGRAPH + {0x916B, 0x9061}, //2249 #CJK UNIFIED IDEOGRAPH + {0x916C, 0x9F20}, //2250 #CJK UNIFIED IDEOGRAPH + {0x916D, 0x50E7}, //2251 #CJK UNIFIED IDEOGRAPH + {0x916E, 0x5275}, //2252 #CJK UNIFIED IDEOGRAPH + {0x916F, 0x53CC}, //2253 #CJK UNIFIED IDEOGRAPH + {0x9170, 0x53E2}, //2254 #CJK UNIFIED IDEOGRAPH + {0x9171, 0x5009}, //2255 #CJK UNIFIED IDEOGRAPH + {0x9172, 0x55AA}, //2256 #CJK UNIFIED IDEOGRAPH + {0x9173, 0x58EE}, //2257 #CJK UNIFIED IDEOGRAPH + {0x9174, 0x594F}, //2258 #CJK UNIFIED IDEOGRAPH + {0x9175, 0x723D}, //2259 #CJK UNIFIED IDEOGRAPH + {0x9176, 0x5B8B}, //2260 #CJK UNIFIED IDEOGRAPH + {0x9177, 0x5C64}, //2261 #CJK UNIFIED IDEOGRAPH + {0x9178, 0x531D}, //2262 #CJK UNIFIED IDEOGRAPH + {0x9179, 0x60E3}, //2263 #CJK UNIFIED IDEOGRAPH + {0x917A, 0x60F3}, //2264 #CJK UNIFIED IDEOGRAPH + {0x917B, 0x635C}, //2265 #CJK UNIFIED IDEOGRAPH + {0x917C, 0x6383}, //2266 #CJK UNIFIED IDEOGRAPH + {0x917D, 0x633F}, //2267 #CJK UNIFIED IDEOGRAPH + {0x917E, 0x63BB}, //2268 #CJK UNIFIED IDEOGRAPH + {0x9180, 0x64CD}, //2269 #CJK UNIFIED IDEOGRAPH + {0x9181, 0x65E9}, //2270 #CJK UNIFIED IDEOGRAPH + {0x9182, 0x66F9}, //2271 #CJK UNIFIED IDEOGRAPH + {0x9183, 0x5DE3}, //2272 #CJK UNIFIED IDEOGRAPH + {0x9184, 0x69CD}, //2273 #CJK UNIFIED IDEOGRAPH + {0x9185, 0x69FD}, //2274 #CJK UNIFIED IDEOGRAPH + {0x9186, 0x6F15}, //2275 #CJK UNIFIED IDEOGRAPH + {0x9187, 0x71E5}, //2276 #CJK UNIFIED IDEOGRAPH + {0x9188, 0x4E89}, //2277 #CJK UNIFIED IDEOGRAPH + {0x9189, 0x75E9}, //2278 #CJK UNIFIED IDEOGRAPH + {0x918A, 0x76F8}, //2279 #CJK UNIFIED IDEOGRAPH + {0x918B, 0x7A93}, //2280 #CJK UNIFIED IDEOGRAPH + {0x918C, 0x7CDF}, //2281 #CJK UNIFIED IDEOGRAPH + {0x918D, 0x7DCF}, //2282 #CJK UNIFIED IDEOGRAPH + {0x918E, 0x7D9C}, //2283 #CJK UNIFIED IDEOGRAPH + {0x918F, 0x8061}, //2284 #CJK UNIFIED IDEOGRAPH + {0x9190, 0x8349}, //2285 #CJK UNIFIED IDEOGRAPH + {0x9191, 0x8358}, //2286 #CJK UNIFIED IDEOGRAPH + {0x9192, 0x846C}, //2287 #CJK UNIFIED IDEOGRAPH + {0x9193, 0x84BC}, //2288 #CJK UNIFIED IDEOGRAPH + {0x9194, 0x85FB}, //2289 #CJK UNIFIED IDEOGRAPH + {0x9195, 0x88C5}, //2290 #CJK UNIFIED IDEOGRAPH + {0x9196, 0x8D70}, //2291 #CJK UNIFIED IDEOGRAPH + {0x9197, 0x9001}, //2292 #CJK UNIFIED IDEOGRAPH + {0x9198, 0x906D}, //2293 #CJK UNIFIED IDEOGRAPH + {0x9199, 0x9397}, //2294 #CJK UNIFIED IDEOGRAPH + {0x919A, 0x971C}, //2295 #CJK UNIFIED IDEOGRAPH + {0x919B, 0x9A12}, //2296 #CJK UNIFIED IDEOGRAPH + {0x919C, 0x50CF}, //2297 #CJK UNIFIED IDEOGRAPH + {0x919D, 0x5897}, //2298 #CJK UNIFIED IDEOGRAPH + {0x919E, 0x618E}, //2299 #CJK UNIFIED IDEOGRAPH + {0x919F, 0x81D3}, //2300 #CJK UNIFIED IDEOGRAPH + {0x91A0, 0x8535}, //2301 #CJK UNIFIED IDEOGRAPH + {0x91A1, 0x8D08}, //2302 #CJK UNIFIED IDEOGRAPH + {0x91A2, 0x9020}, //2303 #CJK UNIFIED IDEOGRAPH + {0x91A3, 0x4FC3}, //2304 #CJK UNIFIED IDEOGRAPH + {0x91A4, 0x5074}, //2305 #CJK UNIFIED IDEOGRAPH + {0x91A5, 0x5247}, //2306 #CJK UNIFIED IDEOGRAPH + {0x91A6, 0x5373}, //2307 #CJK UNIFIED IDEOGRAPH + {0x91A7, 0x606F}, //2308 #CJK UNIFIED IDEOGRAPH + {0x91A8, 0x6349}, //2309 #CJK UNIFIED IDEOGRAPH + {0x91A9, 0x675F}, //2310 #CJK UNIFIED IDEOGRAPH + {0x91AA, 0x6E2C}, //2311 #CJK UNIFIED IDEOGRAPH + {0x91AB, 0x8DB3}, //2312 #CJK UNIFIED IDEOGRAPH + {0x91AC, 0x901F}, //2313 #CJK UNIFIED IDEOGRAPH + {0x91AD, 0x4FD7}, //2314 #CJK UNIFIED IDEOGRAPH + {0x91AE, 0x5C5E}, //2315 #CJK UNIFIED IDEOGRAPH + {0x91AF, 0x8CCA}, //2316 #CJK UNIFIED IDEOGRAPH + {0x91B0, 0x65CF}, //2317 #CJK UNIFIED IDEOGRAPH + {0x91B1, 0x7D9A}, //2318 #CJK UNIFIED IDEOGRAPH + {0x91B2, 0x5352}, //2319 #CJK UNIFIED IDEOGRAPH + {0x91B3, 0x8896}, //2320 #CJK UNIFIED IDEOGRAPH + {0x91B4, 0x5176}, //2321 #CJK UNIFIED IDEOGRAPH + {0x91B5, 0x63C3}, //2322 #CJK UNIFIED IDEOGRAPH + {0x91B6, 0x5B58}, //2323 #CJK UNIFIED IDEOGRAPH + {0x91B7, 0x5B6B}, //2324 #CJK UNIFIED IDEOGRAPH + {0x91B8, 0x5C0A}, //2325 #CJK UNIFIED IDEOGRAPH + {0x91B9, 0x640D}, //2326 #CJK UNIFIED IDEOGRAPH + {0x91BA, 0x6751}, //2327 #CJK UNIFIED IDEOGRAPH + {0x91BB, 0x905C}, //2328 #CJK UNIFIED IDEOGRAPH + {0x91BC, 0x4ED6}, //2329 #CJK UNIFIED IDEOGRAPH + {0x91BD, 0x591A}, //2330 #CJK UNIFIED IDEOGRAPH + {0x91BE, 0x592A}, //2331 #CJK UNIFIED IDEOGRAPH + {0x91BF, 0x6C70}, //2332 #CJK UNIFIED IDEOGRAPH + {0x91C0, 0x8A51}, //2333 #CJK UNIFIED IDEOGRAPH + {0x91C1, 0x553E}, //2334 #CJK UNIFIED IDEOGRAPH + {0x91C2, 0x5815}, //2335 #CJK UNIFIED IDEOGRAPH + {0x91C3, 0x59A5}, //2336 #CJK UNIFIED IDEOGRAPH + {0x91C4, 0x60F0}, //2337 #CJK UNIFIED IDEOGRAPH + {0x91C5, 0x6253}, //2338 #CJK UNIFIED IDEOGRAPH + {0x91C6, 0x67C1}, //2339 #CJK UNIFIED IDEOGRAPH + {0x91C7, 0x8235}, //2340 #CJK UNIFIED IDEOGRAPH + {0x91C8, 0x6955}, //2341 #CJK UNIFIED IDEOGRAPH + {0x91C9, 0x9640}, //2342 #CJK UNIFIED IDEOGRAPH + {0x91CA, 0x99C4}, //2343 #CJK UNIFIED IDEOGRAPH + {0x91CB, 0x9A28}, //2344 #CJK UNIFIED IDEOGRAPH + {0x91CC, 0x4F53}, //2345 #CJK UNIFIED IDEOGRAPH + {0x91CD, 0x5806}, //2346 #CJK UNIFIED IDEOGRAPH + {0x91CE, 0x5BFE}, //2347 #CJK UNIFIED IDEOGRAPH + {0x91CF, 0x8010}, //2348 #CJK UNIFIED IDEOGRAPH + {0x91D0, 0x5CB1}, //2349 #CJK UNIFIED IDEOGRAPH + {0x91D1, 0x5E2F}, //2350 #CJK UNIFIED IDEOGRAPH + {0x91D2, 0x5F85}, //2351 #CJK UNIFIED IDEOGRAPH + {0x91D3, 0x6020}, //2352 #CJK UNIFIED IDEOGRAPH + {0x91D4, 0x614B}, //2353 #CJK UNIFIED IDEOGRAPH + {0x91D5, 0x6234}, //2354 #CJK UNIFIED IDEOGRAPH + {0x91D6, 0x66FF}, //2355 #CJK UNIFIED IDEOGRAPH + {0x91D7, 0x6CF0}, //2356 #CJK UNIFIED IDEOGRAPH + {0x91D8, 0x6EDE}, //2357 #CJK UNIFIED IDEOGRAPH + {0x91D9, 0x80CE}, //2358 #CJK UNIFIED IDEOGRAPH + {0x91DA, 0x817F}, //2359 #CJK UNIFIED IDEOGRAPH + {0x91DB, 0x82D4}, //2360 #CJK UNIFIED IDEOGRAPH + {0x91DC, 0x888B}, //2361 #CJK UNIFIED IDEOGRAPH + {0x91DD, 0x8CB8}, //2362 #CJK UNIFIED IDEOGRAPH + {0x91DE, 0x9000}, //2363 #CJK UNIFIED IDEOGRAPH + {0x91DF, 0x902E}, //2364 #CJK UNIFIED IDEOGRAPH + {0x91E0, 0x968A}, //2365 #CJK UNIFIED IDEOGRAPH + {0x91E1, 0x9EDB}, //2366 #CJK UNIFIED IDEOGRAPH + {0x91E2, 0x9BDB}, //2367 #CJK UNIFIED IDEOGRAPH + {0x91E3, 0x4EE3}, //2368 #CJK UNIFIED IDEOGRAPH + {0x91E4, 0x53F0}, //2369 #CJK UNIFIED IDEOGRAPH + {0x91E5, 0x5927}, //2370 #CJK UNIFIED IDEOGRAPH + {0x91E6, 0x7B2C}, //2371 #CJK UNIFIED IDEOGRAPH + {0x91E7, 0x918D}, //2372 #CJK UNIFIED IDEOGRAPH + {0x91E8, 0x984C}, //2373 #CJK UNIFIED IDEOGRAPH + {0x91E9, 0x9DF9}, //2374 #CJK UNIFIED IDEOGRAPH + {0x91EA, 0x6EDD}, //2375 #CJK UNIFIED IDEOGRAPH + {0x91EB, 0x7027}, //2376 #CJK UNIFIED IDEOGRAPH + {0x91EC, 0x5353}, //2377 #CJK UNIFIED IDEOGRAPH + {0x91ED, 0x5544}, //2378 #CJK UNIFIED IDEOGRAPH + {0x91EE, 0x5B85}, //2379 #CJK UNIFIED IDEOGRAPH + {0x91EF, 0x6258}, //2380 #CJK UNIFIED IDEOGRAPH + {0x91F0, 0x629E}, //2381 #CJK UNIFIED IDEOGRAPH + {0x91F1, 0x62D3}, //2382 #CJK UNIFIED IDEOGRAPH + {0x91F2, 0x6CA2}, //2383 #CJK UNIFIED IDEOGRAPH + {0x91F3, 0x6FEF}, //2384 #CJK UNIFIED IDEOGRAPH + {0x91F4, 0x7422}, //2385 #CJK UNIFIED IDEOGRAPH + {0x91F5, 0x8A17}, //2386 #CJK UNIFIED IDEOGRAPH + {0x91F6, 0x9438}, //2387 #CJK UNIFIED IDEOGRAPH + {0x91F7, 0x6FC1}, //2388 #CJK UNIFIED IDEOGRAPH + {0x91F8, 0x8AFE}, //2389 #CJK UNIFIED IDEOGRAPH + {0x91F9, 0x8338}, //2390 #CJK UNIFIED IDEOGRAPH + {0x91FA, 0x51E7}, //2391 #CJK UNIFIED IDEOGRAPH + {0x91FB, 0x86F8}, //2392 #CJK UNIFIED IDEOGRAPH + {0x91FC, 0x53EA}, //2393 #CJK UNIFIED IDEOGRAPH + {0x9240, 0x53E9}, //2394 #CJK UNIFIED IDEOGRAPH + {0x9241, 0x4F46}, //2395 #CJK UNIFIED IDEOGRAPH + {0x9242, 0x9054}, //2396 #CJK UNIFIED IDEOGRAPH + {0x9243, 0x8FB0}, //2397 #CJK UNIFIED IDEOGRAPH + {0x9244, 0x596A}, //2398 #CJK UNIFIED IDEOGRAPH + {0x9245, 0x8131}, //2399 #CJK UNIFIED IDEOGRAPH + {0x9246, 0x5DFD}, //2400 #CJK UNIFIED IDEOGRAPH + {0x9247, 0x7AEA}, //2401 #CJK UNIFIED IDEOGRAPH + {0x9248, 0x8FBF}, //2402 #CJK UNIFIED IDEOGRAPH + {0x9249, 0x68DA}, //2403 #CJK UNIFIED IDEOGRAPH + {0x924A, 0x8C37}, //2404 #CJK UNIFIED IDEOGRAPH + {0x924B, 0x72F8}, //2405 #CJK UNIFIED IDEOGRAPH + {0x924C, 0x9C48}, //2406 #CJK UNIFIED IDEOGRAPH + {0x924D, 0x6A3D}, //2407 #CJK UNIFIED IDEOGRAPH + {0x924E, 0x8AB0}, //2408 #CJK UNIFIED IDEOGRAPH + {0x924F, 0x4E39}, //2409 #CJK UNIFIED IDEOGRAPH + {0x9250, 0x5358}, //2410 #CJK UNIFIED IDEOGRAPH + {0x9251, 0x5606}, //2411 #CJK UNIFIED IDEOGRAPH + {0x9252, 0x5766}, //2412 #CJK UNIFIED IDEOGRAPH + {0x9253, 0x62C5}, //2413 #CJK UNIFIED IDEOGRAPH + {0x9254, 0x63A2}, //2414 #CJK UNIFIED IDEOGRAPH + {0x9255, 0x65E6}, //2415 #CJK UNIFIED IDEOGRAPH + {0x9256, 0x6B4E}, //2416 #CJK UNIFIED IDEOGRAPH + {0x9257, 0x6DE1}, //2417 #CJK UNIFIED IDEOGRAPH + {0x9258, 0x6E5B}, //2418 #CJK UNIFIED IDEOGRAPH + {0x9259, 0x70AD}, //2419 #CJK UNIFIED IDEOGRAPH + {0x925A, 0x77ED}, //2420 #CJK UNIFIED IDEOGRAPH + {0x925B, 0x7AEF}, //2421 #CJK UNIFIED IDEOGRAPH + {0x925C, 0x7BAA}, //2422 #CJK UNIFIED IDEOGRAPH + {0x925D, 0x7DBB}, //2423 #CJK UNIFIED IDEOGRAPH + {0x925E, 0x803D}, //2424 #CJK UNIFIED IDEOGRAPH + {0x925F, 0x80C6}, //2425 #CJK UNIFIED IDEOGRAPH + {0x9260, 0x86CB}, //2426 #CJK UNIFIED IDEOGRAPH + {0x9261, 0x8A95}, //2427 #CJK UNIFIED IDEOGRAPH + {0x9262, 0x935B}, //2428 #CJK UNIFIED IDEOGRAPH + {0x9263, 0x56E3}, //2429 #CJK UNIFIED IDEOGRAPH + {0x9264, 0x58C7}, //2430 #CJK UNIFIED IDEOGRAPH + {0x9265, 0x5F3E}, //2431 #CJK UNIFIED IDEOGRAPH + {0x9266, 0x65AD}, //2432 #CJK UNIFIED IDEOGRAPH + {0x9267, 0x6696}, //2433 #CJK UNIFIED IDEOGRAPH + {0x9268, 0x6A80}, //2434 #CJK UNIFIED IDEOGRAPH + {0x9269, 0x6BB5}, //2435 #CJK UNIFIED IDEOGRAPH + {0x926A, 0x7537}, //2436 #CJK UNIFIED IDEOGRAPH + {0x926B, 0x8AC7}, //2437 #CJK UNIFIED IDEOGRAPH + {0x926C, 0x5024}, //2438 #CJK UNIFIED IDEOGRAPH + {0x926D, 0x77E5}, //2439 #CJK UNIFIED IDEOGRAPH + {0x926E, 0x5730}, //2440 #CJK UNIFIED IDEOGRAPH + {0x926F, 0x5F1B}, //2441 #CJK UNIFIED IDEOGRAPH + {0x9270, 0x6065}, //2442 #CJK UNIFIED IDEOGRAPH + {0x9271, 0x667A}, //2443 #CJK UNIFIED IDEOGRAPH + {0x9272, 0x6C60}, //2444 #CJK UNIFIED IDEOGRAPH + {0x9273, 0x75F4}, //2445 #CJK UNIFIED IDEOGRAPH + {0x9274, 0x7A1A}, //2446 #CJK UNIFIED IDEOGRAPH + {0x9275, 0x7F6E}, //2447 #CJK UNIFIED IDEOGRAPH + {0x9276, 0x81F4}, //2448 #CJK UNIFIED IDEOGRAPH + {0x9277, 0x8718}, //2449 #CJK UNIFIED IDEOGRAPH + {0x9278, 0x9045}, //2450 #CJK UNIFIED IDEOGRAPH + {0x9279, 0x99B3}, //2451 #CJK UNIFIED IDEOGRAPH + {0x927A, 0x7BC9}, //2452 #CJK UNIFIED IDEOGRAPH + {0x927B, 0x755C}, //2453 #CJK UNIFIED IDEOGRAPH + {0x927C, 0x7AF9}, //2454 #CJK UNIFIED IDEOGRAPH + {0x927D, 0x7B51}, //2455 #CJK UNIFIED IDEOGRAPH + {0x927E, 0x84C4}, //2456 #CJK UNIFIED IDEOGRAPH + {0x9280, 0x9010}, //2457 #CJK UNIFIED IDEOGRAPH + {0x9281, 0x79E9}, //2458 #CJK UNIFIED IDEOGRAPH + {0x9282, 0x7A92}, //2459 #CJK UNIFIED IDEOGRAPH + {0x9283, 0x8336}, //2460 #CJK UNIFIED IDEOGRAPH + {0x9284, 0x5AE1}, //2461 #CJK UNIFIED IDEOGRAPH + {0x9285, 0x7740}, //2462 #CJK UNIFIED IDEOGRAPH + {0x9286, 0x4E2D}, //2463 #CJK UNIFIED IDEOGRAPH + {0x9287, 0x4EF2}, //2464 #CJK UNIFIED IDEOGRAPH + {0x9288, 0x5B99}, //2465 #CJK UNIFIED IDEOGRAPH + {0x9289, 0x5FE0}, //2466 #CJK UNIFIED IDEOGRAPH + {0x928A, 0x62BD}, //2467 #CJK UNIFIED IDEOGRAPH + {0x928B, 0x663C}, //2468 #CJK UNIFIED IDEOGRAPH + {0x928C, 0x67F1}, //2469 #CJK UNIFIED IDEOGRAPH + {0x928D, 0x6CE8}, //2470 #CJK UNIFIED IDEOGRAPH + {0x928E, 0x866B}, //2471 #CJK UNIFIED IDEOGRAPH + {0x928F, 0x8877}, //2472 #CJK UNIFIED IDEOGRAPH + {0x9290, 0x8A3B}, //2473 #CJK UNIFIED IDEOGRAPH + {0x9291, 0x914E}, //2474 #CJK UNIFIED IDEOGRAPH + {0x9292, 0x92F3}, //2475 #CJK UNIFIED IDEOGRAPH + {0x9293, 0x99D0}, //2476 #CJK UNIFIED IDEOGRAPH + {0x9294, 0x6A17}, //2477 #CJK UNIFIED IDEOGRAPH + {0x9295, 0x7026}, //2478 #CJK UNIFIED IDEOGRAPH + {0x9296, 0x732A}, //2479 #CJK UNIFIED IDEOGRAPH + {0x9297, 0x82E7}, //2480 #CJK UNIFIED IDEOGRAPH + {0x9298, 0x8457}, //2481 #CJK UNIFIED IDEOGRAPH + {0x9299, 0x8CAF}, //2482 #CJK UNIFIED IDEOGRAPH + {0x929A, 0x4E01}, //2483 #CJK UNIFIED IDEOGRAPH + {0x929B, 0x5146}, //2484 #CJK UNIFIED IDEOGRAPH + {0x929C, 0x51CB}, //2485 #CJK UNIFIED IDEOGRAPH + {0x929D, 0x558B}, //2486 #CJK UNIFIED IDEOGRAPH + {0x929E, 0x5BF5}, //2487 #CJK UNIFIED IDEOGRAPH + {0x929F, 0x5E16}, //2488 #CJK UNIFIED IDEOGRAPH + {0x92A0, 0x5E33}, //2489 #CJK UNIFIED IDEOGRAPH + {0x92A1, 0x5E81}, //2490 #CJK UNIFIED IDEOGRAPH + {0x92A2, 0x5F14}, //2491 #CJK UNIFIED IDEOGRAPH + {0x92A3, 0x5F35}, //2492 #CJK UNIFIED IDEOGRAPH + {0x92A4, 0x5F6B}, //2493 #CJK UNIFIED IDEOGRAPH + {0x92A5, 0x5FB4}, //2494 #CJK UNIFIED IDEOGRAPH + {0x92A6, 0x61F2}, //2495 #CJK UNIFIED IDEOGRAPH + {0x92A7, 0x6311}, //2496 #CJK UNIFIED IDEOGRAPH + {0x92A8, 0x66A2}, //2497 #CJK UNIFIED IDEOGRAPH + {0x92A9, 0x671D}, //2498 #CJK UNIFIED IDEOGRAPH + {0x92AA, 0x6F6E}, //2499 #CJK UNIFIED IDEOGRAPH + {0x92AB, 0x7252}, //2500 #CJK UNIFIED IDEOGRAPH + {0x92AC, 0x753A}, //2501 #CJK UNIFIED IDEOGRAPH + {0x92AD, 0x773A}, //2502 #CJK UNIFIED IDEOGRAPH + {0x92AE, 0x8074}, //2503 #CJK UNIFIED IDEOGRAPH + {0x92AF, 0x8139}, //2504 #CJK UNIFIED IDEOGRAPH + {0x92B0, 0x8178}, //2505 #CJK UNIFIED IDEOGRAPH + {0x92B1, 0x8776}, //2506 #CJK UNIFIED IDEOGRAPH + {0x92B2, 0x8ABF}, //2507 #CJK UNIFIED IDEOGRAPH + {0x92B3, 0x8ADC}, //2508 #CJK UNIFIED IDEOGRAPH + {0x92B4, 0x8D85}, //2509 #CJK UNIFIED IDEOGRAPH + {0x92B5, 0x8DF3}, //2510 #CJK UNIFIED IDEOGRAPH + {0x92B6, 0x929A}, //2511 #CJK UNIFIED IDEOGRAPH + {0x92B7, 0x9577}, //2512 #CJK UNIFIED IDEOGRAPH + {0x92B8, 0x9802}, //2513 #CJK UNIFIED IDEOGRAPH + {0x92B9, 0x9CE5}, //2514 #CJK UNIFIED IDEOGRAPH + {0x92BA, 0x52C5}, //2515 #CJK UNIFIED IDEOGRAPH + {0x92BB, 0x6357}, //2516 #CJK UNIFIED IDEOGRAPH + {0x92BC, 0x76F4}, //2517 #CJK UNIFIED IDEOGRAPH + {0x92BD, 0x6715}, //2518 #CJK UNIFIED IDEOGRAPH + {0x92BE, 0x6C88}, //2519 #CJK UNIFIED IDEOGRAPH + {0x92BF, 0x73CD}, //2520 #CJK UNIFIED IDEOGRAPH + {0x92C0, 0x8CC3}, //2521 #CJK UNIFIED IDEOGRAPH + {0x92C1, 0x93AE}, //2522 #CJK UNIFIED IDEOGRAPH + {0x92C2, 0x9673}, //2523 #CJK UNIFIED IDEOGRAPH + {0x92C3, 0x6D25}, //2524 #CJK UNIFIED IDEOGRAPH + {0x92C4, 0x589C}, //2525 #CJK UNIFIED IDEOGRAPH + {0x92C5, 0x690E}, //2526 #CJK UNIFIED IDEOGRAPH + {0x92C6, 0x69CC}, //2527 #CJK UNIFIED IDEOGRAPH + {0x92C7, 0x8FFD}, //2528 #CJK UNIFIED IDEOGRAPH + {0x92C8, 0x939A}, //2529 #CJK UNIFIED IDEOGRAPH + {0x92C9, 0x75DB}, //2530 #CJK UNIFIED IDEOGRAPH + {0x92CA, 0x901A}, //2531 #CJK UNIFIED IDEOGRAPH + {0x92CB, 0x585A}, //2532 #CJK UNIFIED IDEOGRAPH + {0x92CC, 0x6802}, //2533 #CJK UNIFIED IDEOGRAPH + {0x92CD, 0x63B4}, //2534 #CJK UNIFIED IDEOGRAPH + {0x92CE, 0x69FB}, //2535 #CJK UNIFIED IDEOGRAPH + {0x92CF, 0x4F43}, //2536 #CJK UNIFIED IDEOGRAPH + {0x92D0, 0x6F2C}, //2537 #CJK UNIFIED IDEOGRAPH + {0x92D1, 0x67D8}, //2538 #CJK UNIFIED IDEOGRAPH + {0x92D2, 0x8FBB}, //2539 #CJK UNIFIED IDEOGRAPH + {0x92D3, 0x8526}, //2540 #CJK UNIFIED IDEOGRAPH + {0x92D4, 0x7DB4}, //2541 #CJK UNIFIED IDEOGRAPH + {0x92D5, 0x9354}, //2542 #CJK UNIFIED IDEOGRAPH + {0x92D6, 0x693F}, //2543 #CJK UNIFIED IDEOGRAPH + {0x92D7, 0x6F70}, //2544 #CJK UNIFIED IDEOGRAPH + {0x92D8, 0x576A}, //2545 #CJK UNIFIED IDEOGRAPH + {0x92D9, 0x58F7}, //2546 #CJK UNIFIED IDEOGRAPH + {0x92DA, 0x5B2C}, //2547 #CJK UNIFIED IDEOGRAPH + {0x92DB, 0x7D2C}, //2548 #CJK UNIFIED IDEOGRAPH + {0x92DC, 0x722A}, //2549 #CJK UNIFIED IDEOGRAPH + {0x92DD, 0x540A}, //2550 #CJK UNIFIED IDEOGRAPH + {0x92DE, 0x91E3}, //2551 #CJK UNIFIED IDEOGRAPH + {0x92DF, 0x9DB4}, //2552 #CJK UNIFIED IDEOGRAPH + {0x92E0, 0x4EAD}, //2553 #CJK UNIFIED IDEOGRAPH + {0x92E1, 0x4F4E}, //2554 #CJK UNIFIED IDEOGRAPH + {0x92E2, 0x505C}, //2555 #CJK UNIFIED IDEOGRAPH + {0x92E3, 0x5075}, //2556 #CJK UNIFIED IDEOGRAPH + {0x92E4, 0x5243}, //2557 #CJK UNIFIED IDEOGRAPH + {0x92E5, 0x8C9E}, //2558 #CJK UNIFIED IDEOGRAPH + {0x92E6, 0x5448}, //2559 #CJK UNIFIED IDEOGRAPH + {0x92E7, 0x5824}, //2560 #CJK UNIFIED IDEOGRAPH + {0x92E8, 0x5B9A}, //2561 #CJK UNIFIED IDEOGRAPH + {0x92E9, 0x5E1D}, //2562 #CJK UNIFIED IDEOGRAPH + {0x92EA, 0x5E95}, //2563 #CJK UNIFIED IDEOGRAPH + {0x92EB, 0x5EAD}, //2564 #CJK UNIFIED IDEOGRAPH + {0x92EC, 0x5EF7}, //2565 #CJK UNIFIED IDEOGRAPH + {0x92ED, 0x5F1F}, //2566 #CJK UNIFIED IDEOGRAPH + {0x92EE, 0x608C}, //2567 #CJK UNIFIED IDEOGRAPH + {0x92EF, 0x62B5}, //2568 #CJK UNIFIED IDEOGRAPH + {0x92F0, 0x633A}, //2569 #CJK UNIFIED IDEOGRAPH + {0x92F1, 0x63D0}, //2570 #CJK UNIFIED IDEOGRAPH + {0x92F2, 0x68AF}, //2571 #CJK UNIFIED IDEOGRAPH + {0x92F3, 0x6C40}, //2572 #CJK UNIFIED IDEOGRAPH + {0x92F4, 0x7887}, //2573 #CJK UNIFIED IDEOGRAPH + {0x92F5, 0x798E}, //2574 #CJK UNIFIED IDEOGRAPH + {0x92F6, 0x7A0B}, //2575 #CJK UNIFIED IDEOGRAPH + {0x92F7, 0x7DE0}, //2576 #CJK UNIFIED IDEOGRAPH + {0x92F8, 0x8247}, //2577 #CJK UNIFIED IDEOGRAPH + {0x92F9, 0x8A02}, //2578 #CJK UNIFIED IDEOGRAPH + {0x92FA, 0x8AE6}, //2579 #CJK UNIFIED IDEOGRAPH + {0x92FB, 0x8E44}, //2580 #CJK UNIFIED IDEOGRAPH + {0x92FC, 0x9013}, //2581 #CJK UNIFIED IDEOGRAPH + {0x9340, 0x90B8}, //2582 #CJK UNIFIED IDEOGRAPH + {0x9341, 0x912D}, //2583 #CJK UNIFIED IDEOGRAPH + {0x9342, 0x91D8}, //2584 #CJK UNIFIED IDEOGRAPH + {0x9343, 0x9F0E}, //2585 #CJK UNIFIED IDEOGRAPH + {0x9344, 0x6CE5}, //2586 #CJK UNIFIED IDEOGRAPH + {0x9345, 0x6458}, //2587 #CJK UNIFIED IDEOGRAPH + {0x9346, 0x64E2}, //2588 #CJK UNIFIED IDEOGRAPH + {0x9347, 0x6575}, //2589 #CJK UNIFIED IDEOGRAPH + {0x9348, 0x6EF4}, //2590 #CJK UNIFIED IDEOGRAPH + {0x9349, 0x7684}, //2591 #CJK UNIFIED IDEOGRAPH + {0x934A, 0x7B1B}, //2592 #CJK UNIFIED IDEOGRAPH + {0x934B, 0x9069}, //2593 #CJK UNIFIED IDEOGRAPH + {0x934C, 0x93D1}, //2594 #CJK UNIFIED IDEOGRAPH + {0x934D, 0x6EBA}, //2595 #CJK UNIFIED IDEOGRAPH + {0x934E, 0x54F2}, //2596 #CJK UNIFIED IDEOGRAPH + {0x934F, 0x5FB9}, //2597 #CJK UNIFIED IDEOGRAPH + {0x9350, 0x64A4}, //2598 #CJK UNIFIED IDEOGRAPH + {0x9351, 0x8F4D}, //2599 #CJK UNIFIED IDEOGRAPH + {0x9352, 0x8FED}, //2600 #CJK UNIFIED IDEOGRAPH + {0x9353, 0x9244}, //2601 #CJK UNIFIED IDEOGRAPH + {0x9354, 0x5178}, //2602 #CJK UNIFIED IDEOGRAPH + {0x9355, 0x586B}, //2603 #CJK UNIFIED IDEOGRAPH + {0x9356, 0x5929}, //2604 #CJK UNIFIED IDEOGRAPH + {0x9357, 0x5C55}, //2605 #CJK UNIFIED IDEOGRAPH + {0x9358, 0x5E97}, //2606 #CJK UNIFIED IDEOGRAPH + {0x9359, 0x6DFB}, //2607 #CJK UNIFIED IDEOGRAPH + {0x935A, 0x7E8F}, //2608 #CJK UNIFIED IDEOGRAPH + {0x935B, 0x751C}, //2609 #CJK UNIFIED IDEOGRAPH + {0x935C, 0x8CBC}, //2610 #CJK UNIFIED IDEOGRAPH + {0x935D, 0x8EE2}, //2611 #CJK UNIFIED IDEOGRAPH + {0x935E, 0x985B}, //2612 #CJK UNIFIED IDEOGRAPH + {0x935F, 0x70B9}, //2613 #CJK UNIFIED IDEOGRAPH + {0x9360, 0x4F1D}, //2614 #CJK UNIFIED IDEOGRAPH + {0x9361, 0x6BBF}, //2615 #CJK UNIFIED IDEOGRAPH + {0x9362, 0x6FB1}, //2616 #CJK UNIFIED IDEOGRAPH + {0x9363, 0x7530}, //2617 #CJK UNIFIED IDEOGRAPH + {0x9364, 0x96FB}, //2618 #CJK UNIFIED IDEOGRAPH + {0x9365, 0x514E}, //2619 #CJK UNIFIED IDEOGRAPH + {0x9366, 0x5410}, //2620 #CJK UNIFIED IDEOGRAPH + {0x9367, 0x5835}, //2621 #CJK UNIFIED IDEOGRAPH + {0x9368, 0x5857}, //2622 #CJK UNIFIED IDEOGRAPH + {0x9369, 0x59AC}, //2623 #CJK UNIFIED IDEOGRAPH + {0x936A, 0x5C60}, //2624 #CJK UNIFIED IDEOGRAPH + {0x936B, 0x5F92}, //2625 #CJK UNIFIED IDEOGRAPH + {0x936C, 0x6597}, //2626 #CJK UNIFIED IDEOGRAPH + {0x936D, 0x675C}, //2627 #CJK UNIFIED IDEOGRAPH + {0x936E, 0x6E21}, //2628 #CJK UNIFIED IDEOGRAPH + {0x936F, 0x767B}, //2629 #CJK UNIFIED IDEOGRAPH + {0x9370, 0x83DF}, //2630 #CJK UNIFIED IDEOGRAPH + {0x9371, 0x8CED}, //2631 #CJK UNIFIED IDEOGRAPH + {0x9372, 0x9014}, //2632 #CJK UNIFIED IDEOGRAPH + {0x9373, 0x90FD}, //2633 #CJK UNIFIED IDEOGRAPH + {0x9374, 0x934D}, //2634 #CJK UNIFIED IDEOGRAPH + {0x9375, 0x7825}, //2635 #CJK UNIFIED IDEOGRAPH + {0x9376, 0x783A}, //2636 #CJK UNIFIED IDEOGRAPH + {0x9377, 0x52AA}, //2637 #CJK UNIFIED IDEOGRAPH + {0x9378, 0x5EA6}, //2638 #CJK UNIFIED IDEOGRAPH + {0x9379, 0x571F}, //2639 #CJK UNIFIED IDEOGRAPH + {0x937A, 0x5974}, //2640 #CJK UNIFIED IDEOGRAPH + {0x937B, 0x6012}, //2641 #CJK UNIFIED IDEOGRAPH + {0x937C, 0x5012}, //2642 #CJK UNIFIED IDEOGRAPH + {0x937D, 0x515A}, //2643 #CJK UNIFIED IDEOGRAPH + {0x937E, 0x51AC}, //2644 #CJK UNIFIED IDEOGRAPH + {0x9380, 0x51CD}, //2645 #CJK UNIFIED IDEOGRAPH + {0x9381, 0x5200}, //2646 #CJK UNIFIED IDEOGRAPH + {0x9382, 0x5510}, //2647 #CJK UNIFIED IDEOGRAPH + {0x9383, 0x5854}, //2648 #CJK UNIFIED IDEOGRAPH + {0x9384, 0x5858}, //2649 #CJK UNIFIED IDEOGRAPH + {0x9385, 0x5957}, //2650 #CJK UNIFIED IDEOGRAPH + {0x9386, 0x5B95}, //2651 #CJK UNIFIED IDEOGRAPH + {0x9387, 0x5CF6}, //2652 #CJK UNIFIED IDEOGRAPH + {0x9388, 0x5D8B}, //2653 #CJK UNIFIED IDEOGRAPH + {0x9389, 0x60BC}, //2654 #CJK UNIFIED IDEOGRAPH + {0x938A, 0x6295}, //2655 #CJK UNIFIED IDEOGRAPH + {0x938B, 0x642D}, //2656 #CJK UNIFIED IDEOGRAPH + {0x938C, 0x6771}, //2657 #CJK UNIFIED IDEOGRAPH + {0x938D, 0x6843}, //2658 #CJK UNIFIED IDEOGRAPH + {0x938E, 0x68BC}, //2659 #CJK UNIFIED IDEOGRAPH + {0x938F, 0x68DF}, //2660 #CJK UNIFIED IDEOGRAPH + {0x9390, 0x76D7}, //2661 #CJK UNIFIED IDEOGRAPH + {0x9391, 0x6DD8}, //2662 #CJK UNIFIED IDEOGRAPH + {0x9392, 0x6E6F}, //2663 #CJK UNIFIED IDEOGRAPH + {0x9393, 0x6D9B}, //2664 #CJK UNIFIED IDEOGRAPH + {0x9394, 0x706F}, //2665 #CJK UNIFIED IDEOGRAPH + {0x9395, 0x71C8}, //2666 #CJK UNIFIED IDEOGRAPH + {0x9396, 0x5F53}, //2667 #CJK UNIFIED IDEOGRAPH + {0x9397, 0x75D8}, //2668 #CJK UNIFIED IDEOGRAPH + {0x9398, 0x7977}, //2669 #CJK UNIFIED IDEOGRAPH + {0x9399, 0x7B49}, //2670 #CJK UNIFIED IDEOGRAPH + {0x939A, 0x7B54}, //2671 #CJK UNIFIED IDEOGRAPH + {0x939B, 0x7B52}, //2672 #CJK UNIFIED IDEOGRAPH + {0x939C, 0x7CD6}, //2673 #CJK UNIFIED IDEOGRAPH + {0x939D, 0x7D71}, //2674 #CJK UNIFIED IDEOGRAPH + {0x939E, 0x5230}, //2675 #CJK UNIFIED IDEOGRAPH + {0x939F, 0x8463}, //2676 #CJK UNIFIED IDEOGRAPH + {0x93A0, 0x8569}, //2677 #CJK UNIFIED IDEOGRAPH + {0x93A1, 0x85E4}, //2678 #CJK UNIFIED IDEOGRAPH + {0x93A2, 0x8A0E}, //2679 #CJK UNIFIED IDEOGRAPH + {0x93A3, 0x8B04}, //2680 #CJK UNIFIED IDEOGRAPH + {0x93A4, 0x8C46}, //2681 #CJK UNIFIED IDEOGRAPH + {0x93A5, 0x8E0F}, //2682 #CJK UNIFIED IDEOGRAPH + {0x93A6, 0x9003}, //2683 #CJK UNIFIED IDEOGRAPH + {0x93A7, 0x900F}, //2684 #CJK UNIFIED IDEOGRAPH + {0x93A8, 0x9419}, //2685 #CJK UNIFIED IDEOGRAPH + {0x93A9, 0x9676}, //2686 #CJK UNIFIED IDEOGRAPH + {0x93AA, 0x982D}, //2687 #CJK UNIFIED IDEOGRAPH + {0x93AB, 0x9A30}, //2688 #CJK UNIFIED IDEOGRAPH + {0x93AC, 0x95D8}, //2689 #CJK UNIFIED IDEOGRAPH + {0x93AD, 0x50CD}, //2690 #CJK UNIFIED IDEOGRAPH + {0x93AE, 0x52D5}, //2691 #CJK UNIFIED IDEOGRAPH + {0x93AF, 0x540C}, //2692 #CJK UNIFIED IDEOGRAPH + {0x93B0, 0x5802}, //2693 #CJK UNIFIED IDEOGRAPH + {0x93B1, 0x5C0E}, //2694 #CJK UNIFIED IDEOGRAPH + {0x93B2, 0x61A7}, //2695 #CJK UNIFIED IDEOGRAPH + {0x93B3, 0x649E}, //2696 #CJK UNIFIED IDEOGRAPH + {0x93B4, 0x6D1E}, //2697 #CJK UNIFIED IDEOGRAPH + {0x93B5, 0x77B3}, //2698 #CJK UNIFIED IDEOGRAPH + {0x93B6, 0x7AE5}, //2699 #CJK UNIFIED IDEOGRAPH + {0x93B7, 0x80F4}, //2700 #CJK UNIFIED IDEOGRAPH + {0x93B8, 0x8404}, //2701 #CJK UNIFIED IDEOGRAPH + {0x93B9, 0x9053}, //2702 #CJK UNIFIED IDEOGRAPH + {0x93BA, 0x9285}, //2703 #CJK UNIFIED IDEOGRAPH + {0x93BB, 0x5CE0}, //2704 #CJK UNIFIED IDEOGRAPH + {0x93BC, 0x9D07}, //2705 #CJK UNIFIED IDEOGRAPH + {0x93BD, 0x533F}, //2706 #CJK UNIFIED IDEOGRAPH + {0x93BE, 0x5F97}, //2707 #CJK UNIFIED IDEOGRAPH + {0x93BF, 0x5FB3}, //2708 #CJK UNIFIED IDEOGRAPH + {0x93C0, 0x6D9C}, //2709 #CJK UNIFIED IDEOGRAPH + {0x93C1, 0x7279}, //2710 #CJK UNIFIED IDEOGRAPH + {0x93C2, 0x7763}, //2711 #CJK UNIFIED IDEOGRAPH + {0x93C3, 0x79BF}, //2712 #CJK UNIFIED IDEOGRAPH + {0x93C4, 0x7BE4}, //2713 #CJK UNIFIED IDEOGRAPH + {0x93C5, 0x6BD2}, //2714 #CJK UNIFIED IDEOGRAPH + {0x93C6, 0x72EC}, //2715 #CJK UNIFIED IDEOGRAPH + {0x93C7, 0x8AAD}, //2716 #CJK UNIFIED IDEOGRAPH + {0x93C8, 0x6803}, //2717 #CJK UNIFIED IDEOGRAPH + {0x93C9, 0x6A61}, //2718 #CJK UNIFIED IDEOGRAPH + {0x93CA, 0x51F8}, //2719 #CJK UNIFIED IDEOGRAPH + {0x93CB, 0x7A81}, //2720 #CJK UNIFIED IDEOGRAPH + {0x93CC, 0x6934}, //2721 #CJK UNIFIED IDEOGRAPH + {0x93CD, 0x5C4A}, //2722 #CJK UNIFIED IDEOGRAPH + {0x93CE, 0x9CF6}, //2723 #CJK UNIFIED IDEOGRAPH + {0x93CF, 0x82EB}, //2724 #CJK UNIFIED IDEOGRAPH + {0x93D0, 0x5BC5}, //2725 #CJK UNIFIED IDEOGRAPH + {0x93D1, 0x9149}, //2726 #CJK UNIFIED IDEOGRAPH + {0x93D2, 0x701E}, //2727 #CJK UNIFIED IDEOGRAPH + {0x93D3, 0x5678}, //2728 #CJK UNIFIED IDEOGRAPH + {0x93D4, 0x5C6F}, //2729 #CJK UNIFIED IDEOGRAPH + {0x93D5, 0x60C7}, //2730 #CJK UNIFIED IDEOGRAPH + {0x93D6, 0x6566}, //2731 #CJK UNIFIED IDEOGRAPH + {0x93D7, 0x6C8C}, //2732 #CJK UNIFIED IDEOGRAPH + {0x93D8, 0x8C5A}, //2733 #CJK UNIFIED IDEOGRAPH + {0x93D9, 0x9041}, //2734 #CJK UNIFIED IDEOGRAPH + {0x93DA, 0x9813}, //2735 #CJK UNIFIED IDEOGRAPH + {0x93DB, 0x5451}, //2736 #CJK UNIFIED IDEOGRAPH + {0x93DC, 0x66C7}, //2737 #CJK UNIFIED IDEOGRAPH + {0x93DD, 0x920D}, //2738 #CJK UNIFIED IDEOGRAPH + {0x93DE, 0x5948}, //2739 #CJK UNIFIED IDEOGRAPH + {0x93DF, 0x90A3}, //2740 #CJK UNIFIED IDEOGRAPH + {0x93E0, 0x5185}, //2741 #CJK UNIFIED IDEOGRAPH + {0x93E1, 0x4E4D}, //2742 #CJK UNIFIED IDEOGRAPH + {0x93E2, 0x51EA}, //2743 #CJK UNIFIED IDEOGRAPH + {0x93E3, 0x8599}, //2744 #CJK UNIFIED IDEOGRAPH + {0x93E4, 0x8B0E}, //2745 #CJK UNIFIED IDEOGRAPH + {0x93E5, 0x7058}, //2746 #CJK UNIFIED IDEOGRAPH + {0x93E6, 0x637A}, //2747 #CJK UNIFIED IDEOGRAPH + {0x93E7, 0x934B}, //2748 #CJK UNIFIED IDEOGRAPH + {0x93E8, 0x6962}, //2749 #CJK UNIFIED IDEOGRAPH + {0x93E9, 0x99B4}, //2750 #CJK UNIFIED IDEOGRAPH + {0x93EA, 0x7E04}, //2751 #CJK UNIFIED IDEOGRAPH + {0x93EB, 0x7577}, //2752 #CJK UNIFIED IDEOGRAPH + {0x93EC, 0x5357}, //2753 #CJK UNIFIED IDEOGRAPH + {0x93ED, 0x6960}, //2754 #CJK UNIFIED IDEOGRAPH + {0x93EE, 0x8EDF}, //2755 #CJK UNIFIED IDEOGRAPH + {0x93EF, 0x96E3}, //2756 #CJK UNIFIED IDEOGRAPH + {0x93F0, 0x6C5D}, //2757 #CJK UNIFIED IDEOGRAPH + {0x93F1, 0x4E8C}, //2758 #CJK UNIFIED IDEOGRAPH + {0x93F2, 0x5C3C}, //2759 #CJK UNIFIED IDEOGRAPH + {0x93F3, 0x5F10}, //2760 #CJK UNIFIED IDEOGRAPH + {0x93F4, 0x8FE9}, //2761 #CJK UNIFIED IDEOGRAPH + {0x93F5, 0x5302}, //2762 #CJK UNIFIED IDEOGRAPH + {0x93F6, 0x8CD1}, //2763 #CJK UNIFIED IDEOGRAPH + {0x93F7, 0x8089}, //2764 #CJK UNIFIED IDEOGRAPH + {0x93F8, 0x8679}, //2765 #CJK UNIFIED IDEOGRAPH + {0x93F9, 0x5EFF}, //2766 #CJK UNIFIED IDEOGRAPH + {0x93FA, 0x65E5}, //2767 #CJK UNIFIED IDEOGRAPH + {0x93FB, 0x4E73}, //2768 #CJK UNIFIED IDEOGRAPH + {0x93FC, 0x5165}, //2769 #CJK UNIFIED IDEOGRAPH + {0x9440, 0x5982}, //2770 #CJK UNIFIED IDEOGRAPH + {0x9441, 0x5C3F}, //2771 #CJK UNIFIED IDEOGRAPH + {0x9442, 0x97EE}, //2772 #CJK UNIFIED IDEOGRAPH + {0x9443, 0x4EFB}, //2773 #CJK UNIFIED IDEOGRAPH + {0x9444, 0x598A}, //2774 #CJK UNIFIED IDEOGRAPH + {0x9445, 0x5FCD}, //2775 #CJK UNIFIED IDEOGRAPH + {0x9446, 0x8A8D}, //2776 #CJK UNIFIED IDEOGRAPH + {0x9447, 0x6FE1}, //2777 #CJK UNIFIED IDEOGRAPH + {0x9448, 0x79B0}, //2778 #CJK UNIFIED IDEOGRAPH + {0x9449, 0x7962}, //2779 #CJK UNIFIED IDEOGRAPH + {0x944A, 0x5BE7}, //2780 #CJK UNIFIED IDEOGRAPH + {0x944B, 0x8471}, //2781 #CJK UNIFIED IDEOGRAPH + {0x944C, 0x732B}, //2782 #CJK UNIFIED IDEOGRAPH + {0x944D, 0x71B1}, //2783 #CJK UNIFIED IDEOGRAPH + {0x944E, 0x5E74}, //2784 #CJK UNIFIED IDEOGRAPH + {0x944F, 0x5FF5}, //2785 #CJK UNIFIED IDEOGRAPH + {0x9450, 0x637B}, //2786 #CJK UNIFIED IDEOGRAPH + {0x9451, 0x649A}, //2787 #CJK UNIFIED IDEOGRAPH + {0x9452, 0x71C3}, //2788 #CJK UNIFIED IDEOGRAPH + {0x9453, 0x7C98}, //2789 #CJK UNIFIED IDEOGRAPH + {0x9454, 0x4E43}, //2790 #CJK UNIFIED IDEOGRAPH + {0x9455, 0x5EFC}, //2791 #CJK UNIFIED IDEOGRAPH + {0x9456, 0x4E4B}, //2792 #CJK UNIFIED IDEOGRAPH + {0x9457, 0x57DC}, //2793 #CJK UNIFIED IDEOGRAPH + {0x9458, 0x56A2}, //2794 #CJK UNIFIED IDEOGRAPH + {0x9459, 0x60A9}, //2795 #CJK UNIFIED IDEOGRAPH + {0x945A, 0x6FC3}, //2796 #CJK UNIFIED IDEOGRAPH + {0x945B, 0x7D0D}, //2797 #CJK UNIFIED IDEOGRAPH + {0x945C, 0x80FD}, //2798 #CJK UNIFIED IDEOGRAPH + {0x945D, 0x8133}, //2799 #CJK UNIFIED IDEOGRAPH + {0x945E, 0x81BF}, //2800 #CJK UNIFIED IDEOGRAPH + {0x945F, 0x8FB2}, //2801 #CJK UNIFIED IDEOGRAPH + {0x9460, 0x8997}, //2802 #CJK UNIFIED IDEOGRAPH + {0x9461, 0x86A4}, //2803 #CJK UNIFIED IDEOGRAPH + {0x9462, 0x5DF4}, //2804 #CJK UNIFIED IDEOGRAPH + {0x9463, 0x628A}, //2805 #CJK UNIFIED IDEOGRAPH + {0x9464, 0x64AD}, //2806 #CJK UNIFIED IDEOGRAPH + {0x9465, 0x8987}, //2807 #CJK UNIFIED IDEOGRAPH + {0x9466, 0x6777}, //2808 #CJK UNIFIED IDEOGRAPH + {0x9467, 0x6CE2}, //2809 #CJK UNIFIED IDEOGRAPH + {0x9468, 0x6D3E}, //2810 #CJK UNIFIED IDEOGRAPH + {0x9469, 0x7436}, //2811 #CJK UNIFIED IDEOGRAPH + {0x946A, 0x7834}, //2812 #CJK UNIFIED IDEOGRAPH + {0x946B, 0x5A46}, //2813 #CJK UNIFIED IDEOGRAPH + {0x946C, 0x7F75}, //2814 #CJK UNIFIED IDEOGRAPH + {0x946D, 0x82AD}, //2815 #CJK UNIFIED IDEOGRAPH + {0x946E, 0x99AC}, //2816 #CJK UNIFIED IDEOGRAPH + {0x946F, 0x4FF3}, //2817 #CJK UNIFIED IDEOGRAPH + {0x9470, 0x5EC3}, //2818 #CJK UNIFIED IDEOGRAPH + {0x9471, 0x62DD}, //2819 #CJK UNIFIED IDEOGRAPH + {0x9472, 0x6392}, //2820 #CJK UNIFIED IDEOGRAPH + {0x9473, 0x6557}, //2821 #CJK UNIFIED IDEOGRAPH + {0x9474, 0x676F}, //2822 #CJK UNIFIED IDEOGRAPH + {0x9475, 0x76C3}, //2823 #CJK UNIFIED IDEOGRAPH + {0x9476, 0x724C}, //2824 #CJK UNIFIED IDEOGRAPH + {0x9477, 0x80CC}, //2825 #CJK UNIFIED IDEOGRAPH + {0x9478, 0x80BA}, //2826 #CJK UNIFIED IDEOGRAPH + {0x9479, 0x8F29}, //2827 #CJK UNIFIED IDEOGRAPH + {0x947A, 0x914D}, //2828 #CJK UNIFIED IDEOGRAPH + {0x947B, 0x500D}, //2829 #CJK UNIFIED IDEOGRAPH + {0x947C, 0x57F9}, //2830 #CJK UNIFIED IDEOGRAPH + {0x947D, 0x5A92}, //2831 #CJK UNIFIED IDEOGRAPH + {0x947E, 0x6885}, //2832 #CJK UNIFIED IDEOGRAPH + {0x9480, 0x6973}, //2833 #CJK UNIFIED IDEOGRAPH + {0x9481, 0x7164}, //2834 #CJK UNIFIED IDEOGRAPH + {0x9482, 0x72FD}, //2835 #CJK UNIFIED IDEOGRAPH + {0x9483, 0x8CB7}, //2836 #CJK UNIFIED IDEOGRAPH + {0x9484, 0x58F2}, //2837 #CJK UNIFIED IDEOGRAPH + {0x9485, 0x8CE0}, //2838 #CJK UNIFIED IDEOGRAPH + {0x9486, 0x966A}, //2839 #CJK UNIFIED IDEOGRAPH + {0x9487, 0x9019}, //2840 #CJK UNIFIED IDEOGRAPH + {0x9488, 0x877F}, //2841 #CJK UNIFIED IDEOGRAPH + {0x9489, 0x79E4}, //2842 #CJK UNIFIED IDEOGRAPH + {0x948A, 0x77E7}, //2843 #CJK UNIFIED IDEOGRAPH + {0x948B, 0x8429}, //2844 #CJK UNIFIED IDEOGRAPH + {0x948C, 0x4F2F}, //2845 #CJK UNIFIED IDEOGRAPH + {0x948D, 0x5265}, //2846 #CJK UNIFIED IDEOGRAPH + {0x948E, 0x535A}, //2847 #CJK UNIFIED IDEOGRAPH + {0x948F, 0x62CD}, //2848 #CJK UNIFIED IDEOGRAPH + {0x9490, 0x67CF}, //2849 #CJK UNIFIED IDEOGRAPH + {0x9491, 0x6CCA}, //2850 #CJK UNIFIED IDEOGRAPH + {0x9492, 0x767D}, //2851 #CJK UNIFIED IDEOGRAPH + {0x9493, 0x7B94}, //2852 #CJK UNIFIED IDEOGRAPH + {0x9494, 0x7C95}, //2853 #CJK UNIFIED IDEOGRAPH + {0x9495, 0x8236}, //2854 #CJK UNIFIED IDEOGRAPH + {0x9496, 0x8584}, //2855 #CJK UNIFIED IDEOGRAPH + {0x9497, 0x8FEB}, //2856 #CJK UNIFIED IDEOGRAPH + {0x9498, 0x66DD}, //2857 #CJK UNIFIED IDEOGRAPH + {0x9499, 0x6F20}, //2858 #CJK UNIFIED IDEOGRAPH + {0x949A, 0x7206}, //2859 #CJK UNIFIED IDEOGRAPH + {0x949B, 0x7E1B}, //2860 #CJK UNIFIED IDEOGRAPH + {0x949C, 0x83AB}, //2861 #CJK UNIFIED IDEOGRAPH + {0x949D, 0x99C1}, //2862 #CJK UNIFIED IDEOGRAPH + {0x949E, 0x9EA6}, //2863 #CJK UNIFIED IDEOGRAPH + {0x949F, 0x51FD}, //2864 #CJK UNIFIED IDEOGRAPH + {0x94A0, 0x7BB1}, //2865 #CJK UNIFIED IDEOGRAPH + {0x94A1, 0x7872}, //2866 #CJK UNIFIED IDEOGRAPH + {0x94A2, 0x7BB8}, //2867 #CJK UNIFIED IDEOGRAPH + {0x94A3, 0x8087}, //2868 #CJK UNIFIED IDEOGRAPH + {0x94A4, 0x7B48}, //2869 #CJK UNIFIED IDEOGRAPH + {0x94A5, 0x6AE8}, //2870 #CJK UNIFIED IDEOGRAPH + {0x94A6, 0x5E61}, //2871 #CJK UNIFIED IDEOGRAPH + {0x94A7, 0x808C}, //2872 #CJK UNIFIED IDEOGRAPH + {0x94A8, 0x7551}, //2873 #CJK UNIFIED IDEOGRAPH + {0x94A9, 0x7560}, //2874 #CJK UNIFIED IDEOGRAPH + {0x94AA, 0x516B}, //2875 #CJK UNIFIED IDEOGRAPH + {0x94AB, 0x9262}, //2876 #CJK UNIFIED IDEOGRAPH + {0x94AC, 0x6E8C}, //2877 #CJK UNIFIED IDEOGRAPH + {0x94AD, 0x767A}, //2878 #CJK UNIFIED IDEOGRAPH + {0x94AE, 0x9197}, //2879 #CJK UNIFIED IDEOGRAPH + {0x94AF, 0x9AEA}, //2880 #CJK UNIFIED IDEOGRAPH + {0x94B0, 0x4F10}, //2881 #CJK UNIFIED IDEOGRAPH + {0x94B1, 0x7F70}, //2882 #CJK UNIFIED IDEOGRAPH + {0x94B2, 0x629C}, //2883 #CJK UNIFIED IDEOGRAPH + {0x94B3, 0x7B4F}, //2884 #CJK UNIFIED IDEOGRAPH + {0x94B4, 0x95A5}, //2885 #CJK UNIFIED IDEOGRAPH + {0x94B5, 0x9CE9}, //2886 #CJK UNIFIED IDEOGRAPH + {0x94B6, 0x567A}, //2887 #CJK UNIFIED IDEOGRAPH + {0x94B7, 0x5859}, //2888 #CJK UNIFIED IDEOGRAPH + {0x94B8, 0x86E4}, //2889 #CJK UNIFIED IDEOGRAPH + {0x94B9, 0x96BC}, //2890 #CJK UNIFIED IDEOGRAPH + {0x94BA, 0x4F34}, //2891 #CJK UNIFIED IDEOGRAPH + {0x94BB, 0x5224}, //2892 #CJK UNIFIED IDEOGRAPH + {0x94BC, 0x534A}, //2893 #CJK UNIFIED IDEOGRAPH + {0x94BD, 0x53CD}, //2894 #CJK UNIFIED IDEOGRAPH + {0x94BE, 0x53DB}, //2895 #CJK UNIFIED IDEOGRAPH + {0x94BF, 0x5E06}, //2896 #CJK UNIFIED IDEOGRAPH + {0x94C0, 0x642C}, //2897 #CJK UNIFIED IDEOGRAPH + {0x94C1, 0x6591}, //2898 #CJK UNIFIED IDEOGRAPH + {0x94C2, 0x677F}, //2899 #CJK UNIFIED IDEOGRAPH + {0x94C3, 0x6C3E}, //2900 #CJK UNIFIED IDEOGRAPH + {0x94C4, 0x6C4E}, //2901 #CJK UNIFIED IDEOGRAPH + {0x94C5, 0x7248}, //2902 #CJK UNIFIED IDEOGRAPH + {0x94C6, 0x72AF}, //2903 #CJK UNIFIED IDEOGRAPH + {0x94C7, 0x73ED}, //2904 #CJK UNIFIED IDEOGRAPH + {0x94C8, 0x7554}, //2905 #CJK UNIFIED IDEOGRAPH + {0x94C9, 0x7E41}, //2906 #CJK UNIFIED IDEOGRAPH + {0x94CA, 0x822C}, //2907 #CJK UNIFIED IDEOGRAPH + {0x94CB, 0x85E9}, //2908 #CJK UNIFIED IDEOGRAPH + {0x94CC, 0x8CA9}, //2909 #CJK UNIFIED IDEOGRAPH + {0x94CD, 0x7BC4}, //2910 #CJK UNIFIED IDEOGRAPH + {0x94CE, 0x91C6}, //2911 #CJK UNIFIED IDEOGRAPH + {0x94CF, 0x7169}, //2912 #CJK UNIFIED IDEOGRAPH + {0x94D0, 0x9812}, //2913 #CJK UNIFIED IDEOGRAPH + {0x94D1, 0x98EF}, //2914 #CJK UNIFIED IDEOGRAPH + {0x94D2, 0x633D}, //2915 #CJK UNIFIED IDEOGRAPH + {0x94D3, 0x6669}, //2916 #CJK UNIFIED IDEOGRAPH + {0x94D4, 0x756A}, //2917 #CJK UNIFIED IDEOGRAPH + {0x94D5, 0x76E4}, //2918 #CJK UNIFIED IDEOGRAPH + {0x94D6, 0x78D0}, //2919 #CJK UNIFIED IDEOGRAPH + {0x94D7, 0x8543}, //2920 #CJK UNIFIED IDEOGRAPH + {0x94D8, 0x86EE}, //2921 #CJK UNIFIED IDEOGRAPH + {0x94D9, 0x532A}, //2922 #CJK UNIFIED IDEOGRAPH + {0x94DA, 0x5351}, //2923 #CJK UNIFIED IDEOGRAPH + {0x94DB, 0x5426}, //2924 #CJK UNIFIED IDEOGRAPH + {0x94DC, 0x5983}, //2925 #CJK UNIFIED IDEOGRAPH + {0x94DD, 0x5E87}, //2926 #CJK UNIFIED IDEOGRAPH + {0x94DE, 0x5F7C}, //2927 #CJK UNIFIED IDEOGRAPH + {0x94DF, 0x60B2}, //2928 #CJK UNIFIED IDEOGRAPH + {0x94E0, 0x6249}, //2929 #CJK UNIFIED IDEOGRAPH + {0x94E1, 0x6279}, //2930 #CJK UNIFIED IDEOGRAPH + {0x94E2, 0x62AB}, //2931 #CJK UNIFIED IDEOGRAPH + {0x94E3, 0x6590}, //2932 #CJK UNIFIED IDEOGRAPH + {0x94E4, 0x6BD4}, //2933 #CJK UNIFIED IDEOGRAPH + {0x94E5, 0x6CCC}, //2934 #CJK UNIFIED IDEOGRAPH + {0x94E6, 0x75B2}, //2935 #CJK UNIFIED IDEOGRAPH + {0x94E7, 0x76AE}, //2936 #CJK UNIFIED IDEOGRAPH + {0x94E8, 0x7891}, //2937 #CJK UNIFIED IDEOGRAPH + {0x94E9, 0x79D8}, //2938 #CJK UNIFIED IDEOGRAPH + {0x94EA, 0x7DCB}, //2939 #CJK UNIFIED IDEOGRAPH + {0x94EB, 0x7F77}, //2940 #CJK UNIFIED IDEOGRAPH + {0x94EC, 0x80A5}, //2941 #CJK UNIFIED IDEOGRAPH + {0x94ED, 0x88AB}, //2942 #CJK UNIFIED IDEOGRAPH + {0x94EE, 0x8AB9}, //2943 #CJK UNIFIED IDEOGRAPH + {0x94EF, 0x8CBB}, //2944 #CJK UNIFIED IDEOGRAPH + {0x94F0, 0x907F}, //2945 #CJK UNIFIED IDEOGRAPH + {0x94F1, 0x975E}, //2946 #CJK UNIFIED IDEOGRAPH + {0x94F2, 0x98DB}, //2947 #CJK UNIFIED IDEOGRAPH + {0x94F3, 0x6A0B}, //2948 #CJK UNIFIED IDEOGRAPH + {0x94F4, 0x7C38}, //2949 #CJK UNIFIED IDEOGRAPH + {0x94F5, 0x5099}, //2950 #CJK UNIFIED IDEOGRAPH + {0x94F6, 0x5C3E}, //2951 #CJK UNIFIED IDEOGRAPH + {0x94F7, 0x5FAE}, //2952 #CJK UNIFIED IDEOGRAPH + {0x94F8, 0x6787}, //2953 #CJK UNIFIED IDEOGRAPH + {0x94F9, 0x6BD8}, //2954 #CJK UNIFIED IDEOGRAPH + {0x94FA, 0x7435}, //2955 #CJK UNIFIED IDEOGRAPH + {0x94FB, 0x7709}, //2956 #CJK UNIFIED IDEOGRAPH + {0x94FC, 0x7F8E}, //2957 #CJK UNIFIED IDEOGRAPH + {0x9540, 0x9F3B}, //2958 #CJK UNIFIED IDEOGRAPH + {0x9541, 0x67CA}, //2959 #CJK UNIFIED IDEOGRAPH + {0x9542, 0x7A17}, //2960 #CJK UNIFIED IDEOGRAPH + {0x9543, 0x5339}, //2961 #CJK UNIFIED IDEOGRAPH + {0x9544, 0x758B}, //2962 #CJK UNIFIED IDEOGRAPH + {0x9545, 0x9AED}, //2963 #CJK UNIFIED IDEOGRAPH + {0x9546, 0x5F66}, //2964 #CJK UNIFIED IDEOGRAPH + {0x9547, 0x819D}, //2965 #CJK UNIFIED IDEOGRAPH + {0x9548, 0x83F1}, //2966 #CJK UNIFIED IDEOGRAPH + {0x9549, 0x8098}, //2967 #CJK UNIFIED IDEOGRAPH + {0x954A, 0x5F3C}, //2968 #CJK UNIFIED IDEOGRAPH + {0x954B, 0x5FC5}, //2969 #CJK UNIFIED IDEOGRAPH + {0x954C, 0x7562}, //2970 #CJK UNIFIED IDEOGRAPH + {0x954D, 0x7B46}, //2971 #CJK UNIFIED IDEOGRAPH + {0x954E, 0x903C}, //2972 #CJK UNIFIED IDEOGRAPH + {0x954F, 0x6867}, //2973 #CJK UNIFIED IDEOGRAPH + {0x9550, 0x59EB}, //2974 #CJK UNIFIED IDEOGRAPH + {0x9551, 0x5A9B}, //2975 #CJK UNIFIED IDEOGRAPH + {0x9552, 0x7D10}, //2976 #CJK UNIFIED IDEOGRAPH + {0x9553, 0x767E}, //2977 #CJK UNIFIED IDEOGRAPH + {0x9554, 0x8B2C}, //2978 #CJK UNIFIED IDEOGRAPH + {0x9555, 0x4FF5}, //2979 #CJK UNIFIED IDEOGRAPH + {0x9556, 0x5F6A}, //2980 #CJK UNIFIED IDEOGRAPH + {0x9557, 0x6A19}, //2981 #CJK UNIFIED IDEOGRAPH + {0x9558, 0x6C37}, //2982 #CJK UNIFIED IDEOGRAPH + {0x9559, 0x6F02}, //2983 #CJK UNIFIED IDEOGRAPH + {0x955A, 0x74E2}, //2984 #CJK UNIFIED IDEOGRAPH + {0x955B, 0x7968}, //2985 #CJK UNIFIED IDEOGRAPH + {0x955C, 0x8868}, //2986 #CJK UNIFIED IDEOGRAPH + {0x955D, 0x8A55}, //2987 #CJK UNIFIED IDEOGRAPH + {0x955E, 0x8C79}, //2988 #CJK UNIFIED IDEOGRAPH + {0x955F, 0x5EDF}, //2989 #CJK UNIFIED IDEOGRAPH + {0x9560, 0x63CF}, //2990 #CJK UNIFIED IDEOGRAPH + {0x9561, 0x75C5}, //2991 #CJK UNIFIED IDEOGRAPH + {0x9562, 0x79D2}, //2992 #CJK UNIFIED IDEOGRAPH + {0x9563, 0x82D7}, //2993 #CJK UNIFIED IDEOGRAPH + {0x9564, 0x9328}, //2994 #CJK UNIFIED IDEOGRAPH + {0x9565, 0x92F2}, //2995 #CJK UNIFIED IDEOGRAPH + {0x9566, 0x849C}, //2996 #CJK UNIFIED IDEOGRAPH + {0x9567, 0x86ED}, //2997 #CJK UNIFIED IDEOGRAPH + {0x9568, 0x9C2D}, //2998 #CJK UNIFIED IDEOGRAPH + {0x9569, 0x54C1}, //2999 #CJK UNIFIED IDEOGRAPH + {0x956A, 0x5F6C}, //3000 #CJK UNIFIED IDEOGRAPH + {0x956B, 0x658C}, //3001 #CJK UNIFIED IDEOGRAPH + {0x956C, 0x6D5C}, //3002 #CJK UNIFIED IDEOGRAPH + {0x956D, 0x7015}, //3003 #CJK UNIFIED IDEOGRAPH + {0x956E, 0x8CA7}, //3004 #CJK UNIFIED IDEOGRAPH + {0x956F, 0x8CD3}, //3005 #CJK UNIFIED IDEOGRAPH + {0x9570, 0x983B}, //3006 #CJK UNIFIED IDEOGRAPH + {0x9571, 0x654F}, //3007 #CJK UNIFIED IDEOGRAPH + {0x9572, 0x74F6}, //3008 #CJK UNIFIED IDEOGRAPH + {0x9573, 0x4E0D}, //3009 #CJK UNIFIED IDEOGRAPH + {0x9574, 0x4ED8}, //3010 #CJK UNIFIED IDEOGRAPH + {0x9575, 0x57E0}, //3011 #CJK UNIFIED IDEOGRAPH + {0x9576, 0x592B}, //3012 #CJK UNIFIED IDEOGRAPH + {0x9577, 0x5A66}, //3013 #CJK UNIFIED IDEOGRAPH + {0x9578, 0x5BCC}, //3014 #CJK UNIFIED IDEOGRAPH + {0x9579, 0x51A8}, //3015 #CJK UNIFIED IDEOGRAPH + {0x957A, 0x5E03}, //3016 #CJK UNIFIED IDEOGRAPH + {0x957B, 0x5E9C}, //3017 #CJK UNIFIED IDEOGRAPH + {0x957C, 0x6016}, //3018 #CJK UNIFIED IDEOGRAPH + {0x957D, 0x6276}, //3019 #CJK UNIFIED IDEOGRAPH + {0x957E, 0x6577}, //3020 #CJK UNIFIED IDEOGRAPH + {0x9580, 0x65A7}, //3021 #CJK UNIFIED IDEOGRAPH + {0x9581, 0x666E}, //3022 #CJK UNIFIED IDEOGRAPH + {0x9582, 0x6D6E}, //3023 #CJK UNIFIED IDEOGRAPH + {0x9583, 0x7236}, //3024 #CJK UNIFIED IDEOGRAPH + {0x9584, 0x7B26}, //3025 #CJK UNIFIED IDEOGRAPH + {0x9585, 0x8150}, //3026 #CJK UNIFIED IDEOGRAPH + {0x9586, 0x819A}, //3027 #CJK UNIFIED IDEOGRAPH + {0x9587, 0x8299}, //3028 #CJK UNIFIED IDEOGRAPH + {0x9588, 0x8B5C}, //3029 #CJK UNIFIED IDEOGRAPH + {0x9589, 0x8CA0}, //3030 #CJK UNIFIED IDEOGRAPH + {0x958A, 0x8CE6}, //3031 #CJK UNIFIED IDEOGRAPH + {0x958B, 0x8D74}, //3032 #CJK UNIFIED IDEOGRAPH + {0x958C, 0x961C}, //3033 #CJK UNIFIED IDEOGRAPH + {0x958D, 0x9644}, //3034 #CJK UNIFIED IDEOGRAPH + {0x958E, 0x4FAE}, //3035 #CJK UNIFIED IDEOGRAPH + {0x958F, 0x64AB}, //3036 #CJK UNIFIED IDEOGRAPH + {0x9590, 0x6B66}, //3037 #CJK UNIFIED IDEOGRAPH + {0x9591, 0x821E}, //3038 #CJK UNIFIED IDEOGRAPH + {0x9592, 0x8461}, //3039 #CJK UNIFIED IDEOGRAPH + {0x9593, 0x856A}, //3040 #CJK UNIFIED IDEOGRAPH + {0x9594, 0x90E8}, //3041 #CJK UNIFIED IDEOGRAPH + {0x9595, 0x5C01}, //3042 #CJK UNIFIED IDEOGRAPH + {0x9596, 0x6953}, //3043 #CJK UNIFIED IDEOGRAPH + {0x9597, 0x98A8}, //3044 #CJK UNIFIED IDEOGRAPH + {0x9598, 0x847A}, //3045 #CJK UNIFIED IDEOGRAPH + {0x9599, 0x8557}, //3046 #CJK UNIFIED IDEOGRAPH + {0x959A, 0x4F0F}, //3047 #CJK UNIFIED IDEOGRAPH + {0x959B, 0x526F}, //3048 #CJK UNIFIED IDEOGRAPH + {0x959C, 0x5FA9}, //3049 #CJK UNIFIED IDEOGRAPH + {0x959D, 0x5E45}, //3050 #CJK UNIFIED IDEOGRAPH + {0x959E, 0x670D}, //3051 #CJK UNIFIED IDEOGRAPH + {0x959F, 0x798F}, //3052 #CJK UNIFIED IDEOGRAPH + {0x95A0, 0x8179}, //3053 #CJK UNIFIED IDEOGRAPH + {0x95A1, 0x8907}, //3054 #CJK UNIFIED IDEOGRAPH + {0x95A2, 0x8986}, //3055 #CJK UNIFIED IDEOGRAPH + {0x95A3, 0x6DF5}, //3056 #CJK UNIFIED IDEOGRAPH + {0x95A4, 0x5F17}, //3057 #CJK UNIFIED IDEOGRAPH + {0x95A5, 0x6255}, //3058 #CJK UNIFIED IDEOGRAPH + {0x95A6, 0x6CB8}, //3059 #CJK UNIFIED IDEOGRAPH + {0x95A7, 0x4ECF}, //3060 #CJK UNIFIED IDEOGRAPH + {0x95A8, 0x7269}, //3061 #CJK UNIFIED IDEOGRAPH + {0x95A9, 0x9B92}, //3062 #CJK UNIFIED IDEOGRAPH + {0x95AA, 0x5206}, //3063 #CJK UNIFIED IDEOGRAPH + {0x95AB, 0x543B}, //3064 #CJK UNIFIED IDEOGRAPH + {0x95AC, 0x5674}, //3065 #CJK UNIFIED IDEOGRAPH + {0x95AD, 0x58B3}, //3066 #CJK UNIFIED IDEOGRAPH + {0x95AE, 0x61A4}, //3067 #CJK UNIFIED IDEOGRAPH + {0x95AF, 0x626E}, //3068 #CJK UNIFIED IDEOGRAPH + {0x95B0, 0x711A}, //3069 #CJK UNIFIED IDEOGRAPH + {0x95B1, 0x596E}, //3070 #CJK UNIFIED IDEOGRAPH + {0x95B2, 0x7C89}, //3071 #CJK UNIFIED IDEOGRAPH + {0x95B3, 0x7CDE}, //3072 #CJK UNIFIED IDEOGRAPH + {0x95B4, 0x7D1B}, //3073 #CJK UNIFIED IDEOGRAPH + {0x95B5, 0x96F0}, //3074 #CJK UNIFIED IDEOGRAPH + {0x95B6, 0x6587}, //3075 #CJK UNIFIED IDEOGRAPH + {0x95B7, 0x805E}, //3076 #CJK UNIFIED IDEOGRAPH + {0x95B8, 0x4E19}, //3077 #CJK UNIFIED IDEOGRAPH + {0x95B9, 0x4F75}, //3078 #CJK UNIFIED IDEOGRAPH + {0x95BA, 0x5175}, //3079 #CJK UNIFIED IDEOGRAPH + {0x95BB, 0x5840}, //3080 #CJK UNIFIED IDEOGRAPH + {0x95BC, 0x5E63}, //3081 #CJK UNIFIED IDEOGRAPH + {0x95BD, 0x5E73}, //3082 #CJK UNIFIED IDEOGRAPH + {0x95BE, 0x5F0A}, //3083 #CJK UNIFIED IDEOGRAPH + {0x95BF, 0x67C4}, //3084 #CJK UNIFIED IDEOGRAPH + {0x95C0, 0x4E26}, //3085 #CJK UNIFIED IDEOGRAPH + {0x95C1, 0x853D}, //3086 #CJK UNIFIED IDEOGRAPH + {0x95C2, 0x9589}, //3087 #CJK UNIFIED IDEOGRAPH + {0x95C3, 0x965B}, //3088 #CJK UNIFIED IDEOGRAPH + {0x95C4, 0x7C73}, //3089 #CJK UNIFIED IDEOGRAPH + {0x95C5, 0x9801}, //3090 #CJK UNIFIED IDEOGRAPH + {0x95C6, 0x50FB}, //3091 #CJK UNIFIED IDEOGRAPH + {0x95C7, 0x58C1}, //3092 #CJK UNIFIED IDEOGRAPH + {0x95C8, 0x7656}, //3093 #CJK UNIFIED IDEOGRAPH + {0x95C9, 0x78A7}, //3094 #CJK UNIFIED IDEOGRAPH + {0x95CA, 0x5225}, //3095 #CJK UNIFIED IDEOGRAPH + {0x95CB, 0x77A5}, //3096 #CJK UNIFIED IDEOGRAPH + {0x95CC, 0x8511}, //3097 #CJK UNIFIED IDEOGRAPH + {0x95CD, 0x7B86}, //3098 #CJK UNIFIED IDEOGRAPH + {0x95CE, 0x504F}, //3099 #CJK UNIFIED IDEOGRAPH + {0x95CF, 0x5909}, //3100 #CJK UNIFIED IDEOGRAPH + {0x95D0, 0x7247}, //3101 #CJK UNIFIED IDEOGRAPH + {0x95D1, 0x7BC7}, //3102 #CJK UNIFIED IDEOGRAPH + {0x95D2, 0x7DE8}, //3103 #CJK UNIFIED IDEOGRAPH + {0x95D3, 0x8FBA}, //3104 #CJK UNIFIED IDEOGRAPH + {0x95D4, 0x8FD4}, //3105 #CJK UNIFIED IDEOGRAPH + {0x95D5, 0x904D}, //3106 #CJK UNIFIED IDEOGRAPH + {0x95D6, 0x4FBF}, //3107 #CJK UNIFIED IDEOGRAPH + {0x95D7, 0x52C9}, //3108 #CJK UNIFIED IDEOGRAPH + {0x95D8, 0x5A29}, //3109 #CJK UNIFIED IDEOGRAPH + {0x95D9, 0x5F01}, //3110 #CJK UNIFIED IDEOGRAPH + {0x95DA, 0x97AD}, //3111 #CJK UNIFIED IDEOGRAPH + {0x95DB, 0x4FDD}, //3112 #CJK UNIFIED IDEOGRAPH + {0x95DC, 0x8217}, //3113 #CJK UNIFIED IDEOGRAPH + {0x95DD, 0x92EA}, //3114 #CJK UNIFIED IDEOGRAPH + {0x95DE, 0x5703}, //3115 #CJK UNIFIED IDEOGRAPH + {0x95DF, 0x6355}, //3116 #CJK UNIFIED IDEOGRAPH + {0x95E0, 0x6B69}, //3117 #CJK UNIFIED IDEOGRAPH + {0x95E1, 0x752B}, //3118 #CJK UNIFIED IDEOGRAPH + {0x95E2, 0x88DC}, //3119 #CJK UNIFIED IDEOGRAPH + {0x95E3, 0x8F14}, //3120 #CJK UNIFIED IDEOGRAPH + {0x95E4, 0x7A42}, //3121 #CJK UNIFIED IDEOGRAPH + {0x95E5, 0x52DF}, //3122 #CJK UNIFIED IDEOGRAPH + {0x95E6, 0x5893}, //3123 #CJK UNIFIED IDEOGRAPH + {0x95E7, 0x6155}, //3124 #CJK UNIFIED IDEOGRAPH + {0x95E8, 0x620A}, //3125 #CJK UNIFIED IDEOGRAPH + {0x95E9, 0x66AE}, //3126 #CJK UNIFIED IDEOGRAPH + {0x95EA, 0x6BCD}, //3127 #CJK UNIFIED IDEOGRAPH + {0x95EB, 0x7C3F}, //3128 #CJK UNIFIED IDEOGRAPH + {0x95EC, 0x83E9}, //3129 #CJK UNIFIED IDEOGRAPH + {0x95ED, 0x5023}, //3130 #CJK UNIFIED IDEOGRAPH + {0x95EE, 0x4FF8}, //3131 #CJK UNIFIED IDEOGRAPH + {0x95EF, 0x5305}, //3132 #CJK UNIFIED IDEOGRAPH + {0x95F0, 0x5446}, //3133 #CJK UNIFIED IDEOGRAPH + {0x95F1, 0x5831}, //3134 #CJK UNIFIED IDEOGRAPH + {0x95F2, 0x5949}, //3135 #CJK UNIFIED IDEOGRAPH + {0x95F3, 0x5B9D}, //3136 #CJK UNIFIED IDEOGRAPH + {0x95F4, 0x5CF0}, //3137 #CJK UNIFIED IDEOGRAPH + {0x95F5, 0x5CEF}, //3138 #CJK UNIFIED IDEOGRAPH + {0x95F6, 0x5D29}, //3139 #CJK UNIFIED IDEOGRAPH + {0x95F7, 0x5E96}, //3140 #CJK UNIFIED IDEOGRAPH + {0x95F8, 0x62B1}, //3141 #CJK UNIFIED IDEOGRAPH + {0x95F9, 0x6367}, //3142 #CJK UNIFIED IDEOGRAPH + {0x95FA, 0x653E}, //3143 #CJK UNIFIED IDEOGRAPH + {0x95FB, 0x65B9}, //3144 #CJK UNIFIED IDEOGRAPH + {0x95FC, 0x670B}, //3145 #CJK UNIFIED IDEOGRAPH + {0x9640, 0x6CD5}, //3146 #CJK UNIFIED IDEOGRAPH + {0x9641, 0x6CE1}, //3147 #CJK UNIFIED IDEOGRAPH + {0x9642, 0x70F9}, //3148 #CJK UNIFIED IDEOGRAPH + {0x9643, 0x7832}, //3149 #CJK UNIFIED IDEOGRAPH + {0x9644, 0x7E2B}, //3150 #CJK UNIFIED IDEOGRAPH + {0x9645, 0x80DE}, //3151 #CJK UNIFIED IDEOGRAPH + {0x9646, 0x82B3}, //3152 #CJK UNIFIED IDEOGRAPH + {0x9647, 0x840C}, //3153 #CJK UNIFIED IDEOGRAPH + {0x9648, 0x84EC}, //3154 #CJK UNIFIED IDEOGRAPH + {0x9649, 0x8702}, //3155 #CJK UNIFIED IDEOGRAPH + {0x964A, 0x8912}, //3156 #CJK UNIFIED IDEOGRAPH + {0x964B, 0x8A2A}, //3157 #CJK UNIFIED IDEOGRAPH + {0x964C, 0x8C4A}, //3158 #CJK UNIFIED IDEOGRAPH + {0x964D, 0x90A6}, //3159 #CJK UNIFIED IDEOGRAPH + {0x964E, 0x92D2}, //3160 #CJK UNIFIED IDEOGRAPH + {0x964F, 0x98FD}, //3161 #CJK UNIFIED IDEOGRAPH + {0x9650, 0x9CF3}, //3162 #CJK UNIFIED IDEOGRAPH + {0x9651, 0x9D6C}, //3163 #CJK UNIFIED IDEOGRAPH + {0x9652, 0x4E4F}, //3164 #CJK UNIFIED IDEOGRAPH + {0x9653, 0x4EA1}, //3165 #CJK UNIFIED IDEOGRAPH + {0x9654, 0x508D}, //3166 #CJK UNIFIED IDEOGRAPH + {0x9655, 0x5256}, //3167 #CJK UNIFIED IDEOGRAPH + {0x9656, 0x574A}, //3168 #CJK UNIFIED IDEOGRAPH + {0x9657, 0x59A8}, //3169 #CJK UNIFIED IDEOGRAPH + {0x9658, 0x5E3D}, //3170 #CJK UNIFIED IDEOGRAPH + {0x9659, 0x5FD8}, //3171 #CJK UNIFIED IDEOGRAPH + {0x965A, 0x5FD9}, //3172 #CJK UNIFIED IDEOGRAPH + {0x965B, 0x623F}, //3173 #CJK UNIFIED IDEOGRAPH + {0x965C, 0x66B4}, //3174 #CJK UNIFIED IDEOGRAPH + {0x965D, 0x671B}, //3175 #CJK UNIFIED IDEOGRAPH + {0x965E, 0x67D0}, //3176 #CJK UNIFIED IDEOGRAPH + {0x965F, 0x68D2}, //3177 #CJK UNIFIED IDEOGRAPH + {0x9660, 0x5192}, //3178 #CJK UNIFIED IDEOGRAPH + {0x9661, 0x7D21}, //3179 #CJK UNIFIED IDEOGRAPH + {0x9662, 0x80AA}, //3180 #CJK UNIFIED IDEOGRAPH + {0x9663, 0x81A8}, //3181 #CJK UNIFIED IDEOGRAPH + {0x9664, 0x8B00}, //3182 #CJK UNIFIED IDEOGRAPH + {0x9665, 0x8C8C}, //3183 #CJK UNIFIED IDEOGRAPH + {0x9666, 0x8CBF}, //3184 #CJK UNIFIED IDEOGRAPH + {0x9667, 0x927E}, //3185 #CJK UNIFIED IDEOGRAPH + {0x9668, 0x9632}, //3186 #CJK UNIFIED IDEOGRAPH + {0x9669, 0x5420}, //3187 #CJK UNIFIED IDEOGRAPH + {0x966A, 0x982C}, //3188 #CJK UNIFIED IDEOGRAPH + {0x966B, 0x5317}, //3189 #CJK UNIFIED IDEOGRAPH + {0x966C, 0x50D5}, //3190 #CJK UNIFIED IDEOGRAPH + {0x966D, 0x535C}, //3191 #CJK UNIFIED IDEOGRAPH + {0x966E, 0x58A8}, //3192 #CJK UNIFIED IDEOGRAPH + {0x966F, 0x64B2}, //3193 #CJK UNIFIED IDEOGRAPH + {0x9670, 0x6734}, //3194 #CJK UNIFIED IDEOGRAPH + {0x9671, 0x7267}, //3195 #CJK UNIFIED IDEOGRAPH + {0x9672, 0x7766}, //3196 #CJK UNIFIED IDEOGRAPH + {0x9673, 0x7A46}, //3197 #CJK UNIFIED IDEOGRAPH + {0x9674, 0x91E6}, //3198 #CJK UNIFIED IDEOGRAPH + {0x9675, 0x52C3}, //3199 #CJK UNIFIED IDEOGRAPH + {0x9676, 0x6CA1}, //3200 #CJK UNIFIED IDEOGRAPH + {0x9677, 0x6B86}, //3201 #CJK UNIFIED IDEOGRAPH + {0x9678, 0x5800}, //3202 #CJK UNIFIED IDEOGRAPH + {0x9679, 0x5E4C}, //3203 #CJK UNIFIED IDEOGRAPH + {0x967A, 0x5954}, //3204 #CJK UNIFIED IDEOGRAPH + {0x967B, 0x672C}, //3205 #CJK UNIFIED IDEOGRAPH + {0x967C, 0x7FFB}, //3206 #CJK UNIFIED IDEOGRAPH + {0x967D, 0x51E1}, //3207 #CJK UNIFIED IDEOGRAPH + {0x967E, 0x76C6}, //3208 #CJK UNIFIED IDEOGRAPH + {0x9680, 0x6469}, //3209 #CJK UNIFIED IDEOGRAPH + {0x9681, 0x78E8}, //3210 #CJK UNIFIED IDEOGRAPH + {0x9682, 0x9B54}, //3211 #CJK UNIFIED IDEOGRAPH + {0x9683, 0x9EBB}, //3212 #CJK UNIFIED IDEOGRAPH + {0x9684, 0x57CB}, //3213 #CJK UNIFIED IDEOGRAPH + {0x9685, 0x59B9}, //3214 #CJK UNIFIED IDEOGRAPH + {0x9686, 0x6627}, //3215 #CJK UNIFIED IDEOGRAPH + {0x9687, 0x679A}, //3216 #CJK UNIFIED IDEOGRAPH + {0x9688, 0x6BCE}, //3217 #CJK UNIFIED IDEOGRAPH + {0x9689, 0x54E9}, //3218 #CJK UNIFIED IDEOGRAPH + {0x968A, 0x69D9}, //3219 #CJK UNIFIED IDEOGRAPH + {0x968B, 0x5E55}, //3220 #CJK UNIFIED IDEOGRAPH + {0x968C, 0x819C}, //3221 #CJK UNIFIED IDEOGRAPH + {0x968D, 0x6795}, //3222 #CJK UNIFIED IDEOGRAPH + {0x968E, 0x9BAA}, //3223 #CJK UNIFIED IDEOGRAPH + {0x968F, 0x67FE}, //3224 #CJK UNIFIED IDEOGRAPH + {0x9690, 0x9C52}, //3225 #CJK UNIFIED IDEOGRAPH + {0x9691, 0x685D}, //3226 #CJK UNIFIED IDEOGRAPH + {0x9692, 0x4EA6}, //3227 #CJK UNIFIED IDEOGRAPH + {0x9693, 0x4FE3}, //3228 #CJK UNIFIED IDEOGRAPH + {0x9694, 0x53C8}, //3229 #CJK UNIFIED IDEOGRAPH + {0x9695, 0x62B9}, //3230 #CJK UNIFIED IDEOGRAPH + {0x9696, 0x672B}, //3231 #CJK UNIFIED IDEOGRAPH + {0x9697, 0x6CAB}, //3232 #CJK UNIFIED IDEOGRAPH + {0x9698, 0x8FC4}, //3233 #CJK UNIFIED IDEOGRAPH + {0x9699, 0x4FAD}, //3234 #CJK UNIFIED IDEOGRAPH + {0x969A, 0x7E6D}, //3235 #CJK UNIFIED IDEOGRAPH + {0x969B, 0x9EBF}, //3236 #CJK UNIFIED IDEOGRAPH + {0x969C, 0x4E07}, //3237 #CJK UNIFIED IDEOGRAPH + {0x969D, 0x6162}, //3238 #CJK UNIFIED IDEOGRAPH + {0x969E, 0x6E80}, //3239 #CJK UNIFIED IDEOGRAPH + {0x969F, 0x6F2B}, //3240 #CJK UNIFIED IDEOGRAPH + {0x96A0, 0x8513}, //3241 #CJK UNIFIED IDEOGRAPH + {0x96A1, 0x5473}, //3242 #CJK UNIFIED IDEOGRAPH + {0x96A2, 0x672A}, //3243 #CJK UNIFIED IDEOGRAPH + {0x96A3, 0x9B45}, //3244 #CJK UNIFIED IDEOGRAPH + {0x96A4, 0x5DF3}, //3245 #CJK UNIFIED IDEOGRAPH + {0x96A5, 0x7B95}, //3246 #CJK UNIFIED IDEOGRAPH + {0x96A6, 0x5CAC}, //3247 #CJK UNIFIED IDEOGRAPH + {0x96A7, 0x5BC6}, //3248 #CJK UNIFIED IDEOGRAPH + {0x96A8, 0x871C}, //3249 #CJK UNIFIED IDEOGRAPH + {0x96A9, 0x6E4A}, //3250 #CJK UNIFIED IDEOGRAPH + {0x96AA, 0x84D1}, //3251 #CJK UNIFIED IDEOGRAPH + {0x96AB, 0x7A14}, //3252 #CJK UNIFIED IDEOGRAPH + {0x96AC, 0x8108}, //3253 #CJK UNIFIED IDEOGRAPH + {0x96AD, 0x5999}, //3254 #CJK UNIFIED IDEOGRAPH + {0x96AE, 0x7C8D}, //3255 #CJK UNIFIED IDEOGRAPH + {0x96AF, 0x6C11}, //3256 #CJK UNIFIED IDEOGRAPH + {0x96B0, 0x7720}, //3257 #CJK UNIFIED IDEOGRAPH + {0x96B1, 0x52D9}, //3258 #CJK UNIFIED IDEOGRAPH + {0x96B2, 0x5922}, //3259 #CJK UNIFIED IDEOGRAPH + {0x96B3, 0x7121}, //3260 #CJK UNIFIED IDEOGRAPH + {0x96B4, 0x725F}, //3261 #CJK UNIFIED IDEOGRAPH + {0x96B5, 0x77DB}, //3262 #CJK UNIFIED IDEOGRAPH + {0x96B6, 0x9727}, //3263 #CJK UNIFIED IDEOGRAPH + {0x96B7, 0x9D61}, //3264 #CJK UNIFIED IDEOGRAPH + {0x96B8, 0x690B}, //3265 #CJK UNIFIED IDEOGRAPH + {0x96B9, 0x5A7F}, //3266 #CJK UNIFIED IDEOGRAPH + {0x96BA, 0x5A18}, //3267 #CJK UNIFIED IDEOGRAPH + {0x96BB, 0x51A5}, //3268 #CJK UNIFIED IDEOGRAPH + {0x96BC, 0x540D}, //3269 #CJK UNIFIED IDEOGRAPH + {0x96BD, 0x547D}, //3270 #CJK UNIFIED IDEOGRAPH + {0x96BE, 0x660E}, //3271 #CJK UNIFIED IDEOGRAPH + {0x96BF, 0x76DF}, //3272 #CJK UNIFIED IDEOGRAPH + {0x96C0, 0x8FF7}, //3273 #CJK UNIFIED IDEOGRAPH + {0x96C1, 0x9298}, //3274 #CJK UNIFIED IDEOGRAPH + {0x96C2, 0x9CF4}, //3275 #CJK UNIFIED IDEOGRAPH + {0x96C3, 0x59EA}, //3276 #CJK UNIFIED IDEOGRAPH + {0x96C4, 0x725D}, //3277 #CJK UNIFIED IDEOGRAPH + {0x96C5, 0x6EC5}, //3278 #CJK UNIFIED IDEOGRAPH + {0x96C6, 0x514D}, //3279 #CJK UNIFIED IDEOGRAPH + {0x96C7, 0x68C9}, //3280 #CJK UNIFIED IDEOGRAPH + {0x96C8, 0x7DBF}, //3281 #CJK UNIFIED IDEOGRAPH + {0x96C9, 0x7DEC}, //3282 #CJK UNIFIED IDEOGRAPH + {0x96CA, 0x9762}, //3283 #CJK UNIFIED IDEOGRAPH + {0x96CB, 0x9EBA}, //3284 #CJK UNIFIED IDEOGRAPH + {0x96CC, 0x6478}, //3285 #CJK UNIFIED IDEOGRAPH + {0x96CD, 0x6A21}, //3286 #CJK UNIFIED IDEOGRAPH + {0x96CE, 0x8302}, //3287 #CJK UNIFIED IDEOGRAPH + {0x96CF, 0x5984}, //3288 #CJK UNIFIED IDEOGRAPH + {0x96D0, 0x5B5F}, //3289 #CJK UNIFIED IDEOGRAPH + {0x96D1, 0x6BDB}, //3290 #CJK UNIFIED IDEOGRAPH + {0x96D2, 0x731B}, //3291 #CJK UNIFIED IDEOGRAPH + {0x96D3, 0x76F2}, //3292 #CJK UNIFIED IDEOGRAPH + {0x96D4, 0x7DB2}, //3293 #CJK UNIFIED IDEOGRAPH + {0x96D5, 0x8017}, //3294 #CJK UNIFIED IDEOGRAPH + {0x96D6, 0x8499}, //3295 #CJK UNIFIED IDEOGRAPH + {0x96D7, 0x5132}, //3296 #CJK UNIFIED IDEOGRAPH + {0x96D8, 0x6728}, //3297 #CJK UNIFIED IDEOGRAPH + {0x96D9, 0x9ED9}, //3298 #CJK UNIFIED IDEOGRAPH + {0x96DA, 0x76EE}, //3299 #CJK UNIFIED IDEOGRAPH + {0x96DB, 0x6762}, //3300 #CJK UNIFIED IDEOGRAPH + {0x96DC, 0x52FF}, //3301 #CJK UNIFIED IDEOGRAPH + {0x96DD, 0x9905}, //3302 #CJK UNIFIED IDEOGRAPH + {0x96DE, 0x5C24}, //3303 #CJK UNIFIED IDEOGRAPH + {0x96DF, 0x623B}, //3304 #CJK UNIFIED IDEOGRAPH + {0x96E0, 0x7C7E}, //3305 #CJK UNIFIED IDEOGRAPH + {0x96E1, 0x8CB0}, //3306 #CJK UNIFIED IDEOGRAPH + {0x96E2, 0x554F}, //3307 #CJK UNIFIED IDEOGRAPH + {0x96E3, 0x60B6}, //3308 #CJK UNIFIED IDEOGRAPH + {0x96E4, 0x7D0B}, //3309 #CJK UNIFIED IDEOGRAPH + {0x96E5, 0x9580}, //3310 #CJK UNIFIED IDEOGRAPH + {0x96E6, 0x5301}, //3311 #CJK UNIFIED IDEOGRAPH + {0x96E7, 0x4E5F}, //3312 #CJK UNIFIED IDEOGRAPH + {0x96E8, 0x51B6}, //3313 #CJK UNIFIED IDEOGRAPH + {0x96E9, 0x591C}, //3314 #CJK UNIFIED IDEOGRAPH + {0x96EA, 0x723A}, //3315 #CJK UNIFIED IDEOGRAPH + {0x96EB, 0x8036}, //3316 #CJK UNIFIED IDEOGRAPH + {0x96EC, 0x91CE}, //3317 #CJK UNIFIED IDEOGRAPH + {0x96ED, 0x5F25}, //3318 #CJK UNIFIED IDEOGRAPH + {0x96EE, 0x77E2}, //3319 #CJK UNIFIED IDEOGRAPH + {0x96EF, 0x5384}, //3320 #CJK UNIFIED IDEOGRAPH + {0x96F0, 0x5F79}, //3321 #CJK UNIFIED IDEOGRAPH + {0x96F1, 0x7D04}, //3322 #CJK UNIFIED IDEOGRAPH + {0x96F2, 0x85AC}, //3323 #CJK UNIFIED IDEOGRAPH + {0x96F3, 0x8A33}, //3324 #CJK UNIFIED IDEOGRAPH + {0x96F4, 0x8E8D}, //3325 #CJK UNIFIED IDEOGRAPH + {0x96F5, 0x9756}, //3326 #CJK UNIFIED IDEOGRAPH + {0x96F6, 0x67F3}, //3327 #CJK UNIFIED IDEOGRAPH + {0x96F7, 0x85AE}, //3328 #CJK UNIFIED IDEOGRAPH + {0x96F8, 0x9453}, //3329 #CJK UNIFIED IDEOGRAPH + {0x96F9, 0x6109}, //3330 #CJK UNIFIED IDEOGRAPH + {0x96FA, 0x6108}, //3331 #CJK UNIFIED IDEOGRAPH + {0x96FB, 0x6CB9}, //3332 #CJK UNIFIED IDEOGRAPH + {0x96FC, 0x7652}, //3333 #CJK UNIFIED IDEOGRAPH + {0x9740, 0x8AED}, //3334 #CJK UNIFIED IDEOGRAPH + {0x9741, 0x8F38}, //3335 #CJK UNIFIED IDEOGRAPH + {0x9742, 0x552F}, //3336 #CJK UNIFIED IDEOGRAPH + {0x9743, 0x4F51}, //3337 #CJK UNIFIED IDEOGRAPH + {0x9744, 0x512A}, //3338 #CJK UNIFIED IDEOGRAPH + {0x9745, 0x52C7}, //3339 #CJK UNIFIED IDEOGRAPH + {0x9746, 0x53CB}, //3340 #CJK UNIFIED IDEOGRAPH + {0x9747, 0x5BA5}, //3341 #CJK UNIFIED IDEOGRAPH + {0x9748, 0x5E7D}, //3342 #CJK UNIFIED IDEOGRAPH + {0x9749, 0x60A0}, //3343 #CJK UNIFIED IDEOGRAPH + {0x974A, 0x6182}, //3344 #CJK UNIFIED IDEOGRAPH + {0x974B, 0x63D6}, //3345 #CJK UNIFIED IDEOGRAPH + {0x974C, 0x6709}, //3346 #CJK UNIFIED IDEOGRAPH + {0x974D, 0x67DA}, //3347 #CJK UNIFIED IDEOGRAPH + {0x974E, 0x6E67}, //3348 #CJK UNIFIED IDEOGRAPH + {0x974F, 0x6D8C}, //3349 #CJK UNIFIED IDEOGRAPH + {0x9750, 0x7336}, //3350 #CJK UNIFIED IDEOGRAPH + {0x9751, 0x7337}, //3351 #CJK UNIFIED IDEOGRAPH + {0x9752, 0x7531}, //3352 #CJK UNIFIED IDEOGRAPH + {0x9753, 0x7950}, //3353 #CJK UNIFIED IDEOGRAPH + {0x9754, 0x88D5}, //3354 #CJK UNIFIED IDEOGRAPH + {0x9755, 0x8A98}, //3355 #CJK UNIFIED IDEOGRAPH + {0x9756, 0x904A}, //3356 #CJK UNIFIED IDEOGRAPH + {0x9757, 0x9091}, //3357 #CJK UNIFIED IDEOGRAPH + {0x9758, 0x90F5}, //3358 #CJK UNIFIED IDEOGRAPH + {0x9759, 0x96C4}, //3359 #CJK UNIFIED IDEOGRAPH + {0x975A, 0x878D}, //3360 #CJK UNIFIED IDEOGRAPH + {0x975B, 0x5915}, //3361 #CJK UNIFIED IDEOGRAPH + {0x975C, 0x4E88}, //3362 #CJK UNIFIED IDEOGRAPH + {0x975D, 0x4F59}, //3363 #CJK UNIFIED IDEOGRAPH + {0x975E, 0x4E0E}, //3364 #CJK UNIFIED IDEOGRAPH + {0x975F, 0x8A89}, //3365 #CJK UNIFIED IDEOGRAPH + {0x9760, 0x8F3F}, //3366 #CJK UNIFIED IDEOGRAPH + {0x9761, 0x9810}, //3367 #CJK UNIFIED IDEOGRAPH + {0x9762, 0x50AD}, //3368 #CJK UNIFIED IDEOGRAPH + {0x9763, 0x5E7C}, //3369 #CJK UNIFIED IDEOGRAPH + {0x9764, 0x5996}, //3370 #CJK UNIFIED IDEOGRAPH + {0x9765, 0x5BB9}, //3371 #CJK UNIFIED IDEOGRAPH + {0x9766, 0x5EB8}, //3372 #CJK UNIFIED IDEOGRAPH + {0x9767, 0x63DA}, //3373 #CJK UNIFIED IDEOGRAPH + {0x9768, 0x63FA}, //3374 #CJK UNIFIED IDEOGRAPH + {0x9769, 0x64C1}, //3375 #CJK UNIFIED IDEOGRAPH + {0x976A, 0x66DC}, //3376 #CJK UNIFIED IDEOGRAPH + {0x976B, 0x694A}, //3377 #CJK UNIFIED IDEOGRAPH + {0x976C, 0x69D8}, //3378 #CJK UNIFIED IDEOGRAPH + {0x976D, 0x6D0B}, //3379 #CJK UNIFIED IDEOGRAPH + {0x976E, 0x6EB6}, //3380 #CJK UNIFIED IDEOGRAPH + {0x976F, 0x7194}, //3381 #CJK UNIFIED IDEOGRAPH + {0x9770, 0x7528}, //3382 #CJK UNIFIED IDEOGRAPH + {0x9771, 0x7AAF}, //3383 #CJK UNIFIED IDEOGRAPH + {0x9772, 0x7F8A}, //3384 #CJK UNIFIED IDEOGRAPH + {0x9773, 0x8000}, //3385 #CJK UNIFIED IDEOGRAPH + {0x9774, 0x8449}, //3386 #CJK UNIFIED IDEOGRAPH + {0x9775, 0x84C9}, //3387 #CJK UNIFIED IDEOGRAPH + {0x9776, 0x8981}, //3388 #CJK UNIFIED IDEOGRAPH + {0x9777, 0x8B21}, //3389 #CJK UNIFIED IDEOGRAPH + {0x9778, 0x8E0A}, //3390 #CJK UNIFIED IDEOGRAPH + {0x9779, 0x9065}, //3391 #CJK UNIFIED IDEOGRAPH + {0x977A, 0x967D}, //3392 #CJK UNIFIED IDEOGRAPH + {0x977B, 0x990A}, //3393 #CJK UNIFIED IDEOGRAPH + {0x977C, 0x617E}, //3394 #CJK UNIFIED IDEOGRAPH + {0x977D, 0x6291}, //3395 #CJK UNIFIED IDEOGRAPH + {0x977E, 0x6B32}, //3396 #CJK UNIFIED IDEOGRAPH + {0x9780, 0x6C83}, //3397 #CJK UNIFIED IDEOGRAPH + {0x9781, 0x6D74}, //3398 #CJK UNIFIED IDEOGRAPH + {0x9782, 0x7FCC}, //3399 #CJK UNIFIED IDEOGRAPH + {0x9783, 0x7FFC}, //3400 #CJK UNIFIED IDEOGRAPH + {0x9784, 0x6DC0}, //3401 #CJK UNIFIED IDEOGRAPH + {0x9785, 0x7F85}, //3402 #CJK UNIFIED IDEOGRAPH + {0x9786, 0x87BA}, //3403 #CJK UNIFIED IDEOGRAPH + {0x9787, 0x88F8}, //3404 #CJK UNIFIED IDEOGRAPH + {0x9788, 0x6765}, //3405 #CJK UNIFIED IDEOGRAPH + {0x9789, 0x83B1}, //3406 #CJK UNIFIED IDEOGRAPH + {0x978A, 0x983C}, //3407 #CJK UNIFIED IDEOGRAPH + {0x978B, 0x96F7}, //3408 #CJK UNIFIED IDEOGRAPH + {0x978C, 0x6D1B}, //3409 #CJK UNIFIED IDEOGRAPH + {0x978D, 0x7D61}, //3410 #CJK UNIFIED IDEOGRAPH + {0x978E, 0x843D}, //3411 #CJK UNIFIED IDEOGRAPH + {0x978F, 0x916A}, //3412 #CJK UNIFIED IDEOGRAPH + {0x9790, 0x4E71}, //3413 #CJK UNIFIED IDEOGRAPH + {0x9791, 0x5375}, //3414 #CJK UNIFIED IDEOGRAPH + {0x9792, 0x5D50}, //3415 #CJK UNIFIED IDEOGRAPH + {0x9793, 0x6B04}, //3416 #CJK UNIFIED IDEOGRAPH + {0x9794, 0x6FEB}, //3417 #CJK UNIFIED IDEOGRAPH + {0x9795, 0x85CD}, //3418 #CJK UNIFIED IDEOGRAPH + {0x9796, 0x862D}, //3419 #CJK UNIFIED IDEOGRAPH + {0x9797, 0x89A7}, //3420 #CJK UNIFIED IDEOGRAPH + {0x9798, 0x5229}, //3421 #CJK UNIFIED IDEOGRAPH + {0x9799, 0x540F}, //3422 #CJK UNIFIED IDEOGRAPH + {0x979A, 0x5C65}, //3423 #CJK UNIFIED IDEOGRAPH + {0x979B, 0x674E}, //3424 #CJK UNIFIED IDEOGRAPH + {0x979C, 0x68A8}, //3425 #CJK UNIFIED IDEOGRAPH + {0x979D, 0x7406}, //3426 #CJK UNIFIED IDEOGRAPH + {0x979E, 0x7483}, //3427 #CJK UNIFIED IDEOGRAPH + {0x979F, 0x75E2}, //3428 #CJK UNIFIED IDEOGRAPH + {0x97A0, 0x88CF}, //3429 #CJK UNIFIED IDEOGRAPH + {0x97A1, 0x88E1}, //3430 #CJK UNIFIED IDEOGRAPH + {0x97A2, 0x91CC}, //3431 #CJK UNIFIED IDEOGRAPH + {0x97A3, 0x96E2}, //3432 #CJK UNIFIED IDEOGRAPH + {0x97A4, 0x9678}, //3433 #CJK UNIFIED IDEOGRAPH + {0x97A5, 0x5F8B}, //3434 #CJK UNIFIED IDEOGRAPH + {0x97A6, 0x7387}, //3435 #CJK UNIFIED IDEOGRAPH + {0x97A7, 0x7ACB}, //3436 #CJK UNIFIED IDEOGRAPH + {0x97A8, 0x844E}, //3437 #CJK UNIFIED IDEOGRAPH + {0x97A9, 0x63A0}, //3438 #CJK UNIFIED IDEOGRAPH + {0x97AA, 0x7565}, //3439 #CJK UNIFIED IDEOGRAPH + {0x97AB, 0x5289}, //3440 #CJK UNIFIED IDEOGRAPH + {0x97AC, 0x6D41}, //3441 #CJK UNIFIED IDEOGRAPH + {0x97AD, 0x6E9C}, //3442 #CJK UNIFIED IDEOGRAPH + {0x97AE, 0x7409}, //3443 #CJK UNIFIED IDEOGRAPH + {0x97AF, 0x7559}, //3444 #CJK UNIFIED IDEOGRAPH + {0x97B0, 0x786B}, //3445 #CJK UNIFIED IDEOGRAPH + {0x97B1, 0x7C92}, //3446 #CJK UNIFIED IDEOGRAPH + {0x97B2, 0x9686}, //3447 #CJK UNIFIED IDEOGRAPH + {0x97B3, 0x7ADC}, //3448 #CJK UNIFIED IDEOGRAPH + {0x97B4, 0x9F8D}, //3449 #CJK UNIFIED IDEOGRAPH + {0x97B5, 0x4FB6}, //3450 #CJK UNIFIED IDEOGRAPH + {0x97B6, 0x616E}, //3451 #CJK UNIFIED IDEOGRAPH + {0x97B7, 0x65C5}, //3452 #CJK UNIFIED IDEOGRAPH + {0x97B8, 0x865C}, //3453 #CJK UNIFIED IDEOGRAPH + {0x97B9, 0x4E86}, //3454 #CJK UNIFIED IDEOGRAPH + {0x97BA, 0x4EAE}, //3455 #CJK UNIFIED IDEOGRAPH + {0x97BB, 0x50DA}, //3456 #CJK UNIFIED IDEOGRAPH + {0x97BC, 0x4E21}, //3457 #CJK UNIFIED IDEOGRAPH + {0x97BD, 0x51CC}, //3458 #CJK UNIFIED IDEOGRAPH + {0x97BE, 0x5BEE}, //3459 #CJK UNIFIED IDEOGRAPH + {0x97BF, 0x6599}, //3460 #CJK UNIFIED IDEOGRAPH + {0x97C0, 0x6881}, //3461 #CJK UNIFIED IDEOGRAPH + {0x97C1, 0x6DBC}, //3462 #CJK UNIFIED IDEOGRAPH + {0x97C2, 0x731F}, //3463 #CJK UNIFIED IDEOGRAPH + {0x97C3, 0x7642}, //3464 #CJK UNIFIED IDEOGRAPH + {0x97C4, 0x77AD}, //3465 #CJK UNIFIED IDEOGRAPH + {0x97C5, 0x7A1C}, //3466 #CJK UNIFIED IDEOGRAPH + {0x97C6, 0x7CE7}, //3467 #CJK UNIFIED IDEOGRAPH + {0x97C7, 0x826F}, //3468 #CJK UNIFIED IDEOGRAPH + {0x97C8, 0x8AD2}, //3469 #CJK UNIFIED IDEOGRAPH + {0x97C9, 0x907C}, //3470 #CJK UNIFIED IDEOGRAPH + {0x97CA, 0x91CF}, //3471 #CJK UNIFIED IDEOGRAPH + {0x97CB, 0x9675}, //3472 #CJK UNIFIED IDEOGRAPH + {0x97CC, 0x9818}, //3473 #CJK UNIFIED IDEOGRAPH + {0x97CD, 0x529B}, //3474 #CJK UNIFIED IDEOGRAPH + {0x97CE, 0x7DD1}, //3475 #CJK UNIFIED IDEOGRAPH + {0x97CF, 0x502B}, //3476 #CJK UNIFIED IDEOGRAPH + {0x97D0, 0x5398}, //3477 #CJK UNIFIED IDEOGRAPH + {0x97D1, 0x6797}, //3478 #CJK UNIFIED IDEOGRAPH + {0x97D2, 0x6DCB}, //3479 #CJK UNIFIED IDEOGRAPH + {0x97D3, 0x71D0}, //3480 #CJK UNIFIED IDEOGRAPH + {0x97D4, 0x7433}, //3481 #CJK UNIFIED IDEOGRAPH + {0x97D5, 0x81E8}, //3482 #CJK UNIFIED IDEOGRAPH + {0x97D6, 0x8F2A}, //3483 #CJK UNIFIED IDEOGRAPH + {0x97D7, 0x96A3}, //3484 #CJK UNIFIED IDEOGRAPH + {0x97D8, 0x9C57}, //3485 #CJK UNIFIED IDEOGRAPH + {0x97D9, 0x9E9F}, //3486 #CJK UNIFIED IDEOGRAPH + {0x97DA, 0x7460}, //3487 #CJK UNIFIED IDEOGRAPH + {0x97DB, 0x5841}, //3488 #CJK UNIFIED IDEOGRAPH + {0x97DC, 0x6D99}, //3489 #CJK UNIFIED IDEOGRAPH + {0x97DD, 0x7D2F}, //3490 #CJK UNIFIED IDEOGRAPH + {0x97DE, 0x985E}, //3491 #CJK UNIFIED IDEOGRAPH + {0x97DF, 0x4EE4}, //3492 #CJK UNIFIED IDEOGRAPH + {0x97E0, 0x4F36}, //3493 #CJK UNIFIED IDEOGRAPH + {0x97E1, 0x4F8B}, //3494 #CJK UNIFIED IDEOGRAPH + {0x97E2, 0x51B7}, //3495 #CJK UNIFIED IDEOGRAPH + {0x97E3, 0x52B1}, //3496 #CJK UNIFIED IDEOGRAPH + {0x97E4, 0x5DBA}, //3497 #CJK UNIFIED IDEOGRAPH + {0x97E5, 0x601C}, //3498 #CJK UNIFIED IDEOGRAPH + {0x97E6, 0x73B2}, //3499 #CJK UNIFIED IDEOGRAPH + {0x97E7, 0x793C}, //3500 #CJK UNIFIED IDEOGRAPH + {0x97E8, 0x82D3}, //3501 #CJK UNIFIED IDEOGRAPH + {0x97E9, 0x9234}, //3502 #CJK UNIFIED IDEOGRAPH + {0x97EA, 0x96B7}, //3503 #CJK UNIFIED IDEOGRAPH + {0x97EB, 0x96F6}, //3504 #CJK UNIFIED IDEOGRAPH + {0x97EC, 0x970A}, //3505 #CJK UNIFIED IDEOGRAPH + {0x97ED, 0x9E97}, //3506 #CJK UNIFIED IDEOGRAPH + {0x97EE, 0x9F62}, //3507 #CJK UNIFIED IDEOGRAPH + {0x97EF, 0x66A6}, //3508 #CJK UNIFIED IDEOGRAPH + {0x97F0, 0x6B74}, //3509 #CJK UNIFIED IDEOGRAPH + {0x97F1, 0x5217}, //3510 #CJK UNIFIED IDEOGRAPH + {0x97F2, 0x52A3}, //3511 #CJK UNIFIED IDEOGRAPH + {0x97F3, 0x70C8}, //3512 #CJK UNIFIED IDEOGRAPH + {0x97F4, 0x88C2}, //3513 #CJK UNIFIED IDEOGRAPH + {0x97F5, 0x5EC9}, //3514 #CJK UNIFIED IDEOGRAPH + {0x97F6, 0x604B}, //3515 #CJK UNIFIED IDEOGRAPH + {0x97F7, 0x6190}, //3516 #CJK UNIFIED IDEOGRAPH + {0x97F8, 0x6F23}, //3517 #CJK UNIFIED IDEOGRAPH + {0x97F9, 0x7149}, //3518 #CJK UNIFIED IDEOGRAPH + {0x97FA, 0x7C3E}, //3519 #CJK UNIFIED IDEOGRAPH + {0x97FB, 0x7DF4}, //3520 #CJK UNIFIED IDEOGRAPH + {0x97FC, 0x806F}, //3521 #CJK UNIFIED IDEOGRAPH + {0x9840, 0x84EE}, //3522 #CJK UNIFIED IDEOGRAPH + {0x9841, 0x9023}, //3523 #CJK UNIFIED IDEOGRAPH + {0x9842, 0x932C}, //3524 #CJK UNIFIED IDEOGRAPH + {0x9843, 0x5442}, //3525 #CJK UNIFIED IDEOGRAPH + {0x9844, 0x9B6F}, //3526 #CJK UNIFIED IDEOGRAPH + {0x9845, 0x6AD3}, //3527 #CJK UNIFIED IDEOGRAPH + {0x9846, 0x7089}, //3528 #CJK UNIFIED IDEOGRAPH + {0x9847, 0x8CC2}, //3529 #CJK UNIFIED IDEOGRAPH + {0x9848, 0x8DEF}, //3530 #CJK UNIFIED IDEOGRAPH + {0x9849, 0x9732}, //3531 #CJK UNIFIED IDEOGRAPH + {0x984A, 0x52B4}, //3532 #CJK UNIFIED IDEOGRAPH + {0x984B, 0x5A41}, //3533 #CJK UNIFIED IDEOGRAPH + {0x984C, 0x5ECA}, //3534 #CJK UNIFIED IDEOGRAPH + {0x984D, 0x5F04}, //3535 #CJK UNIFIED IDEOGRAPH + {0x984E, 0x6717}, //3536 #CJK UNIFIED IDEOGRAPH + {0x984F, 0x697C}, //3537 #CJK UNIFIED IDEOGRAPH + {0x9850, 0x6994}, //3538 #CJK UNIFIED IDEOGRAPH + {0x9851, 0x6D6A}, //3539 #CJK UNIFIED IDEOGRAPH + {0x9852, 0x6F0F}, //3540 #CJK UNIFIED IDEOGRAPH + {0x9853, 0x7262}, //3541 #CJK UNIFIED IDEOGRAPH + {0x9854, 0x72FC}, //3542 #CJK UNIFIED IDEOGRAPH + {0x9855, 0x7BED}, //3543 #CJK UNIFIED IDEOGRAPH + {0x9856, 0x8001}, //3544 #CJK UNIFIED IDEOGRAPH + {0x9857, 0x807E}, //3545 #CJK UNIFIED IDEOGRAPH + {0x9858, 0x874B}, //3546 #CJK UNIFIED IDEOGRAPH + {0x9859, 0x90CE}, //3547 #CJK UNIFIED IDEOGRAPH + {0x985A, 0x516D}, //3548 #CJK UNIFIED IDEOGRAPH + {0x985B, 0x9E93}, //3549 #CJK UNIFIED IDEOGRAPH + {0x985C, 0x7984}, //3550 #CJK UNIFIED IDEOGRAPH + {0x985D, 0x808B}, //3551 #CJK UNIFIED IDEOGRAPH + {0x985E, 0x9332}, //3552 #CJK UNIFIED IDEOGRAPH + {0x985F, 0x8AD6}, //3553 #CJK UNIFIED IDEOGRAPH + {0x9860, 0x502D}, //3554 #CJK UNIFIED IDEOGRAPH + {0x9861, 0x548C}, //3555 #CJK UNIFIED IDEOGRAPH + {0x9862, 0x8A71}, //3556 #CJK UNIFIED IDEOGRAPH + {0x9863, 0x6B6A}, //3557 #CJK UNIFIED IDEOGRAPH + {0x9864, 0x8CC4}, //3558 #CJK UNIFIED IDEOGRAPH + {0x9865, 0x8107}, //3559 #CJK UNIFIED IDEOGRAPH + {0x9866, 0x60D1}, //3560 #CJK UNIFIED IDEOGRAPH + {0x9867, 0x67A0}, //3561 #CJK UNIFIED IDEOGRAPH + {0x9868, 0x9DF2}, //3562 #CJK UNIFIED IDEOGRAPH + {0x9869, 0x4E99}, //3563 #CJK UNIFIED IDEOGRAPH + {0x986A, 0x4E98}, //3564 #CJK UNIFIED IDEOGRAPH + {0x986B, 0x9C10}, //3565 #CJK UNIFIED IDEOGRAPH + {0x986C, 0x8A6B}, //3566 #CJK UNIFIED IDEOGRAPH + {0x986D, 0x85C1}, //3567 #CJK UNIFIED IDEOGRAPH + {0x986E, 0x8568}, //3568 #CJK UNIFIED IDEOGRAPH + {0x986F, 0x6900}, //3569 #CJK UNIFIED IDEOGRAPH + {0x9870, 0x6E7E}, //3570 #CJK UNIFIED IDEOGRAPH + {0x9871, 0x7897}, //3571 #CJK UNIFIED IDEOGRAPH + {0x9872, 0x8155}, //3572 #CJK UNIFIED IDEOGRAPH + {0x989F, 0x5F0C}, //3573 #CJK UNIFIED IDEOGRAPH + {0x98A0, 0x4E10}, //3574 #CJK UNIFIED IDEOGRAPH + {0x98A1, 0x4E15}, //3575 #CJK UNIFIED IDEOGRAPH + {0x98A2, 0x4E2A}, //3576 #CJK UNIFIED IDEOGRAPH + {0x98A3, 0x4E31}, //3577 #CJK UNIFIED IDEOGRAPH + {0x98A4, 0x4E36}, //3578 #CJK UNIFIED IDEOGRAPH + {0x98A5, 0x4E3C}, //3579 #CJK UNIFIED IDEOGRAPH + {0x98A6, 0x4E3F}, //3580 #CJK UNIFIED IDEOGRAPH + {0x98A7, 0x4E42}, //3581 #CJK UNIFIED IDEOGRAPH + {0x98A8, 0x4E56}, //3582 #CJK UNIFIED IDEOGRAPH + {0x98A9, 0x4E58}, //3583 #CJK UNIFIED IDEOGRAPH + {0x98AA, 0x4E82}, //3584 #CJK UNIFIED IDEOGRAPH + {0x98AB, 0x4E85}, //3585 #CJK UNIFIED IDEOGRAPH + {0x98AC, 0x8C6B}, //3586 #CJK UNIFIED IDEOGRAPH + {0x98AD, 0x4E8A}, //3587 #CJK UNIFIED IDEOGRAPH + {0x98AE, 0x8212}, //3588 #CJK UNIFIED IDEOGRAPH + {0x98AF, 0x5F0D}, //3589 #CJK UNIFIED IDEOGRAPH + {0x98B0, 0x4E8E}, //3590 #CJK UNIFIED IDEOGRAPH + {0x98B1, 0x4E9E}, //3591 #CJK UNIFIED IDEOGRAPH + {0x98B2, 0x4E9F}, //3592 #CJK UNIFIED IDEOGRAPH + {0x98B3, 0x4EA0}, //3593 #CJK UNIFIED IDEOGRAPH + {0x98B4, 0x4EA2}, //3594 #CJK UNIFIED IDEOGRAPH + {0x98B5, 0x4EB0}, //3595 #CJK UNIFIED IDEOGRAPH + {0x98B6, 0x4EB3}, //3596 #CJK UNIFIED IDEOGRAPH + {0x98B7, 0x4EB6}, //3597 #CJK UNIFIED IDEOGRAPH + {0x98B8, 0x4ECE}, //3598 #CJK UNIFIED IDEOGRAPH + {0x98B9, 0x4ECD}, //3599 #CJK UNIFIED IDEOGRAPH + {0x98BA, 0x4EC4}, //3600 #CJK UNIFIED IDEOGRAPH + {0x98BB, 0x4EC6}, //3601 #CJK UNIFIED IDEOGRAPH + {0x98BC, 0x4EC2}, //3602 #CJK UNIFIED IDEOGRAPH + {0x98BD, 0x4ED7}, //3603 #CJK UNIFIED IDEOGRAPH + {0x98BE, 0x4EDE}, //3604 #CJK UNIFIED IDEOGRAPH + {0x98BF, 0x4EED}, //3605 #CJK UNIFIED IDEOGRAPH + {0x98C0, 0x4EDF}, //3606 #CJK UNIFIED IDEOGRAPH + {0x98C1, 0x4EF7}, //3607 #CJK UNIFIED IDEOGRAPH + {0x98C2, 0x4F09}, //3608 #CJK UNIFIED IDEOGRAPH + {0x98C3, 0x4F5A}, //3609 #CJK UNIFIED IDEOGRAPH + {0x98C4, 0x4F30}, //3610 #CJK UNIFIED IDEOGRAPH + {0x98C5, 0x4F5B}, //3611 #CJK UNIFIED IDEOGRAPH + {0x98C6, 0x4F5D}, //3612 #CJK UNIFIED IDEOGRAPH + {0x98C7, 0x4F57}, //3613 #CJK UNIFIED IDEOGRAPH + {0x98C8, 0x4F47}, //3614 #CJK UNIFIED IDEOGRAPH + {0x98C9, 0x4F76}, //3615 #CJK UNIFIED IDEOGRAPH + {0x98CA, 0x4F88}, //3616 #CJK UNIFIED IDEOGRAPH + {0x98CB, 0x4F8F}, //3617 #CJK UNIFIED IDEOGRAPH + {0x98CC, 0x4F98}, //3618 #CJK UNIFIED IDEOGRAPH + {0x98CD, 0x4F7B}, //3619 #CJK UNIFIED IDEOGRAPH + {0x98CE, 0x4F69}, //3620 #CJK UNIFIED IDEOGRAPH + {0x98CF, 0x4F70}, //3621 #CJK UNIFIED IDEOGRAPH + {0x98D0, 0x4F91}, //3622 #CJK UNIFIED IDEOGRAPH + {0x98D1, 0x4F6F}, //3623 #CJK UNIFIED IDEOGRAPH + {0x98D2, 0x4F86}, //3624 #CJK UNIFIED IDEOGRAPH + {0x98D3, 0x4F96}, //3625 #CJK UNIFIED IDEOGRAPH + {0x98D4, 0x5118}, //3626 #CJK UNIFIED IDEOGRAPH + {0x98D5, 0x4FD4}, //3627 #CJK UNIFIED IDEOGRAPH + {0x98D6, 0x4FDF}, //3628 #CJK UNIFIED IDEOGRAPH + {0x98D7, 0x4FCE}, //3629 #CJK UNIFIED IDEOGRAPH + {0x98D8, 0x4FD8}, //3630 #CJK UNIFIED IDEOGRAPH + {0x98D9, 0x4FDB}, //3631 #CJK UNIFIED IDEOGRAPH + {0x98DA, 0x4FD1}, //3632 #CJK UNIFIED IDEOGRAPH + {0x98DB, 0x4FDA}, //3633 #CJK UNIFIED IDEOGRAPH + {0x98DC, 0x4FD0}, //3634 #CJK UNIFIED IDEOGRAPH + {0x98DD, 0x4FE4}, //3635 #CJK UNIFIED IDEOGRAPH + {0x98DE, 0x4FE5}, //3636 #CJK UNIFIED IDEOGRAPH + {0x98DF, 0x501A}, //3637 #CJK UNIFIED IDEOGRAPH + {0x98E0, 0x5028}, //3638 #CJK UNIFIED IDEOGRAPH + {0x98E1, 0x5014}, //3639 #CJK UNIFIED IDEOGRAPH + {0x98E2, 0x502A}, //3640 #CJK UNIFIED IDEOGRAPH + {0x98E3, 0x5025}, //3641 #CJK UNIFIED IDEOGRAPH + {0x98E4, 0x5005}, //3642 #CJK UNIFIED IDEOGRAPH + {0x98E5, 0x4F1C}, //3643 #CJK UNIFIED IDEOGRAPH + {0x98E6, 0x4FF6}, //3644 #CJK UNIFIED IDEOGRAPH + {0x98E7, 0x5021}, //3645 #CJK UNIFIED IDEOGRAPH + {0x98E8, 0x5029}, //3646 #CJK UNIFIED IDEOGRAPH + {0x98E9, 0x502C}, //3647 #CJK UNIFIED IDEOGRAPH + {0x98EA, 0x4FFE}, //3648 #CJK UNIFIED IDEOGRAPH + {0x98EB, 0x4FEF}, //3649 #CJK UNIFIED IDEOGRAPH + {0x98EC, 0x5011}, //3650 #CJK UNIFIED IDEOGRAPH + {0x98ED, 0x5006}, //3651 #CJK UNIFIED IDEOGRAPH + {0x98EE, 0x5043}, //3652 #CJK UNIFIED IDEOGRAPH + {0x98EF, 0x5047}, //3653 #CJK UNIFIED IDEOGRAPH + {0x98F0, 0x6703}, //3654 #CJK UNIFIED IDEOGRAPH + {0x98F1, 0x5055}, //3655 #CJK UNIFIED IDEOGRAPH + {0x98F2, 0x5050}, //3656 #CJK UNIFIED IDEOGRAPH + {0x98F3, 0x5048}, //3657 #CJK UNIFIED IDEOGRAPH + {0x98F4, 0x505A}, //3658 #CJK UNIFIED IDEOGRAPH + {0x98F5, 0x5056}, //3659 #CJK UNIFIED IDEOGRAPH + {0x98F6, 0x506C}, //3660 #CJK UNIFIED IDEOGRAPH + {0x98F7, 0x5078}, //3661 #CJK UNIFIED IDEOGRAPH + {0x98F8, 0x5080}, //3662 #CJK UNIFIED IDEOGRAPH + {0x98F9, 0x509A}, //3663 #CJK UNIFIED IDEOGRAPH + {0x98FA, 0x5085}, //3664 #CJK UNIFIED IDEOGRAPH + {0x98FB, 0x50B4}, //3665 #CJK UNIFIED IDEOGRAPH + {0x98FC, 0x50B2}, //3666 #CJK UNIFIED IDEOGRAPH + {0x9940, 0x50C9}, //3667 #CJK UNIFIED IDEOGRAPH + {0x9941, 0x50CA}, //3668 #CJK UNIFIED IDEOGRAPH + {0x9942, 0x50B3}, //3669 #CJK UNIFIED IDEOGRAPH + {0x9943, 0x50C2}, //3670 #CJK UNIFIED IDEOGRAPH + {0x9944, 0x50D6}, //3671 #CJK UNIFIED IDEOGRAPH + {0x9945, 0x50DE}, //3672 #CJK UNIFIED IDEOGRAPH + {0x9946, 0x50E5}, //3673 #CJK UNIFIED IDEOGRAPH + {0x9947, 0x50ED}, //3674 #CJK UNIFIED IDEOGRAPH + {0x9948, 0x50E3}, //3675 #CJK UNIFIED IDEOGRAPH + {0x9949, 0x50EE}, //3676 #CJK UNIFIED IDEOGRAPH + {0x994A, 0x50F9}, //3677 #CJK UNIFIED IDEOGRAPH + {0x994B, 0x50F5}, //3678 #CJK UNIFIED IDEOGRAPH + {0x994C, 0x5109}, //3679 #CJK UNIFIED IDEOGRAPH + {0x994D, 0x5101}, //3680 #CJK UNIFIED IDEOGRAPH + {0x994E, 0x5102}, //3681 #CJK UNIFIED IDEOGRAPH + {0x994F, 0x5116}, //3682 #CJK UNIFIED IDEOGRAPH + {0x9950, 0x5115}, //3683 #CJK UNIFIED IDEOGRAPH + {0x9951, 0x5114}, //3684 #CJK UNIFIED IDEOGRAPH + {0x9952, 0x511A}, //3685 #CJK UNIFIED IDEOGRAPH + {0x9953, 0x5121}, //3686 #CJK UNIFIED IDEOGRAPH + {0x9954, 0x513A}, //3687 #CJK UNIFIED IDEOGRAPH + {0x9955, 0x5137}, //3688 #CJK UNIFIED IDEOGRAPH + {0x9956, 0x513C}, //3689 #CJK UNIFIED IDEOGRAPH + {0x9957, 0x513B}, //3690 #CJK UNIFIED IDEOGRAPH + {0x9958, 0x513F}, //3691 #CJK UNIFIED IDEOGRAPH + {0x9959, 0x5140}, //3692 #CJK UNIFIED IDEOGRAPH + {0x995A, 0x5152}, //3693 #CJK UNIFIED IDEOGRAPH + {0x995B, 0x514C}, //3694 #CJK UNIFIED IDEOGRAPH + {0x995C, 0x5154}, //3695 #CJK UNIFIED IDEOGRAPH + {0x995D, 0x5162}, //3696 #CJK UNIFIED IDEOGRAPH + {0x995E, 0x7AF8}, //3697 #CJK UNIFIED IDEOGRAPH + {0x995F, 0x5169}, //3698 #CJK UNIFIED IDEOGRAPH + {0x9960, 0x516A}, //3699 #CJK UNIFIED IDEOGRAPH + {0x9961, 0x516E}, //3700 #CJK UNIFIED IDEOGRAPH + {0x9962, 0x5180}, //3701 #CJK UNIFIED IDEOGRAPH + {0x9963, 0x5182}, //3702 #CJK UNIFIED IDEOGRAPH + {0x9964, 0x56D8}, //3703 #CJK UNIFIED IDEOGRAPH + {0x9965, 0x518C}, //3704 #CJK UNIFIED IDEOGRAPH + {0x9966, 0x5189}, //3705 #CJK UNIFIED IDEOGRAPH + {0x9967, 0x518F}, //3706 #CJK UNIFIED IDEOGRAPH + {0x9968, 0x5191}, //3707 #CJK UNIFIED IDEOGRAPH + {0x9969, 0x5193}, //3708 #CJK UNIFIED IDEOGRAPH + {0x996A, 0x5195}, //3709 #CJK UNIFIED IDEOGRAPH + {0x996B, 0x5196}, //3710 #CJK UNIFIED IDEOGRAPH + {0x996C, 0x51A4}, //3711 #CJK UNIFIED IDEOGRAPH + {0x996D, 0x51A6}, //3712 #CJK UNIFIED IDEOGRAPH + {0x996E, 0x51A2}, //3713 #CJK UNIFIED IDEOGRAPH + {0x996F, 0x51A9}, //3714 #CJK UNIFIED IDEOGRAPH + {0x9970, 0x51AA}, //3715 #CJK UNIFIED IDEOGRAPH + {0x9971, 0x51AB}, //3716 #CJK UNIFIED IDEOGRAPH + {0x9972, 0x51B3}, //3717 #CJK UNIFIED IDEOGRAPH + {0x9973, 0x51B1}, //3718 #CJK UNIFIED IDEOGRAPH + {0x9974, 0x51B2}, //3719 #CJK UNIFIED IDEOGRAPH + {0x9975, 0x51B0}, //3720 #CJK UNIFIED IDEOGRAPH + {0x9976, 0x51B5}, //3721 #CJK UNIFIED IDEOGRAPH + {0x9977, 0x51BD}, //3722 #CJK UNIFIED IDEOGRAPH + {0x9978, 0x51C5}, //3723 #CJK UNIFIED IDEOGRAPH + {0x9979, 0x51C9}, //3724 #CJK UNIFIED IDEOGRAPH + {0x997A, 0x51DB}, //3725 #CJK UNIFIED IDEOGRAPH + {0x997B, 0x51E0}, //3726 #CJK UNIFIED IDEOGRAPH + {0x997C, 0x8655}, //3727 #CJK UNIFIED IDEOGRAPH + {0x997D, 0x51E9}, //3728 #CJK UNIFIED IDEOGRAPH + {0x997E, 0x51ED}, //3729 #CJK UNIFIED IDEOGRAPH + {0x9980, 0x51F0}, //3730 #CJK UNIFIED IDEOGRAPH + {0x9981, 0x51F5}, //3731 #CJK UNIFIED IDEOGRAPH + {0x9982, 0x51FE}, //3732 #CJK UNIFIED IDEOGRAPH + {0x9983, 0x5204}, //3733 #CJK UNIFIED IDEOGRAPH + {0x9984, 0x520B}, //3734 #CJK UNIFIED IDEOGRAPH + {0x9985, 0x5214}, //3735 #CJK UNIFIED IDEOGRAPH + {0x9986, 0x520E}, //3736 #CJK UNIFIED IDEOGRAPH + {0x9987, 0x5227}, //3737 #CJK UNIFIED IDEOGRAPH + {0x9988, 0x522A}, //3738 #CJK UNIFIED IDEOGRAPH + {0x9989, 0x522E}, //3739 #CJK UNIFIED IDEOGRAPH + {0x998A, 0x5233}, //3740 #CJK UNIFIED IDEOGRAPH + {0x998B, 0x5239}, //3741 #CJK UNIFIED IDEOGRAPH + {0x998C, 0x524F}, //3742 #CJK UNIFIED IDEOGRAPH + {0x998D, 0x5244}, //3743 #CJK UNIFIED IDEOGRAPH + {0x998E, 0x524B}, //3744 #CJK UNIFIED IDEOGRAPH + {0x998F, 0x524C}, //3745 #CJK UNIFIED IDEOGRAPH + {0x9990, 0x525E}, //3746 #CJK UNIFIED IDEOGRAPH + {0x9991, 0x5254}, //3747 #CJK UNIFIED IDEOGRAPH + {0x9992, 0x526A}, //3748 #CJK UNIFIED IDEOGRAPH + {0x9993, 0x5274}, //3749 #CJK UNIFIED IDEOGRAPH + {0x9994, 0x5269}, //3750 #CJK UNIFIED IDEOGRAPH + {0x9995, 0x5273}, //3751 #CJK UNIFIED IDEOGRAPH + {0x9996, 0x527F}, //3752 #CJK UNIFIED IDEOGRAPH + {0x9997, 0x527D}, //3753 #CJK UNIFIED IDEOGRAPH + {0x9998, 0x528D}, //3754 #CJK UNIFIED IDEOGRAPH + {0x9999, 0x5294}, //3755 #CJK UNIFIED IDEOGRAPH + {0x999A, 0x5292}, //3756 #CJK UNIFIED IDEOGRAPH + {0x999B, 0x5271}, //3757 #CJK UNIFIED IDEOGRAPH + {0x999C, 0x5288}, //3758 #CJK UNIFIED IDEOGRAPH + {0x999D, 0x5291}, //3759 #CJK UNIFIED IDEOGRAPH + {0x999E, 0x8FA8}, //3760 #CJK UNIFIED IDEOGRAPH + {0x999F, 0x8FA7}, //3761 #CJK UNIFIED IDEOGRAPH + {0x99A0, 0x52AC}, //3762 #CJK UNIFIED IDEOGRAPH + {0x99A1, 0x52AD}, //3763 #CJK UNIFIED IDEOGRAPH + {0x99A2, 0x52BC}, //3764 #CJK UNIFIED IDEOGRAPH + {0x99A3, 0x52B5}, //3765 #CJK UNIFIED IDEOGRAPH + {0x99A4, 0x52C1}, //3766 #CJK UNIFIED IDEOGRAPH + {0x99A5, 0x52CD}, //3767 #CJK UNIFIED IDEOGRAPH + {0x99A6, 0x52D7}, //3768 #CJK UNIFIED IDEOGRAPH + {0x99A7, 0x52DE}, //3769 #CJK UNIFIED IDEOGRAPH + {0x99A8, 0x52E3}, //3770 #CJK UNIFIED IDEOGRAPH + {0x99A9, 0x52E6}, //3771 #CJK UNIFIED IDEOGRAPH + {0x99AA, 0x98ED}, //3772 #CJK UNIFIED IDEOGRAPH + {0x99AB, 0x52E0}, //3773 #CJK UNIFIED IDEOGRAPH + {0x99AC, 0x52F3}, //3774 #CJK UNIFIED IDEOGRAPH + {0x99AD, 0x52F5}, //3775 #CJK UNIFIED IDEOGRAPH + {0x99AE, 0x52F8}, //3776 #CJK UNIFIED IDEOGRAPH + {0x99AF, 0x52F9}, //3777 #CJK UNIFIED IDEOGRAPH + {0x99B0, 0x5306}, //3778 #CJK UNIFIED IDEOGRAPH + {0x99B1, 0x5308}, //3779 #CJK UNIFIED IDEOGRAPH + {0x99B2, 0x7538}, //3780 #CJK UNIFIED IDEOGRAPH + {0x99B3, 0x530D}, //3781 #CJK UNIFIED IDEOGRAPH + {0x99B4, 0x5310}, //3782 #CJK UNIFIED IDEOGRAPH + {0x99B5, 0x530F}, //3783 #CJK UNIFIED IDEOGRAPH + {0x99B6, 0x5315}, //3784 #CJK UNIFIED IDEOGRAPH + {0x99B7, 0x531A}, //3785 #CJK UNIFIED IDEOGRAPH + {0x99B8, 0x5323}, //3786 #CJK UNIFIED IDEOGRAPH + {0x99B9, 0x532F}, //3787 #CJK UNIFIED IDEOGRAPH + {0x99BA, 0x5331}, //3788 #CJK UNIFIED IDEOGRAPH + {0x99BB, 0x5333}, //3789 #CJK UNIFIED IDEOGRAPH + {0x99BC, 0x5338}, //3790 #CJK UNIFIED IDEOGRAPH + {0x99BD, 0x5340}, //3791 #CJK UNIFIED IDEOGRAPH + {0x99BE, 0x5346}, //3792 #CJK UNIFIED IDEOGRAPH + {0x99BF, 0x5345}, //3793 #CJK UNIFIED IDEOGRAPH + {0x99C0, 0x4E17}, //3794 #CJK UNIFIED IDEOGRAPH + {0x99C1, 0x5349}, //3795 #CJK UNIFIED IDEOGRAPH + {0x99C2, 0x534D}, //3796 #CJK UNIFIED IDEOGRAPH + {0x99C3, 0x51D6}, //3797 #CJK UNIFIED IDEOGRAPH + {0x99C4, 0x535E}, //3798 #CJK UNIFIED IDEOGRAPH + {0x99C5, 0x5369}, //3799 #CJK UNIFIED IDEOGRAPH + {0x99C6, 0x536E}, //3800 #CJK UNIFIED IDEOGRAPH + {0x99C7, 0x5918}, //3801 #CJK UNIFIED IDEOGRAPH + {0x99C8, 0x537B}, //3802 #CJK UNIFIED IDEOGRAPH + {0x99C9, 0x5377}, //3803 #CJK UNIFIED IDEOGRAPH + {0x99CA, 0x5382}, //3804 #CJK UNIFIED IDEOGRAPH + {0x99CB, 0x5396}, //3805 #CJK UNIFIED IDEOGRAPH + {0x99CC, 0x53A0}, //3806 #CJK UNIFIED IDEOGRAPH + {0x99CD, 0x53A6}, //3807 #CJK UNIFIED IDEOGRAPH + {0x99CE, 0x53A5}, //3808 #CJK UNIFIED IDEOGRAPH + {0x99CF, 0x53AE}, //3809 #CJK UNIFIED IDEOGRAPH + {0x99D0, 0x53B0}, //3810 #CJK UNIFIED IDEOGRAPH + {0x99D1, 0x53B6}, //3811 #CJK UNIFIED IDEOGRAPH + {0x99D2, 0x53C3}, //3812 #CJK UNIFIED IDEOGRAPH + {0x99D3, 0x7C12}, //3813 #CJK UNIFIED IDEOGRAPH + {0x99D4, 0x96D9}, //3814 #CJK UNIFIED IDEOGRAPH + {0x99D5, 0x53DF}, //3815 #CJK UNIFIED IDEOGRAPH + {0x99D6, 0x66FC}, //3816 #CJK UNIFIED IDEOGRAPH + {0x99D7, 0x71EE}, //3817 #CJK UNIFIED IDEOGRAPH + {0x99D8, 0x53EE}, //3818 #CJK UNIFIED IDEOGRAPH + {0x99D9, 0x53E8}, //3819 #CJK UNIFIED IDEOGRAPH + {0x99DA, 0x53ED}, //3820 #CJK UNIFIED IDEOGRAPH + {0x99DB, 0x53FA}, //3821 #CJK UNIFIED IDEOGRAPH + {0x99DC, 0x5401}, //3822 #CJK UNIFIED IDEOGRAPH + {0x99DD, 0x543D}, //3823 #CJK UNIFIED IDEOGRAPH + {0x99DE, 0x5440}, //3824 #CJK UNIFIED IDEOGRAPH + {0x99DF, 0x542C}, //3825 #CJK UNIFIED IDEOGRAPH + {0x99E0, 0x542D}, //3826 #CJK UNIFIED IDEOGRAPH + {0x99E1, 0x543C}, //3827 #CJK UNIFIED IDEOGRAPH + {0x99E2, 0x542E}, //3828 #CJK UNIFIED IDEOGRAPH + {0x99E3, 0x5436}, //3829 #CJK UNIFIED IDEOGRAPH + {0x99E4, 0x5429}, //3830 #CJK UNIFIED IDEOGRAPH + {0x99E5, 0x541D}, //3831 #CJK UNIFIED IDEOGRAPH + {0x99E6, 0x544E}, //3832 #CJK UNIFIED IDEOGRAPH + {0x99E7, 0x548F}, //3833 #CJK UNIFIED IDEOGRAPH + {0x99E8, 0x5475}, //3834 #CJK UNIFIED IDEOGRAPH + {0x99E9, 0x548E}, //3835 #CJK UNIFIED IDEOGRAPH + {0x99EA, 0x545F}, //3836 #CJK UNIFIED IDEOGRAPH + {0x99EB, 0x5471}, //3837 #CJK UNIFIED IDEOGRAPH + {0x99EC, 0x5477}, //3838 #CJK UNIFIED IDEOGRAPH + {0x99ED, 0x5470}, //3839 #CJK UNIFIED IDEOGRAPH + {0x99EE, 0x5492}, //3840 #CJK UNIFIED IDEOGRAPH + {0x99EF, 0x547B}, //3841 #CJK UNIFIED IDEOGRAPH + {0x99F0, 0x5480}, //3842 #CJK UNIFIED IDEOGRAPH + {0x99F1, 0x5476}, //3843 #CJK UNIFIED IDEOGRAPH + {0x99F2, 0x5484}, //3844 #CJK UNIFIED IDEOGRAPH + {0x99F3, 0x5490}, //3845 #CJK UNIFIED IDEOGRAPH + {0x99F4, 0x5486}, //3846 #CJK UNIFIED IDEOGRAPH + {0x99F5, 0x54C7}, //3847 #CJK UNIFIED IDEOGRAPH + {0x99F6, 0x54A2}, //3848 #CJK UNIFIED IDEOGRAPH + {0x99F7, 0x54B8}, //3849 #CJK UNIFIED IDEOGRAPH + {0x99F8, 0x54A5}, //3850 #CJK UNIFIED IDEOGRAPH + {0x99F9, 0x54AC}, //3851 #CJK UNIFIED IDEOGRAPH + {0x99FA, 0x54C4}, //3852 #CJK UNIFIED IDEOGRAPH + {0x99FB, 0x54C8}, //3853 #CJK UNIFIED IDEOGRAPH + {0x99FC, 0x54A8}, //3854 #CJK UNIFIED IDEOGRAPH + {0x9A40, 0x54AB}, //3855 #CJK UNIFIED IDEOGRAPH + {0x9A41, 0x54C2}, //3856 #CJK UNIFIED IDEOGRAPH + {0x9A42, 0x54A4}, //3857 #CJK UNIFIED IDEOGRAPH + {0x9A43, 0x54BE}, //3858 #CJK UNIFIED IDEOGRAPH + {0x9A44, 0x54BC}, //3859 #CJK UNIFIED IDEOGRAPH + {0x9A45, 0x54D8}, //3860 #CJK UNIFIED IDEOGRAPH + {0x9A46, 0x54E5}, //3861 #CJK UNIFIED IDEOGRAPH + {0x9A47, 0x54E6}, //3862 #CJK UNIFIED IDEOGRAPH + {0x9A48, 0x550F}, //3863 #CJK UNIFIED IDEOGRAPH + {0x9A49, 0x5514}, //3864 #CJK UNIFIED IDEOGRAPH + {0x9A4A, 0x54FD}, //3865 #CJK UNIFIED IDEOGRAPH + {0x9A4B, 0x54EE}, //3866 #CJK UNIFIED IDEOGRAPH + {0x9A4C, 0x54ED}, //3867 #CJK UNIFIED IDEOGRAPH + {0x9A4D, 0x54FA}, //3868 #CJK UNIFIED IDEOGRAPH + {0x9A4E, 0x54E2}, //3869 #CJK UNIFIED IDEOGRAPH + {0x9A4F, 0x5539}, //3870 #CJK UNIFIED IDEOGRAPH + {0x9A50, 0x5540}, //3871 #CJK UNIFIED IDEOGRAPH + {0x9A51, 0x5563}, //3872 #CJK UNIFIED IDEOGRAPH + {0x9A52, 0x554C}, //3873 #CJK UNIFIED IDEOGRAPH + {0x9A53, 0x552E}, //3874 #CJK UNIFIED IDEOGRAPH + {0x9A54, 0x555C}, //3875 #CJK UNIFIED IDEOGRAPH + {0x9A55, 0x5545}, //3876 #CJK UNIFIED IDEOGRAPH + {0x9A56, 0x5556}, //3877 #CJK UNIFIED IDEOGRAPH + {0x9A57, 0x5557}, //3878 #CJK UNIFIED IDEOGRAPH + {0x9A58, 0x5538}, //3879 #CJK UNIFIED IDEOGRAPH + {0x9A59, 0x5533}, //3880 #CJK UNIFIED IDEOGRAPH + {0x9A5A, 0x555D}, //3881 #CJK UNIFIED IDEOGRAPH + {0x9A5B, 0x5599}, //3882 #CJK UNIFIED IDEOGRAPH + {0x9A5C, 0x5580}, //3883 #CJK UNIFIED IDEOGRAPH + {0x9A5D, 0x54AF}, //3884 #CJK UNIFIED IDEOGRAPH + {0x9A5E, 0x558A}, //3885 #CJK UNIFIED IDEOGRAPH + {0x9A5F, 0x559F}, //3886 #CJK UNIFIED IDEOGRAPH + {0x9A60, 0x557B}, //3887 #CJK UNIFIED IDEOGRAPH + {0x9A61, 0x557E}, //3888 #CJK UNIFIED IDEOGRAPH + {0x9A62, 0x5598}, //3889 #CJK UNIFIED IDEOGRAPH + {0x9A63, 0x559E}, //3890 #CJK UNIFIED IDEOGRAPH + {0x9A64, 0x55AE}, //3891 #CJK UNIFIED IDEOGRAPH + {0x9A65, 0x557C}, //3892 #CJK UNIFIED IDEOGRAPH + {0x9A66, 0x5583}, //3893 #CJK UNIFIED IDEOGRAPH + {0x9A67, 0x55A9}, //3894 #CJK UNIFIED IDEOGRAPH + {0x9A68, 0x5587}, //3895 #CJK UNIFIED IDEOGRAPH + {0x9A69, 0x55A8}, //3896 #CJK UNIFIED IDEOGRAPH + {0x9A6A, 0x55DA}, //3897 #CJK UNIFIED IDEOGRAPH + {0x9A6B, 0x55C5}, //3898 #CJK UNIFIED IDEOGRAPH + {0x9A6C, 0x55DF}, //3899 #CJK UNIFIED IDEOGRAPH + {0x9A6D, 0x55C4}, //3900 #CJK UNIFIED IDEOGRAPH + {0x9A6E, 0x55DC}, //3901 #CJK UNIFIED IDEOGRAPH + {0x9A6F, 0x55E4}, //3902 #CJK UNIFIED IDEOGRAPH + {0x9A70, 0x55D4}, //3903 #CJK UNIFIED IDEOGRAPH + {0x9A71, 0x5614}, //3904 #CJK UNIFIED IDEOGRAPH + {0x9A72, 0x55F7}, //3905 #CJK UNIFIED IDEOGRAPH + {0x9A73, 0x5616}, //3906 #CJK UNIFIED IDEOGRAPH + {0x9A74, 0x55FE}, //3907 #CJK UNIFIED IDEOGRAPH + {0x9A75, 0x55FD}, //3908 #CJK UNIFIED IDEOGRAPH + {0x9A76, 0x561B}, //3909 #CJK UNIFIED IDEOGRAPH + {0x9A77, 0x55F9}, //3910 #CJK UNIFIED IDEOGRAPH + {0x9A78, 0x564E}, //3911 #CJK UNIFIED IDEOGRAPH + {0x9A79, 0x5650}, //3912 #CJK UNIFIED IDEOGRAPH + {0x9A7A, 0x71DF}, //3913 #CJK UNIFIED IDEOGRAPH + {0x9A7B, 0x5634}, //3914 #CJK UNIFIED IDEOGRAPH + {0x9A7C, 0x5636}, //3915 #CJK UNIFIED IDEOGRAPH + {0x9A7D, 0x5632}, //3916 #CJK UNIFIED IDEOGRAPH + {0x9A7E, 0x5638}, //3917 #CJK UNIFIED IDEOGRAPH + {0x9A80, 0x566B}, //3918 #CJK UNIFIED IDEOGRAPH + {0x9A81, 0x5664}, //3919 #CJK UNIFIED IDEOGRAPH + {0x9A82, 0x562F}, //3920 #CJK UNIFIED IDEOGRAPH + {0x9A83, 0x566C}, //3921 #CJK UNIFIED IDEOGRAPH + {0x9A84, 0x566A}, //3922 #CJK UNIFIED IDEOGRAPH + {0x9A85, 0x5686}, //3923 #CJK UNIFIED IDEOGRAPH + {0x9A86, 0x5680}, //3924 #CJK UNIFIED IDEOGRAPH + {0x9A87, 0x568A}, //3925 #CJK UNIFIED IDEOGRAPH + {0x9A88, 0x56A0}, //3926 #CJK UNIFIED IDEOGRAPH + {0x9A89, 0x5694}, //3927 #CJK UNIFIED IDEOGRAPH + {0x9A8A, 0x568F}, //3928 #CJK UNIFIED IDEOGRAPH + {0x9A8B, 0x56A5}, //3929 #CJK UNIFIED IDEOGRAPH + {0x9A8C, 0x56AE}, //3930 #CJK UNIFIED IDEOGRAPH + {0x9A8D, 0x56B6}, //3931 #CJK UNIFIED IDEOGRAPH + {0x9A8E, 0x56B4}, //3932 #CJK UNIFIED IDEOGRAPH + {0x9A8F, 0x56C2}, //3933 #CJK UNIFIED IDEOGRAPH + {0x9A90, 0x56BC}, //3934 #CJK UNIFIED IDEOGRAPH + {0x9A91, 0x56C1}, //3935 #CJK UNIFIED IDEOGRAPH + {0x9A92, 0x56C3}, //3936 #CJK UNIFIED IDEOGRAPH + {0x9A93, 0x56C0}, //3937 #CJK UNIFIED IDEOGRAPH + {0x9A94, 0x56C8}, //3938 #CJK UNIFIED IDEOGRAPH + {0x9A95, 0x56CE}, //3939 #CJK UNIFIED IDEOGRAPH + {0x9A96, 0x56D1}, //3940 #CJK UNIFIED IDEOGRAPH + {0x9A97, 0x56D3}, //3941 #CJK UNIFIED IDEOGRAPH + {0x9A98, 0x56D7}, //3942 #CJK UNIFIED IDEOGRAPH + {0x9A99, 0x56EE}, //3943 #CJK UNIFIED IDEOGRAPH + {0x9A9A, 0x56F9}, //3944 #CJK UNIFIED IDEOGRAPH + {0x9A9B, 0x5700}, //3945 #CJK UNIFIED IDEOGRAPH + {0x9A9C, 0x56FF}, //3946 #CJK UNIFIED IDEOGRAPH + {0x9A9D, 0x5704}, //3947 #CJK UNIFIED IDEOGRAPH + {0x9A9E, 0x5709}, //3948 #CJK UNIFIED IDEOGRAPH + {0x9A9F, 0x5708}, //3949 #CJK UNIFIED IDEOGRAPH + {0x9AA0, 0x570B}, //3950 #CJK UNIFIED IDEOGRAPH + {0x9AA1, 0x570D}, //3951 #CJK UNIFIED IDEOGRAPH + {0x9AA2, 0x5713}, //3952 #CJK UNIFIED IDEOGRAPH + {0x9AA3, 0x5718}, //3953 #CJK UNIFIED IDEOGRAPH + {0x9AA4, 0x5716}, //3954 #CJK UNIFIED IDEOGRAPH + {0x9AA5, 0x55C7}, //3955 #CJK UNIFIED IDEOGRAPH + {0x9AA6, 0x571C}, //3956 #CJK UNIFIED IDEOGRAPH + {0x9AA7, 0x5726}, //3957 #CJK UNIFIED IDEOGRAPH + {0x9AA8, 0x5737}, //3958 #CJK UNIFIED IDEOGRAPH + {0x9AA9, 0x5738}, //3959 #CJK UNIFIED IDEOGRAPH + {0x9AAA, 0x574E}, //3960 #CJK UNIFIED IDEOGRAPH + {0x9AAB, 0x573B}, //3961 #CJK UNIFIED IDEOGRAPH + {0x9AAC, 0x5740}, //3962 #CJK UNIFIED IDEOGRAPH + {0x9AAD, 0x574F}, //3963 #CJK UNIFIED IDEOGRAPH + {0x9AAE, 0x5769}, //3964 #CJK UNIFIED IDEOGRAPH + {0x9AAF, 0x57C0}, //3965 #CJK UNIFIED IDEOGRAPH + {0x9AB0, 0x5788}, //3966 #CJK UNIFIED IDEOGRAPH + {0x9AB1, 0x5761}, //3967 #CJK UNIFIED IDEOGRAPH + {0x9AB2, 0x577F}, //3968 #CJK UNIFIED IDEOGRAPH + {0x9AB3, 0x5789}, //3969 #CJK UNIFIED IDEOGRAPH + {0x9AB4, 0x5793}, //3970 #CJK UNIFIED IDEOGRAPH + {0x9AB5, 0x57A0}, //3971 #CJK UNIFIED IDEOGRAPH + {0x9AB6, 0x57B3}, //3972 #CJK UNIFIED IDEOGRAPH + {0x9AB7, 0x57A4}, //3973 #CJK UNIFIED IDEOGRAPH + {0x9AB8, 0x57AA}, //3974 #CJK UNIFIED IDEOGRAPH + {0x9AB9, 0x57B0}, //3975 #CJK UNIFIED IDEOGRAPH + {0x9ABA, 0x57C3}, //3976 #CJK UNIFIED IDEOGRAPH + {0x9ABB, 0x57C6}, //3977 #CJK UNIFIED IDEOGRAPH + {0x9ABC, 0x57D4}, //3978 #CJK UNIFIED IDEOGRAPH + {0x9ABD, 0x57D2}, //3979 #CJK UNIFIED IDEOGRAPH + {0x9ABE, 0x57D3}, //3980 #CJK UNIFIED IDEOGRAPH + {0x9ABF, 0x580A}, //3981 #CJK UNIFIED IDEOGRAPH + {0x9AC0, 0x57D6}, //3982 #CJK UNIFIED IDEOGRAPH + {0x9AC1, 0x57E3}, //3983 #CJK UNIFIED IDEOGRAPH + {0x9AC2, 0x580B}, //3984 #CJK UNIFIED IDEOGRAPH + {0x9AC3, 0x5819}, //3985 #CJK UNIFIED IDEOGRAPH + {0x9AC4, 0x581D}, //3986 #CJK UNIFIED IDEOGRAPH + {0x9AC5, 0x5872}, //3987 #CJK UNIFIED IDEOGRAPH + {0x9AC6, 0x5821}, //3988 #CJK UNIFIED IDEOGRAPH + {0x9AC7, 0x5862}, //3989 #CJK UNIFIED IDEOGRAPH + {0x9AC8, 0x584B}, //3990 #CJK UNIFIED IDEOGRAPH + {0x9AC9, 0x5870}, //3991 #CJK UNIFIED IDEOGRAPH + {0x9ACA, 0x6BC0}, //3992 #CJK UNIFIED IDEOGRAPH + {0x9ACB, 0x5852}, //3993 #CJK UNIFIED IDEOGRAPH + {0x9ACC, 0x583D}, //3994 #CJK UNIFIED IDEOGRAPH + {0x9ACD, 0x5879}, //3995 #CJK UNIFIED IDEOGRAPH + {0x9ACE, 0x5885}, //3996 #CJK UNIFIED IDEOGRAPH + {0x9ACF, 0x58B9}, //3997 #CJK UNIFIED IDEOGRAPH + {0x9AD0, 0x589F}, //3998 #CJK UNIFIED IDEOGRAPH + {0x9AD1, 0x58AB}, //3999 #CJK UNIFIED IDEOGRAPH + {0x9AD2, 0x58BA}, //4000 #CJK UNIFIED IDEOGRAPH + {0x9AD3, 0x58DE}, //4001 #CJK UNIFIED IDEOGRAPH + {0x9AD4, 0x58BB}, //4002 #CJK UNIFIED IDEOGRAPH + {0x9AD5, 0x58B8}, //4003 #CJK UNIFIED IDEOGRAPH + {0x9AD6, 0x58AE}, //4004 #CJK UNIFIED IDEOGRAPH + {0x9AD7, 0x58C5}, //4005 #CJK UNIFIED IDEOGRAPH + {0x9AD8, 0x58D3}, //4006 #CJK UNIFIED IDEOGRAPH + {0x9AD9, 0x58D1}, //4007 #CJK UNIFIED IDEOGRAPH + {0x9ADA, 0x58D7}, //4008 #CJK UNIFIED IDEOGRAPH + {0x9ADB, 0x58D9}, //4009 #CJK UNIFIED IDEOGRAPH + {0x9ADC, 0x58D8}, //4010 #CJK UNIFIED IDEOGRAPH + {0x9ADD, 0x58E5}, //4011 #CJK UNIFIED IDEOGRAPH + {0x9ADE, 0x58DC}, //4012 #CJK UNIFIED IDEOGRAPH + {0x9ADF, 0x58E4}, //4013 #CJK UNIFIED IDEOGRAPH + {0x9AE0, 0x58DF}, //4014 #CJK UNIFIED IDEOGRAPH + {0x9AE1, 0x58EF}, //4015 #CJK UNIFIED IDEOGRAPH + {0x9AE2, 0x58FA}, //4016 #CJK UNIFIED IDEOGRAPH + {0x9AE3, 0x58F9}, //4017 #CJK UNIFIED IDEOGRAPH + {0x9AE4, 0x58FB}, //4018 #CJK UNIFIED IDEOGRAPH + {0x9AE5, 0x58FC}, //4019 #CJK UNIFIED IDEOGRAPH + {0x9AE6, 0x58FD}, //4020 #CJK UNIFIED IDEOGRAPH + {0x9AE7, 0x5902}, //4021 #CJK UNIFIED IDEOGRAPH + {0x9AE8, 0x590A}, //4022 #CJK UNIFIED IDEOGRAPH + {0x9AE9, 0x5910}, //4023 #CJK UNIFIED IDEOGRAPH + {0x9AEA, 0x591B}, //4024 #CJK UNIFIED IDEOGRAPH + {0x9AEB, 0x68A6}, //4025 #CJK UNIFIED IDEOGRAPH + {0x9AEC, 0x5925}, //4026 #CJK UNIFIED IDEOGRAPH + {0x9AED, 0x592C}, //4027 #CJK UNIFIED IDEOGRAPH + {0x9AEE, 0x592D}, //4028 #CJK UNIFIED IDEOGRAPH + {0x9AEF, 0x5932}, //4029 #CJK UNIFIED IDEOGRAPH + {0x9AF0, 0x5938}, //4030 #CJK UNIFIED IDEOGRAPH + {0x9AF1, 0x593E}, //4031 #CJK UNIFIED IDEOGRAPH + {0x9AF2, 0x7AD2}, //4032 #CJK UNIFIED IDEOGRAPH + {0x9AF3, 0x5955}, //4033 #CJK UNIFIED IDEOGRAPH + {0x9AF4, 0x5950}, //4034 #CJK UNIFIED IDEOGRAPH + {0x9AF5, 0x594E}, //4035 #CJK UNIFIED IDEOGRAPH + {0x9AF6, 0x595A}, //4036 #CJK UNIFIED IDEOGRAPH + {0x9AF7, 0x5958}, //4037 #CJK UNIFIED IDEOGRAPH + {0x9AF8, 0x5962}, //4038 #CJK UNIFIED IDEOGRAPH + {0x9AF9, 0x5960}, //4039 #CJK UNIFIED IDEOGRAPH + {0x9AFA, 0x5967}, //4040 #CJK UNIFIED IDEOGRAPH + {0x9AFB, 0x596C}, //4041 #CJK UNIFIED IDEOGRAPH + {0x9AFC, 0x5969}, //4042 #CJK UNIFIED IDEOGRAPH + {0x9B40, 0x5978}, //4043 #CJK UNIFIED IDEOGRAPH + {0x9B41, 0x5981}, //4044 #CJK UNIFIED IDEOGRAPH + {0x9B42, 0x599D}, //4045 #CJK UNIFIED IDEOGRAPH + {0x9B43, 0x4F5E}, //4046 #CJK UNIFIED IDEOGRAPH + {0x9B44, 0x4FAB}, //4047 #CJK UNIFIED IDEOGRAPH + {0x9B45, 0x59A3}, //4048 #CJK UNIFIED IDEOGRAPH + {0x9B46, 0x59B2}, //4049 #CJK UNIFIED IDEOGRAPH + {0x9B47, 0x59C6}, //4050 #CJK UNIFIED IDEOGRAPH + {0x9B48, 0x59E8}, //4051 #CJK UNIFIED IDEOGRAPH + {0x9B49, 0x59DC}, //4052 #CJK UNIFIED IDEOGRAPH + {0x9B4A, 0x598D}, //4053 #CJK UNIFIED IDEOGRAPH + {0x9B4B, 0x59D9}, //4054 #CJK UNIFIED IDEOGRAPH + {0x9B4C, 0x59DA}, //4055 #CJK UNIFIED IDEOGRAPH + {0x9B4D, 0x5A25}, //4056 #CJK UNIFIED IDEOGRAPH + {0x9B4E, 0x5A1F}, //4057 #CJK UNIFIED IDEOGRAPH + {0x9B4F, 0x5A11}, //4058 #CJK UNIFIED IDEOGRAPH + {0x9B50, 0x5A1C}, //4059 #CJK UNIFIED IDEOGRAPH + {0x9B51, 0x5A09}, //4060 #CJK UNIFIED IDEOGRAPH + {0x9B52, 0x5A1A}, //4061 #CJK UNIFIED IDEOGRAPH + {0x9B53, 0x5A40}, //4062 #CJK UNIFIED IDEOGRAPH + {0x9B54, 0x5A6C}, //4063 #CJK UNIFIED IDEOGRAPH + {0x9B55, 0x5A49}, //4064 #CJK UNIFIED IDEOGRAPH + {0x9B56, 0x5A35}, //4065 #CJK UNIFIED IDEOGRAPH + {0x9B57, 0x5A36}, //4066 #CJK UNIFIED IDEOGRAPH + {0x9B58, 0x5A62}, //4067 #CJK UNIFIED IDEOGRAPH + {0x9B59, 0x5A6A}, //4068 #CJK UNIFIED IDEOGRAPH + {0x9B5A, 0x5A9A}, //4069 #CJK UNIFIED IDEOGRAPH + {0x9B5B, 0x5ABC}, //4070 #CJK UNIFIED IDEOGRAPH + {0x9B5C, 0x5ABE}, //4071 #CJK UNIFIED IDEOGRAPH + {0x9B5D, 0x5ACB}, //4072 #CJK UNIFIED IDEOGRAPH + {0x9B5E, 0x5AC2}, //4073 #CJK UNIFIED IDEOGRAPH + {0x9B5F, 0x5ABD}, //4074 #CJK UNIFIED IDEOGRAPH + {0x9B60, 0x5AE3}, //4075 #CJK UNIFIED IDEOGRAPH + {0x9B61, 0x5AD7}, //4076 #CJK UNIFIED IDEOGRAPH + {0x9B62, 0x5AE6}, //4077 #CJK UNIFIED IDEOGRAPH + {0x9B63, 0x5AE9}, //4078 #CJK UNIFIED IDEOGRAPH + {0x9B64, 0x5AD6}, //4079 #CJK UNIFIED IDEOGRAPH + {0x9B65, 0x5AFA}, //4080 #CJK UNIFIED IDEOGRAPH + {0x9B66, 0x5AFB}, //4081 #CJK UNIFIED IDEOGRAPH + {0x9B67, 0x5B0C}, //4082 #CJK UNIFIED IDEOGRAPH + {0x9B68, 0x5B0B}, //4083 #CJK UNIFIED IDEOGRAPH + {0x9B69, 0x5B16}, //4084 #CJK UNIFIED IDEOGRAPH + {0x9B6A, 0x5B32}, //4085 #CJK UNIFIED IDEOGRAPH + {0x9B6B, 0x5AD0}, //4086 #CJK UNIFIED IDEOGRAPH + {0x9B6C, 0x5B2A}, //4087 #CJK UNIFIED IDEOGRAPH + {0x9B6D, 0x5B36}, //4088 #CJK UNIFIED IDEOGRAPH + {0x9B6E, 0x5B3E}, //4089 #CJK UNIFIED IDEOGRAPH + {0x9B6F, 0x5B43}, //4090 #CJK UNIFIED IDEOGRAPH + {0x9B70, 0x5B45}, //4091 #CJK UNIFIED IDEOGRAPH + {0x9B71, 0x5B40}, //4092 #CJK UNIFIED IDEOGRAPH + {0x9B72, 0x5B51}, //4093 #CJK UNIFIED IDEOGRAPH + {0x9B73, 0x5B55}, //4094 #CJK UNIFIED IDEOGRAPH + {0x9B74, 0x5B5A}, //4095 #CJK UNIFIED IDEOGRAPH + {0x9B75, 0x5B5B}, //4096 #CJK UNIFIED IDEOGRAPH + {0x9B76, 0x5B65}, //4097 #CJK UNIFIED IDEOGRAPH + {0x9B77, 0x5B69}, //4098 #CJK UNIFIED IDEOGRAPH + {0x9B78, 0x5B70}, //4099 #CJK UNIFIED IDEOGRAPH + {0x9B79, 0x5B73}, //4100 #CJK UNIFIED IDEOGRAPH + {0x9B7A, 0x5B75}, //4101 #CJK UNIFIED IDEOGRAPH + {0x9B7B, 0x5B78}, //4102 #CJK UNIFIED IDEOGRAPH + {0x9B7C, 0x6588}, //4103 #CJK UNIFIED IDEOGRAPH + {0x9B7D, 0x5B7A}, //4104 #CJK UNIFIED IDEOGRAPH + {0x9B7E, 0x5B80}, //4105 #CJK UNIFIED IDEOGRAPH + {0x9B80, 0x5B83}, //4106 #CJK UNIFIED IDEOGRAPH + {0x9B81, 0x5BA6}, //4107 #CJK UNIFIED IDEOGRAPH + {0x9B82, 0x5BB8}, //4108 #CJK UNIFIED IDEOGRAPH + {0x9B83, 0x5BC3}, //4109 #CJK UNIFIED IDEOGRAPH + {0x9B84, 0x5BC7}, //4110 #CJK UNIFIED IDEOGRAPH + {0x9B85, 0x5BC9}, //4111 #CJK UNIFIED IDEOGRAPH + {0x9B86, 0x5BD4}, //4112 #CJK UNIFIED IDEOGRAPH + {0x9B87, 0x5BD0}, //4113 #CJK UNIFIED IDEOGRAPH + {0x9B88, 0x5BE4}, //4114 #CJK UNIFIED IDEOGRAPH + {0x9B89, 0x5BE6}, //4115 #CJK UNIFIED IDEOGRAPH + {0x9B8A, 0x5BE2}, //4116 #CJK UNIFIED IDEOGRAPH + {0x9B8B, 0x5BDE}, //4117 #CJK UNIFIED IDEOGRAPH + {0x9B8C, 0x5BE5}, //4118 #CJK UNIFIED IDEOGRAPH + {0x9B8D, 0x5BEB}, //4119 #CJK UNIFIED IDEOGRAPH + {0x9B8E, 0x5BF0}, //4120 #CJK UNIFIED IDEOGRAPH + {0x9B8F, 0x5BF6}, //4121 #CJK UNIFIED IDEOGRAPH + {0x9B90, 0x5BF3}, //4122 #CJK UNIFIED IDEOGRAPH + {0x9B91, 0x5C05}, //4123 #CJK UNIFIED IDEOGRAPH + {0x9B92, 0x5C07}, //4124 #CJK UNIFIED IDEOGRAPH + {0x9B93, 0x5C08}, //4125 #CJK UNIFIED IDEOGRAPH + {0x9B94, 0x5C0D}, //4126 #CJK UNIFIED IDEOGRAPH + {0x9B95, 0x5C13}, //4127 #CJK UNIFIED IDEOGRAPH + {0x9B96, 0x5C20}, //4128 #CJK UNIFIED IDEOGRAPH + {0x9B97, 0x5C22}, //4129 #CJK UNIFIED IDEOGRAPH + {0x9B98, 0x5C28}, //4130 #CJK UNIFIED IDEOGRAPH + {0x9B99, 0x5C38}, //4131 #CJK UNIFIED IDEOGRAPH + {0x9B9A, 0x5C39}, //4132 #CJK UNIFIED IDEOGRAPH + {0x9B9B, 0x5C41}, //4133 #CJK UNIFIED IDEOGRAPH + {0x9B9C, 0x5C46}, //4134 #CJK UNIFIED IDEOGRAPH + {0x9B9D, 0x5C4E}, //4135 #CJK UNIFIED IDEOGRAPH + {0x9B9E, 0x5C53}, //4136 #CJK UNIFIED IDEOGRAPH + {0x9B9F, 0x5C50}, //4137 #CJK UNIFIED IDEOGRAPH + {0x9BA0, 0x5C4F}, //4138 #CJK UNIFIED IDEOGRAPH + {0x9BA1, 0x5B71}, //4139 #CJK UNIFIED IDEOGRAPH + {0x9BA2, 0x5C6C}, //4140 #CJK UNIFIED IDEOGRAPH + {0x9BA3, 0x5C6E}, //4141 #CJK UNIFIED IDEOGRAPH + {0x9BA4, 0x4E62}, //4142 #CJK UNIFIED IDEOGRAPH + {0x9BA5, 0x5C76}, //4143 #CJK UNIFIED IDEOGRAPH + {0x9BA6, 0x5C79}, //4144 #CJK UNIFIED IDEOGRAPH + {0x9BA7, 0x5C8C}, //4145 #CJK UNIFIED IDEOGRAPH + {0x9BA8, 0x5C91}, //4146 #CJK UNIFIED IDEOGRAPH + {0x9BA9, 0x5C94}, //4147 #CJK UNIFIED IDEOGRAPH + {0x9BAA, 0x599B}, //4148 #CJK UNIFIED IDEOGRAPH + {0x9BAB, 0x5CAB}, //4149 #CJK UNIFIED IDEOGRAPH + {0x9BAC, 0x5CBB}, //4150 #CJK UNIFIED IDEOGRAPH + {0x9BAD, 0x5CB6}, //4151 #CJK UNIFIED IDEOGRAPH + {0x9BAE, 0x5CBC}, //4152 #CJK UNIFIED IDEOGRAPH + {0x9BAF, 0x5CB7}, //4153 #CJK UNIFIED IDEOGRAPH + {0x9BB0, 0x5CC5}, //4154 #CJK UNIFIED IDEOGRAPH + {0x9BB1, 0x5CBE}, //4155 #CJK UNIFIED IDEOGRAPH + {0x9BB2, 0x5CC7}, //4156 #CJK UNIFIED IDEOGRAPH + {0x9BB3, 0x5CD9}, //4157 #CJK UNIFIED IDEOGRAPH + {0x9BB4, 0x5CE9}, //4158 #CJK UNIFIED IDEOGRAPH + {0x9BB5, 0x5CFD}, //4159 #CJK UNIFIED IDEOGRAPH + {0x9BB6, 0x5CFA}, //4160 #CJK UNIFIED IDEOGRAPH + {0x9BB7, 0x5CED}, //4161 #CJK UNIFIED IDEOGRAPH + {0x9BB8, 0x5D8C}, //4162 #CJK UNIFIED IDEOGRAPH + {0x9BB9, 0x5CEA}, //4163 #CJK UNIFIED IDEOGRAPH + {0x9BBA, 0x5D0B}, //4164 #CJK UNIFIED IDEOGRAPH + {0x9BBB, 0x5D15}, //4165 #CJK UNIFIED IDEOGRAPH + {0x9BBC, 0x5D17}, //4166 #CJK UNIFIED IDEOGRAPH + {0x9BBD, 0x5D5C}, //4167 #CJK UNIFIED IDEOGRAPH + {0x9BBE, 0x5D1F}, //4168 #CJK UNIFIED IDEOGRAPH + {0x9BBF, 0x5D1B}, //4169 #CJK UNIFIED IDEOGRAPH + {0x9BC0, 0x5D11}, //4170 #CJK UNIFIED IDEOGRAPH + {0x9BC1, 0x5D14}, //4171 #CJK UNIFIED IDEOGRAPH + {0x9BC2, 0x5D22}, //4172 #CJK UNIFIED IDEOGRAPH + {0x9BC3, 0x5D1A}, //4173 #CJK UNIFIED IDEOGRAPH + {0x9BC4, 0x5D19}, //4174 #CJK UNIFIED IDEOGRAPH + {0x9BC5, 0x5D18}, //4175 #CJK UNIFIED IDEOGRAPH + {0x9BC6, 0x5D4C}, //4176 #CJK UNIFIED IDEOGRAPH + {0x9BC7, 0x5D52}, //4177 #CJK UNIFIED IDEOGRAPH + {0x9BC8, 0x5D4E}, //4178 #CJK UNIFIED IDEOGRAPH + {0x9BC9, 0x5D4B}, //4179 #CJK UNIFIED IDEOGRAPH + {0x9BCA, 0x5D6C}, //4180 #CJK UNIFIED IDEOGRAPH + {0x9BCB, 0x5D73}, //4181 #CJK UNIFIED IDEOGRAPH + {0x9BCC, 0x5D76}, //4182 #CJK UNIFIED IDEOGRAPH + {0x9BCD, 0x5D87}, //4183 #CJK UNIFIED IDEOGRAPH + {0x9BCE, 0x5D84}, //4184 #CJK UNIFIED IDEOGRAPH + {0x9BCF, 0x5D82}, //4185 #CJK UNIFIED IDEOGRAPH + {0x9BD0, 0x5DA2}, //4186 #CJK UNIFIED IDEOGRAPH + {0x9BD1, 0x5D9D}, //4187 #CJK UNIFIED IDEOGRAPH + {0x9BD2, 0x5DAC}, //4188 #CJK UNIFIED IDEOGRAPH + {0x9BD3, 0x5DAE}, //4189 #CJK UNIFIED IDEOGRAPH + {0x9BD4, 0x5DBD}, //4190 #CJK UNIFIED IDEOGRAPH + {0x9BD5, 0x5D90}, //4191 #CJK UNIFIED IDEOGRAPH + {0x9BD6, 0x5DB7}, //4192 #CJK UNIFIED IDEOGRAPH + {0x9BD7, 0x5DBC}, //4193 #CJK UNIFIED IDEOGRAPH + {0x9BD8, 0x5DC9}, //4194 #CJK UNIFIED IDEOGRAPH + {0x9BD9, 0x5DCD}, //4195 #CJK UNIFIED IDEOGRAPH + {0x9BDA, 0x5DD3}, //4196 #CJK UNIFIED IDEOGRAPH + {0x9BDB, 0x5DD2}, //4197 #CJK UNIFIED IDEOGRAPH + {0x9BDC, 0x5DD6}, //4198 #CJK UNIFIED IDEOGRAPH + {0x9BDD, 0x5DDB}, //4199 #CJK UNIFIED IDEOGRAPH + {0x9BDE, 0x5DEB}, //4200 #CJK UNIFIED IDEOGRAPH + {0x9BDF, 0x5DF2}, //4201 #CJK UNIFIED IDEOGRAPH + {0x9BE0, 0x5DF5}, //4202 #CJK UNIFIED IDEOGRAPH + {0x9BE1, 0x5E0B}, //4203 #CJK UNIFIED IDEOGRAPH + {0x9BE2, 0x5E1A}, //4204 #CJK UNIFIED IDEOGRAPH + {0x9BE3, 0x5E19}, //4205 #CJK UNIFIED IDEOGRAPH + {0x9BE4, 0x5E11}, //4206 #CJK UNIFIED IDEOGRAPH + {0x9BE5, 0x5E1B}, //4207 #CJK UNIFIED IDEOGRAPH + {0x9BE6, 0x5E36}, //4208 #CJK UNIFIED IDEOGRAPH + {0x9BE7, 0x5E37}, //4209 #CJK UNIFIED IDEOGRAPH + {0x9BE8, 0x5E44}, //4210 #CJK UNIFIED IDEOGRAPH + {0x9BE9, 0x5E43}, //4211 #CJK UNIFIED IDEOGRAPH + {0x9BEA, 0x5E40}, //4212 #CJK UNIFIED IDEOGRAPH + {0x9BEB, 0x5E4E}, //4213 #CJK UNIFIED IDEOGRAPH + {0x9BEC, 0x5E57}, //4214 #CJK UNIFIED IDEOGRAPH + {0x9BED, 0x5E54}, //4215 #CJK UNIFIED IDEOGRAPH + {0x9BEE, 0x5E5F}, //4216 #CJK UNIFIED IDEOGRAPH + {0x9BEF, 0x5E62}, //4217 #CJK UNIFIED IDEOGRAPH + {0x9BF0, 0x5E64}, //4218 #CJK UNIFIED IDEOGRAPH + {0x9BF1, 0x5E47}, //4219 #CJK UNIFIED IDEOGRAPH + {0x9BF2, 0x5E75}, //4220 #CJK UNIFIED IDEOGRAPH + {0x9BF3, 0x5E76}, //4221 #CJK UNIFIED IDEOGRAPH + {0x9BF4, 0x5E7A}, //4222 #CJK UNIFIED IDEOGRAPH + {0x9BF5, 0x9EBC}, //4223 #CJK UNIFIED IDEOGRAPH + {0x9BF6, 0x5E7F}, //4224 #CJK UNIFIED IDEOGRAPH + {0x9BF7, 0x5EA0}, //4225 #CJK UNIFIED IDEOGRAPH + {0x9BF8, 0x5EC1}, //4226 #CJK UNIFIED IDEOGRAPH + {0x9BF9, 0x5EC2}, //4227 #CJK UNIFIED IDEOGRAPH + {0x9BFA, 0x5EC8}, //4228 #CJK UNIFIED IDEOGRAPH + {0x9BFB, 0x5ED0}, //4229 #CJK UNIFIED IDEOGRAPH + {0x9BFC, 0x5ECF}, //4230 #CJK UNIFIED IDEOGRAPH + {0x9C40, 0x5ED6}, //4231 #CJK UNIFIED IDEOGRAPH + {0x9C41, 0x5EE3}, //4232 #CJK UNIFIED IDEOGRAPH + {0x9C42, 0x5EDD}, //4233 #CJK UNIFIED IDEOGRAPH + {0x9C43, 0x5EDA}, //4234 #CJK UNIFIED IDEOGRAPH + {0x9C44, 0x5EDB}, //4235 #CJK UNIFIED IDEOGRAPH + {0x9C45, 0x5EE2}, //4236 #CJK UNIFIED IDEOGRAPH + {0x9C46, 0x5EE1}, //4237 #CJK UNIFIED IDEOGRAPH + {0x9C47, 0x5EE8}, //4238 #CJK UNIFIED IDEOGRAPH + {0x9C48, 0x5EE9}, //4239 #CJK UNIFIED IDEOGRAPH + {0x9C49, 0x5EEC}, //4240 #CJK UNIFIED IDEOGRAPH + {0x9C4A, 0x5EF1}, //4241 #CJK UNIFIED IDEOGRAPH + {0x9C4B, 0x5EF3}, //4242 #CJK UNIFIED IDEOGRAPH + {0x9C4C, 0x5EF0}, //4243 #CJK UNIFIED IDEOGRAPH + {0x9C4D, 0x5EF4}, //4244 #CJK UNIFIED IDEOGRAPH + {0x9C4E, 0x5EF8}, //4245 #CJK UNIFIED IDEOGRAPH + {0x9C4F, 0x5EFE}, //4246 #CJK UNIFIED IDEOGRAPH + {0x9C50, 0x5F03}, //4247 #CJK UNIFIED IDEOGRAPH + {0x9C51, 0x5F09}, //4248 #CJK UNIFIED IDEOGRAPH + {0x9C52, 0x5F5D}, //4249 #CJK UNIFIED IDEOGRAPH + {0x9C53, 0x5F5C}, //4250 #CJK UNIFIED IDEOGRAPH + {0x9C54, 0x5F0B}, //4251 #CJK UNIFIED IDEOGRAPH + {0x9C55, 0x5F11}, //4252 #CJK UNIFIED IDEOGRAPH + {0x9C56, 0x5F16}, //4253 #CJK UNIFIED IDEOGRAPH + {0x9C57, 0x5F29}, //4254 #CJK UNIFIED IDEOGRAPH + {0x9C58, 0x5F2D}, //4255 #CJK UNIFIED IDEOGRAPH + {0x9C59, 0x5F38}, //4256 #CJK UNIFIED IDEOGRAPH + {0x9C5A, 0x5F41}, //4257 #CJK UNIFIED IDEOGRAPH + {0x9C5B, 0x5F48}, //4258 #CJK UNIFIED IDEOGRAPH + {0x9C5C, 0x5F4C}, //4259 #CJK UNIFIED IDEOGRAPH + {0x9C5D, 0x5F4E}, //4260 #CJK UNIFIED IDEOGRAPH + {0x9C5E, 0x5F2F}, //4261 #CJK UNIFIED IDEOGRAPH + {0x9C5F, 0x5F51}, //4262 #CJK UNIFIED IDEOGRAPH + {0x9C60, 0x5F56}, //4263 #CJK UNIFIED IDEOGRAPH + {0x9C61, 0x5F57}, //4264 #CJK UNIFIED IDEOGRAPH + {0x9C62, 0x5F59}, //4265 #CJK UNIFIED IDEOGRAPH + {0x9C63, 0x5F61}, //4266 #CJK UNIFIED IDEOGRAPH + {0x9C64, 0x5F6D}, //4267 #CJK UNIFIED IDEOGRAPH + {0x9C65, 0x5F73}, //4268 #CJK UNIFIED IDEOGRAPH + {0x9C66, 0x5F77}, //4269 #CJK UNIFIED IDEOGRAPH + {0x9C67, 0x5F83}, //4270 #CJK UNIFIED IDEOGRAPH + {0x9C68, 0x5F82}, //4271 #CJK UNIFIED IDEOGRAPH + {0x9C69, 0x5F7F}, //4272 #CJK UNIFIED IDEOGRAPH + {0x9C6A, 0x5F8A}, //4273 #CJK UNIFIED IDEOGRAPH + {0x9C6B, 0x5F88}, //4274 #CJK UNIFIED IDEOGRAPH + {0x9C6C, 0x5F91}, //4275 #CJK UNIFIED IDEOGRAPH + {0x9C6D, 0x5F87}, //4276 #CJK UNIFIED IDEOGRAPH + {0x9C6E, 0x5F9E}, //4277 #CJK UNIFIED IDEOGRAPH + {0x9C6F, 0x5F99}, //4278 #CJK UNIFIED IDEOGRAPH + {0x9C70, 0x5F98}, //4279 #CJK UNIFIED IDEOGRAPH + {0x9C71, 0x5FA0}, //4280 #CJK UNIFIED IDEOGRAPH + {0x9C72, 0x5FA8}, //4281 #CJK UNIFIED IDEOGRAPH + {0x9C73, 0x5FAD}, //4282 #CJK UNIFIED IDEOGRAPH + {0x9C74, 0x5FBC}, //4283 #CJK UNIFIED IDEOGRAPH + {0x9C75, 0x5FD6}, //4284 #CJK UNIFIED IDEOGRAPH + {0x9C76, 0x5FFB}, //4285 #CJK UNIFIED IDEOGRAPH + {0x9C77, 0x5FE4}, //4286 #CJK UNIFIED IDEOGRAPH + {0x9C78, 0x5FF8}, //4287 #CJK UNIFIED IDEOGRAPH + {0x9C79, 0x5FF1}, //4288 #CJK UNIFIED IDEOGRAPH + {0x9C7A, 0x5FDD}, //4289 #CJK UNIFIED IDEOGRAPH + {0x9C7B, 0x60B3}, //4290 #CJK UNIFIED IDEOGRAPH + {0x9C7C, 0x5FFF}, //4291 #CJK UNIFIED IDEOGRAPH + {0x9C7D, 0x6021}, //4292 #CJK UNIFIED IDEOGRAPH + {0x9C7E, 0x6060}, //4293 #CJK UNIFIED IDEOGRAPH + {0x9C80, 0x6019}, //4294 #CJK UNIFIED IDEOGRAPH + {0x9C81, 0x6010}, //4295 #CJK UNIFIED IDEOGRAPH + {0x9C82, 0x6029}, //4296 #CJK UNIFIED IDEOGRAPH + {0x9C83, 0x600E}, //4297 #CJK UNIFIED IDEOGRAPH + {0x9C84, 0x6031}, //4298 #CJK UNIFIED IDEOGRAPH + {0x9C85, 0x601B}, //4299 #CJK UNIFIED IDEOGRAPH + {0x9C86, 0x6015}, //4300 #CJK UNIFIED IDEOGRAPH + {0x9C87, 0x602B}, //4301 #CJK UNIFIED IDEOGRAPH + {0x9C88, 0x6026}, //4302 #CJK UNIFIED IDEOGRAPH + {0x9C89, 0x600F}, //4303 #CJK UNIFIED IDEOGRAPH + {0x9C8A, 0x603A}, //4304 #CJK UNIFIED IDEOGRAPH + {0x9C8B, 0x605A}, //4305 #CJK UNIFIED IDEOGRAPH + {0x9C8C, 0x6041}, //4306 #CJK UNIFIED IDEOGRAPH + {0x9C8D, 0x606A}, //4307 #CJK UNIFIED IDEOGRAPH + {0x9C8E, 0x6077}, //4308 #CJK UNIFIED IDEOGRAPH + {0x9C8F, 0x605F}, //4309 #CJK UNIFIED IDEOGRAPH + {0x9C90, 0x604A}, //4310 #CJK UNIFIED IDEOGRAPH + {0x9C91, 0x6046}, //4311 #CJK UNIFIED IDEOGRAPH + {0x9C92, 0x604D}, //4312 #CJK UNIFIED IDEOGRAPH + {0x9C93, 0x6063}, //4313 #CJK UNIFIED IDEOGRAPH + {0x9C94, 0x6043}, //4314 #CJK UNIFIED IDEOGRAPH + {0x9C95, 0x6064}, //4315 #CJK UNIFIED IDEOGRAPH + {0x9C96, 0x6042}, //4316 #CJK UNIFIED IDEOGRAPH + {0x9C97, 0x606C}, //4317 #CJK UNIFIED IDEOGRAPH + {0x9C98, 0x606B}, //4318 #CJK UNIFIED IDEOGRAPH + {0x9C99, 0x6059}, //4319 #CJK UNIFIED IDEOGRAPH + {0x9C9A, 0x6081}, //4320 #CJK UNIFIED IDEOGRAPH + {0x9C9B, 0x608D}, //4321 #CJK UNIFIED IDEOGRAPH + {0x9C9C, 0x60E7}, //4322 #CJK UNIFIED IDEOGRAPH + {0x9C9D, 0x6083}, //4323 #CJK UNIFIED IDEOGRAPH + {0x9C9E, 0x609A}, //4324 #CJK UNIFIED IDEOGRAPH + {0x9C9F, 0x6084}, //4325 #CJK UNIFIED IDEOGRAPH + {0x9CA0, 0x609B}, //4326 #CJK UNIFIED IDEOGRAPH + {0x9CA1, 0x6096}, //4327 #CJK UNIFIED IDEOGRAPH + {0x9CA2, 0x6097}, //4328 #CJK UNIFIED IDEOGRAPH + {0x9CA3, 0x6092}, //4329 #CJK UNIFIED IDEOGRAPH + {0x9CA4, 0x60A7}, //4330 #CJK UNIFIED IDEOGRAPH + {0x9CA5, 0x608B}, //4331 #CJK UNIFIED IDEOGRAPH + {0x9CA6, 0x60E1}, //4332 #CJK UNIFIED IDEOGRAPH + {0x9CA7, 0x60B8}, //4333 #CJK UNIFIED IDEOGRAPH + {0x9CA8, 0x60E0}, //4334 #CJK UNIFIED IDEOGRAPH + {0x9CA9, 0x60D3}, //4335 #CJK UNIFIED IDEOGRAPH + {0x9CAA, 0x60B4}, //4336 #CJK UNIFIED IDEOGRAPH + {0x9CAB, 0x5FF0}, //4337 #CJK UNIFIED IDEOGRAPH + {0x9CAC, 0x60BD}, //4338 #CJK UNIFIED IDEOGRAPH + {0x9CAD, 0x60C6}, //4339 #CJK UNIFIED IDEOGRAPH + {0x9CAE, 0x60B5}, //4340 #CJK UNIFIED IDEOGRAPH + {0x9CAF, 0x60D8}, //4341 #CJK UNIFIED IDEOGRAPH + {0x9CB0, 0x614D}, //4342 #CJK UNIFIED IDEOGRAPH + {0x9CB1, 0x6115}, //4343 #CJK UNIFIED IDEOGRAPH + {0x9CB2, 0x6106}, //4344 #CJK UNIFIED IDEOGRAPH + {0x9CB3, 0x60F6}, //4345 #CJK UNIFIED IDEOGRAPH + {0x9CB4, 0x60F7}, //4346 #CJK UNIFIED IDEOGRAPH + {0x9CB5, 0x6100}, //4347 #CJK UNIFIED IDEOGRAPH + {0x9CB6, 0x60F4}, //4348 #CJK UNIFIED IDEOGRAPH + {0x9CB7, 0x60FA}, //4349 #CJK UNIFIED IDEOGRAPH + {0x9CB8, 0x6103}, //4350 #CJK UNIFIED IDEOGRAPH + {0x9CB9, 0x6121}, //4351 #CJK UNIFIED IDEOGRAPH + {0x9CBA, 0x60FB}, //4352 #CJK UNIFIED IDEOGRAPH + {0x9CBB, 0x60F1}, //4353 #CJK UNIFIED IDEOGRAPH + {0x9CBC, 0x610D}, //4354 #CJK UNIFIED IDEOGRAPH + {0x9CBD, 0x610E}, //4355 #CJK UNIFIED IDEOGRAPH + {0x9CBE, 0x6147}, //4356 #CJK UNIFIED IDEOGRAPH + {0x9CBF, 0x613E}, //4357 #CJK UNIFIED IDEOGRAPH + {0x9CC0, 0x6128}, //4358 #CJK UNIFIED IDEOGRAPH + {0x9CC1, 0x6127}, //4359 #CJK UNIFIED IDEOGRAPH + {0x9CC2, 0x614A}, //4360 #CJK UNIFIED IDEOGRAPH + {0x9CC3, 0x613F}, //4361 #CJK UNIFIED IDEOGRAPH + {0x9CC4, 0x613C}, //4362 #CJK UNIFIED IDEOGRAPH + {0x9CC5, 0x612C}, //4363 #CJK UNIFIED IDEOGRAPH + {0x9CC6, 0x6134}, //4364 #CJK UNIFIED IDEOGRAPH + {0x9CC7, 0x613D}, //4365 #CJK UNIFIED IDEOGRAPH + {0x9CC8, 0x6142}, //4366 #CJK UNIFIED IDEOGRAPH + {0x9CC9, 0x6144}, //4367 #CJK UNIFIED IDEOGRAPH + {0x9CCA, 0x6173}, //4368 #CJK UNIFIED IDEOGRAPH + {0x9CCB, 0x6177}, //4369 #CJK UNIFIED IDEOGRAPH + {0x9CCC, 0x6158}, //4370 #CJK UNIFIED IDEOGRAPH + {0x9CCD, 0x6159}, //4371 #CJK UNIFIED IDEOGRAPH + {0x9CCE, 0x615A}, //4372 #CJK UNIFIED IDEOGRAPH + {0x9CCF, 0x616B}, //4373 #CJK UNIFIED IDEOGRAPH + {0x9CD0, 0x6174}, //4374 #CJK UNIFIED IDEOGRAPH + {0x9CD1, 0x616F}, //4375 #CJK UNIFIED IDEOGRAPH + {0x9CD2, 0x6165}, //4376 #CJK UNIFIED IDEOGRAPH + {0x9CD3, 0x6171}, //4377 #CJK UNIFIED IDEOGRAPH + {0x9CD4, 0x615F}, //4378 #CJK UNIFIED IDEOGRAPH + {0x9CD5, 0x615D}, //4379 #CJK UNIFIED IDEOGRAPH + {0x9CD6, 0x6153}, //4380 #CJK UNIFIED IDEOGRAPH + {0x9CD7, 0x6175}, //4381 #CJK UNIFIED IDEOGRAPH + {0x9CD8, 0x6199}, //4382 #CJK UNIFIED IDEOGRAPH + {0x9CD9, 0x6196}, //4383 #CJK UNIFIED IDEOGRAPH + {0x9CDA, 0x6187}, //4384 #CJK UNIFIED IDEOGRAPH + {0x9CDB, 0x61AC}, //4385 #CJK UNIFIED IDEOGRAPH + {0x9CDC, 0x6194}, //4386 #CJK UNIFIED IDEOGRAPH + {0x9CDD, 0x619A}, //4387 #CJK UNIFIED IDEOGRAPH + {0x9CDE, 0x618A}, //4388 #CJK UNIFIED IDEOGRAPH + {0x9CDF, 0x6191}, //4389 #CJK UNIFIED IDEOGRAPH + {0x9CE0, 0x61AB}, //4390 #CJK UNIFIED IDEOGRAPH + {0x9CE1, 0x61AE}, //4391 #CJK UNIFIED IDEOGRAPH + {0x9CE2, 0x61CC}, //4392 #CJK UNIFIED IDEOGRAPH + {0x9CE3, 0x61CA}, //4393 #CJK UNIFIED IDEOGRAPH + {0x9CE4, 0x61C9}, //4394 #CJK UNIFIED IDEOGRAPH + {0x9CE5, 0x61F7}, //4395 #CJK UNIFIED IDEOGRAPH + {0x9CE6, 0x61C8}, //4396 #CJK UNIFIED IDEOGRAPH + {0x9CE7, 0x61C3}, //4397 #CJK UNIFIED IDEOGRAPH + {0x9CE8, 0x61C6}, //4398 #CJK UNIFIED IDEOGRAPH + {0x9CE9, 0x61BA}, //4399 #CJK UNIFIED IDEOGRAPH + {0x9CEA, 0x61CB}, //4400 #CJK UNIFIED IDEOGRAPH + {0x9CEB, 0x7F79}, //4401 #CJK UNIFIED IDEOGRAPH + {0x9CEC, 0x61CD}, //4402 #CJK UNIFIED IDEOGRAPH + {0x9CED, 0x61E6}, //4403 #CJK UNIFIED IDEOGRAPH + {0x9CEE, 0x61E3}, //4404 #CJK UNIFIED IDEOGRAPH + {0x9CEF, 0x61F6}, //4405 #CJK UNIFIED IDEOGRAPH + {0x9CF0, 0x61FA}, //4406 #CJK UNIFIED IDEOGRAPH + {0x9CF1, 0x61F4}, //4407 #CJK UNIFIED IDEOGRAPH + {0x9CF2, 0x61FF}, //4408 #CJK UNIFIED IDEOGRAPH + {0x9CF3, 0x61FD}, //4409 #CJK UNIFIED IDEOGRAPH + {0x9CF4, 0x61FC}, //4410 #CJK UNIFIED IDEOGRAPH + {0x9CF5, 0x61FE}, //4411 #CJK UNIFIED IDEOGRAPH + {0x9CF6, 0x6200}, //4412 #CJK UNIFIED IDEOGRAPH + {0x9CF7, 0x6208}, //4413 #CJK UNIFIED IDEOGRAPH + {0x9CF8, 0x6209}, //4414 #CJK UNIFIED IDEOGRAPH + {0x9CF9, 0x620D}, //4415 #CJK UNIFIED IDEOGRAPH + {0x9CFA, 0x620C}, //4416 #CJK UNIFIED IDEOGRAPH + {0x9CFB, 0x6214}, //4417 #CJK UNIFIED IDEOGRAPH + {0x9CFC, 0x621B}, //4418 #CJK UNIFIED IDEOGRAPH + {0x9D40, 0x621E}, //4419 #CJK UNIFIED IDEOGRAPH + {0x9D41, 0x6221}, //4420 #CJK UNIFIED IDEOGRAPH + {0x9D42, 0x622A}, //4421 #CJK UNIFIED IDEOGRAPH + {0x9D43, 0x622E}, //4422 #CJK UNIFIED IDEOGRAPH + {0x9D44, 0x6230}, //4423 #CJK UNIFIED IDEOGRAPH + {0x9D45, 0x6232}, //4424 #CJK UNIFIED IDEOGRAPH + {0x9D46, 0x6233}, //4425 #CJK UNIFIED IDEOGRAPH + {0x9D47, 0x6241}, //4426 #CJK UNIFIED IDEOGRAPH + {0x9D48, 0x624E}, //4427 #CJK UNIFIED IDEOGRAPH + {0x9D49, 0x625E}, //4428 #CJK UNIFIED IDEOGRAPH + {0x9D4A, 0x6263}, //4429 #CJK UNIFIED IDEOGRAPH + {0x9D4B, 0x625B}, //4430 #CJK UNIFIED IDEOGRAPH + {0x9D4C, 0x6260}, //4431 #CJK UNIFIED IDEOGRAPH + {0x9D4D, 0x6268}, //4432 #CJK UNIFIED IDEOGRAPH + {0x9D4E, 0x627C}, //4433 #CJK UNIFIED IDEOGRAPH + {0x9D4F, 0x6282}, //4434 #CJK UNIFIED IDEOGRAPH + {0x9D50, 0x6289}, //4435 #CJK UNIFIED IDEOGRAPH + {0x9D51, 0x627E}, //4436 #CJK UNIFIED IDEOGRAPH + {0x9D52, 0x6292}, //4437 #CJK UNIFIED IDEOGRAPH + {0x9D53, 0x6293}, //4438 #CJK UNIFIED IDEOGRAPH + {0x9D54, 0x6296}, //4439 #CJK UNIFIED IDEOGRAPH + {0x9D55, 0x62D4}, //4440 #CJK UNIFIED IDEOGRAPH + {0x9D56, 0x6283}, //4441 #CJK UNIFIED IDEOGRAPH + {0x9D57, 0x6294}, //4442 #CJK UNIFIED IDEOGRAPH + {0x9D58, 0x62D7}, //4443 #CJK UNIFIED IDEOGRAPH + {0x9D59, 0x62D1}, //4444 #CJK UNIFIED IDEOGRAPH + {0x9D5A, 0x62BB}, //4445 #CJK UNIFIED IDEOGRAPH + {0x9D5B, 0x62CF}, //4446 #CJK UNIFIED IDEOGRAPH + {0x9D5C, 0x62FF}, //4447 #CJK UNIFIED IDEOGRAPH + {0x9D5D, 0x62C6}, //4448 #CJK UNIFIED IDEOGRAPH + {0x9D5E, 0x64D4}, //4449 #CJK UNIFIED IDEOGRAPH + {0x9D5F, 0x62C8}, //4450 #CJK UNIFIED IDEOGRAPH + {0x9D60, 0x62DC}, //4451 #CJK UNIFIED IDEOGRAPH + {0x9D61, 0x62CC}, //4452 #CJK UNIFIED IDEOGRAPH + {0x9D62, 0x62CA}, //4453 #CJK UNIFIED IDEOGRAPH + {0x9D63, 0x62C2}, //4454 #CJK UNIFIED IDEOGRAPH + {0x9D64, 0x62C7}, //4455 #CJK UNIFIED IDEOGRAPH + {0x9D65, 0x629B}, //4456 #CJK UNIFIED IDEOGRAPH + {0x9D66, 0x62C9}, //4457 #CJK UNIFIED IDEOGRAPH + {0x9D67, 0x630C}, //4458 #CJK UNIFIED IDEOGRAPH + {0x9D68, 0x62EE}, //4459 #CJK UNIFIED IDEOGRAPH + {0x9D69, 0x62F1}, //4460 #CJK UNIFIED IDEOGRAPH + {0x9D6A, 0x6327}, //4461 #CJK UNIFIED IDEOGRAPH + {0x9D6B, 0x6302}, //4462 #CJK UNIFIED IDEOGRAPH + {0x9D6C, 0x6308}, //4463 #CJK UNIFIED IDEOGRAPH + {0x9D6D, 0x62EF}, //4464 #CJK UNIFIED IDEOGRAPH + {0x9D6E, 0x62F5}, //4465 #CJK UNIFIED IDEOGRAPH + {0x9D6F, 0x6350}, //4466 #CJK UNIFIED IDEOGRAPH + {0x9D70, 0x633E}, //4467 #CJK UNIFIED IDEOGRAPH + {0x9D71, 0x634D}, //4468 #CJK UNIFIED IDEOGRAPH + {0x9D72, 0x641C}, //4469 #CJK UNIFIED IDEOGRAPH + {0x9D73, 0x634F}, //4470 #CJK UNIFIED IDEOGRAPH + {0x9D74, 0x6396}, //4471 #CJK UNIFIED IDEOGRAPH + {0x9D75, 0x638E}, //4472 #CJK UNIFIED IDEOGRAPH + {0x9D76, 0x6380}, //4473 #CJK UNIFIED IDEOGRAPH + {0x9D77, 0x63AB}, //4474 #CJK UNIFIED IDEOGRAPH + {0x9D78, 0x6376}, //4475 #CJK UNIFIED IDEOGRAPH + {0x9D79, 0x63A3}, //4476 #CJK UNIFIED IDEOGRAPH + {0x9D7A, 0x638F}, //4477 #CJK UNIFIED IDEOGRAPH + {0x9D7B, 0x6389}, //4478 #CJK UNIFIED IDEOGRAPH + {0x9D7C, 0x639F}, //4479 #CJK UNIFIED IDEOGRAPH + {0x9D7D, 0x63B5}, //4480 #CJK UNIFIED IDEOGRAPH + {0x9D7E, 0x636B}, //4481 #CJK UNIFIED IDEOGRAPH + {0x9D80, 0x6369}, //4482 #CJK UNIFIED IDEOGRAPH + {0x9D81, 0x63BE}, //4483 #CJK UNIFIED IDEOGRAPH + {0x9D82, 0x63E9}, //4484 #CJK UNIFIED IDEOGRAPH + {0x9D83, 0x63C0}, //4485 #CJK UNIFIED IDEOGRAPH + {0x9D84, 0x63C6}, //4486 #CJK UNIFIED IDEOGRAPH + {0x9D85, 0x63E3}, //4487 #CJK UNIFIED IDEOGRAPH + {0x9D86, 0x63C9}, //4488 #CJK UNIFIED IDEOGRAPH + {0x9D87, 0x63D2}, //4489 #CJK UNIFIED IDEOGRAPH + {0x9D88, 0x63F6}, //4490 #CJK UNIFIED IDEOGRAPH + {0x9D89, 0x63C4}, //4491 #CJK UNIFIED IDEOGRAPH + {0x9D8A, 0x6416}, //4492 #CJK UNIFIED IDEOGRAPH + {0x9D8B, 0x6434}, //4493 #CJK UNIFIED IDEOGRAPH + {0x9D8C, 0x6406}, //4494 #CJK UNIFIED IDEOGRAPH + {0x9D8D, 0x6413}, //4495 #CJK UNIFIED IDEOGRAPH + {0x9D8E, 0x6426}, //4496 #CJK UNIFIED IDEOGRAPH + {0x9D8F, 0x6436}, //4497 #CJK UNIFIED IDEOGRAPH + {0x9D90, 0x651D}, //4498 #CJK UNIFIED IDEOGRAPH + {0x9D91, 0x6417}, //4499 #CJK UNIFIED IDEOGRAPH + {0x9D92, 0x6428}, //4500 #CJK UNIFIED IDEOGRAPH + {0x9D93, 0x640F}, //4501 #CJK UNIFIED IDEOGRAPH + {0x9D94, 0x6467}, //4502 #CJK UNIFIED IDEOGRAPH + {0x9D95, 0x646F}, //4503 #CJK UNIFIED IDEOGRAPH + {0x9D96, 0x6476}, //4504 #CJK UNIFIED IDEOGRAPH + {0x9D97, 0x644E}, //4505 #CJK UNIFIED IDEOGRAPH + {0x9D98, 0x652A}, //4506 #CJK UNIFIED IDEOGRAPH + {0x9D99, 0x6495}, //4507 #CJK UNIFIED IDEOGRAPH + {0x9D9A, 0x6493}, //4508 #CJK UNIFIED IDEOGRAPH + {0x9D9B, 0x64A5}, //4509 #CJK UNIFIED IDEOGRAPH + {0x9D9C, 0x64A9}, //4510 #CJK UNIFIED IDEOGRAPH + {0x9D9D, 0x6488}, //4511 #CJK UNIFIED IDEOGRAPH + {0x9D9E, 0x64BC}, //4512 #CJK UNIFIED IDEOGRAPH + {0x9D9F, 0x64DA}, //4513 #CJK UNIFIED IDEOGRAPH + {0x9DA0, 0x64D2}, //4514 #CJK UNIFIED IDEOGRAPH + {0x9DA1, 0x64C5}, //4515 #CJK UNIFIED IDEOGRAPH + {0x9DA2, 0x64C7}, //4516 #CJK UNIFIED IDEOGRAPH + {0x9DA3, 0x64BB}, //4517 #CJK UNIFIED IDEOGRAPH + {0x9DA4, 0x64D8}, //4518 #CJK UNIFIED IDEOGRAPH + {0x9DA5, 0x64C2}, //4519 #CJK UNIFIED IDEOGRAPH + {0x9DA6, 0x64F1}, //4520 #CJK UNIFIED IDEOGRAPH + {0x9DA7, 0x64E7}, //4521 #CJK UNIFIED IDEOGRAPH + {0x9DA8, 0x8209}, //4522 #CJK UNIFIED IDEOGRAPH + {0x9DA9, 0x64E0}, //4523 #CJK UNIFIED IDEOGRAPH + {0x9DAA, 0x64E1}, //4524 #CJK UNIFIED IDEOGRAPH + {0x9DAB, 0x62AC}, //4525 #CJK UNIFIED IDEOGRAPH + {0x9DAC, 0x64E3}, //4526 #CJK UNIFIED IDEOGRAPH + {0x9DAD, 0x64EF}, //4527 #CJK UNIFIED IDEOGRAPH + {0x9DAE, 0x652C}, //4528 #CJK UNIFIED IDEOGRAPH + {0x9DAF, 0x64F6}, //4529 #CJK UNIFIED IDEOGRAPH + {0x9DB0, 0x64F4}, //4530 #CJK UNIFIED IDEOGRAPH + {0x9DB1, 0x64F2}, //4531 #CJK UNIFIED IDEOGRAPH + {0x9DB2, 0x64FA}, //4532 #CJK UNIFIED IDEOGRAPH + {0x9DB3, 0x6500}, //4533 #CJK UNIFIED IDEOGRAPH + {0x9DB4, 0x64FD}, //4534 #CJK UNIFIED IDEOGRAPH + {0x9DB5, 0x6518}, //4535 #CJK UNIFIED IDEOGRAPH + {0x9DB6, 0x651C}, //4536 #CJK UNIFIED IDEOGRAPH + {0x9DB7, 0x6505}, //4537 #CJK UNIFIED IDEOGRAPH + {0x9DB8, 0x6524}, //4538 #CJK UNIFIED IDEOGRAPH + {0x9DB9, 0x6523}, //4539 #CJK UNIFIED IDEOGRAPH + {0x9DBA, 0x652B}, //4540 #CJK UNIFIED IDEOGRAPH + {0x9DBB, 0x6534}, //4541 #CJK UNIFIED IDEOGRAPH + {0x9DBC, 0x6535}, //4542 #CJK UNIFIED IDEOGRAPH + {0x9DBD, 0x6537}, //4543 #CJK UNIFIED IDEOGRAPH + {0x9DBE, 0x6536}, //4544 #CJK UNIFIED IDEOGRAPH + {0x9DBF, 0x6538}, //4545 #CJK UNIFIED IDEOGRAPH + {0x9DC0, 0x754B}, //4546 #CJK UNIFIED IDEOGRAPH + {0x9DC1, 0x6548}, //4547 #CJK UNIFIED IDEOGRAPH + {0x9DC2, 0x6556}, //4548 #CJK UNIFIED IDEOGRAPH + {0x9DC3, 0x6555}, //4549 #CJK UNIFIED IDEOGRAPH + {0x9DC4, 0x654D}, //4550 #CJK UNIFIED IDEOGRAPH + {0x9DC5, 0x6558}, //4551 #CJK UNIFIED IDEOGRAPH + {0x9DC6, 0x655E}, //4552 #CJK UNIFIED IDEOGRAPH + {0x9DC7, 0x655D}, //4553 #CJK UNIFIED IDEOGRAPH + {0x9DC8, 0x6572}, //4554 #CJK UNIFIED IDEOGRAPH + {0x9DC9, 0x6578}, //4555 #CJK UNIFIED IDEOGRAPH + {0x9DCA, 0x6582}, //4556 #CJK UNIFIED IDEOGRAPH + {0x9DCB, 0x6583}, //4557 #CJK UNIFIED IDEOGRAPH + {0x9DCC, 0x8B8A}, //4558 #CJK UNIFIED IDEOGRAPH + {0x9DCD, 0x659B}, //4559 #CJK UNIFIED IDEOGRAPH + {0x9DCE, 0x659F}, //4560 #CJK UNIFIED IDEOGRAPH + {0x9DCF, 0x65AB}, //4561 #CJK UNIFIED IDEOGRAPH + {0x9DD0, 0x65B7}, //4562 #CJK UNIFIED IDEOGRAPH + {0x9DD1, 0x65C3}, //4563 #CJK UNIFIED IDEOGRAPH + {0x9DD2, 0x65C6}, //4564 #CJK UNIFIED IDEOGRAPH + {0x9DD3, 0x65C1}, //4565 #CJK UNIFIED IDEOGRAPH + {0x9DD4, 0x65C4}, //4566 #CJK UNIFIED IDEOGRAPH + {0x9DD5, 0x65CC}, //4567 #CJK UNIFIED IDEOGRAPH + {0x9DD6, 0x65D2}, //4568 #CJK UNIFIED IDEOGRAPH + {0x9DD7, 0x65DB}, //4569 #CJK UNIFIED IDEOGRAPH + {0x9DD8, 0x65D9}, //4570 #CJK UNIFIED IDEOGRAPH + {0x9DD9, 0x65E0}, //4571 #CJK UNIFIED IDEOGRAPH + {0x9DDA, 0x65E1}, //4572 #CJK UNIFIED IDEOGRAPH + {0x9DDB, 0x65F1}, //4573 #CJK UNIFIED IDEOGRAPH + {0x9DDC, 0x6772}, //4574 #CJK UNIFIED IDEOGRAPH + {0x9DDD, 0x660A}, //4575 #CJK UNIFIED IDEOGRAPH + {0x9DDE, 0x6603}, //4576 #CJK UNIFIED IDEOGRAPH + {0x9DDF, 0x65FB}, //4577 #CJK UNIFIED IDEOGRAPH + {0x9DE0, 0x6773}, //4578 #CJK UNIFIED IDEOGRAPH + {0x9DE1, 0x6635}, //4579 #CJK UNIFIED IDEOGRAPH + {0x9DE2, 0x6636}, //4580 #CJK UNIFIED IDEOGRAPH + {0x9DE3, 0x6634}, //4581 #CJK UNIFIED IDEOGRAPH + {0x9DE4, 0x661C}, //4582 #CJK UNIFIED IDEOGRAPH + {0x9DE5, 0x664F}, //4583 #CJK UNIFIED IDEOGRAPH + {0x9DE6, 0x6644}, //4584 #CJK UNIFIED IDEOGRAPH + {0x9DE7, 0x6649}, //4585 #CJK UNIFIED IDEOGRAPH + {0x9DE8, 0x6641}, //4586 #CJK UNIFIED IDEOGRAPH + {0x9DE9, 0x665E}, //4587 #CJK UNIFIED IDEOGRAPH + {0x9DEA, 0x665D}, //4588 #CJK UNIFIED IDEOGRAPH + {0x9DEB, 0x6664}, //4589 #CJK UNIFIED IDEOGRAPH + {0x9DEC, 0x6667}, //4590 #CJK UNIFIED IDEOGRAPH + {0x9DED, 0x6668}, //4591 #CJK UNIFIED IDEOGRAPH + {0x9DEE, 0x665F}, //4592 #CJK UNIFIED IDEOGRAPH + {0x9DEF, 0x6662}, //4593 #CJK UNIFIED IDEOGRAPH + {0x9DF0, 0x6670}, //4594 #CJK UNIFIED IDEOGRAPH + {0x9DF1, 0x6683}, //4595 #CJK UNIFIED IDEOGRAPH + {0x9DF2, 0x6688}, //4596 #CJK UNIFIED IDEOGRAPH + {0x9DF3, 0x668E}, //4597 #CJK UNIFIED IDEOGRAPH + {0x9DF4, 0x6689}, //4598 #CJK UNIFIED IDEOGRAPH + {0x9DF5, 0x6684}, //4599 #CJK UNIFIED IDEOGRAPH + {0x9DF6, 0x6698}, //4600 #CJK UNIFIED IDEOGRAPH + {0x9DF7, 0x669D}, //4601 #CJK UNIFIED IDEOGRAPH + {0x9DF8, 0x66C1}, //4602 #CJK UNIFIED IDEOGRAPH + {0x9DF9, 0x66B9}, //4603 #CJK UNIFIED IDEOGRAPH + {0x9DFA, 0x66C9}, //4604 #CJK UNIFIED IDEOGRAPH + {0x9DFB, 0x66BE}, //4605 #CJK UNIFIED IDEOGRAPH + {0x9DFC, 0x66BC}, //4606 #CJK UNIFIED IDEOGRAPH + {0x9E40, 0x66C4}, //4607 #CJK UNIFIED IDEOGRAPH + {0x9E41, 0x66B8}, //4608 #CJK UNIFIED IDEOGRAPH + {0x9E42, 0x66D6}, //4609 #CJK UNIFIED IDEOGRAPH + {0x9E43, 0x66DA}, //4610 #CJK UNIFIED IDEOGRAPH + {0x9E44, 0x66E0}, //4611 #CJK UNIFIED IDEOGRAPH + {0x9E45, 0x663F}, //4612 #CJK UNIFIED IDEOGRAPH + {0x9E46, 0x66E6}, //4613 #CJK UNIFIED IDEOGRAPH + {0x9E47, 0x66E9}, //4614 #CJK UNIFIED IDEOGRAPH + {0x9E48, 0x66F0}, //4615 #CJK UNIFIED IDEOGRAPH + {0x9E49, 0x66F5}, //4616 #CJK UNIFIED IDEOGRAPH + {0x9E4A, 0x66F7}, //4617 #CJK UNIFIED IDEOGRAPH + {0x9E4B, 0x670F}, //4618 #CJK UNIFIED IDEOGRAPH + {0x9E4C, 0x6716}, //4619 #CJK UNIFIED IDEOGRAPH + {0x9E4D, 0x671E}, //4620 #CJK UNIFIED IDEOGRAPH + {0x9E4E, 0x6726}, //4621 #CJK UNIFIED IDEOGRAPH + {0x9E4F, 0x6727}, //4622 #CJK UNIFIED IDEOGRAPH + {0x9E50, 0x9738}, //4623 #CJK UNIFIED IDEOGRAPH + {0x9E51, 0x672E}, //4624 #CJK UNIFIED IDEOGRAPH + {0x9E52, 0x673F}, //4625 #CJK UNIFIED IDEOGRAPH + {0x9E53, 0x6736}, //4626 #CJK UNIFIED IDEOGRAPH + {0x9E54, 0x6741}, //4627 #CJK UNIFIED IDEOGRAPH + {0x9E55, 0x6738}, //4628 #CJK UNIFIED IDEOGRAPH + {0x9E56, 0x6737}, //4629 #CJK UNIFIED IDEOGRAPH + {0x9E57, 0x6746}, //4630 #CJK UNIFIED IDEOGRAPH + {0x9E58, 0x675E}, //4631 #CJK UNIFIED IDEOGRAPH + {0x9E59, 0x6760}, //4632 #CJK UNIFIED IDEOGRAPH + {0x9E5A, 0x6759}, //4633 #CJK UNIFIED IDEOGRAPH + {0x9E5B, 0x6763}, //4634 #CJK UNIFIED IDEOGRAPH + {0x9E5C, 0x6764}, //4635 #CJK UNIFIED IDEOGRAPH + {0x9E5D, 0x6789}, //4636 #CJK UNIFIED IDEOGRAPH + {0x9E5E, 0x6770}, //4637 #CJK UNIFIED IDEOGRAPH + {0x9E5F, 0x67A9}, //4638 #CJK UNIFIED IDEOGRAPH + {0x9E60, 0x677C}, //4639 #CJK UNIFIED IDEOGRAPH + {0x9E61, 0x676A}, //4640 #CJK UNIFIED IDEOGRAPH + {0x9E62, 0x678C}, //4641 #CJK UNIFIED IDEOGRAPH + {0x9E63, 0x678B}, //4642 #CJK UNIFIED IDEOGRAPH + {0x9E64, 0x67A6}, //4643 #CJK UNIFIED IDEOGRAPH + {0x9E65, 0x67A1}, //4644 #CJK UNIFIED IDEOGRAPH + {0x9E66, 0x6785}, //4645 #CJK UNIFIED IDEOGRAPH + {0x9E67, 0x67B7}, //4646 #CJK UNIFIED IDEOGRAPH + {0x9E68, 0x67EF}, //4647 #CJK UNIFIED IDEOGRAPH + {0x9E69, 0x67B4}, //4648 #CJK UNIFIED IDEOGRAPH + {0x9E6A, 0x67EC}, //4649 #CJK UNIFIED IDEOGRAPH + {0x9E6B, 0x67B3}, //4650 #CJK UNIFIED IDEOGRAPH + {0x9E6C, 0x67E9}, //4651 #CJK UNIFIED IDEOGRAPH + {0x9E6D, 0x67B8}, //4652 #CJK UNIFIED IDEOGRAPH + {0x9E6E, 0x67E4}, //4653 #CJK UNIFIED IDEOGRAPH + {0x9E6F, 0x67DE}, //4654 #CJK UNIFIED IDEOGRAPH + {0x9E70, 0x67DD}, //4655 #CJK UNIFIED IDEOGRAPH + {0x9E71, 0x67E2}, //4656 #CJK UNIFIED IDEOGRAPH + {0x9E72, 0x67EE}, //4657 #CJK UNIFIED IDEOGRAPH + {0x9E73, 0x67B9}, //4658 #CJK UNIFIED IDEOGRAPH + {0x9E74, 0x67CE}, //4659 #CJK UNIFIED IDEOGRAPH + {0x9E75, 0x67C6}, //4660 #CJK UNIFIED IDEOGRAPH + {0x9E76, 0x67E7}, //4661 #CJK UNIFIED IDEOGRAPH + {0x9E77, 0x6A9C}, //4662 #CJK UNIFIED IDEOGRAPH + {0x9E78, 0x681E}, //4663 #CJK UNIFIED IDEOGRAPH + {0x9E79, 0x6846}, //4664 #CJK UNIFIED IDEOGRAPH + {0x9E7A, 0x6829}, //4665 #CJK UNIFIED IDEOGRAPH + {0x9E7B, 0x6840}, //4666 #CJK UNIFIED IDEOGRAPH + {0x9E7C, 0x684D}, //4667 #CJK UNIFIED IDEOGRAPH + {0x9E7D, 0x6832}, //4668 #CJK UNIFIED IDEOGRAPH + {0x9E7E, 0x684E}, //4669 #CJK UNIFIED IDEOGRAPH + {0x9E80, 0x68B3}, //4670 #CJK UNIFIED IDEOGRAPH + {0x9E81, 0x682B}, //4671 #CJK UNIFIED IDEOGRAPH + {0x9E82, 0x6859}, //4672 #CJK UNIFIED IDEOGRAPH + {0x9E83, 0x6863}, //4673 #CJK UNIFIED IDEOGRAPH + {0x9E84, 0x6877}, //4674 #CJK UNIFIED IDEOGRAPH + {0x9E85, 0x687F}, //4675 #CJK UNIFIED IDEOGRAPH + {0x9E86, 0x689F}, //4676 #CJK UNIFIED IDEOGRAPH + {0x9E87, 0x688F}, //4677 #CJK UNIFIED IDEOGRAPH + {0x9E88, 0x68AD}, //4678 #CJK UNIFIED IDEOGRAPH + {0x9E89, 0x6894}, //4679 #CJK UNIFIED IDEOGRAPH + {0x9E8A, 0x689D}, //4680 #CJK UNIFIED IDEOGRAPH + {0x9E8B, 0x689B}, //4681 #CJK UNIFIED IDEOGRAPH + {0x9E8C, 0x6883}, //4682 #CJK UNIFIED IDEOGRAPH + {0x9E8D, 0x6AAE}, //4683 #CJK UNIFIED IDEOGRAPH + {0x9E8E, 0x68B9}, //4684 #CJK UNIFIED IDEOGRAPH + {0x9E8F, 0x6874}, //4685 #CJK UNIFIED IDEOGRAPH + {0x9E90, 0x68B5}, //4686 #CJK UNIFIED IDEOGRAPH + {0x9E91, 0x68A0}, //4687 #CJK UNIFIED IDEOGRAPH + {0x9E92, 0x68BA}, //4688 #CJK UNIFIED IDEOGRAPH + {0x9E93, 0x690F}, //4689 #CJK UNIFIED IDEOGRAPH + {0x9E94, 0x688D}, //4690 #CJK UNIFIED IDEOGRAPH + {0x9E95, 0x687E}, //4691 #CJK UNIFIED IDEOGRAPH + {0x9E96, 0x6901}, //4692 #CJK UNIFIED IDEOGRAPH + {0x9E97, 0x68CA}, //4693 #CJK UNIFIED IDEOGRAPH + {0x9E98, 0x6908}, //4694 #CJK UNIFIED IDEOGRAPH + {0x9E99, 0x68D8}, //4695 #CJK UNIFIED IDEOGRAPH + {0x9E9A, 0x6922}, //4696 #CJK UNIFIED IDEOGRAPH + {0x9E9B, 0x6926}, //4697 #CJK UNIFIED IDEOGRAPH + {0x9E9C, 0x68E1}, //4698 #CJK UNIFIED IDEOGRAPH + {0x9E9D, 0x690C}, //4699 #CJK UNIFIED IDEOGRAPH + {0x9E9E, 0x68CD}, //4700 #CJK UNIFIED IDEOGRAPH + {0x9E9F, 0x68D4}, //4701 #CJK UNIFIED IDEOGRAPH + {0x9EA0, 0x68E7}, //4702 #CJK UNIFIED IDEOGRAPH + {0x9EA1, 0x68D5}, //4703 #CJK UNIFIED IDEOGRAPH + {0x9EA2, 0x6936}, //4704 #CJK UNIFIED IDEOGRAPH + {0x9EA3, 0x6912}, //4705 #CJK UNIFIED IDEOGRAPH + {0x9EA4, 0x6904}, //4706 #CJK UNIFIED IDEOGRAPH + {0x9EA5, 0x68D7}, //4707 #CJK UNIFIED IDEOGRAPH + {0x9EA6, 0x68E3}, //4708 #CJK UNIFIED IDEOGRAPH + {0x9EA7, 0x6925}, //4709 #CJK UNIFIED IDEOGRAPH + {0x9EA8, 0x68F9}, //4710 #CJK UNIFIED IDEOGRAPH + {0x9EA9, 0x68E0}, //4711 #CJK UNIFIED IDEOGRAPH + {0x9EAA, 0x68EF}, //4712 #CJK UNIFIED IDEOGRAPH + {0x9EAB, 0x6928}, //4713 #CJK UNIFIED IDEOGRAPH + {0x9EAC, 0x692A}, //4714 #CJK UNIFIED IDEOGRAPH + {0x9EAD, 0x691A}, //4715 #CJK UNIFIED IDEOGRAPH + {0x9EAE, 0x6923}, //4716 #CJK UNIFIED IDEOGRAPH + {0x9EAF, 0x6921}, //4717 #CJK UNIFIED IDEOGRAPH + {0x9EB0, 0x68C6}, //4718 #CJK UNIFIED IDEOGRAPH + {0x9EB1, 0x6979}, //4719 #CJK UNIFIED IDEOGRAPH + {0x9EB2, 0x6977}, //4720 #CJK UNIFIED IDEOGRAPH + {0x9EB3, 0x695C}, //4721 #CJK UNIFIED IDEOGRAPH + {0x9EB4, 0x6978}, //4722 #CJK UNIFIED IDEOGRAPH + {0x9EB5, 0x696B}, //4723 #CJK UNIFIED IDEOGRAPH + {0x9EB6, 0x6954}, //4724 #CJK UNIFIED IDEOGRAPH + {0x9EB7, 0x697E}, //4725 #CJK UNIFIED IDEOGRAPH + {0x9EB8, 0x696E}, //4726 #CJK UNIFIED IDEOGRAPH + {0x9EB9, 0x6939}, //4727 #CJK UNIFIED IDEOGRAPH + {0x9EBA, 0x6974}, //4728 #CJK UNIFIED IDEOGRAPH + {0x9EBB, 0x693D}, //4729 #CJK UNIFIED IDEOGRAPH + {0x9EBC, 0x6959}, //4730 #CJK UNIFIED IDEOGRAPH + {0x9EBD, 0x6930}, //4731 #CJK UNIFIED IDEOGRAPH + {0x9EBE, 0x6961}, //4732 #CJK UNIFIED IDEOGRAPH + {0x9EBF, 0x695E}, //4733 #CJK UNIFIED IDEOGRAPH + {0x9EC0, 0x695D}, //4734 #CJK UNIFIED IDEOGRAPH + {0x9EC1, 0x6981}, //4735 #CJK UNIFIED IDEOGRAPH + {0x9EC2, 0x696A}, //4736 #CJK UNIFIED IDEOGRAPH + {0x9EC3, 0x69B2}, //4737 #CJK UNIFIED IDEOGRAPH + {0x9EC4, 0x69AE}, //4738 #CJK UNIFIED IDEOGRAPH + {0x9EC5, 0x69D0}, //4739 #CJK UNIFIED IDEOGRAPH + {0x9EC6, 0x69BF}, //4740 #CJK UNIFIED IDEOGRAPH + {0x9EC7, 0x69C1}, //4741 #CJK UNIFIED IDEOGRAPH + {0x9EC8, 0x69D3}, //4742 #CJK UNIFIED IDEOGRAPH + {0x9EC9, 0x69BE}, //4743 #CJK UNIFIED IDEOGRAPH + {0x9ECA, 0x69CE}, //4744 #CJK UNIFIED IDEOGRAPH + {0x9ECB, 0x5BE8}, //4745 #CJK UNIFIED IDEOGRAPH + {0x9ECC, 0x69CA}, //4746 #CJK UNIFIED IDEOGRAPH + {0x9ECD, 0x69DD}, //4747 #CJK UNIFIED IDEOGRAPH + {0x9ECE, 0x69BB}, //4748 #CJK UNIFIED IDEOGRAPH + {0x9ECF, 0x69C3}, //4749 #CJK UNIFIED IDEOGRAPH + {0x9ED0, 0x69A7}, //4750 #CJK UNIFIED IDEOGRAPH + {0x9ED1, 0x6A2E}, //4751 #CJK UNIFIED IDEOGRAPH + {0x9ED2, 0x6991}, //4752 #CJK UNIFIED IDEOGRAPH + {0x9ED3, 0x69A0}, //4753 #CJK UNIFIED IDEOGRAPH + {0x9ED4, 0x699C}, //4754 #CJK UNIFIED IDEOGRAPH + {0x9ED5, 0x6995}, //4755 #CJK UNIFIED IDEOGRAPH + {0x9ED6, 0x69B4}, //4756 #CJK UNIFIED IDEOGRAPH + {0x9ED7, 0x69DE}, //4757 #CJK UNIFIED IDEOGRAPH + {0x9ED8, 0x69E8}, //4758 #CJK UNIFIED IDEOGRAPH + {0x9ED9, 0x6A02}, //4759 #CJK UNIFIED IDEOGRAPH + {0x9EDA, 0x6A1B}, //4760 #CJK UNIFIED IDEOGRAPH + {0x9EDB, 0x69FF}, //4761 #CJK UNIFIED IDEOGRAPH + {0x9EDC, 0x6B0A}, //4762 #CJK UNIFIED IDEOGRAPH + {0x9EDD, 0x69F9}, //4763 #CJK UNIFIED IDEOGRAPH + {0x9EDE, 0x69F2}, //4764 #CJK UNIFIED IDEOGRAPH + {0x9EDF, 0x69E7}, //4765 #CJK UNIFIED IDEOGRAPH + {0x9EE0, 0x6A05}, //4766 #CJK UNIFIED IDEOGRAPH + {0x9EE1, 0x69B1}, //4767 #CJK UNIFIED IDEOGRAPH + {0x9EE2, 0x6A1E}, //4768 #CJK UNIFIED IDEOGRAPH + {0x9EE3, 0x69ED}, //4769 #CJK UNIFIED IDEOGRAPH + {0x9EE4, 0x6A14}, //4770 #CJK UNIFIED IDEOGRAPH + {0x9EE5, 0x69EB}, //4771 #CJK UNIFIED IDEOGRAPH + {0x9EE6, 0x6A0A}, //4772 #CJK UNIFIED IDEOGRAPH + {0x9EE7, 0x6A12}, //4773 #CJK UNIFIED IDEOGRAPH + {0x9EE8, 0x6AC1}, //4774 #CJK UNIFIED IDEOGRAPH + {0x9EE9, 0x6A23}, //4775 #CJK UNIFIED IDEOGRAPH + {0x9EEA, 0x6A13}, //4776 #CJK UNIFIED IDEOGRAPH + {0x9EEB, 0x6A44}, //4777 #CJK UNIFIED IDEOGRAPH + {0x9EEC, 0x6A0C}, //4778 #CJK UNIFIED IDEOGRAPH + {0x9EED, 0x6A72}, //4779 #CJK UNIFIED IDEOGRAPH + {0x9EEE, 0x6A36}, //4780 #CJK UNIFIED IDEOGRAPH + {0x9EEF, 0x6A78}, //4781 #CJK UNIFIED IDEOGRAPH + {0x9EF0, 0x6A47}, //4782 #CJK UNIFIED IDEOGRAPH + {0x9EF1, 0x6A62}, //4783 #CJK UNIFIED IDEOGRAPH + {0x9EF2, 0x6A59}, //4784 #CJK UNIFIED IDEOGRAPH + {0x9EF3, 0x6A66}, //4785 #CJK UNIFIED IDEOGRAPH + {0x9EF4, 0x6A48}, //4786 #CJK UNIFIED IDEOGRAPH + {0x9EF5, 0x6A38}, //4787 #CJK UNIFIED IDEOGRAPH + {0x9EF6, 0x6A22}, //4788 #CJK UNIFIED IDEOGRAPH + {0x9EF7, 0x6A90}, //4789 #CJK UNIFIED IDEOGRAPH + {0x9EF8, 0x6A8D}, //4790 #CJK UNIFIED IDEOGRAPH + {0x9EF9, 0x6AA0}, //4791 #CJK UNIFIED IDEOGRAPH + {0x9EFA, 0x6A84}, //4792 #CJK UNIFIED IDEOGRAPH + {0x9EFB, 0x6AA2}, //4793 #CJK UNIFIED IDEOGRAPH + {0x9EFC, 0x6AA3}, //4794 #CJK UNIFIED IDEOGRAPH + {0x9F40, 0x6A97}, //4795 #CJK UNIFIED IDEOGRAPH + {0x9F41, 0x8617}, //4796 #CJK UNIFIED IDEOGRAPH + {0x9F42, 0x6ABB}, //4797 #CJK UNIFIED IDEOGRAPH + {0x9F43, 0x6AC3}, //4798 #CJK UNIFIED IDEOGRAPH + {0x9F44, 0x6AC2}, //4799 #CJK UNIFIED IDEOGRAPH + {0x9F45, 0x6AB8}, //4800 #CJK UNIFIED IDEOGRAPH + {0x9F46, 0x6AB3}, //4801 #CJK UNIFIED IDEOGRAPH + {0x9F47, 0x6AAC}, //4802 #CJK UNIFIED IDEOGRAPH + {0x9F48, 0x6ADE}, //4803 #CJK UNIFIED IDEOGRAPH + {0x9F49, 0x6AD1}, //4804 #CJK UNIFIED IDEOGRAPH + {0x9F4A, 0x6ADF}, //4805 #CJK UNIFIED IDEOGRAPH + {0x9F4B, 0x6AAA}, //4806 #CJK UNIFIED IDEOGRAPH + {0x9F4C, 0x6ADA}, //4807 #CJK UNIFIED IDEOGRAPH + {0x9F4D, 0x6AEA}, //4808 #CJK UNIFIED IDEOGRAPH + {0x9F4E, 0x6AFB}, //4809 #CJK UNIFIED IDEOGRAPH + {0x9F4F, 0x6B05}, //4810 #CJK UNIFIED IDEOGRAPH + {0x9F50, 0x8616}, //4811 #CJK UNIFIED IDEOGRAPH + {0x9F51, 0x6AFA}, //4812 #CJK UNIFIED IDEOGRAPH + {0x9F52, 0x6B12}, //4813 #CJK UNIFIED IDEOGRAPH + {0x9F53, 0x6B16}, //4814 #CJK UNIFIED IDEOGRAPH + {0x9F54, 0x9B31}, //4815 #CJK UNIFIED IDEOGRAPH + {0x9F55, 0x6B1F}, //4816 #CJK UNIFIED IDEOGRAPH + {0x9F56, 0x6B38}, //4817 #CJK UNIFIED IDEOGRAPH + {0x9F57, 0x6B37}, //4818 #CJK UNIFIED IDEOGRAPH + {0x9F58, 0x76DC}, //4819 #CJK UNIFIED IDEOGRAPH + {0x9F59, 0x6B39}, //4820 #CJK UNIFIED IDEOGRAPH + {0x9F5A, 0x98EE}, //4821 #CJK UNIFIED IDEOGRAPH + {0x9F5B, 0x6B47}, //4822 #CJK UNIFIED IDEOGRAPH + {0x9F5C, 0x6B43}, //4823 #CJK UNIFIED IDEOGRAPH + {0x9F5D, 0x6B49}, //4824 #CJK UNIFIED IDEOGRAPH + {0x9F5E, 0x6B50}, //4825 #CJK UNIFIED IDEOGRAPH + {0x9F5F, 0x6B59}, //4826 #CJK UNIFIED IDEOGRAPH + {0x9F60, 0x6B54}, //4827 #CJK UNIFIED IDEOGRAPH + {0x9F61, 0x6B5B}, //4828 #CJK UNIFIED IDEOGRAPH + {0x9F62, 0x6B5F}, //4829 #CJK UNIFIED IDEOGRAPH + {0x9F63, 0x6B61}, //4830 #CJK UNIFIED IDEOGRAPH + {0x9F64, 0x6B78}, //4831 #CJK UNIFIED IDEOGRAPH + {0x9F65, 0x6B79}, //4832 #CJK UNIFIED IDEOGRAPH + {0x9F66, 0x6B7F}, //4833 #CJK UNIFIED IDEOGRAPH + {0x9F67, 0x6B80}, //4834 #CJK UNIFIED IDEOGRAPH + {0x9F68, 0x6B84}, //4835 #CJK UNIFIED IDEOGRAPH + {0x9F69, 0x6B83}, //4836 #CJK UNIFIED IDEOGRAPH + {0x9F6A, 0x6B8D}, //4837 #CJK UNIFIED IDEOGRAPH + {0x9F6B, 0x6B98}, //4838 #CJK UNIFIED IDEOGRAPH + {0x9F6C, 0x6B95}, //4839 #CJK UNIFIED IDEOGRAPH + {0x9F6D, 0x6B9E}, //4840 #CJK UNIFIED IDEOGRAPH + {0x9F6E, 0x6BA4}, //4841 #CJK UNIFIED IDEOGRAPH + {0x9F6F, 0x6BAA}, //4842 #CJK UNIFIED IDEOGRAPH + {0x9F70, 0x6BAB}, //4843 #CJK UNIFIED IDEOGRAPH + {0x9F71, 0x6BAF}, //4844 #CJK UNIFIED IDEOGRAPH + {0x9F72, 0x6BB2}, //4845 #CJK UNIFIED IDEOGRAPH + {0x9F73, 0x6BB1}, //4846 #CJK UNIFIED IDEOGRAPH + {0x9F74, 0x6BB3}, //4847 #CJK UNIFIED IDEOGRAPH + {0x9F75, 0x6BB7}, //4848 #CJK UNIFIED IDEOGRAPH + {0x9F76, 0x6BBC}, //4849 #CJK UNIFIED IDEOGRAPH + {0x9F77, 0x6BC6}, //4850 #CJK UNIFIED IDEOGRAPH + {0x9F78, 0x6BCB}, //4851 #CJK UNIFIED IDEOGRAPH + {0x9F79, 0x6BD3}, //4852 #CJK UNIFIED IDEOGRAPH + {0x9F7A, 0x6BDF}, //4853 #CJK UNIFIED IDEOGRAPH + {0x9F7B, 0x6BEC}, //4854 #CJK UNIFIED IDEOGRAPH + {0x9F7C, 0x6BEB}, //4855 #CJK UNIFIED IDEOGRAPH + {0x9F7D, 0x6BF3}, //4856 #CJK UNIFIED IDEOGRAPH + {0x9F7E, 0x6BEF}, //4857 #CJK UNIFIED IDEOGRAPH + {0x9F80, 0x9EBE}, //4858 #CJK UNIFIED IDEOGRAPH + {0x9F81, 0x6C08}, //4859 #CJK UNIFIED IDEOGRAPH + {0x9F82, 0x6C13}, //4860 #CJK UNIFIED IDEOGRAPH + {0x9F83, 0x6C14}, //4861 #CJK UNIFIED IDEOGRAPH + {0x9F84, 0x6C1B}, //4862 #CJK UNIFIED IDEOGRAPH + {0x9F85, 0x6C24}, //4863 #CJK UNIFIED IDEOGRAPH + {0x9F86, 0x6C23}, //4864 #CJK UNIFIED IDEOGRAPH + {0x9F87, 0x6C5E}, //4865 #CJK UNIFIED IDEOGRAPH + {0x9F88, 0x6C55}, //4866 #CJK UNIFIED IDEOGRAPH + {0x9F89, 0x6C62}, //4867 #CJK UNIFIED IDEOGRAPH + {0x9F8A, 0x6C6A}, //4868 #CJK UNIFIED IDEOGRAPH + {0x9F8B, 0x6C82}, //4869 #CJK UNIFIED IDEOGRAPH + {0x9F8C, 0x6C8D}, //4870 #CJK UNIFIED IDEOGRAPH + {0x9F8D, 0x6C9A}, //4871 #CJK UNIFIED IDEOGRAPH + {0x9F8E, 0x6C81}, //4872 #CJK UNIFIED IDEOGRAPH + {0x9F8F, 0x6C9B}, //4873 #CJK UNIFIED IDEOGRAPH + {0x9F90, 0x6C7E}, //4874 #CJK UNIFIED IDEOGRAPH + {0x9F91, 0x6C68}, //4875 #CJK UNIFIED IDEOGRAPH + {0x9F92, 0x6C73}, //4876 #CJK UNIFIED IDEOGRAPH + {0x9F93, 0x6C92}, //4877 #CJK UNIFIED IDEOGRAPH + {0x9F94, 0x6C90}, //4878 #CJK UNIFIED IDEOGRAPH + {0x9F95, 0x6CC4}, //4879 #CJK UNIFIED IDEOGRAPH + {0x9F96, 0x6CF1}, //4880 #CJK UNIFIED IDEOGRAPH + {0x9F97, 0x6CD3}, //4881 #CJK UNIFIED IDEOGRAPH + {0x9F98, 0x6CBD}, //4882 #CJK UNIFIED IDEOGRAPH + {0x9F99, 0x6CD7}, //4883 #CJK UNIFIED IDEOGRAPH + {0x9F9A, 0x6CC5}, //4884 #CJK UNIFIED IDEOGRAPH + {0x9F9B, 0x6CDD}, //4885 #CJK UNIFIED IDEOGRAPH + {0x9F9C, 0x6CAE}, //4886 #CJK UNIFIED IDEOGRAPH + {0x9F9D, 0x6CB1}, //4887 #CJK UNIFIED IDEOGRAPH + {0x9F9E, 0x6CBE}, //4888 #CJK UNIFIED IDEOGRAPH + {0x9F9F, 0x6CBA}, //4889 #CJK UNIFIED IDEOGRAPH + {0x9FA0, 0x6CDB}, //4890 #CJK UNIFIED IDEOGRAPH + {0x9FA1, 0x6CEF}, //4891 #CJK UNIFIED IDEOGRAPH + {0x9FA2, 0x6CD9}, //4892 #CJK UNIFIED IDEOGRAPH + {0x9FA3, 0x6CEA}, //4893 #CJK UNIFIED IDEOGRAPH + {0x9FA4, 0x6D1F}, //4894 #CJK UNIFIED IDEOGRAPH + {0x9FA5, 0x884D}, //4895 #CJK UNIFIED IDEOGRAPH + {0x9FA6, 0x6D36}, //4896 #CJK UNIFIED IDEOGRAPH + {0x9FA7, 0x6D2B}, //4897 #CJK UNIFIED IDEOGRAPH + {0x9FA8, 0x6D3D}, //4898 #CJK UNIFIED IDEOGRAPH + {0x9FA9, 0x6D38}, //4899 #CJK UNIFIED IDEOGRAPH + {0x9FAA, 0x6D19}, //4900 #CJK UNIFIED IDEOGRAPH + {0x9FAB, 0x6D35}, //4901 #CJK UNIFIED IDEOGRAPH + {0x9FAC, 0x6D33}, //4902 #CJK UNIFIED IDEOGRAPH + {0x9FAD, 0x6D12}, //4903 #CJK UNIFIED IDEOGRAPH + {0x9FAE, 0x6D0C}, //4904 #CJK UNIFIED IDEOGRAPH + {0x9FAF, 0x6D63}, //4905 #CJK UNIFIED IDEOGRAPH + {0x9FB0, 0x6D93}, //4906 #CJK UNIFIED IDEOGRAPH + {0x9FB1, 0x6D64}, //4907 #CJK UNIFIED IDEOGRAPH + {0x9FB2, 0x6D5A}, //4908 #CJK UNIFIED IDEOGRAPH + {0x9FB3, 0x6D79}, //4909 #CJK UNIFIED IDEOGRAPH + {0x9FB4, 0x6D59}, //4910 #CJK UNIFIED IDEOGRAPH + {0x9FB5, 0x6D8E}, //4911 #CJK UNIFIED IDEOGRAPH + {0x9FB6, 0x6D95}, //4912 #CJK UNIFIED IDEOGRAPH + {0x9FB7, 0x6FE4}, //4913 #CJK UNIFIED IDEOGRAPH + {0x9FB8, 0x6D85}, //4914 #CJK UNIFIED IDEOGRAPH + {0x9FB9, 0x6DF9}, //4915 #CJK UNIFIED IDEOGRAPH + {0x9FBA, 0x6E15}, //4916 #CJK UNIFIED IDEOGRAPH + {0x9FBB, 0x6E0A}, //4917 #CJK UNIFIED IDEOGRAPH + {0x9FBC, 0x6DB5}, //4918 #CJK UNIFIED IDEOGRAPH + {0x9FBD, 0x6DC7}, //4919 #CJK UNIFIED IDEOGRAPH + {0x9FBE, 0x6DE6}, //4920 #CJK UNIFIED IDEOGRAPH + {0x9FBF, 0x6DB8}, //4921 #CJK UNIFIED IDEOGRAPH + {0x9FC0, 0x6DC6}, //4922 #CJK UNIFIED IDEOGRAPH + {0x9FC1, 0x6DEC}, //4923 #CJK UNIFIED IDEOGRAPH + {0x9FC2, 0x6DDE}, //4924 #CJK UNIFIED IDEOGRAPH + {0x9FC3, 0x6DCC}, //4925 #CJK UNIFIED IDEOGRAPH + {0x9FC4, 0x6DE8}, //4926 #CJK UNIFIED IDEOGRAPH + {0x9FC5, 0x6DD2}, //4927 #CJK UNIFIED IDEOGRAPH + {0x9FC6, 0x6DC5}, //4928 #CJK UNIFIED IDEOGRAPH + {0x9FC7, 0x6DFA}, //4929 #CJK UNIFIED IDEOGRAPH + {0x9FC8, 0x6DD9}, //4930 #CJK UNIFIED IDEOGRAPH + {0x9FC9, 0x6DE4}, //4931 #CJK UNIFIED IDEOGRAPH + {0x9FCA, 0x6DD5}, //4932 #CJK UNIFIED IDEOGRAPH + {0x9FCB, 0x6DEA}, //4933 #CJK UNIFIED IDEOGRAPH + {0x9FCC, 0x6DEE}, //4934 #CJK UNIFIED IDEOGRAPH + {0x9FCD, 0x6E2D}, //4935 #CJK UNIFIED IDEOGRAPH + {0x9FCE, 0x6E6E}, //4936 #CJK UNIFIED IDEOGRAPH + {0x9FCF, 0x6E2E}, //4937 #CJK UNIFIED IDEOGRAPH + {0x9FD0, 0x6E19}, //4938 #CJK UNIFIED IDEOGRAPH + {0x9FD1, 0x6E72}, //4939 #CJK UNIFIED IDEOGRAPH + {0x9FD2, 0x6E5F}, //4940 #CJK UNIFIED IDEOGRAPH + {0x9FD3, 0x6E3E}, //4941 #CJK UNIFIED IDEOGRAPH + {0x9FD4, 0x6E23}, //4942 #CJK UNIFIED IDEOGRAPH + {0x9FD5, 0x6E6B}, //4943 #CJK UNIFIED IDEOGRAPH + {0x9FD6, 0x6E2B}, //4944 #CJK UNIFIED IDEOGRAPH + {0x9FD7, 0x6E76}, //4945 #CJK UNIFIED IDEOGRAPH + {0x9FD8, 0x6E4D}, //4946 #CJK UNIFIED IDEOGRAPH + {0x9FD9, 0x6E1F}, //4947 #CJK UNIFIED IDEOGRAPH + {0x9FDA, 0x6E43}, //4948 #CJK UNIFIED IDEOGRAPH + {0x9FDB, 0x6E3A}, //4949 #CJK UNIFIED IDEOGRAPH + {0x9FDC, 0x6E4E}, //4950 #CJK UNIFIED IDEOGRAPH + {0x9FDD, 0x6E24}, //4951 #CJK UNIFIED IDEOGRAPH + {0x9FDE, 0x6EFF}, //4952 #CJK UNIFIED IDEOGRAPH + {0x9FDF, 0x6E1D}, //4953 #CJK UNIFIED IDEOGRAPH + {0x9FE0, 0x6E38}, //4954 #CJK UNIFIED IDEOGRAPH + {0x9FE1, 0x6E82}, //4955 #CJK UNIFIED IDEOGRAPH + {0x9FE2, 0x6EAA}, //4956 #CJK UNIFIED IDEOGRAPH + {0x9FE3, 0x6E98}, //4957 #CJK UNIFIED IDEOGRAPH + {0x9FE4, 0x6EC9}, //4958 #CJK UNIFIED IDEOGRAPH + {0x9FE5, 0x6EB7}, //4959 #CJK UNIFIED IDEOGRAPH + {0x9FE6, 0x6ED3}, //4960 #CJK UNIFIED IDEOGRAPH + {0x9FE7, 0x6EBD}, //4961 #CJK UNIFIED IDEOGRAPH + {0x9FE8, 0x6EAF}, //4962 #CJK UNIFIED IDEOGRAPH + {0x9FE9, 0x6EC4}, //4963 #CJK UNIFIED IDEOGRAPH + {0x9FEA, 0x6EB2}, //4964 #CJK UNIFIED IDEOGRAPH + {0x9FEB, 0x6ED4}, //4965 #CJK UNIFIED IDEOGRAPH + {0x9FEC, 0x6ED5}, //4966 #CJK UNIFIED IDEOGRAPH + {0x9FED, 0x6E8F}, //4967 #CJK UNIFIED IDEOGRAPH + {0x9FEE, 0x6EA5}, //4968 #CJK UNIFIED IDEOGRAPH + {0x9FEF, 0x6EC2}, //4969 #CJK UNIFIED IDEOGRAPH + {0x9FF0, 0x6E9F}, //4970 #CJK UNIFIED IDEOGRAPH + {0x9FF1, 0x6F41}, //4971 #CJK UNIFIED IDEOGRAPH + {0x9FF2, 0x6F11}, //4972 #CJK UNIFIED IDEOGRAPH + {0x9FF3, 0x704C}, //4973 #CJK UNIFIED IDEOGRAPH + {0x9FF4, 0x6EEC}, //4974 #CJK UNIFIED IDEOGRAPH + {0x9FF5, 0x6EF8}, //4975 #CJK UNIFIED IDEOGRAPH + {0x9FF6, 0x6EFE}, //4976 #CJK UNIFIED IDEOGRAPH + {0x9FF7, 0x6F3F}, //4977 #CJK UNIFIED IDEOGRAPH + {0x9FF8, 0x6EF2}, //4978 #CJK UNIFIED IDEOGRAPH + {0x9FF9, 0x6F31}, //4979 #CJK UNIFIED IDEOGRAPH + {0x9FFA, 0x6EEF}, //4980 #CJK UNIFIED IDEOGRAPH + {0x9FFB, 0x6F32}, //4981 #CJK UNIFIED IDEOGRAPH + {0x9FFC, 0x6ECC}, //4982 #CJK UNIFIED IDEOGRAPH + {0xE040, 0x6F3E}, //4983 #CJK UNIFIED IDEOGRAPH + {0xE041, 0x6F13}, //4984 #CJK UNIFIED IDEOGRAPH + {0xE042, 0x6EF7}, //4985 #CJK UNIFIED IDEOGRAPH + {0xE043, 0x6F86}, //4986 #CJK UNIFIED IDEOGRAPH + {0xE044, 0x6F7A}, //4987 #CJK UNIFIED IDEOGRAPH + {0xE045, 0x6F78}, //4988 #CJK UNIFIED IDEOGRAPH + {0xE046, 0x6F81}, //4989 #CJK UNIFIED IDEOGRAPH + {0xE047, 0x6F80}, //4990 #CJK UNIFIED IDEOGRAPH + {0xE048, 0x6F6F}, //4991 #CJK UNIFIED IDEOGRAPH + {0xE049, 0x6F5B}, //4992 #CJK UNIFIED IDEOGRAPH + {0xE04A, 0x6FF3}, //4993 #CJK UNIFIED IDEOGRAPH + {0xE04B, 0x6F6D}, //4994 #CJK UNIFIED IDEOGRAPH + {0xE04C, 0x6F82}, //4995 #CJK UNIFIED IDEOGRAPH + {0xE04D, 0x6F7C}, //4996 #CJK UNIFIED IDEOGRAPH + {0xE04E, 0x6F58}, //4997 #CJK UNIFIED IDEOGRAPH + {0xE04F, 0x6F8E}, //4998 #CJK UNIFIED IDEOGRAPH + {0xE050, 0x6F91}, //4999 #CJK UNIFIED IDEOGRAPH + {0xE051, 0x6FC2}, //5000 #CJK UNIFIED IDEOGRAPH + {0xE052, 0x6F66}, //5001 #CJK UNIFIED IDEOGRAPH + {0xE053, 0x6FB3}, //5002 #CJK UNIFIED IDEOGRAPH + {0xE054, 0x6FA3}, //5003 #CJK UNIFIED IDEOGRAPH + {0xE055, 0x6FA1}, //5004 #CJK UNIFIED IDEOGRAPH + {0xE056, 0x6FA4}, //5005 #CJK UNIFIED IDEOGRAPH + {0xE057, 0x6FB9}, //5006 #CJK UNIFIED IDEOGRAPH + {0xE058, 0x6FC6}, //5007 #CJK UNIFIED IDEOGRAPH + {0xE059, 0x6FAA}, //5008 #CJK UNIFIED IDEOGRAPH + {0xE05A, 0x6FDF}, //5009 #CJK UNIFIED IDEOGRAPH + {0xE05B, 0x6FD5}, //5010 #CJK UNIFIED IDEOGRAPH + {0xE05C, 0x6FEC}, //5011 #CJK UNIFIED IDEOGRAPH + {0xE05D, 0x6FD4}, //5012 #CJK UNIFIED IDEOGRAPH + {0xE05E, 0x6FD8}, //5013 #CJK UNIFIED IDEOGRAPH + {0xE05F, 0x6FF1}, //5014 #CJK UNIFIED IDEOGRAPH + {0xE060, 0x6FEE}, //5015 #CJK UNIFIED IDEOGRAPH + {0xE061, 0x6FDB}, //5016 #CJK UNIFIED IDEOGRAPH + {0xE062, 0x7009}, //5017 #CJK UNIFIED IDEOGRAPH + {0xE063, 0x700B}, //5018 #CJK UNIFIED IDEOGRAPH + {0xE064, 0x6FFA}, //5019 #CJK UNIFIED IDEOGRAPH + {0xE065, 0x7011}, //5020 #CJK UNIFIED IDEOGRAPH + {0xE066, 0x7001}, //5021 #CJK UNIFIED IDEOGRAPH + {0xE067, 0x700F}, //5022 #CJK UNIFIED IDEOGRAPH + {0xE068, 0x6FFE}, //5023 #CJK UNIFIED IDEOGRAPH + {0xE069, 0x701B}, //5024 #CJK UNIFIED IDEOGRAPH + {0xE06A, 0x701A}, //5025 #CJK UNIFIED IDEOGRAPH + {0xE06B, 0x6F74}, //5026 #CJK UNIFIED IDEOGRAPH + {0xE06C, 0x701D}, //5027 #CJK UNIFIED IDEOGRAPH + {0xE06D, 0x7018}, //5028 #CJK UNIFIED IDEOGRAPH + {0xE06E, 0x701F}, //5029 #CJK UNIFIED IDEOGRAPH + {0xE06F, 0x7030}, //5030 #CJK UNIFIED IDEOGRAPH + {0xE070, 0x703E}, //5031 #CJK UNIFIED IDEOGRAPH + {0xE071, 0x7032}, //5032 #CJK UNIFIED IDEOGRAPH + {0xE072, 0x7051}, //5033 #CJK UNIFIED IDEOGRAPH + {0xE073, 0x7063}, //5034 #CJK UNIFIED IDEOGRAPH + {0xE074, 0x7099}, //5035 #CJK UNIFIED IDEOGRAPH + {0xE075, 0x7092}, //5036 #CJK UNIFIED IDEOGRAPH + {0xE076, 0x70AF}, //5037 #CJK UNIFIED IDEOGRAPH + {0xE077, 0x70F1}, //5038 #CJK UNIFIED IDEOGRAPH + {0xE078, 0x70AC}, //5039 #CJK UNIFIED IDEOGRAPH + {0xE079, 0x70B8}, //5040 #CJK UNIFIED IDEOGRAPH + {0xE07A, 0x70B3}, //5041 #CJK UNIFIED IDEOGRAPH + {0xE07B, 0x70AE}, //5042 #CJK UNIFIED IDEOGRAPH + {0xE07C, 0x70DF}, //5043 #CJK UNIFIED IDEOGRAPH + {0xE07D, 0x70CB}, //5044 #CJK UNIFIED IDEOGRAPH + {0xE07E, 0x70DD}, //5045 #CJK UNIFIED IDEOGRAPH + {0xE080, 0x70D9}, //5046 #CJK UNIFIED IDEOGRAPH + {0xE081, 0x7109}, //5047 #CJK UNIFIED IDEOGRAPH + {0xE082, 0x70FD}, //5048 #CJK UNIFIED IDEOGRAPH + {0xE083, 0x711C}, //5049 #CJK UNIFIED IDEOGRAPH + {0xE084, 0x7119}, //5050 #CJK UNIFIED IDEOGRAPH + {0xE085, 0x7165}, //5051 #CJK UNIFIED IDEOGRAPH + {0xE086, 0x7155}, //5052 #CJK UNIFIED IDEOGRAPH + {0xE087, 0x7188}, //5053 #CJK UNIFIED IDEOGRAPH + {0xE088, 0x7166}, //5054 #CJK UNIFIED IDEOGRAPH + {0xE089, 0x7162}, //5055 #CJK UNIFIED IDEOGRAPH + {0xE08A, 0x714C}, //5056 #CJK UNIFIED IDEOGRAPH + {0xE08B, 0x7156}, //5057 #CJK UNIFIED IDEOGRAPH + {0xE08C, 0x716C}, //5058 #CJK UNIFIED IDEOGRAPH + {0xE08D, 0x718F}, //5059 #CJK UNIFIED IDEOGRAPH + {0xE08E, 0x71FB}, //5060 #CJK UNIFIED IDEOGRAPH + {0xE08F, 0x7184}, //5061 #CJK UNIFIED IDEOGRAPH + {0xE090, 0x7195}, //5062 #CJK UNIFIED IDEOGRAPH + {0xE091, 0x71A8}, //5063 #CJK UNIFIED IDEOGRAPH + {0xE092, 0x71AC}, //5064 #CJK UNIFIED IDEOGRAPH + {0xE093, 0x71D7}, //5065 #CJK UNIFIED IDEOGRAPH + {0xE094, 0x71B9}, //5066 #CJK UNIFIED IDEOGRAPH + {0xE095, 0x71BE}, //5067 #CJK UNIFIED IDEOGRAPH + {0xE096, 0x71D2}, //5068 #CJK UNIFIED IDEOGRAPH + {0xE097, 0x71C9}, //5069 #CJK UNIFIED IDEOGRAPH + {0xE098, 0x71D4}, //5070 #CJK UNIFIED IDEOGRAPH + {0xE099, 0x71CE}, //5071 #CJK UNIFIED IDEOGRAPH + {0xE09A, 0x71E0}, //5072 #CJK UNIFIED IDEOGRAPH + {0xE09B, 0x71EC}, //5073 #CJK UNIFIED IDEOGRAPH + {0xE09C, 0x71E7}, //5074 #CJK UNIFIED IDEOGRAPH + {0xE09D, 0x71F5}, //5075 #CJK UNIFIED IDEOGRAPH + {0xE09E, 0x71FC}, //5076 #CJK UNIFIED IDEOGRAPH + {0xE09F, 0x71F9}, //5077 #CJK UNIFIED IDEOGRAPH + {0xE0A0, 0x71FF}, //5078 #CJK UNIFIED IDEOGRAPH + {0xE0A1, 0x720D}, //5079 #CJK UNIFIED IDEOGRAPH + {0xE0A2, 0x7210}, //5080 #CJK UNIFIED IDEOGRAPH + {0xE0A3, 0x721B}, //5081 #CJK UNIFIED IDEOGRAPH + {0xE0A4, 0x7228}, //5082 #CJK UNIFIED IDEOGRAPH + {0xE0A5, 0x722D}, //5083 #CJK UNIFIED IDEOGRAPH + {0xE0A6, 0x722C}, //5084 #CJK UNIFIED IDEOGRAPH + {0xE0A7, 0x7230}, //5085 #CJK UNIFIED IDEOGRAPH + {0xE0A8, 0x7232}, //5086 #CJK UNIFIED IDEOGRAPH + {0xE0A9, 0x723B}, //5087 #CJK UNIFIED IDEOGRAPH + {0xE0AA, 0x723C}, //5088 #CJK UNIFIED IDEOGRAPH + {0xE0AB, 0x723F}, //5089 #CJK UNIFIED IDEOGRAPH + {0xE0AC, 0x7240}, //5090 #CJK UNIFIED IDEOGRAPH + {0xE0AD, 0x7246}, //5091 #CJK UNIFIED IDEOGRAPH + {0xE0AE, 0x724B}, //5092 #CJK UNIFIED IDEOGRAPH + {0xE0AF, 0x7258}, //5093 #CJK UNIFIED IDEOGRAPH + {0xE0B0, 0x7274}, //5094 #CJK UNIFIED IDEOGRAPH + {0xE0B1, 0x727E}, //5095 #CJK UNIFIED IDEOGRAPH + {0xE0B2, 0x7282}, //5096 #CJK UNIFIED IDEOGRAPH + {0xE0B3, 0x7281}, //5097 #CJK UNIFIED IDEOGRAPH + {0xE0B4, 0x7287}, //5098 #CJK UNIFIED IDEOGRAPH + {0xE0B5, 0x7292}, //5099 #CJK UNIFIED IDEOGRAPH + {0xE0B6, 0x7296}, //5100 #CJK UNIFIED IDEOGRAPH + {0xE0B7, 0x72A2}, //5101 #CJK UNIFIED IDEOGRAPH + {0xE0B8, 0x72A7}, //5102 #CJK UNIFIED IDEOGRAPH + {0xE0B9, 0x72B9}, //5103 #CJK UNIFIED IDEOGRAPH + {0xE0BA, 0x72B2}, //5104 #CJK UNIFIED IDEOGRAPH + {0xE0BB, 0x72C3}, //5105 #CJK UNIFIED IDEOGRAPH + {0xE0BC, 0x72C6}, //5106 #CJK UNIFIED IDEOGRAPH + {0xE0BD, 0x72C4}, //5107 #CJK UNIFIED IDEOGRAPH + {0xE0BE, 0x72CE}, //5108 #CJK UNIFIED IDEOGRAPH + {0xE0BF, 0x72D2}, //5109 #CJK UNIFIED IDEOGRAPH + {0xE0C0, 0x72E2}, //5110 #CJK UNIFIED IDEOGRAPH + {0xE0C1, 0x72E0}, //5111 #CJK UNIFIED IDEOGRAPH + {0xE0C2, 0x72E1}, //5112 #CJK UNIFIED IDEOGRAPH + {0xE0C3, 0x72F9}, //5113 #CJK UNIFIED IDEOGRAPH + {0xE0C4, 0x72F7}, //5114 #CJK UNIFIED IDEOGRAPH + {0xE0C5, 0x500F}, //5115 #CJK UNIFIED IDEOGRAPH + {0xE0C6, 0x7317}, //5116 #CJK UNIFIED IDEOGRAPH + {0xE0C7, 0x730A}, //5117 #CJK UNIFIED IDEOGRAPH + {0xE0C8, 0x731C}, //5118 #CJK UNIFIED IDEOGRAPH + {0xE0C9, 0x7316}, //5119 #CJK UNIFIED IDEOGRAPH + {0xE0CA, 0x731D}, //5120 #CJK UNIFIED IDEOGRAPH + {0xE0CB, 0x7334}, //5121 #CJK UNIFIED IDEOGRAPH + {0xE0CC, 0x732F}, //5122 #CJK UNIFIED IDEOGRAPH + {0xE0CD, 0x7329}, //5123 #CJK UNIFIED IDEOGRAPH + {0xE0CE, 0x7325}, //5124 #CJK UNIFIED IDEOGRAPH + {0xE0CF, 0x733E}, //5125 #CJK UNIFIED IDEOGRAPH + {0xE0D0, 0x734E}, //5126 #CJK UNIFIED IDEOGRAPH + {0xE0D1, 0x734F}, //5127 #CJK UNIFIED IDEOGRAPH + {0xE0D2, 0x9ED8}, //5128 #CJK UNIFIED IDEOGRAPH + {0xE0D3, 0x7357}, //5129 #CJK UNIFIED IDEOGRAPH + {0xE0D4, 0x736A}, //5130 #CJK UNIFIED IDEOGRAPH + {0xE0D5, 0x7368}, //5131 #CJK UNIFIED IDEOGRAPH + {0xE0D6, 0x7370}, //5132 #CJK UNIFIED IDEOGRAPH + {0xE0D7, 0x7378}, //5133 #CJK UNIFIED IDEOGRAPH + {0xE0D8, 0x7375}, //5134 #CJK UNIFIED IDEOGRAPH + {0xE0D9, 0x737B}, //5135 #CJK UNIFIED IDEOGRAPH + {0xE0DA, 0x737A}, //5136 #CJK UNIFIED IDEOGRAPH + {0xE0DB, 0x73C8}, //5137 #CJK UNIFIED IDEOGRAPH + {0xE0DC, 0x73B3}, //5138 #CJK UNIFIED IDEOGRAPH + {0xE0DD, 0x73CE}, //5139 #CJK UNIFIED IDEOGRAPH + {0xE0DE, 0x73BB}, //5140 #CJK UNIFIED IDEOGRAPH + {0xE0DF, 0x73C0}, //5141 #CJK UNIFIED IDEOGRAPH + {0xE0E0, 0x73E5}, //5142 #CJK UNIFIED IDEOGRAPH + {0xE0E1, 0x73EE}, //5143 #CJK UNIFIED IDEOGRAPH + {0xE0E2, 0x73DE}, //5144 #CJK UNIFIED IDEOGRAPH + {0xE0E3, 0x74A2}, //5145 #CJK UNIFIED IDEOGRAPH + {0xE0E4, 0x7405}, //5146 #CJK UNIFIED IDEOGRAPH + {0xE0E5, 0x746F}, //5147 #CJK UNIFIED IDEOGRAPH + {0xE0E6, 0x7425}, //5148 #CJK UNIFIED IDEOGRAPH + {0xE0E7, 0x73F8}, //5149 #CJK UNIFIED IDEOGRAPH + {0xE0E8, 0x7432}, //5150 #CJK UNIFIED IDEOGRAPH + {0xE0E9, 0x743A}, //5151 #CJK UNIFIED IDEOGRAPH + {0xE0EA, 0x7455}, //5152 #CJK UNIFIED IDEOGRAPH + {0xE0EB, 0x743F}, //5153 #CJK UNIFIED IDEOGRAPH + {0xE0EC, 0x745F}, //5154 #CJK UNIFIED IDEOGRAPH + {0xE0ED, 0x7459}, //5155 #CJK UNIFIED IDEOGRAPH + {0xE0EE, 0x7441}, //5156 #CJK UNIFIED IDEOGRAPH + {0xE0EF, 0x745C}, //5157 #CJK UNIFIED IDEOGRAPH + {0xE0F0, 0x7469}, //5158 #CJK UNIFIED IDEOGRAPH + {0xE0F1, 0x7470}, //5159 #CJK UNIFIED IDEOGRAPH + {0xE0F2, 0x7463}, //5160 #CJK UNIFIED IDEOGRAPH + {0xE0F3, 0x746A}, //5161 #CJK UNIFIED IDEOGRAPH + {0xE0F4, 0x7476}, //5162 #CJK UNIFIED IDEOGRAPH + {0xE0F5, 0x747E}, //5163 #CJK UNIFIED IDEOGRAPH + {0xE0F6, 0x748B}, //5164 #CJK UNIFIED IDEOGRAPH + {0xE0F7, 0x749E}, //5165 #CJK UNIFIED IDEOGRAPH + {0xE0F8, 0x74A7}, //5166 #CJK UNIFIED IDEOGRAPH + {0xE0F9, 0x74CA}, //5167 #CJK UNIFIED IDEOGRAPH + {0xE0FA, 0x74CF}, //5168 #CJK UNIFIED IDEOGRAPH + {0xE0FB, 0x74D4}, //5169 #CJK UNIFIED IDEOGRAPH + {0xE0FC, 0x73F1}, //5170 #CJK UNIFIED IDEOGRAPH + {0xE140, 0x74E0}, //5171 #CJK UNIFIED IDEOGRAPH + {0xE141, 0x74E3}, //5172 #CJK UNIFIED IDEOGRAPH + {0xE142, 0x74E7}, //5173 #CJK UNIFIED IDEOGRAPH + {0xE143, 0x74E9}, //5174 #CJK UNIFIED IDEOGRAPH + {0xE144, 0x74EE}, //5175 #CJK UNIFIED IDEOGRAPH + {0xE145, 0x74F2}, //5176 #CJK UNIFIED IDEOGRAPH + {0xE146, 0x74F0}, //5177 #CJK UNIFIED IDEOGRAPH + {0xE147, 0x74F1}, //5178 #CJK UNIFIED IDEOGRAPH + {0xE148, 0x74F8}, //5179 #CJK UNIFIED IDEOGRAPH + {0xE149, 0x74F7}, //5180 #CJK UNIFIED IDEOGRAPH + {0xE14A, 0x7504}, //5181 #CJK UNIFIED IDEOGRAPH + {0xE14B, 0x7503}, //5182 #CJK UNIFIED IDEOGRAPH + {0xE14C, 0x7505}, //5183 #CJK UNIFIED IDEOGRAPH + {0xE14D, 0x750C}, //5184 #CJK UNIFIED IDEOGRAPH + {0xE14E, 0x750E}, //5185 #CJK UNIFIED IDEOGRAPH + {0xE14F, 0x750D}, //5186 #CJK UNIFIED IDEOGRAPH + {0xE150, 0x7515}, //5187 #CJK UNIFIED IDEOGRAPH + {0xE151, 0x7513}, //5188 #CJK UNIFIED IDEOGRAPH + {0xE152, 0x751E}, //5189 #CJK UNIFIED IDEOGRAPH + {0xE153, 0x7526}, //5190 #CJK UNIFIED IDEOGRAPH + {0xE154, 0x752C}, //5191 #CJK UNIFIED IDEOGRAPH + {0xE155, 0x753C}, //5192 #CJK UNIFIED IDEOGRAPH + {0xE156, 0x7544}, //5193 #CJK UNIFIED IDEOGRAPH + {0xE157, 0x754D}, //5194 #CJK UNIFIED IDEOGRAPH + {0xE158, 0x754A}, //5195 #CJK UNIFIED IDEOGRAPH + {0xE159, 0x7549}, //5196 #CJK UNIFIED IDEOGRAPH + {0xE15A, 0x755B}, //5197 #CJK UNIFIED IDEOGRAPH + {0xE15B, 0x7546}, //5198 #CJK UNIFIED IDEOGRAPH + {0xE15C, 0x755A}, //5199 #CJK UNIFIED IDEOGRAPH + {0xE15D, 0x7569}, //5200 #CJK UNIFIED IDEOGRAPH + {0xE15E, 0x7564}, //5201 #CJK UNIFIED IDEOGRAPH + {0xE15F, 0x7567}, //5202 #CJK UNIFIED IDEOGRAPH + {0xE160, 0x756B}, //5203 #CJK UNIFIED IDEOGRAPH + {0xE161, 0x756D}, //5204 #CJK UNIFIED IDEOGRAPH + {0xE162, 0x7578}, //5205 #CJK UNIFIED IDEOGRAPH + {0xE163, 0x7576}, //5206 #CJK UNIFIED IDEOGRAPH + {0xE164, 0x7586}, //5207 #CJK UNIFIED IDEOGRAPH + {0xE165, 0x7587}, //5208 #CJK UNIFIED IDEOGRAPH + {0xE166, 0x7574}, //5209 #CJK UNIFIED IDEOGRAPH + {0xE167, 0x758A}, //5210 #CJK UNIFIED IDEOGRAPH + {0xE168, 0x7589}, //5211 #CJK UNIFIED IDEOGRAPH + {0xE169, 0x7582}, //5212 #CJK UNIFIED IDEOGRAPH + {0xE16A, 0x7594}, //5213 #CJK UNIFIED IDEOGRAPH + {0xE16B, 0x759A}, //5214 #CJK UNIFIED IDEOGRAPH + {0xE16C, 0x759D}, //5215 #CJK UNIFIED IDEOGRAPH + {0xE16D, 0x75A5}, //5216 #CJK UNIFIED IDEOGRAPH + {0xE16E, 0x75A3}, //5217 #CJK UNIFIED IDEOGRAPH + {0xE16F, 0x75C2}, //5218 #CJK UNIFIED IDEOGRAPH + {0xE170, 0x75B3}, //5219 #CJK UNIFIED IDEOGRAPH + {0xE171, 0x75C3}, //5220 #CJK UNIFIED IDEOGRAPH + {0xE172, 0x75B5}, //5221 #CJK UNIFIED IDEOGRAPH + {0xE173, 0x75BD}, //5222 #CJK UNIFIED IDEOGRAPH + {0xE174, 0x75B8}, //5223 #CJK UNIFIED IDEOGRAPH + {0xE175, 0x75BC}, //5224 #CJK UNIFIED IDEOGRAPH + {0xE176, 0x75B1}, //5225 #CJK UNIFIED IDEOGRAPH + {0xE177, 0x75CD}, //5226 #CJK UNIFIED IDEOGRAPH + {0xE178, 0x75CA}, //5227 #CJK UNIFIED IDEOGRAPH + {0xE179, 0x75D2}, //5228 #CJK UNIFIED IDEOGRAPH + {0xE17A, 0x75D9}, //5229 #CJK UNIFIED IDEOGRAPH + {0xE17B, 0x75E3}, //5230 #CJK UNIFIED IDEOGRAPH + {0xE17C, 0x75DE}, //5231 #CJK UNIFIED IDEOGRAPH + {0xE17D, 0x75FE}, //5232 #CJK UNIFIED IDEOGRAPH + {0xE17E, 0x75FF}, //5233 #CJK UNIFIED IDEOGRAPH + {0xE180, 0x75FC}, //5234 #CJK UNIFIED IDEOGRAPH + {0xE181, 0x7601}, //5235 #CJK UNIFIED IDEOGRAPH + {0xE182, 0x75F0}, //5236 #CJK UNIFIED IDEOGRAPH + {0xE183, 0x75FA}, //5237 #CJK UNIFIED IDEOGRAPH + {0xE184, 0x75F2}, //5238 #CJK UNIFIED IDEOGRAPH + {0xE185, 0x75F3}, //5239 #CJK UNIFIED IDEOGRAPH + {0xE186, 0x760B}, //5240 #CJK UNIFIED IDEOGRAPH + {0xE187, 0x760D}, //5241 #CJK UNIFIED IDEOGRAPH + {0xE188, 0x7609}, //5242 #CJK UNIFIED IDEOGRAPH + {0xE189, 0x761F}, //5243 #CJK UNIFIED IDEOGRAPH + {0xE18A, 0x7627}, //5244 #CJK UNIFIED IDEOGRAPH + {0xE18B, 0x7620}, //5245 #CJK UNIFIED IDEOGRAPH + {0xE18C, 0x7621}, //5246 #CJK UNIFIED IDEOGRAPH + {0xE18D, 0x7622}, //5247 #CJK UNIFIED IDEOGRAPH + {0xE18E, 0x7624}, //5248 #CJK UNIFIED IDEOGRAPH + {0xE18F, 0x7634}, //5249 #CJK UNIFIED IDEOGRAPH + {0xE190, 0x7630}, //5250 #CJK UNIFIED IDEOGRAPH + {0xE191, 0x763B}, //5251 #CJK UNIFIED IDEOGRAPH + {0xE192, 0x7647}, //5252 #CJK UNIFIED IDEOGRAPH + {0xE193, 0x7648}, //5253 #CJK UNIFIED IDEOGRAPH + {0xE194, 0x7646}, //5254 #CJK UNIFIED IDEOGRAPH + {0xE195, 0x765C}, //5255 #CJK UNIFIED IDEOGRAPH + {0xE196, 0x7658}, //5256 #CJK UNIFIED IDEOGRAPH + {0xE197, 0x7661}, //5257 #CJK UNIFIED IDEOGRAPH + {0xE198, 0x7662}, //5258 #CJK UNIFIED IDEOGRAPH + {0xE199, 0x7668}, //5259 #CJK UNIFIED IDEOGRAPH + {0xE19A, 0x7669}, //5260 #CJK UNIFIED IDEOGRAPH + {0xE19B, 0x766A}, //5261 #CJK UNIFIED IDEOGRAPH + {0xE19C, 0x7667}, //5262 #CJK UNIFIED IDEOGRAPH + {0xE19D, 0x766C}, //5263 #CJK UNIFIED IDEOGRAPH + {0xE19E, 0x7670}, //5264 #CJK UNIFIED IDEOGRAPH + {0xE19F, 0x7672}, //5265 #CJK UNIFIED IDEOGRAPH + {0xE1A0, 0x7676}, //5266 #CJK UNIFIED IDEOGRAPH + {0xE1A1, 0x7678}, //5267 #CJK UNIFIED IDEOGRAPH + {0xE1A2, 0x767C}, //5268 #CJK UNIFIED IDEOGRAPH + {0xE1A3, 0x7680}, //5269 #CJK UNIFIED IDEOGRAPH + {0xE1A4, 0x7683}, //5270 #CJK UNIFIED IDEOGRAPH + {0xE1A5, 0x7688}, //5271 #CJK UNIFIED IDEOGRAPH + {0xE1A6, 0x768B}, //5272 #CJK UNIFIED IDEOGRAPH + {0xE1A7, 0x768E}, //5273 #CJK UNIFIED IDEOGRAPH + {0xE1A8, 0x7696}, //5274 #CJK UNIFIED IDEOGRAPH + {0xE1A9, 0x7693}, //5275 #CJK UNIFIED IDEOGRAPH + {0xE1AA, 0x7699}, //5276 #CJK UNIFIED IDEOGRAPH + {0xE1AB, 0x769A}, //5277 #CJK UNIFIED IDEOGRAPH + {0xE1AC, 0x76B0}, //5278 #CJK UNIFIED IDEOGRAPH + {0xE1AD, 0x76B4}, //5279 #CJK UNIFIED IDEOGRAPH + {0xE1AE, 0x76B8}, //5280 #CJK UNIFIED IDEOGRAPH + {0xE1AF, 0x76B9}, //5281 #CJK UNIFIED IDEOGRAPH + {0xE1B0, 0x76BA}, //5282 #CJK UNIFIED IDEOGRAPH + {0xE1B1, 0x76C2}, //5283 #CJK UNIFIED IDEOGRAPH + {0xE1B2, 0x76CD}, //5284 #CJK UNIFIED IDEOGRAPH + {0xE1B3, 0x76D6}, //5285 #CJK UNIFIED IDEOGRAPH + {0xE1B4, 0x76D2}, //5286 #CJK UNIFIED IDEOGRAPH + {0xE1B5, 0x76DE}, //5287 #CJK UNIFIED IDEOGRAPH + {0xE1B6, 0x76E1}, //5288 #CJK UNIFIED IDEOGRAPH + {0xE1B7, 0x76E5}, //5289 #CJK UNIFIED IDEOGRAPH + {0xE1B8, 0x76E7}, //5290 #CJK UNIFIED IDEOGRAPH + {0xE1B9, 0x76EA}, //5291 #CJK UNIFIED IDEOGRAPH + {0xE1BA, 0x862F}, //5292 #CJK UNIFIED IDEOGRAPH + {0xE1BB, 0x76FB}, //5293 #CJK UNIFIED IDEOGRAPH + {0xE1BC, 0x7708}, //5294 #CJK UNIFIED IDEOGRAPH + {0xE1BD, 0x7707}, //5295 #CJK UNIFIED IDEOGRAPH + {0xE1BE, 0x7704}, //5296 #CJK UNIFIED IDEOGRAPH + {0xE1BF, 0x7729}, //5297 #CJK UNIFIED IDEOGRAPH + {0xE1C0, 0x7724}, //5298 #CJK UNIFIED IDEOGRAPH + {0xE1C1, 0x771E}, //5299 #CJK UNIFIED IDEOGRAPH + {0xE1C2, 0x7725}, //5300 #CJK UNIFIED IDEOGRAPH + {0xE1C3, 0x7726}, //5301 #CJK UNIFIED IDEOGRAPH + {0xE1C4, 0x771B}, //5302 #CJK UNIFIED IDEOGRAPH + {0xE1C5, 0x7737}, //5303 #CJK UNIFIED IDEOGRAPH + {0xE1C6, 0x7738}, //5304 #CJK UNIFIED IDEOGRAPH + {0xE1C7, 0x7747}, //5305 #CJK UNIFIED IDEOGRAPH + {0xE1C8, 0x775A}, //5306 #CJK UNIFIED IDEOGRAPH + {0xE1C9, 0x7768}, //5307 #CJK UNIFIED IDEOGRAPH + {0xE1CA, 0x776B}, //5308 #CJK UNIFIED IDEOGRAPH + {0xE1CB, 0x775B}, //5309 #CJK UNIFIED IDEOGRAPH + {0xE1CC, 0x7765}, //5310 #CJK UNIFIED IDEOGRAPH + {0xE1CD, 0x777F}, //5311 #CJK UNIFIED IDEOGRAPH + {0xE1CE, 0x777E}, //5312 #CJK UNIFIED IDEOGRAPH + {0xE1CF, 0x7779}, //5313 #CJK UNIFIED IDEOGRAPH + {0xE1D0, 0x778E}, //5314 #CJK UNIFIED IDEOGRAPH + {0xE1D1, 0x778B}, //5315 #CJK UNIFIED IDEOGRAPH + {0xE1D2, 0x7791}, //5316 #CJK UNIFIED IDEOGRAPH + {0xE1D3, 0x77A0}, //5317 #CJK UNIFIED IDEOGRAPH + {0xE1D4, 0x779E}, //5318 #CJK UNIFIED IDEOGRAPH + {0xE1D5, 0x77B0}, //5319 #CJK UNIFIED IDEOGRAPH + {0xE1D6, 0x77B6}, //5320 #CJK UNIFIED IDEOGRAPH + {0xE1D7, 0x77B9}, //5321 #CJK UNIFIED IDEOGRAPH + {0xE1D8, 0x77BF}, //5322 #CJK UNIFIED IDEOGRAPH + {0xE1D9, 0x77BC}, //5323 #CJK UNIFIED IDEOGRAPH + {0xE1DA, 0x77BD}, //5324 #CJK UNIFIED IDEOGRAPH + {0xE1DB, 0x77BB}, //5325 #CJK UNIFIED IDEOGRAPH + {0xE1DC, 0x77C7}, //5326 #CJK UNIFIED IDEOGRAPH + {0xE1DD, 0x77CD}, //5327 #CJK UNIFIED IDEOGRAPH + {0xE1DE, 0x77D7}, //5328 #CJK UNIFIED IDEOGRAPH + {0xE1DF, 0x77DA}, //5329 #CJK UNIFIED IDEOGRAPH + {0xE1E0, 0x77DC}, //5330 #CJK UNIFIED IDEOGRAPH + {0xE1E1, 0x77E3}, //5331 #CJK UNIFIED IDEOGRAPH + {0xE1E2, 0x77EE}, //5332 #CJK UNIFIED IDEOGRAPH + {0xE1E3, 0x77FC}, //5333 #CJK UNIFIED IDEOGRAPH + {0xE1E4, 0x780C}, //5334 #CJK UNIFIED IDEOGRAPH + {0xE1E5, 0x7812}, //5335 #CJK UNIFIED IDEOGRAPH + {0xE1E6, 0x7926}, //5336 #CJK UNIFIED IDEOGRAPH + {0xE1E7, 0x7820}, //5337 #CJK UNIFIED IDEOGRAPH + {0xE1E8, 0x792A}, //5338 #CJK UNIFIED IDEOGRAPH + {0xE1E9, 0x7845}, //5339 #CJK UNIFIED IDEOGRAPH + {0xE1EA, 0x788E}, //5340 #CJK UNIFIED IDEOGRAPH + {0xE1EB, 0x7874}, //5341 #CJK UNIFIED IDEOGRAPH + {0xE1EC, 0x7886}, //5342 #CJK UNIFIED IDEOGRAPH + {0xE1ED, 0x787C}, //5343 #CJK UNIFIED IDEOGRAPH + {0xE1EE, 0x789A}, //5344 #CJK UNIFIED IDEOGRAPH + {0xE1EF, 0x788C}, //5345 #CJK UNIFIED IDEOGRAPH + {0xE1F0, 0x78A3}, //5346 #CJK UNIFIED IDEOGRAPH + {0xE1F1, 0x78B5}, //5347 #CJK UNIFIED IDEOGRAPH + {0xE1F2, 0x78AA}, //5348 #CJK UNIFIED IDEOGRAPH + {0xE1F3, 0x78AF}, //5349 #CJK UNIFIED IDEOGRAPH + {0xE1F4, 0x78D1}, //5350 #CJK UNIFIED IDEOGRAPH + {0xE1F5, 0x78C6}, //5351 #CJK UNIFIED IDEOGRAPH + {0xE1F6, 0x78CB}, //5352 #CJK UNIFIED IDEOGRAPH + {0xE1F7, 0x78D4}, //5353 #CJK UNIFIED IDEOGRAPH + {0xE1F8, 0x78BE}, //5354 #CJK UNIFIED IDEOGRAPH + {0xE1F9, 0x78BC}, //5355 #CJK UNIFIED IDEOGRAPH + {0xE1FA, 0x78C5}, //5356 #CJK UNIFIED IDEOGRAPH + {0xE1FB, 0x78CA}, //5357 #CJK UNIFIED IDEOGRAPH + {0xE1FC, 0x78EC}, //5358 #CJK UNIFIED IDEOGRAPH + {0xE240, 0x78E7}, //5359 #CJK UNIFIED IDEOGRAPH + {0xE241, 0x78DA}, //5360 #CJK UNIFIED IDEOGRAPH + {0xE242, 0x78FD}, //5361 #CJK UNIFIED IDEOGRAPH + {0xE243, 0x78F4}, //5362 #CJK UNIFIED IDEOGRAPH + {0xE244, 0x7907}, //5363 #CJK UNIFIED IDEOGRAPH + {0xE245, 0x7912}, //5364 #CJK UNIFIED IDEOGRAPH + {0xE246, 0x7911}, //5365 #CJK UNIFIED IDEOGRAPH + {0xE247, 0x7919}, //5366 #CJK UNIFIED IDEOGRAPH + {0xE248, 0x792C}, //5367 #CJK UNIFIED IDEOGRAPH + {0xE249, 0x792B}, //5368 #CJK UNIFIED IDEOGRAPH + {0xE24A, 0x7940}, //5369 #CJK UNIFIED IDEOGRAPH + {0xE24B, 0x7960}, //5370 #CJK UNIFIED IDEOGRAPH + {0xE24C, 0x7957}, //5371 #CJK UNIFIED IDEOGRAPH + {0xE24D, 0x795F}, //5372 #CJK UNIFIED IDEOGRAPH + {0xE24E, 0x795A}, //5373 #CJK UNIFIED IDEOGRAPH + {0xE24F, 0x7955}, //5374 #CJK UNIFIED IDEOGRAPH + {0xE250, 0x7953}, //5375 #CJK UNIFIED IDEOGRAPH + {0xE251, 0x797A}, //5376 #CJK UNIFIED IDEOGRAPH + {0xE252, 0x797F}, //5377 #CJK UNIFIED IDEOGRAPH + {0xE253, 0x798A}, //5378 #CJK UNIFIED IDEOGRAPH + {0xE254, 0x799D}, //5379 #CJK UNIFIED IDEOGRAPH + {0xE255, 0x79A7}, //5380 #CJK UNIFIED IDEOGRAPH + {0xE256, 0x9F4B}, //5381 #CJK UNIFIED IDEOGRAPH + {0xE257, 0x79AA}, //5382 #CJK UNIFIED IDEOGRAPH + {0xE258, 0x79AE}, //5383 #CJK UNIFIED IDEOGRAPH + {0xE259, 0x79B3}, //5384 #CJK UNIFIED IDEOGRAPH + {0xE25A, 0x79B9}, //5385 #CJK UNIFIED IDEOGRAPH + {0xE25B, 0x79BA}, //5386 #CJK UNIFIED IDEOGRAPH + {0xE25C, 0x79C9}, //5387 #CJK UNIFIED IDEOGRAPH + {0xE25D, 0x79D5}, //5388 #CJK UNIFIED IDEOGRAPH + {0xE25E, 0x79E7}, //5389 #CJK UNIFIED IDEOGRAPH + {0xE25F, 0x79EC}, //5390 #CJK UNIFIED IDEOGRAPH + {0xE260, 0x79E1}, //5391 #CJK UNIFIED IDEOGRAPH + {0xE261, 0x79E3}, //5392 #CJK UNIFIED IDEOGRAPH + {0xE262, 0x7A08}, //5393 #CJK UNIFIED IDEOGRAPH + {0xE263, 0x7A0D}, //5394 #CJK UNIFIED IDEOGRAPH + {0xE264, 0x7A18}, //5395 #CJK UNIFIED IDEOGRAPH + {0xE265, 0x7A19}, //5396 #CJK UNIFIED IDEOGRAPH + {0xE266, 0x7A20}, //5397 #CJK UNIFIED IDEOGRAPH + {0xE267, 0x7A1F}, //5398 #CJK UNIFIED IDEOGRAPH + {0xE268, 0x7980}, //5399 #CJK UNIFIED IDEOGRAPH + {0xE269, 0x7A31}, //5400 #CJK UNIFIED IDEOGRAPH + {0xE26A, 0x7A3B}, //5401 #CJK UNIFIED IDEOGRAPH + {0xE26B, 0x7A3E}, //5402 #CJK UNIFIED IDEOGRAPH + {0xE26C, 0x7A37}, //5403 #CJK UNIFIED IDEOGRAPH + {0xE26D, 0x7A43}, //5404 #CJK UNIFIED IDEOGRAPH + {0xE26E, 0x7A57}, //5405 #CJK UNIFIED IDEOGRAPH + {0xE26F, 0x7A49}, //5406 #CJK UNIFIED IDEOGRAPH + {0xE270, 0x7A61}, //5407 #CJK UNIFIED IDEOGRAPH + {0xE271, 0x7A62}, //5408 #CJK UNIFIED IDEOGRAPH + {0xE272, 0x7A69}, //5409 #CJK UNIFIED IDEOGRAPH + {0xE273, 0x9F9D}, //5410 #CJK UNIFIED IDEOGRAPH + {0xE274, 0x7A70}, //5411 #CJK UNIFIED IDEOGRAPH + {0xE275, 0x7A79}, //5412 #CJK UNIFIED IDEOGRAPH + {0xE276, 0x7A7D}, //5413 #CJK UNIFIED IDEOGRAPH + {0xE277, 0x7A88}, //5414 #CJK UNIFIED IDEOGRAPH + {0xE278, 0x7A97}, //5415 #CJK UNIFIED IDEOGRAPH + {0xE279, 0x7A95}, //5416 #CJK UNIFIED IDEOGRAPH + {0xE27A, 0x7A98}, //5417 #CJK UNIFIED IDEOGRAPH + {0xE27B, 0x7A96}, //5418 #CJK UNIFIED IDEOGRAPH + {0xE27C, 0x7AA9}, //5419 #CJK UNIFIED IDEOGRAPH + {0xE27D, 0x7AC8}, //5420 #CJK UNIFIED IDEOGRAPH + {0xE27E, 0x7AB0}, //5421 #CJK UNIFIED IDEOGRAPH + {0xE280, 0x7AB6}, //5422 #CJK UNIFIED IDEOGRAPH + {0xE281, 0x7AC5}, //5423 #CJK UNIFIED IDEOGRAPH + {0xE282, 0x7AC4}, //5424 #CJK UNIFIED IDEOGRAPH + {0xE283, 0x7ABF}, //5425 #CJK UNIFIED IDEOGRAPH + {0xE284, 0x9083}, //5426 #CJK UNIFIED IDEOGRAPH + {0xE285, 0x7AC7}, //5427 #CJK UNIFIED IDEOGRAPH + {0xE286, 0x7ACA}, //5428 #CJK UNIFIED IDEOGRAPH + {0xE287, 0x7ACD}, //5429 #CJK UNIFIED IDEOGRAPH + {0xE288, 0x7ACF}, //5430 #CJK UNIFIED IDEOGRAPH + {0xE289, 0x7AD5}, //5431 #CJK UNIFIED IDEOGRAPH + {0xE28A, 0x7AD3}, //5432 #CJK UNIFIED IDEOGRAPH + {0xE28B, 0x7AD9}, //5433 #CJK UNIFIED IDEOGRAPH + {0xE28C, 0x7ADA}, //5434 #CJK UNIFIED IDEOGRAPH + {0xE28D, 0x7ADD}, //5435 #CJK UNIFIED IDEOGRAPH + {0xE28E, 0x7AE1}, //5436 #CJK UNIFIED IDEOGRAPH + {0xE28F, 0x7AE2}, //5437 #CJK UNIFIED IDEOGRAPH + {0xE290, 0x7AE6}, //5438 #CJK UNIFIED IDEOGRAPH + {0xE291, 0x7AED}, //5439 #CJK UNIFIED IDEOGRAPH + {0xE292, 0x7AF0}, //5440 #CJK UNIFIED IDEOGRAPH + {0xE293, 0x7B02}, //5441 #CJK UNIFIED IDEOGRAPH + {0xE294, 0x7B0F}, //5442 #CJK UNIFIED IDEOGRAPH + {0xE295, 0x7B0A}, //5443 #CJK UNIFIED IDEOGRAPH + {0xE296, 0x7B06}, //5444 #CJK UNIFIED IDEOGRAPH + {0xE297, 0x7B33}, //5445 #CJK UNIFIED IDEOGRAPH + {0xE298, 0x7B18}, //5446 #CJK UNIFIED IDEOGRAPH + {0xE299, 0x7B19}, //5447 #CJK UNIFIED IDEOGRAPH + {0xE29A, 0x7B1E}, //5448 #CJK UNIFIED IDEOGRAPH + {0xE29B, 0x7B35}, //5449 #CJK UNIFIED IDEOGRAPH + {0xE29C, 0x7B28}, //5450 #CJK UNIFIED IDEOGRAPH + {0xE29D, 0x7B36}, //5451 #CJK UNIFIED IDEOGRAPH + {0xE29E, 0x7B50}, //5452 #CJK UNIFIED IDEOGRAPH + {0xE29F, 0x7B7A}, //5453 #CJK UNIFIED IDEOGRAPH + {0xE2A0, 0x7B04}, //5454 #CJK UNIFIED IDEOGRAPH + {0xE2A1, 0x7B4D}, //5455 #CJK UNIFIED IDEOGRAPH + {0xE2A2, 0x7B0B}, //5456 #CJK UNIFIED IDEOGRAPH + {0xE2A3, 0x7B4C}, //5457 #CJK UNIFIED IDEOGRAPH + {0xE2A4, 0x7B45}, //5458 #CJK UNIFIED IDEOGRAPH + {0xE2A5, 0x7B75}, //5459 #CJK UNIFIED IDEOGRAPH + {0xE2A6, 0x7B65}, //5460 #CJK UNIFIED IDEOGRAPH + {0xE2A7, 0x7B74}, //5461 #CJK UNIFIED IDEOGRAPH + {0xE2A8, 0x7B67}, //5462 #CJK UNIFIED IDEOGRAPH + {0xE2A9, 0x7B70}, //5463 #CJK UNIFIED IDEOGRAPH + {0xE2AA, 0x7B71}, //5464 #CJK UNIFIED IDEOGRAPH + {0xE2AB, 0x7B6C}, //5465 #CJK UNIFIED IDEOGRAPH + {0xE2AC, 0x7B6E}, //5466 #CJK UNIFIED IDEOGRAPH + {0xE2AD, 0x7B9D}, //5467 #CJK UNIFIED IDEOGRAPH + {0xE2AE, 0x7B98}, //5468 #CJK UNIFIED IDEOGRAPH + {0xE2AF, 0x7B9F}, //5469 #CJK UNIFIED IDEOGRAPH + {0xE2B0, 0x7B8D}, //5470 #CJK UNIFIED IDEOGRAPH + {0xE2B1, 0x7B9C}, //5471 #CJK UNIFIED IDEOGRAPH + {0xE2B2, 0x7B9A}, //5472 #CJK UNIFIED IDEOGRAPH + {0xE2B3, 0x7B8B}, //5473 #CJK UNIFIED IDEOGRAPH + {0xE2B4, 0x7B92}, //5474 #CJK UNIFIED IDEOGRAPH + {0xE2B5, 0x7B8F}, //5475 #CJK UNIFIED IDEOGRAPH + {0xE2B6, 0x7B5D}, //5476 #CJK UNIFIED IDEOGRAPH + {0xE2B7, 0x7B99}, //5477 #CJK UNIFIED IDEOGRAPH + {0xE2B8, 0x7BCB}, //5478 #CJK UNIFIED IDEOGRAPH + {0xE2B9, 0x7BC1}, //5479 #CJK UNIFIED IDEOGRAPH + {0xE2BA, 0x7BCC}, //5480 #CJK UNIFIED IDEOGRAPH + {0xE2BB, 0x7BCF}, //5481 #CJK UNIFIED IDEOGRAPH + {0xE2BC, 0x7BB4}, //5482 #CJK UNIFIED IDEOGRAPH + {0xE2BD, 0x7BC6}, //5483 #CJK UNIFIED IDEOGRAPH + {0xE2BE, 0x7BDD}, //5484 #CJK UNIFIED IDEOGRAPH + {0xE2BF, 0x7BE9}, //5485 #CJK UNIFIED IDEOGRAPH + {0xE2C0, 0x7C11}, //5486 #CJK UNIFIED IDEOGRAPH + {0xE2C1, 0x7C14}, //5487 #CJK UNIFIED IDEOGRAPH + {0xE2C2, 0x7BE6}, //5488 #CJK UNIFIED IDEOGRAPH + {0xE2C3, 0x7BE5}, //5489 #CJK UNIFIED IDEOGRAPH + {0xE2C4, 0x7C60}, //5490 #CJK UNIFIED IDEOGRAPH + {0xE2C5, 0x7C00}, //5491 #CJK UNIFIED IDEOGRAPH + {0xE2C6, 0x7C07}, //5492 #CJK UNIFIED IDEOGRAPH + {0xE2C7, 0x7C13}, //5493 #CJK UNIFIED IDEOGRAPH + {0xE2C8, 0x7BF3}, //5494 #CJK UNIFIED IDEOGRAPH + {0xE2C9, 0x7BF7}, //5495 #CJK UNIFIED IDEOGRAPH + {0xE2CA, 0x7C17}, //5496 #CJK UNIFIED IDEOGRAPH + {0xE2CB, 0x7C0D}, //5497 #CJK UNIFIED IDEOGRAPH + {0xE2CC, 0x7BF6}, //5498 #CJK UNIFIED IDEOGRAPH + {0xE2CD, 0x7C23}, //5499 #CJK UNIFIED IDEOGRAPH + {0xE2CE, 0x7C27}, //5500 #CJK UNIFIED IDEOGRAPH + {0xE2CF, 0x7C2A}, //5501 #CJK UNIFIED IDEOGRAPH + {0xE2D0, 0x7C1F}, //5502 #CJK UNIFIED IDEOGRAPH + {0xE2D1, 0x7C37}, //5503 #CJK UNIFIED IDEOGRAPH + {0xE2D2, 0x7C2B}, //5504 #CJK UNIFIED IDEOGRAPH + {0xE2D3, 0x7C3D}, //5505 #CJK UNIFIED IDEOGRAPH + {0xE2D4, 0x7C4C}, //5506 #CJK UNIFIED IDEOGRAPH + {0xE2D5, 0x7C43}, //5507 #CJK UNIFIED IDEOGRAPH + {0xE2D6, 0x7C54}, //5508 #CJK UNIFIED IDEOGRAPH + {0xE2D7, 0x7C4F}, //5509 #CJK UNIFIED IDEOGRAPH + {0xE2D8, 0x7C40}, //5510 #CJK UNIFIED IDEOGRAPH + {0xE2D9, 0x7C50}, //5511 #CJK UNIFIED IDEOGRAPH + {0xE2DA, 0x7C58}, //5512 #CJK UNIFIED IDEOGRAPH + {0xE2DB, 0x7C5F}, //5513 #CJK UNIFIED IDEOGRAPH + {0xE2DC, 0x7C64}, //5514 #CJK UNIFIED IDEOGRAPH + {0xE2DD, 0x7C56}, //5515 #CJK UNIFIED IDEOGRAPH + {0xE2DE, 0x7C65}, //5516 #CJK UNIFIED IDEOGRAPH + {0xE2DF, 0x7C6C}, //5517 #CJK UNIFIED IDEOGRAPH + {0xE2E0, 0x7C75}, //5518 #CJK UNIFIED IDEOGRAPH + {0xE2E1, 0x7C83}, //5519 #CJK UNIFIED IDEOGRAPH + {0xE2E2, 0x7C90}, //5520 #CJK UNIFIED IDEOGRAPH + {0xE2E3, 0x7CA4}, //5521 #CJK UNIFIED IDEOGRAPH + {0xE2E4, 0x7CAD}, //5522 #CJK UNIFIED IDEOGRAPH + {0xE2E5, 0x7CA2}, //5523 #CJK UNIFIED IDEOGRAPH + {0xE2E6, 0x7CAB}, //5524 #CJK UNIFIED IDEOGRAPH + {0xE2E7, 0x7CA1}, //5525 #CJK UNIFIED IDEOGRAPH + {0xE2E8, 0x7CA8}, //5526 #CJK UNIFIED IDEOGRAPH + {0xE2E9, 0x7CB3}, //5527 #CJK UNIFIED IDEOGRAPH + {0xE2EA, 0x7CB2}, //5528 #CJK UNIFIED IDEOGRAPH + {0xE2EB, 0x7CB1}, //5529 #CJK UNIFIED IDEOGRAPH + {0xE2EC, 0x7CAE}, //5530 #CJK UNIFIED IDEOGRAPH + {0xE2ED, 0x7CB9}, //5531 #CJK UNIFIED IDEOGRAPH + {0xE2EE, 0x7CBD}, //5532 #CJK UNIFIED IDEOGRAPH + {0xE2EF, 0x7CC0}, //5533 #CJK UNIFIED IDEOGRAPH + {0xE2F0, 0x7CC5}, //5534 #CJK UNIFIED IDEOGRAPH + {0xE2F1, 0x7CC2}, //5535 #CJK UNIFIED IDEOGRAPH + {0xE2F2, 0x7CD8}, //5536 #CJK UNIFIED IDEOGRAPH + {0xE2F3, 0x7CD2}, //5537 #CJK UNIFIED IDEOGRAPH + {0xE2F4, 0x7CDC}, //5538 #CJK UNIFIED IDEOGRAPH + {0xE2F5, 0x7CE2}, //5539 #CJK UNIFIED IDEOGRAPH + {0xE2F6, 0x9B3B}, //5540 #CJK UNIFIED IDEOGRAPH + {0xE2F7, 0x7CEF}, //5541 #CJK UNIFIED IDEOGRAPH + {0xE2F8, 0x7CF2}, //5542 #CJK UNIFIED IDEOGRAPH + {0xE2F9, 0x7CF4}, //5543 #CJK UNIFIED IDEOGRAPH + {0xE2FA, 0x7CF6}, //5544 #CJK UNIFIED IDEOGRAPH + {0xE2FB, 0x7CFA}, //5545 #CJK UNIFIED IDEOGRAPH + {0xE2FC, 0x7D06}, //5546 #CJK UNIFIED IDEOGRAPH + {0xE340, 0x7D02}, //5547 #CJK UNIFIED IDEOGRAPH + {0xE341, 0x7D1C}, //5548 #CJK UNIFIED IDEOGRAPH + {0xE342, 0x7D15}, //5549 #CJK UNIFIED IDEOGRAPH + {0xE343, 0x7D0A}, //5550 #CJK UNIFIED IDEOGRAPH + {0xE344, 0x7D45}, //5551 #CJK UNIFIED IDEOGRAPH + {0xE345, 0x7D4B}, //5552 #CJK UNIFIED IDEOGRAPH + {0xE346, 0x7D2E}, //5553 #CJK UNIFIED IDEOGRAPH + {0xE347, 0x7D32}, //5554 #CJK UNIFIED IDEOGRAPH + {0xE348, 0x7D3F}, //5555 #CJK UNIFIED IDEOGRAPH + {0xE349, 0x7D35}, //5556 #CJK UNIFIED IDEOGRAPH + {0xE34A, 0x7D46}, //5557 #CJK UNIFIED IDEOGRAPH + {0xE34B, 0x7D73}, //5558 #CJK UNIFIED IDEOGRAPH + {0xE34C, 0x7D56}, //5559 #CJK UNIFIED IDEOGRAPH + {0xE34D, 0x7D4E}, //5560 #CJK UNIFIED IDEOGRAPH + {0xE34E, 0x7D72}, //5561 #CJK UNIFIED IDEOGRAPH + {0xE34F, 0x7D68}, //5562 #CJK UNIFIED IDEOGRAPH + {0xE350, 0x7D6E}, //5563 #CJK UNIFIED IDEOGRAPH + {0xE351, 0x7D4F}, //5564 #CJK UNIFIED IDEOGRAPH + {0xE352, 0x7D63}, //5565 #CJK UNIFIED IDEOGRAPH + {0xE353, 0x7D93}, //5566 #CJK UNIFIED IDEOGRAPH + {0xE354, 0x7D89}, //5567 #CJK UNIFIED IDEOGRAPH + {0xE355, 0x7D5B}, //5568 #CJK UNIFIED IDEOGRAPH + {0xE356, 0x7D8F}, //5569 #CJK UNIFIED IDEOGRAPH + {0xE357, 0x7D7D}, //5570 #CJK UNIFIED IDEOGRAPH + {0xE358, 0x7D9B}, //5571 #CJK UNIFIED IDEOGRAPH + {0xE359, 0x7DBA}, //5572 #CJK UNIFIED IDEOGRAPH + {0xE35A, 0x7DAE}, //5573 #CJK UNIFIED IDEOGRAPH + {0xE35B, 0x7DA3}, //5574 #CJK UNIFIED IDEOGRAPH + {0xE35C, 0x7DB5}, //5575 #CJK UNIFIED IDEOGRAPH + {0xE35D, 0x7DC7}, //5576 #CJK UNIFIED IDEOGRAPH + {0xE35E, 0x7DBD}, //5577 #CJK UNIFIED IDEOGRAPH + {0xE35F, 0x7DAB}, //5578 #CJK UNIFIED IDEOGRAPH + {0xE360, 0x7E3D}, //5579 #CJK UNIFIED IDEOGRAPH + {0xE361, 0x7DA2}, //5580 #CJK UNIFIED IDEOGRAPH + {0xE362, 0x7DAF}, //5581 #CJK UNIFIED IDEOGRAPH + {0xE363, 0x7DDC}, //5582 #CJK UNIFIED IDEOGRAPH + {0xE364, 0x7DB8}, //5583 #CJK UNIFIED IDEOGRAPH + {0xE365, 0x7D9F}, //5584 #CJK UNIFIED IDEOGRAPH + {0xE366, 0x7DB0}, //5585 #CJK UNIFIED IDEOGRAPH + {0xE367, 0x7DD8}, //5586 #CJK UNIFIED IDEOGRAPH + {0xE368, 0x7DDD}, //5587 #CJK UNIFIED IDEOGRAPH + {0xE369, 0x7DE4}, //5588 #CJK UNIFIED IDEOGRAPH + {0xE36A, 0x7DDE}, //5589 #CJK UNIFIED IDEOGRAPH + {0xE36B, 0x7DFB}, //5590 #CJK UNIFIED IDEOGRAPH + {0xE36C, 0x7DF2}, //5591 #CJK UNIFIED IDEOGRAPH + {0xE36D, 0x7DE1}, //5592 #CJK UNIFIED IDEOGRAPH + {0xE36E, 0x7E05}, //5593 #CJK UNIFIED IDEOGRAPH + {0xE36F, 0x7E0A}, //5594 #CJK UNIFIED IDEOGRAPH + {0xE370, 0x7E23}, //5595 #CJK UNIFIED IDEOGRAPH + {0xE371, 0x7E21}, //5596 #CJK UNIFIED IDEOGRAPH + {0xE372, 0x7E12}, //5597 #CJK UNIFIED IDEOGRAPH + {0xE373, 0x7E31}, //5598 #CJK UNIFIED IDEOGRAPH + {0xE374, 0x7E1F}, //5599 #CJK UNIFIED IDEOGRAPH + {0xE375, 0x7E09}, //5600 #CJK UNIFIED IDEOGRAPH + {0xE376, 0x7E0B}, //5601 #CJK UNIFIED IDEOGRAPH + {0xE377, 0x7E22}, //5602 #CJK UNIFIED IDEOGRAPH + {0xE378, 0x7E46}, //5603 #CJK UNIFIED IDEOGRAPH + {0xE379, 0x7E66}, //5604 #CJK UNIFIED IDEOGRAPH + {0xE37A, 0x7E3B}, //5605 #CJK UNIFIED IDEOGRAPH + {0xE37B, 0x7E35}, //5606 #CJK UNIFIED IDEOGRAPH + {0xE37C, 0x7E39}, //5607 #CJK UNIFIED IDEOGRAPH + {0xE37D, 0x7E43}, //5608 #CJK UNIFIED IDEOGRAPH + {0xE37E, 0x7E37}, //5609 #CJK UNIFIED IDEOGRAPH + {0xE380, 0x7E32}, //5610 #CJK UNIFIED IDEOGRAPH + {0xE381, 0x7E3A}, //5611 #CJK UNIFIED IDEOGRAPH + {0xE382, 0x7E67}, //5612 #CJK UNIFIED IDEOGRAPH + {0xE383, 0x7E5D}, //5613 #CJK UNIFIED IDEOGRAPH + {0xE384, 0x7E56}, //5614 #CJK UNIFIED IDEOGRAPH + {0xE385, 0x7E5E}, //5615 #CJK UNIFIED IDEOGRAPH + {0xE386, 0x7E59}, //5616 #CJK UNIFIED IDEOGRAPH + {0xE387, 0x7E5A}, //5617 #CJK UNIFIED IDEOGRAPH + {0xE388, 0x7E79}, //5618 #CJK UNIFIED IDEOGRAPH + {0xE389, 0x7E6A}, //5619 #CJK UNIFIED IDEOGRAPH + {0xE38A, 0x7E69}, //5620 #CJK UNIFIED IDEOGRAPH + {0xE38B, 0x7E7C}, //5621 #CJK UNIFIED IDEOGRAPH + {0xE38C, 0x7E7B}, //5622 #CJK UNIFIED IDEOGRAPH + {0xE38D, 0x7E83}, //5623 #CJK UNIFIED IDEOGRAPH + {0xE38E, 0x7DD5}, //5624 #CJK UNIFIED IDEOGRAPH + {0xE38F, 0x7E7D}, //5625 #CJK UNIFIED IDEOGRAPH + {0xE390, 0x8FAE}, //5626 #CJK UNIFIED IDEOGRAPH + {0xE391, 0x7E7F}, //5627 #CJK UNIFIED IDEOGRAPH + {0xE392, 0x7E88}, //5628 #CJK UNIFIED IDEOGRAPH + {0xE393, 0x7E89}, //5629 #CJK UNIFIED IDEOGRAPH + {0xE394, 0x7E8C}, //5630 #CJK UNIFIED IDEOGRAPH + {0xE395, 0x7E92}, //5631 #CJK UNIFIED IDEOGRAPH + {0xE396, 0x7E90}, //5632 #CJK UNIFIED IDEOGRAPH + {0xE397, 0x7E93}, //5633 #CJK UNIFIED IDEOGRAPH + {0xE398, 0x7E94}, //5634 #CJK UNIFIED IDEOGRAPH + {0xE399, 0x7E96}, //5635 #CJK UNIFIED IDEOGRAPH + {0xE39A, 0x7E8E}, //5636 #CJK UNIFIED IDEOGRAPH + {0xE39B, 0x7E9B}, //5637 #CJK UNIFIED IDEOGRAPH + {0xE39C, 0x7E9C}, //5638 #CJK UNIFIED IDEOGRAPH + {0xE39D, 0x7F38}, //5639 #CJK UNIFIED IDEOGRAPH + {0xE39E, 0x7F3A}, //5640 #CJK UNIFIED IDEOGRAPH + {0xE39F, 0x7F45}, //5641 #CJK UNIFIED IDEOGRAPH + {0xE3A0, 0x7F4C}, //5642 #CJK UNIFIED IDEOGRAPH + {0xE3A1, 0x7F4D}, //5643 #CJK UNIFIED IDEOGRAPH + {0xE3A2, 0x7F4E}, //5644 #CJK UNIFIED IDEOGRAPH + {0xE3A3, 0x7F50}, //5645 #CJK UNIFIED IDEOGRAPH + {0xE3A4, 0x7F51}, //5646 #CJK UNIFIED IDEOGRAPH + {0xE3A5, 0x7F55}, //5647 #CJK UNIFIED IDEOGRAPH + {0xE3A6, 0x7F54}, //5648 #CJK UNIFIED IDEOGRAPH + {0xE3A7, 0x7F58}, //5649 #CJK UNIFIED IDEOGRAPH + {0xE3A8, 0x7F5F}, //5650 #CJK UNIFIED IDEOGRAPH + {0xE3A9, 0x7F60}, //5651 #CJK UNIFIED IDEOGRAPH + {0xE3AA, 0x7F68}, //5652 #CJK UNIFIED IDEOGRAPH + {0xE3AB, 0x7F69}, //5653 #CJK UNIFIED IDEOGRAPH + {0xE3AC, 0x7F67}, //5654 #CJK UNIFIED IDEOGRAPH + {0xE3AD, 0x7F78}, //5655 #CJK UNIFIED IDEOGRAPH + {0xE3AE, 0x7F82}, //5656 #CJK UNIFIED IDEOGRAPH + {0xE3AF, 0x7F86}, //5657 #CJK UNIFIED IDEOGRAPH + {0xE3B0, 0x7F83}, //5658 #CJK UNIFIED IDEOGRAPH + {0xE3B1, 0x7F88}, //5659 #CJK UNIFIED IDEOGRAPH + {0xE3B2, 0x7F87}, //5660 #CJK UNIFIED IDEOGRAPH + {0xE3B3, 0x7F8C}, //5661 #CJK UNIFIED IDEOGRAPH + {0xE3B4, 0x7F94}, //5662 #CJK UNIFIED IDEOGRAPH + {0xE3B5, 0x7F9E}, //5663 #CJK UNIFIED IDEOGRAPH + {0xE3B6, 0x7F9D}, //5664 #CJK UNIFIED IDEOGRAPH + {0xE3B7, 0x7F9A}, //5665 #CJK UNIFIED IDEOGRAPH + {0xE3B8, 0x7FA3}, //5666 #CJK UNIFIED IDEOGRAPH + {0xE3B9, 0x7FAF}, //5667 #CJK UNIFIED IDEOGRAPH + {0xE3BA, 0x7FB2}, //5668 #CJK UNIFIED IDEOGRAPH + {0xE3BB, 0x7FB9}, //5669 #CJK UNIFIED IDEOGRAPH + {0xE3BC, 0x7FAE}, //5670 #CJK UNIFIED IDEOGRAPH + {0xE3BD, 0x7FB6}, //5671 #CJK UNIFIED IDEOGRAPH + {0xE3BE, 0x7FB8}, //5672 #CJK UNIFIED IDEOGRAPH + {0xE3BF, 0x8B71}, //5673 #CJK UNIFIED IDEOGRAPH + {0xE3C0, 0x7FC5}, //5674 #CJK UNIFIED IDEOGRAPH + {0xE3C1, 0x7FC6}, //5675 #CJK UNIFIED IDEOGRAPH + {0xE3C2, 0x7FCA}, //5676 #CJK UNIFIED IDEOGRAPH + {0xE3C3, 0x7FD5}, //5677 #CJK UNIFIED IDEOGRAPH + {0xE3C4, 0x7FD4}, //5678 #CJK UNIFIED IDEOGRAPH + {0xE3C5, 0x7FE1}, //5679 #CJK UNIFIED IDEOGRAPH + {0xE3C6, 0x7FE6}, //5680 #CJK UNIFIED IDEOGRAPH + {0xE3C7, 0x7FE9}, //5681 #CJK UNIFIED IDEOGRAPH + {0xE3C8, 0x7FF3}, //5682 #CJK UNIFIED IDEOGRAPH + {0xE3C9, 0x7FF9}, //5683 #CJK UNIFIED IDEOGRAPH + {0xE3CA, 0x98DC}, //5684 #CJK UNIFIED IDEOGRAPH + {0xE3CB, 0x8006}, //5685 #CJK UNIFIED IDEOGRAPH + {0xE3CC, 0x8004}, //5686 #CJK UNIFIED IDEOGRAPH + {0xE3CD, 0x800B}, //5687 #CJK UNIFIED IDEOGRAPH + {0xE3CE, 0x8012}, //5688 #CJK UNIFIED IDEOGRAPH + {0xE3CF, 0x8018}, //5689 #CJK UNIFIED IDEOGRAPH + {0xE3D0, 0x8019}, //5690 #CJK UNIFIED IDEOGRAPH + {0xE3D1, 0x801C}, //5691 #CJK UNIFIED IDEOGRAPH + {0xE3D2, 0x8021}, //5692 #CJK UNIFIED IDEOGRAPH + {0xE3D3, 0x8028}, //5693 #CJK UNIFIED IDEOGRAPH + {0xE3D4, 0x803F}, //5694 #CJK UNIFIED IDEOGRAPH + {0xE3D5, 0x803B}, //5695 #CJK UNIFIED IDEOGRAPH + {0xE3D6, 0x804A}, //5696 #CJK UNIFIED IDEOGRAPH + {0xE3D7, 0x8046}, //5697 #CJK UNIFIED IDEOGRAPH + {0xE3D8, 0x8052}, //5698 #CJK UNIFIED IDEOGRAPH + {0xE3D9, 0x8058}, //5699 #CJK UNIFIED IDEOGRAPH + {0xE3DA, 0x805A}, //5700 #CJK UNIFIED IDEOGRAPH + {0xE3DB, 0x805F}, //5701 #CJK UNIFIED IDEOGRAPH + {0xE3DC, 0x8062}, //5702 #CJK UNIFIED IDEOGRAPH + {0xE3DD, 0x8068}, //5703 #CJK UNIFIED IDEOGRAPH + {0xE3DE, 0x8073}, //5704 #CJK UNIFIED IDEOGRAPH + {0xE3DF, 0x8072}, //5705 #CJK UNIFIED IDEOGRAPH + {0xE3E0, 0x8070}, //5706 #CJK UNIFIED IDEOGRAPH + {0xE3E1, 0x8076}, //5707 #CJK UNIFIED IDEOGRAPH + {0xE3E2, 0x8079}, //5708 #CJK UNIFIED IDEOGRAPH + {0xE3E3, 0x807D}, //5709 #CJK UNIFIED IDEOGRAPH + {0xE3E4, 0x807F}, //5710 #CJK UNIFIED IDEOGRAPH + {0xE3E5, 0x8084}, //5711 #CJK UNIFIED IDEOGRAPH + {0xE3E6, 0x8086}, //5712 #CJK UNIFIED IDEOGRAPH + {0xE3E7, 0x8085}, //5713 #CJK UNIFIED IDEOGRAPH + {0xE3E8, 0x809B}, //5714 #CJK UNIFIED IDEOGRAPH + {0xE3E9, 0x8093}, //5715 #CJK UNIFIED IDEOGRAPH + {0xE3EA, 0x809A}, //5716 #CJK UNIFIED IDEOGRAPH + {0xE3EB, 0x80AD}, //5717 #CJK UNIFIED IDEOGRAPH + {0xE3EC, 0x5190}, //5718 #CJK UNIFIED IDEOGRAPH + {0xE3ED, 0x80AC}, //5719 #CJK UNIFIED IDEOGRAPH + {0xE3EE, 0x80DB}, //5720 #CJK UNIFIED IDEOGRAPH + {0xE3EF, 0x80E5}, //5721 #CJK UNIFIED IDEOGRAPH + {0xE3F0, 0x80D9}, //5722 #CJK UNIFIED IDEOGRAPH + {0xE3F1, 0x80DD}, //5723 #CJK UNIFIED IDEOGRAPH + {0xE3F2, 0x80C4}, //5724 #CJK UNIFIED IDEOGRAPH + {0xE3F3, 0x80DA}, //5725 #CJK UNIFIED IDEOGRAPH + {0xE3F4, 0x80D6}, //5726 #CJK UNIFIED IDEOGRAPH + {0xE3F5, 0x8109}, //5727 #CJK UNIFIED IDEOGRAPH + {0xE3F6, 0x80EF}, //5728 #CJK UNIFIED IDEOGRAPH + {0xE3F7, 0x80F1}, //5729 #CJK UNIFIED IDEOGRAPH + {0xE3F8, 0x811B}, //5730 #CJK UNIFIED IDEOGRAPH + {0xE3F9, 0x8129}, //5731 #CJK UNIFIED IDEOGRAPH + {0xE3FA, 0x8123}, //5732 #CJK UNIFIED IDEOGRAPH + {0xE3FB, 0x812F}, //5733 #CJK UNIFIED IDEOGRAPH + {0xE3FC, 0x814B}, //5734 #CJK UNIFIED IDEOGRAPH + {0xE440, 0x968B}, //5735 #CJK UNIFIED IDEOGRAPH + {0xE441, 0x8146}, //5736 #CJK UNIFIED IDEOGRAPH + {0xE442, 0x813E}, //5737 #CJK UNIFIED IDEOGRAPH + {0xE443, 0x8153}, //5738 #CJK UNIFIED IDEOGRAPH + {0xE444, 0x8151}, //5739 #CJK UNIFIED IDEOGRAPH + {0xE445, 0x80FC}, //5740 #CJK UNIFIED IDEOGRAPH + {0xE446, 0x8171}, //5741 #CJK UNIFIED IDEOGRAPH + {0xE447, 0x816E}, //5742 #CJK UNIFIED IDEOGRAPH + {0xE448, 0x8165}, //5743 #CJK UNIFIED IDEOGRAPH + {0xE449, 0x8166}, //5744 #CJK UNIFIED IDEOGRAPH + {0xE44A, 0x8174}, //5745 #CJK UNIFIED IDEOGRAPH + {0xE44B, 0x8183}, //5746 #CJK UNIFIED IDEOGRAPH + {0xE44C, 0x8188}, //5747 #CJK UNIFIED IDEOGRAPH + {0xE44D, 0x818A}, //5748 #CJK UNIFIED IDEOGRAPH + {0xE44E, 0x8180}, //5749 #CJK UNIFIED IDEOGRAPH + {0xE44F, 0x8182}, //5750 #CJK UNIFIED IDEOGRAPH + {0xE450, 0x81A0}, //5751 #CJK UNIFIED IDEOGRAPH + {0xE451, 0x8195}, //5752 #CJK UNIFIED IDEOGRAPH + {0xE452, 0x81A4}, //5753 #CJK UNIFIED IDEOGRAPH + {0xE453, 0x81A3}, //5754 #CJK UNIFIED IDEOGRAPH + {0xE454, 0x815F}, //5755 #CJK UNIFIED IDEOGRAPH + {0xE455, 0x8193}, //5756 #CJK UNIFIED IDEOGRAPH + {0xE456, 0x81A9}, //5757 #CJK UNIFIED IDEOGRAPH + {0xE457, 0x81B0}, //5758 #CJK UNIFIED IDEOGRAPH + {0xE458, 0x81B5}, //5759 #CJK UNIFIED IDEOGRAPH + {0xE459, 0x81BE}, //5760 #CJK UNIFIED IDEOGRAPH + {0xE45A, 0x81B8}, //5761 #CJK UNIFIED IDEOGRAPH + {0xE45B, 0x81BD}, //5762 #CJK UNIFIED IDEOGRAPH + {0xE45C, 0x81C0}, //5763 #CJK UNIFIED IDEOGRAPH + {0xE45D, 0x81C2}, //5764 #CJK UNIFIED IDEOGRAPH + {0xE45E, 0x81BA}, //5765 #CJK UNIFIED IDEOGRAPH + {0xE45F, 0x81C9}, //5766 #CJK UNIFIED IDEOGRAPH + {0xE460, 0x81CD}, //5767 #CJK UNIFIED IDEOGRAPH + {0xE461, 0x81D1}, //5768 #CJK UNIFIED IDEOGRAPH + {0xE462, 0x81D9}, //5769 #CJK UNIFIED IDEOGRAPH + {0xE463, 0x81D8}, //5770 #CJK UNIFIED IDEOGRAPH + {0xE464, 0x81C8}, //5771 #CJK UNIFIED IDEOGRAPH + {0xE465, 0x81DA}, //5772 #CJK UNIFIED IDEOGRAPH + {0xE466, 0x81DF}, //5773 #CJK UNIFIED IDEOGRAPH + {0xE467, 0x81E0}, //5774 #CJK UNIFIED IDEOGRAPH + {0xE468, 0x81E7}, //5775 #CJK UNIFIED IDEOGRAPH + {0xE469, 0x81FA}, //5776 #CJK UNIFIED IDEOGRAPH + {0xE46A, 0x81FB}, //5777 #CJK UNIFIED IDEOGRAPH + {0xE46B, 0x81FE}, //5778 #CJK UNIFIED IDEOGRAPH + {0xE46C, 0x8201}, //5779 #CJK UNIFIED IDEOGRAPH + {0xE46D, 0x8202}, //5780 #CJK UNIFIED IDEOGRAPH + {0xE46E, 0x8205}, //5781 #CJK UNIFIED IDEOGRAPH + {0xE46F, 0x8207}, //5782 #CJK UNIFIED IDEOGRAPH + {0xE470, 0x820A}, //5783 #CJK UNIFIED IDEOGRAPH + {0xE471, 0x820D}, //5784 #CJK UNIFIED IDEOGRAPH + {0xE472, 0x8210}, //5785 #CJK UNIFIED IDEOGRAPH + {0xE473, 0x8216}, //5786 #CJK UNIFIED IDEOGRAPH + {0xE474, 0x8229}, //5787 #CJK UNIFIED IDEOGRAPH + {0xE475, 0x822B}, //5788 #CJK UNIFIED IDEOGRAPH + {0xE476, 0x8238}, //5789 #CJK UNIFIED IDEOGRAPH + {0xE477, 0x8233}, //5790 #CJK UNIFIED IDEOGRAPH + {0xE478, 0x8240}, //5791 #CJK UNIFIED IDEOGRAPH + {0xE479, 0x8259}, //5792 #CJK UNIFIED IDEOGRAPH + {0xE47A, 0x8258}, //5793 #CJK UNIFIED IDEOGRAPH + {0xE47B, 0x825D}, //5794 #CJK UNIFIED IDEOGRAPH + {0xE47C, 0x825A}, //5795 #CJK UNIFIED IDEOGRAPH + {0xE47D, 0x825F}, //5796 #CJK UNIFIED IDEOGRAPH + {0xE47E, 0x8264}, //5797 #CJK UNIFIED IDEOGRAPH + {0xE480, 0x8262}, //5798 #CJK UNIFIED IDEOGRAPH + {0xE481, 0x8268}, //5799 #CJK UNIFIED IDEOGRAPH + {0xE482, 0x826A}, //5800 #CJK UNIFIED IDEOGRAPH + {0xE483, 0x826B}, //5801 #CJK UNIFIED IDEOGRAPH + {0xE484, 0x822E}, //5802 #CJK UNIFIED IDEOGRAPH + {0xE485, 0x8271}, //5803 #CJK UNIFIED IDEOGRAPH + {0xE486, 0x8277}, //5804 #CJK UNIFIED IDEOGRAPH + {0xE487, 0x8278}, //5805 #CJK UNIFIED IDEOGRAPH + {0xE488, 0x827E}, //5806 #CJK UNIFIED IDEOGRAPH + {0xE489, 0x828D}, //5807 #CJK UNIFIED IDEOGRAPH + {0xE48A, 0x8292}, //5808 #CJK UNIFIED IDEOGRAPH + {0xE48B, 0x82AB}, //5809 #CJK UNIFIED IDEOGRAPH + {0xE48C, 0x829F}, //5810 #CJK UNIFIED IDEOGRAPH + {0xE48D, 0x82BB}, //5811 #CJK UNIFIED IDEOGRAPH + {0xE48E, 0x82AC}, //5812 #CJK UNIFIED IDEOGRAPH + {0xE48F, 0x82E1}, //5813 #CJK UNIFIED IDEOGRAPH + {0xE490, 0x82E3}, //5814 #CJK UNIFIED IDEOGRAPH + {0xE491, 0x82DF}, //5815 #CJK UNIFIED IDEOGRAPH + {0xE492, 0x82D2}, //5816 #CJK UNIFIED IDEOGRAPH + {0xE493, 0x82F4}, //5817 #CJK UNIFIED IDEOGRAPH + {0xE494, 0x82F3}, //5818 #CJK UNIFIED IDEOGRAPH + {0xE495, 0x82FA}, //5819 #CJK UNIFIED IDEOGRAPH + {0xE496, 0x8393}, //5820 #CJK UNIFIED IDEOGRAPH + {0xE497, 0x8303}, //5821 #CJK UNIFIED IDEOGRAPH + {0xE498, 0x82FB}, //5822 #CJK UNIFIED IDEOGRAPH + {0xE499, 0x82F9}, //5823 #CJK UNIFIED IDEOGRAPH + {0xE49A, 0x82DE}, //5824 #CJK UNIFIED IDEOGRAPH + {0xE49B, 0x8306}, //5825 #CJK UNIFIED IDEOGRAPH + {0xE49C, 0x82DC}, //5826 #CJK UNIFIED IDEOGRAPH + {0xE49D, 0x8309}, //5827 #CJK UNIFIED IDEOGRAPH + {0xE49E, 0x82D9}, //5828 #CJK UNIFIED IDEOGRAPH + {0xE49F, 0x8335}, //5829 #CJK UNIFIED IDEOGRAPH + {0xE4A0, 0x8334}, //5830 #CJK UNIFIED IDEOGRAPH + {0xE4A1, 0x8316}, //5831 #CJK UNIFIED IDEOGRAPH + {0xE4A2, 0x8332}, //5832 #CJK UNIFIED IDEOGRAPH + {0xE4A3, 0x8331}, //5833 #CJK UNIFIED IDEOGRAPH + {0xE4A4, 0x8340}, //5834 #CJK UNIFIED IDEOGRAPH + {0xE4A5, 0x8339}, //5835 #CJK UNIFIED IDEOGRAPH + {0xE4A6, 0x8350}, //5836 #CJK UNIFIED IDEOGRAPH + {0xE4A7, 0x8345}, //5837 #CJK UNIFIED IDEOGRAPH + {0xE4A8, 0x832F}, //5838 #CJK UNIFIED IDEOGRAPH + {0xE4A9, 0x832B}, //5839 #CJK UNIFIED IDEOGRAPH + {0xE4AA, 0x8317}, //5840 #CJK UNIFIED IDEOGRAPH + {0xE4AB, 0x8318}, //5841 #CJK UNIFIED IDEOGRAPH + {0xE4AC, 0x8385}, //5842 #CJK UNIFIED IDEOGRAPH + {0xE4AD, 0x839A}, //5843 #CJK UNIFIED IDEOGRAPH + {0xE4AE, 0x83AA}, //5844 #CJK UNIFIED IDEOGRAPH + {0xE4AF, 0x839F}, //5845 #CJK UNIFIED IDEOGRAPH + {0xE4B0, 0x83A2}, //5846 #CJK UNIFIED IDEOGRAPH + {0xE4B1, 0x8396}, //5847 #CJK UNIFIED IDEOGRAPH + {0xE4B2, 0x8323}, //5848 #CJK UNIFIED IDEOGRAPH + {0xE4B3, 0x838E}, //5849 #CJK UNIFIED IDEOGRAPH + {0xE4B4, 0x8387}, //5850 #CJK UNIFIED IDEOGRAPH + {0xE4B5, 0x838A}, //5851 #CJK UNIFIED IDEOGRAPH + {0xE4B6, 0x837C}, //5852 #CJK UNIFIED IDEOGRAPH + {0xE4B7, 0x83B5}, //5853 #CJK UNIFIED IDEOGRAPH + {0xE4B8, 0x8373}, //5854 #CJK UNIFIED IDEOGRAPH + {0xE4B9, 0x8375}, //5855 #CJK UNIFIED IDEOGRAPH + {0xE4BA, 0x83A0}, //5856 #CJK UNIFIED IDEOGRAPH + {0xE4BB, 0x8389}, //5857 #CJK UNIFIED IDEOGRAPH + {0xE4BC, 0x83A8}, //5858 #CJK UNIFIED IDEOGRAPH + {0xE4BD, 0x83F4}, //5859 #CJK UNIFIED IDEOGRAPH + {0xE4BE, 0x8413}, //5860 #CJK UNIFIED IDEOGRAPH + {0xE4BF, 0x83EB}, //5861 #CJK UNIFIED IDEOGRAPH + {0xE4C0, 0x83CE}, //5862 #CJK UNIFIED IDEOGRAPH + {0xE4C1, 0x83FD}, //5863 #CJK UNIFIED IDEOGRAPH + {0xE4C2, 0x8403}, //5864 #CJK UNIFIED IDEOGRAPH + {0xE4C3, 0x83D8}, //5865 #CJK UNIFIED IDEOGRAPH + {0xE4C4, 0x840B}, //5866 #CJK UNIFIED IDEOGRAPH + {0xE4C5, 0x83C1}, //5867 #CJK UNIFIED IDEOGRAPH + {0xE4C6, 0x83F7}, //5868 #CJK UNIFIED IDEOGRAPH + {0xE4C7, 0x8407}, //5869 #CJK UNIFIED IDEOGRAPH + {0xE4C8, 0x83E0}, //5870 #CJK UNIFIED IDEOGRAPH + {0xE4C9, 0x83F2}, //5871 #CJK UNIFIED IDEOGRAPH + {0xE4CA, 0x840D}, //5872 #CJK UNIFIED IDEOGRAPH + {0xE4CB, 0x8422}, //5873 #CJK UNIFIED IDEOGRAPH + {0xE4CC, 0x8420}, //5874 #CJK UNIFIED IDEOGRAPH + {0xE4CD, 0x83BD}, //5875 #CJK UNIFIED IDEOGRAPH + {0xE4CE, 0x8438}, //5876 #CJK UNIFIED IDEOGRAPH + {0xE4CF, 0x8506}, //5877 #CJK UNIFIED IDEOGRAPH + {0xE4D0, 0x83FB}, //5878 #CJK UNIFIED IDEOGRAPH + {0xE4D1, 0x846D}, //5879 #CJK UNIFIED IDEOGRAPH + {0xE4D2, 0x842A}, //5880 #CJK UNIFIED IDEOGRAPH + {0xE4D3, 0x843C}, //5881 #CJK UNIFIED IDEOGRAPH + {0xE4D4, 0x855A}, //5882 #CJK UNIFIED IDEOGRAPH + {0xE4D5, 0x8484}, //5883 #CJK UNIFIED IDEOGRAPH + {0xE4D6, 0x8477}, //5884 #CJK UNIFIED IDEOGRAPH + {0xE4D7, 0x846B}, //5885 #CJK UNIFIED IDEOGRAPH + {0xE4D8, 0x84AD}, //5886 #CJK UNIFIED IDEOGRAPH + {0xE4D9, 0x846E}, //5887 #CJK UNIFIED IDEOGRAPH + {0xE4DA, 0x8482}, //5888 #CJK UNIFIED IDEOGRAPH + {0xE4DB, 0x8469}, //5889 #CJK UNIFIED IDEOGRAPH + {0xE4DC, 0x8446}, //5890 #CJK UNIFIED IDEOGRAPH + {0xE4DD, 0x842C}, //5891 #CJK UNIFIED IDEOGRAPH + {0xE4DE, 0x846F}, //5892 #CJK UNIFIED IDEOGRAPH + {0xE4DF, 0x8479}, //5893 #CJK UNIFIED IDEOGRAPH + {0xE4E0, 0x8435}, //5894 #CJK UNIFIED IDEOGRAPH + {0xE4E1, 0x84CA}, //5895 #CJK UNIFIED IDEOGRAPH + {0xE4E2, 0x8462}, //5896 #CJK UNIFIED IDEOGRAPH + {0xE4E3, 0x84B9}, //5897 #CJK UNIFIED IDEOGRAPH + {0xE4E4, 0x84BF}, //5898 #CJK UNIFIED IDEOGRAPH + {0xE4E5, 0x849F}, //5899 #CJK UNIFIED IDEOGRAPH + {0xE4E6, 0x84D9}, //5900 #CJK UNIFIED IDEOGRAPH + {0xE4E7, 0x84CD}, //5901 #CJK UNIFIED IDEOGRAPH + {0xE4E8, 0x84BB}, //5902 #CJK UNIFIED IDEOGRAPH + {0xE4E9, 0x84DA}, //5903 #CJK UNIFIED IDEOGRAPH + {0xE4EA, 0x84D0}, //5904 #CJK UNIFIED IDEOGRAPH + {0xE4EB, 0x84C1}, //5905 #CJK UNIFIED IDEOGRAPH + {0xE4EC, 0x84C6}, //5906 #CJK UNIFIED IDEOGRAPH + {0xE4ED, 0x84D6}, //5907 #CJK UNIFIED IDEOGRAPH + {0xE4EE, 0x84A1}, //5908 #CJK UNIFIED IDEOGRAPH + {0xE4EF, 0x8521}, //5909 #CJK UNIFIED IDEOGRAPH + {0xE4F0, 0x84FF}, //5910 #CJK UNIFIED IDEOGRAPH + {0xE4F1, 0x84F4}, //5911 #CJK UNIFIED IDEOGRAPH + {0xE4F2, 0x8517}, //5912 #CJK UNIFIED IDEOGRAPH + {0xE4F3, 0x8518}, //5913 #CJK UNIFIED IDEOGRAPH + {0xE4F4, 0x852C}, //5914 #CJK UNIFIED IDEOGRAPH + {0xE4F5, 0x851F}, //5915 #CJK UNIFIED IDEOGRAPH + {0xE4F6, 0x8515}, //5916 #CJK UNIFIED IDEOGRAPH + {0xE4F7, 0x8514}, //5917 #CJK UNIFIED IDEOGRAPH + {0xE4F8, 0x84FC}, //5918 #CJK UNIFIED IDEOGRAPH + {0xE4F9, 0x8540}, //5919 #CJK UNIFIED IDEOGRAPH + {0xE4FA, 0x8563}, //5920 #CJK UNIFIED IDEOGRAPH + {0xE4FB, 0x8558}, //5921 #CJK UNIFIED IDEOGRAPH + {0xE4FC, 0x8548}, //5922 #CJK UNIFIED IDEOGRAPH + {0xE540, 0x8541}, //5923 #CJK UNIFIED IDEOGRAPH + {0xE541, 0x8602}, //5924 #CJK UNIFIED IDEOGRAPH + {0xE542, 0x854B}, //5925 #CJK UNIFIED IDEOGRAPH + {0xE543, 0x8555}, //5926 #CJK UNIFIED IDEOGRAPH + {0xE544, 0x8580}, //5927 #CJK UNIFIED IDEOGRAPH + {0xE545, 0x85A4}, //5928 #CJK UNIFIED IDEOGRAPH + {0xE546, 0x8588}, //5929 #CJK UNIFIED IDEOGRAPH + {0xE547, 0x8591}, //5930 #CJK UNIFIED IDEOGRAPH + {0xE548, 0x858A}, //5931 #CJK UNIFIED IDEOGRAPH + {0xE549, 0x85A8}, //5932 #CJK UNIFIED IDEOGRAPH + {0xE54A, 0x856D}, //5933 #CJK UNIFIED IDEOGRAPH + {0xE54B, 0x8594}, //5934 #CJK UNIFIED IDEOGRAPH + {0xE54C, 0x859B}, //5935 #CJK UNIFIED IDEOGRAPH + {0xE54D, 0x85EA}, //5936 #CJK UNIFIED IDEOGRAPH + {0xE54E, 0x8587}, //5937 #CJK UNIFIED IDEOGRAPH + {0xE54F, 0x859C}, //5938 #CJK UNIFIED IDEOGRAPH + {0xE550, 0x8577}, //5939 #CJK UNIFIED IDEOGRAPH + {0xE551, 0x857E}, //5940 #CJK UNIFIED IDEOGRAPH + {0xE552, 0x8590}, //5941 #CJK UNIFIED IDEOGRAPH + {0xE553, 0x85C9}, //5942 #CJK UNIFIED IDEOGRAPH + {0xE554, 0x85BA}, //5943 #CJK UNIFIED IDEOGRAPH + {0xE555, 0x85CF}, //5944 #CJK UNIFIED IDEOGRAPH + {0xE556, 0x85B9}, //5945 #CJK UNIFIED IDEOGRAPH + {0xE557, 0x85D0}, //5946 #CJK UNIFIED IDEOGRAPH + {0xE558, 0x85D5}, //5947 #CJK UNIFIED IDEOGRAPH + {0xE559, 0x85DD}, //5948 #CJK UNIFIED IDEOGRAPH + {0xE55A, 0x85E5}, //5949 #CJK UNIFIED IDEOGRAPH + {0xE55B, 0x85DC}, //5950 #CJK UNIFIED IDEOGRAPH + {0xE55C, 0x85F9}, //5951 #CJK UNIFIED IDEOGRAPH + {0xE55D, 0x860A}, //5952 #CJK UNIFIED IDEOGRAPH + {0xE55E, 0x8613}, //5953 #CJK UNIFIED IDEOGRAPH + {0xE55F, 0x860B}, //5954 #CJK UNIFIED IDEOGRAPH + {0xE560, 0x85FE}, //5955 #CJK UNIFIED IDEOGRAPH + {0xE561, 0x85FA}, //5956 #CJK UNIFIED IDEOGRAPH + {0xE562, 0x8606}, //5957 #CJK UNIFIED IDEOGRAPH + {0xE563, 0x8622}, //5958 #CJK UNIFIED IDEOGRAPH + {0xE564, 0x861A}, //5959 #CJK UNIFIED IDEOGRAPH + {0xE565, 0x8630}, //5960 #CJK UNIFIED IDEOGRAPH + {0xE566, 0x863F}, //5961 #CJK UNIFIED IDEOGRAPH + {0xE567, 0x864D}, //5962 #CJK UNIFIED IDEOGRAPH + {0xE568, 0x4E55}, //5963 #CJK UNIFIED IDEOGRAPH + {0xE569, 0x8654}, //5964 #CJK UNIFIED IDEOGRAPH + {0xE56A, 0x865F}, //5965 #CJK UNIFIED IDEOGRAPH + {0xE56B, 0x8667}, //5966 #CJK UNIFIED IDEOGRAPH + {0xE56C, 0x8671}, //5967 #CJK UNIFIED IDEOGRAPH + {0xE56D, 0x8693}, //5968 #CJK UNIFIED IDEOGRAPH + {0xE56E, 0x86A3}, //5969 #CJK UNIFIED IDEOGRAPH + {0xE56F, 0x86A9}, //5970 #CJK UNIFIED IDEOGRAPH + {0xE570, 0x86AA}, //5971 #CJK UNIFIED IDEOGRAPH + {0xE571, 0x868B}, //5972 #CJK UNIFIED IDEOGRAPH + {0xE572, 0x868C}, //5973 #CJK UNIFIED IDEOGRAPH + {0xE573, 0x86B6}, //5974 #CJK UNIFIED IDEOGRAPH + {0xE574, 0x86AF}, //5975 #CJK UNIFIED IDEOGRAPH + {0xE575, 0x86C4}, //5976 #CJK UNIFIED IDEOGRAPH + {0xE576, 0x86C6}, //5977 #CJK UNIFIED IDEOGRAPH + {0xE577, 0x86B0}, //5978 #CJK UNIFIED IDEOGRAPH + {0xE578, 0x86C9}, //5979 #CJK UNIFIED IDEOGRAPH + {0xE579, 0x8823}, //5980 #CJK UNIFIED IDEOGRAPH + {0xE57A, 0x86AB}, //5981 #CJK UNIFIED IDEOGRAPH + {0xE57B, 0x86D4}, //5982 #CJK UNIFIED IDEOGRAPH + {0xE57C, 0x86DE}, //5983 #CJK UNIFIED IDEOGRAPH + {0xE57D, 0x86E9}, //5984 #CJK UNIFIED IDEOGRAPH + {0xE57E, 0x86EC}, //5985 #CJK UNIFIED IDEOGRAPH + {0xE580, 0x86DF}, //5986 #CJK UNIFIED IDEOGRAPH + {0xE581, 0x86DB}, //5987 #CJK UNIFIED IDEOGRAPH + {0xE582, 0x86EF}, //5988 #CJK UNIFIED IDEOGRAPH + {0xE583, 0x8712}, //5989 #CJK UNIFIED IDEOGRAPH + {0xE584, 0x8706}, //5990 #CJK UNIFIED IDEOGRAPH + {0xE585, 0x8708}, //5991 #CJK UNIFIED IDEOGRAPH + {0xE586, 0x8700}, //5992 #CJK UNIFIED IDEOGRAPH + {0xE587, 0x8703}, //5993 #CJK UNIFIED IDEOGRAPH + {0xE588, 0x86FB}, //5994 #CJK UNIFIED IDEOGRAPH + {0xE589, 0x8711}, //5995 #CJK UNIFIED IDEOGRAPH + {0xE58A, 0x8709}, //5996 #CJK UNIFIED IDEOGRAPH + {0xE58B, 0x870D}, //5997 #CJK UNIFIED IDEOGRAPH + {0xE58C, 0x86F9}, //5998 #CJK UNIFIED IDEOGRAPH + {0xE58D, 0x870A}, //5999 #CJK UNIFIED IDEOGRAPH + {0xE58E, 0x8734}, //6000 #CJK UNIFIED IDEOGRAPH + {0xE58F, 0x873F}, //6001 #CJK UNIFIED IDEOGRAPH + {0xE590, 0x8737}, //6002 #CJK UNIFIED IDEOGRAPH + {0xE591, 0x873B}, //6003 #CJK UNIFIED IDEOGRAPH + {0xE592, 0x8725}, //6004 #CJK UNIFIED IDEOGRAPH + {0xE593, 0x8729}, //6005 #CJK UNIFIED IDEOGRAPH + {0xE594, 0x871A}, //6006 #CJK UNIFIED IDEOGRAPH + {0xE595, 0x8760}, //6007 #CJK UNIFIED IDEOGRAPH + {0xE596, 0x875F}, //6008 #CJK UNIFIED IDEOGRAPH + {0xE597, 0x8778}, //6009 #CJK UNIFIED IDEOGRAPH + {0xE598, 0x874C}, //6010 #CJK UNIFIED IDEOGRAPH + {0xE599, 0x874E}, //6011 #CJK UNIFIED IDEOGRAPH + {0xE59A, 0x8774}, //6012 #CJK UNIFIED IDEOGRAPH + {0xE59B, 0x8757}, //6013 #CJK UNIFIED IDEOGRAPH + {0xE59C, 0x8768}, //6014 #CJK UNIFIED IDEOGRAPH + {0xE59D, 0x876E}, //6015 #CJK UNIFIED IDEOGRAPH + {0xE59E, 0x8759}, //6016 #CJK UNIFIED IDEOGRAPH + {0xE59F, 0x8753}, //6017 #CJK UNIFIED IDEOGRAPH + {0xE5A0, 0x8763}, //6018 #CJK UNIFIED IDEOGRAPH + {0xE5A1, 0x876A}, //6019 #CJK UNIFIED IDEOGRAPH + {0xE5A2, 0x8805}, //6020 #CJK UNIFIED IDEOGRAPH + {0xE5A3, 0x87A2}, //6021 #CJK UNIFIED IDEOGRAPH + {0xE5A4, 0x879F}, //6022 #CJK UNIFIED IDEOGRAPH + {0xE5A5, 0x8782}, //6023 #CJK UNIFIED IDEOGRAPH + {0xE5A6, 0x87AF}, //6024 #CJK UNIFIED IDEOGRAPH + {0xE5A7, 0x87CB}, //6025 #CJK UNIFIED IDEOGRAPH + {0xE5A8, 0x87BD}, //6026 #CJK UNIFIED IDEOGRAPH + {0xE5A9, 0x87C0}, //6027 #CJK UNIFIED IDEOGRAPH + {0xE5AA, 0x87D0}, //6028 #CJK UNIFIED IDEOGRAPH + {0xE5AB, 0x96D6}, //6029 #CJK UNIFIED IDEOGRAPH + {0xE5AC, 0x87AB}, //6030 #CJK UNIFIED IDEOGRAPH + {0xE5AD, 0x87C4}, //6031 #CJK UNIFIED IDEOGRAPH + {0xE5AE, 0x87B3}, //6032 #CJK UNIFIED IDEOGRAPH + {0xE5AF, 0x87C7}, //6033 #CJK UNIFIED IDEOGRAPH + {0xE5B0, 0x87C6}, //6034 #CJK UNIFIED IDEOGRAPH + {0xE5B1, 0x87BB}, //6035 #CJK UNIFIED IDEOGRAPH + {0xE5B2, 0x87EF}, //6036 #CJK UNIFIED IDEOGRAPH + {0xE5B3, 0x87F2}, //6037 #CJK UNIFIED IDEOGRAPH + {0xE5B4, 0x87E0}, //6038 #CJK UNIFIED IDEOGRAPH + {0xE5B5, 0x880F}, //6039 #CJK UNIFIED IDEOGRAPH + {0xE5B6, 0x880D}, //6040 #CJK UNIFIED IDEOGRAPH + {0xE5B7, 0x87FE}, //6041 #CJK UNIFIED IDEOGRAPH + {0xE5B8, 0x87F6}, //6042 #CJK UNIFIED IDEOGRAPH + {0xE5B9, 0x87F7}, //6043 #CJK UNIFIED IDEOGRAPH + {0xE5BA, 0x880E}, //6044 #CJK UNIFIED IDEOGRAPH + {0xE5BB, 0x87D2}, //6045 #CJK UNIFIED IDEOGRAPH + {0xE5BC, 0x8811}, //6046 #CJK UNIFIED IDEOGRAPH + {0xE5BD, 0x8816}, //6047 #CJK UNIFIED IDEOGRAPH + {0xE5BE, 0x8815}, //6048 #CJK UNIFIED IDEOGRAPH + {0xE5BF, 0x8822}, //6049 #CJK UNIFIED IDEOGRAPH + {0xE5C0, 0x8821}, //6050 #CJK UNIFIED IDEOGRAPH + {0xE5C1, 0x8831}, //6051 #CJK UNIFIED IDEOGRAPH + {0xE5C2, 0x8836}, //6052 #CJK UNIFIED IDEOGRAPH + {0xE5C3, 0x8839}, //6053 #CJK UNIFIED IDEOGRAPH + {0xE5C4, 0x8827}, //6054 #CJK UNIFIED IDEOGRAPH + {0xE5C5, 0x883B}, //6055 #CJK UNIFIED IDEOGRAPH + {0xE5C6, 0x8844}, //6056 #CJK UNIFIED IDEOGRAPH + {0xE5C7, 0x8842}, //6057 #CJK UNIFIED IDEOGRAPH + {0xE5C8, 0x8852}, //6058 #CJK UNIFIED IDEOGRAPH + {0xE5C9, 0x8859}, //6059 #CJK UNIFIED IDEOGRAPH + {0xE5CA, 0x885E}, //6060 #CJK UNIFIED IDEOGRAPH + {0xE5CB, 0x8862}, //6061 #CJK UNIFIED IDEOGRAPH + {0xE5CC, 0x886B}, //6062 #CJK UNIFIED IDEOGRAPH + {0xE5CD, 0x8881}, //6063 #CJK UNIFIED IDEOGRAPH + {0xE5CE, 0x887E}, //6064 #CJK UNIFIED IDEOGRAPH + {0xE5CF, 0x889E}, //6065 #CJK UNIFIED IDEOGRAPH + {0xE5D0, 0x8875}, //6066 #CJK UNIFIED IDEOGRAPH + {0xE5D1, 0x887D}, //6067 #CJK UNIFIED IDEOGRAPH + {0xE5D2, 0x88B5}, //6068 #CJK UNIFIED IDEOGRAPH + {0xE5D3, 0x8872}, //6069 #CJK UNIFIED IDEOGRAPH + {0xE5D4, 0x8882}, //6070 #CJK UNIFIED IDEOGRAPH + {0xE5D5, 0x8897}, //6071 #CJK UNIFIED IDEOGRAPH + {0xE5D6, 0x8892}, //6072 #CJK UNIFIED IDEOGRAPH + {0xE5D7, 0x88AE}, //6073 #CJK UNIFIED IDEOGRAPH + {0xE5D8, 0x8899}, //6074 #CJK UNIFIED IDEOGRAPH + {0xE5D9, 0x88A2}, //6075 #CJK UNIFIED IDEOGRAPH + {0xE5DA, 0x888D}, //6076 #CJK UNIFIED IDEOGRAPH + {0xE5DB, 0x88A4}, //6077 #CJK UNIFIED IDEOGRAPH + {0xE5DC, 0x88B0}, //6078 #CJK UNIFIED IDEOGRAPH + {0xE5DD, 0x88BF}, //6079 #CJK UNIFIED IDEOGRAPH + {0xE5DE, 0x88B1}, //6080 #CJK UNIFIED IDEOGRAPH + {0xE5DF, 0x88C3}, //6081 #CJK UNIFIED IDEOGRAPH + {0xE5E0, 0x88C4}, //6082 #CJK UNIFIED IDEOGRAPH + {0xE5E1, 0x88D4}, //6083 #CJK UNIFIED IDEOGRAPH + {0xE5E2, 0x88D8}, //6084 #CJK UNIFIED IDEOGRAPH + {0xE5E3, 0x88D9}, //6085 #CJK UNIFIED IDEOGRAPH + {0xE5E4, 0x88DD}, //6086 #CJK UNIFIED IDEOGRAPH + {0xE5E5, 0x88F9}, //6087 #CJK UNIFIED IDEOGRAPH + {0xE5E6, 0x8902}, //6088 #CJK UNIFIED IDEOGRAPH + {0xE5E7, 0x88FC}, //6089 #CJK UNIFIED IDEOGRAPH + {0xE5E8, 0x88F4}, //6090 #CJK UNIFIED IDEOGRAPH + {0xE5E9, 0x88E8}, //6091 #CJK UNIFIED IDEOGRAPH + {0xE5EA, 0x88F2}, //6092 #CJK UNIFIED IDEOGRAPH + {0xE5EB, 0x8904}, //6093 #CJK UNIFIED IDEOGRAPH + {0xE5EC, 0x890C}, //6094 #CJK UNIFIED IDEOGRAPH + {0xE5ED, 0x890A}, //6095 #CJK UNIFIED IDEOGRAPH + {0xE5EE, 0x8913}, //6096 #CJK UNIFIED IDEOGRAPH + {0xE5EF, 0x8943}, //6097 #CJK UNIFIED IDEOGRAPH + {0xE5F0, 0x891E}, //6098 #CJK UNIFIED IDEOGRAPH + {0xE5F1, 0x8925}, //6099 #CJK UNIFIED IDEOGRAPH + {0xE5F2, 0x892A}, //6100 #CJK UNIFIED IDEOGRAPH + {0xE5F3, 0x892B}, //6101 #CJK UNIFIED IDEOGRAPH + {0xE5F4, 0x8941}, //6102 #CJK UNIFIED IDEOGRAPH + {0xE5F5, 0x8944}, //6103 #CJK UNIFIED IDEOGRAPH + {0xE5F6, 0x893B}, //6104 #CJK UNIFIED IDEOGRAPH + {0xE5F7, 0x8936}, //6105 #CJK UNIFIED IDEOGRAPH + {0xE5F8, 0x8938}, //6106 #CJK UNIFIED IDEOGRAPH + {0xE5F9, 0x894C}, //6107 #CJK UNIFIED IDEOGRAPH + {0xE5FA, 0x891D}, //6108 #CJK UNIFIED IDEOGRAPH + {0xE5FB, 0x8960}, //6109 #CJK UNIFIED IDEOGRAPH + {0xE5FC, 0x895E}, //6110 #CJK UNIFIED IDEOGRAPH + {0xE640, 0x8966}, //6111 #CJK UNIFIED IDEOGRAPH + {0xE641, 0x8964}, //6112 #CJK UNIFIED IDEOGRAPH + {0xE642, 0x896D}, //6113 #CJK UNIFIED IDEOGRAPH + {0xE643, 0x896A}, //6114 #CJK UNIFIED IDEOGRAPH + {0xE644, 0x896F}, //6115 #CJK UNIFIED IDEOGRAPH + {0xE645, 0x8974}, //6116 #CJK UNIFIED IDEOGRAPH + {0xE646, 0x8977}, //6117 #CJK UNIFIED IDEOGRAPH + {0xE647, 0x897E}, //6118 #CJK UNIFIED IDEOGRAPH + {0xE648, 0x8983}, //6119 #CJK UNIFIED IDEOGRAPH + {0xE649, 0x8988}, //6120 #CJK UNIFIED IDEOGRAPH + {0xE64A, 0x898A}, //6121 #CJK UNIFIED IDEOGRAPH + {0xE64B, 0x8993}, //6122 #CJK UNIFIED IDEOGRAPH + {0xE64C, 0x8998}, //6123 #CJK UNIFIED IDEOGRAPH + {0xE64D, 0x89A1}, //6124 #CJK UNIFIED IDEOGRAPH + {0xE64E, 0x89A9}, //6125 #CJK UNIFIED IDEOGRAPH + {0xE64F, 0x89A6}, //6126 #CJK UNIFIED IDEOGRAPH + {0xE650, 0x89AC}, //6127 #CJK UNIFIED IDEOGRAPH + {0xE651, 0x89AF}, //6128 #CJK UNIFIED IDEOGRAPH + {0xE652, 0x89B2}, //6129 #CJK UNIFIED IDEOGRAPH + {0xE653, 0x89BA}, //6130 #CJK UNIFIED IDEOGRAPH + {0xE654, 0x89BD}, //6131 #CJK UNIFIED IDEOGRAPH + {0xE655, 0x89BF}, //6132 #CJK UNIFIED IDEOGRAPH + {0xE656, 0x89C0}, //6133 #CJK UNIFIED IDEOGRAPH + {0xE657, 0x89DA}, //6134 #CJK UNIFIED IDEOGRAPH + {0xE658, 0x89DC}, //6135 #CJK UNIFIED IDEOGRAPH + {0xE659, 0x89DD}, //6136 #CJK UNIFIED IDEOGRAPH + {0xE65A, 0x89E7}, //6137 #CJK UNIFIED IDEOGRAPH + {0xE65B, 0x89F4}, //6138 #CJK UNIFIED IDEOGRAPH + {0xE65C, 0x89F8}, //6139 #CJK UNIFIED IDEOGRAPH + {0xE65D, 0x8A03}, //6140 #CJK UNIFIED IDEOGRAPH + {0xE65E, 0x8A16}, //6141 #CJK UNIFIED IDEOGRAPH + {0xE65F, 0x8A10}, //6142 #CJK UNIFIED IDEOGRAPH + {0xE660, 0x8A0C}, //6143 #CJK UNIFIED IDEOGRAPH + {0xE661, 0x8A1B}, //6144 #CJK UNIFIED IDEOGRAPH + {0xE662, 0x8A1D}, //6145 #CJK UNIFIED IDEOGRAPH + {0xE663, 0x8A25}, //6146 #CJK UNIFIED IDEOGRAPH + {0xE664, 0x8A36}, //6147 #CJK UNIFIED IDEOGRAPH + {0xE665, 0x8A41}, //6148 #CJK UNIFIED IDEOGRAPH + {0xE666, 0x8A5B}, //6149 #CJK UNIFIED IDEOGRAPH + {0xE667, 0x8A52}, //6150 #CJK UNIFIED IDEOGRAPH + {0xE668, 0x8A46}, //6151 #CJK UNIFIED IDEOGRAPH + {0xE669, 0x8A48}, //6152 #CJK UNIFIED IDEOGRAPH + {0xE66A, 0x8A7C}, //6153 #CJK UNIFIED IDEOGRAPH + {0xE66B, 0x8A6D}, //6154 #CJK UNIFIED IDEOGRAPH + {0xE66C, 0x8A6C}, //6155 #CJK UNIFIED IDEOGRAPH + {0xE66D, 0x8A62}, //6156 #CJK UNIFIED IDEOGRAPH + {0xE66E, 0x8A85}, //6157 #CJK UNIFIED IDEOGRAPH + {0xE66F, 0x8A82}, //6158 #CJK UNIFIED IDEOGRAPH + {0xE670, 0x8A84}, //6159 #CJK UNIFIED IDEOGRAPH + {0xE671, 0x8AA8}, //6160 #CJK UNIFIED IDEOGRAPH + {0xE672, 0x8AA1}, //6161 #CJK UNIFIED IDEOGRAPH + {0xE673, 0x8A91}, //6162 #CJK UNIFIED IDEOGRAPH + {0xE674, 0x8AA5}, //6163 #CJK UNIFIED IDEOGRAPH + {0xE675, 0x8AA6}, //6164 #CJK UNIFIED IDEOGRAPH + {0xE676, 0x8A9A}, //6165 #CJK UNIFIED IDEOGRAPH + {0xE677, 0x8AA3}, //6166 #CJK UNIFIED IDEOGRAPH + {0xE678, 0x8AC4}, //6167 #CJK UNIFIED IDEOGRAPH + {0xE679, 0x8ACD}, //6168 #CJK UNIFIED IDEOGRAPH + {0xE67A, 0x8AC2}, //6169 #CJK UNIFIED IDEOGRAPH + {0xE67B, 0x8ADA}, //6170 #CJK UNIFIED IDEOGRAPH + {0xE67C, 0x8AEB}, //6171 #CJK UNIFIED IDEOGRAPH + {0xE67D, 0x8AF3}, //6172 #CJK UNIFIED IDEOGRAPH + {0xE67E, 0x8AE7}, //6173 #CJK UNIFIED IDEOGRAPH + {0xE680, 0x8AE4}, //6174 #CJK UNIFIED IDEOGRAPH + {0xE681, 0x8AF1}, //6175 #CJK UNIFIED IDEOGRAPH + {0xE682, 0x8B14}, //6176 #CJK UNIFIED IDEOGRAPH + {0xE683, 0x8AE0}, //6177 #CJK UNIFIED IDEOGRAPH + {0xE684, 0x8AE2}, //6178 #CJK UNIFIED IDEOGRAPH + {0xE685, 0x8AF7}, //6179 #CJK UNIFIED IDEOGRAPH + {0xE686, 0x8ADE}, //6180 #CJK UNIFIED IDEOGRAPH + {0xE687, 0x8ADB}, //6181 #CJK UNIFIED IDEOGRAPH + {0xE688, 0x8B0C}, //6182 #CJK UNIFIED IDEOGRAPH + {0xE689, 0x8B07}, //6183 #CJK UNIFIED IDEOGRAPH + {0xE68A, 0x8B1A}, //6184 #CJK UNIFIED IDEOGRAPH + {0xE68B, 0x8AE1}, //6185 #CJK UNIFIED IDEOGRAPH + {0xE68C, 0x8B16}, //6186 #CJK UNIFIED IDEOGRAPH + {0xE68D, 0x8B10}, //6187 #CJK UNIFIED IDEOGRAPH + {0xE68E, 0x8B17}, //6188 #CJK UNIFIED IDEOGRAPH + {0xE68F, 0x8B20}, //6189 #CJK UNIFIED IDEOGRAPH + {0xE690, 0x8B33}, //6190 #CJK UNIFIED IDEOGRAPH + {0xE691, 0x97AB}, //6191 #CJK UNIFIED IDEOGRAPH + {0xE692, 0x8B26}, //6192 #CJK UNIFIED IDEOGRAPH + {0xE693, 0x8B2B}, //6193 #CJK UNIFIED IDEOGRAPH + {0xE694, 0x8B3E}, //6194 #CJK UNIFIED IDEOGRAPH + {0xE695, 0x8B28}, //6195 #CJK UNIFIED IDEOGRAPH + {0xE696, 0x8B41}, //6196 #CJK UNIFIED IDEOGRAPH + {0xE697, 0x8B4C}, //6197 #CJK UNIFIED IDEOGRAPH + {0xE698, 0x8B4F}, //6198 #CJK UNIFIED IDEOGRAPH + {0xE699, 0x8B4E}, //6199 #CJK UNIFIED IDEOGRAPH + {0xE69A, 0x8B49}, //6200 #CJK UNIFIED IDEOGRAPH + {0xE69B, 0x8B56}, //6201 #CJK UNIFIED IDEOGRAPH + {0xE69C, 0x8B5B}, //6202 #CJK UNIFIED IDEOGRAPH + {0xE69D, 0x8B5A}, //6203 #CJK UNIFIED IDEOGRAPH + {0xE69E, 0x8B6B}, //6204 #CJK UNIFIED IDEOGRAPH + {0xE69F, 0x8B5F}, //6205 #CJK UNIFIED IDEOGRAPH + {0xE6A0, 0x8B6C}, //6206 #CJK UNIFIED IDEOGRAPH + {0xE6A1, 0x8B6F}, //6207 #CJK UNIFIED IDEOGRAPH + {0xE6A2, 0x8B74}, //6208 #CJK UNIFIED IDEOGRAPH + {0xE6A3, 0x8B7D}, //6209 #CJK UNIFIED IDEOGRAPH + {0xE6A4, 0x8B80}, //6210 #CJK UNIFIED IDEOGRAPH + {0xE6A5, 0x8B8C}, //6211 #CJK UNIFIED IDEOGRAPH + {0xE6A6, 0x8B8E}, //6212 #CJK UNIFIED IDEOGRAPH + {0xE6A7, 0x8B92}, //6213 #CJK UNIFIED IDEOGRAPH + {0xE6A8, 0x8B93}, //6214 #CJK UNIFIED IDEOGRAPH + {0xE6A9, 0x8B96}, //6215 #CJK UNIFIED IDEOGRAPH + {0xE6AA, 0x8B99}, //6216 #CJK UNIFIED IDEOGRAPH + {0xE6AB, 0x8B9A}, //6217 #CJK UNIFIED IDEOGRAPH + {0xE6AC, 0x8C3A}, //6218 #CJK UNIFIED IDEOGRAPH + {0xE6AD, 0x8C41}, //6219 #CJK UNIFIED IDEOGRAPH + {0xE6AE, 0x8C3F}, //6220 #CJK UNIFIED IDEOGRAPH + {0xE6AF, 0x8C48}, //6221 #CJK UNIFIED IDEOGRAPH + {0xE6B0, 0x8C4C}, //6222 #CJK UNIFIED IDEOGRAPH + {0xE6B1, 0x8C4E}, //6223 #CJK UNIFIED IDEOGRAPH + {0xE6B2, 0x8C50}, //6224 #CJK UNIFIED IDEOGRAPH + {0xE6B3, 0x8C55}, //6225 #CJK UNIFIED IDEOGRAPH + {0xE6B4, 0x8C62}, //6226 #CJK UNIFIED IDEOGRAPH + {0xE6B5, 0x8C6C}, //6227 #CJK UNIFIED IDEOGRAPH + {0xE6B6, 0x8C78}, //6228 #CJK UNIFIED IDEOGRAPH + {0xE6B7, 0x8C7A}, //6229 #CJK UNIFIED IDEOGRAPH + {0xE6B8, 0x8C82}, //6230 #CJK UNIFIED IDEOGRAPH + {0xE6B9, 0x8C89}, //6231 #CJK UNIFIED IDEOGRAPH + {0xE6BA, 0x8C85}, //6232 #CJK UNIFIED IDEOGRAPH + {0xE6BB, 0x8C8A}, //6233 #CJK UNIFIED IDEOGRAPH + {0xE6BC, 0x8C8D}, //6234 #CJK UNIFIED IDEOGRAPH + {0xE6BD, 0x8C8E}, //6235 #CJK UNIFIED IDEOGRAPH + {0xE6BE, 0x8C94}, //6236 #CJK UNIFIED IDEOGRAPH + {0xE6BF, 0x8C7C}, //6237 #CJK UNIFIED IDEOGRAPH + {0xE6C0, 0x8C98}, //6238 #CJK UNIFIED IDEOGRAPH + {0xE6C1, 0x621D}, //6239 #CJK UNIFIED IDEOGRAPH + {0xE6C2, 0x8CAD}, //6240 #CJK UNIFIED IDEOGRAPH + {0xE6C3, 0x8CAA}, //6241 #CJK UNIFIED IDEOGRAPH + {0xE6C4, 0x8CBD}, //6242 #CJK UNIFIED IDEOGRAPH + {0xE6C5, 0x8CB2}, //6243 #CJK UNIFIED IDEOGRAPH + {0xE6C6, 0x8CB3}, //6244 #CJK UNIFIED IDEOGRAPH + {0xE6C7, 0x8CAE}, //6245 #CJK UNIFIED IDEOGRAPH + {0xE6C8, 0x8CB6}, //6246 #CJK UNIFIED IDEOGRAPH + {0xE6C9, 0x8CC8}, //6247 #CJK UNIFIED IDEOGRAPH + {0xE6CA, 0x8CC1}, //6248 #CJK UNIFIED IDEOGRAPH + {0xE6CB, 0x8CE4}, //6249 #CJK UNIFIED IDEOGRAPH + {0xE6CC, 0x8CE3}, //6250 #CJK UNIFIED IDEOGRAPH + {0xE6CD, 0x8CDA}, //6251 #CJK UNIFIED IDEOGRAPH + {0xE6CE, 0x8CFD}, //6252 #CJK UNIFIED IDEOGRAPH + {0xE6CF, 0x8CFA}, //6253 #CJK UNIFIED IDEOGRAPH + {0xE6D0, 0x8CFB}, //6254 #CJK UNIFIED IDEOGRAPH + {0xE6D1, 0x8D04}, //6255 #CJK UNIFIED IDEOGRAPH + {0xE6D2, 0x8D05}, //6256 #CJK UNIFIED IDEOGRAPH + {0xE6D3, 0x8D0A}, //6257 #CJK UNIFIED IDEOGRAPH + {0xE6D4, 0x8D07}, //6258 #CJK UNIFIED IDEOGRAPH + {0xE6D5, 0x8D0F}, //6259 #CJK UNIFIED IDEOGRAPH + {0xE6D6, 0x8D0D}, //6260 #CJK UNIFIED IDEOGRAPH + {0xE6D7, 0x8D10}, //6261 #CJK UNIFIED IDEOGRAPH + {0xE6D8, 0x9F4E}, //6262 #CJK UNIFIED IDEOGRAPH + {0xE6D9, 0x8D13}, //6263 #CJK UNIFIED IDEOGRAPH + {0xE6DA, 0x8CCD}, //6264 #CJK UNIFIED IDEOGRAPH + {0xE6DB, 0x8D14}, //6265 #CJK UNIFIED IDEOGRAPH + {0xE6DC, 0x8D16}, //6266 #CJK UNIFIED IDEOGRAPH + {0xE6DD, 0x8D67}, //6267 #CJK UNIFIED IDEOGRAPH + {0xE6DE, 0x8D6D}, //6268 #CJK UNIFIED IDEOGRAPH + {0xE6DF, 0x8D71}, //6269 #CJK UNIFIED IDEOGRAPH + {0xE6E0, 0x8D73}, //6270 #CJK UNIFIED IDEOGRAPH + {0xE6E1, 0x8D81}, //6271 #CJK UNIFIED IDEOGRAPH + {0xE6E2, 0x8D99}, //6272 #CJK UNIFIED IDEOGRAPH + {0xE6E3, 0x8DC2}, //6273 #CJK UNIFIED IDEOGRAPH + {0xE6E4, 0x8DBE}, //6274 #CJK UNIFIED IDEOGRAPH + {0xE6E5, 0x8DBA}, //6275 #CJK UNIFIED IDEOGRAPH + {0xE6E6, 0x8DCF}, //6276 #CJK UNIFIED IDEOGRAPH + {0xE6E7, 0x8DDA}, //6277 #CJK UNIFIED IDEOGRAPH + {0xE6E8, 0x8DD6}, //6278 #CJK UNIFIED IDEOGRAPH + {0xE6E9, 0x8DCC}, //6279 #CJK UNIFIED IDEOGRAPH + {0xE6EA, 0x8DDB}, //6280 #CJK UNIFIED IDEOGRAPH + {0xE6EB, 0x8DCB}, //6281 #CJK UNIFIED IDEOGRAPH + {0xE6EC, 0x8DEA}, //6282 #CJK UNIFIED IDEOGRAPH + {0xE6ED, 0x8DEB}, //6283 #CJK UNIFIED IDEOGRAPH + {0xE6EE, 0x8DDF}, //6284 #CJK UNIFIED IDEOGRAPH + {0xE6EF, 0x8DE3}, //6285 #CJK UNIFIED IDEOGRAPH + {0xE6F0, 0x8DFC}, //6286 #CJK UNIFIED IDEOGRAPH + {0xE6F1, 0x8E08}, //6287 #CJK UNIFIED IDEOGRAPH + {0xE6F2, 0x8E09}, //6288 #CJK UNIFIED IDEOGRAPH + {0xE6F3, 0x8DFF}, //6289 #CJK UNIFIED IDEOGRAPH + {0xE6F4, 0x8E1D}, //6290 #CJK UNIFIED IDEOGRAPH + {0xE6F5, 0x8E1E}, //6291 #CJK UNIFIED IDEOGRAPH + {0xE6F6, 0x8E10}, //6292 #CJK UNIFIED IDEOGRAPH + {0xE6F7, 0x8E1F}, //6293 #CJK UNIFIED IDEOGRAPH + {0xE6F8, 0x8E42}, //6294 #CJK UNIFIED IDEOGRAPH + {0xE6F9, 0x8E35}, //6295 #CJK UNIFIED IDEOGRAPH + {0xE6FA, 0x8E30}, //6296 #CJK UNIFIED IDEOGRAPH + {0xE6FB, 0x8E34}, //6297 #CJK UNIFIED IDEOGRAPH + {0xE6FC, 0x8E4A}, //6298 #CJK UNIFIED IDEOGRAPH + {0xE740, 0x8E47}, //6299 #CJK UNIFIED IDEOGRAPH + {0xE741, 0x8E49}, //6300 #CJK UNIFIED IDEOGRAPH + {0xE742, 0x8E4C}, //6301 #CJK UNIFIED IDEOGRAPH + {0xE743, 0x8E50}, //6302 #CJK UNIFIED IDEOGRAPH + {0xE744, 0x8E48}, //6303 #CJK UNIFIED IDEOGRAPH + {0xE745, 0x8E59}, //6304 #CJK UNIFIED IDEOGRAPH + {0xE746, 0x8E64}, //6305 #CJK UNIFIED IDEOGRAPH + {0xE747, 0x8E60}, //6306 #CJK UNIFIED IDEOGRAPH + {0xE748, 0x8E2A}, //6307 #CJK UNIFIED IDEOGRAPH + {0xE749, 0x8E63}, //6308 #CJK UNIFIED IDEOGRAPH + {0xE74A, 0x8E55}, //6309 #CJK UNIFIED IDEOGRAPH + {0xE74B, 0x8E76}, //6310 #CJK UNIFIED IDEOGRAPH + {0xE74C, 0x8E72}, //6311 #CJK UNIFIED IDEOGRAPH + {0xE74D, 0x8E7C}, //6312 #CJK UNIFIED IDEOGRAPH + {0xE74E, 0x8E81}, //6313 #CJK UNIFIED IDEOGRAPH + {0xE74F, 0x8E87}, //6314 #CJK UNIFIED IDEOGRAPH + {0xE750, 0x8E85}, //6315 #CJK UNIFIED IDEOGRAPH + {0xE751, 0x8E84}, //6316 #CJK UNIFIED IDEOGRAPH + {0xE752, 0x8E8B}, //6317 #CJK UNIFIED IDEOGRAPH + {0xE753, 0x8E8A}, //6318 #CJK UNIFIED IDEOGRAPH + {0xE754, 0x8E93}, //6319 #CJK UNIFIED IDEOGRAPH + {0xE755, 0x8E91}, //6320 #CJK UNIFIED IDEOGRAPH + {0xE756, 0x8E94}, //6321 #CJK UNIFIED IDEOGRAPH + {0xE757, 0x8E99}, //6322 #CJK UNIFIED IDEOGRAPH + {0xE758, 0x8EAA}, //6323 #CJK UNIFIED IDEOGRAPH + {0xE759, 0x8EA1}, //6324 #CJK UNIFIED IDEOGRAPH + {0xE75A, 0x8EAC}, //6325 #CJK UNIFIED IDEOGRAPH + {0xE75B, 0x8EB0}, //6326 #CJK UNIFIED IDEOGRAPH + {0xE75C, 0x8EC6}, //6327 #CJK UNIFIED IDEOGRAPH + {0xE75D, 0x8EB1}, //6328 #CJK UNIFIED IDEOGRAPH + {0xE75E, 0x8EBE}, //6329 #CJK UNIFIED IDEOGRAPH + {0xE75F, 0x8EC5}, //6330 #CJK UNIFIED IDEOGRAPH + {0xE760, 0x8EC8}, //6331 #CJK UNIFIED IDEOGRAPH + {0xE761, 0x8ECB}, //6332 #CJK UNIFIED IDEOGRAPH + {0xE762, 0x8EDB}, //6333 #CJK UNIFIED IDEOGRAPH + {0xE763, 0x8EE3}, //6334 #CJK UNIFIED IDEOGRAPH + {0xE764, 0x8EFC}, //6335 #CJK UNIFIED IDEOGRAPH + {0xE765, 0x8EFB}, //6336 #CJK UNIFIED IDEOGRAPH + {0xE766, 0x8EEB}, //6337 #CJK UNIFIED IDEOGRAPH + {0xE767, 0x8EFE}, //6338 #CJK UNIFIED IDEOGRAPH + {0xE768, 0x8F0A}, //6339 #CJK UNIFIED IDEOGRAPH + {0xE769, 0x8F05}, //6340 #CJK UNIFIED IDEOGRAPH + {0xE76A, 0x8F15}, //6341 #CJK UNIFIED IDEOGRAPH + {0xE76B, 0x8F12}, //6342 #CJK UNIFIED IDEOGRAPH + {0xE76C, 0x8F19}, //6343 #CJK UNIFIED IDEOGRAPH + {0xE76D, 0x8F13}, //6344 #CJK UNIFIED IDEOGRAPH + {0xE76E, 0x8F1C}, //6345 #CJK UNIFIED IDEOGRAPH + {0xE76F, 0x8F1F}, //6346 #CJK UNIFIED IDEOGRAPH + {0xE770, 0x8F1B}, //6347 #CJK UNIFIED IDEOGRAPH + {0xE771, 0x8F0C}, //6348 #CJK UNIFIED IDEOGRAPH + {0xE772, 0x8F26}, //6349 #CJK UNIFIED IDEOGRAPH + {0xE773, 0x8F33}, //6350 #CJK UNIFIED IDEOGRAPH + {0xE774, 0x8F3B}, //6351 #CJK UNIFIED IDEOGRAPH + {0xE775, 0x8F39}, //6352 #CJK UNIFIED IDEOGRAPH + {0xE776, 0x8F45}, //6353 #CJK UNIFIED IDEOGRAPH + {0xE777, 0x8F42}, //6354 #CJK UNIFIED IDEOGRAPH + {0xE778, 0x8F3E}, //6355 #CJK UNIFIED IDEOGRAPH + {0xE779, 0x8F4C}, //6356 #CJK UNIFIED IDEOGRAPH + {0xE77A, 0x8F49}, //6357 #CJK UNIFIED IDEOGRAPH + {0xE77B, 0x8F46}, //6358 #CJK UNIFIED IDEOGRAPH + {0xE77C, 0x8F4E}, //6359 #CJK UNIFIED IDEOGRAPH + {0xE77D, 0x8F57}, //6360 #CJK UNIFIED IDEOGRAPH + {0xE77E, 0x8F5C}, //6361 #CJK UNIFIED IDEOGRAPH + {0xE780, 0x8F62}, //6362 #CJK UNIFIED IDEOGRAPH + {0xE781, 0x8F63}, //6363 #CJK UNIFIED IDEOGRAPH + {0xE782, 0x8F64}, //6364 #CJK UNIFIED IDEOGRAPH + {0xE783, 0x8F9C}, //6365 #CJK UNIFIED IDEOGRAPH + {0xE784, 0x8F9F}, //6366 #CJK UNIFIED IDEOGRAPH + {0xE785, 0x8FA3}, //6367 #CJK UNIFIED IDEOGRAPH + {0xE786, 0x8FAD}, //6368 #CJK UNIFIED IDEOGRAPH + {0xE787, 0x8FAF}, //6369 #CJK UNIFIED IDEOGRAPH + {0xE788, 0x8FB7}, //6370 #CJK UNIFIED IDEOGRAPH + {0xE789, 0x8FDA}, //6371 #CJK UNIFIED IDEOGRAPH + {0xE78A, 0x8FE5}, //6372 #CJK UNIFIED IDEOGRAPH + {0xE78B, 0x8FE2}, //6373 #CJK UNIFIED IDEOGRAPH + {0xE78C, 0x8FEA}, //6374 #CJK UNIFIED IDEOGRAPH + {0xE78D, 0x8FEF}, //6375 #CJK UNIFIED IDEOGRAPH + {0xE78E, 0x9087}, //6376 #CJK UNIFIED IDEOGRAPH + {0xE78F, 0x8FF4}, //6377 #CJK UNIFIED IDEOGRAPH + {0xE790, 0x9005}, //6378 #CJK UNIFIED IDEOGRAPH + {0xE791, 0x8FF9}, //6379 #CJK UNIFIED IDEOGRAPH + {0xE792, 0x8FFA}, //6380 #CJK UNIFIED IDEOGRAPH + {0xE793, 0x9011}, //6381 #CJK UNIFIED IDEOGRAPH + {0xE794, 0x9015}, //6382 #CJK UNIFIED IDEOGRAPH + {0xE795, 0x9021}, //6383 #CJK UNIFIED IDEOGRAPH + {0xE796, 0x900D}, //6384 #CJK UNIFIED IDEOGRAPH + {0xE797, 0x901E}, //6385 #CJK UNIFIED IDEOGRAPH + {0xE798, 0x9016}, //6386 #CJK UNIFIED IDEOGRAPH + {0xE799, 0x900B}, //6387 #CJK UNIFIED IDEOGRAPH + {0xE79A, 0x9027}, //6388 #CJK UNIFIED IDEOGRAPH + {0xE79B, 0x9036}, //6389 #CJK UNIFIED IDEOGRAPH + {0xE79C, 0x9035}, //6390 #CJK UNIFIED IDEOGRAPH + {0xE79D, 0x9039}, //6391 #CJK UNIFIED IDEOGRAPH + {0xE79E, 0x8FF8}, //6392 #CJK UNIFIED IDEOGRAPH + {0xE79F, 0x904F}, //6393 #CJK UNIFIED IDEOGRAPH + {0xE7A0, 0x9050}, //6394 #CJK UNIFIED IDEOGRAPH + {0xE7A1, 0x9051}, //6395 #CJK UNIFIED IDEOGRAPH + {0xE7A2, 0x9052}, //6396 #CJK UNIFIED IDEOGRAPH + {0xE7A3, 0x900E}, //6397 #CJK UNIFIED IDEOGRAPH + {0xE7A4, 0x9049}, //6398 #CJK UNIFIED IDEOGRAPH + {0xE7A5, 0x903E}, //6399 #CJK UNIFIED IDEOGRAPH + {0xE7A6, 0x9056}, //6400 #CJK UNIFIED IDEOGRAPH + {0xE7A7, 0x9058}, //6401 #CJK UNIFIED IDEOGRAPH + {0xE7A8, 0x905E}, //6402 #CJK UNIFIED IDEOGRAPH + {0xE7A9, 0x9068}, //6403 #CJK UNIFIED IDEOGRAPH + {0xE7AA, 0x906F}, //6404 #CJK UNIFIED IDEOGRAPH + {0xE7AB, 0x9076}, //6405 #CJK UNIFIED IDEOGRAPH + {0xE7AC, 0x96A8}, //6406 #CJK UNIFIED IDEOGRAPH + {0xE7AD, 0x9072}, //6407 #CJK UNIFIED IDEOGRAPH + {0xE7AE, 0x9082}, //6408 #CJK UNIFIED IDEOGRAPH + {0xE7AF, 0x907D}, //6409 #CJK UNIFIED IDEOGRAPH + {0xE7B0, 0x9081}, //6410 #CJK UNIFIED IDEOGRAPH + {0xE7B1, 0x9080}, //6411 #CJK UNIFIED IDEOGRAPH + {0xE7B2, 0x908A}, //6412 #CJK UNIFIED IDEOGRAPH + {0xE7B3, 0x9089}, //6413 #CJK UNIFIED IDEOGRAPH + {0xE7B4, 0x908F}, //6414 #CJK UNIFIED IDEOGRAPH + {0xE7B5, 0x90A8}, //6415 #CJK UNIFIED IDEOGRAPH + {0xE7B6, 0x90AF}, //6416 #CJK UNIFIED IDEOGRAPH + {0xE7B7, 0x90B1}, //6417 #CJK UNIFIED IDEOGRAPH + {0xE7B8, 0x90B5}, //6418 #CJK UNIFIED IDEOGRAPH + {0xE7B9, 0x90E2}, //6419 #CJK UNIFIED IDEOGRAPH + {0xE7BA, 0x90E4}, //6420 #CJK UNIFIED IDEOGRAPH + {0xE7BB, 0x6248}, //6421 #CJK UNIFIED IDEOGRAPH + {0xE7BC, 0x90DB}, //6422 #CJK UNIFIED IDEOGRAPH + {0xE7BD, 0x9102}, //6423 #CJK UNIFIED IDEOGRAPH + {0xE7BE, 0x9112}, //6424 #CJK UNIFIED IDEOGRAPH + {0xE7BF, 0x9119}, //6425 #CJK UNIFIED IDEOGRAPH + {0xE7C0, 0x9132}, //6426 #CJK UNIFIED IDEOGRAPH + {0xE7C1, 0x9130}, //6427 #CJK UNIFIED IDEOGRAPH + {0xE7C2, 0x914A}, //6428 #CJK UNIFIED IDEOGRAPH + {0xE7C3, 0x9156}, //6429 #CJK UNIFIED IDEOGRAPH + {0xE7C4, 0x9158}, //6430 #CJK UNIFIED IDEOGRAPH + {0xE7C5, 0x9163}, //6431 #CJK UNIFIED IDEOGRAPH + {0xE7C6, 0x9165}, //6432 #CJK UNIFIED IDEOGRAPH + {0xE7C7, 0x9169}, //6433 #CJK UNIFIED IDEOGRAPH + {0xE7C8, 0x9173}, //6434 #CJK UNIFIED IDEOGRAPH + {0xE7C9, 0x9172}, //6435 #CJK UNIFIED IDEOGRAPH + {0xE7CA, 0x918B}, //6436 #CJK UNIFIED IDEOGRAPH + {0xE7CB, 0x9189}, //6437 #CJK UNIFIED IDEOGRAPH + {0xE7CC, 0x9182}, //6438 #CJK UNIFIED IDEOGRAPH + {0xE7CD, 0x91A2}, //6439 #CJK UNIFIED IDEOGRAPH + {0xE7CE, 0x91AB}, //6440 #CJK UNIFIED IDEOGRAPH + {0xE7CF, 0x91AF}, //6441 #CJK UNIFIED IDEOGRAPH + {0xE7D0, 0x91AA}, //6442 #CJK UNIFIED IDEOGRAPH + {0xE7D1, 0x91B5}, //6443 #CJK UNIFIED IDEOGRAPH + {0xE7D2, 0x91B4}, //6444 #CJK UNIFIED IDEOGRAPH + {0xE7D3, 0x91BA}, //6445 #CJK UNIFIED IDEOGRAPH + {0xE7D4, 0x91C0}, //6446 #CJK UNIFIED IDEOGRAPH + {0xE7D5, 0x91C1}, //6447 #CJK UNIFIED IDEOGRAPH + {0xE7D6, 0x91C9}, //6448 #CJK UNIFIED IDEOGRAPH + {0xE7D7, 0x91CB}, //6449 #CJK UNIFIED IDEOGRAPH + {0xE7D8, 0x91D0}, //6450 #CJK UNIFIED IDEOGRAPH + {0xE7D9, 0x91D6}, //6451 #CJK UNIFIED IDEOGRAPH + {0xE7DA, 0x91DF}, //6452 #CJK UNIFIED IDEOGRAPH + {0xE7DB, 0x91E1}, //6453 #CJK UNIFIED IDEOGRAPH + {0xE7DC, 0x91DB}, //6454 #CJK UNIFIED IDEOGRAPH + {0xE7DD, 0x91FC}, //6455 #CJK UNIFIED IDEOGRAPH + {0xE7DE, 0x91F5}, //6456 #CJK UNIFIED IDEOGRAPH + {0xE7DF, 0x91F6}, //6457 #CJK UNIFIED IDEOGRAPH + {0xE7E0, 0x921E}, //6458 #CJK UNIFIED IDEOGRAPH + {0xE7E1, 0x91FF}, //6459 #CJK UNIFIED IDEOGRAPH + {0xE7E2, 0x9214}, //6460 #CJK UNIFIED IDEOGRAPH + {0xE7E3, 0x922C}, //6461 #CJK UNIFIED IDEOGRAPH + {0xE7E4, 0x9215}, //6462 #CJK UNIFIED IDEOGRAPH + {0xE7E5, 0x9211}, //6463 #CJK UNIFIED IDEOGRAPH + {0xE7E6, 0x925E}, //6464 #CJK UNIFIED IDEOGRAPH + {0xE7E7, 0x9257}, //6465 #CJK UNIFIED IDEOGRAPH + {0xE7E8, 0x9245}, //6466 #CJK UNIFIED IDEOGRAPH + {0xE7E9, 0x9249}, //6467 #CJK UNIFIED IDEOGRAPH + {0xE7EA, 0x9264}, //6468 #CJK UNIFIED IDEOGRAPH + {0xE7EB, 0x9248}, //6469 #CJK UNIFIED IDEOGRAPH + {0xE7EC, 0x9295}, //6470 #CJK UNIFIED IDEOGRAPH + {0xE7ED, 0x923F}, //6471 #CJK UNIFIED IDEOGRAPH + {0xE7EE, 0x924B}, //6472 #CJK UNIFIED IDEOGRAPH + {0xE7EF, 0x9250}, //6473 #CJK UNIFIED IDEOGRAPH + {0xE7F0, 0x929C}, //6474 #CJK UNIFIED IDEOGRAPH + {0xE7F1, 0x9296}, //6475 #CJK UNIFIED IDEOGRAPH + {0xE7F2, 0x9293}, //6476 #CJK UNIFIED IDEOGRAPH + {0xE7F3, 0x929B}, //6477 #CJK UNIFIED IDEOGRAPH + {0xE7F4, 0x925A}, //6478 #CJK UNIFIED IDEOGRAPH + {0xE7F5, 0x92CF}, //6479 #CJK UNIFIED IDEOGRAPH + {0xE7F6, 0x92B9}, //6480 #CJK UNIFIED IDEOGRAPH + {0xE7F7, 0x92B7}, //6481 #CJK UNIFIED IDEOGRAPH + {0xE7F8, 0x92E9}, //6482 #CJK UNIFIED IDEOGRAPH + {0xE7F9, 0x930F}, //6483 #CJK UNIFIED IDEOGRAPH + {0xE7FA, 0x92FA}, //6484 #CJK UNIFIED IDEOGRAPH + {0xE7FB, 0x9344}, //6485 #CJK UNIFIED IDEOGRAPH + {0xE7FC, 0x932E}, //6486 #CJK UNIFIED IDEOGRAPH + {0xE840, 0x9319}, //6487 #CJK UNIFIED IDEOGRAPH + {0xE841, 0x9322}, //6488 #CJK UNIFIED IDEOGRAPH + {0xE842, 0x931A}, //6489 #CJK UNIFIED IDEOGRAPH + {0xE843, 0x9323}, //6490 #CJK UNIFIED IDEOGRAPH + {0xE844, 0x933A}, //6491 #CJK UNIFIED IDEOGRAPH + {0xE845, 0x9335}, //6492 #CJK UNIFIED IDEOGRAPH + {0xE846, 0x933B}, //6493 #CJK UNIFIED IDEOGRAPH + {0xE847, 0x935C}, //6494 #CJK UNIFIED IDEOGRAPH + {0xE848, 0x9360}, //6495 #CJK UNIFIED IDEOGRAPH + {0xE849, 0x937C}, //6496 #CJK UNIFIED IDEOGRAPH + {0xE84A, 0x936E}, //6497 #CJK UNIFIED IDEOGRAPH + {0xE84B, 0x9356}, //6498 #CJK UNIFIED IDEOGRAPH + {0xE84C, 0x93B0}, //6499 #CJK UNIFIED IDEOGRAPH + {0xE84D, 0x93AC}, //6500 #CJK UNIFIED IDEOGRAPH + {0xE84E, 0x93AD}, //6501 #CJK UNIFIED IDEOGRAPH + {0xE84F, 0x9394}, //6502 #CJK UNIFIED IDEOGRAPH + {0xE850, 0x93B9}, //6503 #CJK UNIFIED IDEOGRAPH + {0xE851, 0x93D6}, //6504 #CJK UNIFIED IDEOGRAPH + {0xE852, 0x93D7}, //6505 #CJK UNIFIED IDEOGRAPH + {0xE853, 0x93E8}, //6506 #CJK UNIFIED IDEOGRAPH + {0xE854, 0x93E5}, //6507 #CJK UNIFIED IDEOGRAPH + {0xE855, 0x93D8}, //6508 #CJK UNIFIED IDEOGRAPH + {0xE856, 0x93C3}, //6509 #CJK UNIFIED IDEOGRAPH + {0xE857, 0x93DD}, //6510 #CJK UNIFIED IDEOGRAPH + {0xE858, 0x93D0}, //6511 #CJK UNIFIED IDEOGRAPH + {0xE859, 0x93C8}, //6512 #CJK UNIFIED IDEOGRAPH + {0xE85A, 0x93E4}, //6513 #CJK UNIFIED IDEOGRAPH + {0xE85B, 0x941A}, //6514 #CJK UNIFIED IDEOGRAPH + {0xE85C, 0x9414}, //6515 #CJK UNIFIED IDEOGRAPH + {0xE85D, 0x9413}, //6516 #CJK UNIFIED IDEOGRAPH + {0xE85E, 0x9403}, //6517 #CJK UNIFIED IDEOGRAPH + {0xE85F, 0x9407}, //6518 #CJK UNIFIED IDEOGRAPH + {0xE860, 0x9410}, //6519 #CJK UNIFIED IDEOGRAPH + {0xE861, 0x9436}, //6520 #CJK UNIFIED IDEOGRAPH + {0xE862, 0x942B}, //6521 #CJK UNIFIED IDEOGRAPH + {0xE863, 0x9435}, //6522 #CJK UNIFIED IDEOGRAPH + {0xE864, 0x9421}, //6523 #CJK UNIFIED IDEOGRAPH + {0xE865, 0x943A}, //6524 #CJK UNIFIED IDEOGRAPH + {0xE866, 0x9441}, //6525 #CJK UNIFIED IDEOGRAPH + {0xE867, 0x9452}, //6526 #CJK UNIFIED IDEOGRAPH + {0xE868, 0x9444}, //6527 #CJK UNIFIED IDEOGRAPH + {0xE869, 0x945B}, //6528 #CJK UNIFIED IDEOGRAPH + {0xE86A, 0x9460}, //6529 #CJK UNIFIED IDEOGRAPH + {0xE86B, 0x9462}, //6530 #CJK UNIFIED IDEOGRAPH + {0xE86C, 0x945E}, //6531 #CJK UNIFIED IDEOGRAPH + {0xE86D, 0x946A}, //6532 #CJK UNIFIED IDEOGRAPH + {0xE86E, 0x9229}, //6533 #CJK UNIFIED IDEOGRAPH + {0xE86F, 0x9470}, //6534 #CJK UNIFIED IDEOGRAPH + {0xE870, 0x9475}, //6535 #CJK UNIFIED IDEOGRAPH + {0xE871, 0x9477}, //6536 #CJK UNIFIED IDEOGRAPH + {0xE872, 0x947D}, //6537 #CJK UNIFIED IDEOGRAPH + {0xE873, 0x945A}, //6538 #CJK UNIFIED IDEOGRAPH + {0xE874, 0x947C}, //6539 #CJK UNIFIED IDEOGRAPH + {0xE875, 0x947E}, //6540 #CJK UNIFIED IDEOGRAPH + {0xE876, 0x9481}, //6541 #CJK UNIFIED IDEOGRAPH + {0xE877, 0x947F}, //6542 #CJK UNIFIED IDEOGRAPH + {0xE878, 0x9582}, //6543 #CJK UNIFIED IDEOGRAPH + {0xE879, 0x9587}, //6544 #CJK UNIFIED IDEOGRAPH + {0xE87A, 0x958A}, //6545 #CJK UNIFIED IDEOGRAPH + {0xE87B, 0x9594}, //6546 #CJK UNIFIED IDEOGRAPH + {0xE87C, 0x9596}, //6547 #CJK UNIFIED IDEOGRAPH + {0xE87D, 0x9598}, //6548 #CJK UNIFIED IDEOGRAPH + {0xE87E, 0x9599}, //6549 #CJK UNIFIED IDEOGRAPH + {0xE880, 0x95A0}, //6550 #CJK UNIFIED IDEOGRAPH + {0xE881, 0x95A8}, //6551 #CJK UNIFIED IDEOGRAPH + {0xE882, 0x95A7}, //6552 #CJK UNIFIED IDEOGRAPH + {0xE883, 0x95AD}, //6553 #CJK UNIFIED IDEOGRAPH + {0xE884, 0x95BC}, //6554 #CJK UNIFIED IDEOGRAPH + {0xE885, 0x95BB}, //6555 #CJK UNIFIED IDEOGRAPH + {0xE886, 0x95B9}, //6556 #CJK UNIFIED IDEOGRAPH + {0xE887, 0x95BE}, //6557 #CJK UNIFIED IDEOGRAPH + {0xE888, 0x95CA}, //6558 #CJK UNIFIED IDEOGRAPH + {0xE889, 0x6FF6}, //6559 #CJK UNIFIED IDEOGRAPH + {0xE88A, 0x95C3}, //6560 #CJK UNIFIED IDEOGRAPH + {0xE88B, 0x95CD}, //6561 #CJK UNIFIED IDEOGRAPH + {0xE88C, 0x95CC}, //6562 #CJK UNIFIED IDEOGRAPH + {0xE88D, 0x95D5}, //6563 #CJK UNIFIED IDEOGRAPH + {0xE88E, 0x95D4}, //6564 #CJK UNIFIED IDEOGRAPH + {0xE88F, 0x95D6}, //6565 #CJK UNIFIED IDEOGRAPH + {0xE890, 0x95DC}, //6566 #CJK UNIFIED IDEOGRAPH + {0xE891, 0x95E1}, //6567 #CJK UNIFIED IDEOGRAPH + {0xE892, 0x95E5}, //6568 #CJK UNIFIED IDEOGRAPH + {0xE893, 0x95E2}, //6569 #CJK UNIFIED IDEOGRAPH + {0xE894, 0x9621}, //6570 #CJK UNIFIED IDEOGRAPH + {0xE895, 0x9628}, //6571 #CJK UNIFIED IDEOGRAPH + {0xE896, 0x962E}, //6572 #CJK UNIFIED IDEOGRAPH + {0xE897, 0x962F}, //6573 #CJK UNIFIED IDEOGRAPH + {0xE898, 0x9642}, //6574 #CJK UNIFIED IDEOGRAPH + {0xE899, 0x964C}, //6575 #CJK UNIFIED IDEOGRAPH + {0xE89A, 0x964F}, //6576 #CJK UNIFIED IDEOGRAPH + {0xE89B, 0x964B}, //6577 #CJK UNIFIED IDEOGRAPH + {0xE89C, 0x9677}, //6578 #CJK UNIFIED IDEOGRAPH + {0xE89D, 0x965C}, //6579 #CJK UNIFIED IDEOGRAPH + {0xE89E, 0x965E}, //6580 #CJK UNIFIED IDEOGRAPH + {0xE89F, 0x965D}, //6581 #CJK UNIFIED IDEOGRAPH + {0xE8A0, 0x965F}, //6582 #CJK UNIFIED IDEOGRAPH + {0xE8A1, 0x9666}, //6583 #CJK UNIFIED IDEOGRAPH + {0xE8A2, 0x9672}, //6584 #CJK UNIFIED IDEOGRAPH + {0xE8A3, 0x966C}, //6585 #CJK UNIFIED IDEOGRAPH + {0xE8A4, 0x968D}, //6586 #CJK UNIFIED IDEOGRAPH + {0xE8A5, 0x9698}, //6587 #CJK UNIFIED IDEOGRAPH + {0xE8A6, 0x9695}, //6588 #CJK UNIFIED IDEOGRAPH + {0xE8A7, 0x9697}, //6589 #CJK UNIFIED IDEOGRAPH + {0xE8A8, 0x96AA}, //6590 #CJK UNIFIED IDEOGRAPH + {0xE8A9, 0x96A7}, //6591 #CJK UNIFIED IDEOGRAPH + {0xE8AA, 0x96B1}, //6592 #CJK UNIFIED IDEOGRAPH + {0xE8AB, 0x96B2}, //6593 #CJK UNIFIED IDEOGRAPH + {0xE8AC, 0x96B0}, //6594 #CJK UNIFIED IDEOGRAPH + {0xE8AD, 0x96B4}, //6595 #CJK UNIFIED IDEOGRAPH + {0xE8AE, 0x96B6}, //6596 #CJK UNIFIED IDEOGRAPH + {0xE8AF, 0x96B8}, //6597 #CJK UNIFIED IDEOGRAPH + {0xE8B0, 0x96B9}, //6598 #CJK UNIFIED IDEOGRAPH + {0xE8B1, 0x96CE}, //6599 #CJK UNIFIED IDEOGRAPH + {0xE8B2, 0x96CB}, //6600 #CJK UNIFIED IDEOGRAPH + {0xE8B3, 0x96C9}, //6601 #CJK UNIFIED IDEOGRAPH + {0xE8B4, 0x96CD}, //6602 #CJK UNIFIED IDEOGRAPH + {0xE8B5, 0x894D}, //6603 #CJK UNIFIED IDEOGRAPH + {0xE8B6, 0x96DC}, //6604 #CJK UNIFIED IDEOGRAPH + {0xE8B7, 0x970D}, //6605 #CJK UNIFIED IDEOGRAPH + {0xE8B8, 0x96D5}, //6606 #CJK UNIFIED IDEOGRAPH + {0xE8B9, 0x96F9}, //6607 #CJK UNIFIED IDEOGRAPH + {0xE8BA, 0x9704}, //6608 #CJK UNIFIED IDEOGRAPH + {0xE8BB, 0x9706}, //6609 #CJK UNIFIED IDEOGRAPH + {0xE8BC, 0x9708}, //6610 #CJK UNIFIED IDEOGRAPH + {0xE8BD, 0x9713}, //6611 #CJK UNIFIED IDEOGRAPH + {0xE8BE, 0x970E}, //6612 #CJK UNIFIED IDEOGRAPH + {0xE8BF, 0x9711}, //6613 #CJK UNIFIED IDEOGRAPH + {0xE8C0, 0x970F}, //6614 #CJK UNIFIED IDEOGRAPH + {0xE8C1, 0x9716}, //6615 #CJK UNIFIED IDEOGRAPH + {0xE8C2, 0x9719}, //6616 #CJK UNIFIED IDEOGRAPH + {0xE8C3, 0x9724}, //6617 #CJK UNIFIED IDEOGRAPH + {0xE8C4, 0x972A}, //6618 #CJK UNIFIED IDEOGRAPH + {0xE8C5, 0x9730}, //6619 #CJK UNIFIED IDEOGRAPH + {0xE8C6, 0x9739}, //6620 #CJK UNIFIED IDEOGRAPH + {0xE8C7, 0x973D}, //6621 #CJK UNIFIED IDEOGRAPH + {0xE8C8, 0x973E}, //6622 #CJK UNIFIED IDEOGRAPH + {0xE8C9, 0x9744}, //6623 #CJK UNIFIED IDEOGRAPH + {0xE8CA, 0x9746}, //6624 #CJK UNIFIED IDEOGRAPH + {0xE8CB, 0x9748}, //6625 #CJK UNIFIED IDEOGRAPH + {0xE8CC, 0x9742}, //6626 #CJK UNIFIED IDEOGRAPH + {0xE8CD, 0x9749}, //6627 #CJK UNIFIED IDEOGRAPH + {0xE8CE, 0x975C}, //6628 #CJK UNIFIED IDEOGRAPH + {0xE8CF, 0x9760}, //6629 #CJK UNIFIED IDEOGRAPH + {0xE8D0, 0x9764}, //6630 #CJK UNIFIED IDEOGRAPH + {0xE8D1, 0x9766}, //6631 #CJK UNIFIED IDEOGRAPH + {0xE8D2, 0x9768}, //6632 #CJK UNIFIED IDEOGRAPH + {0xE8D3, 0x52D2}, //6633 #CJK UNIFIED IDEOGRAPH + {0xE8D4, 0x976B}, //6634 #CJK UNIFIED IDEOGRAPH + {0xE8D5, 0x9771}, //6635 #CJK UNIFIED IDEOGRAPH + {0xE8D6, 0x9779}, //6636 #CJK UNIFIED IDEOGRAPH + {0xE8D7, 0x9785}, //6637 #CJK UNIFIED IDEOGRAPH + {0xE8D8, 0x977C}, //6638 #CJK UNIFIED IDEOGRAPH + {0xE8D9, 0x9781}, //6639 #CJK UNIFIED IDEOGRAPH + {0xE8DA, 0x977A}, //6640 #CJK UNIFIED IDEOGRAPH + {0xE8DB, 0x9786}, //6641 #CJK UNIFIED IDEOGRAPH + {0xE8DC, 0x978B}, //6642 #CJK UNIFIED IDEOGRAPH + {0xE8DD, 0x978F}, //6643 #CJK UNIFIED IDEOGRAPH + {0xE8DE, 0x9790}, //6644 #CJK UNIFIED IDEOGRAPH + {0xE8DF, 0x979C}, //6645 #CJK UNIFIED IDEOGRAPH + {0xE8E0, 0x97A8}, //6646 #CJK UNIFIED IDEOGRAPH + {0xE8E1, 0x97A6}, //6647 #CJK UNIFIED IDEOGRAPH + {0xE8E2, 0x97A3}, //6648 #CJK UNIFIED IDEOGRAPH + {0xE8E3, 0x97B3}, //6649 #CJK UNIFIED IDEOGRAPH + {0xE8E4, 0x97B4}, //6650 #CJK UNIFIED IDEOGRAPH + {0xE8E5, 0x97C3}, //6651 #CJK UNIFIED IDEOGRAPH + {0xE8E6, 0x97C6}, //6652 #CJK UNIFIED IDEOGRAPH + {0xE8E7, 0x97C8}, //6653 #CJK UNIFIED IDEOGRAPH + {0xE8E8, 0x97CB}, //6654 #CJK UNIFIED IDEOGRAPH + {0xE8E9, 0x97DC}, //6655 #CJK UNIFIED IDEOGRAPH + {0xE8EA, 0x97ED}, //6656 #CJK UNIFIED IDEOGRAPH + {0xE8EB, 0x9F4F}, //6657 #CJK UNIFIED IDEOGRAPH + {0xE8EC, 0x97F2}, //6658 #CJK UNIFIED IDEOGRAPH + {0xE8ED, 0x7ADF}, //6659 #CJK UNIFIED IDEOGRAPH + {0xE8EE, 0x97F6}, //6660 #CJK UNIFIED IDEOGRAPH + {0xE8EF, 0x97F5}, //6661 #CJK UNIFIED IDEOGRAPH + {0xE8F0, 0x980F}, //6662 #CJK UNIFIED IDEOGRAPH + {0xE8F1, 0x980C}, //6663 #CJK UNIFIED IDEOGRAPH + {0xE8F2, 0x9838}, //6664 #CJK UNIFIED IDEOGRAPH + {0xE8F3, 0x9824}, //6665 #CJK UNIFIED IDEOGRAPH + {0xE8F4, 0x9821}, //6666 #CJK UNIFIED IDEOGRAPH + {0xE8F5, 0x9837}, //6667 #CJK UNIFIED IDEOGRAPH + {0xE8F6, 0x983D}, //6668 #CJK UNIFIED IDEOGRAPH + {0xE8F7, 0x9846}, //6669 #CJK UNIFIED IDEOGRAPH + {0xE8F8, 0x984F}, //6670 #CJK UNIFIED IDEOGRAPH + {0xE8F9, 0x984B}, //6671 #CJK UNIFIED IDEOGRAPH + {0xE8FA, 0x986B}, //6672 #CJK UNIFIED IDEOGRAPH + {0xE8FB, 0x986F}, //6673 #CJK UNIFIED IDEOGRAPH + {0xE8FC, 0x9870}, //6674 #CJK UNIFIED IDEOGRAPH + {0xE940, 0x9871}, //6675 #CJK UNIFIED IDEOGRAPH + {0xE941, 0x9874}, //6676 #CJK UNIFIED IDEOGRAPH + {0xE942, 0x9873}, //6677 #CJK UNIFIED IDEOGRAPH + {0xE943, 0x98AA}, //6678 #CJK UNIFIED IDEOGRAPH + {0xE944, 0x98AF}, //6679 #CJK UNIFIED IDEOGRAPH + {0xE945, 0x98B1}, //6680 #CJK UNIFIED IDEOGRAPH + {0xE946, 0x98B6}, //6681 #CJK UNIFIED IDEOGRAPH + {0xE947, 0x98C4}, //6682 #CJK UNIFIED IDEOGRAPH + {0xE948, 0x98C3}, //6683 #CJK UNIFIED IDEOGRAPH + {0xE949, 0x98C6}, //6684 #CJK UNIFIED IDEOGRAPH + {0xE94A, 0x98E9}, //6685 #CJK UNIFIED IDEOGRAPH + {0xE94B, 0x98EB}, //6686 #CJK UNIFIED IDEOGRAPH + {0xE94C, 0x9903}, //6687 #CJK UNIFIED IDEOGRAPH + {0xE94D, 0x9909}, //6688 #CJK UNIFIED IDEOGRAPH + {0xE94E, 0x9912}, //6689 #CJK UNIFIED IDEOGRAPH + {0xE94F, 0x9914}, //6690 #CJK UNIFIED IDEOGRAPH + {0xE950, 0x9918}, //6691 #CJK UNIFIED IDEOGRAPH + {0xE951, 0x9921}, //6692 #CJK UNIFIED IDEOGRAPH + {0xE952, 0x991D}, //6693 #CJK UNIFIED IDEOGRAPH + {0xE953, 0x991E}, //6694 #CJK UNIFIED IDEOGRAPH + {0xE954, 0x9924}, //6695 #CJK UNIFIED IDEOGRAPH + {0xE955, 0x9920}, //6696 #CJK UNIFIED IDEOGRAPH + {0xE956, 0x992C}, //6697 #CJK UNIFIED IDEOGRAPH + {0xE957, 0x992E}, //6698 #CJK UNIFIED IDEOGRAPH + {0xE958, 0x993D}, //6699 #CJK UNIFIED IDEOGRAPH + {0xE959, 0x993E}, //6700 #CJK UNIFIED IDEOGRAPH + {0xE95A, 0x9942}, //6701 #CJK UNIFIED IDEOGRAPH + {0xE95B, 0x9949}, //6702 #CJK UNIFIED IDEOGRAPH + {0xE95C, 0x9945}, //6703 #CJK UNIFIED IDEOGRAPH + {0xE95D, 0x9950}, //6704 #CJK UNIFIED IDEOGRAPH + {0xE95E, 0x994B}, //6705 #CJK UNIFIED IDEOGRAPH + {0xE95F, 0x9951}, //6706 #CJK UNIFIED IDEOGRAPH + {0xE960, 0x9952}, //6707 #CJK UNIFIED IDEOGRAPH + {0xE961, 0x994C}, //6708 #CJK UNIFIED IDEOGRAPH + {0xE962, 0x9955}, //6709 #CJK UNIFIED IDEOGRAPH + {0xE963, 0x9997}, //6710 #CJK UNIFIED IDEOGRAPH + {0xE964, 0x9998}, //6711 #CJK UNIFIED IDEOGRAPH + {0xE965, 0x99A5}, //6712 #CJK UNIFIED IDEOGRAPH + {0xE966, 0x99AD}, //6713 #CJK UNIFIED IDEOGRAPH + {0xE967, 0x99AE}, //6714 #CJK UNIFIED IDEOGRAPH + {0xE968, 0x99BC}, //6715 #CJK UNIFIED IDEOGRAPH + {0xE969, 0x99DF}, //6716 #CJK UNIFIED IDEOGRAPH + {0xE96A, 0x99DB}, //6717 #CJK UNIFIED IDEOGRAPH + {0xE96B, 0x99DD}, //6718 #CJK UNIFIED IDEOGRAPH + {0xE96C, 0x99D8}, //6719 #CJK UNIFIED IDEOGRAPH + {0xE96D, 0x99D1}, //6720 #CJK UNIFIED IDEOGRAPH + {0xE96E, 0x99ED}, //6721 #CJK UNIFIED IDEOGRAPH + {0xE96F, 0x99EE}, //6722 #CJK UNIFIED IDEOGRAPH + {0xE970, 0x99F1}, //6723 #CJK UNIFIED IDEOGRAPH + {0xE971, 0x99F2}, //6724 #CJK UNIFIED IDEOGRAPH + {0xE972, 0x99FB}, //6725 #CJK UNIFIED IDEOGRAPH + {0xE973, 0x99F8}, //6726 #CJK UNIFIED IDEOGRAPH + {0xE974, 0x9A01}, //6727 #CJK UNIFIED IDEOGRAPH + {0xE975, 0x9A0F}, //6728 #CJK UNIFIED IDEOGRAPH + {0xE976, 0x9A05}, //6729 #CJK UNIFIED IDEOGRAPH + {0xE977, 0x99E2}, //6730 #CJK UNIFIED IDEOGRAPH + {0xE978, 0x9A19}, //6731 #CJK UNIFIED IDEOGRAPH + {0xE979, 0x9A2B}, //6732 #CJK UNIFIED IDEOGRAPH + {0xE97A, 0x9A37}, //6733 #CJK UNIFIED IDEOGRAPH + {0xE97B, 0x9A45}, //6734 #CJK UNIFIED IDEOGRAPH + {0xE97C, 0x9A42}, //6735 #CJK UNIFIED IDEOGRAPH + {0xE97D, 0x9A40}, //6736 #CJK UNIFIED IDEOGRAPH + {0xE97E, 0x9A43}, //6737 #CJK UNIFIED IDEOGRAPH + {0xE980, 0x9A3E}, //6738 #CJK UNIFIED IDEOGRAPH + {0xE981, 0x9A55}, //6739 #CJK UNIFIED IDEOGRAPH + {0xE982, 0x9A4D}, //6740 #CJK UNIFIED IDEOGRAPH + {0xE983, 0x9A5B}, //6741 #CJK UNIFIED IDEOGRAPH + {0xE984, 0x9A57}, //6742 #CJK UNIFIED IDEOGRAPH + {0xE985, 0x9A5F}, //6743 #CJK UNIFIED IDEOGRAPH + {0xE986, 0x9A62}, //6744 #CJK UNIFIED IDEOGRAPH + {0xE987, 0x9A65}, //6745 #CJK UNIFIED IDEOGRAPH + {0xE988, 0x9A64}, //6746 #CJK UNIFIED IDEOGRAPH + {0xE989, 0x9A69}, //6747 #CJK UNIFIED IDEOGRAPH + {0xE98A, 0x9A6B}, //6748 #CJK UNIFIED IDEOGRAPH + {0xE98B, 0x9A6A}, //6749 #CJK UNIFIED IDEOGRAPH + {0xE98C, 0x9AAD}, //6750 #CJK UNIFIED IDEOGRAPH + {0xE98D, 0x9AB0}, //6751 #CJK UNIFIED IDEOGRAPH + {0xE98E, 0x9ABC}, //6752 #CJK UNIFIED IDEOGRAPH + {0xE98F, 0x9AC0}, //6753 #CJK UNIFIED IDEOGRAPH + {0xE990, 0x9ACF}, //6754 #CJK UNIFIED IDEOGRAPH + {0xE991, 0x9AD1}, //6755 #CJK UNIFIED IDEOGRAPH + {0xE992, 0x9AD3}, //6756 #CJK UNIFIED IDEOGRAPH + {0xE993, 0x9AD4}, //6757 #CJK UNIFIED IDEOGRAPH + {0xE994, 0x9ADE}, //6758 #CJK UNIFIED IDEOGRAPH + {0xE995, 0x9ADF}, //6759 #CJK UNIFIED IDEOGRAPH + {0xE996, 0x9AE2}, //6760 #CJK UNIFIED IDEOGRAPH + {0xE997, 0x9AE3}, //6761 #CJK UNIFIED IDEOGRAPH + {0xE998, 0x9AE6}, //6762 #CJK UNIFIED IDEOGRAPH + {0xE999, 0x9AEF}, //6763 #CJK UNIFIED IDEOGRAPH + {0xE99A, 0x9AEB}, //6764 #CJK UNIFIED IDEOGRAPH + {0xE99B, 0x9AEE}, //6765 #CJK UNIFIED IDEOGRAPH + {0xE99C, 0x9AF4}, //6766 #CJK UNIFIED IDEOGRAPH + {0xE99D, 0x9AF1}, //6767 #CJK UNIFIED IDEOGRAPH + {0xE99E, 0x9AF7}, //6768 #CJK UNIFIED IDEOGRAPH + {0xE99F, 0x9AFB}, //6769 #CJK UNIFIED IDEOGRAPH + {0xE9A0, 0x9B06}, //6770 #CJK UNIFIED IDEOGRAPH + {0xE9A1, 0x9B18}, //6771 #CJK UNIFIED IDEOGRAPH + {0xE9A2, 0x9B1A}, //6772 #CJK UNIFIED IDEOGRAPH + {0xE9A3, 0x9B1F}, //6773 #CJK UNIFIED IDEOGRAPH + {0xE9A4, 0x9B22}, //6774 #CJK UNIFIED IDEOGRAPH + {0xE9A5, 0x9B23}, //6775 #CJK UNIFIED IDEOGRAPH + {0xE9A6, 0x9B25}, //6776 #CJK UNIFIED IDEOGRAPH + {0xE9A7, 0x9B27}, //6777 #CJK UNIFIED IDEOGRAPH + {0xE9A8, 0x9B28}, //6778 #CJK UNIFIED IDEOGRAPH + {0xE9A9, 0x9B29}, //6779 #CJK UNIFIED IDEOGRAPH + {0xE9AA, 0x9B2A}, //6780 #CJK UNIFIED IDEOGRAPH + {0xE9AB, 0x9B2E}, //6781 #CJK UNIFIED IDEOGRAPH + {0xE9AC, 0x9B2F}, //6782 #CJK UNIFIED IDEOGRAPH + {0xE9AD, 0x9B32}, //6783 #CJK UNIFIED IDEOGRAPH + {0xE9AE, 0x9B44}, //6784 #CJK UNIFIED IDEOGRAPH + {0xE9AF, 0x9B43}, //6785 #CJK UNIFIED IDEOGRAPH + {0xE9B0, 0x9B4F}, //6786 #CJK UNIFIED IDEOGRAPH + {0xE9B1, 0x9B4D}, //6787 #CJK UNIFIED IDEOGRAPH + {0xE9B2, 0x9B4E}, //6788 #CJK UNIFIED IDEOGRAPH + {0xE9B3, 0x9B51}, //6789 #CJK UNIFIED IDEOGRAPH + {0xE9B4, 0x9B58}, //6790 #CJK UNIFIED IDEOGRAPH + {0xE9B5, 0x9B74}, //6791 #CJK UNIFIED IDEOGRAPH + {0xE9B6, 0x9B93}, //6792 #CJK UNIFIED IDEOGRAPH + {0xE9B7, 0x9B83}, //6793 #CJK UNIFIED IDEOGRAPH + {0xE9B8, 0x9B91}, //6794 #CJK UNIFIED IDEOGRAPH + {0xE9B9, 0x9B96}, //6795 #CJK UNIFIED IDEOGRAPH + {0xE9BA, 0x9B97}, //6796 #CJK UNIFIED IDEOGRAPH + {0xE9BB, 0x9B9F}, //6797 #CJK UNIFIED IDEOGRAPH + {0xE9BC, 0x9BA0}, //6798 #CJK UNIFIED IDEOGRAPH + {0xE9BD, 0x9BA8}, //6799 #CJK UNIFIED IDEOGRAPH + {0xE9BE, 0x9BB4}, //6800 #CJK UNIFIED IDEOGRAPH + {0xE9BF, 0x9BC0}, //6801 #CJK UNIFIED IDEOGRAPH + {0xE9C0, 0x9BCA}, //6802 #CJK UNIFIED IDEOGRAPH + {0xE9C1, 0x9BB9}, //6803 #CJK UNIFIED IDEOGRAPH + {0xE9C2, 0x9BC6}, //6804 #CJK UNIFIED IDEOGRAPH + {0xE9C3, 0x9BCF}, //6805 #CJK UNIFIED IDEOGRAPH + {0xE9C4, 0x9BD1}, //6806 #CJK UNIFIED IDEOGRAPH + {0xE9C5, 0x9BD2}, //6807 #CJK UNIFIED IDEOGRAPH + {0xE9C6, 0x9BE3}, //6808 #CJK UNIFIED IDEOGRAPH + {0xE9C7, 0x9BE2}, //6809 #CJK UNIFIED IDEOGRAPH + {0xE9C8, 0x9BE4}, //6810 #CJK UNIFIED IDEOGRAPH + {0xE9C9, 0x9BD4}, //6811 #CJK UNIFIED IDEOGRAPH + {0xE9CA, 0x9BE1}, //6812 #CJK UNIFIED IDEOGRAPH + {0xE9CB, 0x9C3A}, //6813 #CJK UNIFIED IDEOGRAPH + {0xE9CC, 0x9BF2}, //6814 #CJK UNIFIED IDEOGRAPH + {0xE9CD, 0x9BF1}, //6815 #CJK UNIFIED IDEOGRAPH + {0xE9CE, 0x9BF0}, //6816 #CJK UNIFIED IDEOGRAPH + {0xE9CF, 0x9C15}, //6817 #CJK UNIFIED IDEOGRAPH + {0xE9D0, 0x9C14}, //6818 #CJK UNIFIED IDEOGRAPH + {0xE9D1, 0x9C09}, //6819 #CJK UNIFIED IDEOGRAPH + {0xE9D2, 0x9C13}, //6820 #CJK UNIFIED IDEOGRAPH + {0xE9D3, 0x9C0C}, //6821 #CJK UNIFIED IDEOGRAPH + {0xE9D4, 0x9C06}, //6822 #CJK UNIFIED IDEOGRAPH + {0xE9D5, 0x9C08}, //6823 #CJK UNIFIED IDEOGRAPH + {0xE9D6, 0x9C12}, //6824 #CJK UNIFIED IDEOGRAPH + {0xE9D7, 0x9C0A}, //6825 #CJK UNIFIED IDEOGRAPH + {0xE9D8, 0x9C04}, //6826 #CJK UNIFIED IDEOGRAPH + {0xE9D9, 0x9C2E}, //6827 #CJK UNIFIED IDEOGRAPH + {0xE9DA, 0x9C1B}, //6828 #CJK UNIFIED IDEOGRAPH + {0xE9DB, 0x9C25}, //6829 #CJK UNIFIED IDEOGRAPH + {0xE9DC, 0x9C24}, //6830 #CJK UNIFIED IDEOGRAPH + {0xE9DD, 0x9C21}, //6831 #CJK UNIFIED IDEOGRAPH + {0xE9DE, 0x9C30}, //6832 #CJK UNIFIED IDEOGRAPH + {0xE9DF, 0x9C47}, //6833 #CJK UNIFIED IDEOGRAPH + {0xE9E0, 0x9C32}, //6834 #CJK UNIFIED IDEOGRAPH + {0xE9E1, 0x9C46}, //6835 #CJK UNIFIED IDEOGRAPH + {0xE9E2, 0x9C3E}, //6836 #CJK UNIFIED IDEOGRAPH + {0xE9E3, 0x9C5A}, //6837 #CJK UNIFIED IDEOGRAPH + {0xE9E4, 0x9C60}, //6838 #CJK UNIFIED IDEOGRAPH + {0xE9E5, 0x9C67}, //6839 #CJK UNIFIED IDEOGRAPH + {0xE9E6, 0x9C76}, //6840 #CJK UNIFIED IDEOGRAPH + {0xE9E7, 0x9C78}, //6841 #CJK UNIFIED IDEOGRAPH + {0xE9E8, 0x9CE7}, //6842 #CJK UNIFIED IDEOGRAPH + {0xE9E9, 0x9CEC}, //6843 #CJK UNIFIED IDEOGRAPH + {0xE9EA, 0x9CF0}, //6844 #CJK UNIFIED IDEOGRAPH + {0xE9EB, 0x9D09}, //6845 #CJK UNIFIED IDEOGRAPH + {0xE9EC, 0x9D08}, //6846 #CJK UNIFIED IDEOGRAPH + {0xE9ED, 0x9CEB}, //6847 #CJK UNIFIED IDEOGRAPH + {0xE9EE, 0x9D03}, //6848 #CJK UNIFIED IDEOGRAPH + {0xE9EF, 0x9D06}, //6849 #CJK UNIFIED IDEOGRAPH + {0xE9F0, 0x9D2A}, //6850 #CJK UNIFIED IDEOGRAPH + {0xE9F1, 0x9D26}, //6851 #CJK UNIFIED IDEOGRAPH + {0xE9F2, 0x9DAF}, //6852 #CJK UNIFIED IDEOGRAPH + {0xE9F3, 0x9D23}, //6853 #CJK UNIFIED IDEOGRAPH + {0xE9F4, 0x9D1F}, //6854 #CJK UNIFIED IDEOGRAPH + {0xE9F5, 0x9D44}, //6855 #CJK UNIFIED IDEOGRAPH + {0xE9F6, 0x9D15}, //6856 #CJK UNIFIED IDEOGRAPH + {0xE9F7, 0x9D12}, //6857 #CJK UNIFIED IDEOGRAPH + {0xE9F8, 0x9D41}, //6858 #CJK UNIFIED IDEOGRAPH + {0xE9F9, 0x9D3F}, //6859 #CJK UNIFIED IDEOGRAPH + {0xE9FA, 0x9D3E}, //6860 #CJK UNIFIED IDEOGRAPH + {0xE9FB, 0x9D46}, //6861 #CJK UNIFIED IDEOGRAPH + {0xE9FC, 0x9D48}, //6862 #CJK UNIFIED IDEOGRAPH + {0xEA40, 0x9D5D}, //6863 #CJK UNIFIED IDEOGRAPH + {0xEA41, 0x9D5E}, //6864 #CJK UNIFIED IDEOGRAPH + {0xEA42, 0x9D64}, //6865 #CJK UNIFIED IDEOGRAPH + {0xEA43, 0x9D51}, //6866 #CJK UNIFIED IDEOGRAPH + {0xEA44, 0x9D50}, //6867 #CJK UNIFIED IDEOGRAPH + {0xEA45, 0x9D59}, //6868 #CJK UNIFIED IDEOGRAPH + {0xEA46, 0x9D72}, //6869 #CJK UNIFIED IDEOGRAPH + {0xEA47, 0x9D89}, //6870 #CJK UNIFIED IDEOGRAPH + {0xEA48, 0x9D87}, //6871 #CJK UNIFIED IDEOGRAPH + {0xEA49, 0x9DAB}, //6872 #CJK UNIFIED IDEOGRAPH + {0xEA4A, 0x9D6F}, //6873 #CJK UNIFIED IDEOGRAPH + {0xEA4B, 0x9D7A}, //6874 #CJK UNIFIED IDEOGRAPH + {0xEA4C, 0x9D9A}, //6875 #CJK UNIFIED IDEOGRAPH + {0xEA4D, 0x9DA4}, //6876 #CJK UNIFIED IDEOGRAPH + {0xEA4E, 0x9DA9}, //6877 #CJK UNIFIED IDEOGRAPH + {0xEA4F, 0x9DB2}, //6878 #CJK UNIFIED IDEOGRAPH + {0xEA50, 0x9DC4}, //6879 #CJK UNIFIED IDEOGRAPH + {0xEA51, 0x9DC1}, //6880 #CJK UNIFIED IDEOGRAPH + {0xEA52, 0x9DBB}, //6881 #CJK UNIFIED IDEOGRAPH + {0xEA53, 0x9DB8}, //6882 #CJK UNIFIED IDEOGRAPH + {0xEA54, 0x9DBA}, //6883 #CJK UNIFIED IDEOGRAPH + {0xEA55, 0x9DC6}, //6884 #CJK UNIFIED IDEOGRAPH + {0xEA56, 0x9DCF}, //6885 #CJK UNIFIED IDEOGRAPH + {0xEA57, 0x9DC2}, //6886 #CJK UNIFIED IDEOGRAPH + {0xEA58, 0x9DD9}, //6887 #CJK UNIFIED IDEOGRAPH + {0xEA59, 0x9DD3}, //6888 #CJK UNIFIED IDEOGRAPH + {0xEA5A, 0x9DF8}, //6889 #CJK UNIFIED IDEOGRAPH + {0xEA5B, 0x9DE6}, //6890 #CJK UNIFIED IDEOGRAPH + {0xEA5C, 0x9DED}, //6891 #CJK UNIFIED IDEOGRAPH + {0xEA5D, 0x9DEF}, //6892 #CJK UNIFIED IDEOGRAPH + {0xEA5E, 0x9DFD}, //6893 #CJK UNIFIED IDEOGRAPH + {0xEA5F, 0x9E1A}, //6894 #CJK UNIFIED IDEOGRAPH + {0xEA60, 0x9E1B}, //6895 #CJK UNIFIED IDEOGRAPH + {0xEA61, 0x9E1E}, //6896 #CJK UNIFIED IDEOGRAPH + {0xEA62, 0x9E75}, //6897 #CJK UNIFIED IDEOGRAPH + {0xEA63, 0x9E79}, //6898 #CJK UNIFIED IDEOGRAPH + {0xEA64, 0x9E7D}, //6899 #CJK UNIFIED IDEOGRAPH + {0xEA65, 0x9E81}, //6900 #CJK UNIFIED IDEOGRAPH + {0xEA66, 0x9E88}, //6901 #CJK UNIFIED IDEOGRAPH + {0xEA67, 0x9E8B}, //6902 #CJK UNIFIED IDEOGRAPH + {0xEA68, 0x9E8C}, //6903 #CJK UNIFIED IDEOGRAPH + {0xEA69, 0x9E92}, //6904 #CJK UNIFIED IDEOGRAPH + {0xEA6A, 0x9E95}, //6905 #CJK UNIFIED IDEOGRAPH + {0xEA6B, 0x9E91}, //6906 #CJK UNIFIED IDEOGRAPH + {0xEA6C, 0x9E9D}, //6907 #CJK UNIFIED IDEOGRAPH + {0xEA6D, 0x9EA5}, //6908 #CJK UNIFIED IDEOGRAPH + {0xEA6E, 0x9EA9}, //6909 #CJK UNIFIED IDEOGRAPH + {0xEA6F, 0x9EB8}, //6910 #CJK UNIFIED IDEOGRAPH + {0xEA70, 0x9EAA}, //6911 #CJK UNIFIED IDEOGRAPH + {0xEA71, 0x9EAD}, //6912 #CJK UNIFIED IDEOGRAPH + {0xEA72, 0x9761}, //6913 #CJK UNIFIED IDEOGRAPH + {0xEA73, 0x9ECC}, //6914 #CJK UNIFIED IDEOGRAPH + {0xEA74, 0x9ECE}, //6915 #CJK UNIFIED IDEOGRAPH + {0xEA75, 0x9ECF}, //6916 #CJK UNIFIED IDEOGRAPH + {0xEA76, 0x9ED0}, //6917 #CJK UNIFIED IDEOGRAPH + {0xEA77, 0x9ED4}, //6918 #CJK UNIFIED IDEOGRAPH + {0xEA78, 0x9EDC}, //6919 #CJK UNIFIED IDEOGRAPH + {0xEA79, 0x9EDE}, //6920 #CJK UNIFIED IDEOGRAPH + {0xEA7A, 0x9EDD}, //6921 #CJK UNIFIED IDEOGRAPH + {0xEA7B, 0x9EE0}, //6922 #CJK UNIFIED IDEOGRAPH + {0xEA7C, 0x9EE5}, //6923 #CJK UNIFIED IDEOGRAPH + {0xEA7D, 0x9EE8}, //6924 #CJK UNIFIED IDEOGRAPH + {0xEA7E, 0x9EEF}, //6925 #CJK UNIFIED IDEOGRAPH + {0xEA80, 0x9EF4}, //6926 #CJK UNIFIED IDEOGRAPH + {0xEA81, 0x9EF6}, //6927 #CJK UNIFIED IDEOGRAPH + {0xEA82, 0x9EF7}, //6928 #CJK UNIFIED IDEOGRAPH + {0xEA83, 0x9EF9}, //6929 #CJK UNIFIED IDEOGRAPH + {0xEA84, 0x9EFB}, //6930 #CJK UNIFIED IDEOGRAPH + {0xEA85, 0x9EFC}, //6931 #CJK UNIFIED IDEOGRAPH + {0xEA86, 0x9EFD}, //6932 #CJK UNIFIED IDEOGRAPH + {0xEA87, 0x9F07}, //6933 #CJK UNIFIED IDEOGRAPH + {0xEA88, 0x9F08}, //6934 #CJK UNIFIED IDEOGRAPH + {0xEA89, 0x76B7}, //6935 #CJK UNIFIED IDEOGRAPH + {0xEA8A, 0x9F15}, //6936 #CJK UNIFIED IDEOGRAPH + {0xEA8B, 0x9F21}, //6937 #CJK UNIFIED IDEOGRAPH + {0xEA8C, 0x9F2C}, //6938 #CJK UNIFIED IDEOGRAPH + {0xEA8D, 0x9F3E}, //6939 #CJK UNIFIED IDEOGRAPH + {0xEA8E, 0x9F4A}, //6940 #CJK UNIFIED IDEOGRAPH + {0xEA8F, 0x9F52}, //6941 #CJK UNIFIED IDEOGRAPH + {0xEA90, 0x9F54}, //6942 #CJK UNIFIED IDEOGRAPH + {0xEA91, 0x9F63}, //6943 #CJK UNIFIED IDEOGRAPH + {0xEA92, 0x9F5F}, //6944 #CJK UNIFIED IDEOGRAPH + {0xEA93, 0x9F60}, //6945 #CJK UNIFIED IDEOGRAPH + {0xEA94, 0x9F61}, //6946 #CJK UNIFIED IDEOGRAPH + {0xEA95, 0x9F66}, //6947 #CJK UNIFIED IDEOGRAPH + {0xEA96, 0x9F67}, //6948 #CJK UNIFIED IDEOGRAPH + {0xEA97, 0x9F6C}, //6949 #CJK UNIFIED IDEOGRAPH + {0xEA98, 0x9F6A}, //6950 #CJK UNIFIED IDEOGRAPH + {0xEA99, 0x9F77}, //6951 #CJK UNIFIED IDEOGRAPH + {0xEA9A, 0x9F72}, //6952 #CJK UNIFIED IDEOGRAPH + {0xEA9B, 0x9F76}, //6953 #CJK UNIFIED IDEOGRAPH + {0xEA9C, 0x9F95}, //6954 #CJK UNIFIED IDEOGRAPH + {0xEA9D, 0x9F9C}, //6955 #CJK UNIFIED IDEOGRAPH + {0xEA9E, 0x9FA0}, //6956 #CJK UNIFIED IDEOGRAPH + {0xEA9F, 0x582F}, //6957 #CJK UNIFIED IDEOGRAPH + {0xEAA0, 0x69C7}, //6958 #CJK UNIFIED IDEOGRAPH + {0xEAA1, 0x9059}, //6959 #CJK UNIFIED IDEOGRAPH + {0xEAA2, 0x7464}, //6960 #CJK UNIFIED IDEOGRAPH + {0xEAA3, 0x51DC}, //6961 #CJK UNIFIED IDEOGRAPH + {0xEAA4, 0x7199}, //6962 #CJK UNIFIED IDEOGRAPH + {0xED40, 0x7E8A}, //6963 #CJK UNIFIED IDEOGRAPH + {0xED41, 0x891C}, //6964 #CJK UNIFIED IDEOGRAPH + {0xED42, 0x9348}, //6965 #CJK UNIFIED IDEOGRAPH + {0xED43, 0x9288}, //6966 #CJK UNIFIED IDEOGRAPH + {0xED44, 0x84DC}, //6967 #CJK UNIFIED IDEOGRAPH + {0xED45, 0x4FC9}, //6968 #CJK UNIFIED IDEOGRAPH + {0xED46, 0x70BB}, //6969 #CJK UNIFIED IDEOGRAPH + {0xED47, 0x6631}, //6970 #CJK UNIFIED IDEOGRAPH + {0xED48, 0x68C8}, //6971 #CJK UNIFIED IDEOGRAPH + {0xED49, 0x92F9}, //6972 #CJK UNIFIED IDEOGRAPH + {0xED4A, 0x66FB}, //6973 #CJK UNIFIED IDEOGRAPH + {0xED4B, 0x5F45}, //6974 #CJK UNIFIED IDEOGRAPH + {0xED4C, 0x4E28}, //6975 #CJK UNIFIED IDEOGRAPH + {0xED4D, 0x4EE1}, //6976 #CJK UNIFIED IDEOGRAPH + {0xED4E, 0x4EFC}, //6977 #CJK UNIFIED IDEOGRAPH + {0xED4F, 0x4F00}, //6978 #CJK UNIFIED IDEOGRAPH + {0xED50, 0x4F03}, //6979 #CJK UNIFIED IDEOGRAPH + {0xED51, 0x4F39}, //6980 #CJK UNIFIED IDEOGRAPH + {0xED52, 0x4F56}, //6981 #CJK UNIFIED IDEOGRAPH + {0xED53, 0x4F92}, //6982 #CJK UNIFIED IDEOGRAPH + {0xED54, 0x4F8A}, //6983 #CJK UNIFIED IDEOGRAPH + {0xED55, 0x4F9A}, //6984 #CJK UNIFIED IDEOGRAPH + {0xED56, 0x4F94}, //6985 #CJK UNIFIED IDEOGRAPH + {0xED57, 0x4FCD}, //6986 #CJK UNIFIED IDEOGRAPH + {0xED58, 0x5040}, //6987 #CJK UNIFIED IDEOGRAPH + {0xED59, 0x5022}, //6988 #CJK UNIFIED IDEOGRAPH + {0xED5A, 0x4FFF}, //6989 #CJK UNIFIED IDEOGRAPH + {0xED5B, 0x501E}, //6990 #CJK UNIFIED IDEOGRAPH + {0xED5C, 0x5046}, //6991 #CJK UNIFIED IDEOGRAPH + {0xED5D, 0x5070}, //6992 #CJK UNIFIED IDEOGRAPH + {0xED5E, 0x5042}, //6993 #CJK UNIFIED IDEOGRAPH + {0xED5F, 0x5094}, //6994 #CJK UNIFIED IDEOGRAPH + {0xED60, 0x50F4}, //6995 #CJK UNIFIED IDEOGRAPH + {0xED61, 0x50D8}, //6996 #CJK UNIFIED IDEOGRAPH + {0xED62, 0x514A}, //6997 #CJK UNIFIED IDEOGRAPH + {0xED63, 0x5164}, //6998 #CJK UNIFIED IDEOGRAPH + {0xED64, 0x519D}, //6999 #CJK UNIFIED IDEOGRAPH + {0xED65, 0x51BE}, //7000 #CJK UNIFIED IDEOGRAPH + {0xED66, 0x51EC}, //7001 #CJK UNIFIED IDEOGRAPH + {0xED67, 0x5215}, //7002 #CJK UNIFIED IDEOGRAPH + {0xED68, 0x529C}, //7003 #CJK UNIFIED IDEOGRAPH + {0xED69, 0x52A6}, //7004 #CJK UNIFIED IDEOGRAPH + {0xED6A, 0x52C0}, //7005 #CJK UNIFIED IDEOGRAPH + {0xED6B, 0x52DB}, //7006 #CJK UNIFIED IDEOGRAPH + {0xED6C, 0x5300}, //7007 #CJK UNIFIED IDEOGRAPH + {0xED6D, 0x5307}, //7008 #CJK UNIFIED IDEOGRAPH + {0xED6E, 0x5324}, //7009 #CJK UNIFIED IDEOGRAPH + {0xED6F, 0x5372}, //7010 #CJK UNIFIED IDEOGRAPH + {0xED70, 0x5393}, //7011 #CJK UNIFIED IDEOGRAPH + {0xED71, 0x53B2}, //7012 #CJK UNIFIED IDEOGRAPH + {0xED72, 0x53DD}, //7013 #CJK UNIFIED IDEOGRAPH + {0xED73, 0xFA0E}, //7014 #CJK COMPATIBILITY IDEOGRAPH + {0xED74, 0x549C}, //7015 #CJK UNIFIED IDEOGRAPH + {0xED75, 0x548A}, //7016 #CJK UNIFIED IDEOGRAPH + {0xED76, 0x54A9}, //7017 #CJK UNIFIED IDEOGRAPH + {0xED77, 0x54FF}, //7018 #CJK UNIFIED IDEOGRAPH + {0xED78, 0x5586}, //7019 #CJK UNIFIED IDEOGRAPH + {0xED79, 0x5759}, //7020 #CJK UNIFIED IDEOGRAPH + {0xED7A, 0x5765}, //7021 #CJK UNIFIED IDEOGRAPH + {0xED7B, 0x57AC}, //7022 #CJK UNIFIED IDEOGRAPH + {0xED7C, 0x57C8}, //7023 #CJK UNIFIED IDEOGRAPH + {0xED7D, 0x57C7}, //7024 #CJK UNIFIED IDEOGRAPH + {0xED7E, 0xFA0F}, //7025 #CJK COMPATIBILITY IDEOGRAPH + {0xED80, 0xFA10}, //7026 #CJK COMPATIBILITY IDEOGRAPH + {0xED81, 0x589E}, //7027 #CJK UNIFIED IDEOGRAPH + {0xED82, 0x58B2}, //7028 #CJK UNIFIED IDEOGRAPH + {0xED83, 0x590B}, //7029 #CJK UNIFIED IDEOGRAPH + {0xED84, 0x5953}, //7030 #CJK UNIFIED IDEOGRAPH + {0xED85, 0x595B}, //7031 #CJK UNIFIED IDEOGRAPH + {0xED86, 0x595D}, //7032 #CJK UNIFIED IDEOGRAPH + {0xED87, 0x5963}, //7033 #CJK UNIFIED IDEOGRAPH + {0xED88, 0x59A4}, //7034 #CJK UNIFIED IDEOGRAPH + {0xED89, 0x59BA}, //7035 #CJK UNIFIED IDEOGRAPH + {0xED8A, 0x5B56}, //7036 #CJK UNIFIED IDEOGRAPH + {0xED8B, 0x5BC0}, //7037 #CJK UNIFIED IDEOGRAPH + {0xED8C, 0x752F}, //7038 #CJK UNIFIED IDEOGRAPH + {0xED8D, 0x5BD8}, //7039 #CJK UNIFIED IDEOGRAPH + {0xED8E, 0x5BEC}, //7040 #CJK UNIFIED IDEOGRAPH + {0xED8F, 0x5C1E}, //7041 #CJK UNIFIED IDEOGRAPH + {0xED90, 0x5CA6}, //7042 #CJK UNIFIED IDEOGRAPH + {0xED91, 0x5CBA}, //7043 #CJK UNIFIED IDEOGRAPH + {0xED92, 0x5CF5}, //7044 #CJK UNIFIED IDEOGRAPH + {0xED93, 0x5D27}, //7045 #CJK UNIFIED IDEOGRAPH + {0xED94, 0x5D53}, //7046 #CJK UNIFIED IDEOGRAPH + {0xED95, 0xFA11}, //7047 #CJK COMPATIBILITY IDEOGRAPH + {0xED96, 0x5D42}, //7048 #CJK UNIFIED IDEOGRAPH + {0xED97, 0x5D6D}, //7049 #CJK UNIFIED IDEOGRAPH + {0xED98, 0x5DB8}, //7050 #CJK UNIFIED IDEOGRAPH + {0xED99, 0x5DB9}, //7051 #CJK UNIFIED IDEOGRAPH + {0xED9A, 0x5DD0}, //7052 #CJK UNIFIED IDEOGRAPH + {0xED9B, 0x5F21}, //7053 #CJK UNIFIED IDEOGRAPH + {0xED9C, 0x5F34}, //7054 #CJK UNIFIED IDEOGRAPH + {0xED9D, 0x5F67}, //7055 #CJK UNIFIED IDEOGRAPH + {0xED9E, 0x5FB7}, //7056 #CJK UNIFIED IDEOGRAPH + {0xED9F, 0x5FDE}, //7057 #CJK UNIFIED IDEOGRAPH + {0xEDA0, 0x605D}, //7058 #CJK UNIFIED IDEOGRAPH + {0xEDA1, 0x6085}, //7059 #CJK UNIFIED IDEOGRAPH + {0xEDA2, 0x608A}, //7060 #CJK UNIFIED IDEOGRAPH + {0xEDA3, 0x60DE}, //7061 #CJK UNIFIED IDEOGRAPH + {0xEDA4, 0x60D5}, //7062 #CJK UNIFIED IDEOGRAPH + {0xEDA5, 0x6120}, //7063 #CJK UNIFIED IDEOGRAPH + {0xEDA6, 0x60F2}, //7064 #CJK UNIFIED IDEOGRAPH + {0xEDA7, 0x6111}, //7065 #CJK UNIFIED IDEOGRAPH + {0xEDA8, 0x6137}, //7066 #CJK UNIFIED IDEOGRAPH + {0xEDA9, 0x6130}, //7067 #CJK UNIFIED IDEOGRAPH + {0xEDAA, 0x6198}, //7068 #CJK UNIFIED IDEOGRAPH + {0xEDAB, 0x6213}, //7069 #CJK UNIFIED IDEOGRAPH + {0xEDAC, 0x62A6}, //7070 #CJK UNIFIED IDEOGRAPH + {0xEDAD, 0x63F5}, //7071 #CJK UNIFIED IDEOGRAPH + {0xEDAE, 0x6460}, //7072 #CJK UNIFIED IDEOGRAPH + {0xEDAF, 0x649D}, //7073 #CJK UNIFIED IDEOGRAPH + {0xEDB0, 0x64CE}, //7074 #CJK UNIFIED IDEOGRAPH + {0xEDB1, 0x654E}, //7075 #CJK UNIFIED IDEOGRAPH + {0xEDB2, 0x6600}, //7076 #CJK UNIFIED IDEOGRAPH + {0xEDB3, 0x6615}, //7077 #CJK UNIFIED IDEOGRAPH + {0xEDB4, 0x663B}, //7078 #CJK UNIFIED IDEOGRAPH + {0xEDB5, 0x6609}, //7079 #CJK UNIFIED IDEOGRAPH + {0xEDB6, 0x662E}, //7080 #CJK UNIFIED IDEOGRAPH + {0xEDB7, 0x661E}, //7081 #CJK UNIFIED IDEOGRAPH + {0xEDB8, 0x6624}, //7082 #CJK UNIFIED IDEOGRAPH + {0xEDB9, 0x6665}, //7083 #CJK UNIFIED IDEOGRAPH + {0xEDBA, 0x6657}, //7084 #CJK UNIFIED IDEOGRAPH + {0xEDBB, 0x6659}, //7085 #CJK UNIFIED IDEOGRAPH + {0xEDBC, 0xFA12}, //7086 #CJK COMPATIBILITY IDEOGRAPH + {0xEDBD, 0x6673}, //7087 #CJK UNIFIED IDEOGRAPH + {0xEDBE, 0x6699}, //7088 #CJK UNIFIED IDEOGRAPH + {0xEDBF, 0x66A0}, //7089 #CJK UNIFIED IDEOGRAPH + {0xEDC0, 0x66B2}, //7090 #CJK UNIFIED IDEOGRAPH + {0xEDC1, 0x66BF}, //7091 #CJK UNIFIED IDEOGRAPH + {0xEDC2, 0x66FA}, //7092 #CJK UNIFIED IDEOGRAPH + {0xEDC3, 0x670E}, //7093 #CJK UNIFIED IDEOGRAPH + {0xEDC4, 0xF929}, //7094 #CJK COMPATIBILITY IDEOGRAPH + {0xEDC5, 0x6766}, //7095 #CJK UNIFIED IDEOGRAPH + {0xEDC6, 0x67BB}, //7096 #CJK UNIFIED IDEOGRAPH + {0xEDC7, 0x6852}, //7097 #CJK UNIFIED IDEOGRAPH + {0xEDC8, 0x67C0}, //7098 #CJK UNIFIED IDEOGRAPH + {0xEDC9, 0x6801}, //7099 #CJK UNIFIED IDEOGRAPH + {0xEDCA, 0x6844}, //7100 #CJK UNIFIED IDEOGRAPH + {0xEDCB, 0x68CF}, //7101 #CJK UNIFIED IDEOGRAPH + {0xEDCC, 0xFA13}, //7102 #CJK COMPATIBILITY IDEOGRAPH + {0xEDCD, 0x6968}, //7103 #CJK UNIFIED IDEOGRAPH + {0xEDCE, 0xFA14}, //7104 #CJK COMPATIBILITY IDEOGRAPH + {0xEDCF, 0x6998}, //7105 #CJK UNIFIED IDEOGRAPH + {0xEDD0, 0x69E2}, //7106 #CJK UNIFIED IDEOGRAPH + {0xEDD1, 0x6A30}, //7107 #CJK UNIFIED IDEOGRAPH + {0xEDD2, 0x6A6B}, //7108 #CJK UNIFIED IDEOGRAPH + {0xEDD3, 0x6A46}, //7109 #CJK UNIFIED IDEOGRAPH + {0xEDD4, 0x6A73}, //7110 #CJK UNIFIED IDEOGRAPH + {0xEDD5, 0x6A7E}, //7111 #CJK UNIFIED IDEOGRAPH + {0xEDD6, 0x6AE2}, //7112 #CJK UNIFIED IDEOGRAPH + {0xEDD7, 0x6AE4}, //7113 #CJK UNIFIED IDEOGRAPH + {0xEDD8, 0x6BD6}, //7114 #CJK UNIFIED IDEOGRAPH + {0xEDD9, 0x6C3F}, //7115 #CJK UNIFIED IDEOGRAPH + {0xEDDA, 0x6C5C}, //7116 #CJK UNIFIED IDEOGRAPH + {0xEDDB, 0x6C86}, //7117 #CJK UNIFIED IDEOGRAPH + {0xEDDC, 0x6C6F}, //7118 #CJK UNIFIED IDEOGRAPH + {0xEDDD, 0x6CDA}, //7119 #CJK UNIFIED IDEOGRAPH + {0xEDDE, 0x6D04}, //7120 #CJK UNIFIED IDEOGRAPH + {0xEDDF, 0x6D87}, //7121 #CJK UNIFIED IDEOGRAPH + {0xEDE0, 0x6D6F}, //7122 #CJK UNIFIED IDEOGRAPH + {0xEDE1, 0x6D96}, //7123 #CJK UNIFIED IDEOGRAPH + {0xEDE2, 0x6DAC}, //7124 #CJK UNIFIED IDEOGRAPH + {0xEDE3, 0x6DCF}, //7125 #CJK UNIFIED IDEOGRAPH + {0xEDE4, 0x6DF8}, //7126 #CJK UNIFIED IDEOGRAPH + {0xEDE5, 0x6DF2}, //7127 #CJK UNIFIED IDEOGRAPH + {0xEDE6, 0x6DFC}, //7128 #CJK UNIFIED IDEOGRAPH + {0xEDE7, 0x6E39}, //7129 #CJK UNIFIED IDEOGRAPH + {0xEDE8, 0x6E5C}, //7130 #CJK UNIFIED IDEOGRAPH + {0xEDE9, 0x6E27}, //7131 #CJK UNIFIED IDEOGRAPH + {0xEDEA, 0x6E3C}, //7132 #CJK UNIFIED IDEOGRAPH + {0xEDEB, 0x6EBF}, //7133 #CJK UNIFIED IDEOGRAPH + {0xEDEC, 0x6F88}, //7134 #CJK UNIFIED IDEOGRAPH + {0xEDED, 0x6FB5}, //7135 #CJK UNIFIED IDEOGRAPH + {0xEDEE, 0x6FF5}, //7136 #CJK UNIFIED IDEOGRAPH + {0xEDEF, 0x7005}, //7137 #CJK UNIFIED IDEOGRAPH + {0xEDF0, 0x7007}, //7138 #CJK UNIFIED IDEOGRAPH + {0xEDF1, 0x7028}, //7139 #CJK UNIFIED IDEOGRAPH + {0xEDF2, 0x7085}, //7140 #CJK UNIFIED IDEOGRAPH + {0xEDF3, 0x70AB}, //7141 #CJK UNIFIED IDEOGRAPH + {0xEDF4, 0x710F}, //7142 #CJK UNIFIED IDEOGRAPH + {0xEDF5, 0x7104}, //7143 #CJK UNIFIED IDEOGRAPH + {0xEDF6, 0x715C}, //7144 #CJK UNIFIED IDEOGRAPH + {0xEDF7, 0x7146}, //7145 #CJK UNIFIED IDEOGRAPH + {0xEDF8, 0x7147}, //7146 #CJK UNIFIED IDEOGRAPH + {0xEDF9, 0xFA15}, //7147 #CJK COMPATIBILITY IDEOGRAPH + {0xEDFA, 0x71C1}, //7148 #CJK UNIFIED IDEOGRAPH + {0xEDFB, 0x71FE}, //7149 #CJK UNIFIED IDEOGRAPH + {0xEDFC, 0x72B1}, //7150 #CJK UNIFIED IDEOGRAPH + {0xEE40, 0x72BE}, //7151 #CJK UNIFIED IDEOGRAPH + {0xEE41, 0x7324}, //7152 #CJK UNIFIED IDEOGRAPH + {0xEE42, 0xFA16}, //7153 #CJK COMPATIBILITY IDEOGRAPH + {0xEE43, 0x7377}, //7154 #CJK UNIFIED IDEOGRAPH + {0xEE44, 0x73BD}, //7155 #CJK UNIFIED IDEOGRAPH + {0xEE45, 0x73C9}, //7156 #CJK UNIFIED IDEOGRAPH + {0xEE46, 0x73D6}, //7157 #CJK UNIFIED IDEOGRAPH + {0xEE47, 0x73E3}, //7158 #CJK UNIFIED IDEOGRAPH + {0xEE48, 0x73D2}, //7159 #CJK UNIFIED IDEOGRAPH + {0xEE49, 0x7407}, //7160 #CJK UNIFIED IDEOGRAPH + {0xEE4A, 0x73F5}, //7161 #CJK UNIFIED IDEOGRAPH + {0xEE4B, 0x7426}, //7162 #CJK UNIFIED IDEOGRAPH + {0xEE4C, 0x742A}, //7163 #CJK UNIFIED IDEOGRAPH + {0xEE4D, 0x7429}, //7164 #CJK UNIFIED IDEOGRAPH + {0xEE4E, 0x742E}, //7165 #CJK UNIFIED IDEOGRAPH + {0xEE4F, 0x7462}, //7166 #CJK UNIFIED IDEOGRAPH + {0xEE50, 0x7489}, //7167 #CJK UNIFIED IDEOGRAPH + {0xEE51, 0x749F}, //7168 #CJK UNIFIED IDEOGRAPH + {0xEE52, 0x7501}, //7169 #CJK UNIFIED IDEOGRAPH + {0xEE53, 0x756F}, //7170 #CJK UNIFIED IDEOGRAPH + {0xEE54, 0x7682}, //7171 #CJK UNIFIED IDEOGRAPH + {0xEE55, 0x769C}, //7172 #CJK UNIFIED IDEOGRAPH + {0xEE56, 0x769E}, //7173 #CJK UNIFIED IDEOGRAPH + {0xEE57, 0x769B}, //7174 #CJK UNIFIED IDEOGRAPH + {0xEE58, 0x76A6}, //7175 #CJK UNIFIED IDEOGRAPH + {0xEE59, 0xFA17}, //7176 #CJK COMPATIBILITY IDEOGRAPH + {0xEE5A, 0x7746}, //7177 #CJK UNIFIED IDEOGRAPH + {0xEE5B, 0x52AF}, //7178 #CJK UNIFIED IDEOGRAPH + {0xEE5C, 0x7821}, //7179 #CJK UNIFIED IDEOGRAPH + {0xEE5D, 0x784E}, //7180 #CJK UNIFIED IDEOGRAPH + {0xEE5E, 0x7864}, //7181 #CJK UNIFIED IDEOGRAPH + {0xEE5F, 0x787A}, //7182 #CJK UNIFIED IDEOGRAPH + {0xEE60, 0x7930}, //7183 #CJK UNIFIED IDEOGRAPH + {0xEE61, 0xFA18}, //7184 #CJK COMPATIBILITY IDEOGRAPH + {0xEE62, 0xFA19}, //7185 #CJK COMPATIBILITY IDEOGRAPH + {0xEE63, 0xFA1A}, //7186 #CJK COMPATIBILITY IDEOGRAPH + {0xEE64, 0x7994}, //7187 #CJK UNIFIED IDEOGRAPH + {0xEE65, 0xFA1B}, //7188 #CJK COMPATIBILITY IDEOGRAPH + {0xEE66, 0x799B}, //7189 #CJK UNIFIED IDEOGRAPH + {0xEE67, 0x7AD1}, //7190 #CJK UNIFIED IDEOGRAPH + {0xEE68, 0x7AE7}, //7191 #CJK UNIFIED IDEOGRAPH + {0xEE69, 0xFA1C}, //7192 #CJK COMPATIBILITY IDEOGRAPH + {0xEE6A, 0x7AEB}, //7193 #CJK UNIFIED IDEOGRAPH + {0xEE6B, 0x7B9E}, //7194 #CJK UNIFIED IDEOGRAPH + {0xEE6C, 0xFA1D}, //7195 #CJK COMPATIBILITY IDEOGRAPH + {0xEE6D, 0x7D48}, //7196 #CJK UNIFIED IDEOGRAPH + {0xEE6E, 0x7D5C}, //7197 #CJK UNIFIED IDEOGRAPH + {0xEE6F, 0x7DB7}, //7198 #CJK UNIFIED IDEOGRAPH + {0xEE70, 0x7DA0}, //7199 #CJK UNIFIED IDEOGRAPH + {0xEE71, 0x7DD6}, //7200 #CJK UNIFIED IDEOGRAPH + {0xEE72, 0x7E52}, //7201 #CJK UNIFIED IDEOGRAPH + {0xEE73, 0x7F47}, //7202 #CJK UNIFIED IDEOGRAPH + {0xEE74, 0x7FA1}, //7203 #CJK UNIFIED IDEOGRAPH + {0xEE75, 0xFA1E}, //7204 #CJK COMPATIBILITY IDEOGRAPH + {0xEE76, 0x8301}, //7205 #CJK UNIFIED IDEOGRAPH + {0xEE77, 0x8362}, //7206 #CJK UNIFIED IDEOGRAPH + {0xEE78, 0x837F}, //7207 #CJK UNIFIED IDEOGRAPH + {0xEE79, 0x83C7}, //7208 #CJK UNIFIED IDEOGRAPH + {0xEE7A, 0x83F6}, //7209 #CJK UNIFIED IDEOGRAPH + {0xEE7B, 0x8448}, //7210 #CJK UNIFIED IDEOGRAPH + {0xEE7C, 0x84B4}, //7211 #CJK UNIFIED IDEOGRAPH + {0xEE7D, 0x8553}, //7212 #CJK UNIFIED IDEOGRAPH + {0xEE7E, 0x8559}, //7213 #CJK UNIFIED IDEOGRAPH + {0xEE80, 0x856B}, //7214 #CJK UNIFIED IDEOGRAPH + {0xEE81, 0xFA1F}, //7215 #CJK COMPATIBILITY IDEOGRAPH + {0xEE82, 0x85B0}, //7216 #CJK UNIFIED IDEOGRAPH + {0xEE83, 0xFA20}, //7217 #CJK COMPATIBILITY IDEOGRAPH + {0xEE84, 0xFA21}, //7218 #CJK COMPATIBILITY IDEOGRAPH + {0xEE85, 0x8807}, //7219 #CJK UNIFIED IDEOGRAPH + {0xEE86, 0x88F5}, //7220 #CJK UNIFIED IDEOGRAPH + {0xEE87, 0x8A12}, //7221 #CJK UNIFIED IDEOGRAPH + {0xEE88, 0x8A37}, //7222 #CJK UNIFIED IDEOGRAPH + {0xEE89, 0x8A79}, //7223 #CJK UNIFIED IDEOGRAPH + {0xEE8A, 0x8AA7}, //7224 #CJK UNIFIED IDEOGRAPH + {0xEE8B, 0x8ABE}, //7225 #CJK UNIFIED IDEOGRAPH + {0xEE8C, 0x8ADF}, //7226 #CJK UNIFIED IDEOGRAPH + {0xEE8D, 0xFA22}, //7227 #CJK COMPATIBILITY IDEOGRAPH + {0xEE8E, 0x8AF6}, //7228 #CJK UNIFIED IDEOGRAPH + {0xEE8F, 0x8B53}, //7229 #CJK UNIFIED IDEOGRAPH + {0xEE90, 0x8B7F}, //7230 #CJK UNIFIED IDEOGRAPH + {0xEE91, 0x8CF0}, //7231 #CJK UNIFIED IDEOGRAPH + {0xEE92, 0x8CF4}, //7232 #CJK UNIFIED IDEOGRAPH + {0xEE93, 0x8D12}, //7233 #CJK UNIFIED IDEOGRAPH + {0xEE94, 0x8D76}, //7234 #CJK UNIFIED IDEOGRAPH + {0xEE95, 0xFA23}, //7235 #CJK COMPATIBILITY IDEOGRAPH + {0xEE96, 0x8ECF}, //7236 #CJK UNIFIED IDEOGRAPH + {0xEE97, 0xFA24}, //7237 #CJK COMPATIBILITY IDEOGRAPH + {0xEE98, 0xFA25}, //7238 #CJK COMPATIBILITY IDEOGRAPH + {0xEE99, 0x9067}, //7239 #CJK UNIFIED IDEOGRAPH + {0xEE9A, 0x90DE}, //7240 #CJK UNIFIED IDEOGRAPH + {0xEE9B, 0xFA26}, //7241 #CJK COMPATIBILITY IDEOGRAPH + {0xEE9C, 0x9115}, //7242 #CJK UNIFIED IDEOGRAPH + {0xEE9D, 0x9127}, //7243 #CJK UNIFIED IDEOGRAPH + {0xEE9E, 0x91DA}, //7244 #CJK UNIFIED IDEOGRAPH + {0xEE9F, 0x91D7}, //7245 #CJK UNIFIED IDEOGRAPH + {0xEEA0, 0x91DE}, //7246 #CJK UNIFIED IDEOGRAPH + {0xEEA1, 0x91ED}, //7247 #CJK UNIFIED IDEOGRAPH + {0xEEA2, 0x91EE}, //7248 #CJK UNIFIED IDEOGRAPH + {0xEEA3, 0x91E4}, //7249 #CJK UNIFIED IDEOGRAPH + {0xEEA4, 0x91E5}, //7250 #CJK UNIFIED IDEOGRAPH + {0xEEA5, 0x9206}, //7251 #CJK UNIFIED IDEOGRAPH + {0xEEA6, 0x9210}, //7252 #CJK UNIFIED IDEOGRAPH + {0xEEA7, 0x920A}, //7253 #CJK UNIFIED IDEOGRAPH + {0xEEA8, 0x923A}, //7254 #CJK UNIFIED IDEOGRAPH + {0xEEA9, 0x9240}, //7255 #CJK UNIFIED IDEOGRAPH + {0xEEAA, 0x923C}, //7256 #CJK UNIFIED IDEOGRAPH + {0xEEAB, 0x924E}, //7257 #CJK UNIFIED IDEOGRAPH + {0xEEAC, 0x9259}, //7258 #CJK UNIFIED IDEOGRAPH + {0xEEAD, 0x9251}, //7259 #CJK UNIFIED IDEOGRAPH + {0xEEAE, 0x9239}, //7260 #CJK UNIFIED IDEOGRAPH + {0xEEAF, 0x9267}, //7261 #CJK UNIFIED IDEOGRAPH + {0xEEB0, 0x92A7}, //7262 #CJK UNIFIED IDEOGRAPH + {0xEEB1, 0x9277}, //7263 #CJK UNIFIED IDEOGRAPH + {0xEEB2, 0x9278}, //7264 #CJK UNIFIED IDEOGRAPH + {0xEEB3, 0x92E7}, //7265 #CJK UNIFIED IDEOGRAPH + {0xEEB4, 0x92D7}, //7266 #CJK UNIFIED IDEOGRAPH + {0xEEB5, 0x92D9}, //7267 #CJK UNIFIED IDEOGRAPH + {0xEEB6, 0x92D0}, //7268 #CJK UNIFIED IDEOGRAPH + {0xEEB7, 0xFA27}, //7269 #CJK COMPATIBILITY IDEOGRAPH + {0xEEB8, 0x92D5}, //7270 #CJK UNIFIED IDEOGRAPH + {0xEEB9, 0x92E0}, //7271 #CJK UNIFIED IDEOGRAPH + {0xEEBA, 0x92D3}, //7272 #CJK UNIFIED IDEOGRAPH + {0xEEBB, 0x9325}, //7273 #CJK UNIFIED IDEOGRAPH + {0xEEBC, 0x9321}, //7274 #CJK UNIFIED IDEOGRAPH + {0xEEBD, 0x92FB}, //7275 #CJK UNIFIED IDEOGRAPH + {0xEEBE, 0xFA28}, //7276 #CJK COMPATIBILITY IDEOGRAPH + {0xEEBF, 0x931E}, //7277 #CJK UNIFIED IDEOGRAPH + {0xEEC0, 0x92FF}, //7278 #CJK UNIFIED IDEOGRAPH + {0xEEC1, 0x931D}, //7279 #CJK UNIFIED IDEOGRAPH + {0xEEC2, 0x9302}, //7280 #CJK UNIFIED IDEOGRAPH + {0xEEC3, 0x9370}, //7281 #CJK UNIFIED IDEOGRAPH + {0xEEC4, 0x9357}, //7282 #CJK UNIFIED IDEOGRAPH + {0xEEC5, 0x93A4}, //7283 #CJK UNIFIED IDEOGRAPH + {0xEEC6, 0x93C6}, //7284 #CJK UNIFIED IDEOGRAPH + {0xEEC7, 0x93DE}, //7285 #CJK UNIFIED IDEOGRAPH + {0xEEC8, 0x93F8}, //7286 #CJK UNIFIED IDEOGRAPH + {0xEEC9, 0x9431}, //7287 #CJK UNIFIED IDEOGRAPH + {0xEECA, 0x9445}, //7288 #CJK UNIFIED IDEOGRAPH + {0xEECB, 0x9448}, //7289 #CJK UNIFIED IDEOGRAPH + {0xEECC, 0x9592}, //7290 #CJK UNIFIED IDEOGRAPH + {0xEECD, 0xF9DC}, //7291 #CJK COMPATIBILITY IDEOGRAPH + {0xEECE, 0xFA29}, //7292 #CJK COMPATIBILITY IDEOGRAPH + {0xEECF, 0x969D}, //7293 #CJK UNIFIED IDEOGRAPH + {0xEED0, 0x96AF}, //7294 #CJK UNIFIED IDEOGRAPH + {0xEED1, 0x9733}, //7295 #CJK UNIFIED IDEOGRAPH + {0xEED2, 0x973B}, //7296 #CJK UNIFIED IDEOGRAPH + {0xEED3, 0x9743}, //7297 #CJK UNIFIED IDEOGRAPH + {0xEED4, 0x974D}, //7298 #CJK UNIFIED IDEOGRAPH + {0xEED5, 0x974F}, //7299 #CJK UNIFIED IDEOGRAPH + {0xEED6, 0x9751}, //7300 #CJK UNIFIED IDEOGRAPH + {0xEED7, 0x9755}, //7301 #CJK UNIFIED IDEOGRAPH + {0xEED8, 0x9857}, //7302 #CJK UNIFIED IDEOGRAPH + {0xEED9, 0x9865}, //7303 #CJK UNIFIED IDEOGRAPH + {0xEEDA, 0xFA2A}, //7304 #CJK COMPATIBILITY IDEOGRAPH + {0xEEDB, 0xFA2B}, //7305 #CJK COMPATIBILITY IDEOGRAPH + {0xEEDC, 0x9927}, //7306 #CJK UNIFIED IDEOGRAPH + {0xEEDD, 0xFA2C}, //7307 #CJK COMPATIBILITY IDEOGRAPH + {0xEEDE, 0x999E}, //7308 #CJK UNIFIED IDEOGRAPH + {0xEEDF, 0x9A4E}, //7309 #CJK UNIFIED IDEOGRAPH + {0xEEE0, 0x9AD9}, //7310 #CJK UNIFIED IDEOGRAPH + {0xEEE1, 0x9ADC}, //7311 #CJK UNIFIED IDEOGRAPH + {0xEEE2, 0x9B75}, //7312 #CJK UNIFIED IDEOGRAPH + {0xEEE3, 0x9B72}, //7313 #CJK UNIFIED IDEOGRAPH + {0xEEE4, 0x9B8F}, //7314 #CJK UNIFIED IDEOGRAPH + {0xEEE5, 0x9BB1}, //7315 #CJK UNIFIED IDEOGRAPH + {0xEEE6, 0x9BBB}, //7316 #CJK UNIFIED IDEOGRAPH + {0xEEE7, 0x9C00}, //7317 #CJK UNIFIED IDEOGRAPH + {0xEEE8, 0x9D70}, //7318 #CJK UNIFIED IDEOGRAPH + {0xEEE9, 0x9D6B}, //7319 #CJK UNIFIED IDEOGRAPH + {0xEEEA, 0xFA2D}, //7320 #CJK COMPATIBILITY IDEOGRAPH + {0xEEEB, 0x9E19}, //7321 #CJK UNIFIED IDEOGRAPH + {0xEEEC, 0x9ED1}, //7322 #CJK UNIFIED IDEOGRAPH + {0xEEEF, 0x2170}, //7323 #SMALL ROMAN NUMERAL ONE + {0xEEF0, 0x2171}, //7324 #SMALL ROMAN NUMERAL TWO + {0xEEF1, 0x2172}, //7325 #SMALL ROMAN NUMERAL THREE + {0xEEF2, 0x2173}, //7326 #SMALL ROMAN NUMERAL FOUR + {0xEEF3, 0x2174}, //7327 #SMALL ROMAN NUMERAL FIVE + {0xEEF4, 0x2175}, //7328 #SMALL ROMAN NUMERAL SIX + {0xEEF5, 0x2176}, //7329 #SMALL ROMAN NUMERAL SEVEN + {0xEEF6, 0x2177}, //7330 #SMALL ROMAN NUMERAL EIGHT + {0xEEF7, 0x2178}, //7331 #SMALL ROMAN NUMERAL NINE + {0xEEF8, 0x2179}, //7332 #SMALL ROMAN NUMERAL TEN + {0xEEF9, 0xFFE2}, //7333 #FULLWIDTH NOT SIGN + {0xEEFA, 0xFFE4}, //7334 #FULLWIDTH BROKEN BAR + {0xEEFB, 0xFF07}, //7335 #FULLWIDTH APOSTROPHE + {0xEEFC, 0xFF02}, //7336 #FULLWIDTH QUOTATION MARK + {0xFA40, 0x2170}, //7337 #SMALL ROMAN NUMERAL ONE + {0xFA41, 0x2171}, //7338 #SMALL ROMAN NUMERAL TWO + {0xFA42, 0x2172}, //7339 #SMALL ROMAN NUMERAL THREE + {0xFA43, 0x2173}, //7340 #SMALL ROMAN NUMERAL FOUR + {0xFA44, 0x2174}, //7341 #SMALL ROMAN NUMERAL FIVE + {0xFA45, 0x2175}, //7342 #SMALL ROMAN NUMERAL SIX + {0xFA46, 0x2176}, //7343 #SMALL ROMAN NUMERAL SEVEN + {0xFA47, 0x2177}, //7344 #SMALL ROMAN NUMERAL EIGHT + {0xFA48, 0x2178}, //7345 #SMALL ROMAN NUMERAL NINE + {0xFA49, 0x2179}, //7346 #SMALL ROMAN NUMERAL TEN + {0xFA4A, 0x2160}, //7347 #ROMAN NUMERAL ONE + {0xFA4B, 0x2161}, //7348 #ROMAN NUMERAL TWO + {0xFA4C, 0x2162}, //7349 #ROMAN NUMERAL THREE + {0xFA4D, 0x2163}, //7350 #ROMAN NUMERAL FOUR + {0xFA4E, 0x2164}, //7351 #ROMAN NUMERAL FIVE + {0xFA4F, 0x2165}, //7352 #ROMAN NUMERAL SIX + {0xFA50, 0x2166}, //7353 #ROMAN NUMERAL SEVEN + {0xFA51, 0x2167}, //7354 #ROMAN NUMERAL EIGHT + {0xFA52, 0x2168}, //7355 #ROMAN NUMERAL NINE + {0xFA53, 0x2169}, //7356 #ROMAN NUMERAL TEN + {0xFA54, 0xFFE2}, //7357 #FULLWIDTH NOT SIGN + {0xFA55, 0xFFE4}, //7358 #FULLWIDTH BROKEN BAR + {0xFA56, 0xFF07}, //7359 #FULLWIDTH APOSTROPHE + {0xFA57, 0xFF02}, //7360 #FULLWIDTH QUOTATION MARK + {0xFA58, 0x3231}, //7361 #PARENTHESIZED IDEOGRAPH STOCK + {0xFA59, 0x2116}, //7362 #NUMERO SIGN + {0xFA5A, 0x2121}, //7363 #TELEPHONE SIGN + {0xFA5B, 0x2235}, //7364 #BECAUSE + {0xFA5C, 0x7E8A}, //7365 #CJK UNIFIED IDEOGRAPH + {0xFA5D, 0x891C}, //7366 #CJK UNIFIED IDEOGRAPH + {0xFA5E, 0x9348}, //7367 #CJK UNIFIED IDEOGRAPH + {0xFA5F, 0x9288}, //7368 #CJK UNIFIED IDEOGRAPH + {0xFA60, 0x84DC}, //7369 #CJK UNIFIED IDEOGRAPH + {0xFA61, 0x4FC9}, //7370 #CJK UNIFIED IDEOGRAPH + {0xFA62, 0x70BB}, //7371 #CJK UNIFIED IDEOGRAPH + {0xFA63, 0x6631}, //7372 #CJK UNIFIED IDEOGRAPH + {0xFA64, 0x68C8}, //7373 #CJK UNIFIED IDEOGRAPH + {0xFA65, 0x92F9}, //7374 #CJK UNIFIED IDEOGRAPH + {0xFA66, 0x66FB}, //7375 #CJK UNIFIED IDEOGRAPH + {0xFA67, 0x5F45}, //7376 #CJK UNIFIED IDEOGRAPH + {0xFA68, 0x4E28}, //7377 #CJK UNIFIED IDEOGRAPH + {0xFA69, 0x4EE1}, //7378 #CJK UNIFIED IDEOGRAPH + {0xFA6A, 0x4EFC}, //7379 #CJK UNIFIED IDEOGRAPH + {0xFA6B, 0x4F00}, //7380 #CJK UNIFIED IDEOGRAPH + {0xFA6C, 0x4F03}, //7381 #CJK UNIFIED IDEOGRAPH + {0xFA6D, 0x4F39}, //7382 #CJK UNIFIED IDEOGRAPH + {0xFA6E, 0x4F56}, //7383 #CJK UNIFIED IDEOGRAPH + {0xFA6F, 0x4F92}, //7384 #CJK UNIFIED IDEOGRAPH + {0xFA70, 0x4F8A}, //7385 #CJK UNIFIED IDEOGRAPH + {0xFA71, 0x4F9A}, //7386 #CJK UNIFIED IDEOGRAPH + {0xFA72, 0x4F94}, //7387 #CJK UNIFIED IDEOGRAPH + {0xFA73, 0x4FCD}, //7388 #CJK UNIFIED IDEOGRAPH + {0xFA74, 0x5040}, //7389 #CJK UNIFIED IDEOGRAPH + {0xFA75, 0x5022}, //7390 #CJK UNIFIED IDEOGRAPH + {0xFA76, 0x4FFF}, //7391 #CJK UNIFIED IDEOGRAPH + {0xFA77, 0x501E}, //7392 #CJK UNIFIED IDEOGRAPH + {0xFA78, 0x5046}, //7393 #CJK UNIFIED IDEOGRAPH + {0xFA79, 0x5070}, //7394 #CJK UNIFIED IDEOGRAPH + {0xFA7A, 0x5042}, //7395 #CJK UNIFIED IDEOGRAPH + {0xFA7B, 0x5094}, //7396 #CJK UNIFIED IDEOGRAPH + {0xFA7C, 0x50F4}, //7397 #CJK UNIFIED IDEOGRAPH + {0xFA7D, 0x50D8}, //7398 #CJK UNIFIED IDEOGRAPH + {0xFA7E, 0x514A}, //7399 #CJK UNIFIED IDEOGRAPH + {0xFA80, 0x5164}, //7400 #CJK UNIFIED IDEOGRAPH + {0xFA81, 0x519D}, //7401 #CJK UNIFIED IDEOGRAPH + {0xFA82, 0x51BE}, //7402 #CJK UNIFIED IDEOGRAPH + {0xFA83, 0x51EC}, //7403 #CJK UNIFIED IDEOGRAPH + {0xFA84, 0x5215}, //7404 #CJK UNIFIED IDEOGRAPH + {0xFA85, 0x529C}, //7405 #CJK UNIFIED IDEOGRAPH + {0xFA86, 0x52A6}, //7406 #CJK UNIFIED IDEOGRAPH + {0xFA87, 0x52C0}, //7407 #CJK UNIFIED IDEOGRAPH + {0xFA88, 0x52DB}, //7408 #CJK UNIFIED IDEOGRAPH + {0xFA89, 0x5300}, //7409 #CJK UNIFIED IDEOGRAPH + {0xFA8A, 0x5307}, //7410 #CJK UNIFIED IDEOGRAPH + {0xFA8B, 0x5324}, //7411 #CJK UNIFIED IDEOGRAPH + {0xFA8C, 0x5372}, //7412 #CJK UNIFIED IDEOGRAPH + {0xFA8D, 0x5393}, //7413 #CJK UNIFIED IDEOGRAPH + {0xFA8E, 0x53B2}, //7414 #CJK UNIFIED IDEOGRAPH + {0xFA8F, 0x53DD}, //7415 #CJK UNIFIED IDEOGRAPH + {0xFA90, 0xFA0E}, //7416 #CJK COMPATIBILITY IDEOGRAPH + {0xFA91, 0x549C}, //7417 #CJK UNIFIED IDEOGRAPH + {0xFA92, 0x548A}, //7418 #CJK UNIFIED IDEOGRAPH + {0xFA93, 0x54A9}, //7419 #CJK UNIFIED IDEOGRAPH + {0xFA94, 0x54FF}, //7420 #CJK UNIFIED IDEOGRAPH + {0xFA95, 0x5586}, //7421 #CJK UNIFIED IDEOGRAPH + {0xFA96, 0x5759}, //7422 #CJK UNIFIED IDEOGRAPH + {0xFA97, 0x5765}, //7423 #CJK UNIFIED IDEOGRAPH + {0xFA98, 0x57AC}, //7424 #CJK UNIFIED IDEOGRAPH + {0xFA99, 0x57C8}, //7425 #CJK UNIFIED IDEOGRAPH + {0xFA9A, 0x57C7}, //7426 #CJK UNIFIED IDEOGRAPH + {0xFA9B, 0xFA0F}, //7427 #CJK COMPATIBILITY IDEOGRAPH + {0xFA9C, 0xFA10}, //7428 #CJK COMPATIBILITY IDEOGRAPH + {0xFA9D, 0x589E}, //7429 #CJK UNIFIED IDEOGRAPH + {0xFA9E, 0x58B2}, //7430 #CJK UNIFIED IDEOGRAPH + {0xFA9F, 0x590B}, //7431 #CJK UNIFIED IDEOGRAPH + {0xFAA0, 0x5953}, //7432 #CJK UNIFIED IDEOGRAPH + {0xFAA1, 0x595B}, //7433 #CJK UNIFIED IDEOGRAPH + {0xFAA2, 0x595D}, //7434 #CJK UNIFIED IDEOGRAPH + {0xFAA3, 0x5963}, //7435 #CJK UNIFIED IDEOGRAPH + {0xFAA4, 0x59A4}, //7436 #CJK UNIFIED IDEOGRAPH + {0xFAA5, 0x59BA}, //7437 #CJK UNIFIED IDEOGRAPH + {0xFAA6, 0x5B56}, //7438 #CJK UNIFIED IDEOGRAPH + {0xFAA7, 0x5BC0}, //7439 #CJK UNIFIED IDEOGRAPH + {0xFAA8, 0x752F}, //7440 #CJK UNIFIED IDEOGRAPH + {0xFAA9, 0x5BD8}, //7441 #CJK UNIFIED IDEOGRAPH + {0xFAAA, 0x5BEC}, //7442 #CJK UNIFIED IDEOGRAPH + {0xFAAB, 0x5C1E}, //7443 #CJK UNIFIED IDEOGRAPH + {0xFAAC, 0x5CA6}, //7444 #CJK UNIFIED IDEOGRAPH + {0xFAAD, 0x5CBA}, //7445 #CJK UNIFIED IDEOGRAPH + {0xFAAE, 0x5CF5}, //7446 #CJK UNIFIED IDEOGRAPH + {0xFAAF, 0x5D27}, //7447 #CJK UNIFIED IDEOGRAPH + {0xFAB0, 0x5D53}, //7448 #CJK UNIFIED IDEOGRAPH + {0xFAB1, 0xFA11}, //7449 #CJK COMPATIBILITY IDEOGRAPH + {0xFAB2, 0x5D42}, //7450 #CJK UNIFIED IDEOGRAPH + {0xFAB3, 0x5D6D}, //7451 #CJK UNIFIED IDEOGRAPH + {0xFAB4, 0x5DB8}, //7452 #CJK UNIFIED IDEOGRAPH + {0xFAB5, 0x5DB9}, //7453 #CJK UNIFIED IDEOGRAPH + {0xFAB6, 0x5DD0}, //7454 #CJK UNIFIED IDEOGRAPH + {0xFAB7, 0x5F21}, //7455 #CJK UNIFIED IDEOGRAPH + {0xFAB8, 0x5F34}, //7456 #CJK UNIFIED IDEOGRAPH + {0xFAB9, 0x5F67}, //7457 #CJK UNIFIED IDEOGRAPH + {0xFABA, 0x5FB7}, //7458 #CJK UNIFIED IDEOGRAPH + {0xFABB, 0x5FDE}, //7459 #CJK UNIFIED IDEOGRAPH + {0xFABC, 0x605D}, //7460 #CJK UNIFIED IDEOGRAPH + {0xFABD, 0x6085}, //7461 #CJK UNIFIED IDEOGRAPH + {0xFABE, 0x608A}, //7462 #CJK UNIFIED IDEOGRAPH + {0xFABF, 0x60DE}, //7463 #CJK UNIFIED IDEOGRAPH + {0xFAC0, 0x60D5}, //7464 #CJK UNIFIED IDEOGRAPH + {0xFAC1, 0x6120}, //7465 #CJK UNIFIED IDEOGRAPH + {0xFAC2, 0x60F2}, //7466 #CJK UNIFIED IDEOGRAPH + {0xFAC3, 0x6111}, //7467 #CJK UNIFIED IDEOGRAPH + {0xFAC4, 0x6137}, //7468 #CJK UNIFIED IDEOGRAPH + {0xFAC5, 0x6130}, //7469 #CJK UNIFIED IDEOGRAPH + {0xFAC6, 0x6198}, //7470 #CJK UNIFIED IDEOGRAPH + {0xFAC7, 0x6213}, //7471 #CJK UNIFIED IDEOGRAPH + {0xFAC8, 0x62A6}, //7472 #CJK UNIFIED IDEOGRAPH + {0xFAC9, 0x63F5}, //7473 #CJK UNIFIED IDEOGRAPH + {0xFACA, 0x6460}, //7474 #CJK UNIFIED IDEOGRAPH + {0xFACB, 0x649D}, //7475 #CJK UNIFIED IDEOGRAPH + {0xFACC, 0x64CE}, //7476 #CJK UNIFIED IDEOGRAPH + {0xFACD, 0x654E}, //7477 #CJK UNIFIED IDEOGRAPH + {0xFACE, 0x6600}, //7478 #CJK UNIFIED IDEOGRAPH + {0xFACF, 0x6615}, //7479 #CJK UNIFIED IDEOGRAPH + {0xFAD0, 0x663B}, //7480 #CJK UNIFIED IDEOGRAPH + {0xFAD1, 0x6609}, //7481 #CJK UNIFIED IDEOGRAPH + {0xFAD2, 0x662E}, //7482 #CJK UNIFIED IDEOGRAPH + {0xFAD3, 0x661E}, //7483 #CJK UNIFIED IDEOGRAPH + {0xFAD4, 0x6624}, //7484 #CJK UNIFIED IDEOGRAPH + {0xFAD5, 0x6665}, //7485 #CJK UNIFIED IDEOGRAPH + {0xFAD6, 0x6657}, //7486 #CJK UNIFIED IDEOGRAPH + {0xFAD7, 0x6659}, //7487 #CJK UNIFIED IDEOGRAPH + {0xFAD8, 0xFA12}, //7488 #CJK COMPATIBILITY IDEOGRAPH + {0xFAD9, 0x6673}, //7489 #CJK UNIFIED IDEOGRAPH + {0xFADA, 0x6699}, //7490 #CJK UNIFIED IDEOGRAPH + {0xFADB, 0x66A0}, //7491 #CJK UNIFIED IDEOGRAPH + {0xFADC, 0x66B2}, //7492 #CJK UNIFIED IDEOGRAPH + {0xFADD, 0x66BF}, //7493 #CJK UNIFIED IDEOGRAPH + {0xFADE, 0x66FA}, //7494 #CJK UNIFIED IDEOGRAPH + {0xFADF, 0x670E}, //7495 #CJK UNIFIED IDEOGRAPH + {0xFAE0, 0xF929}, //7496 #CJK COMPATIBILITY IDEOGRAPH + {0xFAE1, 0x6766}, //7497 #CJK UNIFIED IDEOGRAPH + {0xFAE2, 0x67BB}, //7498 #CJK UNIFIED IDEOGRAPH + {0xFAE3, 0x6852}, //7499 #CJK UNIFIED IDEOGRAPH + {0xFAE4, 0x67C0}, //7500 #CJK UNIFIED IDEOGRAPH + {0xFAE5, 0x6801}, //7501 #CJK UNIFIED IDEOGRAPH + {0xFAE6, 0x6844}, //7502 #CJK UNIFIED IDEOGRAPH + {0xFAE7, 0x68CF}, //7503 #CJK UNIFIED IDEOGRAPH + {0xFAE8, 0xFA13}, //7504 #CJK COMPATIBILITY IDEOGRAPH + {0xFAE9, 0x6968}, //7505 #CJK UNIFIED IDEOGRAPH + {0xFAEA, 0xFA14}, //7506 #CJK COMPATIBILITY IDEOGRAPH + {0xFAEB, 0x6998}, //7507 #CJK UNIFIED IDEOGRAPH + {0xFAEC, 0x69E2}, //7508 #CJK UNIFIED IDEOGRAPH + {0xFAED, 0x6A30}, //7509 #CJK UNIFIED IDEOGRAPH + {0xFAEE, 0x6A6B}, //7510 #CJK UNIFIED IDEOGRAPH + {0xFAEF, 0x6A46}, //7511 #CJK UNIFIED IDEOGRAPH + {0xFAF0, 0x6A73}, //7512 #CJK UNIFIED IDEOGRAPH + {0xFAF1, 0x6A7E}, //7513 #CJK UNIFIED IDEOGRAPH + {0xFAF2, 0x6AE2}, //7514 #CJK UNIFIED IDEOGRAPH + {0xFAF3, 0x6AE4}, //7515 #CJK UNIFIED IDEOGRAPH + {0xFAF4, 0x6BD6}, //7516 #CJK UNIFIED IDEOGRAPH + {0xFAF5, 0x6C3F}, //7517 #CJK UNIFIED IDEOGRAPH + {0xFAF6, 0x6C5C}, //7518 #CJK UNIFIED IDEOGRAPH + {0xFAF7, 0x6C86}, //7519 #CJK UNIFIED IDEOGRAPH + {0xFAF8, 0x6C6F}, //7520 #CJK UNIFIED IDEOGRAPH + {0xFAF9, 0x6CDA}, //7521 #CJK UNIFIED IDEOGRAPH + {0xFAFA, 0x6D04}, //7522 #CJK UNIFIED IDEOGRAPH + {0xFAFB, 0x6D87}, //7523 #CJK UNIFIED IDEOGRAPH + {0xFAFC, 0x6D6F}, //7524 #CJK UNIFIED IDEOGRAPH + {0xFB40, 0x6D96}, //7525 #CJK UNIFIED IDEOGRAPH + {0xFB41, 0x6DAC}, //7526 #CJK UNIFIED IDEOGRAPH + {0xFB42, 0x6DCF}, //7527 #CJK UNIFIED IDEOGRAPH + {0xFB43, 0x6DF8}, //7528 #CJK UNIFIED IDEOGRAPH + {0xFB44, 0x6DF2}, //7529 #CJK UNIFIED IDEOGRAPH + {0xFB45, 0x6DFC}, //7530 #CJK UNIFIED IDEOGRAPH + {0xFB46, 0x6E39}, //7531 #CJK UNIFIED IDEOGRAPH + {0xFB47, 0x6E5C}, //7532 #CJK UNIFIED IDEOGRAPH + {0xFB48, 0x6E27}, //7533 #CJK UNIFIED IDEOGRAPH + {0xFB49, 0x6E3C}, //7534 #CJK UNIFIED IDEOGRAPH + {0xFB4A, 0x6EBF}, //7535 #CJK UNIFIED IDEOGRAPH + {0xFB4B, 0x6F88}, //7536 #CJK UNIFIED IDEOGRAPH + {0xFB4C, 0x6FB5}, //7537 #CJK UNIFIED IDEOGRAPH + {0xFB4D, 0x6FF5}, //7538 #CJK UNIFIED IDEOGRAPH + {0xFB4E, 0x7005}, //7539 #CJK UNIFIED IDEOGRAPH + {0xFB4F, 0x7007}, //7540 #CJK UNIFIED IDEOGRAPH + {0xFB50, 0x7028}, //7541 #CJK UNIFIED IDEOGRAPH + {0xFB51, 0x7085}, //7542 #CJK UNIFIED IDEOGRAPH + {0xFB52, 0x70AB}, //7543 #CJK UNIFIED IDEOGRAPH + {0xFB53, 0x710F}, //7544 #CJK UNIFIED IDEOGRAPH + {0xFB54, 0x7104}, //7545 #CJK UNIFIED IDEOGRAPH + {0xFB55, 0x715C}, //7546 #CJK UNIFIED IDEOGRAPH + {0xFB56, 0x7146}, //7547 #CJK UNIFIED IDEOGRAPH + {0xFB57, 0x7147}, //7548 #CJK UNIFIED IDEOGRAPH + {0xFB58, 0xFA15}, //7549 #CJK COMPATIBILITY IDEOGRAPH + {0xFB59, 0x71C1}, //7550 #CJK UNIFIED IDEOGRAPH + {0xFB5A, 0x71FE}, //7551 #CJK UNIFIED IDEOGRAPH + {0xFB5B, 0x72B1}, //7552 #CJK UNIFIED IDEOGRAPH + {0xFB5C, 0x72BE}, //7553 #CJK UNIFIED IDEOGRAPH + {0xFB5D, 0x7324}, //7554 #CJK UNIFIED IDEOGRAPH + {0xFB5E, 0xFA16}, //7555 #CJK COMPATIBILITY IDEOGRAPH + {0xFB5F, 0x7377}, //7556 #CJK UNIFIED IDEOGRAPH + {0xFB60, 0x73BD}, //7557 #CJK UNIFIED IDEOGRAPH + {0xFB61, 0x73C9}, //7558 #CJK UNIFIED IDEOGRAPH + {0xFB62, 0x73D6}, //7559 #CJK UNIFIED IDEOGRAPH + {0xFB63, 0x73E3}, //7560 #CJK UNIFIED IDEOGRAPH + {0xFB64, 0x73D2}, //7561 #CJK UNIFIED IDEOGRAPH + {0xFB65, 0x7407}, //7562 #CJK UNIFIED IDEOGRAPH + {0xFB66, 0x73F5}, //7563 #CJK UNIFIED IDEOGRAPH + {0xFB67, 0x7426}, //7564 #CJK UNIFIED IDEOGRAPH + {0xFB68, 0x742A}, //7565 #CJK UNIFIED IDEOGRAPH + {0xFB69, 0x7429}, //7566 #CJK UNIFIED IDEOGRAPH + {0xFB6A, 0x742E}, //7567 #CJK UNIFIED IDEOGRAPH + {0xFB6B, 0x7462}, //7568 #CJK UNIFIED IDEOGRAPH + {0xFB6C, 0x7489}, //7569 #CJK UNIFIED IDEOGRAPH + {0xFB6D, 0x749F}, //7570 #CJK UNIFIED IDEOGRAPH + {0xFB6E, 0x7501}, //7571 #CJK UNIFIED IDEOGRAPH + {0xFB6F, 0x756F}, //7572 #CJK UNIFIED IDEOGRAPH + {0xFB70, 0x7682}, //7573 #CJK UNIFIED IDEOGRAPH + {0xFB71, 0x769C}, //7574 #CJK UNIFIED IDEOGRAPH + {0xFB72, 0x769E}, //7575 #CJK UNIFIED IDEOGRAPH + {0xFB73, 0x769B}, //7576 #CJK UNIFIED IDEOGRAPH + {0xFB74, 0x76A6}, //7577 #CJK UNIFIED IDEOGRAPH + {0xFB75, 0xFA17}, //7578 #CJK COMPATIBILITY IDEOGRAPH + {0xFB76, 0x7746}, //7579 #CJK UNIFIED IDEOGRAPH + {0xFB77, 0x52AF}, //7580 #CJK UNIFIED IDEOGRAPH + {0xFB78, 0x7821}, //7581 #CJK UNIFIED IDEOGRAPH + {0xFB79, 0x784E}, //7582 #CJK UNIFIED IDEOGRAPH + {0xFB7A, 0x7864}, //7583 #CJK UNIFIED IDEOGRAPH + {0xFB7B, 0x787A}, //7584 #CJK UNIFIED IDEOGRAPH + {0xFB7C, 0x7930}, //7585 #CJK UNIFIED IDEOGRAPH + {0xFB7D, 0xFA18}, //7586 #CJK COMPATIBILITY IDEOGRAPH + {0xFB7E, 0xFA19}, //7587 #CJK COMPATIBILITY IDEOGRAPH + {0xFB80, 0xFA1A}, //7588 #CJK COMPATIBILITY IDEOGRAPH + {0xFB81, 0x7994}, //7589 #CJK UNIFIED IDEOGRAPH + {0xFB82, 0xFA1B}, //7590 #CJK COMPATIBILITY IDEOGRAPH + {0xFB83, 0x799B}, //7591 #CJK UNIFIED IDEOGRAPH + {0xFB84, 0x7AD1}, //7592 #CJK UNIFIED IDEOGRAPH + {0xFB85, 0x7AE7}, //7593 #CJK UNIFIED IDEOGRAPH + {0xFB86, 0xFA1C}, //7594 #CJK COMPATIBILITY IDEOGRAPH + {0xFB87, 0x7AEB}, //7595 #CJK UNIFIED IDEOGRAPH + {0xFB88, 0x7B9E}, //7596 #CJK UNIFIED IDEOGRAPH + {0xFB89, 0xFA1D}, //7597 #CJK COMPATIBILITY IDEOGRAPH + {0xFB8A, 0x7D48}, //7598 #CJK UNIFIED IDEOGRAPH + {0xFB8B, 0x7D5C}, //7599 #CJK UNIFIED IDEOGRAPH + {0xFB8C, 0x7DB7}, //7600 #CJK UNIFIED IDEOGRAPH + {0xFB8D, 0x7DA0}, //7601 #CJK UNIFIED IDEOGRAPH + {0xFB8E, 0x7DD6}, //7602 #CJK UNIFIED IDEOGRAPH + {0xFB8F, 0x7E52}, //7603 #CJK UNIFIED IDEOGRAPH + {0xFB90, 0x7F47}, //7604 #CJK UNIFIED IDEOGRAPH + {0xFB91, 0x7FA1}, //7605 #CJK UNIFIED IDEOGRAPH + {0xFB92, 0xFA1E}, //7606 #CJK COMPATIBILITY IDEOGRAPH + {0xFB93, 0x8301}, //7607 #CJK UNIFIED IDEOGRAPH + {0xFB94, 0x8362}, //7608 #CJK UNIFIED IDEOGRAPH + {0xFB95, 0x837F}, //7609 #CJK UNIFIED IDEOGRAPH + {0xFB96, 0x83C7}, //7610 #CJK UNIFIED IDEOGRAPH + {0xFB97, 0x83F6}, //7611 #CJK UNIFIED IDEOGRAPH + {0xFB98, 0x8448}, //7612 #CJK UNIFIED IDEOGRAPH + {0xFB99, 0x84B4}, //7613 #CJK UNIFIED IDEOGRAPH + {0xFB9A, 0x8553}, //7614 #CJK UNIFIED IDEOGRAPH + {0xFB9B, 0x8559}, //7615 #CJK UNIFIED IDEOGRAPH + {0xFB9C, 0x856B}, //7616 #CJK UNIFIED IDEOGRAPH + {0xFB9D, 0xFA1F}, //7617 #CJK COMPATIBILITY IDEOGRAPH + {0xFB9E, 0x85B0}, //7618 #CJK UNIFIED IDEOGRAPH + {0xFB9F, 0xFA20}, //7619 #CJK COMPATIBILITY IDEOGRAPH + {0xFBA0, 0xFA21}, //7620 #CJK COMPATIBILITY IDEOGRAPH + {0xFBA1, 0x8807}, //7621 #CJK UNIFIED IDEOGRAPH + {0xFBA2, 0x88F5}, //7622 #CJK UNIFIED IDEOGRAPH + {0xFBA3, 0x8A12}, //7623 #CJK UNIFIED IDEOGRAPH + {0xFBA4, 0x8A37}, //7624 #CJK UNIFIED IDEOGRAPH + {0xFBA5, 0x8A79}, //7625 #CJK UNIFIED IDEOGRAPH + {0xFBA6, 0x8AA7}, //7626 #CJK UNIFIED IDEOGRAPH + {0xFBA7, 0x8ABE}, //7627 #CJK UNIFIED IDEOGRAPH + {0xFBA8, 0x8ADF}, //7628 #CJK UNIFIED IDEOGRAPH + {0xFBA9, 0xFA22}, //7629 #CJK COMPATIBILITY IDEOGRAPH + {0xFBAA, 0x8AF6}, //7630 #CJK UNIFIED IDEOGRAPH + {0xFBAB, 0x8B53}, //7631 #CJK UNIFIED IDEOGRAPH + {0xFBAC, 0x8B7F}, //7632 #CJK UNIFIED IDEOGRAPH + {0xFBAD, 0x8CF0}, //7633 #CJK UNIFIED IDEOGRAPH + {0xFBAE, 0x8CF4}, //7634 #CJK UNIFIED IDEOGRAPH + {0xFBAF, 0x8D12}, //7635 #CJK UNIFIED IDEOGRAPH + {0xFBB0, 0x8D76}, //7636 #CJK UNIFIED IDEOGRAPH + {0xFBB1, 0xFA23}, //7637 #CJK COMPATIBILITY IDEOGRAPH + {0xFBB2, 0x8ECF}, //7638 #CJK UNIFIED IDEOGRAPH + {0xFBB3, 0xFA24}, //7639 #CJK COMPATIBILITY IDEOGRAPH + {0xFBB4, 0xFA25}, //7640 #CJK COMPATIBILITY IDEOGRAPH + {0xFBB5, 0x9067}, //7641 #CJK UNIFIED IDEOGRAPH + {0xFBB6, 0x90DE}, //7642 #CJK UNIFIED IDEOGRAPH + {0xFBB7, 0xFA26}, //7643 #CJK COMPATIBILITY IDEOGRAPH + {0xFBB8, 0x9115}, //7644 #CJK UNIFIED IDEOGRAPH + {0xFBB9, 0x9127}, //7645 #CJK UNIFIED IDEOGRAPH + {0xFBBA, 0x91DA}, //7646 #CJK UNIFIED IDEOGRAPH + {0xFBBB, 0x91D7}, //7647 #CJK UNIFIED IDEOGRAPH + {0xFBBC, 0x91DE}, //7648 #CJK UNIFIED IDEOGRAPH + {0xFBBD, 0x91ED}, //7649 #CJK UNIFIED IDEOGRAPH + {0xFBBE, 0x91EE}, //7650 #CJK UNIFIED IDEOGRAPH + {0xFBBF, 0x91E4}, //7651 #CJK UNIFIED IDEOGRAPH + {0xFBC0, 0x91E5}, //7652 #CJK UNIFIED IDEOGRAPH + {0xFBC1, 0x9206}, //7653 #CJK UNIFIED IDEOGRAPH + {0xFBC2, 0x9210}, //7654 #CJK UNIFIED IDEOGRAPH + {0xFBC3, 0x920A}, //7655 #CJK UNIFIED IDEOGRAPH + {0xFBC4, 0x923A}, //7656 #CJK UNIFIED IDEOGRAPH + {0xFBC5, 0x9240}, //7657 #CJK UNIFIED IDEOGRAPH + {0xFBC6, 0x923C}, //7658 #CJK UNIFIED IDEOGRAPH + {0xFBC7, 0x924E}, //7659 #CJK UNIFIED IDEOGRAPH + {0xFBC8, 0x9259}, //7660 #CJK UNIFIED IDEOGRAPH + {0xFBC9, 0x9251}, //7661 #CJK UNIFIED IDEOGRAPH + {0xFBCA, 0x9239}, //7662 #CJK UNIFIED IDEOGRAPH + {0xFBCB, 0x9267}, //7663 #CJK UNIFIED IDEOGRAPH + {0xFBCC, 0x92A7}, //7664 #CJK UNIFIED IDEOGRAPH + {0xFBCD, 0x9277}, //7665 #CJK UNIFIED IDEOGRAPH + {0xFBCE, 0x9278}, //7666 #CJK UNIFIED IDEOGRAPH + {0xFBCF, 0x92E7}, //7667 #CJK UNIFIED IDEOGRAPH + {0xFBD0, 0x92D7}, //7668 #CJK UNIFIED IDEOGRAPH + {0xFBD1, 0x92D9}, //7669 #CJK UNIFIED IDEOGRAPH + {0xFBD2, 0x92D0}, //7670 #CJK UNIFIED IDEOGRAPH + {0xFBD3, 0xFA27}, //7671 #CJK COMPATIBILITY IDEOGRAPH + {0xFBD4, 0x92D5}, //7672 #CJK UNIFIED IDEOGRAPH + {0xFBD5, 0x92E0}, //7673 #CJK UNIFIED IDEOGRAPH + {0xFBD6, 0x92D3}, //7674 #CJK UNIFIED IDEOGRAPH + {0xFBD7, 0x9325}, //7675 #CJK UNIFIED IDEOGRAPH + {0xFBD8, 0x9321}, //7676 #CJK UNIFIED IDEOGRAPH + {0xFBD9, 0x92FB}, //7677 #CJK UNIFIED IDEOGRAPH + {0xFBDA, 0xFA28}, //7678 #CJK COMPATIBILITY IDEOGRAPH + {0xFBDB, 0x931E}, //7679 #CJK UNIFIED IDEOGRAPH + {0xFBDC, 0x92FF}, //7680 #CJK UNIFIED IDEOGRAPH + {0xFBDD, 0x931D}, //7681 #CJK UNIFIED IDEOGRAPH + {0xFBDE, 0x9302}, //7682 #CJK UNIFIED IDEOGRAPH + {0xFBDF, 0x9370}, //7683 #CJK UNIFIED IDEOGRAPH + {0xFBE0, 0x9357}, //7684 #CJK UNIFIED IDEOGRAPH + {0xFBE1, 0x93A4}, //7685 #CJK UNIFIED IDEOGRAPH + {0xFBE2, 0x93C6}, //7686 #CJK UNIFIED IDEOGRAPH + {0xFBE3, 0x93DE}, //7687 #CJK UNIFIED IDEOGRAPH + {0xFBE4, 0x93F8}, //7688 #CJK UNIFIED IDEOGRAPH + {0xFBE5, 0x9431}, //7689 #CJK UNIFIED IDEOGRAPH + {0xFBE6, 0x9445}, //7690 #CJK UNIFIED IDEOGRAPH + {0xFBE7, 0x9448}, //7691 #CJK UNIFIED IDEOGRAPH + {0xFBE8, 0x9592}, //7692 #CJK UNIFIED IDEOGRAPH + {0xFBE9, 0xF9DC}, //7693 #CJK COMPATIBILITY IDEOGRAPH + {0xFBEA, 0xFA29}, //7694 #CJK COMPATIBILITY IDEOGRAPH + {0xFBEB, 0x969D}, //7695 #CJK UNIFIED IDEOGRAPH + {0xFBEC, 0x96AF}, //7696 #CJK UNIFIED IDEOGRAPH + {0xFBED, 0x9733}, //7697 #CJK UNIFIED IDEOGRAPH + {0xFBEE, 0x973B}, //7698 #CJK UNIFIED IDEOGRAPH + {0xFBEF, 0x9743}, //7699 #CJK UNIFIED IDEOGRAPH + {0xFBF0, 0x974D}, //7700 #CJK UNIFIED IDEOGRAPH + {0xFBF1, 0x974F}, //7701 #CJK UNIFIED IDEOGRAPH + {0xFBF2, 0x9751}, //7702 #CJK UNIFIED IDEOGRAPH + {0xFBF3, 0x9755}, //7703 #CJK UNIFIED IDEOGRAPH + {0xFBF4, 0x9857}, //7704 #CJK UNIFIED IDEOGRAPH + {0xFBF5, 0x9865}, //7705 #CJK UNIFIED IDEOGRAPH + {0xFBF6, 0xFA2A}, //7706 #CJK COMPATIBILITY IDEOGRAPH + {0xFBF7, 0xFA2B}, //7707 #CJK COMPATIBILITY IDEOGRAPH + {0xFBF8, 0x9927}, //7708 #CJK UNIFIED IDEOGRAPH + {0xFBF9, 0xFA2C}, //7709 #CJK COMPATIBILITY IDEOGRAPH + {0xFBFA, 0x999E}, //7710 #CJK UNIFIED IDEOGRAPH + {0xFBFB, 0x9A4E}, //7711 #CJK UNIFIED IDEOGRAPH + {0xFBFC, 0x9AD9}, //7712 #CJK UNIFIED IDEOGRAPH + {0xFC40, 0x9ADC}, //7713 #CJK UNIFIED IDEOGRAPH + {0xFC41, 0x9B75}, //7714 #CJK UNIFIED IDEOGRAPH + {0xFC42, 0x9B72}, //7715 #CJK UNIFIED IDEOGRAPH + {0xFC43, 0x9B8F}, //7716 #CJK UNIFIED IDEOGRAPH + {0xFC44, 0x9BB1}, //7717 #CJK UNIFIED IDEOGRAPH + {0xFC45, 0x9BBB}, //7718 #CJK UNIFIED IDEOGRAPH + {0xFC46, 0x9C00}, //7719 #CJK UNIFIED IDEOGRAPH + {0xFC47, 0x9D70}, //7720 #CJK UNIFIED IDEOGRAPH + {0xFC48, 0x9D6B}, //7721 #CJK UNIFIED IDEOGRAPH + {0xFC49, 0xFA2D}, //7722 #CJK COMPATIBILITY IDEOGRAPH + {0xFC4A, 0x9E19}, //7723 #CJK UNIFIED IDEOGRAPH + {0xFC4B, 0x9ED1} //7724 #CJK UNIFIED IDEOGRAPH +}; +#endif // DRW_CPTABLE932_H diff --git a/lib_dxf/intern/drw_cptable936.h b/lib_dxf/intern/drw_cptable936.h new file mode 100644 index 0000000000..4c1c14148a --- /dev/null +++ b/lib_dxf/intern/drw_cptable936.h @@ -0,0 +1,21943 @@ +#ifndef DRW_CPTABLE936_H +#define DRW_CPTABLE936_H + +//Chinese PRC GBK (XGB) + +//first entry in this tables are 0x80 +#define CPOFFSET936 0x80 +#define CPLENGHT936 21791 +#define NOTFOUND936 0x003F + +//Table 949 one byte +static const int DRW_Table936[] = { + 0x20AC //1 #EURO SIGN 0x80 +// 0xF8F5 //2 #EURO SIGN 0x80 +}; + +//Table 936 +static const int DRW_LeadTable936[] = { + 0, //1#DBCS LEAD BYTE 0x81 + 190, //2#DBCS LEAD BYTE 0x82 + 380, //3#DBCS LEAD BYTE 0x83 + 570, //4#DBCS LEAD BYTE 0x84 + 760, //5#DBCS LEAD BYTE 0x85 + 950, //6#DBCS LEAD BYTE 0x86 + 1140, //7#DBCS LEAD BYTE 0x87 + 1330, //8#DBCS LEAD BYTE 0x88 + 1520, //9#DBCS LEAD BYTE 0x89 + 1710, //10#DBCS LEAD BYTE 0x8A + 1900, //11#DBCS LEAD BYTE 0x8B + 2090, //12#DBCS LEAD BYTE 0x8C + 2280, //13#DBCS LEAD BYTE 0x8D + 2470, //14#DBCS LEAD BYTE 0x8E + 2660, //15#DBCS LEAD BYTE 0x8F + 2850, //16#DBCS LEAD BYTE 0x90 + 3040, //17#DBCS LEAD BYTE 0x91 + 3230, //18#DBCS LEAD BYTE 0x92 + 3420, //19#DBCS LEAD BYTE 0x93 + 3610, //20#DBCS LEAD BYTE 0x94 + 3800, //21#DBCS LEAD BYTE 0x95 + 3990, //22#DBCS LEAD BYTE 0x96 + 4180, //23#DBCS LEAD BYTE 0x97 + 4370, //24#DBCS LEAD BYTE 0x98 + 4560, //25#DBCS LEAD BYTE 0x99 + 4750, //26#DBCS LEAD BYTE 0x9A + 4940, //27#DBCS LEAD BYTE 0x9B + 5130, //28#DBCS LEAD BYTE 0x9C + 5320, //29#DBCS LEAD BYTE 0x9D + 5510, //30#DBCS LEAD BYTE 0x9E + 5700, //31#DBCS LEAD BYTE 0x9F + 5906, //32#DBCS LEAD BYTE 0xA0 + 6080, //33#DBCS LEAD BYTE 0xA1 + 6174, //34#DBCS LEAD BYTE 0xA2 + 6256, //35#DBCS LEAD BYTE 0xA3 + 6350, //36#DBCS LEAD BYTE 0xA4 + 6433, //37#DBCS LEAD BYTE 0xA5 + 6519, //38#DBCS LEAD BYTE 0xA6 + 6586, //39#DBCS LEAD BYTE 0xA7 + 6652, //40#DBCS LEAD BYTE 0xA8 + 6804, //41#DBCS LEAD BYTE 0xA9 + 6948, //42#DBCS LEAD BYTE 0xAA + 7044, //43#DBCS LEAD BYTE 0xAB + 7140, //44#DBCS LEAD BYTE 0xAC + 7236, //45#DBCS LEAD BYTE 0xAD + 7332, //46#DBCS LEAD BYTE 0xAE + 7428, //47#DBCS LEAD BYTE 0xAF + 7524, //48#DBCS LEAD BYTE 0xB0 + 7714, //49#DBCS LEAD BYTE 0xB1 + 7904, //50#DBCS LEAD BYTE 0xB2 + 8094, //51#DBCS LEAD BYTE 0xB3 + 8284, //52#DBCS LEAD BYTE 0xB4 + 8474, //53#DBCS LEAD BYTE 0xB5 + 8664, //54#DBCS LEAD BYTE 0xB6 + 8854, //55#DBCS LEAD BYTE 0xB7 + 9044, //56#DBCS LEAD BYTE 0xB8 + 9224, //57#DBCS LEAD BYTE 0xB9 + 9424, //58#DBCS LEAD BYTE 0xBA + 9614, //59#DBCS LEAD BYTE 0xBB + 9804, //60#DBCS LEAD BYTE 0xBC + 9994, //61#DBCS LEAD BYTE 0xBD + 10184, //62#DBCS LEAD BYTE 0xBE + 10374, //63#DBCS LEAD BYTE 0xBF + 10564, //64#DBCS LEAD BYTE 0xC0 + 10754, //65#DBCS LEAD BYTE 0xC1 + 10944, //66#DBCS LEAD BYTE 0xC2 + 11134, //67#DBCS LEAD BYTE 0xC3 + 11324, //68#DBCS LEAD BYTE 0xC4 + 11514, //69#DBCS LEAD BYTE 0xC5 + 11704, //70#DBCS LEAD BYTE 0xC6 + 11894, //71#DBCS LEAD BYTE 0xC7 + 12084, //72#DBCS LEAD BYTE 0xC8 + 12274, //73#DBCS LEAD BYTE 0xC9 + 12464, //74#DBCS LEAD BYTE 0xCA + 12654, //75#DBCS LEAD BYTE 0xCB + 12844, //76#DBCS LEAD BYTE 0xCC + 13034, //77#DBCS LEAD BYTE 0xCD + 13224, //78#DBCS LEAD BYTE 0xCE + 13414, //79#DBCS LEAD BYTE 0xCF + 13604, //80#DBCS LEAD BYTE 0xD0 + 13794, //81#DBCS LEAD BYTE 0xD1 + 13984, //82#DBCS LEAD BYTE 0xD2 + 14174, //83#DBCS LEAD BYTE 0xD3 + 14364, //84#DBCS LEAD BYTE 0xD4 + 14554, //85#DBCS LEAD BYTE 0xD5 + 14744, //86#DBCS LEAD BYTE 0xD6 + 14934, //87#DBCS LEAD BYTE 0xD7 + 15119, //88#DBCS LEAD BYTE 0xD8 + 15309, //89#DBCS LEAD BYTE 0xD9 + 15499, //90#DBCS LEAD BYTE 0xDA + 15689, //91#DBCS LEAD BYTE 0xDB + 15879, //92#DBCS LEAD BYTE 0xDC + 16069, //93#DBCS LEAD BYTE 0xDD + 16259, //94#DBCS LEAD BYTE 0xDE + 16449, //95#DBCS LEAD BYTE 0xDF + 16639, //96#DBCS LEAD BYTE 0xE0 + 16829, //97#DBCS LEAD BYTE 0xE1 + 17019, //98#DBCS LEAD BYTE 0xE2 + 17209, //99#DBCS LEAD BYTE 0xE3 + 17399, //100#DBCS LEAD BYTE 0xE4 + 17589, //101#DBCS LEAD BYTE 0xE5 + 17779, //102#DBCS LEAD BYTE 0xE6 + 17969, //103#DBCS LEAD BYTE 0xE7 + 18159, //104#DBCS LEAD BYTE 0xE8 + 18349, //105#DBCS LEAD BYTE 0xE9 + 18539, //106#DBCS LEAD BYTE 0xEA + 18729, //107#DBCS LEAD BYTE 0xEB + 18919, //108#DBCS LEAD BYTE 0xEC + 19109, //109#DBCS LEAD BYTE 0xED + 19299, //110#DBCS LEAD BYTE 0xEE + 19489, //111#DBCS LEAD BYTE 0xEF + 19679, //112#DBCS LEAD BYTE 0xF0 + 19869, //113#DBCS LEAD BYTE 0xF1 + 20059, //114#DBCS LEAD BYTE 0xF2 + 20249, //115#DBCS LEAD BYTE 0xF3 + 20439, //116#DBCS LEAD BYTE 0xF4 + 20659, //117#DBCS LEAD BYTE 0xF5 + 20819, //118#DBCS LEAD BYTE 0xF6 + 21009, //119#DBCS LEAD BYTE 0xF7 + 21199, //120#DBCS LEAD BYTE 0xF8 + 21295, //121#DBCS LEAD BYTE 0xF9 + 21391, //122#DBCS LEAD BYTE 0xFA + 21487, //123#DBCS LEAD BYTE 0xFB + 21583, //124#DBCS LEAD BYTE 0xFC + 21679, //125#DBCS LEAD BYTE 0xFD + 21775, //126#DBCS LEAD BYTE 0xFE + 21791, //127#UNDEFINED 0xFF, END OF TABLE +}; + +//Table 936 tail byte +static const int DRW_DoubleTable936[][2] = { + {0x8140, 0x4E02}, //1 #CJK UNIFIED IDEOGRAPH + {0x8141, 0x4E04}, //2 #CJK UNIFIED IDEOGRAPH + {0x8142, 0x4E05}, //3 #CJK UNIFIED IDEOGRAPH + {0x8143, 0x4E06}, //4 #CJK UNIFIED IDEOGRAPH + {0x8144, 0x4E0F}, //5 #CJK UNIFIED IDEOGRAPH + {0x8145, 0x4E12}, //6 #CJK UNIFIED IDEOGRAPH + {0x8146, 0x4E17}, //7 #CJK UNIFIED IDEOGRAPH + {0x8147, 0x4E1F}, //8 #CJK UNIFIED IDEOGRAPH + {0x8148, 0x4E20}, //9 #CJK UNIFIED IDEOGRAPH + {0x8149, 0x4E21}, //10 #CJK UNIFIED IDEOGRAPH + {0x814A, 0x4E23}, //11 #CJK UNIFIED IDEOGRAPH + {0x814B, 0x4E26}, //12 #CJK UNIFIED IDEOGRAPH + {0x814C, 0x4E29}, //13 #CJK UNIFIED IDEOGRAPH + {0x814D, 0x4E2E}, //14 #CJK UNIFIED IDEOGRAPH + {0x814E, 0x4E2F}, //15 #CJK UNIFIED IDEOGRAPH + {0x814F, 0x4E31}, //16 #CJK UNIFIED IDEOGRAPH + {0x8150, 0x4E33}, //17 #CJK UNIFIED IDEOGRAPH + {0x8151, 0x4E35}, //18 #CJK UNIFIED IDEOGRAPH + {0x8152, 0x4E37}, //19 #CJK UNIFIED IDEOGRAPH + {0x8153, 0x4E3C}, //20 #CJK UNIFIED IDEOGRAPH + {0x8154, 0x4E40}, //21 #CJK UNIFIED IDEOGRAPH + {0x8155, 0x4E41}, //22 #CJK UNIFIED IDEOGRAPH + {0x8156, 0x4E42}, //23 #CJK UNIFIED IDEOGRAPH + {0x8157, 0x4E44}, //24 #CJK UNIFIED IDEOGRAPH + {0x8158, 0x4E46}, //25 #CJK UNIFIED IDEOGRAPH + {0x8159, 0x4E4A}, //26 #CJK UNIFIED IDEOGRAPH + {0x815A, 0x4E51}, //27 #CJK UNIFIED IDEOGRAPH + {0x815B, 0x4E55}, //28 #CJK UNIFIED IDEOGRAPH + {0x815C, 0x4E57}, //29 #CJK UNIFIED IDEOGRAPH + {0x815D, 0x4E5A}, //30 #CJK UNIFIED IDEOGRAPH + {0x815E, 0x4E5B}, //31 #CJK UNIFIED IDEOGRAPH + {0x815F, 0x4E62}, //32 #CJK UNIFIED IDEOGRAPH + {0x8160, 0x4E63}, //33 #CJK UNIFIED IDEOGRAPH + {0x8161, 0x4E64}, //34 #CJK UNIFIED IDEOGRAPH + {0x8162, 0x4E65}, //35 #CJK UNIFIED IDEOGRAPH + {0x8163, 0x4E67}, //36 #CJK UNIFIED IDEOGRAPH + {0x8164, 0x4E68}, //37 #CJK UNIFIED IDEOGRAPH + {0x8165, 0x4E6A}, //38 #CJK UNIFIED IDEOGRAPH + {0x8166, 0x4E6B}, //39 #CJK UNIFIED IDEOGRAPH + {0x8167, 0x4E6C}, //40 #CJK UNIFIED IDEOGRAPH + {0x8168, 0x4E6D}, //41 #CJK UNIFIED IDEOGRAPH + {0x8169, 0x4E6E}, //42 #CJK UNIFIED IDEOGRAPH + {0x816A, 0x4E6F}, //43 #CJK UNIFIED IDEOGRAPH + {0x816B, 0x4E72}, //44 #CJK UNIFIED IDEOGRAPH + {0x816C, 0x4E74}, //45 #CJK UNIFIED IDEOGRAPH + {0x816D, 0x4E75}, //46 #CJK UNIFIED IDEOGRAPH + {0x816E, 0x4E76}, //47 #CJK UNIFIED IDEOGRAPH + {0x816F, 0x4E77}, //48 #CJK UNIFIED IDEOGRAPH + {0x8170, 0x4E78}, //49 #CJK UNIFIED IDEOGRAPH + {0x8171, 0x4E79}, //50 #CJK UNIFIED IDEOGRAPH + {0x8172, 0x4E7A}, //51 #CJK UNIFIED IDEOGRAPH + {0x8173, 0x4E7B}, //52 #CJK UNIFIED IDEOGRAPH + {0x8174, 0x4E7C}, //53 #CJK UNIFIED IDEOGRAPH + {0x8175, 0x4E7D}, //54 #CJK UNIFIED IDEOGRAPH + {0x8176, 0x4E7F}, //55 #CJK UNIFIED IDEOGRAPH + {0x8177, 0x4E80}, //56 #CJK UNIFIED IDEOGRAPH + {0x8178, 0x4E81}, //57 #CJK UNIFIED IDEOGRAPH + {0x8179, 0x4E82}, //58 #CJK UNIFIED IDEOGRAPH + {0x817A, 0x4E83}, //59 #CJK UNIFIED IDEOGRAPH + {0x817B, 0x4E84}, //60 #CJK UNIFIED IDEOGRAPH + {0x817C, 0x4E85}, //61 #CJK UNIFIED IDEOGRAPH + {0x817D, 0x4E87}, //62 #CJK UNIFIED IDEOGRAPH + {0x817E, 0x4E8A}, //63 #CJK UNIFIED IDEOGRAPH + {0x8180, 0x4E90}, //64 #CJK UNIFIED IDEOGRAPH + {0x8181, 0x4E96}, //65 #CJK UNIFIED IDEOGRAPH + {0x8182, 0x4E97}, //66 #CJK UNIFIED IDEOGRAPH + {0x8183, 0x4E99}, //67 #CJK UNIFIED IDEOGRAPH + {0x8184, 0x4E9C}, //68 #CJK UNIFIED IDEOGRAPH + {0x8185, 0x4E9D}, //69 #CJK UNIFIED IDEOGRAPH + {0x8186, 0x4E9E}, //70 #CJK UNIFIED IDEOGRAPH + {0x8187, 0x4EA3}, //71 #CJK UNIFIED IDEOGRAPH + {0x8188, 0x4EAA}, //72 #CJK UNIFIED IDEOGRAPH + {0x8189, 0x4EAF}, //73 #CJK UNIFIED IDEOGRAPH + {0x818A, 0x4EB0}, //74 #CJK UNIFIED IDEOGRAPH + {0x818B, 0x4EB1}, //75 #CJK UNIFIED IDEOGRAPH + {0x818C, 0x4EB4}, //76 #CJK UNIFIED IDEOGRAPH + {0x818D, 0x4EB6}, //77 #CJK UNIFIED IDEOGRAPH + {0x818E, 0x4EB7}, //78 #CJK UNIFIED IDEOGRAPH + {0x818F, 0x4EB8}, //79 #CJK UNIFIED IDEOGRAPH + {0x8190, 0x4EB9}, //80 #CJK UNIFIED IDEOGRAPH + {0x8191, 0x4EBC}, //81 #CJK UNIFIED IDEOGRAPH + {0x8192, 0x4EBD}, //82 #CJK UNIFIED IDEOGRAPH + {0x8193, 0x4EBE}, //83 #CJK UNIFIED IDEOGRAPH + {0x8194, 0x4EC8}, //84 #CJK UNIFIED IDEOGRAPH + {0x8195, 0x4ECC}, //85 #CJK UNIFIED IDEOGRAPH + {0x8196, 0x4ECF}, //86 #CJK UNIFIED IDEOGRAPH + {0x8197, 0x4ED0}, //87 #CJK UNIFIED IDEOGRAPH + {0x8198, 0x4ED2}, //88 #CJK UNIFIED IDEOGRAPH + {0x8199, 0x4EDA}, //89 #CJK UNIFIED IDEOGRAPH + {0x819A, 0x4EDB}, //90 #CJK UNIFIED IDEOGRAPH + {0x819B, 0x4EDC}, //91 #CJK UNIFIED IDEOGRAPH + {0x819C, 0x4EE0}, //92 #CJK UNIFIED IDEOGRAPH + {0x819D, 0x4EE2}, //93 #CJK UNIFIED IDEOGRAPH + {0x819E, 0x4EE6}, //94 #CJK UNIFIED IDEOGRAPH + {0x819F, 0x4EE7}, //95 #CJK UNIFIED IDEOGRAPH + {0x81A0, 0x4EE9}, //96 #CJK UNIFIED IDEOGRAPH + {0x81A1, 0x4EED}, //97 #CJK UNIFIED IDEOGRAPH + {0x81A2, 0x4EEE}, //98 #CJK UNIFIED IDEOGRAPH + {0x81A3, 0x4EEF}, //99 #CJK UNIFIED IDEOGRAPH + {0x81A4, 0x4EF1}, //100 #CJK UNIFIED IDEOGRAPH + {0x81A5, 0x4EF4}, //101 #CJK UNIFIED IDEOGRAPH + {0x81A6, 0x4EF8}, //102 #CJK UNIFIED IDEOGRAPH + {0x81A7, 0x4EF9}, //103 #CJK UNIFIED IDEOGRAPH + {0x81A8, 0x4EFA}, //104 #CJK UNIFIED IDEOGRAPH + {0x81A9, 0x4EFC}, //105 #CJK UNIFIED IDEOGRAPH + {0x81AA, 0x4EFE}, //106 #CJK UNIFIED IDEOGRAPH + {0x81AB, 0x4F00}, //107 #CJK UNIFIED IDEOGRAPH + {0x81AC, 0x4F02}, //108 #CJK UNIFIED IDEOGRAPH + {0x81AD, 0x4F03}, //109 #CJK UNIFIED IDEOGRAPH + {0x81AE, 0x4F04}, //110 #CJK UNIFIED IDEOGRAPH + {0x81AF, 0x4F05}, //111 #CJK UNIFIED IDEOGRAPH + {0x81B0, 0x4F06}, //112 #CJK UNIFIED IDEOGRAPH + {0x81B1, 0x4F07}, //113 #CJK UNIFIED IDEOGRAPH + {0x81B2, 0x4F08}, //114 #CJK UNIFIED IDEOGRAPH + {0x81B3, 0x4F0B}, //115 #CJK UNIFIED IDEOGRAPH + {0x81B4, 0x4F0C}, //116 #CJK UNIFIED IDEOGRAPH + {0x81B5, 0x4F12}, //117 #CJK UNIFIED IDEOGRAPH + {0x81B6, 0x4F13}, //118 #CJK UNIFIED IDEOGRAPH + {0x81B7, 0x4F14}, //119 #CJK UNIFIED IDEOGRAPH + {0x81B8, 0x4F15}, //120 #CJK UNIFIED IDEOGRAPH + {0x81B9, 0x4F16}, //121 #CJK UNIFIED IDEOGRAPH + {0x81BA, 0x4F1C}, //122 #CJK UNIFIED IDEOGRAPH + {0x81BB, 0x4F1D}, //123 #CJK UNIFIED IDEOGRAPH + {0x81BC, 0x4F21}, //124 #CJK UNIFIED IDEOGRAPH + {0x81BD, 0x4F23}, //125 #CJK UNIFIED IDEOGRAPH + {0x81BE, 0x4F28}, //126 #CJK UNIFIED IDEOGRAPH + {0x81BF, 0x4F29}, //127 #CJK UNIFIED IDEOGRAPH + {0x81C0, 0x4F2C}, //128 #CJK UNIFIED IDEOGRAPH + {0x81C1, 0x4F2D}, //129 #CJK UNIFIED IDEOGRAPH + {0x81C2, 0x4F2E}, //130 #CJK UNIFIED IDEOGRAPH + {0x81C3, 0x4F31}, //131 #CJK UNIFIED IDEOGRAPH + {0x81C4, 0x4F33}, //132 #CJK UNIFIED IDEOGRAPH + {0x81C5, 0x4F35}, //133 #CJK UNIFIED IDEOGRAPH + {0x81C6, 0x4F37}, //134 #CJK UNIFIED IDEOGRAPH + {0x81C7, 0x4F39}, //135 #CJK UNIFIED IDEOGRAPH + {0x81C8, 0x4F3B}, //136 #CJK UNIFIED IDEOGRAPH + {0x81C9, 0x4F3E}, //137 #CJK UNIFIED IDEOGRAPH + {0x81CA, 0x4F3F}, //138 #CJK UNIFIED IDEOGRAPH + {0x81CB, 0x4F40}, //139 #CJK UNIFIED IDEOGRAPH + {0x81CC, 0x4F41}, //140 #CJK UNIFIED IDEOGRAPH + {0x81CD, 0x4F42}, //141 #CJK UNIFIED IDEOGRAPH + {0x81CE, 0x4F44}, //142 #CJK UNIFIED IDEOGRAPH + {0x81CF, 0x4F45}, //143 #CJK UNIFIED IDEOGRAPH + {0x81D0, 0x4F47}, //144 #CJK UNIFIED IDEOGRAPH + {0x81D1, 0x4F48}, //145 #CJK UNIFIED IDEOGRAPH + {0x81D2, 0x4F49}, //146 #CJK UNIFIED IDEOGRAPH + {0x81D3, 0x4F4A}, //147 #CJK UNIFIED IDEOGRAPH + {0x81D4, 0x4F4B}, //148 #CJK UNIFIED IDEOGRAPH + {0x81D5, 0x4F4C}, //149 #CJK UNIFIED IDEOGRAPH + {0x81D6, 0x4F52}, //150 #CJK UNIFIED IDEOGRAPH + {0x81D7, 0x4F54}, //151 #CJK UNIFIED IDEOGRAPH + {0x81D8, 0x4F56}, //152 #CJK UNIFIED IDEOGRAPH + {0x81D9, 0x4F61}, //153 #CJK UNIFIED IDEOGRAPH + {0x81DA, 0x4F62}, //154 #CJK UNIFIED IDEOGRAPH + {0x81DB, 0x4F66}, //155 #CJK UNIFIED IDEOGRAPH + {0x81DC, 0x4F68}, //156 #CJK UNIFIED IDEOGRAPH + {0x81DD, 0x4F6A}, //157 #CJK UNIFIED IDEOGRAPH + {0x81DE, 0x4F6B}, //158 #CJK UNIFIED IDEOGRAPH + {0x81DF, 0x4F6D}, //159 #CJK UNIFIED IDEOGRAPH + {0x81E0, 0x4F6E}, //160 #CJK UNIFIED IDEOGRAPH + {0x81E1, 0x4F71}, //161 #CJK UNIFIED IDEOGRAPH + {0x81E2, 0x4F72}, //162 #CJK UNIFIED IDEOGRAPH + {0x81E3, 0x4F75}, //163 #CJK UNIFIED IDEOGRAPH + {0x81E4, 0x4F77}, //164 #CJK UNIFIED IDEOGRAPH + {0x81E5, 0x4F78}, //165 #CJK UNIFIED IDEOGRAPH + {0x81E6, 0x4F79}, //166 #CJK UNIFIED IDEOGRAPH + {0x81E7, 0x4F7A}, //167 #CJK UNIFIED IDEOGRAPH + {0x81E8, 0x4F7D}, //168 #CJK UNIFIED IDEOGRAPH + {0x81E9, 0x4F80}, //169 #CJK UNIFIED IDEOGRAPH + {0x81EA, 0x4F81}, //170 #CJK UNIFIED IDEOGRAPH + {0x81EB, 0x4F82}, //171 #CJK UNIFIED IDEOGRAPH + {0x81EC, 0x4F85}, //172 #CJK UNIFIED IDEOGRAPH + {0x81ED, 0x4F86}, //173 #CJK UNIFIED IDEOGRAPH + {0x81EE, 0x4F87}, //174 #CJK UNIFIED IDEOGRAPH + {0x81EF, 0x4F8A}, //175 #CJK UNIFIED IDEOGRAPH + {0x81F0, 0x4F8C}, //176 #CJK UNIFIED IDEOGRAPH + {0x81F1, 0x4F8E}, //177 #CJK UNIFIED IDEOGRAPH + {0x81F2, 0x4F90}, //178 #CJK UNIFIED IDEOGRAPH + {0x81F3, 0x4F92}, //179 #CJK UNIFIED IDEOGRAPH + {0x81F4, 0x4F93}, //180 #CJK UNIFIED IDEOGRAPH + {0x81F5, 0x4F95}, //181 #CJK UNIFIED IDEOGRAPH + {0x81F6, 0x4F96}, //182 #CJK UNIFIED IDEOGRAPH + {0x81F7, 0x4F98}, //183 #CJK UNIFIED IDEOGRAPH + {0x81F8, 0x4F99}, //184 #CJK UNIFIED IDEOGRAPH + {0x81F9, 0x4F9A}, //185 #CJK UNIFIED IDEOGRAPH + {0x81FA, 0x4F9C}, //186 #CJK UNIFIED IDEOGRAPH + {0x81FB, 0x4F9E}, //187 #CJK UNIFIED IDEOGRAPH + {0x81FC, 0x4F9F}, //188 #CJK UNIFIED IDEOGRAPH + {0x81FD, 0x4FA1}, //189 #CJK UNIFIED IDEOGRAPH + {0x81FE, 0x4FA2}, //190 #CJK UNIFIED IDEOGRAPH + {0x8240, 0x4FA4}, //191 #CJK UNIFIED IDEOGRAPH + {0x8241, 0x4FAB}, //192 #CJK UNIFIED IDEOGRAPH + {0x8242, 0x4FAD}, //193 #CJK UNIFIED IDEOGRAPH + {0x8243, 0x4FB0}, //194 #CJK UNIFIED IDEOGRAPH + {0x8244, 0x4FB1}, //195 #CJK UNIFIED IDEOGRAPH + {0x8245, 0x4FB2}, //196 #CJK UNIFIED IDEOGRAPH + {0x8246, 0x4FB3}, //197 #CJK UNIFIED IDEOGRAPH + {0x8247, 0x4FB4}, //198 #CJK UNIFIED IDEOGRAPH + {0x8248, 0x4FB6}, //199 #CJK UNIFIED IDEOGRAPH + {0x8249, 0x4FB7}, //200 #CJK UNIFIED IDEOGRAPH + {0x824A, 0x4FB8}, //201 #CJK UNIFIED IDEOGRAPH + {0x824B, 0x4FB9}, //202 #CJK UNIFIED IDEOGRAPH + {0x824C, 0x4FBA}, //203 #CJK UNIFIED IDEOGRAPH + {0x824D, 0x4FBB}, //204 #CJK UNIFIED IDEOGRAPH + {0x824E, 0x4FBC}, //205 #CJK UNIFIED IDEOGRAPH + {0x824F, 0x4FBD}, //206 #CJK UNIFIED IDEOGRAPH + {0x8250, 0x4FBE}, //207 #CJK UNIFIED IDEOGRAPH + {0x8251, 0x4FC0}, //208 #CJK UNIFIED IDEOGRAPH + {0x8252, 0x4FC1}, //209 #CJK UNIFIED IDEOGRAPH + {0x8253, 0x4FC2}, //210 #CJK UNIFIED IDEOGRAPH + {0x8254, 0x4FC6}, //211 #CJK UNIFIED IDEOGRAPH + {0x8255, 0x4FC7}, //212 #CJK UNIFIED IDEOGRAPH + {0x8256, 0x4FC8}, //213 #CJK UNIFIED IDEOGRAPH + {0x8257, 0x4FC9}, //214 #CJK UNIFIED IDEOGRAPH + {0x8258, 0x4FCB}, //215 #CJK UNIFIED IDEOGRAPH + {0x8259, 0x4FCC}, //216 #CJK UNIFIED IDEOGRAPH + {0x825A, 0x4FCD}, //217 #CJK UNIFIED IDEOGRAPH + {0x825B, 0x4FD2}, //218 #CJK UNIFIED IDEOGRAPH + {0x825C, 0x4FD3}, //219 #CJK UNIFIED IDEOGRAPH + {0x825D, 0x4FD4}, //220 #CJK UNIFIED IDEOGRAPH + {0x825E, 0x4FD5}, //221 #CJK UNIFIED IDEOGRAPH + {0x825F, 0x4FD6}, //222 #CJK UNIFIED IDEOGRAPH + {0x8260, 0x4FD9}, //223 #CJK UNIFIED IDEOGRAPH + {0x8261, 0x4FDB}, //224 #CJK UNIFIED IDEOGRAPH + {0x8262, 0x4FE0}, //225 #CJK UNIFIED IDEOGRAPH + {0x8263, 0x4FE2}, //226 #CJK UNIFIED IDEOGRAPH + {0x8264, 0x4FE4}, //227 #CJK UNIFIED IDEOGRAPH + {0x8265, 0x4FE5}, //228 #CJK UNIFIED IDEOGRAPH + {0x8266, 0x4FE7}, //229 #CJK UNIFIED IDEOGRAPH + {0x8267, 0x4FEB}, //230 #CJK UNIFIED IDEOGRAPH + {0x8268, 0x4FEC}, //231 #CJK UNIFIED IDEOGRAPH + {0x8269, 0x4FF0}, //232 #CJK UNIFIED IDEOGRAPH + {0x826A, 0x4FF2}, //233 #CJK UNIFIED IDEOGRAPH + {0x826B, 0x4FF4}, //234 #CJK UNIFIED IDEOGRAPH + {0x826C, 0x4FF5}, //235 #CJK UNIFIED IDEOGRAPH + {0x826D, 0x4FF6}, //236 #CJK UNIFIED IDEOGRAPH + {0x826E, 0x4FF7}, //237 #CJK UNIFIED IDEOGRAPH + {0x826F, 0x4FF9}, //238 #CJK UNIFIED IDEOGRAPH + {0x8270, 0x4FFB}, //239 #CJK UNIFIED IDEOGRAPH + {0x8271, 0x4FFC}, //240 #CJK UNIFIED IDEOGRAPH + {0x8272, 0x4FFD}, //241 #CJK UNIFIED IDEOGRAPH + {0x8273, 0x4FFF}, //242 #CJK UNIFIED IDEOGRAPH + {0x8274, 0x5000}, //243 #CJK UNIFIED IDEOGRAPH + {0x8275, 0x5001}, //244 #CJK UNIFIED IDEOGRAPH + {0x8276, 0x5002}, //245 #CJK UNIFIED IDEOGRAPH + {0x8277, 0x5003}, //246 #CJK UNIFIED IDEOGRAPH + {0x8278, 0x5004}, //247 #CJK UNIFIED IDEOGRAPH + {0x8279, 0x5005}, //248 #CJK UNIFIED IDEOGRAPH + {0x827A, 0x5006}, //249 #CJK UNIFIED IDEOGRAPH + {0x827B, 0x5007}, //250 #CJK UNIFIED IDEOGRAPH + {0x827C, 0x5008}, //251 #CJK UNIFIED IDEOGRAPH + {0x827D, 0x5009}, //252 #CJK UNIFIED IDEOGRAPH + {0x827E, 0x500A}, //253 #CJK UNIFIED IDEOGRAPH + {0x8280, 0x500B}, //254 #CJK UNIFIED IDEOGRAPH + {0x8281, 0x500E}, //255 #CJK UNIFIED IDEOGRAPH + {0x8282, 0x5010}, //256 #CJK UNIFIED IDEOGRAPH + {0x8283, 0x5011}, //257 #CJK UNIFIED IDEOGRAPH + {0x8284, 0x5013}, //258 #CJK UNIFIED IDEOGRAPH + {0x8285, 0x5015}, //259 #CJK UNIFIED IDEOGRAPH + {0x8286, 0x5016}, //260 #CJK UNIFIED IDEOGRAPH + {0x8287, 0x5017}, //261 #CJK UNIFIED IDEOGRAPH + {0x8288, 0x501B}, //262 #CJK UNIFIED IDEOGRAPH + {0x8289, 0x501D}, //263 #CJK UNIFIED IDEOGRAPH + {0x828A, 0x501E}, //264 #CJK UNIFIED IDEOGRAPH + {0x828B, 0x5020}, //265 #CJK UNIFIED IDEOGRAPH + {0x828C, 0x5022}, //266 #CJK UNIFIED IDEOGRAPH + {0x828D, 0x5023}, //267 #CJK UNIFIED IDEOGRAPH + {0x828E, 0x5024}, //268 #CJK UNIFIED IDEOGRAPH + {0x828F, 0x5027}, //269 #CJK UNIFIED IDEOGRAPH + {0x8290, 0x502B}, //270 #CJK UNIFIED IDEOGRAPH + {0x8291, 0x502F}, //271 #CJK UNIFIED IDEOGRAPH + {0x8292, 0x5030}, //272 #CJK UNIFIED IDEOGRAPH + {0x8293, 0x5031}, //273 #CJK UNIFIED IDEOGRAPH + {0x8294, 0x5032}, //274 #CJK UNIFIED IDEOGRAPH + {0x8295, 0x5033}, //275 #CJK UNIFIED IDEOGRAPH + {0x8296, 0x5034}, //276 #CJK UNIFIED IDEOGRAPH + {0x8297, 0x5035}, //277 #CJK UNIFIED IDEOGRAPH + {0x8298, 0x5036}, //278 #CJK UNIFIED IDEOGRAPH + {0x8299, 0x5037}, //279 #CJK UNIFIED IDEOGRAPH + {0x829A, 0x5038}, //280 #CJK UNIFIED IDEOGRAPH + {0x829B, 0x5039}, //281 #CJK UNIFIED IDEOGRAPH + {0x829C, 0x503B}, //282 #CJK UNIFIED IDEOGRAPH + {0x829D, 0x503D}, //283 #CJK UNIFIED IDEOGRAPH + {0x829E, 0x503F}, //284 #CJK UNIFIED IDEOGRAPH + {0x829F, 0x5040}, //285 #CJK UNIFIED IDEOGRAPH + {0x82A0, 0x5041}, //286 #CJK UNIFIED IDEOGRAPH + {0x82A1, 0x5042}, //287 #CJK UNIFIED IDEOGRAPH + {0x82A2, 0x5044}, //288 #CJK UNIFIED IDEOGRAPH + {0x82A3, 0x5045}, //289 #CJK UNIFIED IDEOGRAPH + {0x82A4, 0x5046}, //290 #CJK UNIFIED IDEOGRAPH + {0x82A5, 0x5049}, //291 #CJK UNIFIED IDEOGRAPH + {0x82A6, 0x504A}, //292 #CJK UNIFIED IDEOGRAPH + {0x82A7, 0x504B}, //293 #CJK UNIFIED IDEOGRAPH + {0x82A8, 0x504D}, //294 #CJK UNIFIED IDEOGRAPH + {0x82A9, 0x5050}, //295 #CJK UNIFIED IDEOGRAPH + {0x82AA, 0x5051}, //296 #CJK UNIFIED IDEOGRAPH + {0x82AB, 0x5052}, //297 #CJK UNIFIED IDEOGRAPH + {0x82AC, 0x5053}, //298 #CJK UNIFIED IDEOGRAPH + {0x82AD, 0x5054}, //299 #CJK UNIFIED IDEOGRAPH + {0x82AE, 0x5056}, //300 #CJK UNIFIED IDEOGRAPH + {0x82AF, 0x5057}, //301 #CJK UNIFIED IDEOGRAPH + {0x82B0, 0x5058}, //302 #CJK UNIFIED IDEOGRAPH + {0x82B1, 0x5059}, //303 #CJK UNIFIED IDEOGRAPH + {0x82B2, 0x505B}, //304 #CJK UNIFIED IDEOGRAPH + {0x82B3, 0x505D}, //305 #CJK UNIFIED IDEOGRAPH + {0x82B4, 0x505E}, //306 #CJK UNIFIED IDEOGRAPH + {0x82B5, 0x505F}, //307 #CJK UNIFIED IDEOGRAPH + {0x82B6, 0x5060}, //308 #CJK UNIFIED IDEOGRAPH + {0x82B7, 0x5061}, //309 #CJK UNIFIED IDEOGRAPH + {0x82B8, 0x5062}, //310 #CJK UNIFIED IDEOGRAPH + {0x82B9, 0x5063}, //311 #CJK UNIFIED IDEOGRAPH + {0x82BA, 0x5064}, //312 #CJK UNIFIED IDEOGRAPH + {0x82BB, 0x5066}, //313 #CJK UNIFIED IDEOGRAPH + {0x82BC, 0x5067}, //314 #CJK UNIFIED IDEOGRAPH + {0x82BD, 0x5068}, //315 #CJK UNIFIED IDEOGRAPH + {0x82BE, 0x5069}, //316 #CJK UNIFIED IDEOGRAPH + {0x82BF, 0x506A}, //317 #CJK UNIFIED IDEOGRAPH + {0x82C0, 0x506B}, //318 #CJK UNIFIED IDEOGRAPH + {0x82C1, 0x506D}, //319 #CJK UNIFIED IDEOGRAPH + {0x82C2, 0x506E}, //320 #CJK UNIFIED IDEOGRAPH + {0x82C3, 0x506F}, //321 #CJK UNIFIED IDEOGRAPH + {0x82C4, 0x5070}, //322 #CJK UNIFIED IDEOGRAPH + {0x82C5, 0x5071}, //323 #CJK UNIFIED IDEOGRAPH + {0x82C6, 0x5072}, //324 #CJK UNIFIED IDEOGRAPH + {0x82C7, 0x5073}, //325 #CJK UNIFIED IDEOGRAPH + {0x82C8, 0x5074}, //326 #CJK UNIFIED IDEOGRAPH + {0x82C9, 0x5075}, //327 #CJK UNIFIED IDEOGRAPH + {0x82CA, 0x5078}, //328 #CJK UNIFIED IDEOGRAPH + {0x82CB, 0x5079}, //329 #CJK UNIFIED IDEOGRAPH + {0x82CC, 0x507A}, //330 #CJK UNIFIED IDEOGRAPH + {0x82CD, 0x507C}, //331 #CJK UNIFIED IDEOGRAPH + {0x82CE, 0x507D}, //332 #CJK UNIFIED IDEOGRAPH + {0x82CF, 0x5081}, //333 #CJK UNIFIED IDEOGRAPH + {0x82D0, 0x5082}, //334 #CJK UNIFIED IDEOGRAPH + {0x82D1, 0x5083}, //335 #CJK UNIFIED IDEOGRAPH + {0x82D2, 0x5084}, //336 #CJK UNIFIED IDEOGRAPH + {0x82D3, 0x5086}, //337 #CJK UNIFIED IDEOGRAPH + {0x82D4, 0x5087}, //338 #CJK UNIFIED IDEOGRAPH + {0x82D5, 0x5089}, //339 #CJK UNIFIED IDEOGRAPH + {0x82D6, 0x508A}, //340 #CJK UNIFIED IDEOGRAPH + {0x82D7, 0x508B}, //341 #CJK UNIFIED IDEOGRAPH + {0x82D8, 0x508C}, //342 #CJK UNIFIED IDEOGRAPH + {0x82D9, 0x508E}, //343 #CJK UNIFIED IDEOGRAPH + {0x82DA, 0x508F}, //344 #CJK UNIFIED IDEOGRAPH + {0x82DB, 0x5090}, //345 #CJK UNIFIED IDEOGRAPH + {0x82DC, 0x5091}, //346 #CJK UNIFIED IDEOGRAPH + {0x82DD, 0x5092}, //347 #CJK UNIFIED IDEOGRAPH + {0x82DE, 0x5093}, //348 #CJK UNIFIED IDEOGRAPH + {0x82DF, 0x5094}, //349 #CJK UNIFIED IDEOGRAPH + {0x82E0, 0x5095}, //350 #CJK UNIFIED IDEOGRAPH + {0x82E1, 0x5096}, //351 #CJK UNIFIED IDEOGRAPH + {0x82E2, 0x5097}, //352 #CJK UNIFIED IDEOGRAPH + {0x82E3, 0x5098}, //353 #CJK UNIFIED IDEOGRAPH + {0x82E4, 0x5099}, //354 #CJK UNIFIED IDEOGRAPH + {0x82E5, 0x509A}, //355 #CJK UNIFIED IDEOGRAPH + {0x82E6, 0x509B}, //356 #CJK UNIFIED IDEOGRAPH + {0x82E7, 0x509C}, //357 #CJK UNIFIED IDEOGRAPH + {0x82E8, 0x509D}, //358 #CJK UNIFIED IDEOGRAPH + {0x82E9, 0x509E}, //359 #CJK UNIFIED IDEOGRAPH + {0x82EA, 0x509F}, //360 #CJK UNIFIED IDEOGRAPH + {0x82EB, 0x50A0}, //361 #CJK UNIFIED IDEOGRAPH + {0x82EC, 0x50A1}, //362 #CJK UNIFIED IDEOGRAPH + {0x82ED, 0x50A2}, //363 #CJK UNIFIED IDEOGRAPH + {0x82EE, 0x50A4}, //364 #CJK UNIFIED IDEOGRAPH + {0x82EF, 0x50A6}, //365 #CJK UNIFIED IDEOGRAPH + {0x82F0, 0x50AA}, //366 #CJK UNIFIED IDEOGRAPH + {0x82F1, 0x50AB}, //367 #CJK UNIFIED IDEOGRAPH + {0x82F2, 0x50AD}, //368 #CJK UNIFIED IDEOGRAPH + {0x82F3, 0x50AE}, //369 #CJK UNIFIED IDEOGRAPH + {0x82F4, 0x50AF}, //370 #CJK UNIFIED IDEOGRAPH + {0x82F5, 0x50B0}, //371 #CJK UNIFIED IDEOGRAPH + {0x82F6, 0x50B1}, //372 #CJK UNIFIED IDEOGRAPH + {0x82F7, 0x50B3}, //373 #CJK UNIFIED IDEOGRAPH + {0x82F8, 0x50B4}, //374 #CJK UNIFIED IDEOGRAPH + {0x82F9, 0x50B5}, //375 #CJK UNIFIED IDEOGRAPH + {0x82FA, 0x50B6}, //376 #CJK UNIFIED IDEOGRAPH + {0x82FB, 0x50B7}, //377 #CJK UNIFIED IDEOGRAPH + {0x82FC, 0x50B8}, //378 #CJK UNIFIED IDEOGRAPH + {0x82FD, 0x50B9}, //379 #CJK UNIFIED IDEOGRAPH + {0x82FE, 0x50BC}, //380 #CJK UNIFIED IDEOGRAPH + {0x8340, 0x50BD}, //381 #CJK UNIFIED IDEOGRAPH + {0x8341, 0x50BE}, //382 #CJK UNIFIED IDEOGRAPH + {0x8342, 0x50BF}, //383 #CJK UNIFIED IDEOGRAPH + {0x8343, 0x50C0}, //384 #CJK UNIFIED IDEOGRAPH + {0x8344, 0x50C1}, //385 #CJK UNIFIED IDEOGRAPH + {0x8345, 0x50C2}, //386 #CJK UNIFIED IDEOGRAPH + {0x8346, 0x50C3}, //387 #CJK UNIFIED IDEOGRAPH + {0x8347, 0x50C4}, //388 #CJK UNIFIED IDEOGRAPH + {0x8348, 0x50C5}, //389 #CJK UNIFIED IDEOGRAPH + {0x8349, 0x50C6}, //390 #CJK UNIFIED IDEOGRAPH + {0x834A, 0x50C7}, //391 #CJK UNIFIED IDEOGRAPH + {0x834B, 0x50C8}, //392 #CJK UNIFIED IDEOGRAPH + {0x834C, 0x50C9}, //393 #CJK UNIFIED IDEOGRAPH + {0x834D, 0x50CA}, //394 #CJK UNIFIED IDEOGRAPH + {0x834E, 0x50CB}, //395 #CJK UNIFIED IDEOGRAPH + {0x834F, 0x50CC}, //396 #CJK UNIFIED IDEOGRAPH + {0x8350, 0x50CD}, //397 #CJK UNIFIED IDEOGRAPH + {0x8351, 0x50CE}, //398 #CJK UNIFIED IDEOGRAPH + {0x8352, 0x50D0}, //399 #CJK UNIFIED IDEOGRAPH + {0x8353, 0x50D1}, //400 #CJK UNIFIED IDEOGRAPH + {0x8354, 0x50D2}, //401 #CJK UNIFIED IDEOGRAPH + {0x8355, 0x50D3}, //402 #CJK UNIFIED IDEOGRAPH + {0x8356, 0x50D4}, //403 #CJK UNIFIED IDEOGRAPH + {0x8357, 0x50D5}, //404 #CJK UNIFIED IDEOGRAPH + {0x8358, 0x50D7}, //405 #CJK UNIFIED IDEOGRAPH + {0x8359, 0x50D8}, //406 #CJK UNIFIED IDEOGRAPH + {0x835A, 0x50D9}, //407 #CJK UNIFIED IDEOGRAPH + {0x835B, 0x50DB}, //408 #CJK UNIFIED IDEOGRAPH + {0x835C, 0x50DC}, //409 #CJK UNIFIED IDEOGRAPH + {0x835D, 0x50DD}, //410 #CJK UNIFIED IDEOGRAPH + {0x835E, 0x50DE}, //411 #CJK UNIFIED IDEOGRAPH + {0x835F, 0x50DF}, //412 #CJK UNIFIED IDEOGRAPH + {0x8360, 0x50E0}, //413 #CJK UNIFIED IDEOGRAPH + {0x8361, 0x50E1}, //414 #CJK UNIFIED IDEOGRAPH + {0x8362, 0x50E2}, //415 #CJK UNIFIED IDEOGRAPH + {0x8363, 0x50E3}, //416 #CJK UNIFIED IDEOGRAPH + {0x8364, 0x50E4}, //417 #CJK UNIFIED IDEOGRAPH + {0x8365, 0x50E5}, //418 #CJK UNIFIED IDEOGRAPH + {0x8366, 0x50E8}, //419 #CJK UNIFIED IDEOGRAPH + {0x8367, 0x50E9}, //420 #CJK UNIFIED IDEOGRAPH + {0x8368, 0x50EA}, //421 #CJK UNIFIED IDEOGRAPH + {0x8369, 0x50EB}, //422 #CJK UNIFIED IDEOGRAPH + {0x836A, 0x50EF}, //423 #CJK UNIFIED IDEOGRAPH + {0x836B, 0x50F0}, //424 #CJK UNIFIED IDEOGRAPH + {0x836C, 0x50F1}, //425 #CJK UNIFIED IDEOGRAPH + {0x836D, 0x50F2}, //426 #CJK UNIFIED IDEOGRAPH + {0x836E, 0x50F4}, //427 #CJK UNIFIED IDEOGRAPH + {0x836F, 0x50F6}, //428 #CJK UNIFIED IDEOGRAPH + {0x8370, 0x50F7}, //429 #CJK UNIFIED IDEOGRAPH + {0x8371, 0x50F8}, //430 #CJK UNIFIED IDEOGRAPH + {0x8372, 0x50F9}, //431 #CJK UNIFIED IDEOGRAPH + {0x8373, 0x50FA}, //432 #CJK UNIFIED IDEOGRAPH + {0x8374, 0x50FC}, //433 #CJK UNIFIED IDEOGRAPH + {0x8375, 0x50FD}, //434 #CJK UNIFIED IDEOGRAPH + {0x8376, 0x50FE}, //435 #CJK UNIFIED IDEOGRAPH + {0x8377, 0x50FF}, //436 #CJK UNIFIED IDEOGRAPH + {0x8378, 0x5100}, //437 #CJK UNIFIED IDEOGRAPH + {0x8379, 0x5101}, //438 #CJK UNIFIED IDEOGRAPH + {0x837A, 0x5102}, //439 #CJK UNIFIED IDEOGRAPH + {0x837B, 0x5103}, //440 #CJK UNIFIED IDEOGRAPH + {0x837C, 0x5104}, //441 #CJK UNIFIED IDEOGRAPH + {0x837D, 0x5105}, //442 #CJK UNIFIED IDEOGRAPH + {0x837E, 0x5108}, //443 #CJK UNIFIED IDEOGRAPH + {0x8380, 0x5109}, //444 #CJK UNIFIED IDEOGRAPH + {0x8381, 0x510A}, //445 #CJK UNIFIED IDEOGRAPH + {0x8382, 0x510C}, //446 #CJK UNIFIED IDEOGRAPH + {0x8383, 0x510D}, //447 #CJK UNIFIED IDEOGRAPH + {0x8384, 0x510E}, //448 #CJK UNIFIED IDEOGRAPH + {0x8385, 0x510F}, //449 #CJK UNIFIED IDEOGRAPH + {0x8386, 0x5110}, //450 #CJK UNIFIED IDEOGRAPH + {0x8387, 0x5111}, //451 #CJK UNIFIED IDEOGRAPH + {0x8388, 0x5113}, //452 #CJK UNIFIED IDEOGRAPH + {0x8389, 0x5114}, //453 #CJK UNIFIED IDEOGRAPH + {0x838A, 0x5115}, //454 #CJK UNIFIED IDEOGRAPH + {0x838B, 0x5116}, //455 #CJK UNIFIED IDEOGRAPH + {0x838C, 0x5117}, //456 #CJK UNIFIED IDEOGRAPH + {0x838D, 0x5118}, //457 #CJK UNIFIED IDEOGRAPH + {0x838E, 0x5119}, //458 #CJK UNIFIED IDEOGRAPH + {0x838F, 0x511A}, //459 #CJK UNIFIED IDEOGRAPH + {0x8390, 0x511B}, //460 #CJK UNIFIED IDEOGRAPH + {0x8391, 0x511C}, //461 #CJK UNIFIED IDEOGRAPH + {0x8392, 0x511D}, //462 #CJK UNIFIED IDEOGRAPH + {0x8393, 0x511E}, //463 #CJK UNIFIED IDEOGRAPH + {0x8394, 0x511F}, //464 #CJK UNIFIED IDEOGRAPH + {0x8395, 0x5120}, //465 #CJK UNIFIED IDEOGRAPH + {0x8396, 0x5122}, //466 #CJK UNIFIED IDEOGRAPH + {0x8397, 0x5123}, //467 #CJK UNIFIED IDEOGRAPH + {0x8398, 0x5124}, //468 #CJK UNIFIED IDEOGRAPH + {0x8399, 0x5125}, //469 #CJK UNIFIED IDEOGRAPH + {0x839A, 0x5126}, //470 #CJK UNIFIED IDEOGRAPH + {0x839B, 0x5127}, //471 #CJK UNIFIED IDEOGRAPH + {0x839C, 0x5128}, //472 #CJK UNIFIED IDEOGRAPH + {0x839D, 0x5129}, //473 #CJK UNIFIED IDEOGRAPH + {0x839E, 0x512A}, //474 #CJK UNIFIED IDEOGRAPH + {0x839F, 0x512B}, //475 #CJK UNIFIED IDEOGRAPH + {0x83A0, 0x512C}, //476 #CJK UNIFIED IDEOGRAPH + {0x83A1, 0x512D}, //477 #CJK UNIFIED IDEOGRAPH + {0x83A2, 0x512E}, //478 #CJK UNIFIED IDEOGRAPH + {0x83A3, 0x512F}, //479 #CJK UNIFIED IDEOGRAPH + {0x83A4, 0x5130}, //480 #CJK UNIFIED IDEOGRAPH + {0x83A5, 0x5131}, //481 #CJK UNIFIED IDEOGRAPH + {0x83A6, 0x5132}, //482 #CJK UNIFIED IDEOGRAPH + {0x83A7, 0x5133}, //483 #CJK UNIFIED IDEOGRAPH + {0x83A8, 0x5134}, //484 #CJK UNIFIED IDEOGRAPH + {0x83A9, 0x5135}, //485 #CJK UNIFIED IDEOGRAPH + {0x83AA, 0x5136}, //486 #CJK UNIFIED IDEOGRAPH + {0x83AB, 0x5137}, //487 #CJK UNIFIED IDEOGRAPH + {0x83AC, 0x5138}, //488 #CJK UNIFIED IDEOGRAPH + {0x83AD, 0x5139}, //489 #CJK UNIFIED IDEOGRAPH + {0x83AE, 0x513A}, //490 #CJK UNIFIED IDEOGRAPH + {0x83AF, 0x513B}, //491 #CJK UNIFIED IDEOGRAPH + {0x83B0, 0x513C}, //492 #CJK UNIFIED IDEOGRAPH + {0x83B1, 0x513D}, //493 #CJK UNIFIED IDEOGRAPH + {0x83B2, 0x513E}, //494 #CJK UNIFIED IDEOGRAPH + {0x83B3, 0x5142}, //495 #CJK UNIFIED IDEOGRAPH + {0x83B4, 0x5147}, //496 #CJK UNIFIED IDEOGRAPH + {0x83B5, 0x514A}, //497 #CJK UNIFIED IDEOGRAPH + {0x83B6, 0x514C}, //498 #CJK UNIFIED IDEOGRAPH + {0x83B7, 0x514E}, //499 #CJK UNIFIED IDEOGRAPH + {0x83B8, 0x514F}, //500 #CJK UNIFIED IDEOGRAPH + {0x83B9, 0x5150}, //501 #CJK UNIFIED IDEOGRAPH + {0x83BA, 0x5152}, //502 #CJK UNIFIED IDEOGRAPH + {0x83BB, 0x5153}, //503 #CJK UNIFIED IDEOGRAPH + {0x83BC, 0x5157}, //504 #CJK UNIFIED IDEOGRAPH + {0x83BD, 0x5158}, //505 #CJK UNIFIED IDEOGRAPH + {0x83BE, 0x5159}, //506 #CJK UNIFIED IDEOGRAPH + {0x83BF, 0x515B}, //507 #CJK UNIFIED IDEOGRAPH + {0x83C0, 0x515D}, //508 #CJK UNIFIED IDEOGRAPH + {0x83C1, 0x515E}, //509 #CJK UNIFIED IDEOGRAPH + {0x83C2, 0x515F}, //510 #CJK UNIFIED IDEOGRAPH + {0x83C3, 0x5160}, //511 #CJK UNIFIED IDEOGRAPH + {0x83C4, 0x5161}, //512 #CJK UNIFIED IDEOGRAPH + {0x83C5, 0x5163}, //513 #CJK UNIFIED IDEOGRAPH + {0x83C6, 0x5164}, //514 #CJK UNIFIED IDEOGRAPH + {0x83C7, 0x5166}, //515 #CJK UNIFIED IDEOGRAPH + {0x83C8, 0x5167}, //516 #CJK UNIFIED IDEOGRAPH + {0x83C9, 0x5169}, //517 #CJK UNIFIED IDEOGRAPH + {0x83CA, 0x516A}, //518 #CJK UNIFIED IDEOGRAPH + {0x83CB, 0x516F}, //519 #CJK UNIFIED IDEOGRAPH + {0x83CC, 0x5172}, //520 #CJK UNIFIED IDEOGRAPH + {0x83CD, 0x517A}, //521 #CJK UNIFIED IDEOGRAPH + {0x83CE, 0x517E}, //522 #CJK UNIFIED IDEOGRAPH + {0x83CF, 0x517F}, //523 #CJK UNIFIED IDEOGRAPH + {0x83D0, 0x5183}, //524 #CJK UNIFIED IDEOGRAPH + {0x83D1, 0x5184}, //525 #CJK UNIFIED IDEOGRAPH + {0x83D2, 0x5186}, //526 #CJK UNIFIED IDEOGRAPH + {0x83D3, 0x5187}, //527 #CJK UNIFIED IDEOGRAPH + {0x83D4, 0x518A}, //528 #CJK UNIFIED IDEOGRAPH + {0x83D5, 0x518B}, //529 #CJK UNIFIED IDEOGRAPH + {0x83D6, 0x518E}, //530 #CJK UNIFIED IDEOGRAPH + {0x83D7, 0x518F}, //531 #CJK UNIFIED IDEOGRAPH + {0x83D8, 0x5190}, //532 #CJK UNIFIED IDEOGRAPH + {0x83D9, 0x5191}, //533 #CJK UNIFIED IDEOGRAPH + {0x83DA, 0x5193}, //534 #CJK UNIFIED IDEOGRAPH + {0x83DB, 0x5194}, //535 #CJK UNIFIED IDEOGRAPH + {0x83DC, 0x5198}, //536 #CJK UNIFIED IDEOGRAPH + {0x83DD, 0x519A}, //537 #CJK UNIFIED IDEOGRAPH + {0x83DE, 0x519D}, //538 #CJK UNIFIED IDEOGRAPH + {0x83DF, 0x519E}, //539 #CJK UNIFIED IDEOGRAPH + {0x83E0, 0x519F}, //540 #CJK UNIFIED IDEOGRAPH + {0x83E1, 0x51A1}, //541 #CJK UNIFIED IDEOGRAPH + {0x83E2, 0x51A3}, //542 #CJK UNIFIED IDEOGRAPH + {0x83E3, 0x51A6}, //543 #CJK UNIFIED IDEOGRAPH + {0x83E4, 0x51A7}, //544 #CJK UNIFIED IDEOGRAPH + {0x83E5, 0x51A8}, //545 #CJK UNIFIED IDEOGRAPH + {0x83E6, 0x51A9}, //546 #CJK UNIFIED IDEOGRAPH + {0x83E7, 0x51AA}, //547 #CJK UNIFIED IDEOGRAPH + {0x83E8, 0x51AD}, //548 #CJK UNIFIED IDEOGRAPH + {0x83E9, 0x51AE}, //549 #CJK UNIFIED IDEOGRAPH + {0x83EA, 0x51B4}, //550 #CJK UNIFIED IDEOGRAPH + {0x83EB, 0x51B8}, //551 #CJK UNIFIED IDEOGRAPH + {0x83EC, 0x51B9}, //552 #CJK UNIFIED IDEOGRAPH + {0x83ED, 0x51BA}, //553 #CJK UNIFIED IDEOGRAPH + {0x83EE, 0x51BE}, //554 #CJK UNIFIED IDEOGRAPH + {0x83EF, 0x51BF}, //555 #CJK UNIFIED IDEOGRAPH + {0x83F0, 0x51C1}, //556 #CJK UNIFIED IDEOGRAPH + {0x83F1, 0x51C2}, //557 #CJK UNIFIED IDEOGRAPH + {0x83F2, 0x51C3}, //558 #CJK UNIFIED IDEOGRAPH + {0x83F3, 0x51C5}, //559 #CJK UNIFIED IDEOGRAPH + {0x83F4, 0x51C8}, //560 #CJK UNIFIED IDEOGRAPH + {0x83F5, 0x51CA}, //561 #CJK UNIFIED IDEOGRAPH + {0x83F6, 0x51CD}, //562 #CJK UNIFIED IDEOGRAPH + {0x83F7, 0x51CE}, //563 #CJK UNIFIED IDEOGRAPH + {0x83F8, 0x51D0}, //564 #CJK UNIFIED IDEOGRAPH + {0x83F9, 0x51D2}, //565 #CJK UNIFIED IDEOGRAPH + {0x83FA, 0x51D3}, //566 #CJK UNIFIED IDEOGRAPH + {0x83FB, 0x51D4}, //567 #CJK UNIFIED IDEOGRAPH + {0x83FC, 0x51D5}, //568 #CJK UNIFIED IDEOGRAPH + {0x83FD, 0x51D6}, //569 #CJK UNIFIED IDEOGRAPH + {0x83FE, 0x51D7}, //570 #CJK UNIFIED IDEOGRAPH + {0x8440, 0x51D8}, //571 #CJK UNIFIED IDEOGRAPH + {0x8441, 0x51D9}, //572 #CJK UNIFIED IDEOGRAPH + {0x8442, 0x51DA}, //573 #CJK UNIFIED IDEOGRAPH + {0x8443, 0x51DC}, //574 #CJK UNIFIED IDEOGRAPH + {0x8444, 0x51DE}, //575 #CJK UNIFIED IDEOGRAPH + {0x8445, 0x51DF}, //576 #CJK UNIFIED IDEOGRAPH + {0x8446, 0x51E2}, //577 #CJK UNIFIED IDEOGRAPH + {0x8447, 0x51E3}, //578 #CJK UNIFIED IDEOGRAPH + {0x8448, 0x51E5}, //579 #CJK UNIFIED IDEOGRAPH + {0x8449, 0x51E6}, //580 #CJK UNIFIED IDEOGRAPH + {0x844A, 0x51E7}, //581 #CJK UNIFIED IDEOGRAPH + {0x844B, 0x51E8}, //582 #CJK UNIFIED IDEOGRAPH + {0x844C, 0x51E9}, //583 #CJK UNIFIED IDEOGRAPH + {0x844D, 0x51EA}, //584 #CJK UNIFIED IDEOGRAPH + {0x844E, 0x51EC}, //585 #CJK UNIFIED IDEOGRAPH + {0x844F, 0x51EE}, //586 #CJK UNIFIED IDEOGRAPH + {0x8450, 0x51F1}, //587 #CJK UNIFIED IDEOGRAPH + {0x8451, 0x51F2}, //588 #CJK UNIFIED IDEOGRAPH + {0x8452, 0x51F4}, //589 #CJK UNIFIED IDEOGRAPH + {0x8453, 0x51F7}, //590 #CJK UNIFIED IDEOGRAPH + {0x8454, 0x51FE}, //591 #CJK UNIFIED IDEOGRAPH + {0x8455, 0x5204}, //592 #CJK UNIFIED IDEOGRAPH + {0x8456, 0x5205}, //593 #CJK UNIFIED IDEOGRAPH + {0x8457, 0x5209}, //594 #CJK UNIFIED IDEOGRAPH + {0x8458, 0x520B}, //595 #CJK UNIFIED IDEOGRAPH + {0x8459, 0x520C}, //596 #CJK UNIFIED IDEOGRAPH + {0x845A, 0x520F}, //597 #CJK UNIFIED IDEOGRAPH + {0x845B, 0x5210}, //598 #CJK UNIFIED IDEOGRAPH + {0x845C, 0x5213}, //599 #CJK UNIFIED IDEOGRAPH + {0x845D, 0x5214}, //600 #CJK UNIFIED IDEOGRAPH + {0x845E, 0x5215}, //601 #CJK UNIFIED IDEOGRAPH + {0x845F, 0x521C}, //602 #CJK UNIFIED IDEOGRAPH + {0x8460, 0x521E}, //603 #CJK UNIFIED IDEOGRAPH + {0x8461, 0x521F}, //604 #CJK UNIFIED IDEOGRAPH + {0x8462, 0x5221}, //605 #CJK UNIFIED IDEOGRAPH + {0x8463, 0x5222}, //606 #CJK UNIFIED IDEOGRAPH + {0x8464, 0x5223}, //607 #CJK UNIFIED IDEOGRAPH + {0x8465, 0x5225}, //608 #CJK UNIFIED IDEOGRAPH + {0x8466, 0x5226}, //609 #CJK UNIFIED IDEOGRAPH + {0x8467, 0x5227}, //610 #CJK UNIFIED IDEOGRAPH + {0x8468, 0x522A}, //611 #CJK UNIFIED IDEOGRAPH + {0x8469, 0x522C}, //612 #CJK UNIFIED IDEOGRAPH + {0x846A, 0x522F}, //613 #CJK UNIFIED IDEOGRAPH + {0x846B, 0x5231}, //614 #CJK UNIFIED IDEOGRAPH + {0x846C, 0x5232}, //615 #CJK UNIFIED IDEOGRAPH + {0x846D, 0x5234}, //616 #CJK UNIFIED IDEOGRAPH + {0x846E, 0x5235}, //617 #CJK UNIFIED IDEOGRAPH + {0x846F, 0x523C}, //618 #CJK UNIFIED IDEOGRAPH + {0x8470, 0x523E}, //619 #CJK UNIFIED IDEOGRAPH + {0x8471, 0x5244}, //620 #CJK UNIFIED IDEOGRAPH + {0x8472, 0x5245}, //621 #CJK UNIFIED IDEOGRAPH + {0x8473, 0x5246}, //622 #CJK UNIFIED IDEOGRAPH + {0x8474, 0x5247}, //623 #CJK UNIFIED IDEOGRAPH + {0x8475, 0x5248}, //624 #CJK UNIFIED IDEOGRAPH + {0x8476, 0x5249}, //625 #CJK UNIFIED IDEOGRAPH + {0x8477, 0x524B}, //626 #CJK UNIFIED IDEOGRAPH + {0x8478, 0x524E}, //627 #CJK UNIFIED IDEOGRAPH + {0x8479, 0x524F}, //628 #CJK UNIFIED IDEOGRAPH + {0x847A, 0x5252}, //629 #CJK UNIFIED IDEOGRAPH + {0x847B, 0x5253}, //630 #CJK UNIFIED IDEOGRAPH + {0x847C, 0x5255}, //631 #CJK UNIFIED IDEOGRAPH + {0x847D, 0x5257}, //632 #CJK UNIFIED IDEOGRAPH + {0x847E, 0x5258}, //633 #CJK UNIFIED IDEOGRAPH + {0x8480, 0x5259}, //634 #CJK UNIFIED IDEOGRAPH + {0x8481, 0x525A}, //635 #CJK UNIFIED IDEOGRAPH + {0x8482, 0x525B}, //636 #CJK UNIFIED IDEOGRAPH + {0x8483, 0x525D}, //637 #CJK UNIFIED IDEOGRAPH + {0x8484, 0x525F}, //638 #CJK UNIFIED IDEOGRAPH + {0x8485, 0x5260}, //639 #CJK UNIFIED IDEOGRAPH + {0x8486, 0x5262}, //640 #CJK UNIFIED IDEOGRAPH + {0x8487, 0x5263}, //641 #CJK UNIFIED IDEOGRAPH + {0x8488, 0x5264}, //642 #CJK UNIFIED IDEOGRAPH + {0x8489, 0x5266}, //643 #CJK UNIFIED IDEOGRAPH + {0x848A, 0x5268}, //644 #CJK UNIFIED IDEOGRAPH + {0x848B, 0x526B}, //645 #CJK UNIFIED IDEOGRAPH + {0x848C, 0x526C}, //646 #CJK UNIFIED IDEOGRAPH + {0x848D, 0x526D}, //647 #CJK UNIFIED IDEOGRAPH + {0x848E, 0x526E}, //648 #CJK UNIFIED IDEOGRAPH + {0x848F, 0x5270}, //649 #CJK UNIFIED IDEOGRAPH + {0x8490, 0x5271}, //650 #CJK UNIFIED IDEOGRAPH + {0x8491, 0x5273}, //651 #CJK UNIFIED IDEOGRAPH + {0x8492, 0x5274}, //652 #CJK UNIFIED IDEOGRAPH + {0x8493, 0x5275}, //653 #CJK UNIFIED IDEOGRAPH + {0x8494, 0x5276}, //654 #CJK UNIFIED IDEOGRAPH + {0x8495, 0x5277}, //655 #CJK UNIFIED IDEOGRAPH + {0x8496, 0x5278}, //656 #CJK UNIFIED IDEOGRAPH + {0x8497, 0x5279}, //657 #CJK UNIFIED IDEOGRAPH + {0x8498, 0x527A}, //658 #CJK UNIFIED IDEOGRAPH + {0x8499, 0x527B}, //659 #CJK UNIFIED IDEOGRAPH + {0x849A, 0x527C}, //660 #CJK UNIFIED IDEOGRAPH + {0x849B, 0x527E}, //661 #CJK UNIFIED IDEOGRAPH + {0x849C, 0x5280}, //662 #CJK UNIFIED IDEOGRAPH + {0x849D, 0x5283}, //663 #CJK UNIFIED IDEOGRAPH + {0x849E, 0x5284}, //664 #CJK UNIFIED IDEOGRAPH + {0x849F, 0x5285}, //665 #CJK UNIFIED IDEOGRAPH + {0x84A0, 0x5286}, //666 #CJK UNIFIED IDEOGRAPH + {0x84A1, 0x5287}, //667 #CJK UNIFIED IDEOGRAPH + {0x84A2, 0x5289}, //668 #CJK UNIFIED IDEOGRAPH + {0x84A3, 0x528A}, //669 #CJK UNIFIED IDEOGRAPH + {0x84A4, 0x528B}, //670 #CJK UNIFIED IDEOGRAPH + {0x84A5, 0x528C}, //671 #CJK UNIFIED IDEOGRAPH + {0x84A6, 0x528D}, //672 #CJK UNIFIED IDEOGRAPH + {0x84A7, 0x528E}, //673 #CJK UNIFIED IDEOGRAPH + {0x84A8, 0x528F}, //674 #CJK UNIFIED IDEOGRAPH + {0x84A9, 0x5291}, //675 #CJK UNIFIED IDEOGRAPH + {0x84AA, 0x5292}, //676 #CJK UNIFIED IDEOGRAPH + {0x84AB, 0x5294}, //677 #CJK UNIFIED IDEOGRAPH + {0x84AC, 0x5295}, //678 #CJK UNIFIED IDEOGRAPH + {0x84AD, 0x5296}, //679 #CJK UNIFIED IDEOGRAPH + {0x84AE, 0x5297}, //680 #CJK UNIFIED IDEOGRAPH + {0x84AF, 0x5298}, //681 #CJK UNIFIED IDEOGRAPH + {0x84B0, 0x5299}, //682 #CJK UNIFIED IDEOGRAPH + {0x84B1, 0x529A}, //683 #CJK UNIFIED IDEOGRAPH + {0x84B2, 0x529C}, //684 #CJK UNIFIED IDEOGRAPH + {0x84B3, 0x52A4}, //685 #CJK UNIFIED IDEOGRAPH + {0x84B4, 0x52A5}, //686 #CJK UNIFIED IDEOGRAPH + {0x84B5, 0x52A6}, //687 #CJK UNIFIED IDEOGRAPH + {0x84B6, 0x52A7}, //688 #CJK UNIFIED IDEOGRAPH + {0x84B7, 0x52AE}, //689 #CJK UNIFIED IDEOGRAPH + {0x84B8, 0x52AF}, //690 #CJK UNIFIED IDEOGRAPH + {0x84B9, 0x52B0}, //691 #CJK UNIFIED IDEOGRAPH + {0x84BA, 0x52B4}, //692 #CJK UNIFIED IDEOGRAPH + {0x84BB, 0x52B5}, //693 #CJK UNIFIED IDEOGRAPH + {0x84BC, 0x52B6}, //694 #CJK UNIFIED IDEOGRAPH + {0x84BD, 0x52B7}, //695 #CJK UNIFIED IDEOGRAPH + {0x84BE, 0x52B8}, //696 #CJK UNIFIED IDEOGRAPH + {0x84BF, 0x52B9}, //697 #CJK UNIFIED IDEOGRAPH + {0x84C0, 0x52BA}, //698 #CJK UNIFIED IDEOGRAPH + {0x84C1, 0x52BB}, //699 #CJK UNIFIED IDEOGRAPH + {0x84C2, 0x52BC}, //700 #CJK UNIFIED IDEOGRAPH + {0x84C3, 0x52BD}, //701 #CJK UNIFIED IDEOGRAPH + {0x84C4, 0x52C0}, //702 #CJK UNIFIED IDEOGRAPH + {0x84C5, 0x52C1}, //703 #CJK UNIFIED IDEOGRAPH + {0x84C6, 0x52C2}, //704 #CJK UNIFIED IDEOGRAPH + {0x84C7, 0x52C4}, //705 #CJK UNIFIED IDEOGRAPH + {0x84C8, 0x52C5}, //706 #CJK UNIFIED IDEOGRAPH + {0x84C9, 0x52C6}, //707 #CJK UNIFIED IDEOGRAPH + {0x84CA, 0x52C8}, //708 #CJK UNIFIED IDEOGRAPH + {0x84CB, 0x52CA}, //709 #CJK UNIFIED IDEOGRAPH + {0x84CC, 0x52CC}, //710 #CJK UNIFIED IDEOGRAPH + {0x84CD, 0x52CD}, //711 #CJK UNIFIED IDEOGRAPH + {0x84CE, 0x52CE}, //712 #CJK UNIFIED IDEOGRAPH + {0x84CF, 0x52CF}, //713 #CJK UNIFIED IDEOGRAPH + {0x84D0, 0x52D1}, //714 #CJK UNIFIED IDEOGRAPH + {0x84D1, 0x52D3}, //715 #CJK UNIFIED IDEOGRAPH + {0x84D2, 0x52D4}, //716 #CJK UNIFIED IDEOGRAPH + {0x84D3, 0x52D5}, //717 #CJK UNIFIED IDEOGRAPH + {0x84D4, 0x52D7}, //718 #CJK UNIFIED IDEOGRAPH + {0x84D5, 0x52D9}, //719 #CJK UNIFIED IDEOGRAPH + {0x84D6, 0x52DA}, //720 #CJK UNIFIED IDEOGRAPH + {0x84D7, 0x52DB}, //721 #CJK UNIFIED IDEOGRAPH + {0x84D8, 0x52DC}, //722 #CJK UNIFIED IDEOGRAPH + {0x84D9, 0x52DD}, //723 #CJK UNIFIED IDEOGRAPH + {0x84DA, 0x52DE}, //724 #CJK UNIFIED IDEOGRAPH + {0x84DB, 0x52E0}, //725 #CJK UNIFIED IDEOGRAPH + {0x84DC, 0x52E1}, //726 #CJK UNIFIED IDEOGRAPH + {0x84DD, 0x52E2}, //727 #CJK UNIFIED IDEOGRAPH + {0x84DE, 0x52E3}, //728 #CJK UNIFIED IDEOGRAPH + {0x84DF, 0x52E5}, //729 #CJK UNIFIED IDEOGRAPH + {0x84E0, 0x52E6}, //730 #CJK UNIFIED IDEOGRAPH + {0x84E1, 0x52E7}, //731 #CJK UNIFIED IDEOGRAPH + {0x84E2, 0x52E8}, //732 #CJK UNIFIED IDEOGRAPH + {0x84E3, 0x52E9}, //733 #CJK UNIFIED IDEOGRAPH + {0x84E4, 0x52EA}, //734 #CJK UNIFIED IDEOGRAPH + {0x84E5, 0x52EB}, //735 #CJK UNIFIED IDEOGRAPH + {0x84E6, 0x52EC}, //736 #CJK UNIFIED IDEOGRAPH + {0x84E7, 0x52ED}, //737 #CJK UNIFIED IDEOGRAPH + {0x84E8, 0x52EE}, //738 #CJK UNIFIED IDEOGRAPH + {0x84E9, 0x52EF}, //739 #CJK UNIFIED IDEOGRAPH + {0x84EA, 0x52F1}, //740 #CJK UNIFIED IDEOGRAPH + {0x84EB, 0x52F2}, //741 #CJK UNIFIED IDEOGRAPH + {0x84EC, 0x52F3}, //742 #CJK UNIFIED IDEOGRAPH + {0x84ED, 0x52F4}, //743 #CJK UNIFIED IDEOGRAPH + {0x84EE, 0x52F5}, //744 #CJK UNIFIED IDEOGRAPH + {0x84EF, 0x52F6}, //745 #CJK UNIFIED IDEOGRAPH + {0x84F0, 0x52F7}, //746 #CJK UNIFIED IDEOGRAPH + {0x84F1, 0x52F8}, //747 #CJK UNIFIED IDEOGRAPH + {0x84F2, 0x52FB}, //748 #CJK UNIFIED IDEOGRAPH + {0x84F3, 0x52FC}, //749 #CJK UNIFIED IDEOGRAPH + {0x84F4, 0x52FD}, //750 #CJK UNIFIED IDEOGRAPH + {0x84F5, 0x5301}, //751 #CJK UNIFIED IDEOGRAPH + {0x84F6, 0x5302}, //752 #CJK UNIFIED IDEOGRAPH + {0x84F7, 0x5303}, //753 #CJK UNIFIED IDEOGRAPH + {0x84F8, 0x5304}, //754 #CJK UNIFIED IDEOGRAPH + {0x84F9, 0x5307}, //755 #CJK UNIFIED IDEOGRAPH + {0x84FA, 0x5309}, //756 #CJK UNIFIED IDEOGRAPH + {0x84FB, 0x530A}, //757 #CJK UNIFIED IDEOGRAPH + {0x84FC, 0x530B}, //758 #CJK UNIFIED IDEOGRAPH + {0x84FD, 0x530C}, //759 #CJK UNIFIED IDEOGRAPH + {0x84FE, 0x530E}, //760 #CJK UNIFIED IDEOGRAPH + {0x8540, 0x5311}, //761 #CJK UNIFIED IDEOGRAPH + {0x8541, 0x5312}, //762 #CJK UNIFIED IDEOGRAPH + {0x8542, 0x5313}, //763 #CJK UNIFIED IDEOGRAPH + {0x8543, 0x5314}, //764 #CJK UNIFIED IDEOGRAPH + {0x8544, 0x5318}, //765 #CJK UNIFIED IDEOGRAPH + {0x8545, 0x531B}, //766 #CJK UNIFIED IDEOGRAPH + {0x8546, 0x531C}, //767 #CJK UNIFIED IDEOGRAPH + {0x8547, 0x531E}, //768 #CJK UNIFIED IDEOGRAPH + {0x8548, 0x531F}, //769 #CJK UNIFIED IDEOGRAPH + {0x8549, 0x5322}, //770 #CJK UNIFIED IDEOGRAPH + {0x854A, 0x5324}, //771 #CJK UNIFIED IDEOGRAPH + {0x854B, 0x5325}, //772 #CJK UNIFIED IDEOGRAPH + {0x854C, 0x5327}, //773 #CJK UNIFIED IDEOGRAPH + {0x854D, 0x5328}, //774 #CJK UNIFIED IDEOGRAPH + {0x854E, 0x5329}, //775 #CJK UNIFIED IDEOGRAPH + {0x854F, 0x532B}, //776 #CJK UNIFIED IDEOGRAPH + {0x8550, 0x532C}, //777 #CJK UNIFIED IDEOGRAPH + {0x8551, 0x532D}, //778 #CJK UNIFIED IDEOGRAPH + {0x8552, 0x532F}, //779 #CJK UNIFIED IDEOGRAPH + {0x8553, 0x5330}, //780 #CJK UNIFIED IDEOGRAPH + {0x8554, 0x5331}, //781 #CJK UNIFIED IDEOGRAPH + {0x8555, 0x5332}, //782 #CJK UNIFIED IDEOGRAPH + {0x8556, 0x5333}, //783 #CJK UNIFIED IDEOGRAPH + {0x8557, 0x5334}, //784 #CJK UNIFIED IDEOGRAPH + {0x8558, 0x5335}, //785 #CJK UNIFIED IDEOGRAPH + {0x8559, 0x5336}, //786 #CJK UNIFIED IDEOGRAPH + {0x855A, 0x5337}, //787 #CJK UNIFIED IDEOGRAPH + {0x855B, 0x5338}, //788 #CJK UNIFIED IDEOGRAPH + {0x855C, 0x533C}, //789 #CJK UNIFIED IDEOGRAPH + {0x855D, 0x533D}, //790 #CJK UNIFIED IDEOGRAPH + {0x855E, 0x5340}, //791 #CJK UNIFIED IDEOGRAPH + {0x855F, 0x5342}, //792 #CJK UNIFIED IDEOGRAPH + {0x8560, 0x5344}, //793 #CJK UNIFIED IDEOGRAPH + {0x8561, 0x5346}, //794 #CJK UNIFIED IDEOGRAPH + {0x8562, 0x534B}, //795 #CJK UNIFIED IDEOGRAPH + {0x8563, 0x534C}, //796 #CJK UNIFIED IDEOGRAPH + {0x8564, 0x534D}, //797 #CJK UNIFIED IDEOGRAPH + {0x8565, 0x5350}, //798 #CJK UNIFIED IDEOGRAPH + {0x8566, 0x5354}, //799 #CJK UNIFIED IDEOGRAPH + {0x8567, 0x5358}, //800 #CJK UNIFIED IDEOGRAPH + {0x8568, 0x5359}, //801 #CJK UNIFIED IDEOGRAPH + {0x8569, 0x535B}, //802 #CJK UNIFIED IDEOGRAPH + {0x856A, 0x535D}, //803 #CJK UNIFIED IDEOGRAPH + {0x856B, 0x5365}, //804 #CJK UNIFIED IDEOGRAPH + {0x856C, 0x5368}, //805 #CJK UNIFIED IDEOGRAPH + {0x856D, 0x536A}, //806 #CJK UNIFIED IDEOGRAPH + {0x856E, 0x536C}, //807 #CJK UNIFIED IDEOGRAPH + {0x856F, 0x536D}, //808 #CJK UNIFIED IDEOGRAPH + {0x8570, 0x5372}, //809 #CJK UNIFIED IDEOGRAPH + {0x8571, 0x5376}, //810 #CJK UNIFIED IDEOGRAPH + {0x8572, 0x5379}, //811 #CJK UNIFIED IDEOGRAPH + {0x8573, 0x537B}, //812 #CJK UNIFIED IDEOGRAPH + {0x8574, 0x537C}, //813 #CJK UNIFIED IDEOGRAPH + {0x8575, 0x537D}, //814 #CJK UNIFIED IDEOGRAPH + {0x8576, 0x537E}, //815 #CJK UNIFIED IDEOGRAPH + {0x8577, 0x5380}, //816 #CJK UNIFIED IDEOGRAPH + {0x8578, 0x5381}, //817 #CJK UNIFIED IDEOGRAPH + {0x8579, 0x5383}, //818 #CJK UNIFIED IDEOGRAPH + {0x857A, 0x5387}, //819 #CJK UNIFIED IDEOGRAPH + {0x857B, 0x5388}, //820 #CJK UNIFIED IDEOGRAPH + {0x857C, 0x538A}, //821 #CJK UNIFIED IDEOGRAPH + {0x857D, 0x538E}, //822 #CJK UNIFIED IDEOGRAPH + {0x857E, 0x538F}, //823 #CJK UNIFIED IDEOGRAPH + {0x8580, 0x5390}, //824 #CJK UNIFIED IDEOGRAPH + {0x8581, 0x5391}, //825 #CJK UNIFIED IDEOGRAPH + {0x8582, 0x5392}, //826 #CJK UNIFIED IDEOGRAPH + {0x8583, 0x5393}, //827 #CJK UNIFIED IDEOGRAPH + {0x8584, 0x5394}, //828 #CJK UNIFIED IDEOGRAPH + {0x8585, 0x5396}, //829 #CJK UNIFIED IDEOGRAPH + {0x8586, 0x5397}, //830 #CJK UNIFIED IDEOGRAPH + {0x8587, 0x5399}, //831 #CJK UNIFIED IDEOGRAPH + {0x8588, 0x539B}, //832 #CJK UNIFIED IDEOGRAPH + {0x8589, 0x539C}, //833 #CJK UNIFIED IDEOGRAPH + {0x858A, 0x539E}, //834 #CJK UNIFIED IDEOGRAPH + {0x858B, 0x53A0}, //835 #CJK UNIFIED IDEOGRAPH + {0x858C, 0x53A1}, //836 #CJK UNIFIED IDEOGRAPH + {0x858D, 0x53A4}, //837 #CJK UNIFIED IDEOGRAPH + {0x858E, 0x53A7}, //838 #CJK UNIFIED IDEOGRAPH + {0x858F, 0x53AA}, //839 #CJK UNIFIED IDEOGRAPH + {0x8590, 0x53AB}, //840 #CJK UNIFIED IDEOGRAPH + {0x8591, 0x53AC}, //841 #CJK UNIFIED IDEOGRAPH + {0x8592, 0x53AD}, //842 #CJK UNIFIED IDEOGRAPH + {0x8593, 0x53AF}, //843 #CJK UNIFIED IDEOGRAPH + {0x8594, 0x53B0}, //844 #CJK UNIFIED IDEOGRAPH + {0x8595, 0x53B1}, //845 #CJK UNIFIED IDEOGRAPH + {0x8596, 0x53B2}, //846 #CJK UNIFIED IDEOGRAPH + {0x8597, 0x53B3}, //847 #CJK UNIFIED IDEOGRAPH + {0x8598, 0x53B4}, //848 #CJK UNIFIED IDEOGRAPH + {0x8599, 0x53B5}, //849 #CJK UNIFIED IDEOGRAPH + {0x859A, 0x53B7}, //850 #CJK UNIFIED IDEOGRAPH + {0x859B, 0x53B8}, //851 #CJK UNIFIED IDEOGRAPH + {0x859C, 0x53B9}, //852 #CJK UNIFIED IDEOGRAPH + {0x859D, 0x53BA}, //853 #CJK UNIFIED IDEOGRAPH + {0x859E, 0x53BC}, //854 #CJK UNIFIED IDEOGRAPH + {0x859F, 0x53BD}, //855 #CJK UNIFIED IDEOGRAPH + {0x85A0, 0x53BE}, //856 #CJK UNIFIED IDEOGRAPH + {0x85A1, 0x53C0}, //857 #CJK UNIFIED IDEOGRAPH + {0x85A2, 0x53C3}, //858 #CJK UNIFIED IDEOGRAPH + {0x85A3, 0x53C4}, //859 #CJK UNIFIED IDEOGRAPH + {0x85A4, 0x53C5}, //860 #CJK UNIFIED IDEOGRAPH + {0x85A5, 0x53C6}, //861 #CJK UNIFIED IDEOGRAPH + {0x85A6, 0x53C7}, //862 #CJK UNIFIED IDEOGRAPH + {0x85A7, 0x53CE}, //863 #CJK UNIFIED IDEOGRAPH + {0x85A8, 0x53CF}, //864 #CJK UNIFIED IDEOGRAPH + {0x85A9, 0x53D0}, //865 #CJK UNIFIED IDEOGRAPH + {0x85AA, 0x53D2}, //866 #CJK UNIFIED IDEOGRAPH + {0x85AB, 0x53D3}, //867 #CJK UNIFIED IDEOGRAPH + {0x85AC, 0x53D5}, //868 #CJK UNIFIED IDEOGRAPH + {0x85AD, 0x53DA}, //869 #CJK UNIFIED IDEOGRAPH + {0x85AE, 0x53DC}, //870 #CJK UNIFIED IDEOGRAPH + {0x85AF, 0x53DD}, //871 #CJK UNIFIED IDEOGRAPH + {0x85B0, 0x53DE}, //872 #CJK UNIFIED IDEOGRAPH + {0x85B1, 0x53E1}, //873 #CJK UNIFIED IDEOGRAPH + {0x85B2, 0x53E2}, //874 #CJK UNIFIED IDEOGRAPH + {0x85B3, 0x53E7}, //875 #CJK UNIFIED IDEOGRAPH + {0x85B4, 0x53F4}, //876 #CJK UNIFIED IDEOGRAPH + {0x85B5, 0x53FA}, //877 #CJK UNIFIED IDEOGRAPH + {0x85B6, 0x53FE}, //878 #CJK UNIFIED IDEOGRAPH + {0x85B7, 0x53FF}, //879 #CJK UNIFIED IDEOGRAPH + {0x85B8, 0x5400}, //880 #CJK UNIFIED IDEOGRAPH + {0x85B9, 0x5402}, //881 #CJK UNIFIED IDEOGRAPH + {0x85BA, 0x5405}, //882 #CJK UNIFIED IDEOGRAPH + {0x85BB, 0x5407}, //883 #CJK UNIFIED IDEOGRAPH + {0x85BC, 0x540B}, //884 #CJK UNIFIED IDEOGRAPH + {0x85BD, 0x5414}, //885 #CJK UNIFIED IDEOGRAPH + {0x85BE, 0x5418}, //886 #CJK UNIFIED IDEOGRAPH + {0x85BF, 0x5419}, //887 #CJK UNIFIED IDEOGRAPH + {0x85C0, 0x541A}, //888 #CJK UNIFIED IDEOGRAPH + {0x85C1, 0x541C}, //889 #CJK UNIFIED IDEOGRAPH + {0x85C2, 0x5422}, //890 #CJK UNIFIED IDEOGRAPH + {0x85C3, 0x5424}, //891 #CJK UNIFIED IDEOGRAPH + {0x85C4, 0x5425}, //892 #CJK UNIFIED IDEOGRAPH + {0x85C5, 0x542A}, //893 #CJK UNIFIED IDEOGRAPH + {0x85C6, 0x5430}, //894 #CJK UNIFIED IDEOGRAPH + {0x85C7, 0x5433}, //895 #CJK UNIFIED IDEOGRAPH + {0x85C8, 0x5436}, //896 #CJK UNIFIED IDEOGRAPH + {0x85C9, 0x5437}, //897 #CJK UNIFIED IDEOGRAPH + {0x85CA, 0x543A}, //898 #CJK UNIFIED IDEOGRAPH + {0x85CB, 0x543D}, //899 #CJK UNIFIED IDEOGRAPH + {0x85CC, 0x543F}, //900 #CJK UNIFIED IDEOGRAPH + {0x85CD, 0x5441}, //901 #CJK UNIFIED IDEOGRAPH + {0x85CE, 0x5442}, //902 #CJK UNIFIED IDEOGRAPH + {0x85CF, 0x5444}, //903 #CJK UNIFIED IDEOGRAPH + {0x85D0, 0x5445}, //904 #CJK UNIFIED IDEOGRAPH + {0x85D1, 0x5447}, //905 #CJK UNIFIED IDEOGRAPH + {0x85D2, 0x5449}, //906 #CJK UNIFIED IDEOGRAPH + {0x85D3, 0x544C}, //907 #CJK UNIFIED IDEOGRAPH + {0x85D4, 0x544D}, //908 #CJK UNIFIED IDEOGRAPH + {0x85D5, 0x544E}, //909 #CJK UNIFIED IDEOGRAPH + {0x85D6, 0x544F}, //910 #CJK UNIFIED IDEOGRAPH + {0x85D7, 0x5451}, //911 #CJK UNIFIED IDEOGRAPH + {0x85D8, 0x545A}, //912 #CJK UNIFIED IDEOGRAPH + {0x85D9, 0x545D}, //913 #CJK UNIFIED IDEOGRAPH + {0x85DA, 0x545E}, //914 #CJK UNIFIED IDEOGRAPH + {0x85DB, 0x545F}, //915 #CJK UNIFIED IDEOGRAPH + {0x85DC, 0x5460}, //916 #CJK UNIFIED IDEOGRAPH + {0x85DD, 0x5461}, //917 #CJK UNIFIED IDEOGRAPH + {0x85DE, 0x5463}, //918 #CJK UNIFIED IDEOGRAPH + {0x85DF, 0x5465}, //919 #CJK UNIFIED IDEOGRAPH + {0x85E0, 0x5467}, //920 #CJK UNIFIED IDEOGRAPH + {0x85E1, 0x5469}, //921 #CJK UNIFIED IDEOGRAPH + {0x85E2, 0x546A}, //922 #CJK UNIFIED IDEOGRAPH + {0x85E3, 0x546B}, //923 #CJK UNIFIED IDEOGRAPH + {0x85E4, 0x546C}, //924 #CJK UNIFIED IDEOGRAPH + {0x85E5, 0x546D}, //925 #CJK UNIFIED IDEOGRAPH + {0x85E6, 0x546E}, //926 #CJK UNIFIED IDEOGRAPH + {0x85E7, 0x546F}, //927 #CJK UNIFIED IDEOGRAPH + {0x85E8, 0x5470}, //928 #CJK UNIFIED IDEOGRAPH + {0x85E9, 0x5474}, //929 #CJK UNIFIED IDEOGRAPH + {0x85EA, 0x5479}, //930 #CJK UNIFIED IDEOGRAPH + {0x85EB, 0x547A}, //931 #CJK UNIFIED IDEOGRAPH + {0x85EC, 0x547E}, //932 #CJK UNIFIED IDEOGRAPH + {0x85ED, 0x547F}, //933 #CJK UNIFIED IDEOGRAPH + {0x85EE, 0x5481}, //934 #CJK UNIFIED IDEOGRAPH + {0x85EF, 0x5483}, //935 #CJK UNIFIED IDEOGRAPH + {0x85F0, 0x5485}, //936 #CJK UNIFIED IDEOGRAPH + {0x85F1, 0x5487}, //937 #CJK UNIFIED IDEOGRAPH + {0x85F2, 0x5488}, //938 #CJK UNIFIED IDEOGRAPH + {0x85F3, 0x5489}, //939 #CJK UNIFIED IDEOGRAPH + {0x85F4, 0x548A}, //940 #CJK UNIFIED IDEOGRAPH + {0x85F5, 0x548D}, //941 #CJK UNIFIED IDEOGRAPH + {0x85F6, 0x5491}, //942 #CJK UNIFIED IDEOGRAPH + {0x85F7, 0x5493}, //943 #CJK UNIFIED IDEOGRAPH + {0x85F8, 0x5497}, //944 #CJK UNIFIED IDEOGRAPH + {0x85F9, 0x5498}, //945 #CJK UNIFIED IDEOGRAPH + {0x85FA, 0x549C}, //946 #CJK UNIFIED IDEOGRAPH + {0x85FB, 0x549E}, //947 #CJK UNIFIED IDEOGRAPH + {0x85FC, 0x549F}, //948 #CJK UNIFIED IDEOGRAPH + {0x85FD, 0x54A0}, //949 #CJK UNIFIED IDEOGRAPH + {0x85FE, 0x54A1}, //950 #CJK UNIFIED IDEOGRAPH + {0x8640, 0x54A2}, //951 #CJK UNIFIED IDEOGRAPH + {0x8641, 0x54A5}, //952 #CJK UNIFIED IDEOGRAPH + {0x8642, 0x54AE}, //953 #CJK UNIFIED IDEOGRAPH + {0x8643, 0x54B0}, //954 #CJK UNIFIED IDEOGRAPH + {0x8644, 0x54B2}, //955 #CJK UNIFIED IDEOGRAPH + {0x8645, 0x54B5}, //956 #CJK UNIFIED IDEOGRAPH + {0x8646, 0x54B6}, //957 #CJK UNIFIED IDEOGRAPH + {0x8647, 0x54B7}, //958 #CJK UNIFIED IDEOGRAPH + {0x8648, 0x54B9}, //959 #CJK UNIFIED IDEOGRAPH + {0x8649, 0x54BA}, //960 #CJK UNIFIED IDEOGRAPH + {0x864A, 0x54BC}, //961 #CJK UNIFIED IDEOGRAPH + {0x864B, 0x54BE}, //962 #CJK UNIFIED IDEOGRAPH + {0x864C, 0x54C3}, //963 #CJK UNIFIED IDEOGRAPH + {0x864D, 0x54C5}, //964 #CJK UNIFIED IDEOGRAPH + {0x864E, 0x54CA}, //965 #CJK UNIFIED IDEOGRAPH + {0x864F, 0x54CB}, //966 #CJK UNIFIED IDEOGRAPH + {0x8650, 0x54D6}, //967 #CJK UNIFIED IDEOGRAPH + {0x8651, 0x54D8}, //968 #CJK UNIFIED IDEOGRAPH + {0x8652, 0x54DB}, //969 #CJK UNIFIED IDEOGRAPH + {0x8653, 0x54E0}, //970 #CJK UNIFIED IDEOGRAPH + {0x8654, 0x54E1}, //971 #CJK UNIFIED IDEOGRAPH + {0x8655, 0x54E2}, //972 #CJK UNIFIED IDEOGRAPH + {0x8656, 0x54E3}, //973 #CJK UNIFIED IDEOGRAPH + {0x8657, 0x54E4}, //974 #CJK UNIFIED IDEOGRAPH + {0x8658, 0x54EB}, //975 #CJK UNIFIED IDEOGRAPH + {0x8659, 0x54EC}, //976 #CJK UNIFIED IDEOGRAPH + {0x865A, 0x54EF}, //977 #CJK UNIFIED IDEOGRAPH + {0x865B, 0x54F0}, //978 #CJK UNIFIED IDEOGRAPH + {0x865C, 0x54F1}, //979 #CJK UNIFIED IDEOGRAPH + {0x865D, 0x54F4}, //980 #CJK UNIFIED IDEOGRAPH + {0x865E, 0x54F5}, //981 #CJK UNIFIED IDEOGRAPH + {0x865F, 0x54F6}, //982 #CJK UNIFIED IDEOGRAPH + {0x8660, 0x54F7}, //983 #CJK UNIFIED IDEOGRAPH + {0x8661, 0x54F8}, //984 #CJK UNIFIED IDEOGRAPH + {0x8662, 0x54F9}, //985 #CJK UNIFIED IDEOGRAPH + {0x8663, 0x54FB}, //986 #CJK UNIFIED IDEOGRAPH + {0x8664, 0x54FE}, //987 #CJK UNIFIED IDEOGRAPH + {0x8665, 0x5500}, //988 #CJK UNIFIED IDEOGRAPH + {0x8666, 0x5502}, //989 #CJK UNIFIED IDEOGRAPH + {0x8667, 0x5503}, //990 #CJK UNIFIED IDEOGRAPH + {0x8668, 0x5504}, //991 #CJK UNIFIED IDEOGRAPH + {0x8669, 0x5505}, //992 #CJK UNIFIED IDEOGRAPH + {0x866A, 0x5508}, //993 #CJK UNIFIED IDEOGRAPH + {0x866B, 0x550A}, //994 #CJK UNIFIED IDEOGRAPH + {0x866C, 0x550B}, //995 #CJK UNIFIED IDEOGRAPH + {0x866D, 0x550C}, //996 #CJK UNIFIED IDEOGRAPH + {0x866E, 0x550D}, //997 #CJK UNIFIED IDEOGRAPH + {0x866F, 0x550E}, //998 #CJK UNIFIED IDEOGRAPH + {0x8670, 0x5512}, //999 #CJK UNIFIED IDEOGRAPH + {0x8671, 0x5513}, //1000 #CJK UNIFIED IDEOGRAPH + {0x8672, 0x5515}, //1001 #CJK UNIFIED IDEOGRAPH + {0x8673, 0x5516}, //1002 #CJK UNIFIED IDEOGRAPH + {0x8674, 0x5517}, //1003 #CJK UNIFIED IDEOGRAPH + {0x8675, 0x5518}, //1004 #CJK UNIFIED IDEOGRAPH + {0x8676, 0x5519}, //1005 #CJK UNIFIED IDEOGRAPH + {0x8677, 0x551A}, //1006 #CJK UNIFIED IDEOGRAPH + {0x8678, 0x551C}, //1007 #CJK UNIFIED IDEOGRAPH + {0x8679, 0x551D}, //1008 #CJK UNIFIED IDEOGRAPH + {0x867A, 0x551E}, //1009 #CJK UNIFIED IDEOGRAPH + {0x867B, 0x551F}, //1010 #CJK UNIFIED IDEOGRAPH + {0x867C, 0x5521}, //1011 #CJK UNIFIED IDEOGRAPH + {0x867D, 0x5525}, //1012 #CJK UNIFIED IDEOGRAPH + {0x867E, 0x5526}, //1013 #CJK UNIFIED IDEOGRAPH + {0x8680, 0x5528}, //1014 #CJK UNIFIED IDEOGRAPH + {0x8681, 0x5529}, //1015 #CJK UNIFIED IDEOGRAPH + {0x8682, 0x552B}, //1016 #CJK UNIFIED IDEOGRAPH + {0x8683, 0x552D}, //1017 #CJK UNIFIED IDEOGRAPH + {0x8684, 0x5532}, //1018 #CJK UNIFIED IDEOGRAPH + {0x8685, 0x5534}, //1019 #CJK UNIFIED IDEOGRAPH + {0x8686, 0x5535}, //1020 #CJK UNIFIED IDEOGRAPH + {0x8687, 0x5536}, //1021 #CJK UNIFIED IDEOGRAPH + {0x8688, 0x5538}, //1022 #CJK UNIFIED IDEOGRAPH + {0x8689, 0x5539}, //1023 #CJK UNIFIED IDEOGRAPH + {0x868A, 0x553A}, //1024 #CJK UNIFIED IDEOGRAPH + {0x868B, 0x553B}, //1025 #CJK UNIFIED IDEOGRAPH + {0x868C, 0x553D}, //1026 #CJK UNIFIED IDEOGRAPH + {0x868D, 0x5540}, //1027 #CJK UNIFIED IDEOGRAPH + {0x868E, 0x5542}, //1028 #CJK UNIFIED IDEOGRAPH + {0x868F, 0x5545}, //1029 #CJK UNIFIED IDEOGRAPH + {0x8690, 0x5547}, //1030 #CJK UNIFIED IDEOGRAPH + {0x8691, 0x5548}, //1031 #CJK UNIFIED IDEOGRAPH + {0x8692, 0x554B}, //1032 #CJK UNIFIED IDEOGRAPH + {0x8693, 0x554C}, //1033 #CJK UNIFIED IDEOGRAPH + {0x8694, 0x554D}, //1034 #CJK UNIFIED IDEOGRAPH + {0x8695, 0x554E}, //1035 #CJK UNIFIED IDEOGRAPH + {0x8696, 0x554F}, //1036 #CJK UNIFIED IDEOGRAPH + {0x8697, 0x5551}, //1037 #CJK UNIFIED IDEOGRAPH + {0x8698, 0x5552}, //1038 #CJK UNIFIED IDEOGRAPH + {0x8699, 0x5553}, //1039 #CJK UNIFIED IDEOGRAPH + {0x869A, 0x5554}, //1040 #CJK UNIFIED IDEOGRAPH + {0x869B, 0x5557}, //1041 #CJK UNIFIED IDEOGRAPH + {0x869C, 0x5558}, //1042 #CJK UNIFIED IDEOGRAPH + {0x869D, 0x5559}, //1043 #CJK UNIFIED IDEOGRAPH + {0x869E, 0x555A}, //1044 #CJK UNIFIED IDEOGRAPH + {0x869F, 0x555B}, //1045 #CJK UNIFIED IDEOGRAPH + {0x86A0, 0x555D}, //1046 #CJK UNIFIED IDEOGRAPH + {0x86A1, 0x555E}, //1047 #CJK UNIFIED IDEOGRAPH + {0x86A2, 0x555F}, //1048 #CJK UNIFIED IDEOGRAPH + {0x86A3, 0x5560}, //1049 #CJK UNIFIED IDEOGRAPH + {0x86A4, 0x5562}, //1050 #CJK UNIFIED IDEOGRAPH + {0x86A5, 0x5563}, //1051 #CJK UNIFIED IDEOGRAPH + {0x86A6, 0x5568}, //1052 #CJK UNIFIED IDEOGRAPH + {0x86A7, 0x5569}, //1053 #CJK UNIFIED IDEOGRAPH + {0x86A8, 0x556B}, //1054 #CJK UNIFIED IDEOGRAPH + {0x86A9, 0x556F}, //1055 #CJK UNIFIED IDEOGRAPH + {0x86AA, 0x5570}, //1056 #CJK UNIFIED IDEOGRAPH + {0x86AB, 0x5571}, //1057 #CJK UNIFIED IDEOGRAPH + {0x86AC, 0x5572}, //1058 #CJK UNIFIED IDEOGRAPH + {0x86AD, 0x5573}, //1059 #CJK UNIFIED IDEOGRAPH + {0x86AE, 0x5574}, //1060 #CJK UNIFIED IDEOGRAPH + {0x86AF, 0x5579}, //1061 #CJK UNIFIED IDEOGRAPH + {0x86B0, 0x557A}, //1062 #CJK UNIFIED IDEOGRAPH + {0x86B1, 0x557D}, //1063 #CJK UNIFIED IDEOGRAPH + {0x86B2, 0x557F}, //1064 #CJK UNIFIED IDEOGRAPH + {0x86B3, 0x5585}, //1065 #CJK UNIFIED IDEOGRAPH + {0x86B4, 0x5586}, //1066 #CJK UNIFIED IDEOGRAPH + {0x86B5, 0x558C}, //1067 #CJK UNIFIED IDEOGRAPH + {0x86B6, 0x558D}, //1068 #CJK UNIFIED IDEOGRAPH + {0x86B7, 0x558E}, //1069 #CJK UNIFIED IDEOGRAPH + {0x86B8, 0x5590}, //1070 #CJK UNIFIED IDEOGRAPH + {0x86B9, 0x5592}, //1071 #CJK UNIFIED IDEOGRAPH + {0x86BA, 0x5593}, //1072 #CJK UNIFIED IDEOGRAPH + {0x86BB, 0x5595}, //1073 #CJK UNIFIED IDEOGRAPH + {0x86BC, 0x5596}, //1074 #CJK UNIFIED IDEOGRAPH + {0x86BD, 0x5597}, //1075 #CJK UNIFIED IDEOGRAPH + {0x86BE, 0x559A}, //1076 #CJK UNIFIED IDEOGRAPH + {0x86BF, 0x559B}, //1077 #CJK UNIFIED IDEOGRAPH + {0x86C0, 0x559E}, //1078 #CJK UNIFIED IDEOGRAPH + {0x86C1, 0x55A0}, //1079 #CJK UNIFIED IDEOGRAPH + {0x86C2, 0x55A1}, //1080 #CJK UNIFIED IDEOGRAPH + {0x86C3, 0x55A2}, //1081 #CJK UNIFIED IDEOGRAPH + {0x86C4, 0x55A3}, //1082 #CJK UNIFIED IDEOGRAPH + {0x86C5, 0x55A4}, //1083 #CJK UNIFIED IDEOGRAPH + {0x86C6, 0x55A5}, //1084 #CJK UNIFIED IDEOGRAPH + {0x86C7, 0x55A6}, //1085 #CJK UNIFIED IDEOGRAPH + {0x86C8, 0x55A8}, //1086 #CJK UNIFIED IDEOGRAPH + {0x86C9, 0x55A9}, //1087 #CJK UNIFIED IDEOGRAPH + {0x86CA, 0x55AA}, //1088 #CJK UNIFIED IDEOGRAPH + {0x86CB, 0x55AB}, //1089 #CJK UNIFIED IDEOGRAPH + {0x86CC, 0x55AC}, //1090 #CJK UNIFIED IDEOGRAPH + {0x86CD, 0x55AD}, //1091 #CJK UNIFIED IDEOGRAPH + {0x86CE, 0x55AE}, //1092 #CJK UNIFIED IDEOGRAPH + {0x86CF, 0x55AF}, //1093 #CJK UNIFIED IDEOGRAPH + {0x86D0, 0x55B0}, //1094 #CJK UNIFIED IDEOGRAPH + {0x86D1, 0x55B2}, //1095 #CJK UNIFIED IDEOGRAPH + {0x86D2, 0x55B4}, //1096 #CJK UNIFIED IDEOGRAPH + {0x86D3, 0x55B6}, //1097 #CJK UNIFIED IDEOGRAPH + {0x86D4, 0x55B8}, //1098 #CJK UNIFIED IDEOGRAPH + {0x86D5, 0x55BA}, //1099 #CJK UNIFIED IDEOGRAPH + {0x86D6, 0x55BC}, //1100 #CJK UNIFIED IDEOGRAPH + {0x86D7, 0x55BF}, //1101 #CJK UNIFIED IDEOGRAPH + {0x86D8, 0x55C0}, //1102 #CJK UNIFIED IDEOGRAPH + {0x86D9, 0x55C1}, //1103 #CJK UNIFIED IDEOGRAPH + {0x86DA, 0x55C2}, //1104 #CJK UNIFIED IDEOGRAPH + {0x86DB, 0x55C3}, //1105 #CJK UNIFIED IDEOGRAPH + {0x86DC, 0x55C6}, //1106 #CJK UNIFIED IDEOGRAPH + {0x86DD, 0x55C7}, //1107 #CJK UNIFIED IDEOGRAPH + {0x86DE, 0x55C8}, //1108 #CJK UNIFIED IDEOGRAPH + {0x86DF, 0x55CA}, //1109 #CJK UNIFIED IDEOGRAPH + {0x86E0, 0x55CB}, //1110 #CJK UNIFIED IDEOGRAPH + {0x86E1, 0x55CE}, //1111 #CJK UNIFIED IDEOGRAPH + {0x86E2, 0x55CF}, //1112 #CJK UNIFIED IDEOGRAPH + {0x86E3, 0x55D0}, //1113 #CJK UNIFIED IDEOGRAPH + {0x86E4, 0x55D5}, //1114 #CJK UNIFIED IDEOGRAPH + {0x86E5, 0x55D7}, //1115 #CJK UNIFIED IDEOGRAPH + {0x86E6, 0x55D8}, //1116 #CJK UNIFIED IDEOGRAPH + {0x86E7, 0x55D9}, //1117 #CJK UNIFIED IDEOGRAPH + {0x86E8, 0x55DA}, //1118 #CJK UNIFIED IDEOGRAPH + {0x86E9, 0x55DB}, //1119 #CJK UNIFIED IDEOGRAPH + {0x86EA, 0x55DE}, //1120 #CJK UNIFIED IDEOGRAPH + {0x86EB, 0x55E0}, //1121 #CJK UNIFIED IDEOGRAPH + {0x86EC, 0x55E2}, //1122 #CJK UNIFIED IDEOGRAPH + {0x86ED, 0x55E7}, //1123 #CJK UNIFIED IDEOGRAPH + {0x86EE, 0x55E9}, //1124 #CJK UNIFIED IDEOGRAPH + {0x86EF, 0x55ED}, //1125 #CJK UNIFIED IDEOGRAPH + {0x86F0, 0x55EE}, //1126 #CJK UNIFIED IDEOGRAPH + {0x86F1, 0x55F0}, //1127 #CJK UNIFIED IDEOGRAPH + {0x86F2, 0x55F1}, //1128 #CJK UNIFIED IDEOGRAPH + {0x86F3, 0x55F4}, //1129 #CJK UNIFIED IDEOGRAPH + {0x86F4, 0x55F6}, //1130 #CJK UNIFIED IDEOGRAPH + {0x86F5, 0x55F8}, //1131 #CJK UNIFIED IDEOGRAPH + {0x86F6, 0x55F9}, //1132 #CJK UNIFIED IDEOGRAPH + {0x86F7, 0x55FA}, //1133 #CJK UNIFIED IDEOGRAPH + {0x86F8, 0x55FB}, //1134 #CJK UNIFIED IDEOGRAPH + {0x86F9, 0x55FC}, //1135 #CJK UNIFIED IDEOGRAPH + {0x86FA, 0x55FF}, //1136 #CJK UNIFIED IDEOGRAPH + {0x86FB, 0x5602}, //1137 #CJK UNIFIED IDEOGRAPH + {0x86FC, 0x5603}, //1138 #CJK UNIFIED IDEOGRAPH + {0x86FD, 0x5604}, //1139 #CJK UNIFIED IDEOGRAPH + {0x86FE, 0x5605}, //1140 #CJK UNIFIED IDEOGRAPH + {0x8740, 0x5606}, //1141 #CJK UNIFIED IDEOGRAPH + {0x8741, 0x5607}, //1142 #CJK UNIFIED IDEOGRAPH + {0x8742, 0x560A}, //1143 #CJK UNIFIED IDEOGRAPH + {0x8743, 0x560B}, //1144 #CJK UNIFIED IDEOGRAPH + {0x8744, 0x560D}, //1145 #CJK UNIFIED IDEOGRAPH + {0x8745, 0x5610}, //1146 #CJK UNIFIED IDEOGRAPH + {0x8746, 0x5611}, //1147 #CJK UNIFIED IDEOGRAPH + {0x8747, 0x5612}, //1148 #CJK UNIFIED IDEOGRAPH + {0x8748, 0x5613}, //1149 #CJK UNIFIED IDEOGRAPH + {0x8749, 0x5614}, //1150 #CJK UNIFIED IDEOGRAPH + {0x874A, 0x5615}, //1151 #CJK UNIFIED IDEOGRAPH + {0x874B, 0x5616}, //1152 #CJK UNIFIED IDEOGRAPH + {0x874C, 0x5617}, //1153 #CJK UNIFIED IDEOGRAPH + {0x874D, 0x5619}, //1154 #CJK UNIFIED IDEOGRAPH + {0x874E, 0x561A}, //1155 #CJK UNIFIED IDEOGRAPH + {0x874F, 0x561C}, //1156 #CJK UNIFIED IDEOGRAPH + {0x8750, 0x561D}, //1157 #CJK UNIFIED IDEOGRAPH + {0x8751, 0x5620}, //1158 #CJK UNIFIED IDEOGRAPH + {0x8752, 0x5621}, //1159 #CJK UNIFIED IDEOGRAPH + {0x8753, 0x5622}, //1160 #CJK UNIFIED IDEOGRAPH + {0x8754, 0x5625}, //1161 #CJK UNIFIED IDEOGRAPH + {0x8755, 0x5626}, //1162 #CJK UNIFIED IDEOGRAPH + {0x8756, 0x5628}, //1163 #CJK UNIFIED IDEOGRAPH + {0x8757, 0x5629}, //1164 #CJK UNIFIED IDEOGRAPH + {0x8758, 0x562A}, //1165 #CJK UNIFIED IDEOGRAPH + {0x8759, 0x562B}, //1166 #CJK UNIFIED IDEOGRAPH + {0x875A, 0x562E}, //1167 #CJK UNIFIED IDEOGRAPH + {0x875B, 0x562F}, //1168 #CJK UNIFIED IDEOGRAPH + {0x875C, 0x5630}, //1169 #CJK UNIFIED IDEOGRAPH + {0x875D, 0x5633}, //1170 #CJK UNIFIED IDEOGRAPH + {0x875E, 0x5635}, //1171 #CJK UNIFIED IDEOGRAPH + {0x875F, 0x5637}, //1172 #CJK UNIFIED IDEOGRAPH + {0x8760, 0x5638}, //1173 #CJK UNIFIED IDEOGRAPH + {0x8761, 0x563A}, //1174 #CJK UNIFIED IDEOGRAPH + {0x8762, 0x563C}, //1175 #CJK UNIFIED IDEOGRAPH + {0x8763, 0x563D}, //1176 #CJK UNIFIED IDEOGRAPH + {0x8764, 0x563E}, //1177 #CJK UNIFIED IDEOGRAPH + {0x8765, 0x5640}, //1178 #CJK UNIFIED IDEOGRAPH + {0x8766, 0x5641}, //1179 #CJK UNIFIED IDEOGRAPH + {0x8767, 0x5642}, //1180 #CJK UNIFIED IDEOGRAPH + {0x8768, 0x5643}, //1181 #CJK UNIFIED IDEOGRAPH + {0x8769, 0x5644}, //1182 #CJK UNIFIED IDEOGRAPH + {0x876A, 0x5645}, //1183 #CJK UNIFIED IDEOGRAPH + {0x876B, 0x5646}, //1184 #CJK UNIFIED IDEOGRAPH + {0x876C, 0x5647}, //1185 #CJK UNIFIED IDEOGRAPH + {0x876D, 0x5648}, //1186 #CJK UNIFIED IDEOGRAPH + {0x876E, 0x5649}, //1187 #CJK UNIFIED IDEOGRAPH + {0x876F, 0x564A}, //1188 #CJK UNIFIED IDEOGRAPH + {0x8770, 0x564B}, //1189 #CJK UNIFIED IDEOGRAPH + {0x8771, 0x564F}, //1190 #CJK UNIFIED IDEOGRAPH + {0x8772, 0x5650}, //1191 #CJK UNIFIED IDEOGRAPH + {0x8773, 0x5651}, //1192 #CJK UNIFIED IDEOGRAPH + {0x8774, 0x5652}, //1193 #CJK UNIFIED IDEOGRAPH + {0x8775, 0x5653}, //1194 #CJK UNIFIED IDEOGRAPH + {0x8776, 0x5655}, //1195 #CJK UNIFIED IDEOGRAPH + {0x8777, 0x5656}, //1196 #CJK UNIFIED IDEOGRAPH + {0x8778, 0x565A}, //1197 #CJK UNIFIED IDEOGRAPH + {0x8779, 0x565B}, //1198 #CJK UNIFIED IDEOGRAPH + {0x877A, 0x565D}, //1199 #CJK UNIFIED IDEOGRAPH + {0x877B, 0x565E}, //1200 #CJK UNIFIED IDEOGRAPH + {0x877C, 0x565F}, //1201 #CJK UNIFIED IDEOGRAPH + {0x877D, 0x5660}, //1202 #CJK UNIFIED IDEOGRAPH + {0x877E, 0x5661}, //1203 #CJK UNIFIED IDEOGRAPH + {0x8780, 0x5663}, //1204 #CJK UNIFIED IDEOGRAPH + {0x8781, 0x5665}, //1205 #CJK UNIFIED IDEOGRAPH + {0x8782, 0x5666}, //1206 #CJK UNIFIED IDEOGRAPH + {0x8783, 0x5667}, //1207 #CJK UNIFIED IDEOGRAPH + {0x8784, 0x566D}, //1208 #CJK UNIFIED IDEOGRAPH + {0x8785, 0x566E}, //1209 #CJK UNIFIED IDEOGRAPH + {0x8786, 0x566F}, //1210 #CJK UNIFIED IDEOGRAPH + {0x8787, 0x5670}, //1211 #CJK UNIFIED IDEOGRAPH + {0x8788, 0x5672}, //1212 #CJK UNIFIED IDEOGRAPH + {0x8789, 0x5673}, //1213 #CJK UNIFIED IDEOGRAPH + {0x878A, 0x5674}, //1214 #CJK UNIFIED IDEOGRAPH + {0x878B, 0x5675}, //1215 #CJK UNIFIED IDEOGRAPH + {0x878C, 0x5677}, //1216 #CJK UNIFIED IDEOGRAPH + {0x878D, 0x5678}, //1217 #CJK UNIFIED IDEOGRAPH + {0x878E, 0x5679}, //1218 #CJK UNIFIED IDEOGRAPH + {0x878F, 0x567A}, //1219 #CJK UNIFIED IDEOGRAPH + {0x8790, 0x567D}, //1220 #CJK UNIFIED IDEOGRAPH + {0x8791, 0x567E}, //1221 #CJK UNIFIED IDEOGRAPH + {0x8792, 0x567F}, //1222 #CJK UNIFIED IDEOGRAPH + {0x8793, 0x5680}, //1223 #CJK UNIFIED IDEOGRAPH + {0x8794, 0x5681}, //1224 #CJK UNIFIED IDEOGRAPH + {0x8795, 0x5682}, //1225 #CJK UNIFIED IDEOGRAPH + {0x8796, 0x5683}, //1226 #CJK UNIFIED IDEOGRAPH + {0x8797, 0x5684}, //1227 #CJK UNIFIED IDEOGRAPH + {0x8798, 0x5687}, //1228 #CJK UNIFIED IDEOGRAPH + {0x8799, 0x5688}, //1229 #CJK UNIFIED IDEOGRAPH + {0x879A, 0x5689}, //1230 #CJK UNIFIED IDEOGRAPH + {0x879B, 0x568A}, //1231 #CJK UNIFIED IDEOGRAPH + {0x879C, 0x568B}, //1232 #CJK UNIFIED IDEOGRAPH + {0x879D, 0x568C}, //1233 #CJK UNIFIED IDEOGRAPH + {0x879E, 0x568D}, //1234 #CJK UNIFIED IDEOGRAPH + {0x879F, 0x5690}, //1235 #CJK UNIFIED IDEOGRAPH + {0x87A0, 0x5691}, //1236 #CJK UNIFIED IDEOGRAPH + {0x87A1, 0x5692}, //1237 #CJK UNIFIED IDEOGRAPH + {0x87A2, 0x5694}, //1238 #CJK UNIFIED IDEOGRAPH + {0x87A3, 0x5695}, //1239 #CJK UNIFIED IDEOGRAPH + {0x87A4, 0x5696}, //1240 #CJK UNIFIED IDEOGRAPH + {0x87A5, 0x5697}, //1241 #CJK UNIFIED IDEOGRAPH + {0x87A6, 0x5698}, //1242 #CJK UNIFIED IDEOGRAPH + {0x87A7, 0x5699}, //1243 #CJK UNIFIED IDEOGRAPH + {0x87A8, 0x569A}, //1244 #CJK UNIFIED IDEOGRAPH + {0x87A9, 0x569B}, //1245 #CJK UNIFIED IDEOGRAPH + {0x87AA, 0x569C}, //1246 #CJK UNIFIED IDEOGRAPH + {0x87AB, 0x569D}, //1247 #CJK UNIFIED IDEOGRAPH + {0x87AC, 0x569E}, //1248 #CJK UNIFIED IDEOGRAPH + {0x87AD, 0x569F}, //1249 #CJK UNIFIED IDEOGRAPH + {0x87AE, 0x56A0}, //1250 #CJK UNIFIED IDEOGRAPH + {0x87AF, 0x56A1}, //1251 #CJK UNIFIED IDEOGRAPH + {0x87B0, 0x56A2}, //1252 #CJK UNIFIED IDEOGRAPH + {0x87B1, 0x56A4}, //1253 #CJK UNIFIED IDEOGRAPH + {0x87B2, 0x56A5}, //1254 #CJK UNIFIED IDEOGRAPH + {0x87B3, 0x56A6}, //1255 #CJK UNIFIED IDEOGRAPH + {0x87B4, 0x56A7}, //1256 #CJK UNIFIED IDEOGRAPH + {0x87B5, 0x56A8}, //1257 #CJK UNIFIED IDEOGRAPH + {0x87B6, 0x56A9}, //1258 #CJK UNIFIED IDEOGRAPH + {0x87B7, 0x56AA}, //1259 #CJK UNIFIED IDEOGRAPH + {0x87B8, 0x56AB}, //1260 #CJK UNIFIED IDEOGRAPH + {0x87B9, 0x56AC}, //1261 #CJK UNIFIED IDEOGRAPH + {0x87BA, 0x56AD}, //1262 #CJK UNIFIED IDEOGRAPH + {0x87BB, 0x56AE}, //1263 #CJK UNIFIED IDEOGRAPH + {0x87BC, 0x56B0}, //1264 #CJK UNIFIED IDEOGRAPH + {0x87BD, 0x56B1}, //1265 #CJK UNIFIED IDEOGRAPH + {0x87BE, 0x56B2}, //1266 #CJK UNIFIED IDEOGRAPH + {0x87BF, 0x56B3}, //1267 #CJK UNIFIED IDEOGRAPH + {0x87C0, 0x56B4}, //1268 #CJK UNIFIED IDEOGRAPH + {0x87C1, 0x56B5}, //1269 #CJK UNIFIED IDEOGRAPH + {0x87C2, 0x56B6}, //1270 #CJK UNIFIED IDEOGRAPH + {0x87C3, 0x56B8}, //1271 #CJK UNIFIED IDEOGRAPH + {0x87C4, 0x56B9}, //1272 #CJK UNIFIED IDEOGRAPH + {0x87C5, 0x56BA}, //1273 #CJK UNIFIED IDEOGRAPH + {0x87C6, 0x56BB}, //1274 #CJK UNIFIED IDEOGRAPH + {0x87C7, 0x56BD}, //1275 #CJK UNIFIED IDEOGRAPH + {0x87C8, 0x56BE}, //1276 #CJK UNIFIED IDEOGRAPH + {0x87C9, 0x56BF}, //1277 #CJK UNIFIED IDEOGRAPH + {0x87CA, 0x56C0}, //1278 #CJK UNIFIED IDEOGRAPH + {0x87CB, 0x56C1}, //1279 #CJK UNIFIED IDEOGRAPH + {0x87CC, 0x56C2}, //1280 #CJK UNIFIED IDEOGRAPH + {0x87CD, 0x56C3}, //1281 #CJK UNIFIED IDEOGRAPH + {0x87CE, 0x56C4}, //1282 #CJK UNIFIED IDEOGRAPH + {0x87CF, 0x56C5}, //1283 #CJK UNIFIED IDEOGRAPH + {0x87D0, 0x56C6}, //1284 #CJK UNIFIED IDEOGRAPH + {0x87D1, 0x56C7}, //1285 #CJK UNIFIED IDEOGRAPH + {0x87D2, 0x56C8}, //1286 #CJK UNIFIED IDEOGRAPH + {0x87D3, 0x56C9}, //1287 #CJK UNIFIED IDEOGRAPH + {0x87D4, 0x56CB}, //1288 #CJK UNIFIED IDEOGRAPH + {0x87D5, 0x56CC}, //1289 #CJK UNIFIED IDEOGRAPH + {0x87D6, 0x56CD}, //1290 #CJK UNIFIED IDEOGRAPH + {0x87D7, 0x56CE}, //1291 #CJK UNIFIED IDEOGRAPH + {0x87D8, 0x56CF}, //1292 #CJK UNIFIED IDEOGRAPH + {0x87D9, 0x56D0}, //1293 #CJK UNIFIED IDEOGRAPH + {0x87DA, 0x56D1}, //1294 #CJK UNIFIED IDEOGRAPH + {0x87DB, 0x56D2}, //1295 #CJK UNIFIED IDEOGRAPH + {0x87DC, 0x56D3}, //1296 #CJK UNIFIED IDEOGRAPH + {0x87DD, 0x56D5}, //1297 #CJK UNIFIED IDEOGRAPH + {0x87DE, 0x56D6}, //1298 #CJK UNIFIED IDEOGRAPH + {0x87DF, 0x56D8}, //1299 #CJK UNIFIED IDEOGRAPH + {0x87E0, 0x56D9}, //1300 #CJK UNIFIED IDEOGRAPH + {0x87E1, 0x56DC}, //1301 #CJK UNIFIED IDEOGRAPH + {0x87E2, 0x56E3}, //1302 #CJK UNIFIED IDEOGRAPH + {0x87E3, 0x56E5}, //1303 #CJK UNIFIED IDEOGRAPH + {0x87E4, 0x56E6}, //1304 #CJK UNIFIED IDEOGRAPH + {0x87E5, 0x56E7}, //1305 #CJK UNIFIED IDEOGRAPH + {0x87E6, 0x56E8}, //1306 #CJK UNIFIED IDEOGRAPH + {0x87E7, 0x56E9}, //1307 #CJK UNIFIED IDEOGRAPH + {0x87E8, 0x56EA}, //1308 #CJK UNIFIED IDEOGRAPH + {0x87E9, 0x56EC}, //1309 #CJK UNIFIED IDEOGRAPH + {0x87EA, 0x56EE}, //1310 #CJK UNIFIED IDEOGRAPH + {0x87EB, 0x56EF}, //1311 #CJK UNIFIED IDEOGRAPH + {0x87EC, 0x56F2}, //1312 #CJK UNIFIED IDEOGRAPH + {0x87ED, 0x56F3}, //1313 #CJK UNIFIED IDEOGRAPH + {0x87EE, 0x56F6}, //1314 #CJK UNIFIED IDEOGRAPH + {0x87EF, 0x56F7}, //1315 #CJK UNIFIED IDEOGRAPH + {0x87F0, 0x56F8}, //1316 #CJK UNIFIED IDEOGRAPH + {0x87F1, 0x56FB}, //1317 #CJK UNIFIED IDEOGRAPH + {0x87F2, 0x56FC}, //1318 #CJK UNIFIED IDEOGRAPH + {0x87F3, 0x5700}, //1319 #CJK UNIFIED IDEOGRAPH + {0x87F4, 0x5701}, //1320 #CJK UNIFIED IDEOGRAPH + {0x87F5, 0x5702}, //1321 #CJK UNIFIED IDEOGRAPH + {0x87F6, 0x5705}, //1322 #CJK UNIFIED IDEOGRAPH + {0x87F7, 0x5707}, //1323 #CJK UNIFIED IDEOGRAPH + {0x87F8, 0x570B}, //1324 #CJK UNIFIED IDEOGRAPH + {0x87F9, 0x570C}, //1325 #CJK UNIFIED IDEOGRAPH + {0x87FA, 0x570D}, //1326 #CJK UNIFIED IDEOGRAPH + {0x87FB, 0x570E}, //1327 #CJK UNIFIED IDEOGRAPH + {0x87FC, 0x570F}, //1328 #CJK UNIFIED IDEOGRAPH + {0x87FD, 0x5710}, //1329 #CJK UNIFIED IDEOGRAPH + {0x87FE, 0x5711}, //1330 #CJK UNIFIED IDEOGRAPH + {0x8840, 0x5712}, //1331 #CJK UNIFIED IDEOGRAPH + {0x8841, 0x5713}, //1332 #CJK UNIFIED IDEOGRAPH + {0x8842, 0x5714}, //1333 #CJK UNIFIED IDEOGRAPH + {0x8843, 0x5715}, //1334 #CJK UNIFIED IDEOGRAPH + {0x8844, 0x5716}, //1335 #CJK UNIFIED IDEOGRAPH + {0x8845, 0x5717}, //1336 #CJK UNIFIED IDEOGRAPH + {0x8846, 0x5718}, //1337 #CJK UNIFIED IDEOGRAPH + {0x8847, 0x5719}, //1338 #CJK UNIFIED IDEOGRAPH + {0x8848, 0x571A}, //1339 #CJK UNIFIED IDEOGRAPH + {0x8849, 0x571B}, //1340 #CJK UNIFIED IDEOGRAPH + {0x884A, 0x571D}, //1341 #CJK UNIFIED IDEOGRAPH + {0x884B, 0x571E}, //1342 #CJK UNIFIED IDEOGRAPH + {0x884C, 0x5720}, //1343 #CJK UNIFIED IDEOGRAPH + {0x884D, 0x5721}, //1344 #CJK UNIFIED IDEOGRAPH + {0x884E, 0x5722}, //1345 #CJK UNIFIED IDEOGRAPH + {0x884F, 0x5724}, //1346 #CJK UNIFIED IDEOGRAPH + {0x8850, 0x5725}, //1347 #CJK UNIFIED IDEOGRAPH + {0x8851, 0x5726}, //1348 #CJK UNIFIED IDEOGRAPH + {0x8852, 0x5727}, //1349 #CJK UNIFIED IDEOGRAPH + {0x8853, 0x572B}, //1350 #CJK UNIFIED IDEOGRAPH + {0x8854, 0x5731}, //1351 #CJK UNIFIED IDEOGRAPH + {0x8855, 0x5732}, //1352 #CJK UNIFIED IDEOGRAPH + {0x8856, 0x5734}, //1353 #CJK UNIFIED IDEOGRAPH + {0x8857, 0x5735}, //1354 #CJK UNIFIED IDEOGRAPH + {0x8858, 0x5736}, //1355 #CJK UNIFIED IDEOGRAPH + {0x8859, 0x5737}, //1356 #CJK UNIFIED IDEOGRAPH + {0x885A, 0x5738}, //1357 #CJK UNIFIED IDEOGRAPH + {0x885B, 0x573C}, //1358 #CJK UNIFIED IDEOGRAPH + {0x885C, 0x573D}, //1359 #CJK UNIFIED IDEOGRAPH + {0x885D, 0x573F}, //1360 #CJK UNIFIED IDEOGRAPH + {0x885E, 0x5741}, //1361 #CJK UNIFIED IDEOGRAPH + {0x885F, 0x5743}, //1362 #CJK UNIFIED IDEOGRAPH + {0x8860, 0x5744}, //1363 #CJK UNIFIED IDEOGRAPH + {0x8861, 0x5745}, //1364 #CJK UNIFIED IDEOGRAPH + {0x8862, 0x5746}, //1365 #CJK UNIFIED IDEOGRAPH + {0x8863, 0x5748}, //1366 #CJK UNIFIED IDEOGRAPH + {0x8864, 0x5749}, //1367 #CJK UNIFIED IDEOGRAPH + {0x8865, 0x574B}, //1368 #CJK UNIFIED IDEOGRAPH + {0x8866, 0x5752}, //1369 #CJK UNIFIED IDEOGRAPH + {0x8867, 0x5753}, //1370 #CJK UNIFIED IDEOGRAPH + {0x8868, 0x5754}, //1371 #CJK UNIFIED IDEOGRAPH + {0x8869, 0x5755}, //1372 #CJK UNIFIED IDEOGRAPH + {0x886A, 0x5756}, //1373 #CJK UNIFIED IDEOGRAPH + {0x886B, 0x5758}, //1374 #CJK UNIFIED IDEOGRAPH + {0x886C, 0x5759}, //1375 #CJK UNIFIED IDEOGRAPH + {0x886D, 0x5762}, //1376 #CJK UNIFIED IDEOGRAPH + {0x886E, 0x5763}, //1377 #CJK UNIFIED IDEOGRAPH + {0x886F, 0x5765}, //1378 #CJK UNIFIED IDEOGRAPH + {0x8870, 0x5767}, //1379 #CJK UNIFIED IDEOGRAPH + {0x8871, 0x576C}, //1380 #CJK UNIFIED IDEOGRAPH + {0x8872, 0x576E}, //1381 #CJK UNIFIED IDEOGRAPH + {0x8873, 0x5770}, //1382 #CJK UNIFIED IDEOGRAPH + {0x8874, 0x5771}, //1383 #CJK UNIFIED IDEOGRAPH + {0x8875, 0x5772}, //1384 #CJK UNIFIED IDEOGRAPH + {0x8876, 0x5774}, //1385 #CJK UNIFIED IDEOGRAPH + {0x8877, 0x5775}, //1386 #CJK UNIFIED IDEOGRAPH + {0x8878, 0x5778}, //1387 #CJK UNIFIED IDEOGRAPH + {0x8879, 0x5779}, //1388 #CJK UNIFIED IDEOGRAPH + {0x887A, 0x577A}, //1389 #CJK UNIFIED IDEOGRAPH + {0x887B, 0x577D}, //1390 #CJK UNIFIED IDEOGRAPH + {0x887C, 0x577E}, //1391 #CJK UNIFIED IDEOGRAPH + {0x887D, 0x577F}, //1392 #CJK UNIFIED IDEOGRAPH + {0x887E, 0x5780}, //1393 #CJK UNIFIED IDEOGRAPH + {0x8880, 0x5781}, //1394 #CJK UNIFIED IDEOGRAPH + {0x8881, 0x5787}, //1395 #CJK UNIFIED IDEOGRAPH + {0x8882, 0x5788}, //1396 #CJK UNIFIED IDEOGRAPH + {0x8883, 0x5789}, //1397 #CJK UNIFIED IDEOGRAPH + {0x8884, 0x578A}, //1398 #CJK UNIFIED IDEOGRAPH + {0x8885, 0x578D}, //1399 #CJK UNIFIED IDEOGRAPH + {0x8886, 0x578E}, //1400 #CJK UNIFIED IDEOGRAPH + {0x8887, 0x578F}, //1401 #CJK UNIFIED IDEOGRAPH + {0x8888, 0x5790}, //1402 #CJK UNIFIED IDEOGRAPH + {0x8889, 0x5791}, //1403 #CJK UNIFIED IDEOGRAPH + {0x888A, 0x5794}, //1404 #CJK UNIFIED IDEOGRAPH + {0x888B, 0x5795}, //1405 #CJK UNIFIED IDEOGRAPH + {0x888C, 0x5796}, //1406 #CJK UNIFIED IDEOGRAPH + {0x888D, 0x5797}, //1407 #CJK UNIFIED IDEOGRAPH + {0x888E, 0x5798}, //1408 #CJK UNIFIED IDEOGRAPH + {0x888F, 0x5799}, //1409 #CJK UNIFIED IDEOGRAPH + {0x8890, 0x579A}, //1410 #CJK UNIFIED IDEOGRAPH + {0x8891, 0x579C}, //1411 #CJK UNIFIED IDEOGRAPH + {0x8892, 0x579D}, //1412 #CJK UNIFIED IDEOGRAPH + {0x8893, 0x579E}, //1413 #CJK UNIFIED IDEOGRAPH + {0x8894, 0x579F}, //1414 #CJK UNIFIED IDEOGRAPH + {0x8895, 0x57A5}, //1415 #CJK UNIFIED IDEOGRAPH + {0x8896, 0x57A8}, //1416 #CJK UNIFIED IDEOGRAPH + {0x8897, 0x57AA}, //1417 #CJK UNIFIED IDEOGRAPH + {0x8898, 0x57AC}, //1418 #CJK UNIFIED IDEOGRAPH + {0x8899, 0x57AF}, //1419 #CJK UNIFIED IDEOGRAPH + {0x889A, 0x57B0}, //1420 #CJK UNIFIED IDEOGRAPH + {0x889B, 0x57B1}, //1421 #CJK UNIFIED IDEOGRAPH + {0x889C, 0x57B3}, //1422 #CJK UNIFIED IDEOGRAPH + {0x889D, 0x57B5}, //1423 #CJK UNIFIED IDEOGRAPH + {0x889E, 0x57B6}, //1424 #CJK UNIFIED IDEOGRAPH + {0x889F, 0x57B7}, //1425 #CJK UNIFIED IDEOGRAPH + {0x88A0, 0x57B9}, //1426 #CJK UNIFIED IDEOGRAPH + {0x88A1, 0x57BA}, //1427 #CJK UNIFIED IDEOGRAPH + {0x88A2, 0x57BB}, //1428 #CJK UNIFIED IDEOGRAPH + {0x88A3, 0x57BC}, //1429 #CJK UNIFIED IDEOGRAPH + {0x88A4, 0x57BD}, //1430 #CJK UNIFIED IDEOGRAPH + {0x88A5, 0x57BE}, //1431 #CJK UNIFIED IDEOGRAPH + {0x88A6, 0x57BF}, //1432 #CJK UNIFIED IDEOGRAPH + {0x88A7, 0x57C0}, //1433 #CJK UNIFIED IDEOGRAPH + {0x88A8, 0x57C1}, //1434 #CJK UNIFIED IDEOGRAPH + {0x88A9, 0x57C4}, //1435 #CJK UNIFIED IDEOGRAPH + {0x88AA, 0x57C5}, //1436 #CJK UNIFIED IDEOGRAPH + {0x88AB, 0x57C6}, //1437 #CJK UNIFIED IDEOGRAPH + {0x88AC, 0x57C7}, //1438 #CJK UNIFIED IDEOGRAPH + {0x88AD, 0x57C8}, //1439 #CJK UNIFIED IDEOGRAPH + {0x88AE, 0x57C9}, //1440 #CJK UNIFIED IDEOGRAPH + {0x88AF, 0x57CA}, //1441 #CJK UNIFIED IDEOGRAPH + {0x88B0, 0x57CC}, //1442 #CJK UNIFIED IDEOGRAPH + {0x88B1, 0x57CD}, //1443 #CJK UNIFIED IDEOGRAPH + {0x88B2, 0x57D0}, //1444 #CJK UNIFIED IDEOGRAPH + {0x88B3, 0x57D1}, //1445 #CJK UNIFIED IDEOGRAPH + {0x88B4, 0x57D3}, //1446 #CJK UNIFIED IDEOGRAPH + {0x88B5, 0x57D6}, //1447 #CJK UNIFIED IDEOGRAPH + {0x88B6, 0x57D7}, //1448 #CJK UNIFIED IDEOGRAPH + {0x88B7, 0x57DB}, //1449 #CJK UNIFIED IDEOGRAPH + {0x88B8, 0x57DC}, //1450 #CJK UNIFIED IDEOGRAPH + {0x88B9, 0x57DE}, //1451 #CJK UNIFIED IDEOGRAPH + {0x88BA, 0x57E1}, //1452 #CJK UNIFIED IDEOGRAPH + {0x88BB, 0x57E2}, //1453 #CJK UNIFIED IDEOGRAPH + {0x88BC, 0x57E3}, //1454 #CJK UNIFIED IDEOGRAPH + {0x88BD, 0x57E5}, //1455 #CJK UNIFIED IDEOGRAPH + {0x88BE, 0x57E6}, //1456 #CJK UNIFIED IDEOGRAPH + {0x88BF, 0x57E7}, //1457 #CJK UNIFIED IDEOGRAPH + {0x88C0, 0x57E8}, //1458 #CJK UNIFIED IDEOGRAPH + {0x88C1, 0x57E9}, //1459 #CJK UNIFIED IDEOGRAPH + {0x88C2, 0x57EA}, //1460 #CJK UNIFIED IDEOGRAPH + {0x88C3, 0x57EB}, //1461 #CJK UNIFIED IDEOGRAPH + {0x88C4, 0x57EC}, //1462 #CJK UNIFIED IDEOGRAPH + {0x88C5, 0x57EE}, //1463 #CJK UNIFIED IDEOGRAPH + {0x88C6, 0x57F0}, //1464 #CJK UNIFIED IDEOGRAPH + {0x88C7, 0x57F1}, //1465 #CJK UNIFIED IDEOGRAPH + {0x88C8, 0x57F2}, //1466 #CJK UNIFIED IDEOGRAPH + {0x88C9, 0x57F3}, //1467 #CJK UNIFIED IDEOGRAPH + {0x88CA, 0x57F5}, //1468 #CJK UNIFIED IDEOGRAPH + {0x88CB, 0x57F6}, //1469 #CJK UNIFIED IDEOGRAPH + {0x88CC, 0x57F7}, //1470 #CJK UNIFIED IDEOGRAPH + {0x88CD, 0x57FB}, //1471 #CJK UNIFIED IDEOGRAPH + {0x88CE, 0x57FC}, //1472 #CJK UNIFIED IDEOGRAPH + {0x88CF, 0x57FE}, //1473 #CJK UNIFIED IDEOGRAPH + {0x88D0, 0x57FF}, //1474 #CJK UNIFIED IDEOGRAPH + {0x88D1, 0x5801}, //1475 #CJK UNIFIED IDEOGRAPH + {0x88D2, 0x5803}, //1476 #CJK UNIFIED IDEOGRAPH + {0x88D3, 0x5804}, //1477 #CJK UNIFIED IDEOGRAPH + {0x88D4, 0x5805}, //1478 #CJK UNIFIED IDEOGRAPH + {0x88D5, 0x5808}, //1479 #CJK UNIFIED IDEOGRAPH + {0x88D6, 0x5809}, //1480 #CJK UNIFIED IDEOGRAPH + {0x88D7, 0x580A}, //1481 #CJK UNIFIED IDEOGRAPH + {0x88D8, 0x580C}, //1482 #CJK UNIFIED IDEOGRAPH + {0x88D9, 0x580E}, //1483 #CJK UNIFIED IDEOGRAPH + {0x88DA, 0x580F}, //1484 #CJK UNIFIED IDEOGRAPH + {0x88DB, 0x5810}, //1485 #CJK UNIFIED IDEOGRAPH + {0x88DC, 0x5812}, //1486 #CJK UNIFIED IDEOGRAPH + {0x88DD, 0x5813}, //1487 #CJK UNIFIED IDEOGRAPH + {0x88DE, 0x5814}, //1488 #CJK UNIFIED IDEOGRAPH + {0x88DF, 0x5816}, //1489 #CJK UNIFIED IDEOGRAPH + {0x88E0, 0x5817}, //1490 #CJK UNIFIED IDEOGRAPH + {0x88E1, 0x5818}, //1491 #CJK UNIFIED IDEOGRAPH + {0x88E2, 0x581A}, //1492 #CJK UNIFIED IDEOGRAPH + {0x88E3, 0x581B}, //1493 #CJK UNIFIED IDEOGRAPH + {0x88E4, 0x581C}, //1494 #CJK UNIFIED IDEOGRAPH + {0x88E5, 0x581D}, //1495 #CJK UNIFIED IDEOGRAPH + {0x88E6, 0x581F}, //1496 #CJK UNIFIED IDEOGRAPH + {0x88E7, 0x5822}, //1497 #CJK UNIFIED IDEOGRAPH + {0x88E8, 0x5823}, //1498 #CJK UNIFIED IDEOGRAPH + {0x88E9, 0x5825}, //1499 #CJK UNIFIED IDEOGRAPH + {0x88EA, 0x5826}, //1500 #CJK UNIFIED IDEOGRAPH + {0x88EB, 0x5827}, //1501 #CJK UNIFIED IDEOGRAPH + {0x88EC, 0x5828}, //1502 #CJK UNIFIED IDEOGRAPH + {0x88ED, 0x5829}, //1503 #CJK UNIFIED IDEOGRAPH + {0x88EE, 0x582B}, //1504 #CJK UNIFIED IDEOGRAPH + {0x88EF, 0x582C}, //1505 #CJK UNIFIED IDEOGRAPH + {0x88F0, 0x582D}, //1506 #CJK UNIFIED IDEOGRAPH + {0x88F1, 0x582E}, //1507 #CJK UNIFIED IDEOGRAPH + {0x88F2, 0x582F}, //1508 #CJK UNIFIED IDEOGRAPH + {0x88F3, 0x5831}, //1509 #CJK UNIFIED IDEOGRAPH + {0x88F4, 0x5832}, //1510 #CJK UNIFIED IDEOGRAPH + {0x88F5, 0x5833}, //1511 #CJK UNIFIED IDEOGRAPH + {0x88F6, 0x5834}, //1512 #CJK UNIFIED IDEOGRAPH + {0x88F7, 0x5836}, //1513 #CJK UNIFIED IDEOGRAPH + {0x88F8, 0x5837}, //1514 #CJK UNIFIED IDEOGRAPH + {0x88F9, 0x5838}, //1515 #CJK UNIFIED IDEOGRAPH + {0x88FA, 0x5839}, //1516 #CJK UNIFIED IDEOGRAPH + {0x88FB, 0x583A}, //1517 #CJK UNIFIED IDEOGRAPH + {0x88FC, 0x583B}, //1518 #CJK UNIFIED IDEOGRAPH + {0x88FD, 0x583C}, //1519 #CJK UNIFIED IDEOGRAPH + {0x88FE, 0x583D}, //1520 #CJK UNIFIED IDEOGRAPH + {0x8940, 0x583E}, //1521 #CJK UNIFIED IDEOGRAPH + {0x8941, 0x583F}, //1522 #CJK UNIFIED IDEOGRAPH + {0x8942, 0x5840}, //1523 #CJK UNIFIED IDEOGRAPH + {0x8943, 0x5841}, //1524 #CJK UNIFIED IDEOGRAPH + {0x8944, 0x5842}, //1525 #CJK UNIFIED IDEOGRAPH + {0x8945, 0x5843}, //1526 #CJK UNIFIED IDEOGRAPH + {0x8946, 0x5845}, //1527 #CJK UNIFIED IDEOGRAPH + {0x8947, 0x5846}, //1528 #CJK UNIFIED IDEOGRAPH + {0x8948, 0x5847}, //1529 #CJK UNIFIED IDEOGRAPH + {0x8949, 0x5848}, //1530 #CJK UNIFIED IDEOGRAPH + {0x894A, 0x5849}, //1531 #CJK UNIFIED IDEOGRAPH + {0x894B, 0x584A}, //1532 #CJK UNIFIED IDEOGRAPH + {0x894C, 0x584B}, //1533 #CJK UNIFIED IDEOGRAPH + {0x894D, 0x584E}, //1534 #CJK UNIFIED IDEOGRAPH + {0x894E, 0x584F}, //1535 #CJK UNIFIED IDEOGRAPH + {0x894F, 0x5850}, //1536 #CJK UNIFIED IDEOGRAPH + {0x8950, 0x5852}, //1537 #CJK UNIFIED IDEOGRAPH + {0x8951, 0x5853}, //1538 #CJK UNIFIED IDEOGRAPH + {0x8952, 0x5855}, //1539 #CJK UNIFIED IDEOGRAPH + {0x8953, 0x5856}, //1540 #CJK UNIFIED IDEOGRAPH + {0x8954, 0x5857}, //1541 #CJK UNIFIED IDEOGRAPH + {0x8955, 0x5859}, //1542 #CJK UNIFIED IDEOGRAPH + {0x8956, 0x585A}, //1543 #CJK UNIFIED IDEOGRAPH + {0x8957, 0x585B}, //1544 #CJK UNIFIED IDEOGRAPH + {0x8958, 0x585C}, //1545 #CJK UNIFIED IDEOGRAPH + {0x8959, 0x585D}, //1546 #CJK UNIFIED IDEOGRAPH + {0x895A, 0x585F}, //1547 #CJK UNIFIED IDEOGRAPH + {0x895B, 0x5860}, //1548 #CJK UNIFIED IDEOGRAPH + {0x895C, 0x5861}, //1549 #CJK UNIFIED IDEOGRAPH + {0x895D, 0x5862}, //1550 #CJK UNIFIED IDEOGRAPH + {0x895E, 0x5863}, //1551 #CJK UNIFIED IDEOGRAPH + {0x895F, 0x5864}, //1552 #CJK UNIFIED IDEOGRAPH + {0x8960, 0x5866}, //1553 #CJK UNIFIED IDEOGRAPH + {0x8961, 0x5867}, //1554 #CJK UNIFIED IDEOGRAPH + {0x8962, 0x5868}, //1555 #CJK UNIFIED IDEOGRAPH + {0x8963, 0x5869}, //1556 #CJK UNIFIED IDEOGRAPH + {0x8964, 0x586A}, //1557 #CJK UNIFIED IDEOGRAPH + {0x8965, 0x586D}, //1558 #CJK UNIFIED IDEOGRAPH + {0x8966, 0x586E}, //1559 #CJK UNIFIED IDEOGRAPH + {0x8967, 0x586F}, //1560 #CJK UNIFIED IDEOGRAPH + {0x8968, 0x5870}, //1561 #CJK UNIFIED IDEOGRAPH + {0x8969, 0x5871}, //1562 #CJK UNIFIED IDEOGRAPH + {0x896A, 0x5872}, //1563 #CJK UNIFIED IDEOGRAPH + {0x896B, 0x5873}, //1564 #CJK UNIFIED IDEOGRAPH + {0x896C, 0x5874}, //1565 #CJK UNIFIED IDEOGRAPH + {0x896D, 0x5875}, //1566 #CJK UNIFIED IDEOGRAPH + {0x896E, 0x5876}, //1567 #CJK UNIFIED IDEOGRAPH + {0x896F, 0x5877}, //1568 #CJK UNIFIED IDEOGRAPH + {0x8970, 0x5878}, //1569 #CJK UNIFIED IDEOGRAPH + {0x8971, 0x5879}, //1570 #CJK UNIFIED IDEOGRAPH + {0x8972, 0x587A}, //1571 #CJK UNIFIED IDEOGRAPH + {0x8973, 0x587B}, //1572 #CJK UNIFIED IDEOGRAPH + {0x8974, 0x587C}, //1573 #CJK UNIFIED IDEOGRAPH + {0x8975, 0x587D}, //1574 #CJK UNIFIED IDEOGRAPH + {0x8976, 0x587F}, //1575 #CJK UNIFIED IDEOGRAPH + {0x8977, 0x5882}, //1576 #CJK UNIFIED IDEOGRAPH + {0x8978, 0x5884}, //1577 #CJK UNIFIED IDEOGRAPH + {0x8979, 0x5886}, //1578 #CJK UNIFIED IDEOGRAPH + {0x897A, 0x5887}, //1579 #CJK UNIFIED IDEOGRAPH + {0x897B, 0x5888}, //1580 #CJK UNIFIED IDEOGRAPH + {0x897C, 0x588A}, //1581 #CJK UNIFIED IDEOGRAPH + {0x897D, 0x588B}, //1582 #CJK UNIFIED IDEOGRAPH + {0x897E, 0x588C}, //1583 #CJK UNIFIED IDEOGRAPH + {0x8980, 0x588D}, //1584 #CJK UNIFIED IDEOGRAPH + {0x8981, 0x588E}, //1585 #CJK UNIFIED IDEOGRAPH + {0x8982, 0x588F}, //1586 #CJK UNIFIED IDEOGRAPH + {0x8983, 0x5890}, //1587 #CJK UNIFIED IDEOGRAPH + {0x8984, 0x5891}, //1588 #CJK UNIFIED IDEOGRAPH + {0x8985, 0x5894}, //1589 #CJK UNIFIED IDEOGRAPH + {0x8986, 0x5895}, //1590 #CJK UNIFIED IDEOGRAPH + {0x8987, 0x5896}, //1591 #CJK UNIFIED IDEOGRAPH + {0x8988, 0x5897}, //1592 #CJK UNIFIED IDEOGRAPH + {0x8989, 0x5898}, //1593 #CJK UNIFIED IDEOGRAPH + {0x898A, 0x589B}, //1594 #CJK UNIFIED IDEOGRAPH + {0x898B, 0x589C}, //1595 #CJK UNIFIED IDEOGRAPH + {0x898C, 0x589D}, //1596 #CJK UNIFIED IDEOGRAPH + {0x898D, 0x58A0}, //1597 #CJK UNIFIED IDEOGRAPH + {0x898E, 0x58A1}, //1598 #CJK UNIFIED IDEOGRAPH + {0x898F, 0x58A2}, //1599 #CJK UNIFIED IDEOGRAPH + {0x8990, 0x58A3}, //1600 #CJK UNIFIED IDEOGRAPH + {0x8991, 0x58A4}, //1601 #CJK UNIFIED IDEOGRAPH + {0x8992, 0x58A5}, //1602 #CJK UNIFIED IDEOGRAPH + {0x8993, 0x58A6}, //1603 #CJK UNIFIED IDEOGRAPH + {0x8994, 0x58A7}, //1604 #CJK UNIFIED IDEOGRAPH + {0x8995, 0x58AA}, //1605 #CJK UNIFIED IDEOGRAPH + {0x8996, 0x58AB}, //1606 #CJK UNIFIED IDEOGRAPH + {0x8997, 0x58AC}, //1607 #CJK UNIFIED IDEOGRAPH + {0x8998, 0x58AD}, //1608 #CJK UNIFIED IDEOGRAPH + {0x8999, 0x58AE}, //1609 #CJK UNIFIED IDEOGRAPH + {0x899A, 0x58AF}, //1610 #CJK UNIFIED IDEOGRAPH + {0x899B, 0x58B0}, //1611 #CJK UNIFIED IDEOGRAPH + {0x899C, 0x58B1}, //1612 #CJK UNIFIED IDEOGRAPH + {0x899D, 0x58B2}, //1613 #CJK UNIFIED IDEOGRAPH + {0x899E, 0x58B3}, //1614 #CJK UNIFIED IDEOGRAPH + {0x899F, 0x58B4}, //1615 #CJK UNIFIED IDEOGRAPH + {0x89A0, 0x58B5}, //1616 #CJK UNIFIED IDEOGRAPH + {0x89A1, 0x58B6}, //1617 #CJK UNIFIED IDEOGRAPH + {0x89A2, 0x58B7}, //1618 #CJK UNIFIED IDEOGRAPH + {0x89A3, 0x58B8}, //1619 #CJK UNIFIED IDEOGRAPH + {0x89A4, 0x58B9}, //1620 #CJK UNIFIED IDEOGRAPH + {0x89A5, 0x58BA}, //1621 #CJK UNIFIED IDEOGRAPH + {0x89A6, 0x58BB}, //1622 #CJK UNIFIED IDEOGRAPH + {0x89A7, 0x58BD}, //1623 #CJK UNIFIED IDEOGRAPH + {0x89A8, 0x58BE}, //1624 #CJK UNIFIED IDEOGRAPH + {0x89A9, 0x58BF}, //1625 #CJK UNIFIED IDEOGRAPH + {0x89AA, 0x58C0}, //1626 #CJK UNIFIED IDEOGRAPH + {0x89AB, 0x58C2}, //1627 #CJK UNIFIED IDEOGRAPH + {0x89AC, 0x58C3}, //1628 #CJK UNIFIED IDEOGRAPH + {0x89AD, 0x58C4}, //1629 #CJK UNIFIED IDEOGRAPH + {0x89AE, 0x58C6}, //1630 #CJK UNIFIED IDEOGRAPH + {0x89AF, 0x58C7}, //1631 #CJK UNIFIED IDEOGRAPH + {0x89B0, 0x58C8}, //1632 #CJK UNIFIED IDEOGRAPH + {0x89B1, 0x58C9}, //1633 #CJK UNIFIED IDEOGRAPH + {0x89B2, 0x58CA}, //1634 #CJK UNIFIED IDEOGRAPH + {0x89B3, 0x58CB}, //1635 #CJK UNIFIED IDEOGRAPH + {0x89B4, 0x58CC}, //1636 #CJK UNIFIED IDEOGRAPH + {0x89B5, 0x58CD}, //1637 #CJK UNIFIED IDEOGRAPH + {0x89B6, 0x58CE}, //1638 #CJK UNIFIED IDEOGRAPH + {0x89B7, 0x58CF}, //1639 #CJK UNIFIED IDEOGRAPH + {0x89B8, 0x58D0}, //1640 #CJK UNIFIED IDEOGRAPH + {0x89B9, 0x58D2}, //1641 #CJK UNIFIED IDEOGRAPH + {0x89BA, 0x58D3}, //1642 #CJK UNIFIED IDEOGRAPH + {0x89BB, 0x58D4}, //1643 #CJK UNIFIED IDEOGRAPH + {0x89BC, 0x58D6}, //1644 #CJK UNIFIED IDEOGRAPH + {0x89BD, 0x58D7}, //1645 #CJK UNIFIED IDEOGRAPH + {0x89BE, 0x58D8}, //1646 #CJK UNIFIED IDEOGRAPH + {0x89BF, 0x58D9}, //1647 #CJK UNIFIED IDEOGRAPH + {0x89C0, 0x58DA}, //1648 #CJK UNIFIED IDEOGRAPH + {0x89C1, 0x58DB}, //1649 #CJK UNIFIED IDEOGRAPH + {0x89C2, 0x58DC}, //1650 #CJK UNIFIED IDEOGRAPH + {0x89C3, 0x58DD}, //1651 #CJK UNIFIED IDEOGRAPH + {0x89C4, 0x58DE}, //1652 #CJK UNIFIED IDEOGRAPH + {0x89C5, 0x58DF}, //1653 #CJK UNIFIED IDEOGRAPH + {0x89C6, 0x58E0}, //1654 #CJK UNIFIED IDEOGRAPH + {0x89C7, 0x58E1}, //1655 #CJK UNIFIED IDEOGRAPH + {0x89C8, 0x58E2}, //1656 #CJK UNIFIED IDEOGRAPH + {0x89C9, 0x58E3}, //1657 #CJK UNIFIED IDEOGRAPH + {0x89CA, 0x58E5}, //1658 #CJK UNIFIED IDEOGRAPH + {0x89CB, 0x58E6}, //1659 #CJK UNIFIED IDEOGRAPH + {0x89CC, 0x58E7}, //1660 #CJK UNIFIED IDEOGRAPH + {0x89CD, 0x58E8}, //1661 #CJK UNIFIED IDEOGRAPH + {0x89CE, 0x58E9}, //1662 #CJK UNIFIED IDEOGRAPH + {0x89CF, 0x58EA}, //1663 #CJK UNIFIED IDEOGRAPH + {0x89D0, 0x58ED}, //1664 #CJK UNIFIED IDEOGRAPH + {0x89D1, 0x58EF}, //1665 #CJK UNIFIED IDEOGRAPH + {0x89D2, 0x58F1}, //1666 #CJK UNIFIED IDEOGRAPH + {0x89D3, 0x58F2}, //1667 #CJK UNIFIED IDEOGRAPH + {0x89D4, 0x58F4}, //1668 #CJK UNIFIED IDEOGRAPH + {0x89D5, 0x58F5}, //1669 #CJK UNIFIED IDEOGRAPH + {0x89D6, 0x58F7}, //1670 #CJK UNIFIED IDEOGRAPH + {0x89D7, 0x58F8}, //1671 #CJK UNIFIED IDEOGRAPH + {0x89D8, 0x58FA}, //1672 #CJK UNIFIED IDEOGRAPH + {0x89D9, 0x58FB}, //1673 #CJK UNIFIED IDEOGRAPH + {0x89DA, 0x58FC}, //1674 #CJK UNIFIED IDEOGRAPH + {0x89DB, 0x58FD}, //1675 #CJK UNIFIED IDEOGRAPH + {0x89DC, 0x58FE}, //1676 #CJK UNIFIED IDEOGRAPH + {0x89DD, 0x58FF}, //1677 #CJK UNIFIED IDEOGRAPH + {0x89DE, 0x5900}, //1678 #CJK UNIFIED IDEOGRAPH + {0x89DF, 0x5901}, //1679 #CJK UNIFIED IDEOGRAPH + {0x89E0, 0x5903}, //1680 #CJK UNIFIED IDEOGRAPH + {0x89E1, 0x5905}, //1681 #CJK UNIFIED IDEOGRAPH + {0x89E2, 0x5906}, //1682 #CJK UNIFIED IDEOGRAPH + {0x89E3, 0x5908}, //1683 #CJK UNIFIED IDEOGRAPH + {0x89E4, 0x5909}, //1684 #CJK UNIFIED IDEOGRAPH + {0x89E5, 0x590A}, //1685 #CJK UNIFIED IDEOGRAPH + {0x89E6, 0x590B}, //1686 #CJK UNIFIED IDEOGRAPH + {0x89E7, 0x590C}, //1687 #CJK UNIFIED IDEOGRAPH + {0x89E8, 0x590E}, //1688 #CJK UNIFIED IDEOGRAPH + {0x89E9, 0x5910}, //1689 #CJK UNIFIED IDEOGRAPH + {0x89EA, 0x5911}, //1690 #CJK UNIFIED IDEOGRAPH + {0x89EB, 0x5912}, //1691 #CJK UNIFIED IDEOGRAPH + {0x89EC, 0x5913}, //1692 #CJK UNIFIED IDEOGRAPH + {0x89ED, 0x5917}, //1693 #CJK UNIFIED IDEOGRAPH + {0x89EE, 0x5918}, //1694 #CJK UNIFIED IDEOGRAPH + {0x89EF, 0x591B}, //1695 #CJK UNIFIED IDEOGRAPH + {0x89F0, 0x591D}, //1696 #CJK UNIFIED IDEOGRAPH + {0x89F1, 0x591E}, //1697 #CJK UNIFIED IDEOGRAPH + {0x89F2, 0x5920}, //1698 #CJK UNIFIED IDEOGRAPH + {0x89F3, 0x5921}, //1699 #CJK UNIFIED IDEOGRAPH + {0x89F4, 0x5922}, //1700 #CJK UNIFIED IDEOGRAPH + {0x89F5, 0x5923}, //1701 #CJK UNIFIED IDEOGRAPH + {0x89F6, 0x5926}, //1702 #CJK UNIFIED IDEOGRAPH + {0x89F7, 0x5928}, //1703 #CJK UNIFIED IDEOGRAPH + {0x89F8, 0x592C}, //1704 #CJK UNIFIED IDEOGRAPH + {0x89F9, 0x5930}, //1705 #CJK UNIFIED IDEOGRAPH + {0x89FA, 0x5932}, //1706 #CJK UNIFIED IDEOGRAPH + {0x89FB, 0x5933}, //1707 #CJK UNIFIED IDEOGRAPH + {0x89FC, 0x5935}, //1708 #CJK UNIFIED IDEOGRAPH + {0x89FD, 0x5936}, //1709 #CJK UNIFIED IDEOGRAPH + {0x89FE, 0x593B}, //1710 #CJK UNIFIED IDEOGRAPH + {0x8A40, 0x593D}, //1711 #CJK UNIFIED IDEOGRAPH + {0x8A41, 0x593E}, //1712 #CJK UNIFIED IDEOGRAPH + {0x8A42, 0x593F}, //1713 #CJK UNIFIED IDEOGRAPH + {0x8A43, 0x5940}, //1714 #CJK UNIFIED IDEOGRAPH + {0x8A44, 0x5943}, //1715 #CJK UNIFIED IDEOGRAPH + {0x8A45, 0x5945}, //1716 #CJK UNIFIED IDEOGRAPH + {0x8A46, 0x5946}, //1717 #CJK UNIFIED IDEOGRAPH + {0x8A47, 0x594A}, //1718 #CJK UNIFIED IDEOGRAPH + {0x8A48, 0x594C}, //1719 #CJK UNIFIED IDEOGRAPH + {0x8A49, 0x594D}, //1720 #CJK UNIFIED IDEOGRAPH + {0x8A4A, 0x5950}, //1721 #CJK UNIFIED IDEOGRAPH + {0x8A4B, 0x5952}, //1722 #CJK UNIFIED IDEOGRAPH + {0x8A4C, 0x5953}, //1723 #CJK UNIFIED IDEOGRAPH + {0x8A4D, 0x5959}, //1724 #CJK UNIFIED IDEOGRAPH + {0x8A4E, 0x595B}, //1725 #CJK UNIFIED IDEOGRAPH + {0x8A4F, 0x595C}, //1726 #CJK UNIFIED IDEOGRAPH + {0x8A50, 0x595D}, //1727 #CJK UNIFIED IDEOGRAPH + {0x8A51, 0x595E}, //1728 #CJK UNIFIED IDEOGRAPH + {0x8A52, 0x595F}, //1729 #CJK UNIFIED IDEOGRAPH + {0x8A53, 0x5961}, //1730 #CJK UNIFIED IDEOGRAPH + {0x8A54, 0x5963}, //1731 #CJK UNIFIED IDEOGRAPH + {0x8A55, 0x5964}, //1732 #CJK UNIFIED IDEOGRAPH + {0x8A56, 0x5966}, //1733 #CJK UNIFIED IDEOGRAPH + {0x8A57, 0x5967}, //1734 #CJK UNIFIED IDEOGRAPH + {0x8A58, 0x5968}, //1735 #CJK UNIFIED IDEOGRAPH + {0x8A59, 0x5969}, //1736 #CJK UNIFIED IDEOGRAPH + {0x8A5A, 0x596A}, //1737 #CJK UNIFIED IDEOGRAPH + {0x8A5B, 0x596B}, //1738 #CJK UNIFIED IDEOGRAPH + {0x8A5C, 0x596C}, //1739 #CJK UNIFIED IDEOGRAPH + {0x8A5D, 0x596D}, //1740 #CJK UNIFIED IDEOGRAPH + {0x8A5E, 0x596E}, //1741 #CJK UNIFIED IDEOGRAPH + {0x8A5F, 0x596F}, //1742 #CJK UNIFIED IDEOGRAPH + {0x8A60, 0x5970}, //1743 #CJK UNIFIED IDEOGRAPH + {0x8A61, 0x5971}, //1744 #CJK UNIFIED IDEOGRAPH + {0x8A62, 0x5972}, //1745 #CJK UNIFIED IDEOGRAPH + {0x8A63, 0x5975}, //1746 #CJK UNIFIED IDEOGRAPH + {0x8A64, 0x5977}, //1747 #CJK UNIFIED IDEOGRAPH + {0x8A65, 0x597A}, //1748 #CJK UNIFIED IDEOGRAPH + {0x8A66, 0x597B}, //1749 #CJK UNIFIED IDEOGRAPH + {0x8A67, 0x597C}, //1750 #CJK UNIFIED IDEOGRAPH + {0x8A68, 0x597E}, //1751 #CJK UNIFIED IDEOGRAPH + {0x8A69, 0x597F}, //1752 #CJK UNIFIED IDEOGRAPH + {0x8A6A, 0x5980}, //1753 #CJK UNIFIED IDEOGRAPH + {0x8A6B, 0x5985}, //1754 #CJK UNIFIED IDEOGRAPH + {0x8A6C, 0x5989}, //1755 #CJK UNIFIED IDEOGRAPH + {0x8A6D, 0x598B}, //1756 #CJK UNIFIED IDEOGRAPH + {0x8A6E, 0x598C}, //1757 #CJK UNIFIED IDEOGRAPH + {0x8A6F, 0x598E}, //1758 #CJK UNIFIED IDEOGRAPH + {0x8A70, 0x598F}, //1759 #CJK UNIFIED IDEOGRAPH + {0x8A71, 0x5990}, //1760 #CJK UNIFIED IDEOGRAPH + {0x8A72, 0x5991}, //1761 #CJK UNIFIED IDEOGRAPH + {0x8A73, 0x5994}, //1762 #CJK UNIFIED IDEOGRAPH + {0x8A74, 0x5995}, //1763 #CJK UNIFIED IDEOGRAPH + {0x8A75, 0x5998}, //1764 #CJK UNIFIED IDEOGRAPH + {0x8A76, 0x599A}, //1765 #CJK UNIFIED IDEOGRAPH + {0x8A77, 0x599B}, //1766 #CJK UNIFIED IDEOGRAPH + {0x8A78, 0x599C}, //1767 #CJK UNIFIED IDEOGRAPH + {0x8A79, 0x599D}, //1768 #CJK UNIFIED IDEOGRAPH + {0x8A7A, 0x599F}, //1769 #CJK UNIFIED IDEOGRAPH + {0x8A7B, 0x59A0}, //1770 #CJK UNIFIED IDEOGRAPH + {0x8A7C, 0x59A1}, //1771 #CJK UNIFIED IDEOGRAPH + {0x8A7D, 0x59A2}, //1772 #CJK UNIFIED IDEOGRAPH + {0x8A7E, 0x59A6}, //1773 #CJK UNIFIED IDEOGRAPH + {0x8A80, 0x59A7}, //1774 #CJK UNIFIED IDEOGRAPH + {0x8A81, 0x59AC}, //1775 #CJK UNIFIED IDEOGRAPH + {0x8A82, 0x59AD}, //1776 #CJK UNIFIED IDEOGRAPH + {0x8A83, 0x59B0}, //1777 #CJK UNIFIED IDEOGRAPH + {0x8A84, 0x59B1}, //1778 #CJK UNIFIED IDEOGRAPH + {0x8A85, 0x59B3}, //1779 #CJK UNIFIED IDEOGRAPH + {0x8A86, 0x59B4}, //1780 #CJK UNIFIED IDEOGRAPH + {0x8A87, 0x59B5}, //1781 #CJK UNIFIED IDEOGRAPH + {0x8A88, 0x59B6}, //1782 #CJK UNIFIED IDEOGRAPH + {0x8A89, 0x59B7}, //1783 #CJK UNIFIED IDEOGRAPH + {0x8A8A, 0x59B8}, //1784 #CJK UNIFIED IDEOGRAPH + {0x8A8B, 0x59BA}, //1785 #CJK UNIFIED IDEOGRAPH + {0x8A8C, 0x59BC}, //1786 #CJK UNIFIED IDEOGRAPH + {0x8A8D, 0x59BD}, //1787 #CJK UNIFIED IDEOGRAPH + {0x8A8E, 0x59BF}, //1788 #CJK UNIFIED IDEOGRAPH + {0x8A8F, 0x59C0}, //1789 #CJK UNIFIED IDEOGRAPH + {0x8A90, 0x59C1}, //1790 #CJK UNIFIED IDEOGRAPH + {0x8A91, 0x59C2}, //1791 #CJK UNIFIED IDEOGRAPH + {0x8A92, 0x59C3}, //1792 #CJK UNIFIED IDEOGRAPH + {0x8A93, 0x59C4}, //1793 #CJK UNIFIED IDEOGRAPH + {0x8A94, 0x59C5}, //1794 #CJK UNIFIED IDEOGRAPH + {0x8A95, 0x59C7}, //1795 #CJK UNIFIED IDEOGRAPH + {0x8A96, 0x59C8}, //1796 #CJK UNIFIED IDEOGRAPH + {0x8A97, 0x59C9}, //1797 #CJK UNIFIED IDEOGRAPH + {0x8A98, 0x59CC}, //1798 #CJK UNIFIED IDEOGRAPH + {0x8A99, 0x59CD}, //1799 #CJK UNIFIED IDEOGRAPH + {0x8A9A, 0x59CE}, //1800 #CJK UNIFIED IDEOGRAPH + {0x8A9B, 0x59CF}, //1801 #CJK UNIFIED IDEOGRAPH + {0x8A9C, 0x59D5}, //1802 #CJK UNIFIED IDEOGRAPH + {0x8A9D, 0x59D6}, //1803 #CJK UNIFIED IDEOGRAPH + {0x8A9E, 0x59D9}, //1804 #CJK UNIFIED IDEOGRAPH + {0x8A9F, 0x59DB}, //1805 #CJK UNIFIED IDEOGRAPH + {0x8AA0, 0x59DE}, //1806 #CJK UNIFIED IDEOGRAPH + {0x8AA1, 0x59DF}, //1807 #CJK UNIFIED IDEOGRAPH + {0x8AA2, 0x59E0}, //1808 #CJK UNIFIED IDEOGRAPH + {0x8AA3, 0x59E1}, //1809 #CJK UNIFIED IDEOGRAPH + {0x8AA4, 0x59E2}, //1810 #CJK UNIFIED IDEOGRAPH + {0x8AA5, 0x59E4}, //1811 #CJK UNIFIED IDEOGRAPH + {0x8AA6, 0x59E6}, //1812 #CJK UNIFIED IDEOGRAPH + {0x8AA7, 0x59E7}, //1813 #CJK UNIFIED IDEOGRAPH + {0x8AA8, 0x59E9}, //1814 #CJK UNIFIED IDEOGRAPH + {0x8AA9, 0x59EA}, //1815 #CJK UNIFIED IDEOGRAPH + {0x8AAA, 0x59EB}, //1816 #CJK UNIFIED IDEOGRAPH + {0x8AAB, 0x59ED}, //1817 #CJK UNIFIED IDEOGRAPH + {0x8AAC, 0x59EE}, //1818 #CJK UNIFIED IDEOGRAPH + {0x8AAD, 0x59EF}, //1819 #CJK UNIFIED IDEOGRAPH + {0x8AAE, 0x59F0}, //1820 #CJK UNIFIED IDEOGRAPH + {0x8AAF, 0x59F1}, //1821 #CJK UNIFIED IDEOGRAPH + {0x8AB0, 0x59F2}, //1822 #CJK UNIFIED IDEOGRAPH + {0x8AB1, 0x59F3}, //1823 #CJK UNIFIED IDEOGRAPH + {0x8AB2, 0x59F4}, //1824 #CJK UNIFIED IDEOGRAPH + {0x8AB3, 0x59F5}, //1825 #CJK UNIFIED IDEOGRAPH + {0x8AB4, 0x59F6}, //1826 #CJK UNIFIED IDEOGRAPH + {0x8AB5, 0x59F7}, //1827 #CJK UNIFIED IDEOGRAPH + {0x8AB6, 0x59F8}, //1828 #CJK UNIFIED IDEOGRAPH + {0x8AB7, 0x59FA}, //1829 #CJK UNIFIED IDEOGRAPH + {0x8AB8, 0x59FC}, //1830 #CJK UNIFIED IDEOGRAPH + {0x8AB9, 0x59FD}, //1831 #CJK UNIFIED IDEOGRAPH + {0x8ABA, 0x59FE}, //1832 #CJK UNIFIED IDEOGRAPH + {0x8ABB, 0x5A00}, //1833 #CJK UNIFIED IDEOGRAPH + {0x8ABC, 0x5A02}, //1834 #CJK UNIFIED IDEOGRAPH + {0x8ABD, 0x5A0A}, //1835 #CJK UNIFIED IDEOGRAPH + {0x8ABE, 0x5A0B}, //1836 #CJK UNIFIED IDEOGRAPH + {0x8ABF, 0x5A0D}, //1837 #CJK UNIFIED IDEOGRAPH + {0x8AC0, 0x5A0E}, //1838 #CJK UNIFIED IDEOGRAPH + {0x8AC1, 0x5A0F}, //1839 #CJK UNIFIED IDEOGRAPH + {0x8AC2, 0x5A10}, //1840 #CJK UNIFIED IDEOGRAPH + {0x8AC3, 0x5A12}, //1841 #CJK UNIFIED IDEOGRAPH + {0x8AC4, 0x5A14}, //1842 #CJK UNIFIED IDEOGRAPH + {0x8AC5, 0x5A15}, //1843 #CJK UNIFIED IDEOGRAPH + {0x8AC6, 0x5A16}, //1844 #CJK UNIFIED IDEOGRAPH + {0x8AC7, 0x5A17}, //1845 #CJK UNIFIED IDEOGRAPH + {0x8AC8, 0x5A19}, //1846 #CJK UNIFIED IDEOGRAPH + {0x8AC9, 0x5A1A}, //1847 #CJK UNIFIED IDEOGRAPH + {0x8ACA, 0x5A1B}, //1848 #CJK UNIFIED IDEOGRAPH + {0x8ACB, 0x5A1D}, //1849 #CJK UNIFIED IDEOGRAPH + {0x8ACC, 0x5A1E}, //1850 #CJK UNIFIED IDEOGRAPH + {0x8ACD, 0x5A21}, //1851 #CJK UNIFIED IDEOGRAPH + {0x8ACE, 0x5A22}, //1852 #CJK UNIFIED IDEOGRAPH + {0x8ACF, 0x5A24}, //1853 #CJK UNIFIED IDEOGRAPH + {0x8AD0, 0x5A26}, //1854 #CJK UNIFIED IDEOGRAPH + {0x8AD1, 0x5A27}, //1855 #CJK UNIFIED IDEOGRAPH + {0x8AD2, 0x5A28}, //1856 #CJK UNIFIED IDEOGRAPH + {0x8AD3, 0x5A2A}, //1857 #CJK UNIFIED IDEOGRAPH + {0x8AD4, 0x5A2B}, //1858 #CJK UNIFIED IDEOGRAPH + {0x8AD5, 0x5A2C}, //1859 #CJK UNIFIED IDEOGRAPH + {0x8AD6, 0x5A2D}, //1860 #CJK UNIFIED IDEOGRAPH + {0x8AD7, 0x5A2E}, //1861 #CJK UNIFIED IDEOGRAPH + {0x8AD8, 0x5A2F}, //1862 #CJK UNIFIED IDEOGRAPH + {0x8AD9, 0x5A30}, //1863 #CJK UNIFIED IDEOGRAPH + {0x8ADA, 0x5A33}, //1864 #CJK UNIFIED IDEOGRAPH + {0x8ADB, 0x5A35}, //1865 #CJK UNIFIED IDEOGRAPH + {0x8ADC, 0x5A37}, //1866 #CJK UNIFIED IDEOGRAPH + {0x8ADD, 0x5A38}, //1867 #CJK UNIFIED IDEOGRAPH + {0x8ADE, 0x5A39}, //1868 #CJK UNIFIED IDEOGRAPH + {0x8ADF, 0x5A3A}, //1869 #CJK UNIFIED IDEOGRAPH + {0x8AE0, 0x5A3B}, //1870 #CJK UNIFIED IDEOGRAPH + {0x8AE1, 0x5A3D}, //1871 #CJK UNIFIED IDEOGRAPH + {0x8AE2, 0x5A3E}, //1872 #CJK UNIFIED IDEOGRAPH + {0x8AE3, 0x5A3F}, //1873 #CJK UNIFIED IDEOGRAPH + {0x8AE4, 0x5A41}, //1874 #CJK UNIFIED IDEOGRAPH + {0x8AE5, 0x5A42}, //1875 #CJK UNIFIED IDEOGRAPH + {0x8AE6, 0x5A43}, //1876 #CJK UNIFIED IDEOGRAPH + {0x8AE7, 0x5A44}, //1877 #CJK UNIFIED IDEOGRAPH + {0x8AE8, 0x5A45}, //1878 #CJK UNIFIED IDEOGRAPH + {0x8AE9, 0x5A47}, //1879 #CJK UNIFIED IDEOGRAPH + {0x8AEA, 0x5A48}, //1880 #CJK UNIFIED IDEOGRAPH + {0x8AEB, 0x5A4B}, //1881 #CJK UNIFIED IDEOGRAPH + {0x8AEC, 0x5A4C}, //1882 #CJK UNIFIED IDEOGRAPH + {0x8AED, 0x5A4D}, //1883 #CJK UNIFIED IDEOGRAPH + {0x8AEE, 0x5A4E}, //1884 #CJK UNIFIED IDEOGRAPH + {0x8AEF, 0x5A4F}, //1885 #CJK UNIFIED IDEOGRAPH + {0x8AF0, 0x5A50}, //1886 #CJK UNIFIED IDEOGRAPH + {0x8AF1, 0x5A51}, //1887 #CJK UNIFIED IDEOGRAPH + {0x8AF2, 0x5A52}, //1888 #CJK UNIFIED IDEOGRAPH + {0x8AF3, 0x5A53}, //1889 #CJK UNIFIED IDEOGRAPH + {0x8AF4, 0x5A54}, //1890 #CJK UNIFIED IDEOGRAPH + {0x8AF5, 0x5A56}, //1891 #CJK UNIFIED IDEOGRAPH + {0x8AF6, 0x5A57}, //1892 #CJK UNIFIED IDEOGRAPH + {0x8AF7, 0x5A58}, //1893 #CJK UNIFIED IDEOGRAPH + {0x8AF8, 0x5A59}, //1894 #CJK UNIFIED IDEOGRAPH + {0x8AF9, 0x5A5B}, //1895 #CJK UNIFIED IDEOGRAPH + {0x8AFA, 0x5A5C}, //1896 #CJK UNIFIED IDEOGRAPH + {0x8AFB, 0x5A5D}, //1897 #CJK UNIFIED IDEOGRAPH + {0x8AFC, 0x5A5E}, //1898 #CJK UNIFIED IDEOGRAPH + {0x8AFD, 0x5A5F}, //1899 #CJK UNIFIED IDEOGRAPH + {0x8AFE, 0x5A60}, //1900 #CJK UNIFIED IDEOGRAPH + {0x8B40, 0x5A61}, //1901 #CJK UNIFIED IDEOGRAPH + {0x8B41, 0x5A63}, //1902 #CJK UNIFIED IDEOGRAPH + {0x8B42, 0x5A64}, //1903 #CJK UNIFIED IDEOGRAPH + {0x8B43, 0x5A65}, //1904 #CJK UNIFIED IDEOGRAPH + {0x8B44, 0x5A66}, //1905 #CJK UNIFIED IDEOGRAPH + {0x8B45, 0x5A68}, //1906 #CJK UNIFIED IDEOGRAPH + {0x8B46, 0x5A69}, //1907 #CJK UNIFIED IDEOGRAPH + {0x8B47, 0x5A6B}, //1908 #CJK UNIFIED IDEOGRAPH + {0x8B48, 0x5A6C}, //1909 #CJK UNIFIED IDEOGRAPH + {0x8B49, 0x5A6D}, //1910 #CJK UNIFIED IDEOGRAPH + {0x8B4A, 0x5A6E}, //1911 #CJK UNIFIED IDEOGRAPH + {0x8B4B, 0x5A6F}, //1912 #CJK UNIFIED IDEOGRAPH + {0x8B4C, 0x5A70}, //1913 #CJK UNIFIED IDEOGRAPH + {0x8B4D, 0x5A71}, //1914 #CJK UNIFIED IDEOGRAPH + {0x8B4E, 0x5A72}, //1915 #CJK UNIFIED IDEOGRAPH + {0x8B4F, 0x5A73}, //1916 #CJK UNIFIED IDEOGRAPH + {0x8B50, 0x5A78}, //1917 #CJK UNIFIED IDEOGRAPH + {0x8B51, 0x5A79}, //1918 #CJK UNIFIED IDEOGRAPH + {0x8B52, 0x5A7B}, //1919 #CJK UNIFIED IDEOGRAPH + {0x8B53, 0x5A7C}, //1920 #CJK UNIFIED IDEOGRAPH + {0x8B54, 0x5A7D}, //1921 #CJK UNIFIED IDEOGRAPH + {0x8B55, 0x5A7E}, //1922 #CJK UNIFIED IDEOGRAPH + {0x8B56, 0x5A80}, //1923 #CJK UNIFIED IDEOGRAPH + {0x8B57, 0x5A81}, //1924 #CJK UNIFIED IDEOGRAPH + {0x8B58, 0x5A82}, //1925 #CJK UNIFIED IDEOGRAPH + {0x8B59, 0x5A83}, //1926 #CJK UNIFIED IDEOGRAPH + {0x8B5A, 0x5A84}, //1927 #CJK UNIFIED IDEOGRAPH + {0x8B5B, 0x5A85}, //1928 #CJK UNIFIED IDEOGRAPH + {0x8B5C, 0x5A86}, //1929 #CJK UNIFIED IDEOGRAPH + {0x8B5D, 0x5A87}, //1930 #CJK UNIFIED IDEOGRAPH + {0x8B5E, 0x5A88}, //1931 #CJK UNIFIED IDEOGRAPH + {0x8B5F, 0x5A89}, //1932 #CJK UNIFIED IDEOGRAPH + {0x8B60, 0x5A8A}, //1933 #CJK UNIFIED IDEOGRAPH + {0x8B61, 0x5A8B}, //1934 #CJK UNIFIED IDEOGRAPH + {0x8B62, 0x5A8C}, //1935 #CJK UNIFIED IDEOGRAPH + {0x8B63, 0x5A8D}, //1936 #CJK UNIFIED IDEOGRAPH + {0x8B64, 0x5A8E}, //1937 #CJK UNIFIED IDEOGRAPH + {0x8B65, 0x5A8F}, //1938 #CJK UNIFIED IDEOGRAPH + {0x8B66, 0x5A90}, //1939 #CJK UNIFIED IDEOGRAPH + {0x8B67, 0x5A91}, //1940 #CJK UNIFIED IDEOGRAPH + {0x8B68, 0x5A93}, //1941 #CJK UNIFIED IDEOGRAPH + {0x8B69, 0x5A94}, //1942 #CJK UNIFIED IDEOGRAPH + {0x8B6A, 0x5A95}, //1943 #CJK UNIFIED IDEOGRAPH + {0x8B6B, 0x5A96}, //1944 #CJK UNIFIED IDEOGRAPH + {0x8B6C, 0x5A97}, //1945 #CJK UNIFIED IDEOGRAPH + {0x8B6D, 0x5A98}, //1946 #CJK UNIFIED IDEOGRAPH + {0x8B6E, 0x5A99}, //1947 #CJK UNIFIED IDEOGRAPH + {0x8B6F, 0x5A9C}, //1948 #CJK UNIFIED IDEOGRAPH + {0x8B70, 0x5A9D}, //1949 #CJK UNIFIED IDEOGRAPH + {0x8B71, 0x5A9E}, //1950 #CJK UNIFIED IDEOGRAPH + {0x8B72, 0x5A9F}, //1951 #CJK UNIFIED IDEOGRAPH + {0x8B73, 0x5AA0}, //1952 #CJK UNIFIED IDEOGRAPH + {0x8B74, 0x5AA1}, //1953 #CJK UNIFIED IDEOGRAPH + {0x8B75, 0x5AA2}, //1954 #CJK UNIFIED IDEOGRAPH + {0x8B76, 0x5AA3}, //1955 #CJK UNIFIED IDEOGRAPH + {0x8B77, 0x5AA4}, //1956 #CJK UNIFIED IDEOGRAPH + {0x8B78, 0x5AA5}, //1957 #CJK UNIFIED IDEOGRAPH + {0x8B79, 0x5AA6}, //1958 #CJK UNIFIED IDEOGRAPH + {0x8B7A, 0x5AA7}, //1959 #CJK UNIFIED IDEOGRAPH + {0x8B7B, 0x5AA8}, //1960 #CJK UNIFIED IDEOGRAPH + {0x8B7C, 0x5AA9}, //1961 #CJK UNIFIED IDEOGRAPH + {0x8B7D, 0x5AAB}, //1962 #CJK UNIFIED IDEOGRAPH + {0x8B7E, 0x5AAC}, //1963 #CJK UNIFIED IDEOGRAPH + {0x8B80, 0x5AAD}, //1964 #CJK UNIFIED IDEOGRAPH + {0x8B81, 0x5AAE}, //1965 #CJK UNIFIED IDEOGRAPH + {0x8B82, 0x5AAF}, //1966 #CJK UNIFIED IDEOGRAPH + {0x8B83, 0x5AB0}, //1967 #CJK UNIFIED IDEOGRAPH + {0x8B84, 0x5AB1}, //1968 #CJK UNIFIED IDEOGRAPH + {0x8B85, 0x5AB4}, //1969 #CJK UNIFIED IDEOGRAPH + {0x8B86, 0x5AB6}, //1970 #CJK UNIFIED IDEOGRAPH + {0x8B87, 0x5AB7}, //1971 #CJK UNIFIED IDEOGRAPH + {0x8B88, 0x5AB9}, //1972 #CJK UNIFIED IDEOGRAPH + {0x8B89, 0x5ABA}, //1973 #CJK UNIFIED IDEOGRAPH + {0x8B8A, 0x5ABB}, //1974 #CJK UNIFIED IDEOGRAPH + {0x8B8B, 0x5ABC}, //1975 #CJK UNIFIED IDEOGRAPH + {0x8B8C, 0x5ABD}, //1976 #CJK UNIFIED IDEOGRAPH + {0x8B8D, 0x5ABF}, //1977 #CJK UNIFIED IDEOGRAPH + {0x8B8E, 0x5AC0}, //1978 #CJK UNIFIED IDEOGRAPH + {0x8B8F, 0x5AC3}, //1979 #CJK UNIFIED IDEOGRAPH + {0x8B90, 0x5AC4}, //1980 #CJK UNIFIED IDEOGRAPH + {0x8B91, 0x5AC5}, //1981 #CJK UNIFIED IDEOGRAPH + {0x8B92, 0x5AC6}, //1982 #CJK UNIFIED IDEOGRAPH + {0x8B93, 0x5AC7}, //1983 #CJK UNIFIED IDEOGRAPH + {0x8B94, 0x5AC8}, //1984 #CJK UNIFIED IDEOGRAPH + {0x8B95, 0x5ACA}, //1985 #CJK UNIFIED IDEOGRAPH + {0x8B96, 0x5ACB}, //1986 #CJK UNIFIED IDEOGRAPH + {0x8B97, 0x5ACD}, //1987 #CJK UNIFIED IDEOGRAPH + {0x8B98, 0x5ACE}, //1988 #CJK UNIFIED IDEOGRAPH + {0x8B99, 0x5ACF}, //1989 #CJK UNIFIED IDEOGRAPH + {0x8B9A, 0x5AD0}, //1990 #CJK UNIFIED IDEOGRAPH + {0x8B9B, 0x5AD1}, //1991 #CJK UNIFIED IDEOGRAPH + {0x8B9C, 0x5AD3}, //1992 #CJK UNIFIED IDEOGRAPH + {0x8B9D, 0x5AD5}, //1993 #CJK UNIFIED IDEOGRAPH + {0x8B9E, 0x5AD7}, //1994 #CJK UNIFIED IDEOGRAPH + {0x8B9F, 0x5AD9}, //1995 #CJK UNIFIED IDEOGRAPH + {0x8BA0, 0x5ADA}, //1996 #CJK UNIFIED IDEOGRAPH + {0x8BA1, 0x5ADB}, //1997 #CJK UNIFIED IDEOGRAPH + {0x8BA2, 0x5ADD}, //1998 #CJK UNIFIED IDEOGRAPH + {0x8BA3, 0x5ADE}, //1999 #CJK UNIFIED IDEOGRAPH + {0x8BA4, 0x5ADF}, //2000 #CJK UNIFIED IDEOGRAPH + {0x8BA5, 0x5AE2}, //2001 #CJK UNIFIED IDEOGRAPH + {0x8BA6, 0x5AE4}, //2002 #CJK UNIFIED IDEOGRAPH + {0x8BA7, 0x5AE5}, //2003 #CJK UNIFIED IDEOGRAPH + {0x8BA8, 0x5AE7}, //2004 #CJK UNIFIED IDEOGRAPH + {0x8BA9, 0x5AE8}, //2005 #CJK UNIFIED IDEOGRAPH + {0x8BAA, 0x5AEA}, //2006 #CJK UNIFIED IDEOGRAPH + {0x8BAB, 0x5AEC}, //2007 #CJK UNIFIED IDEOGRAPH + {0x8BAC, 0x5AED}, //2008 #CJK UNIFIED IDEOGRAPH + {0x8BAD, 0x5AEE}, //2009 #CJK UNIFIED IDEOGRAPH + {0x8BAE, 0x5AEF}, //2010 #CJK UNIFIED IDEOGRAPH + {0x8BAF, 0x5AF0}, //2011 #CJK UNIFIED IDEOGRAPH + {0x8BB0, 0x5AF2}, //2012 #CJK UNIFIED IDEOGRAPH + {0x8BB1, 0x5AF3}, //2013 #CJK UNIFIED IDEOGRAPH + {0x8BB2, 0x5AF4}, //2014 #CJK UNIFIED IDEOGRAPH + {0x8BB3, 0x5AF5}, //2015 #CJK UNIFIED IDEOGRAPH + {0x8BB4, 0x5AF6}, //2016 #CJK UNIFIED IDEOGRAPH + {0x8BB5, 0x5AF7}, //2017 #CJK UNIFIED IDEOGRAPH + {0x8BB6, 0x5AF8}, //2018 #CJK UNIFIED IDEOGRAPH + {0x8BB7, 0x5AF9}, //2019 #CJK UNIFIED IDEOGRAPH + {0x8BB8, 0x5AFA}, //2020 #CJK UNIFIED IDEOGRAPH + {0x8BB9, 0x5AFB}, //2021 #CJK UNIFIED IDEOGRAPH + {0x8BBA, 0x5AFC}, //2022 #CJK UNIFIED IDEOGRAPH + {0x8BBB, 0x5AFD}, //2023 #CJK UNIFIED IDEOGRAPH + {0x8BBC, 0x5AFE}, //2024 #CJK UNIFIED IDEOGRAPH + {0x8BBD, 0x5AFF}, //2025 #CJK UNIFIED IDEOGRAPH + {0x8BBE, 0x5B00}, //2026 #CJK UNIFIED IDEOGRAPH + {0x8BBF, 0x5B01}, //2027 #CJK UNIFIED IDEOGRAPH + {0x8BC0, 0x5B02}, //2028 #CJK UNIFIED IDEOGRAPH + {0x8BC1, 0x5B03}, //2029 #CJK UNIFIED IDEOGRAPH + {0x8BC2, 0x5B04}, //2030 #CJK UNIFIED IDEOGRAPH + {0x8BC3, 0x5B05}, //2031 #CJK UNIFIED IDEOGRAPH + {0x8BC4, 0x5B06}, //2032 #CJK UNIFIED IDEOGRAPH + {0x8BC5, 0x5B07}, //2033 #CJK UNIFIED IDEOGRAPH + {0x8BC6, 0x5B08}, //2034 #CJK UNIFIED IDEOGRAPH + {0x8BC7, 0x5B0A}, //2035 #CJK UNIFIED IDEOGRAPH + {0x8BC8, 0x5B0B}, //2036 #CJK UNIFIED IDEOGRAPH + {0x8BC9, 0x5B0C}, //2037 #CJK UNIFIED IDEOGRAPH + {0x8BCA, 0x5B0D}, //2038 #CJK UNIFIED IDEOGRAPH + {0x8BCB, 0x5B0E}, //2039 #CJK UNIFIED IDEOGRAPH + {0x8BCC, 0x5B0F}, //2040 #CJK UNIFIED IDEOGRAPH + {0x8BCD, 0x5B10}, //2041 #CJK UNIFIED IDEOGRAPH + {0x8BCE, 0x5B11}, //2042 #CJK UNIFIED IDEOGRAPH + {0x8BCF, 0x5B12}, //2043 #CJK UNIFIED IDEOGRAPH + {0x8BD0, 0x5B13}, //2044 #CJK UNIFIED IDEOGRAPH + {0x8BD1, 0x5B14}, //2045 #CJK UNIFIED IDEOGRAPH + {0x8BD2, 0x5B15}, //2046 #CJK UNIFIED IDEOGRAPH + {0x8BD3, 0x5B18}, //2047 #CJK UNIFIED IDEOGRAPH + {0x8BD4, 0x5B19}, //2048 #CJK UNIFIED IDEOGRAPH + {0x8BD5, 0x5B1A}, //2049 #CJK UNIFIED IDEOGRAPH + {0x8BD6, 0x5B1B}, //2050 #CJK UNIFIED IDEOGRAPH + {0x8BD7, 0x5B1C}, //2051 #CJK UNIFIED IDEOGRAPH + {0x8BD8, 0x5B1D}, //2052 #CJK UNIFIED IDEOGRAPH + {0x8BD9, 0x5B1E}, //2053 #CJK UNIFIED IDEOGRAPH + {0x8BDA, 0x5B1F}, //2054 #CJK UNIFIED IDEOGRAPH + {0x8BDB, 0x5B20}, //2055 #CJK UNIFIED IDEOGRAPH + {0x8BDC, 0x5B21}, //2056 #CJK UNIFIED IDEOGRAPH + {0x8BDD, 0x5B22}, //2057 #CJK UNIFIED IDEOGRAPH + {0x8BDE, 0x5B23}, //2058 #CJK UNIFIED IDEOGRAPH + {0x8BDF, 0x5B24}, //2059 #CJK UNIFIED IDEOGRAPH + {0x8BE0, 0x5B25}, //2060 #CJK UNIFIED IDEOGRAPH + {0x8BE1, 0x5B26}, //2061 #CJK UNIFIED IDEOGRAPH + {0x8BE2, 0x5B27}, //2062 #CJK UNIFIED IDEOGRAPH + {0x8BE3, 0x5B28}, //2063 #CJK UNIFIED IDEOGRAPH + {0x8BE4, 0x5B29}, //2064 #CJK UNIFIED IDEOGRAPH + {0x8BE5, 0x5B2A}, //2065 #CJK UNIFIED IDEOGRAPH + {0x8BE6, 0x5B2B}, //2066 #CJK UNIFIED IDEOGRAPH + {0x8BE7, 0x5B2C}, //2067 #CJK UNIFIED IDEOGRAPH + {0x8BE8, 0x5B2D}, //2068 #CJK UNIFIED IDEOGRAPH + {0x8BE9, 0x5B2E}, //2069 #CJK UNIFIED IDEOGRAPH + {0x8BEA, 0x5B2F}, //2070 #CJK UNIFIED IDEOGRAPH + {0x8BEB, 0x5B30}, //2071 #CJK UNIFIED IDEOGRAPH + {0x8BEC, 0x5B31}, //2072 #CJK UNIFIED IDEOGRAPH + {0x8BED, 0x5B33}, //2073 #CJK UNIFIED IDEOGRAPH + {0x8BEE, 0x5B35}, //2074 #CJK UNIFIED IDEOGRAPH + {0x8BEF, 0x5B36}, //2075 #CJK UNIFIED IDEOGRAPH + {0x8BF0, 0x5B38}, //2076 #CJK UNIFIED IDEOGRAPH + {0x8BF1, 0x5B39}, //2077 #CJK UNIFIED IDEOGRAPH + {0x8BF2, 0x5B3A}, //2078 #CJK UNIFIED IDEOGRAPH + {0x8BF3, 0x5B3B}, //2079 #CJK UNIFIED IDEOGRAPH + {0x8BF4, 0x5B3C}, //2080 #CJK UNIFIED IDEOGRAPH + {0x8BF5, 0x5B3D}, //2081 #CJK UNIFIED IDEOGRAPH + {0x8BF6, 0x5B3E}, //2082 #CJK UNIFIED IDEOGRAPH + {0x8BF7, 0x5B3F}, //2083 #CJK UNIFIED IDEOGRAPH + {0x8BF8, 0x5B41}, //2084 #CJK UNIFIED IDEOGRAPH + {0x8BF9, 0x5B42}, //2085 #CJK UNIFIED IDEOGRAPH + {0x8BFA, 0x5B43}, //2086 #CJK UNIFIED IDEOGRAPH + {0x8BFB, 0x5B44}, //2087 #CJK UNIFIED IDEOGRAPH + {0x8BFC, 0x5B45}, //2088 #CJK UNIFIED IDEOGRAPH + {0x8BFD, 0x5B46}, //2089 #CJK UNIFIED IDEOGRAPH + {0x8BFE, 0x5B47}, //2090 #CJK UNIFIED IDEOGRAPH + {0x8C40, 0x5B48}, //2091 #CJK UNIFIED IDEOGRAPH + {0x8C41, 0x5B49}, //2092 #CJK UNIFIED IDEOGRAPH + {0x8C42, 0x5B4A}, //2093 #CJK UNIFIED IDEOGRAPH + {0x8C43, 0x5B4B}, //2094 #CJK UNIFIED IDEOGRAPH + {0x8C44, 0x5B4C}, //2095 #CJK UNIFIED IDEOGRAPH + {0x8C45, 0x5B4D}, //2096 #CJK UNIFIED IDEOGRAPH + {0x8C46, 0x5B4E}, //2097 #CJK UNIFIED IDEOGRAPH + {0x8C47, 0x5B4F}, //2098 #CJK UNIFIED IDEOGRAPH + {0x8C48, 0x5B52}, //2099 #CJK UNIFIED IDEOGRAPH + {0x8C49, 0x5B56}, //2100 #CJK UNIFIED IDEOGRAPH + {0x8C4A, 0x5B5E}, //2101 #CJK UNIFIED IDEOGRAPH + {0x8C4B, 0x5B60}, //2102 #CJK UNIFIED IDEOGRAPH + {0x8C4C, 0x5B61}, //2103 #CJK UNIFIED IDEOGRAPH + {0x8C4D, 0x5B67}, //2104 #CJK UNIFIED IDEOGRAPH + {0x8C4E, 0x5B68}, //2105 #CJK UNIFIED IDEOGRAPH + {0x8C4F, 0x5B6B}, //2106 #CJK UNIFIED IDEOGRAPH + {0x8C50, 0x5B6D}, //2107 #CJK UNIFIED IDEOGRAPH + {0x8C51, 0x5B6E}, //2108 #CJK UNIFIED IDEOGRAPH + {0x8C52, 0x5B6F}, //2109 #CJK UNIFIED IDEOGRAPH + {0x8C53, 0x5B72}, //2110 #CJK UNIFIED IDEOGRAPH + {0x8C54, 0x5B74}, //2111 #CJK UNIFIED IDEOGRAPH + {0x8C55, 0x5B76}, //2112 #CJK UNIFIED IDEOGRAPH + {0x8C56, 0x5B77}, //2113 #CJK UNIFIED IDEOGRAPH + {0x8C57, 0x5B78}, //2114 #CJK UNIFIED IDEOGRAPH + {0x8C58, 0x5B79}, //2115 #CJK UNIFIED IDEOGRAPH + {0x8C59, 0x5B7B}, //2116 #CJK UNIFIED IDEOGRAPH + {0x8C5A, 0x5B7C}, //2117 #CJK UNIFIED IDEOGRAPH + {0x8C5B, 0x5B7E}, //2118 #CJK UNIFIED IDEOGRAPH + {0x8C5C, 0x5B7F}, //2119 #CJK UNIFIED IDEOGRAPH + {0x8C5D, 0x5B82}, //2120 #CJK UNIFIED IDEOGRAPH + {0x8C5E, 0x5B86}, //2121 #CJK UNIFIED IDEOGRAPH + {0x8C5F, 0x5B8A}, //2122 #CJK UNIFIED IDEOGRAPH + {0x8C60, 0x5B8D}, //2123 #CJK UNIFIED IDEOGRAPH + {0x8C61, 0x5B8E}, //2124 #CJK UNIFIED IDEOGRAPH + {0x8C62, 0x5B90}, //2125 #CJK UNIFIED IDEOGRAPH + {0x8C63, 0x5B91}, //2126 #CJK UNIFIED IDEOGRAPH + {0x8C64, 0x5B92}, //2127 #CJK UNIFIED IDEOGRAPH + {0x8C65, 0x5B94}, //2128 #CJK UNIFIED IDEOGRAPH + {0x8C66, 0x5B96}, //2129 #CJK UNIFIED IDEOGRAPH + {0x8C67, 0x5B9F}, //2130 #CJK UNIFIED IDEOGRAPH + {0x8C68, 0x5BA7}, //2131 #CJK UNIFIED IDEOGRAPH + {0x8C69, 0x5BA8}, //2132 #CJK UNIFIED IDEOGRAPH + {0x8C6A, 0x5BA9}, //2133 #CJK UNIFIED IDEOGRAPH + {0x8C6B, 0x5BAC}, //2134 #CJK UNIFIED IDEOGRAPH + {0x8C6C, 0x5BAD}, //2135 #CJK UNIFIED IDEOGRAPH + {0x8C6D, 0x5BAE}, //2136 #CJK UNIFIED IDEOGRAPH + {0x8C6E, 0x5BAF}, //2137 #CJK UNIFIED IDEOGRAPH + {0x8C6F, 0x5BB1}, //2138 #CJK UNIFIED IDEOGRAPH + {0x8C70, 0x5BB2}, //2139 #CJK UNIFIED IDEOGRAPH + {0x8C71, 0x5BB7}, //2140 #CJK UNIFIED IDEOGRAPH + {0x8C72, 0x5BBA}, //2141 #CJK UNIFIED IDEOGRAPH + {0x8C73, 0x5BBB}, //2142 #CJK UNIFIED IDEOGRAPH + {0x8C74, 0x5BBC}, //2143 #CJK UNIFIED IDEOGRAPH + {0x8C75, 0x5BC0}, //2144 #CJK UNIFIED IDEOGRAPH + {0x8C76, 0x5BC1}, //2145 #CJK UNIFIED IDEOGRAPH + {0x8C77, 0x5BC3}, //2146 #CJK UNIFIED IDEOGRAPH + {0x8C78, 0x5BC8}, //2147 #CJK UNIFIED IDEOGRAPH + {0x8C79, 0x5BC9}, //2148 #CJK UNIFIED IDEOGRAPH + {0x8C7A, 0x5BCA}, //2149 #CJK UNIFIED IDEOGRAPH + {0x8C7B, 0x5BCB}, //2150 #CJK UNIFIED IDEOGRAPH + {0x8C7C, 0x5BCD}, //2151 #CJK UNIFIED IDEOGRAPH + {0x8C7D, 0x5BCE}, //2152 #CJK UNIFIED IDEOGRAPH + {0x8C7E, 0x5BCF}, //2153 #CJK UNIFIED IDEOGRAPH + {0x8C80, 0x5BD1}, //2154 #CJK UNIFIED IDEOGRAPH + {0x8C81, 0x5BD4}, //2155 #CJK UNIFIED IDEOGRAPH + {0x8C82, 0x5BD5}, //2156 #CJK UNIFIED IDEOGRAPH + {0x8C83, 0x5BD6}, //2157 #CJK UNIFIED IDEOGRAPH + {0x8C84, 0x5BD7}, //2158 #CJK UNIFIED IDEOGRAPH + {0x8C85, 0x5BD8}, //2159 #CJK UNIFIED IDEOGRAPH + {0x8C86, 0x5BD9}, //2160 #CJK UNIFIED IDEOGRAPH + {0x8C87, 0x5BDA}, //2161 #CJK UNIFIED IDEOGRAPH + {0x8C88, 0x5BDB}, //2162 #CJK UNIFIED IDEOGRAPH + {0x8C89, 0x5BDC}, //2163 #CJK UNIFIED IDEOGRAPH + {0x8C8A, 0x5BE0}, //2164 #CJK UNIFIED IDEOGRAPH + {0x8C8B, 0x5BE2}, //2165 #CJK UNIFIED IDEOGRAPH + {0x8C8C, 0x5BE3}, //2166 #CJK UNIFIED IDEOGRAPH + {0x8C8D, 0x5BE6}, //2167 #CJK UNIFIED IDEOGRAPH + {0x8C8E, 0x5BE7}, //2168 #CJK UNIFIED IDEOGRAPH + {0x8C8F, 0x5BE9}, //2169 #CJK UNIFIED IDEOGRAPH + {0x8C90, 0x5BEA}, //2170 #CJK UNIFIED IDEOGRAPH + {0x8C91, 0x5BEB}, //2171 #CJK UNIFIED IDEOGRAPH + {0x8C92, 0x5BEC}, //2172 #CJK UNIFIED IDEOGRAPH + {0x8C93, 0x5BED}, //2173 #CJK UNIFIED IDEOGRAPH + {0x8C94, 0x5BEF}, //2174 #CJK UNIFIED IDEOGRAPH + {0x8C95, 0x5BF1}, //2175 #CJK UNIFIED IDEOGRAPH + {0x8C96, 0x5BF2}, //2176 #CJK UNIFIED IDEOGRAPH + {0x8C97, 0x5BF3}, //2177 #CJK UNIFIED IDEOGRAPH + {0x8C98, 0x5BF4}, //2178 #CJK UNIFIED IDEOGRAPH + {0x8C99, 0x5BF5}, //2179 #CJK UNIFIED IDEOGRAPH + {0x8C9A, 0x5BF6}, //2180 #CJK UNIFIED IDEOGRAPH + {0x8C9B, 0x5BF7}, //2181 #CJK UNIFIED IDEOGRAPH + {0x8C9C, 0x5BFD}, //2182 #CJK UNIFIED IDEOGRAPH + {0x8C9D, 0x5BFE}, //2183 #CJK UNIFIED IDEOGRAPH + {0x8C9E, 0x5C00}, //2184 #CJK UNIFIED IDEOGRAPH + {0x8C9F, 0x5C02}, //2185 #CJK UNIFIED IDEOGRAPH + {0x8CA0, 0x5C03}, //2186 #CJK UNIFIED IDEOGRAPH + {0x8CA1, 0x5C05}, //2187 #CJK UNIFIED IDEOGRAPH + {0x8CA2, 0x5C07}, //2188 #CJK UNIFIED IDEOGRAPH + {0x8CA3, 0x5C08}, //2189 #CJK UNIFIED IDEOGRAPH + {0x8CA4, 0x5C0B}, //2190 #CJK UNIFIED IDEOGRAPH + {0x8CA5, 0x5C0C}, //2191 #CJK UNIFIED IDEOGRAPH + {0x8CA6, 0x5C0D}, //2192 #CJK UNIFIED IDEOGRAPH + {0x8CA7, 0x5C0E}, //2193 #CJK UNIFIED IDEOGRAPH + {0x8CA8, 0x5C10}, //2194 #CJK UNIFIED IDEOGRAPH + {0x8CA9, 0x5C12}, //2195 #CJK UNIFIED IDEOGRAPH + {0x8CAA, 0x5C13}, //2196 #CJK UNIFIED IDEOGRAPH + {0x8CAB, 0x5C17}, //2197 #CJK UNIFIED IDEOGRAPH + {0x8CAC, 0x5C19}, //2198 #CJK UNIFIED IDEOGRAPH + {0x8CAD, 0x5C1B}, //2199 #CJK UNIFIED IDEOGRAPH + {0x8CAE, 0x5C1E}, //2200 #CJK UNIFIED IDEOGRAPH + {0x8CAF, 0x5C1F}, //2201 #CJK UNIFIED IDEOGRAPH + {0x8CB0, 0x5C20}, //2202 #CJK UNIFIED IDEOGRAPH + {0x8CB1, 0x5C21}, //2203 #CJK UNIFIED IDEOGRAPH + {0x8CB2, 0x5C23}, //2204 #CJK UNIFIED IDEOGRAPH + {0x8CB3, 0x5C26}, //2205 #CJK UNIFIED IDEOGRAPH + {0x8CB4, 0x5C28}, //2206 #CJK UNIFIED IDEOGRAPH + {0x8CB5, 0x5C29}, //2207 #CJK UNIFIED IDEOGRAPH + {0x8CB6, 0x5C2A}, //2208 #CJK UNIFIED IDEOGRAPH + {0x8CB7, 0x5C2B}, //2209 #CJK UNIFIED IDEOGRAPH + {0x8CB8, 0x5C2D}, //2210 #CJK UNIFIED IDEOGRAPH + {0x8CB9, 0x5C2E}, //2211 #CJK UNIFIED IDEOGRAPH + {0x8CBA, 0x5C2F}, //2212 #CJK UNIFIED IDEOGRAPH + {0x8CBB, 0x5C30}, //2213 #CJK UNIFIED IDEOGRAPH + {0x8CBC, 0x5C32}, //2214 #CJK UNIFIED IDEOGRAPH + {0x8CBD, 0x5C33}, //2215 #CJK UNIFIED IDEOGRAPH + {0x8CBE, 0x5C35}, //2216 #CJK UNIFIED IDEOGRAPH + {0x8CBF, 0x5C36}, //2217 #CJK UNIFIED IDEOGRAPH + {0x8CC0, 0x5C37}, //2218 #CJK UNIFIED IDEOGRAPH + {0x8CC1, 0x5C43}, //2219 #CJK UNIFIED IDEOGRAPH + {0x8CC2, 0x5C44}, //2220 #CJK UNIFIED IDEOGRAPH + {0x8CC3, 0x5C46}, //2221 #CJK UNIFIED IDEOGRAPH + {0x8CC4, 0x5C47}, //2222 #CJK UNIFIED IDEOGRAPH + {0x8CC5, 0x5C4C}, //2223 #CJK UNIFIED IDEOGRAPH + {0x8CC6, 0x5C4D}, //2224 #CJK UNIFIED IDEOGRAPH + {0x8CC7, 0x5C52}, //2225 #CJK UNIFIED IDEOGRAPH + {0x8CC8, 0x5C53}, //2226 #CJK UNIFIED IDEOGRAPH + {0x8CC9, 0x5C54}, //2227 #CJK UNIFIED IDEOGRAPH + {0x8CCA, 0x5C56}, //2228 #CJK UNIFIED IDEOGRAPH + {0x8CCB, 0x5C57}, //2229 #CJK UNIFIED IDEOGRAPH + {0x8CCC, 0x5C58}, //2230 #CJK UNIFIED IDEOGRAPH + {0x8CCD, 0x5C5A}, //2231 #CJK UNIFIED IDEOGRAPH + {0x8CCE, 0x5C5B}, //2232 #CJK UNIFIED IDEOGRAPH + {0x8CCF, 0x5C5C}, //2233 #CJK UNIFIED IDEOGRAPH + {0x8CD0, 0x5C5D}, //2234 #CJK UNIFIED IDEOGRAPH + {0x8CD1, 0x5C5F}, //2235 #CJK UNIFIED IDEOGRAPH + {0x8CD2, 0x5C62}, //2236 #CJK UNIFIED IDEOGRAPH + {0x8CD3, 0x5C64}, //2237 #CJK UNIFIED IDEOGRAPH + {0x8CD4, 0x5C67}, //2238 #CJK UNIFIED IDEOGRAPH + {0x8CD5, 0x5C68}, //2239 #CJK UNIFIED IDEOGRAPH + {0x8CD6, 0x5C69}, //2240 #CJK UNIFIED IDEOGRAPH + {0x8CD7, 0x5C6A}, //2241 #CJK UNIFIED IDEOGRAPH + {0x8CD8, 0x5C6B}, //2242 #CJK UNIFIED IDEOGRAPH + {0x8CD9, 0x5C6C}, //2243 #CJK UNIFIED IDEOGRAPH + {0x8CDA, 0x5C6D}, //2244 #CJK UNIFIED IDEOGRAPH + {0x8CDB, 0x5C70}, //2245 #CJK UNIFIED IDEOGRAPH + {0x8CDC, 0x5C72}, //2246 #CJK UNIFIED IDEOGRAPH + {0x8CDD, 0x5C73}, //2247 #CJK UNIFIED IDEOGRAPH + {0x8CDE, 0x5C74}, //2248 #CJK UNIFIED IDEOGRAPH + {0x8CDF, 0x5C75}, //2249 #CJK UNIFIED IDEOGRAPH + {0x8CE0, 0x5C76}, //2250 #CJK UNIFIED IDEOGRAPH + {0x8CE1, 0x5C77}, //2251 #CJK UNIFIED IDEOGRAPH + {0x8CE2, 0x5C78}, //2252 #CJK UNIFIED IDEOGRAPH + {0x8CE3, 0x5C7B}, //2253 #CJK UNIFIED IDEOGRAPH + {0x8CE4, 0x5C7C}, //2254 #CJK UNIFIED IDEOGRAPH + {0x8CE5, 0x5C7D}, //2255 #CJK UNIFIED IDEOGRAPH + {0x8CE6, 0x5C7E}, //2256 #CJK UNIFIED IDEOGRAPH + {0x8CE7, 0x5C80}, //2257 #CJK UNIFIED IDEOGRAPH + {0x8CE8, 0x5C83}, //2258 #CJK UNIFIED IDEOGRAPH + {0x8CE9, 0x5C84}, //2259 #CJK UNIFIED IDEOGRAPH + {0x8CEA, 0x5C85}, //2260 #CJK UNIFIED IDEOGRAPH + {0x8CEB, 0x5C86}, //2261 #CJK UNIFIED IDEOGRAPH + {0x8CEC, 0x5C87}, //2262 #CJK UNIFIED IDEOGRAPH + {0x8CED, 0x5C89}, //2263 #CJK UNIFIED IDEOGRAPH + {0x8CEE, 0x5C8A}, //2264 #CJK UNIFIED IDEOGRAPH + {0x8CEF, 0x5C8B}, //2265 #CJK UNIFIED IDEOGRAPH + {0x8CF0, 0x5C8E}, //2266 #CJK UNIFIED IDEOGRAPH + {0x8CF1, 0x5C8F}, //2267 #CJK UNIFIED IDEOGRAPH + {0x8CF2, 0x5C92}, //2268 #CJK UNIFIED IDEOGRAPH + {0x8CF3, 0x5C93}, //2269 #CJK UNIFIED IDEOGRAPH + {0x8CF4, 0x5C95}, //2270 #CJK UNIFIED IDEOGRAPH + {0x8CF5, 0x5C9D}, //2271 #CJK UNIFIED IDEOGRAPH + {0x8CF6, 0x5C9E}, //2272 #CJK UNIFIED IDEOGRAPH + {0x8CF7, 0x5C9F}, //2273 #CJK UNIFIED IDEOGRAPH + {0x8CF8, 0x5CA0}, //2274 #CJK UNIFIED IDEOGRAPH + {0x8CF9, 0x5CA1}, //2275 #CJK UNIFIED IDEOGRAPH + {0x8CFA, 0x5CA4}, //2276 #CJK UNIFIED IDEOGRAPH + {0x8CFB, 0x5CA5}, //2277 #CJK UNIFIED IDEOGRAPH + {0x8CFC, 0x5CA6}, //2278 #CJK UNIFIED IDEOGRAPH + {0x8CFD, 0x5CA7}, //2279 #CJK UNIFIED IDEOGRAPH + {0x8CFE, 0x5CA8}, //2280 #CJK UNIFIED IDEOGRAPH + {0x8D40, 0x5CAA}, //2281 #CJK UNIFIED IDEOGRAPH + {0x8D41, 0x5CAE}, //2282 #CJK UNIFIED IDEOGRAPH + {0x8D42, 0x5CAF}, //2283 #CJK UNIFIED IDEOGRAPH + {0x8D43, 0x5CB0}, //2284 #CJK UNIFIED IDEOGRAPH + {0x8D44, 0x5CB2}, //2285 #CJK UNIFIED IDEOGRAPH + {0x8D45, 0x5CB4}, //2286 #CJK UNIFIED IDEOGRAPH + {0x8D46, 0x5CB6}, //2287 #CJK UNIFIED IDEOGRAPH + {0x8D47, 0x5CB9}, //2288 #CJK UNIFIED IDEOGRAPH + {0x8D48, 0x5CBA}, //2289 #CJK UNIFIED IDEOGRAPH + {0x8D49, 0x5CBB}, //2290 #CJK UNIFIED IDEOGRAPH + {0x8D4A, 0x5CBC}, //2291 #CJK UNIFIED IDEOGRAPH + {0x8D4B, 0x5CBE}, //2292 #CJK UNIFIED IDEOGRAPH + {0x8D4C, 0x5CC0}, //2293 #CJK UNIFIED IDEOGRAPH + {0x8D4D, 0x5CC2}, //2294 #CJK UNIFIED IDEOGRAPH + {0x8D4E, 0x5CC3}, //2295 #CJK UNIFIED IDEOGRAPH + {0x8D4F, 0x5CC5}, //2296 #CJK UNIFIED IDEOGRAPH + {0x8D50, 0x5CC6}, //2297 #CJK UNIFIED IDEOGRAPH + {0x8D51, 0x5CC7}, //2298 #CJK UNIFIED IDEOGRAPH + {0x8D52, 0x5CC8}, //2299 #CJK UNIFIED IDEOGRAPH + {0x8D53, 0x5CC9}, //2300 #CJK UNIFIED IDEOGRAPH + {0x8D54, 0x5CCA}, //2301 #CJK UNIFIED IDEOGRAPH + {0x8D55, 0x5CCC}, //2302 #CJK UNIFIED IDEOGRAPH + {0x8D56, 0x5CCD}, //2303 #CJK UNIFIED IDEOGRAPH + {0x8D57, 0x5CCE}, //2304 #CJK UNIFIED IDEOGRAPH + {0x8D58, 0x5CCF}, //2305 #CJK UNIFIED IDEOGRAPH + {0x8D59, 0x5CD0}, //2306 #CJK UNIFIED IDEOGRAPH + {0x8D5A, 0x5CD1}, //2307 #CJK UNIFIED IDEOGRAPH + {0x8D5B, 0x5CD3}, //2308 #CJK UNIFIED IDEOGRAPH + {0x8D5C, 0x5CD4}, //2309 #CJK UNIFIED IDEOGRAPH + {0x8D5D, 0x5CD5}, //2310 #CJK UNIFIED IDEOGRAPH + {0x8D5E, 0x5CD6}, //2311 #CJK UNIFIED IDEOGRAPH + {0x8D5F, 0x5CD7}, //2312 #CJK UNIFIED IDEOGRAPH + {0x8D60, 0x5CD8}, //2313 #CJK UNIFIED IDEOGRAPH + {0x8D61, 0x5CDA}, //2314 #CJK UNIFIED IDEOGRAPH + {0x8D62, 0x5CDB}, //2315 #CJK UNIFIED IDEOGRAPH + {0x8D63, 0x5CDC}, //2316 #CJK UNIFIED IDEOGRAPH + {0x8D64, 0x5CDD}, //2317 #CJK UNIFIED IDEOGRAPH + {0x8D65, 0x5CDE}, //2318 #CJK UNIFIED IDEOGRAPH + {0x8D66, 0x5CDF}, //2319 #CJK UNIFIED IDEOGRAPH + {0x8D67, 0x5CE0}, //2320 #CJK UNIFIED IDEOGRAPH + {0x8D68, 0x5CE2}, //2321 #CJK UNIFIED IDEOGRAPH + {0x8D69, 0x5CE3}, //2322 #CJK UNIFIED IDEOGRAPH + {0x8D6A, 0x5CE7}, //2323 #CJK UNIFIED IDEOGRAPH + {0x8D6B, 0x5CE9}, //2324 #CJK UNIFIED IDEOGRAPH + {0x8D6C, 0x5CEB}, //2325 #CJK UNIFIED IDEOGRAPH + {0x8D6D, 0x5CEC}, //2326 #CJK UNIFIED IDEOGRAPH + {0x8D6E, 0x5CEE}, //2327 #CJK UNIFIED IDEOGRAPH + {0x8D6F, 0x5CEF}, //2328 #CJK UNIFIED IDEOGRAPH + {0x8D70, 0x5CF1}, //2329 #CJK UNIFIED IDEOGRAPH + {0x8D71, 0x5CF2}, //2330 #CJK UNIFIED IDEOGRAPH + {0x8D72, 0x5CF3}, //2331 #CJK UNIFIED IDEOGRAPH + {0x8D73, 0x5CF4}, //2332 #CJK UNIFIED IDEOGRAPH + {0x8D74, 0x5CF5}, //2333 #CJK UNIFIED IDEOGRAPH + {0x8D75, 0x5CF6}, //2334 #CJK UNIFIED IDEOGRAPH + {0x8D76, 0x5CF7}, //2335 #CJK UNIFIED IDEOGRAPH + {0x8D77, 0x5CF8}, //2336 #CJK UNIFIED IDEOGRAPH + {0x8D78, 0x5CF9}, //2337 #CJK UNIFIED IDEOGRAPH + {0x8D79, 0x5CFA}, //2338 #CJK UNIFIED IDEOGRAPH + {0x8D7A, 0x5CFC}, //2339 #CJK UNIFIED IDEOGRAPH + {0x8D7B, 0x5CFD}, //2340 #CJK UNIFIED IDEOGRAPH + {0x8D7C, 0x5CFE}, //2341 #CJK UNIFIED IDEOGRAPH + {0x8D7D, 0x5CFF}, //2342 #CJK UNIFIED IDEOGRAPH + {0x8D7E, 0x5D00}, //2343 #CJK UNIFIED IDEOGRAPH + {0x8D80, 0x5D01}, //2344 #CJK UNIFIED IDEOGRAPH + {0x8D81, 0x5D04}, //2345 #CJK UNIFIED IDEOGRAPH + {0x8D82, 0x5D05}, //2346 #CJK UNIFIED IDEOGRAPH + {0x8D83, 0x5D08}, //2347 #CJK UNIFIED IDEOGRAPH + {0x8D84, 0x5D09}, //2348 #CJK UNIFIED IDEOGRAPH + {0x8D85, 0x5D0A}, //2349 #CJK UNIFIED IDEOGRAPH + {0x8D86, 0x5D0B}, //2350 #CJK UNIFIED IDEOGRAPH + {0x8D87, 0x5D0C}, //2351 #CJK UNIFIED IDEOGRAPH + {0x8D88, 0x5D0D}, //2352 #CJK UNIFIED IDEOGRAPH + {0x8D89, 0x5D0F}, //2353 #CJK UNIFIED IDEOGRAPH + {0x8D8A, 0x5D10}, //2354 #CJK UNIFIED IDEOGRAPH + {0x8D8B, 0x5D11}, //2355 #CJK UNIFIED IDEOGRAPH + {0x8D8C, 0x5D12}, //2356 #CJK UNIFIED IDEOGRAPH + {0x8D8D, 0x5D13}, //2357 #CJK UNIFIED IDEOGRAPH + {0x8D8E, 0x5D15}, //2358 #CJK UNIFIED IDEOGRAPH + {0x8D8F, 0x5D17}, //2359 #CJK UNIFIED IDEOGRAPH + {0x8D90, 0x5D18}, //2360 #CJK UNIFIED IDEOGRAPH + {0x8D91, 0x5D19}, //2361 #CJK UNIFIED IDEOGRAPH + {0x8D92, 0x5D1A}, //2362 #CJK UNIFIED IDEOGRAPH + {0x8D93, 0x5D1C}, //2363 #CJK UNIFIED IDEOGRAPH + {0x8D94, 0x5D1D}, //2364 #CJK UNIFIED IDEOGRAPH + {0x8D95, 0x5D1F}, //2365 #CJK UNIFIED IDEOGRAPH + {0x8D96, 0x5D20}, //2366 #CJK UNIFIED IDEOGRAPH + {0x8D97, 0x5D21}, //2367 #CJK UNIFIED IDEOGRAPH + {0x8D98, 0x5D22}, //2368 #CJK UNIFIED IDEOGRAPH + {0x8D99, 0x5D23}, //2369 #CJK UNIFIED IDEOGRAPH + {0x8D9A, 0x5D25}, //2370 #CJK UNIFIED IDEOGRAPH + {0x8D9B, 0x5D28}, //2371 #CJK UNIFIED IDEOGRAPH + {0x8D9C, 0x5D2A}, //2372 #CJK UNIFIED IDEOGRAPH + {0x8D9D, 0x5D2B}, //2373 #CJK UNIFIED IDEOGRAPH + {0x8D9E, 0x5D2C}, //2374 #CJK UNIFIED IDEOGRAPH + {0x8D9F, 0x5D2F}, //2375 #CJK UNIFIED IDEOGRAPH + {0x8DA0, 0x5D30}, //2376 #CJK UNIFIED IDEOGRAPH + {0x8DA1, 0x5D31}, //2377 #CJK UNIFIED IDEOGRAPH + {0x8DA2, 0x5D32}, //2378 #CJK UNIFIED IDEOGRAPH + {0x8DA3, 0x5D33}, //2379 #CJK UNIFIED IDEOGRAPH + {0x8DA4, 0x5D35}, //2380 #CJK UNIFIED IDEOGRAPH + {0x8DA5, 0x5D36}, //2381 #CJK UNIFIED IDEOGRAPH + {0x8DA6, 0x5D37}, //2382 #CJK UNIFIED IDEOGRAPH + {0x8DA7, 0x5D38}, //2383 #CJK UNIFIED IDEOGRAPH + {0x8DA8, 0x5D39}, //2384 #CJK UNIFIED IDEOGRAPH + {0x8DA9, 0x5D3A}, //2385 #CJK UNIFIED IDEOGRAPH + {0x8DAA, 0x5D3B}, //2386 #CJK UNIFIED IDEOGRAPH + {0x8DAB, 0x5D3C}, //2387 #CJK UNIFIED IDEOGRAPH + {0x8DAC, 0x5D3F}, //2388 #CJK UNIFIED IDEOGRAPH + {0x8DAD, 0x5D40}, //2389 #CJK UNIFIED IDEOGRAPH + {0x8DAE, 0x5D41}, //2390 #CJK UNIFIED IDEOGRAPH + {0x8DAF, 0x5D42}, //2391 #CJK UNIFIED IDEOGRAPH + {0x8DB0, 0x5D43}, //2392 #CJK UNIFIED IDEOGRAPH + {0x8DB1, 0x5D44}, //2393 #CJK UNIFIED IDEOGRAPH + {0x8DB2, 0x5D45}, //2394 #CJK UNIFIED IDEOGRAPH + {0x8DB3, 0x5D46}, //2395 #CJK UNIFIED IDEOGRAPH + {0x8DB4, 0x5D48}, //2396 #CJK UNIFIED IDEOGRAPH + {0x8DB5, 0x5D49}, //2397 #CJK UNIFIED IDEOGRAPH + {0x8DB6, 0x5D4D}, //2398 #CJK UNIFIED IDEOGRAPH + {0x8DB7, 0x5D4E}, //2399 #CJK UNIFIED IDEOGRAPH + {0x8DB8, 0x5D4F}, //2400 #CJK UNIFIED IDEOGRAPH + {0x8DB9, 0x5D50}, //2401 #CJK UNIFIED IDEOGRAPH + {0x8DBA, 0x5D51}, //2402 #CJK UNIFIED IDEOGRAPH + {0x8DBB, 0x5D52}, //2403 #CJK UNIFIED IDEOGRAPH + {0x8DBC, 0x5D53}, //2404 #CJK UNIFIED IDEOGRAPH + {0x8DBD, 0x5D54}, //2405 #CJK UNIFIED IDEOGRAPH + {0x8DBE, 0x5D55}, //2406 #CJK UNIFIED IDEOGRAPH + {0x8DBF, 0x5D56}, //2407 #CJK UNIFIED IDEOGRAPH + {0x8DC0, 0x5D57}, //2408 #CJK UNIFIED IDEOGRAPH + {0x8DC1, 0x5D59}, //2409 #CJK UNIFIED IDEOGRAPH + {0x8DC2, 0x5D5A}, //2410 #CJK UNIFIED IDEOGRAPH + {0x8DC3, 0x5D5C}, //2411 #CJK UNIFIED IDEOGRAPH + {0x8DC4, 0x5D5E}, //2412 #CJK UNIFIED IDEOGRAPH + {0x8DC5, 0x5D5F}, //2413 #CJK UNIFIED IDEOGRAPH + {0x8DC6, 0x5D60}, //2414 #CJK UNIFIED IDEOGRAPH + {0x8DC7, 0x5D61}, //2415 #CJK UNIFIED IDEOGRAPH + {0x8DC8, 0x5D62}, //2416 #CJK UNIFIED IDEOGRAPH + {0x8DC9, 0x5D63}, //2417 #CJK UNIFIED IDEOGRAPH + {0x8DCA, 0x5D64}, //2418 #CJK UNIFIED IDEOGRAPH + {0x8DCB, 0x5D65}, //2419 #CJK UNIFIED IDEOGRAPH + {0x8DCC, 0x5D66}, //2420 #CJK UNIFIED IDEOGRAPH + {0x8DCD, 0x5D67}, //2421 #CJK UNIFIED IDEOGRAPH + {0x8DCE, 0x5D68}, //2422 #CJK UNIFIED IDEOGRAPH + {0x8DCF, 0x5D6A}, //2423 #CJK UNIFIED IDEOGRAPH + {0x8DD0, 0x5D6D}, //2424 #CJK UNIFIED IDEOGRAPH + {0x8DD1, 0x5D6E}, //2425 #CJK UNIFIED IDEOGRAPH + {0x8DD2, 0x5D70}, //2426 #CJK UNIFIED IDEOGRAPH + {0x8DD3, 0x5D71}, //2427 #CJK UNIFIED IDEOGRAPH + {0x8DD4, 0x5D72}, //2428 #CJK UNIFIED IDEOGRAPH + {0x8DD5, 0x5D73}, //2429 #CJK UNIFIED IDEOGRAPH + {0x8DD6, 0x5D75}, //2430 #CJK UNIFIED IDEOGRAPH + {0x8DD7, 0x5D76}, //2431 #CJK UNIFIED IDEOGRAPH + {0x8DD8, 0x5D77}, //2432 #CJK UNIFIED IDEOGRAPH + {0x8DD9, 0x5D78}, //2433 #CJK UNIFIED IDEOGRAPH + {0x8DDA, 0x5D79}, //2434 #CJK UNIFIED IDEOGRAPH + {0x8DDB, 0x5D7A}, //2435 #CJK UNIFIED IDEOGRAPH + {0x8DDC, 0x5D7B}, //2436 #CJK UNIFIED IDEOGRAPH + {0x8DDD, 0x5D7C}, //2437 #CJK UNIFIED IDEOGRAPH + {0x8DDE, 0x5D7D}, //2438 #CJK UNIFIED IDEOGRAPH + {0x8DDF, 0x5D7E}, //2439 #CJK UNIFIED IDEOGRAPH + {0x8DE0, 0x5D7F}, //2440 #CJK UNIFIED IDEOGRAPH + {0x8DE1, 0x5D80}, //2441 #CJK UNIFIED IDEOGRAPH + {0x8DE2, 0x5D81}, //2442 #CJK UNIFIED IDEOGRAPH + {0x8DE3, 0x5D83}, //2443 #CJK UNIFIED IDEOGRAPH + {0x8DE4, 0x5D84}, //2444 #CJK UNIFIED IDEOGRAPH + {0x8DE5, 0x5D85}, //2445 #CJK UNIFIED IDEOGRAPH + {0x8DE6, 0x5D86}, //2446 #CJK UNIFIED IDEOGRAPH + {0x8DE7, 0x5D87}, //2447 #CJK UNIFIED IDEOGRAPH + {0x8DE8, 0x5D88}, //2448 #CJK UNIFIED IDEOGRAPH + {0x8DE9, 0x5D89}, //2449 #CJK UNIFIED IDEOGRAPH + {0x8DEA, 0x5D8A}, //2450 #CJK UNIFIED IDEOGRAPH + {0x8DEB, 0x5D8B}, //2451 #CJK UNIFIED IDEOGRAPH + {0x8DEC, 0x5D8C}, //2452 #CJK UNIFIED IDEOGRAPH + {0x8DED, 0x5D8D}, //2453 #CJK UNIFIED IDEOGRAPH + {0x8DEE, 0x5D8E}, //2454 #CJK UNIFIED IDEOGRAPH + {0x8DEF, 0x5D8F}, //2455 #CJK UNIFIED IDEOGRAPH + {0x8DF0, 0x5D90}, //2456 #CJK UNIFIED IDEOGRAPH + {0x8DF1, 0x5D91}, //2457 #CJK UNIFIED IDEOGRAPH + {0x8DF2, 0x5D92}, //2458 #CJK UNIFIED IDEOGRAPH + {0x8DF3, 0x5D93}, //2459 #CJK UNIFIED IDEOGRAPH + {0x8DF4, 0x5D94}, //2460 #CJK UNIFIED IDEOGRAPH + {0x8DF5, 0x5D95}, //2461 #CJK UNIFIED IDEOGRAPH + {0x8DF6, 0x5D96}, //2462 #CJK UNIFIED IDEOGRAPH + {0x8DF7, 0x5D97}, //2463 #CJK UNIFIED IDEOGRAPH + {0x8DF8, 0x5D98}, //2464 #CJK UNIFIED IDEOGRAPH + {0x8DF9, 0x5D9A}, //2465 #CJK UNIFIED IDEOGRAPH + {0x8DFA, 0x5D9B}, //2466 #CJK UNIFIED IDEOGRAPH + {0x8DFB, 0x5D9C}, //2467 #CJK UNIFIED IDEOGRAPH + {0x8DFC, 0x5D9E}, //2468 #CJK UNIFIED IDEOGRAPH + {0x8DFD, 0x5D9F}, //2469 #CJK UNIFIED IDEOGRAPH + {0x8DFE, 0x5DA0}, //2470 #CJK UNIFIED IDEOGRAPH + {0x8E40, 0x5DA1}, //2471 #CJK UNIFIED IDEOGRAPH + {0x8E41, 0x5DA2}, //2472 #CJK UNIFIED IDEOGRAPH + {0x8E42, 0x5DA3}, //2473 #CJK UNIFIED IDEOGRAPH + {0x8E43, 0x5DA4}, //2474 #CJK UNIFIED IDEOGRAPH + {0x8E44, 0x5DA5}, //2475 #CJK UNIFIED IDEOGRAPH + {0x8E45, 0x5DA6}, //2476 #CJK UNIFIED IDEOGRAPH + {0x8E46, 0x5DA7}, //2477 #CJK UNIFIED IDEOGRAPH + {0x8E47, 0x5DA8}, //2478 #CJK UNIFIED IDEOGRAPH + {0x8E48, 0x5DA9}, //2479 #CJK UNIFIED IDEOGRAPH + {0x8E49, 0x5DAA}, //2480 #CJK UNIFIED IDEOGRAPH + {0x8E4A, 0x5DAB}, //2481 #CJK UNIFIED IDEOGRAPH + {0x8E4B, 0x5DAC}, //2482 #CJK UNIFIED IDEOGRAPH + {0x8E4C, 0x5DAD}, //2483 #CJK UNIFIED IDEOGRAPH + {0x8E4D, 0x5DAE}, //2484 #CJK UNIFIED IDEOGRAPH + {0x8E4E, 0x5DAF}, //2485 #CJK UNIFIED IDEOGRAPH + {0x8E4F, 0x5DB0}, //2486 #CJK UNIFIED IDEOGRAPH + {0x8E50, 0x5DB1}, //2487 #CJK UNIFIED IDEOGRAPH + {0x8E51, 0x5DB2}, //2488 #CJK UNIFIED IDEOGRAPH + {0x8E52, 0x5DB3}, //2489 #CJK UNIFIED IDEOGRAPH + {0x8E53, 0x5DB4}, //2490 #CJK UNIFIED IDEOGRAPH + {0x8E54, 0x5DB5}, //2491 #CJK UNIFIED IDEOGRAPH + {0x8E55, 0x5DB6}, //2492 #CJK UNIFIED IDEOGRAPH + {0x8E56, 0x5DB8}, //2493 #CJK UNIFIED IDEOGRAPH + {0x8E57, 0x5DB9}, //2494 #CJK UNIFIED IDEOGRAPH + {0x8E58, 0x5DBA}, //2495 #CJK UNIFIED IDEOGRAPH + {0x8E59, 0x5DBB}, //2496 #CJK UNIFIED IDEOGRAPH + {0x8E5A, 0x5DBC}, //2497 #CJK UNIFIED IDEOGRAPH + {0x8E5B, 0x5DBD}, //2498 #CJK UNIFIED IDEOGRAPH + {0x8E5C, 0x5DBE}, //2499 #CJK UNIFIED IDEOGRAPH + {0x8E5D, 0x5DBF}, //2500 #CJK UNIFIED IDEOGRAPH + {0x8E5E, 0x5DC0}, //2501 #CJK UNIFIED IDEOGRAPH + {0x8E5F, 0x5DC1}, //2502 #CJK UNIFIED IDEOGRAPH + {0x8E60, 0x5DC2}, //2503 #CJK UNIFIED IDEOGRAPH + {0x8E61, 0x5DC3}, //2504 #CJK UNIFIED IDEOGRAPH + {0x8E62, 0x5DC4}, //2505 #CJK UNIFIED IDEOGRAPH + {0x8E63, 0x5DC6}, //2506 #CJK UNIFIED IDEOGRAPH + {0x8E64, 0x5DC7}, //2507 #CJK UNIFIED IDEOGRAPH + {0x8E65, 0x5DC8}, //2508 #CJK UNIFIED IDEOGRAPH + {0x8E66, 0x5DC9}, //2509 #CJK UNIFIED IDEOGRAPH + {0x8E67, 0x5DCA}, //2510 #CJK UNIFIED IDEOGRAPH + {0x8E68, 0x5DCB}, //2511 #CJK UNIFIED IDEOGRAPH + {0x8E69, 0x5DCC}, //2512 #CJK UNIFIED IDEOGRAPH + {0x8E6A, 0x5DCE}, //2513 #CJK UNIFIED IDEOGRAPH + {0x8E6B, 0x5DCF}, //2514 #CJK UNIFIED IDEOGRAPH + {0x8E6C, 0x5DD0}, //2515 #CJK UNIFIED IDEOGRAPH + {0x8E6D, 0x5DD1}, //2516 #CJK UNIFIED IDEOGRAPH + {0x8E6E, 0x5DD2}, //2517 #CJK UNIFIED IDEOGRAPH + {0x8E6F, 0x5DD3}, //2518 #CJK UNIFIED IDEOGRAPH + {0x8E70, 0x5DD4}, //2519 #CJK UNIFIED IDEOGRAPH + {0x8E71, 0x5DD5}, //2520 #CJK UNIFIED IDEOGRAPH + {0x8E72, 0x5DD6}, //2521 #CJK UNIFIED IDEOGRAPH + {0x8E73, 0x5DD7}, //2522 #CJK UNIFIED IDEOGRAPH + {0x8E74, 0x5DD8}, //2523 #CJK UNIFIED IDEOGRAPH + {0x8E75, 0x5DD9}, //2524 #CJK UNIFIED IDEOGRAPH + {0x8E76, 0x5DDA}, //2525 #CJK UNIFIED IDEOGRAPH + {0x8E77, 0x5DDC}, //2526 #CJK UNIFIED IDEOGRAPH + {0x8E78, 0x5DDF}, //2527 #CJK UNIFIED IDEOGRAPH + {0x8E79, 0x5DE0}, //2528 #CJK UNIFIED IDEOGRAPH + {0x8E7A, 0x5DE3}, //2529 #CJK UNIFIED IDEOGRAPH + {0x8E7B, 0x5DE4}, //2530 #CJK UNIFIED IDEOGRAPH + {0x8E7C, 0x5DEA}, //2531 #CJK UNIFIED IDEOGRAPH + {0x8E7D, 0x5DEC}, //2532 #CJK UNIFIED IDEOGRAPH + {0x8E7E, 0x5DED}, //2533 #CJK UNIFIED IDEOGRAPH + {0x8E80, 0x5DF0}, //2534 #CJK UNIFIED IDEOGRAPH + {0x8E81, 0x5DF5}, //2535 #CJK UNIFIED IDEOGRAPH + {0x8E82, 0x5DF6}, //2536 #CJK UNIFIED IDEOGRAPH + {0x8E83, 0x5DF8}, //2537 #CJK UNIFIED IDEOGRAPH + {0x8E84, 0x5DF9}, //2538 #CJK UNIFIED IDEOGRAPH + {0x8E85, 0x5DFA}, //2539 #CJK UNIFIED IDEOGRAPH + {0x8E86, 0x5DFB}, //2540 #CJK UNIFIED IDEOGRAPH + {0x8E87, 0x5DFC}, //2541 #CJK UNIFIED IDEOGRAPH + {0x8E88, 0x5DFF}, //2542 #CJK UNIFIED IDEOGRAPH + {0x8E89, 0x5E00}, //2543 #CJK UNIFIED IDEOGRAPH + {0x8E8A, 0x5E04}, //2544 #CJK UNIFIED IDEOGRAPH + {0x8E8B, 0x5E07}, //2545 #CJK UNIFIED IDEOGRAPH + {0x8E8C, 0x5E09}, //2546 #CJK UNIFIED IDEOGRAPH + {0x8E8D, 0x5E0A}, //2547 #CJK UNIFIED IDEOGRAPH + {0x8E8E, 0x5E0B}, //2548 #CJK UNIFIED IDEOGRAPH + {0x8E8F, 0x5E0D}, //2549 #CJK UNIFIED IDEOGRAPH + {0x8E90, 0x5E0E}, //2550 #CJK UNIFIED IDEOGRAPH + {0x8E91, 0x5E12}, //2551 #CJK UNIFIED IDEOGRAPH + {0x8E92, 0x5E13}, //2552 #CJK UNIFIED IDEOGRAPH + {0x8E93, 0x5E17}, //2553 #CJK UNIFIED IDEOGRAPH + {0x8E94, 0x5E1E}, //2554 #CJK UNIFIED IDEOGRAPH + {0x8E95, 0x5E1F}, //2555 #CJK UNIFIED IDEOGRAPH + {0x8E96, 0x5E20}, //2556 #CJK UNIFIED IDEOGRAPH + {0x8E97, 0x5E21}, //2557 #CJK UNIFIED IDEOGRAPH + {0x8E98, 0x5E22}, //2558 #CJK UNIFIED IDEOGRAPH + {0x8E99, 0x5E23}, //2559 #CJK UNIFIED IDEOGRAPH + {0x8E9A, 0x5E24}, //2560 #CJK UNIFIED IDEOGRAPH + {0x8E9B, 0x5E25}, //2561 #CJK UNIFIED IDEOGRAPH + {0x8E9C, 0x5E28}, //2562 #CJK UNIFIED IDEOGRAPH + {0x8E9D, 0x5E29}, //2563 #CJK UNIFIED IDEOGRAPH + {0x8E9E, 0x5E2A}, //2564 #CJK UNIFIED IDEOGRAPH + {0x8E9F, 0x5E2B}, //2565 #CJK UNIFIED IDEOGRAPH + {0x8EA0, 0x5E2C}, //2566 #CJK UNIFIED IDEOGRAPH + {0x8EA1, 0x5E2F}, //2567 #CJK UNIFIED IDEOGRAPH + {0x8EA2, 0x5E30}, //2568 #CJK UNIFIED IDEOGRAPH + {0x8EA3, 0x5E32}, //2569 #CJK UNIFIED IDEOGRAPH + {0x8EA4, 0x5E33}, //2570 #CJK UNIFIED IDEOGRAPH + {0x8EA5, 0x5E34}, //2571 #CJK UNIFIED IDEOGRAPH + {0x8EA6, 0x5E35}, //2572 #CJK UNIFIED IDEOGRAPH + {0x8EA7, 0x5E36}, //2573 #CJK UNIFIED IDEOGRAPH + {0x8EA8, 0x5E39}, //2574 #CJK UNIFIED IDEOGRAPH + {0x8EA9, 0x5E3A}, //2575 #CJK UNIFIED IDEOGRAPH + {0x8EAA, 0x5E3E}, //2576 #CJK UNIFIED IDEOGRAPH + {0x8EAB, 0x5E3F}, //2577 #CJK UNIFIED IDEOGRAPH + {0x8EAC, 0x5E40}, //2578 #CJK UNIFIED IDEOGRAPH + {0x8EAD, 0x5E41}, //2579 #CJK UNIFIED IDEOGRAPH + {0x8EAE, 0x5E43}, //2580 #CJK UNIFIED IDEOGRAPH + {0x8EAF, 0x5E46}, //2581 #CJK UNIFIED IDEOGRAPH + {0x8EB0, 0x5E47}, //2582 #CJK UNIFIED IDEOGRAPH + {0x8EB1, 0x5E48}, //2583 #CJK UNIFIED IDEOGRAPH + {0x8EB2, 0x5E49}, //2584 #CJK UNIFIED IDEOGRAPH + {0x8EB3, 0x5E4A}, //2585 #CJK UNIFIED IDEOGRAPH + {0x8EB4, 0x5E4B}, //2586 #CJK UNIFIED IDEOGRAPH + {0x8EB5, 0x5E4D}, //2587 #CJK UNIFIED IDEOGRAPH + {0x8EB6, 0x5E4E}, //2588 #CJK UNIFIED IDEOGRAPH + {0x8EB7, 0x5E4F}, //2589 #CJK UNIFIED IDEOGRAPH + {0x8EB8, 0x5E50}, //2590 #CJK UNIFIED IDEOGRAPH + {0x8EB9, 0x5E51}, //2591 #CJK UNIFIED IDEOGRAPH + {0x8EBA, 0x5E52}, //2592 #CJK UNIFIED IDEOGRAPH + {0x8EBB, 0x5E53}, //2593 #CJK UNIFIED IDEOGRAPH + {0x8EBC, 0x5E56}, //2594 #CJK UNIFIED IDEOGRAPH + {0x8EBD, 0x5E57}, //2595 #CJK UNIFIED IDEOGRAPH + {0x8EBE, 0x5E58}, //2596 #CJK UNIFIED IDEOGRAPH + {0x8EBF, 0x5E59}, //2597 #CJK UNIFIED IDEOGRAPH + {0x8EC0, 0x5E5A}, //2598 #CJK UNIFIED IDEOGRAPH + {0x8EC1, 0x5E5C}, //2599 #CJK UNIFIED IDEOGRAPH + {0x8EC2, 0x5E5D}, //2600 #CJK UNIFIED IDEOGRAPH + {0x8EC3, 0x5E5F}, //2601 #CJK UNIFIED IDEOGRAPH + {0x8EC4, 0x5E60}, //2602 #CJK UNIFIED IDEOGRAPH + {0x8EC5, 0x5E63}, //2603 #CJK UNIFIED IDEOGRAPH + {0x8EC6, 0x5E64}, //2604 #CJK UNIFIED IDEOGRAPH + {0x8EC7, 0x5E65}, //2605 #CJK UNIFIED IDEOGRAPH + {0x8EC8, 0x5E66}, //2606 #CJK UNIFIED IDEOGRAPH + {0x8EC9, 0x5E67}, //2607 #CJK UNIFIED IDEOGRAPH + {0x8ECA, 0x5E68}, //2608 #CJK UNIFIED IDEOGRAPH + {0x8ECB, 0x5E69}, //2609 #CJK UNIFIED IDEOGRAPH + {0x8ECC, 0x5E6A}, //2610 #CJK UNIFIED IDEOGRAPH + {0x8ECD, 0x5E6B}, //2611 #CJK UNIFIED IDEOGRAPH + {0x8ECE, 0x5E6C}, //2612 #CJK UNIFIED IDEOGRAPH + {0x8ECF, 0x5E6D}, //2613 #CJK UNIFIED IDEOGRAPH + {0x8ED0, 0x5E6E}, //2614 #CJK UNIFIED IDEOGRAPH + {0x8ED1, 0x5E6F}, //2615 #CJK UNIFIED IDEOGRAPH + {0x8ED2, 0x5E70}, //2616 #CJK UNIFIED IDEOGRAPH + {0x8ED3, 0x5E71}, //2617 #CJK UNIFIED IDEOGRAPH + {0x8ED4, 0x5E75}, //2618 #CJK UNIFIED IDEOGRAPH + {0x8ED5, 0x5E77}, //2619 #CJK UNIFIED IDEOGRAPH + {0x8ED6, 0x5E79}, //2620 #CJK UNIFIED IDEOGRAPH + {0x8ED7, 0x5E7E}, //2621 #CJK UNIFIED IDEOGRAPH + {0x8ED8, 0x5E81}, //2622 #CJK UNIFIED IDEOGRAPH + {0x8ED9, 0x5E82}, //2623 #CJK UNIFIED IDEOGRAPH + {0x8EDA, 0x5E83}, //2624 #CJK UNIFIED IDEOGRAPH + {0x8EDB, 0x5E85}, //2625 #CJK UNIFIED IDEOGRAPH + {0x8EDC, 0x5E88}, //2626 #CJK UNIFIED IDEOGRAPH + {0x8EDD, 0x5E89}, //2627 #CJK UNIFIED IDEOGRAPH + {0x8EDE, 0x5E8C}, //2628 #CJK UNIFIED IDEOGRAPH + {0x8EDF, 0x5E8D}, //2629 #CJK UNIFIED IDEOGRAPH + {0x8EE0, 0x5E8E}, //2630 #CJK UNIFIED IDEOGRAPH + {0x8EE1, 0x5E92}, //2631 #CJK UNIFIED IDEOGRAPH + {0x8EE2, 0x5E98}, //2632 #CJK UNIFIED IDEOGRAPH + {0x8EE3, 0x5E9B}, //2633 #CJK UNIFIED IDEOGRAPH + {0x8EE4, 0x5E9D}, //2634 #CJK UNIFIED IDEOGRAPH + {0x8EE5, 0x5EA1}, //2635 #CJK UNIFIED IDEOGRAPH + {0x8EE6, 0x5EA2}, //2636 #CJK UNIFIED IDEOGRAPH + {0x8EE7, 0x5EA3}, //2637 #CJK UNIFIED IDEOGRAPH + {0x8EE8, 0x5EA4}, //2638 #CJK UNIFIED IDEOGRAPH + {0x8EE9, 0x5EA8}, //2639 #CJK UNIFIED IDEOGRAPH + {0x8EEA, 0x5EA9}, //2640 #CJK UNIFIED IDEOGRAPH + {0x8EEB, 0x5EAA}, //2641 #CJK UNIFIED IDEOGRAPH + {0x8EEC, 0x5EAB}, //2642 #CJK UNIFIED IDEOGRAPH + {0x8EED, 0x5EAC}, //2643 #CJK UNIFIED IDEOGRAPH + {0x8EEE, 0x5EAE}, //2644 #CJK UNIFIED IDEOGRAPH + {0x8EEF, 0x5EAF}, //2645 #CJK UNIFIED IDEOGRAPH + {0x8EF0, 0x5EB0}, //2646 #CJK UNIFIED IDEOGRAPH + {0x8EF1, 0x5EB1}, //2647 #CJK UNIFIED IDEOGRAPH + {0x8EF2, 0x5EB2}, //2648 #CJK UNIFIED IDEOGRAPH + {0x8EF3, 0x5EB4}, //2649 #CJK UNIFIED IDEOGRAPH + {0x8EF4, 0x5EBA}, //2650 #CJK UNIFIED IDEOGRAPH + {0x8EF5, 0x5EBB}, //2651 #CJK UNIFIED IDEOGRAPH + {0x8EF6, 0x5EBC}, //2652 #CJK UNIFIED IDEOGRAPH + {0x8EF7, 0x5EBD}, //2653 #CJK UNIFIED IDEOGRAPH + {0x8EF8, 0x5EBF}, //2654 #CJK UNIFIED IDEOGRAPH + {0x8EF9, 0x5EC0}, //2655 #CJK UNIFIED IDEOGRAPH + {0x8EFA, 0x5EC1}, //2656 #CJK UNIFIED IDEOGRAPH + {0x8EFB, 0x5EC2}, //2657 #CJK UNIFIED IDEOGRAPH + {0x8EFC, 0x5EC3}, //2658 #CJK UNIFIED IDEOGRAPH + {0x8EFD, 0x5EC4}, //2659 #CJK UNIFIED IDEOGRAPH + {0x8EFE, 0x5EC5}, //2660 #CJK UNIFIED IDEOGRAPH + {0x8F40, 0x5EC6}, //2661 #CJK UNIFIED IDEOGRAPH + {0x8F41, 0x5EC7}, //2662 #CJK UNIFIED IDEOGRAPH + {0x8F42, 0x5EC8}, //2663 #CJK UNIFIED IDEOGRAPH + {0x8F43, 0x5ECB}, //2664 #CJK UNIFIED IDEOGRAPH + {0x8F44, 0x5ECC}, //2665 #CJK UNIFIED IDEOGRAPH + {0x8F45, 0x5ECD}, //2666 #CJK UNIFIED IDEOGRAPH + {0x8F46, 0x5ECE}, //2667 #CJK UNIFIED IDEOGRAPH + {0x8F47, 0x5ECF}, //2668 #CJK UNIFIED IDEOGRAPH + {0x8F48, 0x5ED0}, //2669 #CJK UNIFIED IDEOGRAPH + {0x8F49, 0x5ED4}, //2670 #CJK UNIFIED IDEOGRAPH + {0x8F4A, 0x5ED5}, //2671 #CJK UNIFIED IDEOGRAPH + {0x8F4B, 0x5ED7}, //2672 #CJK UNIFIED IDEOGRAPH + {0x8F4C, 0x5ED8}, //2673 #CJK UNIFIED IDEOGRAPH + {0x8F4D, 0x5ED9}, //2674 #CJK UNIFIED IDEOGRAPH + {0x8F4E, 0x5EDA}, //2675 #CJK UNIFIED IDEOGRAPH + {0x8F4F, 0x5EDC}, //2676 #CJK UNIFIED IDEOGRAPH + {0x8F50, 0x5EDD}, //2677 #CJK UNIFIED IDEOGRAPH + {0x8F51, 0x5EDE}, //2678 #CJK UNIFIED IDEOGRAPH + {0x8F52, 0x5EDF}, //2679 #CJK UNIFIED IDEOGRAPH + {0x8F53, 0x5EE0}, //2680 #CJK UNIFIED IDEOGRAPH + {0x8F54, 0x5EE1}, //2681 #CJK UNIFIED IDEOGRAPH + {0x8F55, 0x5EE2}, //2682 #CJK UNIFIED IDEOGRAPH + {0x8F56, 0x5EE3}, //2683 #CJK UNIFIED IDEOGRAPH + {0x8F57, 0x5EE4}, //2684 #CJK UNIFIED IDEOGRAPH + {0x8F58, 0x5EE5}, //2685 #CJK UNIFIED IDEOGRAPH + {0x8F59, 0x5EE6}, //2686 #CJK UNIFIED IDEOGRAPH + {0x8F5A, 0x5EE7}, //2687 #CJK UNIFIED IDEOGRAPH + {0x8F5B, 0x5EE9}, //2688 #CJK UNIFIED IDEOGRAPH + {0x8F5C, 0x5EEB}, //2689 #CJK UNIFIED IDEOGRAPH + {0x8F5D, 0x5EEC}, //2690 #CJK UNIFIED IDEOGRAPH + {0x8F5E, 0x5EED}, //2691 #CJK UNIFIED IDEOGRAPH + {0x8F5F, 0x5EEE}, //2692 #CJK UNIFIED IDEOGRAPH + {0x8F60, 0x5EEF}, //2693 #CJK UNIFIED IDEOGRAPH + {0x8F61, 0x5EF0}, //2694 #CJK UNIFIED IDEOGRAPH + {0x8F62, 0x5EF1}, //2695 #CJK UNIFIED IDEOGRAPH + {0x8F63, 0x5EF2}, //2696 #CJK UNIFIED IDEOGRAPH + {0x8F64, 0x5EF3}, //2697 #CJK UNIFIED IDEOGRAPH + {0x8F65, 0x5EF5}, //2698 #CJK UNIFIED IDEOGRAPH + {0x8F66, 0x5EF8}, //2699 #CJK UNIFIED IDEOGRAPH + {0x8F67, 0x5EF9}, //2700 #CJK UNIFIED IDEOGRAPH + {0x8F68, 0x5EFB}, //2701 #CJK UNIFIED IDEOGRAPH + {0x8F69, 0x5EFC}, //2702 #CJK UNIFIED IDEOGRAPH + {0x8F6A, 0x5EFD}, //2703 #CJK UNIFIED IDEOGRAPH + {0x8F6B, 0x5F05}, //2704 #CJK UNIFIED IDEOGRAPH + {0x8F6C, 0x5F06}, //2705 #CJK UNIFIED IDEOGRAPH + {0x8F6D, 0x5F07}, //2706 #CJK UNIFIED IDEOGRAPH + {0x8F6E, 0x5F09}, //2707 #CJK UNIFIED IDEOGRAPH + {0x8F6F, 0x5F0C}, //2708 #CJK UNIFIED IDEOGRAPH + {0x8F70, 0x5F0D}, //2709 #CJK UNIFIED IDEOGRAPH + {0x8F71, 0x5F0E}, //2710 #CJK UNIFIED IDEOGRAPH + {0x8F72, 0x5F10}, //2711 #CJK UNIFIED IDEOGRAPH + {0x8F73, 0x5F12}, //2712 #CJK UNIFIED IDEOGRAPH + {0x8F74, 0x5F14}, //2713 #CJK UNIFIED IDEOGRAPH + {0x8F75, 0x5F16}, //2714 #CJK UNIFIED IDEOGRAPH + {0x8F76, 0x5F19}, //2715 #CJK UNIFIED IDEOGRAPH + {0x8F77, 0x5F1A}, //2716 #CJK UNIFIED IDEOGRAPH + {0x8F78, 0x5F1C}, //2717 #CJK UNIFIED IDEOGRAPH + {0x8F79, 0x5F1D}, //2718 #CJK UNIFIED IDEOGRAPH + {0x8F7A, 0x5F1E}, //2719 #CJK UNIFIED IDEOGRAPH + {0x8F7B, 0x5F21}, //2720 #CJK UNIFIED IDEOGRAPH + {0x8F7C, 0x5F22}, //2721 #CJK UNIFIED IDEOGRAPH + {0x8F7D, 0x5F23}, //2722 #CJK UNIFIED IDEOGRAPH + {0x8F7E, 0x5F24}, //2723 #CJK UNIFIED IDEOGRAPH + {0x8F80, 0x5F28}, //2724 #CJK UNIFIED IDEOGRAPH + {0x8F81, 0x5F2B}, //2725 #CJK UNIFIED IDEOGRAPH + {0x8F82, 0x5F2C}, //2726 #CJK UNIFIED IDEOGRAPH + {0x8F83, 0x5F2E}, //2727 #CJK UNIFIED IDEOGRAPH + {0x8F84, 0x5F30}, //2728 #CJK UNIFIED IDEOGRAPH + {0x8F85, 0x5F32}, //2729 #CJK UNIFIED IDEOGRAPH + {0x8F86, 0x5F33}, //2730 #CJK UNIFIED IDEOGRAPH + {0x8F87, 0x5F34}, //2731 #CJK UNIFIED IDEOGRAPH + {0x8F88, 0x5F35}, //2732 #CJK UNIFIED IDEOGRAPH + {0x8F89, 0x5F36}, //2733 #CJK UNIFIED IDEOGRAPH + {0x8F8A, 0x5F37}, //2734 #CJK UNIFIED IDEOGRAPH + {0x8F8B, 0x5F38}, //2735 #CJK UNIFIED IDEOGRAPH + {0x8F8C, 0x5F3B}, //2736 #CJK UNIFIED IDEOGRAPH + {0x8F8D, 0x5F3D}, //2737 #CJK UNIFIED IDEOGRAPH + {0x8F8E, 0x5F3E}, //2738 #CJK UNIFIED IDEOGRAPH + {0x8F8F, 0x5F3F}, //2739 #CJK UNIFIED IDEOGRAPH + {0x8F90, 0x5F41}, //2740 #CJK UNIFIED IDEOGRAPH + {0x8F91, 0x5F42}, //2741 #CJK UNIFIED IDEOGRAPH + {0x8F92, 0x5F43}, //2742 #CJK UNIFIED IDEOGRAPH + {0x8F93, 0x5F44}, //2743 #CJK UNIFIED IDEOGRAPH + {0x8F94, 0x5F45}, //2744 #CJK UNIFIED IDEOGRAPH + {0x8F95, 0x5F46}, //2745 #CJK UNIFIED IDEOGRAPH + {0x8F96, 0x5F47}, //2746 #CJK UNIFIED IDEOGRAPH + {0x8F97, 0x5F48}, //2747 #CJK UNIFIED IDEOGRAPH + {0x8F98, 0x5F49}, //2748 #CJK UNIFIED IDEOGRAPH + {0x8F99, 0x5F4A}, //2749 #CJK UNIFIED IDEOGRAPH + {0x8F9A, 0x5F4B}, //2750 #CJK UNIFIED IDEOGRAPH + {0x8F9B, 0x5F4C}, //2751 #CJK UNIFIED IDEOGRAPH + {0x8F9C, 0x5F4D}, //2752 #CJK UNIFIED IDEOGRAPH + {0x8F9D, 0x5F4E}, //2753 #CJK UNIFIED IDEOGRAPH + {0x8F9E, 0x5F4F}, //2754 #CJK UNIFIED IDEOGRAPH + {0x8F9F, 0x5F51}, //2755 #CJK UNIFIED IDEOGRAPH + {0x8FA0, 0x5F54}, //2756 #CJK UNIFIED IDEOGRAPH + {0x8FA1, 0x5F59}, //2757 #CJK UNIFIED IDEOGRAPH + {0x8FA2, 0x5F5A}, //2758 #CJK UNIFIED IDEOGRAPH + {0x8FA3, 0x5F5B}, //2759 #CJK UNIFIED IDEOGRAPH + {0x8FA4, 0x5F5C}, //2760 #CJK UNIFIED IDEOGRAPH + {0x8FA5, 0x5F5E}, //2761 #CJK UNIFIED IDEOGRAPH + {0x8FA6, 0x5F5F}, //2762 #CJK UNIFIED IDEOGRAPH + {0x8FA7, 0x5F60}, //2763 #CJK UNIFIED IDEOGRAPH + {0x8FA8, 0x5F63}, //2764 #CJK UNIFIED IDEOGRAPH + {0x8FA9, 0x5F65}, //2765 #CJK UNIFIED IDEOGRAPH + {0x8FAA, 0x5F67}, //2766 #CJK UNIFIED IDEOGRAPH + {0x8FAB, 0x5F68}, //2767 #CJK UNIFIED IDEOGRAPH + {0x8FAC, 0x5F6B}, //2768 #CJK UNIFIED IDEOGRAPH + {0x8FAD, 0x5F6E}, //2769 #CJK UNIFIED IDEOGRAPH + {0x8FAE, 0x5F6F}, //2770 #CJK UNIFIED IDEOGRAPH + {0x8FAF, 0x5F72}, //2771 #CJK UNIFIED IDEOGRAPH + {0x8FB0, 0x5F74}, //2772 #CJK UNIFIED IDEOGRAPH + {0x8FB1, 0x5F75}, //2773 #CJK UNIFIED IDEOGRAPH + {0x8FB2, 0x5F76}, //2774 #CJK UNIFIED IDEOGRAPH + {0x8FB3, 0x5F78}, //2775 #CJK UNIFIED IDEOGRAPH + {0x8FB4, 0x5F7A}, //2776 #CJK UNIFIED IDEOGRAPH + {0x8FB5, 0x5F7D}, //2777 #CJK UNIFIED IDEOGRAPH + {0x8FB6, 0x5F7E}, //2778 #CJK UNIFIED IDEOGRAPH + {0x8FB7, 0x5F7F}, //2779 #CJK UNIFIED IDEOGRAPH + {0x8FB8, 0x5F83}, //2780 #CJK UNIFIED IDEOGRAPH + {0x8FB9, 0x5F86}, //2781 #CJK UNIFIED IDEOGRAPH + {0x8FBA, 0x5F8D}, //2782 #CJK UNIFIED IDEOGRAPH + {0x8FBB, 0x5F8E}, //2783 #CJK UNIFIED IDEOGRAPH + {0x8FBC, 0x5F8F}, //2784 #CJK UNIFIED IDEOGRAPH + {0x8FBD, 0x5F91}, //2785 #CJK UNIFIED IDEOGRAPH + {0x8FBE, 0x5F93}, //2786 #CJK UNIFIED IDEOGRAPH + {0x8FBF, 0x5F94}, //2787 #CJK UNIFIED IDEOGRAPH + {0x8FC0, 0x5F96}, //2788 #CJK UNIFIED IDEOGRAPH + {0x8FC1, 0x5F9A}, //2789 #CJK UNIFIED IDEOGRAPH + {0x8FC2, 0x5F9B}, //2790 #CJK UNIFIED IDEOGRAPH + {0x8FC3, 0x5F9D}, //2791 #CJK UNIFIED IDEOGRAPH + {0x8FC4, 0x5F9E}, //2792 #CJK UNIFIED IDEOGRAPH + {0x8FC5, 0x5F9F}, //2793 #CJK UNIFIED IDEOGRAPH + {0x8FC6, 0x5FA0}, //2794 #CJK UNIFIED IDEOGRAPH + {0x8FC7, 0x5FA2}, //2795 #CJK UNIFIED IDEOGRAPH + {0x8FC8, 0x5FA3}, //2796 #CJK UNIFIED IDEOGRAPH + {0x8FC9, 0x5FA4}, //2797 #CJK UNIFIED IDEOGRAPH + {0x8FCA, 0x5FA5}, //2798 #CJK UNIFIED IDEOGRAPH + {0x8FCB, 0x5FA6}, //2799 #CJK UNIFIED IDEOGRAPH + {0x8FCC, 0x5FA7}, //2800 #CJK UNIFIED IDEOGRAPH + {0x8FCD, 0x5FA9}, //2801 #CJK UNIFIED IDEOGRAPH + {0x8FCE, 0x5FAB}, //2802 #CJK UNIFIED IDEOGRAPH + {0x8FCF, 0x5FAC}, //2803 #CJK UNIFIED IDEOGRAPH + {0x8FD0, 0x5FAF}, //2804 #CJK UNIFIED IDEOGRAPH + {0x8FD1, 0x5FB0}, //2805 #CJK UNIFIED IDEOGRAPH + {0x8FD2, 0x5FB1}, //2806 #CJK UNIFIED IDEOGRAPH + {0x8FD3, 0x5FB2}, //2807 #CJK UNIFIED IDEOGRAPH + {0x8FD4, 0x5FB3}, //2808 #CJK UNIFIED IDEOGRAPH + {0x8FD5, 0x5FB4}, //2809 #CJK UNIFIED IDEOGRAPH + {0x8FD6, 0x5FB6}, //2810 #CJK UNIFIED IDEOGRAPH + {0x8FD7, 0x5FB8}, //2811 #CJK UNIFIED IDEOGRAPH + {0x8FD8, 0x5FB9}, //2812 #CJK UNIFIED IDEOGRAPH + {0x8FD9, 0x5FBA}, //2813 #CJK UNIFIED IDEOGRAPH + {0x8FDA, 0x5FBB}, //2814 #CJK UNIFIED IDEOGRAPH + {0x8FDB, 0x5FBE}, //2815 #CJK UNIFIED IDEOGRAPH + {0x8FDC, 0x5FBF}, //2816 #CJK UNIFIED IDEOGRAPH + {0x8FDD, 0x5FC0}, //2817 #CJK UNIFIED IDEOGRAPH + {0x8FDE, 0x5FC1}, //2818 #CJK UNIFIED IDEOGRAPH + {0x8FDF, 0x5FC2}, //2819 #CJK UNIFIED IDEOGRAPH + {0x8FE0, 0x5FC7}, //2820 #CJK UNIFIED IDEOGRAPH + {0x8FE1, 0x5FC8}, //2821 #CJK UNIFIED IDEOGRAPH + {0x8FE2, 0x5FCA}, //2822 #CJK UNIFIED IDEOGRAPH + {0x8FE3, 0x5FCB}, //2823 #CJK UNIFIED IDEOGRAPH + {0x8FE4, 0x5FCE}, //2824 #CJK UNIFIED IDEOGRAPH + {0x8FE5, 0x5FD3}, //2825 #CJK UNIFIED IDEOGRAPH + {0x8FE6, 0x5FD4}, //2826 #CJK UNIFIED IDEOGRAPH + {0x8FE7, 0x5FD5}, //2827 #CJK UNIFIED IDEOGRAPH + {0x8FE8, 0x5FDA}, //2828 #CJK UNIFIED IDEOGRAPH + {0x8FE9, 0x5FDB}, //2829 #CJK UNIFIED IDEOGRAPH + {0x8FEA, 0x5FDC}, //2830 #CJK UNIFIED IDEOGRAPH + {0x8FEB, 0x5FDE}, //2831 #CJK UNIFIED IDEOGRAPH + {0x8FEC, 0x5FDF}, //2832 #CJK UNIFIED IDEOGRAPH + {0x8FED, 0x5FE2}, //2833 #CJK UNIFIED IDEOGRAPH + {0x8FEE, 0x5FE3}, //2834 #CJK UNIFIED IDEOGRAPH + {0x8FEF, 0x5FE5}, //2835 #CJK UNIFIED IDEOGRAPH + {0x8FF0, 0x5FE6}, //2836 #CJK UNIFIED IDEOGRAPH + {0x8FF1, 0x5FE8}, //2837 #CJK UNIFIED IDEOGRAPH + {0x8FF2, 0x5FE9}, //2838 #CJK UNIFIED IDEOGRAPH + {0x8FF3, 0x5FEC}, //2839 #CJK UNIFIED IDEOGRAPH + {0x8FF4, 0x5FEF}, //2840 #CJK UNIFIED IDEOGRAPH + {0x8FF5, 0x5FF0}, //2841 #CJK UNIFIED IDEOGRAPH + {0x8FF6, 0x5FF2}, //2842 #CJK UNIFIED IDEOGRAPH + {0x8FF7, 0x5FF3}, //2843 #CJK UNIFIED IDEOGRAPH + {0x8FF8, 0x5FF4}, //2844 #CJK UNIFIED IDEOGRAPH + {0x8FF9, 0x5FF6}, //2845 #CJK UNIFIED IDEOGRAPH + {0x8FFA, 0x5FF7}, //2846 #CJK UNIFIED IDEOGRAPH + {0x8FFB, 0x5FF9}, //2847 #CJK UNIFIED IDEOGRAPH + {0x8FFC, 0x5FFA}, //2848 #CJK UNIFIED IDEOGRAPH + {0x8FFD, 0x5FFC}, //2849 #CJK UNIFIED IDEOGRAPH + {0x8FFE, 0x6007}, //2850 #CJK UNIFIED IDEOGRAPH + {0x9040, 0x6008}, //2851 #CJK UNIFIED IDEOGRAPH + {0x9041, 0x6009}, //2852 #CJK UNIFIED IDEOGRAPH + {0x9042, 0x600B}, //2853 #CJK UNIFIED IDEOGRAPH + {0x9043, 0x600C}, //2854 #CJK UNIFIED IDEOGRAPH + {0x9044, 0x6010}, //2855 #CJK UNIFIED IDEOGRAPH + {0x9045, 0x6011}, //2856 #CJK UNIFIED IDEOGRAPH + {0x9046, 0x6013}, //2857 #CJK UNIFIED IDEOGRAPH + {0x9047, 0x6017}, //2858 #CJK UNIFIED IDEOGRAPH + {0x9048, 0x6018}, //2859 #CJK UNIFIED IDEOGRAPH + {0x9049, 0x601A}, //2860 #CJK UNIFIED IDEOGRAPH + {0x904A, 0x601E}, //2861 #CJK UNIFIED IDEOGRAPH + {0x904B, 0x601F}, //2862 #CJK UNIFIED IDEOGRAPH + {0x904C, 0x6022}, //2863 #CJK UNIFIED IDEOGRAPH + {0x904D, 0x6023}, //2864 #CJK UNIFIED IDEOGRAPH + {0x904E, 0x6024}, //2865 #CJK UNIFIED IDEOGRAPH + {0x904F, 0x602C}, //2866 #CJK UNIFIED IDEOGRAPH + {0x9050, 0x602D}, //2867 #CJK UNIFIED IDEOGRAPH + {0x9051, 0x602E}, //2868 #CJK UNIFIED IDEOGRAPH + {0x9052, 0x6030}, //2869 #CJK UNIFIED IDEOGRAPH + {0x9053, 0x6031}, //2870 #CJK UNIFIED IDEOGRAPH + {0x9054, 0x6032}, //2871 #CJK UNIFIED IDEOGRAPH + {0x9055, 0x6033}, //2872 #CJK UNIFIED IDEOGRAPH + {0x9056, 0x6034}, //2873 #CJK UNIFIED IDEOGRAPH + {0x9057, 0x6036}, //2874 #CJK UNIFIED IDEOGRAPH + {0x9058, 0x6037}, //2875 #CJK UNIFIED IDEOGRAPH + {0x9059, 0x6038}, //2876 #CJK UNIFIED IDEOGRAPH + {0x905A, 0x6039}, //2877 #CJK UNIFIED IDEOGRAPH + {0x905B, 0x603A}, //2878 #CJK UNIFIED IDEOGRAPH + {0x905C, 0x603D}, //2879 #CJK UNIFIED IDEOGRAPH + {0x905D, 0x603E}, //2880 #CJK UNIFIED IDEOGRAPH + {0x905E, 0x6040}, //2881 #CJK UNIFIED IDEOGRAPH + {0x905F, 0x6044}, //2882 #CJK UNIFIED IDEOGRAPH + {0x9060, 0x6045}, //2883 #CJK UNIFIED IDEOGRAPH + {0x9061, 0x6046}, //2884 #CJK UNIFIED IDEOGRAPH + {0x9062, 0x6047}, //2885 #CJK UNIFIED IDEOGRAPH + {0x9063, 0x6048}, //2886 #CJK UNIFIED IDEOGRAPH + {0x9064, 0x6049}, //2887 #CJK UNIFIED IDEOGRAPH + {0x9065, 0x604A}, //2888 #CJK UNIFIED IDEOGRAPH + {0x9066, 0x604C}, //2889 #CJK UNIFIED IDEOGRAPH + {0x9067, 0x604E}, //2890 #CJK UNIFIED IDEOGRAPH + {0x9068, 0x604F}, //2891 #CJK UNIFIED IDEOGRAPH + {0x9069, 0x6051}, //2892 #CJK UNIFIED IDEOGRAPH + {0x906A, 0x6053}, //2893 #CJK UNIFIED IDEOGRAPH + {0x906B, 0x6054}, //2894 #CJK UNIFIED IDEOGRAPH + {0x906C, 0x6056}, //2895 #CJK UNIFIED IDEOGRAPH + {0x906D, 0x6057}, //2896 #CJK UNIFIED IDEOGRAPH + {0x906E, 0x6058}, //2897 #CJK UNIFIED IDEOGRAPH + {0x906F, 0x605B}, //2898 #CJK UNIFIED IDEOGRAPH + {0x9070, 0x605C}, //2899 #CJK UNIFIED IDEOGRAPH + {0x9071, 0x605E}, //2900 #CJK UNIFIED IDEOGRAPH + {0x9072, 0x605F}, //2901 #CJK UNIFIED IDEOGRAPH + {0x9073, 0x6060}, //2902 #CJK UNIFIED IDEOGRAPH + {0x9074, 0x6061}, //2903 #CJK UNIFIED IDEOGRAPH + {0x9075, 0x6065}, //2904 #CJK UNIFIED IDEOGRAPH + {0x9076, 0x6066}, //2905 #CJK UNIFIED IDEOGRAPH + {0x9077, 0x606E}, //2906 #CJK UNIFIED IDEOGRAPH + {0x9078, 0x6071}, //2907 #CJK UNIFIED IDEOGRAPH + {0x9079, 0x6072}, //2908 #CJK UNIFIED IDEOGRAPH + {0x907A, 0x6074}, //2909 #CJK UNIFIED IDEOGRAPH + {0x907B, 0x6075}, //2910 #CJK UNIFIED IDEOGRAPH + {0x907C, 0x6077}, //2911 #CJK UNIFIED IDEOGRAPH + {0x907D, 0x607E}, //2912 #CJK UNIFIED IDEOGRAPH + {0x907E, 0x6080}, //2913 #CJK UNIFIED IDEOGRAPH + {0x9080, 0x6081}, //2914 #CJK UNIFIED IDEOGRAPH + {0x9081, 0x6082}, //2915 #CJK UNIFIED IDEOGRAPH + {0x9082, 0x6085}, //2916 #CJK UNIFIED IDEOGRAPH + {0x9083, 0x6086}, //2917 #CJK UNIFIED IDEOGRAPH + {0x9084, 0x6087}, //2918 #CJK UNIFIED IDEOGRAPH + {0x9085, 0x6088}, //2919 #CJK UNIFIED IDEOGRAPH + {0x9086, 0x608A}, //2920 #CJK UNIFIED IDEOGRAPH + {0x9087, 0x608B}, //2921 #CJK UNIFIED IDEOGRAPH + {0x9088, 0x608E}, //2922 #CJK UNIFIED IDEOGRAPH + {0x9089, 0x608F}, //2923 #CJK UNIFIED IDEOGRAPH + {0x908A, 0x6090}, //2924 #CJK UNIFIED IDEOGRAPH + {0x908B, 0x6091}, //2925 #CJK UNIFIED IDEOGRAPH + {0x908C, 0x6093}, //2926 #CJK UNIFIED IDEOGRAPH + {0x908D, 0x6095}, //2927 #CJK UNIFIED IDEOGRAPH + {0x908E, 0x6097}, //2928 #CJK UNIFIED IDEOGRAPH + {0x908F, 0x6098}, //2929 #CJK UNIFIED IDEOGRAPH + {0x9090, 0x6099}, //2930 #CJK UNIFIED IDEOGRAPH + {0x9091, 0x609C}, //2931 #CJK UNIFIED IDEOGRAPH + {0x9092, 0x609E}, //2932 #CJK UNIFIED IDEOGRAPH + {0x9093, 0x60A1}, //2933 #CJK UNIFIED IDEOGRAPH + {0x9094, 0x60A2}, //2934 #CJK UNIFIED IDEOGRAPH + {0x9095, 0x60A4}, //2935 #CJK UNIFIED IDEOGRAPH + {0x9096, 0x60A5}, //2936 #CJK UNIFIED IDEOGRAPH + {0x9097, 0x60A7}, //2937 #CJK UNIFIED IDEOGRAPH + {0x9098, 0x60A9}, //2938 #CJK UNIFIED IDEOGRAPH + {0x9099, 0x60AA}, //2939 #CJK UNIFIED IDEOGRAPH + {0x909A, 0x60AE}, //2940 #CJK UNIFIED IDEOGRAPH + {0x909B, 0x60B0}, //2941 #CJK UNIFIED IDEOGRAPH + {0x909C, 0x60B3}, //2942 #CJK UNIFIED IDEOGRAPH + {0x909D, 0x60B5}, //2943 #CJK UNIFIED IDEOGRAPH + {0x909E, 0x60B6}, //2944 #CJK UNIFIED IDEOGRAPH + {0x909F, 0x60B7}, //2945 #CJK UNIFIED IDEOGRAPH + {0x90A0, 0x60B9}, //2946 #CJK UNIFIED IDEOGRAPH + {0x90A1, 0x60BA}, //2947 #CJK UNIFIED IDEOGRAPH + {0x90A2, 0x60BD}, //2948 #CJK UNIFIED IDEOGRAPH + {0x90A3, 0x60BE}, //2949 #CJK UNIFIED IDEOGRAPH + {0x90A4, 0x60BF}, //2950 #CJK UNIFIED IDEOGRAPH + {0x90A5, 0x60C0}, //2951 #CJK UNIFIED IDEOGRAPH + {0x90A6, 0x60C1}, //2952 #CJK UNIFIED IDEOGRAPH + {0x90A7, 0x60C2}, //2953 #CJK UNIFIED IDEOGRAPH + {0x90A8, 0x60C3}, //2954 #CJK UNIFIED IDEOGRAPH + {0x90A9, 0x60C4}, //2955 #CJK UNIFIED IDEOGRAPH + {0x90AA, 0x60C7}, //2956 #CJK UNIFIED IDEOGRAPH + {0x90AB, 0x60C8}, //2957 #CJK UNIFIED IDEOGRAPH + {0x90AC, 0x60C9}, //2958 #CJK UNIFIED IDEOGRAPH + {0x90AD, 0x60CC}, //2959 #CJK UNIFIED IDEOGRAPH + {0x90AE, 0x60CD}, //2960 #CJK UNIFIED IDEOGRAPH + {0x90AF, 0x60CE}, //2961 #CJK UNIFIED IDEOGRAPH + {0x90B0, 0x60CF}, //2962 #CJK UNIFIED IDEOGRAPH + {0x90B1, 0x60D0}, //2963 #CJK UNIFIED IDEOGRAPH + {0x90B2, 0x60D2}, //2964 #CJK UNIFIED IDEOGRAPH + {0x90B3, 0x60D3}, //2965 #CJK UNIFIED IDEOGRAPH + {0x90B4, 0x60D4}, //2966 #CJK UNIFIED IDEOGRAPH + {0x90B5, 0x60D6}, //2967 #CJK UNIFIED IDEOGRAPH + {0x90B6, 0x60D7}, //2968 #CJK UNIFIED IDEOGRAPH + {0x90B7, 0x60D9}, //2969 #CJK UNIFIED IDEOGRAPH + {0x90B8, 0x60DB}, //2970 #CJK UNIFIED IDEOGRAPH + {0x90B9, 0x60DE}, //2971 #CJK UNIFIED IDEOGRAPH + {0x90BA, 0x60E1}, //2972 #CJK UNIFIED IDEOGRAPH + {0x90BB, 0x60E2}, //2973 #CJK UNIFIED IDEOGRAPH + {0x90BC, 0x60E3}, //2974 #CJK UNIFIED IDEOGRAPH + {0x90BD, 0x60E4}, //2975 #CJK UNIFIED IDEOGRAPH + {0x90BE, 0x60E5}, //2976 #CJK UNIFIED IDEOGRAPH + {0x90BF, 0x60EA}, //2977 #CJK UNIFIED IDEOGRAPH + {0x90C0, 0x60F1}, //2978 #CJK UNIFIED IDEOGRAPH + {0x90C1, 0x60F2}, //2979 #CJK UNIFIED IDEOGRAPH + {0x90C2, 0x60F5}, //2980 #CJK UNIFIED IDEOGRAPH + {0x90C3, 0x60F7}, //2981 #CJK UNIFIED IDEOGRAPH + {0x90C4, 0x60F8}, //2982 #CJK UNIFIED IDEOGRAPH + {0x90C5, 0x60FB}, //2983 #CJK UNIFIED IDEOGRAPH + {0x90C6, 0x60FC}, //2984 #CJK UNIFIED IDEOGRAPH + {0x90C7, 0x60FD}, //2985 #CJK UNIFIED IDEOGRAPH + {0x90C8, 0x60FE}, //2986 #CJK UNIFIED IDEOGRAPH + {0x90C9, 0x60FF}, //2987 #CJK UNIFIED IDEOGRAPH + {0x90CA, 0x6102}, //2988 #CJK UNIFIED IDEOGRAPH + {0x90CB, 0x6103}, //2989 #CJK UNIFIED IDEOGRAPH + {0x90CC, 0x6104}, //2990 #CJK UNIFIED IDEOGRAPH + {0x90CD, 0x6105}, //2991 #CJK UNIFIED IDEOGRAPH + {0x90CE, 0x6107}, //2992 #CJK UNIFIED IDEOGRAPH + {0x90CF, 0x610A}, //2993 #CJK UNIFIED IDEOGRAPH + {0x90D0, 0x610B}, //2994 #CJK UNIFIED IDEOGRAPH + {0x90D1, 0x610C}, //2995 #CJK UNIFIED IDEOGRAPH + {0x90D2, 0x6110}, //2996 #CJK UNIFIED IDEOGRAPH + {0x90D3, 0x6111}, //2997 #CJK UNIFIED IDEOGRAPH + {0x90D4, 0x6112}, //2998 #CJK UNIFIED IDEOGRAPH + {0x90D5, 0x6113}, //2999 #CJK UNIFIED IDEOGRAPH + {0x90D6, 0x6114}, //3000 #CJK UNIFIED IDEOGRAPH + {0x90D7, 0x6116}, //3001 #CJK UNIFIED IDEOGRAPH + {0x90D8, 0x6117}, //3002 #CJK UNIFIED IDEOGRAPH + {0x90D9, 0x6118}, //3003 #CJK UNIFIED IDEOGRAPH + {0x90DA, 0x6119}, //3004 #CJK UNIFIED IDEOGRAPH + {0x90DB, 0x611B}, //3005 #CJK UNIFIED IDEOGRAPH + {0x90DC, 0x611C}, //3006 #CJK UNIFIED IDEOGRAPH + {0x90DD, 0x611D}, //3007 #CJK UNIFIED IDEOGRAPH + {0x90DE, 0x611E}, //3008 #CJK UNIFIED IDEOGRAPH + {0x90DF, 0x6121}, //3009 #CJK UNIFIED IDEOGRAPH + {0x90E0, 0x6122}, //3010 #CJK UNIFIED IDEOGRAPH + {0x90E1, 0x6125}, //3011 #CJK UNIFIED IDEOGRAPH + {0x90E2, 0x6128}, //3012 #CJK UNIFIED IDEOGRAPH + {0x90E3, 0x6129}, //3013 #CJK UNIFIED IDEOGRAPH + {0x90E4, 0x612A}, //3014 #CJK UNIFIED IDEOGRAPH + {0x90E5, 0x612C}, //3015 #CJK UNIFIED IDEOGRAPH + {0x90E6, 0x612D}, //3016 #CJK UNIFIED IDEOGRAPH + {0x90E7, 0x612E}, //3017 #CJK UNIFIED IDEOGRAPH + {0x90E8, 0x612F}, //3018 #CJK UNIFIED IDEOGRAPH + {0x90E9, 0x6130}, //3019 #CJK UNIFIED IDEOGRAPH + {0x90EA, 0x6131}, //3020 #CJK UNIFIED IDEOGRAPH + {0x90EB, 0x6132}, //3021 #CJK UNIFIED IDEOGRAPH + {0x90EC, 0x6133}, //3022 #CJK UNIFIED IDEOGRAPH + {0x90ED, 0x6134}, //3023 #CJK UNIFIED IDEOGRAPH + {0x90EE, 0x6135}, //3024 #CJK UNIFIED IDEOGRAPH + {0x90EF, 0x6136}, //3025 #CJK UNIFIED IDEOGRAPH + {0x90F0, 0x6137}, //3026 #CJK UNIFIED IDEOGRAPH + {0x90F1, 0x6138}, //3027 #CJK UNIFIED IDEOGRAPH + {0x90F2, 0x6139}, //3028 #CJK UNIFIED IDEOGRAPH + {0x90F3, 0x613A}, //3029 #CJK UNIFIED IDEOGRAPH + {0x90F4, 0x613B}, //3030 #CJK UNIFIED IDEOGRAPH + {0x90F5, 0x613C}, //3031 #CJK UNIFIED IDEOGRAPH + {0x90F6, 0x613D}, //3032 #CJK UNIFIED IDEOGRAPH + {0x90F7, 0x613E}, //3033 #CJK UNIFIED IDEOGRAPH + {0x90F8, 0x6140}, //3034 #CJK UNIFIED IDEOGRAPH + {0x90F9, 0x6141}, //3035 #CJK UNIFIED IDEOGRAPH + {0x90FA, 0x6142}, //3036 #CJK UNIFIED IDEOGRAPH + {0x90FB, 0x6143}, //3037 #CJK UNIFIED IDEOGRAPH + {0x90FC, 0x6144}, //3038 #CJK UNIFIED IDEOGRAPH + {0x90FD, 0x6145}, //3039 #CJK UNIFIED IDEOGRAPH + {0x90FE, 0x6146}, //3040 #CJK UNIFIED IDEOGRAPH + {0x9140, 0x6147}, //3041 #CJK UNIFIED IDEOGRAPH + {0x9141, 0x6149}, //3042 #CJK UNIFIED IDEOGRAPH + {0x9142, 0x614B}, //3043 #CJK UNIFIED IDEOGRAPH + {0x9143, 0x614D}, //3044 #CJK UNIFIED IDEOGRAPH + {0x9144, 0x614F}, //3045 #CJK UNIFIED IDEOGRAPH + {0x9145, 0x6150}, //3046 #CJK UNIFIED IDEOGRAPH + {0x9146, 0x6152}, //3047 #CJK UNIFIED IDEOGRAPH + {0x9147, 0x6153}, //3048 #CJK UNIFIED IDEOGRAPH + {0x9148, 0x6154}, //3049 #CJK UNIFIED IDEOGRAPH + {0x9149, 0x6156}, //3050 #CJK UNIFIED IDEOGRAPH + {0x914A, 0x6157}, //3051 #CJK UNIFIED IDEOGRAPH + {0x914B, 0x6158}, //3052 #CJK UNIFIED IDEOGRAPH + {0x914C, 0x6159}, //3053 #CJK UNIFIED IDEOGRAPH + {0x914D, 0x615A}, //3054 #CJK UNIFIED IDEOGRAPH + {0x914E, 0x615B}, //3055 #CJK UNIFIED IDEOGRAPH + {0x914F, 0x615C}, //3056 #CJK UNIFIED IDEOGRAPH + {0x9150, 0x615E}, //3057 #CJK UNIFIED IDEOGRAPH + {0x9151, 0x615F}, //3058 #CJK UNIFIED IDEOGRAPH + {0x9152, 0x6160}, //3059 #CJK UNIFIED IDEOGRAPH + {0x9153, 0x6161}, //3060 #CJK UNIFIED IDEOGRAPH + {0x9154, 0x6163}, //3061 #CJK UNIFIED IDEOGRAPH + {0x9155, 0x6164}, //3062 #CJK UNIFIED IDEOGRAPH + {0x9156, 0x6165}, //3063 #CJK UNIFIED IDEOGRAPH + {0x9157, 0x6166}, //3064 #CJK UNIFIED IDEOGRAPH + {0x9158, 0x6169}, //3065 #CJK UNIFIED IDEOGRAPH + {0x9159, 0x616A}, //3066 #CJK UNIFIED IDEOGRAPH + {0x915A, 0x616B}, //3067 #CJK UNIFIED IDEOGRAPH + {0x915B, 0x616C}, //3068 #CJK UNIFIED IDEOGRAPH + {0x915C, 0x616D}, //3069 #CJK UNIFIED IDEOGRAPH + {0x915D, 0x616E}, //3070 #CJK UNIFIED IDEOGRAPH + {0x915E, 0x616F}, //3071 #CJK UNIFIED IDEOGRAPH + {0x915F, 0x6171}, //3072 #CJK UNIFIED IDEOGRAPH + {0x9160, 0x6172}, //3073 #CJK UNIFIED IDEOGRAPH + {0x9161, 0x6173}, //3074 #CJK UNIFIED IDEOGRAPH + {0x9162, 0x6174}, //3075 #CJK UNIFIED IDEOGRAPH + {0x9163, 0x6176}, //3076 #CJK UNIFIED IDEOGRAPH + {0x9164, 0x6178}, //3077 #CJK UNIFIED IDEOGRAPH + {0x9165, 0x6179}, //3078 #CJK UNIFIED IDEOGRAPH + {0x9166, 0x617A}, //3079 #CJK UNIFIED IDEOGRAPH + {0x9167, 0x617B}, //3080 #CJK UNIFIED IDEOGRAPH + {0x9168, 0x617C}, //3081 #CJK UNIFIED IDEOGRAPH + {0x9169, 0x617D}, //3082 #CJK UNIFIED IDEOGRAPH + {0x916A, 0x617E}, //3083 #CJK UNIFIED IDEOGRAPH + {0x916B, 0x617F}, //3084 #CJK UNIFIED IDEOGRAPH + {0x916C, 0x6180}, //3085 #CJK UNIFIED IDEOGRAPH + {0x916D, 0x6181}, //3086 #CJK UNIFIED IDEOGRAPH + {0x916E, 0x6182}, //3087 #CJK UNIFIED IDEOGRAPH + {0x916F, 0x6183}, //3088 #CJK UNIFIED IDEOGRAPH + {0x9170, 0x6184}, //3089 #CJK UNIFIED IDEOGRAPH + {0x9171, 0x6185}, //3090 #CJK UNIFIED IDEOGRAPH + {0x9172, 0x6186}, //3091 #CJK UNIFIED IDEOGRAPH + {0x9173, 0x6187}, //3092 #CJK UNIFIED IDEOGRAPH + {0x9174, 0x6188}, //3093 #CJK UNIFIED IDEOGRAPH + {0x9175, 0x6189}, //3094 #CJK UNIFIED IDEOGRAPH + {0x9176, 0x618A}, //3095 #CJK UNIFIED IDEOGRAPH + {0x9177, 0x618C}, //3096 #CJK UNIFIED IDEOGRAPH + {0x9178, 0x618D}, //3097 #CJK UNIFIED IDEOGRAPH + {0x9179, 0x618F}, //3098 #CJK UNIFIED IDEOGRAPH + {0x917A, 0x6190}, //3099 #CJK UNIFIED IDEOGRAPH + {0x917B, 0x6191}, //3100 #CJK UNIFIED IDEOGRAPH + {0x917C, 0x6192}, //3101 #CJK UNIFIED IDEOGRAPH + {0x917D, 0x6193}, //3102 #CJK UNIFIED IDEOGRAPH + {0x917E, 0x6195}, //3103 #CJK UNIFIED IDEOGRAPH + {0x9180, 0x6196}, //3104 #CJK UNIFIED IDEOGRAPH + {0x9181, 0x6197}, //3105 #CJK UNIFIED IDEOGRAPH + {0x9182, 0x6198}, //3106 #CJK UNIFIED IDEOGRAPH + {0x9183, 0x6199}, //3107 #CJK UNIFIED IDEOGRAPH + {0x9184, 0x619A}, //3108 #CJK UNIFIED IDEOGRAPH + {0x9185, 0x619B}, //3109 #CJK UNIFIED IDEOGRAPH + {0x9186, 0x619C}, //3110 #CJK UNIFIED IDEOGRAPH + {0x9187, 0x619E}, //3111 #CJK UNIFIED IDEOGRAPH + {0x9188, 0x619F}, //3112 #CJK UNIFIED IDEOGRAPH + {0x9189, 0x61A0}, //3113 #CJK UNIFIED IDEOGRAPH + {0x918A, 0x61A1}, //3114 #CJK UNIFIED IDEOGRAPH + {0x918B, 0x61A2}, //3115 #CJK UNIFIED IDEOGRAPH + {0x918C, 0x61A3}, //3116 #CJK UNIFIED IDEOGRAPH + {0x918D, 0x61A4}, //3117 #CJK UNIFIED IDEOGRAPH + {0x918E, 0x61A5}, //3118 #CJK UNIFIED IDEOGRAPH + {0x918F, 0x61A6}, //3119 #CJK UNIFIED IDEOGRAPH + {0x9190, 0x61AA}, //3120 #CJK UNIFIED IDEOGRAPH + {0x9191, 0x61AB}, //3121 #CJK UNIFIED IDEOGRAPH + {0x9192, 0x61AD}, //3122 #CJK UNIFIED IDEOGRAPH + {0x9193, 0x61AE}, //3123 #CJK UNIFIED IDEOGRAPH + {0x9194, 0x61AF}, //3124 #CJK UNIFIED IDEOGRAPH + {0x9195, 0x61B0}, //3125 #CJK UNIFIED IDEOGRAPH + {0x9196, 0x61B1}, //3126 #CJK UNIFIED IDEOGRAPH + {0x9197, 0x61B2}, //3127 #CJK UNIFIED IDEOGRAPH + {0x9198, 0x61B3}, //3128 #CJK UNIFIED IDEOGRAPH + {0x9199, 0x61B4}, //3129 #CJK UNIFIED IDEOGRAPH + {0x919A, 0x61B5}, //3130 #CJK UNIFIED IDEOGRAPH + {0x919B, 0x61B6}, //3131 #CJK UNIFIED IDEOGRAPH + {0x919C, 0x61B8}, //3132 #CJK UNIFIED IDEOGRAPH + {0x919D, 0x61B9}, //3133 #CJK UNIFIED IDEOGRAPH + {0x919E, 0x61BA}, //3134 #CJK UNIFIED IDEOGRAPH + {0x919F, 0x61BB}, //3135 #CJK UNIFIED IDEOGRAPH + {0x91A0, 0x61BC}, //3136 #CJK UNIFIED IDEOGRAPH + {0x91A1, 0x61BD}, //3137 #CJK UNIFIED IDEOGRAPH + {0x91A2, 0x61BF}, //3138 #CJK UNIFIED IDEOGRAPH + {0x91A3, 0x61C0}, //3139 #CJK UNIFIED IDEOGRAPH + {0x91A4, 0x61C1}, //3140 #CJK UNIFIED IDEOGRAPH + {0x91A5, 0x61C3}, //3141 #CJK UNIFIED IDEOGRAPH + {0x91A6, 0x61C4}, //3142 #CJK UNIFIED IDEOGRAPH + {0x91A7, 0x61C5}, //3143 #CJK UNIFIED IDEOGRAPH + {0x91A8, 0x61C6}, //3144 #CJK UNIFIED IDEOGRAPH + {0x91A9, 0x61C7}, //3145 #CJK UNIFIED IDEOGRAPH + {0x91AA, 0x61C9}, //3146 #CJK UNIFIED IDEOGRAPH + {0x91AB, 0x61CC}, //3147 #CJK UNIFIED IDEOGRAPH + {0x91AC, 0x61CD}, //3148 #CJK UNIFIED IDEOGRAPH + {0x91AD, 0x61CE}, //3149 #CJK UNIFIED IDEOGRAPH + {0x91AE, 0x61CF}, //3150 #CJK UNIFIED IDEOGRAPH + {0x91AF, 0x61D0}, //3151 #CJK UNIFIED IDEOGRAPH + {0x91B0, 0x61D3}, //3152 #CJK UNIFIED IDEOGRAPH + {0x91B1, 0x61D5}, //3153 #CJK UNIFIED IDEOGRAPH + {0x91B2, 0x61D6}, //3154 #CJK UNIFIED IDEOGRAPH + {0x91B3, 0x61D7}, //3155 #CJK UNIFIED IDEOGRAPH + {0x91B4, 0x61D8}, //3156 #CJK UNIFIED IDEOGRAPH + {0x91B5, 0x61D9}, //3157 #CJK UNIFIED IDEOGRAPH + {0x91B6, 0x61DA}, //3158 #CJK UNIFIED IDEOGRAPH + {0x91B7, 0x61DB}, //3159 #CJK UNIFIED IDEOGRAPH + {0x91B8, 0x61DC}, //3160 #CJK UNIFIED IDEOGRAPH + {0x91B9, 0x61DD}, //3161 #CJK UNIFIED IDEOGRAPH + {0x91BA, 0x61DE}, //3162 #CJK UNIFIED IDEOGRAPH + {0x91BB, 0x61DF}, //3163 #CJK UNIFIED IDEOGRAPH + {0x91BC, 0x61E0}, //3164 #CJK UNIFIED IDEOGRAPH + {0x91BD, 0x61E1}, //3165 #CJK UNIFIED IDEOGRAPH + {0x91BE, 0x61E2}, //3166 #CJK UNIFIED IDEOGRAPH + {0x91BF, 0x61E3}, //3167 #CJK UNIFIED IDEOGRAPH + {0x91C0, 0x61E4}, //3168 #CJK UNIFIED IDEOGRAPH + {0x91C1, 0x61E5}, //3169 #CJK UNIFIED IDEOGRAPH + {0x91C2, 0x61E7}, //3170 #CJK UNIFIED IDEOGRAPH + {0x91C3, 0x61E8}, //3171 #CJK UNIFIED IDEOGRAPH + {0x91C4, 0x61E9}, //3172 #CJK UNIFIED IDEOGRAPH + {0x91C5, 0x61EA}, //3173 #CJK UNIFIED IDEOGRAPH + {0x91C6, 0x61EB}, //3174 #CJK UNIFIED IDEOGRAPH + {0x91C7, 0x61EC}, //3175 #CJK UNIFIED IDEOGRAPH + {0x91C8, 0x61ED}, //3176 #CJK UNIFIED IDEOGRAPH + {0x91C9, 0x61EE}, //3177 #CJK UNIFIED IDEOGRAPH + {0x91CA, 0x61EF}, //3178 #CJK UNIFIED IDEOGRAPH + {0x91CB, 0x61F0}, //3179 #CJK UNIFIED IDEOGRAPH + {0x91CC, 0x61F1}, //3180 #CJK UNIFIED IDEOGRAPH + {0x91CD, 0x61F2}, //3181 #CJK UNIFIED IDEOGRAPH + {0x91CE, 0x61F3}, //3182 #CJK UNIFIED IDEOGRAPH + {0x91CF, 0x61F4}, //3183 #CJK UNIFIED IDEOGRAPH + {0x91D0, 0x61F6}, //3184 #CJK UNIFIED IDEOGRAPH + {0x91D1, 0x61F7}, //3185 #CJK UNIFIED IDEOGRAPH + {0x91D2, 0x61F8}, //3186 #CJK UNIFIED IDEOGRAPH + {0x91D3, 0x61F9}, //3187 #CJK UNIFIED IDEOGRAPH + {0x91D4, 0x61FA}, //3188 #CJK UNIFIED IDEOGRAPH + {0x91D5, 0x61FB}, //3189 #CJK UNIFIED IDEOGRAPH + {0x91D6, 0x61FC}, //3190 #CJK UNIFIED IDEOGRAPH + {0x91D7, 0x61FD}, //3191 #CJK UNIFIED IDEOGRAPH + {0x91D8, 0x61FE}, //3192 #CJK UNIFIED IDEOGRAPH + {0x91D9, 0x6200}, //3193 #CJK UNIFIED IDEOGRAPH + {0x91DA, 0x6201}, //3194 #CJK UNIFIED IDEOGRAPH + {0x91DB, 0x6202}, //3195 #CJK UNIFIED IDEOGRAPH + {0x91DC, 0x6203}, //3196 #CJK UNIFIED IDEOGRAPH + {0x91DD, 0x6204}, //3197 #CJK UNIFIED IDEOGRAPH + {0x91DE, 0x6205}, //3198 #CJK UNIFIED IDEOGRAPH + {0x91DF, 0x6207}, //3199 #CJK UNIFIED IDEOGRAPH + {0x91E0, 0x6209}, //3200 #CJK UNIFIED IDEOGRAPH + {0x91E1, 0x6213}, //3201 #CJK UNIFIED IDEOGRAPH + {0x91E2, 0x6214}, //3202 #CJK UNIFIED IDEOGRAPH + {0x91E3, 0x6219}, //3203 #CJK UNIFIED IDEOGRAPH + {0x91E4, 0x621C}, //3204 #CJK UNIFIED IDEOGRAPH + {0x91E5, 0x621D}, //3205 #CJK UNIFIED IDEOGRAPH + {0x91E6, 0x621E}, //3206 #CJK UNIFIED IDEOGRAPH + {0x91E7, 0x6220}, //3207 #CJK UNIFIED IDEOGRAPH + {0x91E8, 0x6223}, //3208 #CJK UNIFIED IDEOGRAPH + {0x91E9, 0x6226}, //3209 #CJK UNIFIED IDEOGRAPH + {0x91EA, 0x6227}, //3210 #CJK UNIFIED IDEOGRAPH + {0x91EB, 0x6228}, //3211 #CJK UNIFIED IDEOGRAPH + {0x91EC, 0x6229}, //3212 #CJK UNIFIED IDEOGRAPH + {0x91ED, 0x622B}, //3213 #CJK UNIFIED IDEOGRAPH + {0x91EE, 0x622D}, //3214 #CJK UNIFIED IDEOGRAPH + {0x91EF, 0x622F}, //3215 #CJK UNIFIED IDEOGRAPH + {0x91F0, 0x6230}, //3216 #CJK UNIFIED IDEOGRAPH + {0x91F1, 0x6231}, //3217 #CJK UNIFIED IDEOGRAPH + {0x91F2, 0x6232}, //3218 #CJK UNIFIED IDEOGRAPH + {0x91F3, 0x6235}, //3219 #CJK UNIFIED IDEOGRAPH + {0x91F4, 0x6236}, //3220 #CJK UNIFIED IDEOGRAPH + {0x91F5, 0x6238}, //3221 #CJK UNIFIED IDEOGRAPH + {0x91F6, 0x6239}, //3222 #CJK UNIFIED IDEOGRAPH + {0x91F7, 0x623A}, //3223 #CJK UNIFIED IDEOGRAPH + {0x91F8, 0x623B}, //3224 #CJK UNIFIED IDEOGRAPH + {0x91F9, 0x623C}, //3225 #CJK UNIFIED IDEOGRAPH + {0x91FA, 0x6242}, //3226 #CJK UNIFIED IDEOGRAPH + {0x91FB, 0x6244}, //3227 #CJK UNIFIED IDEOGRAPH + {0x91FC, 0x6245}, //3228 #CJK UNIFIED IDEOGRAPH + {0x91FD, 0x6246}, //3229 #CJK UNIFIED IDEOGRAPH + {0x91FE, 0x624A}, //3230 #CJK UNIFIED IDEOGRAPH + {0x9240, 0x624F}, //3231 #CJK UNIFIED IDEOGRAPH + {0x9241, 0x6250}, //3232 #CJK UNIFIED IDEOGRAPH + {0x9242, 0x6255}, //3233 #CJK UNIFIED IDEOGRAPH + {0x9243, 0x6256}, //3234 #CJK UNIFIED IDEOGRAPH + {0x9244, 0x6257}, //3235 #CJK UNIFIED IDEOGRAPH + {0x9245, 0x6259}, //3236 #CJK UNIFIED IDEOGRAPH + {0x9246, 0x625A}, //3237 #CJK UNIFIED IDEOGRAPH + {0x9247, 0x625C}, //3238 #CJK UNIFIED IDEOGRAPH + {0x9248, 0x625D}, //3239 #CJK UNIFIED IDEOGRAPH + {0x9249, 0x625E}, //3240 #CJK UNIFIED IDEOGRAPH + {0x924A, 0x625F}, //3241 #CJK UNIFIED IDEOGRAPH + {0x924B, 0x6260}, //3242 #CJK UNIFIED IDEOGRAPH + {0x924C, 0x6261}, //3243 #CJK UNIFIED IDEOGRAPH + {0x924D, 0x6262}, //3244 #CJK UNIFIED IDEOGRAPH + {0x924E, 0x6264}, //3245 #CJK UNIFIED IDEOGRAPH + {0x924F, 0x6265}, //3246 #CJK UNIFIED IDEOGRAPH + {0x9250, 0x6268}, //3247 #CJK UNIFIED IDEOGRAPH + {0x9251, 0x6271}, //3248 #CJK UNIFIED IDEOGRAPH + {0x9252, 0x6272}, //3249 #CJK UNIFIED IDEOGRAPH + {0x9253, 0x6274}, //3250 #CJK UNIFIED IDEOGRAPH + {0x9254, 0x6275}, //3251 #CJK UNIFIED IDEOGRAPH + {0x9255, 0x6277}, //3252 #CJK UNIFIED IDEOGRAPH + {0x9256, 0x6278}, //3253 #CJK UNIFIED IDEOGRAPH + {0x9257, 0x627A}, //3254 #CJK UNIFIED IDEOGRAPH + {0x9258, 0x627B}, //3255 #CJK UNIFIED IDEOGRAPH + {0x9259, 0x627D}, //3256 #CJK UNIFIED IDEOGRAPH + {0x925A, 0x6281}, //3257 #CJK UNIFIED IDEOGRAPH + {0x925B, 0x6282}, //3258 #CJK UNIFIED IDEOGRAPH + {0x925C, 0x6283}, //3259 #CJK UNIFIED IDEOGRAPH + {0x925D, 0x6285}, //3260 #CJK UNIFIED IDEOGRAPH + {0x925E, 0x6286}, //3261 #CJK UNIFIED IDEOGRAPH + {0x925F, 0x6287}, //3262 #CJK UNIFIED IDEOGRAPH + {0x9260, 0x6288}, //3263 #CJK UNIFIED IDEOGRAPH + {0x9261, 0x628B}, //3264 #CJK UNIFIED IDEOGRAPH + {0x9262, 0x628C}, //3265 #CJK UNIFIED IDEOGRAPH + {0x9263, 0x628D}, //3266 #CJK UNIFIED IDEOGRAPH + {0x9264, 0x628E}, //3267 #CJK UNIFIED IDEOGRAPH + {0x9265, 0x628F}, //3268 #CJK UNIFIED IDEOGRAPH + {0x9266, 0x6290}, //3269 #CJK UNIFIED IDEOGRAPH + {0x9267, 0x6294}, //3270 #CJK UNIFIED IDEOGRAPH + {0x9268, 0x6299}, //3271 #CJK UNIFIED IDEOGRAPH + {0x9269, 0x629C}, //3272 #CJK UNIFIED IDEOGRAPH + {0x926A, 0x629D}, //3273 #CJK UNIFIED IDEOGRAPH + {0x926B, 0x629E}, //3274 #CJK UNIFIED IDEOGRAPH + {0x926C, 0x62A3}, //3275 #CJK UNIFIED IDEOGRAPH + {0x926D, 0x62A6}, //3276 #CJK UNIFIED IDEOGRAPH + {0x926E, 0x62A7}, //3277 #CJK UNIFIED IDEOGRAPH + {0x926F, 0x62A9}, //3278 #CJK UNIFIED IDEOGRAPH + {0x9270, 0x62AA}, //3279 #CJK UNIFIED IDEOGRAPH + {0x9271, 0x62AD}, //3280 #CJK UNIFIED IDEOGRAPH + {0x9272, 0x62AE}, //3281 #CJK UNIFIED IDEOGRAPH + {0x9273, 0x62AF}, //3282 #CJK UNIFIED IDEOGRAPH + {0x9274, 0x62B0}, //3283 #CJK UNIFIED IDEOGRAPH + {0x9275, 0x62B2}, //3284 #CJK UNIFIED IDEOGRAPH + {0x9276, 0x62B3}, //3285 #CJK UNIFIED IDEOGRAPH + {0x9277, 0x62B4}, //3286 #CJK UNIFIED IDEOGRAPH + {0x9278, 0x62B6}, //3287 #CJK UNIFIED IDEOGRAPH + {0x9279, 0x62B7}, //3288 #CJK UNIFIED IDEOGRAPH + {0x927A, 0x62B8}, //3289 #CJK UNIFIED IDEOGRAPH + {0x927B, 0x62BA}, //3290 #CJK UNIFIED IDEOGRAPH + {0x927C, 0x62BE}, //3291 #CJK UNIFIED IDEOGRAPH + {0x927D, 0x62C0}, //3292 #CJK UNIFIED IDEOGRAPH + {0x927E, 0x62C1}, //3293 #CJK UNIFIED IDEOGRAPH + {0x9280, 0x62C3}, //3294 #CJK UNIFIED IDEOGRAPH + {0x9281, 0x62CB}, //3295 #CJK UNIFIED IDEOGRAPH + {0x9282, 0x62CF}, //3296 #CJK UNIFIED IDEOGRAPH + {0x9283, 0x62D1}, //3297 #CJK UNIFIED IDEOGRAPH + {0x9284, 0x62D5}, //3298 #CJK UNIFIED IDEOGRAPH + {0x9285, 0x62DD}, //3299 #CJK UNIFIED IDEOGRAPH + {0x9286, 0x62DE}, //3300 #CJK UNIFIED IDEOGRAPH + {0x9287, 0x62E0}, //3301 #CJK UNIFIED IDEOGRAPH + {0x9288, 0x62E1}, //3302 #CJK UNIFIED IDEOGRAPH + {0x9289, 0x62E4}, //3303 #CJK UNIFIED IDEOGRAPH + {0x928A, 0x62EA}, //3304 #CJK UNIFIED IDEOGRAPH + {0x928B, 0x62EB}, //3305 #CJK UNIFIED IDEOGRAPH + {0x928C, 0x62F0}, //3306 #CJK UNIFIED IDEOGRAPH + {0x928D, 0x62F2}, //3307 #CJK UNIFIED IDEOGRAPH + {0x928E, 0x62F5}, //3308 #CJK UNIFIED IDEOGRAPH + {0x928F, 0x62F8}, //3309 #CJK UNIFIED IDEOGRAPH + {0x9290, 0x62F9}, //3310 #CJK UNIFIED IDEOGRAPH + {0x9291, 0x62FA}, //3311 #CJK UNIFIED IDEOGRAPH + {0x9292, 0x62FB}, //3312 #CJK UNIFIED IDEOGRAPH + {0x9293, 0x6300}, //3313 #CJK UNIFIED IDEOGRAPH + {0x9294, 0x6303}, //3314 #CJK UNIFIED IDEOGRAPH + {0x9295, 0x6304}, //3315 #CJK UNIFIED IDEOGRAPH + {0x9296, 0x6305}, //3316 #CJK UNIFIED IDEOGRAPH + {0x9297, 0x6306}, //3317 #CJK UNIFIED IDEOGRAPH + {0x9298, 0x630A}, //3318 #CJK UNIFIED IDEOGRAPH + {0x9299, 0x630B}, //3319 #CJK UNIFIED IDEOGRAPH + {0x929A, 0x630C}, //3320 #CJK UNIFIED IDEOGRAPH + {0x929B, 0x630D}, //3321 #CJK UNIFIED IDEOGRAPH + {0x929C, 0x630F}, //3322 #CJK UNIFIED IDEOGRAPH + {0x929D, 0x6310}, //3323 #CJK UNIFIED IDEOGRAPH + {0x929E, 0x6312}, //3324 #CJK UNIFIED IDEOGRAPH + {0x929F, 0x6313}, //3325 #CJK UNIFIED IDEOGRAPH + {0x92A0, 0x6314}, //3326 #CJK UNIFIED IDEOGRAPH + {0x92A1, 0x6315}, //3327 #CJK UNIFIED IDEOGRAPH + {0x92A2, 0x6317}, //3328 #CJK UNIFIED IDEOGRAPH + {0x92A3, 0x6318}, //3329 #CJK UNIFIED IDEOGRAPH + {0x92A4, 0x6319}, //3330 #CJK UNIFIED IDEOGRAPH + {0x92A5, 0x631C}, //3331 #CJK UNIFIED IDEOGRAPH + {0x92A6, 0x6326}, //3332 #CJK UNIFIED IDEOGRAPH + {0x92A7, 0x6327}, //3333 #CJK UNIFIED IDEOGRAPH + {0x92A8, 0x6329}, //3334 #CJK UNIFIED IDEOGRAPH + {0x92A9, 0x632C}, //3335 #CJK UNIFIED IDEOGRAPH + {0x92AA, 0x632D}, //3336 #CJK UNIFIED IDEOGRAPH + {0x92AB, 0x632E}, //3337 #CJK UNIFIED IDEOGRAPH + {0x92AC, 0x6330}, //3338 #CJK UNIFIED IDEOGRAPH + {0x92AD, 0x6331}, //3339 #CJK UNIFIED IDEOGRAPH + {0x92AE, 0x6333}, //3340 #CJK UNIFIED IDEOGRAPH + {0x92AF, 0x6334}, //3341 #CJK UNIFIED IDEOGRAPH + {0x92B0, 0x6335}, //3342 #CJK UNIFIED IDEOGRAPH + {0x92B1, 0x6336}, //3343 #CJK UNIFIED IDEOGRAPH + {0x92B2, 0x6337}, //3344 #CJK UNIFIED IDEOGRAPH + {0x92B3, 0x6338}, //3345 #CJK UNIFIED IDEOGRAPH + {0x92B4, 0x633B}, //3346 #CJK UNIFIED IDEOGRAPH + {0x92B5, 0x633C}, //3347 #CJK UNIFIED IDEOGRAPH + {0x92B6, 0x633E}, //3348 #CJK UNIFIED IDEOGRAPH + {0x92B7, 0x633F}, //3349 #CJK UNIFIED IDEOGRAPH + {0x92B8, 0x6340}, //3350 #CJK UNIFIED IDEOGRAPH + {0x92B9, 0x6341}, //3351 #CJK UNIFIED IDEOGRAPH + {0x92BA, 0x6344}, //3352 #CJK UNIFIED IDEOGRAPH + {0x92BB, 0x6347}, //3353 #CJK UNIFIED IDEOGRAPH + {0x92BC, 0x6348}, //3354 #CJK UNIFIED IDEOGRAPH + {0x92BD, 0x634A}, //3355 #CJK UNIFIED IDEOGRAPH + {0x92BE, 0x6351}, //3356 #CJK UNIFIED IDEOGRAPH + {0x92BF, 0x6352}, //3357 #CJK UNIFIED IDEOGRAPH + {0x92C0, 0x6353}, //3358 #CJK UNIFIED IDEOGRAPH + {0x92C1, 0x6354}, //3359 #CJK UNIFIED IDEOGRAPH + {0x92C2, 0x6356}, //3360 #CJK UNIFIED IDEOGRAPH + {0x92C3, 0x6357}, //3361 #CJK UNIFIED IDEOGRAPH + {0x92C4, 0x6358}, //3362 #CJK UNIFIED IDEOGRAPH + {0x92C5, 0x6359}, //3363 #CJK UNIFIED IDEOGRAPH + {0x92C6, 0x635A}, //3364 #CJK UNIFIED IDEOGRAPH + {0x92C7, 0x635B}, //3365 #CJK UNIFIED IDEOGRAPH + {0x92C8, 0x635C}, //3366 #CJK UNIFIED IDEOGRAPH + {0x92C9, 0x635D}, //3367 #CJK UNIFIED IDEOGRAPH + {0x92CA, 0x6360}, //3368 #CJK UNIFIED IDEOGRAPH + {0x92CB, 0x6364}, //3369 #CJK UNIFIED IDEOGRAPH + {0x92CC, 0x6365}, //3370 #CJK UNIFIED IDEOGRAPH + {0x92CD, 0x6366}, //3371 #CJK UNIFIED IDEOGRAPH + {0x92CE, 0x6368}, //3372 #CJK UNIFIED IDEOGRAPH + {0x92CF, 0x636A}, //3373 #CJK UNIFIED IDEOGRAPH + {0x92D0, 0x636B}, //3374 #CJK UNIFIED IDEOGRAPH + {0x92D1, 0x636C}, //3375 #CJK UNIFIED IDEOGRAPH + {0x92D2, 0x636F}, //3376 #CJK UNIFIED IDEOGRAPH + {0x92D3, 0x6370}, //3377 #CJK UNIFIED IDEOGRAPH + {0x92D4, 0x6372}, //3378 #CJK UNIFIED IDEOGRAPH + {0x92D5, 0x6373}, //3379 #CJK UNIFIED IDEOGRAPH + {0x92D6, 0x6374}, //3380 #CJK UNIFIED IDEOGRAPH + {0x92D7, 0x6375}, //3381 #CJK UNIFIED IDEOGRAPH + {0x92D8, 0x6378}, //3382 #CJK UNIFIED IDEOGRAPH + {0x92D9, 0x6379}, //3383 #CJK UNIFIED IDEOGRAPH + {0x92DA, 0x637C}, //3384 #CJK UNIFIED IDEOGRAPH + {0x92DB, 0x637D}, //3385 #CJK UNIFIED IDEOGRAPH + {0x92DC, 0x637E}, //3386 #CJK UNIFIED IDEOGRAPH + {0x92DD, 0x637F}, //3387 #CJK UNIFIED IDEOGRAPH + {0x92DE, 0x6381}, //3388 #CJK UNIFIED IDEOGRAPH + {0x92DF, 0x6383}, //3389 #CJK UNIFIED IDEOGRAPH + {0x92E0, 0x6384}, //3390 #CJK UNIFIED IDEOGRAPH + {0x92E1, 0x6385}, //3391 #CJK UNIFIED IDEOGRAPH + {0x92E2, 0x6386}, //3392 #CJK UNIFIED IDEOGRAPH + {0x92E3, 0x638B}, //3393 #CJK UNIFIED IDEOGRAPH + {0x92E4, 0x638D}, //3394 #CJK UNIFIED IDEOGRAPH + {0x92E5, 0x6391}, //3395 #CJK UNIFIED IDEOGRAPH + {0x92E6, 0x6393}, //3396 #CJK UNIFIED IDEOGRAPH + {0x92E7, 0x6394}, //3397 #CJK UNIFIED IDEOGRAPH + {0x92E8, 0x6395}, //3398 #CJK UNIFIED IDEOGRAPH + {0x92E9, 0x6397}, //3399 #CJK UNIFIED IDEOGRAPH + {0x92EA, 0x6399}, //3400 #CJK UNIFIED IDEOGRAPH + {0x92EB, 0x639A}, //3401 #CJK UNIFIED IDEOGRAPH + {0x92EC, 0x639B}, //3402 #CJK UNIFIED IDEOGRAPH + {0x92ED, 0x639C}, //3403 #CJK UNIFIED IDEOGRAPH + {0x92EE, 0x639D}, //3404 #CJK UNIFIED IDEOGRAPH + {0x92EF, 0x639E}, //3405 #CJK UNIFIED IDEOGRAPH + {0x92F0, 0x639F}, //3406 #CJK UNIFIED IDEOGRAPH + {0x92F1, 0x63A1}, //3407 #CJK UNIFIED IDEOGRAPH + {0x92F2, 0x63A4}, //3408 #CJK UNIFIED IDEOGRAPH + {0x92F3, 0x63A6}, //3409 #CJK UNIFIED IDEOGRAPH + {0x92F4, 0x63AB}, //3410 #CJK UNIFIED IDEOGRAPH + {0x92F5, 0x63AF}, //3411 #CJK UNIFIED IDEOGRAPH + {0x92F6, 0x63B1}, //3412 #CJK UNIFIED IDEOGRAPH + {0x92F7, 0x63B2}, //3413 #CJK UNIFIED IDEOGRAPH + {0x92F8, 0x63B5}, //3414 #CJK UNIFIED IDEOGRAPH + {0x92F9, 0x63B6}, //3415 #CJK UNIFIED IDEOGRAPH + {0x92FA, 0x63B9}, //3416 #CJK UNIFIED IDEOGRAPH + {0x92FB, 0x63BB}, //3417 #CJK UNIFIED IDEOGRAPH + {0x92FC, 0x63BD}, //3418 #CJK UNIFIED IDEOGRAPH + {0x92FD, 0x63BF}, //3419 #CJK UNIFIED IDEOGRAPH + {0x92FE, 0x63C0}, //3420 #CJK UNIFIED IDEOGRAPH + {0x9340, 0x63C1}, //3421 #CJK UNIFIED IDEOGRAPH + {0x9341, 0x63C2}, //3422 #CJK UNIFIED IDEOGRAPH + {0x9342, 0x63C3}, //3423 #CJK UNIFIED IDEOGRAPH + {0x9343, 0x63C5}, //3424 #CJK UNIFIED IDEOGRAPH + {0x9344, 0x63C7}, //3425 #CJK UNIFIED IDEOGRAPH + {0x9345, 0x63C8}, //3426 #CJK UNIFIED IDEOGRAPH + {0x9346, 0x63CA}, //3427 #CJK UNIFIED IDEOGRAPH + {0x9347, 0x63CB}, //3428 #CJK UNIFIED IDEOGRAPH + {0x9348, 0x63CC}, //3429 #CJK UNIFIED IDEOGRAPH + {0x9349, 0x63D1}, //3430 #CJK UNIFIED IDEOGRAPH + {0x934A, 0x63D3}, //3431 #CJK UNIFIED IDEOGRAPH + {0x934B, 0x63D4}, //3432 #CJK UNIFIED IDEOGRAPH + {0x934C, 0x63D5}, //3433 #CJK UNIFIED IDEOGRAPH + {0x934D, 0x63D7}, //3434 #CJK UNIFIED IDEOGRAPH + {0x934E, 0x63D8}, //3435 #CJK UNIFIED IDEOGRAPH + {0x934F, 0x63D9}, //3436 #CJK UNIFIED IDEOGRAPH + {0x9350, 0x63DA}, //3437 #CJK UNIFIED IDEOGRAPH + {0x9351, 0x63DB}, //3438 #CJK UNIFIED IDEOGRAPH + {0x9352, 0x63DC}, //3439 #CJK UNIFIED IDEOGRAPH + {0x9353, 0x63DD}, //3440 #CJK UNIFIED IDEOGRAPH + {0x9354, 0x63DF}, //3441 #CJK UNIFIED IDEOGRAPH + {0x9355, 0x63E2}, //3442 #CJK UNIFIED IDEOGRAPH + {0x9356, 0x63E4}, //3443 #CJK UNIFIED IDEOGRAPH + {0x9357, 0x63E5}, //3444 #CJK UNIFIED IDEOGRAPH + {0x9358, 0x63E6}, //3445 #CJK UNIFIED IDEOGRAPH + {0x9359, 0x63E7}, //3446 #CJK UNIFIED IDEOGRAPH + {0x935A, 0x63E8}, //3447 #CJK UNIFIED IDEOGRAPH + {0x935B, 0x63EB}, //3448 #CJK UNIFIED IDEOGRAPH + {0x935C, 0x63EC}, //3449 #CJK UNIFIED IDEOGRAPH + {0x935D, 0x63EE}, //3450 #CJK UNIFIED IDEOGRAPH + {0x935E, 0x63EF}, //3451 #CJK UNIFIED IDEOGRAPH + {0x935F, 0x63F0}, //3452 #CJK UNIFIED IDEOGRAPH + {0x9360, 0x63F1}, //3453 #CJK UNIFIED IDEOGRAPH + {0x9361, 0x63F3}, //3454 #CJK UNIFIED IDEOGRAPH + {0x9362, 0x63F5}, //3455 #CJK UNIFIED IDEOGRAPH + {0x9363, 0x63F7}, //3456 #CJK UNIFIED IDEOGRAPH + {0x9364, 0x63F9}, //3457 #CJK UNIFIED IDEOGRAPH + {0x9365, 0x63FA}, //3458 #CJK UNIFIED IDEOGRAPH + {0x9366, 0x63FB}, //3459 #CJK UNIFIED IDEOGRAPH + {0x9367, 0x63FC}, //3460 #CJK UNIFIED IDEOGRAPH + {0x9368, 0x63FE}, //3461 #CJK UNIFIED IDEOGRAPH + {0x9369, 0x6403}, //3462 #CJK UNIFIED IDEOGRAPH + {0x936A, 0x6404}, //3463 #CJK UNIFIED IDEOGRAPH + {0x936B, 0x6406}, //3464 #CJK UNIFIED IDEOGRAPH + {0x936C, 0x6407}, //3465 #CJK UNIFIED IDEOGRAPH + {0x936D, 0x6408}, //3466 #CJK UNIFIED IDEOGRAPH + {0x936E, 0x6409}, //3467 #CJK UNIFIED IDEOGRAPH + {0x936F, 0x640A}, //3468 #CJK UNIFIED IDEOGRAPH + {0x9370, 0x640D}, //3469 #CJK UNIFIED IDEOGRAPH + {0x9371, 0x640E}, //3470 #CJK UNIFIED IDEOGRAPH + {0x9372, 0x6411}, //3471 #CJK UNIFIED IDEOGRAPH + {0x9373, 0x6412}, //3472 #CJK UNIFIED IDEOGRAPH + {0x9374, 0x6415}, //3473 #CJK UNIFIED IDEOGRAPH + {0x9375, 0x6416}, //3474 #CJK UNIFIED IDEOGRAPH + {0x9376, 0x6417}, //3475 #CJK UNIFIED IDEOGRAPH + {0x9377, 0x6418}, //3476 #CJK UNIFIED IDEOGRAPH + {0x9378, 0x6419}, //3477 #CJK UNIFIED IDEOGRAPH + {0x9379, 0x641A}, //3478 #CJK UNIFIED IDEOGRAPH + {0x937A, 0x641D}, //3479 #CJK UNIFIED IDEOGRAPH + {0x937B, 0x641F}, //3480 #CJK UNIFIED IDEOGRAPH + {0x937C, 0x6422}, //3481 #CJK UNIFIED IDEOGRAPH + {0x937D, 0x6423}, //3482 #CJK UNIFIED IDEOGRAPH + {0x937E, 0x6424}, //3483 #CJK UNIFIED IDEOGRAPH + {0x9380, 0x6425}, //3484 #CJK UNIFIED IDEOGRAPH + {0x9381, 0x6427}, //3485 #CJK UNIFIED IDEOGRAPH + {0x9382, 0x6428}, //3486 #CJK UNIFIED IDEOGRAPH + {0x9383, 0x6429}, //3487 #CJK UNIFIED IDEOGRAPH + {0x9384, 0x642B}, //3488 #CJK UNIFIED IDEOGRAPH + {0x9385, 0x642E}, //3489 #CJK UNIFIED IDEOGRAPH + {0x9386, 0x642F}, //3490 #CJK UNIFIED IDEOGRAPH + {0x9387, 0x6430}, //3491 #CJK UNIFIED IDEOGRAPH + {0x9388, 0x6431}, //3492 #CJK UNIFIED IDEOGRAPH + {0x9389, 0x6432}, //3493 #CJK UNIFIED IDEOGRAPH + {0x938A, 0x6433}, //3494 #CJK UNIFIED IDEOGRAPH + {0x938B, 0x6435}, //3495 #CJK UNIFIED IDEOGRAPH + {0x938C, 0x6436}, //3496 #CJK UNIFIED IDEOGRAPH + {0x938D, 0x6437}, //3497 #CJK UNIFIED IDEOGRAPH + {0x938E, 0x6438}, //3498 #CJK UNIFIED IDEOGRAPH + {0x938F, 0x6439}, //3499 #CJK UNIFIED IDEOGRAPH + {0x9390, 0x643B}, //3500 #CJK UNIFIED IDEOGRAPH + {0x9391, 0x643C}, //3501 #CJK UNIFIED IDEOGRAPH + {0x9392, 0x643E}, //3502 #CJK UNIFIED IDEOGRAPH + {0x9393, 0x6440}, //3503 #CJK UNIFIED IDEOGRAPH + {0x9394, 0x6442}, //3504 #CJK UNIFIED IDEOGRAPH + {0x9395, 0x6443}, //3505 #CJK UNIFIED IDEOGRAPH + {0x9396, 0x6449}, //3506 #CJK UNIFIED IDEOGRAPH + {0x9397, 0x644B}, //3507 #CJK UNIFIED IDEOGRAPH + {0x9398, 0x644C}, //3508 #CJK UNIFIED IDEOGRAPH + {0x9399, 0x644D}, //3509 #CJK UNIFIED IDEOGRAPH + {0x939A, 0x644E}, //3510 #CJK UNIFIED IDEOGRAPH + {0x939B, 0x644F}, //3511 #CJK UNIFIED IDEOGRAPH + {0x939C, 0x6450}, //3512 #CJK UNIFIED IDEOGRAPH + {0x939D, 0x6451}, //3513 #CJK UNIFIED IDEOGRAPH + {0x939E, 0x6453}, //3514 #CJK UNIFIED IDEOGRAPH + {0x939F, 0x6455}, //3515 #CJK UNIFIED IDEOGRAPH + {0x93A0, 0x6456}, //3516 #CJK UNIFIED IDEOGRAPH + {0x93A1, 0x6457}, //3517 #CJK UNIFIED IDEOGRAPH + {0x93A2, 0x6459}, //3518 #CJK UNIFIED IDEOGRAPH + {0x93A3, 0x645A}, //3519 #CJK UNIFIED IDEOGRAPH + {0x93A4, 0x645B}, //3520 #CJK UNIFIED IDEOGRAPH + {0x93A5, 0x645C}, //3521 #CJK UNIFIED IDEOGRAPH + {0x93A6, 0x645D}, //3522 #CJK UNIFIED IDEOGRAPH + {0x93A7, 0x645F}, //3523 #CJK UNIFIED IDEOGRAPH + {0x93A8, 0x6460}, //3524 #CJK UNIFIED IDEOGRAPH + {0x93A9, 0x6461}, //3525 #CJK UNIFIED IDEOGRAPH + {0x93AA, 0x6462}, //3526 #CJK UNIFIED IDEOGRAPH + {0x93AB, 0x6463}, //3527 #CJK UNIFIED IDEOGRAPH + {0x93AC, 0x6464}, //3528 #CJK UNIFIED IDEOGRAPH + {0x93AD, 0x6465}, //3529 #CJK UNIFIED IDEOGRAPH + {0x93AE, 0x6466}, //3530 #CJK UNIFIED IDEOGRAPH + {0x93AF, 0x6468}, //3531 #CJK UNIFIED IDEOGRAPH + {0x93B0, 0x646A}, //3532 #CJK UNIFIED IDEOGRAPH + {0x93B1, 0x646B}, //3533 #CJK UNIFIED IDEOGRAPH + {0x93B2, 0x646C}, //3534 #CJK UNIFIED IDEOGRAPH + {0x93B3, 0x646E}, //3535 #CJK UNIFIED IDEOGRAPH + {0x93B4, 0x646F}, //3536 #CJK UNIFIED IDEOGRAPH + {0x93B5, 0x6470}, //3537 #CJK UNIFIED IDEOGRAPH + {0x93B6, 0x6471}, //3538 #CJK UNIFIED IDEOGRAPH + {0x93B7, 0x6472}, //3539 #CJK UNIFIED IDEOGRAPH + {0x93B8, 0x6473}, //3540 #CJK UNIFIED IDEOGRAPH + {0x93B9, 0x6474}, //3541 #CJK UNIFIED IDEOGRAPH + {0x93BA, 0x6475}, //3542 #CJK UNIFIED IDEOGRAPH + {0x93BB, 0x6476}, //3543 #CJK UNIFIED IDEOGRAPH + {0x93BC, 0x6477}, //3544 #CJK UNIFIED IDEOGRAPH + {0x93BD, 0x647B}, //3545 #CJK UNIFIED IDEOGRAPH + {0x93BE, 0x647C}, //3546 #CJK UNIFIED IDEOGRAPH + {0x93BF, 0x647D}, //3547 #CJK UNIFIED IDEOGRAPH + {0x93C0, 0x647E}, //3548 #CJK UNIFIED IDEOGRAPH + {0x93C1, 0x647F}, //3549 #CJK UNIFIED IDEOGRAPH + {0x93C2, 0x6480}, //3550 #CJK UNIFIED IDEOGRAPH + {0x93C3, 0x6481}, //3551 #CJK UNIFIED IDEOGRAPH + {0x93C4, 0x6483}, //3552 #CJK UNIFIED IDEOGRAPH + {0x93C5, 0x6486}, //3553 #CJK UNIFIED IDEOGRAPH + {0x93C6, 0x6488}, //3554 #CJK UNIFIED IDEOGRAPH + {0x93C7, 0x6489}, //3555 #CJK UNIFIED IDEOGRAPH + {0x93C8, 0x648A}, //3556 #CJK UNIFIED IDEOGRAPH + {0x93C9, 0x648B}, //3557 #CJK UNIFIED IDEOGRAPH + {0x93CA, 0x648C}, //3558 #CJK UNIFIED IDEOGRAPH + {0x93CB, 0x648D}, //3559 #CJK UNIFIED IDEOGRAPH + {0x93CC, 0x648E}, //3560 #CJK UNIFIED IDEOGRAPH + {0x93CD, 0x648F}, //3561 #CJK UNIFIED IDEOGRAPH + {0x93CE, 0x6490}, //3562 #CJK UNIFIED IDEOGRAPH + {0x93CF, 0x6493}, //3563 #CJK UNIFIED IDEOGRAPH + {0x93D0, 0x6494}, //3564 #CJK UNIFIED IDEOGRAPH + {0x93D1, 0x6497}, //3565 #CJK UNIFIED IDEOGRAPH + {0x93D2, 0x6498}, //3566 #CJK UNIFIED IDEOGRAPH + {0x93D3, 0x649A}, //3567 #CJK UNIFIED IDEOGRAPH + {0x93D4, 0x649B}, //3568 #CJK UNIFIED IDEOGRAPH + {0x93D5, 0x649C}, //3569 #CJK UNIFIED IDEOGRAPH + {0x93D6, 0x649D}, //3570 #CJK UNIFIED IDEOGRAPH + {0x93D7, 0x649F}, //3571 #CJK UNIFIED IDEOGRAPH + {0x93D8, 0x64A0}, //3572 #CJK UNIFIED IDEOGRAPH + {0x93D9, 0x64A1}, //3573 #CJK UNIFIED IDEOGRAPH + {0x93DA, 0x64A2}, //3574 #CJK UNIFIED IDEOGRAPH + {0x93DB, 0x64A3}, //3575 #CJK UNIFIED IDEOGRAPH + {0x93DC, 0x64A5}, //3576 #CJK UNIFIED IDEOGRAPH + {0x93DD, 0x64A6}, //3577 #CJK UNIFIED IDEOGRAPH + {0x93DE, 0x64A7}, //3578 #CJK UNIFIED IDEOGRAPH + {0x93DF, 0x64A8}, //3579 #CJK UNIFIED IDEOGRAPH + {0x93E0, 0x64AA}, //3580 #CJK UNIFIED IDEOGRAPH + {0x93E1, 0x64AB}, //3581 #CJK UNIFIED IDEOGRAPH + {0x93E2, 0x64AF}, //3582 #CJK UNIFIED IDEOGRAPH + {0x93E3, 0x64B1}, //3583 #CJK UNIFIED IDEOGRAPH + {0x93E4, 0x64B2}, //3584 #CJK UNIFIED IDEOGRAPH + {0x93E5, 0x64B3}, //3585 #CJK UNIFIED IDEOGRAPH + {0x93E6, 0x64B4}, //3586 #CJK UNIFIED IDEOGRAPH + {0x93E7, 0x64B6}, //3587 #CJK UNIFIED IDEOGRAPH + {0x93E8, 0x64B9}, //3588 #CJK UNIFIED IDEOGRAPH + {0x93E9, 0x64BB}, //3589 #CJK UNIFIED IDEOGRAPH + {0x93EA, 0x64BD}, //3590 #CJK UNIFIED IDEOGRAPH + {0x93EB, 0x64BE}, //3591 #CJK UNIFIED IDEOGRAPH + {0x93EC, 0x64BF}, //3592 #CJK UNIFIED IDEOGRAPH + {0x93ED, 0x64C1}, //3593 #CJK UNIFIED IDEOGRAPH + {0x93EE, 0x64C3}, //3594 #CJK UNIFIED IDEOGRAPH + {0x93EF, 0x64C4}, //3595 #CJK UNIFIED IDEOGRAPH + {0x93F0, 0x64C6}, //3596 #CJK UNIFIED IDEOGRAPH + {0x93F1, 0x64C7}, //3597 #CJK UNIFIED IDEOGRAPH + {0x93F2, 0x64C8}, //3598 #CJK UNIFIED IDEOGRAPH + {0x93F3, 0x64C9}, //3599 #CJK UNIFIED IDEOGRAPH + {0x93F4, 0x64CA}, //3600 #CJK UNIFIED IDEOGRAPH + {0x93F5, 0x64CB}, //3601 #CJK UNIFIED IDEOGRAPH + {0x93F6, 0x64CC}, //3602 #CJK UNIFIED IDEOGRAPH + {0x93F7, 0x64CF}, //3603 #CJK UNIFIED IDEOGRAPH + {0x93F8, 0x64D1}, //3604 #CJK UNIFIED IDEOGRAPH + {0x93F9, 0x64D3}, //3605 #CJK UNIFIED IDEOGRAPH + {0x93FA, 0x64D4}, //3606 #CJK UNIFIED IDEOGRAPH + {0x93FB, 0x64D5}, //3607 #CJK UNIFIED IDEOGRAPH + {0x93FC, 0x64D6}, //3608 #CJK UNIFIED IDEOGRAPH + {0x93FD, 0x64D9}, //3609 #CJK UNIFIED IDEOGRAPH + {0x93FE, 0x64DA}, //3610 #CJK UNIFIED IDEOGRAPH + {0x9440, 0x64DB}, //3611 #CJK UNIFIED IDEOGRAPH + {0x9441, 0x64DC}, //3612 #CJK UNIFIED IDEOGRAPH + {0x9442, 0x64DD}, //3613 #CJK UNIFIED IDEOGRAPH + {0x9443, 0x64DF}, //3614 #CJK UNIFIED IDEOGRAPH + {0x9444, 0x64E0}, //3615 #CJK UNIFIED IDEOGRAPH + {0x9445, 0x64E1}, //3616 #CJK UNIFIED IDEOGRAPH + {0x9446, 0x64E3}, //3617 #CJK UNIFIED IDEOGRAPH + {0x9447, 0x64E5}, //3618 #CJK UNIFIED IDEOGRAPH + {0x9448, 0x64E7}, //3619 #CJK UNIFIED IDEOGRAPH + {0x9449, 0x64E8}, //3620 #CJK UNIFIED IDEOGRAPH + {0x944A, 0x64E9}, //3621 #CJK UNIFIED IDEOGRAPH + {0x944B, 0x64EA}, //3622 #CJK UNIFIED IDEOGRAPH + {0x944C, 0x64EB}, //3623 #CJK UNIFIED IDEOGRAPH + {0x944D, 0x64EC}, //3624 #CJK UNIFIED IDEOGRAPH + {0x944E, 0x64ED}, //3625 #CJK UNIFIED IDEOGRAPH + {0x944F, 0x64EE}, //3626 #CJK UNIFIED IDEOGRAPH + {0x9450, 0x64EF}, //3627 #CJK UNIFIED IDEOGRAPH + {0x9451, 0x64F0}, //3628 #CJK UNIFIED IDEOGRAPH + {0x9452, 0x64F1}, //3629 #CJK UNIFIED IDEOGRAPH + {0x9453, 0x64F2}, //3630 #CJK UNIFIED IDEOGRAPH + {0x9454, 0x64F3}, //3631 #CJK UNIFIED IDEOGRAPH + {0x9455, 0x64F4}, //3632 #CJK UNIFIED IDEOGRAPH + {0x9456, 0x64F5}, //3633 #CJK UNIFIED IDEOGRAPH + {0x9457, 0x64F6}, //3634 #CJK UNIFIED IDEOGRAPH + {0x9458, 0x64F7}, //3635 #CJK UNIFIED IDEOGRAPH + {0x9459, 0x64F8}, //3636 #CJK UNIFIED IDEOGRAPH + {0x945A, 0x64F9}, //3637 #CJK UNIFIED IDEOGRAPH + {0x945B, 0x64FA}, //3638 #CJK UNIFIED IDEOGRAPH + {0x945C, 0x64FB}, //3639 #CJK UNIFIED IDEOGRAPH + {0x945D, 0x64FC}, //3640 #CJK UNIFIED IDEOGRAPH + {0x945E, 0x64FD}, //3641 #CJK UNIFIED IDEOGRAPH + {0x945F, 0x64FE}, //3642 #CJK UNIFIED IDEOGRAPH + {0x9460, 0x64FF}, //3643 #CJK UNIFIED IDEOGRAPH + {0x9461, 0x6501}, //3644 #CJK UNIFIED IDEOGRAPH + {0x9462, 0x6502}, //3645 #CJK UNIFIED IDEOGRAPH + {0x9463, 0x6503}, //3646 #CJK UNIFIED IDEOGRAPH + {0x9464, 0x6504}, //3647 #CJK UNIFIED IDEOGRAPH + {0x9465, 0x6505}, //3648 #CJK UNIFIED IDEOGRAPH + {0x9466, 0x6506}, //3649 #CJK UNIFIED IDEOGRAPH + {0x9467, 0x6507}, //3650 #CJK UNIFIED IDEOGRAPH + {0x9468, 0x6508}, //3651 #CJK UNIFIED IDEOGRAPH + {0x9469, 0x650A}, //3652 #CJK UNIFIED IDEOGRAPH + {0x946A, 0x650B}, //3653 #CJK UNIFIED IDEOGRAPH + {0x946B, 0x650C}, //3654 #CJK UNIFIED IDEOGRAPH + {0x946C, 0x650D}, //3655 #CJK UNIFIED IDEOGRAPH + {0x946D, 0x650E}, //3656 #CJK UNIFIED IDEOGRAPH + {0x946E, 0x650F}, //3657 #CJK UNIFIED IDEOGRAPH + {0x946F, 0x6510}, //3658 #CJK UNIFIED IDEOGRAPH + {0x9470, 0x6511}, //3659 #CJK UNIFIED IDEOGRAPH + {0x9471, 0x6513}, //3660 #CJK UNIFIED IDEOGRAPH + {0x9472, 0x6514}, //3661 #CJK UNIFIED IDEOGRAPH + {0x9473, 0x6515}, //3662 #CJK UNIFIED IDEOGRAPH + {0x9474, 0x6516}, //3663 #CJK UNIFIED IDEOGRAPH + {0x9475, 0x6517}, //3664 #CJK UNIFIED IDEOGRAPH + {0x9476, 0x6519}, //3665 #CJK UNIFIED IDEOGRAPH + {0x9477, 0x651A}, //3666 #CJK UNIFIED IDEOGRAPH + {0x9478, 0x651B}, //3667 #CJK UNIFIED IDEOGRAPH + {0x9479, 0x651C}, //3668 #CJK UNIFIED IDEOGRAPH + {0x947A, 0x651D}, //3669 #CJK UNIFIED IDEOGRAPH + {0x947B, 0x651E}, //3670 #CJK UNIFIED IDEOGRAPH + {0x947C, 0x651F}, //3671 #CJK UNIFIED IDEOGRAPH + {0x947D, 0x6520}, //3672 #CJK UNIFIED IDEOGRAPH + {0x947E, 0x6521}, //3673 #CJK UNIFIED IDEOGRAPH + {0x9480, 0x6522}, //3674 #CJK UNIFIED IDEOGRAPH + {0x9481, 0x6523}, //3675 #CJK UNIFIED IDEOGRAPH + {0x9482, 0x6524}, //3676 #CJK UNIFIED IDEOGRAPH + {0x9483, 0x6526}, //3677 #CJK UNIFIED IDEOGRAPH + {0x9484, 0x6527}, //3678 #CJK UNIFIED IDEOGRAPH + {0x9485, 0x6528}, //3679 #CJK UNIFIED IDEOGRAPH + {0x9486, 0x6529}, //3680 #CJK UNIFIED IDEOGRAPH + {0x9487, 0x652A}, //3681 #CJK UNIFIED IDEOGRAPH + {0x9488, 0x652C}, //3682 #CJK UNIFIED IDEOGRAPH + {0x9489, 0x652D}, //3683 #CJK UNIFIED IDEOGRAPH + {0x948A, 0x6530}, //3684 #CJK UNIFIED IDEOGRAPH + {0x948B, 0x6531}, //3685 #CJK UNIFIED IDEOGRAPH + {0x948C, 0x6532}, //3686 #CJK UNIFIED IDEOGRAPH + {0x948D, 0x6533}, //3687 #CJK UNIFIED IDEOGRAPH + {0x948E, 0x6537}, //3688 #CJK UNIFIED IDEOGRAPH + {0x948F, 0x653A}, //3689 #CJK UNIFIED IDEOGRAPH + {0x9490, 0x653C}, //3690 #CJK UNIFIED IDEOGRAPH + {0x9491, 0x653D}, //3691 #CJK UNIFIED IDEOGRAPH + {0x9492, 0x6540}, //3692 #CJK UNIFIED IDEOGRAPH + {0x9493, 0x6541}, //3693 #CJK UNIFIED IDEOGRAPH + {0x9494, 0x6542}, //3694 #CJK UNIFIED IDEOGRAPH + {0x9495, 0x6543}, //3695 #CJK UNIFIED IDEOGRAPH + {0x9496, 0x6544}, //3696 #CJK UNIFIED IDEOGRAPH + {0x9497, 0x6546}, //3697 #CJK UNIFIED IDEOGRAPH + {0x9498, 0x6547}, //3698 #CJK UNIFIED IDEOGRAPH + {0x9499, 0x654A}, //3699 #CJK UNIFIED IDEOGRAPH + {0x949A, 0x654B}, //3700 #CJK UNIFIED IDEOGRAPH + {0x949B, 0x654D}, //3701 #CJK UNIFIED IDEOGRAPH + {0x949C, 0x654E}, //3702 #CJK UNIFIED IDEOGRAPH + {0x949D, 0x6550}, //3703 #CJK UNIFIED IDEOGRAPH + {0x949E, 0x6552}, //3704 #CJK UNIFIED IDEOGRAPH + {0x949F, 0x6553}, //3705 #CJK UNIFIED IDEOGRAPH + {0x94A0, 0x6554}, //3706 #CJK UNIFIED IDEOGRAPH + {0x94A1, 0x6557}, //3707 #CJK UNIFIED IDEOGRAPH + {0x94A2, 0x6558}, //3708 #CJK UNIFIED IDEOGRAPH + {0x94A3, 0x655A}, //3709 #CJK UNIFIED IDEOGRAPH + {0x94A4, 0x655C}, //3710 #CJK UNIFIED IDEOGRAPH + {0x94A5, 0x655F}, //3711 #CJK UNIFIED IDEOGRAPH + {0x94A6, 0x6560}, //3712 #CJK UNIFIED IDEOGRAPH + {0x94A7, 0x6561}, //3713 #CJK UNIFIED IDEOGRAPH + {0x94A8, 0x6564}, //3714 #CJK UNIFIED IDEOGRAPH + {0x94A9, 0x6565}, //3715 #CJK UNIFIED IDEOGRAPH + {0x94AA, 0x6567}, //3716 #CJK UNIFIED IDEOGRAPH + {0x94AB, 0x6568}, //3717 #CJK UNIFIED IDEOGRAPH + {0x94AC, 0x6569}, //3718 #CJK UNIFIED IDEOGRAPH + {0x94AD, 0x656A}, //3719 #CJK UNIFIED IDEOGRAPH + {0x94AE, 0x656D}, //3720 #CJK UNIFIED IDEOGRAPH + {0x94AF, 0x656E}, //3721 #CJK UNIFIED IDEOGRAPH + {0x94B0, 0x656F}, //3722 #CJK UNIFIED IDEOGRAPH + {0x94B1, 0x6571}, //3723 #CJK UNIFIED IDEOGRAPH + {0x94B2, 0x6573}, //3724 #CJK UNIFIED IDEOGRAPH + {0x94B3, 0x6575}, //3725 #CJK UNIFIED IDEOGRAPH + {0x94B4, 0x6576}, //3726 #CJK UNIFIED IDEOGRAPH + {0x94B5, 0x6578}, //3727 #CJK UNIFIED IDEOGRAPH + {0x94B6, 0x6579}, //3728 #CJK UNIFIED IDEOGRAPH + {0x94B7, 0x657A}, //3729 #CJK UNIFIED IDEOGRAPH + {0x94B8, 0x657B}, //3730 #CJK UNIFIED IDEOGRAPH + {0x94B9, 0x657C}, //3731 #CJK UNIFIED IDEOGRAPH + {0x94BA, 0x657D}, //3732 #CJK UNIFIED IDEOGRAPH + {0x94BB, 0x657E}, //3733 #CJK UNIFIED IDEOGRAPH + {0x94BC, 0x657F}, //3734 #CJK UNIFIED IDEOGRAPH + {0x94BD, 0x6580}, //3735 #CJK UNIFIED IDEOGRAPH + {0x94BE, 0x6581}, //3736 #CJK UNIFIED IDEOGRAPH + {0x94BF, 0x6582}, //3737 #CJK UNIFIED IDEOGRAPH + {0x94C0, 0x6583}, //3738 #CJK UNIFIED IDEOGRAPH + {0x94C1, 0x6584}, //3739 #CJK UNIFIED IDEOGRAPH + {0x94C2, 0x6585}, //3740 #CJK UNIFIED IDEOGRAPH + {0x94C3, 0x6586}, //3741 #CJK UNIFIED IDEOGRAPH + {0x94C4, 0x6588}, //3742 #CJK UNIFIED IDEOGRAPH + {0x94C5, 0x6589}, //3743 #CJK UNIFIED IDEOGRAPH + {0x94C6, 0x658A}, //3744 #CJK UNIFIED IDEOGRAPH + {0x94C7, 0x658D}, //3745 #CJK UNIFIED IDEOGRAPH + {0x94C8, 0x658E}, //3746 #CJK UNIFIED IDEOGRAPH + {0x94C9, 0x658F}, //3747 #CJK UNIFIED IDEOGRAPH + {0x94CA, 0x6592}, //3748 #CJK UNIFIED IDEOGRAPH + {0x94CB, 0x6594}, //3749 #CJK UNIFIED IDEOGRAPH + {0x94CC, 0x6595}, //3750 #CJK UNIFIED IDEOGRAPH + {0x94CD, 0x6596}, //3751 #CJK UNIFIED IDEOGRAPH + {0x94CE, 0x6598}, //3752 #CJK UNIFIED IDEOGRAPH + {0x94CF, 0x659A}, //3753 #CJK UNIFIED IDEOGRAPH + {0x94D0, 0x659D}, //3754 #CJK UNIFIED IDEOGRAPH + {0x94D1, 0x659E}, //3755 #CJK UNIFIED IDEOGRAPH + {0x94D2, 0x65A0}, //3756 #CJK UNIFIED IDEOGRAPH + {0x94D3, 0x65A2}, //3757 #CJK UNIFIED IDEOGRAPH + {0x94D4, 0x65A3}, //3758 #CJK UNIFIED IDEOGRAPH + {0x94D5, 0x65A6}, //3759 #CJK UNIFIED IDEOGRAPH + {0x94D6, 0x65A8}, //3760 #CJK UNIFIED IDEOGRAPH + {0x94D7, 0x65AA}, //3761 #CJK UNIFIED IDEOGRAPH + {0x94D8, 0x65AC}, //3762 #CJK UNIFIED IDEOGRAPH + {0x94D9, 0x65AE}, //3763 #CJK UNIFIED IDEOGRAPH + {0x94DA, 0x65B1}, //3764 #CJK UNIFIED IDEOGRAPH + {0x94DB, 0x65B2}, //3765 #CJK UNIFIED IDEOGRAPH + {0x94DC, 0x65B3}, //3766 #CJK UNIFIED IDEOGRAPH + {0x94DD, 0x65B4}, //3767 #CJK UNIFIED IDEOGRAPH + {0x94DE, 0x65B5}, //3768 #CJK UNIFIED IDEOGRAPH + {0x94DF, 0x65B6}, //3769 #CJK UNIFIED IDEOGRAPH + {0x94E0, 0x65B7}, //3770 #CJK UNIFIED IDEOGRAPH + {0x94E1, 0x65B8}, //3771 #CJK UNIFIED IDEOGRAPH + {0x94E2, 0x65BA}, //3772 #CJK UNIFIED IDEOGRAPH + {0x94E3, 0x65BB}, //3773 #CJK UNIFIED IDEOGRAPH + {0x94E4, 0x65BE}, //3774 #CJK UNIFIED IDEOGRAPH + {0x94E5, 0x65BF}, //3775 #CJK UNIFIED IDEOGRAPH + {0x94E6, 0x65C0}, //3776 #CJK UNIFIED IDEOGRAPH + {0x94E7, 0x65C2}, //3777 #CJK UNIFIED IDEOGRAPH + {0x94E8, 0x65C7}, //3778 #CJK UNIFIED IDEOGRAPH + {0x94E9, 0x65C8}, //3779 #CJK UNIFIED IDEOGRAPH + {0x94EA, 0x65C9}, //3780 #CJK UNIFIED IDEOGRAPH + {0x94EB, 0x65CA}, //3781 #CJK UNIFIED IDEOGRAPH + {0x94EC, 0x65CD}, //3782 #CJK UNIFIED IDEOGRAPH + {0x94ED, 0x65D0}, //3783 #CJK UNIFIED IDEOGRAPH + {0x94EE, 0x65D1}, //3784 #CJK UNIFIED IDEOGRAPH + {0x94EF, 0x65D3}, //3785 #CJK UNIFIED IDEOGRAPH + {0x94F0, 0x65D4}, //3786 #CJK UNIFIED IDEOGRAPH + {0x94F1, 0x65D5}, //3787 #CJK UNIFIED IDEOGRAPH + {0x94F2, 0x65D8}, //3788 #CJK UNIFIED IDEOGRAPH + {0x94F3, 0x65D9}, //3789 #CJK UNIFIED IDEOGRAPH + {0x94F4, 0x65DA}, //3790 #CJK UNIFIED IDEOGRAPH + {0x94F5, 0x65DB}, //3791 #CJK UNIFIED IDEOGRAPH + {0x94F6, 0x65DC}, //3792 #CJK UNIFIED IDEOGRAPH + {0x94F7, 0x65DD}, //3793 #CJK UNIFIED IDEOGRAPH + {0x94F8, 0x65DE}, //3794 #CJK UNIFIED IDEOGRAPH + {0x94F9, 0x65DF}, //3795 #CJK UNIFIED IDEOGRAPH + {0x94FA, 0x65E1}, //3796 #CJK UNIFIED IDEOGRAPH + {0x94FB, 0x65E3}, //3797 #CJK UNIFIED IDEOGRAPH + {0x94FC, 0x65E4}, //3798 #CJK UNIFIED IDEOGRAPH + {0x94FD, 0x65EA}, //3799 #CJK UNIFIED IDEOGRAPH + {0x94FE, 0x65EB}, //3800 #CJK UNIFIED IDEOGRAPH + {0x9540, 0x65F2}, //3801 #CJK UNIFIED IDEOGRAPH + {0x9541, 0x65F3}, //3802 #CJK UNIFIED IDEOGRAPH + {0x9542, 0x65F4}, //3803 #CJK UNIFIED IDEOGRAPH + {0x9543, 0x65F5}, //3804 #CJK UNIFIED IDEOGRAPH + {0x9544, 0x65F8}, //3805 #CJK UNIFIED IDEOGRAPH + {0x9545, 0x65F9}, //3806 #CJK UNIFIED IDEOGRAPH + {0x9546, 0x65FB}, //3807 #CJK UNIFIED IDEOGRAPH + {0x9547, 0x65FC}, //3808 #CJK UNIFIED IDEOGRAPH + {0x9548, 0x65FD}, //3809 #CJK UNIFIED IDEOGRAPH + {0x9549, 0x65FE}, //3810 #CJK UNIFIED IDEOGRAPH + {0x954A, 0x65FF}, //3811 #CJK UNIFIED IDEOGRAPH + {0x954B, 0x6601}, //3812 #CJK UNIFIED IDEOGRAPH + {0x954C, 0x6604}, //3813 #CJK UNIFIED IDEOGRAPH + {0x954D, 0x6605}, //3814 #CJK UNIFIED IDEOGRAPH + {0x954E, 0x6607}, //3815 #CJK UNIFIED IDEOGRAPH + {0x954F, 0x6608}, //3816 #CJK UNIFIED IDEOGRAPH + {0x9550, 0x6609}, //3817 #CJK UNIFIED IDEOGRAPH + {0x9551, 0x660B}, //3818 #CJK UNIFIED IDEOGRAPH + {0x9552, 0x660D}, //3819 #CJK UNIFIED IDEOGRAPH + {0x9553, 0x6610}, //3820 #CJK UNIFIED IDEOGRAPH + {0x9554, 0x6611}, //3821 #CJK UNIFIED IDEOGRAPH + {0x9555, 0x6612}, //3822 #CJK UNIFIED IDEOGRAPH + {0x9556, 0x6616}, //3823 #CJK UNIFIED IDEOGRAPH + {0x9557, 0x6617}, //3824 #CJK UNIFIED IDEOGRAPH + {0x9558, 0x6618}, //3825 #CJK UNIFIED IDEOGRAPH + {0x9559, 0x661A}, //3826 #CJK UNIFIED IDEOGRAPH + {0x955A, 0x661B}, //3827 #CJK UNIFIED IDEOGRAPH + {0x955B, 0x661C}, //3828 #CJK UNIFIED IDEOGRAPH + {0x955C, 0x661E}, //3829 #CJK UNIFIED IDEOGRAPH + {0x955D, 0x6621}, //3830 #CJK UNIFIED IDEOGRAPH + {0x955E, 0x6622}, //3831 #CJK UNIFIED IDEOGRAPH + {0x955F, 0x6623}, //3832 #CJK UNIFIED IDEOGRAPH + {0x9560, 0x6624}, //3833 #CJK UNIFIED IDEOGRAPH + {0x9561, 0x6626}, //3834 #CJK UNIFIED IDEOGRAPH + {0x9562, 0x6629}, //3835 #CJK UNIFIED IDEOGRAPH + {0x9563, 0x662A}, //3836 #CJK UNIFIED IDEOGRAPH + {0x9564, 0x662B}, //3837 #CJK UNIFIED IDEOGRAPH + {0x9565, 0x662C}, //3838 #CJK UNIFIED IDEOGRAPH + {0x9566, 0x662E}, //3839 #CJK UNIFIED IDEOGRAPH + {0x9567, 0x6630}, //3840 #CJK UNIFIED IDEOGRAPH + {0x9568, 0x6632}, //3841 #CJK UNIFIED IDEOGRAPH + {0x9569, 0x6633}, //3842 #CJK UNIFIED IDEOGRAPH + {0x956A, 0x6637}, //3843 #CJK UNIFIED IDEOGRAPH + {0x956B, 0x6638}, //3844 #CJK UNIFIED IDEOGRAPH + {0x956C, 0x6639}, //3845 #CJK UNIFIED IDEOGRAPH + {0x956D, 0x663A}, //3846 #CJK UNIFIED IDEOGRAPH + {0x956E, 0x663B}, //3847 #CJK UNIFIED IDEOGRAPH + {0x956F, 0x663D}, //3848 #CJK UNIFIED IDEOGRAPH + {0x9570, 0x663F}, //3849 #CJK UNIFIED IDEOGRAPH + {0x9571, 0x6640}, //3850 #CJK UNIFIED IDEOGRAPH + {0x9572, 0x6642}, //3851 #CJK UNIFIED IDEOGRAPH + {0x9573, 0x6644}, //3852 #CJK UNIFIED IDEOGRAPH + {0x9574, 0x6645}, //3853 #CJK UNIFIED IDEOGRAPH + {0x9575, 0x6646}, //3854 #CJK UNIFIED IDEOGRAPH + {0x9576, 0x6647}, //3855 #CJK UNIFIED IDEOGRAPH + {0x9577, 0x6648}, //3856 #CJK UNIFIED IDEOGRAPH + {0x9578, 0x6649}, //3857 #CJK UNIFIED IDEOGRAPH + {0x9579, 0x664A}, //3858 #CJK UNIFIED IDEOGRAPH + {0x957A, 0x664D}, //3859 #CJK UNIFIED IDEOGRAPH + {0x957B, 0x664E}, //3860 #CJK UNIFIED IDEOGRAPH + {0x957C, 0x6650}, //3861 #CJK UNIFIED IDEOGRAPH + {0x957D, 0x6651}, //3862 #CJK UNIFIED IDEOGRAPH + {0x957E, 0x6658}, //3863 #CJK UNIFIED IDEOGRAPH + {0x9580, 0x6659}, //3864 #CJK UNIFIED IDEOGRAPH + {0x9581, 0x665B}, //3865 #CJK UNIFIED IDEOGRAPH + {0x9582, 0x665C}, //3866 #CJK UNIFIED IDEOGRAPH + {0x9583, 0x665D}, //3867 #CJK UNIFIED IDEOGRAPH + {0x9584, 0x665E}, //3868 #CJK UNIFIED IDEOGRAPH + {0x9585, 0x6660}, //3869 #CJK UNIFIED IDEOGRAPH + {0x9586, 0x6662}, //3870 #CJK UNIFIED IDEOGRAPH + {0x9587, 0x6663}, //3871 #CJK UNIFIED IDEOGRAPH + {0x9588, 0x6665}, //3872 #CJK UNIFIED IDEOGRAPH + {0x9589, 0x6667}, //3873 #CJK UNIFIED IDEOGRAPH + {0x958A, 0x6669}, //3874 #CJK UNIFIED IDEOGRAPH + {0x958B, 0x666A}, //3875 #CJK UNIFIED IDEOGRAPH + {0x958C, 0x666B}, //3876 #CJK UNIFIED IDEOGRAPH + {0x958D, 0x666C}, //3877 #CJK UNIFIED IDEOGRAPH + {0x958E, 0x666D}, //3878 #CJK UNIFIED IDEOGRAPH + {0x958F, 0x6671}, //3879 #CJK UNIFIED IDEOGRAPH + {0x9590, 0x6672}, //3880 #CJK UNIFIED IDEOGRAPH + {0x9591, 0x6673}, //3881 #CJK UNIFIED IDEOGRAPH + {0x9592, 0x6675}, //3882 #CJK UNIFIED IDEOGRAPH + {0x9593, 0x6678}, //3883 #CJK UNIFIED IDEOGRAPH + {0x9594, 0x6679}, //3884 #CJK UNIFIED IDEOGRAPH + {0x9595, 0x667B}, //3885 #CJK UNIFIED IDEOGRAPH + {0x9596, 0x667C}, //3886 #CJK UNIFIED IDEOGRAPH + {0x9597, 0x667D}, //3887 #CJK UNIFIED IDEOGRAPH + {0x9598, 0x667F}, //3888 #CJK UNIFIED IDEOGRAPH + {0x9599, 0x6680}, //3889 #CJK UNIFIED IDEOGRAPH + {0x959A, 0x6681}, //3890 #CJK UNIFIED IDEOGRAPH + {0x959B, 0x6683}, //3891 #CJK UNIFIED IDEOGRAPH + {0x959C, 0x6685}, //3892 #CJK UNIFIED IDEOGRAPH + {0x959D, 0x6686}, //3893 #CJK UNIFIED IDEOGRAPH + {0x959E, 0x6688}, //3894 #CJK UNIFIED IDEOGRAPH + {0x959F, 0x6689}, //3895 #CJK UNIFIED IDEOGRAPH + {0x95A0, 0x668A}, //3896 #CJK UNIFIED IDEOGRAPH + {0x95A1, 0x668B}, //3897 #CJK UNIFIED IDEOGRAPH + {0x95A2, 0x668D}, //3898 #CJK UNIFIED IDEOGRAPH + {0x95A3, 0x668E}, //3899 #CJK UNIFIED IDEOGRAPH + {0x95A4, 0x668F}, //3900 #CJK UNIFIED IDEOGRAPH + {0x95A5, 0x6690}, //3901 #CJK UNIFIED IDEOGRAPH + {0x95A6, 0x6692}, //3902 #CJK UNIFIED IDEOGRAPH + {0x95A7, 0x6693}, //3903 #CJK UNIFIED IDEOGRAPH + {0x95A8, 0x6694}, //3904 #CJK UNIFIED IDEOGRAPH + {0x95A9, 0x6695}, //3905 #CJK UNIFIED IDEOGRAPH + {0x95AA, 0x6698}, //3906 #CJK UNIFIED IDEOGRAPH + {0x95AB, 0x6699}, //3907 #CJK UNIFIED IDEOGRAPH + {0x95AC, 0x669A}, //3908 #CJK UNIFIED IDEOGRAPH + {0x95AD, 0x669B}, //3909 #CJK UNIFIED IDEOGRAPH + {0x95AE, 0x669C}, //3910 #CJK UNIFIED IDEOGRAPH + {0x95AF, 0x669E}, //3911 #CJK UNIFIED IDEOGRAPH + {0x95B0, 0x669F}, //3912 #CJK UNIFIED IDEOGRAPH + {0x95B1, 0x66A0}, //3913 #CJK UNIFIED IDEOGRAPH + {0x95B2, 0x66A1}, //3914 #CJK UNIFIED IDEOGRAPH + {0x95B3, 0x66A2}, //3915 #CJK UNIFIED IDEOGRAPH + {0x95B4, 0x66A3}, //3916 #CJK UNIFIED IDEOGRAPH + {0x95B5, 0x66A4}, //3917 #CJK UNIFIED IDEOGRAPH + {0x95B6, 0x66A5}, //3918 #CJK UNIFIED IDEOGRAPH + {0x95B7, 0x66A6}, //3919 #CJK UNIFIED IDEOGRAPH + {0x95B8, 0x66A9}, //3920 #CJK UNIFIED IDEOGRAPH + {0x95B9, 0x66AA}, //3921 #CJK UNIFIED IDEOGRAPH + {0x95BA, 0x66AB}, //3922 #CJK UNIFIED IDEOGRAPH + {0x95BB, 0x66AC}, //3923 #CJK UNIFIED IDEOGRAPH + {0x95BC, 0x66AD}, //3924 #CJK UNIFIED IDEOGRAPH + {0x95BD, 0x66AF}, //3925 #CJK UNIFIED IDEOGRAPH + {0x95BE, 0x66B0}, //3926 #CJK UNIFIED IDEOGRAPH + {0x95BF, 0x66B1}, //3927 #CJK UNIFIED IDEOGRAPH + {0x95C0, 0x66B2}, //3928 #CJK UNIFIED IDEOGRAPH + {0x95C1, 0x66B3}, //3929 #CJK UNIFIED IDEOGRAPH + {0x95C2, 0x66B5}, //3930 #CJK UNIFIED IDEOGRAPH + {0x95C3, 0x66B6}, //3931 #CJK UNIFIED IDEOGRAPH + {0x95C4, 0x66B7}, //3932 #CJK UNIFIED IDEOGRAPH + {0x95C5, 0x66B8}, //3933 #CJK UNIFIED IDEOGRAPH + {0x95C6, 0x66BA}, //3934 #CJK UNIFIED IDEOGRAPH + {0x95C7, 0x66BB}, //3935 #CJK UNIFIED IDEOGRAPH + {0x95C8, 0x66BC}, //3936 #CJK UNIFIED IDEOGRAPH + {0x95C9, 0x66BD}, //3937 #CJK UNIFIED IDEOGRAPH + {0x95CA, 0x66BF}, //3938 #CJK UNIFIED IDEOGRAPH + {0x95CB, 0x66C0}, //3939 #CJK UNIFIED IDEOGRAPH + {0x95CC, 0x66C1}, //3940 #CJK UNIFIED IDEOGRAPH + {0x95CD, 0x66C2}, //3941 #CJK UNIFIED IDEOGRAPH + {0x95CE, 0x66C3}, //3942 #CJK UNIFIED IDEOGRAPH + {0x95CF, 0x66C4}, //3943 #CJK UNIFIED IDEOGRAPH + {0x95D0, 0x66C5}, //3944 #CJK UNIFIED IDEOGRAPH + {0x95D1, 0x66C6}, //3945 #CJK UNIFIED IDEOGRAPH + {0x95D2, 0x66C7}, //3946 #CJK UNIFIED IDEOGRAPH + {0x95D3, 0x66C8}, //3947 #CJK UNIFIED IDEOGRAPH + {0x95D4, 0x66C9}, //3948 #CJK UNIFIED IDEOGRAPH + {0x95D5, 0x66CA}, //3949 #CJK UNIFIED IDEOGRAPH + {0x95D6, 0x66CB}, //3950 #CJK UNIFIED IDEOGRAPH + {0x95D7, 0x66CC}, //3951 #CJK UNIFIED IDEOGRAPH + {0x95D8, 0x66CD}, //3952 #CJK UNIFIED IDEOGRAPH + {0x95D9, 0x66CE}, //3953 #CJK UNIFIED IDEOGRAPH + {0x95DA, 0x66CF}, //3954 #CJK UNIFIED IDEOGRAPH + {0x95DB, 0x66D0}, //3955 #CJK UNIFIED IDEOGRAPH + {0x95DC, 0x66D1}, //3956 #CJK UNIFIED IDEOGRAPH + {0x95DD, 0x66D2}, //3957 #CJK UNIFIED IDEOGRAPH + {0x95DE, 0x66D3}, //3958 #CJK UNIFIED IDEOGRAPH + {0x95DF, 0x66D4}, //3959 #CJK UNIFIED IDEOGRAPH + {0x95E0, 0x66D5}, //3960 #CJK UNIFIED IDEOGRAPH + {0x95E1, 0x66D6}, //3961 #CJK UNIFIED IDEOGRAPH + {0x95E2, 0x66D7}, //3962 #CJK UNIFIED IDEOGRAPH + {0x95E3, 0x66D8}, //3963 #CJK UNIFIED IDEOGRAPH + {0x95E4, 0x66DA}, //3964 #CJK UNIFIED IDEOGRAPH + {0x95E5, 0x66DE}, //3965 #CJK UNIFIED IDEOGRAPH + {0x95E6, 0x66DF}, //3966 #CJK UNIFIED IDEOGRAPH + {0x95E7, 0x66E0}, //3967 #CJK UNIFIED IDEOGRAPH + {0x95E8, 0x66E1}, //3968 #CJK UNIFIED IDEOGRAPH + {0x95E9, 0x66E2}, //3969 #CJK UNIFIED IDEOGRAPH + {0x95EA, 0x66E3}, //3970 #CJK UNIFIED IDEOGRAPH + {0x95EB, 0x66E4}, //3971 #CJK UNIFIED IDEOGRAPH + {0x95EC, 0x66E5}, //3972 #CJK UNIFIED IDEOGRAPH + {0x95ED, 0x66E7}, //3973 #CJK UNIFIED IDEOGRAPH + {0x95EE, 0x66E8}, //3974 #CJK UNIFIED IDEOGRAPH + {0x95EF, 0x66EA}, //3975 #CJK UNIFIED IDEOGRAPH + {0x95F0, 0x66EB}, //3976 #CJK UNIFIED IDEOGRAPH + {0x95F1, 0x66EC}, //3977 #CJK UNIFIED IDEOGRAPH + {0x95F2, 0x66ED}, //3978 #CJK UNIFIED IDEOGRAPH + {0x95F3, 0x66EE}, //3979 #CJK UNIFIED IDEOGRAPH + {0x95F4, 0x66EF}, //3980 #CJK UNIFIED IDEOGRAPH + {0x95F5, 0x66F1}, //3981 #CJK UNIFIED IDEOGRAPH + {0x95F6, 0x66F5}, //3982 #CJK UNIFIED IDEOGRAPH + {0x95F7, 0x66F6}, //3983 #CJK UNIFIED IDEOGRAPH + {0x95F8, 0x66F8}, //3984 #CJK UNIFIED IDEOGRAPH + {0x95F9, 0x66FA}, //3985 #CJK UNIFIED IDEOGRAPH + {0x95FA, 0x66FB}, //3986 #CJK UNIFIED IDEOGRAPH + {0x95FB, 0x66FD}, //3987 #CJK UNIFIED IDEOGRAPH + {0x95FC, 0x6701}, //3988 #CJK UNIFIED IDEOGRAPH + {0x95FD, 0x6702}, //3989 #CJK UNIFIED IDEOGRAPH + {0x95FE, 0x6703}, //3990 #CJK UNIFIED IDEOGRAPH + {0x9640, 0x6704}, //3991 #CJK UNIFIED IDEOGRAPH + {0x9641, 0x6705}, //3992 #CJK UNIFIED IDEOGRAPH + {0x9642, 0x6706}, //3993 #CJK UNIFIED IDEOGRAPH + {0x9643, 0x6707}, //3994 #CJK UNIFIED IDEOGRAPH + {0x9644, 0x670C}, //3995 #CJK UNIFIED IDEOGRAPH + {0x9645, 0x670E}, //3996 #CJK UNIFIED IDEOGRAPH + {0x9646, 0x670F}, //3997 #CJK UNIFIED IDEOGRAPH + {0x9647, 0x6711}, //3998 #CJK UNIFIED IDEOGRAPH + {0x9648, 0x6712}, //3999 #CJK UNIFIED IDEOGRAPH + {0x9649, 0x6713}, //4000 #CJK UNIFIED IDEOGRAPH + {0x964A, 0x6716}, //4001 #CJK UNIFIED IDEOGRAPH + {0x964B, 0x6718}, //4002 #CJK UNIFIED IDEOGRAPH + {0x964C, 0x6719}, //4003 #CJK UNIFIED IDEOGRAPH + {0x964D, 0x671A}, //4004 #CJK UNIFIED IDEOGRAPH + {0x964E, 0x671C}, //4005 #CJK UNIFIED IDEOGRAPH + {0x964F, 0x671E}, //4006 #CJK UNIFIED IDEOGRAPH + {0x9650, 0x6720}, //4007 #CJK UNIFIED IDEOGRAPH + {0x9651, 0x6721}, //4008 #CJK UNIFIED IDEOGRAPH + {0x9652, 0x6722}, //4009 #CJK UNIFIED IDEOGRAPH + {0x9653, 0x6723}, //4010 #CJK UNIFIED IDEOGRAPH + {0x9654, 0x6724}, //4011 #CJK UNIFIED IDEOGRAPH + {0x9655, 0x6725}, //4012 #CJK UNIFIED IDEOGRAPH + {0x9656, 0x6727}, //4013 #CJK UNIFIED IDEOGRAPH + {0x9657, 0x6729}, //4014 #CJK UNIFIED IDEOGRAPH + {0x9658, 0x672E}, //4015 #CJK UNIFIED IDEOGRAPH + {0x9659, 0x6730}, //4016 #CJK UNIFIED IDEOGRAPH + {0x965A, 0x6732}, //4017 #CJK UNIFIED IDEOGRAPH + {0x965B, 0x6733}, //4018 #CJK UNIFIED IDEOGRAPH + {0x965C, 0x6736}, //4019 #CJK UNIFIED IDEOGRAPH + {0x965D, 0x6737}, //4020 #CJK UNIFIED IDEOGRAPH + {0x965E, 0x6738}, //4021 #CJK UNIFIED IDEOGRAPH + {0x965F, 0x6739}, //4022 #CJK UNIFIED IDEOGRAPH + {0x9660, 0x673B}, //4023 #CJK UNIFIED IDEOGRAPH + {0x9661, 0x673C}, //4024 #CJK UNIFIED IDEOGRAPH + {0x9662, 0x673E}, //4025 #CJK UNIFIED IDEOGRAPH + {0x9663, 0x673F}, //4026 #CJK UNIFIED IDEOGRAPH + {0x9664, 0x6741}, //4027 #CJK UNIFIED IDEOGRAPH + {0x9665, 0x6744}, //4028 #CJK UNIFIED IDEOGRAPH + {0x9666, 0x6745}, //4029 #CJK UNIFIED IDEOGRAPH + {0x9667, 0x6747}, //4030 #CJK UNIFIED IDEOGRAPH + {0x9668, 0x674A}, //4031 #CJK UNIFIED IDEOGRAPH + {0x9669, 0x674B}, //4032 #CJK UNIFIED IDEOGRAPH + {0x966A, 0x674D}, //4033 #CJK UNIFIED IDEOGRAPH + {0x966B, 0x6752}, //4034 #CJK UNIFIED IDEOGRAPH + {0x966C, 0x6754}, //4035 #CJK UNIFIED IDEOGRAPH + {0x966D, 0x6755}, //4036 #CJK UNIFIED IDEOGRAPH + {0x966E, 0x6757}, //4037 #CJK UNIFIED IDEOGRAPH + {0x966F, 0x6758}, //4038 #CJK UNIFIED IDEOGRAPH + {0x9670, 0x6759}, //4039 #CJK UNIFIED IDEOGRAPH + {0x9671, 0x675A}, //4040 #CJK UNIFIED IDEOGRAPH + {0x9672, 0x675B}, //4041 #CJK UNIFIED IDEOGRAPH + {0x9673, 0x675D}, //4042 #CJK UNIFIED IDEOGRAPH + {0x9674, 0x6762}, //4043 #CJK UNIFIED IDEOGRAPH + {0x9675, 0x6763}, //4044 #CJK UNIFIED IDEOGRAPH + {0x9676, 0x6764}, //4045 #CJK UNIFIED IDEOGRAPH + {0x9677, 0x6766}, //4046 #CJK UNIFIED IDEOGRAPH + {0x9678, 0x6767}, //4047 #CJK UNIFIED IDEOGRAPH + {0x9679, 0x676B}, //4048 #CJK UNIFIED IDEOGRAPH + {0x967A, 0x676C}, //4049 #CJK UNIFIED IDEOGRAPH + {0x967B, 0x676E}, //4050 #CJK UNIFIED IDEOGRAPH + {0x967C, 0x6771}, //4051 #CJK UNIFIED IDEOGRAPH + {0x967D, 0x6774}, //4052 #CJK UNIFIED IDEOGRAPH + {0x967E, 0x6776}, //4053 #CJK UNIFIED IDEOGRAPH + {0x9680, 0x6778}, //4054 #CJK UNIFIED IDEOGRAPH + {0x9681, 0x6779}, //4055 #CJK UNIFIED IDEOGRAPH + {0x9682, 0x677A}, //4056 #CJK UNIFIED IDEOGRAPH + {0x9683, 0x677B}, //4057 #CJK UNIFIED IDEOGRAPH + {0x9684, 0x677D}, //4058 #CJK UNIFIED IDEOGRAPH + {0x9685, 0x6780}, //4059 #CJK UNIFIED IDEOGRAPH + {0x9686, 0x6782}, //4060 #CJK UNIFIED IDEOGRAPH + {0x9687, 0x6783}, //4061 #CJK UNIFIED IDEOGRAPH + {0x9688, 0x6785}, //4062 #CJK UNIFIED IDEOGRAPH + {0x9689, 0x6786}, //4063 #CJK UNIFIED IDEOGRAPH + {0x968A, 0x6788}, //4064 #CJK UNIFIED IDEOGRAPH + {0x968B, 0x678A}, //4065 #CJK UNIFIED IDEOGRAPH + {0x968C, 0x678C}, //4066 #CJK UNIFIED IDEOGRAPH + {0x968D, 0x678D}, //4067 #CJK UNIFIED IDEOGRAPH + {0x968E, 0x678E}, //4068 #CJK UNIFIED IDEOGRAPH + {0x968F, 0x678F}, //4069 #CJK UNIFIED IDEOGRAPH + {0x9690, 0x6791}, //4070 #CJK UNIFIED IDEOGRAPH + {0x9691, 0x6792}, //4071 #CJK UNIFIED IDEOGRAPH + {0x9692, 0x6793}, //4072 #CJK UNIFIED IDEOGRAPH + {0x9693, 0x6794}, //4073 #CJK UNIFIED IDEOGRAPH + {0x9694, 0x6796}, //4074 #CJK UNIFIED IDEOGRAPH + {0x9695, 0x6799}, //4075 #CJK UNIFIED IDEOGRAPH + {0x9696, 0x679B}, //4076 #CJK UNIFIED IDEOGRAPH + {0x9697, 0x679F}, //4077 #CJK UNIFIED IDEOGRAPH + {0x9698, 0x67A0}, //4078 #CJK UNIFIED IDEOGRAPH + {0x9699, 0x67A1}, //4079 #CJK UNIFIED IDEOGRAPH + {0x969A, 0x67A4}, //4080 #CJK UNIFIED IDEOGRAPH + {0x969B, 0x67A6}, //4081 #CJK UNIFIED IDEOGRAPH + {0x969C, 0x67A9}, //4082 #CJK UNIFIED IDEOGRAPH + {0x969D, 0x67AC}, //4083 #CJK UNIFIED IDEOGRAPH + {0x969E, 0x67AE}, //4084 #CJK UNIFIED IDEOGRAPH + {0x969F, 0x67B1}, //4085 #CJK UNIFIED IDEOGRAPH + {0x96A0, 0x67B2}, //4086 #CJK UNIFIED IDEOGRAPH + {0x96A1, 0x67B4}, //4087 #CJK UNIFIED IDEOGRAPH + {0x96A2, 0x67B9}, //4088 #CJK UNIFIED IDEOGRAPH + {0x96A3, 0x67BA}, //4089 #CJK UNIFIED IDEOGRAPH + {0x96A4, 0x67BB}, //4090 #CJK UNIFIED IDEOGRAPH + {0x96A5, 0x67BC}, //4091 #CJK UNIFIED IDEOGRAPH + {0x96A6, 0x67BD}, //4092 #CJK UNIFIED IDEOGRAPH + {0x96A7, 0x67BE}, //4093 #CJK UNIFIED IDEOGRAPH + {0x96A8, 0x67BF}, //4094 #CJK UNIFIED IDEOGRAPH + {0x96A9, 0x67C0}, //4095 #CJK UNIFIED IDEOGRAPH + {0x96AA, 0x67C2}, //4096 #CJK UNIFIED IDEOGRAPH + {0x96AB, 0x67C5}, //4097 #CJK UNIFIED IDEOGRAPH + {0x96AC, 0x67C6}, //4098 #CJK UNIFIED IDEOGRAPH + {0x96AD, 0x67C7}, //4099 #CJK UNIFIED IDEOGRAPH + {0x96AE, 0x67C8}, //4100 #CJK UNIFIED IDEOGRAPH + {0x96AF, 0x67C9}, //4101 #CJK UNIFIED IDEOGRAPH + {0x96B0, 0x67CA}, //4102 #CJK UNIFIED IDEOGRAPH + {0x96B1, 0x67CB}, //4103 #CJK UNIFIED IDEOGRAPH + {0x96B2, 0x67CC}, //4104 #CJK UNIFIED IDEOGRAPH + {0x96B3, 0x67CD}, //4105 #CJK UNIFIED IDEOGRAPH + {0x96B4, 0x67CE}, //4106 #CJK UNIFIED IDEOGRAPH + {0x96B5, 0x67D5}, //4107 #CJK UNIFIED IDEOGRAPH + {0x96B6, 0x67D6}, //4108 #CJK UNIFIED IDEOGRAPH + {0x96B7, 0x67D7}, //4109 #CJK UNIFIED IDEOGRAPH + {0x96B8, 0x67DB}, //4110 #CJK UNIFIED IDEOGRAPH + {0x96B9, 0x67DF}, //4111 #CJK UNIFIED IDEOGRAPH + {0x96BA, 0x67E1}, //4112 #CJK UNIFIED IDEOGRAPH + {0x96BB, 0x67E3}, //4113 #CJK UNIFIED IDEOGRAPH + {0x96BC, 0x67E4}, //4114 #CJK UNIFIED IDEOGRAPH + {0x96BD, 0x67E6}, //4115 #CJK UNIFIED IDEOGRAPH + {0x96BE, 0x67E7}, //4116 #CJK UNIFIED IDEOGRAPH + {0x96BF, 0x67E8}, //4117 #CJK UNIFIED IDEOGRAPH + {0x96C0, 0x67EA}, //4118 #CJK UNIFIED IDEOGRAPH + {0x96C1, 0x67EB}, //4119 #CJK UNIFIED IDEOGRAPH + {0x96C2, 0x67ED}, //4120 #CJK UNIFIED IDEOGRAPH + {0x96C3, 0x67EE}, //4121 #CJK UNIFIED IDEOGRAPH + {0x96C4, 0x67F2}, //4122 #CJK UNIFIED IDEOGRAPH + {0x96C5, 0x67F5}, //4123 #CJK UNIFIED IDEOGRAPH + {0x96C6, 0x67F6}, //4124 #CJK UNIFIED IDEOGRAPH + {0x96C7, 0x67F7}, //4125 #CJK UNIFIED IDEOGRAPH + {0x96C8, 0x67F8}, //4126 #CJK UNIFIED IDEOGRAPH + {0x96C9, 0x67F9}, //4127 #CJK UNIFIED IDEOGRAPH + {0x96CA, 0x67FA}, //4128 #CJK UNIFIED IDEOGRAPH + {0x96CB, 0x67FB}, //4129 #CJK UNIFIED IDEOGRAPH + {0x96CC, 0x67FC}, //4130 #CJK UNIFIED IDEOGRAPH + {0x96CD, 0x67FE}, //4131 #CJK UNIFIED IDEOGRAPH + {0x96CE, 0x6801}, //4132 #CJK UNIFIED IDEOGRAPH + {0x96CF, 0x6802}, //4133 #CJK UNIFIED IDEOGRAPH + {0x96D0, 0x6803}, //4134 #CJK UNIFIED IDEOGRAPH + {0x96D1, 0x6804}, //4135 #CJK UNIFIED IDEOGRAPH + {0x96D2, 0x6806}, //4136 #CJK UNIFIED IDEOGRAPH + {0x96D3, 0x680D}, //4137 #CJK UNIFIED IDEOGRAPH + {0x96D4, 0x6810}, //4138 #CJK UNIFIED IDEOGRAPH + {0x96D5, 0x6812}, //4139 #CJK UNIFIED IDEOGRAPH + {0x96D6, 0x6814}, //4140 #CJK UNIFIED IDEOGRAPH + {0x96D7, 0x6815}, //4141 #CJK UNIFIED IDEOGRAPH + {0x96D8, 0x6818}, //4142 #CJK UNIFIED IDEOGRAPH + {0x96D9, 0x6819}, //4143 #CJK UNIFIED IDEOGRAPH + {0x96DA, 0x681A}, //4144 #CJK UNIFIED IDEOGRAPH + {0x96DB, 0x681B}, //4145 #CJK UNIFIED IDEOGRAPH + {0x96DC, 0x681C}, //4146 #CJK UNIFIED IDEOGRAPH + {0x96DD, 0x681E}, //4147 #CJK UNIFIED IDEOGRAPH + {0x96DE, 0x681F}, //4148 #CJK UNIFIED IDEOGRAPH + {0x96DF, 0x6820}, //4149 #CJK UNIFIED IDEOGRAPH + {0x96E0, 0x6822}, //4150 #CJK UNIFIED IDEOGRAPH + {0x96E1, 0x6823}, //4151 #CJK UNIFIED IDEOGRAPH + {0x96E2, 0x6824}, //4152 #CJK UNIFIED IDEOGRAPH + {0x96E3, 0x6825}, //4153 #CJK UNIFIED IDEOGRAPH + {0x96E4, 0x6826}, //4154 #CJK UNIFIED IDEOGRAPH + {0x96E5, 0x6827}, //4155 #CJK UNIFIED IDEOGRAPH + {0x96E6, 0x6828}, //4156 #CJK UNIFIED IDEOGRAPH + {0x96E7, 0x682B}, //4157 #CJK UNIFIED IDEOGRAPH + {0x96E8, 0x682C}, //4158 #CJK UNIFIED IDEOGRAPH + {0x96E9, 0x682D}, //4159 #CJK UNIFIED IDEOGRAPH + {0x96EA, 0x682E}, //4160 #CJK UNIFIED IDEOGRAPH + {0x96EB, 0x682F}, //4161 #CJK UNIFIED IDEOGRAPH + {0x96EC, 0x6830}, //4162 #CJK UNIFIED IDEOGRAPH + {0x96ED, 0x6831}, //4163 #CJK UNIFIED IDEOGRAPH + {0x96EE, 0x6834}, //4164 #CJK UNIFIED IDEOGRAPH + {0x96EF, 0x6835}, //4165 #CJK UNIFIED IDEOGRAPH + {0x96F0, 0x6836}, //4166 #CJK UNIFIED IDEOGRAPH + {0x96F1, 0x683A}, //4167 #CJK UNIFIED IDEOGRAPH + {0x96F2, 0x683B}, //4168 #CJK UNIFIED IDEOGRAPH + {0x96F3, 0x683F}, //4169 #CJK UNIFIED IDEOGRAPH + {0x96F4, 0x6847}, //4170 #CJK UNIFIED IDEOGRAPH + {0x96F5, 0x684B}, //4171 #CJK UNIFIED IDEOGRAPH + {0x96F6, 0x684D}, //4172 #CJK UNIFIED IDEOGRAPH + {0x96F7, 0x684F}, //4173 #CJK UNIFIED IDEOGRAPH + {0x96F8, 0x6852}, //4174 #CJK UNIFIED IDEOGRAPH + {0x96F9, 0x6856}, //4175 #CJK UNIFIED IDEOGRAPH + {0x96FA, 0x6857}, //4176 #CJK UNIFIED IDEOGRAPH + {0x96FB, 0x6858}, //4177 #CJK UNIFIED IDEOGRAPH + {0x96FC, 0x6859}, //4178 #CJK UNIFIED IDEOGRAPH + {0x96FD, 0x685A}, //4179 #CJK UNIFIED IDEOGRAPH + {0x96FE, 0x685B}, //4180 #CJK UNIFIED IDEOGRAPH + {0x9740, 0x685C}, //4181 #CJK UNIFIED IDEOGRAPH + {0x9741, 0x685D}, //4182 #CJK UNIFIED IDEOGRAPH + {0x9742, 0x685E}, //4183 #CJK UNIFIED IDEOGRAPH + {0x9743, 0x685F}, //4184 #CJK UNIFIED IDEOGRAPH + {0x9744, 0x686A}, //4185 #CJK UNIFIED IDEOGRAPH + {0x9745, 0x686C}, //4186 #CJK UNIFIED IDEOGRAPH + {0x9746, 0x686D}, //4187 #CJK UNIFIED IDEOGRAPH + {0x9747, 0x686E}, //4188 #CJK UNIFIED IDEOGRAPH + {0x9748, 0x686F}, //4189 #CJK UNIFIED IDEOGRAPH + {0x9749, 0x6870}, //4190 #CJK UNIFIED IDEOGRAPH + {0x974A, 0x6871}, //4191 #CJK UNIFIED IDEOGRAPH + {0x974B, 0x6872}, //4192 #CJK UNIFIED IDEOGRAPH + {0x974C, 0x6873}, //4193 #CJK UNIFIED IDEOGRAPH + {0x974D, 0x6875}, //4194 #CJK UNIFIED IDEOGRAPH + {0x974E, 0x6878}, //4195 #CJK UNIFIED IDEOGRAPH + {0x974F, 0x6879}, //4196 #CJK UNIFIED IDEOGRAPH + {0x9750, 0x687A}, //4197 #CJK UNIFIED IDEOGRAPH + {0x9751, 0x687B}, //4198 #CJK UNIFIED IDEOGRAPH + {0x9752, 0x687C}, //4199 #CJK UNIFIED IDEOGRAPH + {0x9753, 0x687D}, //4200 #CJK UNIFIED IDEOGRAPH + {0x9754, 0x687E}, //4201 #CJK UNIFIED IDEOGRAPH + {0x9755, 0x687F}, //4202 #CJK UNIFIED IDEOGRAPH + {0x9756, 0x6880}, //4203 #CJK UNIFIED IDEOGRAPH + {0x9757, 0x6882}, //4204 #CJK UNIFIED IDEOGRAPH + {0x9758, 0x6884}, //4205 #CJK UNIFIED IDEOGRAPH + {0x9759, 0x6887}, //4206 #CJK UNIFIED IDEOGRAPH + {0x975A, 0x6888}, //4207 #CJK UNIFIED IDEOGRAPH + {0x975B, 0x6889}, //4208 #CJK UNIFIED IDEOGRAPH + {0x975C, 0x688A}, //4209 #CJK UNIFIED IDEOGRAPH + {0x975D, 0x688B}, //4210 #CJK UNIFIED IDEOGRAPH + {0x975E, 0x688C}, //4211 #CJK UNIFIED IDEOGRAPH + {0x975F, 0x688D}, //4212 #CJK UNIFIED IDEOGRAPH + {0x9760, 0x688E}, //4213 #CJK UNIFIED IDEOGRAPH + {0x9761, 0x6890}, //4214 #CJK UNIFIED IDEOGRAPH + {0x9762, 0x6891}, //4215 #CJK UNIFIED IDEOGRAPH + {0x9763, 0x6892}, //4216 #CJK UNIFIED IDEOGRAPH + {0x9764, 0x6894}, //4217 #CJK UNIFIED IDEOGRAPH + {0x9765, 0x6895}, //4218 #CJK UNIFIED IDEOGRAPH + {0x9766, 0x6896}, //4219 #CJK UNIFIED IDEOGRAPH + {0x9767, 0x6898}, //4220 #CJK UNIFIED IDEOGRAPH + {0x9768, 0x6899}, //4221 #CJK UNIFIED IDEOGRAPH + {0x9769, 0x689A}, //4222 #CJK UNIFIED IDEOGRAPH + {0x976A, 0x689B}, //4223 #CJK UNIFIED IDEOGRAPH + {0x976B, 0x689C}, //4224 #CJK UNIFIED IDEOGRAPH + {0x976C, 0x689D}, //4225 #CJK UNIFIED IDEOGRAPH + {0x976D, 0x689E}, //4226 #CJK UNIFIED IDEOGRAPH + {0x976E, 0x689F}, //4227 #CJK UNIFIED IDEOGRAPH + {0x976F, 0x68A0}, //4228 #CJK UNIFIED IDEOGRAPH + {0x9770, 0x68A1}, //4229 #CJK UNIFIED IDEOGRAPH + {0x9771, 0x68A3}, //4230 #CJK UNIFIED IDEOGRAPH + {0x9772, 0x68A4}, //4231 #CJK UNIFIED IDEOGRAPH + {0x9773, 0x68A5}, //4232 #CJK UNIFIED IDEOGRAPH + {0x9774, 0x68A9}, //4233 #CJK UNIFIED IDEOGRAPH + {0x9775, 0x68AA}, //4234 #CJK UNIFIED IDEOGRAPH + {0x9776, 0x68AB}, //4235 #CJK UNIFIED IDEOGRAPH + {0x9777, 0x68AC}, //4236 #CJK UNIFIED IDEOGRAPH + {0x9778, 0x68AE}, //4237 #CJK UNIFIED IDEOGRAPH + {0x9779, 0x68B1}, //4238 #CJK UNIFIED IDEOGRAPH + {0x977A, 0x68B2}, //4239 #CJK UNIFIED IDEOGRAPH + {0x977B, 0x68B4}, //4240 #CJK UNIFIED IDEOGRAPH + {0x977C, 0x68B6}, //4241 #CJK UNIFIED IDEOGRAPH + {0x977D, 0x68B7}, //4242 #CJK UNIFIED IDEOGRAPH + {0x977E, 0x68B8}, //4243 #CJK UNIFIED IDEOGRAPH + {0x9780, 0x68B9}, //4244 #CJK UNIFIED IDEOGRAPH + {0x9781, 0x68BA}, //4245 #CJK UNIFIED IDEOGRAPH + {0x9782, 0x68BB}, //4246 #CJK UNIFIED IDEOGRAPH + {0x9783, 0x68BC}, //4247 #CJK UNIFIED IDEOGRAPH + {0x9784, 0x68BD}, //4248 #CJK UNIFIED IDEOGRAPH + {0x9785, 0x68BE}, //4249 #CJK UNIFIED IDEOGRAPH + {0x9786, 0x68BF}, //4250 #CJK UNIFIED IDEOGRAPH + {0x9787, 0x68C1}, //4251 #CJK UNIFIED IDEOGRAPH + {0x9788, 0x68C3}, //4252 #CJK UNIFIED IDEOGRAPH + {0x9789, 0x68C4}, //4253 #CJK UNIFIED IDEOGRAPH + {0x978A, 0x68C5}, //4254 #CJK UNIFIED IDEOGRAPH + {0x978B, 0x68C6}, //4255 #CJK UNIFIED IDEOGRAPH + {0x978C, 0x68C7}, //4256 #CJK UNIFIED IDEOGRAPH + {0x978D, 0x68C8}, //4257 #CJK UNIFIED IDEOGRAPH + {0x978E, 0x68CA}, //4258 #CJK UNIFIED IDEOGRAPH + {0x978F, 0x68CC}, //4259 #CJK UNIFIED IDEOGRAPH + {0x9790, 0x68CE}, //4260 #CJK UNIFIED IDEOGRAPH + {0x9791, 0x68CF}, //4261 #CJK UNIFIED IDEOGRAPH + {0x9792, 0x68D0}, //4262 #CJK UNIFIED IDEOGRAPH + {0x9793, 0x68D1}, //4263 #CJK UNIFIED IDEOGRAPH + {0x9794, 0x68D3}, //4264 #CJK UNIFIED IDEOGRAPH + {0x9795, 0x68D4}, //4265 #CJK UNIFIED IDEOGRAPH + {0x9796, 0x68D6}, //4266 #CJK UNIFIED IDEOGRAPH + {0x9797, 0x68D7}, //4267 #CJK UNIFIED IDEOGRAPH + {0x9798, 0x68D9}, //4268 #CJK UNIFIED IDEOGRAPH + {0x9799, 0x68DB}, //4269 #CJK UNIFIED IDEOGRAPH + {0x979A, 0x68DC}, //4270 #CJK UNIFIED IDEOGRAPH + {0x979B, 0x68DD}, //4271 #CJK UNIFIED IDEOGRAPH + {0x979C, 0x68DE}, //4272 #CJK UNIFIED IDEOGRAPH + {0x979D, 0x68DF}, //4273 #CJK UNIFIED IDEOGRAPH + {0x979E, 0x68E1}, //4274 #CJK UNIFIED IDEOGRAPH + {0x979F, 0x68E2}, //4275 #CJK UNIFIED IDEOGRAPH + {0x97A0, 0x68E4}, //4276 #CJK UNIFIED IDEOGRAPH + {0x97A1, 0x68E5}, //4277 #CJK UNIFIED IDEOGRAPH + {0x97A2, 0x68E6}, //4278 #CJK UNIFIED IDEOGRAPH + {0x97A3, 0x68E7}, //4279 #CJK UNIFIED IDEOGRAPH + {0x97A4, 0x68E8}, //4280 #CJK UNIFIED IDEOGRAPH + {0x97A5, 0x68E9}, //4281 #CJK UNIFIED IDEOGRAPH + {0x97A6, 0x68EA}, //4282 #CJK UNIFIED IDEOGRAPH + {0x97A7, 0x68EB}, //4283 #CJK UNIFIED IDEOGRAPH + {0x97A8, 0x68EC}, //4284 #CJK UNIFIED IDEOGRAPH + {0x97A9, 0x68ED}, //4285 #CJK UNIFIED IDEOGRAPH + {0x97AA, 0x68EF}, //4286 #CJK UNIFIED IDEOGRAPH + {0x97AB, 0x68F2}, //4287 #CJK UNIFIED IDEOGRAPH + {0x97AC, 0x68F3}, //4288 #CJK UNIFIED IDEOGRAPH + {0x97AD, 0x68F4}, //4289 #CJK UNIFIED IDEOGRAPH + {0x97AE, 0x68F6}, //4290 #CJK UNIFIED IDEOGRAPH + {0x97AF, 0x68F7}, //4291 #CJK UNIFIED IDEOGRAPH + {0x97B0, 0x68F8}, //4292 #CJK UNIFIED IDEOGRAPH + {0x97B1, 0x68FB}, //4293 #CJK UNIFIED IDEOGRAPH + {0x97B2, 0x68FD}, //4294 #CJK UNIFIED IDEOGRAPH + {0x97B3, 0x68FE}, //4295 #CJK UNIFIED IDEOGRAPH + {0x97B4, 0x68FF}, //4296 #CJK UNIFIED IDEOGRAPH + {0x97B5, 0x6900}, //4297 #CJK UNIFIED IDEOGRAPH + {0x97B6, 0x6902}, //4298 #CJK UNIFIED IDEOGRAPH + {0x97B7, 0x6903}, //4299 #CJK UNIFIED IDEOGRAPH + {0x97B8, 0x6904}, //4300 #CJK UNIFIED IDEOGRAPH + {0x97B9, 0x6906}, //4301 #CJK UNIFIED IDEOGRAPH + {0x97BA, 0x6907}, //4302 #CJK UNIFIED IDEOGRAPH + {0x97BB, 0x6908}, //4303 #CJK UNIFIED IDEOGRAPH + {0x97BC, 0x6909}, //4304 #CJK UNIFIED IDEOGRAPH + {0x97BD, 0x690A}, //4305 #CJK UNIFIED IDEOGRAPH + {0x97BE, 0x690C}, //4306 #CJK UNIFIED IDEOGRAPH + {0x97BF, 0x690F}, //4307 #CJK UNIFIED IDEOGRAPH + {0x97C0, 0x6911}, //4308 #CJK UNIFIED IDEOGRAPH + {0x97C1, 0x6913}, //4309 #CJK UNIFIED IDEOGRAPH + {0x97C2, 0x6914}, //4310 #CJK UNIFIED IDEOGRAPH + {0x97C3, 0x6915}, //4311 #CJK UNIFIED IDEOGRAPH + {0x97C4, 0x6916}, //4312 #CJK UNIFIED IDEOGRAPH + {0x97C5, 0x6917}, //4313 #CJK UNIFIED IDEOGRAPH + {0x97C6, 0x6918}, //4314 #CJK UNIFIED IDEOGRAPH + {0x97C7, 0x6919}, //4315 #CJK UNIFIED IDEOGRAPH + {0x97C8, 0x691A}, //4316 #CJK UNIFIED IDEOGRAPH + {0x97C9, 0x691B}, //4317 #CJK UNIFIED IDEOGRAPH + {0x97CA, 0x691C}, //4318 #CJK UNIFIED IDEOGRAPH + {0x97CB, 0x691D}, //4319 #CJK UNIFIED IDEOGRAPH + {0x97CC, 0x691E}, //4320 #CJK UNIFIED IDEOGRAPH + {0x97CD, 0x6921}, //4321 #CJK UNIFIED IDEOGRAPH + {0x97CE, 0x6922}, //4322 #CJK UNIFIED IDEOGRAPH + {0x97CF, 0x6923}, //4323 #CJK UNIFIED IDEOGRAPH + {0x97D0, 0x6925}, //4324 #CJK UNIFIED IDEOGRAPH + {0x97D1, 0x6926}, //4325 #CJK UNIFIED IDEOGRAPH + {0x97D2, 0x6927}, //4326 #CJK UNIFIED IDEOGRAPH + {0x97D3, 0x6928}, //4327 #CJK UNIFIED IDEOGRAPH + {0x97D4, 0x6929}, //4328 #CJK UNIFIED IDEOGRAPH + {0x97D5, 0x692A}, //4329 #CJK UNIFIED IDEOGRAPH + {0x97D6, 0x692B}, //4330 #CJK UNIFIED IDEOGRAPH + {0x97D7, 0x692C}, //4331 #CJK UNIFIED IDEOGRAPH + {0x97D8, 0x692E}, //4332 #CJK UNIFIED IDEOGRAPH + {0x97D9, 0x692F}, //4333 #CJK UNIFIED IDEOGRAPH + {0x97DA, 0x6931}, //4334 #CJK UNIFIED IDEOGRAPH + {0x97DB, 0x6932}, //4335 #CJK UNIFIED IDEOGRAPH + {0x97DC, 0x6933}, //4336 #CJK UNIFIED IDEOGRAPH + {0x97DD, 0x6935}, //4337 #CJK UNIFIED IDEOGRAPH + {0x97DE, 0x6936}, //4338 #CJK UNIFIED IDEOGRAPH + {0x97DF, 0x6937}, //4339 #CJK UNIFIED IDEOGRAPH + {0x97E0, 0x6938}, //4340 #CJK UNIFIED IDEOGRAPH + {0x97E1, 0x693A}, //4341 #CJK UNIFIED IDEOGRAPH + {0x97E2, 0x693B}, //4342 #CJK UNIFIED IDEOGRAPH + {0x97E3, 0x693C}, //4343 #CJK UNIFIED IDEOGRAPH + {0x97E4, 0x693E}, //4344 #CJK UNIFIED IDEOGRAPH + {0x97E5, 0x6940}, //4345 #CJK UNIFIED IDEOGRAPH + {0x97E6, 0x6941}, //4346 #CJK UNIFIED IDEOGRAPH + {0x97E7, 0x6943}, //4347 #CJK UNIFIED IDEOGRAPH + {0x97E8, 0x6944}, //4348 #CJK UNIFIED IDEOGRAPH + {0x97E9, 0x6945}, //4349 #CJK UNIFIED IDEOGRAPH + {0x97EA, 0x6946}, //4350 #CJK UNIFIED IDEOGRAPH + {0x97EB, 0x6947}, //4351 #CJK UNIFIED IDEOGRAPH + {0x97EC, 0x6948}, //4352 #CJK UNIFIED IDEOGRAPH + {0x97ED, 0x6949}, //4353 #CJK UNIFIED IDEOGRAPH + {0x97EE, 0x694A}, //4354 #CJK UNIFIED IDEOGRAPH + {0x97EF, 0x694B}, //4355 #CJK UNIFIED IDEOGRAPH + {0x97F0, 0x694C}, //4356 #CJK UNIFIED IDEOGRAPH + {0x97F1, 0x694D}, //4357 #CJK UNIFIED IDEOGRAPH + {0x97F2, 0x694E}, //4358 #CJK UNIFIED IDEOGRAPH + {0x97F3, 0x694F}, //4359 #CJK UNIFIED IDEOGRAPH + {0x97F4, 0x6950}, //4360 #CJK UNIFIED IDEOGRAPH + {0x97F5, 0x6951}, //4361 #CJK UNIFIED IDEOGRAPH + {0x97F6, 0x6952}, //4362 #CJK UNIFIED IDEOGRAPH + {0x97F7, 0x6953}, //4363 #CJK UNIFIED IDEOGRAPH + {0x97F8, 0x6955}, //4364 #CJK UNIFIED IDEOGRAPH + {0x97F9, 0x6956}, //4365 #CJK UNIFIED IDEOGRAPH + {0x97FA, 0x6958}, //4366 #CJK UNIFIED IDEOGRAPH + {0x97FB, 0x6959}, //4367 #CJK UNIFIED IDEOGRAPH + {0x97FC, 0x695B}, //4368 #CJK UNIFIED IDEOGRAPH + {0x97FD, 0x695C}, //4369 #CJK UNIFIED IDEOGRAPH + {0x97FE, 0x695F}, //4370 #CJK UNIFIED IDEOGRAPH + {0x9840, 0x6961}, //4371 #CJK UNIFIED IDEOGRAPH + {0x9841, 0x6962}, //4372 #CJK UNIFIED IDEOGRAPH + {0x9842, 0x6964}, //4373 #CJK UNIFIED IDEOGRAPH + {0x9843, 0x6965}, //4374 #CJK UNIFIED IDEOGRAPH + {0x9844, 0x6967}, //4375 #CJK UNIFIED IDEOGRAPH + {0x9845, 0x6968}, //4376 #CJK UNIFIED IDEOGRAPH + {0x9846, 0x6969}, //4377 #CJK UNIFIED IDEOGRAPH + {0x9847, 0x696A}, //4378 #CJK UNIFIED IDEOGRAPH + {0x9848, 0x696C}, //4379 #CJK UNIFIED IDEOGRAPH + {0x9849, 0x696D}, //4380 #CJK UNIFIED IDEOGRAPH + {0x984A, 0x696F}, //4381 #CJK UNIFIED IDEOGRAPH + {0x984B, 0x6970}, //4382 #CJK UNIFIED IDEOGRAPH + {0x984C, 0x6972}, //4383 #CJK UNIFIED IDEOGRAPH + {0x984D, 0x6973}, //4384 #CJK UNIFIED IDEOGRAPH + {0x984E, 0x6974}, //4385 #CJK UNIFIED IDEOGRAPH + {0x984F, 0x6975}, //4386 #CJK UNIFIED IDEOGRAPH + {0x9850, 0x6976}, //4387 #CJK UNIFIED IDEOGRAPH + {0x9851, 0x697A}, //4388 #CJK UNIFIED IDEOGRAPH + {0x9852, 0x697B}, //4389 #CJK UNIFIED IDEOGRAPH + {0x9853, 0x697D}, //4390 #CJK UNIFIED IDEOGRAPH + {0x9854, 0x697E}, //4391 #CJK UNIFIED IDEOGRAPH + {0x9855, 0x697F}, //4392 #CJK UNIFIED IDEOGRAPH + {0x9856, 0x6981}, //4393 #CJK UNIFIED IDEOGRAPH + {0x9857, 0x6983}, //4394 #CJK UNIFIED IDEOGRAPH + {0x9858, 0x6985}, //4395 #CJK UNIFIED IDEOGRAPH + {0x9859, 0x698A}, //4396 #CJK UNIFIED IDEOGRAPH + {0x985A, 0x698B}, //4397 #CJK UNIFIED IDEOGRAPH + {0x985B, 0x698C}, //4398 #CJK UNIFIED IDEOGRAPH + {0x985C, 0x698E}, //4399 #CJK UNIFIED IDEOGRAPH + {0x985D, 0x698F}, //4400 #CJK UNIFIED IDEOGRAPH + {0x985E, 0x6990}, //4401 #CJK UNIFIED IDEOGRAPH + {0x985F, 0x6991}, //4402 #CJK UNIFIED IDEOGRAPH + {0x9860, 0x6992}, //4403 #CJK UNIFIED IDEOGRAPH + {0x9861, 0x6993}, //4404 #CJK UNIFIED IDEOGRAPH + {0x9862, 0x6996}, //4405 #CJK UNIFIED IDEOGRAPH + {0x9863, 0x6997}, //4406 #CJK UNIFIED IDEOGRAPH + {0x9864, 0x6999}, //4407 #CJK UNIFIED IDEOGRAPH + {0x9865, 0x699A}, //4408 #CJK UNIFIED IDEOGRAPH + {0x9866, 0x699D}, //4409 #CJK UNIFIED IDEOGRAPH + {0x9867, 0x699E}, //4410 #CJK UNIFIED IDEOGRAPH + {0x9868, 0x699F}, //4411 #CJK UNIFIED IDEOGRAPH + {0x9869, 0x69A0}, //4412 #CJK UNIFIED IDEOGRAPH + {0x986A, 0x69A1}, //4413 #CJK UNIFIED IDEOGRAPH + {0x986B, 0x69A2}, //4414 #CJK UNIFIED IDEOGRAPH + {0x986C, 0x69A3}, //4415 #CJK UNIFIED IDEOGRAPH + {0x986D, 0x69A4}, //4416 #CJK UNIFIED IDEOGRAPH + {0x986E, 0x69A5}, //4417 #CJK UNIFIED IDEOGRAPH + {0x986F, 0x69A6}, //4418 #CJK UNIFIED IDEOGRAPH + {0x9870, 0x69A9}, //4419 #CJK UNIFIED IDEOGRAPH + {0x9871, 0x69AA}, //4420 #CJK UNIFIED IDEOGRAPH + {0x9872, 0x69AC}, //4421 #CJK UNIFIED IDEOGRAPH + {0x9873, 0x69AE}, //4422 #CJK UNIFIED IDEOGRAPH + {0x9874, 0x69AF}, //4423 #CJK UNIFIED IDEOGRAPH + {0x9875, 0x69B0}, //4424 #CJK UNIFIED IDEOGRAPH + {0x9876, 0x69B2}, //4425 #CJK UNIFIED IDEOGRAPH + {0x9877, 0x69B3}, //4426 #CJK UNIFIED IDEOGRAPH + {0x9878, 0x69B5}, //4427 #CJK UNIFIED IDEOGRAPH + {0x9879, 0x69B6}, //4428 #CJK UNIFIED IDEOGRAPH + {0x987A, 0x69B8}, //4429 #CJK UNIFIED IDEOGRAPH + {0x987B, 0x69B9}, //4430 #CJK UNIFIED IDEOGRAPH + {0x987C, 0x69BA}, //4431 #CJK UNIFIED IDEOGRAPH + {0x987D, 0x69BC}, //4432 #CJK UNIFIED IDEOGRAPH + {0x987E, 0x69BD}, //4433 #CJK UNIFIED IDEOGRAPH + {0x9880, 0x69BE}, //4434 #CJK UNIFIED IDEOGRAPH + {0x9881, 0x69BF}, //4435 #CJK UNIFIED IDEOGRAPH + {0x9882, 0x69C0}, //4436 #CJK UNIFIED IDEOGRAPH + {0x9883, 0x69C2}, //4437 #CJK UNIFIED IDEOGRAPH + {0x9884, 0x69C3}, //4438 #CJK UNIFIED IDEOGRAPH + {0x9885, 0x69C4}, //4439 #CJK UNIFIED IDEOGRAPH + {0x9886, 0x69C5}, //4440 #CJK UNIFIED IDEOGRAPH + {0x9887, 0x69C6}, //4441 #CJK UNIFIED IDEOGRAPH + {0x9888, 0x69C7}, //4442 #CJK UNIFIED IDEOGRAPH + {0x9889, 0x69C8}, //4443 #CJK UNIFIED IDEOGRAPH + {0x988A, 0x69C9}, //4444 #CJK UNIFIED IDEOGRAPH + {0x988B, 0x69CB}, //4445 #CJK UNIFIED IDEOGRAPH + {0x988C, 0x69CD}, //4446 #CJK UNIFIED IDEOGRAPH + {0x988D, 0x69CF}, //4447 #CJK UNIFIED IDEOGRAPH + {0x988E, 0x69D1}, //4448 #CJK UNIFIED IDEOGRAPH + {0x988F, 0x69D2}, //4449 #CJK UNIFIED IDEOGRAPH + {0x9890, 0x69D3}, //4450 #CJK UNIFIED IDEOGRAPH + {0x9891, 0x69D5}, //4451 #CJK UNIFIED IDEOGRAPH + {0x9892, 0x69D6}, //4452 #CJK UNIFIED IDEOGRAPH + {0x9893, 0x69D7}, //4453 #CJK UNIFIED IDEOGRAPH + {0x9894, 0x69D8}, //4454 #CJK UNIFIED IDEOGRAPH + {0x9895, 0x69D9}, //4455 #CJK UNIFIED IDEOGRAPH + {0x9896, 0x69DA}, //4456 #CJK UNIFIED IDEOGRAPH + {0x9897, 0x69DC}, //4457 #CJK UNIFIED IDEOGRAPH + {0x9898, 0x69DD}, //4458 #CJK UNIFIED IDEOGRAPH + {0x9899, 0x69DE}, //4459 #CJK UNIFIED IDEOGRAPH + {0x989A, 0x69E1}, //4460 #CJK UNIFIED IDEOGRAPH + {0x989B, 0x69E2}, //4461 #CJK UNIFIED IDEOGRAPH + {0x989C, 0x69E3}, //4462 #CJK UNIFIED IDEOGRAPH + {0x989D, 0x69E4}, //4463 #CJK UNIFIED IDEOGRAPH + {0x989E, 0x69E5}, //4464 #CJK UNIFIED IDEOGRAPH + {0x989F, 0x69E6}, //4465 #CJK UNIFIED IDEOGRAPH + {0x98A0, 0x69E7}, //4466 #CJK UNIFIED IDEOGRAPH + {0x98A1, 0x69E8}, //4467 #CJK UNIFIED IDEOGRAPH + {0x98A2, 0x69E9}, //4468 #CJK UNIFIED IDEOGRAPH + {0x98A3, 0x69EA}, //4469 #CJK UNIFIED IDEOGRAPH + {0x98A4, 0x69EB}, //4470 #CJK UNIFIED IDEOGRAPH + {0x98A5, 0x69EC}, //4471 #CJK UNIFIED IDEOGRAPH + {0x98A6, 0x69EE}, //4472 #CJK UNIFIED IDEOGRAPH + {0x98A7, 0x69EF}, //4473 #CJK UNIFIED IDEOGRAPH + {0x98A8, 0x69F0}, //4474 #CJK UNIFIED IDEOGRAPH + {0x98A9, 0x69F1}, //4475 #CJK UNIFIED IDEOGRAPH + {0x98AA, 0x69F3}, //4476 #CJK UNIFIED IDEOGRAPH + {0x98AB, 0x69F4}, //4477 #CJK UNIFIED IDEOGRAPH + {0x98AC, 0x69F5}, //4478 #CJK UNIFIED IDEOGRAPH + {0x98AD, 0x69F6}, //4479 #CJK UNIFIED IDEOGRAPH + {0x98AE, 0x69F7}, //4480 #CJK UNIFIED IDEOGRAPH + {0x98AF, 0x69F8}, //4481 #CJK UNIFIED IDEOGRAPH + {0x98B0, 0x69F9}, //4482 #CJK UNIFIED IDEOGRAPH + {0x98B1, 0x69FA}, //4483 #CJK UNIFIED IDEOGRAPH + {0x98B2, 0x69FB}, //4484 #CJK UNIFIED IDEOGRAPH + {0x98B3, 0x69FC}, //4485 #CJK UNIFIED IDEOGRAPH + {0x98B4, 0x69FE}, //4486 #CJK UNIFIED IDEOGRAPH + {0x98B5, 0x6A00}, //4487 #CJK UNIFIED IDEOGRAPH + {0x98B6, 0x6A01}, //4488 #CJK UNIFIED IDEOGRAPH + {0x98B7, 0x6A02}, //4489 #CJK UNIFIED IDEOGRAPH + {0x98B8, 0x6A03}, //4490 #CJK UNIFIED IDEOGRAPH + {0x98B9, 0x6A04}, //4491 #CJK UNIFIED IDEOGRAPH + {0x98BA, 0x6A05}, //4492 #CJK UNIFIED IDEOGRAPH + {0x98BB, 0x6A06}, //4493 #CJK UNIFIED IDEOGRAPH + {0x98BC, 0x6A07}, //4494 #CJK UNIFIED IDEOGRAPH + {0x98BD, 0x6A08}, //4495 #CJK UNIFIED IDEOGRAPH + {0x98BE, 0x6A09}, //4496 #CJK UNIFIED IDEOGRAPH + {0x98BF, 0x6A0B}, //4497 #CJK UNIFIED IDEOGRAPH + {0x98C0, 0x6A0C}, //4498 #CJK UNIFIED IDEOGRAPH + {0x98C1, 0x6A0D}, //4499 #CJK UNIFIED IDEOGRAPH + {0x98C2, 0x6A0E}, //4500 #CJK UNIFIED IDEOGRAPH + {0x98C3, 0x6A0F}, //4501 #CJK UNIFIED IDEOGRAPH + {0x98C4, 0x6A10}, //4502 #CJK UNIFIED IDEOGRAPH + {0x98C5, 0x6A11}, //4503 #CJK UNIFIED IDEOGRAPH + {0x98C6, 0x6A12}, //4504 #CJK UNIFIED IDEOGRAPH + {0x98C7, 0x6A13}, //4505 #CJK UNIFIED IDEOGRAPH + {0x98C8, 0x6A14}, //4506 #CJK UNIFIED IDEOGRAPH + {0x98C9, 0x6A15}, //4507 #CJK UNIFIED IDEOGRAPH + {0x98CA, 0x6A16}, //4508 #CJK UNIFIED IDEOGRAPH + {0x98CB, 0x6A19}, //4509 #CJK UNIFIED IDEOGRAPH + {0x98CC, 0x6A1A}, //4510 #CJK UNIFIED IDEOGRAPH + {0x98CD, 0x6A1B}, //4511 #CJK UNIFIED IDEOGRAPH + {0x98CE, 0x6A1C}, //4512 #CJK UNIFIED IDEOGRAPH + {0x98CF, 0x6A1D}, //4513 #CJK UNIFIED IDEOGRAPH + {0x98D0, 0x6A1E}, //4514 #CJK UNIFIED IDEOGRAPH + {0x98D1, 0x6A20}, //4515 #CJK UNIFIED IDEOGRAPH + {0x98D2, 0x6A22}, //4516 #CJK UNIFIED IDEOGRAPH + {0x98D3, 0x6A23}, //4517 #CJK UNIFIED IDEOGRAPH + {0x98D4, 0x6A24}, //4518 #CJK UNIFIED IDEOGRAPH + {0x98D5, 0x6A25}, //4519 #CJK UNIFIED IDEOGRAPH + {0x98D6, 0x6A26}, //4520 #CJK UNIFIED IDEOGRAPH + {0x98D7, 0x6A27}, //4521 #CJK UNIFIED IDEOGRAPH + {0x98D8, 0x6A29}, //4522 #CJK UNIFIED IDEOGRAPH + {0x98D9, 0x6A2B}, //4523 #CJK UNIFIED IDEOGRAPH + {0x98DA, 0x6A2C}, //4524 #CJK UNIFIED IDEOGRAPH + {0x98DB, 0x6A2D}, //4525 #CJK UNIFIED IDEOGRAPH + {0x98DC, 0x6A2E}, //4526 #CJK UNIFIED IDEOGRAPH + {0x98DD, 0x6A30}, //4527 #CJK UNIFIED IDEOGRAPH + {0x98DE, 0x6A32}, //4528 #CJK UNIFIED IDEOGRAPH + {0x98DF, 0x6A33}, //4529 #CJK UNIFIED IDEOGRAPH + {0x98E0, 0x6A34}, //4530 #CJK UNIFIED IDEOGRAPH + {0x98E1, 0x6A36}, //4531 #CJK UNIFIED IDEOGRAPH + {0x98E2, 0x6A37}, //4532 #CJK UNIFIED IDEOGRAPH + {0x98E3, 0x6A38}, //4533 #CJK UNIFIED IDEOGRAPH + {0x98E4, 0x6A39}, //4534 #CJK UNIFIED IDEOGRAPH + {0x98E5, 0x6A3A}, //4535 #CJK UNIFIED IDEOGRAPH + {0x98E6, 0x6A3B}, //4536 #CJK UNIFIED IDEOGRAPH + {0x98E7, 0x6A3C}, //4537 #CJK UNIFIED IDEOGRAPH + {0x98E8, 0x6A3F}, //4538 #CJK UNIFIED IDEOGRAPH + {0x98E9, 0x6A40}, //4539 #CJK UNIFIED IDEOGRAPH + {0x98EA, 0x6A41}, //4540 #CJK UNIFIED IDEOGRAPH + {0x98EB, 0x6A42}, //4541 #CJK UNIFIED IDEOGRAPH + {0x98EC, 0x6A43}, //4542 #CJK UNIFIED IDEOGRAPH + {0x98ED, 0x6A45}, //4543 #CJK UNIFIED IDEOGRAPH + {0x98EE, 0x6A46}, //4544 #CJK UNIFIED IDEOGRAPH + {0x98EF, 0x6A48}, //4545 #CJK UNIFIED IDEOGRAPH + {0x98F0, 0x6A49}, //4546 #CJK UNIFIED IDEOGRAPH + {0x98F1, 0x6A4A}, //4547 #CJK UNIFIED IDEOGRAPH + {0x98F2, 0x6A4B}, //4548 #CJK UNIFIED IDEOGRAPH + {0x98F3, 0x6A4C}, //4549 #CJK UNIFIED IDEOGRAPH + {0x98F4, 0x6A4D}, //4550 #CJK UNIFIED IDEOGRAPH + {0x98F5, 0x6A4E}, //4551 #CJK UNIFIED IDEOGRAPH + {0x98F6, 0x6A4F}, //4552 #CJK UNIFIED IDEOGRAPH + {0x98F7, 0x6A51}, //4553 #CJK UNIFIED IDEOGRAPH + {0x98F8, 0x6A52}, //4554 #CJK UNIFIED IDEOGRAPH + {0x98F9, 0x6A53}, //4555 #CJK UNIFIED IDEOGRAPH + {0x98FA, 0x6A54}, //4556 #CJK UNIFIED IDEOGRAPH + {0x98FB, 0x6A55}, //4557 #CJK UNIFIED IDEOGRAPH + {0x98FC, 0x6A56}, //4558 #CJK UNIFIED IDEOGRAPH + {0x98FD, 0x6A57}, //4559 #CJK UNIFIED IDEOGRAPH + {0x98FE, 0x6A5A}, //4560 #CJK UNIFIED IDEOGRAPH + {0x9940, 0x6A5C}, //4561 #CJK UNIFIED IDEOGRAPH + {0x9941, 0x6A5D}, //4562 #CJK UNIFIED IDEOGRAPH + {0x9942, 0x6A5E}, //4563 #CJK UNIFIED IDEOGRAPH + {0x9943, 0x6A5F}, //4564 #CJK UNIFIED IDEOGRAPH + {0x9944, 0x6A60}, //4565 #CJK UNIFIED IDEOGRAPH + {0x9945, 0x6A62}, //4566 #CJK UNIFIED IDEOGRAPH + {0x9946, 0x6A63}, //4567 #CJK UNIFIED IDEOGRAPH + {0x9947, 0x6A64}, //4568 #CJK UNIFIED IDEOGRAPH + {0x9948, 0x6A66}, //4569 #CJK UNIFIED IDEOGRAPH + {0x9949, 0x6A67}, //4570 #CJK UNIFIED IDEOGRAPH + {0x994A, 0x6A68}, //4571 #CJK UNIFIED IDEOGRAPH + {0x994B, 0x6A69}, //4572 #CJK UNIFIED IDEOGRAPH + {0x994C, 0x6A6A}, //4573 #CJK UNIFIED IDEOGRAPH + {0x994D, 0x6A6B}, //4574 #CJK UNIFIED IDEOGRAPH + {0x994E, 0x6A6C}, //4575 #CJK UNIFIED IDEOGRAPH + {0x994F, 0x6A6D}, //4576 #CJK UNIFIED IDEOGRAPH + {0x9950, 0x6A6E}, //4577 #CJK UNIFIED IDEOGRAPH + {0x9951, 0x6A6F}, //4578 #CJK UNIFIED IDEOGRAPH + {0x9952, 0x6A70}, //4579 #CJK UNIFIED IDEOGRAPH + {0x9953, 0x6A72}, //4580 #CJK UNIFIED IDEOGRAPH + {0x9954, 0x6A73}, //4581 #CJK UNIFIED IDEOGRAPH + {0x9955, 0x6A74}, //4582 #CJK UNIFIED IDEOGRAPH + {0x9956, 0x6A75}, //4583 #CJK UNIFIED IDEOGRAPH + {0x9957, 0x6A76}, //4584 #CJK UNIFIED IDEOGRAPH + {0x9958, 0x6A77}, //4585 #CJK UNIFIED IDEOGRAPH + {0x9959, 0x6A78}, //4586 #CJK UNIFIED IDEOGRAPH + {0x995A, 0x6A7A}, //4587 #CJK UNIFIED IDEOGRAPH + {0x995B, 0x6A7B}, //4588 #CJK UNIFIED IDEOGRAPH + {0x995C, 0x6A7D}, //4589 #CJK UNIFIED IDEOGRAPH + {0x995D, 0x6A7E}, //4590 #CJK UNIFIED IDEOGRAPH + {0x995E, 0x6A7F}, //4591 #CJK UNIFIED IDEOGRAPH + {0x995F, 0x6A81}, //4592 #CJK UNIFIED IDEOGRAPH + {0x9960, 0x6A82}, //4593 #CJK UNIFIED IDEOGRAPH + {0x9961, 0x6A83}, //4594 #CJK UNIFIED IDEOGRAPH + {0x9962, 0x6A85}, //4595 #CJK UNIFIED IDEOGRAPH + {0x9963, 0x6A86}, //4596 #CJK UNIFIED IDEOGRAPH + {0x9964, 0x6A87}, //4597 #CJK UNIFIED IDEOGRAPH + {0x9965, 0x6A88}, //4598 #CJK UNIFIED IDEOGRAPH + {0x9966, 0x6A89}, //4599 #CJK UNIFIED IDEOGRAPH + {0x9967, 0x6A8A}, //4600 #CJK UNIFIED IDEOGRAPH + {0x9968, 0x6A8B}, //4601 #CJK UNIFIED IDEOGRAPH + {0x9969, 0x6A8C}, //4602 #CJK UNIFIED IDEOGRAPH + {0x996A, 0x6A8D}, //4603 #CJK UNIFIED IDEOGRAPH + {0x996B, 0x6A8F}, //4604 #CJK UNIFIED IDEOGRAPH + {0x996C, 0x6A92}, //4605 #CJK UNIFIED IDEOGRAPH + {0x996D, 0x6A93}, //4606 #CJK UNIFIED IDEOGRAPH + {0x996E, 0x6A94}, //4607 #CJK UNIFIED IDEOGRAPH + {0x996F, 0x6A95}, //4608 #CJK UNIFIED IDEOGRAPH + {0x9970, 0x6A96}, //4609 #CJK UNIFIED IDEOGRAPH + {0x9971, 0x6A98}, //4610 #CJK UNIFIED IDEOGRAPH + {0x9972, 0x6A99}, //4611 #CJK UNIFIED IDEOGRAPH + {0x9973, 0x6A9A}, //4612 #CJK UNIFIED IDEOGRAPH + {0x9974, 0x6A9B}, //4613 #CJK UNIFIED IDEOGRAPH + {0x9975, 0x6A9C}, //4614 #CJK UNIFIED IDEOGRAPH + {0x9976, 0x6A9D}, //4615 #CJK UNIFIED IDEOGRAPH + {0x9977, 0x6A9E}, //4616 #CJK UNIFIED IDEOGRAPH + {0x9978, 0x6A9F}, //4617 #CJK UNIFIED IDEOGRAPH + {0x9979, 0x6AA1}, //4618 #CJK UNIFIED IDEOGRAPH + {0x997A, 0x6AA2}, //4619 #CJK UNIFIED IDEOGRAPH + {0x997B, 0x6AA3}, //4620 #CJK UNIFIED IDEOGRAPH + {0x997C, 0x6AA4}, //4621 #CJK UNIFIED IDEOGRAPH + {0x997D, 0x6AA5}, //4622 #CJK UNIFIED IDEOGRAPH + {0x997E, 0x6AA6}, //4623 #CJK UNIFIED IDEOGRAPH + {0x9980, 0x6AA7}, //4624 #CJK UNIFIED IDEOGRAPH + {0x9981, 0x6AA8}, //4625 #CJK UNIFIED IDEOGRAPH + {0x9982, 0x6AAA}, //4626 #CJK UNIFIED IDEOGRAPH + {0x9983, 0x6AAD}, //4627 #CJK UNIFIED IDEOGRAPH + {0x9984, 0x6AAE}, //4628 #CJK UNIFIED IDEOGRAPH + {0x9985, 0x6AAF}, //4629 #CJK UNIFIED IDEOGRAPH + {0x9986, 0x6AB0}, //4630 #CJK UNIFIED IDEOGRAPH + {0x9987, 0x6AB1}, //4631 #CJK UNIFIED IDEOGRAPH + {0x9988, 0x6AB2}, //4632 #CJK UNIFIED IDEOGRAPH + {0x9989, 0x6AB3}, //4633 #CJK UNIFIED IDEOGRAPH + {0x998A, 0x6AB4}, //4634 #CJK UNIFIED IDEOGRAPH + {0x998B, 0x6AB5}, //4635 #CJK UNIFIED IDEOGRAPH + {0x998C, 0x6AB6}, //4636 #CJK UNIFIED IDEOGRAPH + {0x998D, 0x6AB7}, //4637 #CJK UNIFIED IDEOGRAPH + {0x998E, 0x6AB8}, //4638 #CJK UNIFIED IDEOGRAPH + {0x998F, 0x6AB9}, //4639 #CJK UNIFIED IDEOGRAPH + {0x9990, 0x6ABA}, //4640 #CJK UNIFIED IDEOGRAPH + {0x9991, 0x6ABB}, //4641 #CJK UNIFIED IDEOGRAPH + {0x9992, 0x6ABC}, //4642 #CJK UNIFIED IDEOGRAPH + {0x9993, 0x6ABD}, //4643 #CJK UNIFIED IDEOGRAPH + {0x9994, 0x6ABE}, //4644 #CJK UNIFIED IDEOGRAPH + {0x9995, 0x6ABF}, //4645 #CJK UNIFIED IDEOGRAPH + {0x9996, 0x6AC0}, //4646 #CJK UNIFIED IDEOGRAPH + {0x9997, 0x6AC1}, //4647 #CJK UNIFIED IDEOGRAPH + {0x9998, 0x6AC2}, //4648 #CJK UNIFIED IDEOGRAPH + {0x9999, 0x6AC3}, //4649 #CJK UNIFIED IDEOGRAPH + {0x999A, 0x6AC4}, //4650 #CJK UNIFIED IDEOGRAPH + {0x999B, 0x6AC5}, //4651 #CJK UNIFIED IDEOGRAPH + {0x999C, 0x6AC6}, //4652 #CJK UNIFIED IDEOGRAPH + {0x999D, 0x6AC7}, //4653 #CJK UNIFIED IDEOGRAPH + {0x999E, 0x6AC8}, //4654 #CJK UNIFIED IDEOGRAPH + {0x999F, 0x6AC9}, //4655 #CJK UNIFIED IDEOGRAPH + {0x99A0, 0x6ACA}, //4656 #CJK UNIFIED IDEOGRAPH + {0x99A1, 0x6ACB}, //4657 #CJK UNIFIED IDEOGRAPH + {0x99A2, 0x6ACC}, //4658 #CJK UNIFIED IDEOGRAPH + {0x99A3, 0x6ACD}, //4659 #CJK UNIFIED IDEOGRAPH + {0x99A4, 0x6ACE}, //4660 #CJK UNIFIED IDEOGRAPH + {0x99A5, 0x6ACF}, //4661 #CJK UNIFIED IDEOGRAPH + {0x99A6, 0x6AD0}, //4662 #CJK UNIFIED IDEOGRAPH + {0x99A7, 0x6AD1}, //4663 #CJK UNIFIED IDEOGRAPH + {0x99A8, 0x6AD2}, //4664 #CJK UNIFIED IDEOGRAPH + {0x99A9, 0x6AD3}, //4665 #CJK UNIFIED IDEOGRAPH + {0x99AA, 0x6AD4}, //4666 #CJK UNIFIED IDEOGRAPH + {0x99AB, 0x6AD5}, //4667 #CJK UNIFIED IDEOGRAPH + {0x99AC, 0x6AD6}, //4668 #CJK UNIFIED IDEOGRAPH + {0x99AD, 0x6AD7}, //4669 #CJK UNIFIED IDEOGRAPH + {0x99AE, 0x6AD8}, //4670 #CJK UNIFIED IDEOGRAPH + {0x99AF, 0x6AD9}, //4671 #CJK UNIFIED IDEOGRAPH + {0x99B0, 0x6ADA}, //4672 #CJK UNIFIED IDEOGRAPH + {0x99B1, 0x6ADB}, //4673 #CJK UNIFIED IDEOGRAPH + {0x99B2, 0x6ADC}, //4674 #CJK UNIFIED IDEOGRAPH + {0x99B3, 0x6ADD}, //4675 #CJK UNIFIED IDEOGRAPH + {0x99B4, 0x6ADE}, //4676 #CJK UNIFIED IDEOGRAPH + {0x99B5, 0x6ADF}, //4677 #CJK UNIFIED IDEOGRAPH + {0x99B6, 0x6AE0}, //4678 #CJK UNIFIED IDEOGRAPH + {0x99B7, 0x6AE1}, //4679 #CJK UNIFIED IDEOGRAPH + {0x99B8, 0x6AE2}, //4680 #CJK UNIFIED IDEOGRAPH + {0x99B9, 0x6AE3}, //4681 #CJK UNIFIED IDEOGRAPH + {0x99BA, 0x6AE4}, //4682 #CJK UNIFIED IDEOGRAPH + {0x99BB, 0x6AE5}, //4683 #CJK UNIFIED IDEOGRAPH + {0x99BC, 0x6AE6}, //4684 #CJK UNIFIED IDEOGRAPH + {0x99BD, 0x6AE7}, //4685 #CJK UNIFIED IDEOGRAPH + {0x99BE, 0x6AE8}, //4686 #CJK UNIFIED IDEOGRAPH + {0x99BF, 0x6AE9}, //4687 #CJK UNIFIED IDEOGRAPH + {0x99C0, 0x6AEA}, //4688 #CJK UNIFIED IDEOGRAPH + {0x99C1, 0x6AEB}, //4689 #CJK UNIFIED IDEOGRAPH + {0x99C2, 0x6AEC}, //4690 #CJK UNIFIED IDEOGRAPH + {0x99C3, 0x6AED}, //4691 #CJK UNIFIED IDEOGRAPH + {0x99C4, 0x6AEE}, //4692 #CJK UNIFIED IDEOGRAPH + {0x99C5, 0x6AEF}, //4693 #CJK UNIFIED IDEOGRAPH + {0x99C6, 0x6AF0}, //4694 #CJK UNIFIED IDEOGRAPH + {0x99C7, 0x6AF1}, //4695 #CJK UNIFIED IDEOGRAPH + {0x99C8, 0x6AF2}, //4696 #CJK UNIFIED IDEOGRAPH + {0x99C9, 0x6AF3}, //4697 #CJK UNIFIED IDEOGRAPH + {0x99CA, 0x6AF4}, //4698 #CJK UNIFIED IDEOGRAPH + {0x99CB, 0x6AF5}, //4699 #CJK UNIFIED IDEOGRAPH + {0x99CC, 0x6AF6}, //4700 #CJK UNIFIED IDEOGRAPH + {0x99CD, 0x6AF7}, //4701 #CJK UNIFIED IDEOGRAPH + {0x99CE, 0x6AF8}, //4702 #CJK UNIFIED IDEOGRAPH + {0x99CF, 0x6AF9}, //4703 #CJK UNIFIED IDEOGRAPH + {0x99D0, 0x6AFA}, //4704 #CJK UNIFIED IDEOGRAPH + {0x99D1, 0x6AFB}, //4705 #CJK UNIFIED IDEOGRAPH + {0x99D2, 0x6AFC}, //4706 #CJK UNIFIED IDEOGRAPH + {0x99D3, 0x6AFD}, //4707 #CJK UNIFIED IDEOGRAPH + {0x99D4, 0x6AFE}, //4708 #CJK UNIFIED IDEOGRAPH + {0x99D5, 0x6AFF}, //4709 #CJK UNIFIED IDEOGRAPH + {0x99D6, 0x6B00}, //4710 #CJK UNIFIED IDEOGRAPH + {0x99D7, 0x6B01}, //4711 #CJK UNIFIED IDEOGRAPH + {0x99D8, 0x6B02}, //4712 #CJK UNIFIED IDEOGRAPH + {0x99D9, 0x6B03}, //4713 #CJK UNIFIED IDEOGRAPH + {0x99DA, 0x6B04}, //4714 #CJK UNIFIED IDEOGRAPH + {0x99DB, 0x6B05}, //4715 #CJK UNIFIED IDEOGRAPH + {0x99DC, 0x6B06}, //4716 #CJK UNIFIED IDEOGRAPH + {0x99DD, 0x6B07}, //4717 #CJK UNIFIED IDEOGRAPH + {0x99DE, 0x6B08}, //4718 #CJK UNIFIED IDEOGRAPH + {0x99DF, 0x6B09}, //4719 #CJK UNIFIED IDEOGRAPH + {0x99E0, 0x6B0A}, //4720 #CJK UNIFIED IDEOGRAPH + {0x99E1, 0x6B0B}, //4721 #CJK UNIFIED IDEOGRAPH + {0x99E2, 0x6B0C}, //4722 #CJK UNIFIED IDEOGRAPH + {0x99E3, 0x6B0D}, //4723 #CJK UNIFIED IDEOGRAPH + {0x99E4, 0x6B0E}, //4724 #CJK UNIFIED IDEOGRAPH + {0x99E5, 0x6B0F}, //4725 #CJK UNIFIED IDEOGRAPH + {0x99E6, 0x6B10}, //4726 #CJK UNIFIED IDEOGRAPH + {0x99E7, 0x6B11}, //4727 #CJK UNIFIED IDEOGRAPH + {0x99E8, 0x6B12}, //4728 #CJK UNIFIED IDEOGRAPH + {0x99E9, 0x6B13}, //4729 #CJK UNIFIED IDEOGRAPH + {0x99EA, 0x6B14}, //4730 #CJK UNIFIED IDEOGRAPH + {0x99EB, 0x6B15}, //4731 #CJK UNIFIED IDEOGRAPH + {0x99EC, 0x6B16}, //4732 #CJK UNIFIED IDEOGRAPH + {0x99ED, 0x6B17}, //4733 #CJK UNIFIED IDEOGRAPH + {0x99EE, 0x6B18}, //4734 #CJK UNIFIED IDEOGRAPH + {0x99EF, 0x6B19}, //4735 #CJK UNIFIED IDEOGRAPH + {0x99F0, 0x6B1A}, //4736 #CJK UNIFIED IDEOGRAPH + {0x99F1, 0x6B1B}, //4737 #CJK UNIFIED IDEOGRAPH + {0x99F2, 0x6B1C}, //4738 #CJK UNIFIED IDEOGRAPH + {0x99F3, 0x6B1D}, //4739 #CJK UNIFIED IDEOGRAPH + {0x99F4, 0x6B1E}, //4740 #CJK UNIFIED IDEOGRAPH + {0x99F5, 0x6B1F}, //4741 #CJK UNIFIED IDEOGRAPH + {0x99F6, 0x6B25}, //4742 #CJK UNIFIED IDEOGRAPH + {0x99F7, 0x6B26}, //4743 #CJK UNIFIED IDEOGRAPH + {0x99F8, 0x6B28}, //4744 #CJK UNIFIED IDEOGRAPH + {0x99F9, 0x6B29}, //4745 #CJK UNIFIED IDEOGRAPH + {0x99FA, 0x6B2A}, //4746 #CJK UNIFIED IDEOGRAPH + {0x99FB, 0x6B2B}, //4747 #CJK UNIFIED IDEOGRAPH + {0x99FC, 0x6B2C}, //4748 #CJK UNIFIED IDEOGRAPH + {0x99FD, 0x6B2D}, //4749 #CJK UNIFIED IDEOGRAPH + {0x99FE, 0x6B2E}, //4750 #CJK UNIFIED IDEOGRAPH + {0x9A40, 0x6B2F}, //4751 #CJK UNIFIED IDEOGRAPH + {0x9A41, 0x6B30}, //4752 #CJK UNIFIED IDEOGRAPH + {0x9A42, 0x6B31}, //4753 #CJK UNIFIED IDEOGRAPH + {0x9A43, 0x6B33}, //4754 #CJK UNIFIED IDEOGRAPH + {0x9A44, 0x6B34}, //4755 #CJK UNIFIED IDEOGRAPH + {0x9A45, 0x6B35}, //4756 #CJK UNIFIED IDEOGRAPH + {0x9A46, 0x6B36}, //4757 #CJK UNIFIED IDEOGRAPH + {0x9A47, 0x6B38}, //4758 #CJK UNIFIED IDEOGRAPH + {0x9A48, 0x6B3B}, //4759 #CJK UNIFIED IDEOGRAPH + {0x9A49, 0x6B3C}, //4760 #CJK UNIFIED IDEOGRAPH + {0x9A4A, 0x6B3D}, //4761 #CJK UNIFIED IDEOGRAPH + {0x9A4B, 0x6B3F}, //4762 #CJK UNIFIED IDEOGRAPH + {0x9A4C, 0x6B40}, //4763 #CJK UNIFIED IDEOGRAPH + {0x9A4D, 0x6B41}, //4764 #CJK UNIFIED IDEOGRAPH + {0x9A4E, 0x6B42}, //4765 #CJK UNIFIED IDEOGRAPH + {0x9A4F, 0x6B44}, //4766 #CJK UNIFIED IDEOGRAPH + {0x9A50, 0x6B45}, //4767 #CJK UNIFIED IDEOGRAPH + {0x9A51, 0x6B48}, //4768 #CJK UNIFIED IDEOGRAPH + {0x9A52, 0x6B4A}, //4769 #CJK UNIFIED IDEOGRAPH + {0x9A53, 0x6B4B}, //4770 #CJK UNIFIED IDEOGRAPH + {0x9A54, 0x6B4D}, //4771 #CJK UNIFIED IDEOGRAPH + {0x9A55, 0x6B4E}, //4772 #CJK UNIFIED IDEOGRAPH + {0x9A56, 0x6B4F}, //4773 #CJK UNIFIED IDEOGRAPH + {0x9A57, 0x6B50}, //4774 #CJK UNIFIED IDEOGRAPH + {0x9A58, 0x6B51}, //4775 #CJK UNIFIED IDEOGRAPH + {0x9A59, 0x6B52}, //4776 #CJK UNIFIED IDEOGRAPH + {0x9A5A, 0x6B53}, //4777 #CJK UNIFIED IDEOGRAPH + {0x9A5B, 0x6B54}, //4778 #CJK UNIFIED IDEOGRAPH + {0x9A5C, 0x6B55}, //4779 #CJK UNIFIED IDEOGRAPH + {0x9A5D, 0x6B56}, //4780 #CJK UNIFIED IDEOGRAPH + {0x9A5E, 0x6B57}, //4781 #CJK UNIFIED IDEOGRAPH + {0x9A5F, 0x6B58}, //4782 #CJK UNIFIED IDEOGRAPH + {0x9A60, 0x6B5A}, //4783 #CJK UNIFIED IDEOGRAPH + {0x9A61, 0x6B5B}, //4784 #CJK UNIFIED IDEOGRAPH + {0x9A62, 0x6B5C}, //4785 #CJK UNIFIED IDEOGRAPH + {0x9A63, 0x6B5D}, //4786 #CJK UNIFIED IDEOGRAPH + {0x9A64, 0x6B5E}, //4787 #CJK UNIFIED IDEOGRAPH + {0x9A65, 0x6B5F}, //4788 #CJK UNIFIED IDEOGRAPH + {0x9A66, 0x6B60}, //4789 #CJK UNIFIED IDEOGRAPH + {0x9A67, 0x6B61}, //4790 #CJK UNIFIED IDEOGRAPH + {0x9A68, 0x6B68}, //4791 #CJK UNIFIED IDEOGRAPH + {0x9A69, 0x6B69}, //4792 #CJK UNIFIED IDEOGRAPH + {0x9A6A, 0x6B6B}, //4793 #CJK UNIFIED IDEOGRAPH + {0x9A6B, 0x6B6C}, //4794 #CJK UNIFIED IDEOGRAPH + {0x9A6C, 0x6B6D}, //4795 #CJK UNIFIED IDEOGRAPH + {0x9A6D, 0x6B6E}, //4796 #CJK UNIFIED IDEOGRAPH + {0x9A6E, 0x6B6F}, //4797 #CJK UNIFIED IDEOGRAPH + {0x9A6F, 0x6B70}, //4798 #CJK UNIFIED IDEOGRAPH + {0x9A70, 0x6B71}, //4799 #CJK UNIFIED IDEOGRAPH + {0x9A71, 0x6B72}, //4800 #CJK UNIFIED IDEOGRAPH + {0x9A72, 0x6B73}, //4801 #CJK UNIFIED IDEOGRAPH + {0x9A73, 0x6B74}, //4802 #CJK UNIFIED IDEOGRAPH + {0x9A74, 0x6B75}, //4803 #CJK UNIFIED IDEOGRAPH + {0x9A75, 0x6B76}, //4804 #CJK UNIFIED IDEOGRAPH + {0x9A76, 0x6B77}, //4805 #CJK UNIFIED IDEOGRAPH + {0x9A77, 0x6B78}, //4806 #CJK UNIFIED IDEOGRAPH + {0x9A78, 0x6B7A}, //4807 #CJK UNIFIED IDEOGRAPH + {0x9A79, 0x6B7D}, //4808 #CJK UNIFIED IDEOGRAPH + {0x9A7A, 0x6B7E}, //4809 #CJK UNIFIED IDEOGRAPH + {0x9A7B, 0x6B7F}, //4810 #CJK UNIFIED IDEOGRAPH + {0x9A7C, 0x6B80}, //4811 #CJK UNIFIED IDEOGRAPH + {0x9A7D, 0x6B85}, //4812 #CJK UNIFIED IDEOGRAPH + {0x9A7E, 0x6B88}, //4813 #CJK UNIFIED IDEOGRAPH + {0x9A80, 0x6B8C}, //4814 #CJK UNIFIED IDEOGRAPH + {0x9A81, 0x6B8E}, //4815 #CJK UNIFIED IDEOGRAPH + {0x9A82, 0x6B8F}, //4816 #CJK UNIFIED IDEOGRAPH + {0x9A83, 0x6B90}, //4817 #CJK UNIFIED IDEOGRAPH + {0x9A84, 0x6B91}, //4818 #CJK UNIFIED IDEOGRAPH + {0x9A85, 0x6B94}, //4819 #CJK UNIFIED IDEOGRAPH + {0x9A86, 0x6B95}, //4820 #CJK UNIFIED IDEOGRAPH + {0x9A87, 0x6B97}, //4821 #CJK UNIFIED IDEOGRAPH + {0x9A88, 0x6B98}, //4822 #CJK UNIFIED IDEOGRAPH + {0x9A89, 0x6B99}, //4823 #CJK UNIFIED IDEOGRAPH + {0x9A8A, 0x6B9C}, //4824 #CJK UNIFIED IDEOGRAPH + {0x9A8B, 0x6B9D}, //4825 #CJK UNIFIED IDEOGRAPH + {0x9A8C, 0x6B9E}, //4826 #CJK UNIFIED IDEOGRAPH + {0x9A8D, 0x6B9F}, //4827 #CJK UNIFIED IDEOGRAPH + {0x9A8E, 0x6BA0}, //4828 #CJK UNIFIED IDEOGRAPH + {0x9A8F, 0x6BA2}, //4829 #CJK UNIFIED IDEOGRAPH + {0x9A90, 0x6BA3}, //4830 #CJK UNIFIED IDEOGRAPH + {0x9A91, 0x6BA4}, //4831 #CJK UNIFIED IDEOGRAPH + {0x9A92, 0x6BA5}, //4832 #CJK UNIFIED IDEOGRAPH + {0x9A93, 0x6BA6}, //4833 #CJK UNIFIED IDEOGRAPH + {0x9A94, 0x6BA7}, //4834 #CJK UNIFIED IDEOGRAPH + {0x9A95, 0x6BA8}, //4835 #CJK UNIFIED IDEOGRAPH + {0x9A96, 0x6BA9}, //4836 #CJK UNIFIED IDEOGRAPH + {0x9A97, 0x6BAB}, //4837 #CJK UNIFIED IDEOGRAPH + {0x9A98, 0x6BAC}, //4838 #CJK UNIFIED IDEOGRAPH + {0x9A99, 0x6BAD}, //4839 #CJK UNIFIED IDEOGRAPH + {0x9A9A, 0x6BAE}, //4840 #CJK UNIFIED IDEOGRAPH + {0x9A9B, 0x6BAF}, //4841 #CJK UNIFIED IDEOGRAPH + {0x9A9C, 0x6BB0}, //4842 #CJK UNIFIED IDEOGRAPH + {0x9A9D, 0x6BB1}, //4843 #CJK UNIFIED IDEOGRAPH + {0x9A9E, 0x6BB2}, //4844 #CJK UNIFIED IDEOGRAPH + {0x9A9F, 0x6BB6}, //4845 #CJK UNIFIED IDEOGRAPH + {0x9AA0, 0x6BB8}, //4846 #CJK UNIFIED IDEOGRAPH + {0x9AA1, 0x6BB9}, //4847 #CJK UNIFIED IDEOGRAPH + {0x9AA2, 0x6BBA}, //4848 #CJK UNIFIED IDEOGRAPH + {0x9AA3, 0x6BBB}, //4849 #CJK UNIFIED IDEOGRAPH + {0x9AA4, 0x6BBC}, //4850 #CJK UNIFIED IDEOGRAPH + {0x9AA5, 0x6BBD}, //4851 #CJK UNIFIED IDEOGRAPH + {0x9AA6, 0x6BBE}, //4852 #CJK UNIFIED IDEOGRAPH + {0x9AA7, 0x6BC0}, //4853 #CJK UNIFIED IDEOGRAPH + {0x9AA8, 0x6BC3}, //4854 #CJK UNIFIED IDEOGRAPH + {0x9AA9, 0x6BC4}, //4855 #CJK UNIFIED IDEOGRAPH + {0x9AAA, 0x6BC6}, //4856 #CJK UNIFIED IDEOGRAPH + {0x9AAB, 0x6BC7}, //4857 #CJK UNIFIED IDEOGRAPH + {0x9AAC, 0x6BC8}, //4858 #CJK UNIFIED IDEOGRAPH + {0x9AAD, 0x6BC9}, //4859 #CJK UNIFIED IDEOGRAPH + {0x9AAE, 0x6BCA}, //4860 #CJK UNIFIED IDEOGRAPH + {0x9AAF, 0x6BCC}, //4861 #CJK UNIFIED IDEOGRAPH + {0x9AB0, 0x6BCE}, //4862 #CJK UNIFIED IDEOGRAPH + {0x9AB1, 0x6BD0}, //4863 #CJK UNIFIED IDEOGRAPH + {0x9AB2, 0x6BD1}, //4864 #CJK UNIFIED IDEOGRAPH + {0x9AB3, 0x6BD8}, //4865 #CJK UNIFIED IDEOGRAPH + {0x9AB4, 0x6BDA}, //4866 #CJK UNIFIED IDEOGRAPH + {0x9AB5, 0x6BDC}, //4867 #CJK UNIFIED IDEOGRAPH + {0x9AB6, 0x6BDD}, //4868 #CJK UNIFIED IDEOGRAPH + {0x9AB7, 0x6BDE}, //4869 #CJK UNIFIED IDEOGRAPH + {0x9AB8, 0x6BDF}, //4870 #CJK UNIFIED IDEOGRAPH + {0x9AB9, 0x6BE0}, //4871 #CJK UNIFIED IDEOGRAPH + {0x9ABA, 0x6BE2}, //4872 #CJK UNIFIED IDEOGRAPH + {0x9ABB, 0x6BE3}, //4873 #CJK UNIFIED IDEOGRAPH + {0x9ABC, 0x6BE4}, //4874 #CJK UNIFIED IDEOGRAPH + {0x9ABD, 0x6BE5}, //4875 #CJK UNIFIED IDEOGRAPH + {0x9ABE, 0x6BE6}, //4876 #CJK UNIFIED IDEOGRAPH + {0x9ABF, 0x6BE7}, //4877 #CJK UNIFIED IDEOGRAPH + {0x9AC0, 0x6BE8}, //4878 #CJK UNIFIED IDEOGRAPH + {0x9AC1, 0x6BE9}, //4879 #CJK UNIFIED IDEOGRAPH + {0x9AC2, 0x6BEC}, //4880 #CJK UNIFIED IDEOGRAPH + {0x9AC3, 0x6BED}, //4881 #CJK UNIFIED IDEOGRAPH + {0x9AC4, 0x6BEE}, //4882 #CJK UNIFIED IDEOGRAPH + {0x9AC5, 0x6BF0}, //4883 #CJK UNIFIED IDEOGRAPH + {0x9AC6, 0x6BF1}, //4884 #CJK UNIFIED IDEOGRAPH + {0x9AC7, 0x6BF2}, //4885 #CJK UNIFIED IDEOGRAPH + {0x9AC8, 0x6BF4}, //4886 #CJK UNIFIED IDEOGRAPH + {0x9AC9, 0x6BF6}, //4887 #CJK UNIFIED IDEOGRAPH + {0x9ACA, 0x6BF7}, //4888 #CJK UNIFIED IDEOGRAPH + {0x9ACB, 0x6BF8}, //4889 #CJK UNIFIED IDEOGRAPH + {0x9ACC, 0x6BFA}, //4890 #CJK UNIFIED IDEOGRAPH + {0x9ACD, 0x6BFB}, //4891 #CJK UNIFIED IDEOGRAPH + {0x9ACE, 0x6BFC}, //4892 #CJK UNIFIED IDEOGRAPH + {0x9ACF, 0x6BFE}, //4893 #CJK UNIFIED IDEOGRAPH + {0x9AD0, 0x6BFF}, //4894 #CJK UNIFIED IDEOGRAPH + {0x9AD1, 0x6C00}, //4895 #CJK UNIFIED IDEOGRAPH + {0x9AD2, 0x6C01}, //4896 #CJK UNIFIED IDEOGRAPH + {0x9AD3, 0x6C02}, //4897 #CJK UNIFIED IDEOGRAPH + {0x9AD4, 0x6C03}, //4898 #CJK UNIFIED IDEOGRAPH + {0x9AD5, 0x6C04}, //4899 #CJK UNIFIED IDEOGRAPH + {0x9AD6, 0x6C08}, //4900 #CJK UNIFIED IDEOGRAPH + {0x9AD7, 0x6C09}, //4901 #CJK UNIFIED IDEOGRAPH + {0x9AD8, 0x6C0A}, //4902 #CJK UNIFIED IDEOGRAPH + {0x9AD9, 0x6C0B}, //4903 #CJK UNIFIED IDEOGRAPH + {0x9ADA, 0x6C0C}, //4904 #CJK UNIFIED IDEOGRAPH + {0x9ADB, 0x6C0E}, //4905 #CJK UNIFIED IDEOGRAPH + {0x9ADC, 0x6C12}, //4906 #CJK UNIFIED IDEOGRAPH + {0x9ADD, 0x6C17}, //4907 #CJK UNIFIED IDEOGRAPH + {0x9ADE, 0x6C1C}, //4908 #CJK UNIFIED IDEOGRAPH + {0x9ADF, 0x6C1D}, //4909 #CJK UNIFIED IDEOGRAPH + {0x9AE0, 0x6C1E}, //4910 #CJK UNIFIED IDEOGRAPH + {0x9AE1, 0x6C20}, //4911 #CJK UNIFIED IDEOGRAPH + {0x9AE2, 0x6C23}, //4912 #CJK UNIFIED IDEOGRAPH + {0x9AE3, 0x6C25}, //4913 #CJK UNIFIED IDEOGRAPH + {0x9AE4, 0x6C2B}, //4914 #CJK UNIFIED IDEOGRAPH + {0x9AE5, 0x6C2C}, //4915 #CJK UNIFIED IDEOGRAPH + {0x9AE6, 0x6C2D}, //4916 #CJK UNIFIED IDEOGRAPH + {0x9AE7, 0x6C31}, //4917 #CJK UNIFIED IDEOGRAPH + {0x9AE8, 0x6C33}, //4918 #CJK UNIFIED IDEOGRAPH + {0x9AE9, 0x6C36}, //4919 #CJK UNIFIED IDEOGRAPH + {0x9AEA, 0x6C37}, //4920 #CJK UNIFIED IDEOGRAPH + {0x9AEB, 0x6C39}, //4921 #CJK UNIFIED IDEOGRAPH + {0x9AEC, 0x6C3A}, //4922 #CJK UNIFIED IDEOGRAPH + {0x9AED, 0x6C3B}, //4923 #CJK UNIFIED IDEOGRAPH + {0x9AEE, 0x6C3C}, //4924 #CJK UNIFIED IDEOGRAPH + {0x9AEF, 0x6C3E}, //4925 #CJK UNIFIED IDEOGRAPH + {0x9AF0, 0x6C3F}, //4926 #CJK UNIFIED IDEOGRAPH + {0x9AF1, 0x6C43}, //4927 #CJK UNIFIED IDEOGRAPH + {0x9AF2, 0x6C44}, //4928 #CJK UNIFIED IDEOGRAPH + {0x9AF3, 0x6C45}, //4929 #CJK UNIFIED IDEOGRAPH + {0x9AF4, 0x6C48}, //4930 #CJK UNIFIED IDEOGRAPH + {0x9AF5, 0x6C4B}, //4931 #CJK UNIFIED IDEOGRAPH + {0x9AF6, 0x6C4C}, //4932 #CJK UNIFIED IDEOGRAPH + {0x9AF7, 0x6C4D}, //4933 #CJK UNIFIED IDEOGRAPH + {0x9AF8, 0x6C4E}, //4934 #CJK UNIFIED IDEOGRAPH + {0x9AF9, 0x6C4F}, //4935 #CJK UNIFIED IDEOGRAPH + {0x9AFA, 0x6C51}, //4936 #CJK UNIFIED IDEOGRAPH + {0x9AFB, 0x6C52}, //4937 #CJK UNIFIED IDEOGRAPH + {0x9AFC, 0x6C53}, //4938 #CJK UNIFIED IDEOGRAPH + {0x9AFD, 0x6C56}, //4939 #CJK UNIFIED IDEOGRAPH + {0x9AFE, 0x6C58}, //4940 #CJK UNIFIED IDEOGRAPH + {0x9B40, 0x6C59}, //4941 #CJK UNIFIED IDEOGRAPH + {0x9B41, 0x6C5A}, //4942 #CJK UNIFIED IDEOGRAPH + {0x9B42, 0x6C62}, //4943 #CJK UNIFIED IDEOGRAPH + {0x9B43, 0x6C63}, //4944 #CJK UNIFIED IDEOGRAPH + {0x9B44, 0x6C65}, //4945 #CJK UNIFIED IDEOGRAPH + {0x9B45, 0x6C66}, //4946 #CJK UNIFIED IDEOGRAPH + {0x9B46, 0x6C67}, //4947 #CJK UNIFIED IDEOGRAPH + {0x9B47, 0x6C6B}, //4948 #CJK UNIFIED IDEOGRAPH + {0x9B48, 0x6C6C}, //4949 #CJK UNIFIED IDEOGRAPH + {0x9B49, 0x6C6D}, //4950 #CJK UNIFIED IDEOGRAPH + {0x9B4A, 0x6C6E}, //4951 #CJK UNIFIED IDEOGRAPH + {0x9B4B, 0x6C6F}, //4952 #CJK UNIFIED IDEOGRAPH + {0x9B4C, 0x6C71}, //4953 #CJK UNIFIED IDEOGRAPH + {0x9B4D, 0x6C73}, //4954 #CJK UNIFIED IDEOGRAPH + {0x9B4E, 0x6C75}, //4955 #CJK UNIFIED IDEOGRAPH + {0x9B4F, 0x6C77}, //4956 #CJK UNIFIED IDEOGRAPH + {0x9B50, 0x6C78}, //4957 #CJK UNIFIED IDEOGRAPH + {0x9B51, 0x6C7A}, //4958 #CJK UNIFIED IDEOGRAPH + {0x9B52, 0x6C7B}, //4959 #CJK UNIFIED IDEOGRAPH + {0x9B53, 0x6C7C}, //4960 #CJK UNIFIED IDEOGRAPH + {0x9B54, 0x6C7F}, //4961 #CJK UNIFIED IDEOGRAPH + {0x9B55, 0x6C80}, //4962 #CJK UNIFIED IDEOGRAPH + {0x9B56, 0x6C84}, //4963 #CJK UNIFIED IDEOGRAPH + {0x9B57, 0x6C87}, //4964 #CJK UNIFIED IDEOGRAPH + {0x9B58, 0x6C8A}, //4965 #CJK UNIFIED IDEOGRAPH + {0x9B59, 0x6C8B}, //4966 #CJK UNIFIED IDEOGRAPH + {0x9B5A, 0x6C8D}, //4967 #CJK UNIFIED IDEOGRAPH + {0x9B5B, 0x6C8E}, //4968 #CJK UNIFIED IDEOGRAPH + {0x9B5C, 0x6C91}, //4969 #CJK UNIFIED IDEOGRAPH + {0x9B5D, 0x6C92}, //4970 #CJK UNIFIED IDEOGRAPH + {0x9B5E, 0x6C95}, //4971 #CJK UNIFIED IDEOGRAPH + {0x9B5F, 0x6C96}, //4972 #CJK UNIFIED IDEOGRAPH + {0x9B60, 0x6C97}, //4973 #CJK UNIFIED IDEOGRAPH + {0x9B61, 0x6C98}, //4974 #CJK UNIFIED IDEOGRAPH + {0x9B62, 0x6C9A}, //4975 #CJK UNIFIED IDEOGRAPH + {0x9B63, 0x6C9C}, //4976 #CJK UNIFIED IDEOGRAPH + {0x9B64, 0x6C9D}, //4977 #CJK UNIFIED IDEOGRAPH + {0x9B65, 0x6C9E}, //4978 #CJK UNIFIED IDEOGRAPH + {0x9B66, 0x6CA0}, //4979 #CJK UNIFIED IDEOGRAPH + {0x9B67, 0x6CA2}, //4980 #CJK UNIFIED IDEOGRAPH + {0x9B68, 0x6CA8}, //4981 #CJK UNIFIED IDEOGRAPH + {0x9B69, 0x6CAC}, //4982 #CJK UNIFIED IDEOGRAPH + {0x9B6A, 0x6CAF}, //4983 #CJK UNIFIED IDEOGRAPH + {0x9B6B, 0x6CB0}, //4984 #CJK UNIFIED IDEOGRAPH + {0x9B6C, 0x6CB4}, //4985 #CJK UNIFIED IDEOGRAPH + {0x9B6D, 0x6CB5}, //4986 #CJK UNIFIED IDEOGRAPH + {0x9B6E, 0x6CB6}, //4987 #CJK UNIFIED IDEOGRAPH + {0x9B6F, 0x6CB7}, //4988 #CJK UNIFIED IDEOGRAPH + {0x9B70, 0x6CBA}, //4989 #CJK UNIFIED IDEOGRAPH + {0x9B71, 0x6CC0}, //4990 #CJK UNIFIED IDEOGRAPH + {0x9B72, 0x6CC1}, //4991 #CJK UNIFIED IDEOGRAPH + {0x9B73, 0x6CC2}, //4992 #CJK UNIFIED IDEOGRAPH + {0x9B74, 0x6CC3}, //4993 #CJK UNIFIED IDEOGRAPH + {0x9B75, 0x6CC6}, //4994 #CJK UNIFIED IDEOGRAPH + {0x9B76, 0x6CC7}, //4995 #CJK UNIFIED IDEOGRAPH + {0x9B77, 0x6CC8}, //4996 #CJK UNIFIED IDEOGRAPH + {0x9B78, 0x6CCB}, //4997 #CJK UNIFIED IDEOGRAPH + {0x9B79, 0x6CCD}, //4998 #CJK UNIFIED IDEOGRAPH + {0x9B7A, 0x6CCE}, //4999 #CJK UNIFIED IDEOGRAPH + {0x9B7B, 0x6CCF}, //5000 #CJK UNIFIED IDEOGRAPH + {0x9B7C, 0x6CD1}, //5001 #CJK UNIFIED IDEOGRAPH + {0x9B7D, 0x6CD2}, //5002 #CJK UNIFIED IDEOGRAPH + {0x9B7E, 0x6CD8}, //5003 #CJK UNIFIED IDEOGRAPH + {0x9B80, 0x6CD9}, //5004 #CJK UNIFIED IDEOGRAPH + {0x9B81, 0x6CDA}, //5005 #CJK UNIFIED IDEOGRAPH + {0x9B82, 0x6CDC}, //5006 #CJK UNIFIED IDEOGRAPH + {0x9B83, 0x6CDD}, //5007 #CJK UNIFIED IDEOGRAPH + {0x9B84, 0x6CDF}, //5008 #CJK UNIFIED IDEOGRAPH + {0x9B85, 0x6CE4}, //5009 #CJK UNIFIED IDEOGRAPH + {0x9B86, 0x6CE6}, //5010 #CJK UNIFIED IDEOGRAPH + {0x9B87, 0x6CE7}, //5011 #CJK UNIFIED IDEOGRAPH + {0x9B88, 0x6CE9}, //5012 #CJK UNIFIED IDEOGRAPH + {0x9B89, 0x6CEC}, //5013 #CJK UNIFIED IDEOGRAPH + {0x9B8A, 0x6CED}, //5014 #CJK UNIFIED IDEOGRAPH + {0x9B8B, 0x6CF2}, //5015 #CJK UNIFIED IDEOGRAPH + {0x9B8C, 0x6CF4}, //5016 #CJK UNIFIED IDEOGRAPH + {0x9B8D, 0x6CF9}, //5017 #CJK UNIFIED IDEOGRAPH + {0x9B8E, 0x6CFF}, //5018 #CJK UNIFIED IDEOGRAPH + {0x9B8F, 0x6D00}, //5019 #CJK UNIFIED IDEOGRAPH + {0x9B90, 0x6D02}, //5020 #CJK UNIFIED IDEOGRAPH + {0x9B91, 0x6D03}, //5021 #CJK UNIFIED IDEOGRAPH + {0x9B92, 0x6D05}, //5022 #CJK UNIFIED IDEOGRAPH + {0x9B93, 0x6D06}, //5023 #CJK UNIFIED IDEOGRAPH + {0x9B94, 0x6D08}, //5024 #CJK UNIFIED IDEOGRAPH + {0x9B95, 0x6D09}, //5025 #CJK UNIFIED IDEOGRAPH + {0x9B96, 0x6D0A}, //5026 #CJK UNIFIED IDEOGRAPH + {0x9B97, 0x6D0D}, //5027 #CJK UNIFIED IDEOGRAPH + {0x9B98, 0x6D0F}, //5028 #CJK UNIFIED IDEOGRAPH + {0x9B99, 0x6D10}, //5029 #CJK UNIFIED IDEOGRAPH + {0x9B9A, 0x6D11}, //5030 #CJK UNIFIED IDEOGRAPH + {0x9B9B, 0x6D13}, //5031 #CJK UNIFIED IDEOGRAPH + {0x9B9C, 0x6D14}, //5032 #CJK UNIFIED IDEOGRAPH + {0x9B9D, 0x6D15}, //5033 #CJK UNIFIED IDEOGRAPH + {0x9B9E, 0x6D16}, //5034 #CJK UNIFIED IDEOGRAPH + {0x9B9F, 0x6D18}, //5035 #CJK UNIFIED IDEOGRAPH + {0x9BA0, 0x6D1C}, //5036 #CJK UNIFIED IDEOGRAPH + {0x9BA1, 0x6D1D}, //5037 #CJK UNIFIED IDEOGRAPH + {0x9BA2, 0x6D1F}, //5038 #CJK UNIFIED IDEOGRAPH + {0x9BA3, 0x6D20}, //5039 #CJK UNIFIED IDEOGRAPH + {0x9BA4, 0x6D21}, //5040 #CJK UNIFIED IDEOGRAPH + {0x9BA5, 0x6D22}, //5041 #CJK UNIFIED IDEOGRAPH + {0x9BA6, 0x6D23}, //5042 #CJK UNIFIED IDEOGRAPH + {0x9BA7, 0x6D24}, //5043 #CJK UNIFIED IDEOGRAPH + {0x9BA8, 0x6D26}, //5044 #CJK UNIFIED IDEOGRAPH + {0x9BA9, 0x6D28}, //5045 #CJK UNIFIED IDEOGRAPH + {0x9BAA, 0x6D29}, //5046 #CJK UNIFIED IDEOGRAPH + {0x9BAB, 0x6D2C}, //5047 #CJK UNIFIED IDEOGRAPH + {0x9BAC, 0x6D2D}, //5048 #CJK UNIFIED IDEOGRAPH + {0x9BAD, 0x6D2F}, //5049 #CJK UNIFIED IDEOGRAPH + {0x9BAE, 0x6D30}, //5050 #CJK UNIFIED IDEOGRAPH + {0x9BAF, 0x6D34}, //5051 #CJK UNIFIED IDEOGRAPH + {0x9BB0, 0x6D36}, //5052 #CJK UNIFIED IDEOGRAPH + {0x9BB1, 0x6D37}, //5053 #CJK UNIFIED IDEOGRAPH + {0x9BB2, 0x6D38}, //5054 #CJK UNIFIED IDEOGRAPH + {0x9BB3, 0x6D3A}, //5055 #CJK UNIFIED IDEOGRAPH + {0x9BB4, 0x6D3F}, //5056 #CJK UNIFIED IDEOGRAPH + {0x9BB5, 0x6D40}, //5057 #CJK UNIFIED IDEOGRAPH + {0x9BB6, 0x6D42}, //5058 #CJK UNIFIED IDEOGRAPH + {0x9BB7, 0x6D44}, //5059 #CJK UNIFIED IDEOGRAPH + {0x9BB8, 0x6D49}, //5060 #CJK UNIFIED IDEOGRAPH + {0x9BB9, 0x6D4C}, //5061 #CJK UNIFIED IDEOGRAPH + {0x9BBA, 0x6D50}, //5062 #CJK UNIFIED IDEOGRAPH + {0x9BBB, 0x6D55}, //5063 #CJK UNIFIED IDEOGRAPH + {0x9BBC, 0x6D56}, //5064 #CJK UNIFIED IDEOGRAPH + {0x9BBD, 0x6D57}, //5065 #CJK UNIFIED IDEOGRAPH + {0x9BBE, 0x6D58}, //5066 #CJK UNIFIED IDEOGRAPH + {0x9BBF, 0x6D5B}, //5067 #CJK UNIFIED IDEOGRAPH + {0x9BC0, 0x6D5D}, //5068 #CJK UNIFIED IDEOGRAPH + {0x9BC1, 0x6D5F}, //5069 #CJK UNIFIED IDEOGRAPH + {0x9BC2, 0x6D61}, //5070 #CJK UNIFIED IDEOGRAPH + {0x9BC3, 0x6D62}, //5071 #CJK UNIFIED IDEOGRAPH + {0x9BC4, 0x6D64}, //5072 #CJK UNIFIED IDEOGRAPH + {0x9BC5, 0x6D65}, //5073 #CJK UNIFIED IDEOGRAPH + {0x9BC6, 0x6D67}, //5074 #CJK UNIFIED IDEOGRAPH + {0x9BC7, 0x6D68}, //5075 #CJK UNIFIED IDEOGRAPH + {0x9BC8, 0x6D6B}, //5076 #CJK UNIFIED IDEOGRAPH + {0x9BC9, 0x6D6C}, //5077 #CJK UNIFIED IDEOGRAPH + {0x9BCA, 0x6D6D}, //5078 #CJK UNIFIED IDEOGRAPH + {0x9BCB, 0x6D70}, //5079 #CJK UNIFIED IDEOGRAPH + {0x9BCC, 0x6D71}, //5080 #CJK UNIFIED IDEOGRAPH + {0x9BCD, 0x6D72}, //5081 #CJK UNIFIED IDEOGRAPH + {0x9BCE, 0x6D73}, //5082 #CJK UNIFIED IDEOGRAPH + {0x9BCF, 0x6D75}, //5083 #CJK UNIFIED IDEOGRAPH + {0x9BD0, 0x6D76}, //5084 #CJK UNIFIED IDEOGRAPH + {0x9BD1, 0x6D79}, //5085 #CJK UNIFIED IDEOGRAPH + {0x9BD2, 0x6D7A}, //5086 #CJK UNIFIED IDEOGRAPH + {0x9BD3, 0x6D7B}, //5087 #CJK UNIFIED IDEOGRAPH + {0x9BD4, 0x6D7D}, //5088 #CJK UNIFIED IDEOGRAPH + {0x9BD5, 0x6D7E}, //5089 #CJK UNIFIED IDEOGRAPH + {0x9BD6, 0x6D7F}, //5090 #CJK UNIFIED IDEOGRAPH + {0x9BD7, 0x6D80}, //5091 #CJK UNIFIED IDEOGRAPH + {0x9BD8, 0x6D81}, //5092 #CJK UNIFIED IDEOGRAPH + {0x9BD9, 0x6D83}, //5093 #CJK UNIFIED IDEOGRAPH + {0x9BDA, 0x6D84}, //5094 #CJK UNIFIED IDEOGRAPH + {0x9BDB, 0x6D86}, //5095 #CJK UNIFIED IDEOGRAPH + {0x9BDC, 0x6D87}, //5096 #CJK UNIFIED IDEOGRAPH + {0x9BDD, 0x6D8A}, //5097 #CJK UNIFIED IDEOGRAPH + {0x9BDE, 0x6D8B}, //5098 #CJK UNIFIED IDEOGRAPH + {0x9BDF, 0x6D8D}, //5099 #CJK UNIFIED IDEOGRAPH + {0x9BE0, 0x6D8F}, //5100 #CJK UNIFIED IDEOGRAPH + {0x9BE1, 0x6D90}, //5101 #CJK UNIFIED IDEOGRAPH + {0x9BE2, 0x6D92}, //5102 #CJK UNIFIED IDEOGRAPH + {0x9BE3, 0x6D96}, //5103 #CJK UNIFIED IDEOGRAPH + {0x9BE4, 0x6D97}, //5104 #CJK UNIFIED IDEOGRAPH + {0x9BE5, 0x6D98}, //5105 #CJK UNIFIED IDEOGRAPH + {0x9BE6, 0x6D99}, //5106 #CJK UNIFIED IDEOGRAPH + {0x9BE7, 0x6D9A}, //5107 #CJK UNIFIED IDEOGRAPH + {0x9BE8, 0x6D9C}, //5108 #CJK UNIFIED IDEOGRAPH + {0x9BE9, 0x6DA2}, //5109 #CJK UNIFIED IDEOGRAPH + {0x9BEA, 0x6DA5}, //5110 #CJK UNIFIED IDEOGRAPH + {0x9BEB, 0x6DAC}, //5111 #CJK UNIFIED IDEOGRAPH + {0x9BEC, 0x6DAD}, //5112 #CJK UNIFIED IDEOGRAPH + {0x9BED, 0x6DB0}, //5113 #CJK UNIFIED IDEOGRAPH + {0x9BEE, 0x6DB1}, //5114 #CJK UNIFIED IDEOGRAPH + {0x9BEF, 0x6DB3}, //5115 #CJK UNIFIED IDEOGRAPH + {0x9BF0, 0x6DB4}, //5116 #CJK UNIFIED IDEOGRAPH + {0x9BF1, 0x6DB6}, //5117 #CJK UNIFIED IDEOGRAPH + {0x9BF2, 0x6DB7}, //5118 #CJK UNIFIED IDEOGRAPH + {0x9BF3, 0x6DB9}, //5119 #CJK UNIFIED IDEOGRAPH + {0x9BF4, 0x6DBA}, //5120 #CJK UNIFIED IDEOGRAPH + {0x9BF5, 0x6DBB}, //5121 #CJK UNIFIED IDEOGRAPH + {0x9BF6, 0x6DBC}, //5122 #CJK UNIFIED IDEOGRAPH + {0x9BF7, 0x6DBD}, //5123 #CJK UNIFIED IDEOGRAPH + {0x9BF8, 0x6DBE}, //5124 #CJK UNIFIED IDEOGRAPH + {0x9BF9, 0x6DC1}, //5125 #CJK UNIFIED IDEOGRAPH + {0x9BFA, 0x6DC2}, //5126 #CJK UNIFIED IDEOGRAPH + {0x9BFB, 0x6DC3}, //5127 #CJK UNIFIED IDEOGRAPH + {0x9BFC, 0x6DC8}, //5128 #CJK UNIFIED IDEOGRAPH + {0x9BFD, 0x6DC9}, //5129 #CJK UNIFIED IDEOGRAPH + {0x9BFE, 0x6DCA}, //5130 #CJK UNIFIED IDEOGRAPH + {0x9C40, 0x6DCD}, //5131 #CJK UNIFIED IDEOGRAPH + {0x9C41, 0x6DCE}, //5132 #CJK UNIFIED IDEOGRAPH + {0x9C42, 0x6DCF}, //5133 #CJK UNIFIED IDEOGRAPH + {0x9C43, 0x6DD0}, //5134 #CJK UNIFIED IDEOGRAPH + {0x9C44, 0x6DD2}, //5135 #CJK UNIFIED IDEOGRAPH + {0x9C45, 0x6DD3}, //5136 #CJK UNIFIED IDEOGRAPH + {0x9C46, 0x6DD4}, //5137 #CJK UNIFIED IDEOGRAPH + {0x9C47, 0x6DD5}, //5138 #CJK UNIFIED IDEOGRAPH + {0x9C48, 0x6DD7}, //5139 #CJK UNIFIED IDEOGRAPH + {0x9C49, 0x6DDA}, //5140 #CJK UNIFIED IDEOGRAPH + {0x9C4A, 0x6DDB}, //5141 #CJK UNIFIED IDEOGRAPH + {0x9C4B, 0x6DDC}, //5142 #CJK UNIFIED IDEOGRAPH + {0x9C4C, 0x6DDF}, //5143 #CJK UNIFIED IDEOGRAPH + {0x9C4D, 0x6DE2}, //5144 #CJK UNIFIED IDEOGRAPH + {0x9C4E, 0x6DE3}, //5145 #CJK UNIFIED IDEOGRAPH + {0x9C4F, 0x6DE5}, //5146 #CJK UNIFIED IDEOGRAPH + {0x9C50, 0x6DE7}, //5147 #CJK UNIFIED IDEOGRAPH + {0x9C51, 0x6DE8}, //5148 #CJK UNIFIED IDEOGRAPH + {0x9C52, 0x6DE9}, //5149 #CJK UNIFIED IDEOGRAPH + {0x9C53, 0x6DEA}, //5150 #CJK UNIFIED IDEOGRAPH + {0x9C54, 0x6DED}, //5151 #CJK UNIFIED IDEOGRAPH + {0x9C55, 0x6DEF}, //5152 #CJK UNIFIED IDEOGRAPH + {0x9C56, 0x6DF0}, //5153 #CJK UNIFIED IDEOGRAPH + {0x9C57, 0x6DF2}, //5154 #CJK UNIFIED IDEOGRAPH + {0x9C58, 0x6DF4}, //5155 #CJK UNIFIED IDEOGRAPH + {0x9C59, 0x6DF5}, //5156 #CJK UNIFIED IDEOGRAPH + {0x9C5A, 0x6DF6}, //5157 #CJK UNIFIED IDEOGRAPH + {0x9C5B, 0x6DF8}, //5158 #CJK UNIFIED IDEOGRAPH + {0x9C5C, 0x6DFA}, //5159 #CJK UNIFIED IDEOGRAPH + {0x9C5D, 0x6DFD}, //5160 #CJK UNIFIED IDEOGRAPH + {0x9C5E, 0x6DFE}, //5161 #CJK UNIFIED IDEOGRAPH + {0x9C5F, 0x6DFF}, //5162 #CJK UNIFIED IDEOGRAPH + {0x9C60, 0x6E00}, //5163 #CJK UNIFIED IDEOGRAPH + {0x9C61, 0x6E01}, //5164 #CJK UNIFIED IDEOGRAPH + {0x9C62, 0x6E02}, //5165 #CJK UNIFIED IDEOGRAPH + {0x9C63, 0x6E03}, //5166 #CJK UNIFIED IDEOGRAPH + {0x9C64, 0x6E04}, //5167 #CJK UNIFIED IDEOGRAPH + {0x9C65, 0x6E06}, //5168 #CJK UNIFIED IDEOGRAPH + {0x9C66, 0x6E07}, //5169 #CJK UNIFIED IDEOGRAPH + {0x9C67, 0x6E08}, //5170 #CJK UNIFIED IDEOGRAPH + {0x9C68, 0x6E09}, //5171 #CJK UNIFIED IDEOGRAPH + {0x9C69, 0x6E0B}, //5172 #CJK UNIFIED IDEOGRAPH + {0x9C6A, 0x6E0F}, //5173 #CJK UNIFIED IDEOGRAPH + {0x9C6B, 0x6E12}, //5174 #CJK UNIFIED IDEOGRAPH + {0x9C6C, 0x6E13}, //5175 #CJK UNIFIED IDEOGRAPH + {0x9C6D, 0x6E15}, //5176 #CJK UNIFIED IDEOGRAPH + {0x9C6E, 0x6E18}, //5177 #CJK UNIFIED IDEOGRAPH + {0x9C6F, 0x6E19}, //5178 #CJK UNIFIED IDEOGRAPH + {0x9C70, 0x6E1B}, //5179 #CJK UNIFIED IDEOGRAPH + {0x9C71, 0x6E1C}, //5180 #CJK UNIFIED IDEOGRAPH + {0x9C72, 0x6E1E}, //5181 #CJK UNIFIED IDEOGRAPH + {0x9C73, 0x6E1F}, //5182 #CJK UNIFIED IDEOGRAPH + {0x9C74, 0x6E22}, //5183 #CJK UNIFIED IDEOGRAPH + {0x9C75, 0x6E26}, //5184 #CJK UNIFIED IDEOGRAPH + {0x9C76, 0x6E27}, //5185 #CJK UNIFIED IDEOGRAPH + {0x9C77, 0x6E28}, //5186 #CJK UNIFIED IDEOGRAPH + {0x9C78, 0x6E2A}, //5187 #CJK UNIFIED IDEOGRAPH + {0x9C79, 0x6E2C}, //5188 #CJK UNIFIED IDEOGRAPH + {0x9C7A, 0x6E2E}, //5189 #CJK UNIFIED IDEOGRAPH + {0x9C7B, 0x6E30}, //5190 #CJK UNIFIED IDEOGRAPH + {0x9C7C, 0x6E31}, //5191 #CJK UNIFIED IDEOGRAPH + {0x9C7D, 0x6E33}, //5192 #CJK UNIFIED IDEOGRAPH + {0x9C7E, 0x6E35}, //5193 #CJK UNIFIED IDEOGRAPH + {0x9C80, 0x6E36}, //5194 #CJK UNIFIED IDEOGRAPH + {0x9C81, 0x6E37}, //5195 #CJK UNIFIED IDEOGRAPH + {0x9C82, 0x6E39}, //5196 #CJK UNIFIED IDEOGRAPH + {0x9C83, 0x6E3B}, //5197 #CJK UNIFIED IDEOGRAPH + {0x9C84, 0x6E3C}, //5198 #CJK UNIFIED IDEOGRAPH + {0x9C85, 0x6E3D}, //5199 #CJK UNIFIED IDEOGRAPH + {0x9C86, 0x6E3E}, //5200 #CJK UNIFIED IDEOGRAPH + {0x9C87, 0x6E3F}, //5201 #CJK UNIFIED IDEOGRAPH + {0x9C88, 0x6E40}, //5202 #CJK UNIFIED IDEOGRAPH + {0x9C89, 0x6E41}, //5203 #CJK UNIFIED IDEOGRAPH + {0x9C8A, 0x6E42}, //5204 #CJK UNIFIED IDEOGRAPH + {0x9C8B, 0x6E45}, //5205 #CJK UNIFIED IDEOGRAPH + {0x9C8C, 0x6E46}, //5206 #CJK UNIFIED IDEOGRAPH + {0x9C8D, 0x6E47}, //5207 #CJK UNIFIED IDEOGRAPH + {0x9C8E, 0x6E48}, //5208 #CJK UNIFIED IDEOGRAPH + {0x9C8F, 0x6E49}, //5209 #CJK UNIFIED IDEOGRAPH + {0x9C90, 0x6E4A}, //5210 #CJK UNIFIED IDEOGRAPH + {0x9C91, 0x6E4B}, //5211 #CJK UNIFIED IDEOGRAPH + {0x9C92, 0x6E4C}, //5212 #CJK UNIFIED IDEOGRAPH + {0x9C93, 0x6E4F}, //5213 #CJK UNIFIED IDEOGRAPH + {0x9C94, 0x6E50}, //5214 #CJK UNIFIED IDEOGRAPH + {0x9C95, 0x6E51}, //5215 #CJK UNIFIED IDEOGRAPH + {0x9C96, 0x6E52}, //5216 #CJK UNIFIED IDEOGRAPH + {0x9C97, 0x6E55}, //5217 #CJK UNIFIED IDEOGRAPH + {0x9C98, 0x6E57}, //5218 #CJK UNIFIED IDEOGRAPH + {0x9C99, 0x6E59}, //5219 #CJK UNIFIED IDEOGRAPH + {0x9C9A, 0x6E5A}, //5220 #CJK UNIFIED IDEOGRAPH + {0x9C9B, 0x6E5C}, //5221 #CJK UNIFIED IDEOGRAPH + {0x9C9C, 0x6E5D}, //5222 #CJK UNIFIED IDEOGRAPH + {0x9C9D, 0x6E5E}, //5223 #CJK UNIFIED IDEOGRAPH + {0x9C9E, 0x6E60}, //5224 #CJK UNIFIED IDEOGRAPH + {0x9C9F, 0x6E61}, //5225 #CJK UNIFIED IDEOGRAPH + {0x9CA0, 0x6E62}, //5226 #CJK UNIFIED IDEOGRAPH + {0x9CA1, 0x6E63}, //5227 #CJK UNIFIED IDEOGRAPH + {0x9CA2, 0x6E64}, //5228 #CJK UNIFIED IDEOGRAPH + {0x9CA3, 0x6E65}, //5229 #CJK UNIFIED IDEOGRAPH + {0x9CA4, 0x6E66}, //5230 #CJK UNIFIED IDEOGRAPH + {0x9CA5, 0x6E67}, //5231 #CJK UNIFIED IDEOGRAPH + {0x9CA6, 0x6E68}, //5232 #CJK UNIFIED IDEOGRAPH + {0x9CA7, 0x6E69}, //5233 #CJK UNIFIED IDEOGRAPH + {0x9CA8, 0x6E6A}, //5234 #CJK UNIFIED IDEOGRAPH + {0x9CA9, 0x6E6C}, //5235 #CJK UNIFIED IDEOGRAPH + {0x9CAA, 0x6E6D}, //5236 #CJK UNIFIED IDEOGRAPH + {0x9CAB, 0x6E6F}, //5237 #CJK UNIFIED IDEOGRAPH + {0x9CAC, 0x6E70}, //5238 #CJK UNIFIED IDEOGRAPH + {0x9CAD, 0x6E71}, //5239 #CJK UNIFIED IDEOGRAPH + {0x9CAE, 0x6E72}, //5240 #CJK UNIFIED IDEOGRAPH + {0x9CAF, 0x6E73}, //5241 #CJK UNIFIED IDEOGRAPH + {0x9CB0, 0x6E74}, //5242 #CJK UNIFIED IDEOGRAPH + {0x9CB1, 0x6E75}, //5243 #CJK UNIFIED IDEOGRAPH + {0x9CB2, 0x6E76}, //5244 #CJK UNIFIED IDEOGRAPH + {0x9CB3, 0x6E77}, //5245 #CJK UNIFIED IDEOGRAPH + {0x9CB4, 0x6E78}, //5246 #CJK UNIFIED IDEOGRAPH + {0x9CB5, 0x6E79}, //5247 #CJK UNIFIED IDEOGRAPH + {0x9CB6, 0x6E7A}, //5248 #CJK UNIFIED IDEOGRAPH + {0x9CB7, 0x6E7B}, //5249 #CJK UNIFIED IDEOGRAPH + {0x9CB8, 0x6E7C}, //5250 #CJK UNIFIED IDEOGRAPH + {0x9CB9, 0x6E7D}, //5251 #CJK UNIFIED IDEOGRAPH + {0x9CBA, 0x6E80}, //5252 #CJK UNIFIED IDEOGRAPH + {0x9CBB, 0x6E81}, //5253 #CJK UNIFIED IDEOGRAPH + {0x9CBC, 0x6E82}, //5254 #CJK UNIFIED IDEOGRAPH + {0x9CBD, 0x6E84}, //5255 #CJK UNIFIED IDEOGRAPH + {0x9CBE, 0x6E87}, //5256 #CJK UNIFIED IDEOGRAPH + {0x9CBF, 0x6E88}, //5257 #CJK UNIFIED IDEOGRAPH + {0x9CC0, 0x6E8A}, //5258 #CJK UNIFIED IDEOGRAPH + {0x9CC1, 0x6E8B}, //5259 #CJK UNIFIED IDEOGRAPH + {0x9CC2, 0x6E8C}, //5260 #CJK UNIFIED IDEOGRAPH + {0x9CC3, 0x6E8D}, //5261 #CJK UNIFIED IDEOGRAPH + {0x9CC4, 0x6E8E}, //5262 #CJK UNIFIED IDEOGRAPH + {0x9CC5, 0x6E91}, //5263 #CJK UNIFIED IDEOGRAPH + {0x9CC6, 0x6E92}, //5264 #CJK UNIFIED IDEOGRAPH + {0x9CC7, 0x6E93}, //5265 #CJK UNIFIED IDEOGRAPH + {0x9CC8, 0x6E94}, //5266 #CJK UNIFIED IDEOGRAPH + {0x9CC9, 0x6E95}, //5267 #CJK UNIFIED IDEOGRAPH + {0x9CCA, 0x6E96}, //5268 #CJK UNIFIED IDEOGRAPH + {0x9CCB, 0x6E97}, //5269 #CJK UNIFIED IDEOGRAPH + {0x9CCC, 0x6E99}, //5270 #CJK UNIFIED IDEOGRAPH + {0x9CCD, 0x6E9A}, //5271 #CJK UNIFIED IDEOGRAPH + {0x9CCE, 0x6E9B}, //5272 #CJK UNIFIED IDEOGRAPH + {0x9CCF, 0x6E9D}, //5273 #CJK UNIFIED IDEOGRAPH + {0x9CD0, 0x6E9E}, //5274 #CJK UNIFIED IDEOGRAPH + {0x9CD1, 0x6EA0}, //5275 #CJK UNIFIED IDEOGRAPH + {0x9CD2, 0x6EA1}, //5276 #CJK UNIFIED IDEOGRAPH + {0x9CD3, 0x6EA3}, //5277 #CJK UNIFIED IDEOGRAPH + {0x9CD4, 0x6EA4}, //5278 #CJK UNIFIED IDEOGRAPH + {0x9CD5, 0x6EA6}, //5279 #CJK UNIFIED IDEOGRAPH + {0x9CD6, 0x6EA8}, //5280 #CJK UNIFIED IDEOGRAPH + {0x9CD7, 0x6EA9}, //5281 #CJK UNIFIED IDEOGRAPH + {0x9CD8, 0x6EAB}, //5282 #CJK UNIFIED IDEOGRAPH + {0x9CD9, 0x6EAC}, //5283 #CJK UNIFIED IDEOGRAPH + {0x9CDA, 0x6EAD}, //5284 #CJK UNIFIED IDEOGRAPH + {0x9CDB, 0x6EAE}, //5285 #CJK UNIFIED IDEOGRAPH + {0x9CDC, 0x6EB0}, //5286 #CJK UNIFIED IDEOGRAPH + {0x9CDD, 0x6EB3}, //5287 #CJK UNIFIED IDEOGRAPH + {0x9CDE, 0x6EB5}, //5288 #CJK UNIFIED IDEOGRAPH + {0x9CDF, 0x6EB8}, //5289 #CJK UNIFIED IDEOGRAPH + {0x9CE0, 0x6EB9}, //5290 #CJK UNIFIED IDEOGRAPH + {0x9CE1, 0x6EBC}, //5291 #CJK UNIFIED IDEOGRAPH + {0x9CE2, 0x6EBE}, //5292 #CJK UNIFIED IDEOGRAPH + {0x9CE3, 0x6EBF}, //5293 #CJK UNIFIED IDEOGRAPH + {0x9CE4, 0x6EC0}, //5294 #CJK UNIFIED IDEOGRAPH + {0x9CE5, 0x6EC3}, //5295 #CJK UNIFIED IDEOGRAPH + {0x9CE6, 0x6EC4}, //5296 #CJK UNIFIED IDEOGRAPH + {0x9CE7, 0x6EC5}, //5297 #CJK UNIFIED IDEOGRAPH + {0x9CE8, 0x6EC6}, //5298 #CJK UNIFIED IDEOGRAPH + {0x9CE9, 0x6EC8}, //5299 #CJK UNIFIED IDEOGRAPH + {0x9CEA, 0x6EC9}, //5300 #CJK UNIFIED IDEOGRAPH + {0x9CEB, 0x6ECA}, //5301 #CJK UNIFIED IDEOGRAPH + {0x9CEC, 0x6ECC}, //5302 #CJK UNIFIED IDEOGRAPH + {0x9CED, 0x6ECD}, //5303 #CJK UNIFIED IDEOGRAPH + {0x9CEE, 0x6ECE}, //5304 #CJK UNIFIED IDEOGRAPH + {0x9CEF, 0x6ED0}, //5305 #CJK UNIFIED IDEOGRAPH + {0x9CF0, 0x6ED2}, //5306 #CJK UNIFIED IDEOGRAPH + {0x9CF1, 0x6ED6}, //5307 #CJK UNIFIED IDEOGRAPH + {0x9CF2, 0x6ED8}, //5308 #CJK UNIFIED IDEOGRAPH + {0x9CF3, 0x6ED9}, //5309 #CJK UNIFIED IDEOGRAPH + {0x9CF4, 0x6EDB}, //5310 #CJK UNIFIED IDEOGRAPH + {0x9CF5, 0x6EDC}, //5311 #CJK UNIFIED IDEOGRAPH + {0x9CF6, 0x6EDD}, //5312 #CJK UNIFIED IDEOGRAPH + {0x9CF7, 0x6EE3}, //5313 #CJK UNIFIED IDEOGRAPH + {0x9CF8, 0x6EE7}, //5314 #CJK UNIFIED IDEOGRAPH + {0x9CF9, 0x6EEA}, //5315 #CJK UNIFIED IDEOGRAPH + {0x9CFA, 0x6EEB}, //5316 #CJK UNIFIED IDEOGRAPH + {0x9CFB, 0x6EEC}, //5317 #CJK UNIFIED IDEOGRAPH + {0x9CFC, 0x6EED}, //5318 #CJK UNIFIED IDEOGRAPH + {0x9CFD, 0x6EEE}, //5319 #CJK UNIFIED IDEOGRAPH + {0x9CFE, 0x6EEF}, //5320 #CJK UNIFIED IDEOGRAPH + {0x9D40, 0x6EF0}, //5321 #CJK UNIFIED IDEOGRAPH + {0x9D41, 0x6EF1}, //5322 #CJK UNIFIED IDEOGRAPH + {0x9D42, 0x6EF2}, //5323 #CJK UNIFIED IDEOGRAPH + {0x9D43, 0x6EF3}, //5324 #CJK UNIFIED IDEOGRAPH + {0x9D44, 0x6EF5}, //5325 #CJK UNIFIED IDEOGRAPH + {0x9D45, 0x6EF6}, //5326 #CJK UNIFIED IDEOGRAPH + {0x9D46, 0x6EF7}, //5327 #CJK UNIFIED IDEOGRAPH + {0x9D47, 0x6EF8}, //5328 #CJK UNIFIED IDEOGRAPH + {0x9D48, 0x6EFA}, //5329 #CJK UNIFIED IDEOGRAPH + {0x9D49, 0x6EFB}, //5330 #CJK UNIFIED IDEOGRAPH + {0x9D4A, 0x6EFC}, //5331 #CJK UNIFIED IDEOGRAPH + {0x9D4B, 0x6EFD}, //5332 #CJK UNIFIED IDEOGRAPH + {0x9D4C, 0x6EFE}, //5333 #CJK UNIFIED IDEOGRAPH + {0x9D4D, 0x6EFF}, //5334 #CJK UNIFIED IDEOGRAPH + {0x9D4E, 0x6F00}, //5335 #CJK UNIFIED IDEOGRAPH + {0x9D4F, 0x6F01}, //5336 #CJK UNIFIED IDEOGRAPH + {0x9D50, 0x6F03}, //5337 #CJK UNIFIED IDEOGRAPH + {0x9D51, 0x6F04}, //5338 #CJK UNIFIED IDEOGRAPH + {0x9D52, 0x6F05}, //5339 #CJK UNIFIED IDEOGRAPH + {0x9D53, 0x6F07}, //5340 #CJK UNIFIED IDEOGRAPH + {0x9D54, 0x6F08}, //5341 #CJK UNIFIED IDEOGRAPH + {0x9D55, 0x6F0A}, //5342 #CJK UNIFIED IDEOGRAPH + {0x9D56, 0x6F0B}, //5343 #CJK UNIFIED IDEOGRAPH + {0x9D57, 0x6F0C}, //5344 #CJK UNIFIED IDEOGRAPH + {0x9D58, 0x6F0D}, //5345 #CJK UNIFIED IDEOGRAPH + {0x9D59, 0x6F0E}, //5346 #CJK UNIFIED IDEOGRAPH + {0x9D5A, 0x6F10}, //5347 #CJK UNIFIED IDEOGRAPH + {0x9D5B, 0x6F11}, //5348 #CJK UNIFIED IDEOGRAPH + {0x9D5C, 0x6F12}, //5349 #CJK UNIFIED IDEOGRAPH + {0x9D5D, 0x6F16}, //5350 #CJK UNIFIED IDEOGRAPH + {0x9D5E, 0x6F17}, //5351 #CJK UNIFIED IDEOGRAPH + {0x9D5F, 0x6F18}, //5352 #CJK UNIFIED IDEOGRAPH + {0x9D60, 0x6F19}, //5353 #CJK UNIFIED IDEOGRAPH + {0x9D61, 0x6F1A}, //5354 #CJK UNIFIED IDEOGRAPH + {0x9D62, 0x6F1B}, //5355 #CJK UNIFIED IDEOGRAPH + {0x9D63, 0x6F1C}, //5356 #CJK UNIFIED IDEOGRAPH + {0x9D64, 0x6F1D}, //5357 #CJK UNIFIED IDEOGRAPH + {0x9D65, 0x6F1E}, //5358 #CJK UNIFIED IDEOGRAPH + {0x9D66, 0x6F1F}, //5359 #CJK UNIFIED IDEOGRAPH + {0x9D67, 0x6F21}, //5360 #CJK UNIFIED IDEOGRAPH + {0x9D68, 0x6F22}, //5361 #CJK UNIFIED IDEOGRAPH + {0x9D69, 0x6F23}, //5362 #CJK UNIFIED IDEOGRAPH + {0x9D6A, 0x6F25}, //5363 #CJK UNIFIED IDEOGRAPH + {0x9D6B, 0x6F26}, //5364 #CJK UNIFIED IDEOGRAPH + {0x9D6C, 0x6F27}, //5365 #CJK UNIFIED IDEOGRAPH + {0x9D6D, 0x6F28}, //5366 #CJK UNIFIED IDEOGRAPH + {0x9D6E, 0x6F2C}, //5367 #CJK UNIFIED IDEOGRAPH + {0x9D6F, 0x6F2E}, //5368 #CJK UNIFIED IDEOGRAPH + {0x9D70, 0x6F30}, //5369 #CJK UNIFIED IDEOGRAPH + {0x9D71, 0x6F32}, //5370 #CJK UNIFIED IDEOGRAPH + {0x9D72, 0x6F34}, //5371 #CJK UNIFIED IDEOGRAPH + {0x9D73, 0x6F35}, //5372 #CJK UNIFIED IDEOGRAPH + {0x9D74, 0x6F37}, //5373 #CJK UNIFIED IDEOGRAPH + {0x9D75, 0x6F38}, //5374 #CJK UNIFIED IDEOGRAPH + {0x9D76, 0x6F39}, //5375 #CJK UNIFIED IDEOGRAPH + {0x9D77, 0x6F3A}, //5376 #CJK UNIFIED IDEOGRAPH + {0x9D78, 0x6F3B}, //5377 #CJK UNIFIED IDEOGRAPH + {0x9D79, 0x6F3C}, //5378 #CJK UNIFIED IDEOGRAPH + {0x9D7A, 0x6F3D}, //5379 #CJK UNIFIED IDEOGRAPH + {0x9D7B, 0x6F3F}, //5380 #CJK UNIFIED IDEOGRAPH + {0x9D7C, 0x6F40}, //5381 #CJK UNIFIED IDEOGRAPH + {0x9D7D, 0x6F41}, //5382 #CJK UNIFIED IDEOGRAPH + {0x9D7E, 0x6F42}, //5383 #CJK UNIFIED IDEOGRAPH + {0x9D80, 0x6F43}, //5384 #CJK UNIFIED IDEOGRAPH + {0x9D81, 0x6F44}, //5385 #CJK UNIFIED IDEOGRAPH + {0x9D82, 0x6F45}, //5386 #CJK UNIFIED IDEOGRAPH + {0x9D83, 0x6F48}, //5387 #CJK UNIFIED IDEOGRAPH + {0x9D84, 0x6F49}, //5388 #CJK UNIFIED IDEOGRAPH + {0x9D85, 0x6F4A}, //5389 #CJK UNIFIED IDEOGRAPH + {0x9D86, 0x6F4C}, //5390 #CJK UNIFIED IDEOGRAPH + {0x9D87, 0x6F4E}, //5391 #CJK UNIFIED IDEOGRAPH + {0x9D88, 0x6F4F}, //5392 #CJK UNIFIED IDEOGRAPH + {0x9D89, 0x6F50}, //5393 #CJK UNIFIED IDEOGRAPH + {0x9D8A, 0x6F51}, //5394 #CJK UNIFIED IDEOGRAPH + {0x9D8B, 0x6F52}, //5395 #CJK UNIFIED IDEOGRAPH + {0x9D8C, 0x6F53}, //5396 #CJK UNIFIED IDEOGRAPH + {0x9D8D, 0x6F54}, //5397 #CJK UNIFIED IDEOGRAPH + {0x9D8E, 0x6F55}, //5398 #CJK UNIFIED IDEOGRAPH + {0x9D8F, 0x6F56}, //5399 #CJK UNIFIED IDEOGRAPH + {0x9D90, 0x6F57}, //5400 #CJK UNIFIED IDEOGRAPH + {0x9D91, 0x6F59}, //5401 #CJK UNIFIED IDEOGRAPH + {0x9D92, 0x6F5A}, //5402 #CJK UNIFIED IDEOGRAPH + {0x9D93, 0x6F5B}, //5403 #CJK UNIFIED IDEOGRAPH + {0x9D94, 0x6F5D}, //5404 #CJK UNIFIED IDEOGRAPH + {0x9D95, 0x6F5F}, //5405 #CJK UNIFIED IDEOGRAPH + {0x9D96, 0x6F60}, //5406 #CJK UNIFIED IDEOGRAPH + {0x9D97, 0x6F61}, //5407 #CJK UNIFIED IDEOGRAPH + {0x9D98, 0x6F63}, //5408 #CJK UNIFIED IDEOGRAPH + {0x9D99, 0x6F64}, //5409 #CJK UNIFIED IDEOGRAPH + {0x9D9A, 0x6F65}, //5410 #CJK UNIFIED IDEOGRAPH + {0x9D9B, 0x6F67}, //5411 #CJK UNIFIED IDEOGRAPH + {0x9D9C, 0x6F68}, //5412 #CJK UNIFIED IDEOGRAPH + {0x9D9D, 0x6F69}, //5413 #CJK UNIFIED IDEOGRAPH + {0x9D9E, 0x6F6A}, //5414 #CJK UNIFIED IDEOGRAPH + {0x9D9F, 0x6F6B}, //5415 #CJK UNIFIED IDEOGRAPH + {0x9DA0, 0x6F6C}, //5416 #CJK UNIFIED IDEOGRAPH + {0x9DA1, 0x6F6F}, //5417 #CJK UNIFIED IDEOGRAPH + {0x9DA2, 0x6F70}, //5418 #CJK UNIFIED IDEOGRAPH + {0x9DA3, 0x6F71}, //5419 #CJK UNIFIED IDEOGRAPH + {0x9DA4, 0x6F73}, //5420 #CJK UNIFIED IDEOGRAPH + {0x9DA5, 0x6F75}, //5421 #CJK UNIFIED IDEOGRAPH + {0x9DA6, 0x6F76}, //5422 #CJK UNIFIED IDEOGRAPH + {0x9DA7, 0x6F77}, //5423 #CJK UNIFIED IDEOGRAPH + {0x9DA8, 0x6F79}, //5424 #CJK UNIFIED IDEOGRAPH + {0x9DA9, 0x6F7B}, //5425 #CJK UNIFIED IDEOGRAPH + {0x9DAA, 0x6F7D}, //5426 #CJK UNIFIED IDEOGRAPH + {0x9DAB, 0x6F7E}, //5427 #CJK UNIFIED IDEOGRAPH + {0x9DAC, 0x6F7F}, //5428 #CJK UNIFIED IDEOGRAPH + {0x9DAD, 0x6F80}, //5429 #CJK UNIFIED IDEOGRAPH + {0x9DAE, 0x6F81}, //5430 #CJK UNIFIED IDEOGRAPH + {0x9DAF, 0x6F82}, //5431 #CJK UNIFIED IDEOGRAPH + {0x9DB0, 0x6F83}, //5432 #CJK UNIFIED IDEOGRAPH + {0x9DB1, 0x6F85}, //5433 #CJK UNIFIED IDEOGRAPH + {0x9DB2, 0x6F86}, //5434 #CJK UNIFIED IDEOGRAPH + {0x9DB3, 0x6F87}, //5435 #CJK UNIFIED IDEOGRAPH + {0x9DB4, 0x6F8A}, //5436 #CJK UNIFIED IDEOGRAPH + {0x9DB5, 0x6F8B}, //5437 #CJK UNIFIED IDEOGRAPH + {0x9DB6, 0x6F8F}, //5438 #CJK UNIFIED IDEOGRAPH + {0x9DB7, 0x6F90}, //5439 #CJK UNIFIED IDEOGRAPH + {0x9DB8, 0x6F91}, //5440 #CJK UNIFIED IDEOGRAPH + {0x9DB9, 0x6F92}, //5441 #CJK UNIFIED IDEOGRAPH + {0x9DBA, 0x6F93}, //5442 #CJK UNIFIED IDEOGRAPH + {0x9DBB, 0x6F94}, //5443 #CJK UNIFIED IDEOGRAPH + {0x9DBC, 0x6F95}, //5444 #CJK UNIFIED IDEOGRAPH + {0x9DBD, 0x6F96}, //5445 #CJK UNIFIED IDEOGRAPH + {0x9DBE, 0x6F97}, //5446 #CJK UNIFIED IDEOGRAPH + {0x9DBF, 0x6F98}, //5447 #CJK UNIFIED IDEOGRAPH + {0x9DC0, 0x6F99}, //5448 #CJK UNIFIED IDEOGRAPH + {0x9DC1, 0x6F9A}, //5449 #CJK UNIFIED IDEOGRAPH + {0x9DC2, 0x6F9B}, //5450 #CJK UNIFIED IDEOGRAPH + {0x9DC3, 0x6F9D}, //5451 #CJK UNIFIED IDEOGRAPH + {0x9DC4, 0x6F9E}, //5452 #CJK UNIFIED IDEOGRAPH + {0x9DC5, 0x6F9F}, //5453 #CJK UNIFIED IDEOGRAPH + {0x9DC6, 0x6FA0}, //5454 #CJK UNIFIED IDEOGRAPH + {0x9DC7, 0x6FA2}, //5455 #CJK UNIFIED IDEOGRAPH + {0x9DC8, 0x6FA3}, //5456 #CJK UNIFIED IDEOGRAPH + {0x9DC9, 0x6FA4}, //5457 #CJK UNIFIED IDEOGRAPH + {0x9DCA, 0x6FA5}, //5458 #CJK UNIFIED IDEOGRAPH + {0x9DCB, 0x6FA6}, //5459 #CJK UNIFIED IDEOGRAPH + {0x9DCC, 0x6FA8}, //5460 #CJK UNIFIED IDEOGRAPH + {0x9DCD, 0x6FA9}, //5461 #CJK UNIFIED IDEOGRAPH + {0x9DCE, 0x6FAA}, //5462 #CJK UNIFIED IDEOGRAPH + {0x9DCF, 0x6FAB}, //5463 #CJK UNIFIED IDEOGRAPH + {0x9DD0, 0x6FAC}, //5464 #CJK UNIFIED IDEOGRAPH + {0x9DD1, 0x6FAD}, //5465 #CJK UNIFIED IDEOGRAPH + {0x9DD2, 0x6FAE}, //5466 #CJK UNIFIED IDEOGRAPH + {0x9DD3, 0x6FAF}, //5467 #CJK UNIFIED IDEOGRAPH + {0x9DD4, 0x6FB0}, //5468 #CJK UNIFIED IDEOGRAPH + {0x9DD5, 0x6FB1}, //5469 #CJK UNIFIED IDEOGRAPH + {0x9DD6, 0x6FB2}, //5470 #CJK UNIFIED IDEOGRAPH + {0x9DD7, 0x6FB4}, //5471 #CJK UNIFIED IDEOGRAPH + {0x9DD8, 0x6FB5}, //5472 #CJK UNIFIED IDEOGRAPH + {0x9DD9, 0x6FB7}, //5473 #CJK UNIFIED IDEOGRAPH + {0x9DDA, 0x6FB8}, //5474 #CJK UNIFIED IDEOGRAPH + {0x9DDB, 0x6FBA}, //5475 #CJK UNIFIED IDEOGRAPH + {0x9DDC, 0x6FBB}, //5476 #CJK UNIFIED IDEOGRAPH + {0x9DDD, 0x6FBC}, //5477 #CJK UNIFIED IDEOGRAPH + {0x9DDE, 0x6FBD}, //5478 #CJK UNIFIED IDEOGRAPH + {0x9DDF, 0x6FBE}, //5479 #CJK UNIFIED IDEOGRAPH + {0x9DE0, 0x6FBF}, //5480 #CJK UNIFIED IDEOGRAPH + {0x9DE1, 0x6FC1}, //5481 #CJK UNIFIED IDEOGRAPH + {0x9DE2, 0x6FC3}, //5482 #CJK UNIFIED IDEOGRAPH + {0x9DE3, 0x6FC4}, //5483 #CJK UNIFIED IDEOGRAPH + {0x9DE4, 0x6FC5}, //5484 #CJK UNIFIED IDEOGRAPH + {0x9DE5, 0x6FC6}, //5485 #CJK UNIFIED IDEOGRAPH + {0x9DE6, 0x6FC7}, //5486 #CJK UNIFIED IDEOGRAPH + {0x9DE7, 0x6FC8}, //5487 #CJK UNIFIED IDEOGRAPH + {0x9DE8, 0x6FCA}, //5488 #CJK UNIFIED IDEOGRAPH + {0x9DE9, 0x6FCB}, //5489 #CJK UNIFIED IDEOGRAPH + {0x9DEA, 0x6FCC}, //5490 #CJK UNIFIED IDEOGRAPH + {0x9DEB, 0x6FCD}, //5491 #CJK UNIFIED IDEOGRAPH + {0x9DEC, 0x6FCE}, //5492 #CJK UNIFIED IDEOGRAPH + {0x9DED, 0x6FCF}, //5493 #CJK UNIFIED IDEOGRAPH + {0x9DEE, 0x6FD0}, //5494 #CJK UNIFIED IDEOGRAPH + {0x9DEF, 0x6FD3}, //5495 #CJK UNIFIED IDEOGRAPH + {0x9DF0, 0x6FD4}, //5496 #CJK UNIFIED IDEOGRAPH + {0x9DF1, 0x6FD5}, //5497 #CJK UNIFIED IDEOGRAPH + {0x9DF2, 0x6FD6}, //5498 #CJK UNIFIED IDEOGRAPH + {0x9DF3, 0x6FD7}, //5499 #CJK UNIFIED IDEOGRAPH + {0x9DF4, 0x6FD8}, //5500 #CJK UNIFIED IDEOGRAPH + {0x9DF5, 0x6FD9}, //5501 #CJK UNIFIED IDEOGRAPH + {0x9DF6, 0x6FDA}, //5502 #CJK UNIFIED IDEOGRAPH + {0x9DF7, 0x6FDB}, //5503 #CJK UNIFIED IDEOGRAPH + {0x9DF8, 0x6FDC}, //5504 #CJK UNIFIED IDEOGRAPH + {0x9DF9, 0x6FDD}, //5505 #CJK UNIFIED IDEOGRAPH + {0x9DFA, 0x6FDF}, //5506 #CJK UNIFIED IDEOGRAPH + {0x9DFB, 0x6FE2}, //5507 #CJK UNIFIED IDEOGRAPH + {0x9DFC, 0x6FE3}, //5508 #CJK UNIFIED IDEOGRAPH + {0x9DFD, 0x6FE4}, //5509 #CJK UNIFIED IDEOGRAPH + {0x9DFE, 0x6FE5}, //5510 #CJK UNIFIED IDEOGRAPH + {0x9E40, 0x6FE6}, //5511 #CJK UNIFIED IDEOGRAPH + {0x9E41, 0x6FE7}, //5512 #CJK UNIFIED IDEOGRAPH + {0x9E42, 0x6FE8}, //5513 #CJK UNIFIED IDEOGRAPH + {0x9E43, 0x6FE9}, //5514 #CJK UNIFIED IDEOGRAPH + {0x9E44, 0x6FEA}, //5515 #CJK UNIFIED IDEOGRAPH + {0x9E45, 0x6FEB}, //5516 #CJK UNIFIED IDEOGRAPH + {0x9E46, 0x6FEC}, //5517 #CJK UNIFIED IDEOGRAPH + {0x9E47, 0x6FED}, //5518 #CJK UNIFIED IDEOGRAPH + {0x9E48, 0x6FF0}, //5519 #CJK UNIFIED IDEOGRAPH + {0x9E49, 0x6FF1}, //5520 #CJK UNIFIED IDEOGRAPH + {0x9E4A, 0x6FF2}, //5521 #CJK UNIFIED IDEOGRAPH + {0x9E4B, 0x6FF3}, //5522 #CJK UNIFIED IDEOGRAPH + {0x9E4C, 0x6FF4}, //5523 #CJK UNIFIED IDEOGRAPH + {0x9E4D, 0x6FF5}, //5524 #CJK UNIFIED IDEOGRAPH + {0x9E4E, 0x6FF6}, //5525 #CJK UNIFIED IDEOGRAPH + {0x9E4F, 0x6FF7}, //5526 #CJK UNIFIED IDEOGRAPH + {0x9E50, 0x6FF8}, //5527 #CJK UNIFIED IDEOGRAPH + {0x9E51, 0x6FF9}, //5528 #CJK UNIFIED IDEOGRAPH + {0x9E52, 0x6FFA}, //5529 #CJK UNIFIED IDEOGRAPH + {0x9E53, 0x6FFB}, //5530 #CJK UNIFIED IDEOGRAPH + {0x9E54, 0x6FFC}, //5531 #CJK UNIFIED IDEOGRAPH + {0x9E55, 0x6FFD}, //5532 #CJK UNIFIED IDEOGRAPH + {0x9E56, 0x6FFE}, //5533 #CJK UNIFIED IDEOGRAPH + {0x9E57, 0x6FFF}, //5534 #CJK UNIFIED IDEOGRAPH + {0x9E58, 0x7000}, //5535 #CJK UNIFIED IDEOGRAPH + {0x9E59, 0x7001}, //5536 #CJK UNIFIED IDEOGRAPH + {0x9E5A, 0x7002}, //5537 #CJK UNIFIED IDEOGRAPH + {0x9E5B, 0x7003}, //5538 #CJK UNIFIED IDEOGRAPH + {0x9E5C, 0x7004}, //5539 #CJK UNIFIED IDEOGRAPH + {0x9E5D, 0x7005}, //5540 #CJK UNIFIED IDEOGRAPH + {0x9E5E, 0x7006}, //5541 #CJK UNIFIED IDEOGRAPH + {0x9E5F, 0x7007}, //5542 #CJK UNIFIED IDEOGRAPH + {0x9E60, 0x7008}, //5543 #CJK UNIFIED IDEOGRAPH + {0x9E61, 0x7009}, //5544 #CJK UNIFIED IDEOGRAPH + {0x9E62, 0x700A}, //5545 #CJK UNIFIED IDEOGRAPH + {0x9E63, 0x700B}, //5546 #CJK UNIFIED IDEOGRAPH + {0x9E64, 0x700C}, //5547 #CJK UNIFIED IDEOGRAPH + {0x9E65, 0x700D}, //5548 #CJK UNIFIED IDEOGRAPH + {0x9E66, 0x700E}, //5549 #CJK UNIFIED IDEOGRAPH + {0x9E67, 0x700F}, //5550 #CJK UNIFIED IDEOGRAPH + {0x9E68, 0x7010}, //5551 #CJK UNIFIED IDEOGRAPH + {0x9E69, 0x7012}, //5552 #CJK UNIFIED IDEOGRAPH + {0x9E6A, 0x7013}, //5553 #CJK UNIFIED IDEOGRAPH + {0x9E6B, 0x7014}, //5554 #CJK UNIFIED IDEOGRAPH + {0x9E6C, 0x7015}, //5555 #CJK UNIFIED IDEOGRAPH + {0x9E6D, 0x7016}, //5556 #CJK UNIFIED IDEOGRAPH + {0x9E6E, 0x7017}, //5557 #CJK UNIFIED IDEOGRAPH + {0x9E6F, 0x7018}, //5558 #CJK UNIFIED IDEOGRAPH + {0x9E70, 0x7019}, //5559 #CJK UNIFIED IDEOGRAPH + {0x9E71, 0x701C}, //5560 #CJK UNIFIED IDEOGRAPH + {0x9E72, 0x701D}, //5561 #CJK UNIFIED IDEOGRAPH + {0x9E73, 0x701E}, //5562 #CJK UNIFIED IDEOGRAPH + {0x9E74, 0x701F}, //5563 #CJK UNIFIED IDEOGRAPH + {0x9E75, 0x7020}, //5564 #CJK UNIFIED IDEOGRAPH + {0x9E76, 0x7021}, //5565 #CJK UNIFIED IDEOGRAPH + {0x9E77, 0x7022}, //5566 #CJK UNIFIED IDEOGRAPH + {0x9E78, 0x7024}, //5567 #CJK UNIFIED IDEOGRAPH + {0x9E79, 0x7025}, //5568 #CJK UNIFIED IDEOGRAPH + {0x9E7A, 0x7026}, //5569 #CJK UNIFIED IDEOGRAPH + {0x9E7B, 0x7027}, //5570 #CJK UNIFIED IDEOGRAPH + {0x9E7C, 0x7028}, //5571 #CJK UNIFIED IDEOGRAPH + {0x9E7D, 0x7029}, //5572 #CJK UNIFIED IDEOGRAPH + {0x9E7E, 0x702A}, //5573 #CJK UNIFIED IDEOGRAPH + {0x9E80, 0x702B}, //5574 #CJK UNIFIED IDEOGRAPH + {0x9E81, 0x702C}, //5575 #CJK UNIFIED IDEOGRAPH + {0x9E82, 0x702D}, //5576 #CJK UNIFIED IDEOGRAPH + {0x9E83, 0x702E}, //5577 #CJK UNIFIED IDEOGRAPH + {0x9E84, 0x702F}, //5578 #CJK UNIFIED IDEOGRAPH + {0x9E85, 0x7030}, //5579 #CJK UNIFIED IDEOGRAPH + {0x9E86, 0x7031}, //5580 #CJK UNIFIED IDEOGRAPH + {0x9E87, 0x7032}, //5581 #CJK UNIFIED IDEOGRAPH + {0x9E88, 0x7033}, //5582 #CJK UNIFIED IDEOGRAPH + {0x9E89, 0x7034}, //5583 #CJK UNIFIED IDEOGRAPH + {0x9E8A, 0x7036}, //5584 #CJK UNIFIED IDEOGRAPH + {0x9E8B, 0x7037}, //5585 #CJK UNIFIED IDEOGRAPH + {0x9E8C, 0x7038}, //5586 #CJK UNIFIED IDEOGRAPH + {0x9E8D, 0x703A}, //5587 #CJK UNIFIED IDEOGRAPH + {0x9E8E, 0x703B}, //5588 #CJK UNIFIED IDEOGRAPH + {0x9E8F, 0x703C}, //5589 #CJK UNIFIED IDEOGRAPH + {0x9E90, 0x703D}, //5590 #CJK UNIFIED IDEOGRAPH + {0x9E91, 0x703E}, //5591 #CJK UNIFIED IDEOGRAPH + {0x9E92, 0x703F}, //5592 #CJK UNIFIED IDEOGRAPH + {0x9E93, 0x7040}, //5593 #CJK UNIFIED IDEOGRAPH + {0x9E94, 0x7041}, //5594 #CJK UNIFIED IDEOGRAPH + {0x9E95, 0x7042}, //5595 #CJK UNIFIED IDEOGRAPH + {0x9E96, 0x7043}, //5596 #CJK UNIFIED IDEOGRAPH + {0x9E97, 0x7044}, //5597 #CJK UNIFIED IDEOGRAPH + {0x9E98, 0x7045}, //5598 #CJK UNIFIED IDEOGRAPH + {0x9E99, 0x7046}, //5599 #CJK UNIFIED IDEOGRAPH + {0x9E9A, 0x7047}, //5600 #CJK UNIFIED IDEOGRAPH + {0x9E9B, 0x7048}, //5601 #CJK UNIFIED IDEOGRAPH + {0x9E9C, 0x7049}, //5602 #CJK UNIFIED IDEOGRAPH + {0x9E9D, 0x704A}, //5603 #CJK UNIFIED IDEOGRAPH + {0x9E9E, 0x704B}, //5604 #CJK UNIFIED IDEOGRAPH + {0x9E9F, 0x704D}, //5605 #CJK UNIFIED IDEOGRAPH + {0x9EA0, 0x704E}, //5606 #CJK UNIFIED IDEOGRAPH + {0x9EA1, 0x7050}, //5607 #CJK UNIFIED IDEOGRAPH + {0x9EA2, 0x7051}, //5608 #CJK UNIFIED IDEOGRAPH + {0x9EA3, 0x7052}, //5609 #CJK UNIFIED IDEOGRAPH + {0x9EA4, 0x7053}, //5610 #CJK UNIFIED IDEOGRAPH + {0x9EA5, 0x7054}, //5611 #CJK UNIFIED IDEOGRAPH + {0x9EA6, 0x7055}, //5612 #CJK UNIFIED IDEOGRAPH + {0x9EA7, 0x7056}, //5613 #CJK UNIFIED IDEOGRAPH + {0x9EA8, 0x7057}, //5614 #CJK UNIFIED IDEOGRAPH + {0x9EA9, 0x7058}, //5615 #CJK UNIFIED IDEOGRAPH + {0x9EAA, 0x7059}, //5616 #CJK UNIFIED IDEOGRAPH + {0x9EAB, 0x705A}, //5617 #CJK UNIFIED IDEOGRAPH + {0x9EAC, 0x705B}, //5618 #CJK UNIFIED IDEOGRAPH + {0x9EAD, 0x705C}, //5619 #CJK UNIFIED IDEOGRAPH + {0x9EAE, 0x705D}, //5620 #CJK UNIFIED IDEOGRAPH + {0x9EAF, 0x705F}, //5621 #CJK UNIFIED IDEOGRAPH + {0x9EB0, 0x7060}, //5622 #CJK UNIFIED IDEOGRAPH + {0x9EB1, 0x7061}, //5623 #CJK UNIFIED IDEOGRAPH + {0x9EB2, 0x7062}, //5624 #CJK UNIFIED IDEOGRAPH + {0x9EB3, 0x7063}, //5625 #CJK UNIFIED IDEOGRAPH + {0x9EB4, 0x7064}, //5626 #CJK UNIFIED IDEOGRAPH + {0x9EB5, 0x7065}, //5627 #CJK UNIFIED IDEOGRAPH + {0x9EB6, 0x7066}, //5628 #CJK UNIFIED IDEOGRAPH + {0x9EB7, 0x7067}, //5629 #CJK UNIFIED IDEOGRAPH + {0x9EB8, 0x7068}, //5630 #CJK UNIFIED IDEOGRAPH + {0x9EB9, 0x7069}, //5631 #CJK UNIFIED IDEOGRAPH + {0x9EBA, 0x706A}, //5632 #CJK UNIFIED IDEOGRAPH + {0x9EBB, 0x706E}, //5633 #CJK UNIFIED IDEOGRAPH + {0x9EBC, 0x7071}, //5634 #CJK UNIFIED IDEOGRAPH + {0x9EBD, 0x7072}, //5635 #CJK UNIFIED IDEOGRAPH + {0x9EBE, 0x7073}, //5636 #CJK UNIFIED IDEOGRAPH + {0x9EBF, 0x7074}, //5637 #CJK UNIFIED IDEOGRAPH + {0x9EC0, 0x7077}, //5638 #CJK UNIFIED IDEOGRAPH + {0x9EC1, 0x7079}, //5639 #CJK UNIFIED IDEOGRAPH + {0x9EC2, 0x707A}, //5640 #CJK UNIFIED IDEOGRAPH + {0x9EC3, 0x707B}, //5641 #CJK UNIFIED IDEOGRAPH + {0x9EC4, 0x707D}, //5642 #CJK UNIFIED IDEOGRAPH + {0x9EC5, 0x7081}, //5643 #CJK UNIFIED IDEOGRAPH + {0x9EC6, 0x7082}, //5644 #CJK UNIFIED IDEOGRAPH + {0x9EC7, 0x7083}, //5645 #CJK UNIFIED IDEOGRAPH + {0x9EC8, 0x7084}, //5646 #CJK UNIFIED IDEOGRAPH + {0x9EC9, 0x7086}, //5647 #CJK UNIFIED IDEOGRAPH + {0x9ECA, 0x7087}, //5648 #CJK UNIFIED IDEOGRAPH + {0x9ECB, 0x7088}, //5649 #CJK UNIFIED IDEOGRAPH + {0x9ECC, 0x708B}, //5650 #CJK UNIFIED IDEOGRAPH + {0x9ECD, 0x708C}, //5651 #CJK UNIFIED IDEOGRAPH + {0x9ECE, 0x708D}, //5652 #CJK UNIFIED IDEOGRAPH + {0x9ECF, 0x708F}, //5653 #CJK UNIFIED IDEOGRAPH + {0x9ED0, 0x7090}, //5654 #CJK UNIFIED IDEOGRAPH + {0x9ED1, 0x7091}, //5655 #CJK UNIFIED IDEOGRAPH + {0x9ED2, 0x7093}, //5656 #CJK UNIFIED IDEOGRAPH + {0x9ED3, 0x7097}, //5657 #CJK UNIFIED IDEOGRAPH + {0x9ED4, 0x7098}, //5658 #CJK UNIFIED IDEOGRAPH + {0x9ED5, 0x709A}, //5659 #CJK UNIFIED IDEOGRAPH + {0x9ED6, 0x709B}, //5660 #CJK UNIFIED IDEOGRAPH + {0x9ED7, 0x709E}, //5661 #CJK UNIFIED IDEOGRAPH + {0x9ED8, 0x709F}, //5662 #CJK UNIFIED IDEOGRAPH + {0x9ED9, 0x70A0}, //5663 #CJK UNIFIED IDEOGRAPH + {0x9EDA, 0x70A1}, //5664 #CJK UNIFIED IDEOGRAPH + {0x9EDB, 0x70A2}, //5665 #CJK UNIFIED IDEOGRAPH + {0x9EDC, 0x70A3}, //5666 #CJK UNIFIED IDEOGRAPH + {0x9EDD, 0x70A4}, //5667 #CJK UNIFIED IDEOGRAPH + {0x9EDE, 0x70A5}, //5668 #CJK UNIFIED IDEOGRAPH + {0x9EDF, 0x70A6}, //5669 #CJK UNIFIED IDEOGRAPH + {0x9EE0, 0x70A7}, //5670 #CJK UNIFIED IDEOGRAPH + {0x9EE1, 0x70A8}, //5671 #CJK UNIFIED IDEOGRAPH + {0x9EE2, 0x70A9}, //5672 #CJK UNIFIED IDEOGRAPH + {0x9EE3, 0x70AA}, //5673 #CJK UNIFIED IDEOGRAPH + {0x9EE4, 0x70B0}, //5674 #CJK UNIFIED IDEOGRAPH + {0x9EE5, 0x70B2}, //5675 #CJK UNIFIED IDEOGRAPH + {0x9EE6, 0x70B4}, //5676 #CJK UNIFIED IDEOGRAPH + {0x9EE7, 0x70B5}, //5677 #CJK UNIFIED IDEOGRAPH + {0x9EE8, 0x70B6}, //5678 #CJK UNIFIED IDEOGRAPH + {0x9EE9, 0x70BA}, //5679 #CJK UNIFIED IDEOGRAPH + {0x9EEA, 0x70BE}, //5680 #CJK UNIFIED IDEOGRAPH + {0x9EEB, 0x70BF}, //5681 #CJK UNIFIED IDEOGRAPH + {0x9EEC, 0x70C4}, //5682 #CJK UNIFIED IDEOGRAPH + {0x9EED, 0x70C5}, //5683 #CJK UNIFIED IDEOGRAPH + {0x9EEE, 0x70C6}, //5684 #CJK UNIFIED IDEOGRAPH + {0x9EEF, 0x70C7}, //5685 #CJK UNIFIED IDEOGRAPH + {0x9EF0, 0x70C9}, //5686 #CJK UNIFIED IDEOGRAPH + {0x9EF1, 0x70CB}, //5687 #CJK UNIFIED IDEOGRAPH + {0x9EF2, 0x70CC}, //5688 #CJK UNIFIED IDEOGRAPH + {0x9EF3, 0x70CD}, //5689 #CJK UNIFIED IDEOGRAPH + {0x9EF4, 0x70CE}, //5690 #CJK UNIFIED IDEOGRAPH + {0x9EF5, 0x70CF}, //5691 #CJK UNIFIED IDEOGRAPH + {0x9EF6, 0x70D0}, //5692 #CJK UNIFIED IDEOGRAPH + {0x9EF7, 0x70D1}, //5693 #CJK UNIFIED IDEOGRAPH + {0x9EF8, 0x70D2}, //5694 #CJK UNIFIED IDEOGRAPH + {0x9EF9, 0x70D3}, //5695 #CJK UNIFIED IDEOGRAPH + {0x9EFA, 0x70D4}, //5696 #CJK UNIFIED IDEOGRAPH + {0x9EFB, 0x70D5}, //5697 #CJK UNIFIED IDEOGRAPH + {0x9EFC, 0x70D6}, //5698 #CJK UNIFIED IDEOGRAPH + {0x9EFD, 0x70D7}, //5699 #CJK UNIFIED IDEOGRAPH + {0x9EFE, 0x70DA}, //5700 #CJK UNIFIED IDEOGRAPH + {0x9F40, 0x70DC}, //5701 #CJK UNIFIED IDEOGRAPH + {0x9F41, 0x70DD}, //5702 #CJK UNIFIED IDEOGRAPH + {0x9F42, 0x70DE}, //5703 #CJK UNIFIED IDEOGRAPH + {0x9F43, 0x70E0}, //5704 #CJK UNIFIED IDEOGRAPH + {0x9F44, 0x70E1}, //5705 #CJK UNIFIED IDEOGRAPH + {0x9F45, 0x70E2}, //5706 #CJK UNIFIED IDEOGRAPH + {0x9F46, 0x70E3}, //5707 #CJK UNIFIED IDEOGRAPH + {0x9F47, 0x70E5}, //5708 #CJK UNIFIED IDEOGRAPH + {0x9F48, 0x70EA}, //5709 #CJK UNIFIED IDEOGRAPH + {0x9F49, 0x70EE}, //5710 #CJK UNIFIED IDEOGRAPH + {0x9F4A, 0x70F0}, //5711 #CJK UNIFIED IDEOGRAPH + {0x9F4B, 0x70F1}, //5712 #CJK UNIFIED IDEOGRAPH + {0x9F4C, 0x70F2}, //5713 #CJK UNIFIED IDEOGRAPH + {0x9F4D, 0x70F3}, //5714 #CJK UNIFIED IDEOGRAPH + {0x9F4E, 0x70F4}, //5715 #CJK UNIFIED IDEOGRAPH + {0x9F4F, 0x70F5}, //5716 #CJK UNIFIED IDEOGRAPH + {0x9F50, 0x70F6}, //5717 #CJK UNIFIED IDEOGRAPH + {0x9F51, 0x70F8}, //5718 #CJK UNIFIED IDEOGRAPH + {0x9F52, 0x70FA}, //5719 #CJK UNIFIED IDEOGRAPH + {0x9F53, 0x70FB}, //5720 #CJK UNIFIED IDEOGRAPH + {0x9F54, 0x70FC}, //5721 #CJK UNIFIED IDEOGRAPH + {0x9F55, 0x70FE}, //5722 #CJK UNIFIED IDEOGRAPH + {0x9F56, 0x70FF}, //5723 #CJK UNIFIED IDEOGRAPH + {0x9F57, 0x7100}, //5724 #CJK UNIFIED IDEOGRAPH + {0x9F58, 0x7101}, //5725 #CJK UNIFIED IDEOGRAPH + {0x9F59, 0x7102}, //5726 #CJK UNIFIED IDEOGRAPH + {0x9F5A, 0x7103}, //5727 #CJK UNIFIED IDEOGRAPH + {0x9F5B, 0x7104}, //5728 #CJK UNIFIED IDEOGRAPH + {0x9F5C, 0x7105}, //5729 #CJK UNIFIED IDEOGRAPH + {0x9F5D, 0x7106}, //5730 #CJK UNIFIED IDEOGRAPH + {0x9F5E, 0x7107}, //5731 #CJK UNIFIED IDEOGRAPH + {0x9F5F, 0x7108}, //5732 #CJK UNIFIED IDEOGRAPH + {0x9F60, 0x710B}, //5733 #CJK UNIFIED IDEOGRAPH + {0x9F61, 0x710C}, //5734 #CJK UNIFIED IDEOGRAPH + {0x9F62, 0x710D}, //5735 #CJK UNIFIED IDEOGRAPH + {0x9F63, 0x710E}, //5736 #CJK UNIFIED IDEOGRAPH + {0x9F64, 0x710F}, //5737 #CJK UNIFIED IDEOGRAPH + {0x9F65, 0x7111}, //5738 #CJK UNIFIED IDEOGRAPH + {0x9F66, 0x7112}, //5739 #CJK UNIFIED IDEOGRAPH + {0x9F67, 0x7114}, //5740 #CJK UNIFIED IDEOGRAPH + {0x9F68, 0x7117}, //5741 #CJK UNIFIED IDEOGRAPH + {0x9F69, 0x711B}, //5742 #CJK UNIFIED IDEOGRAPH + {0x9F6A, 0x711C}, //5743 #CJK UNIFIED IDEOGRAPH + {0x9F6B, 0x711D}, //5744 #CJK UNIFIED IDEOGRAPH + {0x9F6C, 0x711E}, //5745 #CJK UNIFIED IDEOGRAPH + {0x9F6D, 0x711F}, //5746 #CJK UNIFIED IDEOGRAPH + {0x9F6E, 0x7120}, //5747 #CJK UNIFIED IDEOGRAPH + {0x9F6F, 0x7121}, //5748 #CJK UNIFIED IDEOGRAPH + {0x9F70, 0x7122}, //5749 #CJK UNIFIED IDEOGRAPH + {0x9F71, 0x7123}, //5750 #CJK UNIFIED IDEOGRAPH + {0x9F72, 0x7124}, //5751 #CJK UNIFIED IDEOGRAPH + {0x9F73, 0x7125}, //5752 #CJK UNIFIED IDEOGRAPH + {0x9F74, 0x7127}, //5753 #CJK UNIFIED IDEOGRAPH + {0x9F75, 0x7128}, //5754 #CJK UNIFIED IDEOGRAPH + {0x9F76, 0x7129}, //5755 #CJK UNIFIED IDEOGRAPH + {0x9F77, 0x712A}, //5756 #CJK UNIFIED IDEOGRAPH + {0x9F78, 0x712B}, //5757 #CJK UNIFIED IDEOGRAPH + {0x9F79, 0x712C}, //5758 #CJK UNIFIED IDEOGRAPH + {0x9F7A, 0x712D}, //5759 #CJK UNIFIED IDEOGRAPH + {0x9F7B, 0x712E}, //5760 #CJK UNIFIED IDEOGRAPH + {0x9F7C, 0x7132}, //5761 #CJK UNIFIED IDEOGRAPH + {0x9F7D, 0x7133}, //5762 #CJK UNIFIED IDEOGRAPH + {0x9F7E, 0x7134}, //5763 #CJK UNIFIED IDEOGRAPH + {0x9F80, 0x7135}, //5764 #CJK UNIFIED IDEOGRAPH + {0x9F81, 0x7137}, //5765 #CJK UNIFIED IDEOGRAPH + {0x9F82, 0x7138}, //5766 #CJK UNIFIED IDEOGRAPH + {0x9F83, 0x7139}, //5767 #CJK UNIFIED IDEOGRAPH + {0x9F84, 0x713A}, //5768 #CJK UNIFIED IDEOGRAPH + {0x9F85, 0x713B}, //5769 #CJK UNIFIED IDEOGRAPH + {0x9F86, 0x713C}, //5770 #CJK UNIFIED IDEOGRAPH + {0x9F87, 0x713D}, //5771 #CJK UNIFIED IDEOGRAPH + {0x9F88, 0x713E}, //5772 #CJK UNIFIED IDEOGRAPH + {0x9F89, 0x713F}, //5773 #CJK UNIFIED IDEOGRAPH + {0x9F8A, 0x7140}, //5774 #CJK UNIFIED IDEOGRAPH + {0x9F8B, 0x7141}, //5775 #CJK UNIFIED IDEOGRAPH + {0x9F8C, 0x7142}, //5776 #CJK UNIFIED IDEOGRAPH + {0x9F8D, 0x7143}, //5777 #CJK UNIFIED IDEOGRAPH + {0x9F8E, 0x7144}, //5778 #CJK UNIFIED IDEOGRAPH + {0x9F8F, 0x7146}, //5779 #CJK UNIFIED IDEOGRAPH + {0x9F90, 0x7147}, //5780 #CJK UNIFIED IDEOGRAPH + {0x9F91, 0x7148}, //5781 #CJK UNIFIED IDEOGRAPH + {0x9F92, 0x7149}, //5782 #CJK UNIFIED IDEOGRAPH + {0x9F93, 0x714B}, //5783 #CJK UNIFIED IDEOGRAPH + {0x9F94, 0x714D}, //5784 #CJK UNIFIED IDEOGRAPH + {0x9F95, 0x714F}, //5785 #CJK UNIFIED IDEOGRAPH + {0x9F96, 0x7150}, //5786 #CJK UNIFIED IDEOGRAPH + {0x9F97, 0x7151}, //5787 #CJK UNIFIED IDEOGRAPH + {0x9F98, 0x7152}, //5788 #CJK UNIFIED IDEOGRAPH + {0x9F99, 0x7153}, //5789 #CJK UNIFIED IDEOGRAPH + {0x9F9A, 0x7154}, //5790 #CJK UNIFIED IDEOGRAPH + {0x9F9B, 0x7155}, //5791 #CJK UNIFIED IDEOGRAPH + {0x9F9C, 0x7156}, //5792 #CJK UNIFIED IDEOGRAPH + {0x9F9D, 0x7157}, //5793 #CJK UNIFIED IDEOGRAPH + {0x9F9E, 0x7158}, //5794 #CJK UNIFIED IDEOGRAPH + {0x9F9F, 0x7159}, //5795 #CJK UNIFIED IDEOGRAPH + {0x9FA0, 0x715A}, //5796 #CJK UNIFIED IDEOGRAPH + {0x9FA1, 0x715B}, //5797 #CJK UNIFIED IDEOGRAPH + {0x9FA2, 0x715D}, //5798 #CJK UNIFIED IDEOGRAPH + {0x9FA3, 0x715F}, //5799 #CJK UNIFIED IDEOGRAPH + {0x9FA4, 0x7160}, //5800 #CJK UNIFIED IDEOGRAPH + {0x9FA5, 0x7161}, //5801 #CJK UNIFIED IDEOGRAPH + {0x9FA6, 0x7162}, //5802 #CJK UNIFIED IDEOGRAPH + {0x9FA7, 0x7163}, //5803 #CJK UNIFIED IDEOGRAPH + {0x9FA8, 0x7165}, //5804 #CJK UNIFIED IDEOGRAPH + {0x9FA9, 0x7169}, //5805 #CJK UNIFIED IDEOGRAPH + {0x9FAA, 0x716A}, //5806 #CJK UNIFIED IDEOGRAPH + {0x9FAB, 0x716B}, //5807 #CJK UNIFIED IDEOGRAPH + {0x9FAC, 0x716C}, //5808 #CJK UNIFIED IDEOGRAPH + {0x9FAD, 0x716D}, //5809 #CJK UNIFIED IDEOGRAPH + {0x9FAE, 0x716F}, //5810 #CJK UNIFIED IDEOGRAPH + {0x9FAF, 0x7170}, //5811 #CJK UNIFIED IDEOGRAPH + {0x9FB0, 0x7171}, //5812 #CJK UNIFIED IDEOGRAPH + {0x9FB1, 0x7174}, //5813 #CJK UNIFIED IDEOGRAPH + {0x9FB2, 0x7175}, //5814 #CJK UNIFIED IDEOGRAPH + {0x9FB3, 0x7176}, //5815 #CJK UNIFIED IDEOGRAPH + {0x9FB4, 0x7177}, //5816 #CJK UNIFIED IDEOGRAPH + {0x9FB5, 0x7179}, //5817 #CJK UNIFIED IDEOGRAPH + {0x9FB6, 0x717B}, //5818 #CJK UNIFIED IDEOGRAPH + {0x9FB7, 0x717C}, //5819 #CJK UNIFIED IDEOGRAPH + {0x9FB8, 0x717E}, //5820 #CJK UNIFIED IDEOGRAPH + {0x9FB9, 0x717F}, //5821 #CJK UNIFIED IDEOGRAPH + {0x9FBA, 0x7180}, //5822 #CJK UNIFIED IDEOGRAPH + {0x9FBB, 0x7181}, //5823 #CJK UNIFIED IDEOGRAPH + {0x9FBC, 0x7182}, //5824 #CJK UNIFIED IDEOGRAPH + {0x9FBD, 0x7183}, //5825 #CJK UNIFIED IDEOGRAPH + {0x9FBE, 0x7185}, //5826 #CJK UNIFIED IDEOGRAPH + {0x9FBF, 0x7186}, //5827 #CJK UNIFIED IDEOGRAPH + {0x9FC0, 0x7187}, //5828 #CJK UNIFIED IDEOGRAPH + {0x9FC1, 0x7188}, //5829 #CJK UNIFIED IDEOGRAPH + {0x9FC2, 0x7189}, //5830 #CJK UNIFIED IDEOGRAPH + {0x9FC3, 0x718B}, //5831 #CJK UNIFIED IDEOGRAPH + {0x9FC4, 0x718C}, //5832 #CJK UNIFIED IDEOGRAPH + {0x9FC5, 0x718D}, //5833 #CJK UNIFIED IDEOGRAPH + {0x9FC6, 0x718E}, //5834 #CJK UNIFIED IDEOGRAPH + {0x9FC7, 0x7190}, //5835 #CJK UNIFIED IDEOGRAPH + {0x9FC8, 0x7191}, //5836 #CJK UNIFIED IDEOGRAPH + {0x9FC9, 0x7192}, //5837 #CJK UNIFIED IDEOGRAPH + {0x9FCA, 0x7193}, //5838 #CJK UNIFIED IDEOGRAPH + {0x9FCB, 0x7195}, //5839 #CJK UNIFIED IDEOGRAPH + {0x9FCC, 0x7196}, //5840 #CJK UNIFIED IDEOGRAPH + {0x9FCD, 0x7197}, //5841 #CJK UNIFIED IDEOGRAPH + {0x9FCE, 0x719A}, //5842 #CJK UNIFIED IDEOGRAPH + {0x9FCF, 0x719B}, //5843 #CJK UNIFIED IDEOGRAPH + {0x9FD0, 0x719C}, //5844 #CJK UNIFIED IDEOGRAPH + {0x9FD1, 0x719D}, //5845 #CJK UNIFIED IDEOGRAPH + {0x9FD2, 0x719E}, //5846 #CJK UNIFIED IDEOGRAPH + {0x9FD3, 0x71A1}, //5847 #CJK UNIFIED IDEOGRAPH + {0x9FD4, 0x71A2}, //5848 #CJK UNIFIED IDEOGRAPH + {0x9FD5, 0x71A3}, //5849 #CJK UNIFIED IDEOGRAPH + {0x9FD6, 0x71A4}, //5850 #CJK UNIFIED IDEOGRAPH + {0x9FD7, 0x71A5}, //5851 #CJK UNIFIED IDEOGRAPH + {0x9FD8, 0x71A6}, //5852 #CJK UNIFIED IDEOGRAPH + {0x9FD9, 0x71A7}, //5853 #CJK UNIFIED IDEOGRAPH + {0x9FDA, 0x71A9}, //5854 #CJK UNIFIED IDEOGRAPH + {0x9FDB, 0x71AA}, //5855 #CJK UNIFIED IDEOGRAPH + {0x9FDC, 0x71AB}, //5856 #CJK UNIFIED IDEOGRAPH + {0x9FDD, 0x71AD}, //5857 #CJK UNIFIED IDEOGRAPH + {0x9FDE, 0x71AE}, //5858 #CJK UNIFIED IDEOGRAPH + {0x9FDF, 0x71AF}, //5859 #CJK UNIFIED IDEOGRAPH + {0x9FE0, 0x71B0}, //5860 #CJK UNIFIED IDEOGRAPH + {0x9FE1, 0x71B1}, //5861 #CJK UNIFIED IDEOGRAPH + {0x9FE2, 0x71B2}, //5862 #CJK UNIFIED IDEOGRAPH + {0x9FE3, 0x71B4}, //5863 #CJK UNIFIED IDEOGRAPH + {0x9FE4, 0x71B6}, //5864 #CJK UNIFIED IDEOGRAPH + {0x9FE5, 0x71B7}, //5865 #CJK UNIFIED IDEOGRAPH + {0x9FE6, 0x71B8}, //5866 #CJK UNIFIED IDEOGRAPH + {0x9FE7, 0x71BA}, //5867 #CJK UNIFIED IDEOGRAPH + {0x9FE8, 0x71BB}, //5868 #CJK UNIFIED IDEOGRAPH + {0x9FE9, 0x71BC}, //5869 #CJK UNIFIED IDEOGRAPH + {0x9FEA, 0x71BD}, //5870 #CJK UNIFIED IDEOGRAPH + {0x9FEB, 0x71BE}, //5871 #CJK UNIFIED IDEOGRAPH + {0x9FEC, 0x71BF}, //5872 #CJK UNIFIED IDEOGRAPH + {0x9FED, 0x71C0}, //5873 #CJK UNIFIED IDEOGRAPH + {0x9FEE, 0x71C1}, //5874 #CJK UNIFIED IDEOGRAPH + {0x9FEF, 0x71C2}, //5875 #CJK UNIFIED IDEOGRAPH + {0x9FF0, 0x71C4}, //5876 #CJK UNIFIED IDEOGRAPH + {0x9FF1, 0x71C5}, //5877 #CJK UNIFIED IDEOGRAPH + {0x9FF2, 0x71C6}, //5878 #CJK UNIFIED IDEOGRAPH + {0x9FF3, 0x71C7}, //5879 #CJK UNIFIED IDEOGRAPH + {0x9FF4, 0x71C8}, //5880 #CJK UNIFIED IDEOGRAPH + {0x9FF5, 0x71C9}, //5881 #CJK UNIFIED IDEOGRAPH + {0x9FF6, 0x71CA}, //5882 #CJK UNIFIED IDEOGRAPH + {0x9FF7, 0x71CB}, //5883 #CJK UNIFIED IDEOGRAPH + {0x9FF8, 0x71CC}, //5884 #CJK UNIFIED IDEOGRAPH + {0x9FF9, 0x71CD}, //5885 #CJK UNIFIED IDEOGRAPH + {0x9FFA, 0x71CF}, //5886 #CJK UNIFIED IDEOGRAPH + {0x9FFB, 0x71D0}, //5887 #CJK UNIFIED IDEOGRAPH + {0x9FFC, 0x71D1}, //5888 #CJK UNIFIED IDEOGRAPH + {0x9FFD, 0x71D2}, //5889 #CJK UNIFIED IDEOGRAPH + {0x9FFE, 0x71D3}, //5890 #CJK UNIFIED IDEOGRAPH + {0xA040, 0x71D6}, //5891 #CJK UNIFIED IDEOGRAPH + {0xA041, 0x71D7}, //5892 #CJK UNIFIED IDEOGRAPH + {0xA042, 0x71D8}, //5893 #CJK UNIFIED IDEOGRAPH + {0xA043, 0x71D9}, //5894 #CJK UNIFIED IDEOGRAPH + {0xA044, 0x71DA}, //5895 #CJK UNIFIED IDEOGRAPH + {0xA045, 0x71DB}, //5896 #CJK UNIFIED IDEOGRAPH + {0xA046, 0x71DC}, //5897 #CJK UNIFIED IDEOGRAPH + {0xA047, 0x71DD}, //5898 #CJK UNIFIED IDEOGRAPH + {0xA048, 0x71DE}, //5899 #CJK UNIFIED IDEOGRAPH + {0xA049, 0x71DF}, //5900 #CJK UNIFIED IDEOGRAPH + {0xA04A, 0x71E1}, //5901 #CJK UNIFIED IDEOGRAPH + {0xA04B, 0x71E2}, //5902 #CJK UNIFIED IDEOGRAPH + {0xA04C, 0x71E3}, //5903 #CJK UNIFIED IDEOGRAPH + {0xA04D, 0x71E4}, //5904 #CJK UNIFIED IDEOGRAPH + {0xA04E, 0x71E6}, //5905 #CJK UNIFIED IDEOGRAPH + {0xA04F, 0x71E8}, //5906 #CJK UNIFIED IDEOGRAPH + {0xA050, 0x71E9}, //5907 #CJK UNIFIED IDEOGRAPH + {0xA051, 0x71EA}, //5908 #CJK UNIFIED IDEOGRAPH + {0xA052, 0x71EB}, //5909 #CJK UNIFIED IDEOGRAPH + {0xA053, 0x71EC}, //5910 #CJK UNIFIED IDEOGRAPH + {0xA054, 0x71ED}, //5911 #CJK UNIFIED IDEOGRAPH + {0xA055, 0x71EF}, //5912 #CJK UNIFIED IDEOGRAPH + {0xA056, 0x71F0}, //5913 #CJK UNIFIED IDEOGRAPH + {0xA057, 0x71F1}, //5914 #CJK UNIFIED IDEOGRAPH + {0xA058, 0x71F2}, //5915 #CJK UNIFIED IDEOGRAPH + {0xA059, 0x71F3}, //5916 #CJK UNIFIED IDEOGRAPH + {0xA05A, 0x71F4}, //5917 #CJK UNIFIED IDEOGRAPH + {0xA05B, 0x71F5}, //5918 #CJK UNIFIED IDEOGRAPH + {0xA05C, 0x71F6}, //5919 #CJK UNIFIED IDEOGRAPH + {0xA05D, 0x71F7}, //5920 #CJK UNIFIED IDEOGRAPH + {0xA05E, 0x71F8}, //5921 #CJK UNIFIED IDEOGRAPH + {0xA05F, 0x71FA}, //5922 #CJK UNIFIED IDEOGRAPH + {0xA060, 0x71FB}, //5923 #CJK UNIFIED IDEOGRAPH + {0xA061, 0x71FC}, //5924 #CJK UNIFIED IDEOGRAPH + {0xA062, 0x71FD}, //5925 #CJK UNIFIED IDEOGRAPH + {0xA063, 0x71FE}, //5926 #CJK UNIFIED IDEOGRAPH + {0xA064, 0x71FF}, //5927 #CJK UNIFIED IDEOGRAPH + {0xA065, 0x7200}, //5928 #CJK UNIFIED IDEOGRAPH + {0xA066, 0x7201}, //5929 #CJK UNIFIED IDEOGRAPH + {0xA067, 0x7202}, //5930 #CJK UNIFIED IDEOGRAPH + {0xA068, 0x7203}, //5931 #CJK UNIFIED IDEOGRAPH + {0xA069, 0x7204}, //5932 #CJK UNIFIED IDEOGRAPH + {0xA06A, 0x7205}, //5933 #CJK UNIFIED IDEOGRAPH + {0xA06B, 0x7207}, //5934 #CJK UNIFIED IDEOGRAPH + {0xA06C, 0x7208}, //5935 #CJK UNIFIED IDEOGRAPH + {0xA06D, 0x7209}, //5936 #CJK UNIFIED IDEOGRAPH + {0xA06E, 0x720A}, //5937 #CJK UNIFIED IDEOGRAPH + {0xA06F, 0x720B}, //5938 #CJK UNIFIED IDEOGRAPH + {0xA070, 0x720C}, //5939 #CJK UNIFIED IDEOGRAPH + {0xA071, 0x720D}, //5940 #CJK UNIFIED IDEOGRAPH + {0xA072, 0x720E}, //5941 #CJK UNIFIED IDEOGRAPH + {0xA073, 0x720F}, //5942 #CJK UNIFIED IDEOGRAPH + {0xA074, 0x7210}, //5943 #CJK UNIFIED IDEOGRAPH + {0xA075, 0x7211}, //5944 #CJK UNIFIED IDEOGRAPH + {0xA076, 0x7212}, //5945 #CJK UNIFIED IDEOGRAPH + {0xA077, 0x7213}, //5946 #CJK UNIFIED IDEOGRAPH + {0xA078, 0x7214}, //5947 #CJK UNIFIED IDEOGRAPH + {0xA079, 0x7215}, //5948 #CJK UNIFIED IDEOGRAPH + {0xA07A, 0x7216}, //5949 #CJK UNIFIED IDEOGRAPH + {0xA07B, 0x7217}, //5950 #CJK UNIFIED IDEOGRAPH + {0xA07C, 0x7218}, //5951 #CJK UNIFIED IDEOGRAPH + {0xA07D, 0x7219}, //5952 #CJK UNIFIED IDEOGRAPH + {0xA07E, 0x721A}, //5953 #CJK UNIFIED IDEOGRAPH + {0xA080, 0x721B}, //5954 #CJK UNIFIED IDEOGRAPH + {0xA081, 0x721C}, //5955 #CJK UNIFIED IDEOGRAPH + {0xA082, 0x721E}, //5956 #CJK UNIFIED IDEOGRAPH + {0xA083, 0x721F}, //5957 #CJK UNIFIED IDEOGRAPH + {0xA084, 0x7220}, //5958 #CJK UNIFIED IDEOGRAPH + {0xA085, 0x7221}, //5959 #CJK UNIFIED IDEOGRAPH + {0xA086, 0x7222}, //5960 #CJK UNIFIED IDEOGRAPH + {0xA087, 0x7223}, //5961 #CJK UNIFIED IDEOGRAPH + {0xA088, 0x7224}, //5962 #CJK UNIFIED IDEOGRAPH + {0xA089, 0x7225}, //5963 #CJK UNIFIED IDEOGRAPH + {0xA08A, 0x7226}, //5964 #CJK UNIFIED IDEOGRAPH + {0xA08B, 0x7227}, //5965 #CJK UNIFIED IDEOGRAPH + {0xA08C, 0x7229}, //5966 #CJK UNIFIED IDEOGRAPH + {0xA08D, 0x722B}, //5967 #CJK UNIFIED IDEOGRAPH + {0xA08E, 0x722D}, //5968 #CJK UNIFIED IDEOGRAPH + {0xA08F, 0x722E}, //5969 #CJK UNIFIED IDEOGRAPH + {0xA090, 0x722F}, //5970 #CJK UNIFIED IDEOGRAPH + {0xA091, 0x7232}, //5971 #CJK UNIFIED IDEOGRAPH + {0xA092, 0x7233}, //5972 #CJK UNIFIED IDEOGRAPH + {0xA093, 0x7234}, //5973 #CJK UNIFIED IDEOGRAPH + {0xA094, 0x723A}, //5974 #CJK UNIFIED IDEOGRAPH + {0xA095, 0x723C}, //5975 #CJK UNIFIED IDEOGRAPH + {0xA096, 0x723E}, //5976 #CJK UNIFIED IDEOGRAPH + {0xA097, 0x7240}, //5977 #CJK UNIFIED IDEOGRAPH + {0xA098, 0x7241}, //5978 #CJK UNIFIED IDEOGRAPH + {0xA099, 0x7242}, //5979 #CJK UNIFIED IDEOGRAPH + {0xA09A, 0x7243}, //5980 #CJK UNIFIED IDEOGRAPH + {0xA09B, 0x7244}, //5981 #CJK UNIFIED IDEOGRAPH + {0xA09C, 0x7245}, //5982 #CJK UNIFIED IDEOGRAPH + {0xA09D, 0x7246}, //5983 #CJK UNIFIED IDEOGRAPH + {0xA09E, 0x7249}, //5984 #CJK UNIFIED IDEOGRAPH + {0xA09F, 0x724A}, //5985 #CJK UNIFIED IDEOGRAPH + {0xA0A0, 0x724B}, //5986 #CJK UNIFIED IDEOGRAPH + {0xA0A1, 0x724E}, //5987 #CJK UNIFIED IDEOGRAPH + {0xA0A2, 0x724F}, //5988 #CJK UNIFIED IDEOGRAPH + {0xA0A3, 0x7250}, //5989 #CJK UNIFIED IDEOGRAPH + {0xA0A4, 0x7251}, //5990 #CJK UNIFIED IDEOGRAPH + {0xA0A5, 0x7253}, //5991 #CJK UNIFIED IDEOGRAPH + {0xA0A6, 0x7254}, //5992 #CJK UNIFIED IDEOGRAPH + {0xA0A7, 0x7255}, //5993 #CJK UNIFIED IDEOGRAPH + {0xA0A8, 0x7257}, //5994 #CJK UNIFIED IDEOGRAPH + {0xA0A9, 0x7258}, //5995 #CJK UNIFIED IDEOGRAPH + {0xA0AA, 0x725A}, //5996 #CJK UNIFIED IDEOGRAPH + {0xA0AB, 0x725C}, //5997 #CJK UNIFIED IDEOGRAPH + {0xA0AC, 0x725E}, //5998 #CJK UNIFIED IDEOGRAPH + {0xA0AD, 0x7260}, //5999 #CJK UNIFIED IDEOGRAPH + {0xA0AE, 0x7263}, //6000 #CJK UNIFIED IDEOGRAPH + {0xA0AF, 0x7264}, //6001 #CJK UNIFIED IDEOGRAPH + {0xA0B0, 0x7265}, //6002 #CJK UNIFIED IDEOGRAPH + {0xA0B1, 0x7268}, //6003 #CJK UNIFIED IDEOGRAPH + {0xA0B2, 0x726A}, //6004 #CJK UNIFIED IDEOGRAPH + {0xA0B3, 0x726B}, //6005 #CJK UNIFIED IDEOGRAPH + {0xA0B4, 0x726C}, //6006 #CJK UNIFIED IDEOGRAPH + {0xA0B5, 0x726D}, //6007 #CJK UNIFIED IDEOGRAPH + {0xA0B6, 0x7270}, //6008 #CJK UNIFIED IDEOGRAPH + {0xA0B7, 0x7271}, //6009 #CJK UNIFIED IDEOGRAPH + {0xA0B8, 0x7273}, //6010 #CJK UNIFIED IDEOGRAPH + {0xA0B9, 0x7274}, //6011 #CJK UNIFIED IDEOGRAPH + {0xA0BA, 0x7276}, //6012 #CJK UNIFIED IDEOGRAPH + {0xA0BB, 0x7277}, //6013 #CJK UNIFIED IDEOGRAPH + {0xA0BC, 0x7278}, //6014 #CJK UNIFIED IDEOGRAPH + {0xA0BD, 0x727B}, //6015 #CJK UNIFIED IDEOGRAPH + {0xA0BE, 0x727C}, //6016 #CJK UNIFIED IDEOGRAPH + {0xA0BF, 0x727D}, //6017 #CJK UNIFIED IDEOGRAPH + {0xA0C0, 0x7282}, //6018 #CJK UNIFIED IDEOGRAPH + {0xA0C1, 0x7283}, //6019 #CJK UNIFIED IDEOGRAPH + {0xA0C2, 0x7285}, //6020 #CJK UNIFIED IDEOGRAPH + {0xA0C3, 0x7286}, //6021 #CJK UNIFIED IDEOGRAPH + {0xA0C4, 0x7287}, //6022 #CJK UNIFIED IDEOGRAPH + {0xA0C5, 0x7288}, //6023 #CJK UNIFIED IDEOGRAPH + {0xA0C6, 0x7289}, //6024 #CJK UNIFIED IDEOGRAPH + {0xA0C7, 0x728C}, //6025 #CJK UNIFIED IDEOGRAPH + {0xA0C8, 0x728E}, //6026 #CJK UNIFIED IDEOGRAPH + {0xA0C9, 0x7290}, //6027 #CJK UNIFIED IDEOGRAPH + {0xA0CA, 0x7291}, //6028 #CJK UNIFIED IDEOGRAPH + {0xA0CB, 0x7293}, //6029 #CJK UNIFIED IDEOGRAPH + {0xA0CC, 0x7294}, //6030 #CJK UNIFIED IDEOGRAPH + {0xA0CD, 0x7295}, //6031 #CJK UNIFIED IDEOGRAPH + {0xA0CE, 0x7296}, //6032 #CJK UNIFIED IDEOGRAPH + {0xA0CF, 0x7297}, //6033 #CJK UNIFIED IDEOGRAPH + {0xA0D0, 0x7298}, //6034 #CJK UNIFIED IDEOGRAPH + {0xA0D1, 0x7299}, //6035 #CJK UNIFIED IDEOGRAPH + {0xA0D2, 0x729A}, //6036 #CJK UNIFIED IDEOGRAPH + {0xA0D3, 0x729B}, //6037 #CJK UNIFIED IDEOGRAPH + {0xA0D4, 0x729C}, //6038 #CJK UNIFIED IDEOGRAPH + {0xA0D5, 0x729D}, //6039 #CJK UNIFIED IDEOGRAPH + {0xA0D6, 0x729E}, //6040 #CJK UNIFIED IDEOGRAPH + {0xA0D7, 0x72A0}, //6041 #CJK UNIFIED IDEOGRAPH + {0xA0D8, 0x72A1}, //6042 #CJK UNIFIED IDEOGRAPH + {0xA0D9, 0x72A2}, //6043 #CJK UNIFIED IDEOGRAPH + {0xA0DA, 0x72A3}, //6044 #CJK UNIFIED IDEOGRAPH + {0xA0DB, 0x72A4}, //6045 #CJK UNIFIED IDEOGRAPH + {0xA0DC, 0x72A5}, //6046 #CJK UNIFIED IDEOGRAPH + {0xA0DD, 0x72A6}, //6047 #CJK UNIFIED IDEOGRAPH + {0xA0DE, 0x72A7}, //6048 #CJK UNIFIED IDEOGRAPH + {0xA0DF, 0x72A8}, //6049 #CJK UNIFIED IDEOGRAPH + {0xA0E0, 0x72A9}, //6050 #CJK UNIFIED IDEOGRAPH + {0xA0E1, 0x72AA}, //6051 #CJK UNIFIED IDEOGRAPH + {0xA0E2, 0x72AB}, //6052 #CJK UNIFIED IDEOGRAPH + {0xA0E3, 0x72AE}, //6053 #CJK UNIFIED IDEOGRAPH + {0xA0E4, 0x72B1}, //6054 #CJK UNIFIED IDEOGRAPH + {0xA0E5, 0x72B2}, //6055 #CJK UNIFIED IDEOGRAPH + {0xA0E6, 0x72B3}, //6056 #CJK UNIFIED IDEOGRAPH + {0xA0E7, 0x72B5}, //6057 #CJK UNIFIED IDEOGRAPH + {0xA0E8, 0x72BA}, //6058 #CJK UNIFIED IDEOGRAPH + {0xA0E9, 0x72BB}, //6059 #CJK UNIFIED IDEOGRAPH + {0xA0EA, 0x72BC}, //6060 #CJK UNIFIED IDEOGRAPH + {0xA0EB, 0x72BD}, //6061 #CJK UNIFIED IDEOGRAPH + {0xA0EC, 0x72BE}, //6062 #CJK UNIFIED IDEOGRAPH + {0xA0ED, 0x72BF}, //6063 #CJK UNIFIED IDEOGRAPH + {0xA0EE, 0x72C0}, //6064 #CJK UNIFIED IDEOGRAPH + {0xA0EF, 0x72C5}, //6065 #CJK UNIFIED IDEOGRAPH + {0xA0F0, 0x72C6}, //6066 #CJK UNIFIED IDEOGRAPH + {0xA0F1, 0x72C7}, //6067 #CJK UNIFIED IDEOGRAPH + {0xA0F2, 0x72C9}, //6068 #CJK UNIFIED IDEOGRAPH + {0xA0F3, 0x72CA}, //6069 #CJK UNIFIED IDEOGRAPH + {0xA0F4, 0x72CB}, //6070 #CJK UNIFIED IDEOGRAPH + {0xA0F5, 0x72CC}, //6071 #CJK UNIFIED IDEOGRAPH + {0xA0F6, 0x72CF}, //6072 #CJK UNIFIED IDEOGRAPH + {0xA0F7, 0x72D1}, //6073 #CJK UNIFIED IDEOGRAPH + {0xA0F8, 0x72D3}, //6074 #CJK UNIFIED IDEOGRAPH + {0xA0F9, 0x72D4}, //6075 #CJK UNIFIED IDEOGRAPH + {0xA0FA, 0x72D5}, //6076 #CJK UNIFIED IDEOGRAPH + {0xA0FB, 0x72D6}, //6077 #CJK UNIFIED IDEOGRAPH + {0xA0FC, 0x72D8}, //6078 #CJK UNIFIED IDEOGRAPH + {0xA0FD, 0x72DA}, //6079 #CJK UNIFIED IDEOGRAPH + {0xA0FE, 0x72DB}, //6080 #CJK UNIFIED IDEOGRAPH + {0xA1A1, 0x3000}, //6081 #IDEOGRAPHIC SPACE + {0xA1A2, 0x3001}, //6082 #IDEOGRAPHIC COMMA + {0xA1A3, 0x3002}, //6083 #IDEOGRAPHIC FULL STOP + {0xA1A4, 0x00B7}, //6084 #MIDDLE DOT + {0xA1A5, 0x02C9}, //6085 #MODIFIER LETTER MACRON + {0xA1A6, 0x02C7}, //6086 #CARON + {0xA1A7, 0x00A8}, //6087 #DIAERESIS + {0xA1A8, 0x3003}, //6088 #DITTO MARK + {0xA1A9, 0x3005}, //6089 #IDEOGRAPHIC ITERATION MARK + {0xA1AA, 0x2014}, //6090 #EM DASH + {0xA1AB, 0xFF5E}, //6091 #FULLWIDTH TILDE + {0xA1AC, 0x2016}, //6092 #DOUBLE VERTICAL LINE + {0xA1AD, 0x2026}, //6093 #HORIZONTAL ELLIPSIS + {0xA1AE, 0x2018}, //6094 #LEFT SINGLE QUOTATION MARK + {0xA1AF, 0x2019}, //6095 #RIGHT SINGLE QUOTATION MARK + {0xA1B0, 0x201C}, //6096 #LEFT DOUBLE QUOTATION MARK + {0xA1B1, 0x201D}, //6097 #RIGHT DOUBLE QUOTATION MARK + {0xA1B2, 0x3014}, //6098 #LEFT TORTOISE SHELL BRACKET + {0xA1B3, 0x3015}, //6099 #RIGHT TORTOISE SHELL BRACKET + {0xA1B4, 0x3008}, //6100 #LEFT ANGLE BRACKET + {0xA1B5, 0x3009}, //6101 #RIGHT ANGLE BRACKET + {0xA1B6, 0x300A}, //6102 #LEFT DOUBLE ANGLE BRACKET + {0xA1B7, 0x300B}, //6103 #RIGHT DOUBLE ANGLE BRACKET + {0xA1B8, 0x300C}, //6104 #LEFT CORNER BRACKET + {0xA1B9, 0x300D}, //6105 #RIGHT CORNER BRACKET + {0xA1BA, 0x300E}, //6106 #LEFT WHITE CORNER BRACKET + {0xA1BB, 0x300F}, //6107 #RIGHT WHITE CORNER BRACKET + {0xA1BC, 0x3016}, //6108 #LEFT WHITE LENTICULAR BRACKET + {0xA1BD, 0x3017}, //6109 #RIGHT WHITE LENTICULAR BRACKET + {0xA1BE, 0x3010}, //6110 #LEFT BLACK LENTICULAR BRACKET + {0xA1BF, 0x3011}, //6111 #RIGHT BLACK LENTICULAR BRACKET + {0xA1C0, 0x00B1}, //6112 #PLUS-MINUS SIGN + {0xA1C1, 0x00D7}, //6113 #MULTIPLICATION SIGN + {0xA1C2, 0x00F7}, //6114 #DIVISION SIGN + {0xA1C3, 0x2236}, //6115 #RATIO + {0xA1C4, 0x2227}, //6116 #LOGICAL AND + {0xA1C5, 0x2228}, //6117 #LOGICAL OR + {0xA1C6, 0x2211}, //6118 #N-ARY SUMMATION + {0xA1C7, 0x220F}, //6119 #N-ARY PRODUCT + {0xA1C8, 0x222A}, //6120 #UNION + {0xA1C9, 0x2229}, //6121 #INTERSECTION + {0xA1CA, 0x2208}, //6122 #ELEMENT OF + {0xA1CB, 0x2237}, //6123 #PROPORTION + {0xA1CC, 0x221A}, //6124 #SQUARE ROOT + {0xA1CD, 0x22A5}, //6125 #UP TACK + {0xA1CE, 0x2225}, //6126 #PARALLEL TO + {0xA1CF, 0x2220}, //6127 #ANGLE + {0xA1D0, 0x2312}, //6128 #ARC + {0xA1D1, 0x2299}, //6129 #CIRCLED DOT OPERATOR + {0xA1D2, 0x222B}, //6130 #INTEGRAL + {0xA1D3, 0x222E}, //6131 #CONTOUR INTEGRAL + {0xA1D4, 0x2261}, //6132 #IDENTICAL TO + {0xA1D5, 0x224C}, //6133 #ALL EQUAL TO + {0xA1D6, 0x2248}, //6134 #ALMOST EQUAL TO + {0xA1D7, 0x223D}, //6135 #REVERSED TILDE + {0xA1D8, 0x221D}, //6136 #PROPORTIONAL TO + {0xA1D9, 0x2260}, //6137 #NOT EQUAL TO + {0xA1DA, 0x226E}, //6138 #NOT LESS-THAN + {0xA1DB, 0x226F}, //6139 #NOT GREATER-THAN + {0xA1DC, 0x2264}, //6140 #LESS-THAN OR EQUAL TO + {0xA1DD, 0x2265}, //6141 #GREATER-THAN OR EQUAL TO + {0xA1DE, 0x221E}, //6142 #INFINITY + {0xA1DF, 0x2235}, //6143 #BECAUSE + {0xA1E0, 0x2234}, //6144 #THEREFORE + {0xA1E1, 0x2642}, //6145 #MALE SIGN + {0xA1E2, 0x2640}, //6146 #FEMALE SIGN + {0xA1E3, 0x00B0}, //6147 #DEGREE SIGN + {0xA1E4, 0x2032}, //6148 #PRIME + {0xA1E5, 0x2033}, //6149 #DOUBLE PRIME + {0xA1E6, 0x2103}, //6150 #DEGREE CELSIUS + {0xA1E7, 0xFF04}, //6151 #FULLWIDTH DOLLAR SIGN + {0xA1E8, 0x00A4}, //6152 #CURRENCY SIGN + {0xA1E9, 0xFFE0}, //6153 #FULLWIDTH CENT SIGN + {0xA1EA, 0xFFE1}, //6154 #FULLWIDTH POUND SIGN + {0xA1EB, 0x2030}, //6155 #PER MILLE SIGN + {0xA1EC, 0x00A7}, //6156 #SECTION SIGN + {0xA1ED, 0x2116}, //6157 #NUMERO SIGN + {0xA1EE, 0x2606}, //6158 #WHITE STAR + {0xA1EF, 0x2605}, //6159 #BLACK STAR + {0xA1F0, 0x25CB}, //6160 #WHITE CIRCLE + {0xA1F1, 0x25CF}, //6161 #BLACK CIRCLE + {0xA1F2, 0x25CE}, //6162 #BULLSEYE + {0xA1F3, 0x25C7}, //6163 #WHITE DIAMOND + {0xA1F4, 0x25C6}, //6164 #BLACK DIAMOND + {0xA1F5, 0x25A1}, //6165 #WHITE SQUARE + {0xA1F6, 0x25A0}, //6166 #BLACK SQUARE + {0xA1F7, 0x25B3}, //6167 #WHITE UP-POINTING TRIANGLE + {0xA1F8, 0x25B2}, //6168 #BLACK UP-POINTING TRIANGLE + {0xA1F9, 0x203B}, //6169 #REFERENCE MARK + {0xA1FA, 0x2192}, //6170 #RIGHTWARDS ARROW + {0xA1FB, 0x2190}, //6171 #LEFTWARDS ARROW + {0xA1FC, 0x2191}, //6172 #UPWARDS ARROW + {0xA1FD, 0x2193}, //6173 #DOWNWARDS ARROW + {0xA1FE, 0x3013}, //6174 #GETA MARK + {0xA2A1, 0x2170}, //6175 #SMALL ROMAN NUMERAL ONE + {0xA2A2, 0x2171}, //6176 #SMALL ROMAN NUMERAL TWO + {0xA2A3, 0x2172}, //6177 #SMALL ROMAN NUMERAL THREE + {0xA2A4, 0x2173}, //6178 #SMALL ROMAN NUMERAL FOUR + {0xA2A5, 0x2174}, //6179 #SMALL ROMAN NUMERAL FIVE + {0xA2A6, 0x2175}, //6180 #SMALL ROMAN NUMERAL SIX + {0xA2A7, 0x2176}, //6181 #SMALL ROMAN NUMERAL SEVEN + {0xA2A8, 0x2177}, //6182 #SMALL ROMAN NUMERAL EIGHT + {0xA2A9, 0x2178}, //6183 #SMALL ROMAN NUMERAL NINE + {0xA2AA, 0x2179}, //6184 #SMALL ROMAN NUMERAL TEN + {0xA2B1, 0x2488}, //6185 #DIGIT ONE FULL STOP + {0xA2B2, 0x2489}, //6186 #DIGIT TWO FULL STOP + {0xA2B3, 0x248A}, //6187 #DIGIT THREE FULL STOP + {0xA2B4, 0x248B}, //6188 #DIGIT FOUR FULL STOP + {0xA2B5, 0x248C}, //6189 #DIGIT FIVE FULL STOP + {0xA2B6, 0x248D}, //6190 #DIGIT SIX FULL STOP + {0xA2B7, 0x248E}, //6191 #DIGIT SEVEN FULL STOP + {0xA2B8, 0x248F}, //6192 #DIGIT EIGHT FULL STOP + {0xA2B9, 0x2490}, //6193 #DIGIT NINE FULL STOP + {0xA2BA, 0x2491}, //6194 #NUMBER TEN FULL STOP + {0xA2BB, 0x2492}, //6195 #NUMBER ELEVEN FULL STOP + {0xA2BC, 0x2493}, //6196 #NUMBER TWELVE FULL STOP + {0xA2BD, 0x2494}, //6197 #NUMBER THIRTEEN FULL STOP + {0xA2BE, 0x2495}, //6198 #NUMBER FOURTEEN FULL STOP + {0xA2BF, 0x2496}, //6199 #NUMBER FIFTEEN FULL STOP + {0xA2C0, 0x2497}, //6200 #NUMBER SIXTEEN FULL STOP + {0xA2C1, 0x2498}, //6201 #NUMBER SEVENTEEN FULL STOP + {0xA2C2, 0x2499}, //6202 #NUMBER EIGHTEEN FULL STOP + {0xA2C3, 0x249A}, //6203 #NUMBER NINETEEN FULL STOP + {0xA2C4, 0x249B}, //6204 #NUMBER TWENTY FULL STOP + {0xA2C5, 0x2474}, //6205 #PARENTHESIZED DIGIT ONE + {0xA2C6, 0x2475}, //6206 #PARENTHESIZED DIGIT TWO + {0xA2C7, 0x2476}, //6207 #PARENTHESIZED DIGIT THREE + {0xA2C8, 0x2477}, //6208 #PARENTHESIZED DIGIT FOUR + {0xA2C9, 0x2478}, //6209 #PARENTHESIZED DIGIT FIVE + {0xA2CA, 0x2479}, //6210 #PARENTHESIZED DIGIT SIX + {0xA2CB, 0x247A}, //6211 #PARENTHESIZED DIGIT SEVEN + {0xA2CC, 0x247B}, //6212 #PARENTHESIZED DIGIT EIGHT + {0xA2CD, 0x247C}, //6213 #PARENTHESIZED DIGIT NINE + {0xA2CE, 0x247D}, //6214 #PARENTHESIZED NUMBER TEN + {0xA2CF, 0x247E}, //6215 #PARENTHESIZED NUMBER ELEVEN + {0xA2D0, 0x247F}, //6216 #PARENTHESIZED NUMBER TWELVE + {0xA2D1, 0x2480}, //6217 #PARENTHESIZED NUMBER THIRTEEN + {0xA2D2, 0x2481}, //6218 #PARENTHESIZED NUMBER FOURTEEN + {0xA2D3, 0x2482}, //6219 #PARENTHESIZED NUMBER FIFTEEN + {0xA2D4, 0x2483}, //6220 #PARENTHESIZED NUMBER SIXTEEN + {0xA2D5, 0x2484}, //6221 #PARENTHESIZED NUMBER SEVENTEEN + {0xA2D6, 0x2485}, //6222 #PARENTHESIZED NUMBER EIGHTEEN + {0xA2D7, 0x2486}, //6223 #PARENTHESIZED NUMBER NINETEEN + {0xA2D8, 0x2487}, //6224 #PARENTHESIZED NUMBER TWENTY + {0xA2D9, 0x2460}, //6225 #CIRCLED DIGIT ONE + {0xA2DA, 0x2461}, //6226 #CIRCLED DIGIT TWO + {0xA2DB, 0x2462}, //6227 #CIRCLED DIGIT THREE + {0xA2DC, 0x2463}, //6228 #CIRCLED DIGIT FOUR + {0xA2DD, 0x2464}, //6229 #CIRCLED DIGIT FIVE + {0xA2DE, 0x2465}, //6230 #CIRCLED DIGIT SIX + {0xA2DF, 0x2466}, //6231 #CIRCLED DIGIT SEVEN + {0xA2E0, 0x2467}, //6232 #CIRCLED DIGIT EIGHT + {0xA2E1, 0x2468}, //6233 #CIRCLED DIGIT NINE + {0xA2E2, 0x2469}, //6234 #CIRCLED NUMBER TEN + {0xA2E5, 0x3220}, //6235 #PARENTHESIZED IDEOGRAPH ONE + {0xA2E6, 0x3221}, //6236 #PARENTHESIZED IDEOGRAPH TWO + {0xA2E7, 0x3222}, //6237 #PARENTHESIZED IDEOGRAPH THREE + {0xA2E8, 0x3223}, //6238 #PARENTHESIZED IDEOGRAPH FOUR + {0xA2E9, 0x3224}, //6239 #PARENTHESIZED IDEOGRAPH FIVE + {0xA2EA, 0x3225}, //6240 #PARENTHESIZED IDEOGRAPH SIX + {0xA2EB, 0x3226}, //6241 #PARENTHESIZED IDEOGRAPH SEVEN + {0xA2EC, 0x3227}, //6242 #PARENTHESIZED IDEOGRAPH EIGHT + {0xA2ED, 0x3228}, //6243 #PARENTHESIZED IDEOGRAPH NINE + {0xA2EE, 0x3229}, //6244 #PARENTHESIZED IDEOGRAPH TEN + {0xA2F1, 0x2160}, //6245 #ROMAN NUMERAL ONE + {0xA2F2, 0x2161}, //6246 #ROMAN NUMERAL TWO + {0xA2F3, 0x2162}, //6247 #ROMAN NUMERAL THREE + {0xA2F4, 0x2163}, //6248 #ROMAN NUMERAL FOUR + {0xA2F5, 0x2164}, //6249 #ROMAN NUMERAL FIVE + {0xA2F6, 0x2165}, //6250 #ROMAN NUMERAL SIX + {0xA2F7, 0x2166}, //6251 #ROMAN NUMERAL SEVEN + {0xA2F8, 0x2167}, //6252 #ROMAN NUMERAL EIGHT + {0xA2F9, 0x2168}, //6253 #ROMAN NUMERAL NINE + {0xA2FA, 0x2169}, //6254 #ROMAN NUMERAL TEN + {0xA2FB, 0x216A}, //6255 #ROMAN NUMERAL ELEVEN + {0xA2FC, 0x216B}, //6256 #ROMAN NUMERAL TWELVE + {0xA3A1, 0xFF01}, //6257 #FULLWIDTH EXCLAMATION MARK + {0xA3A2, 0xFF02}, //6258 #FULLWIDTH QUOTATION MARK + {0xA3A3, 0xFF03}, //6259 #FULLWIDTH NUMBER SIGN + {0xA3A4, 0xFFE5}, //6260 #FULLWIDTH YEN SIGN + {0xA3A5, 0xFF05}, //6261 #FULLWIDTH PERCENT SIGN + {0xA3A6, 0xFF06}, //6262 #FULLWIDTH AMPERSAND + {0xA3A7, 0xFF07}, //6263 #FULLWIDTH APOSTROPHE + {0xA3A8, 0xFF08}, //6264 #FULLWIDTH LEFT PARENTHESIS + {0xA3A9, 0xFF09}, //6265 #FULLWIDTH RIGHT PARENTHESIS + {0xA3AA, 0xFF0A}, //6266 #FULLWIDTH ASTERISK + {0xA3AB, 0xFF0B}, //6267 #FULLWIDTH PLUS SIGN + {0xA3AC, 0xFF0C}, //6268 #FULLWIDTH COMMA + {0xA3AD, 0xFF0D}, //6269 #FULLWIDTH HYPHEN-MINUS + {0xA3AE, 0xFF0E}, //6270 #FULLWIDTH FULL STOP + {0xA3AF, 0xFF0F}, //6271 #FULLWIDTH SOLIDUS + {0xA3B0, 0xFF10}, //6272 #FULLWIDTH DIGIT ZERO + {0xA3B1, 0xFF11}, //6273 #FULLWIDTH DIGIT ONE + {0xA3B2, 0xFF12}, //6274 #FULLWIDTH DIGIT TWO + {0xA3B3, 0xFF13}, //6275 #FULLWIDTH DIGIT THREE + {0xA3B4, 0xFF14}, //6276 #FULLWIDTH DIGIT FOUR + {0xA3B5, 0xFF15}, //6277 #FULLWIDTH DIGIT FIVE + {0xA3B6, 0xFF16}, //6278 #FULLWIDTH DIGIT SIX + {0xA3B7, 0xFF17}, //6279 #FULLWIDTH DIGIT SEVEN + {0xA3B8, 0xFF18}, //6280 #FULLWIDTH DIGIT EIGHT + {0xA3B9, 0xFF19}, //6281 #FULLWIDTH DIGIT NINE + {0xA3BA, 0xFF1A}, //6282 #FULLWIDTH COLON + {0xA3BB, 0xFF1B}, //6283 #FULLWIDTH SEMICOLON + {0xA3BC, 0xFF1C}, //6284 #FULLWIDTH LESS-THAN SIGN + {0xA3BD, 0xFF1D}, //6285 #FULLWIDTH EQUALS SIGN + {0xA3BE, 0xFF1E}, //6286 #FULLWIDTH GREATER-THAN SIGN + {0xA3BF, 0xFF1F}, //6287 #FULLWIDTH QUESTION MARK + {0xA3C0, 0xFF20}, //6288 #FULLWIDTH COMMERCIAL AT + {0xA3C1, 0xFF21}, //6289 #FULLWIDTH LATIN CAPITAL LETTER A + {0xA3C2, 0xFF22}, //6290 #FULLWIDTH LATIN CAPITAL LETTER B + {0xA3C3, 0xFF23}, //6291 #FULLWIDTH LATIN CAPITAL LETTER C + {0xA3C4, 0xFF24}, //6292 #FULLWIDTH LATIN CAPITAL LETTER D + {0xA3C5, 0xFF25}, //6293 #FULLWIDTH LATIN CAPITAL LETTER E + {0xA3C6, 0xFF26}, //6294 #FULLWIDTH LATIN CAPITAL LETTER F + {0xA3C7, 0xFF27}, //6295 #FULLWIDTH LATIN CAPITAL LETTER G + {0xA3C8, 0xFF28}, //6296 #FULLWIDTH LATIN CAPITAL LETTER H + {0xA3C9, 0xFF29}, //6297 #FULLWIDTH LATIN CAPITAL LETTER I + {0xA3CA, 0xFF2A}, //6298 #FULLWIDTH LATIN CAPITAL LETTER J + {0xA3CB, 0xFF2B}, //6299 #FULLWIDTH LATIN CAPITAL LETTER K + {0xA3CC, 0xFF2C}, //6300 #FULLWIDTH LATIN CAPITAL LETTER L + {0xA3CD, 0xFF2D}, //6301 #FULLWIDTH LATIN CAPITAL LETTER M + {0xA3CE, 0xFF2E}, //6302 #FULLWIDTH LATIN CAPITAL LETTER N + {0xA3CF, 0xFF2F}, //6303 #FULLWIDTH LATIN CAPITAL LETTER O + {0xA3D0, 0xFF30}, //6304 #FULLWIDTH LATIN CAPITAL LETTER P + {0xA3D1, 0xFF31}, //6305 #FULLWIDTH LATIN CAPITAL LETTER Q + {0xA3D2, 0xFF32}, //6306 #FULLWIDTH LATIN CAPITAL LETTER R + {0xA3D3, 0xFF33}, //6307 #FULLWIDTH LATIN CAPITAL LETTER S + {0xA3D4, 0xFF34}, //6308 #FULLWIDTH LATIN CAPITAL LETTER T + {0xA3D5, 0xFF35}, //6309 #FULLWIDTH LATIN CAPITAL LETTER U + {0xA3D6, 0xFF36}, //6310 #FULLWIDTH LATIN CAPITAL LETTER V + {0xA3D7, 0xFF37}, //6311 #FULLWIDTH LATIN CAPITAL LETTER W + {0xA3D8, 0xFF38}, //6312 #FULLWIDTH LATIN CAPITAL LETTER X + {0xA3D9, 0xFF39}, //6313 #FULLWIDTH LATIN CAPITAL LETTER Y + {0xA3DA, 0xFF3A}, //6314 #FULLWIDTH LATIN CAPITAL LETTER Z + {0xA3DB, 0xFF3B}, //6315 #FULLWIDTH LEFT SQUARE BRACKET + {0xA3DC, 0xFF3C}, //6316 #FULLWIDTH REVERSE SOLIDUS + {0xA3DD, 0xFF3D}, //6317 #FULLWIDTH RIGHT SQUARE BRACKET + {0xA3DE, 0xFF3E}, //6318 #FULLWIDTH CIRCUMFLEX ACCENT + {0xA3DF, 0xFF3F}, //6319 #FULLWIDTH LOW LINE + {0xA3E0, 0xFF40}, //6320 #FULLWIDTH GRAVE ACCENT + {0xA3E1, 0xFF41}, //6321 #FULLWIDTH LATIN SMALL LETTER A + {0xA3E2, 0xFF42}, //6322 #FULLWIDTH LATIN SMALL LETTER B + {0xA3E3, 0xFF43}, //6323 #FULLWIDTH LATIN SMALL LETTER C + {0xA3E4, 0xFF44}, //6324 #FULLWIDTH LATIN SMALL LETTER D + {0xA3E5, 0xFF45}, //6325 #FULLWIDTH LATIN SMALL LETTER E + {0xA3E6, 0xFF46}, //6326 #FULLWIDTH LATIN SMALL LETTER F + {0xA3E7, 0xFF47}, //6327 #FULLWIDTH LATIN SMALL LETTER G + {0xA3E8, 0xFF48}, //6328 #FULLWIDTH LATIN SMALL LETTER H + {0xA3E9, 0xFF49}, //6329 #FULLWIDTH LATIN SMALL LETTER I + {0xA3EA, 0xFF4A}, //6330 #FULLWIDTH LATIN SMALL LETTER J + {0xA3EB, 0xFF4B}, //6331 #FULLWIDTH LATIN SMALL LETTER K + {0xA3EC, 0xFF4C}, //6332 #FULLWIDTH LATIN SMALL LETTER L + {0xA3ED, 0xFF4D}, //6333 #FULLWIDTH LATIN SMALL LETTER M + {0xA3EE, 0xFF4E}, //6334 #FULLWIDTH LATIN SMALL LETTER N + {0xA3EF, 0xFF4F}, //6335 #FULLWIDTH LATIN SMALL LETTER O + {0xA3F0, 0xFF50}, //6336 #FULLWIDTH LATIN SMALL LETTER P + {0xA3F1, 0xFF51}, //6337 #FULLWIDTH LATIN SMALL LETTER Q + {0xA3F2, 0xFF52}, //6338 #FULLWIDTH LATIN SMALL LETTER R + {0xA3F3, 0xFF53}, //6339 #FULLWIDTH LATIN SMALL LETTER S + {0xA3F4, 0xFF54}, //6340 #FULLWIDTH LATIN SMALL LETTER T + {0xA3F5, 0xFF55}, //6341 #FULLWIDTH LATIN SMALL LETTER U + {0xA3F6, 0xFF56}, //6342 #FULLWIDTH LATIN SMALL LETTER V + {0xA3F7, 0xFF57}, //6343 #FULLWIDTH LATIN SMALL LETTER W + {0xA3F8, 0xFF58}, //6344 #FULLWIDTH LATIN SMALL LETTER X + {0xA3F9, 0xFF59}, //6345 #FULLWIDTH LATIN SMALL LETTER Y + {0xA3FA, 0xFF5A}, //6346 #FULLWIDTH LATIN SMALL LETTER Z + {0xA3FB, 0xFF5B}, //6347 #FULLWIDTH LEFT CURLY BRACKET + {0xA3FC, 0xFF5C}, //6348 #FULLWIDTH VERTICAL LINE + {0xA3FD, 0xFF5D}, //6349 #FULLWIDTH RIGHT CURLY BRACKET + {0xA3FE, 0xFFE3}, //6350 #FULLWIDTH MACRON + {0xA4A1, 0x3041}, //6351 #HIRAGANA LETTER SMALL A + {0xA4A2, 0x3042}, //6352 #HIRAGANA LETTER A + {0xA4A3, 0x3043}, //6353 #HIRAGANA LETTER SMALL I + {0xA4A4, 0x3044}, //6354 #HIRAGANA LETTER I + {0xA4A5, 0x3045}, //6355 #HIRAGANA LETTER SMALL U + {0xA4A6, 0x3046}, //6356 #HIRAGANA LETTER U + {0xA4A7, 0x3047}, //6357 #HIRAGANA LETTER SMALL E + {0xA4A8, 0x3048}, //6358 #HIRAGANA LETTER E + {0xA4A9, 0x3049}, //6359 #HIRAGANA LETTER SMALL O + {0xA4AA, 0x304A}, //6360 #HIRAGANA LETTER O + {0xA4AB, 0x304B}, //6361 #HIRAGANA LETTER KA + {0xA4AC, 0x304C}, //6362 #HIRAGANA LETTER GA + {0xA4AD, 0x304D}, //6363 #HIRAGANA LETTER KI + {0xA4AE, 0x304E}, //6364 #HIRAGANA LETTER GI + {0xA4AF, 0x304F}, //6365 #HIRAGANA LETTER KU + {0xA4B0, 0x3050}, //6366 #HIRAGANA LETTER GU + {0xA4B1, 0x3051}, //6367 #HIRAGANA LETTER KE + {0xA4B2, 0x3052}, //6368 #HIRAGANA LETTER GE + {0xA4B3, 0x3053}, //6369 #HIRAGANA LETTER KO + {0xA4B4, 0x3054}, //6370 #HIRAGANA LETTER GO + {0xA4B5, 0x3055}, //6371 #HIRAGANA LETTER SA + {0xA4B6, 0x3056}, //6372 #HIRAGANA LETTER ZA + {0xA4B7, 0x3057}, //6373 #HIRAGANA LETTER SI + {0xA4B8, 0x3058}, //6374 #HIRAGANA LETTER ZI + {0xA4B9, 0x3059}, //6375 #HIRAGANA LETTER SU + {0xA4BA, 0x305A}, //6376 #HIRAGANA LETTER ZU + {0xA4BB, 0x305B}, //6377 #HIRAGANA LETTER SE + {0xA4BC, 0x305C}, //6378 #HIRAGANA LETTER ZE + {0xA4BD, 0x305D}, //6379 #HIRAGANA LETTER SO + {0xA4BE, 0x305E}, //6380 #HIRAGANA LETTER ZO + {0xA4BF, 0x305F}, //6381 #HIRAGANA LETTER TA + {0xA4C0, 0x3060}, //6382 #HIRAGANA LETTER DA + {0xA4C1, 0x3061}, //6383 #HIRAGANA LETTER TI + {0xA4C2, 0x3062}, //6384 #HIRAGANA LETTER DI + {0xA4C3, 0x3063}, //6385 #HIRAGANA LETTER SMALL TU + {0xA4C4, 0x3064}, //6386 #HIRAGANA LETTER TU + {0xA4C5, 0x3065}, //6387 #HIRAGANA LETTER DU + {0xA4C6, 0x3066}, //6388 #HIRAGANA LETTER TE + {0xA4C7, 0x3067}, //6389 #HIRAGANA LETTER DE + {0xA4C8, 0x3068}, //6390 #HIRAGANA LETTER TO + {0xA4C9, 0x3069}, //6391 #HIRAGANA LETTER DO + {0xA4CA, 0x306A}, //6392 #HIRAGANA LETTER NA + {0xA4CB, 0x306B}, //6393 #HIRAGANA LETTER NI + {0xA4CC, 0x306C}, //6394 #HIRAGANA LETTER NU + {0xA4CD, 0x306D}, //6395 #HIRAGANA LETTER NE + {0xA4CE, 0x306E}, //6396 #HIRAGANA LETTER NO + {0xA4CF, 0x306F}, //6397 #HIRAGANA LETTER HA + {0xA4D0, 0x3070}, //6398 #HIRAGANA LETTER BA + {0xA4D1, 0x3071}, //6399 #HIRAGANA LETTER PA + {0xA4D2, 0x3072}, //6400 #HIRAGANA LETTER HI + {0xA4D3, 0x3073}, //6401 #HIRAGANA LETTER BI + {0xA4D4, 0x3074}, //6402 #HIRAGANA LETTER PI + {0xA4D5, 0x3075}, //6403 #HIRAGANA LETTER HU + {0xA4D6, 0x3076}, //6404 #HIRAGANA LETTER BU + {0xA4D7, 0x3077}, //6405 #HIRAGANA LETTER PU + {0xA4D8, 0x3078}, //6406 #HIRAGANA LETTER HE + {0xA4D9, 0x3079}, //6407 #HIRAGANA LETTER BE + {0xA4DA, 0x307A}, //6408 #HIRAGANA LETTER PE + {0xA4DB, 0x307B}, //6409 #HIRAGANA LETTER HO + {0xA4DC, 0x307C}, //6410 #HIRAGANA LETTER BO + {0xA4DD, 0x307D}, //6411 #HIRAGANA LETTER PO + {0xA4DE, 0x307E}, //6412 #HIRAGANA LETTER MA + {0xA4DF, 0x307F}, //6413 #HIRAGANA LETTER MI + {0xA4E0, 0x3080}, //6414 #HIRAGANA LETTER MU + {0xA4E1, 0x3081}, //6415 #HIRAGANA LETTER ME + {0xA4E2, 0x3082}, //6416 #HIRAGANA LETTER MO + {0xA4E3, 0x3083}, //6417 #HIRAGANA LETTER SMALL YA + {0xA4E4, 0x3084}, //6418 #HIRAGANA LETTER YA + {0xA4E5, 0x3085}, //6419 #HIRAGANA LETTER SMALL YU + {0xA4E6, 0x3086}, //6420 #HIRAGANA LETTER YU + {0xA4E7, 0x3087}, //6421 #HIRAGANA LETTER SMALL YO + {0xA4E8, 0x3088}, //6422 #HIRAGANA LETTER YO + {0xA4E9, 0x3089}, //6423 #HIRAGANA LETTER RA + {0xA4EA, 0x308A}, //6424 #HIRAGANA LETTER RI + {0xA4EB, 0x308B}, //6425 #HIRAGANA LETTER RU + {0xA4EC, 0x308C}, //6426 #HIRAGANA LETTER RE + {0xA4ED, 0x308D}, //6427 #HIRAGANA LETTER RO + {0xA4EE, 0x308E}, //6428 #HIRAGANA LETTER SMALL WA + {0xA4EF, 0x308F}, //6429 #HIRAGANA LETTER WA + {0xA4F0, 0x3090}, //6430 #HIRAGANA LETTER WI + {0xA4F1, 0x3091}, //6431 #HIRAGANA LETTER WE + {0xA4F2, 0x3092}, //6432 #HIRAGANA LETTER WO + {0xA4F3, 0x3093}, //6433 #HIRAGANA LETTER N + {0xA5A1, 0x30A1}, //6434 #KATAKANA LETTER SMALL A + {0xA5A2, 0x30A2}, //6435 #KATAKANA LETTER A + {0xA5A3, 0x30A3}, //6436 #KATAKANA LETTER SMALL I + {0xA5A4, 0x30A4}, //6437 #KATAKANA LETTER I + {0xA5A5, 0x30A5}, //6438 #KATAKANA LETTER SMALL U + {0xA5A6, 0x30A6}, //6439 #KATAKANA LETTER U + {0xA5A7, 0x30A7}, //6440 #KATAKANA LETTER SMALL E + {0xA5A8, 0x30A8}, //6441 #KATAKANA LETTER E + {0xA5A9, 0x30A9}, //6442 #KATAKANA LETTER SMALL O + {0xA5AA, 0x30AA}, //6443 #KATAKANA LETTER O + {0xA5AB, 0x30AB}, //6444 #KATAKANA LETTER KA + {0xA5AC, 0x30AC}, //6445 #KATAKANA LETTER GA + {0xA5AD, 0x30AD}, //6446 #KATAKANA LETTER KI + {0xA5AE, 0x30AE}, //6447 #KATAKANA LETTER GI + {0xA5AF, 0x30AF}, //6448 #KATAKANA LETTER KU + {0xA5B0, 0x30B0}, //6449 #KATAKANA LETTER GU + {0xA5B1, 0x30B1}, //6450 #KATAKANA LETTER KE + {0xA5B2, 0x30B2}, //6451 #KATAKANA LETTER GE + {0xA5B3, 0x30B3}, //6452 #KATAKANA LETTER KO + {0xA5B4, 0x30B4}, //6453 #KATAKANA LETTER GO + {0xA5B5, 0x30B5}, //6454 #KATAKANA LETTER SA + {0xA5B6, 0x30B6}, //6455 #KATAKANA LETTER ZA + {0xA5B7, 0x30B7}, //6456 #KATAKANA LETTER SI + {0xA5B8, 0x30B8}, //6457 #KATAKANA LETTER ZI + {0xA5B9, 0x30B9}, //6458 #KATAKANA LETTER SU + {0xA5BA, 0x30BA}, //6459 #KATAKANA LETTER ZU + {0xA5BB, 0x30BB}, //6460 #KATAKANA LETTER SE + {0xA5BC, 0x30BC}, //6461 #KATAKANA LETTER ZE + {0xA5BD, 0x30BD}, //6462 #KATAKANA LETTER SO + {0xA5BE, 0x30BE}, //6463 #KATAKANA LETTER ZO + {0xA5BF, 0x30BF}, //6464 #KATAKANA LETTER TA + {0xA5C0, 0x30C0}, //6465 #KATAKANA LETTER DA + {0xA5C1, 0x30C1}, //6466 #KATAKANA LETTER TI + {0xA5C2, 0x30C2}, //6467 #KATAKANA LETTER DI + {0xA5C3, 0x30C3}, //6468 #KATAKANA LETTER SMALL TU + {0xA5C4, 0x30C4}, //6469 #KATAKANA LETTER TU + {0xA5C5, 0x30C5}, //6470 #KATAKANA LETTER DU + {0xA5C6, 0x30C6}, //6471 #KATAKANA LETTER TE + {0xA5C7, 0x30C7}, //6472 #KATAKANA LETTER DE + {0xA5C8, 0x30C8}, //6473 #KATAKANA LETTER TO + {0xA5C9, 0x30C9}, //6474 #KATAKANA LETTER DO + {0xA5CA, 0x30CA}, //6475 #KATAKANA LETTER NA + {0xA5CB, 0x30CB}, //6476 #KATAKANA LETTER NI + {0xA5CC, 0x30CC}, //6477 #KATAKANA LETTER NU + {0xA5CD, 0x30CD}, //6478 #KATAKANA LETTER NE + {0xA5CE, 0x30CE}, //6479 #KATAKANA LETTER NO + {0xA5CF, 0x30CF}, //6480 #KATAKANA LETTER HA + {0xA5D0, 0x30D0}, //6481 #KATAKANA LETTER BA + {0xA5D1, 0x30D1}, //6482 #KATAKANA LETTER PA + {0xA5D2, 0x30D2}, //6483 #KATAKANA LETTER HI + {0xA5D3, 0x30D3}, //6484 #KATAKANA LETTER BI + {0xA5D4, 0x30D4}, //6485 #KATAKANA LETTER PI + {0xA5D5, 0x30D5}, //6486 #KATAKANA LETTER HU + {0xA5D6, 0x30D6}, //6487 #KATAKANA LETTER BU + {0xA5D7, 0x30D7}, //6488 #KATAKANA LETTER PU + {0xA5D8, 0x30D8}, //6489 #KATAKANA LETTER HE + {0xA5D9, 0x30D9}, //6490 #KATAKANA LETTER BE + {0xA5DA, 0x30DA}, //6491 #KATAKANA LETTER PE + {0xA5DB, 0x30DB}, //6492 #KATAKANA LETTER HO + {0xA5DC, 0x30DC}, //6493 #KATAKANA LETTER BO + {0xA5DD, 0x30DD}, //6494 #KATAKANA LETTER PO + {0xA5DE, 0x30DE}, //6495 #KATAKANA LETTER MA + {0xA5DF, 0x30DF}, //6496 #KATAKANA LETTER MI + {0xA5E0, 0x30E0}, //6497 #KATAKANA LETTER MU + {0xA5E1, 0x30E1}, //6498 #KATAKANA LETTER ME + {0xA5E2, 0x30E2}, //6499 #KATAKANA LETTER MO + {0xA5E3, 0x30E3}, //6500 #KATAKANA LETTER SMALL YA + {0xA5E4, 0x30E4}, //6501 #KATAKANA LETTER YA + {0xA5E5, 0x30E5}, //6502 #KATAKANA LETTER SMALL YU + {0xA5E6, 0x30E6}, //6503 #KATAKANA LETTER YU + {0xA5E7, 0x30E7}, //6504 #KATAKANA LETTER SMALL YO + {0xA5E8, 0x30E8}, //6505 #KATAKANA LETTER YO + {0xA5E9, 0x30E9}, //6506 #KATAKANA LETTER RA + {0xA5EA, 0x30EA}, //6507 #KATAKANA LETTER RI + {0xA5EB, 0x30EB}, //6508 #KATAKANA LETTER RU + {0xA5EC, 0x30EC}, //6509 #KATAKANA LETTER RE + {0xA5ED, 0x30ED}, //6510 #KATAKANA LETTER RO + {0xA5EE, 0x30EE}, //6511 #KATAKANA LETTER SMALL WA + {0xA5EF, 0x30EF}, //6512 #KATAKANA LETTER WA + {0xA5F0, 0x30F0}, //6513 #KATAKANA LETTER WI + {0xA5F1, 0x30F1}, //6514 #KATAKANA LETTER WE + {0xA5F2, 0x30F2}, //6515 #KATAKANA LETTER WO + {0xA5F3, 0x30F3}, //6516 #KATAKANA LETTER N + {0xA5F4, 0x30F4}, //6517 #KATAKANA LETTER VU + {0xA5F5, 0x30F5}, //6518 #KATAKANA LETTER SMALL KA + {0xA5F6, 0x30F6}, //6519 #KATAKANA LETTER SMALL KE + {0xA6A1, 0x0391}, //6520 #GREEK CAPITAL LETTER ALPHA + {0xA6A2, 0x0392}, //6521 #GREEK CAPITAL LETTER BETA + {0xA6A3, 0x0393}, //6522 #GREEK CAPITAL LETTER GAMMA + {0xA6A4, 0x0394}, //6523 #GREEK CAPITAL LETTER DELTA + {0xA6A5, 0x0395}, //6524 #GREEK CAPITAL LETTER EPSILON + {0xA6A6, 0x0396}, //6525 #GREEK CAPITAL LETTER ZETA + {0xA6A7, 0x0397}, //6526 #GREEK CAPITAL LETTER ETA + {0xA6A8, 0x0398}, //6527 #GREEK CAPITAL LETTER THETA + {0xA6A9, 0x0399}, //6528 #GREEK CAPITAL LETTER IOTA + {0xA6AA, 0x039A}, //6529 #GREEK CAPITAL LETTER KAPPA + {0xA6AB, 0x039B}, //6530 #GREEK CAPITAL LETTER LAMDA + {0xA6AC, 0x039C}, //6531 #GREEK CAPITAL LETTER MU + {0xA6AD, 0x039D}, //6532 #GREEK CAPITAL LETTER NU + {0xA6AE, 0x039E}, //6533 #GREEK CAPITAL LETTER XI + {0xA6AF, 0x039F}, //6534 #GREEK CAPITAL LETTER OMICRON + {0xA6B0, 0x03A0}, //6535 #GREEK CAPITAL LETTER PI + {0xA6B1, 0x03A1}, //6536 #GREEK CAPITAL LETTER RHO + {0xA6B2, 0x03A3}, //6537 #GREEK CAPITAL LETTER SIGMA + {0xA6B3, 0x03A4}, //6538 #GREEK CAPITAL LETTER TAU + {0xA6B4, 0x03A5}, //6539 #GREEK CAPITAL LETTER UPSILON + {0xA6B5, 0x03A6}, //6540 #GREEK CAPITAL LETTER PHI + {0xA6B6, 0x03A7}, //6541 #GREEK CAPITAL LETTER CHI + {0xA6B7, 0x03A8}, //6542 #GREEK CAPITAL LETTER PSI + {0xA6B8, 0x03A9}, //6543 #GREEK CAPITAL LETTER OMEGA + {0xA6C1, 0x03B1}, //6544 #GREEK SMALL LETTER ALPHA + {0xA6C2, 0x03B2}, //6545 #GREEK SMALL LETTER BETA + {0xA6C3, 0x03B3}, //6546 #GREEK SMALL LETTER GAMMA + {0xA6C4, 0x03B4}, //6547 #GREEK SMALL LETTER DELTA + {0xA6C5, 0x03B5}, //6548 #GREEK SMALL LETTER EPSILON + {0xA6C6, 0x03B6}, //6549 #GREEK SMALL LETTER ZETA + {0xA6C7, 0x03B7}, //6550 #GREEK SMALL LETTER ETA + {0xA6C8, 0x03B8}, //6551 #GREEK SMALL LETTER THETA + {0xA6C9, 0x03B9}, //6552 #GREEK SMALL LETTER IOTA + {0xA6CA, 0x03BA}, //6553 #GREEK SMALL LETTER KAPPA + {0xA6CB, 0x03BB}, //6554 #GREEK SMALL LETTER LAMDA + {0xA6CC, 0x03BC}, //6555 #GREEK SMALL LETTER MU + {0xA6CD, 0x03BD}, //6556 #GREEK SMALL LETTER NU + {0xA6CE, 0x03BE}, //6557 #GREEK SMALL LETTER XI + {0xA6CF, 0x03BF}, //6558 #GREEK SMALL LETTER OMICRON + {0xA6D0, 0x03C0}, //6559 #GREEK SMALL LETTER PI + {0xA6D1, 0x03C1}, //6560 #GREEK SMALL LETTER RHO + {0xA6D2, 0x03C3}, //6561 #GREEK SMALL LETTER SIGMA + {0xA6D3, 0x03C4}, //6562 #GREEK SMALL LETTER TAU + {0xA6D4, 0x03C5}, //6563 #GREEK SMALL LETTER UPSILON + {0xA6D5, 0x03C6}, //6564 #GREEK SMALL LETTER PHI + {0xA6D6, 0x03C7}, //6565 #GREEK SMALL LETTER CHI + {0xA6D7, 0x03C8}, //6566 #GREEK SMALL LETTER PSI + {0xA6D8, 0x03C9}, //6567 #GREEK SMALL LETTER OMEGA + {0xA6E0, 0xFE35}, //6568 #PRESENTATION FORM FOR VERTICAL LEFT PARENTHESIS + {0xA6E1, 0xFE36}, //6569 #PRESENTATION FORM FOR VERTICAL RIGHT PARENTHESIS + {0xA6E2, 0xFE39}, //6570 #PRESENTATION FORM FOR VERTICAL LEFT TORTOISE SHELL BRACKET + {0xA6E3, 0xFE3A}, //6571 #PRESENTATION FORM FOR VERTICAL RIGHT TORTOISE SHELL BRACKET + {0xA6E4, 0xFE3F}, //6572 #PRESENTATION FORM FOR VERTICAL LEFT ANGLE BRACKET + {0xA6E5, 0xFE40}, //6573 #PRESENTATION FORM FOR VERTICAL RIGHT ANGLE BRACKET + {0xA6E6, 0xFE3D}, //6574 #PRESENTATION FORM FOR VERTICAL LEFT DOUBLE ANGLE BRACKET + {0xA6E7, 0xFE3E}, //6575 #PRESENTATION FORM FOR VERTICAL RIGHT DOUBLE ANGLE BRACKET + {0xA6E8, 0xFE41}, //6576 #PRESENTATION FORM FOR VERTICAL LEFT CORNER BRACKET + {0xA6E9, 0xFE42}, //6577 #PRESENTATION FORM FOR VERTICAL RIGHT CORNER BRACKET + {0xA6EA, 0xFE43}, //6578 #PRESENTATION FORM FOR VERTICAL LEFT WHITE CORNER BRACKET + {0xA6EB, 0xFE44}, //6579 #PRESENTATION FORM FOR VERTICAL RIGHT WHITE CORNER BRACKET + {0xA6EE, 0xFE3B}, //6580 #PRESENTATION FORM FOR VERTICAL LEFT BLACK LENTICULAR BRACKET + {0xA6EF, 0xFE3C}, //6581 #PRESENTATION FORM FOR VERTICAL RIGHT BLACK LENTICULAR BRACKET + {0xA6F0, 0xFE37}, //6582 #PRESENTATION FORM FOR VERTICAL LEFT CURLY BRACKET + {0xA6F1, 0xFE38}, //6583 #PRESENTATION FORM FOR VERTICAL RIGHT CURLY BRACKET + {0xA6F2, 0xFE31}, //6584 #PRESENTATION FORM FOR VERTICAL EM DASH + {0xA6F4, 0xFE33}, //6585 #PRESENTATION FORM FOR VERTICAL LOW LINE + {0xA6F5, 0xFE34}, //6586 #PRESENTATION FORM FOR VERTICAL WAVY LOW LINE + {0xA7A1, 0x0410}, //6587 #CYRILLIC CAPITAL LETTER A + {0xA7A2, 0x0411}, //6588 #CYRILLIC CAPITAL LETTER BE + {0xA7A3, 0x0412}, //6589 #CYRILLIC CAPITAL LETTER VE + {0xA7A4, 0x0413}, //6590 #CYRILLIC CAPITAL LETTER GHE + {0xA7A5, 0x0414}, //6591 #CYRILLIC CAPITAL LETTER DE + {0xA7A6, 0x0415}, //6592 #CYRILLIC CAPITAL LETTER IE + {0xA7A7, 0x0401}, //6593 #CYRILLIC CAPITAL LETTER IO + {0xA7A8, 0x0416}, //6594 #CYRILLIC CAPITAL LETTER ZHE + {0xA7A9, 0x0417}, //6595 #CYRILLIC CAPITAL LETTER ZE + {0xA7AA, 0x0418}, //6596 #CYRILLIC CAPITAL LETTER I + {0xA7AB, 0x0419}, //6597 #CYRILLIC CAPITAL LETTER SHORT I + {0xA7AC, 0x041A}, //6598 #CYRILLIC CAPITAL LETTER KA + {0xA7AD, 0x041B}, //6599 #CYRILLIC CAPITAL LETTER EL + {0xA7AE, 0x041C}, //6600 #CYRILLIC CAPITAL LETTER EM + {0xA7AF, 0x041D}, //6601 #CYRILLIC CAPITAL LETTER EN + {0xA7B0, 0x041E}, //6602 #CYRILLIC CAPITAL LETTER O + {0xA7B1, 0x041F}, //6603 #CYRILLIC CAPITAL LETTER PE + {0xA7B2, 0x0420}, //6604 #CYRILLIC CAPITAL LETTER ER + {0xA7B3, 0x0421}, //6605 #CYRILLIC CAPITAL LETTER ES + {0xA7B4, 0x0422}, //6606 #CYRILLIC CAPITAL LETTER TE + {0xA7B5, 0x0423}, //6607 #CYRILLIC CAPITAL LETTER U + {0xA7B6, 0x0424}, //6608 #CYRILLIC CAPITAL LETTER EF + {0xA7B7, 0x0425}, //6609 #CYRILLIC CAPITAL LETTER HA + {0xA7B8, 0x0426}, //6610 #CYRILLIC CAPITAL LETTER TSE + {0xA7B9, 0x0427}, //6611 #CYRILLIC CAPITAL LETTER CHE + {0xA7BA, 0x0428}, //6612 #CYRILLIC CAPITAL LETTER SHA + {0xA7BB, 0x0429}, //6613 #CYRILLIC CAPITAL LETTER SHCHA + {0xA7BC, 0x042A}, //6614 #CYRILLIC CAPITAL LETTER HARD SIGN + {0xA7BD, 0x042B}, //6615 #CYRILLIC CAPITAL LETTER YERU + {0xA7BE, 0x042C}, //6616 #CYRILLIC CAPITAL LETTER SOFT SIGN + {0xA7BF, 0x042D}, //6617 #CYRILLIC CAPITAL LETTER E + {0xA7C0, 0x042E}, //6618 #CYRILLIC CAPITAL LETTER YU + {0xA7C1, 0x042F}, //6619 #CYRILLIC CAPITAL LETTER YA + {0xA7D1, 0x0430}, //6620 #CYRILLIC SMALL LETTER A + {0xA7D2, 0x0431}, //6621 #CYRILLIC SMALL LETTER BE + {0xA7D3, 0x0432}, //6622 #CYRILLIC SMALL LETTER VE + {0xA7D4, 0x0433}, //6623 #CYRILLIC SMALL LETTER GHE + {0xA7D5, 0x0434}, //6624 #CYRILLIC SMALL LETTER DE + {0xA7D6, 0x0435}, //6625 #CYRILLIC SMALL LETTER IE + {0xA7D7, 0x0451}, //6626 #CYRILLIC SMALL LETTER IO + {0xA7D8, 0x0436}, //6627 #CYRILLIC SMALL LETTER ZHE + {0xA7D9, 0x0437}, //6628 #CYRILLIC SMALL LETTER ZE + {0xA7DA, 0x0438}, //6629 #CYRILLIC SMALL LETTER I + {0xA7DB, 0x0439}, //6630 #CYRILLIC SMALL LETTER SHORT I + {0xA7DC, 0x043A}, //6631 #CYRILLIC SMALL LETTER KA + {0xA7DD, 0x043B}, //6632 #CYRILLIC SMALL LETTER EL + {0xA7DE, 0x043C}, //6633 #CYRILLIC SMALL LETTER EM + {0xA7DF, 0x043D}, //6634 #CYRILLIC SMALL LETTER EN + {0xA7E0, 0x043E}, //6635 #CYRILLIC SMALL LETTER O + {0xA7E1, 0x043F}, //6636 #CYRILLIC SMALL LETTER PE + {0xA7E2, 0x0440}, //6637 #CYRILLIC SMALL LETTER ER + {0xA7E3, 0x0441}, //6638 #CYRILLIC SMALL LETTER ES + {0xA7E4, 0x0442}, //6639 #CYRILLIC SMALL LETTER TE + {0xA7E5, 0x0443}, //6640 #CYRILLIC SMALL LETTER U + {0xA7E6, 0x0444}, //6641 #CYRILLIC SMALL LETTER EF + {0xA7E7, 0x0445}, //6642 #CYRILLIC SMALL LETTER HA + {0xA7E8, 0x0446}, //6643 #CYRILLIC SMALL LETTER TSE + {0xA7E9, 0x0447}, //6644 #CYRILLIC SMALL LETTER CHE + {0xA7EA, 0x0448}, //6645 #CYRILLIC SMALL LETTER SHA + {0xA7EB, 0x0449}, //6646 #CYRILLIC SMALL LETTER SHCHA + {0xA7EC, 0x044A}, //6647 #CYRILLIC SMALL LETTER HARD SIGN + {0xA7ED, 0x044B}, //6648 #CYRILLIC SMALL LETTER YERU + {0xA7EE, 0x044C}, //6649 #CYRILLIC SMALL LETTER SOFT SIGN + {0xA7EF, 0x044D}, //6650 #CYRILLIC SMALL LETTER E + {0xA7F0, 0x044E}, //6651 #CYRILLIC SMALL LETTER YU + {0xA7F1, 0x044F}, //6652 #CYRILLIC SMALL LETTER YA + {0xA840, 0x02CA}, //6653 #MODIFIER LETTER ACUTE ACCENT + {0xA841, 0x02CB}, //6654 #MODIFIER LETTER GRAVE ACCENT + {0xA842, 0x02D9}, //6655 #DOT ABOVE + {0xA843, 0x2013}, //6656 #EN DASH + {0xA844, 0x2015}, //6657 #HORIZONTAL BAR + {0xA845, 0x2025}, //6658 #TWO DOT LEADER + {0xA846, 0x2035}, //6659 #REVERSED PRIME + {0xA847, 0x2105}, //6660 #CARE OF + {0xA848, 0x2109}, //6661 #DEGREE FAHRENHEIT + {0xA849, 0x2196}, //6662 #NORTH WEST ARROW + {0xA84A, 0x2197}, //6663 #NORTH EAST ARROW + {0xA84B, 0x2198}, //6664 #SOUTH EAST ARROW + {0xA84C, 0x2199}, //6665 #SOUTH WEST ARROW + {0xA84D, 0x2215}, //6666 #DIVISION SLASH + {0xA84E, 0x221F}, //6667 #RIGHT ANGLE + {0xA84F, 0x2223}, //6668 #DIVIDES + {0xA850, 0x2252}, //6669 #APPROXIMATELY EQUAL TO OR THE IMAGE OF + {0xA851, 0x2266}, //6670 #LESS-THAN OVER EQUAL TO + {0xA852, 0x2267}, //6671 #GREATER-THAN OVER EQUAL TO + {0xA853, 0x22BF}, //6672 #RIGHT TRIANGLE + {0xA854, 0x2550}, //6673 #BOX DRAWINGS DOUBLE HORIZONTAL + {0xA855, 0x2551}, //6674 #BOX DRAWINGS DOUBLE VERTICAL + {0xA856, 0x2552}, //6675 #BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE + {0xA857, 0x2553}, //6676 #BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE + {0xA858, 0x2554}, //6677 #BOX DRAWINGS DOUBLE DOWN AND RIGHT + {0xA859, 0x2555}, //6678 #BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE + {0xA85A, 0x2556}, //6679 #BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE + {0xA85B, 0x2557}, //6680 #BOX DRAWINGS DOUBLE DOWN AND LEFT + {0xA85C, 0x2558}, //6681 #BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE + {0xA85D, 0x2559}, //6682 #BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE + {0xA85E, 0x255A}, //6683 #BOX DRAWINGS DOUBLE UP AND RIGHT + {0xA85F, 0x255B}, //6684 #BOX DRAWINGS UP SINGLE AND LEFT DOUBLE + {0xA860, 0x255C}, //6685 #BOX DRAWINGS UP DOUBLE AND LEFT SINGLE + {0xA861, 0x255D}, //6686 #BOX DRAWINGS DOUBLE UP AND LEFT + {0xA862, 0x255E}, //6687 #BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE + {0xA863, 0x255F}, //6688 #BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE + {0xA864, 0x2560}, //6689 #BOX DRAWINGS DOUBLE VERTICAL AND RIGHT + {0xA865, 0x2561}, //6690 #BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE + {0xA866, 0x2562}, //6691 #BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE + {0xA867, 0x2563}, //6692 #BOX DRAWINGS DOUBLE VERTICAL AND LEFT + {0xA868, 0x2564}, //6693 #BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE + {0xA869, 0x2565}, //6694 #BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE + {0xA86A, 0x2566}, //6695 #BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL + {0xA86B, 0x2567}, //6696 #BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE + {0xA86C, 0x2568}, //6697 #BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE + {0xA86D, 0x2569}, //6698 #BOX DRAWINGS DOUBLE UP AND HORIZONTAL + {0xA86E, 0x256A}, //6699 #BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE + {0xA86F, 0x256B}, //6700 #BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE + {0xA870, 0x256C}, //6701 #BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL + {0xA871, 0x256D}, //6702 #BOX DRAWINGS LIGHT ARC DOWN AND RIGHT + {0xA872, 0x256E}, //6703 #BOX DRAWINGS LIGHT ARC DOWN AND LEFT + {0xA873, 0x256F}, //6704 #BOX DRAWINGS LIGHT ARC UP AND LEFT + {0xA874, 0x2570}, //6705 #BOX DRAWINGS LIGHT ARC UP AND RIGHT + {0xA875, 0x2571}, //6706 #BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT + {0xA876, 0x2572}, //6707 #BOX DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT + {0xA877, 0x2573}, //6708 #BOX DRAWINGS LIGHT DIAGONAL CROSS + {0xA878, 0x2581}, //6709 #LOWER ONE EIGHTH BLOCK + {0xA879, 0x2582}, //6710 #LOWER ONE QUARTER BLOCK + {0xA87A, 0x2583}, //6711 #LOWER THREE EIGHTHS BLOCK + {0xA87B, 0x2584}, //6712 #LOWER HALF BLOCK + {0xA87C, 0x2585}, //6713 #LOWER FIVE EIGHTHS BLOCK + {0xA87D, 0x2586}, //6714 #LOWER THREE QUARTERS BLOCK + {0xA87E, 0x2587}, //6715 #LOWER SEVEN EIGHTHS BLOCK + {0xA880, 0x2588}, //6716 #FULL BLOCK + {0xA881, 0x2589}, //6717 #LEFT SEVEN EIGHTHS BLOCK + {0xA882, 0x258A}, //6718 #LEFT THREE QUARTERS BLOCK + {0xA883, 0x258B}, //6719 #LEFT FIVE EIGHTHS BLOCK + {0xA884, 0x258C}, //6720 #LEFT HALF BLOCK + {0xA885, 0x258D}, //6721 #LEFT THREE EIGHTHS BLOCK + {0xA886, 0x258E}, //6722 #LEFT ONE QUARTER BLOCK + {0xA887, 0x258F}, //6723 #LEFT ONE EIGHTH BLOCK + {0xA888, 0x2593}, //6724 #DARK SHADE + {0xA889, 0x2594}, //6725 #UPPER ONE EIGHTH BLOCK + {0xA88A, 0x2595}, //6726 #RIGHT ONE EIGHTH BLOCK + {0xA88B, 0x25BC}, //6727 #BLACK DOWN-POINTING TRIANGLE + {0xA88C, 0x25BD}, //6728 #WHITE DOWN-POINTING TRIANGLE + {0xA88D, 0x25E2}, //6729 #BLACK LOWER RIGHT TRIANGLE + {0xA88E, 0x25E3}, //6730 #BLACK LOWER LEFT TRIANGLE + {0xA88F, 0x25E4}, //6731 #BLACK UPPER LEFT TRIANGLE + {0xA890, 0x25E5}, //6732 #BLACK UPPER RIGHT TRIANGLE + {0xA891, 0x2609}, //6733 #SUN + {0xA892, 0x2295}, //6734 #CIRCLED PLUS + {0xA893, 0x3012}, //6735 #POSTAL MARK + {0xA894, 0x301D}, //6736 #REVERSED DOUBLE PRIME QUOTATION MARK + {0xA895, 0x301E}, //6737 #DOUBLE PRIME QUOTATION MARK + {0xA8A1, 0x0101}, //6738 #LATIN SMALL LETTER A WITH MACRON + {0xA8A2, 0x00E1}, //6739 #LATIN SMALL LETTER A WITH ACUTE + {0xA8A3, 0x01CE}, //6740 #LATIN SMALL LETTER A WITH CARON + {0xA8A4, 0x00E0}, //6741 #LATIN SMALL LETTER A WITH GRAVE + {0xA8A5, 0x0113}, //6742 #LATIN SMALL LETTER E WITH MACRON + {0xA8A6, 0x00E9}, //6743 #LATIN SMALL LETTER E WITH ACUTE + {0xA8A7, 0x011B}, //6744 #LATIN SMALL LETTER E WITH CARON + {0xA8A8, 0x00E8}, //6745 #LATIN SMALL LETTER E WITH GRAVE + {0xA8A9, 0x012B}, //6746 #LATIN SMALL LETTER I WITH MACRON + {0xA8AA, 0x00ED}, //6747 #LATIN SMALL LETTER I WITH ACUTE + {0xA8AB, 0x01D0}, //6748 #LATIN SMALL LETTER I WITH CARON + {0xA8AC, 0x00EC}, //6749 #LATIN SMALL LETTER I WITH GRAVE + {0xA8AD, 0x014D}, //6750 #LATIN SMALL LETTER O WITH MACRON + {0xA8AE, 0x00F3}, //6751 #LATIN SMALL LETTER O WITH ACUTE + {0xA8AF, 0x01D2}, //6752 #LATIN SMALL LETTER O WITH CARON + {0xA8B0, 0x00F2}, //6753 #LATIN SMALL LETTER O WITH GRAVE + {0xA8B1, 0x016B}, //6754 #LATIN SMALL LETTER U WITH MACRON + {0xA8B2, 0x00FA}, //6755 #LATIN SMALL LETTER U WITH ACUTE + {0xA8B3, 0x01D4}, //6756 #LATIN SMALL LETTER U WITH CARON + {0xA8B4, 0x00F9}, //6757 #LATIN SMALL LETTER U WITH GRAVE + {0xA8B5, 0x01D6}, //6758 #LATIN SMALL LETTER U WITH DIAERESIS AND MACRON + {0xA8B6, 0x01D8}, //6759 #LATIN SMALL LETTER U WITH DIAERESIS AND ACUTE + {0xA8B7, 0x01DA}, //6760 #LATIN SMALL LETTER U WITH DIAERESIS AND CARON + {0xA8B8, 0x01DC}, //6761 #LATIN SMALL LETTER U WITH DIAERESIS AND GRAVE + {0xA8B9, 0x00FC}, //6762 #LATIN SMALL LETTER U WITH DIAERESIS + {0xA8BA, 0x00EA}, //6763 #LATIN SMALL LETTER E WITH CIRCUMFLEX + {0xA8BB, 0x0251}, //6764 #LATIN SMALL LETTER ALPHA + {0xA8BD, 0x0144}, //6765 #LATIN SMALL LETTER N WITH ACUTE + {0xA8BE, 0x0148}, //6766 #LATIN SMALL LETTER N WITH CARON + {0xA8C0, 0x0261}, //6767 #LATIN SMALL LETTER SCRIPT G + {0xA8C5, 0x3105}, //6768 #BOPOMOFO LETTER B + {0xA8C6, 0x3106}, //6769 #BOPOMOFO LETTER P + {0xA8C7, 0x3107}, //6770 #BOPOMOFO LETTER M + {0xA8C8, 0x3108}, //6771 #BOPOMOFO LETTER F + {0xA8C9, 0x3109}, //6772 #BOPOMOFO LETTER D + {0xA8CA, 0x310A}, //6773 #BOPOMOFO LETTER T + {0xA8CB, 0x310B}, //6774 #BOPOMOFO LETTER N + {0xA8CC, 0x310C}, //6775 #BOPOMOFO LETTER L + {0xA8CD, 0x310D}, //6776 #BOPOMOFO LETTER G + {0xA8CE, 0x310E}, //6777 #BOPOMOFO LETTER K + {0xA8CF, 0x310F}, //6778 #BOPOMOFO LETTER H + {0xA8D0, 0x3110}, //6779 #BOPOMOFO LETTER J + {0xA8D1, 0x3111}, //6780 #BOPOMOFO LETTER Q + {0xA8D2, 0x3112}, //6781 #BOPOMOFO LETTER X + {0xA8D3, 0x3113}, //6782 #BOPOMOFO LETTER ZH + {0xA8D4, 0x3114}, //6783 #BOPOMOFO LETTER CH + {0xA8D5, 0x3115}, //6784 #BOPOMOFO LETTER SH + {0xA8D6, 0x3116}, //6785 #BOPOMOFO LETTER R + {0xA8D7, 0x3117}, //6786 #BOPOMOFO LETTER Z + {0xA8D8, 0x3118}, //6787 #BOPOMOFO LETTER C + {0xA8D9, 0x3119}, //6788 #BOPOMOFO LETTER S + {0xA8DA, 0x311A}, //6789 #BOPOMOFO LETTER A + {0xA8DB, 0x311B}, //6790 #BOPOMOFO LETTER O + {0xA8DC, 0x311C}, //6791 #BOPOMOFO LETTER E + {0xA8DD, 0x311D}, //6792 #BOPOMOFO LETTER EH + {0xA8DE, 0x311E}, //6793 #BOPOMOFO LETTER AI + {0xA8DF, 0x311F}, //6794 #BOPOMOFO LETTER EI + {0xA8E0, 0x3120}, //6795 #BOPOMOFO LETTER AU + {0xA8E1, 0x3121}, //6796 #BOPOMOFO LETTER OU + {0xA8E2, 0x3122}, //6797 #BOPOMOFO LETTER AN + {0xA8E3, 0x3123}, //6798 #BOPOMOFO LETTER EN + {0xA8E4, 0x3124}, //6799 #BOPOMOFO LETTER ANG + {0xA8E5, 0x3125}, //6800 #BOPOMOFO LETTER ENG + {0xA8E6, 0x3126}, //6801 #BOPOMOFO LETTER ER + {0xA8E7, 0x3127}, //6802 #BOPOMOFO LETTER I + {0xA8E8, 0x3128}, //6803 #BOPOMOFO LETTER U + {0xA8E9, 0x3129}, //6804 #BOPOMOFO LETTER IU + {0xA940, 0x3021}, //6805 #HANGZHOU NUMERAL ONE + {0xA941, 0x3022}, //6806 #HANGZHOU NUMERAL TWO + {0xA942, 0x3023}, //6807 #HANGZHOU NUMERAL THREE + {0xA943, 0x3024}, //6808 #HANGZHOU NUMERAL FOUR + {0xA944, 0x3025}, //6809 #HANGZHOU NUMERAL FIVE + {0xA945, 0x3026}, //6810 #HANGZHOU NUMERAL SIX + {0xA946, 0x3027}, //6811 #HANGZHOU NUMERAL SEVEN + {0xA947, 0x3028}, //6812 #HANGZHOU NUMERAL EIGHT + {0xA948, 0x3029}, //6813 #HANGZHOU NUMERAL NINE + {0xA949, 0x32A3}, //6814 #CIRCLED IDEOGRAPH CORRECT + {0xA94A, 0x338E}, //6815 #SQUARE MG + {0xA94B, 0x338F}, //6816 #SQUARE KG + {0xA94C, 0x339C}, //6817 #SQUARE MM + {0xA94D, 0x339D}, //6818 #SQUARE CM + {0xA94E, 0x339E}, //6819 #SQUARE KM + {0xA94F, 0x33A1}, //6820 #SQUARE M SQUARED + {0xA950, 0x33C4}, //6821 #SQUARE CC + {0xA951, 0x33CE}, //6822 #SQUARE KM CAPITAL + {0xA952, 0x33D1}, //6823 #SQUARE LN + {0xA953, 0x33D2}, //6824 #SQUARE LOG + {0xA954, 0x33D5}, //6825 #SQUARE MIL + {0xA955, 0xFE30}, //6826 #PRESENTATION FORM FOR VERTICAL TWO DOT LEADER + {0xA956, 0xFFE2}, //6827 #FULLWIDTH NOT SIGN + {0xA957, 0xFFE4}, //6828 #FULLWIDTH BROKEN BAR + {0xA959, 0x2121}, //6829 #TELEPHONE SIGN + {0xA95A, 0x3231}, //6830 #PARENTHESIZED IDEOGRAPH STOCK + {0xA95C, 0x2010}, //6831 #HYPHEN + {0xA960, 0x30FC}, //6832 #KATAKANA-HIRAGANA PROLONGED SOUND MARK + {0xA961, 0x309B}, //6833 #KATAKANA-HIRAGANA VOICED SOUND MARK + {0xA962, 0x309C}, //6834 #KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK + {0xA963, 0x30FD}, //6835 #KATAKANA ITERATION MARK + {0xA964, 0x30FE}, //6836 #KATAKANA VOICED ITERATION MARK + {0xA965, 0x3006}, //6837 #IDEOGRAPHIC CLOSING MARK + {0xA966, 0x309D}, //6838 #HIRAGANA ITERATION MARK + {0xA967, 0x309E}, //6839 #HIRAGANA VOICED ITERATION MARK + {0xA968, 0xFE49}, //6840 #DASHED OVERLINE + {0xA969, 0xFE4A}, //6841 #CENTRELINE OVERLINE + {0xA96A, 0xFE4B}, //6842 #WAVY OVERLINE + {0xA96B, 0xFE4C}, //6843 #DOUBLE WAVY OVERLINE + {0xA96C, 0xFE4D}, //6844 #DASHED LOW LINE + {0xA96D, 0xFE4E}, //6845 #CENTRELINE LOW LINE + {0xA96E, 0xFE4F}, //6846 #WAVY LOW LINE + {0xA96F, 0xFE50}, //6847 #SMALL COMMA + {0xA970, 0xFE51}, //6848 #SMALL IDEOGRAPHIC COMMA + {0xA971, 0xFE52}, //6849 #SMALL FULL STOP + {0xA972, 0xFE54}, //6850 #SMALL SEMICOLON + {0xA973, 0xFE55}, //6851 #SMALL COLON + {0xA974, 0xFE56}, //6852 #SMALL QUESTION MARK + {0xA975, 0xFE57}, //6853 #SMALL EXCLAMATION MARK + {0xA976, 0xFE59}, //6854 #SMALL LEFT PARENTHESIS + {0xA977, 0xFE5A}, //6855 #SMALL RIGHT PARENTHESIS + {0xA978, 0xFE5B}, //6856 #SMALL LEFT CURLY BRACKET + {0xA979, 0xFE5C}, //6857 #SMALL RIGHT CURLY BRACKET + {0xA97A, 0xFE5D}, //6858 #SMALL LEFT TORTOISE SHELL BRACKET + {0xA97B, 0xFE5E}, //6859 #SMALL RIGHT TORTOISE SHELL BRACKET + {0xA97C, 0xFE5F}, //6860 #SMALL NUMBER SIGN + {0xA97D, 0xFE60}, //6861 #SMALL AMPERSAND + {0xA97E, 0xFE61}, //6862 #SMALL ASTERISK + {0xA980, 0xFE62}, //6863 #SMALL PLUS SIGN + {0xA981, 0xFE63}, //6864 #SMALL HYPHEN-MINUS + {0xA982, 0xFE64}, //6865 #SMALL LESS-THAN SIGN + {0xA983, 0xFE65}, //6866 #SMALL GREATER-THAN SIGN + {0xA984, 0xFE66}, //6867 #SMALL EQUALS SIGN + {0xA985, 0xFE68}, //6868 #SMALL REVERSE SOLIDUS + {0xA986, 0xFE69}, //6869 #SMALL DOLLAR SIGN + {0xA987, 0xFE6A}, //6870 #SMALL PERCENT SIGN + {0xA988, 0xFE6B}, //6871 #SMALL COMMERCIAL AT + {0xA996, 0x3007}, //6872 #IDEOGRAPHIC NUMBER ZERO + {0xA9A4, 0x2500}, //6873 #BOX DRAWINGS LIGHT HORIZONTAL + {0xA9A5, 0x2501}, //6874 #BOX DRAWINGS HEAVY HORIZONTAL + {0xA9A6, 0x2502}, //6875 #BOX DRAWINGS LIGHT VERTICAL + {0xA9A7, 0x2503}, //6876 #BOX DRAWINGS HEAVY VERTICAL + {0xA9A8, 0x2504}, //6877 #BOX DRAWINGS LIGHT TRIPLE DASH HORIZONTAL + {0xA9A9, 0x2505}, //6878 #BOX DRAWINGS HEAVY TRIPLE DASH HORIZONTAL + {0xA9AA, 0x2506}, //6879 #BOX DRAWINGS LIGHT TRIPLE DASH VERTICAL + {0xA9AB, 0x2507}, //6880 #BOX DRAWINGS HEAVY TRIPLE DASH VERTICAL + {0xA9AC, 0x2508}, //6881 #BOX DRAWINGS LIGHT QUADRUPLE DASH HORIZONTAL + {0xA9AD, 0x2509}, //6882 #BOX DRAWINGS HEAVY QUADRUPLE DASH HORIZONTAL + {0xA9AE, 0x250A}, //6883 #BOX DRAWINGS LIGHT QUADRUPLE DASH VERTICAL + {0xA9AF, 0x250B}, //6884 #BOX DRAWINGS HEAVY QUADRUPLE DASH VERTICAL + {0xA9B0, 0x250C}, //6885 #BOX DRAWINGS LIGHT DOWN AND RIGHT + {0xA9B1, 0x250D}, //6886 #BOX DRAWINGS DOWN LIGHT AND RIGHT HEAVY + {0xA9B2, 0x250E}, //6887 #BOX DRAWINGS DOWN HEAVY AND RIGHT LIGHT + {0xA9B3, 0x250F}, //6888 #BOX DRAWINGS HEAVY DOWN AND RIGHT + {0xA9B4, 0x2510}, //6889 #BOX DRAWINGS LIGHT DOWN AND LEFT + {0xA9B5, 0x2511}, //6890 #BOX DRAWINGS DOWN LIGHT AND LEFT HEAVY + {0xA9B6, 0x2512}, //6891 #BOX DRAWINGS DOWN HEAVY AND LEFT LIGHT + {0xA9B7, 0x2513}, //6892 #BOX DRAWINGS HEAVY DOWN AND LEFT + {0xA9B8, 0x2514}, //6893 #BOX DRAWINGS LIGHT UP AND RIGHT + {0xA9B9, 0x2515}, //6894 #BOX DRAWINGS UP LIGHT AND RIGHT HEAVY + {0xA9BA, 0x2516}, //6895 #BOX DRAWINGS UP HEAVY AND RIGHT LIGHT + {0xA9BB, 0x2517}, //6896 #BOX DRAWINGS HEAVY UP AND RIGHT + {0xA9BC, 0x2518}, //6897 #BOX DRAWINGS LIGHT UP AND LEFT + {0xA9BD, 0x2519}, //6898 #BOX DRAWINGS UP LIGHT AND LEFT HEAVY + {0xA9BE, 0x251A}, //6899 #BOX DRAWINGS UP HEAVY AND LEFT LIGHT + {0xA9BF, 0x251B}, //6900 #BOX DRAWINGS HEAVY UP AND LEFT + {0xA9C0, 0x251C}, //6901 #BOX DRAWINGS LIGHT VERTICAL AND RIGHT + {0xA9C1, 0x251D}, //6902 #BOX DRAWINGS VERTICAL LIGHT AND RIGHT HEAVY + {0xA9C2, 0x251E}, //6903 #BOX DRAWINGS UP HEAVY AND RIGHT DOWN LIGHT + {0xA9C3, 0x251F}, //6904 #BOX DRAWINGS DOWN HEAVY AND RIGHT UP LIGHT + {0xA9C4, 0x2520}, //6905 #BOX DRAWINGS VERTICAL HEAVY AND RIGHT LIGHT + {0xA9C5, 0x2521}, //6906 #BOX DRAWINGS DOWN LIGHT AND RIGHT UP HEAVY + {0xA9C6, 0x2522}, //6907 #BOX DRAWINGS UP LIGHT AND RIGHT DOWN HEAVY + {0xA9C7, 0x2523}, //6908 #BOX DRAWINGS HEAVY VERTICAL AND RIGHT + {0xA9C8, 0x2524}, //6909 #BOX DRAWINGS LIGHT VERTICAL AND LEFT + {0xA9C9, 0x2525}, //6910 #BOX DRAWINGS VERTICAL LIGHT AND LEFT HEAVY + {0xA9CA, 0x2526}, //6911 #BOX DRAWINGS UP HEAVY AND LEFT DOWN LIGHT + {0xA9CB, 0x2527}, //6912 #BOX DRAWINGS DOWN HEAVY AND LEFT UP LIGHT + {0xA9CC, 0x2528}, //6913 #BOX DRAWINGS VERTICAL HEAVY AND LEFT LIGHT + {0xA9CD, 0x2529}, //6914 #BOX DRAWINGS DOWN LIGHT AND LEFT UP HEAVY + {0xA9CE, 0x252A}, //6915 #BOX DRAWINGS UP LIGHT AND LEFT DOWN HEAVY + {0xA9CF, 0x252B}, //6916 #BOX DRAWINGS HEAVY VERTICAL AND LEFT + {0xA9D0, 0x252C}, //6917 #BOX DRAWINGS LIGHT DOWN AND HORIZONTAL + {0xA9D1, 0x252D}, //6918 #BOX DRAWINGS LEFT HEAVY AND RIGHT DOWN LIGHT + {0xA9D2, 0x252E}, //6919 #BOX DRAWINGS RIGHT HEAVY AND LEFT DOWN LIGHT + {0xA9D3, 0x252F}, //6920 #BOX DRAWINGS DOWN LIGHT AND HORIZONTAL HEAVY + {0xA9D4, 0x2530}, //6921 #BOX DRAWINGS DOWN HEAVY AND HORIZONTAL LIGHT + {0xA9D5, 0x2531}, //6922 #BOX DRAWINGS RIGHT LIGHT AND LEFT DOWN HEAVY + {0xA9D6, 0x2532}, //6923 #BOX DRAWINGS LEFT LIGHT AND RIGHT DOWN HEAVY + {0xA9D7, 0x2533}, //6924 #BOX DRAWINGS HEAVY DOWN AND HORIZONTAL + {0xA9D8, 0x2534}, //6925 #BOX DRAWINGS LIGHT UP AND HORIZONTAL + {0xA9D9, 0x2535}, //6926 #BOX DRAWINGS LEFT HEAVY AND RIGHT UP LIGHT + {0xA9DA, 0x2536}, //6927 #BOX DRAWINGS RIGHT HEAVY AND LEFT UP LIGHT + {0xA9DB, 0x2537}, //6928 #BOX DRAWINGS UP LIGHT AND HORIZONTAL HEAVY + {0xA9DC, 0x2538}, //6929 #BOX DRAWINGS UP HEAVY AND HORIZONTAL LIGHT + {0xA9DD, 0x2539}, //6930 #BOX DRAWINGS RIGHT LIGHT AND LEFT UP HEAVY + {0xA9DE, 0x253A}, //6931 #BOX DRAWINGS LEFT LIGHT AND RIGHT UP HEAVY + {0xA9DF, 0x253B}, //6932 #BOX DRAWINGS HEAVY UP AND HORIZONTAL + {0xA9E0, 0x253C}, //6933 #BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL + {0xA9E1, 0x253D}, //6934 #BOX DRAWINGS LEFT HEAVY AND RIGHT VERTICAL LIGHT + {0xA9E2, 0x253E}, //6935 #BOX DRAWINGS RIGHT HEAVY AND LEFT VERTICAL LIGHT + {0xA9E3, 0x253F}, //6936 #BOX DRAWINGS VERTICAL LIGHT AND HORIZONTAL HEAVY + {0xA9E4, 0x2540}, //6937 #BOX DRAWINGS UP HEAVY AND DOWN HORIZONTAL LIGHT + {0xA9E5, 0x2541}, //6938 #BOX DRAWINGS DOWN HEAVY AND UP HORIZONTAL LIGHT + {0xA9E6, 0x2542}, //6939 #BOX DRAWINGS VERTICAL HEAVY AND HORIZONTAL LIGHT + {0xA9E7, 0x2543}, //6940 #BOX DRAWINGS LEFT UP HEAVY AND RIGHT DOWN LIGHT + {0xA9E8, 0x2544}, //6941 #BOX DRAWINGS RIGHT UP HEAVY AND LEFT DOWN LIGHT + {0xA9E9, 0x2545}, //6942 #BOX DRAWINGS LEFT DOWN HEAVY AND RIGHT UP LIGHT + {0xA9EA, 0x2546}, //6943 #BOX DRAWINGS RIGHT DOWN HEAVY AND LEFT UP LIGHT + {0xA9EB, 0x2547}, //6944 #BOX DRAWINGS DOWN LIGHT AND UP HORIZONTAL HEAVY + {0xA9EC, 0x2548}, //6945 #BOX DRAWINGS UP LIGHT AND DOWN HORIZONTAL HEAVY + {0xA9ED, 0x2549}, //6946 #BOX DRAWINGS RIGHT LIGHT AND LEFT VERTICAL HEAVY + {0xA9EE, 0x254A}, //6947 #BOX DRAWINGS LEFT LIGHT AND RIGHT VERTICAL HEAVY + {0xA9EF, 0x254B}, //6948 #BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL + {0xAA40, 0x72DC}, //6949 #CJK UNIFIED IDEOGRAPH + {0xAA41, 0x72DD}, //6950 #CJK UNIFIED IDEOGRAPH + {0xAA42, 0x72DF}, //6951 #CJK UNIFIED IDEOGRAPH + {0xAA43, 0x72E2}, //6952 #CJK UNIFIED IDEOGRAPH + {0xAA44, 0x72E3}, //6953 #CJK UNIFIED IDEOGRAPH + {0xAA45, 0x72E4}, //6954 #CJK UNIFIED IDEOGRAPH + {0xAA46, 0x72E5}, //6955 #CJK UNIFIED IDEOGRAPH + {0xAA47, 0x72E6}, //6956 #CJK UNIFIED IDEOGRAPH + {0xAA48, 0x72E7}, //6957 #CJK UNIFIED IDEOGRAPH + {0xAA49, 0x72EA}, //6958 #CJK UNIFIED IDEOGRAPH + {0xAA4A, 0x72EB}, //6959 #CJK UNIFIED IDEOGRAPH + {0xAA4B, 0x72F5}, //6960 #CJK UNIFIED IDEOGRAPH + {0xAA4C, 0x72F6}, //6961 #CJK UNIFIED IDEOGRAPH + {0xAA4D, 0x72F9}, //6962 #CJK UNIFIED IDEOGRAPH + {0xAA4E, 0x72FD}, //6963 #CJK UNIFIED IDEOGRAPH + {0xAA4F, 0x72FE}, //6964 #CJK UNIFIED IDEOGRAPH + {0xAA50, 0x72FF}, //6965 #CJK UNIFIED IDEOGRAPH + {0xAA51, 0x7300}, //6966 #CJK UNIFIED IDEOGRAPH + {0xAA52, 0x7302}, //6967 #CJK UNIFIED IDEOGRAPH + {0xAA53, 0x7304}, //6968 #CJK UNIFIED IDEOGRAPH + {0xAA54, 0x7305}, //6969 #CJK UNIFIED IDEOGRAPH + {0xAA55, 0x7306}, //6970 #CJK UNIFIED IDEOGRAPH + {0xAA56, 0x7307}, //6971 #CJK UNIFIED IDEOGRAPH + {0xAA57, 0x7308}, //6972 #CJK UNIFIED IDEOGRAPH + {0xAA58, 0x7309}, //6973 #CJK UNIFIED IDEOGRAPH + {0xAA59, 0x730B}, //6974 #CJK UNIFIED IDEOGRAPH + {0xAA5A, 0x730C}, //6975 #CJK UNIFIED IDEOGRAPH + {0xAA5B, 0x730D}, //6976 #CJK UNIFIED IDEOGRAPH + {0xAA5C, 0x730F}, //6977 #CJK UNIFIED IDEOGRAPH + {0xAA5D, 0x7310}, //6978 #CJK UNIFIED IDEOGRAPH + {0xAA5E, 0x7311}, //6979 #CJK UNIFIED IDEOGRAPH + {0xAA5F, 0x7312}, //6980 #CJK UNIFIED IDEOGRAPH + {0xAA60, 0x7314}, //6981 #CJK UNIFIED IDEOGRAPH + {0xAA61, 0x7318}, //6982 #CJK UNIFIED IDEOGRAPH + {0xAA62, 0x7319}, //6983 #CJK UNIFIED IDEOGRAPH + {0xAA63, 0x731A}, //6984 #CJK UNIFIED IDEOGRAPH + {0xAA64, 0x731F}, //6985 #CJK UNIFIED IDEOGRAPH + {0xAA65, 0x7320}, //6986 #CJK UNIFIED IDEOGRAPH + {0xAA66, 0x7323}, //6987 #CJK UNIFIED IDEOGRAPH + {0xAA67, 0x7324}, //6988 #CJK UNIFIED IDEOGRAPH + {0xAA68, 0x7326}, //6989 #CJK UNIFIED IDEOGRAPH + {0xAA69, 0x7327}, //6990 #CJK UNIFIED IDEOGRAPH + {0xAA6A, 0x7328}, //6991 #CJK UNIFIED IDEOGRAPH + {0xAA6B, 0x732D}, //6992 #CJK UNIFIED IDEOGRAPH + {0xAA6C, 0x732F}, //6993 #CJK UNIFIED IDEOGRAPH + {0xAA6D, 0x7330}, //6994 #CJK UNIFIED IDEOGRAPH + {0xAA6E, 0x7332}, //6995 #CJK UNIFIED IDEOGRAPH + {0xAA6F, 0x7333}, //6996 #CJK UNIFIED IDEOGRAPH + {0xAA70, 0x7335}, //6997 #CJK UNIFIED IDEOGRAPH + {0xAA71, 0x7336}, //6998 #CJK UNIFIED IDEOGRAPH + {0xAA72, 0x733A}, //6999 #CJK UNIFIED IDEOGRAPH + {0xAA73, 0x733B}, //7000 #CJK UNIFIED IDEOGRAPH + {0xAA74, 0x733C}, //7001 #CJK UNIFIED IDEOGRAPH + {0xAA75, 0x733D}, //7002 #CJK UNIFIED IDEOGRAPH + {0xAA76, 0x7340}, //7003 #CJK UNIFIED IDEOGRAPH + {0xAA77, 0x7341}, //7004 #CJK UNIFIED IDEOGRAPH + {0xAA78, 0x7342}, //7005 #CJK UNIFIED IDEOGRAPH + {0xAA79, 0x7343}, //7006 #CJK UNIFIED IDEOGRAPH + {0xAA7A, 0x7344}, //7007 #CJK UNIFIED IDEOGRAPH + {0xAA7B, 0x7345}, //7008 #CJK UNIFIED IDEOGRAPH + {0xAA7C, 0x7346}, //7009 #CJK UNIFIED IDEOGRAPH + {0xAA7D, 0x7347}, //7010 #CJK UNIFIED IDEOGRAPH + {0xAA7E, 0x7348}, //7011 #CJK UNIFIED IDEOGRAPH + {0xAA80, 0x7349}, //7012 #CJK UNIFIED IDEOGRAPH + {0xAA81, 0x734A}, //7013 #CJK UNIFIED IDEOGRAPH + {0xAA82, 0x734B}, //7014 #CJK UNIFIED IDEOGRAPH + {0xAA83, 0x734C}, //7015 #CJK UNIFIED IDEOGRAPH + {0xAA84, 0x734E}, //7016 #CJK UNIFIED IDEOGRAPH + {0xAA85, 0x734F}, //7017 #CJK UNIFIED IDEOGRAPH + {0xAA86, 0x7351}, //7018 #CJK UNIFIED IDEOGRAPH + {0xAA87, 0x7353}, //7019 #CJK UNIFIED IDEOGRAPH + {0xAA88, 0x7354}, //7020 #CJK UNIFIED IDEOGRAPH + {0xAA89, 0x7355}, //7021 #CJK UNIFIED IDEOGRAPH + {0xAA8A, 0x7356}, //7022 #CJK UNIFIED IDEOGRAPH + {0xAA8B, 0x7358}, //7023 #CJK UNIFIED IDEOGRAPH + {0xAA8C, 0x7359}, //7024 #CJK UNIFIED IDEOGRAPH + {0xAA8D, 0x735A}, //7025 #CJK UNIFIED IDEOGRAPH + {0xAA8E, 0x735B}, //7026 #CJK UNIFIED IDEOGRAPH + {0xAA8F, 0x735C}, //7027 #CJK UNIFIED IDEOGRAPH + {0xAA90, 0x735D}, //7028 #CJK UNIFIED IDEOGRAPH + {0xAA91, 0x735E}, //7029 #CJK UNIFIED IDEOGRAPH + {0xAA92, 0x735F}, //7030 #CJK UNIFIED IDEOGRAPH + {0xAA93, 0x7361}, //7031 #CJK UNIFIED IDEOGRAPH + {0xAA94, 0x7362}, //7032 #CJK UNIFIED IDEOGRAPH + {0xAA95, 0x7363}, //7033 #CJK UNIFIED IDEOGRAPH + {0xAA96, 0x7364}, //7034 #CJK UNIFIED IDEOGRAPH + {0xAA97, 0x7365}, //7035 #CJK UNIFIED IDEOGRAPH + {0xAA98, 0x7366}, //7036 #CJK UNIFIED IDEOGRAPH + {0xAA99, 0x7367}, //7037 #CJK UNIFIED IDEOGRAPH + {0xAA9A, 0x7368}, //7038 #CJK UNIFIED IDEOGRAPH + {0xAA9B, 0x7369}, //7039 #CJK UNIFIED IDEOGRAPH + {0xAA9C, 0x736A}, //7040 #CJK UNIFIED IDEOGRAPH + {0xAA9D, 0x736B}, //7041 #CJK UNIFIED IDEOGRAPH + {0xAA9E, 0x736E}, //7042 #CJK UNIFIED IDEOGRAPH + {0xAA9F, 0x7370}, //7043 #CJK UNIFIED IDEOGRAPH + {0xAAA0, 0x7371}, //7044 #CJK UNIFIED IDEOGRAPH + {0xAB40, 0x7372}, //7045 #CJK UNIFIED IDEOGRAPH + {0xAB41, 0x7373}, //7046 #CJK UNIFIED IDEOGRAPH + {0xAB42, 0x7374}, //7047 #CJK UNIFIED IDEOGRAPH + {0xAB43, 0x7375}, //7048 #CJK UNIFIED IDEOGRAPH + {0xAB44, 0x7376}, //7049 #CJK UNIFIED IDEOGRAPH + {0xAB45, 0x7377}, //7050 #CJK UNIFIED IDEOGRAPH + {0xAB46, 0x7378}, //7051 #CJK UNIFIED IDEOGRAPH + {0xAB47, 0x7379}, //7052 #CJK UNIFIED IDEOGRAPH + {0xAB48, 0x737A}, //7053 #CJK UNIFIED IDEOGRAPH + {0xAB49, 0x737B}, //7054 #CJK UNIFIED IDEOGRAPH + {0xAB4A, 0x737C}, //7055 #CJK UNIFIED IDEOGRAPH + {0xAB4B, 0x737D}, //7056 #CJK UNIFIED IDEOGRAPH + {0xAB4C, 0x737F}, //7057 #CJK UNIFIED IDEOGRAPH + {0xAB4D, 0x7380}, //7058 #CJK UNIFIED IDEOGRAPH + {0xAB4E, 0x7381}, //7059 #CJK UNIFIED IDEOGRAPH + {0xAB4F, 0x7382}, //7060 #CJK UNIFIED IDEOGRAPH + {0xAB50, 0x7383}, //7061 #CJK UNIFIED IDEOGRAPH + {0xAB51, 0x7385}, //7062 #CJK UNIFIED IDEOGRAPH + {0xAB52, 0x7386}, //7063 #CJK UNIFIED IDEOGRAPH + {0xAB53, 0x7388}, //7064 #CJK UNIFIED IDEOGRAPH + {0xAB54, 0x738A}, //7065 #CJK UNIFIED IDEOGRAPH + {0xAB55, 0x738C}, //7066 #CJK UNIFIED IDEOGRAPH + {0xAB56, 0x738D}, //7067 #CJK UNIFIED IDEOGRAPH + {0xAB57, 0x738F}, //7068 #CJK UNIFIED IDEOGRAPH + {0xAB58, 0x7390}, //7069 #CJK UNIFIED IDEOGRAPH + {0xAB59, 0x7392}, //7070 #CJK UNIFIED IDEOGRAPH + {0xAB5A, 0x7393}, //7071 #CJK UNIFIED IDEOGRAPH + {0xAB5B, 0x7394}, //7072 #CJK UNIFIED IDEOGRAPH + {0xAB5C, 0x7395}, //7073 #CJK UNIFIED IDEOGRAPH + {0xAB5D, 0x7397}, //7074 #CJK UNIFIED IDEOGRAPH + {0xAB5E, 0x7398}, //7075 #CJK UNIFIED IDEOGRAPH + {0xAB5F, 0x7399}, //7076 #CJK UNIFIED IDEOGRAPH + {0xAB60, 0x739A}, //7077 #CJK UNIFIED IDEOGRAPH + {0xAB61, 0x739C}, //7078 #CJK UNIFIED IDEOGRAPH + {0xAB62, 0x739D}, //7079 #CJK UNIFIED IDEOGRAPH + {0xAB63, 0x739E}, //7080 #CJK UNIFIED IDEOGRAPH + {0xAB64, 0x73A0}, //7081 #CJK UNIFIED IDEOGRAPH + {0xAB65, 0x73A1}, //7082 #CJK UNIFIED IDEOGRAPH + {0xAB66, 0x73A3}, //7083 #CJK UNIFIED IDEOGRAPH + {0xAB67, 0x73A4}, //7084 #CJK UNIFIED IDEOGRAPH + {0xAB68, 0x73A5}, //7085 #CJK UNIFIED IDEOGRAPH + {0xAB69, 0x73A6}, //7086 #CJK UNIFIED IDEOGRAPH + {0xAB6A, 0x73A7}, //7087 #CJK UNIFIED IDEOGRAPH + {0xAB6B, 0x73A8}, //7088 #CJK UNIFIED IDEOGRAPH + {0xAB6C, 0x73AA}, //7089 #CJK UNIFIED IDEOGRAPH + {0xAB6D, 0x73AC}, //7090 #CJK UNIFIED IDEOGRAPH + {0xAB6E, 0x73AD}, //7091 #CJK UNIFIED IDEOGRAPH + {0xAB6F, 0x73B1}, //7092 #CJK UNIFIED IDEOGRAPH + {0xAB70, 0x73B4}, //7093 #CJK UNIFIED IDEOGRAPH + {0xAB71, 0x73B5}, //7094 #CJK UNIFIED IDEOGRAPH + {0xAB72, 0x73B6}, //7095 #CJK UNIFIED IDEOGRAPH + {0xAB73, 0x73B8}, //7096 #CJK UNIFIED IDEOGRAPH + {0xAB74, 0x73B9}, //7097 #CJK UNIFIED IDEOGRAPH + {0xAB75, 0x73BC}, //7098 #CJK UNIFIED IDEOGRAPH + {0xAB76, 0x73BD}, //7099 #CJK UNIFIED IDEOGRAPH + {0xAB77, 0x73BE}, //7100 #CJK UNIFIED IDEOGRAPH + {0xAB78, 0x73BF}, //7101 #CJK UNIFIED IDEOGRAPH + {0xAB79, 0x73C1}, //7102 #CJK UNIFIED IDEOGRAPH + {0xAB7A, 0x73C3}, //7103 #CJK UNIFIED IDEOGRAPH + {0xAB7B, 0x73C4}, //7104 #CJK UNIFIED IDEOGRAPH + {0xAB7C, 0x73C5}, //7105 #CJK UNIFIED IDEOGRAPH + {0xAB7D, 0x73C6}, //7106 #CJK UNIFIED IDEOGRAPH + {0xAB7E, 0x73C7}, //7107 #CJK UNIFIED IDEOGRAPH + {0xAB80, 0x73CB}, //7108 #CJK UNIFIED IDEOGRAPH + {0xAB81, 0x73CC}, //7109 #CJK UNIFIED IDEOGRAPH + {0xAB82, 0x73CE}, //7110 #CJK UNIFIED IDEOGRAPH + {0xAB83, 0x73D2}, //7111 #CJK UNIFIED IDEOGRAPH + {0xAB84, 0x73D3}, //7112 #CJK UNIFIED IDEOGRAPH + {0xAB85, 0x73D4}, //7113 #CJK UNIFIED IDEOGRAPH + {0xAB86, 0x73D5}, //7114 #CJK UNIFIED IDEOGRAPH + {0xAB87, 0x73D6}, //7115 #CJK UNIFIED IDEOGRAPH + {0xAB88, 0x73D7}, //7116 #CJK UNIFIED IDEOGRAPH + {0xAB89, 0x73D8}, //7117 #CJK UNIFIED IDEOGRAPH + {0xAB8A, 0x73DA}, //7118 #CJK UNIFIED IDEOGRAPH + {0xAB8B, 0x73DB}, //7119 #CJK UNIFIED IDEOGRAPH + {0xAB8C, 0x73DC}, //7120 #CJK UNIFIED IDEOGRAPH + {0xAB8D, 0x73DD}, //7121 #CJK UNIFIED IDEOGRAPH + {0xAB8E, 0x73DF}, //7122 #CJK UNIFIED IDEOGRAPH + {0xAB8F, 0x73E1}, //7123 #CJK UNIFIED IDEOGRAPH + {0xAB90, 0x73E2}, //7124 #CJK UNIFIED IDEOGRAPH + {0xAB91, 0x73E3}, //7125 #CJK UNIFIED IDEOGRAPH + {0xAB92, 0x73E4}, //7126 #CJK UNIFIED IDEOGRAPH + {0xAB93, 0x73E6}, //7127 #CJK UNIFIED IDEOGRAPH + {0xAB94, 0x73E8}, //7128 #CJK UNIFIED IDEOGRAPH + {0xAB95, 0x73EA}, //7129 #CJK UNIFIED IDEOGRAPH + {0xAB96, 0x73EB}, //7130 #CJK UNIFIED IDEOGRAPH + {0xAB97, 0x73EC}, //7131 #CJK UNIFIED IDEOGRAPH + {0xAB98, 0x73EE}, //7132 #CJK UNIFIED IDEOGRAPH + {0xAB99, 0x73EF}, //7133 #CJK UNIFIED IDEOGRAPH + {0xAB9A, 0x73F0}, //7134 #CJK UNIFIED IDEOGRAPH + {0xAB9B, 0x73F1}, //7135 #CJK UNIFIED IDEOGRAPH + {0xAB9C, 0x73F3}, //7136 #CJK UNIFIED IDEOGRAPH + {0xAB9D, 0x73F4}, //7137 #CJK UNIFIED IDEOGRAPH + {0xAB9E, 0x73F5}, //7138 #CJK UNIFIED IDEOGRAPH + {0xAB9F, 0x73F6}, //7139 #CJK UNIFIED IDEOGRAPH + {0xABA0, 0x73F7}, //7140 #CJK UNIFIED IDEOGRAPH + {0xAC40, 0x73F8}, //7141 #CJK UNIFIED IDEOGRAPH + {0xAC41, 0x73F9}, //7142 #CJK UNIFIED IDEOGRAPH + {0xAC42, 0x73FA}, //7143 #CJK UNIFIED IDEOGRAPH + {0xAC43, 0x73FB}, //7144 #CJK UNIFIED IDEOGRAPH + {0xAC44, 0x73FC}, //7145 #CJK UNIFIED IDEOGRAPH + {0xAC45, 0x73FD}, //7146 #CJK UNIFIED IDEOGRAPH + {0xAC46, 0x73FE}, //7147 #CJK UNIFIED IDEOGRAPH + {0xAC47, 0x73FF}, //7148 #CJK UNIFIED IDEOGRAPH + {0xAC48, 0x7400}, //7149 #CJK UNIFIED IDEOGRAPH + {0xAC49, 0x7401}, //7150 #CJK UNIFIED IDEOGRAPH + {0xAC4A, 0x7402}, //7151 #CJK UNIFIED IDEOGRAPH + {0xAC4B, 0x7404}, //7152 #CJK UNIFIED IDEOGRAPH + {0xAC4C, 0x7407}, //7153 #CJK UNIFIED IDEOGRAPH + {0xAC4D, 0x7408}, //7154 #CJK UNIFIED IDEOGRAPH + {0xAC4E, 0x740B}, //7155 #CJK UNIFIED IDEOGRAPH + {0xAC4F, 0x740C}, //7156 #CJK UNIFIED IDEOGRAPH + {0xAC50, 0x740D}, //7157 #CJK UNIFIED IDEOGRAPH + {0xAC51, 0x740E}, //7158 #CJK UNIFIED IDEOGRAPH + {0xAC52, 0x7411}, //7159 #CJK UNIFIED IDEOGRAPH + {0xAC53, 0x7412}, //7160 #CJK UNIFIED IDEOGRAPH + {0xAC54, 0x7413}, //7161 #CJK UNIFIED IDEOGRAPH + {0xAC55, 0x7414}, //7162 #CJK UNIFIED IDEOGRAPH + {0xAC56, 0x7415}, //7163 #CJK UNIFIED IDEOGRAPH + {0xAC57, 0x7416}, //7164 #CJK UNIFIED IDEOGRAPH + {0xAC58, 0x7417}, //7165 #CJK UNIFIED IDEOGRAPH + {0xAC59, 0x7418}, //7166 #CJK UNIFIED IDEOGRAPH + {0xAC5A, 0x7419}, //7167 #CJK UNIFIED IDEOGRAPH + {0xAC5B, 0x741C}, //7168 #CJK UNIFIED IDEOGRAPH + {0xAC5C, 0x741D}, //7169 #CJK UNIFIED IDEOGRAPH + {0xAC5D, 0x741E}, //7170 #CJK UNIFIED IDEOGRAPH + {0xAC5E, 0x741F}, //7171 #CJK UNIFIED IDEOGRAPH + {0xAC5F, 0x7420}, //7172 #CJK UNIFIED IDEOGRAPH + {0xAC60, 0x7421}, //7173 #CJK UNIFIED IDEOGRAPH + {0xAC61, 0x7423}, //7174 #CJK UNIFIED IDEOGRAPH + {0xAC62, 0x7424}, //7175 #CJK UNIFIED IDEOGRAPH + {0xAC63, 0x7427}, //7176 #CJK UNIFIED IDEOGRAPH + {0xAC64, 0x7429}, //7177 #CJK UNIFIED IDEOGRAPH + {0xAC65, 0x742B}, //7178 #CJK UNIFIED IDEOGRAPH + {0xAC66, 0x742D}, //7179 #CJK UNIFIED IDEOGRAPH + {0xAC67, 0x742F}, //7180 #CJK UNIFIED IDEOGRAPH + {0xAC68, 0x7431}, //7181 #CJK UNIFIED IDEOGRAPH + {0xAC69, 0x7432}, //7182 #CJK UNIFIED IDEOGRAPH + {0xAC6A, 0x7437}, //7183 #CJK UNIFIED IDEOGRAPH + {0xAC6B, 0x7438}, //7184 #CJK UNIFIED IDEOGRAPH + {0xAC6C, 0x7439}, //7185 #CJK UNIFIED IDEOGRAPH + {0xAC6D, 0x743A}, //7186 #CJK UNIFIED IDEOGRAPH + {0xAC6E, 0x743B}, //7187 #CJK UNIFIED IDEOGRAPH + {0xAC6F, 0x743D}, //7188 #CJK UNIFIED IDEOGRAPH + {0xAC70, 0x743E}, //7189 #CJK UNIFIED IDEOGRAPH + {0xAC71, 0x743F}, //7190 #CJK UNIFIED IDEOGRAPH + {0xAC72, 0x7440}, //7191 #CJK UNIFIED IDEOGRAPH + {0xAC73, 0x7442}, //7192 #CJK UNIFIED IDEOGRAPH + {0xAC74, 0x7443}, //7193 #CJK UNIFIED IDEOGRAPH + {0xAC75, 0x7444}, //7194 #CJK UNIFIED IDEOGRAPH + {0xAC76, 0x7445}, //7195 #CJK UNIFIED IDEOGRAPH + {0xAC77, 0x7446}, //7196 #CJK UNIFIED IDEOGRAPH + {0xAC78, 0x7447}, //7197 #CJK UNIFIED IDEOGRAPH + {0xAC79, 0x7448}, //7198 #CJK UNIFIED IDEOGRAPH + {0xAC7A, 0x7449}, //7199 #CJK UNIFIED IDEOGRAPH + {0xAC7B, 0x744A}, //7200 #CJK UNIFIED IDEOGRAPH + {0xAC7C, 0x744B}, //7201 #CJK UNIFIED IDEOGRAPH + {0xAC7D, 0x744C}, //7202 #CJK UNIFIED IDEOGRAPH + {0xAC7E, 0x744D}, //7203 #CJK UNIFIED IDEOGRAPH + {0xAC80, 0x744E}, //7204 #CJK UNIFIED IDEOGRAPH + {0xAC81, 0x744F}, //7205 #CJK UNIFIED IDEOGRAPH + {0xAC82, 0x7450}, //7206 #CJK UNIFIED IDEOGRAPH + {0xAC83, 0x7451}, //7207 #CJK UNIFIED IDEOGRAPH + {0xAC84, 0x7452}, //7208 #CJK UNIFIED IDEOGRAPH + {0xAC85, 0x7453}, //7209 #CJK UNIFIED IDEOGRAPH + {0xAC86, 0x7454}, //7210 #CJK UNIFIED IDEOGRAPH + {0xAC87, 0x7456}, //7211 #CJK UNIFIED IDEOGRAPH + {0xAC88, 0x7458}, //7212 #CJK UNIFIED IDEOGRAPH + {0xAC89, 0x745D}, //7213 #CJK UNIFIED IDEOGRAPH + {0xAC8A, 0x7460}, //7214 #CJK UNIFIED IDEOGRAPH + {0xAC8B, 0x7461}, //7215 #CJK UNIFIED IDEOGRAPH + {0xAC8C, 0x7462}, //7216 #CJK UNIFIED IDEOGRAPH + {0xAC8D, 0x7463}, //7217 #CJK UNIFIED IDEOGRAPH + {0xAC8E, 0x7464}, //7218 #CJK UNIFIED IDEOGRAPH + {0xAC8F, 0x7465}, //7219 #CJK UNIFIED IDEOGRAPH + {0xAC90, 0x7466}, //7220 #CJK UNIFIED IDEOGRAPH + {0xAC91, 0x7467}, //7221 #CJK UNIFIED IDEOGRAPH + {0xAC92, 0x7468}, //7222 #CJK UNIFIED IDEOGRAPH + {0xAC93, 0x7469}, //7223 #CJK UNIFIED IDEOGRAPH + {0xAC94, 0x746A}, //7224 #CJK UNIFIED IDEOGRAPH + {0xAC95, 0x746B}, //7225 #CJK UNIFIED IDEOGRAPH + {0xAC96, 0x746C}, //7226 #CJK UNIFIED IDEOGRAPH + {0xAC97, 0x746E}, //7227 #CJK UNIFIED IDEOGRAPH + {0xAC98, 0x746F}, //7228 #CJK UNIFIED IDEOGRAPH + {0xAC99, 0x7471}, //7229 #CJK UNIFIED IDEOGRAPH + {0xAC9A, 0x7472}, //7230 #CJK UNIFIED IDEOGRAPH + {0xAC9B, 0x7473}, //7231 #CJK UNIFIED IDEOGRAPH + {0xAC9C, 0x7474}, //7232 #CJK UNIFIED IDEOGRAPH + {0xAC9D, 0x7475}, //7233 #CJK UNIFIED IDEOGRAPH + {0xAC9E, 0x7478}, //7234 #CJK UNIFIED IDEOGRAPH + {0xAC9F, 0x7479}, //7235 #CJK UNIFIED IDEOGRAPH + {0xACA0, 0x747A}, //7236 #CJK UNIFIED IDEOGRAPH + {0xAD40, 0x747B}, //7237 #CJK UNIFIED IDEOGRAPH + {0xAD41, 0x747C}, //7238 #CJK UNIFIED IDEOGRAPH + {0xAD42, 0x747D}, //7239 #CJK UNIFIED IDEOGRAPH + {0xAD43, 0x747F}, //7240 #CJK UNIFIED IDEOGRAPH + {0xAD44, 0x7482}, //7241 #CJK UNIFIED IDEOGRAPH + {0xAD45, 0x7484}, //7242 #CJK UNIFIED IDEOGRAPH + {0xAD46, 0x7485}, //7243 #CJK UNIFIED IDEOGRAPH + {0xAD47, 0x7486}, //7244 #CJK UNIFIED IDEOGRAPH + {0xAD48, 0x7488}, //7245 #CJK UNIFIED IDEOGRAPH + {0xAD49, 0x7489}, //7246 #CJK UNIFIED IDEOGRAPH + {0xAD4A, 0x748A}, //7247 #CJK UNIFIED IDEOGRAPH + {0xAD4B, 0x748C}, //7248 #CJK UNIFIED IDEOGRAPH + {0xAD4C, 0x748D}, //7249 #CJK UNIFIED IDEOGRAPH + {0xAD4D, 0x748F}, //7250 #CJK UNIFIED IDEOGRAPH + {0xAD4E, 0x7491}, //7251 #CJK UNIFIED IDEOGRAPH + {0xAD4F, 0x7492}, //7252 #CJK UNIFIED IDEOGRAPH + {0xAD50, 0x7493}, //7253 #CJK UNIFIED IDEOGRAPH + {0xAD51, 0x7494}, //7254 #CJK UNIFIED IDEOGRAPH + {0xAD52, 0x7495}, //7255 #CJK UNIFIED IDEOGRAPH + {0xAD53, 0x7496}, //7256 #CJK UNIFIED IDEOGRAPH + {0xAD54, 0x7497}, //7257 #CJK UNIFIED IDEOGRAPH + {0xAD55, 0x7498}, //7258 #CJK UNIFIED IDEOGRAPH + {0xAD56, 0x7499}, //7259 #CJK UNIFIED IDEOGRAPH + {0xAD57, 0x749A}, //7260 #CJK UNIFIED IDEOGRAPH + {0xAD58, 0x749B}, //7261 #CJK UNIFIED IDEOGRAPH + {0xAD59, 0x749D}, //7262 #CJK UNIFIED IDEOGRAPH + {0xAD5A, 0x749F}, //7263 #CJK UNIFIED IDEOGRAPH + {0xAD5B, 0x74A0}, //7264 #CJK UNIFIED IDEOGRAPH + {0xAD5C, 0x74A1}, //7265 #CJK UNIFIED IDEOGRAPH + {0xAD5D, 0x74A2}, //7266 #CJK UNIFIED IDEOGRAPH + {0xAD5E, 0x74A3}, //7267 #CJK UNIFIED IDEOGRAPH + {0xAD5F, 0x74A4}, //7268 #CJK UNIFIED IDEOGRAPH + {0xAD60, 0x74A5}, //7269 #CJK UNIFIED IDEOGRAPH + {0xAD61, 0x74A6}, //7270 #CJK UNIFIED IDEOGRAPH + {0xAD62, 0x74AA}, //7271 #CJK UNIFIED IDEOGRAPH + {0xAD63, 0x74AB}, //7272 #CJK UNIFIED IDEOGRAPH + {0xAD64, 0x74AC}, //7273 #CJK UNIFIED IDEOGRAPH + {0xAD65, 0x74AD}, //7274 #CJK UNIFIED IDEOGRAPH + {0xAD66, 0x74AE}, //7275 #CJK UNIFIED IDEOGRAPH + {0xAD67, 0x74AF}, //7276 #CJK UNIFIED IDEOGRAPH + {0xAD68, 0x74B0}, //7277 #CJK UNIFIED IDEOGRAPH + {0xAD69, 0x74B1}, //7278 #CJK UNIFIED IDEOGRAPH + {0xAD6A, 0x74B2}, //7279 #CJK UNIFIED IDEOGRAPH + {0xAD6B, 0x74B3}, //7280 #CJK UNIFIED IDEOGRAPH + {0xAD6C, 0x74B4}, //7281 #CJK UNIFIED IDEOGRAPH + {0xAD6D, 0x74B5}, //7282 #CJK UNIFIED IDEOGRAPH + {0xAD6E, 0x74B6}, //7283 #CJK UNIFIED IDEOGRAPH + {0xAD6F, 0x74B7}, //7284 #CJK UNIFIED IDEOGRAPH + {0xAD70, 0x74B8}, //7285 #CJK UNIFIED IDEOGRAPH + {0xAD71, 0x74B9}, //7286 #CJK UNIFIED IDEOGRAPH + {0xAD72, 0x74BB}, //7287 #CJK UNIFIED IDEOGRAPH + {0xAD73, 0x74BC}, //7288 #CJK UNIFIED IDEOGRAPH + {0xAD74, 0x74BD}, //7289 #CJK UNIFIED IDEOGRAPH + {0xAD75, 0x74BE}, //7290 #CJK UNIFIED IDEOGRAPH + {0xAD76, 0x74BF}, //7291 #CJK UNIFIED IDEOGRAPH + {0xAD77, 0x74C0}, //7292 #CJK UNIFIED IDEOGRAPH + {0xAD78, 0x74C1}, //7293 #CJK UNIFIED IDEOGRAPH + {0xAD79, 0x74C2}, //7294 #CJK UNIFIED IDEOGRAPH + {0xAD7A, 0x74C3}, //7295 #CJK UNIFIED IDEOGRAPH + {0xAD7B, 0x74C4}, //7296 #CJK UNIFIED IDEOGRAPH + {0xAD7C, 0x74C5}, //7297 #CJK UNIFIED IDEOGRAPH + {0xAD7D, 0x74C6}, //7298 #CJK UNIFIED IDEOGRAPH + {0xAD7E, 0x74C7}, //7299 #CJK UNIFIED IDEOGRAPH + {0xAD80, 0x74C8}, //7300 #CJK UNIFIED IDEOGRAPH + {0xAD81, 0x74C9}, //7301 #CJK UNIFIED IDEOGRAPH + {0xAD82, 0x74CA}, //7302 #CJK UNIFIED IDEOGRAPH + {0xAD83, 0x74CB}, //7303 #CJK UNIFIED IDEOGRAPH + {0xAD84, 0x74CC}, //7304 #CJK UNIFIED IDEOGRAPH + {0xAD85, 0x74CD}, //7305 #CJK UNIFIED IDEOGRAPH + {0xAD86, 0x74CE}, //7306 #CJK UNIFIED IDEOGRAPH + {0xAD87, 0x74CF}, //7307 #CJK UNIFIED IDEOGRAPH + {0xAD88, 0x74D0}, //7308 #CJK UNIFIED IDEOGRAPH + {0xAD89, 0x74D1}, //7309 #CJK UNIFIED IDEOGRAPH + {0xAD8A, 0x74D3}, //7310 #CJK UNIFIED IDEOGRAPH + {0xAD8B, 0x74D4}, //7311 #CJK UNIFIED IDEOGRAPH + {0xAD8C, 0x74D5}, //7312 #CJK UNIFIED IDEOGRAPH + {0xAD8D, 0x74D6}, //7313 #CJK UNIFIED IDEOGRAPH + {0xAD8E, 0x74D7}, //7314 #CJK UNIFIED IDEOGRAPH + {0xAD8F, 0x74D8}, //7315 #CJK UNIFIED IDEOGRAPH + {0xAD90, 0x74D9}, //7316 #CJK UNIFIED IDEOGRAPH + {0xAD91, 0x74DA}, //7317 #CJK UNIFIED IDEOGRAPH + {0xAD92, 0x74DB}, //7318 #CJK UNIFIED IDEOGRAPH + {0xAD93, 0x74DD}, //7319 #CJK UNIFIED IDEOGRAPH + {0xAD94, 0x74DF}, //7320 #CJK UNIFIED IDEOGRAPH + {0xAD95, 0x74E1}, //7321 #CJK UNIFIED IDEOGRAPH + {0xAD96, 0x74E5}, //7322 #CJK UNIFIED IDEOGRAPH + {0xAD97, 0x74E7}, //7323 #CJK UNIFIED IDEOGRAPH + {0xAD98, 0x74E8}, //7324 #CJK UNIFIED IDEOGRAPH + {0xAD99, 0x74E9}, //7325 #CJK UNIFIED IDEOGRAPH + {0xAD9A, 0x74EA}, //7326 #CJK UNIFIED IDEOGRAPH + {0xAD9B, 0x74EB}, //7327 #CJK UNIFIED IDEOGRAPH + {0xAD9C, 0x74EC}, //7328 #CJK UNIFIED IDEOGRAPH + {0xAD9D, 0x74ED}, //7329 #CJK UNIFIED IDEOGRAPH + {0xAD9E, 0x74F0}, //7330 #CJK UNIFIED IDEOGRAPH + {0xAD9F, 0x74F1}, //7331 #CJK UNIFIED IDEOGRAPH + {0xADA0, 0x74F2}, //7332 #CJK UNIFIED IDEOGRAPH + {0xAE40, 0x74F3}, //7333 #CJK UNIFIED IDEOGRAPH + {0xAE41, 0x74F5}, //7334 #CJK UNIFIED IDEOGRAPH + {0xAE42, 0x74F8}, //7335 #CJK UNIFIED IDEOGRAPH + {0xAE43, 0x74F9}, //7336 #CJK UNIFIED IDEOGRAPH + {0xAE44, 0x74FA}, //7337 #CJK UNIFIED IDEOGRAPH + {0xAE45, 0x74FB}, //7338 #CJK UNIFIED IDEOGRAPH + {0xAE46, 0x74FC}, //7339 #CJK UNIFIED IDEOGRAPH + {0xAE47, 0x74FD}, //7340 #CJK UNIFIED IDEOGRAPH + {0xAE48, 0x74FE}, //7341 #CJK UNIFIED IDEOGRAPH + {0xAE49, 0x7500}, //7342 #CJK UNIFIED IDEOGRAPH + {0xAE4A, 0x7501}, //7343 #CJK UNIFIED IDEOGRAPH + {0xAE4B, 0x7502}, //7344 #CJK UNIFIED IDEOGRAPH + {0xAE4C, 0x7503}, //7345 #CJK UNIFIED IDEOGRAPH + {0xAE4D, 0x7505}, //7346 #CJK UNIFIED IDEOGRAPH + {0xAE4E, 0x7506}, //7347 #CJK UNIFIED IDEOGRAPH + {0xAE4F, 0x7507}, //7348 #CJK UNIFIED IDEOGRAPH + {0xAE50, 0x7508}, //7349 #CJK UNIFIED IDEOGRAPH + {0xAE51, 0x7509}, //7350 #CJK UNIFIED IDEOGRAPH + {0xAE52, 0x750A}, //7351 #CJK UNIFIED IDEOGRAPH + {0xAE53, 0x750B}, //7352 #CJK UNIFIED IDEOGRAPH + {0xAE54, 0x750C}, //7353 #CJK UNIFIED IDEOGRAPH + {0xAE55, 0x750E}, //7354 #CJK UNIFIED IDEOGRAPH + {0xAE56, 0x7510}, //7355 #CJK UNIFIED IDEOGRAPH + {0xAE57, 0x7512}, //7356 #CJK UNIFIED IDEOGRAPH + {0xAE58, 0x7514}, //7357 #CJK UNIFIED IDEOGRAPH + {0xAE59, 0x7515}, //7358 #CJK UNIFIED IDEOGRAPH + {0xAE5A, 0x7516}, //7359 #CJK UNIFIED IDEOGRAPH + {0xAE5B, 0x7517}, //7360 #CJK UNIFIED IDEOGRAPH + {0xAE5C, 0x751B}, //7361 #CJK UNIFIED IDEOGRAPH + {0xAE5D, 0x751D}, //7362 #CJK UNIFIED IDEOGRAPH + {0xAE5E, 0x751E}, //7363 #CJK UNIFIED IDEOGRAPH + {0xAE5F, 0x7520}, //7364 #CJK UNIFIED IDEOGRAPH + {0xAE60, 0x7521}, //7365 #CJK UNIFIED IDEOGRAPH + {0xAE61, 0x7522}, //7366 #CJK UNIFIED IDEOGRAPH + {0xAE62, 0x7523}, //7367 #CJK UNIFIED IDEOGRAPH + {0xAE63, 0x7524}, //7368 #CJK UNIFIED IDEOGRAPH + {0xAE64, 0x7526}, //7369 #CJK UNIFIED IDEOGRAPH + {0xAE65, 0x7527}, //7370 #CJK UNIFIED IDEOGRAPH + {0xAE66, 0x752A}, //7371 #CJK UNIFIED IDEOGRAPH + {0xAE67, 0x752E}, //7372 #CJK UNIFIED IDEOGRAPH + {0xAE68, 0x7534}, //7373 #CJK UNIFIED IDEOGRAPH + {0xAE69, 0x7536}, //7374 #CJK UNIFIED IDEOGRAPH + {0xAE6A, 0x7539}, //7375 #CJK UNIFIED IDEOGRAPH + {0xAE6B, 0x753C}, //7376 #CJK UNIFIED IDEOGRAPH + {0xAE6C, 0x753D}, //7377 #CJK UNIFIED IDEOGRAPH + {0xAE6D, 0x753F}, //7378 #CJK UNIFIED IDEOGRAPH + {0xAE6E, 0x7541}, //7379 #CJK UNIFIED IDEOGRAPH + {0xAE6F, 0x7542}, //7380 #CJK UNIFIED IDEOGRAPH + {0xAE70, 0x7543}, //7381 #CJK UNIFIED IDEOGRAPH + {0xAE71, 0x7544}, //7382 #CJK UNIFIED IDEOGRAPH + {0xAE72, 0x7546}, //7383 #CJK UNIFIED IDEOGRAPH + {0xAE73, 0x7547}, //7384 #CJK UNIFIED IDEOGRAPH + {0xAE74, 0x7549}, //7385 #CJK UNIFIED IDEOGRAPH + {0xAE75, 0x754A}, //7386 #CJK UNIFIED IDEOGRAPH + {0xAE76, 0x754D}, //7387 #CJK UNIFIED IDEOGRAPH + {0xAE77, 0x7550}, //7388 #CJK UNIFIED IDEOGRAPH + {0xAE78, 0x7551}, //7389 #CJK UNIFIED IDEOGRAPH + {0xAE79, 0x7552}, //7390 #CJK UNIFIED IDEOGRAPH + {0xAE7A, 0x7553}, //7391 #CJK UNIFIED IDEOGRAPH + {0xAE7B, 0x7555}, //7392 #CJK UNIFIED IDEOGRAPH + {0xAE7C, 0x7556}, //7393 #CJK UNIFIED IDEOGRAPH + {0xAE7D, 0x7557}, //7394 #CJK UNIFIED IDEOGRAPH + {0xAE7E, 0x7558}, //7395 #CJK UNIFIED IDEOGRAPH + {0xAE80, 0x755D}, //7396 #CJK UNIFIED IDEOGRAPH + {0xAE81, 0x755E}, //7397 #CJK UNIFIED IDEOGRAPH + {0xAE82, 0x755F}, //7398 #CJK UNIFIED IDEOGRAPH + {0xAE83, 0x7560}, //7399 #CJK UNIFIED IDEOGRAPH + {0xAE84, 0x7561}, //7400 #CJK UNIFIED IDEOGRAPH + {0xAE85, 0x7562}, //7401 #CJK UNIFIED IDEOGRAPH + {0xAE86, 0x7563}, //7402 #CJK UNIFIED IDEOGRAPH + {0xAE87, 0x7564}, //7403 #CJK UNIFIED IDEOGRAPH + {0xAE88, 0x7567}, //7404 #CJK UNIFIED IDEOGRAPH + {0xAE89, 0x7568}, //7405 #CJK UNIFIED IDEOGRAPH + {0xAE8A, 0x7569}, //7406 #CJK UNIFIED IDEOGRAPH + {0xAE8B, 0x756B}, //7407 #CJK UNIFIED IDEOGRAPH + {0xAE8C, 0x756C}, //7408 #CJK UNIFIED IDEOGRAPH + {0xAE8D, 0x756D}, //7409 #CJK UNIFIED IDEOGRAPH + {0xAE8E, 0x756E}, //7410 #CJK UNIFIED IDEOGRAPH + {0xAE8F, 0x756F}, //7411 #CJK UNIFIED IDEOGRAPH + {0xAE90, 0x7570}, //7412 #CJK UNIFIED IDEOGRAPH + {0xAE91, 0x7571}, //7413 #CJK UNIFIED IDEOGRAPH + {0xAE92, 0x7573}, //7414 #CJK UNIFIED IDEOGRAPH + {0xAE93, 0x7575}, //7415 #CJK UNIFIED IDEOGRAPH + {0xAE94, 0x7576}, //7416 #CJK UNIFIED IDEOGRAPH + {0xAE95, 0x7577}, //7417 #CJK UNIFIED IDEOGRAPH + {0xAE96, 0x757A}, //7418 #CJK UNIFIED IDEOGRAPH + {0xAE97, 0x757B}, //7419 #CJK UNIFIED IDEOGRAPH + {0xAE98, 0x757C}, //7420 #CJK UNIFIED IDEOGRAPH + {0xAE99, 0x757D}, //7421 #CJK UNIFIED IDEOGRAPH + {0xAE9A, 0x757E}, //7422 #CJK UNIFIED IDEOGRAPH + {0xAE9B, 0x7580}, //7423 #CJK UNIFIED IDEOGRAPH + {0xAE9C, 0x7581}, //7424 #CJK UNIFIED IDEOGRAPH + {0xAE9D, 0x7582}, //7425 #CJK UNIFIED IDEOGRAPH + {0xAE9E, 0x7584}, //7426 #CJK UNIFIED IDEOGRAPH + {0xAE9F, 0x7585}, //7427 #CJK UNIFIED IDEOGRAPH + {0xAEA0, 0x7587}, //7428 #CJK UNIFIED IDEOGRAPH + {0xAF40, 0x7588}, //7429 #CJK UNIFIED IDEOGRAPH + {0xAF41, 0x7589}, //7430 #CJK UNIFIED IDEOGRAPH + {0xAF42, 0x758A}, //7431 #CJK UNIFIED IDEOGRAPH + {0xAF43, 0x758C}, //7432 #CJK UNIFIED IDEOGRAPH + {0xAF44, 0x758D}, //7433 #CJK UNIFIED IDEOGRAPH + {0xAF45, 0x758E}, //7434 #CJK UNIFIED IDEOGRAPH + {0xAF46, 0x7590}, //7435 #CJK UNIFIED IDEOGRAPH + {0xAF47, 0x7593}, //7436 #CJK UNIFIED IDEOGRAPH + {0xAF48, 0x7595}, //7437 #CJK UNIFIED IDEOGRAPH + {0xAF49, 0x7598}, //7438 #CJK UNIFIED IDEOGRAPH + {0xAF4A, 0x759B}, //7439 #CJK UNIFIED IDEOGRAPH + {0xAF4B, 0x759C}, //7440 #CJK UNIFIED IDEOGRAPH + {0xAF4C, 0x759E}, //7441 #CJK UNIFIED IDEOGRAPH + {0xAF4D, 0x75A2}, //7442 #CJK UNIFIED IDEOGRAPH + {0xAF4E, 0x75A6}, //7443 #CJK UNIFIED IDEOGRAPH + {0xAF4F, 0x75A7}, //7444 #CJK UNIFIED IDEOGRAPH + {0xAF50, 0x75A8}, //7445 #CJK UNIFIED IDEOGRAPH + {0xAF51, 0x75A9}, //7446 #CJK UNIFIED IDEOGRAPH + {0xAF52, 0x75AA}, //7447 #CJK UNIFIED IDEOGRAPH + {0xAF53, 0x75AD}, //7448 #CJK UNIFIED IDEOGRAPH + {0xAF54, 0x75B6}, //7449 #CJK UNIFIED IDEOGRAPH + {0xAF55, 0x75B7}, //7450 #CJK UNIFIED IDEOGRAPH + {0xAF56, 0x75BA}, //7451 #CJK UNIFIED IDEOGRAPH + {0xAF57, 0x75BB}, //7452 #CJK UNIFIED IDEOGRAPH + {0xAF58, 0x75BF}, //7453 #CJK UNIFIED IDEOGRAPH + {0xAF59, 0x75C0}, //7454 #CJK UNIFIED IDEOGRAPH + {0xAF5A, 0x75C1}, //7455 #CJK UNIFIED IDEOGRAPH + {0xAF5B, 0x75C6}, //7456 #CJK UNIFIED IDEOGRAPH + {0xAF5C, 0x75CB}, //7457 #CJK UNIFIED IDEOGRAPH + {0xAF5D, 0x75CC}, //7458 #CJK UNIFIED IDEOGRAPH + {0xAF5E, 0x75CE}, //7459 #CJK UNIFIED IDEOGRAPH + {0xAF5F, 0x75CF}, //7460 #CJK UNIFIED IDEOGRAPH + {0xAF60, 0x75D0}, //7461 #CJK UNIFIED IDEOGRAPH + {0xAF61, 0x75D1}, //7462 #CJK UNIFIED IDEOGRAPH + {0xAF62, 0x75D3}, //7463 #CJK UNIFIED IDEOGRAPH + {0xAF63, 0x75D7}, //7464 #CJK UNIFIED IDEOGRAPH + {0xAF64, 0x75D9}, //7465 #CJK UNIFIED IDEOGRAPH + {0xAF65, 0x75DA}, //7466 #CJK UNIFIED IDEOGRAPH + {0xAF66, 0x75DC}, //7467 #CJK UNIFIED IDEOGRAPH + {0xAF67, 0x75DD}, //7468 #CJK UNIFIED IDEOGRAPH + {0xAF68, 0x75DF}, //7469 #CJK UNIFIED IDEOGRAPH + {0xAF69, 0x75E0}, //7470 #CJK UNIFIED IDEOGRAPH + {0xAF6A, 0x75E1}, //7471 #CJK UNIFIED IDEOGRAPH + {0xAF6B, 0x75E5}, //7472 #CJK UNIFIED IDEOGRAPH + {0xAF6C, 0x75E9}, //7473 #CJK UNIFIED IDEOGRAPH + {0xAF6D, 0x75EC}, //7474 #CJK UNIFIED IDEOGRAPH + {0xAF6E, 0x75ED}, //7475 #CJK UNIFIED IDEOGRAPH + {0xAF6F, 0x75EE}, //7476 #CJK UNIFIED IDEOGRAPH + {0xAF70, 0x75EF}, //7477 #CJK UNIFIED IDEOGRAPH + {0xAF71, 0x75F2}, //7478 #CJK UNIFIED IDEOGRAPH + {0xAF72, 0x75F3}, //7479 #CJK UNIFIED IDEOGRAPH + {0xAF73, 0x75F5}, //7480 #CJK UNIFIED IDEOGRAPH + {0xAF74, 0x75F6}, //7481 #CJK UNIFIED IDEOGRAPH + {0xAF75, 0x75F7}, //7482 #CJK UNIFIED IDEOGRAPH + {0xAF76, 0x75F8}, //7483 #CJK UNIFIED IDEOGRAPH + {0xAF77, 0x75FA}, //7484 #CJK UNIFIED IDEOGRAPH + {0xAF78, 0x75FB}, //7485 #CJK UNIFIED IDEOGRAPH + {0xAF79, 0x75FD}, //7486 #CJK UNIFIED IDEOGRAPH + {0xAF7A, 0x75FE}, //7487 #CJK UNIFIED IDEOGRAPH + {0xAF7B, 0x7602}, //7488 #CJK UNIFIED IDEOGRAPH + {0xAF7C, 0x7604}, //7489 #CJK UNIFIED IDEOGRAPH + {0xAF7D, 0x7606}, //7490 #CJK UNIFIED IDEOGRAPH + {0xAF7E, 0x7607}, //7491 #CJK UNIFIED IDEOGRAPH + {0xAF80, 0x7608}, //7492 #CJK UNIFIED IDEOGRAPH + {0xAF81, 0x7609}, //7493 #CJK UNIFIED IDEOGRAPH + {0xAF82, 0x760B}, //7494 #CJK UNIFIED IDEOGRAPH + {0xAF83, 0x760D}, //7495 #CJK UNIFIED IDEOGRAPH + {0xAF84, 0x760E}, //7496 #CJK UNIFIED IDEOGRAPH + {0xAF85, 0x760F}, //7497 #CJK UNIFIED IDEOGRAPH + {0xAF86, 0x7611}, //7498 #CJK UNIFIED IDEOGRAPH + {0xAF87, 0x7612}, //7499 #CJK UNIFIED IDEOGRAPH + {0xAF88, 0x7613}, //7500 #CJK UNIFIED IDEOGRAPH + {0xAF89, 0x7614}, //7501 #CJK UNIFIED IDEOGRAPH + {0xAF8A, 0x7616}, //7502 #CJK UNIFIED IDEOGRAPH + {0xAF8B, 0x761A}, //7503 #CJK UNIFIED IDEOGRAPH + {0xAF8C, 0x761C}, //7504 #CJK UNIFIED IDEOGRAPH + {0xAF8D, 0x761D}, //7505 #CJK UNIFIED IDEOGRAPH + {0xAF8E, 0x761E}, //7506 #CJK UNIFIED IDEOGRAPH + {0xAF8F, 0x7621}, //7507 #CJK UNIFIED IDEOGRAPH + {0xAF90, 0x7623}, //7508 #CJK UNIFIED IDEOGRAPH + {0xAF91, 0x7627}, //7509 #CJK UNIFIED IDEOGRAPH + {0xAF92, 0x7628}, //7510 #CJK UNIFIED IDEOGRAPH + {0xAF93, 0x762C}, //7511 #CJK UNIFIED IDEOGRAPH + {0xAF94, 0x762E}, //7512 #CJK UNIFIED IDEOGRAPH + {0xAF95, 0x762F}, //7513 #CJK UNIFIED IDEOGRAPH + {0xAF96, 0x7631}, //7514 #CJK UNIFIED IDEOGRAPH + {0xAF97, 0x7632}, //7515 #CJK UNIFIED IDEOGRAPH + {0xAF98, 0x7636}, //7516 #CJK UNIFIED IDEOGRAPH + {0xAF99, 0x7637}, //7517 #CJK UNIFIED IDEOGRAPH + {0xAF9A, 0x7639}, //7518 #CJK UNIFIED IDEOGRAPH + {0xAF9B, 0x763A}, //7519 #CJK UNIFIED IDEOGRAPH + {0xAF9C, 0x763B}, //7520 #CJK UNIFIED IDEOGRAPH + {0xAF9D, 0x763D}, //7521 #CJK UNIFIED IDEOGRAPH + {0xAF9E, 0x7641}, //7522 #CJK UNIFIED IDEOGRAPH + {0xAF9F, 0x7642}, //7523 #CJK UNIFIED IDEOGRAPH + {0xAFA0, 0x7644}, //7524 #CJK UNIFIED IDEOGRAPH + {0xB040, 0x7645}, //7525 #CJK UNIFIED IDEOGRAPH + {0xB041, 0x7646}, //7526 #CJK UNIFIED IDEOGRAPH + {0xB042, 0x7647}, //7527 #CJK UNIFIED IDEOGRAPH + {0xB043, 0x7648}, //7528 #CJK UNIFIED IDEOGRAPH + {0xB044, 0x7649}, //7529 #CJK UNIFIED IDEOGRAPH + {0xB045, 0x764A}, //7530 #CJK UNIFIED IDEOGRAPH + {0xB046, 0x764B}, //7531 #CJK UNIFIED IDEOGRAPH + {0xB047, 0x764E}, //7532 #CJK UNIFIED IDEOGRAPH + {0xB048, 0x764F}, //7533 #CJK UNIFIED IDEOGRAPH + {0xB049, 0x7650}, //7534 #CJK UNIFIED IDEOGRAPH + {0xB04A, 0x7651}, //7535 #CJK UNIFIED IDEOGRAPH + {0xB04B, 0x7652}, //7536 #CJK UNIFIED IDEOGRAPH + {0xB04C, 0x7653}, //7537 #CJK UNIFIED IDEOGRAPH + {0xB04D, 0x7655}, //7538 #CJK UNIFIED IDEOGRAPH + {0xB04E, 0x7657}, //7539 #CJK UNIFIED IDEOGRAPH + {0xB04F, 0x7658}, //7540 #CJK UNIFIED IDEOGRAPH + {0xB050, 0x7659}, //7541 #CJK UNIFIED IDEOGRAPH + {0xB051, 0x765A}, //7542 #CJK UNIFIED IDEOGRAPH + {0xB052, 0x765B}, //7543 #CJK UNIFIED IDEOGRAPH + {0xB053, 0x765D}, //7544 #CJK UNIFIED IDEOGRAPH + {0xB054, 0x765F}, //7545 #CJK UNIFIED IDEOGRAPH + {0xB055, 0x7660}, //7546 #CJK UNIFIED IDEOGRAPH + {0xB056, 0x7661}, //7547 #CJK UNIFIED IDEOGRAPH + {0xB057, 0x7662}, //7548 #CJK UNIFIED IDEOGRAPH + {0xB058, 0x7664}, //7549 #CJK UNIFIED IDEOGRAPH + {0xB059, 0x7665}, //7550 #CJK UNIFIED IDEOGRAPH + {0xB05A, 0x7666}, //7551 #CJK UNIFIED IDEOGRAPH + {0xB05B, 0x7667}, //7552 #CJK UNIFIED IDEOGRAPH + {0xB05C, 0x7668}, //7553 #CJK UNIFIED IDEOGRAPH + {0xB05D, 0x7669}, //7554 #CJK UNIFIED IDEOGRAPH + {0xB05E, 0x766A}, //7555 #CJK UNIFIED IDEOGRAPH + {0xB05F, 0x766C}, //7556 #CJK UNIFIED IDEOGRAPH + {0xB060, 0x766D}, //7557 #CJK UNIFIED IDEOGRAPH + {0xB061, 0x766E}, //7558 #CJK UNIFIED IDEOGRAPH + {0xB062, 0x7670}, //7559 #CJK UNIFIED IDEOGRAPH + {0xB063, 0x7671}, //7560 #CJK UNIFIED IDEOGRAPH + {0xB064, 0x7672}, //7561 #CJK UNIFIED IDEOGRAPH + {0xB065, 0x7673}, //7562 #CJK UNIFIED IDEOGRAPH + {0xB066, 0x7674}, //7563 #CJK UNIFIED IDEOGRAPH + {0xB067, 0x7675}, //7564 #CJK UNIFIED IDEOGRAPH + {0xB068, 0x7676}, //7565 #CJK UNIFIED IDEOGRAPH + {0xB069, 0x7677}, //7566 #CJK UNIFIED IDEOGRAPH + {0xB06A, 0x7679}, //7567 #CJK UNIFIED IDEOGRAPH + {0xB06B, 0x767A}, //7568 #CJK UNIFIED IDEOGRAPH + {0xB06C, 0x767C}, //7569 #CJK UNIFIED IDEOGRAPH + {0xB06D, 0x767F}, //7570 #CJK UNIFIED IDEOGRAPH + {0xB06E, 0x7680}, //7571 #CJK UNIFIED IDEOGRAPH + {0xB06F, 0x7681}, //7572 #CJK UNIFIED IDEOGRAPH + {0xB070, 0x7683}, //7573 #CJK UNIFIED IDEOGRAPH + {0xB071, 0x7685}, //7574 #CJK UNIFIED IDEOGRAPH + {0xB072, 0x7689}, //7575 #CJK UNIFIED IDEOGRAPH + {0xB073, 0x768A}, //7576 #CJK UNIFIED IDEOGRAPH + {0xB074, 0x768C}, //7577 #CJK UNIFIED IDEOGRAPH + {0xB075, 0x768D}, //7578 #CJK UNIFIED IDEOGRAPH + {0xB076, 0x768F}, //7579 #CJK UNIFIED IDEOGRAPH + {0xB077, 0x7690}, //7580 #CJK UNIFIED IDEOGRAPH + {0xB078, 0x7692}, //7581 #CJK UNIFIED IDEOGRAPH + {0xB079, 0x7694}, //7582 #CJK UNIFIED IDEOGRAPH + {0xB07A, 0x7695}, //7583 #CJK UNIFIED IDEOGRAPH + {0xB07B, 0x7697}, //7584 #CJK UNIFIED IDEOGRAPH + {0xB07C, 0x7698}, //7585 #CJK UNIFIED IDEOGRAPH + {0xB07D, 0x769A}, //7586 #CJK UNIFIED IDEOGRAPH + {0xB07E, 0x769B}, //7587 #CJK UNIFIED IDEOGRAPH + {0xB080, 0x769C}, //7588 #CJK UNIFIED IDEOGRAPH + {0xB081, 0x769D}, //7589 #CJK UNIFIED IDEOGRAPH + {0xB082, 0x769E}, //7590 #CJK UNIFIED IDEOGRAPH + {0xB083, 0x769F}, //7591 #CJK UNIFIED IDEOGRAPH + {0xB084, 0x76A0}, //7592 #CJK UNIFIED IDEOGRAPH + {0xB085, 0x76A1}, //7593 #CJK UNIFIED IDEOGRAPH + {0xB086, 0x76A2}, //7594 #CJK UNIFIED IDEOGRAPH + {0xB087, 0x76A3}, //7595 #CJK UNIFIED IDEOGRAPH + {0xB088, 0x76A5}, //7596 #CJK UNIFIED IDEOGRAPH + {0xB089, 0x76A6}, //7597 #CJK UNIFIED IDEOGRAPH + {0xB08A, 0x76A7}, //7598 #CJK UNIFIED IDEOGRAPH + {0xB08B, 0x76A8}, //7599 #CJK UNIFIED IDEOGRAPH + {0xB08C, 0x76A9}, //7600 #CJK UNIFIED IDEOGRAPH + {0xB08D, 0x76AA}, //7601 #CJK UNIFIED IDEOGRAPH + {0xB08E, 0x76AB}, //7602 #CJK UNIFIED IDEOGRAPH + {0xB08F, 0x76AC}, //7603 #CJK UNIFIED IDEOGRAPH + {0xB090, 0x76AD}, //7604 #CJK UNIFIED IDEOGRAPH + {0xB091, 0x76AF}, //7605 #CJK UNIFIED IDEOGRAPH + {0xB092, 0x76B0}, //7606 #CJK UNIFIED IDEOGRAPH + {0xB093, 0x76B3}, //7607 #CJK UNIFIED IDEOGRAPH + {0xB094, 0x76B5}, //7608 #CJK UNIFIED IDEOGRAPH + {0xB095, 0x76B6}, //7609 #CJK UNIFIED IDEOGRAPH + {0xB096, 0x76B7}, //7610 #CJK UNIFIED IDEOGRAPH + {0xB097, 0x76B8}, //7611 #CJK UNIFIED IDEOGRAPH + {0xB098, 0x76B9}, //7612 #CJK UNIFIED IDEOGRAPH + {0xB099, 0x76BA}, //7613 #CJK UNIFIED IDEOGRAPH + {0xB09A, 0x76BB}, //7614 #CJK UNIFIED IDEOGRAPH + {0xB09B, 0x76BC}, //7615 #CJK UNIFIED IDEOGRAPH + {0xB09C, 0x76BD}, //7616 #CJK UNIFIED IDEOGRAPH + {0xB09D, 0x76BE}, //7617 #CJK UNIFIED IDEOGRAPH + {0xB09E, 0x76C0}, //7618 #CJK UNIFIED IDEOGRAPH + {0xB09F, 0x76C1}, //7619 #CJK UNIFIED IDEOGRAPH + {0xB0A0, 0x76C3}, //7620 #CJK UNIFIED IDEOGRAPH + {0xB0A1, 0x554A}, //7621 #CJK UNIFIED IDEOGRAPH + {0xB0A2, 0x963F}, //7622 #CJK UNIFIED IDEOGRAPH + {0xB0A3, 0x57C3}, //7623 #CJK UNIFIED IDEOGRAPH + {0xB0A4, 0x6328}, //7624 #CJK UNIFIED IDEOGRAPH + {0xB0A5, 0x54CE}, //7625 #CJK UNIFIED IDEOGRAPH + {0xB0A6, 0x5509}, //7626 #CJK UNIFIED IDEOGRAPH + {0xB0A7, 0x54C0}, //7627 #CJK UNIFIED IDEOGRAPH + {0xB0A8, 0x7691}, //7628 #CJK UNIFIED IDEOGRAPH + {0xB0A9, 0x764C}, //7629 #CJK UNIFIED IDEOGRAPH + {0xB0AA, 0x853C}, //7630 #CJK UNIFIED IDEOGRAPH + {0xB0AB, 0x77EE}, //7631 #CJK UNIFIED IDEOGRAPH + {0xB0AC, 0x827E}, //7632 #CJK UNIFIED IDEOGRAPH + {0xB0AD, 0x788D}, //7633 #CJK UNIFIED IDEOGRAPH + {0xB0AE, 0x7231}, //7634 #CJK UNIFIED IDEOGRAPH + {0xB0AF, 0x9698}, //7635 #CJK UNIFIED IDEOGRAPH + {0xB0B0, 0x978D}, //7636 #CJK UNIFIED IDEOGRAPH + {0xB0B1, 0x6C28}, //7637 #CJK UNIFIED IDEOGRAPH + {0xB0B2, 0x5B89}, //7638 #CJK UNIFIED IDEOGRAPH + {0xB0B3, 0x4FFA}, //7639 #CJK UNIFIED IDEOGRAPH + {0xB0B4, 0x6309}, //7640 #CJK UNIFIED IDEOGRAPH + {0xB0B5, 0x6697}, //7641 #CJK UNIFIED IDEOGRAPH + {0xB0B6, 0x5CB8}, //7642 #CJK UNIFIED IDEOGRAPH + {0xB0B7, 0x80FA}, //7643 #CJK UNIFIED IDEOGRAPH + {0xB0B8, 0x6848}, //7644 #CJK UNIFIED IDEOGRAPH + {0xB0B9, 0x80AE}, //7645 #CJK UNIFIED IDEOGRAPH + {0xB0BA, 0x6602}, //7646 #CJK UNIFIED IDEOGRAPH + {0xB0BB, 0x76CE}, //7647 #CJK UNIFIED IDEOGRAPH + {0xB0BC, 0x51F9}, //7648 #CJK UNIFIED IDEOGRAPH + {0xB0BD, 0x6556}, //7649 #CJK UNIFIED IDEOGRAPH + {0xB0BE, 0x71AC}, //7650 #CJK UNIFIED IDEOGRAPH + {0xB0BF, 0x7FF1}, //7651 #CJK UNIFIED IDEOGRAPH + {0xB0C0, 0x8884}, //7652 #CJK UNIFIED IDEOGRAPH + {0xB0C1, 0x50B2}, //7653 #CJK UNIFIED IDEOGRAPH + {0xB0C2, 0x5965}, //7654 #CJK UNIFIED IDEOGRAPH + {0xB0C3, 0x61CA}, //7655 #CJK UNIFIED IDEOGRAPH + {0xB0C4, 0x6FB3}, //7656 #CJK UNIFIED IDEOGRAPH + {0xB0C5, 0x82AD}, //7657 #CJK UNIFIED IDEOGRAPH + {0xB0C6, 0x634C}, //7658 #CJK UNIFIED IDEOGRAPH + {0xB0C7, 0x6252}, //7659 #CJK UNIFIED IDEOGRAPH + {0xB0C8, 0x53ED}, //7660 #CJK UNIFIED IDEOGRAPH + {0xB0C9, 0x5427}, //7661 #CJK UNIFIED IDEOGRAPH + {0xB0CA, 0x7B06}, //7662 #CJK UNIFIED IDEOGRAPH + {0xB0CB, 0x516B}, //7663 #CJK UNIFIED IDEOGRAPH + {0xB0CC, 0x75A4}, //7664 #CJK UNIFIED IDEOGRAPH + {0xB0CD, 0x5DF4}, //7665 #CJK UNIFIED IDEOGRAPH + {0xB0CE, 0x62D4}, //7666 #CJK UNIFIED IDEOGRAPH + {0xB0CF, 0x8DCB}, //7667 #CJK UNIFIED IDEOGRAPH + {0xB0D0, 0x9776}, //7668 #CJK UNIFIED IDEOGRAPH + {0xB0D1, 0x628A}, //7669 #CJK UNIFIED IDEOGRAPH + {0xB0D2, 0x8019}, //7670 #CJK UNIFIED IDEOGRAPH + {0xB0D3, 0x575D}, //7671 #CJK UNIFIED IDEOGRAPH + {0xB0D4, 0x9738}, //7672 #CJK UNIFIED IDEOGRAPH + {0xB0D5, 0x7F62}, //7673 #CJK UNIFIED IDEOGRAPH + {0xB0D6, 0x7238}, //7674 #CJK UNIFIED IDEOGRAPH + {0xB0D7, 0x767D}, //7675 #CJK UNIFIED IDEOGRAPH + {0xB0D8, 0x67CF}, //7676 #CJK UNIFIED IDEOGRAPH + {0xB0D9, 0x767E}, //7677 #CJK UNIFIED IDEOGRAPH + {0xB0DA, 0x6446}, //7678 #CJK UNIFIED IDEOGRAPH + {0xB0DB, 0x4F70}, //7679 #CJK UNIFIED IDEOGRAPH + {0xB0DC, 0x8D25}, //7680 #CJK UNIFIED IDEOGRAPH + {0xB0DD, 0x62DC}, //7681 #CJK UNIFIED IDEOGRAPH + {0xB0DE, 0x7A17}, //7682 #CJK UNIFIED IDEOGRAPH + {0xB0DF, 0x6591}, //7683 #CJK UNIFIED IDEOGRAPH + {0xB0E0, 0x73ED}, //7684 #CJK UNIFIED IDEOGRAPH + {0xB0E1, 0x642C}, //7685 #CJK UNIFIED IDEOGRAPH + {0xB0E2, 0x6273}, //7686 #CJK UNIFIED IDEOGRAPH + {0xB0E3, 0x822C}, //7687 #CJK UNIFIED IDEOGRAPH + {0xB0E4, 0x9881}, //7688 #CJK UNIFIED IDEOGRAPH + {0xB0E5, 0x677F}, //7689 #CJK UNIFIED IDEOGRAPH + {0xB0E6, 0x7248}, //7690 #CJK UNIFIED IDEOGRAPH + {0xB0E7, 0x626E}, //7691 #CJK UNIFIED IDEOGRAPH + {0xB0E8, 0x62CC}, //7692 #CJK UNIFIED IDEOGRAPH + {0xB0E9, 0x4F34}, //7693 #CJK UNIFIED IDEOGRAPH + {0xB0EA, 0x74E3}, //7694 #CJK UNIFIED IDEOGRAPH + {0xB0EB, 0x534A}, //7695 #CJK UNIFIED IDEOGRAPH + {0xB0EC, 0x529E}, //7696 #CJK UNIFIED IDEOGRAPH + {0xB0ED, 0x7ECA}, //7697 #CJK UNIFIED IDEOGRAPH + {0xB0EE, 0x90A6}, //7698 #CJK UNIFIED IDEOGRAPH + {0xB0EF, 0x5E2E}, //7699 #CJK UNIFIED IDEOGRAPH + {0xB0F0, 0x6886}, //7700 #CJK UNIFIED IDEOGRAPH + {0xB0F1, 0x699C}, //7701 #CJK UNIFIED IDEOGRAPH + {0xB0F2, 0x8180}, //7702 #CJK UNIFIED IDEOGRAPH + {0xB0F3, 0x7ED1}, //7703 #CJK UNIFIED IDEOGRAPH + {0xB0F4, 0x68D2}, //7704 #CJK UNIFIED IDEOGRAPH + {0xB0F5, 0x78C5}, //7705 #CJK UNIFIED IDEOGRAPH + {0xB0F6, 0x868C}, //7706 #CJK UNIFIED IDEOGRAPH + {0xB0F7, 0x9551}, //7707 #CJK UNIFIED IDEOGRAPH + {0xB0F8, 0x508D}, //7708 #CJK UNIFIED IDEOGRAPH + {0xB0F9, 0x8C24}, //7709 #CJK UNIFIED IDEOGRAPH + {0xB0FA, 0x82DE}, //7710 #CJK UNIFIED IDEOGRAPH + {0xB0FB, 0x80DE}, //7711 #CJK UNIFIED IDEOGRAPH + {0xB0FC, 0x5305}, //7712 #CJK UNIFIED IDEOGRAPH + {0xB0FD, 0x8912}, //7713 #CJK UNIFIED IDEOGRAPH + {0xB0FE, 0x5265}, //7714 #CJK UNIFIED IDEOGRAPH + {0xB140, 0x76C4}, //7715 #CJK UNIFIED IDEOGRAPH + {0xB141, 0x76C7}, //7716 #CJK UNIFIED IDEOGRAPH + {0xB142, 0x76C9}, //7717 #CJK UNIFIED IDEOGRAPH + {0xB143, 0x76CB}, //7718 #CJK UNIFIED IDEOGRAPH + {0xB144, 0x76CC}, //7719 #CJK UNIFIED IDEOGRAPH + {0xB145, 0x76D3}, //7720 #CJK UNIFIED IDEOGRAPH + {0xB146, 0x76D5}, //7721 #CJK UNIFIED IDEOGRAPH + {0xB147, 0x76D9}, //7722 #CJK UNIFIED IDEOGRAPH + {0xB148, 0x76DA}, //7723 #CJK UNIFIED IDEOGRAPH + {0xB149, 0x76DC}, //7724 #CJK UNIFIED IDEOGRAPH + {0xB14A, 0x76DD}, //7725 #CJK UNIFIED IDEOGRAPH + {0xB14B, 0x76DE}, //7726 #CJK UNIFIED IDEOGRAPH + {0xB14C, 0x76E0}, //7727 #CJK UNIFIED IDEOGRAPH + {0xB14D, 0x76E1}, //7728 #CJK UNIFIED IDEOGRAPH + {0xB14E, 0x76E2}, //7729 #CJK UNIFIED IDEOGRAPH + {0xB14F, 0x76E3}, //7730 #CJK UNIFIED IDEOGRAPH + {0xB150, 0x76E4}, //7731 #CJK UNIFIED IDEOGRAPH + {0xB151, 0x76E6}, //7732 #CJK UNIFIED IDEOGRAPH + {0xB152, 0x76E7}, //7733 #CJK UNIFIED IDEOGRAPH + {0xB153, 0x76E8}, //7734 #CJK UNIFIED IDEOGRAPH + {0xB154, 0x76E9}, //7735 #CJK UNIFIED IDEOGRAPH + {0xB155, 0x76EA}, //7736 #CJK UNIFIED IDEOGRAPH + {0xB156, 0x76EB}, //7737 #CJK UNIFIED IDEOGRAPH + {0xB157, 0x76EC}, //7738 #CJK UNIFIED IDEOGRAPH + {0xB158, 0x76ED}, //7739 #CJK UNIFIED IDEOGRAPH + {0xB159, 0x76F0}, //7740 #CJK UNIFIED IDEOGRAPH + {0xB15A, 0x76F3}, //7741 #CJK UNIFIED IDEOGRAPH + {0xB15B, 0x76F5}, //7742 #CJK UNIFIED IDEOGRAPH + {0xB15C, 0x76F6}, //7743 #CJK UNIFIED IDEOGRAPH + {0xB15D, 0x76F7}, //7744 #CJK UNIFIED IDEOGRAPH + {0xB15E, 0x76FA}, //7745 #CJK UNIFIED IDEOGRAPH + {0xB15F, 0x76FB}, //7746 #CJK UNIFIED IDEOGRAPH + {0xB160, 0x76FD}, //7747 #CJK UNIFIED IDEOGRAPH + {0xB161, 0x76FF}, //7748 #CJK UNIFIED IDEOGRAPH + {0xB162, 0x7700}, //7749 #CJK UNIFIED IDEOGRAPH + {0xB163, 0x7702}, //7750 #CJK UNIFIED IDEOGRAPH + {0xB164, 0x7703}, //7751 #CJK UNIFIED IDEOGRAPH + {0xB165, 0x7705}, //7752 #CJK UNIFIED IDEOGRAPH + {0xB166, 0x7706}, //7753 #CJK UNIFIED IDEOGRAPH + {0xB167, 0x770A}, //7754 #CJK UNIFIED IDEOGRAPH + {0xB168, 0x770C}, //7755 #CJK UNIFIED IDEOGRAPH + {0xB169, 0x770E}, //7756 #CJK UNIFIED IDEOGRAPH + {0xB16A, 0x770F}, //7757 #CJK UNIFIED IDEOGRAPH + {0xB16B, 0x7710}, //7758 #CJK UNIFIED IDEOGRAPH + {0xB16C, 0x7711}, //7759 #CJK UNIFIED IDEOGRAPH + {0xB16D, 0x7712}, //7760 #CJK UNIFIED IDEOGRAPH + {0xB16E, 0x7713}, //7761 #CJK UNIFIED IDEOGRAPH + {0xB16F, 0x7714}, //7762 #CJK UNIFIED IDEOGRAPH + {0xB170, 0x7715}, //7763 #CJK UNIFIED IDEOGRAPH + {0xB171, 0x7716}, //7764 #CJK UNIFIED IDEOGRAPH + {0xB172, 0x7717}, //7765 #CJK UNIFIED IDEOGRAPH + {0xB173, 0x7718}, //7766 #CJK UNIFIED IDEOGRAPH + {0xB174, 0x771B}, //7767 #CJK UNIFIED IDEOGRAPH + {0xB175, 0x771C}, //7768 #CJK UNIFIED IDEOGRAPH + {0xB176, 0x771D}, //7769 #CJK UNIFIED IDEOGRAPH + {0xB177, 0x771E}, //7770 #CJK UNIFIED IDEOGRAPH + {0xB178, 0x7721}, //7771 #CJK UNIFIED IDEOGRAPH + {0xB179, 0x7723}, //7772 #CJK UNIFIED IDEOGRAPH + {0xB17A, 0x7724}, //7773 #CJK UNIFIED IDEOGRAPH + {0xB17B, 0x7725}, //7774 #CJK UNIFIED IDEOGRAPH + {0xB17C, 0x7727}, //7775 #CJK UNIFIED IDEOGRAPH + {0xB17D, 0x772A}, //7776 #CJK UNIFIED IDEOGRAPH + {0xB17E, 0x772B}, //7777 #CJK UNIFIED IDEOGRAPH + {0xB180, 0x772C}, //7778 #CJK UNIFIED IDEOGRAPH + {0xB181, 0x772E}, //7779 #CJK UNIFIED IDEOGRAPH + {0xB182, 0x7730}, //7780 #CJK UNIFIED IDEOGRAPH + {0xB183, 0x7731}, //7781 #CJK UNIFIED IDEOGRAPH + {0xB184, 0x7732}, //7782 #CJK UNIFIED IDEOGRAPH + {0xB185, 0x7733}, //7783 #CJK UNIFIED IDEOGRAPH + {0xB186, 0x7734}, //7784 #CJK UNIFIED IDEOGRAPH + {0xB187, 0x7739}, //7785 #CJK UNIFIED IDEOGRAPH + {0xB188, 0x773B}, //7786 #CJK UNIFIED IDEOGRAPH + {0xB189, 0x773D}, //7787 #CJK UNIFIED IDEOGRAPH + {0xB18A, 0x773E}, //7788 #CJK UNIFIED IDEOGRAPH + {0xB18B, 0x773F}, //7789 #CJK UNIFIED IDEOGRAPH + {0xB18C, 0x7742}, //7790 #CJK UNIFIED IDEOGRAPH + {0xB18D, 0x7744}, //7791 #CJK UNIFIED IDEOGRAPH + {0xB18E, 0x7745}, //7792 #CJK UNIFIED IDEOGRAPH + {0xB18F, 0x7746}, //7793 #CJK UNIFIED IDEOGRAPH + {0xB190, 0x7748}, //7794 #CJK UNIFIED IDEOGRAPH + {0xB191, 0x7749}, //7795 #CJK UNIFIED IDEOGRAPH + {0xB192, 0x774A}, //7796 #CJK UNIFIED IDEOGRAPH + {0xB193, 0x774B}, //7797 #CJK UNIFIED IDEOGRAPH + {0xB194, 0x774C}, //7798 #CJK UNIFIED IDEOGRAPH + {0xB195, 0x774D}, //7799 #CJK UNIFIED IDEOGRAPH + {0xB196, 0x774E}, //7800 #CJK UNIFIED IDEOGRAPH + {0xB197, 0x774F}, //7801 #CJK UNIFIED IDEOGRAPH + {0xB198, 0x7752}, //7802 #CJK UNIFIED IDEOGRAPH + {0xB199, 0x7753}, //7803 #CJK UNIFIED IDEOGRAPH + {0xB19A, 0x7754}, //7804 #CJK UNIFIED IDEOGRAPH + {0xB19B, 0x7755}, //7805 #CJK UNIFIED IDEOGRAPH + {0xB19C, 0x7756}, //7806 #CJK UNIFIED IDEOGRAPH + {0xB19D, 0x7757}, //7807 #CJK UNIFIED IDEOGRAPH + {0xB19E, 0x7758}, //7808 #CJK UNIFIED IDEOGRAPH + {0xB19F, 0x7759}, //7809 #CJK UNIFIED IDEOGRAPH + {0xB1A0, 0x775C}, //7810 #CJK UNIFIED IDEOGRAPH + {0xB1A1, 0x8584}, //7811 #CJK UNIFIED IDEOGRAPH + {0xB1A2, 0x96F9}, //7812 #CJK UNIFIED IDEOGRAPH + {0xB1A3, 0x4FDD}, //7813 #CJK UNIFIED IDEOGRAPH + {0xB1A4, 0x5821}, //7814 #CJK UNIFIED IDEOGRAPH + {0xB1A5, 0x9971}, //7815 #CJK UNIFIED IDEOGRAPH + {0xB1A6, 0x5B9D}, //7816 #CJK UNIFIED IDEOGRAPH + {0xB1A7, 0x62B1}, //7817 #CJK UNIFIED IDEOGRAPH + {0xB1A8, 0x62A5}, //7818 #CJK UNIFIED IDEOGRAPH + {0xB1A9, 0x66B4}, //7819 #CJK UNIFIED IDEOGRAPH + {0xB1AA, 0x8C79}, //7820 #CJK UNIFIED IDEOGRAPH + {0xB1AB, 0x9C8D}, //7821 #CJK UNIFIED IDEOGRAPH + {0xB1AC, 0x7206}, //7822 #CJK UNIFIED IDEOGRAPH + {0xB1AD, 0x676F}, //7823 #CJK UNIFIED IDEOGRAPH + {0xB1AE, 0x7891}, //7824 #CJK UNIFIED IDEOGRAPH + {0xB1AF, 0x60B2}, //7825 #CJK UNIFIED IDEOGRAPH + {0xB1B0, 0x5351}, //7826 #CJK UNIFIED IDEOGRAPH + {0xB1B1, 0x5317}, //7827 #CJK UNIFIED IDEOGRAPH + {0xB1B2, 0x8F88}, //7828 #CJK UNIFIED IDEOGRAPH + {0xB1B3, 0x80CC}, //7829 #CJK UNIFIED IDEOGRAPH + {0xB1B4, 0x8D1D}, //7830 #CJK UNIFIED IDEOGRAPH + {0xB1B5, 0x94A1}, //7831 #CJK UNIFIED IDEOGRAPH + {0xB1B6, 0x500D}, //7832 #CJK UNIFIED IDEOGRAPH + {0xB1B7, 0x72C8}, //7833 #CJK UNIFIED IDEOGRAPH + {0xB1B8, 0x5907}, //7834 #CJK UNIFIED IDEOGRAPH + {0xB1B9, 0x60EB}, //7835 #CJK UNIFIED IDEOGRAPH + {0xB1BA, 0x7119}, //7836 #CJK UNIFIED IDEOGRAPH + {0xB1BB, 0x88AB}, //7837 #CJK UNIFIED IDEOGRAPH + {0xB1BC, 0x5954}, //7838 #CJK UNIFIED IDEOGRAPH + {0xB1BD, 0x82EF}, //7839 #CJK UNIFIED IDEOGRAPH + {0xB1BE, 0x672C}, //7840 #CJK UNIFIED IDEOGRAPH + {0xB1BF, 0x7B28}, //7841 #CJK UNIFIED IDEOGRAPH + {0xB1C0, 0x5D29}, //7842 #CJK UNIFIED IDEOGRAPH + {0xB1C1, 0x7EF7}, //7843 #CJK UNIFIED IDEOGRAPH + {0xB1C2, 0x752D}, //7844 #CJK UNIFIED IDEOGRAPH + {0xB1C3, 0x6CF5}, //7845 #CJK UNIFIED IDEOGRAPH + {0xB1C4, 0x8E66}, //7846 #CJK UNIFIED IDEOGRAPH + {0xB1C5, 0x8FF8}, //7847 #CJK UNIFIED IDEOGRAPH + {0xB1C6, 0x903C}, //7848 #CJK UNIFIED IDEOGRAPH + {0xB1C7, 0x9F3B}, //7849 #CJK UNIFIED IDEOGRAPH + {0xB1C8, 0x6BD4}, //7850 #CJK UNIFIED IDEOGRAPH + {0xB1C9, 0x9119}, //7851 #CJK UNIFIED IDEOGRAPH + {0xB1CA, 0x7B14}, //7852 #CJK UNIFIED IDEOGRAPH + {0xB1CB, 0x5F7C}, //7853 #CJK UNIFIED IDEOGRAPH + {0xB1CC, 0x78A7}, //7854 #CJK UNIFIED IDEOGRAPH + {0xB1CD, 0x84D6}, //7855 #CJK UNIFIED IDEOGRAPH + {0xB1CE, 0x853D}, //7856 #CJK UNIFIED IDEOGRAPH + {0xB1CF, 0x6BD5}, //7857 #CJK UNIFIED IDEOGRAPH + {0xB1D0, 0x6BD9}, //7858 #CJK UNIFIED IDEOGRAPH + {0xB1D1, 0x6BD6}, //7859 #CJK UNIFIED IDEOGRAPH + {0xB1D2, 0x5E01}, //7860 #CJK UNIFIED IDEOGRAPH + {0xB1D3, 0x5E87}, //7861 #CJK UNIFIED IDEOGRAPH + {0xB1D4, 0x75F9}, //7862 #CJK UNIFIED IDEOGRAPH + {0xB1D5, 0x95ED}, //7863 #CJK UNIFIED IDEOGRAPH + {0xB1D6, 0x655D}, //7864 #CJK UNIFIED IDEOGRAPH + {0xB1D7, 0x5F0A}, //7865 #CJK UNIFIED IDEOGRAPH + {0xB1D8, 0x5FC5}, //7866 #CJK UNIFIED IDEOGRAPH + {0xB1D9, 0x8F9F}, //7867 #CJK UNIFIED IDEOGRAPH + {0xB1DA, 0x58C1}, //7868 #CJK UNIFIED IDEOGRAPH + {0xB1DB, 0x81C2}, //7869 #CJK UNIFIED IDEOGRAPH + {0xB1DC, 0x907F}, //7870 #CJK UNIFIED IDEOGRAPH + {0xB1DD, 0x965B}, //7871 #CJK UNIFIED IDEOGRAPH + {0xB1DE, 0x97AD}, //7872 #CJK UNIFIED IDEOGRAPH + {0xB1DF, 0x8FB9}, //7873 #CJK UNIFIED IDEOGRAPH + {0xB1E0, 0x7F16}, //7874 #CJK UNIFIED IDEOGRAPH + {0xB1E1, 0x8D2C}, //7875 #CJK UNIFIED IDEOGRAPH + {0xB1E2, 0x6241}, //7876 #CJK UNIFIED IDEOGRAPH + {0xB1E3, 0x4FBF}, //7877 #CJK UNIFIED IDEOGRAPH + {0xB1E4, 0x53D8}, //7878 #CJK UNIFIED IDEOGRAPH + {0xB1E5, 0x535E}, //7879 #CJK UNIFIED IDEOGRAPH + {0xB1E6, 0x8FA8}, //7880 #CJK UNIFIED IDEOGRAPH + {0xB1E7, 0x8FA9}, //7881 #CJK UNIFIED IDEOGRAPH + {0xB1E8, 0x8FAB}, //7882 #CJK UNIFIED IDEOGRAPH + {0xB1E9, 0x904D}, //7883 #CJK UNIFIED IDEOGRAPH + {0xB1EA, 0x6807}, //7884 #CJK UNIFIED IDEOGRAPH + {0xB1EB, 0x5F6A}, //7885 #CJK UNIFIED IDEOGRAPH + {0xB1EC, 0x8198}, //7886 #CJK UNIFIED IDEOGRAPH + {0xB1ED, 0x8868}, //7887 #CJK UNIFIED IDEOGRAPH + {0xB1EE, 0x9CD6}, //7888 #CJK UNIFIED IDEOGRAPH + {0xB1EF, 0x618B}, //7889 #CJK UNIFIED IDEOGRAPH + {0xB1F0, 0x522B}, //7890 #CJK UNIFIED IDEOGRAPH + {0xB1F1, 0x762A}, //7891 #CJK UNIFIED IDEOGRAPH + {0xB1F2, 0x5F6C}, //7892 #CJK UNIFIED IDEOGRAPH + {0xB1F3, 0x658C}, //7893 #CJK UNIFIED IDEOGRAPH + {0xB1F4, 0x6FD2}, //7894 #CJK UNIFIED IDEOGRAPH + {0xB1F5, 0x6EE8}, //7895 #CJK UNIFIED IDEOGRAPH + {0xB1F6, 0x5BBE}, //7896 #CJK UNIFIED IDEOGRAPH + {0xB1F7, 0x6448}, //7897 #CJK UNIFIED IDEOGRAPH + {0xB1F8, 0x5175}, //7898 #CJK UNIFIED IDEOGRAPH + {0xB1F9, 0x51B0}, //7899 #CJK UNIFIED IDEOGRAPH + {0xB1FA, 0x67C4}, //7900 #CJK UNIFIED IDEOGRAPH + {0xB1FB, 0x4E19}, //7901 #CJK UNIFIED IDEOGRAPH + {0xB1FC, 0x79C9}, //7902 #CJK UNIFIED IDEOGRAPH + {0xB1FD, 0x997C}, //7903 #CJK UNIFIED IDEOGRAPH + {0xB1FE, 0x70B3}, //7904 #CJK UNIFIED IDEOGRAPH + {0xB240, 0x775D}, //7905 #CJK UNIFIED IDEOGRAPH + {0xB241, 0x775E}, //7906 #CJK UNIFIED IDEOGRAPH + {0xB242, 0x775F}, //7907 #CJK UNIFIED IDEOGRAPH + {0xB243, 0x7760}, //7908 #CJK UNIFIED IDEOGRAPH + {0xB244, 0x7764}, //7909 #CJK UNIFIED IDEOGRAPH + {0xB245, 0x7767}, //7910 #CJK UNIFIED IDEOGRAPH + {0xB246, 0x7769}, //7911 #CJK UNIFIED IDEOGRAPH + {0xB247, 0x776A}, //7912 #CJK UNIFIED IDEOGRAPH + {0xB248, 0x776D}, //7913 #CJK UNIFIED IDEOGRAPH + {0xB249, 0x776E}, //7914 #CJK UNIFIED IDEOGRAPH + {0xB24A, 0x776F}, //7915 #CJK UNIFIED IDEOGRAPH + {0xB24B, 0x7770}, //7916 #CJK UNIFIED IDEOGRAPH + {0xB24C, 0x7771}, //7917 #CJK UNIFIED IDEOGRAPH + {0xB24D, 0x7772}, //7918 #CJK UNIFIED IDEOGRAPH + {0xB24E, 0x7773}, //7919 #CJK UNIFIED IDEOGRAPH + {0xB24F, 0x7774}, //7920 #CJK UNIFIED IDEOGRAPH + {0xB250, 0x7775}, //7921 #CJK UNIFIED IDEOGRAPH + {0xB251, 0x7776}, //7922 #CJK UNIFIED IDEOGRAPH + {0xB252, 0x7777}, //7923 #CJK UNIFIED IDEOGRAPH + {0xB253, 0x7778}, //7924 #CJK UNIFIED IDEOGRAPH + {0xB254, 0x777A}, //7925 #CJK UNIFIED IDEOGRAPH + {0xB255, 0x777B}, //7926 #CJK UNIFIED IDEOGRAPH + {0xB256, 0x777C}, //7927 #CJK UNIFIED IDEOGRAPH + {0xB257, 0x7781}, //7928 #CJK UNIFIED IDEOGRAPH + {0xB258, 0x7782}, //7929 #CJK UNIFIED IDEOGRAPH + {0xB259, 0x7783}, //7930 #CJK UNIFIED IDEOGRAPH + {0xB25A, 0x7786}, //7931 #CJK UNIFIED IDEOGRAPH + {0xB25B, 0x7787}, //7932 #CJK UNIFIED IDEOGRAPH + {0xB25C, 0x7788}, //7933 #CJK UNIFIED IDEOGRAPH + {0xB25D, 0x7789}, //7934 #CJK UNIFIED IDEOGRAPH + {0xB25E, 0x778A}, //7935 #CJK UNIFIED IDEOGRAPH + {0xB25F, 0x778B}, //7936 #CJK UNIFIED IDEOGRAPH + {0xB260, 0x778F}, //7937 #CJK UNIFIED IDEOGRAPH + {0xB261, 0x7790}, //7938 #CJK UNIFIED IDEOGRAPH + {0xB262, 0x7793}, //7939 #CJK UNIFIED IDEOGRAPH + {0xB263, 0x7794}, //7940 #CJK UNIFIED IDEOGRAPH + {0xB264, 0x7795}, //7941 #CJK UNIFIED IDEOGRAPH + {0xB265, 0x7796}, //7942 #CJK UNIFIED IDEOGRAPH + {0xB266, 0x7797}, //7943 #CJK UNIFIED IDEOGRAPH + {0xB267, 0x7798}, //7944 #CJK UNIFIED IDEOGRAPH + {0xB268, 0x7799}, //7945 #CJK UNIFIED IDEOGRAPH + {0xB269, 0x779A}, //7946 #CJK UNIFIED IDEOGRAPH + {0xB26A, 0x779B}, //7947 #CJK UNIFIED IDEOGRAPH + {0xB26B, 0x779C}, //7948 #CJK UNIFIED IDEOGRAPH + {0xB26C, 0x779D}, //7949 #CJK UNIFIED IDEOGRAPH + {0xB26D, 0x779E}, //7950 #CJK UNIFIED IDEOGRAPH + {0xB26E, 0x77A1}, //7951 #CJK UNIFIED IDEOGRAPH + {0xB26F, 0x77A3}, //7952 #CJK UNIFIED IDEOGRAPH + {0xB270, 0x77A4}, //7953 #CJK UNIFIED IDEOGRAPH + {0xB271, 0x77A6}, //7954 #CJK UNIFIED IDEOGRAPH + {0xB272, 0x77A8}, //7955 #CJK UNIFIED IDEOGRAPH + {0xB273, 0x77AB}, //7956 #CJK UNIFIED IDEOGRAPH + {0xB274, 0x77AD}, //7957 #CJK UNIFIED IDEOGRAPH + {0xB275, 0x77AE}, //7958 #CJK UNIFIED IDEOGRAPH + {0xB276, 0x77AF}, //7959 #CJK UNIFIED IDEOGRAPH + {0xB277, 0x77B1}, //7960 #CJK UNIFIED IDEOGRAPH + {0xB278, 0x77B2}, //7961 #CJK UNIFIED IDEOGRAPH + {0xB279, 0x77B4}, //7962 #CJK UNIFIED IDEOGRAPH + {0xB27A, 0x77B6}, //7963 #CJK UNIFIED IDEOGRAPH + {0xB27B, 0x77B7}, //7964 #CJK UNIFIED IDEOGRAPH + {0xB27C, 0x77B8}, //7965 #CJK UNIFIED IDEOGRAPH + {0xB27D, 0x77B9}, //7966 #CJK UNIFIED IDEOGRAPH + {0xB27E, 0x77BA}, //7967 #CJK UNIFIED IDEOGRAPH + {0xB280, 0x77BC}, //7968 #CJK UNIFIED IDEOGRAPH + {0xB281, 0x77BE}, //7969 #CJK UNIFIED IDEOGRAPH + {0xB282, 0x77C0}, //7970 #CJK UNIFIED IDEOGRAPH + {0xB283, 0x77C1}, //7971 #CJK UNIFIED IDEOGRAPH + {0xB284, 0x77C2}, //7972 #CJK UNIFIED IDEOGRAPH + {0xB285, 0x77C3}, //7973 #CJK UNIFIED IDEOGRAPH + {0xB286, 0x77C4}, //7974 #CJK UNIFIED IDEOGRAPH + {0xB287, 0x77C5}, //7975 #CJK UNIFIED IDEOGRAPH + {0xB288, 0x77C6}, //7976 #CJK UNIFIED IDEOGRAPH + {0xB289, 0x77C7}, //7977 #CJK UNIFIED IDEOGRAPH + {0xB28A, 0x77C8}, //7978 #CJK UNIFIED IDEOGRAPH + {0xB28B, 0x77C9}, //7979 #CJK UNIFIED IDEOGRAPH + {0xB28C, 0x77CA}, //7980 #CJK UNIFIED IDEOGRAPH + {0xB28D, 0x77CB}, //7981 #CJK UNIFIED IDEOGRAPH + {0xB28E, 0x77CC}, //7982 #CJK UNIFIED IDEOGRAPH + {0xB28F, 0x77CE}, //7983 #CJK UNIFIED IDEOGRAPH + {0xB290, 0x77CF}, //7984 #CJK UNIFIED IDEOGRAPH + {0xB291, 0x77D0}, //7985 #CJK UNIFIED IDEOGRAPH + {0xB292, 0x77D1}, //7986 #CJK UNIFIED IDEOGRAPH + {0xB293, 0x77D2}, //7987 #CJK UNIFIED IDEOGRAPH + {0xB294, 0x77D3}, //7988 #CJK UNIFIED IDEOGRAPH + {0xB295, 0x77D4}, //7989 #CJK UNIFIED IDEOGRAPH + {0xB296, 0x77D5}, //7990 #CJK UNIFIED IDEOGRAPH + {0xB297, 0x77D6}, //7991 #CJK UNIFIED IDEOGRAPH + {0xB298, 0x77D8}, //7992 #CJK UNIFIED IDEOGRAPH + {0xB299, 0x77D9}, //7993 #CJK UNIFIED IDEOGRAPH + {0xB29A, 0x77DA}, //7994 #CJK UNIFIED IDEOGRAPH + {0xB29B, 0x77DD}, //7995 #CJK UNIFIED IDEOGRAPH + {0xB29C, 0x77DE}, //7996 #CJK UNIFIED IDEOGRAPH + {0xB29D, 0x77DF}, //7997 #CJK UNIFIED IDEOGRAPH + {0xB29E, 0x77E0}, //7998 #CJK UNIFIED IDEOGRAPH + {0xB29F, 0x77E1}, //7999 #CJK UNIFIED IDEOGRAPH + {0xB2A0, 0x77E4}, //8000 #CJK UNIFIED IDEOGRAPH + {0xB2A1, 0x75C5}, //8001 #CJK UNIFIED IDEOGRAPH + {0xB2A2, 0x5E76}, //8002 #CJK UNIFIED IDEOGRAPH + {0xB2A3, 0x73BB}, //8003 #CJK UNIFIED IDEOGRAPH + {0xB2A4, 0x83E0}, //8004 #CJK UNIFIED IDEOGRAPH + {0xB2A5, 0x64AD}, //8005 #CJK UNIFIED IDEOGRAPH + {0xB2A6, 0x62E8}, //8006 #CJK UNIFIED IDEOGRAPH + {0xB2A7, 0x94B5}, //8007 #CJK UNIFIED IDEOGRAPH + {0xB2A8, 0x6CE2}, //8008 #CJK UNIFIED IDEOGRAPH + {0xB2A9, 0x535A}, //8009 #CJK UNIFIED IDEOGRAPH + {0xB2AA, 0x52C3}, //8010 #CJK UNIFIED IDEOGRAPH + {0xB2AB, 0x640F}, //8011 #CJK UNIFIED IDEOGRAPH + {0xB2AC, 0x94C2}, //8012 #CJK UNIFIED IDEOGRAPH + {0xB2AD, 0x7B94}, //8013 #CJK UNIFIED IDEOGRAPH + {0xB2AE, 0x4F2F}, //8014 #CJK UNIFIED IDEOGRAPH + {0xB2AF, 0x5E1B}, //8015 #CJK UNIFIED IDEOGRAPH + {0xB2B0, 0x8236}, //8016 #CJK UNIFIED IDEOGRAPH + {0xB2B1, 0x8116}, //8017 #CJK UNIFIED IDEOGRAPH + {0xB2B2, 0x818A}, //8018 #CJK UNIFIED IDEOGRAPH + {0xB2B3, 0x6E24}, //8019 #CJK UNIFIED IDEOGRAPH + {0xB2B4, 0x6CCA}, //8020 #CJK UNIFIED IDEOGRAPH + {0xB2B5, 0x9A73}, //8021 #CJK UNIFIED IDEOGRAPH + {0xB2B6, 0x6355}, //8022 #CJK UNIFIED IDEOGRAPH + {0xB2B7, 0x535C}, //8023 #CJK UNIFIED IDEOGRAPH + {0xB2B8, 0x54FA}, //8024 #CJK UNIFIED IDEOGRAPH + {0xB2B9, 0x8865}, //8025 #CJK UNIFIED IDEOGRAPH + {0xB2BA, 0x57E0}, //8026 #CJK UNIFIED IDEOGRAPH + {0xB2BB, 0x4E0D}, //8027 #CJK UNIFIED IDEOGRAPH + {0xB2BC, 0x5E03}, //8028 #CJK UNIFIED IDEOGRAPH + {0xB2BD, 0x6B65}, //8029 #CJK UNIFIED IDEOGRAPH + {0xB2BE, 0x7C3F}, //8030 #CJK UNIFIED IDEOGRAPH + {0xB2BF, 0x90E8}, //8031 #CJK UNIFIED IDEOGRAPH + {0xB2C0, 0x6016}, //8032 #CJK UNIFIED IDEOGRAPH + {0xB2C1, 0x64E6}, //8033 #CJK UNIFIED IDEOGRAPH + {0xB2C2, 0x731C}, //8034 #CJK UNIFIED IDEOGRAPH + {0xB2C3, 0x88C1}, //8035 #CJK UNIFIED IDEOGRAPH + {0xB2C4, 0x6750}, //8036 #CJK UNIFIED IDEOGRAPH + {0xB2C5, 0x624D}, //8037 #CJK UNIFIED IDEOGRAPH + {0xB2C6, 0x8D22}, //8038 #CJK UNIFIED IDEOGRAPH + {0xB2C7, 0x776C}, //8039 #CJK UNIFIED IDEOGRAPH + {0xB2C8, 0x8E29}, //8040 #CJK UNIFIED IDEOGRAPH + {0xB2C9, 0x91C7}, //8041 #CJK UNIFIED IDEOGRAPH + {0xB2CA, 0x5F69}, //8042 #CJK UNIFIED IDEOGRAPH + {0xB2CB, 0x83DC}, //8043 #CJK UNIFIED IDEOGRAPH + {0xB2CC, 0x8521}, //8044 #CJK UNIFIED IDEOGRAPH + {0xB2CD, 0x9910}, //8045 #CJK UNIFIED IDEOGRAPH + {0xB2CE, 0x53C2}, //8046 #CJK UNIFIED IDEOGRAPH + {0xB2CF, 0x8695}, //8047 #CJK UNIFIED IDEOGRAPH + {0xB2D0, 0x6B8B}, //8048 #CJK UNIFIED IDEOGRAPH + {0xB2D1, 0x60ED}, //8049 #CJK UNIFIED IDEOGRAPH + {0xB2D2, 0x60E8}, //8050 #CJK UNIFIED IDEOGRAPH + {0xB2D3, 0x707F}, //8051 #CJK UNIFIED IDEOGRAPH + {0xB2D4, 0x82CD}, //8052 #CJK UNIFIED IDEOGRAPH + {0xB2D5, 0x8231}, //8053 #CJK UNIFIED IDEOGRAPH + {0xB2D6, 0x4ED3}, //8054 #CJK UNIFIED IDEOGRAPH + {0xB2D7, 0x6CA7}, //8055 #CJK UNIFIED IDEOGRAPH + {0xB2D8, 0x85CF}, //8056 #CJK UNIFIED IDEOGRAPH + {0xB2D9, 0x64CD}, //8057 #CJK UNIFIED IDEOGRAPH + {0xB2DA, 0x7CD9}, //8058 #CJK UNIFIED IDEOGRAPH + {0xB2DB, 0x69FD}, //8059 #CJK UNIFIED IDEOGRAPH + {0xB2DC, 0x66F9}, //8060 #CJK UNIFIED IDEOGRAPH + {0xB2DD, 0x8349}, //8061 #CJK UNIFIED IDEOGRAPH + {0xB2DE, 0x5395}, //8062 #CJK UNIFIED IDEOGRAPH + {0xB2DF, 0x7B56}, //8063 #CJK UNIFIED IDEOGRAPH + {0xB2E0, 0x4FA7}, //8064 #CJK UNIFIED IDEOGRAPH + {0xB2E1, 0x518C}, //8065 #CJK UNIFIED IDEOGRAPH + {0xB2E2, 0x6D4B}, //8066 #CJK UNIFIED IDEOGRAPH + {0xB2E3, 0x5C42}, //8067 #CJK UNIFIED IDEOGRAPH + {0xB2E4, 0x8E6D}, //8068 #CJK UNIFIED IDEOGRAPH + {0xB2E5, 0x63D2}, //8069 #CJK UNIFIED IDEOGRAPH + {0xB2E6, 0x53C9}, //8070 #CJK UNIFIED IDEOGRAPH + {0xB2E7, 0x832C}, //8071 #CJK UNIFIED IDEOGRAPH + {0xB2E8, 0x8336}, //8072 #CJK UNIFIED IDEOGRAPH + {0xB2E9, 0x67E5}, //8073 #CJK UNIFIED IDEOGRAPH + {0xB2EA, 0x78B4}, //8074 #CJK UNIFIED IDEOGRAPH + {0xB2EB, 0x643D}, //8075 #CJK UNIFIED IDEOGRAPH + {0xB2EC, 0x5BDF}, //8076 #CJK UNIFIED IDEOGRAPH + {0xB2ED, 0x5C94}, //8077 #CJK UNIFIED IDEOGRAPH + {0xB2EE, 0x5DEE}, //8078 #CJK UNIFIED IDEOGRAPH + {0xB2EF, 0x8BE7}, //8079 #CJK UNIFIED IDEOGRAPH + {0xB2F0, 0x62C6}, //8080 #CJK UNIFIED IDEOGRAPH + {0xB2F1, 0x67F4}, //8081 #CJK UNIFIED IDEOGRAPH + {0xB2F2, 0x8C7A}, //8082 #CJK UNIFIED IDEOGRAPH + {0xB2F3, 0x6400}, //8083 #CJK UNIFIED IDEOGRAPH + {0xB2F4, 0x63BA}, //8084 #CJK UNIFIED IDEOGRAPH + {0xB2F5, 0x8749}, //8085 #CJK UNIFIED IDEOGRAPH + {0xB2F6, 0x998B}, //8086 #CJK UNIFIED IDEOGRAPH + {0xB2F7, 0x8C17}, //8087 #CJK UNIFIED IDEOGRAPH + {0xB2F8, 0x7F20}, //8088 #CJK UNIFIED IDEOGRAPH + {0xB2F9, 0x94F2}, //8089 #CJK UNIFIED IDEOGRAPH + {0xB2FA, 0x4EA7}, //8090 #CJK UNIFIED IDEOGRAPH + {0xB2FB, 0x9610}, //8091 #CJK UNIFIED IDEOGRAPH + {0xB2FC, 0x98A4}, //8092 #CJK UNIFIED IDEOGRAPH + {0xB2FD, 0x660C}, //8093 #CJK UNIFIED IDEOGRAPH + {0xB2FE, 0x7316}, //8094 #CJK UNIFIED IDEOGRAPH + {0xB340, 0x77E6}, //8095 #CJK UNIFIED IDEOGRAPH + {0xB341, 0x77E8}, //8096 #CJK UNIFIED IDEOGRAPH + {0xB342, 0x77EA}, //8097 #CJK UNIFIED IDEOGRAPH + {0xB343, 0x77EF}, //8098 #CJK UNIFIED IDEOGRAPH + {0xB344, 0x77F0}, //8099 #CJK UNIFIED IDEOGRAPH + {0xB345, 0x77F1}, //8100 #CJK UNIFIED IDEOGRAPH + {0xB346, 0x77F2}, //8101 #CJK UNIFIED IDEOGRAPH + {0xB347, 0x77F4}, //8102 #CJK UNIFIED IDEOGRAPH + {0xB348, 0x77F5}, //8103 #CJK UNIFIED IDEOGRAPH + {0xB349, 0x77F7}, //8104 #CJK UNIFIED IDEOGRAPH + {0xB34A, 0x77F9}, //8105 #CJK UNIFIED IDEOGRAPH + {0xB34B, 0x77FA}, //8106 #CJK UNIFIED IDEOGRAPH + {0xB34C, 0x77FB}, //8107 #CJK UNIFIED IDEOGRAPH + {0xB34D, 0x77FC}, //8108 #CJK UNIFIED IDEOGRAPH + {0xB34E, 0x7803}, //8109 #CJK UNIFIED IDEOGRAPH + {0xB34F, 0x7804}, //8110 #CJK UNIFIED IDEOGRAPH + {0xB350, 0x7805}, //8111 #CJK UNIFIED IDEOGRAPH + {0xB351, 0x7806}, //8112 #CJK UNIFIED IDEOGRAPH + {0xB352, 0x7807}, //8113 #CJK UNIFIED IDEOGRAPH + {0xB353, 0x7808}, //8114 #CJK UNIFIED IDEOGRAPH + {0xB354, 0x780A}, //8115 #CJK UNIFIED IDEOGRAPH + {0xB355, 0x780B}, //8116 #CJK UNIFIED IDEOGRAPH + {0xB356, 0x780E}, //8117 #CJK UNIFIED IDEOGRAPH + {0xB357, 0x780F}, //8118 #CJK UNIFIED IDEOGRAPH + {0xB358, 0x7810}, //8119 #CJK UNIFIED IDEOGRAPH + {0xB359, 0x7813}, //8120 #CJK UNIFIED IDEOGRAPH + {0xB35A, 0x7815}, //8121 #CJK UNIFIED IDEOGRAPH + {0xB35B, 0x7819}, //8122 #CJK UNIFIED IDEOGRAPH + {0xB35C, 0x781B}, //8123 #CJK UNIFIED IDEOGRAPH + {0xB35D, 0x781E}, //8124 #CJK UNIFIED IDEOGRAPH + {0xB35E, 0x7820}, //8125 #CJK UNIFIED IDEOGRAPH + {0xB35F, 0x7821}, //8126 #CJK UNIFIED IDEOGRAPH + {0xB360, 0x7822}, //8127 #CJK UNIFIED IDEOGRAPH + {0xB361, 0x7824}, //8128 #CJK UNIFIED IDEOGRAPH + {0xB362, 0x7828}, //8129 #CJK UNIFIED IDEOGRAPH + {0xB363, 0x782A}, //8130 #CJK UNIFIED IDEOGRAPH + {0xB364, 0x782B}, //8131 #CJK UNIFIED IDEOGRAPH + {0xB365, 0x782E}, //8132 #CJK UNIFIED IDEOGRAPH + {0xB366, 0x782F}, //8133 #CJK UNIFIED IDEOGRAPH + {0xB367, 0x7831}, //8134 #CJK UNIFIED IDEOGRAPH + {0xB368, 0x7832}, //8135 #CJK UNIFIED IDEOGRAPH + {0xB369, 0x7833}, //8136 #CJK UNIFIED IDEOGRAPH + {0xB36A, 0x7835}, //8137 #CJK UNIFIED IDEOGRAPH + {0xB36B, 0x7836}, //8138 #CJK UNIFIED IDEOGRAPH + {0xB36C, 0x783D}, //8139 #CJK UNIFIED IDEOGRAPH + {0xB36D, 0x783F}, //8140 #CJK UNIFIED IDEOGRAPH + {0xB36E, 0x7841}, //8141 #CJK UNIFIED IDEOGRAPH + {0xB36F, 0x7842}, //8142 #CJK UNIFIED IDEOGRAPH + {0xB370, 0x7843}, //8143 #CJK UNIFIED IDEOGRAPH + {0xB371, 0x7844}, //8144 #CJK UNIFIED IDEOGRAPH + {0xB372, 0x7846}, //8145 #CJK UNIFIED IDEOGRAPH + {0xB373, 0x7848}, //8146 #CJK UNIFIED IDEOGRAPH + {0xB374, 0x7849}, //8147 #CJK UNIFIED IDEOGRAPH + {0xB375, 0x784A}, //8148 #CJK UNIFIED IDEOGRAPH + {0xB376, 0x784B}, //8149 #CJK UNIFIED IDEOGRAPH + {0xB377, 0x784D}, //8150 #CJK UNIFIED IDEOGRAPH + {0xB378, 0x784F}, //8151 #CJK UNIFIED IDEOGRAPH + {0xB379, 0x7851}, //8152 #CJK UNIFIED IDEOGRAPH + {0xB37A, 0x7853}, //8153 #CJK UNIFIED IDEOGRAPH + {0xB37B, 0x7854}, //8154 #CJK UNIFIED IDEOGRAPH + {0xB37C, 0x7858}, //8155 #CJK UNIFIED IDEOGRAPH + {0xB37D, 0x7859}, //8156 #CJK UNIFIED IDEOGRAPH + {0xB37E, 0x785A}, //8157 #CJK UNIFIED IDEOGRAPH + {0xB380, 0x785B}, //8158 #CJK UNIFIED IDEOGRAPH + {0xB381, 0x785C}, //8159 #CJK UNIFIED IDEOGRAPH + {0xB382, 0x785E}, //8160 #CJK UNIFIED IDEOGRAPH + {0xB383, 0x785F}, //8161 #CJK UNIFIED IDEOGRAPH + {0xB384, 0x7860}, //8162 #CJK UNIFIED IDEOGRAPH + {0xB385, 0x7861}, //8163 #CJK UNIFIED IDEOGRAPH + {0xB386, 0x7862}, //8164 #CJK UNIFIED IDEOGRAPH + {0xB387, 0x7863}, //8165 #CJK UNIFIED IDEOGRAPH + {0xB388, 0x7864}, //8166 #CJK UNIFIED IDEOGRAPH + {0xB389, 0x7865}, //8167 #CJK UNIFIED IDEOGRAPH + {0xB38A, 0x7866}, //8168 #CJK UNIFIED IDEOGRAPH + {0xB38B, 0x7867}, //8169 #CJK UNIFIED IDEOGRAPH + {0xB38C, 0x7868}, //8170 #CJK UNIFIED IDEOGRAPH + {0xB38D, 0x7869}, //8171 #CJK UNIFIED IDEOGRAPH + {0xB38E, 0x786F}, //8172 #CJK UNIFIED IDEOGRAPH + {0xB38F, 0x7870}, //8173 #CJK UNIFIED IDEOGRAPH + {0xB390, 0x7871}, //8174 #CJK UNIFIED IDEOGRAPH + {0xB391, 0x7872}, //8175 #CJK UNIFIED IDEOGRAPH + {0xB392, 0x7873}, //8176 #CJK UNIFIED IDEOGRAPH + {0xB393, 0x7874}, //8177 #CJK UNIFIED IDEOGRAPH + {0xB394, 0x7875}, //8178 #CJK UNIFIED IDEOGRAPH + {0xB395, 0x7876}, //8179 #CJK UNIFIED IDEOGRAPH + {0xB396, 0x7878}, //8180 #CJK UNIFIED IDEOGRAPH + {0xB397, 0x7879}, //8181 #CJK UNIFIED IDEOGRAPH + {0xB398, 0x787A}, //8182 #CJK UNIFIED IDEOGRAPH + {0xB399, 0x787B}, //8183 #CJK UNIFIED IDEOGRAPH + {0xB39A, 0x787D}, //8184 #CJK UNIFIED IDEOGRAPH + {0xB39B, 0x787E}, //8185 #CJK UNIFIED IDEOGRAPH + {0xB39C, 0x787F}, //8186 #CJK UNIFIED IDEOGRAPH + {0xB39D, 0x7880}, //8187 #CJK UNIFIED IDEOGRAPH + {0xB39E, 0x7881}, //8188 #CJK UNIFIED IDEOGRAPH + {0xB39F, 0x7882}, //8189 #CJK UNIFIED IDEOGRAPH + {0xB3A0, 0x7883}, //8190 #CJK UNIFIED IDEOGRAPH + {0xB3A1, 0x573A}, //8191 #CJK UNIFIED IDEOGRAPH + {0xB3A2, 0x5C1D}, //8192 #CJK UNIFIED IDEOGRAPH + {0xB3A3, 0x5E38}, //8193 #CJK UNIFIED IDEOGRAPH + {0xB3A4, 0x957F}, //8194 #CJK UNIFIED IDEOGRAPH + {0xB3A5, 0x507F}, //8195 #CJK UNIFIED IDEOGRAPH + {0xB3A6, 0x80A0}, //8196 #CJK UNIFIED IDEOGRAPH + {0xB3A7, 0x5382}, //8197 #CJK UNIFIED IDEOGRAPH + {0xB3A8, 0x655E}, //8198 #CJK UNIFIED IDEOGRAPH + {0xB3A9, 0x7545}, //8199 #CJK UNIFIED IDEOGRAPH + {0xB3AA, 0x5531}, //8200 #CJK UNIFIED IDEOGRAPH + {0xB3AB, 0x5021}, //8201 #CJK UNIFIED IDEOGRAPH + {0xB3AC, 0x8D85}, //8202 #CJK UNIFIED IDEOGRAPH + {0xB3AD, 0x6284}, //8203 #CJK UNIFIED IDEOGRAPH + {0xB3AE, 0x949E}, //8204 #CJK UNIFIED IDEOGRAPH + {0xB3AF, 0x671D}, //8205 #CJK UNIFIED IDEOGRAPH + {0xB3B0, 0x5632}, //8206 #CJK UNIFIED IDEOGRAPH + {0xB3B1, 0x6F6E}, //8207 #CJK UNIFIED IDEOGRAPH + {0xB3B2, 0x5DE2}, //8208 #CJK UNIFIED IDEOGRAPH + {0xB3B3, 0x5435}, //8209 #CJK UNIFIED IDEOGRAPH + {0xB3B4, 0x7092}, //8210 #CJK UNIFIED IDEOGRAPH + {0xB3B5, 0x8F66}, //8211 #CJK UNIFIED IDEOGRAPH + {0xB3B6, 0x626F}, //8212 #CJK UNIFIED IDEOGRAPH + {0xB3B7, 0x64A4}, //8213 #CJK UNIFIED IDEOGRAPH + {0xB3B8, 0x63A3}, //8214 #CJK UNIFIED IDEOGRAPH + {0xB3B9, 0x5F7B}, //8215 #CJK UNIFIED IDEOGRAPH + {0xB3BA, 0x6F88}, //8216 #CJK UNIFIED IDEOGRAPH + {0xB3BB, 0x90F4}, //8217 #CJK UNIFIED IDEOGRAPH + {0xB3BC, 0x81E3}, //8218 #CJK UNIFIED IDEOGRAPH + {0xB3BD, 0x8FB0}, //8219 #CJK UNIFIED IDEOGRAPH + {0xB3BE, 0x5C18}, //8220 #CJK UNIFIED IDEOGRAPH + {0xB3BF, 0x6668}, //8221 #CJK UNIFIED IDEOGRAPH + {0xB3C0, 0x5FF1}, //8222 #CJK UNIFIED IDEOGRAPH + {0xB3C1, 0x6C89}, //8223 #CJK UNIFIED IDEOGRAPH + {0xB3C2, 0x9648}, //8224 #CJK UNIFIED IDEOGRAPH + {0xB3C3, 0x8D81}, //8225 #CJK UNIFIED IDEOGRAPH + {0xB3C4, 0x886C}, //8226 #CJK UNIFIED IDEOGRAPH + {0xB3C5, 0x6491}, //8227 #CJK UNIFIED IDEOGRAPH + {0xB3C6, 0x79F0}, //8228 #CJK UNIFIED IDEOGRAPH + {0xB3C7, 0x57CE}, //8229 #CJK UNIFIED IDEOGRAPH + {0xB3C8, 0x6A59}, //8230 #CJK UNIFIED IDEOGRAPH + {0xB3C9, 0x6210}, //8231 #CJK UNIFIED IDEOGRAPH + {0xB3CA, 0x5448}, //8232 #CJK UNIFIED IDEOGRAPH + {0xB3CB, 0x4E58}, //8233 #CJK UNIFIED IDEOGRAPH + {0xB3CC, 0x7A0B}, //8234 #CJK UNIFIED IDEOGRAPH + {0xB3CD, 0x60E9}, //8235 #CJK UNIFIED IDEOGRAPH + {0xB3CE, 0x6F84}, //8236 #CJK UNIFIED IDEOGRAPH + {0xB3CF, 0x8BDA}, //8237 #CJK UNIFIED IDEOGRAPH + {0xB3D0, 0x627F}, //8238 #CJK UNIFIED IDEOGRAPH + {0xB3D1, 0x901E}, //8239 #CJK UNIFIED IDEOGRAPH + {0xB3D2, 0x9A8B}, //8240 #CJK UNIFIED IDEOGRAPH + {0xB3D3, 0x79E4}, //8241 #CJK UNIFIED IDEOGRAPH + {0xB3D4, 0x5403}, //8242 #CJK UNIFIED IDEOGRAPH + {0xB3D5, 0x75F4}, //8243 #CJK UNIFIED IDEOGRAPH + {0xB3D6, 0x6301}, //8244 #CJK UNIFIED IDEOGRAPH + {0xB3D7, 0x5319}, //8245 #CJK UNIFIED IDEOGRAPH + {0xB3D8, 0x6C60}, //8246 #CJK UNIFIED IDEOGRAPH + {0xB3D9, 0x8FDF}, //8247 #CJK UNIFIED IDEOGRAPH + {0xB3DA, 0x5F1B}, //8248 #CJK UNIFIED IDEOGRAPH + {0xB3DB, 0x9A70}, //8249 #CJK UNIFIED IDEOGRAPH + {0xB3DC, 0x803B}, //8250 #CJK UNIFIED IDEOGRAPH + {0xB3DD, 0x9F7F}, //8251 #CJK UNIFIED IDEOGRAPH + {0xB3DE, 0x4F88}, //8252 #CJK UNIFIED IDEOGRAPH + {0xB3DF, 0x5C3A}, //8253 #CJK UNIFIED IDEOGRAPH + {0xB3E0, 0x8D64}, //8254 #CJK UNIFIED IDEOGRAPH + {0xB3E1, 0x7FC5}, //8255 #CJK UNIFIED IDEOGRAPH + {0xB3E2, 0x65A5}, //8256 #CJK UNIFIED IDEOGRAPH + {0xB3E3, 0x70BD}, //8257 #CJK UNIFIED IDEOGRAPH + {0xB3E4, 0x5145}, //8258 #CJK UNIFIED IDEOGRAPH + {0xB3E5, 0x51B2}, //8259 #CJK UNIFIED IDEOGRAPH + {0xB3E6, 0x866B}, //8260 #CJK UNIFIED IDEOGRAPH + {0xB3E7, 0x5D07}, //8261 #CJK UNIFIED IDEOGRAPH + {0xB3E8, 0x5BA0}, //8262 #CJK UNIFIED IDEOGRAPH + {0xB3E9, 0x62BD}, //8263 #CJK UNIFIED IDEOGRAPH + {0xB3EA, 0x916C}, //8264 #CJK UNIFIED IDEOGRAPH + {0xB3EB, 0x7574}, //8265 #CJK UNIFIED IDEOGRAPH + {0xB3EC, 0x8E0C}, //8266 #CJK UNIFIED IDEOGRAPH + {0xB3ED, 0x7A20}, //8267 #CJK UNIFIED IDEOGRAPH + {0xB3EE, 0x6101}, //8268 #CJK UNIFIED IDEOGRAPH + {0xB3EF, 0x7B79}, //8269 #CJK UNIFIED IDEOGRAPH + {0xB3F0, 0x4EC7}, //8270 #CJK UNIFIED IDEOGRAPH + {0xB3F1, 0x7EF8}, //8271 #CJK UNIFIED IDEOGRAPH + {0xB3F2, 0x7785}, //8272 #CJK UNIFIED IDEOGRAPH + {0xB3F3, 0x4E11}, //8273 #CJK UNIFIED IDEOGRAPH + {0xB3F4, 0x81ED}, //8274 #CJK UNIFIED IDEOGRAPH + {0xB3F5, 0x521D}, //8275 #CJK UNIFIED IDEOGRAPH + {0xB3F6, 0x51FA}, //8276 #CJK UNIFIED IDEOGRAPH + {0xB3F7, 0x6A71}, //8277 #CJK UNIFIED IDEOGRAPH + {0xB3F8, 0x53A8}, //8278 #CJK UNIFIED IDEOGRAPH + {0xB3F9, 0x8E87}, //8279 #CJK UNIFIED IDEOGRAPH + {0xB3FA, 0x9504}, //8280 #CJK UNIFIED IDEOGRAPH + {0xB3FB, 0x96CF}, //8281 #CJK UNIFIED IDEOGRAPH + {0xB3FC, 0x6EC1}, //8282 #CJK UNIFIED IDEOGRAPH + {0xB3FD, 0x9664}, //8283 #CJK UNIFIED IDEOGRAPH + {0xB3FE, 0x695A}, //8284 #CJK UNIFIED IDEOGRAPH + {0xB440, 0x7884}, //8285 #CJK UNIFIED IDEOGRAPH + {0xB441, 0x7885}, //8286 #CJK UNIFIED IDEOGRAPH + {0xB442, 0x7886}, //8287 #CJK UNIFIED IDEOGRAPH + {0xB443, 0x7888}, //8288 #CJK UNIFIED IDEOGRAPH + {0xB444, 0x788A}, //8289 #CJK UNIFIED IDEOGRAPH + {0xB445, 0x788B}, //8290 #CJK UNIFIED IDEOGRAPH + {0xB446, 0x788F}, //8291 #CJK UNIFIED IDEOGRAPH + {0xB447, 0x7890}, //8292 #CJK UNIFIED IDEOGRAPH + {0xB448, 0x7892}, //8293 #CJK UNIFIED IDEOGRAPH + {0xB449, 0x7894}, //8294 #CJK UNIFIED IDEOGRAPH + {0xB44A, 0x7895}, //8295 #CJK UNIFIED IDEOGRAPH + {0xB44B, 0x7896}, //8296 #CJK UNIFIED IDEOGRAPH + {0xB44C, 0x7899}, //8297 #CJK UNIFIED IDEOGRAPH + {0xB44D, 0x789D}, //8298 #CJK UNIFIED IDEOGRAPH + {0xB44E, 0x789E}, //8299 #CJK UNIFIED IDEOGRAPH + {0xB44F, 0x78A0}, //8300 #CJK UNIFIED IDEOGRAPH + {0xB450, 0x78A2}, //8301 #CJK UNIFIED IDEOGRAPH + {0xB451, 0x78A4}, //8302 #CJK UNIFIED IDEOGRAPH + {0xB452, 0x78A6}, //8303 #CJK UNIFIED IDEOGRAPH + {0xB453, 0x78A8}, //8304 #CJK UNIFIED IDEOGRAPH + {0xB454, 0x78A9}, //8305 #CJK UNIFIED IDEOGRAPH + {0xB455, 0x78AA}, //8306 #CJK UNIFIED IDEOGRAPH + {0xB456, 0x78AB}, //8307 #CJK UNIFIED IDEOGRAPH + {0xB457, 0x78AC}, //8308 #CJK UNIFIED IDEOGRAPH + {0xB458, 0x78AD}, //8309 #CJK UNIFIED IDEOGRAPH + {0xB459, 0x78AE}, //8310 #CJK UNIFIED IDEOGRAPH + {0xB45A, 0x78AF}, //8311 #CJK UNIFIED IDEOGRAPH + {0xB45B, 0x78B5}, //8312 #CJK UNIFIED IDEOGRAPH + {0xB45C, 0x78B6}, //8313 #CJK UNIFIED IDEOGRAPH + {0xB45D, 0x78B7}, //8314 #CJK UNIFIED IDEOGRAPH + {0xB45E, 0x78B8}, //8315 #CJK UNIFIED IDEOGRAPH + {0xB45F, 0x78BA}, //8316 #CJK UNIFIED IDEOGRAPH + {0xB460, 0x78BB}, //8317 #CJK UNIFIED IDEOGRAPH + {0xB461, 0x78BC}, //8318 #CJK UNIFIED IDEOGRAPH + {0xB462, 0x78BD}, //8319 #CJK UNIFIED IDEOGRAPH + {0xB463, 0x78BF}, //8320 #CJK UNIFIED IDEOGRAPH + {0xB464, 0x78C0}, //8321 #CJK UNIFIED IDEOGRAPH + {0xB465, 0x78C2}, //8322 #CJK UNIFIED IDEOGRAPH + {0xB466, 0x78C3}, //8323 #CJK UNIFIED IDEOGRAPH + {0xB467, 0x78C4}, //8324 #CJK UNIFIED IDEOGRAPH + {0xB468, 0x78C6}, //8325 #CJK UNIFIED IDEOGRAPH + {0xB469, 0x78C7}, //8326 #CJK UNIFIED IDEOGRAPH + {0xB46A, 0x78C8}, //8327 #CJK UNIFIED IDEOGRAPH + {0xB46B, 0x78CC}, //8328 #CJK UNIFIED IDEOGRAPH + {0xB46C, 0x78CD}, //8329 #CJK UNIFIED IDEOGRAPH + {0xB46D, 0x78CE}, //8330 #CJK UNIFIED IDEOGRAPH + {0xB46E, 0x78CF}, //8331 #CJK UNIFIED IDEOGRAPH + {0xB46F, 0x78D1}, //8332 #CJK UNIFIED IDEOGRAPH + {0xB470, 0x78D2}, //8333 #CJK UNIFIED IDEOGRAPH + {0xB471, 0x78D3}, //8334 #CJK UNIFIED IDEOGRAPH + {0xB472, 0x78D6}, //8335 #CJK UNIFIED IDEOGRAPH + {0xB473, 0x78D7}, //8336 #CJK UNIFIED IDEOGRAPH + {0xB474, 0x78D8}, //8337 #CJK UNIFIED IDEOGRAPH + {0xB475, 0x78DA}, //8338 #CJK UNIFIED IDEOGRAPH + {0xB476, 0x78DB}, //8339 #CJK UNIFIED IDEOGRAPH + {0xB477, 0x78DC}, //8340 #CJK UNIFIED IDEOGRAPH + {0xB478, 0x78DD}, //8341 #CJK UNIFIED IDEOGRAPH + {0xB479, 0x78DE}, //8342 #CJK UNIFIED IDEOGRAPH + {0xB47A, 0x78DF}, //8343 #CJK UNIFIED IDEOGRAPH + {0xB47B, 0x78E0}, //8344 #CJK UNIFIED IDEOGRAPH + {0xB47C, 0x78E1}, //8345 #CJK UNIFIED IDEOGRAPH + {0xB47D, 0x78E2}, //8346 #CJK UNIFIED IDEOGRAPH + {0xB47E, 0x78E3}, //8347 #CJK UNIFIED IDEOGRAPH + {0xB480, 0x78E4}, //8348 #CJK UNIFIED IDEOGRAPH + {0xB481, 0x78E5}, //8349 #CJK UNIFIED IDEOGRAPH + {0xB482, 0x78E6}, //8350 #CJK UNIFIED IDEOGRAPH + {0xB483, 0x78E7}, //8351 #CJK UNIFIED IDEOGRAPH + {0xB484, 0x78E9}, //8352 #CJK UNIFIED IDEOGRAPH + {0xB485, 0x78EA}, //8353 #CJK UNIFIED IDEOGRAPH + {0xB486, 0x78EB}, //8354 #CJK UNIFIED IDEOGRAPH + {0xB487, 0x78ED}, //8355 #CJK UNIFIED IDEOGRAPH + {0xB488, 0x78EE}, //8356 #CJK UNIFIED IDEOGRAPH + {0xB489, 0x78EF}, //8357 #CJK UNIFIED IDEOGRAPH + {0xB48A, 0x78F0}, //8358 #CJK UNIFIED IDEOGRAPH + {0xB48B, 0x78F1}, //8359 #CJK UNIFIED IDEOGRAPH + {0xB48C, 0x78F3}, //8360 #CJK UNIFIED IDEOGRAPH + {0xB48D, 0x78F5}, //8361 #CJK UNIFIED IDEOGRAPH + {0xB48E, 0x78F6}, //8362 #CJK UNIFIED IDEOGRAPH + {0xB48F, 0x78F8}, //8363 #CJK UNIFIED IDEOGRAPH + {0xB490, 0x78F9}, //8364 #CJK UNIFIED IDEOGRAPH + {0xB491, 0x78FB}, //8365 #CJK UNIFIED IDEOGRAPH + {0xB492, 0x78FC}, //8366 #CJK UNIFIED IDEOGRAPH + {0xB493, 0x78FD}, //8367 #CJK UNIFIED IDEOGRAPH + {0xB494, 0x78FE}, //8368 #CJK UNIFIED IDEOGRAPH + {0xB495, 0x78FF}, //8369 #CJK UNIFIED IDEOGRAPH + {0xB496, 0x7900}, //8370 #CJK UNIFIED IDEOGRAPH + {0xB497, 0x7902}, //8371 #CJK UNIFIED IDEOGRAPH + {0xB498, 0x7903}, //8372 #CJK UNIFIED IDEOGRAPH + {0xB499, 0x7904}, //8373 #CJK UNIFIED IDEOGRAPH + {0xB49A, 0x7906}, //8374 #CJK UNIFIED IDEOGRAPH + {0xB49B, 0x7907}, //8375 #CJK UNIFIED IDEOGRAPH + {0xB49C, 0x7908}, //8376 #CJK UNIFIED IDEOGRAPH + {0xB49D, 0x7909}, //8377 #CJK UNIFIED IDEOGRAPH + {0xB49E, 0x790A}, //8378 #CJK UNIFIED IDEOGRAPH + {0xB49F, 0x790B}, //8379 #CJK UNIFIED IDEOGRAPH + {0xB4A0, 0x790C}, //8380 #CJK UNIFIED IDEOGRAPH + {0xB4A1, 0x7840}, //8381 #CJK UNIFIED IDEOGRAPH + {0xB4A2, 0x50A8}, //8382 #CJK UNIFIED IDEOGRAPH + {0xB4A3, 0x77D7}, //8383 #CJK UNIFIED IDEOGRAPH + {0xB4A4, 0x6410}, //8384 #CJK UNIFIED IDEOGRAPH + {0xB4A5, 0x89E6}, //8385 #CJK UNIFIED IDEOGRAPH + {0xB4A6, 0x5904}, //8386 #CJK UNIFIED IDEOGRAPH + {0xB4A7, 0x63E3}, //8387 #CJK UNIFIED IDEOGRAPH + {0xB4A8, 0x5DDD}, //8388 #CJK UNIFIED IDEOGRAPH + {0xB4A9, 0x7A7F}, //8389 #CJK UNIFIED IDEOGRAPH + {0xB4AA, 0x693D}, //8390 #CJK UNIFIED IDEOGRAPH + {0xB4AB, 0x4F20}, //8391 #CJK UNIFIED IDEOGRAPH + {0xB4AC, 0x8239}, //8392 #CJK UNIFIED IDEOGRAPH + {0xB4AD, 0x5598}, //8393 #CJK UNIFIED IDEOGRAPH + {0xB4AE, 0x4E32}, //8394 #CJK UNIFIED IDEOGRAPH + {0xB4AF, 0x75AE}, //8395 #CJK UNIFIED IDEOGRAPH + {0xB4B0, 0x7A97}, //8396 #CJK UNIFIED IDEOGRAPH + {0xB4B1, 0x5E62}, //8397 #CJK UNIFIED IDEOGRAPH + {0xB4B2, 0x5E8A}, //8398 #CJK UNIFIED IDEOGRAPH + {0xB4B3, 0x95EF}, //8399 #CJK UNIFIED IDEOGRAPH + {0xB4B4, 0x521B}, //8400 #CJK UNIFIED IDEOGRAPH + {0xB4B5, 0x5439}, //8401 #CJK UNIFIED IDEOGRAPH + {0xB4B6, 0x708A}, //8402 #CJK UNIFIED IDEOGRAPH + {0xB4B7, 0x6376}, //8403 #CJK UNIFIED IDEOGRAPH + {0xB4B8, 0x9524}, //8404 #CJK UNIFIED IDEOGRAPH + {0xB4B9, 0x5782}, //8405 #CJK UNIFIED IDEOGRAPH + {0xB4BA, 0x6625}, //8406 #CJK UNIFIED IDEOGRAPH + {0xB4BB, 0x693F}, //8407 #CJK UNIFIED IDEOGRAPH + {0xB4BC, 0x9187}, //8408 #CJK UNIFIED IDEOGRAPH + {0xB4BD, 0x5507}, //8409 #CJK UNIFIED IDEOGRAPH + {0xB4BE, 0x6DF3}, //8410 #CJK UNIFIED IDEOGRAPH + {0xB4BF, 0x7EAF}, //8411 #CJK UNIFIED IDEOGRAPH + {0xB4C0, 0x8822}, //8412 #CJK UNIFIED IDEOGRAPH + {0xB4C1, 0x6233}, //8413 #CJK UNIFIED IDEOGRAPH + {0xB4C2, 0x7EF0}, //8414 #CJK UNIFIED IDEOGRAPH + {0xB4C3, 0x75B5}, //8415 #CJK UNIFIED IDEOGRAPH + {0xB4C4, 0x8328}, //8416 #CJK UNIFIED IDEOGRAPH + {0xB4C5, 0x78C1}, //8417 #CJK UNIFIED IDEOGRAPH + {0xB4C6, 0x96CC}, //8418 #CJK UNIFIED IDEOGRAPH + {0xB4C7, 0x8F9E}, //8419 #CJK UNIFIED IDEOGRAPH + {0xB4C8, 0x6148}, //8420 #CJK UNIFIED IDEOGRAPH + {0xB4C9, 0x74F7}, //8421 #CJK UNIFIED IDEOGRAPH + {0xB4CA, 0x8BCD}, //8422 #CJK UNIFIED IDEOGRAPH + {0xB4CB, 0x6B64}, //8423 #CJK UNIFIED IDEOGRAPH + {0xB4CC, 0x523A}, //8424 #CJK UNIFIED IDEOGRAPH + {0xB4CD, 0x8D50}, //8425 #CJK UNIFIED IDEOGRAPH + {0xB4CE, 0x6B21}, //8426 #CJK UNIFIED IDEOGRAPH + {0xB4CF, 0x806A}, //8427 #CJK UNIFIED IDEOGRAPH + {0xB4D0, 0x8471}, //8428 #CJK UNIFIED IDEOGRAPH + {0xB4D1, 0x56F1}, //8429 #CJK UNIFIED IDEOGRAPH + {0xB4D2, 0x5306}, //8430 #CJK UNIFIED IDEOGRAPH + {0xB4D3, 0x4ECE}, //8431 #CJK UNIFIED IDEOGRAPH + {0xB4D4, 0x4E1B}, //8432 #CJK UNIFIED IDEOGRAPH + {0xB4D5, 0x51D1}, //8433 #CJK UNIFIED IDEOGRAPH + {0xB4D6, 0x7C97}, //8434 #CJK UNIFIED IDEOGRAPH + {0xB4D7, 0x918B}, //8435 #CJK UNIFIED IDEOGRAPH + {0xB4D8, 0x7C07}, //8436 #CJK UNIFIED IDEOGRAPH + {0xB4D9, 0x4FC3}, //8437 #CJK UNIFIED IDEOGRAPH + {0xB4DA, 0x8E7F}, //8438 #CJK UNIFIED IDEOGRAPH + {0xB4DB, 0x7BE1}, //8439 #CJK UNIFIED IDEOGRAPH + {0xB4DC, 0x7A9C}, //8440 #CJK UNIFIED IDEOGRAPH + {0xB4DD, 0x6467}, //8441 #CJK UNIFIED IDEOGRAPH + {0xB4DE, 0x5D14}, //8442 #CJK UNIFIED IDEOGRAPH + {0xB4DF, 0x50AC}, //8443 #CJK UNIFIED IDEOGRAPH + {0xB4E0, 0x8106}, //8444 #CJK UNIFIED IDEOGRAPH + {0xB4E1, 0x7601}, //8445 #CJK UNIFIED IDEOGRAPH + {0xB4E2, 0x7CB9}, //8446 #CJK UNIFIED IDEOGRAPH + {0xB4E3, 0x6DEC}, //8447 #CJK UNIFIED IDEOGRAPH + {0xB4E4, 0x7FE0}, //8448 #CJK UNIFIED IDEOGRAPH + {0xB4E5, 0x6751}, //8449 #CJK UNIFIED IDEOGRAPH + {0xB4E6, 0x5B58}, //8450 #CJK UNIFIED IDEOGRAPH + {0xB4E7, 0x5BF8}, //8451 #CJK UNIFIED IDEOGRAPH + {0xB4E8, 0x78CB}, //8452 #CJK UNIFIED IDEOGRAPH + {0xB4E9, 0x64AE}, //8453 #CJK UNIFIED IDEOGRAPH + {0xB4EA, 0x6413}, //8454 #CJK UNIFIED IDEOGRAPH + {0xB4EB, 0x63AA}, //8455 #CJK UNIFIED IDEOGRAPH + {0xB4EC, 0x632B}, //8456 #CJK UNIFIED IDEOGRAPH + {0xB4ED, 0x9519}, //8457 #CJK UNIFIED IDEOGRAPH + {0xB4EE, 0x642D}, //8458 #CJK UNIFIED IDEOGRAPH + {0xB4EF, 0x8FBE}, //8459 #CJK UNIFIED IDEOGRAPH + {0xB4F0, 0x7B54}, //8460 #CJK UNIFIED IDEOGRAPH + {0xB4F1, 0x7629}, //8461 #CJK UNIFIED IDEOGRAPH + {0xB4F2, 0x6253}, //8462 #CJK UNIFIED IDEOGRAPH + {0xB4F3, 0x5927}, //8463 #CJK UNIFIED IDEOGRAPH + {0xB4F4, 0x5446}, //8464 #CJK UNIFIED IDEOGRAPH + {0xB4F5, 0x6B79}, //8465 #CJK UNIFIED IDEOGRAPH + {0xB4F6, 0x50A3}, //8466 #CJK UNIFIED IDEOGRAPH + {0xB4F7, 0x6234}, //8467 #CJK UNIFIED IDEOGRAPH + {0xB4F8, 0x5E26}, //8468 #CJK UNIFIED IDEOGRAPH + {0xB4F9, 0x6B86}, //8469 #CJK UNIFIED IDEOGRAPH + {0xB4FA, 0x4EE3}, //8470 #CJK UNIFIED IDEOGRAPH + {0xB4FB, 0x8D37}, //8471 #CJK UNIFIED IDEOGRAPH + {0xB4FC, 0x888B}, //8472 #CJK UNIFIED IDEOGRAPH + {0xB4FD, 0x5F85}, //8473 #CJK UNIFIED IDEOGRAPH + {0xB4FE, 0x902E}, //8474 #CJK UNIFIED IDEOGRAPH + {0xB540, 0x790D}, //8475 #CJK UNIFIED IDEOGRAPH + {0xB541, 0x790E}, //8476 #CJK UNIFIED IDEOGRAPH + {0xB542, 0x790F}, //8477 #CJK UNIFIED IDEOGRAPH + {0xB543, 0x7910}, //8478 #CJK UNIFIED IDEOGRAPH + {0xB544, 0x7911}, //8479 #CJK UNIFIED IDEOGRAPH + {0xB545, 0x7912}, //8480 #CJK UNIFIED IDEOGRAPH + {0xB546, 0x7914}, //8481 #CJK UNIFIED IDEOGRAPH + {0xB547, 0x7915}, //8482 #CJK UNIFIED IDEOGRAPH + {0xB548, 0x7916}, //8483 #CJK UNIFIED IDEOGRAPH + {0xB549, 0x7917}, //8484 #CJK UNIFIED IDEOGRAPH + {0xB54A, 0x7918}, //8485 #CJK UNIFIED IDEOGRAPH + {0xB54B, 0x7919}, //8486 #CJK UNIFIED IDEOGRAPH + {0xB54C, 0x791A}, //8487 #CJK UNIFIED IDEOGRAPH + {0xB54D, 0x791B}, //8488 #CJK UNIFIED IDEOGRAPH + {0xB54E, 0x791C}, //8489 #CJK UNIFIED IDEOGRAPH + {0xB54F, 0x791D}, //8490 #CJK UNIFIED IDEOGRAPH + {0xB550, 0x791F}, //8491 #CJK UNIFIED IDEOGRAPH + {0xB551, 0x7920}, //8492 #CJK UNIFIED IDEOGRAPH + {0xB552, 0x7921}, //8493 #CJK UNIFIED IDEOGRAPH + {0xB553, 0x7922}, //8494 #CJK UNIFIED IDEOGRAPH + {0xB554, 0x7923}, //8495 #CJK UNIFIED IDEOGRAPH + {0xB555, 0x7925}, //8496 #CJK UNIFIED IDEOGRAPH + {0xB556, 0x7926}, //8497 #CJK UNIFIED IDEOGRAPH + {0xB557, 0x7927}, //8498 #CJK UNIFIED IDEOGRAPH + {0xB558, 0x7928}, //8499 #CJK UNIFIED IDEOGRAPH + {0xB559, 0x7929}, //8500 #CJK UNIFIED IDEOGRAPH + {0xB55A, 0x792A}, //8501 #CJK UNIFIED IDEOGRAPH + {0xB55B, 0x792B}, //8502 #CJK UNIFIED IDEOGRAPH + {0xB55C, 0x792C}, //8503 #CJK UNIFIED IDEOGRAPH + {0xB55D, 0x792D}, //8504 #CJK UNIFIED IDEOGRAPH + {0xB55E, 0x792E}, //8505 #CJK UNIFIED IDEOGRAPH + {0xB55F, 0x792F}, //8506 #CJK UNIFIED IDEOGRAPH + {0xB560, 0x7930}, //8507 #CJK UNIFIED IDEOGRAPH + {0xB561, 0x7931}, //8508 #CJK UNIFIED IDEOGRAPH + {0xB562, 0x7932}, //8509 #CJK UNIFIED IDEOGRAPH + {0xB563, 0x7933}, //8510 #CJK UNIFIED IDEOGRAPH + {0xB564, 0x7935}, //8511 #CJK UNIFIED IDEOGRAPH + {0xB565, 0x7936}, //8512 #CJK UNIFIED IDEOGRAPH + {0xB566, 0x7937}, //8513 #CJK UNIFIED IDEOGRAPH + {0xB567, 0x7938}, //8514 #CJK UNIFIED IDEOGRAPH + {0xB568, 0x7939}, //8515 #CJK UNIFIED IDEOGRAPH + {0xB569, 0x793D}, //8516 #CJK UNIFIED IDEOGRAPH + {0xB56A, 0x793F}, //8517 #CJK UNIFIED IDEOGRAPH + {0xB56B, 0x7942}, //8518 #CJK UNIFIED IDEOGRAPH + {0xB56C, 0x7943}, //8519 #CJK UNIFIED IDEOGRAPH + {0xB56D, 0x7944}, //8520 #CJK UNIFIED IDEOGRAPH + {0xB56E, 0x7945}, //8521 #CJK UNIFIED IDEOGRAPH + {0xB56F, 0x7947}, //8522 #CJK UNIFIED IDEOGRAPH + {0xB570, 0x794A}, //8523 #CJK UNIFIED IDEOGRAPH + {0xB571, 0x794B}, //8524 #CJK UNIFIED IDEOGRAPH + {0xB572, 0x794C}, //8525 #CJK UNIFIED IDEOGRAPH + {0xB573, 0x794D}, //8526 #CJK UNIFIED IDEOGRAPH + {0xB574, 0x794E}, //8527 #CJK UNIFIED IDEOGRAPH + {0xB575, 0x794F}, //8528 #CJK UNIFIED IDEOGRAPH + {0xB576, 0x7950}, //8529 #CJK UNIFIED IDEOGRAPH + {0xB577, 0x7951}, //8530 #CJK UNIFIED IDEOGRAPH + {0xB578, 0x7952}, //8531 #CJK UNIFIED IDEOGRAPH + {0xB579, 0x7954}, //8532 #CJK UNIFIED IDEOGRAPH + {0xB57A, 0x7955}, //8533 #CJK UNIFIED IDEOGRAPH + {0xB57B, 0x7958}, //8534 #CJK UNIFIED IDEOGRAPH + {0xB57C, 0x7959}, //8535 #CJK UNIFIED IDEOGRAPH + {0xB57D, 0x7961}, //8536 #CJK UNIFIED IDEOGRAPH + {0xB57E, 0x7963}, //8537 #CJK UNIFIED IDEOGRAPH + {0xB580, 0x7964}, //8538 #CJK UNIFIED IDEOGRAPH + {0xB581, 0x7966}, //8539 #CJK UNIFIED IDEOGRAPH + {0xB582, 0x7969}, //8540 #CJK UNIFIED IDEOGRAPH + {0xB583, 0x796A}, //8541 #CJK UNIFIED IDEOGRAPH + {0xB584, 0x796B}, //8542 #CJK UNIFIED IDEOGRAPH + {0xB585, 0x796C}, //8543 #CJK UNIFIED IDEOGRAPH + {0xB586, 0x796E}, //8544 #CJK UNIFIED IDEOGRAPH + {0xB587, 0x7970}, //8545 #CJK UNIFIED IDEOGRAPH + {0xB588, 0x7971}, //8546 #CJK UNIFIED IDEOGRAPH + {0xB589, 0x7972}, //8547 #CJK UNIFIED IDEOGRAPH + {0xB58A, 0x7973}, //8548 #CJK UNIFIED IDEOGRAPH + {0xB58B, 0x7974}, //8549 #CJK UNIFIED IDEOGRAPH + {0xB58C, 0x7975}, //8550 #CJK UNIFIED IDEOGRAPH + {0xB58D, 0x7976}, //8551 #CJK UNIFIED IDEOGRAPH + {0xB58E, 0x7979}, //8552 #CJK UNIFIED IDEOGRAPH + {0xB58F, 0x797B}, //8553 #CJK UNIFIED IDEOGRAPH + {0xB590, 0x797C}, //8554 #CJK UNIFIED IDEOGRAPH + {0xB591, 0x797D}, //8555 #CJK UNIFIED IDEOGRAPH + {0xB592, 0x797E}, //8556 #CJK UNIFIED IDEOGRAPH + {0xB593, 0x797F}, //8557 #CJK UNIFIED IDEOGRAPH + {0xB594, 0x7982}, //8558 #CJK UNIFIED IDEOGRAPH + {0xB595, 0x7983}, //8559 #CJK UNIFIED IDEOGRAPH + {0xB596, 0x7986}, //8560 #CJK UNIFIED IDEOGRAPH + {0xB597, 0x7987}, //8561 #CJK UNIFIED IDEOGRAPH + {0xB598, 0x7988}, //8562 #CJK UNIFIED IDEOGRAPH + {0xB599, 0x7989}, //8563 #CJK UNIFIED IDEOGRAPH + {0xB59A, 0x798B}, //8564 #CJK UNIFIED IDEOGRAPH + {0xB59B, 0x798C}, //8565 #CJK UNIFIED IDEOGRAPH + {0xB59C, 0x798D}, //8566 #CJK UNIFIED IDEOGRAPH + {0xB59D, 0x798E}, //8567 #CJK UNIFIED IDEOGRAPH + {0xB59E, 0x7990}, //8568 #CJK UNIFIED IDEOGRAPH + {0xB59F, 0x7991}, //8569 #CJK UNIFIED IDEOGRAPH + {0xB5A0, 0x7992}, //8570 #CJK UNIFIED IDEOGRAPH + {0xB5A1, 0x6020}, //8571 #CJK UNIFIED IDEOGRAPH + {0xB5A2, 0x803D}, //8572 #CJK UNIFIED IDEOGRAPH + {0xB5A3, 0x62C5}, //8573 #CJK UNIFIED IDEOGRAPH + {0xB5A4, 0x4E39}, //8574 #CJK UNIFIED IDEOGRAPH + {0xB5A5, 0x5355}, //8575 #CJK UNIFIED IDEOGRAPH + {0xB5A6, 0x90F8}, //8576 #CJK UNIFIED IDEOGRAPH + {0xB5A7, 0x63B8}, //8577 #CJK UNIFIED IDEOGRAPH + {0xB5A8, 0x80C6}, //8578 #CJK UNIFIED IDEOGRAPH + {0xB5A9, 0x65E6}, //8579 #CJK UNIFIED IDEOGRAPH + {0xB5AA, 0x6C2E}, //8580 #CJK UNIFIED IDEOGRAPH + {0xB5AB, 0x4F46}, //8581 #CJK UNIFIED IDEOGRAPH + {0xB5AC, 0x60EE}, //8582 #CJK UNIFIED IDEOGRAPH + {0xB5AD, 0x6DE1}, //8583 #CJK UNIFIED IDEOGRAPH + {0xB5AE, 0x8BDE}, //8584 #CJK UNIFIED IDEOGRAPH + {0xB5AF, 0x5F39}, //8585 #CJK UNIFIED IDEOGRAPH + {0xB5B0, 0x86CB}, //8586 #CJK UNIFIED IDEOGRAPH + {0xB5B1, 0x5F53}, //8587 #CJK UNIFIED IDEOGRAPH + {0xB5B2, 0x6321}, //8588 #CJK UNIFIED IDEOGRAPH + {0xB5B3, 0x515A}, //8589 #CJK UNIFIED IDEOGRAPH + {0xB5B4, 0x8361}, //8590 #CJK UNIFIED IDEOGRAPH + {0xB5B5, 0x6863}, //8591 #CJK UNIFIED IDEOGRAPH + {0xB5B6, 0x5200}, //8592 #CJK UNIFIED IDEOGRAPH + {0xB5B7, 0x6363}, //8593 #CJK UNIFIED IDEOGRAPH + {0xB5B8, 0x8E48}, //8594 #CJK UNIFIED IDEOGRAPH + {0xB5B9, 0x5012}, //8595 #CJK UNIFIED IDEOGRAPH + {0xB5BA, 0x5C9B}, //8596 #CJK UNIFIED IDEOGRAPH + {0xB5BB, 0x7977}, //8597 #CJK UNIFIED IDEOGRAPH + {0xB5BC, 0x5BFC}, //8598 #CJK UNIFIED IDEOGRAPH + {0xB5BD, 0x5230}, //8599 #CJK UNIFIED IDEOGRAPH + {0xB5BE, 0x7A3B}, //8600 #CJK UNIFIED IDEOGRAPH + {0xB5BF, 0x60BC}, //8601 #CJK UNIFIED IDEOGRAPH + {0xB5C0, 0x9053}, //8602 #CJK UNIFIED IDEOGRAPH + {0xB5C1, 0x76D7}, //8603 #CJK UNIFIED IDEOGRAPH + {0xB5C2, 0x5FB7}, //8604 #CJK UNIFIED IDEOGRAPH + {0xB5C3, 0x5F97}, //8605 #CJK UNIFIED IDEOGRAPH + {0xB5C4, 0x7684}, //8606 #CJK UNIFIED IDEOGRAPH + {0xB5C5, 0x8E6C}, //8607 #CJK UNIFIED IDEOGRAPH + {0xB5C6, 0x706F}, //8608 #CJK UNIFIED IDEOGRAPH + {0xB5C7, 0x767B}, //8609 #CJK UNIFIED IDEOGRAPH + {0xB5C8, 0x7B49}, //8610 #CJK UNIFIED IDEOGRAPH + {0xB5C9, 0x77AA}, //8611 #CJK UNIFIED IDEOGRAPH + {0xB5CA, 0x51F3}, //8612 #CJK UNIFIED IDEOGRAPH + {0xB5CB, 0x9093}, //8613 #CJK UNIFIED IDEOGRAPH + {0xB5CC, 0x5824}, //8614 #CJK UNIFIED IDEOGRAPH + {0xB5CD, 0x4F4E}, //8615 #CJK UNIFIED IDEOGRAPH + {0xB5CE, 0x6EF4}, //8616 #CJK UNIFIED IDEOGRAPH + {0xB5CF, 0x8FEA}, //8617 #CJK UNIFIED IDEOGRAPH + {0xB5D0, 0x654C}, //8618 #CJK UNIFIED IDEOGRAPH + {0xB5D1, 0x7B1B}, //8619 #CJK UNIFIED IDEOGRAPH + {0xB5D2, 0x72C4}, //8620 #CJK UNIFIED IDEOGRAPH + {0xB5D3, 0x6DA4}, //8621 #CJK UNIFIED IDEOGRAPH + {0xB5D4, 0x7FDF}, //8622 #CJK UNIFIED IDEOGRAPH + {0xB5D5, 0x5AE1}, //8623 #CJK UNIFIED IDEOGRAPH + {0xB5D6, 0x62B5}, //8624 #CJK UNIFIED IDEOGRAPH + {0xB5D7, 0x5E95}, //8625 #CJK UNIFIED IDEOGRAPH + {0xB5D8, 0x5730}, //8626 #CJK UNIFIED IDEOGRAPH + {0xB5D9, 0x8482}, //8627 #CJK UNIFIED IDEOGRAPH + {0xB5DA, 0x7B2C}, //8628 #CJK UNIFIED IDEOGRAPH + {0xB5DB, 0x5E1D}, //8629 #CJK UNIFIED IDEOGRAPH + {0xB5DC, 0x5F1F}, //8630 #CJK UNIFIED IDEOGRAPH + {0xB5DD, 0x9012}, //8631 #CJK UNIFIED IDEOGRAPH + {0xB5DE, 0x7F14}, //8632 #CJK UNIFIED IDEOGRAPH + {0xB5DF, 0x98A0}, //8633 #CJK UNIFIED IDEOGRAPH + {0xB5E0, 0x6382}, //8634 #CJK UNIFIED IDEOGRAPH + {0xB5E1, 0x6EC7}, //8635 #CJK UNIFIED IDEOGRAPH + {0xB5E2, 0x7898}, //8636 #CJK UNIFIED IDEOGRAPH + {0xB5E3, 0x70B9}, //8637 #CJK UNIFIED IDEOGRAPH + {0xB5E4, 0x5178}, //8638 #CJK UNIFIED IDEOGRAPH + {0xB5E5, 0x975B}, //8639 #CJK UNIFIED IDEOGRAPH + {0xB5E6, 0x57AB}, //8640 #CJK UNIFIED IDEOGRAPH + {0xB5E7, 0x7535}, //8641 #CJK UNIFIED IDEOGRAPH + {0xB5E8, 0x4F43}, //8642 #CJK UNIFIED IDEOGRAPH + {0xB5E9, 0x7538}, //8643 #CJK UNIFIED IDEOGRAPH + {0xB5EA, 0x5E97}, //8644 #CJK UNIFIED IDEOGRAPH + {0xB5EB, 0x60E6}, //8645 #CJK UNIFIED IDEOGRAPH + {0xB5EC, 0x5960}, //8646 #CJK UNIFIED IDEOGRAPH + {0xB5ED, 0x6DC0}, //8647 #CJK UNIFIED IDEOGRAPH + {0xB5EE, 0x6BBF}, //8648 #CJK UNIFIED IDEOGRAPH + {0xB5EF, 0x7889}, //8649 #CJK UNIFIED IDEOGRAPH + {0xB5F0, 0x53FC}, //8650 #CJK UNIFIED IDEOGRAPH + {0xB5F1, 0x96D5}, //8651 #CJK UNIFIED IDEOGRAPH + {0xB5F2, 0x51CB}, //8652 #CJK UNIFIED IDEOGRAPH + {0xB5F3, 0x5201}, //8653 #CJK UNIFIED IDEOGRAPH + {0xB5F4, 0x6389}, //8654 #CJK UNIFIED IDEOGRAPH + {0xB5F5, 0x540A}, //8655 #CJK UNIFIED IDEOGRAPH + {0xB5F6, 0x9493}, //8656 #CJK UNIFIED IDEOGRAPH + {0xB5F7, 0x8C03}, //8657 #CJK UNIFIED IDEOGRAPH + {0xB5F8, 0x8DCC}, //8658 #CJK UNIFIED IDEOGRAPH + {0xB5F9, 0x7239}, //8659 #CJK UNIFIED IDEOGRAPH + {0xB5FA, 0x789F}, //8660 #CJK UNIFIED IDEOGRAPH + {0xB5FB, 0x8776}, //8661 #CJK UNIFIED IDEOGRAPH + {0xB5FC, 0x8FED}, //8662 #CJK UNIFIED IDEOGRAPH + {0xB5FD, 0x8C0D}, //8663 #CJK UNIFIED IDEOGRAPH + {0xB5FE, 0x53E0}, //8664 #CJK UNIFIED IDEOGRAPH + {0xB640, 0x7993}, //8665 #CJK UNIFIED IDEOGRAPH + {0xB641, 0x7994}, //8666 #CJK UNIFIED IDEOGRAPH + {0xB642, 0x7995}, //8667 #CJK UNIFIED IDEOGRAPH + {0xB643, 0x7996}, //8668 #CJK UNIFIED IDEOGRAPH + {0xB644, 0x7997}, //8669 #CJK UNIFIED IDEOGRAPH + {0xB645, 0x7998}, //8670 #CJK UNIFIED IDEOGRAPH + {0xB646, 0x7999}, //8671 #CJK UNIFIED IDEOGRAPH + {0xB647, 0x799B}, //8672 #CJK UNIFIED IDEOGRAPH + {0xB648, 0x799C}, //8673 #CJK UNIFIED IDEOGRAPH + {0xB649, 0x799D}, //8674 #CJK UNIFIED IDEOGRAPH + {0xB64A, 0x799E}, //8675 #CJK UNIFIED IDEOGRAPH + {0xB64B, 0x799F}, //8676 #CJK UNIFIED IDEOGRAPH + {0xB64C, 0x79A0}, //8677 #CJK UNIFIED IDEOGRAPH + {0xB64D, 0x79A1}, //8678 #CJK UNIFIED IDEOGRAPH + {0xB64E, 0x79A2}, //8679 #CJK UNIFIED IDEOGRAPH + {0xB64F, 0x79A3}, //8680 #CJK UNIFIED IDEOGRAPH + {0xB650, 0x79A4}, //8681 #CJK UNIFIED IDEOGRAPH + {0xB651, 0x79A5}, //8682 #CJK UNIFIED IDEOGRAPH + {0xB652, 0x79A6}, //8683 #CJK UNIFIED IDEOGRAPH + {0xB653, 0x79A8}, //8684 #CJK UNIFIED IDEOGRAPH + {0xB654, 0x79A9}, //8685 #CJK UNIFIED IDEOGRAPH + {0xB655, 0x79AA}, //8686 #CJK UNIFIED IDEOGRAPH + {0xB656, 0x79AB}, //8687 #CJK UNIFIED IDEOGRAPH + {0xB657, 0x79AC}, //8688 #CJK UNIFIED IDEOGRAPH + {0xB658, 0x79AD}, //8689 #CJK UNIFIED IDEOGRAPH + {0xB659, 0x79AE}, //8690 #CJK UNIFIED IDEOGRAPH + {0xB65A, 0x79AF}, //8691 #CJK UNIFIED IDEOGRAPH + {0xB65B, 0x79B0}, //8692 #CJK UNIFIED IDEOGRAPH + {0xB65C, 0x79B1}, //8693 #CJK UNIFIED IDEOGRAPH + {0xB65D, 0x79B2}, //8694 #CJK UNIFIED IDEOGRAPH + {0xB65E, 0x79B4}, //8695 #CJK UNIFIED IDEOGRAPH + {0xB65F, 0x79B5}, //8696 #CJK UNIFIED IDEOGRAPH + {0xB660, 0x79B6}, //8697 #CJK UNIFIED IDEOGRAPH + {0xB661, 0x79B7}, //8698 #CJK UNIFIED IDEOGRAPH + {0xB662, 0x79B8}, //8699 #CJK UNIFIED IDEOGRAPH + {0xB663, 0x79BC}, //8700 #CJK UNIFIED IDEOGRAPH + {0xB664, 0x79BF}, //8701 #CJK UNIFIED IDEOGRAPH + {0xB665, 0x79C2}, //8702 #CJK UNIFIED IDEOGRAPH + {0xB666, 0x79C4}, //8703 #CJK UNIFIED IDEOGRAPH + {0xB667, 0x79C5}, //8704 #CJK UNIFIED IDEOGRAPH + {0xB668, 0x79C7}, //8705 #CJK UNIFIED IDEOGRAPH + {0xB669, 0x79C8}, //8706 #CJK UNIFIED IDEOGRAPH + {0xB66A, 0x79CA}, //8707 #CJK UNIFIED IDEOGRAPH + {0xB66B, 0x79CC}, //8708 #CJK UNIFIED IDEOGRAPH + {0xB66C, 0x79CE}, //8709 #CJK UNIFIED IDEOGRAPH + {0xB66D, 0x79CF}, //8710 #CJK UNIFIED IDEOGRAPH + {0xB66E, 0x79D0}, //8711 #CJK UNIFIED IDEOGRAPH + {0xB66F, 0x79D3}, //8712 #CJK UNIFIED IDEOGRAPH + {0xB670, 0x79D4}, //8713 #CJK UNIFIED IDEOGRAPH + {0xB671, 0x79D6}, //8714 #CJK UNIFIED IDEOGRAPH + {0xB672, 0x79D7}, //8715 #CJK UNIFIED IDEOGRAPH + {0xB673, 0x79D9}, //8716 #CJK UNIFIED IDEOGRAPH + {0xB674, 0x79DA}, //8717 #CJK UNIFIED IDEOGRAPH + {0xB675, 0x79DB}, //8718 #CJK UNIFIED IDEOGRAPH + {0xB676, 0x79DC}, //8719 #CJK UNIFIED IDEOGRAPH + {0xB677, 0x79DD}, //8720 #CJK UNIFIED IDEOGRAPH + {0xB678, 0x79DE}, //8721 #CJK UNIFIED IDEOGRAPH + {0xB679, 0x79E0}, //8722 #CJK UNIFIED IDEOGRAPH + {0xB67A, 0x79E1}, //8723 #CJK UNIFIED IDEOGRAPH + {0xB67B, 0x79E2}, //8724 #CJK UNIFIED IDEOGRAPH + {0xB67C, 0x79E5}, //8725 #CJK UNIFIED IDEOGRAPH + {0xB67D, 0x79E8}, //8726 #CJK UNIFIED IDEOGRAPH + {0xB67E, 0x79EA}, //8727 #CJK UNIFIED IDEOGRAPH + {0xB680, 0x79EC}, //8728 #CJK UNIFIED IDEOGRAPH + {0xB681, 0x79EE}, //8729 #CJK UNIFIED IDEOGRAPH + {0xB682, 0x79F1}, //8730 #CJK UNIFIED IDEOGRAPH + {0xB683, 0x79F2}, //8731 #CJK UNIFIED IDEOGRAPH + {0xB684, 0x79F3}, //8732 #CJK UNIFIED IDEOGRAPH + {0xB685, 0x79F4}, //8733 #CJK UNIFIED IDEOGRAPH + {0xB686, 0x79F5}, //8734 #CJK UNIFIED IDEOGRAPH + {0xB687, 0x79F6}, //8735 #CJK UNIFIED IDEOGRAPH + {0xB688, 0x79F7}, //8736 #CJK UNIFIED IDEOGRAPH + {0xB689, 0x79F9}, //8737 #CJK UNIFIED IDEOGRAPH + {0xB68A, 0x79FA}, //8738 #CJK UNIFIED IDEOGRAPH + {0xB68B, 0x79FC}, //8739 #CJK UNIFIED IDEOGRAPH + {0xB68C, 0x79FE}, //8740 #CJK UNIFIED IDEOGRAPH + {0xB68D, 0x79FF}, //8741 #CJK UNIFIED IDEOGRAPH + {0xB68E, 0x7A01}, //8742 #CJK UNIFIED IDEOGRAPH + {0xB68F, 0x7A04}, //8743 #CJK UNIFIED IDEOGRAPH + {0xB690, 0x7A05}, //8744 #CJK UNIFIED IDEOGRAPH + {0xB691, 0x7A07}, //8745 #CJK UNIFIED IDEOGRAPH + {0xB692, 0x7A08}, //8746 #CJK UNIFIED IDEOGRAPH + {0xB693, 0x7A09}, //8747 #CJK UNIFIED IDEOGRAPH + {0xB694, 0x7A0A}, //8748 #CJK UNIFIED IDEOGRAPH + {0xB695, 0x7A0C}, //8749 #CJK UNIFIED IDEOGRAPH + {0xB696, 0x7A0F}, //8750 #CJK UNIFIED IDEOGRAPH + {0xB697, 0x7A10}, //8751 #CJK UNIFIED IDEOGRAPH + {0xB698, 0x7A11}, //8752 #CJK UNIFIED IDEOGRAPH + {0xB699, 0x7A12}, //8753 #CJK UNIFIED IDEOGRAPH + {0xB69A, 0x7A13}, //8754 #CJK UNIFIED IDEOGRAPH + {0xB69B, 0x7A15}, //8755 #CJK UNIFIED IDEOGRAPH + {0xB69C, 0x7A16}, //8756 #CJK UNIFIED IDEOGRAPH + {0xB69D, 0x7A18}, //8757 #CJK UNIFIED IDEOGRAPH + {0xB69E, 0x7A19}, //8758 #CJK UNIFIED IDEOGRAPH + {0xB69F, 0x7A1B}, //8759 #CJK UNIFIED IDEOGRAPH + {0xB6A0, 0x7A1C}, //8760 #CJK UNIFIED IDEOGRAPH + {0xB6A1, 0x4E01}, //8761 #CJK UNIFIED IDEOGRAPH + {0xB6A2, 0x76EF}, //8762 #CJK UNIFIED IDEOGRAPH + {0xB6A3, 0x53EE}, //8763 #CJK UNIFIED IDEOGRAPH + {0xB6A4, 0x9489}, //8764 #CJK UNIFIED IDEOGRAPH + {0xB6A5, 0x9876}, //8765 #CJK UNIFIED IDEOGRAPH + {0xB6A6, 0x9F0E}, //8766 #CJK UNIFIED IDEOGRAPH + {0xB6A7, 0x952D}, //8767 #CJK UNIFIED IDEOGRAPH + {0xB6A8, 0x5B9A}, //8768 #CJK UNIFIED IDEOGRAPH + {0xB6A9, 0x8BA2}, //8769 #CJK UNIFIED IDEOGRAPH + {0xB6AA, 0x4E22}, //8770 #CJK UNIFIED IDEOGRAPH + {0xB6AB, 0x4E1C}, //8771 #CJK UNIFIED IDEOGRAPH + {0xB6AC, 0x51AC}, //8772 #CJK UNIFIED IDEOGRAPH + {0xB6AD, 0x8463}, //8773 #CJK UNIFIED IDEOGRAPH + {0xB6AE, 0x61C2}, //8774 #CJK UNIFIED IDEOGRAPH + {0xB6AF, 0x52A8}, //8775 #CJK UNIFIED IDEOGRAPH + {0xB6B0, 0x680B}, //8776 #CJK UNIFIED IDEOGRAPH + {0xB6B1, 0x4F97}, //8777 #CJK UNIFIED IDEOGRAPH + {0xB6B2, 0x606B}, //8778 #CJK UNIFIED IDEOGRAPH + {0xB6B3, 0x51BB}, //8779 #CJK UNIFIED IDEOGRAPH + {0xB6B4, 0x6D1E}, //8780 #CJK UNIFIED IDEOGRAPH + {0xB6B5, 0x515C}, //8781 #CJK UNIFIED IDEOGRAPH + {0xB6B6, 0x6296}, //8782 #CJK UNIFIED IDEOGRAPH + {0xB6B7, 0x6597}, //8783 #CJK UNIFIED IDEOGRAPH + {0xB6B8, 0x9661}, //8784 #CJK UNIFIED IDEOGRAPH + {0xB6B9, 0x8C46}, //8785 #CJK UNIFIED IDEOGRAPH + {0xB6BA, 0x9017}, //8786 #CJK UNIFIED IDEOGRAPH + {0xB6BB, 0x75D8}, //8787 #CJK UNIFIED IDEOGRAPH + {0xB6BC, 0x90FD}, //8788 #CJK UNIFIED IDEOGRAPH + {0xB6BD, 0x7763}, //8789 #CJK UNIFIED IDEOGRAPH + {0xB6BE, 0x6BD2}, //8790 #CJK UNIFIED IDEOGRAPH + {0xB6BF, 0x728A}, //8791 #CJK UNIFIED IDEOGRAPH + {0xB6C0, 0x72EC}, //8792 #CJK UNIFIED IDEOGRAPH + {0xB6C1, 0x8BFB}, //8793 #CJK UNIFIED IDEOGRAPH + {0xB6C2, 0x5835}, //8794 #CJK UNIFIED IDEOGRAPH + {0xB6C3, 0x7779}, //8795 #CJK UNIFIED IDEOGRAPH + {0xB6C4, 0x8D4C}, //8796 #CJK UNIFIED IDEOGRAPH + {0xB6C5, 0x675C}, //8797 #CJK UNIFIED IDEOGRAPH + {0xB6C6, 0x9540}, //8798 #CJK UNIFIED IDEOGRAPH + {0xB6C7, 0x809A}, //8799 #CJK UNIFIED IDEOGRAPH + {0xB6C8, 0x5EA6}, //8800 #CJK UNIFIED IDEOGRAPH + {0xB6C9, 0x6E21}, //8801 #CJK UNIFIED IDEOGRAPH + {0xB6CA, 0x5992}, //8802 #CJK UNIFIED IDEOGRAPH + {0xB6CB, 0x7AEF}, //8803 #CJK UNIFIED IDEOGRAPH + {0xB6CC, 0x77ED}, //8804 #CJK UNIFIED IDEOGRAPH + {0xB6CD, 0x953B}, //8805 #CJK UNIFIED IDEOGRAPH + {0xB6CE, 0x6BB5}, //8806 #CJK UNIFIED IDEOGRAPH + {0xB6CF, 0x65AD}, //8807 #CJK UNIFIED IDEOGRAPH + {0xB6D0, 0x7F0E}, //8808 #CJK UNIFIED IDEOGRAPH + {0xB6D1, 0x5806}, //8809 #CJK UNIFIED IDEOGRAPH + {0xB6D2, 0x5151}, //8810 #CJK UNIFIED IDEOGRAPH + {0xB6D3, 0x961F}, //8811 #CJK UNIFIED IDEOGRAPH + {0xB6D4, 0x5BF9}, //8812 #CJK UNIFIED IDEOGRAPH + {0xB6D5, 0x58A9}, //8813 #CJK UNIFIED IDEOGRAPH + {0xB6D6, 0x5428}, //8814 #CJK UNIFIED IDEOGRAPH + {0xB6D7, 0x8E72}, //8815 #CJK UNIFIED IDEOGRAPH + {0xB6D8, 0x6566}, //8816 #CJK UNIFIED IDEOGRAPH + {0xB6D9, 0x987F}, //8817 #CJK UNIFIED IDEOGRAPH + {0xB6DA, 0x56E4}, //8818 #CJK UNIFIED IDEOGRAPH + {0xB6DB, 0x949D}, //8819 #CJK UNIFIED IDEOGRAPH + {0xB6DC, 0x76FE}, //8820 #CJK UNIFIED IDEOGRAPH + {0xB6DD, 0x9041}, //8821 #CJK UNIFIED IDEOGRAPH + {0xB6DE, 0x6387}, //8822 #CJK UNIFIED IDEOGRAPH + {0xB6DF, 0x54C6}, //8823 #CJK UNIFIED IDEOGRAPH + {0xB6E0, 0x591A}, //8824 #CJK UNIFIED IDEOGRAPH + {0xB6E1, 0x593A}, //8825 #CJK UNIFIED IDEOGRAPH + {0xB6E2, 0x579B}, //8826 #CJK UNIFIED IDEOGRAPH + {0xB6E3, 0x8EB2}, //8827 #CJK UNIFIED IDEOGRAPH + {0xB6E4, 0x6735}, //8828 #CJK UNIFIED IDEOGRAPH + {0xB6E5, 0x8DFA}, //8829 #CJK UNIFIED IDEOGRAPH + {0xB6E6, 0x8235}, //8830 #CJK UNIFIED IDEOGRAPH + {0xB6E7, 0x5241}, //8831 #CJK UNIFIED IDEOGRAPH + {0xB6E8, 0x60F0}, //8832 #CJK UNIFIED IDEOGRAPH + {0xB6E9, 0x5815}, //8833 #CJK UNIFIED IDEOGRAPH + {0xB6EA, 0x86FE}, //8834 #CJK UNIFIED IDEOGRAPH + {0xB6EB, 0x5CE8}, //8835 #CJK UNIFIED IDEOGRAPH + {0xB6EC, 0x9E45}, //8836 #CJK UNIFIED IDEOGRAPH + {0xB6ED, 0x4FC4}, //8837 #CJK UNIFIED IDEOGRAPH + {0xB6EE, 0x989D}, //8838 #CJK UNIFIED IDEOGRAPH + {0xB6EF, 0x8BB9}, //8839 #CJK UNIFIED IDEOGRAPH + {0xB6F0, 0x5A25}, //8840 #CJK UNIFIED IDEOGRAPH + {0xB6F1, 0x6076}, //8841 #CJK UNIFIED IDEOGRAPH + {0xB6F2, 0x5384}, //8842 #CJK UNIFIED IDEOGRAPH + {0xB6F3, 0x627C}, //8843 #CJK UNIFIED IDEOGRAPH + {0xB6F4, 0x904F}, //8844 #CJK UNIFIED IDEOGRAPH + {0xB6F5, 0x9102}, //8845 #CJK UNIFIED IDEOGRAPH + {0xB6F6, 0x997F}, //8846 #CJK UNIFIED IDEOGRAPH + {0xB6F7, 0x6069}, //8847 #CJK UNIFIED IDEOGRAPH + {0xB6F8, 0x800C}, //8848 #CJK UNIFIED IDEOGRAPH + {0xB6F9, 0x513F}, //8849 #CJK UNIFIED IDEOGRAPH + {0xB6FA, 0x8033}, //8850 #CJK UNIFIED IDEOGRAPH + {0xB6FB, 0x5C14}, //8851 #CJK UNIFIED IDEOGRAPH + {0xB6FC, 0x9975}, //8852 #CJK UNIFIED IDEOGRAPH + {0xB6FD, 0x6D31}, //8853 #CJK UNIFIED IDEOGRAPH + {0xB6FE, 0x4E8C}, //8854 #CJK UNIFIED IDEOGRAPH + {0xB740, 0x7A1D}, //8855 #CJK UNIFIED IDEOGRAPH + {0xB741, 0x7A1F}, //8856 #CJK UNIFIED IDEOGRAPH + {0xB742, 0x7A21}, //8857 #CJK UNIFIED IDEOGRAPH + {0xB743, 0x7A22}, //8858 #CJK UNIFIED IDEOGRAPH + {0xB744, 0x7A24}, //8859 #CJK UNIFIED IDEOGRAPH + {0xB745, 0x7A25}, //8860 #CJK UNIFIED IDEOGRAPH + {0xB746, 0x7A26}, //8861 #CJK UNIFIED IDEOGRAPH + {0xB747, 0x7A27}, //8862 #CJK UNIFIED IDEOGRAPH + {0xB748, 0x7A28}, //8863 #CJK UNIFIED IDEOGRAPH + {0xB749, 0x7A29}, //8864 #CJK UNIFIED IDEOGRAPH + {0xB74A, 0x7A2A}, //8865 #CJK UNIFIED IDEOGRAPH + {0xB74B, 0x7A2B}, //8866 #CJK UNIFIED IDEOGRAPH + {0xB74C, 0x7A2C}, //8867 #CJK UNIFIED IDEOGRAPH + {0xB74D, 0x7A2D}, //8868 #CJK UNIFIED IDEOGRAPH + {0xB74E, 0x7A2E}, //8869 #CJK UNIFIED IDEOGRAPH + {0xB74F, 0x7A2F}, //8870 #CJK UNIFIED IDEOGRAPH + {0xB750, 0x7A30}, //8871 #CJK UNIFIED IDEOGRAPH + {0xB751, 0x7A31}, //8872 #CJK UNIFIED IDEOGRAPH + {0xB752, 0x7A32}, //8873 #CJK UNIFIED IDEOGRAPH + {0xB753, 0x7A34}, //8874 #CJK UNIFIED IDEOGRAPH + {0xB754, 0x7A35}, //8875 #CJK UNIFIED IDEOGRAPH + {0xB755, 0x7A36}, //8876 #CJK UNIFIED IDEOGRAPH + {0xB756, 0x7A38}, //8877 #CJK UNIFIED IDEOGRAPH + {0xB757, 0x7A3A}, //8878 #CJK UNIFIED IDEOGRAPH + {0xB758, 0x7A3E}, //8879 #CJK UNIFIED IDEOGRAPH + {0xB759, 0x7A40}, //8880 #CJK UNIFIED IDEOGRAPH + {0xB75A, 0x7A41}, //8881 #CJK UNIFIED IDEOGRAPH + {0xB75B, 0x7A42}, //8882 #CJK UNIFIED IDEOGRAPH + {0xB75C, 0x7A43}, //8883 #CJK UNIFIED IDEOGRAPH + {0xB75D, 0x7A44}, //8884 #CJK UNIFIED IDEOGRAPH + {0xB75E, 0x7A45}, //8885 #CJK UNIFIED IDEOGRAPH + {0xB75F, 0x7A47}, //8886 #CJK UNIFIED IDEOGRAPH + {0xB760, 0x7A48}, //8887 #CJK UNIFIED IDEOGRAPH + {0xB761, 0x7A49}, //8888 #CJK UNIFIED IDEOGRAPH + {0xB762, 0x7A4A}, //8889 #CJK UNIFIED IDEOGRAPH + {0xB763, 0x7A4B}, //8890 #CJK UNIFIED IDEOGRAPH + {0xB764, 0x7A4C}, //8891 #CJK UNIFIED IDEOGRAPH + {0xB765, 0x7A4D}, //8892 #CJK UNIFIED IDEOGRAPH + {0xB766, 0x7A4E}, //8893 #CJK UNIFIED IDEOGRAPH + {0xB767, 0x7A4F}, //8894 #CJK UNIFIED IDEOGRAPH + {0xB768, 0x7A50}, //8895 #CJK UNIFIED IDEOGRAPH + {0xB769, 0x7A52}, //8896 #CJK UNIFIED IDEOGRAPH + {0xB76A, 0x7A53}, //8897 #CJK UNIFIED IDEOGRAPH + {0xB76B, 0x7A54}, //8898 #CJK UNIFIED IDEOGRAPH + {0xB76C, 0x7A55}, //8899 #CJK UNIFIED IDEOGRAPH + {0xB76D, 0x7A56}, //8900 #CJK UNIFIED IDEOGRAPH + {0xB76E, 0x7A58}, //8901 #CJK UNIFIED IDEOGRAPH + {0xB76F, 0x7A59}, //8902 #CJK UNIFIED IDEOGRAPH + {0xB770, 0x7A5A}, //8903 #CJK UNIFIED IDEOGRAPH + {0xB771, 0x7A5B}, //8904 #CJK UNIFIED IDEOGRAPH + {0xB772, 0x7A5C}, //8905 #CJK UNIFIED IDEOGRAPH + {0xB773, 0x7A5D}, //8906 #CJK UNIFIED IDEOGRAPH + {0xB774, 0x7A5E}, //8907 #CJK UNIFIED IDEOGRAPH + {0xB775, 0x7A5F}, //8908 #CJK UNIFIED IDEOGRAPH + {0xB776, 0x7A60}, //8909 #CJK UNIFIED IDEOGRAPH + {0xB777, 0x7A61}, //8910 #CJK UNIFIED IDEOGRAPH + {0xB778, 0x7A62}, //8911 #CJK UNIFIED IDEOGRAPH + {0xB779, 0x7A63}, //8912 #CJK UNIFIED IDEOGRAPH + {0xB77A, 0x7A64}, //8913 #CJK UNIFIED IDEOGRAPH + {0xB77B, 0x7A65}, //8914 #CJK UNIFIED IDEOGRAPH + {0xB77C, 0x7A66}, //8915 #CJK UNIFIED IDEOGRAPH + {0xB77D, 0x7A67}, //8916 #CJK UNIFIED IDEOGRAPH + {0xB77E, 0x7A68}, //8917 #CJK UNIFIED IDEOGRAPH + {0xB780, 0x7A69}, //8918 #CJK UNIFIED IDEOGRAPH + {0xB781, 0x7A6A}, //8919 #CJK UNIFIED IDEOGRAPH + {0xB782, 0x7A6B}, //8920 #CJK UNIFIED IDEOGRAPH + {0xB783, 0x7A6C}, //8921 #CJK UNIFIED IDEOGRAPH + {0xB784, 0x7A6D}, //8922 #CJK UNIFIED IDEOGRAPH + {0xB785, 0x7A6E}, //8923 #CJK UNIFIED IDEOGRAPH + {0xB786, 0x7A6F}, //8924 #CJK UNIFIED IDEOGRAPH + {0xB787, 0x7A71}, //8925 #CJK UNIFIED IDEOGRAPH + {0xB788, 0x7A72}, //8926 #CJK UNIFIED IDEOGRAPH + {0xB789, 0x7A73}, //8927 #CJK UNIFIED IDEOGRAPH + {0xB78A, 0x7A75}, //8928 #CJK UNIFIED IDEOGRAPH + {0xB78B, 0x7A7B}, //8929 #CJK UNIFIED IDEOGRAPH + {0xB78C, 0x7A7C}, //8930 #CJK UNIFIED IDEOGRAPH + {0xB78D, 0x7A7D}, //8931 #CJK UNIFIED IDEOGRAPH + {0xB78E, 0x7A7E}, //8932 #CJK UNIFIED IDEOGRAPH + {0xB78F, 0x7A82}, //8933 #CJK UNIFIED IDEOGRAPH + {0xB790, 0x7A85}, //8934 #CJK UNIFIED IDEOGRAPH + {0xB791, 0x7A87}, //8935 #CJK UNIFIED IDEOGRAPH + {0xB792, 0x7A89}, //8936 #CJK UNIFIED IDEOGRAPH + {0xB793, 0x7A8A}, //8937 #CJK UNIFIED IDEOGRAPH + {0xB794, 0x7A8B}, //8938 #CJK UNIFIED IDEOGRAPH + {0xB795, 0x7A8C}, //8939 #CJK UNIFIED IDEOGRAPH + {0xB796, 0x7A8E}, //8940 #CJK UNIFIED IDEOGRAPH + {0xB797, 0x7A8F}, //8941 #CJK UNIFIED IDEOGRAPH + {0xB798, 0x7A90}, //8942 #CJK UNIFIED IDEOGRAPH + {0xB799, 0x7A93}, //8943 #CJK UNIFIED IDEOGRAPH + {0xB79A, 0x7A94}, //8944 #CJK UNIFIED IDEOGRAPH + {0xB79B, 0x7A99}, //8945 #CJK UNIFIED IDEOGRAPH + {0xB79C, 0x7A9A}, //8946 #CJK UNIFIED IDEOGRAPH + {0xB79D, 0x7A9B}, //8947 #CJK UNIFIED IDEOGRAPH + {0xB79E, 0x7A9E}, //8948 #CJK UNIFIED IDEOGRAPH + {0xB79F, 0x7AA1}, //8949 #CJK UNIFIED IDEOGRAPH + {0xB7A0, 0x7AA2}, //8950 #CJK UNIFIED IDEOGRAPH + {0xB7A1, 0x8D30}, //8951 #CJK UNIFIED IDEOGRAPH + {0xB7A2, 0x53D1}, //8952 #CJK UNIFIED IDEOGRAPH + {0xB7A3, 0x7F5A}, //8953 #CJK UNIFIED IDEOGRAPH + {0xB7A4, 0x7B4F}, //8954 #CJK UNIFIED IDEOGRAPH + {0xB7A5, 0x4F10}, //8955 #CJK UNIFIED IDEOGRAPH + {0xB7A6, 0x4E4F}, //8956 #CJK UNIFIED IDEOGRAPH + {0xB7A7, 0x9600}, //8957 #CJK UNIFIED IDEOGRAPH + {0xB7A8, 0x6CD5}, //8958 #CJK UNIFIED IDEOGRAPH + {0xB7A9, 0x73D0}, //8959 #CJK UNIFIED IDEOGRAPH + {0xB7AA, 0x85E9}, //8960 #CJK UNIFIED IDEOGRAPH + {0xB7AB, 0x5E06}, //8961 #CJK UNIFIED IDEOGRAPH + {0xB7AC, 0x756A}, //8962 #CJK UNIFIED IDEOGRAPH + {0xB7AD, 0x7FFB}, //8963 #CJK UNIFIED IDEOGRAPH + {0xB7AE, 0x6A0A}, //8964 #CJK UNIFIED IDEOGRAPH + {0xB7AF, 0x77FE}, //8965 #CJK UNIFIED IDEOGRAPH + {0xB7B0, 0x9492}, //8966 #CJK UNIFIED IDEOGRAPH + {0xB7B1, 0x7E41}, //8967 #CJK UNIFIED IDEOGRAPH + {0xB7B2, 0x51E1}, //8968 #CJK UNIFIED IDEOGRAPH + {0xB7B3, 0x70E6}, //8969 #CJK UNIFIED IDEOGRAPH + {0xB7B4, 0x53CD}, //8970 #CJK UNIFIED IDEOGRAPH + {0xB7B5, 0x8FD4}, //8971 #CJK UNIFIED IDEOGRAPH + {0xB7B6, 0x8303}, //8972 #CJK UNIFIED IDEOGRAPH + {0xB7B7, 0x8D29}, //8973 #CJK UNIFIED IDEOGRAPH + {0xB7B8, 0x72AF}, //8974 #CJK UNIFIED IDEOGRAPH + {0xB7B9, 0x996D}, //8975 #CJK UNIFIED IDEOGRAPH + {0xB7BA, 0x6CDB}, //8976 #CJK UNIFIED IDEOGRAPH + {0xB7BB, 0x574A}, //8977 #CJK UNIFIED IDEOGRAPH + {0xB7BC, 0x82B3}, //8978 #CJK UNIFIED IDEOGRAPH + {0xB7BD, 0x65B9}, //8979 #CJK UNIFIED IDEOGRAPH + {0xB7BE, 0x80AA}, //8980 #CJK UNIFIED IDEOGRAPH + {0xB7BF, 0x623F}, //8981 #CJK UNIFIED IDEOGRAPH + {0xB7C0, 0x9632}, //8982 #CJK UNIFIED IDEOGRAPH + {0xB7C1, 0x59A8}, //8983 #CJK UNIFIED IDEOGRAPH + {0xB7C2, 0x4EFF}, //8984 #CJK UNIFIED IDEOGRAPH + {0xB7C3, 0x8BBF}, //8985 #CJK UNIFIED IDEOGRAPH + {0xB7C4, 0x7EBA}, //8986 #CJK UNIFIED IDEOGRAPH + {0xB7C5, 0x653E}, //8987 #CJK UNIFIED IDEOGRAPH + {0xB7C6, 0x83F2}, //8988 #CJK UNIFIED IDEOGRAPH + {0xB7C7, 0x975E}, //8989 #CJK UNIFIED IDEOGRAPH + {0xB7C8, 0x5561}, //8990 #CJK UNIFIED IDEOGRAPH + {0xB7C9, 0x98DE}, //8991 #CJK UNIFIED IDEOGRAPH + {0xB7CA, 0x80A5}, //8992 #CJK UNIFIED IDEOGRAPH + {0xB7CB, 0x532A}, //8993 #CJK UNIFIED IDEOGRAPH + {0xB7CC, 0x8BFD}, //8994 #CJK UNIFIED IDEOGRAPH + {0xB7CD, 0x5420}, //8995 #CJK UNIFIED IDEOGRAPH + {0xB7CE, 0x80BA}, //8996 #CJK UNIFIED IDEOGRAPH + {0xB7CF, 0x5E9F}, //8997 #CJK UNIFIED IDEOGRAPH + {0xB7D0, 0x6CB8}, //8998 #CJK UNIFIED IDEOGRAPH + {0xB7D1, 0x8D39}, //8999 #CJK UNIFIED IDEOGRAPH + {0xB7D2, 0x82AC}, //9000 #CJK UNIFIED IDEOGRAPH + {0xB7D3, 0x915A}, //9001 #CJK UNIFIED IDEOGRAPH + {0xB7D4, 0x5429}, //9002 #CJK UNIFIED IDEOGRAPH + {0xB7D5, 0x6C1B}, //9003 #CJK UNIFIED IDEOGRAPH + {0xB7D6, 0x5206}, //9004 #CJK UNIFIED IDEOGRAPH + {0xB7D7, 0x7EB7}, //9005 #CJK UNIFIED IDEOGRAPH + {0xB7D8, 0x575F}, //9006 #CJK UNIFIED IDEOGRAPH + {0xB7D9, 0x711A}, //9007 #CJK UNIFIED IDEOGRAPH + {0xB7DA, 0x6C7E}, //9008 #CJK UNIFIED IDEOGRAPH + {0xB7DB, 0x7C89}, //9009 #CJK UNIFIED IDEOGRAPH + {0xB7DC, 0x594B}, //9010 #CJK UNIFIED IDEOGRAPH + {0xB7DD, 0x4EFD}, //9011 #CJK UNIFIED IDEOGRAPH + {0xB7DE, 0x5FFF}, //9012 #CJK UNIFIED IDEOGRAPH + {0xB7DF, 0x6124}, //9013 #CJK UNIFIED IDEOGRAPH + {0xB7E0, 0x7CAA}, //9014 #CJK UNIFIED IDEOGRAPH + {0xB7E1, 0x4E30}, //9015 #CJK UNIFIED IDEOGRAPH + {0xB7E2, 0x5C01}, //9016 #CJK UNIFIED IDEOGRAPH + {0xB7E3, 0x67AB}, //9017 #CJK UNIFIED IDEOGRAPH + {0xB7E4, 0x8702}, //9018 #CJK UNIFIED IDEOGRAPH + {0xB7E5, 0x5CF0}, //9019 #CJK UNIFIED IDEOGRAPH + {0xB7E6, 0x950B}, //9020 #CJK UNIFIED IDEOGRAPH + {0xB7E7, 0x98CE}, //9021 #CJK UNIFIED IDEOGRAPH + {0xB7E8, 0x75AF}, //9022 #CJK UNIFIED IDEOGRAPH + {0xB7E9, 0x70FD}, //9023 #CJK UNIFIED IDEOGRAPH + {0xB7EA, 0x9022}, //9024 #CJK UNIFIED IDEOGRAPH + {0xB7EB, 0x51AF}, //9025 #CJK UNIFIED IDEOGRAPH + {0xB7EC, 0x7F1D}, //9026 #CJK UNIFIED IDEOGRAPH + {0xB7ED, 0x8BBD}, //9027 #CJK UNIFIED IDEOGRAPH + {0xB7EE, 0x5949}, //9028 #CJK UNIFIED IDEOGRAPH + {0xB7EF, 0x51E4}, //9029 #CJK UNIFIED IDEOGRAPH + {0xB7F0, 0x4F5B}, //9030 #CJK UNIFIED IDEOGRAPH + {0xB7F1, 0x5426}, //9031 #CJK UNIFIED IDEOGRAPH + {0xB7F2, 0x592B}, //9032 #CJK UNIFIED IDEOGRAPH + {0xB7F3, 0x6577}, //9033 #CJK UNIFIED IDEOGRAPH + {0xB7F4, 0x80A4}, //9034 #CJK UNIFIED IDEOGRAPH + {0xB7F5, 0x5B75}, //9035 #CJK UNIFIED IDEOGRAPH + {0xB7F6, 0x6276}, //9036 #CJK UNIFIED IDEOGRAPH + {0xB7F7, 0x62C2}, //9037 #CJK UNIFIED IDEOGRAPH + {0xB7F8, 0x8F90}, //9038 #CJK UNIFIED IDEOGRAPH + {0xB7F9, 0x5E45}, //9039 #CJK UNIFIED IDEOGRAPH + {0xB7FA, 0x6C1F}, //9040 #CJK UNIFIED IDEOGRAPH + {0xB7FB, 0x7B26}, //9041 #CJK UNIFIED IDEOGRAPH + {0xB7FC, 0x4F0F}, //9042 #CJK UNIFIED IDEOGRAPH + {0xB7FD, 0x4FD8}, //9043 #CJK UNIFIED IDEOGRAPH + {0xB7FE, 0x670D}, //9044 #CJK UNIFIED IDEOGRAPH + {0xB840, 0x7AA3}, //9045 #CJK UNIFIED IDEOGRAPH + {0xB841, 0x7AA4}, //9046 #CJK UNIFIED IDEOGRAPH + {0xB842, 0x7AA7}, //9047 #CJK UNIFIED IDEOGRAPH + {0xB843, 0x7AA9}, //9048 #CJK UNIFIED IDEOGRAPH + {0xB844, 0x7AAA}, //9049 #CJK UNIFIED IDEOGRAPH + {0xB845, 0x7AAB}, //9050 #CJK UNIFIED IDEOGRAPH + {0xB846, 0x7AAE}, //9051 #CJK UNIFIED IDEOGRAPH + {0xB847, 0x7AAF}, //9052 #CJK UNIFIED IDEOGRAPH + {0xB848, 0x7AB0}, //9053 #CJK UNIFIED IDEOGRAPH + {0xB849, 0x7AB1}, //9054 #CJK UNIFIED IDEOGRAPH + {0xB84A, 0x7AB2}, //9055 #CJK UNIFIED IDEOGRAPH + {0xB84B, 0x7AB4}, //9056 #CJK UNIFIED IDEOGRAPH + {0xB84C, 0x7AB5}, //9057 #CJK UNIFIED IDEOGRAPH + {0xB84D, 0x7AB6}, //9058 #CJK UNIFIED IDEOGRAPH + {0xB84E, 0x7AB7}, //9059 #CJK UNIFIED IDEOGRAPH + {0xB84F, 0x7AB8}, //9060 #CJK UNIFIED IDEOGRAPH + {0xB850, 0x7AB9}, //9061 #CJK UNIFIED IDEOGRAPH + {0xB851, 0x7ABA}, //9062 #CJK UNIFIED IDEOGRAPH + {0xB852, 0x7ABB}, //9063 #CJK UNIFIED IDEOGRAPH + {0xB853, 0x7ABC}, //9064 #CJK UNIFIED IDEOGRAPH + {0xB854, 0x7ABD}, //9065 #CJK UNIFIED IDEOGRAPH + {0xB855, 0x7ABE}, //9066 #CJK UNIFIED IDEOGRAPH + {0xB856, 0x7AC0}, //9067 #CJK UNIFIED IDEOGRAPH + {0xB857, 0x7AC1}, //9068 #CJK UNIFIED IDEOGRAPH + {0xB858, 0x7AC2}, //9069 #CJK UNIFIED IDEOGRAPH + {0xB859, 0x7AC3}, //9070 #CJK UNIFIED IDEOGRAPH + {0xB85A, 0x7AC4}, //9071 #CJK UNIFIED IDEOGRAPH + {0xB85B, 0x7AC5}, //9072 #CJK UNIFIED IDEOGRAPH + {0xB85C, 0x7AC6}, //9073 #CJK UNIFIED IDEOGRAPH + {0xB85D, 0x7AC7}, //9074 #CJK UNIFIED IDEOGRAPH + {0xB85E, 0x7AC8}, //9075 #CJK UNIFIED IDEOGRAPH + {0xB85F, 0x7AC9}, //9076 #CJK UNIFIED IDEOGRAPH + {0xB860, 0x7ACA}, //9077 #CJK UNIFIED IDEOGRAPH + {0xB861, 0x7ACC}, //9078 #CJK UNIFIED IDEOGRAPH + {0xB862, 0x7ACD}, //9079 #CJK UNIFIED IDEOGRAPH + {0xB863, 0x7ACE}, //9080 #CJK UNIFIED IDEOGRAPH + {0xB864, 0x7ACF}, //9081 #CJK UNIFIED IDEOGRAPH + {0xB865, 0x7AD0}, //9082 #CJK UNIFIED IDEOGRAPH + {0xB866, 0x7AD1}, //9083 #CJK UNIFIED IDEOGRAPH + {0xB867, 0x7AD2}, //9084 #CJK UNIFIED IDEOGRAPH + {0xB868, 0x7AD3}, //9085 #CJK UNIFIED IDEOGRAPH + {0xB869, 0x7AD4}, //9086 #CJK UNIFIED IDEOGRAPH + {0xB86A, 0x7AD5}, //9087 #CJK UNIFIED IDEOGRAPH + {0xB86B, 0x7AD7}, //9088 #CJK UNIFIED IDEOGRAPH + {0xB86C, 0x7AD8}, //9089 #CJK UNIFIED IDEOGRAPH + {0xB86D, 0x7ADA}, //9090 #CJK UNIFIED IDEOGRAPH + {0xB86E, 0x7ADB}, //9091 #CJK UNIFIED IDEOGRAPH + {0xB86F, 0x7ADC}, //9092 #CJK UNIFIED IDEOGRAPH + {0xB870, 0x7ADD}, //9093 #CJK UNIFIED IDEOGRAPH + {0xB871, 0x7AE1}, //9094 #CJK UNIFIED IDEOGRAPH + {0xB872, 0x7AE2}, //9095 #CJK UNIFIED IDEOGRAPH + {0xB873, 0x7AE4}, //9096 #CJK UNIFIED IDEOGRAPH + {0xB874, 0x7AE7}, //9097 #CJK UNIFIED IDEOGRAPH + {0xB875, 0x7AE8}, //9098 #CJK UNIFIED IDEOGRAPH + {0xB876, 0x7AE9}, //9099 #CJK UNIFIED IDEOGRAPH + {0xB877, 0x7AEA}, //9100 #CJK UNIFIED IDEOGRAPH + {0xB878, 0x7AEB}, //9101 #CJK UNIFIED IDEOGRAPH + {0xB879, 0x7AEC}, //9102 #CJK UNIFIED IDEOGRAPH + {0xB87A, 0x7AEE}, //9103 #CJK UNIFIED IDEOGRAPH + {0xB87B, 0x7AF0}, //9104 #CJK UNIFIED IDEOGRAPH + {0xB87C, 0x7AF1}, //9105 #CJK UNIFIED IDEOGRAPH + {0xB87D, 0x7AF2}, //9106 #CJK UNIFIED IDEOGRAPH + {0xB87E, 0x7AF3}, //9107 #CJK UNIFIED IDEOGRAPH + {0xB880, 0x7AF4}, //9108 #CJK UNIFIED IDEOGRAPH + {0xB881, 0x7AF5}, //9109 #CJK UNIFIED IDEOGRAPH + {0xB882, 0x7AF6}, //9110 #CJK UNIFIED IDEOGRAPH + {0xB883, 0x7AF7}, //9111 #CJK UNIFIED IDEOGRAPH + {0xB884, 0x7AF8}, //9112 #CJK UNIFIED IDEOGRAPH + {0xB885, 0x7AFB}, //9113 #CJK UNIFIED IDEOGRAPH + {0xB886, 0x7AFC}, //9114 #CJK UNIFIED IDEOGRAPH + {0xB887, 0x7AFE}, //9115 #CJK UNIFIED IDEOGRAPH + {0xB888, 0x7B00}, //9116 #CJK UNIFIED IDEOGRAPH + {0xB889, 0x7B01}, //9117 #CJK UNIFIED IDEOGRAPH + {0xB88A, 0x7B02}, //9118 #CJK UNIFIED IDEOGRAPH + {0xB88B, 0x7B05}, //9119 #CJK UNIFIED IDEOGRAPH + {0xB88C, 0x7B07}, //9120 #CJK UNIFIED IDEOGRAPH + {0xB88D, 0x7B09}, //9121 #CJK UNIFIED IDEOGRAPH + {0xB88E, 0x7B0C}, //9122 #CJK UNIFIED IDEOGRAPH + {0xB88F, 0x7B0D}, //9123 #CJK UNIFIED IDEOGRAPH + {0xB890, 0x7B0E}, //9124 #CJK UNIFIED IDEOGRAPH + {0xB891, 0x7B10}, //9125 #CJK UNIFIED IDEOGRAPH + {0xB892, 0x7B12}, //9126 #CJK UNIFIED IDEOGRAPH + {0xB893, 0x7B13}, //9127 #CJK UNIFIED IDEOGRAPH + {0xB894, 0x7B16}, //9128 #CJK UNIFIED IDEOGRAPH + {0xB895, 0x7B17}, //9129 #CJK UNIFIED IDEOGRAPH + {0xB896, 0x7B18}, //9130 #CJK UNIFIED IDEOGRAPH + {0xB897, 0x7B1A}, //9131 #CJK UNIFIED IDEOGRAPH + {0xB898, 0x7B1C}, //9132 #CJK UNIFIED IDEOGRAPH + {0xB899, 0x7B1D}, //9133 #CJK UNIFIED IDEOGRAPH + {0xB89A, 0x7B1F}, //9134 #CJK UNIFIED IDEOGRAPH + {0xB89B, 0x7B21}, //9135 #CJK UNIFIED IDEOGRAPH + {0xB89C, 0x7B22}, //9136 #CJK UNIFIED IDEOGRAPH + {0xB89D, 0x7B23}, //9137 #CJK UNIFIED IDEOGRAPH + {0xB89E, 0x7B27}, //9138 #CJK UNIFIED IDEOGRAPH + {0xB89F, 0x7B29}, //9139 #CJK UNIFIED IDEOGRAPH + {0xB8A0, 0x7B2D}, //9140 #CJK UNIFIED IDEOGRAPH + {0xB8A1, 0x6D6E}, //9141 #CJK UNIFIED IDEOGRAPH + {0xB8A2, 0x6DAA}, //9142 #CJK UNIFIED IDEOGRAPH + {0xB8A3, 0x798F}, //9143 #CJK UNIFIED IDEOGRAPH + {0xB8A4, 0x88B1}, //9144 #CJK UNIFIED IDEOGRAPH + {0xB8A5, 0x5F17}, //9145 #CJK UNIFIED IDEOGRAPH + {0xB8A6, 0x752B}, //9146 #CJK UNIFIED IDEOGRAPH + {0xB8A7, 0x629A}, //9147 #CJK UNIFIED IDEOGRAPH + {0xB8A8, 0x8F85}, //9148 #CJK UNIFIED IDEOGRAPH + {0xB8A9, 0x4FEF}, //9149 #CJK UNIFIED IDEOGRAPH + {0xB8AA, 0x91DC}, //9150 #CJK UNIFIED IDEOGRAPH + {0xB8AB, 0x65A7}, //9151 #CJK UNIFIED IDEOGRAPH + {0xB8AC, 0x812F}, //9152 #CJK UNIFIED IDEOGRAPH + {0xB8AD, 0x8151}, //9153 #CJK UNIFIED IDEOGRAPH + {0xB8AE, 0x5E9C}, //9154 #CJK UNIFIED IDEOGRAPH + {0xB8AF, 0x8150}, //9155 #CJK UNIFIED IDEOGRAPH + {0xB8B0, 0x8D74}, //9156 #CJK UNIFIED IDEOGRAPH + {0xB8B1, 0x526F}, //9157 #CJK UNIFIED IDEOGRAPH + {0xB8B2, 0x8986}, //9158 #CJK UNIFIED IDEOGRAPH + {0xB8B3, 0x8D4B}, //9159 #CJK UNIFIED IDEOGRAPH + {0xB8B4, 0x590D}, //9160 #CJK UNIFIED IDEOGRAPH + {0xB8B5, 0x5085}, //9161 #CJK UNIFIED IDEOGRAPH + {0xB8B6, 0x4ED8}, //9162 #CJK UNIFIED IDEOGRAPH + {0xB8B7, 0x961C}, //9163 #CJK UNIFIED IDEOGRAPH + {0xB8B8, 0x7236}, //9164 #CJK UNIFIED IDEOGRAPH + {0xB8B9, 0x8179}, //9165 #CJK UNIFIED IDEOGRAPH + {0xB8BA, 0x8D1F}, //9166 #CJK UNIFIED IDEOGRAPH + {0xB8BB, 0x5BCC}, //9167 #CJK UNIFIED IDEOGRAPH + {0xB8BC, 0x8BA3}, //9168 #CJK UNIFIED IDEOGRAPH + {0xB8BD, 0x9644}, //9169 #CJK UNIFIED IDEOGRAPH + {0xB8BE, 0x5987}, //9170 #CJK UNIFIED IDEOGRAPH + {0xB8BF, 0x7F1A}, //9171 #CJK UNIFIED IDEOGRAPH + {0xB8C0, 0x5490}, //9172 #CJK UNIFIED IDEOGRAPH + {0xB8C1, 0x5676}, //9173 #CJK UNIFIED IDEOGRAPH + {0xB8C2, 0x560E}, //9174 #CJK UNIFIED IDEOGRAPH + {0xB8C3, 0x8BE5}, //9175 #CJK UNIFIED IDEOGRAPH + {0xB8C4, 0x6539}, //9176 #CJK UNIFIED IDEOGRAPH + {0xB8C5, 0x6982}, //9177 #CJK UNIFIED IDEOGRAPH + {0xB8C6, 0x9499}, //9178 #CJK UNIFIED IDEOGRAPH + {0xB8C7, 0x76D6}, //9179 #CJK UNIFIED IDEOGRAPH + {0xB8C8, 0x6E89}, //9180 #CJK UNIFIED IDEOGRAPH + {0xB8C9, 0x5E72}, //9181 #CJK UNIFIED IDEOGRAPH + {0xB8CA, 0x7518}, //9182 #CJK UNIFIED IDEOGRAPH + {0xB8CB, 0x6746}, //9183 #CJK UNIFIED IDEOGRAPH + {0xB8CC, 0x67D1}, //9184 #CJK UNIFIED IDEOGRAPH + {0xB8CD, 0x7AFF}, //9185 #CJK UNIFIED IDEOGRAPH + {0xB8CE, 0x809D}, //9186 #CJK UNIFIED IDEOGRAPH + {0xB8CF, 0x8D76}, //9187 #CJK UNIFIED IDEOGRAPH + {0xB8D0, 0x611F}, //9188 #CJK UNIFIED IDEOGRAPH + {0xB8D1, 0x79C6}, //9189 #CJK UNIFIED IDEOGRAPH + {0xB8D2, 0x6562}, //9190 #CJK UNIFIED IDEOGRAPH + {0xB8D3, 0x8D63}, //9191 #CJK UNIFIED IDEOGRAPH + {0xB8D4, 0x5188}, //9192 #CJK UNIFIED IDEOGRAPH + {0xB8D5, 0x521A}, //9193 #CJK UNIFIED IDEOGRAPH + {0xB8D6, 0x94A2}, //9194 #CJK UNIFIED IDEOGRAPH + {0xB8D7, 0x7F38}, //9195 #CJK UNIFIED IDEOGRAPH + {0xB8D8, 0x809B}, //9196 #CJK UNIFIED IDEOGRAPH + {0xB8D9, 0x7EB2}, //9197 #CJK UNIFIED IDEOGRAPH + {0xB8DA, 0x5C97}, //9198 #CJK UNIFIED IDEOGRAPH + {0xB8DB, 0x6E2F}, //9199 #CJK UNIFIED IDEOGRAPH + {0xB8DC, 0x6760}, //9200 #CJK UNIFIED IDEOGRAPH + {0xB8DD, 0x7BD9}, //9201 #CJK UNIFIED IDEOGRAPH + {0xB8DE, 0x768B}, //9202 #CJK UNIFIED IDEOGRAPH + {0xB8DF, 0x9AD8}, //9203 #CJK UNIFIED IDEOGRAPH + {0xB8E0, 0x818F}, //9204 #CJK UNIFIED IDEOGRAPH + {0xB8E1, 0x7F94}, //9205 #CJK UNIFIED IDEOGRAPH + {0xB8E2, 0x7CD5}, //9206 #CJK UNIFIED IDEOGRAPH + {0xB8E3, 0x641E}, //9207 #CJK UNIFIED IDEOGRAPH + {0xB8E4, 0x9550}, //9208 #CJK UNIFIED IDEOGRAPH + {0xB8E5, 0x7A3F}, //9209 #CJK UNIFIED IDEOGRAPH + {0xB8E6, 0x544A}, //9210 #CJK UNIFIED IDEOGRAPH + {0xB8E7, 0x54E5}, //9211 #CJK UNIFIED IDEOGRAPH + {0xB8E8, 0x6B4C}, //9212 #CJK UNIFIED IDEOGRAPH + {0xB8E9, 0x6401}, //9213 #CJK UNIFIED IDEOGRAPH + {0xB8EA, 0x6208}, //9214 #CJK UNIFIED IDEOGRAPH + {0xB8EB, 0x9E3D}, //9215 #CJK UNIFIED IDEOGRAPH + {0xB8EC, 0x80F3}, //9216 #CJK UNIFIED IDEOGRAPH + {0xB8ED, 0x7599}, //9217 #CJK UNIFIED IDEOGRAPH + {0xB8EE, 0x5272}, //9218 #CJK UNIFIED IDEOGRAPH + {0xB8EF, 0x9769}, //9219 #CJK UNIFIED IDEOGRAPH + {0xB8F0, 0x845B}, //9220 #CJK UNIFIED IDEOGRAPH + {0xB8F1, 0x683C}, //9221 #CJK UNIFIED IDEOGRAPH + {0xB8F2, 0x86E4}, //9222 #CJK UNIFIED IDEOGRAPH + {0xB8F3, 0x9601}, //9223 #CJK UNIFIED IDEOGRAPH + {0xB8F4, 0x9694}, //9224 #CJK UNIFIED IDEOGRAPH + {0xB8F5, 0x94EC}, //9225 #CJK UNIFIED IDEOGRAPH + {0xB8F6, 0x4E2A}, //9226 #CJK UNIFIED IDEOGRAPH + {0xB8F7, 0x5404}, //9227 #CJK UNIFIED IDEOGRAPH + {0xB8F8, 0x7ED9}, //9228 #CJK UNIFIED IDEOGRAPH + {0xB8F9, 0x6839}, //9229 #CJK UNIFIED IDEOGRAPH + {0xB8FA, 0x8DDF}, //9230 #CJK UNIFIED IDEOGRAPH + {0xB8FB, 0x8015}, //9231 #CJK UNIFIED IDEOGRAPH + {0xB8FC, 0x66F4}, //9232 #CJK UNIFIED IDEOGRAPH + {0xB8FD, 0x5E9A}, //9233 #CJK UNIFIED IDEOGRAPH + {0xB8FE, 0x7FB9}, //9234 #CJK UNIFIED IDEOGRAPH + {0xB940, 0x7B2F}, //9235 #CJK UNIFIED IDEOGRAPH + {0xB941, 0x7B30}, //9236 #CJK UNIFIED IDEOGRAPH + {0xB942, 0x7B32}, //9237 #CJK UNIFIED IDEOGRAPH + {0xB943, 0x7B34}, //9238 #CJK UNIFIED IDEOGRAPH + {0xB944, 0x7B35}, //9239 #CJK UNIFIED IDEOGRAPH + {0xB945, 0x7B36}, //9240 #CJK UNIFIED IDEOGRAPH + {0xB946, 0x7B37}, //9241 #CJK UNIFIED IDEOGRAPH + {0xB947, 0x7B39}, //9242 #CJK UNIFIED IDEOGRAPH + {0xB948, 0x7B3B}, //9243 #CJK UNIFIED IDEOGRAPH + {0xB949, 0x7B3D}, //9244 #CJK UNIFIED IDEOGRAPH + {0xB94A, 0x7B3F}, //9245 #CJK UNIFIED IDEOGRAPH + {0xB94B, 0x7B40}, //9246 #CJK UNIFIED IDEOGRAPH + {0xB94C, 0x7B41}, //9247 #CJK UNIFIED IDEOGRAPH + {0xB94D, 0x7B42}, //9248 #CJK UNIFIED IDEOGRAPH + {0xB94E, 0x7B43}, //9249 #CJK UNIFIED IDEOGRAPH + {0xB94F, 0x7B44}, //9250 #CJK UNIFIED IDEOGRAPH + {0xB950, 0x7B46}, //9251 #CJK UNIFIED IDEOGRAPH + {0xB951, 0x7B48}, //9252 #CJK UNIFIED IDEOGRAPH + {0xB952, 0x7B4A}, //9253 #CJK UNIFIED IDEOGRAPH + {0xB953, 0x7B4D}, //9254 #CJK UNIFIED IDEOGRAPH + {0xB954, 0x7B4E}, //9255 #CJK UNIFIED IDEOGRAPH + {0xB955, 0x7B53}, //9256 #CJK UNIFIED IDEOGRAPH + {0xB956, 0x7B55}, //9257 #CJK UNIFIED IDEOGRAPH + {0xB957, 0x7B57}, //9258 #CJK UNIFIED IDEOGRAPH + {0xB958, 0x7B59}, //9259 #CJK UNIFIED IDEOGRAPH + {0xB959, 0x7B5C}, //9260 #CJK UNIFIED IDEOGRAPH + {0xB95A, 0x7B5E}, //9261 #CJK UNIFIED IDEOGRAPH + {0xB95B, 0x7B5F}, //9262 #CJK UNIFIED IDEOGRAPH + {0xB95C, 0x7B61}, //9263 #CJK UNIFIED IDEOGRAPH + {0xB95D, 0x7B63}, //9264 #CJK UNIFIED IDEOGRAPH + {0xB95E, 0x7B64}, //9265 #CJK UNIFIED IDEOGRAPH + {0xB95F, 0x7B65}, //9266 #CJK UNIFIED IDEOGRAPH + {0xB960, 0x7B66}, //9267 #CJK UNIFIED IDEOGRAPH + {0xB961, 0x7B67}, //9268 #CJK UNIFIED IDEOGRAPH + {0xB962, 0x7B68}, //9269 #CJK UNIFIED IDEOGRAPH + {0xB963, 0x7B69}, //9270 #CJK UNIFIED IDEOGRAPH + {0xB964, 0x7B6A}, //9271 #CJK UNIFIED IDEOGRAPH + {0xB965, 0x7B6B}, //9272 #CJK UNIFIED IDEOGRAPH + {0xB966, 0x7B6C}, //9273 #CJK UNIFIED IDEOGRAPH + {0xB967, 0x7B6D}, //9274 #CJK UNIFIED IDEOGRAPH + {0xB968, 0x7B6F}, //9275 #CJK UNIFIED IDEOGRAPH + {0xB969, 0x7B70}, //9276 #CJK UNIFIED IDEOGRAPH + {0xB96A, 0x7B73}, //9277 #CJK UNIFIED IDEOGRAPH + {0xB96B, 0x7B74}, //9278 #CJK UNIFIED IDEOGRAPH + {0xB96C, 0x7B76}, //9279 #CJK UNIFIED IDEOGRAPH + {0xB96D, 0x7B78}, //9280 #CJK UNIFIED IDEOGRAPH + {0xB96E, 0x7B7A}, //9281 #CJK UNIFIED IDEOGRAPH + {0xB96F, 0x7B7C}, //9282 #CJK UNIFIED IDEOGRAPH + {0xB970, 0x7B7D}, //9283 #CJK UNIFIED IDEOGRAPH + {0xB971, 0x7B7F}, //9284 #CJK UNIFIED IDEOGRAPH + {0xB972, 0x7B81}, //9285 #CJK UNIFIED IDEOGRAPH + {0xB973, 0x7B82}, //9286 #CJK UNIFIED IDEOGRAPH + {0xB974, 0x7B83}, //9287 #CJK UNIFIED IDEOGRAPH + {0xB975, 0x7B84}, //9288 #CJK UNIFIED IDEOGRAPH + {0xB976, 0x7B86}, //9289 #CJK UNIFIED IDEOGRAPH + {0xB977, 0x7B87}, //9290 #CJK UNIFIED IDEOGRAPH + {0xB978, 0x7B88}, //9291 #CJK UNIFIED IDEOGRAPH + {0xB979, 0x7B89}, //9292 #CJK UNIFIED IDEOGRAPH + {0xB97A, 0x7B8A}, //9293 #CJK UNIFIED IDEOGRAPH + {0xB97B, 0x7B8B}, //9294 #CJK UNIFIED IDEOGRAPH + {0xB97C, 0x7B8C}, //9295 #CJK UNIFIED IDEOGRAPH + {0xB97D, 0x7B8E}, //9296 #CJK UNIFIED IDEOGRAPH + {0xB97E, 0x7B8F}, //9297 #CJK UNIFIED IDEOGRAPH + {0xB980, 0x7B91}, //9298 #CJK UNIFIED IDEOGRAPH + {0xB981, 0x7B92}, //9299 #CJK UNIFIED IDEOGRAPH + {0xB982, 0x7B93}, //9300 #CJK UNIFIED IDEOGRAPH + {0xB983, 0x7B96}, //9301 #CJK UNIFIED IDEOGRAPH + {0xB984, 0x7B98}, //9302 #CJK UNIFIED IDEOGRAPH + {0xB985, 0x7B99}, //9303 #CJK UNIFIED IDEOGRAPH + {0xB986, 0x7B9A}, //9304 #CJK UNIFIED IDEOGRAPH + {0xB987, 0x7B9B}, //9305 #CJK UNIFIED IDEOGRAPH + {0xB988, 0x7B9E}, //9306 #CJK UNIFIED IDEOGRAPH + {0xB989, 0x7B9F}, //9307 #CJK UNIFIED IDEOGRAPH + {0xB98A, 0x7BA0}, //9308 #CJK UNIFIED IDEOGRAPH + {0xB98B, 0x7BA3}, //9309 #CJK UNIFIED IDEOGRAPH + {0xB98C, 0x7BA4}, //9310 #CJK UNIFIED IDEOGRAPH + {0xB98D, 0x7BA5}, //9311 #CJK UNIFIED IDEOGRAPH + {0xB98E, 0x7BAE}, //9312 #CJK UNIFIED IDEOGRAPH + {0xB98F, 0x7BAF}, //9313 #CJK UNIFIED IDEOGRAPH + {0xB990, 0x7BB0}, //9314 #CJK UNIFIED IDEOGRAPH + {0xB991, 0x7BB2}, //9315 #CJK UNIFIED IDEOGRAPH + {0xB992, 0x7BB3}, //9316 #CJK UNIFIED IDEOGRAPH + {0xB993, 0x7BB5}, //9317 #CJK UNIFIED IDEOGRAPH + {0xB994, 0x7BB6}, //9318 #CJK UNIFIED IDEOGRAPH + {0xB995, 0x7BB7}, //9319 #CJK UNIFIED IDEOGRAPH + {0xB996, 0x7BB9}, //9320 #CJK UNIFIED IDEOGRAPH + {0xB997, 0x7BBA}, //9321 #CJK UNIFIED IDEOGRAPH + {0xB998, 0x7BBB}, //9322 #CJK UNIFIED IDEOGRAPH + {0xB999, 0x7BBC}, //9323 #CJK UNIFIED IDEOGRAPH + {0xB99A, 0x7BBD}, //9324 #CJK UNIFIED IDEOGRAPH + {0xB99B, 0x7BBE}, //9325 #CJK UNIFIED IDEOGRAPH + {0xB99C, 0x7BBF}, //9326 #CJK UNIFIED IDEOGRAPH + {0xB99D, 0x7BC0}, //9327 #CJK UNIFIED IDEOGRAPH + {0xB99E, 0x7BC2}, //9328 #CJK UNIFIED IDEOGRAPH + {0xB99F, 0x7BC3}, //9329 #CJK UNIFIED IDEOGRAPH + {0xB9A0, 0x7BC4}, //9330 #CJK UNIFIED IDEOGRAPH + {0xB9A1, 0x57C2}, //9331 #CJK UNIFIED IDEOGRAPH + {0xB9A2, 0x803F}, //9332 #CJK UNIFIED IDEOGRAPH + {0xB9A3, 0x6897}, //9333 #CJK UNIFIED IDEOGRAPH + {0xB9A4, 0x5DE5}, //9334 #CJK UNIFIED IDEOGRAPH + {0xB9A5, 0x653B}, //9335 #CJK UNIFIED IDEOGRAPH + {0xB9A6, 0x529F}, //9336 #CJK UNIFIED IDEOGRAPH + {0xB9A7, 0x606D}, //9337 #CJK UNIFIED IDEOGRAPH + {0xB9A8, 0x9F9A}, //9338 #CJK UNIFIED IDEOGRAPH + {0xB9A9, 0x4F9B}, //9339 #CJK UNIFIED IDEOGRAPH + {0xB9AA, 0x8EAC}, //9340 #CJK UNIFIED IDEOGRAPH + {0xB9AB, 0x516C}, //9341 #CJK UNIFIED IDEOGRAPH + {0xB9AC, 0x5BAB}, //9342 #CJK UNIFIED IDEOGRAPH + {0xB9AD, 0x5F13}, //9343 #CJK UNIFIED IDEOGRAPH + {0xB9AE, 0x5DE9}, //9344 #CJK UNIFIED IDEOGRAPH + {0xB9AF, 0x6C5E}, //9345 #CJK UNIFIED IDEOGRAPH + {0xB9B0, 0x62F1}, //9346 #CJK UNIFIED IDEOGRAPH + {0xB9B1, 0x8D21}, //9347 #CJK UNIFIED IDEOGRAPH + {0xB9B2, 0x5171}, //9348 #CJK UNIFIED IDEOGRAPH + {0xB9B3, 0x94A9}, //9349 #CJK UNIFIED IDEOGRAPH + {0xB9B4, 0x52FE}, //9350 #CJK UNIFIED IDEOGRAPH + {0xB9B5, 0x6C9F}, //9351 #CJK UNIFIED IDEOGRAPH + {0xB9B6, 0x82DF}, //9352 #CJK UNIFIED IDEOGRAPH + {0xB9B7, 0x72D7}, //9353 #CJK UNIFIED IDEOGRAPH + {0xB9B8, 0x57A2}, //9354 #CJK UNIFIED IDEOGRAPH + {0xB9B9, 0x6784}, //9355 #CJK UNIFIED IDEOGRAPH + {0xB9BA, 0x8D2D}, //9356 #CJK UNIFIED IDEOGRAPH + {0xB9BB, 0x591F}, //9357 #CJK UNIFIED IDEOGRAPH + {0xB9BC, 0x8F9C}, //9358 #CJK UNIFIED IDEOGRAPH + {0xB9BD, 0x83C7}, //9359 #CJK UNIFIED IDEOGRAPH + {0xB9BE, 0x5495}, //9360 #CJK UNIFIED IDEOGRAPH + {0xB9BF, 0x7B8D}, //9361 #CJK UNIFIED IDEOGRAPH + {0xB9C0, 0x4F30}, //9362 #CJK UNIFIED IDEOGRAPH + {0xB9C1, 0x6CBD}, //9363 #CJK UNIFIED IDEOGRAPH + {0xB9C2, 0x5B64}, //9364 #CJK UNIFIED IDEOGRAPH + {0xB9C3, 0x59D1}, //9365 #CJK UNIFIED IDEOGRAPH + {0xB9C4, 0x9F13}, //9366 #CJK UNIFIED IDEOGRAPH + {0xB9C5, 0x53E4}, //9367 #CJK UNIFIED IDEOGRAPH + {0xB9C6, 0x86CA}, //9368 #CJK UNIFIED IDEOGRAPH + {0xB9C7, 0x9AA8}, //9369 #CJK UNIFIED IDEOGRAPH + {0xB9C8, 0x8C37}, //9370 #CJK UNIFIED IDEOGRAPH + {0xB9C9, 0x80A1}, //9371 #CJK UNIFIED IDEOGRAPH + {0xB9CA, 0x6545}, //9372 #CJK UNIFIED IDEOGRAPH + {0xB9CB, 0x987E}, //9373 #CJK UNIFIED IDEOGRAPH + {0xB9CC, 0x56FA}, //9374 #CJK UNIFIED IDEOGRAPH + {0xB9CD, 0x96C7}, //9375 #CJK UNIFIED IDEOGRAPH + {0xB9CE, 0x522E}, //9376 #CJK UNIFIED IDEOGRAPH + {0xB9CF, 0x74DC}, //9377 #CJK UNIFIED IDEOGRAPH + {0xB9D0, 0x5250}, //9378 #CJK UNIFIED IDEOGRAPH + {0xB9D1, 0x5BE1}, //9379 #CJK UNIFIED IDEOGRAPH + {0xB9D2, 0x6302}, //9380 #CJK UNIFIED IDEOGRAPH + {0xB9D3, 0x8902}, //9381 #CJK UNIFIED IDEOGRAPH + {0xB9D4, 0x4E56}, //9382 #CJK UNIFIED IDEOGRAPH + {0xB9D5, 0x62D0}, //9383 #CJK UNIFIED IDEOGRAPH + {0xB9D6, 0x602A}, //9384 #CJK UNIFIED IDEOGRAPH + {0xB9D7, 0x68FA}, //9385 #CJK UNIFIED IDEOGRAPH + {0xB9D8, 0x5173}, //9386 #CJK UNIFIED IDEOGRAPH + {0xB9D9, 0x5B98}, //9387 #CJK UNIFIED IDEOGRAPH + {0xB9DA, 0x51A0}, //9388 #CJK UNIFIED IDEOGRAPH + {0xB9DB, 0x89C2}, //9389 #CJK UNIFIED IDEOGRAPH + {0xB9DC, 0x7BA1}, //9390 #CJK UNIFIED IDEOGRAPH + {0xB9DD, 0x9986}, //9391 #CJK UNIFIED IDEOGRAPH + {0xB9DE, 0x7F50}, //9392 #CJK UNIFIED IDEOGRAPH + {0xB9DF, 0x60EF}, //9393 #CJK UNIFIED IDEOGRAPH + {0xB9E0, 0x704C}, //9394 #CJK UNIFIED IDEOGRAPH + {0xB9E1, 0x8D2F}, //9395 #CJK UNIFIED IDEOGRAPH + {0xB9E2, 0x5149}, //9396 #CJK UNIFIED IDEOGRAPH + {0xB9E3, 0x5E7F}, //9397 #CJK UNIFIED IDEOGRAPH + {0xB9E4, 0x901B}, //9398 #CJK UNIFIED IDEOGRAPH + {0xB9E5, 0x7470}, //9399 #CJK UNIFIED IDEOGRAPH + {0xB9E6, 0x89C4}, //9400 #CJK UNIFIED IDEOGRAPH + {0xB9E7, 0x572D}, //9401 #CJK UNIFIED IDEOGRAPH + {0xB9E8, 0x7845}, //9402 #CJK UNIFIED IDEOGRAPH + {0xB9E9, 0x5F52}, //9403 #CJK UNIFIED IDEOGRAPH + {0xB9EA, 0x9F9F}, //9404 #CJK UNIFIED IDEOGRAPH + {0xB9EB, 0x95FA}, //9405 #CJK UNIFIED IDEOGRAPH + {0xB9EC, 0x8F68}, //9406 #CJK UNIFIED IDEOGRAPH + {0xB9ED, 0x9B3C}, //9407 #CJK UNIFIED IDEOGRAPH + {0xB9EE, 0x8BE1}, //9408 #CJK UNIFIED IDEOGRAPH + {0xB9EF, 0x7678}, //9409 #CJK UNIFIED IDEOGRAPH + {0xB9F0, 0x6842}, //9410 #CJK UNIFIED IDEOGRAPH + {0xB9F1, 0x67DC}, //9411 #CJK UNIFIED IDEOGRAPH + {0xB9F2, 0x8DEA}, //9412 #CJK UNIFIED IDEOGRAPH + {0xB9F3, 0x8D35}, //9413 #CJK UNIFIED IDEOGRAPH + {0xB9F4, 0x523D}, //9414 #CJK UNIFIED IDEOGRAPH + {0xB9F5, 0x8F8A}, //9415 #CJK UNIFIED IDEOGRAPH + {0xB9F6, 0x6EDA}, //9416 #CJK UNIFIED IDEOGRAPH + {0xB9F7, 0x68CD}, //9417 #CJK UNIFIED IDEOGRAPH + {0xB9F8, 0x9505}, //9418 #CJK UNIFIED IDEOGRAPH + {0xB9F9, 0x90ED}, //9419 #CJK UNIFIED IDEOGRAPH + {0xB9FA, 0x56FD}, //9420 #CJK UNIFIED IDEOGRAPH + {0xB9FB, 0x679C}, //9421 #CJK UNIFIED IDEOGRAPH + {0xB9FC, 0x88F9}, //9422 #CJK UNIFIED IDEOGRAPH + {0xB9FD, 0x8FC7}, //9423 #CJK UNIFIED IDEOGRAPH + {0xB9FE, 0x54C8}, //9424 #CJK UNIFIED IDEOGRAPH + {0xBA40, 0x7BC5}, //9425 #CJK UNIFIED IDEOGRAPH + {0xBA41, 0x7BC8}, //9426 #CJK UNIFIED IDEOGRAPH + {0xBA42, 0x7BC9}, //9427 #CJK UNIFIED IDEOGRAPH + {0xBA43, 0x7BCA}, //9428 #CJK UNIFIED IDEOGRAPH + {0xBA44, 0x7BCB}, //9429 #CJK UNIFIED IDEOGRAPH + {0xBA45, 0x7BCD}, //9430 #CJK UNIFIED IDEOGRAPH + {0xBA46, 0x7BCE}, //9431 #CJK UNIFIED IDEOGRAPH + {0xBA47, 0x7BCF}, //9432 #CJK UNIFIED IDEOGRAPH + {0xBA48, 0x7BD0}, //9433 #CJK UNIFIED IDEOGRAPH + {0xBA49, 0x7BD2}, //9434 #CJK UNIFIED IDEOGRAPH + {0xBA4A, 0x7BD4}, //9435 #CJK UNIFIED IDEOGRAPH + {0xBA4B, 0x7BD5}, //9436 #CJK UNIFIED IDEOGRAPH + {0xBA4C, 0x7BD6}, //9437 #CJK UNIFIED IDEOGRAPH + {0xBA4D, 0x7BD7}, //9438 #CJK UNIFIED IDEOGRAPH + {0xBA4E, 0x7BD8}, //9439 #CJK UNIFIED IDEOGRAPH + {0xBA4F, 0x7BDB}, //9440 #CJK UNIFIED IDEOGRAPH + {0xBA50, 0x7BDC}, //9441 #CJK UNIFIED IDEOGRAPH + {0xBA51, 0x7BDE}, //9442 #CJK UNIFIED IDEOGRAPH + {0xBA52, 0x7BDF}, //9443 #CJK UNIFIED IDEOGRAPH + {0xBA53, 0x7BE0}, //9444 #CJK UNIFIED IDEOGRAPH + {0xBA54, 0x7BE2}, //9445 #CJK UNIFIED IDEOGRAPH + {0xBA55, 0x7BE3}, //9446 #CJK UNIFIED IDEOGRAPH + {0xBA56, 0x7BE4}, //9447 #CJK UNIFIED IDEOGRAPH + {0xBA57, 0x7BE7}, //9448 #CJK UNIFIED IDEOGRAPH + {0xBA58, 0x7BE8}, //9449 #CJK UNIFIED IDEOGRAPH + {0xBA59, 0x7BE9}, //9450 #CJK UNIFIED IDEOGRAPH + {0xBA5A, 0x7BEB}, //9451 #CJK UNIFIED IDEOGRAPH + {0xBA5B, 0x7BEC}, //9452 #CJK UNIFIED IDEOGRAPH + {0xBA5C, 0x7BED}, //9453 #CJK UNIFIED IDEOGRAPH + {0xBA5D, 0x7BEF}, //9454 #CJK UNIFIED IDEOGRAPH + {0xBA5E, 0x7BF0}, //9455 #CJK UNIFIED IDEOGRAPH + {0xBA5F, 0x7BF2}, //9456 #CJK UNIFIED IDEOGRAPH + {0xBA60, 0x7BF3}, //9457 #CJK UNIFIED IDEOGRAPH + {0xBA61, 0x7BF4}, //9458 #CJK UNIFIED IDEOGRAPH + {0xBA62, 0x7BF5}, //9459 #CJK UNIFIED IDEOGRAPH + {0xBA63, 0x7BF6}, //9460 #CJK UNIFIED IDEOGRAPH + {0xBA64, 0x7BF8}, //9461 #CJK UNIFIED IDEOGRAPH + {0xBA65, 0x7BF9}, //9462 #CJK UNIFIED IDEOGRAPH + {0xBA66, 0x7BFA}, //9463 #CJK UNIFIED IDEOGRAPH + {0xBA67, 0x7BFB}, //9464 #CJK UNIFIED IDEOGRAPH + {0xBA68, 0x7BFD}, //9465 #CJK UNIFIED IDEOGRAPH + {0xBA69, 0x7BFF}, //9466 #CJK UNIFIED IDEOGRAPH + {0xBA6A, 0x7C00}, //9467 #CJK UNIFIED IDEOGRAPH + {0xBA6B, 0x7C01}, //9468 #CJK UNIFIED IDEOGRAPH + {0xBA6C, 0x7C02}, //9469 #CJK UNIFIED IDEOGRAPH + {0xBA6D, 0x7C03}, //9470 #CJK UNIFIED IDEOGRAPH + {0xBA6E, 0x7C04}, //9471 #CJK UNIFIED IDEOGRAPH + {0xBA6F, 0x7C05}, //9472 #CJK UNIFIED IDEOGRAPH + {0xBA70, 0x7C06}, //9473 #CJK UNIFIED IDEOGRAPH + {0xBA71, 0x7C08}, //9474 #CJK UNIFIED IDEOGRAPH + {0xBA72, 0x7C09}, //9475 #CJK UNIFIED IDEOGRAPH + {0xBA73, 0x7C0A}, //9476 #CJK UNIFIED IDEOGRAPH + {0xBA74, 0x7C0D}, //9477 #CJK UNIFIED IDEOGRAPH + {0xBA75, 0x7C0E}, //9478 #CJK UNIFIED IDEOGRAPH + {0xBA76, 0x7C10}, //9479 #CJK UNIFIED IDEOGRAPH + {0xBA77, 0x7C11}, //9480 #CJK UNIFIED IDEOGRAPH + {0xBA78, 0x7C12}, //9481 #CJK UNIFIED IDEOGRAPH + {0xBA79, 0x7C13}, //9482 #CJK UNIFIED IDEOGRAPH + {0xBA7A, 0x7C14}, //9483 #CJK UNIFIED IDEOGRAPH + {0xBA7B, 0x7C15}, //9484 #CJK UNIFIED IDEOGRAPH + {0xBA7C, 0x7C17}, //9485 #CJK UNIFIED IDEOGRAPH + {0xBA7D, 0x7C18}, //9486 #CJK UNIFIED IDEOGRAPH + {0xBA7E, 0x7C19}, //9487 #CJK UNIFIED IDEOGRAPH + {0xBA80, 0x7C1A}, //9488 #CJK UNIFIED IDEOGRAPH + {0xBA81, 0x7C1B}, //9489 #CJK UNIFIED IDEOGRAPH + {0xBA82, 0x7C1C}, //9490 #CJK UNIFIED IDEOGRAPH + {0xBA83, 0x7C1D}, //9491 #CJK UNIFIED IDEOGRAPH + {0xBA84, 0x7C1E}, //9492 #CJK UNIFIED IDEOGRAPH + {0xBA85, 0x7C20}, //9493 #CJK UNIFIED IDEOGRAPH + {0xBA86, 0x7C21}, //9494 #CJK UNIFIED IDEOGRAPH + {0xBA87, 0x7C22}, //9495 #CJK UNIFIED IDEOGRAPH + {0xBA88, 0x7C23}, //9496 #CJK UNIFIED IDEOGRAPH + {0xBA89, 0x7C24}, //9497 #CJK UNIFIED IDEOGRAPH + {0xBA8A, 0x7C25}, //9498 #CJK UNIFIED IDEOGRAPH + {0xBA8B, 0x7C28}, //9499 #CJK UNIFIED IDEOGRAPH + {0xBA8C, 0x7C29}, //9500 #CJK UNIFIED IDEOGRAPH + {0xBA8D, 0x7C2B}, //9501 #CJK UNIFIED IDEOGRAPH + {0xBA8E, 0x7C2C}, //9502 #CJK UNIFIED IDEOGRAPH + {0xBA8F, 0x7C2D}, //9503 #CJK UNIFIED IDEOGRAPH + {0xBA90, 0x7C2E}, //9504 #CJK UNIFIED IDEOGRAPH + {0xBA91, 0x7C2F}, //9505 #CJK UNIFIED IDEOGRAPH + {0xBA92, 0x7C30}, //9506 #CJK UNIFIED IDEOGRAPH + {0xBA93, 0x7C31}, //9507 #CJK UNIFIED IDEOGRAPH + {0xBA94, 0x7C32}, //9508 #CJK UNIFIED IDEOGRAPH + {0xBA95, 0x7C33}, //9509 #CJK UNIFIED IDEOGRAPH + {0xBA96, 0x7C34}, //9510 #CJK UNIFIED IDEOGRAPH + {0xBA97, 0x7C35}, //9511 #CJK UNIFIED IDEOGRAPH + {0xBA98, 0x7C36}, //9512 #CJK UNIFIED IDEOGRAPH + {0xBA99, 0x7C37}, //9513 #CJK UNIFIED IDEOGRAPH + {0xBA9A, 0x7C39}, //9514 #CJK UNIFIED IDEOGRAPH + {0xBA9B, 0x7C3A}, //9515 #CJK UNIFIED IDEOGRAPH + {0xBA9C, 0x7C3B}, //9516 #CJK UNIFIED IDEOGRAPH + {0xBA9D, 0x7C3C}, //9517 #CJK UNIFIED IDEOGRAPH + {0xBA9E, 0x7C3D}, //9518 #CJK UNIFIED IDEOGRAPH + {0xBA9F, 0x7C3E}, //9519 #CJK UNIFIED IDEOGRAPH + {0xBAA0, 0x7C42}, //9520 #CJK UNIFIED IDEOGRAPH + {0xBAA1, 0x9AB8}, //9521 #CJK UNIFIED IDEOGRAPH + {0xBAA2, 0x5B69}, //9522 #CJK UNIFIED IDEOGRAPH + {0xBAA3, 0x6D77}, //9523 #CJK UNIFIED IDEOGRAPH + {0xBAA4, 0x6C26}, //9524 #CJK UNIFIED IDEOGRAPH + {0xBAA5, 0x4EA5}, //9525 #CJK UNIFIED IDEOGRAPH + {0xBAA6, 0x5BB3}, //9526 #CJK UNIFIED IDEOGRAPH + {0xBAA7, 0x9A87}, //9527 #CJK UNIFIED IDEOGRAPH + {0xBAA8, 0x9163}, //9528 #CJK UNIFIED IDEOGRAPH + {0xBAA9, 0x61A8}, //9529 #CJK UNIFIED IDEOGRAPH + {0xBAAA, 0x90AF}, //9530 #CJK UNIFIED IDEOGRAPH + {0xBAAB, 0x97E9}, //9531 #CJK UNIFIED IDEOGRAPH + {0xBAAC, 0x542B}, //9532 #CJK UNIFIED IDEOGRAPH + {0xBAAD, 0x6DB5}, //9533 #CJK UNIFIED IDEOGRAPH + {0xBAAE, 0x5BD2}, //9534 #CJK UNIFIED IDEOGRAPH + {0xBAAF, 0x51FD}, //9535 #CJK UNIFIED IDEOGRAPH + {0xBAB0, 0x558A}, //9536 #CJK UNIFIED IDEOGRAPH + {0xBAB1, 0x7F55}, //9537 #CJK UNIFIED IDEOGRAPH + {0xBAB2, 0x7FF0}, //9538 #CJK UNIFIED IDEOGRAPH + {0xBAB3, 0x64BC}, //9539 #CJK UNIFIED IDEOGRAPH + {0xBAB4, 0x634D}, //9540 #CJK UNIFIED IDEOGRAPH + {0xBAB5, 0x65F1}, //9541 #CJK UNIFIED IDEOGRAPH + {0xBAB6, 0x61BE}, //9542 #CJK UNIFIED IDEOGRAPH + {0xBAB7, 0x608D}, //9543 #CJK UNIFIED IDEOGRAPH + {0xBAB8, 0x710A}, //9544 #CJK UNIFIED IDEOGRAPH + {0xBAB9, 0x6C57}, //9545 #CJK UNIFIED IDEOGRAPH + {0xBABA, 0x6C49}, //9546 #CJK UNIFIED IDEOGRAPH + {0xBABB, 0x592F}, //9547 #CJK UNIFIED IDEOGRAPH + {0xBABC, 0x676D}, //9548 #CJK UNIFIED IDEOGRAPH + {0xBABD, 0x822A}, //9549 #CJK UNIFIED IDEOGRAPH + {0xBABE, 0x58D5}, //9550 #CJK UNIFIED IDEOGRAPH + {0xBABF, 0x568E}, //9551 #CJK UNIFIED IDEOGRAPH + {0xBAC0, 0x8C6A}, //9552 #CJK UNIFIED IDEOGRAPH + {0xBAC1, 0x6BEB}, //9553 #CJK UNIFIED IDEOGRAPH + {0xBAC2, 0x90DD}, //9554 #CJK UNIFIED IDEOGRAPH + {0xBAC3, 0x597D}, //9555 #CJK UNIFIED IDEOGRAPH + {0xBAC4, 0x8017}, //9556 #CJK UNIFIED IDEOGRAPH + {0xBAC5, 0x53F7}, //9557 #CJK UNIFIED IDEOGRAPH + {0xBAC6, 0x6D69}, //9558 #CJK UNIFIED IDEOGRAPH + {0xBAC7, 0x5475}, //9559 #CJK UNIFIED IDEOGRAPH + {0xBAC8, 0x559D}, //9560 #CJK UNIFIED IDEOGRAPH + {0xBAC9, 0x8377}, //9561 #CJK UNIFIED IDEOGRAPH + {0xBACA, 0x83CF}, //9562 #CJK UNIFIED IDEOGRAPH + {0xBACB, 0x6838}, //9563 #CJK UNIFIED IDEOGRAPH + {0xBACC, 0x79BE}, //9564 #CJK UNIFIED IDEOGRAPH + {0xBACD, 0x548C}, //9565 #CJK UNIFIED IDEOGRAPH + {0xBACE, 0x4F55}, //9566 #CJK UNIFIED IDEOGRAPH + {0xBACF, 0x5408}, //9567 #CJK UNIFIED IDEOGRAPH + {0xBAD0, 0x76D2}, //9568 #CJK UNIFIED IDEOGRAPH + {0xBAD1, 0x8C89}, //9569 #CJK UNIFIED IDEOGRAPH + {0xBAD2, 0x9602}, //9570 #CJK UNIFIED IDEOGRAPH + {0xBAD3, 0x6CB3}, //9571 #CJK UNIFIED IDEOGRAPH + {0xBAD4, 0x6DB8}, //9572 #CJK UNIFIED IDEOGRAPH + {0xBAD5, 0x8D6B}, //9573 #CJK UNIFIED IDEOGRAPH + {0xBAD6, 0x8910}, //9574 #CJK UNIFIED IDEOGRAPH + {0xBAD7, 0x9E64}, //9575 #CJK UNIFIED IDEOGRAPH + {0xBAD8, 0x8D3A}, //9576 #CJK UNIFIED IDEOGRAPH + {0xBAD9, 0x563F}, //9577 #CJK UNIFIED IDEOGRAPH + {0xBADA, 0x9ED1}, //9578 #CJK UNIFIED IDEOGRAPH + {0xBADB, 0x75D5}, //9579 #CJK UNIFIED IDEOGRAPH + {0xBADC, 0x5F88}, //9580 #CJK UNIFIED IDEOGRAPH + {0xBADD, 0x72E0}, //9581 #CJK UNIFIED IDEOGRAPH + {0xBADE, 0x6068}, //9582 #CJK UNIFIED IDEOGRAPH + {0xBADF, 0x54FC}, //9583 #CJK UNIFIED IDEOGRAPH + {0xBAE0, 0x4EA8}, //9584 #CJK UNIFIED IDEOGRAPH + {0xBAE1, 0x6A2A}, //9585 #CJK UNIFIED IDEOGRAPH + {0xBAE2, 0x8861}, //9586 #CJK UNIFIED IDEOGRAPH + {0xBAE3, 0x6052}, //9587 #CJK UNIFIED IDEOGRAPH + {0xBAE4, 0x8F70}, //9588 #CJK UNIFIED IDEOGRAPH + {0xBAE5, 0x54C4}, //9589 #CJK UNIFIED IDEOGRAPH + {0xBAE6, 0x70D8}, //9590 #CJK UNIFIED IDEOGRAPH + {0xBAE7, 0x8679}, //9591 #CJK UNIFIED IDEOGRAPH + {0xBAE8, 0x9E3F}, //9592 #CJK UNIFIED IDEOGRAPH + {0xBAE9, 0x6D2A}, //9593 #CJK UNIFIED IDEOGRAPH + {0xBAEA, 0x5B8F}, //9594 #CJK UNIFIED IDEOGRAPH + {0xBAEB, 0x5F18}, //9595 #CJK UNIFIED IDEOGRAPH + {0xBAEC, 0x7EA2}, //9596 #CJK UNIFIED IDEOGRAPH + {0xBAED, 0x5589}, //9597 #CJK UNIFIED IDEOGRAPH + {0xBAEE, 0x4FAF}, //9598 #CJK UNIFIED IDEOGRAPH + {0xBAEF, 0x7334}, //9599 #CJK UNIFIED IDEOGRAPH + {0xBAF0, 0x543C}, //9600 #CJK UNIFIED IDEOGRAPH + {0xBAF1, 0x539A}, //9601 #CJK UNIFIED IDEOGRAPH + {0xBAF2, 0x5019}, //9602 #CJK UNIFIED IDEOGRAPH + {0xBAF3, 0x540E}, //9603 #CJK UNIFIED IDEOGRAPH + {0xBAF4, 0x547C}, //9604 #CJK UNIFIED IDEOGRAPH + {0xBAF5, 0x4E4E}, //9605 #CJK UNIFIED IDEOGRAPH + {0xBAF6, 0x5FFD}, //9606 #CJK UNIFIED IDEOGRAPH + {0xBAF7, 0x745A}, //9607 #CJK UNIFIED IDEOGRAPH + {0xBAF8, 0x58F6}, //9608 #CJK UNIFIED IDEOGRAPH + {0xBAF9, 0x846B}, //9609 #CJK UNIFIED IDEOGRAPH + {0xBAFA, 0x80E1}, //9610 #CJK UNIFIED IDEOGRAPH + {0xBAFB, 0x8774}, //9611 #CJK UNIFIED IDEOGRAPH + {0xBAFC, 0x72D0}, //9612 #CJK UNIFIED IDEOGRAPH + {0xBAFD, 0x7CCA}, //9613 #CJK UNIFIED IDEOGRAPH + {0xBAFE, 0x6E56}, //9614 #CJK UNIFIED IDEOGRAPH + {0xBB40, 0x7C43}, //9615 #CJK UNIFIED IDEOGRAPH + {0xBB41, 0x7C44}, //9616 #CJK UNIFIED IDEOGRAPH + {0xBB42, 0x7C45}, //9617 #CJK UNIFIED IDEOGRAPH + {0xBB43, 0x7C46}, //9618 #CJK UNIFIED IDEOGRAPH + {0xBB44, 0x7C47}, //9619 #CJK UNIFIED IDEOGRAPH + {0xBB45, 0x7C48}, //9620 #CJK UNIFIED IDEOGRAPH + {0xBB46, 0x7C49}, //9621 #CJK UNIFIED IDEOGRAPH + {0xBB47, 0x7C4A}, //9622 #CJK UNIFIED IDEOGRAPH + {0xBB48, 0x7C4B}, //9623 #CJK UNIFIED IDEOGRAPH + {0xBB49, 0x7C4C}, //9624 #CJK UNIFIED IDEOGRAPH + {0xBB4A, 0x7C4E}, //9625 #CJK UNIFIED IDEOGRAPH + {0xBB4B, 0x7C4F}, //9626 #CJK UNIFIED IDEOGRAPH + {0xBB4C, 0x7C50}, //9627 #CJK UNIFIED IDEOGRAPH + {0xBB4D, 0x7C51}, //9628 #CJK UNIFIED IDEOGRAPH + {0xBB4E, 0x7C52}, //9629 #CJK UNIFIED IDEOGRAPH + {0xBB4F, 0x7C53}, //9630 #CJK UNIFIED IDEOGRAPH + {0xBB50, 0x7C54}, //9631 #CJK UNIFIED IDEOGRAPH + {0xBB51, 0x7C55}, //9632 #CJK UNIFIED IDEOGRAPH + {0xBB52, 0x7C56}, //9633 #CJK UNIFIED IDEOGRAPH + {0xBB53, 0x7C57}, //9634 #CJK UNIFIED IDEOGRAPH + {0xBB54, 0x7C58}, //9635 #CJK UNIFIED IDEOGRAPH + {0xBB55, 0x7C59}, //9636 #CJK UNIFIED IDEOGRAPH + {0xBB56, 0x7C5A}, //9637 #CJK UNIFIED IDEOGRAPH + {0xBB57, 0x7C5B}, //9638 #CJK UNIFIED IDEOGRAPH + {0xBB58, 0x7C5C}, //9639 #CJK UNIFIED IDEOGRAPH + {0xBB59, 0x7C5D}, //9640 #CJK UNIFIED IDEOGRAPH + {0xBB5A, 0x7C5E}, //9641 #CJK UNIFIED IDEOGRAPH + {0xBB5B, 0x7C5F}, //9642 #CJK UNIFIED IDEOGRAPH + {0xBB5C, 0x7C60}, //9643 #CJK UNIFIED IDEOGRAPH + {0xBB5D, 0x7C61}, //9644 #CJK UNIFIED IDEOGRAPH + {0xBB5E, 0x7C62}, //9645 #CJK UNIFIED IDEOGRAPH + {0xBB5F, 0x7C63}, //9646 #CJK UNIFIED IDEOGRAPH + {0xBB60, 0x7C64}, //9647 #CJK UNIFIED IDEOGRAPH + {0xBB61, 0x7C65}, //9648 #CJK UNIFIED IDEOGRAPH + {0xBB62, 0x7C66}, //9649 #CJK UNIFIED IDEOGRAPH + {0xBB63, 0x7C67}, //9650 #CJK UNIFIED IDEOGRAPH + {0xBB64, 0x7C68}, //9651 #CJK UNIFIED IDEOGRAPH + {0xBB65, 0x7C69}, //9652 #CJK UNIFIED IDEOGRAPH + {0xBB66, 0x7C6A}, //9653 #CJK UNIFIED IDEOGRAPH + {0xBB67, 0x7C6B}, //9654 #CJK UNIFIED IDEOGRAPH + {0xBB68, 0x7C6C}, //9655 #CJK UNIFIED IDEOGRAPH + {0xBB69, 0x7C6D}, //9656 #CJK UNIFIED IDEOGRAPH + {0xBB6A, 0x7C6E}, //9657 #CJK UNIFIED IDEOGRAPH + {0xBB6B, 0x7C6F}, //9658 #CJK UNIFIED IDEOGRAPH + {0xBB6C, 0x7C70}, //9659 #CJK UNIFIED IDEOGRAPH + {0xBB6D, 0x7C71}, //9660 #CJK UNIFIED IDEOGRAPH + {0xBB6E, 0x7C72}, //9661 #CJK UNIFIED IDEOGRAPH + {0xBB6F, 0x7C75}, //9662 #CJK UNIFIED IDEOGRAPH + {0xBB70, 0x7C76}, //9663 #CJK UNIFIED IDEOGRAPH + {0xBB71, 0x7C77}, //9664 #CJK UNIFIED IDEOGRAPH + {0xBB72, 0x7C78}, //9665 #CJK UNIFIED IDEOGRAPH + {0xBB73, 0x7C79}, //9666 #CJK UNIFIED IDEOGRAPH + {0xBB74, 0x7C7A}, //9667 #CJK UNIFIED IDEOGRAPH + {0xBB75, 0x7C7E}, //9668 #CJK UNIFIED IDEOGRAPH + {0xBB76, 0x7C7F}, //9669 #CJK UNIFIED IDEOGRAPH + {0xBB77, 0x7C80}, //9670 #CJK UNIFIED IDEOGRAPH + {0xBB78, 0x7C81}, //9671 #CJK UNIFIED IDEOGRAPH + {0xBB79, 0x7C82}, //9672 #CJK UNIFIED IDEOGRAPH + {0xBB7A, 0x7C83}, //9673 #CJK UNIFIED IDEOGRAPH + {0xBB7B, 0x7C84}, //9674 #CJK UNIFIED IDEOGRAPH + {0xBB7C, 0x7C85}, //9675 #CJK UNIFIED IDEOGRAPH + {0xBB7D, 0x7C86}, //9676 #CJK UNIFIED IDEOGRAPH + {0xBB7E, 0x7C87}, //9677 #CJK UNIFIED IDEOGRAPH + {0xBB80, 0x7C88}, //9678 #CJK UNIFIED IDEOGRAPH + {0xBB81, 0x7C8A}, //9679 #CJK UNIFIED IDEOGRAPH + {0xBB82, 0x7C8B}, //9680 #CJK UNIFIED IDEOGRAPH + {0xBB83, 0x7C8C}, //9681 #CJK UNIFIED IDEOGRAPH + {0xBB84, 0x7C8D}, //9682 #CJK UNIFIED IDEOGRAPH + {0xBB85, 0x7C8E}, //9683 #CJK UNIFIED IDEOGRAPH + {0xBB86, 0x7C8F}, //9684 #CJK UNIFIED IDEOGRAPH + {0xBB87, 0x7C90}, //9685 #CJK UNIFIED IDEOGRAPH + {0xBB88, 0x7C93}, //9686 #CJK UNIFIED IDEOGRAPH + {0xBB89, 0x7C94}, //9687 #CJK UNIFIED IDEOGRAPH + {0xBB8A, 0x7C96}, //9688 #CJK UNIFIED IDEOGRAPH + {0xBB8B, 0x7C99}, //9689 #CJK UNIFIED IDEOGRAPH + {0xBB8C, 0x7C9A}, //9690 #CJK UNIFIED IDEOGRAPH + {0xBB8D, 0x7C9B}, //9691 #CJK UNIFIED IDEOGRAPH + {0xBB8E, 0x7CA0}, //9692 #CJK UNIFIED IDEOGRAPH + {0xBB8F, 0x7CA1}, //9693 #CJK UNIFIED IDEOGRAPH + {0xBB90, 0x7CA3}, //9694 #CJK UNIFIED IDEOGRAPH + {0xBB91, 0x7CA6}, //9695 #CJK UNIFIED IDEOGRAPH + {0xBB92, 0x7CA7}, //9696 #CJK UNIFIED IDEOGRAPH + {0xBB93, 0x7CA8}, //9697 #CJK UNIFIED IDEOGRAPH + {0xBB94, 0x7CA9}, //9698 #CJK UNIFIED IDEOGRAPH + {0xBB95, 0x7CAB}, //9699 #CJK UNIFIED IDEOGRAPH + {0xBB96, 0x7CAC}, //9700 #CJK UNIFIED IDEOGRAPH + {0xBB97, 0x7CAD}, //9701 #CJK UNIFIED IDEOGRAPH + {0xBB98, 0x7CAF}, //9702 #CJK UNIFIED IDEOGRAPH + {0xBB99, 0x7CB0}, //9703 #CJK UNIFIED IDEOGRAPH + {0xBB9A, 0x7CB4}, //9704 #CJK UNIFIED IDEOGRAPH + {0xBB9B, 0x7CB5}, //9705 #CJK UNIFIED IDEOGRAPH + {0xBB9C, 0x7CB6}, //9706 #CJK UNIFIED IDEOGRAPH + {0xBB9D, 0x7CB7}, //9707 #CJK UNIFIED IDEOGRAPH + {0xBB9E, 0x7CB8}, //9708 #CJK UNIFIED IDEOGRAPH + {0xBB9F, 0x7CBA}, //9709 #CJK UNIFIED IDEOGRAPH + {0xBBA0, 0x7CBB}, //9710 #CJK UNIFIED IDEOGRAPH + {0xBBA1, 0x5F27}, //9711 #CJK UNIFIED IDEOGRAPH + {0xBBA2, 0x864E}, //9712 #CJK UNIFIED IDEOGRAPH + {0xBBA3, 0x552C}, //9713 #CJK UNIFIED IDEOGRAPH + {0xBBA4, 0x62A4}, //9714 #CJK UNIFIED IDEOGRAPH + {0xBBA5, 0x4E92}, //9715 #CJK UNIFIED IDEOGRAPH + {0xBBA6, 0x6CAA}, //9716 #CJK UNIFIED IDEOGRAPH + {0xBBA7, 0x6237}, //9717 #CJK UNIFIED IDEOGRAPH + {0xBBA8, 0x82B1}, //9718 #CJK UNIFIED IDEOGRAPH + {0xBBA9, 0x54D7}, //9719 #CJK UNIFIED IDEOGRAPH + {0xBBAA, 0x534E}, //9720 #CJK UNIFIED IDEOGRAPH + {0xBBAB, 0x733E}, //9721 #CJK UNIFIED IDEOGRAPH + {0xBBAC, 0x6ED1}, //9722 #CJK UNIFIED IDEOGRAPH + {0xBBAD, 0x753B}, //9723 #CJK UNIFIED IDEOGRAPH + {0xBBAE, 0x5212}, //9724 #CJK UNIFIED IDEOGRAPH + {0xBBAF, 0x5316}, //9725 #CJK UNIFIED IDEOGRAPH + {0xBBB0, 0x8BDD}, //9726 #CJK UNIFIED IDEOGRAPH + {0xBBB1, 0x69D0}, //9727 #CJK UNIFIED IDEOGRAPH + {0xBBB2, 0x5F8A}, //9728 #CJK UNIFIED IDEOGRAPH + {0xBBB3, 0x6000}, //9729 #CJK UNIFIED IDEOGRAPH + {0xBBB4, 0x6DEE}, //9730 #CJK UNIFIED IDEOGRAPH + {0xBBB5, 0x574F}, //9731 #CJK UNIFIED IDEOGRAPH + {0xBBB6, 0x6B22}, //9732 #CJK UNIFIED IDEOGRAPH + {0xBBB7, 0x73AF}, //9733 #CJK UNIFIED IDEOGRAPH + {0xBBB8, 0x6853}, //9734 #CJK UNIFIED IDEOGRAPH + {0xBBB9, 0x8FD8}, //9735 #CJK UNIFIED IDEOGRAPH + {0xBBBA, 0x7F13}, //9736 #CJK UNIFIED IDEOGRAPH + {0xBBBB, 0x6362}, //9737 #CJK UNIFIED IDEOGRAPH + {0xBBBC, 0x60A3}, //9738 #CJK UNIFIED IDEOGRAPH + {0xBBBD, 0x5524}, //9739 #CJK UNIFIED IDEOGRAPH + {0xBBBE, 0x75EA}, //9740 #CJK UNIFIED IDEOGRAPH + {0xBBBF, 0x8C62}, //9741 #CJK UNIFIED IDEOGRAPH + {0xBBC0, 0x7115}, //9742 #CJK UNIFIED IDEOGRAPH + {0xBBC1, 0x6DA3}, //9743 #CJK UNIFIED IDEOGRAPH + {0xBBC2, 0x5BA6}, //9744 #CJK UNIFIED IDEOGRAPH + {0xBBC3, 0x5E7B}, //9745 #CJK UNIFIED IDEOGRAPH + {0xBBC4, 0x8352}, //9746 #CJK UNIFIED IDEOGRAPH + {0xBBC5, 0x614C}, //9747 #CJK UNIFIED IDEOGRAPH + {0xBBC6, 0x9EC4}, //9748 #CJK UNIFIED IDEOGRAPH + {0xBBC7, 0x78FA}, //9749 #CJK UNIFIED IDEOGRAPH + {0xBBC8, 0x8757}, //9750 #CJK UNIFIED IDEOGRAPH + {0xBBC9, 0x7C27}, //9751 #CJK UNIFIED IDEOGRAPH + {0xBBCA, 0x7687}, //9752 #CJK UNIFIED IDEOGRAPH + {0xBBCB, 0x51F0}, //9753 #CJK UNIFIED IDEOGRAPH + {0xBBCC, 0x60F6}, //9754 #CJK UNIFIED IDEOGRAPH + {0xBBCD, 0x714C}, //9755 #CJK UNIFIED IDEOGRAPH + {0xBBCE, 0x6643}, //9756 #CJK UNIFIED IDEOGRAPH + {0xBBCF, 0x5E4C}, //9757 #CJK UNIFIED IDEOGRAPH + {0xBBD0, 0x604D}, //9758 #CJK UNIFIED IDEOGRAPH + {0xBBD1, 0x8C0E}, //9759 #CJK UNIFIED IDEOGRAPH + {0xBBD2, 0x7070}, //9760 #CJK UNIFIED IDEOGRAPH + {0xBBD3, 0x6325}, //9761 #CJK UNIFIED IDEOGRAPH + {0xBBD4, 0x8F89}, //9762 #CJK UNIFIED IDEOGRAPH + {0xBBD5, 0x5FBD}, //9763 #CJK UNIFIED IDEOGRAPH + {0xBBD6, 0x6062}, //9764 #CJK UNIFIED IDEOGRAPH + {0xBBD7, 0x86D4}, //9765 #CJK UNIFIED IDEOGRAPH + {0xBBD8, 0x56DE}, //9766 #CJK UNIFIED IDEOGRAPH + {0xBBD9, 0x6BC1}, //9767 #CJK UNIFIED IDEOGRAPH + {0xBBDA, 0x6094}, //9768 #CJK UNIFIED IDEOGRAPH + {0xBBDB, 0x6167}, //9769 #CJK UNIFIED IDEOGRAPH + {0xBBDC, 0x5349}, //9770 #CJK UNIFIED IDEOGRAPH + {0xBBDD, 0x60E0}, //9771 #CJK UNIFIED IDEOGRAPH + {0xBBDE, 0x6666}, //9772 #CJK UNIFIED IDEOGRAPH + {0xBBDF, 0x8D3F}, //9773 #CJK UNIFIED IDEOGRAPH + {0xBBE0, 0x79FD}, //9774 #CJK UNIFIED IDEOGRAPH + {0xBBE1, 0x4F1A}, //9775 #CJK UNIFIED IDEOGRAPH + {0xBBE2, 0x70E9}, //9776 #CJK UNIFIED IDEOGRAPH + {0xBBE3, 0x6C47}, //9777 #CJK UNIFIED IDEOGRAPH + {0xBBE4, 0x8BB3}, //9778 #CJK UNIFIED IDEOGRAPH + {0xBBE5, 0x8BF2}, //9779 #CJK UNIFIED IDEOGRAPH + {0xBBE6, 0x7ED8}, //9780 #CJK UNIFIED IDEOGRAPH + {0xBBE7, 0x8364}, //9781 #CJK UNIFIED IDEOGRAPH + {0xBBE8, 0x660F}, //9782 #CJK UNIFIED IDEOGRAPH + {0xBBE9, 0x5A5A}, //9783 #CJK UNIFIED IDEOGRAPH + {0xBBEA, 0x9B42}, //9784 #CJK UNIFIED IDEOGRAPH + {0xBBEB, 0x6D51}, //9785 #CJK UNIFIED IDEOGRAPH + {0xBBEC, 0x6DF7}, //9786 #CJK UNIFIED IDEOGRAPH + {0xBBED, 0x8C41}, //9787 #CJK UNIFIED IDEOGRAPH + {0xBBEE, 0x6D3B}, //9788 #CJK UNIFIED IDEOGRAPH + {0xBBEF, 0x4F19}, //9789 #CJK UNIFIED IDEOGRAPH + {0xBBF0, 0x706B}, //9790 #CJK UNIFIED IDEOGRAPH + {0xBBF1, 0x83B7}, //9791 #CJK UNIFIED IDEOGRAPH + {0xBBF2, 0x6216}, //9792 #CJK UNIFIED IDEOGRAPH + {0xBBF3, 0x60D1}, //9793 #CJK UNIFIED IDEOGRAPH + {0xBBF4, 0x970D}, //9794 #CJK UNIFIED IDEOGRAPH + {0xBBF5, 0x8D27}, //9795 #CJK UNIFIED IDEOGRAPH + {0xBBF6, 0x7978}, //9796 #CJK UNIFIED IDEOGRAPH + {0xBBF7, 0x51FB}, //9797 #CJK UNIFIED IDEOGRAPH + {0xBBF8, 0x573E}, //9798 #CJK UNIFIED IDEOGRAPH + {0xBBF9, 0x57FA}, //9799 #CJK UNIFIED IDEOGRAPH + {0xBBFA, 0x673A}, //9800 #CJK UNIFIED IDEOGRAPH + {0xBBFB, 0x7578}, //9801 #CJK UNIFIED IDEOGRAPH + {0xBBFC, 0x7A3D}, //9802 #CJK UNIFIED IDEOGRAPH + {0xBBFD, 0x79EF}, //9803 #CJK UNIFIED IDEOGRAPH + {0xBBFE, 0x7B95}, //9804 #CJK UNIFIED IDEOGRAPH + {0xBC40, 0x7CBF}, //9805 #CJK UNIFIED IDEOGRAPH + {0xBC41, 0x7CC0}, //9806 #CJK UNIFIED IDEOGRAPH + {0xBC42, 0x7CC2}, //9807 #CJK UNIFIED IDEOGRAPH + {0xBC43, 0x7CC3}, //9808 #CJK UNIFIED IDEOGRAPH + {0xBC44, 0x7CC4}, //9809 #CJK UNIFIED IDEOGRAPH + {0xBC45, 0x7CC6}, //9810 #CJK UNIFIED IDEOGRAPH + {0xBC46, 0x7CC9}, //9811 #CJK UNIFIED IDEOGRAPH + {0xBC47, 0x7CCB}, //9812 #CJK UNIFIED IDEOGRAPH + {0xBC48, 0x7CCE}, //9813 #CJK UNIFIED IDEOGRAPH + {0xBC49, 0x7CCF}, //9814 #CJK UNIFIED IDEOGRAPH + {0xBC4A, 0x7CD0}, //9815 #CJK UNIFIED IDEOGRAPH + {0xBC4B, 0x7CD1}, //9816 #CJK UNIFIED IDEOGRAPH + {0xBC4C, 0x7CD2}, //9817 #CJK UNIFIED IDEOGRAPH + {0xBC4D, 0x7CD3}, //9818 #CJK UNIFIED IDEOGRAPH + {0xBC4E, 0x7CD4}, //9819 #CJK UNIFIED IDEOGRAPH + {0xBC4F, 0x7CD8}, //9820 #CJK UNIFIED IDEOGRAPH + {0xBC50, 0x7CDA}, //9821 #CJK UNIFIED IDEOGRAPH + {0xBC51, 0x7CDB}, //9822 #CJK UNIFIED IDEOGRAPH + {0xBC52, 0x7CDD}, //9823 #CJK UNIFIED IDEOGRAPH + {0xBC53, 0x7CDE}, //9824 #CJK UNIFIED IDEOGRAPH + {0xBC54, 0x7CE1}, //9825 #CJK UNIFIED IDEOGRAPH + {0xBC55, 0x7CE2}, //9826 #CJK UNIFIED IDEOGRAPH + {0xBC56, 0x7CE3}, //9827 #CJK UNIFIED IDEOGRAPH + {0xBC57, 0x7CE4}, //9828 #CJK UNIFIED IDEOGRAPH + {0xBC58, 0x7CE5}, //9829 #CJK UNIFIED IDEOGRAPH + {0xBC59, 0x7CE6}, //9830 #CJK UNIFIED IDEOGRAPH + {0xBC5A, 0x7CE7}, //9831 #CJK UNIFIED IDEOGRAPH + {0xBC5B, 0x7CE9}, //9832 #CJK UNIFIED IDEOGRAPH + {0xBC5C, 0x7CEA}, //9833 #CJK UNIFIED IDEOGRAPH + {0xBC5D, 0x7CEB}, //9834 #CJK UNIFIED IDEOGRAPH + {0xBC5E, 0x7CEC}, //9835 #CJK UNIFIED IDEOGRAPH + {0xBC5F, 0x7CED}, //9836 #CJK UNIFIED IDEOGRAPH + {0xBC60, 0x7CEE}, //9837 #CJK UNIFIED IDEOGRAPH + {0xBC61, 0x7CF0}, //9838 #CJK UNIFIED IDEOGRAPH + {0xBC62, 0x7CF1}, //9839 #CJK UNIFIED IDEOGRAPH + {0xBC63, 0x7CF2}, //9840 #CJK UNIFIED IDEOGRAPH + {0xBC64, 0x7CF3}, //9841 #CJK UNIFIED IDEOGRAPH + {0xBC65, 0x7CF4}, //9842 #CJK UNIFIED IDEOGRAPH + {0xBC66, 0x7CF5}, //9843 #CJK UNIFIED IDEOGRAPH + {0xBC67, 0x7CF6}, //9844 #CJK UNIFIED IDEOGRAPH + {0xBC68, 0x7CF7}, //9845 #CJK UNIFIED IDEOGRAPH + {0xBC69, 0x7CF9}, //9846 #CJK UNIFIED IDEOGRAPH + {0xBC6A, 0x7CFA}, //9847 #CJK UNIFIED IDEOGRAPH + {0xBC6B, 0x7CFC}, //9848 #CJK UNIFIED IDEOGRAPH + {0xBC6C, 0x7CFD}, //9849 #CJK UNIFIED IDEOGRAPH + {0xBC6D, 0x7CFE}, //9850 #CJK UNIFIED IDEOGRAPH + {0xBC6E, 0x7CFF}, //9851 #CJK UNIFIED IDEOGRAPH + {0xBC6F, 0x7D00}, //9852 #CJK UNIFIED IDEOGRAPH + {0xBC70, 0x7D01}, //9853 #CJK UNIFIED IDEOGRAPH + {0xBC71, 0x7D02}, //9854 #CJK UNIFIED IDEOGRAPH + {0xBC72, 0x7D03}, //9855 #CJK UNIFIED IDEOGRAPH + {0xBC73, 0x7D04}, //9856 #CJK UNIFIED IDEOGRAPH + {0xBC74, 0x7D05}, //9857 #CJK UNIFIED IDEOGRAPH + {0xBC75, 0x7D06}, //9858 #CJK UNIFIED IDEOGRAPH + {0xBC76, 0x7D07}, //9859 #CJK UNIFIED IDEOGRAPH + {0xBC77, 0x7D08}, //9860 #CJK UNIFIED IDEOGRAPH + {0xBC78, 0x7D09}, //9861 #CJK UNIFIED IDEOGRAPH + {0xBC79, 0x7D0B}, //9862 #CJK UNIFIED IDEOGRAPH + {0xBC7A, 0x7D0C}, //9863 #CJK UNIFIED IDEOGRAPH + {0xBC7B, 0x7D0D}, //9864 #CJK UNIFIED IDEOGRAPH + {0xBC7C, 0x7D0E}, //9865 #CJK UNIFIED IDEOGRAPH + {0xBC7D, 0x7D0F}, //9866 #CJK UNIFIED IDEOGRAPH + {0xBC7E, 0x7D10}, //9867 #CJK UNIFIED IDEOGRAPH + {0xBC80, 0x7D11}, //9868 #CJK UNIFIED IDEOGRAPH + {0xBC81, 0x7D12}, //9869 #CJK UNIFIED IDEOGRAPH + {0xBC82, 0x7D13}, //9870 #CJK UNIFIED IDEOGRAPH + {0xBC83, 0x7D14}, //9871 #CJK UNIFIED IDEOGRAPH + {0xBC84, 0x7D15}, //9872 #CJK UNIFIED IDEOGRAPH + {0xBC85, 0x7D16}, //9873 #CJK UNIFIED IDEOGRAPH + {0xBC86, 0x7D17}, //9874 #CJK UNIFIED IDEOGRAPH + {0xBC87, 0x7D18}, //9875 #CJK UNIFIED IDEOGRAPH + {0xBC88, 0x7D19}, //9876 #CJK UNIFIED IDEOGRAPH + {0xBC89, 0x7D1A}, //9877 #CJK UNIFIED IDEOGRAPH + {0xBC8A, 0x7D1B}, //9878 #CJK UNIFIED IDEOGRAPH + {0xBC8B, 0x7D1C}, //9879 #CJK UNIFIED IDEOGRAPH + {0xBC8C, 0x7D1D}, //9880 #CJK UNIFIED IDEOGRAPH + {0xBC8D, 0x7D1E}, //9881 #CJK UNIFIED IDEOGRAPH + {0xBC8E, 0x7D1F}, //9882 #CJK UNIFIED IDEOGRAPH + {0xBC8F, 0x7D21}, //9883 #CJK UNIFIED IDEOGRAPH + {0xBC90, 0x7D23}, //9884 #CJK UNIFIED IDEOGRAPH + {0xBC91, 0x7D24}, //9885 #CJK UNIFIED IDEOGRAPH + {0xBC92, 0x7D25}, //9886 #CJK UNIFIED IDEOGRAPH + {0xBC93, 0x7D26}, //9887 #CJK UNIFIED IDEOGRAPH + {0xBC94, 0x7D28}, //9888 #CJK UNIFIED IDEOGRAPH + {0xBC95, 0x7D29}, //9889 #CJK UNIFIED IDEOGRAPH + {0xBC96, 0x7D2A}, //9890 #CJK UNIFIED IDEOGRAPH + {0xBC97, 0x7D2C}, //9891 #CJK UNIFIED IDEOGRAPH + {0xBC98, 0x7D2D}, //9892 #CJK UNIFIED IDEOGRAPH + {0xBC99, 0x7D2E}, //9893 #CJK UNIFIED IDEOGRAPH + {0xBC9A, 0x7D30}, //9894 #CJK UNIFIED IDEOGRAPH + {0xBC9B, 0x7D31}, //9895 #CJK UNIFIED IDEOGRAPH + {0xBC9C, 0x7D32}, //9896 #CJK UNIFIED IDEOGRAPH + {0xBC9D, 0x7D33}, //9897 #CJK UNIFIED IDEOGRAPH + {0xBC9E, 0x7D34}, //9898 #CJK UNIFIED IDEOGRAPH + {0xBC9F, 0x7D35}, //9899 #CJK UNIFIED IDEOGRAPH + {0xBCA0, 0x7D36}, //9900 #CJK UNIFIED IDEOGRAPH + {0xBCA1, 0x808C}, //9901 #CJK UNIFIED IDEOGRAPH + {0xBCA2, 0x9965}, //9902 #CJK UNIFIED IDEOGRAPH + {0xBCA3, 0x8FF9}, //9903 #CJK UNIFIED IDEOGRAPH + {0xBCA4, 0x6FC0}, //9904 #CJK UNIFIED IDEOGRAPH + {0xBCA5, 0x8BA5}, //9905 #CJK UNIFIED IDEOGRAPH + {0xBCA6, 0x9E21}, //9906 #CJK UNIFIED IDEOGRAPH + {0xBCA7, 0x59EC}, //9907 #CJK UNIFIED IDEOGRAPH + {0xBCA8, 0x7EE9}, //9908 #CJK UNIFIED IDEOGRAPH + {0xBCA9, 0x7F09}, //9909 #CJK UNIFIED IDEOGRAPH + {0xBCAA, 0x5409}, //9910 #CJK UNIFIED IDEOGRAPH + {0xBCAB, 0x6781}, //9911 #CJK UNIFIED IDEOGRAPH + {0xBCAC, 0x68D8}, //9912 #CJK UNIFIED IDEOGRAPH + {0xBCAD, 0x8F91}, //9913 #CJK UNIFIED IDEOGRAPH + {0xBCAE, 0x7C4D}, //9914 #CJK UNIFIED IDEOGRAPH + {0xBCAF, 0x96C6}, //9915 #CJK UNIFIED IDEOGRAPH + {0xBCB0, 0x53CA}, //9916 #CJK UNIFIED IDEOGRAPH + {0xBCB1, 0x6025}, //9917 #CJK UNIFIED IDEOGRAPH + {0xBCB2, 0x75BE}, //9918 #CJK UNIFIED IDEOGRAPH + {0xBCB3, 0x6C72}, //9919 #CJK UNIFIED IDEOGRAPH + {0xBCB4, 0x5373}, //9920 #CJK UNIFIED IDEOGRAPH + {0xBCB5, 0x5AC9}, //9921 #CJK UNIFIED IDEOGRAPH + {0xBCB6, 0x7EA7}, //9922 #CJK UNIFIED IDEOGRAPH + {0xBCB7, 0x6324}, //9923 #CJK UNIFIED IDEOGRAPH + {0xBCB8, 0x51E0}, //9924 #CJK UNIFIED IDEOGRAPH + {0xBCB9, 0x810A}, //9925 #CJK UNIFIED IDEOGRAPH + {0xBCBA, 0x5DF1}, //9926 #CJK UNIFIED IDEOGRAPH + {0xBCBB, 0x84DF}, //9927 #CJK UNIFIED IDEOGRAPH + {0xBCBC, 0x6280}, //9928 #CJK UNIFIED IDEOGRAPH + {0xBCBD, 0x5180}, //9929 #CJK UNIFIED IDEOGRAPH + {0xBCBE, 0x5B63}, //9930 #CJK UNIFIED IDEOGRAPH + {0xBCBF, 0x4F0E}, //9931 #CJK UNIFIED IDEOGRAPH + {0xBCC0, 0x796D}, //9932 #CJK UNIFIED IDEOGRAPH + {0xBCC1, 0x5242}, //9933 #CJK UNIFIED IDEOGRAPH + {0xBCC2, 0x60B8}, //9934 #CJK UNIFIED IDEOGRAPH + {0xBCC3, 0x6D4E}, //9935 #CJK UNIFIED IDEOGRAPH + {0xBCC4, 0x5BC4}, //9936 #CJK UNIFIED IDEOGRAPH + {0xBCC5, 0x5BC2}, //9937 #CJK UNIFIED IDEOGRAPH + {0xBCC6, 0x8BA1}, //9938 #CJK UNIFIED IDEOGRAPH + {0xBCC7, 0x8BB0}, //9939 #CJK UNIFIED IDEOGRAPH + {0xBCC8, 0x65E2}, //9940 #CJK UNIFIED IDEOGRAPH + {0xBCC9, 0x5FCC}, //9941 #CJK UNIFIED IDEOGRAPH + {0xBCCA, 0x9645}, //9942 #CJK UNIFIED IDEOGRAPH + {0xBCCB, 0x5993}, //9943 #CJK UNIFIED IDEOGRAPH + {0xBCCC, 0x7EE7}, //9944 #CJK UNIFIED IDEOGRAPH + {0xBCCD, 0x7EAA}, //9945 #CJK UNIFIED IDEOGRAPH + {0xBCCE, 0x5609}, //9946 #CJK UNIFIED IDEOGRAPH + {0xBCCF, 0x67B7}, //9947 #CJK UNIFIED IDEOGRAPH + {0xBCD0, 0x5939}, //9948 #CJK UNIFIED IDEOGRAPH + {0xBCD1, 0x4F73}, //9949 #CJK UNIFIED IDEOGRAPH + {0xBCD2, 0x5BB6}, //9950 #CJK UNIFIED IDEOGRAPH + {0xBCD3, 0x52A0}, //9951 #CJK UNIFIED IDEOGRAPH + {0xBCD4, 0x835A}, //9952 #CJK UNIFIED IDEOGRAPH + {0xBCD5, 0x988A}, //9953 #CJK UNIFIED IDEOGRAPH + {0xBCD6, 0x8D3E}, //9954 #CJK UNIFIED IDEOGRAPH + {0xBCD7, 0x7532}, //9955 #CJK UNIFIED IDEOGRAPH + {0xBCD8, 0x94BE}, //9956 #CJK UNIFIED IDEOGRAPH + {0xBCD9, 0x5047}, //9957 #CJK UNIFIED IDEOGRAPH + {0xBCDA, 0x7A3C}, //9958 #CJK UNIFIED IDEOGRAPH + {0xBCDB, 0x4EF7}, //9959 #CJK UNIFIED IDEOGRAPH + {0xBCDC, 0x67B6}, //9960 #CJK UNIFIED IDEOGRAPH + {0xBCDD, 0x9A7E}, //9961 #CJK UNIFIED IDEOGRAPH + {0xBCDE, 0x5AC1}, //9962 #CJK UNIFIED IDEOGRAPH + {0xBCDF, 0x6B7C}, //9963 #CJK UNIFIED IDEOGRAPH + {0xBCE0, 0x76D1}, //9964 #CJK UNIFIED IDEOGRAPH + {0xBCE1, 0x575A}, //9965 #CJK UNIFIED IDEOGRAPH + {0xBCE2, 0x5C16}, //9966 #CJK UNIFIED IDEOGRAPH + {0xBCE3, 0x7B3A}, //9967 #CJK UNIFIED IDEOGRAPH + {0xBCE4, 0x95F4}, //9968 #CJK UNIFIED IDEOGRAPH + {0xBCE5, 0x714E}, //9969 #CJK UNIFIED IDEOGRAPH + {0xBCE6, 0x517C}, //9970 #CJK UNIFIED IDEOGRAPH + {0xBCE7, 0x80A9}, //9971 #CJK UNIFIED IDEOGRAPH + {0xBCE8, 0x8270}, //9972 #CJK UNIFIED IDEOGRAPH + {0xBCE9, 0x5978}, //9973 #CJK UNIFIED IDEOGRAPH + {0xBCEA, 0x7F04}, //9974 #CJK UNIFIED IDEOGRAPH + {0xBCEB, 0x8327}, //9975 #CJK UNIFIED IDEOGRAPH + {0xBCEC, 0x68C0}, //9976 #CJK UNIFIED IDEOGRAPH + {0xBCED, 0x67EC}, //9977 #CJK UNIFIED IDEOGRAPH + {0xBCEE, 0x78B1}, //9978 #CJK UNIFIED IDEOGRAPH + {0xBCEF, 0x7877}, //9979 #CJK UNIFIED IDEOGRAPH + {0xBCF0, 0x62E3}, //9980 #CJK UNIFIED IDEOGRAPH + {0xBCF1, 0x6361}, //9981 #CJK UNIFIED IDEOGRAPH + {0xBCF2, 0x7B80}, //9982 #CJK UNIFIED IDEOGRAPH + {0xBCF3, 0x4FED}, //9983 #CJK UNIFIED IDEOGRAPH + {0xBCF4, 0x526A}, //9984 #CJK UNIFIED IDEOGRAPH + {0xBCF5, 0x51CF}, //9985 #CJK UNIFIED IDEOGRAPH + {0xBCF6, 0x8350}, //9986 #CJK UNIFIED IDEOGRAPH + {0xBCF7, 0x69DB}, //9987 #CJK UNIFIED IDEOGRAPH + {0xBCF8, 0x9274}, //9988 #CJK UNIFIED IDEOGRAPH + {0xBCF9, 0x8DF5}, //9989 #CJK UNIFIED IDEOGRAPH + {0xBCFA, 0x8D31}, //9990 #CJK UNIFIED IDEOGRAPH + {0xBCFB, 0x89C1}, //9991 #CJK UNIFIED IDEOGRAPH + {0xBCFC, 0x952E}, //9992 #CJK UNIFIED IDEOGRAPH + {0xBCFD, 0x7BAD}, //9993 #CJK UNIFIED IDEOGRAPH + {0xBCFE, 0x4EF6}, //9994 #CJK UNIFIED IDEOGRAPH + {0xBD40, 0x7D37}, //9995 #CJK UNIFIED IDEOGRAPH + {0xBD41, 0x7D38}, //9996 #CJK UNIFIED IDEOGRAPH + {0xBD42, 0x7D39}, //9997 #CJK UNIFIED IDEOGRAPH + {0xBD43, 0x7D3A}, //9998 #CJK UNIFIED IDEOGRAPH + {0xBD44, 0x7D3B}, //9999 #CJK UNIFIED IDEOGRAPH + {0xBD45, 0x7D3C}, //10000 #CJK UNIFIED IDEOGRAPH + {0xBD46, 0x7D3D}, //10001 #CJK UNIFIED IDEOGRAPH + {0xBD47, 0x7D3E}, //10002 #CJK UNIFIED IDEOGRAPH + {0xBD48, 0x7D3F}, //10003 #CJK UNIFIED IDEOGRAPH + {0xBD49, 0x7D40}, //10004 #CJK UNIFIED IDEOGRAPH + {0xBD4A, 0x7D41}, //10005 #CJK UNIFIED IDEOGRAPH + {0xBD4B, 0x7D42}, //10006 #CJK UNIFIED IDEOGRAPH + {0xBD4C, 0x7D43}, //10007 #CJK UNIFIED IDEOGRAPH + {0xBD4D, 0x7D44}, //10008 #CJK UNIFIED IDEOGRAPH + {0xBD4E, 0x7D45}, //10009 #CJK UNIFIED IDEOGRAPH + {0xBD4F, 0x7D46}, //10010 #CJK UNIFIED IDEOGRAPH + {0xBD50, 0x7D47}, //10011 #CJK UNIFIED IDEOGRAPH + {0xBD51, 0x7D48}, //10012 #CJK UNIFIED IDEOGRAPH + {0xBD52, 0x7D49}, //10013 #CJK UNIFIED IDEOGRAPH + {0xBD53, 0x7D4A}, //10014 #CJK UNIFIED IDEOGRAPH + {0xBD54, 0x7D4B}, //10015 #CJK UNIFIED IDEOGRAPH + {0xBD55, 0x7D4C}, //10016 #CJK UNIFIED IDEOGRAPH + {0xBD56, 0x7D4D}, //10017 #CJK UNIFIED IDEOGRAPH + {0xBD57, 0x7D4E}, //10018 #CJK UNIFIED IDEOGRAPH + {0xBD58, 0x7D4F}, //10019 #CJK UNIFIED IDEOGRAPH + {0xBD59, 0x7D50}, //10020 #CJK UNIFIED IDEOGRAPH + {0xBD5A, 0x7D51}, //10021 #CJK UNIFIED IDEOGRAPH + {0xBD5B, 0x7D52}, //10022 #CJK UNIFIED IDEOGRAPH + {0xBD5C, 0x7D53}, //10023 #CJK UNIFIED IDEOGRAPH + {0xBD5D, 0x7D54}, //10024 #CJK UNIFIED IDEOGRAPH + {0xBD5E, 0x7D55}, //10025 #CJK UNIFIED IDEOGRAPH + {0xBD5F, 0x7D56}, //10026 #CJK UNIFIED IDEOGRAPH + {0xBD60, 0x7D57}, //10027 #CJK UNIFIED IDEOGRAPH + {0xBD61, 0x7D58}, //10028 #CJK UNIFIED IDEOGRAPH + {0xBD62, 0x7D59}, //10029 #CJK UNIFIED IDEOGRAPH + {0xBD63, 0x7D5A}, //10030 #CJK UNIFIED IDEOGRAPH + {0xBD64, 0x7D5B}, //10031 #CJK UNIFIED IDEOGRAPH + {0xBD65, 0x7D5C}, //10032 #CJK UNIFIED IDEOGRAPH + {0xBD66, 0x7D5D}, //10033 #CJK UNIFIED IDEOGRAPH + {0xBD67, 0x7D5E}, //10034 #CJK UNIFIED IDEOGRAPH + {0xBD68, 0x7D5F}, //10035 #CJK UNIFIED IDEOGRAPH + {0xBD69, 0x7D60}, //10036 #CJK UNIFIED IDEOGRAPH + {0xBD6A, 0x7D61}, //10037 #CJK UNIFIED IDEOGRAPH + {0xBD6B, 0x7D62}, //10038 #CJK UNIFIED IDEOGRAPH + {0xBD6C, 0x7D63}, //10039 #CJK UNIFIED IDEOGRAPH + {0xBD6D, 0x7D64}, //10040 #CJK UNIFIED IDEOGRAPH + {0xBD6E, 0x7D65}, //10041 #CJK UNIFIED IDEOGRAPH + {0xBD6F, 0x7D66}, //10042 #CJK UNIFIED IDEOGRAPH + {0xBD70, 0x7D67}, //10043 #CJK UNIFIED IDEOGRAPH + {0xBD71, 0x7D68}, //10044 #CJK UNIFIED IDEOGRAPH + {0xBD72, 0x7D69}, //10045 #CJK UNIFIED IDEOGRAPH + {0xBD73, 0x7D6A}, //10046 #CJK UNIFIED IDEOGRAPH + {0xBD74, 0x7D6B}, //10047 #CJK UNIFIED IDEOGRAPH + {0xBD75, 0x7D6C}, //10048 #CJK UNIFIED IDEOGRAPH + {0xBD76, 0x7D6D}, //10049 #CJK UNIFIED IDEOGRAPH + {0xBD77, 0x7D6F}, //10050 #CJK UNIFIED IDEOGRAPH + {0xBD78, 0x7D70}, //10051 #CJK UNIFIED IDEOGRAPH + {0xBD79, 0x7D71}, //10052 #CJK UNIFIED IDEOGRAPH + {0xBD7A, 0x7D72}, //10053 #CJK UNIFIED IDEOGRAPH + {0xBD7B, 0x7D73}, //10054 #CJK UNIFIED IDEOGRAPH + {0xBD7C, 0x7D74}, //10055 #CJK UNIFIED IDEOGRAPH + {0xBD7D, 0x7D75}, //10056 #CJK UNIFIED IDEOGRAPH + {0xBD7E, 0x7D76}, //10057 #CJK UNIFIED IDEOGRAPH + {0xBD80, 0x7D78}, //10058 #CJK UNIFIED IDEOGRAPH + {0xBD81, 0x7D79}, //10059 #CJK UNIFIED IDEOGRAPH + {0xBD82, 0x7D7A}, //10060 #CJK UNIFIED IDEOGRAPH + {0xBD83, 0x7D7B}, //10061 #CJK UNIFIED IDEOGRAPH + {0xBD84, 0x7D7C}, //10062 #CJK UNIFIED IDEOGRAPH + {0xBD85, 0x7D7D}, //10063 #CJK UNIFIED IDEOGRAPH + {0xBD86, 0x7D7E}, //10064 #CJK UNIFIED IDEOGRAPH + {0xBD87, 0x7D7F}, //10065 #CJK UNIFIED IDEOGRAPH + {0xBD88, 0x7D80}, //10066 #CJK UNIFIED IDEOGRAPH + {0xBD89, 0x7D81}, //10067 #CJK UNIFIED IDEOGRAPH + {0xBD8A, 0x7D82}, //10068 #CJK UNIFIED IDEOGRAPH + {0xBD8B, 0x7D83}, //10069 #CJK UNIFIED IDEOGRAPH + {0xBD8C, 0x7D84}, //10070 #CJK UNIFIED IDEOGRAPH + {0xBD8D, 0x7D85}, //10071 #CJK UNIFIED IDEOGRAPH + {0xBD8E, 0x7D86}, //10072 #CJK UNIFIED IDEOGRAPH + {0xBD8F, 0x7D87}, //10073 #CJK UNIFIED IDEOGRAPH + {0xBD90, 0x7D88}, //10074 #CJK UNIFIED IDEOGRAPH + {0xBD91, 0x7D89}, //10075 #CJK UNIFIED IDEOGRAPH + {0xBD92, 0x7D8A}, //10076 #CJK UNIFIED IDEOGRAPH + {0xBD93, 0x7D8B}, //10077 #CJK UNIFIED IDEOGRAPH + {0xBD94, 0x7D8C}, //10078 #CJK UNIFIED IDEOGRAPH + {0xBD95, 0x7D8D}, //10079 #CJK UNIFIED IDEOGRAPH + {0xBD96, 0x7D8E}, //10080 #CJK UNIFIED IDEOGRAPH + {0xBD97, 0x7D8F}, //10081 #CJK UNIFIED IDEOGRAPH + {0xBD98, 0x7D90}, //10082 #CJK UNIFIED IDEOGRAPH + {0xBD99, 0x7D91}, //10083 #CJK UNIFIED IDEOGRAPH + {0xBD9A, 0x7D92}, //10084 #CJK UNIFIED IDEOGRAPH + {0xBD9B, 0x7D93}, //10085 #CJK UNIFIED IDEOGRAPH + {0xBD9C, 0x7D94}, //10086 #CJK UNIFIED IDEOGRAPH + {0xBD9D, 0x7D95}, //10087 #CJK UNIFIED IDEOGRAPH + {0xBD9E, 0x7D96}, //10088 #CJK UNIFIED IDEOGRAPH + {0xBD9F, 0x7D97}, //10089 #CJK UNIFIED IDEOGRAPH + {0xBDA0, 0x7D98}, //10090 #CJK UNIFIED IDEOGRAPH + {0xBDA1, 0x5065}, //10091 #CJK UNIFIED IDEOGRAPH + {0xBDA2, 0x8230}, //10092 #CJK UNIFIED IDEOGRAPH + {0xBDA3, 0x5251}, //10093 #CJK UNIFIED IDEOGRAPH + {0xBDA4, 0x996F}, //10094 #CJK UNIFIED IDEOGRAPH + {0xBDA5, 0x6E10}, //10095 #CJK UNIFIED IDEOGRAPH + {0xBDA6, 0x6E85}, //10096 #CJK UNIFIED IDEOGRAPH + {0xBDA7, 0x6DA7}, //10097 #CJK UNIFIED IDEOGRAPH + {0xBDA8, 0x5EFA}, //10098 #CJK UNIFIED IDEOGRAPH + {0xBDA9, 0x50F5}, //10099 #CJK UNIFIED IDEOGRAPH + {0xBDAA, 0x59DC}, //10100 #CJK UNIFIED IDEOGRAPH + {0xBDAB, 0x5C06}, //10101 #CJK UNIFIED IDEOGRAPH + {0xBDAC, 0x6D46}, //10102 #CJK UNIFIED IDEOGRAPH + {0xBDAD, 0x6C5F}, //10103 #CJK UNIFIED IDEOGRAPH + {0xBDAE, 0x7586}, //10104 #CJK UNIFIED IDEOGRAPH + {0xBDAF, 0x848B}, //10105 #CJK UNIFIED IDEOGRAPH + {0xBDB0, 0x6868}, //10106 #CJK UNIFIED IDEOGRAPH + {0xBDB1, 0x5956}, //10107 #CJK UNIFIED IDEOGRAPH + {0xBDB2, 0x8BB2}, //10108 #CJK UNIFIED IDEOGRAPH + {0xBDB3, 0x5320}, //10109 #CJK UNIFIED IDEOGRAPH + {0xBDB4, 0x9171}, //10110 #CJK UNIFIED IDEOGRAPH + {0xBDB5, 0x964D}, //10111 #CJK UNIFIED IDEOGRAPH + {0xBDB6, 0x8549}, //10112 #CJK UNIFIED IDEOGRAPH + {0xBDB7, 0x6912}, //10113 #CJK UNIFIED IDEOGRAPH + {0xBDB8, 0x7901}, //10114 #CJK UNIFIED IDEOGRAPH + {0xBDB9, 0x7126}, //10115 #CJK UNIFIED IDEOGRAPH + {0xBDBA, 0x80F6}, //10116 #CJK UNIFIED IDEOGRAPH + {0xBDBB, 0x4EA4}, //10117 #CJK UNIFIED IDEOGRAPH + {0xBDBC, 0x90CA}, //10118 #CJK UNIFIED IDEOGRAPH + {0xBDBD, 0x6D47}, //10119 #CJK UNIFIED IDEOGRAPH + {0xBDBE, 0x9A84}, //10120 #CJK UNIFIED IDEOGRAPH + {0xBDBF, 0x5A07}, //10121 #CJK UNIFIED IDEOGRAPH + {0xBDC0, 0x56BC}, //10122 #CJK UNIFIED IDEOGRAPH + {0xBDC1, 0x6405}, //10123 #CJK UNIFIED IDEOGRAPH + {0xBDC2, 0x94F0}, //10124 #CJK UNIFIED IDEOGRAPH + {0xBDC3, 0x77EB}, //10125 #CJK UNIFIED IDEOGRAPH + {0xBDC4, 0x4FA5}, //10126 #CJK UNIFIED IDEOGRAPH + {0xBDC5, 0x811A}, //10127 #CJK UNIFIED IDEOGRAPH + {0xBDC6, 0x72E1}, //10128 #CJK UNIFIED IDEOGRAPH + {0xBDC7, 0x89D2}, //10129 #CJK UNIFIED IDEOGRAPH + {0xBDC8, 0x997A}, //10130 #CJK UNIFIED IDEOGRAPH + {0xBDC9, 0x7F34}, //10131 #CJK UNIFIED IDEOGRAPH + {0xBDCA, 0x7EDE}, //10132 #CJK UNIFIED IDEOGRAPH + {0xBDCB, 0x527F}, //10133 #CJK UNIFIED IDEOGRAPH + {0xBDCC, 0x6559}, //10134 #CJK UNIFIED IDEOGRAPH + {0xBDCD, 0x9175}, //10135 #CJK UNIFIED IDEOGRAPH + {0xBDCE, 0x8F7F}, //10136 #CJK UNIFIED IDEOGRAPH + {0xBDCF, 0x8F83}, //10137 #CJK UNIFIED IDEOGRAPH + {0xBDD0, 0x53EB}, //10138 #CJK UNIFIED IDEOGRAPH + {0xBDD1, 0x7A96}, //10139 #CJK UNIFIED IDEOGRAPH + {0xBDD2, 0x63ED}, //10140 #CJK UNIFIED IDEOGRAPH + {0xBDD3, 0x63A5}, //10141 #CJK UNIFIED IDEOGRAPH + {0xBDD4, 0x7686}, //10142 #CJK UNIFIED IDEOGRAPH + {0xBDD5, 0x79F8}, //10143 #CJK UNIFIED IDEOGRAPH + {0xBDD6, 0x8857}, //10144 #CJK UNIFIED IDEOGRAPH + {0xBDD7, 0x9636}, //10145 #CJK UNIFIED IDEOGRAPH + {0xBDD8, 0x622A}, //10146 #CJK UNIFIED IDEOGRAPH + {0xBDD9, 0x52AB}, //10147 #CJK UNIFIED IDEOGRAPH + {0xBDDA, 0x8282}, //10148 #CJK UNIFIED IDEOGRAPH + {0xBDDB, 0x6854}, //10149 #CJK UNIFIED IDEOGRAPH + {0xBDDC, 0x6770}, //10150 #CJK UNIFIED IDEOGRAPH + {0xBDDD, 0x6377}, //10151 #CJK UNIFIED IDEOGRAPH + {0xBDDE, 0x776B}, //10152 #CJK UNIFIED IDEOGRAPH + {0xBDDF, 0x7AED}, //10153 #CJK UNIFIED IDEOGRAPH + {0xBDE0, 0x6D01}, //10154 #CJK UNIFIED IDEOGRAPH + {0xBDE1, 0x7ED3}, //10155 #CJK UNIFIED IDEOGRAPH + {0xBDE2, 0x89E3}, //10156 #CJK UNIFIED IDEOGRAPH + {0xBDE3, 0x59D0}, //10157 #CJK UNIFIED IDEOGRAPH + {0xBDE4, 0x6212}, //10158 #CJK UNIFIED IDEOGRAPH + {0xBDE5, 0x85C9}, //10159 #CJK UNIFIED IDEOGRAPH + {0xBDE6, 0x82A5}, //10160 #CJK UNIFIED IDEOGRAPH + {0xBDE7, 0x754C}, //10161 #CJK UNIFIED IDEOGRAPH + {0xBDE8, 0x501F}, //10162 #CJK UNIFIED IDEOGRAPH + {0xBDE9, 0x4ECB}, //10163 #CJK UNIFIED IDEOGRAPH + {0xBDEA, 0x75A5}, //10164 #CJK UNIFIED IDEOGRAPH + {0xBDEB, 0x8BEB}, //10165 #CJK UNIFIED IDEOGRAPH + {0xBDEC, 0x5C4A}, //10166 #CJK UNIFIED IDEOGRAPH + {0xBDED, 0x5DFE}, //10167 #CJK UNIFIED IDEOGRAPH + {0xBDEE, 0x7B4B}, //10168 #CJK UNIFIED IDEOGRAPH + {0xBDEF, 0x65A4}, //10169 #CJK UNIFIED IDEOGRAPH + {0xBDF0, 0x91D1}, //10170 #CJK UNIFIED IDEOGRAPH + {0xBDF1, 0x4ECA}, //10171 #CJK UNIFIED IDEOGRAPH + {0xBDF2, 0x6D25}, //10172 #CJK UNIFIED IDEOGRAPH + {0xBDF3, 0x895F}, //10173 #CJK UNIFIED IDEOGRAPH + {0xBDF4, 0x7D27}, //10174 #CJK UNIFIED IDEOGRAPH + {0xBDF5, 0x9526}, //10175 #CJK UNIFIED IDEOGRAPH + {0xBDF6, 0x4EC5}, //10176 #CJK UNIFIED IDEOGRAPH + {0xBDF7, 0x8C28}, //10177 #CJK UNIFIED IDEOGRAPH + {0xBDF8, 0x8FDB}, //10178 #CJK UNIFIED IDEOGRAPH + {0xBDF9, 0x9773}, //10179 #CJK UNIFIED IDEOGRAPH + {0xBDFA, 0x664B}, //10180 #CJK UNIFIED IDEOGRAPH + {0xBDFB, 0x7981}, //10181 #CJK UNIFIED IDEOGRAPH + {0xBDFC, 0x8FD1}, //10182 #CJK UNIFIED IDEOGRAPH + {0xBDFD, 0x70EC}, //10183 #CJK UNIFIED IDEOGRAPH + {0xBDFE, 0x6D78}, //10184 #CJK UNIFIED IDEOGRAPH + {0xBE40, 0x7D99}, //10185 #CJK UNIFIED IDEOGRAPH + {0xBE41, 0x7D9A}, //10186 #CJK UNIFIED IDEOGRAPH + {0xBE42, 0x7D9B}, //10187 #CJK UNIFIED IDEOGRAPH + {0xBE43, 0x7D9C}, //10188 #CJK UNIFIED IDEOGRAPH + {0xBE44, 0x7D9D}, //10189 #CJK UNIFIED IDEOGRAPH + {0xBE45, 0x7D9E}, //10190 #CJK UNIFIED IDEOGRAPH + {0xBE46, 0x7D9F}, //10191 #CJK UNIFIED IDEOGRAPH + {0xBE47, 0x7DA0}, //10192 #CJK UNIFIED IDEOGRAPH + {0xBE48, 0x7DA1}, //10193 #CJK UNIFIED IDEOGRAPH + {0xBE49, 0x7DA2}, //10194 #CJK UNIFIED IDEOGRAPH + {0xBE4A, 0x7DA3}, //10195 #CJK UNIFIED IDEOGRAPH + {0xBE4B, 0x7DA4}, //10196 #CJK UNIFIED IDEOGRAPH + {0xBE4C, 0x7DA5}, //10197 #CJK UNIFIED IDEOGRAPH + {0xBE4D, 0x7DA7}, //10198 #CJK UNIFIED IDEOGRAPH + {0xBE4E, 0x7DA8}, //10199 #CJK UNIFIED IDEOGRAPH + {0xBE4F, 0x7DA9}, //10200 #CJK UNIFIED IDEOGRAPH + {0xBE50, 0x7DAA}, //10201 #CJK UNIFIED IDEOGRAPH + {0xBE51, 0x7DAB}, //10202 #CJK UNIFIED IDEOGRAPH + {0xBE52, 0x7DAC}, //10203 #CJK UNIFIED IDEOGRAPH + {0xBE53, 0x7DAD}, //10204 #CJK UNIFIED IDEOGRAPH + {0xBE54, 0x7DAF}, //10205 #CJK UNIFIED IDEOGRAPH + {0xBE55, 0x7DB0}, //10206 #CJK UNIFIED IDEOGRAPH + {0xBE56, 0x7DB1}, //10207 #CJK UNIFIED IDEOGRAPH + {0xBE57, 0x7DB2}, //10208 #CJK UNIFIED IDEOGRAPH + {0xBE58, 0x7DB3}, //10209 #CJK UNIFIED IDEOGRAPH + {0xBE59, 0x7DB4}, //10210 #CJK UNIFIED IDEOGRAPH + {0xBE5A, 0x7DB5}, //10211 #CJK UNIFIED IDEOGRAPH + {0xBE5B, 0x7DB6}, //10212 #CJK UNIFIED IDEOGRAPH + {0xBE5C, 0x7DB7}, //10213 #CJK UNIFIED IDEOGRAPH + {0xBE5D, 0x7DB8}, //10214 #CJK UNIFIED IDEOGRAPH + {0xBE5E, 0x7DB9}, //10215 #CJK UNIFIED IDEOGRAPH + {0xBE5F, 0x7DBA}, //10216 #CJK UNIFIED IDEOGRAPH + {0xBE60, 0x7DBB}, //10217 #CJK UNIFIED IDEOGRAPH + {0xBE61, 0x7DBC}, //10218 #CJK UNIFIED IDEOGRAPH + {0xBE62, 0x7DBD}, //10219 #CJK UNIFIED IDEOGRAPH + {0xBE63, 0x7DBE}, //10220 #CJK UNIFIED IDEOGRAPH + {0xBE64, 0x7DBF}, //10221 #CJK UNIFIED IDEOGRAPH + {0xBE65, 0x7DC0}, //10222 #CJK UNIFIED IDEOGRAPH + {0xBE66, 0x7DC1}, //10223 #CJK UNIFIED IDEOGRAPH + {0xBE67, 0x7DC2}, //10224 #CJK UNIFIED IDEOGRAPH + {0xBE68, 0x7DC3}, //10225 #CJK UNIFIED IDEOGRAPH + {0xBE69, 0x7DC4}, //10226 #CJK UNIFIED IDEOGRAPH + {0xBE6A, 0x7DC5}, //10227 #CJK UNIFIED IDEOGRAPH + {0xBE6B, 0x7DC6}, //10228 #CJK UNIFIED IDEOGRAPH + {0xBE6C, 0x7DC7}, //10229 #CJK UNIFIED IDEOGRAPH + {0xBE6D, 0x7DC8}, //10230 #CJK UNIFIED IDEOGRAPH + {0xBE6E, 0x7DC9}, //10231 #CJK UNIFIED IDEOGRAPH + {0xBE6F, 0x7DCA}, //10232 #CJK UNIFIED IDEOGRAPH + {0xBE70, 0x7DCB}, //10233 #CJK UNIFIED IDEOGRAPH + {0xBE71, 0x7DCC}, //10234 #CJK UNIFIED IDEOGRAPH + {0xBE72, 0x7DCD}, //10235 #CJK UNIFIED IDEOGRAPH + {0xBE73, 0x7DCE}, //10236 #CJK UNIFIED IDEOGRAPH + {0xBE74, 0x7DCF}, //10237 #CJK UNIFIED IDEOGRAPH + {0xBE75, 0x7DD0}, //10238 #CJK UNIFIED IDEOGRAPH + {0xBE76, 0x7DD1}, //10239 #CJK UNIFIED IDEOGRAPH + {0xBE77, 0x7DD2}, //10240 #CJK UNIFIED IDEOGRAPH + {0xBE78, 0x7DD3}, //10241 #CJK UNIFIED IDEOGRAPH + {0xBE79, 0x7DD4}, //10242 #CJK UNIFIED IDEOGRAPH + {0xBE7A, 0x7DD5}, //10243 #CJK UNIFIED IDEOGRAPH + {0xBE7B, 0x7DD6}, //10244 #CJK UNIFIED IDEOGRAPH + {0xBE7C, 0x7DD7}, //10245 #CJK UNIFIED IDEOGRAPH + {0xBE7D, 0x7DD8}, //10246 #CJK UNIFIED IDEOGRAPH + {0xBE7E, 0x7DD9}, //10247 #CJK UNIFIED IDEOGRAPH + {0xBE80, 0x7DDA}, //10248 #CJK UNIFIED IDEOGRAPH + {0xBE81, 0x7DDB}, //10249 #CJK UNIFIED IDEOGRAPH + {0xBE82, 0x7DDC}, //10250 #CJK UNIFIED IDEOGRAPH + {0xBE83, 0x7DDD}, //10251 #CJK UNIFIED IDEOGRAPH + {0xBE84, 0x7DDE}, //10252 #CJK UNIFIED IDEOGRAPH + {0xBE85, 0x7DDF}, //10253 #CJK UNIFIED IDEOGRAPH + {0xBE86, 0x7DE0}, //10254 #CJK UNIFIED IDEOGRAPH + {0xBE87, 0x7DE1}, //10255 #CJK UNIFIED IDEOGRAPH + {0xBE88, 0x7DE2}, //10256 #CJK UNIFIED IDEOGRAPH + {0xBE89, 0x7DE3}, //10257 #CJK UNIFIED IDEOGRAPH + {0xBE8A, 0x7DE4}, //10258 #CJK UNIFIED IDEOGRAPH + {0xBE8B, 0x7DE5}, //10259 #CJK UNIFIED IDEOGRAPH + {0xBE8C, 0x7DE6}, //10260 #CJK UNIFIED IDEOGRAPH + {0xBE8D, 0x7DE7}, //10261 #CJK UNIFIED IDEOGRAPH + {0xBE8E, 0x7DE8}, //10262 #CJK UNIFIED IDEOGRAPH + {0xBE8F, 0x7DE9}, //10263 #CJK UNIFIED IDEOGRAPH + {0xBE90, 0x7DEA}, //10264 #CJK UNIFIED IDEOGRAPH + {0xBE91, 0x7DEB}, //10265 #CJK UNIFIED IDEOGRAPH + {0xBE92, 0x7DEC}, //10266 #CJK UNIFIED IDEOGRAPH + {0xBE93, 0x7DED}, //10267 #CJK UNIFIED IDEOGRAPH + {0xBE94, 0x7DEE}, //10268 #CJK UNIFIED IDEOGRAPH + {0xBE95, 0x7DEF}, //10269 #CJK UNIFIED IDEOGRAPH + {0xBE96, 0x7DF0}, //10270 #CJK UNIFIED IDEOGRAPH + {0xBE97, 0x7DF1}, //10271 #CJK UNIFIED IDEOGRAPH + {0xBE98, 0x7DF2}, //10272 #CJK UNIFIED IDEOGRAPH + {0xBE99, 0x7DF3}, //10273 #CJK UNIFIED IDEOGRAPH + {0xBE9A, 0x7DF4}, //10274 #CJK UNIFIED IDEOGRAPH + {0xBE9B, 0x7DF5}, //10275 #CJK UNIFIED IDEOGRAPH + {0xBE9C, 0x7DF6}, //10276 #CJK UNIFIED IDEOGRAPH + {0xBE9D, 0x7DF7}, //10277 #CJK UNIFIED IDEOGRAPH + {0xBE9E, 0x7DF8}, //10278 #CJK UNIFIED IDEOGRAPH + {0xBE9F, 0x7DF9}, //10279 #CJK UNIFIED IDEOGRAPH + {0xBEA0, 0x7DFA}, //10280 #CJK UNIFIED IDEOGRAPH + {0xBEA1, 0x5C3D}, //10281 #CJK UNIFIED IDEOGRAPH + {0xBEA2, 0x52B2}, //10282 #CJK UNIFIED IDEOGRAPH + {0xBEA3, 0x8346}, //10283 #CJK UNIFIED IDEOGRAPH + {0xBEA4, 0x5162}, //10284 #CJK UNIFIED IDEOGRAPH + {0xBEA5, 0x830E}, //10285 #CJK UNIFIED IDEOGRAPH + {0xBEA6, 0x775B}, //10286 #CJK UNIFIED IDEOGRAPH + {0xBEA7, 0x6676}, //10287 #CJK UNIFIED IDEOGRAPH + {0xBEA8, 0x9CB8}, //10288 #CJK UNIFIED IDEOGRAPH + {0xBEA9, 0x4EAC}, //10289 #CJK UNIFIED IDEOGRAPH + {0xBEAA, 0x60CA}, //10290 #CJK UNIFIED IDEOGRAPH + {0xBEAB, 0x7CBE}, //10291 #CJK UNIFIED IDEOGRAPH + {0xBEAC, 0x7CB3}, //10292 #CJK UNIFIED IDEOGRAPH + {0xBEAD, 0x7ECF}, //10293 #CJK UNIFIED IDEOGRAPH + {0xBEAE, 0x4E95}, //10294 #CJK UNIFIED IDEOGRAPH + {0xBEAF, 0x8B66}, //10295 #CJK UNIFIED IDEOGRAPH + {0xBEB0, 0x666F}, //10296 #CJK UNIFIED IDEOGRAPH + {0xBEB1, 0x9888}, //10297 #CJK UNIFIED IDEOGRAPH + {0xBEB2, 0x9759}, //10298 #CJK UNIFIED IDEOGRAPH + {0xBEB3, 0x5883}, //10299 #CJK UNIFIED IDEOGRAPH + {0xBEB4, 0x656C}, //10300 #CJK UNIFIED IDEOGRAPH + {0xBEB5, 0x955C}, //10301 #CJK UNIFIED IDEOGRAPH + {0xBEB6, 0x5F84}, //10302 #CJK UNIFIED IDEOGRAPH + {0xBEB7, 0x75C9}, //10303 #CJK UNIFIED IDEOGRAPH + {0xBEB8, 0x9756}, //10304 #CJK UNIFIED IDEOGRAPH + {0xBEB9, 0x7ADF}, //10305 #CJK UNIFIED IDEOGRAPH + {0xBEBA, 0x7ADE}, //10306 #CJK UNIFIED IDEOGRAPH + {0xBEBB, 0x51C0}, //10307 #CJK UNIFIED IDEOGRAPH + {0xBEBC, 0x70AF}, //10308 #CJK UNIFIED IDEOGRAPH + {0xBEBD, 0x7A98}, //10309 #CJK UNIFIED IDEOGRAPH + {0xBEBE, 0x63EA}, //10310 #CJK UNIFIED IDEOGRAPH + {0xBEBF, 0x7A76}, //10311 #CJK UNIFIED IDEOGRAPH + {0xBEC0, 0x7EA0}, //10312 #CJK UNIFIED IDEOGRAPH + {0xBEC1, 0x7396}, //10313 #CJK UNIFIED IDEOGRAPH + {0xBEC2, 0x97ED}, //10314 #CJK UNIFIED IDEOGRAPH + {0xBEC3, 0x4E45}, //10315 #CJK UNIFIED IDEOGRAPH + {0xBEC4, 0x7078}, //10316 #CJK UNIFIED IDEOGRAPH + {0xBEC5, 0x4E5D}, //10317 #CJK UNIFIED IDEOGRAPH + {0xBEC6, 0x9152}, //10318 #CJK UNIFIED IDEOGRAPH + {0xBEC7, 0x53A9}, //10319 #CJK UNIFIED IDEOGRAPH + {0xBEC8, 0x6551}, //10320 #CJK UNIFIED IDEOGRAPH + {0xBEC9, 0x65E7}, //10321 #CJK UNIFIED IDEOGRAPH + {0xBECA, 0x81FC}, //10322 #CJK UNIFIED IDEOGRAPH + {0xBECB, 0x8205}, //10323 #CJK UNIFIED IDEOGRAPH + {0xBECC, 0x548E}, //10324 #CJK UNIFIED IDEOGRAPH + {0xBECD, 0x5C31}, //10325 #CJK UNIFIED IDEOGRAPH + {0xBECE, 0x759A}, //10326 #CJK UNIFIED IDEOGRAPH + {0xBECF, 0x97A0}, //10327 #CJK UNIFIED IDEOGRAPH + {0xBED0, 0x62D8}, //10328 #CJK UNIFIED IDEOGRAPH + {0xBED1, 0x72D9}, //10329 #CJK UNIFIED IDEOGRAPH + {0xBED2, 0x75BD}, //10330 #CJK UNIFIED IDEOGRAPH + {0xBED3, 0x5C45}, //10331 #CJK UNIFIED IDEOGRAPH + {0xBED4, 0x9A79}, //10332 #CJK UNIFIED IDEOGRAPH + {0xBED5, 0x83CA}, //10333 #CJK UNIFIED IDEOGRAPH + {0xBED6, 0x5C40}, //10334 #CJK UNIFIED IDEOGRAPH + {0xBED7, 0x5480}, //10335 #CJK UNIFIED IDEOGRAPH + {0xBED8, 0x77E9}, //10336 #CJK UNIFIED IDEOGRAPH + {0xBED9, 0x4E3E}, //10337 #CJK UNIFIED IDEOGRAPH + {0xBEDA, 0x6CAE}, //10338 #CJK UNIFIED IDEOGRAPH + {0xBEDB, 0x805A}, //10339 #CJK UNIFIED IDEOGRAPH + {0xBEDC, 0x62D2}, //10340 #CJK UNIFIED IDEOGRAPH + {0xBEDD, 0x636E}, //10341 #CJK UNIFIED IDEOGRAPH + {0xBEDE, 0x5DE8}, //10342 #CJK UNIFIED IDEOGRAPH + {0xBEDF, 0x5177}, //10343 #CJK UNIFIED IDEOGRAPH + {0xBEE0, 0x8DDD}, //10344 #CJK UNIFIED IDEOGRAPH + {0xBEE1, 0x8E1E}, //10345 #CJK UNIFIED IDEOGRAPH + {0xBEE2, 0x952F}, //10346 #CJK UNIFIED IDEOGRAPH + {0xBEE3, 0x4FF1}, //10347 #CJK UNIFIED IDEOGRAPH + {0xBEE4, 0x53E5}, //10348 #CJK UNIFIED IDEOGRAPH + {0xBEE5, 0x60E7}, //10349 #CJK UNIFIED IDEOGRAPH + {0xBEE6, 0x70AC}, //10350 #CJK UNIFIED IDEOGRAPH + {0xBEE7, 0x5267}, //10351 #CJK UNIFIED IDEOGRAPH + {0xBEE8, 0x6350}, //10352 #CJK UNIFIED IDEOGRAPH + {0xBEE9, 0x9E43}, //10353 #CJK UNIFIED IDEOGRAPH + {0xBEEA, 0x5A1F}, //10354 #CJK UNIFIED IDEOGRAPH + {0xBEEB, 0x5026}, //10355 #CJK UNIFIED IDEOGRAPH + {0xBEEC, 0x7737}, //10356 #CJK UNIFIED IDEOGRAPH + {0xBEED, 0x5377}, //10357 #CJK UNIFIED IDEOGRAPH + {0xBEEE, 0x7EE2}, //10358 #CJK UNIFIED IDEOGRAPH + {0xBEEF, 0x6485}, //10359 #CJK UNIFIED IDEOGRAPH + {0xBEF0, 0x652B}, //10360 #CJK UNIFIED IDEOGRAPH + {0xBEF1, 0x6289}, //10361 #CJK UNIFIED IDEOGRAPH + {0xBEF2, 0x6398}, //10362 #CJK UNIFIED IDEOGRAPH + {0xBEF3, 0x5014}, //10363 #CJK UNIFIED IDEOGRAPH + {0xBEF4, 0x7235}, //10364 #CJK UNIFIED IDEOGRAPH + {0xBEF5, 0x89C9}, //10365 #CJK UNIFIED IDEOGRAPH + {0xBEF6, 0x51B3}, //10366 #CJK UNIFIED IDEOGRAPH + {0xBEF7, 0x8BC0}, //10367 #CJK UNIFIED IDEOGRAPH + {0xBEF8, 0x7EDD}, //10368 #CJK UNIFIED IDEOGRAPH + {0xBEF9, 0x5747}, //10369 #CJK UNIFIED IDEOGRAPH + {0xBEFA, 0x83CC}, //10370 #CJK UNIFIED IDEOGRAPH + {0xBEFB, 0x94A7}, //10371 #CJK UNIFIED IDEOGRAPH + {0xBEFC, 0x519B}, //10372 #CJK UNIFIED IDEOGRAPH + {0xBEFD, 0x541B}, //10373 #CJK UNIFIED IDEOGRAPH + {0xBEFE, 0x5CFB}, //10374 #CJK UNIFIED IDEOGRAPH + {0xBF40, 0x7DFB}, //10375 #CJK UNIFIED IDEOGRAPH + {0xBF41, 0x7DFC}, //10376 #CJK UNIFIED IDEOGRAPH + {0xBF42, 0x7DFD}, //10377 #CJK UNIFIED IDEOGRAPH + {0xBF43, 0x7DFE}, //10378 #CJK UNIFIED IDEOGRAPH + {0xBF44, 0x7DFF}, //10379 #CJK UNIFIED IDEOGRAPH + {0xBF45, 0x7E00}, //10380 #CJK UNIFIED IDEOGRAPH + {0xBF46, 0x7E01}, //10381 #CJK UNIFIED IDEOGRAPH + {0xBF47, 0x7E02}, //10382 #CJK UNIFIED IDEOGRAPH + {0xBF48, 0x7E03}, //10383 #CJK UNIFIED IDEOGRAPH + {0xBF49, 0x7E04}, //10384 #CJK UNIFIED IDEOGRAPH + {0xBF4A, 0x7E05}, //10385 #CJK UNIFIED IDEOGRAPH + {0xBF4B, 0x7E06}, //10386 #CJK UNIFIED IDEOGRAPH + {0xBF4C, 0x7E07}, //10387 #CJK UNIFIED IDEOGRAPH + {0xBF4D, 0x7E08}, //10388 #CJK UNIFIED IDEOGRAPH + {0xBF4E, 0x7E09}, //10389 #CJK UNIFIED IDEOGRAPH + {0xBF4F, 0x7E0A}, //10390 #CJK UNIFIED IDEOGRAPH + {0xBF50, 0x7E0B}, //10391 #CJK UNIFIED IDEOGRAPH + {0xBF51, 0x7E0C}, //10392 #CJK UNIFIED IDEOGRAPH + {0xBF52, 0x7E0D}, //10393 #CJK UNIFIED IDEOGRAPH + {0xBF53, 0x7E0E}, //10394 #CJK UNIFIED IDEOGRAPH + {0xBF54, 0x7E0F}, //10395 #CJK UNIFIED IDEOGRAPH + {0xBF55, 0x7E10}, //10396 #CJK UNIFIED IDEOGRAPH + {0xBF56, 0x7E11}, //10397 #CJK UNIFIED IDEOGRAPH + {0xBF57, 0x7E12}, //10398 #CJK UNIFIED IDEOGRAPH + {0xBF58, 0x7E13}, //10399 #CJK UNIFIED IDEOGRAPH + {0xBF59, 0x7E14}, //10400 #CJK UNIFIED IDEOGRAPH + {0xBF5A, 0x7E15}, //10401 #CJK UNIFIED IDEOGRAPH + {0xBF5B, 0x7E16}, //10402 #CJK UNIFIED IDEOGRAPH + {0xBF5C, 0x7E17}, //10403 #CJK UNIFIED IDEOGRAPH + {0xBF5D, 0x7E18}, //10404 #CJK UNIFIED IDEOGRAPH + {0xBF5E, 0x7E19}, //10405 #CJK UNIFIED IDEOGRAPH + {0xBF5F, 0x7E1A}, //10406 #CJK UNIFIED IDEOGRAPH + {0xBF60, 0x7E1B}, //10407 #CJK UNIFIED IDEOGRAPH + {0xBF61, 0x7E1C}, //10408 #CJK UNIFIED IDEOGRAPH + {0xBF62, 0x7E1D}, //10409 #CJK UNIFIED IDEOGRAPH + {0xBF63, 0x7E1E}, //10410 #CJK UNIFIED IDEOGRAPH + {0xBF64, 0x7E1F}, //10411 #CJK UNIFIED IDEOGRAPH + {0xBF65, 0x7E20}, //10412 #CJK UNIFIED IDEOGRAPH + {0xBF66, 0x7E21}, //10413 #CJK UNIFIED IDEOGRAPH + {0xBF67, 0x7E22}, //10414 #CJK UNIFIED IDEOGRAPH + {0xBF68, 0x7E23}, //10415 #CJK UNIFIED IDEOGRAPH + {0xBF69, 0x7E24}, //10416 #CJK UNIFIED IDEOGRAPH + {0xBF6A, 0x7E25}, //10417 #CJK UNIFIED IDEOGRAPH + {0xBF6B, 0x7E26}, //10418 #CJK UNIFIED IDEOGRAPH + {0xBF6C, 0x7E27}, //10419 #CJK UNIFIED IDEOGRAPH + {0xBF6D, 0x7E28}, //10420 #CJK UNIFIED IDEOGRAPH + {0xBF6E, 0x7E29}, //10421 #CJK UNIFIED IDEOGRAPH + {0xBF6F, 0x7E2A}, //10422 #CJK UNIFIED IDEOGRAPH + {0xBF70, 0x7E2B}, //10423 #CJK UNIFIED IDEOGRAPH + {0xBF71, 0x7E2C}, //10424 #CJK UNIFIED IDEOGRAPH + {0xBF72, 0x7E2D}, //10425 #CJK UNIFIED IDEOGRAPH + {0xBF73, 0x7E2E}, //10426 #CJK UNIFIED IDEOGRAPH + {0xBF74, 0x7E2F}, //10427 #CJK UNIFIED IDEOGRAPH + {0xBF75, 0x7E30}, //10428 #CJK UNIFIED IDEOGRAPH + {0xBF76, 0x7E31}, //10429 #CJK UNIFIED IDEOGRAPH + {0xBF77, 0x7E32}, //10430 #CJK UNIFIED IDEOGRAPH + {0xBF78, 0x7E33}, //10431 #CJK UNIFIED IDEOGRAPH + {0xBF79, 0x7E34}, //10432 #CJK UNIFIED IDEOGRAPH + {0xBF7A, 0x7E35}, //10433 #CJK UNIFIED IDEOGRAPH + {0xBF7B, 0x7E36}, //10434 #CJK UNIFIED IDEOGRAPH + {0xBF7C, 0x7E37}, //10435 #CJK UNIFIED IDEOGRAPH + {0xBF7D, 0x7E38}, //10436 #CJK UNIFIED IDEOGRAPH + {0xBF7E, 0x7E39}, //10437 #CJK UNIFIED IDEOGRAPH + {0xBF80, 0x7E3A}, //10438 #CJK UNIFIED IDEOGRAPH + {0xBF81, 0x7E3C}, //10439 #CJK UNIFIED IDEOGRAPH + {0xBF82, 0x7E3D}, //10440 #CJK UNIFIED IDEOGRAPH + {0xBF83, 0x7E3E}, //10441 #CJK UNIFIED IDEOGRAPH + {0xBF84, 0x7E3F}, //10442 #CJK UNIFIED IDEOGRAPH + {0xBF85, 0x7E40}, //10443 #CJK UNIFIED IDEOGRAPH + {0xBF86, 0x7E42}, //10444 #CJK UNIFIED IDEOGRAPH + {0xBF87, 0x7E43}, //10445 #CJK UNIFIED IDEOGRAPH + {0xBF88, 0x7E44}, //10446 #CJK UNIFIED IDEOGRAPH + {0xBF89, 0x7E45}, //10447 #CJK UNIFIED IDEOGRAPH + {0xBF8A, 0x7E46}, //10448 #CJK UNIFIED IDEOGRAPH + {0xBF8B, 0x7E48}, //10449 #CJK UNIFIED IDEOGRAPH + {0xBF8C, 0x7E49}, //10450 #CJK UNIFIED IDEOGRAPH + {0xBF8D, 0x7E4A}, //10451 #CJK UNIFIED IDEOGRAPH + {0xBF8E, 0x7E4B}, //10452 #CJK UNIFIED IDEOGRAPH + {0xBF8F, 0x7E4C}, //10453 #CJK UNIFIED IDEOGRAPH + {0xBF90, 0x7E4D}, //10454 #CJK UNIFIED IDEOGRAPH + {0xBF91, 0x7E4E}, //10455 #CJK UNIFIED IDEOGRAPH + {0xBF92, 0x7E4F}, //10456 #CJK UNIFIED IDEOGRAPH + {0xBF93, 0x7E50}, //10457 #CJK UNIFIED IDEOGRAPH + {0xBF94, 0x7E51}, //10458 #CJK UNIFIED IDEOGRAPH + {0xBF95, 0x7E52}, //10459 #CJK UNIFIED IDEOGRAPH + {0xBF96, 0x7E53}, //10460 #CJK UNIFIED IDEOGRAPH + {0xBF97, 0x7E54}, //10461 #CJK UNIFIED IDEOGRAPH + {0xBF98, 0x7E55}, //10462 #CJK UNIFIED IDEOGRAPH + {0xBF99, 0x7E56}, //10463 #CJK UNIFIED IDEOGRAPH + {0xBF9A, 0x7E57}, //10464 #CJK UNIFIED IDEOGRAPH + {0xBF9B, 0x7E58}, //10465 #CJK UNIFIED IDEOGRAPH + {0xBF9C, 0x7E59}, //10466 #CJK UNIFIED IDEOGRAPH + {0xBF9D, 0x7E5A}, //10467 #CJK UNIFIED IDEOGRAPH + {0xBF9E, 0x7E5B}, //10468 #CJK UNIFIED IDEOGRAPH + {0xBF9F, 0x7E5C}, //10469 #CJK UNIFIED IDEOGRAPH + {0xBFA0, 0x7E5D}, //10470 #CJK UNIFIED IDEOGRAPH + {0xBFA1, 0x4FCA}, //10471 #CJK UNIFIED IDEOGRAPH + {0xBFA2, 0x7AE3}, //10472 #CJK UNIFIED IDEOGRAPH + {0xBFA3, 0x6D5A}, //10473 #CJK UNIFIED IDEOGRAPH + {0xBFA4, 0x90E1}, //10474 #CJK UNIFIED IDEOGRAPH + {0xBFA5, 0x9A8F}, //10475 #CJK UNIFIED IDEOGRAPH + {0xBFA6, 0x5580}, //10476 #CJK UNIFIED IDEOGRAPH + {0xBFA7, 0x5496}, //10477 #CJK UNIFIED IDEOGRAPH + {0xBFA8, 0x5361}, //10478 #CJK UNIFIED IDEOGRAPH + {0xBFA9, 0x54AF}, //10479 #CJK UNIFIED IDEOGRAPH + {0xBFAA, 0x5F00}, //10480 #CJK UNIFIED IDEOGRAPH + {0xBFAB, 0x63E9}, //10481 #CJK UNIFIED IDEOGRAPH + {0xBFAC, 0x6977}, //10482 #CJK UNIFIED IDEOGRAPH + {0xBFAD, 0x51EF}, //10483 #CJK UNIFIED IDEOGRAPH + {0xBFAE, 0x6168}, //10484 #CJK UNIFIED IDEOGRAPH + {0xBFAF, 0x520A}, //10485 #CJK UNIFIED IDEOGRAPH + {0xBFB0, 0x582A}, //10486 #CJK UNIFIED IDEOGRAPH + {0xBFB1, 0x52D8}, //10487 #CJK UNIFIED IDEOGRAPH + {0xBFB2, 0x574E}, //10488 #CJK UNIFIED IDEOGRAPH + {0xBFB3, 0x780D}, //10489 #CJK UNIFIED IDEOGRAPH + {0xBFB4, 0x770B}, //10490 #CJK UNIFIED IDEOGRAPH + {0xBFB5, 0x5EB7}, //10491 #CJK UNIFIED IDEOGRAPH + {0xBFB6, 0x6177}, //10492 #CJK UNIFIED IDEOGRAPH + {0xBFB7, 0x7CE0}, //10493 #CJK UNIFIED IDEOGRAPH + {0xBFB8, 0x625B}, //10494 #CJK UNIFIED IDEOGRAPH + {0xBFB9, 0x6297}, //10495 #CJK UNIFIED IDEOGRAPH + {0xBFBA, 0x4EA2}, //10496 #CJK UNIFIED IDEOGRAPH + {0xBFBB, 0x7095}, //10497 #CJK UNIFIED IDEOGRAPH + {0xBFBC, 0x8003}, //10498 #CJK UNIFIED IDEOGRAPH + {0xBFBD, 0x62F7}, //10499 #CJK UNIFIED IDEOGRAPH + {0xBFBE, 0x70E4}, //10500 #CJK UNIFIED IDEOGRAPH + {0xBFBF, 0x9760}, //10501 #CJK UNIFIED IDEOGRAPH + {0xBFC0, 0x5777}, //10502 #CJK UNIFIED IDEOGRAPH + {0xBFC1, 0x82DB}, //10503 #CJK UNIFIED IDEOGRAPH + {0xBFC2, 0x67EF}, //10504 #CJK UNIFIED IDEOGRAPH + {0xBFC3, 0x68F5}, //10505 #CJK UNIFIED IDEOGRAPH + {0xBFC4, 0x78D5}, //10506 #CJK UNIFIED IDEOGRAPH + {0xBFC5, 0x9897}, //10507 #CJK UNIFIED IDEOGRAPH + {0xBFC6, 0x79D1}, //10508 #CJK UNIFIED IDEOGRAPH + {0xBFC7, 0x58F3}, //10509 #CJK UNIFIED IDEOGRAPH + {0xBFC8, 0x54B3}, //10510 #CJK UNIFIED IDEOGRAPH + {0xBFC9, 0x53EF}, //10511 #CJK UNIFIED IDEOGRAPH + {0xBFCA, 0x6E34}, //10512 #CJK UNIFIED IDEOGRAPH + {0xBFCB, 0x514B}, //10513 #CJK UNIFIED IDEOGRAPH + {0xBFCC, 0x523B}, //10514 #CJK UNIFIED IDEOGRAPH + {0xBFCD, 0x5BA2}, //10515 #CJK UNIFIED IDEOGRAPH + {0xBFCE, 0x8BFE}, //10516 #CJK UNIFIED IDEOGRAPH + {0xBFCF, 0x80AF}, //10517 #CJK UNIFIED IDEOGRAPH + {0xBFD0, 0x5543}, //10518 #CJK UNIFIED IDEOGRAPH + {0xBFD1, 0x57A6}, //10519 #CJK UNIFIED IDEOGRAPH + {0xBFD2, 0x6073}, //10520 #CJK UNIFIED IDEOGRAPH + {0xBFD3, 0x5751}, //10521 #CJK UNIFIED IDEOGRAPH + {0xBFD4, 0x542D}, //10522 #CJK UNIFIED IDEOGRAPH + {0xBFD5, 0x7A7A}, //10523 #CJK UNIFIED IDEOGRAPH + {0xBFD6, 0x6050}, //10524 #CJK UNIFIED IDEOGRAPH + {0xBFD7, 0x5B54}, //10525 #CJK UNIFIED IDEOGRAPH + {0xBFD8, 0x63A7}, //10526 #CJK UNIFIED IDEOGRAPH + {0xBFD9, 0x62A0}, //10527 #CJK UNIFIED IDEOGRAPH + {0xBFDA, 0x53E3}, //10528 #CJK UNIFIED IDEOGRAPH + {0xBFDB, 0x6263}, //10529 #CJK UNIFIED IDEOGRAPH + {0xBFDC, 0x5BC7}, //10530 #CJK UNIFIED IDEOGRAPH + {0xBFDD, 0x67AF}, //10531 #CJK UNIFIED IDEOGRAPH + {0xBFDE, 0x54ED}, //10532 #CJK UNIFIED IDEOGRAPH + {0xBFDF, 0x7A9F}, //10533 #CJK UNIFIED IDEOGRAPH + {0xBFE0, 0x82E6}, //10534 #CJK UNIFIED IDEOGRAPH + {0xBFE1, 0x9177}, //10535 #CJK UNIFIED IDEOGRAPH + {0xBFE2, 0x5E93}, //10536 #CJK UNIFIED IDEOGRAPH + {0xBFE3, 0x88E4}, //10537 #CJK UNIFIED IDEOGRAPH + {0xBFE4, 0x5938}, //10538 #CJK UNIFIED IDEOGRAPH + {0xBFE5, 0x57AE}, //10539 #CJK UNIFIED IDEOGRAPH + {0xBFE6, 0x630E}, //10540 #CJK UNIFIED IDEOGRAPH + {0xBFE7, 0x8DE8}, //10541 #CJK UNIFIED IDEOGRAPH + {0xBFE8, 0x80EF}, //10542 #CJK UNIFIED IDEOGRAPH + {0xBFE9, 0x5757}, //10543 #CJK UNIFIED IDEOGRAPH + {0xBFEA, 0x7B77}, //10544 #CJK UNIFIED IDEOGRAPH + {0xBFEB, 0x4FA9}, //10545 #CJK UNIFIED IDEOGRAPH + {0xBFEC, 0x5FEB}, //10546 #CJK UNIFIED IDEOGRAPH + {0xBFED, 0x5BBD}, //10547 #CJK UNIFIED IDEOGRAPH + {0xBFEE, 0x6B3E}, //10548 #CJK UNIFIED IDEOGRAPH + {0xBFEF, 0x5321}, //10549 #CJK UNIFIED IDEOGRAPH + {0xBFF0, 0x7B50}, //10550 #CJK UNIFIED IDEOGRAPH + {0xBFF1, 0x72C2}, //10551 #CJK UNIFIED IDEOGRAPH + {0xBFF2, 0x6846}, //10552 #CJK UNIFIED IDEOGRAPH + {0xBFF3, 0x77FF}, //10553 #CJK UNIFIED IDEOGRAPH + {0xBFF4, 0x7736}, //10554 #CJK UNIFIED IDEOGRAPH + {0xBFF5, 0x65F7}, //10555 #CJK UNIFIED IDEOGRAPH + {0xBFF6, 0x51B5}, //10556 #CJK UNIFIED IDEOGRAPH + {0xBFF7, 0x4E8F}, //10557 #CJK UNIFIED IDEOGRAPH + {0xBFF8, 0x76D4}, //10558 #CJK UNIFIED IDEOGRAPH + {0xBFF9, 0x5CBF}, //10559 #CJK UNIFIED IDEOGRAPH + {0xBFFA, 0x7AA5}, //10560 #CJK UNIFIED IDEOGRAPH + {0xBFFB, 0x8475}, //10561 #CJK UNIFIED IDEOGRAPH + {0xBFFC, 0x594E}, //10562 #CJK UNIFIED IDEOGRAPH + {0xBFFD, 0x9B41}, //10563 #CJK UNIFIED IDEOGRAPH + {0xBFFE, 0x5080}, //10564 #CJK UNIFIED IDEOGRAPH + {0xC040, 0x7E5E}, //10565 #CJK UNIFIED IDEOGRAPH + {0xC041, 0x7E5F}, //10566 #CJK UNIFIED IDEOGRAPH + {0xC042, 0x7E60}, //10567 #CJK UNIFIED IDEOGRAPH + {0xC043, 0x7E61}, //10568 #CJK UNIFIED IDEOGRAPH + {0xC044, 0x7E62}, //10569 #CJK UNIFIED IDEOGRAPH + {0xC045, 0x7E63}, //10570 #CJK UNIFIED IDEOGRAPH + {0xC046, 0x7E64}, //10571 #CJK UNIFIED IDEOGRAPH + {0xC047, 0x7E65}, //10572 #CJK UNIFIED IDEOGRAPH + {0xC048, 0x7E66}, //10573 #CJK UNIFIED IDEOGRAPH + {0xC049, 0x7E67}, //10574 #CJK UNIFIED IDEOGRAPH + {0xC04A, 0x7E68}, //10575 #CJK UNIFIED IDEOGRAPH + {0xC04B, 0x7E69}, //10576 #CJK UNIFIED IDEOGRAPH + {0xC04C, 0x7E6A}, //10577 #CJK UNIFIED IDEOGRAPH + {0xC04D, 0x7E6B}, //10578 #CJK UNIFIED IDEOGRAPH + {0xC04E, 0x7E6C}, //10579 #CJK UNIFIED IDEOGRAPH + {0xC04F, 0x7E6D}, //10580 #CJK UNIFIED IDEOGRAPH + {0xC050, 0x7E6E}, //10581 #CJK UNIFIED IDEOGRAPH + {0xC051, 0x7E6F}, //10582 #CJK UNIFIED IDEOGRAPH + {0xC052, 0x7E70}, //10583 #CJK UNIFIED IDEOGRAPH + {0xC053, 0x7E71}, //10584 #CJK UNIFIED IDEOGRAPH + {0xC054, 0x7E72}, //10585 #CJK UNIFIED IDEOGRAPH + {0xC055, 0x7E73}, //10586 #CJK UNIFIED IDEOGRAPH + {0xC056, 0x7E74}, //10587 #CJK UNIFIED IDEOGRAPH + {0xC057, 0x7E75}, //10588 #CJK UNIFIED IDEOGRAPH + {0xC058, 0x7E76}, //10589 #CJK UNIFIED IDEOGRAPH + {0xC059, 0x7E77}, //10590 #CJK UNIFIED IDEOGRAPH + {0xC05A, 0x7E78}, //10591 #CJK UNIFIED IDEOGRAPH + {0xC05B, 0x7E79}, //10592 #CJK UNIFIED IDEOGRAPH + {0xC05C, 0x7E7A}, //10593 #CJK UNIFIED IDEOGRAPH + {0xC05D, 0x7E7B}, //10594 #CJK UNIFIED IDEOGRAPH + {0xC05E, 0x7E7C}, //10595 #CJK UNIFIED IDEOGRAPH + {0xC05F, 0x7E7D}, //10596 #CJK UNIFIED IDEOGRAPH + {0xC060, 0x7E7E}, //10597 #CJK UNIFIED IDEOGRAPH + {0xC061, 0x7E7F}, //10598 #CJK UNIFIED IDEOGRAPH + {0xC062, 0x7E80}, //10599 #CJK UNIFIED IDEOGRAPH + {0xC063, 0x7E81}, //10600 #CJK UNIFIED IDEOGRAPH + {0xC064, 0x7E83}, //10601 #CJK UNIFIED IDEOGRAPH + {0xC065, 0x7E84}, //10602 #CJK UNIFIED IDEOGRAPH + {0xC066, 0x7E85}, //10603 #CJK UNIFIED IDEOGRAPH + {0xC067, 0x7E86}, //10604 #CJK UNIFIED IDEOGRAPH + {0xC068, 0x7E87}, //10605 #CJK UNIFIED IDEOGRAPH + {0xC069, 0x7E88}, //10606 #CJK UNIFIED IDEOGRAPH + {0xC06A, 0x7E89}, //10607 #CJK UNIFIED IDEOGRAPH + {0xC06B, 0x7E8A}, //10608 #CJK UNIFIED IDEOGRAPH + {0xC06C, 0x7E8B}, //10609 #CJK UNIFIED IDEOGRAPH + {0xC06D, 0x7E8C}, //10610 #CJK UNIFIED IDEOGRAPH + {0xC06E, 0x7E8D}, //10611 #CJK UNIFIED IDEOGRAPH + {0xC06F, 0x7E8E}, //10612 #CJK UNIFIED IDEOGRAPH + {0xC070, 0x7E8F}, //10613 #CJK UNIFIED IDEOGRAPH + {0xC071, 0x7E90}, //10614 #CJK UNIFIED IDEOGRAPH + {0xC072, 0x7E91}, //10615 #CJK UNIFIED IDEOGRAPH + {0xC073, 0x7E92}, //10616 #CJK UNIFIED IDEOGRAPH + {0xC074, 0x7E93}, //10617 #CJK UNIFIED IDEOGRAPH + {0xC075, 0x7E94}, //10618 #CJK UNIFIED IDEOGRAPH + {0xC076, 0x7E95}, //10619 #CJK UNIFIED IDEOGRAPH + {0xC077, 0x7E96}, //10620 #CJK UNIFIED IDEOGRAPH + {0xC078, 0x7E97}, //10621 #CJK UNIFIED IDEOGRAPH + {0xC079, 0x7E98}, //10622 #CJK UNIFIED IDEOGRAPH + {0xC07A, 0x7E99}, //10623 #CJK UNIFIED IDEOGRAPH + {0xC07B, 0x7E9A}, //10624 #CJK UNIFIED IDEOGRAPH + {0xC07C, 0x7E9C}, //10625 #CJK UNIFIED IDEOGRAPH + {0xC07D, 0x7E9D}, //10626 #CJK UNIFIED IDEOGRAPH + {0xC07E, 0x7E9E}, //10627 #CJK UNIFIED IDEOGRAPH + {0xC080, 0x7EAE}, //10628 #CJK UNIFIED IDEOGRAPH + {0xC081, 0x7EB4}, //10629 #CJK UNIFIED IDEOGRAPH + {0xC082, 0x7EBB}, //10630 #CJK UNIFIED IDEOGRAPH + {0xC083, 0x7EBC}, //10631 #CJK UNIFIED IDEOGRAPH + {0xC084, 0x7ED6}, //10632 #CJK UNIFIED IDEOGRAPH + {0xC085, 0x7EE4}, //10633 #CJK UNIFIED IDEOGRAPH + {0xC086, 0x7EEC}, //10634 #CJK UNIFIED IDEOGRAPH + {0xC087, 0x7EF9}, //10635 #CJK UNIFIED IDEOGRAPH + {0xC088, 0x7F0A}, //10636 #CJK UNIFIED IDEOGRAPH + {0xC089, 0x7F10}, //10637 #CJK UNIFIED IDEOGRAPH + {0xC08A, 0x7F1E}, //10638 #CJK UNIFIED IDEOGRAPH + {0xC08B, 0x7F37}, //10639 #CJK UNIFIED IDEOGRAPH + {0xC08C, 0x7F39}, //10640 #CJK UNIFIED IDEOGRAPH + {0xC08D, 0x7F3B}, //10641 #CJK UNIFIED IDEOGRAPH + {0xC08E, 0x7F3C}, //10642 #CJK UNIFIED IDEOGRAPH + {0xC08F, 0x7F3D}, //10643 #CJK UNIFIED IDEOGRAPH + {0xC090, 0x7F3E}, //10644 #CJK UNIFIED IDEOGRAPH + {0xC091, 0x7F3F}, //10645 #CJK UNIFIED IDEOGRAPH + {0xC092, 0x7F40}, //10646 #CJK UNIFIED IDEOGRAPH + {0xC093, 0x7F41}, //10647 #CJK UNIFIED IDEOGRAPH + {0xC094, 0x7F43}, //10648 #CJK UNIFIED IDEOGRAPH + {0xC095, 0x7F46}, //10649 #CJK UNIFIED IDEOGRAPH + {0xC096, 0x7F47}, //10650 #CJK UNIFIED IDEOGRAPH + {0xC097, 0x7F48}, //10651 #CJK UNIFIED IDEOGRAPH + {0xC098, 0x7F49}, //10652 #CJK UNIFIED IDEOGRAPH + {0xC099, 0x7F4A}, //10653 #CJK UNIFIED IDEOGRAPH + {0xC09A, 0x7F4B}, //10654 #CJK UNIFIED IDEOGRAPH + {0xC09B, 0x7F4C}, //10655 #CJK UNIFIED IDEOGRAPH + {0xC09C, 0x7F4D}, //10656 #CJK UNIFIED IDEOGRAPH + {0xC09D, 0x7F4E}, //10657 #CJK UNIFIED IDEOGRAPH + {0xC09E, 0x7F4F}, //10658 #CJK UNIFIED IDEOGRAPH + {0xC09F, 0x7F52}, //10659 #CJK UNIFIED IDEOGRAPH + {0xC0A0, 0x7F53}, //10660 #CJK UNIFIED IDEOGRAPH + {0xC0A1, 0x9988}, //10661 #CJK UNIFIED IDEOGRAPH + {0xC0A2, 0x6127}, //10662 #CJK UNIFIED IDEOGRAPH + {0xC0A3, 0x6E83}, //10663 #CJK UNIFIED IDEOGRAPH + {0xC0A4, 0x5764}, //10664 #CJK UNIFIED IDEOGRAPH + {0xC0A5, 0x6606}, //10665 #CJK UNIFIED IDEOGRAPH + {0xC0A6, 0x6346}, //10666 #CJK UNIFIED IDEOGRAPH + {0xC0A7, 0x56F0}, //10667 #CJK UNIFIED IDEOGRAPH + {0xC0A8, 0x62EC}, //10668 #CJK UNIFIED IDEOGRAPH + {0xC0A9, 0x6269}, //10669 #CJK UNIFIED IDEOGRAPH + {0xC0AA, 0x5ED3}, //10670 #CJK UNIFIED IDEOGRAPH + {0xC0AB, 0x9614}, //10671 #CJK UNIFIED IDEOGRAPH + {0xC0AC, 0x5783}, //10672 #CJK UNIFIED IDEOGRAPH + {0xC0AD, 0x62C9}, //10673 #CJK UNIFIED IDEOGRAPH + {0xC0AE, 0x5587}, //10674 #CJK UNIFIED IDEOGRAPH + {0xC0AF, 0x8721}, //10675 #CJK UNIFIED IDEOGRAPH + {0xC0B0, 0x814A}, //10676 #CJK UNIFIED IDEOGRAPH + {0xC0B1, 0x8FA3}, //10677 #CJK UNIFIED IDEOGRAPH + {0xC0B2, 0x5566}, //10678 #CJK UNIFIED IDEOGRAPH + {0xC0B3, 0x83B1}, //10679 #CJK UNIFIED IDEOGRAPH + {0xC0B4, 0x6765}, //10680 #CJK UNIFIED IDEOGRAPH + {0xC0B5, 0x8D56}, //10681 #CJK UNIFIED IDEOGRAPH + {0xC0B6, 0x84DD}, //10682 #CJK UNIFIED IDEOGRAPH + {0xC0B7, 0x5A6A}, //10683 #CJK UNIFIED IDEOGRAPH + {0xC0B8, 0x680F}, //10684 #CJK UNIFIED IDEOGRAPH + {0xC0B9, 0x62E6}, //10685 #CJK UNIFIED IDEOGRAPH + {0xC0BA, 0x7BEE}, //10686 #CJK UNIFIED IDEOGRAPH + {0xC0BB, 0x9611}, //10687 #CJK UNIFIED IDEOGRAPH + {0xC0BC, 0x5170}, //10688 #CJK UNIFIED IDEOGRAPH + {0xC0BD, 0x6F9C}, //10689 #CJK UNIFIED IDEOGRAPH + {0xC0BE, 0x8C30}, //10690 #CJK UNIFIED IDEOGRAPH + {0xC0BF, 0x63FD}, //10691 #CJK UNIFIED IDEOGRAPH + {0xC0C0, 0x89C8}, //10692 #CJK UNIFIED IDEOGRAPH + {0xC0C1, 0x61D2}, //10693 #CJK UNIFIED IDEOGRAPH + {0xC0C2, 0x7F06}, //10694 #CJK UNIFIED IDEOGRAPH + {0xC0C3, 0x70C2}, //10695 #CJK UNIFIED IDEOGRAPH + {0xC0C4, 0x6EE5}, //10696 #CJK UNIFIED IDEOGRAPH + {0xC0C5, 0x7405}, //10697 #CJK UNIFIED IDEOGRAPH + {0xC0C6, 0x6994}, //10698 #CJK UNIFIED IDEOGRAPH + {0xC0C7, 0x72FC}, //10699 #CJK UNIFIED IDEOGRAPH + {0xC0C8, 0x5ECA}, //10700 #CJK UNIFIED IDEOGRAPH + {0xC0C9, 0x90CE}, //10701 #CJK UNIFIED IDEOGRAPH + {0xC0CA, 0x6717}, //10702 #CJK UNIFIED IDEOGRAPH + {0xC0CB, 0x6D6A}, //10703 #CJK UNIFIED IDEOGRAPH + {0xC0CC, 0x635E}, //10704 #CJK UNIFIED IDEOGRAPH + {0xC0CD, 0x52B3}, //10705 #CJK UNIFIED IDEOGRAPH + {0xC0CE, 0x7262}, //10706 #CJK UNIFIED IDEOGRAPH + {0xC0CF, 0x8001}, //10707 #CJK UNIFIED IDEOGRAPH + {0xC0D0, 0x4F6C}, //10708 #CJK UNIFIED IDEOGRAPH + {0xC0D1, 0x59E5}, //10709 #CJK UNIFIED IDEOGRAPH + {0xC0D2, 0x916A}, //10710 #CJK UNIFIED IDEOGRAPH + {0xC0D3, 0x70D9}, //10711 #CJK UNIFIED IDEOGRAPH + {0xC0D4, 0x6D9D}, //10712 #CJK UNIFIED IDEOGRAPH + {0xC0D5, 0x52D2}, //10713 #CJK UNIFIED IDEOGRAPH + {0xC0D6, 0x4E50}, //10714 #CJK UNIFIED IDEOGRAPH + {0xC0D7, 0x96F7}, //10715 #CJK UNIFIED IDEOGRAPH + {0xC0D8, 0x956D}, //10716 #CJK UNIFIED IDEOGRAPH + {0xC0D9, 0x857E}, //10717 #CJK UNIFIED IDEOGRAPH + {0xC0DA, 0x78CA}, //10718 #CJK UNIFIED IDEOGRAPH + {0xC0DB, 0x7D2F}, //10719 #CJK UNIFIED IDEOGRAPH + {0xC0DC, 0x5121}, //10720 #CJK UNIFIED IDEOGRAPH + {0xC0DD, 0x5792}, //10721 #CJK UNIFIED IDEOGRAPH + {0xC0DE, 0x64C2}, //10722 #CJK UNIFIED IDEOGRAPH + {0xC0DF, 0x808B}, //10723 #CJK UNIFIED IDEOGRAPH + {0xC0E0, 0x7C7B}, //10724 #CJK UNIFIED IDEOGRAPH + {0xC0E1, 0x6CEA}, //10725 #CJK UNIFIED IDEOGRAPH + {0xC0E2, 0x68F1}, //10726 #CJK UNIFIED IDEOGRAPH + {0xC0E3, 0x695E}, //10727 #CJK UNIFIED IDEOGRAPH + {0xC0E4, 0x51B7}, //10728 #CJK UNIFIED IDEOGRAPH + {0xC0E5, 0x5398}, //10729 #CJK UNIFIED IDEOGRAPH + {0xC0E6, 0x68A8}, //10730 #CJK UNIFIED IDEOGRAPH + {0xC0E7, 0x7281}, //10731 #CJK UNIFIED IDEOGRAPH + {0xC0E8, 0x9ECE}, //10732 #CJK UNIFIED IDEOGRAPH + {0xC0E9, 0x7BF1}, //10733 #CJK UNIFIED IDEOGRAPH + {0xC0EA, 0x72F8}, //10734 #CJK UNIFIED IDEOGRAPH + {0xC0EB, 0x79BB}, //10735 #CJK UNIFIED IDEOGRAPH + {0xC0EC, 0x6F13}, //10736 #CJK UNIFIED IDEOGRAPH + {0xC0ED, 0x7406}, //10737 #CJK UNIFIED IDEOGRAPH + {0xC0EE, 0x674E}, //10738 #CJK UNIFIED IDEOGRAPH + {0xC0EF, 0x91CC}, //10739 #CJK UNIFIED IDEOGRAPH + {0xC0F0, 0x9CA4}, //10740 #CJK UNIFIED IDEOGRAPH + {0xC0F1, 0x793C}, //10741 #CJK UNIFIED IDEOGRAPH + {0xC0F2, 0x8389}, //10742 #CJK UNIFIED IDEOGRAPH + {0xC0F3, 0x8354}, //10743 #CJK UNIFIED IDEOGRAPH + {0xC0F4, 0x540F}, //10744 #CJK UNIFIED IDEOGRAPH + {0xC0F5, 0x6817}, //10745 #CJK UNIFIED IDEOGRAPH + {0xC0F6, 0x4E3D}, //10746 #CJK UNIFIED IDEOGRAPH + {0xC0F7, 0x5389}, //10747 #CJK UNIFIED IDEOGRAPH + {0xC0F8, 0x52B1}, //10748 #CJK UNIFIED IDEOGRAPH + {0xC0F9, 0x783E}, //10749 #CJK UNIFIED IDEOGRAPH + {0xC0FA, 0x5386}, //10750 #CJK UNIFIED IDEOGRAPH + {0xC0FB, 0x5229}, //10751 #CJK UNIFIED IDEOGRAPH + {0xC0FC, 0x5088}, //10752 #CJK UNIFIED IDEOGRAPH + {0xC0FD, 0x4F8B}, //10753 #CJK UNIFIED IDEOGRAPH + {0xC0FE, 0x4FD0}, //10754 #CJK UNIFIED IDEOGRAPH + {0xC140, 0x7F56}, //10755 #CJK UNIFIED IDEOGRAPH + {0xC141, 0x7F59}, //10756 #CJK UNIFIED IDEOGRAPH + {0xC142, 0x7F5B}, //10757 #CJK UNIFIED IDEOGRAPH + {0xC143, 0x7F5C}, //10758 #CJK UNIFIED IDEOGRAPH + {0xC144, 0x7F5D}, //10759 #CJK UNIFIED IDEOGRAPH + {0xC145, 0x7F5E}, //10760 #CJK UNIFIED IDEOGRAPH + {0xC146, 0x7F60}, //10761 #CJK UNIFIED IDEOGRAPH + {0xC147, 0x7F63}, //10762 #CJK UNIFIED IDEOGRAPH + {0xC148, 0x7F64}, //10763 #CJK UNIFIED IDEOGRAPH + {0xC149, 0x7F65}, //10764 #CJK UNIFIED IDEOGRAPH + {0xC14A, 0x7F66}, //10765 #CJK UNIFIED IDEOGRAPH + {0xC14B, 0x7F67}, //10766 #CJK UNIFIED IDEOGRAPH + {0xC14C, 0x7F6B}, //10767 #CJK UNIFIED IDEOGRAPH + {0xC14D, 0x7F6C}, //10768 #CJK UNIFIED IDEOGRAPH + {0xC14E, 0x7F6D}, //10769 #CJK UNIFIED IDEOGRAPH + {0xC14F, 0x7F6F}, //10770 #CJK UNIFIED IDEOGRAPH + {0xC150, 0x7F70}, //10771 #CJK UNIFIED IDEOGRAPH + {0xC151, 0x7F73}, //10772 #CJK UNIFIED IDEOGRAPH + {0xC152, 0x7F75}, //10773 #CJK UNIFIED IDEOGRAPH + {0xC153, 0x7F76}, //10774 #CJK UNIFIED IDEOGRAPH + {0xC154, 0x7F77}, //10775 #CJK UNIFIED IDEOGRAPH + {0xC155, 0x7F78}, //10776 #CJK UNIFIED IDEOGRAPH + {0xC156, 0x7F7A}, //10777 #CJK UNIFIED IDEOGRAPH + {0xC157, 0x7F7B}, //10778 #CJK UNIFIED IDEOGRAPH + {0xC158, 0x7F7C}, //10779 #CJK UNIFIED IDEOGRAPH + {0xC159, 0x7F7D}, //10780 #CJK UNIFIED IDEOGRAPH + {0xC15A, 0x7F7F}, //10781 #CJK UNIFIED IDEOGRAPH + {0xC15B, 0x7F80}, //10782 #CJK UNIFIED IDEOGRAPH + {0xC15C, 0x7F82}, //10783 #CJK UNIFIED IDEOGRAPH + {0xC15D, 0x7F83}, //10784 #CJK UNIFIED IDEOGRAPH + {0xC15E, 0x7F84}, //10785 #CJK UNIFIED IDEOGRAPH + {0xC15F, 0x7F85}, //10786 #CJK UNIFIED IDEOGRAPH + {0xC160, 0x7F86}, //10787 #CJK UNIFIED IDEOGRAPH + {0xC161, 0x7F87}, //10788 #CJK UNIFIED IDEOGRAPH + {0xC162, 0x7F88}, //10789 #CJK UNIFIED IDEOGRAPH + {0xC163, 0x7F89}, //10790 #CJK UNIFIED IDEOGRAPH + {0xC164, 0x7F8B}, //10791 #CJK UNIFIED IDEOGRAPH + {0xC165, 0x7F8D}, //10792 #CJK UNIFIED IDEOGRAPH + {0xC166, 0x7F8F}, //10793 #CJK UNIFIED IDEOGRAPH + {0xC167, 0x7F90}, //10794 #CJK UNIFIED IDEOGRAPH + {0xC168, 0x7F91}, //10795 #CJK UNIFIED IDEOGRAPH + {0xC169, 0x7F92}, //10796 #CJK UNIFIED IDEOGRAPH + {0xC16A, 0x7F93}, //10797 #CJK UNIFIED IDEOGRAPH + {0xC16B, 0x7F95}, //10798 #CJK UNIFIED IDEOGRAPH + {0xC16C, 0x7F96}, //10799 #CJK UNIFIED IDEOGRAPH + {0xC16D, 0x7F97}, //10800 #CJK UNIFIED IDEOGRAPH + {0xC16E, 0x7F98}, //10801 #CJK UNIFIED IDEOGRAPH + {0xC16F, 0x7F99}, //10802 #CJK UNIFIED IDEOGRAPH + {0xC170, 0x7F9B}, //10803 #CJK UNIFIED IDEOGRAPH + {0xC171, 0x7F9C}, //10804 #CJK UNIFIED IDEOGRAPH + {0xC172, 0x7FA0}, //10805 #CJK UNIFIED IDEOGRAPH + {0xC173, 0x7FA2}, //10806 #CJK UNIFIED IDEOGRAPH + {0xC174, 0x7FA3}, //10807 #CJK UNIFIED IDEOGRAPH + {0xC175, 0x7FA5}, //10808 #CJK UNIFIED IDEOGRAPH + {0xC176, 0x7FA6}, //10809 #CJK UNIFIED IDEOGRAPH + {0xC177, 0x7FA8}, //10810 #CJK UNIFIED IDEOGRAPH + {0xC178, 0x7FA9}, //10811 #CJK UNIFIED IDEOGRAPH + {0xC179, 0x7FAA}, //10812 #CJK UNIFIED IDEOGRAPH + {0xC17A, 0x7FAB}, //10813 #CJK UNIFIED IDEOGRAPH + {0xC17B, 0x7FAC}, //10814 #CJK UNIFIED IDEOGRAPH + {0xC17C, 0x7FAD}, //10815 #CJK UNIFIED IDEOGRAPH + {0xC17D, 0x7FAE}, //10816 #CJK UNIFIED IDEOGRAPH + {0xC17E, 0x7FB1}, //10817 #CJK UNIFIED IDEOGRAPH + {0xC180, 0x7FB3}, //10818 #CJK UNIFIED IDEOGRAPH + {0xC181, 0x7FB4}, //10819 #CJK UNIFIED IDEOGRAPH + {0xC182, 0x7FB5}, //10820 #CJK UNIFIED IDEOGRAPH + {0xC183, 0x7FB6}, //10821 #CJK UNIFIED IDEOGRAPH + {0xC184, 0x7FB7}, //10822 #CJK UNIFIED IDEOGRAPH + {0xC185, 0x7FBA}, //10823 #CJK UNIFIED IDEOGRAPH + {0xC186, 0x7FBB}, //10824 #CJK UNIFIED IDEOGRAPH + {0xC187, 0x7FBE}, //10825 #CJK UNIFIED IDEOGRAPH + {0xC188, 0x7FC0}, //10826 #CJK UNIFIED IDEOGRAPH + {0xC189, 0x7FC2}, //10827 #CJK UNIFIED IDEOGRAPH + {0xC18A, 0x7FC3}, //10828 #CJK UNIFIED IDEOGRAPH + {0xC18B, 0x7FC4}, //10829 #CJK UNIFIED IDEOGRAPH + {0xC18C, 0x7FC6}, //10830 #CJK UNIFIED IDEOGRAPH + {0xC18D, 0x7FC7}, //10831 #CJK UNIFIED IDEOGRAPH + {0xC18E, 0x7FC8}, //10832 #CJK UNIFIED IDEOGRAPH + {0xC18F, 0x7FC9}, //10833 #CJK UNIFIED IDEOGRAPH + {0xC190, 0x7FCB}, //10834 #CJK UNIFIED IDEOGRAPH + {0xC191, 0x7FCD}, //10835 #CJK UNIFIED IDEOGRAPH + {0xC192, 0x7FCF}, //10836 #CJK UNIFIED IDEOGRAPH + {0xC193, 0x7FD0}, //10837 #CJK UNIFIED IDEOGRAPH + {0xC194, 0x7FD1}, //10838 #CJK UNIFIED IDEOGRAPH + {0xC195, 0x7FD2}, //10839 #CJK UNIFIED IDEOGRAPH + {0xC196, 0x7FD3}, //10840 #CJK UNIFIED IDEOGRAPH + {0xC197, 0x7FD6}, //10841 #CJK UNIFIED IDEOGRAPH + {0xC198, 0x7FD7}, //10842 #CJK UNIFIED IDEOGRAPH + {0xC199, 0x7FD9}, //10843 #CJK UNIFIED IDEOGRAPH + {0xC19A, 0x7FDA}, //10844 #CJK UNIFIED IDEOGRAPH + {0xC19B, 0x7FDB}, //10845 #CJK UNIFIED IDEOGRAPH + {0xC19C, 0x7FDC}, //10846 #CJK UNIFIED IDEOGRAPH + {0xC19D, 0x7FDD}, //10847 #CJK UNIFIED IDEOGRAPH + {0xC19E, 0x7FDE}, //10848 #CJK UNIFIED IDEOGRAPH + {0xC19F, 0x7FE2}, //10849 #CJK UNIFIED IDEOGRAPH + {0xC1A0, 0x7FE3}, //10850 #CJK UNIFIED IDEOGRAPH + {0xC1A1, 0x75E2}, //10851 #CJK UNIFIED IDEOGRAPH + {0xC1A2, 0x7ACB}, //10852 #CJK UNIFIED IDEOGRAPH + {0xC1A3, 0x7C92}, //10853 #CJK UNIFIED IDEOGRAPH + {0xC1A4, 0x6CA5}, //10854 #CJK UNIFIED IDEOGRAPH + {0xC1A5, 0x96B6}, //10855 #CJK UNIFIED IDEOGRAPH + {0xC1A6, 0x529B}, //10856 #CJK UNIFIED IDEOGRAPH + {0xC1A7, 0x7483}, //10857 #CJK UNIFIED IDEOGRAPH + {0xC1A8, 0x54E9}, //10858 #CJK UNIFIED IDEOGRAPH + {0xC1A9, 0x4FE9}, //10859 #CJK UNIFIED IDEOGRAPH + {0xC1AA, 0x8054}, //10860 #CJK UNIFIED IDEOGRAPH + {0xC1AB, 0x83B2}, //10861 #CJK UNIFIED IDEOGRAPH + {0xC1AC, 0x8FDE}, //10862 #CJK UNIFIED IDEOGRAPH + {0xC1AD, 0x9570}, //10863 #CJK UNIFIED IDEOGRAPH + {0xC1AE, 0x5EC9}, //10864 #CJK UNIFIED IDEOGRAPH + {0xC1AF, 0x601C}, //10865 #CJK UNIFIED IDEOGRAPH + {0xC1B0, 0x6D9F}, //10866 #CJK UNIFIED IDEOGRAPH + {0xC1B1, 0x5E18}, //10867 #CJK UNIFIED IDEOGRAPH + {0xC1B2, 0x655B}, //10868 #CJK UNIFIED IDEOGRAPH + {0xC1B3, 0x8138}, //10869 #CJK UNIFIED IDEOGRAPH + {0xC1B4, 0x94FE}, //10870 #CJK UNIFIED IDEOGRAPH + {0xC1B5, 0x604B}, //10871 #CJK UNIFIED IDEOGRAPH + {0xC1B6, 0x70BC}, //10872 #CJK UNIFIED IDEOGRAPH + {0xC1B7, 0x7EC3}, //10873 #CJK UNIFIED IDEOGRAPH + {0xC1B8, 0x7CAE}, //10874 #CJK UNIFIED IDEOGRAPH + {0xC1B9, 0x51C9}, //10875 #CJK UNIFIED IDEOGRAPH + {0xC1BA, 0x6881}, //10876 #CJK UNIFIED IDEOGRAPH + {0xC1BB, 0x7CB1}, //10877 #CJK UNIFIED IDEOGRAPH + {0xC1BC, 0x826F}, //10878 #CJK UNIFIED IDEOGRAPH + {0xC1BD, 0x4E24}, //10879 #CJK UNIFIED IDEOGRAPH + {0xC1BE, 0x8F86}, //10880 #CJK UNIFIED IDEOGRAPH + {0xC1BF, 0x91CF}, //10881 #CJK UNIFIED IDEOGRAPH + {0xC1C0, 0x667E}, //10882 #CJK UNIFIED IDEOGRAPH + {0xC1C1, 0x4EAE}, //10883 #CJK UNIFIED IDEOGRAPH + {0xC1C2, 0x8C05}, //10884 #CJK UNIFIED IDEOGRAPH + {0xC1C3, 0x64A9}, //10885 #CJK UNIFIED IDEOGRAPH + {0xC1C4, 0x804A}, //10886 #CJK UNIFIED IDEOGRAPH + {0xC1C5, 0x50DA}, //10887 #CJK UNIFIED IDEOGRAPH + {0xC1C6, 0x7597}, //10888 #CJK UNIFIED IDEOGRAPH + {0xC1C7, 0x71CE}, //10889 #CJK UNIFIED IDEOGRAPH + {0xC1C8, 0x5BE5}, //10890 #CJK UNIFIED IDEOGRAPH + {0xC1C9, 0x8FBD}, //10891 #CJK UNIFIED IDEOGRAPH + {0xC1CA, 0x6F66}, //10892 #CJK UNIFIED IDEOGRAPH + {0xC1CB, 0x4E86}, //10893 #CJK UNIFIED IDEOGRAPH + {0xC1CC, 0x6482}, //10894 #CJK UNIFIED IDEOGRAPH + {0xC1CD, 0x9563}, //10895 #CJK UNIFIED IDEOGRAPH + {0xC1CE, 0x5ED6}, //10896 #CJK UNIFIED IDEOGRAPH + {0xC1CF, 0x6599}, //10897 #CJK UNIFIED IDEOGRAPH + {0xC1D0, 0x5217}, //10898 #CJK UNIFIED IDEOGRAPH + {0xC1D1, 0x88C2}, //10899 #CJK UNIFIED IDEOGRAPH + {0xC1D2, 0x70C8}, //10900 #CJK UNIFIED IDEOGRAPH + {0xC1D3, 0x52A3}, //10901 #CJK UNIFIED IDEOGRAPH + {0xC1D4, 0x730E}, //10902 #CJK UNIFIED IDEOGRAPH + {0xC1D5, 0x7433}, //10903 #CJK UNIFIED IDEOGRAPH + {0xC1D6, 0x6797}, //10904 #CJK UNIFIED IDEOGRAPH + {0xC1D7, 0x78F7}, //10905 #CJK UNIFIED IDEOGRAPH + {0xC1D8, 0x9716}, //10906 #CJK UNIFIED IDEOGRAPH + {0xC1D9, 0x4E34}, //10907 #CJK UNIFIED IDEOGRAPH + {0xC1DA, 0x90BB}, //10908 #CJK UNIFIED IDEOGRAPH + {0xC1DB, 0x9CDE}, //10909 #CJK UNIFIED IDEOGRAPH + {0xC1DC, 0x6DCB}, //10910 #CJK UNIFIED IDEOGRAPH + {0xC1DD, 0x51DB}, //10911 #CJK UNIFIED IDEOGRAPH + {0xC1DE, 0x8D41}, //10912 #CJK UNIFIED IDEOGRAPH + {0xC1DF, 0x541D}, //10913 #CJK UNIFIED IDEOGRAPH + {0xC1E0, 0x62CE}, //10914 #CJK UNIFIED IDEOGRAPH + {0xC1E1, 0x73B2}, //10915 #CJK UNIFIED IDEOGRAPH + {0xC1E2, 0x83F1}, //10916 #CJK UNIFIED IDEOGRAPH + {0xC1E3, 0x96F6}, //10917 #CJK UNIFIED IDEOGRAPH + {0xC1E4, 0x9F84}, //10918 #CJK UNIFIED IDEOGRAPH + {0xC1E5, 0x94C3}, //10919 #CJK UNIFIED IDEOGRAPH + {0xC1E6, 0x4F36}, //10920 #CJK UNIFIED IDEOGRAPH + {0xC1E7, 0x7F9A}, //10921 #CJK UNIFIED IDEOGRAPH + {0xC1E8, 0x51CC}, //10922 #CJK UNIFIED IDEOGRAPH + {0xC1E9, 0x7075}, //10923 #CJK UNIFIED IDEOGRAPH + {0xC1EA, 0x9675}, //10924 #CJK UNIFIED IDEOGRAPH + {0xC1EB, 0x5CAD}, //10925 #CJK UNIFIED IDEOGRAPH + {0xC1EC, 0x9886}, //10926 #CJK UNIFIED IDEOGRAPH + {0xC1ED, 0x53E6}, //10927 #CJK UNIFIED IDEOGRAPH + {0xC1EE, 0x4EE4}, //10928 #CJK UNIFIED IDEOGRAPH + {0xC1EF, 0x6E9C}, //10929 #CJK UNIFIED IDEOGRAPH + {0xC1F0, 0x7409}, //10930 #CJK UNIFIED IDEOGRAPH + {0xC1F1, 0x69B4}, //10931 #CJK UNIFIED IDEOGRAPH + {0xC1F2, 0x786B}, //10932 #CJK UNIFIED IDEOGRAPH + {0xC1F3, 0x998F}, //10933 #CJK UNIFIED IDEOGRAPH + {0xC1F4, 0x7559}, //10934 #CJK UNIFIED IDEOGRAPH + {0xC1F5, 0x5218}, //10935 #CJK UNIFIED IDEOGRAPH + {0xC1F6, 0x7624}, //10936 #CJK UNIFIED IDEOGRAPH + {0xC1F7, 0x6D41}, //10937 #CJK UNIFIED IDEOGRAPH + {0xC1F8, 0x67F3}, //10938 #CJK UNIFIED IDEOGRAPH + {0xC1F9, 0x516D}, //10939 #CJK UNIFIED IDEOGRAPH + {0xC1FA, 0x9F99}, //10940 #CJK UNIFIED IDEOGRAPH + {0xC1FB, 0x804B}, //10941 #CJK UNIFIED IDEOGRAPH + {0xC1FC, 0x5499}, //10942 #CJK UNIFIED IDEOGRAPH + {0xC1FD, 0x7B3C}, //10943 #CJK UNIFIED IDEOGRAPH + {0xC1FE, 0x7ABF}, //10944 #CJK UNIFIED IDEOGRAPH + {0xC240, 0x7FE4}, //10945 #CJK UNIFIED IDEOGRAPH + {0xC241, 0x7FE7}, //10946 #CJK UNIFIED IDEOGRAPH + {0xC242, 0x7FE8}, //10947 #CJK UNIFIED IDEOGRAPH + {0xC243, 0x7FEA}, //10948 #CJK UNIFIED IDEOGRAPH + {0xC244, 0x7FEB}, //10949 #CJK UNIFIED IDEOGRAPH + {0xC245, 0x7FEC}, //10950 #CJK UNIFIED IDEOGRAPH + {0xC246, 0x7FED}, //10951 #CJK UNIFIED IDEOGRAPH + {0xC247, 0x7FEF}, //10952 #CJK UNIFIED IDEOGRAPH + {0xC248, 0x7FF2}, //10953 #CJK UNIFIED IDEOGRAPH + {0xC249, 0x7FF4}, //10954 #CJK UNIFIED IDEOGRAPH + {0xC24A, 0x7FF5}, //10955 #CJK UNIFIED IDEOGRAPH + {0xC24B, 0x7FF6}, //10956 #CJK UNIFIED IDEOGRAPH + {0xC24C, 0x7FF7}, //10957 #CJK UNIFIED IDEOGRAPH + {0xC24D, 0x7FF8}, //10958 #CJK UNIFIED IDEOGRAPH + {0xC24E, 0x7FF9}, //10959 #CJK UNIFIED IDEOGRAPH + {0xC24F, 0x7FFA}, //10960 #CJK UNIFIED IDEOGRAPH + {0xC250, 0x7FFD}, //10961 #CJK UNIFIED IDEOGRAPH + {0xC251, 0x7FFE}, //10962 #CJK UNIFIED IDEOGRAPH + {0xC252, 0x7FFF}, //10963 #CJK UNIFIED IDEOGRAPH + {0xC253, 0x8002}, //10964 #CJK UNIFIED IDEOGRAPH + {0xC254, 0x8007}, //10965 #CJK UNIFIED IDEOGRAPH + {0xC255, 0x8008}, //10966 #CJK UNIFIED IDEOGRAPH + {0xC256, 0x8009}, //10967 #CJK UNIFIED IDEOGRAPH + {0xC257, 0x800A}, //10968 #CJK UNIFIED IDEOGRAPH + {0xC258, 0x800E}, //10969 #CJK UNIFIED IDEOGRAPH + {0xC259, 0x800F}, //10970 #CJK UNIFIED IDEOGRAPH + {0xC25A, 0x8011}, //10971 #CJK UNIFIED IDEOGRAPH + {0xC25B, 0x8013}, //10972 #CJK UNIFIED IDEOGRAPH + {0xC25C, 0x801A}, //10973 #CJK UNIFIED IDEOGRAPH + {0xC25D, 0x801B}, //10974 #CJK UNIFIED IDEOGRAPH + {0xC25E, 0x801D}, //10975 #CJK UNIFIED IDEOGRAPH + {0xC25F, 0x801E}, //10976 #CJK UNIFIED IDEOGRAPH + {0xC260, 0x801F}, //10977 #CJK UNIFIED IDEOGRAPH + {0xC261, 0x8021}, //10978 #CJK UNIFIED IDEOGRAPH + {0xC262, 0x8023}, //10979 #CJK UNIFIED IDEOGRAPH + {0xC263, 0x8024}, //10980 #CJK UNIFIED IDEOGRAPH + {0xC264, 0x802B}, //10981 #CJK UNIFIED IDEOGRAPH + {0xC265, 0x802C}, //10982 #CJK UNIFIED IDEOGRAPH + {0xC266, 0x802D}, //10983 #CJK UNIFIED IDEOGRAPH + {0xC267, 0x802E}, //10984 #CJK UNIFIED IDEOGRAPH + {0xC268, 0x802F}, //10985 #CJK UNIFIED IDEOGRAPH + {0xC269, 0x8030}, //10986 #CJK UNIFIED IDEOGRAPH + {0xC26A, 0x8032}, //10987 #CJK UNIFIED IDEOGRAPH + {0xC26B, 0x8034}, //10988 #CJK UNIFIED IDEOGRAPH + {0xC26C, 0x8039}, //10989 #CJK UNIFIED IDEOGRAPH + {0xC26D, 0x803A}, //10990 #CJK UNIFIED IDEOGRAPH + {0xC26E, 0x803C}, //10991 #CJK UNIFIED IDEOGRAPH + {0xC26F, 0x803E}, //10992 #CJK UNIFIED IDEOGRAPH + {0xC270, 0x8040}, //10993 #CJK UNIFIED IDEOGRAPH + {0xC271, 0x8041}, //10994 #CJK UNIFIED IDEOGRAPH + {0xC272, 0x8044}, //10995 #CJK UNIFIED IDEOGRAPH + {0xC273, 0x8045}, //10996 #CJK UNIFIED IDEOGRAPH + {0xC274, 0x8047}, //10997 #CJK UNIFIED IDEOGRAPH + {0xC275, 0x8048}, //10998 #CJK UNIFIED IDEOGRAPH + {0xC276, 0x8049}, //10999 #CJK UNIFIED IDEOGRAPH + {0xC277, 0x804E}, //11000 #CJK UNIFIED IDEOGRAPH + {0xC278, 0x804F}, //11001 #CJK UNIFIED IDEOGRAPH + {0xC279, 0x8050}, //11002 #CJK UNIFIED IDEOGRAPH + {0xC27A, 0x8051}, //11003 #CJK UNIFIED IDEOGRAPH + {0xC27B, 0x8053}, //11004 #CJK UNIFIED IDEOGRAPH + {0xC27C, 0x8055}, //11005 #CJK UNIFIED IDEOGRAPH + {0xC27D, 0x8056}, //11006 #CJK UNIFIED IDEOGRAPH + {0xC27E, 0x8057}, //11007 #CJK UNIFIED IDEOGRAPH + {0xC280, 0x8059}, //11008 #CJK UNIFIED IDEOGRAPH + {0xC281, 0x805B}, //11009 #CJK UNIFIED IDEOGRAPH + {0xC282, 0x805C}, //11010 #CJK UNIFIED IDEOGRAPH + {0xC283, 0x805D}, //11011 #CJK UNIFIED IDEOGRAPH + {0xC284, 0x805E}, //11012 #CJK UNIFIED IDEOGRAPH + {0xC285, 0x805F}, //11013 #CJK UNIFIED IDEOGRAPH + {0xC286, 0x8060}, //11014 #CJK UNIFIED IDEOGRAPH + {0xC287, 0x8061}, //11015 #CJK UNIFIED IDEOGRAPH + {0xC288, 0x8062}, //11016 #CJK UNIFIED IDEOGRAPH + {0xC289, 0x8063}, //11017 #CJK UNIFIED IDEOGRAPH + {0xC28A, 0x8064}, //11018 #CJK UNIFIED IDEOGRAPH + {0xC28B, 0x8065}, //11019 #CJK UNIFIED IDEOGRAPH + {0xC28C, 0x8066}, //11020 #CJK UNIFIED IDEOGRAPH + {0xC28D, 0x8067}, //11021 #CJK UNIFIED IDEOGRAPH + {0xC28E, 0x8068}, //11022 #CJK UNIFIED IDEOGRAPH + {0xC28F, 0x806B}, //11023 #CJK UNIFIED IDEOGRAPH + {0xC290, 0x806C}, //11024 #CJK UNIFIED IDEOGRAPH + {0xC291, 0x806D}, //11025 #CJK UNIFIED IDEOGRAPH + {0xC292, 0x806E}, //11026 #CJK UNIFIED IDEOGRAPH + {0xC293, 0x806F}, //11027 #CJK UNIFIED IDEOGRAPH + {0xC294, 0x8070}, //11028 #CJK UNIFIED IDEOGRAPH + {0xC295, 0x8072}, //11029 #CJK UNIFIED IDEOGRAPH + {0xC296, 0x8073}, //11030 #CJK UNIFIED IDEOGRAPH + {0xC297, 0x8074}, //11031 #CJK UNIFIED IDEOGRAPH + {0xC298, 0x8075}, //11032 #CJK UNIFIED IDEOGRAPH + {0xC299, 0x8076}, //11033 #CJK UNIFIED IDEOGRAPH + {0xC29A, 0x8077}, //11034 #CJK UNIFIED IDEOGRAPH + {0xC29B, 0x8078}, //11035 #CJK UNIFIED IDEOGRAPH + {0xC29C, 0x8079}, //11036 #CJK UNIFIED IDEOGRAPH + {0xC29D, 0x807A}, //11037 #CJK UNIFIED IDEOGRAPH + {0xC29E, 0x807B}, //11038 #CJK UNIFIED IDEOGRAPH + {0xC29F, 0x807C}, //11039 #CJK UNIFIED IDEOGRAPH + {0xC2A0, 0x807D}, //11040 #CJK UNIFIED IDEOGRAPH + {0xC2A1, 0x9686}, //11041 #CJK UNIFIED IDEOGRAPH + {0xC2A2, 0x5784}, //11042 #CJK UNIFIED IDEOGRAPH + {0xC2A3, 0x62E2}, //11043 #CJK UNIFIED IDEOGRAPH + {0xC2A4, 0x9647}, //11044 #CJK UNIFIED IDEOGRAPH + {0xC2A5, 0x697C}, //11045 #CJK UNIFIED IDEOGRAPH + {0xC2A6, 0x5A04}, //11046 #CJK UNIFIED IDEOGRAPH + {0xC2A7, 0x6402}, //11047 #CJK UNIFIED IDEOGRAPH + {0xC2A8, 0x7BD3}, //11048 #CJK UNIFIED IDEOGRAPH + {0xC2A9, 0x6F0F}, //11049 #CJK UNIFIED IDEOGRAPH + {0xC2AA, 0x964B}, //11050 #CJK UNIFIED IDEOGRAPH + {0xC2AB, 0x82A6}, //11051 #CJK UNIFIED IDEOGRAPH + {0xC2AC, 0x5362}, //11052 #CJK UNIFIED IDEOGRAPH + {0xC2AD, 0x9885}, //11053 #CJK UNIFIED IDEOGRAPH + {0xC2AE, 0x5E90}, //11054 #CJK UNIFIED IDEOGRAPH + {0xC2AF, 0x7089}, //11055 #CJK UNIFIED IDEOGRAPH + {0xC2B0, 0x63B3}, //11056 #CJK UNIFIED IDEOGRAPH + {0xC2B1, 0x5364}, //11057 #CJK UNIFIED IDEOGRAPH + {0xC2B2, 0x864F}, //11058 #CJK UNIFIED IDEOGRAPH + {0xC2B3, 0x9C81}, //11059 #CJK UNIFIED IDEOGRAPH + {0xC2B4, 0x9E93}, //11060 #CJK UNIFIED IDEOGRAPH + {0xC2B5, 0x788C}, //11061 #CJK UNIFIED IDEOGRAPH + {0xC2B6, 0x9732}, //11062 #CJK UNIFIED IDEOGRAPH + {0xC2B7, 0x8DEF}, //11063 #CJK UNIFIED IDEOGRAPH + {0xC2B8, 0x8D42}, //11064 #CJK UNIFIED IDEOGRAPH + {0xC2B9, 0x9E7F}, //11065 #CJK UNIFIED IDEOGRAPH + {0xC2BA, 0x6F5E}, //11066 #CJK UNIFIED IDEOGRAPH + {0xC2BB, 0x7984}, //11067 #CJK UNIFIED IDEOGRAPH + {0xC2BC, 0x5F55}, //11068 #CJK UNIFIED IDEOGRAPH + {0xC2BD, 0x9646}, //11069 #CJK UNIFIED IDEOGRAPH + {0xC2BE, 0x622E}, //11070 #CJK UNIFIED IDEOGRAPH + {0xC2BF, 0x9A74}, //11071 #CJK UNIFIED IDEOGRAPH + {0xC2C0, 0x5415}, //11072 #CJK UNIFIED IDEOGRAPH + {0xC2C1, 0x94DD}, //11073 #CJK UNIFIED IDEOGRAPH + {0xC2C2, 0x4FA3}, //11074 #CJK UNIFIED IDEOGRAPH + {0xC2C3, 0x65C5}, //11075 #CJK UNIFIED IDEOGRAPH + {0xC2C4, 0x5C65}, //11076 #CJK UNIFIED IDEOGRAPH + {0xC2C5, 0x5C61}, //11077 #CJK UNIFIED IDEOGRAPH + {0xC2C6, 0x7F15}, //11078 #CJK UNIFIED IDEOGRAPH + {0xC2C7, 0x8651}, //11079 #CJK UNIFIED IDEOGRAPH + {0xC2C8, 0x6C2F}, //11080 #CJK UNIFIED IDEOGRAPH + {0xC2C9, 0x5F8B}, //11081 #CJK UNIFIED IDEOGRAPH + {0xC2CA, 0x7387}, //11082 #CJK UNIFIED IDEOGRAPH + {0xC2CB, 0x6EE4}, //11083 #CJK UNIFIED IDEOGRAPH + {0xC2CC, 0x7EFF}, //11084 #CJK UNIFIED IDEOGRAPH + {0xC2CD, 0x5CE6}, //11085 #CJK UNIFIED IDEOGRAPH + {0xC2CE, 0x631B}, //11086 #CJK UNIFIED IDEOGRAPH + {0xC2CF, 0x5B6A}, //11087 #CJK UNIFIED IDEOGRAPH + {0xC2D0, 0x6EE6}, //11088 #CJK UNIFIED IDEOGRAPH + {0xC2D1, 0x5375}, //11089 #CJK UNIFIED IDEOGRAPH + {0xC2D2, 0x4E71}, //11090 #CJK UNIFIED IDEOGRAPH + {0xC2D3, 0x63A0}, //11091 #CJK UNIFIED IDEOGRAPH + {0xC2D4, 0x7565}, //11092 #CJK UNIFIED IDEOGRAPH + {0xC2D5, 0x62A1}, //11093 #CJK UNIFIED IDEOGRAPH + {0xC2D6, 0x8F6E}, //11094 #CJK UNIFIED IDEOGRAPH + {0xC2D7, 0x4F26}, //11095 #CJK UNIFIED IDEOGRAPH + {0xC2D8, 0x4ED1}, //11096 #CJK UNIFIED IDEOGRAPH + {0xC2D9, 0x6CA6}, //11097 #CJK UNIFIED IDEOGRAPH + {0xC2DA, 0x7EB6}, //11098 #CJK UNIFIED IDEOGRAPH + {0xC2DB, 0x8BBA}, //11099 #CJK UNIFIED IDEOGRAPH + {0xC2DC, 0x841D}, //11100 #CJK UNIFIED IDEOGRAPH + {0xC2DD, 0x87BA}, //11101 #CJK UNIFIED IDEOGRAPH + {0xC2DE, 0x7F57}, //11102 #CJK UNIFIED IDEOGRAPH + {0xC2DF, 0x903B}, //11103 #CJK UNIFIED IDEOGRAPH + {0xC2E0, 0x9523}, //11104 #CJK UNIFIED IDEOGRAPH + {0xC2E1, 0x7BA9}, //11105 #CJK UNIFIED IDEOGRAPH + {0xC2E2, 0x9AA1}, //11106 #CJK UNIFIED IDEOGRAPH + {0xC2E3, 0x88F8}, //11107 #CJK UNIFIED IDEOGRAPH + {0xC2E4, 0x843D}, //11108 #CJK UNIFIED IDEOGRAPH + {0xC2E5, 0x6D1B}, //11109 #CJK UNIFIED IDEOGRAPH + {0xC2E6, 0x9A86}, //11110 #CJK UNIFIED IDEOGRAPH + {0xC2E7, 0x7EDC}, //11111 #CJK UNIFIED IDEOGRAPH + {0xC2E8, 0x5988}, //11112 #CJK UNIFIED IDEOGRAPH + {0xC2E9, 0x9EBB}, //11113 #CJK UNIFIED IDEOGRAPH + {0xC2EA, 0x739B}, //11114 #CJK UNIFIED IDEOGRAPH + {0xC2EB, 0x7801}, //11115 #CJK UNIFIED IDEOGRAPH + {0xC2EC, 0x8682}, //11116 #CJK UNIFIED IDEOGRAPH + {0xC2ED, 0x9A6C}, //11117 #CJK UNIFIED IDEOGRAPH + {0xC2EE, 0x9A82}, //11118 #CJK UNIFIED IDEOGRAPH + {0xC2EF, 0x561B}, //11119 #CJK UNIFIED IDEOGRAPH + {0xC2F0, 0x5417}, //11120 #CJK UNIFIED IDEOGRAPH + {0xC2F1, 0x57CB}, //11121 #CJK UNIFIED IDEOGRAPH + {0xC2F2, 0x4E70}, //11122 #CJK UNIFIED IDEOGRAPH + {0xC2F3, 0x9EA6}, //11123 #CJK UNIFIED IDEOGRAPH + {0xC2F4, 0x5356}, //11124 #CJK UNIFIED IDEOGRAPH + {0xC2F5, 0x8FC8}, //11125 #CJK UNIFIED IDEOGRAPH + {0xC2F6, 0x8109}, //11126 #CJK UNIFIED IDEOGRAPH + {0xC2F7, 0x7792}, //11127 #CJK UNIFIED IDEOGRAPH + {0xC2F8, 0x9992}, //11128 #CJK UNIFIED IDEOGRAPH + {0xC2F9, 0x86EE}, //11129 #CJK UNIFIED IDEOGRAPH + {0xC2FA, 0x6EE1}, //11130 #CJK UNIFIED IDEOGRAPH + {0xC2FB, 0x8513}, //11131 #CJK UNIFIED IDEOGRAPH + {0xC2FC, 0x66FC}, //11132 #CJK UNIFIED IDEOGRAPH + {0xC2FD, 0x6162}, //11133 #CJK UNIFIED IDEOGRAPH + {0xC2FE, 0x6F2B}, //11134 #CJK UNIFIED IDEOGRAPH + {0xC340, 0x807E}, //11135 #CJK UNIFIED IDEOGRAPH + {0xC341, 0x8081}, //11136 #CJK UNIFIED IDEOGRAPH + {0xC342, 0x8082}, //11137 #CJK UNIFIED IDEOGRAPH + {0xC343, 0x8085}, //11138 #CJK UNIFIED IDEOGRAPH + {0xC344, 0x8088}, //11139 #CJK UNIFIED IDEOGRAPH + {0xC345, 0x808A}, //11140 #CJK UNIFIED IDEOGRAPH + {0xC346, 0x808D}, //11141 #CJK UNIFIED IDEOGRAPH + {0xC347, 0x808E}, //11142 #CJK UNIFIED IDEOGRAPH + {0xC348, 0x808F}, //11143 #CJK UNIFIED IDEOGRAPH + {0xC349, 0x8090}, //11144 #CJK UNIFIED IDEOGRAPH + {0xC34A, 0x8091}, //11145 #CJK UNIFIED IDEOGRAPH + {0xC34B, 0x8092}, //11146 #CJK UNIFIED IDEOGRAPH + {0xC34C, 0x8094}, //11147 #CJK UNIFIED IDEOGRAPH + {0xC34D, 0x8095}, //11148 #CJK UNIFIED IDEOGRAPH + {0xC34E, 0x8097}, //11149 #CJK UNIFIED IDEOGRAPH + {0xC34F, 0x8099}, //11150 #CJK UNIFIED IDEOGRAPH + {0xC350, 0x809E}, //11151 #CJK UNIFIED IDEOGRAPH + {0xC351, 0x80A3}, //11152 #CJK UNIFIED IDEOGRAPH + {0xC352, 0x80A6}, //11153 #CJK UNIFIED IDEOGRAPH + {0xC353, 0x80A7}, //11154 #CJK UNIFIED IDEOGRAPH + {0xC354, 0x80A8}, //11155 #CJK UNIFIED IDEOGRAPH + {0xC355, 0x80AC}, //11156 #CJK UNIFIED IDEOGRAPH + {0xC356, 0x80B0}, //11157 #CJK UNIFIED IDEOGRAPH + {0xC357, 0x80B3}, //11158 #CJK UNIFIED IDEOGRAPH + {0xC358, 0x80B5}, //11159 #CJK UNIFIED IDEOGRAPH + {0xC359, 0x80B6}, //11160 #CJK UNIFIED IDEOGRAPH + {0xC35A, 0x80B8}, //11161 #CJK UNIFIED IDEOGRAPH + {0xC35B, 0x80B9}, //11162 #CJK UNIFIED IDEOGRAPH + {0xC35C, 0x80BB}, //11163 #CJK UNIFIED IDEOGRAPH + {0xC35D, 0x80C5}, //11164 #CJK UNIFIED IDEOGRAPH + {0xC35E, 0x80C7}, //11165 #CJK UNIFIED IDEOGRAPH + {0xC35F, 0x80C8}, //11166 #CJK UNIFIED IDEOGRAPH + {0xC360, 0x80C9}, //11167 #CJK UNIFIED IDEOGRAPH + {0xC361, 0x80CA}, //11168 #CJK UNIFIED IDEOGRAPH + {0xC362, 0x80CB}, //11169 #CJK UNIFIED IDEOGRAPH + {0xC363, 0x80CF}, //11170 #CJK UNIFIED IDEOGRAPH + {0xC364, 0x80D0}, //11171 #CJK UNIFIED IDEOGRAPH + {0xC365, 0x80D1}, //11172 #CJK UNIFIED IDEOGRAPH + {0xC366, 0x80D2}, //11173 #CJK UNIFIED IDEOGRAPH + {0xC367, 0x80D3}, //11174 #CJK UNIFIED IDEOGRAPH + {0xC368, 0x80D4}, //11175 #CJK UNIFIED IDEOGRAPH + {0xC369, 0x80D5}, //11176 #CJK UNIFIED IDEOGRAPH + {0xC36A, 0x80D8}, //11177 #CJK UNIFIED IDEOGRAPH + {0xC36B, 0x80DF}, //11178 #CJK UNIFIED IDEOGRAPH + {0xC36C, 0x80E0}, //11179 #CJK UNIFIED IDEOGRAPH + {0xC36D, 0x80E2}, //11180 #CJK UNIFIED IDEOGRAPH + {0xC36E, 0x80E3}, //11181 #CJK UNIFIED IDEOGRAPH + {0xC36F, 0x80E6}, //11182 #CJK UNIFIED IDEOGRAPH + {0xC370, 0x80EE}, //11183 #CJK UNIFIED IDEOGRAPH + {0xC371, 0x80F5}, //11184 #CJK UNIFIED IDEOGRAPH + {0xC372, 0x80F7}, //11185 #CJK UNIFIED IDEOGRAPH + {0xC373, 0x80F9}, //11186 #CJK UNIFIED IDEOGRAPH + {0xC374, 0x80FB}, //11187 #CJK UNIFIED IDEOGRAPH + {0xC375, 0x80FE}, //11188 #CJK UNIFIED IDEOGRAPH + {0xC376, 0x80FF}, //11189 #CJK UNIFIED IDEOGRAPH + {0xC377, 0x8100}, //11190 #CJK UNIFIED IDEOGRAPH + {0xC378, 0x8101}, //11191 #CJK UNIFIED IDEOGRAPH + {0xC379, 0x8103}, //11192 #CJK UNIFIED IDEOGRAPH + {0xC37A, 0x8104}, //11193 #CJK UNIFIED IDEOGRAPH + {0xC37B, 0x8105}, //11194 #CJK UNIFIED IDEOGRAPH + {0xC37C, 0x8107}, //11195 #CJK UNIFIED IDEOGRAPH + {0xC37D, 0x8108}, //11196 #CJK UNIFIED IDEOGRAPH + {0xC37E, 0x810B}, //11197 #CJK UNIFIED IDEOGRAPH + {0xC380, 0x810C}, //11198 #CJK UNIFIED IDEOGRAPH + {0xC381, 0x8115}, //11199 #CJK UNIFIED IDEOGRAPH + {0xC382, 0x8117}, //11200 #CJK UNIFIED IDEOGRAPH + {0xC383, 0x8119}, //11201 #CJK UNIFIED IDEOGRAPH + {0xC384, 0x811B}, //11202 #CJK UNIFIED IDEOGRAPH + {0xC385, 0x811C}, //11203 #CJK UNIFIED IDEOGRAPH + {0xC386, 0x811D}, //11204 #CJK UNIFIED IDEOGRAPH + {0xC387, 0x811F}, //11205 #CJK UNIFIED IDEOGRAPH + {0xC388, 0x8120}, //11206 #CJK UNIFIED IDEOGRAPH + {0xC389, 0x8121}, //11207 #CJK UNIFIED IDEOGRAPH + {0xC38A, 0x8122}, //11208 #CJK UNIFIED IDEOGRAPH + {0xC38B, 0x8123}, //11209 #CJK UNIFIED IDEOGRAPH + {0xC38C, 0x8124}, //11210 #CJK UNIFIED IDEOGRAPH + {0xC38D, 0x8125}, //11211 #CJK UNIFIED IDEOGRAPH + {0xC38E, 0x8126}, //11212 #CJK UNIFIED IDEOGRAPH + {0xC38F, 0x8127}, //11213 #CJK UNIFIED IDEOGRAPH + {0xC390, 0x8128}, //11214 #CJK UNIFIED IDEOGRAPH + {0xC391, 0x8129}, //11215 #CJK UNIFIED IDEOGRAPH + {0xC392, 0x812A}, //11216 #CJK UNIFIED IDEOGRAPH + {0xC393, 0x812B}, //11217 #CJK UNIFIED IDEOGRAPH + {0xC394, 0x812D}, //11218 #CJK UNIFIED IDEOGRAPH + {0xC395, 0x812E}, //11219 #CJK UNIFIED IDEOGRAPH + {0xC396, 0x8130}, //11220 #CJK UNIFIED IDEOGRAPH + {0xC397, 0x8133}, //11221 #CJK UNIFIED IDEOGRAPH + {0xC398, 0x8134}, //11222 #CJK UNIFIED IDEOGRAPH + {0xC399, 0x8135}, //11223 #CJK UNIFIED IDEOGRAPH + {0xC39A, 0x8137}, //11224 #CJK UNIFIED IDEOGRAPH + {0xC39B, 0x8139}, //11225 #CJK UNIFIED IDEOGRAPH + {0xC39C, 0x813A}, //11226 #CJK UNIFIED IDEOGRAPH + {0xC39D, 0x813B}, //11227 #CJK UNIFIED IDEOGRAPH + {0xC39E, 0x813C}, //11228 #CJK UNIFIED IDEOGRAPH + {0xC39F, 0x813D}, //11229 #CJK UNIFIED IDEOGRAPH + {0xC3A0, 0x813F}, //11230 #CJK UNIFIED IDEOGRAPH + {0xC3A1, 0x8C29}, //11231 #CJK UNIFIED IDEOGRAPH + {0xC3A2, 0x8292}, //11232 #CJK UNIFIED IDEOGRAPH + {0xC3A3, 0x832B}, //11233 #CJK UNIFIED IDEOGRAPH + {0xC3A4, 0x76F2}, //11234 #CJK UNIFIED IDEOGRAPH + {0xC3A5, 0x6C13}, //11235 #CJK UNIFIED IDEOGRAPH + {0xC3A6, 0x5FD9}, //11236 #CJK UNIFIED IDEOGRAPH + {0xC3A7, 0x83BD}, //11237 #CJK UNIFIED IDEOGRAPH + {0xC3A8, 0x732B}, //11238 #CJK UNIFIED IDEOGRAPH + {0xC3A9, 0x8305}, //11239 #CJK UNIFIED IDEOGRAPH + {0xC3AA, 0x951A}, //11240 #CJK UNIFIED IDEOGRAPH + {0xC3AB, 0x6BDB}, //11241 #CJK UNIFIED IDEOGRAPH + {0xC3AC, 0x77DB}, //11242 #CJK UNIFIED IDEOGRAPH + {0xC3AD, 0x94C6}, //11243 #CJK UNIFIED IDEOGRAPH + {0xC3AE, 0x536F}, //11244 #CJK UNIFIED IDEOGRAPH + {0xC3AF, 0x8302}, //11245 #CJK UNIFIED IDEOGRAPH + {0xC3B0, 0x5192}, //11246 #CJK UNIFIED IDEOGRAPH + {0xC3B1, 0x5E3D}, //11247 #CJK UNIFIED IDEOGRAPH + {0xC3B2, 0x8C8C}, //11248 #CJK UNIFIED IDEOGRAPH + {0xC3B3, 0x8D38}, //11249 #CJK UNIFIED IDEOGRAPH + {0xC3B4, 0x4E48}, //11250 #CJK UNIFIED IDEOGRAPH + {0xC3B5, 0x73AB}, //11251 #CJK UNIFIED IDEOGRAPH + {0xC3B6, 0x679A}, //11252 #CJK UNIFIED IDEOGRAPH + {0xC3B7, 0x6885}, //11253 #CJK UNIFIED IDEOGRAPH + {0xC3B8, 0x9176}, //11254 #CJK UNIFIED IDEOGRAPH + {0xC3B9, 0x9709}, //11255 #CJK UNIFIED IDEOGRAPH + {0xC3BA, 0x7164}, //11256 #CJK UNIFIED IDEOGRAPH + {0xC3BB, 0x6CA1}, //11257 #CJK UNIFIED IDEOGRAPH + {0xC3BC, 0x7709}, //11258 #CJK UNIFIED IDEOGRAPH + {0xC3BD, 0x5A92}, //11259 #CJK UNIFIED IDEOGRAPH + {0xC3BE, 0x9541}, //11260 #CJK UNIFIED IDEOGRAPH + {0xC3BF, 0x6BCF}, //11261 #CJK UNIFIED IDEOGRAPH + {0xC3C0, 0x7F8E}, //11262 #CJK UNIFIED IDEOGRAPH + {0xC3C1, 0x6627}, //11263 #CJK UNIFIED IDEOGRAPH + {0xC3C2, 0x5BD0}, //11264 #CJK UNIFIED IDEOGRAPH + {0xC3C3, 0x59B9}, //11265 #CJK UNIFIED IDEOGRAPH + {0xC3C4, 0x5A9A}, //11266 #CJK UNIFIED IDEOGRAPH + {0xC3C5, 0x95E8}, //11267 #CJK UNIFIED IDEOGRAPH + {0xC3C6, 0x95F7}, //11268 #CJK UNIFIED IDEOGRAPH + {0xC3C7, 0x4EEC}, //11269 #CJK UNIFIED IDEOGRAPH + {0xC3C8, 0x840C}, //11270 #CJK UNIFIED IDEOGRAPH + {0xC3C9, 0x8499}, //11271 #CJK UNIFIED IDEOGRAPH + {0xC3CA, 0x6AAC}, //11272 #CJK UNIFIED IDEOGRAPH + {0xC3CB, 0x76DF}, //11273 #CJK UNIFIED IDEOGRAPH + {0xC3CC, 0x9530}, //11274 #CJK UNIFIED IDEOGRAPH + {0xC3CD, 0x731B}, //11275 #CJK UNIFIED IDEOGRAPH + {0xC3CE, 0x68A6}, //11276 #CJK UNIFIED IDEOGRAPH + {0xC3CF, 0x5B5F}, //11277 #CJK UNIFIED IDEOGRAPH + {0xC3D0, 0x772F}, //11278 #CJK UNIFIED IDEOGRAPH + {0xC3D1, 0x919A}, //11279 #CJK UNIFIED IDEOGRAPH + {0xC3D2, 0x9761}, //11280 #CJK UNIFIED IDEOGRAPH + {0xC3D3, 0x7CDC}, //11281 #CJK UNIFIED IDEOGRAPH + {0xC3D4, 0x8FF7}, //11282 #CJK UNIFIED IDEOGRAPH + {0xC3D5, 0x8C1C}, //11283 #CJK UNIFIED IDEOGRAPH + {0xC3D6, 0x5F25}, //11284 #CJK UNIFIED IDEOGRAPH + {0xC3D7, 0x7C73}, //11285 #CJK UNIFIED IDEOGRAPH + {0xC3D8, 0x79D8}, //11286 #CJK UNIFIED IDEOGRAPH + {0xC3D9, 0x89C5}, //11287 #CJK UNIFIED IDEOGRAPH + {0xC3DA, 0x6CCC}, //11288 #CJK UNIFIED IDEOGRAPH + {0xC3DB, 0x871C}, //11289 #CJK UNIFIED IDEOGRAPH + {0xC3DC, 0x5BC6}, //11290 #CJK UNIFIED IDEOGRAPH + {0xC3DD, 0x5E42}, //11291 #CJK UNIFIED IDEOGRAPH + {0xC3DE, 0x68C9}, //11292 #CJK UNIFIED IDEOGRAPH + {0xC3DF, 0x7720}, //11293 #CJK UNIFIED IDEOGRAPH + {0xC3E0, 0x7EF5}, //11294 #CJK UNIFIED IDEOGRAPH + {0xC3E1, 0x5195}, //11295 #CJK UNIFIED IDEOGRAPH + {0xC3E2, 0x514D}, //11296 #CJK UNIFIED IDEOGRAPH + {0xC3E3, 0x52C9}, //11297 #CJK UNIFIED IDEOGRAPH + {0xC3E4, 0x5A29}, //11298 #CJK UNIFIED IDEOGRAPH + {0xC3E5, 0x7F05}, //11299 #CJK UNIFIED IDEOGRAPH + {0xC3E6, 0x9762}, //11300 #CJK UNIFIED IDEOGRAPH + {0xC3E7, 0x82D7}, //11301 #CJK UNIFIED IDEOGRAPH + {0xC3E8, 0x63CF}, //11302 #CJK UNIFIED IDEOGRAPH + {0xC3E9, 0x7784}, //11303 #CJK UNIFIED IDEOGRAPH + {0xC3EA, 0x85D0}, //11304 #CJK UNIFIED IDEOGRAPH + {0xC3EB, 0x79D2}, //11305 #CJK UNIFIED IDEOGRAPH + {0xC3EC, 0x6E3A}, //11306 #CJK UNIFIED IDEOGRAPH + {0xC3ED, 0x5E99}, //11307 #CJK UNIFIED IDEOGRAPH + {0xC3EE, 0x5999}, //11308 #CJK UNIFIED IDEOGRAPH + {0xC3EF, 0x8511}, //11309 #CJK UNIFIED IDEOGRAPH + {0xC3F0, 0x706D}, //11310 #CJK UNIFIED IDEOGRAPH + {0xC3F1, 0x6C11}, //11311 #CJK UNIFIED IDEOGRAPH + {0xC3F2, 0x62BF}, //11312 #CJK UNIFIED IDEOGRAPH + {0xC3F3, 0x76BF}, //11313 #CJK UNIFIED IDEOGRAPH + {0xC3F4, 0x654F}, //11314 #CJK UNIFIED IDEOGRAPH + {0xC3F5, 0x60AF}, //11315 #CJK UNIFIED IDEOGRAPH + {0xC3F6, 0x95FD}, //11316 #CJK UNIFIED IDEOGRAPH + {0xC3F7, 0x660E}, //11317 #CJK UNIFIED IDEOGRAPH + {0xC3F8, 0x879F}, //11318 #CJK UNIFIED IDEOGRAPH + {0xC3F9, 0x9E23}, //11319 #CJK UNIFIED IDEOGRAPH + {0xC3FA, 0x94ED}, //11320 #CJK UNIFIED IDEOGRAPH + {0xC3FB, 0x540D}, //11321 #CJK UNIFIED IDEOGRAPH + {0xC3FC, 0x547D}, //11322 #CJK UNIFIED IDEOGRAPH + {0xC3FD, 0x8C2C}, //11323 #CJK UNIFIED IDEOGRAPH + {0xC3FE, 0x6478}, //11324 #CJK UNIFIED IDEOGRAPH + {0xC440, 0x8140}, //11325 #CJK UNIFIED IDEOGRAPH + {0xC441, 0x8141}, //11326 #CJK UNIFIED IDEOGRAPH + {0xC442, 0x8142}, //11327 #CJK UNIFIED IDEOGRAPH + {0xC443, 0x8143}, //11328 #CJK UNIFIED IDEOGRAPH + {0xC444, 0x8144}, //11329 #CJK UNIFIED IDEOGRAPH + {0xC445, 0x8145}, //11330 #CJK UNIFIED IDEOGRAPH + {0xC446, 0x8147}, //11331 #CJK UNIFIED IDEOGRAPH + {0xC447, 0x8149}, //11332 #CJK UNIFIED IDEOGRAPH + {0xC448, 0x814D}, //11333 #CJK UNIFIED IDEOGRAPH + {0xC449, 0x814E}, //11334 #CJK UNIFIED IDEOGRAPH + {0xC44A, 0x814F}, //11335 #CJK UNIFIED IDEOGRAPH + {0xC44B, 0x8152}, //11336 #CJK UNIFIED IDEOGRAPH + {0xC44C, 0x8156}, //11337 #CJK UNIFIED IDEOGRAPH + {0xC44D, 0x8157}, //11338 #CJK UNIFIED IDEOGRAPH + {0xC44E, 0x8158}, //11339 #CJK UNIFIED IDEOGRAPH + {0xC44F, 0x815B}, //11340 #CJK UNIFIED IDEOGRAPH + {0xC450, 0x815C}, //11341 #CJK UNIFIED IDEOGRAPH + {0xC451, 0x815D}, //11342 #CJK UNIFIED IDEOGRAPH + {0xC452, 0x815E}, //11343 #CJK UNIFIED IDEOGRAPH + {0xC453, 0x815F}, //11344 #CJK UNIFIED IDEOGRAPH + {0xC454, 0x8161}, //11345 #CJK UNIFIED IDEOGRAPH + {0xC455, 0x8162}, //11346 #CJK UNIFIED IDEOGRAPH + {0xC456, 0x8163}, //11347 #CJK UNIFIED IDEOGRAPH + {0xC457, 0x8164}, //11348 #CJK UNIFIED IDEOGRAPH + {0xC458, 0x8166}, //11349 #CJK UNIFIED IDEOGRAPH + {0xC459, 0x8168}, //11350 #CJK UNIFIED IDEOGRAPH + {0xC45A, 0x816A}, //11351 #CJK UNIFIED IDEOGRAPH + {0xC45B, 0x816B}, //11352 #CJK UNIFIED IDEOGRAPH + {0xC45C, 0x816C}, //11353 #CJK UNIFIED IDEOGRAPH + {0xC45D, 0x816F}, //11354 #CJK UNIFIED IDEOGRAPH + {0xC45E, 0x8172}, //11355 #CJK UNIFIED IDEOGRAPH + {0xC45F, 0x8173}, //11356 #CJK UNIFIED IDEOGRAPH + {0xC460, 0x8175}, //11357 #CJK UNIFIED IDEOGRAPH + {0xC461, 0x8176}, //11358 #CJK UNIFIED IDEOGRAPH + {0xC462, 0x8177}, //11359 #CJK UNIFIED IDEOGRAPH + {0xC463, 0x8178}, //11360 #CJK UNIFIED IDEOGRAPH + {0xC464, 0x8181}, //11361 #CJK UNIFIED IDEOGRAPH + {0xC465, 0x8183}, //11362 #CJK UNIFIED IDEOGRAPH + {0xC466, 0x8184}, //11363 #CJK UNIFIED IDEOGRAPH + {0xC467, 0x8185}, //11364 #CJK UNIFIED IDEOGRAPH + {0xC468, 0x8186}, //11365 #CJK UNIFIED IDEOGRAPH + {0xC469, 0x8187}, //11366 #CJK UNIFIED IDEOGRAPH + {0xC46A, 0x8189}, //11367 #CJK UNIFIED IDEOGRAPH + {0xC46B, 0x818B}, //11368 #CJK UNIFIED IDEOGRAPH + {0xC46C, 0x818C}, //11369 #CJK UNIFIED IDEOGRAPH + {0xC46D, 0x818D}, //11370 #CJK UNIFIED IDEOGRAPH + {0xC46E, 0x818E}, //11371 #CJK UNIFIED IDEOGRAPH + {0xC46F, 0x8190}, //11372 #CJK UNIFIED IDEOGRAPH + {0xC470, 0x8192}, //11373 #CJK UNIFIED IDEOGRAPH + {0xC471, 0x8193}, //11374 #CJK UNIFIED IDEOGRAPH + {0xC472, 0x8194}, //11375 #CJK UNIFIED IDEOGRAPH + {0xC473, 0x8195}, //11376 #CJK UNIFIED IDEOGRAPH + {0xC474, 0x8196}, //11377 #CJK UNIFIED IDEOGRAPH + {0xC475, 0x8197}, //11378 #CJK UNIFIED IDEOGRAPH + {0xC476, 0x8199}, //11379 #CJK UNIFIED IDEOGRAPH + {0xC477, 0x819A}, //11380 #CJK UNIFIED IDEOGRAPH + {0xC478, 0x819E}, //11381 #CJK UNIFIED IDEOGRAPH + {0xC479, 0x819F}, //11382 #CJK UNIFIED IDEOGRAPH + {0xC47A, 0x81A0}, //11383 #CJK UNIFIED IDEOGRAPH + {0xC47B, 0x81A1}, //11384 #CJK UNIFIED IDEOGRAPH + {0xC47C, 0x81A2}, //11385 #CJK UNIFIED IDEOGRAPH + {0xC47D, 0x81A4}, //11386 #CJK UNIFIED IDEOGRAPH + {0xC47E, 0x81A5}, //11387 #CJK UNIFIED IDEOGRAPH + {0xC480, 0x81A7}, //11388 #CJK UNIFIED IDEOGRAPH + {0xC481, 0x81A9}, //11389 #CJK UNIFIED IDEOGRAPH + {0xC482, 0x81AB}, //11390 #CJK UNIFIED IDEOGRAPH + {0xC483, 0x81AC}, //11391 #CJK UNIFIED IDEOGRAPH + {0xC484, 0x81AD}, //11392 #CJK UNIFIED IDEOGRAPH + {0xC485, 0x81AE}, //11393 #CJK UNIFIED IDEOGRAPH + {0xC486, 0x81AF}, //11394 #CJK UNIFIED IDEOGRAPH + {0xC487, 0x81B0}, //11395 #CJK UNIFIED IDEOGRAPH + {0xC488, 0x81B1}, //11396 #CJK UNIFIED IDEOGRAPH + {0xC489, 0x81B2}, //11397 #CJK UNIFIED IDEOGRAPH + {0xC48A, 0x81B4}, //11398 #CJK UNIFIED IDEOGRAPH + {0xC48B, 0x81B5}, //11399 #CJK UNIFIED IDEOGRAPH + {0xC48C, 0x81B6}, //11400 #CJK UNIFIED IDEOGRAPH + {0xC48D, 0x81B7}, //11401 #CJK UNIFIED IDEOGRAPH + {0xC48E, 0x81B8}, //11402 #CJK UNIFIED IDEOGRAPH + {0xC48F, 0x81B9}, //11403 #CJK UNIFIED IDEOGRAPH + {0xC490, 0x81BC}, //11404 #CJK UNIFIED IDEOGRAPH + {0xC491, 0x81BD}, //11405 #CJK UNIFIED IDEOGRAPH + {0xC492, 0x81BE}, //11406 #CJK UNIFIED IDEOGRAPH + {0xC493, 0x81BF}, //11407 #CJK UNIFIED IDEOGRAPH + {0xC494, 0x81C4}, //11408 #CJK UNIFIED IDEOGRAPH + {0xC495, 0x81C5}, //11409 #CJK UNIFIED IDEOGRAPH + {0xC496, 0x81C7}, //11410 #CJK UNIFIED IDEOGRAPH + {0xC497, 0x81C8}, //11411 #CJK UNIFIED IDEOGRAPH + {0xC498, 0x81C9}, //11412 #CJK UNIFIED IDEOGRAPH + {0xC499, 0x81CB}, //11413 #CJK UNIFIED IDEOGRAPH + {0xC49A, 0x81CD}, //11414 #CJK UNIFIED IDEOGRAPH + {0xC49B, 0x81CE}, //11415 #CJK UNIFIED IDEOGRAPH + {0xC49C, 0x81CF}, //11416 #CJK UNIFIED IDEOGRAPH + {0xC49D, 0x81D0}, //11417 #CJK UNIFIED IDEOGRAPH + {0xC49E, 0x81D1}, //11418 #CJK UNIFIED IDEOGRAPH + {0xC49F, 0x81D2}, //11419 #CJK UNIFIED IDEOGRAPH + {0xC4A0, 0x81D3}, //11420 #CJK UNIFIED IDEOGRAPH + {0xC4A1, 0x6479}, //11421 #CJK UNIFIED IDEOGRAPH + {0xC4A2, 0x8611}, //11422 #CJK UNIFIED IDEOGRAPH + {0xC4A3, 0x6A21}, //11423 #CJK UNIFIED IDEOGRAPH + {0xC4A4, 0x819C}, //11424 #CJK UNIFIED IDEOGRAPH + {0xC4A5, 0x78E8}, //11425 #CJK UNIFIED IDEOGRAPH + {0xC4A6, 0x6469}, //11426 #CJK UNIFIED IDEOGRAPH + {0xC4A7, 0x9B54}, //11427 #CJK UNIFIED IDEOGRAPH + {0xC4A8, 0x62B9}, //11428 #CJK UNIFIED IDEOGRAPH + {0xC4A9, 0x672B}, //11429 #CJK UNIFIED IDEOGRAPH + {0xC4AA, 0x83AB}, //11430 #CJK UNIFIED IDEOGRAPH + {0xC4AB, 0x58A8}, //11431 #CJK UNIFIED IDEOGRAPH + {0xC4AC, 0x9ED8}, //11432 #CJK UNIFIED IDEOGRAPH + {0xC4AD, 0x6CAB}, //11433 #CJK UNIFIED IDEOGRAPH + {0xC4AE, 0x6F20}, //11434 #CJK UNIFIED IDEOGRAPH + {0xC4AF, 0x5BDE}, //11435 #CJK UNIFIED IDEOGRAPH + {0xC4B0, 0x964C}, //11436 #CJK UNIFIED IDEOGRAPH + {0xC4B1, 0x8C0B}, //11437 #CJK UNIFIED IDEOGRAPH + {0xC4B2, 0x725F}, //11438 #CJK UNIFIED IDEOGRAPH + {0xC4B3, 0x67D0}, //11439 #CJK UNIFIED IDEOGRAPH + {0xC4B4, 0x62C7}, //11440 #CJK UNIFIED IDEOGRAPH + {0xC4B5, 0x7261}, //11441 #CJK UNIFIED IDEOGRAPH + {0xC4B6, 0x4EA9}, //11442 #CJK UNIFIED IDEOGRAPH + {0xC4B7, 0x59C6}, //11443 #CJK UNIFIED IDEOGRAPH + {0xC4B8, 0x6BCD}, //11444 #CJK UNIFIED IDEOGRAPH + {0xC4B9, 0x5893}, //11445 #CJK UNIFIED IDEOGRAPH + {0xC4BA, 0x66AE}, //11446 #CJK UNIFIED IDEOGRAPH + {0xC4BB, 0x5E55}, //11447 #CJK UNIFIED IDEOGRAPH + {0xC4BC, 0x52DF}, //11448 #CJK UNIFIED IDEOGRAPH + {0xC4BD, 0x6155}, //11449 #CJK UNIFIED IDEOGRAPH + {0xC4BE, 0x6728}, //11450 #CJK UNIFIED IDEOGRAPH + {0xC4BF, 0x76EE}, //11451 #CJK UNIFIED IDEOGRAPH + {0xC4C0, 0x7766}, //11452 #CJK UNIFIED IDEOGRAPH + {0xC4C1, 0x7267}, //11453 #CJK UNIFIED IDEOGRAPH + {0xC4C2, 0x7A46}, //11454 #CJK UNIFIED IDEOGRAPH + {0xC4C3, 0x62FF}, //11455 #CJK UNIFIED IDEOGRAPH + {0xC4C4, 0x54EA}, //11456 #CJK UNIFIED IDEOGRAPH + {0xC4C5, 0x5450}, //11457 #CJK UNIFIED IDEOGRAPH + {0xC4C6, 0x94A0}, //11458 #CJK UNIFIED IDEOGRAPH + {0xC4C7, 0x90A3}, //11459 #CJK UNIFIED IDEOGRAPH + {0xC4C8, 0x5A1C}, //11460 #CJK UNIFIED IDEOGRAPH + {0xC4C9, 0x7EB3}, //11461 #CJK UNIFIED IDEOGRAPH + {0xC4CA, 0x6C16}, //11462 #CJK UNIFIED IDEOGRAPH + {0xC4CB, 0x4E43}, //11463 #CJK UNIFIED IDEOGRAPH + {0xC4CC, 0x5976}, //11464 #CJK UNIFIED IDEOGRAPH + {0xC4CD, 0x8010}, //11465 #CJK UNIFIED IDEOGRAPH + {0xC4CE, 0x5948}, //11466 #CJK UNIFIED IDEOGRAPH + {0xC4CF, 0x5357}, //11467 #CJK UNIFIED IDEOGRAPH + {0xC4D0, 0x7537}, //11468 #CJK UNIFIED IDEOGRAPH + {0xC4D1, 0x96BE}, //11469 #CJK UNIFIED IDEOGRAPH + {0xC4D2, 0x56CA}, //11470 #CJK UNIFIED IDEOGRAPH + {0xC4D3, 0x6320}, //11471 #CJK UNIFIED IDEOGRAPH + {0xC4D4, 0x8111}, //11472 #CJK UNIFIED IDEOGRAPH + {0xC4D5, 0x607C}, //11473 #CJK UNIFIED IDEOGRAPH + {0xC4D6, 0x95F9}, //11474 #CJK UNIFIED IDEOGRAPH + {0xC4D7, 0x6DD6}, //11475 #CJK UNIFIED IDEOGRAPH + {0xC4D8, 0x5462}, //11476 #CJK UNIFIED IDEOGRAPH + {0xC4D9, 0x9981}, //11477 #CJK UNIFIED IDEOGRAPH + {0xC4DA, 0x5185}, //11478 #CJK UNIFIED IDEOGRAPH + {0xC4DB, 0x5AE9}, //11479 #CJK UNIFIED IDEOGRAPH + {0xC4DC, 0x80FD}, //11480 #CJK UNIFIED IDEOGRAPH + {0xC4DD, 0x59AE}, //11481 #CJK UNIFIED IDEOGRAPH + {0xC4DE, 0x9713}, //11482 #CJK UNIFIED IDEOGRAPH + {0xC4DF, 0x502A}, //11483 #CJK UNIFIED IDEOGRAPH + {0xC4E0, 0x6CE5}, //11484 #CJK UNIFIED IDEOGRAPH + {0xC4E1, 0x5C3C}, //11485 #CJK UNIFIED IDEOGRAPH + {0xC4E2, 0x62DF}, //11486 #CJK UNIFIED IDEOGRAPH + {0xC4E3, 0x4F60}, //11487 #CJK UNIFIED IDEOGRAPH + {0xC4E4, 0x533F}, //11488 #CJK UNIFIED IDEOGRAPH + {0xC4E5, 0x817B}, //11489 #CJK UNIFIED IDEOGRAPH + {0xC4E6, 0x9006}, //11490 #CJK UNIFIED IDEOGRAPH + {0xC4E7, 0x6EBA}, //11491 #CJK UNIFIED IDEOGRAPH + {0xC4E8, 0x852B}, //11492 #CJK UNIFIED IDEOGRAPH + {0xC4E9, 0x62C8}, //11493 #CJK UNIFIED IDEOGRAPH + {0xC4EA, 0x5E74}, //11494 #CJK UNIFIED IDEOGRAPH + {0xC4EB, 0x78BE}, //11495 #CJK UNIFIED IDEOGRAPH + {0xC4EC, 0x64B5}, //11496 #CJK UNIFIED IDEOGRAPH + {0xC4ED, 0x637B}, //11497 #CJK UNIFIED IDEOGRAPH + {0xC4EE, 0x5FF5}, //11498 #CJK UNIFIED IDEOGRAPH + {0xC4EF, 0x5A18}, //11499 #CJK UNIFIED IDEOGRAPH + {0xC4F0, 0x917F}, //11500 #CJK UNIFIED IDEOGRAPH + {0xC4F1, 0x9E1F}, //11501 #CJK UNIFIED IDEOGRAPH + {0xC4F2, 0x5C3F}, //11502 #CJK UNIFIED IDEOGRAPH + {0xC4F3, 0x634F}, //11503 #CJK UNIFIED IDEOGRAPH + {0xC4F4, 0x8042}, //11504 #CJK UNIFIED IDEOGRAPH + {0xC4F5, 0x5B7D}, //11505 #CJK UNIFIED IDEOGRAPH + {0xC4F6, 0x556E}, //11506 #CJK UNIFIED IDEOGRAPH + {0xC4F7, 0x954A}, //11507 #CJK UNIFIED IDEOGRAPH + {0xC4F8, 0x954D}, //11508 #CJK UNIFIED IDEOGRAPH + {0xC4F9, 0x6D85}, //11509 #CJK UNIFIED IDEOGRAPH + {0xC4FA, 0x60A8}, //11510 #CJK UNIFIED IDEOGRAPH + {0xC4FB, 0x67E0}, //11511 #CJK UNIFIED IDEOGRAPH + {0xC4FC, 0x72DE}, //11512 #CJK UNIFIED IDEOGRAPH + {0xC4FD, 0x51DD}, //11513 #CJK UNIFIED IDEOGRAPH + {0xC4FE, 0x5B81}, //11514 #CJK UNIFIED IDEOGRAPH + {0xC540, 0x81D4}, //11515 #CJK UNIFIED IDEOGRAPH + {0xC541, 0x81D5}, //11516 #CJK UNIFIED IDEOGRAPH + {0xC542, 0x81D6}, //11517 #CJK UNIFIED IDEOGRAPH + {0xC543, 0x81D7}, //11518 #CJK UNIFIED IDEOGRAPH + {0xC544, 0x81D8}, //11519 #CJK UNIFIED IDEOGRAPH + {0xC545, 0x81D9}, //11520 #CJK UNIFIED IDEOGRAPH + {0xC546, 0x81DA}, //11521 #CJK UNIFIED IDEOGRAPH + {0xC547, 0x81DB}, //11522 #CJK UNIFIED IDEOGRAPH + {0xC548, 0x81DC}, //11523 #CJK UNIFIED IDEOGRAPH + {0xC549, 0x81DD}, //11524 #CJK UNIFIED IDEOGRAPH + {0xC54A, 0x81DE}, //11525 #CJK UNIFIED IDEOGRAPH + {0xC54B, 0x81DF}, //11526 #CJK UNIFIED IDEOGRAPH + {0xC54C, 0x81E0}, //11527 #CJK UNIFIED IDEOGRAPH + {0xC54D, 0x81E1}, //11528 #CJK UNIFIED IDEOGRAPH + {0xC54E, 0x81E2}, //11529 #CJK UNIFIED IDEOGRAPH + {0xC54F, 0x81E4}, //11530 #CJK UNIFIED IDEOGRAPH + {0xC550, 0x81E5}, //11531 #CJK UNIFIED IDEOGRAPH + {0xC551, 0x81E6}, //11532 #CJK UNIFIED IDEOGRAPH + {0xC552, 0x81E8}, //11533 #CJK UNIFIED IDEOGRAPH + {0xC553, 0x81E9}, //11534 #CJK UNIFIED IDEOGRAPH + {0xC554, 0x81EB}, //11535 #CJK UNIFIED IDEOGRAPH + {0xC555, 0x81EE}, //11536 #CJK UNIFIED IDEOGRAPH + {0xC556, 0x81EF}, //11537 #CJK UNIFIED IDEOGRAPH + {0xC557, 0x81F0}, //11538 #CJK UNIFIED IDEOGRAPH + {0xC558, 0x81F1}, //11539 #CJK UNIFIED IDEOGRAPH + {0xC559, 0x81F2}, //11540 #CJK UNIFIED IDEOGRAPH + {0xC55A, 0x81F5}, //11541 #CJK UNIFIED IDEOGRAPH + {0xC55B, 0x81F6}, //11542 #CJK UNIFIED IDEOGRAPH + {0xC55C, 0x81F7}, //11543 #CJK UNIFIED IDEOGRAPH + {0xC55D, 0x81F8}, //11544 #CJK UNIFIED IDEOGRAPH + {0xC55E, 0x81F9}, //11545 #CJK UNIFIED IDEOGRAPH + {0xC55F, 0x81FA}, //11546 #CJK UNIFIED IDEOGRAPH + {0xC560, 0x81FD}, //11547 #CJK UNIFIED IDEOGRAPH + {0xC561, 0x81FF}, //11548 #CJK UNIFIED IDEOGRAPH + {0xC562, 0x8203}, //11549 #CJK UNIFIED IDEOGRAPH + {0xC563, 0x8207}, //11550 #CJK UNIFIED IDEOGRAPH + {0xC564, 0x8208}, //11551 #CJK UNIFIED IDEOGRAPH + {0xC565, 0x8209}, //11552 #CJK UNIFIED IDEOGRAPH + {0xC566, 0x820A}, //11553 #CJK UNIFIED IDEOGRAPH + {0xC567, 0x820B}, //11554 #CJK UNIFIED IDEOGRAPH + {0xC568, 0x820E}, //11555 #CJK UNIFIED IDEOGRAPH + {0xC569, 0x820F}, //11556 #CJK UNIFIED IDEOGRAPH + {0xC56A, 0x8211}, //11557 #CJK UNIFIED IDEOGRAPH + {0xC56B, 0x8213}, //11558 #CJK UNIFIED IDEOGRAPH + {0xC56C, 0x8215}, //11559 #CJK UNIFIED IDEOGRAPH + {0xC56D, 0x8216}, //11560 #CJK UNIFIED IDEOGRAPH + {0xC56E, 0x8217}, //11561 #CJK UNIFIED IDEOGRAPH + {0xC56F, 0x8218}, //11562 #CJK UNIFIED IDEOGRAPH + {0xC570, 0x8219}, //11563 #CJK UNIFIED IDEOGRAPH + {0xC571, 0x821A}, //11564 #CJK UNIFIED IDEOGRAPH + {0xC572, 0x821D}, //11565 #CJK UNIFIED IDEOGRAPH + {0xC573, 0x8220}, //11566 #CJK UNIFIED IDEOGRAPH + {0xC574, 0x8224}, //11567 #CJK UNIFIED IDEOGRAPH + {0xC575, 0x8225}, //11568 #CJK UNIFIED IDEOGRAPH + {0xC576, 0x8226}, //11569 #CJK UNIFIED IDEOGRAPH + {0xC577, 0x8227}, //11570 #CJK UNIFIED IDEOGRAPH + {0xC578, 0x8229}, //11571 #CJK UNIFIED IDEOGRAPH + {0xC579, 0x822E}, //11572 #CJK UNIFIED IDEOGRAPH + {0xC57A, 0x8232}, //11573 #CJK UNIFIED IDEOGRAPH + {0xC57B, 0x823A}, //11574 #CJK UNIFIED IDEOGRAPH + {0xC57C, 0x823C}, //11575 #CJK UNIFIED IDEOGRAPH + {0xC57D, 0x823D}, //11576 #CJK UNIFIED IDEOGRAPH + {0xC57E, 0x823F}, //11577 #CJK UNIFIED IDEOGRAPH + {0xC580, 0x8240}, //11578 #CJK UNIFIED IDEOGRAPH + {0xC581, 0x8241}, //11579 #CJK UNIFIED IDEOGRAPH + {0xC582, 0x8242}, //11580 #CJK UNIFIED IDEOGRAPH + {0xC583, 0x8243}, //11581 #CJK UNIFIED IDEOGRAPH + {0xC584, 0x8245}, //11582 #CJK UNIFIED IDEOGRAPH + {0xC585, 0x8246}, //11583 #CJK UNIFIED IDEOGRAPH + {0xC586, 0x8248}, //11584 #CJK UNIFIED IDEOGRAPH + {0xC587, 0x824A}, //11585 #CJK UNIFIED IDEOGRAPH + {0xC588, 0x824C}, //11586 #CJK UNIFIED IDEOGRAPH + {0xC589, 0x824D}, //11587 #CJK UNIFIED IDEOGRAPH + {0xC58A, 0x824E}, //11588 #CJK UNIFIED IDEOGRAPH + {0xC58B, 0x8250}, //11589 #CJK UNIFIED IDEOGRAPH + {0xC58C, 0x8251}, //11590 #CJK UNIFIED IDEOGRAPH + {0xC58D, 0x8252}, //11591 #CJK UNIFIED IDEOGRAPH + {0xC58E, 0x8253}, //11592 #CJK UNIFIED IDEOGRAPH + {0xC58F, 0x8254}, //11593 #CJK UNIFIED IDEOGRAPH + {0xC590, 0x8255}, //11594 #CJK UNIFIED IDEOGRAPH + {0xC591, 0x8256}, //11595 #CJK UNIFIED IDEOGRAPH + {0xC592, 0x8257}, //11596 #CJK UNIFIED IDEOGRAPH + {0xC593, 0x8259}, //11597 #CJK UNIFIED IDEOGRAPH + {0xC594, 0x825B}, //11598 #CJK UNIFIED IDEOGRAPH + {0xC595, 0x825C}, //11599 #CJK UNIFIED IDEOGRAPH + {0xC596, 0x825D}, //11600 #CJK UNIFIED IDEOGRAPH + {0xC597, 0x825E}, //11601 #CJK UNIFIED IDEOGRAPH + {0xC598, 0x8260}, //11602 #CJK UNIFIED IDEOGRAPH + {0xC599, 0x8261}, //11603 #CJK UNIFIED IDEOGRAPH + {0xC59A, 0x8262}, //11604 #CJK UNIFIED IDEOGRAPH + {0xC59B, 0x8263}, //11605 #CJK UNIFIED IDEOGRAPH + {0xC59C, 0x8264}, //11606 #CJK UNIFIED IDEOGRAPH + {0xC59D, 0x8265}, //11607 #CJK UNIFIED IDEOGRAPH + {0xC59E, 0x8266}, //11608 #CJK UNIFIED IDEOGRAPH + {0xC59F, 0x8267}, //11609 #CJK UNIFIED IDEOGRAPH + {0xC5A0, 0x8269}, //11610 #CJK UNIFIED IDEOGRAPH + {0xC5A1, 0x62E7}, //11611 #CJK UNIFIED IDEOGRAPH + {0xC5A2, 0x6CDE}, //11612 #CJK UNIFIED IDEOGRAPH + {0xC5A3, 0x725B}, //11613 #CJK UNIFIED IDEOGRAPH + {0xC5A4, 0x626D}, //11614 #CJK UNIFIED IDEOGRAPH + {0xC5A5, 0x94AE}, //11615 #CJK UNIFIED IDEOGRAPH + {0xC5A6, 0x7EBD}, //11616 #CJK UNIFIED IDEOGRAPH + {0xC5A7, 0x8113}, //11617 #CJK UNIFIED IDEOGRAPH + {0xC5A8, 0x6D53}, //11618 #CJK UNIFIED IDEOGRAPH + {0xC5A9, 0x519C}, //11619 #CJK UNIFIED IDEOGRAPH + {0xC5AA, 0x5F04}, //11620 #CJK UNIFIED IDEOGRAPH + {0xC5AB, 0x5974}, //11621 #CJK UNIFIED IDEOGRAPH + {0xC5AC, 0x52AA}, //11622 #CJK UNIFIED IDEOGRAPH + {0xC5AD, 0x6012}, //11623 #CJK UNIFIED IDEOGRAPH + {0xC5AE, 0x5973}, //11624 #CJK UNIFIED IDEOGRAPH + {0xC5AF, 0x6696}, //11625 #CJK UNIFIED IDEOGRAPH + {0xC5B0, 0x8650}, //11626 #CJK UNIFIED IDEOGRAPH + {0xC5B1, 0x759F}, //11627 #CJK UNIFIED IDEOGRAPH + {0xC5B2, 0x632A}, //11628 #CJK UNIFIED IDEOGRAPH + {0xC5B3, 0x61E6}, //11629 #CJK UNIFIED IDEOGRAPH + {0xC5B4, 0x7CEF}, //11630 #CJK UNIFIED IDEOGRAPH + {0xC5B5, 0x8BFA}, //11631 #CJK UNIFIED IDEOGRAPH + {0xC5B6, 0x54E6}, //11632 #CJK UNIFIED IDEOGRAPH + {0xC5B7, 0x6B27}, //11633 #CJK UNIFIED IDEOGRAPH + {0xC5B8, 0x9E25}, //11634 #CJK UNIFIED IDEOGRAPH + {0xC5B9, 0x6BB4}, //11635 #CJK UNIFIED IDEOGRAPH + {0xC5BA, 0x85D5}, //11636 #CJK UNIFIED IDEOGRAPH + {0xC5BB, 0x5455}, //11637 #CJK UNIFIED IDEOGRAPH + {0xC5BC, 0x5076}, //11638 #CJK UNIFIED IDEOGRAPH + {0xC5BD, 0x6CA4}, //11639 #CJK UNIFIED IDEOGRAPH + {0xC5BE, 0x556A}, //11640 #CJK UNIFIED IDEOGRAPH + {0xC5BF, 0x8DB4}, //11641 #CJK UNIFIED IDEOGRAPH + {0xC5C0, 0x722C}, //11642 #CJK UNIFIED IDEOGRAPH + {0xC5C1, 0x5E15}, //11643 #CJK UNIFIED IDEOGRAPH + {0xC5C2, 0x6015}, //11644 #CJK UNIFIED IDEOGRAPH + {0xC5C3, 0x7436}, //11645 #CJK UNIFIED IDEOGRAPH + {0xC5C4, 0x62CD}, //11646 #CJK UNIFIED IDEOGRAPH + {0xC5C5, 0x6392}, //11647 #CJK UNIFIED IDEOGRAPH + {0xC5C6, 0x724C}, //11648 #CJK UNIFIED IDEOGRAPH + {0xC5C7, 0x5F98}, //11649 #CJK UNIFIED IDEOGRAPH + {0xC5C8, 0x6E43}, //11650 #CJK UNIFIED IDEOGRAPH + {0xC5C9, 0x6D3E}, //11651 #CJK UNIFIED IDEOGRAPH + {0xC5CA, 0x6500}, //11652 #CJK UNIFIED IDEOGRAPH + {0xC5CB, 0x6F58}, //11653 #CJK UNIFIED IDEOGRAPH + {0xC5CC, 0x76D8}, //11654 #CJK UNIFIED IDEOGRAPH + {0xC5CD, 0x78D0}, //11655 #CJK UNIFIED IDEOGRAPH + {0xC5CE, 0x76FC}, //11656 #CJK UNIFIED IDEOGRAPH + {0xC5CF, 0x7554}, //11657 #CJK UNIFIED IDEOGRAPH + {0xC5D0, 0x5224}, //11658 #CJK UNIFIED IDEOGRAPH + {0xC5D1, 0x53DB}, //11659 #CJK UNIFIED IDEOGRAPH + {0xC5D2, 0x4E53}, //11660 #CJK UNIFIED IDEOGRAPH + {0xC5D3, 0x5E9E}, //11661 #CJK UNIFIED IDEOGRAPH + {0xC5D4, 0x65C1}, //11662 #CJK UNIFIED IDEOGRAPH + {0xC5D5, 0x802A}, //11663 #CJK UNIFIED IDEOGRAPH + {0xC5D6, 0x80D6}, //11664 #CJK UNIFIED IDEOGRAPH + {0xC5D7, 0x629B}, //11665 #CJK UNIFIED IDEOGRAPH + {0xC5D8, 0x5486}, //11666 #CJK UNIFIED IDEOGRAPH + {0xC5D9, 0x5228}, //11667 #CJK UNIFIED IDEOGRAPH + {0xC5DA, 0x70AE}, //11668 #CJK UNIFIED IDEOGRAPH + {0xC5DB, 0x888D}, //11669 #CJK UNIFIED IDEOGRAPH + {0xC5DC, 0x8DD1}, //11670 #CJK UNIFIED IDEOGRAPH + {0xC5DD, 0x6CE1}, //11671 #CJK UNIFIED IDEOGRAPH + {0xC5DE, 0x5478}, //11672 #CJK UNIFIED IDEOGRAPH + {0xC5DF, 0x80DA}, //11673 #CJK UNIFIED IDEOGRAPH + {0xC5E0, 0x57F9}, //11674 #CJK UNIFIED IDEOGRAPH + {0xC5E1, 0x88F4}, //11675 #CJK UNIFIED IDEOGRAPH + {0xC5E2, 0x8D54}, //11676 #CJK UNIFIED IDEOGRAPH + {0xC5E3, 0x966A}, //11677 #CJK UNIFIED IDEOGRAPH + {0xC5E4, 0x914D}, //11678 #CJK UNIFIED IDEOGRAPH + {0xC5E5, 0x4F69}, //11679 #CJK UNIFIED IDEOGRAPH + {0xC5E6, 0x6C9B}, //11680 #CJK UNIFIED IDEOGRAPH + {0xC5E7, 0x55B7}, //11681 #CJK UNIFIED IDEOGRAPH + {0xC5E8, 0x76C6}, //11682 #CJK UNIFIED IDEOGRAPH + {0xC5E9, 0x7830}, //11683 #CJK UNIFIED IDEOGRAPH + {0xC5EA, 0x62A8}, //11684 #CJK UNIFIED IDEOGRAPH + {0xC5EB, 0x70F9}, //11685 #CJK UNIFIED IDEOGRAPH + {0xC5EC, 0x6F8E}, //11686 #CJK UNIFIED IDEOGRAPH + {0xC5ED, 0x5F6D}, //11687 #CJK UNIFIED IDEOGRAPH + {0xC5EE, 0x84EC}, //11688 #CJK UNIFIED IDEOGRAPH + {0xC5EF, 0x68DA}, //11689 #CJK UNIFIED IDEOGRAPH + {0xC5F0, 0x787C}, //11690 #CJK UNIFIED IDEOGRAPH + {0xC5F1, 0x7BF7}, //11691 #CJK UNIFIED IDEOGRAPH + {0xC5F2, 0x81A8}, //11692 #CJK UNIFIED IDEOGRAPH + {0xC5F3, 0x670B}, //11693 #CJK UNIFIED IDEOGRAPH + {0xC5F4, 0x9E4F}, //11694 #CJK UNIFIED IDEOGRAPH + {0xC5F5, 0x6367}, //11695 #CJK UNIFIED IDEOGRAPH + {0xC5F6, 0x78B0}, //11696 #CJK UNIFIED IDEOGRAPH + {0xC5F7, 0x576F}, //11697 #CJK UNIFIED IDEOGRAPH + {0xC5F8, 0x7812}, //11698 #CJK UNIFIED IDEOGRAPH + {0xC5F9, 0x9739}, //11699 #CJK UNIFIED IDEOGRAPH + {0xC5FA, 0x6279}, //11700 #CJK UNIFIED IDEOGRAPH + {0xC5FB, 0x62AB}, //11701 #CJK UNIFIED IDEOGRAPH + {0xC5FC, 0x5288}, //11702 #CJK UNIFIED IDEOGRAPH + {0xC5FD, 0x7435}, //11703 #CJK UNIFIED IDEOGRAPH + {0xC5FE, 0x6BD7}, //11704 #CJK UNIFIED IDEOGRAPH + {0xC640, 0x826A}, //11705 #CJK UNIFIED IDEOGRAPH + {0xC641, 0x826B}, //11706 #CJK UNIFIED IDEOGRAPH + {0xC642, 0x826C}, //11707 #CJK UNIFIED IDEOGRAPH + {0xC643, 0x826D}, //11708 #CJK UNIFIED IDEOGRAPH + {0xC644, 0x8271}, //11709 #CJK UNIFIED IDEOGRAPH + {0xC645, 0x8275}, //11710 #CJK UNIFIED IDEOGRAPH + {0xC646, 0x8276}, //11711 #CJK UNIFIED IDEOGRAPH + {0xC647, 0x8277}, //11712 #CJK UNIFIED IDEOGRAPH + {0xC648, 0x8278}, //11713 #CJK UNIFIED IDEOGRAPH + {0xC649, 0x827B}, //11714 #CJK UNIFIED IDEOGRAPH + {0xC64A, 0x827C}, //11715 #CJK UNIFIED IDEOGRAPH + {0xC64B, 0x8280}, //11716 #CJK UNIFIED IDEOGRAPH + {0xC64C, 0x8281}, //11717 #CJK UNIFIED IDEOGRAPH + {0xC64D, 0x8283}, //11718 #CJK UNIFIED IDEOGRAPH + {0xC64E, 0x8285}, //11719 #CJK UNIFIED IDEOGRAPH + {0xC64F, 0x8286}, //11720 #CJK UNIFIED IDEOGRAPH + {0xC650, 0x8287}, //11721 #CJK UNIFIED IDEOGRAPH + {0xC651, 0x8289}, //11722 #CJK UNIFIED IDEOGRAPH + {0xC652, 0x828C}, //11723 #CJK UNIFIED IDEOGRAPH + {0xC653, 0x8290}, //11724 #CJK UNIFIED IDEOGRAPH + {0xC654, 0x8293}, //11725 #CJK UNIFIED IDEOGRAPH + {0xC655, 0x8294}, //11726 #CJK UNIFIED IDEOGRAPH + {0xC656, 0x8295}, //11727 #CJK UNIFIED IDEOGRAPH + {0xC657, 0x8296}, //11728 #CJK UNIFIED IDEOGRAPH + {0xC658, 0x829A}, //11729 #CJK UNIFIED IDEOGRAPH + {0xC659, 0x829B}, //11730 #CJK UNIFIED IDEOGRAPH + {0xC65A, 0x829E}, //11731 #CJK UNIFIED IDEOGRAPH + {0xC65B, 0x82A0}, //11732 #CJK UNIFIED IDEOGRAPH + {0xC65C, 0x82A2}, //11733 #CJK UNIFIED IDEOGRAPH + {0xC65D, 0x82A3}, //11734 #CJK UNIFIED IDEOGRAPH + {0xC65E, 0x82A7}, //11735 #CJK UNIFIED IDEOGRAPH + {0xC65F, 0x82B2}, //11736 #CJK UNIFIED IDEOGRAPH + {0xC660, 0x82B5}, //11737 #CJK UNIFIED IDEOGRAPH + {0xC661, 0x82B6}, //11738 #CJK UNIFIED IDEOGRAPH + {0xC662, 0x82BA}, //11739 #CJK UNIFIED IDEOGRAPH + {0xC663, 0x82BB}, //11740 #CJK UNIFIED IDEOGRAPH + {0xC664, 0x82BC}, //11741 #CJK UNIFIED IDEOGRAPH + {0xC665, 0x82BF}, //11742 #CJK UNIFIED IDEOGRAPH + {0xC666, 0x82C0}, //11743 #CJK UNIFIED IDEOGRAPH + {0xC667, 0x82C2}, //11744 #CJK UNIFIED IDEOGRAPH + {0xC668, 0x82C3}, //11745 #CJK UNIFIED IDEOGRAPH + {0xC669, 0x82C5}, //11746 #CJK UNIFIED IDEOGRAPH + {0xC66A, 0x82C6}, //11747 #CJK UNIFIED IDEOGRAPH + {0xC66B, 0x82C9}, //11748 #CJK UNIFIED IDEOGRAPH + {0xC66C, 0x82D0}, //11749 #CJK UNIFIED IDEOGRAPH + {0xC66D, 0x82D6}, //11750 #CJK UNIFIED IDEOGRAPH + {0xC66E, 0x82D9}, //11751 #CJK UNIFIED IDEOGRAPH + {0xC66F, 0x82DA}, //11752 #CJK UNIFIED IDEOGRAPH + {0xC670, 0x82DD}, //11753 #CJK UNIFIED IDEOGRAPH + {0xC671, 0x82E2}, //11754 #CJK UNIFIED IDEOGRAPH + {0xC672, 0x82E7}, //11755 #CJK UNIFIED IDEOGRAPH + {0xC673, 0x82E8}, //11756 #CJK UNIFIED IDEOGRAPH + {0xC674, 0x82E9}, //11757 #CJK UNIFIED IDEOGRAPH + {0xC675, 0x82EA}, //11758 #CJK UNIFIED IDEOGRAPH + {0xC676, 0x82EC}, //11759 #CJK UNIFIED IDEOGRAPH + {0xC677, 0x82ED}, //11760 #CJK UNIFIED IDEOGRAPH + {0xC678, 0x82EE}, //11761 #CJK UNIFIED IDEOGRAPH + {0xC679, 0x82F0}, //11762 #CJK UNIFIED IDEOGRAPH + {0xC67A, 0x82F2}, //11763 #CJK UNIFIED IDEOGRAPH + {0xC67B, 0x82F3}, //11764 #CJK UNIFIED IDEOGRAPH + {0xC67C, 0x82F5}, //11765 #CJK UNIFIED IDEOGRAPH + {0xC67D, 0x82F6}, //11766 #CJK UNIFIED IDEOGRAPH + {0xC67E, 0x82F8}, //11767 #CJK UNIFIED IDEOGRAPH + {0xC680, 0x82FA}, //11768 #CJK UNIFIED IDEOGRAPH + {0xC681, 0x82FC}, //11769 #CJK UNIFIED IDEOGRAPH + {0xC682, 0x82FD}, //11770 #CJK UNIFIED IDEOGRAPH + {0xC683, 0x82FE}, //11771 #CJK UNIFIED IDEOGRAPH + {0xC684, 0x82FF}, //11772 #CJK UNIFIED IDEOGRAPH + {0xC685, 0x8300}, //11773 #CJK UNIFIED IDEOGRAPH + {0xC686, 0x830A}, //11774 #CJK UNIFIED IDEOGRAPH + {0xC687, 0x830B}, //11775 #CJK UNIFIED IDEOGRAPH + {0xC688, 0x830D}, //11776 #CJK UNIFIED IDEOGRAPH + {0xC689, 0x8310}, //11777 #CJK UNIFIED IDEOGRAPH + {0xC68A, 0x8312}, //11778 #CJK UNIFIED IDEOGRAPH + {0xC68B, 0x8313}, //11779 #CJK UNIFIED IDEOGRAPH + {0xC68C, 0x8316}, //11780 #CJK UNIFIED IDEOGRAPH + {0xC68D, 0x8318}, //11781 #CJK UNIFIED IDEOGRAPH + {0xC68E, 0x8319}, //11782 #CJK UNIFIED IDEOGRAPH + {0xC68F, 0x831D}, //11783 #CJK UNIFIED IDEOGRAPH + {0xC690, 0x831E}, //11784 #CJK UNIFIED IDEOGRAPH + {0xC691, 0x831F}, //11785 #CJK UNIFIED IDEOGRAPH + {0xC692, 0x8320}, //11786 #CJK UNIFIED IDEOGRAPH + {0xC693, 0x8321}, //11787 #CJK UNIFIED IDEOGRAPH + {0xC694, 0x8322}, //11788 #CJK UNIFIED IDEOGRAPH + {0xC695, 0x8323}, //11789 #CJK UNIFIED IDEOGRAPH + {0xC696, 0x8324}, //11790 #CJK UNIFIED IDEOGRAPH + {0xC697, 0x8325}, //11791 #CJK UNIFIED IDEOGRAPH + {0xC698, 0x8326}, //11792 #CJK UNIFIED IDEOGRAPH + {0xC699, 0x8329}, //11793 #CJK UNIFIED IDEOGRAPH + {0xC69A, 0x832A}, //11794 #CJK UNIFIED IDEOGRAPH + {0xC69B, 0x832E}, //11795 #CJK UNIFIED IDEOGRAPH + {0xC69C, 0x8330}, //11796 #CJK UNIFIED IDEOGRAPH + {0xC69D, 0x8332}, //11797 #CJK UNIFIED IDEOGRAPH + {0xC69E, 0x8337}, //11798 #CJK UNIFIED IDEOGRAPH + {0xC69F, 0x833B}, //11799 #CJK UNIFIED IDEOGRAPH + {0xC6A0, 0x833D}, //11800 #CJK UNIFIED IDEOGRAPH + {0xC6A1, 0x5564}, //11801 #CJK UNIFIED IDEOGRAPH + {0xC6A2, 0x813E}, //11802 #CJK UNIFIED IDEOGRAPH + {0xC6A3, 0x75B2}, //11803 #CJK UNIFIED IDEOGRAPH + {0xC6A4, 0x76AE}, //11804 #CJK UNIFIED IDEOGRAPH + {0xC6A5, 0x5339}, //11805 #CJK UNIFIED IDEOGRAPH + {0xC6A6, 0x75DE}, //11806 #CJK UNIFIED IDEOGRAPH + {0xC6A7, 0x50FB}, //11807 #CJK UNIFIED IDEOGRAPH + {0xC6A8, 0x5C41}, //11808 #CJK UNIFIED IDEOGRAPH + {0xC6A9, 0x8B6C}, //11809 #CJK UNIFIED IDEOGRAPH + {0xC6AA, 0x7BC7}, //11810 #CJK UNIFIED IDEOGRAPH + {0xC6AB, 0x504F}, //11811 #CJK UNIFIED IDEOGRAPH + {0xC6AC, 0x7247}, //11812 #CJK UNIFIED IDEOGRAPH + {0xC6AD, 0x9A97}, //11813 #CJK UNIFIED IDEOGRAPH + {0xC6AE, 0x98D8}, //11814 #CJK UNIFIED IDEOGRAPH + {0xC6AF, 0x6F02}, //11815 #CJK UNIFIED IDEOGRAPH + {0xC6B0, 0x74E2}, //11816 #CJK UNIFIED IDEOGRAPH + {0xC6B1, 0x7968}, //11817 #CJK UNIFIED IDEOGRAPH + {0xC6B2, 0x6487}, //11818 #CJK UNIFIED IDEOGRAPH + {0xC6B3, 0x77A5}, //11819 #CJK UNIFIED IDEOGRAPH + {0xC6B4, 0x62FC}, //11820 #CJK UNIFIED IDEOGRAPH + {0xC6B5, 0x9891}, //11821 #CJK UNIFIED IDEOGRAPH + {0xC6B6, 0x8D2B}, //11822 #CJK UNIFIED IDEOGRAPH + {0xC6B7, 0x54C1}, //11823 #CJK UNIFIED IDEOGRAPH + {0xC6B8, 0x8058}, //11824 #CJK UNIFIED IDEOGRAPH + {0xC6B9, 0x4E52}, //11825 #CJK UNIFIED IDEOGRAPH + {0xC6BA, 0x576A}, //11826 #CJK UNIFIED IDEOGRAPH + {0xC6BB, 0x82F9}, //11827 #CJK UNIFIED IDEOGRAPH + {0xC6BC, 0x840D}, //11828 #CJK UNIFIED IDEOGRAPH + {0xC6BD, 0x5E73}, //11829 #CJK UNIFIED IDEOGRAPH + {0xC6BE, 0x51ED}, //11830 #CJK UNIFIED IDEOGRAPH + {0xC6BF, 0x74F6}, //11831 #CJK UNIFIED IDEOGRAPH + {0xC6C0, 0x8BC4}, //11832 #CJK UNIFIED IDEOGRAPH + {0xC6C1, 0x5C4F}, //11833 #CJK UNIFIED IDEOGRAPH + {0xC6C2, 0x5761}, //11834 #CJK UNIFIED IDEOGRAPH + {0xC6C3, 0x6CFC}, //11835 #CJK UNIFIED IDEOGRAPH + {0xC6C4, 0x9887}, //11836 #CJK UNIFIED IDEOGRAPH + {0xC6C5, 0x5A46}, //11837 #CJK UNIFIED IDEOGRAPH + {0xC6C6, 0x7834}, //11838 #CJK UNIFIED IDEOGRAPH + {0xC6C7, 0x9B44}, //11839 #CJK UNIFIED IDEOGRAPH + {0xC6C8, 0x8FEB}, //11840 #CJK UNIFIED IDEOGRAPH + {0xC6C9, 0x7C95}, //11841 #CJK UNIFIED IDEOGRAPH + {0xC6CA, 0x5256}, //11842 #CJK UNIFIED IDEOGRAPH + {0xC6CB, 0x6251}, //11843 #CJK UNIFIED IDEOGRAPH + {0xC6CC, 0x94FA}, //11844 #CJK UNIFIED IDEOGRAPH + {0xC6CD, 0x4EC6}, //11845 #CJK UNIFIED IDEOGRAPH + {0xC6CE, 0x8386}, //11846 #CJK UNIFIED IDEOGRAPH + {0xC6CF, 0x8461}, //11847 #CJK UNIFIED IDEOGRAPH + {0xC6D0, 0x83E9}, //11848 #CJK UNIFIED IDEOGRAPH + {0xC6D1, 0x84B2}, //11849 #CJK UNIFIED IDEOGRAPH + {0xC6D2, 0x57D4}, //11850 #CJK UNIFIED IDEOGRAPH + {0xC6D3, 0x6734}, //11851 #CJK UNIFIED IDEOGRAPH + {0xC6D4, 0x5703}, //11852 #CJK UNIFIED IDEOGRAPH + {0xC6D5, 0x666E}, //11853 #CJK UNIFIED IDEOGRAPH + {0xC6D6, 0x6D66}, //11854 #CJK UNIFIED IDEOGRAPH + {0xC6D7, 0x8C31}, //11855 #CJK UNIFIED IDEOGRAPH + {0xC6D8, 0x66DD}, //11856 #CJK UNIFIED IDEOGRAPH + {0xC6D9, 0x7011}, //11857 #CJK UNIFIED IDEOGRAPH + {0xC6DA, 0x671F}, //11858 #CJK UNIFIED IDEOGRAPH + {0xC6DB, 0x6B3A}, //11859 #CJK UNIFIED IDEOGRAPH + {0xC6DC, 0x6816}, //11860 #CJK UNIFIED IDEOGRAPH + {0xC6DD, 0x621A}, //11861 #CJK UNIFIED IDEOGRAPH + {0xC6DE, 0x59BB}, //11862 #CJK UNIFIED IDEOGRAPH + {0xC6DF, 0x4E03}, //11863 #CJK UNIFIED IDEOGRAPH + {0xC6E0, 0x51C4}, //11864 #CJK UNIFIED IDEOGRAPH + {0xC6E1, 0x6F06}, //11865 #CJK UNIFIED IDEOGRAPH + {0xC6E2, 0x67D2}, //11866 #CJK UNIFIED IDEOGRAPH + {0xC6E3, 0x6C8F}, //11867 #CJK UNIFIED IDEOGRAPH + {0xC6E4, 0x5176}, //11868 #CJK UNIFIED IDEOGRAPH + {0xC6E5, 0x68CB}, //11869 #CJK UNIFIED IDEOGRAPH + {0xC6E6, 0x5947}, //11870 #CJK UNIFIED IDEOGRAPH + {0xC6E7, 0x6B67}, //11871 #CJK UNIFIED IDEOGRAPH + {0xC6E8, 0x7566}, //11872 #CJK UNIFIED IDEOGRAPH + {0xC6E9, 0x5D0E}, //11873 #CJK UNIFIED IDEOGRAPH + {0xC6EA, 0x8110}, //11874 #CJK UNIFIED IDEOGRAPH + {0xC6EB, 0x9F50}, //11875 #CJK UNIFIED IDEOGRAPH + {0xC6EC, 0x65D7}, //11876 #CJK UNIFIED IDEOGRAPH + {0xC6ED, 0x7948}, //11877 #CJK UNIFIED IDEOGRAPH + {0xC6EE, 0x7941}, //11878 #CJK UNIFIED IDEOGRAPH + {0xC6EF, 0x9A91}, //11879 #CJK UNIFIED IDEOGRAPH + {0xC6F0, 0x8D77}, //11880 #CJK UNIFIED IDEOGRAPH + {0xC6F1, 0x5C82}, //11881 #CJK UNIFIED IDEOGRAPH + {0xC6F2, 0x4E5E}, //11882 #CJK UNIFIED IDEOGRAPH + {0xC6F3, 0x4F01}, //11883 #CJK UNIFIED IDEOGRAPH + {0xC6F4, 0x542F}, //11884 #CJK UNIFIED IDEOGRAPH + {0xC6F5, 0x5951}, //11885 #CJK UNIFIED IDEOGRAPH + {0xC6F6, 0x780C}, //11886 #CJK UNIFIED IDEOGRAPH + {0xC6F7, 0x5668}, //11887 #CJK UNIFIED IDEOGRAPH + {0xC6F8, 0x6C14}, //11888 #CJK UNIFIED IDEOGRAPH + {0xC6F9, 0x8FC4}, //11889 #CJK UNIFIED IDEOGRAPH + {0xC6FA, 0x5F03}, //11890 #CJK UNIFIED IDEOGRAPH + {0xC6FB, 0x6C7D}, //11891 #CJK UNIFIED IDEOGRAPH + {0xC6FC, 0x6CE3}, //11892 #CJK UNIFIED IDEOGRAPH + {0xC6FD, 0x8BAB}, //11893 #CJK UNIFIED IDEOGRAPH + {0xC6FE, 0x6390}, //11894 #CJK UNIFIED IDEOGRAPH + {0xC740, 0x833E}, //11895 #CJK UNIFIED IDEOGRAPH + {0xC741, 0x833F}, //11896 #CJK UNIFIED IDEOGRAPH + {0xC742, 0x8341}, //11897 #CJK UNIFIED IDEOGRAPH + {0xC743, 0x8342}, //11898 #CJK UNIFIED IDEOGRAPH + {0xC744, 0x8344}, //11899 #CJK UNIFIED IDEOGRAPH + {0xC745, 0x8345}, //11900 #CJK UNIFIED IDEOGRAPH + {0xC746, 0x8348}, //11901 #CJK UNIFIED IDEOGRAPH + {0xC747, 0x834A}, //11902 #CJK UNIFIED IDEOGRAPH + {0xC748, 0x834B}, //11903 #CJK UNIFIED IDEOGRAPH + {0xC749, 0x834C}, //11904 #CJK UNIFIED IDEOGRAPH + {0xC74A, 0x834D}, //11905 #CJK UNIFIED IDEOGRAPH + {0xC74B, 0x834E}, //11906 #CJK UNIFIED IDEOGRAPH + {0xC74C, 0x8353}, //11907 #CJK UNIFIED IDEOGRAPH + {0xC74D, 0x8355}, //11908 #CJK UNIFIED IDEOGRAPH + {0xC74E, 0x8356}, //11909 #CJK UNIFIED IDEOGRAPH + {0xC74F, 0x8357}, //11910 #CJK UNIFIED IDEOGRAPH + {0xC750, 0x8358}, //11911 #CJK UNIFIED IDEOGRAPH + {0xC751, 0x8359}, //11912 #CJK UNIFIED IDEOGRAPH + {0xC752, 0x835D}, //11913 #CJK UNIFIED IDEOGRAPH + {0xC753, 0x8362}, //11914 #CJK UNIFIED IDEOGRAPH + {0xC754, 0x8370}, //11915 #CJK UNIFIED IDEOGRAPH + {0xC755, 0x8371}, //11916 #CJK UNIFIED IDEOGRAPH + {0xC756, 0x8372}, //11917 #CJK UNIFIED IDEOGRAPH + {0xC757, 0x8373}, //11918 #CJK UNIFIED IDEOGRAPH + {0xC758, 0x8374}, //11919 #CJK UNIFIED IDEOGRAPH + {0xC759, 0x8375}, //11920 #CJK UNIFIED IDEOGRAPH + {0xC75A, 0x8376}, //11921 #CJK UNIFIED IDEOGRAPH + {0xC75B, 0x8379}, //11922 #CJK UNIFIED IDEOGRAPH + {0xC75C, 0x837A}, //11923 #CJK UNIFIED IDEOGRAPH + {0xC75D, 0x837E}, //11924 #CJK UNIFIED IDEOGRAPH + {0xC75E, 0x837F}, //11925 #CJK UNIFIED IDEOGRAPH + {0xC75F, 0x8380}, //11926 #CJK UNIFIED IDEOGRAPH + {0xC760, 0x8381}, //11927 #CJK UNIFIED IDEOGRAPH + {0xC761, 0x8382}, //11928 #CJK UNIFIED IDEOGRAPH + {0xC762, 0x8383}, //11929 #CJK UNIFIED IDEOGRAPH + {0xC763, 0x8384}, //11930 #CJK UNIFIED IDEOGRAPH + {0xC764, 0x8387}, //11931 #CJK UNIFIED IDEOGRAPH + {0xC765, 0x8388}, //11932 #CJK UNIFIED IDEOGRAPH + {0xC766, 0x838A}, //11933 #CJK UNIFIED IDEOGRAPH + {0xC767, 0x838B}, //11934 #CJK UNIFIED IDEOGRAPH + {0xC768, 0x838C}, //11935 #CJK UNIFIED IDEOGRAPH + {0xC769, 0x838D}, //11936 #CJK UNIFIED IDEOGRAPH + {0xC76A, 0x838F}, //11937 #CJK UNIFIED IDEOGRAPH + {0xC76B, 0x8390}, //11938 #CJK UNIFIED IDEOGRAPH + {0xC76C, 0x8391}, //11939 #CJK UNIFIED IDEOGRAPH + {0xC76D, 0x8394}, //11940 #CJK UNIFIED IDEOGRAPH + {0xC76E, 0x8395}, //11941 #CJK UNIFIED IDEOGRAPH + {0xC76F, 0x8396}, //11942 #CJK UNIFIED IDEOGRAPH + {0xC770, 0x8397}, //11943 #CJK UNIFIED IDEOGRAPH + {0xC771, 0x8399}, //11944 #CJK UNIFIED IDEOGRAPH + {0xC772, 0x839A}, //11945 #CJK UNIFIED IDEOGRAPH + {0xC773, 0x839D}, //11946 #CJK UNIFIED IDEOGRAPH + {0xC774, 0x839F}, //11947 #CJK UNIFIED IDEOGRAPH + {0xC775, 0x83A1}, //11948 #CJK UNIFIED IDEOGRAPH + {0xC776, 0x83A2}, //11949 #CJK UNIFIED IDEOGRAPH + {0xC777, 0x83A3}, //11950 #CJK UNIFIED IDEOGRAPH + {0xC778, 0x83A4}, //11951 #CJK UNIFIED IDEOGRAPH + {0xC779, 0x83A5}, //11952 #CJK UNIFIED IDEOGRAPH + {0xC77A, 0x83A6}, //11953 #CJK UNIFIED IDEOGRAPH + {0xC77B, 0x83A7}, //11954 #CJK UNIFIED IDEOGRAPH + {0xC77C, 0x83AC}, //11955 #CJK UNIFIED IDEOGRAPH + {0xC77D, 0x83AD}, //11956 #CJK UNIFIED IDEOGRAPH + {0xC77E, 0x83AE}, //11957 #CJK UNIFIED IDEOGRAPH + {0xC780, 0x83AF}, //11958 #CJK UNIFIED IDEOGRAPH + {0xC781, 0x83B5}, //11959 #CJK UNIFIED IDEOGRAPH + {0xC782, 0x83BB}, //11960 #CJK UNIFIED IDEOGRAPH + {0xC783, 0x83BE}, //11961 #CJK UNIFIED IDEOGRAPH + {0xC784, 0x83BF}, //11962 #CJK UNIFIED IDEOGRAPH + {0xC785, 0x83C2}, //11963 #CJK UNIFIED IDEOGRAPH + {0xC786, 0x83C3}, //11964 #CJK UNIFIED IDEOGRAPH + {0xC787, 0x83C4}, //11965 #CJK UNIFIED IDEOGRAPH + {0xC788, 0x83C6}, //11966 #CJK UNIFIED IDEOGRAPH + {0xC789, 0x83C8}, //11967 #CJK UNIFIED IDEOGRAPH + {0xC78A, 0x83C9}, //11968 #CJK UNIFIED IDEOGRAPH + {0xC78B, 0x83CB}, //11969 #CJK UNIFIED IDEOGRAPH + {0xC78C, 0x83CD}, //11970 #CJK UNIFIED IDEOGRAPH + {0xC78D, 0x83CE}, //11971 #CJK UNIFIED IDEOGRAPH + {0xC78E, 0x83D0}, //11972 #CJK UNIFIED IDEOGRAPH + {0xC78F, 0x83D1}, //11973 #CJK UNIFIED IDEOGRAPH + {0xC790, 0x83D2}, //11974 #CJK UNIFIED IDEOGRAPH + {0xC791, 0x83D3}, //11975 #CJK UNIFIED IDEOGRAPH + {0xC792, 0x83D5}, //11976 #CJK UNIFIED IDEOGRAPH + {0xC793, 0x83D7}, //11977 #CJK UNIFIED IDEOGRAPH + {0xC794, 0x83D9}, //11978 #CJK UNIFIED IDEOGRAPH + {0xC795, 0x83DA}, //11979 #CJK UNIFIED IDEOGRAPH + {0xC796, 0x83DB}, //11980 #CJK UNIFIED IDEOGRAPH + {0xC797, 0x83DE}, //11981 #CJK UNIFIED IDEOGRAPH + {0xC798, 0x83E2}, //11982 #CJK UNIFIED IDEOGRAPH + {0xC799, 0x83E3}, //11983 #CJK UNIFIED IDEOGRAPH + {0xC79A, 0x83E4}, //11984 #CJK UNIFIED IDEOGRAPH + {0xC79B, 0x83E6}, //11985 #CJK UNIFIED IDEOGRAPH + {0xC79C, 0x83E7}, //11986 #CJK UNIFIED IDEOGRAPH + {0xC79D, 0x83E8}, //11987 #CJK UNIFIED IDEOGRAPH + {0xC79E, 0x83EB}, //11988 #CJK UNIFIED IDEOGRAPH + {0xC79F, 0x83EC}, //11989 #CJK UNIFIED IDEOGRAPH + {0xC7A0, 0x83ED}, //11990 #CJK UNIFIED IDEOGRAPH + {0xC7A1, 0x6070}, //11991 #CJK UNIFIED IDEOGRAPH + {0xC7A2, 0x6D3D}, //11992 #CJK UNIFIED IDEOGRAPH + {0xC7A3, 0x7275}, //11993 #CJK UNIFIED IDEOGRAPH + {0xC7A4, 0x6266}, //11994 #CJK UNIFIED IDEOGRAPH + {0xC7A5, 0x948E}, //11995 #CJK UNIFIED IDEOGRAPH + {0xC7A6, 0x94C5}, //11996 #CJK UNIFIED IDEOGRAPH + {0xC7A7, 0x5343}, //11997 #CJK UNIFIED IDEOGRAPH + {0xC7A8, 0x8FC1}, //11998 #CJK UNIFIED IDEOGRAPH + {0xC7A9, 0x7B7E}, //11999 #CJK UNIFIED IDEOGRAPH + {0xC7AA, 0x4EDF}, //12000 #CJK UNIFIED IDEOGRAPH + {0xC7AB, 0x8C26}, //12001 #CJK UNIFIED IDEOGRAPH + {0xC7AC, 0x4E7E}, //12002 #CJK UNIFIED IDEOGRAPH + {0xC7AD, 0x9ED4}, //12003 #CJK UNIFIED IDEOGRAPH + {0xC7AE, 0x94B1}, //12004 #CJK UNIFIED IDEOGRAPH + {0xC7AF, 0x94B3}, //12005 #CJK UNIFIED IDEOGRAPH + {0xC7B0, 0x524D}, //12006 #CJK UNIFIED IDEOGRAPH + {0xC7B1, 0x6F5C}, //12007 #CJK UNIFIED IDEOGRAPH + {0xC7B2, 0x9063}, //12008 #CJK UNIFIED IDEOGRAPH + {0xC7B3, 0x6D45}, //12009 #CJK UNIFIED IDEOGRAPH + {0xC7B4, 0x8C34}, //12010 #CJK UNIFIED IDEOGRAPH + {0xC7B5, 0x5811}, //12011 #CJK UNIFIED IDEOGRAPH + {0xC7B6, 0x5D4C}, //12012 #CJK UNIFIED IDEOGRAPH + {0xC7B7, 0x6B20}, //12013 #CJK UNIFIED IDEOGRAPH + {0xC7B8, 0x6B49}, //12014 #CJK UNIFIED IDEOGRAPH + {0xC7B9, 0x67AA}, //12015 #CJK UNIFIED IDEOGRAPH + {0xC7BA, 0x545B}, //12016 #CJK UNIFIED IDEOGRAPH + {0xC7BB, 0x8154}, //12017 #CJK UNIFIED IDEOGRAPH + {0xC7BC, 0x7F8C}, //12018 #CJK UNIFIED IDEOGRAPH + {0xC7BD, 0x5899}, //12019 #CJK UNIFIED IDEOGRAPH + {0xC7BE, 0x8537}, //12020 #CJK UNIFIED IDEOGRAPH + {0xC7BF, 0x5F3A}, //12021 #CJK UNIFIED IDEOGRAPH + {0xC7C0, 0x62A2}, //12022 #CJK UNIFIED IDEOGRAPH + {0xC7C1, 0x6A47}, //12023 #CJK UNIFIED IDEOGRAPH + {0xC7C2, 0x9539}, //12024 #CJK UNIFIED IDEOGRAPH + {0xC7C3, 0x6572}, //12025 #CJK UNIFIED IDEOGRAPH + {0xC7C4, 0x6084}, //12026 #CJK UNIFIED IDEOGRAPH + {0xC7C5, 0x6865}, //12027 #CJK UNIFIED IDEOGRAPH + {0xC7C6, 0x77A7}, //12028 #CJK UNIFIED IDEOGRAPH + {0xC7C7, 0x4E54}, //12029 #CJK UNIFIED IDEOGRAPH + {0xC7C8, 0x4FA8}, //12030 #CJK UNIFIED IDEOGRAPH + {0xC7C9, 0x5DE7}, //12031 #CJK UNIFIED IDEOGRAPH + {0xC7CA, 0x9798}, //12032 #CJK UNIFIED IDEOGRAPH + {0xC7CB, 0x64AC}, //12033 #CJK UNIFIED IDEOGRAPH + {0xC7CC, 0x7FD8}, //12034 #CJK UNIFIED IDEOGRAPH + {0xC7CD, 0x5CED}, //12035 #CJK UNIFIED IDEOGRAPH + {0xC7CE, 0x4FCF}, //12036 #CJK UNIFIED IDEOGRAPH + {0xC7CF, 0x7A8D}, //12037 #CJK UNIFIED IDEOGRAPH + {0xC7D0, 0x5207}, //12038 #CJK UNIFIED IDEOGRAPH + {0xC7D1, 0x8304}, //12039 #CJK UNIFIED IDEOGRAPH + {0xC7D2, 0x4E14}, //12040 #CJK UNIFIED IDEOGRAPH + {0xC7D3, 0x602F}, //12041 #CJK UNIFIED IDEOGRAPH + {0xC7D4, 0x7A83}, //12042 #CJK UNIFIED IDEOGRAPH + {0xC7D5, 0x94A6}, //12043 #CJK UNIFIED IDEOGRAPH + {0xC7D6, 0x4FB5}, //12044 #CJK UNIFIED IDEOGRAPH + {0xC7D7, 0x4EB2}, //12045 #CJK UNIFIED IDEOGRAPH + {0xC7D8, 0x79E6}, //12046 #CJK UNIFIED IDEOGRAPH + {0xC7D9, 0x7434}, //12047 #CJK UNIFIED IDEOGRAPH + {0xC7DA, 0x52E4}, //12048 #CJK UNIFIED IDEOGRAPH + {0xC7DB, 0x82B9}, //12049 #CJK UNIFIED IDEOGRAPH + {0xC7DC, 0x64D2}, //12050 #CJK UNIFIED IDEOGRAPH + {0xC7DD, 0x79BD}, //12051 #CJK UNIFIED IDEOGRAPH + {0xC7DE, 0x5BDD}, //12052 #CJK UNIFIED IDEOGRAPH + {0xC7DF, 0x6C81}, //12053 #CJK UNIFIED IDEOGRAPH + {0xC7E0, 0x9752}, //12054 #CJK UNIFIED IDEOGRAPH + {0xC7E1, 0x8F7B}, //12055 #CJK UNIFIED IDEOGRAPH + {0xC7E2, 0x6C22}, //12056 #CJK UNIFIED IDEOGRAPH + {0xC7E3, 0x503E}, //12057 #CJK UNIFIED IDEOGRAPH + {0xC7E4, 0x537F}, //12058 #CJK UNIFIED IDEOGRAPH + {0xC7E5, 0x6E05}, //12059 #CJK UNIFIED IDEOGRAPH + {0xC7E6, 0x64CE}, //12060 #CJK UNIFIED IDEOGRAPH + {0xC7E7, 0x6674}, //12061 #CJK UNIFIED IDEOGRAPH + {0xC7E8, 0x6C30}, //12062 #CJK UNIFIED IDEOGRAPH + {0xC7E9, 0x60C5}, //12063 #CJK UNIFIED IDEOGRAPH + {0xC7EA, 0x9877}, //12064 #CJK UNIFIED IDEOGRAPH + {0xC7EB, 0x8BF7}, //12065 #CJK UNIFIED IDEOGRAPH + {0xC7EC, 0x5E86}, //12066 #CJK UNIFIED IDEOGRAPH + {0xC7ED, 0x743C}, //12067 #CJK UNIFIED IDEOGRAPH + {0xC7EE, 0x7A77}, //12068 #CJK UNIFIED IDEOGRAPH + {0xC7EF, 0x79CB}, //12069 #CJK UNIFIED IDEOGRAPH + {0xC7F0, 0x4E18}, //12070 #CJK UNIFIED IDEOGRAPH + {0xC7F1, 0x90B1}, //12071 #CJK UNIFIED IDEOGRAPH + {0xC7F2, 0x7403}, //12072 #CJK UNIFIED IDEOGRAPH + {0xC7F3, 0x6C42}, //12073 #CJK UNIFIED IDEOGRAPH + {0xC7F4, 0x56DA}, //12074 #CJK UNIFIED IDEOGRAPH + {0xC7F5, 0x914B}, //12075 #CJK UNIFIED IDEOGRAPH + {0xC7F6, 0x6CC5}, //12076 #CJK UNIFIED IDEOGRAPH + {0xC7F7, 0x8D8B}, //12077 #CJK UNIFIED IDEOGRAPH + {0xC7F8, 0x533A}, //12078 #CJK UNIFIED IDEOGRAPH + {0xC7F9, 0x86C6}, //12079 #CJK UNIFIED IDEOGRAPH + {0xC7FA, 0x66F2}, //12080 #CJK UNIFIED IDEOGRAPH + {0xC7FB, 0x8EAF}, //12081 #CJK UNIFIED IDEOGRAPH + {0xC7FC, 0x5C48}, //12082 #CJK UNIFIED IDEOGRAPH + {0xC7FD, 0x9A71}, //12083 #CJK UNIFIED IDEOGRAPH + {0xC7FE, 0x6E20}, //12084 #CJK UNIFIED IDEOGRAPH + {0xC840, 0x83EE}, //12085 #CJK UNIFIED IDEOGRAPH + {0xC841, 0x83EF}, //12086 #CJK UNIFIED IDEOGRAPH + {0xC842, 0x83F3}, //12087 #CJK UNIFIED IDEOGRAPH + {0xC843, 0x83F4}, //12088 #CJK UNIFIED IDEOGRAPH + {0xC844, 0x83F5}, //12089 #CJK UNIFIED IDEOGRAPH + {0xC845, 0x83F6}, //12090 #CJK UNIFIED IDEOGRAPH + {0xC846, 0x83F7}, //12091 #CJK UNIFIED IDEOGRAPH + {0xC847, 0x83FA}, //12092 #CJK UNIFIED IDEOGRAPH + {0xC848, 0x83FB}, //12093 #CJK UNIFIED IDEOGRAPH + {0xC849, 0x83FC}, //12094 #CJK UNIFIED IDEOGRAPH + {0xC84A, 0x83FE}, //12095 #CJK UNIFIED IDEOGRAPH + {0xC84B, 0x83FF}, //12096 #CJK UNIFIED IDEOGRAPH + {0xC84C, 0x8400}, //12097 #CJK UNIFIED IDEOGRAPH + {0xC84D, 0x8402}, //12098 #CJK UNIFIED IDEOGRAPH + {0xC84E, 0x8405}, //12099 #CJK UNIFIED IDEOGRAPH + {0xC84F, 0x8407}, //12100 #CJK UNIFIED IDEOGRAPH + {0xC850, 0x8408}, //12101 #CJK UNIFIED IDEOGRAPH + {0xC851, 0x8409}, //12102 #CJK UNIFIED IDEOGRAPH + {0xC852, 0x840A}, //12103 #CJK UNIFIED IDEOGRAPH + {0xC853, 0x8410}, //12104 #CJK UNIFIED IDEOGRAPH + {0xC854, 0x8412}, //12105 #CJK UNIFIED IDEOGRAPH + {0xC855, 0x8413}, //12106 #CJK UNIFIED IDEOGRAPH + {0xC856, 0x8414}, //12107 #CJK UNIFIED IDEOGRAPH + {0xC857, 0x8415}, //12108 #CJK UNIFIED IDEOGRAPH + {0xC858, 0x8416}, //12109 #CJK UNIFIED IDEOGRAPH + {0xC859, 0x8417}, //12110 #CJK UNIFIED IDEOGRAPH + {0xC85A, 0x8419}, //12111 #CJK UNIFIED IDEOGRAPH + {0xC85B, 0x841A}, //12112 #CJK UNIFIED IDEOGRAPH + {0xC85C, 0x841B}, //12113 #CJK UNIFIED IDEOGRAPH + {0xC85D, 0x841E}, //12114 #CJK UNIFIED IDEOGRAPH + {0xC85E, 0x841F}, //12115 #CJK UNIFIED IDEOGRAPH + {0xC85F, 0x8420}, //12116 #CJK UNIFIED IDEOGRAPH + {0xC860, 0x8421}, //12117 #CJK UNIFIED IDEOGRAPH + {0xC861, 0x8422}, //12118 #CJK UNIFIED IDEOGRAPH + {0xC862, 0x8423}, //12119 #CJK UNIFIED IDEOGRAPH + {0xC863, 0x8429}, //12120 #CJK UNIFIED IDEOGRAPH + {0xC864, 0x842A}, //12121 #CJK UNIFIED IDEOGRAPH + {0xC865, 0x842B}, //12122 #CJK UNIFIED IDEOGRAPH + {0xC866, 0x842C}, //12123 #CJK UNIFIED IDEOGRAPH + {0xC867, 0x842D}, //12124 #CJK UNIFIED IDEOGRAPH + {0xC868, 0x842E}, //12125 #CJK UNIFIED IDEOGRAPH + {0xC869, 0x842F}, //12126 #CJK UNIFIED IDEOGRAPH + {0xC86A, 0x8430}, //12127 #CJK UNIFIED IDEOGRAPH + {0xC86B, 0x8432}, //12128 #CJK UNIFIED IDEOGRAPH + {0xC86C, 0x8433}, //12129 #CJK UNIFIED IDEOGRAPH + {0xC86D, 0x8434}, //12130 #CJK UNIFIED IDEOGRAPH + {0xC86E, 0x8435}, //12131 #CJK UNIFIED IDEOGRAPH + {0xC86F, 0x8436}, //12132 #CJK UNIFIED IDEOGRAPH + {0xC870, 0x8437}, //12133 #CJK UNIFIED IDEOGRAPH + {0xC871, 0x8439}, //12134 #CJK UNIFIED IDEOGRAPH + {0xC872, 0x843A}, //12135 #CJK UNIFIED IDEOGRAPH + {0xC873, 0x843B}, //12136 #CJK UNIFIED IDEOGRAPH + {0xC874, 0x843E}, //12137 #CJK UNIFIED IDEOGRAPH + {0xC875, 0x843F}, //12138 #CJK UNIFIED IDEOGRAPH + {0xC876, 0x8440}, //12139 #CJK UNIFIED IDEOGRAPH + {0xC877, 0x8441}, //12140 #CJK UNIFIED IDEOGRAPH + {0xC878, 0x8442}, //12141 #CJK UNIFIED IDEOGRAPH + {0xC879, 0x8443}, //12142 #CJK UNIFIED IDEOGRAPH + {0xC87A, 0x8444}, //12143 #CJK UNIFIED IDEOGRAPH + {0xC87B, 0x8445}, //12144 #CJK UNIFIED IDEOGRAPH + {0xC87C, 0x8447}, //12145 #CJK UNIFIED IDEOGRAPH + {0xC87D, 0x8448}, //12146 #CJK UNIFIED IDEOGRAPH + {0xC87E, 0x8449}, //12147 #CJK UNIFIED IDEOGRAPH + {0xC880, 0x844A}, //12148 #CJK UNIFIED IDEOGRAPH + {0xC881, 0x844B}, //12149 #CJK UNIFIED IDEOGRAPH + {0xC882, 0x844C}, //12150 #CJK UNIFIED IDEOGRAPH + {0xC883, 0x844D}, //12151 #CJK UNIFIED IDEOGRAPH + {0xC884, 0x844E}, //12152 #CJK UNIFIED IDEOGRAPH + {0xC885, 0x844F}, //12153 #CJK UNIFIED IDEOGRAPH + {0xC886, 0x8450}, //12154 #CJK UNIFIED IDEOGRAPH + {0xC887, 0x8452}, //12155 #CJK UNIFIED IDEOGRAPH + {0xC888, 0x8453}, //12156 #CJK UNIFIED IDEOGRAPH + {0xC889, 0x8454}, //12157 #CJK UNIFIED IDEOGRAPH + {0xC88A, 0x8455}, //12158 #CJK UNIFIED IDEOGRAPH + {0xC88B, 0x8456}, //12159 #CJK UNIFIED IDEOGRAPH + {0xC88C, 0x8458}, //12160 #CJK UNIFIED IDEOGRAPH + {0xC88D, 0x845D}, //12161 #CJK UNIFIED IDEOGRAPH + {0xC88E, 0x845E}, //12162 #CJK UNIFIED IDEOGRAPH + {0xC88F, 0x845F}, //12163 #CJK UNIFIED IDEOGRAPH + {0xC890, 0x8460}, //12164 #CJK UNIFIED IDEOGRAPH + {0xC891, 0x8462}, //12165 #CJK UNIFIED IDEOGRAPH + {0xC892, 0x8464}, //12166 #CJK UNIFIED IDEOGRAPH + {0xC893, 0x8465}, //12167 #CJK UNIFIED IDEOGRAPH + {0xC894, 0x8466}, //12168 #CJK UNIFIED IDEOGRAPH + {0xC895, 0x8467}, //12169 #CJK UNIFIED IDEOGRAPH + {0xC896, 0x8468}, //12170 #CJK UNIFIED IDEOGRAPH + {0xC897, 0x846A}, //12171 #CJK UNIFIED IDEOGRAPH + {0xC898, 0x846E}, //12172 #CJK UNIFIED IDEOGRAPH + {0xC899, 0x846F}, //12173 #CJK UNIFIED IDEOGRAPH + {0xC89A, 0x8470}, //12174 #CJK UNIFIED IDEOGRAPH + {0xC89B, 0x8472}, //12175 #CJK UNIFIED IDEOGRAPH + {0xC89C, 0x8474}, //12176 #CJK UNIFIED IDEOGRAPH + {0xC89D, 0x8477}, //12177 #CJK UNIFIED IDEOGRAPH + {0xC89E, 0x8479}, //12178 #CJK UNIFIED IDEOGRAPH + {0xC89F, 0x847B}, //12179 #CJK UNIFIED IDEOGRAPH + {0xC8A0, 0x847C}, //12180 #CJK UNIFIED IDEOGRAPH + {0xC8A1, 0x53D6}, //12181 #CJK UNIFIED IDEOGRAPH + {0xC8A2, 0x5A36}, //12182 #CJK UNIFIED IDEOGRAPH + {0xC8A3, 0x9F8B}, //12183 #CJK UNIFIED IDEOGRAPH + {0xC8A4, 0x8DA3}, //12184 #CJK UNIFIED IDEOGRAPH + {0xC8A5, 0x53BB}, //12185 #CJK UNIFIED IDEOGRAPH + {0xC8A6, 0x5708}, //12186 #CJK UNIFIED IDEOGRAPH + {0xC8A7, 0x98A7}, //12187 #CJK UNIFIED IDEOGRAPH + {0xC8A8, 0x6743}, //12188 #CJK UNIFIED IDEOGRAPH + {0xC8A9, 0x919B}, //12189 #CJK UNIFIED IDEOGRAPH + {0xC8AA, 0x6CC9}, //12190 #CJK UNIFIED IDEOGRAPH + {0xC8AB, 0x5168}, //12191 #CJK UNIFIED IDEOGRAPH + {0xC8AC, 0x75CA}, //12192 #CJK UNIFIED IDEOGRAPH + {0xC8AD, 0x62F3}, //12193 #CJK UNIFIED IDEOGRAPH + {0xC8AE, 0x72AC}, //12194 #CJK UNIFIED IDEOGRAPH + {0xC8AF, 0x5238}, //12195 #CJK UNIFIED IDEOGRAPH + {0xC8B0, 0x529D}, //12196 #CJK UNIFIED IDEOGRAPH + {0xC8B1, 0x7F3A}, //12197 #CJK UNIFIED IDEOGRAPH + {0xC8B2, 0x7094}, //12198 #CJK UNIFIED IDEOGRAPH + {0xC8B3, 0x7638}, //12199 #CJK UNIFIED IDEOGRAPH + {0xC8B4, 0x5374}, //12200 #CJK UNIFIED IDEOGRAPH + {0xC8B5, 0x9E4A}, //12201 #CJK UNIFIED IDEOGRAPH + {0xC8B6, 0x69B7}, //12202 #CJK UNIFIED IDEOGRAPH + {0xC8B7, 0x786E}, //12203 #CJK UNIFIED IDEOGRAPH + {0xC8B8, 0x96C0}, //12204 #CJK UNIFIED IDEOGRAPH + {0xC8B9, 0x88D9}, //12205 #CJK UNIFIED IDEOGRAPH + {0xC8BA, 0x7FA4}, //12206 #CJK UNIFIED IDEOGRAPH + {0xC8BB, 0x7136}, //12207 #CJK UNIFIED IDEOGRAPH + {0xC8BC, 0x71C3}, //12208 #CJK UNIFIED IDEOGRAPH + {0xC8BD, 0x5189}, //12209 #CJK UNIFIED IDEOGRAPH + {0xC8BE, 0x67D3}, //12210 #CJK UNIFIED IDEOGRAPH + {0xC8BF, 0x74E4}, //12211 #CJK UNIFIED IDEOGRAPH + {0xC8C0, 0x58E4}, //12212 #CJK UNIFIED IDEOGRAPH + {0xC8C1, 0x6518}, //12213 #CJK UNIFIED IDEOGRAPH + {0xC8C2, 0x56B7}, //12214 #CJK UNIFIED IDEOGRAPH + {0xC8C3, 0x8BA9}, //12215 #CJK UNIFIED IDEOGRAPH + {0xC8C4, 0x9976}, //12216 #CJK UNIFIED IDEOGRAPH + {0xC8C5, 0x6270}, //12217 #CJK UNIFIED IDEOGRAPH + {0xC8C6, 0x7ED5}, //12218 #CJK UNIFIED IDEOGRAPH + {0xC8C7, 0x60F9}, //12219 #CJK UNIFIED IDEOGRAPH + {0xC8C8, 0x70ED}, //12220 #CJK UNIFIED IDEOGRAPH + {0xC8C9, 0x58EC}, //12221 #CJK UNIFIED IDEOGRAPH + {0xC8CA, 0x4EC1}, //12222 #CJK UNIFIED IDEOGRAPH + {0xC8CB, 0x4EBA}, //12223 #CJK UNIFIED IDEOGRAPH + {0xC8CC, 0x5FCD}, //12224 #CJK UNIFIED IDEOGRAPH + {0xC8CD, 0x97E7}, //12225 #CJK UNIFIED IDEOGRAPH + {0xC8CE, 0x4EFB}, //12226 #CJK UNIFIED IDEOGRAPH + {0xC8CF, 0x8BA4}, //12227 #CJK UNIFIED IDEOGRAPH + {0xC8D0, 0x5203}, //12228 #CJK UNIFIED IDEOGRAPH + {0xC8D1, 0x598A}, //12229 #CJK UNIFIED IDEOGRAPH + {0xC8D2, 0x7EAB}, //12230 #CJK UNIFIED IDEOGRAPH + {0xC8D3, 0x6254}, //12231 #CJK UNIFIED IDEOGRAPH + {0xC8D4, 0x4ECD}, //12232 #CJK UNIFIED IDEOGRAPH + {0xC8D5, 0x65E5}, //12233 #CJK UNIFIED IDEOGRAPH + {0xC8D6, 0x620E}, //12234 #CJK UNIFIED IDEOGRAPH + {0xC8D7, 0x8338}, //12235 #CJK UNIFIED IDEOGRAPH + {0xC8D8, 0x84C9}, //12236 #CJK UNIFIED IDEOGRAPH + {0xC8D9, 0x8363}, //12237 #CJK UNIFIED IDEOGRAPH + {0xC8DA, 0x878D}, //12238 #CJK UNIFIED IDEOGRAPH + {0xC8DB, 0x7194}, //12239 #CJK UNIFIED IDEOGRAPH + {0xC8DC, 0x6EB6}, //12240 #CJK UNIFIED IDEOGRAPH + {0xC8DD, 0x5BB9}, //12241 #CJK UNIFIED IDEOGRAPH + {0xC8DE, 0x7ED2}, //12242 #CJK UNIFIED IDEOGRAPH + {0xC8DF, 0x5197}, //12243 #CJK UNIFIED IDEOGRAPH + {0xC8E0, 0x63C9}, //12244 #CJK UNIFIED IDEOGRAPH + {0xC8E1, 0x67D4}, //12245 #CJK UNIFIED IDEOGRAPH + {0xC8E2, 0x8089}, //12246 #CJK UNIFIED IDEOGRAPH + {0xC8E3, 0x8339}, //12247 #CJK UNIFIED IDEOGRAPH + {0xC8E4, 0x8815}, //12248 #CJK UNIFIED IDEOGRAPH + {0xC8E5, 0x5112}, //12249 #CJK UNIFIED IDEOGRAPH + {0xC8E6, 0x5B7A}, //12250 #CJK UNIFIED IDEOGRAPH + {0xC8E7, 0x5982}, //12251 #CJK UNIFIED IDEOGRAPH + {0xC8E8, 0x8FB1}, //12252 #CJK UNIFIED IDEOGRAPH + {0xC8E9, 0x4E73}, //12253 #CJK UNIFIED IDEOGRAPH + {0xC8EA, 0x6C5D}, //12254 #CJK UNIFIED IDEOGRAPH + {0xC8EB, 0x5165}, //12255 #CJK UNIFIED IDEOGRAPH + {0xC8EC, 0x8925}, //12256 #CJK UNIFIED IDEOGRAPH + {0xC8ED, 0x8F6F}, //12257 #CJK UNIFIED IDEOGRAPH + {0xC8EE, 0x962E}, //12258 #CJK UNIFIED IDEOGRAPH + {0xC8EF, 0x854A}, //12259 #CJK UNIFIED IDEOGRAPH + {0xC8F0, 0x745E}, //12260 #CJK UNIFIED IDEOGRAPH + {0xC8F1, 0x9510}, //12261 #CJK UNIFIED IDEOGRAPH + {0xC8F2, 0x95F0}, //12262 #CJK UNIFIED IDEOGRAPH + {0xC8F3, 0x6DA6}, //12263 #CJK UNIFIED IDEOGRAPH + {0xC8F4, 0x82E5}, //12264 #CJK UNIFIED IDEOGRAPH + {0xC8F5, 0x5F31}, //12265 #CJK UNIFIED IDEOGRAPH + {0xC8F6, 0x6492}, //12266 #CJK UNIFIED IDEOGRAPH + {0xC8F7, 0x6D12}, //12267 #CJK UNIFIED IDEOGRAPH + {0xC8F8, 0x8428}, //12268 #CJK UNIFIED IDEOGRAPH + {0xC8F9, 0x816E}, //12269 #CJK UNIFIED IDEOGRAPH + {0xC8FA, 0x9CC3}, //12270 #CJK UNIFIED IDEOGRAPH + {0xC8FB, 0x585E}, //12271 #CJK UNIFIED IDEOGRAPH + {0xC8FC, 0x8D5B}, //12272 #CJK UNIFIED IDEOGRAPH + {0xC8FD, 0x4E09}, //12273 #CJK UNIFIED IDEOGRAPH + {0xC8FE, 0x53C1}, //12274 #CJK UNIFIED IDEOGRAPH + {0xC940, 0x847D}, //12275 #CJK UNIFIED IDEOGRAPH + {0xC941, 0x847E}, //12276 #CJK UNIFIED IDEOGRAPH + {0xC942, 0x847F}, //12277 #CJK UNIFIED IDEOGRAPH + {0xC943, 0x8480}, //12278 #CJK UNIFIED IDEOGRAPH + {0xC944, 0x8481}, //12279 #CJK UNIFIED IDEOGRAPH + {0xC945, 0x8483}, //12280 #CJK UNIFIED IDEOGRAPH + {0xC946, 0x8484}, //12281 #CJK UNIFIED IDEOGRAPH + {0xC947, 0x8485}, //12282 #CJK UNIFIED IDEOGRAPH + {0xC948, 0x8486}, //12283 #CJK UNIFIED IDEOGRAPH + {0xC949, 0x848A}, //12284 #CJK UNIFIED IDEOGRAPH + {0xC94A, 0x848D}, //12285 #CJK UNIFIED IDEOGRAPH + {0xC94B, 0x848F}, //12286 #CJK UNIFIED IDEOGRAPH + {0xC94C, 0x8490}, //12287 #CJK UNIFIED IDEOGRAPH + {0xC94D, 0x8491}, //12288 #CJK UNIFIED IDEOGRAPH + {0xC94E, 0x8492}, //12289 #CJK UNIFIED IDEOGRAPH + {0xC94F, 0x8493}, //12290 #CJK UNIFIED IDEOGRAPH + {0xC950, 0x8494}, //12291 #CJK UNIFIED IDEOGRAPH + {0xC951, 0x8495}, //12292 #CJK UNIFIED IDEOGRAPH + {0xC952, 0x8496}, //12293 #CJK UNIFIED IDEOGRAPH + {0xC953, 0x8498}, //12294 #CJK UNIFIED IDEOGRAPH + {0xC954, 0x849A}, //12295 #CJK UNIFIED IDEOGRAPH + {0xC955, 0x849B}, //12296 #CJK UNIFIED IDEOGRAPH + {0xC956, 0x849D}, //12297 #CJK UNIFIED IDEOGRAPH + {0xC957, 0x849E}, //12298 #CJK UNIFIED IDEOGRAPH + {0xC958, 0x849F}, //12299 #CJK UNIFIED IDEOGRAPH + {0xC959, 0x84A0}, //12300 #CJK UNIFIED IDEOGRAPH + {0xC95A, 0x84A2}, //12301 #CJK UNIFIED IDEOGRAPH + {0xC95B, 0x84A3}, //12302 #CJK UNIFIED IDEOGRAPH + {0xC95C, 0x84A4}, //12303 #CJK UNIFIED IDEOGRAPH + {0xC95D, 0x84A5}, //12304 #CJK UNIFIED IDEOGRAPH + {0xC95E, 0x84A6}, //12305 #CJK UNIFIED IDEOGRAPH + {0xC95F, 0x84A7}, //12306 #CJK UNIFIED IDEOGRAPH + {0xC960, 0x84A8}, //12307 #CJK UNIFIED IDEOGRAPH + {0xC961, 0x84A9}, //12308 #CJK UNIFIED IDEOGRAPH + {0xC962, 0x84AA}, //12309 #CJK UNIFIED IDEOGRAPH + {0xC963, 0x84AB}, //12310 #CJK UNIFIED IDEOGRAPH + {0xC964, 0x84AC}, //12311 #CJK UNIFIED IDEOGRAPH + {0xC965, 0x84AD}, //12312 #CJK UNIFIED IDEOGRAPH + {0xC966, 0x84AE}, //12313 #CJK UNIFIED IDEOGRAPH + {0xC967, 0x84B0}, //12314 #CJK UNIFIED IDEOGRAPH + {0xC968, 0x84B1}, //12315 #CJK UNIFIED IDEOGRAPH + {0xC969, 0x84B3}, //12316 #CJK UNIFIED IDEOGRAPH + {0xC96A, 0x84B5}, //12317 #CJK UNIFIED IDEOGRAPH + {0xC96B, 0x84B6}, //12318 #CJK UNIFIED IDEOGRAPH + {0xC96C, 0x84B7}, //12319 #CJK UNIFIED IDEOGRAPH + {0xC96D, 0x84BB}, //12320 #CJK UNIFIED IDEOGRAPH + {0xC96E, 0x84BC}, //12321 #CJK UNIFIED IDEOGRAPH + {0xC96F, 0x84BE}, //12322 #CJK UNIFIED IDEOGRAPH + {0xC970, 0x84C0}, //12323 #CJK UNIFIED IDEOGRAPH + {0xC971, 0x84C2}, //12324 #CJK UNIFIED IDEOGRAPH + {0xC972, 0x84C3}, //12325 #CJK UNIFIED IDEOGRAPH + {0xC973, 0x84C5}, //12326 #CJK UNIFIED IDEOGRAPH + {0xC974, 0x84C6}, //12327 #CJK UNIFIED IDEOGRAPH + {0xC975, 0x84C7}, //12328 #CJK UNIFIED IDEOGRAPH + {0xC976, 0x84C8}, //12329 #CJK UNIFIED IDEOGRAPH + {0xC977, 0x84CB}, //12330 #CJK UNIFIED IDEOGRAPH + {0xC978, 0x84CC}, //12331 #CJK UNIFIED IDEOGRAPH + {0xC979, 0x84CE}, //12332 #CJK UNIFIED IDEOGRAPH + {0xC97A, 0x84CF}, //12333 #CJK UNIFIED IDEOGRAPH + {0xC97B, 0x84D2}, //12334 #CJK UNIFIED IDEOGRAPH + {0xC97C, 0x84D4}, //12335 #CJK UNIFIED IDEOGRAPH + {0xC97D, 0x84D5}, //12336 #CJK UNIFIED IDEOGRAPH + {0xC97E, 0x84D7}, //12337 #CJK UNIFIED IDEOGRAPH + {0xC980, 0x84D8}, //12338 #CJK UNIFIED IDEOGRAPH + {0xC981, 0x84D9}, //12339 #CJK UNIFIED IDEOGRAPH + {0xC982, 0x84DA}, //12340 #CJK UNIFIED IDEOGRAPH + {0xC983, 0x84DB}, //12341 #CJK UNIFIED IDEOGRAPH + {0xC984, 0x84DC}, //12342 #CJK UNIFIED IDEOGRAPH + {0xC985, 0x84DE}, //12343 #CJK UNIFIED IDEOGRAPH + {0xC986, 0x84E1}, //12344 #CJK UNIFIED IDEOGRAPH + {0xC987, 0x84E2}, //12345 #CJK UNIFIED IDEOGRAPH + {0xC988, 0x84E4}, //12346 #CJK UNIFIED IDEOGRAPH + {0xC989, 0x84E7}, //12347 #CJK UNIFIED IDEOGRAPH + {0xC98A, 0x84E8}, //12348 #CJK UNIFIED IDEOGRAPH + {0xC98B, 0x84E9}, //12349 #CJK UNIFIED IDEOGRAPH + {0xC98C, 0x84EA}, //12350 #CJK UNIFIED IDEOGRAPH + {0xC98D, 0x84EB}, //12351 #CJK UNIFIED IDEOGRAPH + {0xC98E, 0x84ED}, //12352 #CJK UNIFIED IDEOGRAPH + {0xC98F, 0x84EE}, //12353 #CJK UNIFIED IDEOGRAPH + {0xC990, 0x84EF}, //12354 #CJK UNIFIED IDEOGRAPH + {0xC991, 0x84F1}, //12355 #CJK UNIFIED IDEOGRAPH + {0xC992, 0x84F2}, //12356 #CJK UNIFIED IDEOGRAPH + {0xC993, 0x84F3}, //12357 #CJK UNIFIED IDEOGRAPH + {0xC994, 0x84F4}, //12358 #CJK UNIFIED IDEOGRAPH + {0xC995, 0x84F5}, //12359 #CJK UNIFIED IDEOGRAPH + {0xC996, 0x84F6}, //12360 #CJK UNIFIED IDEOGRAPH + {0xC997, 0x84F7}, //12361 #CJK UNIFIED IDEOGRAPH + {0xC998, 0x84F8}, //12362 #CJK UNIFIED IDEOGRAPH + {0xC999, 0x84F9}, //12363 #CJK UNIFIED IDEOGRAPH + {0xC99A, 0x84FA}, //12364 #CJK UNIFIED IDEOGRAPH + {0xC99B, 0x84FB}, //12365 #CJK UNIFIED IDEOGRAPH + {0xC99C, 0x84FD}, //12366 #CJK UNIFIED IDEOGRAPH + {0xC99D, 0x84FE}, //12367 #CJK UNIFIED IDEOGRAPH + {0xC99E, 0x8500}, //12368 #CJK UNIFIED IDEOGRAPH + {0xC99F, 0x8501}, //12369 #CJK UNIFIED IDEOGRAPH + {0xC9A0, 0x8502}, //12370 #CJK UNIFIED IDEOGRAPH + {0xC9A1, 0x4F1E}, //12371 #CJK UNIFIED IDEOGRAPH + {0xC9A2, 0x6563}, //12372 #CJK UNIFIED IDEOGRAPH + {0xC9A3, 0x6851}, //12373 #CJK UNIFIED IDEOGRAPH + {0xC9A4, 0x55D3}, //12374 #CJK UNIFIED IDEOGRAPH + {0xC9A5, 0x4E27}, //12375 #CJK UNIFIED IDEOGRAPH + {0xC9A6, 0x6414}, //12376 #CJK UNIFIED IDEOGRAPH + {0xC9A7, 0x9A9A}, //12377 #CJK UNIFIED IDEOGRAPH + {0xC9A8, 0x626B}, //12378 #CJK UNIFIED IDEOGRAPH + {0xC9A9, 0x5AC2}, //12379 #CJK UNIFIED IDEOGRAPH + {0xC9AA, 0x745F}, //12380 #CJK UNIFIED IDEOGRAPH + {0xC9AB, 0x8272}, //12381 #CJK UNIFIED IDEOGRAPH + {0xC9AC, 0x6DA9}, //12382 #CJK UNIFIED IDEOGRAPH + {0xC9AD, 0x68EE}, //12383 #CJK UNIFIED IDEOGRAPH + {0xC9AE, 0x50E7}, //12384 #CJK UNIFIED IDEOGRAPH + {0xC9AF, 0x838E}, //12385 #CJK UNIFIED IDEOGRAPH + {0xC9B0, 0x7802}, //12386 #CJK UNIFIED IDEOGRAPH + {0xC9B1, 0x6740}, //12387 #CJK UNIFIED IDEOGRAPH + {0xC9B2, 0x5239}, //12388 #CJK UNIFIED IDEOGRAPH + {0xC9B3, 0x6C99}, //12389 #CJK UNIFIED IDEOGRAPH + {0xC9B4, 0x7EB1}, //12390 #CJK UNIFIED IDEOGRAPH + {0xC9B5, 0x50BB}, //12391 #CJK UNIFIED IDEOGRAPH + {0xC9B6, 0x5565}, //12392 #CJK UNIFIED IDEOGRAPH + {0xC9B7, 0x715E}, //12393 #CJK UNIFIED IDEOGRAPH + {0xC9B8, 0x7B5B}, //12394 #CJK UNIFIED IDEOGRAPH + {0xC9B9, 0x6652}, //12395 #CJK UNIFIED IDEOGRAPH + {0xC9BA, 0x73CA}, //12396 #CJK UNIFIED IDEOGRAPH + {0xC9BB, 0x82EB}, //12397 #CJK UNIFIED IDEOGRAPH + {0xC9BC, 0x6749}, //12398 #CJK UNIFIED IDEOGRAPH + {0xC9BD, 0x5C71}, //12399 #CJK UNIFIED IDEOGRAPH + {0xC9BE, 0x5220}, //12400 #CJK UNIFIED IDEOGRAPH + {0xC9BF, 0x717D}, //12401 #CJK UNIFIED IDEOGRAPH + {0xC9C0, 0x886B}, //12402 #CJK UNIFIED IDEOGRAPH + {0xC9C1, 0x95EA}, //12403 #CJK UNIFIED IDEOGRAPH + {0xC9C2, 0x9655}, //12404 #CJK UNIFIED IDEOGRAPH + {0xC9C3, 0x64C5}, //12405 #CJK UNIFIED IDEOGRAPH + {0xC9C4, 0x8D61}, //12406 #CJK UNIFIED IDEOGRAPH + {0xC9C5, 0x81B3}, //12407 #CJK UNIFIED IDEOGRAPH + {0xC9C6, 0x5584}, //12408 #CJK UNIFIED IDEOGRAPH + {0xC9C7, 0x6C55}, //12409 #CJK UNIFIED IDEOGRAPH + {0xC9C8, 0x6247}, //12410 #CJK UNIFIED IDEOGRAPH + {0xC9C9, 0x7F2E}, //12411 #CJK UNIFIED IDEOGRAPH + {0xC9CA, 0x5892}, //12412 #CJK UNIFIED IDEOGRAPH + {0xC9CB, 0x4F24}, //12413 #CJK UNIFIED IDEOGRAPH + {0xC9CC, 0x5546}, //12414 #CJK UNIFIED IDEOGRAPH + {0xC9CD, 0x8D4F}, //12415 #CJK UNIFIED IDEOGRAPH + {0xC9CE, 0x664C}, //12416 #CJK UNIFIED IDEOGRAPH + {0xC9CF, 0x4E0A}, //12417 #CJK UNIFIED IDEOGRAPH + {0xC9D0, 0x5C1A}, //12418 #CJK UNIFIED IDEOGRAPH + {0xC9D1, 0x88F3}, //12419 #CJK UNIFIED IDEOGRAPH + {0xC9D2, 0x68A2}, //12420 #CJK UNIFIED IDEOGRAPH + {0xC9D3, 0x634E}, //12421 #CJK UNIFIED IDEOGRAPH + {0xC9D4, 0x7A0D}, //12422 #CJK UNIFIED IDEOGRAPH + {0xC9D5, 0x70E7}, //12423 #CJK UNIFIED IDEOGRAPH + {0xC9D6, 0x828D}, //12424 #CJK UNIFIED IDEOGRAPH + {0xC9D7, 0x52FA}, //12425 #CJK UNIFIED IDEOGRAPH + {0xC9D8, 0x97F6}, //12426 #CJK UNIFIED IDEOGRAPH + {0xC9D9, 0x5C11}, //12427 #CJK UNIFIED IDEOGRAPH + {0xC9DA, 0x54E8}, //12428 #CJK UNIFIED IDEOGRAPH + {0xC9DB, 0x90B5}, //12429 #CJK UNIFIED IDEOGRAPH + {0xC9DC, 0x7ECD}, //12430 #CJK UNIFIED IDEOGRAPH + {0xC9DD, 0x5962}, //12431 #CJK UNIFIED IDEOGRAPH + {0xC9DE, 0x8D4A}, //12432 #CJK UNIFIED IDEOGRAPH + {0xC9DF, 0x86C7}, //12433 #CJK UNIFIED IDEOGRAPH + {0xC9E0, 0x820C}, //12434 #CJK UNIFIED IDEOGRAPH + {0xC9E1, 0x820D}, //12435 #CJK UNIFIED IDEOGRAPH + {0xC9E2, 0x8D66}, //12436 #CJK UNIFIED IDEOGRAPH + {0xC9E3, 0x6444}, //12437 #CJK UNIFIED IDEOGRAPH + {0xC9E4, 0x5C04}, //12438 #CJK UNIFIED IDEOGRAPH + {0xC9E5, 0x6151}, //12439 #CJK UNIFIED IDEOGRAPH + {0xC9E6, 0x6D89}, //12440 #CJK UNIFIED IDEOGRAPH + {0xC9E7, 0x793E}, //12441 #CJK UNIFIED IDEOGRAPH + {0xC9E8, 0x8BBE}, //12442 #CJK UNIFIED IDEOGRAPH + {0xC9E9, 0x7837}, //12443 #CJK UNIFIED IDEOGRAPH + {0xC9EA, 0x7533}, //12444 #CJK UNIFIED IDEOGRAPH + {0xC9EB, 0x547B}, //12445 #CJK UNIFIED IDEOGRAPH + {0xC9EC, 0x4F38}, //12446 #CJK UNIFIED IDEOGRAPH + {0xC9ED, 0x8EAB}, //12447 #CJK UNIFIED IDEOGRAPH + {0xC9EE, 0x6DF1}, //12448 #CJK UNIFIED IDEOGRAPH + {0xC9EF, 0x5A20}, //12449 #CJK UNIFIED IDEOGRAPH + {0xC9F0, 0x7EC5}, //12450 #CJK UNIFIED IDEOGRAPH + {0xC9F1, 0x795E}, //12451 #CJK UNIFIED IDEOGRAPH + {0xC9F2, 0x6C88}, //12452 #CJK UNIFIED IDEOGRAPH + {0xC9F3, 0x5BA1}, //12453 #CJK UNIFIED IDEOGRAPH + {0xC9F4, 0x5A76}, //12454 #CJK UNIFIED IDEOGRAPH + {0xC9F5, 0x751A}, //12455 #CJK UNIFIED IDEOGRAPH + {0xC9F6, 0x80BE}, //12456 #CJK UNIFIED IDEOGRAPH + {0xC9F7, 0x614E}, //12457 #CJK UNIFIED IDEOGRAPH + {0xC9F8, 0x6E17}, //12458 #CJK UNIFIED IDEOGRAPH + {0xC9F9, 0x58F0}, //12459 #CJK UNIFIED IDEOGRAPH + {0xC9FA, 0x751F}, //12460 #CJK UNIFIED IDEOGRAPH + {0xC9FB, 0x7525}, //12461 #CJK UNIFIED IDEOGRAPH + {0xC9FC, 0x7272}, //12462 #CJK UNIFIED IDEOGRAPH + {0xC9FD, 0x5347}, //12463 #CJK UNIFIED IDEOGRAPH + {0xC9FE, 0x7EF3}, //12464 #CJK UNIFIED IDEOGRAPH + {0xCA40, 0x8503}, //12465 #CJK UNIFIED IDEOGRAPH + {0xCA41, 0x8504}, //12466 #CJK UNIFIED IDEOGRAPH + {0xCA42, 0x8505}, //12467 #CJK UNIFIED IDEOGRAPH + {0xCA43, 0x8506}, //12468 #CJK UNIFIED IDEOGRAPH + {0xCA44, 0x8507}, //12469 #CJK UNIFIED IDEOGRAPH + {0xCA45, 0x8508}, //12470 #CJK UNIFIED IDEOGRAPH + {0xCA46, 0x8509}, //12471 #CJK UNIFIED IDEOGRAPH + {0xCA47, 0x850A}, //12472 #CJK UNIFIED IDEOGRAPH + {0xCA48, 0x850B}, //12473 #CJK UNIFIED IDEOGRAPH + {0xCA49, 0x850D}, //12474 #CJK UNIFIED IDEOGRAPH + {0xCA4A, 0x850E}, //12475 #CJK UNIFIED IDEOGRAPH + {0xCA4B, 0x850F}, //12476 #CJK UNIFIED IDEOGRAPH + {0xCA4C, 0x8510}, //12477 #CJK UNIFIED IDEOGRAPH + {0xCA4D, 0x8512}, //12478 #CJK UNIFIED IDEOGRAPH + {0xCA4E, 0x8514}, //12479 #CJK UNIFIED IDEOGRAPH + {0xCA4F, 0x8515}, //12480 #CJK UNIFIED IDEOGRAPH + {0xCA50, 0x8516}, //12481 #CJK UNIFIED IDEOGRAPH + {0xCA51, 0x8518}, //12482 #CJK UNIFIED IDEOGRAPH + {0xCA52, 0x8519}, //12483 #CJK UNIFIED IDEOGRAPH + {0xCA53, 0x851B}, //12484 #CJK UNIFIED IDEOGRAPH + {0xCA54, 0x851C}, //12485 #CJK UNIFIED IDEOGRAPH + {0xCA55, 0x851D}, //12486 #CJK UNIFIED IDEOGRAPH + {0xCA56, 0x851E}, //12487 #CJK UNIFIED IDEOGRAPH + {0xCA57, 0x8520}, //12488 #CJK UNIFIED IDEOGRAPH + {0xCA58, 0x8522}, //12489 #CJK UNIFIED IDEOGRAPH + {0xCA59, 0x8523}, //12490 #CJK UNIFIED IDEOGRAPH + {0xCA5A, 0x8524}, //12491 #CJK UNIFIED IDEOGRAPH + {0xCA5B, 0x8525}, //12492 #CJK UNIFIED IDEOGRAPH + {0xCA5C, 0x8526}, //12493 #CJK UNIFIED IDEOGRAPH + {0xCA5D, 0x8527}, //12494 #CJK UNIFIED IDEOGRAPH + {0xCA5E, 0x8528}, //12495 #CJK UNIFIED IDEOGRAPH + {0xCA5F, 0x8529}, //12496 #CJK UNIFIED IDEOGRAPH + {0xCA60, 0x852A}, //12497 #CJK UNIFIED IDEOGRAPH + {0xCA61, 0x852D}, //12498 #CJK UNIFIED IDEOGRAPH + {0xCA62, 0x852E}, //12499 #CJK UNIFIED IDEOGRAPH + {0xCA63, 0x852F}, //12500 #CJK UNIFIED IDEOGRAPH + {0xCA64, 0x8530}, //12501 #CJK UNIFIED IDEOGRAPH + {0xCA65, 0x8531}, //12502 #CJK UNIFIED IDEOGRAPH + {0xCA66, 0x8532}, //12503 #CJK UNIFIED IDEOGRAPH + {0xCA67, 0x8533}, //12504 #CJK UNIFIED IDEOGRAPH + {0xCA68, 0x8534}, //12505 #CJK UNIFIED IDEOGRAPH + {0xCA69, 0x8535}, //12506 #CJK UNIFIED IDEOGRAPH + {0xCA6A, 0x8536}, //12507 #CJK UNIFIED IDEOGRAPH + {0xCA6B, 0x853E}, //12508 #CJK UNIFIED IDEOGRAPH + {0xCA6C, 0x853F}, //12509 #CJK UNIFIED IDEOGRAPH + {0xCA6D, 0x8540}, //12510 #CJK UNIFIED IDEOGRAPH + {0xCA6E, 0x8541}, //12511 #CJK UNIFIED IDEOGRAPH + {0xCA6F, 0x8542}, //12512 #CJK UNIFIED IDEOGRAPH + {0xCA70, 0x8544}, //12513 #CJK UNIFIED IDEOGRAPH + {0xCA71, 0x8545}, //12514 #CJK UNIFIED IDEOGRAPH + {0xCA72, 0x8546}, //12515 #CJK UNIFIED IDEOGRAPH + {0xCA73, 0x8547}, //12516 #CJK UNIFIED IDEOGRAPH + {0xCA74, 0x854B}, //12517 #CJK UNIFIED IDEOGRAPH + {0xCA75, 0x854C}, //12518 #CJK UNIFIED IDEOGRAPH + {0xCA76, 0x854D}, //12519 #CJK UNIFIED IDEOGRAPH + {0xCA77, 0x854E}, //12520 #CJK UNIFIED IDEOGRAPH + {0xCA78, 0x854F}, //12521 #CJK UNIFIED IDEOGRAPH + {0xCA79, 0x8550}, //12522 #CJK UNIFIED IDEOGRAPH + {0xCA7A, 0x8551}, //12523 #CJK UNIFIED IDEOGRAPH + {0xCA7B, 0x8552}, //12524 #CJK UNIFIED IDEOGRAPH + {0xCA7C, 0x8553}, //12525 #CJK UNIFIED IDEOGRAPH + {0xCA7D, 0x8554}, //12526 #CJK UNIFIED IDEOGRAPH + {0xCA7E, 0x8555}, //12527 #CJK UNIFIED IDEOGRAPH + {0xCA80, 0x8557}, //12528 #CJK UNIFIED IDEOGRAPH + {0xCA81, 0x8558}, //12529 #CJK UNIFIED IDEOGRAPH + {0xCA82, 0x855A}, //12530 #CJK UNIFIED IDEOGRAPH + {0xCA83, 0x855B}, //12531 #CJK UNIFIED IDEOGRAPH + {0xCA84, 0x855C}, //12532 #CJK UNIFIED IDEOGRAPH + {0xCA85, 0x855D}, //12533 #CJK UNIFIED IDEOGRAPH + {0xCA86, 0x855F}, //12534 #CJK UNIFIED IDEOGRAPH + {0xCA87, 0x8560}, //12535 #CJK UNIFIED IDEOGRAPH + {0xCA88, 0x8561}, //12536 #CJK UNIFIED IDEOGRAPH + {0xCA89, 0x8562}, //12537 #CJK UNIFIED IDEOGRAPH + {0xCA8A, 0x8563}, //12538 #CJK UNIFIED IDEOGRAPH + {0xCA8B, 0x8565}, //12539 #CJK UNIFIED IDEOGRAPH + {0xCA8C, 0x8566}, //12540 #CJK UNIFIED IDEOGRAPH + {0xCA8D, 0x8567}, //12541 #CJK UNIFIED IDEOGRAPH + {0xCA8E, 0x8569}, //12542 #CJK UNIFIED IDEOGRAPH + {0xCA8F, 0x856A}, //12543 #CJK UNIFIED IDEOGRAPH + {0xCA90, 0x856B}, //12544 #CJK UNIFIED IDEOGRAPH + {0xCA91, 0x856C}, //12545 #CJK UNIFIED IDEOGRAPH + {0xCA92, 0x856D}, //12546 #CJK UNIFIED IDEOGRAPH + {0xCA93, 0x856E}, //12547 #CJK UNIFIED IDEOGRAPH + {0xCA94, 0x856F}, //12548 #CJK UNIFIED IDEOGRAPH + {0xCA95, 0x8570}, //12549 #CJK UNIFIED IDEOGRAPH + {0xCA96, 0x8571}, //12550 #CJK UNIFIED IDEOGRAPH + {0xCA97, 0x8573}, //12551 #CJK UNIFIED IDEOGRAPH + {0xCA98, 0x8575}, //12552 #CJK UNIFIED IDEOGRAPH + {0xCA99, 0x8576}, //12553 #CJK UNIFIED IDEOGRAPH + {0xCA9A, 0x8577}, //12554 #CJK UNIFIED IDEOGRAPH + {0xCA9B, 0x8578}, //12555 #CJK UNIFIED IDEOGRAPH + {0xCA9C, 0x857C}, //12556 #CJK UNIFIED IDEOGRAPH + {0xCA9D, 0x857D}, //12557 #CJK UNIFIED IDEOGRAPH + {0xCA9E, 0x857F}, //12558 #CJK UNIFIED IDEOGRAPH + {0xCA9F, 0x8580}, //12559 #CJK UNIFIED IDEOGRAPH + {0xCAA0, 0x8581}, //12560 #CJK UNIFIED IDEOGRAPH + {0xCAA1, 0x7701}, //12561 #CJK UNIFIED IDEOGRAPH + {0xCAA2, 0x76DB}, //12562 #CJK UNIFIED IDEOGRAPH + {0xCAA3, 0x5269}, //12563 #CJK UNIFIED IDEOGRAPH + {0xCAA4, 0x80DC}, //12564 #CJK UNIFIED IDEOGRAPH + {0xCAA5, 0x5723}, //12565 #CJK UNIFIED IDEOGRAPH + {0xCAA6, 0x5E08}, //12566 #CJK UNIFIED IDEOGRAPH + {0xCAA7, 0x5931}, //12567 #CJK UNIFIED IDEOGRAPH + {0xCAA8, 0x72EE}, //12568 #CJK UNIFIED IDEOGRAPH + {0xCAA9, 0x65BD}, //12569 #CJK UNIFIED IDEOGRAPH + {0xCAAA, 0x6E7F}, //12570 #CJK UNIFIED IDEOGRAPH + {0xCAAB, 0x8BD7}, //12571 #CJK UNIFIED IDEOGRAPH + {0xCAAC, 0x5C38}, //12572 #CJK UNIFIED IDEOGRAPH + {0xCAAD, 0x8671}, //12573 #CJK UNIFIED IDEOGRAPH + {0xCAAE, 0x5341}, //12574 #CJK UNIFIED IDEOGRAPH + {0xCAAF, 0x77F3}, //12575 #CJK UNIFIED IDEOGRAPH + {0xCAB0, 0x62FE}, //12576 #CJK UNIFIED IDEOGRAPH + {0xCAB1, 0x65F6}, //12577 #CJK UNIFIED IDEOGRAPH + {0xCAB2, 0x4EC0}, //12578 #CJK UNIFIED IDEOGRAPH + {0xCAB3, 0x98DF}, //12579 #CJK UNIFIED IDEOGRAPH + {0xCAB4, 0x8680}, //12580 #CJK UNIFIED IDEOGRAPH + {0xCAB5, 0x5B9E}, //12581 #CJK UNIFIED IDEOGRAPH + {0xCAB6, 0x8BC6}, //12582 #CJK UNIFIED IDEOGRAPH + {0xCAB7, 0x53F2}, //12583 #CJK UNIFIED IDEOGRAPH + {0xCAB8, 0x77E2}, //12584 #CJK UNIFIED IDEOGRAPH + {0xCAB9, 0x4F7F}, //12585 #CJK UNIFIED IDEOGRAPH + {0xCABA, 0x5C4E}, //12586 #CJK UNIFIED IDEOGRAPH + {0xCABB, 0x9A76}, //12587 #CJK UNIFIED IDEOGRAPH + {0xCABC, 0x59CB}, //12588 #CJK UNIFIED IDEOGRAPH + {0xCABD, 0x5F0F}, //12589 #CJK UNIFIED IDEOGRAPH + {0xCABE, 0x793A}, //12590 #CJK UNIFIED IDEOGRAPH + {0xCABF, 0x58EB}, //12591 #CJK UNIFIED IDEOGRAPH + {0xCAC0, 0x4E16}, //12592 #CJK UNIFIED IDEOGRAPH + {0xCAC1, 0x67FF}, //12593 #CJK UNIFIED IDEOGRAPH + {0xCAC2, 0x4E8B}, //12594 #CJK UNIFIED IDEOGRAPH + {0xCAC3, 0x62ED}, //12595 #CJK UNIFIED IDEOGRAPH + {0xCAC4, 0x8A93}, //12596 #CJK UNIFIED IDEOGRAPH + {0xCAC5, 0x901D}, //12597 #CJK UNIFIED IDEOGRAPH + {0xCAC6, 0x52BF}, //12598 #CJK UNIFIED IDEOGRAPH + {0xCAC7, 0x662F}, //12599 #CJK UNIFIED IDEOGRAPH + {0xCAC8, 0x55DC}, //12600 #CJK UNIFIED IDEOGRAPH + {0xCAC9, 0x566C}, //12601 #CJK UNIFIED IDEOGRAPH + {0xCACA, 0x9002}, //12602 #CJK UNIFIED IDEOGRAPH + {0xCACB, 0x4ED5}, //12603 #CJK UNIFIED IDEOGRAPH + {0xCACC, 0x4F8D}, //12604 #CJK UNIFIED IDEOGRAPH + {0xCACD, 0x91CA}, //12605 #CJK UNIFIED IDEOGRAPH + {0xCACE, 0x9970}, //12606 #CJK UNIFIED IDEOGRAPH + {0xCACF, 0x6C0F}, //12607 #CJK UNIFIED IDEOGRAPH + {0xCAD0, 0x5E02}, //12608 #CJK UNIFIED IDEOGRAPH + {0xCAD1, 0x6043}, //12609 #CJK UNIFIED IDEOGRAPH + {0xCAD2, 0x5BA4}, //12610 #CJK UNIFIED IDEOGRAPH + {0xCAD3, 0x89C6}, //12611 #CJK UNIFIED IDEOGRAPH + {0xCAD4, 0x8BD5}, //12612 #CJK UNIFIED IDEOGRAPH + {0xCAD5, 0x6536}, //12613 #CJK UNIFIED IDEOGRAPH + {0xCAD6, 0x624B}, //12614 #CJK UNIFIED IDEOGRAPH + {0xCAD7, 0x9996}, //12615 #CJK UNIFIED IDEOGRAPH + {0xCAD8, 0x5B88}, //12616 #CJK UNIFIED IDEOGRAPH + {0xCAD9, 0x5BFF}, //12617 #CJK UNIFIED IDEOGRAPH + {0xCADA, 0x6388}, //12618 #CJK UNIFIED IDEOGRAPH + {0xCADB, 0x552E}, //12619 #CJK UNIFIED IDEOGRAPH + {0xCADC, 0x53D7}, //12620 #CJK UNIFIED IDEOGRAPH + {0xCADD, 0x7626}, //12621 #CJK UNIFIED IDEOGRAPH + {0xCADE, 0x517D}, //12622 #CJK UNIFIED IDEOGRAPH + {0xCADF, 0x852C}, //12623 #CJK UNIFIED IDEOGRAPH + {0xCAE0, 0x67A2}, //12624 #CJK UNIFIED IDEOGRAPH + {0xCAE1, 0x68B3}, //12625 #CJK UNIFIED IDEOGRAPH + {0xCAE2, 0x6B8A}, //12626 #CJK UNIFIED IDEOGRAPH + {0xCAE3, 0x6292}, //12627 #CJK UNIFIED IDEOGRAPH + {0xCAE4, 0x8F93}, //12628 #CJK UNIFIED IDEOGRAPH + {0xCAE5, 0x53D4}, //12629 #CJK UNIFIED IDEOGRAPH + {0xCAE6, 0x8212}, //12630 #CJK UNIFIED IDEOGRAPH + {0xCAE7, 0x6DD1}, //12631 #CJK UNIFIED IDEOGRAPH + {0xCAE8, 0x758F}, //12632 #CJK UNIFIED IDEOGRAPH + {0xCAE9, 0x4E66}, //12633 #CJK UNIFIED IDEOGRAPH + {0xCAEA, 0x8D4E}, //12634 #CJK UNIFIED IDEOGRAPH + {0xCAEB, 0x5B70}, //12635 #CJK UNIFIED IDEOGRAPH + {0xCAEC, 0x719F}, //12636 #CJK UNIFIED IDEOGRAPH + {0xCAED, 0x85AF}, //12637 #CJK UNIFIED IDEOGRAPH + {0xCAEE, 0x6691}, //12638 #CJK UNIFIED IDEOGRAPH + {0xCAEF, 0x66D9}, //12639 #CJK UNIFIED IDEOGRAPH + {0xCAF0, 0x7F72}, //12640 #CJK UNIFIED IDEOGRAPH + {0xCAF1, 0x8700}, //12641 #CJK UNIFIED IDEOGRAPH + {0xCAF2, 0x9ECD}, //12642 #CJK UNIFIED IDEOGRAPH + {0xCAF3, 0x9F20}, //12643 #CJK UNIFIED IDEOGRAPH + {0xCAF4, 0x5C5E}, //12644 #CJK UNIFIED IDEOGRAPH + {0xCAF5, 0x672F}, //12645 #CJK UNIFIED IDEOGRAPH + {0xCAF6, 0x8FF0}, //12646 #CJK UNIFIED IDEOGRAPH + {0xCAF7, 0x6811}, //12647 #CJK UNIFIED IDEOGRAPH + {0xCAF8, 0x675F}, //12648 #CJK UNIFIED IDEOGRAPH + {0xCAF9, 0x620D}, //12649 #CJK UNIFIED IDEOGRAPH + {0xCAFA, 0x7AD6}, //12650 #CJK UNIFIED IDEOGRAPH + {0xCAFB, 0x5885}, //12651 #CJK UNIFIED IDEOGRAPH + {0xCAFC, 0x5EB6}, //12652 #CJK UNIFIED IDEOGRAPH + {0xCAFD, 0x6570}, //12653 #CJK UNIFIED IDEOGRAPH + {0xCAFE, 0x6F31}, //12654 #CJK UNIFIED IDEOGRAPH + {0xCB40, 0x8582}, //12655 #CJK UNIFIED IDEOGRAPH + {0xCB41, 0x8583}, //12656 #CJK UNIFIED IDEOGRAPH + {0xCB42, 0x8586}, //12657 #CJK UNIFIED IDEOGRAPH + {0xCB43, 0x8588}, //12658 #CJK UNIFIED IDEOGRAPH + {0xCB44, 0x8589}, //12659 #CJK UNIFIED IDEOGRAPH + {0xCB45, 0x858A}, //12660 #CJK UNIFIED IDEOGRAPH + {0xCB46, 0x858B}, //12661 #CJK UNIFIED IDEOGRAPH + {0xCB47, 0x858C}, //12662 #CJK UNIFIED IDEOGRAPH + {0xCB48, 0x858D}, //12663 #CJK UNIFIED IDEOGRAPH + {0xCB49, 0x858E}, //12664 #CJK UNIFIED IDEOGRAPH + {0xCB4A, 0x8590}, //12665 #CJK UNIFIED IDEOGRAPH + {0xCB4B, 0x8591}, //12666 #CJK UNIFIED IDEOGRAPH + {0xCB4C, 0x8592}, //12667 #CJK UNIFIED IDEOGRAPH + {0xCB4D, 0x8593}, //12668 #CJK UNIFIED IDEOGRAPH + {0xCB4E, 0x8594}, //12669 #CJK UNIFIED IDEOGRAPH + {0xCB4F, 0x8595}, //12670 #CJK UNIFIED IDEOGRAPH + {0xCB50, 0x8596}, //12671 #CJK UNIFIED IDEOGRAPH + {0xCB51, 0x8597}, //12672 #CJK UNIFIED IDEOGRAPH + {0xCB52, 0x8598}, //12673 #CJK UNIFIED IDEOGRAPH + {0xCB53, 0x8599}, //12674 #CJK UNIFIED IDEOGRAPH + {0xCB54, 0x859A}, //12675 #CJK UNIFIED IDEOGRAPH + {0xCB55, 0x859D}, //12676 #CJK UNIFIED IDEOGRAPH + {0xCB56, 0x859E}, //12677 #CJK UNIFIED IDEOGRAPH + {0xCB57, 0x859F}, //12678 #CJK UNIFIED IDEOGRAPH + {0xCB58, 0x85A0}, //12679 #CJK UNIFIED IDEOGRAPH + {0xCB59, 0x85A1}, //12680 #CJK UNIFIED IDEOGRAPH + {0xCB5A, 0x85A2}, //12681 #CJK UNIFIED IDEOGRAPH + {0xCB5B, 0x85A3}, //12682 #CJK UNIFIED IDEOGRAPH + {0xCB5C, 0x85A5}, //12683 #CJK UNIFIED IDEOGRAPH + {0xCB5D, 0x85A6}, //12684 #CJK UNIFIED IDEOGRAPH + {0xCB5E, 0x85A7}, //12685 #CJK UNIFIED IDEOGRAPH + {0xCB5F, 0x85A9}, //12686 #CJK UNIFIED IDEOGRAPH + {0xCB60, 0x85AB}, //12687 #CJK UNIFIED IDEOGRAPH + {0xCB61, 0x85AC}, //12688 #CJK UNIFIED IDEOGRAPH + {0xCB62, 0x85AD}, //12689 #CJK UNIFIED IDEOGRAPH + {0xCB63, 0x85B1}, //12690 #CJK UNIFIED IDEOGRAPH + {0xCB64, 0x85B2}, //12691 #CJK UNIFIED IDEOGRAPH + {0xCB65, 0x85B3}, //12692 #CJK UNIFIED IDEOGRAPH + {0xCB66, 0x85B4}, //12693 #CJK UNIFIED IDEOGRAPH + {0xCB67, 0x85B5}, //12694 #CJK UNIFIED IDEOGRAPH + {0xCB68, 0x85B6}, //12695 #CJK UNIFIED IDEOGRAPH + {0xCB69, 0x85B8}, //12696 #CJK UNIFIED IDEOGRAPH + {0xCB6A, 0x85BA}, //12697 #CJK UNIFIED IDEOGRAPH + {0xCB6B, 0x85BB}, //12698 #CJK UNIFIED IDEOGRAPH + {0xCB6C, 0x85BC}, //12699 #CJK UNIFIED IDEOGRAPH + {0xCB6D, 0x85BD}, //12700 #CJK UNIFIED IDEOGRAPH + {0xCB6E, 0x85BE}, //12701 #CJK UNIFIED IDEOGRAPH + {0xCB6F, 0x85BF}, //12702 #CJK UNIFIED IDEOGRAPH + {0xCB70, 0x85C0}, //12703 #CJK UNIFIED IDEOGRAPH + {0xCB71, 0x85C2}, //12704 #CJK UNIFIED IDEOGRAPH + {0xCB72, 0x85C3}, //12705 #CJK UNIFIED IDEOGRAPH + {0xCB73, 0x85C4}, //12706 #CJK UNIFIED IDEOGRAPH + {0xCB74, 0x85C5}, //12707 #CJK UNIFIED IDEOGRAPH + {0xCB75, 0x85C6}, //12708 #CJK UNIFIED IDEOGRAPH + {0xCB76, 0x85C7}, //12709 #CJK UNIFIED IDEOGRAPH + {0xCB77, 0x85C8}, //12710 #CJK UNIFIED IDEOGRAPH + {0xCB78, 0x85CA}, //12711 #CJK UNIFIED IDEOGRAPH + {0xCB79, 0x85CB}, //12712 #CJK UNIFIED IDEOGRAPH + {0xCB7A, 0x85CC}, //12713 #CJK UNIFIED IDEOGRAPH + {0xCB7B, 0x85CD}, //12714 #CJK UNIFIED IDEOGRAPH + {0xCB7C, 0x85CE}, //12715 #CJK UNIFIED IDEOGRAPH + {0xCB7D, 0x85D1}, //12716 #CJK UNIFIED IDEOGRAPH + {0xCB7E, 0x85D2}, //12717 #CJK UNIFIED IDEOGRAPH + {0xCB80, 0x85D4}, //12718 #CJK UNIFIED IDEOGRAPH + {0xCB81, 0x85D6}, //12719 #CJK UNIFIED IDEOGRAPH + {0xCB82, 0x85D7}, //12720 #CJK UNIFIED IDEOGRAPH + {0xCB83, 0x85D8}, //12721 #CJK UNIFIED IDEOGRAPH + {0xCB84, 0x85D9}, //12722 #CJK UNIFIED IDEOGRAPH + {0xCB85, 0x85DA}, //12723 #CJK UNIFIED IDEOGRAPH + {0xCB86, 0x85DB}, //12724 #CJK UNIFIED IDEOGRAPH + {0xCB87, 0x85DD}, //12725 #CJK UNIFIED IDEOGRAPH + {0xCB88, 0x85DE}, //12726 #CJK UNIFIED IDEOGRAPH + {0xCB89, 0x85DF}, //12727 #CJK UNIFIED IDEOGRAPH + {0xCB8A, 0x85E0}, //12728 #CJK UNIFIED IDEOGRAPH + {0xCB8B, 0x85E1}, //12729 #CJK UNIFIED IDEOGRAPH + {0xCB8C, 0x85E2}, //12730 #CJK UNIFIED IDEOGRAPH + {0xCB8D, 0x85E3}, //12731 #CJK UNIFIED IDEOGRAPH + {0xCB8E, 0x85E5}, //12732 #CJK UNIFIED IDEOGRAPH + {0xCB8F, 0x85E6}, //12733 #CJK UNIFIED IDEOGRAPH + {0xCB90, 0x85E7}, //12734 #CJK UNIFIED IDEOGRAPH + {0xCB91, 0x85E8}, //12735 #CJK UNIFIED IDEOGRAPH + {0xCB92, 0x85EA}, //12736 #CJK UNIFIED IDEOGRAPH + {0xCB93, 0x85EB}, //12737 #CJK UNIFIED IDEOGRAPH + {0xCB94, 0x85EC}, //12738 #CJK UNIFIED IDEOGRAPH + {0xCB95, 0x85ED}, //12739 #CJK UNIFIED IDEOGRAPH + {0xCB96, 0x85EE}, //12740 #CJK UNIFIED IDEOGRAPH + {0xCB97, 0x85EF}, //12741 #CJK UNIFIED IDEOGRAPH + {0xCB98, 0x85F0}, //12742 #CJK UNIFIED IDEOGRAPH + {0xCB99, 0x85F1}, //12743 #CJK UNIFIED IDEOGRAPH + {0xCB9A, 0x85F2}, //12744 #CJK UNIFIED IDEOGRAPH + {0xCB9B, 0x85F3}, //12745 #CJK UNIFIED IDEOGRAPH + {0xCB9C, 0x85F4}, //12746 #CJK UNIFIED IDEOGRAPH + {0xCB9D, 0x85F5}, //12747 #CJK UNIFIED IDEOGRAPH + {0xCB9E, 0x85F6}, //12748 #CJK UNIFIED IDEOGRAPH + {0xCB9F, 0x85F7}, //12749 #CJK UNIFIED IDEOGRAPH + {0xCBA0, 0x85F8}, //12750 #CJK UNIFIED IDEOGRAPH + {0xCBA1, 0x6055}, //12751 #CJK UNIFIED IDEOGRAPH + {0xCBA2, 0x5237}, //12752 #CJK UNIFIED IDEOGRAPH + {0xCBA3, 0x800D}, //12753 #CJK UNIFIED IDEOGRAPH + {0xCBA4, 0x6454}, //12754 #CJK UNIFIED IDEOGRAPH + {0xCBA5, 0x8870}, //12755 #CJK UNIFIED IDEOGRAPH + {0xCBA6, 0x7529}, //12756 #CJK UNIFIED IDEOGRAPH + {0xCBA7, 0x5E05}, //12757 #CJK UNIFIED IDEOGRAPH + {0xCBA8, 0x6813}, //12758 #CJK UNIFIED IDEOGRAPH + {0xCBA9, 0x62F4}, //12759 #CJK UNIFIED IDEOGRAPH + {0xCBAA, 0x971C}, //12760 #CJK UNIFIED IDEOGRAPH + {0xCBAB, 0x53CC}, //12761 #CJK UNIFIED IDEOGRAPH + {0xCBAC, 0x723D}, //12762 #CJK UNIFIED IDEOGRAPH + {0xCBAD, 0x8C01}, //12763 #CJK UNIFIED IDEOGRAPH + {0xCBAE, 0x6C34}, //12764 #CJK UNIFIED IDEOGRAPH + {0xCBAF, 0x7761}, //12765 #CJK UNIFIED IDEOGRAPH + {0xCBB0, 0x7A0E}, //12766 #CJK UNIFIED IDEOGRAPH + {0xCBB1, 0x542E}, //12767 #CJK UNIFIED IDEOGRAPH + {0xCBB2, 0x77AC}, //12768 #CJK UNIFIED IDEOGRAPH + {0xCBB3, 0x987A}, //12769 #CJK UNIFIED IDEOGRAPH + {0xCBB4, 0x821C}, //12770 #CJK UNIFIED IDEOGRAPH + {0xCBB5, 0x8BF4}, //12771 #CJK UNIFIED IDEOGRAPH + {0xCBB6, 0x7855}, //12772 #CJK UNIFIED IDEOGRAPH + {0xCBB7, 0x6714}, //12773 #CJK UNIFIED IDEOGRAPH + {0xCBB8, 0x70C1}, //12774 #CJK UNIFIED IDEOGRAPH + {0xCBB9, 0x65AF}, //12775 #CJK UNIFIED IDEOGRAPH + {0xCBBA, 0x6495}, //12776 #CJK UNIFIED IDEOGRAPH + {0xCBBB, 0x5636}, //12777 #CJK UNIFIED IDEOGRAPH + {0xCBBC, 0x601D}, //12778 #CJK UNIFIED IDEOGRAPH + {0xCBBD, 0x79C1}, //12779 #CJK UNIFIED IDEOGRAPH + {0xCBBE, 0x53F8}, //12780 #CJK UNIFIED IDEOGRAPH + {0xCBBF, 0x4E1D}, //12781 #CJK UNIFIED IDEOGRAPH + {0xCBC0, 0x6B7B}, //12782 #CJK UNIFIED IDEOGRAPH + {0xCBC1, 0x8086}, //12783 #CJK UNIFIED IDEOGRAPH + {0xCBC2, 0x5BFA}, //12784 #CJK UNIFIED IDEOGRAPH + {0xCBC3, 0x55E3}, //12785 #CJK UNIFIED IDEOGRAPH + {0xCBC4, 0x56DB}, //12786 #CJK UNIFIED IDEOGRAPH + {0xCBC5, 0x4F3A}, //12787 #CJK UNIFIED IDEOGRAPH + {0xCBC6, 0x4F3C}, //12788 #CJK UNIFIED IDEOGRAPH + {0xCBC7, 0x9972}, //12789 #CJK UNIFIED IDEOGRAPH + {0xCBC8, 0x5DF3}, //12790 #CJK UNIFIED IDEOGRAPH + {0xCBC9, 0x677E}, //12791 #CJK UNIFIED IDEOGRAPH + {0xCBCA, 0x8038}, //12792 #CJK UNIFIED IDEOGRAPH + {0xCBCB, 0x6002}, //12793 #CJK UNIFIED IDEOGRAPH + {0xCBCC, 0x9882}, //12794 #CJK UNIFIED IDEOGRAPH + {0xCBCD, 0x9001}, //12795 #CJK UNIFIED IDEOGRAPH + {0xCBCE, 0x5B8B}, //12796 #CJK UNIFIED IDEOGRAPH + {0xCBCF, 0x8BBC}, //12797 #CJK UNIFIED IDEOGRAPH + {0xCBD0, 0x8BF5}, //12798 #CJK UNIFIED IDEOGRAPH + {0xCBD1, 0x641C}, //12799 #CJK UNIFIED IDEOGRAPH + {0xCBD2, 0x8258}, //12800 #CJK UNIFIED IDEOGRAPH + {0xCBD3, 0x64DE}, //12801 #CJK UNIFIED IDEOGRAPH + {0xCBD4, 0x55FD}, //12802 #CJK UNIFIED IDEOGRAPH + {0xCBD5, 0x82CF}, //12803 #CJK UNIFIED IDEOGRAPH + {0xCBD6, 0x9165}, //12804 #CJK UNIFIED IDEOGRAPH + {0xCBD7, 0x4FD7}, //12805 #CJK UNIFIED IDEOGRAPH + {0xCBD8, 0x7D20}, //12806 #CJK UNIFIED IDEOGRAPH + {0xCBD9, 0x901F}, //12807 #CJK UNIFIED IDEOGRAPH + {0xCBDA, 0x7C9F}, //12808 #CJK UNIFIED IDEOGRAPH + {0xCBDB, 0x50F3}, //12809 #CJK UNIFIED IDEOGRAPH + {0xCBDC, 0x5851}, //12810 #CJK UNIFIED IDEOGRAPH + {0xCBDD, 0x6EAF}, //12811 #CJK UNIFIED IDEOGRAPH + {0xCBDE, 0x5BBF}, //12812 #CJK UNIFIED IDEOGRAPH + {0xCBDF, 0x8BC9}, //12813 #CJK UNIFIED IDEOGRAPH + {0xCBE0, 0x8083}, //12814 #CJK UNIFIED IDEOGRAPH + {0xCBE1, 0x9178}, //12815 #CJK UNIFIED IDEOGRAPH + {0xCBE2, 0x849C}, //12816 #CJK UNIFIED IDEOGRAPH + {0xCBE3, 0x7B97}, //12817 #CJK UNIFIED IDEOGRAPH + {0xCBE4, 0x867D}, //12818 #CJK UNIFIED IDEOGRAPH + {0xCBE5, 0x968B}, //12819 #CJK UNIFIED IDEOGRAPH + {0xCBE6, 0x968F}, //12820 #CJK UNIFIED IDEOGRAPH + {0xCBE7, 0x7EE5}, //12821 #CJK UNIFIED IDEOGRAPH + {0xCBE8, 0x9AD3}, //12822 #CJK UNIFIED IDEOGRAPH + {0xCBE9, 0x788E}, //12823 #CJK UNIFIED IDEOGRAPH + {0xCBEA, 0x5C81}, //12824 #CJK UNIFIED IDEOGRAPH + {0xCBEB, 0x7A57}, //12825 #CJK UNIFIED IDEOGRAPH + {0xCBEC, 0x9042}, //12826 #CJK UNIFIED IDEOGRAPH + {0xCBED, 0x96A7}, //12827 #CJK UNIFIED IDEOGRAPH + {0xCBEE, 0x795F}, //12828 #CJK UNIFIED IDEOGRAPH + {0xCBEF, 0x5B59}, //12829 #CJK UNIFIED IDEOGRAPH + {0xCBF0, 0x635F}, //12830 #CJK UNIFIED IDEOGRAPH + {0xCBF1, 0x7B0B}, //12831 #CJK UNIFIED IDEOGRAPH + {0xCBF2, 0x84D1}, //12832 #CJK UNIFIED IDEOGRAPH + {0xCBF3, 0x68AD}, //12833 #CJK UNIFIED IDEOGRAPH + {0xCBF4, 0x5506}, //12834 #CJK UNIFIED IDEOGRAPH + {0xCBF5, 0x7F29}, //12835 #CJK UNIFIED IDEOGRAPH + {0xCBF6, 0x7410}, //12836 #CJK UNIFIED IDEOGRAPH + {0xCBF7, 0x7D22}, //12837 #CJK UNIFIED IDEOGRAPH + {0xCBF8, 0x9501}, //12838 #CJK UNIFIED IDEOGRAPH + {0xCBF9, 0x6240}, //12839 #CJK UNIFIED IDEOGRAPH + {0xCBFA, 0x584C}, //12840 #CJK UNIFIED IDEOGRAPH + {0xCBFB, 0x4ED6}, //12841 #CJK UNIFIED IDEOGRAPH + {0xCBFC, 0x5B83}, //12842 #CJK UNIFIED IDEOGRAPH + {0xCBFD, 0x5979}, //12843 #CJK UNIFIED IDEOGRAPH + {0xCBFE, 0x5854}, //12844 #CJK UNIFIED IDEOGRAPH + {0xCC40, 0x85F9}, //12845 #CJK UNIFIED IDEOGRAPH + {0xCC41, 0x85FA}, //12846 #CJK UNIFIED IDEOGRAPH + {0xCC42, 0x85FC}, //12847 #CJK UNIFIED IDEOGRAPH + {0xCC43, 0x85FD}, //12848 #CJK UNIFIED IDEOGRAPH + {0xCC44, 0x85FE}, //12849 #CJK UNIFIED IDEOGRAPH + {0xCC45, 0x8600}, //12850 #CJK UNIFIED IDEOGRAPH + {0xCC46, 0x8601}, //12851 #CJK UNIFIED IDEOGRAPH + {0xCC47, 0x8602}, //12852 #CJK UNIFIED IDEOGRAPH + {0xCC48, 0x8603}, //12853 #CJK UNIFIED IDEOGRAPH + {0xCC49, 0x8604}, //12854 #CJK UNIFIED IDEOGRAPH + {0xCC4A, 0x8606}, //12855 #CJK UNIFIED IDEOGRAPH + {0xCC4B, 0x8607}, //12856 #CJK UNIFIED IDEOGRAPH + {0xCC4C, 0x8608}, //12857 #CJK UNIFIED IDEOGRAPH + {0xCC4D, 0x8609}, //12858 #CJK UNIFIED IDEOGRAPH + {0xCC4E, 0x860A}, //12859 #CJK UNIFIED IDEOGRAPH + {0xCC4F, 0x860B}, //12860 #CJK UNIFIED IDEOGRAPH + {0xCC50, 0x860C}, //12861 #CJK UNIFIED IDEOGRAPH + {0xCC51, 0x860D}, //12862 #CJK UNIFIED IDEOGRAPH + {0xCC52, 0x860E}, //12863 #CJK UNIFIED IDEOGRAPH + {0xCC53, 0x860F}, //12864 #CJK UNIFIED IDEOGRAPH + {0xCC54, 0x8610}, //12865 #CJK UNIFIED IDEOGRAPH + {0xCC55, 0x8612}, //12866 #CJK UNIFIED IDEOGRAPH + {0xCC56, 0x8613}, //12867 #CJK UNIFIED IDEOGRAPH + {0xCC57, 0x8614}, //12868 #CJK UNIFIED IDEOGRAPH + {0xCC58, 0x8615}, //12869 #CJK UNIFIED IDEOGRAPH + {0xCC59, 0x8617}, //12870 #CJK UNIFIED IDEOGRAPH + {0xCC5A, 0x8618}, //12871 #CJK UNIFIED IDEOGRAPH + {0xCC5B, 0x8619}, //12872 #CJK UNIFIED IDEOGRAPH + {0xCC5C, 0x861A}, //12873 #CJK UNIFIED IDEOGRAPH + {0xCC5D, 0x861B}, //12874 #CJK UNIFIED IDEOGRAPH + {0xCC5E, 0x861C}, //12875 #CJK UNIFIED IDEOGRAPH + {0xCC5F, 0x861D}, //12876 #CJK UNIFIED IDEOGRAPH + {0xCC60, 0x861E}, //12877 #CJK UNIFIED IDEOGRAPH + {0xCC61, 0x861F}, //12878 #CJK UNIFIED IDEOGRAPH + {0xCC62, 0x8620}, //12879 #CJK UNIFIED IDEOGRAPH + {0xCC63, 0x8621}, //12880 #CJK UNIFIED IDEOGRAPH + {0xCC64, 0x8622}, //12881 #CJK UNIFIED IDEOGRAPH + {0xCC65, 0x8623}, //12882 #CJK UNIFIED IDEOGRAPH + {0xCC66, 0x8624}, //12883 #CJK UNIFIED IDEOGRAPH + {0xCC67, 0x8625}, //12884 #CJK UNIFIED IDEOGRAPH + {0xCC68, 0x8626}, //12885 #CJK UNIFIED IDEOGRAPH + {0xCC69, 0x8628}, //12886 #CJK UNIFIED IDEOGRAPH + {0xCC6A, 0x862A}, //12887 #CJK UNIFIED IDEOGRAPH + {0xCC6B, 0x862B}, //12888 #CJK UNIFIED IDEOGRAPH + {0xCC6C, 0x862C}, //12889 #CJK UNIFIED IDEOGRAPH + {0xCC6D, 0x862D}, //12890 #CJK UNIFIED IDEOGRAPH + {0xCC6E, 0x862E}, //12891 #CJK UNIFIED IDEOGRAPH + {0xCC6F, 0x862F}, //12892 #CJK UNIFIED IDEOGRAPH + {0xCC70, 0x8630}, //12893 #CJK UNIFIED IDEOGRAPH + {0xCC71, 0x8631}, //12894 #CJK UNIFIED IDEOGRAPH + {0xCC72, 0x8632}, //12895 #CJK UNIFIED IDEOGRAPH + {0xCC73, 0x8633}, //12896 #CJK UNIFIED IDEOGRAPH + {0xCC74, 0x8634}, //12897 #CJK UNIFIED IDEOGRAPH + {0xCC75, 0x8635}, //12898 #CJK UNIFIED IDEOGRAPH + {0xCC76, 0x8636}, //12899 #CJK UNIFIED IDEOGRAPH + {0xCC77, 0x8637}, //12900 #CJK UNIFIED IDEOGRAPH + {0xCC78, 0x8639}, //12901 #CJK UNIFIED IDEOGRAPH + {0xCC79, 0x863A}, //12902 #CJK UNIFIED IDEOGRAPH + {0xCC7A, 0x863B}, //12903 #CJK UNIFIED IDEOGRAPH + {0xCC7B, 0x863D}, //12904 #CJK UNIFIED IDEOGRAPH + {0xCC7C, 0x863E}, //12905 #CJK UNIFIED IDEOGRAPH + {0xCC7D, 0x863F}, //12906 #CJK UNIFIED IDEOGRAPH + {0xCC7E, 0x8640}, //12907 #CJK UNIFIED IDEOGRAPH + {0xCC80, 0x8641}, //12908 #CJK UNIFIED IDEOGRAPH + {0xCC81, 0x8642}, //12909 #CJK UNIFIED IDEOGRAPH + {0xCC82, 0x8643}, //12910 #CJK UNIFIED IDEOGRAPH + {0xCC83, 0x8644}, //12911 #CJK UNIFIED IDEOGRAPH + {0xCC84, 0x8645}, //12912 #CJK UNIFIED IDEOGRAPH + {0xCC85, 0x8646}, //12913 #CJK UNIFIED IDEOGRAPH + {0xCC86, 0x8647}, //12914 #CJK UNIFIED IDEOGRAPH + {0xCC87, 0x8648}, //12915 #CJK UNIFIED IDEOGRAPH + {0xCC88, 0x8649}, //12916 #CJK UNIFIED IDEOGRAPH + {0xCC89, 0x864A}, //12917 #CJK UNIFIED IDEOGRAPH + {0xCC8A, 0x864B}, //12918 #CJK UNIFIED IDEOGRAPH + {0xCC8B, 0x864C}, //12919 #CJK UNIFIED IDEOGRAPH + {0xCC8C, 0x8652}, //12920 #CJK UNIFIED IDEOGRAPH + {0xCC8D, 0x8653}, //12921 #CJK UNIFIED IDEOGRAPH + {0xCC8E, 0x8655}, //12922 #CJK UNIFIED IDEOGRAPH + {0xCC8F, 0x8656}, //12923 #CJK UNIFIED IDEOGRAPH + {0xCC90, 0x8657}, //12924 #CJK UNIFIED IDEOGRAPH + {0xCC91, 0x8658}, //12925 #CJK UNIFIED IDEOGRAPH + {0xCC92, 0x8659}, //12926 #CJK UNIFIED IDEOGRAPH + {0xCC93, 0x865B}, //12927 #CJK UNIFIED IDEOGRAPH + {0xCC94, 0x865C}, //12928 #CJK UNIFIED IDEOGRAPH + {0xCC95, 0x865D}, //12929 #CJK UNIFIED IDEOGRAPH + {0xCC96, 0x865F}, //12930 #CJK UNIFIED IDEOGRAPH + {0xCC97, 0x8660}, //12931 #CJK UNIFIED IDEOGRAPH + {0xCC98, 0x8661}, //12932 #CJK UNIFIED IDEOGRAPH + {0xCC99, 0x8663}, //12933 #CJK UNIFIED IDEOGRAPH + {0xCC9A, 0x8664}, //12934 #CJK UNIFIED IDEOGRAPH + {0xCC9B, 0x8665}, //12935 #CJK UNIFIED IDEOGRAPH + {0xCC9C, 0x8666}, //12936 #CJK UNIFIED IDEOGRAPH + {0xCC9D, 0x8667}, //12937 #CJK UNIFIED IDEOGRAPH + {0xCC9E, 0x8668}, //12938 #CJK UNIFIED IDEOGRAPH + {0xCC9F, 0x8669}, //12939 #CJK UNIFIED IDEOGRAPH + {0xCCA0, 0x866A}, //12940 #CJK UNIFIED IDEOGRAPH + {0xCCA1, 0x736D}, //12941 #CJK UNIFIED IDEOGRAPH + {0xCCA2, 0x631E}, //12942 #CJK UNIFIED IDEOGRAPH + {0xCCA3, 0x8E4B}, //12943 #CJK UNIFIED IDEOGRAPH + {0xCCA4, 0x8E0F}, //12944 #CJK UNIFIED IDEOGRAPH + {0xCCA5, 0x80CE}, //12945 #CJK UNIFIED IDEOGRAPH + {0xCCA6, 0x82D4}, //12946 #CJK UNIFIED IDEOGRAPH + {0xCCA7, 0x62AC}, //12947 #CJK UNIFIED IDEOGRAPH + {0xCCA8, 0x53F0}, //12948 #CJK UNIFIED IDEOGRAPH + {0xCCA9, 0x6CF0}, //12949 #CJK UNIFIED IDEOGRAPH + {0xCCAA, 0x915E}, //12950 #CJK UNIFIED IDEOGRAPH + {0xCCAB, 0x592A}, //12951 #CJK UNIFIED IDEOGRAPH + {0xCCAC, 0x6001}, //12952 #CJK UNIFIED IDEOGRAPH + {0xCCAD, 0x6C70}, //12953 #CJK UNIFIED IDEOGRAPH + {0xCCAE, 0x574D}, //12954 #CJK UNIFIED IDEOGRAPH + {0xCCAF, 0x644A}, //12955 #CJK UNIFIED IDEOGRAPH + {0xCCB0, 0x8D2A}, //12956 #CJK UNIFIED IDEOGRAPH + {0xCCB1, 0x762B}, //12957 #CJK UNIFIED IDEOGRAPH + {0xCCB2, 0x6EE9}, //12958 #CJK UNIFIED IDEOGRAPH + {0xCCB3, 0x575B}, //12959 #CJK UNIFIED IDEOGRAPH + {0xCCB4, 0x6A80}, //12960 #CJK UNIFIED IDEOGRAPH + {0xCCB5, 0x75F0}, //12961 #CJK UNIFIED IDEOGRAPH + {0xCCB6, 0x6F6D}, //12962 #CJK UNIFIED IDEOGRAPH + {0xCCB7, 0x8C2D}, //12963 #CJK UNIFIED IDEOGRAPH + {0xCCB8, 0x8C08}, //12964 #CJK UNIFIED IDEOGRAPH + {0xCCB9, 0x5766}, //12965 #CJK UNIFIED IDEOGRAPH + {0xCCBA, 0x6BEF}, //12966 #CJK UNIFIED IDEOGRAPH + {0xCCBB, 0x8892}, //12967 #CJK UNIFIED IDEOGRAPH + {0xCCBC, 0x78B3}, //12968 #CJK UNIFIED IDEOGRAPH + {0xCCBD, 0x63A2}, //12969 #CJK UNIFIED IDEOGRAPH + {0xCCBE, 0x53F9}, //12970 #CJK UNIFIED IDEOGRAPH + {0xCCBF, 0x70AD}, //12971 #CJK UNIFIED IDEOGRAPH + {0xCCC0, 0x6C64}, //12972 #CJK UNIFIED IDEOGRAPH + {0xCCC1, 0x5858}, //12973 #CJK UNIFIED IDEOGRAPH + {0xCCC2, 0x642A}, //12974 #CJK UNIFIED IDEOGRAPH + {0xCCC3, 0x5802}, //12975 #CJK UNIFIED IDEOGRAPH + {0xCCC4, 0x68E0}, //12976 #CJK UNIFIED IDEOGRAPH + {0xCCC5, 0x819B}, //12977 #CJK UNIFIED IDEOGRAPH + {0xCCC6, 0x5510}, //12978 #CJK UNIFIED IDEOGRAPH + {0xCCC7, 0x7CD6}, //12979 #CJK UNIFIED IDEOGRAPH + {0xCCC8, 0x5018}, //12980 #CJK UNIFIED IDEOGRAPH + {0xCCC9, 0x8EBA}, //12981 #CJK UNIFIED IDEOGRAPH + {0xCCCA, 0x6DCC}, //12982 #CJK UNIFIED IDEOGRAPH + {0xCCCB, 0x8D9F}, //12983 #CJK UNIFIED IDEOGRAPH + {0xCCCC, 0x70EB}, //12984 #CJK UNIFIED IDEOGRAPH + {0xCCCD, 0x638F}, //12985 #CJK UNIFIED IDEOGRAPH + {0xCCCE, 0x6D9B}, //12986 #CJK UNIFIED IDEOGRAPH + {0xCCCF, 0x6ED4}, //12987 #CJK UNIFIED IDEOGRAPH + {0xCCD0, 0x7EE6}, //12988 #CJK UNIFIED IDEOGRAPH + {0xCCD1, 0x8404}, //12989 #CJK UNIFIED IDEOGRAPH + {0xCCD2, 0x6843}, //12990 #CJK UNIFIED IDEOGRAPH + {0xCCD3, 0x9003}, //12991 #CJK UNIFIED IDEOGRAPH + {0xCCD4, 0x6DD8}, //12992 #CJK UNIFIED IDEOGRAPH + {0xCCD5, 0x9676}, //12993 #CJK UNIFIED IDEOGRAPH + {0xCCD6, 0x8BA8}, //12994 #CJK UNIFIED IDEOGRAPH + {0xCCD7, 0x5957}, //12995 #CJK UNIFIED IDEOGRAPH + {0xCCD8, 0x7279}, //12996 #CJK UNIFIED IDEOGRAPH + {0xCCD9, 0x85E4}, //12997 #CJK UNIFIED IDEOGRAPH + {0xCCDA, 0x817E}, //12998 #CJK UNIFIED IDEOGRAPH + {0xCCDB, 0x75BC}, //12999 #CJK UNIFIED IDEOGRAPH + {0xCCDC, 0x8A8A}, //13000 #CJK UNIFIED IDEOGRAPH + {0xCCDD, 0x68AF}, //13001 #CJK UNIFIED IDEOGRAPH + {0xCCDE, 0x5254}, //13002 #CJK UNIFIED IDEOGRAPH + {0xCCDF, 0x8E22}, //13003 #CJK UNIFIED IDEOGRAPH + {0xCCE0, 0x9511}, //13004 #CJK UNIFIED IDEOGRAPH + {0xCCE1, 0x63D0}, //13005 #CJK UNIFIED IDEOGRAPH + {0xCCE2, 0x9898}, //13006 #CJK UNIFIED IDEOGRAPH + {0xCCE3, 0x8E44}, //13007 #CJK UNIFIED IDEOGRAPH + {0xCCE4, 0x557C}, //13008 #CJK UNIFIED IDEOGRAPH + {0xCCE5, 0x4F53}, //13009 #CJK UNIFIED IDEOGRAPH + {0xCCE6, 0x66FF}, //13010 #CJK UNIFIED IDEOGRAPH + {0xCCE7, 0x568F}, //13011 #CJK UNIFIED IDEOGRAPH + {0xCCE8, 0x60D5}, //13012 #CJK UNIFIED IDEOGRAPH + {0xCCE9, 0x6D95}, //13013 #CJK UNIFIED IDEOGRAPH + {0xCCEA, 0x5243}, //13014 #CJK UNIFIED IDEOGRAPH + {0xCCEB, 0x5C49}, //13015 #CJK UNIFIED IDEOGRAPH + {0xCCEC, 0x5929}, //13016 #CJK UNIFIED IDEOGRAPH + {0xCCED, 0x6DFB}, //13017 #CJK UNIFIED IDEOGRAPH + {0xCCEE, 0x586B}, //13018 #CJK UNIFIED IDEOGRAPH + {0xCCEF, 0x7530}, //13019 #CJK UNIFIED IDEOGRAPH + {0xCCF0, 0x751C}, //13020 #CJK UNIFIED IDEOGRAPH + {0xCCF1, 0x606C}, //13021 #CJK UNIFIED IDEOGRAPH + {0xCCF2, 0x8214}, //13022 #CJK UNIFIED IDEOGRAPH + {0xCCF3, 0x8146}, //13023 #CJK UNIFIED IDEOGRAPH + {0xCCF4, 0x6311}, //13024 #CJK UNIFIED IDEOGRAPH + {0xCCF5, 0x6761}, //13025 #CJK UNIFIED IDEOGRAPH + {0xCCF6, 0x8FE2}, //13026 #CJK UNIFIED IDEOGRAPH + {0xCCF7, 0x773A}, //13027 #CJK UNIFIED IDEOGRAPH + {0xCCF8, 0x8DF3}, //13028 #CJK UNIFIED IDEOGRAPH + {0xCCF9, 0x8D34}, //13029 #CJK UNIFIED IDEOGRAPH + {0xCCFA, 0x94C1}, //13030 #CJK UNIFIED IDEOGRAPH + {0xCCFB, 0x5E16}, //13031 #CJK UNIFIED IDEOGRAPH + {0xCCFC, 0x5385}, //13032 #CJK UNIFIED IDEOGRAPH + {0xCCFD, 0x542C}, //13033 #CJK UNIFIED IDEOGRAPH + {0xCCFE, 0x70C3}, //13034 #CJK UNIFIED IDEOGRAPH + {0xCD40, 0x866D}, //13035 #CJK UNIFIED IDEOGRAPH + {0xCD41, 0x866F}, //13036 #CJK UNIFIED IDEOGRAPH + {0xCD42, 0x8670}, //13037 #CJK UNIFIED IDEOGRAPH + {0xCD43, 0x8672}, //13038 #CJK UNIFIED IDEOGRAPH + {0xCD44, 0x8673}, //13039 #CJK UNIFIED IDEOGRAPH + {0xCD45, 0x8674}, //13040 #CJK UNIFIED IDEOGRAPH + {0xCD46, 0x8675}, //13041 #CJK UNIFIED IDEOGRAPH + {0xCD47, 0x8676}, //13042 #CJK UNIFIED IDEOGRAPH + {0xCD48, 0x8677}, //13043 #CJK UNIFIED IDEOGRAPH + {0xCD49, 0x8678}, //13044 #CJK UNIFIED IDEOGRAPH + {0xCD4A, 0x8683}, //13045 #CJK UNIFIED IDEOGRAPH + {0xCD4B, 0x8684}, //13046 #CJK UNIFIED IDEOGRAPH + {0xCD4C, 0x8685}, //13047 #CJK UNIFIED IDEOGRAPH + {0xCD4D, 0x8686}, //13048 #CJK UNIFIED IDEOGRAPH + {0xCD4E, 0x8687}, //13049 #CJK UNIFIED IDEOGRAPH + {0xCD4F, 0x8688}, //13050 #CJK UNIFIED IDEOGRAPH + {0xCD50, 0x8689}, //13051 #CJK UNIFIED IDEOGRAPH + {0xCD51, 0x868E}, //13052 #CJK UNIFIED IDEOGRAPH + {0xCD52, 0x868F}, //13053 #CJK UNIFIED IDEOGRAPH + {0xCD53, 0x8690}, //13054 #CJK UNIFIED IDEOGRAPH + {0xCD54, 0x8691}, //13055 #CJK UNIFIED IDEOGRAPH + {0xCD55, 0x8692}, //13056 #CJK UNIFIED IDEOGRAPH + {0xCD56, 0x8694}, //13057 #CJK UNIFIED IDEOGRAPH + {0xCD57, 0x8696}, //13058 #CJK UNIFIED IDEOGRAPH + {0xCD58, 0x8697}, //13059 #CJK UNIFIED IDEOGRAPH + {0xCD59, 0x8698}, //13060 #CJK UNIFIED IDEOGRAPH + {0xCD5A, 0x8699}, //13061 #CJK UNIFIED IDEOGRAPH + {0xCD5B, 0x869A}, //13062 #CJK UNIFIED IDEOGRAPH + {0xCD5C, 0x869B}, //13063 #CJK UNIFIED IDEOGRAPH + {0xCD5D, 0x869E}, //13064 #CJK UNIFIED IDEOGRAPH + {0xCD5E, 0x869F}, //13065 #CJK UNIFIED IDEOGRAPH + {0xCD5F, 0x86A0}, //13066 #CJK UNIFIED IDEOGRAPH + {0xCD60, 0x86A1}, //13067 #CJK UNIFIED IDEOGRAPH + {0xCD61, 0x86A2}, //13068 #CJK UNIFIED IDEOGRAPH + {0xCD62, 0x86A5}, //13069 #CJK UNIFIED IDEOGRAPH + {0xCD63, 0x86A6}, //13070 #CJK UNIFIED IDEOGRAPH + {0xCD64, 0x86AB}, //13071 #CJK UNIFIED IDEOGRAPH + {0xCD65, 0x86AD}, //13072 #CJK UNIFIED IDEOGRAPH + {0xCD66, 0x86AE}, //13073 #CJK UNIFIED IDEOGRAPH + {0xCD67, 0x86B2}, //13074 #CJK UNIFIED IDEOGRAPH + {0xCD68, 0x86B3}, //13075 #CJK UNIFIED IDEOGRAPH + {0xCD69, 0x86B7}, //13076 #CJK UNIFIED IDEOGRAPH + {0xCD6A, 0x86B8}, //13077 #CJK UNIFIED IDEOGRAPH + {0xCD6B, 0x86B9}, //13078 #CJK UNIFIED IDEOGRAPH + {0xCD6C, 0x86BB}, //13079 #CJK UNIFIED IDEOGRAPH + {0xCD6D, 0x86BC}, //13080 #CJK UNIFIED IDEOGRAPH + {0xCD6E, 0x86BD}, //13081 #CJK UNIFIED IDEOGRAPH + {0xCD6F, 0x86BE}, //13082 #CJK UNIFIED IDEOGRAPH + {0xCD70, 0x86BF}, //13083 #CJK UNIFIED IDEOGRAPH + {0xCD71, 0x86C1}, //13084 #CJK UNIFIED IDEOGRAPH + {0xCD72, 0x86C2}, //13085 #CJK UNIFIED IDEOGRAPH + {0xCD73, 0x86C3}, //13086 #CJK UNIFIED IDEOGRAPH + {0xCD74, 0x86C5}, //13087 #CJK UNIFIED IDEOGRAPH + {0xCD75, 0x86C8}, //13088 #CJK UNIFIED IDEOGRAPH + {0xCD76, 0x86CC}, //13089 #CJK UNIFIED IDEOGRAPH + {0xCD77, 0x86CD}, //13090 #CJK UNIFIED IDEOGRAPH + {0xCD78, 0x86D2}, //13091 #CJK UNIFIED IDEOGRAPH + {0xCD79, 0x86D3}, //13092 #CJK UNIFIED IDEOGRAPH + {0xCD7A, 0x86D5}, //13093 #CJK UNIFIED IDEOGRAPH + {0xCD7B, 0x86D6}, //13094 #CJK UNIFIED IDEOGRAPH + {0xCD7C, 0x86D7}, //13095 #CJK UNIFIED IDEOGRAPH + {0xCD7D, 0x86DA}, //13096 #CJK UNIFIED IDEOGRAPH + {0xCD7E, 0x86DC}, //13097 #CJK UNIFIED IDEOGRAPH + {0xCD80, 0x86DD}, //13098 #CJK UNIFIED IDEOGRAPH + {0xCD81, 0x86E0}, //13099 #CJK UNIFIED IDEOGRAPH + {0xCD82, 0x86E1}, //13100 #CJK UNIFIED IDEOGRAPH + {0xCD83, 0x86E2}, //13101 #CJK UNIFIED IDEOGRAPH + {0xCD84, 0x86E3}, //13102 #CJK UNIFIED IDEOGRAPH + {0xCD85, 0x86E5}, //13103 #CJK UNIFIED IDEOGRAPH + {0xCD86, 0x86E6}, //13104 #CJK UNIFIED IDEOGRAPH + {0xCD87, 0x86E7}, //13105 #CJK UNIFIED IDEOGRAPH + {0xCD88, 0x86E8}, //13106 #CJK UNIFIED IDEOGRAPH + {0xCD89, 0x86EA}, //13107 #CJK UNIFIED IDEOGRAPH + {0xCD8A, 0x86EB}, //13108 #CJK UNIFIED IDEOGRAPH + {0xCD8B, 0x86EC}, //13109 #CJK UNIFIED IDEOGRAPH + {0xCD8C, 0x86EF}, //13110 #CJK UNIFIED IDEOGRAPH + {0xCD8D, 0x86F5}, //13111 #CJK UNIFIED IDEOGRAPH + {0xCD8E, 0x86F6}, //13112 #CJK UNIFIED IDEOGRAPH + {0xCD8F, 0x86F7}, //13113 #CJK UNIFIED IDEOGRAPH + {0xCD90, 0x86FA}, //13114 #CJK UNIFIED IDEOGRAPH + {0xCD91, 0x86FB}, //13115 #CJK UNIFIED IDEOGRAPH + {0xCD92, 0x86FC}, //13116 #CJK UNIFIED IDEOGRAPH + {0xCD93, 0x86FD}, //13117 #CJK UNIFIED IDEOGRAPH + {0xCD94, 0x86FF}, //13118 #CJK UNIFIED IDEOGRAPH + {0xCD95, 0x8701}, //13119 #CJK UNIFIED IDEOGRAPH + {0xCD96, 0x8704}, //13120 #CJK UNIFIED IDEOGRAPH + {0xCD97, 0x8705}, //13121 #CJK UNIFIED IDEOGRAPH + {0xCD98, 0x8706}, //13122 #CJK UNIFIED IDEOGRAPH + {0xCD99, 0x870B}, //13123 #CJK UNIFIED IDEOGRAPH + {0xCD9A, 0x870C}, //13124 #CJK UNIFIED IDEOGRAPH + {0xCD9B, 0x870E}, //13125 #CJK UNIFIED IDEOGRAPH + {0xCD9C, 0x870F}, //13126 #CJK UNIFIED IDEOGRAPH + {0xCD9D, 0x8710}, //13127 #CJK UNIFIED IDEOGRAPH + {0xCD9E, 0x8711}, //13128 #CJK UNIFIED IDEOGRAPH + {0xCD9F, 0x8714}, //13129 #CJK UNIFIED IDEOGRAPH + {0xCDA0, 0x8716}, //13130 #CJK UNIFIED IDEOGRAPH + {0xCDA1, 0x6C40}, //13131 #CJK UNIFIED IDEOGRAPH + {0xCDA2, 0x5EF7}, //13132 #CJK UNIFIED IDEOGRAPH + {0xCDA3, 0x505C}, //13133 #CJK UNIFIED IDEOGRAPH + {0xCDA4, 0x4EAD}, //13134 #CJK UNIFIED IDEOGRAPH + {0xCDA5, 0x5EAD}, //13135 #CJK UNIFIED IDEOGRAPH + {0xCDA6, 0x633A}, //13136 #CJK UNIFIED IDEOGRAPH + {0xCDA7, 0x8247}, //13137 #CJK UNIFIED IDEOGRAPH + {0xCDA8, 0x901A}, //13138 #CJK UNIFIED IDEOGRAPH + {0xCDA9, 0x6850}, //13139 #CJK UNIFIED IDEOGRAPH + {0xCDAA, 0x916E}, //13140 #CJK UNIFIED IDEOGRAPH + {0xCDAB, 0x77B3}, //13141 #CJK UNIFIED IDEOGRAPH + {0xCDAC, 0x540C}, //13142 #CJK UNIFIED IDEOGRAPH + {0xCDAD, 0x94DC}, //13143 #CJK UNIFIED IDEOGRAPH + {0xCDAE, 0x5F64}, //13144 #CJK UNIFIED IDEOGRAPH + {0xCDAF, 0x7AE5}, //13145 #CJK UNIFIED IDEOGRAPH + {0xCDB0, 0x6876}, //13146 #CJK UNIFIED IDEOGRAPH + {0xCDB1, 0x6345}, //13147 #CJK UNIFIED IDEOGRAPH + {0xCDB2, 0x7B52}, //13148 #CJK UNIFIED IDEOGRAPH + {0xCDB3, 0x7EDF}, //13149 #CJK UNIFIED IDEOGRAPH + {0xCDB4, 0x75DB}, //13150 #CJK UNIFIED IDEOGRAPH + {0xCDB5, 0x5077}, //13151 #CJK UNIFIED IDEOGRAPH + {0xCDB6, 0x6295}, //13152 #CJK UNIFIED IDEOGRAPH + {0xCDB7, 0x5934}, //13153 #CJK UNIFIED IDEOGRAPH + {0xCDB8, 0x900F}, //13154 #CJK UNIFIED IDEOGRAPH + {0xCDB9, 0x51F8}, //13155 #CJK UNIFIED IDEOGRAPH + {0xCDBA, 0x79C3}, //13156 #CJK UNIFIED IDEOGRAPH + {0xCDBB, 0x7A81}, //13157 #CJK UNIFIED IDEOGRAPH + {0xCDBC, 0x56FE}, //13158 #CJK UNIFIED IDEOGRAPH + {0xCDBD, 0x5F92}, //13159 #CJK UNIFIED IDEOGRAPH + {0xCDBE, 0x9014}, //13160 #CJK UNIFIED IDEOGRAPH + {0xCDBF, 0x6D82}, //13161 #CJK UNIFIED IDEOGRAPH + {0xCDC0, 0x5C60}, //13162 #CJK UNIFIED IDEOGRAPH + {0xCDC1, 0x571F}, //13163 #CJK UNIFIED IDEOGRAPH + {0xCDC2, 0x5410}, //13164 #CJK UNIFIED IDEOGRAPH + {0xCDC3, 0x5154}, //13165 #CJK UNIFIED IDEOGRAPH + {0xCDC4, 0x6E4D}, //13166 #CJK UNIFIED IDEOGRAPH + {0xCDC5, 0x56E2}, //13167 #CJK UNIFIED IDEOGRAPH + {0xCDC6, 0x63A8}, //13168 #CJK UNIFIED IDEOGRAPH + {0xCDC7, 0x9893}, //13169 #CJK UNIFIED IDEOGRAPH + {0xCDC8, 0x817F}, //13170 #CJK UNIFIED IDEOGRAPH + {0xCDC9, 0x8715}, //13171 #CJK UNIFIED IDEOGRAPH + {0xCDCA, 0x892A}, //13172 #CJK UNIFIED IDEOGRAPH + {0xCDCB, 0x9000}, //13173 #CJK UNIFIED IDEOGRAPH + {0xCDCC, 0x541E}, //13174 #CJK UNIFIED IDEOGRAPH + {0xCDCD, 0x5C6F}, //13175 #CJK UNIFIED IDEOGRAPH + {0xCDCE, 0x81C0}, //13176 #CJK UNIFIED IDEOGRAPH + {0xCDCF, 0x62D6}, //13177 #CJK UNIFIED IDEOGRAPH + {0xCDD0, 0x6258}, //13178 #CJK UNIFIED IDEOGRAPH + {0xCDD1, 0x8131}, //13179 #CJK UNIFIED IDEOGRAPH + {0xCDD2, 0x9E35}, //13180 #CJK UNIFIED IDEOGRAPH + {0xCDD3, 0x9640}, //13181 #CJK UNIFIED IDEOGRAPH + {0xCDD4, 0x9A6E}, //13182 #CJK UNIFIED IDEOGRAPH + {0xCDD5, 0x9A7C}, //13183 #CJK UNIFIED IDEOGRAPH + {0xCDD6, 0x692D}, //13184 #CJK UNIFIED IDEOGRAPH + {0xCDD7, 0x59A5}, //13185 #CJK UNIFIED IDEOGRAPH + {0xCDD8, 0x62D3}, //13186 #CJK UNIFIED IDEOGRAPH + {0xCDD9, 0x553E}, //13187 #CJK UNIFIED IDEOGRAPH + {0xCDDA, 0x6316}, //13188 #CJK UNIFIED IDEOGRAPH + {0xCDDB, 0x54C7}, //13189 #CJK UNIFIED IDEOGRAPH + {0xCDDC, 0x86D9}, //13190 #CJK UNIFIED IDEOGRAPH + {0xCDDD, 0x6D3C}, //13191 #CJK UNIFIED IDEOGRAPH + {0xCDDE, 0x5A03}, //13192 #CJK UNIFIED IDEOGRAPH + {0xCDDF, 0x74E6}, //13193 #CJK UNIFIED IDEOGRAPH + {0xCDE0, 0x889C}, //13194 #CJK UNIFIED IDEOGRAPH + {0xCDE1, 0x6B6A}, //13195 #CJK UNIFIED IDEOGRAPH + {0xCDE2, 0x5916}, //13196 #CJK UNIFIED IDEOGRAPH + {0xCDE3, 0x8C4C}, //13197 #CJK UNIFIED IDEOGRAPH + {0xCDE4, 0x5F2F}, //13198 #CJK UNIFIED IDEOGRAPH + {0xCDE5, 0x6E7E}, //13199 #CJK UNIFIED IDEOGRAPH + {0xCDE6, 0x73A9}, //13200 #CJK UNIFIED IDEOGRAPH + {0xCDE7, 0x987D}, //13201 #CJK UNIFIED IDEOGRAPH + {0xCDE8, 0x4E38}, //13202 #CJK UNIFIED IDEOGRAPH + {0xCDE9, 0x70F7}, //13203 #CJK UNIFIED IDEOGRAPH + {0xCDEA, 0x5B8C}, //13204 #CJK UNIFIED IDEOGRAPH + {0xCDEB, 0x7897}, //13205 #CJK UNIFIED IDEOGRAPH + {0xCDEC, 0x633D}, //13206 #CJK UNIFIED IDEOGRAPH + {0xCDED, 0x665A}, //13207 #CJK UNIFIED IDEOGRAPH + {0xCDEE, 0x7696}, //13208 #CJK UNIFIED IDEOGRAPH + {0xCDEF, 0x60CB}, //13209 #CJK UNIFIED IDEOGRAPH + {0xCDF0, 0x5B9B}, //13210 #CJK UNIFIED IDEOGRAPH + {0xCDF1, 0x5A49}, //13211 #CJK UNIFIED IDEOGRAPH + {0xCDF2, 0x4E07}, //13212 #CJK UNIFIED IDEOGRAPH + {0xCDF3, 0x8155}, //13213 #CJK UNIFIED IDEOGRAPH + {0xCDF4, 0x6C6A}, //13214 #CJK UNIFIED IDEOGRAPH + {0xCDF5, 0x738B}, //13215 #CJK UNIFIED IDEOGRAPH + {0xCDF6, 0x4EA1}, //13216 #CJK UNIFIED IDEOGRAPH + {0xCDF7, 0x6789}, //13217 #CJK UNIFIED IDEOGRAPH + {0xCDF8, 0x7F51}, //13218 #CJK UNIFIED IDEOGRAPH + {0xCDF9, 0x5F80}, //13219 #CJK UNIFIED IDEOGRAPH + {0xCDFA, 0x65FA}, //13220 #CJK UNIFIED IDEOGRAPH + {0xCDFB, 0x671B}, //13221 #CJK UNIFIED IDEOGRAPH + {0xCDFC, 0x5FD8}, //13222 #CJK UNIFIED IDEOGRAPH + {0xCDFD, 0x5984}, //13223 #CJK UNIFIED IDEOGRAPH + {0xCDFE, 0x5A01}, //13224 #CJK UNIFIED IDEOGRAPH + {0xCE40, 0x8719}, //13225 #CJK UNIFIED IDEOGRAPH + {0xCE41, 0x871B}, //13226 #CJK UNIFIED IDEOGRAPH + {0xCE42, 0x871D}, //13227 #CJK UNIFIED IDEOGRAPH + {0xCE43, 0x871F}, //13228 #CJK UNIFIED IDEOGRAPH + {0xCE44, 0x8720}, //13229 #CJK UNIFIED IDEOGRAPH + {0xCE45, 0x8724}, //13230 #CJK UNIFIED IDEOGRAPH + {0xCE46, 0x8726}, //13231 #CJK UNIFIED IDEOGRAPH + {0xCE47, 0x8727}, //13232 #CJK UNIFIED IDEOGRAPH + {0xCE48, 0x8728}, //13233 #CJK UNIFIED IDEOGRAPH + {0xCE49, 0x872A}, //13234 #CJK UNIFIED IDEOGRAPH + {0xCE4A, 0x872B}, //13235 #CJK UNIFIED IDEOGRAPH + {0xCE4B, 0x872C}, //13236 #CJK UNIFIED IDEOGRAPH + {0xCE4C, 0x872D}, //13237 #CJK UNIFIED IDEOGRAPH + {0xCE4D, 0x872F}, //13238 #CJK UNIFIED IDEOGRAPH + {0xCE4E, 0x8730}, //13239 #CJK UNIFIED IDEOGRAPH + {0xCE4F, 0x8732}, //13240 #CJK UNIFIED IDEOGRAPH + {0xCE50, 0x8733}, //13241 #CJK UNIFIED IDEOGRAPH + {0xCE51, 0x8735}, //13242 #CJK UNIFIED IDEOGRAPH + {0xCE52, 0x8736}, //13243 #CJK UNIFIED IDEOGRAPH + {0xCE53, 0x8738}, //13244 #CJK UNIFIED IDEOGRAPH + {0xCE54, 0x8739}, //13245 #CJK UNIFIED IDEOGRAPH + {0xCE55, 0x873A}, //13246 #CJK UNIFIED IDEOGRAPH + {0xCE56, 0x873C}, //13247 #CJK UNIFIED IDEOGRAPH + {0xCE57, 0x873D}, //13248 #CJK UNIFIED IDEOGRAPH + {0xCE58, 0x8740}, //13249 #CJK UNIFIED IDEOGRAPH + {0xCE59, 0x8741}, //13250 #CJK UNIFIED IDEOGRAPH + {0xCE5A, 0x8742}, //13251 #CJK UNIFIED IDEOGRAPH + {0xCE5B, 0x8743}, //13252 #CJK UNIFIED IDEOGRAPH + {0xCE5C, 0x8744}, //13253 #CJK UNIFIED IDEOGRAPH + {0xCE5D, 0x8745}, //13254 #CJK UNIFIED IDEOGRAPH + {0xCE5E, 0x8746}, //13255 #CJK UNIFIED IDEOGRAPH + {0xCE5F, 0x874A}, //13256 #CJK UNIFIED IDEOGRAPH + {0xCE60, 0x874B}, //13257 #CJK UNIFIED IDEOGRAPH + {0xCE61, 0x874D}, //13258 #CJK UNIFIED IDEOGRAPH + {0xCE62, 0x874F}, //13259 #CJK UNIFIED IDEOGRAPH + {0xCE63, 0x8750}, //13260 #CJK UNIFIED IDEOGRAPH + {0xCE64, 0x8751}, //13261 #CJK UNIFIED IDEOGRAPH + {0xCE65, 0x8752}, //13262 #CJK UNIFIED IDEOGRAPH + {0xCE66, 0x8754}, //13263 #CJK UNIFIED IDEOGRAPH + {0xCE67, 0x8755}, //13264 #CJK UNIFIED IDEOGRAPH + {0xCE68, 0x8756}, //13265 #CJK UNIFIED IDEOGRAPH + {0xCE69, 0x8758}, //13266 #CJK UNIFIED IDEOGRAPH + {0xCE6A, 0x875A}, //13267 #CJK UNIFIED IDEOGRAPH + {0xCE6B, 0x875B}, //13268 #CJK UNIFIED IDEOGRAPH + {0xCE6C, 0x875C}, //13269 #CJK UNIFIED IDEOGRAPH + {0xCE6D, 0x875D}, //13270 #CJK UNIFIED IDEOGRAPH + {0xCE6E, 0x875E}, //13271 #CJK UNIFIED IDEOGRAPH + {0xCE6F, 0x875F}, //13272 #CJK UNIFIED IDEOGRAPH + {0xCE70, 0x8761}, //13273 #CJK UNIFIED IDEOGRAPH + {0xCE71, 0x8762}, //13274 #CJK UNIFIED IDEOGRAPH + {0xCE72, 0x8766}, //13275 #CJK UNIFIED IDEOGRAPH + {0xCE73, 0x8767}, //13276 #CJK UNIFIED IDEOGRAPH + {0xCE74, 0x8768}, //13277 #CJK UNIFIED IDEOGRAPH + {0xCE75, 0x8769}, //13278 #CJK UNIFIED IDEOGRAPH + {0xCE76, 0x876A}, //13279 #CJK UNIFIED IDEOGRAPH + {0xCE77, 0x876B}, //13280 #CJK UNIFIED IDEOGRAPH + {0xCE78, 0x876C}, //13281 #CJK UNIFIED IDEOGRAPH + {0xCE79, 0x876D}, //13282 #CJK UNIFIED IDEOGRAPH + {0xCE7A, 0x876F}, //13283 #CJK UNIFIED IDEOGRAPH + {0xCE7B, 0x8771}, //13284 #CJK UNIFIED IDEOGRAPH + {0xCE7C, 0x8772}, //13285 #CJK UNIFIED IDEOGRAPH + {0xCE7D, 0x8773}, //13286 #CJK UNIFIED IDEOGRAPH + {0xCE7E, 0x8775}, //13287 #CJK UNIFIED IDEOGRAPH + {0xCE80, 0x8777}, //13288 #CJK UNIFIED IDEOGRAPH + {0xCE81, 0x8778}, //13289 #CJK UNIFIED IDEOGRAPH + {0xCE82, 0x8779}, //13290 #CJK UNIFIED IDEOGRAPH + {0xCE83, 0x877A}, //13291 #CJK UNIFIED IDEOGRAPH + {0xCE84, 0x877F}, //13292 #CJK UNIFIED IDEOGRAPH + {0xCE85, 0x8780}, //13293 #CJK UNIFIED IDEOGRAPH + {0xCE86, 0x8781}, //13294 #CJK UNIFIED IDEOGRAPH + {0xCE87, 0x8784}, //13295 #CJK UNIFIED IDEOGRAPH + {0xCE88, 0x8786}, //13296 #CJK UNIFIED IDEOGRAPH + {0xCE89, 0x8787}, //13297 #CJK UNIFIED IDEOGRAPH + {0xCE8A, 0x8789}, //13298 #CJK UNIFIED IDEOGRAPH + {0xCE8B, 0x878A}, //13299 #CJK UNIFIED IDEOGRAPH + {0xCE8C, 0x878C}, //13300 #CJK UNIFIED IDEOGRAPH + {0xCE8D, 0x878E}, //13301 #CJK UNIFIED IDEOGRAPH + {0xCE8E, 0x878F}, //13302 #CJK UNIFIED IDEOGRAPH + {0xCE8F, 0x8790}, //13303 #CJK UNIFIED IDEOGRAPH + {0xCE90, 0x8791}, //13304 #CJK UNIFIED IDEOGRAPH + {0xCE91, 0x8792}, //13305 #CJK UNIFIED IDEOGRAPH + {0xCE92, 0x8794}, //13306 #CJK UNIFIED IDEOGRAPH + {0xCE93, 0x8795}, //13307 #CJK UNIFIED IDEOGRAPH + {0xCE94, 0x8796}, //13308 #CJK UNIFIED IDEOGRAPH + {0xCE95, 0x8798}, //13309 #CJK UNIFIED IDEOGRAPH + {0xCE96, 0x8799}, //13310 #CJK UNIFIED IDEOGRAPH + {0xCE97, 0x879A}, //13311 #CJK UNIFIED IDEOGRAPH + {0xCE98, 0x879B}, //13312 #CJK UNIFIED IDEOGRAPH + {0xCE99, 0x879C}, //13313 #CJK UNIFIED IDEOGRAPH + {0xCE9A, 0x879D}, //13314 #CJK UNIFIED IDEOGRAPH + {0xCE9B, 0x879E}, //13315 #CJK UNIFIED IDEOGRAPH + {0xCE9C, 0x87A0}, //13316 #CJK UNIFIED IDEOGRAPH + {0xCE9D, 0x87A1}, //13317 #CJK UNIFIED IDEOGRAPH + {0xCE9E, 0x87A2}, //13318 #CJK UNIFIED IDEOGRAPH + {0xCE9F, 0x87A3}, //13319 #CJK UNIFIED IDEOGRAPH + {0xCEA0, 0x87A4}, //13320 #CJK UNIFIED IDEOGRAPH + {0xCEA1, 0x5DCD}, //13321 #CJK UNIFIED IDEOGRAPH + {0xCEA2, 0x5FAE}, //13322 #CJK UNIFIED IDEOGRAPH + {0xCEA3, 0x5371}, //13323 #CJK UNIFIED IDEOGRAPH + {0xCEA4, 0x97E6}, //13324 #CJK UNIFIED IDEOGRAPH + {0xCEA5, 0x8FDD}, //13325 #CJK UNIFIED IDEOGRAPH + {0xCEA6, 0x6845}, //13326 #CJK UNIFIED IDEOGRAPH + {0xCEA7, 0x56F4}, //13327 #CJK UNIFIED IDEOGRAPH + {0xCEA8, 0x552F}, //13328 #CJK UNIFIED IDEOGRAPH + {0xCEA9, 0x60DF}, //13329 #CJK UNIFIED IDEOGRAPH + {0xCEAA, 0x4E3A}, //13330 #CJK UNIFIED IDEOGRAPH + {0xCEAB, 0x6F4D}, //13331 #CJK UNIFIED IDEOGRAPH + {0xCEAC, 0x7EF4}, //13332 #CJK UNIFIED IDEOGRAPH + {0xCEAD, 0x82C7}, //13333 #CJK UNIFIED IDEOGRAPH + {0xCEAE, 0x840E}, //13334 #CJK UNIFIED IDEOGRAPH + {0xCEAF, 0x59D4}, //13335 #CJK UNIFIED IDEOGRAPH + {0xCEB0, 0x4F1F}, //13336 #CJK UNIFIED IDEOGRAPH + {0xCEB1, 0x4F2A}, //13337 #CJK UNIFIED IDEOGRAPH + {0xCEB2, 0x5C3E}, //13338 #CJK UNIFIED IDEOGRAPH + {0xCEB3, 0x7EAC}, //13339 #CJK UNIFIED IDEOGRAPH + {0xCEB4, 0x672A}, //13340 #CJK UNIFIED IDEOGRAPH + {0xCEB5, 0x851A}, //13341 #CJK UNIFIED IDEOGRAPH + {0xCEB6, 0x5473}, //13342 #CJK UNIFIED IDEOGRAPH + {0xCEB7, 0x754F}, //13343 #CJK UNIFIED IDEOGRAPH + {0xCEB8, 0x80C3}, //13344 #CJK UNIFIED IDEOGRAPH + {0xCEB9, 0x5582}, //13345 #CJK UNIFIED IDEOGRAPH + {0xCEBA, 0x9B4F}, //13346 #CJK UNIFIED IDEOGRAPH + {0xCEBB, 0x4F4D}, //13347 #CJK UNIFIED IDEOGRAPH + {0xCEBC, 0x6E2D}, //13348 #CJK UNIFIED IDEOGRAPH + {0xCEBD, 0x8C13}, //13349 #CJK UNIFIED IDEOGRAPH + {0xCEBE, 0x5C09}, //13350 #CJK UNIFIED IDEOGRAPH + {0xCEBF, 0x6170}, //13351 #CJK UNIFIED IDEOGRAPH + {0xCEC0, 0x536B}, //13352 #CJK UNIFIED IDEOGRAPH + {0xCEC1, 0x761F}, //13353 #CJK UNIFIED IDEOGRAPH + {0xCEC2, 0x6E29}, //13354 #CJK UNIFIED IDEOGRAPH + {0xCEC3, 0x868A}, //13355 #CJK UNIFIED IDEOGRAPH + {0xCEC4, 0x6587}, //13356 #CJK UNIFIED IDEOGRAPH + {0xCEC5, 0x95FB}, //13357 #CJK UNIFIED IDEOGRAPH + {0xCEC6, 0x7EB9}, //13358 #CJK UNIFIED IDEOGRAPH + {0xCEC7, 0x543B}, //13359 #CJK UNIFIED IDEOGRAPH + {0xCEC8, 0x7A33}, //13360 #CJK UNIFIED IDEOGRAPH + {0xCEC9, 0x7D0A}, //13361 #CJK UNIFIED IDEOGRAPH + {0xCECA, 0x95EE}, //13362 #CJK UNIFIED IDEOGRAPH + {0xCECB, 0x55E1}, //13363 #CJK UNIFIED IDEOGRAPH + {0xCECC, 0x7FC1}, //13364 #CJK UNIFIED IDEOGRAPH + {0xCECD, 0x74EE}, //13365 #CJK UNIFIED IDEOGRAPH + {0xCECE, 0x631D}, //13366 #CJK UNIFIED IDEOGRAPH + {0xCECF, 0x8717}, //13367 #CJK UNIFIED IDEOGRAPH + {0xCED0, 0x6DA1}, //13368 #CJK UNIFIED IDEOGRAPH + {0xCED1, 0x7A9D}, //13369 #CJK UNIFIED IDEOGRAPH + {0xCED2, 0x6211}, //13370 #CJK UNIFIED IDEOGRAPH + {0xCED3, 0x65A1}, //13371 #CJK UNIFIED IDEOGRAPH + {0xCED4, 0x5367}, //13372 #CJK UNIFIED IDEOGRAPH + {0xCED5, 0x63E1}, //13373 #CJK UNIFIED IDEOGRAPH + {0xCED6, 0x6C83}, //13374 #CJK UNIFIED IDEOGRAPH + {0xCED7, 0x5DEB}, //13375 #CJK UNIFIED IDEOGRAPH + {0xCED8, 0x545C}, //13376 #CJK UNIFIED IDEOGRAPH + {0xCED9, 0x94A8}, //13377 #CJK UNIFIED IDEOGRAPH + {0xCEDA, 0x4E4C}, //13378 #CJK UNIFIED IDEOGRAPH + {0xCEDB, 0x6C61}, //13379 #CJK UNIFIED IDEOGRAPH + {0xCEDC, 0x8BEC}, //13380 #CJK UNIFIED IDEOGRAPH + {0xCEDD, 0x5C4B}, //13381 #CJK UNIFIED IDEOGRAPH + {0xCEDE, 0x65E0}, //13382 #CJK UNIFIED IDEOGRAPH + {0xCEDF, 0x829C}, //13383 #CJK UNIFIED IDEOGRAPH + {0xCEE0, 0x68A7}, //13384 #CJK UNIFIED IDEOGRAPH + {0xCEE1, 0x543E}, //13385 #CJK UNIFIED IDEOGRAPH + {0xCEE2, 0x5434}, //13386 #CJK UNIFIED IDEOGRAPH + {0xCEE3, 0x6BCB}, //13387 #CJK UNIFIED IDEOGRAPH + {0xCEE4, 0x6B66}, //13388 #CJK UNIFIED IDEOGRAPH + {0xCEE5, 0x4E94}, //13389 #CJK UNIFIED IDEOGRAPH + {0xCEE6, 0x6342}, //13390 #CJK UNIFIED IDEOGRAPH + {0xCEE7, 0x5348}, //13391 #CJK UNIFIED IDEOGRAPH + {0xCEE8, 0x821E}, //13392 #CJK UNIFIED IDEOGRAPH + {0xCEE9, 0x4F0D}, //13393 #CJK UNIFIED IDEOGRAPH + {0xCEEA, 0x4FAE}, //13394 #CJK UNIFIED IDEOGRAPH + {0xCEEB, 0x575E}, //13395 #CJK UNIFIED IDEOGRAPH + {0xCEEC, 0x620A}, //13396 #CJK UNIFIED IDEOGRAPH + {0xCEED, 0x96FE}, //13397 #CJK UNIFIED IDEOGRAPH + {0xCEEE, 0x6664}, //13398 #CJK UNIFIED IDEOGRAPH + {0xCEEF, 0x7269}, //13399 #CJK UNIFIED IDEOGRAPH + {0xCEF0, 0x52FF}, //13400 #CJK UNIFIED IDEOGRAPH + {0xCEF1, 0x52A1}, //13401 #CJK UNIFIED IDEOGRAPH + {0xCEF2, 0x609F}, //13402 #CJK UNIFIED IDEOGRAPH + {0xCEF3, 0x8BEF}, //13403 #CJK UNIFIED IDEOGRAPH + {0xCEF4, 0x6614}, //13404 #CJK UNIFIED IDEOGRAPH + {0xCEF5, 0x7199}, //13405 #CJK UNIFIED IDEOGRAPH + {0xCEF6, 0x6790}, //13406 #CJK UNIFIED IDEOGRAPH + {0xCEF7, 0x897F}, //13407 #CJK UNIFIED IDEOGRAPH + {0xCEF8, 0x7852}, //13408 #CJK UNIFIED IDEOGRAPH + {0xCEF9, 0x77FD}, //13409 #CJK UNIFIED IDEOGRAPH + {0xCEFA, 0x6670}, //13410 #CJK UNIFIED IDEOGRAPH + {0xCEFB, 0x563B}, //13411 #CJK UNIFIED IDEOGRAPH + {0xCEFC, 0x5438}, //13412 #CJK UNIFIED IDEOGRAPH + {0xCEFD, 0x9521}, //13413 #CJK UNIFIED IDEOGRAPH + {0xCEFE, 0x727A}, //13414 #CJK UNIFIED IDEOGRAPH + {0xCF40, 0x87A5}, //13415 #CJK UNIFIED IDEOGRAPH + {0xCF41, 0x87A6}, //13416 #CJK UNIFIED IDEOGRAPH + {0xCF42, 0x87A7}, //13417 #CJK UNIFIED IDEOGRAPH + {0xCF43, 0x87A9}, //13418 #CJK UNIFIED IDEOGRAPH + {0xCF44, 0x87AA}, //13419 #CJK UNIFIED IDEOGRAPH + {0xCF45, 0x87AE}, //13420 #CJK UNIFIED IDEOGRAPH + {0xCF46, 0x87B0}, //13421 #CJK UNIFIED IDEOGRAPH + {0xCF47, 0x87B1}, //13422 #CJK UNIFIED IDEOGRAPH + {0xCF48, 0x87B2}, //13423 #CJK UNIFIED IDEOGRAPH + {0xCF49, 0x87B4}, //13424 #CJK UNIFIED IDEOGRAPH + {0xCF4A, 0x87B6}, //13425 #CJK UNIFIED IDEOGRAPH + {0xCF4B, 0x87B7}, //13426 #CJK UNIFIED IDEOGRAPH + {0xCF4C, 0x87B8}, //13427 #CJK UNIFIED IDEOGRAPH + {0xCF4D, 0x87B9}, //13428 #CJK UNIFIED IDEOGRAPH + {0xCF4E, 0x87BB}, //13429 #CJK UNIFIED IDEOGRAPH + {0xCF4F, 0x87BC}, //13430 #CJK UNIFIED IDEOGRAPH + {0xCF50, 0x87BE}, //13431 #CJK UNIFIED IDEOGRAPH + {0xCF51, 0x87BF}, //13432 #CJK UNIFIED IDEOGRAPH + {0xCF52, 0x87C1}, //13433 #CJK UNIFIED IDEOGRAPH + {0xCF53, 0x87C2}, //13434 #CJK UNIFIED IDEOGRAPH + {0xCF54, 0x87C3}, //13435 #CJK UNIFIED IDEOGRAPH + {0xCF55, 0x87C4}, //13436 #CJK UNIFIED IDEOGRAPH + {0xCF56, 0x87C5}, //13437 #CJK UNIFIED IDEOGRAPH + {0xCF57, 0x87C7}, //13438 #CJK UNIFIED IDEOGRAPH + {0xCF58, 0x87C8}, //13439 #CJK UNIFIED IDEOGRAPH + {0xCF59, 0x87C9}, //13440 #CJK UNIFIED IDEOGRAPH + {0xCF5A, 0x87CC}, //13441 #CJK UNIFIED IDEOGRAPH + {0xCF5B, 0x87CD}, //13442 #CJK UNIFIED IDEOGRAPH + {0xCF5C, 0x87CE}, //13443 #CJK UNIFIED IDEOGRAPH + {0xCF5D, 0x87CF}, //13444 #CJK UNIFIED IDEOGRAPH + {0xCF5E, 0x87D0}, //13445 #CJK UNIFIED IDEOGRAPH + {0xCF5F, 0x87D4}, //13446 #CJK UNIFIED IDEOGRAPH + {0xCF60, 0x87D5}, //13447 #CJK UNIFIED IDEOGRAPH + {0xCF61, 0x87D6}, //13448 #CJK UNIFIED IDEOGRAPH + {0xCF62, 0x87D7}, //13449 #CJK UNIFIED IDEOGRAPH + {0xCF63, 0x87D8}, //13450 #CJK UNIFIED IDEOGRAPH + {0xCF64, 0x87D9}, //13451 #CJK UNIFIED IDEOGRAPH + {0xCF65, 0x87DA}, //13452 #CJK UNIFIED IDEOGRAPH + {0xCF66, 0x87DC}, //13453 #CJK UNIFIED IDEOGRAPH + {0xCF67, 0x87DD}, //13454 #CJK UNIFIED IDEOGRAPH + {0xCF68, 0x87DE}, //13455 #CJK UNIFIED IDEOGRAPH + {0xCF69, 0x87DF}, //13456 #CJK UNIFIED IDEOGRAPH + {0xCF6A, 0x87E1}, //13457 #CJK UNIFIED IDEOGRAPH + {0xCF6B, 0x87E2}, //13458 #CJK UNIFIED IDEOGRAPH + {0xCF6C, 0x87E3}, //13459 #CJK UNIFIED IDEOGRAPH + {0xCF6D, 0x87E4}, //13460 #CJK UNIFIED IDEOGRAPH + {0xCF6E, 0x87E6}, //13461 #CJK UNIFIED IDEOGRAPH + {0xCF6F, 0x87E7}, //13462 #CJK UNIFIED IDEOGRAPH + {0xCF70, 0x87E8}, //13463 #CJK UNIFIED IDEOGRAPH + {0xCF71, 0x87E9}, //13464 #CJK UNIFIED IDEOGRAPH + {0xCF72, 0x87EB}, //13465 #CJK UNIFIED IDEOGRAPH + {0xCF73, 0x87EC}, //13466 #CJK UNIFIED IDEOGRAPH + {0xCF74, 0x87ED}, //13467 #CJK UNIFIED IDEOGRAPH + {0xCF75, 0x87EF}, //13468 #CJK UNIFIED IDEOGRAPH + {0xCF76, 0x87F0}, //13469 #CJK UNIFIED IDEOGRAPH + {0xCF77, 0x87F1}, //13470 #CJK UNIFIED IDEOGRAPH + {0xCF78, 0x87F2}, //13471 #CJK UNIFIED IDEOGRAPH + {0xCF79, 0x87F3}, //13472 #CJK UNIFIED IDEOGRAPH + {0xCF7A, 0x87F4}, //13473 #CJK UNIFIED IDEOGRAPH + {0xCF7B, 0x87F5}, //13474 #CJK UNIFIED IDEOGRAPH + {0xCF7C, 0x87F6}, //13475 #CJK UNIFIED IDEOGRAPH + {0xCF7D, 0x87F7}, //13476 #CJK UNIFIED IDEOGRAPH + {0xCF7E, 0x87F8}, //13477 #CJK UNIFIED IDEOGRAPH + {0xCF80, 0x87FA}, //13478 #CJK UNIFIED IDEOGRAPH + {0xCF81, 0x87FB}, //13479 #CJK UNIFIED IDEOGRAPH + {0xCF82, 0x87FC}, //13480 #CJK UNIFIED IDEOGRAPH + {0xCF83, 0x87FD}, //13481 #CJK UNIFIED IDEOGRAPH + {0xCF84, 0x87FF}, //13482 #CJK UNIFIED IDEOGRAPH + {0xCF85, 0x8800}, //13483 #CJK UNIFIED IDEOGRAPH + {0xCF86, 0x8801}, //13484 #CJK UNIFIED IDEOGRAPH + {0xCF87, 0x8802}, //13485 #CJK UNIFIED IDEOGRAPH + {0xCF88, 0x8804}, //13486 #CJK UNIFIED IDEOGRAPH + {0xCF89, 0x8805}, //13487 #CJK UNIFIED IDEOGRAPH + {0xCF8A, 0x8806}, //13488 #CJK UNIFIED IDEOGRAPH + {0xCF8B, 0x8807}, //13489 #CJK UNIFIED IDEOGRAPH + {0xCF8C, 0x8808}, //13490 #CJK UNIFIED IDEOGRAPH + {0xCF8D, 0x8809}, //13491 #CJK UNIFIED IDEOGRAPH + {0xCF8E, 0x880B}, //13492 #CJK UNIFIED IDEOGRAPH + {0xCF8F, 0x880C}, //13493 #CJK UNIFIED IDEOGRAPH + {0xCF90, 0x880D}, //13494 #CJK UNIFIED IDEOGRAPH + {0xCF91, 0x880E}, //13495 #CJK UNIFIED IDEOGRAPH + {0xCF92, 0x880F}, //13496 #CJK UNIFIED IDEOGRAPH + {0xCF93, 0x8810}, //13497 #CJK UNIFIED IDEOGRAPH + {0xCF94, 0x8811}, //13498 #CJK UNIFIED IDEOGRAPH + {0xCF95, 0x8812}, //13499 #CJK UNIFIED IDEOGRAPH + {0xCF96, 0x8814}, //13500 #CJK UNIFIED IDEOGRAPH + {0xCF97, 0x8817}, //13501 #CJK UNIFIED IDEOGRAPH + {0xCF98, 0x8818}, //13502 #CJK UNIFIED IDEOGRAPH + {0xCF99, 0x8819}, //13503 #CJK UNIFIED IDEOGRAPH + {0xCF9A, 0x881A}, //13504 #CJK UNIFIED IDEOGRAPH + {0xCF9B, 0x881C}, //13505 #CJK UNIFIED IDEOGRAPH + {0xCF9C, 0x881D}, //13506 #CJK UNIFIED IDEOGRAPH + {0xCF9D, 0x881E}, //13507 #CJK UNIFIED IDEOGRAPH + {0xCF9E, 0x881F}, //13508 #CJK UNIFIED IDEOGRAPH + {0xCF9F, 0x8820}, //13509 #CJK UNIFIED IDEOGRAPH + {0xCFA0, 0x8823}, //13510 #CJK UNIFIED IDEOGRAPH + {0xCFA1, 0x7A00}, //13511 #CJK UNIFIED IDEOGRAPH + {0xCFA2, 0x606F}, //13512 #CJK UNIFIED IDEOGRAPH + {0xCFA3, 0x5E0C}, //13513 #CJK UNIFIED IDEOGRAPH + {0xCFA4, 0x6089}, //13514 #CJK UNIFIED IDEOGRAPH + {0xCFA5, 0x819D}, //13515 #CJK UNIFIED IDEOGRAPH + {0xCFA6, 0x5915}, //13516 #CJK UNIFIED IDEOGRAPH + {0xCFA7, 0x60DC}, //13517 #CJK UNIFIED IDEOGRAPH + {0xCFA8, 0x7184}, //13518 #CJK UNIFIED IDEOGRAPH + {0xCFA9, 0x70EF}, //13519 #CJK UNIFIED IDEOGRAPH + {0xCFAA, 0x6EAA}, //13520 #CJK UNIFIED IDEOGRAPH + {0xCFAB, 0x6C50}, //13521 #CJK UNIFIED IDEOGRAPH + {0xCFAC, 0x7280}, //13522 #CJK UNIFIED IDEOGRAPH + {0xCFAD, 0x6A84}, //13523 #CJK UNIFIED IDEOGRAPH + {0xCFAE, 0x88AD}, //13524 #CJK UNIFIED IDEOGRAPH + {0xCFAF, 0x5E2D}, //13525 #CJK UNIFIED IDEOGRAPH + {0xCFB0, 0x4E60}, //13526 #CJK UNIFIED IDEOGRAPH + {0xCFB1, 0x5AB3}, //13527 #CJK UNIFIED IDEOGRAPH + {0xCFB2, 0x559C}, //13528 #CJK UNIFIED IDEOGRAPH + {0xCFB3, 0x94E3}, //13529 #CJK UNIFIED IDEOGRAPH + {0xCFB4, 0x6D17}, //13530 #CJK UNIFIED IDEOGRAPH + {0xCFB5, 0x7CFB}, //13531 #CJK UNIFIED IDEOGRAPH + {0xCFB6, 0x9699}, //13532 #CJK UNIFIED IDEOGRAPH + {0xCFB7, 0x620F}, //13533 #CJK UNIFIED IDEOGRAPH + {0xCFB8, 0x7EC6}, //13534 #CJK UNIFIED IDEOGRAPH + {0xCFB9, 0x778E}, //13535 #CJK UNIFIED IDEOGRAPH + {0xCFBA, 0x867E}, //13536 #CJK UNIFIED IDEOGRAPH + {0xCFBB, 0x5323}, //13537 #CJK UNIFIED IDEOGRAPH + {0xCFBC, 0x971E}, //13538 #CJK UNIFIED IDEOGRAPH + {0xCFBD, 0x8F96}, //13539 #CJK UNIFIED IDEOGRAPH + {0xCFBE, 0x6687}, //13540 #CJK UNIFIED IDEOGRAPH + {0xCFBF, 0x5CE1}, //13541 #CJK UNIFIED IDEOGRAPH + {0xCFC0, 0x4FA0}, //13542 #CJK UNIFIED IDEOGRAPH + {0xCFC1, 0x72ED}, //13543 #CJK UNIFIED IDEOGRAPH + {0xCFC2, 0x4E0B}, //13544 #CJK UNIFIED IDEOGRAPH + {0xCFC3, 0x53A6}, //13545 #CJK UNIFIED IDEOGRAPH + {0xCFC4, 0x590F}, //13546 #CJK UNIFIED IDEOGRAPH + {0xCFC5, 0x5413}, //13547 #CJK UNIFIED IDEOGRAPH + {0xCFC6, 0x6380}, //13548 #CJK UNIFIED IDEOGRAPH + {0xCFC7, 0x9528}, //13549 #CJK UNIFIED IDEOGRAPH + {0xCFC8, 0x5148}, //13550 #CJK UNIFIED IDEOGRAPH + {0xCFC9, 0x4ED9}, //13551 #CJK UNIFIED IDEOGRAPH + {0xCFCA, 0x9C9C}, //13552 #CJK UNIFIED IDEOGRAPH + {0xCFCB, 0x7EA4}, //13553 #CJK UNIFIED IDEOGRAPH + {0xCFCC, 0x54B8}, //13554 #CJK UNIFIED IDEOGRAPH + {0xCFCD, 0x8D24}, //13555 #CJK UNIFIED IDEOGRAPH + {0xCFCE, 0x8854}, //13556 #CJK UNIFIED IDEOGRAPH + {0xCFCF, 0x8237}, //13557 #CJK UNIFIED IDEOGRAPH + {0xCFD0, 0x95F2}, //13558 #CJK UNIFIED IDEOGRAPH + {0xCFD1, 0x6D8E}, //13559 #CJK UNIFIED IDEOGRAPH + {0xCFD2, 0x5F26}, //13560 #CJK UNIFIED IDEOGRAPH + {0xCFD3, 0x5ACC}, //13561 #CJK UNIFIED IDEOGRAPH + {0xCFD4, 0x663E}, //13562 #CJK UNIFIED IDEOGRAPH + {0xCFD5, 0x9669}, //13563 #CJK UNIFIED IDEOGRAPH + {0xCFD6, 0x73B0}, //13564 #CJK UNIFIED IDEOGRAPH + {0xCFD7, 0x732E}, //13565 #CJK UNIFIED IDEOGRAPH + {0xCFD8, 0x53BF}, //13566 #CJK UNIFIED IDEOGRAPH + {0xCFD9, 0x817A}, //13567 #CJK UNIFIED IDEOGRAPH + {0xCFDA, 0x9985}, //13568 #CJK UNIFIED IDEOGRAPH + {0xCFDB, 0x7FA1}, //13569 #CJK UNIFIED IDEOGRAPH + {0xCFDC, 0x5BAA}, //13570 #CJK UNIFIED IDEOGRAPH + {0xCFDD, 0x9677}, //13571 #CJK UNIFIED IDEOGRAPH + {0xCFDE, 0x9650}, //13572 #CJK UNIFIED IDEOGRAPH + {0xCFDF, 0x7EBF}, //13573 #CJK UNIFIED IDEOGRAPH + {0xCFE0, 0x76F8}, //13574 #CJK UNIFIED IDEOGRAPH + {0xCFE1, 0x53A2}, //13575 #CJK UNIFIED IDEOGRAPH + {0xCFE2, 0x9576}, //13576 #CJK UNIFIED IDEOGRAPH + {0xCFE3, 0x9999}, //13577 #CJK UNIFIED IDEOGRAPH + {0xCFE4, 0x7BB1}, //13578 #CJK UNIFIED IDEOGRAPH + {0xCFE5, 0x8944}, //13579 #CJK UNIFIED IDEOGRAPH + {0xCFE6, 0x6E58}, //13580 #CJK UNIFIED IDEOGRAPH + {0xCFE7, 0x4E61}, //13581 #CJK UNIFIED IDEOGRAPH + {0xCFE8, 0x7FD4}, //13582 #CJK UNIFIED IDEOGRAPH + {0xCFE9, 0x7965}, //13583 #CJK UNIFIED IDEOGRAPH + {0xCFEA, 0x8BE6}, //13584 #CJK UNIFIED IDEOGRAPH + {0xCFEB, 0x60F3}, //13585 #CJK UNIFIED IDEOGRAPH + {0xCFEC, 0x54CD}, //13586 #CJK UNIFIED IDEOGRAPH + {0xCFED, 0x4EAB}, //13587 #CJK UNIFIED IDEOGRAPH + {0xCFEE, 0x9879}, //13588 #CJK UNIFIED IDEOGRAPH + {0xCFEF, 0x5DF7}, //13589 #CJK UNIFIED IDEOGRAPH + {0xCFF0, 0x6A61}, //13590 #CJK UNIFIED IDEOGRAPH + {0xCFF1, 0x50CF}, //13591 #CJK UNIFIED IDEOGRAPH + {0xCFF2, 0x5411}, //13592 #CJK UNIFIED IDEOGRAPH + {0xCFF3, 0x8C61}, //13593 #CJK UNIFIED IDEOGRAPH + {0xCFF4, 0x8427}, //13594 #CJK UNIFIED IDEOGRAPH + {0xCFF5, 0x785D}, //13595 #CJK UNIFIED IDEOGRAPH + {0xCFF6, 0x9704}, //13596 #CJK UNIFIED IDEOGRAPH + {0xCFF7, 0x524A}, //13597 #CJK UNIFIED IDEOGRAPH + {0xCFF8, 0x54EE}, //13598 #CJK UNIFIED IDEOGRAPH + {0xCFF9, 0x56A3}, //13599 #CJK UNIFIED IDEOGRAPH + {0xCFFA, 0x9500}, //13600 #CJK UNIFIED IDEOGRAPH + {0xCFFB, 0x6D88}, //13601 #CJK UNIFIED IDEOGRAPH + {0xCFFC, 0x5BB5}, //13602 #CJK UNIFIED IDEOGRAPH + {0xCFFD, 0x6DC6}, //13603 #CJK UNIFIED IDEOGRAPH + {0xCFFE, 0x6653}, //13604 #CJK UNIFIED IDEOGRAPH + {0xD040, 0x8824}, //13605 #CJK UNIFIED IDEOGRAPH + {0xD041, 0x8825}, //13606 #CJK UNIFIED IDEOGRAPH + {0xD042, 0x8826}, //13607 #CJK UNIFIED IDEOGRAPH + {0xD043, 0x8827}, //13608 #CJK UNIFIED IDEOGRAPH + {0xD044, 0x8828}, //13609 #CJK UNIFIED IDEOGRAPH + {0xD045, 0x8829}, //13610 #CJK UNIFIED IDEOGRAPH + {0xD046, 0x882A}, //13611 #CJK UNIFIED IDEOGRAPH + {0xD047, 0x882B}, //13612 #CJK UNIFIED IDEOGRAPH + {0xD048, 0x882C}, //13613 #CJK UNIFIED IDEOGRAPH + {0xD049, 0x882D}, //13614 #CJK UNIFIED IDEOGRAPH + {0xD04A, 0x882E}, //13615 #CJK UNIFIED IDEOGRAPH + {0xD04B, 0x882F}, //13616 #CJK UNIFIED IDEOGRAPH + {0xD04C, 0x8830}, //13617 #CJK UNIFIED IDEOGRAPH + {0xD04D, 0x8831}, //13618 #CJK UNIFIED IDEOGRAPH + {0xD04E, 0x8833}, //13619 #CJK UNIFIED IDEOGRAPH + {0xD04F, 0x8834}, //13620 #CJK UNIFIED IDEOGRAPH + {0xD050, 0x8835}, //13621 #CJK UNIFIED IDEOGRAPH + {0xD051, 0x8836}, //13622 #CJK UNIFIED IDEOGRAPH + {0xD052, 0x8837}, //13623 #CJK UNIFIED IDEOGRAPH + {0xD053, 0x8838}, //13624 #CJK UNIFIED IDEOGRAPH + {0xD054, 0x883A}, //13625 #CJK UNIFIED IDEOGRAPH + {0xD055, 0x883B}, //13626 #CJK UNIFIED IDEOGRAPH + {0xD056, 0x883D}, //13627 #CJK UNIFIED IDEOGRAPH + {0xD057, 0x883E}, //13628 #CJK UNIFIED IDEOGRAPH + {0xD058, 0x883F}, //13629 #CJK UNIFIED IDEOGRAPH + {0xD059, 0x8841}, //13630 #CJK UNIFIED IDEOGRAPH + {0xD05A, 0x8842}, //13631 #CJK UNIFIED IDEOGRAPH + {0xD05B, 0x8843}, //13632 #CJK UNIFIED IDEOGRAPH + {0xD05C, 0x8846}, //13633 #CJK UNIFIED IDEOGRAPH + {0xD05D, 0x8847}, //13634 #CJK UNIFIED IDEOGRAPH + {0xD05E, 0x8848}, //13635 #CJK UNIFIED IDEOGRAPH + {0xD05F, 0x8849}, //13636 #CJK UNIFIED IDEOGRAPH + {0xD060, 0x884A}, //13637 #CJK UNIFIED IDEOGRAPH + {0xD061, 0x884B}, //13638 #CJK UNIFIED IDEOGRAPH + {0xD062, 0x884E}, //13639 #CJK UNIFIED IDEOGRAPH + {0xD063, 0x884F}, //13640 #CJK UNIFIED IDEOGRAPH + {0xD064, 0x8850}, //13641 #CJK UNIFIED IDEOGRAPH + {0xD065, 0x8851}, //13642 #CJK UNIFIED IDEOGRAPH + {0xD066, 0x8852}, //13643 #CJK UNIFIED IDEOGRAPH + {0xD067, 0x8853}, //13644 #CJK UNIFIED IDEOGRAPH + {0xD068, 0x8855}, //13645 #CJK UNIFIED IDEOGRAPH + {0xD069, 0x8856}, //13646 #CJK UNIFIED IDEOGRAPH + {0xD06A, 0x8858}, //13647 #CJK UNIFIED IDEOGRAPH + {0xD06B, 0x885A}, //13648 #CJK UNIFIED IDEOGRAPH + {0xD06C, 0x885B}, //13649 #CJK UNIFIED IDEOGRAPH + {0xD06D, 0x885C}, //13650 #CJK UNIFIED IDEOGRAPH + {0xD06E, 0x885D}, //13651 #CJK UNIFIED IDEOGRAPH + {0xD06F, 0x885E}, //13652 #CJK UNIFIED IDEOGRAPH + {0xD070, 0x885F}, //13653 #CJK UNIFIED IDEOGRAPH + {0xD071, 0x8860}, //13654 #CJK UNIFIED IDEOGRAPH + {0xD072, 0x8866}, //13655 #CJK UNIFIED IDEOGRAPH + {0xD073, 0x8867}, //13656 #CJK UNIFIED IDEOGRAPH + {0xD074, 0x886A}, //13657 #CJK UNIFIED IDEOGRAPH + {0xD075, 0x886D}, //13658 #CJK UNIFIED IDEOGRAPH + {0xD076, 0x886F}, //13659 #CJK UNIFIED IDEOGRAPH + {0xD077, 0x8871}, //13660 #CJK UNIFIED IDEOGRAPH + {0xD078, 0x8873}, //13661 #CJK UNIFIED IDEOGRAPH + {0xD079, 0x8874}, //13662 #CJK UNIFIED IDEOGRAPH + {0xD07A, 0x8875}, //13663 #CJK UNIFIED IDEOGRAPH + {0xD07B, 0x8876}, //13664 #CJK UNIFIED IDEOGRAPH + {0xD07C, 0x8878}, //13665 #CJK UNIFIED IDEOGRAPH + {0xD07D, 0x8879}, //13666 #CJK UNIFIED IDEOGRAPH + {0xD07E, 0x887A}, //13667 #CJK UNIFIED IDEOGRAPH + {0xD080, 0x887B}, //13668 #CJK UNIFIED IDEOGRAPH + {0xD081, 0x887C}, //13669 #CJK UNIFIED IDEOGRAPH + {0xD082, 0x8880}, //13670 #CJK UNIFIED IDEOGRAPH + {0xD083, 0x8883}, //13671 #CJK UNIFIED IDEOGRAPH + {0xD084, 0x8886}, //13672 #CJK UNIFIED IDEOGRAPH + {0xD085, 0x8887}, //13673 #CJK UNIFIED IDEOGRAPH + {0xD086, 0x8889}, //13674 #CJK UNIFIED IDEOGRAPH + {0xD087, 0x888A}, //13675 #CJK UNIFIED IDEOGRAPH + {0xD088, 0x888C}, //13676 #CJK UNIFIED IDEOGRAPH + {0xD089, 0x888E}, //13677 #CJK UNIFIED IDEOGRAPH + {0xD08A, 0x888F}, //13678 #CJK UNIFIED IDEOGRAPH + {0xD08B, 0x8890}, //13679 #CJK UNIFIED IDEOGRAPH + {0xD08C, 0x8891}, //13680 #CJK UNIFIED IDEOGRAPH + {0xD08D, 0x8893}, //13681 #CJK UNIFIED IDEOGRAPH + {0xD08E, 0x8894}, //13682 #CJK UNIFIED IDEOGRAPH + {0xD08F, 0x8895}, //13683 #CJK UNIFIED IDEOGRAPH + {0xD090, 0x8897}, //13684 #CJK UNIFIED IDEOGRAPH + {0xD091, 0x8898}, //13685 #CJK UNIFIED IDEOGRAPH + {0xD092, 0x8899}, //13686 #CJK UNIFIED IDEOGRAPH + {0xD093, 0x889A}, //13687 #CJK UNIFIED IDEOGRAPH + {0xD094, 0x889B}, //13688 #CJK UNIFIED IDEOGRAPH + {0xD095, 0x889D}, //13689 #CJK UNIFIED IDEOGRAPH + {0xD096, 0x889E}, //13690 #CJK UNIFIED IDEOGRAPH + {0xD097, 0x889F}, //13691 #CJK UNIFIED IDEOGRAPH + {0xD098, 0x88A0}, //13692 #CJK UNIFIED IDEOGRAPH + {0xD099, 0x88A1}, //13693 #CJK UNIFIED IDEOGRAPH + {0xD09A, 0x88A3}, //13694 #CJK UNIFIED IDEOGRAPH + {0xD09B, 0x88A5}, //13695 #CJK UNIFIED IDEOGRAPH + {0xD09C, 0x88A6}, //13696 #CJK UNIFIED IDEOGRAPH + {0xD09D, 0x88A7}, //13697 #CJK UNIFIED IDEOGRAPH + {0xD09E, 0x88A8}, //13698 #CJK UNIFIED IDEOGRAPH + {0xD09F, 0x88A9}, //13699 #CJK UNIFIED IDEOGRAPH + {0xD0A0, 0x88AA}, //13700 #CJK UNIFIED IDEOGRAPH + {0xD0A1, 0x5C0F}, //13701 #CJK UNIFIED IDEOGRAPH + {0xD0A2, 0x5B5D}, //13702 #CJK UNIFIED IDEOGRAPH + {0xD0A3, 0x6821}, //13703 #CJK UNIFIED IDEOGRAPH + {0xD0A4, 0x8096}, //13704 #CJK UNIFIED IDEOGRAPH + {0xD0A5, 0x5578}, //13705 #CJK UNIFIED IDEOGRAPH + {0xD0A6, 0x7B11}, //13706 #CJK UNIFIED IDEOGRAPH + {0xD0A7, 0x6548}, //13707 #CJK UNIFIED IDEOGRAPH + {0xD0A8, 0x6954}, //13708 #CJK UNIFIED IDEOGRAPH + {0xD0A9, 0x4E9B}, //13709 #CJK UNIFIED IDEOGRAPH + {0xD0AA, 0x6B47}, //13710 #CJK UNIFIED IDEOGRAPH + {0xD0AB, 0x874E}, //13711 #CJK UNIFIED IDEOGRAPH + {0xD0AC, 0x978B}, //13712 #CJK UNIFIED IDEOGRAPH + {0xD0AD, 0x534F}, //13713 #CJK UNIFIED IDEOGRAPH + {0xD0AE, 0x631F}, //13714 #CJK UNIFIED IDEOGRAPH + {0xD0AF, 0x643A}, //13715 #CJK UNIFIED IDEOGRAPH + {0xD0B0, 0x90AA}, //13716 #CJK UNIFIED IDEOGRAPH + {0xD0B1, 0x659C}, //13717 #CJK UNIFIED IDEOGRAPH + {0xD0B2, 0x80C1}, //13718 #CJK UNIFIED IDEOGRAPH + {0xD0B3, 0x8C10}, //13719 #CJK UNIFIED IDEOGRAPH + {0xD0B4, 0x5199}, //13720 #CJK UNIFIED IDEOGRAPH + {0xD0B5, 0x68B0}, //13721 #CJK UNIFIED IDEOGRAPH + {0xD0B6, 0x5378}, //13722 #CJK UNIFIED IDEOGRAPH + {0xD0B7, 0x87F9}, //13723 #CJK UNIFIED IDEOGRAPH + {0xD0B8, 0x61C8}, //13724 #CJK UNIFIED IDEOGRAPH + {0xD0B9, 0x6CC4}, //13725 #CJK UNIFIED IDEOGRAPH + {0xD0BA, 0x6CFB}, //13726 #CJK UNIFIED IDEOGRAPH + {0xD0BB, 0x8C22}, //13727 #CJK UNIFIED IDEOGRAPH + {0xD0BC, 0x5C51}, //13728 #CJK UNIFIED IDEOGRAPH + {0xD0BD, 0x85AA}, //13729 #CJK UNIFIED IDEOGRAPH + {0xD0BE, 0x82AF}, //13730 #CJK UNIFIED IDEOGRAPH + {0xD0BF, 0x950C}, //13731 #CJK UNIFIED IDEOGRAPH + {0xD0C0, 0x6B23}, //13732 #CJK UNIFIED IDEOGRAPH + {0xD0C1, 0x8F9B}, //13733 #CJK UNIFIED IDEOGRAPH + {0xD0C2, 0x65B0}, //13734 #CJK UNIFIED IDEOGRAPH + {0xD0C3, 0x5FFB}, //13735 #CJK UNIFIED IDEOGRAPH + {0xD0C4, 0x5FC3}, //13736 #CJK UNIFIED IDEOGRAPH + {0xD0C5, 0x4FE1}, //13737 #CJK UNIFIED IDEOGRAPH + {0xD0C6, 0x8845}, //13738 #CJK UNIFIED IDEOGRAPH + {0xD0C7, 0x661F}, //13739 #CJK UNIFIED IDEOGRAPH + {0xD0C8, 0x8165}, //13740 #CJK UNIFIED IDEOGRAPH + {0xD0C9, 0x7329}, //13741 #CJK UNIFIED IDEOGRAPH + {0xD0CA, 0x60FA}, //13742 #CJK UNIFIED IDEOGRAPH + {0xD0CB, 0x5174}, //13743 #CJK UNIFIED IDEOGRAPH + {0xD0CC, 0x5211}, //13744 #CJK UNIFIED IDEOGRAPH + {0xD0CD, 0x578B}, //13745 #CJK UNIFIED IDEOGRAPH + {0xD0CE, 0x5F62}, //13746 #CJK UNIFIED IDEOGRAPH + {0xD0CF, 0x90A2}, //13747 #CJK UNIFIED IDEOGRAPH + {0xD0D0, 0x884C}, //13748 #CJK UNIFIED IDEOGRAPH + {0xD0D1, 0x9192}, //13749 #CJK UNIFIED IDEOGRAPH + {0xD0D2, 0x5E78}, //13750 #CJK UNIFIED IDEOGRAPH + {0xD0D3, 0x674F}, //13751 #CJK UNIFIED IDEOGRAPH + {0xD0D4, 0x6027}, //13752 #CJK UNIFIED IDEOGRAPH + {0xD0D5, 0x59D3}, //13753 #CJK UNIFIED IDEOGRAPH + {0xD0D6, 0x5144}, //13754 #CJK UNIFIED IDEOGRAPH + {0xD0D7, 0x51F6}, //13755 #CJK UNIFIED IDEOGRAPH + {0xD0D8, 0x80F8}, //13756 #CJK UNIFIED IDEOGRAPH + {0xD0D9, 0x5308}, //13757 #CJK UNIFIED IDEOGRAPH + {0xD0DA, 0x6C79}, //13758 #CJK UNIFIED IDEOGRAPH + {0xD0DB, 0x96C4}, //13759 #CJK UNIFIED IDEOGRAPH + {0xD0DC, 0x718A}, //13760 #CJK UNIFIED IDEOGRAPH + {0xD0DD, 0x4F11}, //13761 #CJK UNIFIED IDEOGRAPH + {0xD0DE, 0x4FEE}, //13762 #CJK UNIFIED IDEOGRAPH + {0xD0DF, 0x7F9E}, //13763 #CJK UNIFIED IDEOGRAPH + {0xD0E0, 0x673D}, //13764 #CJK UNIFIED IDEOGRAPH + {0xD0E1, 0x55C5}, //13765 #CJK UNIFIED IDEOGRAPH + {0xD0E2, 0x9508}, //13766 #CJK UNIFIED IDEOGRAPH + {0xD0E3, 0x79C0}, //13767 #CJK UNIFIED IDEOGRAPH + {0xD0E4, 0x8896}, //13768 #CJK UNIFIED IDEOGRAPH + {0xD0E5, 0x7EE3}, //13769 #CJK UNIFIED IDEOGRAPH + {0xD0E6, 0x589F}, //13770 #CJK UNIFIED IDEOGRAPH + {0xD0E7, 0x620C}, //13771 #CJK UNIFIED IDEOGRAPH + {0xD0E8, 0x9700}, //13772 #CJK UNIFIED IDEOGRAPH + {0xD0E9, 0x865A}, //13773 #CJK UNIFIED IDEOGRAPH + {0xD0EA, 0x5618}, //13774 #CJK UNIFIED IDEOGRAPH + {0xD0EB, 0x987B}, //13775 #CJK UNIFIED IDEOGRAPH + {0xD0EC, 0x5F90}, //13776 #CJK UNIFIED IDEOGRAPH + {0xD0ED, 0x8BB8}, //13777 #CJK UNIFIED IDEOGRAPH + {0xD0EE, 0x84C4}, //13778 #CJK UNIFIED IDEOGRAPH + {0xD0EF, 0x9157}, //13779 #CJK UNIFIED IDEOGRAPH + {0xD0F0, 0x53D9}, //13780 #CJK UNIFIED IDEOGRAPH + {0xD0F1, 0x65ED}, //13781 #CJK UNIFIED IDEOGRAPH + {0xD0F2, 0x5E8F}, //13782 #CJK UNIFIED IDEOGRAPH + {0xD0F3, 0x755C}, //13783 #CJK UNIFIED IDEOGRAPH + {0xD0F4, 0x6064}, //13784 #CJK UNIFIED IDEOGRAPH + {0xD0F5, 0x7D6E}, //13785 #CJK UNIFIED IDEOGRAPH + {0xD0F6, 0x5A7F}, //13786 #CJK UNIFIED IDEOGRAPH + {0xD0F7, 0x7EEA}, //13787 #CJK UNIFIED IDEOGRAPH + {0xD0F8, 0x7EED}, //13788 #CJK UNIFIED IDEOGRAPH + {0xD0F9, 0x8F69}, //13789 #CJK UNIFIED IDEOGRAPH + {0xD0FA, 0x55A7}, //13790 #CJK UNIFIED IDEOGRAPH + {0xD0FB, 0x5BA3}, //13791 #CJK UNIFIED IDEOGRAPH + {0xD0FC, 0x60AC}, //13792 #CJK UNIFIED IDEOGRAPH + {0xD0FD, 0x65CB}, //13793 #CJK UNIFIED IDEOGRAPH + {0xD0FE, 0x7384}, //13794 #CJK UNIFIED IDEOGRAPH + {0xD140, 0x88AC}, //13795 #CJK UNIFIED IDEOGRAPH + {0xD141, 0x88AE}, //13796 #CJK UNIFIED IDEOGRAPH + {0xD142, 0x88AF}, //13797 #CJK UNIFIED IDEOGRAPH + {0xD143, 0x88B0}, //13798 #CJK UNIFIED IDEOGRAPH + {0xD144, 0x88B2}, //13799 #CJK UNIFIED IDEOGRAPH + {0xD145, 0x88B3}, //13800 #CJK UNIFIED IDEOGRAPH + {0xD146, 0x88B4}, //13801 #CJK UNIFIED IDEOGRAPH + {0xD147, 0x88B5}, //13802 #CJK UNIFIED IDEOGRAPH + {0xD148, 0x88B6}, //13803 #CJK UNIFIED IDEOGRAPH + {0xD149, 0x88B8}, //13804 #CJK UNIFIED IDEOGRAPH + {0xD14A, 0x88B9}, //13805 #CJK UNIFIED IDEOGRAPH + {0xD14B, 0x88BA}, //13806 #CJK UNIFIED IDEOGRAPH + {0xD14C, 0x88BB}, //13807 #CJK UNIFIED IDEOGRAPH + {0xD14D, 0x88BD}, //13808 #CJK UNIFIED IDEOGRAPH + {0xD14E, 0x88BE}, //13809 #CJK UNIFIED IDEOGRAPH + {0xD14F, 0x88BF}, //13810 #CJK UNIFIED IDEOGRAPH + {0xD150, 0x88C0}, //13811 #CJK UNIFIED IDEOGRAPH + {0xD151, 0x88C3}, //13812 #CJK UNIFIED IDEOGRAPH + {0xD152, 0x88C4}, //13813 #CJK UNIFIED IDEOGRAPH + {0xD153, 0x88C7}, //13814 #CJK UNIFIED IDEOGRAPH + {0xD154, 0x88C8}, //13815 #CJK UNIFIED IDEOGRAPH + {0xD155, 0x88CA}, //13816 #CJK UNIFIED IDEOGRAPH + {0xD156, 0x88CB}, //13817 #CJK UNIFIED IDEOGRAPH + {0xD157, 0x88CC}, //13818 #CJK UNIFIED IDEOGRAPH + {0xD158, 0x88CD}, //13819 #CJK UNIFIED IDEOGRAPH + {0xD159, 0x88CF}, //13820 #CJK UNIFIED IDEOGRAPH + {0xD15A, 0x88D0}, //13821 #CJK UNIFIED IDEOGRAPH + {0xD15B, 0x88D1}, //13822 #CJK UNIFIED IDEOGRAPH + {0xD15C, 0x88D3}, //13823 #CJK UNIFIED IDEOGRAPH + {0xD15D, 0x88D6}, //13824 #CJK UNIFIED IDEOGRAPH + {0xD15E, 0x88D7}, //13825 #CJK UNIFIED IDEOGRAPH + {0xD15F, 0x88DA}, //13826 #CJK UNIFIED IDEOGRAPH + {0xD160, 0x88DB}, //13827 #CJK UNIFIED IDEOGRAPH + {0xD161, 0x88DC}, //13828 #CJK UNIFIED IDEOGRAPH + {0xD162, 0x88DD}, //13829 #CJK UNIFIED IDEOGRAPH + {0xD163, 0x88DE}, //13830 #CJK UNIFIED IDEOGRAPH + {0xD164, 0x88E0}, //13831 #CJK UNIFIED IDEOGRAPH + {0xD165, 0x88E1}, //13832 #CJK UNIFIED IDEOGRAPH + {0xD166, 0x88E6}, //13833 #CJK UNIFIED IDEOGRAPH + {0xD167, 0x88E7}, //13834 #CJK UNIFIED IDEOGRAPH + {0xD168, 0x88E9}, //13835 #CJK UNIFIED IDEOGRAPH + {0xD169, 0x88EA}, //13836 #CJK UNIFIED IDEOGRAPH + {0xD16A, 0x88EB}, //13837 #CJK UNIFIED IDEOGRAPH + {0xD16B, 0x88EC}, //13838 #CJK UNIFIED IDEOGRAPH + {0xD16C, 0x88ED}, //13839 #CJK UNIFIED IDEOGRAPH + {0xD16D, 0x88EE}, //13840 #CJK UNIFIED IDEOGRAPH + {0xD16E, 0x88EF}, //13841 #CJK UNIFIED IDEOGRAPH + {0xD16F, 0x88F2}, //13842 #CJK UNIFIED IDEOGRAPH + {0xD170, 0x88F5}, //13843 #CJK UNIFIED IDEOGRAPH + {0xD171, 0x88F6}, //13844 #CJK UNIFIED IDEOGRAPH + {0xD172, 0x88F7}, //13845 #CJK UNIFIED IDEOGRAPH + {0xD173, 0x88FA}, //13846 #CJK UNIFIED IDEOGRAPH + {0xD174, 0x88FB}, //13847 #CJK UNIFIED IDEOGRAPH + {0xD175, 0x88FD}, //13848 #CJK UNIFIED IDEOGRAPH + {0xD176, 0x88FF}, //13849 #CJK UNIFIED IDEOGRAPH + {0xD177, 0x8900}, //13850 #CJK UNIFIED IDEOGRAPH + {0xD178, 0x8901}, //13851 #CJK UNIFIED IDEOGRAPH + {0xD179, 0x8903}, //13852 #CJK UNIFIED IDEOGRAPH + {0xD17A, 0x8904}, //13853 #CJK UNIFIED IDEOGRAPH + {0xD17B, 0x8905}, //13854 #CJK UNIFIED IDEOGRAPH + {0xD17C, 0x8906}, //13855 #CJK UNIFIED IDEOGRAPH + {0xD17D, 0x8907}, //13856 #CJK UNIFIED IDEOGRAPH + {0xD17E, 0x8908}, //13857 #CJK UNIFIED IDEOGRAPH + {0xD180, 0x8909}, //13858 #CJK UNIFIED IDEOGRAPH + {0xD181, 0x890B}, //13859 #CJK UNIFIED IDEOGRAPH + {0xD182, 0x890C}, //13860 #CJK UNIFIED IDEOGRAPH + {0xD183, 0x890D}, //13861 #CJK UNIFIED IDEOGRAPH + {0xD184, 0x890E}, //13862 #CJK UNIFIED IDEOGRAPH + {0xD185, 0x890F}, //13863 #CJK UNIFIED IDEOGRAPH + {0xD186, 0x8911}, //13864 #CJK UNIFIED IDEOGRAPH + {0xD187, 0x8914}, //13865 #CJK UNIFIED IDEOGRAPH + {0xD188, 0x8915}, //13866 #CJK UNIFIED IDEOGRAPH + {0xD189, 0x8916}, //13867 #CJK UNIFIED IDEOGRAPH + {0xD18A, 0x8917}, //13868 #CJK UNIFIED IDEOGRAPH + {0xD18B, 0x8918}, //13869 #CJK UNIFIED IDEOGRAPH + {0xD18C, 0x891C}, //13870 #CJK UNIFIED IDEOGRAPH + {0xD18D, 0x891D}, //13871 #CJK UNIFIED IDEOGRAPH + {0xD18E, 0x891E}, //13872 #CJK UNIFIED IDEOGRAPH + {0xD18F, 0x891F}, //13873 #CJK UNIFIED IDEOGRAPH + {0xD190, 0x8920}, //13874 #CJK UNIFIED IDEOGRAPH + {0xD191, 0x8922}, //13875 #CJK UNIFIED IDEOGRAPH + {0xD192, 0x8923}, //13876 #CJK UNIFIED IDEOGRAPH + {0xD193, 0x8924}, //13877 #CJK UNIFIED IDEOGRAPH + {0xD194, 0x8926}, //13878 #CJK UNIFIED IDEOGRAPH + {0xD195, 0x8927}, //13879 #CJK UNIFIED IDEOGRAPH + {0xD196, 0x8928}, //13880 #CJK UNIFIED IDEOGRAPH + {0xD197, 0x8929}, //13881 #CJK UNIFIED IDEOGRAPH + {0xD198, 0x892C}, //13882 #CJK UNIFIED IDEOGRAPH + {0xD199, 0x892D}, //13883 #CJK UNIFIED IDEOGRAPH + {0xD19A, 0x892E}, //13884 #CJK UNIFIED IDEOGRAPH + {0xD19B, 0x892F}, //13885 #CJK UNIFIED IDEOGRAPH + {0xD19C, 0x8931}, //13886 #CJK UNIFIED IDEOGRAPH + {0xD19D, 0x8932}, //13887 #CJK UNIFIED IDEOGRAPH + {0xD19E, 0x8933}, //13888 #CJK UNIFIED IDEOGRAPH + {0xD19F, 0x8935}, //13889 #CJK UNIFIED IDEOGRAPH + {0xD1A0, 0x8937}, //13890 #CJK UNIFIED IDEOGRAPH + {0xD1A1, 0x9009}, //13891 #CJK UNIFIED IDEOGRAPH + {0xD1A2, 0x7663}, //13892 #CJK UNIFIED IDEOGRAPH + {0xD1A3, 0x7729}, //13893 #CJK UNIFIED IDEOGRAPH + {0xD1A4, 0x7EDA}, //13894 #CJK UNIFIED IDEOGRAPH + {0xD1A5, 0x9774}, //13895 #CJK UNIFIED IDEOGRAPH + {0xD1A6, 0x859B}, //13896 #CJK UNIFIED IDEOGRAPH + {0xD1A7, 0x5B66}, //13897 #CJK UNIFIED IDEOGRAPH + {0xD1A8, 0x7A74}, //13898 #CJK UNIFIED IDEOGRAPH + {0xD1A9, 0x96EA}, //13899 #CJK UNIFIED IDEOGRAPH + {0xD1AA, 0x8840}, //13900 #CJK UNIFIED IDEOGRAPH + {0xD1AB, 0x52CB}, //13901 #CJK UNIFIED IDEOGRAPH + {0xD1AC, 0x718F}, //13902 #CJK UNIFIED IDEOGRAPH + {0xD1AD, 0x5FAA}, //13903 #CJK UNIFIED IDEOGRAPH + {0xD1AE, 0x65EC}, //13904 #CJK UNIFIED IDEOGRAPH + {0xD1AF, 0x8BE2}, //13905 #CJK UNIFIED IDEOGRAPH + {0xD1B0, 0x5BFB}, //13906 #CJK UNIFIED IDEOGRAPH + {0xD1B1, 0x9A6F}, //13907 #CJK UNIFIED IDEOGRAPH + {0xD1B2, 0x5DE1}, //13908 #CJK UNIFIED IDEOGRAPH + {0xD1B3, 0x6B89}, //13909 #CJK UNIFIED IDEOGRAPH + {0xD1B4, 0x6C5B}, //13910 #CJK UNIFIED IDEOGRAPH + {0xD1B5, 0x8BAD}, //13911 #CJK UNIFIED IDEOGRAPH + {0xD1B6, 0x8BAF}, //13912 #CJK UNIFIED IDEOGRAPH + {0xD1B7, 0x900A}, //13913 #CJK UNIFIED IDEOGRAPH + {0xD1B8, 0x8FC5}, //13914 #CJK UNIFIED IDEOGRAPH + {0xD1B9, 0x538B}, //13915 #CJK UNIFIED IDEOGRAPH + {0xD1BA, 0x62BC}, //13916 #CJK UNIFIED IDEOGRAPH + {0xD1BB, 0x9E26}, //13917 #CJK UNIFIED IDEOGRAPH + {0xD1BC, 0x9E2D}, //13918 #CJK UNIFIED IDEOGRAPH + {0xD1BD, 0x5440}, //13919 #CJK UNIFIED IDEOGRAPH + {0xD1BE, 0x4E2B}, //13920 #CJK UNIFIED IDEOGRAPH + {0xD1BF, 0x82BD}, //13921 #CJK UNIFIED IDEOGRAPH + {0xD1C0, 0x7259}, //13922 #CJK UNIFIED IDEOGRAPH + {0xD1C1, 0x869C}, //13923 #CJK UNIFIED IDEOGRAPH + {0xD1C2, 0x5D16}, //13924 #CJK UNIFIED IDEOGRAPH + {0xD1C3, 0x8859}, //13925 #CJK UNIFIED IDEOGRAPH + {0xD1C4, 0x6DAF}, //13926 #CJK UNIFIED IDEOGRAPH + {0xD1C5, 0x96C5}, //13927 #CJK UNIFIED IDEOGRAPH + {0xD1C6, 0x54D1}, //13928 #CJK UNIFIED IDEOGRAPH + {0xD1C7, 0x4E9A}, //13929 #CJK UNIFIED IDEOGRAPH + {0xD1C8, 0x8BB6}, //13930 #CJK UNIFIED IDEOGRAPH + {0xD1C9, 0x7109}, //13931 #CJK UNIFIED IDEOGRAPH + {0xD1CA, 0x54BD}, //13932 #CJK UNIFIED IDEOGRAPH + {0xD1CB, 0x9609}, //13933 #CJK UNIFIED IDEOGRAPH + {0xD1CC, 0x70DF}, //13934 #CJK UNIFIED IDEOGRAPH + {0xD1CD, 0x6DF9}, //13935 #CJK UNIFIED IDEOGRAPH + {0xD1CE, 0x76D0}, //13936 #CJK UNIFIED IDEOGRAPH + {0xD1CF, 0x4E25}, //13937 #CJK UNIFIED IDEOGRAPH + {0xD1D0, 0x7814}, //13938 #CJK UNIFIED IDEOGRAPH + {0xD1D1, 0x8712}, //13939 #CJK UNIFIED IDEOGRAPH + {0xD1D2, 0x5CA9}, //13940 #CJK UNIFIED IDEOGRAPH + {0xD1D3, 0x5EF6}, //13941 #CJK UNIFIED IDEOGRAPH + {0xD1D4, 0x8A00}, //13942 #CJK UNIFIED IDEOGRAPH + {0xD1D5, 0x989C}, //13943 #CJK UNIFIED IDEOGRAPH + {0xD1D6, 0x960E}, //13944 #CJK UNIFIED IDEOGRAPH + {0xD1D7, 0x708E}, //13945 #CJK UNIFIED IDEOGRAPH + {0xD1D8, 0x6CBF}, //13946 #CJK UNIFIED IDEOGRAPH + {0xD1D9, 0x5944}, //13947 #CJK UNIFIED IDEOGRAPH + {0xD1DA, 0x63A9}, //13948 #CJK UNIFIED IDEOGRAPH + {0xD1DB, 0x773C}, //13949 #CJK UNIFIED IDEOGRAPH + {0xD1DC, 0x884D}, //13950 #CJK UNIFIED IDEOGRAPH + {0xD1DD, 0x6F14}, //13951 #CJK UNIFIED IDEOGRAPH + {0xD1DE, 0x8273}, //13952 #CJK UNIFIED IDEOGRAPH + {0xD1DF, 0x5830}, //13953 #CJK UNIFIED IDEOGRAPH + {0xD1E0, 0x71D5}, //13954 #CJK UNIFIED IDEOGRAPH + {0xD1E1, 0x538C}, //13955 #CJK UNIFIED IDEOGRAPH + {0xD1E2, 0x781A}, //13956 #CJK UNIFIED IDEOGRAPH + {0xD1E3, 0x96C1}, //13957 #CJK UNIFIED IDEOGRAPH + {0xD1E4, 0x5501}, //13958 #CJK UNIFIED IDEOGRAPH + {0xD1E5, 0x5F66}, //13959 #CJK UNIFIED IDEOGRAPH + {0xD1E6, 0x7130}, //13960 #CJK UNIFIED IDEOGRAPH + {0xD1E7, 0x5BB4}, //13961 #CJK UNIFIED IDEOGRAPH + {0xD1E8, 0x8C1A}, //13962 #CJK UNIFIED IDEOGRAPH + {0xD1E9, 0x9A8C}, //13963 #CJK UNIFIED IDEOGRAPH + {0xD1EA, 0x6B83}, //13964 #CJK UNIFIED IDEOGRAPH + {0xD1EB, 0x592E}, //13965 #CJK UNIFIED IDEOGRAPH + {0xD1EC, 0x9E2F}, //13966 #CJK UNIFIED IDEOGRAPH + {0xD1ED, 0x79E7}, //13967 #CJK UNIFIED IDEOGRAPH + {0xD1EE, 0x6768}, //13968 #CJK UNIFIED IDEOGRAPH + {0xD1EF, 0x626C}, //13969 #CJK UNIFIED IDEOGRAPH + {0xD1F0, 0x4F6F}, //13970 #CJK UNIFIED IDEOGRAPH + {0xD1F1, 0x75A1}, //13971 #CJK UNIFIED IDEOGRAPH + {0xD1F2, 0x7F8A}, //13972 #CJK UNIFIED IDEOGRAPH + {0xD1F3, 0x6D0B}, //13973 #CJK UNIFIED IDEOGRAPH + {0xD1F4, 0x9633}, //13974 #CJK UNIFIED IDEOGRAPH + {0xD1F5, 0x6C27}, //13975 #CJK UNIFIED IDEOGRAPH + {0xD1F6, 0x4EF0}, //13976 #CJK UNIFIED IDEOGRAPH + {0xD1F7, 0x75D2}, //13977 #CJK UNIFIED IDEOGRAPH + {0xD1F8, 0x517B}, //13978 #CJK UNIFIED IDEOGRAPH + {0xD1F9, 0x6837}, //13979 #CJK UNIFIED IDEOGRAPH + {0xD1FA, 0x6F3E}, //13980 #CJK UNIFIED IDEOGRAPH + {0xD1FB, 0x9080}, //13981 #CJK UNIFIED IDEOGRAPH + {0xD1FC, 0x8170}, //13982 #CJK UNIFIED IDEOGRAPH + {0xD1FD, 0x5996}, //13983 #CJK UNIFIED IDEOGRAPH + {0xD1FE, 0x7476}, //13984 #CJK UNIFIED IDEOGRAPH + {0xD240, 0x8938}, //13985 #CJK UNIFIED IDEOGRAPH + {0xD241, 0x8939}, //13986 #CJK UNIFIED IDEOGRAPH + {0xD242, 0x893A}, //13987 #CJK UNIFIED IDEOGRAPH + {0xD243, 0x893B}, //13988 #CJK UNIFIED IDEOGRAPH + {0xD244, 0x893C}, //13989 #CJK UNIFIED IDEOGRAPH + {0xD245, 0x893D}, //13990 #CJK UNIFIED IDEOGRAPH + {0xD246, 0x893E}, //13991 #CJK UNIFIED IDEOGRAPH + {0xD247, 0x893F}, //13992 #CJK UNIFIED IDEOGRAPH + {0xD248, 0x8940}, //13993 #CJK UNIFIED IDEOGRAPH + {0xD249, 0x8942}, //13994 #CJK UNIFIED IDEOGRAPH + {0xD24A, 0x8943}, //13995 #CJK UNIFIED IDEOGRAPH + {0xD24B, 0x8945}, //13996 #CJK UNIFIED IDEOGRAPH + {0xD24C, 0x8946}, //13997 #CJK UNIFIED IDEOGRAPH + {0xD24D, 0x8947}, //13998 #CJK UNIFIED IDEOGRAPH + {0xD24E, 0x8948}, //13999 #CJK UNIFIED IDEOGRAPH + {0xD24F, 0x8949}, //14000 #CJK UNIFIED IDEOGRAPH + {0xD250, 0x894A}, //14001 #CJK UNIFIED IDEOGRAPH + {0xD251, 0x894B}, //14002 #CJK UNIFIED IDEOGRAPH + {0xD252, 0x894C}, //14003 #CJK UNIFIED IDEOGRAPH + {0xD253, 0x894D}, //14004 #CJK UNIFIED IDEOGRAPH + {0xD254, 0x894E}, //14005 #CJK UNIFIED IDEOGRAPH + {0xD255, 0x894F}, //14006 #CJK UNIFIED IDEOGRAPH + {0xD256, 0x8950}, //14007 #CJK UNIFIED IDEOGRAPH + {0xD257, 0x8951}, //14008 #CJK UNIFIED IDEOGRAPH + {0xD258, 0x8952}, //14009 #CJK UNIFIED IDEOGRAPH + {0xD259, 0x8953}, //14010 #CJK UNIFIED IDEOGRAPH + {0xD25A, 0x8954}, //14011 #CJK UNIFIED IDEOGRAPH + {0xD25B, 0x8955}, //14012 #CJK UNIFIED IDEOGRAPH + {0xD25C, 0x8956}, //14013 #CJK UNIFIED IDEOGRAPH + {0xD25D, 0x8957}, //14014 #CJK UNIFIED IDEOGRAPH + {0xD25E, 0x8958}, //14015 #CJK UNIFIED IDEOGRAPH + {0xD25F, 0x8959}, //14016 #CJK UNIFIED IDEOGRAPH + {0xD260, 0x895A}, //14017 #CJK UNIFIED IDEOGRAPH + {0xD261, 0x895B}, //14018 #CJK UNIFIED IDEOGRAPH + {0xD262, 0x895C}, //14019 #CJK UNIFIED IDEOGRAPH + {0xD263, 0x895D}, //14020 #CJK UNIFIED IDEOGRAPH + {0xD264, 0x8960}, //14021 #CJK UNIFIED IDEOGRAPH + {0xD265, 0x8961}, //14022 #CJK UNIFIED IDEOGRAPH + {0xD266, 0x8962}, //14023 #CJK UNIFIED IDEOGRAPH + {0xD267, 0x8963}, //14024 #CJK UNIFIED IDEOGRAPH + {0xD268, 0x8964}, //14025 #CJK UNIFIED IDEOGRAPH + {0xD269, 0x8965}, //14026 #CJK UNIFIED IDEOGRAPH + {0xD26A, 0x8967}, //14027 #CJK UNIFIED IDEOGRAPH + {0xD26B, 0x8968}, //14028 #CJK UNIFIED IDEOGRAPH + {0xD26C, 0x8969}, //14029 #CJK UNIFIED IDEOGRAPH + {0xD26D, 0x896A}, //14030 #CJK UNIFIED IDEOGRAPH + {0xD26E, 0x896B}, //14031 #CJK UNIFIED IDEOGRAPH + {0xD26F, 0x896C}, //14032 #CJK UNIFIED IDEOGRAPH + {0xD270, 0x896D}, //14033 #CJK UNIFIED IDEOGRAPH + {0xD271, 0x896E}, //14034 #CJK UNIFIED IDEOGRAPH + {0xD272, 0x896F}, //14035 #CJK UNIFIED IDEOGRAPH + {0xD273, 0x8970}, //14036 #CJK UNIFIED IDEOGRAPH + {0xD274, 0x8971}, //14037 #CJK UNIFIED IDEOGRAPH + {0xD275, 0x8972}, //14038 #CJK UNIFIED IDEOGRAPH + {0xD276, 0x8973}, //14039 #CJK UNIFIED IDEOGRAPH + {0xD277, 0x8974}, //14040 #CJK UNIFIED IDEOGRAPH + {0xD278, 0x8975}, //14041 #CJK UNIFIED IDEOGRAPH + {0xD279, 0x8976}, //14042 #CJK UNIFIED IDEOGRAPH + {0xD27A, 0x8977}, //14043 #CJK UNIFIED IDEOGRAPH + {0xD27B, 0x8978}, //14044 #CJK UNIFIED IDEOGRAPH + {0xD27C, 0x8979}, //14045 #CJK UNIFIED IDEOGRAPH + {0xD27D, 0x897A}, //14046 #CJK UNIFIED IDEOGRAPH + {0xD27E, 0x897C}, //14047 #CJK UNIFIED IDEOGRAPH + {0xD280, 0x897D}, //14048 #CJK UNIFIED IDEOGRAPH + {0xD281, 0x897E}, //14049 #CJK UNIFIED IDEOGRAPH + {0xD282, 0x8980}, //14050 #CJK UNIFIED IDEOGRAPH + {0xD283, 0x8982}, //14051 #CJK UNIFIED IDEOGRAPH + {0xD284, 0x8984}, //14052 #CJK UNIFIED IDEOGRAPH + {0xD285, 0x8985}, //14053 #CJK UNIFIED IDEOGRAPH + {0xD286, 0x8987}, //14054 #CJK UNIFIED IDEOGRAPH + {0xD287, 0x8988}, //14055 #CJK UNIFIED IDEOGRAPH + {0xD288, 0x8989}, //14056 #CJK UNIFIED IDEOGRAPH + {0xD289, 0x898A}, //14057 #CJK UNIFIED IDEOGRAPH + {0xD28A, 0x898B}, //14058 #CJK UNIFIED IDEOGRAPH + {0xD28B, 0x898C}, //14059 #CJK UNIFIED IDEOGRAPH + {0xD28C, 0x898D}, //14060 #CJK UNIFIED IDEOGRAPH + {0xD28D, 0x898E}, //14061 #CJK UNIFIED IDEOGRAPH + {0xD28E, 0x898F}, //14062 #CJK UNIFIED IDEOGRAPH + {0xD28F, 0x8990}, //14063 #CJK UNIFIED IDEOGRAPH + {0xD290, 0x8991}, //14064 #CJK UNIFIED IDEOGRAPH + {0xD291, 0x8992}, //14065 #CJK UNIFIED IDEOGRAPH + {0xD292, 0x8993}, //14066 #CJK UNIFIED IDEOGRAPH + {0xD293, 0x8994}, //14067 #CJK UNIFIED IDEOGRAPH + {0xD294, 0x8995}, //14068 #CJK UNIFIED IDEOGRAPH + {0xD295, 0x8996}, //14069 #CJK UNIFIED IDEOGRAPH + {0xD296, 0x8997}, //14070 #CJK UNIFIED IDEOGRAPH + {0xD297, 0x8998}, //14071 #CJK UNIFIED IDEOGRAPH + {0xD298, 0x8999}, //14072 #CJK UNIFIED IDEOGRAPH + {0xD299, 0x899A}, //14073 #CJK UNIFIED IDEOGRAPH + {0xD29A, 0x899B}, //14074 #CJK UNIFIED IDEOGRAPH + {0xD29B, 0x899C}, //14075 #CJK UNIFIED IDEOGRAPH + {0xD29C, 0x899D}, //14076 #CJK UNIFIED IDEOGRAPH + {0xD29D, 0x899E}, //14077 #CJK UNIFIED IDEOGRAPH + {0xD29E, 0x899F}, //14078 #CJK UNIFIED IDEOGRAPH + {0xD29F, 0x89A0}, //14079 #CJK UNIFIED IDEOGRAPH + {0xD2A0, 0x89A1}, //14080 #CJK UNIFIED IDEOGRAPH + {0xD2A1, 0x6447}, //14081 #CJK UNIFIED IDEOGRAPH + {0xD2A2, 0x5C27}, //14082 #CJK UNIFIED IDEOGRAPH + {0xD2A3, 0x9065}, //14083 #CJK UNIFIED IDEOGRAPH + {0xD2A4, 0x7A91}, //14084 #CJK UNIFIED IDEOGRAPH + {0xD2A5, 0x8C23}, //14085 #CJK UNIFIED IDEOGRAPH + {0xD2A6, 0x59DA}, //14086 #CJK UNIFIED IDEOGRAPH + {0xD2A7, 0x54AC}, //14087 #CJK UNIFIED IDEOGRAPH + {0xD2A8, 0x8200}, //14088 #CJK UNIFIED IDEOGRAPH + {0xD2A9, 0x836F}, //14089 #CJK UNIFIED IDEOGRAPH + {0xD2AA, 0x8981}, //14090 #CJK UNIFIED IDEOGRAPH + {0xD2AB, 0x8000}, //14091 #CJK UNIFIED IDEOGRAPH + {0xD2AC, 0x6930}, //14092 #CJK UNIFIED IDEOGRAPH + {0xD2AD, 0x564E}, //14093 #CJK UNIFIED IDEOGRAPH + {0xD2AE, 0x8036}, //14094 #CJK UNIFIED IDEOGRAPH + {0xD2AF, 0x7237}, //14095 #CJK UNIFIED IDEOGRAPH + {0xD2B0, 0x91CE}, //14096 #CJK UNIFIED IDEOGRAPH + {0xD2B1, 0x51B6}, //14097 #CJK UNIFIED IDEOGRAPH + {0xD2B2, 0x4E5F}, //14098 #CJK UNIFIED IDEOGRAPH + {0xD2B3, 0x9875}, //14099 #CJK UNIFIED IDEOGRAPH + {0xD2B4, 0x6396}, //14100 #CJK UNIFIED IDEOGRAPH + {0xD2B5, 0x4E1A}, //14101 #CJK UNIFIED IDEOGRAPH + {0xD2B6, 0x53F6}, //14102 #CJK UNIFIED IDEOGRAPH + {0xD2B7, 0x66F3}, //14103 #CJK UNIFIED IDEOGRAPH + {0xD2B8, 0x814B}, //14104 #CJK UNIFIED IDEOGRAPH + {0xD2B9, 0x591C}, //14105 #CJK UNIFIED IDEOGRAPH + {0xD2BA, 0x6DB2}, //14106 #CJK UNIFIED IDEOGRAPH + {0xD2BB, 0x4E00}, //14107 #CJK UNIFIED IDEOGRAPH + {0xD2BC, 0x58F9}, //14108 #CJK UNIFIED IDEOGRAPH + {0xD2BD, 0x533B}, //14109 #CJK UNIFIED IDEOGRAPH + {0xD2BE, 0x63D6}, //14110 #CJK UNIFIED IDEOGRAPH + {0xD2BF, 0x94F1}, //14111 #CJK UNIFIED IDEOGRAPH + {0xD2C0, 0x4F9D}, //14112 #CJK UNIFIED IDEOGRAPH + {0xD2C1, 0x4F0A}, //14113 #CJK UNIFIED IDEOGRAPH + {0xD2C2, 0x8863}, //14114 #CJK UNIFIED IDEOGRAPH + {0xD2C3, 0x9890}, //14115 #CJK UNIFIED IDEOGRAPH + {0xD2C4, 0x5937}, //14116 #CJK UNIFIED IDEOGRAPH + {0xD2C5, 0x9057}, //14117 #CJK UNIFIED IDEOGRAPH + {0xD2C6, 0x79FB}, //14118 #CJK UNIFIED IDEOGRAPH + {0xD2C7, 0x4EEA}, //14119 #CJK UNIFIED IDEOGRAPH + {0xD2C8, 0x80F0}, //14120 #CJK UNIFIED IDEOGRAPH + {0xD2C9, 0x7591}, //14121 #CJK UNIFIED IDEOGRAPH + {0xD2CA, 0x6C82}, //14122 #CJK UNIFIED IDEOGRAPH + {0xD2CB, 0x5B9C}, //14123 #CJK UNIFIED IDEOGRAPH + {0xD2CC, 0x59E8}, //14124 #CJK UNIFIED IDEOGRAPH + {0xD2CD, 0x5F5D}, //14125 #CJK UNIFIED IDEOGRAPH + {0xD2CE, 0x6905}, //14126 #CJK UNIFIED IDEOGRAPH + {0xD2CF, 0x8681}, //14127 #CJK UNIFIED IDEOGRAPH + {0xD2D0, 0x501A}, //14128 #CJK UNIFIED IDEOGRAPH + {0xD2D1, 0x5DF2}, //14129 #CJK UNIFIED IDEOGRAPH + {0xD2D2, 0x4E59}, //14130 #CJK UNIFIED IDEOGRAPH + {0xD2D3, 0x77E3}, //14131 #CJK UNIFIED IDEOGRAPH + {0xD2D4, 0x4EE5}, //14132 #CJK UNIFIED IDEOGRAPH + {0xD2D5, 0x827A}, //14133 #CJK UNIFIED IDEOGRAPH + {0xD2D6, 0x6291}, //14134 #CJK UNIFIED IDEOGRAPH + {0xD2D7, 0x6613}, //14135 #CJK UNIFIED IDEOGRAPH + {0xD2D8, 0x9091}, //14136 #CJK UNIFIED IDEOGRAPH + {0xD2D9, 0x5C79}, //14137 #CJK UNIFIED IDEOGRAPH + {0xD2DA, 0x4EBF}, //14138 #CJK UNIFIED IDEOGRAPH + {0xD2DB, 0x5F79}, //14139 #CJK UNIFIED IDEOGRAPH + {0xD2DC, 0x81C6}, //14140 #CJK UNIFIED IDEOGRAPH + {0xD2DD, 0x9038}, //14141 #CJK UNIFIED IDEOGRAPH + {0xD2DE, 0x8084}, //14142 #CJK UNIFIED IDEOGRAPH + {0xD2DF, 0x75AB}, //14143 #CJK UNIFIED IDEOGRAPH + {0xD2E0, 0x4EA6}, //14144 #CJK UNIFIED IDEOGRAPH + {0xD2E1, 0x88D4}, //14145 #CJK UNIFIED IDEOGRAPH + {0xD2E2, 0x610F}, //14146 #CJK UNIFIED IDEOGRAPH + {0xD2E3, 0x6BC5}, //14147 #CJK UNIFIED IDEOGRAPH + {0xD2E4, 0x5FC6}, //14148 #CJK UNIFIED IDEOGRAPH + {0xD2E5, 0x4E49}, //14149 #CJK UNIFIED IDEOGRAPH + {0xD2E6, 0x76CA}, //14150 #CJK UNIFIED IDEOGRAPH + {0xD2E7, 0x6EA2}, //14151 #CJK UNIFIED IDEOGRAPH + {0xD2E8, 0x8BE3}, //14152 #CJK UNIFIED IDEOGRAPH + {0xD2E9, 0x8BAE}, //14153 #CJK UNIFIED IDEOGRAPH + {0xD2EA, 0x8C0A}, //14154 #CJK UNIFIED IDEOGRAPH + {0xD2EB, 0x8BD1}, //14155 #CJK UNIFIED IDEOGRAPH + {0xD2EC, 0x5F02}, //14156 #CJK UNIFIED IDEOGRAPH + {0xD2ED, 0x7FFC}, //14157 #CJK UNIFIED IDEOGRAPH + {0xD2EE, 0x7FCC}, //14158 #CJK UNIFIED IDEOGRAPH + {0xD2EF, 0x7ECE}, //14159 #CJK UNIFIED IDEOGRAPH + {0xD2F0, 0x8335}, //14160 #CJK UNIFIED IDEOGRAPH + {0xD2F1, 0x836B}, //14161 #CJK UNIFIED IDEOGRAPH + {0xD2F2, 0x56E0}, //14162 #CJK UNIFIED IDEOGRAPH + {0xD2F3, 0x6BB7}, //14163 #CJK UNIFIED IDEOGRAPH + {0xD2F4, 0x97F3}, //14164 #CJK UNIFIED IDEOGRAPH + {0xD2F5, 0x9634}, //14165 #CJK UNIFIED IDEOGRAPH + {0xD2F6, 0x59FB}, //14166 #CJK UNIFIED IDEOGRAPH + {0xD2F7, 0x541F}, //14167 #CJK UNIFIED IDEOGRAPH + {0xD2F8, 0x94F6}, //14168 #CJK UNIFIED IDEOGRAPH + {0xD2F9, 0x6DEB}, //14169 #CJK UNIFIED IDEOGRAPH + {0xD2FA, 0x5BC5}, //14170 #CJK UNIFIED IDEOGRAPH + {0xD2FB, 0x996E}, //14171 #CJK UNIFIED IDEOGRAPH + {0xD2FC, 0x5C39}, //14172 #CJK UNIFIED IDEOGRAPH + {0xD2FD, 0x5F15}, //14173 #CJK UNIFIED IDEOGRAPH + {0xD2FE, 0x9690}, //14174 #CJK UNIFIED IDEOGRAPH + {0xD340, 0x89A2}, //14175 #CJK UNIFIED IDEOGRAPH + {0xD341, 0x89A3}, //14176 #CJK UNIFIED IDEOGRAPH + {0xD342, 0x89A4}, //14177 #CJK UNIFIED IDEOGRAPH + {0xD343, 0x89A5}, //14178 #CJK UNIFIED IDEOGRAPH + {0xD344, 0x89A6}, //14179 #CJK UNIFIED IDEOGRAPH + {0xD345, 0x89A7}, //14180 #CJK UNIFIED IDEOGRAPH + {0xD346, 0x89A8}, //14181 #CJK UNIFIED IDEOGRAPH + {0xD347, 0x89A9}, //14182 #CJK UNIFIED IDEOGRAPH + {0xD348, 0x89AA}, //14183 #CJK UNIFIED IDEOGRAPH + {0xD349, 0x89AB}, //14184 #CJK UNIFIED IDEOGRAPH + {0xD34A, 0x89AC}, //14185 #CJK UNIFIED IDEOGRAPH + {0xD34B, 0x89AD}, //14186 #CJK UNIFIED IDEOGRAPH + {0xD34C, 0x89AE}, //14187 #CJK UNIFIED IDEOGRAPH + {0xD34D, 0x89AF}, //14188 #CJK UNIFIED IDEOGRAPH + {0xD34E, 0x89B0}, //14189 #CJK UNIFIED IDEOGRAPH + {0xD34F, 0x89B1}, //14190 #CJK UNIFIED IDEOGRAPH + {0xD350, 0x89B2}, //14191 #CJK UNIFIED IDEOGRAPH + {0xD351, 0x89B3}, //14192 #CJK UNIFIED IDEOGRAPH + {0xD352, 0x89B4}, //14193 #CJK UNIFIED IDEOGRAPH + {0xD353, 0x89B5}, //14194 #CJK UNIFIED IDEOGRAPH + {0xD354, 0x89B6}, //14195 #CJK UNIFIED IDEOGRAPH + {0xD355, 0x89B7}, //14196 #CJK UNIFIED IDEOGRAPH + {0xD356, 0x89B8}, //14197 #CJK UNIFIED IDEOGRAPH + {0xD357, 0x89B9}, //14198 #CJK UNIFIED IDEOGRAPH + {0xD358, 0x89BA}, //14199 #CJK UNIFIED IDEOGRAPH + {0xD359, 0x89BB}, //14200 #CJK UNIFIED IDEOGRAPH + {0xD35A, 0x89BC}, //14201 #CJK UNIFIED IDEOGRAPH + {0xD35B, 0x89BD}, //14202 #CJK UNIFIED IDEOGRAPH + {0xD35C, 0x89BE}, //14203 #CJK UNIFIED IDEOGRAPH + {0xD35D, 0x89BF}, //14204 #CJK UNIFIED IDEOGRAPH + {0xD35E, 0x89C0}, //14205 #CJK UNIFIED IDEOGRAPH + {0xD35F, 0x89C3}, //14206 #CJK UNIFIED IDEOGRAPH + {0xD360, 0x89CD}, //14207 #CJK UNIFIED IDEOGRAPH + {0xD361, 0x89D3}, //14208 #CJK UNIFIED IDEOGRAPH + {0xD362, 0x89D4}, //14209 #CJK UNIFIED IDEOGRAPH + {0xD363, 0x89D5}, //14210 #CJK UNIFIED IDEOGRAPH + {0xD364, 0x89D7}, //14211 #CJK UNIFIED IDEOGRAPH + {0xD365, 0x89D8}, //14212 #CJK UNIFIED IDEOGRAPH + {0xD366, 0x89D9}, //14213 #CJK UNIFIED IDEOGRAPH + {0xD367, 0x89DB}, //14214 #CJK UNIFIED IDEOGRAPH + {0xD368, 0x89DD}, //14215 #CJK UNIFIED IDEOGRAPH + {0xD369, 0x89DF}, //14216 #CJK UNIFIED IDEOGRAPH + {0xD36A, 0x89E0}, //14217 #CJK UNIFIED IDEOGRAPH + {0xD36B, 0x89E1}, //14218 #CJK UNIFIED IDEOGRAPH + {0xD36C, 0x89E2}, //14219 #CJK UNIFIED IDEOGRAPH + {0xD36D, 0x89E4}, //14220 #CJK UNIFIED IDEOGRAPH + {0xD36E, 0x89E7}, //14221 #CJK UNIFIED IDEOGRAPH + {0xD36F, 0x89E8}, //14222 #CJK UNIFIED IDEOGRAPH + {0xD370, 0x89E9}, //14223 #CJK UNIFIED IDEOGRAPH + {0xD371, 0x89EA}, //14224 #CJK UNIFIED IDEOGRAPH + {0xD372, 0x89EC}, //14225 #CJK UNIFIED IDEOGRAPH + {0xD373, 0x89ED}, //14226 #CJK UNIFIED IDEOGRAPH + {0xD374, 0x89EE}, //14227 #CJK UNIFIED IDEOGRAPH + {0xD375, 0x89F0}, //14228 #CJK UNIFIED IDEOGRAPH + {0xD376, 0x89F1}, //14229 #CJK UNIFIED IDEOGRAPH + {0xD377, 0x89F2}, //14230 #CJK UNIFIED IDEOGRAPH + {0xD378, 0x89F4}, //14231 #CJK UNIFIED IDEOGRAPH + {0xD379, 0x89F5}, //14232 #CJK UNIFIED IDEOGRAPH + {0xD37A, 0x89F6}, //14233 #CJK UNIFIED IDEOGRAPH + {0xD37B, 0x89F7}, //14234 #CJK UNIFIED IDEOGRAPH + {0xD37C, 0x89F8}, //14235 #CJK UNIFIED IDEOGRAPH + {0xD37D, 0x89F9}, //14236 #CJK UNIFIED IDEOGRAPH + {0xD37E, 0x89FA}, //14237 #CJK UNIFIED IDEOGRAPH + {0xD380, 0x89FB}, //14238 #CJK UNIFIED IDEOGRAPH + {0xD381, 0x89FC}, //14239 #CJK UNIFIED IDEOGRAPH + {0xD382, 0x89FD}, //14240 #CJK UNIFIED IDEOGRAPH + {0xD383, 0x89FE}, //14241 #CJK UNIFIED IDEOGRAPH + {0xD384, 0x89FF}, //14242 #CJK UNIFIED IDEOGRAPH + {0xD385, 0x8A01}, //14243 #CJK UNIFIED IDEOGRAPH + {0xD386, 0x8A02}, //14244 #CJK UNIFIED IDEOGRAPH + {0xD387, 0x8A03}, //14245 #CJK UNIFIED IDEOGRAPH + {0xD388, 0x8A04}, //14246 #CJK UNIFIED IDEOGRAPH + {0xD389, 0x8A05}, //14247 #CJK UNIFIED IDEOGRAPH + {0xD38A, 0x8A06}, //14248 #CJK UNIFIED IDEOGRAPH + {0xD38B, 0x8A08}, //14249 #CJK UNIFIED IDEOGRAPH + {0xD38C, 0x8A09}, //14250 #CJK UNIFIED IDEOGRAPH + {0xD38D, 0x8A0A}, //14251 #CJK UNIFIED IDEOGRAPH + {0xD38E, 0x8A0B}, //14252 #CJK UNIFIED IDEOGRAPH + {0xD38F, 0x8A0C}, //14253 #CJK UNIFIED IDEOGRAPH + {0xD390, 0x8A0D}, //14254 #CJK UNIFIED IDEOGRAPH + {0xD391, 0x8A0E}, //14255 #CJK UNIFIED IDEOGRAPH + {0xD392, 0x8A0F}, //14256 #CJK UNIFIED IDEOGRAPH + {0xD393, 0x8A10}, //14257 #CJK UNIFIED IDEOGRAPH + {0xD394, 0x8A11}, //14258 #CJK UNIFIED IDEOGRAPH + {0xD395, 0x8A12}, //14259 #CJK UNIFIED IDEOGRAPH + {0xD396, 0x8A13}, //14260 #CJK UNIFIED IDEOGRAPH + {0xD397, 0x8A14}, //14261 #CJK UNIFIED IDEOGRAPH + {0xD398, 0x8A15}, //14262 #CJK UNIFIED IDEOGRAPH + {0xD399, 0x8A16}, //14263 #CJK UNIFIED IDEOGRAPH + {0xD39A, 0x8A17}, //14264 #CJK UNIFIED IDEOGRAPH + {0xD39B, 0x8A18}, //14265 #CJK UNIFIED IDEOGRAPH + {0xD39C, 0x8A19}, //14266 #CJK UNIFIED IDEOGRAPH + {0xD39D, 0x8A1A}, //14267 #CJK UNIFIED IDEOGRAPH + {0xD39E, 0x8A1B}, //14268 #CJK UNIFIED IDEOGRAPH + {0xD39F, 0x8A1C}, //14269 #CJK UNIFIED IDEOGRAPH + {0xD3A0, 0x8A1D}, //14270 #CJK UNIFIED IDEOGRAPH + {0xD3A1, 0x5370}, //14271 #CJK UNIFIED IDEOGRAPH + {0xD3A2, 0x82F1}, //14272 #CJK UNIFIED IDEOGRAPH + {0xD3A3, 0x6A31}, //14273 #CJK UNIFIED IDEOGRAPH + {0xD3A4, 0x5A74}, //14274 #CJK UNIFIED IDEOGRAPH + {0xD3A5, 0x9E70}, //14275 #CJK UNIFIED IDEOGRAPH + {0xD3A6, 0x5E94}, //14276 #CJK UNIFIED IDEOGRAPH + {0xD3A7, 0x7F28}, //14277 #CJK UNIFIED IDEOGRAPH + {0xD3A8, 0x83B9}, //14278 #CJK UNIFIED IDEOGRAPH + {0xD3A9, 0x8424}, //14279 #CJK UNIFIED IDEOGRAPH + {0xD3AA, 0x8425}, //14280 #CJK UNIFIED IDEOGRAPH + {0xD3AB, 0x8367}, //14281 #CJK UNIFIED IDEOGRAPH + {0xD3AC, 0x8747}, //14282 #CJK UNIFIED IDEOGRAPH + {0xD3AD, 0x8FCE}, //14283 #CJK UNIFIED IDEOGRAPH + {0xD3AE, 0x8D62}, //14284 #CJK UNIFIED IDEOGRAPH + {0xD3AF, 0x76C8}, //14285 #CJK UNIFIED IDEOGRAPH + {0xD3B0, 0x5F71}, //14286 #CJK UNIFIED IDEOGRAPH + {0xD3B1, 0x9896}, //14287 #CJK UNIFIED IDEOGRAPH + {0xD3B2, 0x786C}, //14288 #CJK UNIFIED IDEOGRAPH + {0xD3B3, 0x6620}, //14289 #CJK UNIFIED IDEOGRAPH + {0xD3B4, 0x54DF}, //14290 #CJK UNIFIED IDEOGRAPH + {0xD3B5, 0x62E5}, //14291 #CJK UNIFIED IDEOGRAPH + {0xD3B6, 0x4F63}, //14292 #CJK UNIFIED IDEOGRAPH + {0xD3B7, 0x81C3}, //14293 #CJK UNIFIED IDEOGRAPH + {0xD3B8, 0x75C8}, //14294 #CJK UNIFIED IDEOGRAPH + {0xD3B9, 0x5EB8}, //14295 #CJK UNIFIED IDEOGRAPH + {0xD3BA, 0x96CD}, //14296 #CJK UNIFIED IDEOGRAPH + {0xD3BB, 0x8E0A}, //14297 #CJK UNIFIED IDEOGRAPH + {0xD3BC, 0x86F9}, //14298 #CJK UNIFIED IDEOGRAPH + {0xD3BD, 0x548F}, //14299 #CJK UNIFIED IDEOGRAPH + {0xD3BE, 0x6CF3}, //14300 #CJK UNIFIED IDEOGRAPH + {0xD3BF, 0x6D8C}, //14301 #CJK UNIFIED IDEOGRAPH + {0xD3C0, 0x6C38}, //14302 #CJK UNIFIED IDEOGRAPH + {0xD3C1, 0x607F}, //14303 #CJK UNIFIED IDEOGRAPH + {0xD3C2, 0x52C7}, //14304 #CJK UNIFIED IDEOGRAPH + {0xD3C3, 0x7528}, //14305 #CJK UNIFIED IDEOGRAPH + {0xD3C4, 0x5E7D}, //14306 #CJK UNIFIED IDEOGRAPH + {0xD3C5, 0x4F18}, //14307 #CJK UNIFIED IDEOGRAPH + {0xD3C6, 0x60A0}, //14308 #CJK UNIFIED IDEOGRAPH + {0xD3C7, 0x5FE7}, //14309 #CJK UNIFIED IDEOGRAPH + {0xD3C8, 0x5C24}, //14310 #CJK UNIFIED IDEOGRAPH + {0xD3C9, 0x7531}, //14311 #CJK UNIFIED IDEOGRAPH + {0xD3CA, 0x90AE}, //14312 #CJK UNIFIED IDEOGRAPH + {0xD3CB, 0x94C0}, //14313 #CJK UNIFIED IDEOGRAPH + {0xD3CC, 0x72B9}, //14314 #CJK UNIFIED IDEOGRAPH + {0xD3CD, 0x6CB9}, //14315 #CJK UNIFIED IDEOGRAPH + {0xD3CE, 0x6E38}, //14316 #CJK UNIFIED IDEOGRAPH + {0xD3CF, 0x9149}, //14317 #CJK UNIFIED IDEOGRAPH + {0xD3D0, 0x6709}, //14318 #CJK UNIFIED IDEOGRAPH + {0xD3D1, 0x53CB}, //14319 #CJK UNIFIED IDEOGRAPH + {0xD3D2, 0x53F3}, //14320 #CJK UNIFIED IDEOGRAPH + {0xD3D3, 0x4F51}, //14321 #CJK UNIFIED IDEOGRAPH + {0xD3D4, 0x91C9}, //14322 #CJK UNIFIED IDEOGRAPH + {0xD3D5, 0x8BF1}, //14323 #CJK UNIFIED IDEOGRAPH + {0xD3D6, 0x53C8}, //14324 #CJK UNIFIED IDEOGRAPH + {0xD3D7, 0x5E7C}, //14325 #CJK UNIFIED IDEOGRAPH + {0xD3D8, 0x8FC2}, //14326 #CJK UNIFIED IDEOGRAPH + {0xD3D9, 0x6DE4}, //14327 #CJK UNIFIED IDEOGRAPH + {0xD3DA, 0x4E8E}, //14328 #CJK UNIFIED IDEOGRAPH + {0xD3DB, 0x76C2}, //14329 #CJK UNIFIED IDEOGRAPH + {0xD3DC, 0x6986}, //14330 #CJK UNIFIED IDEOGRAPH + {0xD3DD, 0x865E}, //14331 #CJK UNIFIED IDEOGRAPH + {0xD3DE, 0x611A}, //14332 #CJK UNIFIED IDEOGRAPH + {0xD3DF, 0x8206}, //14333 #CJK UNIFIED IDEOGRAPH + {0xD3E0, 0x4F59}, //14334 #CJK UNIFIED IDEOGRAPH + {0xD3E1, 0x4FDE}, //14335 #CJK UNIFIED IDEOGRAPH + {0xD3E2, 0x903E}, //14336 #CJK UNIFIED IDEOGRAPH + {0xD3E3, 0x9C7C}, //14337 #CJK UNIFIED IDEOGRAPH + {0xD3E4, 0x6109}, //14338 #CJK UNIFIED IDEOGRAPH + {0xD3E5, 0x6E1D}, //14339 #CJK UNIFIED IDEOGRAPH + {0xD3E6, 0x6E14}, //14340 #CJK UNIFIED IDEOGRAPH + {0xD3E7, 0x9685}, //14341 #CJK UNIFIED IDEOGRAPH + {0xD3E8, 0x4E88}, //14342 #CJK UNIFIED IDEOGRAPH + {0xD3E9, 0x5A31}, //14343 #CJK UNIFIED IDEOGRAPH + {0xD3EA, 0x96E8}, //14344 #CJK UNIFIED IDEOGRAPH + {0xD3EB, 0x4E0E}, //14345 #CJK UNIFIED IDEOGRAPH + {0xD3EC, 0x5C7F}, //14346 #CJK UNIFIED IDEOGRAPH + {0xD3ED, 0x79B9}, //14347 #CJK UNIFIED IDEOGRAPH + {0xD3EE, 0x5B87}, //14348 #CJK UNIFIED IDEOGRAPH + {0xD3EF, 0x8BED}, //14349 #CJK UNIFIED IDEOGRAPH + {0xD3F0, 0x7FBD}, //14350 #CJK UNIFIED IDEOGRAPH + {0xD3F1, 0x7389}, //14351 #CJK UNIFIED IDEOGRAPH + {0xD3F2, 0x57DF}, //14352 #CJK UNIFIED IDEOGRAPH + {0xD3F3, 0x828B}, //14353 #CJK UNIFIED IDEOGRAPH + {0xD3F4, 0x90C1}, //14354 #CJK UNIFIED IDEOGRAPH + {0xD3F5, 0x5401}, //14355 #CJK UNIFIED IDEOGRAPH + {0xD3F6, 0x9047}, //14356 #CJK UNIFIED IDEOGRAPH + {0xD3F7, 0x55BB}, //14357 #CJK UNIFIED IDEOGRAPH + {0xD3F8, 0x5CEA}, //14358 #CJK UNIFIED IDEOGRAPH + {0xD3F9, 0x5FA1}, //14359 #CJK UNIFIED IDEOGRAPH + {0xD3FA, 0x6108}, //14360 #CJK UNIFIED IDEOGRAPH + {0xD3FB, 0x6B32}, //14361 #CJK UNIFIED IDEOGRAPH + {0xD3FC, 0x72F1}, //14362 #CJK UNIFIED IDEOGRAPH + {0xD3FD, 0x80B2}, //14363 #CJK UNIFIED IDEOGRAPH + {0xD3FE, 0x8A89}, //14364 #CJK UNIFIED IDEOGRAPH + {0xD440, 0x8A1E}, //14365 #CJK UNIFIED IDEOGRAPH + {0xD441, 0x8A1F}, //14366 #CJK UNIFIED IDEOGRAPH + {0xD442, 0x8A20}, //14367 #CJK UNIFIED IDEOGRAPH + {0xD443, 0x8A21}, //14368 #CJK UNIFIED IDEOGRAPH + {0xD444, 0x8A22}, //14369 #CJK UNIFIED IDEOGRAPH + {0xD445, 0x8A23}, //14370 #CJK UNIFIED IDEOGRAPH + {0xD446, 0x8A24}, //14371 #CJK UNIFIED IDEOGRAPH + {0xD447, 0x8A25}, //14372 #CJK UNIFIED IDEOGRAPH + {0xD448, 0x8A26}, //14373 #CJK UNIFIED IDEOGRAPH + {0xD449, 0x8A27}, //14374 #CJK UNIFIED IDEOGRAPH + {0xD44A, 0x8A28}, //14375 #CJK UNIFIED IDEOGRAPH + {0xD44B, 0x8A29}, //14376 #CJK UNIFIED IDEOGRAPH + {0xD44C, 0x8A2A}, //14377 #CJK UNIFIED IDEOGRAPH + {0xD44D, 0x8A2B}, //14378 #CJK UNIFIED IDEOGRAPH + {0xD44E, 0x8A2C}, //14379 #CJK UNIFIED IDEOGRAPH + {0xD44F, 0x8A2D}, //14380 #CJK UNIFIED IDEOGRAPH + {0xD450, 0x8A2E}, //14381 #CJK UNIFIED IDEOGRAPH + {0xD451, 0x8A2F}, //14382 #CJK UNIFIED IDEOGRAPH + {0xD452, 0x8A30}, //14383 #CJK UNIFIED IDEOGRAPH + {0xD453, 0x8A31}, //14384 #CJK UNIFIED IDEOGRAPH + {0xD454, 0x8A32}, //14385 #CJK UNIFIED IDEOGRAPH + {0xD455, 0x8A33}, //14386 #CJK UNIFIED IDEOGRAPH + {0xD456, 0x8A34}, //14387 #CJK UNIFIED IDEOGRAPH + {0xD457, 0x8A35}, //14388 #CJK UNIFIED IDEOGRAPH + {0xD458, 0x8A36}, //14389 #CJK UNIFIED IDEOGRAPH + {0xD459, 0x8A37}, //14390 #CJK UNIFIED IDEOGRAPH + {0xD45A, 0x8A38}, //14391 #CJK UNIFIED IDEOGRAPH + {0xD45B, 0x8A39}, //14392 #CJK UNIFIED IDEOGRAPH + {0xD45C, 0x8A3A}, //14393 #CJK UNIFIED IDEOGRAPH + {0xD45D, 0x8A3B}, //14394 #CJK UNIFIED IDEOGRAPH + {0xD45E, 0x8A3C}, //14395 #CJK UNIFIED IDEOGRAPH + {0xD45F, 0x8A3D}, //14396 #CJK UNIFIED IDEOGRAPH + {0xD460, 0x8A3F}, //14397 #CJK UNIFIED IDEOGRAPH + {0xD461, 0x8A40}, //14398 #CJK UNIFIED IDEOGRAPH + {0xD462, 0x8A41}, //14399 #CJK UNIFIED IDEOGRAPH + {0xD463, 0x8A42}, //14400 #CJK UNIFIED IDEOGRAPH + {0xD464, 0x8A43}, //14401 #CJK UNIFIED IDEOGRAPH + {0xD465, 0x8A44}, //14402 #CJK UNIFIED IDEOGRAPH + {0xD466, 0x8A45}, //14403 #CJK UNIFIED IDEOGRAPH + {0xD467, 0x8A46}, //14404 #CJK UNIFIED IDEOGRAPH + {0xD468, 0x8A47}, //14405 #CJK UNIFIED IDEOGRAPH + {0xD469, 0x8A49}, //14406 #CJK UNIFIED IDEOGRAPH + {0xD46A, 0x8A4A}, //14407 #CJK UNIFIED IDEOGRAPH + {0xD46B, 0x8A4B}, //14408 #CJK UNIFIED IDEOGRAPH + {0xD46C, 0x8A4C}, //14409 #CJK UNIFIED IDEOGRAPH + {0xD46D, 0x8A4D}, //14410 #CJK UNIFIED IDEOGRAPH + {0xD46E, 0x8A4E}, //14411 #CJK UNIFIED IDEOGRAPH + {0xD46F, 0x8A4F}, //14412 #CJK UNIFIED IDEOGRAPH + {0xD470, 0x8A50}, //14413 #CJK UNIFIED IDEOGRAPH + {0xD471, 0x8A51}, //14414 #CJK UNIFIED IDEOGRAPH + {0xD472, 0x8A52}, //14415 #CJK UNIFIED IDEOGRAPH + {0xD473, 0x8A53}, //14416 #CJK UNIFIED IDEOGRAPH + {0xD474, 0x8A54}, //14417 #CJK UNIFIED IDEOGRAPH + {0xD475, 0x8A55}, //14418 #CJK UNIFIED IDEOGRAPH + {0xD476, 0x8A56}, //14419 #CJK UNIFIED IDEOGRAPH + {0xD477, 0x8A57}, //14420 #CJK UNIFIED IDEOGRAPH + {0xD478, 0x8A58}, //14421 #CJK UNIFIED IDEOGRAPH + {0xD479, 0x8A59}, //14422 #CJK UNIFIED IDEOGRAPH + {0xD47A, 0x8A5A}, //14423 #CJK UNIFIED IDEOGRAPH + {0xD47B, 0x8A5B}, //14424 #CJK UNIFIED IDEOGRAPH + {0xD47C, 0x8A5C}, //14425 #CJK UNIFIED IDEOGRAPH + {0xD47D, 0x8A5D}, //14426 #CJK UNIFIED IDEOGRAPH + {0xD47E, 0x8A5E}, //14427 #CJK UNIFIED IDEOGRAPH + {0xD480, 0x8A5F}, //14428 #CJK UNIFIED IDEOGRAPH + {0xD481, 0x8A60}, //14429 #CJK UNIFIED IDEOGRAPH + {0xD482, 0x8A61}, //14430 #CJK UNIFIED IDEOGRAPH + {0xD483, 0x8A62}, //14431 #CJK UNIFIED IDEOGRAPH + {0xD484, 0x8A63}, //14432 #CJK UNIFIED IDEOGRAPH + {0xD485, 0x8A64}, //14433 #CJK UNIFIED IDEOGRAPH + {0xD486, 0x8A65}, //14434 #CJK UNIFIED IDEOGRAPH + {0xD487, 0x8A66}, //14435 #CJK UNIFIED IDEOGRAPH + {0xD488, 0x8A67}, //14436 #CJK UNIFIED IDEOGRAPH + {0xD489, 0x8A68}, //14437 #CJK UNIFIED IDEOGRAPH + {0xD48A, 0x8A69}, //14438 #CJK UNIFIED IDEOGRAPH + {0xD48B, 0x8A6A}, //14439 #CJK UNIFIED IDEOGRAPH + {0xD48C, 0x8A6B}, //14440 #CJK UNIFIED IDEOGRAPH + {0xD48D, 0x8A6C}, //14441 #CJK UNIFIED IDEOGRAPH + {0xD48E, 0x8A6D}, //14442 #CJK UNIFIED IDEOGRAPH + {0xD48F, 0x8A6E}, //14443 #CJK UNIFIED IDEOGRAPH + {0xD490, 0x8A6F}, //14444 #CJK UNIFIED IDEOGRAPH + {0xD491, 0x8A70}, //14445 #CJK UNIFIED IDEOGRAPH + {0xD492, 0x8A71}, //14446 #CJK UNIFIED IDEOGRAPH + {0xD493, 0x8A72}, //14447 #CJK UNIFIED IDEOGRAPH + {0xD494, 0x8A73}, //14448 #CJK UNIFIED IDEOGRAPH + {0xD495, 0x8A74}, //14449 #CJK UNIFIED IDEOGRAPH + {0xD496, 0x8A75}, //14450 #CJK UNIFIED IDEOGRAPH + {0xD497, 0x8A76}, //14451 #CJK UNIFIED IDEOGRAPH + {0xD498, 0x8A77}, //14452 #CJK UNIFIED IDEOGRAPH + {0xD499, 0x8A78}, //14453 #CJK UNIFIED IDEOGRAPH + {0xD49A, 0x8A7A}, //14454 #CJK UNIFIED IDEOGRAPH + {0xD49B, 0x8A7B}, //14455 #CJK UNIFIED IDEOGRAPH + {0xD49C, 0x8A7C}, //14456 #CJK UNIFIED IDEOGRAPH + {0xD49D, 0x8A7D}, //14457 #CJK UNIFIED IDEOGRAPH + {0xD49E, 0x8A7E}, //14458 #CJK UNIFIED IDEOGRAPH + {0xD49F, 0x8A7F}, //14459 #CJK UNIFIED IDEOGRAPH + {0xD4A0, 0x8A80}, //14460 #CJK UNIFIED IDEOGRAPH + {0xD4A1, 0x6D74}, //14461 #CJK UNIFIED IDEOGRAPH + {0xD4A2, 0x5BD3}, //14462 #CJK UNIFIED IDEOGRAPH + {0xD4A3, 0x88D5}, //14463 #CJK UNIFIED IDEOGRAPH + {0xD4A4, 0x9884}, //14464 #CJK UNIFIED IDEOGRAPH + {0xD4A5, 0x8C6B}, //14465 #CJK UNIFIED IDEOGRAPH + {0xD4A6, 0x9A6D}, //14466 #CJK UNIFIED IDEOGRAPH + {0xD4A7, 0x9E33}, //14467 #CJK UNIFIED IDEOGRAPH + {0xD4A8, 0x6E0A}, //14468 #CJK UNIFIED IDEOGRAPH + {0xD4A9, 0x51A4}, //14469 #CJK UNIFIED IDEOGRAPH + {0xD4AA, 0x5143}, //14470 #CJK UNIFIED IDEOGRAPH + {0xD4AB, 0x57A3}, //14471 #CJK UNIFIED IDEOGRAPH + {0xD4AC, 0x8881}, //14472 #CJK UNIFIED IDEOGRAPH + {0xD4AD, 0x539F}, //14473 #CJK UNIFIED IDEOGRAPH + {0xD4AE, 0x63F4}, //14474 #CJK UNIFIED IDEOGRAPH + {0xD4AF, 0x8F95}, //14475 #CJK UNIFIED IDEOGRAPH + {0xD4B0, 0x56ED}, //14476 #CJK UNIFIED IDEOGRAPH + {0xD4B1, 0x5458}, //14477 #CJK UNIFIED IDEOGRAPH + {0xD4B2, 0x5706}, //14478 #CJK UNIFIED IDEOGRAPH + {0xD4B3, 0x733F}, //14479 #CJK UNIFIED IDEOGRAPH + {0xD4B4, 0x6E90}, //14480 #CJK UNIFIED IDEOGRAPH + {0xD4B5, 0x7F18}, //14481 #CJK UNIFIED IDEOGRAPH + {0xD4B6, 0x8FDC}, //14482 #CJK UNIFIED IDEOGRAPH + {0xD4B7, 0x82D1}, //14483 #CJK UNIFIED IDEOGRAPH + {0xD4B8, 0x613F}, //14484 #CJK UNIFIED IDEOGRAPH + {0xD4B9, 0x6028}, //14485 #CJK UNIFIED IDEOGRAPH + {0xD4BA, 0x9662}, //14486 #CJK UNIFIED IDEOGRAPH + {0xD4BB, 0x66F0}, //14487 #CJK UNIFIED IDEOGRAPH + {0xD4BC, 0x7EA6}, //14488 #CJK UNIFIED IDEOGRAPH + {0xD4BD, 0x8D8A}, //14489 #CJK UNIFIED IDEOGRAPH + {0xD4BE, 0x8DC3}, //14490 #CJK UNIFIED IDEOGRAPH + {0xD4BF, 0x94A5}, //14491 #CJK UNIFIED IDEOGRAPH + {0xD4C0, 0x5CB3}, //14492 #CJK UNIFIED IDEOGRAPH + {0xD4C1, 0x7CA4}, //14493 #CJK UNIFIED IDEOGRAPH + {0xD4C2, 0x6708}, //14494 #CJK UNIFIED IDEOGRAPH + {0xD4C3, 0x60A6}, //14495 #CJK UNIFIED IDEOGRAPH + {0xD4C4, 0x9605}, //14496 #CJK UNIFIED IDEOGRAPH + {0xD4C5, 0x8018}, //14497 #CJK UNIFIED IDEOGRAPH + {0xD4C6, 0x4E91}, //14498 #CJK UNIFIED IDEOGRAPH + {0xD4C7, 0x90E7}, //14499 #CJK UNIFIED IDEOGRAPH + {0xD4C8, 0x5300}, //14500 #CJK UNIFIED IDEOGRAPH + {0xD4C9, 0x9668}, //14501 #CJK UNIFIED IDEOGRAPH + {0xD4CA, 0x5141}, //14502 #CJK UNIFIED IDEOGRAPH + {0xD4CB, 0x8FD0}, //14503 #CJK UNIFIED IDEOGRAPH + {0xD4CC, 0x8574}, //14504 #CJK UNIFIED IDEOGRAPH + {0xD4CD, 0x915D}, //14505 #CJK UNIFIED IDEOGRAPH + {0xD4CE, 0x6655}, //14506 #CJK UNIFIED IDEOGRAPH + {0xD4CF, 0x97F5}, //14507 #CJK UNIFIED IDEOGRAPH + {0xD4D0, 0x5B55}, //14508 #CJK UNIFIED IDEOGRAPH + {0xD4D1, 0x531D}, //14509 #CJK UNIFIED IDEOGRAPH + {0xD4D2, 0x7838}, //14510 #CJK UNIFIED IDEOGRAPH + {0xD4D3, 0x6742}, //14511 #CJK UNIFIED IDEOGRAPH + {0xD4D4, 0x683D}, //14512 #CJK UNIFIED IDEOGRAPH + {0xD4D5, 0x54C9}, //14513 #CJK UNIFIED IDEOGRAPH + {0xD4D6, 0x707E}, //14514 #CJK UNIFIED IDEOGRAPH + {0xD4D7, 0x5BB0}, //14515 #CJK UNIFIED IDEOGRAPH + {0xD4D8, 0x8F7D}, //14516 #CJK UNIFIED IDEOGRAPH + {0xD4D9, 0x518D}, //14517 #CJK UNIFIED IDEOGRAPH + {0xD4DA, 0x5728}, //14518 #CJK UNIFIED IDEOGRAPH + {0xD4DB, 0x54B1}, //14519 #CJK UNIFIED IDEOGRAPH + {0xD4DC, 0x6512}, //14520 #CJK UNIFIED IDEOGRAPH + {0xD4DD, 0x6682}, //14521 #CJK UNIFIED IDEOGRAPH + {0xD4DE, 0x8D5E}, //14522 #CJK UNIFIED IDEOGRAPH + {0xD4DF, 0x8D43}, //14523 #CJK UNIFIED IDEOGRAPH + {0xD4E0, 0x810F}, //14524 #CJK UNIFIED IDEOGRAPH + {0xD4E1, 0x846C}, //14525 #CJK UNIFIED IDEOGRAPH + {0xD4E2, 0x906D}, //14526 #CJK UNIFIED IDEOGRAPH + {0xD4E3, 0x7CDF}, //14527 #CJK UNIFIED IDEOGRAPH + {0xD4E4, 0x51FF}, //14528 #CJK UNIFIED IDEOGRAPH + {0xD4E5, 0x85FB}, //14529 #CJK UNIFIED IDEOGRAPH + {0xD4E6, 0x67A3}, //14530 #CJK UNIFIED IDEOGRAPH + {0xD4E7, 0x65E9}, //14531 #CJK UNIFIED IDEOGRAPH + {0xD4E8, 0x6FA1}, //14532 #CJK UNIFIED IDEOGRAPH + {0xD4E9, 0x86A4}, //14533 #CJK UNIFIED IDEOGRAPH + {0xD4EA, 0x8E81}, //14534 #CJK UNIFIED IDEOGRAPH + {0xD4EB, 0x566A}, //14535 #CJK UNIFIED IDEOGRAPH + {0xD4EC, 0x9020}, //14536 #CJK UNIFIED IDEOGRAPH + {0xD4ED, 0x7682}, //14537 #CJK UNIFIED IDEOGRAPH + {0xD4EE, 0x7076}, //14538 #CJK UNIFIED IDEOGRAPH + {0xD4EF, 0x71E5}, //14539 #CJK UNIFIED IDEOGRAPH + {0xD4F0, 0x8D23}, //14540 #CJK UNIFIED IDEOGRAPH + {0xD4F1, 0x62E9}, //14541 #CJK UNIFIED IDEOGRAPH + {0xD4F2, 0x5219}, //14542 #CJK UNIFIED IDEOGRAPH + {0xD4F3, 0x6CFD}, //14543 #CJK UNIFIED IDEOGRAPH + {0xD4F4, 0x8D3C}, //14544 #CJK UNIFIED IDEOGRAPH + {0xD4F5, 0x600E}, //14545 #CJK UNIFIED IDEOGRAPH + {0xD4F6, 0x589E}, //14546 #CJK UNIFIED IDEOGRAPH + {0xD4F7, 0x618E}, //14547 #CJK UNIFIED IDEOGRAPH + {0xD4F8, 0x66FE}, //14548 #CJK UNIFIED IDEOGRAPH + {0xD4F9, 0x8D60}, //14549 #CJK UNIFIED IDEOGRAPH + {0xD4FA, 0x624E}, //14550 #CJK UNIFIED IDEOGRAPH + {0xD4FB, 0x55B3}, //14551 #CJK UNIFIED IDEOGRAPH + {0xD4FC, 0x6E23}, //14552 #CJK UNIFIED IDEOGRAPH + {0xD4FD, 0x672D}, //14553 #CJK UNIFIED IDEOGRAPH + {0xD4FE, 0x8F67}, //14554 #CJK UNIFIED IDEOGRAPH + {0xD540, 0x8A81}, //14555 #CJK UNIFIED IDEOGRAPH + {0xD541, 0x8A82}, //14556 #CJK UNIFIED IDEOGRAPH + {0xD542, 0x8A83}, //14557 #CJK UNIFIED IDEOGRAPH + {0xD543, 0x8A84}, //14558 #CJK UNIFIED IDEOGRAPH + {0xD544, 0x8A85}, //14559 #CJK UNIFIED IDEOGRAPH + {0xD545, 0x8A86}, //14560 #CJK UNIFIED IDEOGRAPH + {0xD546, 0x8A87}, //14561 #CJK UNIFIED IDEOGRAPH + {0xD547, 0x8A88}, //14562 #CJK UNIFIED IDEOGRAPH + {0xD548, 0x8A8B}, //14563 #CJK UNIFIED IDEOGRAPH + {0xD549, 0x8A8C}, //14564 #CJK UNIFIED IDEOGRAPH + {0xD54A, 0x8A8D}, //14565 #CJK UNIFIED IDEOGRAPH + {0xD54B, 0x8A8E}, //14566 #CJK UNIFIED IDEOGRAPH + {0xD54C, 0x8A8F}, //14567 #CJK UNIFIED IDEOGRAPH + {0xD54D, 0x8A90}, //14568 #CJK UNIFIED IDEOGRAPH + {0xD54E, 0x8A91}, //14569 #CJK UNIFIED IDEOGRAPH + {0xD54F, 0x8A92}, //14570 #CJK UNIFIED IDEOGRAPH + {0xD550, 0x8A94}, //14571 #CJK UNIFIED IDEOGRAPH + {0xD551, 0x8A95}, //14572 #CJK UNIFIED IDEOGRAPH + {0xD552, 0x8A96}, //14573 #CJK UNIFIED IDEOGRAPH + {0xD553, 0x8A97}, //14574 #CJK UNIFIED IDEOGRAPH + {0xD554, 0x8A98}, //14575 #CJK UNIFIED IDEOGRAPH + {0xD555, 0x8A99}, //14576 #CJK UNIFIED IDEOGRAPH + {0xD556, 0x8A9A}, //14577 #CJK UNIFIED IDEOGRAPH + {0xD557, 0x8A9B}, //14578 #CJK UNIFIED IDEOGRAPH + {0xD558, 0x8A9C}, //14579 #CJK UNIFIED IDEOGRAPH + {0xD559, 0x8A9D}, //14580 #CJK UNIFIED IDEOGRAPH + {0xD55A, 0x8A9E}, //14581 #CJK UNIFIED IDEOGRAPH + {0xD55B, 0x8A9F}, //14582 #CJK UNIFIED IDEOGRAPH + {0xD55C, 0x8AA0}, //14583 #CJK UNIFIED IDEOGRAPH + {0xD55D, 0x8AA1}, //14584 #CJK UNIFIED IDEOGRAPH + {0xD55E, 0x8AA2}, //14585 #CJK UNIFIED IDEOGRAPH + {0xD55F, 0x8AA3}, //14586 #CJK UNIFIED IDEOGRAPH + {0xD560, 0x8AA4}, //14587 #CJK UNIFIED IDEOGRAPH + {0xD561, 0x8AA5}, //14588 #CJK UNIFIED IDEOGRAPH + {0xD562, 0x8AA6}, //14589 #CJK UNIFIED IDEOGRAPH + {0xD563, 0x8AA7}, //14590 #CJK UNIFIED IDEOGRAPH + {0xD564, 0x8AA8}, //14591 #CJK UNIFIED IDEOGRAPH + {0xD565, 0x8AA9}, //14592 #CJK UNIFIED IDEOGRAPH + {0xD566, 0x8AAA}, //14593 #CJK UNIFIED IDEOGRAPH + {0xD567, 0x8AAB}, //14594 #CJK UNIFIED IDEOGRAPH + {0xD568, 0x8AAC}, //14595 #CJK UNIFIED IDEOGRAPH + {0xD569, 0x8AAD}, //14596 #CJK UNIFIED IDEOGRAPH + {0xD56A, 0x8AAE}, //14597 #CJK UNIFIED IDEOGRAPH + {0xD56B, 0x8AAF}, //14598 #CJK UNIFIED IDEOGRAPH + {0xD56C, 0x8AB0}, //14599 #CJK UNIFIED IDEOGRAPH + {0xD56D, 0x8AB1}, //14600 #CJK UNIFIED IDEOGRAPH + {0xD56E, 0x8AB2}, //14601 #CJK UNIFIED IDEOGRAPH + {0xD56F, 0x8AB3}, //14602 #CJK UNIFIED IDEOGRAPH + {0xD570, 0x8AB4}, //14603 #CJK UNIFIED IDEOGRAPH + {0xD571, 0x8AB5}, //14604 #CJK UNIFIED IDEOGRAPH + {0xD572, 0x8AB6}, //14605 #CJK UNIFIED IDEOGRAPH + {0xD573, 0x8AB7}, //14606 #CJK UNIFIED IDEOGRAPH + {0xD574, 0x8AB8}, //14607 #CJK UNIFIED IDEOGRAPH + {0xD575, 0x8AB9}, //14608 #CJK UNIFIED IDEOGRAPH + {0xD576, 0x8ABA}, //14609 #CJK UNIFIED IDEOGRAPH + {0xD577, 0x8ABB}, //14610 #CJK UNIFIED IDEOGRAPH + {0xD578, 0x8ABC}, //14611 #CJK UNIFIED IDEOGRAPH + {0xD579, 0x8ABD}, //14612 #CJK UNIFIED IDEOGRAPH + {0xD57A, 0x8ABE}, //14613 #CJK UNIFIED IDEOGRAPH + {0xD57B, 0x8ABF}, //14614 #CJK UNIFIED IDEOGRAPH + {0xD57C, 0x8AC0}, //14615 #CJK UNIFIED IDEOGRAPH + {0xD57D, 0x8AC1}, //14616 #CJK UNIFIED IDEOGRAPH + {0xD57E, 0x8AC2}, //14617 #CJK UNIFIED IDEOGRAPH + {0xD580, 0x8AC3}, //14618 #CJK UNIFIED IDEOGRAPH + {0xD581, 0x8AC4}, //14619 #CJK UNIFIED IDEOGRAPH + {0xD582, 0x8AC5}, //14620 #CJK UNIFIED IDEOGRAPH + {0xD583, 0x8AC6}, //14621 #CJK UNIFIED IDEOGRAPH + {0xD584, 0x8AC7}, //14622 #CJK UNIFIED IDEOGRAPH + {0xD585, 0x8AC8}, //14623 #CJK UNIFIED IDEOGRAPH + {0xD586, 0x8AC9}, //14624 #CJK UNIFIED IDEOGRAPH + {0xD587, 0x8ACA}, //14625 #CJK UNIFIED IDEOGRAPH + {0xD588, 0x8ACB}, //14626 #CJK UNIFIED IDEOGRAPH + {0xD589, 0x8ACC}, //14627 #CJK UNIFIED IDEOGRAPH + {0xD58A, 0x8ACD}, //14628 #CJK UNIFIED IDEOGRAPH + {0xD58B, 0x8ACE}, //14629 #CJK UNIFIED IDEOGRAPH + {0xD58C, 0x8ACF}, //14630 #CJK UNIFIED IDEOGRAPH + {0xD58D, 0x8AD0}, //14631 #CJK UNIFIED IDEOGRAPH + {0xD58E, 0x8AD1}, //14632 #CJK UNIFIED IDEOGRAPH + {0xD58F, 0x8AD2}, //14633 #CJK UNIFIED IDEOGRAPH + {0xD590, 0x8AD3}, //14634 #CJK UNIFIED IDEOGRAPH + {0xD591, 0x8AD4}, //14635 #CJK UNIFIED IDEOGRAPH + {0xD592, 0x8AD5}, //14636 #CJK UNIFIED IDEOGRAPH + {0xD593, 0x8AD6}, //14637 #CJK UNIFIED IDEOGRAPH + {0xD594, 0x8AD7}, //14638 #CJK UNIFIED IDEOGRAPH + {0xD595, 0x8AD8}, //14639 #CJK UNIFIED IDEOGRAPH + {0xD596, 0x8AD9}, //14640 #CJK UNIFIED IDEOGRAPH + {0xD597, 0x8ADA}, //14641 #CJK UNIFIED IDEOGRAPH + {0xD598, 0x8ADB}, //14642 #CJK UNIFIED IDEOGRAPH + {0xD599, 0x8ADC}, //14643 #CJK UNIFIED IDEOGRAPH + {0xD59A, 0x8ADD}, //14644 #CJK UNIFIED IDEOGRAPH + {0xD59B, 0x8ADE}, //14645 #CJK UNIFIED IDEOGRAPH + {0xD59C, 0x8ADF}, //14646 #CJK UNIFIED IDEOGRAPH + {0xD59D, 0x8AE0}, //14647 #CJK UNIFIED IDEOGRAPH + {0xD59E, 0x8AE1}, //14648 #CJK UNIFIED IDEOGRAPH + {0xD59F, 0x8AE2}, //14649 #CJK UNIFIED IDEOGRAPH + {0xD5A0, 0x8AE3}, //14650 #CJK UNIFIED IDEOGRAPH + {0xD5A1, 0x94E1}, //14651 #CJK UNIFIED IDEOGRAPH + {0xD5A2, 0x95F8}, //14652 #CJK UNIFIED IDEOGRAPH + {0xD5A3, 0x7728}, //14653 #CJK UNIFIED IDEOGRAPH + {0xD5A4, 0x6805}, //14654 #CJK UNIFIED IDEOGRAPH + {0xD5A5, 0x69A8}, //14655 #CJK UNIFIED IDEOGRAPH + {0xD5A6, 0x548B}, //14656 #CJK UNIFIED IDEOGRAPH + {0xD5A7, 0x4E4D}, //14657 #CJK UNIFIED IDEOGRAPH + {0xD5A8, 0x70B8}, //14658 #CJK UNIFIED IDEOGRAPH + {0xD5A9, 0x8BC8}, //14659 #CJK UNIFIED IDEOGRAPH + {0xD5AA, 0x6458}, //14660 #CJK UNIFIED IDEOGRAPH + {0xD5AB, 0x658B}, //14661 #CJK UNIFIED IDEOGRAPH + {0xD5AC, 0x5B85}, //14662 #CJK UNIFIED IDEOGRAPH + {0xD5AD, 0x7A84}, //14663 #CJK UNIFIED IDEOGRAPH + {0xD5AE, 0x503A}, //14664 #CJK UNIFIED IDEOGRAPH + {0xD5AF, 0x5BE8}, //14665 #CJK UNIFIED IDEOGRAPH + {0xD5B0, 0x77BB}, //14666 #CJK UNIFIED IDEOGRAPH + {0xD5B1, 0x6BE1}, //14667 #CJK UNIFIED IDEOGRAPH + {0xD5B2, 0x8A79}, //14668 #CJK UNIFIED IDEOGRAPH + {0xD5B3, 0x7C98}, //14669 #CJK UNIFIED IDEOGRAPH + {0xD5B4, 0x6CBE}, //14670 #CJK UNIFIED IDEOGRAPH + {0xD5B5, 0x76CF}, //14671 #CJK UNIFIED IDEOGRAPH + {0xD5B6, 0x65A9}, //14672 #CJK UNIFIED IDEOGRAPH + {0xD5B7, 0x8F97}, //14673 #CJK UNIFIED IDEOGRAPH + {0xD5B8, 0x5D2D}, //14674 #CJK UNIFIED IDEOGRAPH + {0xD5B9, 0x5C55}, //14675 #CJK UNIFIED IDEOGRAPH + {0xD5BA, 0x8638}, //14676 #CJK UNIFIED IDEOGRAPH + {0xD5BB, 0x6808}, //14677 #CJK UNIFIED IDEOGRAPH + {0xD5BC, 0x5360}, //14678 #CJK UNIFIED IDEOGRAPH + {0xD5BD, 0x6218}, //14679 #CJK UNIFIED IDEOGRAPH + {0xD5BE, 0x7AD9}, //14680 #CJK UNIFIED IDEOGRAPH + {0xD5BF, 0x6E5B}, //14681 #CJK UNIFIED IDEOGRAPH + {0xD5C0, 0x7EFD}, //14682 #CJK UNIFIED IDEOGRAPH + {0xD5C1, 0x6A1F}, //14683 #CJK UNIFIED IDEOGRAPH + {0xD5C2, 0x7AE0}, //14684 #CJK UNIFIED IDEOGRAPH + {0xD5C3, 0x5F70}, //14685 #CJK UNIFIED IDEOGRAPH + {0xD5C4, 0x6F33}, //14686 #CJK UNIFIED IDEOGRAPH + {0xD5C5, 0x5F20}, //14687 #CJK UNIFIED IDEOGRAPH + {0xD5C6, 0x638C}, //14688 #CJK UNIFIED IDEOGRAPH + {0xD5C7, 0x6DA8}, //14689 #CJK UNIFIED IDEOGRAPH + {0xD5C8, 0x6756}, //14690 #CJK UNIFIED IDEOGRAPH + {0xD5C9, 0x4E08}, //14691 #CJK UNIFIED IDEOGRAPH + {0xD5CA, 0x5E10}, //14692 #CJK UNIFIED IDEOGRAPH + {0xD5CB, 0x8D26}, //14693 #CJK UNIFIED IDEOGRAPH + {0xD5CC, 0x4ED7}, //14694 #CJK UNIFIED IDEOGRAPH + {0xD5CD, 0x80C0}, //14695 #CJK UNIFIED IDEOGRAPH + {0xD5CE, 0x7634}, //14696 #CJK UNIFIED IDEOGRAPH + {0xD5CF, 0x969C}, //14697 #CJK UNIFIED IDEOGRAPH + {0xD5D0, 0x62DB}, //14698 #CJK UNIFIED IDEOGRAPH + {0xD5D1, 0x662D}, //14699 #CJK UNIFIED IDEOGRAPH + {0xD5D2, 0x627E}, //14700 #CJK UNIFIED IDEOGRAPH + {0xD5D3, 0x6CBC}, //14701 #CJK UNIFIED IDEOGRAPH + {0xD5D4, 0x8D75}, //14702 #CJK UNIFIED IDEOGRAPH + {0xD5D5, 0x7167}, //14703 #CJK UNIFIED IDEOGRAPH + {0xD5D6, 0x7F69}, //14704 #CJK UNIFIED IDEOGRAPH + {0xD5D7, 0x5146}, //14705 #CJK UNIFIED IDEOGRAPH + {0xD5D8, 0x8087}, //14706 #CJK UNIFIED IDEOGRAPH + {0xD5D9, 0x53EC}, //14707 #CJK UNIFIED IDEOGRAPH + {0xD5DA, 0x906E}, //14708 #CJK UNIFIED IDEOGRAPH + {0xD5DB, 0x6298}, //14709 #CJK UNIFIED IDEOGRAPH + {0xD5DC, 0x54F2}, //14710 #CJK UNIFIED IDEOGRAPH + {0xD5DD, 0x86F0}, //14711 #CJK UNIFIED IDEOGRAPH + {0xD5DE, 0x8F99}, //14712 #CJK UNIFIED IDEOGRAPH + {0xD5DF, 0x8005}, //14713 #CJK UNIFIED IDEOGRAPH + {0xD5E0, 0x9517}, //14714 #CJK UNIFIED IDEOGRAPH + {0xD5E1, 0x8517}, //14715 #CJK UNIFIED IDEOGRAPH + {0xD5E2, 0x8FD9}, //14716 #CJK UNIFIED IDEOGRAPH + {0xD5E3, 0x6D59}, //14717 #CJK UNIFIED IDEOGRAPH + {0xD5E4, 0x73CD}, //14718 #CJK UNIFIED IDEOGRAPH + {0xD5E5, 0x659F}, //14719 #CJK UNIFIED IDEOGRAPH + {0xD5E6, 0x771F}, //14720 #CJK UNIFIED IDEOGRAPH + {0xD5E7, 0x7504}, //14721 #CJK UNIFIED IDEOGRAPH + {0xD5E8, 0x7827}, //14722 #CJK UNIFIED IDEOGRAPH + {0xD5E9, 0x81FB}, //14723 #CJK UNIFIED IDEOGRAPH + {0xD5EA, 0x8D1E}, //14724 #CJK UNIFIED IDEOGRAPH + {0xD5EB, 0x9488}, //14725 #CJK UNIFIED IDEOGRAPH + {0xD5EC, 0x4FA6}, //14726 #CJK UNIFIED IDEOGRAPH + {0xD5ED, 0x6795}, //14727 #CJK UNIFIED IDEOGRAPH + {0xD5EE, 0x75B9}, //14728 #CJK UNIFIED IDEOGRAPH + {0xD5EF, 0x8BCA}, //14729 #CJK UNIFIED IDEOGRAPH + {0xD5F0, 0x9707}, //14730 #CJK UNIFIED IDEOGRAPH + {0xD5F1, 0x632F}, //14731 #CJK UNIFIED IDEOGRAPH + {0xD5F2, 0x9547}, //14732 #CJK UNIFIED IDEOGRAPH + {0xD5F3, 0x9635}, //14733 #CJK UNIFIED IDEOGRAPH + {0xD5F4, 0x84B8}, //14734 #CJK UNIFIED IDEOGRAPH + {0xD5F5, 0x6323}, //14735 #CJK UNIFIED IDEOGRAPH + {0xD5F6, 0x7741}, //14736 #CJK UNIFIED IDEOGRAPH + {0xD5F7, 0x5F81}, //14737 #CJK UNIFIED IDEOGRAPH + {0xD5F8, 0x72F0}, //14738 #CJK UNIFIED IDEOGRAPH + {0xD5F9, 0x4E89}, //14739 #CJK UNIFIED IDEOGRAPH + {0xD5FA, 0x6014}, //14740 #CJK UNIFIED IDEOGRAPH + {0xD5FB, 0x6574}, //14741 #CJK UNIFIED IDEOGRAPH + {0xD5FC, 0x62EF}, //14742 #CJK UNIFIED IDEOGRAPH + {0xD5FD, 0x6B63}, //14743 #CJK UNIFIED IDEOGRAPH + {0xD5FE, 0x653F}, //14744 #CJK UNIFIED IDEOGRAPH + {0xD640, 0x8AE4}, //14745 #CJK UNIFIED IDEOGRAPH + {0xD641, 0x8AE5}, //14746 #CJK UNIFIED IDEOGRAPH + {0xD642, 0x8AE6}, //14747 #CJK UNIFIED IDEOGRAPH + {0xD643, 0x8AE7}, //14748 #CJK UNIFIED IDEOGRAPH + {0xD644, 0x8AE8}, //14749 #CJK UNIFIED IDEOGRAPH + {0xD645, 0x8AE9}, //14750 #CJK UNIFIED IDEOGRAPH + {0xD646, 0x8AEA}, //14751 #CJK UNIFIED IDEOGRAPH + {0xD647, 0x8AEB}, //14752 #CJK UNIFIED IDEOGRAPH + {0xD648, 0x8AEC}, //14753 #CJK UNIFIED IDEOGRAPH + {0xD649, 0x8AED}, //14754 #CJK UNIFIED IDEOGRAPH + {0xD64A, 0x8AEE}, //14755 #CJK UNIFIED IDEOGRAPH + {0xD64B, 0x8AEF}, //14756 #CJK UNIFIED IDEOGRAPH + {0xD64C, 0x8AF0}, //14757 #CJK UNIFIED IDEOGRAPH + {0xD64D, 0x8AF1}, //14758 #CJK UNIFIED IDEOGRAPH + {0xD64E, 0x8AF2}, //14759 #CJK UNIFIED IDEOGRAPH + {0xD64F, 0x8AF3}, //14760 #CJK UNIFIED IDEOGRAPH + {0xD650, 0x8AF4}, //14761 #CJK UNIFIED IDEOGRAPH + {0xD651, 0x8AF5}, //14762 #CJK UNIFIED IDEOGRAPH + {0xD652, 0x8AF6}, //14763 #CJK UNIFIED IDEOGRAPH + {0xD653, 0x8AF7}, //14764 #CJK UNIFIED IDEOGRAPH + {0xD654, 0x8AF8}, //14765 #CJK UNIFIED IDEOGRAPH + {0xD655, 0x8AF9}, //14766 #CJK UNIFIED IDEOGRAPH + {0xD656, 0x8AFA}, //14767 #CJK UNIFIED IDEOGRAPH + {0xD657, 0x8AFB}, //14768 #CJK UNIFIED IDEOGRAPH + {0xD658, 0x8AFC}, //14769 #CJK UNIFIED IDEOGRAPH + {0xD659, 0x8AFD}, //14770 #CJK UNIFIED IDEOGRAPH + {0xD65A, 0x8AFE}, //14771 #CJK UNIFIED IDEOGRAPH + {0xD65B, 0x8AFF}, //14772 #CJK UNIFIED IDEOGRAPH + {0xD65C, 0x8B00}, //14773 #CJK UNIFIED IDEOGRAPH + {0xD65D, 0x8B01}, //14774 #CJK UNIFIED IDEOGRAPH + {0xD65E, 0x8B02}, //14775 #CJK UNIFIED IDEOGRAPH + {0xD65F, 0x8B03}, //14776 #CJK UNIFIED IDEOGRAPH + {0xD660, 0x8B04}, //14777 #CJK UNIFIED IDEOGRAPH + {0xD661, 0x8B05}, //14778 #CJK UNIFIED IDEOGRAPH + {0xD662, 0x8B06}, //14779 #CJK UNIFIED IDEOGRAPH + {0xD663, 0x8B08}, //14780 #CJK UNIFIED IDEOGRAPH + {0xD664, 0x8B09}, //14781 #CJK UNIFIED IDEOGRAPH + {0xD665, 0x8B0A}, //14782 #CJK UNIFIED IDEOGRAPH + {0xD666, 0x8B0B}, //14783 #CJK UNIFIED IDEOGRAPH + {0xD667, 0x8B0C}, //14784 #CJK UNIFIED IDEOGRAPH + {0xD668, 0x8B0D}, //14785 #CJK UNIFIED IDEOGRAPH + {0xD669, 0x8B0E}, //14786 #CJK UNIFIED IDEOGRAPH + {0xD66A, 0x8B0F}, //14787 #CJK UNIFIED IDEOGRAPH + {0xD66B, 0x8B10}, //14788 #CJK UNIFIED IDEOGRAPH + {0xD66C, 0x8B11}, //14789 #CJK UNIFIED IDEOGRAPH + {0xD66D, 0x8B12}, //14790 #CJK UNIFIED IDEOGRAPH + {0xD66E, 0x8B13}, //14791 #CJK UNIFIED IDEOGRAPH + {0xD66F, 0x8B14}, //14792 #CJK UNIFIED IDEOGRAPH + {0xD670, 0x8B15}, //14793 #CJK UNIFIED IDEOGRAPH + {0xD671, 0x8B16}, //14794 #CJK UNIFIED IDEOGRAPH + {0xD672, 0x8B17}, //14795 #CJK UNIFIED IDEOGRAPH + {0xD673, 0x8B18}, //14796 #CJK UNIFIED IDEOGRAPH + {0xD674, 0x8B19}, //14797 #CJK UNIFIED IDEOGRAPH + {0xD675, 0x8B1A}, //14798 #CJK UNIFIED IDEOGRAPH + {0xD676, 0x8B1B}, //14799 #CJK UNIFIED IDEOGRAPH + {0xD677, 0x8B1C}, //14800 #CJK UNIFIED IDEOGRAPH + {0xD678, 0x8B1D}, //14801 #CJK UNIFIED IDEOGRAPH + {0xD679, 0x8B1E}, //14802 #CJK UNIFIED IDEOGRAPH + {0xD67A, 0x8B1F}, //14803 #CJK UNIFIED IDEOGRAPH + {0xD67B, 0x8B20}, //14804 #CJK UNIFIED IDEOGRAPH + {0xD67C, 0x8B21}, //14805 #CJK UNIFIED IDEOGRAPH + {0xD67D, 0x8B22}, //14806 #CJK UNIFIED IDEOGRAPH + {0xD67E, 0x8B23}, //14807 #CJK UNIFIED IDEOGRAPH + {0xD680, 0x8B24}, //14808 #CJK UNIFIED IDEOGRAPH + {0xD681, 0x8B25}, //14809 #CJK UNIFIED IDEOGRAPH + {0xD682, 0x8B27}, //14810 #CJK UNIFIED IDEOGRAPH + {0xD683, 0x8B28}, //14811 #CJK UNIFIED IDEOGRAPH + {0xD684, 0x8B29}, //14812 #CJK UNIFIED IDEOGRAPH + {0xD685, 0x8B2A}, //14813 #CJK UNIFIED IDEOGRAPH + {0xD686, 0x8B2B}, //14814 #CJK UNIFIED IDEOGRAPH + {0xD687, 0x8B2C}, //14815 #CJK UNIFIED IDEOGRAPH + {0xD688, 0x8B2D}, //14816 #CJK UNIFIED IDEOGRAPH + {0xD689, 0x8B2E}, //14817 #CJK UNIFIED IDEOGRAPH + {0xD68A, 0x8B2F}, //14818 #CJK UNIFIED IDEOGRAPH + {0xD68B, 0x8B30}, //14819 #CJK UNIFIED IDEOGRAPH + {0xD68C, 0x8B31}, //14820 #CJK UNIFIED IDEOGRAPH + {0xD68D, 0x8B32}, //14821 #CJK UNIFIED IDEOGRAPH + {0xD68E, 0x8B33}, //14822 #CJK UNIFIED IDEOGRAPH + {0xD68F, 0x8B34}, //14823 #CJK UNIFIED IDEOGRAPH + {0xD690, 0x8B35}, //14824 #CJK UNIFIED IDEOGRAPH + {0xD691, 0x8B36}, //14825 #CJK UNIFIED IDEOGRAPH + {0xD692, 0x8B37}, //14826 #CJK UNIFIED IDEOGRAPH + {0xD693, 0x8B38}, //14827 #CJK UNIFIED IDEOGRAPH + {0xD694, 0x8B39}, //14828 #CJK UNIFIED IDEOGRAPH + {0xD695, 0x8B3A}, //14829 #CJK UNIFIED IDEOGRAPH + {0xD696, 0x8B3B}, //14830 #CJK UNIFIED IDEOGRAPH + {0xD697, 0x8B3C}, //14831 #CJK UNIFIED IDEOGRAPH + {0xD698, 0x8B3D}, //14832 #CJK UNIFIED IDEOGRAPH + {0xD699, 0x8B3E}, //14833 #CJK UNIFIED IDEOGRAPH + {0xD69A, 0x8B3F}, //14834 #CJK UNIFIED IDEOGRAPH + {0xD69B, 0x8B40}, //14835 #CJK UNIFIED IDEOGRAPH + {0xD69C, 0x8B41}, //14836 #CJK UNIFIED IDEOGRAPH + {0xD69D, 0x8B42}, //14837 #CJK UNIFIED IDEOGRAPH + {0xD69E, 0x8B43}, //14838 #CJK UNIFIED IDEOGRAPH + {0xD69F, 0x8B44}, //14839 #CJK UNIFIED IDEOGRAPH + {0xD6A0, 0x8B45}, //14840 #CJK UNIFIED IDEOGRAPH + {0xD6A1, 0x5E27}, //14841 #CJK UNIFIED IDEOGRAPH + {0xD6A2, 0x75C7}, //14842 #CJK UNIFIED IDEOGRAPH + {0xD6A3, 0x90D1}, //14843 #CJK UNIFIED IDEOGRAPH + {0xD6A4, 0x8BC1}, //14844 #CJK UNIFIED IDEOGRAPH + {0xD6A5, 0x829D}, //14845 #CJK UNIFIED IDEOGRAPH + {0xD6A6, 0x679D}, //14846 #CJK UNIFIED IDEOGRAPH + {0xD6A7, 0x652F}, //14847 #CJK UNIFIED IDEOGRAPH + {0xD6A8, 0x5431}, //14848 #CJK UNIFIED IDEOGRAPH + {0xD6A9, 0x8718}, //14849 #CJK UNIFIED IDEOGRAPH + {0xD6AA, 0x77E5}, //14850 #CJK UNIFIED IDEOGRAPH + {0xD6AB, 0x80A2}, //14851 #CJK UNIFIED IDEOGRAPH + {0xD6AC, 0x8102}, //14852 #CJK UNIFIED IDEOGRAPH + {0xD6AD, 0x6C41}, //14853 #CJK UNIFIED IDEOGRAPH + {0xD6AE, 0x4E4B}, //14854 #CJK UNIFIED IDEOGRAPH + {0xD6AF, 0x7EC7}, //14855 #CJK UNIFIED IDEOGRAPH + {0xD6B0, 0x804C}, //14856 #CJK UNIFIED IDEOGRAPH + {0xD6B1, 0x76F4}, //14857 #CJK UNIFIED IDEOGRAPH + {0xD6B2, 0x690D}, //14858 #CJK UNIFIED IDEOGRAPH + {0xD6B3, 0x6B96}, //14859 #CJK UNIFIED IDEOGRAPH + {0xD6B4, 0x6267}, //14860 #CJK UNIFIED IDEOGRAPH + {0xD6B5, 0x503C}, //14861 #CJK UNIFIED IDEOGRAPH + {0xD6B6, 0x4F84}, //14862 #CJK UNIFIED IDEOGRAPH + {0xD6B7, 0x5740}, //14863 #CJK UNIFIED IDEOGRAPH + {0xD6B8, 0x6307}, //14864 #CJK UNIFIED IDEOGRAPH + {0xD6B9, 0x6B62}, //14865 #CJK UNIFIED IDEOGRAPH + {0xD6BA, 0x8DBE}, //14866 #CJK UNIFIED IDEOGRAPH + {0xD6BB, 0x53EA}, //14867 #CJK UNIFIED IDEOGRAPH + {0xD6BC, 0x65E8}, //14868 #CJK UNIFIED IDEOGRAPH + {0xD6BD, 0x7EB8}, //14869 #CJK UNIFIED IDEOGRAPH + {0xD6BE, 0x5FD7}, //14870 #CJK UNIFIED IDEOGRAPH + {0xD6BF, 0x631A}, //14871 #CJK UNIFIED IDEOGRAPH + {0xD6C0, 0x63B7}, //14872 #CJK UNIFIED IDEOGRAPH + {0xD6C1, 0x81F3}, //14873 #CJK UNIFIED IDEOGRAPH + {0xD6C2, 0x81F4}, //14874 #CJK UNIFIED IDEOGRAPH + {0xD6C3, 0x7F6E}, //14875 #CJK UNIFIED IDEOGRAPH + {0xD6C4, 0x5E1C}, //14876 #CJK UNIFIED IDEOGRAPH + {0xD6C5, 0x5CD9}, //14877 #CJK UNIFIED IDEOGRAPH + {0xD6C6, 0x5236}, //14878 #CJK UNIFIED IDEOGRAPH + {0xD6C7, 0x667A}, //14879 #CJK UNIFIED IDEOGRAPH + {0xD6C8, 0x79E9}, //14880 #CJK UNIFIED IDEOGRAPH + {0xD6C9, 0x7A1A}, //14881 #CJK UNIFIED IDEOGRAPH + {0xD6CA, 0x8D28}, //14882 #CJK UNIFIED IDEOGRAPH + {0xD6CB, 0x7099}, //14883 #CJK UNIFIED IDEOGRAPH + {0xD6CC, 0x75D4}, //14884 #CJK UNIFIED IDEOGRAPH + {0xD6CD, 0x6EDE}, //14885 #CJK UNIFIED IDEOGRAPH + {0xD6CE, 0x6CBB}, //14886 #CJK UNIFIED IDEOGRAPH + {0xD6CF, 0x7A92}, //14887 #CJK UNIFIED IDEOGRAPH + {0xD6D0, 0x4E2D}, //14888 #CJK UNIFIED IDEOGRAPH + {0xD6D1, 0x76C5}, //14889 #CJK UNIFIED IDEOGRAPH + {0xD6D2, 0x5FE0}, //14890 #CJK UNIFIED IDEOGRAPH + {0xD6D3, 0x949F}, //14891 #CJK UNIFIED IDEOGRAPH + {0xD6D4, 0x8877}, //14892 #CJK UNIFIED IDEOGRAPH + {0xD6D5, 0x7EC8}, //14893 #CJK UNIFIED IDEOGRAPH + {0xD6D6, 0x79CD}, //14894 #CJK UNIFIED IDEOGRAPH + {0xD6D7, 0x80BF}, //14895 #CJK UNIFIED IDEOGRAPH + {0xD6D8, 0x91CD}, //14896 #CJK UNIFIED IDEOGRAPH + {0xD6D9, 0x4EF2}, //14897 #CJK UNIFIED IDEOGRAPH + {0xD6DA, 0x4F17}, //14898 #CJK UNIFIED IDEOGRAPH + {0xD6DB, 0x821F}, //14899 #CJK UNIFIED IDEOGRAPH + {0xD6DC, 0x5468}, //14900 #CJK UNIFIED IDEOGRAPH + {0xD6DD, 0x5DDE}, //14901 #CJK UNIFIED IDEOGRAPH + {0xD6DE, 0x6D32}, //14902 #CJK UNIFIED IDEOGRAPH + {0xD6DF, 0x8BCC}, //14903 #CJK UNIFIED IDEOGRAPH + {0xD6E0, 0x7CA5}, //14904 #CJK UNIFIED IDEOGRAPH + {0xD6E1, 0x8F74}, //14905 #CJK UNIFIED IDEOGRAPH + {0xD6E2, 0x8098}, //14906 #CJK UNIFIED IDEOGRAPH + {0xD6E3, 0x5E1A}, //14907 #CJK UNIFIED IDEOGRAPH + {0xD6E4, 0x5492}, //14908 #CJK UNIFIED IDEOGRAPH + {0xD6E5, 0x76B1}, //14909 #CJK UNIFIED IDEOGRAPH + {0xD6E6, 0x5B99}, //14910 #CJK UNIFIED IDEOGRAPH + {0xD6E7, 0x663C}, //14911 #CJK UNIFIED IDEOGRAPH + {0xD6E8, 0x9AA4}, //14912 #CJK UNIFIED IDEOGRAPH + {0xD6E9, 0x73E0}, //14913 #CJK UNIFIED IDEOGRAPH + {0xD6EA, 0x682A}, //14914 #CJK UNIFIED IDEOGRAPH + {0xD6EB, 0x86DB}, //14915 #CJK UNIFIED IDEOGRAPH + {0xD6EC, 0x6731}, //14916 #CJK UNIFIED IDEOGRAPH + {0xD6ED, 0x732A}, //14917 #CJK UNIFIED IDEOGRAPH + {0xD6EE, 0x8BF8}, //14918 #CJK UNIFIED IDEOGRAPH + {0xD6EF, 0x8BDB}, //14919 #CJK UNIFIED IDEOGRAPH + {0xD6F0, 0x9010}, //14920 #CJK UNIFIED IDEOGRAPH + {0xD6F1, 0x7AF9}, //14921 #CJK UNIFIED IDEOGRAPH + {0xD6F2, 0x70DB}, //14922 #CJK UNIFIED IDEOGRAPH + {0xD6F3, 0x716E}, //14923 #CJK UNIFIED IDEOGRAPH + {0xD6F4, 0x62C4}, //14924 #CJK UNIFIED IDEOGRAPH + {0xD6F5, 0x77A9}, //14925 #CJK UNIFIED IDEOGRAPH + {0xD6F6, 0x5631}, //14926 #CJK UNIFIED IDEOGRAPH + {0xD6F7, 0x4E3B}, //14927 #CJK UNIFIED IDEOGRAPH + {0xD6F8, 0x8457}, //14928 #CJK UNIFIED IDEOGRAPH + {0xD6F9, 0x67F1}, //14929 #CJK UNIFIED IDEOGRAPH + {0xD6FA, 0x52A9}, //14930 #CJK UNIFIED IDEOGRAPH + {0xD6FB, 0x86C0}, //14931 #CJK UNIFIED IDEOGRAPH + {0xD6FC, 0x8D2E}, //14932 #CJK UNIFIED IDEOGRAPH + {0xD6FD, 0x94F8}, //14933 #CJK UNIFIED IDEOGRAPH + {0xD6FE, 0x7B51}, //14934 #CJK UNIFIED IDEOGRAPH + {0xD740, 0x8B46}, //14935 #CJK UNIFIED IDEOGRAPH + {0xD741, 0x8B47}, //14936 #CJK UNIFIED IDEOGRAPH + {0xD742, 0x8B48}, //14937 #CJK UNIFIED IDEOGRAPH + {0xD743, 0x8B49}, //14938 #CJK UNIFIED IDEOGRAPH + {0xD744, 0x8B4A}, //14939 #CJK UNIFIED IDEOGRAPH + {0xD745, 0x8B4B}, //14940 #CJK UNIFIED IDEOGRAPH + {0xD746, 0x8B4C}, //14941 #CJK UNIFIED IDEOGRAPH + {0xD747, 0x8B4D}, //14942 #CJK UNIFIED IDEOGRAPH + {0xD748, 0x8B4E}, //14943 #CJK UNIFIED IDEOGRAPH + {0xD749, 0x8B4F}, //14944 #CJK UNIFIED IDEOGRAPH + {0xD74A, 0x8B50}, //14945 #CJK UNIFIED IDEOGRAPH + {0xD74B, 0x8B51}, //14946 #CJK UNIFIED IDEOGRAPH + {0xD74C, 0x8B52}, //14947 #CJK UNIFIED IDEOGRAPH + {0xD74D, 0x8B53}, //14948 #CJK UNIFIED IDEOGRAPH + {0xD74E, 0x8B54}, //14949 #CJK UNIFIED IDEOGRAPH + {0xD74F, 0x8B55}, //14950 #CJK UNIFIED IDEOGRAPH + {0xD750, 0x8B56}, //14951 #CJK UNIFIED IDEOGRAPH + {0xD751, 0x8B57}, //14952 #CJK UNIFIED IDEOGRAPH + {0xD752, 0x8B58}, //14953 #CJK UNIFIED IDEOGRAPH + {0xD753, 0x8B59}, //14954 #CJK UNIFIED IDEOGRAPH + {0xD754, 0x8B5A}, //14955 #CJK UNIFIED IDEOGRAPH + {0xD755, 0x8B5B}, //14956 #CJK UNIFIED IDEOGRAPH + {0xD756, 0x8B5C}, //14957 #CJK UNIFIED IDEOGRAPH + {0xD757, 0x8B5D}, //14958 #CJK UNIFIED IDEOGRAPH + {0xD758, 0x8B5E}, //14959 #CJK UNIFIED IDEOGRAPH + {0xD759, 0x8B5F}, //14960 #CJK UNIFIED IDEOGRAPH + {0xD75A, 0x8B60}, //14961 #CJK UNIFIED IDEOGRAPH + {0xD75B, 0x8B61}, //14962 #CJK UNIFIED IDEOGRAPH + {0xD75C, 0x8B62}, //14963 #CJK UNIFIED IDEOGRAPH + {0xD75D, 0x8B63}, //14964 #CJK UNIFIED IDEOGRAPH + {0xD75E, 0x8B64}, //14965 #CJK UNIFIED IDEOGRAPH + {0xD75F, 0x8B65}, //14966 #CJK UNIFIED IDEOGRAPH + {0xD760, 0x8B67}, //14967 #CJK UNIFIED IDEOGRAPH + {0xD761, 0x8B68}, //14968 #CJK UNIFIED IDEOGRAPH + {0xD762, 0x8B69}, //14969 #CJK UNIFIED IDEOGRAPH + {0xD763, 0x8B6A}, //14970 #CJK UNIFIED IDEOGRAPH + {0xD764, 0x8B6B}, //14971 #CJK UNIFIED IDEOGRAPH + {0xD765, 0x8B6D}, //14972 #CJK UNIFIED IDEOGRAPH + {0xD766, 0x8B6E}, //14973 #CJK UNIFIED IDEOGRAPH + {0xD767, 0x8B6F}, //14974 #CJK UNIFIED IDEOGRAPH + {0xD768, 0x8B70}, //14975 #CJK UNIFIED IDEOGRAPH + {0xD769, 0x8B71}, //14976 #CJK UNIFIED IDEOGRAPH + {0xD76A, 0x8B72}, //14977 #CJK UNIFIED IDEOGRAPH + {0xD76B, 0x8B73}, //14978 #CJK UNIFIED IDEOGRAPH + {0xD76C, 0x8B74}, //14979 #CJK UNIFIED IDEOGRAPH + {0xD76D, 0x8B75}, //14980 #CJK UNIFIED IDEOGRAPH + {0xD76E, 0x8B76}, //14981 #CJK UNIFIED IDEOGRAPH + {0xD76F, 0x8B77}, //14982 #CJK UNIFIED IDEOGRAPH + {0xD770, 0x8B78}, //14983 #CJK UNIFIED IDEOGRAPH + {0xD771, 0x8B79}, //14984 #CJK UNIFIED IDEOGRAPH + {0xD772, 0x8B7A}, //14985 #CJK UNIFIED IDEOGRAPH + {0xD773, 0x8B7B}, //14986 #CJK UNIFIED IDEOGRAPH + {0xD774, 0x8B7C}, //14987 #CJK UNIFIED IDEOGRAPH + {0xD775, 0x8B7D}, //14988 #CJK UNIFIED IDEOGRAPH + {0xD776, 0x8B7E}, //14989 #CJK UNIFIED IDEOGRAPH + {0xD777, 0x8B7F}, //14990 #CJK UNIFIED IDEOGRAPH + {0xD778, 0x8B80}, //14991 #CJK UNIFIED IDEOGRAPH + {0xD779, 0x8B81}, //14992 #CJK UNIFIED IDEOGRAPH + {0xD77A, 0x8B82}, //14993 #CJK UNIFIED IDEOGRAPH + {0xD77B, 0x8B83}, //14994 #CJK UNIFIED IDEOGRAPH + {0xD77C, 0x8B84}, //14995 #CJK UNIFIED IDEOGRAPH + {0xD77D, 0x8B85}, //14996 #CJK UNIFIED IDEOGRAPH + {0xD77E, 0x8B86}, //14997 #CJK UNIFIED IDEOGRAPH + {0xD780, 0x8B87}, //14998 #CJK UNIFIED IDEOGRAPH + {0xD781, 0x8B88}, //14999 #CJK UNIFIED IDEOGRAPH + {0xD782, 0x8B89}, //15000 #CJK UNIFIED IDEOGRAPH + {0xD783, 0x8B8A}, //15001 #CJK UNIFIED IDEOGRAPH + {0xD784, 0x8B8B}, //15002 #CJK UNIFIED IDEOGRAPH + {0xD785, 0x8B8C}, //15003 #CJK UNIFIED IDEOGRAPH + {0xD786, 0x8B8D}, //15004 #CJK UNIFIED IDEOGRAPH + {0xD787, 0x8B8E}, //15005 #CJK UNIFIED IDEOGRAPH + {0xD788, 0x8B8F}, //15006 #CJK UNIFIED IDEOGRAPH + {0xD789, 0x8B90}, //15007 #CJK UNIFIED IDEOGRAPH + {0xD78A, 0x8B91}, //15008 #CJK UNIFIED IDEOGRAPH + {0xD78B, 0x8B92}, //15009 #CJK UNIFIED IDEOGRAPH + {0xD78C, 0x8B93}, //15010 #CJK UNIFIED IDEOGRAPH + {0xD78D, 0x8B94}, //15011 #CJK UNIFIED IDEOGRAPH + {0xD78E, 0x8B95}, //15012 #CJK UNIFIED IDEOGRAPH + {0xD78F, 0x8B96}, //15013 #CJK UNIFIED IDEOGRAPH + {0xD790, 0x8B97}, //15014 #CJK UNIFIED IDEOGRAPH + {0xD791, 0x8B98}, //15015 #CJK UNIFIED IDEOGRAPH + {0xD792, 0x8B99}, //15016 #CJK UNIFIED IDEOGRAPH + {0xD793, 0x8B9A}, //15017 #CJK UNIFIED IDEOGRAPH + {0xD794, 0x8B9B}, //15018 #CJK UNIFIED IDEOGRAPH + {0xD795, 0x8B9C}, //15019 #CJK UNIFIED IDEOGRAPH + {0xD796, 0x8B9D}, //15020 #CJK UNIFIED IDEOGRAPH + {0xD797, 0x8B9E}, //15021 #CJK UNIFIED IDEOGRAPH + {0xD798, 0x8B9F}, //15022 #CJK UNIFIED IDEOGRAPH + {0xD799, 0x8BAC}, //15023 #CJK UNIFIED IDEOGRAPH + {0xD79A, 0x8BB1}, //15024 #CJK UNIFIED IDEOGRAPH + {0xD79B, 0x8BBB}, //15025 #CJK UNIFIED IDEOGRAPH + {0xD79C, 0x8BC7}, //15026 #CJK UNIFIED IDEOGRAPH + {0xD79D, 0x8BD0}, //15027 #CJK UNIFIED IDEOGRAPH + {0xD79E, 0x8BEA}, //15028 #CJK UNIFIED IDEOGRAPH + {0xD79F, 0x8C09}, //15029 #CJK UNIFIED IDEOGRAPH + {0xD7A0, 0x8C1E}, //15030 #CJK UNIFIED IDEOGRAPH + {0xD7A1, 0x4F4F}, //15031 #CJK UNIFIED IDEOGRAPH + {0xD7A2, 0x6CE8}, //15032 #CJK UNIFIED IDEOGRAPH + {0xD7A3, 0x795D}, //15033 #CJK UNIFIED IDEOGRAPH + {0xD7A4, 0x9A7B}, //15034 #CJK UNIFIED IDEOGRAPH + {0xD7A5, 0x6293}, //15035 #CJK UNIFIED IDEOGRAPH + {0xD7A6, 0x722A}, //15036 #CJK UNIFIED IDEOGRAPH + {0xD7A7, 0x62FD}, //15037 #CJK UNIFIED IDEOGRAPH + {0xD7A8, 0x4E13}, //15038 #CJK UNIFIED IDEOGRAPH + {0xD7A9, 0x7816}, //15039 #CJK UNIFIED IDEOGRAPH + {0xD7AA, 0x8F6C}, //15040 #CJK UNIFIED IDEOGRAPH + {0xD7AB, 0x64B0}, //15041 #CJK UNIFIED IDEOGRAPH + {0xD7AC, 0x8D5A}, //15042 #CJK UNIFIED IDEOGRAPH + {0xD7AD, 0x7BC6}, //15043 #CJK UNIFIED IDEOGRAPH + {0xD7AE, 0x6869}, //15044 #CJK UNIFIED IDEOGRAPH + {0xD7AF, 0x5E84}, //15045 #CJK UNIFIED IDEOGRAPH + {0xD7B0, 0x88C5}, //15046 #CJK UNIFIED IDEOGRAPH + {0xD7B1, 0x5986}, //15047 #CJK UNIFIED IDEOGRAPH + {0xD7B2, 0x649E}, //15048 #CJK UNIFIED IDEOGRAPH + {0xD7B3, 0x58EE}, //15049 #CJK UNIFIED IDEOGRAPH + {0xD7B4, 0x72B6}, //15050 #CJK UNIFIED IDEOGRAPH + {0xD7B5, 0x690E}, //15051 #CJK UNIFIED IDEOGRAPH + {0xD7B6, 0x9525}, //15052 #CJK UNIFIED IDEOGRAPH + {0xD7B7, 0x8FFD}, //15053 #CJK UNIFIED IDEOGRAPH + {0xD7B8, 0x8D58}, //15054 #CJK UNIFIED IDEOGRAPH + {0xD7B9, 0x5760}, //15055 #CJK UNIFIED IDEOGRAPH + {0xD7BA, 0x7F00}, //15056 #CJK UNIFIED IDEOGRAPH + {0xD7BB, 0x8C06}, //15057 #CJK UNIFIED IDEOGRAPH + {0xD7BC, 0x51C6}, //15058 #CJK UNIFIED IDEOGRAPH + {0xD7BD, 0x6349}, //15059 #CJK UNIFIED IDEOGRAPH + {0xD7BE, 0x62D9}, //15060 #CJK UNIFIED IDEOGRAPH + {0xD7BF, 0x5353}, //15061 #CJK UNIFIED IDEOGRAPH + {0xD7C0, 0x684C}, //15062 #CJK UNIFIED IDEOGRAPH + {0xD7C1, 0x7422}, //15063 #CJK UNIFIED IDEOGRAPH + {0xD7C2, 0x8301}, //15064 #CJK UNIFIED IDEOGRAPH + {0xD7C3, 0x914C}, //15065 #CJK UNIFIED IDEOGRAPH + {0xD7C4, 0x5544}, //15066 #CJK UNIFIED IDEOGRAPH + {0xD7C5, 0x7740}, //15067 #CJK UNIFIED IDEOGRAPH + {0xD7C6, 0x707C}, //15068 #CJK UNIFIED IDEOGRAPH + {0xD7C7, 0x6D4A}, //15069 #CJK UNIFIED IDEOGRAPH + {0xD7C8, 0x5179}, //15070 #CJK UNIFIED IDEOGRAPH + {0xD7C9, 0x54A8}, //15071 #CJK UNIFIED IDEOGRAPH + {0xD7CA, 0x8D44}, //15072 #CJK UNIFIED IDEOGRAPH + {0xD7CB, 0x59FF}, //15073 #CJK UNIFIED IDEOGRAPH + {0xD7CC, 0x6ECB}, //15074 #CJK UNIFIED IDEOGRAPH + {0xD7CD, 0x6DC4}, //15075 #CJK UNIFIED IDEOGRAPH + {0xD7CE, 0x5B5C}, //15076 #CJK UNIFIED IDEOGRAPH + {0xD7CF, 0x7D2B}, //15077 #CJK UNIFIED IDEOGRAPH + {0xD7D0, 0x4ED4}, //15078 #CJK UNIFIED IDEOGRAPH + {0xD7D1, 0x7C7D}, //15079 #CJK UNIFIED IDEOGRAPH + {0xD7D2, 0x6ED3}, //15080 #CJK UNIFIED IDEOGRAPH + {0xD7D3, 0x5B50}, //15081 #CJK UNIFIED IDEOGRAPH + {0xD7D4, 0x81EA}, //15082 #CJK UNIFIED IDEOGRAPH + {0xD7D5, 0x6E0D}, //15083 #CJK UNIFIED IDEOGRAPH + {0xD7D6, 0x5B57}, //15084 #CJK UNIFIED IDEOGRAPH + {0xD7D7, 0x9B03}, //15085 #CJK UNIFIED IDEOGRAPH + {0xD7D8, 0x68D5}, //15086 #CJK UNIFIED IDEOGRAPH + {0xD7D9, 0x8E2A}, //15087 #CJK UNIFIED IDEOGRAPH + {0xD7DA, 0x5B97}, //15088 #CJK UNIFIED IDEOGRAPH + {0xD7DB, 0x7EFC}, //15089 #CJK UNIFIED IDEOGRAPH + {0xD7DC, 0x603B}, //15090 #CJK UNIFIED IDEOGRAPH + {0xD7DD, 0x7EB5}, //15091 #CJK UNIFIED IDEOGRAPH + {0xD7DE, 0x90B9}, //15092 #CJK UNIFIED IDEOGRAPH + {0xD7DF, 0x8D70}, //15093 #CJK UNIFIED IDEOGRAPH + {0xD7E0, 0x594F}, //15094 #CJK UNIFIED IDEOGRAPH + {0xD7E1, 0x63CD}, //15095 #CJK UNIFIED IDEOGRAPH + {0xD7E2, 0x79DF}, //15096 #CJK UNIFIED IDEOGRAPH + {0xD7E3, 0x8DB3}, //15097 #CJK UNIFIED IDEOGRAPH + {0xD7E4, 0x5352}, //15098 #CJK UNIFIED IDEOGRAPH + {0xD7E5, 0x65CF}, //15099 #CJK UNIFIED IDEOGRAPH + {0xD7E6, 0x7956}, //15100 #CJK UNIFIED IDEOGRAPH + {0xD7E7, 0x8BC5}, //15101 #CJK UNIFIED IDEOGRAPH + {0xD7E8, 0x963B}, //15102 #CJK UNIFIED IDEOGRAPH + {0xD7E9, 0x7EC4}, //15103 #CJK UNIFIED IDEOGRAPH + {0xD7EA, 0x94BB}, //15104 #CJK UNIFIED IDEOGRAPH + {0xD7EB, 0x7E82}, //15105 #CJK UNIFIED IDEOGRAPH + {0xD7EC, 0x5634}, //15106 #CJK UNIFIED IDEOGRAPH + {0xD7ED, 0x9189}, //15107 #CJK UNIFIED IDEOGRAPH + {0xD7EE, 0x6700}, //15108 #CJK UNIFIED IDEOGRAPH + {0xD7EF, 0x7F6A}, //15109 #CJK UNIFIED IDEOGRAPH + {0xD7F0, 0x5C0A}, //15110 #CJK UNIFIED IDEOGRAPH + {0xD7F1, 0x9075}, //15111 #CJK UNIFIED IDEOGRAPH + {0xD7F2, 0x6628}, //15112 #CJK UNIFIED IDEOGRAPH + {0xD7F3, 0x5DE6}, //15113 #CJK UNIFIED IDEOGRAPH + {0xD7F4, 0x4F50}, //15114 #CJK UNIFIED IDEOGRAPH + {0xD7F5, 0x67DE}, //15115 #CJK UNIFIED IDEOGRAPH + {0xD7F6, 0x505A}, //15116 #CJK UNIFIED IDEOGRAPH + {0xD7F7, 0x4F5C}, //15117 #CJK UNIFIED IDEOGRAPH + {0xD7F8, 0x5750}, //15118 #CJK UNIFIED IDEOGRAPH + {0xD7F9, 0x5EA7}, //15119 #CJK UNIFIED IDEOGRAPH + {0xD840, 0x8C38}, //15120 #CJK UNIFIED IDEOGRAPH + {0xD841, 0x8C39}, //15121 #CJK UNIFIED IDEOGRAPH + {0xD842, 0x8C3A}, //15122 #CJK UNIFIED IDEOGRAPH + {0xD843, 0x8C3B}, //15123 #CJK UNIFIED IDEOGRAPH + {0xD844, 0x8C3C}, //15124 #CJK UNIFIED IDEOGRAPH + {0xD845, 0x8C3D}, //15125 #CJK UNIFIED IDEOGRAPH + {0xD846, 0x8C3E}, //15126 #CJK UNIFIED IDEOGRAPH + {0xD847, 0x8C3F}, //15127 #CJK UNIFIED IDEOGRAPH + {0xD848, 0x8C40}, //15128 #CJK UNIFIED IDEOGRAPH + {0xD849, 0x8C42}, //15129 #CJK UNIFIED IDEOGRAPH + {0xD84A, 0x8C43}, //15130 #CJK UNIFIED IDEOGRAPH + {0xD84B, 0x8C44}, //15131 #CJK UNIFIED IDEOGRAPH + {0xD84C, 0x8C45}, //15132 #CJK UNIFIED IDEOGRAPH + {0xD84D, 0x8C48}, //15133 #CJK UNIFIED IDEOGRAPH + {0xD84E, 0x8C4A}, //15134 #CJK UNIFIED IDEOGRAPH + {0xD84F, 0x8C4B}, //15135 #CJK UNIFIED IDEOGRAPH + {0xD850, 0x8C4D}, //15136 #CJK UNIFIED IDEOGRAPH + {0xD851, 0x8C4E}, //15137 #CJK UNIFIED IDEOGRAPH + {0xD852, 0x8C4F}, //15138 #CJK UNIFIED IDEOGRAPH + {0xD853, 0x8C50}, //15139 #CJK UNIFIED IDEOGRAPH + {0xD854, 0x8C51}, //15140 #CJK UNIFIED IDEOGRAPH + {0xD855, 0x8C52}, //15141 #CJK UNIFIED IDEOGRAPH + {0xD856, 0x8C53}, //15142 #CJK UNIFIED IDEOGRAPH + {0xD857, 0x8C54}, //15143 #CJK UNIFIED IDEOGRAPH + {0xD858, 0x8C56}, //15144 #CJK UNIFIED IDEOGRAPH + {0xD859, 0x8C57}, //15145 #CJK UNIFIED IDEOGRAPH + {0xD85A, 0x8C58}, //15146 #CJK UNIFIED IDEOGRAPH + {0xD85B, 0x8C59}, //15147 #CJK UNIFIED IDEOGRAPH + {0xD85C, 0x8C5B}, //15148 #CJK UNIFIED IDEOGRAPH + {0xD85D, 0x8C5C}, //15149 #CJK UNIFIED IDEOGRAPH + {0xD85E, 0x8C5D}, //15150 #CJK UNIFIED IDEOGRAPH + {0xD85F, 0x8C5E}, //15151 #CJK UNIFIED IDEOGRAPH + {0xD860, 0x8C5F}, //15152 #CJK UNIFIED IDEOGRAPH + {0xD861, 0x8C60}, //15153 #CJK UNIFIED IDEOGRAPH + {0xD862, 0x8C63}, //15154 #CJK UNIFIED IDEOGRAPH + {0xD863, 0x8C64}, //15155 #CJK UNIFIED IDEOGRAPH + {0xD864, 0x8C65}, //15156 #CJK UNIFIED IDEOGRAPH + {0xD865, 0x8C66}, //15157 #CJK UNIFIED IDEOGRAPH + {0xD866, 0x8C67}, //15158 #CJK UNIFIED IDEOGRAPH + {0xD867, 0x8C68}, //15159 #CJK UNIFIED IDEOGRAPH + {0xD868, 0x8C69}, //15160 #CJK UNIFIED IDEOGRAPH + {0xD869, 0x8C6C}, //15161 #CJK UNIFIED IDEOGRAPH + {0xD86A, 0x8C6D}, //15162 #CJK UNIFIED IDEOGRAPH + {0xD86B, 0x8C6E}, //15163 #CJK UNIFIED IDEOGRAPH + {0xD86C, 0x8C6F}, //15164 #CJK UNIFIED IDEOGRAPH + {0xD86D, 0x8C70}, //15165 #CJK UNIFIED IDEOGRAPH + {0xD86E, 0x8C71}, //15166 #CJK UNIFIED IDEOGRAPH + {0xD86F, 0x8C72}, //15167 #CJK UNIFIED IDEOGRAPH + {0xD870, 0x8C74}, //15168 #CJK UNIFIED IDEOGRAPH + {0xD871, 0x8C75}, //15169 #CJK UNIFIED IDEOGRAPH + {0xD872, 0x8C76}, //15170 #CJK UNIFIED IDEOGRAPH + {0xD873, 0x8C77}, //15171 #CJK UNIFIED IDEOGRAPH + {0xD874, 0x8C7B}, //15172 #CJK UNIFIED IDEOGRAPH + {0xD875, 0x8C7C}, //15173 #CJK UNIFIED IDEOGRAPH + {0xD876, 0x8C7D}, //15174 #CJK UNIFIED IDEOGRAPH + {0xD877, 0x8C7E}, //15175 #CJK UNIFIED IDEOGRAPH + {0xD878, 0x8C7F}, //15176 #CJK UNIFIED IDEOGRAPH + {0xD879, 0x8C80}, //15177 #CJK UNIFIED IDEOGRAPH + {0xD87A, 0x8C81}, //15178 #CJK UNIFIED IDEOGRAPH + {0xD87B, 0x8C83}, //15179 #CJK UNIFIED IDEOGRAPH + {0xD87C, 0x8C84}, //15180 #CJK UNIFIED IDEOGRAPH + {0xD87D, 0x8C86}, //15181 #CJK UNIFIED IDEOGRAPH + {0xD87E, 0x8C87}, //15182 #CJK UNIFIED IDEOGRAPH + {0xD880, 0x8C88}, //15183 #CJK UNIFIED IDEOGRAPH + {0xD881, 0x8C8B}, //15184 #CJK UNIFIED IDEOGRAPH + {0xD882, 0x8C8D}, //15185 #CJK UNIFIED IDEOGRAPH + {0xD883, 0x8C8E}, //15186 #CJK UNIFIED IDEOGRAPH + {0xD884, 0x8C8F}, //15187 #CJK UNIFIED IDEOGRAPH + {0xD885, 0x8C90}, //15188 #CJK UNIFIED IDEOGRAPH + {0xD886, 0x8C91}, //15189 #CJK UNIFIED IDEOGRAPH + {0xD887, 0x8C92}, //15190 #CJK UNIFIED IDEOGRAPH + {0xD888, 0x8C93}, //15191 #CJK UNIFIED IDEOGRAPH + {0xD889, 0x8C95}, //15192 #CJK UNIFIED IDEOGRAPH + {0xD88A, 0x8C96}, //15193 #CJK UNIFIED IDEOGRAPH + {0xD88B, 0x8C97}, //15194 #CJK UNIFIED IDEOGRAPH + {0xD88C, 0x8C99}, //15195 #CJK UNIFIED IDEOGRAPH + {0xD88D, 0x8C9A}, //15196 #CJK UNIFIED IDEOGRAPH + {0xD88E, 0x8C9B}, //15197 #CJK UNIFIED IDEOGRAPH + {0xD88F, 0x8C9C}, //15198 #CJK UNIFIED IDEOGRAPH + {0xD890, 0x8C9D}, //15199 #CJK UNIFIED IDEOGRAPH + {0xD891, 0x8C9E}, //15200 #CJK UNIFIED IDEOGRAPH + {0xD892, 0x8C9F}, //15201 #CJK UNIFIED IDEOGRAPH + {0xD893, 0x8CA0}, //15202 #CJK UNIFIED IDEOGRAPH + {0xD894, 0x8CA1}, //15203 #CJK UNIFIED IDEOGRAPH + {0xD895, 0x8CA2}, //15204 #CJK UNIFIED IDEOGRAPH + {0xD896, 0x8CA3}, //15205 #CJK UNIFIED IDEOGRAPH + {0xD897, 0x8CA4}, //15206 #CJK UNIFIED IDEOGRAPH + {0xD898, 0x8CA5}, //15207 #CJK UNIFIED IDEOGRAPH + {0xD899, 0x8CA6}, //15208 #CJK UNIFIED IDEOGRAPH + {0xD89A, 0x8CA7}, //15209 #CJK UNIFIED IDEOGRAPH + {0xD89B, 0x8CA8}, //15210 #CJK UNIFIED IDEOGRAPH + {0xD89C, 0x8CA9}, //15211 #CJK UNIFIED IDEOGRAPH + {0xD89D, 0x8CAA}, //15212 #CJK UNIFIED IDEOGRAPH + {0xD89E, 0x8CAB}, //15213 #CJK UNIFIED IDEOGRAPH + {0xD89F, 0x8CAC}, //15214 #CJK UNIFIED IDEOGRAPH + {0xD8A0, 0x8CAD}, //15215 #CJK UNIFIED IDEOGRAPH + {0xD8A1, 0x4E8D}, //15216 #CJK UNIFIED IDEOGRAPH + {0xD8A2, 0x4E0C}, //15217 #CJK UNIFIED IDEOGRAPH + {0xD8A3, 0x5140}, //15218 #CJK UNIFIED IDEOGRAPH + {0xD8A4, 0x4E10}, //15219 #CJK UNIFIED IDEOGRAPH + {0xD8A5, 0x5EFF}, //15220 #CJK UNIFIED IDEOGRAPH + {0xD8A6, 0x5345}, //15221 #CJK UNIFIED IDEOGRAPH + {0xD8A7, 0x4E15}, //15222 #CJK UNIFIED IDEOGRAPH + {0xD8A8, 0x4E98}, //15223 #CJK UNIFIED IDEOGRAPH + {0xD8A9, 0x4E1E}, //15224 #CJK UNIFIED IDEOGRAPH + {0xD8AA, 0x9B32}, //15225 #CJK UNIFIED IDEOGRAPH + {0xD8AB, 0x5B6C}, //15226 #CJK UNIFIED IDEOGRAPH + {0xD8AC, 0x5669}, //15227 #CJK UNIFIED IDEOGRAPH + {0xD8AD, 0x4E28}, //15228 #CJK UNIFIED IDEOGRAPH + {0xD8AE, 0x79BA}, //15229 #CJK UNIFIED IDEOGRAPH + {0xD8AF, 0x4E3F}, //15230 #CJK UNIFIED IDEOGRAPH + {0xD8B0, 0x5315}, //15231 #CJK UNIFIED IDEOGRAPH + {0xD8B1, 0x4E47}, //15232 #CJK UNIFIED IDEOGRAPH + {0xD8B2, 0x592D}, //15233 #CJK UNIFIED IDEOGRAPH + {0xD8B3, 0x723B}, //15234 #CJK UNIFIED IDEOGRAPH + {0xD8B4, 0x536E}, //15235 #CJK UNIFIED IDEOGRAPH + {0xD8B5, 0x6C10}, //15236 #CJK UNIFIED IDEOGRAPH + {0xD8B6, 0x56DF}, //15237 #CJK UNIFIED IDEOGRAPH + {0xD8B7, 0x80E4}, //15238 #CJK UNIFIED IDEOGRAPH + {0xD8B8, 0x9997}, //15239 #CJK UNIFIED IDEOGRAPH + {0xD8B9, 0x6BD3}, //15240 #CJK UNIFIED IDEOGRAPH + {0xD8BA, 0x777E}, //15241 #CJK UNIFIED IDEOGRAPH + {0xD8BB, 0x9F17}, //15242 #CJK UNIFIED IDEOGRAPH + {0xD8BC, 0x4E36}, //15243 #CJK UNIFIED IDEOGRAPH + {0xD8BD, 0x4E9F}, //15244 #CJK UNIFIED IDEOGRAPH + {0xD8BE, 0x9F10}, //15245 #CJK UNIFIED IDEOGRAPH + {0xD8BF, 0x4E5C}, //15246 #CJK UNIFIED IDEOGRAPH + {0xD8C0, 0x4E69}, //15247 #CJK UNIFIED IDEOGRAPH + {0xD8C1, 0x4E93}, //15248 #CJK UNIFIED IDEOGRAPH + {0xD8C2, 0x8288}, //15249 #CJK UNIFIED IDEOGRAPH + {0xD8C3, 0x5B5B}, //15250 #CJK UNIFIED IDEOGRAPH + {0xD8C4, 0x556C}, //15251 #CJK UNIFIED IDEOGRAPH + {0xD8C5, 0x560F}, //15252 #CJK UNIFIED IDEOGRAPH + {0xD8C6, 0x4EC4}, //15253 #CJK UNIFIED IDEOGRAPH + {0xD8C7, 0x538D}, //15254 #CJK UNIFIED IDEOGRAPH + {0xD8C8, 0x539D}, //15255 #CJK UNIFIED IDEOGRAPH + {0xD8C9, 0x53A3}, //15256 #CJK UNIFIED IDEOGRAPH + {0xD8CA, 0x53A5}, //15257 #CJK UNIFIED IDEOGRAPH + {0xD8CB, 0x53AE}, //15258 #CJK UNIFIED IDEOGRAPH + {0xD8CC, 0x9765}, //15259 #CJK UNIFIED IDEOGRAPH + {0xD8CD, 0x8D5D}, //15260 #CJK UNIFIED IDEOGRAPH + {0xD8CE, 0x531A}, //15261 #CJK UNIFIED IDEOGRAPH + {0xD8CF, 0x53F5}, //15262 #CJK UNIFIED IDEOGRAPH + {0xD8D0, 0x5326}, //15263 #CJK UNIFIED IDEOGRAPH + {0xD8D1, 0x532E}, //15264 #CJK UNIFIED IDEOGRAPH + {0xD8D2, 0x533E}, //15265 #CJK UNIFIED IDEOGRAPH + {0xD8D3, 0x8D5C}, //15266 #CJK UNIFIED IDEOGRAPH + {0xD8D4, 0x5366}, //15267 #CJK UNIFIED IDEOGRAPH + {0xD8D5, 0x5363}, //15268 #CJK UNIFIED IDEOGRAPH + {0xD8D6, 0x5202}, //15269 #CJK UNIFIED IDEOGRAPH + {0xD8D7, 0x5208}, //15270 #CJK UNIFIED IDEOGRAPH + {0xD8D8, 0x520E}, //15271 #CJK UNIFIED IDEOGRAPH + {0xD8D9, 0x522D}, //15272 #CJK UNIFIED IDEOGRAPH + {0xD8DA, 0x5233}, //15273 #CJK UNIFIED IDEOGRAPH + {0xD8DB, 0x523F}, //15274 #CJK UNIFIED IDEOGRAPH + {0xD8DC, 0x5240}, //15275 #CJK UNIFIED IDEOGRAPH + {0xD8DD, 0x524C}, //15276 #CJK UNIFIED IDEOGRAPH + {0xD8DE, 0x525E}, //15277 #CJK UNIFIED IDEOGRAPH + {0xD8DF, 0x5261}, //15278 #CJK UNIFIED IDEOGRAPH + {0xD8E0, 0x525C}, //15279 #CJK UNIFIED IDEOGRAPH + {0xD8E1, 0x84AF}, //15280 #CJK UNIFIED IDEOGRAPH + {0xD8E2, 0x527D}, //15281 #CJK UNIFIED IDEOGRAPH + {0xD8E3, 0x5282}, //15282 #CJK UNIFIED IDEOGRAPH + {0xD8E4, 0x5281}, //15283 #CJK UNIFIED IDEOGRAPH + {0xD8E5, 0x5290}, //15284 #CJK UNIFIED IDEOGRAPH + {0xD8E6, 0x5293}, //15285 #CJK UNIFIED IDEOGRAPH + {0xD8E7, 0x5182}, //15286 #CJK UNIFIED IDEOGRAPH + {0xD8E8, 0x7F54}, //15287 #CJK UNIFIED IDEOGRAPH + {0xD8E9, 0x4EBB}, //15288 #CJK UNIFIED IDEOGRAPH + {0xD8EA, 0x4EC3}, //15289 #CJK UNIFIED IDEOGRAPH + {0xD8EB, 0x4EC9}, //15290 #CJK UNIFIED IDEOGRAPH + {0xD8EC, 0x4EC2}, //15291 #CJK UNIFIED IDEOGRAPH + {0xD8ED, 0x4EE8}, //15292 #CJK UNIFIED IDEOGRAPH + {0xD8EE, 0x4EE1}, //15293 #CJK UNIFIED IDEOGRAPH + {0xD8EF, 0x4EEB}, //15294 #CJK UNIFIED IDEOGRAPH + {0xD8F0, 0x4EDE}, //15295 #CJK UNIFIED IDEOGRAPH + {0xD8F1, 0x4F1B}, //15296 #CJK UNIFIED IDEOGRAPH + {0xD8F2, 0x4EF3}, //15297 #CJK UNIFIED IDEOGRAPH + {0xD8F3, 0x4F22}, //15298 #CJK UNIFIED IDEOGRAPH + {0xD8F4, 0x4F64}, //15299 #CJK UNIFIED IDEOGRAPH + {0xD8F5, 0x4EF5}, //15300 #CJK UNIFIED IDEOGRAPH + {0xD8F6, 0x4F25}, //15301 #CJK UNIFIED IDEOGRAPH + {0xD8F7, 0x4F27}, //15302 #CJK UNIFIED IDEOGRAPH + {0xD8F8, 0x4F09}, //15303 #CJK UNIFIED IDEOGRAPH + {0xD8F9, 0x4F2B}, //15304 #CJK UNIFIED IDEOGRAPH + {0xD8FA, 0x4F5E}, //15305 #CJK UNIFIED IDEOGRAPH + {0xD8FB, 0x4F67}, //15306 #CJK UNIFIED IDEOGRAPH + {0xD8FC, 0x6538}, //15307 #CJK UNIFIED IDEOGRAPH + {0xD8FD, 0x4F5A}, //15308 #CJK UNIFIED IDEOGRAPH + {0xD8FE, 0x4F5D}, //15309 #CJK UNIFIED IDEOGRAPH + {0xD940, 0x8CAE}, //15310 #CJK UNIFIED IDEOGRAPH + {0xD941, 0x8CAF}, //15311 #CJK UNIFIED IDEOGRAPH + {0xD942, 0x8CB0}, //15312 #CJK UNIFIED IDEOGRAPH + {0xD943, 0x8CB1}, //15313 #CJK UNIFIED IDEOGRAPH + {0xD944, 0x8CB2}, //15314 #CJK UNIFIED IDEOGRAPH + {0xD945, 0x8CB3}, //15315 #CJK UNIFIED IDEOGRAPH + {0xD946, 0x8CB4}, //15316 #CJK UNIFIED IDEOGRAPH + {0xD947, 0x8CB5}, //15317 #CJK UNIFIED IDEOGRAPH + {0xD948, 0x8CB6}, //15318 #CJK UNIFIED IDEOGRAPH + {0xD949, 0x8CB7}, //15319 #CJK UNIFIED IDEOGRAPH + {0xD94A, 0x8CB8}, //15320 #CJK UNIFIED IDEOGRAPH + {0xD94B, 0x8CB9}, //15321 #CJK UNIFIED IDEOGRAPH + {0xD94C, 0x8CBA}, //15322 #CJK UNIFIED IDEOGRAPH + {0xD94D, 0x8CBB}, //15323 #CJK UNIFIED IDEOGRAPH + {0xD94E, 0x8CBC}, //15324 #CJK UNIFIED IDEOGRAPH + {0xD94F, 0x8CBD}, //15325 #CJK UNIFIED IDEOGRAPH + {0xD950, 0x8CBE}, //15326 #CJK UNIFIED IDEOGRAPH + {0xD951, 0x8CBF}, //15327 #CJK UNIFIED IDEOGRAPH + {0xD952, 0x8CC0}, //15328 #CJK UNIFIED IDEOGRAPH + {0xD953, 0x8CC1}, //15329 #CJK UNIFIED IDEOGRAPH + {0xD954, 0x8CC2}, //15330 #CJK UNIFIED IDEOGRAPH + {0xD955, 0x8CC3}, //15331 #CJK UNIFIED IDEOGRAPH + {0xD956, 0x8CC4}, //15332 #CJK UNIFIED IDEOGRAPH + {0xD957, 0x8CC5}, //15333 #CJK UNIFIED IDEOGRAPH + {0xD958, 0x8CC6}, //15334 #CJK UNIFIED IDEOGRAPH + {0xD959, 0x8CC7}, //15335 #CJK UNIFIED IDEOGRAPH + {0xD95A, 0x8CC8}, //15336 #CJK UNIFIED IDEOGRAPH + {0xD95B, 0x8CC9}, //15337 #CJK UNIFIED IDEOGRAPH + {0xD95C, 0x8CCA}, //15338 #CJK UNIFIED IDEOGRAPH + {0xD95D, 0x8CCB}, //15339 #CJK UNIFIED IDEOGRAPH + {0xD95E, 0x8CCC}, //15340 #CJK UNIFIED IDEOGRAPH + {0xD95F, 0x8CCD}, //15341 #CJK UNIFIED IDEOGRAPH + {0xD960, 0x8CCE}, //15342 #CJK UNIFIED IDEOGRAPH + {0xD961, 0x8CCF}, //15343 #CJK UNIFIED IDEOGRAPH + {0xD962, 0x8CD0}, //15344 #CJK UNIFIED IDEOGRAPH + {0xD963, 0x8CD1}, //15345 #CJK UNIFIED IDEOGRAPH + {0xD964, 0x8CD2}, //15346 #CJK UNIFIED IDEOGRAPH + {0xD965, 0x8CD3}, //15347 #CJK UNIFIED IDEOGRAPH + {0xD966, 0x8CD4}, //15348 #CJK UNIFIED IDEOGRAPH + {0xD967, 0x8CD5}, //15349 #CJK UNIFIED IDEOGRAPH + {0xD968, 0x8CD6}, //15350 #CJK UNIFIED IDEOGRAPH + {0xD969, 0x8CD7}, //15351 #CJK UNIFIED IDEOGRAPH + {0xD96A, 0x8CD8}, //15352 #CJK UNIFIED IDEOGRAPH + {0xD96B, 0x8CD9}, //15353 #CJK UNIFIED IDEOGRAPH + {0xD96C, 0x8CDA}, //15354 #CJK UNIFIED IDEOGRAPH + {0xD96D, 0x8CDB}, //15355 #CJK UNIFIED IDEOGRAPH + {0xD96E, 0x8CDC}, //15356 #CJK UNIFIED IDEOGRAPH + {0xD96F, 0x8CDD}, //15357 #CJK UNIFIED IDEOGRAPH + {0xD970, 0x8CDE}, //15358 #CJK UNIFIED IDEOGRAPH + {0xD971, 0x8CDF}, //15359 #CJK UNIFIED IDEOGRAPH + {0xD972, 0x8CE0}, //15360 #CJK UNIFIED IDEOGRAPH + {0xD973, 0x8CE1}, //15361 #CJK UNIFIED IDEOGRAPH + {0xD974, 0x8CE2}, //15362 #CJK UNIFIED IDEOGRAPH + {0xD975, 0x8CE3}, //15363 #CJK UNIFIED IDEOGRAPH + {0xD976, 0x8CE4}, //15364 #CJK UNIFIED IDEOGRAPH + {0xD977, 0x8CE5}, //15365 #CJK UNIFIED IDEOGRAPH + {0xD978, 0x8CE6}, //15366 #CJK UNIFIED IDEOGRAPH + {0xD979, 0x8CE7}, //15367 #CJK UNIFIED IDEOGRAPH + {0xD97A, 0x8CE8}, //15368 #CJK UNIFIED IDEOGRAPH + {0xD97B, 0x8CE9}, //15369 #CJK UNIFIED IDEOGRAPH + {0xD97C, 0x8CEA}, //15370 #CJK UNIFIED IDEOGRAPH + {0xD97D, 0x8CEB}, //15371 #CJK UNIFIED IDEOGRAPH + {0xD97E, 0x8CEC}, //15372 #CJK UNIFIED IDEOGRAPH + {0xD980, 0x8CED}, //15373 #CJK UNIFIED IDEOGRAPH + {0xD981, 0x8CEE}, //15374 #CJK UNIFIED IDEOGRAPH + {0xD982, 0x8CEF}, //15375 #CJK UNIFIED IDEOGRAPH + {0xD983, 0x8CF0}, //15376 #CJK UNIFIED IDEOGRAPH + {0xD984, 0x8CF1}, //15377 #CJK UNIFIED IDEOGRAPH + {0xD985, 0x8CF2}, //15378 #CJK UNIFIED IDEOGRAPH + {0xD986, 0x8CF3}, //15379 #CJK UNIFIED IDEOGRAPH + {0xD987, 0x8CF4}, //15380 #CJK UNIFIED IDEOGRAPH + {0xD988, 0x8CF5}, //15381 #CJK UNIFIED IDEOGRAPH + {0xD989, 0x8CF6}, //15382 #CJK UNIFIED IDEOGRAPH + {0xD98A, 0x8CF7}, //15383 #CJK UNIFIED IDEOGRAPH + {0xD98B, 0x8CF8}, //15384 #CJK UNIFIED IDEOGRAPH + {0xD98C, 0x8CF9}, //15385 #CJK UNIFIED IDEOGRAPH + {0xD98D, 0x8CFA}, //15386 #CJK UNIFIED IDEOGRAPH + {0xD98E, 0x8CFB}, //15387 #CJK UNIFIED IDEOGRAPH + {0xD98F, 0x8CFC}, //15388 #CJK UNIFIED IDEOGRAPH + {0xD990, 0x8CFD}, //15389 #CJK UNIFIED IDEOGRAPH + {0xD991, 0x8CFE}, //15390 #CJK UNIFIED IDEOGRAPH + {0xD992, 0x8CFF}, //15391 #CJK UNIFIED IDEOGRAPH + {0xD993, 0x8D00}, //15392 #CJK UNIFIED IDEOGRAPH + {0xD994, 0x8D01}, //15393 #CJK UNIFIED IDEOGRAPH + {0xD995, 0x8D02}, //15394 #CJK UNIFIED IDEOGRAPH + {0xD996, 0x8D03}, //15395 #CJK UNIFIED IDEOGRAPH + {0xD997, 0x8D04}, //15396 #CJK UNIFIED IDEOGRAPH + {0xD998, 0x8D05}, //15397 #CJK UNIFIED IDEOGRAPH + {0xD999, 0x8D06}, //15398 #CJK UNIFIED IDEOGRAPH + {0xD99A, 0x8D07}, //15399 #CJK UNIFIED IDEOGRAPH + {0xD99B, 0x8D08}, //15400 #CJK UNIFIED IDEOGRAPH + {0xD99C, 0x8D09}, //15401 #CJK UNIFIED IDEOGRAPH + {0xD99D, 0x8D0A}, //15402 #CJK UNIFIED IDEOGRAPH + {0xD99E, 0x8D0B}, //15403 #CJK UNIFIED IDEOGRAPH + {0xD99F, 0x8D0C}, //15404 #CJK UNIFIED IDEOGRAPH + {0xD9A0, 0x8D0D}, //15405 #CJK UNIFIED IDEOGRAPH + {0xD9A1, 0x4F5F}, //15406 #CJK UNIFIED IDEOGRAPH + {0xD9A2, 0x4F57}, //15407 #CJK UNIFIED IDEOGRAPH + {0xD9A3, 0x4F32}, //15408 #CJK UNIFIED IDEOGRAPH + {0xD9A4, 0x4F3D}, //15409 #CJK UNIFIED IDEOGRAPH + {0xD9A5, 0x4F76}, //15410 #CJK UNIFIED IDEOGRAPH + {0xD9A6, 0x4F74}, //15411 #CJK UNIFIED IDEOGRAPH + {0xD9A7, 0x4F91}, //15412 #CJK UNIFIED IDEOGRAPH + {0xD9A8, 0x4F89}, //15413 #CJK UNIFIED IDEOGRAPH + {0xD9A9, 0x4F83}, //15414 #CJK UNIFIED IDEOGRAPH + {0xD9AA, 0x4F8F}, //15415 #CJK UNIFIED IDEOGRAPH + {0xD9AB, 0x4F7E}, //15416 #CJK UNIFIED IDEOGRAPH + {0xD9AC, 0x4F7B}, //15417 #CJK UNIFIED IDEOGRAPH + {0xD9AD, 0x4FAA}, //15418 #CJK UNIFIED IDEOGRAPH + {0xD9AE, 0x4F7C}, //15419 #CJK UNIFIED IDEOGRAPH + {0xD9AF, 0x4FAC}, //15420 #CJK UNIFIED IDEOGRAPH + {0xD9B0, 0x4F94}, //15421 #CJK UNIFIED IDEOGRAPH + {0xD9B1, 0x4FE6}, //15422 #CJK UNIFIED IDEOGRAPH + {0xD9B2, 0x4FE8}, //15423 #CJK UNIFIED IDEOGRAPH + {0xD9B3, 0x4FEA}, //15424 #CJK UNIFIED IDEOGRAPH + {0xD9B4, 0x4FC5}, //15425 #CJK UNIFIED IDEOGRAPH + {0xD9B5, 0x4FDA}, //15426 #CJK UNIFIED IDEOGRAPH + {0xD9B6, 0x4FE3}, //15427 #CJK UNIFIED IDEOGRAPH + {0xD9B7, 0x4FDC}, //15428 #CJK UNIFIED IDEOGRAPH + {0xD9B8, 0x4FD1}, //15429 #CJK UNIFIED IDEOGRAPH + {0xD9B9, 0x4FDF}, //15430 #CJK UNIFIED IDEOGRAPH + {0xD9BA, 0x4FF8}, //15431 #CJK UNIFIED IDEOGRAPH + {0xD9BB, 0x5029}, //15432 #CJK UNIFIED IDEOGRAPH + {0xD9BC, 0x504C}, //15433 #CJK UNIFIED IDEOGRAPH + {0xD9BD, 0x4FF3}, //15434 #CJK UNIFIED IDEOGRAPH + {0xD9BE, 0x502C}, //15435 #CJK UNIFIED IDEOGRAPH + {0xD9BF, 0x500F}, //15436 #CJK UNIFIED IDEOGRAPH + {0xD9C0, 0x502E}, //15437 #CJK UNIFIED IDEOGRAPH + {0xD9C1, 0x502D}, //15438 #CJK UNIFIED IDEOGRAPH + {0xD9C2, 0x4FFE}, //15439 #CJK UNIFIED IDEOGRAPH + {0xD9C3, 0x501C}, //15440 #CJK UNIFIED IDEOGRAPH + {0xD9C4, 0x500C}, //15441 #CJK UNIFIED IDEOGRAPH + {0xD9C5, 0x5025}, //15442 #CJK UNIFIED IDEOGRAPH + {0xD9C6, 0x5028}, //15443 #CJK UNIFIED IDEOGRAPH + {0xD9C7, 0x507E}, //15444 #CJK UNIFIED IDEOGRAPH + {0xD9C8, 0x5043}, //15445 #CJK UNIFIED IDEOGRAPH + {0xD9C9, 0x5055}, //15446 #CJK UNIFIED IDEOGRAPH + {0xD9CA, 0x5048}, //15447 #CJK UNIFIED IDEOGRAPH + {0xD9CB, 0x504E}, //15448 #CJK UNIFIED IDEOGRAPH + {0xD9CC, 0x506C}, //15449 #CJK UNIFIED IDEOGRAPH + {0xD9CD, 0x507B}, //15450 #CJK UNIFIED IDEOGRAPH + {0xD9CE, 0x50A5}, //15451 #CJK UNIFIED IDEOGRAPH + {0xD9CF, 0x50A7}, //15452 #CJK UNIFIED IDEOGRAPH + {0xD9D0, 0x50A9}, //15453 #CJK UNIFIED IDEOGRAPH + {0xD9D1, 0x50BA}, //15454 #CJK UNIFIED IDEOGRAPH + {0xD9D2, 0x50D6}, //15455 #CJK UNIFIED IDEOGRAPH + {0xD9D3, 0x5106}, //15456 #CJK UNIFIED IDEOGRAPH + {0xD9D4, 0x50ED}, //15457 #CJK UNIFIED IDEOGRAPH + {0xD9D5, 0x50EC}, //15458 #CJK UNIFIED IDEOGRAPH + {0xD9D6, 0x50E6}, //15459 #CJK UNIFIED IDEOGRAPH + {0xD9D7, 0x50EE}, //15460 #CJK UNIFIED IDEOGRAPH + {0xD9D8, 0x5107}, //15461 #CJK UNIFIED IDEOGRAPH + {0xD9D9, 0x510B}, //15462 #CJK UNIFIED IDEOGRAPH + {0xD9DA, 0x4EDD}, //15463 #CJK UNIFIED IDEOGRAPH + {0xD9DB, 0x6C3D}, //15464 #CJK UNIFIED IDEOGRAPH + {0xD9DC, 0x4F58}, //15465 #CJK UNIFIED IDEOGRAPH + {0xD9DD, 0x4F65}, //15466 #CJK UNIFIED IDEOGRAPH + {0xD9DE, 0x4FCE}, //15467 #CJK UNIFIED IDEOGRAPH + {0xD9DF, 0x9FA0}, //15468 #CJK UNIFIED IDEOGRAPH + {0xD9E0, 0x6C46}, //15469 #CJK UNIFIED IDEOGRAPH + {0xD9E1, 0x7C74}, //15470 #CJK UNIFIED IDEOGRAPH + {0xD9E2, 0x516E}, //15471 #CJK UNIFIED IDEOGRAPH + {0xD9E3, 0x5DFD}, //15472 #CJK UNIFIED IDEOGRAPH + {0xD9E4, 0x9EC9}, //15473 #CJK UNIFIED IDEOGRAPH + {0xD9E5, 0x9998}, //15474 #CJK UNIFIED IDEOGRAPH + {0xD9E6, 0x5181}, //15475 #CJK UNIFIED IDEOGRAPH + {0xD9E7, 0x5914}, //15476 #CJK UNIFIED IDEOGRAPH + {0xD9E8, 0x52F9}, //15477 #CJK UNIFIED IDEOGRAPH + {0xD9E9, 0x530D}, //15478 #CJK UNIFIED IDEOGRAPH + {0xD9EA, 0x8A07}, //15479 #CJK UNIFIED IDEOGRAPH + {0xD9EB, 0x5310}, //15480 #CJK UNIFIED IDEOGRAPH + {0xD9EC, 0x51EB}, //15481 #CJK UNIFIED IDEOGRAPH + {0xD9ED, 0x5919}, //15482 #CJK UNIFIED IDEOGRAPH + {0xD9EE, 0x5155}, //15483 #CJK UNIFIED IDEOGRAPH + {0xD9EF, 0x4EA0}, //15484 #CJK UNIFIED IDEOGRAPH + {0xD9F0, 0x5156}, //15485 #CJK UNIFIED IDEOGRAPH + {0xD9F1, 0x4EB3}, //15486 #CJK UNIFIED IDEOGRAPH + {0xD9F2, 0x886E}, //15487 #CJK UNIFIED IDEOGRAPH + {0xD9F3, 0x88A4}, //15488 #CJK UNIFIED IDEOGRAPH + {0xD9F4, 0x4EB5}, //15489 #CJK UNIFIED IDEOGRAPH + {0xD9F5, 0x8114}, //15490 #CJK UNIFIED IDEOGRAPH + {0xD9F6, 0x88D2}, //15491 #CJK UNIFIED IDEOGRAPH + {0xD9F7, 0x7980}, //15492 #CJK UNIFIED IDEOGRAPH + {0xD9F8, 0x5B34}, //15493 #CJK UNIFIED IDEOGRAPH + {0xD9F9, 0x8803}, //15494 #CJK UNIFIED IDEOGRAPH + {0xD9FA, 0x7FB8}, //15495 #CJK UNIFIED IDEOGRAPH + {0xD9FB, 0x51AB}, //15496 #CJK UNIFIED IDEOGRAPH + {0xD9FC, 0x51B1}, //15497 #CJK UNIFIED IDEOGRAPH + {0xD9FD, 0x51BD}, //15498 #CJK UNIFIED IDEOGRAPH + {0xD9FE, 0x51BC}, //15499 #CJK UNIFIED IDEOGRAPH + {0xDA40, 0x8D0E}, //15500 #CJK UNIFIED IDEOGRAPH + {0xDA41, 0x8D0F}, //15501 #CJK UNIFIED IDEOGRAPH + {0xDA42, 0x8D10}, //15502 #CJK UNIFIED IDEOGRAPH + {0xDA43, 0x8D11}, //15503 #CJK UNIFIED IDEOGRAPH + {0xDA44, 0x8D12}, //15504 #CJK UNIFIED IDEOGRAPH + {0xDA45, 0x8D13}, //15505 #CJK UNIFIED IDEOGRAPH + {0xDA46, 0x8D14}, //15506 #CJK UNIFIED IDEOGRAPH + {0xDA47, 0x8D15}, //15507 #CJK UNIFIED IDEOGRAPH + {0xDA48, 0x8D16}, //15508 #CJK UNIFIED IDEOGRAPH + {0xDA49, 0x8D17}, //15509 #CJK UNIFIED IDEOGRAPH + {0xDA4A, 0x8D18}, //15510 #CJK UNIFIED IDEOGRAPH + {0xDA4B, 0x8D19}, //15511 #CJK UNIFIED IDEOGRAPH + {0xDA4C, 0x8D1A}, //15512 #CJK UNIFIED IDEOGRAPH + {0xDA4D, 0x8D1B}, //15513 #CJK UNIFIED IDEOGRAPH + {0xDA4E, 0x8D1C}, //15514 #CJK UNIFIED IDEOGRAPH + {0xDA4F, 0x8D20}, //15515 #CJK UNIFIED IDEOGRAPH + {0xDA50, 0x8D51}, //15516 #CJK UNIFIED IDEOGRAPH + {0xDA51, 0x8D52}, //15517 #CJK UNIFIED IDEOGRAPH + {0xDA52, 0x8D57}, //15518 #CJK UNIFIED IDEOGRAPH + {0xDA53, 0x8D5F}, //15519 #CJK UNIFIED IDEOGRAPH + {0xDA54, 0x8D65}, //15520 #CJK UNIFIED IDEOGRAPH + {0xDA55, 0x8D68}, //15521 #CJK UNIFIED IDEOGRAPH + {0xDA56, 0x8D69}, //15522 #CJK UNIFIED IDEOGRAPH + {0xDA57, 0x8D6A}, //15523 #CJK UNIFIED IDEOGRAPH + {0xDA58, 0x8D6C}, //15524 #CJK UNIFIED IDEOGRAPH + {0xDA59, 0x8D6E}, //15525 #CJK UNIFIED IDEOGRAPH + {0xDA5A, 0x8D6F}, //15526 #CJK UNIFIED IDEOGRAPH + {0xDA5B, 0x8D71}, //15527 #CJK UNIFIED IDEOGRAPH + {0xDA5C, 0x8D72}, //15528 #CJK UNIFIED IDEOGRAPH + {0xDA5D, 0x8D78}, //15529 #CJK UNIFIED IDEOGRAPH + {0xDA5E, 0x8D79}, //15530 #CJK UNIFIED IDEOGRAPH + {0xDA5F, 0x8D7A}, //15531 #CJK UNIFIED IDEOGRAPH + {0xDA60, 0x8D7B}, //15532 #CJK UNIFIED IDEOGRAPH + {0xDA61, 0x8D7C}, //15533 #CJK UNIFIED IDEOGRAPH + {0xDA62, 0x8D7D}, //15534 #CJK UNIFIED IDEOGRAPH + {0xDA63, 0x8D7E}, //15535 #CJK UNIFIED IDEOGRAPH + {0xDA64, 0x8D7F}, //15536 #CJK UNIFIED IDEOGRAPH + {0xDA65, 0x8D80}, //15537 #CJK UNIFIED IDEOGRAPH + {0xDA66, 0x8D82}, //15538 #CJK UNIFIED IDEOGRAPH + {0xDA67, 0x8D83}, //15539 #CJK UNIFIED IDEOGRAPH + {0xDA68, 0x8D86}, //15540 #CJK UNIFIED IDEOGRAPH + {0xDA69, 0x8D87}, //15541 #CJK UNIFIED IDEOGRAPH + {0xDA6A, 0x8D88}, //15542 #CJK UNIFIED IDEOGRAPH + {0xDA6B, 0x8D89}, //15543 #CJK UNIFIED IDEOGRAPH + {0xDA6C, 0x8D8C}, //15544 #CJK UNIFIED IDEOGRAPH + {0xDA6D, 0x8D8D}, //15545 #CJK UNIFIED IDEOGRAPH + {0xDA6E, 0x8D8E}, //15546 #CJK UNIFIED IDEOGRAPH + {0xDA6F, 0x8D8F}, //15547 #CJK UNIFIED IDEOGRAPH + {0xDA70, 0x8D90}, //15548 #CJK UNIFIED IDEOGRAPH + {0xDA71, 0x8D92}, //15549 #CJK UNIFIED IDEOGRAPH + {0xDA72, 0x8D93}, //15550 #CJK UNIFIED IDEOGRAPH + {0xDA73, 0x8D95}, //15551 #CJK UNIFIED IDEOGRAPH + {0xDA74, 0x8D96}, //15552 #CJK UNIFIED IDEOGRAPH + {0xDA75, 0x8D97}, //15553 #CJK UNIFIED IDEOGRAPH + {0xDA76, 0x8D98}, //15554 #CJK UNIFIED IDEOGRAPH + {0xDA77, 0x8D99}, //15555 #CJK UNIFIED IDEOGRAPH + {0xDA78, 0x8D9A}, //15556 #CJK UNIFIED IDEOGRAPH + {0xDA79, 0x8D9B}, //15557 #CJK UNIFIED IDEOGRAPH + {0xDA7A, 0x8D9C}, //15558 #CJK UNIFIED IDEOGRAPH + {0xDA7B, 0x8D9D}, //15559 #CJK UNIFIED IDEOGRAPH + {0xDA7C, 0x8D9E}, //15560 #CJK UNIFIED IDEOGRAPH + {0xDA7D, 0x8DA0}, //15561 #CJK UNIFIED IDEOGRAPH + {0xDA7E, 0x8DA1}, //15562 #CJK UNIFIED IDEOGRAPH + {0xDA80, 0x8DA2}, //15563 #CJK UNIFIED IDEOGRAPH + {0xDA81, 0x8DA4}, //15564 #CJK UNIFIED IDEOGRAPH + {0xDA82, 0x8DA5}, //15565 #CJK UNIFIED IDEOGRAPH + {0xDA83, 0x8DA6}, //15566 #CJK UNIFIED IDEOGRAPH + {0xDA84, 0x8DA7}, //15567 #CJK UNIFIED IDEOGRAPH + {0xDA85, 0x8DA8}, //15568 #CJK UNIFIED IDEOGRAPH + {0xDA86, 0x8DA9}, //15569 #CJK UNIFIED IDEOGRAPH + {0xDA87, 0x8DAA}, //15570 #CJK UNIFIED IDEOGRAPH + {0xDA88, 0x8DAB}, //15571 #CJK UNIFIED IDEOGRAPH + {0xDA89, 0x8DAC}, //15572 #CJK UNIFIED IDEOGRAPH + {0xDA8A, 0x8DAD}, //15573 #CJK UNIFIED IDEOGRAPH + {0xDA8B, 0x8DAE}, //15574 #CJK UNIFIED IDEOGRAPH + {0xDA8C, 0x8DAF}, //15575 #CJK UNIFIED IDEOGRAPH + {0xDA8D, 0x8DB0}, //15576 #CJK UNIFIED IDEOGRAPH + {0xDA8E, 0x8DB2}, //15577 #CJK UNIFIED IDEOGRAPH + {0xDA8F, 0x8DB6}, //15578 #CJK UNIFIED IDEOGRAPH + {0xDA90, 0x8DB7}, //15579 #CJK UNIFIED IDEOGRAPH + {0xDA91, 0x8DB9}, //15580 #CJK UNIFIED IDEOGRAPH + {0xDA92, 0x8DBB}, //15581 #CJK UNIFIED IDEOGRAPH + {0xDA93, 0x8DBD}, //15582 #CJK UNIFIED IDEOGRAPH + {0xDA94, 0x8DC0}, //15583 #CJK UNIFIED IDEOGRAPH + {0xDA95, 0x8DC1}, //15584 #CJK UNIFIED IDEOGRAPH + {0xDA96, 0x8DC2}, //15585 #CJK UNIFIED IDEOGRAPH + {0xDA97, 0x8DC5}, //15586 #CJK UNIFIED IDEOGRAPH + {0xDA98, 0x8DC7}, //15587 #CJK UNIFIED IDEOGRAPH + {0xDA99, 0x8DC8}, //15588 #CJK UNIFIED IDEOGRAPH + {0xDA9A, 0x8DC9}, //15589 #CJK UNIFIED IDEOGRAPH + {0xDA9B, 0x8DCA}, //15590 #CJK UNIFIED IDEOGRAPH + {0xDA9C, 0x8DCD}, //15591 #CJK UNIFIED IDEOGRAPH + {0xDA9D, 0x8DD0}, //15592 #CJK UNIFIED IDEOGRAPH + {0xDA9E, 0x8DD2}, //15593 #CJK UNIFIED IDEOGRAPH + {0xDA9F, 0x8DD3}, //15594 #CJK UNIFIED IDEOGRAPH + {0xDAA0, 0x8DD4}, //15595 #CJK UNIFIED IDEOGRAPH + {0xDAA1, 0x51C7}, //15596 #CJK UNIFIED IDEOGRAPH + {0xDAA2, 0x5196}, //15597 #CJK UNIFIED IDEOGRAPH + {0xDAA3, 0x51A2}, //15598 #CJK UNIFIED IDEOGRAPH + {0xDAA4, 0x51A5}, //15599 #CJK UNIFIED IDEOGRAPH + {0xDAA5, 0x8BA0}, //15600 #CJK UNIFIED IDEOGRAPH + {0xDAA6, 0x8BA6}, //15601 #CJK UNIFIED IDEOGRAPH + {0xDAA7, 0x8BA7}, //15602 #CJK UNIFIED IDEOGRAPH + {0xDAA8, 0x8BAA}, //15603 #CJK UNIFIED IDEOGRAPH + {0xDAA9, 0x8BB4}, //15604 #CJK UNIFIED IDEOGRAPH + {0xDAAA, 0x8BB5}, //15605 #CJK UNIFIED IDEOGRAPH + {0xDAAB, 0x8BB7}, //15606 #CJK UNIFIED IDEOGRAPH + {0xDAAC, 0x8BC2}, //15607 #CJK UNIFIED IDEOGRAPH + {0xDAAD, 0x8BC3}, //15608 #CJK UNIFIED IDEOGRAPH + {0xDAAE, 0x8BCB}, //15609 #CJK UNIFIED IDEOGRAPH + {0xDAAF, 0x8BCF}, //15610 #CJK UNIFIED IDEOGRAPH + {0xDAB0, 0x8BCE}, //15611 #CJK UNIFIED IDEOGRAPH + {0xDAB1, 0x8BD2}, //15612 #CJK UNIFIED IDEOGRAPH + {0xDAB2, 0x8BD3}, //15613 #CJK UNIFIED IDEOGRAPH + {0xDAB3, 0x8BD4}, //15614 #CJK UNIFIED IDEOGRAPH + {0xDAB4, 0x8BD6}, //15615 #CJK UNIFIED IDEOGRAPH + {0xDAB5, 0x8BD8}, //15616 #CJK UNIFIED IDEOGRAPH + {0xDAB6, 0x8BD9}, //15617 #CJK UNIFIED IDEOGRAPH + {0xDAB7, 0x8BDC}, //15618 #CJK UNIFIED IDEOGRAPH + {0xDAB8, 0x8BDF}, //15619 #CJK UNIFIED IDEOGRAPH + {0xDAB9, 0x8BE0}, //15620 #CJK UNIFIED IDEOGRAPH + {0xDABA, 0x8BE4}, //15621 #CJK UNIFIED IDEOGRAPH + {0xDABB, 0x8BE8}, //15622 #CJK UNIFIED IDEOGRAPH + {0xDABC, 0x8BE9}, //15623 #CJK UNIFIED IDEOGRAPH + {0xDABD, 0x8BEE}, //15624 #CJK UNIFIED IDEOGRAPH + {0xDABE, 0x8BF0}, //15625 #CJK UNIFIED IDEOGRAPH + {0xDABF, 0x8BF3}, //15626 #CJK UNIFIED IDEOGRAPH + {0xDAC0, 0x8BF6}, //15627 #CJK UNIFIED IDEOGRAPH + {0xDAC1, 0x8BF9}, //15628 #CJK UNIFIED IDEOGRAPH + {0xDAC2, 0x8BFC}, //15629 #CJK UNIFIED IDEOGRAPH + {0xDAC3, 0x8BFF}, //15630 #CJK UNIFIED IDEOGRAPH + {0xDAC4, 0x8C00}, //15631 #CJK UNIFIED IDEOGRAPH + {0xDAC5, 0x8C02}, //15632 #CJK UNIFIED IDEOGRAPH + {0xDAC6, 0x8C04}, //15633 #CJK UNIFIED IDEOGRAPH + {0xDAC7, 0x8C07}, //15634 #CJK UNIFIED IDEOGRAPH + {0xDAC8, 0x8C0C}, //15635 #CJK UNIFIED IDEOGRAPH + {0xDAC9, 0x8C0F}, //15636 #CJK UNIFIED IDEOGRAPH + {0xDACA, 0x8C11}, //15637 #CJK UNIFIED IDEOGRAPH + {0xDACB, 0x8C12}, //15638 #CJK UNIFIED IDEOGRAPH + {0xDACC, 0x8C14}, //15639 #CJK UNIFIED IDEOGRAPH + {0xDACD, 0x8C15}, //15640 #CJK UNIFIED IDEOGRAPH + {0xDACE, 0x8C16}, //15641 #CJK UNIFIED IDEOGRAPH + {0xDACF, 0x8C19}, //15642 #CJK UNIFIED IDEOGRAPH + {0xDAD0, 0x8C1B}, //15643 #CJK UNIFIED IDEOGRAPH + {0xDAD1, 0x8C18}, //15644 #CJK UNIFIED IDEOGRAPH + {0xDAD2, 0x8C1D}, //15645 #CJK UNIFIED IDEOGRAPH + {0xDAD3, 0x8C1F}, //15646 #CJK UNIFIED IDEOGRAPH + {0xDAD4, 0x8C20}, //15647 #CJK UNIFIED IDEOGRAPH + {0xDAD5, 0x8C21}, //15648 #CJK UNIFIED IDEOGRAPH + {0xDAD6, 0x8C25}, //15649 #CJK UNIFIED IDEOGRAPH + {0xDAD7, 0x8C27}, //15650 #CJK UNIFIED IDEOGRAPH + {0xDAD8, 0x8C2A}, //15651 #CJK UNIFIED IDEOGRAPH + {0xDAD9, 0x8C2B}, //15652 #CJK UNIFIED IDEOGRAPH + {0xDADA, 0x8C2E}, //15653 #CJK UNIFIED IDEOGRAPH + {0xDADB, 0x8C2F}, //15654 #CJK UNIFIED IDEOGRAPH + {0xDADC, 0x8C32}, //15655 #CJK UNIFIED IDEOGRAPH + {0xDADD, 0x8C33}, //15656 #CJK UNIFIED IDEOGRAPH + {0xDADE, 0x8C35}, //15657 #CJK UNIFIED IDEOGRAPH + {0xDADF, 0x8C36}, //15658 #CJK UNIFIED IDEOGRAPH + {0xDAE0, 0x5369}, //15659 #CJK UNIFIED IDEOGRAPH + {0xDAE1, 0x537A}, //15660 #CJK UNIFIED IDEOGRAPH + {0xDAE2, 0x961D}, //15661 #CJK UNIFIED IDEOGRAPH + {0xDAE3, 0x9622}, //15662 #CJK UNIFIED IDEOGRAPH + {0xDAE4, 0x9621}, //15663 #CJK UNIFIED IDEOGRAPH + {0xDAE5, 0x9631}, //15664 #CJK UNIFIED IDEOGRAPH + {0xDAE6, 0x962A}, //15665 #CJK UNIFIED IDEOGRAPH + {0xDAE7, 0x963D}, //15666 #CJK UNIFIED IDEOGRAPH + {0xDAE8, 0x963C}, //15667 #CJK UNIFIED IDEOGRAPH + {0xDAE9, 0x9642}, //15668 #CJK UNIFIED IDEOGRAPH + {0xDAEA, 0x9649}, //15669 #CJK UNIFIED IDEOGRAPH + {0xDAEB, 0x9654}, //15670 #CJK UNIFIED IDEOGRAPH + {0xDAEC, 0x965F}, //15671 #CJK UNIFIED IDEOGRAPH + {0xDAED, 0x9667}, //15672 #CJK UNIFIED IDEOGRAPH + {0xDAEE, 0x966C}, //15673 #CJK UNIFIED IDEOGRAPH + {0xDAEF, 0x9672}, //15674 #CJK UNIFIED IDEOGRAPH + {0xDAF0, 0x9674}, //15675 #CJK UNIFIED IDEOGRAPH + {0xDAF1, 0x9688}, //15676 #CJK UNIFIED IDEOGRAPH + {0xDAF2, 0x968D}, //15677 #CJK UNIFIED IDEOGRAPH + {0xDAF3, 0x9697}, //15678 #CJK UNIFIED IDEOGRAPH + {0xDAF4, 0x96B0}, //15679 #CJK UNIFIED IDEOGRAPH + {0xDAF5, 0x9097}, //15680 #CJK UNIFIED IDEOGRAPH + {0xDAF6, 0x909B}, //15681 #CJK UNIFIED IDEOGRAPH + {0xDAF7, 0x909D}, //15682 #CJK UNIFIED IDEOGRAPH + {0xDAF8, 0x9099}, //15683 #CJK UNIFIED IDEOGRAPH + {0xDAF9, 0x90AC}, //15684 #CJK UNIFIED IDEOGRAPH + {0xDAFA, 0x90A1}, //15685 #CJK UNIFIED IDEOGRAPH + {0xDAFB, 0x90B4}, //15686 #CJK UNIFIED IDEOGRAPH + {0xDAFC, 0x90B3}, //15687 #CJK UNIFIED IDEOGRAPH + {0xDAFD, 0x90B6}, //15688 #CJK UNIFIED IDEOGRAPH + {0xDAFE, 0x90BA}, //15689 #CJK UNIFIED IDEOGRAPH + {0xDB40, 0x8DD5}, //15690 #CJK UNIFIED IDEOGRAPH + {0xDB41, 0x8DD8}, //15691 #CJK UNIFIED IDEOGRAPH + {0xDB42, 0x8DD9}, //15692 #CJK UNIFIED IDEOGRAPH + {0xDB43, 0x8DDC}, //15693 #CJK UNIFIED IDEOGRAPH + {0xDB44, 0x8DE0}, //15694 #CJK UNIFIED IDEOGRAPH + {0xDB45, 0x8DE1}, //15695 #CJK UNIFIED IDEOGRAPH + {0xDB46, 0x8DE2}, //15696 #CJK UNIFIED IDEOGRAPH + {0xDB47, 0x8DE5}, //15697 #CJK UNIFIED IDEOGRAPH + {0xDB48, 0x8DE6}, //15698 #CJK UNIFIED IDEOGRAPH + {0xDB49, 0x8DE7}, //15699 #CJK UNIFIED IDEOGRAPH + {0xDB4A, 0x8DE9}, //15700 #CJK UNIFIED IDEOGRAPH + {0xDB4B, 0x8DED}, //15701 #CJK UNIFIED IDEOGRAPH + {0xDB4C, 0x8DEE}, //15702 #CJK UNIFIED IDEOGRAPH + {0xDB4D, 0x8DF0}, //15703 #CJK UNIFIED IDEOGRAPH + {0xDB4E, 0x8DF1}, //15704 #CJK UNIFIED IDEOGRAPH + {0xDB4F, 0x8DF2}, //15705 #CJK UNIFIED IDEOGRAPH + {0xDB50, 0x8DF4}, //15706 #CJK UNIFIED IDEOGRAPH + {0xDB51, 0x8DF6}, //15707 #CJK UNIFIED IDEOGRAPH + {0xDB52, 0x8DFC}, //15708 #CJK UNIFIED IDEOGRAPH + {0xDB53, 0x8DFE}, //15709 #CJK UNIFIED IDEOGRAPH + {0xDB54, 0x8DFF}, //15710 #CJK UNIFIED IDEOGRAPH + {0xDB55, 0x8E00}, //15711 #CJK UNIFIED IDEOGRAPH + {0xDB56, 0x8E01}, //15712 #CJK UNIFIED IDEOGRAPH + {0xDB57, 0x8E02}, //15713 #CJK UNIFIED IDEOGRAPH + {0xDB58, 0x8E03}, //15714 #CJK UNIFIED IDEOGRAPH + {0xDB59, 0x8E04}, //15715 #CJK UNIFIED IDEOGRAPH + {0xDB5A, 0x8E06}, //15716 #CJK UNIFIED IDEOGRAPH + {0xDB5B, 0x8E07}, //15717 #CJK UNIFIED IDEOGRAPH + {0xDB5C, 0x8E08}, //15718 #CJK UNIFIED IDEOGRAPH + {0xDB5D, 0x8E0B}, //15719 #CJK UNIFIED IDEOGRAPH + {0xDB5E, 0x8E0D}, //15720 #CJK UNIFIED IDEOGRAPH + {0xDB5F, 0x8E0E}, //15721 #CJK UNIFIED IDEOGRAPH + {0xDB60, 0x8E10}, //15722 #CJK UNIFIED IDEOGRAPH + {0xDB61, 0x8E11}, //15723 #CJK UNIFIED IDEOGRAPH + {0xDB62, 0x8E12}, //15724 #CJK UNIFIED IDEOGRAPH + {0xDB63, 0x8E13}, //15725 #CJK UNIFIED IDEOGRAPH + {0xDB64, 0x8E15}, //15726 #CJK UNIFIED IDEOGRAPH + {0xDB65, 0x8E16}, //15727 #CJK UNIFIED IDEOGRAPH + {0xDB66, 0x8E17}, //15728 #CJK UNIFIED IDEOGRAPH + {0xDB67, 0x8E18}, //15729 #CJK UNIFIED IDEOGRAPH + {0xDB68, 0x8E19}, //15730 #CJK UNIFIED IDEOGRAPH + {0xDB69, 0x8E1A}, //15731 #CJK UNIFIED IDEOGRAPH + {0xDB6A, 0x8E1B}, //15732 #CJK UNIFIED IDEOGRAPH + {0xDB6B, 0x8E1C}, //15733 #CJK UNIFIED IDEOGRAPH + {0xDB6C, 0x8E20}, //15734 #CJK UNIFIED IDEOGRAPH + {0xDB6D, 0x8E21}, //15735 #CJK UNIFIED IDEOGRAPH + {0xDB6E, 0x8E24}, //15736 #CJK UNIFIED IDEOGRAPH + {0xDB6F, 0x8E25}, //15737 #CJK UNIFIED IDEOGRAPH + {0xDB70, 0x8E26}, //15738 #CJK UNIFIED IDEOGRAPH + {0xDB71, 0x8E27}, //15739 #CJK UNIFIED IDEOGRAPH + {0xDB72, 0x8E28}, //15740 #CJK UNIFIED IDEOGRAPH + {0xDB73, 0x8E2B}, //15741 #CJK UNIFIED IDEOGRAPH + {0xDB74, 0x8E2D}, //15742 #CJK UNIFIED IDEOGRAPH + {0xDB75, 0x8E30}, //15743 #CJK UNIFIED IDEOGRAPH + {0xDB76, 0x8E32}, //15744 #CJK UNIFIED IDEOGRAPH + {0xDB77, 0x8E33}, //15745 #CJK UNIFIED IDEOGRAPH + {0xDB78, 0x8E34}, //15746 #CJK UNIFIED IDEOGRAPH + {0xDB79, 0x8E36}, //15747 #CJK UNIFIED IDEOGRAPH + {0xDB7A, 0x8E37}, //15748 #CJK UNIFIED IDEOGRAPH + {0xDB7B, 0x8E38}, //15749 #CJK UNIFIED IDEOGRAPH + {0xDB7C, 0x8E3B}, //15750 #CJK UNIFIED IDEOGRAPH + {0xDB7D, 0x8E3C}, //15751 #CJK UNIFIED IDEOGRAPH + {0xDB7E, 0x8E3E}, //15752 #CJK UNIFIED IDEOGRAPH + {0xDB80, 0x8E3F}, //15753 #CJK UNIFIED IDEOGRAPH + {0xDB81, 0x8E43}, //15754 #CJK UNIFIED IDEOGRAPH + {0xDB82, 0x8E45}, //15755 #CJK UNIFIED IDEOGRAPH + {0xDB83, 0x8E46}, //15756 #CJK UNIFIED IDEOGRAPH + {0xDB84, 0x8E4C}, //15757 #CJK UNIFIED IDEOGRAPH + {0xDB85, 0x8E4D}, //15758 #CJK UNIFIED IDEOGRAPH + {0xDB86, 0x8E4E}, //15759 #CJK UNIFIED IDEOGRAPH + {0xDB87, 0x8E4F}, //15760 #CJK UNIFIED IDEOGRAPH + {0xDB88, 0x8E50}, //15761 #CJK UNIFIED IDEOGRAPH + {0xDB89, 0x8E53}, //15762 #CJK UNIFIED IDEOGRAPH + {0xDB8A, 0x8E54}, //15763 #CJK UNIFIED IDEOGRAPH + {0xDB8B, 0x8E55}, //15764 #CJK UNIFIED IDEOGRAPH + {0xDB8C, 0x8E56}, //15765 #CJK UNIFIED IDEOGRAPH + {0xDB8D, 0x8E57}, //15766 #CJK UNIFIED IDEOGRAPH + {0xDB8E, 0x8E58}, //15767 #CJK UNIFIED IDEOGRAPH + {0xDB8F, 0x8E5A}, //15768 #CJK UNIFIED IDEOGRAPH + {0xDB90, 0x8E5B}, //15769 #CJK UNIFIED IDEOGRAPH + {0xDB91, 0x8E5C}, //15770 #CJK UNIFIED IDEOGRAPH + {0xDB92, 0x8E5D}, //15771 #CJK UNIFIED IDEOGRAPH + {0xDB93, 0x8E5E}, //15772 #CJK UNIFIED IDEOGRAPH + {0xDB94, 0x8E5F}, //15773 #CJK UNIFIED IDEOGRAPH + {0xDB95, 0x8E60}, //15774 #CJK UNIFIED IDEOGRAPH + {0xDB96, 0x8E61}, //15775 #CJK UNIFIED IDEOGRAPH + {0xDB97, 0x8E62}, //15776 #CJK UNIFIED IDEOGRAPH + {0xDB98, 0x8E63}, //15777 #CJK UNIFIED IDEOGRAPH + {0xDB99, 0x8E64}, //15778 #CJK UNIFIED IDEOGRAPH + {0xDB9A, 0x8E65}, //15779 #CJK UNIFIED IDEOGRAPH + {0xDB9B, 0x8E67}, //15780 #CJK UNIFIED IDEOGRAPH + {0xDB9C, 0x8E68}, //15781 #CJK UNIFIED IDEOGRAPH + {0xDB9D, 0x8E6A}, //15782 #CJK UNIFIED IDEOGRAPH + {0xDB9E, 0x8E6B}, //15783 #CJK UNIFIED IDEOGRAPH + {0xDB9F, 0x8E6E}, //15784 #CJK UNIFIED IDEOGRAPH + {0xDBA0, 0x8E71}, //15785 #CJK UNIFIED IDEOGRAPH + {0xDBA1, 0x90B8}, //15786 #CJK UNIFIED IDEOGRAPH + {0xDBA2, 0x90B0}, //15787 #CJK UNIFIED IDEOGRAPH + {0xDBA3, 0x90CF}, //15788 #CJK UNIFIED IDEOGRAPH + {0xDBA4, 0x90C5}, //15789 #CJK UNIFIED IDEOGRAPH + {0xDBA5, 0x90BE}, //15790 #CJK UNIFIED IDEOGRAPH + {0xDBA6, 0x90D0}, //15791 #CJK UNIFIED IDEOGRAPH + {0xDBA7, 0x90C4}, //15792 #CJK UNIFIED IDEOGRAPH + {0xDBA8, 0x90C7}, //15793 #CJK UNIFIED IDEOGRAPH + {0xDBA9, 0x90D3}, //15794 #CJK UNIFIED IDEOGRAPH + {0xDBAA, 0x90E6}, //15795 #CJK UNIFIED IDEOGRAPH + {0xDBAB, 0x90E2}, //15796 #CJK UNIFIED IDEOGRAPH + {0xDBAC, 0x90DC}, //15797 #CJK UNIFIED IDEOGRAPH + {0xDBAD, 0x90D7}, //15798 #CJK UNIFIED IDEOGRAPH + {0xDBAE, 0x90DB}, //15799 #CJK UNIFIED IDEOGRAPH + {0xDBAF, 0x90EB}, //15800 #CJK UNIFIED IDEOGRAPH + {0xDBB0, 0x90EF}, //15801 #CJK UNIFIED IDEOGRAPH + {0xDBB1, 0x90FE}, //15802 #CJK UNIFIED IDEOGRAPH + {0xDBB2, 0x9104}, //15803 #CJK UNIFIED IDEOGRAPH + {0xDBB3, 0x9122}, //15804 #CJK UNIFIED IDEOGRAPH + {0xDBB4, 0x911E}, //15805 #CJK UNIFIED IDEOGRAPH + {0xDBB5, 0x9123}, //15806 #CJK UNIFIED IDEOGRAPH + {0xDBB6, 0x9131}, //15807 #CJK UNIFIED IDEOGRAPH + {0xDBB7, 0x912F}, //15808 #CJK UNIFIED IDEOGRAPH + {0xDBB8, 0x9139}, //15809 #CJK UNIFIED IDEOGRAPH + {0xDBB9, 0x9143}, //15810 #CJK UNIFIED IDEOGRAPH + {0xDBBA, 0x9146}, //15811 #CJK UNIFIED IDEOGRAPH + {0xDBBB, 0x520D}, //15812 #CJK UNIFIED IDEOGRAPH + {0xDBBC, 0x5942}, //15813 #CJK UNIFIED IDEOGRAPH + {0xDBBD, 0x52A2}, //15814 #CJK UNIFIED IDEOGRAPH + {0xDBBE, 0x52AC}, //15815 #CJK UNIFIED IDEOGRAPH + {0xDBBF, 0x52AD}, //15816 #CJK UNIFIED IDEOGRAPH + {0xDBC0, 0x52BE}, //15817 #CJK UNIFIED IDEOGRAPH + {0xDBC1, 0x54FF}, //15818 #CJK UNIFIED IDEOGRAPH + {0xDBC2, 0x52D0}, //15819 #CJK UNIFIED IDEOGRAPH + {0xDBC3, 0x52D6}, //15820 #CJK UNIFIED IDEOGRAPH + {0xDBC4, 0x52F0}, //15821 #CJK UNIFIED IDEOGRAPH + {0xDBC5, 0x53DF}, //15822 #CJK UNIFIED IDEOGRAPH + {0xDBC6, 0x71EE}, //15823 #CJK UNIFIED IDEOGRAPH + {0xDBC7, 0x77CD}, //15824 #CJK UNIFIED IDEOGRAPH + {0xDBC8, 0x5EF4}, //15825 #CJK UNIFIED IDEOGRAPH + {0xDBC9, 0x51F5}, //15826 #CJK UNIFIED IDEOGRAPH + {0xDBCA, 0x51FC}, //15827 #CJK UNIFIED IDEOGRAPH + {0xDBCB, 0x9B2F}, //15828 #CJK UNIFIED IDEOGRAPH + {0xDBCC, 0x53B6}, //15829 #CJK UNIFIED IDEOGRAPH + {0xDBCD, 0x5F01}, //15830 #CJK UNIFIED IDEOGRAPH + {0xDBCE, 0x755A}, //15831 #CJK UNIFIED IDEOGRAPH + {0xDBCF, 0x5DEF}, //15832 #CJK UNIFIED IDEOGRAPH + {0xDBD0, 0x574C}, //15833 #CJK UNIFIED IDEOGRAPH + {0xDBD1, 0x57A9}, //15834 #CJK UNIFIED IDEOGRAPH + {0xDBD2, 0x57A1}, //15835 #CJK UNIFIED IDEOGRAPH + {0xDBD3, 0x587E}, //15836 #CJK UNIFIED IDEOGRAPH + {0xDBD4, 0x58BC}, //15837 #CJK UNIFIED IDEOGRAPH + {0xDBD5, 0x58C5}, //15838 #CJK UNIFIED IDEOGRAPH + {0xDBD6, 0x58D1}, //15839 #CJK UNIFIED IDEOGRAPH + {0xDBD7, 0x5729}, //15840 #CJK UNIFIED IDEOGRAPH + {0xDBD8, 0x572C}, //15841 #CJK UNIFIED IDEOGRAPH + {0xDBD9, 0x572A}, //15842 #CJK UNIFIED IDEOGRAPH + {0xDBDA, 0x5733}, //15843 #CJK UNIFIED IDEOGRAPH + {0xDBDB, 0x5739}, //15844 #CJK UNIFIED IDEOGRAPH + {0xDBDC, 0x572E}, //15845 #CJK UNIFIED IDEOGRAPH + {0xDBDD, 0x572F}, //15846 #CJK UNIFIED IDEOGRAPH + {0xDBDE, 0x575C}, //15847 #CJK UNIFIED IDEOGRAPH + {0xDBDF, 0x573B}, //15848 #CJK UNIFIED IDEOGRAPH + {0xDBE0, 0x5742}, //15849 #CJK UNIFIED IDEOGRAPH + {0xDBE1, 0x5769}, //15850 #CJK UNIFIED IDEOGRAPH + {0xDBE2, 0x5785}, //15851 #CJK UNIFIED IDEOGRAPH + {0xDBE3, 0x576B}, //15852 #CJK UNIFIED IDEOGRAPH + {0xDBE4, 0x5786}, //15853 #CJK UNIFIED IDEOGRAPH + {0xDBE5, 0x577C}, //15854 #CJK UNIFIED IDEOGRAPH + {0xDBE6, 0x577B}, //15855 #CJK UNIFIED IDEOGRAPH + {0xDBE7, 0x5768}, //15856 #CJK UNIFIED IDEOGRAPH + {0xDBE8, 0x576D}, //15857 #CJK UNIFIED IDEOGRAPH + {0xDBE9, 0x5776}, //15858 #CJK UNIFIED IDEOGRAPH + {0xDBEA, 0x5773}, //15859 #CJK UNIFIED IDEOGRAPH + {0xDBEB, 0x57AD}, //15860 #CJK UNIFIED IDEOGRAPH + {0xDBEC, 0x57A4}, //15861 #CJK UNIFIED IDEOGRAPH + {0xDBED, 0x578C}, //15862 #CJK UNIFIED IDEOGRAPH + {0xDBEE, 0x57B2}, //15863 #CJK UNIFIED IDEOGRAPH + {0xDBEF, 0x57CF}, //15864 #CJK UNIFIED IDEOGRAPH + {0xDBF0, 0x57A7}, //15865 #CJK UNIFIED IDEOGRAPH + {0xDBF1, 0x57B4}, //15866 #CJK UNIFIED IDEOGRAPH + {0xDBF2, 0x5793}, //15867 #CJK UNIFIED IDEOGRAPH + {0xDBF3, 0x57A0}, //15868 #CJK UNIFIED IDEOGRAPH + {0xDBF4, 0x57D5}, //15869 #CJK UNIFIED IDEOGRAPH + {0xDBF5, 0x57D8}, //15870 #CJK UNIFIED IDEOGRAPH + {0xDBF6, 0x57DA}, //15871 #CJK UNIFIED IDEOGRAPH + {0xDBF7, 0x57D9}, //15872 #CJK UNIFIED IDEOGRAPH + {0xDBF8, 0x57D2}, //15873 #CJK UNIFIED IDEOGRAPH + {0xDBF9, 0x57B8}, //15874 #CJK UNIFIED IDEOGRAPH + {0xDBFA, 0x57F4}, //15875 #CJK UNIFIED IDEOGRAPH + {0xDBFB, 0x57EF}, //15876 #CJK UNIFIED IDEOGRAPH + {0xDBFC, 0x57F8}, //15877 #CJK UNIFIED IDEOGRAPH + {0xDBFD, 0x57E4}, //15878 #CJK UNIFIED IDEOGRAPH + {0xDBFE, 0x57DD}, //15879 #CJK UNIFIED IDEOGRAPH + {0xDC40, 0x8E73}, //15880 #CJK UNIFIED IDEOGRAPH + {0xDC41, 0x8E75}, //15881 #CJK UNIFIED IDEOGRAPH + {0xDC42, 0x8E77}, //15882 #CJK UNIFIED IDEOGRAPH + {0xDC43, 0x8E78}, //15883 #CJK UNIFIED IDEOGRAPH + {0xDC44, 0x8E79}, //15884 #CJK UNIFIED IDEOGRAPH + {0xDC45, 0x8E7A}, //15885 #CJK UNIFIED IDEOGRAPH + {0xDC46, 0x8E7B}, //15886 #CJK UNIFIED IDEOGRAPH + {0xDC47, 0x8E7D}, //15887 #CJK UNIFIED IDEOGRAPH + {0xDC48, 0x8E7E}, //15888 #CJK UNIFIED IDEOGRAPH + {0xDC49, 0x8E80}, //15889 #CJK UNIFIED IDEOGRAPH + {0xDC4A, 0x8E82}, //15890 #CJK UNIFIED IDEOGRAPH + {0xDC4B, 0x8E83}, //15891 #CJK UNIFIED IDEOGRAPH + {0xDC4C, 0x8E84}, //15892 #CJK UNIFIED IDEOGRAPH + {0xDC4D, 0x8E86}, //15893 #CJK UNIFIED IDEOGRAPH + {0xDC4E, 0x8E88}, //15894 #CJK UNIFIED IDEOGRAPH + {0xDC4F, 0x8E89}, //15895 #CJK UNIFIED IDEOGRAPH + {0xDC50, 0x8E8A}, //15896 #CJK UNIFIED IDEOGRAPH + {0xDC51, 0x8E8B}, //15897 #CJK UNIFIED IDEOGRAPH + {0xDC52, 0x8E8C}, //15898 #CJK UNIFIED IDEOGRAPH + {0xDC53, 0x8E8D}, //15899 #CJK UNIFIED IDEOGRAPH + {0xDC54, 0x8E8E}, //15900 #CJK UNIFIED IDEOGRAPH + {0xDC55, 0x8E91}, //15901 #CJK UNIFIED IDEOGRAPH + {0xDC56, 0x8E92}, //15902 #CJK UNIFIED IDEOGRAPH + {0xDC57, 0x8E93}, //15903 #CJK UNIFIED IDEOGRAPH + {0xDC58, 0x8E95}, //15904 #CJK UNIFIED IDEOGRAPH + {0xDC59, 0x8E96}, //15905 #CJK UNIFIED IDEOGRAPH + {0xDC5A, 0x8E97}, //15906 #CJK UNIFIED IDEOGRAPH + {0xDC5B, 0x8E98}, //15907 #CJK UNIFIED IDEOGRAPH + {0xDC5C, 0x8E99}, //15908 #CJK UNIFIED IDEOGRAPH + {0xDC5D, 0x8E9A}, //15909 #CJK UNIFIED IDEOGRAPH + {0xDC5E, 0x8E9B}, //15910 #CJK UNIFIED IDEOGRAPH + {0xDC5F, 0x8E9D}, //15911 #CJK UNIFIED IDEOGRAPH + {0xDC60, 0x8E9F}, //15912 #CJK UNIFIED IDEOGRAPH + {0xDC61, 0x8EA0}, //15913 #CJK UNIFIED IDEOGRAPH + {0xDC62, 0x8EA1}, //15914 #CJK UNIFIED IDEOGRAPH + {0xDC63, 0x8EA2}, //15915 #CJK UNIFIED IDEOGRAPH + {0xDC64, 0x8EA3}, //15916 #CJK UNIFIED IDEOGRAPH + {0xDC65, 0x8EA4}, //15917 #CJK UNIFIED IDEOGRAPH + {0xDC66, 0x8EA5}, //15918 #CJK UNIFIED IDEOGRAPH + {0xDC67, 0x8EA6}, //15919 #CJK UNIFIED IDEOGRAPH + {0xDC68, 0x8EA7}, //15920 #CJK UNIFIED IDEOGRAPH + {0xDC69, 0x8EA8}, //15921 #CJK UNIFIED IDEOGRAPH + {0xDC6A, 0x8EA9}, //15922 #CJK UNIFIED IDEOGRAPH + {0xDC6B, 0x8EAA}, //15923 #CJK UNIFIED IDEOGRAPH + {0xDC6C, 0x8EAD}, //15924 #CJK UNIFIED IDEOGRAPH + {0xDC6D, 0x8EAE}, //15925 #CJK UNIFIED IDEOGRAPH + {0xDC6E, 0x8EB0}, //15926 #CJK UNIFIED IDEOGRAPH + {0xDC6F, 0x8EB1}, //15927 #CJK UNIFIED IDEOGRAPH + {0xDC70, 0x8EB3}, //15928 #CJK UNIFIED IDEOGRAPH + {0xDC71, 0x8EB4}, //15929 #CJK UNIFIED IDEOGRAPH + {0xDC72, 0x8EB5}, //15930 #CJK UNIFIED IDEOGRAPH + {0xDC73, 0x8EB6}, //15931 #CJK UNIFIED IDEOGRAPH + {0xDC74, 0x8EB7}, //15932 #CJK UNIFIED IDEOGRAPH + {0xDC75, 0x8EB8}, //15933 #CJK UNIFIED IDEOGRAPH + {0xDC76, 0x8EB9}, //15934 #CJK UNIFIED IDEOGRAPH + {0xDC77, 0x8EBB}, //15935 #CJK UNIFIED IDEOGRAPH + {0xDC78, 0x8EBC}, //15936 #CJK UNIFIED IDEOGRAPH + {0xDC79, 0x8EBD}, //15937 #CJK UNIFIED IDEOGRAPH + {0xDC7A, 0x8EBE}, //15938 #CJK UNIFIED IDEOGRAPH + {0xDC7B, 0x8EBF}, //15939 #CJK UNIFIED IDEOGRAPH + {0xDC7C, 0x8EC0}, //15940 #CJK UNIFIED IDEOGRAPH + {0xDC7D, 0x8EC1}, //15941 #CJK UNIFIED IDEOGRAPH + {0xDC7E, 0x8EC2}, //15942 #CJK UNIFIED IDEOGRAPH + {0xDC80, 0x8EC3}, //15943 #CJK UNIFIED IDEOGRAPH + {0xDC81, 0x8EC4}, //15944 #CJK UNIFIED IDEOGRAPH + {0xDC82, 0x8EC5}, //15945 #CJK UNIFIED IDEOGRAPH + {0xDC83, 0x8EC6}, //15946 #CJK UNIFIED IDEOGRAPH + {0xDC84, 0x8EC7}, //15947 #CJK UNIFIED IDEOGRAPH + {0xDC85, 0x8EC8}, //15948 #CJK UNIFIED IDEOGRAPH + {0xDC86, 0x8EC9}, //15949 #CJK UNIFIED IDEOGRAPH + {0xDC87, 0x8ECA}, //15950 #CJK UNIFIED IDEOGRAPH + {0xDC88, 0x8ECB}, //15951 #CJK UNIFIED IDEOGRAPH + {0xDC89, 0x8ECC}, //15952 #CJK UNIFIED IDEOGRAPH + {0xDC8A, 0x8ECD}, //15953 #CJK UNIFIED IDEOGRAPH + {0xDC8B, 0x8ECF}, //15954 #CJK UNIFIED IDEOGRAPH + {0xDC8C, 0x8ED0}, //15955 #CJK UNIFIED IDEOGRAPH + {0xDC8D, 0x8ED1}, //15956 #CJK UNIFIED IDEOGRAPH + {0xDC8E, 0x8ED2}, //15957 #CJK UNIFIED IDEOGRAPH + {0xDC8F, 0x8ED3}, //15958 #CJK UNIFIED IDEOGRAPH + {0xDC90, 0x8ED4}, //15959 #CJK UNIFIED IDEOGRAPH + {0xDC91, 0x8ED5}, //15960 #CJK UNIFIED IDEOGRAPH + {0xDC92, 0x8ED6}, //15961 #CJK UNIFIED IDEOGRAPH + {0xDC93, 0x8ED7}, //15962 #CJK UNIFIED IDEOGRAPH + {0xDC94, 0x8ED8}, //15963 #CJK UNIFIED IDEOGRAPH + {0xDC95, 0x8ED9}, //15964 #CJK UNIFIED IDEOGRAPH + {0xDC96, 0x8EDA}, //15965 #CJK UNIFIED IDEOGRAPH + {0xDC97, 0x8EDB}, //15966 #CJK UNIFIED IDEOGRAPH + {0xDC98, 0x8EDC}, //15967 #CJK UNIFIED IDEOGRAPH + {0xDC99, 0x8EDD}, //15968 #CJK UNIFIED IDEOGRAPH + {0xDC9A, 0x8EDE}, //15969 #CJK UNIFIED IDEOGRAPH + {0xDC9B, 0x8EDF}, //15970 #CJK UNIFIED IDEOGRAPH + {0xDC9C, 0x8EE0}, //15971 #CJK UNIFIED IDEOGRAPH + {0xDC9D, 0x8EE1}, //15972 #CJK UNIFIED IDEOGRAPH + {0xDC9E, 0x8EE2}, //15973 #CJK UNIFIED IDEOGRAPH + {0xDC9F, 0x8EE3}, //15974 #CJK UNIFIED IDEOGRAPH + {0xDCA0, 0x8EE4}, //15975 #CJK UNIFIED IDEOGRAPH + {0xDCA1, 0x580B}, //15976 #CJK UNIFIED IDEOGRAPH + {0xDCA2, 0x580D}, //15977 #CJK UNIFIED IDEOGRAPH + {0xDCA3, 0x57FD}, //15978 #CJK UNIFIED IDEOGRAPH + {0xDCA4, 0x57ED}, //15979 #CJK UNIFIED IDEOGRAPH + {0xDCA5, 0x5800}, //15980 #CJK UNIFIED IDEOGRAPH + {0xDCA6, 0x581E}, //15981 #CJK UNIFIED IDEOGRAPH + {0xDCA7, 0x5819}, //15982 #CJK UNIFIED IDEOGRAPH + {0xDCA8, 0x5844}, //15983 #CJK UNIFIED IDEOGRAPH + {0xDCA9, 0x5820}, //15984 #CJK UNIFIED IDEOGRAPH + {0xDCAA, 0x5865}, //15985 #CJK UNIFIED IDEOGRAPH + {0xDCAB, 0x586C}, //15986 #CJK UNIFIED IDEOGRAPH + {0xDCAC, 0x5881}, //15987 #CJK UNIFIED IDEOGRAPH + {0xDCAD, 0x5889}, //15988 #CJK UNIFIED IDEOGRAPH + {0xDCAE, 0x589A}, //15989 #CJK UNIFIED IDEOGRAPH + {0xDCAF, 0x5880}, //15990 #CJK UNIFIED IDEOGRAPH + {0xDCB0, 0x99A8}, //15991 #CJK UNIFIED IDEOGRAPH + {0xDCB1, 0x9F19}, //15992 #CJK UNIFIED IDEOGRAPH + {0xDCB2, 0x61FF}, //15993 #CJK UNIFIED IDEOGRAPH + {0xDCB3, 0x8279}, //15994 #CJK UNIFIED IDEOGRAPH + {0xDCB4, 0x827D}, //15995 #CJK UNIFIED IDEOGRAPH + {0xDCB5, 0x827F}, //15996 #CJK UNIFIED IDEOGRAPH + {0xDCB6, 0x828F}, //15997 #CJK UNIFIED IDEOGRAPH + {0xDCB7, 0x828A}, //15998 #CJK UNIFIED IDEOGRAPH + {0xDCB8, 0x82A8}, //15999 #CJK UNIFIED IDEOGRAPH + {0xDCB9, 0x8284}, //16000 #CJK UNIFIED IDEOGRAPH + {0xDCBA, 0x828E}, //16001 #CJK UNIFIED IDEOGRAPH + {0xDCBB, 0x8291}, //16002 #CJK UNIFIED IDEOGRAPH + {0xDCBC, 0x8297}, //16003 #CJK UNIFIED IDEOGRAPH + {0xDCBD, 0x8299}, //16004 #CJK UNIFIED IDEOGRAPH + {0xDCBE, 0x82AB}, //16005 #CJK UNIFIED IDEOGRAPH + {0xDCBF, 0x82B8}, //16006 #CJK UNIFIED IDEOGRAPH + {0xDCC0, 0x82BE}, //16007 #CJK UNIFIED IDEOGRAPH + {0xDCC1, 0x82B0}, //16008 #CJK UNIFIED IDEOGRAPH + {0xDCC2, 0x82C8}, //16009 #CJK UNIFIED IDEOGRAPH + {0xDCC3, 0x82CA}, //16010 #CJK UNIFIED IDEOGRAPH + {0xDCC4, 0x82E3}, //16011 #CJK UNIFIED IDEOGRAPH + {0xDCC5, 0x8298}, //16012 #CJK UNIFIED IDEOGRAPH + {0xDCC6, 0x82B7}, //16013 #CJK UNIFIED IDEOGRAPH + {0xDCC7, 0x82AE}, //16014 #CJK UNIFIED IDEOGRAPH + {0xDCC8, 0x82CB}, //16015 #CJK UNIFIED IDEOGRAPH + {0xDCC9, 0x82CC}, //16016 #CJK UNIFIED IDEOGRAPH + {0xDCCA, 0x82C1}, //16017 #CJK UNIFIED IDEOGRAPH + {0xDCCB, 0x82A9}, //16018 #CJK UNIFIED IDEOGRAPH + {0xDCCC, 0x82B4}, //16019 #CJK UNIFIED IDEOGRAPH + {0xDCCD, 0x82A1}, //16020 #CJK UNIFIED IDEOGRAPH + {0xDCCE, 0x82AA}, //16021 #CJK UNIFIED IDEOGRAPH + {0xDCCF, 0x829F}, //16022 #CJK UNIFIED IDEOGRAPH + {0xDCD0, 0x82C4}, //16023 #CJK UNIFIED IDEOGRAPH + {0xDCD1, 0x82CE}, //16024 #CJK UNIFIED IDEOGRAPH + {0xDCD2, 0x82A4}, //16025 #CJK UNIFIED IDEOGRAPH + {0xDCD3, 0x82E1}, //16026 #CJK UNIFIED IDEOGRAPH + {0xDCD4, 0x8309}, //16027 #CJK UNIFIED IDEOGRAPH + {0xDCD5, 0x82F7}, //16028 #CJK UNIFIED IDEOGRAPH + {0xDCD6, 0x82E4}, //16029 #CJK UNIFIED IDEOGRAPH + {0xDCD7, 0x830F}, //16030 #CJK UNIFIED IDEOGRAPH + {0xDCD8, 0x8307}, //16031 #CJK UNIFIED IDEOGRAPH + {0xDCD9, 0x82DC}, //16032 #CJK UNIFIED IDEOGRAPH + {0xDCDA, 0x82F4}, //16033 #CJK UNIFIED IDEOGRAPH + {0xDCDB, 0x82D2}, //16034 #CJK UNIFIED IDEOGRAPH + {0xDCDC, 0x82D8}, //16035 #CJK UNIFIED IDEOGRAPH + {0xDCDD, 0x830C}, //16036 #CJK UNIFIED IDEOGRAPH + {0xDCDE, 0x82FB}, //16037 #CJK UNIFIED IDEOGRAPH + {0xDCDF, 0x82D3}, //16038 #CJK UNIFIED IDEOGRAPH + {0xDCE0, 0x8311}, //16039 #CJK UNIFIED IDEOGRAPH + {0xDCE1, 0x831A}, //16040 #CJK UNIFIED IDEOGRAPH + {0xDCE2, 0x8306}, //16041 #CJK UNIFIED IDEOGRAPH + {0xDCE3, 0x8314}, //16042 #CJK UNIFIED IDEOGRAPH + {0xDCE4, 0x8315}, //16043 #CJK UNIFIED IDEOGRAPH + {0xDCE5, 0x82E0}, //16044 #CJK UNIFIED IDEOGRAPH + {0xDCE6, 0x82D5}, //16045 #CJK UNIFIED IDEOGRAPH + {0xDCE7, 0x831C}, //16046 #CJK UNIFIED IDEOGRAPH + {0xDCE8, 0x8351}, //16047 #CJK UNIFIED IDEOGRAPH + {0xDCE9, 0x835B}, //16048 #CJK UNIFIED IDEOGRAPH + {0xDCEA, 0x835C}, //16049 #CJK UNIFIED IDEOGRAPH + {0xDCEB, 0x8308}, //16050 #CJK UNIFIED IDEOGRAPH + {0xDCEC, 0x8392}, //16051 #CJK UNIFIED IDEOGRAPH + {0xDCED, 0x833C}, //16052 #CJK UNIFIED IDEOGRAPH + {0xDCEE, 0x8334}, //16053 #CJK UNIFIED IDEOGRAPH + {0xDCEF, 0x8331}, //16054 #CJK UNIFIED IDEOGRAPH + {0xDCF0, 0x839B}, //16055 #CJK UNIFIED IDEOGRAPH + {0xDCF1, 0x835E}, //16056 #CJK UNIFIED IDEOGRAPH + {0xDCF2, 0x832F}, //16057 #CJK UNIFIED IDEOGRAPH + {0xDCF3, 0x834F}, //16058 #CJK UNIFIED IDEOGRAPH + {0xDCF4, 0x8347}, //16059 #CJK UNIFIED IDEOGRAPH + {0xDCF5, 0x8343}, //16060 #CJK UNIFIED IDEOGRAPH + {0xDCF6, 0x835F}, //16061 #CJK UNIFIED IDEOGRAPH + {0xDCF7, 0x8340}, //16062 #CJK UNIFIED IDEOGRAPH + {0xDCF8, 0x8317}, //16063 #CJK UNIFIED IDEOGRAPH + {0xDCF9, 0x8360}, //16064 #CJK UNIFIED IDEOGRAPH + {0xDCFA, 0x832D}, //16065 #CJK UNIFIED IDEOGRAPH + {0xDCFB, 0x833A}, //16066 #CJK UNIFIED IDEOGRAPH + {0xDCFC, 0x8333}, //16067 #CJK UNIFIED IDEOGRAPH + {0xDCFD, 0x8366}, //16068 #CJK UNIFIED IDEOGRAPH + {0xDCFE, 0x8365}, //16069 #CJK UNIFIED IDEOGRAPH + {0xDD40, 0x8EE5}, //16070 #CJK UNIFIED IDEOGRAPH + {0xDD41, 0x8EE6}, //16071 #CJK UNIFIED IDEOGRAPH + {0xDD42, 0x8EE7}, //16072 #CJK UNIFIED IDEOGRAPH + {0xDD43, 0x8EE8}, //16073 #CJK UNIFIED IDEOGRAPH + {0xDD44, 0x8EE9}, //16074 #CJK UNIFIED IDEOGRAPH + {0xDD45, 0x8EEA}, //16075 #CJK UNIFIED IDEOGRAPH + {0xDD46, 0x8EEB}, //16076 #CJK UNIFIED IDEOGRAPH + {0xDD47, 0x8EEC}, //16077 #CJK UNIFIED IDEOGRAPH + {0xDD48, 0x8EED}, //16078 #CJK UNIFIED IDEOGRAPH + {0xDD49, 0x8EEE}, //16079 #CJK UNIFIED IDEOGRAPH + {0xDD4A, 0x8EEF}, //16080 #CJK UNIFIED IDEOGRAPH + {0xDD4B, 0x8EF0}, //16081 #CJK UNIFIED IDEOGRAPH + {0xDD4C, 0x8EF1}, //16082 #CJK UNIFIED IDEOGRAPH + {0xDD4D, 0x8EF2}, //16083 #CJK UNIFIED IDEOGRAPH + {0xDD4E, 0x8EF3}, //16084 #CJK UNIFIED IDEOGRAPH + {0xDD4F, 0x8EF4}, //16085 #CJK UNIFIED IDEOGRAPH + {0xDD50, 0x8EF5}, //16086 #CJK UNIFIED IDEOGRAPH + {0xDD51, 0x8EF6}, //16087 #CJK UNIFIED IDEOGRAPH + {0xDD52, 0x8EF7}, //16088 #CJK UNIFIED IDEOGRAPH + {0xDD53, 0x8EF8}, //16089 #CJK UNIFIED IDEOGRAPH + {0xDD54, 0x8EF9}, //16090 #CJK UNIFIED IDEOGRAPH + {0xDD55, 0x8EFA}, //16091 #CJK UNIFIED IDEOGRAPH + {0xDD56, 0x8EFB}, //16092 #CJK UNIFIED IDEOGRAPH + {0xDD57, 0x8EFC}, //16093 #CJK UNIFIED IDEOGRAPH + {0xDD58, 0x8EFD}, //16094 #CJK UNIFIED IDEOGRAPH + {0xDD59, 0x8EFE}, //16095 #CJK UNIFIED IDEOGRAPH + {0xDD5A, 0x8EFF}, //16096 #CJK UNIFIED IDEOGRAPH + {0xDD5B, 0x8F00}, //16097 #CJK UNIFIED IDEOGRAPH + {0xDD5C, 0x8F01}, //16098 #CJK UNIFIED IDEOGRAPH + {0xDD5D, 0x8F02}, //16099 #CJK UNIFIED IDEOGRAPH + {0xDD5E, 0x8F03}, //16100 #CJK UNIFIED IDEOGRAPH + {0xDD5F, 0x8F04}, //16101 #CJK UNIFIED IDEOGRAPH + {0xDD60, 0x8F05}, //16102 #CJK UNIFIED IDEOGRAPH + {0xDD61, 0x8F06}, //16103 #CJK UNIFIED IDEOGRAPH + {0xDD62, 0x8F07}, //16104 #CJK UNIFIED IDEOGRAPH + {0xDD63, 0x8F08}, //16105 #CJK UNIFIED IDEOGRAPH + {0xDD64, 0x8F09}, //16106 #CJK UNIFIED IDEOGRAPH + {0xDD65, 0x8F0A}, //16107 #CJK UNIFIED IDEOGRAPH + {0xDD66, 0x8F0B}, //16108 #CJK UNIFIED IDEOGRAPH + {0xDD67, 0x8F0C}, //16109 #CJK UNIFIED IDEOGRAPH + {0xDD68, 0x8F0D}, //16110 #CJK UNIFIED IDEOGRAPH + {0xDD69, 0x8F0E}, //16111 #CJK UNIFIED IDEOGRAPH + {0xDD6A, 0x8F0F}, //16112 #CJK UNIFIED IDEOGRAPH + {0xDD6B, 0x8F10}, //16113 #CJK UNIFIED IDEOGRAPH + {0xDD6C, 0x8F11}, //16114 #CJK UNIFIED IDEOGRAPH + {0xDD6D, 0x8F12}, //16115 #CJK UNIFIED IDEOGRAPH + {0xDD6E, 0x8F13}, //16116 #CJK UNIFIED IDEOGRAPH + {0xDD6F, 0x8F14}, //16117 #CJK UNIFIED IDEOGRAPH + {0xDD70, 0x8F15}, //16118 #CJK UNIFIED IDEOGRAPH + {0xDD71, 0x8F16}, //16119 #CJK UNIFIED IDEOGRAPH + {0xDD72, 0x8F17}, //16120 #CJK UNIFIED IDEOGRAPH + {0xDD73, 0x8F18}, //16121 #CJK UNIFIED IDEOGRAPH + {0xDD74, 0x8F19}, //16122 #CJK UNIFIED IDEOGRAPH + {0xDD75, 0x8F1A}, //16123 #CJK UNIFIED IDEOGRAPH + {0xDD76, 0x8F1B}, //16124 #CJK UNIFIED IDEOGRAPH + {0xDD77, 0x8F1C}, //16125 #CJK UNIFIED IDEOGRAPH + {0xDD78, 0x8F1D}, //16126 #CJK UNIFIED IDEOGRAPH + {0xDD79, 0x8F1E}, //16127 #CJK UNIFIED IDEOGRAPH + {0xDD7A, 0x8F1F}, //16128 #CJK UNIFIED IDEOGRAPH + {0xDD7B, 0x8F20}, //16129 #CJK UNIFIED IDEOGRAPH + {0xDD7C, 0x8F21}, //16130 #CJK UNIFIED IDEOGRAPH + {0xDD7D, 0x8F22}, //16131 #CJK UNIFIED IDEOGRAPH + {0xDD7E, 0x8F23}, //16132 #CJK UNIFIED IDEOGRAPH + {0xDD80, 0x8F24}, //16133 #CJK UNIFIED IDEOGRAPH + {0xDD81, 0x8F25}, //16134 #CJK UNIFIED IDEOGRAPH + {0xDD82, 0x8F26}, //16135 #CJK UNIFIED IDEOGRAPH + {0xDD83, 0x8F27}, //16136 #CJK UNIFIED IDEOGRAPH + {0xDD84, 0x8F28}, //16137 #CJK UNIFIED IDEOGRAPH + {0xDD85, 0x8F29}, //16138 #CJK UNIFIED IDEOGRAPH + {0xDD86, 0x8F2A}, //16139 #CJK UNIFIED IDEOGRAPH + {0xDD87, 0x8F2B}, //16140 #CJK UNIFIED IDEOGRAPH + {0xDD88, 0x8F2C}, //16141 #CJK UNIFIED IDEOGRAPH + {0xDD89, 0x8F2D}, //16142 #CJK UNIFIED IDEOGRAPH + {0xDD8A, 0x8F2E}, //16143 #CJK UNIFIED IDEOGRAPH + {0xDD8B, 0x8F2F}, //16144 #CJK UNIFIED IDEOGRAPH + {0xDD8C, 0x8F30}, //16145 #CJK UNIFIED IDEOGRAPH + {0xDD8D, 0x8F31}, //16146 #CJK UNIFIED IDEOGRAPH + {0xDD8E, 0x8F32}, //16147 #CJK UNIFIED IDEOGRAPH + {0xDD8F, 0x8F33}, //16148 #CJK UNIFIED IDEOGRAPH + {0xDD90, 0x8F34}, //16149 #CJK UNIFIED IDEOGRAPH + {0xDD91, 0x8F35}, //16150 #CJK UNIFIED IDEOGRAPH + {0xDD92, 0x8F36}, //16151 #CJK UNIFIED IDEOGRAPH + {0xDD93, 0x8F37}, //16152 #CJK UNIFIED IDEOGRAPH + {0xDD94, 0x8F38}, //16153 #CJK UNIFIED IDEOGRAPH + {0xDD95, 0x8F39}, //16154 #CJK UNIFIED IDEOGRAPH + {0xDD96, 0x8F3A}, //16155 #CJK UNIFIED IDEOGRAPH + {0xDD97, 0x8F3B}, //16156 #CJK UNIFIED IDEOGRAPH + {0xDD98, 0x8F3C}, //16157 #CJK UNIFIED IDEOGRAPH + {0xDD99, 0x8F3D}, //16158 #CJK UNIFIED IDEOGRAPH + {0xDD9A, 0x8F3E}, //16159 #CJK UNIFIED IDEOGRAPH + {0xDD9B, 0x8F3F}, //16160 #CJK UNIFIED IDEOGRAPH + {0xDD9C, 0x8F40}, //16161 #CJK UNIFIED IDEOGRAPH + {0xDD9D, 0x8F41}, //16162 #CJK UNIFIED IDEOGRAPH + {0xDD9E, 0x8F42}, //16163 #CJK UNIFIED IDEOGRAPH + {0xDD9F, 0x8F43}, //16164 #CJK UNIFIED IDEOGRAPH + {0xDDA0, 0x8F44}, //16165 #CJK UNIFIED IDEOGRAPH + {0xDDA1, 0x8368}, //16166 #CJK UNIFIED IDEOGRAPH + {0xDDA2, 0x831B}, //16167 #CJK UNIFIED IDEOGRAPH + {0xDDA3, 0x8369}, //16168 #CJK UNIFIED IDEOGRAPH + {0xDDA4, 0x836C}, //16169 #CJK UNIFIED IDEOGRAPH + {0xDDA5, 0x836A}, //16170 #CJK UNIFIED IDEOGRAPH + {0xDDA6, 0x836D}, //16171 #CJK UNIFIED IDEOGRAPH + {0xDDA7, 0x836E}, //16172 #CJK UNIFIED IDEOGRAPH + {0xDDA8, 0x83B0}, //16173 #CJK UNIFIED IDEOGRAPH + {0xDDA9, 0x8378}, //16174 #CJK UNIFIED IDEOGRAPH + {0xDDAA, 0x83B3}, //16175 #CJK UNIFIED IDEOGRAPH + {0xDDAB, 0x83B4}, //16176 #CJK UNIFIED IDEOGRAPH + {0xDDAC, 0x83A0}, //16177 #CJK UNIFIED IDEOGRAPH + {0xDDAD, 0x83AA}, //16178 #CJK UNIFIED IDEOGRAPH + {0xDDAE, 0x8393}, //16179 #CJK UNIFIED IDEOGRAPH + {0xDDAF, 0x839C}, //16180 #CJK UNIFIED IDEOGRAPH + {0xDDB0, 0x8385}, //16181 #CJK UNIFIED IDEOGRAPH + {0xDDB1, 0x837C}, //16182 #CJK UNIFIED IDEOGRAPH + {0xDDB2, 0x83B6}, //16183 #CJK UNIFIED IDEOGRAPH + {0xDDB3, 0x83A9}, //16184 #CJK UNIFIED IDEOGRAPH + {0xDDB4, 0x837D}, //16185 #CJK UNIFIED IDEOGRAPH + {0xDDB5, 0x83B8}, //16186 #CJK UNIFIED IDEOGRAPH + {0xDDB6, 0x837B}, //16187 #CJK UNIFIED IDEOGRAPH + {0xDDB7, 0x8398}, //16188 #CJK UNIFIED IDEOGRAPH + {0xDDB8, 0x839E}, //16189 #CJK UNIFIED IDEOGRAPH + {0xDDB9, 0x83A8}, //16190 #CJK UNIFIED IDEOGRAPH + {0xDDBA, 0x83BA}, //16191 #CJK UNIFIED IDEOGRAPH + {0xDDBB, 0x83BC}, //16192 #CJK UNIFIED IDEOGRAPH + {0xDDBC, 0x83C1}, //16193 #CJK UNIFIED IDEOGRAPH + {0xDDBD, 0x8401}, //16194 #CJK UNIFIED IDEOGRAPH + {0xDDBE, 0x83E5}, //16195 #CJK UNIFIED IDEOGRAPH + {0xDDBF, 0x83D8}, //16196 #CJK UNIFIED IDEOGRAPH + {0xDDC0, 0x5807}, //16197 #CJK UNIFIED IDEOGRAPH + {0xDDC1, 0x8418}, //16198 #CJK UNIFIED IDEOGRAPH + {0xDDC2, 0x840B}, //16199 #CJK UNIFIED IDEOGRAPH + {0xDDC3, 0x83DD}, //16200 #CJK UNIFIED IDEOGRAPH + {0xDDC4, 0x83FD}, //16201 #CJK UNIFIED IDEOGRAPH + {0xDDC5, 0x83D6}, //16202 #CJK UNIFIED IDEOGRAPH + {0xDDC6, 0x841C}, //16203 #CJK UNIFIED IDEOGRAPH + {0xDDC7, 0x8438}, //16204 #CJK UNIFIED IDEOGRAPH + {0xDDC8, 0x8411}, //16205 #CJK UNIFIED IDEOGRAPH + {0xDDC9, 0x8406}, //16206 #CJK UNIFIED IDEOGRAPH + {0xDDCA, 0x83D4}, //16207 #CJK UNIFIED IDEOGRAPH + {0xDDCB, 0x83DF}, //16208 #CJK UNIFIED IDEOGRAPH + {0xDDCC, 0x840F}, //16209 #CJK UNIFIED IDEOGRAPH + {0xDDCD, 0x8403}, //16210 #CJK UNIFIED IDEOGRAPH + {0xDDCE, 0x83F8}, //16211 #CJK UNIFIED IDEOGRAPH + {0xDDCF, 0x83F9}, //16212 #CJK UNIFIED IDEOGRAPH + {0xDDD0, 0x83EA}, //16213 #CJK UNIFIED IDEOGRAPH + {0xDDD1, 0x83C5}, //16214 #CJK UNIFIED IDEOGRAPH + {0xDDD2, 0x83C0}, //16215 #CJK UNIFIED IDEOGRAPH + {0xDDD3, 0x8426}, //16216 #CJK UNIFIED IDEOGRAPH + {0xDDD4, 0x83F0}, //16217 #CJK UNIFIED IDEOGRAPH + {0xDDD5, 0x83E1}, //16218 #CJK UNIFIED IDEOGRAPH + {0xDDD6, 0x845C}, //16219 #CJK UNIFIED IDEOGRAPH + {0xDDD7, 0x8451}, //16220 #CJK UNIFIED IDEOGRAPH + {0xDDD8, 0x845A}, //16221 #CJK UNIFIED IDEOGRAPH + {0xDDD9, 0x8459}, //16222 #CJK UNIFIED IDEOGRAPH + {0xDDDA, 0x8473}, //16223 #CJK UNIFIED IDEOGRAPH + {0xDDDB, 0x8487}, //16224 #CJK UNIFIED IDEOGRAPH + {0xDDDC, 0x8488}, //16225 #CJK UNIFIED IDEOGRAPH + {0xDDDD, 0x847A}, //16226 #CJK UNIFIED IDEOGRAPH + {0xDDDE, 0x8489}, //16227 #CJK UNIFIED IDEOGRAPH + {0xDDDF, 0x8478}, //16228 #CJK UNIFIED IDEOGRAPH + {0xDDE0, 0x843C}, //16229 #CJK UNIFIED IDEOGRAPH + {0xDDE1, 0x8446}, //16230 #CJK UNIFIED IDEOGRAPH + {0xDDE2, 0x8469}, //16231 #CJK UNIFIED IDEOGRAPH + {0xDDE3, 0x8476}, //16232 #CJK UNIFIED IDEOGRAPH + {0xDDE4, 0x848C}, //16233 #CJK UNIFIED IDEOGRAPH + {0xDDE5, 0x848E}, //16234 #CJK UNIFIED IDEOGRAPH + {0xDDE6, 0x8431}, //16235 #CJK UNIFIED IDEOGRAPH + {0xDDE7, 0x846D}, //16236 #CJK UNIFIED IDEOGRAPH + {0xDDE8, 0x84C1}, //16237 #CJK UNIFIED IDEOGRAPH + {0xDDE9, 0x84CD}, //16238 #CJK UNIFIED IDEOGRAPH + {0xDDEA, 0x84D0}, //16239 #CJK UNIFIED IDEOGRAPH + {0xDDEB, 0x84E6}, //16240 #CJK UNIFIED IDEOGRAPH + {0xDDEC, 0x84BD}, //16241 #CJK UNIFIED IDEOGRAPH + {0xDDED, 0x84D3}, //16242 #CJK UNIFIED IDEOGRAPH + {0xDDEE, 0x84CA}, //16243 #CJK UNIFIED IDEOGRAPH + {0xDDEF, 0x84BF}, //16244 #CJK UNIFIED IDEOGRAPH + {0xDDF0, 0x84BA}, //16245 #CJK UNIFIED IDEOGRAPH + {0xDDF1, 0x84E0}, //16246 #CJK UNIFIED IDEOGRAPH + {0xDDF2, 0x84A1}, //16247 #CJK UNIFIED IDEOGRAPH + {0xDDF3, 0x84B9}, //16248 #CJK UNIFIED IDEOGRAPH + {0xDDF4, 0x84B4}, //16249 #CJK UNIFIED IDEOGRAPH + {0xDDF5, 0x8497}, //16250 #CJK UNIFIED IDEOGRAPH + {0xDDF6, 0x84E5}, //16251 #CJK UNIFIED IDEOGRAPH + {0xDDF7, 0x84E3}, //16252 #CJK UNIFIED IDEOGRAPH + {0xDDF8, 0x850C}, //16253 #CJK UNIFIED IDEOGRAPH + {0xDDF9, 0x750D}, //16254 #CJK UNIFIED IDEOGRAPH + {0xDDFA, 0x8538}, //16255 #CJK UNIFIED IDEOGRAPH + {0xDDFB, 0x84F0}, //16256 #CJK UNIFIED IDEOGRAPH + {0xDDFC, 0x8539}, //16257 #CJK UNIFIED IDEOGRAPH + {0xDDFD, 0x851F}, //16258 #CJK UNIFIED IDEOGRAPH + {0xDDFE, 0x853A}, //16259 #CJK UNIFIED IDEOGRAPH + {0xDE40, 0x8F45}, //16260 #CJK UNIFIED IDEOGRAPH + {0xDE41, 0x8F46}, //16261 #CJK UNIFIED IDEOGRAPH + {0xDE42, 0x8F47}, //16262 #CJK UNIFIED IDEOGRAPH + {0xDE43, 0x8F48}, //16263 #CJK UNIFIED IDEOGRAPH + {0xDE44, 0x8F49}, //16264 #CJK UNIFIED IDEOGRAPH + {0xDE45, 0x8F4A}, //16265 #CJK UNIFIED IDEOGRAPH + {0xDE46, 0x8F4B}, //16266 #CJK UNIFIED IDEOGRAPH + {0xDE47, 0x8F4C}, //16267 #CJK UNIFIED IDEOGRAPH + {0xDE48, 0x8F4D}, //16268 #CJK UNIFIED IDEOGRAPH + {0xDE49, 0x8F4E}, //16269 #CJK UNIFIED IDEOGRAPH + {0xDE4A, 0x8F4F}, //16270 #CJK UNIFIED IDEOGRAPH + {0xDE4B, 0x8F50}, //16271 #CJK UNIFIED IDEOGRAPH + {0xDE4C, 0x8F51}, //16272 #CJK UNIFIED IDEOGRAPH + {0xDE4D, 0x8F52}, //16273 #CJK UNIFIED IDEOGRAPH + {0xDE4E, 0x8F53}, //16274 #CJK UNIFIED IDEOGRAPH + {0xDE4F, 0x8F54}, //16275 #CJK UNIFIED IDEOGRAPH + {0xDE50, 0x8F55}, //16276 #CJK UNIFIED IDEOGRAPH + {0xDE51, 0x8F56}, //16277 #CJK UNIFIED IDEOGRAPH + {0xDE52, 0x8F57}, //16278 #CJK UNIFIED IDEOGRAPH + {0xDE53, 0x8F58}, //16279 #CJK UNIFIED IDEOGRAPH + {0xDE54, 0x8F59}, //16280 #CJK UNIFIED IDEOGRAPH + {0xDE55, 0x8F5A}, //16281 #CJK UNIFIED IDEOGRAPH + {0xDE56, 0x8F5B}, //16282 #CJK UNIFIED IDEOGRAPH + {0xDE57, 0x8F5C}, //16283 #CJK UNIFIED IDEOGRAPH + {0xDE58, 0x8F5D}, //16284 #CJK UNIFIED IDEOGRAPH + {0xDE59, 0x8F5E}, //16285 #CJK UNIFIED IDEOGRAPH + {0xDE5A, 0x8F5F}, //16286 #CJK UNIFIED IDEOGRAPH + {0xDE5B, 0x8F60}, //16287 #CJK UNIFIED IDEOGRAPH + {0xDE5C, 0x8F61}, //16288 #CJK UNIFIED IDEOGRAPH + {0xDE5D, 0x8F62}, //16289 #CJK UNIFIED IDEOGRAPH + {0xDE5E, 0x8F63}, //16290 #CJK UNIFIED IDEOGRAPH + {0xDE5F, 0x8F64}, //16291 #CJK UNIFIED IDEOGRAPH + {0xDE60, 0x8F65}, //16292 #CJK UNIFIED IDEOGRAPH + {0xDE61, 0x8F6A}, //16293 #CJK UNIFIED IDEOGRAPH + {0xDE62, 0x8F80}, //16294 #CJK UNIFIED IDEOGRAPH + {0xDE63, 0x8F8C}, //16295 #CJK UNIFIED IDEOGRAPH + {0xDE64, 0x8F92}, //16296 #CJK UNIFIED IDEOGRAPH + {0xDE65, 0x8F9D}, //16297 #CJK UNIFIED IDEOGRAPH + {0xDE66, 0x8FA0}, //16298 #CJK UNIFIED IDEOGRAPH + {0xDE67, 0x8FA1}, //16299 #CJK UNIFIED IDEOGRAPH + {0xDE68, 0x8FA2}, //16300 #CJK UNIFIED IDEOGRAPH + {0xDE69, 0x8FA4}, //16301 #CJK UNIFIED IDEOGRAPH + {0xDE6A, 0x8FA5}, //16302 #CJK UNIFIED IDEOGRAPH + {0xDE6B, 0x8FA6}, //16303 #CJK UNIFIED IDEOGRAPH + {0xDE6C, 0x8FA7}, //16304 #CJK UNIFIED IDEOGRAPH + {0xDE6D, 0x8FAA}, //16305 #CJK UNIFIED IDEOGRAPH + {0xDE6E, 0x8FAC}, //16306 #CJK UNIFIED IDEOGRAPH + {0xDE6F, 0x8FAD}, //16307 #CJK UNIFIED IDEOGRAPH + {0xDE70, 0x8FAE}, //16308 #CJK UNIFIED IDEOGRAPH + {0xDE71, 0x8FAF}, //16309 #CJK UNIFIED IDEOGRAPH + {0xDE72, 0x8FB2}, //16310 #CJK UNIFIED IDEOGRAPH + {0xDE73, 0x8FB3}, //16311 #CJK UNIFIED IDEOGRAPH + {0xDE74, 0x8FB4}, //16312 #CJK UNIFIED IDEOGRAPH + {0xDE75, 0x8FB5}, //16313 #CJK UNIFIED IDEOGRAPH + {0xDE76, 0x8FB7}, //16314 #CJK UNIFIED IDEOGRAPH + {0xDE77, 0x8FB8}, //16315 #CJK UNIFIED IDEOGRAPH + {0xDE78, 0x8FBA}, //16316 #CJK UNIFIED IDEOGRAPH + {0xDE79, 0x8FBB}, //16317 #CJK UNIFIED IDEOGRAPH + {0xDE7A, 0x8FBC}, //16318 #CJK UNIFIED IDEOGRAPH + {0xDE7B, 0x8FBF}, //16319 #CJK UNIFIED IDEOGRAPH + {0xDE7C, 0x8FC0}, //16320 #CJK UNIFIED IDEOGRAPH + {0xDE7D, 0x8FC3}, //16321 #CJK UNIFIED IDEOGRAPH + {0xDE7E, 0x8FC6}, //16322 #CJK UNIFIED IDEOGRAPH + {0xDE80, 0x8FC9}, //16323 #CJK UNIFIED IDEOGRAPH + {0xDE81, 0x8FCA}, //16324 #CJK UNIFIED IDEOGRAPH + {0xDE82, 0x8FCB}, //16325 #CJK UNIFIED IDEOGRAPH + {0xDE83, 0x8FCC}, //16326 #CJK UNIFIED IDEOGRAPH + {0xDE84, 0x8FCD}, //16327 #CJK UNIFIED IDEOGRAPH + {0xDE85, 0x8FCF}, //16328 #CJK UNIFIED IDEOGRAPH + {0xDE86, 0x8FD2}, //16329 #CJK UNIFIED IDEOGRAPH + {0xDE87, 0x8FD6}, //16330 #CJK UNIFIED IDEOGRAPH + {0xDE88, 0x8FD7}, //16331 #CJK UNIFIED IDEOGRAPH + {0xDE89, 0x8FDA}, //16332 #CJK UNIFIED IDEOGRAPH + {0xDE8A, 0x8FE0}, //16333 #CJK UNIFIED IDEOGRAPH + {0xDE8B, 0x8FE1}, //16334 #CJK UNIFIED IDEOGRAPH + {0xDE8C, 0x8FE3}, //16335 #CJK UNIFIED IDEOGRAPH + {0xDE8D, 0x8FE7}, //16336 #CJK UNIFIED IDEOGRAPH + {0xDE8E, 0x8FEC}, //16337 #CJK UNIFIED IDEOGRAPH + {0xDE8F, 0x8FEF}, //16338 #CJK UNIFIED IDEOGRAPH + {0xDE90, 0x8FF1}, //16339 #CJK UNIFIED IDEOGRAPH + {0xDE91, 0x8FF2}, //16340 #CJK UNIFIED IDEOGRAPH + {0xDE92, 0x8FF4}, //16341 #CJK UNIFIED IDEOGRAPH + {0xDE93, 0x8FF5}, //16342 #CJK UNIFIED IDEOGRAPH + {0xDE94, 0x8FF6}, //16343 #CJK UNIFIED IDEOGRAPH + {0xDE95, 0x8FFA}, //16344 #CJK UNIFIED IDEOGRAPH + {0xDE96, 0x8FFB}, //16345 #CJK UNIFIED IDEOGRAPH + {0xDE97, 0x8FFC}, //16346 #CJK UNIFIED IDEOGRAPH + {0xDE98, 0x8FFE}, //16347 #CJK UNIFIED IDEOGRAPH + {0xDE99, 0x8FFF}, //16348 #CJK UNIFIED IDEOGRAPH + {0xDE9A, 0x9007}, //16349 #CJK UNIFIED IDEOGRAPH + {0xDE9B, 0x9008}, //16350 #CJK UNIFIED IDEOGRAPH + {0xDE9C, 0x900C}, //16351 #CJK UNIFIED IDEOGRAPH + {0xDE9D, 0x900E}, //16352 #CJK UNIFIED IDEOGRAPH + {0xDE9E, 0x9013}, //16353 #CJK UNIFIED IDEOGRAPH + {0xDE9F, 0x9015}, //16354 #CJK UNIFIED IDEOGRAPH + {0xDEA0, 0x9018}, //16355 #CJK UNIFIED IDEOGRAPH + {0xDEA1, 0x8556}, //16356 #CJK UNIFIED IDEOGRAPH + {0xDEA2, 0x853B}, //16357 #CJK UNIFIED IDEOGRAPH + {0xDEA3, 0x84FF}, //16358 #CJK UNIFIED IDEOGRAPH + {0xDEA4, 0x84FC}, //16359 #CJK UNIFIED IDEOGRAPH + {0xDEA5, 0x8559}, //16360 #CJK UNIFIED IDEOGRAPH + {0xDEA6, 0x8548}, //16361 #CJK UNIFIED IDEOGRAPH + {0xDEA7, 0x8568}, //16362 #CJK UNIFIED IDEOGRAPH + {0xDEA8, 0x8564}, //16363 #CJK UNIFIED IDEOGRAPH + {0xDEA9, 0x855E}, //16364 #CJK UNIFIED IDEOGRAPH + {0xDEAA, 0x857A}, //16365 #CJK UNIFIED IDEOGRAPH + {0xDEAB, 0x77A2}, //16366 #CJK UNIFIED IDEOGRAPH + {0xDEAC, 0x8543}, //16367 #CJK UNIFIED IDEOGRAPH + {0xDEAD, 0x8572}, //16368 #CJK UNIFIED IDEOGRAPH + {0xDEAE, 0x857B}, //16369 #CJK UNIFIED IDEOGRAPH + {0xDEAF, 0x85A4}, //16370 #CJK UNIFIED IDEOGRAPH + {0xDEB0, 0x85A8}, //16371 #CJK UNIFIED IDEOGRAPH + {0xDEB1, 0x8587}, //16372 #CJK UNIFIED IDEOGRAPH + {0xDEB2, 0x858F}, //16373 #CJK UNIFIED IDEOGRAPH + {0xDEB3, 0x8579}, //16374 #CJK UNIFIED IDEOGRAPH + {0xDEB4, 0x85AE}, //16375 #CJK UNIFIED IDEOGRAPH + {0xDEB5, 0x859C}, //16376 #CJK UNIFIED IDEOGRAPH + {0xDEB6, 0x8585}, //16377 #CJK UNIFIED IDEOGRAPH + {0xDEB7, 0x85B9}, //16378 #CJK UNIFIED IDEOGRAPH + {0xDEB8, 0x85B7}, //16379 #CJK UNIFIED IDEOGRAPH + {0xDEB9, 0x85B0}, //16380 #CJK UNIFIED IDEOGRAPH + {0xDEBA, 0x85D3}, //16381 #CJK UNIFIED IDEOGRAPH + {0xDEBB, 0x85C1}, //16382 #CJK UNIFIED IDEOGRAPH + {0xDEBC, 0x85DC}, //16383 #CJK UNIFIED IDEOGRAPH + {0xDEBD, 0x85FF}, //16384 #CJK UNIFIED IDEOGRAPH + {0xDEBE, 0x8627}, //16385 #CJK UNIFIED IDEOGRAPH + {0xDEBF, 0x8605}, //16386 #CJK UNIFIED IDEOGRAPH + {0xDEC0, 0x8629}, //16387 #CJK UNIFIED IDEOGRAPH + {0xDEC1, 0x8616}, //16388 #CJK UNIFIED IDEOGRAPH + {0xDEC2, 0x863C}, //16389 #CJK UNIFIED IDEOGRAPH + {0xDEC3, 0x5EFE}, //16390 #CJK UNIFIED IDEOGRAPH + {0xDEC4, 0x5F08}, //16391 #CJK UNIFIED IDEOGRAPH + {0xDEC5, 0x593C}, //16392 #CJK UNIFIED IDEOGRAPH + {0xDEC6, 0x5941}, //16393 #CJK UNIFIED IDEOGRAPH + {0xDEC7, 0x8037}, //16394 #CJK UNIFIED IDEOGRAPH + {0xDEC8, 0x5955}, //16395 #CJK UNIFIED IDEOGRAPH + {0xDEC9, 0x595A}, //16396 #CJK UNIFIED IDEOGRAPH + {0xDECA, 0x5958}, //16397 #CJK UNIFIED IDEOGRAPH + {0xDECB, 0x530F}, //16398 #CJK UNIFIED IDEOGRAPH + {0xDECC, 0x5C22}, //16399 #CJK UNIFIED IDEOGRAPH + {0xDECD, 0x5C25}, //16400 #CJK UNIFIED IDEOGRAPH + {0xDECE, 0x5C2C}, //16401 #CJK UNIFIED IDEOGRAPH + {0xDECF, 0x5C34}, //16402 #CJK UNIFIED IDEOGRAPH + {0xDED0, 0x624C}, //16403 #CJK UNIFIED IDEOGRAPH + {0xDED1, 0x626A}, //16404 #CJK UNIFIED IDEOGRAPH + {0xDED2, 0x629F}, //16405 #CJK UNIFIED IDEOGRAPH + {0xDED3, 0x62BB}, //16406 #CJK UNIFIED IDEOGRAPH + {0xDED4, 0x62CA}, //16407 #CJK UNIFIED IDEOGRAPH + {0xDED5, 0x62DA}, //16408 #CJK UNIFIED IDEOGRAPH + {0xDED6, 0x62D7}, //16409 #CJK UNIFIED IDEOGRAPH + {0xDED7, 0x62EE}, //16410 #CJK UNIFIED IDEOGRAPH + {0xDED8, 0x6322}, //16411 #CJK UNIFIED IDEOGRAPH + {0xDED9, 0x62F6}, //16412 #CJK UNIFIED IDEOGRAPH + {0xDEDA, 0x6339}, //16413 #CJK UNIFIED IDEOGRAPH + {0xDEDB, 0x634B}, //16414 #CJK UNIFIED IDEOGRAPH + {0xDEDC, 0x6343}, //16415 #CJK UNIFIED IDEOGRAPH + {0xDEDD, 0x63AD}, //16416 #CJK UNIFIED IDEOGRAPH + {0xDEDE, 0x63F6}, //16417 #CJK UNIFIED IDEOGRAPH + {0xDEDF, 0x6371}, //16418 #CJK UNIFIED IDEOGRAPH + {0xDEE0, 0x637A}, //16419 #CJK UNIFIED IDEOGRAPH + {0xDEE1, 0x638E}, //16420 #CJK UNIFIED IDEOGRAPH + {0xDEE2, 0x63B4}, //16421 #CJK UNIFIED IDEOGRAPH + {0xDEE3, 0x636D}, //16422 #CJK UNIFIED IDEOGRAPH + {0xDEE4, 0x63AC}, //16423 #CJK UNIFIED IDEOGRAPH + {0xDEE5, 0x638A}, //16424 #CJK UNIFIED IDEOGRAPH + {0xDEE6, 0x6369}, //16425 #CJK UNIFIED IDEOGRAPH + {0xDEE7, 0x63AE}, //16426 #CJK UNIFIED IDEOGRAPH + {0xDEE8, 0x63BC}, //16427 #CJK UNIFIED IDEOGRAPH + {0xDEE9, 0x63F2}, //16428 #CJK UNIFIED IDEOGRAPH + {0xDEEA, 0x63F8}, //16429 #CJK UNIFIED IDEOGRAPH + {0xDEEB, 0x63E0}, //16430 #CJK UNIFIED IDEOGRAPH + {0xDEEC, 0x63FF}, //16431 #CJK UNIFIED IDEOGRAPH + {0xDEED, 0x63C4}, //16432 #CJK UNIFIED IDEOGRAPH + {0xDEEE, 0x63DE}, //16433 #CJK UNIFIED IDEOGRAPH + {0xDEEF, 0x63CE}, //16434 #CJK UNIFIED IDEOGRAPH + {0xDEF0, 0x6452}, //16435 #CJK UNIFIED IDEOGRAPH + {0xDEF1, 0x63C6}, //16436 #CJK UNIFIED IDEOGRAPH + {0xDEF2, 0x63BE}, //16437 #CJK UNIFIED IDEOGRAPH + {0xDEF3, 0x6445}, //16438 #CJK UNIFIED IDEOGRAPH + {0xDEF4, 0x6441}, //16439 #CJK UNIFIED IDEOGRAPH + {0xDEF5, 0x640B}, //16440 #CJK UNIFIED IDEOGRAPH + {0xDEF6, 0x641B}, //16441 #CJK UNIFIED IDEOGRAPH + {0xDEF7, 0x6420}, //16442 #CJK UNIFIED IDEOGRAPH + {0xDEF8, 0x640C}, //16443 #CJK UNIFIED IDEOGRAPH + {0xDEF9, 0x6426}, //16444 #CJK UNIFIED IDEOGRAPH + {0xDEFA, 0x6421}, //16445 #CJK UNIFIED IDEOGRAPH + {0xDEFB, 0x645E}, //16446 #CJK UNIFIED IDEOGRAPH + {0xDEFC, 0x6484}, //16447 #CJK UNIFIED IDEOGRAPH + {0xDEFD, 0x646D}, //16448 #CJK UNIFIED IDEOGRAPH + {0xDEFE, 0x6496}, //16449 #CJK UNIFIED IDEOGRAPH + {0xDF40, 0x9019}, //16450 #CJK UNIFIED IDEOGRAPH + {0xDF41, 0x901C}, //16451 #CJK UNIFIED IDEOGRAPH + {0xDF42, 0x9023}, //16452 #CJK UNIFIED IDEOGRAPH + {0xDF43, 0x9024}, //16453 #CJK UNIFIED IDEOGRAPH + {0xDF44, 0x9025}, //16454 #CJK UNIFIED IDEOGRAPH + {0xDF45, 0x9027}, //16455 #CJK UNIFIED IDEOGRAPH + {0xDF46, 0x9028}, //16456 #CJK UNIFIED IDEOGRAPH + {0xDF47, 0x9029}, //16457 #CJK UNIFIED IDEOGRAPH + {0xDF48, 0x902A}, //16458 #CJK UNIFIED IDEOGRAPH + {0xDF49, 0x902B}, //16459 #CJK UNIFIED IDEOGRAPH + {0xDF4A, 0x902C}, //16460 #CJK UNIFIED IDEOGRAPH + {0xDF4B, 0x9030}, //16461 #CJK UNIFIED IDEOGRAPH + {0xDF4C, 0x9031}, //16462 #CJK UNIFIED IDEOGRAPH + {0xDF4D, 0x9032}, //16463 #CJK UNIFIED IDEOGRAPH + {0xDF4E, 0x9033}, //16464 #CJK UNIFIED IDEOGRAPH + {0xDF4F, 0x9034}, //16465 #CJK UNIFIED IDEOGRAPH + {0xDF50, 0x9037}, //16466 #CJK UNIFIED IDEOGRAPH + {0xDF51, 0x9039}, //16467 #CJK UNIFIED IDEOGRAPH + {0xDF52, 0x903A}, //16468 #CJK UNIFIED IDEOGRAPH + {0xDF53, 0x903D}, //16469 #CJK UNIFIED IDEOGRAPH + {0xDF54, 0x903F}, //16470 #CJK UNIFIED IDEOGRAPH + {0xDF55, 0x9040}, //16471 #CJK UNIFIED IDEOGRAPH + {0xDF56, 0x9043}, //16472 #CJK UNIFIED IDEOGRAPH + {0xDF57, 0x9045}, //16473 #CJK UNIFIED IDEOGRAPH + {0xDF58, 0x9046}, //16474 #CJK UNIFIED IDEOGRAPH + {0xDF59, 0x9048}, //16475 #CJK UNIFIED IDEOGRAPH + {0xDF5A, 0x9049}, //16476 #CJK UNIFIED IDEOGRAPH + {0xDF5B, 0x904A}, //16477 #CJK UNIFIED IDEOGRAPH + {0xDF5C, 0x904B}, //16478 #CJK UNIFIED IDEOGRAPH + {0xDF5D, 0x904C}, //16479 #CJK UNIFIED IDEOGRAPH + {0xDF5E, 0x904E}, //16480 #CJK UNIFIED IDEOGRAPH + {0xDF5F, 0x9054}, //16481 #CJK UNIFIED IDEOGRAPH + {0xDF60, 0x9055}, //16482 #CJK UNIFIED IDEOGRAPH + {0xDF61, 0x9056}, //16483 #CJK UNIFIED IDEOGRAPH + {0xDF62, 0x9059}, //16484 #CJK UNIFIED IDEOGRAPH + {0xDF63, 0x905A}, //16485 #CJK UNIFIED IDEOGRAPH + {0xDF64, 0x905C}, //16486 #CJK UNIFIED IDEOGRAPH + {0xDF65, 0x905D}, //16487 #CJK UNIFIED IDEOGRAPH + {0xDF66, 0x905E}, //16488 #CJK UNIFIED IDEOGRAPH + {0xDF67, 0x905F}, //16489 #CJK UNIFIED IDEOGRAPH + {0xDF68, 0x9060}, //16490 #CJK UNIFIED IDEOGRAPH + {0xDF69, 0x9061}, //16491 #CJK UNIFIED IDEOGRAPH + {0xDF6A, 0x9064}, //16492 #CJK UNIFIED IDEOGRAPH + {0xDF6B, 0x9066}, //16493 #CJK UNIFIED IDEOGRAPH + {0xDF6C, 0x9067}, //16494 #CJK UNIFIED IDEOGRAPH + {0xDF6D, 0x9069}, //16495 #CJK UNIFIED IDEOGRAPH + {0xDF6E, 0x906A}, //16496 #CJK UNIFIED IDEOGRAPH + {0xDF6F, 0x906B}, //16497 #CJK UNIFIED IDEOGRAPH + {0xDF70, 0x906C}, //16498 #CJK UNIFIED IDEOGRAPH + {0xDF71, 0x906F}, //16499 #CJK UNIFIED IDEOGRAPH + {0xDF72, 0x9070}, //16500 #CJK UNIFIED IDEOGRAPH + {0xDF73, 0x9071}, //16501 #CJK UNIFIED IDEOGRAPH + {0xDF74, 0x9072}, //16502 #CJK UNIFIED IDEOGRAPH + {0xDF75, 0x9073}, //16503 #CJK UNIFIED IDEOGRAPH + {0xDF76, 0x9076}, //16504 #CJK UNIFIED IDEOGRAPH + {0xDF77, 0x9077}, //16505 #CJK UNIFIED IDEOGRAPH + {0xDF78, 0x9078}, //16506 #CJK UNIFIED IDEOGRAPH + {0xDF79, 0x9079}, //16507 #CJK UNIFIED IDEOGRAPH + {0xDF7A, 0x907A}, //16508 #CJK UNIFIED IDEOGRAPH + {0xDF7B, 0x907B}, //16509 #CJK UNIFIED IDEOGRAPH + {0xDF7C, 0x907C}, //16510 #CJK UNIFIED IDEOGRAPH + {0xDF7D, 0x907E}, //16511 #CJK UNIFIED IDEOGRAPH + {0xDF7E, 0x9081}, //16512 #CJK UNIFIED IDEOGRAPH + {0xDF80, 0x9084}, //16513 #CJK UNIFIED IDEOGRAPH + {0xDF81, 0x9085}, //16514 #CJK UNIFIED IDEOGRAPH + {0xDF82, 0x9086}, //16515 #CJK UNIFIED IDEOGRAPH + {0xDF83, 0x9087}, //16516 #CJK UNIFIED IDEOGRAPH + {0xDF84, 0x9089}, //16517 #CJK UNIFIED IDEOGRAPH + {0xDF85, 0x908A}, //16518 #CJK UNIFIED IDEOGRAPH + {0xDF86, 0x908C}, //16519 #CJK UNIFIED IDEOGRAPH + {0xDF87, 0x908D}, //16520 #CJK UNIFIED IDEOGRAPH + {0xDF88, 0x908E}, //16521 #CJK UNIFIED IDEOGRAPH + {0xDF89, 0x908F}, //16522 #CJK UNIFIED IDEOGRAPH + {0xDF8A, 0x9090}, //16523 #CJK UNIFIED IDEOGRAPH + {0xDF8B, 0x9092}, //16524 #CJK UNIFIED IDEOGRAPH + {0xDF8C, 0x9094}, //16525 #CJK UNIFIED IDEOGRAPH + {0xDF8D, 0x9096}, //16526 #CJK UNIFIED IDEOGRAPH + {0xDF8E, 0x9098}, //16527 #CJK UNIFIED IDEOGRAPH + {0xDF8F, 0x909A}, //16528 #CJK UNIFIED IDEOGRAPH + {0xDF90, 0x909C}, //16529 #CJK UNIFIED IDEOGRAPH + {0xDF91, 0x909E}, //16530 #CJK UNIFIED IDEOGRAPH + {0xDF92, 0x909F}, //16531 #CJK UNIFIED IDEOGRAPH + {0xDF93, 0x90A0}, //16532 #CJK UNIFIED IDEOGRAPH + {0xDF94, 0x90A4}, //16533 #CJK UNIFIED IDEOGRAPH + {0xDF95, 0x90A5}, //16534 #CJK UNIFIED IDEOGRAPH + {0xDF96, 0x90A7}, //16535 #CJK UNIFIED IDEOGRAPH + {0xDF97, 0x90A8}, //16536 #CJK UNIFIED IDEOGRAPH + {0xDF98, 0x90A9}, //16537 #CJK UNIFIED IDEOGRAPH + {0xDF99, 0x90AB}, //16538 #CJK UNIFIED IDEOGRAPH + {0xDF9A, 0x90AD}, //16539 #CJK UNIFIED IDEOGRAPH + {0xDF9B, 0x90B2}, //16540 #CJK UNIFIED IDEOGRAPH + {0xDF9C, 0x90B7}, //16541 #CJK UNIFIED IDEOGRAPH + {0xDF9D, 0x90BC}, //16542 #CJK UNIFIED IDEOGRAPH + {0xDF9E, 0x90BD}, //16543 #CJK UNIFIED IDEOGRAPH + {0xDF9F, 0x90BF}, //16544 #CJK UNIFIED IDEOGRAPH + {0xDFA0, 0x90C0}, //16545 #CJK UNIFIED IDEOGRAPH + {0xDFA1, 0x647A}, //16546 #CJK UNIFIED IDEOGRAPH + {0xDFA2, 0x64B7}, //16547 #CJK UNIFIED IDEOGRAPH + {0xDFA3, 0x64B8}, //16548 #CJK UNIFIED IDEOGRAPH + {0xDFA4, 0x6499}, //16549 #CJK UNIFIED IDEOGRAPH + {0xDFA5, 0x64BA}, //16550 #CJK UNIFIED IDEOGRAPH + {0xDFA6, 0x64C0}, //16551 #CJK UNIFIED IDEOGRAPH + {0xDFA7, 0x64D0}, //16552 #CJK UNIFIED IDEOGRAPH + {0xDFA8, 0x64D7}, //16553 #CJK UNIFIED IDEOGRAPH + {0xDFA9, 0x64E4}, //16554 #CJK UNIFIED IDEOGRAPH + {0xDFAA, 0x64E2}, //16555 #CJK UNIFIED IDEOGRAPH + {0xDFAB, 0x6509}, //16556 #CJK UNIFIED IDEOGRAPH + {0xDFAC, 0x6525}, //16557 #CJK UNIFIED IDEOGRAPH + {0xDFAD, 0x652E}, //16558 #CJK UNIFIED IDEOGRAPH + {0xDFAE, 0x5F0B}, //16559 #CJK UNIFIED IDEOGRAPH + {0xDFAF, 0x5FD2}, //16560 #CJK UNIFIED IDEOGRAPH + {0xDFB0, 0x7519}, //16561 #CJK UNIFIED IDEOGRAPH + {0xDFB1, 0x5F11}, //16562 #CJK UNIFIED IDEOGRAPH + {0xDFB2, 0x535F}, //16563 #CJK UNIFIED IDEOGRAPH + {0xDFB3, 0x53F1}, //16564 #CJK UNIFIED IDEOGRAPH + {0xDFB4, 0x53FD}, //16565 #CJK UNIFIED IDEOGRAPH + {0xDFB5, 0x53E9}, //16566 #CJK UNIFIED IDEOGRAPH + {0xDFB6, 0x53E8}, //16567 #CJK UNIFIED IDEOGRAPH + {0xDFB7, 0x53FB}, //16568 #CJK UNIFIED IDEOGRAPH + {0xDFB8, 0x5412}, //16569 #CJK UNIFIED IDEOGRAPH + {0xDFB9, 0x5416}, //16570 #CJK UNIFIED IDEOGRAPH + {0xDFBA, 0x5406}, //16571 #CJK UNIFIED IDEOGRAPH + {0xDFBB, 0x544B}, //16572 #CJK UNIFIED IDEOGRAPH + {0xDFBC, 0x5452}, //16573 #CJK UNIFIED IDEOGRAPH + {0xDFBD, 0x5453}, //16574 #CJK UNIFIED IDEOGRAPH + {0xDFBE, 0x5454}, //16575 #CJK UNIFIED IDEOGRAPH + {0xDFBF, 0x5456}, //16576 #CJK UNIFIED IDEOGRAPH + {0xDFC0, 0x5443}, //16577 #CJK UNIFIED IDEOGRAPH + {0xDFC1, 0x5421}, //16578 #CJK UNIFIED IDEOGRAPH + {0xDFC2, 0x5457}, //16579 #CJK UNIFIED IDEOGRAPH + {0xDFC3, 0x5459}, //16580 #CJK UNIFIED IDEOGRAPH + {0xDFC4, 0x5423}, //16581 #CJK UNIFIED IDEOGRAPH + {0xDFC5, 0x5432}, //16582 #CJK UNIFIED IDEOGRAPH + {0xDFC6, 0x5482}, //16583 #CJK UNIFIED IDEOGRAPH + {0xDFC7, 0x5494}, //16584 #CJK UNIFIED IDEOGRAPH + {0xDFC8, 0x5477}, //16585 #CJK UNIFIED IDEOGRAPH + {0xDFC9, 0x5471}, //16586 #CJK UNIFIED IDEOGRAPH + {0xDFCA, 0x5464}, //16587 #CJK UNIFIED IDEOGRAPH + {0xDFCB, 0x549A}, //16588 #CJK UNIFIED IDEOGRAPH + {0xDFCC, 0x549B}, //16589 #CJK UNIFIED IDEOGRAPH + {0xDFCD, 0x5484}, //16590 #CJK UNIFIED IDEOGRAPH + {0xDFCE, 0x5476}, //16591 #CJK UNIFIED IDEOGRAPH + {0xDFCF, 0x5466}, //16592 #CJK UNIFIED IDEOGRAPH + {0xDFD0, 0x549D}, //16593 #CJK UNIFIED IDEOGRAPH + {0xDFD1, 0x54D0}, //16594 #CJK UNIFIED IDEOGRAPH + {0xDFD2, 0x54AD}, //16595 #CJK UNIFIED IDEOGRAPH + {0xDFD3, 0x54C2}, //16596 #CJK UNIFIED IDEOGRAPH + {0xDFD4, 0x54B4}, //16597 #CJK UNIFIED IDEOGRAPH + {0xDFD5, 0x54D2}, //16598 #CJK UNIFIED IDEOGRAPH + {0xDFD6, 0x54A7}, //16599 #CJK UNIFIED IDEOGRAPH + {0xDFD7, 0x54A6}, //16600 #CJK UNIFIED IDEOGRAPH + {0xDFD8, 0x54D3}, //16601 #CJK UNIFIED IDEOGRAPH + {0xDFD9, 0x54D4}, //16602 #CJK UNIFIED IDEOGRAPH + {0xDFDA, 0x5472}, //16603 #CJK UNIFIED IDEOGRAPH + {0xDFDB, 0x54A3}, //16604 #CJK UNIFIED IDEOGRAPH + {0xDFDC, 0x54D5}, //16605 #CJK UNIFIED IDEOGRAPH + {0xDFDD, 0x54BB}, //16606 #CJK UNIFIED IDEOGRAPH + {0xDFDE, 0x54BF}, //16607 #CJK UNIFIED IDEOGRAPH + {0xDFDF, 0x54CC}, //16608 #CJK UNIFIED IDEOGRAPH + {0xDFE0, 0x54D9}, //16609 #CJK UNIFIED IDEOGRAPH + {0xDFE1, 0x54DA}, //16610 #CJK UNIFIED IDEOGRAPH + {0xDFE2, 0x54DC}, //16611 #CJK UNIFIED IDEOGRAPH + {0xDFE3, 0x54A9}, //16612 #CJK UNIFIED IDEOGRAPH + {0xDFE4, 0x54AA}, //16613 #CJK UNIFIED IDEOGRAPH + {0xDFE5, 0x54A4}, //16614 #CJK UNIFIED IDEOGRAPH + {0xDFE6, 0x54DD}, //16615 #CJK UNIFIED IDEOGRAPH + {0xDFE7, 0x54CF}, //16616 #CJK UNIFIED IDEOGRAPH + {0xDFE8, 0x54DE}, //16617 #CJK UNIFIED IDEOGRAPH + {0xDFE9, 0x551B}, //16618 #CJK UNIFIED IDEOGRAPH + {0xDFEA, 0x54E7}, //16619 #CJK UNIFIED IDEOGRAPH + {0xDFEB, 0x5520}, //16620 #CJK UNIFIED IDEOGRAPH + {0xDFEC, 0x54FD}, //16621 #CJK UNIFIED IDEOGRAPH + {0xDFED, 0x5514}, //16622 #CJK UNIFIED IDEOGRAPH + {0xDFEE, 0x54F3}, //16623 #CJK UNIFIED IDEOGRAPH + {0xDFEF, 0x5522}, //16624 #CJK UNIFIED IDEOGRAPH + {0xDFF0, 0x5523}, //16625 #CJK UNIFIED IDEOGRAPH + {0xDFF1, 0x550F}, //16626 #CJK UNIFIED IDEOGRAPH + {0xDFF2, 0x5511}, //16627 #CJK UNIFIED IDEOGRAPH + {0xDFF3, 0x5527}, //16628 #CJK UNIFIED IDEOGRAPH + {0xDFF4, 0x552A}, //16629 #CJK UNIFIED IDEOGRAPH + {0xDFF5, 0x5567}, //16630 #CJK UNIFIED IDEOGRAPH + {0xDFF6, 0x558F}, //16631 #CJK UNIFIED IDEOGRAPH + {0xDFF7, 0x55B5}, //16632 #CJK UNIFIED IDEOGRAPH + {0xDFF8, 0x5549}, //16633 #CJK UNIFIED IDEOGRAPH + {0xDFF9, 0x556D}, //16634 #CJK UNIFIED IDEOGRAPH + {0xDFFA, 0x5541}, //16635 #CJK UNIFIED IDEOGRAPH + {0xDFFB, 0x5555}, //16636 #CJK UNIFIED IDEOGRAPH + {0xDFFC, 0x553F}, //16637 #CJK UNIFIED IDEOGRAPH + {0xDFFD, 0x5550}, //16638 #CJK UNIFIED IDEOGRAPH + {0xDFFE, 0x553C}, //16639 #CJK UNIFIED IDEOGRAPH + {0xE040, 0x90C2}, //16640 #CJK UNIFIED IDEOGRAPH + {0xE041, 0x90C3}, //16641 #CJK UNIFIED IDEOGRAPH + {0xE042, 0x90C6}, //16642 #CJK UNIFIED IDEOGRAPH + {0xE043, 0x90C8}, //16643 #CJK UNIFIED IDEOGRAPH + {0xE044, 0x90C9}, //16644 #CJK UNIFIED IDEOGRAPH + {0xE045, 0x90CB}, //16645 #CJK UNIFIED IDEOGRAPH + {0xE046, 0x90CC}, //16646 #CJK UNIFIED IDEOGRAPH + {0xE047, 0x90CD}, //16647 #CJK UNIFIED IDEOGRAPH + {0xE048, 0x90D2}, //16648 #CJK UNIFIED IDEOGRAPH + {0xE049, 0x90D4}, //16649 #CJK UNIFIED IDEOGRAPH + {0xE04A, 0x90D5}, //16650 #CJK UNIFIED IDEOGRAPH + {0xE04B, 0x90D6}, //16651 #CJK UNIFIED IDEOGRAPH + {0xE04C, 0x90D8}, //16652 #CJK UNIFIED IDEOGRAPH + {0xE04D, 0x90D9}, //16653 #CJK UNIFIED IDEOGRAPH + {0xE04E, 0x90DA}, //16654 #CJK UNIFIED IDEOGRAPH + {0xE04F, 0x90DE}, //16655 #CJK UNIFIED IDEOGRAPH + {0xE050, 0x90DF}, //16656 #CJK UNIFIED IDEOGRAPH + {0xE051, 0x90E0}, //16657 #CJK UNIFIED IDEOGRAPH + {0xE052, 0x90E3}, //16658 #CJK UNIFIED IDEOGRAPH + {0xE053, 0x90E4}, //16659 #CJK UNIFIED IDEOGRAPH + {0xE054, 0x90E5}, //16660 #CJK UNIFIED IDEOGRAPH + {0xE055, 0x90E9}, //16661 #CJK UNIFIED IDEOGRAPH + {0xE056, 0x90EA}, //16662 #CJK UNIFIED IDEOGRAPH + {0xE057, 0x90EC}, //16663 #CJK UNIFIED IDEOGRAPH + {0xE058, 0x90EE}, //16664 #CJK UNIFIED IDEOGRAPH + {0xE059, 0x90F0}, //16665 #CJK UNIFIED IDEOGRAPH + {0xE05A, 0x90F1}, //16666 #CJK UNIFIED IDEOGRAPH + {0xE05B, 0x90F2}, //16667 #CJK UNIFIED IDEOGRAPH + {0xE05C, 0x90F3}, //16668 #CJK UNIFIED IDEOGRAPH + {0xE05D, 0x90F5}, //16669 #CJK UNIFIED IDEOGRAPH + {0xE05E, 0x90F6}, //16670 #CJK UNIFIED IDEOGRAPH + {0xE05F, 0x90F7}, //16671 #CJK UNIFIED IDEOGRAPH + {0xE060, 0x90F9}, //16672 #CJK UNIFIED IDEOGRAPH + {0xE061, 0x90FA}, //16673 #CJK UNIFIED IDEOGRAPH + {0xE062, 0x90FB}, //16674 #CJK UNIFIED IDEOGRAPH + {0xE063, 0x90FC}, //16675 #CJK UNIFIED IDEOGRAPH + {0xE064, 0x90FF}, //16676 #CJK UNIFIED IDEOGRAPH + {0xE065, 0x9100}, //16677 #CJK UNIFIED IDEOGRAPH + {0xE066, 0x9101}, //16678 #CJK UNIFIED IDEOGRAPH + {0xE067, 0x9103}, //16679 #CJK UNIFIED IDEOGRAPH + {0xE068, 0x9105}, //16680 #CJK UNIFIED IDEOGRAPH + {0xE069, 0x9106}, //16681 #CJK UNIFIED IDEOGRAPH + {0xE06A, 0x9107}, //16682 #CJK UNIFIED IDEOGRAPH + {0xE06B, 0x9108}, //16683 #CJK UNIFIED IDEOGRAPH + {0xE06C, 0x9109}, //16684 #CJK UNIFIED IDEOGRAPH + {0xE06D, 0x910A}, //16685 #CJK UNIFIED IDEOGRAPH + {0xE06E, 0x910B}, //16686 #CJK UNIFIED IDEOGRAPH + {0xE06F, 0x910C}, //16687 #CJK UNIFIED IDEOGRAPH + {0xE070, 0x910D}, //16688 #CJK UNIFIED IDEOGRAPH + {0xE071, 0x910E}, //16689 #CJK UNIFIED IDEOGRAPH + {0xE072, 0x910F}, //16690 #CJK UNIFIED IDEOGRAPH + {0xE073, 0x9110}, //16691 #CJK UNIFIED IDEOGRAPH + {0xE074, 0x9111}, //16692 #CJK UNIFIED IDEOGRAPH + {0xE075, 0x9112}, //16693 #CJK UNIFIED IDEOGRAPH + {0xE076, 0x9113}, //16694 #CJK UNIFIED IDEOGRAPH + {0xE077, 0x9114}, //16695 #CJK UNIFIED IDEOGRAPH + {0xE078, 0x9115}, //16696 #CJK UNIFIED IDEOGRAPH + {0xE079, 0x9116}, //16697 #CJK UNIFIED IDEOGRAPH + {0xE07A, 0x9117}, //16698 #CJK UNIFIED IDEOGRAPH + {0xE07B, 0x9118}, //16699 #CJK UNIFIED IDEOGRAPH + {0xE07C, 0x911A}, //16700 #CJK UNIFIED IDEOGRAPH + {0xE07D, 0x911B}, //16701 #CJK UNIFIED IDEOGRAPH + {0xE07E, 0x911C}, //16702 #CJK UNIFIED IDEOGRAPH + {0xE080, 0x911D}, //16703 #CJK UNIFIED IDEOGRAPH + {0xE081, 0x911F}, //16704 #CJK UNIFIED IDEOGRAPH + {0xE082, 0x9120}, //16705 #CJK UNIFIED IDEOGRAPH + {0xE083, 0x9121}, //16706 #CJK UNIFIED IDEOGRAPH + {0xE084, 0x9124}, //16707 #CJK UNIFIED IDEOGRAPH + {0xE085, 0x9125}, //16708 #CJK UNIFIED IDEOGRAPH + {0xE086, 0x9126}, //16709 #CJK UNIFIED IDEOGRAPH + {0xE087, 0x9127}, //16710 #CJK UNIFIED IDEOGRAPH + {0xE088, 0x9128}, //16711 #CJK UNIFIED IDEOGRAPH + {0xE089, 0x9129}, //16712 #CJK UNIFIED IDEOGRAPH + {0xE08A, 0x912A}, //16713 #CJK UNIFIED IDEOGRAPH + {0xE08B, 0x912B}, //16714 #CJK UNIFIED IDEOGRAPH + {0xE08C, 0x912C}, //16715 #CJK UNIFIED IDEOGRAPH + {0xE08D, 0x912D}, //16716 #CJK UNIFIED IDEOGRAPH + {0xE08E, 0x912E}, //16717 #CJK UNIFIED IDEOGRAPH + {0xE08F, 0x9130}, //16718 #CJK UNIFIED IDEOGRAPH + {0xE090, 0x9132}, //16719 #CJK UNIFIED IDEOGRAPH + {0xE091, 0x9133}, //16720 #CJK UNIFIED IDEOGRAPH + {0xE092, 0x9134}, //16721 #CJK UNIFIED IDEOGRAPH + {0xE093, 0x9135}, //16722 #CJK UNIFIED IDEOGRAPH + {0xE094, 0x9136}, //16723 #CJK UNIFIED IDEOGRAPH + {0xE095, 0x9137}, //16724 #CJK UNIFIED IDEOGRAPH + {0xE096, 0x9138}, //16725 #CJK UNIFIED IDEOGRAPH + {0xE097, 0x913A}, //16726 #CJK UNIFIED IDEOGRAPH + {0xE098, 0x913B}, //16727 #CJK UNIFIED IDEOGRAPH + {0xE099, 0x913C}, //16728 #CJK UNIFIED IDEOGRAPH + {0xE09A, 0x913D}, //16729 #CJK UNIFIED IDEOGRAPH + {0xE09B, 0x913E}, //16730 #CJK UNIFIED IDEOGRAPH + {0xE09C, 0x913F}, //16731 #CJK UNIFIED IDEOGRAPH + {0xE09D, 0x9140}, //16732 #CJK UNIFIED IDEOGRAPH + {0xE09E, 0x9141}, //16733 #CJK UNIFIED IDEOGRAPH + {0xE09F, 0x9142}, //16734 #CJK UNIFIED IDEOGRAPH + {0xE0A0, 0x9144}, //16735 #CJK UNIFIED IDEOGRAPH + {0xE0A1, 0x5537}, //16736 #CJK UNIFIED IDEOGRAPH + {0xE0A2, 0x5556}, //16737 #CJK UNIFIED IDEOGRAPH + {0xE0A3, 0x5575}, //16738 #CJK UNIFIED IDEOGRAPH + {0xE0A4, 0x5576}, //16739 #CJK UNIFIED IDEOGRAPH + {0xE0A5, 0x5577}, //16740 #CJK UNIFIED IDEOGRAPH + {0xE0A6, 0x5533}, //16741 #CJK UNIFIED IDEOGRAPH + {0xE0A7, 0x5530}, //16742 #CJK UNIFIED IDEOGRAPH + {0xE0A8, 0x555C}, //16743 #CJK UNIFIED IDEOGRAPH + {0xE0A9, 0x558B}, //16744 #CJK UNIFIED IDEOGRAPH + {0xE0AA, 0x55D2}, //16745 #CJK UNIFIED IDEOGRAPH + {0xE0AB, 0x5583}, //16746 #CJK UNIFIED IDEOGRAPH + {0xE0AC, 0x55B1}, //16747 #CJK UNIFIED IDEOGRAPH + {0xE0AD, 0x55B9}, //16748 #CJK UNIFIED IDEOGRAPH + {0xE0AE, 0x5588}, //16749 #CJK UNIFIED IDEOGRAPH + {0xE0AF, 0x5581}, //16750 #CJK UNIFIED IDEOGRAPH + {0xE0B0, 0x559F}, //16751 #CJK UNIFIED IDEOGRAPH + {0xE0B1, 0x557E}, //16752 #CJK UNIFIED IDEOGRAPH + {0xE0B2, 0x55D6}, //16753 #CJK UNIFIED IDEOGRAPH + {0xE0B3, 0x5591}, //16754 #CJK UNIFIED IDEOGRAPH + {0xE0B4, 0x557B}, //16755 #CJK UNIFIED IDEOGRAPH + {0xE0B5, 0x55DF}, //16756 #CJK UNIFIED IDEOGRAPH + {0xE0B6, 0x55BD}, //16757 #CJK UNIFIED IDEOGRAPH + {0xE0B7, 0x55BE}, //16758 #CJK UNIFIED IDEOGRAPH + {0xE0B8, 0x5594}, //16759 #CJK UNIFIED IDEOGRAPH + {0xE0B9, 0x5599}, //16760 #CJK UNIFIED IDEOGRAPH + {0xE0BA, 0x55EA}, //16761 #CJK UNIFIED IDEOGRAPH + {0xE0BB, 0x55F7}, //16762 #CJK UNIFIED IDEOGRAPH + {0xE0BC, 0x55C9}, //16763 #CJK UNIFIED IDEOGRAPH + {0xE0BD, 0x561F}, //16764 #CJK UNIFIED IDEOGRAPH + {0xE0BE, 0x55D1}, //16765 #CJK UNIFIED IDEOGRAPH + {0xE0BF, 0x55EB}, //16766 #CJK UNIFIED IDEOGRAPH + {0xE0C0, 0x55EC}, //16767 #CJK UNIFIED IDEOGRAPH + {0xE0C1, 0x55D4}, //16768 #CJK UNIFIED IDEOGRAPH + {0xE0C2, 0x55E6}, //16769 #CJK UNIFIED IDEOGRAPH + {0xE0C3, 0x55DD}, //16770 #CJK UNIFIED IDEOGRAPH + {0xE0C4, 0x55C4}, //16771 #CJK UNIFIED IDEOGRAPH + {0xE0C5, 0x55EF}, //16772 #CJK UNIFIED IDEOGRAPH + {0xE0C6, 0x55E5}, //16773 #CJK UNIFIED IDEOGRAPH + {0xE0C7, 0x55F2}, //16774 #CJK UNIFIED IDEOGRAPH + {0xE0C8, 0x55F3}, //16775 #CJK UNIFIED IDEOGRAPH + {0xE0C9, 0x55CC}, //16776 #CJK UNIFIED IDEOGRAPH + {0xE0CA, 0x55CD}, //16777 #CJK UNIFIED IDEOGRAPH + {0xE0CB, 0x55E8}, //16778 #CJK UNIFIED IDEOGRAPH + {0xE0CC, 0x55F5}, //16779 #CJK UNIFIED IDEOGRAPH + {0xE0CD, 0x55E4}, //16780 #CJK UNIFIED IDEOGRAPH + {0xE0CE, 0x8F94}, //16781 #CJK UNIFIED IDEOGRAPH + {0xE0CF, 0x561E}, //16782 #CJK UNIFIED IDEOGRAPH + {0xE0D0, 0x5608}, //16783 #CJK UNIFIED IDEOGRAPH + {0xE0D1, 0x560C}, //16784 #CJK UNIFIED IDEOGRAPH + {0xE0D2, 0x5601}, //16785 #CJK UNIFIED IDEOGRAPH + {0xE0D3, 0x5624}, //16786 #CJK UNIFIED IDEOGRAPH + {0xE0D4, 0x5623}, //16787 #CJK UNIFIED IDEOGRAPH + {0xE0D5, 0x55FE}, //16788 #CJK UNIFIED IDEOGRAPH + {0xE0D6, 0x5600}, //16789 #CJK UNIFIED IDEOGRAPH + {0xE0D7, 0x5627}, //16790 #CJK UNIFIED IDEOGRAPH + {0xE0D8, 0x562D}, //16791 #CJK UNIFIED IDEOGRAPH + {0xE0D9, 0x5658}, //16792 #CJK UNIFIED IDEOGRAPH + {0xE0DA, 0x5639}, //16793 #CJK UNIFIED IDEOGRAPH + {0xE0DB, 0x5657}, //16794 #CJK UNIFIED IDEOGRAPH + {0xE0DC, 0x562C}, //16795 #CJK UNIFIED IDEOGRAPH + {0xE0DD, 0x564D}, //16796 #CJK UNIFIED IDEOGRAPH + {0xE0DE, 0x5662}, //16797 #CJK UNIFIED IDEOGRAPH + {0xE0DF, 0x5659}, //16798 #CJK UNIFIED IDEOGRAPH + {0xE0E0, 0x565C}, //16799 #CJK UNIFIED IDEOGRAPH + {0xE0E1, 0x564C}, //16800 #CJK UNIFIED IDEOGRAPH + {0xE0E2, 0x5654}, //16801 #CJK UNIFIED IDEOGRAPH + {0xE0E3, 0x5686}, //16802 #CJK UNIFIED IDEOGRAPH + {0xE0E4, 0x5664}, //16803 #CJK UNIFIED IDEOGRAPH + {0xE0E5, 0x5671}, //16804 #CJK UNIFIED IDEOGRAPH + {0xE0E6, 0x566B}, //16805 #CJK UNIFIED IDEOGRAPH + {0xE0E7, 0x567B}, //16806 #CJK UNIFIED IDEOGRAPH + {0xE0E8, 0x567C}, //16807 #CJK UNIFIED IDEOGRAPH + {0xE0E9, 0x5685}, //16808 #CJK UNIFIED IDEOGRAPH + {0xE0EA, 0x5693}, //16809 #CJK UNIFIED IDEOGRAPH + {0xE0EB, 0x56AF}, //16810 #CJK UNIFIED IDEOGRAPH + {0xE0EC, 0x56D4}, //16811 #CJK UNIFIED IDEOGRAPH + {0xE0ED, 0x56D7}, //16812 #CJK UNIFIED IDEOGRAPH + {0xE0EE, 0x56DD}, //16813 #CJK UNIFIED IDEOGRAPH + {0xE0EF, 0x56E1}, //16814 #CJK UNIFIED IDEOGRAPH + {0xE0F0, 0x56F5}, //16815 #CJK UNIFIED IDEOGRAPH + {0xE0F1, 0x56EB}, //16816 #CJK UNIFIED IDEOGRAPH + {0xE0F2, 0x56F9}, //16817 #CJK UNIFIED IDEOGRAPH + {0xE0F3, 0x56FF}, //16818 #CJK UNIFIED IDEOGRAPH + {0xE0F4, 0x5704}, //16819 #CJK UNIFIED IDEOGRAPH + {0xE0F5, 0x570A}, //16820 #CJK UNIFIED IDEOGRAPH + {0xE0F6, 0x5709}, //16821 #CJK UNIFIED IDEOGRAPH + {0xE0F7, 0x571C}, //16822 #CJK UNIFIED IDEOGRAPH + {0xE0F8, 0x5E0F}, //16823 #CJK UNIFIED IDEOGRAPH + {0xE0F9, 0x5E19}, //16824 #CJK UNIFIED IDEOGRAPH + {0xE0FA, 0x5E14}, //16825 #CJK UNIFIED IDEOGRAPH + {0xE0FB, 0x5E11}, //16826 #CJK UNIFIED IDEOGRAPH + {0xE0FC, 0x5E31}, //16827 #CJK UNIFIED IDEOGRAPH + {0xE0FD, 0x5E3B}, //16828 #CJK UNIFIED IDEOGRAPH + {0xE0FE, 0x5E3C}, //16829 #CJK UNIFIED IDEOGRAPH + {0xE140, 0x9145}, //16830 #CJK UNIFIED IDEOGRAPH + {0xE141, 0x9147}, //16831 #CJK UNIFIED IDEOGRAPH + {0xE142, 0x9148}, //16832 #CJK UNIFIED IDEOGRAPH + {0xE143, 0x9151}, //16833 #CJK UNIFIED IDEOGRAPH + {0xE144, 0x9153}, //16834 #CJK UNIFIED IDEOGRAPH + {0xE145, 0x9154}, //16835 #CJK UNIFIED IDEOGRAPH + {0xE146, 0x9155}, //16836 #CJK UNIFIED IDEOGRAPH + {0xE147, 0x9156}, //16837 #CJK UNIFIED IDEOGRAPH + {0xE148, 0x9158}, //16838 #CJK UNIFIED IDEOGRAPH + {0xE149, 0x9159}, //16839 #CJK UNIFIED IDEOGRAPH + {0xE14A, 0x915B}, //16840 #CJK UNIFIED IDEOGRAPH + {0xE14B, 0x915C}, //16841 #CJK UNIFIED IDEOGRAPH + {0xE14C, 0x915F}, //16842 #CJK UNIFIED IDEOGRAPH + {0xE14D, 0x9160}, //16843 #CJK UNIFIED IDEOGRAPH + {0xE14E, 0x9166}, //16844 #CJK UNIFIED IDEOGRAPH + {0xE14F, 0x9167}, //16845 #CJK UNIFIED IDEOGRAPH + {0xE150, 0x9168}, //16846 #CJK UNIFIED IDEOGRAPH + {0xE151, 0x916B}, //16847 #CJK UNIFIED IDEOGRAPH + {0xE152, 0x916D}, //16848 #CJK UNIFIED IDEOGRAPH + {0xE153, 0x9173}, //16849 #CJK UNIFIED IDEOGRAPH + {0xE154, 0x917A}, //16850 #CJK UNIFIED IDEOGRAPH + {0xE155, 0x917B}, //16851 #CJK UNIFIED IDEOGRAPH + {0xE156, 0x917C}, //16852 #CJK UNIFIED IDEOGRAPH + {0xE157, 0x9180}, //16853 #CJK UNIFIED IDEOGRAPH + {0xE158, 0x9181}, //16854 #CJK UNIFIED IDEOGRAPH + {0xE159, 0x9182}, //16855 #CJK UNIFIED IDEOGRAPH + {0xE15A, 0x9183}, //16856 #CJK UNIFIED IDEOGRAPH + {0xE15B, 0x9184}, //16857 #CJK UNIFIED IDEOGRAPH + {0xE15C, 0x9186}, //16858 #CJK UNIFIED IDEOGRAPH + {0xE15D, 0x9188}, //16859 #CJK UNIFIED IDEOGRAPH + {0xE15E, 0x918A}, //16860 #CJK UNIFIED IDEOGRAPH + {0xE15F, 0x918E}, //16861 #CJK UNIFIED IDEOGRAPH + {0xE160, 0x918F}, //16862 #CJK UNIFIED IDEOGRAPH + {0xE161, 0x9193}, //16863 #CJK UNIFIED IDEOGRAPH + {0xE162, 0x9194}, //16864 #CJK UNIFIED IDEOGRAPH + {0xE163, 0x9195}, //16865 #CJK UNIFIED IDEOGRAPH + {0xE164, 0x9196}, //16866 #CJK UNIFIED IDEOGRAPH + {0xE165, 0x9197}, //16867 #CJK UNIFIED IDEOGRAPH + {0xE166, 0x9198}, //16868 #CJK UNIFIED IDEOGRAPH + {0xE167, 0x9199}, //16869 #CJK UNIFIED IDEOGRAPH + {0xE168, 0x919C}, //16870 #CJK UNIFIED IDEOGRAPH + {0xE169, 0x919D}, //16871 #CJK UNIFIED IDEOGRAPH + {0xE16A, 0x919E}, //16872 #CJK UNIFIED IDEOGRAPH + {0xE16B, 0x919F}, //16873 #CJK UNIFIED IDEOGRAPH + {0xE16C, 0x91A0}, //16874 #CJK UNIFIED IDEOGRAPH + {0xE16D, 0x91A1}, //16875 #CJK UNIFIED IDEOGRAPH + {0xE16E, 0x91A4}, //16876 #CJK UNIFIED IDEOGRAPH + {0xE16F, 0x91A5}, //16877 #CJK UNIFIED IDEOGRAPH + {0xE170, 0x91A6}, //16878 #CJK UNIFIED IDEOGRAPH + {0xE171, 0x91A7}, //16879 #CJK UNIFIED IDEOGRAPH + {0xE172, 0x91A8}, //16880 #CJK UNIFIED IDEOGRAPH + {0xE173, 0x91A9}, //16881 #CJK UNIFIED IDEOGRAPH + {0xE174, 0x91AB}, //16882 #CJK UNIFIED IDEOGRAPH + {0xE175, 0x91AC}, //16883 #CJK UNIFIED IDEOGRAPH + {0xE176, 0x91B0}, //16884 #CJK UNIFIED IDEOGRAPH + {0xE177, 0x91B1}, //16885 #CJK UNIFIED IDEOGRAPH + {0xE178, 0x91B2}, //16886 #CJK UNIFIED IDEOGRAPH + {0xE179, 0x91B3}, //16887 #CJK UNIFIED IDEOGRAPH + {0xE17A, 0x91B6}, //16888 #CJK UNIFIED IDEOGRAPH + {0xE17B, 0x91B7}, //16889 #CJK UNIFIED IDEOGRAPH + {0xE17C, 0x91B8}, //16890 #CJK UNIFIED IDEOGRAPH + {0xE17D, 0x91B9}, //16891 #CJK UNIFIED IDEOGRAPH + {0xE17E, 0x91BB}, //16892 #CJK UNIFIED IDEOGRAPH + {0xE180, 0x91BC}, //16893 #CJK UNIFIED IDEOGRAPH + {0xE181, 0x91BD}, //16894 #CJK UNIFIED IDEOGRAPH + {0xE182, 0x91BE}, //16895 #CJK UNIFIED IDEOGRAPH + {0xE183, 0x91BF}, //16896 #CJK UNIFIED IDEOGRAPH + {0xE184, 0x91C0}, //16897 #CJK UNIFIED IDEOGRAPH + {0xE185, 0x91C1}, //16898 #CJK UNIFIED IDEOGRAPH + {0xE186, 0x91C2}, //16899 #CJK UNIFIED IDEOGRAPH + {0xE187, 0x91C3}, //16900 #CJK UNIFIED IDEOGRAPH + {0xE188, 0x91C4}, //16901 #CJK UNIFIED IDEOGRAPH + {0xE189, 0x91C5}, //16902 #CJK UNIFIED IDEOGRAPH + {0xE18A, 0x91C6}, //16903 #CJK UNIFIED IDEOGRAPH + {0xE18B, 0x91C8}, //16904 #CJK UNIFIED IDEOGRAPH + {0xE18C, 0x91CB}, //16905 #CJK UNIFIED IDEOGRAPH + {0xE18D, 0x91D0}, //16906 #CJK UNIFIED IDEOGRAPH + {0xE18E, 0x91D2}, //16907 #CJK UNIFIED IDEOGRAPH + {0xE18F, 0x91D3}, //16908 #CJK UNIFIED IDEOGRAPH + {0xE190, 0x91D4}, //16909 #CJK UNIFIED IDEOGRAPH + {0xE191, 0x91D5}, //16910 #CJK UNIFIED IDEOGRAPH + {0xE192, 0x91D6}, //16911 #CJK UNIFIED IDEOGRAPH + {0xE193, 0x91D7}, //16912 #CJK UNIFIED IDEOGRAPH + {0xE194, 0x91D8}, //16913 #CJK UNIFIED IDEOGRAPH + {0xE195, 0x91D9}, //16914 #CJK UNIFIED IDEOGRAPH + {0xE196, 0x91DA}, //16915 #CJK UNIFIED IDEOGRAPH + {0xE197, 0x91DB}, //16916 #CJK UNIFIED IDEOGRAPH + {0xE198, 0x91DD}, //16917 #CJK UNIFIED IDEOGRAPH + {0xE199, 0x91DE}, //16918 #CJK UNIFIED IDEOGRAPH + {0xE19A, 0x91DF}, //16919 #CJK UNIFIED IDEOGRAPH + {0xE19B, 0x91E0}, //16920 #CJK UNIFIED IDEOGRAPH + {0xE19C, 0x91E1}, //16921 #CJK UNIFIED IDEOGRAPH + {0xE19D, 0x91E2}, //16922 #CJK UNIFIED IDEOGRAPH + {0xE19E, 0x91E3}, //16923 #CJK UNIFIED IDEOGRAPH + {0xE19F, 0x91E4}, //16924 #CJK UNIFIED IDEOGRAPH + {0xE1A0, 0x91E5}, //16925 #CJK UNIFIED IDEOGRAPH + {0xE1A1, 0x5E37}, //16926 #CJK UNIFIED IDEOGRAPH + {0xE1A2, 0x5E44}, //16927 #CJK UNIFIED IDEOGRAPH + {0xE1A3, 0x5E54}, //16928 #CJK UNIFIED IDEOGRAPH + {0xE1A4, 0x5E5B}, //16929 #CJK UNIFIED IDEOGRAPH + {0xE1A5, 0x5E5E}, //16930 #CJK UNIFIED IDEOGRAPH + {0xE1A6, 0x5E61}, //16931 #CJK UNIFIED IDEOGRAPH + {0xE1A7, 0x5C8C}, //16932 #CJK UNIFIED IDEOGRAPH + {0xE1A8, 0x5C7A}, //16933 #CJK UNIFIED IDEOGRAPH + {0xE1A9, 0x5C8D}, //16934 #CJK UNIFIED IDEOGRAPH + {0xE1AA, 0x5C90}, //16935 #CJK UNIFIED IDEOGRAPH + {0xE1AB, 0x5C96}, //16936 #CJK UNIFIED IDEOGRAPH + {0xE1AC, 0x5C88}, //16937 #CJK UNIFIED IDEOGRAPH + {0xE1AD, 0x5C98}, //16938 #CJK UNIFIED IDEOGRAPH + {0xE1AE, 0x5C99}, //16939 #CJK UNIFIED IDEOGRAPH + {0xE1AF, 0x5C91}, //16940 #CJK UNIFIED IDEOGRAPH + {0xE1B0, 0x5C9A}, //16941 #CJK UNIFIED IDEOGRAPH + {0xE1B1, 0x5C9C}, //16942 #CJK UNIFIED IDEOGRAPH + {0xE1B2, 0x5CB5}, //16943 #CJK UNIFIED IDEOGRAPH + {0xE1B3, 0x5CA2}, //16944 #CJK UNIFIED IDEOGRAPH + {0xE1B4, 0x5CBD}, //16945 #CJK UNIFIED IDEOGRAPH + {0xE1B5, 0x5CAC}, //16946 #CJK UNIFIED IDEOGRAPH + {0xE1B6, 0x5CAB}, //16947 #CJK UNIFIED IDEOGRAPH + {0xE1B7, 0x5CB1}, //16948 #CJK UNIFIED IDEOGRAPH + {0xE1B8, 0x5CA3}, //16949 #CJK UNIFIED IDEOGRAPH + {0xE1B9, 0x5CC1}, //16950 #CJK UNIFIED IDEOGRAPH + {0xE1BA, 0x5CB7}, //16951 #CJK UNIFIED IDEOGRAPH + {0xE1BB, 0x5CC4}, //16952 #CJK UNIFIED IDEOGRAPH + {0xE1BC, 0x5CD2}, //16953 #CJK UNIFIED IDEOGRAPH + {0xE1BD, 0x5CE4}, //16954 #CJK UNIFIED IDEOGRAPH + {0xE1BE, 0x5CCB}, //16955 #CJK UNIFIED IDEOGRAPH + {0xE1BF, 0x5CE5}, //16956 #CJK UNIFIED IDEOGRAPH + {0xE1C0, 0x5D02}, //16957 #CJK UNIFIED IDEOGRAPH + {0xE1C1, 0x5D03}, //16958 #CJK UNIFIED IDEOGRAPH + {0xE1C2, 0x5D27}, //16959 #CJK UNIFIED IDEOGRAPH + {0xE1C3, 0x5D26}, //16960 #CJK UNIFIED IDEOGRAPH + {0xE1C4, 0x5D2E}, //16961 #CJK UNIFIED IDEOGRAPH + {0xE1C5, 0x5D24}, //16962 #CJK UNIFIED IDEOGRAPH + {0xE1C6, 0x5D1E}, //16963 #CJK UNIFIED IDEOGRAPH + {0xE1C7, 0x5D06}, //16964 #CJK UNIFIED IDEOGRAPH + {0xE1C8, 0x5D1B}, //16965 #CJK UNIFIED IDEOGRAPH + {0xE1C9, 0x5D58}, //16966 #CJK UNIFIED IDEOGRAPH + {0xE1CA, 0x5D3E}, //16967 #CJK UNIFIED IDEOGRAPH + {0xE1CB, 0x5D34}, //16968 #CJK UNIFIED IDEOGRAPH + {0xE1CC, 0x5D3D}, //16969 #CJK UNIFIED IDEOGRAPH + {0xE1CD, 0x5D6C}, //16970 #CJK UNIFIED IDEOGRAPH + {0xE1CE, 0x5D5B}, //16971 #CJK UNIFIED IDEOGRAPH + {0xE1CF, 0x5D6F}, //16972 #CJK UNIFIED IDEOGRAPH + {0xE1D0, 0x5D5D}, //16973 #CJK UNIFIED IDEOGRAPH + {0xE1D1, 0x5D6B}, //16974 #CJK UNIFIED IDEOGRAPH + {0xE1D2, 0x5D4B}, //16975 #CJK UNIFIED IDEOGRAPH + {0xE1D3, 0x5D4A}, //16976 #CJK UNIFIED IDEOGRAPH + {0xE1D4, 0x5D69}, //16977 #CJK UNIFIED IDEOGRAPH + {0xE1D5, 0x5D74}, //16978 #CJK UNIFIED IDEOGRAPH + {0xE1D6, 0x5D82}, //16979 #CJK UNIFIED IDEOGRAPH + {0xE1D7, 0x5D99}, //16980 #CJK UNIFIED IDEOGRAPH + {0xE1D8, 0x5D9D}, //16981 #CJK UNIFIED IDEOGRAPH + {0xE1D9, 0x8C73}, //16982 #CJK UNIFIED IDEOGRAPH + {0xE1DA, 0x5DB7}, //16983 #CJK UNIFIED IDEOGRAPH + {0xE1DB, 0x5DC5}, //16984 #CJK UNIFIED IDEOGRAPH + {0xE1DC, 0x5F73}, //16985 #CJK UNIFIED IDEOGRAPH + {0xE1DD, 0x5F77}, //16986 #CJK UNIFIED IDEOGRAPH + {0xE1DE, 0x5F82}, //16987 #CJK UNIFIED IDEOGRAPH + {0xE1DF, 0x5F87}, //16988 #CJK UNIFIED IDEOGRAPH + {0xE1E0, 0x5F89}, //16989 #CJK UNIFIED IDEOGRAPH + {0xE1E1, 0x5F8C}, //16990 #CJK UNIFIED IDEOGRAPH + {0xE1E2, 0x5F95}, //16991 #CJK UNIFIED IDEOGRAPH + {0xE1E3, 0x5F99}, //16992 #CJK UNIFIED IDEOGRAPH + {0xE1E4, 0x5F9C}, //16993 #CJK UNIFIED IDEOGRAPH + {0xE1E5, 0x5FA8}, //16994 #CJK UNIFIED IDEOGRAPH + {0xE1E6, 0x5FAD}, //16995 #CJK UNIFIED IDEOGRAPH + {0xE1E7, 0x5FB5}, //16996 #CJK UNIFIED IDEOGRAPH + {0xE1E8, 0x5FBC}, //16997 #CJK UNIFIED IDEOGRAPH + {0xE1E9, 0x8862}, //16998 #CJK UNIFIED IDEOGRAPH + {0xE1EA, 0x5F61}, //16999 #CJK UNIFIED IDEOGRAPH + {0xE1EB, 0x72AD}, //17000 #CJK UNIFIED IDEOGRAPH + {0xE1EC, 0x72B0}, //17001 #CJK UNIFIED IDEOGRAPH + {0xE1ED, 0x72B4}, //17002 #CJK UNIFIED IDEOGRAPH + {0xE1EE, 0x72B7}, //17003 #CJK UNIFIED IDEOGRAPH + {0xE1EF, 0x72B8}, //17004 #CJK UNIFIED IDEOGRAPH + {0xE1F0, 0x72C3}, //17005 #CJK UNIFIED IDEOGRAPH + {0xE1F1, 0x72C1}, //17006 #CJK UNIFIED IDEOGRAPH + {0xE1F2, 0x72CE}, //17007 #CJK UNIFIED IDEOGRAPH + {0xE1F3, 0x72CD}, //17008 #CJK UNIFIED IDEOGRAPH + {0xE1F4, 0x72D2}, //17009 #CJK UNIFIED IDEOGRAPH + {0xE1F5, 0x72E8}, //17010 #CJK UNIFIED IDEOGRAPH + {0xE1F6, 0x72EF}, //17011 #CJK UNIFIED IDEOGRAPH + {0xE1F7, 0x72E9}, //17012 #CJK UNIFIED IDEOGRAPH + {0xE1F8, 0x72F2}, //17013 #CJK UNIFIED IDEOGRAPH + {0xE1F9, 0x72F4}, //17014 #CJK UNIFIED IDEOGRAPH + {0xE1FA, 0x72F7}, //17015 #CJK UNIFIED IDEOGRAPH + {0xE1FB, 0x7301}, //17016 #CJK UNIFIED IDEOGRAPH + {0xE1FC, 0x72F3}, //17017 #CJK UNIFIED IDEOGRAPH + {0xE1FD, 0x7303}, //17018 #CJK UNIFIED IDEOGRAPH + {0xE1FE, 0x72FA}, //17019 #CJK UNIFIED IDEOGRAPH + {0xE240, 0x91E6}, //17020 #CJK UNIFIED IDEOGRAPH + {0xE241, 0x91E7}, //17021 #CJK UNIFIED IDEOGRAPH + {0xE242, 0x91E8}, //17022 #CJK UNIFIED IDEOGRAPH + {0xE243, 0x91E9}, //17023 #CJK UNIFIED IDEOGRAPH + {0xE244, 0x91EA}, //17024 #CJK UNIFIED IDEOGRAPH + {0xE245, 0x91EB}, //17025 #CJK UNIFIED IDEOGRAPH + {0xE246, 0x91EC}, //17026 #CJK UNIFIED IDEOGRAPH + {0xE247, 0x91ED}, //17027 #CJK UNIFIED IDEOGRAPH + {0xE248, 0x91EE}, //17028 #CJK UNIFIED IDEOGRAPH + {0xE249, 0x91EF}, //17029 #CJK UNIFIED IDEOGRAPH + {0xE24A, 0x91F0}, //17030 #CJK UNIFIED IDEOGRAPH + {0xE24B, 0x91F1}, //17031 #CJK UNIFIED IDEOGRAPH + {0xE24C, 0x91F2}, //17032 #CJK UNIFIED IDEOGRAPH + {0xE24D, 0x91F3}, //17033 #CJK UNIFIED IDEOGRAPH + {0xE24E, 0x91F4}, //17034 #CJK UNIFIED IDEOGRAPH + {0xE24F, 0x91F5}, //17035 #CJK UNIFIED IDEOGRAPH + {0xE250, 0x91F6}, //17036 #CJK UNIFIED IDEOGRAPH + {0xE251, 0x91F7}, //17037 #CJK UNIFIED IDEOGRAPH + {0xE252, 0x91F8}, //17038 #CJK UNIFIED IDEOGRAPH + {0xE253, 0x91F9}, //17039 #CJK UNIFIED IDEOGRAPH + {0xE254, 0x91FA}, //17040 #CJK UNIFIED IDEOGRAPH + {0xE255, 0x91FB}, //17041 #CJK UNIFIED IDEOGRAPH + {0xE256, 0x91FC}, //17042 #CJK UNIFIED IDEOGRAPH + {0xE257, 0x91FD}, //17043 #CJK UNIFIED IDEOGRAPH + {0xE258, 0x91FE}, //17044 #CJK UNIFIED IDEOGRAPH + {0xE259, 0x91FF}, //17045 #CJK UNIFIED IDEOGRAPH + {0xE25A, 0x9200}, //17046 #CJK UNIFIED IDEOGRAPH + {0xE25B, 0x9201}, //17047 #CJK UNIFIED IDEOGRAPH + {0xE25C, 0x9202}, //17048 #CJK UNIFIED IDEOGRAPH + {0xE25D, 0x9203}, //17049 #CJK UNIFIED IDEOGRAPH + {0xE25E, 0x9204}, //17050 #CJK UNIFIED IDEOGRAPH + {0xE25F, 0x9205}, //17051 #CJK UNIFIED IDEOGRAPH + {0xE260, 0x9206}, //17052 #CJK UNIFIED IDEOGRAPH + {0xE261, 0x9207}, //17053 #CJK UNIFIED IDEOGRAPH + {0xE262, 0x9208}, //17054 #CJK UNIFIED IDEOGRAPH + {0xE263, 0x9209}, //17055 #CJK UNIFIED IDEOGRAPH + {0xE264, 0x920A}, //17056 #CJK UNIFIED IDEOGRAPH + {0xE265, 0x920B}, //17057 #CJK UNIFIED IDEOGRAPH + {0xE266, 0x920C}, //17058 #CJK UNIFIED IDEOGRAPH + {0xE267, 0x920D}, //17059 #CJK UNIFIED IDEOGRAPH + {0xE268, 0x920E}, //17060 #CJK UNIFIED IDEOGRAPH + {0xE269, 0x920F}, //17061 #CJK UNIFIED IDEOGRAPH + {0xE26A, 0x9210}, //17062 #CJK UNIFIED IDEOGRAPH + {0xE26B, 0x9211}, //17063 #CJK UNIFIED IDEOGRAPH + {0xE26C, 0x9212}, //17064 #CJK UNIFIED IDEOGRAPH + {0xE26D, 0x9213}, //17065 #CJK UNIFIED IDEOGRAPH + {0xE26E, 0x9214}, //17066 #CJK UNIFIED IDEOGRAPH + {0xE26F, 0x9215}, //17067 #CJK UNIFIED IDEOGRAPH + {0xE270, 0x9216}, //17068 #CJK UNIFIED IDEOGRAPH + {0xE271, 0x9217}, //17069 #CJK UNIFIED IDEOGRAPH + {0xE272, 0x9218}, //17070 #CJK UNIFIED IDEOGRAPH + {0xE273, 0x9219}, //17071 #CJK UNIFIED IDEOGRAPH + {0xE274, 0x921A}, //17072 #CJK UNIFIED IDEOGRAPH + {0xE275, 0x921B}, //17073 #CJK UNIFIED IDEOGRAPH + {0xE276, 0x921C}, //17074 #CJK UNIFIED IDEOGRAPH + {0xE277, 0x921D}, //17075 #CJK UNIFIED IDEOGRAPH + {0xE278, 0x921E}, //17076 #CJK UNIFIED IDEOGRAPH + {0xE279, 0x921F}, //17077 #CJK UNIFIED IDEOGRAPH + {0xE27A, 0x9220}, //17078 #CJK UNIFIED IDEOGRAPH + {0xE27B, 0x9221}, //17079 #CJK UNIFIED IDEOGRAPH + {0xE27C, 0x9222}, //17080 #CJK UNIFIED IDEOGRAPH + {0xE27D, 0x9223}, //17081 #CJK UNIFIED IDEOGRAPH + {0xE27E, 0x9224}, //17082 #CJK UNIFIED IDEOGRAPH + {0xE280, 0x9225}, //17083 #CJK UNIFIED IDEOGRAPH + {0xE281, 0x9226}, //17084 #CJK UNIFIED IDEOGRAPH + {0xE282, 0x9227}, //17085 #CJK UNIFIED IDEOGRAPH + {0xE283, 0x9228}, //17086 #CJK UNIFIED IDEOGRAPH + {0xE284, 0x9229}, //17087 #CJK UNIFIED IDEOGRAPH + {0xE285, 0x922A}, //17088 #CJK UNIFIED IDEOGRAPH + {0xE286, 0x922B}, //17089 #CJK UNIFIED IDEOGRAPH + {0xE287, 0x922C}, //17090 #CJK UNIFIED IDEOGRAPH + {0xE288, 0x922D}, //17091 #CJK UNIFIED IDEOGRAPH + {0xE289, 0x922E}, //17092 #CJK UNIFIED IDEOGRAPH + {0xE28A, 0x922F}, //17093 #CJK UNIFIED IDEOGRAPH + {0xE28B, 0x9230}, //17094 #CJK UNIFIED IDEOGRAPH + {0xE28C, 0x9231}, //17095 #CJK UNIFIED IDEOGRAPH + {0xE28D, 0x9232}, //17096 #CJK UNIFIED IDEOGRAPH + {0xE28E, 0x9233}, //17097 #CJK UNIFIED IDEOGRAPH + {0xE28F, 0x9234}, //17098 #CJK UNIFIED IDEOGRAPH + {0xE290, 0x9235}, //17099 #CJK UNIFIED IDEOGRAPH + {0xE291, 0x9236}, //17100 #CJK UNIFIED IDEOGRAPH + {0xE292, 0x9237}, //17101 #CJK UNIFIED IDEOGRAPH + {0xE293, 0x9238}, //17102 #CJK UNIFIED IDEOGRAPH + {0xE294, 0x9239}, //17103 #CJK UNIFIED IDEOGRAPH + {0xE295, 0x923A}, //17104 #CJK UNIFIED IDEOGRAPH + {0xE296, 0x923B}, //17105 #CJK UNIFIED IDEOGRAPH + {0xE297, 0x923C}, //17106 #CJK UNIFIED IDEOGRAPH + {0xE298, 0x923D}, //17107 #CJK UNIFIED IDEOGRAPH + {0xE299, 0x923E}, //17108 #CJK UNIFIED IDEOGRAPH + {0xE29A, 0x923F}, //17109 #CJK UNIFIED IDEOGRAPH + {0xE29B, 0x9240}, //17110 #CJK UNIFIED IDEOGRAPH + {0xE29C, 0x9241}, //17111 #CJK UNIFIED IDEOGRAPH + {0xE29D, 0x9242}, //17112 #CJK UNIFIED IDEOGRAPH + {0xE29E, 0x9243}, //17113 #CJK UNIFIED IDEOGRAPH + {0xE29F, 0x9244}, //17114 #CJK UNIFIED IDEOGRAPH + {0xE2A0, 0x9245}, //17115 #CJK UNIFIED IDEOGRAPH + {0xE2A1, 0x72FB}, //17116 #CJK UNIFIED IDEOGRAPH + {0xE2A2, 0x7317}, //17117 #CJK UNIFIED IDEOGRAPH + {0xE2A3, 0x7313}, //17118 #CJK UNIFIED IDEOGRAPH + {0xE2A4, 0x7321}, //17119 #CJK UNIFIED IDEOGRAPH + {0xE2A5, 0x730A}, //17120 #CJK UNIFIED IDEOGRAPH + {0xE2A6, 0x731E}, //17121 #CJK UNIFIED IDEOGRAPH + {0xE2A7, 0x731D}, //17122 #CJK UNIFIED IDEOGRAPH + {0xE2A8, 0x7315}, //17123 #CJK UNIFIED IDEOGRAPH + {0xE2A9, 0x7322}, //17124 #CJK UNIFIED IDEOGRAPH + {0xE2AA, 0x7339}, //17125 #CJK UNIFIED IDEOGRAPH + {0xE2AB, 0x7325}, //17126 #CJK UNIFIED IDEOGRAPH + {0xE2AC, 0x732C}, //17127 #CJK UNIFIED IDEOGRAPH + {0xE2AD, 0x7338}, //17128 #CJK UNIFIED IDEOGRAPH + {0xE2AE, 0x7331}, //17129 #CJK UNIFIED IDEOGRAPH + {0xE2AF, 0x7350}, //17130 #CJK UNIFIED IDEOGRAPH + {0xE2B0, 0x734D}, //17131 #CJK UNIFIED IDEOGRAPH + {0xE2B1, 0x7357}, //17132 #CJK UNIFIED IDEOGRAPH + {0xE2B2, 0x7360}, //17133 #CJK UNIFIED IDEOGRAPH + {0xE2B3, 0x736C}, //17134 #CJK UNIFIED IDEOGRAPH + {0xE2B4, 0x736F}, //17135 #CJK UNIFIED IDEOGRAPH + {0xE2B5, 0x737E}, //17136 #CJK UNIFIED IDEOGRAPH + {0xE2B6, 0x821B}, //17137 #CJK UNIFIED IDEOGRAPH + {0xE2B7, 0x5925}, //17138 #CJK UNIFIED IDEOGRAPH + {0xE2B8, 0x98E7}, //17139 #CJK UNIFIED IDEOGRAPH + {0xE2B9, 0x5924}, //17140 #CJK UNIFIED IDEOGRAPH + {0xE2BA, 0x5902}, //17141 #CJK UNIFIED IDEOGRAPH + {0xE2BB, 0x9963}, //17142 #CJK UNIFIED IDEOGRAPH + {0xE2BC, 0x9967}, //17143 #CJK UNIFIED IDEOGRAPH + {0xE2BD, 0x9968}, //17144 #CJK UNIFIED IDEOGRAPH + {0xE2BE, 0x9969}, //17145 #CJK UNIFIED IDEOGRAPH + {0xE2BF, 0x996A}, //17146 #CJK UNIFIED IDEOGRAPH + {0xE2C0, 0x996B}, //17147 #CJK UNIFIED IDEOGRAPH + {0xE2C1, 0x996C}, //17148 #CJK UNIFIED IDEOGRAPH + {0xE2C2, 0x9974}, //17149 #CJK UNIFIED IDEOGRAPH + {0xE2C3, 0x9977}, //17150 #CJK UNIFIED IDEOGRAPH + {0xE2C4, 0x997D}, //17151 #CJK UNIFIED IDEOGRAPH + {0xE2C5, 0x9980}, //17152 #CJK UNIFIED IDEOGRAPH + {0xE2C6, 0x9984}, //17153 #CJK UNIFIED IDEOGRAPH + {0xE2C7, 0x9987}, //17154 #CJK UNIFIED IDEOGRAPH + {0xE2C8, 0x998A}, //17155 #CJK UNIFIED IDEOGRAPH + {0xE2C9, 0x998D}, //17156 #CJK UNIFIED IDEOGRAPH + {0xE2CA, 0x9990}, //17157 #CJK UNIFIED IDEOGRAPH + {0xE2CB, 0x9991}, //17158 #CJK UNIFIED IDEOGRAPH + {0xE2CC, 0x9993}, //17159 #CJK UNIFIED IDEOGRAPH + {0xE2CD, 0x9994}, //17160 #CJK UNIFIED IDEOGRAPH + {0xE2CE, 0x9995}, //17161 #CJK UNIFIED IDEOGRAPH + {0xE2CF, 0x5E80}, //17162 #CJK UNIFIED IDEOGRAPH + {0xE2D0, 0x5E91}, //17163 #CJK UNIFIED IDEOGRAPH + {0xE2D1, 0x5E8B}, //17164 #CJK UNIFIED IDEOGRAPH + {0xE2D2, 0x5E96}, //17165 #CJK UNIFIED IDEOGRAPH + {0xE2D3, 0x5EA5}, //17166 #CJK UNIFIED IDEOGRAPH + {0xE2D4, 0x5EA0}, //17167 #CJK UNIFIED IDEOGRAPH + {0xE2D5, 0x5EB9}, //17168 #CJK UNIFIED IDEOGRAPH + {0xE2D6, 0x5EB5}, //17169 #CJK UNIFIED IDEOGRAPH + {0xE2D7, 0x5EBE}, //17170 #CJK UNIFIED IDEOGRAPH + {0xE2D8, 0x5EB3}, //17171 #CJK UNIFIED IDEOGRAPH + {0xE2D9, 0x8D53}, //17172 #CJK UNIFIED IDEOGRAPH + {0xE2DA, 0x5ED2}, //17173 #CJK UNIFIED IDEOGRAPH + {0xE2DB, 0x5ED1}, //17174 #CJK UNIFIED IDEOGRAPH + {0xE2DC, 0x5EDB}, //17175 #CJK UNIFIED IDEOGRAPH + {0xE2DD, 0x5EE8}, //17176 #CJK UNIFIED IDEOGRAPH + {0xE2DE, 0x5EEA}, //17177 #CJK UNIFIED IDEOGRAPH + {0xE2DF, 0x81BA}, //17178 #CJK UNIFIED IDEOGRAPH + {0xE2E0, 0x5FC4}, //17179 #CJK UNIFIED IDEOGRAPH + {0xE2E1, 0x5FC9}, //17180 #CJK UNIFIED IDEOGRAPH + {0xE2E2, 0x5FD6}, //17181 #CJK UNIFIED IDEOGRAPH + {0xE2E3, 0x5FCF}, //17182 #CJK UNIFIED IDEOGRAPH + {0xE2E4, 0x6003}, //17183 #CJK UNIFIED IDEOGRAPH + {0xE2E5, 0x5FEE}, //17184 #CJK UNIFIED IDEOGRAPH + {0xE2E6, 0x6004}, //17185 #CJK UNIFIED IDEOGRAPH + {0xE2E7, 0x5FE1}, //17186 #CJK UNIFIED IDEOGRAPH + {0xE2E8, 0x5FE4}, //17187 #CJK UNIFIED IDEOGRAPH + {0xE2E9, 0x5FFE}, //17188 #CJK UNIFIED IDEOGRAPH + {0xE2EA, 0x6005}, //17189 #CJK UNIFIED IDEOGRAPH + {0xE2EB, 0x6006}, //17190 #CJK UNIFIED IDEOGRAPH + {0xE2EC, 0x5FEA}, //17191 #CJK UNIFIED IDEOGRAPH + {0xE2ED, 0x5FED}, //17192 #CJK UNIFIED IDEOGRAPH + {0xE2EE, 0x5FF8}, //17193 #CJK UNIFIED IDEOGRAPH + {0xE2EF, 0x6019}, //17194 #CJK UNIFIED IDEOGRAPH + {0xE2F0, 0x6035}, //17195 #CJK UNIFIED IDEOGRAPH + {0xE2F1, 0x6026}, //17196 #CJK UNIFIED IDEOGRAPH + {0xE2F2, 0x601B}, //17197 #CJK UNIFIED IDEOGRAPH + {0xE2F3, 0x600F}, //17198 #CJK UNIFIED IDEOGRAPH + {0xE2F4, 0x600D}, //17199 #CJK UNIFIED IDEOGRAPH + {0xE2F5, 0x6029}, //17200 #CJK UNIFIED IDEOGRAPH + {0xE2F6, 0x602B}, //17201 #CJK UNIFIED IDEOGRAPH + {0xE2F7, 0x600A}, //17202 #CJK UNIFIED IDEOGRAPH + {0xE2F8, 0x603F}, //17203 #CJK UNIFIED IDEOGRAPH + {0xE2F9, 0x6021}, //17204 #CJK UNIFIED IDEOGRAPH + {0xE2FA, 0x6078}, //17205 #CJK UNIFIED IDEOGRAPH + {0xE2FB, 0x6079}, //17206 #CJK UNIFIED IDEOGRAPH + {0xE2FC, 0x607B}, //17207 #CJK UNIFIED IDEOGRAPH + {0xE2FD, 0x607A}, //17208 #CJK UNIFIED IDEOGRAPH + {0xE2FE, 0x6042}, //17209 #CJK UNIFIED IDEOGRAPH + {0xE340, 0x9246}, //17210 #CJK UNIFIED IDEOGRAPH + {0xE341, 0x9247}, //17211 #CJK UNIFIED IDEOGRAPH + {0xE342, 0x9248}, //17212 #CJK UNIFIED IDEOGRAPH + {0xE343, 0x9249}, //17213 #CJK UNIFIED IDEOGRAPH + {0xE344, 0x924A}, //17214 #CJK UNIFIED IDEOGRAPH + {0xE345, 0x924B}, //17215 #CJK UNIFIED IDEOGRAPH + {0xE346, 0x924C}, //17216 #CJK UNIFIED IDEOGRAPH + {0xE347, 0x924D}, //17217 #CJK UNIFIED IDEOGRAPH + {0xE348, 0x924E}, //17218 #CJK UNIFIED IDEOGRAPH + {0xE349, 0x924F}, //17219 #CJK UNIFIED IDEOGRAPH + {0xE34A, 0x9250}, //17220 #CJK UNIFIED IDEOGRAPH + {0xE34B, 0x9251}, //17221 #CJK UNIFIED IDEOGRAPH + {0xE34C, 0x9252}, //17222 #CJK UNIFIED IDEOGRAPH + {0xE34D, 0x9253}, //17223 #CJK UNIFIED IDEOGRAPH + {0xE34E, 0x9254}, //17224 #CJK UNIFIED IDEOGRAPH + {0xE34F, 0x9255}, //17225 #CJK UNIFIED IDEOGRAPH + {0xE350, 0x9256}, //17226 #CJK UNIFIED IDEOGRAPH + {0xE351, 0x9257}, //17227 #CJK UNIFIED IDEOGRAPH + {0xE352, 0x9258}, //17228 #CJK UNIFIED IDEOGRAPH + {0xE353, 0x9259}, //17229 #CJK UNIFIED IDEOGRAPH + {0xE354, 0x925A}, //17230 #CJK UNIFIED IDEOGRAPH + {0xE355, 0x925B}, //17231 #CJK UNIFIED IDEOGRAPH + {0xE356, 0x925C}, //17232 #CJK UNIFIED IDEOGRAPH + {0xE357, 0x925D}, //17233 #CJK UNIFIED IDEOGRAPH + {0xE358, 0x925E}, //17234 #CJK UNIFIED IDEOGRAPH + {0xE359, 0x925F}, //17235 #CJK UNIFIED IDEOGRAPH + {0xE35A, 0x9260}, //17236 #CJK UNIFIED IDEOGRAPH + {0xE35B, 0x9261}, //17237 #CJK UNIFIED IDEOGRAPH + {0xE35C, 0x9262}, //17238 #CJK UNIFIED IDEOGRAPH + {0xE35D, 0x9263}, //17239 #CJK UNIFIED IDEOGRAPH + {0xE35E, 0x9264}, //17240 #CJK UNIFIED IDEOGRAPH + {0xE35F, 0x9265}, //17241 #CJK UNIFIED IDEOGRAPH + {0xE360, 0x9266}, //17242 #CJK UNIFIED IDEOGRAPH + {0xE361, 0x9267}, //17243 #CJK UNIFIED IDEOGRAPH + {0xE362, 0x9268}, //17244 #CJK UNIFIED IDEOGRAPH + {0xE363, 0x9269}, //17245 #CJK UNIFIED IDEOGRAPH + {0xE364, 0x926A}, //17246 #CJK UNIFIED IDEOGRAPH + {0xE365, 0x926B}, //17247 #CJK UNIFIED IDEOGRAPH + {0xE366, 0x926C}, //17248 #CJK UNIFIED IDEOGRAPH + {0xE367, 0x926D}, //17249 #CJK UNIFIED IDEOGRAPH + {0xE368, 0x926E}, //17250 #CJK UNIFIED IDEOGRAPH + {0xE369, 0x926F}, //17251 #CJK UNIFIED IDEOGRAPH + {0xE36A, 0x9270}, //17252 #CJK UNIFIED IDEOGRAPH + {0xE36B, 0x9271}, //17253 #CJK UNIFIED IDEOGRAPH + {0xE36C, 0x9272}, //17254 #CJK UNIFIED IDEOGRAPH + {0xE36D, 0x9273}, //17255 #CJK UNIFIED IDEOGRAPH + {0xE36E, 0x9275}, //17256 #CJK UNIFIED IDEOGRAPH + {0xE36F, 0x9276}, //17257 #CJK UNIFIED IDEOGRAPH + {0xE370, 0x9277}, //17258 #CJK UNIFIED IDEOGRAPH + {0xE371, 0x9278}, //17259 #CJK UNIFIED IDEOGRAPH + {0xE372, 0x9279}, //17260 #CJK UNIFIED IDEOGRAPH + {0xE373, 0x927A}, //17261 #CJK UNIFIED IDEOGRAPH + {0xE374, 0x927B}, //17262 #CJK UNIFIED IDEOGRAPH + {0xE375, 0x927C}, //17263 #CJK UNIFIED IDEOGRAPH + {0xE376, 0x927D}, //17264 #CJK UNIFIED IDEOGRAPH + {0xE377, 0x927E}, //17265 #CJK UNIFIED IDEOGRAPH + {0xE378, 0x927F}, //17266 #CJK UNIFIED IDEOGRAPH + {0xE379, 0x9280}, //17267 #CJK UNIFIED IDEOGRAPH + {0xE37A, 0x9281}, //17268 #CJK UNIFIED IDEOGRAPH + {0xE37B, 0x9282}, //17269 #CJK UNIFIED IDEOGRAPH + {0xE37C, 0x9283}, //17270 #CJK UNIFIED IDEOGRAPH + {0xE37D, 0x9284}, //17271 #CJK UNIFIED IDEOGRAPH + {0xE37E, 0x9285}, //17272 #CJK UNIFIED IDEOGRAPH + {0xE380, 0x9286}, //17273 #CJK UNIFIED IDEOGRAPH + {0xE381, 0x9287}, //17274 #CJK UNIFIED IDEOGRAPH + {0xE382, 0x9288}, //17275 #CJK UNIFIED IDEOGRAPH + {0xE383, 0x9289}, //17276 #CJK UNIFIED IDEOGRAPH + {0xE384, 0x928A}, //17277 #CJK UNIFIED IDEOGRAPH + {0xE385, 0x928B}, //17278 #CJK UNIFIED IDEOGRAPH + {0xE386, 0x928C}, //17279 #CJK UNIFIED IDEOGRAPH + {0xE387, 0x928D}, //17280 #CJK UNIFIED IDEOGRAPH + {0xE388, 0x928F}, //17281 #CJK UNIFIED IDEOGRAPH + {0xE389, 0x9290}, //17282 #CJK UNIFIED IDEOGRAPH + {0xE38A, 0x9291}, //17283 #CJK UNIFIED IDEOGRAPH + {0xE38B, 0x9292}, //17284 #CJK UNIFIED IDEOGRAPH + {0xE38C, 0x9293}, //17285 #CJK UNIFIED IDEOGRAPH + {0xE38D, 0x9294}, //17286 #CJK UNIFIED IDEOGRAPH + {0xE38E, 0x9295}, //17287 #CJK UNIFIED IDEOGRAPH + {0xE38F, 0x9296}, //17288 #CJK UNIFIED IDEOGRAPH + {0xE390, 0x9297}, //17289 #CJK UNIFIED IDEOGRAPH + {0xE391, 0x9298}, //17290 #CJK UNIFIED IDEOGRAPH + {0xE392, 0x9299}, //17291 #CJK UNIFIED IDEOGRAPH + {0xE393, 0x929A}, //17292 #CJK UNIFIED IDEOGRAPH + {0xE394, 0x929B}, //17293 #CJK UNIFIED IDEOGRAPH + {0xE395, 0x929C}, //17294 #CJK UNIFIED IDEOGRAPH + {0xE396, 0x929D}, //17295 #CJK UNIFIED IDEOGRAPH + {0xE397, 0x929E}, //17296 #CJK UNIFIED IDEOGRAPH + {0xE398, 0x929F}, //17297 #CJK UNIFIED IDEOGRAPH + {0xE399, 0x92A0}, //17298 #CJK UNIFIED IDEOGRAPH + {0xE39A, 0x92A1}, //17299 #CJK UNIFIED IDEOGRAPH + {0xE39B, 0x92A2}, //17300 #CJK UNIFIED IDEOGRAPH + {0xE39C, 0x92A3}, //17301 #CJK UNIFIED IDEOGRAPH + {0xE39D, 0x92A4}, //17302 #CJK UNIFIED IDEOGRAPH + {0xE39E, 0x92A5}, //17303 #CJK UNIFIED IDEOGRAPH + {0xE39F, 0x92A6}, //17304 #CJK UNIFIED IDEOGRAPH + {0xE3A0, 0x92A7}, //17305 #CJK UNIFIED IDEOGRAPH + {0xE3A1, 0x606A}, //17306 #CJK UNIFIED IDEOGRAPH + {0xE3A2, 0x607D}, //17307 #CJK UNIFIED IDEOGRAPH + {0xE3A3, 0x6096}, //17308 #CJK UNIFIED IDEOGRAPH + {0xE3A4, 0x609A}, //17309 #CJK UNIFIED IDEOGRAPH + {0xE3A5, 0x60AD}, //17310 #CJK UNIFIED IDEOGRAPH + {0xE3A6, 0x609D}, //17311 #CJK UNIFIED IDEOGRAPH + {0xE3A7, 0x6083}, //17312 #CJK UNIFIED IDEOGRAPH + {0xE3A8, 0x6092}, //17313 #CJK UNIFIED IDEOGRAPH + {0xE3A9, 0x608C}, //17314 #CJK UNIFIED IDEOGRAPH + {0xE3AA, 0x609B}, //17315 #CJK UNIFIED IDEOGRAPH + {0xE3AB, 0x60EC}, //17316 #CJK UNIFIED IDEOGRAPH + {0xE3AC, 0x60BB}, //17317 #CJK UNIFIED IDEOGRAPH + {0xE3AD, 0x60B1}, //17318 #CJK UNIFIED IDEOGRAPH + {0xE3AE, 0x60DD}, //17319 #CJK UNIFIED IDEOGRAPH + {0xE3AF, 0x60D8}, //17320 #CJK UNIFIED IDEOGRAPH + {0xE3B0, 0x60C6}, //17321 #CJK UNIFIED IDEOGRAPH + {0xE3B1, 0x60DA}, //17322 #CJK UNIFIED IDEOGRAPH + {0xE3B2, 0x60B4}, //17323 #CJK UNIFIED IDEOGRAPH + {0xE3B3, 0x6120}, //17324 #CJK UNIFIED IDEOGRAPH + {0xE3B4, 0x6126}, //17325 #CJK UNIFIED IDEOGRAPH + {0xE3B5, 0x6115}, //17326 #CJK UNIFIED IDEOGRAPH + {0xE3B6, 0x6123}, //17327 #CJK UNIFIED IDEOGRAPH + {0xE3B7, 0x60F4}, //17328 #CJK UNIFIED IDEOGRAPH + {0xE3B8, 0x6100}, //17329 #CJK UNIFIED IDEOGRAPH + {0xE3B9, 0x610E}, //17330 #CJK UNIFIED IDEOGRAPH + {0xE3BA, 0x612B}, //17331 #CJK UNIFIED IDEOGRAPH + {0xE3BB, 0x614A}, //17332 #CJK UNIFIED IDEOGRAPH + {0xE3BC, 0x6175}, //17333 #CJK UNIFIED IDEOGRAPH + {0xE3BD, 0x61AC}, //17334 #CJK UNIFIED IDEOGRAPH + {0xE3BE, 0x6194}, //17335 #CJK UNIFIED IDEOGRAPH + {0xE3BF, 0x61A7}, //17336 #CJK UNIFIED IDEOGRAPH + {0xE3C0, 0x61B7}, //17337 #CJK UNIFIED IDEOGRAPH + {0xE3C1, 0x61D4}, //17338 #CJK UNIFIED IDEOGRAPH + {0xE3C2, 0x61F5}, //17339 #CJK UNIFIED IDEOGRAPH + {0xE3C3, 0x5FDD}, //17340 #CJK UNIFIED IDEOGRAPH + {0xE3C4, 0x96B3}, //17341 #CJK UNIFIED IDEOGRAPH + {0xE3C5, 0x95E9}, //17342 #CJK UNIFIED IDEOGRAPH + {0xE3C6, 0x95EB}, //17343 #CJK UNIFIED IDEOGRAPH + {0xE3C7, 0x95F1}, //17344 #CJK UNIFIED IDEOGRAPH + {0xE3C8, 0x95F3}, //17345 #CJK UNIFIED IDEOGRAPH + {0xE3C9, 0x95F5}, //17346 #CJK UNIFIED IDEOGRAPH + {0xE3CA, 0x95F6}, //17347 #CJK UNIFIED IDEOGRAPH + {0xE3CB, 0x95FC}, //17348 #CJK UNIFIED IDEOGRAPH + {0xE3CC, 0x95FE}, //17349 #CJK UNIFIED IDEOGRAPH + {0xE3CD, 0x9603}, //17350 #CJK UNIFIED IDEOGRAPH + {0xE3CE, 0x9604}, //17351 #CJK UNIFIED IDEOGRAPH + {0xE3CF, 0x9606}, //17352 #CJK UNIFIED IDEOGRAPH + {0xE3D0, 0x9608}, //17353 #CJK UNIFIED IDEOGRAPH + {0xE3D1, 0x960A}, //17354 #CJK UNIFIED IDEOGRAPH + {0xE3D2, 0x960B}, //17355 #CJK UNIFIED IDEOGRAPH + {0xE3D3, 0x960C}, //17356 #CJK UNIFIED IDEOGRAPH + {0xE3D4, 0x960D}, //17357 #CJK UNIFIED IDEOGRAPH + {0xE3D5, 0x960F}, //17358 #CJK UNIFIED IDEOGRAPH + {0xE3D6, 0x9612}, //17359 #CJK UNIFIED IDEOGRAPH + {0xE3D7, 0x9615}, //17360 #CJK UNIFIED IDEOGRAPH + {0xE3D8, 0x9616}, //17361 #CJK UNIFIED IDEOGRAPH + {0xE3D9, 0x9617}, //17362 #CJK UNIFIED IDEOGRAPH + {0xE3DA, 0x9619}, //17363 #CJK UNIFIED IDEOGRAPH + {0xE3DB, 0x961A}, //17364 #CJK UNIFIED IDEOGRAPH + {0xE3DC, 0x4E2C}, //17365 #CJK UNIFIED IDEOGRAPH + {0xE3DD, 0x723F}, //17366 #CJK UNIFIED IDEOGRAPH + {0xE3DE, 0x6215}, //17367 #CJK UNIFIED IDEOGRAPH + {0xE3DF, 0x6C35}, //17368 #CJK UNIFIED IDEOGRAPH + {0xE3E0, 0x6C54}, //17369 #CJK UNIFIED IDEOGRAPH + {0xE3E1, 0x6C5C}, //17370 #CJK UNIFIED IDEOGRAPH + {0xE3E2, 0x6C4A}, //17371 #CJK UNIFIED IDEOGRAPH + {0xE3E3, 0x6CA3}, //17372 #CJK UNIFIED IDEOGRAPH + {0xE3E4, 0x6C85}, //17373 #CJK UNIFIED IDEOGRAPH + {0xE3E5, 0x6C90}, //17374 #CJK UNIFIED IDEOGRAPH + {0xE3E6, 0x6C94}, //17375 #CJK UNIFIED IDEOGRAPH + {0xE3E7, 0x6C8C}, //17376 #CJK UNIFIED IDEOGRAPH + {0xE3E8, 0x6C68}, //17377 #CJK UNIFIED IDEOGRAPH + {0xE3E9, 0x6C69}, //17378 #CJK UNIFIED IDEOGRAPH + {0xE3EA, 0x6C74}, //17379 #CJK UNIFIED IDEOGRAPH + {0xE3EB, 0x6C76}, //17380 #CJK UNIFIED IDEOGRAPH + {0xE3EC, 0x6C86}, //17381 #CJK UNIFIED IDEOGRAPH + {0xE3ED, 0x6CA9}, //17382 #CJK UNIFIED IDEOGRAPH + {0xE3EE, 0x6CD0}, //17383 #CJK UNIFIED IDEOGRAPH + {0xE3EF, 0x6CD4}, //17384 #CJK UNIFIED IDEOGRAPH + {0xE3F0, 0x6CAD}, //17385 #CJK UNIFIED IDEOGRAPH + {0xE3F1, 0x6CF7}, //17386 #CJK UNIFIED IDEOGRAPH + {0xE3F2, 0x6CF8}, //17387 #CJK UNIFIED IDEOGRAPH + {0xE3F3, 0x6CF1}, //17388 #CJK UNIFIED IDEOGRAPH + {0xE3F4, 0x6CD7}, //17389 #CJK UNIFIED IDEOGRAPH + {0xE3F5, 0x6CB2}, //17390 #CJK UNIFIED IDEOGRAPH + {0xE3F6, 0x6CE0}, //17391 #CJK UNIFIED IDEOGRAPH + {0xE3F7, 0x6CD6}, //17392 #CJK UNIFIED IDEOGRAPH + {0xE3F8, 0x6CFA}, //17393 #CJK UNIFIED IDEOGRAPH + {0xE3F9, 0x6CEB}, //17394 #CJK UNIFIED IDEOGRAPH + {0xE3FA, 0x6CEE}, //17395 #CJK UNIFIED IDEOGRAPH + {0xE3FB, 0x6CB1}, //17396 #CJK UNIFIED IDEOGRAPH + {0xE3FC, 0x6CD3}, //17397 #CJK UNIFIED IDEOGRAPH + {0xE3FD, 0x6CEF}, //17398 #CJK UNIFIED IDEOGRAPH + {0xE3FE, 0x6CFE}, //17399 #CJK UNIFIED IDEOGRAPH + {0xE440, 0x92A8}, //17400 #CJK UNIFIED IDEOGRAPH + {0xE441, 0x92A9}, //17401 #CJK UNIFIED IDEOGRAPH + {0xE442, 0x92AA}, //17402 #CJK UNIFIED IDEOGRAPH + {0xE443, 0x92AB}, //17403 #CJK UNIFIED IDEOGRAPH + {0xE444, 0x92AC}, //17404 #CJK UNIFIED IDEOGRAPH + {0xE445, 0x92AD}, //17405 #CJK UNIFIED IDEOGRAPH + {0xE446, 0x92AF}, //17406 #CJK UNIFIED IDEOGRAPH + {0xE447, 0x92B0}, //17407 #CJK UNIFIED IDEOGRAPH + {0xE448, 0x92B1}, //17408 #CJK UNIFIED IDEOGRAPH + {0xE449, 0x92B2}, //17409 #CJK UNIFIED IDEOGRAPH + {0xE44A, 0x92B3}, //17410 #CJK UNIFIED IDEOGRAPH + {0xE44B, 0x92B4}, //17411 #CJK UNIFIED IDEOGRAPH + {0xE44C, 0x92B5}, //17412 #CJK UNIFIED IDEOGRAPH + {0xE44D, 0x92B6}, //17413 #CJK UNIFIED IDEOGRAPH + {0xE44E, 0x92B7}, //17414 #CJK UNIFIED IDEOGRAPH + {0xE44F, 0x92B8}, //17415 #CJK UNIFIED IDEOGRAPH + {0xE450, 0x92B9}, //17416 #CJK UNIFIED IDEOGRAPH + {0xE451, 0x92BA}, //17417 #CJK UNIFIED IDEOGRAPH + {0xE452, 0x92BB}, //17418 #CJK UNIFIED IDEOGRAPH + {0xE453, 0x92BC}, //17419 #CJK UNIFIED IDEOGRAPH + {0xE454, 0x92BD}, //17420 #CJK UNIFIED IDEOGRAPH + {0xE455, 0x92BE}, //17421 #CJK UNIFIED IDEOGRAPH + {0xE456, 0x92BF}, //17422 #CJK UNIFIED IDEOGRAPH + {0xE457, 0x92C0}, //17423 #CJK UNIFIED IDEOGRAPH + {0xE458, 0x92C1}, //17424 #CJK UNIFIED IDEOGRAPH + {0xE459, 0x92C2}, //17425 #CJK UNIFIED IDEOGRAPH + {0xE45A, 0x92C3}, //17426 #CJK UNIFIED IDEOGRAPH + {0xE45B, 0x92C4}, //17427 #CJK UNIFIED IDEOGRAPH + {0xE45C, 0x92C5}, //17428 #CJK UNIFIED IDEOGRAPH + {0xE45D, 0x92C6}, //17429 #CJK UNIFIED IDEOGRAPH + {0xE45E, 0x92C7}, //17430 #CJK UNIFIED IDEOGRAPH + {0xE45F, 0x92C9}, //17431 #CJK UNIFIED IDEOGRAPH + {0xE460, 0x92CA}, //17432 #CJK UNIFIED IDEOGRAPH + {0xE461, 0x92CB}, //17433 #CJK UNIFIED IDEOGRAPH + {0xE462, 0x92CC}, //17434 #CJK UNIFIED IDEOGRAPH + {0xE463, 0x92CD}, //17435 #CJK UNIFIED IDEOGRAPH + {0xE464, 0x92CE}, //17436 #CJK UNIFIED IDEOGRAPH + {0xE465, 0x92CF}, //17437 #CJK UNIFIED IDEOGRAPH + {0xE466, 0x92D0}, //17438 #CJK UNIFIED IDEOGRAPH + {0xE467, 0x92D1}, //17439 #CJK UNIFIED IDEOGRAPH + {0xE468, 0x92D2}, //17440 #CJK UNIFIED IDEOGRAPH + {0xE469, 0x92D3}, //17441 #CJK UNIFIED IDEOGRAPH + {0xE46A, 0x92D4}, //17442 #CJK UNIFIED IDEOGRAPH + {0xE46B, 0x92D5}, //17443 #CJK UNIFIED IDEOGRAPH + {0xE46C, 0x92D6}, //17444 #CJK UNIFIED IDEOGRAPH + {0xE46D, 0x92D7}, //17445 #CJK UNIFIED IDEOGRAPH + {0xE46E, 0x92D8}, //17446 #CJK UNIFIED IDEOGRAPH + {0xE46F, 0x92D9}, //17447 #CJK UNIFIED IDEOGRAPH + {0xE470, 0x92DA}, //17448 #CJK UNIFIED IDEOGRAPH + {0xE471, 0x92DB}, //17449 #CJK UNIFIED IDEOGRAPH + {0xE472, 0x92DC}, //17450 #CJK UNIFIED IDEOGRAPH + {0xE473, 0x92DD}, //17451 #CJK UNIFIED IDEOGRAPH + {0xE474, 0x92DE}, //17452 #CJK UNIFIED IDEOGRAPH + {0xE475, 0x92DF}, //17453 #CJK UNIFIED IDEOGRAPH + {0xE476, 0x92E0}, //17454 #CJK UNIFIED IDEOGRAPH + {0xE477, 0x92E1}, //17455 #CJK UNIFIED IDEOGRAPH + {0xE478, 0x92E2}, //17456 #CJK UNIFIED IDEOGRAPH + {0xE479, 0x92E3}, //17457 #CJK UNIFIED IDEOGRAPH + {0xE47A, 0x92E4}, //17458 #CJK UNIFIED IDEOGRAPH + {0xE47B, 0x92E5}, //17459 #CJK UNIFIED IDEOGRAPH + {0xE47C, 0x92E6}, //17460 #CJK UNIFIED IDEOGRAPH + {0xE47D, 0x92E7}, //17461 #CJK UNIFIED IDEOGRAPH + {0xE47E, 0x92E8}, //17462 #CJK UNIFIED IDEOGRAPH + {0xE480, 0x92E9}, //17463 #CJK UNIFIED IDEOGRAPH + {0xE481, 0x92EA}, //17464 #CJK UNIFIED IDEOGRAPH + {0xE482, 0x92EB}, //17465 #CJK UNIFIED IDEOGRAPH + {0xE483, 0x92EC}, //17466 #CJK UNIFIED IDEOGRAPH + {0xE484, 0x92ED}, //17467 #CJK UNIFIED IDEOGRAPH + {0xE485, 0x92EE}, //17468 #CJK UNIFIED IDEOGRAPH + {0xE486, 0x92EF}, //17469 #CJK UNIFIED IDEOGRAPH + {0xE487, 0x92F0}, //17470 #CJK UNIFIED IDEOGRAPH + {0xE488, 0x92F1}, //17471 #CJK UNIFIED IDEOGRAPH + {0xE489, 0x92F2}, //17472 #CJK UNIFIED IDEOGRAPH + {0xE48A, 0x92F3}, //17473 #CJK UNIFIED IDEOGRAPH + {0xE48B, 0x92F4}, //17474 #CJK UNIFIED IDEOGRAPH + {0xE48C, 0x92F5}, //17475 #CJK UNIFIED IDEOGRAPH + {0xE48D, 0x92F6}, //17476 #CJK UNIFIED IDEOGRAPH + {0xE48E, 0x92F7}, //17477 #CJK UNIFIED IDEOGRAPH + {0xE48F, 0x92F8}, //17478 #CJK UNIFIED IDEOGRAPH + {0xE490, 0x92F9}, //17479 #CJK UNIFIED IDEOGRAPH + {0xE491, 0x92FA}, //17480 #CJK UNIFIED IDEOGRAPH + {0xE492, 0x92FB}, //17481 #CJK UNIFIED IDEOGRAPH + {0xE493, 0x92FC}, //17482 #CJK UNIFIED IDEOGRAPH + {0xE494, 0x92FD}, //17483 #CJK UNIFIED IDEOGRAPH + {0xE495, 0x92FE}, //17484 #CJK UNIFIED IDEOGRAPH + {0xE496, 0x92FF}, //17485 #CJK UNIFIED IDEOGRAPH + {0xE497, 0x9300}, //17486 #CJK UNIFIED IDEOGRAPH + {0xE498, 0x9301}, //17487 #CJK UNIFIED IDEOGRAPH + {0xE499, 0x9302}, //17488 #CJK UNIFIED IDEOGRAPH + {0xE49A, 0x9303}, //17489 #CJK UNIFIED IDEOGRAPH + {0xE49B, 0x9304}, //17490 #CJK UNIFIED IDEOGRAPH + {0xE49C, 0x9305}, //17491 #CJK UNIFIED IDEOGRAPH + {0xE49D, 0x9306}, //17492 #CJK UNIFIED IDEOGRAPH + {0xE49E, 0x9307}, //17493 #CJK UNIFIED IDEOGRAPH + {0xE49F, 0x9308}, //17494 #CJK UNIFIED IDEOGRAPH + {0xE4A0, 0x9309}, //17495 #CJK UNIFIED IDEOGRAPH + {0xE4A1, 0x6D39}, //17496 #CJK UNIFIED IDEOGRAPH + {0xE4A2, 0x6D27}, //17497 #CJK UNIFIED IDEOGRAPH + {0xE4A3, 0x6D0C}, //17498 #CJK UNIFIED IDEOGRAPH + {0xE4A4, 0x6D43}, //17499 #CJK UNIFIED IDEOGRAPH + {0xE4A5, 0x6D48}, //17500 #CJK UNIFIED IDEOGRAPH + {0xE4A6, 0x6D07}, //17501 #CJK UNIFIED IDEOGRAPH + {0xE4A7, 0x6D04}, //17502 #CJK UNIFIED IDEOGRAPH + {0xE4A8, 0x6D19}, //17503 #CJK UNIFIED IDEOGRAPH + {0xE4A9, 0x6D0E}, //17504 #CJK UNIFIED IDEOGRAPH + {0xE4AA, 0x6D2B}, //17505 #CJK UNIFIED IDEOGRAPH + {0xE4AB, 0x6D4D}, //17506 #CJK UNIFIED IDEOGRAPH + {0xE4AC, 0x6D2E}, //17507 #CJK UNIFIED IDEOGRAPH + {0xE4AD, 0x6D35}, //17508 #CJK UNIFIED IDEOGRAPH + {0xE4AE, 0x6D1A}, //17509 #CJK UNIFIED IDEOGRAPH + {0xE4AF, 0x6D4F}, //17510 #CJK UNIFIED IDEOGRAPH + {0xE4B0, 0x6D52}, //17511 #CJK UNIFIED IDEOGRAPH + {0xE4B1, 0x6D54}, //17512 #CJK UNIFIED IDEOGRAPH + {0xE4B2, 0x6D33}, //17513 #CJK UNIFIED IDEOGRAPH + {0xE4B3, 0x6D91}, //17514 #CJK UNIFIED IDEOGRAPH + {0xE4B4, 0x6D6F}, //17515 #CJK UNIFIED IDEOGRAPH + {0xE4B5, 0x6D9E}, //17516 #CJK UNIFIED IDEOGRAPH + {0xE4B6, 0x6DA0}, //17517 #CJK UNIFIED IDEOGRAPH + {0xE4B7, 0x6D5E}, //17518 #CJK UNIFIED IDEOGRAPH + {0xE4B8, 0x6D93}, //17519 #CJK UNIFIED IDEOGRAPH + {0xE4B9, 0x6D94}, //17520 #CJK UNIFIED IDEOGRAPH + {0xE4BA, 0x6D5C}, //17521 #CJK UNIFIED IDEOGRAPH + {0xE4BB, 0x6D60}, //17522 #CJK UNIFIED IDEOGRAPH + {0xE4BC, 0x6D7C}, //17523 #CJK UNIFIED IDEOGRAPH + {0xE4BD, 0x6D63}, //17524 #CJK UNIFIED IDEOGRAPH + {0xE4BE, 0x6E1A}, //17525 #CJK UNIFIED IDEOGRAPH + {0xE4BF, 0x6DC7}, //17526 #CJK UNIFIED IDEOGRAPH + {0xE4C0, 0x6DC5}, //17527 #CJK UNIFIED IDEOGRAPH + {0xE4C1, 0x6DDE}, //17528 #CJK UNIFIED IDEOGRAPH + {0xE4C2, 0x6E0E}, //17529 #CJK UNIFIED IDEOGRAPH + {0xE4C3, 0x6DBF}, //17530 #CJK UNIFIED IDEOGRAPH + {0xE4C4, 0x6DE0}, //17531 #CJK UNIFIED IDEOGRAPH + {0xE4C5, 0x6E11}, //17532 #CJK UNIFIED IDEOGRAPH + {0xE4C6, 0x6DE6}, //17533 #CJK UNIFIED IDEOGRAPH + {0xE4C7, 0x6DDD}, //17534 #CJK UNIFIED IDEOGRAPH + {0xE4C8, 0x6DD9}, //17535 #CJK UNIFIED IDEOGRAPH + {0xE4C9, 0x6E16}, //17536 #CJK UNIFIED IDEOGRAPH + {0xE4CA, 0x6DAB}, //17537 #CJK UNIFIED IDEOGRAPH + {0xE4CB, 0x6E0C}, //17538 #CJK UNIFIED IDEOGRAPH + {0xE4CC, 0x6DAE}, //17539 #CJK UNIFIED IDEOGRAPH + {0xE4CD, 0x6E2B}, //17540 #CJK UNIFIED IDEOGRAPH + {0xE4CE, 0x6E6E}, //17541 #CJK UNIFIED IDEOGRAPH + {0xE4CF, 0x6E4E}, //17542 #CJK UNIFIED IDEOGRAPH + {0xE4D0, 0x6E6B}, //17543 #CJK UNIFIED IDEOGRAPH + {0xE4D1, 0x6EB2}, //17544 #CJK UNIFIED IDEOGRAPH + {0xE4D2, 0x6E5F}, //17545 #CJK UNIFIED IDEOGRAPH + {0xE4D3, 0x6E86}, //17546 #CJK UNIFIED IDEOGRAPH + {0xE4D4, 0x6E53}, //17547 #CJK UNIFIED IDEOGRAPH + {0xE4D5, 0x6E54}, //17548 #CJK UNIFIED IDEOGRAPH + {0xE4D6, 0x6E32}, //17549 #CJK UNIFIED IDEOGRAPH + {0xE4D7, 0x6E25}, //17550 #CJK UNIFIED IDEOGRAPH + {0xE4D8, 0x6E44}, //17551 #CJK UNIFIED IDEOGRAPH + {0xE4D9, 0x6EDF}, //17552 #CJK UNIFIED IDEOGRAPH + {0xE4DA, 0x6EB1}, //17553 #CJK UNIFIED IDEOGRAPH + {0xE4DB, 0x6E98}, //17554 #CJK UNIFIED IDEOGRAPH + {0xE4DC, 0x6EE0}, //17555 #CJK UNIFIED IDEOGRAPH + {0xE4DD, 0x6F2D}, //17556 #CJK UNIFIED IDEOGRAPH + {0xE4DE, 0x6EE2}, //17557 #CJK UNIFIED IDEOGRAPH + {0xE4DF, 0x6EA5}, //17558 #CJK UNIFIED IDEOGRAPH + {0xE4E0, 0x6EA7}, //17559 #CJK UNIFIED IDEOGRAPH + {0xE4E1, 0x6EBD}, //17560 #CJK UNIFIED IDEOGRAPH + {0xE4E2, 0x6EBB}, //17561 #CJK UNIFIED IDEOGRAPH + {0xE4E3, 0x6EB7}, //17562 #CJK UNIFIED IDEOGRAPH + {0xE4E4, 0x6ED7}, //17563 #CJK UNIFIED IDEOGRAPH + {0xE4E5, 0x6EB4}, //17564 #CJK UNIFIED IDEOGRAPH + {0xE4E6, 0x6ECF}, //17565 #CJK UNIFIED IDEOGRAPH + {0xE4E7, 0x6E8F}, //17566 #CJK UNIFIED IDEOGRAPH + {0xE4E8, 0x6EC2}, //17567 #CJK UNIFIED IDEOGRAPH + {0xE4E9, 0x6E9F}, //17568 #CJK UNIFIED IDEOGRAPH + {0xE4EA, 0x6F62}, //17569 #CJK UNIFIED IDEOGRAPH + {0xE4EB, 0x6F46}, //17570 #CJK UNIFIED IDEOGRAPH + {0xE4EC, 0x6F47}, //17571 #CJK UNIFIED IDEOGRAPH + {0xE4ED, 0x6F24}, //17572 #CJK UNIFIED IDEOGRAPH + {0xE4EE, 0x6F15}, //17573 #CJK UNIFIED IDEOGRAPH + {0xE4EF, 0x6EF9}, //17574 #CJK UNIFIED IDEOGRAPH + {0xE4F0, 0x6F2F}, //17575 #CJK UNIFIED IDEOGRAPH + {0xE4F1, 0x6F36}, //17576 #CJK UNIFIED IDEOGRAPH + {0xE4F2, 0x6F4B}, //17577 #CJK UNIFIED IDEOGRAPH + {0xE4F3, 0x6F74}, //17578 #CJK UNIFIED IDEOGRAPH + {0xE4F4, 0x6F2A}, //17579 #CJK UNIFIED IDEOGRAPH + {0xE4F5, 0x6F09}, //17580 #CJK UNIFIED IDEOGRAPH + {0xE4F6, 0x6F29}, //17581 #CJK UNIFIED IDEOGRAPH + {0xE4F7, 0x6F89}, //17582 #CJK UNIFIED IDEOGRAPH + {0xE4F8, 0x6F8D}, //17583 #CJK UNIFIED IDEOGRAPH + {0xE4F9, 0x6F8C}, //17584 #CJK UNIFIED IDEOGRAPH + {0xE4FA, 0x6F78}, //17585 #CJK UNIFIED IDEOGRAPH + {0xE4FB, 0x6F72}, //17586 #CJK UNIFIED IDEOGRAPH + {0xE4FC, 0x6F7C}, //17587 #CJK UNIFIED IDEOGRAPH + {0xE4FD, 0x6F7A}, //17588 #CJK UNIFIED IDEOGRAPH + {0xE4FE, 0x6FD1}, //17589 #CJK UNIFIED IDEOGRAPH + {0xE540, 0x930A}, //17590 #CJK UNIFIED IDEOGRAPH + {0xE541, 0x930B}, //17591 #CJK UNIFIED IDEOGRAPH + {0xE542, 0x930C}, //17592 #CJK UNIFIED IDEOGRAPH + {0xE543, 0x930D}, //17593 #CJK UNIFIED IDEOGRAPH + {0xE544, 0x930E}, //17594 #CJK UNIFIED IDEOGRAPH + {0xE545, 0x930F}, //17595 #CJK UNIFIED IDEOGRAPH + {0xE546, 0x9310}, //17596 #CJK UNIFIED IDEOGRAPH + {0xE547, 0x9311}, //17597 #CJK UNIFIED IDEOGRAPH + {0xE548, 0x9312}, //17598 #CJK UNIFIED IDEOGRAPH + {0xE549, 0x9313}, //17599 #CJK UNIFIED IDEOGRAPH + {0xE54A, 0x9314}, //17600 #CJK UNIFIED IDEOGRAPH + {0xE54B, 0x9315}, //17601 #CJK UNIFIED IDEOGRAPH + {0xE54C, 0x9316}, //17602 #CJK UNIFIED IDEOGRAPH + {0xE54D, 0x9317}, //17603 #CJK UNIFIED IDEOGRAPH + {0xE54E, 0x9318}, //17604 #CJK UNIFIED IDEOGRAPH + {0xE54F, 0x9319}, //17605 #CJK UNIFIED IDEOGRAPH + {0xE550, 0x931A}, //17606 #CJK UNIFIED IDEOGRAPH + {0xE551, 0x931B}, //17607 #CJK UNIFIED IDEOGRAPH + {0xE552, 0x931C}, //17608 #CJK UNIFIED IDEOGRAPH + {0xE553, 0x931D}, //17609 #CJK UNIFIED IDEOGRAPH + {0xE554, 0x931E}, //17610 #CJK UNIFIED IDEOGRAPH + {0xE555, 0x931F}, //17611 #CJK UNIFIED IDEOGRAPH + {0xE556, 0x9320}, //17612 #CJK UNIFIED IDEOGRAPH + {0xE557, 0x9321}, //17613 #CJK UNIFIED IDEOGRAPH + {0xE558, 0x9322}, //17614 #CJK UNIFIED IDEOGRAPH + {0xE559, 0x9323}, //17615 #CJK UNIFIED IDEOGRAPH + {0xE55A, 0x9324}, //17616 #CJK UNIFIED IDEOGRAPH + {0xE55B, 0x9325}, //17617 #CJK UNIFIED IDEOGRAPH + {0xE55C, 0x9326}, //17618 #CJK UNIFIED IDEOGRAPH + {0xE55D, 0x9327}, //17619 #CJK UNIFIED IDEOGRAPH + {0xE55E, 0x9328}, //17620 #CJK UNIFIED IDEOGRAPH + {0xE55F, 0x9329}, //17621 #CJK UNIFIED IDEOGRAPH + {0xE560, 0x932A}, //17622 #CJK UNIFIED IDEOGRAPH + {0xE561, 0x932B}, //17623 #CJK UNIFIED IDEOGRAPH + {0xE562, 0x932C}, //17624 #CJK UNIFIED IDEOGRAPH + {0xE563, 0x932D}, //17625 #CJK UNIFIED IDEOGRAPH + {0xE564, 0x932E}, //17626 #CJK UNIFIED IDEOGRAPH + {0xE565, 0x932F}, //17627 #CJK UNIFIED IDEOGRAPH + {0xE566, 0x9330}, //17628 #CJK UNIFIED IDEOGRAPH + {0xE567, 0x9331}, //17629 #CJK UNIFIED IDEOGRAPH + {0xE568, 0x9332}, //17630 #CJK UNIFIED IDEOGRAPH + {0xE569, 0x9333}, //17631 #CJK UNIFIED IDEOGRAPH + {0xE56A, 0x9334}, //17632 #CJK UNIFIED IDEOGRAPH + {0xE56B, 0x9335}, //17633 #CJK UNIFIED IDEOGRAPH + {0xE56C, 0x9336}, //17634 #CJK UNIFIED IDEOGRAPH + {0xE56D, 0x9337}, //17635 #CJK UNIFIED IDEOGRAPH + {0xE56E, 0x9338}, //17636 #CJK UNIFIED IDEOGRAPH + {0xE56F, 0x9339}, //17637 #CJK UNIFIED IDEOGRAPH + {0xE570, 0x933A}, //17638 #CJK UNIFIED IDEOGRAPH + {0xE571, 0x933B}, //17639 #CJK UNIFIED IDEOGRAPH + {0xE572, 0x933C}, //17640 #CJK UNIFIED IDEOGRAPH + {0xE573, 0x933D}, //17641 #CJK UNIFIED IDEOGRAPH + {0xE574, 0x933F}, //17642 #CJK UNIFIED IDEOGRAPH + {0xE575, 0x9340}, //17643 #CJK UNIFIED IDEOGRAPH + {0xE576, 0x9341}, //17644 #CJK UNIFIED IDEOGRAPH + {0xE577, 0x9342}, //17645 #CJK UNIFIED IDEOGRAPH + {0xE578, 0x9343}, //17646 #CJK UNIFIED IDEOGRAPH + {0xE579, 0x9344}, //17647 #CJK UNIFIED IDEOGRAPH + {0xE57A, 0x9345}, //17648 #CJK UNIFIED IDEOGRAPH + {0xE57B, 0x9346}, //17649 #CJK UNIFIED IDEOGRAPH + {0xE57C, 0x9347}, //17650 #CJK UNIFIED IDEOGRAPH + {0xE57D, 0x9348}, //17651 #CJK UNIFIED IDEOGRAPH + {0xE57E, 0x9349}, //17652 #CJK UNIFIED IDEOGRAPH + {0xE580, 0x934A}, //17653 #CJK UNIFIED IDEOGRAPH + {0xE581, 0x934B}, //17654 #CJK UNIFIED IDEOGRAPH + {0xE582, 0x934C}, //17655 #CJK UNIFIED IDEOGRAPH + {0xE583, 0x934D}, //17656 #CJK UNIFIED IDEOGRAPH + {0xE584, 0x934E}, //17657 #CJK UNIFIED IDEOGRAPH + {0xE585, 0x934F}, //17658 #CJK UNIFIED IDEOGRAPH + {0xE586, 0x9350}, //17659 #CJK UNIFIED IDEOGRAPH + {0xE587, 0x9351}, //17660 #CJK UNIFIED IDEOGRAPH + {0xE588, 0x9352}, //17661 #CJK UNIFIED IDEOGRAPH + {0xE589, 0x9353}, //17662 #CJK UNIFIED IDEOGRAPH + {0xE58A, 0x9354}, //17663 #CJK UNIFIED IDEOGRAPH + {0xE58B, 0x9355}, //17664 #CJK UNIFIED IDEOGRAPH + {0xE58C, 0x9356}, //17665 #CJK UNIFIED IDEOGRAPH + {0xE58D, 0x9357}, //17666 #CJK UNIFIED IDEOGRAPH + {0xE58E, 0x9358}, //17667 #CJK UNIFIED IDEOGRAPH + {0xE58F, 0x9359}, //17668 #CJK UNIFIED IDEOGRAPH + {0xE590, 0x935A}, //17669 #CJK UNIFIED IDEOGRAPH + {0xE591, 0x935B}, //17670 #CJK UNIFIED IDEOGRAPH + {0xE592, 0x935C}, //17671 #CJK UNIFIED IDEOGRAPH + {0xE593, 0x935D}, //17672 #CJK UNIFIED IDEOGRAPH + {0xE594, 0x935E}, //17673 #CJK UNIFIED IDEOGRAPH + {0xE595, 0x935F}, //17674 #CJK UNIFIED IDEOGRAPH + {0xE596, 0x9360}, //17675 #CJK UNIFIED IDEOGRAPH + {0xE597, 0x9361}, //17676 #CJK UNIFIED IDEOGRAPH + {0xE598, 0x9362}, //17677 #CJK UNIFIED IDEOGRAPH + {0xE599, 0x9363}, //17678 #CJK UNIFIED IDEOGRAPH + {0xE59A, 0x9364}, //17679 #CJK UNIFIED IDEOGRAPH + {0xE59B, 0x9365}, //17680 #CJK UNIFIED IDEOGRAPH + {0xE59C, 0x9366}, //17681 #CJK UNIFIED IDEOGRAPH + {0xE59D, 0x9367}, //17682 #CJK UNIFIED IDEOGRAPH + {0xE59E, 0x9368}, //17683 #CJK UNIFIED IDEOGRAPH + {0xE59F, 0x9369}, //17684 #CJK UNIFIED IDEOGRAPH + {0xE5A0, 0x936B}, //17685 #CJK UNIFIED IDEOGRAPH + {0xE5A1, 0x6FC9}, //17686 #CJK UNIFIED IDEOGRAPH + {0xE5A2, 0x6FA7}, //17687 #CJK UNIFIED IDEOGRAPH + {0xE5A3, 0x6FB9}, //17688 #CJK UNIFIED IDEOGRAPH + {0xE5A4, 0x6FB6}, //17689 #CJK UNIFIED IDEOGRAPH + {0xE5A5, 0x6FC2}, //17690 #CJK UNIFIED IDEOGRAPH + {0xE5A6, 0x6FE1}, //17691 #CJK UNIFIED IDEOGRAPH + {0xE5A7, 0x6FEE}, //17692 #CJK UNIFIED IDEOGRAPH + {0xE5A8, 0x6FDE}, //17693 #CJK UNIFIED IDEOGRAPH + {0xE5A9, 0x6FE0}, //17694 #CJK UNIFIED IDEOGRAPH + {0xE5AA, 0x6FEF}, //17695 #CJK UNIFIED IDEOGRAPH + {0xE5AB, 0x701A}, //17696 #CJK UNIFIED IDEOGRAPH + {0xE5AC, 0x7023}, //17697 #CJK UNIFIED IDEOGRAPH + {0xE5AD, 0x701B}, //17698 #CJK UNIFIED IDEOGRAPH + {0xE5AE, 0x7039}, //17699 #CJK UNIFIED IDEOGRAPH + {0xE5AF, 0x7035}, //17700 #CJK UNIFIED IDEOGRAPH + {0xE5B0, 0x704F}, //17701 #CJK UNIFIED IDEOGRAPH + {0xE5B1, 0x705E}, //17702 #CJK UNIFIED IDEOGRAPH + {0xE5B2, 0x5B80}, //17703 #CJK UNIFIED IDEOGRAPH + {0xE5B3, 0x5B84}, //17704 #CJK UNIFIED IDEOGRAPH + {0xE5B4, 0x5B95}, //17705 #CJK UNIFIED IDEOGRAPH + {0xE5B5, 0x5B93}, //17706 #CJK UNIFIED IDEOGRAPH + {0xE5B6, 0x5BA5}, //17707 #CJK UNIFIED IDEOGRAPH + {0xE5B7, 0x5BB8}, //17708 #CJK UNIFIED IDEOGRAPH + {0xE5B8, 0x752F}, //17709 #CJK UNIFIED IDEOGRAPH + {0xE5B9, 0x9A9E}, //17710 #CJK UNIFIED IDEOGRAPH + {0xE5BA, 0x6434}, //17711 #CJK UNIFIED IDEOGRAPH + {0xE5BB, 0x5BE4}, //17712 #CJK UNIFIED IDEOGRAPH + {0xE5BC, 0x5BEE}, //17713 #CJK UNIFIED IDEOGRAPH + {0xE5BD, 0x8930}, //17714 #CJK UNIFIED IDEOGRAPH + {0xE5BE, 0x5BF0}, //17715 #CJK UNIFIED IDEOGRAPH + {0xE5BF, 0x8E47}, //17716 #CJK UNIFIED IDEOGRAPH + {0xE5C0, 0x8B07}, //17717 #CJK UNIFIED IDEOGRAPH + {0xE5C1, 0x8FB6}, //17718 #CJK UNIFIED IDEOGRAPH + {0xE5C2, 0x8FD3}, //17719 #CJK UNIFIED IDEOGRAPH + {0xE5C3, 0x8FD5}, //17720 #CJK UNIFIED IDEOGRAPH + {0xE5C4, 0x8FE5}, //17721 #CJK UNIFIED IDEOGRAPH + {0xE5C5, 0x8FEE}, //17722 #CJK UNIFIED IDEOGRAPH + {0xE5C6, 0x8FE4}, //17723 #CJK UNIFIED IDEOGRAPH + {0xE5C7, 0x8FE9}, //17724 #CJK UNIFIED IDEOGRAPH + {0xE5C8, 0x8FE6}, //17725 #CJK UNIFIED IDEOGRAPH + {0xE5C9, 0x8FF3}, //17726 #CJK UNIFIED IDEOGRAPH + {0xE5CA, 0x8FE8}, //17727 #CJK UNIFIED IDEOGRAPH + {0xE5CB, 0x9005}, //17728 #CJK UNIFIED IDEOGRAPH + {0xE5CC, 0x9004}, //17729 #CJK UNIFIED IDEOGRAPH + {0xE5CD, 0x900B}, //17730 #CJK UNIFIED IDEOGRAPH + {0xE5CE, 0x9026}, //17731 #CJK UNIFIED IDEOGRAPH + {0xE5CF, 0x9011}, //17732 #CJK UNIFIED IDEOGRAPH + {0xE5D0, 0x900D}, //17733 #CJK UNIFIED IDEOGRAPH + {0xE5D1, 0x9016}, //17734 #CJK UNIFIED IDEOGRAPH + {0xE5D2, 0x9021}, //17735 #CJK UNIFIED IDEOGRAPH + {0xE5D3, 0x9035}, //17736 #CJK UNIFIED IDEOGRAPH + {0xE5D4, 0x9036}, //17737 #CJK UNIFIED IDEOGRAPH + {0xE5D5, 0x902D}, //17738 #CJK UNIFIED IDEOGRAPH + {0xE5D6, 0x902F}, //17739 #CJK UNIFIED IDEOGRAPH + {0xE5D7, 0x9044}, //17740 #CJK UNIFIED IDEOGRAPH + {0xE5D8, 0x9051}, //17741 #CJK UNIFIED IDEOGRAPH + {0xE5D9, 0x9052}, //17742 #CJK UNIFIED IDEOGRAPH + {0xE5DA, 0x9050}, //17743 #CJK UNIFIED IDEOGRAPH + {0xE5DB, 0x9068}, //17744 #CJK UNIFIED IDEOGRAPH + {0xE5DC, 0x9058}, //17745 #CJK UNIFIED IDEOGRAPH + {0xE5DD, 0x9062}, //17746 #CJK UNIFIED IDEOGRAPH + {0xE5DE, 0x905B}, //17747 #CJK UNIFIED IDEOGRAPH + {0xE5DF, 0x66B9}, //17748 #CJK UNIFIED IDEOGRAPH + {0xE5E0, 0x9074}, //17749 #CJK UNIFIED IDEOGRAPH + {0xE5E1, 0x907D}, //17750 #CJK UNIFIED IDEOGRAPH + {0xE5E2, 0x9082}, //17751 #CJK UNIFIED IDEOGRAPH + {0xE5E3, 0x9088}, //17752 #CJK UNIFIED IDEOGRAPH + {0xE5E4, 0x9083}, //17753 #CJK UNIFIED IDEOGRAPH + {0xE5E5, 0x908B}, //17754 #CJK UNIFIED IDEOGRAPH + {0xE5E6, 0x5F50}, //17755 #CJK UNIFIED IDEOGRAPH + {0xE5E7, 0x5F57}, //17756 #CJK UNIFIED IDEOGRAPH + {0xE5E8, 0x5F56}, //17757 #CJK UNIFIED IDEOGRAPH + {0xE5E9, 0x5F58}, //17758 #CJK UNIFIED IDEOGRAPH + {0xE5EA, 0x5C3B}, //17759 #CJK UNIFIED IDEOGRAPH + {0xE5EB, 0x54AB}, //17760 #CJK UNIFIED IDEOGRAPH + {0xE5EC, 0x5C50}, //17761 #CJK UNIFIED IDEOGRAPH + {0xE5ED, 0x5C59}, //17762 #CJK UNIFIED IDEOGRAPH + {0xE5EE, 0x5B71}, //17763 #CJK UNIFIED IDEOGRAPH + {0xE5EF, 0x5C63}, //17764 #CJK UNIFIED IDEOGRAPH + {0xE5F0, 0x5C66}, //17765 #CJK UNIFIED IDEOGRAPH + {0xE5F1, 0x7FBC}, //17766 #CJK UNIFIED IDEOGRAPH + {0xE5F2, 0x5F2A}, //17767 #CJK UNIFIED IDEOGRAPH + {0xE5F3, 0x5F29}, //17768 #CJK UNIFIED IDEOGRAPH + {0xE5F4, 0x5F2D}, //17769 #CJK UNIFIED IDEOGRAPH + {0xE5F5, 0x8274}, //17770 #CJK UNIFIED IDEOGRAPH + {0xE5F6, 0x5F3C}, //17771 #CJK UNIFIED IDEOGRAPH + {0xE5F7, 0x9B3B}, //17772 #CJK UNIFIED IDEOGRAPH + {0xE5F8, 0x5C6E}, //17773 #CJK UNIFIED IDEOGRAPH + {0xE5F9, 0x5981}, //17774 #CJK UNIFIED IDEOGRAPH + {0xE5FA, 0x5983}, //17775 #CJK UNIFIED IDEOGRAPH + {0xE5FB, 0x598D}, //17776 #CJK UNIFIED IDEOGRAPH + {0xE5FC, 0x59A9}, //17777 #CJK UNIFIED IDEOGRAPH + {0xE5FD, 0x59AA}, //17778 #CJK UNIFIED IDEOGRAPH + {0xE5FE, 0x59A3}, //17779 #CJK UNIFIED IDEOGRAPH + {0xE640, 0x936C}, //17780 #CJK UNIFIED IDEOGRAPH + {0xE641, 0x936D}, //17781 #CJK UNIFIED IDEOGRAPH + {0xE642, 0x936E}, //17782 #CJK UNIFIED IDEOGRAPH + {0xE643, 0x936F}, //17783 #CJK UNIFIED IDEOGRAPH + {0xE644, 0x9370}, //17784 #CJK UNIFIED IDEOGRAPH + {0xE645, 0x9371}, //17785 #CJK UNIFIED IDEOGRAPH + {0xE646, 0x9372}, //17786 #CJK UNIFIED IDEOGRAPH + {0xE647, 0x9373}, //17787 #CJK UNIFIED IDEOGRAPH + {0xE648, 0x9374}, //17788 #CJK UNIFIED IDEOGRAPH + {0xE649, 0x9375}, //17789 #CJK UNIFIED IDEOGRAPH + {0xE64A, 0x9376}, //17790 #CJK UNIFIED IDEOGRAPH + {0xE64B, 0x9377}, //17791 #CJK UNIFIED IDEOGRAPH + {0xE64C, 0x9378}, //17792 #CJK UNIFIED IDEOGRAPH + {0xE64D, 0x9379}, //17793 #CJK UNIFIED IDEOGRAPH + {0xE64E, 0x937A}, //17794 #CJK UNIFIED IDEOGRAPH + {0xE64F, 0x937B}, //17795 #CJK UNIFIED IDEOGRAPH + {0xE650, 0x937C}, //17796 #CJK UNIFIED IDEOGRAPH + {0xE651, 0x937D}, //17797 #CJK UNIFIED IDEOGRAPH + {0xE652, 0x937E}, //17798 #CJK UNIFIED IDEOGRAPH + {0xE653, 0x937F}, //17799 #CJK UNIFIED IDEOGRAPH + {0xE654, 0x9380}, //17800 #CJK UNIFIED IDEOGRAPH + {0xE655, 0x9381}, //17801 #CJK UNIFIED IDEOGRAPH + {0xE656, 0x9382}, //17802 #CJK UNIFIED IDEOGRAPH + {0xE657, 0x9383}, //17803 #CJK UNIFIED IDEOGRAPH + {0xE658, 0x9384}, //17804 #CJK UNIFIED IDEOGRAPH + {0xE659, 0x9385}, //17805 #CJK UNIFIED IDEOGRAPH + {0xE65A, 0x9386}, //17806 #CJK UNIFIED IDEOGRAPH + {0xE65B, 0x9387}, //17807 #CJK UNIFIED IDEOGRAPH + {0xE65C, 0x9388}, //17808 #CJK UNIFIED IDEOGRAPH + {0xE65D, 0x9389}, //17809 #CJK UNIFIED IDEOGRAPH + {0xE65E, 0x938A}, //17810 #CJK UNIFIED IDEOGRAPH + {0xE65F, 0x938B}, //17811 #CJK UNIFIED IDEOGRAPH + {0xE660, 0x938C}, //17812 #CJK UNIFIED IDEOGRAPH + {0xE661, 0x938D}, //17813 #CJK UNIFIED IDEOGRAPH + {0xE662, 0x938E}, //17814 #CJK UNIFIED IDEOGRAPH + {0xE663, 0x9390}, //17815 #CJK UNIFIED IDEOGRAPH + {0xE664, 0x9391}, //17816 #CJK UNIFIED IDEOGRAPH + {0xE665, 0x9392}, //17817 #CJK UNIFIED IDEOGRAPH + {0xE666, 0x9393}, //17818 #CJK UNIFIED IDEOGRAPH + {0xE667, 0x9394}, //17819 #CJK UNIFIED IDEOGRAPH + {0xE668, 0x9395}, //17820 #CJK UNIFIED IDEOGRAPH + {0xE669, 0x9396}, //17821 #CJK UNIFIED IDEOGRAPH + {0xE66A, 0x9397}, //17822 #CJK UNIFIED IDEOGRAPH + {0xE66B, 0x9398}, //17823 #CJK UNIFIED IDEOGRAPH + {0xE66C, 0x9399}, //17824 #CJK UNIFIED IDEOGRAPH + {0xE66D, 0x939A}, //17825 #CJK UNIFIED IDEOGRAPH + {0xE66E, 0x939B}, //17826 #CJK UNIFIED IDEOGRAPH + {0xE66F, 0x939C}, //17827 #CJK UNIFIED IDEOGRAPH + {0xE670, 0x939D}, //17828 #CJK UNIFIED IDEOGRAPH + {0xE671, 0x939E}, //17829 #CJK UNIFIED IDEOGRAPH + {0xE672, 0x939F}, //17830 #CJK UNIFIED IDEOGRAPH + {0xE673, 0x93A0}, //17831 #CJK UNIFIED IDEOGRAPH + {0xE674, 0x93A1}, //17832 #CJK UNIFIED IDEOGRAPH + {0xE675, 0x93A2}, //17833 #CJK UNIFIED IDEOGRAPH + {0xE676, 0x93A3}, //17834 #CJK UNIFIED IDEOGRAPH + {0xE677, 0x93A4}, //17835 #CJK UNIFIED IDEOGRAPH + {0xE678, 0x93A5}, //17836 #CJK UNIFIED IDEOGRAPH + {0xE679, 0x93A6}, //17837 #CJK UNIFIED IDEOGRAPH + {0xE67A, 0x93A7}, //17838 #CJK UNIFIED IDEOGRAPH + {0xE67B, 0x93A8}, //17839 #CJK UNIFIED IDEOGRAPH + {0xE67C, 0x93A9}, //17840 #CJK UNIFIED IDEOGRAPH + {0xE67D, 0x93AA}, //17841 #CJK UNIFIED IDEOGRAPH + {0xE67E, 0x93AB}, //17842 #CJK UNIFIED IDEOGRAPH + {0xE680, 0x93AC}, //17843 #CJK UNIFIED IDEOGRAPH + {0xE681, 0x93AD}, //17844 #CJK UNIFIED IDEOGRAPH + {0xE682, 0x93AE}, //17845 #CJK UNIFIED IDEOGRAPH + {0xE683, 0x93AF}, //17846 #CJK UNIFIED IDEOGRAPH + {0xE684, 0x93B0}, //17847 #CJK UNIFIED IDEOGRAPH + {0xE685, 0x93B1}, //17848 #CJK UNIFIED IDEOGRAPH + {0xE686, 0x93B2}, //17849 #CJK UNIFIED IDEOGRAPH + {0xE687, 0x93B3}, //17850 #CJK UNIFIED IDEOGRAPH + {0xE688, 0x93B4}, //17851 #CJK UNIFIED IDEOGRAPH + {0xE689, 0x93B5}, //17852 #CJK UNIFIED IDEOGRAPH + {0xE68A, 0x93B6}, //17853 #CJK UNIFIED IDEOGRAPH + {0xE68B, 0x93B7}, //17854 #CJK UNIFIED IDEOGRAPH + {0xE68C, 0x93B8}, //17855 #CJK UNIFIED IDEOGRAPH + {0xE68D, 0x93B9}, //17856 #CJK UNIFIED IDEOGRAPH + {0xE68E, 0x93BA}, //17857 #CJK UNIFIED IDEOGRAPH + {0xE68F, 0x93BB}, //17858 #CJK UNIFIED IDEOGRAPH + {0xE690, 0x93BC}, //17859 #CJK UNIFIED IDEOGRAPH + {0xE691, 0x93BD}, //17860 #CJK UNIFIED IDEOGRAPH + {0xE692, 0x93BE}, //17861 #CJK UNIFIED IDEOGRAPH + {0xE693, 0x93BF}, //17862 #CJK UNIFIED IDEOGRAPH + {0xE694, 0x93C0}, //17863 #CJK UNIFIED IDEOGRAPH + {0xE695, 0x93C1}, //17864 #CJK UNIFIED IDEOGRAPH + {0xE696, 0x93C2}, //17865 #CJK UNIFIED IDEOGRAPH + {0xE697, 0x93C3}, //17866 #CJK UNIFIED IDEOGRAPH + {0xE698, 0x93C4}, //17867 #CJK UNIFIED IDEOGRAPH + {0xE699, 0x93C5}, //17868 #CJK UNIFIED IDEOGRAPH + {0xE69A, 0x93C6}, //17869 #CJK UNIFIED IDEOGRAPH + {0xE69B, 0x93C7}, //17870 #CJK UNIFIED IDEOGRAPH + {0xE69C, 0x93C8}, //17871 #CJK UNIFIED IDEOGRAPH + {0xE69D, 0x93C9}, //17872 #CJK UNIFIED IDEOGRAPH + {0xE69E, 0x93CB}, //17873 #CJK UNIFIED IDEOGRAPH + {0xE69F, 0x93CC}, //17874 #CJK UNIFIED IDEOGRAPH + {0xE6A0, 0x93CD}, //17875 #CJK UNIFIED IDEOGRAPH + {0xE6A1, 0x5997}, //17876 #CJK UNIFIED IDEOGRAPH + {0xE6A2, 0x59CA}, //17877 #CJK UNIFIED IDEOGRAPH + {0xE6A3, 0x59AB}, //17878 #CJK UNIFIED IDEOGRAPH + {0xE6A4, 0x599E}, //17879 #CJK UNIFIED IDEOGRAPH + {0xE6A5, 0x59A4}, //17880 #CJK UNIFIED IDEOGRAPH + {0xE6A6, 0x59D2}, //17881 #CJK UNIFIED IDEOGRAPH + {0xE6A7, 0x59B2}, //17882 #CJK UNIFIED IDEOGRAPH + {0xE6A8, 0x59AF}, //17883 #CJK UNIFIED IDEOGRAPH + {0xE6A9, 0x59D7}, //17884 #CJK UNIFIED IDEOGRAPH + {0xE6AA, 0x59BE}, //17885 #CJK UNIFIED IDEOGRAPH + {0xE6AB, 0x5A05}, //17886 #CJK UNIFIED IDEOGRAPH + {0xE6AC, 0x5A06}, //17887 #CJK UNIFIED IDEOGRAPH + {0xE6AD, 0x59DD}, //17888 #CJK UNIFIED IDEOGRAPH + {0xE6AE, 0x5A08}, //17889 #CJK UNIFIED IDEOGRAPH + {0xE6AF, 0x59E3}, //17890 #CJK UNIFIED IDEOGRAPH + {0xE6B0, 0x59D8}, //17891 #CJK UNIFIED IDEOGRAPH + {0xE6B1, 0x59F9}, //17892 #CJK UNIFIED IDEOGRAPH + {0xE6B2, 0x5A0C}, //17893 #CJK UNIFIED IDEOGRAPH + {0xE6B3, 0x5A09}, //17894 #CJK UNIFIED IDEOGRAPH + {0xE6B4, 0x5A32}, //17895 #CJK UNIFIED IDEOGRAPH + {0xE6B5, 0x5A34}, //17896 #CJK UNIFIED IDEOGRAPH + {0xE6B6, 0x5A11}, //17897 #CJK UNIFIED IDEOGRAPH + {0xE6B7, 0x5A23}, //17898 #CJK UNIFIED IDEOGRAPH + {0xE6B8, 0x5A13}, //17899 #CJK UNIFIED IDEOGRAPH + {0xE6B9, 0x5A40}, //17900 #CJK UNIFIED IDEOGRAPH + {0xE6BA, 0x5A67}, //17901 #CJK UNIFIED IDEOGRAPH + {0xE6BB, 0x5A4A}, //17902 #CJK UNIFIED IDEOGRAPH + {0xE6BC, 0x5A55}, //17903 #CJK UNIFIED IDEOGRAPH + {0xE6BD, 0x5A3C}, //17904 #CJK UNIFIED IDEOGRAPH + {0xE6BE, 0x5A62}, //17905 #CJK UNIFIED IDEOGRAPH + {0xE6BF, 0x5A75}, //17906 #CJK UNIFIED IDEOGRAPH + {0xE6C0, 0x80EC}, //17907 #CJK UNIFIED IDEOGRAPH + {0xE6C1, 0x5AAA}, //17908 #CJK UNIFIED IDEOGRAPH + {0xE6C2, 0x5A9B}, //17909 #CJK UNIFIED IDEOGRAPH + {0xE6C3, 0x5A77}, //17910 #CJK UNIFIED IDEOGRAPH + {0xE6C4, 0x5A7A}, //17911 #CJK UNIFIED IDEOGRAPH + {0xE6C5, 0x5ABE}, //17912 #CJK UNIFIED IDEOGRAPH + {0xE6C6, 0x5AEB}, //17913 #CJK UNIFIED IDEOGRAPH + {0xE6C7, 0x5AB2}, //17914 #CJK UNIFIED IDEOGRAPH + {0xE6C8, 0x5AD2}, //17915 #CJK UNIFIED IDEOGRAPH + {0xE6C9, 0x5AD4}, //17916 #CJK UNIFIED IDEOGRAPH + {0xE6CA, 0x5AB8}, //17917 #CJK UNIFIED IDEOGRAPH + {0xE6CB, 0x5AE0}, //17918 #CJK UNIFIED IDEOGRAPH + {0xE6CC, 0x5AE3}, //17919 #CJK UNIFIED IDEOGRAPH + {0xE6CD, 0x5AF1}, //17920 #CJK UNIFIED IDEOGRAPH + {0xE6CE, 0x5AD6}, //17921 #CJK UNIFIED IDEOGRAPH + {0xE6CF, 0x5AE6}, //17922 #CJK UNIFIED IDEOGRAPH + {0xE6D0, 0x5AD8}, //17923 #CJK UNIFIED IDEOGRAPH + {0xE6D1, 0x5ADC}, //17924 #CJK UNIFIED IDEOGRAPH + {0xE6D2, 0x5B09}, //17925 #CJK UNIFIED IDEOGRAPH + {0xE6D3, 0x5B17}, //17926 #CJK UNIFIED IDEOGRAPH + {0xE6D4, 0x5B16}, //17927 #CJK UNIFIED IDEOGRAPH + {0xE6D5, 0x5B32}, //17928 #CJK UNIFIED IDEOGRAPH + {0xE6D6, 0x5B37}, //17929 #CJK UNIFIED IDEOGRAPH + {0xE6D7, 0x5B40}, //17930 #CJK UNIFIED IDEOGRAPH + {0xE6D8, 0x5C15}, //17931 #CJK UNIFIED IDEOGRAPH + {0xE6D9, 0x5C1C}, //17932 #CJK UNIFIED IDEOGRAPH + {0xE6DA, 0x5B5A}, //17933 #CJK UNIFIED IDEOGRAPH + {0xE6DB, 0x5B65}, //17934 #CJK UNIFIED IDEOGRAPH + {0xE6DC, 0x5B73}, //17935 #CJK UNIFIED IDEOGRAPH + {0xE6DD, 0x5B51}, //17936 #CJK UNIFIED IDEOGRAPH + {0xE6DE, 0x5B53}, //17937 #CJK UNIFIED IDEOGRAPH + {0xE6DF, 0x5B62}, //17938 #CJK UNIFIED IDEOGRAPH + {0xE6E0, 0x9A75}, //17939 #CJK UNIFIED IDEOGRAPH + {0xE6E1, 0x9A77}, //17940 #CJK UNIFIED IDEOGRAPH + {0xE6E2, 0x9A78}, //17941 #CJK UNIFIED IDEOGRAPH + {0xE6E3, 0x9A7A}, //17942 #CJK UNIFIED IDEOGRAPH + {0xE6E4, 0x9A7F}, //17943 #CJK UNIFIED IDEOGRAPH + {0xE6E5, 0x9A7D}, //17944 #CJK UNIFIED IDEOGRAPH + {0xE6E6, 0x9A80}, //17945 #CJK UNIFIED IDEOGRAPH + {0xE6E7, 0x9A81}, //17946 #CJK UNIFIED IDEOGRAPH + {0xE6E8, 0x9A85}, //17947 #CJK UNIFIED IDEOGRAPH + {0xE6E9, 0x9A88}, //17948 #CJK UNIFIED IDEOGRAPH + {0xE6EA, 0x9A8A}, //17949 #CJK UNIFIED IDEOGRAPH + {0xE6EB, 0x9A90}, //17950 #CJK UNIFIED IDEOGRAPH + {0xE6EC, 0x9A92}, //17951 #CJK UNIFIED IDEOGRAPH + {0xE6ED, 0x9A93}, //17952 #CJK UNIFIED IDEOGRAPH + {0xE6EE, 0x9A96}, //17953 #CJK UNIFIED IDEOGRAPH + {0xE6EF, 0x9A98}, //17954 #CJK UNIFIED IDEOGRAPH + {0xE6F0, 0x9A9B}, //17955 #CJK UNIFIED IDEOGRAPH + {0xE6F1, 0x9A9C}, //17956 #CJK UNIFIED IDEOGRAPH + {0xE6F2, 0x9A9D}, //17957 #CJK UNIFIED IDEOGRAPH + {0xE6F3, 0x9A9F}, //17958 #CJK UNIFIED IDEOGRAPH + {0xE6F4, 0x9AA0}, //17959 #CJK UNIFIED IDEOGRAPH + {0xE6F5, 0x9AA2}, //17960 #CJK UNIFIED IDEOGRAPH + {0xE6F6, 0x9AA3}, //17961 #CJK UNIFIED IDEOGRAPH + {0xE6F7, 0x9AA5}, //17962 #CJK UNIFIED IDEOGRAPH + {0xE6F8, 0x9AA7}, //17963 #CJK UNIFIED IDEOGRAPH + {0xE6F9, 0x7E9F}, //17964 #CJK UNIFIED IDEOGRAPH + {0xE6FA, 0x7EA1}, //17965 #CJK UNIFIED IDEOGRAPH + {0xE6FB, 0x7EA3}, //17966 #CJK UNIFIED IDEOGRAPH + {0xE6FC, 0x7EA5}, //17967 #CJK UNIFIED IDEOGRAPH + {0xE6FD, 0x7EA8}, //17968 #CJK UNIFIED IDEOGRAPH + {0xE6FE, 0x7EA9}, //17969 #CJK UNIFIED IDEOGRAPH + {0xE740, 0x93CE}, //17970 #CJK UNIFIED IDEOGRAPH + {0xE741, 0x93CF}, //17971 #CJK UNIFIED IDEOGRAPH + {0xE742, 0x93D0}, //17972 #CJK UNIFIED IDEOGRAPH + {0xE743, 0x93D1}, //17973 #CJK UNIFIED IDEOGRAPH + {0xE744, 0x93D2}, //17974 #CJK UNIFIED IDEOGRAPH + {0xE745, 0x93D3}, //17975 #CJK UNIFIED IDEOGRAPH + {0xE746, 0x93D4}, //17976 #CJK UNIFIED IDEOGRAPH + {0xE747, 0x93D5}, //17977 #CJK UNIFIED IDEOGRAPH + {0xE748, 0x93D7}, //17978 #CJK UNIFIED IDEOGRAPH + {0xE749, 0x93D8}, //17979 #CJK UNIFIED IDEOGRAPH + {0xE74A, 0x93D9}, //17980 #CJK UNIFIED IDEOGRAPH + {0xE74B, 0x93DA}, //17981 #CJK UNIFIED IDEOGRAPH + {0xE74C, 0x93DB}, //17982 #CJK UNIFIED IDEOGRAPH + {0xE74D, 0x93DC}, //17983 #CJK UNIFIED IDEOGRAPH + {0xE74E, 0x93DD}, //17984 #CJK UNIFIED IDEOGRAPH + {0xE74F, 0x93DE}, //17985 #CJK UNIFIED IDEOGRAPH + {0xE750, 0x93DF}, //17986 #CJK UNIFIED IDEOGRAPH + {0xE751, 0x93E0}, //17987 #CJK UNIFIED IDEOGRAPH + {0xE752, 0x93E1}, //17988 #CJK UNIFIED IDEOGRAPH + {0xE753, 0x93E2}, //17989 #CJK UNIFIED IDEOGRAPH + {0xE754, 0x93E3}, //17990 #CJK UNIFIED IDEOGRAPH + {0xE755, 0x93E4}, //17991 #CJK UNIFIED IDEOGRAPH + {0xE756, 0x93E5}, //17992 #CJK UNIFIED IDEOGRAPH + {0xE757, 0x93E6}, //17993 #CJK UNIFIED IDEOGRAPH + {0xE758, 0x93E7}, //17994 #CJK UNIFIED IDEOGRAPH + {0xE759, 0x93E8}, //17995 #CJK UNIFIED IDEOGRAPH + {0xE75A, 0x93E9}, //17996 #CJK UNIFIED IDEOGRAPH + {0xE75B, 0x93EA}, //17997 #CJK UNIFIED IDEOGRAPH + {0xE75C, 0x93EB}, //17998 #CJK UNIFIED IDEOGRAPH + {0xE75D, 0x93EC}, //17999 #CJK UNIFIED IDEOGRAPH + {0xE75E, 0x93ED}, //18000 #CJK UNIFIED IDEOGRAPH + {0xE75F, 0x93EE}, //18001 #CJK UNIFIED IDEOGRAPH + {0xE760, 0x93EF}, //18002 #CJK UNIFIED IDEOGRAPH + {0xE761, 0x93F0}, //18003 #CJK UNIFIED IDEOGRAPH + {0xE762, 0x93F1}, //18004 #CJK UNIFIED IDEOGRAPH + {0xE763, 0x93F2}, //18005 #CJK UNIFIED IDEOGRAPH + {0xE764, 0x93F3}, //18006 #CJK UNIFIED IDEOGRAPH + {0xE765, 0x93F4}, //18007 #CJK UNIFIED IDEOGRAPH + {0xE766, 0x93F5}, //18008 #CJK UNIFIED IDEOGRAPH + {0xE767, 0x93F6}, //18009 #CJK UNIFIED IDEOGRAPH + {0xE768, 0x93F7}, //18010 #CJK UNIFIED IDEOGRAPH + {0xE769, 0x93F8}, //18011 #CJK UNIFIED IDEOGRAPH + {0xE76A, 0x93F9}, //18012 #CJK UNIFIED IDEOGRAPH + {0xE76B, 0x93FA}, //18013 #CJK UNIFIED IDEOGRAPH + {0xE76C, 0x93FB}, //18014 #CJK UNIFIED IDEOGRAPH + {0xE76D, 0x93FC}, //18015 #CJK UNIFIED IDEOGRAPH + {0xE76E, 0x93FD}, //18016 #CJK UNIFIED IDEOGRAPH + {0xE76F, 0x93FE}, //18017 #CJK UNIFIED IDEOGRAPH + {0xE770, 0x93FF}, //18018 #CJK UNIFIED IDEOGRAPH + {0xE771, 0x9400}, //18019 #CJK UNIFIED IDEOGRAPH + {0xE772, 0x9401}, //18020 #CJK UNIFIED IDEOGRAPH + {0xE773, 0x9402}, //18021 #CJK UNIFIED IDEOGRAPH + {0xE774, 0x9403}, //18022 #CJK UNIFIED IDEOGRAPH + {0xE775, 0x9404}, //18023 #CJK UNIFIED IDEOGRAPH + {0xE776, 0x9405}, //18024 #CJK UNIFIED IDEOGRAPH + {0xE777, 0x9406}, //18025 #CJK UNIFIED IDEOGRAPH + {0xE778, 0x9407}, //18026 #CJK UNIFIED IDEOGRAPH + {0xE779, 0x9408}, //18027 #CJK UNIFIED IDEOGRAPH + {0xE77A, 0x9409}, //18028 #CJK UNIFIED IDEOGRAPH + {0xE77B, 0x940A}, //18029 #CJK UNIFIED IDEOGRAPH + {0xE77C, 0x940B}, //18030 #CJK UNIFIED IDEOGRAPH + {0xE77D, 0x940C}, //18031 #CJK UNIFIED IDEOGRAPH + {0xE77E, 0x940D}, //18032 #CJK UNIFIED IDEOGRAPH + {0xE780, 0x940E}, //18033 #CJK UNIFIED IDEOGRAPH + {0xE781, 0x940F}, //18034 #CJK UNIFIED IDEOGRAPH + {0xE782, 0x9410}, //18035 #CJK UNIFIED IDEOGRAPH + {0xE783, 0x9411}, //18036 #CJK UNIFIED IDEOGRAPH + {0xE784, 0x9412}, //18037 #CJK UNIFIED IDEOGRAPH + {0xE785, 0x9413}, //18038 #CJK UNIFIED IDEOGRAPH + {0xE786, 0x9414}, //18039 #CJK UNIFIED IDEOGRAPH + {0xE787, 0x9415}, //18040 #CJK UNIFIED IDEOGRAPH + {0xE788, 0x9416}, //18041 #CJK UNIFIED IDEOGRAPH + {0xE789, 0x9417}, //18042 #CJK UNIFIED IDEOGRAPH + {0xE78A, 0x9418}, //18043 #CJK UNIFIED IDEOGRAPH + {0xE78B, 0x9419}, //18044 #CJK UNIFIED IDEOGRAPH + {0xE78C, 0x941A}, //18045 #CJK UNIFIED IDEOGRAPH + {0xE78D, 0x941B}, //18046 #CJK UNIFIED IDEOGRAPH + {0xE78E, 0x941C}, //18047 #CJK UNIFIED IDEOGRAPH + {0xE78F, 0x941D}, //18048 #CJK UNIFIED IDEOGRAPH + {0xE790, 0x941E}, //18049 #CJK UNIFIED IDEOGRAPH + {0xE791, 0x941F}, //18050 #CJK UNIFIED IDEOGRAPH + {0xE792, 0x9420}, //18051 #CJK UNIFIED IDEOGRAPH + {0xE793, 0x9421}, //18052 #CJK UNIFIED IDEOGRAPH + {0xE794, 0x9422}, //18053 #CJK UNIFIED IDEOGRAPH + {0xE795, 0x9423}, //18054 #CJK UNIFIED IDEOGRAPH + {0xE796, 0x9424}, //18055 #CJK UNIFIED IDEOGRAPH + {0xE797, 0x9425}, //18056 #CJK UNIFIED IDEOGRAPH + {0xE798, 0x9426}, //18057 #CJK UNIFIED IDEOGRAPH + {0xE799, 0x9427}, //18058 #CJK UNIFIED IDEOGRAPH + {0xE79A, 0x9428}, //18059 #CJK UNIFIED IDEOGRAPH + {0xE79B, 0x9429}, //18060 #CJK UNIFIED IDEOGRAPH + {0xE79C, 0x942A}, //18061 #CJK UNIFIED IDEOGRAPH + {0xE79D, 0x942B}, //18062 #CJK UNIFIED IDEOGRAPH + {0xE79E, 0x942C}, //18063 #CJK UNIFIED IDEOGRAPH + {0xE79F, 0x942D}, //18064 #CJK UNIFIED IDEOGRAPH + {0xE7A0, 0x942E}, //18065 #CJK UNIFIED IDEOGRAPH + {0xE7A1, 0x7EAD}, //18066 #CJK UNIFIED IDEOGRAPH + {0xE7A2, 0x7EB0}, //18067 #CJK UNIFIED IDEOGRAPH + {0xE7A3, 0x7EBE}, //18068 #CJK UNIFIED IDEOGRAPH + {0xE7A4, 0x7EC0}, //18069 #CJK UNIFIED IDEOGRAPH + {0xE7A5, 0x7EC1}, //18070 #CJK UNIFIED IDEOGRAPH + {0xE7A6, 0x7EC2}, //18071 #CJK UNIFIED IDEOGRAPH + {0xE7A7, 0x7EC9}, //18072 #CJK UNIFIED IDEOGRAPH + {0xE7A8, 0x7ECB}, //18073 #CJK UNIFIED IDEOGRAPH + {0xE7A9, 0x7ECC}, //18074 #CJK UNIFIED IDEOGRAPH + {0xE7AA, 0x7ED0}, //18075 #CJK UNIFIED IDEOGRAPH + {0xE7AB, 0x7ED4}, //18076 #CJK UNIFIED IDEOGRAPH + {0xE7AC, 0x7ED7}, //18077 #CJK UNIFIED IDEOGRAPH + {0xE7AD, 0x7EDB}, //18078 #CJK UNIFIED IDEOGRAPH + {0xE7AE, 0x7EE0}, //18079 #CJK UNIFIED IDEOGRAPH + {0xE7AF, 0x7EE1}, //18080 #CJK UNIFIED IDEOGRAPH + {0xE7B0, 0x7EE8}, //18081 #CJK UNIFIED IDEOGRAPH + {0xE7B1, 0x7EEB}, //18082 #CJK UNIFIED IDEOGRAPH + {0xE7B2, 0x7EEE}, //18083 #CJK UNIFIED IDEOGRAPH + {0xE7B3, 0x7EEF}, //18084 #CJK UNIFIED IDEOGRAPH + {0xE7B4, 0x7EF1}, //18085 #CJK UNIFIED IDEOGRAPH + {0xE7B5, 0x7EF2}, //18086 #CJK UNIFIED IDEOGRAPH + {0xE7B6, 0x7F0D}, //18087 #CJK UNIFIED IDEOGRAPH + {0xE7B7, 0x7EF6}, //18088 #CJK UNIFIED IDEOGRAPH + {0xE7B8, 0x7EFA}, //18089 #CJK UNIFIED IDEOGRAPH + {0xE7B9, 0x7EFB}, //18090 #CJK UNIFIED IDEOGRAPH + {0xE7BA, 0x7EFE}, //18091 #CJK UNIFIED IDEOGRAPH + {0xE7BB, 0x7F01}, //18092 #CJK UNIFIED IDEOGRAPH + {0xE7BC, 0x7F02}, //18093 #CJK UNIFIED IDEOGRAPH + {0xE7BD, 0x7F03}, //18094 #CJK UNIFIED IDEOGRAPH + {0xE7BE, 0x7F07}, //18095 #CJK UNIFIED IDEOGRAPH + {0xE7BF, 0x7F08}, //18096 #CJK UNIFIED IDEOGRAPH + {0xE7C0, 0x7F0B}, //18097 #CJK UNIFIED IDEOGRAPH + {0xE7C1, 0x7F0C}, //18098 #CJK UNIFIED IDEOGRAPH + {0xE7C2, 0x7F0F}, //18099 #CJK UNIFIED IDEOGRAPH + {0xE7C3, 0x7F11}, //18100 #CJK UNIFIED IDEOGRAPH + {0xE7C4, 0x7F12}, //18101 #CJK UNIFIED IDEOGRAPH + {0xE7C5, 0x7F17}, //18102 #CJK UNIFIED IDEOGRAPH + {0xE7C6, 0x7F19}, //18103 #CJK UNIFIED IDEOGRAPH + {0xE7C7, 0x7F1C}, //18104 #CJK UNIFIED IDEOGRAPH + {0xE7C8, 0x7F1B}, //18105 #CJK UNIFIED IDEOGRAPH + {0xE7C9, 0x7F1F}, //18106 #CJK UNIFIED IDEOGRAPH + {0xE7CA, 0x7F21}, //18107 #CJK UNIFIED IDEOGRAPH + {0xE7CB, 0x7F22}, //18108 #CJK UNIFIED IDEOGRAPH + {0xE7CC, 0x7F23}, //18109 #CJK UNIFIED IDEOGRAPH + {0xE7CD, 0x7F24}, //18110 #CJK UNIFIED IDEOGRAPH + {0xE7CE, 0x7F25}, //18111 #CJK UNIFIED IDEOGRAPH + {0xE7CF, 0x7F26}, //18112 #CJK UNIFIED IDEOGRAPH + {0xE7D0, 0x7F27}, //18113 #CJK UNIFIED IDEOGRAPH + {0xE7D1, 0x7F2A}, //18114 #CJK UNIFIED IDEOGRAPH + {0xE7D2, 0x7F2B}, //18115 #CJK UNIFIED IDEOGRAPH + {0xE7D3, 0x7F2C}, //18116 #CJK UNIFIED IDEOGRAPH + {0xE7D4, 0x7F2D}, //18117 #CJK UNIFIED IDEOGRAPH + {0xE7D5, 0x7F2F}, //18118 #CJK UNIFIED IDEOGRAPH + {0xE7D6, 0x7F30}, //18119 #CJK UNIFIED IDEOGRAPH + {0xE7D7, 0x7F31}, //18120 #CJK UNIFIED IDEOGRAPH + {0xE7D8, 0x7F32}, //18121 #CJK UNIFIED IDEOGRAPH + {0xE7D9, 0x7F33}, //18122 #CJK UNIFIED IDEOGRAPH + {0xE7DA, 0x7F35}, //18123 #CJK UNIFIED IDEOGRAPH + {0xE7DB, 0x5E7A}, //18124 #CJK UNIFIED IDEOGRAPH + {0xE7DC, 0x757F}, //18125 #CJK UNIFIED IDEOGRAPH + {0xE7DD, 0x5DDB}, //18126 #CJK UNIFIED IDEOGRAPH + {0xE7DE, 0x753E}, //18127 #CJK UNIFIED IDEOGRAPH + {0xE7DF, 0x9095}, //18128 #CJK UNIFIED IDEOGRAPH + {0xE7E0, 0x738E}, //18129 #CJK UNIFIED IDEOGRAPH + {0xE7E1, 0x7391}, //18130 #CJK UNIFIED IDEOGRAPH + {0xE7E2, 0x73AE}, //18131 #CJK UNIFIED IDEOGRAPH + {0xE7E3, 0x73A2}, //18132 #CJK UNIFIED IDEOGRAPH + {0xE7E4, 0x739F}, //18133 #CJK UNIFIED IDEOGRAPH + {0xE7E5, 0x73CF}, //18134 #CJK UNIFIED IDEOGRAPH + {0xE7E6, 0x73C2}, //18135 #CJK UNIFIED IDEOGRAPH + {0xE7E7, 0x73D1}, //18136 #CJK UNIFIED IDEOGRAPH + {0xE7E8, 0x73B7}, //18137 #CJK UNIFIED IDEOGRAPH + {0xE7E9, 0x73B3}, //18138 #CJK UNIFIED IDEOGRAPH + {0xE7EA, 0x73C0}, //18139 #CJK UNIFIED IDEOGRAPH + {0xE7EB, 0x73C9}, //18140 #CJK UNIFIED IDEOGRAPH + {0xE7EC, 0x73C8}, //18141 #CJK UNIFIED IDEOGRAPH + {0xE7ED, 0x73E5}, //18142 #CJK UNIFIED IDEOGRAPH + {0xE7EE, 0x73D9}, //18143 #CJK UNIFIED IDEOGRAPH + {0xE7EF, 0x987C}, //18144 #CJK UNIFIED IDEOGRAPH + {0xE7F0, 0x740A}, //18145 #CJK UNIFIED IDEOGRAPH + {0xE7F1, 0x73E9}, //18146 #CJK UNIFIED IDEOGRAPH + {0xE7F2, 0x73E7}, //18147 #CJK UNIFIED IDEOGRAPH + {0xE7F3, 0x73DE}, //18148 #CJK UNIFIED IDEOGRAPH + {0xE7F4, 0x73BA}, //18149 #CJK UNIFIED IDEOGRAPH + {0xE7F5, 0x73F2}, //18150 #CJK UNIFIED IDEOGRAPH + {0xE7F6, 0x740F}, //18151 #CJK UNIFIED IDEOGRAPH + {0xE7F7, 0x742A}, //18152 #CJK UNIFIED IDEOGRAPH + {0xE7F8, 0x745B}, //18153 #CJK UNIFIED IDEOGRAPH + {0xE7F9, 0x7426}, //18154 #CJK UNIFIED IDEOGRAPH + {0xE7FA, 0x7425}, //18155 #CJK UNIFIED IDEOGRAPH + {0xE7FB, 0x7428}, //18156 #CJK UNIFIED IDEOGRAPH + {0xE7FC, 0x7430}, //18157 #CJK UNIFIED IDEOGRAPH + {0xE7FD, 0x742E}, //18158 #CJK UNIFIED IDEOGRAPH + {0xE7FE, 0x742C}, //18159 #CJK UNIFIED IDEOGRAPH + {0xE840, 0x942F}, //18160 #CJK UNIFIED IDEOGRAPH + {0xE841, 0x9430}, //18161 #CJK UNIFIED IDEOGRAPH + {0xE842, 0x9431}, //18162 #CJK UNIFIED IDEOGRAPH + {0xE843, 0x9432}, //18163 #CJK UNIFIED IDEOGRAPH + {0xE844, 0x9433}, //18164 #CJK UNIFIED IDEOGRAPH + {0xE845, 0x9434}, //18165 #CJK UNIFIED IDEOGRAPH + {0xE846, 0x9435}, //18166 #CJK UNIFIED IDEOGRAPH + {0xE847, 0x9436}, //18167 #CJK UNIFIED IDEOGRAPH + {0xE848, 0x9437}, //18168 #CJK UNIFIED IDEOGRAPH + {0xE849, 0x9438}, //18169 #CJK UNIFIED IDEOGRAPH + {0xE84A, 0x9439}, //18170 #CJK UNIFIED IDEOGRAPH + {0xE84B, 0x943A}, //18171 #CJK UNIFIED IDEOGRAPH + {0xE84C, 0x943B}, //18172 #CJK UNIFIED IDEOGRAPH + {0xE84D, 0x943C}, //18173 #CJK UNIFIED IDEOGRAPH + {0xE84E, 0x943D}, //18174 #CJK UNIFIED IDEOGRAPH + {0xE84F, 0x943F}, //18175 #CJK UNIFIED IDEOGRAPH + {0xE850, 0x9440}, //18176 #CJK UNIFIED IDEOGRAPH + {0xE851, 0x9441}, //18177 #CJK UNIFIED IDEOGRAPH + {0xE852, 0x9442}, //18178 #CJK UNIFIED IDEOGRAPH + {0xE853, 0x9443}, //18179 #CJK UNIFIED IDEOGRAPH + {0xE854, 0x9444}, //18180 #CJK UNIFIED IDEOGRAPH + {0xE855, 0x9445}, //18181 #CJK UNIFIED IDEOGRAPH + {0xE856, 0x9446}, //18182 #CJK UNIFIED IDEOGRAPH + {0xE857, 0x9447}, //18183 #CJK UNIFIED IDEOGRAPH + {0xE858, 0x9448}, //18184 #CJK UNIFIED IDEOGRAPH + {0xE859, 0x9449}, //18185 #CJK UNIFIED IDEOGRAPH + {0xE85A, 0x944A}, //18186 #CJK UNIFIED IDEOGRAPH + {0xE85B, 0x944B}, //18187 #CJK UNIFIED IDEOGRAPH + {0xE85C, 0x944C}, //18188 #CJK UNIFIED IDEOGRAPH + {0xE85D, 0x944D}, //18189 #CJK UNIFIED IDEOGRAPH + {0xE85E, 0x944E}, //18190 #CJK UNIFIED IDEOGRAPH + {0xE85F, 0x944F}, //18191 #CJK UNIFIED IDEOGRAPH + {0xE860, 0x9450}, //18192 #CJK UNIFIED IDEOGRAPH + {0xE861, 0x9451}, //18193 #CJK UNIFIED IDEOGRAPH + {0xE862, 0x9452}, //18194 #CJK UNIFIED IDEOGRAPH + {0xE863, 0x9453}, //18195 #CJK UNIFIED IDEOGRAPH + {0xE864, 0x9454}, //18196 #CJK UNIFIED IDEOGRAPH + {0xE865, 0x9455}, //18197 #CJK UNIFIED IDEOGRAPH + {0xE866, 0x9456}, //18198 #CJK UNIFIED IDEOGRAPH + {0xE867, 0x9457}, //18199 #CJK UNIFIED IDEOGRAPH + {0xE868, 0x9458}, //18200 #CJK UNIFIED IDEOGRAPH + {0xE869, 0x9459}, //18201 #CJK UNIFIED IDEOGRAPH + {0xE86A, 0x945A}, //18202 #CJK UNIFIED IDEOGRAPH + {0xE86B, 0x945B}, //18203 #CJK UNIFIED IDEOGRAPH + {0xE86C, 0x945C}, //18204 #CJK UNIFIED IDEOGRAPH + {0xE86D, 0x945D}, //18205 #CJK UNIFIED IDEOGRAPH + {0xE86E, 0x945E}, //18206 #CJK UNIFIED IDEOGRAPH + {0xE86F, 0x945F}, //18207 #CJK UNIFIED IDEOGRAPH + {0xE870, 0x9460}, //18208 #CJK UNIFIED IDEOGRAPH + {0xE871, 0x9461}, //18209 #CJK UNIFIED IDEOGRAPH + {0xE872, 0x9462}, //18210 #CJK UNIFIED IDEOGRAPH + {0xE873, 0x9463}, //18211 #CJK UNIFIED IDEOGRAPH + {0xE874, 0x9464}, //18212 #CJK UNIFIED IDEOGRAPH + {0xE875, 0x9465}, //18213 #CJK UNIFIED IDEOGRAPH + {0xE876, 0x9466}, //18214 #CJK UNIFIED IDEOGRAPH + {0xE877, 0x9467}, //18215 #CJK UNIFIED IDEOGRAPH + {0xE878, 0x9468}, //18216 #CJK UNIFIED IDEOGRAPH + {0xE879, 0x9469}, //18217 #CJK UNIFIED IDEOGRAPH + {0xE87A, 0x946A}, //18218 #CJK UNIFIED IDEOGRAPH + {0xE87B, 0x946C}, //18219 #CJK UNIFIED IDEOGRAPH + {0xE87C, 0x946D}, //18220 #CJK UNIFIED IDEOGRAPH + {0xE87D, 0x946E}, //18221 #CJK UNIFIED IDEOGRAPH + {0xE87E, 0x946F}, //18222 #CJK UNIFIED IDEOGRAPH + {0xE880, 0x9470}, //18223 #CJK UNIFIED IDEOGRAPH + {0xE881, 0x9471}, //18224 #CJK UNIFIED IDEOGRAPH + {0xE882, 0x9472}, //18225 #CJK UNIFIED IDEOGRAPH + {0xE883, 0x9473}, //18226 #CJK UNIFIED IDEOGRAPH + {0xE884, 0x9474}, //18227 #CJK UNIFIED IDEOGRAPH + {0xE885, 0x9475}, //18228 #CJK UNIFIED IDEOGRAPH + {0xE886, 0x9476}, //18229 #CJK UNIFIED IDEOGRAPH + {0xE887, 0x9477}, //18230 #CJK UNIFIED IDEOGRAPH + {0xE888, 0x9478}, //18231 #CJK UNIFIED IDEOGRAPH + {0xE889, 0x9479}, //18232 #CJK UNIFIED IDEOGRAPH + {0xE88A, 0x947A}, //18233 #CJK UNIFIED IDEOGRAPH + {0xE88B, 0x947B}, //18234 #CJK UNIFIED IDEOGRAPH + {0xE88C, 0x947C}, //18235 #CJK UNIFIED IDEOGRAPH + {0xE88D, 0x947D}, //18236 #CJK UNIFIED IDEOGRAPH + {0xE88E, 0x947E}, //18237 #CJK UNIFIED IDEOGRAPH + {0xE88F, 0x947F}, //18238 #CJK UNIFIED IDEOGRAPH + {0xE890, 0x9480}, //18239 #CJK UNIFIED IDEOGRAPH + {0xE891, 0x9481}, //18240 #CJK UNIFIED IDEOGRAPH + {0xE892, 0x9482}, //18241 #CJK UNIFIED IDEOGRAPH + {0xE893, 0x9483}, //18242 #CJK UNIFIED IDEOGRAPH + {0xE894, 0x9484}, //18243 #CJK UNIFIED IDEOGRAPH + {0xE895, 0x9491}, //18244 #CJK UNIFIED IDEOGRAPH + {0xE896, 0x9496}, //18245 #CJK UNIFIED IDEOGRAPH + {0xE897, 0x9498}, //18246 #CJK UNIFIED IDEOGRAPH + {0xE898, 0x94C7}, //18247 #CJK UNIFIED IDEOGRAPH + {0xE899, 0x94CF}, //18248 #CJK UNIFIED IDEOGRAPH + {0xE89A, 0x94D3}, //18249 #CJK UNIFIED IDEOGRAPH + {0xE89B, 0x94D4}, //18250 #CJK UNIFIED IDEOGRAPH + {0xE89C, 0x94DA}, //18251 #CJK UNIFIED IDEOGRAPH + {0xE89D, 0x94E6}, //18252 #CJK UNIFIED IDEOGRAPH + {0xE89E, 0x94FB}, //18253 #CJK UNIFIED IDEOGRAPH + {0xE89F, 0x951C}, //18254 #CJK UNIFIED IDEOGRAPH + {0xE8A0, 0x9520}, //18255 #CJK UNIFIED IDEOGRAPH + {0xE8A1, 0x741B}, //18256 #CJK UNIFIED IDEOGRAPH + {0xE8A2, 0x741A}, //18257 #CJK UNIFIED IDEOGRAPH + {0xE8A3, 0x7441}, //18258 #CJK UNIFIED IDEOGRAPH + {0xE8A4, 0x745C}, //18259 #CJK UNIFIED IDEOGRAPH + {0xE8A5, 0x7457}, //18260 #CJK UNIFIED IDEOGRAPH + {0xE8A6, 0x7455}, //18261 #CJK UNIFIED IDEOGRAPH + {0xE8A7, 0x7459}, //18262 #CJK UNIFIED IDEOGRAPH + {0xE8A8, 0x7477}, //18263 #CJK UNIFIED IDEOGRAPH + {0xE8A9, 0x746D}, //18264 #CJK UNIFIED IDEOGRAPH + {0xE8AA, 0x747E}, //18265 #CJK UNIFIED IDEOGRAPH + {0xE8AB, 0x749C}, //18266 #CJK UNIFIED IDEOGRAPH + {0xE8AC, 0x748E}, //18267 #CJK UNIFIED IDEOGRAPH + {0xE8AD, 0x7480}, //18268 #CJK UNIFIED IDEOGRAPH + {0xE8AE, 0x7481}, //18269 #CJK UNIFIED IDEOGRAPH + {0xE8AF, 0x7487}, //18270 #CJK UNIFIED IDEOGRAPH + {0xE8B0, 0x748B}, //18271 #CJK UNIFIED IDEOGRAPH + {0xE8B1, 0x749E}, //18272 #CJK UNIFIED IDEOGRAPH + {0xE8B2, 0x74A8}, //18273 #CJK UNIFIED IDEOGRAPH + {0xE8B3, 0x74A9}, //18274 #CJK UNIFIED IDEOGRAPH + {0xE8B4, 0x7490}, //18275 #CJK UNIFIED IDEOGRAPH + {0xE8B5, 0x74A7}, //18276 #CJK UNIFIED IDEOGRAPH + {0xE8B6, 0x74D2}, //18277 #CJK UNIFIED IDEOGRAPH + {0xE8B7, 0x74BA}, //18278 #CJK UNIFIED IDEOGRAPH + {0xE8B8, 0x97EA}, //18279 #CJK UNIFIED IDEOGRAPH + {0xE8B9, 0x97EB}, //18280 #CJK UNIFIED IDEOGRAPH + {0xE8BA, 0x97EC}, //18281 #CJK UNIFIED IDEOGRAPH + {0xE8BB, 0x674C}, //18282 #CJK UNIFIED IDEOGRAPH + {0xE8BC, 0x6753}, //18283 #CJK UNIFIED IDEOGRAPH + {0xE8BD, 0x675E}, //18284 #CJK UNIFIED IDEOGRAPH + {0xE8BE, 0x6748}, //18285 #CJK UNIFIED IDEOGRAPH + {0xE8BF, 0x6769}, //18286 #CJK UNIFIED IDEOGRAPH + {0xE8C0, 0x67A5}, //18287 #CJK UNIFIED IDEOGRAPH + {0xE8C1, 0x6787}, //18288 #CJK UNIFIED IDEOGRAPH + {0xE8C2, 0x676A}, //18289 #CJK UNIFIED IDEOGRAPH + {0xE8C3, 0x6773}, //18290 #CJK UNIFIED IDEOGRAPH + {0xE8C4, 0x6798}, //18291 #CJK UNIFIED IDEOGRAPH + {0xE8C5, 0x67A7}, //18292 #CJK UNIFIED IDEOGRAPH + {0xE8C6, 0x6775}, //18293 #CJK UNIFIED IDEOGRAPH + {0xE8C7, 0x67A8}, //18294 #CJK UNIFIED IDEOGRAPH + {0xE8C8, 0x679E}, //18295 #CJK UNIFIED IDEOGRAPH + {0xE8C9, 0x67AD}, //18296 #CJK UNIFIED IDEOGRAPH + {0xE8CA, 0x678B}, //18297 #CJK UNIFIED IDEOGRAPH + {0xE8CB, 0x6777}, //18298 #CJK UNIFIED IDEOGRAPH + {0xE8CC, 0x677C}, //18299 #CJK UNIFIED IDEOGRAPH + {0xE8CD, 0x67F0}, //18300 #CJK UNIFIED IDEOGRAPH + {0xE8CE, 0x6809}, //18301 #CJK UNIFIED IDEOGRAPH + {0xE8CF, 0x67D8}, //18302 #CJK UNIFIED IDEOGRAPH + {0xE8D0, 0x680A}, //18303 #CJK UNIFIED IDEOGRAPH + {0xE8D1, 0x67E9}, //18304 #CJK UNIFIED IDEOGRAPH + {0xE8D2, 0x67B0}, //18305 #CJK UNIFIED IDEOGRAPH + {0xE8D3, 0x680C}, //18306 #CJK UNIFIED IDEOGRAPH + {0xE8D4, 0x67D9}, //18307 #CJK UNIFIED IDEOGRAPH + {0xE8D5, 0x67B5}, //18308 #CJK UNIFIED IDEOGRAPH + {0xE8D6, 0x67DA}, //18309 #CJK UNIFIED IDEOGRAPH + {0xE8D7, 0x67B3}, //18310 #CJK UNIFIED IDEOGRAPH + {0xE8D8, 0x67DD}, //18311 #CJK UNIFIED IDEOGRAPH + {0xE8D9, 0x6800}, //18312 #CJK UNIFIED IDEOGRAPH + {0xE8DA, 0x67C3}, //18313 #CJK UNIFIED IDEOGRAPH + {0xE8DB, 0x67B8}, //18314 #CJK UNIFIED IDEOGRAPH + {0xE8DC, 0x67E2}, //18315 #CJK UNIFIED IDEOGRAPH + {0xE8DD, 0x680E}, //18316 #CJK UNIFIED IDEOGRAPH + {0xE8DE, 0x67C1}, //18317 #CJK UNIFIED IDEOGRAPH + {0xE8DF, 0x67FD}, //18318 #CJK UNIFIED IDEOGRAPH + {0xE8E0, 0x6832}, //18319 #CJK UNIFIED IDEOGRAPH + {0xE8E1, 0x6833}, //18320 #CJK UNIFIED IDEOGRAPH + {0xE8E2, 0x6860}, //18321 #CJK UNIFIED IDEOGRAPH + {0xE8E3, 0x6861}, //18322 #CJK UNIFIED IDEOGRAPH + {0xE8E4, 0x684E}, //18323 #CJK UNIFIED IDEOGRAPH + {0xE8E5, 0x6862}, //18324 #CJK UNIFIED IDEOGRAPH + {0xE8E6, 0x6844}, //18325 #CJK UNIFIED IDEOGRAPH + {0xE8E7, 0x6864}, //18326 #CJK UNIFIED IDEOGRAPH + {0xE8E8, 0x6883}, //18327 #CJK UNIFIED IDEOGRAPH + {0xE8E9, 0x681D}, //18328 #CJK UNIFIED IDEOGRAPH + {0xE8EA, 0x6855}, //18329 #CJK UNIFIED IDEOGRAPH + {0xE8EB, 0x6866}, //18330 #CJK UNIFIED IDEOGRAPH + {0xE8EC, 0x6841}, //18331 #CJK UNIFIED IDEOGRAPH + {0xE8ED, 0x6867}, //18332 #CJK UNIFIED IDEOGRAPH + {0xE8EE, 0x6840}, //18333 #CJK UNIFIED IDEOGRAPH + {0xE8EF, 0x683E}, //18334 #CJK UNIFIED IDEOGRAPH + {0xE8F0, 0x684A}, //18335 #CJK UNIFIED IDEOGRAPH + {0xE8F1, 0x6849}, //18336 #CJK UNIFIED IDEOGRAPH + {0xE8F2, 0x6829}, //18337 #CJK UNIFIED IDEOGRAPH + {0xE8F3, 0x68B5}, //18338 #CJK UNIFIED IDEOGRAPH + {0xE8F4, 0x688F}, //18339 #CJK UNIFIED IDEOGRAPH + {0xE8F5, 0x6874}, //18340 #CJK UNIFIED IDEOGRAPH + {0xE8F6, 0x6877}, //18341 #CJK UNIFIED IDEOGRAPH + {0xE8F7, 0x6893}, //18342 #CJK UNIFIED IDEOGRAPH + {0xE8F8, 0x686B}, //18343 #CJK UNIFIED IDEOGRAPH + {0xE8F9, 0x68C2}, //18344 #CJK UNIFIED IDEOGRAPH + {0xE8FA, 0x696E}, //18345 #CJK UNIFIED IDEOGRAPH + {0xE8FB, 0x68FC}, //18346 #CJK UNIFIED IDEOGRAPH + {0xE8FC, 0x691F}, //18347 #CJK UNIFIED IDEOGRAPH + {0xE8FD, 0x6920}, //18348 #CJK UNIFIED IDEOGRAPH + {0xE8FE, 0x68F9}, //18349 #CJK UNIFIED IDEOGRAPH + {0xE940, 0x9527}, //18350 #CJK UNIFIED IDEOGRAPH + {0xE941, 0x9533}, //18351 #CJK UNIFIED IDEOGRAPH + {0xE942, 0x953D}, //18352 #CJK UNIFIED IDEOGRAPH + {0xE943, 0x9543}, //18353 #CJK UNIFIED IDEOGRAPH + {0xE944, 0x9548}, //18354 #CJK UNIFIED IDEOGRAPH + {0xE945, 0x954B}, //18355 #CJK UNIFIED IDEOGRAPH + {0xE946, 0x9555}, //18356 #CJK UNIFIED IDEOGRAPH + {0xE947, 0x955A}, //18357 #CJK UNIFIED IDEOGRAPH + {0xE948, 0x9560}, //18358 #CJK UNIFIED IDEOGRAPH + {0xE949, 0x956E}, //18359 #CJK UNIFIED IDEOGRAPH + {0xE94A, 0x9574}, //18360 #CJK UNIFIED IDEOGRAPH + {0xE94B, 0x9575}, //18361 #CJK UNIFIED IDEOGRAPH + {0xE94C, 0x9577}, //18362 #CJK UNIFIED IDEOGRAPH + {0xE94D, 0x9578}, //18363 #CJK UNIFIED IDEOGRAPH + {0xE94E, 0x9579}, //18364 #CJK UNIFIED IDEOGRAPH + {0xE94F, 0x957A}, //18365 #CJK UNIFIED IDEOGRAPH + {0xE950, 0x957B}, //18366 #CJK UNIFIED IDEOGRAPH + {0xE951, 0x957C}, //18367 #CJK UNIFIED IDEOGRAPH + {0xE952, 0x957D}, //18368 #CJK UNIFIED IDEOGRAPH + {0xE953, 0x957E}, //18369 #CJK UNIFIED IDEOGRAPH + {0xE954, 0x9580}, //18370 #CJK UNIFIED IDEOGRAPH + {0xE955, 0x9581}, //18371 #CJK UNIFIED IDEOGRAPH + {0xE956, 0x9582}, //18372 #CJK UNIFIED IDEOGRAPH + {0xE957, 0x9583}, //18373 #CJK UNIFIED IDEOGRAPH + {0xE958, 0x9584}, //18374 #CJK UNIFIED IDEOGRAPH + {0xE959, 0x9585}, //18375 #CJK UNIFIED IDEOGRAPH + {0xE95A, 0x9586}, //18376 #CJK UNIFIED IDEOGRAPH + {0xE95B, 0x9587}, //18377 #CJK UNIFIED IDEOGRAPH + {0xE95C, 0x9588}, //18378 #CJK UNIFIED IDEOGRAPH + {0xE95D, 0x9589}, //18379 #CJK UNIFIED IDEOGRAPH + {0xE95E, 0x958A}, //18380 #CJK UNIFIED IDEOGRAPH + {0xE95F, 0x958B}, //18381 #CJK UNIFIED IDEOGRAPH + {0xE960, 0x958C}, //18382 #CJK UNIFIED IDEOGRAPH + {0xE961, 0x958D}, //18383 #CJK UNIFIED IDEOGRAPH + {0xE962, 0x958E}, //18384 #CJK UNIFIED IDEOGRAPH + {0xE963, 0x958F}, //18385 #CJK UNIFIED IDEOGRAPH + {0xE964, 0x9590}, //18386 #CJK UNIFIED IDEOGRAPH + {0xE965, 0x9591}, //18387 #CJK UNIFIED IDEOGRAPH + {0xE966, 0x9592}, //18388 #CJK UNIFIED IDEOGRAPH + {0xE967, 0x9593}, //18389 #CJK UNIFIED IDEOGRAPH + {0xE968, 0x9594}, //18390 #CJK UNIFIED IDEOGRAPH + {0xE969, 0x9595}, //18391 #CJK UNIFIED IDEOGRAPH + {0xE96A, 0x9596}, //18392 #CJK UNIFIED IDEOGRAPH + {0xE96B, 0x9597}, //18393 #CJK UNIFIED IDEOGRAPH + {0xE96C, 0x9598}, //18394 #CJK UNIFIED IDEOGRAPH + {0xE96D, 0x9599}, //18395 #CJK UNIFIED IDEOGRAPH + {0xE96E, 0x959A}, //18396 #CJK UNIFIED IDEOGRAPH + {0xE96F, 0x959B}, //18397 #CJK UNIFIED IDEOGRAPH + {0xE970, 0x959C}, //18398 #CJK UNIFIED IDEOGRAPH + {0xE971, 0x959D}, //18399 #CJK UNIFIED IDEOGRAPH + {0xE972, 0x959E}, //18400 #CJK UNIFIED IDEOGRAPH + {0xE973, 0x959F}, //18401 #CJK UNIFIED IDEOGRAPH + {0xE974, 0x95A0}, //18402 #CJK UNIFIED IDEOGRAPH + {0xE975, 0x95A1}, //18403 #CJK UNIFIED IDEOGRAPH + {0xE976, 0x95A2}, //18404 #CJK UNIFIED IDEOGRAPH + {0xE977, 0x95A3}, //18405 #CJK UNIFIED IDEOGRAPH + {0xE978, 0x95A4}, //18406 #CJK UNIFIED IDEOGRAPH + {0xE979, 0x95A5}, //18407 #CJK UNIFIED IDEOGRAPH + {0xE97A, 0x95A6}, //18408 #CJK UNIFIED IDEOGRAPH + {0xE97B, 0x95A7}, //18409 #CJK UNIFIED IDEOGRAPH + {0xE97C, 0x95A8}, //18410 #CJK UNIFIED IDEOGRAPH + {0xE97D, 0x95A9}, //18411 #CJK UNIFIED IDEOGRAPH + {0xE97E, 0x95AA}, //18412 #CJK UNIFIED IDEOGRAPH + {0xE980, 0x95AB}, //18413 #CJK UNIFIED IDEOGRAPH + {0xE981, 0x95AC}, //18414 #CJK UNIFIED IDEOGRAPH + {0xE982, 0x95AD}, //18415 #CJK UNIFIED IDEOGRAPH + {0xE983, 0x95AE}, //18416 #CJK UNIFIED IDEOGRAPH + {0xE984, 0x95AF}, //18417 #CJK UNIFIED IDEOGRAPH + {0xE985, 0x95B0}, //18418 #CJK UNIFIED IDEOGRAPH + {0xE986, 0x95B1}, //18419 #CJK UNIFIED IDEOGRAPH + {0xE987, 0x95B2}, //18420 #CJK UNIFIED IDEOGRAPH + {0xE988, 0x95B3}, //18421 #CJK UNIFIED IDEOGRAPH + {0xE989, 0x95B4}, //18422 #CJK UNIFIED IDEOGRAPH + {0xE98A, 0x95B5}, //18423 #CJK UNIFIED IDEOGRAPH + {0xE98B, 0x95B6}, //18424 #CJK UNIFIED IDEOGRAPH + {0xE98C, 0x95B7}, //18425 #CJK UNIFIED IDEOGRAPH + {0xE98D, 0x95B8}, //18426 #CJK UNIFIED IDEOGRAPH + {0xE98E, 0x95B9}, //18427 #CJK UNIFIED IDEOGRAPH + {0xE98F, 0x95BA}, //18428 #CJK UNIFIED IDEOGRAPH + {0xE990, 0x95BB}, //18429 #CJK UNIFIED IDEOGRAPH + {0xE991, 0x95BC}, //18430 #CJK UNIFIED IDEOGRAPH + {0xE992, 0x95BD}, //18431 #CJK UNIFIED IDEOGRAPH + {0xE993, 0x95BE}, //18432 #CJK UNIFIED IDEOGRAPH + {0xE994, 0x95BF}, //18433 #CJK UNIFIED IDEOGRAPH + {0xE995, 0x95C0}, //18434 #CJK UNIFIED IDEOGRAPH + {0xE996, 0x95C1}, //18435 #CJK UNIFIED IDEOGRAPH + {0xE997, 0x95C2}, //18436 #CJK UNIFIED IDEOGRAPH + {0xE998, 0x95C3}, //18437 #CJK UNIFIED IDEOGRAPH + {0xE999, 0x95C4}, //18438 #CJK UNIFIED IDEOGRAPH + {0xE99A, 0x95C5}, //18439 #CJK UNIFIED IDEOGRAPH + {0xE99B, 0x95C6}, //18440 #CJK UNIFIED IDEOGRAPH + {0xE99C, 0x95C7}, //18441 #CJK UNIFIED IDEOGRAPH + {0xE99D, 0x95C8}, //18442 #CJK UNIFIED IDEOGRAPH + {0xE99E, 0x95C9}, //18443 #CJK UNIFIED IDEOGRAPH + {0xE99F, 0x95CA}, //18444 #CJK UNIFIED IDEOGRAPH + {0xE9A0, 0x95CB}, //18445 #CJK UNIFIED IDEOGRAPH + {0xE9A1, 0x6924}, //18446 #CJK UNIFIED IDEOGRAPH + {0xE9A2, 0x68F0}, //18447 #CJK UNIFIED IDEOGRAPH + {0xE9A3, 0x690B}, //18448 #CJK UNIFIED IDEOGRAPH + {0xE9A4, 0x6901}, //18449 #CJK UNIFIED IDEOGRAPH + {0xE9A5, 0x6957}, //18450 #CJK UNIFIED IDEOGRAPH + {0xE9A6, 0x68E3}, //18451 #CJK UNIFIED IDEOGRAPH + {0xE9A7, 0x6910}, //18452 #CJK UNIFIED IDEOGRAPH + {0xE9A8, 0x6971}, //18453 #CJK UNIFIED IDEOGRAPH + {0xE9A9, 0x6939}, //18454 #CJK UNIFIED IDEOGRAPH + {0xE9AA, 0x6960}, //18455 #CJK UNIFIED IDEOGRAPH + {0xE9AB, 0x6942}, //18456 #CJK UNIFIED IDEOGRAPH + {0xE9AC, 0x695D}, //18457 #CJK UNIFIED IDEOGRAPH + {0xE9AD, 0x6984}, //18458 #CJK UNIFIED IDEOGRAPH + {0xE9AE, 0x696B}, //18459 #CJK UNIFIED IDEOGRAPH + {0xE9AF, 0x6980}, //18460 #CJK UNIFIED IDEOGRAPH + {0xE9B0, 0x6998}, //18461 #CJK UNIFIED IDEOGRAPH + {0xE9B1, 0x6978}, //18462 #CJK UNIFIED IDEOGRAPH + {0xE9B2, 0x6934}, //18463 #CJK UNIFIED IDEOGRAPH + {0xE9B3, 0x69CC}, //18464 #CJK UNIFIED IDEOGRAPH + {0xE9B4, 0x6987}, //18465 #CJK UNIFIED IDEOGRAPH + {0xE9B5, 0x6988}, //18466 #CJK UNIFIED IDEOGRAPH + {0xE9B6, 0x69CE}, //18467 #CJK UNIFIED IDEOGRAPH + {0xE9B7, 0x6989}, //18468 #CJK UNIFIED IDEOGRAPH + {0xE9B8, 0x6966}, //18469 #CJK UNIFIED IDEOGRAPH + {0xE9B9, 0x6963}, //18470 #CJK UNIFIED IDEOGRAPH + {0xE9BA, 0x6979}, //18471 #CJK UNIFIED IDEOGRAPH + {0xE9BB, 0x699B}, //18472 #CJK UNIFIED IDEOGRAPH + {0xE9BC, 0x69A7}, //18473 #CJK UNIFIED IDEOGRAPH + {0xE9BD, 0x69BB}, //18474 #CJK UNIFIED IDEOGRAPH + {0xE9BE, 0x69AB}, //18475 #CJK UNIFIED IDEOGRAPH + {0xE9BF, 0x69AD}, //18476 #CJK UNIFIED IDEOGRAPH + {0xE9C0, 0x69D4}, //18477 #CJK UNIFIED IDEOGRAPH + {0xE9C1, 0x69B1}, //18478 #CJK UNIFIED IDEOGRAPH + {0xE9C2, 0x69C1}, //18479 #CJK UNIFIED IDEOGRAPH + {0xE9C3, 0x69CA}, //18480 #CJK UNIFIED IDEOGRAPH + {0xE9C4, 0x69DF}, //18481 #CJK UNIFIED IDEOGRAPH + {0xE9C5, 0x6995}, //18482 #CJK UNIFIED IDEOGRAPH + {0xE9C6, 0x69E0}, //18483 #CJK UNIFIED IDEOGRAPH + {0xE9C7, 0x698D}, //18484 #CJK UNIFIED IDEOGRAPH + {0xE9C8, 0x69FF}, //18485 #CJK UNIFIED IDEOGRAPH + {0xE9C9, 0x6A2F}, //18486 #CJK UNIFIED IDEOGRAPH + {0xE9CA, 0x69ED}, //18487 #CJK UNIFIED IDEOGRAPH + {0xE9CB, 0x6A17}, //18488 #CJK UNIFIED IDEOGRAPH + {0xE9CC, 0x6A18}, //18489 #CJK UNIFIED IDEOGRAPH + {0xE9CD, 0x6A65}, //18490 #CJK UNIFIED IDEOGRAPH + {0xE9CE, 0x69F2}, //18491 #CJK UNIFIED IDEOGRAPH + {0xE9CF, 0x6A44}, //18492 #CJK UNIFIED IDEOGRAPH + {0xE9D0, 0x6A3E}, //18493 #CJK UNIFIED IDEOGRAPH + {0xE9D1, 0x6AA0}, //18494 #CJK UNIFIED IDEOGRAPH + {0xE9D2, 0x6A50}, //18495 #CJK UNIFIED IDEOGRAPH + {0xE9D3, 0x6A5B}, //18496 #CJK UNIFIED IDEOGRAPH + {0xE9D4, 0x6A35}, //18497 #CJK UNIFIED IDEOGRAPH + {0xE9D5, 0x6A8E}, //18498 #CJK UNIFIED IDEOGRAPH + {0xE9D6, 0x6A79}, //18499 #CJK UNIFIED IDEOGRAPH + {0xE9D7, 0x6A3D}, //18500 #CJK UNIFIED IDEOGRAPH + {0xE9D8, 0x6A28}, //18501 #CJK UNIFIED IDEOGRAPH + {0xE9D9, 0x6A58}, //18502 #CJK UNIFIED IDEOGRAPH + {0xE9DA, 0x6A7C}, //18503 #CJK UNIFIED IDEOGRAPH + {0xE9DB, 0x6A91}, //18504 #CJK UNIFIED IDEOGRAPH + {0xE9DC, 0x6A90}, //18505 #CJK UNIFIED IDEOGRAPH + {0xE9DD, 0x6AA9}, //18506 #CJK UNIFIED IDEOGRAPH + {0xE9DE, 0x6A97}, //18507 #CJK UNIFIED IDEOGRAPH + {0xE9DF, 0x6AAB}, //18508 #CJK UNIFIED IDEOGRAPH + {0xE9E0, 0x7337}, //18509 #CJK UNIFIED IDEOGRAPH + {0xE9E1, 0x7352}, //18510 #CJK UNIFIED IDEOGRAPH + {0xE9E2, 0x6B81}, //18511 #CJK UNIFIED IDEOGRAPH + {0xE9E3, 0x6B82}, //18512 #CJK UNIFIED IDEOGRAPH + {0xE9E4, 0x6B87}, //18513 #CJK UNIFIED IDEOGRAPH + {0xE9E5, 0x6B84}, //18514 #CJK UNIFIED IDEOGRAPH + {0xE9E6, 0x6B92}, //18515 #CJK UNIFIED IDEOGRAPH + {0xE9E7, 0x6B93}, //18516 #CJK UNIFIED IDEOGRAPH + {0xE9E8, 0x6B8D}, //18517 #CJK UNIFIED IDEOGRAPH + {0xE9E9, 0x6B9A}, //18518 #CJK UNIFIED IDEOGRAPH + {0xE9EA, 0x6B9B}, //18519 #CJK UNIFIED IDEOGRAPH + {0xE9EB, 0x6BA1}, //18520 #CJK UNIFIED IDEOGRAPH + {0xE9EC, 0x6BAA}, //18521 #CJK UNIFIED IDEOGRAPH + {0xE9ED, 0x8F6B}, //18522 #CJK UNIFIED IDEOGRAPH + {0xE9EE, 0x8F6D}, //18523 #CJK UNIFIED IDEOGRAPH + {0xE9EF, 0x8F71}, //18524 #CJK UNIFIED IDEOGRAPH + {0xE9F0, 0x8F72}, //18525 #CJK UNIFIED IDEOGRAPH + {0xE9F1, 0x8F73}, //18526 #CJK UNIFIED IDEOGRAPH + {0xE9F2, 0x8F75}, //18527 #CJK UNIFIED IDEOGRAPH + {0xE9F3, 0x8F76}, //18528 #CJK UNIFIED IDEOGRAPH + {0xE9F4, 0x8F78}, //18529 #CJK UNIFIED IDEOGRAPH + {0xE9F5, 0x8F77}, //18530 #CJK UNIFIED IDEOGRAPH + {0xE9F6, 0x8F79}, //18531 #CJK UNIFIED IDEOGRAPH + {0xE9F7, 0x8F7A}, //18532 #CJK UNIFIED IDEOGRAPH + {0xE9F8, 0x8F7C}, //18533 #CJK UNIFIED IDEOGRAPH + {0xE9F9, 0x8F7E}, //18534 #CJK UNIFIED IDEOGRAPH + {0xE9FA, 0x8F81}, //18535 #CJK UNIFIED IDEOGRAPH + {0xE9FB, 0x8F82}, //18536 #CJK UNIFIED IDEOGRAPH + {0xE9FC, 0x8F84}, //18537 #CJK UNIFIED IDEOGRAPH + {0xE9FD, 0x8F87}, //18538 #CJK UNIFIED IDEOGRAPH + {0xE9FE, 0x8F8B}, //18539 #CJK UNIFIED IDEOGRAPH + {0xEA40, 0x95CC}, //18540 #CJK UNIFIED IDEOGRAPH + {0xEA41, 0x95CD}, //18541 #CJK UNIFIED IDEOGRAPH + {0xEA42, 0x95CE}, //18542 #CJK UNIFIED IDEOGRAPH + {0xEA43, 0x95CF}, //18543 #CJK UNIFIED IDEOGRAPH + {0xEA44, 0x95D0}, //18544 #CJK UNIFIED IDEOGRAPH + {0xEA45, 0x95D1}, //18545 #CJK UNIFIED IDEOGRAPH + {0xEA46, 0x95D2}, //18546 #CJK UNIFIED IDEOGRAPH + {0xEA47, 0x95D3}, //18547 #CJK UNIFIED IDEOGRAPH + {0xEA48, 0x95D4}, //18548 #CJK UNIFIED IDEOGRAPH + {0xEA49, 0x95D5}, //18549 #CJK UNIFIED IDEOGRAPH + {0xEA4A, 0x95D6}, //18550 #CJK UNIFIED IDEOGRAPH + {0xEA4B, 0x95D7}, //18551 #CJK UNIFIED IDEOGRAPH + {0xEA4C, 0x95D8}, //18552 #CJK UNIFIED IDEOGRAPH + {0xEA4D, 0x95D9}, //18553 #CJK UNIFIED IDEOGRAPH + {0xEA4E, 0x95DA}, //18554 #CJK UNIFIED IDEOGRAPH + {0xEA4F, 0x95DB}, //18555 #CJK UNIFIED IDEOGRAPH + {0xEA50, 0x95DC}, //18556 #CJK UNIFIED IDEOGRAPH + {0xEA51, 0x95DD}, //18557 #CJK UNIFIED IDEOGRAPH + {0xEA52, 0x95DE}, //18558 #CJK UNIFIED IDEOGRAPH + {0xEA53, 0x95DF}, //18559 #CJK UNIFIED IDEOGRAPH + {0xEA54, 0x95E0}, //18560 #CJK UNIFIED IDEOGRAPH + {0xEA55, 0x95E1}, //18561 #CJK UNIFIED IDEOGRAPH + {0xEA56, 0x95E2}, //18562 #CJK UNIFIED IDEOGRAPH + {0xEA57, 0x95E3}, //18563 #CJK UNIFIED IDEOGRAPH + {0xEA58, 0x95E4}, //18564 #CJK UNIFIED IDEOGRAPH + {0xEA59, 0x95E5}, //18565 #CJK UNIFIED IDEOGRAPH + {0xEA5A, 0x95E6}, //18566 #CJK UNIFIED IDEOGRAPH + {0xEA5B, 0x95E7}, //18567 #CJK UNIFIED IDEOGRAPH + {0xEA5C, 0x95EC}, //18568 #CJK UNIFIED IDEOGRAPH + {0xEA5D, 0x95FF}, //18569 #CJK UNIFIED IDEOGRAPH + {0xEA5E, 0x9607}, //18570 #CJK UNIFIED IDEOGRAPH + {0xEA5F, 0x9613}, //18571 #CJK UNIFIED IDEOGRAPH + {0xEA60, 0x9618}, //18572 #CJK UNIFIED IDEOGRAPH + {0xEA61, 0x961B}, //18573 #CJK UNIFIED IDEOGRAPH + {0xEA62, 0x961E}, //18574 #CJK UNIFIED IDEOGRAPH + {0xEA63, 0x9620}, //18575 #CJK UNIFIED IDEOGRAPH + {0xEA64, 0x9623}, //18576 #CJK UNIFIED IDEOGRAPH + {0xEA65, 0x9624}, //18577 #CJK UNIFIED IDEOGRAPH + {0xEA66, 0x9625}, //18578 #CJK UNIFIED IDEOGRAPH + {0xEA67, 0x9626}, //18579 #CJK UNIFIED IDEOGRAPH + {0xEA68, 0x9627}, //18580 #CJK UNIFIED IDEOGRAPH + {0xEA69, 0x9628}, //18581 #CJK UNIFIED IDEOGRAPH + {0xEA6A, 0x9629}, //18582 #CJK UNIFIED IDEOGRAPH + {0xEA6B, 0x962B}, //18583 #CJK UNIFIED IDEOGRAPH + {0xEA6C, 0x962C}, //18584 #CJK UNIFIED IDEOGRAPH + {0xEA6D, 0x962D}, //18585 #CJK UNIFIED IDEOGRAPH + {0xEA6E, 0x962F}, //18586 #CJK UNIFIED IDEOGRAPH + {0xEA6F, 0x9630}, //18587 #CJK UNIFIED IDEOGRAPH + {0xEA70, 0x9637}, //18588 #CJK UNIFIED IDEOGRAPH + {0xEA71, 0x9638}, //18589 #CJK UNIFIED IDEOGRAPH + {0xEA72, 0x9639}, //18590 #CJK UNIFIED IDEOGRAPH + {0xEA73, 0x963A}, //18591 #CJK UNIFIED IDEOGRAPH + {0xEA74, 0x963E}, //18592 #CJK UNIFIED IDEOGRAPH + {0xEA75, 0x9641}, //18593 #CJK UNIFIED IDEOGRAPH + {0xEA76, 0x9643}, //18594 #CJK UNIFIED IDEOGRAPH + {0xEA77, 0x964A}, //18595 #CJK UNIFIED IDEOGRAPH + {0xEA78, 0x964E}, //18596 #CJK UNIFIED IDEOGRAPH + {0xEA79, 0x964F}, //18597 #CJK UNIFIED IDEOGRAPH + {0xEA7A, 0x9651}, //18598 #CJK UNIFIED IDEOGRAPH + {0xEA7B, 0x9652}, //18599 #CJK UNIFIED IDEOGRAPH + {0xEA7C, 0x9653}, //18600 #CJK UNIFIED IDEOGRAPH + {0xEA7D, 0x9656}, //18601 #CJK UNIFIED IDEOGRAPH + {0xEA7E, 0x9657}, //18602 #CJK UNIFIED IDEOGRAPH + {0xEA80, 0x9658}, //18603 #CJK UNIFIED IDEOGRAPH + {0xEA81, 0x9659}, //18604 #CJK UNIFIED IDEOGRAPH + {0xEA82, 0x965A}, //18605 #CJK UNIFIED IDEOGRAPH + {0xEA83, 0x965C}, //18606 #CJK UNIFIED IDEOGRAPH + {0xEA84, 0x965D}, //18607 #CJK UNIFIED IDEOGRAPH + {0xEA85, 0x965E}, //18608 #CJK UNIFIED IDEOGRAPH + {0xEA86, 0x9660}, //18609 #CJK UNIFIED IDEOGRAPH + {0xEA87, 0x9663}, //18610 #CJK UNIFIED IDEOGRAPH + {0xEA88, 0x9665}, //18611 #CJK UNIFIED IDEOGRAPH + {0xEA89, 0x9666}, //18612 #CJK UNIFIED IDEOGRAPH + {0xEA8A, 0x966B}, //18613 #CJK UNIFIED IDEOGRAPH + {0xEA8B, 0x966D}, //18614 #CJK UNIFIED IDEOGRAPH + {0xEA8C, 0x966E}, //18615 #CJK UNIFIED IDEOGRAPH + {0xEA8D, 0x966F}, //18616 #CJK UNIFIED IDEOGRAPH + {0xEA8E, 0x9670}, //18617 #CJK UNIFIED IDEOGRAPH + {0xEA8F, 0x9671}, //18618 #CJK UNIFIED IDEOGRAPH + {0xEA90, 0x9673}, //18619 #CJK UNIFIED IDEOGRAPH + {0xEA91, 0x9678}, //18620 #CJK UNIFIED IDEOGRAPH + {0xEA92, 0x9679}, //18621 #CJK UNIFIED IDEOGRAPH + {0xEA93, 0x967A}, //18622 #CJK UNIFIED IDEOGRAPH + {0xEA94, 0x967B}, //18623 #CJK UNIFIED IDEOGRAPH + {0xEA95, 0x967C}, //18624 #CJK UNIFIED IDEOGRAPH + {0xEA96, 0x967D}, //18625 #CJK UNIFIED IDEOGRAPH + {0xEA97, 0x967E}, //18626 #CJK UNIFIED IDEOGRAPH + {0xEA98, 0x967F}, //18627 #CJK UNIFIED IDEOGRAPH + {0xEA99, 0x9680}, //18628 #CJK UNIFIED IDEOGRAPH + {0xEA9A, 0x9681}, //18629 #CJK UNIFIED IDEOGRAPH + {0xEA9B, 0x9682}, //18630 #CJK UNIFIED IDEOGRAPH + {0xEA9C, 0x9683}, //18631 #CJK UNIFIED IDEOGRAPH + {0xEA9D, 0x9684}, //18632 #CJK UNIFIED IDEOGRAPH + {0xEA9E, 0x9687}, //18633 #CJK UNIFIED IDEOGRAPH + {0xEA9F, 0x9689}, //18634 #CJK UNIFIED IDEOGRAPH + {0xEAA0, 0x968A}, //18635 #CJK UNIFIED IDEOGRAPH + {0xEAA1, 0x8F8D}, //18636 #CJK UNIFIED IDEOGRAPH + {0xEAA2, 0x8F8E}, //18637 #CJK UNIFIED IDEOGRAPH + {0xEAA3, 0x8F8F}, //18638 #CJK UNIFIED IDEOGRAPH + {0xEAA4, 0x8F98}, //18639 #CJK UNIFIED IDEOGRAPH + {0xEAA5, 0x8F9A}, //18640 #CJK UNIFIED IDEOGRAPH + {0xEAA6, 0x8ECE}, //18641 #CJK UNIFIED IDEOGRAPH + {0xEAA7, 0x620B}, //18642 #CJK UNIFIED IDEOGRAPH + {0xEAA8, 0x6217}, //18643 #CJK UNIFIED IDEOGRAPH + {0xEAA9, 0x621B}, //18644 #CJK UNIFIED IDEOGRAPH + {0xEAAA, 0x621F}, //18645 #CJK UNIFIED IDEOGRAPH + {0xEAAB, 0x6222}, //18646 #CJK UNIFIED IDEOGRAPH + {0xEAAC, 0x6221}, //18647 #CJK UNIFIED IDEOGRAPH + {0xEAAD, 0x6225}, //18648 #CJK UNIFIED IDEOGRAPH + {0xEAAE, 0x6224}, //18649 #CJK UNIFIED IDEOGRAPH + {0xEAAF, 0x622C}, //18650 #CJK UNIFIED IDEOGRAPH + {0xEAB0, 0x81E7}, //18651 #CJK UNIFIED IDEOGRAPH + {0xEAB1, 0x74EF}, //18652 #CJK UNIFIED IDEOGRAPH + {0xEAB2, 0x74F4}, //18653 #CJK UNIFIED IDEOGRAPH + {0xEAB3, 0x74FF}, //18654 #CJK UNIFIED IDEOGRAPH + {0xEAB4, 0x750F}, //18655 #CJK UNIFIED IDEOGRAPH + {0xEAB5, 0x7511}, //18656 #CJK UNIFIED IDEOGRAPH + {0xEAB6, 0x7513}, //18657 #CJK UNIFIED IDEOGRAPH + {0xEAB7, 0x6534}, //18658 #CJK UNIFIED IDEOGRAPH + {0xEAB8, 0x65EE}, //18659 #CJK UNIFIED IDEOGRAPH + {0xEAB9, 0x65EF}, //18660 #CJK UNIFIED IDEOGRAPH + {0xEABA, 0x65F0}, //18661 #CJK UNIFIED IDEOGRAPH + {0xEABB, 0x660A}, //18662 #CJK UNIFIED IDEOGRAPH + {0xEABC, 0x6619}, //18663 #CJK UNIFIED IDEOGRAPH + {0xEABD, 0x6772}, //18664 #CJK UNIFIED IDEOGRAPH + {0xEABE, 0x6603}, //18665 #CJK UNIFIED IDEOGRAPH + {0xEABF, 0x6615}, //18666 #CJK UNIFIED IDEOGRAPH + {0xEAC0, 0x6600}, //18667 #CJK UNIFIED IDEOGRAPH + {0xEAC1, 0x7085}, //18668 #CJK UNIFIED IDEOGRAPH + {0xEAC2, 0x66F7}, //18669 #CJK UNIFIED IDEOGRAPH + {0xEAC3, 0x661D}, //18670 #CJK UNIFIED IDEOGRAPH + {0xEAC4, 0x6634}, //18671 #CJK UNIFIED IDEOGRAPH + {0xEAC5, 0x6631}, //18672 #CJK UNIFIED IDEOGRAPH + {0xEAC6, 0x6636}, //18673 #CJK UNIFIED IDEOGRAPH + {0xEAC7, 0x6635}, //18674 #CJK UNIFIED IDEOGRAPH + {0xEAC8, 0x8006}, //18675 #CJK UNIFIED IDEOGRAPH + {0xEAC9, 0x665F}, //18676 #CJK UNIFIED IDEOGRAPH + {0xEACA, 0x6654}, //18677 #CJK UNIFIED IDEOGRAPH + {0xEACB, 0x6641}, //18678 #CJK UNIFIED IDEOGRAPH + {0xEACC, 0x664F}, //18679 #CJK UNIFIED IDEOGRAPH + {0xEACD, 0x6656}, //18680 #CJK UNIFIED IDEOGRAPH + {0xEACE, 0x6661}, //18681 #CJK UNIFIED IDEOGRAPH + {0xEACF, 0x6657}, //18682 #CJK UNIFIED IDEOGRAPH + {0xEAD0, 0x6677}, //18683 #CJK UNIFIED IDEOGRAPH + {0xEAD1, 0x6684}, //18684 #CJK UNIFIED IDEOGRAPH + {0xEAD2, 0x668C}, //18685 #CJK UNIFIED IDEOGRAPH + {0xEAD3, 0x66A7}, //18686 #CJK UNIFIED IDEOGRAPH + {0xEAD4, 0x669D}, //18687 #CJK UNIFIED IDEOGRAPH + {0xEAD5, 0x66BE}, //18688 #CJK UNIFIED IDEOGRAPH + {0xEAD6, 0x66DB}, //18689 #CJK UNIFIED IDEOGRAPH + {0xEAD7, 0x66DC}, //18690 #CJK UNIFIED IDEOGRAPH + {0xEAD8, 0x66E6}, //18691 #CJK UNIFIED IDEOGRAPH + {0xEAD9, 0x66E9}, //18692 #CJK UNIFIED IDEOGRAPH + {0xEADA, 0x8D32}, //18693 #CJK UNIFIED IDEOGRAPH + {0xEADB, 0x8D33}, //18694 #CJK UNIFIED IDEOGRAPH + {0xEADC, 0x8D36}, //18695 #CJK UNIFIED IDEOGRAPH + {0xEADD, 0x8D3B}, //18696 #CJK UNIFIED IDEOGRAPH + {0xEADE, 0x8D3D}, //18697 #CJK UNIFIED IDEOGRAPH + {0xEADF, 0x8D40}, //18698 #CJK UNIFIED IDEOGRAPH + {0xEAE0, 0x8D45}, //18699 #CJK UNIFIED IDEOGRAPH + {0xEAE1, 0x8D46}, //18700 #CJK UNIFIED IDEOGRAPH + {0xEAE2, 0x8D48}, //18701 #CJK UNIFIED IDEOGRAPH + {0xEAE3, 0x8D49}, //18702 #CJK UNIFIED IDEOGRAPH + {0xEAE4, 0x8D47}, //18703 #CJK UNIFIED IDEOGRAPH + {0xEAE5, 0x8D4D}, //18704 #CJK UNIFIED IDEOGRAPH + {0xEAE6, 0x8D55}, //18705 #CJK UNIFIED IDEOGRAPH + {0xEAE7, 0x8D59}, //18706 #CJK UNIFIED IDEOGRAPH + {0xEAE8, 0x89C7}, //18707 #CJK UNIFIED IDEOGRAPH + {0xEAE9, 0x89CA}, //18708 #CJK UNIFIED IDEOGRAPH + {0xEAEA, 0x89CB}, //18709 #CJK UNIFIED IDEOGRAPH + {0xEAEB, 0x89CC}, //18710 #CJK UNIFIED IDEOGRAPH + {0xEAEC, 0x89CE}, //18711 #CJK UNIFIED IDEOGRAPH + {0xEAED, 0x89CF}, //18712 #CJK UNIFIED IDEOGRAPH + {0xEAEE, 0x89D0}, //18713 #CJK UNIFIED IDEOGRAPH + {0xEAEF, 0x89D1}, //18714 #CJK UNIFIED IDEOGRAPH + {0xEAF0, 0x726E}, //18715 #CJK UNIFIED IDEOGRAPH + {0xEAF1, 0x729F}, //18716 #CJK UNIFIED IDEOGRAPH + {0xEAF2, 0x725D}, //18717 #CJK UNIFIED IDEOGRAPH + {0xEAF3, 0x7266}, //18718 #CJK UNIFIED IDEOGRAPH + {0xEAF4, 0x726F}, //18719 #CJK UNIFIED IDEOGRAPH + {0xEAF5, 0x727E}, //18720 #CJK UNIFIED IDEOGRAPH + {0xEAF6, 0x727F}, //18721 #CJK UNIFIED IDEOGRAPH + {0xEAF7, 0x7284}, //18722 #CJK UNIFIED IDEOGRAPH + {0xEAF8, 0x728B}, //18723 #CJK UNIFIED IDEOGRAPH + {0xEAF9, 0x728D}, //18724 #CJK UNIFIED IDEOGRAPH + {0xEAFA, 0x728F}, //18725 #CJK UNIFIED IDEOGRAPH + {0xEAFB, 0x7292}, //18726 #CJK UNIFIED IDEOGRAPH + {0xEAFC, 0x6308}, //18727 #CJK UNIFIED IDEOGRAPH + {0xEAFD, 0x6332}, //18728 #CJK UNIFIED IDEOGRAPH + {0xEAFE, 0x63B0}, //18729 #CJK UNIFIED IDEOGRAPH + {0xEB40, 0x968C}, //18730 #CJK UNIFIED IDEOGRAPH + {0xEB41, 0x968E}, //18731 #CJK UNIFIED IDEOGRAPH + {0xEB42, 0x9691}, //18732 #CJK UNIFIED IDEOGRAPH + {0xEB43, 0x9692}, //18733 #CJK UNIFIED IDEOGRAPH + {0xEB44, 0x9693}, //18734 #CJK UNIFIED IDEOGRAPH + {0xEB45, 0x9695}, //18735 #CJK UNIFIED IDEOGRAPH + {0xEB46, 0x9696}, //18736 #CJK UNIFIED IDEOGRAPH + {0xEB47, 0x969A}, //18737 #CJK UNIFIED IDEOGRAPH + {0xEB48, 0x969B}, //18738 #CJK UNIFIED IDEOGRAPH + {0xEB49, 0x969D}, //18739 #CJK UNIFIED IDEOGRAPH + {0xEB4A, 0x969E}, //18740 #CJK UNIFIED IDEOGRAPH + {0xEB4B, 0x969F}, //18741 #CJK UNIFIED IDEOGRAPH + {0xEB4C, 0x96A0}, //18742 #CJK UNIFIED IDEOGRAPH + {0xEB4D, 0x96A1}, //18743 #CJK UNIFIED IDEOGRAPH + {0xEB4E, 0x96A2}, //18744 #CJK UNIFIED IDEOGRAPH + {0xEB4F, 0x96A3}, //18745 #CJK UNIFIED IDEOGRAPH + {0xEB50, 0x96A4}, //18746 #CJK UNIFIED IDEOGRAPH + {0xEB51, 0x96A5}, //18747 #CJK UNIFIED IDEOGRAPH + {0xEB52, 0x96A6}, //18748 #CJK UNIFIED IDEOGRAPH + {0xEB53, 0x96A8}, //18749 #CJK UNIFIED IDEOGRAPH + {0xEB54, 0x96A9}, //18750 #CJK UNIFIED IDEOGRAPH + {0xEB55, 0x96AA}, //18751 #CJK UNIFIED IDEOGRAPH + {0xEB56, 0x96AB}, //18752 #CJK UNIFIED IDEOGRAPH + {0xEB57, 0x96AC}, //18753 #CJK UNIFIED IDEOGRAPH + {0xEB58, 0x96AD}, //18754 #CJK UNIFIED IDEOGRAPH + {0xEB59, 0x96AE}, //18755 #CJK UNIFIED IDEOGRAPH + {0xEB5A, 0x96AF}, //18756 #CJK UNIFIED IDEOGRAPH + {0xEB5B, 0x96B1}, //18757 #CJK UNIFIED IDEOGRAPH + {0xEB5C, 0x96B2}, //18758 #CJK UNIFIED IDEOGRAPH + {0xEB5D, 0x96B4}, //18759 #CJK UNIFIED IDEOGRAPH + {0xEB5E, 0x96B5}, //18760 #CJK UNIFIED IDEOGRAPH + {0xEB5F, 0x96B7}, //18761 #CJK UNIFIED IDEOGRAPH + {0xEB60, 0x96B8}, //18762 #CJK UNIFIED IDEOGRAPH + {0xEB61, 0x96BA}, //18763 #CJK UNIFIED IDEOGRAPH + {0xEB62, 0x96BB}, //18764 #CJK UNIFIED IDEOGRAPH + {0xEB63, 0x96BF}, //18765 #CJK UNIFIED IDEOGRAPH + {0xEB64, 0x96C2}, //18766 #CJK UNIFIED IDEOGRAPH + {0xEB65, 0x96C3}, //18767 #CJK UNIFIED IDEOGRAPH + {0xEB66, 0x96C8}, //18768 #CJK UNIFIED IDEOGRAPH + {0xEB67, 0x96CA}, //18769 #CJK UNIFIED IDEOGRAPH + {0xEB68, 0x96CB}, //18770 #CJK UNIFIED IDEOGRAPH + {0xEB69, 0x96D0}, //18771 #CJK UNIFIED IDEOGRAPH + {0xEB6A, 0x96D1}, //18772 #CJK UNIFIED IDEOGRAPH + {0xEB6B, 0x96D3}, //18773 #CJK UNIFIED IDEOGRAPH + {0xEB6C, 0x96D4}, //18774 #CJK UNIFIED IDEOGRAPH + {0xEB6D, 0x96D6}, //18775 #CJK UNIFIED IDEOGRAPH + {0xEB6E, 0x96D7}, //18776 #CJK UNIFIED IDEOGRAPH + {0xEB6F, 0x96D8}, //18777 #CJK UNIFIED IDEOGRAPH + {0xEB70, 0x96D9}, //18778 #CJK UNIFIED IDEOGRAPH + {0xEB71, 0x96DA}, //18779 #CJK UNIFIED IDEOGRAPH + {0xEB72, 0x96DB}, //18780 #CJK UNIFIED IDEOGRAPH + {0xEB73, 0x96DC}, //18781 #CJK UNIFIED IDEOGRAPH + {0xEB74, 0x96DD}, //18782 #CJK UNIFIED IDEOGRAPH + {0xEB75, 0x96DE}, //18783 #CJK UNIFIED IDEOGRAPH + {0xEB76, 0x96DF}, //18784 #CJK UNIFIED IDEOGRAPH + {0xEB77, 0x96E1}, //18785 #CJK UNIFIED IDEOGRAPH + {0xEB78, 0x96E2}, //18786 #CJK UNIFIED IDEOGRAPH + {0xEB79, 0x96E3}, //18787 #CJK UNIFIED IDEOGRAPH + {0xEB7A, 0x96E4}, //18788 #CJK UNIFIED IDEOGRAPH + {0xEB7B, 0x96E5}, //18789 #CJK UNIFIED IDEOGRAPH + {0xEB7C, 0x96E6}, //18790 #CJK UNIFIED IDEOGRAPH + {0xEB7D, 0x96E7}, //18791 #CJK UNIFIED IDEOGRAPH + {0xEB7E, 0x96EB}, //18792 #CJK UNIFIED IDEOGRAPH + {0xEB80, 0x96EC}, //18793 #CJK UNIFIED IDEOGRAPH + {0xEB81, 0x96ED}, //18794 #CJK UNIFIED IDEOGRAPH + {0xEB82, 0x96EE}, //18795 #CJK UNIFIED IDEOGRAPH + {0xEB83, 0x96F0}, //18796 #CJK UNIFIED IDEOGRAPH + {0xEB84, 0x96F1}, //18797 #CJK UNIFIED IDEOGRAPH + {0xEB85, 0x96F2}, //18798 #CJK UNIFIED IDEOGRAPH + {0xEB86, 0x96F4}, //18799 #CJK UNIFIED IDEOGRAPH + {0xEB87, 0x96F5}, //18800 #CJK UNIFIED IDEOGRAPH + {0xEB88, 0x96F8}, //18801 #CJK UNIFIED IDEOGRAPH + {0xEB89, 0x96FA}, //18802 #CJK UNIFIED IDEOGRAPH + {0xEB8A, 0x96FB}, //18803 #CJK UNIFIED IDEOGRAPH + {0xEB8B, 0x96FC}, //18804 #CJK UNIFIED IDEOGRAPH + {0xEB8C, 0x96FD}, //18805 #CJK UNIFIED IDEOGRAPH + {0xEB8D, 0x96FF}, //18806 #CJK UNIFIED IDEOGRAPH + {0xEB8E, 0x9702}, //18807 #CJK UNIFIED IDEOGRAPH + {0xEB8F, 0x9703}, //18808 #CJK UNIFIED IDEOGRAPH + {0xEB90, 0x9705}, //18809 #CJK UNIFIED IDEOGRAPH + {0xEB91, 0x970A}, //18810 #CJK UNIFIED IDEOGRAPH + {0xEB92, 0x970B}, //18811 #CJK UNIFIED IDEOGRAPH + {0xEB93, 0x970C}, //18812 #CJK UNIFIED IDEOGRAPH + {0xEB94, 0x9710}, //18813 #CJK UNIFIED IDEOGRAPH + {0xEB95, 0x9711}, //18814 #CJK UNIFIED IDEOGRAPH + {0xEB96, 0x9712}, //18815 #CJK UNIFIED IDEOGRAPH + {0xEB97, 0x9714}, //18816 #CJK UNIFIED IDEOGRAPH + {0xEB98, 0x9715}, //18817 #CJK UNIFIED IDEOGRAPH + {0xEB99, 0x9717}, //18818 #CJK UNIFIED IDEOGRAPH + {0xEB9A, 0x9718}, //18819 #CJK UNIFIED IDEOGRAPH + {0xEB9B, 0x9719}, //18820 #CJK UNIFIED IDEOGRAPH + {0xEB9C, 0x971A}, //18821 #CJK UNIFIED IDEOGRAPH + {0xEB9D, 0x971B}, //18822 #CJK UNIFIED IDEOGRAPH + {0xEB9E, 0x971D}, //18823 #CJK UNIFIED IDEOGRAPH + {0xEB9F, 0x971F}, //18824 #CJK UNIFIED IDEOGRAPH + {0xEBA0, 0x9720}, //18825 #CJK UNIFIED IDEOGRAPH + {0xEBA1, 0x643F}, //18826 #CJK UNIFIED IDEOGRAPH + {0xEBA2, 0x64D8}, //18827 #CJK UNIFIED IDEOGRAPH + {0xEBA3, 0x8004}, //18828 #CJK UNIFIED IDEOGRAPH + {0xEBA4, 0x6BEA}, //18829 #CJK UNIFIED IDEOGRAPH + {0xEBA5, 0x6BF3}, //18830 #CJK UNIFIED IDEOGRAPH + {0xEBA6, 0x6BFD}, //18831 #CJK UNIFIED IDEOGRAPH + {0xEBA7, 0x6BF5}, //18832 #CJK UNIFIED IDEOGRAPH + {0xEBA8, 0x6BF9}, //18833 #CJK UNIFIED IDEOGRAPH + {0xEBA9, 0x6C05}, //18834 #CJK UNIFIED IDEOGRAPH + {0xEBAA, 0x6C07}, //18835 #CJK UNIFIED IDEOGRAPH + {0xEBAB, 0x6C06}, //18836 #CJK UNIFIED IDEOGRAPH + {0xEBAC, 0x6C0D}, //18837 #CJK UNIFIED IDEOGRAPH + {0xEBAD, 0x6C15}, //18838 #CJK UNIFIED IDEOGRAPH + {0xEBAE, 0x6C18}, //18839 #CJK UNIFIED IDEOGRAPH + {0xEBAF, 0x6C19}, //18840 #CJK UNIFIED IDEOGRAPH + {0xEBB0, 0x6C1A}, //18841 #CJK UNIFIED IDEOGRAPH + {0xEBB1, 0x6C21}, //18842 #CJK UNIFIED IDEOGRAPH + {0xEBB2, 0x6C29}, //18843 #CJK UNIFIED IDEOGRAPH + {0xEBB3, 0x6C24}, //18844 #CJK UNIFIED IDEOGRAPH + {0xEBB4, 0x6C2A}, //18845 #CJK UNIFIED IDEOGRAPH + {0xEBB5, 0x6C32}, //18846 #CJK UNIFIED IDEOGRAPH + {0xEBB6, 0x6535}, //18847 #CJK UNIFIED IDEOGRAPH + {0xEBB7, 0x6555}, //18848 #CJK UNIFIED IDEOGRAPH + {0xEBB8, 0x656B}, //18849 #CJK UNIFIED IDEOGRAPH + {0xEBB9, 0x724D}, //18850 #CJK UNIFIED IDEOGRAPH + {0xEBBA, 0x7252}, //18851 #CJK UNIFIED IDEOGRAPH + {0xEBBB, 0x7256}, //18852 #CJK UNIFIED IDEOGRAPH + {0xEBBC, 0x7230}, //18853 #CJK UNIFIED IDEOGRAPH + {0xEBBD, 0x8662}, //18854 #CJK UNIFIED IDEOGRAPH + {0xEBBE, 0x5216}, //18855 #CJK UNIFIED IDEOGRAPH + {0xEBBF, 0x809F}, //18856 #CJK UNIFIED IDEOGRAPH + {0xEBC0, 0x809C}, //18857 #CJK UNIFIED IDEOGRAPH + {0xEBC1, 0x8093}, //18858 #CJK UNIFIED IDEOGRAPH + {0xEBC2, 0x80BC}, //18859 #CJK UNIFIED IDEOGRAPH + {0xEBC3, 0x670A}, //18860 #CJK UNIFIED IDEOGRAPH + {0xEBC4, 0x80BD}, //18861 #CJK UNIFIED IDEOGRAPH + {0xEBC5, 0x80B1}, //18862 #CJK UNIFIED IDEOGRAPH + {0xEBC6, 0x80AB}, //18863 #CJK UNIFIED IDEOGRAPH + {0xEBC7, 0x80AD}, //18864 #CJK UNIFIED IDEOGRAPH + {0xEBC8, 0x80B4}, //18865 #CJK UNIFIED IDEOGRAPH + {0xEBC9, 0x80B7}, //18866 #CJK UNIFIED IDEOGRAPH + {0xEBCA, 0x80E7}, //18867 #CJK UNIFIED IDEOGRAPH + {0xEBCB, 0x80E8}, //18868 #CJK UNIFIED IDEOGRAPH + {0xEBCC, 0x80E9}, //18869 #CJK UNIFIED IDEOGRAPH + {0xEBCD, 0x80EA}, //18870 #CJK UNIFIED IDEOGRAPH + {0xEBCE, 0x80DB}, //18871 #CJK UNIFIED IDEOGRAPH + {0xEBCF, 0x80C2}, //18872 #CJK UNIFIED IDEOGRAPH + {0xEBD0, 0x80C4}, //18873 #CJK UNIFIED IDEOGRAPH + {0xEBD1, 0x80D9}, //18874 #CJK UNIFIED IDEOGRAPH + {0xEBD2, 0x80CD}, //18875 #CJK UNIFIED IDEOGRAPH + {0xEBD3, 0x80D7}, //18876 #CJK UNIFIED IDEOGRAPH + {0xEBD4, 0x6710}, //18877 #CJK UNIFIED IDEOGRAPH + {0xEBD5, 0x80DD}, //18878 #CJK UNIFIED IDEOGRAPH + {0xEBD6, 0x80EB}, //18879 #CJK UNIFIED IDEOGRAPH + {0xEBD7, 0x80F1}, //18880 #CJK UNIFIED IDEOGRAPH + {0xEBD8, 0x80F4}, //18881 #CJK UNIFIED IDEOGRAPH + {0xEBD9, 0x80ED}, //18882 #CJK UNIFIED IDEOGRAPH + {0xEBDA, 0x810D}, //18883 #CJK UNIFIED IDEOGRAPH + {0xEBDB, 0x810E}, //18884 #CJK UNIFIED IDEOGRAPH + {0xEBDC, 0x80F2}, //18885 #CJK UNIFIED IDEOGRAPH + {0xEBDD, 0x80FC}, //18886 #CJK UNIFIED IDEOGRAPH + {0xEBDE, 0x6715}, //18887 #CJK UNIFIED IDEOGRAPH + {0xEBDF, 0x8112}, //18888 #CJK UNIFIED IDEOGRAPH + {0xEBE0, 0x8C5A}, //18889 #CJK UNIFIED IDEOGRAPH + {0xEBE1, 0x8136}, //18890 #CJK UNIFIED IDEOGRAPH + {0xEBE2, 0x811E}, //18891 #CJK UNIFIED IDEOGRAPH + {0xEBE3, 0x812C}, //18892 #CJK UNIFIED IDEOGRAPH + {0xEBE4, 0x8118}, //18893 #CJK UNIFIED IDEOGRAPH + {0xEBE5, 0x8132}, //18894 #CJK UNIFIED IDEOGRAPH + {0xEBE6, 0x8148}, //18895 #CJK UNIFIED IDEOGRAPH + {0xEBE7, 0x814C}, //18896 #CJK UNIFIED IDEOGRAPH + {0xEBE8, 0x8153}, //18897 #CJK UNIFIED IDEOGRAPH + {0xEBE9, 0x8174}, //18898 #CJK UNIFIED IDEOGRAPH + {0xEBEA, 0x8159}, //18899 #CJK UNIFIED IDEOGRAPH + {0xEBEB, 0x815A}, //18900 #CJK UNIFIED IDEOGRAPH + {0xEBEC, 0x8171}, //18901 #CJK UNIFIED IDEOGRAPH + {0xEBED, 0x8160}, //18902 #CJK UNIFIED IDEOGRAPH + {0xEBEE, 0x8169}, //18903 #CJK UNIFIED IDEOGRAPH + {0xEBEF, 0x817C}, //18904 #CJK UNIFIED IDEOGRAPH + {0xEBF0, 0x817D}, //18905 #CJK UNIFIED IDEOGRAPH + {0xEBF1, 0x816D}, //18906 #CJK UNIFIED IDEOGRAPH + {0xEBF2, 0x8167}, //18907 #CJK UNIFIED IDEOGRAPH + {0xEBF3, 0x584D}, //18908 #CJK UNIFIED IDEOGRAPH + {0xEBF4, 0x5AB5}, //18909 #CJK UNIFIED IDEOGRAPH + {0xEBF5, 0x8188}, //18910 #CJK UNIFIED IDEOGRAPH + {0xEBF6, 0x8182}, //18911 #CJK UNIFIED IDEOGRAPH + {0xEBF7, 0x8191}, //18912 #CJK UNIFIED IDEOGRAPH + {0xEBF8, 0x6ED5}, //18913 #CJK UNIFIED IDEOGRAPH + {0xEBF9, 0x81A3}, //18914 #CJK UNIFIED IDEOGRAPH + {0xEBFA, 0x81AA}, //18915 #CJK UNIFIED IDEOGRAPH + {0xEBFB, 0x81CC}, //18916 #CJK UNIFIED IDEOGRAPH + {0xEBFC, 0x6726}, //18917 #CJK UNIFIED IDEOGRAPH + {0xEBFD, 0x81CA}, //18918 #CJK UNIFIED IDEOGRAPH + {0xEBFE, 0x81BB}, //18919 #CJK UNIFIED IDEOGRAPH + {0xEC40, 0x9721}, //18920 #CJK UNIFIED IDEOGRAPH + {0xEC41, 0x9722}, //18921 #CJK UNIFIED IDEOGRAPH + {0xEC42, 0x9723}, //18922 #CJK UNIFIED IDEOGRAPH + {0xEC43, 0x9724}, //18923 #CJK UNIFIED IDEOGRAPH + {0xEC44, 0x9725}, //18924 #CJK UNIFIED IDEOGRAPH + {0xEC45, 0x9726}, //18925 #CJK UNIFIED IDEOGRAPH + {0xEC46, 0x9727}, //18926 #CJK UNIFIED IDEOGRAPH + {0xEC47, 0x9728}, //18927 #CJK UNIFIED IDEOGRAPH + {0xEC48, 0x9729}, //18928 #CJK UNIFIED IDEOGRAPH + {0xEC49, 0x972B}, //18929 #CJK UNIFIED IDEOGRAPH + {0xEC4A, 0x972C}, //18930 #CJK UNIFIED IDEOGRAPH + {0xEC4B, 0x972E}, //18931 #CJK UNIFIED IDEOGRAPH + {0xEC4C, 0x972F}, //18932 #CJK UNIFIED IDEOGRAPH + {0xEC4D, 0x9731}, //18933 #CJK UNIFIED IDEOGRAPH + {0xEC4E, 0x9733}, //18934 #CJK UNIFIED IDEOGRAPH + {0xEC4F, 0x9734}, //18935 #CJK UNIFIED IDEOGRAPH + {0xEC50, 0x9735}, //18936 #CJK UNIFIED IDEOGRAPH + {0xEC51, 0x9736}, //18937 #CJK UNIFIED IDEOGRAPH + {0xEC52, 0x9737}, //18938 #CJK UNIFIED IDEOGRAPH + {0xEC53, 0x973A}, //18939 #CJK UNIFIED IDEOGRAPH + {0xEC54, 0x973B}, //18940 #CJK UNIFIED IDEOGRAPH + {0xEC55, 0x973C}, //18941 #CJK UNIFIED IDEOGRAPH + {0xEC56, 0x973D}, //18942 #CJK UNIFIED IDEOGRAPH + {0xEC57, 0x973F}, //18943 #CJK UNIFIED IDEOGRAPH + {0xEC58, 0x9740}, //18944 #CJK UNIFIED IDEOGRAPH + {0xEC59, 0x9741}, //18945 #CJK UNIFIED IDEOGRAPH + {0xEC5A, 0x9742}, //18946 #CJK UNIFIED IDEOGRAPH + {0xEC5B, 0x9743}, //18947 #CJK UNIFIED IDEOGRAPH + {0xEC5C, 0x9744}, //18948 #CJK UNIFIED IDEOGRAPH + {0xEC5D, 0x9745}, //18949 #CJK UNIFIED IDEOGRAPH + {0xEC5E, 0x9746}, //18950 #CJK UNIFIED IDEOGRAPH + {0xEC5F, 0x9747}, //18951 #CJK UNIFIED IDEOGRAPH + {0xEC60, 0x9748}, //18952 #CJK UNIFIED IDEOGRAPH + {0xEC61, 0x9749}, //18953 #CJK UNIFIED IDEOGRAPH + {0xEC62, 0x974A}, //18954 #CJK UNIFIED IDEOGRAPH + {0xEC63, 0x974B}, //18955 #CJK UNIFIED IDEOGRAPH + {0xEC64, 0x974C}, //18956 #CJK UNIFIED IDEOGRAPH + {0xEC65, 0x974D}, //18957 #CJK UNIFIED IDEOGRAPH + {0xEC66, 0x974E}, //18958 #CJK UNIFIED IDEOGRAPH + {0xEC67, 0x974F}, //18959 #CJK UNIFIED IDEOGRAPH + {0xEC68, 0x9750}, //18960 #CJK UNIFIED IDEOGRAPH + {0xEC69, 0x9751}, //18961 #CJK UNIFIED IDEOGRAPH + {0xEC6A, 0x9754}, //18962 #CJK UNIFIED IDEOGRAPH + {0xEC6B, 0x9755}, //18963 #CJK UNIFIED IDEOGRAPH + {0xEC6C, 0x9757}, //18964 #CJK UNIFIED IDEOGRAPH + {0xEC6D, 0x9758}, //18965 #CJK UNIFIED IDEOGRAPH + {0xEC6E, 0x975A}, //18966 #CJK UNIFIED IDEOGRAPH + {0xEC6F, 0x975C}, //18967 #CJK UNIFIED IDEOGRAPH + {0xEC70, 0x975D}, //18968 #CJK UNIFIED IDEOGRAPH + {0xEC71, 0x975F}, //18969 #CJK UNIFIED IDEOGRAPH + {0xEC72, 0x9763}, //18970 #CJK UNIFIED IDEOGRAPH + {0xEC73, 0x9764}, //18971 #CJK UNIFIED IDEOGRAPH + {0xEC74, 0x9766}, //18972 #CJK UNIFIED IDEOGRAPH + {0xEC75, 0x9767}, //18973 #CJK UNIFIED IDEOGRAPH + {0xEC76, 0x9768}, //18974 #CJK UNIFIED IDEOGRAPH + {0xEC77, 0x976A}, //18975 #CJK UNIFIED IDEOGRAPH + {0xEC78, 0x976B}, //18976 #CJK UNIFIED IDEOGRAPH + {0xEC79, 0x976C}, //18977 #CJK UNIFIED IDEOGRAPH + {0xEC7A, 0x976D}, //18978 #CJK UNIFIED IDEOGRAPH + {0xEC7B, 0x976E}, //18979 #CJK UNIFIED IDEOGRAPH + {0xEC7C, 0x976F}, //18980 #CJK UNIFIED IDEOGRAPH + {0xEC7D, 0x9770}, //18981 #CJK UNIFIED IDEOGRAPH + {0xEC7E, 0x9771}, //18982 #CJK UNIFIED IDEOGRAPH + {0xEC80, 0x9772}, //18983 #CJK UNIFIED IDEOGRAPH + {0xEC81, 0x9775}, //18984 #CJK UNIFIED IDEOGRAPH + {0xEC82, 0x9777}, //18985 #CJK UNIFIED IDEOGRAPH + {0xEC83, 0x9778}, //18986 #CJK UNIFIED IDEOGRAPH + {0xEC84, 0x9779}, //18987 #CJK UNIFIED IDEOGRAPH + {0xEC85, 0x977A}, //18988 #CJK UNIFIED IDEOGRAPH + {0xEC86, 0x977B}, //18989 #CJK UNIFIED IDEOGRAPH + {0xEC87, 0x977D}, //18990 #CJK UNIFIED IDEOGRAPH + {0xEC88, 0x977E}, //18991 #CJK UNIFIED IDEOGRAPH + {0xEC89, 0x977F}, //18992 #CJK UNIFIED IDEOGRAPH + {0xEC8A, 0x9780}, //18993 #CJK UNIFIED IDEOGRAPH + {0xEC8B, 0x9781}, //18994 #CJK UNIFIED IDEOGRAPH + {0xEC8C, 0x9782}, //18995 #CJK UNIFIED IDEOGRAPH + {0xEC8D, 0x9783}, //18996 #CJK UNIFIED IDEOGRAPH + {0xEC8E, 0x9784}, //18997 #CJK UNIFIED IDEOGRAPH + {0xEC8F, 0x9786}, //18998 #CJK UNIFIED IDEOGRAPH + {0xEC90, 0x9787}, //18999 #CJK UNIFIED IDEOGRAPH + {0xEC91, 0x9788}, //19000 #CJK UNIFIED IDEOGRAPH + {0xEC92, 0x9789}, //19001 #CJK UNIFIED IDEOGRAPH + {0xEC93, 0x978A}, //19002 #CJK UNIFIED IDEOGRAPH + {0xEC94, 0x978C}, //19003 #CJK UNIFIED IDEOGRAPH + {0xEC95, 0x978E}, //19004 #CJK UNIFIED IDEOGRAPH + {0xEC96, 0x978F}, //19005 #CJK UNIFIED IDEOGRAPH + {0xEC97, 0x9790}, //19006 #CJK UNIFIED IDEOGRAPH + {0xEC98, 0x9793}, //19007 #CJK UNIFIED IDEOGRAPH + {0xEC99, 0x9795}, //19008 #CJK UNIFIED IDEOGRAPH + {0xEC9A, 0x9796}, //19009 #CJK UNIFIED IDEOGRAPH + {0xEC9B, 0x9797}, //19010 #CJK UNIFIED IDEOGRAPH + {0xEC9C, 0x9799}, //19011 #CJK UNIFIED IDEOGRAPH + {0xEC9D, 0x979A}, //19012 #CJK UNIFIED IDEOGRAPH + {0xEC9E, 0x979B}, //19013 #CJK UNIFIED IDEOGRAPH + {0xEC9F, 0x979C}, //19014 #CJK UNIFIED IDEOGRAPH + {0xECA0, 0x979D}, //19015 #CJK UNIFIED IDEOGRAPH + {0xECA1, 0x81C1}, //19016 #CJK UNIFIED IDEOGRAPH + {0xECA2, 0x81A6}, //19017 #CJK UNIFIED IDEOGRAPH + {0xECA3, 0x6B24}, //19018 #CJK UNIFIED IDEOGRAPH + {0xECA4, 0x6B37}, //19019 #CJK UNIFIED IDEOGRAPH + {0xECA5, 0x6B39}, //19020 #CJK UNIFIED IDEOGRAPH + {0xECA6, 0x6B43}, //19021 #CJK UNIFIED IDEOGRAPH + {0xECA7, 0x6B46}, //19022 #CJK UNIFIED IDEOGRAPH + {0xECA8, 0x6B59}, //19023 #CJK UNIFIED IDEOGRAPH + {0xECA9, 0x98D1}, //19024 #CJK UNIFIED IDEOGRAPH + {0xECAA, 0x98D2}, //19025 #CJK UNIFIED IDEOGRAPH + {0xECAB, 0x98D3}, //19026 #CJK UNIFIED IDEOGRAPH + {0xECAC, 0x98D5}, //19027 #CJK UNIFIED IDEOGRAPH + {0xECAD, 0x98D9}, //19028 #CJK UNIFIED IDEOGRAPH + {0xECAE, 0x98DA}, //19029 #CJK UNIFIED IDEOGRAPH + {0xECAF, 0x6BB3}, //19030 #CJK UNIFIED IDEOGRAPH + {0xECB0, 0x5F40}, //19031 #CJK UNIFIED IDEOGRAPH + {0xECB1, 0x6BC2}, //19032 #CJK UNIFIED IDEOGRAPH + {0xECB2, 0x89F3}, //19033 #CJK UNIFIED IDEOGRAPH + {0xECB3, 0x6590}, //19034 #CJK UNIFIED IDEOGRAPH + {0xECB4, 0x9F51}, //19035 #CJK UNIFIED IDEOGRAPH + {0xECB5, 0x6593}, //19036 #CJK UNIFIED IDEOGRAPH + {0xECB6, 0x65BC}, //19037 #CJK UNIFIED IDEOGRAPH + {0xECB7, 0x65C6}, //19038 #CJK UNIFIED IDEOGRAPH + {0xECB8, 0x65C4}, //19039 #CJK UNIFIED IDEOGRAPH + {0xECB9, 0x65C3}, //19040 #CJK UNIFIED IDEOGRAPH + {0xECBA, 0x65CC}, //19041 #CJK UNIFIED IDEOGRAPH + {0xECBB, 0x65CE}, //19042 #CJK UNIFIED IDEOGRAPH + {0xECBC, 0x65D2}, //19043 #CJK UNIFIED IDEOGRAPH + {0xECBD, 0x65D6}, //19044 #CJK UNIFIED IDEOGRAPH + {0xECBE, 0x7080}, //19045 #CJK UNIFIED IDEOGRAPH + {0xECBF, 0x709C}, //19046 #CJK UNIFIED IDEOGRAPH + {0xECC0, 0x7096}, //19047 #CJK UNIFIED IDEOGRAPH + {0xECC1, 0x709D}, //19048 #CJK UNIFIED IDEOGRAPH + {0xECC2, 0x70BB}, //19049 #CJK UNIFIED IDEOGRAPH + {0xECC3, 0x70C0}, //19050 #CJK UNIFIED IDEOGRAPH + {0xECC4, 0x70B7}, //19051 #CJK UNIFIED IDEOGRAPH + {0xECC5, 0x70AB}, //19052 #CJK UNIFIED IDEOGRAPH + {0xECC6, 0x70B1}, //19053 #CJK UNIFIED IDEOGRAPH + {0xECC7, 0x70E8}, //19054 #CJK UNIFIED IDEOGRAPH + {0xECC8, 0x70CA}, //19055 #CJK UNIFIED IDEOGRAPH + {0xECC9, 0x7110}, //19056 #CJK UNIFIED IDEOGRAPH + {0xECCA, 0x7113}, //19057 #CJK UNIFIED IDEOGRAPH + {0xECCB, 0x7116}, //19058 #CJK UNIFIED IDEOGRAPH + {0xECCC, 0x712F}, //19059 #CJK UNIFIED IDEOGRAPH + {0xECCD, 0x7131}, //19060 #CJK UNIFIED IDEOGRAPH + {0xECCE, 0x7173}, //19061 #CJK UNIFIED IDEOGRAPH + {0xECCF, 0x715C}, //19062 #CJK UNIFIED IDEOGRAPH + {0xECD0, 0x7168}, //19063 #CJK UNIFIED IDEOGRAPH + {0xECD1, 0x7145}, //19064 #CJK UNIFIED IDEOGRAPH + {0xECD2, 0x7172}, //19065 #CJK UNIFIED IDEOGRAPH + {0xECD3, 0x714A}, //19066 #CJK UNIFIED IDEOGRAPH + {0xECD4, 0x7178}, //19067 #CJK UNIFIED IDEOGRAPH + {0xECD5, 0x717A}, //19068 #CJK UNIFIED IDEOGRAPH + {0xECD6, 0x7198}, //19069 #CJK UNIFIED IDEOGRAPH + {0xECD7, 0x71B3}, //19070 #CJK UNIFIED IDEOGRAPH + {0xECD8, 0x71B5}, //19071 #CJK UNIFIED IDEOGRAPH + {0xECD9, 0x71A8}, //19072 #CJK UNIFIED IDEOGRAPH + {0xECDA, 0x71A0}, //19073 #CJK UNIFIED IDEOGRAPH + {0xECDB, 0x71E0}, //19074 #CJK UNIFIED IDEOGRAPH + {0xECDC, 0x71D4}, //19075 #CJK UNIFIED IDEOGRAPH + {0xECDD, 0x71E7}, //19076 #CJK UNIFIED IDEOGRAPH + {0xECDE, 0x71F9}, //19077 #CJK UNIFIED IDEOGRAPH + {0xECDF, 0x721D}, //19078 #CJK UNIFIED IDEOGRAPH + {0xECE0, 0x7228}, //19079 #CJK UNIFIED IDEOGRAPH + {0xECE1, 0x706C}, //19080 #CJK UNIFIED IDEOGRAPH + {0xECE2, 0x7118}, //19081 #CJK UNIFIED IDEOGRAPH + {0xECE3, 0x7166}, //19082 #CJK UNIFIED IDEOGRAPH + {0xECE4, 0x71B9}, //19083 #CJK UNIFIED IDEOGRAPH + {0xECE5, 0x623E}, //19084 #CJK UNIFIED IDEOGRAPH + {0xECE6, 0x623D}, //19085 #CJK UNIFIED IDEOGRAPH + {0xECE7, 0x6243}, //19086 #CJK UNIFIED IDEOGRAPH + {0xECE8, 0x6248}, //19087 #CJK UNIFIED IDEOGRAPH + {0xECE9, 0x6249}, //19088 #CJK UNIFIED IDEOGRAPH + {0xECEA, 0x793B}, //19089 #CJK UNIFIED IDEOGRAPH + {0xECEB, 0x7940}, //19090 #CJK UNIFIED IDEOGRAPH + {0xECEC, 0x7946}, //19091 #CJK UNIFIED IDEOGRAPH + {0xECED, 0x7949}, //19092 #CJK UNIFIED IDEOGRAPH + {0xECEE, 0x795B}, //19093 #CJK UNIFIED IDEOGRAPH + {0xECEF, 0x795C}, //19094 #CJK UNIFIED IDEOGRAPH + {0xECF0, 0x7953}, //19095 #CJK UNIFIED IDEOGRAPH + {0xECF1, 0x795A}, //19096 #CJK UNIFIED IDEOGRAPH + {0xECF2, 0x7962}, //19097 #CJK UNIFIED IDEOGRAPH + {0xECF3, 0x7957}, //19098 #CJK UNIFIED IDEOGRAPH + {0xECF4, 0x7960}, //19099 #CJK UNIFIED IDEOGRAPH + {0xECF5, 0x796F}, //19100 #CJK UNIFIED IDEOGRAPH + {0xECF6, 0x7967}, //19101 #CJK UNIFIED IDEOGRAPH + {0xECF7, 0x797A}, //19102 #CJK UNIFIED IDEOGRAPH + {0xECF8, 0x7985}, //19103 #CJK UNIFIED IDEOGRAPH + {0xECF9, 0x798A}, //19104 #CJK UNIFIED IDEOGRAPH + {0xECFA, 0x799A}, //19105 #CJK UNIFIED IDEOGRAPH + {0xECFB, 0x79A7}, //19106 #CJK UNIFIED IDEOGRAPH + {0xECFC, 0x79B3}, //19107 #CJK UNIFIED IDEOGRAPH + {0xECFD, 0x5FD1}, //19108 #CJK UNIFIED IDEOGRAPH + {0xECFE, 0x5FD0}, //19109 #CJK UNIFIED IDEOGRAPH + {0xED40, 0x979E}, //19110 #CJK UNIFIED IDEOGRAPH + {0xED41, 0x979F}, //19111 #CJK UNIFIED IDEOGRAPH + {0xED42, 0x97A1}, //19112 #CJK UNIFIED IDEOGRAPH + {0xED43, 0x97A2}, //19113 #CJK UNIFIED IDEOGRAPH + {0xED44, 0x97A4}, //19114 #CJK UNIFIED IDEOGRAPH + {0xED45, 0x97A5}, //19115 #CJK UNIFIED IDEOGRAPH + {0xED46, 0x97A6}, //19116 #CJK UNIFIED IDEOGRAPH + {0xED47, 0x97A7}, //19117 #CJK UNIFIED IDEOGRAPH + {0xED48, 0x97A8}, //19118 #CJK UNIFIED IDEOGRAPH + {0xED49, 0x97A9}, //19119 #CJK UNIFIED IDEOGRAPH + {0xED4A, 0x97AA}, //19120 #CJK UNIFIED IDEOGRAPH + {0xED4B, 0x97AC}, //19121 #CJK UNIFIED IDEOGRAPH + {0xED4C, 0x97AE}, //19122 #CJK UNIFIED IDEOGRAPH + {0xED4D, 0x97B0}, //19123 #CJK UNIFIED IDEOGRAPH + {0xED4E, 0x97B1}, //19124 #CJK UNIFIED IDEOGRAPH + {0xED4F, 0x97B3}, //19125 #CJK UNIFIED IDEOGRAPH + {0xED50, 0x97B5}, //19126 #CJK UNIFIED IDEOGRAPH + {0xED51, 0x97B6}, //19127 #CJK UNIFIED IDEOGRAPH + {0xED52, 0x97B7}, //19128 #CJK UNIFIED IDEOGRAPH + {0xED53, 0x97B8}, //19129 #CJK UNIFIED IDEOGRAPH + {0xED54, 0x97B9}, //19130 #CJK UNIFIED IDEOGRAPH + {0xED55, 0x97BA}, //19131 #CJK UNIFIED IDEOGRAPH + {0xED56, 0x97BB}, //19132 #CJK UNIFIED IDEOGRAPH + {0xED57, 0x97BC}, //19133 #CJK UNIFIED IDEOGRAPH + {0xED58, 0x97BD}, //19134 #CJK UNIFIED IDEOGRAPH + {0xED59, 0x97BE}, //19135 #CJK UNIFIED IDEOGRAPH + {0xED5A, 0x97BF}, //19136 #CJK UNIFIED IDEOGRAPH + {0xED5B, 0x97C0}, //19137 #CJK UNIFIED IDEOGRAPH + {0xED5C, 0x97C1}, //19138 #CJK UNIFIED IDEOGRAPH + {0xED5D, 0x97C2}, //19139 #CJK UNIFIED IDEOGRAPH + {0xED5E, 0x97C3}, //19140 #CJK UNIFIED IDEOGRAPH + {0xED5F, 0x97C4}, //19141 #CJK UNIFIED IDEOGRAPH + {0xED60, 0x97C5}, //19142 #CJK UNIFIED IDEOGRAPH + {0xED61, 0x97C6}, //19143 #CJK UNIFIED IDEOGRAPH + {0xED62, 0x97C7}, //19144 #CJK UNIFIED IDEOGRAPH + {0xED63, 0x97C8}, //19145 #CJK UNIFIED IDEOGRAPH + {0xED64, 0x97C9}, //19146 #CJK UNIFIED IDEOGRAPH + {0xED65, 0x97CA}, //19147 #CJK UNIFIED IDEOGRAPH + {0xED66, 0x97CB}, //19148 #CJK UNIFIED IDEOGRAPH + {0xED67, 0x97CC}, //19149 #CJK UNIFIED IDEOGRAPH + {0xED68, 0x97CD}, //19150 #CJK UNIFIED IDEOGRAPH + {0xED69, 0x97CE}, //19151 #CJK UNIFIED IDEOGRAPH + {0xED6A, 0x97CF}, //19152 #CJK UNIFIED IDEOGRAPH + {0xED6B, 0x97D0}, //19153 #CJK UNIFIED IDEOGRAPH + {0xED6C, 0x97D1}, //19154 #CJK UNIFIED IDEOGRAPH + {0xED6D, 0x97D2}, //19155 #CJK UNIFIED IDEOGRAPH + {0xED6E, 0x97D3}, //19156 #CJK UNIFIED IDEOGRAPH + {0xED6F, 0x97D4}, //19157 #CJK UNIFIED IDEOGRAPH + {0xED70, 0x97D5}, //19158 #CJK UNIFIED IDEOGRAPH + {0xED71, 0x97D6}, //19159 #CJK UNIFIED IDEOGRAPH + {0xED72, 0x97D7}, //19160 #CJK UNIFIED IDEOGRAPH + {0xED73, 0x97D8}, //19161 #CJK UNIFIED IDEOGRAPH + {0xED74, 0x97D9}, //19162 #CJK UNIFIED IDEOGRAPH + {0xED75, 0x97DA}, //19163 #CJK UNIFIED IDEOGRAPH + {0xED76, 0x97DB}, //19164 #CJK UNIFIED IDEOGRAPH + {0xED77, 0x97DC}, //19165 #CJK UNIFIED IDEOGRAPH + {0xED78, 0x97DD}, //19166 #CJK UNIFIED IDEOGRAPH + {0xED79, 0x97DE}, //19167 #CJK UNIFIED IDEOGRAPH + {0xED7A, 0x97DF}, //19168 #CJK UNIFIED IDEOGRAPH + {0xED7B, 0x97E0}, //19169 #CJK UNIFIED IDEOGRAPH + {0xED7C, 0x97E1}, //19170 #CJK UNIFIED IDEOGRAPH + {0xED7D, 0x97E2}, //19171 #CJK UNIFIED IDEOGRAPH + {0xED7E, 0x97E3}, //19172 #CJK UNIFIED IDEOGRAPH + {0xED80, 0x97E4}, //19173 #CJK UNIFIED IDEOGRAPH + {0xED81, 0x97E5}, //19174 #CJK UNIFIED IDEOGRAPH + {0xED82, 0x97E8}, //19175 #CJK UNIFIED IDEOGRAPH + {0xED83, 0x97EE}, //19176 #CJK UNIFIED IDEOGRAPH + {0xED84, 0x97EF}, //19177 #CJK UNIFIED IDEOGRAPH + {0xED85, 0x97F0}, //19178 #CJK UNIFIED IDEOGRAPH + {0xED86, 0x97F1}, //19179 #CJK UNIFIED IDEOGRAPH + {0xED87, 0x97F2}, //19180 #CJK UNIFIED IDEOGRAPH + {0xED88, 0x97F4}, //19181 #CJK UNIFIED IDEOGRAPH + {0xED89, 0x97F7}, //19182 #CJK UNIFIED IDEOGRAPH + {0xED8A, 0x97F8}, //19183 #CJK UNIFIED IDEOGRAPH + {0xED8B, 0x97F9}, //19184 #CJK UNIFIED IDEOGRAPH + {0xED8C, 0x97FA}, //19185 #CJK UNIFIED IDEOGRAPH + {0xED8D, 0x97FB}, //19186 #CJK UNIFIED IDEOGRAPH + {0xED8E, 0x97FC}, //19187 #CJK UNIFIED IDEOGRAPH + {0xED8F, 0x97FD}, //19188 #CJK UNIFIED IDEOGRAPH + {0xED90, 0x97FE}, //19189 #CJK UNIFIED IDEOGRAPH + {0xED91, 0x97FF}, //19190 #CJK UNIFIED IDEOGRAPH + {0xED92, 0x9800}, //19191 #CJK UNIFIED IDEOGRAPH + {0xED93, 0x9801}, //19192 #CJK UNIFIED IDEOGRAPH + {0xED94, 0x9802}, //19193 #CJK UNIFIED IDEOGRAPH + {0xED95, 0x9803}, //19194 #CJK UNIFIED IDEOGRAPH + {0xED96, 0x9804}, //19195 #CJK UNIFIED IDEOGRAPH + {0xED97, 0x9805}, //19196 #CJK UNIFIED IDEOGRAPH + {0xED98, 0x9806}, //19197 #CJK UNIFIED IDEOGRAPH + {0xED99, 0x9807}, //19198 #CJK UNIFIED IDEOGRAPH + {0xED9A, 0x9808}, //19199 #CJK UNIFIED IDEOGRAPH + {0xED9B, 0x9809}, //19200 #CJK UNIFIED IDEOGRAPH + {0xED9C, 0x980A}, //19201 #CJK UNIFIED IDEOGRAPH + {0xED9D, 0x980B}, //19202 #CJK UNIFIED IDEOGRAPH + {0xED9E, 0x980C}, //19203 #CJK UNIFIED IDEOGRAPH + {0xED9F, 0x980D}, //19204 #CJK UNIFIED IDEOGRAPH + {0xEDA0, 0x980E}, //19205 #CJK UNIFIED IDEOGRAPH + {0xEDA1, 0x603C}, //19206 #CJK UNIFIED IDEOGRAPH + {0xEDA2, 0x605D}, //19207 #CJK UNIFIED IDEOGRAPH + {0xEDA3, 0x605A}, //19208 #CJK UNIFIED IDEOGRAPH + {0xEDA4, 0x6067}, //19209 #CJK UNIFIED IDEOGRAPH + {0xEDA5, 0x6041}, //19210 #CJK UNIFIED IDEOGRAPH + {0xEDA6, 0x6059}, //19211 #CJK UNIFIED IDEOGRAPH + {0xEDA7, 0x6063}, //19212 #CJK UNIFIED IDEOGRAPH + {0xEDA8, 0x60AB}, //19213 #CJK UNIFIED IDEOGRAPH + {0xEDA9, 0x6106}, //19214 #CJK UNIFIED IDEOGRAPH + {0xEDAA, 0x610D}, //19215 #CJK UNIFIED IDEOGRAPH + {0xEDAB, 0x615D}, //19216 #CJK UNIFIED IDEOGRAPH + {0xEDAC, 0x61A9}, //19217 #CJK UNIFIED IDEOGRAPH + {0xEDAD, 0x619D}, //19218 #CJK UNIFIED IDEOGRAPH + {0xEDAE, 0x61CB}, //19219 #CJK UNIFIED IDEOGRAPH + {0xEDAF, 0x61D1}, //19220 #CJK UNIFIED IDEOGRAPH + {0xEDB0, 0x6206}, //19221 #CJK UNIFIED IDEOGRAPH + {0xEDB1, 0x8080}, //19222 #CJK UNIFIED IDEOGRAPH + {0xEDB2, 0x807F}, //19223 #CJK UNIFIED IDEOGRAPH + {0xEDB3, 0x6C93}, //19224 #CJK UNIFIED IDEOGRAPH + {0xEDB4, 0x6CF6}, //19225 #CJK UNIFIED IDEOGRAPH + {0xEDB5, 0x6DFC}, //19226 #CJK UNIFIED IDEOGRAPH + {0xEDB6, 0x77F6}, //19227 #CJK UNIFIED IDEOGRAPH + {0xEDB7, 0x77F8}, //19228 #CJK UNIFIED IDEOGRAPH + {0xEDB8, 0x7800}, //19229 #CJK UNIFIED IDEOGRAPH + {0xEDB9, 0x7809}, //19230 #CJK UNIFIED IDEOGRAPH + {0xEDBA, 0x7817}, //19231 #CJK UNIFIED IDEOGRAPH + {0xEDBB, 0x7818}, //19232 #CJK UNIFIED IDEOGRAPH + {0xEDBC, 0x7811}, //19233 #CJK UNIFIED IDEOGRAPH + {0xEDBD, 0x65AB}, //19234 #CJK UNIFIED IDEOGRAPH + {0xEDBE, 0x782D}, //19235 #CJK UNIFIED IDEOGRAPH + {0xEDBF, 0x781C}, //19236 #CJK UNIFIED IDEOGRAPH + {0xEDC0, 0x781D}, //19237 #CJK UNIFIED IDEOGRAPH + {0xEDC1, 0x7839}, //19238 #CJK UNIFIED IDEOGRAPH + {0xEDC2, 0x783A}, //19239 #CJK UNIFIED IDEOGRAPH + {0xEDC3, 0x783B}, //19240 #CJK UNIFIED IDEOGRAPH + {0xEDC4, 0x781F}, //19241 #CJK UNIFIED IDEOGRAPH + {0xEDC5, 0x783C}, //19242 #CJK UNIFIED IDEOGRAPH + {0xEDC6, 0x7825}, //19243 #CJK UNIFIED IDEOGRAPH + {0xEDC7, 0x782C}, //19244 #CJK UNIFIED IDEOGRAPH + {0xEDC8, 0x7823}, //19245 #CJK UNIFIED IDEOGRAPH + {0xEDC9, 0x7829}, //19246 #CJK UNIFIED IDEOGRAPH + {0xEDCA, 0x784E}, //19247 #CJK UNIFIED IDEOGRAPH + {0xEDCB, 0x786D}, //19248 #CJK UNIFIED IDEOGRAPH + {0xEDCC, 0x7856}, //19249 #CJK UNIFIED IDEOGRAPH + {0xEDCD, 0x7857}, //19250 #CJK UNIFIED IDEOGRAPH + {0xEDCE, 0x7826}, //19251 #CJK UNIFIED IDEOGRAPH + {0xEDCF, 0x7850}, //19252 #CJK UNIFIED IDEOGRAPH + {0xEDD0, 0x7847}, //19253 #CJK UNIFIED IDEOGRAPH + {0xEDD1, 0x784C}, //19254 #CJK UNIFIED IDEOGRAPH + {0xEDD2, 0x786A}, //19255 #CJK UNIFIED IDEOGRAPH + {0xEDD3, 0x789B}, //19256 #CJK UNIFIED IDEOGRAPH + {0xEDD4, 0x7893}, //19257 #CJK UNIFIED IDEOGRAPH + {0xEDD5, 0x789A}, //19258 #CJK UNIFIED IDEOGRAPH + {0xEDD6, 0x7887}, //19259 #CJK UNIFIED IDEOGRAPH + {0xEDD7, 0x789C}, //19260 #CJK UNIFIED IDEOGRAPH + {0xEDD8, 0x78A1}, //19261 #CJK UNIFIED IDEOGRAPH + {0xEDD9, 0x78A3}, //19262 #CJK UNIFIED IDEOGRAPH + {0xEDDA, 0x78B2}, //19263 #CJK UNIFIED IDEOGRAPH + {0xEDDB, 0x78B9}, //19264 #CJK UNIFIED IDEOGRAPH + {0xEDDC, 0x78A5}, //19265 #CJK UNIFIED IDEOGRAPH + {0xEDDD, 0x78D4}, //19266 #CJK UNIFIED IDEOGRAPH + {0xEDDE, 0x78D9}, //19267 #CJK UNIFIED IDEOGRAPH + {0xEDDF, 0x78C9}, //19268 #CJK UNIFIED IDEOGRAPH + {0xEDE0, 0x78EC}, //19269 #CJK UNIFIED IDEOGRAPH + {0xEDE1, 0x78F2}, //19270 #CJK UNIFIED IDEOGRAPH + {0xEDE2, 0x7905}, //19271 #CJK UNIFIED IDEOGRAPH + {0xEDE3, 0x78F4}, //19272 #CJK UNIFIED IDEOGRAPH + {0xEDE4, 0x7913}, //19273 #CJK UNIFIED IDEOGRAPH + {0xEDE5, 0x7924}, //19274 #CJK UNIFIED IDEOGRAPH + {0xEDE6, 0x791E}, //19275 #CJK UNIFIED IDEOGRAPH + {0xEDE7, 0x7934}, //19276 #CJK UNIFIED IDEOGRAPH + {0xEDE8, 0x9F9B}, //19277 #CJK UNIFIED IDEOGRAPH + {0xEDE9, 0x9EF9}, //19278 #CJK UNIFIED IDEOGRAPH + {0xEDEA, 0x9EFB}, //19279 #CJK UNIFIED IDEOGRAPH + {0xEDEB, 0x9EFC}, //19280 #CJK UNIFIED IDEOGRAPH + {0xEDEC, 0x76F1}, //19281 #CJK UNIFIED IDEOGRAPH + {0xEDED, 0x7704}, //19282 #CJK UNIFIED IDEOGRAPH + {0xEDEE, 0x770D}, //19283 #CJK UNIFIED IDEOGRAPH + {0xEDEF, 0x76F9}, //19284 #CJK UNIFIED IDEOGRAPH + {0xEDF0, 0x7707}, //19285 #CJK UNIFIED IDEOGRAPH + {0xEDF1, 0x7708}, //19286 #CJK UNIFIED IDEOGRAPH + {0xEDF2, 0x771A}, //19287 #CJK UNIFIED IDEOGRAPH + {0xEDF3, 0x7722}, //19288 #CJK UNIFIED IDEOGRAPH + {0xEDF4, 0x7719}, //19289 #CJK UNIFIED IDEOGRAPH + {0xEDF5, 0x772D}, //19290 #CJK UNIFIED IDEOGRAPH + {0xEDF6, 0x7726}, //19291 #CJK UNIFIED IDEOGRAPH + {0xEDF7, 0x7735}, //19292 #CJK UNIFIED IDEOGRAPH + {0xEDF8, 0x7738}, //19293 #CJK UNIFIED IDEOGRAPH + {0xEDF9, 0x7750}, //19294 #CJK UNIFIED IDEOGRAPH + {0xEDFA, 0x7751}, //19295 #CJK UNIFIED IDEOGRAPH + {0xEDFB, 0x7747}, //19296 #CJK UNIFIED IDEOGRAPH + {0xEDFC, 0x7743}, //19297 #CJK UNIFIED IDEOGRAPH + {0xEDFD, 0x775A}, //19298 #CJK UNIFIED IDEOGRAPH + {0xEDFE, 0x7768}, //19299 #CJK UNIFIED IDEOGRAPH + {0xEE40, 0x980F}, //19300 #CJK UNIFIED IDEOGRAPH + {0xEE41, 0x9810}, //19301 #CJK UNIFIED IDEOGRAPH + {0xEE42, 0x9811}, //19302 #CJK UNIFIED IDEOGRAPH + {0xEE43, 0x9812}, //19303 #CJK UNIFIED IDEOGRAPH + {0xEE44, 0x9813}, //19304 #CJK UNIFIED IDEOGRAPH + {0xEE45, 0x9814}, //19305 #CJK UNIFIED IDEOGRAPH + {0xEE46, 0x9815}, //19306 #CJK UNIFIED IDEOGRAPH + {0xEE47, 0x9816}, //19307 #CJK UNIFIED IDEOGRAPH + {0xEE48, 0x9817}, //19308 #CJK UNIFIED IDEOGRAPH + {0xEE49, 0x9818}, //19309 #CJK UNIFIED IDEOGRAPH + {0xEE4A, 0x9819}, //19310 #CJK UNIFIED IDEOGRAPH + {0xEE4B, 0x981A}, //19311 #CJK UNIFIED IDEOGRAPH + {0xEE4C, 0x981B}, //19312 #CJK UNIFIED IDEOGRAPH + {0xEE4D, 0x981C}, //19313 #CJK UNIFIED IDEOGRAPH + {0xEE4E, 0x981D}, //19314 #CJK UNIFIED IDEOGRAPH + {0xEE4F, 0x981E}, //19315 #CJK UNIFIED IDEOGRAPH + {0xEE50, 0x981F}, //19316 #CJK UNIFIED IDEOGRAPH + {0xEE51, 0x9820}, //19317 #CJK UNIFIED IDEOGRAPH + {0xEE52, 0x9821}, //19318 #CJK UNIFIED IDEOGRAPH + {0xEE53, 0x9822}, //19319 #CJK UNIFIED IDEOGRAPH + {0xEE54, 0x9823}, //19320 #CJK UNIFIED IDEOGRAPH + {0xEE55, 0x9824}, //19321 #CJK UNIFIED IDEOGRAPH + {0xEE56, 0x9825}, //19322 #CJK UNIFIED IDEOGRAPH + {0xEE57, 0x9826}, //19323 #CJK UNIFIED IDEOGRAPH + {0xEE58, 0x9827}, //19324 #CJK UNIFIED IDEOGRAPH + {0xEE59, 0x9828}, //19325 #CJK UNIFIED IDEOGRAPH + {0xEE5A, 0x9829}, //19326 #CJK UNIFIED IDEOGRAPH + {0xEE5B, 0x982A}, //19327 #CJK UNIFIED IDEOGRAPH + {0xEE5C, 0x982B}, //19328 #CJK UNIFIED IDEOGRAPH + {0xEE5D, 0x982C}, //19329 #CJK UNIFIED IDEOGRAPH + {0xEE5E, 0x982D}, //19330 #CJK UNIFIED IDEOGRAPH + {0xEE5F, 0x982E}, //19331 #CJK UNIFIED IDEOGRAPH + {0xEE60, 0x982F}, //19332 #CJK UNIFIED IDEOGRAPH + {0xEE61, 0x9830}, //19333 #CJK UNIFIED IDEOGRAPH + {0xEE62, 0x9831}, //19334 #CJK UNIFIED IDEOGRAPH + {0xEE63, 0x9832}, //19335 #CJK UNIFIED IDEOGRAPH + {0xEE64, 0x9833}, //19336 #CJK UNIFIED IDEOGRAPH + {0xEE65, 0x9834}, //19337 #CJK UNIFIED IDEOGRAPH + {0xEE66, 0x9835}, //19338 #CJK UNIFIED IDEOGRAPH + {0xEE67, 0x9836}, //19339 #CJK UNIFIED IDEOGRAPH + {0xEE68, 0x9837}, //19340 #CJK UNIFIED IDEOGRAPH + {0xEE69, 0x9838}, //19341 #CJK UNIFIED IDEOGRAPH + {0xEE6A, 0x9839}, //19342 #CJK UNIFIED IDEOGRAPH + {0xEE6B, 0x983A}, //19343 #CJK UNIFIED IDEOGRAPH + {0xEE6C, 0x983B}, //19344 #CJK UNIFIED IDEOGRAPH + {0xEE6D, 0x983C}, //19345 #CJK UNIFIED IDEOGRAPH + {0xEE6E, 0x983D}, //19346 #CJK UNIFIED IDEOGRAPH + {0xEE6F, 0x983E}, //19347 #CJK UNIFIED IDEOGRAPH + {0xEE70, 0x983F}, //19348 #CJK UNIFIED IDEOGRAPH + {0xEE71, 0x9840}, //19349 #CJK UNIFIED IDEOGRAPH + {0xEE72, 0x9841}, //19350 #CJK UNIFIED IDEOGRAPH + {0xEE73, 0x9842}, //19351 #CJK UNIFIED IDEOGRAPH + {0xEE74, 0x9843}, //19352 #CJK UNIFIED IDEOGRAPH + {0xEE75, 0x9844}, //19353 #CJK UNIFIED IDEOGRAPH + {0xEE76, 0x9845}, //19354 #CJK UNIFIED IDEOGRAPH + {0xEE77, 0x9846}, //19355 #CJK UNIFIED IDEOGRAPH + {0xEE78, 0x9847}, //19356 #CJK UNIFIED IDEOGRAPH + {0xEE79, 0x9848}, //19357 #CJK UNIFIED IDEOGRAPH + {0xEE7A, 0x9849}, //19358 #CJK UNIFIED IDEOGRAPH + {0xEE7B, 0x984A}, //19359 #CJK UNIFIED IDEOGRAPH + {0xEE7C, 0x984B}, //19360 #CJK UNIFIED IDEOGRAPH + {0xEE7D, 0x984C}, //19361 #CJK UNIFIED IDEOGRAPH + {0xEE7E, 0x984D}, //19362 #CJK UNIFIED IDEOGRAPH + {0xEE80, 0x984E}, //19363 #CJK UNIFIED IDEOGRAPH + {0xEE81, 0x984F}, //19364 #CJK UNIFIED IDEOGRAPH + {0xEE82, 0x9850}, //19365 #CJK UNIFIED IDEOGRAPH + {0xEE83, 0x9851}, //19366 #CJK UNIFIED IDEOGRAPH + {0xEE84, 0x9852}, //19367 #CJK UNIFIED IDEOGRAPH + {0xEE85, 0x9853}, //19368 #CJK UNIFIED IDEOGRAPH + {0xEE86, 0x9854}, //19369 #CJK UNIFIED IDEOGRAPH + {0xEE87, 0x9855}, //19370 #CJK UNIFIED IDEOGRAPH + {0xEE88, 0x9856}, //19371 #CJK UNIFIED IDEOGRAPH + {0xEE89, 0x9857}, //19372 #CJK UNIFIED IDEOGRAPH + {0xEE8A, 0x9858}, //19373 #CJK UNIFIED IDEOGRAPH + {0xEE8B, 0x9859}, //19374 #CJK UNIFIED IDEOGRAPH + {0xEE8C, 0x985A}, //19375 #CJK UNIFIED IDEOGRAPH + {0xEE8D, 0x985B}, //19376 #CJK UNIFIED IDEOGRAPH + {0xEE8E, 0x985C}, //19377 #CJK UNIFIED IDEOGRAPH + {0xEE8F, 0x985D}, //19378 #CJK UNIFIED IDEOGRAPH + {0xEE90, 0x985E}, //19379 #CJK UNIFIED IDEOGRAPH + {0xEE91, 0x985F}, //19380 #CJK UNIFIED IDEOGRAPH + {0xEE92, 0x9860}, //19381 #CJK UNIFIED IDEOGRAPH + {0xEE93, 0x9861}, //19382 #CJK UNIFIED IDEOGRAPH + {0xEE94, 0x9862}, //19383 #CJK UNIFIED IDEOGRAPH + {0xEE95, 0x9863}, //19384 #CJK UNIFIED IDEOGRAPH + {0xEE96, 0x9864}, //19385 #CJK UNIFIED IDEOGRAPH + {0xEE97, 0x9865}, //19386 #CJK UNIFIED IDEOGRAPH + {0xEE98, 0x9866}, //19387 #CJK UNIFIED IDEOGRAPH + {0xEE99, 0x9867}, //19388 #CJK UNIFIED IDEOGRAPH + {0xEE9A, 0x9868}, //19389 #CJK UNIFIED IDEOGRAPH + {0xEE9B, 0x9869}, //19390 #CJK UNIFIED IDEOGRAPH + {0xEE9C, 0x986A}, //19391 #CJK UNIFIED IDEOGRAPH + {0xEE9D, 0x986B}, //19392 #CJK UNIFIED IDEOGRAPH + {0xEE9E, 0x986C}, //19393 #CJK UNIFIED IDEOGRAPH + {0xEE9F, 0x986D}, //19394 #CJK UNIFIED IDEOGRAPH + {0xEEA0, 0x986E}, //19395 #CJK UNIFIED IDEOGRAPH + {0xEEA1, 0x7762}, //19396 #CJK UNIFIED IDEOGRAPH + {0xEEA2, 0x7765}, //19397 #CJK UNIFIED IDEOGRAPH + {0xEEA3, 0x777F}, //19398 #CJK UNIFIED IDEOGRAPH + {0xEEA4, 0x778D}, //19399 #CJK UNIFIED IDEOGRAPH + {0xEEA5, 0x777D}, //19400 #CJK UNIFIED IDEOGRAPH + {0xEEA6, 0x7780}, //19401 #CJK UNIFIED IDEOGRAPH + {0xEEA7, 0x778C}, //19402 #CJK UNIFIED IDEOGRAPH + {0xEEA8, 0x7791}, //19403 #CJK UNIFIED IDEOGRAPH + {0xEEA9, 0x779F}, //19404 #CJK UNIFIED IDEOGRAPH + {0xEEAA, 0x77A0}, //19405 #CJK UNIFIED IDEOGRAPH + {0xEEAB, 0x77B0}, //19406 #CJK UNIFIED IDEOGRAPH + {0xEEAC, 0x77B5}, //19407 #CJK UNIFIED IDEOGRAPH + {0xEEAD, 0x77BD}, //19408 #CJK UNIFIED IDEOGRAPH + {0xEEAE, 0x753A}, //19409 #CJK UNIFIED IDEOGRAPH + {0xEEAF, 0x7540}, //19410 #CJK UNIFIED IDEOGRAPH + {0xEEB0, 0x754E}, //19411 #CJK UNIFIED IDEOGRAPH + {0xEEB1, 0x754B}, //19412 #CJK UNIFIED IDEOGRAPH + {0xEEB2, 0x7548}, //19413 #CJK UNIFIED IDEOGRAPH + {0xEEB3, 0x755B}, //19414 #CJK UNIFIED IDEOGRAPH + {0xEEB4, 0x7572}, //19415 #CJK UNIFIED IDEOGRAPH + {0xEEB5, 0x7579}, //19416 #CJK UNIFIED IDEOGRAPH + {0xEEB6, 0x7583}, //19417 #CJK UNIFIED IDEOGRAPH + {0xEEB7, 0x7F58}, //19418 #CJK UNIFIED IDEOGRAPH + {0xEEB8, 0x7F61}, //19419 #CJK UNIFIED IDEOGRAPH + {0xEEB9, 0x7F5F}, //19420 #CJK UNIFIED IDEOGRAPH + {0xEEBA, 0x8A48}, //19421 #CJK UNIFIED IDEOGRAPH + {0xEEBB, 0x7F68}, //19422 #CJK UNIFIED IDEOGRAPH + {0xEEBC, 0x7F74}, //19423 #CJK UNIFIED IDEOGRAPH + {0xEEBD, 0x7F71}, //19424 #CJK UNIFIED IDEOGRAPH + {0xEEBE, 0x7F79}, //19425 #CJK UNIFIED IDEOGRAPH + {0xEEBF, 0x7F81}, //19426 #CJK UNIFIED IDEOGRAPH + {0xEEC0, 0x7F7E}, //19427 #CJK UNIFIED IDEOGRAPH + {0xEEC1, 0x76CD}, //19428 #CJK UNIFIED IDEOGRAPH + {0xEEC2, 0x76E5}, //19429 #CJK UNIFIED IDEOGRAPH + {0xEEC3, 0x8832}, //19430 #CJK UNIFIED IDEOGRAPH + {0xEEC4, 0x9485}, //19431 #CJK UNIFIED IDEOGRAPH + {0xEEC5, 0x9486}, //19432 #CJK UNIFIED IDEOGRAPH + {0xEEC6, 0x9487}, //19433 #CJK UNIFIED IDEOGRAPH + {0xEEC7, 0x948B}, //19434 #CJK UNIFIED IDEOGRAPH + {0xEEC8, 0x948A}, //19435 #CJK UNIFIED IDEOGRAPH + {0xEEC9, 0x948C}, //19436 #CJK UNIFIED IDEOGRAPH + {0xEECA, 0x948D}, //19437 #CJK UNIFIED IDEOGRAPH + {0xEECB, 0x948F}, //19438 #CJK UNIFIED IDEOGRAPH + {0xEECC, 0x9490}, //19439 #CJK UNIFIED IDEOGRAPH + {0xEECD, 0x9494}, //19440 #CJK UNIFIED IDEOGRAPH + {0xEECE, 0x9497}, //19441 #CJK UNIFIED IDEOGRAPH + {0xEECF, 0x9495}, //19442 #CJK UNIFIED IDEOGRAPH + {0xEED0, 0x949A}, //19443 #CJK UNIFIED IDEOGRAPH + {0xEED1, 0x949B}, //19444 #CJK UNIFIED IDEOGRAPH + {0xEED2, 0x949C}, //19445 #CJK UNIFIED IDEOGRAPH + {0xEED3, 0x94A3}, //19446 #CJK UNIFIED IDEOGRAPH + {0xEED4, 0x94A4}, //19447 #CJK UNIFIED IDEOGRAPH + {0xEED5, 0x94AB}, //19448 #CJK UNIFIED IDEOGRAPH + {0xEED6, 0x94AA}, //19449 #CJK UNIFIED IDEOGRAPH + {0xEED7, 0x94AD}, //19450 #CJK UNIFIED IDEOGRAPH + {0xEED8, 0x94AC}, //19451 #CJK UNIFIED IDEOGRAPH + {0xEED9, 0x94AF}, //19452 #CJK UNIFIED IDEOGRAPH + {0xEEDA, 0x94B0}, //19453 #CJK UNIFIED IDEOGRAPH + {0xEEDB, 0x94B2}, //19454 #CJK UNIFIED IDEOGRAPH + {0xEEDC, 0x94B4}, //19455 #CJK UNIFIED IDEOGRAPH + {0xEEDD, 0x94B6}, //19456 #CJK UNIFIED IDEOGRAPH + {0xEEDE, 0x94B7}, //19457 #CJK UNIFIED IDEOGRAPH + {0xEEDF, 0x94B8}, //19458 #CJK UNIFIED IDEOGRAPH + {0xEEE0, 0x94B9}, //19459 #CJK UNIFIED IDEOGRAPH + {0xEEE1, 0x94BA}, //19460 #CJK UNIFIED IDEOGRAPH + {0xEEE2, 0x94BC}, //19461 #CJK UNIFIED IDEOGRAPH + {0xEEE3, 0x94BD}, //19462 #CJK UNIFIED IDEOGRAPH + {0xEEE4, 0x94BF}, //19463 #CJK UNIFIED IDEOGRAPH + {0xEEE5, 0x94C4}, //19464 #CJK UNIFIED IDEOGRAPH + {0xEEE6, 0x94C8}, //19465 #CJK UNIFIED IDEOGRAPH + {0xEEE7, 0x94C9}, //19466 #CJK UNIFIED IDEOGRAPH + {0xEEE8, 0x94CA}, //19467 #CJK UNIFIED IDEOGRAPH + {0xEEE9, 0x94CB}, //19468 #CJK UNIFIED IDEOGRAPH + {0xEEEA, 0x94CC}, //19469 #CJK UNIFIED IDEOGRAPH + {0xEEEB, 0x94CD}, //19470 #CJK UNIFIED IDEOGRAPH + {0xEEEC, 0x94CE}, //19471 #CJK UNIFIED IDEOGRAPH + {0xEEED, 0x94D0}, //19472 #CJK UNIFIED IDEOGRAPH + {0xEEEE, 0x94D1}, //19473 #CJK UNIFIED IDEOGRAPH + {0xEEEF, 0x94D2}, //19474 #CJK UNIFIED IDEOGRAPH + {0xEEF0, 0x94D5}, //19475 #CJK UNIFIED IDEOGRAPH + {0xEEF1, 0x94D6}, //19476 #CJK UNIFIED IDEOGRAPH + {0xEEF2, 0x94D7}, //19477 #CJK UNIFIED IDEOGRAPH + {0xEEF3, 0x94D9}, //19478 #CJK UNIFIED IDEOGRAPH + {0xEEF4, 0x94D8}, //19479 #CJK UNIFIED IDEOGRAPH + {0xEEF5, 0x94DB}, //19480 #CJK UNIFIED IDEOGRAPH + {0xEEF6, 0x94DE}, //19481 #CJK UNIFIED IDEOGRAPH + {0xEEF7, 0x94DF}, //19482 #CJK UNIFIED IDEOGRAPH + {0xEEF8, 0x94E0}, //19483 #CJK UNIFIED IDEOGRAPH + {0xEEF9, 0x94E2}, //19484 #CJK UNIFIED IDEOGRAPH + {0xEEFA, 0x94E4}, //19485 #CJK UNIFIED IDEOGRAPH + {0xEEFB, 0x94E5}, //19486 #CJK UNIFIED IDEOGRAPH + {0xEEFC, 0x94E7}, //19487 #CJK UNIFIED IDEOGRAPH + {0xEEFD, 0x94E8}, //19488 #CJK UNIFIED IDEOGRAPH + {0xEEFE, 0x94EA}, //19489 #CJK UNIFIED IDEOGRAPH + {0xEF40, 0x986F}, //19490 #CJK UNIFIED IDEOGRAPH + {0xEF41, 0x9870}, //19491 #CJK UNIFIED IDEOGRAPH + {0xEF42, 0x9871}, //19492 #CJK UNIFIED IDEOGRAPH + {0xEF43, 0x9872}, //19493 #CJK UNIFIED IDEOGRAPH + {0xEF44, 0x9873}, //19494 #CJK UNIFIED IDEOGRAPH + {0xEF45, 0x9874}, //19495 #CJK UNIFIED IDEOGRAPH + {0xEF46, 0x988B}, //19496 #CJK UNIFIED IDEOGRAPH + {0xEF47, 0x988E}, //19497 #CJK UNIFIED IDEOGRAPH + {0xEF48, 0x9892}, //19498 #CJK UNIFIED IDEOGRAPH + {0xEF49, 0x9895}, //19499 #CJK UNIFIED IDEOGRAPH + {0xEF4A, 0x9899}, //19500 #CJK UNIFIED IDEOGRAPH + {0xEF4B, 0x98A3}, //19501 #CJK UNIFIED IDEOGRAPH + {0xEF4C, 0x98A8}, //19502 #CJK UNIFIED IDEOGRAPH + {0xEF4D, 0x98A9}, //19503 #CJK UNIFIED IDEOGRAPH + {0xEF4E, 0x98AA}, //19504 #CJK UNIFIED IDEOGRAPH + {0xEF4F, 0x98AB}, //19505 #CJK UNIFIED IDEOGRAPH + {0xEF50, 0x98AC}, //19506 #CJK UNIFIED IDEOGRAPH + {0xEF51, 0x98AD}, //19507 #CJK UNIFIED IDEOGRAPH + {0xEF52, 0x98AE}, //19508 #CJK UNIFIED IDEOGRAPH + {0xEF53, 0x98AF}, //19509 #CJK UNIFIED IDEOGRAPH + {0xEF54, 0x98B0}, //19510 #CJK UNIFIED IDEOGRAPH + {0xEF55, 0x98B1}, //19511 #CJK UNIFIED IDEOGRAPH + {0xEF56, 0x98B2}, //19512 #CJK UNIFIED IDEOGRAPH + {0xEF57, 0x98B3}, //19513 #CJK UNIFIED IDEOGRAPH + {0xEF58, 0x98B4}, //19514 #CJK UNIFIED IDEOGRAPH + {0xEF59, 0x98B5}, //19515 #CJK UNIFIED IDEOGRAPH + {0xEF5A, 0x98B6}, //19516 #CJK UNIFIED IDEOGRAPH + {0xEF5B, 0x98B7}, //19517 #CJK UNIFIED IDEOGRAPH + {0xEF5C, 0x98B8}, //19518 #CJK UNIFIED IDEOGRAPH + {0xEF5D, 0x98B9}, //19519 #CJK UNIFIED IDEOGRAPH + {0xEF5E, 0x98BA}, //19520 #CJK UNIFIED IDEOGRAPH + {0xEF5F, 0x98BB}, //19521 #CJK UNIFIED IDEOGRAPH + {0xEF60, 0x98BC}, //19522 #CJK UNIFIED IDEOGRAPH + {0xEF61, 0x98BD}, //19523 #CJK UNIFIED IDEOGRAPH + {0xEF62, 0x98BE}, //19524 #CJK UNIFIED IDEOGRAPH + {0xEF63, 0x98BF}, //19525 #CJK UNIFIED IDEOGRAPH + {0xEF64, 0x98C0}, //19526 #CJK UNIFIED IDEOGRAPH + {0xEF65, 0x98C1}, //19527 #CJK UNIFIED IDEOGRAPH + {0xEF66, 0x98C2}, //19528 #CJK UNIFIED IDEOGRAPH + {0xEF67, 0x98C3}, //19529 #CJK UNIFIED IDEOGRAPH + {0xEF68, 0x98C4}, //19530 #CJK UNIFIED IDEOGRAPH + {0xEF69, 0x98C5}, //19531 #CJK UNIFIED IDEOGRAPH + {0xEF6A, 0x98C6}, //19532 #CJK UNIFIED IDEOGRAPH + {0xEF6B, 0x98C7}, //19533 #CJK UNIFIED IDEOGRAPH + {0xEF6C, 0x98C8}, //19534 #CJK UNIFIED IDEOGRAPH + {0xEF6D, 0x98C9}, //19535 #CJK UNIFIED IDEOGRAPH + {0xEF6E, 0x98CA}, //19536 #CJK UNIFIED IDEOGRAPH + {0xEF6F, 0x98CB}, //19537 #CJK UNIFIED IDEOGRAPH + {0xEF70, 0x98CC}, //19538 #CJK UNIFIED IDEOGRAPH + {0xEF71, 0x98CD}, //19539 #CJK UNIFIED IDEOGRAPH + {0xEF72, 0x98CF}, //19540 #CJK UNIFIED IDEOGRAPH + {0xEF73, 0x98D0}, //19541 #CJK UNIFIED IDEOGRAPH + {0xEF74, 0x98D4}, //19542 #CJK UNIFIED IDEOGRAPH + {0xEF75, 0x98D6}, //19543 #CJK UNIFIED IDEOGRAPH + {0xEF76, 0x98D7}, //19544 #CJK UNIFIED IDEOGRAPH + {0xEF77, 0x98DB}, //19545 #CJK UNIFIED IDEOGRAPH + {0xEF78, 0x98DC}, //19546 #CJK UNIFIED IDEOGRAPH + {0xEF79, 0x98DD}, //19547 #CJK UNIFIED IDEOGRAPH + {0xEF7A, 0x98E0}, //19548 #CJK UNIFIED IDEOGRAPH + {0xEF7B, 0x98E1}, //19549 #CJK UNIFIED IDEOGRAPH + {0xEF7C, 0x98E2}, //19550 #CJK UNIFIED IDEOGRAPH + {0xEF7D, 0x98E3}, //19551 #CJK UNIFIED IDEOGRAPH + {0xEF7E, 0x98E4}, //19552 #CJK UNIFIED IDEOGRAPH + {0xEF80, 0x98E5}, //19553 #CJK UNIFIED IDEOGRAPH + {0xEF81, 0x98E6}, //19554 #CJK UNIFIED IDEOGRAPH + {0xEF82, 0x98E9}, //19555 #CJK UNIFIED IDEOGRAPH + {0xEF83, 0x98EA}, //19556 #CJK UNIFIED IDEOGRAPH + {0xEF84, 0x98EB}, //19557 #CJK UNIFIED IDEOGRAPH + {0xEF85, 0x98EC}, //19558 #CJK UNIFIED IDEOGRAPH + {0xEF86, 0x98ED}, //19559 #CJK UNIFIED IDEOGRAPH + {0xEF87, 0x98EE}, //19560 #CJK UNIFIED IDEOGRAPH + {0xEF88, 0x98EF}, //19561 #CJK UNIFIED IDEOGRAPH + {0xEF89, 0x98F0}, //19562 #CJK UNIFIED IDEOGRAPH + {0xEF8A, 0x98F1}, //19563 #CJK UNIFIED IDEOGRAPH + {0xEF8B, 0x98F2}, //19564 #CJK UNIFIED IDEOGRAPH + {0xEF8C, 0x98F3}, //19565 #CJK UNIFIED IDEOGRAPH + {0xEF8D, 0x98F4}, //19566 #CJK UNIFIED IDEOGRAPH + {0xEF8E, 0x98F5}, //19567 #CJK UNIFIED IDEOGRAPH + {0xEF8F, 0x98F6}, //19568 #CJK UNIFIED IDEOGRAPH + {0xEF90, 0x98F7}, //19569 #CJK UNIFIED IDEOGRAPH + {0xEF91, 0x98F8}, //19570 #CJK UNIFIED IDEOGRAPH + {0xEF92, 0x98F9}, //19571 #CJK UNIFIED IDEOGRAPH + {0xEF93, 0x98FA}, //19572 #CJK UNIFIED IDEOGRAPH + {0xEF94, 0x98FB}, //19573 #CJK UNIFIED IDEOGRAPH + {0xEF95, 0x98FC}, //19574 #CJK UNIFIED IDEOGRAPH + {0xEF96, 0x98FD}, //19575 #CJK UNIFIED IDEOGRAPH + {0xEF97, 0x98FE}, //19576 #CJK UNIFIED IDEOGRAPH + {0xEF98, 0x98FF}, //19577 #CJK UNIFIED IDEOGRAPH + {0xEF99, 0x9900}, //19578 #CJK UNIFIED IDEOGRAPH + {0xEF9A, 0x9901}, //19579 #CJK UNIFIED IDEOGRAPH + {0xEF9B, 0x9902}, //19580 #CJK UNIFIED IDEOGRAPH + {0xEF9C, 0x9903}, //19581 #CJK UNIFIED IDEOGRAPH + {0xEF9D, 0x9904}, //19582 #CJK UNIFIED IDEOGRAPH + {0xEF9E, 0x9905}, //19583 #CJK UNIFIED IDEOGRAPH + {0xEF9F, 0x9906}, //19584 #CJK UNIFIED IDEOGRAPH + {0xEFA0, 0x9907}, //19585 #CJK UNIFIED IDEOGRAPH + {0xEFA1, 0x94E9}, //19586 #CJK UNIFIED IDEOGRAPH + {0xEFA2, 0x94EB}, //19587 #CJK UNIFIED IDEOGRAPH + {0xEFA3, 0x94EE}, //19588 #CJK UNIFIED IDEOGRAPH + {0xEFA4, 0x94EF}, //19589 #CJK UNIFIED IDEOGRAPH + {0xEFA5, 0x94F3}, //19590 #CJK UNIFIED IDEOGRAPH + {0xEFA6, 0x94F4}, //19591 #CJK UNIFIED IDEOGRAPH + {0xEFA7, 0x94F5}, //19592 #CJK UNIFIED IDEOGRAPH + {0xEFA8, 0x94F7}, //19593 #CJK UNIFIED IDEOGRAPH + {0xEFA9, 0x94F9}, //19594 #CJK UNIFIED IDEOGRAPH + {0xEFAA, 0x94FC}, //19595 #CJK UNIFIED IDEOGRAPH + {0xEFAB, 0x94FD}, //19596 #CJK UNIFIED IDEOGRAPH + {0xEFAC, 0x94FF}, //19597 #CJK UNIFIED IDEOGRAPH + {0xEFAD, 0x9503}, //19598 #CJK UNIFIED IDEOGRAPH + {0xEFAE, 0x9502}, //19599 #CJK UNIFIED IDEOGRAPH + {0xEFAF, 0x9506}, //19600 #CJK UNIFIED IDEOGRAPH + {0xEFB0, 0x9507}, //19601 #CJK UNIFIED IDEOGRAPH + {0xEFB1, 0x9509}, //19602 #CJK UNIFIED IDEOGRAPH + {0xEFB2, 0x950A}, //19603 #CJK UNIFIED IDEOGRAPH + {0xEFB3, 0x950D}, //19604 #CJK UNIFIED IDEOGRAPH + {0xEFB4, 0x950E}, //19605 #CJK UNIFIED IDEOGRAPH + {0xEFB5, 0x950F}, //19606 #CJK UNIFIED IDEOGRAPH + {0xEFB6, 0x9512}, //19607 #CJK UNIFIED IDEOGRAPH + {0xEFB7, 0x9513}, //19608 #CJK UNIFIED IDEOGRAPH + {0xEFB8, 0x9514}, //19609 #CJK UNIFIED IDEOGRAPH + {0xEFB9, 0x9515}, //19610 #CJK UNIFIED IDEOGRAPH + {0xEFBA, 0x9516}, //19611 #CJK UNIFIED IDEOGRAPH + {0xEFBB, 0x9518}, //19612 #CJK UNIFIED IDEOGRAPH + {0xEFBC, 0x951B}, //19613 #CJK UNIFIED IDEOGRAPH + {0xEFBD, 0x951D}, //19614 #CJK UNIFIED IDEOGRAPH + {0xEFBE, 0x951E}, //19615 #CJK UNIFIED IDEOGRAPH + {0xEFBF, 0x951F}, //19616 #CJK UNIFIED IDEOGRAPH + {0xEFC0, 0x9522}, //19617 #CJK UNIFIED IDEOGRAPH + {0xEFC1, 0x952A}, //19618 #CJK UNIFIED IDEOGRAPH + {0xEFC2, 0x952B}, //19619 #CJK UNIFIED IDEOGRAPH + {0xEFC3, 0x9529}, //19620 #CJK UNIFIED IDEOGRAPH + {0xEFC4, 0x952C}, //19621 #CJK UNIFIED IDEOGRAPH + {0xEFC5, 0x9531}, //19622 #CJK UNIFIED IDEOGRAPH + {0xEFC6, 0x9532}, //19623 #CJK UNIFIED IDEOGRAPH + {0xEFC7, 0x9534}, //19624 #CJK UNIFIED IDEOGRAPH + {0xEFC8, 0x9536}, //19625 #CJK UNIFIED IDEOGRAPH + {0xEFC9, 0x9537}, //19626 #CJK UNIFIED IDEOGRAPH + {0xEFCA, 0x9538}, //19627 #CJK UNIFIED IDEOGRAPH + {0xEFCB, 0x953C}, //19628 #CJK UNIFIED IDEOGRAPH + {0xEFCC, 0x953E}, //19629 #CJK UNIFIED IDEOGRAPH + {0xEFCD, 0x953F}, //19630 #CJK UNIFIED IDEOGRAPH + {0xEFCE, 0x9542}, //19631 #CJK UNIFIED IDEOGRAPH + {0xEFCF, 0x9535}, //19632 #CJK UNIFIED IDEOGRAPH + {0xEFD0, 0x9544}, //19633 #CJK UNIFIED IDEOGRAPH + {0xEFD1, 0x9545}, //19634 #CJK UNIFIED IDEOGRAPH + {0xEFD2, 0x9546}, //19635 #CJK UNIFIED IDEOGRAPH + {0xEFD3, 0x9549}, //19636 #CJK UNIFIED IDEOGRAPH + {0xEFD4, 0x954C}, //19637 #CJK UNIFIED IDEOGRAPH + {0xEFD5, 0x954E}, //19638 #CJK UNIFIED IDEOGRAPH + {0xEFD6, 0x954F}, //19639 #CJK UNIFIED IDEOGRAPH + {0xEFD7, 0x9552}, //19640 #CJK UNIFIED IDEOGRAPH + {0xEFD8, 0x9553}, //19641 #CJK UNIFIED IDEOGRAPH + {0xEFD9, 0x9554}, //19642 #CJK UNIFIED IDEOGRAPH + {0xEFDA, 0x9556}, //19643 #CJK UNIFIED IDEOGRAPH + {0xEFDB, 0x9557}, //19644 #CJK UNIFIED IDEOGRAPH + {0xEFDC, 0x9558}, //19645 #CJK UNIFIED IDEOGRAPH + {0xEFDD, 0x9559}, //19646 #CJK UNIFIED IDEOGRAPH + {0xEFDE, 0x955B}, //19647 #CJK UNIFIED IDEOGRAPH + {0xEFDF, 0x955E}, //19648 #CJK UNIFIED IDEOGRAPH + {0xEFE0, 0x955F}, //19649 #CJK UNIFIED IDEOGRAPH + {0xEFE1, 0x955D}, //19650 #CJK UNIFIED IDEOGRAPH + {0xEFE2, 0x9561}, //19651 #CJK UNIFIED IDEOGRAPH + {0xEFE3, 0x9562}, //19652 #CJK UNIFIED IDEOGRAPH + {0xEFE4, 0x9564}, //19653 #CJK UNIFIED IDEOGRAPH + {0xEFE5, 0x9565}, //19654 #CJK UNIFIED IDEOGRAPH + {0xEFE6, 0x9566}, //19655 #CJK UNIFIED IDEOGRAPH + {0xEFE7, 0x9567}, //19656 #CJK UNIFIED IDEOGRAPH + {0xEFE8, 0x9568}, //19657 #CJK UNIFIED IDEOGRAPH + {0xEFE9, 0x9569}, //19658 #CJK UNIFIED IDEOGRAPH + {0xEFEA, 0x956A}, //19659 #CJK UNIFIED IDEOGRAPH + {0xEFEB, 0x956B}, //19660 #CJK UNIFIED IDEOGRAPH + {0xEFEC, 0x956C}, //19661 #CJK UNIFIED IDEOGRAPH + {0xEFED, 0x956F}, //19662 #CJK UNIFIED IDEOGRAPH + {0xEFEE, 0x9571}, //19663 #CJK UNIFIED IDEOGRAPH + {0xEFEF, 0x9572}, //19664 #CJK UNIFIED IDEOGRAPH + {0xEFF0, 0x9573}, //19665 #CJK UNIFIED IDEOGRAPH + {0xEFF1, 0x953A}, //19666 #CJK UNIFIED IDEOGRAPH + {0xEFF2, 0x77E7}, //19667 #CJK UNIFIED IDEOGRAPH + {0xEFF3, 0x77EC}, //19668 #CJK UNIFIED IDEOGRAPH + {0xEFF4, 0x96C9}, //19669 #CJK UNIFIED IDEOGRAPH + {0xEFF5, 0x79D5}, //19670 #CJK UNIFIED IDEOGRAPH + {0xEFF6, 0x79ED}, //19671 #CJK UNIFIED IDEOGRAPH + {0xEFF7, 0x79E3}, //19672 #CJK UNIFIED IDEOGRAPH + {0xEFF8, 0x79EB}, //19673 #CJK UNIFIED IDEOGRAPH + {0xEFF9, 0x7A06}, //19674 #CJK UNIFIED IDEOGRAPH + {0xEFFA, 0x5D47}, //19675 #CJK UNIFIED IDEOGRAPH + {0xEFFB, 0x7A03}, //19676 #CJK UNIFIED IDEOGRAPH + {0xEFFC, 0x7A02}, //19677 #CJK UNIFIED IDEOGRAPH + {0xEFFD, 0x7A1E}, //19678 #CJK UNIFIED IDEOGRAPH + {0xEFFE, 0x7A14}, //19679 #CJK UNIFIED IDEOGRAPH + {0xF040, 0x9908}, //19680 #CJK UNIFIED IDEOGRAPH + {0xF041, 0x9909}, //19681 #CJK UNIFIED IDEOGRAPH + {0xF042, 0x990A}, //19682 #CJK UNIFIED IDEOGRAPH + {0xF043, 0x990B}, //19683 #CJK UNIFIED IDEOGRAPH + {0xF044, 0x990C}, //19684 #CJK UNIFIED IDEOGRAPH + {0xF045, 0x990E}, //19685 #CJK UNIFIED IDEOGRAPH + {0xF046, 0x990F}, //19686 #CJK UNIFIED IDEOGRAPH + {0xF047, 0x9911}, //19687 #CJK UNIFIED IDEOGRAPH + {0xF048, 0x9912}, //19688 #CJK UNIFIED IDEOGRAPH + {0xF049, 0x9913}, //19689 #CJK UNIFIED IDEOGRAPH + {0xF04A, 0x9914}, //19690 #CJK UNIFIED IDEOGRAPH + {0xF04B, 0x9915}, //19691 #CJK UNIFIED IDEOGRAPH + {0xF04C, 0x9916}, //19692 #CJK UNIFIED IDEOGRAPH + {0xF04D, 0x9917}, //19693 #CJK UNIFIED IDEOGRAPH + {0xF04E, 0x9918}, //19694 #CJK UNIFIED IDEOGRAPH + {0xF04F, 0x9919}, //19695 #CJK UNIFIED IDEOGRAPH + {0xF050, 0x991A}, //19696 #CJK UNIFIED IDEOGRAPH + {0xF051, 0x991B}, //19697 #CJK UNIFIED IDEOGRAPH + {0xF052, 0x991C}, //19698 #CJK UNIFIED IDEOGRAPH + {0xF053, 0x991D}, //19699 #CJK UNIFIED IDEOGRAPH + {0xF054, 0x991E}, //19700 #CJK UNIFIED IDEOGRAPH + {0xF055, 0x991F}, //19701 #CJK UNIFIED IDEOGRAPH + {0xF056, 0x9920}, //19702 #CJK UNIFIED IDEOGRAPH + {0xF057, 0x9921}, //19703 #CJK UNIFIED IDEOGRAPH + {0xF058, 0x9922}, //19704 #CJK UNIFIED IDEOGRAPH + {0xF059, 0x9923}, //19705 #CJK UNIFIED IDEOGRAPH + {0xF05A, 0x9924}, //19706 #CJK UNIFIED IDEOGRAPH + {0xF05B, 0x9925}, //19707 #CJK UNIFIED IDEOGRAPH + {0xF05C, 0x9926}, //19708 #CJK UNIFIED IDEOGRAPH + {0xF05D, 0x9927}, //19709 #CJK UNIFIED IDEOGRAPH + {0xF05E, 0x9928}, //19710 #CJK UNIFIED IDEOGRAPH + {0xF05F, 0x9929}, //19711 #CJK UNIFIED IDEOGRAPH + {0xF060, 0x992A}, //19712 #CJK UNIFIED IDEOGRAPH + {0xF061, 0x992B}, //19713 #CJK UNIFIED IDEOGRAPH + {0xF062, 0x992C}, //19714 #CJK UNIFIED IDEOGRAPH + {0xF063, 0x992D}, //19715 #CJK UNIFIED IDEOGRAPH + {0xF064, 0x992F}, //19716 #CJK UNIFIED IDEOGRAPH + {0xF065, 0x9930}, //19717 #CJK UNIFIED IDEOGRAPH + {0xF066, 0x9931}, //19718 #CJK UNIFIED IDEOGRAPH + {0xF067, 0x9932}, //19719 #CJK UNIFIED IDEOGRAPH + {0xF068, 0x9933}, //19720 #CJK UNIFIED IDEOGRAPH + {0xF069, 0x9934}, //19721 #CJK UNIFIED IDEOGRAPH + {0xF06A, 0x9935}, //19722 #CJK UNIFIED IDEOGRAPH + {0xF06B, 0x9936}, //19723 #CJK UNIFIED IDEOGRAPH + {0xF06C, 0x9937}, //19724 #CJK UNIFIED IDEOGRAPH + {0xF06D, 0x9938}, //19725 #CJK UNIFIED IDEOGRAPH + {0xF06E, 0x9939}, //19726 #CJK UNIFIED IDEOGRAPH + {0xF06F, 0x993A}, //19727 #CJK UNIFIED IDEOGRAPH + {0xF070, 0x993B}, //19728 #CJK UNIFIED IDEOGRAPH + {0xF071, 0x993C}, //19729 #CJK UNIFIED IDEOGRAPH + {0xF072, 0x993D}, //19730 #CJK UNIFIED IDEOGRAPH + {0xF073, 0x993E}, //19731 #CJK UNIFIED IDEOGRAPH + {0xF074, 0x993F}, //19732 #CJK UNIFIED IDEOGRAPH + {0xF075, 0x9940}, //19733 #CJK UNIFIED IDEOGRAPH + {0xF076, 0x9941}, //19734 #CJK UNIFIED IDEOGRAPH + {0xF077, 0x9942}, //19735 #CJK UNIFIED IDEOGRAPH + {0xF078, 0x9943}, //19736 #CJK UNIFIED IDEOGRAPH + {0xF079, 0x9944}, //19737 #CJK UNIFIED IDEOGRAPH + {0xF07A, 0x9945}, //19738 #CJK UNIFIED IDEOGRAPH + {0xF07B, 0x9946}, //19739 #CJK UNIFIED IDEOGRAPH + {0xF07C, 0x9947}, //19740 #CJK UNIFIED IDEOGRAPH + {0xF07D, 0x9948}, //19741 #CJK UNIFIED IDEOGRAPH + {0xF07E, 0x9949}, //19742 #CJK UNIFIED IDEOGRAPH + {0xF080, 0x994A}, //19743 #CJK UNIFIED IDEOGRAPH + {0xF081, 0x994B}, //19744 #CJK UNIFIED IDEOGRAPH + {0xF082, 0x994C}, //19745 #CJK UNIFIED IDEOGRAPH + {0xF083, 0x994D}, //19746 #CJK UNIFIED IDEOGRAPH + {0xF084, 0x994E}, //19747 #CJK UNIFIED IDEOGRAPH + {0xF085, 0x994F}, //19748 #CJK UNIFIED IDEOGRAPH + {0xF086, 0x9950}, //19749 #CJK UNIFIED IDEOGRAPH + {0xF087, 0x9951}, //19750 #CJK UNIFIED IDEOGRAPH + {0xF088, 0x9952}, //19751 #CJK UNIFIED IDEOGRAPH + {0xF089, 0x9953}, //19752 #CJK UNIFIED IDEOGRAPH + {0xF08A, 0x9956}, //19753 #CJK UNIFIED IDEOGRAPH + {0xF08B, 0x9957}, //19754 #CJK UNIFIED IDEOGRAPH + {0xF08C, 0x9958}, //19755 #CJK UNIFIED IDEOGRAPH + {0xF08D, 0x9959}, //19756 #CJK UNIFIED IDEOGRAPH + {0xF08E, 0x995A}, //19757 #CJK UNIFIED IDEOGRAPH + {0xF08F, 0x995B}, //19758 #CJK UNIFIED IDEOGRAPH + {0xF090, 0x995C}, //19759 #CJK UNIFIED IDEOGRAPH + {0xF091, 0x995D}, //19760 #CJK UNIFIED IDEOGRAPH + {0xF092, 0x995E}, //19761 #CJK UNIFIED IDEOGRAPH + {0xF093, 0x995F}, //19762 #CJK UNIFIED IDEOGRAPH + {0xF094, 0x9960}, //19763 #CJK UNIFIED IDEOGRAPH + {0xF095, 0x9961}, //19764 #CJK UNIFIED IDEOGRAPH + {0xF096, 0x9962}, //19765 #CJK UNIFIED IDEOGRAPH + {0xF097, 0x9964}, //19766 #CJK UNIFIED IDEOGRAPH + {0xF098, 0x9966}, //19767 #CJK UNIFIED IDEOGRAPH + {0xF099, 0x9973}, //19768 #CJK UNIFIED IDEOGRAPH + {0xF09A, 0x9978}, //19769 #CJK UNIFIED IDEOGRAPH + {0xF09B, 0x9979}, //19770 #CJK UNIFIED IDEOGRAPH + {0xF09C, 0x997B}, //19771 #CJK UNIFIED IDEOGRAPH + {0xF09D, 0x997E}, //19772 #CJK UNIFIED IDEOGRAPH + {0xF09E, 0x9982}, //19773 #CJK UNIFIED IDEOGRAPH + {0xF09F, 0x9983}, //19774 #CJK UNIFIED IDEOGRAPH + {0xF0A0, 0x9989}, //19775 #CJK UNIFIED IDEOGRAPH + {0xF0A1, 0x7A39}, //19776 #CJK UNIFIED IDEOGRAPH + {0xF0A2, 0x7A37}, //19777 #CJK UNIFIED IDEOGRAPH + {0xF0A3, 0x7A51}, //19778 #CJK UNIFIED IDEOGRAPH + {0xF0A4, 0x9ECF}, //19779 #CJK UNIFIED IDEOGRAPH + {0xF0A5, 0x99A5}, //19780 #CJK UNIFIED IDEOGRAPH + {0xF0A6, 0x7A70}, //19781 #CJK UNIFIED IDEOGRAPH + {0xF0A7, 0x7688}, //19782 #CJK UNIFIED IDEOGRAPH + {0xF0A8, 0x768E}, //19783 #CJK UNIFIED IDEOGRAPH + {0xF0A9, 0x7693}, //19784 #CJK UNIFIED IDEOGRAPH + {0xF0AA, 0x7699}, //19785 #CJK UNIFIED IDEOGRAPH + {0xF0AB, 0x76A4}, //19786 #CJK UNIFIED IDEOGRAPH + {0xF0AC, 0x74DE}, //19787 #CJK UNIFIED IDEOGRAPH + {0xF0AD, 0x74E0}, //19788 #CJK UNIFIED IDEOGRAPH + {0xF0AE, 0x752C}, //19789 #CJK UNIFIED IDEOGRAPH + {0xF0AF, 0x9E20}, //19790 #CJK UNIFIED IDEOGRAPH + {0xF0B0, 0x9E22}, //19791 #CJK UNIFIED IDEOGRAPH + {0xF0B1, 0x9E28}, //19792 #CJK UNIFIED IDEOGRAPH + {0xF0B2, 0x9E29}, //19793 #CJK UNIFIED IDEOGRAPH + {0xF0B3, 0x9E2A}, //19794 #CJK UNIFIED IDEOGRAPH + {0xF0B4, 0x9E2B}, //19795 #CJK UNIFIED IDEOGRAPH + {0xF0B5, 0x9E2C}, //19796 #CJK UNIFIED IDEOGRAPH + {0xF0B6, 0x9E32}, //19797 #CJK UNIFIED IDEOGRAPH + {0xF0B7, 0x9E31}, //19798 #CJK UNIFIED IDEOGRAPH + {0xF0B8, 0x9E36}, //19799 #CJK UNIFIED IDEOGRAPH + {0xF0B9, 0x9E38}, //19800 #CJK UNIFIED IDEOGRAPH + {0xF0BA, 0x9E37}, //19801 #CJK UNIFIED IDEOGRAPH + {0xF0BB, 0x9E39}, //19802 #CJK UNIFIED IDEOGRAPH + {0xF0BC, 0x9E3A}, //19803 #CJK UNIFIED IDEOGRAPH + {0xF0BD, 0x9E3E}, //19804 #CJK UNIFIED IDEOGRAPH + {0xF0BE, 0x9E41}, //19805 #CJK UNIFIED IDEOGRAPH + {0xF0BF, 0x9E42}, //19806 #CJK UNIFIED IDEOGRAPH + {0xF0C0, 0x9E44}, //19807 #CJK UNIFIED IDEOGRAPH + {0xF0C1, 0x9E46}, //19808 #CJK UNIFIED IDEOGRAPH + {0xF0C2, 0x9E47}, //19809 #CJK UNIFIED IDEOGRAPH + {0xF0C3, 0x9E48}, //19810 #CJK UNIFIED IDEOGRAPH + {0xF0C4, 0x9E49}, //19811 #CJK UNIFIED IDEOGRAPH + {0xF0C5, 0x9E4B}, //19812 #CJK UNIFIED IDEOGRAPH + {0xF0C6, 0x9E4C}, //19813 #CJK UNIFIED IDEOGRAPH + {0xF0C7, 0x9E4E}, //19814 #CJK UNIFIED IDEOGRAPH + {0xF0C8, 0x9E51}, //19815 #CJK UNIFIED IDEOGRAPH + {0xF0C9, 0x9E55}, //19816 #CJK UNIFIED IDEOGRAPH + {0xF0CA, 0x9E57}, //19817 #CJK UNIFIED IDEOGRAPH + {0xF0CB, 0x9E5A}, //19818 #CJK UNIFIED IDEOGRAPH + {0xF0CC, 0x9E5B}, //19819 #CJK UNIFIED IDEOGRAPH + {0xF0CD, 0x9E5C}, //19820 #CJK UNIFIED IDEOGRAPH + {0xF0CE, 0x9E5E}, //19821 #CJK UNIFIED IDEOGRAPH + {0xF0CF, 0x9E63}, //19822 #CJK UNIFIED IDEOGRAPH + {0xF0D0, 0x9E66}, //19823 #CJK UNIFIED IDEOGRAPH + {0xF0D1, 0x9E67}, //19824 #CJK UNIFIED IDEOGRAPH + {0xF0D2, 0x9E68}, //19825 #CJK UNIFIED IDEOGRAPH + {0xF0D3, 0x9E69}, //19826 #CJK UNIFIED IDEOGRAPH + {0xF0D4, 0x9E6A}, //19827 #CJK UNIFIED IDEOGRAPH + {0xF0D5, 0x9E6B}, //19828 #CJK UNIFIED IDEOGRAPH + {0xF0D6, 0x9E6C}, //19829 #CJK UNIFIED IDEOGRAPH + {0xF0D7, 0x9E71}, //19830 #CJK UNIFIED IDEOGRAPH + {0xF0D8, 0x9E6D}, //19831 #CJK UNIFIED IDEOGRAPH + {0xF0D9, 0x9E73}, //19832 #CJK UNIFIED IDEOGRAPH + {0xF0DA, 0x7592}, //19833 #CJK UNIFIED IDEOGRAPH + {0xF0DB, 0x7594}, //19834 #CJK UNIFIED IDEOGRAPH + {0xF0DC, 0x7596}, //19835 #CJK UNIFIED IDEOGRAPH + {0xF0DD, 0x75A0}, //19836 #CJK UNIFIED IDEOGRAPH + {0xF0DE, 0x759D}, //19837 #CJK UNIFIED IDEOGRAPH + {0xF0DF, 0x75AC}, //19838 #CJK UNIFIED IDEOGRAPH + {0xF0E0, 0x75A3}, //19839 #CJK UNIFIED IDEOGRAPH + {0xF0E1, 0x75B3}, //19840 #CJK UNIFIED IDEOGRAPH + {0xF0E2, 0x75B4}, //19841 #CJK UNIFIED IDEOGRAPH + {0xF0E3, 0x75B8}, //19842 #CJK UNIFIED IDEOGRAPH + {0xF0E4, 0x75C4}, //19843 #CJK UNIFIED IDEOGRAPH + {0xF0E5, 0x75B1}, //19844 #CJK UNIFIED IDEOGRAPH + {0xF0E6, 0x75B0}, //19845 #CJK UNIFIED IDEOGRAPH + {0xF0E7, 0x75C3}, //19846 #CJK UNIFIED IDEOGRAPH + {0xF0E8, 0x75C2}, //19847 #CJK UNIFIED IDEOGRAPH + {0xF0E9, 0x75D6}, //19848 #CJK UNIFIED IDEOGRAPH + {0xF0EA, 0x75CD}, //19849 #CJK UNIFIED IDEOGRAPH + {0xF0EB, 0x75E3}, //19850 #CJK UNIFIED IDEOGRAPH + {0xF0EC, 0x75E8}, //19851 #CJK UNIFIED IDEOGRAPH + {0xF0ED, 0x75E6}, //19852 #CJK UNIFIED IDEOGRAPH + {0xF0EE, 0x75E4}, //19853 #CJK UNIFIED IDEOGRAPH + {0xF0EF, 0x75EB}, //19854 #CJK UNIFIED IDEOGRAPH + {0xF0F0, 0x75E7}, //19855 #CJK UNIFIED IDEOGRAPH + {0xF0F1, 0x7603}, //19856 #CJK UNIFIED IDEOGRAPH + {0xF0F2, 0x75F1}, //19857 #CJK UNIFIED IDEOGRAPH + {0xF0F3, 0x75FC}, //19858 #CJK UNIFIED IDEOGRAPH + {0xF0F4, 0x75FF}, //19859 #CJK UNIFIED IDEOGRAPH + {0xF0F5, 0x7610}, //19860 #CJK UNIFIED IDEOGRAPH + {0xF0F6, 0x7600}, //19861 #CJK UNIFIED IDEOGRAPH + {0xF0F7, 0x7605}, //19862 #CJK UNIFIED IDEOGRAPH + {0xF0F8, 0x760C}, //19863 #CJK UNIFIED IDEOGRAPH + {0xF0F9, 0x7617}, //19864 #CJK UNIFIED IDEOGRAPH + {0xF0FA, 0x760A}, //19865 #CJK UNIFIED IDEOGRAPH + {0xF0FB, 0x7625}, //19866 #CJK UNIFIED IDEOGRAPH + {0xF0FC, 0x7618}, //19867 #CJK UNIFIED IDEOGRAPH + {0xF0FD, 0x7615}, //19868 #CJK UNIFIED IDEOGRAPH + {0xF0FE, 0x7619}, //19869 #CJK UNIFIED IDEOGRAPH + {0xF140, 0x998C}, //19870 #CJK UNIFIED IDEOGRAPH + {0xF141, 0x998E}, //19871 #CJK UNIFIED IDEOGRAPH + {0xF142, 0x999A}, //19872 #CJK UNIFIED IDEOGRAPH + {0xF143, 0x999B}, //19873 #CJK UNIFIED IDEOGRAPH + {0xF144, 0x999C}, //19874 #CJK UNIFIED IDEOGRAPH + {0xF145, 0x999D}, //19875 #CJK UNIFIED IDEOGRAPH + {0xF146, 0x999E}, //19876 #CJK UNIFIED IDEOGRAPH + {0xF147, 0x999F}, //19877 #CJK UNIFIED IDEOGRAPH + {0xF148, 0x99A0}, //19878 #CJK UNIFIED IDEOGRAPH + {0xF149, 0x99A1}, //19879 #CJK UNIFIED IDEOGRAPH + {0xF14A, 0x99A2}, //19880 #CJK UNIFIED IDEOGRAPH + {0xF14B, 0x99A3}, //19881 #CJK UNIFIED IDEOGRAPH + {0xF14C, 0x99A4}, //19882 #CJK UNIFIED IDEOGRAPH + {0xF14D, 0x99A6}, //19883 #CJK UNIFIED IDEOGRAPH + {0xF14E, 0x99A7}, //19884 #CJK UNIFIED IDEOGRAPH + {0xF14F, 0x99A9}, //19885 #CJK UNIFIED IDEOGRAPH + {0xF150, 0x99AA}, //19886 #CJK UNIFIED IDEOGRAPH + {0xF151, 0x99AB}, //19887 #CJK UNIFIED IDEOGRAPH + {0xF152, 0x99AC}, //19888 #CJK UNIFIED IDEOGRAPH + {0xF153, 0x99AD}, //19889 #CJK UNIFIED IDEOGRAPH + {0xF154, 0x99AE}, //19890 #CJK UNIFIED IDEOGRAPH + {0xF155, 0x99AF}, //19891 #CJK UNIFIED IDEOGRAPH + {0xF156, 0x99B0}, //19892 #CJK UNIFIED IDEOGRAPH + {0xF157, 0x99B1}, //19893 #CJK UNIFIED IDEOGRAPH + {0xF158, 0x99B2}, //19894 #CJK UNIFIED IDEOGRAPH + {0xF159, 0x99B3}, //19895 #CJK UNIFIED IDEOGRAPH + {0xF15A, 0x99B4}, //19896 #CJK UNIFIED IDEOGRAPH + {0xF15B, 0x99B5}, //19897 #CJK UNIFIED IDEOGRAPH + {0xF15C, 0x99B6}, //19898 #CJK UNIFIED IDEOGRAPH + {0xF15D, 0x99B7}, //19899 #CJK UNIFIED IDEOGRAPH + {0xF15E, 0x99B8}, //19900 #CJK UNIFIED IDEOGRAPH + {0xF15F, 0x99B9}, //19901 #CJK UNIFIED IDEOGRAPH + {0xF160, 0x99BA}, //19902 #CJK UNIFIED IDEOGRAPH + {0xF161, 0x99BB}, //19903 #CJK UNIFIED IDEOGRAPH + {0xF162, 0x99BC}, //19904 #CJK UNIFIED IDEOGRAPH + {0xF163, 0x99BD}, //19905 #CJK UNIFIED IDEOGRAPH + {0xF164, 0x99BE}, //19906 #CJK UNIFIED IDEOGRAPH + {0xF165, 0x99BF}, //19907 #CJK UNIFIED IDEOGRAPH + {0xF166, 0x99C0}, //19908 #CJK UNIFIED IDEOGRAPH + {0xF167, 0x99C1}, //19909 #CJK UNIFIED IDEOGRAPH + {0xF168, 0x99C2}, //19910 #CJK UNIFIED IDEOGRAPH + {0xF169, 0x99C3}, //19911 #CJK UNIFIED IDEOGRAPH + {0xF16A, 0x99C4}, //19912 #CJK UNIFIED IDEOGRAPH + {0xF16B, 0x99C5}, //19913 #CJK UNIFIED IDEOGRAPH + {0xF16C, 0x99C6}, //19914 #CJK UNIFIED IDEOGRAPH + {0xF16D, 0x99C7}, //19915 #CJK UNIFIED IDEOGRAPH + {0xF16E, 0x99C8}, //19916 #CJK UNIFIED IDEOGRAPH + {0xF16F, 0x99C9}, //19917 #CJK UNIFIED IDEOGRAPH + {0xF170, 0x99CA}, //19918 #CJK UNIFIED IDEOGRAPH + {0xF171, 0x99CB}, //19919 #CJK UNIFIED IDEOGRAPH + {0xF172, 0x99CC}, //19920 #CJK UNIFIED IDEOGRAPH + {0xF173, 0x99CD}, //19921 #CJK UNIFIED IDEOGRAPH + {0xF174, 0x99CE}, //19922 #CJK UNIFIED IDEOGRAPH + {0xF175, 0x99CF}, //19923 #CJK UNIFIED IDEOGRAPH + {0xF176, 0x99D0}, //19924 #CJK UNIFIED IDEOGRAPH + {0xF177, 0x99D1}, //19925 #CJK UNIFIED IDEOGRAPH + {0xF178, 0x99D2}, //19926 #CJK UNIFIED IDEOGRAPH + {0xF179, 0x99D3}, //19927 #CJK UNIFIED IDEOGRAPH + {0xF17A, 0x99D4}, //19928 #CJK UNIFIED IDEOGRAPH + {0xF17B, 0x99D5}, //19929 #CJK UNIFIED IDEOGRAPH + {0xF17C, 0x99D6}, //19930 #CJK UNIFIED IDEOGRAPH + {0xF17D, 0x99D7}, //19931 #CJK UNIFIED IDEOGRAPH + {0xF17E, 0x99D8}, //19932 #CJK UNIFIED IDEOGRAPH + {0xF180, 0x99D9}, //19933 #CJK UNIFIED IDEOGRAPH + {0xF181, 0x99DA}, //19934 #CJK UNIFIED IDEOGRAPH + {0xF182, 0x99DB}, //19935 #CJK UNIFIED IDEOGRAPH + {0xF183, 0x99DC}, //19936 #CJK UNIFIED IDEOGRAPH + {0xF184, 0x99DD}, //19937 #CJK UNIFIED IDEOGRAPH + {0xF185, 0x99DE}, //19938 #CJK UNIFIED IDEOGRAPH + {0xF186, 0x99DF}, //19939 #CJK UNIFIED IDEOGRAPH + {0xF187, 0x99E0}, //19940 #CJK UNIFIED IDEOGRAPH + {0xF188, 0x99E1}, //19941 #CJK UNIFIED IDEOGRAPH + {0xF189, 0x99E2}, //19942 #CJK UNIFIED IDEOGRAPH + {0xF18A, 0x99E3}, //19943 #CJK UNIFIED IDEOGRAPH + {0xF18B, 0x99E4}, //19944 #CJK UNIFIED IDEOGRAPH + {0xF18C, 0x99E5}, //19945 #CJK UNIFIED IDEOGRAPH + {0xF18D, 0x99E6}, //19946 #CJK UNIFIED IDEOGRAPH + {0xF18E, 0x99E7}, //19947 #CJK UNIFIED IDEOGRAPH + {0xF18F, 0x99E8}, //19948 #CJK UNIFIED IDEOGRAPH + {0xF190, 0x99E9}, //19949 #CJK UNIFIED IDEOGRAPH + {0xF191, 0x99EA}, //19950 #CJK UNIFIED IDEOGRAPH + {0xF192, 0x99EB}, //19951 #CJK UNIFIED IDEOGRAPH + {0xF193, 0x99EC}, //19952 #CJK UNIFIED IDEOGRAPH + {0xF194, 0x99ED}, //19953 #CJK UNIFIED IDEOGRAPH + {0xF195, 0x99EE}, //19954 #CJK UNIFIED IDEOGRAPH + {0xF196, 0x99EF}, //19955 #CJK UNIFIED IDEOGRAPH + {0xF197, 0x99F0}, //19956 #CJK UNIFIED IDEOGRAPH + {0xF198, 0x99F1}, //19957 #CJK UNIFIED IDEOGRAPH + {0xF199, 0x99F2}, //19958 #CJK UNIFIED IDEOGRAPH + {0xF19A, 0x99F3}, //19959 #CJK UNIFIED IDEOGRAPH + {0xF19B, 0x99F4}, //19960 #CJK UNIFIED IDEOGRAPH + {0xF19C, 0x99F5}, //19961 #CJK UNIFIED IDEOGRAPH + {0xF19D, 0x99F6}, //19962 #CJK UNIFIED IDEOGRAPH + {0xF19E, 0x99F7}, //19963 #CJK UNIFIED IDEOGRAPH + {0xF19F, 0x99F8}, //19964 #CJK UNIFIED IDEOGRAPH + {0xF1A0, 0x99F9}, //19965 #CJK UNIFIED IDEOGRAPH + {0xF1A1, 0x761B}, //19966 #CJK UNIFIED IDEOGRAPH + {0xF1A2, 0x763C}, //19967 #CJK UNIFIED IDEOGRAPH + {0xF1A3, 0x7622}, //19968 #CJK UNIFIED IDEOGRAPH + {0xF1A4, 0x7620}, //19969 #CJK UNIFIED IDEOGRAPH + {0xF1A5, 0x7640}, //19970 #CJK UNIFIED IDEOGRAPH + {0xF1A6, 0x762D}, //19971 #CJK UNIFIED IDEOGRAPH + {0xF1A7, 0x7630}, //19972 #CJK UNIFIED IDEOGRAPH + {0xF1A8, 0x763F}, //19973 #CJK UNIFIED IDEOGRAPH + {0xF1A9, 0x7635}, //19974 #CJK UNIFIED IDEOGRAPH + {0xF1AA, 0x7643}, //19975 #CJK UNIFIED IDEOGRAPH + {0xF1AB, 0x763E}, //19976 #CJK UNIFIED IDEOGRAPH + {0xF1AC, 0x7633}, //19977 #CJK UNIFIED IDEOGRAPH + {0xF1AD, 0x764D}, //19978 #CJK UNIFIED IDEOGRAPH + {0xF1AE, 0x765E}, //19979 #CJK UNIFIED IDEOGRAPH + {0xF1AF, 0x7654}, //19980 #CJK UNIFIED IDEOGRAPH + {0xF1B0, 0x765C}, //19981 #CJK UNIFIED IDEOGRAPH + {0xF1B1, 0x7656}, //19982 #CJK UNIFIED IDEOGRAPH + {0xF1B2, 0x766B}, //19983 #CJK UNIFIED IDEOGRAPH + {0xF1B3, 0x766F}, //19984 #CJK UNIFIED IDEOGRAPH + {0xF1B4, 0x7FCA}, //19985 #CJK UNIFIED IDEOGRAPH + {0xF1B5, 0x7AE6}, //19986 #CJK UNIFIED IDEOGRAPH + {0xF1B6, 0x7A78}, //19987 #CJK UNIFIED IDEOGRAPH + {0xF1B7, 0x7A79}, //19988 #CJK UNIFIED IDEOGRAPH + {0xF1B8, 0x7A80}, //19989 #CJK UNIFIED IDEOGRAPH + {0xF1B9, 0x7A86}, //19990 #CJK UNIFIED IDEOGRAPH + {0xF1BA, 0x7A88}, //19991 #CJK UNIFIED IDEOGRAPH + {0xF1BB, 0x7A95}, //19992 #CJK UNIFIED IDEOGRAPH + {0xF1BC, 0x7AA6}, //19993 #CJK UNIFIED IDEOGRAPH + {0xF1BD, 0x7AA0}, //19994 #CJK UNIFIED IDEOGRAPH + {0xF1BE, 0x7AAC}, //19995 #CJK UNIFIED IDEOGRAPH + {0xF1BF, 0x7AA8}, //19996 #CJK UNIFIED IDEOGRAPH + {0xF1C0, 0x7AAD}, //19997 #CJK UNIFIED IDEOGRAPH + {0xF1C1, 0x7AB3}, //19998 #CJK UNIFIED IDEOGRAPH + {0xF1C2, 0x8864}, //19999 #CJK UNIFIED IDEOGRAPH + {0xF1C3, 0x8869}, //20000 #CJK UNIFIED IDEOGRAPH + {0xF1C4, 0x8872}, //20001 #CJK UNIFIED IDEOGRAPH + {0xF1C5, 0x887D}, //20002 #CJK UNIFIED IDEOGRAPH + {0xF1C6, 0x887F}, //20003 #CJK UNIFIED IDEOGRAPH + {0xF1C7, 0x8882}, //20004 #CJK UNIFIED IDEOGRAPH + {0xF1C8, 0x88A2}, //20005 #CJK UNIFIED IDEOGRAPH + {0xF1C9, 0x88C6}, //20006 #CJK UNIFIED IDEOGRAPH + {0xF1CA, 0x88B7}, //20007 #CJK UNIFIED IDEOGRAPH + {0xF1CB, 0x88BC}, //20008 #CJK UNIFIED IDEOGRAPH + {0xF1CC, 0x88C9}, //20009 #CJK UNIFIED IDEOGRAPH + {0xF1CD, 0x88E2}, //20010 #CJK UNIFIED IDEOGRAPH + {0xF1CE, 0x88CE}, //20011 #CJK UNIFIED IDEOGRAPH + {0xF1CF, 0x88E3}, //20012 #CJK UNIFIED IDEOGRAPH + {0xF1D0, 0x88E5}, //20013 #CJK UNIFIED IDEOGRAPH + {0xF1D1, 0x88F1}, //20014 #CJK UNIFIED IDEOGRAPH + {0xF1D2, 0x891A}, //20015 #CJK UNIFIED IDEOGRAPH + {0xF1D3, 0x88FC}, //20016 #CJK UNIFIED IDEOGRAPH + {0xF1D4, 0x88E8}, //20017 #CJK UNIFIED IDEOGRAPH + {0xF1D5, 0x88FE}, //20018 #CJK UNIFIED IDEOGRAPH + {0xF1D6, 0x88F0}, //20019 #CJK UNIFIED IDEOGRAPH + {0xF1D7, 0x8921}, //20020 #CJK UNIFIED IDEOGRAPH + {0xF1D8, 0x8919}, //20021 #CJK UNIFIED IDEOGRAPH + {0xF1D9, 0x8913}, //20022 #CJK UNIFIED IDEOGRAPH + {0xF1DA, 0x891B}, //20023 #CJK UNIFIED IDEOGRAPH + {0xF1DB, 0x890A}, //20024 #CJK UNIFIED IDEOGRAPH + {0xF1DC, 0x8934}, //20025 #CJK UNIFIED IDEOGRAPH + {0xF1DD, 0x892B}, //20026 #CJK UNIFIED IDEOGRAPH + {0xF1DE, 0x8936}, //20027 #CJK UNIFIED IDEOGRAPH + {0xF1DF, 0x8941}, //20028 #CJK UNIFIED IDEOGRAPH + {0xF1E0, 0x8966}, //20029 #CJK UNIFIED IDEOGRAPH + {0xF1E1, 0x897B}, //20030 #CJK UNIFIED IDEOGRAPH + {0xF1E2, 0x758B}, //20031 #CJK UNIFIED IDEOGRAPH + {0xF1E3, 0x80E5}, //20032 #CJK UNIFIED IDEOGRAPH + {0xF1E4, 0x76B2}, //20033 #CJK UNIFIED IDEOGRAPH + {0xF1E5, 0x76B4}, //20034 #CJK UNIFIED IDEOGRAPH + {0xF1E6, 0x77DC}, //20035 #CJK UNIFIED IDEOGRAPH + {0xF1E7, 0x8012}, //20036 #CJK UNIFIED IDEOGRAPH + {0xF1E8, 0x8014}, //20037 #CJK UNIFIED IDEOGRAPH + {0xF1E9, 0x8016}, //20038 #CJK UNIFIED IDEOGRAPH + {0xF1EA, 0x801C}, //20039 #CJK UNIFIED IDEOGRAPH + {0xF1EB, 0x8020}, //20040 #CJK UNIFIED IDEOGRAPH + {0xF1EC, 0x8022}, //20041 #CJK UNIFIED IDEOGRAPH + {0xF1ED, 0x8025}, //20042 #CJK UNIFIED IDEOGRAPH + {0xF1EE, 0x8026}, //20043 #CJK UNIFIED IDEOGRAPH + {0xF1EF, 0x8027}, //20044 #CJK UNIFIED IDEOGRAPH + {0xF1F0, 0x8029}, //20045 #CJK UNIFIED IDEOGRAPH + {0xF1F1, 0x8028}, //20046 #CJK UNIFIED IDEOGRAPH + {0xF1F2, 0x8031}, //20047 #CJK UNIFIED IDEOGRAPH + {0xF1F3, 0x800B}, //20048 #CJK UNIFIED IDEOGRAPH + {0xF1F4, 0x8035}, //20049 #CJK UNIFIED IDEOGRAPH + {0xF1F5, 0x8043}, //20050 #CJK UNIFIED IDEOGRAPH + {0xF1F6, 0x8046}, //20051 #CJK UNIFIED IDEOGRAPH + {0xF1F7, 0x804D}, //20052 #CJK UNIFIED IDEOGRAPH + {0xF1F8, 0x8052}, //20053 #CJK UNIFIED IDEOGRAPH + {0xF1F9, 0x8069}, //20054 #CJK UNIFIED IDEOGRAPH + {0xF1FA, 0x8071}, //20055 #CJK UNIFIED IDEOGRAPH + {0xF1FB, 0x8983}, //20056 #CJK UNIFIED IDEOGRAPH + {0xF1FC, 0x9878}, //20057 #CJK UNIFIED IDEOGRAPH + {0xF1FD, 0x9880}, //20058 #CJK UNIFIED IDEOGRAPH + {0xF1FE, 0x9883}, //20059 #CJK UNIFIED IDEOGRAPH + {0xF240, 0x99FA}, //20060 #CJK UNIFIED IDEOGRAPH + {0xF241, 0x99FB}, //20061 #CJK UNIFIED IDEOGRAPH + {0xF242, 0x99FC}, //20062 #CJK UNIFIED IDEOGRAPH + {0xF243, 0x99FD}, //20063 #CJK UNIFIED IDEOGRAPH + {0xF244, 0x99FE}, //20064 #CJK UNIFIED IDEOGRAPH + {0xF245, 0x99FF}, //20065 #CJK UNIFIED IDEOGRAPH + {0xF246, 0x9A00}, //20066 #CJK UNIFIED IDEOGRAPH + {0xF247, 0x9A01}, //20067 #CJK UNIFIED IDEOGRAPH + {0xF248, 0x9A02}, //20068 #CJK UNIFIED IDEOGRAPH + {0xF249, 0x9A03}, //20069 #CJK UNIFIED IDEOGRAPH + {0xF24A, 0x9A04}, //20070 #CJK UNIFIED IDEOGRAPH + {0xF24B, 0x9A05}, //20071 #CJK UNIFIED IDEOGRAPH + {0xF24C, 0x9A06}, //20072 #CJK UNIFIED IDEOGRAPH + {0xF24D, 0x9A07}, //20073 #CJK UNIFIED IDEOGRAPH + {0xF24E, 0x9A08}, //20074 #CJK UNIFIED IDEOGRAPH + {0xF24F, 0x9A09}, //20075 #CJK UNIFIED IDEOGRAPH + {0xF250, 0x9A0A}, //20076 #CJK UNIFIED IDEOGRAPH + {0xF251, 0x9A0B}, //20077 #CJK UNIFIED IDEOGRAPH + {0xF252, 0x9A0C}, //20078 #CJK UNIFIED IDEOGRAPH + {0xF253, 0x9A0D}, //20079 #CJK UNIFIED IDEOGRAPH + {0xF254, 0x9A0E}, //20080 #CJK UNIFIED IDEOGRAPH + {0xF255, 0x9A0F}, //20081 #CJK UNIFIED IDEOGRAPH + {0xF256, 0x9A10}, //20082 #CJK UNIFIED IDEOGRAPH + {0xF257, 0x9A11}, //20083 #CJK UNIFIED IDEOGRAPH + {0xF258, 0x9A12}, //20084 #CJK UNIFIED IDEOGRAPH + {0xF259, 0x9A13}, //20085 #CJK UNIFIED IDEOGRAPH + {0xF25A, 0x9A14}, //20086 #CJK UNIFIED IDEOGRAPH + {0xF25B, 0x9A15}, //20087 #CJK UNIFIED IDEOGRAPH + {0xF25C, 0x9A16}, //20088 #CJK UNIFIED IDEOGRAPH + {0xF25D, 0x9A17}, //20089 #CJK UNIFIED IDEOGRAPH + {0xF25E, 0x9A18}, //20090 #CJK UNIFIED IDEOGRAPH + {0xF25F, 0x9A19}, //20091 #CJK UNIFIED IDEOGRAPH + {0xF260, 0x9A1A}, //20092 #CJK UNIFIED IDEOGRAPH + {0xF261, 0x9A1B}, //20093 #CJK UNIFIED IDEOGRAPH + {0xF262, 0x9A1C}, //20094 #CJK UNIFIED IDEOGRAPH + {0xF263, 0x9A1D}, //20095 #CJK UNIFIED IDEOGRAPH + {0xF264, 0x9A1E}, //20096 #CJK UNIFIED IDEOGRAPH + {0xF265, 0x9A1F}, //20097 #CJK UNIFIED IDEOGRAPH + {0xF266, 0x9A20}, //20098 #CJK UNIFIED IDEOGRAPH + {0xF267, 0x9A21}, //20099 #CJK UNIFIED IDEOGRAPH + {0xF268, 0x9A22}, //20100 #CJK UNIFIED IDEOGRAPH + {0xF269, 0x9A23}, //20101 #CJK UNIFIED IDEOGRAPH + {0xF26A, 0x9A24}, //20102 #CJK UNIFIED IDEOGRAPH + {0xF26B, 0x9A25}, //20103 #CJK UNIFIED IDEOGRAPH + {0xF26C, 0x9A26}, //20104 #CJK UNIFIED IDEOGRAPH + {0xF26D, 0x9A27}, //20105 #CJK UNIFIED IDEOGRAPH + {0xF26E, 0x9A28}, //20106 #CJK UNIFIED IDEOGRAPH + {0xF26F, 0x9A29}, //20107 #CJK UNIFIED IDEOGRAPH + {0xF270, 0x9A2A}, //20108 #CJK UNIFIED IDEOGRAPH + {0xF271, 0x9A2B}, //20109 #CJK UNIFIED IDEOGRAPH + {0xF272, 0x9A2C}, //20110 #CJK UNIFIED IDEOGRAPH + {0xF273, 0x9A2D}, //20111 #CJK UNIFIED IDEOGRAPH + {0xF274, 0x9A2E}, //20112 #CJK UNIFIED IDEOGRAPH + {0xF275, 0x9A2F}, //20113 #CJK UNIFIED IDEOGRAPH + {0xF276, 0x9A30}, //20114 #CJK UNIFIED IDEOGRAPH + {0xF277, 0x9A31}, //20115 #CJK UNIFIED IDEOGRAPH + {0xF278, 0x9A32}, //20116 #CJK UNIFIED IDEOGRAPH + {0xF279, 0x9A33}, //20117 #CJK UNIFIED IDEOGRAPH + {0xF27A, 0x9A34}, //20118 #CJK UNIFIED IDEOGRAPH + {0xF27B, 0x9A35}, //20119 #CJK UNIFIED IDEOGRAPH + {0xF27C, 0x9A36}, //20120 #CJK UNIFIED IDEOGRAPH + {0xF27D, 0x9A37}, //20121 #CJK UNIFIED IDEOGRAPH + {0xF27E, 0x9A38}, //20122 #CJK UNIFIED IDEOGRAPH + {0xF280, 0x9A39}, //20123 #CJK UNIFIED IDEOGRAPH + {0xF281, 0x9A3A}, //20124 #CJK UNIFIED IDEOGRAPH + {0xF282, 0x9A3B}, //20125 #CJK UNIFIED IDEOGRAPH + {0xF283, 0x9A3C}, //20126 #CJK UNIFIED IDEOGRAPH + {0xF284, 0x9A3D}, //20127 #CJK UNIFIED IDEOGRAPH + {0xF285, 0x9A3E}, //20128 #CJK UNIFIED IDEOGRAPH + {0xF286, 0x9A3F}, //20129 #CJK UNIFIED IDEOGRAPH + {0xF287, 0x9A40}, //20130 #CJK UNIFIED IDEOGRAPH + {0xF288, 0x9A41}, //20131 #CJK UNIFIED IDEOGRAPH + {0xF289, 0x9A42}, //20132 #CJK UNIFIED IDEOGRAPH + {0xF28A, 0x9A43}, //20133 #CJK UNIFIED IDEOGRAPH + {0xF28B, 0x9A44}, //20134 #CJK UNIFIED IDEOGRAPH + {0xF28C, 0x9A45}, //20135 #CJK UNIFIED IDEOGRAPH + {0xF28D, 0x9A46}, //20136 #CJK UNIFIED IDEOGRAPH + {0xF28E, 0x9A47}, //20137 #CJK UNIFIED IDEOGRAPH + {0xF28F, 0x9A48}, //20138 #CJK UNIFIED IDEOGRAPH + {0xF290, 0x9A49}, //20139 #CJK UNIFIED IDEOGRAPH + {0xF291, 0x9A4A}, //20140 #CJK UNIFIED IDEOGRAPH + {0xF292, 0x9A4B}, //20141 #CJK UNIFIED IDEOGRAPH + {0xF293, 0x9A4C}, //20142 #CJK UNIFIED IDEOGRAPH + {0xF294, 0x9A4D}, //20143 #CJK UNIFIED IDEOGRAPH + {0xF295, 0x9A4E}, //20144 #CJK UNIFIED IDEOGRAPH + {0xF296, 0x9A4F}, //20145 #CJK UNIFIED IDEOGRAPH + {0xF297, 0x9A50}, //20146 #CJK UNIFIED IDEOGRAPH + {0xF298, 0x9A51}, //20147 #CJK UNIFIED IDEOGRAPH + {0xF299, 0x9A52}, //20148 #CJK UNIFIED IDEOGRAPH + {0xF29A, 0x9A53}, //20149 #CJK UNIFIED IDEOGRAPH + {0xF29B, 0x9A54}, //20150 #CJK UNIFIED IDEOGRAPH + {0xF29C, 0x9A55}, //20151 #CJK UNIFIED IDEOGRAPH + {0xF29D, 0x9A56}, //20152 #CJK UNIFIED IDEOGRAPH + {0xF29E, 0x9A57}, //20153 #CJK UNIFIED IDEOGRAPH + {0xF29F, 0x9A58}, //20154 #CJK UNIFIED IDEOGRAPH + {0xF2A0, 0x9A59}, //20155 #CJK UNIFIED IDEOGRAPH + {0xF2A1, 0x9889}, //20156 #CJK UNIFIED IDEOGRAPH + {0xF2A2, 0x988C}, //20157 #CJK UNIFIED IDEOGRAPH + {0xF2A3, 0x988D}, //20158 #CJK UNIFIED IDEOGRAPH + {0xF2A4, 0x988F}, //20159 #CJK UNIFIED IDEOGRAPH + {0xF2A5, 0x9894}, //20160 #CJK UNIFIED IDEOGRAPH + {0xF2A6, 0x989A}, //20161 #CJK UNIFIED IDEOGRAPH + {0xF2A7, 0x989B}, //20162 #CJK UNIFIED IDEOGRAPH + {0xF2A8, 0x989E}, //20163 #CJK UNIFIED IDEOGRAPH + {0xF2A9, 0x989F}, //20164 #CJK UNIFIED IDEOGRAPH + {0xF2AA, 0x98A1}, //20165 #CJK UNIFIED IDEOGRAPH + {0xF2AB, 0x98A2}, //20166 #CJK UNIFIED IDEOGRAPH + {0xF2AC, 0x98A5}, //20167 #CJK UNIFIED IDEOGRAPH + {0xF2AD, 0x98A6}, //20168 #CJK UNIFIED IDEOGRAPH + {0xF2AE, 0x864D}, //20169 #CJK UNIFIED IDEOGRAPH + {0xF2AF, 0x8654}, //20170 #CJK UNIFIED IDEOGRAPH + {0xF2B0, 0x866C}, //20171 #CJK UNIFIED IDEOGRAPH + {0xF2B1, 0x866E}, //20172 #CJK UNIFIED IDEOGRAPH + {0xF2B2, 0x867F}, //20173 #CJK UNIFIED IDEOGRAPH + {0xF2B3, 0x867A}, //20174 #CJK UNIFIED IDEOGRAPH + {0xF2B4, 0x867C}, //20175 #CJK UNIFIED IDEOGRAPH + {0xF2B5, 0x867B}, //20176 #CJK UNIFIED IDEOGRAPH + {0xF2B6, 0x86A8}, //20177 #CJK UNIFIED IDEOGRAPH + {0xF2B7, 0x868D}, //20178 #CJK UNIFIED IDEOGRAPH + {0xF2B8, 0x868B}, //20179 #CJK UNIFIED IDEOGRAPH + {0xF2B9, 0x86AC}, //20180 #CJK UNIFIED IDEOGRAPH + {0xF2BA, 0x869D}, //20181 #CJK UNIFIED IDEOGRAPH + {0xF2BB, 0x86A7}, //20182 #CJK UNIFIED IDEOGRAPH + {0xF2BC, 0x86A3}, //20183 #CJK UNIFIED IDEOGRAPH + {0xF2BD, 0x86AA}, //20184 #CJK UNIFIED IDEOGRAPH + {0xF2BE, 0x8693}, //20185 #CJK UNIFIED IDEOGRAPH + {0xF2BF, 0x86A9}, //20186 #CJK UNIFIED IDEOGRAPH + {0xF2C0, 0x86B6}, //20187 #CJK UNIFIED IDEOGRAPH + {0xF2C1, 0x86C4}, //20188 #CJK UNIFIED IDEOGRAPH + {0xF2C2, 0x86B5}, //20189 #CJK UNIFIED IDEOGRAPH + {0xF2C3, 0x86CE}, //20190 #CJK UNIFIED IDEOGRAPH + {0xF2C4, 0x86B0}, //20191 #CJK UNIFIED IDEOGRAPH + {0xF2C5, 0x86BA}, //20192 #CJK UNIFIED IDEOGRAPH + {0xF2C6, 0x86B1}, //20193 #CJK UNIFIED IDEOGRAPH + {0xF2C7, 0x86AF}, //20194 #CJK UNIFIED IDEOGRAPH + {0xF2C8, 0x86C9}, //20195 #CJK UNIFIED IDEOGRAPH + {0xF2C9, 0x86CF}, //20196 #CJK UNIFIED IDEOGRAPH + {0xF2CA, 0x86B4}, //20197 #CJK UNIFIED IDEOGRAPH + {0xF2CB, 0x86E9}, //20198 #CJK UNIFIED IDEOGRAPH + {0xF2CC, 0x86F1}, //20199 #CJK UNIFIED IDEOGRAPH + {0xF2CD, 0x86F2}, //20200 #CJK UNIFIED IDEOGRAPH + {0xF2CE, 0x86ED}, //20201 #CJK UNIFIED IDEOGRAPH + {0xF2CF, 0x86F3}, //20202 #CJK UNIFIED IDEOGRAPH + {0xF2D0, 0x86D0}, //20203 #CJK UNIFIED IDEOGRAPH + {0xF2D1, 0x8713}, //20204 #CJK UNIFIED IDEOGRAPH + {0xF2D2, 0x86DE}, //20205 #CJK UNIFIED IDEOGRAPH + {0xF2D3, 0x86F4}, //20206 #CJK UNIFIED IDEOGRAPH + {0xF2D4, 0x86DF}, //20207 #CJK UNIFIED IDEOGRAPH + {0xF2D5, 0x86D8}, //20208 #CJK UNIFIED IDEOGRAPH + {0xF2D6, 0x86D1}, //20209 #CJK UNIFIED IDEOGRAPH + {0xF2D7, 0x8703}, //20210 #CJK UNIFIED IDEOGRAPH + {0xF2D8, 0x8707}, //20211 #CJK UNIFIED IDEOGRAPH + {0xF2D9, 0x86F8}, //20212 #CJK UNIFIED IDEOGRAPH + {0xF2DA, 0x8708}, //20213 #CJK UNIFIED IDEOGRAPH + {0xF2DB, 0x870A}, //20214 #CJK UNIFIED IDEOGRAPH + {0xF2DC, 0x870D}, //20215 #CJK UNIFIED IDEOGRAPH + {0xF2DD, 0x8709}, //20216 #CJK UNIFIED IDEOGRAPH + {0xF2DE, 0x8723}, //20217 #CJK UNIFIED IDEOGRAPH + {0xF2DF, 0x873B}, //20218 #CJK UNIFIED IDEOGRAPH + {0xF2E0, 0x871E}, //20219 #CJK UNIFIED IDEOGRAPH + {0xF2E1, 0x8725}, //20220 #CJK UNIFIED IDEOGRAPH + {0xF2E2, 0x872E}, //20221 #CJK UNIFIED IDEOGRAPH + {0xF2E3, 0x871A}, //20222 #CJK UNIFIED IDEOGRAPH + {0xF2E4, 0x873E}, //20223 #CJK UNIFIED IDEOGRAPH + {0xF2E5, 0x8748}, //20224 #CJK UNIFIED IDEOGRAPH + {0xF2E6, 0x8734}, //20225 #CJK UNIFIED IDEOGRAPH + {0xF2E7, 0x8731}, //20226 #CJK UNIFIED IDEOGRAPH + {0xF2E8, 0x8729}, //20227 #CJK UNIFIED IDEOGRAPH + {0xF2E9, 0x8737}, //20228 #CJK UNIFIED IDEOGRAPH + {0xF2EA, 0x873F}, //20229 #CJK UNIFIED IDEOGRAPH + {0xF2EB, 0x8782}, //20230 #CJK UNIFIED IDEOGRAPH + {0xF2EC, 0x8722}, //20231 #CJK UNIFIED IDEOGRAPH + {0xF2ED, 0x877D}, //20232 #CJK UNIFIED IDEOGRAPH + {0xF2EE, 0x877E}, //20233 #CJK UNIFIED IDEOGRAPH + {0xF2EF, 0x877B}, //20234 #CJK UNIFIED IDEOGRAPH + {0xF2F0, 0x8760}, //20235 #CJK UNIFIED IDEOGRAPH + {0xF2F1, 0x8770}, //20236 #CJK UNIFIED IDEOGRAPH + {0xF2F2, 0x874C}, //20237 #CJK UNIFIED IDEOGRAPH + {0xF2F3, 0x876E}, //20238 #CJK UNIFIED IDEOGRAPH + {0xF2F4, 0x878B}, //20239 #CJK UNIFIED IDEOGRAPH + {0xF2F5, 0x8753}, //20240 #CJK UNIFIED IDEOGRAPH + {0xF2F6, 0x8763}, //20241 #CJK UNIFIED IDEOGRAPH + {0xF2F7, 0x877C}, //20242 #CJK UNIFIED IDEOGRAPH + {0xF2F8, 0x8764}, //20243 #CJK UNIFIED IDEOGRAPH + {0xF2F9, 0x8759}, //20244 #CJK UNIFIED IDEOGRAPH + {0xF2FA, 0x8765}, //20245 #CJK UNIFIED IDEOGRAPH + {0xF2FB, 0x8793}, //20246 #CJK UNIFIED IDEOGRAPH + {0xF2FC, 0x87AF}, //20247 #CJK UNIFIED IDEOGRAPH + {0xF2FD, 0x87A8}, //20248 #CJK UNIFIED IDEOGRAPH + {0xF2FE, 0x87D2}, //20249 #CJK UNIFIED IDEOGRAPH + {0xF340, 0x9A5A}, //20250 #CJK UNIFIED IDEOGRAPH + {0xF341, 0x9A5B}, //20251 #CJK UNIFIED IDEOGRAPH + {0xF342, 0x9A5C}, //20252 #CJK UNIFIED IDEOGRAPH + {0xF343, 0x9A5D}, //20253 #CJK UNIFIED IDEOGRAPH + {0xF344, 0x9A5E}, //20254 #CJK UNIFIED IDEOGRAPH + {0xF345, 0x9A5F}, //20255 #CJK UNIFIED IDEOGRAPH + {0xF346, 0x9A60}, //20256 #CJK UNIFIED IDEOGRAPH + {0xF347, 0x9A61}, //20257 #CJK UNIFIED IDEOGRAPH + {0xF348, 0x9A62}, //20258 #CJK UNIFIED IDEOGRAPH + {0xF349, 0x9A63}, //20259 #CJK UNIFIED IDEOGRAPH + {0xF34A, 0x9A64}, //20260 #CJK UNIFIED IDEOGRAPH + {0xF34B, 0x9A65}, //20261 #CJK UNIFIED IDEOGRAPH + {0xF34C, 0x9A66}, //20262 #CJK UNIFIED IDEOGRAPH + {0xF34D, 0x9A67}, //20263 #CJK UNIFIED IDEOGRAPH + {0xF34E, 0x9A68}, //20264 #CJK UNIFIED IDEOGRAPH + {0xF34F, 0x9A69}, //20265 #CJK UNIFIED IDEOGRAPH + {0xF350, 0x9A6A}, //20266 #CJK UNIFIED IDEOGRAPH + {0xF351, 0x9A6B}, //20267 #CJK UNIFIED IDEOGRAPH + {0xF352, 0x9A72}, //20268 #CJK UNIFIED IDEOGRAPH + {0xF353, 0x9A83}, //20269 #CJK UNIFIED IDEOGRAPH + {0xF354, 0x9A89}, //20270 #CJK UNIFIED IDEOGRAPH + {0xF355, 0x9A8D}, //20271 #CJK UNIFIED IDEOGRAPH + {0xF356, 0x9A8E}, //20272 #CJK UNIFIED IDEOGRAPH + {0xF357, 0x9A94}, //20273 #CJK UNIFIED IDEOGRAPH + {0xF358, 0x9A95}, //20274 #CJK UNIFIED IDEOGRAPH + {0xF359, 0x9A99}, //20275 #CJK UNIFIED IDEOGRAPH + {0xF35A, 0x9AA6}, //20276 #CJK UNIFIED IDEOGRAPH + {0xF35B, 0x9AA9}, //20277 #CJK UNIFIED IDEOGRAPH + {0xF35C, 0x9AAA}, //20278 #CJK UNIFIED IDEOGRAPH + {0xF35D, 0x9AAB}, //20279 #CJK UNIFIED IDEOGRAPH + {0xF35E, 0x9AAC}, //20280 #CJK UNIFIED IDEOGRAPH + {0xF35F, 0x9AAD}, //20281 #CJK UNIFIED IDEOGRAPH + {0xF360, 0x9AAE}, //20282 #CJK UNIFIED IDEOGRAPH + {0xF361, 0x9AAF}, //20283 #CJK UNIFIED IDEOGRAPH + {0xF362, 0x9AB2}, //20284 #CJK UNIFIED IDEOGRAPH + {0xF363, 0x9AB3}, //20285 #CJK UNIFIED IDEOGRAPH + {0xF364, 0x9AB4}, //20286 #CJK UNIFIED IDEOGRAPH + {0xF365, 0x9AB5}, //20287 #CJK UNIFIED IDEOGRAPH + {0xF366, 0x9AB9}, //20288 #CJK UNIFIED IDEOGRAPH + {0xF367, 0x9ABB}, //20289 #CJK UNIFIED IDEOGRAPH + {0xF368, 0x9ABD}, //20290 #CJK UNIFIED IDEOGRAPH + {0xF369, 0x9ABE}, //20291 #CJK UNIFIED IDEOGRAPH + {0xF36A, 0x9ABF}, //20292 #CJK UNIFIED IDEOGRAPH + {0xF36B, 0x9AC3}, //20293 #CJK UNIFIED IDEOGRAPH + {0xF36C, 0x9AC4}, //20294 #CJK UNIFIED IDEOGRAPH + {0xF36D, 0x9AC6}, //20295 #CJK UNIFIED IDEOGRAPH + {0xF36E, 0x9AC7}, //20296 #CJK UNIFIED IDEOGRAPH + {0xF36F, 0x9AC8}, //20297 #CJK UNIFIED IDEOGRAPH + {0xF370, 0x9AC9}, //20298 #CJK UNIFIED IDEOGRAPH + {0xF371, 0x9ACA}, //20299 #CJK UNIFIED IDEOGRAPH + {0xF372, 0x9ACD}, //20300 #CJK UNIFIED IDEOGRAPH + {0xF373, 0x9ACE}, //20301 #CJK UNIFIED IDEOGRAPH + {0xF374, 0x9ACF}, //20302 #CJK UNIFIED IDEOGRAPH + {0xF375, 0x9AD0}, //20303 #CJK UNIFIED IDEOGRAPH + {0xF376, 0x9AD2}, //20304 #CJK UNIFIED IDEOGRAPH + {0xF377, 0x9AD4}, //20305 #CJK UNIFIED IDEOGRAPH + {0xF378, 0x9AD5}, //20306 #CJK UNIFIED IDEOGRAPH + {0xF379, 0x9AD6}, //20307 #CJK UNIFIED IDEOGRAPH + {0xF37A, 0x9AD7}, //20308 #CJK UNIFIED IDEOGRAPH + {0xF37B, 0x9AD9}, //20309 #CJK UNIFIED IDEOGRAPH + {0xF37C, 0x9ADA}, //20310 #CJK UNIFIED IDEOGRAPH + {0xF37D, 0x9ADB}, //20311 #CJK UNIFIED IDEOGRAPH + {0xF37E, 0x9ADC}, //20312 #CJK UNIFIED IDEOGRAPH + {0xF380, 0x9ADD}, //20313 #CJK UNIFIED IDEOGRAPH + {0xF381, 0x9ADE}, //20314 #CJK UNIFIED IDEOGRAPH + {0xF382, 0x9AE0}, //20315 #CJK UNIFIED IDEOGRAPH + {0xF383, 0x9AE2}, //20316 #CJK UNIFIED IDEOGRAPH + {0xF384, 0x9AE3}, //20317 #CJK UNIFIED IDEOGRAPH + {0xF385, 0x9AE4}, //20318 #CJK UNIFIED IDEOGRAPH + {0xF386, 0x9AE5}, //20319 #CJK UNIFIED IDEOGRAPH + {0xF387, 0x9AE7}, //20320 #CJK UNIFIED IDEOGRAPH + {0xF388, 0x9AE8}, //20321 #CJK UNIFIED IDEOGRAPH + {0xF389, 0x9AE9}, //20322 #CJK UNIFIED IDEOGRAPH + {0xF38A, 0x9AEA}, //20323 #CJK UNIFIED IDEOGRAPH + {0xF38B, 0x9AEC}, //20324 #CJK UNIFIED IDEOGRAPH + {0xF38C, 0x9AEE}, //20325 #CJK UNIFIED IDEOGRAPH + {0xF38D, 0x9AF0}, //20326 #CJK UNIFIED IDEOGRAPH + {0xF38E, 0x9AF1}, //20327 #CJK UNIFIED IDEOGRAPH + {0xF38F, 0x9AF2}, //20328 #CJK UNIFIED IDEOGRAPH + {0xF390, 0x9AF3}, //20329 #CJK UNIFIED IDEOGRAPH + {0xF391, 0x9AF4}, //20330 #CJK UNIFIED IDEOGRAPH + {0xF392, 0x9AF5}, //20331 #CJK UNIFIED IDEOGRAPH + {0xF393, 0x9AF6}, //20332 #CJK UNIFIED IDEOGRAPH + {0xF394, 0x9AF7}, //20333 #CJK UNIFIED IDEOGRAPH + {0xF395, 0x9AF8}, //20334 #CJK UNIFIED IDEOGRAPH + {0xF396, 0x9AFA}, //20335 #CJK UNIFIED IDEOGRAPH + {0xF397, 0x9AFC}, //20336 #CJK UNIFIED IDEOGRAPH + {0xF398, 0x9AFD}, //20337 #CJK UNIFIED IDEOGRAPH + {0xF399, 0x9AFE}, //20338 #CJK UNIFIED IDEOGRAPH + {0xF39A, 0x9AFF}, //20339 #CJK UNIFIED IDEOGRAPH + {0xF39B, 0x9B00}, //20340 #CJK UNIFIED IDEOGRAPH + {0xF39C, 0x9B01}, //20341 #CJK UNIFIED IDEOGRAPH + {0xF39D, 0x9B02}, //20342 #CJK UNIFIED IDEOGRAPH + {0xF39E, 0x9B04}, //20343 #CJK UNIFIED IDEOGRAPH + {0xF39F, 0x9B05}, //20344 #CJK UNIFIED IDEOGRAPH + {0xF3A0, 0x9B06}, //20345 #CJK UNIFIED IDEOGRAPH + {0xF3A1, 0x87C6}, //20346 #CJK UNIFIED IDEOGRAPH + {0xF3A2, 0x8788}, //20347 #CJK UNIFIED IDEOGRAPH + {0xF3A3, 0x8785}, //20348 #CJK UNIFIED IDEOGRAPH + {0xF3A4, 0x87AD}, //20349 #CJK UNIFIED IDEOGRAPH + {0xF3A5, 0x8797}, //20350 #CJK UNIFIED IDEOGRAPH + {0xF3A6, 0x8783}, //20351 #CJK UNIFIED IDEOGRAPH + {0xF3A7, 0x87AB}, //20352 #CJK UNIFIED IDEOGRAPH + {0xF3A8, 0x87E5}, //20353 #CJK UNIFIED IDEOGRAPH + {0xF3A9, 0x87AC}, //20354 #CJK UNIFIED IDEOGRAPH + {0xF3AA, 0x87B5}, //20355 #CJK UNIFIED IDEOGRAPH + {0xF3AB, 0x87B3}, //20356 #CJK UNIFIED IDEOGRAPH + {0xF3AC, 0x87CB}, //20357 #CJK UNIFIED IDEOGRAPH + {0xF3AD, 0x87D3}, //20358 #CJK UNIFIED IDEOGRAPH + {0xF3AE, 0x87BD}, //20359 #CJK UNIFIED IDEOGRAPH + {0xF3AF, 0x87D1}, //20360 #CJK UNIFIED IDEOGRAPH + {0xF3B0, 0x87C0}, //20361 #CJK UNIFIED IDEOGRAPH + {0xF3B1, 0x87CA}, //20362 #CJK UNIFIED IDEOGRAPH + {0xF3B2, 0x87DB}, //20363 #CJK UNIFIED IDEOGRAPH + {0xF3B3, 0x87EA}, //20364 #CJK UNIFIED IDEOGRAPH + {0xF3B4, 0x87E0}, //20365 #CJK UNIFIED IDEOGRAPH + {0xF3B5, 0x87EE}, //20366 #CJK UNIFIED IDEOGRAPH + {0xF3B6, 0x8816}, //20367 #CJK UNIFIED IDEOGRAPH + {0xF3B7, 0x8813}, //20368 #CJK UNIFIED IDEOGRAPH + {0xF3B8, 0x87FE}, //20369 #CJK UNIFIED IDEOGRAPH + {0xF3B9, 0x880A}, //20370 #CJK UNIFIED IDEOGRAPH + {0xF3BA, 0x881B}, //20371 #CJK UNIFIED IDEOGRAPH + {0xF3BB, 0x8821}, //20372 #CJK UNIFIED IDEOGRAPH + {0xF3BC, 0x8839}, //20373 #CJK UNIFIED IDEOGRAPH + {0xF3BD, 0x883C}, //20374 #CJK UNIFIED IDEOGRAPH + {0xF3BE, 0x7F36}, //20375 #CJK UNIFIED IDEOGRAPH + {0xF3BF, 0x7F42}, //20376 #CJK UNIFIED IDEOGRAPH + {0xF3C0, 0x7F44}, //20377 #CJK UNIFIED IDEOGRAPH + {0xF3C1, 0x7F45}, //20378 #CJK UNIFIED IDEOGRAPH + {0xF3C2, 0x8210}, //20379 #CJK UNIFIED IDEOGRAPH + {0xF3C3, 0x7AFA}, //20380 #CJK UNIFIED IDEOGRAPH + {0xF3C4, 0x7AFD}, //20381 #CJK UNIFIED IDEOGRAPH + {0xF3C5, 0x7B08}, //20382 #CJK UNIFIED IDEOGRAPH + {0xF3C6, 0x7B03}, //20383 #CJK UNIFIED IDEOGRAPH + {0xF3C7, 0x7B04}, //20384 #CJK UNIFIED IDEOGRAPH + {0xF3C8, 0x7B15}, //20385 #CJK UNIFIED IDEOGRAPH + {0xF3C9, 0x7B0A}, //20386 #CJK UNIFIED IDEOGRAPH + {0xF3CA, 0x7B2B}, //20387 #CJK UNIFIED IDEOGRAPH + {0xF3CB, 0x7B0F}, //20388 #CJK UNIFIED IDEOGRAPH + {0xF3CC, 0x7B47}, //20389 #CJK UNIFIED IDEOGRAPH + {0xF3CD, 0x7B38}, //20390 #CJK UNIFIED IDEOGRAPH + {0xF3CE, 0x7B2A}, //20391 #CJK UNIFIED IDEOGRAPH + {0xF3CF, 0x7B19}, //20392 #CJK UNIFIED IDEOGRAPH + {0xF3D0, 0x7B2E}, //20393 #CJK UNIFIED IDEOGRAPH + {0xF3D1, 0x7B31}, //20394 #CJK UNIFIED IDEOGRAPH + {0xF3D2, 0x7B20}, //20395 #CJK UNIFIED IDEOGRAPH + {0xF3D3, 0x7B25}, //20396 #CJK UNIFIED IDEOGRAPH + {0xF3D4, 0x7B24}, //20397 #CJK UNIFIED IDEOGRAPH + {0xF3D5, 0x7B33}, //20398 #CJK UNIFIED IDEOGRAPH + {0xF3D6, 0x7B3E}, //20399 #CJK UNIFIED IDEOGRAPH + {0xF3D7, 0x7B1E}, //20400 #CJK UNIFIED IDEOGRAPH + {0xF3D8, 0x7B58}, //20401 #CJK UNIFIED IDEOGRAPH + {0xF3D9, 0x7B5A}, //20402 #CJK UNIFIED IDEOGRAPH + {0xF3DA, 0x7B45}, //20403 #CJK UNIFIED IDEOGRAPH + {0xF3DB, 0x7B75}, //20404 #CJK UNIFIED IDEOGRAPH + {0xF3DC, 0x7B4C}, //20405 #CJK UNIFIED IDEOGRAPH + {0xF3DD, 0x7B5D}, //20406 #CJK UNIFIED IDEOGRAPH + {0xF3DE, 0x7B60}, //20407 #CJK UNIFIED IDEOGRAPH + {0xF3DF, 0x7B6E}, //20408 #CJK UNIFIED IDEOGRAPH + {0xF3E0, 0x7B7B}, //20409 #CJK UNIFIED IDEOGRAPH + {0xF3E1, 0x7B62}, //20410 #CJK UNIFIED IDEOGRAPH + {0xF3E2, 0x7B72}, //20411 #CJK UNIFIED IDEOGRAPH + {0xF3E3, 0x7B71}, //20412 #CJK UNIFIED IDEOGRAPH + {0xF3E4, 0x7B90}, //20413 #CJK UNIFIED IDEOGRAPH + {0xF3E5, 0x7BA6}, //20414 #CJK UNIFIED IDEOGRAPH + {0xF3E6, 0x7BA7}, //20415 #CJK UNIFIED IDEOGRAPH + {0xF3E7, 0x7BB8}, //20416 #CJK UNIFIED IDEOGRAPH + {0xF3E8, 0x7BAC}, //20417 #CJK UNIFIED IDEOGRAPH + {0xF3E9, 0x7B9D}, //20418 #CJK UNIFIED IDEOGRAPH + {0xF3EA, 0x7BA8}, //20419 #CJK UNIFIED IDEOGRAPH + {0xF3EB, 0x7B85}, //20420 #CJK UNIFIED IDEOGRAPH + {0xF3EC, 0x7BAA}, //20421 #CJK UNIFIED IDEOGRAPH + {0xF3ED, 0x7B9C}, //20422 #CJK UNIFIED IDEOGRAPH + {0xF3EE, 0x7BA2}, //20423 #CJK UNIFIED IDEOGRAPH + {0xF3EF, 0x7BAB}, //20424 #CJK UNIFIED IDEOGRAPH + {0xF3F0, 0x7BB4}, //20425 #CJK UNIFIED IDEOGRAPH + {0xF3F1, 0x7BD1}, //20426 #CJK UNIFIED IDEOGRAPH + {0xF3F2, 0x7BC1}, //20427 #CJK UNIFIED IDEOGRAPH + {0xF3F3, 0x7BCC}, //20428 #CJK UNIFIED IDEOGRAPH + {0xF3F4, 0x7BDD}, //20429 #CJK UNIFIED IDEOGRAPH + {0xF3F5, 0x7BDA}, //20430 #CJK UNIFIED IDEOGRAPH + {0xF3F6, 0x7BE5}, //20431 #CJK UNIFIED IDEOGRAPH + {0xF3F7, 0x7BE6}, //20432 #CJK UNIFIED IDEOGRAPH + {0xF3F8, 0x7BEA}, //20433 #CJK UNIFIED IDEOGRAPH + {0xF3F9, 0x7C0C}, //20434 #CJK UNIFIED IDEOGRAPH + {0xF3FA, 0x7BFE}, //20435 #CJK UNIFIED IDEOGRAPH + {0xF3FB, 0x7BFC}, //20436 #CJK UNIFIED IDEOGRAPH + {0xF3FC, 0x7C0F}, //20437 #CJK UNIFIED IDEOGRAPH + {0xF3FD, 0x7C16}, //20438 #CJK UNIFIED IDEOGRAPH + {0xF3FE, 0x7C0B}, //20439 #CJK UNIFIED IDEOGRAPH + {0xF440, 0x9B07}, //20440 #CJK UNIFIED IDEOGRAPH + {0xF441, 0x9B09}, //20441 #CJK UNIFIED IDEOGRAPH + {0xF442, 0x9B0A}, //20442 #CJK UNIFIED IDEOGRAPH + {0xF443, 0x9B0B}, //20443 #CJK UNIFIED IDEOGRAPH + {0xF444, 0x9B0C}, //20444 #CJK UNIFIED IDEOGRAPH + {0xF445, 0x9B0D}, //20445 #CJK UNIFIED IDEOGRAPH + {0xF446, 0x9B0E}, //20446 #CJK UNIFIED IDEOGRAPH + {0xF447, 0x9B10}, //20447 #CJK UNIFIED IDEOGRAPH + {0xF448, 0x9B11}, //20448 #CJK UNIFIED IDEOGRAPH + {0xF449, 0x9B12}, //20449 #CJK UNIFIED IDEOGRAPH + {0xF44A, 0x9B14}, //20450 #CJK UNIFIED IDEOGRAPH + {0xF44B, 0x9B15}, //20451 #CJK UNIFIED IDEOGRAPH + {0xF44C, 0x9B16}, //20452 #CJK UNIFIED IDEOGRAPH + {0xF44D, 0x9B17}, //20453 #CJK UNIFIED IDEOGRAPH + {0xF44E, 0x9B18}, //20454 #CJK UNIFIED IDEOGRAPH + {0xF44F, 0x9B19}, //20455 #CJK UNIFIED IDEOGRAPH + {0xF450, 0x9B1A}, //20456 #CJK UNIFIED IDEOGRAPH + {0xF451, 0x9B1B}, //20457 #CJK UNIFIED IDEOGRAPH + {0xF452, 0x9B1C}, //20458 #CJK UNIFIED IDEOGRAPH + {0xF453, 0x9B1D}, //20459 #CJK UNIFIED IDEOGRAPH + {0xF454, 0x9B1E}, //20460 #CJK UNIFIED IDEOGRAPH + {0xF455, 0x9B20}, //20461 #CJK UNIFIED IDEOGRAPH + {0xF456, 0x9B21}, //20462 #CJK UNIFIED IDEOGRAPH + {0xF457, 0x9B22}, //20463 #CJK UNIFIED IDEOGRAPH + {0xF458, 0x9B24}, //20464 #CJK UNIFIED IDEOGRAPH + {0xF459, 0x9B25}, //20465 #CJK UNIFIED IDEOGRAPH + {0xF45A, 0x9B26}, //20466 #CJK UNIFIED IDEOGRAPH + {0xF45B, 0x9B27}, //20467 #CJK UNIFIED IDEOGRAPH + {0xF45C, 0x9B28}, //20468 #CJK UNIFIED IDEOGRAPH + {0xF45D, 0x9B29}, //20469 #CJK UNIFIED IDEOGRAPH + {0xF45E, 0x9B2A}, //20470 #CJK UNIFIED IDEOGRAPH + {0xF45F, 0x9B2B}, //20471 #CJK UNIFIED IDEOGRAPH + {0xF460, 0x9B2C}, //20472 #CJK UNIFIED IDEOGRAPH + {0xF461, 0x9B2D}, //20473 #CJK UNIFIED IDEOGRAPH + {0xF462, 0x9B2E}, //20474 #CJK UNIFIED IDEOGRAPH + {0xF463, 0x9B30}, //20475 #CJK UNIFIED IDEOGRAPH + {0xF464, 0x9B31}, //20476 #CJK UNIFIED IDEOGRAPH + {0xF465, 0x9B33}, //20477 #CJK UNIFIED IDEOGRAPH + {0xF466, 0x9B34}, //20478 #CJK UNIFIED IDEOGRAPH + {0xF467, 0x9B35}, //20479 #CJK UNIFIED IDEOGRAPH + {0xF468, 0x9B36}, //20480 #CJK UNIFIED IDEOGRAPH + {0xF469, 0x9B37}, //20481 #CJK UNIFIED IDEOGRAPH + {0xF46A, 0x9B38}, //20482 #CJK UNIFIED IDEOGRAPH + {0xF46B, 0x9B39}, //20483 #CJK UNIFIED IDEOGRAPH + {0xF46C, 0x9B3A}, //20484 #CJK UNIFIED IDEOGRAPH + {0xF46D, 0x9B3D}, //20485 #CJK UNIFIED IDEOGRAPH + {0xF46E, 0x9B3E}, //20486 #CJK UNIFIED IDEOGRAPH + {0xF46F, 0x9B3F}, //20487 #CJK UNIFIED IDEOGRAPH + {0xF470, 0x9B40}, //20488 #CJK UNIFIED IDEOGRAPH + {0xF471, 0x9B46}, //20489 #CJK UNIFIED IDEOGRAPH + {0xF472, 0x9B4A}, //20490 #CJK UNIFIED IDEOGRAPH + {0xF473, 0x9B4B}, //20491 #CJK UNIFIED IDEOGRAPH + {0xF474, 0x9B4C}, //20492 #CJK UNIFIED IDEOGRAPH + {0xF475, 0x9B4E}, //20493 #CJK UNIFIED IDEOGRAPH + {0xF476, 0x9B50}, //20494 #CJK UNIFIED IDEOGRAPH + {0xF477, 0x9B52}, //20495 #CJK UNIFIED IDEOGRAPH + {0xF478, 0x9B53}, //20496 #CJK UNIFIED IDEOGRAPH + {0xF479, 0x9B55}, //20497 #CJK UNIFIED IDEOGRAPH + {0xF47A, 0x9B56}, //20498 #CJK UNIFIED IDEOGRAPH + {0xF47B, 0x9B57}, //20499 #CJK UNIFIED IDEOGRAPH + {0xF47C, 0x9B58}, //20500 #CJK UNIFIED IDEOGRAPH + {0xF47D, 0x9B59}, //20501 #CJK UNIFIED IDEOGRAPH + {0xF47E, 0x9B5A}, //20502 #CJK UNIFIED IDEOGRAPH + {0xF480, 0x9B5B}, //20503 #CJK UNIFIED IDEOGRAPH + {0xF481, 0x9B5C}, //20504 #CJK UNIFIED IDEOGRAPH + {0xF482, 0x9B5D}, //20505 #CJK UNIFIED IDEOGRAPH + {0xF483, 0x9B5E}, //20506 #CJK UNIFIED IDEOGRAPH + {0xF484, 0x9B5F}, //20507 #CJK UNIFIED IDEOGRAPH + {0xF485, 0x9B60}, //20508 #CJK UNIFIED IDEOGRAPH + {0xF486, 0x9B61}, //20509 #CJK UNIFIED IDEOGRAPH + {0xF487, 0x9B62}, //20510 #CJK UNIFIED IDEOGRAPH + {0xF488, 0x9B63}, //20511 #CJK UNIFIED IDEOGRAPH + {0xF489, 0x9B64}, //20512 #CJK UNIFIED IDEOGRAPH + {0xF48A, 0x9B65}, //20513 #CJK UNIFIED IDEOGRAPH + {0xF48B, 0x9B66}, //20514 #CJK UNIFIED IDEOGRAPH + {0xF48C, 0x9B67}, //20515 #CJK UNIFIED IDEOGRAPH + {0xF48D, 0x9B68}, //20516 #CJK UNIFIED IDEOGRAPH + {0xF48E, 0x9B69}, //20517 #CJK UNIFIED IDEOGRAPH + {0xF48F, 0x9B6A}, //20518 #CJK UNIFIED IDEOGRAPH + {0xF490, 0x9B6B}, //20519 #CJK UNIFIED IDEOGRAPH + {0xF491, 0x9B6C}, //20520 #CJK UNIFIED IDEOGRAPH + {0xF492, 0x9B6D}, //20521 #CJK UNIFIED IDEOGRAPH + {0xF493, 0x9B6E}, //20522 #CJK UNIFIED IDEOGRAPH + {0xF494, 0x9B6F}, //20523 #CJK UNIFIED IDEOGRAPH + {0xF495, 0x9B70}, //20524 #CJK UNIFIED IDEOGRAPH + {0xF496, 0x9B71}, //20525 #CJK UNIFIED IDEOGRAPH + {0xF497, 0x9B72}, //20526 #CJK UNIFIED IDEOGRAPH + {0xF498, 0x9B73}, //20527 #CJK UNIFIED IDEOGRAPH + {0xF499, 0x9B74}, //20528 #CJK UNIFIED IDEOGRAPH + {0xF49A, 0x9B75}, //20529 #CJK UNIFIED IDEOGRAPH + {0xF49B, 0x9B76}, //20530 #CJK UNIFIED IDEOGRAPH + {0xF49C, 0x9B77}, //20531 #CJK UNIFIED IDEOGRAPH + {0xF49D, 0x9B78}, //20532 #CJK UNIFIED IDEOGRAPH + {0xF49E, 0x9B79}, //20533 #CJK UNIFIED IDEOGRAPH + {0xF49F, 0x9B7A}, //20534 #CJK UNIFIED IDEOGRAPH + {0xF4A0, 0x9B7B}, //20535 #CJK UNIFIED IDEOGRAPH + {0xF4A1, 0x7C1F}, //20536 #CJK UNIFIED IDEOGRAPH + {0xF4A2, 0x7C2A}, //20537 #CJK UNIFIED IDEOGRAPH + {0xF4A3, 0x7C26}, //20538 #CJK UNIFIED IDEOGRAPH + {0xF4A4, 0x7C38}, //20539 #CJK UNIFIED IDEOGRAPH + {0xF4A5, 0x7C41}, //20540 #CJK UNIFIED IDEOGRAPH + {0xF4A6, 0x7C40}, //20541 #CJK UNIFIED IDEOGRAPH + {0xF4A7, 0x81FE}, //20542 #CJK UNIFIED IDEOGRAPH + {0xF4A8, 0x8201}, //20543 #CJK UNIFIED IDEOGRAPH + {0xF4A9, 0x8202}, //20544 #CJK UNIFIED IDEOGRAPH + {0xF4AA, 0x8204}, //20545 #CJK UNIFIED IDEOGRAPH + {0xF4AB, 0x81EC}, //20546 #CJK UNIFIED IDEOGRAPH + {0xF4AC, 0x8844}, //20547 #CJK UNIFIED IDEOGRAPH + {0xF4AD, 0x8221}, //20548 #CJK UNIFIED IDEOGRAPH + {0xF4AE, 0x8222}, //20549 #CJK UNIFIED IDEOGRAPH + {0xF4AF, 0x8223}, //20550 #CJK UNIFIED IDEOGRAPH + {0xF4B0, 0x822D}, //20551 #CJK UNIFIED IDEOGRAPH + {0xF4B1, 0x822F}, //20552 #CJK UNIFIED IDEOGRAPH + {0xF4B2, 0x8228}, //20553 #CJK UNIFIED IDEOGRAPH + {0xF4B3, 0x822B}, //20554 #CJK UNIFIED IDEOGRAPH + {0xF4B4, 0x8238}, //20555 #CJK UNIFIED IDEOGRAPH + {0xF4B5, 0x823B}, //20556 #CJK UNIFIED IDEOGRAPH + {0xF4B6, 0x8233}, //20557 #CJK UNIFIED IDEOGRAPH + {0xF4B7, 0x8234}, //20558 #CJK UNIFIED IDEOGRAPH + {0xF4B8, 0x823E}, //20559 #CJK UNIFIED IDEOGRAPH + {0xF4B9, 0x8244}, //20560 #CJK UNIFIED IDEOGRAPH + {0xF4BA, 0x8249}, //20561 #CJK UNIFIED IDEOGRAPH + {0xF4BB, 0x824B}, //20562 #CJK UNIFIED IDEOGRAPH + {0xF4BC, 0x824F}, //20563 #CJK UNIFIED IDEOGRAPH + {0xF4BD, 0x825A}, //20564 #CJK UNIFIED IDEOGRAPH + {0xF4BE, 0x825F}, //20565 #CJK UNIFIED IDEOGRAPH + {0xF4BF, 0x8268}, //20566 #CJK UNIFIED IDEOGRAPH + {0xF4C0, 0x887E}, //20567 #CJK UNIFIED IDEOGRAPH + {0xF4C1, 0x8885}, //20568 #CJK UNIFIED IDEOGRAPH + {0xF4C2, 0x8888}, //20569 #CJK UNIFIED IDEOGRAPH + {0xF4C3, 0x88D8}, //20570 #CJK UNIFIED IDEOGRAPH + {0xF4C4, 0x88DF}, //20571 #CJK UNIFIED IDEOGRAPH + {0xF4C5, 0x895E}, //20572 #CJK UNIFIED IDEOGRAPH + {0xF4C6, 0x7F9D}, //20573 #CJK UNIFIED IDEOGRAPH + {0xF4C7, 0x7F9F}, //20574 #CJK UNIFIED IDEOGRAPH + {0xF4C8, 0x7FA7}, //20575 #CJK UNIFIED IDEOGRAPH + {0xF4C9, 0x7FAF}, //20576 #CJK UNIFIED IDEOGRAPH + {0xF4CA, 0x7FB0}, //20577 #CJK UNIFIED IDEOGRAPH + {0xF4CB, 0x7FB2}, //20578 #CJK UNIFIED IDEOGRAPH + {0xF4CC, 0x7C7C}, //20579 #CJK UNIFIED IDEOGRAPH + {0xF4CD, 0x6549}, //20580 #CJK UNIFIED IDEOGRAPH + {0xF4CE, 0x7C91}, //20581 #CJK UNIFIED IDEOGRAPH + {0xF4CF, 0x7C9D}, //20582 #CJK UNIFIED IDEOGRAPH + {0xF4D0, 0x7C9C}, //20583 #CJK UNIFIED IDEOGRAPH + {0xF4D1, 0x7C9E}, //20584 #CJK UNIFIED IDEOGRAPH + {0xF4D2, 0x7CA2}, //20585 #CJK UNIFIED IDEOGRAPH + {0xF4D3, 0x7CB2}, //20586 #CJK UNIFIED IDEOGRAPH + {0xF4D4, 0x7CBC}, //20587 #CJK UNIFIED IDEOGRAPH + {0xF4D5, 0x7CBD}, //20588 #CJK UNIFIED IDEOGRAPH + {0xF4D6, 0x7CC1}, //20589 #CJK UNIFIED IDEOGRAPH + {0xF4D7, 0x7CC7}, //20590 #CJK UNIFIED IDEOGRAPH + {0xF4D8, 0x7CCC}, //20591 #CJK UNIFIED IDEOGRAPH + {0xF4D9, 0x7CCD}, //20592 #CJK UNIFIED IDEOGRAPH + {0xF4DA, 0x7CC8}, //20593 #CJK UNIFIED IDEOGRAPH + {0xF4DB, 0x7CC5}, //20594 #CJK UNIFIED IDEOGRAPH + {0xF4DC, 0x7CD7}, //20595 #CJK UNIFIED IDEOGRAPH + {0xF4DD, 0x7CE8}, //20596 #CJK UNIFIED IDEOGRAPH + {0xF4DE, 0x826E}, //20597 #CJK UNIFIED IDEOGRAPH + {0xF4DF, 0x66A8}, //20598 #CJK UNIFIED IDEOGRAPH + {0xF4E0, 0x7FBF}, //20599 #CJK UNIFIED IDEOGRAPH + {0xF4E1, 0x7FCE}, //20600 #CJK UNIFIED IDEOGRAPH + {0xF4E2, 0x7FD5}, //20601 #CJK UNIFIED IDEOGRAPH + {0xF4E3, 0x7FE5}, //20602 #CJK UNIFIED IDEOGRAPH + {0xF4E4, 0x7FE1}, //20603 #CJK UNIFIED IDEOGRAPH + {0xF4E5, 0x7FE6}, //20604 #CJK UNIFIED IDEOGRAPH + {0xF4E6, 0x7FE9}, //20605 #CJK UNIFIED IDEOGRAPH + {0xF4E7, 0x7FEE}, //20606 #CJK UNIFIED IDEOGRAPH + {0xF4E8, 0x7FF3}, //20607 #CJK UNIFIED IDEOGRAPH + {0xF4E9, 0x7CF8}, //20608 #CJK UNIFIED IDEOGRAPH + {0xF4EA, 0x7D77}, //20609 #CJK UNIFIED IDEOGRAPH + {0xF4EB, 0x7DA6}, //20610 #CJK UNIFIED IDEOGRAPH + {0xF4EC, 0x7DAE}, //20611 #CJK UNIFIED IDEOGRAPH + {0xF4ED, 0x7E47}, //20612 #CJK UNIFIED IDEOGRAPH + {0xF4EE, 0x7E9B}, //20613 #CJK UNIFIED IDEOGRAPH + {0xF4EF, 0x9EB8}, //20614 #CJK UNIFIED IDEOGRAPH + {0xF4F0, 0x9EB4}, //20615 #CJK UNIFIED IDEOGRAPH + {0xF4F1, 0x8D73}, //20616 #CJK UNIFIED IDEOGRAPH + {0xF4F2, 0x8D84}, //20617 #CJK UNIFIED IDEOGRAPH + {0xF4F3, 0x8D94}, //20618 #CJK UNIFIED IDEOGRAPH + {0xF4F4, 0x8D91}, //20619 #CJK UNIFIED IDEOGRAPH + {0xF4F5, 0x8DB1}, //20620 #CJK UNIFIED IDEOGRAPH + {0xF4F6, 0x8D67}, //20621 #CJK UNIFIED IDEOGRAPH + {0xF4F7, 0x8D6D}, //20622 #CJK UNIFIED IDEOGRAPH + {0xF4F8, 0x8C47}, //20623 #CJK UNIFIED IDEOGRAPH + {0xF4F9, 0x8C49}, //20624 #CJK UNIFIED IDEOGRAPH + {0xF4FA, 0x914A}, //20625 #CJK UNIFIED IDEOGRAPH + {0xF4FB, 0x9150}, //20626 #CJK UNIFIED IDEOGRAPH + {0xF4FC, 0x914E}, //20627 #CJK UNIFIED IDEOGRAPH + {0xF4FD, 0x914F}, //20628 #CJK UNIFIED IDEOGRAPH + {0xF4FE, 0x9164}, //20629 #CJK UNIFIED IDEOGRAPH + {0xF540, 0x9B7C}, //20630 #CJK UNIFIED IDEOGRAPH + {0xF541, 0x9B7D}, //20631 #CJK UNIFIED IDEOGRAPH + {0xF542, 0x9B7E}, //20632 #CJK UNIFIED IDEOGRAPH + {0xF543, 0x9B7F}, //20633 #CJK UNIFIED IDEOGRAPH + {0xF544, 0x9B80}, //20634 #CJK UNIFIED IDEOGRAPH + {0xF545, 0x9B81}, //20635 #CJK UNIFIED IDEOGRAPH + {0xF546, 0x9B82}, //20636 #CJK UNIFIED IDEOGRAPH + {0xF547, 0x9B83}, //20637 #CJK UNIFIED IDEOGRAPH + {0xF548, 0x9B84}, //20638 #CJK UNIFIED IDEOGRAPH + {0xF549, 0x9B85}, //20639 #CJK UNIFIED IDEOGRAPH + {0xF54A, 0x9B86}, //20640 #CJK UNIFIED IDEOGRAPH + {0xF54B, 0x9B87}, //20641 #CJK UNIFIED IDEOGRAPH + {0xF54C, 0x9B88}, //20642 #CJK UNIFIED IDEOGRAPH + {0xF54D, 0x9B89}, //20643 #CJK UNIFIED IDEOGRAPH + {0xF54E, 0x9B8A}, //20644 #CJK UNIFIED IDEOGRAPH + {0xF54F, 0x9B8B}, //20645 #CJK UNIFIED IDEOGRAPH + {0xF550, 0x9B8C}, //20646 #CJK UNIFIED IDEOGRAPH + {0xF551, 0x9B8D}, //20647 #CJK UNIFIED IDEOGRAPH + {0xF552, 0x9B8E}, //20648 #CJK UNIFIED IDEOGRAPH + {0xF553, 0x9B8F}, //20649 #CJK UNIFIED IDEOGRAPH + {0xF554, 0x9B90}, //20650 #CJK UNIFIED IDEOGRAPH + {0xF555, 0x9B91}, //20651 #CJK UNIFIED IDEOGRAPH + {0xF556, 0x9B92}, //20652 #CJK UNIFIED IDEOGRAPH + {0xF557, 0x9B93}, //20653 #CJK UNIFIED IDEOGRAPH + {0xF558, 0x9B94}, //20654 #CJK UNIFIED IDEOGRAPH + {0xF559, 0x9B95}, //20655 #CJK UNIFIED IDEOGRAPH + {0xF55A, 0x9B96}, //20656 #CJK UNIFIED IDEOGRAPH + {0xF55B, 0x9B97}, //20657 #CJK UNIFIED IDEOGRAPH + {0xF55C, 0x9B98}, //20658 #CJK UNIFIED IDEOGRAPH + {0xF55D, 0x9B99}, //20659 #CJK UNIFIED IDEOGRAPH + {0xF55E, 0x9B9A}, //20660 #CJK UNIFIED IDEOGRAPH + {0xF55F, 0x9B9B}, //20661 #CJK UNIFIED IDEOGRAPH + {0xF560, 0x9B9C}, //20662 #CJK UNIFIED IDEOGRAPH + {0xF561, 0x9B9D}, //20663 #CJK UNIFIED IDEOGRAPH + {0xF562, 0x9B9E}, //20664 #CJK UNIFIED IDEOGRAPH + {0xF563, 0x9B9F}, //20665 #CJK UNIFIED IDEOGRAPH + {0xF564, 0x9BA0}, //20666 #CJK UNIFIED IDEOGRAPH + {0xF565, 0x9BA1}, //20667 #CJK UNIFIED IDEOGRAPH + {0xF566, 0x9BA2}, //20668 #CJK UNIFIED IDEOGRAPH + {0xF567, 0x9BA3}, //20669 #CJK UNIFIED IDEOGRAPH + {0xF568, 0x9BA4}, //20670 #CJK UNIFIED IDEOGRAPH + {0xF569, 0x9BA5}, //20671 #CJK UNIFIED IDEOGRAPH + {0xF56A, 0x9BA6}, //20672 #CJK UNIFIED IDEOGRAPH + {0xF56B, 0x9BA7}, //20673 #CJK UNIFIED IDEOGRAPH + {0xF56C, 0x9BA8}, //20674 #CJK UNIFIED IDEOGRAPH + {0xF56D, 0x9BA9}, //20675 #CJK UNIFIED IDEOGRAPH + {0xF56E, 0x9BAA}, //20676 #CJK UNIFIED IDEOGRAPH + {0xF56F, 0x9BAB}, //20677 #CJK UNIFIED IDEOGRAPH + {0xF570, 0x9BAC}, //20678 #CJK UNIFIED IDEOGRAPH + {0xF571, 0x9BAD}, //20679 #CJK UNIFIED IDEOGRAPH + {0xF572, 0x9BAE}, //20680 #CJK UNIFIED IDEOGRAPH + {0xF573, 0x9BAF}, //20681 #CJK UNIFIED IDEOGRAPH + {0xF574, 0x9BB0}, //20682 #CJK UNIFIED IDEOGRAPH + {0xF575, 0x9BB1}, //20683 #CJK UNIFIED IDEOGRAPH + {0xF576, 0x9BB2}, //20684 #CJK UNIFIED IDEOGRAPH + {0xF577, 0x9BB3}, //20685 #CJK UNIFIED IDEOGRAPH + {0xF578, 0x9BB4}, //20686 #CJK UNIFIED IDEOGRAPH + {0xF579, 0x9BB5}, //20687 #CJK UNIFIED IDEOGRAPH + {0xF57A, 0x9BB6}, //20688 #CJK UNIFIED IDEOGRAPH + {0xF57B, 0x9BB7}, //20689 #CJK UNIFIED IDEOGRAPH + {0xF57C, 0x9BB8}, //20690 #CJK UNIFIED IDEOGRAPH + {0xF57D, 0x9BB9}, //20691 #CJK UNIFIED IDEOGRAPH + {0xF57E, 0x9BBA}, //20692 #CJK UNIFIED IDEOGRAPH + {0xF580, 0x9BBB}, //20693 #CJK UNIFIED IDEOGRAPH + {0xF581, 0x9BBC}, //20694 #CJK UNIFIED IDEOGRAPH + {0xF582, 0x9BBD}, //20695 #CJK UNIFIED IDEOGRAPH + {0xF583, 0x9BBE}, //20696 #CJK UNIFIED IDEOGRAPH + {0xF584, 0x9BBF}, //20697 #CJK UNIFIED IDEOGRAPH + {0xF585, 0x9BC0}, //20698 #CJK UNIFIED IDEOGRAPH + {0xF586, 0x9BC1}, //20699 #CJK UNIFIED IDEOGRAPH + {0xF587, 0x9BC2}, //20700 #CJK UNIFIED IDEOGRAPH + {0xF588, 0x9BC3}, //20701 #CJK UNIFIED IDEOGRAPH + {0xF589, 0x9BC4}, //20702 #CJK UNIFIED IDEOGRAPH + {0xF58A, 0x9BC5}, //20703 #CJK UNIFIED IDEOGRAPH + {0xF58B, 0x9BC6}, //20704 #CJK UNIFIED IDEOGRAPH + {0xF58C, 0x9BC7}, //20705 #CJK UNIFIED IDEOGRAPH + {0xF58D, 0x9BC8}, //20706 #CJK UNIFIED IDEOGRAPH + {0xF58E, 0x9BC9}, //20707 #CJK UNIFIED IDEOGRAPH + {0xF58F, 0x9BCA}, //20708 #CJK UNIFIED IDEOGRAPH + {0xF590, 0x9BCB}, //20709 #CJK UNIFIED IDEOGRAPH + {0xF591, 0x9BCC}, //20710 #CJK UNIFIED IDEOGRAPH + {0xF592, 0x9BCD}, //20711 #CJK UNIFIED IDEOGRAPH + {0xF593, 0x9BCE}, //20712 #CJK UNIFIED IDEOGRAPH + {0xF594, 0x9BCF}, //20713 #CJK UNIFIED IDEOGRAPH + {0xF595, 0x9BD0}, //20714 #CJK UNIFIED IDEOGRAPH + {0xF596, 0x9BD1}, //20715 #CJK UNIFIED IDEOGRAPH + {0xF597, 0x9BD2}, //20716 #CJK UNIFIED IDEOGRAPH + {0xF598, 0x9BD3}, //20717 #CJK UNIFIED IDEOGRAPH + {0xF599, 0x9BD4}, //20718 #CJK UNIFIED IDEOGRAPH + {0xF59A, 0x9BD5}, //20719 #CJK UNIFIED IDEOGRAPH + {0xF59B, 0x9BD6}, //20720 #CJK UNIFIED IDEOGRAPH + {0xF59C, 0x9BD7}, //20721 #CJK UNIFIED IDEOGRAPH + {0xF59D, 0x9BD8}, //20722 #CJK UNIFIED IDEOGRAPH + {0xF59E, 0x9BD9}, //20723 #CJK UNIFIED IDEOGRAPH + {0xF59F, 0x9BDA}, //20724 #CJK UNIFIED IDEOGRAPH + {0xF5A0, 0x9BDB}, //20725 #CJK UNIFIED IDEOGRAPH + {0xF5A1, 0x9162}, //20726 #CJK UNIFIED IDEOGRAPH + {0xF5A2, 0x9161}, //20727 #CJK UNIFIED IDEOGRAPH + {0xF5A3, 0x9170}, //20728 #CJK UNIFIED IDEOGRAPH + {0xF5A4, 0x9169}, //20729 #CJK UNIFIED IDEOGRAPH + {0xF5A5, 0x916F}, //20730 #CJK UNIFIED IDEOGRAPH + {0xF5A6, 0x917D}, //20731 #CJK UNIFIED IDEOGRAPH + {0xF5A7, 0x917E}, //20732 #CJK UNIFIED IDEOGRAPH + {0xF5A8, 0x9172}, //20733 #CJK UNIFIED IDEOGRAPH + {0xF5A9, 0x9174}, //20734 #CJK UNIFIED IDEOGRAPH + {0xF5AA, 0x9179}, //20735 #CJK UNIFIED IDEOGRAPH + {0xF5AB, 0x918C}, //20736 #CJK UNIFIED IDEOGRAPH + {0xF5AC, 0x9185}, //20737 #CJK UNIFIED IDEOGRAPH + {0xF5AD, 0x9190}, //20738 #CJK UNIFIED IDEOGRAPH + {0xF5AE, 0x918D}, //20739 #CJK UNIFIED IDEOGRAPH + {0xF5AF, 0x9191}, //20740 #CJK UNIFIED IDEOGRAPH + {0xF5B0, 0x91A2}, //20741 #CJK UNIFIED IDEOGRAPH + {0xF5B1, 0x91A3}, //20742 #CJK UNIFIED IDEOGRAPH + {0xF5B2, 0x91AA}, //20743 #CJK UNIFIED IDEOGRAPH + {0xF5B3, 0x91AD}, //20744 #CJK UNIFIED IDEOGRAPH + {0xF5B4, 0x91AE}, //20745 #CJK UNIFIED IDEOGRAPH + {0xF5B5, 0x91AF}, //20746 #CJK UNIFIED IDEOGRAPH + {0xF5B6, 0x91B5}, //20747 #CJK UNIFIED IDEOGRAPH + {0xF5B7, 0x91B4}, //20748 #CJK UNIFIED IDEOGRAPH + {0xF5B8, 0x91BA}, //20749 #CJK UNIFIED IDEOGRAPH + {0xF5B9, 0x8C55}, //20750 #CJK UNIFIED IDEOGRAPH + {0xF5BA, 0x9E7E}, //20751 #CJK UNIFIED IDEOGRAPH + {0xF5BB, 0x8DB8}, //20752 #CJK UNIFIED IDEOGRAPH + {0xF5BC, 0x8DEB}, //20753 #CJK UNIFIED IDEOGRAPH + {0xF5BD, 0x8E05}, //20754 #CJK UNIFIED IDEOGRAPH + {0xF5BE, 0x8E59}, //20755 #CJK UNIFIED IDEOGRAPH + {0xF5BF, 0x8E69}, //20756 #CJK UNIFIED IDEOGRAPH + {0xF5C0, 0x8DB5}, //20757 #CJK UNIFIED IDEOGRAPH + {0xF5C1, 0x8DBF}, //20758 #CJK UNIFIED IDEOGRAPH + {0xF5C2, 0x8DBC}, //20759 #CJK UNIFIED IDEOGRAPH + {0xF5C3, 0x8DBA}, //20760 #CJK UNIFIED IDEOGRAPH + {0xF5C4, 0x8DC4}, //20761 #CJK UNIFIED IDEOGRAPH + {0xF5C5, 0x8DD6}, //20762 #CJK UNIFIED IDEOGRAPH + {0xF5C6, 0x8DD7}, //20763 #CJK UNIFIED IDEOGRAPH + {0xF5C7, 0x8DDA}, //20764 #CJK UNIFIED IDEOGRAPH + {0xF5C8, 0x8DDE}, //20765 #CJK UNIFIED IDEOGRAPH + {0xF5C9, 0x8DCE}, //20766 #CJK UNIFIED IDEOGRAPH + {0xF5CA, 0x8DCF}, //20767 #CJK UNIFIED IDEOGRAPH + {0xF5CB, 0x8DDB}, //20768 #CJK UNIFIED IDEOGRAPH + {0xF5CC, 0x8DC6}, //20769 #CJK UNIFIED IDEOGRAPH + {0xF5CD, 0x8DEC}, //20770 #CJK UNIFIED IDEOGRAPH + {0xF5CE, 0x8DF7}, //20771 #CJK UNIFIED IDEOGRAPH + {0xF5CF, 0x8DF8}, //20772 #CJK UNIFIED IDEOGRAPH + {0xF5D0, 0x8DE3}, //20773 #CJK UNIFIED IDEOGRAPH + {0xF5D1, 0x8DF9}, //20774 #CJK UNIFIED IDEOGRAPH + {0xF5D2, 0x8DFB}, //20775 #CJK UNIFIED IDEOGRAPH + {0xF5D3, 0x8DE4}, //20776 #CJK UNIFIED IDEOGRAPH + {0xF5D4, 0x8E09}, //20777 #CJK UNIFIED IDEOGRAPH + {0xF5D5, 0x8DFD}, //20778 #CJK UNIFIED IDEOGRAPH + {0xF5D6, 0x8E14}, //20779 #CJK UNIFIED IDEOGRAPH + {0xF5D7, 0x8E1D}, //20780 #CJK UNIFIED IDEOGRAPH + {0xF5D8, 0x8E1F}, //20781 #CJK UNIFIED IDEOGRAPH + {0xF5D9, 0x8E2C}, //20782 #CJK UNIFIED IDEOGRAPH + {0xF5DA, 0x8E2E}, //20783 #CJK UNIFIED IDEOGRAPH + {0xF5DB, 0x8E23}, //20784 #CJK UNIFIED IDEOGRAPH + {0xF5DC, 0x8E2F}, //20785 #CJK UNIFIED IDEOGRAPH + {0xF5DD, 0x8E3A}, //20786 #CJK UNIFIED IDEOGRAPH + {0xF5DE, 0x8E40}, //20787 #CJK UNIFIED IDEOGRAPH + {0xF5DF, 0x8E39}, //20788 #CJK UNIFIED IDEOGRAPH + {0xF5E0, 0x8E35}, //20789 #CJK UNIFIED IDEOGRAPH + {0xF5E1, 0x8E3D}, //20790 #CJK UNIFIED IDEOGRAPH + {0xF5E2, 0x8E31}, //20791 #CJK UNIFIED IDEOGRAPH + {0xF5E3, 0x8E49}, //20792 #CJK UNIFIED IDEOGRAPH + {0xF5E4, 0x8E41}, //20793 #CJK UNIFIED IDEOGRAPH + {0xF5E5, 0x8E42}, //20794 #CJK UNIFIED IDEOGRAPH + {0xF5E6, 0x8E51}, //20795 #CJK UNIFIED IDEOGRAPH + {0xF5E7, 0x8E52}, //20796 #CJK UNIFIED IDEOGRAPH + {0xF5E8, 0x8E4A}, //20797 #CJK UNIFIED IDEOGRAPH + {0xF5E9, 0x8E70}, //20798 #CJK UNIFIED IDEOGRAPH + {0xF5EA, 0x8E76}, //20799 #CJK UNIFIED IDEOGRAPH + {0xF5EB, 0x8E7C}, //20800 #CJK UNIFIED IDEOGRAPH + {0xF5EC, 0x8E6F}, //20801 #CJK UNIFIED IDEOGRAPH + {0xF5ED, 0x8E74}, //20802 #CJK UNIFIED IDEOGRAPH + {0xF5EE, 0x8E85}, //20803 #CJK UNIFIED IDEOGRAPH + {0xF5EF, 0x8E8F}, //20804 #CJK UNIFIED IDEOGRAPH + {0xF5F0, 0x8E94}, //20805 #CJK UNIFIED IDEOGRAPH + {0xF5F1, 0x8E90}, //20806 #CJK UNIFIED IDEOGRAPH + {0xF5F2, 0x8E9C}, //20807 #CJK UNIFIED IDEOGRAPH + {0xF5F3, 0x8E9E}, //20808 #CJK UNIFIED IDEOGRAPH + {0xF5F4, 0x8C78}, //20809 #CJK UNIFIED IDEOGRAPH + {0xF5F5, 0x8C82}, //20810 #CJK UNIFIED IDEOGRAPH + {0xF5F6, 0x8C8A}, //20811 #CJK UNIFIED IDEOGRAPH + {0xF5F7, 0x8C85}, //20812 #CJK UNIFIED IDEOGRAPH + {0xF5F8, 0x8C98}, //20813 #CJK UNIFIED IDEOGRAPH + {0xF5F9, 0x8C94}, //20814 #CJK UNIFIED IDEOGRAPH + {0xF5FA, 0x659B}, //20815 #CJK UNIFIED IDEOGRAPH + {0xF5FB, 0x89D6}, //20816 #CJK UNIFIED IDEOGRAPH + {0xF5FC, 0x89DE}, //20817 #CJK UNIFIED IDEOGRAPH + {0xF5FD, 0x89DA}, //20818 #CJK UNIFIED IDEOGRAPH + {0xF5FE, 0x89DC}, //20819 #CJK UNIFIED IDEOGRAPH + {0xF640, 0x9BDC}, //20820 #CJK UNIFIED IDEOGRAPH + {0xF641, 0x9BDD}, //20821 #CJK UNIFIED IDEOGRAPH + {0xF642, 0x9BDE}, //20822 #CJK UNIFIED IDEOGRAPH + {0xF643, 0x9BDF}, //20823 #CJK UNIFIED IDEOGRAPH + {0xF644, 0x9BE0}, //20824 #CJK UNIFIED IDEOGRAPH + {0xF645, 0x9BE1}, //20825 #CJK UNIFIED IDEOGRAPH + {0xF646, 0x9BE2}, //20826 #CJK UNIFIED IDEOGRAPH + {0xF647, 0x9BE3}, //20827 #CJK UNIFIED IDEOGRAPH + {0xF648, 0x9BE4}, //20828 #CJK UNIFIED IDEOGRAPH + {0xF649, 0x9BE5}, //20829 #CJK UNIFIED IDEOGRAPH + {0xF64A, 0x9BE6}, //20830 #CJK UNIFIED IDEOGRAPH + {0xF64B, 0x9BE7}, //20831 #CJK UNIFIED IDEOGRAPH + {0xF64C, 0x9BE8}, //20832 #CJK UNIFIED IDEOGRAPH + {0xF64D, 0x9BE9}, //20833 #CJK UNIFIED IDEOGRAPH + {0xF64E, 0x9BEA}, //20834 #CJK UNIFIED IDEOGRAPH + {0xF64F, 0x9BEB}, //20835 #CJK UNIFIED IDEOGRAPH + {0xF650, 0x9BEC}, //20836 #CJK UNIFIED IDEOGRAPH + {0xF651, 0x9BED}, //20837 #CJK UNIFIED IDEOGRAPH + {0xF652, 0x9BEE}, //20838 #CJK UNIFIED IDEOGRAPH + {0xF653, 0x9BEF}, //20839 #CJK UNIFIED IDEOGRAPH + {0xF654, 0x9BF0}, //20840 #CJK UNIFIED IDEOGRAPH + {0xF655, 0x9BF1}, //20841 #CJK UNIFIED IDEOGRAPH + {0xF656, 0x9BF2}, //20842 #CJK UNIFIED IDEOGRAPH + {0xF657, 0x9BF3}, //20843 #CJK UNIFIED IDEOGRAPH + {0xF658, 0x9BF4}, //20844 #CJK UNIFIED IDEOGRAPH + {0xF659, 0x9BF5}, //20845 #CJK UNIFIED IDEOGRAPH + {0xF65A, 0x9BF6}, //20846 #CJK UNIFIED IDEOGRAPH + {0xF65B, 0x9BF7}, //20847 #CJK UNIFIED IDEOGRAPH + {0xF65C, 0x9BF8}, //20848 #CJK UNIFIED IDEOGRAPH + {0xF65D, 0x9BF9}, //20849 #CJK UNIFIED IDEOGRAPH + {0xF65E, 0x9BFA}, //20850 #CJK UNIFIED IDEOGRAPH + {0xF65F, 0x9BFB}, //20851 #CJK UNIFIED IDEOGRAPH + {0xF660, 0x9BFC}, //20852 #CJK UNIFIED IDEOGRAPH + {0xF661, 0x9BFD}, //20853 #CJK UNIFIED IDEOGRAPH + {0xF662, 0x9BFE}, //20854 #CJK UNIFIED IDEOGRAPH + {0xF663, 0x9BFF}, //20855 #CJK UNIFIED IDEOGRAPH + {0xF664, 0x9C00}, //20856 #CJK UNIFIED IDEOGRAPH + {0xF665, 0x9C01}, //20857 #CJK UNIFIED IDEOGRAPH + {0xF666, 0x9C02}, //20858 #CJK UNIFIED IDEOGRAPH + {0xF667, 0x9C03}, //20859 #CJK UNIFIED IDEOGRAPH + {0xF668, 0x9C04}, //20860 #CJK UNIFIED IDEOGRAPH + {0xF669, 0x9C05}, //20861 #CJK UNIFIED IDEOGRAPH + {0xF66A, 0x9C06}, //20862 #CJK UNIFIED IDEOGRAPH + {0xF66B, 0x9C07}, //20863 #CJK UNIFIED IDEOGRAPH + {0xF66C, 0x9C08}, //20864 #CJK UNIFIED IDEOGRAPH + {0xF66D, 0x9C09}, //20865 #CJK UNIFIED IDEOGRAPH + {0xF66E, 0x9C0A}, //20866 #CJK UNIFIED IDEOGRAPH + {0xF66F, 0x9C0B}, //20867 #CJK UNIFIED IDEOGRAPH + {0xF670, 0x9C0C}, //20868 #CJK UNIFIED IDEOGRAPH + {0xF671, 0x9C0D}, //20869 #CJK UNIFIED IDEOGRAPH + {0xF672, 0x9C0E}, //20870 #CJK UNIFIED IDEOGRAPH + {0xF673, 0x9C0F}, //20871 #CJK UNIFIED IDEOGRAPH + {0xF674, 0x9C10}, //20872 #CJK UNIFIED IDEOGRAPH + {0xF675, 0x9C11}, //20873 #CJK UNIFIED IDEOGRAPH + {0xF676, 0x9C12}, //20874 #CJK UNIFIED IDEOGRAPH + {0xF677, 0x9C13}, //20875 #CJK UNIFIED IDEOGRAPH + {0xF678, 0x9C14}, //20876 #CJK UNIFIED IDEOGRAPH + {0xF679, 0x9C15}, //20877 #CJK UNIFIED IDEOGRAPH + {0xF67A, 0x9C16}, //20878 #CJK UNIFIED IDEOGRAPH + {0xF67B, 0x9C17}, //20879 #CJK UNIFIED IDEOGRAPH + {0xF67C, 0x9C18}, //20880 #CJK UNIFIED IDEOGRAPH + {0xF67D, 0x9C19}, //20881 #CJK UNIFIED IDEOGRAPH + {0xF67E, 0x9C1A}, //20882 #CJK UNIFIED IDEOGRAPH + {0xF680, 0x9C1B}, //20883 #CJK UNIFIED IDEOGRAPH + {0xF681, 0x9C1C}, //20884 #CJK UNIFIED IDEOGRAPH + {0xF682, 0x9C1D}, //20885 #CJK UNIFIED IDEOGRAPH + {0xF683, 0x9C1E}, //20886 #CJK UNIFIED IDEOGRAPH + {0xF684, 0x9C1F}, //20887 #CJK UNIFIED IDEOGRAPH + {0xF685, 0x9C20}, //20888 #CJK UNIFIED IDEOGRAPH + {0xF686, 0x9C21}, //20889 #CJK UNIFIED IDEOGRAPH + {0xF687, 0x9C22}, //20890 #CJK UNIFIED IDEOGRAPH + {0xF688, 0x9C23}, //20891 #CJK UNIFIED IDEOGRAPH + {0xF689, 0x9C24}, //20892 #CJK UNIFIED IDEOGRAPH + {0xF68A, 0x9C25}, //20893 #CJK UNIFIED IDEOGRAPH + {0xF68B, 0x9C26}, //20894 #CJK UNIFIED IDEOGRAPH + {0xF68C, 0x9C27}, //20895 #CJK UNIFIED IDEOGRAPH + {0xF68D, 0x9C28}, //20896 #CJK UNIFIED IDEOGRAPH + {0xF68E, 0x9C29}, //20897 #CJK UNIFIED IDEOGRAPH + {0xF68F, 0x9C2A}, //20898 #CJK UNIFIED IDEOGRAPH + {0xF690, 0x9C2B}, //20899 #CJK UNIFIED IDEOGRAPH + {0xF691, 0x9C2C}, //20900 #CJK UNIFIED IDEOGRAPH + {0xF692, 0x9C2D}, //20901 #CJK UNIFIED IDEOGRAPH + {0xF693, 0x9C2E}, //20902 #CJK UNIFIED IDEOGRAPH + {0xF694, 0x9C2F}, //20903 #CJK UNIFIED IDEOGRAPH + {0xF695, 0x9C30}, //20904 #CJK UNIFIED IDEOGRAPH + {0xF696, 0x9C31}, //20905 #CJK UNIFIED IDEOGRAPH + {0xF697, 0x9C32}, //20906 #CJK UNIFIED IDEOGRAPH + {0xF698, 0x9C33}, //20907 #CJK UNIFIED IDEOGRAPH + {0xF699, 0x9C34}, //20908 #CJK UNIFIED IDEOGRAPH + {0xF69A, 0x9C35}, //20909 #CJK UNIFIED IDEOGRAPH + {0xF69B, 0x9C36}, //20910 #CJK UNIFIED IDEOGRAPH + {0xF69C, 0x9C37}, //20911 #CJK UNIFIED IDEOGRAPH + {0xF69D, 0x9C38}, //20912 #CJK UNIFIED IDEOGRAPH + {0xF69E, 0x9C39}, //20913 #CJK UNIFIED IDEOGRAPH + {0xF69F, 0x9C3A}, //20914 #CJK UNIFIED IDEOGRAPH + {0xF6A0, 0x9C3B}, //20915 #CJK UNIFIED IDEOGRAPH + {0xF6A1, 0x89E5}, //20916 #CJK UNIFIED IDEOGRAPH + {0xF6A2, 0x89EB}, //20917 #CJK UNIFIED IDEOGRAPH + {0xF6A3, 0x89EF}, //20918 #CJK UNIFIED IDEOGRAPH + {0xF6A4, 0x8A3E}, //20919 #CJK UNIFIED IDEOGRAPH + {0xF6A5, 0x8B26}, //20920 #CJK UNIFIED IDEOGRAPH + {0xF6A6, 0x9753}, //20921 #CJK UNIFIED IDEOGRAPH + {0xF6A7, 0x96E9}, //20922 #CJK UNIFIED IDEOGRAPH + {0xF6A8, 0x96F3}, //20923 #CJK UNIFIED IDEOGRAPH + {0xF6A9, 0x96EF}, //20924 #CJK UNIFIED IDEOGRAPH + {0xF6AA, 0x9706}, //20925 #CJK UNIFIED IDEOGRAPH + {0xF6AB, 0x9701}, //20926 #CJK UNIFIED IDEOGRAPH + {0xF6AC, 0x9708}, //20927 #CJK UNIFIED IDEOGRAPH + {0xF6AD, 0x970F}, //20928 #CJK UNIFIED IDEOGRAPH + {0xF6AE, 0x970E}, //20929 #CJK UNIFIED IDEOGRAPH + {0xF6AF, 0x972A}, //20930 #CJK UNIFIED IDEOGRAPH + {0xF6B0, 0x972D}, //20931 #CJK UNIFIED IDEOGRAPH + {0xF6B1, 0x9730}, //20932 #CJK UNIFIED IDEOGRAPH + {0xF6B2, 0x973E}, //20933 #CJK UNIFIED IDEOGRAPH + {0xF6B3, 0x9F80}, //20934 #CJK UNIFIED IDEOGRAPH + {0xF6B4, 0x9F83}, //20935 #CJK UNIFIED IDEOGRAPH + {0xF6B5, 0x9F85}, //20936 #CJK UNIFIED IDEOGRAPH + {0xF6B6, 0x9F86}, //20937 #CJK UNIFIED IDEOGRAPH + {0xF6B7, 0x9F87}, //20938 #CJK UNIFIED IDEOGRAPH + {0xF6B8, 0x9F88}, //20939 #CJK UNIFIED IDEOGRAPH + {0xF6B9, 0x9F89}, //20940 #CJK UNIFIED IDEOGRAPH + {0xF6BA, 0x9F8A}, //20941 #CJK UNIFIED IDEOGRAPH + {0xF6BB, 0x9F8C}, //20942 #CJK UNIFIED IDEOGRAPH + {0xF6BC, 0x9EFE}, //20943 #CJK UNIFIED IDEOGRAPH + {0xF6BD, 0x9F0B}, //20944 #CJK UNIFIED IDEOGRAPH + {0xF6BE, 0x9F0D}, //20945 #CJK UNIFIED IDEOGRAPH + {0xF6BF, 0x96B9}, //20946 #CJK UNIFIED IDEOGRAPH + {0xF6C0, 0x96BC}, //20947 #CJK UNIFIED IDEOGRAPH + {0xF6C1, 0x96BD}, //20948 #CJK UNIFIED IDEOGRAPH + {0xF6C2, 0x96CE}, //20949 #CJK UNIFIED IDEOGRAPH + {0xF6C3, 0x96D2}, //20950 #CJK UNIFIED IDEOGRAPH + {0xF6C4, 0x77BF}, //20951 #CJK UNIFIED IDEOGRAPH + {0xF6C5, 0x96E0}, //20952 #CJK UNIFIED IDEOGRAPH + {0xF6C6, 0x928E}, //20953 #CJK UNIFIED IDEOGRAPH + {0xF6C7, 0x92AE}, //20954 #CJK UNIFIED IDEOGRAPH + {0xF6C8, 0x92C8}, //20955 #CJK UNIFIED IDEOGRAPH + {0xF6C9, 0x933E}, //20956 #CJK UNIFIED IDEOGRAPH + {0xF6CA, 0x936A}, //20957 #CJK UNIFIED IDEOGRAPH + {0xF6CB, 0x93CA}, //20958 #CJK UNIFIED IDEOGRAPH + {0xF6CC, 0x938F}, //20959 #CJK UNIFIED IDEOGRAPH + {0xF6CD, 0x943E}, //20960 #CJK UNIFIED IDEOGRAPH + {0xF6CE, 0x946B}, //20961 #CJK UNIFIED IDEOGRAPH + {0xF6CF, 0x9C7F}, //20962 #CJK UNIFIED IDEOGRAPH + {0xF6D0, 0x9C82}, //20963 #CJK UNIFIED IDEOGRAPH + {0xF6D1, 0x9C85}, //20964 #CJK UNIFIED IDEOGRAPH + {0xF6D2, 0x9C86}, //20965 #CJK UNIFIED IDEOGRAPH + {0xF6D3, 0x9C87}, //20966 #CJK UNIFIED IDEOGRAPH + {0xF6D4, 0x9C88}, //20967 #CJK UNIFIED IDEOGRAPH + {0xF6D5, 0x7A23}, //20968 #CJK UNIFIED IDEOGRAPH + {0xF6D6, 0x9C8B}, //20969 #CJK UNIFIED IDEOGRAPH + {0xF6D7, 0x9C8E}, //20970 #CJK UNIFIED IDEOGRAPH + {0xF6D8, 0x9C90}, //20971 #CJK UNIFIED IDEOGRAPH + {0xF6D9, 0x9C91}, //20972 #CJK UNIFIED IDEOGRAPH + {0xF6DA, 0x9C92}, //20973 #CJK UNIFIED IDEOGRAPH + {0xF6DB, 0x9C94}, //20974 #CJK UNIFIED IDEOGRAPH + {0xF6DC, 0x9C95}, //20975 #CJK UNIFIED IDEOGRAPH + {0xF6DD, 0x9C9A}, //20976 #CJK UNIFIED IDEOGRAPH + {0xF6DE, 0x9C9B}, //20977 #CJK UNIFIED IDEOGRAPH + {0xF6DF, 0x9C9E}, //20978 #CJK UNIFIED IDEOGRAPH + {0xF6E0, 0x9C9F}, //20979 #CJK UNIFIED IDEOGRAPH + {0xF6E1, 0x9CA0}, //20980 #CJK UNIFIED IDEOGRAPH + {0xF6E2, 0x9CA1}, //20981 #CJK UNIFIED IDEOGRAPH + {0xF6E3, 0x9CA2}, //20982 #CJK UNIFIED IDEOGRAPH + {0xF6E4, 0x9CA3}, //20983 #CJK UNIFIED IDEOGRAPH + {0xF6E5, 0x9CA5}, //20984 #CJK UNIFIED IDEOGRAPH + {0xF6E6, 0x9CA6}, //20985 #CJK UNIFIED IDEOGRAPH + {0xF6E7, 0x9CA7}, //20986 #CJK UNIFIED IDEOGRAPH + {0xF6E8, 0x9CA8}, //20987 #CJK UNIFIED IDEOGRAPH + {0xF6E9, 0x9CA9}, //20988 #CJK UNIFIED IDEOGRAPH + {0xF6EA, 0x9CAB}, //20989 #CJK UNIFIED IDEOGRAPH + {0xF6EB, 0x9CAD}, //20990 #CJK UNIFIED IDEOGRAPH + {0xF6EC, 0x9CAE}, //20991 #CJK UNIFIED IDEOGRAPH + {0xF6ED, 0x9CB0}, //20992 #CJK UNIFIED IDEOGRAPH + {0xF6EE, 0x9CB1}, //20993 #CJK UNIFIED IDEOGRAPH + {0xF6EF, 0x9CB2}, //20994 #CJK UNIFIED IDEOGRAPH + {0xF6F0, 0x9CB3}, //20995 #CJK UNIFIED IDEOGRAPH + {0xF6F1, 0x9CB4}, //20996 #CJK UNIFIED IDEOGRAPH + {0xF6F2, 0x9CB5}, //20997 #CJK UNIFIED IDEOGRAPH + {0xF6F3, 0x9CB6}, //20998 #CJK UNIFIED IDEOGRAPH + {0xF6F4, 0x9CB7}, //20999 #CJK UNIFIED IDEOGRAPH + {0xF6F5, 0x9CBA}, //21000 #CJK UNIFIED IDEOGRAPH + {0xF6F6, 0x9CBB}, //21001 #CJK UNIFIED IDEOGRAPH + {0xF6F7, 0x9CBC}, //21002 #CJK UNIFIED IDEOGRAPH + {0xF6F8, 0x9CBD}, //21003 #CJK UNIFIED IDEOGRAPH + {0xF6F9, 0x9CC4}, //21004 #CJK UNIFIED IDEOGRAPH + {0xF6FA, 0x9CC5}, //21005 #CJK UNIFIED IDEOGRAPH + {0xF6FB, 0x9CC6}, //21006 #CJK UNIFIED IDEOGRAPH + {0xF6FC, 0x9CC7}, //21007 #CJK UNIFIED IDEOGRAPH + {0xF6FD, 0x9CCA}, //21008 #CJK UNIFIED IDEOGRAPH + {0xF6FE, 0x9CCB}, //21009 #CJK UNIFIED IDEOGRAPH + {0xF740, 0x9C3C}, //21010 #CJK UNIFIED IDEOGRAPH + {0xF741, 0x9C3D}, //21011 #CJK UNIFIED IDEOGRAPH + {0xF742, 0x9C3E}, //21012 #CJK UNIFIED IDEOGRAPH + {0xF743, 0x9C3F}, //21013 #CJK UNIFIED IDEOGRAPH + {0xF744, 0x9C40}, //21014 #CJK UNIFIED IDEOGRAPH + {0xF745, 0x9C41}, //21015 #CJK UNIFIED IDEOGRAPH + {0xF746, 0x9C42}, //21016 #CJK UNIFIED IDEOGRAPH + {0xF747, 0x9C43}, //21017 #CJK UNIFIED IDEOGRAPH + {0xF748, 0x9C44}, //21018 #CJK UNIFIED IDEOGRAPH + {0xF749, 0x9C45}, //21019 #CJK UNIFIED IDEOGRAPH + {0xF74A, 0x9C46}, //21020 #CJK UNIFIED IDEOGRAPH + {0xF74B, 0x9C47}, //21021 #CJK UNIFIED IDEOGRAPH + {0xF74C, 0x9C48}, //21022 #CJK UNIFIED IDEOGRAPH + {0xF74D, 0x9C49}, //21023 #CJK UNIFIED IDEOGRAPH + {0xF74E, 0x9C4A}, //21024 #CJK UNIFIED IDEOGRAPH + {0xF74F, 0x9C4B}, //21025 #CJK UNIFIED IDEOGRAPH + {0xF750, 0x9C4C}, //21026 #CJK UNIFIED IDEOGRAPH + {0xF751, 0x9C4D}, //21027 #CJK UNIFIED IDEOGRAPH + {0xF752, 0x9C4E}, //21028 #CJK UNIFIED IDEOGRAPH + {0xF753, 0x9C4F}, //21029 #CJK UNIFIED IDEOGRAPH + {0xF754, 0x9C50}, //21030 #CJK UNIFIED IDEOGRAPH + {0xF755, 0x9C51}, //21031 #CJK UNIFIED IDEOGRAPH + {0xF756, 0x9C52}, //21032 #CJK UNIFIED IDEOGRAPH + {0xF757, 0x9C53}, //21033 #CJK UNIFIED IDEOGRAPH + {0xF758, 0x9C54}, //21034 #CJK UNIFIED IDEOGRAPH + {0xF759, 0x9C55}, //21035 #CJK UNIFIED IDEOGRAPH + {0xF75A, 0x9C56}, //21036 #CJK UNIFIED IDEOGRAPH + {0xF75B, 0x9C57}, //21037 #CJK UNIFIED IDEOGRAPH + {0xF75C, 0x9C58}, //21038 #CJK UNIFIED IDEOGRAPH + {0xF75D, 0x9C59}, //21039 #CJK UNIFIED IDEOGRAPH + {0xF75E, 0x9C5A}, //21040 #CJK UNIFIED IDEOGRAPH + {0xF75F, 0x9C5B}, //21041 #CJK UNIFIED IDEOGRAPH + {0xF760, 0x9C5C}, //21042 #CJK UNIFIED IDEOGRAPH + {0xF761, 0x9C5D}, //21043 #CJK UNIFIED IDEOGRAPH + {0xF762, 0x9C5E}, //21044 #CJK UNIFIED IDEOGRAPH + {0xF763, 0x9C5F}, //21045 #CJK UNIFIED IDEOGRAPH + {0xF764, 0x9C60}, //21046 #CJK UNIFIED IDEOGRAPH + {0xF765, 0x9C61}, //21047 #CJK UNIFIED IDEOGRAPH + {0xF766, 0x9C62}, //21048 #CJK UNIFIED IDEOGRAPH + {0xF767, 0x9C63}, //21049 #CJK UNIFIED IDEOGRAPH + {0xF768, 0x9C64}, //21050 #CJK UNIFIED IDEOGRAPH + {0xF769, 0x9C65}, //21051 #CJK UNIFIED IDEOGRAPH + {0xF76A, 0x9C66}, //21052 #CJK UNIFIED IDEOGRAPH + {0xF76B, 0x9C67}, //21053 #CJK UNIFIED IDEOGRAPH + {0xF76C, 0x9C68}, //21054 #CJK UNIFIED IDEOGRAPH + {0xF76D, 0x9C69}, //21055 #CJK UNIFIED IDEOGRAPH + {0xF76E, 0x9C6A}, //21056 #CJK UNIFIED IDEOGRAPH + {0xF76F, 0x9C6B}, //21057 #CJK UNIFIED IDEOGRAPH + {0xF770, 0x9C6C}, //21058 #CJK UNIFIED IDEOGRAPH + {0xF771, 0x9C6D}, //21059 #CJK UNIFIED IDEOGRAPH + {0xF772, 0x9C6E}, //21060 #CJK UNIFIED IDEOGRAPH + {0xF773, 0x9C6F}, //21061 #CJK UNIFIED IDEOGRAPH + {0xF774, 0x9C70}, //21062 #CJK UNIFIED IDEOGRAPH + {0xF775, 0x9C71}, //21063 #CJK UNIFIED IDEOGRAPH + {0xF776, 0x9C72}, //21064 #CJK UNIFIED IDEOGRAPH + {0xF777, 0x9C73}, //21065 #CJK UNIFIED IDEOGRAPH + {0xF778, 0x9C74}, //21066 #CJK UNIFIED IDEOGRAPH + {0xF779, 0x9C75}, //21067 #CJK UNIFIED IDEOGRAPH + {0xF77A, 0x9C76}, //21068 #CJK UNIFIED IDEOGRAPH + {0xF77B, 0x9C77}, //21069 #CJK UNIFIED IDEOGRAPH + {0xF77C, 0x9C78}, //21070 #CJK UNIFIED IDEOGRAPH + {0xF77D, 0x9C79}, //21071 #CJK UNIFIED IDEOGRAPH + {0xF77E, 0x9C7A}, //21072 #CJK UNIFIED IDEOGRAPH + {0xF780, 0x9C7B}, //21073 #CJK UNIFIED IDEOGRAPH + {0xF781, 0x9C7D}, //21074 #CJK UNIFIED IDEOGRAPH + {0xF782, 0x9C7E}, //21075 #CJK UNIFIED IDEOGRAPH + {0xF783, 0x9C80}, //21076 #CJK UNIFIED IDEOGRAPH + {0xF784, 0x9C83}, //21077 #CJK UNIFIED IDEOGRAPH + {0xF785, 0x9C84}, //21078 #CJK UNIFIED IDEOGRAPH + {0xF786, 0x9C89}, //21079 #CJK UNIFIED IDEOGRAPH + {0xF787, 0x9C8A}, //21080 #CJK UNIFIED IDEOGRAPH + {0xF788, 0x9C8C}, //21081 #CJK UNIFIED IDEOGRAPH + {0xF789, 0x9C8F}, //21082 #CJK UNIFIED IDEOGRAPH + {0xF78A, 0x9C93}, //21083 #CJK UNIFIED IDEOGRAPH + {0xF78B, 0x9C96}, //21084 #CJK UNIFIED IDEOGRAPH + {0xF78C, 0x9C97}, //21085 #CJK UNIFIED IDEOGRAPH + {0xF78D, 0x9C98}, //21086 #CJK UNIFIED IDEOGRAPH + {0xF78E, 0x9C99}, //21087 #CJK UNIFIED IDEOGRAPH + {0xF78F, 0x9C9D}, //21088 #CJK UNIFIED IDEOGRAPH + {0xF790, 0x9CAA}, //21089 #CJK UNIFIED IDEOGRAPH + {0xF791, 0x9CAC}, //21090 #CJK UNIFIED IDEOGRAPH + {0xF792, 0x9CAF}, //21091 #CJK UNIFIED IDEOGRAPH + {0xF793, 0x9CB9}, //21092 #CJK UNIFIED IDEOGRAPH + {0xF794, 0x9CBE}, //21093 #CJK UNIFIED IDEOGRAPH + {0xF795, 0x9CBF}, //21094 #CJK UNIFIED IDEOGRAPH + {0xF796, 0x9CC0}, //21095 #CJK UNIFIED IDEOGRAPH + {0xF797, 0x9CC1}, //21096 #CJK UNIFIED IDEOGRAPH + {0xF798, 0x9CC2}, //21097 #CJK UNIFIED IDEOGRAPH + {0xF799, 0x9CC8}, //21098 #CJK UNIFIED IDEOGRAPH + {0xF79A, 0x9CC9}, //21099 #CJK UNIFIED IDEOGRAPH + {0xF79B, 0x9CD1}, //21100 #CJK UNIFIED IDEOGRAPH + {0xF79C, 0x9CD2}, //21101 #CJK UNIFIED IDEOGRAPH + {0xF79D, 0x9CDA}, //21102 #CJK UNIFIED IDEOGRAPH + {0xF79E, 0x9CDB}, //21103 #CJK UNIFIED IDEOGRAPH + {0xF79F, 0x9CE0}, //21104 #CJK UNIFIED IDEOGRAPH + {0xF7A0, 0x9CE1}, //21105 #CJK UNIFIED IDEOGRAPH + {0xF7A1, 0x9CCC}, //21106 #CJK UNIFIED IDEOGRAPH + {0xF7A2, 0x9CCD}, //21107 #CJK UNIFIED IDEOGRAPH + {0xF7A3, 0x9CCE}, //21108 #CJK UNIFIED IDEOGRAPH + {0xF7A4, 0x9CCF}, //21109 #CJK UNIFIED IDEOGRAPH + {0xF7A5, 0x9CD0}, //21110 #CJK UNIFIED IDEOGRAPH + {0xF7A6, 0x9CD3}, //21111 #CJK UNIFIED IDEOGRAPH + {0xF7A7, 0x9CD4}, //21112 #CJK UNIFIED IDEOGRAPH + {0xF7A8, 0x9CD5}, //21113 #CJK UNIFIED IDEOGRAPH + {0xF7A9, 0x9CD7}, //21114 #CJK UNIFIED IDEOGRAPH + {0xF7AA, 0x9CD8}, //21115 #CJK UNIFIED IDEOGRAPH + {0xF7AB, 0x9CD9}, //21116 #CJK UNIFIED IDEOGRAPH + {0xF7AC, 0x9CDC}, //21117 #CJK UNIFIED IDEOGRAPH + {0xF7AD, 0x9CDD}, //21118 #CJK UNIFIED IDEOGRAPH + {0xF7AE, 0x9CDF}, //21119 #CJK UNIFIED IDEOGRAPH + {0xF7AF, 0x9CE2}, //21120 #CJK UNIFIED IDEOGRAPH + {0xF7B0, 0x977C}, //21121 #CJK UNIFIED IDEOGRAPH + {0xF7B1, 0x9785}, //21122 #CJK UNIFIED IDEOGRAPH + {0xF7B2, 0x9791}, //21123 #CJK UNIFIED IDEOGRAPH + {0xF7B3, 0x9792}, //21124 #CJK UNIFIED IDEOGRAPH + {0xF7B4, 0x9794}, //21125 #CJK UNIFIED IDEOGRAPH + {0xF7B5, 0x97AF}, //21126 #CJK UNIFIED IDEOGRAPH + {0xF7B6, 0x97AB}, //21127 #CJK UNIFIED IDEOGRAPH + {0xF7B7, 0x97A3}, //21128 #CJK UNIFIED IDEOGRAPH + {0xF7B8, 0x97B2}, //21129 #CJK UNIFIED IDEOGRAPH + {0xF7B9, 0x97B4}, //21130 #CJK UNIFIED IDEOGRAPH + {0xF7BA, 0x9AB1}, //21131 #CJK UNIFIED IDEOGRAPH + {0xF7BB, 0x9AB0}, //21132 #CJK UNIFIED IDEOGRAPH + {0xF7BC, 0x9AB7}, //21133 #CJK UNIFIED IDEOGRAPH + {0xF7BD, 0x9E58}, //21134 #CJK UNIFIED IDEOGRAPH + {0xF7BE, 0x9AB6}, //21135 #CJK UNIFIED IDEOGRAPH + {0xF7BF, 0x9ABA}, //21136 #CJK UNIFIED IDEOGRAPH + {0xF7C0, 0x9ABC}, //21137 #CJK UNIFIED IDEOGRAPH + {0xF7C1, 0x9AC1}, //21138 #CJK UNIFIED IDEOGRAPH + {0xF7C2, 0x9AC0}, //21139 #CJK UNIFIED IDEOGRAPH + {0xF7C3, 0x9AC5}, //21140 #CJK UNIFIED IDEOGRAPH + {0xF7C4, 0x9AC2}, //21141 #CJK UNIFIED IDEOGRAPH + {0xF7C5, 0x9ACB}, //21142 #CJK UNIFIED IDEOGRAPH + {0xF7C6, 0x9ACC}, //21143 #CJK UNIFIED IDEOGRAPH + {0xF7C7, 0x9AD1}, //21144 #CJK UNIFIED IDEOGRAPH + {0xF7C8, 0x9B45}, //21145 #CJK UNIFIED IDEOGRAPH + {0xF7C9, 0x9B43}, //21146 #CJK UNIFIED IDEOGRAPH + {0xF7CA, 0x9B47}, //21147 #CJK UNIFIED IDEOGRAPH + {0xF7CB, 0x9B49}, //21148 #CJK UNIFIED IDEOGRAPH + {0xF7CC, 0x9B48}, //21149 #CJK UNIFIED IDEOGRAPH + {0xF7CD, 0x9B4D}, //21150 #CJK UNIFIED IDEOGRAPH + {0xF7CE, 0x9B51}, //21151 #CJK UNIFIED IDEOGRAPH + {0xF7CF, 0x98E8}, //21152 #CJK UNIFIED IDEOGRAPH + {0xF7D0, 0x990D}, //21153 #CJK UNIFIED IDEOGRAPH + {0xF7D1, 0x992E}, //21154 #CJK UNIFIED IDEOGRAPH + {0xF7D2, 0x9955}, //21155 #CJK UNIFIED IDEOGRAPH + {0xF7D3, 0x9954}, //21156 #CJK UNIFIED IDEOGRAPH + {0xF7D4, 0x9ADF}, //21157 #CJK UNIFIED IDEOGRAPH + {0xF7D5, 0x9AE1}, //21158 #CJK UNIFIED IDEOGRAPH + {0xF7D6, 0x9AE6}, //21159 #CJK UNIFIED IDEOGRAPH + {0xF7D7, 0x9AEF}, //21160 #CJK UNIFIED IDEOGRAPH + {0xF7D8, 0x9AEB}, //21161 #CJK UNIFIED IDEOGRAPH + {0xF7D9, 0x9AFB}, //21162 #CJK UNIFIED IDEOGRAPH + {0xF7DA, 0x9AED}, //21163 #CJK UNIFIED IDEOGRAPH + {0xF7DB, 0x9AF9}, //21164 #CJK UNIFIED IDEOGRAPH + {0xF7DC, 0x9B08}, //21165 #CJK UNIFIED IDEOGRAPH + {0xF7DD, 0x9B0F}, //21166 #CJK UNIFIED IDEOGRAPH + {0xF7DE, 0x9B13}, //21167 #CJK UNIFIED IDEOGRAPH + {0xF7DF, 0x9B1F}, //21168 #CJK UNIFIED IDEOGRAPH + {0xF7E0, 0x9B23}, //21169 #CJK UNIFIED IDEOGRAPH + {0xF7E1, 0x9EBD}, //21170 #CJK UNIFIED IDEOGRAPH + {0xF7E2, 0x9EBE}, //21171 #CJK UNIFIED IDEOGRAPH + {0xF7E3, 0x7E3B}, //21172 #CJK UNIFIED IDEOGRAPH + {0xF7E4, 0x9E82}, //21173 #CJK UNIFIED IDEOGRAPH + {0xF7E5, 0x9E87}, //21174 #CJK UNIFIED IDEOGRAPH + {0xF7E6, 0x9E88}, //21175 #CJK UNIFIED IDEOGRAPH + {0xF7E7, 0x9E8B}, //21176 #CJK UNIFIED IDEOGRAPH + {0xF7E8, 0x9E92}, //21177 #CJK UNIFIED IDEOGRAPH + {0xF7E9, 0x93D6}, //21178 #CJK UNIFIED IDEOGRAPH + {0xF7EA, 0x9E9D}, //21179 #CJK UNIFIED IDEOGRAPH + {0xF7EB, 0x9E9F}, //21180 #CJK UNIFIED IDEOGRAPH + {0xF7EC, 0x9EDB}, //21181 #CJK UNIFIED IDEOGRAPH + {0xF7ED, 0x9EDC}, //21182 #CJK UNIFIED IDEOGRAPH + {0xF7EE, 0x9EDD}, //21183 #CJK UNIFIED IDEOGRAPH + {0xF7EF, 0x9EE0}, //21184 #CJK UNIFIED IDEOGRAPH + {0xF7F0, 0x9EDF}, //21185 #CJK UNIFIED IDEOGRAPH + {0xF7F1, 0x9EE2}, //21186 #CJK UNIFIED IDEOGRAPH + {0xF7F2, 0x9EE9}, //21187 #CJK UNIFIED IDEOGRAPH + {0xF7F3, 0x9EE7}, //21188 #CJK UNIFIED IDEOGRAPH + {0xF7F4, 0x9EE5}, //21189 #CJK UNIFIED IDEOGRAPH + {0xF7F5, 0x9EEA}, //21190 #CJK UNIFIED IDEOGRAPH + {0xF7F6, 0x9EEF}, //21191 #CJK UNIFIED IDEOGRAPH + {0xF7F7, 0x9F22}, //21192 #CJK UNIFIED IDEOGRAPH + {0xF7F8, 0x9F2C}, //21193 #CJK UNIFIED IDEOGRAPH + {0xF7F9, 0x9F2F}, //21194 #CJK UNIFIED IDEOGRAPH + {0xF7FA, 0x9F39}, //21195 #CJK UNIFIED IDEOGRAPH + {0xF7FB, 0x9F37}, //21196 #CJK UNIFIED IDEOGRAPH + {0xF7FC, 0x9F3D}, //21197 #CJK UNIFIED IDEOGRAPH + {0xF7FD, 0x9F3E}, //21198 #CJK UNIFIED IDEOGRAPH + {0xF7FE, 0x9F44}, //21199 #CJK UNIFIED IDEOGRAPH + {0xF840, 0x9CE3}, //21200 #CJK UNIFIED IDEOGRAPH + {0xF841, 0x9CE4}, //21201 #CJK UNIFIED IDEOGRAPH + {0xF842, 0x9CE5}, //21202 #CJK UNIFIED IDEOGRAPH + {0xF843, 0x9CE6}, //21203 #CJK UNIFIED IDEOGRAPH + {0xF844, 0x9CE7}, //21204 #CJK UNIFIED IDEOGRAPH + {0xF845, 0x9CE8}, //21205 #CJK UNIFIED IDEOGRAPH + {0xF846, 0x9CE9}, //21206 #CJK UNIFIED IDEOGRAPH + {0xF847, 0x9CEA}, //21207 #CJK UNIFIED IDEOGRAPH + {0xF848, 0x9CEB}, //21208 #CJK UNIFIED IDEOGRAPH + {0xF849, 0x9CEC}, //21209 #CJK UNIFIED IDEOGRAPH + {0xF84A, 0x9CED}, //21210 #CJK UNIFIED IDEOGRAPH + {0xF84B, 0x9CEE}, //21211 #CJK UNIFIED IDEOGRAPH + {0xF84C, 0x9CEF}, //21212 #CJK UNIFIED IDEOGRAPH + {0xF84D, 0x9CF0}, //21213 #CJK UNIFIED IDEOGRAPH + {0xF84E, 0x9CF1}, //21214 #CJK UNIFIED IDEOGRAPH + {0xF84F, 0x9CF2}, //21215 #CJK UNIFIED IDEOGRAPH + {0xF850, 0x9CF3}, //21216 #CJK UNIFIED IDEOGRAPH + {0xF851, 0x9CF4}, //21217 #CJK UNIFIED IDEOGRAPH + {0xF852, 0x9CF5}, //21218 #CJK UNIFIED IDEOGRAPH + {0xF853, 0x9CF6}, //21219 #CJK UNIFIED IDEOGRAPH + {0xF854, 0x9CF7}, //21220 #CJK UNIFIED IDEOGRAPH + {0xF855, 0x9CF8}, //21221 #CJK UNIFIED IDEOGRAPH + {0xF856, 0x9CF9}, //21222 #CJK UNIFIED IDEOGRAPH + {0xF857, 0x9CFA}, //21223 #CJK UNIFIED IDEOGRAPH + {0xF858, 0x9CFB}, //21224 #CJK UNIFIED IDEOGRAPH + {0xF859, 0x9CFC}, //21225 #CJK UNIFIED IDEOGRAPH + {0xF85A, 0x9CFD}, //21226 #CJK UNIFIED IDEOGRAPH + {0xF85B, 0x9CFE}, //21227 #CJK UNIFIED IDEOGRAPH + {0xF85C, 0x9CFF}, //21228 #CJK UNIFIED IDEOGRAPH + {0xF85D, 0x9D00}, //21229 #CJK UNIFIED IDEOGRAPH + {0xF85E, 0x9D01}, //21230 #CJK UNIFIED IDEOGRAPH + {0xF85F, 0x9D02}, //21231 #CJK UNIFIED IDEOGRAPH + {0xF860, 0x9D03}, //21232 #CJK UNIFIED IDEOGRAPH + {0xF861, 0x9D04}, //21233 #CJK UNIFIED IDEOGRAPH + {0xF862, 0x9D05}, //21234 #CJK UNIFIED IDEOGRAPH + {0xF863, 0x9D06}, //21235 #CJK UNIFIED IDEOGRAPH + {0xF864, 0x9D07}, //21236 #CJK UNIFIED IDEOGRAPH + {0xF865, 0x9D08}, //21237 #CJK UNIFIED IDEOGRAPH + {0xF866, 0x9D09}, //21238 #CJK UNIFIED IDEOGRAPH + {0xF867, 0x9D0A}, //21239 #CJK UNIFIED IDEOGRAPH + {0xF868, 0x9D0B}, //21240 #CJK UNIFIED IDEOGRAPH + {0xF869, 0x9D0C}, //21241 #CJK UNIFIED IDEOGRAPH + {0xF86A, 0x9D0D}, //21242 #CJK UNIFIED IDEOGRAPH + {0xF86B, 0x9D0E}, //21243 #CJK UNIFIED IDEOGRAPH + {0xF86C, 0x9D0F}, //21244 #CJK UNIFIED IDEOGRAPH + {0xF86D, 0x9D10}, //21245 #CJK UNIFIED IDEOGRAPH + {0xF86E, 0x9D11}, //21246 #CJK UNIFIED IDEOGRAPH + {0xF86F, 0x9D12}, //21247 #CJK UNIFIED IDEOGRAPH + {0xF870, 0x9D13}, //21248 #CJK UNIFIED IDEOGRAPH + {0xF871, 0x9D14}, //21249 #CJK UNIFIED IDEOGRAPH + {0xF872, 0x9D15}, //21250 #CJK UNIFIED IDEOGRAPH + {0xF873, 0x9D16}, //21251 #CJK UNIFIED IDEOGRAPH + {0xF874, 0x9D17}, //21252 #CJK UNIFIED IDEOGRAPH + {0xF875, 0x9D18}, //21253 #CJK UNIFIED IDEOGRAPH + {0xF876, 0x9D19}, //21254 #CJK UNIFIED IDEOGRAPH + {0xF877, 0x9D1A}, //21255 #CJK UNIFIED IDEOGRAPH + {0xF878, 0x9D1B}, //21256 #CJK UNIFIED IDEOGRAPH + {0xF879, 0x9D1C}, //21257 #CJK UNIFIED IDEOGRAPH + {0xF87A, 0x9D1D}, //21258 #CJK UNIFIED IDEOGRAPH + {0xF87B, 0x9D1E}, //21259 #CJK UNIFIED IDEOGRAPH + {0xF87C, 0x9D1F}, //21260 #CJK UNIFIED IDEOGRAPH + {0xF87D, 0x9D20}, //21261 #CJK UNIFIED IDEOGRAPH + {0xF87E, 0x9D21}, //21262 #CJK UNIFIED IDEOGRAPH + {0xF880, 0x9D22}, //21263 #CJK UNIFIED IDEOGRAPH + {0xF881, 0x9D23}, //21264 #CJK UNIFIED IDEOGRAPH + {0xF882, 0x9D24}, //21265 #CJK UNIFIED IDEOGRAPH + {0xF883, 0x9D25}, //21266 #CJK UNIFIED IDEOGRAPH + {0xF884, 0x9D26}, //21267 #CJK UNIFIED IDEOGRAPH + {0xF885, 0x9D27}, //21268 #CJK UNIFIED IDEOGRAPH + {0xF886, 0x9D28}, //21269 #CJK UNIFIED IDEOGRAPH + {0xF887, 0x9D29}, //21270 #CJK UNIFIED IDEOGRAPH + {0xF888, 0x9D2A}, //21271 #CJK UNIFIED IDEOGRAPH + {0xF889, 0x9D2B}, //21272 #CJK UNIFIED IDEOGRAPH + {0xF88A, 0x9D2C}, //21273 #CJK UNIFIED IDEOGRAPH + {0xF88B, 0x9D2D}, //21274 #CJK UNIFIED IDEOGRAPH + {0xF88C, 0x9D2E}, //21275 #CJK UNIFIED IDEOGRAPH + {0xF88D, 0x9D2F}, //21276 #CJK UNIFIED IDEOGRAPH + {0xF88E, 0x9D30}, //21277 #CJK UNIFIED IDEOGRAPH + {0xF88F, 0x9D31}, //21278 #CJK UNIFIED IDEOGRAPH + {0xF890, 0x9D32}, //21279 #CJK UNIFIED IDEOGRAPH + {0xF891, 0x9D33}, //21280 #CJK UNIFIED IDEOGRAPH + {0xF892, 0x9D34}, //21281 #CJK UNIFIED IDEOGRAPH + {0xF893, 0x9D35}, //21282 #CJK UNIFIED IDEOGRAPH + {0xF894, 0x9D36}, //21283 #CJK UNIFIED IDEOGRAPH + {0xF895, 0x9D37}, //21284 #CJK UNIFIED IDEOGRAPH + {0xF896, 0x9D38}, //21285 #CJK UNIFIED IDEOGRAPH + {0xF897, 0x9D39}, //21286 #CJK UNIFIED IDEOGRAPH + {0xF898, 0x9D3A}, //21287 #CJK UNIFIED IDEOGRAPH + {0xF899, 0x9D3B}, //21288 #CJK UNIFIED IDEOGRAPH + {0xF89A, 0x9D3C}, //21289 #CJK UNIFIED IDEOGRAPH + {0xF89B, 0x9D3D}, //21290 #CJK UNIFIED IDEOGRAPH + {0xF89C, 0x9D3E}, //21291 #CJK UNIFIED IDEOGRAPH + {0xF89D, 0x9D3F}, //21292 #CJK UNIFIED IDEOGRAPH + {0xF89E, 0x9D40}, //21293 #CJK UNIFIED IDEOGRAPH + {0xF89F, 0x9D41}, //21294 #CJK UNIFIED IDEOGRAPH + {0xF8A0, 0x9D42}, //21295 #CJK UNIFIED IDEOGRAPH + {0xF940, 0x9D43}, //21296 #CJK UNIFIED IDEOGRAPH + {0xF941, 0x9D44}, //21297 #CJK UNIFIED IDEOGRAPH + {0xF942, 0x9D45}, //21298 #CJK UNIFIED IDEOGRAPH + {0xF943, 0x9D46}, //21299 #CJK UNIFIED IDEOGRAPH + {0xF944, 0x9D47}, //21300 #CJK UNIFIED IDEOGRAPH + {0xF945, 0x9D48}, //21301 #CJK UNIFIED IDEOGRAPH + {0xF946, 0x9D49}, //21302 #CJK UNIFIED IDEOGRAPH + {0xF947, 0x9D4A}, //21303 #CJK UNIFIED IDEOGRAPH + {0xF948, 0x9D4B}, //21304 #CJK UNIFIED IDEOGRAPH + {0xF949, 0x9D4C}, //21305 #CJK UNIFIED IDEOGRAPH + {0xF94A, 0x9D4D}, //21306 #CJK UNIFIED IDEOGRAPH + {0xF94B, 0x9D4E}, //21307 #CJK UNIFIED IDEOGRAPH + {0xF94C, 0x9D4F}, //21308 #CJK UNIFIED IDEOGRAPH + {0xF94D, 0x9D50}, //21309 #CJK UNIFIED IDEOGRAPH + {0xF94E, 0x9D51}, //21310 #CJK UNIFIED IDEOGRAPH + {0xF94F, 0x9D52}, //21311 #CJK UNIFIED IDEOGRAPH + {0xF950, 0x9D53}, //21312 #CJK UNIFIED IDEOGRAPH + {0xF951, 0x9D54}, //21313 #CJK UNIFIED IDEOGRAPH + {0xF952, 0x9D55}, //21314 #CJK UNIFIED IDEOGRAPH + {0xF953, 0x9D56}, //21315 #CJK UNIFIED IDEOGRAPH + {0xF954, 0x9D57}, //21316 #CJK UNIFIED IDEOGRAPH + {0xF955, 0x9D58}, //21317 #CJK UNIFIED IDEOGRAPH + {0xF956, 0x9D59}, //21318 #CJK UNIFIED IDEOGRAPH + {0xF957, 0x9D5A}, //21319 #CJK UNIFIED IDEOGRAPH + {0xF958, 0x9D5B}, //21320 #CJK UNIFIED IDEOGRAPH + {0xF959, 0x9D5C}, //21321 #CJK UNIFIED IDEOGRAPH + {0xF95A, 0x9D5D}, //21322 #CJK UNIFIED IDEOGRAPH + {0xF95B, 0x9D5E}, //21323 #CJK UNIFIED IDEOGRAPH + {0xF95C, 0x9D5F}, //21324 #CJK UNIFIED IDEOGRAPH + {0xF95D, 0x9D60}, //21325 #CJK UNIFIED IDEOGRAPH + {0xF95E, 0x9D61}, //21326 #CJK UNIFIED IDEOGRAPH + {0xF95F, 0x9D62}, //21327 #CJK UNIFIED IDEOGRAPH + {0xF960, 0x9D63}, //21328 #CJK UNIFIED IDEOGRAPH + {0xF961, 0x9D64}, //21329 #CJK UNIFIED IDEOGRAPH + {0xF962, 0x9D65}, //21330 #CJK UNIFIED IDEOGRAPH + {0xF963, 0x9D66}, //21331 #CJK UNIFIED IDEOGRAPH + {0xF964, 0x9D67}, //21332 #CJK UNIFIED IDEOGRAPH + {0xF965, 0x9D68}, //21333 #CJK UNIFIED IDEOGRAPH + {0xF966, 0x9D69}, //21334 #CJK UNIFIED IDEOGRAPH + {0xF967, 0x9D6A}, //21335 #CJK UNIFIED IDEOGRAPH + {0xF968, 0x9D6B}, //21336 #CJK UNIFIED IDEOGRAPH + {0xF969, 0x9D6C}, //21337 #CJK UNIFIED IDEOGRAPH + {0xF96A, 0x9D6D}, //21338 #CJK UNIFIED IDEOGRAPH + {0xF96B, 0x9D6E}, //21339 #CJK UNIFIED IDEOGRAPH + {0xF96C, 0x9D6F}, //21340 #CJK UNIFIED IDEOGRAPH + {0xF96D, 0x9D70}, //21341 #CJK UNIFIED IDEOGRAPH + {0xF96E, 0x9D71}, //21342 #CJK UNIFIED IDEOGRAPH + {0xF96F, 0x9D72}, //21343 #CJK UNIFIED IDEOGRAPH + {0xF970, 0x9D73}, //21344 #CJK UNIFIED IDEOGRAPH + {0xF971, 0x9D74}, //21345 #CJK UNIFIED IDEOGRAPH + {0xF972, 0x9D75}, //21346 #CJK UNIFIED IDEOGRAPH + {0xF973, 0x9D76}, //21347 #CJK UNIFIED IDEOGRAPH + {0xF974, 0x9D77}, //21348 #CJK UNIFIED IDEOGRAPH + {0xF975, 0x9D78}, //21349 #CJK UNIFIED IDEOGRAPH + {0xF976, 0x9D79}, //21350 #CJK UNIFIED IDEOGRAPH + {0xF977, 0x9D7A}, //21351 #CJK UNIFIED IDEOGRAPH + {0xF978, 0x9D7B}, //21352 #CJK UNIFIED IDEOGRAPH + {0xF979, 0x9D7C}, //21353 #CJK UNIFIED IDEOGRAPH + {0xF97A, 0x9D7D}, //21354 #CJK UNIFIED IDEOGRAPH + {0xF97B, 0x9D7E}, //21355 #CJK UNIFIED IDEOGRAPH + {0xF97C, 0x9D7F}, //21356 #CJK UNIFIED IDEOGRAPH + {0xF97D, 0x9D80}, //21357 #CJK UNIFIED IDEOGRAPH + {0xF97E, 0x9D81}, //21358 #CJK UNIFIED IDEOGRAPH + {0xF980, 0x9D82}, //21359 #CJK UNIFIED IDEOGRAPH + {0xF981, 0x9D83}, //21360 #CJK UNIFIED IDEOGRAPH + {0xF982, 0x9D84}, //21361 #CJK UNIFIED IDEOGRAPH + {0xF983, 0x9D85}, //21362 #CJK UNIFIED IDEOGRAPH + {0xF984, 0x9D86}, //21363 #CJK UNIFIED IDEOGRAPH + {0xF985, 0x9D87}, //21364 #CJK UNIFIED IDEOGRAPH + {0xF986, 0x9D88}, //21365 #CJK UNIFIED IDEOGRAPH + {0xF987, 0x9D89}, //21366 #CJK UNIFIED IDEOGRAPH + {0xF988, 0x9D8A}, //21367 #CJK UNIFIED IDEOGRAPH + {0xF989, 0x9D8B}, //21368 #CJK UNIFIED IDEOGRAPH + {0xF98A, 0x9D8C}, //21369 #CJK UNIFIED IDEOGRAPH + {0xF98B, 0x9D8D}, //21370 #CJK UNIFIED IDEOGRAPH + {0xF98C, 0x9D8E}, //21371 #CJK UNIFIED IDEOGRAPH + {0xF98D, 0x9D8F}, //21372 #CJK UNIFIED IDEOGRAPH + {0xF98E, 0x9D90}, //21373 #CJK UNIFIED IDEOGRAPH + {0xF98F, 0x9D91}, //21374 #CJK UNIFIED IDEOGRAPH + {0xF990, 0x9D92}, //21375 #CJK UNIFIED IDEOGRAPH + {0xF991, 0x9D93}, //21376 #CJK UNIFIED IDEOGRAPH + {0xF992, 0x9D94}, //21377 #CJK UNIFIED IDEOGRAPH + {0xF993, 0x9D95}, //21378 #CJK UNIFIED IDEOGRAPH + {0xF994, 0x9D96}, //21379 #CJK UNIFIED IDEOGRAPH + {0xF995, 0x9D97}, //21380 #CJK UNIFIED IDEOGRAPH + {0xF996, 0x9D98}, //21381 #CJK UNIFIED IDEOGRAPH + {0xF997, 0x9D99}, //21382 #CJK UNIFIED IDEOGRAPH + {0xF998, 0x9D9A}, //21383 #CJK UNIFIED IDEOGRAPH + {0xF999, 0x9D9B}, //21384 #CJK UNIFIED IDEOGRAPH + {0xF99A, 0x9D9C}, //21385 #CJK UNIFIED IDEOGRAPH + {0xF99B, 0x9D9D}, //21386 #CJK UNIFIED IDEOGRAPH + {0xF99C, 0x9D9E}, //21387 #CJK UNIFIED IDEOGRAPH + {0xF99D, 0x9D9F}, //21388 #CJK UNIFIED IDEOGRAPH + {0xF99E, 0x9DA0}, //21389 #CJK UNIFIED IDEOGRAPH + {0xF99F, 0x9DA1}, //21390 #CJK UNIFIED IDEOGRAPH + {0xF9A0, 0x9DA2}, //21391 #CJK UNIFIED IDEOGRAPH + {0xFA40, 0x9DA3}, //21392 #CJK UNIFIED IDEOGRAPH + {0xFA41, 0x9DA4}, //21393 #CJK UNIFIED IDEOGRAPH + {0xFA42, 0x9DA5}, //21394 #CJK UNIFIED IDEOGRAPH + {0xFA43, 0x9DA6}, //21395 #CJK UNIFIED IDEOGRAPH + {0xFA44, 0x9DA7}, //21396 #CJK UNIFIED IDEOGRAPH + {0xFA45, 0x9DA8}, //21397 #CJK UNIFIED IDEOGRAPH + {0xFA46, 0x9DA9}, //21398 #CJK UNIFIED IDEOGRAPH + {0xFA47, 0x9DAA}, //21399 #CJK UNIFIED IDEOGRAPH + {0xFA48, 0x9DAB}, //21400 #CJK UNIFIED IDEOGRAPH + {0xFA49, 0x9DAC}, //21401 #CJK UNIFIED IDEOGRAPH + {0xFA4A, 0x9DAD}, //21402 #CJK UNIFIED IDEOGRAPH + {0xFA4B, 0x9DAE}, //21403 #CJK UNIFIED IDEOGRAPH + {0xFA4C, 0x9DAF}, //21404 #CJK UNIFIED IDEOGRAPH + {0xFA4D, 0x9DB0}, //21405 #CJK UNIFIED IDEOGRAPH + {0xFA4E, 0x9DB1}, //21406 #CJK UNIFIED IDEOGRAPH + {0xFA4F, 0x9DB2}, //21407 #CJK UNIFIED IDEOGRAPH + {0xFA50, 0x9DB3}, //21408 #CJK UNIFIED IDEOGRAPH + {0xFA51, 0x9DB4}, //21409 #CJK UNIFIED IDEOGRAPH + {0xFA52, 0x9DB5}, //21410 #CJK UNIFIED IDEOGRAPH + {0xFA53, 0x9DB6}, //21411 #CJK UNIFIED IDEOGRAPH + {0xFA54, 0x9DB7}, //21412 #CJK UNIFIED IDEOGRAPH + {0xFA55, 0x9DB8}, //21413 #CJK UNIFIED IDEOGRAPH + {0xFA56, 0x9DB9}, //21414 #CJK UNIFIED IDEOGRAPH + {0xFA57, 0x9DBA}, //21415 #CJK UNIFIED IDEOGRAPH + {0xFA58, 0x9DBB}, //21416 #CJK UNIFIED IDEOGRAPH + {0xFA59, 0x9DBC}, //21417 #CJK UNIFIED IDEOGRAPH + {0xFA5A, 0x9DBD}, //21418 #CJK UNIFIED IDEOGRAPH + {0xFA5B, 0x9DBE}, //21419 #CJK UNIFIED IDEOGRAPH + {0xFA5C, 0x9DBF}, //21420 #CJK UNIFIED IDEOGRAPH + {0xFA5D, 0x9DC0}, //21421 #CJK UNIFIED IDEOGRAPH + {0xFA5E, 0x9DC1}, //21422 #CJK UNIFIED IDEOGRAPH + {0xFA5F, 0x9DC2}, //21423 #CJK UNIFIED IDEOGRAPH + {0xFA60, 0x9DC3}, //21424 #CJK UNIFIED IDEOGRAPH + {0xFA61, 0x9DC4}, //21425 #CJK UNIFIED IDEOGRAPH + {0xFA62, 0x9DC5}, //21426 #CJK UNIFIED IDEOGRAPH + {0xFA63, 0x9DC6}, //21427 #CJK UNIFIED IDEOGRAPH + {0xFA64, 0x9DC7}, //21428 #CJK UNIFIED IDEOGRAPH + {0xFA65, 0x9DC8}, //21429 #CJK UNIFIED IDEOGRAPH + {0xFA66, 0x9DC9}, //21430 #CJK UNIFIED IDEOGRAPH + {0xFA67, 0x9DCA}, //21431 #CJK UNIFIED IDEOGRAPH + {0xFA68, 0x9DCB}, //21432 #CJK UNIFIED IDEOGRAPH + {0xFA69, 0x9DCC}, //21433 #CJK UNIFIED IDEOGRAPH + {0xFA6A, 0x9DCD}, //21434 #CJK UNIFIED IDEOGRAPH + {0xFA6B, 0x9DCE}, //21435 #CJK UNIFIED IDEOGRAPH + {0xFA6C, 0x9DCF}, //21436 #CJK UNIFIED IDEOGRAPH + {0xFA6D, 0x9DD0}, //21437 #CJK UNIFIED IDEOGRAPH + {0xFA6E, 0x9DD1}, //21438 #CJK UNIFIED IDEOGRAPH + {0xFA6F, 0x9DD2}, //21439 #CJK UNIFIED IDEOGRAPH + {0xFA70, 0x9DD3}, //21440 #CJK UNIFIED IDEOGRAPH + {0xFA71, 0x9DD4}, //21441 #CJK UNIFIED IDEOGRAPH + {0xFA72, 0x9DD5}, //21442 #CJK UNIFIED IDEOGRAPH + {0xFA73, 0x9DD6}, //21443 #CJK UNIFIED IDEOGRAPH + {0xFA74, 0x9DD7}, //21444 #CJK UNIFIED IDEOGRAPH + {0xFA75, 0x9DD8}, //21445 #CJK UNIFIED IDEOGRAPH + {0xFA76, 0x9DD9}, //21446 #CJK UNIFIED IDEOGRAPH + {0xFA77, 0x9DDA}, //21447 #CJK UNIFIED IDEOGRAPH + {0xFA78, 0x9DDB}, //21448 #CJK UNIFIED IDEOGRAPH + {0xFA79, 0x9DDC}, //21449 #CJK UNIFIED IDEOGRAPH + {0xFA7A, 0x9DDD}, //21450 #CJK UNIFIED IDEOGRAPH + {0xFA7B, 0x9DDE}, //21451 #CJK UNIFIED IDEOGRAPH + {0xFA7C, 0x9DDF}, //21452 #CJK UNIFIED IDEOGRAPH + {0xFA7D, 0x9DE0}, //21453 #CJK UNIFIED IDEOGRAPH + {0xFA7E, 0x9DE1}, //21454 #CJK UNIFIED IDEOGRAPH + {0xFA80, 0x9DE2}, //21455 #CJK UNIFIED IDEOGRAPH + {0xFA81, 0x9DE3}, //21456 #CJK UNIFIED IDEOGRAPH + {0xFA82, 0x9DE4}, //21457 #CJK UNIFIED IDEOGRAPH + {0xFA83, 0x9DE5}, //21458 #CJK UNIFIED IDEOGRAPH + {0xFA84, 0x9DE6}, //21459 #CJK UNIFIED IDEOGRAPH + {0xFA85, 0x9DE7}, //21460 #CJK UNIFIED IDEOGRAPH + {0xFA86, 0x9DE8}, //21461 #CJK UNIFIED IDEOGRAPH + {0xFA87, 0x9DE9}, //21462 #CJK UNIFIED IDEOGRAPH + {0xFA88, 0x9DEA}, //21463 #CJK UNIFIED IDEOGRAPH + {0xFA89, 0x9DEB}, //21464 #CJK UNIFIED IDEOGRAPH + {0xFA8A, 0x9DEC}, //21465 #CJK UNIFIED IDEOGRAPH + {0xFA8B, 0x9DED}, //21466 #CJK UNIFIED IDEOGRAPH + {0xFA8C, 0x9DEE}, //21467 #CJK UNIFIED IDEOGRAPH + {0xFA8D, 0x9DEF}, //21468 #CJK UNIFIED IDEOGRAPH + {0xFA8E, 0x9DF0}, //21469 #CJK UNIFIED IDEOGRAPH + {0xFA8F, 0x9DF1}, //21470 #CJK UNIFIED IDEOGRAPH + {0xFA90, 0x9DF2}, //21471 #CJK UNIFIED IDEOGRAPH + {0xFA91, 0x9DF3}, //21472 #CJK UNIFIED IDEOGRAPH + {0xFA92, 0x9DF4}, //21473 #CJK UNIFIED IDEOGRAPH + {0xFA93, 0x9DF5}, //21474 #CJK UNIFIED IDEOGRAPH + {0xFA94, 0x9DF6}, //21475 #CJK UNIFIED IDEOGRAPH + {0xFA95, 0x9DF7}, //21476 #CJK UNIFIED IDEOGRAPH + {0xFA96, 0x9DF8}, //21477 #CJK UNIFIED IDEOGRAPH + {0xFA97, 0x9DF9}, //21478 #CJK UNIFIED IDEOGRAPH + {0xFA98, 0x9DFA}, //21479 #CJK UNIFIED IDEOGRAPH + {0xFA99, 0x9DFB}, //21480 #CJK UNIFIED IDEOGRAPH + {0xFA9A, 0x9DFC}, //21481 #CJK UNIFIED IDEOGRAPH + {0xFA9B, 0x9DFD}, //21482 #CJK UNIFIED IDEOGRAPH + {0xFA9C, 0x9DFE}, //21483 #CJK UNIFIED IDEOGRAPH + {0xFA9D, 0x9DFF}, //21484 #CJK UNIFIED IDEOGRAPH + {0xFA9E, 0x9E00}, //21485 #CJK UNIFIED IDEOGRAPH + {0xFA9F, 0x9E01}, //21486 #CJK UNIFIED IDEOGRAPH + {0xFAA0, 0x9E02}, //21487 #CJK UNIFIED IDEOGRAPH + {0xFB40, 0x9E03}, //21488 #CJK UNIFIED IDEOGRAPH + {0xFB41, 0x9E04}, //21489 #CJK UNIFIED IDEOGRAPH + {0xFB42, 0x9E05}, //21490 #CJK UNIFIED IDEOGRAPH + {0xFB43, 0x9E06}, //21491 #CJK UNIFIED IDEOGRAPH + {0xFB44, 0x9E07}, //21492 #CJK UNIFIED IDEOGRAPH + {0xFB45, 0x9E08}, //21493 #CJK UNIFIED IDEOGRAPH + {0xFB46, 0x9E09}, //21494 #CJK UNIFIED IDEOGRAPH + {0xFB47, 0x9E0A}, //21495 #CJK UNIFIED IDEOGRAPH + {0xFB48, 0x9E0B}, //21496 #CJK UNIFIED IDEOGRAPH + {0xFB49, 0x9E0C}, //21497 #CJK UNIFIED IDEOGRAPH + {0xFB4A, 0x9E0D}, //21498 #CJK UNIFIED IDEOGRAPH + {0xFB4B, 0x9E0E}, //21499 #CJK UNIFIED IDEOGRAPH + {0xFB4C, 0x9E0F}, //21500 #CJK UNIFIED IDEOGRAPH + {0xFB4D, 0x9E10}, //21501 #CJK UNIFIED IDEOGRAPH + {0xFB4E, 0x9E11}, //21502 #CJK UNIFIED IDEOGRAPH + {0xFB4F, 0x9E12}, //21503 #CJK UNIFIED IDEOGRAPH + {0xFB50, 0x9E13}, //21504 #CJK UNIFIED IDEOGRAPH + {0xFB51, 0x9E14}, //21505 #CJK UNIFIED IDEOGRAPH + {0xFB52, 0x9E15}, //21506 #CJK UNIFIED IDEOGRAPH + {0xFB53, 0x9E16}, //21507 #CJK UNIFIED IDEOGRAPH + {0xFB54, 0x9E17}, //21508 #CJK UNIFIED IDEOGRAPH + {0xFB55, 0x9E18}, //21509 #CJK UNIFIED IDEOGRAPH + {0xFB56, 0x9E19}, //21510 #CJK UNIFIED IDEOGRAPH + {0xFB57, 0x9E1A}, //21511 #CJK UNIFIED IDEOGRAPH + {0xFB58, 0x9E1B}, //21512 #CJK UNIFIED IDEOGRAPH + {0xFB59, 0x9E1C}, //21513 #CJK UNIFIED IDEOGRAPH + {0xFB5A, 0x9E1D}, //21514 #CJK UNIFIED IDEOGRAPH + {0xFB5B, 0x9E1E}, //21515 #CJK UNIFIED IDEOGRAPH + {0xFB5C, 0x9E24}, //21516 #CJK UNIFIED IDEOGRAPH + {0xFB5D, 0x9E27}, //21517 #CJK UNIFIED IDEOGRAPH + {0xFB5E, 0x9E2E}, //21518 #CJK UNIFIED IDEOGRAPH + {0xFB5F, 0x9E30}, //21519 #CJK UNIFIED IDEOGRAPH + {0xFB60, 0x9E34}, //21520 #CJK UNIFIED IDEOGRAPH + {0xFB61, 0x9E3B}, //21521 #CJK UNIFIED IDEOGRAPH + {0xFB62, 0x9E3C}, //21522 #CJK UNIFIED IDEOGRAPH + {0xFB63, 0x9E40}, //21523 #CJK UNIFIED IDEOGRAPH + {0xFB64, 0x9E4D}, //21524 #CJK UNIFIED IDEOGRAPH + {0xFB65, 0x9E50}, //21525 #CJK UNIFIED IDEOGRAPH + {0xFB66, 0x9E52}, //21526 #CJK UNIFIED IDEOGRAPH + {0xFB67, 0x9E53}, //21527 #CJK UNIFIED IDEOGRAPH + {0xFB68, 0x9E54}, //21528 #CJK UNIFIED IDEOGRAPH + {0xFB69, 0x9E56}, //21529 #CJK UNIFIED IDEOGRAPH + {0xFB6A, 0x9E59}, //21530 #CJK UNIFIED IDEOGRAPH + {0xFB6B, 0x9E5D}, //21531 #CJK UNIFIED IDEOGRAPH + {0xFB6C, 0x9E5F}, //21532 #CJK UNIFIED IDEOGRAPH + {0xFB6D, 0x9E60}, //21533 #CJK UNIFIED IDEOGRAPH + {0xFB6E, 0x9E61}, //21534 #CJK UNIFIED IDEOGRAPH + {0xFB6F, 0x9E62}, //21535 #CJK UNIFIED IDEOGRAPH + {0xFB70, 0x9E65}, //21536 #CJK UNIFIED IDEOGRAPH + {0xFB71, 0x9E6E}, //21537 #CJK UNIFIED IDEOGRAPH + {0xFB72, 0x9E6F}, //21538 #CJK UNIFIED IDEOGRAPH + {0xFB73, 0x9E72}, //21539 #CJK UNIFIED IDEOGRAPH + {0xFB74, 0x9E74}, //21540 #CJK UNIFIED IDEOGRAPH + {0xFB75, 0x9E75}, //21541 #CJK UNIFIED IDEOGRAPH + {0xFB76, 0x9E76}, //21542 #CJK UNIFIED IDEOGRAPH + {0xFB77, 0x9E77}, //21543 #CJK UNIFIED IDEOGRAPH + {0xFB78, 0x9E78}, //21544 #CJK UNIFIED IDEOGRAPH + {0xFB79, 0x9E79}, //21545 #CJK UNIFIED IDEOGRAPH + {0xFB7A, 0x9E7A}, //21546 #CJK UNIFIED IDEOGRAPH + {0xFB7B, 0x9E7B}, //21547 #CJK UNIFIED IDEOGRAPH + {0xFB7C, 0x9E7C}, //21548 #CJK UNIFIED IDEOGRAPH + {0xFB7D, 0x9E7D}, //21549 #CJK UNIFIED IDEOGRAPH + {0xFB7E, 0x9E80}, //21550 #CJK UNIFIED IDEOGRAPH + {0xFB80, 0x9E81}, //21551 #CJK UNIFIED IDEOGRAPH + {0xFB81, 0x9E83}, //21552 #CJK UNIFIED IDEOGRAPH + {0xFB82, 0x9E84}, //21553 #CJK UNIFIED IDEOGRAPH + {0xFB83, 0x9E85}, //21554 #CJK UNIFIED IDEOGRAPH + {0xFB84, 0x9E86}, //21555 #CJK UNIFIED IDEOGRAPH + {0xFB85, 0x9E89}, //21556 #CJK UNIFIED IDEOGRAPH + {0xFB86, 0x9E8A}, //21557 #CJK UNIFIED IDEOGRAPH + {0xFB87, 0x9E8C}, //21558 #CJK UNIFIED IDEOGRAPH + {0xFB88, 0x9E8D}, //21559 #CJK UNIFIED IDEOGRAPH + {0xFB89, 0x9E8E}, //21560 #CJK UNIFIED IDEOGRAPH + {0xFB8A, 0x9E8F}, //21561 #CJK UNIFIED IDEOGRAPH + {0xFB8B, 0x9E90}, //21562 #CJK UNIFIED IDEOGRAPH + {0xFB8C, 0x9E91}, //21563 #CJK UNIFIED IDEOGRAPH + {0xFB8D, 0x9E94}, //21564 #CJK UNIFIED IDEOGRAPH + {0xFB8E, 0x9E95}, //21565 #CJK UNIFIED IDEOGRAPH + {0xFB8F, 0x9E96}, //21566 #CJK UNIFIED IDEOGRAPH + {0xFB90, 0x9E97}, //21567 #CJK UNIFIED IDEOGRAPH + {0xFB91, 0x9E98}, //21568 #CJK UNIFIED IDEOGRAPH + {0xFB92, 0x9E99}, //21569 #CJK UNIFIED IDEOGRAPH + {0xFB93, 0x9E9A}, //21570 #CJK UNIFIED IDEOGRAPH + {0xFB94, 0x9E9B}, //21571 #CJK UNIFIED IDEOGRAPH + {0xFB95, 0x9E9C}, //21572 #CJK UNIFIED IDEOGRAPH + {0xFB96, 0x9E9E}, //21573 #CJK UNIFIED IDEOGRAPH + {0xFB97, 0x9EA0}, //21574 #CJK UNIFIED IDEOGRAPH + {0xFB98, 0x9EA1}, //21575 #CJK UNIFIED IDEOGRAPH + {0xFB99, 0x9EA2}, //21576 #CJK UNIFIED IDEOGRAPH + {0xFB9A, 0x9EA3}, //21577 #CJK UNIFIED IDEOGRAPH + {0xFB9B, 0x9EA4}, //21578 #CJK UNIFIED IDEOGRAPH + {0xFB9C, 0x9EA5}, //21579 #CJK UNIFIED IDEOGRAPH + {0xFB9D, 0x9EA7}, //21580 #CJK UNIFIED IDEOGRAPH + {0xFB9E, 0x9EA8}, //21581 #CJK UNIFIED IDEOGRAPH + {0xFB9F, 0x9EA9}, //21582 #CJK UNIFIED IDEOGRAPH + {0xFBA0, 0x9EAA}, //21583 #CJK UNIFIED IDEOGRAPH + {0xFC40, 0x9EAB}, //21584 #CJK UNIFIED IDEOGRAPH + {0xFC41, 0x9EAC}, //21585 #CJK UNIFIED IDEOGRAPH + {0xFC42, 0x9EAD}, //21586 #CJK UNIFIED IDEOGRAPH + {0xFC43, 0x9EAE}, //21587 #CJK UNIFIED IDEOGRAPH + {0xFC44, 0x9EAF}, //21588 #CJK UNIFIED IDEOGRAPH + {0xFC45, 0x9EB0}, //21589 #CJK UNIFIED IDEOGRAPH + {0xFC46, 0x9EB1}, //21590 #CJK UNIFIED IDEOGRAPH + {0xFC47, 0x9EB2}, //21591 #CJK UNIFIED IDEOGRAPH + {0xFC48, 0x9EB3}, //21592 #CJK UNIFIED IDEOGRAPH + {0xFC49, 0x9EB5}, //21593 #CJK UNIFIED IDEOGRAPH + {0xFC4A, 0x9EB6}, //21594 #CJK UNIFIED IDEOGRAPH + {0xFC4B, 0x9EB7}, //21595 #CJK UNIFIED IDEOGRAPH + {0xFC4C, 0x9EB9}, //21596 #CJK UNIFIED IDEOGRAPH + {0xFC4D, 0x9EBA}, //21597 #CJK UNIFIED IDEOGRAPH + {0xFC4E, 0x9EBC}, //21598 #CJK UNIFIED IDEOGRAPH + {0xFC4F, 0x9EBF}, //21599 #CJK UNIFIED IDEOGRAPH + {0xFC50, 0x9EC0}, //21600 #CJK UNIFIED IDEOGRAPH + {0xFC51, 0x9EC1}, //21601 #CJK UNIFIED IDEOGRAPH + {0xFC52, 0x9EC2}, //21602 #CJK UNIFIED IDEOGRAPH + {0xFC53, 0x9EC3}, //21603 #CJK UNIFIED IDEOGRAPH + {0xFC54, 0x9EC5}, //21604 #CJK UNIFIED IDEOGRAPH + {0xFC55, 0x9EC6}, //21605 #CJK UNIFIED IDEOGRAPH + {0xFC56, 0x9EC7}, //21606 #CJK UNIFIED IDEOGRAPH + {0xFC57, 0x9EC8}, //21607 #CJK UNIFIED IDEOGRAPH + {0xFC58, 0x9ECA}, //21608 #CJK UNIFIED IDEOGRAPH + {0xFC59, 0x9ECB}, //21609 #CJK UNIFIED IDEOGRAPH + {0xFC5A, 0x9ECC}, //21610 #CJK UNIFIED IDEOGRAPH + {0xFC5B, 0x9ED0}, //21611 #CJK UNIFIED IDEOGRAPH + {0xFC5C, 0x9ED2}, //21612 #CJK UNIFIED IDEOGRAPH + {0xFC5D, 0x9ED3}, //21613 #CJK UNIFIED IDEOGRAPH + {0xFC5E, 0x9ED5}, //21614 #CJK UNIFIED IDEOGRAPH + {0xFC5F, 0x9ED6}, //21615 #CJK UNIFIED IDEOGRAPH + {0xFC60, 0x9ED7}, //21616 #CJK UNIFIED IDEOGRAPH + {0xFC61, 0x9ED9}, //21617 #CJK UNIFIED IDEOGRAPH + {0xFC62, 0x9EDA}, //21618 #CJK UNIFIED IDEOGRAPH + {0xFC63, 0x9EDE}, //21619 #CJK UNIFIED IDEOGRAPH + {0xFC64, 0x9EE1}, //21620 #CJK UNIFIED IDEOGRAPH + {0xFC65, 0x9EE3}, //21621 #CJK UNIFIED IDEOGRAPH + {0xFC66, 0x9EE4}, //21622 #CJK UNIFIED IDEOGRAPH + {0xFC67, 0x9EE6}, //21623 #CJK UNIFIED IDEOGRAPH + {0xFC68, 0x9EE8}, //21624 #CJK UNIFIED IDEOGRAPH + {0xFC69, 0x9EEB}, //21625 #CJK UNIFIED IDEOGRAPH + {0xFC6A, 0x9EEC}, //21626 #CJK UNIFIED IDEOGRAPH + {0xFC6B, 0x9EED}, //21627 #CJK UNIFIED IDEOGRAPH + {0xFC6C, 0x9EEE}, //21628 #CJK UNIFIED IDEOGRAPH + {0xFC6D, 0x9EF0}, //21629 #CJK UNIFIED IDEOGRAPH + {0xFC6E, 0x9EF1}, //21630 #CJK UNIFIED IDEOGRAPH + {0xFC6F, 0x9EF2}, //21631 #CJK UNIFIED IDEOGRAPH + {0xFC70, 0x9EF3}, //21632 #CJK UNIFIED IDEOGRAPH + {0xFC71, 0x9EF4}, //21633 #CJK UNIFIED IDEOGRAPH + {0xFC72, 0x9EF5}, //21634 #CJK UNIFIED IDEOGRAPH + {0xFC73, 0x9EF6}, //21635 #CJK UNIFIED IDEOGRAPH + {0xFC74, 0x9EF7}, //21636 #CJK UNIFIED IDEOGRAPH + {0xFC75, 0x9EF8}, //21637 #CJK UNIFIED IDEOGRAPH + {0xFC76, 0x9EFA}, //21638 #CJK UNIFIED IDEOGRAPH + {0xFC77, 0x9EFD}, //21639 #CJK UNIFIED IDEOGRAPH + {0xFC78, 0x9EFF}, //21640 #CJK UNIFIED IDEOGRAPH + {0xFC79, 0x9F00}, //21641 #CJK UNIFIED IDEOGRAPH + {0xFC7A, 0x9F01}, //21642 #CJK UNIFIED IDEOGRAPH + {0xFC7B, 0x9F02}, //21643 #CJK UNIFIED IDEOGRAPH + {0xFC7C, 0x9F03}, //21644 #CJK UNIFIED IDEOGRAPH + {0xFC7D, 0x9F04}, //21645 #CJK UNIFIED IDEOGRAPH + {0xFC7E, 0x9F05}, //21646 #CJK UNIFIED IDEOGRAPH + {0xFC80, 0x9F06}, //21647 #CJK UNIFIED IDEOGRAPH + {0xFC81, 0x9F07}, //21648 #CJK UNIFIED IDEOGRAPH + {0xFC82, 0x9F08}, //21649 #CJK UNIFIED IDEOGRAPH + {0xFC83, 0x9F09}, //21650 #CJK UNIFIED IDEOGRAPH + {0xFC84, 0x9F0A}, //21651 #CJK UNIFIED IDEOGRAPH + {0xFC85, 0x9F0C}, //21652 #CJK UNIFIED IDEOGRAPH + {0xFC86, 0x9F0F}, //21653 #CJK UNIFIED IDEOGRAPH + {0xFC87, 0x9F11}, //21654 #CJK UNIFIED IDEOGRAPH + {0xFC88, 0x9F12}, //21655 #CJK UNIFIED IDEOGRAPH + {0xFC89, 0x9F14}, //21656 #CJK UNIFIED IDEOGRAPH + {0xFC8A, 0x9F15}, //21657 #CJK UNIFIED IDEOGRAPH + {0xFC8B, 0x9F16}, //21658 #CJK UNIFIED IDEOGRAPH + {0xFC8C, 0x9F18}, //21659 #CJK UNIFIED IDEOGRAPH + {0xFC8D, 0x9F1A}, //21660 #CJK UNIFIED IDEOGRAPH + {0xFC8E, 0x9F1B}, //21661 #CJK UNIFIED IDEOGRAPH + {0xFC8F, 0x9F1C}, //21662 #CJK UNIFIED IDEOGRAPH + {0xFC90, 0x9F1D}, //21663 #CJK UNIFIED IDEOGRAPH + {0xFC91, 0x9F1E}, //21664 #CJK UNIFIED IDEOGRAPH + {0xFC92, 0x9F1F}, //21665 #CJK UNIFIED IDEOGRAPH + {0xFC93, 0x9F21}, //21666 #CJK UNIFIED IDEOGRAPH + {0xFC94, 0x9F23}, //21667 #CJK UNIFIED IDEOGRAPH + {0xFC95, 0x9F24}, //21668 #CJK UNIFIED IDEOGRAPH + {0xFC96, 0x9F25}, //21669 #CJK UNIFIED IDEOGRAPH + {0xFC97, 0x9F26}, //21670 #CJK UNIFIED IDEOGRAPH + {0xFC98, 0x9F27}, //21671 #CJK UNIFIED IDEOGRAPH + {0xFC99, 0x9F28}, //21672 #CJK UNIFIED IDEOGRAPH + {0xFC9A, 0x9F29}, //21673 #CJK UNIFIED IDEOGRAPH + {0xFC9B, 0x9F2A}, //21674 #CJK UNIFIED IDEOGRAPH + {0xFC9C, 0x9F2B}, //21675 #CJK UNIFIED IDEOGRAPH + {0xFC9D, 0x9F2D}, //21676 #CJK UNIFIED IDEOGRAPH + {0xFC9E, 0x9F2E}, //21677 #CJK UNIFIED IDEOGRAPH + {0xFC9F, 0x9F30}, //21678 #CJK UNIFIED IDEOGRAPH + {0xFCA0, 0x9F31}, //21679 #CJK UNIFIED IDEOGRAPH + {0xFD40, 0x9F32}, //21680 #CJK UNIFIED IDEOGRAPH + {0xFD41, 0x9F33}, //21681 #CJK UNIFIED IDEOGRAPH + {0xFD42, 0x9F34}, //21682 #CJK UNIFIED IDEOGRAPH + {0xFD43, 0x9F35}, //21683 #CJK UNIFIED IDEOGRAPH + {0xFD44, 0x9F36}, //21684 #CJK UNIFIED IDEOGRAPH + {0xFD45, 0x9F38}, //21685 #CJK UNIFIED IDEOGRAPH + {0xFD46, 0x9F3A}, //21686 #CJK UNIFIED IDEOGRAPH + {0xFD47, 0x9F3C}, //21687 #CJK UNIFIED IDEOGRAPH + {0xFD48, 0x9F3F}, //21688 #CJK UNIFIED IDEOGRAPH + {0xFD49, 0x9F40}, //21689 #CJK UNIFIED IDEOGRAPH + {0xFD4A, 0x9F41}, //21690 #CJK UNIFIED IDEOGRAPH + {0xFD4B, 0x9F42}, //21691 #CJK UNIFIED IDEOGRAPH + {0xFD4C, 0x9F43}, //21692 #CJK UNIFIED IDEOGRAPH + {0xFD4D, 0x9F45}, //21693 #CJK UNIFIED IDEOGRAPH + {0xFD4E, 0x9F46}, //21694 #CJK UNIFIED IDEOGRAPH + {0xFD4F, 0x9F47}, //21695 #CJK UNIFIED IDEOGRAPH + {0xFD50, 0x9F48}, //21696 #CJK UNIFIED IDEOGRAPH + {0xFD51, 0x9F49}, //21697 #CJK UNIFIED IDEOGRAPH + {0xFD52, 0x9F4A}, //21698 #CJK UNIFIED IDEOGRAPH + {0xFD53, 0x9F4B}, //21699 #CJK UNIFIED IDEOGRAPH + {0xFD54, 0x9F4C}, //21700 #CJK UNIFIED IDEOGRAPH + {0xFD55, 0x9F4D}, //21701 #CJK UNIFIED IDEOGRAPH + {0xFD56, 0x9F4E}, //21702 #CJK UNIFIED IDEOGRAPH + {0xFD57, 0x9F4F}, //21703 #CJK UNIFIED IDEOGRAPH + {0xFD58, 0x9F52}, //21704 #CJK UNIFIED IDEOGRAPH + {0xFD59, 0x9F53}, //21705 #CJK UNIFIED IDEOGRAPH + {0xFD5A, 0x9F54}, //21706 #CJK UNIFIED IDEOGRAPH + {0xFD5B, 0x9F55}, //21707 #CJK UNIFIED IDEOGRAPH + {0xFD5C, 0x9F56}, //21708 #CJK UNIFIED IDEOGRAPH + {0xFD5D, 0x9F57}, //21709 #CJK UNIFIED IDEOGRAPH + {0xFD5E, 0x9F58}, //21710 #CJK UNIFIED IDEOGRAPH + {0xFD5F, 0x9F59}, //21711 #CJK UNIFIED IDEOGRAPH + {0xFD60, 0x9F5A}, //21712 #CJK UNIFIED IDEOGRAPH + {0xFD61, 0x9F5B}, //21713 #CJK UNIFIED IDEOGRAPH + {0xFD62, 0x9F5C}, //21714 #CJK UNIFIED IDEOGRAPH + {0xFD63, 0x9F5D}, //21715 #CJK UNIFIED IDEOGRAPH + {0xFD64, 0x9F5E}, //21716 #CJK UNIFIED IDEOGRAPH + {0xFD65, 0x9F5F}, //21717 #CJK UNIFIED IDEOGRAPH + {0xFD66, 0x9F60}, //21718 #CJK UNIFIED IDEOGRAPH + {0xFD67, 0x9F61}, //21719 #CJK UNIFIED IDEOGRAPH + {0xFD68, 0x9F62}, //21720 #CJK UNIFIED IDEOGRAPH + {0xFD69, 0x9F63}, //21721 #CJK UNIFIED IDEOGRAPH + {0xFD6A, 0x9F64}, //21722 #CJK UNIFIED IDEOGRAPH + {0xFD6B, 0x9F65}, //21723 #CJK UNIFIED IDEOGRAPH + {0xFD6C, 0x9F66}, //21724 #CJK UNIFIED IDEOGRAPH + {0xFD6D, 0x9F67}, //21725 #CJK UNIFIED IDEOGRAPH + {0xFD6E, 0x9F68}, //21726 #CJK UNIFIED IDEOGRAPH + {0xFD6F, 0x9F69}, //21727 #CJK UNIFIED IDEOGRAPH + {0xFD70, 0x9F6A}, //21728 #CJK UNIFIED IDEOGRAPH + {0xFD71, 0x9F6B}, //21729 #CJK UNIFIED IDEOGRAPH + {0xFD72, 0x9F6C}, //21730 #CJK UNIFIED IDEOGRAPH + {0xFD73, 0x9F6D}, //21731 #CJK UNIFIED IDEOGRAPH + {0xFD74, 0x9F6E}, //21732 #CJK UNIFIED IDEOGRAPH + {0xFD75, 0x9F6F}, //21733 #CJK UNIFIED IDEOGRAPH + {0xFD76, 0x9F70}, //21734 #CJK UNIFIED IDEOGRAPH + {0xFD77, 0x9F71}, //21735 #CJK UNIFIED IDEOGRAPH + {0xFD78, 0x9F72}, //21736 #CJK UNIFIED IDEOGRAPH + {0xFD79, 0x9F73}, //21737 #CJK UNIFIED IDEOGRAPH + {0xFD7A, 0x9F74}, //21738 #CJK UNIFIED IDEOGRAPH + {0xFD7B, 0x9F75}, //21739 #CJK UNIFIED IDEOGRAPH + {0xFD7C, 0x9F76}, //21740 #CJK UNIFIED IDEOGRAPH + {0xFD7D, 0x9F77}, //21741 #CJK UNIFIED IDEOGRAPH + {0xFD7E, 0x9F78}, //21742 #CJK UNIFIED IDEOGRAPH + {0xFD80, 0x9F79}, //21743 #CJK UNIFIED IDEOGRAPH + {0xFD81, 0x9F7A}, //21744 #CJK UNIFIED IDEOGRAPH + {0xFD82, 0x9F7B}, //21745 #CJK UNIFIED IDEOGRAPH + {0xFD83, 0x9F7C}, //21746 #CJK UNIFIED IDEOGRAPH + {0xFD84, 0x9F7D}, //21747 #CJK UNIFIED IDEOGRAPH + {0xFD85, 0x9F7E}, //21748 #CJK UNIFIED IDEOGRAPH + {0xFD86, 0x9F81}, //21749 #CJK UNIFIED IDEOGRAPH + {0xFD87, 0x9F82}, //21750 #CJK UNIFIED IDEOGRAPH + {0xFD88, 0x9F8D}, //21751 #CJK UNIFIED IDEOGRAPH + {0xFD89, 0x9F8E}, //21752 #CJK UNIFIED IDEOGRAPH + {0xFD8A, 0x9F8F}, //21753 #CJK UNIFIED IDEOGRAPH + {0xFD8B, 0x9F90}, //21754 #CJK UNIFIED IDEOGRAPH + {0xFD8C, 0x9F91}, //21755 #CJK UNIFIED IDEOGRAPH + {0xFD8D, 0x9F92}, //21756 #CJK UNIFIED IDEOGRAPH + {0xFD8E, 0x9F93}, //21757 #CJK UNIFIED IDEOGRAPH + {0xFD8F, 0x9F94}, //21758 #CJK UNIFIED IDEOGRAPH + {0xFD90, 0x9F95}, //21759 #CJK UNIFIED IDEOGRAPH + {0xFD91, 0x9F96}, //21760 #CJK UNIFIED IDEOGRAPH + {0xFD92, 0x9F97}, //21761 #CJK UNIFIED IDEOGRAPH + {0xFD93, 0x9F98}, //21762 #CJK UNIFIED IDEOGRAPH + {0xFD94, 0x9F9C}, //21763 #CJK UNIFIED IDEOGRAPH + {0xFD95, 0x9F9D}, //21764 #CJK UNIFIED IDEOGRAPH + {0xFD96, 0x9F9E}, //21765 #CJK UNIFIED IDEOGRAPH + {0xFD97, 0x9FA1}, //21766 #CJK UNIFIED IDEOGRAPH + {0xFD98, 0x9FA2}, //21767 #CJK UNIFIED IDEOGRAPH + {0xFD99, 0x9FA3}, //21768 #CJK UNIFIED IDEOGRAPH + {0xFD9A, 0x9FA4}, //21769 #CJK UNIFIED IDEOGRAPH + {0xFD9B, 0x9FA5}, //21770 #CJK UNIFIED IDEOGRAPH + {0xFD9C, 0xF92C}, //21771 #CJK COMPATIBILITY IDEOGRAPH + {0xFD9D, 0xF979}, //21772 #CJK COMPATIBILITY IDEOGRAPH + {0xFD9E, 0xF995}, //21773 #CJK COMPATIBILITY IDEOGRAPH + {0xFD9F, 0xF9E7}, //21774 #CJK COMPATIBILITY IDEOGRAPH + {0xFDA0, 0xF9F1}, //21775 #CJK COMPATIBILITY IDEOGRAPH + {0xFE40, 0xFA0C}, //21776 #CJK COMPATIBILITY IDEOGRAPH + {0xFE41, 0xFA0D}, //21777 #CJK COMPATIBILITY IDEOGRAPH + {0xFE42, 0xFA0E}, //21778 #CJK COMPATIBILITY IDEOGRAPH + {0xFE43, 0xFA0F}, //21779 #CJK COMPATIBILITY IDEOGRAPH + {0xFE44, 0xFA11}, //21780 #CJK COMPATIBILITY IDEOGRAPH + {0xFE45, 0xFA13}, //21781 #CJK COMPATIBILITY IDEOGRAPH + {0xFE46, 0xFA14}, //21782 #CJK COMPATIBILITY IDEOGRAPH + {0xFE47, 0xFA18}, //21783 #CJK COMPATIBILITY IDEOGRAPH + {0xFE48, 0xFA1F}, //21784 #CJK COMPATIBILITY IDEOGRAPH + {0xFE49, 0xFA20}, //21785 #CJK COMPATIBILITY IDEOGRAPH + {0xFE4A, 0xFA21}, //21786 #CJK COMPATIBILITY IDEOGRAPH + {0xFE4B, 0xFA23}, //21787 #CJK COMPATIBILITY IDEOGRAPH + {0xFE4C, 0xFA24}, //21788 #CJK COMPATIBILITY IDEOGRAPH + {0xFE4D, 0xFA27}, //21789 #CJK COMPATIBILITY IDEOGRAPH + {0xFE4E, 0xFA28}, //21790 #CJK COMPATIBILITY IDEOGRAPH + {0xFE4F, 0xFA29} //21791 #CJK COMPATIBILITY IDEOGRAPH +}; + +#endif // DRW_CPTABLE936_H diff --git a/lib_dxf/intern/drw_cptable949.h b/lib_dxf/intern/drw_cptable949.h new file mode 100644 index 0000000000..3276b603e3 --- /dev/null +++ b/lib_dxf/intern/drw_cptable949.h @@ -0,0 +1,17199 @@ +#ifndef DRW_CPTABLE949_H +#define DRW_CPTABLE949_H + +//Korean Extended Wansung + +//first entry in this table are 0x80 +#define CPOFFSET949 0x80 +#define CPLENGHT949 17048 +#define NOTFOUND949 0x003F + +//Table 949 one byte +static const int DRW_Table949[1] = { +}; + +//Table 949 lead byte +//pairs of start/end in DRW_DoubleTable949 +static const int DRW_LeadTable949[] = { + 0, //1#DBCS LEAD BYTE 0x81 + 178, //2#DBCS LEAD BYTE 0x82 + 356, //3#DBCS LEAD BYTE 0x83 + 564, //4#DBCS LEAD BYTE 0x84 + 712, //5#DBCS LEAD BYTE 0x85 + 890, //6#DBCS LEAD BYTE 0x86 + 1068, //7#DBCS LEAD BYTE 0x87 + 1246, //8#DBCS LEAD BYTE 0x88 + 1424, //9#DBCS LEAD BYTE 0x89 + 1602, //10#DBCS LEAD BYTE 0x8A + 1780, //11#DBCS LEAD BYTE 0x8B + 1958, //12#DBCS LEAD BYTE 0x8C + 2136, //13#DBCS LEAD BYTE 0x8D + 2314, //14#DBCS LEAD BYTE 0x8E + 2492, //15#DBCS LEAD BYTE 0x8F + 2670, //16#DBCS LEAD BYTE 0x90 + 2848, //17#DBCS LEAD BYTE 0x91 + 3026, //18#DBCS LEAD BYTE 0x92 + 3204, //19#DBCS LEAD BYTE 0x93 + 3382, //20#DBCS LEAD BYTE 0x94 + 3560, //21#DBCS LEAD BYTE 0x95 + 3738, //22#DBCS LEAD BYTE 0x96 + 3916, //23#DBCS LEAD BYTE 0x97 + 4094, //24#DBCS LEAD BYTE 0x98 + 4272, //25#DBCS LEAD BYTE 0x99 + 4450, //26#DBCS LEAD BYTE 0x9A + 4628, //27#DBCS LEAD BYTE 0x9B + 4806, //28#DBCS LEAD BYTE 0x9C + 4984, //29#DBCS LEAD BYTE 0x9D + 5162, //30#DBCS LEAD BYTE 0x9E + 5340, //31#DBCS LEAD BYTE 0x9F + 5518, //32#DBCS LEAD BYTE 0xA0 + 5696, //33#DBCS LEAD BYTE 0xA1 + 5874, //34#DBCS LEAD BYTE 0xA2 + 6029, //35#DBCS LEAD BYTE 0xA3 + 6207, //36#DBCS LEAD BYTE 0xA4 + 6385, //37#DBCS LEAD BYTE 0xA5 + 6537, //38#DBCS LEAD BYTE 0xA6 + 6689, //39#DBCS LEAD BYTE 0xA7 + 6852, //40#DBCS LEAD BYTE 0xA8 + 7027, //41#DBCS LEAD BYTE 0xA9 + 7205, //42#DBCS LEAD BYTE 0xAA + 7372, //43#DBCS LEAD BYTE 0xAB + 7542, //44#DBCS LEAD BYTE 0xAC + 7692, //45#DBCS LEAD BYTE 0xAD + 7776, //46#DBCS LEAD BYTE 0xAE + 7860, //47#DBCS LEAD BYTE 0xAF + 7944, //48#DBCS LEAD BYTE 0xB0 + 8122, //49#DBCS LEAD BYTE 0xB1 + 8300, //50#DBCS LEAD BYTE 0xB2 + 8478, //51#DBCS LEAD BYTE 0xB3 + 8656, //52#DBCS LEAD BYTE 0xB4 + 8834, //53#DBCS LEAD BYTE 0xB5 + 9012, //54#DBCS LEAD BYTE 0xB6 + 9190, //55#DBCS LEAD BYTE 0xB7 + 9368, //56#DBCS LEAD BYTE 0xB8 + 9546, //57#DBCS LEAD BYTE 0xB9 + 9724, //58#DBCS LEAD BYTE 0xBA + 9902, //59#DBCS LEAD BYTE 0xBB + 10080, //60#DBCS LEAD BYTE 0xBC + 10258, //61#DBCS LEAD BYTE 0xBD + 10436, //62#DBCS LEAD BYTE 0xBE + 10614, //63#DBCS LEAD BYTE 0xBF + 10792, //64#DBCS LEAD BYTE 0xC0 + 10970, //65#DBCS LEAD BYTE 0xC1 + 11148, //66#DBCS LEAD BYTE 0xC2 + 11326, //67#DBCS LEAD BYTE 0xC3 + 11504, //68#DBCS LEAD BYTE 0xC4 + 11682, //69#DBCS LEAD BYTE 0xC5 + 11860, //70#DBCS LEAD BYTE 0xC6 + 11972, //71#DBCS LEAD BYTE 0xC7 + 12066, //72#DBCS LEAD BYTE 0xC8 + 12160, //73#DBCS LEAD BYTE 0xC9, empty + 12160, //74#DBCS LEAD BYTE 0xCA + 12254, //75#DBCS LEAD BYTE 0xCB + 12348, //76#DBCS LEAD BYTE 0xCC + 12442, //77#DBCS LEAD BYTE 0xCD + 12536, //78#DBCS LEAD BYTE 0xCE + 12630, //79#DBCS LEAD BYTE 0xCF + 12724, //80#DBCS LEAD BYTE 0xD0 + 12818, //81#DBCS LEAD BYTE 0xD1 + 12912, //82#DBCS LEAD BYTE 0xD2 + 13006, //83#DBCS LEAD BYTE 0xD3 + 13100, //84#DBCS LEAD BYTE 0xD4 + 13194, //85#DBCS LEAD BYTE 0xD5 + 13288, //86#DBCS LEAD BYTE 0xD6 + 13382, //87#DBCS LEAD BYTE 0xD7 + 13476, //88#DBCS LEAD BYTE 0xD8 + 13570, //89#DBCS LEAD BYTE 0xD9 + 13664, //90#DBCS LEAD BYTE 0xDA + 13758, //91#DBCS LEAD BYTE 0xDB + 13852, //92#DBCS LEAD BYTE 0xDC + 13946, //93#DBCS LEAD BYTE 0xDD + 14040, //94#DBCS LEAD BYTE 0xDE + 14134, //95#DBCS LEAD BYTE 0xDF + 14228, //96#DBCS LEAD BYTE 0xE0 + 14322, //97#DBCS LEAD BYTE 0xE1 + 14416, //98#DBCS LEAD BYTE 0xE2 + 14510, //99#DBCS LEAD BYTE 0xE3 + 14604, //100#DBCS LEAD BYTE 0xE4 + 14698, //101#DBCS LEAD BYTE 0xE5 + 14792, //102#DBCS LEAD BYTE 0xE6 + 14886, //103#DBCS LEAD BYTE 0xE7 + 14980, //104#DBCS LEAD BYTE 0xE8 + 15074, //105#DBCS LEAD BYTE 0xE9 + 15168, //106#DBCS LEAD BYTE 0xEA + 15262, //107#DBCS LEAD BYTE 0xEB + 15356, //108#DBCS LEAD BYTE 0xEC + 15450, //109#DBCS LEAD BYTE 0xED + 15544, //110#DBCS LEAD BYTE 0xEE + 15638, //111#DBCS LEAD BYTE 0xEF + 15732, //112#DBCS LEAD BYTE 0xF0 + 15826, //113#DBCS LEAD BYTE 0xF1 + 15920, //114#DBCS LEAD BYTE 0xF2 + 16014, //115#DBCS LEAD BYTE 0xF3 + 16108, //116#DBCS LEAD BYTE 0xF4 + 16202, //117#DBCS LEAD BYTE 0xF5 + 16296, //118#DBCS LEAD BYTE 0xF6 + 16390, //119#DBCS LEAD BYTE 0xF7 + 16484, //120#DBCS LEAD BYTE 0xF8 + 16578, //121#DBCS LEAD BYTE 0xF9 + 16672, //122#DBCS LEAD BYTE 0xFA + 16766, //123#DBCS LEAD BYTE 0xFB + 16860, //124#DBCS LEAD BYTE 0xFC + 16954, //125#DBCS LEAD BYTE 0xFD + 17047, //126#DBCS LEAD BYTE 0xFE, empty + 17047, //127#UNDEFINED 0xFF, END OF TABLE +}; + +//Table 949 tail byte +static const int DRW_DoubleTable949[][2] = { + {0x8141, 0xAC02}, //1 #HANGUL SYLLABLE KIYEOK A SSANGKIYEOK + {0x8142, 0xAC03}, //2 #HANGUL SYLLABLE KIYEOK A KIYEOKSIOS + {0x8143, 0xAC05}, //3 #HANGUL SYLLABLE KIYEOK A NIEUNCIEUC + {0x8144, 0xAC06}, //4 #HANGUL SYLLABLE KIYEOK A NIEUNHIEUH + {0x8145, 0xAC0B}, //5 #HANGUL SYLLABLE KIYEOK A RIEULPIEUP + {0x8146, 0xAC0C}, //6 #HANGUL SYLLABLE KIYEOK A RIEULSIOS + {0x8147, 0xAC0D}, //7 #HANGUL SYLLABLE KIYEOK A RIEULTHIEUTH + {0x8148, 0xAC0E}, //8 #HANGUL SYLLABLE KIYEOK A RIEULPHIEUPH + {0x8149, 0xAC0F}, //9 #HANGUL SYLLABLE KIYEOK A RIEULHIEUH + {0x814A, 0xAC18}, //10 #HANGUL SYLLABLE KIYEOK A KHIEUKH + {0x814B, 0xAC1E}, //11 #HANGUL SYLLABLE KIYEOK AE SSANGKIYEOK + {0x814C, 0xAC1F}, //12 #HANGUL SYLLABLE KIYEOK AE KIYEOKSIOS + {0x814D, 0xAC21}, //13 #HANGUL SYLLABLE KIYEOK AE NIEUNCIEUC + {0x814E, 0xAC22}, //14 #HANGUL SYLLABLE KIYEOK AE NIEUNHIEUH + {0x814F, 0xAC23}, //15 #HANGUL SYLLABLE KIYEOK AE TIKEUT + {0x8150, 0xAC25}, //16 #HANGUL SYLLABLE KIYEOK AE RIEULKIYEOK + {0x8151, 0xAC26}, //17 #HANGUL SYLLABLE KIYEOK AE RIEULMIEUM + {0x8152, 0xAC27}, //18 #HANGUL SYLLABLE KIYEOK AE RIEULPIEUP + {0x8153, 0xAC28}, //19 #HANGUL SYLLABLE KIYEOK AE RIEULSIOS + {0x8154, 0xAC29}, //20 #HANGUL SYLLABLE KIYEOK AE RIEULTHIEUTH + {0x8155, 0xAC2A}, //21 #HANGUL SYLLABLE KIYEOK AE RIEULPHIEUPH + {0x8156, 0xAC2B}, //22 #HANGUL SYLLABLE KIYEOK AE RIEULHIEUH + {0x8157, 0xAC2E}, //23 #HANGUL SYLLABLE KIYEOK AE PIEUPSIOS + {0x8158, 0xAC32}, //24 #HANGUL SYLLABLE KIYEOK AE CIEUC + {0x8159, 0xAC33}, //25 #HANGUL SYLLABLE KIYEOK AE CHIEUCH + {0x815A, 0xAC34}, //26 #HANGUL SYLLABLE KIYEOK AE KHIEUKH + {0x8161, 0xAC35}, //27 #HANGUL SYLLABLE KIYEOK AE THIEUTH + {0x8162, 0xAC36}, //28 #HANGUL SYLLABLE KIYEOK AE PHIEUPH + {0x8163, 0xAC37}, //29 #HANGUL SYLLABLE KIYEOK AE HIEUH + {0x8164, 0xAC3A}, //30 #HANGUL SYLLABLE KIYEOK YA SSANGKIYEOK + {0x8165, 0xAC3B}, //31 #HANGUL SYLLABLE KIYEOK YA KIYEOKSIOS + {0x8166, 0xAC3D}, //32 #HANGUL SYLLABLE KIYEOK YA NIEUNCIEUC + {0x8167, 0xAC3E}, //33 #HANGUL SYLLABLE KIYEOK YA NIEUNHIEUH + {0x8168, 0xAC3F}, //34 #HANGUL SYLLABLE KIYEOK YA TIKEUT + {0x8169, 0xAC41}, //35 #HANGUL SYLLABLE KIYEOK YA RIEULKIYEOK + {0x816A, 0xAC42}, //36 #HANGUL SYLLABLE KIYEOK YA RIEULMIEUM + {0x816B, 0xAC43}, //37 #HANGUL SYLLABLE KIYEOK YA RIEULPIEUP + {0x816C, 0xAC44}, //38 #HANGUL SYLLABLE KIYEOK YA RIEULSIOS + {0x816D, 0xAC45}, //39 #HANGUL SYLLABLE KIYEOK YA RIEULTHIEUTH + {0x816E, 0xAC46}, //40 #HANGUL SYLLABLE KIYEOK YA RIEULPHIEUPH + {0x816F, 0xAC47}, //41 #HANGUL SYLLABLE KIYEOK YA RIEULHIEUH + {0x8170, 0xAC48}, //42 #HANGUL SYLLABLE KIYEOK YA MIEUM + {0x8171, 0xAC49}, //43 #HANGUL SYLLABLE KIYEOK YA PIEUP + {0x8172, 0xAC4A}, //44 #HANGUL SYLLABLE KIYEOK YA PIEUPSIOS + {0x8173, 0xAC4C}, //45 #HANGUL SYLLABLE KIYEOK YA SSANGSIOS + {0x8174, 0xAC4E}, //46 #HANGUL SYLLABLE KIYEOK YA CIEUC + {0x8175, 0xAC4F}, //47 #HANGUL SYLLABLE KIYEOK YA CHIEUCH + {0x8176, 0xAC50}, //48 #HANGUL SYLLABLE KIYEOK YA KHIEUKH + {0x8177, 0xAC51}, //49 #HANGUL SYLLABLE KIYEOK YA THIEUTH + {0x8178, 0xAC52}, //50 #HANGUL SYLLABLE KIYEOK YA PHIEUPH + {0x8179, 0xAC53}, //51 #HANGUL SYLLABLE KIYEOK YA HIEUH + {0x817A, 0xAC55}, //52 #HANGUL SYLLABLE KIYEOK YAE KIYEOK + {0x8181, 0xAC56}, //53 #HANGUL SYLLABLE KIYEOK YAE SSANGKIYEOK + {0x8182, 0xAC57}, //54 #HANGUL SYLLABLE KIYEOK YAE KIYEOKSIOS + {0x8183, 0xAC59}, //55 #HANGUL SYLLABLE KIYEOK YAE NIEUNCIEUC + {0x8184, 0xAC5A}, //56 #HANGUL SYLLABLE KIYEOK YAE NIEUNHIEUH + {0x8185, 0xAC5B}, //57 #HANGUL SYLLABLE KIYEOK YAE TIKEUT + {0x8186, 0xAC5D}, //58 #HANGUL SYLLABLE KIYEOK YAE RIEULKIYEOK + {0x8187, 0xAC5E}, //59 #HANGUL SYLLABLE KIYEOK YAE RIEULMIEUM + {0x8188, 0xAC5F}, //60 #HANGUL SYLLABLE KIYEOK YAE RIEULPIEUP + {0x8189, 0xAC60}, //61 #HANGUL SYLLABLE KIYEOK YAE RIEULSIOS + {0x818A, 0xAC61}, //62 #HANGUL SYLLABLE KIYEOK YAE RIEULTHIEUTH + {0x818B, 0xAC62}, //63 #HANGUL SYLLABLE KIYEOK YAE RIEULPHIEUPH + {0x818C, 0xAC63}, //64 #HANGUL SYLLABLE KIYEOK YAE RIEULHIEUH + {0x818D, 0xAC64}, //65 #HANGUL SYLLABLE KIYEOK YAE MIEUM + {0x818E, 0xAC65}, //66 #HANGUL SYLLABLE KIYEOK YAE PIEUP + {0x818F, 0xAC66}, //67 #HANGUL SYLLABLE KIYEOK YAE PIEUPSIOS + {0x8190, 0xAC67}, //68 #HANGUL SYLLABLE KIYEOK YAE SIOS + {0x8191, 0xAC68}, //69 #HANGUL SYLLABLE KIYEOK YAE SSANGSIOS + {0x8192, 0xAC69}, //70 #HANGUL SYLLABLE KIYEOK YAE IEUNG + {0x8193, 0xAC6A}, //71 #HANGUL SYLLABLE KIYEOK YAE CIEUC + {0x8194, 0xAC6B}, //72 #HANGUL SYLLABLE KIYEOK YAE CHIEUCH + {0x8195, 0xAC6C}, //73 #HANGUL SYLLABLE KIYEOK YAE KHIEUKH + {0x8196, 0xAC6D}, //74 #HANGUL SYLLABLE KIYEOK YAE THIEUTH + {0x8197, 0xAC6E}, //75 #HANGUL SYLLABLE KIYEOK YAE PHIEUPH + {0x8198, 0xAC6F}, //76 #HANGUL SYLLABLE KIYEOK YAE HIEUH + {0x8199, 0xAC72}, //77 #HANGUL SYLLABLE KIYEOK EO SSANGKIYEOK + {0x819A, 0xAC73}, //78 #HANGUL SYLLABLE KIYEOK EO KIYEOKSIOS + {0x819B, 0xAC75}, //79 #HANGUL SYLLABLE KIYEOK EO NIEUNCIEUC + {0x819C, 0xAC76}, //80 #HANGUL SYLLABLE KIYEOK EO NIEUNHIEUH + {0x819D, 0xAC79}, //81 #HANGUL SYLLABLE KIYEOK EO RIEULKIYEOK + {0x819E, 0xAC7B}, //82 #HANGUL SYLLABLE KIYEOK EO RIEULPIEUP + {0x819F, 0xAC7C}, //83 #HANGUL SYLLABLE KIYEOK EO RIEULSIOS + {0x81A0, 0xAC7D}, //84 #HANGUL SYLLABLE KIYEOK EO RIEULTHIEUTH + {0x81A1, 0xAC7E}, //85 #HANGUL SYLLABLE KIYEOK EO RIEULPHIEUPH + {0x81A2, 0xAC7F}, //86 #HANGUL SYLLABLE KIYEOK EO RIEULHIEUH + {0x81A3, 0xAC82}, //87 #HANGUL SYLLABLE KIYEOK EO PIEUPSIOS + {0x81A4, 0xAC87}, //88 #HANGUL SYLLABLE KIYEOK EO CHIEUCH + {0x81A5, 0xAC88}, //89 #HANGUL SYLLABLE KIYEOK EO KHIEUKH + {0x81A6, 0xAC8D}, //90 #HANGUL SYLLABLE KIYEOK E KIYEOK + {0x81A7, 0xAC8E}, //91 #HANGUL SYLLABLE KIYEOK E SSANGKIYEOK + {0x81A8, 0xAC8F}, //92 #HANGUL SYLLABLE KIYEOK E KIYEOKSIOS + {0x81A9, 0xAC91}, //93 #HANGUL SYLLABLE KIYEOK E NIEUNCIEUC + {0x81AA, 0xAC92}, //94 #HANGUL SYLLABLE KIYEOK E NIEUNHIEUH + {0x81AB, 0xAC93}, //95 #HANGUL SYLLABLE KIYEOK E TIKEUT + {0x81AC, 0xAC95}, //96 #HANGUL SYLLABLE KIYEOK E RIEULKIYEOK + {0x81AD, 0xAC96}, //97 #HANGUL SYLLABLE KIYEOK E RIEULMIEUM + {0x81AE, 0xAC97}, //98 #HANGUL SYLLABLE KIYEOK E RIEULPIEUP + {0x81AF, 0xAC98}, //99 #HANGUL SYLLABLE KIYEOK E RIEULSIOS + {0x81B0, 0xAC99}, //100 #HANGUL SYLLABLE KIYEOK E RIEULTHIEUTH + {0x81B1, 0xAC9A}, //101 #HANGUL SYLLABLE KIYEOK E RIEULPHIEUPH + {0x81B2, 0xAC9B}, //102 #HANGUL SYLLABLE KIYEOK E RIEULHIEUH + {0x81B3, 0xAC9E}, //103 #HANGUL SYLLABLE KIYEOK E PIEUPSIOS + {0x81B4, 0xACA2}, //104 #HANGUL SYLLABLE KIYEOK E CIEUC + {0x81B5, 0xACA3}, //105 #HANGUL SYLLABLE KIYEOK E CHIEUCH + {0x81B6, 0xACA4}, //106 #HANGUL SYLLABLE KIYEOK E KHIEUKH + {0x81B7, 0xACA5}, //107 #HANGUL SYLLABLE KIYEOK E THIEUTH + {0x81B8, 0xACA6}, //108 #HANGUL SYLLABLE KIYEOK E PHIEUPH + {0x81B9, 0xACA7}, //109 #HANGUL SYLLABLE KIYEOK E HIEUH + {0x81BA, 0xACAB}, //110 #HANGUL SYLLABLE KIYEOK YEO KIYEOKSIOS + {0x81BB, 0xACAD}, //111 #HANGUL SYLLABLE KIYEOK YEO NIEUNCIEUC + {0x81BC, 0xACAE}, //112 #HANGUL SYLLABLE KIYEOK YEO NIEUNHIEUH + {0x81BD, 0xACB1}, //113 #HANGUL SYLLABLE KIYEOK YEO RIEULKIYEOK + {0x81BE, 0xACB2}, //114 #HANGUL SYLLABLE KIYEOK YEO RIEULMIEUM + {0x81BF, 0xACB3}, //115 #HANGUL SYLLABLE KIYEOK YEO RIEULPIEUP + {0x81C0, 0xACB4}, //116 #HANGUL SYLLABLE KIYEOK YEO RIEULSIOS + {0x81C1, 0xACB5}, //117 #HANGUL SYLLABLE KIYEOK YEO RIEULTHIEUTH + {0x81C2, 0xACB6}, //118 #HANGUL SYLLABLE KIYEOK YEO RIEULPHIEUPH + {0x81C3, 0xACB7}, //119 #HANGUL SYLLABLE KIYEOK YEO RIEULHIEUH + {0x81C4, 0xACBA}, //120 #HANGUL SYLLABLE KIYEOK YEO PIEUPSIOS + {0x81C5, 0xACBE}, //121 #HANGUL SYLLABLE KIYEOK YEO CIEUC + {0x81C6, 0xACBF}, //122 #HANGUL SYLLABLE KIYEOK YEO CHIEUCH + {0x81C7, 0xACC0}, //123 #HANGUL SYLLABLE KIYEOK YEO KHIEUKH + {0x81C8, 0xACC2}, //124 #HANGUL SYLLABLE KIYEOK YEO PHIEUPH + {0x81C9, 0xACC3}, //125 #HANGUL SYLLABLE KIYEOK YEO HIEUH + {0x81CA, 0xACC5}, //126 #HANGUL SYLLABLE KIYEOK YE KIYEOK + {0x81CB, 0xACC6}, //127 #HANGUL SYLLABLE KIYEOK YE SSANGKIYEOK + {0x81CC, 0xACC7}, //128 #HANGUL SYLLABLE KIYEOK YE KIYEOKSIOS + {0x81CD, 0xACC9}, //129 #HANGUL SYLLABLE KIYEOK YE NIEUNCIEUC + {0x81CE, 0xACCA}, //130 #HANGUL SYLLABLE KIYEOK YE NIEUNHIEUH + {0x81CF, 0xACCB}, //131 #HANGUL SYLLABLE KIYEOK YE TIKEUT + {0x81D0, 0xACCD}, //132 #HANGUL SYLLABLE KIYEOK YE RIEULKIYEOK + {0x81D1, 0xACCE}, //133 #HANGUL SYLLABLE KIYEOK YE RIEULMIEUM + {0x81D2, 0xACCF}, //134 #HANGUL SYLLABLE KIYEOK YE RIEULPIEUP + {0x81D3, 0xACD0}, //135 #HANGUL SYLLABLE KIYEOK YE RIEULSIOS + {0x81D4, 0xACD1}, //136 #HANGUL SYLLABLE KIYEOK YE RIEULTHIEUTH + {0x81D5, 0xACD2}, //137 #HANGUL SYLLABLE KIYEOK YE RIEULPHIEUPH + {0x81D6, 0xACD3}, //138 #HANGUL SYLLABLE KIYEOK YE RIEULHIEUH + {0x81D7, 0xACD4}, //139 #HANGUL SYLLABLE KIYEOK YE MIEUM + {0x81D8, 0xACD6}, //140 #HANGUL SYLLABLE KIYEOK YE PIEUPSIOS + {0x81D9, 0xACD8}, //141 #HANGUL SYLLABLE KIYEOK YE SSANGSIOS + {0x81DA, 0xACD9}, //142 #HANGUL SYLLABLE KIYEOK YE IEUNG + {0x81DB, 0xACDA}, //143 #HANGUL SYLLABLE KIYEOK YE CIEUC + {0x81DC, 0xACDB}, //144 #HANGUL SYLLABLE KIYEOK YE CHIEUCH + {0x81DD, 0xACDC}, //145 #HANGUL SYLLABLE KIYEOK YE KHIEUKH + {0x81DE, 0xACDD}, //146 #HANGUL SYLLABLE KIYEOK YE THIEUTH + {0x81DF, 0xACDE}, //147 #HANGUL SYLLABLE KIYEOK YE PHIEUPH + {0x81E0, 0xACDF}, //148 #HANGUL SYLLABLE KIYEOK YE HIEUH + {0x81E1, 0xACE2}, //149 #HANGUL SYLLABLE KIYEOK O SSANGKIYEOK + {0x81E2, 0xACE3}, //150 #HANGUL SYLLABLE KIYEOK O KIYEOKSIOS + {0x81E3, 0xACE5}, //151 #HANGUL SYLLABLE KIYEOK O NIEUNCIEUC + {0x81E4, 0xACE6}, //152 #HANGUL SYLLABLE KIYEOK O NIEUNHIEUH + {0x81E5, 0xACE9}, //153 #HANGUL SYLLABLE KIYEOK O RIEULKIYEOK + {0x81E6, 0xACEB}, //154 #HANGUL SYLLABLE KIYEOK O RIEULPIEUP + {0x81E7, 0xACED}, //155 #HANGUL SYLLABLE KIYEOK O RIEULTHIEUTH + {0x81E8, 0xACEE}, //156 #HANGUL SYLLABLE KIYEOK O RIEULPHIEUPH + {0x81E9, 0xACF2}, //157 #HANGUL SYLLABLE KIYEOK O PIEUPSIOS + {0x81EA, 0xACF4}, //158 #HANGUL SYLLABLE KIYEOK O SSANGSIOS + {0x81EB, 0xACF7}, //159 #HANGUL SYLLABLE KIYEOK O CHIEUCH + {0x81EC, 0xACF8}, //160 #HANGUL SYLLABLE KIYEOK O KHIEUKH + {0x81ED, 0xACF9}, //161 #HANGUL SYLLABLE KIYEOK O THIEUTH + {0x81EE, 0xACFA}, //162 #HANGUL SYLLABLE KIYEOK O PHIEUPH + {0x81EF, 0xACFB}, //163 #HANGUL SYLLABLE KIYEOK O HIEUH + {0x81F0, 0xACFE}, //164 #HANGUL SYLLABLE KIYEOK WA SSANGKIYEOK + {0x81F1, 0xACFF}, //165 #HANGUL SYLLABLE KIYEOK WA KIYEOKSIOS + {0x81F2, 0xAD01}, //166 #HANGUL SYLLABLE KIYEOK WA NIEUNCIEUC + {0x81F3, 0xAD02}, //167 #HANGUL SYLLABLE KIYEOK WA NIEUNHIEUH + {0x81F4, 0xAD03}, //168 #HANGUL SYLLABLE KIYEOK WA TIKEUT + {0x81F5, 0xAD05}, //169 #HANGUL SYLLABLE KIYEOK WA RIEULKIYEOK + {0x81F6, 0xAD07}, //170 #HANGUL SYLLABLE KIYEOK WA RIEULPIEUP + {0x81F7, 0xAD08}, //171 #HANGUL SYLLABLE KIYEOK WA RIEULSIOS + {0x81F8, 0xAD09}, //172 #HANGUL SYLLABLE KIYEOK WA RIEULTHIEUTH + {0x81F9, 0xAD0A}, //173 #HANGUL SYLLABLE KIYEOK WA RIEULPHIEUPH + {0x81FA, 0xAD0B}, //174 #HANGUL SYLLABLE KIYEOK WA RIEULHIEUH + {0x81FB, 0xAD0E}, //175 #HANGUL SYLLABLE KIYEOK WA PIEUPSIOS + {0x81FC, 0xAD10}, //176 #HANGUL SYLLABLE KIYEOK WA SSANGSIOS + {0x81FD, 0xAD12}, //177 #HANGUL SYLLABLE KIYEOK WA CIEUC + {0x81FE, 0xAD13}, //178 #HANGUL SYLLABLE KIYEOK WA CHIEUCH + {0x8241, 0xAD14}, //179 #HANGUL SYLLABLE KIYEOK WA KHIEUKH + {0x8242, 0xAD15}, //180 #HANGUL SYLLABLE KIYEOK WA THIEUTH + {0x8243, 0xAD16}, //181 #HANGUL SYLLABLE KIYEOK WA PHIEUPH + {0x8244, 0xAD17}, //182 #HANGUL SYLLABLE KIYEOK WA HIEUH + {0x8245, 0xAD19}, //183 #HANGUL SYLLABLE KIYEOK WAE KIYEOK + {0x8246, 0xAD1A}, //184 #HANGUL SYLLABLE KIYEOK WAE SSANGKIYEOK + {0x8247, 0xAD1B}, //185 #HANGUL SYLLABLE KIYEOK WAE KIYEOKSIOS + {0x8248, 0xAD1D}, //186 #HANGUL SYLLABLE KIYEOK WAE NIEUNCIEUC + {0x8249, 0xAD1E}, //187 #HANGUL SYLLABLE KIYEOK WAE NIEUNHIEUH + {0x824A, 0xAD1F}, //188 #HANGUL SYLLABLE KIYEOK WAE TIKEUT + {0x824B, 0xAD21}, //189 #HANGUL SYLLABLE KIYEOK WAE RIEULKIYEOK + {0x824C, 0xAD22}, //190 #HANGUL SYLLABLE KIYEOK WAE RIEULMIEUM + {0x824D, 0xAD23}, //191 #HANGUL SYLLABLE KIYEOK WAE RIEULPIEUP + {0x824E, 0xAD24}, //192 #HANGUL SYLLABLE KIYEOK WAE RIEULSIOS + {0x824F, 0xAD25}, //193 #HANGUL SYLLABLE KIYEOK WAE RIEULTHIEUTH + {0x8250, 0xAD26}, //194 #HANGUL SYLLABLE KIYEOK WAE RIEULPHIEUPH + {0x8251, 0xAD27}, //195 #HANGUL SYLLABLE KIYEOK WAE RIEULHIEUH + {0x8252, 0xAD28}, //196 #HANGUL SYLLABLE KIYEOK WAE MIEUM + {0x8253, 0xAD2A}, //197 #HANGUL SYLLABLE KIYEOK WAE PIEUPSIOS + {0x8254, 0xAD2B}, //198 #HANGUL SYLLABLE KIYEOK WAE SIOS + {0x8255, 0xAD2E}, //199 #HANGUL SYLLABLE KIYEOK WAE CIEUC + {0x8256, 0xAD2F}, //200 #HANGUL SYLLABLE KIYEOK WAE CHIEUCH + {0x8257, 0xAD30}, //201 #HANGUL SYLLABLE KIYEOK WAE KHIEUKH + {0x8258, 0xAD31}, //202 #HANGUL SYLLABLE KIYEOK WAE THIEUTH + {0x8259, 0xAD32}, //203 #HANGUL SYLLABLE KIYEOK WAE PHIEUPH + {0x825A, 0xAD33}, //204 #HANGUL SYLLABLE KIYEOK WAE HIEUH + {0x8261, 0xAD36}, //205 #HANGUL SYLLABLE KIYEOK OE SSANGKIYEOK + {0x8262, 0xAD37}, //206 #HANGUL SYLLABLE KIYEOK OE KIYEOKSIOS + {0x8263, 0xAD39}, //207 #HANGUL SYLLABLE KIYEOK OE NIEUNCIEUC + {0x8264, 0xAD3A}, //208 #HANGUL SYLLABLE KIYEOK OE NIEUNHIEUH + {0x8265, 0xAD3B}, //209 #HANGUL SYLLABLE KIYEOK OE TIKEUT + {0x8266, 0xAD3D}, //210 #HANGUL SYLLABLE KIYEOK OE RIEULKIYEOK + {0x8267, 0xAD3E}, //211 #HANGUL SYLLABLE KIYEOK OE RIEULMIEUM + {0x8268, 0xAD3F}, //212 #HANGUL SYLLABLE KIYEOK OE RIEULPIEUP + {0x8269, 0xAD40}, //213 #HANGUL SYLLABLE KIYEOK OE RIEULSIOS + {0x826A, 0xAD41}, //214 #HANGUL SYLLABLE KIYEOK OE RIEULTHIEUTH + {0x826B, 0xAD42}, //215 #HANGUL SYLLABLE KIYEOK OE RIEULPHIEUPH + {0x826C, 0xAD43}, //216 #HANGUL SYLLABLE KIYEOK OE RIEULHIEUH + {0x826D, 0xAD46}, //217 #HANGUL SYLLABLE KIYEOK OE PIEUPSIOS + {0x826E, 0xAD48}, //218 #HANGUL SYLLABLE KIYEOK OE SSANGSIOS + {0x826F, 0xAD4A}, //219 #HANGUL SYLLABLE KIYEOK OE CIEUC + {0x8270, 0xAD4B}, //220 #HANGUL SYLLABLE KIYEOK OE CHIEUCH + {0x8271, 0xAD4C}, //221 #HANGUL SYLLABLE KIYEOK OE KHIEUKH + {0x8272, 0xAD4D}, //222 #HANGUL SYLLABLE KIYEOK OE THIEUTH + {0x8273, 0xAD4E}, //223 #HANGUL SYLLABLE KIYEOK OE PHIEUPH + {0x8274, 0xAD4F}, //224 #HANGUL SYLLABLE KIYEOK OE HIEUH + {0x8275, 0xAD51}, //225 #HANGUL SYLLABLE KIYEOK YO KIYEOK + {0x8276, 0xAD52}, //226 #HANGUL SYLLABLE KIYEOK YO SSANGKIYEOK + {0x8277, 0xAD53}, //227 #HANGUL SYLLABLE KIYEOK YO KIYEOKSIOS + {0x8278, 0xAD55}, //228 #HANGUL SYLLABLE KIYEOK YO NIEUNCIEUC + {0x8279, 0xAD56}, //229 #HANGUL SYLLABLE KIYEOK YO NIEUNHIEUH + {0x827A, 0xAD57}, //230 #HANGUL SYLLABLE KIYEOK YO TIKEUT + {0x8281, 0xAD59}, //231 #HANGUL SYLLABLE KIYEOK YO RIEULKIYEOK + {0x8282, 0xAD5A}, //232 #HANGUL SYLLABLE KIYEOK YO RIEULMIEUM + {0x8283, 0xAD5B}, //233 #HANGUL SYLLABLE KIYEOK YO RIEULPIEUP + {0x8284, 0xAD5C}, //234 #HANGUL SYLLABLE KIYEOK YO RIEULSIOS + {0x8285, 0xAD5D}, //235 #HANGUL SYLLABLE KIYEOK YO RIEULTHIEUTH + {0x8286, 0xAD5E}, //236 #HANGUL SYLLABLE KIYEOK YO RIEULPHIEUPH + {0x8287, 0xAD5F}, //237 #HANGUL SYLLABLE KIYEOK YO RIEULHIEUH + {0x8288, 0xAD60}, //238 #HANGUL SYLLABLE KIYEOK YO MIEUM + {0x8289, 0xAD62}, //239 #HANGUL SYLLABLE KIYEOK YO PIEUPSIOS + {0x828A, 0xAD64}, //240 #HANGUL SYLLABLE KIYEOK YO SSANGSIOS + {0x828B, 0xAD65}, //241 #HANGUL SYLLABLE KIYEOK YO IEUNG + {0x828C, 0xAD66}, //242 #HANGUL SYLLABLE KIYEOK YO CIEUC + {0x828D, 0xAD67}, //243 #HANGUL SYLLABLE KIYEOK YO CHIEUCH + {0x828E, 0xAD68}, //244 #HANGUL SYLLABLE KIYEOK YO KHIEUKH + {0x828F, 0xAD69}, //245 #HANGUL SYLLABLE KIYEOK YO THIEUTH + {0x8290, 0xAD6A}, //246 #HANGUL SYLLABLE KIYEOK YO PHIEUPH + {0x8291, 0xAD6B}, //247 #HANGUL SYLLABLE KIYEOK YO HIEUH + {0x8292, 0xAD6E}, //248 #HANGUL SYLLABLE KIYEOK U SSANGKIYEOK + {0x8293, 0xAD6F}, //249 #HANGUL SYLLABLE KIYEOK U KIYEOKSIOS + {0x8294, 0xAD71}, //250 #HANGUL SYLLABLE KIYEOK U NIEUNCIEUC + {0x8295, 0xAD72}, //251 #HANGUL SYLLABLE KIYEOK U NIEUNHIEUH + {0x8296, 0xAD77}, //252 #HANGUL SYLLABLE KIYEOK U RIEULPIEUP + {0x8297, 0xAD78}, //253 #HANGUL SYLLABLE KIYEOK U RIEULSIOS + {0x8298, 0xAD79}, //254 #HANGUL SYLLABLE KIYEOK U RIEULTHIEUTH + {0x8299, 0xAD7A}, //255 #HANGUL SYLLABLE KIYEOK U RIEULPHIEUPH + {0x829A, 0xAD7E}, //256 #HANGUL SYLLABLE KIYEOK U PIEUPSIOS + {0x829B, 0xAD80}, //257 #HANGUL SYLLABLE KIYEOK U SSANGSIOS + {0x829C, 0xAD83}, //258 #HANGUL SYLLABLE KIYEOK U CHIEUCH + {0x829D, 0xAD84}, //259 #HANGUL SYLLABLE KIYEOK U KHIEUKH + {0x829E, 0xAD85}, //260 #HANGUL SYLLABLE KIYEOK U THIEUTH + {0x829F, 0xAD86}, //261 #HANGUL SYLLABLE KIYEOK U PHIEUPH + {0x82A0, 0xAD87}, //262 #HANGUL SYLLABLE KIYEOK U HIEUH + {0x82A1, 0xAD8A}, //263 #HANGUL SYLLABLE KIYEOK WEO SSANGKIYEOK + {0x82A2, 0xAD8B}, //264 #HANGUL SYLLABLE KIYEOK WEO KIYEOKSIOS + {0x82A3, 0xAD8D}, //265 #HANGUL SYLLABLE KIYEOK WEO NIEUNCIEUC + {0x82A4, 0xAD8E}, //266 #HANGUL SYLLABLE KIYEOK WEO NIEUNHIEUH + {0x82A5, 0xAD8F}, //267 #HANGUL SYLLABLE KIYEOK WEO TIKEUT + {0x82A6, 0xAD91}, //268 #HANGUL SYLLABLE KIYEOK WEO RIEULKIYEOK + {0x82A7, 0xAD92}, //269 #HANGUL SYLLABLE KIYEOK WEO RIEULMIEUM + {0x82A8, 0xAD93}, //270 #HANGUL SYLLABLE KIYEOK WEO RIEULPIEUP + {0x82A9, 0xAD94}, //271 #HANGUL SYLLABLE KIYEOK WEO RIEULSIOS + {0x82AA, 0xAD95}, //272 #HANGUL SYLLABLE KIYEOK WEO RIEULTHIEUTH + {0x82AB, 0xAD96}, //273 #HANGUL SYLLABLE KIYEOK WEO RIEULPHIEUPH + {0x82AC, 0xAD97}, //274 #HANGUL SYLLABLE KIYEOK WEO RIEULHIEUH + {0x82AD, 0xAD98}, //275 #HANGUL SYLLABLE KIYEOK WEO MIEUM + {0x82AE, 0xAD99}, //276 #HANGUL SYLLABLE KIYEOK WEO PIEUP + {0x82AF, 0xAD9A}, //277 #HANGUL SYLLABLE KIYEOK WEO PIEUPSIOS + {0x82B0, 0xAD9B}, //278 #HANGUL SYLLABLE KIYEOK WEO SIOS + {0x82B1, 0xAD9E}, //279 #HANGUL SYLLABLE KIYEOK WEO CIEUC + {0x82B2, 0xAD9F}, //280 #HANGUL SYLLABLE KIYEOK WEO CHIEUCH + {0x82B3, 0xADA0}, //281 #HANGUL SYLLABLE KIYEOK WEO KHIEUKH + {0x82B4, 0xADA1}, //282 #HANGUL SYLLABLE KIYEOK WEO THIEUTH + {0x82B5, 0xADA2}, //283 #HANGUL SYLLABLE KIYEOK WEO PHIEUPH + {0x82B6, 0xADA3}, //284 #HANGUL SYLLABLE KIYEOK WEO HIEUH + {0x82B7, 0xADA5}, //285 #HANGUL SYLLABLE KIYEOK WE KIYEOK + {0x82B8, 0xADA6}, //286 #HANGUL SYLLABLE KIYEOK WE SSANGKIYEOK + {0x82B9, 0xADA7}, //287 #HANGUL SYLLABLE KIYEOK WE KIYEOKSIOS + {0x82BA, 0xADA8}, //288 #HANGUL SYLLABLE KIYEOK WE NIEUN + {0x82BB, 0xADA9}, //289 #HANGUL SYLLABLE KIYEOK WE NIEUNCIEUC + {0x82BC, 0xADAA}, //290 #HANGUL SYLLABLE KIYEOK WE NIEUNHIEUH + {0x82BD, 0xADAB}, //291 #HANGUL SYLLABLE KIYEOK WE TIKEUT + {0x82BE, 0xADAC}, //292 #HANGUL SYLLABLE KIYEOK WE RIEUL + {0x82BF, 0xADAD}, //293 #HANGUL SYLLABLE KIYEOK WE RIEULKIYEOK + {0x82C0, 0xADAE}, //294 #HANGUL SYLLABLE KIYEOK WE RIEULMIEUM + {0x82C1, 0xADAF}, //295 #HANGUL SYLLABLE KIYEOK WE RIEULPIEUP + {0x82C2, 0xADB0}, //296 #HANGUL SYLLABLE KIYEOK WE RIEULSIOS + {0x82C3, 0xADB1}, //297 #HANGUL SYLLABLE KIYEOK WE RIEULTHIEUTH + {0x82C4, 0xADB2}, //298 #HANGUL SYLLABLE KIYEOK WE RIEULPHIEUPH + {0x82C5, 0xADB3}, //299 #HANGUL SYLLABLE KIYEOK WE RIEULHIEUH + {0x82C6, 0xADB4}, //300 #HANGUL SYLLABLE KIYEOK WE MIEUM + {0x82C7, 0xADB5}, //301 #HANGUL SYLLABLE KIYEOK WE PIEUP + {0x82C8, 0xADB6}, //302 #HANGUL SYLLABLE KIYEOK WE PIEUPSIOS + {0x82C9, 0xADB8}, //303 #HANGUL SYLLABLE KIYEOK WE SSANGSIOS + {0x82CA, 0xADB9}, //304 #HANGUL SYLLABLE KIYEOK WE IEUNG + {0x82CB, 0xADBA}, //305 #HANGUL SYLLABLE KIYEOK WE CIEUC + {0x82CC, 0xADBB}, //306 #HANGUL SYLLABLE KIYEOK WE CHIEUCH + {0x82CD, 0xADBC}, //307 #HANGUL SYLLABLE KIYEOK WE KHIEUKH + {0x82CE, 0xADBD}, //308 #HANGUL SYLLABLE KIYEOK WE THIEUTH + {0x82CF, 0xADBE}, //309 #HANGUL SYLLABLE KIYEOK WE PHIEUPH + {0x82D0, 0xADBF}, //310 #HANGUL SYLLABLE KIYEOK WE HIEUH + {0x82D1, 0xADC2}, //311 #HANGUL SYLLABLE KIYEOK WI SSANGKIYEOK + {0x82D2, 0xADC3}, //312 #HANGUL SYLLABLE KIYEOK WI KIYEOKSIOS + {0x82D3, 0xADC5}, //313 #HANGUL SYLLABLE KIYEOK WI NIEUNCIEUC + {0x82D4, 0xADC6}, //314 #HANGUL SYLLABLE KIYEOK WI NIEUNHIEUH + {0x82D5, 0xADC7}, //315 #HANGUL SYLLABLE KIYEOK WI TIKEUT + {0x82D6, 0xADC9}, //316 #HANGUL SYLLABLE KIYEOK WI RIEULKIYEOK + {0x82D7, 0xADCA}, //317 #HANGUL SYLLABLE KIYEOK WI RIEULMIEUM + {0x82D8, 0xADCB}, //318 #HANGUL SYLLABLE KIYEOK WI RIEULPIEUP + {0x82D9, 0xADCC}, //319 #HANGUL SYLLABLE KIYEOK WI RIEULSIOS + {0x82DA, 0xADCD}, //320 #HANGUL SYLLABLE KIYEOK WI RIEULTHIEUTH + {0x82DB, 0xADCE}, //321 #HANGUL SYLLABLE KIYEOK WI RIEULPHIEUPH + {0x82DC, 0xADCF}, //322 #HANGUL SYLLABLE KIYEOK WI RIEULHIEUH + {0x82DD, 0xADD2}, //323 #HANGUL SYLLABLE KIYEOK WI PIEUPSIOS + {0x82DE, 0xADD4}, //324 #HANGUL SYLLABLE KIYEOK WI SSANGSIOS + {0x82DF, 0xADD5}, //325 #HANGUL SYLLABLE KIYEOK WI IEUNG + {0x82E0, 0xADD6}, //326 #HANGUL SYLLABLE KIYEOK WI CIEUC + {0x82E1, 0xADD7}, //327 #HANGUL SYLLABLE KIYEOK WI CHIEUCH + {0x82E2, 0xADD8}, //328 #HANGUL SYLLABLE KIYEOK WI KHIEUKH + {0x82E3, 0xADD9}, //329 #HANGUL SYLLABLE KIYEOK WI THIEUTH + {0x82E4, 0xADDA}, //330 #HANGUL SYLLABLE KIYEOK WI PHIEUPH + {0x82E5, 0xADDB}, //331 #HANGUL SYLLABLE KIYEOK WI HIEUH + {0x82E6, 0xADDD}, //332 #HANGUL SYLLABLE KIYEOK YU KIYEOK + {0x82E7, 0xADDE}, //333 #HANGUL SYLLABLE KIYEOK YU SSANGKIYEOK + {0x82E8, 0xADDF}, //334 #HANGUL SYLLABLE KIYEOK YU KIYEOKSIOS + {0x82E9, 0xADE1}, //335 #HANGUL SYLLABLE KIYEOK YU NIEUNCIEUC + {0x82EA, 0xADE2}, //336 #HANGUL SYLLABLE KIYEOK YU NIEUNHIEUH + {0x82EB, 0xADE3}, //337 #HANGUL SYLLABLE KIYEOK YU TIKEUT + {0x82EC, 0xADE5}, //338 #HANGUL SYLLABLE KIYEOK YU RIEULKIYEOK + {0x82ED, 0xADE6}, //339 #HANGUL SYLLABLE KIYEOK YU RIEULMIEUM + {0x82EE, 0xADE7}, //340 #HANGUL SYLLABLE KIYEOK YU RIEULPIEUP + {0x82EF, 0xADE8}, //341 #HANGUL SYLLABLE KIYEOK YU RIEULSIOS + {0x82F0, 0xADE9}, //342 #HANGUL SYLLABLE KIYEOK YU RIEULTHIEUTH + {0x82F1, 0xADEA}, //343 #HANGUL SYLLABLE KIYEOK YU RIEULPHIEUPH + {0x82F2, 0xADEB}, //344 #HANGUL SYLLABLE KIYEOK YU RIEULHIEUH + {0x82F3, 0xADEC}, //345 #HANGUL SYLLABLE KIYEOK YU MIEUM + {0x82F4, 0xADED}, //346 #HANGUL SYLLABLE KIYEOK YU PIEUP + {0x82F5, 0xADEE}, //347 #HANGUL SYLLABLE KIYEOK YU PIEUPSIOS + {0x82F6, 0xADEF}, //348 #HANGUL SYLLABLE KIYEOK YU SIOS + {0x82F7, 0xADF0}, //349 #HANGUL SYLLABLE KIYEOK YU SSANGSIOS + {0x82F8, 0xADF1}, //350 #HANGUL SYLLABLE KIYEOK YU IEUNG + {0x82F9, 0xADF2}, //351 #HANGUL SYLLABLE KIYEOK YU CIEUC + {0x82FA, 0xADF3}, //352 #HANGUL SYLLABLE KIYEOK YU CHIEUCH + {0x82FB, 0xADF4}, //353 #HANGUL SYLLABLE KIYEOK YU KHIEUKH + {0x82FC, 0xADF5}, //354 #HANGUL SYLLABLE KIYEOK YU THIEUTH + {0x82FD, 0xADF6}, //355 #HANGUL SYLLABLE KIYEOK YU PHIEUPH + {0x82FE, 0xADF7}, //356 #HANGUL SYLLABLE KIYEOK YU HIEUH + {0x8341, 0xADFA}, //357 #HANGUL SYLLABLE KIYEOK EU SSANGKIYEOK + {0x8342, 0xADFB}, //358 #HANGUL SYLLABLE KIYEOK EU KIYEOKSIOS + {0x8343, 0xADFD}, //359 #HANGUL SYLLABLE KIYEOK EU NIEUNCIEUC + {0x8344, 0xADFE}, //360 #HANGUL SYLLABLE KIYEOK EU NIEUNHIEUH + {0x8345, 0xAE02}, //361 #HANGUL SYLLABLE KIYEOK EU RIEULMIEUM + {0x8346, 0xAE03}, //362 #HANGUL SYLLABLE KIYEOK EU RIEULPIEUP + {0x8347, 0xAE04}, //363 #HANGUL SYLLABLE KIYEOK EU RIEULSIOS + {0x8348, 0xAE05}, //364 #HANGUL SYLLABLE KIYEOK EU RIEULTHIEUTH + {0x8349, 0xAE06}, //365 #HANGUL SYLLABLE KIYEOK EU RIEULPHIEUPH + {0x834A, 0xAE07}, //366 #HANGUL SYLLABLE KIYEOK EU RIEULHIEUH + {0x834B, 0xAE0A}, //367 #HANGUL SYLLABLE KIYEOK EU PIEUPSIOS + {0x834C, 0xAE0C}, //368 #HANGUL SYLLABLE KIYEOK EU SSANGSIOS + {0x834D, 0xAE0E}, //369 #HANGUL SYLLABLE KIYEOK EU CIEUC + {0x834E, 0xAE0F}, //370 #HANGUL SYLLABLE KIYEOK EU CHIEUCH + {0x834F, 0xAE10}, //371 #HANGUL SYLLABLE KIYEOK EU KHIEUKH + {0x8350, 0xAE11}, //372 #HANGUL SYLLABLE KIYEOK EU THIEUTH + {0x8351, 0xAE12}, //373 #HANGUL SYLLABLE KIYEOK EU PHIEUPH + {0x8352, 0xAE13}, //374 #HANGUL SYLLABLE KIYEOK EU HIEUH + {0x8353, 0xAE15}, //375 #HANGUL SYLLABLE KIYEOK YI KIYEOK + {0x8354, 0xAE16}, //376 #HANGUL SYLLABLE KIYEOK YI SSANGKIYEOK + {0x8355, 0xAE17}, //377 #HANGUL SYLLABLE KIYEOK YI KIYEOKSIOS + {0x8356, 0xAE18}, //378 #HANGUL SYLLABLE KIYEOK YI NIEUN + {0x8357, 0xAE19}, //379 #HANGUL SYLLABLE KIYEOK YI NIEUNCIEUC + {0x8358, 0xAE1A}, //380 #HANGUL SYLLABLE KIYEOK YI NIEUNHIEUH + {0x8359, 0xAE1B}, //381 #HANGUL SYLLABLE KIYEOK YI TIKEUT + {0x835A, 0xAE1C}, //382 #HANGUL SYLLABLE KIYEOK YI RIEUL + {0x8361, 0xAE1D}, //383 #HANGUL SYLLABLE KIYEOK YI RIEULKIYEOK + {0x8362, 0xAE1E}, //384 #HANGUL SYLLABLE KIYEOK YI RIEULMIEUM + {0x8363, 0xAE1F}, //385 #HANGUL SYLLABLE KIYEOK YI RIEULPIEUP + {0x8364, 0xAE20}, //386 #HANGUL SYLLABLE KIYEOK YI RIEULSIOS + {0x8365, 0xAE21}, //387 #HANGUL SYLLABLE KIYEOK YI RIEULTHIEUTH + {0x8366, 0xAE22}, //388 #HANGUL SYLLABLE KIYEOK YI RIEULPHIEUPH + {0x8367, 0xAE23}, //389 #HANGUL SYLLABLE KIYEOK YI RIEULHIEUH + {0x8368, 0xAE24}, //390 #HANGUL SYLLABLE KIYEOK YI MIEUM + {0x8369, 0xAE25}, //391 #HANGUL SYLLABLE KIYEOK YI PIEUP + {0x836A, 0xAE26}, //392 #HANGUL SYLLABLE KIYEOK YI PIEUPSIOS + {0x836B, 0xAE27}, //393 #HANGUL SYLLABLE KIYEOK YI SIOS + {0x836C, 0xAE28}, //394 #HANGUL SYLLABLE KIYEOK YI SSANGSIOS + {0x836D, 0xAE29}, //395 #HANGUL SYLLABLE KIYEOK YI IEUNG + {0x836E, 0xAE2A}, //396 #HANGUL SYLLABLE KIYEOK YI CIEUC + {0x836F, 0xAE2B}, //397 #HANGUL SYLLABLE KIYEOK YI CHIEUCH + {0x8370, 0xAE2C}, //398 #HANGUL SYLLABLE KIYEOK YI KHIEUKH + {0x8371, 0xAE2D}, //399 #HANGUL SYLLABLE KIYEOK YI THIEUTH + {0x8372, 0xAE2E}, //400 #HANGUL SYLLABLE KIYEOK YI PHIEUPH + {0x8373, 0xAE2F}, //401 #HANGUL SYLLABLE KIYEOK YI HIEUH + {0x8374, 0xAE32}, //402 #HANGUL SYLLABLE KIYEOK I SSANGKIYEOK + {0x8375, 0xAE33}, //403 #HANGUL SYLLABLE KIYEOK I KIYEOKSIOS + {0x8376, 0xAE35}, //404 #HANGUL SYLLABLE KIYEOK I NIEUNCIEUC + {0x8377, 0xAE36}, //405 #HANGUL SYLLABLE KIYEOK I NIEUNHIEUH + {0x8378, 0xAE39}, //406 #HANGUL SYLLABLE KIYEOK I RIEULKIYEOK + {0x8379, 0xAE3B}, //407 #HANGUL SYLLABLE KIYEOK I RIEULPIEUP + {0x837A, 0xAE3C}, //408 #HANGUL SYLLABLE KIYEOK I RIEULSIOS + {0x8381, 0xAE3D}, //409 #HANGUL SYLLABLE KIYEOK I RIEULTHIEUTH + {0x8382, 0xAE3E}, //410 #HANGUL SYLLABLE KIYEOK I RIEULPHIEUPH + {0x8383, 0xAE3F}, //411 #HANGUL SYLLABLE KIYEOK I RIEULHIEUH + {0x8384, 0xAE42}, //412 #HANGUL SYLLABLE KIYEOK I PIEUPSIOS + {0x8385, 0xAE44}, //413 #HANGUL SYLLABLE KIYEOK I SSANGSIOS + {0x8386, 0xAE47}, //414 #HANGUL SYLLABLE KIYEOK I CHIEUCH + {0x8387, 0xAE48}, //415 #HANGUL SYLLABLE KIYEOK I KHIEUKH + {0x8388, 0xAE49}, //416 #HANGUL SYLLABLE KIYEOK I THIEUTH + {0x8389, 0xAE4B}, //417 #HANGUL SYLLABLE KIYEOK I HIEUH + {0x838A, 0xAE4F}, //418 #HANGUL SYLLABLE SSANGKIYEOK A KIYEOKSIOS + {0x838B, 0xAE51}, //419 #HANGUL SYLLABLE SSANGKIYEOK A NIEUNCIEUC + {0x838C, 0xAE52}, //420 #HANGUL SYLLABLE SSANGKIYEOK A NIEUNHIEUH + {0x838D, 0xAE53}, //421 #HANGUL SYLLABLE SSANGKIYEOK A TIKEUT + {0x838E, 0xAE55}, //422 #HANGUL SYLLABLE SSANGKIYEOK A RIEULKIYEOK + {0x838F, 0xAE57}, //423 #HANGUL SYLLABLE SSANGKIYEOK A RIEULPIEUP + {0x8390, 0xAE58}, //424 #HANGUL SYLLABLE SSANGKIYEOK A RIEULSIOS + {0x8391, 0xAE59}, //425 #HANGUL SYLLABLE SSANGKIYEOK A RIEULTHIEUTH + {0x8392, 0xAE5A}, //426 #HANGUL SYLLABLE SSANGKIYEOK A RIEULPHIEUPH + {0x8393, 0xAE5B}, //427 #HANGUL SYLLABLE SSANGKIYEOK A RIEULHIEUH + {0x8394, 0xAE5E}, //428 #HANGUL SYLLABLE SSANGKIYEOK A PIEUPSIOS + {0x8395, 0xAE62}, //429 #HANGUL SYLLABLE SSANGKIYEOK A CIEUC + {0x8396, 0xAE63}, //430 #HANGUL SYLLABLE SSANGKIYEOK A CHIEUCH + {0x8397, 0xAE64}, //431 #HANGUL SYLLABLE SSANGKIYEOK A KHIEUKH + {0x8398, 0xAE66}, //432 #HANGUL SYLLABLE SSANGKIYEOK A PHIEUPH + {0x8399, 0xAE67}, //433 #HANGUL SYLLABLE SSANGKIYEOK A HIEUH + {0x839A, 0xAE6A}, //434 #HANGUL SYLLABLE SSANGKIYEOK AE SSANGKIYEOK + {0x839B, 0xAE6B}, //435 #HANGUL SYLLABLE SSANGKIYEOK AE KIYEOKSIOS + {0x839C, 0xAE6D}, //436 #HANGUL SYLLABLE SSANGKIYEOK AE NIEUNCIEUC + {0x839D, 0xAE6E}, //437 #HANGUL SYLLABLE SSANGKIYEOK AE NIEUNHIEUH + {0x839E, 0xAE6F}, //438 #HANGUL SYLLABLE SSANGKIYEOK AE TIKEUT + {0x839F, 0xAE71}, //439 #HANGUL SYLLABLE SSANGKIYEOK AE RIEULKIYEOK + {0x83A0, 0xAE72}, //440 #HANGUL SYLLABLE SSANGKIYEOK AE RIEULMIEUM + {0x83A1, 0xAE73}, //441 #HANGUL SYLLABLE SSANGKIYEOK AE RIEULPIEUP + {0x83A2, 0xAE74}, //442 #HANGUL SYLLABLE SSANGKIYEOK AE RIEULSIOS + {0x83A3, 0xAE75}, //443 #HANGUL SYLLABLE SSANGKIYEOK AE RIEULTHIEUTH + {0x83A4, 0xAE76}, //444 #HANGUL SYLLABLE SSANGKIYEOK AE RIEULPHIEUPH + {0x83A5, 0xAE77}, //445 #HANGUL SYLLABLE SSANGKIYEOK AE RIEULHIEUH + {0x83A6, 0xAE7A}, //446 #HANGUL SYLLABLE SSANGKIYEOK AE PIEUPSIOS + {0x83A7, 0xAE7E}, //447 #HANGUL SYLLABLE SSANGKIYEOK AE CIEUC + {0x83A8, 0xAE7F}, //448 #HANGUL SYLLABLE SSANGKIYEOK AE CHIEUCH + {0x83A9, 0xAE80}, //449 #HANGUL SYLLABLE SSANGKIYEOK AE KHIEUKH + {0x83AA, 0xAE81}, //450 #HANGUL SYLLABLE SSANGKIYEOK AE THIEUTH + {0x83AB, 0xAE82}, //451 #HANGUL SYLLABLE SSANGKIYEOK AE PHIEUPH + {0x83AC, 0xAE83}, //452 #HANGUL SYLLABLE SSANGKIYEOK AE HIEUH + {0x83AD, 0xAE86}, //453 #HANGUL SYLLABLE SSANGKIYEOK YA SSANGKIYEOK + {0x83AE, 0xAE87}, //454 #HANGUL SYLLABLE SSANGKIYEOK YA KIYEOKSIOS + {0x83AF, 0xAE88}, //455 #HANGUL SYLLABLE SSANGKIYEOK YA NIEUN + {0x83B0, 0xAE89}, //456 #HANGUL SYLLABLE SSANGKIYEOK YA NIEUNCIEUC + {0x83B1, 0xAE8A}, //457 #HANGUL SYLLABLE SSANGKIYEOK YA NIEUNHIEUH + {0x83B2, 0xAE8B}, //458 #HANGUL SYLLABLE SSANGKIYEOK YA TIKEUT + {0x83B3, 0xAE8D}, //459 #HANGUL SYLLABLE SSANGKIYEOK YA RIEULKIYEOK + {0x83B4, 0xAE8E}, //460 #HANGUL SYLLABLE SSANGKIYEOK YA RIEULMIEUM + {0x83B5, 0xAE8F}, //461 #HANGUL SYLLABLE SSANGKIYEOK YA RIEULPIEUP + {0x83B6, 0xAE90}, //462 #HANGUL SYLLABLE SSANGKIYEOK YA RIEULSIOS + {0x83B7, 0xAE91}, //463 #HANGUL SYLLABLE SSANGKIYEOK YA RIEULTHIEUTH + {0x83B8, 0xAE92}, //464 #HANGUL SYLLABLE SSANGKIYEOK YA RIEULPHIEUPH + {0x83B9, 0xAE93}, //465 #HANGUL SYLLABLE SSANGKIYEOK YA RIEULHIEUH + {0x83BA, 0xAE94}, //466 #HANGUL SYLLABLE SSANGKIYEOK YA MIEUM + {0x83BB, 0xAE95}, //467 #HANGUL SYLLABLE SSANGKIYEOK YA PIEUP + {0x83BC, 0xAE96}, //468 #HANGUL SYLLABLE SSANGKIYEOK YA PIEUPSIOS + {0x83BD, 0xAE97}, //469 #HANGUL SYLLABLE SSANGKIYEOK YA SIOS + {0x83BE, 0xAE98}, //470 #HANGUL SYLLABLE SSANGKIYEOK YA SSANGSIOS + {0x83BF, 0xAE99}, //471 #HANGUL SYLLABLE SSANGKIYEOK YA IEUNG + {0x83C0, 0xAE9A}, //472 #HANGUL SYLLABLE SSANGKIYEOK YA CIEUC + {0x83C1, 0xAE9B}, //473 #HANGUL SYLLABLE SSANGKIYEOK YA CHIEUCH + {0x83C2, 0xAE9C}, //474 #HANGUL SYLLABLE SSANGKIYEOK YA KHIEUKH + {0x83C3, 0xAE9D}, //475 #HANGUL SYLLABLE SSANGKIYEOK YA THIEUTH + {0x83C4, 0xAE9E}, //476 #HANGUL SYLLABLE SSANGKIYEOK YA PHIEUPH + {0x83C5, 0xAE9F}, //477 #HANGUL SYLLABLE SSANGKIYEOK YA HIEUH + {0x83C6, 0xAEA0}, //478 #HANGUL SYLLABLE SSANGKIYEOK YAE + {0x83C7, 0xAEA1}, //479 #HANGUL SYLLABLE SSANGKIYEOK YAE KIYEOK + {0x83C8, 0xAEA2}, //480 #HANGUL SYLLABLE SSANGKIYEOK YAE SSANGKIYEOK + {0x83C9, 0xAEA3}, //481 #HANGUL SYLLABLE SSANGKIYEOK YAE KIYEOKSIOS + {0x83CA, 0xAEA4}, //482 #HANGUL SYLLABLE SSANGKIYEOK YAE NIEUN + {0x83CB, 0xAEA5}, //483 #HANGUL SYLLABLE SSANGKIYEOK YAE NIEUNCIEUC + {0x83CC, 0xAEA6}, //484 #HANGUL SYLLABLE SSANGKIYEOK YAE NIEUNHIEUH + {0x83CD, 0xAEA7}, //485 #HANGUL SYLLABLE SSANGKIYEOK YAE TIKEUT + {0x83CE, 0xAEA8}, //486 #HANGUL SYLLABLE SSANGKIYEOK YAE RIEUL + {0x83CF, 0xAEA9}, //487 #HANGUL SYLLABLE SSANGKIYEOK YAE RIEULKIYEOK + {0x83D0, 0xAEAA}, //488 #HANGUL SYLLABLE SSANGKIYEOK YAE RIEULMIEUM + {0x83D1, 0xAEAB}, //489 #HANGUL SYLLABLE SSANGKIYEOK YAE RIEULPIEUP + {0x83D2, 0xAEAC}, //490 #HANGUL SYLLABLE SSANGKIYEOK YAE RIEULSIOS + {0x83D3, 0xAEAD}, //491 #HANGUL SYLLABLE SSANGKIYEOK YAE RIEULTHIEUTH + {0x83D4, 0xAEAE}, //492 #HANGUL SYLLABLE SSANGKIYEOK YAE RIEULPHIEUPH + {0x83D5, 0xAEAF}, //493 #HANGUL SYLLABLE SSANGKIYEOK YAE RIEULHIEUH + {0x83D6, 0xAEB0}, //494 #HANGUL SYLLABLE SSANGKIYEOK YAE MIEUM + {0x83D7, 0xAEB1}, //495 #HANGUL SYLLABLE SSANGKIYEOK YAE PIEUP + {0x83D8, 0xAEB2}, //496 #HANGUL SYLLABLE SSANGKIYEOK YAE PIEUPSIOS + {0x83D9, 0xAEB3}, //497 #HANGUL SYLLABLE SSANGKIYEOK YAE SIOS + {0x83DA, 0xAEB4}, //498 #HANGUL SYLLABLE SSANGKIYEOK YAE SSANGSIOS + {0x83DB, 0xAEB5}, //499 #HANGUL SYLLABLE SSANGKIYEOK YAE IEUNG + {0x83DC, 0xAEB6}, //500 #HANGUL SYLLABLE SSANGKIYEOK YAE CIEUC + {0x83DD, 0xAEB7}, //501 #HANGUL SYLLABLE SSANGKIYEOK YAE CHIEUCH + {0x83DE, 0xAEB8}, //502 #HANGUL SYLLABLE SSANGKIYEOK YAE KHIEUKH + {0x83DF, 0xAEB9}, //503 #HANGUL SYLLABLE SSANGKIYEOK YAE THIEUTH + {0x83E0, 0xAEBA}, //504 #HANGUL SYLLABLE SSANGKIYEOK YAE PHIEUPH + {0x83E1, 0xAEBB}, //505 #HANGUL SYLLABLE SSANGKIYEOK YAE HIEUH + {0x83E2, 0xAEBF}, //506 #HANGUL SYLLABLE SSANGKIYEOK EO KIYEOKSIOS + {0x83E3, 0xAEC1}, //507 #HANGUL SYLLABLE SSANGKIYEOK EO NIEUNCIEUC + {0x83E4, 0xAEC2}, //508 #HANGUL SYLLABLE SSANGKIYEOK EO NIEUNHIEUH + {0x83E5, 0xAEC3}, //509 #HANGUL SYLLABLE SSANGKIYEOK EO TIKEUT + {0x83E6, 0xAEC5}, //510 #HANGUL SYLLABLE SSANGKIYEOK EO RIEULKIYEOK + {0x83E7, 0xAEC6}, //511 #HANGUL SYLLABLE SSANGKIYEOK EO RIEULMIEUM + {0x83E8, 0xAEC7}, //512 #HANGUL SYLLABLE SSANGKIYEOK EO RIEULPIEUP + {0x83E9, 0xAEC8}, //513 #HANGUL SYLLABLE SSANGKIYEOK EO RIEULSIOS + {0x83EA, 0xAEC9}, //514 #HANGUL SYLLABLE SSANGKIYEOK EO RIEULTHIEUTH + {0x83EB, 0xAECA}, //515 #HANGUL SYLLABLE SSANGKIYEOK EO RIEULPHIEUPH + {0x83EC, 0xAECB}, //516 #HANGUL SYLLABLE SSANGKIYEOK EO RIEULHIEUH + {0x83ED, 0xAECE}, //517 #HANGUL SYLLABLE SSANGKIYEOK EO PIEUPSIOS + {0x83EE, 0xAED2}, //518 #HANGUL SYLLABLE SSANGKIYEOK EO CIEUC + {0x83EF, 0xAED3}, //519 #HANGUL SYLLABLE SSANGKIYEOK EO CHIEUCH + {0x83F0, 0xAED4}, //520 #HANGUL SYLLABLE SSANGKIYEOK EO KHIEUKH + {0x83F1, 0xAED5}, //521 #HANGUL SYLLABLE SSANGKIYEOK EO THIEUTH + {0x83F2, 0xAED6}, //522 #HANGUL SYLLABLE SSANGKIYEOK EO PHIEUPH + {0x83F3, 0xAED7}, //523 #HANGUL SYLLABLE SSANGKIYEOK EO HIEUH + {0x83F4, 0xAEDA}, //524 #HANGUL SYLLABLE SSANGKIYEOK E SSANGKIYEOK + {0x83F5, 0xAEDB}, //525 #HANGUL SYLLABLE SSANGKIYEOK E KIYEOKSIOS + {0x83F6, 0xAEDD}, //526 #HANGUL SYLLABLE SSANGKIYEOK E NIEUNCIEUC + {0x83F7, 0xAEDE}, //527 #HANGUL SYLLABLE SSANGKIYEOK E NIEUNHIEUH + {0x83F8, 0xAEDF}, //528 #HANGUL SYLLABLE SSANGKIYEOK E TIKEUT + {0x83F9, 0xAEE0}, //529 #HANGUL SYLLABLE SSANGKIYEOK E RIEUL + {0x83FA, 0xAEE1}, //530 #HANGUL SYLLABLE SSANGKIYEOK E RIEULKIYEOK + {0x83FB, 0xAEE2}, //531 #HANGUL SYLLABLE SSANGKIYEOK E RIEULMIEUM + {0x83FC, 0xAEE3}, //532 #HANGUL SYLLABLE SSANGKIYEOK E RIEULPIEUP + {0x83FD, 0xAEE4}, //533 #HANGUL SYLLABLE SSANGKIYEOK E RIEULSIOS + {0x83FE, 0xAEE5}, //534 #HANGUL SYLLABLE SSANGKIYEOK E RIEULTHIEUTH + {0x8441, 0xAEE6}, //535 #HANGUL SYLLABLE SSANGKIYEOK E RIEULPHIEUPH + {0x8442, 0xAEE7}, //536 #HANGUL SYLLABLE SSANGKIYEOK E RIEULHIEUH + {0x8443, 0xAEE9}, //537 #HANGUL SYLLABLE SSANGKIYEOK E PIEUP + {0x8444, 0xAEEA}, //538 #HANGUL SYLLABLE SSANGKIYEOK E PIEUPSIOS + {0x8445, 0xAEEC}, //539 #HANGUL SYLLABLE SSANGKIYEOK E SSANGSIOS + {0x8446, 0xAEEE}, //540 #HANGUL SYLLABLE SSANGKIYEOK E CIEUC + {0x8447, 0xAEEF}, //541 #HANGUL SYLLABLE SSANGKIYEOK E CHIEUCH + {0x8448, 0xAEF0}, //542 #HANGUL SYLLABLE SSANGKIYEOK E KHIEUKH + {0x8449, 0xAEF1}, //543 #HANGUL SYLLABLE SSANGKIYEOK E THIEUTH + {0x844A, 0xAEF2}, //544 #HANGUL SYLLABLE SSANGKIYEOK E PHIEUPH + {0x844B, 0xAEF3}, //545 #HANGUL SYLLABLE SSANGKIYEOK E HIEUH + {0x844C, 0xAEF5}, //546 #HANGUL SYLLABLE SSANGKIYEOK YEO KIYEOK + {0x844D, 0xAEF6}, //547 #HANGUL SYLLABLE SSANGKIYEOK YEO SSANGKIYEOK + {0x844E, 0xAEF7}, //548 #HANGUL SYLLABLE SSANGKIYEOK YEO KIYEOKSIOS + {0x844F, 0xAEF9}, //549 #HANGUL SYLLABLE SSANGKIYEOK YEO NIEUNCIEUC + {0x8450, 0xAEFA}, //550 #HANGUL SYLLABLE SSANGKIYEOK YEO NIEUNHIEUH + {0x8451, 0xAEFB}, //551 #HANGUL SYLLABLE SSANGKIYEOK YEO TIKEUT + {0x8452, 0xAEFD}, //552 #HANGUL SYLLABLE SSANGKIYEOK YEO RIEULKIYEOK + {0x8453, 0xAEFE}, //553 #HANGUL SYLLABLE SSANGKIYEOK YEO RIEULMIEUM + {0x8454, 0xAEFF}, //554 #HANGUL SYLLABLE SSANGKIYEOK YEO RIEULPIEUP + {0x8455, 0xAF00}, //555 #HANGUL SYLLABLE SSANGKIYEOK YEO RIEULSIOS + {0x8456, 0xAF01}, //556 #HANGUL SYLLABLE SSANGKIYEOK YEO RIEULTHIEUTH + {0x8457, 0xAF02}, //557 #HANGUL SYLLABLE SSANGKIYEOK YEO RIEULPHIEUPH + {0x8458, 0xAF03}, //558 #HANGUL SYLLABLE SSANGKIYEOK YEO RIEULHIEUH + {0x8459, 0xAF04}, //559 #HANGUL SYLLABLE SSANGKIYEOK YEO MIEUM + {0x845A, 0xAF05}, //560 #HANGUL SYLLABLE SSANGKIYEOK YEO PIEUP + {0x8461, 0xAF06}, //561 #HANGUL SYLLABLE SSANGKIYEOK YEO PIEUPSIOS + {0x8462, 0xAF09}, //562 #HANGUL SYLLABLE SSANGKIYEOK YEO IEUNG + {0x8463, 0xAF0A}, //563 #HANGUL SYLLABLE SSANGKIYEOK YEO CIEUC + {0x8464, 0xAF0B}, //564 #HANGUL SYLLABLE SSANGKIYEOK YEO CHIEUCH + {0x8465, 0xAF0C}, //565 #HANGUL SYLLABLE SSANGKIYEOK YEO KHIEUKH + {0x8466, 0xAF0E}, //566 #HANGUL SYLLABLE SSANGKIYEOK YEO PHIEUPH + {0x8467, 0xAF0F}, //567 #HANGUL SYLLABLE SSANGKIYEOK YEO HIEUH + {0x8468, 0xAF11}, //568 #HANGUL SYLLABLE SSANGKIYEOK YE KIYEOK + {0x8469, 0xAF12}, //569 #HANGUL SYLLABLE SSANGKIYEOK YE SSANGKIYEOK + {0x846A, 0xAF13}, //570 #HANGUL SYLLABLE SSANGKIYEOK YE KIYEOKSIOS + {0x846B, 0xAF14}, //571 #HANGUL SYLLABLE SSANGKIYEOK YE NIEUN + {0x846C, 0xAF15}, //572 #HANGUL SYLLABLE SSANGKIYEOK YE NIEUNCIEUC + {0x846D, 0xAF16}, //573 #HANGUL SYLLABLE SSANGKIYEOK YE NIEUNHIEUH + {0x846E, 0xAF17}, //574 #HANGUL SYLLABLE SSANGKIYEOK YE TIKEUT + {0x846F, 0xAF18}, //575 #HANGUL SYLLABLE SSANGKIYEOK YE RIEUL + {0x8470, 0xAF19}, //576 #HANGUL SYLLABLE SSANGKIYEOK YE RIEULKIYEOK + {0x8471, 0xAF1A}, //577 #HANGUL SYLLABLE SSANGKIYEOK YE RIEULMIEUM + {0x8472, 0xAF1B}, //578 #HANGUL SYLLABLE SSANGKIYEOK YE RIEULPIEUP + {0x8473, 0xAF1C}, //579 #HANGUL SYLLABLE SSANGKIYEOK YE RIEULSIOS + {0x8474, 0xAF1D}, //580 #HANGUL SYLLABLE SSANGKIYEOK YE RIEULTHIEUTH + {0x8475, 0xAF1E}, //581 #HANGUL SYLLABLE SSANGKIYEOK YE RIEULPHIEUPH + {0x8476, 0xAF1F}, //582 #HANGUL SYLLABLE SSANGKIYEOK YE RIEULHIEUH + {0x8477, 0xAF20}, //583 #HANGUL SYLLABLE SSANGKIYEOK YE MIEUM + {0x8478, 0xAF21}, //584 #HANGUL SYLLABLE SSANGKIYEOK YE PIEUP + {0x8479, 0xAF22}, //585 #HANGUL SYLLABLE SSANGKIYEOK YE PIEUPSIOS + {0x847A, 0xAF23}, //586 #HANGUL SYLLABLE SSANGKIYEOK YE SIOS + {0x8481, 0xAF24}, //587 #HANGUL SYLLABLE SSANGKIYEOK YE SSANGSIOS + {0x8482, 0xAF25}, //588 #HANGUL SYLLABLE SSANGKIYEOK YE IEUNG + {0x8483, 0xAF26}, //589 #HANGUL SYLLABLE SSANGKIYEOK YE CIEUC + {0x8484, 0xAF27}, //590 #HANGUL SYLLABLE SSANGKIYEOK YE CHIEUCH + {0x8485, 0xAF28}, //591 #HANGUL SYLLABLE SSANGKIYEOK YE KHIEUKH + {0x8486, 0xAF29}, //592 #HANGUL SYLLABLE SSANGKIYEOK YE THIEUTH + {0x8487, 0xAF2A}, //593 #HANGUL SYLLABLE SSANGKIYEOK YE PHIEUPH + {0x8488, 0xAF2B}, //594 #HANGUL SYLLABLE SSANGKIYEOK YE HIEUH + {0x8489, 0xAF2E}, //595 #HANGUL SYLLABLE SSANGKIYEOK O SSANGKIYEOK + {0x848A, 0xAF2F}, //596 #HANGUL SYLLABLE SSANGKIYEOK O KIYEOKSIOS + {0x848B, 0xAF31}, //597 #HANGUL SYLLABLE SSANGKIYEOK O NIEUNCIEUC + {0x848C, 0xAF33}, //598 #HANGUL SYLLABLE SSANGKIYEOK O TIKEUT + {0x848D, 0xAF35}, //599 #HANGUL SYLLABLE SSANGKIYEOK O RIEULKIYEOK + {0x848E, 0xAF36}, //600 #HANGUL SYLLABLE SSANGKIYEOK O RIEULMIEUM + {0x848F, 0xAF37}, //601 #HANGUL SYLLABLE SSANGKIYEOK O RIEULPIEUP + {0x8490, 0xAF38}, //602 #HANGUL SYLLABLE SSANGKIYEOK O RIEULSIOS + {0x8491, 0xAF39}, //603 #HANGUL SYLLABLE SSANGKIYEOK O RIEULTHIEUTH + {0x8492, 0xAF3A}, //604 #HANGUL SYLLABLE SSANGKIYEOK O RIEULPHIEUPH + {0x8493, 0xAF3B}, //605 #HANGUL SYLLABLE SSANGKIYEOK O RIEULHIEUH + {0x8494, 0xAF3E}, //606 #HANGUL SYLLABLE SSANGKIYEOK O PIEUPSIOS + {0x8495, 0xAF40}, //607 #HANGUL SYLLABLE SSANGKIYEOK O SSANGSIOS + {0x8496, 0xAF44}, //608 #HANGUL SYLLABLE SSANGKIYEOK O KHIEUKH + {0x8497, 0xAF45}, //609 #HANGUL SYLLABLE SSANGKIYEOK O THIEUTH + {0x8498, 0xAF46}, //610 #HANGUL SYLLABLE SSANGKIYEOK O PHIEUPH + {0x8499, 0xAF47}, //611 #HANGUL SYLLABLE SSANGKIYEOK O HIEUH + {0x849A, 0xAF4A}, //612 #HANGUL SYLLABLE SSANGKIYEOK WA SSANGKIYEOK + {0x849B, 0xAF4B}, //613 #HANGUL SYLLABLE SSANGKIYEOK WA KIYEOKSIOS + {0x849C, 0xAF4C}, //614 #HANGUL SYLLABLE SSANGKIYEOK WA NIEUN + {0x849D, 0xAF4D}, //615 #HANGUL SYLLABLE SSANGKIYEOK WA NIEUNCIEUC + {0x849E, 0xAF4E}, //616 #HANGUL SYLLABLE SSANGKIYEOK WA NIEUNHIEUH + {0x849F, 0xAF4F}, //617 #HANGUL SYLLABLE SSANGKIYEOK WA TIKEUT + {0x84A0, 0xAF51}, //618 #HANGUL SYLLABLE SSANGKIYEOK WA RIEULKIYEOK + {0x84A1, 0xAF52}, //619 #HANGUL SYLLABLE SSANGKIYEOK WA RIEULMIEUM + {0x84A2, 0xAF53}, //620 #HANGUL SYLLABLE SSANGKIYEOK WA RIEULPIEUP + {0x84A3, 0xAF54}, //621 #HANGUL SYLLABLE SSANGKIYEOK WA RIEULSIOS + {0x84A4, 0xAF55}, //622 #HANGUL SYLLABLE SSANGKIYEOK WA RIEULTHIEUTH + {0x84A5, 0xAF56}, //623 #HANGUL SYLLABLE SSANGKIYEOK WA RIEULPHIEUPH + {0x84A6, 0xAF57}, //624 #HANGUL SYLLABLE SSANGKIYEOK WA RIEULHIEUH + {0x84A7, 0xAF58}, //625 #HANGUL SYLLABLE SSANGKIYEOK WA MIEUM + {0x84A8, 0xAF59}, //626 #HANGUL SYLLABLE SSANGKIYEOK WA PIEUP + {0x84A9, 0xAF5A}, //627 #HANGUL SYLLABLE SSANGKIYEOK WA PIEUPSIOS + {0x84AA, 0xAF5B}, //628 #HANGUL SYLLABLE SSANGKIYEOK WA SIOS + {0x84AB, 0xAF5E}, //629 #HANGUL SYLLABLE SSANGKIYEOK WA CIEUC + {0x84AC, 0xAF5F}, //630 #HANGUL SYLLABLE SSANGKIYEOK WA CHIEUCH + {0x84AD, 0xAF60}, //631 #HANGUL SYLLABLE SSANGKIYEOK WA KHIEUKH + {0x84AE, 0xAF61}, //632 #HANGUL SYLLABLE SSANGKIYEOK WA THIEUTH + {0x84AF, 0xAF62}, //633 #HANGUL SYLLABLE SSANGKIYEOK WA PHIEUPH + {0x84B0, 0xAF63}, //634 #HANGUL SYLLABLE SSANGKIYEOK WA HIEUH + {0x84B1, 0xAF66}, //635 #HANGUL SYLLABLE SSANGKIYEOK WAE SSANGKIYEOK + {0x84B2, 0xAF67}, //636 #HANGUL SYLLABLE SSANGKIYEOK WAE KIYEOKSIOS + {0x84B3, 0xAF68}, //637 #HANGUL SYLLABLE SSANGKIYEOK WAE NIEUN + {0x84B4, 0xAF69}, //638 #HANGUL SYLLABLE SSANGKIYEOK WAE NIEUNCIEUC + {0x84B5, 0xAF6A}, //639 #HANGUL SYLLABLE SSANGKIYEOK WAE NIEUNHIEUH + {0x84B6, 0xAF6B}, //640 #HANGUL SYLLABLE SSANGKIYEOK WAE TIKEUT + {0x84B7, 0xAF6C}, //641 #HANGUL SYLLABLE SSANGKIYEOK WAE RIEUL + {0x84B8, 0xAF6D}, //642 #HANGUL SYLLABLE SSANGKIYEOK WAE RIEULKIYEOK + {0x84B9, 0xAF6E}, //643 #HANGUL SYLLABLE SSANGKIYEOK WAE RIEULMIEUM + {0x84BA, 0xAF6F}, //644 #HANGUL SYLLABLE SSANGKIYEOK WAE RIEULPIEUP + {0x84BB, 0xAF70}, //645 #HANGUL SYLLABLE SSANGKIYEOK WAE RIEULSIOS + {0x84BC, 0xAF71}, //646 #HANGUL SYLLABLE SSANGKIYEOK WAE RIEULTHIEUTH + {0x84BD, 0xAF72}, //647 #HANGUL SYLLABLE SSANGKIYEOK WAE RIEULPHIEUPH + {0x84BE, 0xAF73}, //648 #HANGUL SYLLABLE SSANGKIYEOK WAE RIEULHIEUH + {0x84BF, 0xAF74}, //649 #HANGUL SYLLABLE SSANGKIYEOK WAE MIEUM + {0x84C0, 0xAF75}, //650 #HANGUL SYLLABLE SSANGKIYEOK WAE PIEUP + {0x84C1, 0xAF76}, //651 #HANGUL SYLLABLE SSANGKIYEOK WAE PIEUPSIOS + {0x84C2, 0xAF77}, //652 #HANGUL SYLLABLE SSANGKIYEOK WAE SIOS + {0x84C3, 0xAF78}, //653 #HANGUL SYLLABLE SSANGKIYEOK WAE SSANGSIOS + {0x84C4, 0xAF7A}, //654 #HANGUL SYLLABLE SSANGKIYEOK WAE CIEUC + {0x84C5, 0xAF7B}, //655 #HANGUL SYLLABLE SSANGKIYEOK WAE CHIEUCH + {0x84C6, 0xAF7C}, //656 #HANGUL SYLLABLE SSANGKIYEOK WAE KHIEUKH + {0x84C7, 0xAF7D}, //657 #HANGUL SYLLABLE SSANGKIYEOK WAE THIEUTH + {0x84C8, 0xAF7E}, //658 #HANGUL SYLLABLE SSANGKIYEOK WAE PHIEUPH + {0x84C9, 0xAF7F}, //659 #HANGUL SYLLABLE SSANGKIYEOK WAE HIEUH + {0x84CA, 0xAF81}, //660 #HANGUL SYLLABLE SSANGKIYEOK OE KIYEOK + {0x84CB, 0xAF82}, //661 #HANGUL SYLLABLE SSANGKIYEOK OE SSANGKIYEOK + {0x84CC, 0xAF83}, //662 #HANGUL SYLLABLE SSANGKIYEOK OE KIYEOKSIOS + {0x84CD, 0xAF85}, //663 #HANGUL SYLLABLE SSANGKIYEOK OE NIEUNCIEUC + {0x84CE, 0xAF86}, //664 #HANGUL SYLLABLE SSANGKIYEOK OE NIEUNHIEUH + {0x84CF, 0xAF87}, //665 #HANGUL SYLLABLE SSANGKIYEOK OE TIKEUT + {0x84D0, 0xAF89}, //666 #HANGUL SYLLABLE SSANGKIYEOK OE RIEULKIYEOK + {0x84D1, 0xAF8A}, //667 #HANGUL SYLLABLE SSANGKIYEOK OE RIEULMIEUM + {0x84D2, 0xAF8B}, //668 #HANGUL SYLLABLE SSANGKIYEOK OE RIEULPIEUP + {0x84D3, 0xAF8C}, //669 #HANGUL SYLLABLE SSANGKIYEOK OE RIEULSIOS + {0x84D4, 0xAF8D}, //670 #HANGUL SYLLABLE SSANGKIYEOK OE RIEULTHIEUTH + {0x84D5, 0xAF8E}, //671 #HANGUL SYLLABLE SSANGKIYEOK OE RIEULPHIEUPH + {0x84D6, 0xAF8F}, //672 #HANGUL SYLLABLE SSANGKIYEOK OE RIEULHIEUH + {0x84D7, 0xAF92}, //673 #HANGUL SYLLABLE SSANGKIYEOK OE PIEUPSIOS + {0x84D8, 0xAF93}, //674 #HANGUL SYLLABLE SSANGKIYEOK OE SIOS + {0x84D9, 0xAF94}, //675 #HANGUL SYLLABLE SSANGKIYEOK OE SSANGSIOS + {0x84DA, 0xAF96}, //676 #HANGUL SYLLABLE SSANGKIYEOK OE CIEUC + {0x84DB, 0xAF97}, //677 #HANGUL SYLLABLE SSANGKIYEOK OE CHIEUCH + {0x84DC, 0xAF98}, //678 #HANGUL SYLLABLE SSANGKIYEOK OE KHIEUKH + {0x84DD, 0xAF99}, //679 #HANGUL SYLLABLE SSANGKIYEOK OE THIEUTH + {0x84DE, 0xAF9A}, //680 #HANGUL SYLLABLE SSANGKIYEOK OE PHIEUPH + {0x84DF, 0xAF9B}, //681 #HANGUL SYLLABLE SSANGKIYEOK OE HIEUH + {0x84E0, 0xAF9D}, //682 #HANGUL SYLLABLE SSANGKIYEOK YO KIYEOK + {0x84E1, 0xAF9E}, //683 #HANGUL SYLLABLE SSANGKIYEOK YO SSANGKIYEOK + {0x84E2, 0xAF9F}, //684 #HANGUL SYLLABLE SSANGKIYEOK YO KIYEOKSIOS + {0x84E3, 0xAFA0}, //685 #HANGUL SYLLABLE SSANGKIYEOK YO NIEUN + {0x84E4, 0xAFA1}, //686 #HANGUL SYLLABLE SSANGKIYEOK YO NIEUNCIEUC + {0x84E5, 0xAFA2}, //687 #HANGUL SYLLABLE SSANGKIYEOK YO NIEUNHIEUH + {0x84E6, 0xAFA3}, //688 #HANGUL SYLLABLE SSANGKIYEOK YO TIKEUT + {0x84E7, 0xAFA4}, //689 #HANGUL SYLLABLE SSANGKIYEOK YO RIEUL + {0x84E8, 0xAFA5}, //690 #HANGUL SYLLABLE SSANGKIYEOK YO RIEULKIYEOK + {0x84E9, 0xAFA6}, //691 #HANGUL SYLLABLE SSANGKIYEOK YO RIEULMIEUM + {0x84EA, 0xAFA7}, //692 #HANGUL SYLLABLE SSANGKIYEOK YO RIEULPIEUP + {0x84EB, 0xAFA8}, //693 #HANGUL SYLLABLE SSANGKIYEOK YO RIEULSIOS + {0x84EC, 0xAFA9}, //694 #HANGUL SYLLABLE SSANGKIYEOK YO RIEULTHIEUTH + {0x84ED, 0xAFAA}, //695 #HANGUL SYLLABLE SSANGKIYEOK YO RIEULPHIEUPH + {0x84EE, 0xAFAB}, //696 #HANGUL SYLLABLE SSANGKIYEOK YO RIEULHIEUH + {0x84EF, 0xAFAC}, //697 #HANGUL SYLLABLE SSANGKIYEOK YO MIEUM + {0x84F0, 0xAFAD}, //698 #HANGUL SYLLABLE SSANGKIYEOK YO PIEUP + {0x84F1, 0xAFAE}, //699 #HANGUL SYLLABLE SSANGKIYEOK YO PIEUPSIOS + {0x84F2, 0xAFAF}, //700 #HANGUL SYLLABLE SSANGKIYEOK YO SIOS + {0x84F3, 0xAFB0}, //701 #HANGUL SYLLABLE SSANGKIYEOK YO SSANGSIOS + {0x84F4, 0xAFB1}, //702 #HANGUL SYLLABLE SSANGKIYEOK YO IEUNG + {0x84F5, 0xAFB2}, //703 #HANGUL SYLLABLE SSANGKIYEOK YO CIEUC + {0x84F6, 0xAFB3}, //704 #HANGUL SYLLABLE SSANGKIYEOK YO CHIEUCH + {0x84F7, 0xAFB4}, //705 #HANGUL SYLLABLE SSANGKIYEOK YO KHIEUKH + {0x84F8, 0xAFB5}, //706 #HANGUL SYLLABLE SSANGKIYEOK YO THIEUTH + {0x84F9, 0xAFB6}, //707 #HANGUL SYLLABLE SSANGKIYEOK YO PHIEUPH + {0x84FA, 0xAFB7}, //708 #HANGUL SYLLABLE SSANGKIYEOK YO HIEUH + {0x84FB, 0xAFBA}, //709 #HANGUL SYLLABLE SSANGKIYEOK U SSANGKIYEOK + {0x84FC, 0xAFBB}, //710 #HANGUL SYLLABLE SSANGKIYEOK U KIYEOKSIOS + {0x84FD, 0xAFBD}, //711 #HANGUL SYLLABLE SSANGKIYEOK U NIEUNCIEUC + {0x84FE, 0xAFBE}, //712 #HANGUL SYLLABLE SSANGKIYEOK U NIEUNHIEUH + {0x8541, 0xAFBF}, //713 #HANGUL SYLLABLE SSANGKIYEOK U TIKEUT + {0x8542, 0xAFC1}, //714 #HANGUL SYLLABLE SSANGKIYEOK U RIEULKIYEOK + {0x8543, 0xAFC2}, //715 #HANGUL SYLLABLE SSANGKIYEOK U RIEULMIEUM + {0x8544, 0xAFC3}, //716 #HANGUL SYLLABLE SSANGKIYEOK U RIEULPIEUP + {0x8545, 0xAFC4}, //717 #HANGUL SYLLABLE SSANGKIYEOK U RIEULSIOS + {0x8546, 0xAFC5}, //718 #HANGUL SYLLABLE SSANGKIYEOK U RIEULTHIEUTH + {0x8547, 0xAFC6}, //719 #HANGUL SYLLABLE SSANGKIYEOK U RIEULPHIEUPH + {0x8548, 0xAFCA}, //720 #HANGUL SYLLABLE SSANGKIYEOK U PIEUPSIOS + {0x8549, 0xAFCC}, //721 #HANGUL SYLLABLE SSANGKIYEOK U SSANGSIOS + {0x854A, 0xAFCF}, //722 #HANGUL SYLLABLE SSANGKIYEOK U CHIEUCH + {0x854B, 0xAFD0}, //723 #HANGUL SYLLABLE SSANGKIYEOK U KHIEUKH + {0x854C, 0xAFD1}, //724 #HANGUL SYLLABLE SSANGKIYEOK U THIEUTH + {0x854D, 0xAFD2}, //725 #HANGUL SYLLABLE SSANGKIYEOK U PHIEUPH + {0x854E, 0xAFD3}, //726 #HANGUL SYLLABLE SSANGKIYEOK U HIEUH + {0x854F, 0xAFD5}, //727 #HANGUL SYLLABLE SSANGKIYEOK WEO KIYEOK + {0x8550, 0xAFD6}, //728 #HANGUL SYLLABLE SSANGKIYEOK WEO SSANGKIYEOK + {0x8551, 0xAFD7}, //729 #HANGUL SYLLABLE SSANGKIYEOK WEO KIYEOKSIOS + {0x8552, 0xAFD8}, //730 #HANGUL SYLLABLE SSANGKIYEOK WEO NIEUN + {0x8553, 0xAFD9}, //731 #HANGUL SYLLABLE SSANGKIYEOK WEO NIEUNCIEUC + {0x8554, 0xAFDA}, //732 #HANGUL SYLLABLE SSANGKIYEOK WEO NIEUNHIEUH + {0x8555, 0xAFDB}, //733 #HANGUL SYLLABLE SSANGKIYEOK WEO TIKEUT + {0x8556, 0xAFDD}, //734 #HANGUL SYLLABLE SSANGKIYEOK WEO RIEULKIYEOK + {0x8557, 0xAFDE}, //735 #HANGUL SYLLABLE SSANGKIYEOK WEO RIEULMIEUM + {0x8558, 0xAFDF}, //736 #HANGUL SYLLABLE SSANGKIYEOK WEO RIEULPIEUP + {0x8559, 0xAFE0}, //737 #HANGUL SYLLABLE SSANGKIYEOK WEO RIEULSIOS + {0x855A, 0xAFE1}, //738 #HANGUL SYLLABLE SSANGKIYEOK WEO RIEULTHIEUTH + {0x8561, 0xAFE2}, //739 #HANGUL SYLLABLE SSANGKIYEOK WEO RIEULPHIEUPH + {0x8562, 0xAFE3}, //740 #HANGUL SYLLABLE SSANGKIYEOK WEO RIEULHIEUH + {0x8563, 0xAFE4}, //741 #HANGUL SYLLABLE SSANGKIYEOK WEO MIEUM + {0x8564, 0xAFE5}, //742 #HANGUL SYLLABLE SSANGKIYEOK WEO PIEUP + {0x8565, 0xAFE6}, //743 #HANGUL SYLLABLE SSANGKIYEOK WEO PIEUPSIOS + {0x8566, 0xAFE7}, //744 #HANGUL SYLLABLE SSANGKIYEOK WEO SIOS + {0x8567, 0xAFEA}, //745 #HANGUL SYLLABLE SSANGKIYEOK WEO CIEUC + {0x8568, 0xAFEB}, //746 #HANGUL SYLLABLE SSANGKIYEOK WEO CHIEUCH + {0x8569, 0xAFEC}, //747 #HANGUL SYLLABLE SSANGKIYEOK WEO KHIEUKH + {0x856A, 0xAFED}, //748 #HANGUL SYLLABLE SSANGKIYEOK WEO THIEUTH + {0x856B, 0xAFEE}, //749 #HANGUL SYLLABLE SSANGKIYEOK WEO PHIEUPH + {0x856C, 0xAFEF}, //750 #HANGUL SYLLABLE SSANGKIYEOK WEO HIEUH + {0x856D, 0xAFF2}, //751 #HANGUL SYLLABLE SSANGKIYEOK WE SSANGKIYEOK + {0x856E, 0xAFF3}, //752 #HANGUL SYLLABLE SSANGKIYEOK WE KIYEOKSIOS + {0x856F, 0xAFF5}, //753 #HANGUL SYLLABLE SSANGKIYEOK WE NIEUNCIEUC + {0x8570, 0xAFF6}, //754 #HANGUL SYLLABLE SSANGKIYEOK WE NIEUNHIEUH + {0x8571, 0xAFF7}, //755 #HANGUL SYLLABLE SSANGKIYEOK WE TIKEUT + {0x8572, 0xAFF9}, //756 #HANGUL SYLLABLE SSANGKIYEOK WE RIEULKIYEOK + {0x8573, 0xAFFA}, //757 #HANGUL SYLLABLE SSANGKIYEOK WE RIEULMIEUM + {0x8574, 0xAFFB}, //758 #HANGUL SYLLABLE SSANGKIYEOK WE RIEULPIEUP + {0x8575, 0xAFFC}, //759 #HANGUL SYLLABLE SSANGKIYEOK WE RIEULSIOS + {0x8576, 0xAFFD}, //760 #HANGUL SYLLABLE SSANGKIYEOK WE RIEULTHIEUTH + {0x8577, 0xAFFE}, //761 #HANGUL SYLLABLE SSANGKIYEOK WE RIEULPHIEUPH + {0x8578, 0xAFFF}, //762 #HANGUL SYLLABLE SSANGKIYEOK WE RIEULHIEUH + {0x8579, 0xB002}, //763 #HANGUL SYLLABLE SSANGKIYEOK WE PIEUPSIOS + {0x857A, 0xB003}, //764 #HANGUL SYLLABLE SSANGKIYEOK WE SIOS + {0x8581, 0xB005}, //765 #HANGUL SYLLABLE SSANGKIYEOK WE IEUNG + {0x8582, 0xB006}, //766 #HANGUL SYLLABLE SSANGKIYEOK WE CIEUC + {0x8583, 0xB007}, //767 #HANGUL SYLLABLE SSANGKIYEOK WE CHIEUCH + {0x8584, 0xB008}, //768 #HANGUL SYLLABLE SSANGKIYEOK WE KHIEUKH + {0x8585, 0xB009}, //769 #HANGUL SYLLABLE SSANGKIYEOK WE THIEUTH + {0x8586, 0xB00A}, //770 #HANGUL SYLLABLE SSANGKIYEOK WE PHIEUPH + {0x8587, 0xB00B}, //771 #HANGUL SYLLABLE SSANGKIYEOK WE HIEUH + {0x8588, 0xB00D}, //772 #HANGUL SYLLABLE SSANGKIYEOK WI KIYEOK + {0x8589, 0xB00E}, //773 #HANGUL SYLLABLE SSANGKIYEOK WI SSANGKIYEOK + {0x858A, 0xB00F}, //774 #HANGUL SYLLABLE SSANGKIYEOK WI KIYEOKSIOS + {0x858B, 0xB011}, //775 #HANGUL SYLLABLE SSANGKIYEOK WI NIEUNCIEUC + {0x858C, 0xB012}, //776 #HANGUL SYLLABLE SSANGKIYEOK WI NIEUNHIEUH + {0x858D, 0xB013}, //777 #HANGUL SYLLABLE SSANGKIYEOK WI TIKEUT + {0x858E, 0xB015}, //778 #HANGUL SYLLABLE SSANGKIYEOK WI RIEULKIYEOK + {0x858F, 0xB016}, //779 #HANGUL SYLLABLE SSANGKIYEOK WI RIEULMIEUM + {0x8590, 0xB017}, //780 #HANGUL SYLLABLE SSANGKIYEOK WI RIEULPIEUP + {0x8591, 0xB018}, //781 #HANGUL SYLLABLE SSANGKIYEOK WI RIEULSIOS + {0x8592, 0xB019}, //782 #HANGUL SYLLABLE SSANGKIYEOK WI RIEULTHIEUTH + {0x8593, 0xB01A}, //783 #HANGUL SYLLABLE SSANGKIYEOK WI RIEULPHIEUPH + {0x8594, 0xB01B}, //784 #HANGUL SYLLABLE SSANGKIYEOK WI RIEULHIEUH + {0x8595, 0xB01E}, //785 #HANGUL SYLLABLE SSANGKIYEOK WI PIEUPSIOS + {0x8596, 0xB01F}, //786 #HANGUL SYLLABLE SSANGKIYEOK WI SIOS + {0x8597, 0xB020}, //787 #HANGUL SYLLABLE SSANGKIYEOK WI SSANGSIOS + {0x8598, 0xB021}, //788 #HANGUL SYLLABLE SSANGKIYEOK WI IEUNG + {0x8599, 0xB022}, //789 #HANGUL SYLLABLE SSANGKIYEOK WI CIEUC + {0x859A, 0xB023}, //790 #HANGUL SYLLABLE SSANGKIYEOK WI CHIEUCH + {0x859B, 0xB024}, //791 #HANGUL SYLLABLE SSANGKIYEOK WI KHIEUKH + {0x859C, 0xB025}, //792 #HANGUL SYLLABLE SSANGKIYEOK WI THIEUTH + {0x859D, 0xB026}, //793 #HANGUL SYLLABLE SSANGKIYEOK WI PHIEUPH + {0x859E, 0xB027}, //794 #HANGUL SYLLABLE SSANGKIYEOK WI HIEUH + {0x859F, 0xB029}, //795 #HANGUL SYLLABLE SSANGKIYEOK YU KIYEOK + {0x85A0, 0xB02A}, //796 #HANGUL SYLLABLE SSANGKIYEOK YU SSANGKIYEOK + {0x85A1, 0xB02B}, //797 #HANGUL SYLLABLE SSANGKIYEOK YU KIYEOKSIOS + {0x85A2, 0xB02C}, //798 #HANGUL SYLLABLE SSANGKIYEOK YU NIEUN + {0x85A3, 0xB02D}, //799 #HANGUL SYLLABLE SSANGKIYEOK YU NIEUNCIEUC + {0x85A4, 0xB02E}, //800 #HANGUL SYLLABLE SSANGKIYEOK YU NIEUNHIEUH + {0x85A5, 0xB02F}, //801 #HANGUL SYLLABLE SSANGKIYEOK YU TIKEUT + {0x85A6, 0xB030}, //802 #HANGUL SYLLABLE SSANGKIYEOK YU RIEUL + {0x85A7, 0xB031}, //803 #HANGUL SYLLABLE SSANGKIYEOK YU RIEULKIYEOK + {0x85A8, 0xB032}, //804 #HANGUL SYLLABLE SSANGKIYEOK YU RIEULMIEUM + {0x85A9, 0xB033}, //805 #HANGUL SYLLABLE SSANGKIYEOK YU RIEULPIEUP + {0x85AA, 0xB034}, //806 #HANGUL SYLLABLE SSANGKIYEOK YU RIEULSIOS + {0x85AB, 0xB035}, //807 #HANGUL SYLLABLE SSANGKIYEOK YU RIEULTHIEUTH + {0x85AC, 0xB036}, //808 #HANGUL SYLLABLE SSANGKIYEOK YU RIEULPHIEUPH + {0x85AD, 0xB037}, //809 #HANGUL SYLLABLE SSANGKIYEOK YU RIEULHIEUH + {0x85AE, 0xB038}, //810 #HANGUL SYLLABLE SSANGKIYEOK YU MIEUM + {0x85AF, 0xB039}, //811 #HANGUL SYLLABLE SSANGKIYEOK YU PIEUP + {0x85B0, 0xB03A}, //812 #HANGUL SYLLABLE SSANGKIYEOK YU PIEUPSIOS + {0x85B1, 0xB03B}, //813 #HANGUL SYLLABLE SSANGKIYEOK YU SIOS + {0x85B2, 0xB03C}, //814 #HANGUL SYLLABLE SSANGKIYEOK YU SSANGSIOS + {0x85B3, 0xB03D}, //815 #HANGUL SYLLABLE SSANGKIYEOK YU IEUNG + {0x85B4, 0xB03E}, //816 #HANGUL SYLLABLE SSANGKIYEOK YU CIEUC + {0x85B5, 0xB03F}, //817 #HANGUL SYLLABLE SSANGKIYEOK YU CHIEUCH + {0x85B6, 0xB040}, //818 #HANGUL SYLLABLE SSANGKIYEOK YU KHIEUKH + {0x85B7, 0xB041}, //819 #HANGUL SYLLABLE SSANGKIYEOK YU THIEUTH + {0x85B8, 0xB042}, //820 #HANGUL SYLLABLE SSANGKIYEOK YU PHIEUPH + {0x85B9, 0xB043}, //821 #HANGUL SYLLABLE SSANGKIYEOK YU HIEUH + {0x85BA, 0xB046}, //822 #HANGUL SYLLABLE SSANGKIYEOK EU SSANGKIYEOK + {0x85BB, 0xB047}, //823 #HANGUL SYLLABLE SSANGKIYEOK EU KIYEOKSIOS + {0x85BC, 0xB049}, //824 #HANGUL SYLLABLE SSANGKIYEOK EU NIEUNCIEUC + {0x85BD, 0xB04B}, //825 #HANGUL SYLLABLE SSANGKIYEOK EU TIKEUT + {0x85BE, 0xB04D}, //826 #HANGUL SYLLABLE SSANGKIYEOK EU RIEULKIYEOK + {0x85BF, 0xB04F}, //827 #HANGUL SYLLABLE SSANGKIYEOK EU RIEULPIEUP + {0x85C0, 0xB050}, //828 #HANGUL SYLLABLE SSANGKIYEOK EU RIEULSIOS + {0x85C1, 0xB051}, //829 #HANGUL SYLLABLE SSANGKIYEOK EU RIEULTHIEUTH + {0x85C2, 0xB052}, //830 #HANGUL SYLLABLE SSANGKIYEOK EU RIEULPHIEUPH + {0x85C3, 0xB056}, //831 #HANGUL SYLLABLE SSANGKIYEOK EU PIEUPSIOS + {0x85C4, 0xB058}, //832 #HANGUL SYLLABLE SSANGKIYEOK EU SSANGSIOS + {0x85C5, 0xB05A}, //833 #HANGUL SYLLABLE SSANGKIYEOK EU CIEUC + {0x85C6, 0xB05B}, //834 #HANGUL SYLLABLE SSANGKIYEOK EU CHIEUCH + {0x85C7, 0xB05C}, //835 #HANGUL SYLLABLE SSANGKIYEOK EU KHIEUKH + {0x85C8, 0xB05E}, //836 #HANGUL SYLLABLE SSANGKIYEOK EU PHIEUPH + {0x85C9, 0xB05F}, //837 #HANGUL SYLLABLE SSANGKIYEOK EU HIEUH + {0x85CA, 0xB060}, //838 #HANGUL SYLLABLE SSANGKIYEOK YI + {0x85CB, 0xB061}, //839 #HANGUL SYLLABLE SSANGKIYEOK YI KIYEOK + {0x85CC, 0xB062}, //840 #HANGUL SYLLABLE SSANGKIYEOK YI SSANGKIYEOK + {0x85CD, 0xB063}, //841 #HANGUL SYLLABLE SSANGKIYEOK YI KIYEOKSIOS + {0x85CE, 0xB064}, //842 #HANGUL SYLLABLE SSANGKIYEOK YI NIEUN + {0x85CF, 0xB065}, //843 #HANGUL SYLLABLE SSANGKIYEOK YI NIEUNCIEUC + {0x85D0, 0xB066}, //844 #HANGUL SYLLABLE SSANGKIYEOK YI NIEUNHIEUH + {0x85D1, 0xB067}, //845 #HANGUL SYLLABLE SSANGKIYEOK YI TIKEUT + {0x85D2, 0xB068}, //846 #HANGUL SYLLABLE SSANGKIYEOK YI RIEUL + {0x85D3, 0xB069}, //847 #HANGUL SYLLABLE SSANGKIYEOK YI RIEULKIYEOK + {0x85D4, 0xB06A}, //848 #HANGUL SYLLABLE SSANGKIYEOK YI RIEULMIEUM + {0x85D5, 0xB06B}, //849 #HANGUL SYLLABLE SSANGKIYEOK YI RIEULPIEUP + {0x85D6, 0xB06C}, //850 #HANGUL SYLLABLE SSANGKIYEOK YI RIEULSIOS + {0x85D7, 0xB06D}, //851 #HANGUL SYLLABLE SSANGKIYEOK YI RIEULTHIEUTH + {0x85D8, 0xB06E}, //852 #HANGUL SYLLABLE SSANGKIYEOK YI RIEULPHIEUPH + {0x85D9, 0xB06F}, //853 #HANGUL SYLLABLE SSANGKIYEOK YI RIEULHIEUH + {0x85DA, 0xB070}, //854 #HANGUL SYLLABLE SSANGKIYEOK YI MIEUM + {0x85DB, 0xB071}, //855 #HANGUL SYLLABLE SSANGKIYEOK YI PIEUP + {0x85DC, 0xB072}, //856 #HANGUL SYLLABLE SSANGKIYEOK YI PIEUPSIOS + {0x85DD, 0xB073}, //857 #HANGUL SYLLABLE SSANGKIYEOK YI SIOS + {0x85DE, 0xB074}, //858 #HANGUL SYLLABLE SSANGKIYEOK YI SSANGSIOS + {0x85DF, 0xB075}, //859 #HANGUL SYLLABLE SSANGKIYEOK YI IEUNG + {0x85E0, 0xB076}, //860 #HANGUL SYLLABLE SSANGKIYEOK YI CIEUC + {0x85E1, 0xB077}, //861 #HANGUL SYLLABLE SSANGKIYEOK YI CHIEUCH + {0x85E2, 0xB078}, //862 #HANGUL SYLLABLE SSANGKIYEOK YI KHIEUKH + {0x85E3, 0xB079}, //863 #HANGUL SYLLABLE SSANGKIYEOK YI THIEUTH + {0x85E4, 0xB07A}, //864 #HANGUL SYLLABLE SSANGKIYEOK YI PHIEUPH + {0x85E5, 0xB07B}, //865 #HANGUL SYLLABLE SSANGKIYEOK YI HIEUH + {0x85E6, 0xB07E}, //866 #HANGUL SYLLABLE SSANGKIYEOK I SSANGKIYEOK + {0x85E7, 0xB07F}, //867 #HANGUL SYLLABLE SSANGKIYEOK I KIYEOKSIOS + {0x85E8, 0xB081}, //868 #HANGUL SYLLABLE SSANGKIYEOK I NIEUNCIEUC + {0x85E9, 0xB082}, //869 #HANGUL SYLLABLE SSANGKIYEOK I NIEUNHIEUH + {0x85EA, 0xB083}, //870 #HANGUL SYLLABLE SSANGKIYEOK I TIKEUT + {0x85EB, 0xB085}, //871 #HANGUL SYLLABLE SSANGKIYEOK I RIEULKIYEOK + {0x85EC, 0xB086}, //872 #HANGUL SYLLABLE SSANGKIYEOK I RIEULMIEUM + {0x85ED, 0xB087}, //873 #HANGUL SYLLABLE SSANGKIYEOK I RIEULPIEUP + {0x85EE, 0xB088}, //874 #HANGUL SYLLABLE SSANGKIYEOK I RIEULSIOS + {0x85EF, 0xB089}, //875 #HANGUL SYLLABLE SSANGKIYEOK I RIEULTHIEUTH + {0x85F0, 0xB08A}, //876 #HANGUL SYLLABLE SSANGKIYEOK I RIEULPHIEUPH + {0x85F1, 0xB08B}, //877 #HANGUL SYLLABLE SSANGKIYEOK I RIEULHIEUH + {0x85F2, 0xB08E}, //878 #HANGUL SYLLABLE SSANGKIYEOK I PIEUPSIOS + {0x85F3, 0xB090}, //879 #HANGUL SYLLABLE SSANGKIYEOK I SSANGSIOS + {0x85F4, 0xB092}, //880 #HANGUL SYLLABLE SSANGKIYEOK I CIEUC + {0x85F5, 0xB093}, //881 #HANGUL SYLLABLE SSANGKIYEOK I CHIEUCH + {0x85F6, 0xB094}, //882 #HANGUL SYLLABLE SSANGKIYEOK I KHIEUKH + {0x85F7, 0xB095}, //883 #HANGUL SYLLABLE SSANGKIYEOK I THIEUTH + {0x85F8, 0xB096}, //884 #HANGUL SYLLABLE SSANGKIYEOK I PHIEUPH + {0x85F9, 0xB097}, //885 #HANGUL SYLLABLE SSANGKIYEOK I HIEUH + {0x85FA, 0xB09B}, //886 #HANGUL SYLLABLE NIEUN A KIYEOKSIOS + {0x85FB, 0xB09D}, //887 #HANGUL SYLLABLE NIEUN A NIEUNCIEUC + {0x85FC, 0xB09E}, //888 #HANGUL SYLLABLE NIEUN A NIEUNHIEUH + {0x85FD, 0xB0A3}, //889 #HANGUL SYLLABLE NIEUN A RIEULPIEUP + {0x85FE, 0xB0A4}, //890 #HANGUL SYLLABLE NIEUN A RIEULSIOS + {0x8641, 0xB0A5}, //891 #HANGUL SYLLABLE NIEUN A RIEULTHIEUTH + {0x8642, 0xB0A6}, //892 #HANGUL SYLLABLE NIEUN A RIEULPHIEUPH + {0x8643, 0xB0A7}, //893 #HANGUL SYLLABLE NIEUN A RIEULHIEUH + {0x8644, 0xB0AA}, //894 #HANGUL SYLLABLE NIEUN A PIEUPSIOS + {0x8645, 0xB0B0}, //895 #HANGUL SYLLABLE NIEUN A KHIEUKH + {0x8646, 0xB0B2}, //896 #HANGUL SYLLABLE NIEUN A PHIEUPH + {0x8647, 0xB0B6}, //897 #HANGUL SYLLABLE NIEUN AE SSANGKIYEOK + {0x8648, 0xB0B7}, //898 #HANGUL SYLLABLE NIEUN AE KIYEOKSIOS + {0x8649, 0xB0B9}, //899 #HANGUL SYLLABLE NIEUN AE NIEUNCIEUC + {0x864A, 0xB0BA}, //900 #HANGUL SYLLABLE NIEUN AE NIEUNHIEUH + {0x864B, 0xB0BB}, //901 #HANGUL SYLLABLE NIEUN AE TIKEUT + {0x864C, 0xB0BD}, //902 #HANGUL SYLLABLE NIEUN AE RIEULKIYEOK + {0x864D, 0xB0BE}, //903 #HANGUL SYLLABLE NIEUN AE RIEULMIEUM + {0x864E, 0xB0BF}, //904 #HANGUL SYLLABLE NIEUN AE RIEULPIEUP + {0x864F, 0xB0C0}, //905 #HANGUL SYLLABLE NIEUN AE RIEULSIOS + {0x8650, 0xB0C1}, //906 #HANGUL SYLLABLE NIEUN AE RIEULTHIEUTH + {0x8651, 0xB0C2}, //907 #HANGUL SYLLABLE NIEUN AE RIEULPHIEUPH + {0x8652, 0xB0C3}, //908 #HANGUL SYLLABLE NIEUN AE RIEULHIEUH + {0x8653, 0xB0C6}, //909 #HANGUL SYLLABLE NIEUN AE PIEUPSIOS + {0x8654, 0xB0CA}, //910 #HANGUL SYLLABLE NIEUN AE CIEUC + {0x8655, 0xB0CB}, //911 #HANGUL SYLLABLE NIEUN AE CHIEUCH + {0x8656, 0xB0CC}, //912 #HANGUL SYLLABLE NIEUN AE KHIEUKH + {0x8657, 0xB0CD}, //913 #HANGUL SYLLABLE NIEUN AE THIEUTH + {0x8658, 0xB0CE}, //914 #HANGUL SYLLABLE NIEUN AE PHIEUPH + {0x8659, 0xB0CF}, //915 #HANGUL SYLLABLE NIEUN AE HIEUH + {0x865A, 0xB0D2}, //916 #HANGUL SYLLABLE NIEUN YA SSANGKIYEOK + {0x8661, 0xB0D3}, //917 #HANGUL SYLLABLE NIEUN YA KIYEOKSIOS + {0x8662, 0xB0D5}, //918 #HANGUL SYLLABLE NIEUN YA NIEUNCIEUC + {0x8663, 0xB0D6}, //919 #HANGUL SYLLABLE NIEUN YA NIEUNHIEUH + {0x8664, 0xB0D7}, //920 #HANGUL SYLLABLE NIEUN YA TIKEUT + {0x8665, 0xB0D9}, //921 #HANGUL SYLLABLE NIEUN YA RIEULKIYEOK + {0x8666, 0xB0DA}, //922 #HANGUL SYLLABLE NIEUN YA RIEULMIEUM + {0x8667, 0xB0DB}, //923 #HANGUL SYLLABLE NIEUN YA RIEULPIEUP + {0x8668, 0xB0DC}, //924 #HANGUL SYLLABLE NIEUN YA RIEULSIOS + {0x8669, 0xB0DD}, //925 #HANGUL SYLLABLE NIEUN YA RIEULTHIEUTH + {0x866A, 0xB0DE}, //926 #HANGUL SYLLABLE NIEUN YA RIEULPHIEUPH + {0x866B, 0xB0DF}, //927 #HANGUL SYLLABLE NIEUN YA RIEULHIEUH + {0x866C, 0xB0E1}, //928 #HANGUL SYLLABLE NIEUN YA PIEUP + {0x866D, 0xB0E2}, //929 #HANGUL SYLLABLE NIEUN YA PIEUPSIOS + {0x866E, 0xB0E3}, //930 #HANGUL SYLLABLE NIEUN YA SIOS + {0x866F, 0xB0E4}, //931 #HANGUL SYLLABLE NIEUN YA SSANGSIOS + {0x8670, 0xB0E6}, //932 #HANGUL SYLLABLE NIEUN YA CIEUC + {0x8671, 0xB0E7}, //933 #HANGUL SYLLABLE NIEUN YA CHIEUCH + {0x8672, 0xB0E8}, //934 #HANGUL SYLLABLE NIEUN YA KHIEUKH + {0x8673, 0xB0E9}, //935 #HANGUL SYLLABLE NIEUN YA THIEUTH + {0x8674, 0xB0EA}, //936 #HANGUL SYLLABLE NIEUN YA PHIEUPH + {0x8675, 0xB0EB}, //937 #HANGUL SYLLABLE NIEUN YA HIEUH + {0x8676, 0xB0EC}, //938 #HANGUL SYLLABLE NIEUN YAE + {0x8677, 0xB0ED}, //939 #HANGUL SYLLABLE NIEUN YAE KIYEOK + {0x8678, 0xB0EE}, //940 #HANGUL SYLLABLE NIEUN YAE SSANGKIYEOK + {0x8679, 0xB0EF}, //941 #HANGUL SYLLABLE NIEUN YAE KIYEOKSIOS + {0x867A, 0xB0F0}, //942 #HANGUL SYLLABLE NIEUN YAE NIEUN + {0x8681, 0xB0F1}, //943 #HANGUL SYLLABLE NIEUN YAE NIEUNCIEUC + {0x8682, 0xB0F2}, //944 #HANGUL SYLLABLE NIEUN YAE NIEUNHIEUH + {0x8683, 0xB0F3}, //945 #HANGUL SYLLABLE NIEUN YAE TIKEUT + {0x8684, 0xB0F4}, //946 #HANGUL SYLLABLE NIEUN YAE RIEUL + {0x8685, 0xB0F5}, //947 #HANGUL SYLLABLE NIEUN YAE RIEULKIYEOK + {0x8686, 0xB0F6}, //948 #HANGUL SYLLABLE NIEUN YAE RIEULMIEUM + {0x8687, 0xB0F7}, //949 #HANGUL SYLLABLE NIEUN YAE RIEULPIEUP + {0x8688, 0xB0F8}, //950 #HANGUL SYLLABLE NIEUN YAE RIEULSIOS + {0x8689, 0xB0F9}, //951 #HANGUL SYLLABLE NIEUN YAE RIEULTHIEUTH + {0x868A, 0xB0FA}, //952 #HANGUL SYLLABLE NIEUN YAE RIEULPHIEUPH + {0x868B, 0xB0FB}, //953 #HANGUL SYLLABLE NIEUN YAE RIEULHIEUH + {0x868C, 0xB0FC}, //954 #HANGUL SYLLABLE NIEUN YAE MIEUM + {0x868D, 0xB0FD}, //955 #HANGUL SYLLABLE NIEUN YAE PIEUP + {0x868E, 0xB0FE}, //956 #HANGUL SYLLABLE NIEUN YAE PIEUPSIOS + {0x868F, 0xB0FF}, //957 #HANGUL SYLLABLE NIEUN YAE SIOS + {0x8690, 0xB100}, //958 #HANGUL SYLLABLE NIEUN YAE SSANGSIOS + {0x8691, 0xB101}, //959 #HANGUL SYLLABLE NIEUN YAE IEUNG + {0x8692, 0xB102}, //960 #HANGUL SYLLABLE NIEUN YAE CIEUC + {0x8693, 0xB103}, //961 #HANGUL SYLLABLE NIEUN YAE CHIEUCH + {0x8694, 0xB104}, //962 #HANGUL SYLLABLE NIEUN YAE KHIEUKH + {0x8695, 0xB105}, //963 #HANGUL SYLLABLE NIEUN YAE THIEUTH + {0x8696, 0xB106}, //964 #HANGUL SYLLABLE NIEUN YAE PHIEUPH + {0x8697, 0xB107}, //965 #HANGUL SYLLABLE NIEUN YAE HIEUH + {0x8698, 0xB10A}, //966 #HANGUL SYLLABLE NIEUN EO SSANGKIYEOK + {0x8699, 0xB10D}, //967 #HANGUL SYLLABLE NIEUN EO NIEUNCIEUC + {0x869A, 0xB10E}, //968 #HANGUL SYLLABLE NIEUN EO NIEUNHIEUH + {0x869B, 0xB10F}, //969 #HANGUL SYLLABLE NIEUN EO TIKEUT + {0x869C, 0xB111}, //970 #HANGUL SYLLABLE NIEUN EO RIEULKIYEOK + {0x869D, 0xB114}, //971 #HANGUL SYLLABLE NIEUN EO RIEULSIOS + {0x869E, 0xB115}, //972 #HANGUL SYLLABLE NIEUN EO RIEULTHIEUTH + {0x869F, 0xB116}, //973 #HANGUL SYLLABLE NIEUN EO RIEULPHIEUPH + {0x86A0, 0xB117}, //974 #HANGUL SYLLABLE NIEUN EO RIEULHIEUH + {0x86A1, 0xB11A}, //975 #HANGUL SYLLABLE NIEUN EO PIEUPSIOS + {0x86A2, 0xB11E}, //976 #HANGUL SYLLABLE NIEUN EO CIEUC + {0x86A3, 0xB11F}, //977 #HANGUL SYLLABLE NIEUN EO CHIEUCH + {0x86A4, 0xB120}, //978 #HANGUL SYLLABLE NIEUN EO KHIEUKH + {0x86A5, 0xB121}, //979 #HANGUL SYLLABLE NIEUN EO THIEUTH + {0x86A6, 0xB122}, //980 #HANGUL SYLLABLE NIEUN EO PHIEUPH + {0x86A7, 0xB126}, //981 #HANGUL SYLLABLE NIEUN E SSANGKIYEOK + {0x86A8, 0xB127}, //982 #HANGUL SYLLABLE NIEUN E KIYEOKSIOS + {0x86A9, 0xB129}, //983 #HANGUL SYLLABLE NIEUN E NIEUNCIEUC + {0x86AA, 0xB12A}, //984 #HANGUL SYLLABLE NIEUN E NIEUNHIEUH + {0x86AB, 0xB12B}, //985 #HANGUL SYLLABLE NIEUN E TIKEUT + {0x86AC, 0xB12D}, //986 #HANGUL SYLLABLE NIEUN E RIEULKIYEOK + {0x86AD, 0xB12E}, //987 #HANGUL SYLLABLE NIEUN E RIEULMIEUM + {0x86AE, 0xB12F}, //988 #HANGUL SYLLABLE NIEUN E RIEULPIEUP + {0x86AF, 0xB130}, //989 #HANGUL SYLLABLE NIEUN E RIEULSIOS + {0x86B0, 0xB131}, //990 #HANGUL SYLLABLE NIEUN E RIEULTHIEUTH + {0x86B1, 0xB132}, //991 #HANGUL SYLLABLE NIEUN E RIEULPHIEUPH + {0x86B2, 0xB133}, //992 #HANGUL SYLLABLE NIEUN E RIEULHIEUH + {0x86B3, 0xB136}, //993 #HANGUL SYLLABLE NIEUN E PIEUPSIOS + {0x86B4, 0xB13A}, //994 #HANGUL SYLLABLE NIEUN E CIEUC + {0x86B5, 0xB13B}, //995 #HANGUL SYLLABLE NIEUN E CHIEUCH + {0x86B6, 0xB13C}, //996 #HANGUL SYLLABLE NIEUN E KHIEUKH + {0x86B7, 0xB13D}, //997 #HANGUL SYLLABLE NIEUN E THIEUTH + {0x86B8, 0xB13E}, //998 #HANGUL SYLLABLE NIEUN E PHIEUPH + {0x86B9, 0xB13F}, //999 #HANGUL SYLLABLE NIEUN E HIEUH + {0x86BA, 0xB142}, //1000 #HANGUL SYLLABLE NIEUN YEO SSANGKIYEOK + {0x86BB, 0xB143}, //1001 #HANGUL SYLLABLE NIEUN YEO KIYEOKSIOS + {0x86BC, 0xB145}, //1002 #HANGUL SYLLABLE NIEUN YEO NIEUNCIEUC + {0x86BD, 0xB146}, //1003 #HANGUL SYLLABLE NIEUN YEO NIEUNHIEUH + {0x86BE, 0xB147}, //1004 #HANGUL SYLLABLE NIEUN YEO TIKEUT + {0x86BF, 0xB149}, //1005 #HANGUL SYLLABLE NIEUN YEO RIEULKIYEOK + {0x86C0, 0xB14A}, //1006 #HANGUL SYLLABLE NIEUN YEO RIEULMIEUM + {0x86C1, 0xB14B}, //1007 #HANGUL SYLLABLE NIEUN YEO RIEULPIEUP + {0x86C2, 0xB14C}, //1008 #HANGUL SYLLABLE NIEUN YEO RIEULSIOS + {0x86C3, 0xB14D}, //1009 #HANGUL SYLLABLE NIEUN YEO RIEULTHIEUTH + {0x86C4, 0xB14E}, //1010 #HANGUL SYLLABLE NIEUN YEO RIEULPHIEUPH + {0x86C5, 0xB14F}, //1011 #HANGUL SYLLABLE NIEUN YEO RIEULHIEUH + {0x86C6, 0xB152}, //1012 #HANGUL SYLLABLE NIEUN YEO PIEUPSIOS + {0x86C7, 0xB153}, //1013 #HANGUL SYLLABLE NIEUN YEO SIOS + {0x86C8, 0xB156}, //1014 #HANGUL SYLLABLE NIEUN YEO CIEUC + {0x86C9, 0xB157}, //1015 #HANGUL SYLLABLE NIEUN YEO CHIEUCH + {0x86CA, 0xB159}, //1016 #HANGUL SYLLABLE NIEUN YEO THIEUTH + {0x86CB, 0xB15A}, //1017 #HANGUL SYLLABLE NIEUN YEO PHIEUPH + {0x86CC, 0xB15B}, //1018 #HANGUL SYLLABLE NIEUN YEO HIEUH + {0x86CD, 0xB15D}, //1019 #HANGUL SYLLABLE NIEUN YE KIYEOK + {0x86CE, 0xB15E}, //1020 #HANGUL SYLLABLE NIEUN YE SSANGKIYEOK + {0x86CF, 0xB15F}, //1021 #HANGUL SYLLABLE NIEUN YE KIYEOKSIOS + {0x86D0, 0xB161}, //1022 #HANGUL SYLLABLE NIEUN YE NIEUNCIEUC + {0x86D1, 0xB162}, //1023 #HANGUL SYLLABLE NIEUN YE NIEUNHIEUH + {0x86D2, 0xB163}, //1024 #HANGUL SYLLABLE NIEUN YE TIKEUT + {0x86D3, 0xB164}, //1025 #HANGUL SYLLABLE NIEUN YE RIEUL + {0x86D4, 0xB165}, //1026 #HANGUL SYLLABLE NIEUN YE RIEULKIYEOK + {0x86D5, 0xB166}, //1027 #HANGUL SYLLABLE NIEUN YE RIEULMIEUM + {0x86D6, 0xB167}, //1028 #HANGUL SYLLABLE NIEUN YE RIEULPIEUP + {0x86D7, 0xB168}, //1029 #HANGUL SYLLABLE NIEUN YE RIEULSIOS + {0x86D8, 0xB169}, //1030 #HANGUL SYLLABLE NIEUN YE RIEULTHIEUTH + {0x86D9, 0xB16A}, //1031 #HANGUL SYLLABLE NIEUN YE RIEULPHIEUPH + {0x86DA, 0xB16B}, //1032 #HANGUL SYLLABLE NIEUN YE RIEULHIEUH + {0x86DB, 0xB16C}, //1033 #HANGUL SYLLABLE NIEUN YE MIEUM + {0x86DC, 0xB16D}, //1034 #HANGUL SYLLABLE NIEUN YE PIEUP + {0x86DD, 0xB16E}, //1035 #HANGUL SYLLABLE NIEUN YE PIEUPSIOS + {0x86DE, 0xB16F}, //1036 #HANGUL SYLLABLE NIEUN YE SIOS + {0x86DF, 0xB170}, //1037 #HANGUL SYLLABLE NIEUN YE SSANGSIOS + {0x86E0, 0xB171}, //1038 #HANGUL SYLLABLE NIEUN YE IEUNG + {0x86E1, 0xB172}, //1039 #HANGUL SYLLABLE NIEUN YE CIEUC + {0x86E2, 0xB173}, //1040 #HANGUL SYLLABLE NIEUN YE CHIEUCH + {0x86E3, 0xB174}, //1041 #HANGUL SYLLABLE NIEUN YE KHIEUKH + {0x86E4, 0xB175}, //1042 #HANGUL SYLLABLE NIEUN YE THIEUTH + {0x86E5, 0xB176}, //1043 #HANGUL SYLLABLE NIEUN YE PHIEUPH + {0x86E6, 0xB177}, //1044 #HANGUL SYLLABLE NIEUN YE HIEUH + {0x86E7, 0xB17A}, //1045 #HANGUL SYLLABLE NIEUN O SSANGKIYEOK + {0x86E8, 0xB17B}, //1046 #HANGUL SYLLABLE NIEUN O KIYEOKSIOS + {0x86E9, 0xB17D}, //1047 #HANGUL SYLLABLE NIEUN O NIEUNCIEUC + {0x86EA, 0xB17E}, //1048 #HANGUL SYLLABLE NIEUN O NIEUNHIEUH + {0x86EB, 0xB17F}, //1049 #HANGUL SYLLABLE NIEUN O TIKEUT + {0x86EC, 0xB181}, //1050 #HANGUL SYLLABLE NIEUN O RIEULKIYEOK + {0x86ED, 0xB183}, //1051 #HANGUL SYLLABLE NIEUN O RIEULPIEUP + {0x86EE, 0xB184}, //1052 #HANGUL SYLLABLE NIEUN O RIEULSIOS + {0x86EF, 0xB185}, //1053 #HANGUL SYLLABLE NIEUN O RIEULTHIEUTH + {0x86F0, 0xB186}, //1054 #HANGUL SYLLABLE NIEUN O RIEULPHIEUPH + {0x86F1, 0xB187}, //1055 #HANGUL SYLLABLE NIEUN O RIEULHIEUH + {0x86F2, 0xB18A}, //1056 #HANGUL SYLLABLE NIEUN O PIEUPSIOS + {0x86F3, 0xB18C}, //1057 #HANGUL SYLLABLE NIEUN O SSANGSIOS + {0x86F4, 0xB18E}, //1058 #HANGUL SYLLABLE NIEUN O CIEUC + {0x86F5, 0xB18F}, //1059 #HANGUL SYLLABLE NIEUN O CHIEUCH + {0x86F6, 0xB190}, //1060 #HANGUL SYLLABLE NIEUN O KHIEUKH + {0x86F7, 0xB191}, //1061 #HANGUL SYLLABLE NIEUN O THIEUTH + {0x86F8, 0xB195}, //1062 #HANGUL SYLLABLE NIEUN WA KIYEOK + {0x86F9, 0xB196}, //1063 #HANGUL SYLLABLE NIEUN WA SSANGKIYEOK + {0x86FA, 0xB197}, //1064 #HANGUL SYLLABLE NIEUN WA KIYEOKSIOS + {0x86FB, 0xB199}, //1065 #HANGUL SYLLABLE NIEUN WA NIEUNCIEUC + {0x86FC, 0xB19A}, //1066 #HANGUL SYLLABLE NIEUN WA NIEUNHIEUH + {0x86FD, 0xB19B}, //1067 #HANGUL SYLLABLE NIEUN WA TIKEUT + {0x86FE, 0xB19D}, //1068 #HANGUL SYLLABLE NIEUN WA RIEULKIYEOK + {0x8741, 0xB19E}, //1069 #HANGUL SYLLABLE NIEUN WA RIEULMIEUM + {0x8742, 0xB19F}, //1070 #HANGUL SYLLABLE NIEUN WA RIEULPIEUP + {0x8743, 0xB1A0}, //1071 #HANGUL SYLLABLE NIEUN WA RIEULSIOS + {0x8744, 0xB1A1}, //1072 #HANGUL SYLLABLE NIEUN WA RIEULTHIEUTH + {0x8745, 0xB1A2}, //1073 #HANGUL SYLLABLE NIEUN WA RIEULPHIEUPH + {0x8746, 0xB1A3}, //1074 #HANGUL SYLLABLE NIEUN WA RIEULHIEUH + {0x8747, 0xB1A4}, //1075 #HANGUL SYLLABLE NIEUN WA MIEUM + {0x8748, 0xB1A5}, //1076 #HANGUL SYLLABLE NIEUN WA PIEUP + {0x8749, 0xB1A6}, //1077 #HANGUL SYLLABLE NIEUN WA PIEUPSIOS + {0x874A, 0xB1A7}, //1078 #HANGUL SYLLABLE NIEUN WA SIOS + {0x874B, 0xB1A9}, //1079 #HANGUL SYLLABLE NIEUN WA IEUNG + {0x874C, 0xB1AA}, //1080 #HANGUL SYLLABLE NIEUN WA CIEUC + {0x874D, 0xB1AB}, //1081 #HANGUL SYLLABLE NIEUN WA CHIEUCH + {0x874E, 0xB1AC}, //1082 #HANGUL SYLLABLE NIEUN WA KHIEUKH + {0x874F, 0xB1AD}, //1083 #HANGUL SYLLABLE NIEUN WA THIEUTH + {0x8750, 0xB1AE}, //1084 #HANGUL SYLLABLE NIEUN WA PHIEUPH + {0x8751, 0xB1AF}, //1085 #HANGUL SYLLABLE NIEUN WA HIEUH + {0x8752, 0xB1B0}, //1086 #HANGUL SYLLABLE NIEUN WAE + {0x8753, 0xB1B1}, //1087 #HANGUL SYLLABLE NIEUN WAE KIYEOK + {0x8754, 0xB1B2}, //1088 #HANGUL SYLLABLE NIEUN WAE SSANGKIYEOK + {0x8755, 0xB1B3}, //1089 #HANGUL SYLLABLE NIEUN WAE KIYEOKSIOS + {0x8756, 0xB1B4}, //1090 #HANGUL SYLLABLE NIEUN WAE NIEUN + {0x8757, 0xB1B5}, //1091 #HANGUL SYLLABLE NIEUN WAE NIEUNCIEUC + {0x8758, 0xB1B6}, //1092 #HANGUL SYLLABLE NIEUN WAE NIEUNHIEUH + {0x8759, 0xB1B7}, //1093 #HANGUL SYLLABLE NIEUN WAE TIKEUT + {0x875A, 0xB1B8}, //1094 #HANGUL SYLLABLE NIEUN WAE RIEUL + {0x8761, 0xB1B9}, //1095 #HANGUL SYLLABLE NIEUN WAE RIEULKIYEOK + {0x8762, 0xB1BA}, //1096 #HANGUL SYLLABLE NIEUN WAE RIEULMIEUM + {0x8763, 0xB1BB}, //1097 #HANGUL SYLLABLE NIEUN WAE RIEULPIEUP + {0x8764, 0xB1BC}, //1098 #HANGUL SYLLABLE NIEUN WAE RIEULSIOS + {0x8765, 0xB1BD}, //1099 #HANGUL SYLLABLE NIEUN WAE RIEULTHIEUTH + {0x8766, 0xB1BE}, //1100 #HANGUL SYLLABLE NIEUN WAE RIEULPHIEUPH + {0x8767, 0xB1BF}, //1101 #HANGUL SYLLABLE NIEUN WAE RIEULHIEUH + {0x8768, 0xB1C0}, //1102 #HANGUL SYLLABLE NIEUN WAE MIEUM + {0x8769, 0xB1C1}, //1103 #HANGUL SYLLABLE NIEUN WAE PIEUP + {0x876A, 0xB1C2}, //1104 #HANGUL SYLLABLE NIEUN WAE PIEUPSIOS + {0x876B, 0xB1C3}, //1105 #HANGUL SYLLABLE NIEUN WAE SIOS + {0x876C, 0xB1C4}, //1106 #HANGUL SYLLABLE NIEUN WAE SSANGSIOS + {0x876D, 0xB1C5}, //1107 #HANGUL SYLLABLE NIEUN WAE IEUNG + {0x876E, 0xB1C6}, //1108 #HANGUL SYLLABLE NIEUN WAE CIEUC + {0x876F, 0xB1C7}, //1109 #HANGUL SYLLABLE NIEUN WAE CHIEUCH + {0x8770, 0xB1C8}, //1110 #HANGUL SYLLABLE NIEUN WAE KHIEUKH + {0x8771, 0xB1C9}, //1111 #HANGUL SYLLABLE NIEUN WAE THIEUTH + {0x8772, 0xB1CA}, //1112 #HANGUL SYLLABLE NIEUN WAE PHIEUPH + {0x8773, 0xB1CB}, //1113 #HANGUL SYLLABLE NIEUN WAE HIEUH + {0x8774, 0xB1CD}, //1114 #HANGUL SYLLABLE NIEUN OE KIYEOK + {0x8775, 0xB1CE}, //1115 #HANGUL SYLLABLE NIEUN OE SSANGKIYEOK + {0x8776, 0xB1CF}, //1116 #HANGUL SYLLABLE NIEUN OE KIYEOKSIOS + {0x8777, 0xB1D1}, //1117 #HANGUL SYLLABLE NIEUN OE NIEUNCIEUC + {0x8778, 0xB1D2}, //1118 #HANGUL SYLLABLE NIEUN OE NIEUNHIEUH + {0x8779, 0xB1D3}, //1119 #HANGUL SYLLABLE NIEUN OE TIKEUT + {0x877A, 0xB1D5}, //1120 #HANGUL SYLLABLE NIEUN OE RIEULKIYEOK + {0x8781, 0xB1D6}, //1121 #HANGUL SYLLABLE NIEUN OE RIEULMIEUM + {0x8782, 0xB1D7}, //1122 #HANGUL SYLLABLE NIEUN OE RIEULPIEUP + {0x8783, 0xB1D8}, //1123 #HANGUL SYLLABLE NIEUN OE RIEULSIOS + {0x8784, 0xB1D9}, //1124 #HANGUL SYLLABLE NIEUN OE RIEULTHIEUTH + {0x8785, 0xB1DA}, //1125 #HANGUL SYLLABLE NIEUN OE RIEULPHIEUPH + {0x8786, 0xB1DB}, //1126 #HANGUL SYLLABLE NIEUN OE RIEULHIEUH + {0x8787, 0xB1DE}, //1127 #HANGUL SYLLABLE NIEUN OE PIEUPSIOS + {0x8788, 0xB1E0}, //1128 #HANGUL SYLLABLE NIEUN OE SSANGSIOS + {0x8789, 0xB1E1}, //1129 #HANGUL SYLLABLE NIEUN OE IEUNG + {0x878A, 0xB1E2}, //1130 #HANGUL SYLLABLE NIEUN OE CIEUC + {0x878B, 0xB1E3}, //1131 #HANGUL SYLLABLE NIEUN OE CHIEUCH + {0x878C, 0xB1E4}, //1132 #HANGUL SYLLABLE NIEUN OE KHIEUKH + {0x878D, 0xB1E5}, //1133 #HANGUL SYLLABLE NIEUN OE THIEUTH + {0x878E, 0xB1E6}, //1134 #HANGUL SYLLABLE NIEUN OE PHIEUPH + {0x878F, 0xB1E7}, //1135 #HANGUL SYLLABLE NIEUN OE HIEUH + {0x8790, 0xB1EA}, //1136 #HANGUL SYLLABLE NIEUN YO SSANGKIYEOK + {0x8791, 0xB1EB}, //1137 #HANGUL SYLLABLE NIEUN YO KIYEOKSIOS + {0x8792, 0xB1ED}, //1138 #HANGUL SYLLABLE NIEUN YO NIEUNCIEUC + {0x8793, 0xB1EE}, //1139 #HANGUL SYLLABLE NIEUN YO NIEUNHIEUH + {0x8794, 0xB1EF}, //1140 #HANGUL SYLLABLE NIEUN YO TIKEUT + {0x8795, 0xB1F1}, //1141 #HANGUL SYLLABLE NIEUN YO RIEULKIYEOK + {0x8796, 0xB1F2}, //1142 #HANGUL SYLLABLE NIEUN YO RIEULMIEUM + {0x8797, 0xB1F3}, //1143 #HANGUL SYLLABLE NIEUN YO RIEULPIEUP + {0x8798, 0xB1F4}, //1144 #HANGUL SYLLABLE NIEUN YO RIEULSIOS + {0x8799, 0xB1F5}, //1145 #HANGUL SYLLABLE NIEUN YO RIEULTHIEUTH + {0x879A, 0xB1F6}, //1146 #HANGUL SYLLABLE NIEUN YO RIEULPHIEUPH + {0x879B, 0xB1F7}, //1147 #HANGUL SYLLABLE NIEUN YO RIEULHIEUH + {0x879C, 0xB1F8}, //1148 #HANGUL SYLLABLE NIEUN YO MIEUM + {0x879D, 0xB1FA}, //1149 #HANGUL SYLLABLE NIEUN YO PIEUPSIOS + {0x879E, 0xB1FC}, //1150 #HANGUL SYLLABLE NIEUN YO SSANGSIOS + {0x879F, 0xB1FE}, //1151 #HANGUL SYLLABLE NIEUN YO CIEUC + {0x87A0, 0xB1FF}, //1152 #HANGUL SYLLABLE NIEUN YO CHIEUCH + {0x87A1, 0xB200}, //1153 #HANGUL SYLLABLE NIEUN YO KHIEUKH + {0x87A2, 0xB201}, //1154 #HANGUL SYLLABLE NIEUN YO THIEUTH + {0x87A3, 0xB202}, //1155 #HANGUL SYLLABLE NIEUN YO PHIEUPH + {0x87A4, 0xB203}, //1156 #HANGUL SYLLABLE NIEUN YO HIEUH + {0x87A5, 0xB206}, //1157 #HANGUL SYLLABLE NIEUN U SSANGKIYEOK + {0x87A6, 0xB207}, //1158 #HANGUL SYLLABLE NIEUN U KIYEOKSIOS + {0x87A7, 0xB209}, //1159 #HANGUL SYLLABLE NIEUN U NIEUNCIEUC + {0x87A8, 0xB20A}, //1160 #HANGUL SYLLABLE NIEUN U NIEUNHIEUH + {0x87A9, 0xB20D}, //1161 #HANGUL SYLLABLE NIEUN U RIEULKIYEOK + {0x87AA, 0xB20E}, //1162 #HANGUL SYLLABLE NIEUN U RIEULMIEUM + {0x87AB, 0xB20F}, //1163 #HANGUL SYLLABLE NIEUN U RIEULPIEUP + {0x87AC, 0xB210}, //1164 #HANGUL SYLLABLE NIEUN U RIEULSIOS + {0x87AD, 0xB211}, //1165 #HANGUL SYLLABLE NIEUN U RIEULTHIEUTH + {0x87AE, 0xB212}, //1166 #HANGUL SYLLABLE NIEUN U RIEULPHIEUPH + {0x87AF, 0xB213}, //1167 #HANGUL SYLLABLE NIEUN U RIEULHIEUH + {0x87B0, 0xB216}, //1168 #HANGUL SYLLABLE NIEUN U PIEUPSIOS + {0x87B1, 0xB218}, //1169 #HANGUL SYLLABLE NIEUN U SSANGSIOS + {0x87B2, 0xB21A}, //1170 #HANGUL SYLLABLE NIEUN U CIEUC + {0x87B3, 0xB21B}, //1171 #HANGUL SYLLABLE NIEUN U CHIEUCH + {0x87B4, 0xB21C}, //1172 #HANGUL SYLLABLE NIEUN U KHIEUKH + {0x87B5, 0xB21D}, //1173 #HANGUL SYLLABLE NIEUN U THIEUTH + {0x87B6, 0xB21E}, //1174 #HANGUL SYLLABLE NIEUN U PHIEUPH + {0x87B7, 0xB21F}, //1175 #HANGUL SYLLABLE NIEUN U HIEUH + {0x87B8, 0xB221}, //1176 #HANGUL SYLLABLE NIEUN WEO KIYEOK + {0x87B9, 0xB222}, //1177 #HANGUL SYLLABLE NIEUN WEO SSANGKIYEOK + {0x87BA, 0xB223}, //1178 #HANGUL SYLLABLE NIEUN WEO KIYEOKSIOS + {0x87BB, 0xB224}, //1179 #HANGUL SYLLABLE NIEUN WEO NIEUN + {0x87BC, 0xB225}, //1180 #HANGUL SYLLABLE NIEUN WEO NIEUNCIEUC + {0x87BD, 0xB226}, //1181 #HANGUL SYLLABLE NIEUN WEO NIEUNHIEUH + {0x87BE, 0xB227}, //1182 #HANGUL SYLLABLE NIEUN WEO TIKEUT + {0x87BF, 0xB228}, //1183 #HANGUL SYLLABLE NIEUN WEO RIEUL + {0x87C0, 0xB229}, //1184 #HANGUL SYLLABLE NIEUN WEO RIEULKIYEOK + {0x87C1, 0xB22A}, //1185 #HANGUL SYLLABLE NIEUN WEO RIEULMIEUM + {0x87C2, 0xB22B}, //1186 #HANGUL SYLLABLE NIEUN WEO RIEULPIEUP + {0x87C3, 0xB22C}, //1187 #HANGUL SYLLABLE NIEUN WEO RIEULSIOS + {0x87C4, 0xB22D}, //1188 #HANGUL SYLLABLE NIEUN WEO RIEULTHIEUTH + {0x87C5, 0xB22E}, //1189 #HANGUL SYLLABLE NIEUN WEO RIEULPHIEUPH + {0x87C6, 0xB22F}, //1190 #HANGUL SYLLABLE NIEUN WEO RIEULHIEUH + {0x87C7, 0xB230}, //1191 #HANGUL SYLLABLE NIEUN WEO MIEUM + {0x87C8, 0xB231}, //1192 #HANGUL SYLLABLE NIEUN WEO PIEUP + {0x87C9, 0xB232}, //1193 #HANGUL SYLLABLE NIEUN WEO PIEUPSIOS + {0x87CA, 0xB233}, //1194 #HANGUL SYLLABLE NIEUN WEO SIOS + {0x87CB, 0xB235}, //1195 #HANGUL SYLLABLE NIEUN WEO IEUNG + {0x87CC, 0xB236}, //1196 #HANGUL SYLLABLE NIEUN WEO CIEUC + {0x87CD, 0xB237}, //1197 #HANGUL SYLLABLE NIEUN WEO CHIEUCH + {0x87CE, 0xB238}, //1198 #HANGUL SYLLABLE NIEUN WEO KHIEUKH + {0x87CF, 0xB239}, //1199 #HANGUL SYLLABLE NIEUN WEO THIEUTH + {0x87D0, 0xB23A}, //1200 #HANGUL SYLLABLE NIEUN WEO PHIEUPH + {0x87D1, 0xB23B}, //1201 #HANGUL SYLLABLE NIEUN WEO HIEUH + {0x87D2, 0xB23D}, //1202 #HANGUL SYLLABLE NIEUN WE KIYEOK + {0x87D3, 0xB23E}, //1203 #HANGUL SYLLABLE NIEUN WE SSANGKIYEOK + {0x87D4, 0xB23F}, //1204 #HANGUL SYLLABLE NIEUN WE KIYEOKSIOS + {0x87D5, 0xB240}, //1205 #HANGUL SYLLABLE NIEUN WE NIEUN + {0x87D6, 0xB241}, //1206 #HANGUL SYLLABLE NIEUN WE NIEUNCIEUC + {0x87D7, 0xB242}, //1207 #HANGUL SYLLABLE NIEUN WE NIEUNHIEUH + {0x87D8, 0xB243}, //1208 #HANGUL SYLLABLE NIEUN WE TIKEUT + {0x87D9, 0xB244}, //1209 #HANGUL SYLLABLE NIEUN WE RIEUL + {0x87DA, 0xB245}, //1210 #HANGUL SYLLABLE NIEUN WE RIEULKIYEOK + {0x87DB, 0xB246}, //1211 #HANGUL SYLLABLE NIEUN WE RIEULMIEUM + {0x87DC, 0xB247}, //1212 #HANGUL SYLLABLE NIEUN WE RIEULPIEUP + {0x87DD, 0xB248}, //1213 #HANGUL SYLLABLE NIEUN WE RIEULSIOS + {0x87DE, 0xB249}, //1214 #HANGUL SYLLABLE NIEUN WE RIEULTHIEUTH + {0x87DF, 0xB24A}, //1215 #HANGUL SYLLABLE NIEUN WE RIEULPHIEUPH + {0x87E0, 0xB24B}, //1216 #HANGUL SYLLABLE NIEUN WE RIEULHIEUH + {0x87E1, 0xB24C}, //1217 #HANGUL SYLLABLE NIEUN WE MIEUM + {0x87E2, 0xB24D}, //1218 #HANGUL SYLLABLE NIEUN WE PIEUP + {0x87E3, 0xB24E}, //1219 #HANGUL SYLLABLE NIEUN WE PIEUPSIOS + {0x87E4, 0xB24F}, //1220 #HANGUL SYLLABLE NIEUN WE SIOS + {0x87E5, 0xB250}, //1221 #HANGUL SYLLABLE NIEUN WE SSANGSIOS + {0x87E6, 0xB251}, //1222 #HANGUL SYLLABLE NIEUN WE IEUNG + {0x87E7, 0xB252}, //1223 #HANGUL SYLLABLE NIEUN WE CIEUC + {0x87E8, 0xB253}, //1224 #HANGUL SYLLABLE NIEUN WE CHIEUCH + {0x87E9, 0xB254}, //1225 #HANGUL SYLLABLE NIEUN WE KHIEUKH + {0x87EA, 0xB255}, //1226 #HANGUL SYLLABLE NIEUN WE THIEUTH + {0x87EB, 0xB256}, //1227 #HANGUL SYLLABLE NIEUN WE PHIEUPH + {0x87EC, 0xB257}, //1228 #HANGUL SYLLABLE NIEUN WE HIEUH + {0x87ED, 0xB259}, //1229 #HANGUL SYLLABLE NIEUN WI KIYEOK + {0x87EE, 0xB25A}, //1230 #HANGUL SYLLABLE NIEUN WI SSANGKIYEOK + {0x87EF, 0xB25B}, //1231 #HANGUL SYLLABLE NIEUN WI KIYEOKSIOS + {0x87F0, 0xB25D}, //1232 #HANGUL SYLLABLE NIEUN WI NIEUNCIEUC + {0x87F1, 0xB25E}, //1233 #HANGUL SYLLABLE NIEUN WI NIEUNHIEUH + {0x87F2, 0xB25F}, //1234 #HANGUL SYLLABLE NIEUN WI TIKEUT + {0x87F3, 0xB261}, //1235 #HANGUL SYLLABLE NIEUN WI RIEULKIYEOK + {0x87F4, 0xB262}, //1236 #HANGUL SYLLABLE NIEUN WI RIEULMIEUM + {0x87F5, 0xB263}, //1237 #HANGUL SYLLABLE NIEUN WI RIEULPIEUP + {0x87F6, 0xB264}, //1238 #HANGUL SYLLABLE NIEUN WI RIEULSIOS + {0x87F7, 0xB265}, //1239 #HANGUL SYLLABLE NIEUN WI RIEULTHIEUTH + {0x87F8, 0xB266}, //1240 #HANGUL SYLLABLE NIEUN WI RIEULPHIEUPH + {0x87F9, 0xB267}, //1241 #HANGUL SYLLABLE NIEUN WI RIEULHIEUH + {0x87FA, 0xB26A}, //1242 #HANGUL SYLLABLE NIEUN WI PIEUPSIOS + {0x87FB, 0xB26B}, //1243 #HANGUL SYLLABLE NIEUN WI SIOS + {0x87FC, 0xB26C}, //1244 #HANGUL SYLLABLE NIEUN WI SSANGSIOS + {0x87FD, 0xB26D}, //1245 #HANGUL SYLLABLE NIEUN WI IEUNG + {0x87FE, 0xB26E}, //1246 #HANGUL SYLLABLE NIEUN WI CIEUC + {0x8841, 0xB26F}, //1247 #HANGUL SYLLABLE NIEUN WI CHIEUCH + {0x8842, 0xB270}, //1248 #HANGUL SYLLABLE NIEUN WI KHIEUKH + {0x8843, 0xB271}, //1249 #HANGUL SYLLABLE NIEUN WI THIEUTH + {0x8844, 0xB272}, //1250 #HANGUL SYLLABLE NIEUN WI PHIEUPH + {0x8845, 0xB273}, //1251 #HANGUL SYLLABLE NIEUN WI HIEUH + {0x8846, 0xB276}, //1252 #HANGUL SYLLABLE NIEUN YU SSANGKIYEOK + {0x8847, 0xB277}, //1253 #HANGUL SYLLABLE NIEUN YU KIYEOKSIOS + {0x8848, 0xB278}, //1254 #HANGUL SYLLABLE NIEUN YU NIEUN + {0x8849, 0xB279}, //1255 #HANGUL SYLLABLE NIEUN YU NIEUNCIEUC + {0x884A, 0xB27A}, //1256 #HANGUL SYLLABLE NIEUN YU NIEUNHIEUH + {0x884B, 0xB27B}, //1257 #HANGUL SYLLABLE NIEUN YU TIKEUT + {0x884C, 0xB27D}, //1258 #HANGUL SYLLABLE NIEUN YU RIEULKIYEOK + {0x884D, 0xB27E}, //1259 #HANGUL SYLLABLE NIEUN YU RIEULMIEUM + {0x884E, 0xB27F}, //1260 #HANGUL SYLLABLE NIEUN YU RIEULPIEUP + {0x884F, 0xB280}, //1261 #HANGUL SYLLABLE NIEUN YU RIEULSIOS + {0x8850, 0xB281}, //1262 #HANGUL SYLLABLE NIEUN YU RIEULTHIEUTH + {0x8851, 0xB282}, //1263 #HANGUL SYLLABLE NIEUN YU RIEULPHIEUPH + {0x8852, 0xB283}, //1264 #HANGUL SYLLABLE NIEUN YU RIEULHIEUH + {0x8853, 0xB286}, //1265 #HANGUL SYLLABLE NIEUN YU PIEUPSIOS + {0x8854, 0xB287}, //1266 #HANGUL SYLLABLE NIEUN YU SIOS + {0x8855, 0xB288}, //1267 #HANGUL SYLLABLE NIEUN YU SSANGSIOS + {0x8856, 0xB28A}, //1268 #HANGUL SYLLABLE NIEUN YU CIEUC + {0x8857, 0xB28B}, //1269 #HANGUL SYLLABLE NIEUN YU CHIEUCH + {0x8858, 0xB28C}, //1270 #HANGUL SYLLABLE NIEUN YU KHIEUKH + {0x8859, 0xB28D}, //1271 #HANGUL SYLLABLE NIEUN YU THIEUTH + {0x885A, 0xB28E}, //1272 #HANGUL SYLLABLE NIEUN YU PHIEUPH + {0x8861, 0xB28F}, //1273 #HANGUL SYLLABLE NIEUN YU HIEUH + {0x8862, 0xB292}, //1274 #HANGUL SYLLABLE NIEUN EU SSANGKIYEOK + {0x8863, 0xB293}, //1275 #HANGUL SYLLABLE NIEUN EU KIYEOKSIOS + {0x8864, 0xB295}, //1276 #HANGUL SYLLABLE NIEUN EU NIEUNCIEUC + {0x8865, 0xB296}, //1277 #HANGUL SYLLABLE NIEUN EU NIEUNHIEUH + {0x8866, 0xB297}, //1278 #HANGUL SYLLABLE NIEUN EU TIKEUT + {0x8867, 0xB29B}, //1279 #HANGUL SYLLABLE NIEUN EU RIEULPIEUP + {0x8868, 0xB29C}, //1280 #HANGUL SYLLABLE NIEUN EU RIEULSIOS + {0x8869, 0xB29D}, //1281 #HANGUL SYLLABLE NIEUN EU RIEULTHIEUTH + {0x886A, 0xB29E}, //1282 #HANGUL SYLLABLE NIEUN EU RIEULPHIEUPH + {0x886B, 0xB29F}, //1283 #HANGUL SYLLABLE NIEUN EU RIEULHIEUH + {0x886C, 0xB2A2}, //1284 #HANGUL SYLLABLE NIEUN EU PIEUPSIOS + {0x886D, 0xB2A4}, //1285 #HANGUL SYLLABLE NIEUN EU SSANGSIOS + {0x886E, 0xB2A7}, //1286 #HANGUL SYLLABLE NIEUN EU CHIEUCH + {0x886F, 0xB2A8}, //1287 #HANGUL SYLLABLE NIEUN EU KHIEUKH + {0x8870, 0xB2A9}, //1288 #HANGUL SYLLABLE NIEUN EU THIEUTH + {0x8871, 0xB2AB}, //1289 #HANGUL SYLLABLE NIEUN EU HIEUH + {0x8872, 0xB2AD}, //1290 #HANGUL SYLLABLE NIEUN YI KIYEOK + {0x8873, 0xB2AE}, //1291 #HANGUL SYLLABLE NIEUN YI SSANGKIYEOK + {0x8874, 0xB2AF}, //1292 #HANGUL SYLLABLE NIEUN YI KIYEOKSIOS + {0x8875, 0xB2B1}, //1293 #HANGUL SYLLABLE NIEUN YI NIEUNCIEUC + {0x8876, 0xB2B2}, //1294 #HANGUL SYLLABLE NIEUN YI NIEUNHIEUH + {0x8877, 0xB2B3}, //1295 #HANGUL SYLLABLE NIEUN YI TIKEUT + {0x8878, 0xB2B5}, //1296 #HANGUL SYLLABLE NIEUN YI RIEULKIYEOK + {0x8879, 0xB2B6}, //1297 #HANGUL SYLLABLE NIEUN YI RIEULMIEUM + {0x887A, 0xB2B7}, //1298 #HANGUL SYLLABLE NIEUN YI RIEULPIEUP + {0x8881, 0xB2B8}, //1299 #HANGUL SYLLABLE NIEUN YI RIEULSIOS + {0x8882, 0xB2B9}, //1300 #HANGUL SYLLABLE NIEUN YI RIEULTHIEUTH + {0x8883, 0xB2BA}, //1301 #HANGUL SYLLABLE NIEUN YI RIEULPHIEUPH + {0x8884, 0xB2BB}, //1302 #HANGUL SYLLABLE NIEUN YI RIEULHIEUH + {0x8885, 0xB2BC}, //1303 #HANGUL SYLLABLE NIEUN YI MIEUM + {0x8886, 0xB2BD}, //1304 #HANGUL SYLLABLE NIEUN YI PIEUP + {0x8887, 0xB2BE}, //1305 #HANGUL SYLLABLE NIEUN YI PIEUPSIOS + {0x8888, 0xB2BF}, //1306 #HANGUL SYLLABLE NIEUN YI SIOS + {0x8889, 0xB2C0}, //1307 #HANGUL SYLLABLE NIEUN YI SSANGSIOS + {0x888A, 0xB2C1}, //1308 #HANGUL SYLLABLE NIEUN YI IEUNG + {0x888B, 0xB2C2}, //1309 #HANGUL SYLLABLE NIEUN YI CIEUC + {0x888C, 0xB2C3}, //1310 #HANGUL SYLLABLE NIEUN YI CHIEUCH + {0x888D, 0xB2C4}, //1311 #HANGUL SYLLABLE NIEUN YI KHIEUKH + {0x888E, 0xB2C5}, //1312 #HANGUL SYLLABLE NIEUN YI THIEUTH + {0x888F, 0xB2C6}, //1313 #HANGUL SYLLABLE NIEUN YI PHIEUPH + {0x8890, 0xB2C7}, //1314 #HANGUL SYLLABLE NIEUN YI HIEUH + {0x8891, 0xB2CA}, //1315 #HANGUL SYLLABLE NIEUN I SSANGKIYEOK + {0x8892, 0xB2CB}, //1316 #HANGUL SYLLABLE NIEUN I KIYEOKSIOS + {0x8893, 0xB2CD}, //1317 #HANGUL SYLLABLE NIEUN I NIEUNCIEUC + {0x8894, 0xB2CE}, //1318 #HANGUL SYLLABLE NIEUN I NIEUNHIEUH + {0x8895, 0xB2CF}, //1319 #HANGUL SYLLABLE NIEUN I TIKEUT + {0x8896, 0xB2D1}, //1320 #HANGUL SYLLABLE NIEUN I RIEULKIYEOK + {0x8897, 0xB2D3}, //1321 #HANGUL SYLLABLE NIEUN I RIEULPIEUP + {0x8898, 0xB2D4}, //1322 #HANGUL SYLLABLE NIEUN I RIEULSIOS + {0x8899, 0xB2D5}, //1323 #HANGUL SYLLABLE NIEUN I RIEULTHIEUTH + {0x889A, 0xB2D6}, //1324 #HANGUL SYLLABLE NIEUN I RIEULPHIEUPH + {0x889B, 0xB2D7}, //1325 #HANGUL SYLLABLE NIEUN I RIEULHIEUH + {0x889C, 0xB2DA}, //1326 #HANGUL SYLLABLE NIEUN I PIEUPSIOS + {0x889D, 0xB2DC}, //1327 #HANGUL SYLLABLE NIEUN I SSANGSIOS + {0x889E, 0xB2DE}, //1328 #HANGUL SYLLABLE NIEUN I CIEUC + {0x889F, 0xB2DF}, //1329 #HANGUL SYLLABLE NIEUN I CHIEUCH + {0x88A0, 0xB2E0}, //1330 #HANGUL SYLLABLE NIEUN I KHIEUKH + {0x88A1, 0xB2E1}, //1331 #HANGUL SYLLABLE NIEUN I THIEUTH + {0x88A2, 0xB2E3}, //1332 #HANGUL SYLLABLE NIEUN I HIEUH + {0x88A3, 0xB2E7}, //1333 #HANGUL SYLLABLE TIKEUT A KIYEOKSIOS + {0x88A4, 0xB2E9}, //1334 #HANGUL SYLLABLE TIKEUT A NIEUNCIEUC + {0x88A5, 0xB2EA}, //1335 #HANGUL SYLLABLE TIKEUT A NIEUNHIEUH + {0x88A6, 0xB2F0}, //1336 #HANGUL SYLLABLE TIKEUT A RIEULSIOS + {0x88A7, 0xB2F1}, //1337 #HANGUL SYLLABLE TIKEUT A RIEULTHIEUTH + {0x88A8, 0xB2F2}, //1338 #HANGUL SYLLABLE TIKEUT A RIEULPHIEUPH + {0x88A9, 0xB2F6}, //1339 #HANGUL SYLLABLE TIKEUT A PIEUPSIOS + {0x88AA, 0xB2FC}, //1340 #HANGUL SYLLABLE TIKEUT A KHIEUKH + {0x88AB, 0xB2FD}, //1341 #HANGUL SYLLABLE TIKEUT A THIEUTH + {0x88AC, 0xB2FE}, //1342 #HANGUL SYLLABLE TIKEUT A PHIEUPH + {0x88AD, 0xB302}, //1343 #HANGUL SYLLABLE TIKEUT AE SSANGKIYEOK + {0x88AE, 0xB303}, //1344 #HANGUL SYLLABLE TIKEUT AE KIYEOKSIOS + {0x88AF, 0xB305}, //1345 #HANGUL SYLLABLE TIKEUT AE NIEUNCIEUC + {0x88B0, 0xB306}, //1346 #HANGUL SYLLABLE TIKEUT AE NIEUNHIEUH + {0x88B1, 0xB307}, //1347 #HANGUL SYLLABLE TIKEUT AE TIKEUT + {0x88B2, 0xB309}, //1348 #HANGUL SYLLABLE TIKEUT AE RIEULKIYEOK + {0x88B3, 0xB30A}, //1349 #HANGUL SYLLABLE TIKEUT AE RIEULMIEUM + {0x88B4, 0xB30B}, //1350 #HANGUL SYLLABLE TIKEUT AE RIEULPIEUP + {0x88B5, 0xB30C}, //1351 #HANGUL SYLLABLE TIKEUT AE RIEULSIOS + {0x88B6, 0xB30D}, //1352 #HANGUL SYLLABLE TIKEUT AE RIEULTHIEUTH + {0x88B7, 0xB30E}, //1353 #HANGUL SYLLABLE TIKEUT AE RIEULPHIEUPH + {0x88B8, 0xB30F}, //1354 #HANGUL SYLLABLE TIKEUT AE RIEULHIEUH + {0x88B9, 0xB312}, //1355 #HANGUL SYLLABLE TIKEUT AE PIEUPSIOS + {0x88BA, 0xB316}, //1356 #HANGUL SYLLABLE TIKEUT AE CIEUC + {0x88BB, 0xB317}, //1357 #HANGUL SYLLABLE TIKEUT AE CHIEUCH + {0x88BC, 0xB318}, //1358 #HANGUL SYLLABLE TIKEUT AE KHIEUKH + {0x88BD, 0xB319}, //1359 #HANGUL SYLLABLE TIKEUT AE THIEUTH + {0x88BE, 0xB31A}, //1360 #HANGUL SYLLABLE TIKEUT AE PHIEUPH + {0x88BF, 0xB31B}, //1361 #HANGUL SYLLABLE TIKEUT AE HIEUH + {0x88C0, 0xB31D}, //1362 #HANGUL SYLLABLE TIKEUT YA KIYEOK + {0x88C1, 0xB31E}, //1363 #HANGUL SYLLABLE TIKEUT YA SSANGKIYEOK + {0x88C2, 0xB31F}, //1364 #HANGUL SYLLABLE TIKEUT YA KIYEOKSIOS + {0x88C3, 0xB320}, //1365 #HANGUL SYLLABLE TIKEUT YA NIEUN + {0x88C4, 0xB321}, //1366 #HANGUL SYLLABLE TIKEUT YA NIEUNCIEUC + {0x88C5, 0xB322}, //1367 #HANGUL SYLLABLE TIKEUT YA NIEUNHIEUH + {0x88C6, 0xB323}, //1368 #HANGUL SYLLABLE TIKEUT YA TIKEUT + {0x88C7, 0xB324}, //1369 #HANGUL SYLLABLE TIKEUT YA RIEUL + {0x88C8, 0xB325}, //1370 #HANGUL SYLLABLE TIKEUT YA RIEULKIYEOK + {0x88C9, 0xB326}, //1371 #HANGUL SYLLABLE TIKEUT YA RIEULMIEUM + {0x88CA, 0xB327}, //1372 #HANGUL SYLLABLE TIKEUT YA RIEULPIEUP + {0x88CB, 0xB328}, //1373 #HANGUL SYLLABLE TIKEUT YA RIEULSIOS + {0x88CC, 0xB329}, //1374 #HANGUL SYLLABLE TIKEUT YA RIEULTHIEUTH + {0x88CD, 0xB32A}, //1375 #HANGUL SYLLABLE TIKEUT YA RIEULPHIEUPH + {0x88CE, 0xB32B}, //1376 #HANGUL SYLLABLE TIKEUT YA RIEULHIEUH + {0x88CF, 0xB32C}, //1377 #HANGUL SYLLABLE TIKEUT YA MIEUM + {0x88D0, 0xB32D}, //1378 #HANGUL SYLLABLE TIKEUT YA PIEUP + {0x88D1, 0xB32E}, //1379 #HANGUL SYLLABLE TIKEUT YA PIEUPSIOS + {0x88D2, 0xB32F}, //1380 #HANGUL SYLLABLE TIKEUT YA SIOS + {0x88D3, 0xB330}, //1381 #HANGUL SYLLABLE TIKEUT YA SSANGSIOS + {0x88D4, 0xB331}, //1382 #HANGUL SYLLABLE TIKEUT YA IEUNG + {0x88D5, 0xB332}, //1383 #HANGUL SYLLABLE TIKEUT YA CIEUC + {0x88D6, 0xB333}, //1384 #HANGUL SYLLABLE TIKEUT YA CHIEUCH + {0x88D7, 0xB334}, //1385 #HANGUL SYLLABLE TIKEUT YA KHIEUKH + {0x88D8, 0xB335}, //1386 #HANGUL SYLLABLE TIKEUT YA THIEUTH + {0x88D9, 0xB336}, //1387 #HANGUL SYLLABLE TIKEUT YA PHIEUPH + {0x88DA, 0xB337}, //1388 #HANGUL SYLLABLE TIKEUT YA HIEUH + {0x88DB, 0xB338}, //1389 #HANGUL SYLLABLE TIKEUT YAE + {0x88DC, 0xB339}, //1390 #HANGUL SYLLABLE TIKEUT YAE KIYEOK + {0x88DD, 0xB33A}, //1391 #HANGUL SYLLABLE TIKEUT YAE SSANGKIYEOK + {0x88DE, 0xB33B}, //1392 #HANGUL SYLLABLE TIKEUT YAE KIYEOKSIOS + {0x88DF, 0xB33C}, //1393 #HANGUL SYLLABLE TIKEUT YAE NIEUN + {0x88E0, 0xB33D}, //1394 #HANGUL SYLLABLE TIKEUT YAE NIEUNCIEUC + {0x88E1, 0xB33E}, //1395 #HANGUL SYLLABLE TIKEUT YAE NIEUNHIEUH + {0x88E2, 0xB33F}, //1396 #HANGUL SYLLABLE TIKEUT YAE TIKEUT + {0x88E3, 0xB340}, //1397 #HANGUL SYLLABLE TIKEUT YAE RIEUL + {0x88E4, 0xB341}, //1398 #HANGUL SYLLABLE TIKEUT YAE RIEULKIYEOK + {0x88E5, 0xB342}, //1399 #HANGUL SYLLABLE TIKEUT YAE RIEULMIEUM + {0x88E6, 0xB343}, //1400 #HANGUL SYLLABLE TIKEUT YAE RIEULPIEUP + {0x88E7, 0xB344}, //1401 #HANGUL SYLLABLE TIKEUT YAE RIEULSIOS + {0x88E8, 0xB345}, //1402 #HANGUL SYLLABLE TIKEUT YAE RIEULTHIEUTH + {0x88E9, 0xB346}, //1403 #HANGUL SYLLABLE TIKEUT YAE RIEULPHIEUPH + {0x88EA, 0xB347}, //1404 #HANGUL SYLLABLE TIKEUT YAE RIEULHIEUH + {0x88EB, 0xB348}, //1405 #HANGUL SYLLABLE TIKEUT YAE MIEUM + {0x88EC, 0xB349}, //1406 #HANGUL SYLLABLE TIKEUT YAE PIEUP + {0x88ED, 0xB34A}, //1407 #HANGUL SYLLABLE TIKEUT YAE PIEUPSIOS + {0x88EE, 0xB34B}, //1408 #HANGUL SYLLABLE TIKEUT YAE SIOS + {0x88EF, 0xB34C}, //1409 #HANGUL SYLLABLE TIKEUT YAE SSANGSIOS + {0x88F0, 0xB34D}, //1410 #HANGUL SYLLABLE TIKEUT YAE IEUNG + {0x88F1, 0xB34E}, //1411 #HANGUL SYLLABLE TIKEUT YAE CIEUC + {0x88F2, 0xB34F}, //1412 #HANGUL SYLLABLE TIKEUT YAE CHIEUCH + {0x88F3, 0xB350}, //1413 #HANGUL SYLLABLE TIKEUT YAE KHIEUKH + {0x88F4, 0xB351}, //1414 #HANGUL SYLLABLE TIKEUT YAE THIEUTH + {0x88F5, 0xB352}, //1415 #HANGUL SYLLABLE TIKEUT YAE PHIEUPH + {0x88F6, 0xB353}, //1416 #HANGUL SYLLABLE TIKEUT YAE HIEUH + {0x88F7, 0xB357}, //1417 #HANGUL SYLLABLE TIKEUT EO KIYEOKSIOS + {0x88F8, 0xB359}, //1418 #HANGUL SYLLABLE TIKEUT EO NIEUNCIEUC + {0x88F9, 0xB35A}, //1419 #HANGUL SYLLABLE TIKEUT EO NIEUNHIEUH + {0x88FA, 0xB35D}, //1420 #HANGUL SYLLABLE TIKEUT EO RIEULKIYEOK + {0x88FB, 0xB360}, //1421 #HANGUL SYLLABLE TIKEUT EO RIEULSIOS + {0x88FC, 0xB361}, //1422 #HANGUL SYLLABLE TIKEUT EO RIEULTHIEUTH + {0x88FD, 0xB362}, //1423 #HANGUL SYLLABLE TIKEUT EO RIEULPHIEUPH + {0x88FE, 0xB363}, //1424 #HANGUL SYLLABLE TIKEUT EO RIEULHIEUH + {0x8941, 0xB366}, //1425 #HANGUL SYLLABLE TIKEUT EO PIEUPSIOS + {0x8942, 0xB368}, //1426 #HANGUL SYLLABLE TIKEUT EO SSANGSIOS + {0x8943, 0xB36A}, //1427 #HANGUL SYLLABLE TIKEUT EO CIEUC + {0x8944, 0xB36C}, //1428 #HANGUL SYLLABLE TIKEUT EO KHIEUKH + {0x8945, 0xB36D}, //1429 #HANGUL SYLLABLE TIKEUT EO THIEUTH + {0x8946, 0xB36F}, //1430 #HANGUL SYLLABLE TIKEUT EO HIEUH + {0x8947, 0xB372}, //1431 #HANGUL SYLLABLE TIKEUT E SSANGKIYEOK + {0x8948, 0xB373}, //1432 #HANGUL SYLLABLE TIKEUT E KIYEOKSIOS + {0x8949, 0xB375}, //1433 #HANGUL SYLLABLE TIKEUT E NIEUNCIEUC + {0x894A, 0xB376}, //1434 #HANGUL SYLLABLE TIKEUT E NIEUNHIEUH + {0x894B, 0xB377}, //1435 #HANGUL SYLLABLE TIKEUT E TIKEUT + {0x894C, 0xB379}, //1436 #HANGUL SYLLABLE TIKEUT E RIEULKIYEOK + {0x894D, 0xB37A}, //1437 #HANGUL SYLLABLE TIKEUT E RIEULMIEUM + {0x894E, 0xB37B}, //1438 #HANGUL SYLLABLE TIKEUT E RIEULPIEUP + {0x894F, 0xB37C}, //1439 #HANGUL SYLLABLE TIKEUT E RIEULSIOS + {0x8950, 0xB37D}, //1440 #HANGUL SYLLABLE TIKEUT E RIEULTHIEUTH + {0x8951, 0xB37E}, //1441 #HANGUL SYLLABLE TIKEUT E RIEULPHIEUPH + {0x8952, 0xB37F}, //1442 #HANGUL SYLLABLE TIKEUT E RIEULHIEUH + {0x8953, 0xB382}, //1443 #HANGUL SYLLABLE TIKEUT E PIEUPSIOS + {0x8954, 0xB386}, //1444 #HANGUL SYLLABLE TIKEUT E CIEUC + {0x8955, 0xB387}, //1445 #HANGUL SYLLABLE TIKEUT E CHIEUCH + {0x8956, 0xB388}, //1446 #HANGUL SYLLABLE TIKEUT E KHIEUKH + {0x8957, 0xB389}, //1447 #HANGUL SYLLABLE TIKEUT E THIEUTH + {0x8958, 0xB38A}, //1448 #HANGUL SYLLABLE TIKEUT E PHIEUPH + {0x8959, 0xB38B}, //1449 #HANGUL SYLLABLE TIKEUT E HIEUH + {0x895A, 0xB38D}, //1450 #HANGUL SYLLABLE TIKEUT YEO KIYEOK + {0x8961, 0xB38E}, //1451 #HANGUL SYLLABLE TIKEUT YEO SSANGKIYEOK + {0x8962, 0xB38F}, //1452 #HANGUL SYLLABLE TIKEUT YEO KIYEOKSIOS + {0x8963, 0xB391}, //1453 #HANGUL SYLLABLE TIKEUT YEO NIEUNCIEUC + {0x8964, 0xB392}, //1454 #HANGUL SYLLABLE TIKEUT YEO NIEUNHIEUH + {0x8965, 0xB393}, //1455 #HANGUL SYLLABLE TIKEUT YEO TIKEUT + {0x8966, 0xB395}, //1456 #HANGUL SYLLABLE TIKEUT YEO RIEULKIYEOK + {0x8967, 0xB396}, //1457 #HANGUL SYLLABLE TIKEUT YEO RIEULMIEUM + {0x8968, 0xB397}, //1458 #HANGUL SYLLABLE TIKEUT YEO RIEULPIEUP + {0x8969, 0xB398}, //1459 #HANGUL SYLLABLE TIKEUT YEO RIEULSIOS + {0x896A, 0xB399}, //1460 #HANGUL SYLLABLE TIKEUT YEO RIEULTHIEUTH + {0x896B, 0xB39A}, //1461 #HANGUL SYLLABLE TIKEUT YEO RIEULPHIEUPH + {0x896C, 0xB39B}, //1462 #HANGUL SYLLABLE TIKEUT YEO RIEULHIEUH + {0x896D, 0xB39C}, //1463 #HANGUL SYLLABLE TIKEUT YEO MIEUM + {0x896E, 0xB39D}, //1464 #HANGUL SYLLABLE TIKEUT YEO PIEUP + {0x896F, 0xB39E}, //1465 #HANGUL SYLLABLE TIKEUT YEO PIEUPSIOS + {0x8970, 0xB39F}, //1466 #HANGUL SYLLABLE TIKEUT YEO SIOS + {0x8971, 0xB3A2}, //1467 #HANGUL SYLLABLE TIKEUT YEO CIEUC + {0x8972, 0xB3A3}, //1468 #HANGUL SYLLABLE TIKEUT YEO CHIEUCH + {0x8973, 0xB3A4}, //1469 #HANGUL SYLLABLE TIKEUT YEO KHIEUKH + {0x8974, 0xB3A5}, //1470 #HANGUL SYLLABLE TIKEUT YEO THIEUTH + {0x8975, 0xB3A6}, //1471 #HANGUL SYLLABLE TIKEUT YEO PHIEUPH + {0x8976, 0xB3A7}, //1472 #HANGUL SYLLABLE TIKEUT YEO HIEUH + {0x8977, 0xB3A9}, //1473 #HANGUL SYLLABLE TIKEUT YE KIYEOK + {0x8978, 0xB3AA}, //1474 #HANGUL SYLLABLE TIKEUT YE SSANGKIYEOK + {0x8979, 0xB3AB}, //1475 #HANGUL SYLLABLE TIKEUT YE KIYEOKSIOS + {0x897A, 0xB3AD}, //1476 #HANGUL SYLLABLE TIKEUT YE NIEUNCIEUC + {0x8981, 0xB3AE}, //1477 #HANGUL SYLLABLE TIKEUT YE NIEUNHIEUH + {0x8982, 0xB3AF}, //1478 #HANGUL SYLLABLE TIKEUT YE TIKEUT + {0x8983, 0xB3B0}, //1479 #HANGUL SYLLABLE TIKEUT YE RIEUL + {0x8984, 0xB3B1}, //1480 #HANGUL SYLLABLE TIKEUT YE RIEULKIYEOK + {0x8985, 0xB3B2}, //1481 #HANGUL SYLLABLE TIKEUT YE RIEULMIEUM + {0x8986, 0xB3B3}, //1482 #HANGUL SYLLABLE TIKEUT YE RIEULPIEUP + {0x8987, 0xB3B4}, //1483 #HANGUL SYLLABLE TIKEUT YE RIEULSIOS + {0x8988, 0xB3B5}, //1484 #HANGUL SYLLABLE TIKEUT YE RIEULTHIEUTH + {0x8989, 0xB3B6}, //1485 #HANGUL SYLLABLE TIKEUT YE RIEULPHIEUPH + {0x898A, 0xB3B7}, //1486 #HANGUL SYLLABLE TIKEUT YE RIEULHIEUH + {0x898B, 0xB3B8}, //1487 #HANGUL SYLLABLE TIKEUT YE MIEUM + {0x898C, 0xB3B9}, //1488 #HANGUL SYLLABLE TIKEUT YE PIEUP + {0x898D, 0xB3BA}, //1489 #HANGUL SYLLABLE TIKEUT YE PIEUPSIOS + {0x898E, 0xB3BB}, //1490 #HANGUL SYLLABLE TIKEUT YE SIOS + {0x898F, 0xB3BC}, //1491 #HANGUL SYLLABLE TIKEUT YE SSANGSIOS + {0x8990, 0xB3BD}, //1492 #HANGUL SYLLABLE TIKEUT YE IEUNG + {0x8991, 0xB3BE}, //1493 #HANGUL SYLLABLE TIKEUT YE CIEUC + {0x8992, 0xB3BF}, //1494 #HANGUL SYLLABLE TIKEUT YE CHIEUCH + {0x8993, 0xB3C0}, //1495 #HANGUL SYLLABLE TIKEUT YE KHIEUKH + {0x8994, 0xB3C1}, //1496 #HANGUL SYLLABLE TIKEUT YE THIEUTH + {0x8995, 0xB3C2}, //1497 #HANGUL SYLLABLE TIKEUT YE PHIEUPH + {0x8996, 0xB3C3}, //1498 #HANGUL SYLLABLE TIKEUT YE HIEUH + {0x8997, 0xB3C6}, //1499 #HANGUL SYLLABLE TIKEUT O SSANGKIYEOK + {0x8998, 0xB3C7}, //1500 #HANGUL SYLLABLE TIKEUT O KIYEOKSIOS + {0x8999, 0xB3C9}, //1501 #HANGUL SYLLABLE TIKEUT O NIEUNCIEUC + {0x899A, 0xB3CA}, //1502 #HANGUL SYLLABLE TIKEUT O NIEUNHIEUH + {0x899B, 0xB3CD}, //1503 #HANGUL SYLLABLE TIKEUT O RIEULKIYEOK + {0x899C, 0xB3CF}, //1504 #HANGUL SYLLABLE TIKEUT O RIEULPIEUP + {0x899D, 0xB3D1}, //1505 #HANGUL SYLLABLE TIKEUT O RIEULTHIEUTH + {0x899E, 0xB3D2}, //1506 #HANGUL SYLLABLE TIKEUT O RIEULPHIEUPH + {0x899F, 0xB3D3}, //1507 #HANGUL SYLLABLE TIKEUT O RIEULHIEUH + {0x89A0, 0xB3D6}, //1508 #HANGUL SYLLABLE TIKEUT O PIEUPSIOS + {0x89A1, 0xB3D8}, //1509 #HANGUL SYLLABLE TIKEUT O SSANGSIOS + {0x89A2, 0xB3DA}, //1510 #HANGUL SYLLABLE TIKEUT O CIEUC + {0x89A3, 0xB3DC}, //1511 #HANGUL SYLLABLE TIKEUT O KHIEUKH + {0x89A4, 0xB3DE}, //1512 #HANGUL SYLLABLE TIKEUT O PHIEUPH + {0x89A5, 0xB3DF}, //1513 #HANGUL SYLLABLE TIKEUT O HIEUH + {0x89A6, 0xB3E1}, //1514 #HANGUL SYLLABLE TIKEUT WA KIYEOK + {0x89A7, 0xB3E2}, //1515 #HANGUL SYLLABLE TIKEUT WA SSANGKIYEOK + {0x89A8, 0xB3E3}, //1516 #HANGUL SYLLABLE TIKEUT WA KIYEOKSIOS + {0x89A9, 0xB3E5}, //1517 #HANGUL SYLLABLE TIKEUT WA NIEUNCIEUC + {0x89AA, 0xB3E6}, //1518 #HANGUL SYLLABLE TIKEUT WA NIEUNHIEUH + {0x89AB, 0xB3E7}, //1519 #HANGUL SYLLABLE TIKEUT WA TIKEUT + {0x89AC, 0xB3E9}, //1520 #HANGUL SYLLABLE TIKEUT WA RIEULKIYEOK + {0x89AD, 0xB3EA}, //1521 #HANGUL SYLLABLE TIKEUT WA RIEULMIEUM + {0x89AE, 0xB3EB}, //1522 #HANGUL SYLLABLE TIKEUT WA RIEULPIEUP + {0x89AF, 0xB3EC}, //1523 #HANGUL SYLLABLE TIKEUT WA RIEULSIOS + {0x89B0, 0xB3ED}, //1524 #HANGUL SYLLABLE TIKEUT WA RIEULTHIEUTH + {0x89B1, 0xB3EE}, //1525 #HANGUL SYLLABLE TIKEUT WA RIEULPHIEUPH + {0x89B2, 0xB3EF}, //1526 #HANGUL SYLLABLE TIKEUT WA RIEULHIEUH + {0x89B3, 0xB3F0}, //1527 #HANGUL SYLLABLE TIKEUT WA MIEUM + {0x89B4, 0xB3F1}, //1528 #HANGUL SYLLABLE TIKEUT WA PIEUP + {0x89B5, 0xB3F2}, //1529 #HANGUL SYLLABLE TIKEUT WA PIEUPSIOS + {0x89B6, 0xB3F3}, //1530 #HANGUL SYLLABLE TIKEUT WA SIOS + {0x89B7, 0xB3F4}, //1531 #HANGUL SYLLABLE TIKEUT WA SSANGSIOS + {0x89B8, 0xB3F5}, //1532 #HANGUL SYLLABLE TIKEUT WA IEUNG + {0x89B9, 0xB3F6}, //1533 #HANGUL SYLLABLE TIKEUT WA CIEUC + {0x89BA, 0xB3F7}, //1534 #HANGUL SYLLABLE TIKEUT WA CHIEUCH + {0x89BB, 0xB3F8}, //1535 #HANGUL SYLLABLE TIKEUT WA KHIEUKH + {0x89BC, 0xB3F9}, //1536 #HANGUL SYLLABLE TIKEUT WA THIEUTH + {0x89BD, 0xB3FA}, //1537 #HANGUL SYLLABLE TIKEUT WA PHIEUPH + {0x89BE, 0xB3FB}, //1538 #HANGUL SYLLABLE TIKEUT WA HIEUH + {0x89BF, 0xB3FD}, //1539 #HANGUL SYLLABLE TIKEUT WAE KIYEOK + {0x89C0, 0xB3FE}, //1540 #HANGUL SYLLABLE TIKEUT WAE SSANGKIYEOK + {0x89C1, 0xB3FF}, //1541 #HANGUL SYLLABLE TIKEUT WAE KIYEOKSIOS + {0x89C2, 0xB400}, //1542 #HANGUL SYLLABLE TIKEUT WAE NIEUN + {0x89C3, 0xB401}, //1543 #HANGUL SYLLABLE TIKEUT WAE NIEUNCIEUC + {0x89C4, 0xB402}, //1544 #HANGUL SYLLABLE TIKEUT WAE NIEUNHIEUH + {0x89C5, 0xB403}, //1545 #HANGUL SYLLABLE TIKEUT WAE TIKEUT + {0x89C6, 0xB404}, //1546 #HANGUL SYLLABLE TIKEUT WAE RIEUL + {0x89C7, 0xB405}, //1547 #HANGUL SYLLABLE TIKEUT WAE RIEULKIYEOK + {0x89C8, 0xB406}, //1548 #HANGUL SYLLABLE TIKEUT WAE RIEULMIEUM + {0x89C9, 0xB407}, //1549 #HANGUL SYLLABLE TIKEUT WAE RIEULPIEUP + {0x89CA, 0xB408}, //1550 #HANGUL SYLLABLE TIKEUT WAE RIEULSIOS + {0x89CB, 0xB409}, //1551 #HANGUL SYLLABLE TIKEUT WAE RIEULTHIEUTH + {0x89CC, 0xB40A}, //1552 #HANGUL SYLLABLE TIKEUT WAE RIEULPHIEUPH + {0x89CD, 0xB40B}, //1553 #HANGUL SYLLABLE TIKEUT WAE RIEULHIEUH + {0x89CE, 0xB40C}, //1554 #HANGUL SYLLABLE TIKEUT WAE MIEUM + {0x89CF, 0xB40D}, //1555 #HANGUL SYLLABLE TIKEUT WAE PIEUP + {0x89D0, 0xB40E}, //1556 #HANGUL SYLLABLE TIKEUT WAE PIEUPSIOS + {0x89D1, 0xB40F}, //1557 #HANGUL SYLLABLE TIKEUT WAE SIOS + {0x89D2, 0xB411}, //1558 #HANGUL SYLLABLE TIKEUT WAE IEUNG + {0x89D3, 0xB412}, //1559 #HANGUL SYLLABLE TIKEUT WAE CIEUC + {0x89D4, 0xB413}, //1560 #HANGUL SYLLABLE TIKEUT WAE CHIEUCH + {0x89D5, 0xB414}, //1561 #HANGUL SYLLABLE TIKEUT WAE KHIEUKH + {0x89D6, 0xB415}, //1562 #HANGUL SYLLABLE TIKEUT WAE THIEUTH + {0x89D7, 0xB416}, //1563 #HANGUL SYLLABLE TIKEUT WAE PHIEUPH + {0x89D8, 0xB417}, //1564 #HANGUL SYLLABLE TIKEUT WAE HIEUH + {0x89D9, 0xB419}, //1565 #HANGUL SYLLABLE TIKEUT OE KIYEOK + {0x89DA, 0xB41A}, //1566 #HANGUL SYLLABLE TIKEUT OE SSANGKIYEOK + {0x89DB, 0xB41B}, //1567 #HANGUL SYLLABLE TIKEUT OE KIYEOKSIOS + {0x89DC, 0xB41D}, //1568 #HANGUL SYLLABLE TIKEUT OE NIEUNCIEUC + {0x89DD, 0xB41E}, //1569 #HANGUL SYLLABLE TIKEUT OE NIEUNHIEUH + {0x89DE, 0xB41F}, //1570 #HANGUL SYLLABLE TIKEUT OE TIKEUT + {0x89DF, 0xB421}, //1571 #HANGUL SYLLABLE TIKEUT OE RIEULKIYEOK + {0x89E0, 0xB422}, //1572 #HANGUL SYLLABLE TIKEUT OE RIEULMIEUM + {0x89E1, 0xB423}, //1573 #HANGUL SYLLABLE TIKEUT OE RIEULPIEUP + {0x89E2, 0xB424}, //1574 #HANGUL SYLLABLE TIKEUT OE RIEULSIOS + {0x89E3, 0xB425}, //1575 #HANGUL SYLLABLE TIKEUT OE RIEULTHIEUTH + {0x89E4, 0xB426}, //1576 #HANGUL SYLLABLE TIKEUT OE RIEULPHIEUPH + {0x89E5, 0xB427}, //1577 #HANGUL SYLLABLE TIKEUT OE RIEULHIEUH + {0x89E6, 0xB42A}, //1578 #HANGUL SYLLABLE TIKEUT OE PIEUPSIOS + {0x89E7, 0xB42C}, //1579 #HANGUL SYLLABLE TIKEUT OE SSANGSIOS + {0x89E8, 0xB42D}, //1580 #HANGUL SYLLABLE TIKEUT OE IEUNG + {0x89E9, 0xB42E}, //1581 #HANGUL SYLLABLE TIKEUT OE CIEUC + {0x89EA, 0xB42F}, //1582 #HANGUL SYLLABLE TIKEUT OE CHIEUCH + {0x89EB, 0xB430}, //1583 #HANGUL SYLLABLE TIKEUT OE KHIEUKH + {0x89EC, 0xB431}, //1584 #HANGUL SYLLABLE TIKEUT OE THIEUTH + {0x89ED, 0xB432}, //1585 #HANGUL SYLLABLE TIKEUT OE PHIEUPH + {0x89EE, 0xB433}, //1586 #HANGUL SYLLABLE TIKEUT OE HIEUH + {0x89EF, 0xB435}, //1587 #HANGUL SYLLABLE TIKEUT YO KIYEOK + {0x89F0, 0xB436}, //1588 #HANGUL SYLLABLE TIKEUT YO SSANGKIYEOK + {0x89F1, 0xB437}, //1589 #HANGUL SYLLABLE TIKEUT YO KIYEOKSIOS + {0x89F2, 0xB438}, //1590 #HANGUL SYLLABLE TIKEUT YO NIEUN + {0x89F3, 0xB439}, //1591 #HANGUL SYLLABLE TIKEUT YO NIEUNCIEUC + {0x89F4, 0xB43A}, //1592 #HANGUL SYLLABLE TIKEUT YO NIEUNHIEUH + {0x89F5, 0xB43B}, //1593 #HANGUL SYLLABLE TIKEUT YO TIKEUT + {0x89F6, 0xB43C}, //1594 #HANGUL SYLLABLE TIKEUT YO RIEUL + {0x89F7, 0xB43D}, //1595 #HANGUL SYLLABLE TIKEUT YO RIEULKIYEOK + {0x89F8, 0xB43E}, //1596 #HANGUL SYLLABLE TIKEUT YO RIEULMIEUM + {0x89F9, 0xB43F}, //1597 #HANGUL SYLLABLE TIKEUT YO RIEULPIEUP + {0x89FA, 0xB440}, //1598 #HANGUL SYLLABLE TIKEUT YO RIEULSIOS + {0x89FB, 0xB441}, //1599 #HANGUL SYLLABLE TIKEUT YO RIEULTHIEUTH + {0x89FC, 0xB442}, //1600 #HANGUL SYLLABLE TIKEUT YO RIEULPHIEUPH + {0x89FD, 0xB443}, //1601 #HANGUL SYLLABLE TIKEUT YO RIEULHIEUH + {0x89FE, 0xB444}, //1602 #HANGUL SYLLABLE TIKEUT YO MIEUM + {0x8A41, 0xB445}, //1603 #HANGUL SYLLABLE TIKEUT YO PIEUP + {0x8A42, 0xB446}, //1604 #HANGUL SYLLABLE TIKEUT YO PIEUPSIOS + {0x8A43, 0xB447}, //1605 #HANGUL SYLLABLE TIKEUT YO SIOS + {0x8A44, 0xB448}, //1606 #HANGUL SYLLABLE TIKEUT YO SSANGSIOS + {0x8A45, 0xB449}, //1607 #HANGUL SYLLABLE TIKEUT YO IEUNG + {0x8A46, 0xB44A}, //1608 #HANGUL SYLLABLE TIKEUT YO CIEUC + {0x8A47, 0xB44B}, //1609 #HANGUL SYLLABLE TIKEUT YO CHIEUCH + {0x8A48, 0xB44C}, //1610 #HANGUL SYLLABLE TIKEUT YO KHIEUKH + {0x8A49, 0xB44D}, //1611 #HANGUL SYLLABLE TIKEUT YO THIEUTH + {0x8A4A, 0xB44E}, //1612 #HANGUL SYLLABLE TIKEUT YO PHIEUPH + {0x8A4B, 0xB44F}, //1613 #HANGUL SYLLABLE TIKEUT YO HIEUH + {0x8A4C, 0xB452}, //1614 #HANGUL SYLLABLE TIKEUT U SSANGKIYEOK + {0x8A4D, 0xB453}, //1615 #HANGUL SYLLABLE TIKEUT U KIYEOKSIOS + {0x8A4E, 0xB455}, //1616 #HANGUL SYLLABLE TIKEUT U NIEUNCIEUC + {0x8A4F, 0xB456}, //1617 #HANGUL SYLLABLE TIKEUT U NIEUNHIEUH + {0x8A50, 0xB457}, //1618 #HANGUL SYLLABLE TIKEUT U TIKEUT + {0x8A51, 0xB459}, //1619 #HANGUL SYLLABLE TIKEUT U RIEULKIYEOK + {0x8A52, 0xB45A}, //1620 #HANGUL SYLLABLE TIKEUT U RIEULMIEUM + {0x8A53, 0xB45B}, //1621 #HANGUL SYLLABLE TIKEUT U RIEULPIEUP + {0x8A54, 0xB45C}, //1622 #HANGUL SYLLABLE TIKEUT U RIEULSIOS + {0x8A55, 0xB45D}, //1623 #HANGUL SYLLABLE TIKEUT U RIEULTHIEUTH + {0x8A56, 0xB45E}, //1624 #HANGUL SYLLABLE TIKEUT U RIEULPHIEUPH + {0x8A57, 0xB45F}, //1625 #HANGUL SYLLABLE TIKEUT U RIEULHIEUH + {0x8A58, 0xB462}, //1626 #HANGUL SYLLABLE TIKEUT U PIEUPSIOS + {0x8A59, 0xB464}, //1627 #HANGUL SYLLABLE TIKEUT U SSANGSIOS + {0x8A5A, 0xB466}, //1628 #HANGUL SYLLABLE TIKEUT U CIEUC + {0x8A61, 0xB467}, //1629 #HANGUL SYLLABLE TIKEUT U CHIEUCH + {0x8A62, 0xB468}, //1630 #HANGUL SYLLABLE TIKEUT U KHIEUKH + {0x8A63, 0xB469}, //1631 #HANGUL SYLLABLE TIKEUT U THIEUTH + {0x8A64, 0xB46A}, //1632 #HANGUL SYLLABLE TIKEUT U PHIEUPH + {0x8A65, 0xB46B}, //1633 #HANGUL SYLLABLE TIKEUT U HIEUH + {0x8A66, 0xB46D}, //1634 #HANGUL SYLLABLE TIKEUT WEO KIYEOK + {0x8A67, 0xB46E}, //1635 #HANGUL SYLLABLE TIKEUT WEO SSANGKIYEOK + {0x8A68, 0xB46F}, //1636 #HANGUL SYLLABLE TIKEUT WEO KIYEOKSIOS + {0x8A69, 0xB470}, //1637 #HANGUL SYLLABLE TIKEUT WEO NIEUN + {0x8A6A, 0xB471}, //1638 #HANGUL SYLLABLE TIKEUT WEO NIEUNCIEUC + {0x8A6B, 0xB472}, //1639 #HANGUL SYLLABLE TIKEUT WEO NIEUNHIEUH + {0x8A6C, 0xB473}, //1640 #HANGUL SYLLABLE TIKEUT WEO TIKEUT + {0x8A6D, 0xB474}, //1641 #HANGUL SYLLABLE TIKEUT WEO RIEUL + {0x8A6E, 0xB475}, //1642 #HANGUL SYLLABLE TIKEUT WEO RIEULKIYEOK + {0x8A6F, 0xB476}, //1643 #HANGUL SYLLABLE TIKEUT WEO RIEULMIEUM + {0x8A70, 0xB477}, //1644 #HANGUL SYLLABLE TIKEUT WEO RIEULPIEUP + {0x8A71, 0xB478}, //1645 #HANGUL SYLLABLE TIKEUT WEO RIEULSIOS + {0x8A72, 0xB479}, //1646 #HANGUL SYLLABLE TIKEUT WEO RIEULTHIEUTH + {0x8A73, 0xB47A}, //1647 #HANGUL SYLLABLE TIKEUT WEO RIEULPHIEUPH + {0x8A74, 0xB47B}, //1648 #HANGUL SYLLABLE TIKEUT WEO RIEULHIEUH + {0x8A75, 0xB47C}, //1649 #HANGUL SYLLABLE TIKEUT WEO MIEUM + {0x8A76, 0xB47D}, //1650 #HANGUL SYLLABLE TIKEUT WEO PIEUP + {0x8A77, 0xB47E}, //1651 #HANGUL SYLLABLE TIKEUT WEO PIEUPSIOS + {0x8A78, 0xB47F}, //1652 #HANGUL SYLLABLE TIKEUT WEO SIOS + {0x8A79, 0xB481}, //1653 #HANGUL SYLLABLE TIKEUT WEO IEUNG + {0x8A7A, 0xB482}, //1654 #HANGUL SYLLABLE TIKEUT WEO CIEUC + {0x8A81, 0xB483}, //1655 #HANGUL SYLLABLE TIKEUT WEO CHIEUCH + {0x8A82, 0xB484}, //1656 #HANGUL SYLLABLE TIKEUT WEO KHIEUKH + {0x8A83, 0xB485}, //1657 #HANGUL SYLLABLE TIKEUT WEO THIEUTH + {0x8A84, 0xB486}, //1658 #HANGUL SYLLABLE TIKEUT WEO PHIEUPH + {0x8A85, 0xB487}, //1659 #HANGUL SYLLABLE TIKEUT WEO HIEUH + {0x8A86, 0xB489}, //1660 #HANGUL SYLLABLE TIKEUT WE KIYEOK + {0x8A87, 0xB48A}, //1661 #HANGUL SYLLABLE TIKEUT WE SSANGKIYEOK + {0x8A88, 0xB48B}, //1662 #HANGUL SYLLABLE TIKEUT WE KIYEOKSIOS + {0x8A89, 0xB48C}, //1663 #HANGUL SYLLABLE TIKEUT WE NIEUN + {0x8A8A, 0xB48D}, //1664 #HANGUL SYLLABLE TIKEUT WE NIEUNCIEUC + {0x8A8B, 0xB48E}, //1665 #HANGUL SYLLABLE TIKEUT WE NIEUNHIEUH + {0x8A8C, 0xB48F}, //1666 #HANGUL SYLLABLE TIKEUT WE TIKEUT + {0x8A8D, 0xB490}, //1667 #HANGUL SYLLABLE TIKEUT WE RIEUL + {0x8A8E, 0xB491}, //1668 #HANGUL SYLLABLE TIKEUT WE RIEULKIYEOK + {0x8A8F, 0xB492}, //1669 #HANGUL SYLLABLE TIKEUT WE RIEULMIEUM + {0x8A90, 0xB493}, //1670 #HANGUL SYLLABLE TIKEUT WE RIEULPIEUP + {0x8A91, 0xB494}, //1671 #HANGUL SYLLABLE TIKEUT WE RIEULSIOS + {0x8A92, 0xB495}, //1672 #HANGUL SYLLABLE TIKEUT WE RIEULTHIEUTH + {0x8A93, 0xB496}, //1673 #HANGUL SYLLABLE TIKEUT WE RIEULPHIEUPH + {0x8A94, 0xB497}, //1674 #HANGUL SYLLABLE TIKEUT WE RIEULHIEUH + {0x8A95, 0xB498}, //1675 #HANGUL SYLLABLE TIKEUT WE MIEUM + {0x8A96, 0xB499}, //1676 #HANGUL SYLLABLE TIKEUT WE PIEUP + {0x8A97, 0xB49A}, //1677 #HANGUL SYLLABLE TIKEUT WE PIEUPSIOS + {0x8A98, 0xB49B}, //1678 #HANGUL SYLLABLE TIKEUT WE SIOS + {0x8A99, 0xB49C}, //1679 #HANGUL SYLLABLE TIKEUT WE SSANGSIOS + {0x8A9A, 0xB49E}, //1680 #HANGUL SYLLABLE TIKEUT WE CIEUC + {0x8A9B, 0xB49F}, //1681 #HANGUL SYLLABLE TIKEUT WE CHIEUCH + {0x8A9C, 0xB4A0}, //1682 #HANGUL SYLLABLE TIKEUT WE KHIEUKH + {0x8A9D, 0xB4A1}, //1683 #HANGUL SYLLABLE TIKEUT WE THIEUTH + {0x8A9E, 0xB4A2}, //1684 #HANGUL SYLLABLE TIKEUT WE PHIEUPH + {0x8A9F, 0xB4A3}, //1685 #HANGUL SYLLABLE TIKEUT WE HIEUH + {0x8AA0, 0xB4A5}, //1686 #HANGUL SYLLABLE TIKEUT WI KIYEOK + {0x8AA1, 0xB4A6}, //1687 #HANGUL SYLLABLE TIKEUT WI SSANGKIYEOK + {0x8AA2, 0xB4A7}, //1688 #HANGUL SYLLABLE TIKEUT WI KIYEOKSIOS + {0x8AA3, 0xB4A9}, //1689 #HANGUL SYLLABLE TIKEUT WI NIEUNCIEUC + {0x8AA4, 0xB4AA}, //1690 #HANGUL SYLLABLE TIKEUT WI NIEUNHIEUH + {0x8AA5, 0xB4AB}, //1691 #HANGUL SYLLABLE TIKEUT WI TIKEUT + {0x8AA6, 0xB4AD}, //1692 #HANGUL SYLLABLE TIKEUT WI RIEULKIYEOK + {0x8AA7, 0xB4AE}, //1693 #HANGUL SYLLABLE TIKEUT WI RIEULMIEUM + {0x8AA8, 0xB4AF}, //1694 #HANGUL SYLLABLE TIKEUT WI RIEULPIEUP + {0x8AA9, 0xB4B0}, //1695 #HANGUL SYLLABLE TIKEUT WI RIEULSIOS + {0x8AAA, 0xB4B1}, //1696 #HANGUL SYLLABLE TIKEUT WI RIEULTHIEUTH + {0x8AAB, 0xB4B2}, //1697 #HANGUL SYLLABLE TIKEUT WI RIEULPHIEUPH + {0x8AAC, 0xB4B3}, //1698 #HANGUL SYLLABLE TIKEUT WI RIEULHIEUH + {0x8AAD, 0xB4B4}, //1699 #HANGUL SYLLABLE TIKEUT WI MIEUM + {0x8AAE, 0xB4B6}, //1700 #HANGUL SYLLABLE TIKEUT WI PIEUPSIOS + {0x8AAF, 0xB4B8}, //1701 #HANGUL SYLLABLE TIKEUT WI SSANGSIOS + {0x8AB0, 0xB4BA}, //1702 #HANGUL SYLLABLE TIKEUT WI CIEUC + {0x8AB1, 0xB4BB}, //1703 #HANGUL SYLLABLE TIKEUT WI CHIEUCH + {0x8AB2, 0xB4BC}, //1704 #HANGUL SYLLABLE TIKEUT WI KHIEUKH + {0x8AB3, 0xB4BD}, //1705 #HANGUL SYLLABLE TIKEUT WI THIEUTH + {0x8AB4, 0xB4BE}, //1706 #HANGUL SYLLABLE TIKEUT WI PHIEUPH + {0x8AB5, 0xB4BF}, //1707 #HANGUL SYLLABLE TIKEUT WI HIEUH + {0x8AB6, 0xB4C1}, //1708 #HANGUL SYLLABLE TIKEUT YU KIYEOK + {0x8AB7, 0xB4C2}, //1709 #HANGUL SYLLABLE TIKEUT YU SSANGKIYEOK + {0x8AB8, 0xB4C3}, //1710 #HANGUL SYLLABLE TIKEUT YU KIYEOKSIOS + {0x8AB9, 0xB4C5}, //1711 #HANGUL SYLLABLE TIKEUT YU NIEUNCIEUC + {0x8ABA, 0xB4C6}, //1712 #HANGUL SYLLABLE TIKEUT YU NIEUNHIEUH + {0x8ABB, 0xB4C7}, //1713 #HANGUL SYLLABLE TIKEUT YU TIKEUT + {0x8ABC, 0xB4C9}, //1714 #HANGUL SYLLABLE TIKEUT YU RIEULKIYEOK + {0x8ABD, 0xB4CA}, //1715 #HANGUL SYLLABLE TIKEUT YU RIEULMIEUM + {0x8ABE, 0xB4CB}, //1716 #HANGUL SYLLABLE TIKEUT YU RIEULPIEUP + {0x8ABF, 0xB4CC}, //1717 #HANGUL SYLLABLE TIKEUT YU RIEULSIOS + {0x8AC0, 0xB4CD}, //1718 #HANGUL SYLLABLE TIKEUT YU RIEULTHIEUTH + {0x8AC1, 0xB4CE}, //1719 #HANGUL SYLLABLE TIKEUT YU RIEULPHIEUPH + {0x8AC2, 0xB4CF}, //1720 #HANGUL SYLLABLE TIKEUT YU RIEULHIEUH + {0x8AC3, 0xB4D1}, //1721 #HANGUL SYLLABLE TIKEUT YU PIEUP + {0x8AC4, 0xB4D2}, //1722 #HANGUL SYLLABLE TIKEUT YU PIEUPSIOS + {0x8AC5, 0xB4D3}, //1723 #HANGUL SYLLABLE TIKEUT YU SIOS + {0x8AC6, 0xB4D4}, //1724 #HANGUL SYLLABLE TIKEUT YU SSANGSIOS + {0x8AC7, 0xB4D6}, //1725 #HANGUL SYLLABLE TIKEUT YU CIEUC + {0x8AC8, 0xB4D7}, //1726 #HANGUL SYLLABLE TIKEUT YU CHIEUCH + {0x8AC9, 0xB4D8}, //1727 #HANGUL SYLLABLE TIKEUT YU KHIEUKH + {0x8ACA, 0xB4D9}, //1728 #HANGUL SYLLABLE TIKEUT YU THIEUTH + {0x8ACB, 0xB4DA}, //1729 #HANGUL SYLLABLE TIKEUT YU PHIEUPH + {0x8ACC, 0xB4DB}, //1730 #HANGUL SYLLABLE TIKEUT YU HIEUH + {0x8ACD, 0xB4DE}, //1731 #HANGUL SYLLABLE TIKEUT EU SSANGKIYEOK + {0x8ACE, 0xB4DF}, //1732 #HANGUL SYLLABLE TIKEUT EU KIYEOKSIOS + {0x8ACF, 0xB4E1}, //1733 #HANGUL SYLLABLE TIKEUT EU NIEUNCIEUC + {0x8AD0, 0xB4E2}, //1734 #HANGUL SYLLABLE TIKEUT EU NIEUNHIEUH + {0x8AD1, 0xB4E5}, //1735 #HANGUL SYLLABLE TIKEUT EU RIEULKIYEOK + {0x8AD2, 0xB4E7}, //1736 #HANGUL SYLLABLE TIKEUT EU RIEULPIEUP + {0x8AD3, 0xB4E8}, //1737 #HANGUL SYLLABLE TIKEUT EU RIEULSIOS + {0x8AD4, 0xB4E9}, //1738 #HANGUL SYLLABLE TIKEUT EU RIEULTHIEUTH + {0x8AD5, 0xB4EA}, //1739 #HANGUL SYLLABLE TIKEUT EU RIEULPHIEUPH + {0x8AD6, 0xB4EB}, //1740 #HANGUL SYLLABLE TIKEUT EU RIEULHIEUH + {0x8AD7, 0xB4EE}, //1741 #HANGUL SYLLABLE TIKEUT EU PIEUPSIOS + {0x8AD8, 0xB4F0}, //1742 #HANGUL SYLLABLE TIKEUT EU SSANGSIOS + {0x8AD9, 0xB4F2}, //1743 #HANGUL SYLLABLE TIKEUT EU CIEUC + {0x8ADA, 0xB4F3}, //1744 #HANGUL SYLLABLE TIKEUT EU CHIEUCH + {0x8ADB, 0xB4F4}, //1745 #HANGUL SYLLABLE TIKEUT EU KHIEUKH + {0x8ADC, 0xB4F5}, //1746 #HANGUL SYLLABLE TIKEUT EU THIEUTH + {0x8ADD, 0xB4F6}, //1747 #HANGUL SYLLABLE TIKEUT EU PHIEUPH + {0x8ADE, 0xB4F7}, //1748 #HANGUL SYLLABLE TIKEUT EU HIEUH + {0x8ADF, 0xB4F9}, //1749 #HANGUL SYLLABLE TIKEUT YI KIYEOK + {0x8AE0, 0xB4FA}, //1750 #HANGUL SYLLABLE TIKEUT YI SSANGKIYEOK + {0x8AE1, 0xB4FB}, //1751 #HANGUL SYLLABLE TIKEUT YI KIYEOKSIOS + {0x8AE2, 0xB4FC}, //1752 #HANGUL SYLLABLE TIKEUT YI NIEUN + {0x8AE3, 0xB4FD}, //1753 #HANGUL SYLLABLE TIKEUT YI NIEUNCIEUC + {0x8AE4, 0xB4FE}, //1754 #HANGUL SYLLABLE TIKEUT YI NIEUNHIEUH + {0x8AE5, 0xB4FF}, //1755 #HANGUL SYLLABLE TIKEUT YI TIKEUT + {0x8AE6, 0xB500}, //1756 #HANGUL SYLLABLE TIKEUT YI RIEUL + {0x8AE7, 0xB501}, //1757 #HANGUL SYLLABLE TIKEUT YI RIEULKIYEOK + {0x8AE8, 0xB502}, //1758 #HANGUL SYLLABLE TIKEUT YI RIEULMIEUM + {0x8AE9, 0xB503}, //1759 #HANGUL SYLLABLE TIKEUT YI RIEULPIEUP + {0x8AEA, 0xB504}, //1760 #HANGUL SYLLABLE TIKEUT YI RIEULSIOS + {0x8AEB, 0xB505}, //1761 #HANGUL SYLLABLE TIKEUT YI RIEULTHIEUTH + {0x8AEC, 0xB506}, //1762 #HANGUL SYLLABLE TIKEUT YI RIEULPHIEUPH + {0x8AED, 0xB507}, //1763 #HANGUL SYLLABLE TIKEUT YI RIEULHIEUH + {0x8AEE, 0xB508}, //1764 #HANGUL SYLLABLE TIKEUT YI MIEUM + {0x8AEF, 0xB509}, //1765 #HANGUL SYLLABLE TIKEUT YI PIEUP + {0x8AF0, 0xB50A}, //1766 #HANGUL SYLLABLE TIKEUT YI PIEUPSIOS + {0x8AF1, 0xB50B}, //1767 #HANGUL SYLLABLE TIKEUT YI SIOS + {0x8AF2, 0xB50C}, //1768 #HANGUL SYLLABLE TIKEUT YI SSANGSIOS + {0x8AF3, 0xB50D}, //1769 #HANGUL SYLLABLE TIKEUT YI IEUNG + {0x8AF4, 0xB50E}, //1770 #HANGUL SYLLABLE TIKEUT YI CIEUC + {0x8AF5, 0xB50F}, //1771 #HANGUL SYLLABLE TIKEUT YI CHIEUCH + {0x8AF6, 0xB510}, //1772 #HANGUL SYLLABLE TIKEUT YI KHIEUKH + {0x8AF7, 0xB511}, //1773 #HANGUL SYLLABLE TIKEUT YI THIEUTH + {0x8AF8, 0xB512}, //1774 #HANGUL SYLLABLE TIKEUT YI PHIEUPH + {0x8AF9, 0xB513}, //1775 #HANGUL SYLLABLE TIKEUT YI HIEUH + {0x8AFA, 0xB516}, //1776 #HANGUL SYLLABLE TIKEUT I SSANGKIYEOK + {0x8AFB, 0xB517}, //1777 #HANGUL SYLLABLE TIKEUT I KIYEOKSIOS + {0x8AFC, 0xB519}, //1778 #HANGUL SYLLABLE TIKEUT I NIEUNCIEUC + {0x8AFD, 0xB51A}, //1779 #HANGUL SYLLABLE TIKEUT I NIEUNHIEUH + {0x8AFE, 0xB51D}, //1780 #HANGUL SYLLABLE TIKEUT I RIEULKIYEOK + {0x8B41, 0xB51E}, //1781 #HANGUL SYLLABLE TIKEUT I RIEULMIEUM + {0x8B42, 0xB51F}, //1782 #HANGUL SYLLABLE TIKEUT I RIEULPIEUP + {0x8B43, 0xB520}, //1783 #HANGUL SYLLABLE TIKEUT I RIEULSIOS + {0x8B44, 0xB521}, //1784 #HANGUL SYLLABLE TIKEUT I RIEULTHIEUTH + {0x8B45, 0xB522}, //1785 #HANGUL SYLLABLE TIKEUT I RIEULPHIEUPH + {0x8B46, 0xB523}, //1786 #HANGUL SYLLABLE TIKEUT I RIEULHIEUH + {0x8B47, 0xB526}, //1787 #HANGUL SYLLABLE TIKEUT I PIEUPSIOS + {0x8B48, 0xB52B}, //1788 #HANGUL SYLLABLE TIKEUT I CHIEUCH + {0x8B49, 0xB52C}, //1789 #HANGUL SYLLABLE TIKEUT I KHIEUKH + {0x8B4A, 0xB52D}, //1790 #HANGUL SYLLABLE TIKEUT I THIEUTH + {0x8B4B, 0xB52E}, //1791 #HANGUL SYLLABLE TIKEUT I PHIEUPH + {0x8B4C, 0xB52F}, //1792 #HANGUL SYLLABLE TIKEUT I HIEUH + {0x8B4D, 0xB532}, //1793 #HANGUL SYLLABLE SSANGTIKEUT A SSANGKIYEOK + {0x8B4E, 0xB533}, //1794 #HANGUL SYLLABLE SSANGTIKEUT A KIYEOKSIOS + {0x8B4F, 0xB535}, //1795 #HANGUL SYLLABLE SSANGTIKEUT A NIEUNCIEUC + {0x8B50, 0xB536}, //1796 #HANGUL SYLLABLE SSANGTIKEUT A NIEUNHIEUH + {0x8B51, 0xB537}, //1797 #HANGUL SYLLABLE SSANGTIKEUT A TIKEUT + {0x8B52, 0xB539}, //1798 #HANGUL SYLLABLE SSANGTIKEUT A RIEULKIYEOK + {0x8B53, 0xB53A}, //1799 #HANGUL SYLLABLE SSANGTIKEUT A RIEULMIEUM + {0x8B54, 0xB53B}, //1800 #HANGUL SYLLABLE SSANGTIKEUT A RIEULPIEUP + {0x8B55, 0xB53C}, //1801 #HANGUL SYLLABLE SSANGTIKEUT A RIEULSIOS + {0x8B56, 0xB53D}, //1802 #HANGUL SYLLABLE SSANGTIKEUT A RIEULTHIEUTH + {0x8B57, 0xB53E}, //1803 #HANGUL SYLLABLE SSANGTIKEUT A RIEULPHIEUPH + {0x8B58, 0xB53F}, //1804 #HANGUL SYLLABLE SSANGTIKEUT A RIEULHIEUH + {0x8B59, 0xB542}, //1805 #HANGUL SYLLABLE SSANGTIKEUT A PIEUPSIOS + {0x8B5A, 0xB546}, //1806 #HANGUL SYLLABLE SSANGTIKEUT A CIEUC + {0x8B61, 0xB547}, //1807 #HANGUL SYLLABLE SSANGTIKEUT A CHIEUCH + {0x8B62, 0xB548}, //1808 #HANGUL SYLLABLE SSANGTIKEUT A KHIEUKH + {0x8B63, 0xB549}, //1809 #HANGUL SYLLABLE SSANGTIKEUT A THIEUTH + {0x8B64, 0xB54A}, //1810 #HANGUL SYLLABLE SSANGTIKEUT A PHIEUPH + {0x8B65, 0xB54E}, //1811 #HANGUL SYLLABLE SSANGTIKEUT AE SSANGKIYEOK + {0x8B66, 0xB54F}, //1812 #HANGUL SYLLABLE SSANGTIKEUT AE KIYEOKSIOS + {0x8B67, 0xB551}, //1813 #HANGUL SYLLABLE SSANGTIKEUT AE NIEUNCIEUC + {0x8B68, 0xB552}, //1814 #HANGUL SYLLABLE SSANGTIKEUT AE NIEUNHIEUH + {0x8B69, 0xB553}, //1815 #HANGUL SYLLABLE SSANGTIKEUT AE TIKEUT + {0x8B6A, 0xB555}, //1816 #HANGUL SYLLABLE SSANGTIKEUT AE RIEULKIYEOK + {0x8B6B, 0xB556}, //1817 #HANGUL SYLLABLE SSANGTIKEUT AE RIEULMIEUM + {0x8B6C, 0xB557}, //1818 #HANGUL SYLLABLE SSANGTIKEUT AE RIEULPIEUP + {0x8B6D, 0xB558}, //1819 #HANGUL SYLLABLE SSANGTIKEUT AE RIEULSIOS + {0x8B6E, 0xB559}, //1820 #HANGUL SYLLABLE SSANGTIKEUT AE RIEULTHIEUTH + {0x8B6F, 0xB55A}, //1821 #HANGUL SYLLABLE SSANGTIKEUT AE RIEULPHIEUPH + {0x8B70, 0xB55B}, //1822 #HANGUL SYLLABLE SSANGTIKEUT AE RIEULHIEUH + {0x8B71, 0xB55E}, //1823 #HANGUL SYLLABLE SSANGTIKEUT AE PIEUPSIOS + {0x8B72, 0xB562}, //1824 #HANGUL SYLLABLE SSANGTIKEUT AE CIEUC + {0x8B73, 0xB563}, //1825 #HANGUL SYLLABLE SSANGTIKEUT AE CHIEUCH + {0x8B74, 0xB564}, //1826 #HANGUL SYLLABLE SSANGTIKEUT AE KHIEUKH + {0x8B75, 0xB565}, //1827 #HANGUL SYLLABLE SSANGTIKEUT AE THIEUTH + {0x8B76, 0xB566}, //1828 #HANGUL SYLLABLE SSANGTIKEUT AE PHIEUPH + {0x8B77, 0xB567}, //1829 #HANGUL SYLLABLE SSANGTIKEUT AE HIEUH + {0x8B78, 0xB568}, //1830 #HANGUL SYLLABLE SSANGTIKEUT YA + {0x8B79, 0xB569}, //1831 #HANGUL SYLLABLE SSANGTIKEUT YA KIYEOK + {0x8B7A, 0xB56A}, //1832 #HANGUL SYLLABLE SSANGTIKEUT YA SSANGKIYEOK + {0x8B81, 0xB56B}, //1833 #HANGUL SYLLABLE SSANGTIKEUT YA KIYEOKSIOS + {0x8B82, 0xB56C}, //1834 #HANGUL SYLLABLE SSANGTIKEUT YA NIEUN + {0x8B83, 0xB56D}, //1835 #HANGUL SYLLABLE SSANGTIKEUT YA NIEUNCIEUC + {0x8B84, 0xB56E}, //1836 #HANGUL SYLLABLE SSANGTIKEUT YA NIEUNHIEUH + {0x8B85, 0xB56F}, //1837 #HANGUL SYLLABLE SSANGTIKEUT YA TIKEUT + {0x8B86, 0xB570}, //1838 #HANGUL SYLLABLE SSANGTIKEUT YA RIEUL + {0x8B87, 0xB571}, //1839 #HANGUL SYLLABLE SSANGTIKEUT YA RIEULKIYEOK + {0x8B88, 0xB572}, //1840 #HANGUL SYLLABLE SSANGTIKEUT YA RIEULMIEUM + {0x8B89, 0xB573}, //1841 #HANGUL SYLLABLE SSANGTIKEUT YA RIEULPIEUP + {0x8B8A, 0xB574}, //1842 #HANGUL SYLLABLE SSANGTIKEUT YA RIEULSIOS + {0x8B8B, 0xB575}, //1843 #HANGUL SYLLABLE SSANGTIKEUT YA RIEULTHIEUTH + {0x8B8C, 0xB576}, //1844 #HANGUL SYLLABLE SSANGTIKEUT YA RIEULPHIEUPH + {0x8B8D, 0xB577}, //1845 #HANGUL SYLLABLE SSANGTIKEUT YA RIEULHIEUH + {0x8B8E, 0xB578}, //1846 #HANGUL SYLLABLE SSANGTIKEUT YA MIEUM + {0x8B8F, 0xB579}, //1847 #HANGUL SYLLABLE SSANGTIKEUT YA PIEUP + {0x8B90, 0xB57A}, //1848 #HANGUL SYLLABLE SSANGTIKEUT YA PIEUPSIOS + {0x8B91, 0xB57B}, //1849 #HANGUL SYLLABLE SSANGTIKEUT YA SIOS + {0x8B92, 0xB57C}, //1850 #HANGUL SYLLABLE SSANGTIKEUT YA SSANGSIOS + {0x8B93, 0xB57D}, //1851 #HANGUL SYLLABLE SSANGTIKEUT YA IEUNG + {0x8B94, 0xB57E}, //1852 #HANGUL SYLLABLE SSANGTIKEUT YA CIEUC + {0x8B95, 0xB57F}, //1853 #HANGUL SYLLABLE SSANGTIKEUT YA CHIEUCH + {0x8B96, 0xB580}, //1854 #HANGUL SYLLABLE SSANGTIKEUT YA KHIEUKH + {0x8B97, 0xB581}, //1855 #HANGUL SYLLABLE SSANGTIKEUT YA THIEUTH + {0x8B98, 0xB582}, //1856 #HANGUL SYLLABLE SSANGTIKEUT YA PHIEUPH + {0x8B99, 0xB583}, //1857 #HANGUL SYLLABLE SSANGTIKEUT YA HIEUH + {0x8B9A, 0xB584}, //1858 #HANGUL SYLLABLE SSANGTIKEUT YAE + {0x8B9B, 0xB585}, //1859 #HANGUL SYLLABLE SSANGTIKEUT YAE KIYEOK + {0x8B9C, 0xB586}, //1860 #HANGUL SYLLABLE SSANGTIKEUT YAE SSANGKIYEOK + {0x8B9D, 0xB587}, //1861 #HANGUL SYLLABLE SSANGTIKEUT YAE KIYEOKSIOS + {0x8B9E, 0xB588}, //1862 #HANGUL SYLLABLE SSANGTIKEUT YAE NIEUN + {0x8B9F, 0xB589}, //1863 #HANGUL SYLLABLE SSANGTIKEUT YAE NIEUNCIEUC + {0x8BA0, 0xB58A}, //1864 #HANGUL SYLLABLE SSANGTIKEUT YAE NIEUNHIEUH + {0x8BA1, 0xB58B}, //1865 #HANGUL SYLLABLE SSANGTIKEUT YAE TIKEUT + {0x8BA2, 0xB58C}, //1866 #HANGUL SYLLABLE SSANGTIKEUT YAE RIEUL + {0x8BA3, 0xB58D}, //1867 #HANGUL SYLLABLE SSANGTIKEUT YAE RIEULKIYEOK + {0x8BA4, 0xB58E}, //1868 #HANGUL SYLLABLE SSANGTIKEUT YAE RIEULMIEUM + {0x8BA5, 0xB58F}, //1869 #HANGUL SYLLABLE SSANGTIKEUT YAE RIEULPIEUP + {0x8BA6, 0xB590}, //1870 #HANGUL SYLLABLE SSANGTIKEUT YAE RIEULSIOS + {0x8BA7, 0xB591}, //1871 #HANGUL SYLLABLE SSANGTIKEUT YAE RIEULTHIEUTH + {0x8BA8, 0xB592}, //1872 #HANGUL SYLLABLE SSANGTIKEUT YAE RIEULPHIEUPH + {0x8BA9, 0xB593}, //1873 #HANGUL SYLLABLE SSANGTIKEUT YAE RIEULHIEUH + {0x8BAA, 0xB594}, //1874 #HANGUL SYLLABLE SSANGTIKEUT YAE MIEUM + {0x8BAB, 0xB595}, //1875 #HANGUL SYLLABLE SSANGTIKEUT YAE PIEUP + {0x8BAC, 0xB596}, //1876 #HANGUL SYLLABLE SSANGTIKEUT YAE PIEUPSIOS + {0x8BAD, 0xB597}, //1877 #HANGUL SYLLABLE SSANGTIKEUT YAE SIOS + {0x8BAE, 0xB598}, //1878 #HANGUL SYLLABLE SSANGTIKEUT YAE SSANGSIOS + {0x8BAF, 0xB599}, //1879 #HANGUL SYLLABLE SSANGTIKEUT YAE IEUNG + {0x8BB0, 0xB59A}, //1880 #HANGUL SYLLABLE SSANGTIKEUT YAE CIEUC + {0x8BB1, 0xB59B}, //1881 #HANGUL SYLLABLE SSANGTIKEUT YAE CHIEUCH + {0x8BB2, 0xB59C}, //1882 #HANGUL SYLLABLE SSANGTIKEUT YAE KHIEUKH + {0x8BB3, 0xB59D}, //1883 #HANGUL SYLLABLE SSANGTIKEUT YAE THIEUTH + {0x8BB4, 0xB59E}, //1884 #HANGUL SYLLABLE SSANGTIKEUT YAE PHIEUPH + {0x8BB5, 0xB59F}, //1885 #HANGUL SYLLABLE SSANGTIKEUT YAE HIEUH + {0x8BB6, 0xB5A2}, //1886 #HANGUL SYLLABLE SSANGTIKEUT EO SSANGKIYEOK + {0x8BB7, 0xB5A3}, //1887 #HANGUL SYLLABLE SSANGTIKEUT EO KIYEOKSIOS + {0x8BB8, 0xB5A5}, //1888 #HANGUL SYLLABLE SSANGTIKEUT EO NIEUNCIEUC + {0x8BB9, 0xB5A6}, //1889 #HANGUL SYLLABLE SSANGTIKEUT EO NIEUNHIEUH + {0x8BBA, 0xB5A7}, //1890 #HANGUL SYLLABLE SSANGTIKEUT EO TIKEUT + {0x8BBB, 0xB5A9}, //1891 #HANGUL SYLLABLE SSANGTIKEUT EO RIEULKIYEOK + {0x8BBC, 0xB5AC}, //1892 #HANGUL SYLLABLE SSANGTIKEUT EO RIEULSIOS + {0x8BBD, 0xB5AD}, //1893 #HANGUL SYLLABLE SSANGTIKEUT EO RIEULTHIEUTH + {0x8BBE, 0xB5AE}, //1894 #HANGUL SYLLABLE SSANGTIKEUT EO RIEULPHIEUPH + {0x8BBF, 0xB5AF}, //1895 #HANGUL SYLLABLE SSANGTIKEUT EO RIEULHIEUH + {0x8BC0, 0xB5B2}, //1896 #HANGUL SYLLABLE SSANGTIKEUT EO PIEUPSIOS + {0x8BC1, 0xB5B6}, //1897 #HANGUL SYLLABLE SSANGTIKEUT EO CIEUC + {0x8BC2, 0xB5B7}, //1898 #HANGUL SYLLABLE SSANGTIKEUT EO CHIEUCH + {0x8BC3, 0xB5B8}, //1899 #HANGUL SYLLABLE SSANGTIKEUT EO KHIEUKH + {0x8BC4, 0xB5B9}, //1900 #HANGUL SYLLABLE SSANGTIKEUT EO THIEUTH + {0x8BC5, 0xB5BA}, //1901 #HANGUL SYLLABLE SSANGTIKEUT EO PHIEUPH + {0x8BC6, 0xB5BE}, //1902 #HANGUL SYLLABLE SSANGTIKEUT E SSANGKIYEOK + {0x8BC7, 0xB5BF}, //1903 #HANGUL SYLLABLE SSANGTIKEUT E KIYEOKSIOS + {0x8BC8, 0xB5C1}, //1904 #HANGUL SYLLABLE SSANGTIKEUT E NIEUNCIEUC + {0x8BC9, 0xB5C2}, //1905 #HANGUL SYLLABLE SSANGTIKEUT E NIEUNHIEUH + {0x8BCA, 0xB5C3}, //1906 #HANGUL SYLLABLE SSANGTIKEUT E TIKEUT + {0x8BCB, 0xB5C5}, //1907 #HANGUL SYLLABLE SSANGTIKEUT E RIEULKIYEOK + {0x8BCC, 0xB5C6}, //1908 #HANGUL SYLLABLE SSANGTIKEUT E RIEULMIEUM + {0x8BCD, 0xB5C7}, //1909 #HANGUL SYLLABLE SSANGTIKEUT E RIEULPIEUP + {0x8BCE, 0xB5C8}, //1910 #HANGUL SYLLABLE SSANGTIKEUT E RIEULSIOS + {0x8BCF, 0xB5C9}, //1911 #HANGUL SYLLABLE SSANGTIKEUT E RIEULTHIEUTH + {0x8BD0, 0xB5CA}, //1912 #HANGUL SYLLABLE SSANGTIKEUT E RIEULPHIEUPH + {0x8BD1, 0xB5CB}, //1913 #HANGUL SYLLABLE SSANGTIKEUT E RIEULHIEUH + {0x8BD2, 0xB5CE}, //1914 #HANGUL SYLLABLE SSANGTIKEUT E PIEUPSIOS + {0x8BD3, 0xB5D2}, //1915 #HANGUL SYLLABLE SSANGTIKEUT E CIEUC + {0x8BD4, 0xB5D3}, //1916 #HANGUL SYLLABLE SSANGTIKEUT E CHIEUCH + {0x8BD5, 0xB5D4}, //1917 #HANGUL SYLLABLE SSANGTIKEUT E KHIEUKH + {0x8BD6, 0xB5D5}, //1918 #HANGUL SYLLABLE SSANGTIKEUT E THIEUTH + {0x8BD7, 0xB5D6}, //1919 #HANGUL SYLLABLE SSANGTIKEUT E PHIEUPH + {0x8BD8, 0xB5D7}, //1920 #HANGUL SYLLABLE SSANGTIKEUT E HIEUH + {0x8BD9, 0xB5D9}, //1921 #HANGUL SYLLABLE SSANGTIKEUT YEO KIYEOK + {0x8BDA, 0xB5DA}, //1922 #HANGUL SYLLABLE SSANGTIKEUT YEO SSANGKIYEOK + {0x8BDB, 0xB5DB}, //1923 #HANGUL SYLLABLE SSANGTIKEUT YEO KIYEOKSIOS + {0x8BDC, 0xB5DC}, //1924 #HANGUL SYLLABLE SSANGTIKEUT YEO NIEUN + {0x8BDD, 0xB5DD}, //1925 #HANGUL SYLLABLE SSANGTIKEUT YEO NIEUNCIEUC + {0x8BDE, 0xB5DE}, //1926 #HANGUL SYLLABLE SSANGTIKEUT YEO NIEUNHIEUH + {0x8BDF, 0xB5DF}, //1927 #HANGUL SYLLABLE SSANGTIKEUT YEO TIKEUT + {0x8BE0, 0xB5E0}, //1928 #HANGUL SYLLABLE SSANGTIKEUT YEO RIEUL + {0x8BE1, 0xB5E1}, //1929 #HANGUL SYLLABLE SSANGTIKEUT YEO RIEULKIYEOK + {0x8BE2, 0xB5E2}, //1930 #HANGUL SYLLABLE SSANGTIKEUT YEO RIEULMIEUM + {0x8BE3, 0xB5E3}, //1931 #HANGUL SYLLABLE SSANGTIKEUT YEO RIEULPIEUP + {0x8BE4, 0xB5E4}, //1932 #HANGUL SYLLABLE SSANGTIKEUT YEO RIEULSIOS + {0x8BE5, 0xB5E5}, //1933 #HANGUL SYLLABLE SSANGTIKEUT YEO RIEULTHIEUTH + {0x8BE6, 0xB5E6}, //1934 #HANGUL SYLLABLE SSANGTIKEUT YEO RIEULPHIEUPH + {0x8BE7, 0xB5E7}, //1935 #HANGUL SYLLABLE SSANGTIKEUT YEO RIEULHIEUH + {0x8BE8, 0xB5E8}, //1936 #HANGUL SYLLABLE SSANGTIKEUT YEO MIEUM + {0x8BE9, 0xB5E9}, //1937 #HANGUL SYLLABLE SSANGTIKEUT YEO PIEUP + {0x8BEA, 0xB5EA}, //1938 #HANGUL SYLLABLE SSANGTIKEUT YEO PIEUPSIOS + {0x8BEB, 0xB5EB}, //1939 #HANGUL SYLLABLE SSANGTIKEUT YEO SIOS + {0x8BEC, 0xB5ED}, //1940 #HANGUL SYLLABLE SSANGTIKEUT YEO IEUNG + {0x8BED, 0xB5EE}, //1941 #HANGUL SYLLABLE SSANGTIKEUT YEO CIEUC + {0x8BEE, 0xB5EF}, //1942 #HANGUL SYLLABLE SSANGTIKEUT YEO CHIEUCH + {0x8BEF, 0xB5F0}, //1943 #HANGUL SYLLABLE SSANGTIKEUT YEO KHIEUKH + {0x8BF0, 0xB5F1}, //1944 #HANGUL SYLLABLE SSANGTIKEUT YEO THIEUTH + {0x8BF1, 0xB5F2}, //1945 #HANGUL SYLLABLE SSANGTIKEUT YEO PHIEUPH + {0x8BF2, 0xB5F3}, //1946 #HANGUL SYLLABLE SSANGTIKEUT YEO HIEUH + {0x8BF3, 0xB5F4}, //1947 #HANGUL SYLLABLE SSANGTIKEUT YE + {0x8BF4, 0xB5F5}, //1948 #HANGUL SYLLABLE SSANGTIKEUT YE KIYEOK + {0x8BF5, 0xB5F6}, //1949 #HANGUL SYLLABLE SSANGTIKEUT YE SSANGKIYEOK + {0x8BF6, 0xB5F7}, //1950 #HANGUL SYLLABLE SSANGTIKEUT YE KIYEOKSIOS + {0x8BF7, 0xB5F8}, //1951 #HANGUL SYLLABLE SSANGTIKEUT YE NIEUN + {0x8BF8, 0xB5F9}, //1952 #HANGUL SYLLABLE SSANGTIKEUT YE NIEUNCIEUC + {0x8BF9, 0xB5FA}, //1953 #HANGUL SYLLABLE SSANGTIKEUT YE NIEUNHIEUH + {0x8BFA, 0xB5FB}, //1954 #HANGUL SYLLABLE SSANGTIKEUT YE TIKEUT + {0x8BFB, 0xB5FC}, //1955 #HANGUL SYLLABLE SSANGTIKEUT YE RIEUL + {0x8BFC, 0xB5FD}, //1956 #HANGUL SYLLABLE SSANGTIKEUT YE RIEULKIYEOK + {0x8BFD, 0xB5FE}, //1957 #HANGUL SYLLABLE SSANGTIKEUT YE RIEULMIEUM + {0x8BFE, 0xB5FF}, //1958 #HANGUL SYLLABLE SSANGTIKEUT YE RIEULPIEUP + {0x8C41, 0xB600}, //1959 #HANGUL SYLLABLE SSANGTIKEUT YE RIEULSIOS + {0x8C42, 0xB601}, //1960 #HANGUL SYLLABLE SSANGTIKEUT YE RIEULTHIEUTH + {0x8C43, 0xB602}, //1961 #HANGUL SYLLABLE SSANGTIKEUT YE RIEULPHIEUPH + {0x8C44, 0xB603}, //1962 #HANGUL SYLLABLE SSANGTIKEUT YE RIEULHIEUH + {0x8C45, 0xB604}, //1963 #HANGUL SYLLABLE SSANGTIKEUT YE MIEUM + {0x8C46, 0xB605}, //1964 #HANGUL SYLLABLE SSANGTIKEUT YE PIEUP + {0x8C47, 0xB606}, //1965 #HANGUL SYLLABLE SSANGTIKEUT YE PIEUPSIOS + {0x8C48, 0xB607}, //1966 #HANGUL SYLLABLE SSANGTIKEUT YE SIOS + {0x8C49, 0xB608}, //1967 #HANGUL SYLLABLE SSANGTIKEUT YE SSANGSIOS + {0x8C4A, 0xB609}, //1968 #HANGUL SYLLABLE SSANGTIKEUT YE IEUNG + {0x8C4B, 0xB60A}, //1969 #HANGUL SYLLABLE SSANGTIKEUT YE CIEUC + {0x8C4C, 0xB60B}, //1970 #HANGUL SYLLABLE SSANGTIKEUT YE CHIEUCH + {0x8C4D, 0xB60C}, //1971 #HANGUL SYLLABLE SSANGTIKEUT YE KHIEUKH + {0x8C4E, 0xB60D}, //1972 #HANGUL SYLLABLE SSANGTIKEUT YE THIEUTH + {0x8C4F, 0xB60E}, //1973 #HANGUL SYLLABLE SSANGTIKEUT YE PHIEUPH + {0x8C50, 0xB60F}, //1974 #HANGUL SYLLABLE SSANGTIKEUT YE HIEUH + {0x8C51, 0xB612}, //1975 #HANGUL SYLLABLE SSANGTIKEUT O SSANGKIYEOK + {0x8C52, 0xB613}, //1976 #HANGUL SYLLABLE SSANGTIKEUT O KIYEOKSIOS + {0x8C53, 0xB615}, //1977 #HANGUL SYLLABLE SSANGTIKEUT O NIEUNCIEUC + {0x8C54, 0xB616}, //1978 #HANGUL SYLLABLE SSANGTIKEUT O NIEUNHIEUH + {0x8C55, 0xB617}, //1979 #HANGUL SYLLABLE SSANGTIKEUT O TIKEUT + {0x8C56, 0xB619}, //1980 #HANGUL SYLLABLE SSANGTIKEUT O RIEULKIYEOK + {0x8C57, 0xB61A}, //1981 #HANGUL SYLLABLE SSANGTIKEUT O RIEULMIEUM + {0x8C58, 0xB61B}, //1982 #HANGUL SYLLABLE SSANGTIKEUT O RIEULPIEUP + {0x8C59, 0xB61C}, //1983 #HANGUL SYLLABLE SSANGTIKEUT O RIEULSIOS + {0x8C5A, 0xB61D}, //1984 #HANGUL SYLLABLE SSANGTIKEUT O RIEULTHIEUTH + {0x8C61, 0xB61E}, //1985 #HANGUL SYLLABLE SSANGTIKEUT O RIEULPHIEUPH + {0x8C62, 0xB61F}, //1986 #HANGUL SYLLABLE SSANGTIKEUT O RIEULHIEUH + {0x8C63, 0xB620}, //1987 #HANGUL SYLLABLE SSANGTIKEUT O MIEUM + {0x8C64, 0xB621}, //1988 #HANGUL SYLLABLE SSANGTIKEUT O PIEUP + {0x8C65, 0xB622}, //1989 #HANGUL SYLLABLE SSANGTIKEUT O PIEUPSIOS + {0x8C66, 0xB623}, //1990 #HANGUL SYLLABLE SSANGTIKEUT O SIOS + {0x8C67, 0xB624}, //1991 #HANGUL SYLLABLE SSANGTIKEUT O SSANGSIOS + {0x8C68, 0xB626}, //1992 #HANGUL SYLLABLE SSANGTIKEUT O CIEUC + {0x8C69, 0xB627}, //1993 #HANGUL SYLLABLE SSANGTIKEUT O CHIEUCH + {0x8C6A, 0xB628}, //1994 #HANGUL SYLLABLE SSANGTIKEUT O KHIEUKH + {0x8C6B, 0xB629}, //1995 #HANGUL SYLLABLE SSANGTIKEUT O THIEUTH + {0x8C6C, 0xB62A}, //1996 #HANGUL SYLLABLE SSANGTIKEUT O PHIEUPH + {0x8C6D, 0xB62B}, //1997 #HANGUL SYLLABLE SSANGTIKEUT O HIEUH + {0x8C6E, 0xB62D}, //1998 #HANGUL SYLLABLE SSANGTIKEUT WA KIYEOK + {0x8C6F, 0xB62E}, //1999 #HANGUL SYLLABLE SSANGTIKEUT WA SSANGKIYEOK + {0x8C70, 0xB62F}, //2000 #HANGUL SYLLABLE SSANGTIKEUT WA KIYEOKSIOS + {0x8C71, 0xB630}, //2001 #HANGUL SYLLABLE SSANGTIKEUT WA NIEUN + {0x8C72, 0xB631}, //2002 #HANGUL SYLLABLE SSANGTIKEUT WA NIEUNCIEUC + {0x8C73, 0xB632}, //2003 #HANGUL SYLLABLE SSANGTIKEUT WA NIEUNHIEUH + {0x8C74, 0xB633}, //2004 #HANGUL SYLLABLE SSANGTIKEUT WA TIKEUT + {0x8C75, 0xB635}, //2005 #HANGUL SYLLABLE SSANGTIKEUT WA RIEULKIYEOK + {0x8C76, 0xB636}, //2006 #HANGUL SYLLABLE SSANGTIKEUT WA RIEULMIEUM + {0x8C77, 0xB637}, //2007 #HANGUL SYLLABLE SSANGTIKEUT WA RIEULPIEUP + {0x8C78, 0xB638}, //2008 #HANGUL SYLLABLE SSANGTIKEUT WA RIEULSIOS + {0x8C79, 0xB639}, //2009 #HANGUL SYLLABLE SSANGTIKEUT WA RIEULTHIEUTH + {0x8C7A, 0xB63A}, //2010 #HANGUL SYLLABLE SSANGTIKEUT WA RIEULPHIEUPH + {0x8C81, 0xB63B}, //2011 #HANGUL SYLLABLE SSANGTIKEUT WA RIEULHIEUH + {0x8C82, 0xB63C}, //2012 #HANGUL SYLLABLE SSANGTIKEUT WA MIEUM + {0x8C83, 0xB63D}, //2013 #HANGUL SYLLABLE SSANGTIKEUT WA PIEUP + {0x8C84, 0xB63E}, //2014 #HANGUL SYLLABLE SSANGTIKEUT WA PIEUPSIOS + {0x8C85, 0xB63F}, //2015 #HANGUL SYLLABLE SSANGTIKEUT WA SIOS + {0x8C86, 0xB640}, //2016 #HANGUL SYLLABLE SSANGTIKEUT WA SSANGSIOS + {0x8C87, 0xB641}, //2017 #HANGUL SYLLABLE SSANGTIKEUT WA IEUNG + {0x8C88, 0xB642}, //2018 #HANGUL SYLLABLE SSANGTIKEUT WA CIEUC + {0x8C89, 0xB643}, //2019 #HANGUL SYLLABLE SSANGTIKEUT WA CHIEUCH + {0x8C8A, 0xB644}, //2020 #HANGUL SYLLABLE SSANGTIKEUT WA KHIEUKH + {0x8C8B, 0xB645}, //2021 #HANGUL SYLLABLE SSANGTIKEUT WA THIEUTH + {0x8C8C, 0xB646}, //2022 #HANGUL SYLLABLE SSANGTIKEUT WA PHIEUPH + {0x8C8D, 0xB647}, //2023 #HANGUL SYLLABLE SSANGTIKEUT WA HIEUH + {0x8C8E, 0xB649}, //2024 #HANGUL SYLLABLE SSANGTIKEUT WAE KIYEOK + {0x8C8F, 0xB64A}, //2025 #HANGUL SYLLABLE SSANGTIKEUT WAE SSANGKIYEOK + {0x8C90, 0xB64B}, //2026 #HANGUL SYLLABLE SSANGTIKEUT WAE KIYEOKSIOS + {0x8C91, 0xB64C}, //2027 #HANGUL SYLLABLE SSANGTIKEUT WAE NIEUN + {0x8C92, 0xB64D}, //2028 #HANGUL SYLLABLE SSANGTIKEUT WAE NIEUNCIEUC + {0x8C93, 0xB64E}, //2029 #HANGUL SYLLABLE SSANGTIKEUT WAE NIEUNHIEUH + {0x8C94, 0xB64F}, //2030 #HANGUL SYLLABLE SSANGTIKEUT WAE TIKEUT + {0x8C95, 0xB650}, //2031 #HANGUL SYLLABLE SSANGTIKEUT WAE RIEUL + {0x8C96, 0xB651}, //2032 #HANGUL SYLLABLE SSANGTIKEUT WAE RIEULKIYEOK + {0x8C97, 0xB652}, //2033 #HANGUL SYLLABLE SSANGTIKEUT WAE RIEULMIEUM + {0x8C98, 0xB653}, //2034 #HANGUL SYLLABLE SSANGTIKEUT WAE RIEULPIEUP + {0x8C99, 0xB654}, //2035 #HANGUL SYLLABLE SSANGTIKEUT WAE RIEULSIOS + {0x8C9A, 0xB655}, //2036 #HANGUL SYLLABLE SSANGTIKEUT WAE RIEULTHIEUTH + {0x8C9B, 0xB656}, //2037 #HANGUL SYLLABLE SSANGTIKEUT WAE RIEULPHIEUPH + {0x8C9C, 0xB657}, //2038 #HANGUL SYLLABLE SSANGTIKEUT WAE RIEULHIEUH + {0x8C9D, 0xB658}, //2039 #HANGUL SYLLABLE SSANGTIKEUT WAE MIEUM + {0x8C9E, 0xB659}, //2040 #HANGUL SYLLABLE SSANGTIKEUT WAE PIEUP + {0x8C9F, 0xB65A}, //2041 #HANGUL SYLLABLE SSANGTIKEUT WAE PIEUPSIOS + {0x8CA0, 0xB65B}, //2042 #HANGUL SYLLABLE SSANGTIKEUT WAE SIOS + {0x8CA1, 0xB65C}, //2043 #HANGUL SYLLABLE SSANGTIKEUT WAE SSANGSIOS + {0x8CA2, 0xB65D}, //2044 #HANGUL SYLLABLE SSANGTIKEUT WAE IEUNG + {0x8CA3, 0xB65E}, //2045 #HANGUL SYLLABLE SSANGTIKEUT WAE CIEUC + {0x8CA4, 0xB65F}, //2046 #HANGUL SYLLABLE SSANGTIKEUT WAE CHIEUCH + {0x8CA5, 0xB660}, //2047 #HANGUL SYLLABLE SSANGTIKEUT WAE KHIEUKH + {0x8CA6, 0xB661}, //2048 #HANGUL SYLLABLE SSANGTIKEUT WAE THIEUTH + {0x8CA7, 0xB662}, //2049 #HANGUL SYLLABLE SSANGTIKEUT WAE PHIEUPH + {0x8CA8, 0xB663}, //2050 #HANGUL SYLLABLE SSANGTIKEUT WAE HIEUH + {0x8CA9, 0xB665}, //2051 #HANGUL SYLLABLE SSANGTIKEUT OE KIYEOK + {0x8CAA, 0xB666}, //2052 #HANGUL SYLLABLE SSANGTIKEUT OE SSANGKIYEOK + {0x8CAB, 0xB667}, //2053 #HANGUL SYLLABLE SSANGTIKEUT OE KIYEOKSIOS + {0x8CAC, 0xB669}, //2054 #HANGUL SYLLABLE SSANGTIKEUT OE NIEUNCIEUC + {0x8CAD, 0xB66A}, //2055 #HANGUL SYLLABLE SSANGTIKEUT OE NIEUNHIEUH + {0x8CAE, 0xB66B}, //2056 #HANGUL SYLLABLE SSANGTIKEUT OE TIKEUT + {0x8CAF, 0xB66C}, //2057 #HANGUL SYLLABLE SSANGTIKEUT OE RIEUL + {0x8CB0, 0xB66D}, //2058 #HANGUL SYLLABLE SSANGTIKEUT OE RIEULKIYEOK + {0x8CB1, 0xB66E}, //2059 #HANGUL SYLLABLE SSANGTIKEUT OE RIEULMIEUM + {0x8CB2, 0xB66F}, //2060 #HANGUL SYLLABLE SSANGTIKEUT OE RIEULPIEUP + {0x8CB3, 0xB670}, //2061 #HANGUL SYLLABLE SSANGTIKEUT OE RIEULSIOS + {0x8CB4, 0xB671}, //2062 #HANGUL SYLLABLE SSANGTIKEUT OE RIEULTHIEUTH + {0x8CB5, 0xB672}, //2063 #HANGUL SYLLABLE SSANGTIKEUT OE RIEULPHIEUPH + {0x8CB6, 0xB673}, //2064 #HANGUL SYLLABLE SSANGTIKEUT OE RIEULHIEUH + {0x8CB7, 0xB674}, //2065 #HANGUL SYLLABLE SSANGTIKEUT OE MIEUM + {0x8CB8, 0xB675}, //2066 #HANGUL SYLLABLE SSANGTIKEUT OE PIEUP + {0x8CB9, 0xB676}, //2067 #HANGUL SYLLABLE SSANGTIKEUT OE PIEUPSIOS + {0x8CBA, 0xB677}, //2068 #HANGUL SYLLABLE SSANGTIKEUT OE SIOS + {0x8CBB, 0xB678}, //2069 #HANGUL SYLLABLE SSANGTIKEUT OE SSANGSIOS + {0x8CBC, 0xB679}, //2070 #HANGUL SYLLABLE SSANGTIKEUT OE IEUNG + {0x8CBD, 0xB67A}, //2071 #HANGUL SYLLABLE SSANGTIKEUT OE CIEUC + {0x8CBE, 0xB67B}, //2072 #HANGUL SYLLABLE SSANGTIKEUT OE CHIEUCH + {0x8CBF, 0xB67C}, //2073 #HANGUL SYLLABLE SSANGTIKEUT OE KHIEUKH + {0x8CC0, 0xB67D}, //2074 #HANGUL SYLLABLE SSANGTIKEUT OE THIEUTH + {0x8CC1, 0xB67E}, //2075 #HANGUL SYLLABLE SSANGTIKEUT OE PHIEUPH + {0x8CC2, 0xB67F}, //2076 #HANGUL SYLLABLE SSANGTIKEUT OE HIEUH + {0x8CC3, 0xB680}, //2077 #HANGUL SYLLABLE SSANGTIKEUT YO + {0x8CC4, 0xB681}, //2078 #HANGUL SYLLABLE SSANGTIKEUT YO KIYEOK + {0x8CC5, 0xB682}, //2079 #HANGUL SYLLABLE SSANGTIKEUT YO SSANGKIYEOK + {0x8CC6, 0xB683}, //2080 #HANGUL SYLLABLE SSANGTIKEUT YO KIYEOKSIOS + {0x8CC7, 0xB684}, //2081 #HANGUL SYLLABLE SSANGTIKEUT YO NIEUN + {0x8CC8, 0xB685}, //2082 #HANGUL SYLLABLE SSANGTIKEUT YO NIEUNCIEUC + {0x8CC9, 0xB686}, //2083 #HANGUL SYLLABLE SSANGTIKEUT YO NIEUNHIEUH + {0x8CCA, 0xB687}, //2084 #HANGUL SYLLABLE SSANGTIKEUT YO TIKEUT + {0x8CCB, 0xB688}, //2085 #HANGUL SYLLABLE SSANGTIKEUT YO RIEUL + {0x8CCC, 0xB689}, //2086 #HANGUL SYLLABLE SSANGTIKEUT YO RIEULKIYEOK + {0x8CCD, 0xB68A}, //2087 #HANGUL SYLLABLE SSANGTIKEUT YO RIEULMIEUM + {0x8CCE, 0xB68B}, //2088 #HANGUL SYLLABLE SSANGTIKEUT YO RIEULPIEUP + {0x8CCF, 0xB68C}, //2089 #HANGUL SYLLABLE SSANGTIKEUT YO RIEULSIOS + {0x8CD0, 0xB68D}, //2090 #HANGUL SYLLABLE SSANGTIKEUT YO RIEULTHIEUTH + {0x8CD1, 0xB68E}, //2091 #HANGUL SYLLABLE SSANGTIKEUT YO RIEULPHIEUPH + {0x8CD2, 0xB68F}, //2092 #HANGUL SYLLABLE SSANGTIKEUT YO RIEULHIEUH + {0x8CD3, 0xB690}, //2093 #HANGUL SYLLABLE SSANGTIKEUT YO MIEUM + {0x8CD4, 0xB691}, //2094 #HANGUL SYLLABLE SSANGTIKEUT YO PIEUP + {0x8CD5, 0xB692}, //2095 #HANGUL SYLLABLE SSANGTIKEUT YO PIEUPSIOS + {0x8CD6, 0xB693}, //2096 #HANGUL SYLLABLE SSANGTIKEUT YO SIOS + {0x8CD7, 0xB694}, //2097 #HANGUL SYLLABLE SSANGTIKEUT YO SSANGSIOS + {0x8CD8, 0xB695}, //2098 #HANGUL SYLLABLE SSANGTIKEUT YO IEUNG + {0x8CD9, 0xB696}, //2099 #HANGUL SYLLABLE SSANGTIKEUT YO CIEUC + {0x8CDA, 0xB697}, //2100 #HANGUL SYLLABLE SSANGTIKEUT YO CHIEUCH + {0x8CDB, 0xB698}, //2101 #HANGUL SYLLABLE SSANGTIKEUT YO KHIEUKH + {0x8CDC, 0xB699}, //2102 #HANGUL SYLLABLE SSANGTIKEUT YO THIEUTH + {0x8CDD, 0xB69A}, //2103 #HANGUL SYLLABLE SSANGTIKEUT YO PHIEUPH + {0x8CDE, 0xB69B}, //2104 #HANGUL SYLLABLE SSANGTIKEUT YO HIEUH + {0x8CDF, 0xB69E}, //2105 #HANGUL SYLLABLE SSANGTIKEUT U SSANGKIYEOK + {0x8CE0, 0xB69F}, //2106 #HANGUL SYLLABLE SSANGTIKEUT U KIYEOKSIOS + {0x8CE1, 0xB6A1}, //2107 #HANGUL SYLLABLE SSANGTIKEUT U NIEUNCIEUC + {0x8CE2, 0xB6A2}, //2108 #HANGUL SYLLABLE SSANGTIKEUT U NIEUNHIEUH + {0x8CE3, 0xB6A3}, //2109 #HANGUL SYLLABLE SSANGTIKEUT U TIKEUT + {0x8CE4, 0xB6A5}, //2110 #HANGUL SYLLABLE SSANGTIKEUT U RIEULKIYEOK + {0x8CE5, 0xB6A6}, //2111 #HANGUL SYLLABLE SSANGTIKEUT U RIEULMIEUM + {0x8CE6, 0xB6A7}, //2112 #HANGUL SYLLABLE SSANGTIKEUT U RIEULPIEUP + {0x8CE7, 0xB6A8}, //2113 #HANGUL SYLLABLE SSANGTIKEUT U RIEULSIOS + {0x8CE8, 0xB6A9}, //2114 #HANGUL SYLLABLE SSANGTIKEUT U RIEULTHIEUTH + {0x8CE9, 0xB6AA}, //2115 #HANGUL SYLLABLE SSANGTIKEUT U RIEULPHIEUPH + {0x8CEA, 0xB6AD}, //2116 #HANGUL SYLLABLE SSANGTIKEUT U PIEUP + {0x8CEB, 0xB6AE}, //2117 #HANGUL SYLLABLE SSANGTIKEUT U PIEUPSIOS + {0x8CEC, 0xB6AF}, //2118 #HANGUL SYLLABLE SSANGTIKEUT U SIOS + {0x8CED, 0xB6B0}, //2119 #HANGUL SYLLABLE SSANGTIKEUT U SSANGSIOS + {0x8CEE, 0xB6B2}, //2120 #HANGUL SYLLABLE SSANGTIKEUT U CIEUC + {0x8CEF, 0xB6B3}, //2121 #HANGUL SYLLABLE SSANGTIKEUT U CHIEUCH + {0x8CF0, 0xB6B4}, //2122 #HANGUL SYLLABLE SSANGTIKEUT U KHIEUKH + {0x8CF1, 0xB6B5}, //2123 #HANGUL SYLLABLE SSANGTIKEUT U THIEUTH + {0x8CF2, 0xB6B6}, //2124 #HANGUL SYLLABLE SSANGTIKEUT U PHIEUPH + {0x8CF3, 0xB6B7}, //2125 #HANGUL SYLLABLE SSANGTIKEUT U HIEUH + {0x8CF4, 0xB6B8}, //2126 #HANGUL SYLLABLE SSANGTIKEUT WEO + {0x8CF5, 0xB6B9}, //2127 #HANGUL SYLLABLE SSANGTIKEUT WEO KIYEOK + {0x8CF6, 0xB6BA}, //2128 #HANGUL SYLLABLE SSANGTIKEUT WEO SSANGKIYEOK + {0x8CF7, 0xB6BB}, //2129 #HANGUL SYLLABLE SSANGTIKEUT WEO KIYEOKSIOS + {0x8CF8, 0xB6BC}, //2130 #HANGUL SYLLABLE SSANGTIKEUT WEO NIEUN + {0x8CF9, 0xB6BD}, //2131 #HANGUL SYLLABLE SSANGTIKEUT WEO NIEUNCIEUC + {0x8CFA, 0xB6BE}, //2132 #HANGUL SYLLABLE SSANGTIKEUT WEO NIEUNHIEUH + {0x8CFB, 0xB6BF}, //2133 #HANGUL SYLLABLE SSANGTIKEUT WEO TIKEUT + {0x8CFC, 0xB6C0}, //2134 #HANGUL SYLLABLE SSANGTIKEUT WEO RIEUL + {0x8CFD, 0xB6C1}, //2135 #HANGUL SYLLABLE SSANGTIKEUT WEO RIEULKIYEOK + {0x8CFE, 0xB6C2}, //2136 #HANGUL SYLLABLE SSANGTIKEUT WEO RIEULMIEUM + {0x8D41, 0xB6C3}, //2137 #HANGUL SYLLABLE SSANGTIKEUT WEO RIEULPIEUP + {0x8D42, 0xB6C4}, //2138 #HANGUL SYLLABLE SSANGTIKEUT WEO RIEULSIOS + {0x8D43, 0xB6C5}, //2139 #HANGUL SYLLABLE SSANGTIKEUT WEO RIEULTHIEUTH + {0x8D44, 0xB6C6}, //2140 #HANGUL SYLLABLE SSANGTIKEUT WEO RIEULPHIEUPH + {0x8D45, 0xB6C7}, //2141 #HANGUL SYLLABLE SSANGTIKEUT WEO RIEULHIEUH + {0x8D46, 0xB6C8}, //2142 #HANGUL SYLLABLE SSANGTIKEUT WEO MIEUM + {0x8D47, 0xB6C9}, //2143 #HANGUL SYLLABLE SSANGTIKEUT WEO PIEUP + {0x8D48, 0xB6CA}, //2144 #HANGUL SYLLABLE SSANGTIKEUT WEO PIEUPSIOS + {0x8D49, 0xB6CB}, //2145 #HANGUL SYLLABLE SSANGTIKEUT WEO SIOS + {0x8D4A, 0xB6CC}, //2146 #HANGUL SYLLABLE SSANGTIKEUT WEO SSANGSIOS + {0x8D4B, 0xB6CD}, //2147 #HANGUL SYLLABLE SSANGTIKEUT WEO IEUNG + {0x8D4C, 0xB6CE}, //2148 #HANGUL SYLLABLE SSANGTIKEUT WEO CIEUC + {0x8D4D, 0xB6CF}, //2149 #HANGUL SYLLABLE SSANGTIKEUT WEO CHIEUCH + {0x8D4E, 0xB6D0}, //2150 #HANGUL SYLLABLE SSANGTIKEUT WEO KHIEUKH + {0x8D4F, 0xB6D1}, //2151 #HANGUL SYLLABLE SSANGTIKEUT WEO THIEUTH + {0x8D50, 0xB6D2}, //2152 #HANGUL SYLLABLE SSANGTIKEUT WEO PHIEUPH + {0x8D51, 0xB6D3}, //2153 #HANGUL SYLLABLE SSANGTIKEUT WEO HIEUH + {0x8D52, 0xB6D5}, //2154 #HANGUL SYLLABLE SSANGTIKEUT WE KIYEOK + {0x8D53, 0xB6D6}, //2155 #HANGUL SYLLABLE SSANGTIKEUT WE SSANGKIYEOK + {0x8D54, 0xB6D7}, //2156 #HANGUL SYLLABLE SSANGTIKEUT WE KIYEOKSIOS + {0x8D55, 0xB6D8}, //2157 #HANGUL SYLLABLE SSANGTIKEUT WE NIEUN + {0x8D56, 0xB6D9}, //2158 #HANGUL SYLLABLE SSANGTIKEUT WE NIEUNCIEUC + {0x8D57, 0xB6DA}, //2159 #HANGUL SYLLABLE SSANGTIKEUT WE NIEUNHIEUH + {0x8D58, 0xB6DB}, //2160 #HANGUL SYLLABLE SSANGTIKEUT WE TIKEUT + {0x8D59, 0xB6DC}, //2161 #HANGUL SYLLABLE SSANGTIKEUT WE RIEUL + {0x8D5A, 0xB6DD}, //2162 #HANGUL SYLLABLE SSANGTIKEUT WE RIEULKIYEOK + {0x8D61, 0xB6DE}, //2163 #HANGUL SYLLABLE SSANGTIKEUT WE RIEULMIEUM + {0x8D62, 0xB6DF}, //2164 #HANGUL SYLLABLE SSANGTIKEUT WE RIEULPIEUP + {0x8D63, 0xB6E0}, //2165 #HANGUL SYLLABLE SSANGTIKEUT WE RIEULSIOS + {0x8D64, 0xB6E1}, //2166 #HANGUL SYLLABLE SSANGTIKEUT WE RIEULTHIEUTH + {0x8D65, 0xB6E2}, //2167 #HANGUL SYLLABLE SSANGTIKEUT WE RIEULPHIEUPH + {0x8D66, 0xB6E3}, //2168 #HANGUL SYLLABLE SSANGTIKEUT WE RIEULHIEUH + {0x8D67, 0xB6E4}, //2169 #HANGUL SYLLABLE SSANGTIKEUT WE MIEUM + {0x8D68, 0xB6E5}, //2170 #HANGUL SYLLABLE SSANGTIKEUT WE PIEUP + {0x8D69, 0xB6E6}, //2171 #HANGUL SYLLABLE SSANGTIKEUT WE PIEUPSIOS + {0x8D6A, 0xB6E7}, //2172 #HANGUL SYLLABLE SSANGTIKEUT WE SIOS + {0x8D6B, 0xB6E8}, //2173 #HANGUL SYLLABLE SSANGTIKEUT WE SSANGSIOS + {0x8D6C, 0xB6E9}, //2174 #HANGUL SYLLABLE SSANGTIKEUT WE IEUNG + {0x8D6D, 0xB6EA}, //2175 #HANGUL SYLLABLE SSANGTIKEUT WE CIEUC + {0x8D6E, 0xB6EB}, //2176 #HANGUL SYLLABLE SSANGTIKEUT WE CHIEUCH + {0x8D6F, 0xB6EC}, //2177 #HANGUL SYLLABLE SSANGTIKEUT WE KHIEUKH + {0x8D70, 0xB6ED}, //2178 #HANGUL SYLLABLE SSANGTIKEUT WE THIEUTH + {0x8D71, 0xB6EE}, //2179 #HANGUL SYLLABLE SSANGTIKEUT WE PHIEUPH + {0x8D72, 0xB6EF}, //2180 #HANGUL SYLLABLE SSANGTIKEUT WE HIEUH + {0x8D73, 0xB6F1}, //2181 #HANGUL SYLLABLE SSANGTIKEUT WI KIYEOK + {0x8D74, 0xB6F2}, //2182 #HANGUL SYLLABLE SSANGTIKEUT WI SSANGKIYEOK + {0x8D75, 0xB6F3}, //2183 #HANGUL SYLLABLE SSANGTIKEUT WI KIYEOKSIOS + {0x8D76, 0xB6F5}, //2184 #HANGUL SYLLABLE SSANGTIKEUT WI NIEUNCIEUC + {0x8D77, 0xB6F6}, //2185 #HANGUL SYLLABLE SSANGTIKEUT WI NIEUNHIEUH + {0x8D78, 0xB6F7}, //2186 #HANGUL SYLLABLE SSANGTIKEUT WI TIKEUT + {0x8D79, 0xB6F9}, //2187 #HANGUL SYLLABLE SSANGTIKEUT WI RIEULKIYEOK + {0x8D7A, 0xB6FA}, //2188 #HANGUL SYLLABLE SSANGTIKEUT WI RIEULMIEUM + {0x8D81, 0xB6FB}, //2189 #HANGUL SYLLABLE SSANGTIKEUT WI RIEULPIEUP + {0x8D82, 0xB6FC}, //2190 #HANGUL SYLLABLE SSANGTIKEUT WI RIEULSIOS + {0x8D83, 0xB6FD}, //2191 #HANGUL SYLLABLE SSANGTIKEUT WI RIEULTHIEUTH + {0x8D84, 0xB6FE}, //2192 #HANGUL SYLLABLE SSANGTIKEUT WI RIEULPHIEUPH + {0x8D85, 0xB6FF}, //2193 #HANGUL SYLLABLE SSANGTIKEUT WI RIEULHIEUH + {0x8D86, 0xB702}, //2194 #HANGUL SYLLABLE SSANGTIKEUT WI PIEUPSIOS + {0x8D87, 0xB703}, //2195 #HANGUL SYLLABLE SSANGTIKEUT WI SIOS + {0x8D88, 0xB704}, //2196 #HANGUL SYLLABLE SSANGTIKEUT WI SSANGSIOS + {0x8D89, 0xB706}, //2197 #HANGUL SYLLABLE SSANGTIKEUT WI CIEUC + {0x8D8A, 0xB707}, //2198 #HANGUL SYLLABLE SSANGTIKEUT WI CHIEUCH + {0x8D8B, 0xB708}, //2199 #HANGUL SYLLABLE SSANGTIKEUT WI KHIEUKH + {0x8D8C, 0xB709}, //2200 #HANGUL SYLLABLE SSANGTIKEUT WI THIEUTH + {0x8D8D, 0xB70A}, //2201 #HANGUL SYLLABLE SSANGTIKEUT WI PHIEUPH + {0x8D8E, 0xB70B}, //2202 #HANGUL SYLLABLE SSANGTIKEUT WI HIEUH + {0x8D8F, 0xB70C}, //2203 #HANGUL SYLLABLE SSANGTIKEUT YU + {0x8D90, 0xB70D}, //2204 #HANGUL SYLLABLE SSANGTIKEUT YU KIYEOK + {0x8D91, 0xB70E}, //2205 #HANGUL SYLLABLE SSANGTIKEUT YU SSANGKIYEOK + {0x8D92, 0xB70F}, //2206 #HANGUL SYLLABLE SSANGTIKEUT YU KIYEOKSIOS + {0x8D93, 0xB710}, //2207 #HANGUL SYLLABLE SSANGTIKEUT YU NIEUN + {0x8D94, 0xB711}, //2208 #HANGUL SYLLABLE SSANGTIKEUT YU NIEUNCIEUC + {0x8D95, 0xB712}, //2209 #HANGUL SYLLABLE SSANGTIKEUT YU NIEUNHIEUH + {0x8D96, 0xB713}, //2210 #HANGUL SYLLABLE SSANGTIKEUT YU TIKEUT + {0x8D97, 0xB714}, //2211 #HANGUL SYLLABLE SSANGTIKEUT YU RIEUL + {0x8D98, 0xB715}, //2212 #HANGUL SYLLABLE SSANGTIKEUT YU RIEULKIYEOK + {0x8D99, 0xB716}, //2213 #HANGUL SYLLABLE SSANGTIKEUT YU RIEULMIEUM + {0x8D9A, 0xB717}, //2214 #HANGUL SYLLABLE SSANGTIKEUT YU RIEULPIEUP + {0x8D9B, 0xB718}, //2215 #HANGUL SYLLABLE SSANGTIKEUT YU RIEULSIOS + {0x8D9C, 0xB719}, //2216 #HANGUL SYLLABLE SSANGTIKEUT YU RIEULTHIEUTH + {0x8D9D, 0xB71A}, //2217 #HANGUL SYLLABLE SSANGTIKEUT YU RIEULPHIEUPH + {0x8D9E, 0xB71B}, //2218 #HANGUL SYLLABLE SSANGTIKEUT YU RIEULHIEUH + {0x8D9F, 0xB71C}, //2219 #HANGUL SYLLABLE SSANGTIKEUT YU MIEUM + {0x8DA0, 0xB71D}, //2220 #HANGUL SYLLABLE SSANGTIKEUT YU PIEUP + {0x8DA1, 0xB71E}, //2221 #HANGUL SYLLABLE SSANGTIKEUT YU PIEUPSIOS + {0x8DA2, 0xB71F}, //2222 #HANGUL SYLLABLE SSANGTIKEUT YU SIOS + {0x8DA3, 0xB720}, //2223 #HANGUL SYLLABLE SSANGTIKEUT YU SSANGSIOS + {0x8DA4, 0xB721}, //2224 #HANGUL SYLLABLE SSANGTIKEUT YU IEUNG + {0x8DA5, 0xB722}, //2225 #HANGUL SYLLABLE SSANGTIKEUT YU CIEUC + {0x8DA6, 0xB723}, //2226 #HANGUL SYLLABLE SSANGTIKEUT YU CHIEUCH + {0x8DA7, 0xB724}, //2227 #HANGUL SYLLABLE SSANGTIKEUT YU KHIEUKH + {0x8DA8, 0xB725}, //2228 #HANGUL SYLLABLE SSANGTIKEUT YU THIEUTH + {0x8DA9, 0xB726}, //2229 #HANGUL SYLLABLE SSANGTIKEUT YU PHIEUPH + {0x8DAA, 0xB727}, //2230 #HANGUL SYLLABLE SSANGTIKEUT YU HIEUH + {0x8DAB, 0xB72A}, //2231 #HANGUL SYLLABLE SSANGTIKEUT EU SSANGKIYEOK + {0x8DAC, 0xB72B}, //2232 #HANGUL SYLLABLE SSANGTIKEUT EU KIYEOKSIOS + {0x8DAD, 0xB72D}, //2233 #HANGUL SYLLABLE SSANGTIKEUT EU NIEUNCIEUC + {0x8DAE, 0xB72E}, //2234 #HANGUL SYLLABLE SSANGTIKEUT EU NIEUNHIEUH + {0x8DAF, 0xB731}, //2235 #HANGUL SYLLABLE SSANGTIKEUT EU RIEULKIYEOK + {0x8DB0, 0xB732}, //2236 #HANGUL SYLLABLE SSANGTIKEUT EU RIEULMIEUM + {0x8DB1, 0xB733}, //2237 #HANGUL SYLLABLE SSANGTIKEUT EU RIEULPIEUP + {0x8DB2, 0xB734}, //2238 #HANGUL SYLLABLE SSANGTIKEUT EU RIEULSIOS + {0x8DB3, 0xB735}, //2239 #HANGUL SYLLABLE SSANGTIKEUT EU RIEULTHIEUTH + {0x8DB4, 0xB736}, //2240 #HANGUL SYLLABLE SSANGTIKEUT EU RIEULPHIEUPH + {0x8DB5, 0xB737}, //2241 #HANGUL SYLLABLE SSANGTIKEUT EU RIEULHIEUH + {0x8DB6, 0xB73A}, //2242 #HANGUL SYLLABLE SSANGTIKEUT EU PIEUPSIOS + {0x8DB7, 0xB73C}, //2243 #HANGUL SYLLABLE SSANGTIKEUT EU SSANGSIOS + {0x8DB8, 0xB73D}, //2244 #HANGUL SYLLABLE SSANGTIKEUT EU IEUNG + {0x8DB9, 0xB73E}, //2245 #HANGUL SYLLABLE SSANGTIKEUT EU CIEUC + {0x8DBA, 0xB73F}, //2246 #HANGUL SYLLABLE SSANGTIKEUT EU CHIEUCH + {0x8DBB, 0xB740}, //2247 #HANGUL SYLLABLE SSANGTIKEUT EU KHIEUKH + {0x8DBC, 0xB741}, //2248 #HANGUL SYLLABLE SSANGTIKEUT EU THIEUTH + {0x8DBD, 0xB742}, //2249 #HANGUL SYLLABLE SSANGTIKEUT EU PHIEUPH + {0x8DBE, 0xB743}, //2250 #HANGUL SYLLABLE SSANGTIKEUT EU HIEUH + {0x8DBF, 0xB745}, //2251 #HANGUL SYLLABLE SSANGTIKEUT YI KIYEOK + {0x8DC0, 0xB746}, //2252 #HANGUL SYLLABLE SSANGTIKEUT YI SSANGKIYEOK + {0x8DC1, 0xB747}, //2253 #HANGUL SYLLABLE SSANGTIKEUT YI KIYEOKSIOS + {0x8DC2, 0xB749}, //2254 #HANGUL SYLLABLE SSANGTIKEUT YI NIEUNCIEUC + {0x8DC3, 0xB74A}, //2255 #HANGUL SYLLABLE SSANGTIKEUT YI NIEUNHIEUH + {0x8DC4, 0xB74B}, //2256 #HANGUL SYLLABLE SSANGTIKEUT YI TIKEUT + {0x8DC5, 0xB74D}, //2257 #HANGUL SYLLABLE SSANGTIKEUT YI RIEULKIYEOK + {0x8DC6, 0xB74E}, //2258 #HANGUL SYLLABLE SSANGTIKEUT YI RIEULMIEUM + {0x8DC7, 0xB74F}, //2259 #HANGUL SYLLABLE SSANGTIKEUT YI RIEULPIEUP + {0x8DC8, 0xB750}, //2260 #HANGUL SYLLABLE SSANGTIKEUT YI RIEULSIOS + {0x8DC9, 0xB751}, //2261 #HANGUL SYLLABLE SSANGTIKEUT YI RIEULTHIEUTH + {0x8DCA, 0xB752}, //2262 #HANGUL SYLLABLE SSANGTIKEUT YI RIEULPHIEUPH + {0x8DCB, 0xB753}, //2263 #HANGUL SYLLABLE SSANGTIKEUT YI RIEULHIEUH + {0x8DCC, 0xB756}, //2264 #HANGUL SYLLABLE SSANGTIKEUT YI PIEUPSIOS + {0x8DCD, 0xB757}, //2265 #HANGUL SYLLABLE SSANGTIKEUT YI SIOS + {0x8DCE, 0xB758}, //2266 #HANGUL SYLLABLE SSANGTIKEUT YI SSANGSIOS + {0x8DCF, 0xB759}, //2267 #HANGUL SYLLABLE SSANGTIKEUT YI IEUNG + {0x8DD0, 0xB75A}, //2268 #HANGUL SYLLABLE SSANGTIKEUT YI CIEUC + {0x8DD1, 0xB75B}, //2269 #HANGUL SYLLABLE SSANGTIKEUT YI CHIEUCH + {0x8DD2, 0xB75C}, //2270 #HANGUL SYLLABLE SSANGTIKEUT YI KHIEUKH + {0x8DD3, 0xB75D}, //2271 #HANGUL SYLLABLE SSANGTIKEUT YI THIEUTH + {0x8DD4, 0xB75E}, //2272 #HANGUL SYLLABLE SSANGTIKEUT YI PHIEUPH + {0x8DD5, 0xB75F}, //2273 #HANGUL SYLLABLE SSANGTIKEUT YI HIEUH + {0x8DD6, 0xB761}, //2274 #HANGUL SYLLABLE SSANGTIKEUT I KIYEOK + {0x8DD7, 0xB762}, //2275 #HANGUL SYLLABLE SSANGTIKEUT I SSANGKIYEOK + {0x8DD8, 0xB763}, //2276 #HANGUL SYLLABLE SSANGTIKEUT I KIYEOKSIOS + {0x8DD9, 0xB765}, //2277 #HANGUL SYLLABLE SSANGTIKEUT I NIEUNCIEUC + {0x8DDA, 0xB766}, //2278 #HANGUL SYLLABLE SSANGTIKEUT I NIEUNHIEUH + {0x8DDB, 0xB767}, //2279 #HANGUL SYLLABLE SSANGTIKEUT I TIKEUT + {0x8DDC, 0xB769}, //2280 #HANGUL SYLLABLE SSANGTIKEUT I RIEULKIYEOK + {0x8DDD, 0xB76A}, //2281 #HANGUL SYLLABLE SSANGTIKEUT I RIEULMIEUM + {0x8DDE, 0xB76B}, //2282 #HANGUL SYLLABLE SSANGTIKEUT I RIEULPIEUP + {0x8DDF, 0xB76C}, //2283 #HANGUL SYLLABLE SSANGTIKEUT I RIEULSIOS + {0x8DE0, 0xB76D}, //2284 #HANGUL SYLLABLE SSANGTIKEUT I RIEULTHIEUTH + {0x8DE1, 0xB76E}, //2285 #HANGUL SYLLABLE SSANGTIKEUT I RIEULPHIEUPH + {0x8DE2, 0xB76F}, //2286 #HANGUL SYLLABLE SSANGTIKEUT I RIEULHIEUH + {0x8DE3, 0xB772}, //2287 #HANGUL SYLLABLE SSANGTIKEUT I PIEUPSIOS + {0x8DE4, 0xB774}, //2288 #HANGUL SYLLABLE SSANGTIKEUT I SSANGSIOS + {0x8DE5, 0xB776}, //2289 #HANGUL SYLLABLE SSANGTIKEUT I CIEUC + {0x8DE6, 0xB777}, //2290 #HANGUL SYLLABLE SSANGTIKEUT I CHIEUCH + {0x8DE7, 0xB778}, //2291 #HANGUL SYLLABLE SSANGTIKEUT I KHIEUKH + {0x8DE8, 0xB779}, //2292 #HANGUL SYLLABLE SSANGTIKEUT I THIEUTH + {0x8DE9, 0xB77A}, //2293 #HANGUL SYLLABLE SSANGTIKEUT I PHIEUPH + {0x8DEA, 0xB77B}, //2294 #HANGUL SYLLABLE SSANGTIKEUT I HIEUH + {0x8DEB, 0xB77E}, //2295 #HANGUL SYLLABLE RIEUL A SSANGKIYEOK + {0x8DEC, 0xB77F}, //2296 #HANGUL SYLLABLE RIEUL A KIYEOKSIOS + {0x8DED, 0xB781}, //2297 #HANGUL SYLLABLE RIEUL A NIEUNCIEUC + {0x8DEE, 0xB782}, //2298 #HANGUL SYLLABLE RIEUL A NIEUNHIEUH + {0x8DEF, 0xB783}, //2299 #HANGUL SYLLABLE RIEUL A TIKEUT + {0x8DF0, 0xB785}, //2300 #HANGUL SYLLABLE RIEUL A RIEULKIYEOK + {0x8DF1, 0xB786}, //2301 #HANGUL SYLLABLE RIEUL A RIEULMIEUM + {0x8DF2, 0xB787}, //2302 #HANGUL SYLLABLE RIEUL A RIEULPIEUP + {0x8DF3, 0xB788}, //2303 #HANGUL SYLLABLE RIEUL A RIEULSIOS + {0x8DF4, 0xB789}, //2304 #HANGUL SYLLABLE RIEUL A RIEULTHIEUTH + {0x8DF5, 0xB78A}, //2305 #HANGUL SYLLABLE RIEUL A RIEULPHIEUPH + {0x8DF6, 0xB78B}, //2306 #HANGUL SYLLABLE RIEUL A RIEULHIEUH + {0x8DF7, 0xB78E}, //2307 #HANGUL SYLLABLE RIEUL A PIEUPSIOS + {0x8DF8, 0xB793}, //2308 #HANGUL SYLLABLE RIEUL A CHIEUCH + {0x8DF9, 0xB794}, //2309 #HANGUL SYLLABLE RIEUL A KHIEUKH + {0x8DFA, 0xB795}, //2310 #HANGUL SYLLABLE RIEUL A THIEUTH + {0x8DFB, 0xB79A}, //2311 #HANGUL SYLLABLE RIEUL AE SSANGKIYEOK + {0x8DFC, 0xB79B}, //2312 #HANGUL SYLLABLE RIEUL AE KIYEOKSIOS + {0x8DFD, 0xB79D}, //2313 #HANGUL SYLLABLE RIEUL AE NIEUNCIEUC + {0x8DFE, 0xB79E}, //2314 #HANGUL SYLLABLE RIEUL AE NIEUNHIEUH + {0x8E41, 0xB79F}, //2315 #HANGUL SYLLABLE RIEUL AE TIKEUT + {0x8E42, 0xB7A1}, //2316 #HANGUL SYLLABLE RIEUL AE RIEULKIYEOK + {0x8E43, 0xB7A2}, //2317 #HANGUL SYLLABLE RIEUL AE RIEULMIEUM + {0x8E44, 0xB7A3}, //2318 #HANGUL SYLLABLE RIEUL AE RIEULPIEUP + {0x8E45, 0xB7A4}, //2319 #HANGUL SYLLABLE RIEUL AE RIEULSIOS + {0x8E46, 0xB7A5}, //2320 #HANGUL SYLLABLE RIEUL AE RIEULTHIEUTH + {0x8E47, 0xB7A6}, //2321 #HANGUL SYLLABLE RIEUL AE RIEULPHIEUPH + {0x8E48, 0xB7A7}, //2322 #HANGUL SYLLABLE RIEUL AE RIEULHIEUH + {0x8E49, 0xB7AA}, //2323 #HANGUL SYLLABLE RIEUL AE PIEUPSIOS + {0x8E4A, 0xB7AE}, //2324 #HANGUL SYLLABLE RIEUL AE CIEUC + {0x8E4B, 0xB7AF}, //2325 #HANGUL SYLLABLE RIEUL AE CHIEUCH + {0x8E4C, 0xB7B0}, //2326 #HANGUL SYLLABLE RIEUL AE KHIEUKH + {0x8E4D, 0xB7B1}, //2327 #HANGUL SYLLABLE RIEUL AE THIEUTH + {0x8E4E, 0xB7B2}, //2328 #HANGUL SYLLABLE RIEUL AE PHIEUPH + {0x8E4F, 0xB7B3}, //2329 #HANGUL SYLLABLE RIEUL AE HIEUH + {0x8E50, 0xB7B6}, //2330 #HANGUL SYLLABLE RIEUL YA SSANGKIYEOK + {0x8E51, 0xB7B7}, //2331 #HANGUL SYLLABLE RIEUL YA KIYEOKSIOS + {0x8E52, 0xB7B9}, //2332 #HANGUL SYLLABLE RIEUL YA NIEUNCIEUC + {0x8E53, 0xB7BA}, //2333 #HANGUL SYLLABLE RIEUL YA NIEUNHIEUH + {0x8E54, 0xB7BB}, //2334 #HANGUL SYLLABLE RIEUL YA TIKEUT + {0x8E55, 0xB7BC}, //2335 #HANGUL SYLLABLE RIEUL YA RIEUL + {0x8E56, 0xB7BD}, //2336 #HANGUL SYLLABLE RIEUL YA RIEULKIYEOK + {0x8E57, 0xB7BE}, //2337 #HANGUL SYLLABLE RIEUL YA RIEULMIEUM + {0x8E58, 0xB7BF}, //2338 #HANGUL SYLLABLE RIEUL YA RIEULPIEUP + {0x8E59, 0xB7C0}, //2339 #HANGUL SYLLABLE RIEUL YA RIEULSIOS + {0x8E5A, 0xB7C1}, //2340 #HANGUL SYLLABLE RIEUL YA RIEULTHIEUTH + {0x8E61, 0xB7C2}, //2341 #HANGUL SYLLABLE RIEUL YA RIEULPHIEUPH + {0x8E62, 0xB7C3}, //2342 #HANGUL SYLLABLE RIEUL YA RIEULHIEUH + {0x8E63, 0xB7C4}, //2343 #HANGUL SYLLABLE RIEUL YA MIEUM + {0x8E64, 0xB7C5}, //2344 #HANGUL SYLLABLE RIEUL YA PIEUP + {0x8E65, 0xB7C6}, //2345 #HANGUL SYLLABLE RIEUL YA PIEUPSIOS + {0x8E66, 0xB7C8}, //2346 #HANGUL SYLLABLE RIEUL YA SSANGSIOS + {0x8E67, 0xB7CA}, //2347 #HANGUL SYLLABLE RIEUL YA CIEUC + {0x8E68, 0xB7CB}, //2348 #HANGUL SYLLABLE RIEUL YA CHIEUCH + {0x8E69, 0xB7CC}, //2349 #HANGUL SYLLABLE RIEUL YA KHIEUKH + {0x8E6A, 0xB7CD}, //2350 #HANGUL SYLLABLE RIEUL YA THIEUTH + {0x8E6B, 0xB7CE}, //2351 #HANGUL SYLLABLE RIEUL YA PHIEUPH + {0x8E6C, 0xB7CF}, //2352 #HANGUL SYLLABLE RIEUL YA HIEUH + {0x8E6D, 0xB7D0}, //2353 #HANGUL SYLLABLE RIEUL YAE + {0x8E6E, 0xB7D1}, //2354 #HANGUL SYLLABLE RIEUL YAE KIYEOK + {0x8E6F, 0xB7D2}, //2355 #HANGUL SYLLABLE RIEUL YAE SSANGKIYEOK + {0x8E70, 0xB7D3}, //2356 #HANGUL SYLLABLE RIEUL YAE KIYEOKSIOS + {0x8E71, 0xB7D4}, //2357 #HANGUL SYLLABLE RIEUL YAE NIEUN + {0x8E72, 0xB7D5}, //2358 #HANGUL SYLLABLE RIEUL YAE NIEUNCIEUC + {0x8E73, 0xB7D6}, //2359 #HANGUL SYLLABLE RIEUL YAE NIEUNHIEUH + {0x8E74, 0xB7D7}, //2360 #HANGUL SYLLABLE RIEUL YAE TIKEUT + {0x8E75, 0xB7D8}, //2361 #HANGUL SYLLABLE RIEUL YAE RIEUL + {0x8E76, 0xB7D9}, //2362 #HANGUL SYLLABLE RIEUL YAE RIEULKIYEOK + {0x8E77, 0xB7DA}, //2363 #HANGUL SYLLABLE RIEUL YAE RIEULMIEUM + {0x8E78, 0xB7DB}, //2364 #HANGUL SYLLABLE RIEUL YAE RIEULPIEUP + {0x8E79, 0xB7DC}, //2365 #HANGUL SYLLABLE RIEUL YAE RIEULSIOS + {0x8E7A, 0xB7DD}, //2366 #HANGUL SYLLABLE RIEUL YAE RIEULTHIEUTH + {0x8E81, 0xB7DE}, //2367 #HANGUL SYLLABLE RIEUL YAE RIEULPHIEUPH + {0x8E82, 0xB7DF}, //2368 #HANGUL SYLLABLE RIEUL YAE RIEULHIEUH + {0x8E83, 0xB7E0}, //2369 #HANGUL SYLLABLE RIEUL YAE MIEUM + {0x8E84, 0xB7E1}, //2370 #HANGUL SYLLABLE RIEUL YAE PIEUP + {0x8E85, 0xB7E2}, //2371 #HANGUL SYLLABLE RIEUL YAE PIEUPSIOS + {0x8E86, 0xB7E3}, //2372 #HANGUL SYLLABLE RIEUL YAE SIOS + {0x8E87, 0xB7E4}, //2373 #HANGUL SYLLABLE RIEUL YAE SSANGSIOS + {0x8E88, 0xB7E5}, //2374 #HANGUL SYLLABLE RIEUL YAE IEUNG + {0x8E89, 0xB7E6}, //2375 #HANGUL SYLLABLE RIEUL YAE CIEUC + {0x8E8A, 0xB7E7}, //2376 #HANGUL SYLLABLE RIEUL YAE CHIEUCH + {0x8E8B, 0xB7E8}, //2377 #HANGUL SYLLABLE RIEUL YAE KHIEUKH + {0x8E8C, 0xB7E9}, //2378 #HANGUL SYLLABLE RIEUL YAE THIEUTH + {0x8E8D, 0xB7EA}, //2379 #HANGUL SYLLABLE RIEUL YAE PHIEUPH + {0x8E8E, 0xB7EB}, //2380 #HANGUL SYLLABLE RIEUL YAE HIEUH + {0x8E8F, 0xB7EE}, //2381 #HANGUL SYLLABLE RIEUL EO SSANGKIYEOK + {0x8E90, 0xB7EF}, //2382 #HANGUL SYLLABLE RIEUL EO KIYEOKSIOS + {0x8E91, 0xB7F1}, //2383 #HANGUL SYLLABLE RIEUL EO NIEUNCIEUC + {0x8E92, 0xB7F2}, //2384 #HANGUL SYLLABLE RIEUL EO NIEUNHIEUH + {0x8E93, 0xB7F3}, //2385 #HANGUL SYLLABLE RIEUL EO TIKEUT + {0x8E94, 0xB7F5}, //2386 #HANGUL SYLLABLE RIEUL EO RIEULKIYEOK + {0x8E95, 0xB7F6}, //2387 #HANGUL SYLLABLE RIEUL EO RIEULMIEUM + {0x8E96, 0xB7F7}, //2388 #HANGUL SYLLABLE RIEUL EO RIEULPIEUP + {0x8E97, 0xB7F8}, //2389 #HANGUL SYLLABLE RIEUL EO RIEULSIOS + {0x8E98, 0xB7F9}, //2390 #HANGUL SYLLABLE RIEUL EO RIEULTHIEUTH + {0x8E99, 0xB7FA}, //2391 #HANGUL SYLLABLE RIEUL EO RIEULPHIEUPH + {0x8E9A, 0xB7FB}, //2392 #HANGUL SYLLABLE RIEUL EO RIEULHIEUH + {0x8E9B, 0xB7FE}, //2393 #HANGUL SYLLABLE RIEUL EO PIEUPSIOS + {0x8E9C, 0xB802}, //2394 #HANGUL SYLLABLE RIEUL EO CIEUC + {0x8E9D, 0xB803}, //2395 #HANGUL SYLLABLE RIEUL EO CHIEUCH + {0x8E9E, 0xB804}, //2396 #HANGUL SYLLABLE RIEUL EO KHIEUKH + {0x8E9F, 0xB805}, //2397 #HANGUL SYLLABLE RIEUL EO THIEUTH + {0x8EA0, 0xB806}, //2398 #HANGUL SYLLABLE RIEUL EO PHIEUPH + {0x8EA1, 0xB80A}, //2399 #HANGUL SYLLABLE RIEUL E SSANGKIYEOK + {0x8EA2, 0xB80B}, //2400 #HANGUL SYLLABLE RIEUL E KIYEOKSIOS + {0x8EA3, 0xB80D}, //2401 #HANGUL SYLLABLE RIEUL E NIEUNCIEUC + {0x8EA4, 0xB80E}, //2402 #HANGUL SYLLABLE RIEUL E NIEUNHIEUH + {0x8EA5, 0xB80F}, //2403 #HANGUL SYLLABLE RIEUL E TIKEUT + {0x8EA6, 0xB811}, //2404 #HANGUL SYLLABLE RIEUL E RIEULKIYEOK + {0x8EA7, 0xB812}, //2405 #HANGUL SYLLABLE RIEUL E RIEULMIEUM + {0x8EA8, 0xB813}, //2406 #HANGUL SYLLABLE RIEUL E RIEULPIEUP + {0x8EA9, 0xB814}, //2407 #HANGUL SYLLABLE RIEUL E RIEULSIOS + {0x8EAA, 0xB815}, //2408 #HANGUL SYLLABLE RIEUL E RIEULTHIEUTH + {0x8EAB, 0xB816}, //2409 #HANGUL SYLLABLE RIEUL E RIEULPHIEUPH + {0x8EAC, 0xB817}, //2410 #HANGUL SYLLABLE RIEUL E RIEULHIEUH + {0x8EAD, 0xB81A}, //2411 #HANGUL SYLLABLE RIEUL E PIEUPSIOS + {0x8EAE, 0xB81C}, //2412 #HANGUL SYLLABLE RIEUL E SSANGSIOS + {0x8EAF, 0xB81E}, //2413 #HANGUL SYLLABLE RIEUL E CIEUC + {0x8EB0, 0xB81F}, //2414 #HANGUL SYLLABLE RIEUL E CHIEUCH + {0x8EB1, 0xB820}, //2415 #HANGUL SYLLABLE RIEUL E KHIEUKH + {0x8EB2, 0xB821}, //2416 #HANGUL SYLLABLE RIEUL E THIEUTH + {0x8EB3, 0xB822}, //2417 #HANGUL SYLLABLE RIEUL E PHIEUPH + {0x8EB4, 0xB823}, //2418 #HANGUL SYLLABLE RIEUL E HIEUH + {0x8EB5, 0xB826}, //2419 #HANGUL SYLLABLE RIEUL YEO SSANGKIYEOK + {0x8EB6, 0xB827}, //2420 #HANGUL SYLLABLE RIEUL YEO KIYEOKSIOS + {0x8EB7, 0xB829}, //2421 #HANGUL SYLLABLE RIEUL YEO NIEUNCIEUC + {0x8EB8, 0xB82A}, //2422 #HANGUL SYLLABLE RIEUL YEO NIEUNHIEUH + {0x8EB9, 0xB82B}, //2423 #HANGUL SYLLABLE RIEUL YEO TIKEUT + {0x8EBA, 0xB82D}, //2424 #HANGUL SYLLABLE RIEUL YEO RIEULKIYEOK + {0x8EBB, 0xB82E}, //2425 #HANGUL SYLLABLE RIEUL YEO RIEULMIEUM + {0x8EBC, 0xB82F}, //2426 #HANGUL SYLLABLE RIEUL YEO RIEULPIEUP + {0x8EBD, 0xB830}, //2427 #HANGUL SYLLABLE RIEUL YEO RIEULSIOS + {0x8EBE, 0xB831}, //2428 #HANGUL SYLLABLE RIEUL YEO RIEULTHIEUTH + {0x8EBF, 0xB832}, //2429 #HANGUL SYLLABLE RIEUL YEO RIEULPHIEUPH + {0x8EC0, 0xB833}, //2430 #HANGUL SYLLABLE RIEUL YEO RIEULHIEUH + {0x8EC1, 0xB836}, //2431 #HANGUL SYLLABLE RIEUL YEO PIEUPSIOS + {0x8EC2, 0xB83A}, //2432 #HANGUL SYLLABLE RIEUL YEO CIEUC + {0x8EC3, 0xB83B}, //2433 #HANGUL SYLLABLE RIEUL YEO CHIEUCH + {0x8EC4, 0xB83C}, //2434 #HANGUL SYLLABLE RIEUL YEO KHIEUKH + {0x8EC5, 0xB83D}, //2435 #HANGUL SYLLABLE RIEUL YEO THIEUTH + {0x8EC6, 0xB83E}, //2436 #HANGUL SYLLABLE RIEUL YEO PHIEUPH + {0x8EC7, 0xB83F}, //2437 #HANGUL SYLLABLE RIEUL YEO HIEUH + {0x8EC8, 0xB841}, //2438 #HANGUL SYLLABLE RIEUL YE KIYEOK + {0x8EC9, 0xB842}, //2439 #HANGUL SYLLABLE RIEUL YE SSANGKIYEOK + {0x8ECA, 0xB843}, //2440 #HANGUL SYLLABLE RIEUL YE KIYEOKSIOS + {0x8ECB, 0xB845}, //2441 #HANGUL SYLLABLE RIEUL YE NIEUNCIEUC + {0x8ECC, 0xB846}, //2442 #HANGUL SYLLABLE RIEUL YE NIEUNHIEUH + {0x8ECD, 0xB847}, //2443 #HANGUL SYLLABLE RIEUL YE TIKEUT + {0x8ECE, 0xB848}, //2444 #HANGUL SYLLABLE RIEUL YE RIEUL + {0x8ECF, 0xB849}, //2445 #HANGUL SYLLABLE RIEUL YE RIEULKIYEOK + {0x8ED0, 0xB84A}, //2446 #HANGUL SYLLABLE RIEUL YE RIEULMIEUM + {0x8ED1, 0xB84B}, //2447 #HANGUL SYLLABLE RIEUL YE RIEULPIEUP + {0x8ED2, 0xB84C}, //2448 #HANGUL SYLLABLE RIEUL YE RIEULSIOS + {0x8ED3, 0xB84D}, //2449 #HANGUL SYLLABLE RIEUL YE RIEULTHIEUTH + {0x8ED4, 0xB84E}, //2450 #HANGUL SYLLABLE RIEUL YE RIEULPHIEUPH + {0x8ED5, 0xB84F}, //2451 #HANGUL SYLLABLE RIEUL YE RIEULHIEUH + {0x8ED6, 0xB850}, //2452 #HANGUL SYLLABLE RIEUL YE MIEUM + {0x8ED7, 0xB852}, //2453 #HANGUL SYLLABLE RIEUL YE PIEUPSIOS + {0x8ED8, 0xB854}, //2454 #HANGUL SYLLABLE RIEUL YE SSANGSIOS + {0x8ED9, 0xB855}, //2455 #HANGUL SYLLABLE RIEUL YE IEUNG + {0x8EDA, 0xB856}, //2456 #HANGUL SYLLABLE RIEUL YE CIEUC + {0x8EDB, 0xB857}, //2457 #HANGUL SYLLABLE RIEUL YE CHIEUCH + {0x8EDC, 0xB858}, //2458 #HANGUL SYLLABLE RIEUL YE KHIEUKH + {0x8EDD, 0xB859}, //2459 #HANGUL SYLLABLE RIEUL YE THIEUTH + {0x8EDE, 0xB85A}, //2460 #HANGUL SYLLABLE RIEUL YE PHIEUPH + {0x8EDF, 0xB85B}, //2461 #HANGUL SYLLABLE RIEUL YE HIEUH + {0x8EE0, 0xB85E}, //2462 #HANGUL SYLLABLE RIEUL O SSANGKIYEOK + {0x8EE1, 0xB85F}, //2463 #HANGUL SYLLABLE RIEUL O KIYEOKSIOS + {0x8EE2, 0xB861}, //2464 #HANGUL SYLLABLE RIEUL O NIEUNCIEUC + {0x8EE3, 0xB862}, //2465 #HANGUL SYLLABLE RIEUL O NIEUNHIEUH + {0x8EE4, 0xB863}, //2466 #HANGUL SYLLABLE RIEUL O TIKEUT + {0x8EE5, 0xB865}, //2467 #HANGUL SYLLABLE RIEUL O RIEULKIYEOK + {0x8EE6, 0xB866}, //2468 #HANGUL SYLLABLE RIEUL O RIEULMIEUM + {0x8EE7, 0xB867}, //2469 #HANGUL SYLLABLE RIEUL O RIEULPIEUP + {0x8EE8, 0xB868}, //2470 #HANGUL SYLLABLE RIEUL O RIEULSIOS + {0x8EE9, 0xB869}, //2471 #HANGUL SYLLABLE RIEUL O RIEULTHIEUTH + {0x8EEA, 0xB86A}, //2472 #HANGUL SYLLABLE RIEUL O RIEULPHIEUPH + {0x8EEB, 0xB86B}, //2473 #HANGUL SYLLABLE RIEUL O RIEULHIEUH + {0x8EEC, 0xB86E}, //2474 #HANGUL SYLLABLE RIEUL O PIEUPSIOS + {0x8EED, 0xB870}, //2475 #HANGUL SYLLABLE RIEUL O SSANGSIOS + {0x8EEE, 0xB872}, //2476 #HANGUL SYLLABLE RIEUL O CIEUC + {0x8EEF, 0xB873}, //2477 #HANGUL SYLLABLE RIEUL O CHIEUCH + {0x8EF0, 0xB874}, //2478 #HANGUL SYLLABLE RIEUL O KHIEUKH + {0x8EF1, 0xB875}, //2479 #HANGUL SYLLABLE RIEUL O THIEUTH + {0x8EF2, 0xB876}, //2480 #HANGUL SYLLABLE RIEUL O PHIEUPH + {0x8EF3, 0xB877}, //2481 #HANGUL SYLLABLE RIEUL O HIEUH + {0x8EF4, 0xB879}, //2482 #HANGUL SYLLABLE RIEUL WA KIYEOK + {0x8EF5, 0xB87A}, //2483 #HANGUL SYLLABLE RIEUL WA SSANGKIYEOK + {0x8EF6, 0xB87B}, //2484 #HANGUL SYLLABLE RIEUL WA KIYEOKSIOS + {0x8EF7, 0xB87D}, //2485 #HANGUL SYLLABLE RIEUL WA NIEUNCIEUC + {0x8EF8, 0xB87E}, //2486 #HANGUL SYLLABLE RIEUL WA NIEUNHIEUH + {0x8EF9, 0xB87F}, //2487 #HANGUL SYLLABLE RIEUL WA TIKEUT + {0x8EFA, 0xB880}, //2488 #HANGUL SYLLABLE RIEUL WA RIEUL + {0x8EFB, 0xB881}, //2489 #HANGUL SYLLABLE RIEUL WA RIEULKIYEOK + {0x8EFC, 0xB882}, //2490 #HANGUL SYLLABLE RIEUL WA RIEULMIEUM + {0x8EFD, 0xB883}, //2491 #HANGUL SYLLABLE RIEUL WA RIEULPIEUP + {0x8EFE, 0xB884}, //2492 #HANGUL SYLLABLE RIEUL WA RIEULSIOS + {0x8F41, 0xB885}, //2493 #HANGUL SYLLABLE RIEUL WA RIEULTHIEUTH + {0x8F42, 0xB886}, //2494 #HANGUL SYLLABLE RIEUL WA RIEULPHIEUPH + {0x8F43, 0xB887}, //2495 #HANGUL SYLLABLE RIEUL WA RIEULHIEUH + {0x8F44, 0xB888}, //2496 #HANGUL SYLLABLE RIEUL WA MIEUM + {0x8F45, 0xB889}, //2497 #HANGUL SYLLABLE RIEUL WA PIEUP + {0x8F46, 0xB88A}, //2498 #HANGUL SYLLABLE RIEUL WA PIEUPSIOS + {0x8F47, 0xB88B}, //2499 #HANGUL SYLLABLE RIEUL WA SIOS + {0x8F48, 0xB88C}, //2500 #HANGUL SYLLABLE RIEUL WA SSANGSIOS + {0x8F49, 0xB88E}, //2501 #HANGUL SYLLABLE RIEUL WA CIEUC + {0x8F4A, 0xB88F}, //2502 #HANGUL SYLLABLE RIEUL WA CHIEUCH + {0x8F4B, 0xB890}, //2503 #HANGUL SYLLABLE RIEUL WA KHIEUKH + {0x8F4C, 0xB891}, //2504 #HANGUL SYLLABLE RIEUL WA THIEUTH + {0x8F4D, 0xB892}, //2505 #HANGUL SYLLABLE RIEUL WA PHIEUPH + {0x8F4E, 0xB893}, //2506 #HANGUL SYLLABLE RIEUL WA HIEUH + {0x8F4F, 0xB894}, //2507 #HANGUL SYLLABLE RIEUL WAE + {0x8F50, 0xB895}, //2508 #HANGUL SYLLABLE RIEUL WAE KIYEOK + {0x8F51, 0xB896}, //2509 #HANGUL SYLLABLE RIEUL WAE SSANGKIYEOK + {0x8F52, 0xB897}, //2510 #HANGUL SYLLABLE RIEUL WAE KIYEOKSIOS + {0x8F53, 0xB898}, //2511 #HANGUL SYLLABLE RIEUL WAE NIEUN + {0x8F54, 0xB899}, //2512 #HANGUL SYLLABLE RIEUL WAE NIEUNCIEUC + {0x8F55, 0xB89A}, //2513 #HANGUL SYLLABLE RIEUL WAE NIEUNHIEUH + {0x8F56, 0xB89B}, //2514 #HANGUL SYLLABLE RIEUL WAE TIKEUT + {0x8F57, 0xB89C}, //2515 #HANGUL SYLLABLE RIEUL WAE RIEUL + {0x8F58, 0xB89D}, //2516 #HANGUL SYLLABLE RIEUL WAE RIEULKIYEOK + {0x8F59, 0xB89E}, //2517 #HANGUL SYLLABLE RIEUL WAE RIEULMIEUM + {0x8F5A, 0xB89F}, //2518 #HANGUL SYLLABLE RIEUL WAE RIEULPIEUP + {0x8F61, 0xB8A0}, //2519 #HANGUL SYLLABLE RIEUL WAE RIEULSIOS + {0x8F62, 0xB8A1}, //2520 #HANGUL SYLLABLE RIEUL WAE RIEULTHIEUTH + {0x8F63, 0xB8A2}, //2521 #HANGUL SYLLABLE RIEUL WAE RIEULPHIEUPH + {0x8F64, 0xB8A3}, //2522 #HANGUL SYLLABLE RIEUL WAE RIEULHIEUH + {0x8F65, 0xB8A4}, //2523 #HANGUL SYLLABLE RIEUL WAE MIEUM + {0x8F66, 0xB8A5}, //2524 #HANGUL SYLLABLE RIEUL WAE PIEUP + {0x8F67, 0xB8A6}, //2525 #HANGUL SYLLABLE RIEUL WAE PIEUPSIOS + {0x8F68, 0xB8A7}, //2526 #HANGUL SYLLABLE RIEUL WAE SIOS + {0x8F69, 0xB8A9}, //2527 #HANGUL SYLLABLE RIEUL WAE IEUNG + {0x8F6A, 0xB8AA}, //2528 #HANGUL SYLLABLE RIEUL WAE CIEUC + {0x8F6B, 0xB8AB}, //2529 #HANGUL SYLLABLE RIEUL WAE CHIEUCH + {0x8F6C, 0xB8AC}, //2530 #HANGUL SYLLABLE RIEUL WAE KHIEUKH + {0x8F6D, 0xB8AD}, //2531 #HANGUL SYLLABLE RIEUL WAE THIEUTH + {0x8F6E, 0xB8AE}, //2532 #HANGUL SYLLABLE RIEUL WAE PHIEUPH + {0x8F6F, 0xB8AF}, //2533 #HANGUL SYLLABLE RIEUL WAE HIEUH + {0x8F70, 0xB8B1}, //2534 #HANGUL SYLLABLE RIEUL OE KIYEOK + {0x8F71, 0xB8B2}, //2535 #HANGUL SYLLABLE RIEUL OE SSANGKIYEOK + {0x8F72, 0xB8B3}, //2536 #HANGUL SYLLABLE RIEUL OE KIYEOKSIOS + {0x8F73, 0xB8B5}, //2537 #HANGUL SYLLABLE RIEUL OE NIEUNCIEUC + {0x8F74, 0xB8B6}, //2538 #HANGUL SYLLABLE RIEUL OE NIEUNHIEUH + {0x8F75, 0xB8B7}, //2539 #HANGUL SYLLABLE RIEUL OE TIKEUT + {0x8F76, 0xB8B9}, //2540 #HANGUL SYLLABLE RIEUL OE RIEULKIYEOK + {0x8F77, 0xB8BA}, //2541 #HANGUL SYLLABLE RIEUL OE RIEULMIEUM + {0x8F78, 0xB8BB}, //2542 #HANGUL SYLLABLE RIEUL OE RIEULPIEUP + {0x8F79, 0xB8BC}, //2543 #HANGUL SYLLABLE RIEUL OE RIEULSIOS + {0x8F7A, 0xB8BD}, //2544 #HANGUL SYLLABLE RIEUL OE RIEULTHIEUTH + {0x8F81, 0xB8BE}, //2545 #HANGUL SYLLABLE RIEUL OE RIEULPHIEUPH + {0x8F82, 0xB8BF}, //2546 #HANGUL SYLLABLE RIEUL OE RIEULHIEUH + {0x8F83, 0xB8C2}, //2547 #HANGUL SYLLABLE RIEUL OE PIEUPSIOS + {0x8F84, 0xB8C4}, //2548 #HANGUL SYLLABLE RIEUL OE SSANGSIOS + {0x8F85, 0xB8C6}, //2549 #HANGUL SYLLABLE RIEUL OE CIEUC + {0x8F86, 0xB8C7}, //2550 #HANGUL SYLLABLE RIEUL OE CHIEUCH + {0x8F87, 0xB8C8}, //2551 #HANGUL SYLLABLE RIEUL OE KHIEUKH + {0x8F88, 0xB8C9}, //2552 #HANGUL SYLLABLE RIEUL OE THIEUTH + {0x8F89, 0xB8CA}, //2553 #HANGUL SYLLABLE RIEUL OE PHIEUPH + {0x8F8A, 0xB8CB}, //2554 #HANGUL SYLLABLE RIEUL OE HIEUH + {0x8F8B, 0xB8CD}, //2555 #HANGUL SYLLABLE RIEUL YO KIYEOK + {0x8F8C, 0xB8CE}, //2556 #HANGUL SYLLABLE RIEUL YO SSANGKIYEOK + {0x8F8D, 0xB8CF}, //2557 #HANGUL SYLLABLE RIEUL YO KIYEOKSIOS + {0x8F8E, 0xB8D1}, //2558 #HANGUL SYLLABLE RIEUL YO NIEUNCIEUC + {0x8F8F, 0xB8D2}, //2559 #HANGUL SYLLABLE RIEUL YO NIEUNHIEUH + {0x8F90, 0xB8D3}, //2560 #HANGUL SYLLABLE RIEUL YO TIKEUT + {0x8F91, 0xB8D5}, //2561 #HANGUL SYLLABLE RIEUL YO RIEULKIYEOK + {0x8F92, 0xB8D6}, //2562 #HANGUL SYLLABLE RIEUL YO RIEULMIEUM + {0x8F93, 0xB8D7}, //2563 #HANGUL SYLLABLE RIEUL YO RIEULPIEUP + {0x8F94, 0xB8D8}, //2564 #HANGUL SYLLABLE RIEUL YO RIEULSIOS + {0x8F95, 0xB8D9}, //2565 #HANGUL SYLLABLE RIEUL YO RIEULTHIEUTH + {0x8F96, 0xB8DA}, //2566 #HANGUL SYLLABLE RIEUL YO RIEULPHIEUPH + {0x8F97, 0xB8DB}, //2567 #HANGUL SYLLABLE RIEUL YO RIEULHIEUH + {0x8F98, 0xB8DC}, //2568 #HANGUL SYLLABLE RIEUL YO MIEUM + {0x8F99, 0xB8DE}, //2569 #HANGUL SYLLABLE RIEUL YO PIEUPSIOS + {0x8F9A, 0xB8E0}, //2570 #HANGUL SYLLABLE RIEUL YO SSANGSIOS + {0x8F9B, 0xB8E2}, //2571 #HANGUL SYLLABLE RIEUL YO CIEUC + {0x8F9C, 0xB8E3}, //2572 #HANGUL SYLLABLE RIEUL YO CHIEUCH + {0x8F9D, 0xB8E4}, //2573 #HANGUL SYLLABLE RIEUL YO KHIEUKH + {0x8F9E, 0xB8E5}, //2574 #HANGUL SYLLABLE RIEUL YO THIEUTH + {0x8F9F, 0xB8E6}, //2575 #HANGUL SYLLABLE RIEUL YO PHIEUPH + {0x8FA0, 0xB8E7}, //2576 #HANGUL SYLLABLE RIEUL YO HIEUH + {0x8FA1, 0xB8EA}, //2577 #HANGUL SYLLABLE RIEUL U SSANGKIYEOK + {0x8FA2, 0xB8EB}, //2578 #HANGUL SYLLABLE RIEUL U KIYEOKSIOS + {0x8FA3, 0xB8ED}, //2579 #HANGUL SYLLABLE RIEUL U NIEUNCIEUC + {0x8FA4, 0xB8EE}, //2580 #HANGUL SYLLABLE RIEUL U NIEUNHIEUH + {0x8FA5, 0xB8EF}, //2581 #HANGUL SYLLABLE RIEUL U TIKEUT + {0x8FA6, 0xB8F1}, //2582 #HANGUL SYLLABLE RIEUL U RIEULKIYEOK + {0x8FA7, 0xB8F2}, //2583 #HANGUL SYLLABLE RIEUL U RIEULMIEUM + {0x8FA8, 0xB8F3}, //2584 #HANGUL SYLLABLE RIEUL U RIEULPIEUP + {0x8FA9, 0xB8F4}, //2585 #HANGUL SYLLABLE RIEUL U RIEULSIOS + {0x8FAA, 0xB8F5}, //2586 #HANGUL SYLLABLE RIEUL U RIEULTHIEUTH + {0x8FAB, 0xB8F6}, //2587 #HANGUL SYLLABLE RIEUL U RIEULPHIEUPH + {0x8FAC, 0xB8F7}, //2588 #HANGUL SYLLABLE RIEUL U RIEULHIEUH + {0x8FAD, 0xB8FA}, //2589 #HANGUL SYLLABLE RIEUL U PIEUPSIOS + {0x8FAE, 0xB8FC}, //2590 #HANGUL SYLLABLE RIEUL U SSANGSIOS + {0x8FAF, 0xB8FE}, //2591 #HANGUL SYLLABLE RIEUL U CIEUC + {0x8FB0, 0xB8FF}, //2592 #HANGUL SYLLABLE RIEUL U CHIEUCH + {0x8FB1, 0xB900}, //2593 #HANGUL SYLLABLE RIEUL U KHIEUKH + {0x8FB2, 0xB901}, //2594 #HANGUL SYLLABLE RIEUL U THIEUTH + {0x8FB3, 0xB902}, //2595 #HANGUL SYLLABLE RIEUL U PHIEUPH + {0x8FB4, 0xB903}, //2596 #HANGUL SYLLABLE RIEUL U HIEUH + {0x8FB5, 0xB905}, //2597 #HANGUL SYLLABLE RIEUL WEO KIYEOK + {0x8FB6, 0xB906}, //2598 #HANGUL SYLLABLE RIEUL WEO SSANGKIYEOK + {0x8FB7, 0xB907}, //2599 #HANGUL SYLLABLE RIEUL WEO KIYEOKSIOS + {0x8FB8, 0xB908}, //2600 #HANGUL SYLLABLE RIEUL WEO NIEUN + {0x8FB9, 0xB909}, //2601 #HANGUL SYLLABLE RIEUL WEO NIEUNCIEUC + {0x8FBA, 0xB90A}, //2602 #HANGUL SYLLABLE RIEUL WEO NIEUNHIEUH + {0x8FBB, 0xB90B}, //2603 #HANGUL SYLLABLE RIEUL WEO TIKEUT + {0x8FBC, 0xB90C}, //2604 #HANGUL SYLLABLE RIEUL WEO RIEUL + {0x8FBD, 0xB90D}, //2605 #HANGUL SYLLABLE RIEUL WEO RIEULKIYEOK + {0x8FBE, 0xB90E}, //2606 #HANGUL SYLLABLE RIEUL WEO RIEULMIEUM + {0x8FBF, 0xB90F}, //2607 #HANGUL SYLLABLE RIEUL WEO RIEULPIEUP + {0x8FC0, 0xB910}, //2608 #HANGUL SYLLABLE RIEUL WEO RIEULSIOS + {0x8FC1, 0xB911}, //2609 #HANGUL SYLLABLE RIEUL WEO RIEULTHIEUTH + {0x8FC2, 0xB912}, //2610 #HANGUL SYLLABLE RIEUL WEO RIEULPHIEUPH + {0x8FC3, 0xB913}, //2611 #HANGUL SYLLABLE RIEUL WEO RIEULHIEUH + {0x8FC4, 0xB914}, //2612 #HANGUL SYLLABLE RIEUL WEO MIEUM + {0x8FC5, 0xB915}, //2613 #HANGUL SYLLABLE RIEUL WEO PIEUP + {0x8FC6, 0xB916}, //2614 #HANGUL SYLLABLE RIEUL WEO PIEUPSIOS + {0x8FC7, 0xB917}, //2615 #HANGUL SYLLABLE RIEUL WEO SIOS + {0x8FC8, 0xB919}, //2616 #HANGUL SYLLABLE RIEUL WEO IEUNG + {0x8FC9, 0xB91A}, //2617 #HANGUL SYLLABLE RIEUL WEO CIEUC + {0x8FCA, 0xB91B}, //2618 #HANGUL SYLLABLE RIEUL WEO CHIEUCH + {0x8FCB, 0xB91C}, //2619 #HANGUL SYLLABLE RIEUL WEO KHIEUKH + {0x8FCC, 0xB91D}, //2620 #HANGUL SYLLABLE RIEUL WEO THIEUTH + {0x8FCD, 0xB91E}, //2621 #HANGUL SYLLABLE RIEUL WEO PHIEUPH + {0x8FCE, 0xB91F}, //2622 #HANGUL SYLLABLE RIEUL WEO HIEUH + {0x8FCF, 0xB921}, //2623 #HANGUL SYLLABLE RIEUL WE KIYEOK + {0x8FD0, 0xB922}, //2624 #HANGUL SYLLABLE RIEUL WE SSANGKIYEOK + {0x8FD1, 0xB923}, //2625 #HANGUL SYLLABLE RIEUL WE KIYEOKSIOS + {0x8FD2, 0xB924}, //2626 #HANGUL SYLLABLE RIEUL WE NIEUN + {0x8FD3, 0xB925}, //2627 #HANGUL SYLLABLE RIEUL WE NIEUNCIEUC + {0x8FD4, 0xB926}, //2628 #HANGUL SYLLABLE RIEUL WE NIEUNHIEUH + {0x8FD5, 0xB927}, //2629 #HANGUL SYLLABLE RIEUL WE TIKEUT + {0x8FD6, 0xB928}, //2630 #HANGUL SYLLABLE RIEUL WE RIEUL + {0x8FD7, 0xB929}, //2631 #HANGUL SYLLABLE RIEUL WE RIEULKIYEOK + {0x8FD8, 0xB92A}, //2632 #HANGUL SYLLABLE RIEUL WE RIEULMIEUM + {0x8FD9, 0xB92B}, //2633 #HANGUL SYLLABLE RIEUL WE RIEULPIEUP + {0x8FDA, 0xB92C}, //2634 #HANGUL SYLLABLE RIEUL WE RIEULSIOS + {0x8FDB, 0xB92D}, //2635 #HANGUL SYLLABLE RIEUL WE RIEULTHIEUTH + {0x8FDC, 0xB92E}, //2636 #HANGUL SYLLABLE RIEUL WE RIEULPHIEUPH + {0x8FDD, 0xB92F}, //2637 #HANGUL SYLLABLE RIEUL WE RIEULHIEUH + {0x8FDE, 0xB930}, //2638 #HANGUL SYLLABLE RIEUL WE MIEUM + {0x8FDF, 0xB931}, //2639 #HANGUL SYLLABLE RIEUL WE PIEUP + {0x8FE0, 0xB932}, //2640 #HANGUL SYLLABLE RIEUL WE PIEUPSIOS + {0x8FE1, 0xB933}, //2641 #HANGUL SYLLABLE RIEUL WE SIOS + {0x8FE2, 0xB934}, //2642 #HANGUL SYLLABLE RIEUL WE SSANGSIOS + {0x8FE3, 0xB935}, //2643 #HANGUL SYLLABLE RIEUL WE IEUNG + {0x8FE4, 0xB936}, //2644 #HANGUL SYLLABLE RIEUL WE CIEUC + {0x8FE5, 0xB937}, //2645 #HANGUL SYLLABLE RIEUL WE CHIEUCH + {0x8FE6, 0xB938}, //2646 #HANGUL SYLLABLE RIEUL WE KHIEUKH + {0x8FE7, 0xB939}, //2647 #HANGUL SYLLABLE RIEUL WE THIEUTH + {0x8FE8, 0xB93A}, //2648 #HANGUL SYLLABLE RIEUL WE PHIEUPH + {0x8FE9, 0xB93B}, //2649 #HANGUL SYLLABLE RIEUL WE HIEUH + {0x8FEA, 0xB93E}, //2650 #HANGUL SYLLABLE RIEUL WI SSANGKIYEOK + {0x8FEB, 0xB93F}, //2651 #HANGUL SYLLABLE RIEUL WI KIYEOKSIOS + {0x8FEC, 0xB941}, //2652 #HANGUL SYLLABLE RIEUL WI NIEUNCIEUC + {0x8FED, 0xB942}, //2653 #HANGUL SYLLABLE RIEUL WI NIEUNHIEUH + {0x8FEE, 0xB943}, //2654 #HANGUL SYLLABLE RIEUL WI TIKEUT + {0x8FEF, 0xB945}, //2655 #HANGUL SYLLABLE RIEUL WI RIEULKIYEOK + {0x8FF0, 0xB946}, //2656 #HANGUL SYLLABLE RIEUL WI RIEULMIEUM + {0x8FF1, 0xB947}, //2657 #HANGUL SYLLABLE RIEUL WI RIEULPIEUP + {0x8FF2, 0xB948}, //2658 #HANGUL SYLLABLE RIEUL WI RIEULSIOS + {0x8FF3, 0xB949}, //2659 #HANGUL SYLLABLE RIEUL WI RIEULTHIEUTH + {0x8FF4, 0xB94A}, //2660 #HANGUL SYLLABLE RIEUL WI RIEULPHIEUPH + {0x8FF5, 0xB94B}, //2661 #HANGUL SYLLABLE RIEUL WI RIEULHIEUH + {0x8FF6, 0xB94D}, //2662 #HANGUL SYLLABLE RIEUL WI PIEUP + {0x8FF7, 0xB94E}, //2663 #HANGUL SYLLABLE RIEUL WI PIEUPSIOS + {0x8FF8, 0xB950}, //2664 #HANGUL SYLLABLE RIEUL WI SSANGSIOS + {0x8FF9, 0xB952}, //2665 #HANGUL SYLLABLE RIEUL WI CIEUC + {0x8FFA, 0xB953}, //2666 #HANGUL SYLLABLE RIEUL WI CHIEUCH + {0x8FFB, 0xB954}, //2667 #HANGUL SYLLABLE RIEUL WI KHIEUKH + {0x8FFC, 0xB955}, //2668 #HANGUL SYLLABLE RIEUL WI THIEUTH + {0x8FFD, 0xB956}, //2669 #HANGUL SYLLABLE RIEUL WI PHIEUPH + {0x8FFE, 0xB957}, //2670 #HANGUL SYLLABLE RIEUL WI HIEUH + {0x9041, 0xB95A}, //2671 #HANGUL SYLLABLE RIEUL YU SSANGKIYEOK + {0x9042, 0xB95B}, //2672 #HANGUL SYLLABLE RIEUL YU KIYEOKSIOS + {0x9043, 0xB95D}, //2673 #HANGUL SYLLABLE RIEUL YU NIEUNCIEUC + {0x9044, 0xB95E}, //2674 #HANGUL SYLLABLE RIEUL YU NIEUNHIEUH + {0x9045, 0xB95F}, //2675 #HANGUL SYLLABLE RIEUL YU TIKEUT + {0x9046, 0xB961}, //2676 #HANGUL SYLLABLE RIEUL YU RIEULKIYEOK + {0x9047, 0xB962}, //2677 #HANGUL SYLLABLE RIEUL YU RIEULMIEUM + {0x9048, 0xB963}, //2678 #HANGUL SYLLABLE RIEUL YU RIEULPIEUP + {0x9049, 0xB964}, //2679 #HANGUL SYLLABLE RIEUL YU RIEULSIOS + {0x904A, 0xB965}, //2680 #HANGUL SYLLABLE RIEUL YU RIEULTHIEUTH + {0x904B, 0xB966}, //2681 #HANGUL SYLLABLE RIEUL YU RIEULPHIEUPH + {0x904C, 0xB967}, //2682 #HANGUL SYLLABLE RIEUL YU RIEULHIEUH + {0x904D, 0xB96A}, //2683 #HANGUL SYLLABLE RIEUL YU PIEUPSIOS + {0x904E, 0xB96C}, //2684 #HANGUL SYLLABLE RIEUL YU SSANGSIOS + {0x904F, 0xB96E}, //2685 #HANGUL SYLLABLE RIEUL YU CIEUC + {0x9050, 0xB96F}, //2686 #HANGUL SYLLABLE RIEUL YU CHIEUCH + {0x9051, 0xB970}, //2687 #HANGUL SYLLABLE RIEUL YU KHIEUKH + {0x9052, 0xB971}, //2688 #HANGUL SYLLABLE RIEUL YU THIEUTH + {0x9053, 0xB972}, //2689 #HANGUL SYLLABLE RIEUL YU PHIEUPH + {0x9054, 0xB973}, //2690 #HANGUL SYLLABLE RIEUL YU HIEUH + {0x9055, 0xB976}, //2691 #HANGUL SYLLABLE RIEUL EU SSANGKIYEOK + {0x9056, 0xB977}, //2692 #HANGUL SYLLABLE RIEUL EU KIYEOKSIOS + {0x9057, 0xB979}, //2693 #HANGUL SYLLABLE RIEUL EU NIEUNCIEUC + {0x9058, 0xB97A}, //2694 #HANGUL SYLLABLE RIEUL EU NIEUNHIEUH + {0x9059, 0xB97B}, //2695 #HANGUL SYLLABLE RIEUL EU TIKEUT + {0x905A, 0xB97D}, //2696 #HANGUL SYLLABLE RIEUL EU RIEULKIYEOK + {0x9061, 0xB97E}, //2697 #HANGUL SYLLABLE RIEUL EU RIEULMIEUM + {0x9062, 0xB97F}, //2698 #HANGUL SYLLABLE RIEUL EU RIEULPIEUP + {0x9063, 0xB980}, //2699 #HANGUL SYLLABLE RIEUL EU RIEULSIOS + {0x9064, 0xB981}, //2700 #HANGUL SYLLABLE RIEUL EU RIEULTHIEUTH + {0x9065, 0xB982}, //2701 #HANGUL SYLLABLE RIEUL EU RIEULPHIEUPH + {0x9066, 0xB983}, //2702 #HANGUL SYLLABLE RIEUL EU RIEULHIEUH + {0x9067, 0xB986}, //2703 #HANGUL SYLLABLE RIEUL EU PIEUPSIOS + {0x9068, 0xB988}, //2704 #HANGUL SYLLABLE RIEUL EU SSANGSIOS + {0x9069, 0xB98B}, //2705 #HANGUL SYLLABLE RIEUL EU CHIEUCH + {0x906A, 0xB98C}, //2706 #HANGUL SYLLABLE RIEUL EU KHIEUKH + {0x906B, 0xB98F}, //2707 #HANGUL SYLLABLE RIEUL EU HIEUH + {0x906C, 0xB990}, //2708 #HANGUL SYLLABLE RIEUL YI + {0x906D, 0xB991}, //2709 #HANGUL SYLLABLE RIEUL YI KIYEOK + {0x906E, 0xB992}, //2710 #HANGUL SYLLABLE RIEUL YI SSANGKIYEOK + {0x906F, 0xB993}, //2711 #HANGUL SYLLABLE RIEUL YI KIYEOKSIOS + {0x9070, 0xB994}, //2712 #HANGUL SYLLABLE RIEUL YI NIEUN + {0x9071, 0xB995}, //2713 #HANGUL SYLLABLE RIEUL YI NIEUNCIEUC + {0x9072, 0xB996}, //2714 #HANGUL SYLLABLE RIEUL YI NIEUNHIEUH + {0x9073, 0xB997}, //2715 #HANGUL SYLLABLE RIEUL YI TIKEUT + {0x9074, 0xB998}, //2716 #HANGUL SYLLABLE RIEUL YI RIEUL + {0x9075, 0xB999}, //2717 #HANGUL SYLLABLE RIEUL YI RIEULKIYEOK + {0x9076, 0xB99A}, //2718 #HANGUL SYLLABLE RIEUL YI RIEULMIEUM + {0x9077, 0xB99B}, //2719 #HANGUL SYLLABLE RIEUL YI RIEULPIEUP + {0x9078, 0xB99C}, //2720 #HANGUL SYLLABLE RIEUL YI RIEULSIOS + {0x9079, 0xB99D}, //2721 #HANGUL SYLLABLE RIEUL YI RIEULTHIEUTH + {0x907A, 0xB99E}, //2722 #HANGUL SYLLABLE RIEUL YI RIEULPHIEUPH + {0x9081, 0xB99F}, //2723 #HANGUL SYLLABLE RIEUL YI RIEULHIEUH + {0x9082, 0xB9A0}, //2724 #HANGUL SYLLABLE RIEUL YI MIEUM + {0x9083, 0xB9A1}, //2725 #HANGUL SYLLABLE RIEUL YI PIEUP + {0x9084, 0xB9A2}, //2726 #HANGUL SYLLABLE RIEUL YI PIEUPSIOS + {0x9085, 0xB9A3}, //2727 #HANGUL SYLLABLE RIEUL YI SIOS + {0x9086, 0xB9A4}, //2728 #HANGUL SYLLABLE RIEUL YI SSANGSIOS + {0x9087, 0xB9A5}, //2729 #HANGUL SYLLABLE RIEUL YI IEUNG + {0x9088, 0xB9A6}, //2730 #HANGUL SYLLABLE RIEUL YI CIEUC + {0x9089, 0xB9A7}, //2731 #HANGUL SYLLABLE RIEUL YI CHIEUCH + {0x908A, 0xB9A8}, //2732 #HANGUL SYLLABLE RIEUL YI KHIEUKH + {0x908B, 0xB9A9}, //2733 #HANGUL SYLLABLE RIEUL YI THIEUTH + {0x908C, 0xB9AA}, //2734 #HANGUL SYLLABLE RIEUL YI PHIEUPH + {0x908D, 0xB9AB}, //2735 #HANGUL SYLLABLE RIEUL YI HIEUH + {0x908E, 0xB9AE}, //2736 #HANGUL SYLLABLE RIEUL I SSANGKIYEOK + {0x908F, 0xB9AF}, //2737 #HANGUL SYLLABLE RIEUL I KIYEOKSIOS + {0x9090, 0xB9B1}, //2738 #HANGUL SYLLABLE RIEUL I NIEUNCIEUC + {0x9091, 0xB9B2}, //2739 #HANGUL SYLLABLE RIEUL I NIEUNHIEUH + {0x9092, 0xB9B3}, //2740 #HANGUL SYLLABLE RIEUL I TIKEUT + {0x9093, 0xB9B5}, //2741 #HANGUL SYLLABLE RIEUL I RIEULKIYEOK + {0x9094, 0xB9B6}, //2742 #HANGUL SYLLABLE RIEUL I RIEULMIEUM + {0x9095, 0xB9B7}, //2743 #HANGUL SYLLABLE RIEUL I RIEULPIEUP + {0x9096, 0xB9B8}, //2744 #HANGUL SYLLABLE RIEUL I RIEULSIOS + {0x9097, 0xB9B9}, //2745 #HANGUL SYLLABLE RIEUL I RIEULTHIEUTH + {0x9098, 0xB9BA}, //2746 #HANGUL SYLLABLE RIEUL I RIEULPHIEUPH + {0x9099, 0xB9BB}, //2747 #HANGUL SYLLABLE RIEUL I RIEULHIEUH + {0x909A, 0xB9BE}, //2748 #HANGUL SYLLABLE RIEUL I PIEUPSIOS + {0x909B, 0xB9C0}, //2749 #HANGUL SYLLABLE RIEUL I SSANGSIOS + {0x909C, 0xB9C2}, //2750 #HANGUL SYLLABLE RIEUL I CIEUC + {0x909D, 0xB9C3}, //2751 #HANGUL SYLLABLE RIEUL I CHIEUCH + {0x909E, 0xB9C4}, //2752 #HANGUL SYLLABLE RIEUL I KHIEUKH + {0x909F, 0xB9C5}, //2753 #HANGUL SYLLABLE RIEUL I THIEUTH + {0x90A0, 0xB9C6}, //2754 #HANGUL SYLLABLE RIEUL I PHIEUPH + {0x90A1, 0xB9C7}, //2755 #HANGUL SYLLABLE RIEUL I HIEUH + {0x90A2, 0xB9CA}, //2756 #HANGUL SYLLABLE MIEUM A SSANGKIYEOK + {0x90A3, 0xB9CB}, //2757 #HANGUL SYLLABLE MIEUM A KIYEOKSIOS + {0x90A4, 0xB9CD}, //2758 #HANGUL SYLLABLE MIEUM A NIEUNCIEUC + {0x90A5, 0xB9D3}, //2759 #HANGUL SYLLABLE MIEUM A RIEULPIEUP + {0x90A6, 0xB9D4}, //2760 #HANGUL SYLLABLE MIEUM A RIEULSIOS + {0x90A7, 0xB9D5}, //2761 #HANGUL SYLLABLE MIEUM A RIEULTHIEUTH + {0x90A8, 0xB9D6}, //2762 #HANGUL SYLLABLE MIEUM A RIEULPHIEUPH + {0x90A9, 0xB9D7}, //2763 #HANGUL SYLLABLE MIEUM A RIEULHIEUH + {0x90AA, 0xB9DA}, //2764 #HANGUL SYLLABLE MIEUM A PIEUPSIOS + {0x90AB, 0xB9DC}, //2765 #HANGUL SYLLABLE MIEUM A SSANGSIOS + {0x90AC, 0xB9DF}, //2766 #HANGUL SYLLABLE MIEUM A CHIEUCH + {0x90AD, 0xB9E0}, //2767 #HANGUL SYLLABLE MIEUM A KHIEUKH + {0x90AE, 0xB9E2}, //2768 #HANGUL SYLLABLE MIEUM A PHIEUPH + {0x90AF, 0xB9E6}, //2769 #HANGUL SYLLABLE MIEUM AE SSANGKIYEOK + {0x90B0, 0xB9E7}, //2770 #HANGUL SYLLABLE MIEUM AE KIYEOKSIOS + {0x90B1, 0xB9E9}, //2771 #HANGUL SYLLABLE MIEUM AE NIEUNCIEUC + {0x90B2, 0xB9EA}, //2772 #HANGUL SYLLABLE MIEUM AE NIEUNHIEUH + {0x90B3, 0xB9EB}, //2773 #HANGUL SYLLABLE MIEUM AE TIKEUT + {0x90B4, 0xB9ED}, //2774 #HANGUL SYLLABLE MIEUM AE RIEULKIYEOK + {0x90B5, 0xB9EE}, //2775 #HANGUL SYLLABLE MIEUM AE RIEULMIEUM + {0x90B6, 0xB9EF}, //2776 #HANGUL SYLLABLE MIEUM AE RIEULPIEUP + {0x90B7, 0xB9F0}, //2777 #HANGUL SYLLABLE MIEUM AE RIEULSIOS + {0x90B8, 0xB9F1}, //2778 #HANGUL SYLLABLE MIEUM AE RIEULTHIEUTH + {0x90B9, 0xB9F2}, //2779 #HANGUL SYLLABLE MIEUM AE RIEULPHIEUPH + {0x90BA, 0xB9F3}, //2780 #HANGUL SYLLABLE MIEUM AE RIEULHIEUH + {0x90BB, 0xB9F6}, //2781 #HANGUL SYLLABLE MIEUM AE PIEUPSIOS + {0x90BC, 0xB9FB}, //2782 #HANGUL SYLLABLE MIEUM AE CHIEUCH + {0x90BD, 0xB9FC}, //2783 #HANGUL SYLLABLE MIEUM AE KHIEUKH + {0x90BE, 0xB9FD}, //2784 #HANGUL SYLLABLE MIEUM AE THIEUTH + {0x90BF, 0xB9FE}, //2785 #HANGUL SYLLABLE MIEUM AE PHIEUPH + {0x90C0, 0xB9FF}, //2786 #HANGUL SYLLABLE MIEUM AE HIEUH + {0x90C1, 0xBA02}, //2787 #HANGUL SYLLABLE MIEUM YA SSANGKIYEOK + {0x90C2, 0xBA03}, //2788 #HANGUL SYLLABLE MIEUM YA KIYEOKSIOS + {0x90C3, 0xBA04}, //2789 #HANGUL SYLLABLE MIEUM YA NIEUN + {0x90C4, 0xBA05}, //2790 #HANGUL SYLLABLE MIEUM YA NIEUNCIEUC + {0x90C5, 0xBA06}, //2791 #HANGUL SYLLABLE MIEUM YA NIEUNHIEUH + {0x90C6, 0xBA07}, //2792 #HANGUL SYLLABLE MIEUM YA TIKEUT + {0x90C7, 0xBA09}, //2793 #HANGUL SYLLABLE MIEUM YA RIEULKIYEOK + {0x90C8, 0xBA0A}, //2794 #HANGUL SYLLABLE MIEUM YA RIEULMIEUM + {0x90C9, 0xBA0B}, //2795 #HANGUL SYLLABLE MIEUM YA RIEULPIEUP + {0x90CA, 0xBA0C}, //2796 #HANGUL SYLLABLE MIEUM YA RIEULSIOS + {0x90CB, 0xBA0D}, //2797 #HANGUL SYLLABLE MIEUM YA RIEULTHIEUTH + {0x90CC, 0xBA0E}, //2798 #HANGUL SYLLABLE MIEUM YA RIEULPHIEUPH + {0x90CD, 0xBA0F}, //2799 #HANGUL SYLLABLE MIEUM YA RIEULHIEUH + {0x90CE, 0xBA10}, //2800 #HANGUL SYLLABLE MIEUM YA MIEUM + {0x90CF, 0xBA11}, //2801 #HANGUL SYLLABLE MIEUM YA PIEUP + {0x90D0, 0xBA12}, //2802 #HANGUL SYLLABLE MIEUM YA PIEUPSIOS + {0x90D1, 0xBA13}, //2803 #HANGUL SYLLABLE MIEUM YA SIOS + {0x90D2, 0xBA14}, //2804 #HANGUL SYLLABLE MIEUM YA SSANGSIOS + {0x90D3, 0xBA16}, //2805 #HANGUL SYLLABLE MIEUM YA CIEUC + {0x90D4, 0xBA17}, //2806 #HANGUL SYLLABLE MIEUM YA CHIEUCH + {0x90D5, 0xBA18}, //2807 #HANGUL SYLLABLE MIEUM YA KHIEUKH + {0x90D6, 0xBA19}, //2808 #HANGUL SYLLABLE MIEUM YA THIEUTH + {0x90D7, 0xBA1A}, //2809 #HANGUL SYLLABLE MIEUM YA PHIEUPH + {0x90D8, 0xBA1B}, //2810 #HANGUL SYLLABLE MIEUM YA HIEUH + {0x90D9, 0xBA1C}, //2811 #HANGUL SYLLABLE MIEUM YAE + {0x90DA, 0xBA1D}, //2812 #HANGUL SYLLABLE MIEUM YAE KIYEOK + {0x90DB, 0xBA1E}, //2813 #HANGUL SYLLABLE MIEUM YAE SSANGKIYEOK + {0x90DC, 0xBA1F}, //2814 #HANGUL SYLLABLE MIEUM YAE KIYEOKSIOS + {0x90DD, 0xBA20}, //2815 #HANGUL SYLLABLE MIEUM YAE NIEUN + {0x90DE, 0xBA21}, //2816 #HANGUL SYLLABLE MIEUM YAE NIEUNCIEUC + {0x90DF, 0xBA22}, //2817 #HANGUL SYLLABLE MIEUM YAE NIEUNHIEUH + {0x90E0, 0xBA23}, //2818 #HANGUL SYLLABLE MIEUM YAE TIKEUT + {0x90E1, 0xBA24}, //2819 #HANGUL SYLLABLE MIEUM YAE RIEUL + {0x90E2, 0xBA25}, //2820 #HANGUL SYLLABLE MIEUM YAE RIEULKIYEOK + {0x90E3, 0xBA26}, //2821 #HANGUL SYLLABLE MIEUM YAE RIEULMIEUM + {0x90E4, 0xBA27}, //2822 #HANGUL SYLLABLE MIEUM YAE RIEULPIEUP + {0x90E5, 0xBA28}, //2823 #HANGUL SYLLABLE MIEUM YAE RIEULSIOS + {0x90E6, 0xBA29}, //2824 #HANGUL SYLLABLE MIEUM YAE RIEULTHIEUTH + {0x90E7, 0xBA2A}, //2825 #HANGUL SYLLABLE MIEUM YAE RIEULPHIEUPH + {0x90E8, 0xBA2B}, //2826 #HANGUL SYLLABLE MIEUM YAE RIEULHIEUH + {0x90E9, 0xBA2C}, //2827 #HANGUL SYLLABLE MIEUM YAE MIEUM + {0x90EA, 0xBA2D}, //2828 #HANGUL SYLLABLE MIEUM YAE PIEUP + {0x90EB, 0xBA2E}, //2829 #HANGUL SYLLABLE MIEUM YAE PIEUPSIOS + {0x90EC, 0xBA2F}, //2830 #HANGUL SYLLABLE MIEUM YAE SIOS + {0x90ED, 0xBA30}, //2831 #HANGUL SYLLABLE MIEUM YAE SSANGSIOS + {0x90EE, 0xBA31}, //2832 #HANGUL SYLLABLE MIEUM YAE IEUNG + {0x90EF, 0xBA32}, //2833 #HANGUL SYLLABLE MIEUM YAE CIEUC + {0x90F0, 0xBA33}, //2834 #HANGUL SYLLABLE MIEUM YAE CHIEUCH + {0x90F1, 0xBA34}, //2835 #HANGUL SYLLABLE MIEUM YAE KHIEUKH + {0x90F2, 0xBA35}, //2836 #HANGUL SYLLABLE MIEUM YAE THIEUTH + {0x90F3, 0xBA36}, //2837 #HANGUL SYLLABLE MIEUM YAE PHIEUPH + {0x90F4, 0xBA37}, //2838 #HANGUL SYLLABLE MIEUM YAE HIEUH + {0x90F5, 0xBA3A}, //2839 #HANGUL SYLLABLE MIEUM EO SSANGKIYEOK + {0x90F6, 0xBA3B}, //2840 #HANGUL SYLLABLE MIEUM EO KIYEOKSIOS + {0x90F7, 0xBA3D}, //2841 #HANGUL SYLLABLE MIEUM EO NIEUNCIEUC + {0x90F8, 0xBA3E}, //2842 #HANGUL SYLLABLE MIEUM EO NIEUNHIEUH + {0x90F9, 0xBA3F}, //2843 #HANGUL SYLLABLE MIEUM EO TIKEUT + {0x90FA, 0xBA41}, //2844 #HANGUL SYLLABLE MIEUM EO RIEULKIYEOK + {0x90FB, 0xBA43}, //2845 #HANGUL SYLLABLE MIEUM EO RIEULPIEUP + {0x90FC, 0xBA44}, //2846 #HANGUL SYLLABLE MIEUM EO RIEULSIOS + {0x90FD, 0xBA45}, //2847 #HANGUL SYLLABLE MIEUM EO RIEULTHIEUTH + {0x90FE, 0xBA46}, //2848 #HANGUL SYLLABLE MIEUM EO RIEULPHIEUPH + {0x9141, 0xBA47}, //2849 #HANGUL SYLLABLE MIEUM EO RIEULHIEUH + {0x9142, 0xBA4A}, //2850 #HANGUL SYLLABLE MIEUM EO PIEUPSIOS + {0x9143, 0xBA4C}, //2851 #HANGUL SYLLABLE MIEUM EO SSANGSIOS + {0x9144, 0xBA4F}, //2852 #HANGUL SYLLABLE MIEUM EO CHIEUCH + {0x9145, 0xBA50}, //2853 #HANGUL SYLLABLE MIEUM EO KHIEUKH + {0x9146, 0xBA51}, //2854 #HANGUL SYLLABLE MIEUM EO THIEUTH + {0x9147, 0xBA52}, //2855 #HANGUL SYLLABLE MIEUM EO PHIEUPH + {0x9148, 0xBA56}, //2856 #HANGUL SYLLABLE MIEUM E SSANGKIYEOK + {0x9149, 0xBA57}, //2857 #HANGUL SYLLABLE MIEUM E KIYEOKSIOS + {0x914A, 0xBA59}, //2858 #HANGUL SYLLABLE MIEUM E NIEUNCIEUC + {0x914B, 0xBA5A}, //2859 #HANGUL SYLLABLE MIEUM E NIEUNHIEUH + {0x914C, 0xBA5B}, //2860 #HANGUL SYLLABLE MIEUM E TIKEUT + {0x914D, 0xBA5D}, //2861 #HANGUL SYLLABLE MIEUM E RIEULKIYEOK + {0x914E, 0xBA5E}, //2862 #HANGUL SYLLABLE MIEUM E RIEULMIEUM + {0x914F, 0xBA5F}, //2863 #HANGUL SYLLABLE MIEUM E RIEULPIEUP + {0x9150, 0xBA60}, //2864 #HANGUL SYLLABLE MIEUM E RIEULSIOS + {0x9151, 0xBA61}, //2865 #HANGUL SYLLABLE MIEUM E RIEULTHIEUTH + {0x9152, 0xBA62}, //2866 #HANGUL SYLLABLE MIEUM E RIEULPHIEUPH + {0x9153, 0xBA63}, //2867 #HANGUL SYLLABLE MIEUM E RIEULHIEUH + {0x9154, 0xBA66}, //2868 #HANGUL SYLLABLE MIEUM E PIEUPSIOS + {0x9155, 0xBA6A}, //2869 #HANGUL SYLLABLE MIEUM E CIEUC + {0x9156, 0xBA6B}, //2870 #HANGUL SYLLABLE MIEUM E CHIEUCH + {0x9157, 0xBA6C}, //2871 #HANGUL SYLLABLE MIEUM E KHIEUKH + {0x9158, 0xBA6D}, //2872 #HANGUL SYLLABLE MIEUM E THIEUTH + {0x9159, 0xBA6E}, //2873 #HANGUL SYLLABLE MIEUM E PHIEUPH + {0x915A, 0xBA6F}, //2874 #HANGUL SYLLABLE MIEUM E HIEUH + {0x9161, 0xBA72}, //2875 #HANGUL SYLLABLE MIEUM YEO SSANGKIYEOK + {0x9162, 0xBA73}, //2876 #HANGUL SYLLABLE MIEUM YEO KIYEOKSIOS + {0x9163, 0xBA75}, //2877 #HANGUL SYLLABLE MIEUM YEO NIEUNCIEUC + {0x9164, 0xBA76}, //2878 #HANGUL SYLLABLE MIEUM YEO NIEUNHIEUH + {0x9165, 0xBA77}, //2879 #HANGUL SYLLABLE MIEUM YEO TIKEUT + {0x9166, 0xBA79}, //2880 #HANGUL SYLLABLE MIEUM YEO RIEULKIYEOK + {0x9167, 0xBA7A}, //2881 #HANGUL SYLLABLE MIEUM YEO RIEULMIEUM + {0x9168, 0xBA7B}, //2882 #HANGUL SYLLABLE MIEUM YEO RIEULPIEUP + {0x9169, 0xBA7C}, //2883 #HANGUL SYLLABLE MIEUM YEO RIEULSIOS + {0x916A, 0xBA7D}, //2884 #HANGUL SYLLABLE MIEUM YEO RIEULTHIEUTH + {0x916B, 0xBA7E}, //2885 #HANGUL SYLLABLE MIEUM YEO RIEULPHIEUPH + {0x916C, 0xBA7F}, //2886 #HANGUL SYLLABLE MIEUM YEO RIEULHIEUH + {0x916D, 0xBA80}, //2887 #HANGUL SYLLABLE MIEUM YEO MIEUM + {0x916E, 0xBA81}, //2888 #HANGUL SYLLABLE MIEUM YEO PIEUP + {0x916F, 0xBA82}, //2889 #HANGUL SYLLABLE MIEUM YEO PIEUPSIOS + {0x9170, 0xBA86}, //2890 #HANGUL SYLLABLE MIEUM YEO CIEUC + {0x9171, 0xBA88}, //2891 #HANGUL SYLLABLE MIEUM YEO KHIEUKH + {0x9172, 0xBA89}, //2892 #HANGUL SYLLABLE MIEUM YEO THIEUTH + {0x9173, 0xBA8A}, //2893 #HANGUL SYLLABLE MIEUM YEO PHIEUPH + {0x9174, 0xBA8B}, //2894 #HANGUL SYLLABLE MIEUM YEO HIEUH + {0x9175, 0xBA8D}, //2895 #HANGUL SYLLABLE MIEUM YE KIYEOK + {0x9176, 0xBA8E}, //2896 #HANGUL SYLLABLE MIEUM YE SSANGKIYEOK + {0x9177, 0xBA8F}, //2897 #HANGUL SYLLABLE MIEUM YE KIYEOKSIOS + {0x9178, 0xBA90}, //2898 #HANGUL SYLLABLE MIEUM YE NIEUN + {0x9179, 0xBA91}, //2899 #HANGUL SYLLABLE MIEUM YE NIEUNCIEUC + {0x917A, 0xBA92}, //2900 #HANGUL SYLLABLE MIEUM YE NIEUNHIEUH + {0x9181, 0xBA93}, //2901 #HANGUL SYLLABLE MIEUM YE TIKEUT + {0x9182, 0xBA94}, //2902 #HANGUL SYLLABLE MIEUM YE RIEUL + {0x9183, 0xBA95}, //2903 #HANGUL SYLLABLE MIEUM YE RIEULKIYEOK + {0x9184, 0xBA96}, //2904 #HANGUL SYLLABLE MIEUM YE RIEULMIEUM + {0x9185, 0xBA97}, //2905 #HANGUL SYLLABLE MIEUM YE RIEULPIEUP + {0x9186, 0xBA98}, //2906 #HANGUL SYLLABLE MIEUM YE RIEULSIOS + {0x9187, 0xBA99}, //2907 #HANGUL SYLLABLE MIEUM YE RIEULTHIEUTH + {0x9188, 0xBA9A}, //2908 #HANGUL SYLLABLE MIEUM YE RIEULPHIEUPH + {0x9189, 0xBA9B}, //2909 #HANGUL SYLLABLE MIEUM YE RIEULHIEUH + {0x918A, 0xBA9C}, //2910 #HANGUL SYLLABLE MIEUM YE MIEUM + {0x918B, 0xBA9D}, //2911 #HANGUL SYLLABLE MIEUM YE PIEUP + {0x918C, 0xBA9E}, //2912 #HANGUL SYLLABLE MIEUM YE PIEUPSIOS + {0x918D, 0xBA9F}, //2913 #HANGUL SYLLABLE MIEUM YE SIOS + {0x918E, 0xBAA0}, //2914 #HANGUL SYLLABLE MIEUM YE SSANGSIOS + {0x918F, 0xBAA1}, //2915 #HANGUL SYLLABLE MIEUM YE IEUNG + {0x9190, 0xBAA2}, //2916 #HANGUL SYLLABLE MIEUM YE CIEUC + {0x9191, 0xBAA3}, //2917 #HANGUL SYLLABLE MIEUM YE CHIEUCH + {0x9192, 0xBAA4}, //2918 #HANGUL SYLLABLE MIEUM YE KHIEUKH + {0x9193, 0xBAA5}, //2919 #HANGUL SYLLABLE MIEUM YE THIEUTH + {0x9194, 0xBAA6}, //2920 #HANGUL SYLLABLE MIEUM YE PHIEUPH + {0x9195, 0xBAA7}, //2921 #HANGUL SYLLABLE MIEUM YE HIEUH + {0x9196, 0xBAAA}, //2922 #HANGUL SYLLABLE MIEUM O SSANGKIYEOK + {0x9197, 0xBAAD}, //2923 #HANGUL SYLLABLE MIEUM O NIEUNCIEUC + {0x9198, 0xBAAE}, //2924 #HANGUL SYLLABLE MIEUM O NIEUNHIEUH + {0x9199, 0xBAAF}, //2925 #HANGUL SYLLABLE MIEUM O TIKEUT + {0x919A, 0xBAB1}, //2926 #HANGUL SYLLABLE MIEUM O RIEULKIYEOK + {0x919B, 0xBAB3}, //2927 #HANGUL SYLLABLE MIEUM O RIEULPIEUP + {0x919C, 0xBAB4}, //2928 #HANGUL SYLLABLE MIEUM O RIEULSIOS + {0x919D, 0xBAB5}, //2929 #HANGUL SYLLABLE MIEUM O RIEULTHIEUTH + {0x919E, 0xBAB6}, //2930 #HANGUL SYLLABLE MIEUM O RIEULPHIEUPH + {0x919F, 0xBAB7}, //2931 #HANGUL SYLLABLE MIEUM O RIEULHIEUH + {0x91A0, 0xBABA}, //2932 #HANGUL SYLLABLE MIEUM O PIEUPSIOS + {0x91A1, 0xBABC}, //2933 #HANGUL SYLLABLE MIEUM O SSANGSIOS + {0x91A2, 0xBABE}, //2934 #HANGUL SYLLABLE MIEUM O CIEUC + {0x91A3, 0xBABF}, //2935 #HANGUL SYLLABLE MIEUM O CHIEUCH + {0x91A4, 0xBAC0}, //2936 #HANGUL SYLLABLE MIEUM O KHIEUKH + {0x91A5, 0xBAC1}, //2937 #HANGUL SYLLABLE MIEUM O THIEUTH + {0x91A6, 0xBAC2}, //2938 #HANGUL SYLLABLE MIEUM O PHIEUPH + {0x91A7, 0xBAC3}, //2939 #HANGUL SYLLABLE MIEUM O HIEUH + {0x91A8, 0xBAC5}, //2940 #HANGUL SYLLABLE MIEUM WA KIYEOK + {0x91A9, 0xBAC6}, //2941 #HANGUL SYLLABLE MIEUM WA SSANGKIYEOK + {0x91AA, 0xBAC7}, //2942 #HANGUL SYLLABLE MIEUM WA KIYEOKSIOS + {0x91AB, 0xBAC9}, //2943 #HANGUL SYLLABLE MIEUM WA NIEUNCIEUC + {0x91AC, 0xBACA}, //2944 #HANGUL SYLLABLE MIEUM WA NIEUNHIEUH + {0x91AD, 0xBACB}, //2945 #HANGUL SYLLABLE MIEUM WA TIKEUT + {0x91AE, 0xBACC}, //2946 #HANGUL SYLLABLE MIEUM WA RIEUL + {0x91AF, 0xBACD}, //2947 #HANGUL SYLLABLE MIEUM WA RIEULKIYEOK + {0x91B0, 0xBACE}, //2948 #HANGUL SYLLABLE MIEUM WA RIEULMIEUM + {0x91B1, 0xBACF}, //2949 #HANGUL SYLLABLE MIEUM WA RIEULPIEUP + {0x91B2, 0xBAD0}, //2950 #HANGUL SYLLABLE MIEUM WA RIEULSIOS + {0x91B3, 0xBAD1}, //2951 #HANGUL SYLLABLE MIEUM WA RIEULTHIEUTH + {0x91B4, 0xBAD2}, //2952 #HANGUL SYLLABLE MIEUM WA RIEULPHIEUPH + {0x91B5, 0xBAD3}, //2953 #HANGUL SYLLABLE MIEUM WA RIEULHIEUH + {0x91B6, 0xBAD4}, //2954 #HANGUL SYLLABLE MIEUM WA MIEUM + {0x91B7, 0xBAD5}, //2955 #HANGUL SYLLABLE MIEUM WA PIEUP + {0x91B8, 0xBAD6}, //2956 #HANGUL SYLLABLE MIEUM WA PIEUPSIOS + {0x91B9, 0xBAD7}, //2957 #HANGUL SYLLABLE MIEUM WA SIOS + {0x91BA, 0xBADA}, //2958 #HANGUL SYLLABLE MIEUM WA CIEUC + {0x91BB, 0xBADB}, //2959 #HANGUL SYLLABLE MIEUM WA CHIEUCH + {0x91BC, 0xBADC}, //2960 #HANGUL SYLLABLE MIEUM WA KHIEUKH + {0x91BD, 0xBADD}, //2961 #HANGUL SYLLABLE MIEUM WA THIEUTH + {0x91BE, 0xBADE}, //2962 #HANGUL SYLLABLE MIEUM WA PHIEUPH + {0x91BF, 0xBADF}, //2963 #HANGUL SYLLABLE MIEUM WA HIEUH + {0x91C0, 0xBAE0}, //2964 #HANGUL SYLLABLE MIEUM WAE + {0x91C1, 0xBAE1}, //2965 #HANGUL SYLLABLE MIEUM WAE KIYEOK + {0x91C2, 0xBAE2}, //2966 #HANGUL SYLLABLE MIEUM WAE SSANGKIYEOK + {0x91C3, 0xBAE3}, //2967 #HANGUL SYLLABLE MIEUM WAE KIYEOKSIOS + {0x91C4, 0xBAE4}, //2968 #HANGUL SYLLABLE MIEUM WAE NIEUN + {0x91C5, 0xBAE5}, //2969 #HANGUL SYLLABLE MIEUM WAE NIEUNCIEUC + {0x91C6, 0xBAE6}, //2970 #HANGUL SYLLABLE MIEUM WAE NIEUNHIEUH + {0x91C7, 0xBAE7}, //2971 #HANGUL SYLLABLE MIEUM WAE TIKEUT + {0x91C8, 0xBAE8}, //2972 #HANGUL SYLLABLE MIEUM WAE RIEUL + {0x91C9, 0xBAE9}, //2973 #HANGUL SYLLABLE MIEUM WAE RIEULKIYEOK + {0x91CA, 0xBAEA}, //2974 #HANGUL SYLLABLE MIEUM WAE RIEULMIEUM + {0x91CB, 0xBAEB}, //2975 #HANGUL SYLLABLE MIEUM WAE RIEULPIEUP + {0x91CC, 0xBAEC}, //2976 #HANGUL SYLLABLE MIEUM WAE RIEULSIOS + {0x91CD, 0xBAED}, //2977 #HANGUL SYLLABLE MIEUM WAE RIEULTHIEUTH + {0x91CE, 0xBAEE}, //2978 #HANGUL SYLLABLE MIEUM WAE RIEULPHIEUPH + {0x91CF, 0xBAEF}, //2979 #HANGUL SYLLABLE MIEUM WAE RIEULHIEUH + {0x91D0, 0xBAF0}, //2980 #HANGUL SYLLABLE MIEUM WAE MIEUM + {0x91D1, 0xBAF1}, //2981 #HANGUL SYLLABLE MIEUM WAE PIEUP + {0x91D2, 0xBAF2}, //2982 #HANGUL SYLLABLE MIEUM WAE PIEUPSIOS + {0x91D3, 0xBAF3}, //2983 #HANGUL SYLLABLE MIEUM WAE SIOS + {0x91D4, 0xBAF4}, //2984 #HANGUL SYLLABLE MIEUM WAE SSANGSIOS + {0x91D5, 0xBAF5}, //2985 #HANGUL SYLLABLE MIEUM WAE IEUNG + {0x91D6, 0xBAF6}, //2986 #HANGUL SYLLABLE MIEUM WAE CIEUC + {0x91D7, 0xBAF7}, //2987 #HANGUL SYLLABLE MIEUM WAE CHIEUCH + {0x91D8, 0xBAF8}, //2988 #HANGUL SYLLABLE MIEUM WAE KHIEUKH + {0x91D9, 0xBAF9}, //2989 #HANGUL SYLLABLE MIEUM WAE THIEUTH + {0x91DA, 0xBAFA}, //2990 #HANGUL SYLLABLE MIEUM WAE PHIEUPH + {0x91DB, 0xBAFB}, //2991 #HANGUL SYLLABLE MIEUM WAE HIEUH + {0x91DC, 0xBAFD}, //2992 #HANGUL SYLLABLE MIEUM OE KIYEOK + {0x91DD, 0xBAFE}, //2993 #HANGUL SYLLABLE MIEUM OE SSANGKIYEOK + {0x91DE, 0xBAFF}, //2994 #HANGUL SYLLABLE MIEUM OE KIYEOKSIOS + {0x91DF, 0xBB01}, //2995 #HANGUL SYLLABLE MIEUM OE NIEUNCIEUC + {0x91E0, 0xBB02}, //2996 #HANGUL SYLLABLE MIEUM OE NIEUNHIEUH + {0x91E1, 0xBB03}, //2997 #HANGUL SYLLABLE MIEUM OE TIKEUT + {0x91E2, 0xBB05}, //2998 #HANGUL SYLLABLE MIEUM OE RIEULKIYEOK + {0x91E3, 0xBB06}, //2999 #HANGUL SYLLABLE MIEUM OE RIEULMIEUM + {0x91E4, 0xBB07}, //3000 #HANGUL SYLLABLE MIEUM OE RIEULPIEUP + {0x91E5, 0xBB08}, //3001 #HANGUL SYLLABLE MIEUM OE RIEULSIOS + {0x91E6, 0xBB09}, //3002 #HANGUL SYLLABLE MIEUM OE RIEULTHIEUTH + {0x91E7, 0xBB0A}, //3003 #HANGUL SYLLABLE MIEUM OE RIEULPHIEUPH + {0x91E8, 0xBB0B}, //3004 #HANGUL SYLLABLE MIEUM OE RIEULHIEUH + {0x91E9, 0xBB0C}, //3005 #HANGUL SYLLABLE MIEUM OE MIEUM + {0x91EA, 0xBB0E}, //3006 #HANGUL SYLLABLE MIEUM OE PIEUPSIOS + {0x91EB, 0xBB10}, //3007 #HANGUL SYLLABLE MIEUM OE SSANGSIOS + {0x91EC, 0xBB12}, //3008 #HANGUL SYLLABLE MIEUM OE CIEUC + {0x91ED, 0xBB13}, //3009 #HANGUL SYLLABLE MIEUM OE CHIEUCH + {0x91EE, 0xBB14}, //3010 #HANGUL SYLLABLE MIEUM OE KHIEUKH + {0x91EF, 0xBB15}, //3011 #HANGUL SYLLABLE MIEUM OE THIEUTH + {0x91F0, 0xBB16}, //3012 #HANGUL SYLLABLE MIEUM OE PHIEUPH + {0x91F1, 0xBB17}, //3013 #HANGUL SYLLABLE MIEUM OE HIEUH + {0x91F2, 0xBB19}, //3014 #HANGUL SYLLABLE MIEUM YO KIYEOK + {0x91F3, 0xBB1A}, //3015 #HANGUL SYLLABLE MIEUM YO SSANGKIYEOK + {0x91F4, 0xBB1B}, //3016 #HANGUL SYLLABLE MIEUM YO KIYEOKSIOS + {0x91F5, 0xBB1D}, //3017 #HANGUL SYLLABLE MIEUM YO NIEUNCIEUC + {0x91F6, 0xBB1E}, //3018 #HANGUL SYLLABLE MIEUM YO NIEUNHIEUH + {0x91F7, 0xBB1F}, //3019 #HANGUL SYLLABLE MIEUM YO TIKEUT + {0x91F8, 0xBB21}, //3020 #HANGUL SYLLABLE MIEUM YO RIEULKIYEOK + {0x91F9, 0xBB22}, //3021 #HANGUL SYLLABLE MIEUM YO RIEULMIEUM + {0x91FA, 0xBB23}, //3022 #HANGUL SYLLABLE MIEUM YO RIEULPIEUP + {0x91FB, 0xBB24}, //3023 #HANGUL SYLLABLE MIEUM YO RIEULSIOS + {0x91FC, 0xBB25}, //3024 #HANGUL SYLLABLE MIEUM YO RIEULTHIEUTH + {0x91FD, 0xBB26}, //3025 #HANGUL SYLLABLE MIEUM YO RIEULPHIEUPH + {0x91FE, 0xBB27}, //3026 #HANGUL SYLLABLE MIEUM YO RIEULHIEUH + {0x9241, 0xBB28}, //3027 #HANGUL SYLLABLE MIEUM YO MIEUM + {0x9242, 0xBB2A}, //3028 #HANGUL SYLLABLE MIEUM YO PIEUPSIOS + {0x9243, 0xBB2C}, //3029 #HANGUL SYLLABLE MIEUM YO SSANGSIOS + {0x9244, 0xBB2D}, //3030 #HANGUL SYLLABLE MIEUM YO IEUNG + {0x9245, 0xBB2E}, //3031 #HANGUL SYLLABLE MIEUM YO CIEUC + {0x9246, 0xBB2F}, //3032 #HANGUL SYLLABLE MIEUM YO CHIEUCH + {0x9247, 0xBB30}, //3033 #HANGUL SYLLABLE MIEUM YO KHIEUKH + {0x9248, 0xBB31}, //3034 #HANGUL SYLLABLE MIEUM YO THIEUTH + {0x9249, 0xBB32}, //3035 #HANGUL SYLLABLE MIEUM YO PHIEUPH + {0x924A, 0xBB33}, //3036 #HANGUL SYLLABLE MIEUM YO HIEUH + {0x924B, 0xBB37}, //3037 #HANGUL SYLLABLE MIEUM U KIYEOKSIOS + {0x924C, 0xBB39}, //3038 #HANGUL SYLLABLE MIEUM U NIEUNCIEUC + {0x924D, 0xBB3A}, //3039 #HANGUL SYLLABLE MIEUM U NIEUNHIEUH + {0x924E, 0xBB3F}, //3040 #HANGUL SYLLABLE MIEUM U RIEULPIEUP + {0x924F, 0xBB40}, //3041 #HANGUL SYLLABLE MIEUM U RIEULSIOS + {0x9250, 0xBB41}, //3042 #HANGUL SYLLABLE MIEUM U RIEULTHIEUTH + {0x9251, 0xBB42}, //3043 #HANGUL SYLLABLE MIEUM U RIEULPHIEUPH + {0x9252, 0xBB43}, //3044 #HANGUL SYLLABLE MIEUM U RIEULHIEUH + {0x9253, 0xBB46}, //3045 #HANGUL SYLLABLE MIEUM U PIEUPSIOS + {0x9254, 0xBB48}, //3046 #HANGUL SYLLABLE MIEUM U SSANGSIOS + {0x9255, 0xBB4A}, //3047 #HANGUL SYLLABLE MIEUM U CIEUC + {0x9256, 0xBB4B}, //3048 #HANGUL SYLLABLE MIEUM U CHIEUCH + {0x9257, 0xBB4C}, //3049 #HANGUL SYLLABLE MIEUM U KHIEUKH + {0x9258, 0xBB4E}, //3050 #HANGUL SYLLABLE MIEUM U PHIEUPH + {0x9259, 0xBB51}, //3051 #HANGUL SYLLABLE MIEUM WEO KIYEOK + {0x925A, 0xBB52}, //3052 #HANGUL SYLLABLE MIEUM WEO SSANGKIYEOK + {0x9261, 0xBB53}, //3053 #HANGUL SYLLABLE MIEUM WEO KIYEOKSIOS + {0x9262, 0xBB55}, //3054 #HANGUL SYLLABLE MIEUM WEO NIEUNCIEUC + {0x9263, 0xBB56}, //3055 #HANGUL SYLLABLE MIEUM WEO NIEUNHIEUH + {0x9264, 0xBB57}, //3056 #HANGUL SYLLABLE MIEUM WEO TIKEUT + {0x9265, 0xBB59}, //3057 #HANGUL SYLLABLE MIEUM WEO RIEULKIYEOK + {0x9266, 0xBB5A}, //3058 #HANGUL SYLLABLE MIEUM WEO RIEULMIEUM + {0x9267, 0xBB5B}, //3059 #HANGUL SYLLABLE MIEUM WEO RIEULPIEUP + {0x9268, 0xBB5C}, //3060 #HANGUL SYLLABLE MIEUM WEO RIEULSIOS + {0x9269, 0xBB5D}, //3061 #HANGUL SYLLABLE MIEUM WEO RIEULTHIEUTH + {0x926A, 0xBB5E}, //3062 #HANGUL SYLLABLE MIEUM WEO RIEULPHIEUPH + {0x926B, 0xBB5F}, //3063 #HANGUL SYLLABLE MIEUM WEO RIEULHIEUH + {0x926C, 0xBB60}, //3064 #HANGUL SYLLABLE MIEUM WEO MIEUM + {0x926D, 0xBB62}, //3065 #HANGUL SYLLABLE MIEUM WEO PIEUPSIOS + {0x926E, 0xBB64}, //3066 #HANGUL SYLLABLE MIEUM WEO SSANGSIOS + {0x926F, 0xBB65}, //3067 #HANGUL SYLLABLE MIEUM WEO IEUNG + {0x9270, 0xBB66}, //3068 #HANGUL SYLLABLE MIEUM WEO CIEUC + {0x9271, 0xBB67}, //3069 #HANGUL SYLLABLE MIEUM WEO CHIEUCH + {0x9272, 0xBB68}, //3070 #HANGUL SYLLABLE MIEUM WEO KHIEUKH + {0x9273, 0xBB69}, //3071 #HANGUL SYLLABLE MIEUM WEO THIEUTH + {0x9274, 0xBB6A}, //3072 #HANGUL SYLLABLE MIEUM WEO PHIEUPH + {0x9275, 0xBB6B}, //3073 #HANGUL SYLLABLE MIEUM WEO HIEUH + {0x9276, 0xBB6D}, //3074 #HANGUL SYLLABLE MIEUM WE KIYEOK + {0x9277, 0xBB6E}, //3075 #HANGUL SYLLABLE MIEUM WE SSANGKIYEOK + {0x9278, 0xBB6F}, //3076 #HANGUL SYLLABLE MIEUM WE KIYEOKSIOS + {0x9279, 0xBB70}, //3077 #HANGUL SYLLABLE MIEUM WE NIEUN + {0x927A, 0xBB71}, //3078 #HANGUL SYLLABLE MIEUM WE NIEUNCIEUC + {0x9281, 0xBB72}, //3079 #HANGUL SYLLABLE MIEUM WE NIEUNHIEUH + {0x9282, 0xBB73}, //3080 #HANGUL SYLLABLE MIEUM WE TIKEUT + {0x9283, 0xBB74}, //3081 #HANGUL SYLLABLE MIEUM WE RIEUL + {0x9284, 0xBB75}, //3082 #HANGUL SYLLABLE MIEUM WE RIEULKIYEOK + {0x9285, 0xBB76}, //3083 #HANGUL SYLLABLE MIEUM WE RIEULMIEUM + {0x9286, 0xBB77}, //3084 #HANGUL SYLLABLE MIEUM WE RIEULPIEUP + {0x9287, 0xBB78}, //3085 #HANGUL SYLLABLE MIEUM WE RIEULSIOS + {0x9288, 0xBB79}, //3086 #HANGUL SYLLABLE MIEUM WE RIEULTHIEUTH + {0x9289, 0xBB7A}, //3087 #HANGUL SYLLABLE MIEUM WE RIEULPHIEUPH + {0x928A, 0xBB7B}, //3088 #HANGUL SYLLABLE MIEUM WE RIEULHIEUH + {0x928B, 0xBB7C}, //3089 #HANGUL SYLLABLE MIEUM WE MIEUM + {0x928C, 0xBB7D}, //3090 #HANGUL SYLLABLE MIEUM WE PIEUP + {0x928D, 0xBB7E}, //3091 #HANGUL SYLLABLE MIEUM WE PIEUPSIOS + {0x928E, 0xBB7F}, //3092 #HANGUL SYLLABLE MIEUM WE SIOS + {0x928F, 0xBB80}, //3093 #HANGUL SYLLABLE MIEUM WE SSANGSIOS + {0x9290, 0xBB81}, //3094 #HANGUL SYLLABLE MIEUM WE IEUNG + {0x9291, 0xBB82}, //3095 #HANGUL SYLLABLE MIEUM WE CIEUC + {0x9292, 0xBB83}, //3096 #HANGUL SYLLABLE MIEUM WE CHIEUCH + {0x9293, 0xBB84}, //3097 #HANGUL SYLLABLE MIEUM WE KHIEUKH + {0x9294, 0xBB85}, //3098 #HANGUL SYLLABLE MIEUM WE THIEUTH + {0x9295, 0xBB86}, //3099 #HANGUL SYLLABLE MIEUM WE PHIEUPH + {0x9296, 0xBB87}, //3100 #HANGUL SYLLABLE MIEUM WE HIEUH + {0x9297, 0xBB89}, //3101 #HANGUL SYLLABLE MIEUM WI KIYEOK + {0x9298, 0xBB8A}, //3102 #HANGUL SYLLABLE MIEUM WI SSANGKIYEOK + {0x9299, 0xBB8B}, //3103 #HANGUL SYLLABLE MIEUM WI KIYEOKSIOS + {0x929A, 0xBB8D}, //3104 #HANGUL SYLLABLE MIEUM WI NIEUNCIEUC + {0x929B, 0xBB8E}, //3105 #HANGUL SYLLABLE MIEUM WI NIEUNHIEUH + {0x929C, 0xBB8F}, //3106 #HANGUL SYLLABLE MIEUM WI TIKEUT + {0x929D, 0xBB91}, //3107 #HANGUL SYLLABLE MIEUM WI RIEULKIYEOK + {0x929E, 0xBB92}, //3108 #HANGUL SYLLABLE MIEUM WI RIEULMIEUM + {0x929F, 0xBB93}, //3109 #HANGUL SYLLABLE MIEUM WI RIEULPIEUP + {0x92A0, 0xBB94}, //3110 #HANGUL SYLLABLE MIEUM WI RIEULSIOS + {0x92A1, 0xBB95}, //3111 #HANGUL SYLLABLE MIEUM WI RIEULTHIEUTH + {0x92A2, 0xBB96}, //3112 #HANGUL SYLLABLE MIEUM WI RIEULPHIEUPH + {0x92A3, 0xBB97}, //3113 #HANGUL SYLLABLE MIEUM WI RIEULHIEUH + {0x92A4, 0xBB98}, //3114 #HANGUL SYLLABLE MIEUM WI MIEUM + {0x92A5, 0xBB99}, //3115 #HANGUL SYLLABLE MIEUM WI PIEUP + {0x92A6, 0xBB9A}, //3116 #HANGUL SYLLABLE MIEUM WI PIEUPSIOS + {0x92A7, 0xBB9B}, //3117 #HANGUL SYLLABLE MIEUM WI SIOS + {0x92A8, 0xBB9C}, //3118 #HANGUL SYLLABLE MIEUM WI SSANGSIOS + {0x92A9, 0xBB9D}, //3119 #HANGUL SYLLABLE MIEUM WI IEUNG + {0x92AA, 0xBB9E}, //3120 #HANGUL SYLLABLE MIEUM WI CIEUC + {0x92AB, 0xBB9F}, //3121 #HANGUL SYLLABLE MIEUM WI CHIEUCH + {0x92AC, 0xBBA0}, //3122 #HANGUL SYLLABLE MIEUM WI KHIEUKH + {0x92AD, 0xBBA1}, //3123 #HANGUL SYLLABLE MIEUM WI THIEUTH + {0x92AE, 0xBBA2}, //3124 #HANGUL SYLLABLE MIEUM WI PHIEUPH + {0x92AF, 0xBBA3}, //3125 #HANGUL SYLLABLE MIEUM WI HIEUH + {0x92B0, 0xBBA5}, //3126 #HANGUL SYLLABLE MIEUM YU KIYEOK + {0x92B1, 0xBBA6}, //3127 #HANGUL SYLLABLE MIEUM YU SSANGKIYEOK + {0x92B2, 0xBBA7}, //3128 #HANGUL SYLLABLE MIEUM YU KIYEOKSIOS + {0x92B3, 0xBBA9}, //3129 #HANGUL SYLLABLE MIEUM YU NIEUNCIEUC + {0x92B4, 0xBBAA}, //3130 #HANGUL SYLLABLE MIEUM YU NIEUNHIEUH + {0x92B5, 0xBBAB}, //3131 #HANGUL SYLLABLE MIEUM YU TIKEUT + {0x92B6, 0xBBAD}, //3132 #HANGUL SYLLABLE MIEUM YU RIEULKIYEOK + {0x92B7, 0xBBAE}, //3133 #HANGUL SYLLABLE MIEUM YU RIEULMIEUM + {0x92B8, 0xBBAF}, //3134 #HANGUL SYLLABLE MIEUM YU RIEULPIEUP + {0x92B9, 0xBBB0}, //3135 #HANGUL SYLLABLE MIEUM YU RIEULSIOS + {0x92BA, 0xBBB1}, //3136 #HANGUL SYLLABLE MIEUM YU RIEULTHIEUTH + {0x92BB, 0xBBB2}, //3137 #HANGUL SYLLABLE MIEUM YU RIEULPHIEUPH + {0x92BC, 0xBBB3}, //3138 #HANGUL SYLLABLE MIEUM YU RIEULHIEUH + {0x92BD, 0xBBB5}, //3139 #HANGUL SYLLABLE MIEUM YU PIEUP + {0x92BE, 0xBBB6}, //3140 #HANGUL SYLLABLE MIEUM YU PIEUPSIOS + {0x92BF, 0xBBB8}, //3141 #HANGUL SYLLABLE MIEUM YU SSANGSIOS + {0x92C0, 0xBBB9}, //3142 #HANGUL SYLLABLE MIEUM YU IEUNG + {0x92C1, 0xBBBA}, //3143 #HANGUL SYLLABLE MIEUM YU CIEUC + {0x92C2, 0xBBBB}, //3144 #HANGUL SYLLABLE MIEUM YU CHIEUCH + {0x92C3, 0xBBBC}, //3145 #HANGUL SYLLABLE MIEUM YU KHIEUKH + {0x92C4, 0xBBBD}, //3146 #HANGUL SYLLABLE MIEUM YU THIEUTH + {0x92C5, 0xBBBE}, //3147 #HANGUL SYLLABLE MIEUM YU PHIEUPH + {0x92C6, 0xBBBF}, //3148 #HANGUL SYLLABLE MIEUM YU HIEUH + {0x92C7, 0xBBC1}, //3149 #HANGUL SYLLABLE MIEUM EU KIYEOK + {0x92C8, 0xBBC2}, //3150 #HANGUL SYLLABLE MIEUM EU SSANGKIYEOK + {0x92C9, 0xBBC3}, //3151 #HANGUL SYLLABLE MIEUM EU KIYEOKSIOS + {0x92CA, 0xBBC5}, //3152 #HANGUL SYLLABLE MIEUM EU NIEUNCIEUC + {0x92CB, 0xBBC6}, //3153 #HANGUL SYLLABLE MIEUM EU NIEUNHIEUH + {0x92CC, 0xBBC7}, //3154 #HANGUL SYLLABLE MIEUM EU TIKEUT + {0x92CD, 0xBBC9}, //3155 #HANGUL SYLLABLE MIEUM EU RIEULKIYEOK + {0x92CE, 0xBBCA}, //3156 #HANGUL SYLLABLE MIEUM EU RIEULMIEUM + {0x92CF, 0xBBCB}, //3157 #HANGUL SYLLABLE MIEUM EU RIEULPIEUP + {0x92D0, 0xBBCC}, //3158 #HANGUL SYLLABLE MIEUM EU RIEULSIOS + {0x92D1, 0xBBCD}, //3159 #HANGUL SYLLABLE MIEUM EU RIEULTHIEUTH + {0x92D2, 0xBBCE}, //3160 #HANGUL SYLLABLE MIEUM EU RIEULPHIEUPH + {0x92D3, 0xBBCF}, //3161 #HANGUL SYLLABLE MIEUM EU RIEULHIEUH + {0x92D4, 0xBBD1}, //3162 #HANGUL SYLLABLE MIEUM EU PIEUP + {0x92D5, 0xBBD2}, //3163 #HANGUL SYLLABLE MIEUM EU PIEUPSIOS + {0x92D6, 0xBBD4}, //3164 #HANGUL SYLLABLE MIEUM EU SSANGSIOS + {0x92D7, 0xBBD5}, //3165 #HANGUL SYLLABLE MIEUM EU IEUNG + {0x92D8, 0xBBD6}, //3166 #HANGUL SYLLABLE MIEUM EU CIEUC + {0x92D9, 0xBBD7}, //3167 #HANGUL SYLLABLE MIEUM EU CHIEUCH + {0x92DA, 0xBBD8}, //3168 #HANGUL SYLLABLE MIEUM EU KHIEUKH + {0x92DB, 0xBBD9}, //3169 #HANGUL SYLLABLE MIEUM EU THIEUTH + {0x92DC, 0xBBDA}, //3170 #HANGUL SYLLABLE MIEUM EU PHIEUPH + {0x92DD, 0xBBDB}, //3171 #HANGUL SYLLABLE MIEUM EU HIEUH + {0x92DE, 0xBBDC}, //3172 #HANGUL SYLLABLE MIEUM YI + {0x92DF, 0xBBDD}, //3173 #HANGUL SYLLABLE MIEUM YI KIYEOK + {0x92E0, 0xBBDE}, //3174 #HANGUL SYLLABLE MIEUM YI SSANGKIYEOK + {0x92E1, 0xBBDF}, //3175 #HANGUL SYLLABLE MIEUM YI KIYEOKSIOS + {0x92E2, 0xBBE0}, //3176 #HANGUL SYLLABLE MIEUM YI NIEUN + {0x92E3, 0xBBE1}, //3177 #HANGUL SYLLABLE MIEUM YI NIEUNCIEUC + {0x92E4, 0xBBE2}, //3178 #HANGUL SYLLABLE MIEUM YI NIEUNHIEUH + {0x92E5, 0xBBE3}, //3179 #HANGUL SYLLABLE MIEUM YI TIKEUT + {0x92E6, 0xBBE4}, //3180 #HANGUL SYLLABLE MIEUM YI RIEUL + {0x92E7, 0xBBE5}, //3181 #HANGUL SYLLABLE MIEUM YI RIEULKIYEOK + {0x92E8, 0xBBE6}, //3182 #HANGUL SYLLABLE MIEUM YI RIEULMIEUM + {0x92E9, 0xBBE7}, //3183 #HANGUL SYLLABLE MIEUM YI RIEULPIEUP + {0x92EA, 0xBBE8}, //3184 #HANGUL SYLLABLE MIEUM YI RIEULSIOS + {0x92EB, 0xBBE9}, //3185 #HANGUL SYLLABLE MIEUM YI RIEULTHIEUTH + {0x92EC, 0xBBEA}, //3186 #HANGUL SYLLABLE MIEUM YI RIEULPHIEUPH + {0x92ED, 0xBBEB}, //3187 #HANGUL SYLLABLE MIEUM YI RIEULHIEUH + {0x92EE, 0xBBEC}, //3188 #HANGUL SYLLABLE MIEUM YI MIEUM + {0x92EF, 0xBBED}, //3189 #HANGUL SYLLABLE MIEUM YI PIEUP + {0x92F0, 0xBBEE}, //3190 #HANGUL SYLLABLE MIEUM YI PIEUPSIOS + {0x92F1, 0xBBEF}, //3191 #HANGUL SYLLABLE MIEUM YI SIOS + {0x92F2, 0xBBF0}, //3192 #HANGUL SYLLABLE MIEUM YI SSANGSIOS + {0x92F3, 0xBBF1}, //3193 #HANGUL SYLLABLE MIEUM YI IEUNG + {0x92F4, 0xBBF2}, //3194 #HANGUL SYLLABLE MIEUM YI CIEUC + {0x92F5, 0xBBF3}, //3195 #HANGUL SYLLABLE MIEUM YI CHIEUCH + {0x92F6, 0xBBF4}, //3196 #HANGUL SYLLABLE MIEUM YI KHIEUKH + {0x92F7, 0xBBF5}, //3197 #HANGUL SYLLABLE MIEUM YI THIEUTH + {0x92F8, 0xBBF6}, //3198 #HANGUL SYLLABLE MIEUM YI PHIEUPH + {0x92F9, 0xBBF7}, //3199 #HANGUL SYLLABLE MIEUM YI HIEUH + {0x92FA, 0xBBFA}, //3200 #HANGUL SYLLABLE MIEUM I SSANGKIYEOK + {0x92FB, 0xBBFB}, //3201 #HANGUL SYLLABLE MIEUM I KIYEOKSIOS + {0x92FC, 0xBBFD}, //3202 #HANGUL SYLLABLE MIEUM I NIEUNCIEUC + {0x92FD, 0xBBFE}, //3203 #HANGUL SYLLABLE MIEUM I NIEUNHIEUH + {0x92FE, 0xBC01}, //3204 #HANGUL SYLLABLE MIEUM I RIEULKIYEOK + {0x9341, 0xBC03}, //3205 #HANGUL SYLLABLE MIEUM I RIEULPIEUP + {0x9342, 0xBC04}, //3206 #HANGUL SYLLABLE MIEUM I RIEULSIOS + {0x9343, 0xBC05}, //3207 #HANGUL SYLLABLE MIEUM I RIEULTHIEUTH + {0x9344, 0xBC06}, //3208 #HANGUL SYLLABLE MIEUM I RIEULPHIEUPH + {0x9345, 0xBC07}, //3209 #HANGUL SYLLABLE MIEUM I RIEULHIEUH + {0x9346, 0xBC0A}, //3210 #HANGUL SYLLABLE MIEUM I PIEUPSIOS + {0x9347, 0xBC0E}, //3211 #HANGUL SYLLABLE MIEUM I CIEUC + {0x9348, 0xBC10}, //3212 #HANGUL SYLLABLE MIEUM I KHIEUKH + {0x9349, 0xBC12}, //3213 #HANGUL SYLLABLE MIEUM I PHIEUPH + {0x934A, 0xBC13}, //3214 #HANGUL SYLLABLE MIEUM I HIEUH + {0x934B, 0xBC19}, //3215 #HANGUL SYLLABLE PIEUP A NIEUNCIEUC + {0x934C, 0xBC1A}, //3216 #HANGUL SYLLABLE PIEUP A NIEUNHIEUH + {0x934D, 0xBC20}, //3217 #HANGUL SYLLABLE PIEUP A RIEULSIOS + {0x934E, 0xBC21}, //3218 #HANGUL SYLLABLE PIEUP A RIEULTHIEUTH + {0x934F, 0xBC22}, //3219 #HANGUL SYLLABLE PIEUP A RIEULPHIEUPH + {0x9350, 0xBC23}, //3220 #HANGUL SYLLABLE PIEUP A RIEULHIEUH + {0x9351, 0xBC26}, //3221 #HANGUL SYLLABLE PIEUP A PIEUPSIOS + {0x9352, 0xBC28}, //3222 #HANGUL SYLLABLE PIEUP A SSANGSIOS + {0x9353, 0xBC2A}, //3223 #HANGUL SYLLABLE PIEUP A CIEUC + {0x9354, 0xBC2B}, //3224 #HANGUL SYLLABLE PIEUP A CHIEUCH + {0x9355, 0xBC2C}, //3225 #HANGUL SYLLABLE PIEUP A KHIEUKH + {0x9356, 0xBC2E}, //3226 #HANGUL SYLLABLE PIEUP A PHIEUPH + {0x9357, 0xBC2F}, //3227 #HANGUL SYLLABLE PIEUP A HIEUH + {0x9358, 0xBC32}, //3228 #HANGUL SYLLABLE PIEUP AE SSANGKIYEOK + {0x9359, 0xBC33}, //3229 #HANGUL SYLLABLE PIEUP AE KIYEOKSIOS + {0x935A, 0xBC35}, //3230 #HANGUL SYLLABLE PIEUP AE NIEUNCIEUC + {0x9361, 0xBC36}, //3231 #HANGUL SYLLABLE PIEUP AE NIEUNHIEUH + {0x9362, 0xBC37}, //3232 #HANGUL SYLLABLE PIEUP AE TIKEUT + {0x9363, 0xBC39}, //3233 #HANGUL SYLLABLE PIEUP AE RIEULKIYEOK + {0x9364, 0xBC3A}, //3234 #HANGUL SYLLABLE PIEUP AE RIEULMIEUM + {0x9365, 0xBC3B}, //3235 #HANGUL SYLLABLE PIEUP AE RIEULPIEUP + {0x9366, 0xBC3C}, //3236 #HANGUL SYLLABLE PIEUP AE RIEULSIOS + {0x9367, 0xBC3D}, //3237 #HANGUL SYLLABLE PIEUP AE RIEULTHIEUTH + {0x9368, 0xBC3E}, //3238 #HANGUL SYLLABLE PIEUP AE RIEULPHIEUPH + {0x9369, 0xBC3F}, //3239 #HANGUL SYLLABLE PIEUP AE RIEULHIEUH + {0x936A, 0xBC42}, //3240 #HANGUL SYLLABLE PIEUP AE PIEUPSIOS + {0x936B, 0xBC46}, //3241 #HANGUL SYLLABLE PIEUP AE CIEUC + {0x936C, 0xBC47}, //3242 #HANGUL SYLLABLE PIEUP AE CHIEUCH + {0x936D, 0xBC48}, //3243 #HANGUL SYLLABLE PIEUP AE KHIEUKH + {0x936E, 0xBC4A}, //3244 #HANGUL SYLLABLE PIEUP AE PHIEUPH + {0x936F, 0xBC4B}, //3245 #HANGUL SYLLABLE PIEUP AE HIEUH + {0x9370, 0xBC4E}, //3246 #HANGUL SYLLABLE PIEUP YA SSANGKIYEOK + {0x9371, 0xBC4F}, //3247 #HANGUL SYLLABLE PIEUP YA KIYEOKSIOS + {0x9372, 0xBC51}, //3248 #HANGUL SYLLABLE PIEUP YA NIEUNCIEUC + {0x9373, 0xBC52}, //3249 #HANGUL SYLLABLE PIEUP YA NIEUNHIEUH + {0x9374, 0xBC53}, //3250 #HANGUL SYLLABLE PIEUP YA TIKEUT + {0x9375, 0xBC54}, //3251 #HANGUL SYLLABLE PIEUP YA RIEUL + {0x9376, 0xBC55}, //3252 #HANGUL SYLLABLE PIEUP YA RIEULKIYEOK + {0x9377, 0xBC56}, //3253 #HANGUL SYLLABLE PIEUP YA RIEULMIEUM + {0x9378, 0xBC57}, //3254 #HANGUL SYLLABLE PIEUP YA RIEULPIEUP + {0x9379, 0xBC58}, //3255 #HANGUL SYLLABLE PIEUP YA RIEULSIOS + {0x937A, 0xBC59}, //3256 #HANGUL SYLLABLE PIEUP YA RIEULTHIEUTH + {0x9381, 0xBC5A}, //3257 #HANGUL SYLLABLE PIEUP YA RIEULPHIEUPH + {0x9382, 0xBC5B}, //3258 #HANGUL SYLLABLE PIEUP YA RIEULHIEUH + {0x9383, 0xBC5C}, //3259 #HANGUL SYLLABLE PIEUP YA MIEUM + {0x9384, 0xBC5E}, //3260 #HANGUL SYLLABLE PIEUP YA PIEUPSIOS + {0x9385, 0xBC5F}, //3261 #HANGUL SYLLABLE PIEUP YA SIOS + {0x9386, 0xBC60}, //3262 #HANGUL SYLLABLE PIEUP YA SSANGSIOS + {0x9387, 0xBC61}, //3263 #HANGUL SYLLABLE PIEUP YA IEUNG + {0x9388, 0xBC62}, //3264 #HANGUL SYLLABLE PIEUP YA CIEUC + {0x9389, 0xBC63}, //3265 #HANGUL SYLLABLE PIEUP YA CHIEUCH + {0x938A, 0xBC64}, //3266 #HANGUL SYLLABLE PIEUP YA KHIEUKH + {0x938B, 0xBC65}, //3267 #HANGUL SYLLABLE PIEUP YA THIEUTH + {0x938C, 0xBC66}, //3268 #HANGUL SYLLABLE PIEUP YA PHIEUPH + {0x938D, 0xBC67}, //3269 #HANGUL SYLLABLE PIEUP YA HIEUH + {0x938E, 0xBC68}, //3270 #HANGUL SYLLABLE PIEUP YAE + {0x938F, 0xBC69}, //3271 #HANGUL SYLLABLE PIEUP YAE KIYEOK + {0x9390, 0xBC6A}, //3272 #HANGUL SYLLABLE PIEUP YAE SSANGKIYEOK + {0x9391, 0xBC6B}, //3273 #HANGUL SYLLABLE PIEUP YAE KIYEOKSIOS + {0x9392, 0xBC6C}, //3274 #HANGUL SYLLABLE PIEUP YAE NIEUN + {0x9393, 0xBC6D}, //3275 #HANGUL SYLLABLE PIEUP YAE NIEUNCIEUC + {0x9394, 0xBC6E}, //3276 #HANGUL SYLLABLE PIEUP YAE NIEUNHIEUH + {0x9395, 0xBC6F}, //3277 #HANGUL SYLLABLE PIEUP YAE TIKEUT + {0x9396, 0xBC70}, //3278 #HANGUL SYLLABLE PIEUP YAE RIEUL + {0x9397, 0xBC71}, //3279 #HANGUL SYLLABLE PIEUP YAE RIEULKIYEOK + {0x9398, 0xBC72}, //3280 #HANGUL SYLLABLE PIEUP YAE RIEULMIEUM + {0x9399, 0xBC73}, //3281 #HANGUL SYLLABLE PIEUP YAE RIEULPIEUP + {0x939A, 0xBC74}, //3282 #HANGUL SYLLABLE PIEUP YAE RIEULSIOS + {0x939B, 0xBC75}, //3283 #HANGUL SYLLABLE PIEUP YAE RIEULTHIEUTH + {0x939C, 0xBC76}, //3284 #HANGUL SYLLABLE PIEUP YAE RIEULPHIEUPH + {0x939D, 0xBC77}, //3285 #HANGUL SYLLABLE PIEUP YAE RIEULHIEUH + {0x939E, 0xBC78}, //3286 #HANGUL SYLLABLE PIEUP YAE MIEUM + {0x939F, 0xBC79}, //3287 #HANGUL SYLLABLE PIEUP YAE PIEUP + {0x93A0, 0xBC7A}, //3288 #HANGUL SYLLABLE PIEUP YAE PIEUPSIOS + {0x93A1, 0xBC7B}, //3289 #HANGUL SYLLABLE PIEUP YAE SIOS + {0x93A2, 0xBC7C}, //3290 #HANGUL SYLLABLE PIEUP YAE SSANGSIOS + {0x93A3, 0xBC7D}, //3291 #HANGUL SYLLABLE PIEUP YAE IEUNG + {0x93A4, 0xBC7E}, //3292 #HANGUL SYLLABLE PIEUP YAE CIEUC + {0x93A5, 0xBC7F}, //3293 #HANGUL SYLLABLE PIEUP YAE CHIEUCH + {0x93A6, 0xBC80}, //3294 #HANGUL SYLLABLE PIEUP YAE KHIEUKH + {0x93A7, 0xBC81}, //3295 #HANGUL SYLLABLE PIEUP YAE THIEUTH + {0x93A8, 0xBC82}, //3296 #HANGUL SYLLABLE PIEUP YAE PHIEUPH + {0x93A9, 0xBC83}, //3297 #HANGUL SYLLABLE PIEUP YAE HIEUH + {0x93AA, 0xBC86}, //3298 #HANGUL SYLLABLE PIEUP EO SSANGKIYEOK + {0x93AB, 0xBC87}, //3299 #HANGUL SYLLABLE PIEUP EO KIYEOKSIOS + {0x93AC, 0xBC89}, //3300 #HANGUL SYLLABLE PIEUP EO NIEUNCIEUC + {0x93AD, 0xBC8A}, //3301 #HANGUL SYLLABLE PIEUP EO NIEUNHIEUH + {0x93AE, 0xBC8D}, //3302 #HANGUL SYLLABLE PIEUP EO RIEULKIYEOK + {0x93AF, 0xBC8F}, //3303 #HANGUL SYLLABLE PIEUP EO RIEULPIEUP + {0x93B0, 0xBC90}, //3304 #HANGUL SYLLABLE PIEUP EO RIEULSIOS + {0x93B1, 0xBC91}, //3305 #HANGUL SYLLABLE PIEUP EO RIEULTHIEUTH + {0x93B2, 0xBC92}, //3306 #HANGUL SYLLABLE PIEUP EO RIEULPHIEUPH + {0x93B3, 0xBC93}, //3307 #HANGUL SYLLABLE PIEUP EO RIEULHIEUH + {0x93B4, 0xBC96}, //3308 #HANGUL SYLLABLE PIEUP EO PIEUPSIOS + {0x93B5, 0xBC98}, //3309 #HANGUL SYLLABLE PIEUP EO SSANGSIOS + {0x93B6, 0xBC9B}, //3310 #HANGUL SYLLABLE PIEUP EO CHIEUCH + {0x93B7, 0xBC9C}, //3311 #HANGUL SYLLABLE PIEUP EO KHIEUKH + {0x93B8, 0xBC9D}, //3312 #HANGUL SYLLABLE PIEUP EO THIEUTH + {0x93B9, 0xBC9E}, //3313 #HANGUL SYLLABLE PIEUP EO PHIEUPH + {0x93BA, 0xBC9F}, //3314 #HANGUL SYLLABLE PIEUP EO HIEUH + {0x93BB, 0xBCA2}, //3315 #HANGUL SYLLABLE PIEUP E SSANGKIYEOK + {0x93BC, 0xBCA3}, //3316 #HANGUL SYLLABLE PIEUP E KIYEOKSIOS + {0x93BD, 0xBCA5}, //3317 #HANGUL SYLLABLE PIEUP E NIEUNCIEUC + {0x93BE, 0xBCA6}, //3318 #HANGUL SYLLABLE PIEUP E NIEUNHIEUH + {0x93BF, 0xBCA9}, //3319 #HANGUL SYLLABLE PIEUP E RIEULKIYEOK + {0x93C0, 0xBCAA}, //3320 #HANGUL SYLLABLE PIEUP E RIEULMIEUM + {0x93C1, 0xBCAB}, //3321 #HANGUL SYLLABLE PIEUP E RIEULPIEUP + {0x93C2, 0xBCAC}, //3322 #HANGUL SYLLABLE PIEUP E RIEULSIOS + {0x93C3, 0xBCAD}, //3323 #HANGUL SYLLABLE PIEUP E RIEULTHIEUTH + {0x93C4, 0xBCAE}, //3324 #HANGUL SYLLABLE PIEUP E RIEULPHIEUPH + {0x93C5, 0xBCAF}, //3325 #HANGUL SYLLABLE PIEUP E RIEULHIEUH + {0x93C6, 0xBCB2}, //3326 #HANGUL SYLLABLE PIEUP E PIEUPSIOS + {0x93C7, 0xBCB6}, //3327 #HANGUL SYLLABLE PIEUP E CIEUC + {0x93C8, 0xBCB7}, //3328 #HANGUL SYLLABLE PIEUP E CHIEUCH + {0x93C9, 0xBCB8}, //3329 #HANGUL SYLLABLE PIEUP E KHIEUKH + {0x93CA, 0xBCB9}, //3330 #HANGUL SYLLABLE PIEUP E THIEUTH + {0x93CB, 0xBCBA}, //3331 #HANGUL SYLLABLE PIEUP E PHIEUPH + {0x93CC, 0xBCBB}, //3332 #HANGUL SYLLABLE PIEUP E HIEUH + {0x93CD, 0xBCBE}, //3333 #HANGUL SYLLABLE PIEUP YEO SSANGKIYEOK + {0x93CE, 0xBCBF}, //3334 #HANGUL SYLLABLE PIEUP YEO KIYEOKSIOS + {0x93CF, 0xBCC1}, //3335 #HANGUL SYLLABLE PIEUP YEO NIEUNCIEUC + {0x93D0, 0xBCC2}, //3336 #HANGUL SYLLABLE PIEUP YEO NIEUNHIEUH + {0x93D1, 0xBCC3}, //3337 #HANGUL SYLLABLE PIEUP YEO TIKEUT + {0x93D2, 0xBCC5}, //3338 #HANGUL SYLLABLE PIEUP YEO RIEULKIYEOK + {0x93D3, 0xBCC6}, //3339 #HANGUL SYLLABLE PIEUP YEO RIEULMIEUM + {0x93D4, 0xBCC7}, //3340 #HANGUL SYLLABLE PIEUP YEO RIEULPIEUP + {0x93D5, 0xBCC8}, //3341 #HANGUL SYLLABLE PIEUP YEO RIEULSIOS + {0x93D6, 0xBCC9}, //3342 #HANGUL SYLLABLE PIEUP YEO RIEULTHIEUTH + {0x93D7, 0xBCCA}, //3343 #HANGUL SYLLABLE PIEUP YEO RIEULPHIEUPH + {0x93D8, 0xBCCB}, //3344 #HANGUL SYLLABLE PIEUP YEO RIEULHIEUH + {0x93D9, 0xBCCC}, //3345 #HANGUL SYLLABLE PIEUP YEO MIEUM + {0x93DA, 0xBCCE}, //3346 #HANGUL SYLLABLE PIEUP YEO PIEUPSIOS + {0x93DB, 0xBCD2}, //3347 #HANGUL SYLLABLE PIEUP YEO CIEUC + {0x93DC, 0xBCD3}, //3348 #HANGUL SYLLABLE PIEUP YEO CHIEUCH + {0x93DD, 0xBCD4}, //3349 #HANGUL SYLLABLE PIEUP YEO KHIEUKH + {0x93DE, 0xBCD6}, //3350 #HANGUL SYLLABLE PIEUP YEO PHIEUPH + {0x93DF, 0xBCD7}, //3351 #HANGUL SYLLABLE PIEUP YEO HIEUH + {0x93E0, 0xBCD9}, //3352 #HANGUL SYLLABLE PIEUP YE KIYEOK + {0x93E1, 0xBCDA}, //3353 #HANGUL SYLLABLE PIEUP YE SSANGKIYEOK + {0x93E2, 0xBCDB}, //3354 #HANGUL SYLLABLE PIEUP YE KIYEOKSIOS + {0x93E3, 0xBCDD}, //3355 #HANGUL SYLLABLE PIEUP YE NIEUNCIEUC + {0x93E4, 0xBCDE}, //3356 #HANGUL SYLLABLE PIEUP YE NIEUNHIEUH + {0x93E5, 0xBCDF}, //3357 #HANGUL SYLLABLE PIEUP YE TIKEUT + {0x93E6, 0xBCE0}, //3358 #HANGUL SYLLABLE PIEUP YE RIEUL + {0x93E7, 0xBCE1}, //3359 #HANGUL SYLLABLE PIEUP YE RIEULKIYEOK + {0x93E8, 0xBCE2}, //3360 #HANGUL SYLLABLE PIEUP YE RIEULMIEUM + {0x93E9, 0xBCE3}, //3361 #HANGUL SYLLABLE PIEUP YE RIEULPIEUP + {0x93EA, 0xBCE4}, //3362 #HANGUL SYLLABLE PIEUP YE RIEULSIOS + {0x93EB, 0xBCE5}, //3363 #HANGUL SYLLABLE PIEUP YE RIEULTHIEUTH + {0x93EC, 0xBCE6}, //3364 #HANGUL SYLLABLE PIEUP YE RIEULPHIEUPH + {0x93ED, 0xBCE7}, //3365 #HANGUL SYLLABLE PIEUP YE RIEULHIEUH + {0x93EE, 0xBCE8}, //3366 #HANGUL SYLLABLE PIEUP YE MIEUM + {0x93EF, 0xBCE9}, //3367 #HANGUL SYLLABLE PIEUP YE PIEUP + {0x93F0, 0xBCEA}, //3368 #HANGUL SYLLABLE PIEUP YE PIEUPSIOS + {0x93F1, 0xBCEB}, //3369 #HANGUL SYLLABLE PIEUP YE SIOS + {0x93F2, 0xBCEC}, //3370 #HANGUL SYLLABLE PIEUP YE SSANGSIOS + {0x93F3, 0xBCED}, //3371 #HANGUL SYLLABLE PIEUP YE IEUNG + {0x93F4, 0xBCEE}, //3372 #HANGUL SYLLABLE PIEUP YE CIEUC + {0x93F5, 0xBCEF}, //3373 #HANGUL SYLLABLE PIEUP YE CHIEUCH + {0x93F6, 0xBCF0}, //3374 #HANGUL SYLLABLE PIEUP YE KHIEUKH + {0x93F7, 0xBCF1}, //3375 #HANGUL SYLLABLE PIEUP YE THIEUTH + {0x93F8, 0xBCF2}, //3376 #HANGUL SYLLABLE PIEUP YE PHIEUPH + {0x93F9, 0xBCF3}, //3377 #HANGUL SYLLABLE PIEUP YE HIEUH + {0x93FA, 0xBCF7}, //3378 #HANGUL SYLLABLE PIEUP O KIYEOKSIOS + {0x93FB, 0xBCF9}, //3379 #HANGUL SYLLABLE PIEUP O NIEUNCIEUC + {0x93FC, 0xBCFA}, //3380 #HANGUL SYLLABLE PIEUP O NIEUNHIEUH + {0x93FD, 0xBCFB}, //3381 #HANGUL SYLLABLE PIEUP O TIKEUT + {0x93FE, 0xBCFD}, //3382 #HANGUL SYLLABLE PIEUP O RIEULKIYEOK + {0x9441, 0xBCFE}, //3383 #HANGUL SYLLABLE PIEUP O RIEULMIEUM + {0x9442, 0xBCFF}, //3384 #HANGUL SYLLABLE PIEUP O RIEULPIEUP + {0x9443, 0xBD00}, //3385 #HANGUL SYLLABLE PIEUP O RIEULSIOS + {0x9444, 0xBD01}, //3386 #HANGUL SYLLABLE PIEUP O RIEULTHIEUTH + {0x9445, 0xBD02}, //3387 #HANGUL SYLLABLE PIEUP O RIEULPHIEUPH + {0x9446, 0xBD03}, //3388 #HANGUL SYLLABLE PIEUP O RIEULHIEUH + {0x9447, 0xBD06}, //3389 #HANGUL SYLLABLE PIEUP O PIEUPSIOS + {0x9448, 0xBD08}, //3390 #HANGUL SYLLABLE PIEUP O SSANGSIOS + {0x9449, 0xBD0A}, //3391 #HANGUL SYLLABLE PIEUP O CIEUC + {0x944A, 0xBD0B}, //3392 #HANGUL SYLLABLE PIEUP O CHIEUCH + {0x944B, 0xBD0C}, //3393 #HANGUL SYLLABLE PIEUP O KHIEUKH + {0x944C, 0xBD0D}, //3394 #HANGUL SYLLABLE PIEUP O THIEUTH + {0x944D, 0xBD0E}, //3395 #HANGUL SYLLABLE PIEUP O PHIEUPH + {0x944E, 0xBD0F}, //3396 #HANGUL SYLLABLE PIEUP O HIEUH + {0x944F, 0xBD11}, //3397 #HANGUL SYLLABLE PIEUP WA KIYEOK + {0x9450, 0xBD12}, //3398 #HANGUL SYLLABLE PIEUP WA SSANGKIYEOK + {0x9451, 0xBD13}, //3399 #HANGUL SYLLABLE PIEUP WA KIYEOKSIOS + {0x9452, 0xBD15}, //3400 #HANGUL SYLLABLE PIEUP WA NIEUNCIEUC + {0x9453, 0xBD16}, //3401 #HANGUL SYLLABLE PIEUP WA NIEUNHIEUH + {0x9454, 0xBD17}, //3402 #HANGUL SYLLABLE PIEUP WA TIKEUT + {0x9455, 0xBD18}, //3403 #HANGUL SYLLABLE PIEUP WA RIEUL + {0x9456, 0xBD19}, //3404 #HANGUL SYLLABLE PIEUP WA RIEULKIYEOK + {0x9457, 0xBD1A}, //3405 #HANGUL SYLLABLE PIEUP WA RIEULMIEUM + {0x9458, 0xBD1B}, //3406 #HANGUL SYLLABLE PIEUP WA RIEULPIEUP + {0x9459, 0xBD1C}, //3407 #HANGUL SYLLABLE PIEUP WA RIEULSIOS + {0x945A, 0xBD1D}, //3408 #HANGUL SYLLABLE PIEUP WA RIEULTHIEUTH + {0x9461, 0xBD1E}, //3409 #HANGUL SYLLABLE PIEUP WA RIEULPHIEUPH + {0x9462, 0xBD1F}, //3410 #HANGUL SYLLABLE PIEUP WA RIEULHIEUH + {0x9463, 0xBD20}, //3411 #HANGUL SYLLABLE PIEUP WA MIEUM + {0x9464, 0xBD21}, //3412 #HANGUL SYLLABLE PIEUP WA PIEUP + {0x9465, 0xBD22}, //3413 #HANGUL SYLLABLE PIEUP WA PIEUPSIOS + {0x9466, 0xBD23}, //3414 #HANGUL SYLLABLE PIEUP WA SIOS + {0x9467, 0xBD25}, //3415 #HANGUL SYLLABLE PIEUP WA IEUNG + {0x9468, 0xBD26}, //3416 #HANGUL SYLLABLE PIEUP WA CIEUC + {0x9469, 0xBD27}, //3417 #HANGUL SYLLABLE PIEUP WA CHIEUCH + {0x946A, 0xBD28}, //3418 #HANGUL SYLLABLE PIEUP WA KHIEUKH + {0x946B, 0xBD29}, //3419 #HANGUL SYLLABLE PIEUP WA THIEUTH + {0x946C, 0xBD2A}, //3420 #HANGUL SYLLABLE PIEUP WA PHIEUPH + {0x946D, 0xBD2B}, //3421 #HANGUL SYLLABLE PIEUP WA HIEUH + {0x946E, 0xBD2D}, //3422 #HANGUL SYLLABLE PIEUP WAE KIYEOK + {0x946F, 0xBD2E}, //3423 #HANGUL SYLLABLE PIEUP WAE SSANGKIYEOK + {0x9470, 0xBD2F}, //3424 #HANGUL SYLLABLE PIEUP WAE KIYEOKSIOS + {0x9471, 0xBD30}, //3425 #HANGUL SYLLABLE PIEUP WAE NIEUN + {0x9472, 0xBD31}, //3426 #HANGUL SYLLABLE PIEUP WAE NIEUNCIEUC + {0x9473, 0xBD32}, //3427 #HANGUL SYLLABLE PIEUP WAE NIEUNHIEUH + {0x9474, 0xBD33}, //3428 #HANGUL SYLLABLE PIEUP WAE TIKEUT + {0x9475, 0xBD34}, //3429 #HANGUL SYLLABLE PIEUP WAE RIEUL + {0x9476, 0xBD35}, //3430 #HANGUL SYLLABLE PIEUP WAE RIEULKIYEOK + {0x9477, 0xBD36}, //3431 #HANGUL SYLLABLE PIEUP WAE RIEULMIEUM + {0x9478, 0xBD37}, //3432 #HANGUL SYLLABLE PIEUP WAE RIEULPIEUP + {0x9479, 0xBD38}, //3433 #HANGUL SYLLABLE PIEUP WAE RIEULSIOS + {0x947A, 0xBD39}, //3434 #HANGUL SYLLABLE PIEUP WAE RIEULTHIEUTH + {0x9481, 0xBD3A}, //3435 #HANGUL SYLLABLE PIEUP WAE RIEULPHIEUPH + {0x9482, 0xBD3B}, //3436 #HANGUL SYLLABLE PIEUP WAE RIEULHIEUH + {0x9483, 0xBD3C}, //3437 #HANGUL SYLLABLE PIEUP WAE MIEUM + {0x9484, 0xBD3D}, //3438 #HANGUL SYLLABLE PIEUP WAE PIEUP + {0x9485, 0xBD3E}, //3439 #HANGUL SYLLABLE PIEUP WAE PIEUPSIOS + {0x9486, 0xBD3F}, //3440 #HANGUL SYLLABLE PIEUP WAE SIOS + {0x9487, 0xBD41}, //3441 #HANGUL SYLLABLE PIEUP WAE IEUNG + {0x9488, 0xBD42}, //3442 #HANGUL SYLLABLE PIEUP WAE CIEUC + {0x9489, 0xBD43}, //3443 #HANGUL SYLLABLE PIEUP WAE CHIEUCH + {0x948A, 0xBD44}, //3444 #HANGUL SYLLABLE PIEUP WAE KHIEUKH + {0x948B, 0xBD45}, //3445 #HANGUL SYLLABLE PIEUP WAE THIEUTH + {0x948C, 0xBD46}, //3446 #HANGUL SYLLABLE PIEUP WAE PHIEUPH + {0x948D, 0xBD47}, //3447 #HANGUL SYLLABLE PIEUP WAE HIEUH + {0x948E, 0xBD4A}, //3448 #HANGUL SYLLABLE PIEUP OE SSANGKIYEOK + {0x948F, 0xBD4B}, //3449 #HANGUL SYLLABLE PIEUP OE KIYEOKSIOS + {0x9490, 0xBD4D}, //3450 #HANGUL SYLLABLE PIEUP OE NIEUNCIEUC + {0x9491, 0xBD4E}, //3451 #HANGUL SYLLABLE PIEUP OE NIEUNHIEUH + {0x9492, 0xBD4F}, //3452 #HANGUL SYLLABLE PIEUP OE TIKEUT + {0x9493, 0xBD51}, //3453 #HANGUL SYLLABLE PIEUP OE RIEULKIYEOK + {0x9494, 0xBD52}, //3454 #HANGUL SYLLABLE PIEUP OE RIEULMIEUM + {0x9495, 0xBD53}, //3455 #HANGUL SYLLABLE PIEUP OE RIEULPIEUP + {0x9496, 0xBD54}, //3456 #HANGUL SYLLABLE PIEUP OE RIEULSIOS + {0x9497, 0xBD55}, //3457 #HANGUL SYLLABLE PIEUP OE RIEULTHIEUTH + {0x9498, 0xBD56}, //3458 #HANGUL SYLLABLE PIEUP OE RIEULPHIEUPH + {0x9499, 0xBD57}, //3459 #HANGUL SYLLABLE PIEUP OE RIEULHIEUH + {0x949A, 0xBD5A}, //3460 #HANGUL SYLLABLE PIEUP OE PIEUPSIOS + {0x949B, 0xBD5B}, //3461 #HANGUL SYLLABLE PIEUP OE SIOS + {0x949C, 0xBD5C}, //3462 #HANGUL SYLLABLE PIEUP OE SSANGSIOS + {0x949D, 0xBD5D}, //3463 #HANGUL SYLLABLE PIEUP OE IEUNG + {0x949E, 0xBD5E}, //3464 #HANGUL SYLLABLE PIEUP OE CIEUC + {0x949F, 0xBD5F}, //3465 #HANGUL SYLLABLE PIEUP OE CHIEUCH + {0x94A0, 0xBD60}, //3466 #HANGUL SYLLABLE PIEUP OE KHIEUKH + {0x94A1, 0xBD61}, //3467 #HANGUL SYLLABLE PIEUP OE THIEUTH + {0x94A2, 0xBD62}, //3468 #HANGUL SYLLABLE PIEUP OE PHIEUPH + {0x94A3, 0xBD63}, //3469 #HANGUL SYLLABLE PIEUP OE HIEUH + {0x94A4, 0xBD65}, //3470 #HANGUL SYLLABLE PIEUP YO KIYEOK + {0x94A5, 0xBD66}, //3471 #HANGUL SYLLABLE PIEUP YO SSANGKIYEOK + {0x94A6, 0xBD67}, //3472 #HANGUL SYLLABLE PIEUP YO KIYEOKSIOS + {0x94A7, 0xBD69}, //3473 #HANGUL SYLLABLE PIEUP YO NIEUNCIEUC + {0x94A8, 0xBD6A}, //3474 #HANGUL SYLLABLE PIEUP YO NIEUNHIEUH + {0x94A9, 0xBD6B}, //3475 #HANGUL SYLLABLE PIEUP YO TIKEUT + {0x94AA, 0xBD6C}, //3476 #HANGUL SYLLABLE PIEUP YO RIEUL + {0x94AB, 0xBD6D}, //3477 #HANGUL SYLLABLE PIEUP YO RIEULKIYEOK + {0x94AC, 0xBD6E}, //3478 #HANGUL SYLLABLE PIEUP YO RIEULMIEUM + {0x94AD, 0xBD6F}, //3479 #HANGUL SYLLABLE PIEUP YO RIEULPIEUP + {0x94AE, 0xBD70}, //3480 #HANGUL SYLLABLE PIEUP YO RIEULSIOS + {0x94AF, 0xBD71}, //3481 #HANGUL SYLLABLE PIEUP YO RIEULTHIEUTH + {0x94B0, 0xBD72}, //3482 #HANGUL SYLLABLE PIEUP YO RIEULPHIEUPH + {0x94B1, 0xBD73}, //3483 #HANGUL SYLLABLE PIEUP YO RIEULHIEUH + {0x94B2, 0xBD74}, //3484 #HANGUL SYLLABLE PIEUP YO MIEUM + {0x94B3, 0xBD75}, //3485 #HANGUL SYLLABLE PIEUP YO PIEUP + {0x94B4, 0xBD76}, //3486 #HANGUL SYLLABLE PIEUP YO PIEUPSIOS + {0x94B5, 0xBD77}, //3487 #HANGUL SYLLABLE PIEUP YO SIOS + {0x94B6, 0xBD78}, //3488 #HANGUL SYLLABLE PIEUP YO SSANGSIOS + {0x94B7, 0xBD79}, //3489 #HANGUL SYLLABLE PIEUP YO IEUNG + {0x94B8, 0xBD7A}, //3490 #HANGUL SYLLABLE PIEUP YO CIEUC + {0x94B9, 0xBD7B}, //3491 #HANGUL SYLLABLE PIEUP YO CHIEUCH + {0x94BA, 0xBD7C}, //3492 #HANGUL SYLLABLE PIEUP YO KHIEUKH + {0x94BB, 0xBD7D}, //3493 #HANGUL SYLLABLE PIEUP YO THIEUTH + {0x94BC, 0xBD7E}, //3494 #HANGUL SYLLABLE PIEUP YO PHIEUPH + {0x94BD, 0xBD7F}, //3495 #HANGUL SYLLABLE PIEUP YO HIEUH + {0x94BE, 0xBD82}, //3496 #HANGUL SYLLABLE PIEUP U SSANGKIYEOK + {0x94BF, 0xBD83}, //3497 #HANGUL SYLLABLE PIEUP U KIYEOKSIOS + {0x94C0, 0xBD85}, //3498 #HANGUL SYLLABLE PIEUP U NIEUNCIEUC + {0x94C1, 0xBD86}, //3499 #HANGUL SYLLABLE PIEUP U NIEUNHIEUH + {0x94C2, 0xBD8B}, //3500 #HANGUL SYLLABLE PIEUP U RIEULPIEUP + {0x94C3, 0xBD8C}, //3501 #HANGUL SYLLABLE PIEUP U RIEULSIOS + {0x94C4, 0xBD8D}, //3502 #HANGUL SYLLABLE PIEUP U RIEULTHIEUTH + {0x94C5, 0xBD8E}, //3503 #HANGUL SYLLABLE PIEUP U RIEULPHIEUPH + {0x94C6, 0xBD8F}, //3504 #HANGUL SYLLABLE PIEUP U RIEULHIEUH + {0x94C7, 0xBD92}, //3505 #HANGUL SYLLABLE PIEUP U PIEUPSIOS + {0x94C8, 0xBD94}, //3506 #HANGUL SYLLABLE PIEUP U SSANGSIOS + {0x94C9, 0xBD96}, //3507 #HANGUL SYLLABLE PIEUP U CIEUC + {0x94CA, 0xBD97}, //3508 #HANGUL SYLLABLE PIEUP U CHIEUCH + {0x94CB, 0xBD98}, //3509 #HANGUL SYLLABLE PIEUP U KHIEUKH + {0x94CC, 0xBD9B}, //3510 #HANGUL SYLLABLE PIEUP U HIEUH + {0x94CD, 0xBD9D}, //3511 #HANGUL SYLLABLE PIEUP WEO KIYEOK + {0x94CE, 0xBD9E}, //3512 #HANGUL SYLLABLE PIEUP WEO SSANGKIYEOK + {0x94CF, 0xBD9F}, //3513 #HANGUL SYLLABLE PIEUP WEO KIYEOKSIOS + {0x94D0, 0xBDA0}, //3514 #HANGUL SYLLABLE PIEUP WEO NIEUN + {0x94D1, 0xBDA1}, //3515 #HANGUL SYLLABLE PIEUP WEO NIEUNCIEUC + {0x94D2, 0xBDA2}, //3516 #HANGUL SYLLABLE PIEUP WEO NIEUNHIEUH + {0x94D3, 0xBDA3}, //3517 #HANGUL SYLLABLE PIEUP WEO TIKEUT + {0x94D4, 0xBDA5}, //3518 #HANGUL SYLLABLE PIEUP WEO RIEULKIYEOK + {0x94D5, 0xBDA6}, //3519 #HANGUL SYLLABLE PIEUP WEO RIEULMIEUM + {0x94D6, 0xBDA7}, //3520 #HANGUL SYLLABLE PIEUP WEO RIEULPIEUP + {0x94D7, 0xBDA8}, //3521 #HANGUL SYLLABLE PIEUP WEO RIEULSIOS + {0x94D8, 0xBDA9}, //3522 #HANGUL SYLLABLE PIEUP WEO RIEULTHIEUTH + {0x94D9, 0xBDAA}, //3523 #HANGUL SYLLABLE PIEUP WEO RIEULPHIEUPH + {0x94DA, 0xBDAB}, //3524 #HANGUL SYLLABLE PIEUP WEO RIEULHIEUH + {0x94DB, 0xBDAC}, //3525 #HANGUL SYLLABLE PIEUP WEO MIEUM + {0x94DC, 0xBDAD}, //3526 #HANGUL SYLLABLE PIEUP WEO PIEUP + {0x94DD, 0xBDAE}, //3527 #HANGUL SYLLABLE PIEUP WEO PIEUPSIOS + {0x94DE, 0xBDAF}, //3528 #HANGUL SYLLABLE PIEUP WEO SIOS + {0x94DF, 0xBDB1}, //3529 #HANGUL SYLLABLE PIEUP WEO IEUNG + {0x94E0, 0xBDB2}, //3530 #HANGUL SYLLABLE PIEUP WEO CIEUC + {0x94E1, 0xBDB3}, //3531 #HANGUL SYLLABLE PIEUP WEO CHIEUCH + {0x94E2, 0xBDB4}, //3532 #HANGUL SYLLABLE PIEUP WEO KHIEUKH + {0x94E3, 0xBDB5}, //3533 #HANGUL SYLLABLE PIEUP WEO THIEUTH + {0x94E4, 0xBDB6}, //3534 #HANGUL SYLLABLE PIEUP WEO PHIEUPH + {0x94E5, 0xBDB7}, //3535 #HANGUL SYLLABLE PIEUP WEO HIEUH + {0x94E6, 0xBDB9}, //3536 #HANGUL SYLLABLE PIEUP WE KIYEOK + {0x94E7, 0xBDBA}, //3537 #HANGUL SYLLABLE PIEUP WE SSANGKIYEOK + {0x94E8, 0xBDBB}, //3538 #HANGUL SYLLABLE PIEUP WE KIYEOKSIOS + {0x94E9, 0xBDBC}, //3539 #HANGUL SYLLABLE PIEUP WE NIEUN + {0x94EA, 0xBDBD}, //3540 #HANGUL SYLLABLE PIEUP WE NIEUNCIEUC + {0x94EB, 0xBDBE}, //3541 #HANGUL SYLLABLE PIEUP WE NIEUNHIEUH + {0x94EC, 0xBDBF}, //3542 #HANGUL SYLLABLE PIEUP WE TIKEUT + {0x94ED, 0xBDC0}, //3543 #HANGUL SYLLABLE PIEUP WE RIEUL + {0x94EE, 0xBDC1}, //3544 #HANGUL SYLLABLE PIEUP WE RIEULKIYEOK + {0x94EF, 0xBDC2}, //3545 #HANGUL SYLLABLE PIEUP WE RIEULMIEUM + {0x94F0, 0xBDC3}, //3546 #HANGUL SYLLABLE PIEUP WE RIEULPIEUP + {0x94F1, 0xBDC4}, //3547 #HANGUL SYLLABLE PIEUP WE RIEULSIOS + {0x94F2, 0xBDC5}, //3548 #HANGUL SYLLABLE PIEUP WE RIEULTHIEUTH + {0x94F3, 0xBDC6}, //3549 #HANGUL SYLLABLE PIEUP WE RIEULPHIEUPH + {0x94F4, 0xBDC7}, //3550 #HANGUL SYLLABLE PIEUP WE RIEULHIEUH + {0x94F5, 0xBDC8}, //3551 #HANGUL SYLLABLE PIEUP WE MIEUM + {0x94F6, 0xBDC9}, //3552 #HANGUL SYLLABLE PIEUP WE PIEUP + {0x94F7, 0xBDCA}, //3553 #HANGUL SYLLABLE PIEUP WE PIEUPSIOS + {0x94F8, 0xBDCB}, //3554 #HANGUL SYLLABLE PIEUP WE SIOS + {0x94F9, 0xBDCC}, //3555 #HANGUL SYLLABLE PIEUP WE SSANGSIOS + {0x94FA, 0xBDCD}, //3556 #HANGUL SYLLABLE PIEUP WE IEUNG + {0x94FB, 0xBDCE}, //3557 #HANGUL SYLLABLE PIEUP WE CIEUC + {0x94FC, 0xBDCF}, //3558 #HANGUL SYLLABLE PIEUP WE CHIEUCH + {0x94FD, 0xBDD0}, //3559 #HANGUL SYLLABLE PIEUP WE KHIEUKH + {0x94FE, 0xBDD1}, //3560 #HANGUL SYLLABLE PIEUP WE THIEUTH + {0x9541, 0xBDD2}, //3561 #HANGUL SYLLABLE PIEUP WE PHIEUPH + {0x9542, 0xBDD3}, //3562 #HANGUL SYLLABLE PIEUP WE HIEUH + {0x9543, 0xBDD6}, //3563 #HANGUL SYLLABLE PIEUP WI SSANGKIYEOK + {0x9544, 0xBDD7}, //3564 #HANGUL SYLLABLE PIEUP WI KIYEOKSIOS + {0x9545, 0xBDD9}, //3565 #HANGUL SYLLABLE PIEUP WI NIEUNCIEUC + {0x9546, 0xBDDA}, //3566 #HANGUL SYLLABLE PIEUP WI NIEUNHIEUH + {0x9547, 0xBDDB}, //3567 #HANGUL SYLLABLE PIEUP WI TIKEUT + {0x9548, 0xBDDD}, //3568 #HANGUL SYLLABLE PIEUP WI RIEULKIYEOK + {0x9549, 0xBDDE}, //3569 #HANGUL SYLLABLE PIEUP WI RIEULMIEUM + {0x954A, 0xBDDF}, //3570 #HANGUL SYLLABLE PIEUP WI RIEULPIEUP + {0x954B, 0xBDE0}, //3571 #HANGUL SYLLABLE PIEUP WI RIEULSIOS + {0x954C, 0xBDE1}, //3572 #HANGUL SYLLABLE PIEUP WI RIEULTHIEUTH + {0x954D, 0xBDE2}, //3573 #HANGUL SYLLABLE PIEUP WI RIEULPHIEUPH + {0x954E, 0xBDE3}, //3574 #HANGUL SYLLABLE PIEUP WI RIEULHIEUH + {0x954F, 0xBDE4}, //3575 #HANGUL SYLLABLE PIEUP WI MIEUM + {0x9550, 0xBDE5}, //3576 #HANGUL SYLLABLE PIEUP WI PIEUP + {0x9551, 0xBDE6}, //3577 #HANGUL SYLLABLE PIEUP WI PIEUPSIOS + {0x9552, 0xBDE7}, //3578 #HANGUL SYLLABLE PIEUP WI SIOS + {0x9553, 0xBDE8}, //3579 #HANGUL SYLLABLE PIEUP WI SSANGSIOS + {0x9554, 0xBDEA}, //3580 #HANGUL SYLLABLE PIEUP WI CIEUC + {0x9555, 0xBDEB}, //3581 #HANGUL SYLLABLE PIEUP WI CHIEUCH + {0x9556, 0xBDEC}, //3582 #HANGUL SYLLABLE PIEUP WI KHIEUKH + {0x9557, 0xBDED}, //3583 #HANGUL SYLLABLE PIEUP WI THIEUTH + {0x9558, 0xBDEE}, //3584 #HANGUL SYLLABLE PIEUP WI PHIEUPH + {0x9559, 0xBDEF}, //3585 #HANGUL SYLLABLE PIEUP WI HIEUH + {0x955A, 0xBDF1}, //3586 #HANGUL SYLLABLE PIEUP YU KIYEOK + {0x9561, 0xBDF2}, //3587 #HANGUL SYLLABLE PIEUP YU SSANGKIYEOK + {0x9562, 0xBDF3}, //3588 #HANGUL SYLLABLE PIEUP YU KIYEOKSIOS + {0x9563, 0xBDF5}, //3589 #HANGUL SYLLABLE PIEUP YU NIEUNCIEUC + {0x9564, 0xBDF6}, //3590 #HANGUL SYLLABLE PIEUP YU NIEUNHIEUH + {0x9565, 0xBDF7}, //3591 #HANGUL SYLLABLE PIEUP YU TIKEUT + {0x9566, 0xBDF9}, //3592 #HANGUL SYLLABLE PIEUP YU RIEULKIYEOK + {0x9567, 0xBDFA}, //3593 #HANGUL SYLLABLE PIEUP YU RIEULMIEUM + {0x9568, 0xBDFB}, //3594 #HANGUL SYLLABLE PIEUP YU RIEULPIEUP + {0x9569, 0xBDFC}, //3595 #HANGUL SYLLABLE PIEUP YU RIEULSIOS + {0x956A, 0xBDFD}, //3596 #HANGUL SYLLABLE PIEUP YU RIEULTHIEUTH + {0x956B, 0xBDFE}, //3597 #HANGUL SYLLABLE PIEUP YU RIEULPHIEUPH + {0x956C, 0xBDFF}, //3598 #HANGUL SYLLABLE PIEUP YU RIEULHIEUH + {0x956D, 0xBE01}, //3599 #HANGUL SYLLABLE PIEUP YU PIEUP + {0x956E, 0xBE02}, //3600 #HANGUL SYLLABLE PIEUP YU PIEUPSIOS + {0x956F, 0xBE04}, //3601 #HANGUL SYLLABLE PIEUP YU SSANGSIOS + {0x9570, 0xBE06}, //3602 #HANGUL SYLLABLE PIEUP YU CIEUC + {0x9571, 0xBE07}, //3603 #HANGUL SYLLABLE PIEUP YU CHIEUCH + {0x9572, 0xBE08}, //3604 #HANGUL SYLLABLE PIEUP YU KHIEUKH + {0x9573, 0xBE09}, //3605 #HANGUL SYLLABLE PIEUP YU THIEUTH + {0x9574, 0xBE0A}, //3606 #HANGUL SYLLABLE PIEUP YU PHIEUPH + {0x9575, 0xBE0B}, //3607 #HANGUL SYLLABLE PIEUP YU HIEUH + {0x9576, 0xBE0E}, //3608 #HANGUL SYLLABLE PIEUP EU SSANGKIYEOK + {0x9577, 0xBE0F}, //3609 #HANGUL SYLLABLE PIEUP EU KIYEOKSIOS + {0x9578, 0xBE11}, //3610 #HANGUL SYLLABLE PIEUP EU NIEUNCIEUC + {0x9579, 0xBE12}, //3611 #HANGUL SYLLABLE PIEUP EU NIEUNHIEUH + {0x957A, 0xBE13}, //3612 #HANGUL SYLLABLE PIEUP EU TIKEUT + {0x9581, 0xBE15}, //3613 #HANGUL SYLLABLE PIEUP EU RIEULKIYEOK + {0x9582, 0xBE16}, //3614 #HANGUL SYLLABLE PIEUP EU RIEULMIEUM + {0x9583, 0xBE17}, //3615 #HANGUL SYLLABLE PIEUP EU RIEULPIEUP + {0x9584, 0xBE18}, //3616 #HANGUL SYLLABLE PIEUP EU RIEULSIOS + {0x9585, 0xBE19}, //3617 #HANGUL SYLLABLE PIEUP EU RIEULTHIEUTH + {0x9586, 0xBE1A}, //3618 #HANGUL SYLLABLE PIEUP EU RIEULPHIEUPH + {0x9587, 0xBE1B}, //3619 #HANGUL SYLLABLE PIEUP EU RIEULHIEUH + {0x9588, 0xBE1E}, //3620 #HANGUL SYLLABLE PIEUP EU PIEUPSIOS + {0x9589, 0xBE20}, //3621 #HANGUL SYLLABLE PIEUP EU SSANGSIOS + {0x958A, 0xBE21}, //3622 #HANGUL SYLLABLE PIEUP EU IEUNG + {0x958B, 0xBE22}, //3623 #HANGUL SYLLABLE PIEUP EU CIEUC + {0x958C, 0xBE23}, //3624 #HANGUL SYLLABLE PIEUP EU CHIEUCH + {0x958D, 0xBE24}, //3625 #HANGUL SYLLABLE PIEUP EU KHIEUKH + {0x958E, 0xBE25}, //3626 #HANGUL SYLLABLE PIEUP EU THIEUTH + {0x958F, 0xBE26}, //3627 #HANGUL SYLLABLE PIEUP EU PHIEUPH + {0x9590, 0xBE27}, //3628 #HANGUL SYLLABLE PIEUP EU HIEUH + {0x9591, 0xBE28}, //3629 #HANGUL SYLLABLE PIEUP YI + {0x9592, 0xBE29}, //3630 #HANGUL SYLLABLE PIEUP YI KIYEOK + {0x9593, 0xBE2A}, //3631 #HANGUL SYLLABLE PIEUP YI SSANGKIYEOK + {0x9594, 0xBE2B}, //3632 #HANGUL SYLLABLE PIEUP YI KIYEOKSIOS + {0x9595, 0xBE2C}, //3633 #HANGUL SYLLABLE PIEUP YI NIEUN + {0x9596, 0xBE2D}, //3634 #HANGUL SYLLABLE PIEUP YI NIEUNCIEUC + {0x9597, 0xBE2E}, //3635 #HANGUL SYLLABLE PIEUP YI NIEUNHIEUH + {0x9598, 0xBE2F}, //3636 #HANGUL SYLLABLE PIEUP YI TIKEUT + {0x9599, 0xBE30}, //3637 #HANGUL SYLLABLE PIEUP YI RIEUL + {0x959A, 0xBE31}, //3638 #HANGUL SYLLABLE PIEUP YI RIEULKIYEOK + {0x959B, 0xBE32}, //3639 #HANGUL SYLLABLE PIEUP YI RIEULMIEUM + {0x959C, 0xBE33}, //3640 #HANGUL SYLLABLE PIEUP YI RIEULPIEUP + {0x959D, 0xBE34}, //3641 #HANGUL SYLLABLE PIEUP YI RIEULSIOS + {0x959E, 0xBE35}, //3642 #HANGUL SYLLABLE PIEUP YI RIEULTHIEUTH + {0x959F, 0xBE36}, //3643 #HANGUL SYLLABLE PIEUP YI RIEULPHIEUPH + {0x95A0, 0xBE37}, //3644 #HANGUL SYLLABLE PIEUP YI RIEULHIEUH + {0x95A1, 0xBE38}, //3645 #HANGUL SYLLABLE PIEUP YI MIEUM + {0x95A2, 0xBE39}, //3646 #HANGUL SYLLABLE PIEUP YI PIEUP + {0x95A3, 0xBE3A}, //3647 #HANGUL SYLLABLE PIEUP YI PIEUPSIOS + {0x95A4, 0xBE3B}, //3648 #HANGUL SYLLABLE PIEUP YI SIOS + {0x95A5, 0xBE3C}, //3649 #HANGUL SYLLABLE PIEUP YI SSANGSIOS + {0x95A6, 0xBE3D}, //3650 #HANGUL SYLLABLE PIEUP YI IEUNG + {0x95A7, 0xBE3E}, //3651 #HANGUL SYLLABLE PIEUP YI CIEUC + {0x95A8, 0xBE3F}, //3652 #HANGUL SYLLABLE PIEUP YI CHIEUCH + {0x95A9, 0xBE40}, //3653 #HANGUL SYLLABLE PIEUP YI KHIEUKH + {0x95AA, 0xBE41}, //3654 #HANGUL SYLLABLE PIEUP YI THIEUTH + {0x95AB, 0xBE42}, //3655 #HANGUL SYLLABLE PIEUP YI PHIEUPH + {0x95AC, 0xBE43}, //3656 #HANGUL SYLLABLE PIEUP YI HIEUH + {0x95AD, 0xBE46}, //3657 #HANGUL SYLLABLE PIEUP I SSANGKIYEOK + {0x95AE, 0xBE47}, //3658 #HANGUL SYLLABLE PIEUP I KIYEOKSIOS + {0x95AF, 0xBE49}, //3659 #HANGUL SYLLABLE PIEUP I NIEUNCIEUC + {0x95B0, 0xBE4A}, //3660 #HANGUL SYLLABLE PIEUP I NIEUNHIEUH + {0x95B1, 0xBE4B}, //3661 #HANGUL SYLLABLE PIEUP I TIKEUT + {0x95B2, 0xBE4D}, //3662 #HANGUL SYLLABLE PIEUP I RIEULKIYEOK + {0x95B3, 0xBE4F}, //3663 #HANGUL SYLLABLE PIEUP I RIEULPIEUP + {0x95B4, 0xBE50}, //3664 #HANGUL SYLLABLE PIEUP I RIEULSIOS + {0x95B5, 0xBE51}, //3665 #HANGUL SYLLABLE PIEUP I RIEULTHIEUTH + {0x95B6, 0xBE52}, //3666 #HANGUL SYLLABLE PIEUP I RIEULPHIEUPH + {0x95B7, 0xBE53}, //3667 #HANGUL SYLLABLE PIEUP I RIEULHIEUH + {0x95B8, 0xBE56}, //3668 #HANGUL SYLLABLE PIEUP I PIEUPSIOS + {0x95B9, 0xBE58}, //3669 #HANGUL SYLLABLE PIEUP I SSANGSIOS + {0x95BA, 0xBE5C}, //3670 #HANGUL SYLLABLE PIEUP I KHIEUKH + {0x95BB, 0xBE5D}, //3671 #HANGUL SYLLABLE PIEUP I THIEUTH + {0x95BC, 0xBE5E}, //3672 #HANGUL SYLLABLE PIEUP I PHIEUPH + {0x95BD, 0xBE5F}, //3673 #HANGUL SYLLABLE PIEUP I HIEUH + {0x95BE, 0xBE62}, //3674 #HANGUL SYLLABLE SSANGPIEUP A SSANGKIYEOK + {0x95BF, 0xBE63}, //3675 #HANGUL SYLLABLE SSANGPIEUP A KIYEOKSIOS + {0x95C0, 0xBE65}, //3676 #HANGUL SYLLABLE SSANGPIEUP A NIEUNCIEUC + {0x95C1, 0xBE66}, //3677 #HANGUL SYLLABLE SSANGPIEUP A NIEUNHIEUH + {0x95C2, 0xBE67}, //3678 #HANGUL SYLLABLE SSANGPIEUP A TIKEUT + {0x95C3, 0xBE69}, //3679 #HANGUL SYLLABLE SSANGPIEUP A RIEULKIYEOK + {0x95C4, 0xBE6B}, //3680 #HANGUL SYLLABLE SSANGPIEUP A RIEULPIEUP + {0x95C5, 0xBE6C}, //3681 #HANGUL SYLLABLE SSANGPIEUP A RIEULSIOS + {0x95C6, 0xBE6D}, //3682 #HANGUL SYLLABLE SSANGPIEUP A RIEULTHIEUTH + {0x95C7, 0xBE6E}, //3683 #HANGUL SYLLABLE SSANGPIEUP A RIEULPHIEUPH + {0x95C8, 0xBE6F}, //3684 #HANGUL SYLLABLE SSANGPIEUP A RIEULHIEUH + {0x95C9, 0xBE72}, //3685 #HANGUL SYLLABLE SSANGPIEUP A PIEUPSIOS + {0x95CA, 0xBE76}, //3686 #HANGUL SYLLABLE SSANGPIEUP A CIEUC + {0x95CB, 0xBE77}, //3687 #HANGUL SYLLABLE SSANGPIEUP A CHIEUCH + {0x95CC, 0xBE78}, //3688 #HANGUL SYLLABLE SSANGPIEUP A KHIEUKH + {0x95CD, 0xBE79}, //3689 #HANGUL SYLLABLE SSANGPIEUP A THIEUTH + {0x95CE, 0xBE7A}, //3690 #HANGUL SYLLABLE SSANGPIEUP A PHIEUPH + {0x95CF, 0xBE7E}, //3691 #HANGUL SYLLABLE SSANGPIEUP AE SSANGKIYEOK + {0x95D0, 0xBE7F}, //3692 #HANGUL SYLLABLE SSANGPIEUP AE KIYEOKSIOS + {0x95D1, 0xBE81}, //3693 #HANGUL SYLLABLE SSANGPIEUP AE NIEUNCIEUC + {0x95D2, 0xBE82}, //3694 #HANGUL SYLLABLE SSANGPIEUP AE NIEUNHIEUH + {0x95D3, 0xBE83}, //3695 #HANGUL SYLLABLE SSANGPIEUP AE TIKEUT + {0x95D4, 0xBE85}, //3696 #HANGUL SYLLABLE SSANGPIEUP AE RIEULKIYEOK + {0x95D5, 0xBE86}, //3697 #HANGUL SYLLABLE SSANGPIEUP AE RIEULMIEUM + {0x95D6, 0xBE87}, //3698 #HANGUL SYLLABLE SSANGPIEUP AE RIEULPIEUP + {0x95D7, 0xBE88}, //3699 #HANGUL SYLLABLE SSANGPIEUP AE RIEULSIOS + {0x95D8, 0xBE89}, //3700 #HANGUL SYLLABLE SSANGPIEUP AE RIEULTHIEUTH + {0x95D9, 0xBE8A}, //3701 #HANGUL SYLLABLE SSANGPIEUP AE RIEULPHIEUPH + {0x95DA, 0xBE8B}, //3702 #HANGUL SYLLABLE SSANGPIEUP AE RIEULHIEUH + {0x95DB, 0xBE8E}, //3703 #HANGUL SYLLABLE SSANGPIEUP AE PIEUPSIOS + {0x95DC, 0xBE92}, //3704 #HANGUL SYLLABLE SSANGPIEUP AE CIEUC + {0x95DD, 0xBE93}, //3705 #HANGUL SYLLABLE SSANGPIEUP AE CHIEUCH + {0x95DE, 0xBE94}, //3706 #HANGUL SYLLABLE SSANGPIEUP AE KHIEUKH + {0x95DF, 0xBE95}, //3707 #HANGUL SYLLABLE SSANGPIEUP AE THIEUTH + {0x95E0, 0xBE96}, //3708 #HANGUL SYLLABLE SSANGPIEUP AE PHIEUPH + {0x95E1, 0xBE97}, //3709 #HANGUL SYLLABLE SSANGPIEUP AE HIEUH + {0x95E2, 0xBE9A}, //3710 #HANGUL SYLLABLE SSANGPIEUP YA SSANGKIYEOK + {0x95E3, 0xBE9B}, //3711 #HANGUL SYLLABLE SSANGPIEUP YA KIYEOKSIOS + {0x95E4, 0xBE9C}, //3712 #HANGUL SYLLABLE SSANGPIEUP YA NIEUN + {0x95E5, 0xBE9D}, //3713 #HANGUL SYLLABLE SSANGPIEUP YA NIEUNCIEUC + {0x95E6, 0xBE9E}, //3714 #HANGUL SYLLABLE SSANGPIEUP YA NIEUNHIEUH + {0x95E7, 0xBE9F}, //3715 #HANGUL SYLLABLE SSANGPIEUP YA TIKEUT + {0x95E8, 0xBEA0}, //3716 #HANGUL SYLLABLE SSANGPIEUP YA RIEUL + {0x95E9, 0xBEA1}, //3717 #HANGUL SYLLABLE SSANGPIEUP YA RIEULKIYEOK + {0x95EA, 0xBEA2}, //3718 #HANGUL SYLLABLE SSANGPIEUP YA RIEULMIEUM + {0x95EB, 0xBEA3}, //3719 #HANGUL SYLLABLE SSANGPIEUP YA RIEULPIEUP + {0x95EC, 0xBEA4}, //3720 #HANGUL SYLLABLE SSANGPIEUP YA RIEULSIOS + {0x95ED, 0xBEA5}, //3721 #HANGUL SYLLABLE SSANGPIEUP YA RIEULTHIEUTH + {0x95EE, 0xBEA6}, //3722 #HANGUL SYLLABLE SSANGPIEUP YA RIEULPHIEUPH + {0x95EF, 0xBEA7}, //3723 #HANGUL SYLLABLE SSANGPIEUP YA RIEULHIEUH + {0x95F0, 0xBEA9}, //3724 #HANGUL SYLLABLE SSANGPIEUP YA PIEUP + {0x95F1, 0xBEAA}, //3725 #HANGUL SYLLABLE SSANGPIEUP YA PIEUPSIOS + {0x95F2, 0xBEAB}, //3726 #HANGUL SYLLABLE SSANGPIEUP YA SIOS + {0x95F3, 0xBEAC}, //3727 #HANGUL SYLLABLE SSANGPIEUP YA SSANGSIOS + {0x95F4, 0xBEAD}, //3728 #HANGUL SYLLABLE SSANGPIEUP YA IEUNG + {0x95F5, 0xBEAE}, //3729 #HANGUL SYLLABLE SSANGPIEUP YA CIEUC + {0x95F6, 0xBEAF}, //3730 #HANGUL SYLLABLE SSANGPIEUP YA CHIEUCH + {0x95F7, 0xBEB0}, //3731 #HANGUL SYLLABLE SSANGPIEUP YA KHIEUKH + {0x95F8, 0xBEB1}, //3732 #HANGUL SYLLABLE SSANGPIEUP YA THIEUTH + {0x95F9, 0xBEB2}, //3733 #HANGUL SYLLABLE SSANGPIEUP YA PHIEUPH + {0x95FA, 0xBEB3}, //3734 #HANGUL SYLLABLE SSANGPIEUP YA HIEUH + {0x95FB, 0xBEB4}, //3735 #HANGUL SYLLABLE SSANGPIEUP YAE + {0x95FC, 0xBEB5}, //3736 #HANGUL SYLLABLE SSANGPIEUP YAE KIYEOK + {0x95FD, 0xBEB6}, //3737 #HANGUL SYLLABLE SSANGPIEUP YAE SSANGKIYEOK + {0x95FE, 0xBEB7}, //3738 #HANGUL SYLLABLE SSANGPIEUP YAE KIYEOKSIOS + {0x9641, 0xBEB8}, //3739 #HANGUL SYLLABLE SSANGPIEUP YAE NIEUN + {0x9642, 0xBEB9}, //3740 #HANGUL SYLLABLE SSANGPIEUP YAE NIEUNCIEUC + {0x9643, 0xBEBA}, //3741 #HANGUL SYLLABLE SSANGPIEUP YAE NIEUNHIEUH + {0x9644, 0xBEBB}, //3742 #HANGUL SYLLABLE SSANGPIEUP YAE TIKEUT + {0x9645, 0xBEBC}, //3743 #HANGUL SYLLABLE SSANGPIEUP YAE RIEUL + {0x9646, 0xBEBD}, //3744 #HANGUL SYLLABLE SSANGPIEUP YAE RIEULKIYEOK + {0x9647, 0xBEBE}, //3745 #HANGUL SYLLABLE SSANGPIEUP YAE RIEULMIEUM + {0x9648, 0xBEBF}, //3746 #HANGUL SYLLABLE SSANGPIEUP YAE RIEULPIEUP + {0x9649, 0xBEC0}, //3747 #HANGUL SYLLABLE SSANGPIEUP YAE RIEULSIOS + {0x964A, 0xBEC1}, //3748 #HANGUL SYLLABLE SSANGPIEUP YAE RIEULTHIEUTH + {0x964B, 0xBEC2}, //3749 #HANGUL SYLLABLE SSANGPIEUP YAE RIEULPHIEUPH + {0x964C, 0xBEC3}, //3750 #HANGUL SYLLABLE SSANGPIEUP YAE RIEULHIEUH + {0x964D, 0xBEC4}, //3751 #HANGUL SYLLABLE SSANGPIEUP YAE MIEUM + {0x964E, 0xBEC5}, //3752 #HANGUL SYLLABLE SSANGPIEUP YAE PIEUP + {0x964F, 0xBEC6}, //3753 #HANGUL SYLLABLE SSANGPIEUP YAE PIEUPSIOS + {0x9650, 0xBEC7}, //3754 #HANGUL SYLLABLE SSANGPIEUP YAE SIOS + {0x9651, 0xBEC8}, //3755 #HANGUL SYLLABLE SSANGPIEUP YAE SSANGSIOS + {0x9652, 0xBEC9}, //3756 #HANGUL SYLLABLE SSANGPIEUP YAE IEUNG + {0x9653, 0xBECA}, //3757 #HANGUL SYLLABLE SSANGPIEUP YAE CIEUC + {0x9654, 0xBECB}, //3758 #HANGUL SYLLABLE SSANGPIEUP YAE CHIEUCH + {0x9655, 0xBECC}, //3759 #HANGUL SYLLABLE SSANGPIEUP YAE KHIEUKH + {0x9656, 0xBECD}, //3760 #HANGUL SYLLABLE SSANGPIEUP YAE THIEUTH + {0x9657, 0xBECE}, //3761 #HANGUL SYLLABLE SSANGPIEUP YAE PHIEUPH + {0x9658, 0xBECF}, //3762 #HANGUL SYLLABLE SSANGPIEUP YAE HIEUH + {0x9659, 0xBED2}, //3763 #HANGUL SYLLABLE SSANGPIEUP EO SSANGKIYEOK + {0x965A, 0xBED3}, //3764 #HANGUL SYLLABLE SSANGPIEUP EO KIYEOKSIOS + {0x9661, 0xBED5}, //3765 #HANGUL SYLLABLE SSANGPIEUP EO NIEUNCIEUC + {0x9662, 0xBED6}, //3766 #HANGUL SYLLABLE SSANGPIEUP EO NIEUNHIEUH + {0x9663, 0xBED9}, //3767 #HANGUL SYLLABLE SSANGPIEUP EO RIEULKIYEOK + {0x9664, 0xBEDA}, //3768 #HANGUL SYLLABLE SSANGPIEUP EO RIEULMIEUM + {0x9665, 0xBEDB}, //3769 #HANGUL SYLLABLE SSANGPIEUP EO RIEULPIEUP + {0x9666, 0xBEDC}, //3770 #HANGUL SYLLABLE SSANGPIEUP EO RIEULSIOS + {0x9667, 0xBEDD}, //3771 #HANGUL SYLLABLE SSANGPIEUP EO RIEULTHIEUTH + {0x9668, 0xBEDE}, //3772 #HANGUL SYLLABLE SSANGPIEUP EO RIEULPHIEUPH + {0x9669, 0xBEDF}, //3773 #HANGUL SYLLABLE SSANGPIEUP EO RIEULHIEUH + {0x966A, 0xBEE1}, //3774 #HANGUL SYLLABLE SSANGPIEUP EO PIEUP + {0x966B, 0xBEE2}, //3775 #HANGUL SYLLABLE SSANGPIEUP EO PIEUPSIOS + {0x966C, 0xBEE6}, //3776 #HANGUL SYLLABLE SSANGPIEUP EO CIEUC + {0x966D, 0xBEE7}, //3777 #HANGUL SYLLABLE SSANGPIEUP EO CHIEUCH + {0x966E, 0xBEE8}, //3778 #HANGUL SYLLABLE SSANGPIEUP EO KHIEUKH + {0x966F, 0xBEE9}, //3779 #HANGUL SYLLABLE SSANGPIEUP EO THIEUTH + {0x9670, 0xBEEA}, //3780 #HANGUL SYLLABLE SSANGPIEUP EO PHIEUPH + {0x9671, 0xBEEB}, //3781 #HANGUL SYLLABLE SSANGPIEUP EO HIEUH + {0x9672, 0xBEED}, //3782 #HANGUL SYLLABLE SSANGPIEUP E KIYEOK + {0x9673, 0xBEEE}, //3783 #HANGUL SYLLABLE SSANGPIEUP E SSANGKIYEOK + {0x9674, 0xBEEF}, //3784 #HANGUL SYLLABLE SSANGPIEUP E KIYEOKSIOS + {0x9675, 0xBEF0}, //3785 #HANGUL SYLLABLE SSANGPIEUP E NIEUN + {0x9676, 0xBEF1}, //3786 #HANGUL SYLLABLE SSANGPIEUP E NIEUNCIEUC + {0x9677, 0xBEF2}, //3787 #HANGUL SYLLABLE SSANGPIEUP E NIEUNHIEUH + {0x9678, 0xBEF3}, //3788 #HANGUL SYLLABLE SSANGPIEUP E TIKEUT + {0x9679, 0xBEF4}, //3789 #HANGUL SYLLABLE SSANGPIEUP E RIEUL + {0x967A, 0xBEF5}, //3790 #HANGUL SYLLABLE SSANGPIEUP E RIEULKIYEOK + {0x9681, 0xBEF6}, //3791 #HANGUL SYLLABLE SSANGPIEUP E RIEULMIEUM + {0x9682, 0xBEF7}, //3792 #HANGUL SYLLABLE SSANGPIEUP E RIEULPIEUP + {0x9683, 0xBEF8}, //3793 #HANGUL SYLLABLE SSANGPIEUP E RIEULSIOS + {0x9684, 0xBEF9}, //3794 #HANGUL SYLLABLE SSANGPIEUP E RIEULTHIEUTH + {0x9685, 0xBEFA}, //3795 #HANGUL SYLLABLE SSANGPIEUP E RIEULPHIEUPH + {0x9686, 0xBEFB}, //3796 #HANGUL SYLLABLE SSANGPIEUP E RIEULHIEUH + {0x9687, 0xBEFC}, //3797 #HANGUL SYLLABLE SSANGPIEUP E MIEUM + {0x9688, 0xBEFD}, //3798 #HANGUL SYLLABLE SSANGPIEUP E PIEUP + {0x9689, 0xBEFE}, //3799 #HANGUL SYLLABLE SSANGPIEUP E PIEUPSIOS + {0x968A, 0xBEFF}, //3800 #HANGUL SYLLABLE SSANGPIEUP E SIOS + {0x968B, 0xBF00}, //3801 #HANGUL SYLLABLE SSANGPIEUP E SSANGSIOS + {0x968C, 0xBF02}, //3802 #HANGUL SYLLABLE SSANGPIEUP E CIEUC + {0x968D, 0xBF03}, //3803 #HANGUL SYLLABLE SSANGPIEUP E CHIEUCH + {0x968E, 0xBF04}, //3804 #HANGUL SYLLABLE SSANGPIEUP E KHIEUKH + {0x968F, 0xBF05}, //3805 #HANGUL SYLLABLE SSANGPIEUP E THIEUTH + {0x9690, 0xBF06}, //3806 #HANGUL SYLLABLE SSANGPIEUP E PHIEUPH + {0x9691, 0xBF07}, //3807 #HANGUL SYLLABLE SSANGPIEUP E HIEUH + {0x9692, 0xBF0A}, //3808 #HANGUL SYLLABLE SSANGPIEUP YEO SSANGKIYEOK + {0x9693, 0xBF0B}, //3809 #HANGUL SYLLABLE SSANGPIEUP YEO KIYEOKSIOS + {0x9694, 0xBF0C}, //3810 #HANGUL SYLLABLE SSANGPIEUP YEO NIEUN + {0x9695, 0xBF0D}, //3811 #HANGUL SYLLABLE SSANGPIEUP YEO NIEUNCIEUC + {0x9696, 0xBF0E}, //3812 #HANGUL SYLLABLE SSANGPIEUP YEO NIEUNHIEUH + {0x9697, 0xBF0F}, //3813 #HANGUL SYLLABLE SSANGPIEUP YEO TIKEUT + {0x9698, 0xBF10}, //3814 #HANGUL SYLLABLE SSANGPIEUP YEO RIEUL + {0x9699, 0xBF11}, //3815 #HANGUL SYLLABLE SSANGPIEUP YEO RIEULKIYEOK + {0x969A, 0xBF12}, //3816 #HANGUL SYLLABLE SSANGPIEUP YEO RIEULMIEUM + {0x969B, 0xBF13}, //3817 #HANGUL SYLLABLE SSANGPIEUP YEO RIEULPIEUP + {0x969C, 0xBF14}, //3818 #HANGUL SYLLABLE SSANGPIEUP YEO RIEULSIOS + {0x969D, 0xBF15}, //3819 #HANGUL SYLLABLE SSANGPIEUP YEO RIEULTHIEUTH + {0x969E, 0xBF16}, //3820 #HANGUL SYLLABLE SSANGPIEUP YEO RIEULPHIEUPH + {0x969F, 0xBF17}, //3821 #HANGUL SYLLABLE SSANGPIEUP YEO RIEULHIEUH + {0x96A0, 0xBF1A}, //3822 #HANGUL SYLLABLE SSANGPIEUP YEO PIEUPSIOS + {0x96A1, 0xBF1E}, //3823 #HANGUL SYLLABLE SSANGPIEUP YEO CIEUC + {0x96A2, 0xBF1F}, //3824 #HANGUL SYLLABLE SSANGPIEUP YEO CHIEUCH + {0x96A3, 0xBF20}, //3825 #HANGUL SYLLABLE SSANGPIEUP YEO KHIEUKH + {0x96A4, 0xBF21}, //3826 #HANGUL SYLLABLE SSANGPIEUP YEO THIEUTH + {0x96A5, 0xBF22}, //3827 #HANGUL SYLLABLE SSANGPIEUP YEO PHIEUPH + {0x96A6, 0xBF23}, //3828 #HANGUL SYLLABLE SSANGPIEUP YEO HIEUH + {0x96A7, 0xBF24}, //3829 #HANGUL SYLLABLE SSANGPIEUP YE + {0x96A8, 0xBF25}, //3830 #HANGUL SYLLABLE SSANGPIEUP YE KIYEOK + {0x96A9, 0xBF26}, //3831 #HANGUL SYLLABLE SSANGPIEUP YE SSANGKIYEOK + {0x96AA, 0xBF27}, //3832 #HANGUL SYLLABLE SSANGPIEUP YE KIYEOKSIOS + {0x96AB, 0xBF28}, //3833 #HANGUL SYLLABLE SSANGPIEUP YE NIEUN + {0x96AC, 0xBF29}, //3834 #HANGUL SYLLABLE SSANGPIEUP YE NIEUNCIEUC + {0x96AD, 0xBF2A}, //3835 #HANGUL SYLLABLE SSANGPIEUP YE NIEUNHIEUH + {0x96AE, 0xBF2B}, //3836 #HANGUL SYLLABLE SSANGPIEUP YE TIKEUT + {0x96AF, 0xBF2C}, //3837 #HANGUL SYLLABLE SSANGPIEUP YE RIEUL + {0x96B0, 0xBF2D}, //3838 #HANGUL SYLLABLE SSANGPIEUP YE RIEULKIYEOK + {0x96B1, 0xBF2E}, //3839 #HANGUL SYLLABLE SSANGPIEUP YE RIEULMIEUM + {0x96B2, 0xBF2F}, //3840 #HANGUL SYLLABLE SSANGPIEUP YE RIEULPIEUP + {0x96B3, 0xBF30}, //3841 #HANGUL SYLLABLE SSANGPIEUP YE RIEULSIOS + {0x96B4, 0xBF31}, //3842 #HANGUL SYLLABLE SSANGPIEUP YE RIEULTHIEUTH + {0x96B5, 0xBF32}, //3843 #HANGUL SYLLABLE SSANGPIEUP YE RIEULPHIEUPH + {0x96B6, 0xBF33}, //3844 #HANGUL SYLLABLE SSANGPIEUP YE RIEULHIEUH + {0x96B7, 0xBF34}, //3845 #HANGUL SYLLABLE SSANGPIEUP YE MIEUM + {0x96B8, 0xBF35}, //3846 #HANGUL SYLLABLE SSANGPIEUP YE PIEUP + {0x96B9, 0xBF36}, //3847 #HANGUL SYLLABLE SSANGPIEUP YE PIEUPSIOS + {0x96BA, 0xBF37}, //3848 #HANGUL SYLLABLE SSANGPIEUP YE SIOS + {0x96BB, 0xBF38}, //3849 #HANGUL SYLLABLE SSANGPIEUP YE SSANGSIOS + {0x96BC, 0xBF39}, //3850 #HANGUL SYLLABLE SSANGPIEUP YE IEUNG + {0x96BD, 0xBF3A}, //3851 #HANGUL SYLLABLE SSANGPIEUP YE CIEUC + {0x96BE, 0xBF3B}, //3852 #HANGUL SYLLABLE SSANGPIEUP YE CHIEUCH + {0x96BF, 0xBF3C}, //3853 #HANGUL SYLLABLE SSANGPIEUP YE KHIEUKH + {0x96C0, 0xBF3D}, //3854 #HANGUL SYLLABLE SSANGPIEUP YE THIEUTH + {0x96C1, 0xBF3E}, //3855 #HANGUL SYLLABLE SSANGPIEUP YE PHIEUPH + {0x96C2, 0xBF3F}, //3856 #HANGUL SYLLABLE SSANGPIEUP YE HIEUH + {0x96C3, 0xBF42}, //3857 #HANGUL SYLLABLE SSANGPIEUP O SSANGKIYEOK + {0x96C4, 0xBF43}, //3858 #HANGUL SYLLABLE SSANGPIEUP O KIYEOKSIOS + {0x96C5, 0xBF45}, //3859 #HANGUL SYLLABLE SSANGPIEUP O NIEUNCIEUC + {0x96C6, 0xBF46}, //3860 #HANGUL SYLLABLE SSANGPIEUP O NIEUNHIEUH + {0x96C7, 0xBF47}, //3861 #HANGUL SYLLABLE SSANGPIEUP O TIKEUT + {0x96C8, 0xBF49}, //3862 #HANGUL SYLLABLE SSANGPIEUP O RIEULKIYEOK + {0x96C9, 0xBF4A}, //3863 #HANGUL SYLLABLE SSANGPIEUP O RIEULMIEUM + {0x96CA, 0xBF4B}, //3864 #HANGUL SYLLABLE SSANGPIEUP O RIEULPIEUP + {0x96CB, 0xBF4C}, //3865 #HANGUL SYLLABLE SSANGPIEUP O RIEULSIOS + {0x96CC, 0xBF4D}, //3866 #HANGUL SYLLABLE SSANGPIEUP O RIEULTHIEUTH + {0x96CD, 0xBF4E}, //3867 #HANGUL SYLLABLE SSANGPIEUP O RIEULPHIEUPH + {0x96CE, 0xBF4F}, //3868 #HANGUL SYLLABLE SSANGPIEUP O RIEULHIEUH + {0x96CF, 0xBF52}, //3869 #HANGUL SYLLABLE SSANGPIEUP O PIEUPSIOS + {0x96D0, 0xBF53}, //3870 #HANGUL SYLLABLE SSANGPIEUP O SIOS + {0x96D1, 0xBF54}, //3871 #HANGUL SYLLABLE SSANGPIEUP O SSANGSIOS + {0x96D2, 0xBF56}, //3872 #HANGUL SYLLABLE SSANGPIEUP O CIEUC + {0x96D3, 0xBF57}, //3873 #HANGUL SYLLABLE SSANGPIEUP O CHIEUCH + {0x96D4, 0xBF58}, //3874 #HANGUL SYLLABLE SSANGPIEUP O KHIEUKH + {0x96D5, 0xBF59}, //3875 #HANGUL SYLLABLE SSANGPIEUP O THIEUTH + {0x96D6, 0xBF5A}, //3876 #HANGUL SYLLABLE SSANGPIEUP O PHIEUPH + {0x96D7, 0xBF5B}, //3877 #HANGUL SYLLABLE SSANGPIEUP O HIEUH + {0x96D8, 0xBF5C}, //3878 #HANGUL SYLLABLE SSANGPIEUP WA + {0x96D9, 0xBF5D}, //3879 #HANGUL SYLLABLE SSANGPIEUP WA KIYEOK + {0x96DA, 0xBF5E}, //3880 #HANGUL SYLLABLE SSANGPIEUP WA SSANGKIYEOK + {0x96DB, 0xBF5F}, //3881 #HANGUL SYLLABLE SSANGPIEUP WA KIYEOKSIOS + {0x96DC, 0xBF60}, //3882 #HANGUL SYLLABLE SSANGPIEUP WA NIEUN + {0x96DD, 0xBF61}, //3883 #HANGUL SYLLABLE SSANGPIEUP WA NIEUNCIEUC + {0x96DE, 0xBF62}, //3884 #HANGUL SYLLABLE SSANGPIEUP WA NIEUNHIEUH + {0x96DF, 0xBF63}, //3885 #HANGUL SYLLABLE SSANGPIEUP WA TIKEUT + {0x96E0, 0xBF64}, //3886 #HANGUL SYLLABLE SSANGPIEUP WA RIEUL + {0x96E1, 0xBF65}, //3887 #HANGUL SYLLABLE SSANGPIEUP WA RIEULKIYEOK + {0x96E2, 0xBF66}, //3888 #HANGUL SYLLABLE SSANGPIEUP WA RIEULMIEUM + {0x96E3, 0xBF67}, //3889 #HANGUL SYLLABLE SSANGPIEUP WA RIEULPIEUP + {0x96E4, 0xBF68}, //3890 #HANGUL SYLLABLE SSANGPIEUP WA RIEULSIOS + {0x96E5, 0xBF69}, //3891 #HANGUL SYLLABLE SSANGPIEUP WA RIEULTHIEUTH + {0x96E6, 0xBF6A}, //3892 #HANGUL SYLLABLE SSANGPIEUP WA RIEULPHIEUPH + {0x96E7, 0xBF6B}, //3893 #HANGUL SYLLABLE SSANGPIEUP WA RIEULHIEUH + {0x96E8, 0xBF6C}, //3894 #HANGUL SYLLABLE SSANGPIEUP WA MIEUM + {0x96E9, 0xBF6D}, //3895 #HANGUL SYLLABLE SSANGPIEUP WA PIEUP + {0x96EA, 0xBF6E}, //3896 #HANGUL SYLLABLE SSANGPIEUP WA PIEUPSIOS + {0x96EB, 0xBF6F}, //3897 #HANGUL SYLLABLE SSANGPIEUP WA SIOS + {0x96EC, 0xBF70}, //3898 #HANGUL SYLLABLE SSANGPIEUP WA SSANGSIOS + {0x96ED, 0xBF71}, //3899 #HANGUL SYLLABLE SSANGPIEUP WA IEUNG + {0x96EE, 0xBF72}, //3900 #HANGUL SYLLABLE SSANGPIEUP WA CIEUC + {0x96EF, 0xBF73}, //3901 #HANGUL SYLLABLE SSANGPIEUP WA CHIEUCH + {0x96F0, 0xBF74}, //3902 #HANGUL SYLLABLE SSANGPIEUP WA KHIEUKH + {0x96F1, 0xBF75}, //3903 #HANGUL SYLLABLE SSANGPIEUP WA THIEUTH + {0x96F2, 0xBF76}, //3904 #HANGUL SYLLABLE SSANGPIEUP WA PHIEUPH + {0x96F3, 0xBF77}, //3905 #HANGUL SYLLABLE SSANGPIEUP WA HIEUH + {0x96F4, 0xBF78}, //3906 #HANGUL SYLLABLE SSANGPIEUP WAE + {0x96F5, 0xBF79}, //3907 #HANGUL SYLLABLE SSANGPIEUP WAE KIYEOK + {0x96F6, 0xBF7A}, //3908 #HANGUL SYLLABLE SSANGPIEUP WAE SSANGKIYEOK + {0x96F7, 0xBF7B}, //3909 #HANGUL SYLLABLE SSANGPIEUP WAE KIYEOKSIOS + {0x96F8, 0xBF7C}, //3910 #HANGUL SYLLABLE SSANGPIEUP WAE NIEUN + {0x96F9, 0xBF7D}, //3911 #HANGUL SYLLABLE SSANGPIEUP WAE NIEUNCIEUC + {0x96FA, 0xBF7E}, //3912 #HANGUL SYLLABLE SSANGPIEUP WAE NIEUNHIEUH + {0x96FB, 0xBF7F}, //3913 #HANGUL SYLLABLE SSANGPIEUP WAE TIKEUT + {0x96FC, 0xBF80}, //3914 #HANGUL SYLLABLE SSANGPIEUP WAE RIEUL + {0x96FD, 0xBF81}, //3915 #HANGUL SYLLABLE SSANGPIEUP WAE RIEULKIYEOK + {0x96FE, 0xBF82}, //3916 #HANGUL SYLLABLE SSANGPIEUP WAE RIEULMIEUM + {0x9741, 0xBF83}, //3917 #HANGUL SYLLABLE SSANGPIEUP WAE RIEULPIEUP + {0x9742, 0xBF84}, //3918 #HANGUL SYLLABLE SSANGPIEUP WAE RIEULSIOS + {0x9743, 0xBF85}, //3919 #HANGUL SYLLABLE SSANGPIEUP WAE RIEULTHIEUTH + {0x9744, 0xBF86}, //3920 #HANGUL SYLLABLE SSANGPIEUP WAE RIEULPHIEUPH + {0x9745, 0xBF87}, //3921 #HANGUL SYLLABLE SSANGPIEUP WAE RIEULHIEUH + {0x9746, 0xBF88}, //3922 #HANGUL SYLLABLE SSANGPIEUP WAE MIEUM + {0x9747, 0xBF89}, //3923 #HANGUL SYLLABLE SSANGPIEUP WAE PIEUP + {0x9748, 0xBF8A}, //3924 #HANGUL SYLLABLE SSANGPIEUP WAE PIEUPSIOS + {0x9749, 0xBF8B}, //3925 #HANGUL SYLLABLE SSANGPIEUP WAE SIOS + {0x974A, 0xBF8C}, //3926 #HANGUL SYLLABLE SSANGPIEUP WAE SSANGSIOS + {0x974B, 0xBF8D}, //3927 #HANGUL SYLLABLE SSANGPIEUP WAE IEUNG + {0x974C, 0xBF8E}, //3928 #HANGUL SYLLABLE SSANGPIEUP WAE CIEUC + {0x974D, 0xBF8F}, //3929 #HANGUL SYLLABLE SSANGPIEUP WAE CHIEUCH + {0x974E, 0xBF90}, //3930 #HANGUL SYLLABLE SSANGPIEUP WAE KHIEUKH + {0x974F, 0xBF91}, //3931 #HANGUL SYLLABLE SSANGPIEUP WAE THIEUTH + {0x9750, 0xBF92}, //3932 #HANGUL SYLLABLE SSANGPIEUP WAE PHIEUPH + {0x9751, 0xBF93}, //3933 #HANGUL SYLLABLE SSANGPIEUP WAE HIEUH + {0x9752, 0xBF95}, //3934 #HANGUL SYLLABLE SSANGPIEUP OE KIYEOK + {0x9753, 0xBF96}, //3935 #HANGUL SYLLABLE SSANGPIEUP OE SSANGKIYEOK + {0x9754, 0xBF97}, //3936 #HANGUL SYLLABLE SSANGPIEUP OE KIYEOKSIOS + {0x9755, 0xBF98}, //3937 #HANGUL SYLLABLE SSANGPIEUP OE NIEUN + {0x9756, 0xBF99}, //3938 #HANGUL SYLLABLE SSANGPIEUP OE NIEUNCIEUC + {0x9757, 0xBF9A}, //3939 #HANGUL SYLLABLE SSANGPIEUP OE NIEUNHIEUH + {0x9758, 0xBF9B}, //3940 #HANGUL SYLLABLE SSANGPIEUP OE TIKEUT + {0x9759, 0xBF9C}, //3941 #HANGUL SYLLABLE SSANGPIEUP OE RIEUL + {0x975A, 0xBF9D}, //3942 #HANGUL SYLLABLE SSANGPIEUP OE RIEULKIYEOK + {0x9761, 0xBF9E}, //3943 #HANGUL SYLLABLE SSANGPIEUP OE RIEULMIEUM + {0x9762, 0xBF9F}, //3944 #HANGUL SYLLABLE SSANGPIEUP OE RIEULPIEUP + {0x9763, 0xBFA0}, //3945 #HANGUL SYLLABLE SSANGPIEUP OE RIEULSIOS + {0x9764, 0xBFA1}, //3946 #HANGUL SYLLABLE SSANGPIEUP OE RIEULTHIEUTH + {0x9765, 0xBFA2}, //3947 #HANGUL SYLLABLE SSANGPIEUP OE RIEULPHIEUPH + {0x9766, 0xBFA3}, //3948 #HANGUL SYLLABLE SSANGPIEUP OE RIEULHIEUH + {0x9767, 0xBFA4}, //3949 #HANGUL SYLLABLE SSANGPIEUP OE MIEUM + {0x9768, 0xBFA5}, //3950 #HANGUL SYLLABLE SSANGPIEUP OE PIEUP + {0x9769, 0xBFA6}, //3951 #HANGUL SYLLABLE SSANGPIEUP OE PIEUPSIOS + {0x976A, 0xBFA7}, //3952 #HANGUL SYLLABLE SSANGPIEUP OE SIOS + {0x976B, 0xBFA8}, //3953 #HANGUL SYLLABLE SSANGPIEUP OE SSANGSIOS + {0x976C, 0xBFA9}, //3954 #HANGUL SYLLABLE SSANGPIEUP OE IEUNG + {0x976D, 0xBFAA}, //3955 #HANGUL SYLLABLE SSANGPIEUP OE CIEUC + {0x976E, 0xBFAB}, //3956 #HANGUL SYLLABLE SSANGPIEUP OE CHIEUCH + {0x976F, 0xBFAC}, //3957 #HANGUL SYLLABLE SSANGPIEUP OE KHIEUKH + {0x9770, 0xBFAD}, //3958 #HANGUL SYLLABLE SSANGPIEUP OE THIEUTH + {0x9771, 0xBFAE}, //3959 #HANGUL SYLLABLE SSANGPIEUP OE PHIEUPH + {0x9772, 0xBFAF}, //3960 #HANGUL SYLLABLE SSANGPIEUP OE HIEUH + {0x9773, 0xBFB1}, //3961 #HANGUL SYLLABLE SSANGPIEUP YO KIYEOK + {0x9774, 0xBFB2}, //3962 #HANGUL SYLLABLE SSANGPIEUP YO SSANGKIYEOK + {0x9775, 0xBFB3}, //3963 #HANGUL SYLLABLE SSANGPIEUP YO KIYEOKSIOS + {0x9776, 0xBFB4}, //3964 #HANGUL SYLLABLE SSANGPIEUP YO NIEUN + {0x9777, 0xBFB5}, //3965 #HANGUL SYLLABLE SSANGPIEUP YO NIEUNCIEUC + {0x9778, 0xBFB6}, //3966 #HANGUL SYLLABLE SSANGPIEUP YO NIEUNHIEUH + {0x9779, 0xBFB7}, //3967 #HANGUL SYLLABLE SSANGPIEUP YO TIKEUT + {0x977A, 0xBFB8}, //3968 #HANGUL SYLLABLE SSANGPIEUP YO RIEUL + {0x9781, 0xBFB9}, //3969 #HANGUL SYLLABLE SSANGPIEUP YO RIEULKIYEOK + {0x9782, 0xBFBA}, //3970 #HANGUL SYLLABLE SSANGPIEUP YO RIEULMIEUM + {0x9783, 0xBFBB}, //3971 #HANGUL SYLLABLE SSANGPIEUP YO RIEULPIEUP + {0x9784, 0xBFBC}, //3972 #HANGUL SYLLABLE SSANGPIEUP YO RIEULSIOS + {0x9785, 0xBFBD}, //3973 #HANGUL SYLLABLE SSANGPIEUP YO RIEULTHIEUTH + {0x9786, 0xBFBE}, //3974 #HANGUL SYLLABLE SSANGPIEUP YO RIEULPHIEUPH + {0x9787, 0xBFBF}, //3975 #HANGUL SYLLABLE SSANGPIEUP YO RIEULHIEUH + {0x9788, 0xBFC0}, //3976 #HANGUL SYLLABLE SSANGPIEUP YO MIEUM + {0x9789, 0xBFC1}, //3977 #HANGUL SYLLABLE SSANGPIEUP YO PIEUP + {0x978A, 0xBFC2}, //3978 #HANGUL SYLLABLE SSANGPIEUP YO PIEUPSIOS + {0x978B, 0xBFC3}, //3979 #HANGUL SYLLABLE SSANGPIEUP YO SIOS + {0x978C, 0xBFC4}, //3980 #HANGUL SYLLABLE SSANGPIEUP YO SSANGSIOS + {0x978D, 0xBFC6}, //3981 #HANGUL SYLLABLE SSANGPIEUP YO CIEUC + {0x978E, 0xBFC7}, //3982 #HANGUL SYLLABLE SSANGPIEUP YO CHIEUCH + {0x978F, 0xBFC8}, //3983 #HANGUL SYLLABLE SSANGPIEUP YO KHIEUKH + {0x9790, 0xBFC9}, //3984 #HANGUL SYLLABLE SSANGPIEUP YO THIEUTH + {0x9791, 0xBFCA}, //3985 #HANGUL SYLLABLE SSANGPIEUP YO PHIEUPH + {0x9792, 0xBFCB}, //3986 #HANGUL SYLLABLE SSANGPIEUP YO HIEUH + {0x9793, 0xBFCE}, //3987 #HANGUL SYLLABLE SSANGPIEUP U SSANGKIYEOK + {0x9794, 0xBFCF}, //3988 #HANGUL SYLLABLE SSANGPIEUP U KIYEOKSIOS + {0x9795, 0xBFD1}, //3989 #HANGUL SYLLABLE SSANGPIEUP U NIEUNCIEUC + {0x9796, 0xBFD2}, //3990 #HANGUL SYLLABLE SSANGPIEUP U NIEUNHIEUH + {0x9797, 0xBFD3}, //3991 #HANGUL SYLLABLE SSANGPIEUP U TIKEUT + {0x9798, 0xBFD5}, //3992 #HANGUL SYLLABLE SSANGPIEUP U RIEULKIYEOK + {0x9799, 0xBFD6}, //3993 #HANGUL SYLLABLE SSANGPIEUP U RIEULMIEUM + {0x979A, 0xBFD7}, //3994 #HANGUL SYLLABLE SSANGPIEUP U RIEULPIEUP + {0x979B, 0xBFD8}, //3995 #HANGUL SYLLABLE SSANGPIEUP U RIEULSIOS + {0x979C, 0xBFD9}, //3996 #HANGUL SYLLABLE SSANGPIEUP U RIEULTHIEUTH + {0x979D, 0xBFDA}, //3997 #HANGUL SYLLABLE SSANGPIEUP U RIEULPHIEUPH + {0x979E, 0xBFDB}, //3998 #HANGUL SYLLABLE SSANGPIEUP U RIEULHIEUH + {0x979F, 0xBFDD}, //3999 #HANGUL SYLLABLE SSANGPIEUP U PIEUP + {0x97A0, 0xBFDE}, //4000 #HANGUL SYLLABLE SSANGPIEUP U PIEUPSIOS + {0x97A1, 0xBFE0}, //4001 #HANGUL SYLLABLE SSANGPIEUP U SSANGSIOS + {0x97A2, 0xBFE2}, //4002 #HANGUL SYLLABLE SSANGPIEUP U CIEUC + {0x97A3, 0xBFE3}, //4003 #HANGUL SYLLABLE SSANGPIEUP U CHIEUCH + {0x97A4, 0xBFE4}, //4004 #HANGUL SYLLABLE SSANGPIEUP U KHIEUKH + {0x97A5, 0xBFE5}, //4005 #HANGUL SYLLABLE SSANGPIEUP U THIEUTH + {0x97A6, 0xBFE6}, //4006 #HANGUL SYLLABLE SSANGPIEUP U PHIEUPH + {0x97A7, 0xBFE7}, //4007 #HANGUL SYLLABLE SSANGPIEUP U HIEUH + {0x97A8, 0xBFE8}, //4008 #HANGUL SYLLABLE SSANGPIEUP WEO + {0x97A9, 0xBFE9}, //4009 #HANGUL SYLLABLE SSANGPIEUP WEO KIYEOK + {0x97AA, 0xBFEA}, //4010 #HANGUL SYLLABLE SSANGPIEUP WEO SSANGKIYEOK + {0x97AB, 0xBFEB}, //4011 #HANGUL SYLLABLE SSANGPIEUP WEO KIYEOKSIOS + {0x97AC, 0xBFEC}, //4012 #HANGUL SYLLABLE SSANGPIEUP WEO NIEUN + {0x97AD, 0xBFED}, //4013 #HANGUL SYLLABLE SSANGPIEUP WEO NIEUNCIEUC + {0x97AE, 0xBFEE}, //4014 #HANGUL SYLLABLE SSANGPIEUP WEO NIEUNHIEUH + {0x97AF, 0xBFEF}, //4015 #HANGUL SYLLABLE SSANGPIEUP WEO TIKEUT + {0x97B0, 0xBFF0}, //4016 #HANGUL SYLLABLE SSANGPIEUP WEO RIEUL + {0x97B1, 0xBFF1}, //4017 #HANGUL SYLLABLE SSANGPIEUP WEO RIEULKIYEOK + {0x97B2, 0xBFF2}, //4018 #HANGUL SYLLABLE SSANGPIEUP WEO RIEULMIEUM + {0x97B3, 0xBFF3}, //4019 #HANGUL SYLLABLE SSANGPIEUP WEO RIEULPIEUP + {0x97B4, 0xBFF4}, //4020 #HANGUL SYLLABLE SSANGPIEUP WEO RIEULSIOS + {0x97B5, 0xBFF5}, //4021 #HANGUL SYLLABLE SSANGPIEUP WEO RIEULTHIEUTH + {0x97B6, 0xBFF6}, //4022 #HANGUL SYLLABLE SSANGPIEUP WEO RIEULPHIEUPH + {0x97B7, 0xBFF7}, //4023 #HANGUL SYLLABLE SSANGPIEUP WEO RIEULHIEUH + {0x97B8, 0xBFF8}, //4024 #HANGUL SYLLABLE SSANGPIEUP WEO MIEUM + {0x97B9, 0xBFF9}, //4025 #HANGUL SYLLABLE SSANGPIEUP WEO PIEUP + {0x97BA, 0xBFFA}, //4026 #HANGUL SYLLABLE SSANGPIEUP WEO PIEUPSIOS + {0x97BB, 0xBFFB}, //4027 #HANGUL SYLLABLE SSANGPIEUP WEO SIOS + {0x97BC, 0xBFFC}, //4028 #HANGUL SYLLABLE SSANGPIEUP WEO SSANGSIOS + {0x97BD, 0xBFFD}, //4029 #HANGUL SYLLABLE SSANGPIEUP WEO IEUNG + {0x97BE, 0xBFFE}, //4030 #HANGUL SYLLABLE SSANGPIEUP WEO CIEUC + {0x97BF, 0xBFFF}, //4031 #HANGUL SYLLABLE SSANGPIEUP WEO CHIEUCH + {0x97C0, 0xC000}, //4032 #HANGUL SYLLABLE SSANGPIEUP WEO KHIEUKH + {0x97C1, 0xC001}, //4033 #HANGUL SYLLABLE SSANGPIEUP WEO THIEUTH + {0x97C2, 0xC002}, //4034 #HANGUL SYLLABLE SSANGPIEUP WEO PHIEUPH + {0x97C3, 0xC003}, //4035 #HANGUL SYLLABLE SSANGPIEUP WEO HIEUH + {0x97C4, 0xC004}, //4036 #HANGUL SYLLABLE SSANGPIEUP WE + {0x97C5, 0xC005}, //4037 #HANGUL SYLLABLE SSANGPIEUP WE KIYEOK + {0x97C6, 0xC006}, //4038 #HANGUL SYLLABLE SSANGPIEUP WE SSANGKIYEOK + {0x97C7, 0xC007}, //4039 #HANGUL SYLLABLE SSANGPIEUP WE KIYEOKSIOS + {0x97C8, 0xC008}, //4040 #HANGUL SYLLABLE SSANGPIEUP WE NIEUN + {0x97C9, 0xC009}, //4041 #HANGUL SYLLABLE SSANGPIEUP WE NIEUNCIEUC + {0x97CA, 0xC00A}, //4042 #HANGUL SYLLABLE SSANGPIEUP WE NIEUNHIEUH + {0x97CB, 0xC00B}, //4043 #HANGUL SYLLABLE SSANGPIEUP WE TIKEUT + {0x97CC, 0xC00C}, //4044 #HANGUL SYLLABLE SSANGPIEUP WE RIEUL + {0x97CD, 0xC00D}, //4045 #HANGUL SYLLABLE SSANGPIEUP WE RIEULKIYEOK + {0x97CE, 0xC00E}, //4046 #HANGUL SYLLABLE SSANGPIEUP WE RIEULMIEUM + {0x97CF, 0xC00F}, //4047 #HANGUL SYLLABLE SSANGPIEUP WE RIEULPIEUP + {0x97D0, 0xC010}, //4048 #HANGUL SYLLABLE SSANGPIEUP WE RIEULSIOS + {0x97D1, 0xC011}, //4049 #HANGUL SYLLABLE SSANGPIEUP WE RIEULTHIEUTH + {0x97D2, 0xC012}, //4050 #HANGUL SYLLABLE SSANGPIEUP WE RIEULPHIEUPH + {0x97D3, 0xC013}, //4051 #HANGUL SYLLABLE SSANGPIEUP WE RIEULHIEUH + {0x97D4, 0xC014}, //4052 #HANGUL SYLLABLE SSANGPIEUP WE MIEUM + {0x97D5, 0xC015}, //4053 #HANGUL SYLLABLE SSANGPIEUP WE PIEUP + {0x97D6, 0xC016}, //4054 #HANGUL SYLLABLE SSANGPIEUP WE PIEUPSIOS + {0x97D7, 0xC017}, //4055 #HANGUL SYLLABLE SSANGPIEUP WE SIOS + {0x97D8, 0xC018}, //4056 #HANGUL SYLLABLE SSANGPIEUP WE SSANGSIOS + {0x97D9, 0xC019}, //4057 #HANGUL SYLLABLE SSANGPIEUP WE IEUNG + {0x97DA, 0xC01A}, //4058 #HANGUL SYLLABLE SSANGPIEUP WE CIEUC + {0x97DB, 0xC01B}, //4059 #HANGUL SYLLABLE SSANGPIEUP WE CHIEUCH + {0x97DC, 0xC01C}, //4060 #HANGUL SYLLABLE SSANGPIEUP WE KHIEUKH + {0x97DD, 0xC01D}, //4061 #HANGUL SYLLABLE SSANGPIEUP WE THIEUTH + {0x97DE, 0xC01E}, //4062 #HANGUL SYLLABLE SSANGPIEUP WE PHIEUPH + {0x97DF, 0xC01F}, //4063 #HANGUL SYLLABLE SSANGPIEUP WE HIEUH + {0x97E0, 0xC020}, //4064 #HANGUL SYLLABLE SSANGPIEUP WI + {0x97E1, 0xC021}, //4065 #HANGUL SYLLABLE SSANGPIEUP WI KIYEOK + {0x97E2, 0xC022}, //4066 #HANGUL SYLLABLE SSANGPIEUP WI SSANGKIYEOK + {0x97E3, 0xC023}, //4067 #HANGUL SYLLABLE SSANGPIEUP WI KIYEOKSIOS + {0x97E4, 0xC024}, //4068 #HANGUL SYLLABLE SSANGPIEUP WI NIEUN + {0x97E5, 0xC025}, //4069 #HANGUL SYLLABLE SSANGPIEUP WI NIEUNCIEUC + {0x97E6, 0xC026}, //4070 #HANGUL SYLLABLE SSANGPIEUP WI NIEUNHIEUH + {0x97E7, 0xC027}, //4071 #HANGUL SYLLABLE SSANGPIEUP WI TIKEUT + {0x97E8, 0xC028}, //4072 #HANGUL SYLLABLE SSANGPIEUP WI RIEUL + {0x97E9, 0xC029}, //4073 #HANGUL SYLLABLE SSANGPIEUP WI RIEULKIYEOK + {0x97EA, 0xC02A}, //4074 #HANGUL SYLLABLE SSANGPIEUP WI RIEULMIEUM + {0x97EB, 0xC02B}, //4075 #HANGUL SYLLABLE SSANGPIEUP WI RIEULPIEUP + {0x97EC, 0xC02C}, //4076 #HANGUL SYLLABLE SSANGPIEUP WI RIEULSIOS + {0x97ED, 0xC02D}, //4077 #HANGUL SYLLABLE SSANGPIEUP WI RIEULTHIEUTH + {0x97EE, 0xC02E}, //4078 #HANGUL SYLLABLE SSANGPIEUP WI RIEULPHIEUPH + {0x97EF, 0xC02F}, //4079 #HANGUL SYLLABLE SSANGPIEUP WI RIEULHIEUH + {0x97F0, 0xC030}, //4080 #HANGUL SYLLABLE SSANGPIEUP WI MIEUM + {0x97F1, 0xC031}, //4081 #HANGUL SYLLABLE SSANGPIEUP WI PIEUP + {0x97F2, 0xC032}, //4082 #HANGUL SYLLABLE SSANGPIEUP WI PIEUPSIOS + {0x97F3, 0xC033}, //4083 #HANGUL SYLLABLE SSANGPIEUP WI SIOS + {0x97F4, 0xC034}, //4084 #HANGUL SYLLABLE SSANGPIEUP WI SSANGSIOS + {0x97F5, 0xC035}, //4085 #HANGUL SYLLABLE SSANGPIEUP WI IEUNG + {0x97F6, 0xC036}, //4086 #HANGUL SYLLABLE SSANGPIEUP WI CIEUC + {0x97F7, 0xC037}, //4087 #HANGUL SYLLABLE SSANGPIEUP WI CHIEUCH + {0x97F8, 0xC038}, //4088 #HANGUL SYLLABLE SSANGPIEUP WI KHIEUKH + {0x97F9, 0xC039}, //4089 #HANGUL SYLLABLE SSANGPIEUP WI THIEUTH + {0x97FA, 0xC03A}, //4090 #HANGUL SYLLABLE SSANGPIEUP WI PHIEUPH + {0x97FB, 0xC03B}, //4091 #HANGUL SYLLABLE SSANGPIEUP WI HIEUH + {0x97FC, 0xC03D}, //4092 #HANGUL SYLLABLE SSANGPIEUP YU KIYEOK + {0x97FD, 0xC03E}, //4093 #HANGUL SYLLABLE SSANGPIEUP YU SSANGKIYEOK + {0x97FE, 0xC03F}, //4094 #HANGUL SYLLABLE SSANGPIEUP YU KIYEOKSIOS + {0x9841, 0xC040}, //4095 #HANGUL SYLLABLE SSANGPIEUP YU NIEUN + {0x9842, 0xC041}, //4096 #HANGUL SYLLABLE SSANGPIEUP YU NIEUNCIEUC + {0x9843, 0xC042}, //4097 #HANGUL SYLLABLE SSANGPIEUP YU NIEUNHIEUH + {0x9844, 0xC043}, //4098 #HANGUL SYLLABLE SSANGPIEUP YU TIKEUT + {0x9845, 0xC044}, //4099 #HANGUL SYLLABLE SSANGPIEUP YU RIEUL + {0x9846, 0xC045}, //4100 #HANGUL SYLLABLE SSANGPIEUP YU RIEULKIYEOK + {0x9847, 0xC046}, //4101 #HANGUL SYLLABLE SSANGPIEUP YU RIEULMIEUM + {0x9848, 0xC047}, //4102 #HANGUL SYLLABLE SSANGPIEUP YU RIEULPIEUP + {0x9849, 0xC048}, //4103 #HANGUL SYLLABLE SSANGPIEUP YU RIEULSIOS + {0x984A, 0xC049}, //4104 #HANGUL SYLLABLE SSANGPIEUP YU RIEULTHIEUTH + {0x984B, 0xC04A}, //4105 #HANGUL SYLLABLE SSANGPIEUP YU RIEULPHIEUPH + {0x984C, 0xC04B}, //4106 #HANGUL SYLLABLE SSANGPIEUP YU RIEULHIEUH + {0x984D, 0xC04C}, //4107 #HANGUL SYLLABLE SSANGPIEUP YU MIEUM + {0x984E, 0xC04D}, //4108 #HANGUL SYLLABLE SSANGPIEUP YU PIEUP + {0x984F, 0xC04E}, //4109 #HANGUL SYLLABLE SSANGPIEUP YU PIEUPSIOS + {0x9850, 0xC04F}, //4110 #HANGUL SYLLABLE SSANGPIEUP YU SIOS + {0x9851, 0xC050}, //4111 #HANGUL SYLLABLE SSANGPIEUP YU SSANGSIOS + {0x9852, 0xC052}, //4112 #HANGUL SYLLABLE SSANGPIEUP YU CIEUC + {0x9853, 0xC053}, //4113 #HANGUL SYLLABLE SSANGPIEUP YU CHIEUCH + {0x9854, 0xC054}, //4114 #HANGUL SYLLABLE SSANGPIEUP YU KHIEUKH + {0x9855, 0xC055}, //4115 #HANGUL SYLLABLE SSANGPIEUP YU THIEUTH + {0x9856, 0xC056}, //4116 #HANGUL SYLLABLE SSANGPIEUP YU PHIEUPH + {0x9857, 0xC057}, //4117 #HANGUL SYLLABLE SSANGPIEUP YU HIEUH + {0x9858, 0xC059}, //4118 #HANGUL SYLLABLE SSANGPIEUP EU KIYEOK + {0x9859, 0xC05A}, //4119 #HANGUL SYLLABLE SSANGPIEUP EU SSANGKIYEOK + {0x985A, 0xC05B}, //4120 #HANGUL SYLLABLE SSANGPIEUP EU KIYEOKSIOS + {0x9861, 0xC05D}, //4121 #HANGUL SYLLABLE SSANGPIEUP EU NIEUNCIEUC + {0x9862, 0xC05E}, //4122 #HANGUL SYLLABLE SSANGPIEUP EU NIEUNHIEUH + {0x9863, 0xC05F}, //4123 #HANGUL SYLLABLE SSANGPIEUP EU TIKEUT + {0x9864, 0xC061}, //4124 #HANGUL SYLLABLE SSANGPIEUP EU RIEULKIYEOK + {0x9865, 0xC062}, //4125 #HANGUL SYLLABLE SSANGPIEUP EU RIEULMIEUM + {0x9866, 0xC063}, //4126 #HANGUL SYLLABLE SSANGPIEUP EU RIEULPIEUP + {0x9867, 0xC064}, //4127 #HANGUL SYLLABLE SSANGPIEUP EU RIEULSIOS + {0x9868, 0xC065}, //4128 #HANGUL SYLLABLE SSANGPIEUP EU RIEULTHIEUTH + {0x9869, 0xC066}, //4129 #HANGUL SYLLABLE SSANGPIEUP EU RIEULPHIEUPH + {0x986A, 0xC067}, //4130 #HANGUL SYLLABLE SSANGPIEUP EU RIEULHIEUH + {0x986B, 0xC06A}, //4131 #HANGUL SYLLABLE SSANGPIEUP EU PIEUPSIOS + {0x986C, 0xC06B}, //4132 #HANGUL SYLLABLE SSANGPIEUP EU SIOS + {0x986D, 0xC06C}, //4133 #HANGUL SYLLABLE SSANGPIEUP EU SSANGSIOS + {0x986E, 0xC06D}, //4134 #HANGUL SYLLABLE SSANGPIEUP EU IEUNG + {0x986F, 0xC06E}, //4135 #HANGUL SYLLABLE SSANGPIEUP EU CIEUC + {0x9870, 0xC06F}, //4136 #HANGUL SYLLABLE SSANGPIEUP EU CHIEUCH + {0x9871, 0xC070}, //4137 #HANGUL SYLLABLE SSANGPIEUP EU KHIEUKH + {0x9872, 0xC071}, //4138 #HANGUL SYLLABLE SSANGPIEUP EU THIEUTH + {0x9873, 0xC072}, //4139 #HANGUL SYLLABLE SSANGPIEUP EU PHIEUPH + {0x9874, 0xC073}, //4140 #HANGUL SYLLABLE SSANGPIEUP EU HIEUH + {0x9875, 0xC074}, //4141 #HANGUL SYLLABLE SSANGPIEUP YI + {0x9876, 0xC075}, //4142 #HANGUL SYLLABLE SSANGPIEUP YI KIYEOK + {0x9877, 0xC076}, //4143 #HANGUL SYLLABLE SSANGPIEUP YI SSANGKIYEOK + {0x9878, 0xC077}, //4144 #HANGUL SYLLABLE SSANGPIEUP YI KIYEOKSIOS + {0x9879, 0xC078}, //4145 #HANGUL SYLLABLE SSANGPIEUP YI NIEUN + {0x987A, 0xC079}, //4146 #HANGUL SYLLABLE SSANGPIEUP YI NIEUNCIEUC + {0x9881, 0xC07A}, //4147 #HANGUL SYLLABLE SSANGPIEUP YI NIEUNHIEUH + {0x9882, 0xC07B}, //4148 #HANGUL SYLLABLE SSANGPIEUP YI TIKEUT + {0x9883, 0xC07C}, //4149 #HANGUL SYLLABLE SSANGPIEUP YI RIEUL + {0x9884, 0xC07D}, //4150 #HANGUL SYLLABLE SSANGPIEUP YI RIEULKIYEOK + {0x9885, 0xC07E}, //4151 #HANGUL SYLLABLE SSANGPIEUP YI RIEULMIEUM + {0x9886, 0xC07F}, //4152 #HANGUL SYLLABLE SSANGPIEUP YI RIEULPIEUP + {0x9887, 0xC080}, //4153 #HANGUL SYLLABLE SSANGPIEUP YI RIEULSIOS + {0x9888, 0xC081}, //4154 #HANGUL SYLLABLE SSANGPIEUP YI RIEULTHIEUTH + {0x9889, 0xC082}, //4155 #HANGUL SYLLABLE SSANGPIEUP YI RIEULPHIEUPH + {0x988A, 0xC083}, //4156 #HANGUL SYLLABLE SSANGPIEUP YI RIEULHIEUH + {0x988B, 0xC084}, //4157 #HANGUL SYLLABLE SSANGPIEUP YI MIEUM + {0x988C, 0xC085}, //4158 #HANGUL SYLLABLE SSANGPIEUP YI PIEUP + {0x988D, 0xC086}, //4159 #HANGUL SYLLABLE SSANGPIEUP YI PIEUPSIOS + {0x988E, 0xC087}, //4160 #HANGUL SYLLABLE SSANGPIEUP YI SIOS + {0x988F, 0xC088}, //4161 #HANGUL SYLLABLE SSANGPIEUP YI SSANGSIOS + {0x9890, 0xC089}, //4162 #HANGUL SYLLABLE SSANGPIEUP YI IEUNG + {0x9891, 0xC08A}, //4163 #HANGUL SYLLABLE SSANGPIEUP YI CIEUC + {0x9892, 0xC08B}, //4164 #HANGUL SYLLABLE SSANGPIEUP YI CHIEUCH + {0x9893, 0xC08C}, //4165 #HANGUL SYLLABLE SSANGPIEUP YI KHIEUKH + {0x9894, 0xC08D}, //4166 #HANGUL SYLLABLE SSANGPIEUP YI THIEUTH + {0x9895, 0xC08E}, //4167 #HANGUL SYLLABLE SSANGPIEUP YI PHIEUPH + {0x9896, 0xC08F}, //4168 #HANGUL SYLLABLE SSANGPIEUP YI HIEUH + {0x9897, 0xC092}, //4169 #HANGUL SYLLABLE SSANGPIEUP I SSANGKIYEOK + {0x9898, 0xC093}, //4170 #HANGUL SYLLABLE SSANGPIEUP I KIYEOKSIOS + {0x9899, 0xC095}, //4171 #HANGUL SYLLABLE SSANGPIEUP I NIEUNCIEUC + {0x989A, 0xC096}, //4172 #HANGUL SYLLABLE SSANGPIEUP I NIEUNHIEUH + {0x989B, 0xC097}, //4173 #HANGUL SYLLABLE SSANGPIEUP I TIKEUT + {0x989C, 0xC099}, //4174 #HANGUL SYLLABLE SSANGPIEUP I RIEULKIYEOK + {0x989D, 0xC09A}, //4175 #HANGUL SYLLABLE SSANGPIEUP I RIEULMIEUM + {0x989E, 0xC09B}, //4176 #HANGUL SYLLABLE SSANGPIEUP I RIEULPIEUP + {0x989F, 0xC09C}, //4177 #HANGUL SYLLABLE SSANGPIEUP I RIEULSIOS + {0x98A0, 0xC09D}, //4178 #HANGUL SYLLABLE SSANGPIEUP I RIEULTHIEUTH + {0x98A1, 0xC09E}, //4179 #HANGUL SYLLABLE SSANGPIEUP I RIEULPHIEUPH + {0x98A2, 0xC09F}, //4180 #HANGUL SYLLABLE SSANGPIEUP I RIEULHIEUH + {0x98A3, 0xC0A2}, //4181 #HANGUL SYLLABLE SSANGPIEUP I PIEUPSIOS + {0x98A4, 0xC0A4}, //4182 #HANGUL SYLLABLE SSANGPIEUP I SSANGSIOS + {0x98A5, 0xC0A6}, //4183 #HANGUL SYLLABLE SSANGPIEUP I CIEUC + {0x98A6, 0xC0A7}, //4184 #HANGUL SYLLABLE SSANGPIEUP I CHIEUCH + {0x98A7, 0xC0A8}, //4185 #HANGUL SYLLABLE SSANGPIEUP I KHIEUKH + {0x98A8, 0xC0A9}, //4186 #HANGUL SYLLABLE SSANGPIEUP I THIEUTH + {0x98A9, 0xC0AA}, //4187 #HANGUL SYLLABLE SSANGPIEUP I PHIEUPH + {0x98AA, 0xC0AB}, //4188 #HANGUL SYLLABLE SSANGPIEUP I HIEUH + {0x98AB, 0xC0AE}, //4189 #HANGUL SYLLABLE SIOS A SSANGKIYEOK + {0x98AC, 0xC0B1}, //4190 #HANGUL SYLLABLE SIOS A NIEUNCIEUC + {0x98AD, 0xC0B2}, //4191 #HANGUL SYLLABLE SIOS A NIEUNHIEUH + {0x98AE, 0xC0B7}, //4192 #HANGUL SYLLABLE SIOS A RIEULPIEUP + {0x98AF, 0xC0B8}, //4193 #HANGUL SYLLABLE SIOS A RIEULSIOS + {0x98B0, 0xC0B9}, //4194 #HANGUL SYLLABLE SIOS A RIEULTHIEUTH + {0x98B1, 0xC0BA}, //4195 #HANGUL SYLLABLE SIOS A RIEULPHIEUPH + {0x98B2, 0xC0BB}, //4196 #HANGUL SYLLABLE SIOS A RIEULHIEUH + {0x98B3, 0xC0BE}, //4197 #HANGUL SYLLABLE SIOS A PIEUPSIOS + {0x98B4, 0xC0C2}, //4198 #HANGUL SYLLABLE SIOS A CIEUC + {0x98B5, 0xC0C3}, //4199 #HANGUL SYLLABLE SIOS A CHIEUCH + {0x98B6, 0xC0C4}, //4200 #HANGUL SYLLABLE SIOS A KHIEUKH + {0x98B7, 0xC0C6}, //4201 #HANGUL SYLLABLE SIOS A PHIEUPH + {0x98B8, 0xC0C7}, //4202 #HANGUL SYLLABLE SIOS A HIEUH + {0x98B9, 0xC0CA}, //4203 #HANGUL SYLLABLE SIOS AE SSANGKIYEOK + {0x98BA, 0xC0CB}, //4204 #HANGUL SYLLABLE SIOS AE KIYEOKSIOS + {0x98BB, 0xC0CD}, //4205 #HANGUL SYLLABLE SIOS AE NIEUNCIEUC + {0x98BC, 0xC0CE}, //4206 #HANGUL SYLLABLE SIOS AE NIEUNHIEUH + {0x98BD, 0xC0CF}, //4207 #HANGUL SYLLABLE SIOS AE TIKEUT + {0x98BE, 0xC0D1}, //4208 #HANGUL SYLLABLE SIOS AE RIEULKIYEOK + {0x98BF, 0xC0D2}, //4209 #HANGUL SYLLABLE SIOS AE RIEULMIEUM + {0x98C0, 0xC0D3}, //4210 #HANGUL SYLLABLE SIOS AE RIEULPIEUP + {0x98C1, 0xC0D4}, //4211 #HANGUL SYLLABLE SIOS AE RIEULSIOS + {0x98C2, 0xC0D5}, //4212 #HANGUL SYLLABLE SIOS AE RIEULTHIEUTH + {0x98C3, 0xC0D6}, //4213 #HANGUL SYLLABLE SIOS AE RIEULPHIEUPH + {0x98C4, 0xC0D7}, //4214 #HANGUL SYLLABLE SIOS AE RIEULHIEUH + {0x98C5, 0xC0DA}, //4215 #HANGUL SYLLABLE SIOS AE PIEUPSIOS + {0x98C6, 0xC0DE}, //4216 #HANGUL SYLLABLE SIOS AE CIEUC + {0x98C7, 0xC0DF}, //4217 #HANGUL SYLLABLE SIOS AE CHIEUCH + {0x98C8, 0xC0E0}, //4218 #HANGUL SYLLABLE SIOS AE KHIEUKH + {0x98C9, 0xC0E1}, //4219 #HANGUL SYLLABLE SIOS AE THIEUTH + {0x98CA, 0xC0E2}, //4220 #HANGUL SYLLABLE SIOS AE PHIEUPH + {0x98CB, 0xC0E3}, //4221 #HANGUL SYLLABLE SIOS AE HIEUH + {0x98CC, 0xC0E6}, //4222 #HANGUL SYLLABLE SIOS YA SSANGKIYEOK + {0x98CD, 0xC0E7}, //4223 #HANGUL SYLLABLE SIOS YA KIYEOKSIOS + {0x98CE, 0xC0E9}, //4224 #HANGUL SYLLABLE SIOS YA NIEUNCIEUC + {0x98CF, 0xC0EA}, //4225 #HANGUL SYLLABLE SIOS YA NIEUNHIEUH + {0x98D0, 0xC0EB}, //4226 #HANGUL SYLLABLE SIOS YA TIKEUT + {0x98D1, 0xC0ED}, //4227 #HANGUL SYLLABLE SIOS YA RIEULKIYEOK + {0x98D2, 0xC0EE}, //4228 #HANGUL SYLLABLE SIOS YA RIEULMIEUM + {0x98D3, 0xC0EF}, //4229 #HANGUL SYLLABLE SIOS YA RIEULPIEUP + {0x98D4, 0xC0F0}, //4230 #HANGUL SYLLABLE SIOS YA RIEULSIOS + {0x98D5, 0xC0F1}, //4231 #HANGUL SYLLABLE SIOS YA RIEULTHIEUTH + {0x98D6, 0xC0F2}, //4232 #HANGUL SYLLABLE SIOS YA RIEULPHIEUPH + {0x98D7, 0xC0F3}, //4233 #HANGUL SYLLABLE SIOS YA RIEULHIEUH + {0x98D8, 0xC0F6}, //4234 #HANGUL SYLLABLE SIOS YA PIEUPSIOS + {0x98D9, 0xC0F8}, //4235 #HANGUL SYLLABLE SIOS YA SSANGSIOS + {0x98DA, 0xC0FA}, //4236 #HANGUL SYLLABLE SIOS YA CIEUC + {0x98DB, 0xC0FB}, //4237 #HANGUL SYLLABLE SIOS YA CHIEUCH + {0x98DC, 0xC0FC}, //4238 #HANGUL SYLLABLE SIOS YA KHIEUKH + {0x98DD, 0xC0FD}, //4239 #HANGUL SYLLABLE SIOS YA THIEUTH + {0x98DE, 0xC0FE}, //4240 #HANGUL SYLLABLE SIOS YA PHIEUPH + {0x98DF, 0xC0FF}, //4241 #HANGUL SYLLABLE SIOS YA HIEUH + {0x98E0, 0xC101}, //4242 #HANGUL SYLLABLE SIOS YAE KIYEOK + {0x98E1, 0xC102}, //4243 #HANGUL SYLLABLE SIOS YAE SSANGKIYEOK + {0x98E2, 0xC103}, //4244 #HANGUL SYLLABLE SIOS YAE KIYEOKSIOS + {0x98E3, 0xC105}, //4245 #HANGUL SYLLABLE SIOS YAE NIEUNCIEUC + {0x98E4, 0xC106}, //4246 #HANGUL SYLLABLE SIOS YAE NIEUNHIEUH + {0x98E5, 0xC107}, //4247 #HANGUL SYLLABLE SIOS YAE TIKEUT + {0x98E6, 0xC109}, //4248 #HANGUL SYLLABLE SIOS YAE RIEULKIYEOK + {0x98E7, 0xC10A}, //4249 #HANGUL SYLLABLE SIOS YAE RIEULMIEUM + {0x98E8, 0xC10B}, //4250 #HANGUL SYLLABLE SIOS YAE RIEULPIEUP + {0x98E9, 0xC10C}, //4251 #HANGUL SYLLABLE SIOS YAE RIEULSIOS + {0x98EA, 0xC10D}, //4252 #HANGUL SYLLABLE SIOS YAE RIEULTHIEUTH + {0x98EB, 0xC10E}, //4253 #HANGUL SYLLABLE SIOS YAE RIEULPHIEUPH + {0x98EC, 0xC10F}, //4254 #HANGUL SYLLABLE SIOS YAE RIEULHIEUH + {0x98ED, 0xC111}, //4255 #HANGUL SYLLABLE SIOS YAE PIEUP + {0x98EE, 0xC112}, //4256 #HANGUL SYLLABLE SIOS YAE PIEUPSIOS + {0x98EF, 0xC113}, //4257 #HANGUL SYLLABLE SIOS YAE SIOS + {0x98F0, 0xC114}, //4258 #HANGUL SYLLABLE SIOS YAE SSANGSIOS + {0x98F1, 0xC116}, //4259 #HANGUL SYLLABLE SIOS YAE CIEUC + {0x98F2, 0xC117}, //4260 #HANGUL SYLLABLE SIOS YAE CHIEUCH + {0x98F3, 0xC118}, //4261 #HANGUL SYLLABLE SIOS YAE KHIEUKH + {0x98F4, 0xC119}, //4262 #HANGUL SYLLABLE SIOS YAE THIEUTH + {0x98F5, 0xC11A}, //4263 #HANGUL SYLLABLE SIOS YAE PHIEUPH + {0x98F6, 0xC11B}, //4264 #HANGUL SYLLABLE SIOS YAE HIEUH + {0x98F7, 0xC121}, //4265 #HANGUL SYLLABLE SIOS EO NIEUNCIEUC + {0x98F8, 0xC122}, //4266 #HANGUL SYLLABLE SIOS EO NIEUNHIEUH + {0x98F9, 0xC125}, //4267 #HANGUL SYLLABLE SIOS EO RIEULKIYEOK + {0x98FA, 0xC128}, //4268 #HANGUL SYLLABLE SIOS EO RIEULSIOS + {0x98FB, 0xC129}, //4269 #HANGUL SYLLABLE SIOS EO RIEULTHIEUTH + {0x98FC, 0xC12A}, //4270 #HANGUL SYLLABLE SIOS EO RIEULPHIEUPH + {0x98FD, 0xC12B}, //4271 #HANGUL SYLLABLE SIOS EO RIEULHIEUH + {0x98FE, 0xC12E}, //4272 #HANGUL SYLLABLE SIOS EO PIEUPSIOS + {0x9941, 0xC132}, //4273 #HANGUL SYLLABLE SIOS EO CIEUC + {0x9942, 0xC133}, //4274 #HANGUL SYLLABLE SIOS EO CHIEUCH + {0x9943, 0xC134}, //4275 #HANGUL SYLLABLE SIOS EO KHIEUKH + {0x9944, 0xC135}, //4276 #HANGUL SYLLABLE SIOS EO THIEUTH + {0x9945, 0xC137}, //4277 #HANGUL SYLLABLE SIOS EO HIEUH + {0x9946, 0xC13A}, //4278 #HANGUL SYLLABLE SIOS E SSANGKIYEOK + {0x9947, 0xC13B}, //4279 #HANGUL SYLLABLE SIOS E KIYEOKSIOS + {0x9948, 0xC13D}, //4280 #HANGUL SYLLABLE SIOS E NIEUNCIEUC + {0x9949, 0xC13E}, //4281 #HANGUL SYLLABLE SIOS E NIEUNHIEUH + {0x994A, 0xC13F}, //4282 #HANGUL SYLLABLE SIOS E TIKEUT + {0x994B, 0xC141}, //4283 #HANGUL SYLLABLE SIOS E RIEULKIYEOK + {0x994C, 0xC142}, //4284 #HANGUL SYLLABLE SIOS E RIEULMIEUM + {0x994D, 0xC143}, //4285 #HANGUL SYLLABLE SIOS E RIEULPIEUP + {0x994E, 0xC144}, //4286 #HANGUL SYLLABLE SIOS E RIEULSIOS + {0x994F, 0xC145}, //4287 #HANGUL SYLLABLE SIOS E RIEULTHIEUTH + {0x9950, 0xC146}, //4288 #HANGUL SYLLABLE SIOS E RIEULPHIEUPH + {0x9951, 0xC147}, //4289 #HANGUL SYLLABLE SIOS E RIEULHIEUH + {0x9952, 0xC14A}, //4290 #HANGUL SYLLABLE SIOS E PIEUPSIOS + {0x9953, 0xC14E}, //4291 #HANGUL SYLLABLE SIOS E CIEUC + {0x9954, 0xC14F}, //4292 #HANGUL SYLLABLE SIOS E CHIEUCH + {0x9955, 0xC150}, //4293 #HANGUL SYLLABLE SIOS E KHIEUKH + {0x9956, 0xC151}, //4294 #HANGUL SYLLABLE SIOS E THIEUTH + {0x9957, 0xC152}, //4295 #HANGUL SYLLABLE SIOS E PHIEUPH + {0x9958, 0xC153}, //4296 #HANGUL SYLLABLE SIOS E HIEUH + {0x9959, 0xC156}, //4297 #HANGUL SYLLABLE SIOS YEO SSANGKIYEOK + {0x995A, 0xC157}, //4298 #HANGUL SYLLABLE SIOS YEO KIYEOKSIOS + {0x9961, 0xC159}, //4299 #HANGUL SYLLABLE SIOS YEO NIEUNCIEUC + {0x9962, 0xC15A}, //4300 #HANGUL SYLLABLE SIOS YEO NIEUNHIEUH + {0x9963, 0xC15B}, //4301 #HANGUL SYLLABLE SIOS YEO TIKEUT + {0x9964, 0xC15D}, //4302 #HANGUL SYLLABLE SIOS YEO RIEULKIYEOK + {0x9965, 0xC15E}, //4303 #HANGUL SYLLABLE SIOS YEO RIEULMIEUM + {0x9966, 0xC15F}, //4304 #HANGUL SYLLABLE SIOS YEO RIEULPIEUP + {0x9967, 0xC160}, //4305 #HANGUL SYLLABLE SIOS YEO RIEULSIOS + {0x9968, 0xC161}, //4306 #HANGUL SYLLABLE SIOS YEO RIEULTHIEUTH + {0x9969, 0xC162}, //4307 #HANGUL SYLLABLE SIOS YEO RIEULPHIEUPH + {0x996A, 0xC163}, //4308 #HANGUL SYLLABLE SIOS YEO RIEULHIEUH + {0x996B, 0xC166}, //4309 #HANGUL SYLLABLE SIOS YEO PIEUPSIOS + {0x996C, 0xC16A}, //4310 #HANGUL SYLLABLE SIOS YEO CIEUC + {0x996D, 0xC16B}, //4311 #HANGUL SYLLABLE SIOS YEO CHIEUCH + {0x996E, 0xC16C}, //4312 #HANGUL SYLLABLE SIOS YEO KHIEUKH + {0x996F, 0xC16D}, //4313 #HANGUL SYLLABLE SIOS YEO THIEUTH + {0x9970, 0xC16E}, //4314 #HANGUL SYLLABLE SIOS YEO PHIEUPH + {0x9971, 0xC16F}, //4315 #HANGUL SYLLABLE SIOS YEO HIEUH + {0x9972, 0xC171}, //4316 #HANGUL SYLLABLE SIOS YE KIYEOK + {0x9973, 0xC172}, //4317 #HANGUL SYLLABLE SIOS YE SSANGKIYEOK + {0x9974, 0xC173}, //4318 #HANGUL SYLLABLE SIOS YE KIYEOKSIOS + {0x9975, 0xC175}, //4319 #HANGUL SYLLABLE SIOS YE NIEUNCIEUC + {0x9976, 0xC176}, //4320 #HANGUL SYLLABLE SIOS YE NIEUNHIEUH + {0x9977, 0xC177}, //4321 #HANGUL SYLLABLE SIOS YE TIKEUT + {0x9978, 0xC179}, //4322 #HANGUL SYLLABLE SIOS YE RIEULKIYEOK + {0x9979, 0xC17A}, //4323 #HANGUL SYLLABLE SIOS YE RIEULMIEUM + {0x997A, 0xC17B}, //4324 #HANGUL SYLLABLE SIOS YE RIEULPIEUP + {0x9981, 0xC17C}, //4325 #HANGUL SYLLABLE SIOS YE RIEULSIOS + {0x9982, 0xC17D}, //4326 #HANGUL SYLLABLE SIOS YE RIEULTHIEUTH + {0x9983, 0xC17E}, //4327 #HANGUL SYLLABLE SIOS YE RIEULPHIEUPH + {0x9984, 0xC17F}, //4328 #HANGUL SYLLABLE SIOS YE RIEULHIEUH + {0x9985, 0xC180}, //4329 #HANGUL SYLLABLE SIOS YE MIEUM + {0x9986, 0xC181}, //4330 #HANGUL SYLLABLE SIOS YE PIEUP + {0x9987, 0xC182}, //4331 #HANGUL SYLLABLE SIOS YE PIEUPSIOS + {0x9988, 0xC183}, //4332 #HANGUL SYLLABLE SIOS YE SIOS + {0x9989, 0xC184}, //4333 #HANGUL SYLLABLE SIOS YE SSANGSIOS + {0x998A, 0xC186}, //4334 #HANGUL SYLLABLE SIOS YE CIEUC + {0x998B, 0xC187}, //4335 #HANGUL SYLLABLE SIOS YE CHIEUCH + {0x998C, 0xC188}, //4336 #HANGUL SYLLABLE SIOS YE KHIEUKH + {0x998D, 0xC189}, //4337 #HANGUL SYLLABLE SIOS YE THIEUTH + {0x998E, 0xC18A}, //4338 #HANGUL SYLLABLE SIOS YE PHIEUPH + {0x998F, 0xC18B}, //4339 #HANGUL SYLLABLE SIOS YE HIEUH + {0x9990, 0xC18F}, //4340 #HANGUL SYLLABLE SIOS O KIYEOKSIOS + {0x9991, 0xC191}, //4341 #HANGUL SYLLABLE SIOS O NIEUNCIEUC + {0x9992, 0xC192}, //4342 #HANGUL SYLLABLE SIOS O NIEUNHIEUH + {0x9993, 0xC193}, //4343 #HANGUL SYLLABLE SIOS O TIKEUT + {0x9994, 0xC195}, //4344 #HANGUL SYLLABLE SIOS O RIEULKIYEOK + {0x9995, 0xC197}, //4345 #HANGUL SYLLABLE SIOS O RIEULPIEUP + {0x9996, 0xC198}, //4346 #HANGUL SYLLABLE SIOS O RIEULSIOS + {0x9997, 0xC199}, //4347 #HANGUL SYLLABLE SIOS O RIEULTHIEUTH + {0x9998, 0xC19A}, //4348 #HANGUL SYLLABLE SIOS O RIEULPHIEUPH + {0x9999, 0xC19B}, //4349 #HANGUL SYLLABLE SIOS O RIEULHIEUH + {0x999A, 0xC19E}, //4350 #HANGUL SYLLABLE SIOS O PIEUPSIOS + {0x999B, 0xC1A0}, //4351 #HANGUL SYLLABLE SIOS O SSANGSIOS + {0x999C, 0xC1A2}, //4352 #HANGUL SYLLABLE SIOS O CIEUC + {0x999D, 0xC1A3}, //4353 #HANGUL SYLLABLE SIOS O CHIEUCH + {0x999E, 0xC1A4}, //4354 #HANGUL SYLLABLE SIOS O KHIEUKH + {0x999F, 0xC1A6}, //4355 #HANGUL SYLLABLE SIOS O PHIEUPH + {0x99A0, 0xC1A7}, //4356 #HANGUL SYLLABLE SIOS O HIEUH + {0x99A1, 0xC1AA}, //4357 #HANGUL SYLLABLE SIOS WA SSANGKIYEOK + {0x99A2, 0xC1AB}, //4358 #HANGUL SYLLABLE SIOS WA KIYEOKSIOS + {0x99A3, 0xC1AD}, //4359 #HANGUL SYLLABLE SIOS WA NIEUNCIEUC + {0x99A4, 0xC1AE}, //4360 #HANGUL SYLLABLE SIOS WA NIEUNHIEUH + {0x99A5, 0xC1AF}, //4361 #HANGUL SYLLABLE SIOS WA TIKEUT + {0x99A6, 0xC1B1}, //4362 #HANGUL SYLLABLE SIOS WA RIEULKIYEOK + {0x99A7, 0xC1B2}, //4363 #HANGUL SYLLABLE SIOS WA RIEULMIEUM + {0x99A8, 0xC1B3}, //4364 #HANGUL SYLLABLE SIOS WA RIEULPIEUP + {0x99A9, 0xC1B4}, //4365 #HANGUL SYLLABLE SIOS WA RIEULSIOS + {0x99AA, 0xC1B5}, //4366 #HANGUL SYLLABLE SIOS WA RIEULTHIEUTH + {0x99AB, 0xC1B6}, //4367 #HANGUL SYLLABLE SIOS WA RIEULPHIEUPH + {0x99AC, 0xC1B7}, //4368 #HANGUL SYLLABLE SIOS WA RIEULHIEUH + {0x99AD, 0xC1B8}, //4369 #HANGUL SYLLABLE SIOS WA MIEUM + {0x99AE, 0xC1B9}, //4370 #HANGUL SYLLABLE SIOS WA PIEUP + {0x99AF, 0xC1BA}, //4371 #HANGUL SYLLABLE SIOS WA PIEUPSIOS + {0x99B0, 0xC1BB}, //4372 #HANGUL SYLLABLE SIOS WA SIOS + {0x99B1, 0xC1BC}, //4373 #HANGUL SYLLABLE SIOS WA SSANGSIOS + {0x99B2, 0xC1BE}, //4374 #HANGUL SYLLABLE SIOS WA CIEUC + {0x99B3, 0xC1BF}, //4375 #HANGUL SYLLABLE SIOS WA CHIEUCH + {0x99B4, 0xC1C0}, //4376 #HANGUL SYLLABLE SIOS WA KHIEUKH + {0x99B5, 0xC1C1}, //4377 #HANGUL SYLLABLE SIOS WA THIEUTH + {0x99B6, 0xC1C2}, //4378 #HANGUL SYLLABLE SIOS WA PHIEUPH + {0x99B7, 0xC1C3}, //4379 #HANGUL SYLLABLE SIOS WA HIEUH + {0x99B8, 0xC1C5}, //4380 #HANGUL SYLLABLE SIOS WAE KIYEOK + {0x99B9, 0xC1C6}, //4381 #HANGUL SYLLABLE SIOS WAE SSANGKIYEOK + {0x99BA, 0xC1C7}, //4382 #HANGUL SYLLABLE SIOS WAE KIYEOKSIOS + {0x99BB, 0xC1C9}, //4383 #HANGUL SYLLABLE SIOS WAE NIEUNCIEUC + {0x99BC, 0xC1CA}, //4384 #HANGUL SYLLABLE SIOS WAE NIEUNHIEUH + {0x99BD, 0xC1CB}, //4385 #HANGUL SYLLABLE SIOS WAE TIKEUT + {0x99BE, 0xC1CD}, //4386 #HANGUL SYLLABLE SIOS WAE RIEULKIYEOK + {0x99BF, 0xC1CE}, //4387 #HANGUL SYLLABLE SIOS WAE RIEULMIEUM + {0x99C0, 0xC1CF}, //4388 #HANGUL SYLLABLE SIOS WAE RIEULPIEUP + {0x99C1, 0xC1D0}, //4389 #HANGUL SYLLABLE SIOS WAE RIEULSIOS + {0x99C2, 0xC1D1}, //4390 #HANGUL SYLLABLE SIOS WAE RIEULTHIEUTH + {0x99C3, 0xC1D2}, //4391 #HANGUL SYLLABLE SIOS WAE RIEULPHIEUPH + {0x99C4, 0xC1D3}, //4392 #HANGUL SYLLABLE SIOS WAE RIEULHIEUH + {0x99C5, 0xC1D5}, //4393 #HANGUL SYLLABLE SIOS WAE PIEUP + {0x99C6, 0xC1D6}, //4394 #HANGUL SYLLABLE SIOS WAE PIEUPSIOS + {0x99C7, 0xC1D9}, //4395 #HANGUL SYLLABLE SIOS WAE IEUNG + {0x99C8, 0xC1DA}, //4396 #HANGUL SYLLABLE SIOS WAE CIEUC + {0x99C9, 0xC1DB}, //4397 #HANGUL SYLLABLE SIOS WAE CHIEUCH + {0x99CA, 0xC1DC}, //4398 #HANGUL SYLLABLE SIOS WAE KHIEUKH + {0x99CB, 0xC1DD}, //4399 #HANGUL SYLLABLE SIOS WAE THIEUTH + {0x99CC, 0xC1DE}, //4400 #HANGUL SYLLABLE SIOS WAE PHIEUPH + {0x99CD, 0xC1DF}, //4401 #HANGUL SYLLABLE SIOS WAE HIEUH + {0x99CE, 0xC1E1}, //4402 #HANGUL SYLLABLE SIOS OE KIYEOK + {0x99CF, 0xC1E2}, //4403 #HANGUL SYLLABLE SIOS OE SSANGKIYEOK + {0x99D0, 0xC1E3}, //4404 #HANGUL SYLLABLE SIOS OE KIYEOKSIOS + {0x99D1, 0xC1E5}, //4405 #HANGUL SYLLABLE SIOS OE NIEUNCIEUC + {0x99D2, 0xC1E6}, //4406 #HANGUL SYLLABLE SIOS OE NIEUNHIEUH + {0x99D3, 0xC1E7}, //4407 #HANGUL SYLLABLE SIOS OE TIKEUT + {0x99D4, 0xC1E9}, //4408 #HANGUL SYLLABLE SIOS OE RIEULKIYEOK + {0x99D5, 0xC1EA}, //4409 #HANGUL SYLLABLE SIOS OE RIEULMIEUM + {0x99D6, 0xC1EB}, //4410 #HANGUL SYLLABLE SIOS OE RIEULPIEUP + {0x99D7, 0xC1EC}, //4411 #HANGUL SYLLABLE SIOS OE RIEULSIOS + {0x99D8, 0xC1ED}, //4412 #HANGUL SYLLABLE SIOS OE RIEULTHIEUTH + {0x99D9, 0xC1EE}, //4413 #HANGUL SYLLABLE SIOS OE RIEULPHIEUPH + {0x99DA, 0xC1EF}, //4414 #HANGUL SYLLABLE SIOS OE RIEULHIEUH + {0x99DB, 0xC1F2}, //4415 #HANGUL SYLLABLE SIOS OE PIEUPSIOS + {0x99DC, 0xC1F4}, //4416 #HANGUL SYLLABLE SIOS OE SSANGSIOS + {0x99DD, 0xC1F5}, //4417 #HANGUL SYLLABLE SIOS OE IEUNG + {0x99DE, 0xC1F6}, //4418 #HANGUL SYLLABLE SIOS OE CIEUC + {0x99DF, 0xC1F7}, //4419 #HANGUL SYLLABLE SIOS OE CHIEUCH + {0x99E0, 0xC1F8}, //4420 #HANGUL SYLLABLE SIOS OE KHIEUKH + {0x99E1, 0xC1F9}, //4421 #HANGUL SYLLABLE SIOS OE THIEUTH + {0x99E2, 0xC1FA}, //4422 #HANGUL SYLLABLE SIOS OE PHIEUPH + {0x99E3, 0xC1FB}, //4423 #HANGUL SYLLABLE SIOS OE HIEUH + {0x99E4, 0xC1FE}, //4424 #HANGUL SYLLABLE SIOS YO SSANGKIYEOK + {0x99E5, 0xC1FF}, //4425 #HANGUL SYLLABLE SIOS YO KIYEOKSIOS + {0x99E6, 0xC201}, //4426 #HANGUL SYLLABLE SIOS YO NIEUNCIEUC + {0x99E7, 0xC202}, //4427 #HANGUL SYLLABLE SIOS YO NIEUNHIEUH + {0x99E8, 0xC203}, //4428 #HANGUL SYLLABLE SIOS YO TIKEUT + {0x99E9, 0xC205}, //4429 #HANGUL SYLLABLE SIOS YO RIEULKIYEOK + {0x99EA, 0xC206}, //4430 #HANGUL SYLLABLE SIOS YO RIEULMIEUM + {0x99EB, 0xC207}, //4431 #HANGUL SYLLABLE SIOS YO RIEULPIEUP + {0x99EC, 0xC208}, //4432 #HANGUL SYLLABLE SIOS YO RIEULSIOS + {0x99ED, 0xC209}, //4433 #HANGUL SYLLABLE SIOS YO RIEULTHIEUTH + {0x99EE, 0xC20A}, //4434 #HANGUL SYLLABLE SIOS YO RIEULPHIEUPH + {0x99EF, 0xC20B}, //4435 #HANGUL SYLLABLE SIOS YO RIEULHIEUH + {0x99F0, 0xC20E}, //4436 #HANGUL SYLLABLE SIOS YO PIEUPSIOS + {0x99F1, 0xC210}, //4437 #HANGUL SYLLABLE SIOS YO SSANGSIOS + {0x99F2, 0xC212}, //4438 #HANGUL SYLLABLE SIOS YO CIEUC + {0x99F3, 0xC213}, //4439 #HANGUL SYLLABLE SIOS YO CHIEUCH + {0x99F4, 0xC214}, //4440 #HANGUL SYLLABLE SIOS YO KHIEUKH + {0x99F5, 0xC215}, //4441 #HANGUL SYLLABLE SIOS YO THIEUTH + {0x99F6, 0xC216}, //4442 #HANGUL SYLLABLE SIOS YO PHIEUPH + {0x99F7, 0xC217}, //4443 #HANGUL SYLLABLE SIOS YO HIEUH + {0x99F8, 0xC21A}, //4444 #HANGUL SYLLABLE SIOS U SSANGKIYEOK + {0x99F9, 0xC21B}, //4445 #HANGUL SYLLABLE SIOS U KIYEOKSIOS + {0x99FA, 0xC21D}, //4446 #HANGUL SYLLABLE SIOS U NIEUNCIEUC + {0x99FB, 0xC21E}, //4447 #HANGUL SYLLABLE SIOS U NIEUNHIEUH + {0x99FC, 0xC221}, //4448 #HANGUL SYLLABLE SIOS U RIEULKIYEOK + {0x99FD, 0xC222}, //4449 #HANGUL SYLLABLE SIOS U RIEULMIEUM + {0x99FE, 0xC223}, //4450 #HANGUL SYLLABLE SIOS U RIEULPIEUP + {0x9A41, 0xC224}, //4451 #HANGUL SYLLABLE SIOS U RIEULSIOS + {0x9A42, 0xC225}, //4452 #HANGUL SYLLABLE SIOS U RIEULTHIEUTH + {0x9A43, 0xC226}, //4453 #HANGUL SYLLABLE SIOS U RIEULPHIEUPH + {0x9A44, 0xC227}, //4454 #HANGUL SYLLABLE SIOS U RIEULHIEUH + {0x9A45, 0xC22A}, //4455 #HANGUL SYLLABLE SIOS U PIEUPSIOS + {0x9A46, 0xC22C}, //4456 #HANGUL SYLLABLE SIOS U SSANGSIOS + {0x9A47, 0xC22E}, //4457 #HANGUL SYLLABLE SIOS U CIEUC + {0x9A48, 0xC230}, //4458 #HANGUL SYLLABLE SIOS U KHIEUKH + {0x9A49, 0xC233}, //4459 #HANGUL SYLLABLE SIOS U HIEUH + {0x9A4A, 0xC235}, //4460 #HANGUL SYLLABLE SIOS WEO KIYEOK + {0x9A4B, 0xC236}, //4461 #HANGUL SYLLABLE SIOS WEO SSANGKIYEOK + {0x9A4C, 0xC237}, //4462 #HANGUL SYLLABLE SIOS WEO KIYEOKSIOS + {0x9A4D, 0xC238}, //4463 #HANGUL SYLLABLE SIOS WEO NIEUN + {0x9A4E, 0xC239}, //4464 #HANGUL SYLLABLE SIOS WEO NIEUNCIEUC + {0x9A4F, 0xC23A}, //4465 #HANGUL SYLLABLE SIOS WEO NIEUNHIEUH + {0x9A50, 0xC23B}, //4466 #HANGUL SYLLABLE SIOS WEO TIKEUT + {0x9A51, 0xC23C}, //4467 #HANGUL SYLLABLE SIOS WEO RIEUL + {0x9A52, 0xC23D}, //4468 #HANGUL SYLLABLE SIOS WEO RIEULKIYEOK + {0x9A53, 0xC23E}, //4469 #HANGUL SYLLABLE SIOS WEO RIEULMIEUM + {0x9A54, 0xC23F}, //4470 #HANGUL SYLLABLE SIOS WEO RIEULPIEUP + {0x9A55, 0xC240}, //4471 #HANGUL SYLLABLE SIOS WEO RIEULSIOS + {0x9A56, 0xC241}, //4472 #HANGUL SYLLABLE SIOS WEO RIEULTHIEUTH + {0x9A57, 0xC242}, //4473 #HANGUL SYLLABLE SIOS WEO RIEULPHIEUPH + {0x9A58, 0xC243}, //4474 #HANGUL SYLLABLE SIOS WEO RIEULHIEUH + {0x9A59, 0xC244}, //4475 #HANGUL SYLLABLE SIOS WEO MIEUM + {0x9A5A, 0xC245}, //4476 #HANGUL SYLLABLE SIOS WEO PIEUP + {0x9A61, 0xC246}, //4477 #HANGUL SYLLABLE SIOS WEO PIEUPSIOS + {0x9A62, 0xC247}, //4478 #HANGUL SYLLABLE SIOS WEO SIOS + {0x9A63, 0xC249}, //4479 #HANGUL SYLLABLE SIOS WEO IEUNG + {0x9A64, 0xC24A}, //4480 #HANGUL SYLLABLE SIOS WEO CIEUC + {0x9A65, 0xC24B}, //4481 #HANGUL SYLLABLE SIOS WEO CHIEUCH + {0x9A66, 0xC24C}, //4482 #HANGUL SYLLABLE SIOS WEO KHIEUKH + {0x9A67, 0xC24D}, //4483 #HANGUL SYLLABLE SIOS WEO THIEUTH + {0x9A68, 0xC24E}, //4484 #HANGUL SYLLABLE SIOS WEO PHIEUPH + {0x9A69, 0xC24F}, //4485 #HANGUL SYLLABLE SIOS WEO HIEUH + {0x9A6A, 0xC252}, //4486 #HANGUL SYLLABLE SIOS WE SSANGKIYEOK + {0x9A6B, 0xC253}, //4487 #HANGUL SYLLABLE SIOS WE KIYEOKSIOS + {0x9A6C, 0xC255}, //4488 #HANGUL SYLLABLE SIOS WE NIEUNCIEUC + {0x9A6D, 0xC256}, //4489 #HANGUL SYLLABLE SIOS WE NIEUNHIEUH + {0x9A6E, 0xC257}, //4490 #HANGUL SYLLABLE SIOS WE TIKEUT + {0x9A6F, 0xC259}, //4491 #HANGUL SYLLABLE SIOS WE RIEULKIYEOK + {0x9A70, 0xC25A}, //4492 #HANGUL SYLLABLE SIOS WE RIEULMIEUM + {0x9A71, 0xC25B}, //4493 #HANGUL SYLLABLE SIOS WE RIEULPIEUP + {0x9A72, 0xC25C}, //4494 #HANGUL SYLLABLE SIOS WE RIEULSIOS + {0x9A73, 0xC25D}, //4495 #HANGUL SYLLABLE SIOS WE RIEULTHIEUTH + {0x9A74, 0xC25E}, //4496 #HANGUL SYLLABLE SIOS WE RIEULPHIEUPH + {0x9A75, 0xC25F}, //4497 #HANGUL SYLLABLE SIOS WE RIEULHIEUH + {0x9A76, 0xC261}, //4498 #HANGUL SYLLABLE SIOS WE PIEUP + {0x9A77, 0xC262}, //4499 #HANGUL SYLLABLE SIOS WE PIEUPSIOS + {0x9A78, 0xC263}, //4500 #HANGUL SYLLABLE SIOS WE SIOS + {0x9A79, 0xC264}, //4501 #HANGUL SYLLABLE SIOS WE SSANGSIOS + {0x9A7A, 0xC266}, //4502 #HANGUL SYLLABLE SIOS WE CIEUC + {0x9A81, 0xC267}, //4503 #HANGUL SYLLABLE SIOS WE CHIEUCH + {0x9A82, 0xC268}, //4504 #HANGUL SYLLABLE SIOS WE KHIEUKH + {0x9A83, 0xC269}, //4505 #HANGUL SYLLABLE SIOS WE THIEUTH + {0x9A84, 0xC26A}, //4506 #HANGUL SYLLABLE SIOS WE PHIEUPH + {0x9A85, 0xC26B}, //4507 #HANGUL SYLLABLE SIOS WE HIEUH + {0x9A86, 0xC26E}, //4508 #HANGUL SYLLABLE SIOS WI SSANGKIYEOK + {0x9A87, 0xC26F}, //4509 #HANGUL SYLLABLE SIOS WI KIYEOKSIOS + {0x9A88, 0xC271}, //4510 #HANGUL SYLLABLE SIOS WI NIEUNCIEUC + {0x9A89, 0xC272}, //4511 #HANGUL SYLLABLE SIOS WI NIEUNHIEUH + {0x9A8A, 0xC273}, //4512 #HANGUL SYLLABLE SIOS WI TIKEUT + {0x9A8B, 0xC275}, //4513 #HANGUL SYLLABLE SIOS WI RIEULKIYEOK + {0x9A8C, 0xC276}, //4514 #HANGUL SYLLABLE SIOS WI RIEULMIEUM + {0x9A8D, 0xC277}, //4515 #HANGUL SYLLABLE SIOS WI RIEULPIEUP + {0x9A8E, 0xC278}, //4516 #HANGUL SYLLABLE SIOS WI RIEULSIOS + {0x9A8F, 0xC279}, //4517 #HANGUL SYLLABLE SIOS WI RIEULTHIEUTH + {0x9A90, 0xC27A}, //4518 #HANGUL SYLLABLE SIOS WI RIEULPHIEUPH + {0x9A91, 0xC27B}, //4519 #HANGUL SYLLABLE SIOS WI RIEULHIEUH + {0x9A92, 0xC27E}, //4520 #HANGUL SYLLABLE SIOS WI PIEUPSIOS + {0x9A93, 0xC280}, //4521 #HANGUL SYLLABLE SIOS WI SSANGSIOS + {0x9A94, 0xC282}, //4522 #HANGUL SYLLABLE SIOS WI CIEUC + {0x9A95, 0xC283}, //4523 #HANGUL SYLLABLE SIOS WI CHIEUCH + {0x9A96, 0xC284}, //4524 #HANGUL SYLLABLE SIOS WI KHIEUKH + {0x9A97, 0xC285}, //4525 #HANGUL SYLLABLE SIOS WI THIEUTH + {0x9A98, 0xC286}, //4526 #HANGUL SYLLABLE SIOS WI PHIEUPH + {0x9A99, 0xC287}, //4527 #HANGUL SYLLABLE SIOS WI HIEUH + {0x9A9A, 0xC28A}, //4528 #HANGUL SYLLABLE SIOS YU SSANGKIYEOK + {0x9A9B, 0xC28B}, //4529 #HANGUL SYLLABLE SIOS YU KIYEOKSIOS + {0x9A9C, 0xC28C}, //4530 #HANGUL SYLLABLE SIOS YU NIEUN + {0x9A9D, 0xC28D}, //4531 #HANGUL SYLLABLE SIOS YU NIEUNCIEUC + {0x9A9E, 0xC28E}, //4532 #HANGUL SYLLABLE SIOS YU NIEUNHIEUH + {0x9A9F, 0xC28F}, //4533 #HANGUL SYLLABLE SIOS YU TIKEUT + {0x9AA0, 0xC291}, //4534 #HANGUL SYLLABLE SIOS YU RIEULKIYEOK + {0x9AA1, 0xC292}, //4535 #HANGUL SYLLABLE SIOS YU RIEULMIEUM + {0x9AA2, 0xC293}, //4536 #HANGUL SYLLABLE SIOS YU RIEULPIEUP + {0x9AA3, 0xC294}, //4537 #HANGUL SYLLABLE SIOS YU RIEULSIOS + {0x9AA4, 0xC295}, //4538 #HANGUL SYLLABLE SIOS YU RIEULTHIEUTH + {0x9AA5, 0xC296}, //4539 #HANGUL SYLLABLE SIOS YU RIEULPHIEUPH + {0x9AA6, 0xC297}, //4540 #HANGUL SYLLABLE SIOS YU RIEULHIEUH + {0x9AA7, 0xC299}, //4541 #HANGUL SYLLABLE SIOS YU PIEUP + {0x9AA8, 0xC29A}, //4542 #HANGUL SYLLABLE SIOS YU PIEUPSIOS + {0x9AA9, 0xC29C}, //4543 #HANGUL SYLLABLE SIOS YU SSANGSIOS + {0x9AAA, 0xC29E}, //4544 #HANGUL SYLLABLE SIOS YU CIEUC + {0x9AAB, 0xC29F}, //4545 #HANGUL SYLLABLE SIOS YU CHIEUCH + {0x9AAC, 0xC2A0}, //4546 #HANGUL SYLLABLE SIOS YU KHIEUKH + {0x9AAD, 0xC2A1}, //4547 #HANGUL SYLLABLE SIOS YU THIEUTH + {0x9AAE, 0xC2A2}, //4548 #HANGUL SYLLABLE SIOS YU PHIEUPH + {0x9AAF, 0xC2A3}, //4549 #HANGUL SYLLABLE SIOS YU HIEUH + {0x9AB0, 0xC2A6}, //4550 #HANGUL SYLLABLE SIOS EU SSANGKIYEOK + {0x9AB1, 0xC2A7}, //4551 #HANGUL SYLLABLE SIOS EU KIYEOKSIOS + {0x9AB2, 0xC2A9}, //4552 #HANGUL SYLLABLE SIOS EU NIEUNCIEUC + {0x9AB3, 0xC2AA}, //4553 #HANGUL SYLLABLE SIOS EU NIEUNHIEUH + {0x9AB4, 0xC2AB}, //4554 #HANGUL SYLLABLE SIOS EU TIKEUT + {0x9AB5, 0xC2AE}, //4555 #HANGUL SYLLABLE SIOS EU RIEULMIEUM + {0x9AB6, 0xC2AF}, //4556 #HANGUL SYLLABLE SIOS EU RIEULPIEUP + {0x9AB7, 0xC2B0}, //4557 #HANGUL SYLLABLE SIOS EU RIEULSIOS + {0x9AB8, 0xC2B1}, //4558 #HANGUL SYLLABLE SIOS EU RIEULTHIEUTH + {0x9AB9, 0xC2B2}, //4559 #HANGUL SYLLABLE SIOS EU RIEULPHIEUPH + {0x9ABA, 0xC2B3}, //4560 #HANGUL SYLLABLE SIOS EU RIEULHIEUH + {0x9ABB, 0xC2B6}, //4561 #HANGUL SYLLABLE SIOS EU PIEUPSIOS + {0x9ABC, 0xC2B8}, //4562 #HANGUL SYLLABLE SIOS EU SSANGSIOS + {0x9ABD, 0xC2BA}, //4563 #HANGUL SYLLABLE SIOS EU CIEUC + {0x9ABE, 0xC2BB}, //4564 #HANGUL SYLLABLE SIOS EU CHIEUCH + {0x9ABF, 0xC2BC}, //4565 #HANGUL SYLLABLE SIOS EU KHIEUKH + {0x9AC0, 0xC2BD}, //4566 #HANGUL SYLLABLE SIOS EU THIEUTH + {0x9AC1, 0xC2BE}, //4567 #HANGUL SYLLABLE SIOS EU PHIEUPH + {0x9AC2, 0xC2BF}, //4568 #HANGUL SYLLABLE SIOS EU HIEUH + {0x9AC3, 0xC2C0}, //4569 #HANGUL SYLLABLE SIOS YI + {0x9AC4, 0xC2C1}, //4570 #HANGUL SYLLABLE SIOS YI KIYEOK + {0x9AC5, 0xC2C2}, //4571 #HANGUL SYLLABLE SIOS YI SSANGKIYEOK + {0x9AC6, 0xC2C3}, //4572 #HANGUL SYLLABLE SIOS YI KIYEOKSIOS + {0x9AC7, 0xC2C4}, //4573 #HANGUL SYLLABLE SIOS YI NIEUN + {0x9AC8, 0xC2C5}, //4574 #HANGUL SYLLABLE SIOS YI NIEUNCIEUC + {0x9AC9, 0xC2C6}, //4575 #HANGUL SYLLABLE SIOS YI NIEUNHIEUH + {0x9ACA, 0xC2C7}, //4576 #HANGUL SYLLABLE SIOS YI TIKEUT + {0x9ACB, 0xC2C8}, //4577 #HANGUL SYLLABLE SIOS YI RIEUL + {0x9ACC, 0xC2C9}, //4578 #HANGUL SYLLABLE SIOS YI RIEULKIYEOK + {0x9ACD, 0xC2CA}, //4579 #HANGUL SYLLABLE SIOS YI RIEULMIEUM + {0x9ACE, 0xC2CB}, //4580 #HANGUL SYLLABLE SIOS YI RIEULPIEUP + {0x9ACF, 0xC2CC}, //4581 #HANGUL SYLLABLE SIOS YI RIEULSIOS + {0x9AD0, 0xC2CD}, //4582 #HANGUL SYLLABLE SIOS YI RIEULTHIEUTH + {0x9AD1, 0xC2CE}, //4583 #HANGUL SYLLABLE SIOS YI RIEULPHIEUPH + {0x9AD2, 0xC2CF}, //4584 #HANGUL SYLLABLE SIOS YI RIEULHIEUH + {0x9AD3, 0xC2D0}, //4585 #HANGUL SYLLABLE SIOS YI MIEUM + {0x9AD4, 0xC2D1}, //4586 #HANGUL SYLLABLE SIOS YI PIEUP + {0x9AD5, 0xC2D2}, //4587 #HANGUL SYLLABLE SIOS YI PIEUPSIOS + {0x9AD6, 0xC2D3}, //4588 #HANGUL SYLLABLE SIOS YI SIOS + {0x9AD7, 0xC2D4}, //4589 #HANGUL SYLLABLE SIOS YI SSANGSIOS + {0x9AD8, 0xC2D5}, //4590 #HANGUL SYLLABLE SIOS YI IEUNG + {0x9AD9, 0xC2D6}, //4591 #HANGUL SYLLABLE SIOS YI CIEUC + {0x9ADA, 0xC2D7}, //4592 #HANGUL SYLLABLE SIOS YI CHIEUCH + {0x9ADB, 0xC2D8}, //4593 #HANGUL SYLLABLE SIOS YI KHIEUKH + {0x9ADC, 0xC2D9}, //4594 #HANGUL SYLLABLE SIOS YI THIEUTH + {0x9ADD, 0xC2DA}, //4595 #HANGUL SYLLABLE SIOS YI PHIEUPH + {0x9ADE, 0xC2DB}, //4596 #HANGUL SYLLABLE SIOS YI HIEUH + {0x9ADF, 0xC2DE}, //4597 #HANGUL SYLLABLE SIOS I SSANGKIYEOK + {0x9AE0, 0xC2DF}, //4598 #HANGUL SYLLABLE SIOS I KIYEOKSIOS + {0x9AE1, 0xC2E1}, //4599 #HANGUL SYLLABLE SIOS I NIEUNCIEUC + {0x9AE2, 0xC2E2}, //4600 #HANGUL SYLLABLE SIOS I NIEUNHIEUH + {0x9AE3, 0xC2E5}, //4601 #HANGUL SYLLABLE SIOS I RIEULKIYEOK + {0x9AE4, 0xC2E6}, //4602 #HANGUL SYLLABLE SIOS I RIEULMIEUM + {0x9AE5, 0xC2E7}, //4603 #HANGUL SYLLABLE SIOS I RIEULPIEUP + {0x9AE6, 0xC2E8}, //4604 #HANGUL SYLLABLE SIOS I RIEULSIOS + {0x9AE7, 0xC2E9}, //4605 #HANGUL SYLLABLE SIOS I RIEULTHIEUTH + {0x9AE8, 0xC2EA}, //4606 #HANGUL SYLLABLE SIOS I RIEULPHIEUPH + {0x9AE9, 0xC2EE}, //4607 #HANGUL SYLLABLE SIOS I PIEUPSIOS + {0x9AEA, 0xC2F0}, //4608 #HANGUL SYLLABLE SIOS I SSANGSIOS + {0x9AEB, 0xC2F2}, //4609 #HANGUL SYLLABLE SIOS I CIEUC + {0x9AEC, 0xC2F3}, //4610 #HANGUL SYLLABLE SIOS I CHIEUCH + {0x9AED, 0xC2F4}, //4611 #HANGUL SYLLABLE SIOS I KHIEUKH + {0x9AEE, 0xC2F5}, //4612 #HANGUL SYLLABLE SIOS I THIEUTH + {0x9AEF, 0xC2F7}, //4613 #HANGUL SYLLABLE SIOS I HIEUH + {0x9AF0, 0xC2FA}, //4614 #HANGUL SYLLABLE SSANGSIOS A SSANGKIYEOK + {0x9AF1, 0xC2FD}, //4615 #HANGUL SYLLABLE SSANGSIOS A NIEUNCIEUC + {0x9AF2, 0xC2FE}, //4616 #HANGUL SYLLABLE SSANGSIOS A NIEUNHIEUH + {0x9AF3, 0xC2FF}, //4617 #HANGUL SYLLABLE SSANGSIOS A TIKEUT + {0x9AF4, 0xC301}, //4618 #HANGUL SYLLABLE SSANGSIOS A RIEULKIYEOK + {0x9AF5, 0xC302}, //4619 #HANGUL SYLLABLE SSANGSIOS A RIEULMIEUM + {0x9AF6, 0xC303}, //4620 #HANGUL SYLLABLE SSANGSIOS A RIEULPIEUP + {0x9AF7, 0xC304}, //4621 #HANGUL SYLLABLE SSANGSIOS A RIEULSIOS + {0x9AF8, 0xC305}, //4622 #HANGUL SYLLABLE SSANGSIOS A RIEULTHIEUTH + {0x9AF9, 0xC306}, //4623 #HANGUL SYLLABLE SSANGSIOS A RIEULPHIEUPH + {0x9AFA, 0xC307}, //4624 #HANGUL SYLLABLE SSANGSIOS A RIEULHIEUH + {0x9AFB, 0xC30A}, //4625 #HANGUL SYLLABLE SSANGSIOS A PIEUPSIOS + {0x9AFC, 0xC30B}, //4626 #HANGUL SYLLABLE SSANGSIOS A SIOS + {0x9AFD, 0xC30E}, //4627 #HANGUL SYLLABLE SSANGSIOS A CIEUC + {0x9AFE, 0xC30F}, //4628 #HANGUL SYLLABLE SSANGSIOS A CHIEUCH + {0x9B41, 0xC310}, //4629 #HANGUL SYLLABLE SSANGSIOS A KHIEUKH + {0x9B42, 0xC311}, //4630 #HANGUL SYLLABLE SSANGSIOS A THIEUTH + {0x9B43, 0xC312}, //4631 #HANGUL SYLLABLE SSANGSIOS A PHIEUPH + {0x9B44, 0xC316}, //4632 #HANGUL SYLLABLE SSANGSIOS AE SSANGKIYEOK + {0x9B45, 0xC317}, //4633 #HANGUL SYLLABLE SSANGSIOS AE KIYEOKSIOS + {0x9B46, 0xC319}, //4634 #HANGUL SYLLABLE SSANGSIOS AE NIEUNCIEUC + {0x9B47, 0xC31A}, //4635 #HANGUL SYLLABLE SSANGSIOS AE NIEUNHIEUH + {0x9B48, 0xC31B}, //4636 #HANGUL SYLLABLE SSANGSIOS AE TIKEUT + {0x9B49, 0xC31D}, //4637 #HANGUL SYLLABLE SSANGSIOS AE RIEULKIYEOK + {0x9B4A, 0xC31E}, //4638 #HANGUL SYLLABLE SSANGSIOS AE RIEULMIEUM + {0x9B4B, 0xC31F}, //4639 #HANGUL SYLLABLE SSANGSIOS AE RIEULPIEUP + {0x9B4C, 0xC320}, //4640 #HANGUL SYLLABLE SSANGSIOS AE RIEULSIOS + {0x9B4D, 0xC321}, //4641 #HANGUL SYLLABLE SSANGSIOS AE RIEULTHIEUTH + {0x9B4E, 0xC322}, //4642 #HANGUL SYLLABLE SSANGSIOS AE RIEULPHIEUPH + {0x9B4F, 0xC323}, //4643 #HANGUL SYLLABLE SSANGSIOS AE RIEULHIEUH + {0x9B50, 0xC326}, //4644 #HANGUL SYLLABLE SSANGSIOS AE PIEUPSIOS + {0x9B51, 0xC327}, //4645 #HANGUL SYLLABLE SSANGSIOS AE SIOS + {0x9B52, 0xC32A}, //4646 #HANGUL SYLLABLE SSANGSIOS AE CIEUC + {0x9B53, 0xC32B}, //4647 #HANGUL SYLLABLE SSANGSIOS AE CHIEUCH + {0x9B54, 0xC32C}, //4648 #HANGUL SYLLABLE SSANGSIOS AE KHIEUKH + {0x9B55, 0xC32D}, //4649 #HANGUL SYLLABLE SSANGSIOS AE THIEUTH + {0x9B56, 0xC32E}, //4650 #HANGUL SYLLABLE SSANGSIOS AE PHIEUPH + {0x9B57, 0xC32F}, //4651 #HANGUL SYLLABLE SSANGSIOS AE HIEUH + {0x9B58, 0xC330}, //4652 #HANGUL SYLLABLE SSANGSIOS YA + {0x9B59, 0xC331}, //4653 #HANGUL SYLLABLE SSANGSIOS YA KIYEOK + {0x9B5A, 0xC332}, //4654 #HANGUL SYLLABLE SSANGSIOS YA SSANGKIYEOK + {0x9B61, 0xC333}, //4655 #HANGUL SYLLABLE SSANGSIOS YA KIYEOKSIOS + {0x9B62, 0xC334}, //4656 #HANGUL SYLLABLE SSANGSIOS YA NIEUN + {0x9B63, 0xC335}, //4657 #HANGUL SYLLABLE SSANGSIOS YA NIEUNCIEUC + {0x9B64, 0xC336}, //4658 #HANGUL SYLLABLE SSANGSIOS YA NIEUNHIEUH + {0x9B65, 0xC337}, //4659 #HANGUL SYLLABLE SSANGSIOS YA TIKEUT + {0x9B66, 0xC338}, //4660 #HANGUL SYLLABLE SSANGSIOS YA RIEUL + {0x9B67, 0xC339}, //4661 #HANGUL SYLLABLE SSANGSIOS YA RIEULKIYEOK + {0x9B68, 0xC33A}, //4662 #HANGUL SYLLABLE SSANGSIOS YA RIEULMIEUM + {0x9B69, 0xC33B}, //4663 #HANGUL SYLLABLE SSANGSIOS YA RIEULPIEUP + {0x9B6A, 0xC33C}, //4664 #HANGUL SYLLABLE SSANGSIOS YA RIEULSIOS + {0x9B6B, 0xC33D}, //4665 #HANGUL SYLLABLE SSANGSIOS YA RIEULTHIEUTH + {0x9B6C, 0xC33E}, //4666 #HANGUL SYLLABLE SSANGSIOS YA RIEULPHIEUPH + {0x9B6D, 0xC33F}, //4667 #HANGUL SYLLABLE SSANGSIOS YA RIEULHIEUH + {0x9B6E, 0xC340}, //4668 #HANGUL SYLLABLE SSANGSIOS YA MIEUM + {0x9B6F, 0xC341}, //4669 #HANGUL SYLLABLE SSANGSIOS YA PIEUP + {0x9B70, 0xC342}, //4670 #HANGUL SYLLABLE SSANGSIOS YA PIEUPSIOS + {0x9B71, 0xC343}, //4671 #HANGUL SYLLABLE SSANGSIOS YA SIOS + {0x9B72, 0xC344}, //4672 #HANGUL SYLLABLE SSANGSIOS YA SSANGSIOS + {0x9B73, 0xC346}, //4673 #HANGUL SYLLABLE SSANGSIOS YA CIEUC + {0x9B74, 0xC347}, //4674 #HANGUL SYLLABLE SSANGSIOS YA CHIEUCH + {0x9B75, 0xC348}, //4675 #HANGUL SYLLABLE SSANGSIOS YA KHIEUKH + {0x9B76, 0xC349}, //4676 #HANGUL SYLLABLE SSANGSIOS YA THIEUTH + {0x9B77, 0xC34A}, //4677 #HANGUL SYLLABLE SSANGSIOS YA PHIEUPH + {0x9B78, 0xC34B}, //4678 #HANGUL SYLLABLE SSANGSIOS YA HIEUH + {0x9B79, 0xC34C}, //4679 #HANGUL SYLLABLE SSANGSIOS YAE + {0x9B7A, 0xC34D}, //4680 #HANGUL SYLLABLE SSANGSIOS YAE KIYEOK + {0x9B81, 0xC34E}, //4681 #HANGUL SYLLABLE SSANGSIOS YAE SSANGKIYEOK + {0x9B82, 0xC34F}, //4682 #HANGUL SYLLABLE SSANGSIOS YAE KIYEOKSIOS + {0x9B83, 0xC350}, //4683 #HANGUL SYLLABLE SSANGSIOS YAE NIEUN + {0x9B84, 0xC351}, //4684 #HANGUL SYLLABLE SSANGSIOS YAE NIEUNCIEUC + {0x9B85, 0xC352}, //4685 #HANGUL SYLLABLE SSANGSIOS YAE NIEUNHIEUH + {0x9B86, 0xC353}, //4686 #HANGUL SYLLABLE SSANGSIOS YAE TIKEUT + {0x9B87, 0xC354}, //4687 #HANGUL SYLLABLE SSANGSIOS YAE RIEUL + {0x9B88, 0xC355}, //4688 #HANGUL SYLLABLE SSANGSIOS YAE RIEULKIYEOK + {0x9B89, 0xC356}, //4689 #HANGUL SYLLABLE SSANGSIOS YAE RIEULMIEUM + {0x9B8A, 0xC357}, //4690 #HANGUL SYLLABLE SSANGSIOS YAE RIEULPIEUP + {0x9B8B, 0xC358}, //4691 #HANGUL SYLLABLE SSANGSIOS YAE RIEULSIOS + {0x9B8C, 0xC359}, //4692 #HANGUL SYLLABLE SSANGSIOS YAE RIEULTHIEUTH + {0x9B8D, 0xC35A}, //4693 #HANGUL SYLLABLE SSANGSIOS YAE RIEULPHIEUPH + {0x9B8E, 0xC35B}, //4694 #HANGUL SYLLABLE SSANGSIOS YAE RIEULHIEUH + {0x9B8F, 0xC35C}, //4695 #HANGUL SYLLABLE SSANGSIOS YAE MIEUM + {0x9B90, 0xC35D}, //4696 #HANGUL SYLLABLE SSANGSIOS YAE PIEUP + {0x9B91, 0xC35E}, //4697 #HANGUL SYLLABLE SSANGSIOS YAE PIEUPSIOS + {0x9B92, 0xC35F}, //4698 #HANGUL SYLLABLE SSANGSIOS YAE SIOS + {0x9B93, 0xC360}, //4699 #HANGUL SYLLABLE SSANGSIOS YAE SSANGSIOS + {0x9B94, 0xC361}, //4700 #HANGUL SYLLABLE SSANGSIOS YAE IEUNG + {0x9B95, 0xC362}, //4701 #HANGUL SYLLABLE SSANGSIOS YAE CIEUC + {0x9B96, 0xC363}, //4702 #HANGUL SYLLABLE SSANGSIOS YAE CHIEUCH + {0x9B97, 0xC364}, //4703 #HANGUL SYLLABLE SSANGSIOS YAE KHIEUKH + {0x9B98, 0xC365}, //4704 #HANGUL SYLLABLE SSANGSIOS YAE THIEUTH + {0x9B99, 0xC366}, //4705 #HANGUL SYLLABLE SSANGSIOS YAE PHIEUPH + {0x9B9A, 0xC367}, //4706 #HANGUL SYLLABLE SSANGSIOS YAE HIEUH + {0x9B9B, 0xC36A}, //4707 #HANGUL SYLLABLE SSANGSIOS EO SSANGKIYEOK + {0x9B9C, 0xC36B}, //4708 #HANGUL SYLLABLE SSANGSIOS EO KIYEOKSIOS + {0x9B9D, 0xC36D}, //4709 #HANGUL SYLLABLE SSANGSIOS EO NIEUNCIEUC + {0x9B9E, 0xC36E}, //4710 #HANGUL SYLLABLE SSANGSIOS EO NIEUNHIEUH + {0x9B9F, 0xC36F}, //4711 #HANGUL SYLLABLE SSANGSIOS EO TIKEUT + {0x9BA0, 0xC371}, //4712 #HANGUL SYLLABLE SSANGSIOS EO RIEULKIYEOK + {0x9BA1, 0xC373}, //4713 #HANGUL SYLLABLE SSANGSIOS EO RIEULPIEUP + {0x9BA2, 0xC374}, //4714 #HANGUL SYLLABLE SSANGSIOS EO RIEULSIOS + {0x9BA3, 0xC375}, //4715 #HANGUL SYLLABLE SSANGSIOS EO RIEULTHIEUTH + {0x9BA4, 0xC376}, //4716 #HANGUL SYLLABLE SSANGSIOS EO RIEULPHIEUPH + {0x9BA5, 0xC377}, //4717 #HANGUL SYLLABLE SSANGSIOS EO RIEULHIEUH + {0x9BA6, 0xC37A}, //4718 #HANGUL SYLLABLE SSANGSIOS EO PIEUPSIOS + {0x9BA7, 0xC37B}, //4719 #HANGUL SYLLABLE SSANGSIOS EO SIOS + {0x9BA8, 0xC37E}, //4720 #HANGUL SYLLABLE SSANGSIOS EO CIEUC + {0x9BA9, 0xC37F}, //4721 #HANGUL SYLLABLE SSANGSIOS EO CHIEUCH + {0x9BAA, 0xC380}, //4722 #HANGUL SYLLABLE SSANGSIOS EO KHIEUKH + {0x9BAB, 0xC381}, //4723 #HANGUL SYLLABLE SSANGSIOS EO THIEUTH + {0x9BAC, 0xC382}, //4724 #HANGUL SYLLABLE SSANGSIOS EO PHIEUPH + {0x9BAD, 0xC383}, //4725 #HANGUL SYLLABLE SSANGSIOS EO HIEUH + {0x9BAE, 0xC385}, //4726 #HANGUL SYLLABLE SSANGSIOS E KIYEOK + {0x9BAF, 0xC386}, //4727 #HANGUL SYLLABLE SSANGSIOS E SSANGKIYEOK + {0x9BB0, 0xC387}, //4728 #HANGUL SYLLABLE SSANGSIOS E KIYEOKSIOS + {0x9BB1, 0xC389}, //4729 #HANGUL SYLLABLE SSANGSIOS E NIEUNCIEUC + {0x9BB2, 0xC38A}, //4730 #HANGUL SYLLABLE SSANGSIOS E NIEUNHIEUH + {0x9BB3, 0xC38B}, //4731 #HANGUL SYLLABLE SSANGSIOS E TIKEUT + {0x9BB4, 0xC38D}, //4732 #HANGUL SYLLABLE SSANGSIOS E RIEULKIYEOK + {0x9BB5, 0xC38E}, //4733 #HANGUL SYLLABLE SSANGSIOS E RIEULMIEUM + {0x9BB6, 0xC38F}, //4734 #HANGUL SYLLABLE SSANGSIOS E RIEULPIEUP + {0x9BB7, 0xC390}, //4735 #HANGUL SYLLABLE SSANGSIOS E RIEULSIOS + {0x9BB8, 0xC391}, //4736 #HANGUL SYLLABLE SSANGSIOS E RIEULTHIEUTH + {0x9BB9, 0xC392}, //4737 #HANGUL SYLLABLE SSANGSIOS E RIEULPHIEUPH + {0x9BBA, 0xC393}, //4738 #HANGUL SYLLABLE SSANGSIOS E RIEULHIEUH + {0x9BBB, 0xC394}, //4739 #HANGUL SYLLABLE SSANGSIOS E MIEUM + {0x9BBC, 0xC395}, //4740 #HANGUL SYLLABLE SSANGSIOS E PIEUP + {0x9BBD, 0xC396}, //4741 #HANGUL SYLLABLE SSANGSIOS E PIEUPSIOS + {0x9BBE, 0xC397}, //4742 #HANGUL SYLLABLE SSANGSIOS E SIOS + {0x9BBF, 0xC398}, //4743 #HANGUL SYLLABLE SSANGSIOS E SSANGSIOS + {0x9BC0, 0xC399}, //4744 #HANGUL SYLLABLE SSANGSIOS E IEUNG + {0x9BC1, 0xC39A}, //4745 #HANGUL SYLLABLE SSANGSIOS E CIEUC + {0x9BC2, 0xC39B}, //4746 #HANGUL SYLLABLE SSANGSIOS E CHIEUCH + {0x9BC3, 0xC39C}, //4747 #HANGUL SYLLABLE SSANGSIOS E KHIEUKH + {0x9BC4, 0xC39D}, //4748 #HANGUL SYLLABLE SSANGSIOS E THIEUTH + {0x9BC5, 0xC39E}, //4749 #HANGUL SYLLABLE SSANGSIOS E PHIEUPH + {0x9BC6, 0xC39F}, //4750 #HANGUL SYLLABLE SSANGSIOS E HIEUH + {0x9BC7, 0xC3A0}, //4751 #HANGUL SYLLABLE SSANGSIOS YEO + {0x9BC8, 0xC3A1}, //4752 #HANGUL SYLLABLE SSANGSIOS YEO KIYEOK + {0x9BC9, 0xC3A2}, //4753 #HANGUL SYLLABLE SSANGSIOS YEO SSANGKIYEOK + {0x9BCA, 0xC3A3}, //4754 #HANGUL SYLLABLE SSANGSIOS YEO KIYEOKSIOS + {0x9BCB, 0xC3A4}, //4755 #HANGUL SYLLABLE SSANGSIOS YEO NIEUN + {0x9BCC, 0xC3A5}, //4756 #HANGUL SYLLABLE SSANGSIOS YEO NIEUNCIEUC + {0x9BCD, 0xC3A6}, //4757 #HANGUL SYLLABLE SSANGSIOS YEO NIEUNHIEUH + {0x9BCE, 0xC3A7}, //4758 #HANGUL SYLLABLE SSANGSIOS YEO TIKEUT + {0x9BCF, 0xC3A8}, //4759 #HANGUL SYLLABLE SSANGSIOS YEO RIEUL + {0x9BD0, 0xC3A9}, //4760 #HANGUL SYLLABLE SSANGSIOS YEO RIEULKIYEOK + {0x9BD1, 0xC3AA}, //4761 #HANGUL SYLLABLE SSANGSIOS YEO RIEULMIEUM + {0x9BD2, 0xC3AB}, //4762 #HANGUL SYLLABLE SSANGSIOS YEO RIEULPIEUP + {0x9BD3, 0xC3AC}, //4763 #HANGUL SYLLABLE SSANGSIOS YEO RIEULSIOS + {0x9BD4, 0xC3AD}, //4764 #HANGUL SYLLABLE SSANGSIOS YEO RIEULTHIEUTH + {0x9BD5, 0xC3AE}, //4765 #HANGUL SYLLABLE SSANGSIOS YEO RIEULPHIEUPH + {0x9BD6, 0xC3AF}, //4766 #HANGUL SYLLABLE SSANGSIOS YEO RIEULHIEUH + {0x9BD7, 0xC3B0}, //4767 #HANGUL SYLLABLE SSANGSIOS YEO MIEUM + {0x9BD8, 0xC3B1}, //4768 #HANGUL SYLLABLE SSANGSIOS YEO PIEUP + {0x9BD9, 0xC3B2}, //4769 #HANGUL SYLLABLE SSANGSIOS YEO PIEUPSIOS + {0x9BDA, 0xC3B3}, //4770 #HANGUL SYLLABLE SSANGSIOS YEO SIOS + {0x9BDB, 0xC3B4}, //4771 #HANGUL SYLLABLE SSANGSIOS YEO SSANGSIOS + {0x9BDC, 0xC3B5}, //4772 #HANGUL SYLLABLE SSANGSIOS YEO IEUNG + {0x9BDD, 0xC3B6}, //4773 #HANGUL SYLLABLE SSANGSIOS YEO CIEUC + {0x9BDE, 0xC3B7}, //4774 #HANGUL SYLLABLE SSANGSIOS YEO CHIEUCH + {0x9BDF, 0xC3B8}, //4775 #HANGUL SYLLABLE SSANGSIOS YEO KHIEUKH + {0x9BE0, 0xC3B9}, //4776 #HANGUL SYLLABLE SSANGSIOS YEO THIEUTH + {0x9BE1, 0xC3BA}, //4777 #HANGUL SYLLABLE SSANGSIOS YEO PHIEUPH + {0x9BE2, 0xC3BB}, //4778 #HANGUL SYLLABLE SSANGSIOS YEO HIEUH + {0x9BE3, 0xC3BC}, //4779 #HANGUL SYLLABLE SSANGSIOS YE + {0x9BE4, 0xC3BD}, //4780 #HANGUL SYLLABLE SSANGSIOS YE KIYEOK + {0x9BE5, 0xC3BE}, //4781 #HANGUL SYLLABLE SSANGSIOS YE SSANGKIYEOK + {0x9BE6, 0xC3BF}, //4782 #HANGUL SYLLABLE SSANGSIOS YE KIYEOKSIOS + {0x9BE7, 0xC3C1}, //4783 #HANGUL SYLLABLE SSANGSIOS YE NIEUNCIEUC + {0x9BE8, 0xC3C2}, //4784 #HANGUL SYLLABLE SSANGSIOS YE NIEUNHIEUH + {0x9BE9, 0xC3C3}, //4785 #HANGUL SYLLABLE SSANGSIOS YE TIKEUT + {0x9BEA, 0xC3C4}, //4786 #HANGUL SYLLABLE SSANGSIOS YE RIEUL + {0x9BEB, 0xC3C5}, //4787 #HANGUL SYLLABLE SSANGSIOS YE RIEULKIYEOK + {0x9BEC, 0xC3C6}, //4788 #HANGUL SYLLABLE SSANGSIOS YE RIEULMIEUM + {0x9BED, 0xC3C7}, //4789 #HANGUL SYLLABLE SSANGSIOS YE RIEULPIEUP + {0x9BEE, 0xC3C8}, //4790 #HANGUL SYLLABLE SSANGSIOS YE RIEULSIOS + {0x9BEF, 0xC3C9}, //4791 #HANGUL SYLLABLE SSANGSIOS YE RIEULTHIEUTH + {0x9BF0, 0xC3CA}, //4792 #HANGUL SYLLABLE SSANGSIOS YE RIEULPHIEUPH + {0x9BF1, 0xC3CB}, //4793 #HANGUL SYLLABLE SSANGSIOS YE RIEULHIEUH + {0x9BF2, 0xC3CC}, //4794 #HANGUL SYLLABLE SSANGSIOS YE MIEUM + {0x9BF3, 0xC3CD}, //4795 #HANGUL SYLLABLE SSANGSIOS YE PIEUP + {0x9BF4, 0xC3CE}, //4796 #HANGUL SYLLABLE SSANGSIOS YE PIEUPSIOS + {0x9BF5, 0xC3CF}, //4797 #HANGUL SYLLABLE SSANGSIOS YE SIOS + {0x9BF6, 0xC3D0}, //4798 #HANGUL SYLLABLE SSANGSIOS YE SSANGSIOS + {0x9BF7, 0xC3D1}, //4799 #HANGUL SYLLABLE SSANGSIOS YE IEUNG + {0x9BF8, 0xC3D2}, //4800 #HANGUL SYLLABLE SSANGSIOS YE CIEUC + {0x9BF9, 0xC3D3}, //4801 #HANGUL SYLLABLE SSANGSIOS YE CHIEUCH + {0x9BFA, 0xC3D4}, //4802 #HANGUL SYLLABLE SSANGSIOS YE KHIEUKH + {0x9BFB, 0xC3D5}, //4803 #HANGUL SYLLABLE SSANGSIOS YE THIEUTH + {0x9BFC, 0xC3D6}, //4804 #HANGUL SYLLABLE SSANGSIOS YE PHIEUPH + {0x9BFD, 0xC3D7}, //4805 #HANGUL SYLLABLE SSANGSIOS YE HIEUH + {0x9BFE, 0xC3DA}, //4806 #HANGUL SYLLABLE SSANGSIOS O SSANGKIYEOK + {0x9C41, 0xC3DB}, //4807 #HANGUL SYLLABLE SSANGSIOS O KIYEOKSIOS + {0x9C42, 0xC3DD}, //4808 #HANGUL SYLLABLE SSANGSIOS O NIEUNCIEUC + {0x9C43, 0xC3DE}, //4809 #HANGUL SYLLABLE SSANGSIOS O NIEUNHIEUH + {0x9C44, 0xC3E1}, //4810 #HANGUL SYLLABLE SSANGSIOS O RIEULKIYEOK + {0x9C45, 0xC3E3}, //4811 #HANGUL SYLLABLE SSANGSIOS O RIEULPIEUP + {0x9C46, 0xC3E4}, //4812 #HANGUL SYLLABLE SSANGSIOS O RIEULSIOS + {0x9C47, 0xC3E5}, //4813 #HANGUL SYLLABLE SSANGSIOS O RIEULTHIEUTH + {0x9C48, 0xC3E6}, //4814 #HANGUL SYLLABLE SSANGSIOS O RIEULPHIEUPH + {0x9C49, 0xC3E7}, //4815 #HANGUL SYLLABLE SSANGSIOS O RIEULHIEUH + {0x9C4A, 0xC3EA}, //4816 #HANGUL SYLLABLE SSANGSIOS O PIEUPSIOS + {0x9C4B, 0xC3EB}, //4817 #HANGUL SYLLABLE SSANGSIOS O SIOS + {0x9C4C, 0xC3EC}, //4818 #HANGUL SYLLABLE SSANGSIOS O SSANGSIOS + {0x9C4D, 0xC3EE}, //4819 #HANGUL SYLLABLE SSANGSIOS O CIEUC + {0x9C4E, 0xC3EF}, //4820 #HANGUL SYLLABLE SSANGSIOS O CHIEUCH + {0x9C4F, 0xC3F0}, //4821 #HANGUL SYLLABLE SSANGSIOS O KHIEUKH + {0x9C50, 0xC3F1}, //4822 #HANGUL SYLLABLE SSANGSIOS O THIEUTH + {0x9C51, 0xC3F2}, //4823 #HANGUL SYLLABLE SSANGSIOS O PHIEUPH + {0x9C52, 0xC3F3}, //4824 #HANGUL SYLLABLE SSANGSIOS O HIEUH + {0x9C53, 0xC3F6}, //4825 #HANGUL SYLLABLE SSANGSIOS WA SSANGKIYEOK + {0x9C54, 0xC3F7}, //4826 #HANGUL SYLLABLE SSANGSIOS WA KIYEOKSIOS + {0x9C55, 0xC3F9}, //4827 #HANGUL SYLLABLE SSANGSIOS WA NIEUNCIEUC + {0x9C56, 0xC3FA}, //4828 #HANGUL SYLLABLE SSANGSIOS WA NIEUNHIEUH + {0x9C57, 0xC3FB}, //4829 #HANGUL SYLLABLE SSANGSIOS WA TIKEUT + {0x9C58, 0xC3FC}, //4830 #HANGUL SYLLABLE SSANGSIOS WA RIEUL + {0x9C59, 0xC3FD}, //4831 #HANGUL SYLLABLE SSANGSIOS WA RIEULKIYEOK + {0x9C5A, 0xC3FE}, //4832 #HANGUL SYLLABLE SSANGSIOS WA RIEULMIEUM + {0x9C61, 0xC3FF}, //4833 #HANGUL SYLLABLE SSANGSIOS WA RIEULPIEUP + {0x9C62, 0xC400}, //4834 #HANGUL SYLLABLE SSANGSIOS WA RIEULSIOS + {0x9C63, 0xC401}, //4835 #HANGUL SYLLABLE SSANGSIOS WA RIEULTHIEUTH + {0x9C64, 0xC402}, //4836 #HANGUL SYLLABLE SSANGSIOS WA RIEULPHIEUPH + {0x9C65, 0xC403}, //4837 #HANGUL SYLLABLE SSANGSIOS WA RIEULHIEUH + {0x9C66, 0xC404}, //4838 #HANGUL SYLLABLE SSANGSIOS WA MIEUM + {0x9C67, 0xC405}, //4839 #HANGUL SYLLABLE SSANGSIOS WA PIEUP + {0x9C68, 0xC406}, //4840 #HANGUL SYLLABLE SSANGSIOS WA PIEUPSIOS + {0x9C69, 0xC407}, //4841 #HANGUL SYLLABLE SSANGSIOS WA SIOS + {0x9C6A, 0xC409}, //4842 #HANGUL SYLLABLE SSANGSIOS WA IEUNG + {0x9C6B, 0xC40A}, //4843 #HANGUL SYLLABLE SSANGSIOS WA CIEUC + {0x9C6C, 0xC40B}, //4844 #HANGUL SYLLABLE SSANGSIOS WA CHIEUCH + {0x9C6D, 0xC40C}, //4845 #HANGUL SYLLABLE SSANGSIOS WA KHIEUKH + {0x9C6E, 0xC40D}, //4846 #HANGUL SYLLABLE SSANGSIOS WA THIEUTH + {0x9C6F, 0xC40E}, //4847 #HANGUL SYLLABLE SSANGSIOS WA PHIEUPH + {0x9C70, 0xC40F}, //4848 #HANGUL SYLLABLE SSANGSIOS WA HIEUH + {0x9C71, 0xC411}, //4849 #HANGUL SYLLABLE SSANGSIOS WAE KIYEOK + {0x9C72, 0xC412}, //4850 #HANGUL SYLLABLE SSANGSIOS WAE SSANGKIYEOK + {0x9C73, 0xC413}, //4851 #HANGUL SYLLABLE SSANGSIOS WAE KIYEOKSIOS + {0x9C74, 0xC414}, //4852 #HANGUL SYLLABLE SSANGSIOS WAE NIEUN + {0x9C75, 0xC415}, //4853 #HANGUL SYLLABLE SSANGSIOS WAE NIEUNCIEUC + {0x9C76, 0xC416}, //4854 #HANGUL SYLLABLE SSANGSIOS WAE NIEUNHIEUH + {0x9C77, 0xC417}, //4855 #HANGUL SYLLABLE SSANGSIOS WAE TIKEUT + {0x9C78, 0xC418}, //4856 #HANGUL SYLLABLE SSANGSIOS WAE RIEUL + {0x9C79, 0xC419}, //4857 #HANGUL SYLLABLE SSANGSIOS WAE RIEULKIYEOK + {0x9C7A, 0xC41A}, //4858 #HANGUL SYLLABLE SSANGSIOS WAE RIEULMIEUM + {0x9C81, 0xC41B}, //4859 #HANGUL SYLLABLE SSANGSIOS WAE RIEULPIEUP + {0x9C82, 0xC41C}, //4860 #HANGUL SYLLABLE SSANGSIOS WAE RIEULSIOS + {0x9C83, 0xC41D}, //4861 #HANGUL SYLLABLE SSANGSIOS WAE RIEULTHIEUTH + {0x9C84, 0xC41E}, //4862 #HANGUL SYLLABLE SSANGSIOS WAE RIEULPHIEUPH + {0x9C85, 0xC41F}, //4863 #HANGUL SYLLABLE SSANGSIOS WAE RIEULHIEUH + {0x9C86, 0xC420}, //4864 #HANGUL SYLLABLE SSANGSIOS WAE MIEUM + {0x9C87, 0xC421}, //4865 #HANGUL SYLLABLE SSANGSIOS WAE PIEUP + {0x9C88, 0xC422}, //4866 #HANGUL SYLLABLE SSANGSIOS WAE PIEUPSIOS + {0x9C89, 0xC423}, //4867 #HANGUL SYLLABLE SSANGSIOS WAE SIOS + {0x9C8A, 0xC425}, //4868 #HANGUL SYLLABLE SSANGSIOS WAE IEUNG + {0x9C8B, 0xC426}, //4869 #HANGUL SYLLABLE SSANGSIOS WAE CIEUC + {0x9C8C, 0xC427}, //4870 #HANGUL SYLLABLE SSANGSIOS WAE CHIEUCH + {0x9C8D, 0xC428}, //4871 #HANGUL SYLLABLE SSANGSIOS WAE KHIEUKH + {0x9C8E, 0xC429}, //4872 #HANGUL SYLLABLE SSANGSIOS WAE THIEUTH + {0x9C8F, 0xC42A}, //4873 #HANGUL SYLLABLE SSANGSIOS WAE PHIEUPH + {0x9C90, 0xC42B}, //4874 #HANGUL SYLLABLE SSANGSIOS WAE HIEUH + {0x9C91, 0xC42D}, //4875 #HANGUL SYLLABLE SSANGSIOS OE KIYEOK + {0x9C92, 0xC42E}, //4876 #HANGUL SYLLABLE SSANGSIOS OE SSANGKIYEOK + {0x9C93, 0xC42F}, //4877 #HANGUL SYLLABLE SSANGSIOS OE KIYEOKSIOS + {0x9C94, 0xC431}, //4878 #HANGUL SYLLABLE SSANGSIOS OE NIEUNCIEUC + {0x9C95, 0xC432}, //4879 #HANGUL SYLLABLE SSANGSIOS OE NIEUNHIEUH + {0x9C96, 0xC433}, //4880 #HANGUL SYLLABLE SSANGSIOS OE TIKEUT + {0x9C97, 0xC435}, //4881 #HANGUL SYLLABLE SSANGSIOS OE RIEULKIYEOK + {0x9C98, 0xC436}, //4882 #HANGUL SYLLABLE SSANGSIOS OE RIEULMIEUM + {0x9C99, 0xC437}, //4883 #HANGUL SYLLABLE SSANGSIOS OE RIEULPIEUP + {0x9C9A, 0xC438}, //4884 #HANGUL SYLLABLE SSANGSIOS OE RIEULSIOS + {0x9C9B, 0xC439}, //4885 #HANGUL SYLLABLE SSANGSIOS OE RIEULTHIEUTH + {0x9C9C, 0xC43A}, //4886 #HANGUL SYLLABLE SSANGSIOS OE RIEULPHIEUPH + {0x9C9D, 0xC43B}, //4887 #HANGUL SYLLABLE SSANGSIOS OE RIEULHIEUH + {0x9C9E, 0xC43E}, //4888 #HANGUL SYLLABLE SSANGSIOS OE PIEUPSIOS + {0x9C9F, 0xC43F}, //4889 #HANGUL SYLLABLE SSANGSIOS OE SIOS + {0x9CA0, 0xC440}, //4890 #HANGUL SYLLABLE SSANGSIOS OE SSANGSIOS + {0x9CA1, 0xC441}, //4891 #HANGUL SYLLABLE SSANGSIOS OE IEUNG + {0x9CA2, 0xC442}, //4892 #HANGUL SYLLABLE SSANGSIOS OE CIEUC + {0x9CA3, 0xC443}, //4893 #HANGUL SYLLABLE SSANGSIOS OE CHIEUCH + {0x9CA4, 0xC444}, //4894 #HANGUL SYLLABLE SSANGSIOS OE KHIEUKH + {0x9CA5, 0xC445}, //4895 #HANGUL SYLLABLE SSANGSIOS OE THIEUTH + {0x9CA6, 0xC446}, //4896 #HANGUL SYLLABLE SSANGSIOS OE PHIEUPH + {0x9CA7, 0xC447}, //4897 #HANGUL SYLLABLE SSANGSIOS OE HIEUH + {0x9CA8, 0xC449}, //4898 #HANGUL SYLLABLE SSANGSIOS YO KIYEOK + {0x9CA9, 0xC44A}, //4899 #HANGUL SYLLABLE SSANGSIOS YO SSANGKIYEOK + {0x9CAA, 0xC44B}, //4900 #HANGUL SYLLABLE SSANGSIOS YO KIYEOKSIOS + {0x9CAB, 0xC44C}, //4901 #HANGUL SYLLABLE SSANGSIOS YO NIEUN + {0x9CAC, 0xC44D}, //4902 #HANGUL SYLLABLE SSANGSIOS YO NIEUNCIEUC + {0x9CAD, 0xC44E}, //4903 #HANGUL SYLLABLE SSANGSIOS YO NIEUNHIEUH + {0x9CAE, 0xC44F}, //4904 #HANGUL SYLLABLE SSANGSIOS YO TIKEUT + {0x9CAF, 0xC450}, //4905 #HANGUL SYLLABLE SSANGSIOS YO RIEUL + {0x9CB0, 0xC451}, //4906 #HANGUL SYLLABLE SSANGSIOS YO RIEULKIYEOK + {0x9CB1, 0xC452}, //4907 #HANGUL SYLLABLE SSANGSIOS YO RIEULMIEUM + {0x9CB2, 0xC453}, //4908 #HANGUL SYLLABLE SSANGSIOS YO RIEULPIEUP + {0x9CB3, 0xC454}, //4909 #HANGUL SYLLABLE SSANGSIOS YO RIEULSIOS + {0x9CB4, 0xC455}, //4910 #HANGUL SYLLABLE SSANGSIOS YO RIEULTHIEUTH + {0x9CB5, 0xC456}, //4911 #HANGUL SYLLABLE SSANGSIOS YO RIEULPHIEUPH + {0x9CB6, 0xC457}, //4912 #HANGUL SYLLABLE SSANGSIOS YO RIEULHIEUH + {0x9CB7, 0xC458}, //4913 #HANGUL SYLLABLE SSANGSIOS YO MIEUM + {0x9CB8, 0xC459}, //4914 #HANGUL SYLLABLE SSANGSIOS YO PIEUP + {0x9CB9, 0xC45A}, //4915 #HANGUL SYLLABLE SSANGSIOS YO PIEUPSIOS + {0x9CBA, 0xC45B}, //4916 #HANGUL SYLLABLE SSANGSIOS YO SIOS + {0x9CBB, 0xC45C}, //4917 #HANGUL SYLLABLE SSANGSIOS YO SSANGSIOS + {0x9CBC, 0xC45D}, //4918 #HANGUL SYLLABLE SSANGSIOS YO IEUNG + {0x9CBD, 0xC45E}, //4919 #HANGUL SYLLABLE SSANGSIOS YO CIEUC + {0x9CBE, 0xC45F}, //4920 #HANGUL SYLLABLE SSANGSIOS YO CHIEUCH + {0x9CBF, 0xC460}, //4921 #HANGUL SYLLABLE SSANGSIOS YO KHIEUKH + {0x9CC0, 0xC461}, //4922 #HANGUL SYLLABLE SSANGSIOS YO THIEUTH + {0x9CC1, 0xC462}, //4923 #HANGUL SYLLABLE SSANGSIOS YO PHIEUPH + {0x9CC2, 0xC463}, //4924 #HANGUL SYLLABLE SSANGSIOS YO HIEUH + {0x9CC3, 0xC466}, //4925 #HANGUL SYLLABLE SSANGSIOS U SSANGKIYEOK + {0x9CC4, 0xC467}, //4926 #HANGUL SYLLABLE SSANGSIOS U KIYEOKSIOS + {0x9CC5, 0xC469}, //4927 #HANGUL SYLLABLE SSANGSIOS U NIEUNCIEUC + {0x9CC6, 0xC46A}, //4928 #HANGUL SYLLABLE SSANGSIOS U NIEUNHIEUH + {0x9CC7, 0xC46B}, //4929 #HANGUL SYLLABLE SSANGSIOS U TIKEUT + {0x9CC8, 0xC46D}, //4930 #HANGUL SYLLABLE SSANGSIOS U RIEULKIYEOK + {0x9CC9, 0xC46E}, //4931 #HANGUL SYLLABLE SSANGSIOS U RIEULMIEUM + {0x9CCA, 0xC46F}, //4932 #HANGUL SYLLABLE SSANGSIOS U RIEULPIEUP + {0x9CCB, 0xC470}, //4933 #HANGUL SYLLABLE SSANGSIOS U RIEULSIOS + {0x9CCC, 0xC471}, //4934 #HANGUL SYLLABLE SSANGSIOS U RIEULTHIEUTH + {0x9CCD, 0xC472}, //4935 #HANGUL SYLLABLE SSANGSIOS U RIEULPHIEUPH + {0x9CCE, 0xC473}, //4936 #HANGUL SYLLABLE SSANGSIOS U RIEULHIEUH + {0x9CCF, 0xC476}, //4937 #HANGUL SYLLABLE SSANGSIOS U PIEUPSIOS + {0x9CD0, 0xC477}, //4938 #HANGUL SYLLABLE SSANGSIOS U SIOS + {0x9CD1, 0xC478}, //4939 #HANGUL SYLLABLE SSANGSIOS U SSANGSIOS + {0x9CD2, 0xC47A}, //4940 #HANGUL SYLLABLE SSANGSIOS U CIEUC + {0x9CD3, 0xC47B}, //4941 #HANGUL SYLLABLE SSANGSIOS U CHIEUCH + {0x9CD4, 0xC47C}, //4942 #HANGUL SYLLABLE SSANGSIOS U KHIEUKH + {0x9CD5, 0xC47D}, //4943 #HANGUL SYLLABLE SSANGSIOS U THIEUTH + {0x9CD6, 0xC47E}, //4944 #HANGUL SYLLABLE SSANGSIOS U PHIEUPH + {0x9CD7, 0xC47F}, //4945 #HANGUL SYLLABLE SSANGSIOS U HIEUH + {0x9CD8, 0xC481}, //4946 #HANGUL SYLLABLE SSANGSIOS WEO KIYEOK + {0x9CD9, 0xC482}, //4947 #HANGUL SYLLABLE SSANGSIOS WEO SSANGKIYEOK + {0x9CDA, 0xC483}, //4948 #HANGUL SYLLABLE SSANGSIOS WEO KIYEOKSIOS + {0x9CDB, 0xC484}, //4949 #HANGUL SYLLABLE SSANGSIOS WEO NIEUN + {0x9CDC, 0xC485}, //4950 #HANGUL SYLLABLE SSANGSIOS WEO NIEUNCIEUC + {0x9CDD, 0xC486}, //4951 #HANGUL SYLLABLE SSANGSIOS WEO NIEUNHIEUH + {0x9CDE, 0xC487}, //4952 #HANGUL SYLLABLE SSANGSIOS WEO TIKEUT + {0x9CDF, 0xC488}, //4953 #HANGUL SYLLABLE SSANGSIOS WEO RIEUL + {0x9CE0, 0xC489}, //4954 #HANGUL SYLLABLE SSANGSIOS WEO RIEULKIYEOK + {0x9CE1, 0xC48A}, //4955 #HANGUL SYLLABLE SSANGSIOS WEO RIEULMIEUM + {0x9CE2, 0xC48B}, //4956 #HANGUL SYLLABLE SSANGSIOS WEO RIEULPIEUP + {0x9CE3, 0xC48C}, //4957 #HANGUL SYLLABLE SSANGSIOS WEO RIEULSIOS + {0x9CE4, 0xC48D}, //4958 #HANGUL SYLLABLE SSANGSIOS WEO RIEULTHIEUTH + {0x9CE5, 0xC48E}, //4959 #HANGUL SYLLABLE SSANGSIOS WEO RIEULPHIEUPH + {0x9CE6, 0xC48F}, //4960 #HANGUL SYLLABLE SSANGSIOS WEO RIEULHIEUH + {0x9CE7, 0xC490}, //4961 #HANGUL SYLLABLE SSANGSIOS WEO MIEUM + {0x9CE8, 0xC491}, //4962 #HANGUL SYLLABLE SSANGSIOS WEO PIEUP + {0x9CE9, 0xC492}, //4963 #HANGUL SYLLABLE SSANGSIOS WEO PIEUPSIOS + {0x9CEA, 0xC493}, //4964 #HANGUL SYLLABLE SSANGSIOS WEO SIOS + {0x9CEB, 0xC495}, //4965 #HANGUL SYLLABLE SSANGSIOS WEO IEUNG + {0x9CEC, 0xC496}, //4966 #HANGUL SYLLABLE SSANGSIOS WEO CIEUC + {0x9CED, 0xC497}, //4967 #HANGUL SYLLABLE SSANGSIOS WEO CHIEUCH + {0x9CEE, 0xC498}, //4968 #HANGUL SYLLABLE SSANGSIOS WEO KHIEUKH + {0x9CEF, 0xC499}, //4969 #HANGUL SYLLABLE SSANGSIOS WEO THIEUTH + {0x9CF0, 0xC49A}, //4970 #HANGUL SYLLABLE SSANGSIOS WEO PHIEUPH + {0x9CF1, 0xC49B}, //4971 #HANGUL SYLLABLE SSANGSIOS WEO HIEUH + {0x9CF2, 0xC49D}, //4972 #HANGUL SYLLABLE SSANGSIOS WE KIYEOK + {0x9CF3, 0xC49E}, //4973 #HANGUL SYLLABLE SSANGSIOS WE SSANGKIYEOK + {0x9CF4, 0xC49F}, //4974 #HANGUL SYLLABLE SSANGSIOS WE KIYEOKSIOS + {0x9CF5, 0xC4A0}, //4975 #HANGUL SYLLABLE SSANGSIOS WE NIEUN + {0x9CF6, 0xC4A1}, //4976 #HANGUL SYLLABLE SSANGSIOS WE NIEUNCIEUC + {0x9CF7, 0xC4A2}, //4977 #HANGUL SYLLABLE SSANGSIOS WE NIEUNHIEUH + {0x9CF8, 0xC4A3}, //4978 #HANGUL SYLLABLE SSANGSIOS WE TIKEUT + {0x9CF9, 0xC4A4}, //4979 #HANGUL SYLLABLE SSANGSIOS WE RIEUL + {0x9CFA, 0xC4A5}, //4980 #HANGUL SYLLABLE SSANGSIOS WE RIEULKIYEOK + {0x9CFB, 0xC4A6}, //4981 #HANGUL SYLLABLE SSANGSIOS WE RIEULMIEUM + {0x9CFC, 0xC4A7}, //4982 #HANGUL SYLLABLE SSANGSIOS WE RIEULPIEUP + {0x9CFD, 0xC4A8}, //4983 #HANGUL SYLLABLE SSANGSIOS WE RIEULSIOS + {0x9CFE, 0xC4A9}, //4984 #HANGUL SYLLABLE SSANGSIOS WE RIEULTHIEUTH + {0x9D41, 0xC4AA}, //4985 #HANGUL SYLLABLE SSANGSIOS WE RIEULPHIEUPH + {0x9D42, 0xC4AB}, //4986 #HANGUL SYLLABLE SSANGSIOS WE RIEULHIEUH + {0x9D43, 0xC4AC}, //4987 #HANGUL SYLLABLE SSANGSIOS WE MIEUM + {0x9D44, 0xC4AD}, //4988 #HANGUL SYLLABLE SSANGSIOS WE PIEUP + {0x9D45, 0xC4AE}, //4989 #HANGUL SYLLABLE SSANGSIOS WE PIEUPSIOS + {0x9D46, 0xC4AF}, //4990 #HANGUL SYLLABLE SSANGSIOS WE SIOS + {0x9D47, 0xC4B0}, //4991 #HANGUL SYLLABLE SSANGSIOS WE SSANGSIOS + {0x9D48, 0xC4B1}, //4992 #HANGUL SYLLABLE SSANGSIOS WE IEUNG + {0x9D49, 0xC4B2}, //4993 #HANGUL SYLLABLE SSANGSIOS WE CIEUC + {0x9D4A, 0xC4B3}, //4994 #HANGUL SYLLABLE SSANGSIOS WE CHIEUCH + {0x9D4B, 0xC4B4}, //4995 #HANGUL SYLLABLE SSANGSIOS WE KHIEUKH + {0x9D4C, 0xC4B5}, //4996 #HANGUL SYLLABLE SSANGSIOS WE THIEUTH + {0x9D4D, 0xC4B6}, //4997 #HANGUL SYLLABLE SSANGSIOS WE PHIEUPH + {0x9D4E, 0xC4B7}, //4998 #HANGUL SYLLABLE SSANGSIOS WE HIEUH + {0x9D4F, 0xC4B9}, //4999 #HANGUL SYLLABLE SSANGSIOS WI KIYEOK + {0x9D50, 0xC4BA}, //5000 #HANGUL SYLLABLE SSANGSIOS WI SSANGKIYEOK + {0x9D51, 0xC4BB}, //5001 #HANGUL SYLLABLE SSANGSIOS WI KIYEOKSIOS + {0x9D52, 0xC4BD}, //5002 #HANGUL SYLLABLE SSANGSIOS WI NIEUNCIEUC + {0x9D53, 0xC4BE}, //5003 #HANGUL SYLLABLE SSANGSIOS WI NIEUNHIEUH + {0x9D54, 0xC4BF}, //5004 #HANGUL SYLLABLE SSANGSIOS WI TIKEUT + {0x9D55, 0xC4C0}, //5005 #HANGUL SYLLABLE SSANGSIOS WI RIEUL + {0x9D56, 0xC4C1}, //5006 #HANGUL SYLLABLE SSANGSIOS WI RIEULKIYEOK + {0x9D57, 0xC4C2}, //5007 #HANGUL SYLLABLE SSANGSIOS WI RIEULMIEUM + {0x9D58, 0xC4C3}, //5008 #HANGUL SYLLABLE SSANGSIOS WI RIEULPIEUP + {0x9D59, 0xC4C4}, //5009 #HANGUL SYLLABLE SSANGSIOS WI RIEULSIOS + {0x9D5A, 0xC4C5}, //5010 #HANGUL SYLLABLE SSANGSIOS WI RIEULTHIEUTH + {0x9D61, 0xC4C6}, //5011 #HANGUL SYLLABLE SSANGSIOS WI RIEULPHIEUPH + {0x9D62, 0xC4C7}, //5012 #HANGUL SYLLABLE SSANGSIOS WI RIEULHIEUH + {0x9D63, 0xC4C8}, //5013 #HANGUL SYLLABLE SSANGSIOS WI MIEUM + {0x9D64, 0xC4C9}, //5014 #HANGUL SYLLABLE SSANGSIOS WI PIEUP + {0x9D65, 0xC4CA}, //5015 #HANGUL SYLLABLE SSANGSIOS WI PIEUPSIOS + {0x9D66, 0xC4CB}, //5016 #HANGUL SYLLABLE SSANGSIOS WI SIOS + {0x9D67, 0xC4CC}, //5017 #HANGUL SYLLABLE SSANGSIOS WI SSANGSIOS + {0x9D68, 0xC4CD}, //5018 #HANGUL SYLLABLE SSANGSIOS WI IEUNG + {0x9D69, 0xC4CE}, //5019 #HANGUL SYLLABLE SSANGSIOS WI CIEUC + {0x9D6A, 0xC4CF}, //5020 #HANGUL SYLLABLE SSANGSIOS WI CHIEUCH + {0x9D6B, 0xC4D0}, //5021 #HANGUL SYLLABLE SSANGSIOS WI KHIEUKH + {0x9D6C, 0xC4D1}, //5022 #HANGUL SYLLABLE SSANGSIOS WI THIEUTH + {0x9D6D, 0xC4D2}, //5023 #HANGUL SYLLABLE SSANGSIOS WI PHIEUPH + {0x9D6E, 0xC4D3}, //5024 #HANGUL SYLLABLE SSANGSIOS WI HIEUH + {0x9D6F, 0xC4D4}, //5025 #HANGUL SYLLABLE SSANGSIOS YU + {0x9D70, 0xC4D5}, //5026 #HANGUL SYLLABLE SSANGSIOS YU KIYEOK + {0x9D71, 0xC4D6}, //5027 #HANGUL SYLLABLE SSANGSIOS YU SSANGKIYEOK + {0x9D72, 0xC4D7}, //5028 #HANGUL SYLLABLE SSANGSIOS YU KIYEOKSIOS + {0x9D73, 0xC4D8}, //5029 #HANGUL SYLLABLE SSANGSIOS YU NIEUN + {0x9D74, 0xC4D9}, //5030 #HANGUL SYLLABLE SSANGSIOS YU NIEUNCIEUC + {0x9D75, 0xC4DA}, //5031 #HANGUL SYLLABLE SSANGSIOS YU NIEUNHIEUH + {0x9D76, 0xC4DB}, //5032 #HANGUL SYLLABLE SSANGSIOS YU TIKEUT + {0x9D77, 0xC4DC}, //5033 #HANGUL SYLLABLE SSANGSIOS YU RIEUL + {0x9D78, 0xC4DD}, //5034 #HANGUL SYLLABLE SSANGSIOS YU RIEULKIYEOK + {0x9D79, 0xC4DE}, //5035 #HANGUL SYLLABLE SSANGSIOS YU RIEULMIEUM + {0x9D7A, 0xC4DF}, //5036 #HANGUL SYLLABLE SSANGSIOS YU RIEULPIEUP + {0x9D81, 0xC4E0}, //5037 #HANGUL SYLLABLE SSANGSIOS YU RIEULSIOS + {0x9D82, 0xC4E1}, //5038 #HANGUL SYLLABLE SSANGSIOS YU RIEULTHIEUTH + {0x9D83, 0xC4E2}, //5039 #HANGUL SYLLABLE SSANGSIOS YU RIEULPHIEUPH + {0x9D84, 0xC4E3}, //5040 #HANGUL SYLLABLE SSANGSIOS YU RIEULHIEUH + {0x9D85, 0xC4E4}, //5041 #HANGUL SYLLABLE SSANGSIOS YU MIEUM + {0x9D86, 0xC4E5}, //5042 #HANGUL SYLLABLE SSANGSIOS YU PIEUP + {0x9D87, 0xC4E6}, //5043 #HANGUL SYLLABLE SSANGSIOS YU PIEUPSIOS + {0x9D88, 0xC4E7}, //5044 #HANGUL SYLLABLE SSANGSIOS YU SIOS + {0x9D89, 0xC4E8}, //5045 #HANGUL SYLLABLE SSANGSIOS YU SSANGSIOS + {0x9D8A, 0xC4EA}, //5046 #HANGUL SYLLABLE SSANGSIOS YU CIEUC + {0x9D8B, 0xC4EB}, //5047 #HANGUL SYLLABLE SSANGSIOS YU CHIEUCH + {0x9D8C, 0xC4EC}, //5048 #HANGUL SYLLABLE SSANGSIOS YU KHIEUKH + {0x9D8D, 0xC4ED}, //5049 #HANGUL SYLLABLE SSANGSIOS YU THIEUTH + {0x9D8E, 0xC4EE}, //5050 #HANGUL SYLLABLE SSANGSIOS YU PHIEUPH + {0x9D8F, 0xC4EF}, //5051 #HANGUL SYLLABLE SSANGSIOS YU HIEUH + {0x9D90, 0xC4F2}, //5052 #HANGUL SYLLABLE SSANGSIOS EU SSANGKIYEOK + {0x9D91, 0xC4F3}, //5053 #HANGUL SYLLABLE SSANGSIOS EU KIYEOKSIOS + {0x9D92, 0xC4F5}, //5054 #HANGUL SYLLABLE SSANGSIOS EU NIEUNCIEUC + {0x9D93, 0xC4F6}, //5055 #HANGUL SYLLABLE SSANGSIOS EU NIEUNHIEUH + {0x9D94, 0xC4F7}, //5056 #HANGUL SYLLABLE SSANGSIOS EU TIKEUT + {0x9D95, 0xC4F9}, //5057 #HANGUL SYLLABLE SSANGSIOS EU RIEULKIYEOK + {0x9D96, 0xC4FB}, //5058 #HANGUL SYLLABLE SSANGSIOS EU RIEULPIEUP + {0x9D97, 0xC4FC}, //5059 #HANGUL SYLLABLE SSANGSIOS EU RIEULSIOS + {0x9D98, 0xC4FD}, //5060 #HANGUL SYLLABLE SSANGSIOS EU RIEULTHIEUTH + {0x9D99, 0xC4FE}, //5061 #HANGUL SYLLABLE SSANGSIOS EU RIEULPHIEUPH + {0x9D9A, 0xC502}, //5062 #HANGUL SYLLABLE SSANGSIOS EU PIEUPSIOS + {0x9D9B, 0xC503}, //5063 #HANGUL SYLLABLE SSANGSIOS EU SIOS + {0x9D9C, 0xC504}, //5064 #HANGUL SYLLABLE SSANGSIOS EU SSANGSIOS + {0x9D9D, 0xC505}, //5065 #HANGUL SYLLABLE SSANGSIOS EU IEUNG + {0x9D9E, 0xC506}, //5066 #HANGUL SYLLABLE SSANGSIOS EU CIEUC + {0x9D9F, 0xC507}, //5067 #HANGUL SYLLABLE SSANGSIOS EU CHIEUCH + {0x9DA0, 0xC508}, //5068 #HANGUL SYLLABLE SSANGSIOS EU KHIEUKH + {0x9DA1, 0xC509}, //5069 #HANGUL SYLLABLE SSANGSIOS EU THIEUTH + {0x9DA2, 0xC50A}, //5070 #HANGUL SYLLABLE SSANGSIOS EU PHIEUPH + {0x9DA3, 0xC50B}, //5071 #HANGUL SYLLABLE SSANGSIOS EU HIEUH + {0x9DA4, 0xC50D}, //5072 #HANGUL SYLLABLE SSANGSIOS YI KIYEOK + {0x9DA5, 0xC50E}, //5073 #HANGUL SYLLABLE SSANGSIOS YI SSANGKIYEOK + {0x9DA6, 0xC50F}, //5074 #HANGUL SYLLABLE SSANGSIOS YI KIYEOKSIOS + {0x9DA7, 0xC511}, //5075 #HANGUL SYLLABLE SSANGSIOS YI NIEUNCIEUC + {0x9DA8, 0xC512}, //5076 #HANGUL SYLLABLE SSANGSIOS YI NIEUNHIEUH + {0x9DA9, 0xC513}, //5077 #HANGUL SYLLABLE SSANGSIOS YI TIKEUT + {0x9DAA, 0xC515}, //5078 #HANGUL SYLLABLE SSANGSIOS YI RIEULKIYEOK + {0x9DAB, 0xC516}, //5079 #HANGUL SYLLABLE SSANGSIOS YI RIEULMIEUM + {0x9DAC, 0xC517}, //5080 #HANGUL SYLLABLE SSANGSIOS YI RIEULPIEUP + {0x9DAD, 0xC518}, //5081 #HANGUL SYLLABLE SSANGSIOS YI RIEULSIOS + {0x9DAE, 0xC519}, //5082 #HANGUL SYLLABLE SSANGSIOS YI RIEULTHIEUTH + {0x9DAF, 0xC51A}, //5083 #HANGUL SYLLABLE SSANGSIOS YI RIEULPHIEUPH + {0x9DB0, 0xC51B}, //5084 #HANGUL SYLLABLE SSANGSIOS YI RIEULHIEUH + {0x9DB1, 0xC51D}, //5085 #HANGUL SYLLABLE SSANGSIOS YI PIEUP + {0x9DB2, 0xC51E}, //5086 #HANGUL SYLLABLE SSANGSIOS YI PIEUPSIOS + {0x9DB3, 0xC51F}, //5087 #HANGUL SYLLABLE SSANGSIOS YI SIOS + {0x9DB4, 0xC520}, //5088 #HANGUL SYLLABLE SSANGSIOS YI SSANGSIOS + {0x9DB5, 0xC521}, //5089 #HANGUL SYLLABLE SSANGSIOS YI IEUNG + {0x9DB6, 0xC522}, //5090 #HANGUL SYLLABLE SSANGSIOS YI CIEUC + {0x9DB7, 0xC523}, //5091 #HANGUL SYLLABLE SSANGSIOS YI CHIEUCH + {0x9DB8, 0xC524}, //5092 #HANGUL SYLLABLE SSANGSIOS YI KHIEUKH + {0x9DB9, 0xC525}, //5093 #HANGUL SYLLABLE SSANGSIOS YI THIEUTH + {0x9DBA, 0xC526}, //5094 #HANGUL SYLLABLE SSANGSIOS YI PHIEUPH + {0x9DBB, 0xC527}, //5095 #HANGUL SYLLABLE SSANGSIOS YI HIEUH + {0x9DBC, 0xC52A}, //5096 #HANGUL SYLLABLE SSANGSIOS I SSANGKIYEOK + {0x9DBD, 0xC52B}, //5097 #HANGUL SYLLABLE SSANGSIOS I KIYEOKSIOS + {0x9DBE, 0xC52D}, //5098 #HANGUL SYLLABLE SSANGSIOS I NIEUNCIEUC + {0x9DBF, 0xC52E}, //5099 #HANGUL SYLLABLE SSANGSIOS I NIEUNHIEUH + {0x9DC0, 0xC52F}, //5100 #HANGUL SYLLABLE SSANGSIOS I TIKEUT + {0x9DC1, 0xC531}, //5101 #HANGUL SYLLABLE SSANGSIOS I RIEULKIYEOK + {0x9DC2, 0xC532}, //5102 #HANGUL SYLLABLE SSANGSIOS I RIEULMIEUM + {0x9DC3, 0xC533}, //5103 #HANGUL SYLLABLE SSANGSIOS I RIEULPIEUP + {0x9DC4, 0xC534}, //5104 #HANGUL SYLLABLE SSANGSIOS I RIEULSIOS + {0x9DC5, 0xC535}, //5105 #HANGUL SYLLABLE SSANGSIOS I RIEULTHIEUTH + {0x9DC6, 0xC536}, //5106 #HANGUL SYLLABLE SSANGSIOS I RIEULPHIEUPH + {0x9DC7, 0xC537}, //5107 #HANGUL SYLLABLE SSANGSIOS I RIEULHIEUH + {0x9DC8, 0xC53A}, //5108 #HANGUL SYLLABLE SSANGSIOS I PIEUPSIOS + {0x9DC9, 0xC53C}, //5109 #HANGUL SYLLABLE SSANGSIOS I SSANGSIOS + {0x9DCA, 0xC53E}, //5110 #HANGUL SYLLABLE SSANGSIOS I CIEUC + {0x9DCB, 0xC53F}, //5111 #HANGUL SYLLABLE SSANGSIOS I CHIEUCH + {0x9DCC, 0xC540}, //5112 #HANGUL SYLLABLE SSANGSIOS I KHIEUKH + {0x9DCD, 0xC541}, //5113 #HANGUL SYLLABLE SSANGSIOS I THIEUTH + {0x9DCE, 0xC542}, //5114 #HANGUL SYLLABLE SSANGSIOS I PHIEUPH + {0x9DCF, 0xC543}, //5115 #HANGUL SYLLABLE SSANGSIOS I HIEUH + {0x9DD0, 0xC546}, //5116 #HANGUL SYLLABLE IEUNG A SSANGKIYEOK + {0x9DD1, 0xC547}, //5117 #HANGUL SYLLABLE IEUNG A KIYEOKSIOS + {0x9DD2, 0xC54B}, //5118 #HANGUL SYLLABLE IEUNG A TIKEUT + {0x9DD3, 0xC54F}, //5119 #HANGUL SYLLABLE IEUNG A RIEULPIEUP + {0x9DD4, 0xC550}, //5120 #HANGUL SYLLABLE IEUNG A RIEULSIOS + {0x9DD5, 0xC551}, //5121 #HANGUL SYLLABLE IEUNG A RIEULTHIEUTH + {0x9DD6, 0xC552}, //5122 #HANGUL SYLLABLE IEUNG A RIEULPHIEUPH + {0x9DD7, 0xC556}, //5123 #HANGUL SYLLABLE IEUNG A PIEUPSIOS + {0x9DD8, 0xC55A}, //5124 #HANGUL SYLLABLE IEUNG A CIEUC + {0x9DD9, 0xC55B}, //5125 #HANGUL SYLLABLE IEUNG A CHIEUCH + {0x9DDA, 0xC55C}, //5126 #HANGUL SYLLABLE IEUNG A KHIEUKH + {0x9DDB, 0xC55F}, //5127 #HANGUL SYLLABLE IEUNG A HIEUH + {0x9DDC, 0xC562}, //5128 #HANGUL SYLLABLE IEUNG AE SSANGKIYEOK + {0x9DDD, 0xC563}, //5129 #HANGUL SYLLABLE IEUNG AE KIYEOKSIOS + {0x9DDE, 0xC565}, //5130 #HANGUL SYLLABLE IEUNG AE NIEUNCIEUC + {0x9DDF, 0xC566}, //5131 #HANGUL SYLLABLE IEUNG AE NIEUNHIEUH + {0x9DE0, 0xC567}, //5132 #HANGUL SYLLABLE IEUNG AE TIKEUT + {0x9DE1, 0xC569}, //5133 #HANGUL SYLLABLE IEUNG AE RIEULKIYEOK + {0x9DE2, 0xC56A}, //5134 #HANGUL SYLLABLE IEUNG AE RIEULMIEUM + {0x9DE3, 0xC56B}, //5135 #HANGUL SYLLABLE IEUNG AE RIEULPIEUP + {0x9DE4, 0xC56C}, //5136 #HANGUL SYLLABLE IEUNG AE RIEULSIOS + {0x9DE5, 0xC56D}, //5137 #HANGUL SYLLABLE IEUNG AE RIEULTHIEUTH + {0x9DE6, 0xC56E}, //5138 #HANGUL SYLLABLE IEUNG AE RIEULPHIEUPH + {0x9DE7, 0xC56F}, //5139 #HANGUL SYLLABLE IEUNG AE RIEULHIEUH + {0x9DE8, 0xC572}, //5140 #HANGUL SYLLABLE IEUNG AE PIEUPSIOS + {0x9DE9, 0xC576}, //5141 #HANGUL SYLLABLE IEUNG AE CIEUC + {0x9DEA, 0xC577}, //5142 #HANGUL SYLLABLE IEUNG AE CHIEUCH + {0x9DEB, 0xC578}, //5143 #HANGUL SYLLABLE IEUNG AE KHIEUKH + {0x9DEC, 0xC579}, //5144 #HANGUL SYLLABLE IEUNG AE THIEUTH + {0x9DED, 0xC57A}, //5145 #HANGUL SYLLABLE IEUNG AE PHIEUPH + {0x9DEE, 0xC57B}, //5146 #HANGUL SYLLABLE IEUNG AE HIEUH + {0x9DEF, 0xC57E}, //5147 #HANGUL SYLLABLE IEUNG YA SSANGKIYEOK + {0x9DF0, 0xC57F}, //5148 #HANGUL SYLLABLE IEUNG YA KIYEOKSIOS + {0x9DF1, 0xC581}, //5149 #HANGUL SYLLABLE IEUNG YA NIEUNCIEUC + {0x9DF2, 0xC582}, //5150 #HANGUL SYLLABLE IEUNG YA NIEUNHIEUH + {0x9DF3, 0xC583}, //5151 #HANGUL SYLLABLE IEUNG YA TIKEUT + {0x9DF4, 0xC585}, //5152 #HANGUL SYLLABLE IEUNG YA RIEULKIYEOK + {0x9DF5, 0xC586}, //5153 #HANGUL SYLLABLE IEUNG YA RIEULMIEUM + {0x9DF6, 0xC588}, //5154 #HANGUL SYLLABLE IEUNG YA RIEULSIOS + {0x9DF7, 0xC589}, //5155 #HANGUL SYLLABLE IEUNG YA RIEULTHIEUTH + {0x9DF8, 0xC58A}, //5156 #HANGUL SYLLABLE IEUNG YA RIEULPHIEUPH + {0x9DF9, 0xC58B}, //5157 #HANGUL SYLLABLE IEUNG YA RIEULHIEUH + {0x9DFA, 0xC58E}, //5158 #HANGUL SYLLABLE IEUNG YA PIEUPSIOS + {0x9DFB, 0xC590}, //5159 #HANGUL SYLLABLE IEUNG YA SSANGSIOS + {0x9DFC, 0xC592}, //5160 #HANGUL SYLLABLE IEUNG YA CIEUC + {0x9DFD, 0xC593}, //5161 #HANGUL SYLLABLE IEUNG YA CHIEUCH + {0x9DFE, 0xC594}, //5162 #HANGUL SYLLABLE IEUNG YA KHIEUKH + {0x9E41, 0xC596}, //5163 #HANGUL SYLLABLE IEUNG YA PHIEUPH + {0x9E42, 0xC599}, //5164 #HANGUL SYLLABLE IEUNG YAE KIYEOK + {0x9E43, 0xC59A}, //5165 #HANGUL SYLLABLE IEUNG YAE SSANGKIYEOK + {0x9E44, 0xC59B}, //5166 #HANGUL SYLLABLE IEUNG YAE KIYEOKSIOS + {0x9E45, 0xC59D}, //5167 #HANGUL SYLLABLE IEUNG YAE NIEUNCIEUC + {0x9E46, 0xC59E}, //5168 #HANGUL SYLLABLE IEUNG YAE NIEUNHIEUH + {0x9E47, 0xC59F}, //5169 #HANGUL SYLLABLE IEUNG YAE TIKEUT + {0x9E48, 0xC5A1}, //5170 #HANGUL SYLLABLE IEUNG YAE RIEULKIYEOK + {0x9E49, 0xC5A2}, //5171 #HANGUL SYLLABLE IEUNG YAE RIEULMIEUM + {0x9E4A, 0xC5A3}, //5172 #HANGUL SYLLABLE IEUNG YAE RIEULPIEUP + {0x9E4B, 0xC5A4}, //5173 #HANGUL SYLLABLE IEUNG YAE RIEULSIOS + {0x9E4C, 0xC5A5}, //5174 #HANGUL SYLLABLE IEUNG YAE RIEULTHIEUTH + {0x9E4D, 0xC5A6}, //5175 #HANGUL SYLLABLE IEUNG YAE RIEULPHIEUPH + {0x9E4E, 0xC5A7}, //5176 #HANGUL SYLLABLE IEUNG YAE RIEULHIEUH + {0x9E4F, 0xC5A8}, //5177 #HANGUL SYLLABLE IEUNG YAE MIEUM + {0x9E50, 0xC5AA}, //5178 #HANGUL SYLLABLE IEUNG YAE PIEUPSIOS + {0x9E51, 0xC5AB}, //5179 #HANGUL SYLLABLE IEUNG YAE SIOS + {0x9E52, 0xC5AC}, //5180 #HANGUL SYLLABLE IEUNG YAE SSANGSIOS + {0x9E53, 0xC5AD}, //5181 #HANGUL SYLLABLE IEUNG YAE IEUNG + {0x9E54, 0xC5AE}, //5182 #HANGUL SYLLABLE IEUNG YAE CIEUC + {0x9E55, 0xC5AF}, //5183 #HANGUL SYLLABLE IEUNG YAE CHIEUCH + {0x9E56, 0xC5B0}, //5184 #HANGUL SYLLABLE IEUNG YAE KHIEUKH + {0x9E57, 0xC5B1}, //5185 #HANGUL SYLLABLE IEUNG YAE THIEUTH + {0x9E58, 0xC5B2}, //5186 #HANGUL SYLLABLE IEUNG YAE PHIEUPH + {0x9E59, 0xC5B3}, //5187 #HANGUL SYLLABLE IEUNG YAE HIEUH + {0x9E5A, 0xC5B6}, //5188 #HANGUL SYLLABLE IEUNG EO SSANGKIYEOK + {0x9E61, 0xC5B7}, //5189 #HANGUL SYLLABLE IEUNG EO KIYEOKSIOS + {0x9E62, 0xC5BA}, //5190 #HANGUL SYLLABLE IEUNG EO NIEUNHIEUH + {0x9E63, 0xC5BF}, //5191 #HANGUL SYLLABLE IEUNG EO RIEULPIEUP + {0x9E64, 0xC5C0}, //5192 #HANGUL SYLLABLE IEUNG EO RIEULSIOS + {0x9E65, 0xC5C1}, //5193 #HANGUL SYLLABLE IEUNG EO RIEULTHIEUTH + {0x9E66, 0xC5C2}, //5194 #HANGUL SYLLABLE IEUNG EO RIEULPHIEUPH + {0x9E67, 0xC5C3}, //5195 #HANGUL SYLLABLE IEUNG EO RIEULHIEUH + {0x9E68, 0xC5CB}, //5196 #HANGUL SYLLABLE IEUNG EO CHIEUCH + {0x9E69, 0xC5CD}, //5197 #HANGUL SYLLABLE IEUNG EO THIEUTH + {0x9E6A, 0xC5CF}, //5198 #HANGUL SYLLABLE IEUNG EO HIEUH + {0x9E6B, 0xC5D2}, //5199 #HANGUL SYLLABLE IEUNG E SSANGKIYEOK + {0x9E6C, 0xC5D3}, //5200 #HANGUL SYLLABLE IEUNG E KIYEOKSIOS + {0x9E6D, 0xC5D5}, //5201 #HANGUL SYLLABLE IEUNG E NIEUNCIEUC + {0x9E6E, 0xC5D6}, //5202 #HANGUL SYLLABLE IEUNG E NIEUNHIEUH + {0x9E6F, 0xC5D7}, //5203 #HANGUL SYLLABLE IEUNG E TIKEUT + {0x9E70, 0xC5D9}, //5204 #HANGUL SYLLABLE IEUNG E RIEULKIYEOK + {0x9E71, 0xC5DA}, //5205 #HANGUL SYLLABLE IEUNG E RIEULMIEUM + {0x9E72, 0xC5DB}, //5206 #HANGUL SYLLABLE IEUNG E RIEULPIEUP + {0x9E73, 0xC5DC}, //5207 #HANGUL SYLLABLE IEUNG E RIEULSIOS + {0x9E74, 0xC5DD}, //5208 #HANGUL SYLLABLE IEUNG E RIEULTHIEUTH + {0x9E75, 0xC5DE}, //5209 #HANGUL SYLLABLE IEUNG E RIEULPHIEUPH + {0x9E76, 0xC5DF}, //5210 #HANGUL SYLLABLE IEUNG E RIEULHIEUH + {0x9E77, 0xC5E2}, //5211 #HANGUL SYLLABLE IEUNG E PIEUPSIOS + {0x9E78, 0xC5E4}, //5212 #HANGUL SYLLABLE IEUNG E SSANGSIOS + {0x9E79, 0xC5E6}, //5213 #HANGUL SYLLABLE IEUNG E CIEUC + {0x9E7A, 0xC5E7}, //5214 #HANGUL SYLLABLE IEUNG E CHIEUCH + {0x9E81, 0xC5E8}, //5215 #HANGUL SYLLABLE IEUNG E KHIEUKH + {0x9E82, 0xC5E9}, //5216 #HANGUL SYLLABLE IEUNG E THIEUTH + {0x9E83, 0xC5EA}, //5217 #HANGUL SYLLABLE IEUNG E PHIEUPH + {0x9E84, 0xC5EB}, //5218 #HANGUL SYLLABLE IEUNG E HIEUH + {0x9E85, 0xC5EF}, //5219 #HANGUL SYLLABLE IEUNG YEO KIYEOKSIOS + {0x9E86, 0xC5F1}, //5220 #HANGUL SYLLABLE IEUNG YEO NIEUNCIEUC + {0x9E87, 0xC5F2}, //5221 #HANGUL SYLLABLE IEUNG YEO NIEUNHIEUH + {0x9E88, 0xC5F3}, //5222 #HANGUL SYLLABLE IEUNG YEO TIKEUT + {0x9E89, 0xC5F5}, //5223 #HANGUL SYLLABLE IEUNG YEO RIEULKIYEOK + {0x9E8A, 0xC5F8}, //5224 #HANGUL SYLLABLE IEUNG YEO RIEULSIOS + {0x9E8B, 0xC5F9}, //5225 #HANGUL SYLLABLE IEUNG YEO RIEULTHIEUTH + {0x9E8C, 0xC5FA}, //5226 #HANGUL SYLLABLE IEUNG YEO RIEULPHIEUPH + {0x9E8D, 0xC5FB}, //5227 #HANGUL SYLLABLE IEUNG YEO RIEULHIEUH + {0x9E8E, 0xC602}, //5228 #HANGUL SYLLABLE IEUNG YEO CIEUC + {0x9E8F, 0xC603}, //5229 #HANGUL SYLLABLE IEUNG YEO CHIEUCH + {0x9E90, 0xC604}, //5230 #HANGUL SYLLABLE IEUNG YEO KHIEUKH + {0x9E91, 0xC609}, //5231 #HANGUL SYLLABLE IEUNG YE KIYEOK + {0x9E92, 0xC60A}, //5232 #HANGUL SYLLABLE IEUNG YE SSANGKIYEOK + {0x9E93, 0xC60B}, //5233 #HANGUL SYLLABLE IEUNG YE KIYEOKSIOS + {0x9E94, 0xC60D}, //5234 #HANGUL SYLLABLE IEUNG YE NIEUNCIEUC + {0x9E95, 0xC60E}, //5235 #HANGUL SYLLABLE IEUNG YE NIEUNHIEUH + {0x9E96, 0xC60F}, //5236 #HANGUL SYLLABLE IEUNG YE TIKEUT + {0x9E97, 0xC611}, //5237 #HANGUL SYLLABLE IEUNG YE RIEULKIYEOK + {0x9E98, 0xC612}, //5238 #HANGUL SYLLABLE IEUNG YE RIEULMIEUM + {0x9E99, 0xC613}, //5239 #HANGUL SYLLABLE IEUNG YE RIEULPIEUP + {0x9E9A, 0xC614}, //5240 #HANGUL SYLLABLE IEUNG YE RIEULSIOS + {0x9E9B, 0xC615}, //5241 #HANGUL SYLLABLE IEUNG YE RIEULTHIEUTH + {0x9E9C, 0xC616}, //5242 #HANGUL SYLLABLE IEUNG YE RIEULPHIEUPH + {0x9E9D, 0xC617}, //5243 #HANGUL SYLLABLE IEUNG YE RIEULHIEUH + {0x9E9E, 0xC61A}, //5244 #HANGUL SYLLABLE IEUNG YE PIEUPSIOS + {0x9E9F, 0xC61D}, //5245 #HANGUL SYLLABLE IEUNG YE IEUNG + {0x9EA0, 0xC61E}, //5246 #HANGUL SYLLABLE IEUNG YE CIEUC + {0x9EA1, 0xC61F}, //5247 #HANGUL SYLLABLE IEUNG YE CHIEUCH + {0x9EA2, 0xC620}, //5248 #HANGUL SYLLABLE IEUNG YE KHIEUKH + {0x9EA3, 0xC621}, //5249 #HANGUL SYLLABLE IEUNG YE THIEUTH + {0x9EA4, 0xC622}, //5250 #HANGUL SYLLABLE IEUNG YE PHIEUPH + {0x9EA5, 0xC623}, //5251 #HANGUL SYLLABLE IEUNG YE HIEUH + {0x9EA6, 0xC626}, //5252 #HANGUL SYLLABLE IEUNG O SSANGKIYEOK + {0x9EA7, 0xC627}, //5253 #HANGUL SYLLABLE IEUNG O KIYEOKSIOS + {0x9EA8, 0xC629}, //5254 #HANGUL SYLLABLE IEUNG O NIEUNCIEUC + {0x9EA9, 0xC62A}, //5255 #HANGUL SYLLABLE IEUNG O NIEUNHIEUH + {0x9EAA, 0xC62B}, //5256 #HANGUL SYLLABLE IEUNG O TIKEUT + {0x9EAB, 0xC62F}, //5257 #HANGUL SYLLABLE IEUNG O RIEULPIEUP + {0x9EAC, 0xC631}, //5258 #HANGUL SYLLABLE IEUNG O RIEULTHIEUTH + {0x9EAD, 0xC632}, //5259 #HANGUL SYLLABLE IEUNG O RIEULPHIEUPH + {0x9EAE, 0xC636}, //5260 #HANGUL SYLLABLE IEUNG O PIEUPSIOS + {0x9EAF, 0xC638}, //5261 #HANGUL SYLLABLE IEUNG O SSANGSIOS + {0x9EB0, 0xC63A}, //5262 #HANGUL SYLLABLE IEUNG O CIEUC + {0x9EB1, 0xC63C}, //5263 #HANGUL SYLLABLE IEUNG O KHIEUKH + {0x9EB2, 0xC63D}, //5264 #HANGUL SYLLABLE IEUNG O THIEUTH + {0x9EB3, 0xC63E}, //5265 #HANGUL SYLLABLE IEUNG O PHIEUPH + {0x9EB4, 0xC63F}, //5266 #HANGUL SYLLABLE IEUNG O HIEUH + {0x9EB5, 0xC642}, //5267 #HANGUL SYLLABLE IEUNG WA SSANGKIYEOK + {0x9EB6, 0xC643}, //5268 #HANGUL SYLLABLE IEUNG WA KIYEOKSIOS + {0x9EB7, 0xC645}, //5269 #HANGUL SYLLABLE IEUNG WA NIEUNCIEUC + {0x9EB8, 0xC646}, //5270 #HANGUL SYLLABLE IEUNG WA NIEUNHIEUH + {0x9EB9, 0xC647}, //5271 #HANGUL SYLLABLE IEUNG WA TIKEUT + {0x9EBA, 0xC649}, //5272 #HANGUL SYLLABLE IEUNG WA RIEULKIYEOK + {0x9EBB, 0xC64A}, //5273 #HANGUL SYLLABLE IEUNG WA RIEULMIEUM + {0x9EBC, 0xC64B}, //5274 #HANGUL SYLLABLE IEUNG WA RIEULPIEUP + {0x9EBD, 0xC64C}, //5275 #HANGUL SYLLABLE IEUNG WA RIEULSIOS + {0x9EBE, 0xC64D}, //5276 #HANGUL SYLLABLE IEUNG WA RIEULTHIEUTH + {0x9EBF, 0xC64E}, //5277 #HANGUL SYLLABLE IEUNG WA RIEULPHIEUPH + {0x9EC0, 0xC64F}, //5278 #HANGUL SYLLABLE IEUNG WA RIEULHIEUH + {0x9EC1, 0xC652}, //5279 #HANGUL SYLLABLE IEUNG WA PIEUPSIOS + {0x9EC2, 0xC656}, //5280 #HANGUL SYLLABLE IEUNG WA CIEUC + {0x9EC3, 0xC657}, //5281 #HANGUL SYLLABLE IEUNG WA CHIEUCH + {0x9EC4, 0xC658}, //5282 #HANGUL SYLLABLE IEUNG WA KHIEUKH + {0x9EC5, 0xC659}, //5283 #HANGUL SYLLABLE IEUNG WA THIEUTH + {0x9EC6, 0xC65A}, //5284 #HANGUL SYLLABLE IEUNG WA PHIEUPH + {0x9EC7, 0xC65B}, //5285 #HANGUL SYLLABLE IEUNG WA HIEUH + {0x9EC8, 0xC65E}, //5286 #HANGUL SYLLABLE IEUNG WAE SSANGKIYEOK + {0x9EC9, 0xC65F}, //5287 #HANGUL SYLLABLE IEUNG WAE KIYEOKSIOS + {0x9ECA, 0xC661}, //5288 #HANGUL SYLLABLE IEUNG WAE NIEUNCIEUC + {0x9ECB, 0xC662}, //5289 #HANGUL SYLLABLE IEUNG WAE NIEUNHIEUH + {0x9ECC, 0xC663}, //5290 #HANGUL SYLLABLE IEUNG WAE TIKEUT + {0x9ECD, 0xC664}, //5291 #HANGUL SYLLABLE IEUNG WAE RIEUL + {0x9ECE, 0xC665}, //5292 #HANGUL SYLLABLE IEUNG WAE RIEULKIYEOK + {0x9ECF, 0xC666}, //5293 #HANGUL SYLLABLE IEUNG WAE RIEULMIEUM + {0x9ED0, 0xC667}, //5294 #HANGUL SYLLABLE IEUNG WAE RIEULPIEUP + {0x9ED1, 0xC668}, //5295 #HANGUL SYLLABLE IEUNG WAE RIEULSIOS + {0x9ED2, 0xC669}, //5296 #HANGUL SYLLABLE IEUNG WAE RIEULTHIEUTH + {0x9ED3, 0xC66A}, //5297 #HANGUL SYLLABLE IEUNG WAE RIEULPHIEUPH + {0x9ED4, 0xC66B}, //5298 #HANGUL SYLLABLE IEUNG WAE RIEULHIEUH + {0x9ED5, 0xC66D}, //5299 #HANGUL SYLLABLE IEUNG WAE PIEUP + {0x9ED6, 0xC66E}, //5300 #HANGUL SYLLABLE IEUNG WAE PIEUPSIOS + {0x9ED7, 0xC670}, //5301 #HANGUL SYLLABLE IEUNG WAE SSANGSIOS + {0x9ED8, 0xC672}, //5302 #HANGUL SYLLABLE IEUNG WAE CIEUC + {0x9ED9, 0xC673}, //5303 #HANGUL SYLLABLE IEUNG WAE CHIEUCH + {0x9EDA, 0xC674}, //5304 #HANGUL SYLLABLE IEUNG WAE KHIEUKH + {0x9EDB, 0xC675}, //5305 #HANGUL SYLLABLE IEUNG WAE THIEUTH + {0x9EDC, 0xC676}, //5306 #HANGUL SYLLABLE IEUNG WAE PHIEUPH + {0x9EDD, 0xC677}, //5307 #HANGUL SYLLABLE IEUNG WAE HIEUH + {0x9EDE, 0xC67A}, //5308 #HANGUL SYLLABLE IEUNG OE SSANGKIYEOK + {0x9EDF, 0xC67B}, //5309 #HANGUL SYLLABLE IEUNG OE KIYEOKSIOS + {0x9EE0, 0xC67D}, //5310 #HANGUL SYLLABLE IEUNG OE NIEUNCIEUC + {0x9EE1, 0xC67E}, //5311 #HANGUL SYLLABLE IEUNG OE NIEUNHIEUH + {0x9EE2, 0xC67F}, //5312 #HANGUL SYLLABLE IEUNG OE TIKEUT + {0x9EE3, 0xC681}, //5313 #HANGUL SYLLABLE IEUNG OE RIEULKIYEOK + {0x9EE4, 0xC682}, //5314 #HANGUL SYLLABLE IEUNG OE RIEULMIEUM + {0x9EE5, 0xC683}, //5315 #HANGUL SYLLABLE IEUNG OE RIEULPIEUP + {0x9EE6, 0xC684}, //5316 #HANGUL SYLLABLE IEUNG OE RIEULSIOS + {0x9EE7, 0xC685}, //5317 #HANGUL SYLLABLE IEUNG OE RIEULTHIEUTH + {0x9EE8, 0xC686}, //5318 #HANGUL SYLLABLE IEUNG OE RIEULPHIEUPH + {0x9EE9, 0xC687}, //5319 #HANGUL SYLLABLE IEUNG OE RIEULHIEUH + {0x9EEA, 0xC68A}, //5320 #HANGUL SYLLABLE IEUNG OE PIEUPSIOS + {0x9EEB, 0xC68C}, //5321 #HANGUL SYLLABLE IEUNG OE SSANGSIOS + {0x9EEC, 0xC68E}, //5322 #HANGUL SYLLABLE IEUNG OE CIEUC + {0x9EED, 0xC68F}, //5323 #HANGUL SYLLABLE IEUNG OE CHIEUCH + {0x9EEE, 0xC690}, //5324 #HANGUL SYLLABLE IEUNG OE KHIEUKH + {0x9EEF, 0xC691}, //5325 #HANGUL SYLLABLE IEUNG OE THIEUTH + {0x9EF0, 0xC692}, //5326 #HANGUL SYLLABLE IEUNG OE PHIEUPH + {0x9EF1, 0xC693}, //5327 #HANGUL SYLLABLE IEUNG OE HIEUH + {0x9EF2, 0xC696}, //5328 #HANGUL SYLLABLE IEUNG YO SSANGKIYEOK + {0x9EF3, 0xC697}, //5329 #HANGUL SYLLABLE IEUNG YO KIYEOKSIOS + {0x9EF4, 0xC699}, //5330 #HANGUL SYLLABLE IEUNG YO NIEUNCIEUC + {0x9EF5, 0xC69A}, //5331 #HANGUL SYLLABLE IEUNG YO NIEUNHIEUH + {0x9EF6, 0xC69B}, //5332 #HANGUL SYLLABLE IEUNG YO TIKEUT + {0x9EF7, 0xC69D}, //5333 #HANGUL SYLLABLE IEUNG YO RIEULKIYEOK + {0x9EF8, 0xC69E}, //5334 #HANGUL SYLLABLE IEUNG YO RIEULMIEUM + {0x9EF9, 0xC69F}, //5335 #HANGUL SYLLABLE IEUNG YO RIEULPIEUP + {0x9EFA, 0xC6A0}, //5336 #HANGUL SYLLABLE IEUNG YO RIEULSIOS + {0x9EFB, 0xC6A1}, //5337 #HANGUL SYLLABLE IEUNG YO RIEULTHIEUTH + {0x9EFC, 0xC6A2}, //5338 #HANGUL SYLLABLE IEUNG YO RIEULPHIEUPH + {0x9EFD, 0xC6A3}, //5339 #HANGUL SYLLABLE IEUNG YO RIEULHIEUH + {0x9EFE, 0xC6A6}, //5340 #HANGUL SYLLABLE IEUNG YO PIEUPSIOS + {0x9F41, 0xC6A8}, //5341 #HANGUL SYLLABLE IEUNG YO SSANGSIOS + {0x9F42, 0xC6AA}, //5342 #HANGUL SYLLABLE IEUNG YO CIEUC + {0x9F43, 0xC6AB}, //5343 #HANGUL SYLLABLE IEUNG YO CHIEUCH + {0x9F44, 0xC6AC}, //5344 #HANGUL SYLLABLE IEUNG YO KHIEUKH + {0x9F45, 0xC6AD}, //5345 #HANGUL SYLLABLE IEUNG YO THIEUTH + {0x9F46, 0xC6AE}, //5346 #HANGUL SYLLABLE IEUNG YO PHIEUPH + {0x9F47, 0xC6AF}, //5347 #HANGUL SYLLABLE IEUNG YO HIEUH + {0x9F48, 0xC6B2}, //5348 #HANGUL SYLLABLE IEUNG U SSANGKIYEOK + {0x9F49, 0xC6B3}, //5349 #HANGUL SYLLABLE IEUNG U KIYEOKSIOS + {0x9F4A, 0xC6B5}, //5350 #HANGUL SYLLABLE IEUNG U NIEUNCIEUC + {0x9F4B, 0xC6B6}, //5351 #HANGUL SYLLABLE IEUNG U NIEUNHIEUH + {0x9F4C, 0xC6B7}, //5352 #HANGUL SYLLABLE IEUNG U TIKEUT + {0x9F4D, 0xC6BB}, //5353 #HANGUL SYLLABLE IEUNG U RIEULPIEUP + {0x9F4E, 0xC6BC}, //5354 #HANGUL SYLLABLE IEUNG U RIEULSIOS + {0x9F4F, 0xC6BD}, //5355 #HANGUL SYLLABLE IEUNG U RIEULTHIEUTH + {0x9F50, 0xC6BE}, //5356 #HANGUL SYLLABLE IEUNG U RIEULPHIEUPH + {0x9F51, 0xC6BF}, //5357 #HANGUL SYLLABLE IEUNG U RIEULHIEUH + {0x9F52, 0xC6C2}, //5358 #HANGUL SYLLABLE IEUNG U PIEUPSIOS + {0x9F53, 0xC6C4}, //5359 #HANGUL SYLLABLE IEUNG U SSANGSIOS + {0x9F54, 0xC6C6}, //5360 #HANGUL SYLLABLE IEUNG U CIEUC + {0x9F55, 0xC6C7}, //5361 #HANGUL SYLLABLE IEUNG U CHIEUCH + {0x9F56, 0xC6C8}, //5362 #HANGUL SYLLABLE IEUNG U KHIEUKH + {0x9F57, 0xC6C9}, //5363 #HANGUL SYLLABLE IEUNG U THIEUTH + {0x9F58, 0xC6CA}, //5364 #HANGUL SYLLABLE IEUNG U PHIEUPH + {0x9F59, 0xC6CB}, //5365 #HANGUL SYLLABLE IEUNG U HIEUH + {0x9F5A, 0xC6CE}, //5366 #HANGUL SYLLABLE IEUNG WEO SSANGKIYEOK + {0x9F61, 0xC6CF}, //5367 #HANGUL SYLLABLE IEUNG WEO KIYEOKSIOS + {0x9F62, 0xC6D1}, //5368 #HANGUL SYLLABLE IEUNG WEO NIEUNCIEUC + {0x9F63, 0xC6D2}, //5369 #HANGUL SYLLABLE IEUNG WEO NIEUNHIEUH + {0x9F64, 0xC6D3}, //5370 #HANGUL SYLLABLE IEUNG WEO TIKEUT + {0x9F65, 0xC6D5}, //5371 #HANGUL SYLLABLE IEUNG WEO RIEULKIYEOK + {0x9F66, 0xC6D6}, //5372 #HANGUL SYLLABLE IEUNG WEO RIEULMIEUM + {0x9F67, 0xC6D7}, //5373 #HANGUL SYLLABLE IEUNG WEO RIEULPIEUP + {0x9F68, 0xC6D8}, //5374 #HANGUL SYLLABLE IEUNG WEO RIEULSIOS + {0x9F69, 0xC6D9}, //5375 #HANGUL SYLLABLE IEUNG WEO RIEULTHIEUTH + {0x9F6A, 0xC6DA}, //5376 #HANGUL SYLLABLE IEUNG WEO RIEULPHIEUPH + {0x9F6B, 0xC6DB}, //5377 #HANGUL SYLLABLE IEUNG WEO RIEULHIEUH + {0x9F6C, 0xC6DE}, //5378 #HANGUL SYLLABLE IEUNG WEO PIEUPSIOS + {0x9F6D, 0xC6DF}, //5379 #HANGUL SYLLABLE IEUNG WEO SIOS + {0x9F6E, 0xC6E2}, //5380 #HANGUL SYLLABLE IEUNG WEO CIEUC + {0x9F6F, 0xC6E3}, //5381 #HANGUL SYLLABLE IEUNG WEO CHIEUCH + {0x9F70, 0xC6E4}, //5382 #HANGUL SYLLABLE IEUNG WEO KHIEUKH + {0x9F71, 0xC6E5}, //5383 #HANGUL SYLLABLE IEUNG WEO THIEUTH + {0x9F72, 0xC6E6}, //5384 #HANGUL SYLLABLE IEUNG WEO PHIEUPH + {0x9F73, 0xC6E7}, //5385 #HANGUL SYLLABLE IEUNG WEO HIEUH + {0x9F74, 0xC6EA}, //5386 #HANGUL SYLLABLE IEUNG WE SSANGKIYEOK + {0x9F75, 0xC6EB}, //5387 #HANGUL SYLLABLE IEUNG WE KIYEOKSIOS + {0x9F76, 0xC6ED}, //5388 #HANGUL SYLLABLE IEUNG WE NIEUNCIEUC + {0x9F77, 0xC6EE}, //5389 #HANGUL SYLLABLE IEUNG WE NIEUNHIEUH + {0x9F78, 0xC6EF}, //5390 #HANGUL SYLLABLE IEUNG WE TIKEUT + {0x9F79, 0xC6F1}, //5391 #HANGUL SYLLABLE IEUNG WE RIEULKIYEOK + {0x9F7A, 0xC6F2}, //5392 #HANGUL SYLLABLE IEUNG WE RIEULMIEUM + {0x9F81, 0xC6F3}, //5393 #HANGUL SYLLABLE IEUNG WE RIEULPIEUP + {0x9F82, 0xC6F4}, //5394 #HANGUL SYLLABLE IEUNG WE RIEULSIOS + {0x9F83, 0xC6F5}, //5395 #HANGUL SYLLABLE IEUNG WE RIEULTHIEUTH + {0x9F84, 0xC6F6}, //5396 #HANGUL SYLLABLE IEUNG WE RIEULPHIEUPH + {0x9F85, 0xC6F7}, //5397 #HANGUL SYLLABLE IEUNG WE RIEULHIEUH + {0x9F86, 0xC6FA}, //5398 #HANGUL SYLLABLE IEUNG WE PIEUPSIOS + {0x9F87, 0xC6FB}, //5399 #HANGUL SYLLABLE IEUNG WE SIOS + {0x9F88, 0xC6FC}, //5400 #HANGUL SYLLABLE IEUNG WE SSANGSIOS + {0x9F89, 0xC6FE}, //5401 #HANGUL SYLLABLE IEUNG WE CIEUC + {0x9F8A, 0xC6FF}, //5402 #HANGUL SYLLABLE IEUNG WE CHIEUCH + {0x9F8B, 0xC700}, //5403 #HANGUL SYLLABLE IEUNG WE KHIEUKH + {0x9F8C, 0xC701}, //5404 #HANGUL SYLLABLE IEUNG WE THIEUTH + {0x9F8D, 0xC702}, //5405 #HANGUL SYLLABLE IEUNG WE PHIEUPH + {0x9F8E, 0xC703}, //5406 #HANGUL SYLLABLE IEUNG WE HIEUH + {0x9F8F, 0xC706}, //5407 #HANGUL SYLLABLE IEUNG WI SSANGKIYEOK + {0x9F90, 0xC707}, //5408 #HANGUL SYLLABLE IEUNG WI KIYEOKSIOS + {0x9F91, 0xC709}, //5409 #HANGUL SYLLABLE IEUNG WI NIEUNCIEUC + {0x9F92, 0xC70A}, //5410 #HANGUL SYLLABLE IEUNG WI NIEUNHIEUH + {0x9F93, 0xC70B}, //5411 #HANGUL SYLLABLE IEUNG WI TIKEUT + {0x9F94, 0xC70D}, //5412 #HANGUL SYLLABLE IEUNG WI RIEULKIYEOK + {0x9F95, 0xC70E}, //5413 #HANGUL SYLLABLE IEUNG WI RIEULMIEUM + {0x9F96, 0xC70F}, //5414 #HANGUL SYLLABLE IEUNG WI RIEULPIEUP + {0x9F97, 0xC710}, //5415 #HANGUL SYLLABLE IEUNG WI RIEULSIOS + {0x9F98, 0xC711}, //5416 #HANGUL SYLLABLE IEUNG WI RIEULTHIEUTH + {0x9F99, 0xC712}, //5417 #HANGUL SYLLABLE IEUNG WI RIEULPHIEUPH + {0x9F9A, 0xC713}, //5418 #HANGUL SYLLABLE IEUNG WI RIEULHIEUH + {0x9F9B, 0xC716}, //5419 #HANGUL SYLLABLE IEUNG WI PIEUPSIOS + {0x9F9C, 0xC718}, //5420 #HANGUL SYLLABLE IEUNG WI SSANGSIOS + {0x9F9D, 0xC71A}, //5421 #HANGUL SYLLABLE IEUNG WI CIEUC + {0x9F9E, 0xC71B}, //5422 #HANGUL SYLLABLE IEUNG WI CHIEUCH + {0x9F9F, 0xC71C}, //5423 #HANGUL SYLLABLE IEUNG WI KHIEUKH + {0x9FA0, 0xC71D}, //5424 #HANGUL SYLLABLE IEUNG WI THIEUTH + {0x9FA1, 0xC71E}, //5425 #HANGUL SYLLABLE IEUNG WI PHIEUPH + {0x9FA2, 0xC71F}, //5426 #HANGUL SYLLABLE IEUNG WI HIEUH + {0x9FA3, 0xC722}, //5427 #HANGUL SYLLABLE IEUNG YU SSANGKIYEOK + {0x9FA4, 0xC723}, //5428 #HANGUL SYLLABLE IEUNG YU KIYEOKSIOS + {0x9FA5, 0xC725}, //5429 #HANGUL SYLLABLE IEUNG YU NIEUNCIEUC + {0x9FA6, 0xC726}, //5430 #HANGUL SYLLABLE IEUNG YU NIEUNHIEUH + {0x9FA7, 0xC727}, //5431 #HANGUL SYLLABLE IEUNG YU TIKEUT + {0x9FA8, 0xC729}, //5432 #HANGUL SYLLABLE IEUNG YU RIEULKIYEOK + {0x9FA9, 0xC72A}, //5433 #HANGUL SYLLABLE IEUNG YU RIEULMIEUM + {0x9FAA, 0xC72B}, //5434 #HANGUL SYLLABLE IEUNG YU RIEULPIEUP + {0x9FAB, 0xC72C}, //5435 #HANGUL SYLLABLE IEUNG YU RIEULSIOS + {0x9FAC, 0xC72D}, //5436 #HANGUL SYLLABLE IEUNG YU RIEULTHIEUTH + {0x9FAD, 0xC72E}, //5437 #HANGUL SYLLABLE IEUNG YU RIEULPHIEUPH + {0x9FAE, 0xC72F}, //5438 #HANGUL SYLLABLE IEUNG YU RIEULHIEUH + {0x9FAF, 0xC732}, //5439 #HANGUL SYLLABLE IEUNG YU PIEUPSIOS + {0x9FB0, 0xC734}, //5440 #HANGUL SYLLABLE IEUNG YU SSANGSIOS + {0x9FB1, 0xC736}, //5441 #HANGUL SYLLABLE IEUNG YU CIEUC + {0x9FB2, 0xC738}, //5442 #HANGUL SYLLABLE IEUNG YU KHIEUKH + {0x9FB3, 0xC739}, //5443 #HANGUL SYLLABLE IEUNG YU THIEUTH + {0x9FB4, 0xC73A}, //5444 #HANGUL SYLLABLE IEUNG YU PHIEUPH + {0x9FB5, 0xC73B}, //5445 #HANGUL SYLLABLE IEUNG YU HIEUH + {0x9FB6, 0xC73E}, //5446 #HANGUL SYLLABLE IEUNG EU SSANGKIYEOK + {0x9FB7, 0xC73F}, //5447 #HANGUL SYLLABLE IEUNG EU KIYEOKSIOS + {0x9FB8, 0xC741}, //5448 #HANGUL SYLLABLE IEUNG EU NIEUNCIEUC + {0x9FB9, 0xC742}, //5449 #HANGUL SYLLABLE IEUNG EU NIEUNHIEUH + {0x9FBA, 0xC743}, //5450 #HANGUL SYLLABLE IEUNG EU TIKEUT + {0x9FBB, 0xC745}, //5451 #HANGUL SYLLABLE IEUNG EU RIEULKIYEOK + {0x9FBC, 0xC746}, //5452 #HANGUL SYLLABLE IEUNG EU RIEULMIEUM + {0x9FBD, 0xC747}, //5453 #HANGUL SYLLABLE IEUNG EU RIEULPIEUP + {0x9FBE, 0xC748}, //5454 #HANGUL SYLLABLE IEUNG EU RIEULSIOS + {0x9FBF, 0xC749}, //5455 #HANGUL SYLLABLE IEUNG EU RIEULTHIEUTH + {0x9FC0, 0xC74B}, //5456 #HANGUL SYLLABLE IEUNG EU RIEULHIEUH + {0x9FC1, 0xC74E}, //5457 #HANGUL SYLLABLE IEUNG EU PIEUPSIOS + {0x9FC2, 0xC750}, //5458 #HANGUL SYLLABLE IEUNG EU SSANGSIOS + {0x9FC3, 0xC759}, //5459 #HANGUL SYLLABLE IEUNG YI KIYEOK + {0x9FC4, 0xC75A}, //5460 #HANGUL SYLLABLE IEUNG YI SSANGKIYEOK + {0x9FC5, 0xC75B}, //5461 #HANGUL SYLLABLE IEUNG YI KIYEOKSIOS + {0x9FC6, 0xC75D}, //5462 #HANGUL SYLLABLE IEUNG YI NIEUNCIEUC + {0x9FC7, 0xC75E}, //5463 #HANGUL SYLLABLE IEUNG YI NIEUNHIEUH + {0x9FC8, 0xC75F}, //5464 #HANGUL SYLLABLE IEUNG YI TIKEUT + {0x9FC9, 0xC761}, //5465 #HANGUL SYLLABLE IEUNG YI RIEULKIYEOK + {0x9FCA, 0xC762}, //5466 #HANGUL SYLLABLE IEUNG YI RIEULMIEUM + {0x9FCB, 0xC763}, //5467 #HANGUL SYLLABLE IEUNG YI RIEULPIEUP + {0x9FCC, 0xC764}, //5468 #HANGUL SYLLABLE IEUNG YI RIEULSIOS + {0x9FCD, 0xC765}, //5469 #HANGUL SYLLABLE IEUNG YI RIEULTHIEUTH + {0x9FCE, 0xC766}, //5470 #HANGUL SYLLABLE IEUNG YI RIEULPHIEUPH + {0x9FCF, 0xC767}, //5471 #HANGUL SYLLABLE IEUNG YI RIEULHIEUH + {0x9FD0, 0xC769}, //5472 #HANGUL SYLLABLE IEUNG YI PIEUP + {0x9FD1, 0xC76A}, //5473 #HANGUL SYLLABLE IEUNG YI PIEUPSIOS + {0x9FD2, 0xC76C}, //5474 #HANGUL SYLLABLE IEUNG YI SSANGSIOS + {0x9FD3, 0xC76D}, //5475 #HANGUL SYLLABLE IEUNG YI IEUNG + {0x9FD4, 0xC76E}, //5476 #HANGUL SYLLABLE IEUNG YI CIEUC + {0x9FD5, 0xC76F}, //5477 #HANGUL SYLLABLE IEUNG YI CHIEUCH + {0x9FD6, 0xC770}, //5478 #HANGUL SYLLABLE IEUNG YI KHIEUKH + {0x9FD7, 0xC771}, //5479 #HANGUL SYLLABLE IEUNG YI THIEUTH + {0x9FD8, 0xC772}, //5480 #HANGUL SYLLABLE IEUNG YI PHIEUPH + {0x9FD9, 0xC773}, //5481 #HANGUL SYLLABLE IEUNG YI HIEUH + {0x9FDA, 0xC776}, //5482 #HANGUL SYLLABLE IEUNG I SSANGKIYEOK + {0x9FDB, 0xC777}, //5483 #HANGUL SYLLABLE IEUNG I KIYEOKSIOS + {0x9FDC, 0xC779}, //5484 #HANGUL SYLLABLE IEUNG I NIEUNCIEUC + {0x9FDD, 0xC77A}, //5485 #HANGUL SYLLABLE IEUNG I NIEUNHIEUH + {0x9FDE, 0xC77B}, //5486 #HANGUL SYLLABLE IEUNG I TIKEUT + {0x9FDF, 0xC77F}, //5487 #HANGUL SYLLABLE IEUNG I RIEULPIEUP + {0x9FE0, 0xC780}, //5488 #HANGUL SYLLABLE IEUNG I RIEULSIOS + {0x9FE1, 0xC781}, //5489 #HANGUL SYLLABLE IEUNG I RIEULTHIEUTH + {0x9FE2, 0xC782}, //5490 #HANGUL SYLLABLE IEUNG I RIEULPHIEUPH + {0x9FE3, 0xC786}, //5491 #HANGUL SYLLABLE IEUNG I PIEUPSIOS + {0x9FE4, 0xC78B}, //5492 #HANGUL SYLLABLE IEUNG I CHIEUCH + {0x9FE5, 0xC78C}, //5493 #HANGUL SYLLABLE IEUNG I KHIEUKH + {0x9FE6, 0xC78D}, //5494 #HANGUL SYLLABLE IEUNG I THIEUTH + {0x9FE7, 0xC78F}, //5495 #HANGUL SYLLABLE IEUNG I HIEUH + {0x9FE8, 0xC792}, //5496 #HANGUL SYLLABLE CIEUC A SSANGKIYEOK + {0x9FE9, 0xC793}, //5497 #HANGUL SYLLABLE CIEUC A KIYEOKSIOS + {0x9FEA, 0xC795}, //5498 #HANGUL SYLLABLE CIEUC A NIEUNCIEUC + {0x9FEB, 0xC799}, //5499 #HANGUL SYLLABLE CIEUC A RIEULKIYEOK + {0x9FEC, 0xC79B}, //5500 #HANGUL SYLLABLE CIEUC A RIEULPIEUP + {0x9FED, 0xC79C}, //5501 #HANGUL SYLLABLE CIEUC A RIEULSIOS + {0x9FEE, 0xC79D}, //5502 #HANGUL SYLLABLE CIEUC A RIEULTHIEUTH + {0x9FEF, 0xC79E}, //5503 #HANGUL SYLLABLE CIEUC A RIEULPHIEUPH + {0x9FF0, 0xC79F}, //5504 #HANGUL SYLLABLE CIEUC A RIEULHIEUH + {0x9FF1, 0xC7A2}, //5505 #HANGUL SYLLABLE CIEUC A PIEUPSIOS + {0x9FF2, 0xC7A7}, //5506 #HANGUL SYLLABLE CIEUC A CHIEUCH + {0x9FF3, 0xC7A8}, //5507 #HANGUL SYLLABLE CIEUC A KHIEUKH + {0x9FF4, 0xC7A9}, //5508 #HANGUL SYLLABLE CIEUC A THIEUTH + {0x9FF5, 0xC7AA}, //5509 #HANGUL SYLLABLE CIEUC A PHIEUPH + {0x9FF6, 0xC7AB}, //5510 #HANGUL SYLLABLE CIEUC A HIEUH + {0x9FF7, 0xC7AE}, //5511 #HANGUL SYLLABLE CIEUC AE SSANGKIYEOK + {0x9FF8, 0xC7AF}, //5512 #HANGUL SYLLABLE CIEUC AE KIYEOKSIOS + {0x9FF9, 0xC7B1}, //5513 #HANGUL SYLLABLE CIEUC AE NIEUNCIEUC + {0x9FFA, 0xC7B2}, //5514 #HANGUL SYLLABLE CIEUC AE NIEUNHIEUH + {0x9FFB, 0xC7B3}, //5515 #HANGUL SYLLABLE CIEUC AE TIKEUT + {0x9FFC, 0xC7B5}, //5516 #HANGUL SYLLABLE CIEUC AE RIEULKIYEOK + {0x9FFD, 0xC7B6}, //5517 #HANGUL SYLLABLE CIEUC AE RIEULMIEUM + {0x9FFE, 0xC7B7}, //5518 #HANGUL SYLLABLE CIEUC AE RIEULPIEUP + {0xA041, 0xC7B8}, //5519 #HANGUL SYLLABLE CIEUC AE RIEULSIOS + {0xA042, 0xC7B9}, //5520 #HANGUL SYLLABLE CIEUC AE RIEULTHIEUTH + {0xA043, 0xC7BA}, //5521 #HANGUL SYLLABLE CIEUC AE RIEULPHIEUPH + {0xA044, 0xC7BB}, //5522 #HANGUL SYLLABLE CIEUC AE RIEULHIEUH + {0xA045, 0xC7BE}, //5523 #HANGUL SYLLABLE CIEUC AE PIEUPSIOS + {0xA046, 0xC7C2}, //5524 #HANGUL SYLLABLE CIEUC AE CIEUC + {0xA047, 0xC7C3}, //5525 #HANGUL SYLLABLE CIEUC AE CHIEUCH + {0xA048, 0xC7C4}, //5526 #HANGUL SYLLABLE CIEUC AE KHIEUKH + {0xA049, 0xC7C5}, //5527 #HANGUL SYLLABLE CIEUC AE THIEUTH + {0xA04A, 0xC7C6}, //5528 #HANGUL SYLLABLE CIEUC AE PHIEUPH + {0xA04B, 0xC7C7}, //5529 #HANGUL SYLLABLE CIEUC AE HIEUH + {0xA04C, 0xC7CA}, //5530 #HANGUL SYLLABLE CIEUC YA SSANGKIYEOK + {0xA04D, 0xC7CB}, //5531 #HANGUL SYLLABLE CIEUC YA KIYEOKSIOS + {0xA04E, 0xC7CD}, //5532 #HANGUL SYLLABLE CIEUC YA NIEUNCIEUC + {0xA04F, 0xC7CF}, //5533 #HANGUL SYLLABLE CIEUC YA TIKEUT + {0xA050, 0xC7D1}, //5534 #HANGUL SYLLABLE CIEUC YA RIEULKIYEOK + {0xA051, 0xC7D2}, //5535 #HANGUL SYLLABLE CIEUC YA RIEULMIEUM + {0xA052, 0xC7D3}, //5536 #HANGUL SYLLABLE CIEUC YA RIEULPIEUP + {0xA053, 0xC7D4}, //5537 #HANGUL SYLLABLE CIEUC YA RIEULSIOS + {0xA054, 0xC7D5}, //5538 #HANGUL SYLLABLE CIEUC YA RIEULTHIEUTH + {0xA055, 0xC7D6}, //5539 #HANGUL SYLLABLE CIEUC YA RIEULPHIEUPH + {0xA056, 0xC7D7}, //5540 #HANGUL SYLLABLE CIEUC YA RIEULHIEUH + {0xA057, 0xC7D9}, //5541 #HANGUL SYLLABLE CIEUC YA PIEUP + {0xA058, 0xC7DA}, //5542 #HANGUL SYLLABLE CIEUC YA PIEUPSIOS + {0xA059, 0xC7DB}, //5543 #HANGUL SYLLABLE CIEUC YA SIOS + {0xA05A, 0xC7DC}, //5544 #HANGUL SYLLABLE CIEUC YA SSANGSIOS + {0xA061, 0xC7DE}, //5545 #HANGUL SYLLABLE CIEUC YA CIEUC + {0xA062, 0xC7DF}, //5546 #HANGUL SYLLABLE CIEUC YA CHIEUCH + {0xA063, 0xC7E0}, //5547 #HANGUL SYLLABLE CIEUC YA KHIEUKH + {0xA064, 0xC7E1}, //5548 #HANGUL SYLLABLE CIEUC YA THIEUTH + {0xA065, 0xC7E2}, //5549 #HANGUL SYLLABLE CIEUC YA PHIEUPH + {0xA066, 0xC7E3}, //5550 #HANGUL SYLLABLE CIEUC YA HIEUH + {0xA067, 0xC7E5}, //5551 #HANGUL SYLLABLE CIEUC YAE KIYEOK + {0xA068, 0xC7E6}, //5552 #HANGUL SYLLABLE CIEUC YAE SSANGKIYEOK + {0xA069, 0xC7E7}, //5553 #HANGUL SYLLABLE CIEUC YAE KIYEOKSIOS + {0xA06A, 0xC7E9}, //5554 #HANGUL SYLLABLE CIEUC YAE NIEUNCIEUC + {0xA06B, 0xC7EA}, //5555 #HANGUL SYLLABLE CIEUC YAE NIEUNHIEUH + {0xA06C, 0xC7EB}, //5556 #HANGUL SYLLABLE CIEUC YAE TIKEUT + {0xA06D, 0xC7ED}, //5557 #HANGUL SYLLABLE CIEUC YAE RIEULKIYEOK + {0xA06E, 0xC7EE}, //5558 #HANGUL SYLLABLE CIEUC YAE RIEULMIEUM + {0xA06F, 0xC7EF}, //5559 #HANGUL SYLLABLE CIEUC YAE RIEULPIEUP + {0xA070, 0xC7F0}, //5560 #HANGUL SYLLABLE CIEUC YAE RIEULSIOS + {0xA071, 0xC7F1}, //5561 #HANGUL SYLLABLE CIEUC YAE RIEULTHIEUTH + {0xA072, 0xC7F2}, //5562 #HANGUL SYLLABLE CIEUC YAE RIEULPHIEUPH + {0xA073, 0xC7F3}, //5563 #HANGUL SYLLABLE CIEUC YAE RIEULHIEUH + {0xA074, 0xC7F4}, //5564 #HANGUL SYLLABLE CIEUC YAE MIEUM + {0xA075, 0xC7F5}, //5565 #HANGUL SYLLABLE CIEUC YAE PIEUP + {0xA076, 0xC7F6}, //5566 #HANGUL SYLLABLE CIEUC YAE PIEUPSIOS + {0xA077, 0xC7F7}, //5567 #HANGUL SYLLABLE CIEUC YAE SIOS + {0xA078, 0xC7F8}, //5568 #HANGUL SYLLABLE CIEUC YAE SSANGSIOS + {0xA079, 0xC7F9}, //5569 #HANGUL SYLLABLE CIEUC YAE IEUNG + {0xA07A, 0xC7FA}, //5570 #HANGUL SYLLABLE CIEUC YAE CIEUC + {0xA081, 0xC7FB}, //5571 #HANGUL SYLLABLE CIEUC YAE CHIEUCH + {0xA082, 0xC7FC}, //5572 #HANGUL SYLLABLE CIEUC YAE KHIEUKH + {0xA083, 0xC7FD}, //5573 #HANGUL SYLLABLE CIEUC YAE THIEUTH + {0xA084, 0xC7FE}, //5574 #HANGUL SYLLABLE CIEUC YAE PHIEUPH + {0xA085, 0xC7FF}, //5575 #HANGUL SYLLABLE CIEUC YAE HIEUH + {0xA086, 0xC802}, //5576 #HANGUL SYLLABLE CIEUC EO SSANGKIYEOK + {0xA087, 0xC803}, //5577 #HANGUL SYLLABLE CIEUC EO KIYEOKSIOS + {0xA088, 0xC805}, //5578 #HANGUL SYLLABLE CIEUC EO NIEUNCIEUC + {0xA089, 0xC806}, //5579 #HANGUL SYLLABLE CIEUC EO NIEUNHIEUH + {0xA08A, 0xC807}, //5580 #HANGUL SYLLABLE CIEUC EO TIKEUT + {0xA08B, 0xC809}, //5581 #HANGUL SYLLABLE CIEUC EO RIEULKIYEOK + {0xA08C, 0xC80B}, //5582 #HANGUL SYLLABLE CIEUC EO RIEULPIEUP + {0xA08D, 0xC80C}, //5583 #HANGUL SYLLABLE CIEUC EO RIEULSIOS + {0xA08E, 0xC80D}, //5584 #HANGUL SYLLABLE CIEUC EO RIEULTHIEUTH + {0xA08F, 0xC80E}, //5585 #HANGUL SYLLABLE CIEUC EO RIEULPHIEUPH + {0xA090, 0xC80F}, //5586 #HANGUL SYLLABLE CIEUC EO RIEULHIEUH + {0xA091, 0xC812}, //5587 #HANGUL SYLLABLE CIEUC EO PIEUPSIOS + {0xA092, 0xC814}, //5588 #HANGUL SYLLABLE CIEUC EO SSANGSIOS + {0xA093, 0xC817}, //5589 #HANGUL SYLLABLE CIEUC EO CHIEUCH + {0xA094, 0xC818}, //5590 #HANGUL SYLLABLE CIEUC EO KHIEUKH + {0xA095, 0xC819}, //5591 #HANGUL SYLLABLE CIEUC EO THIEUTH + {0xA096, 0xC81A}, //5592 #HANGUL SYLLABLE CIEUC EO PHIEUPH + {0xA097, 0xC81B}, //5593 #HANGUL SYLLABLE CIEUC EO HIEUH + {0xA098, 0xC81E}, //5594 #HANGUL SYLLABLE CIEUC E SSANGKIYEOK + {0xA099, 0xC81F}, //5595 #HANGUL SYLLABLE CIEUC E KIYEOKSIOS + {0xA09A, 0xC821}, //5596 #HANGUL SYLLABLE CIEUC E NIEUNCIEUC + {0xA09B, 0xC822}, //5597 #HANGUL SYLLABLE CIEUC E NIEUNHIEUH + {0xA09C, 0xC823}, //5598 #HANGUL SYLLABLE CIEUC E TIKEUT + {0xA09D, 0xC825}, //5599 #HANGUL SYLLABLE CIEUC E RIEULKIYEOK + {0xA09E, 0xC826}, //5600 #HANGUL SYLLABLE CIEUC E RIEULMIEUM + {0xA09F, 0xC827}, //5601 #HANGUL SYLLABLE CIEUC E RIEULPIEUP + {0xA0A0, 0xC828}, //5602 #HANGUL SYLLABLE CIEUC E RIEULSIOS + {0xA0A1, 0xC829}, //5603 #HANGUL SYLLABLE CIEUC E RIEULTHIEUTH + {0xA0A2, 0xC82A}, //5604 #HANGUL SYLLABLE CIEUC E RIEULPHIEUPH + {0xA0A3, 0xC82B}, //5605 #HANGUL SYLLABLE CIEUC E RIEULHIEUH + {0xA0A4, 0xC82E}, //5606 #HANGUL SYLLABLE CIEUC E PIEUPSIOS + {0xA0A5, 0xC830}, //5607 #HANGUL SYLLABLE CIEUC E SSANGSIOS + {0xA0A6, 0xC832}, //5608 #HANGUL SYLLABLE CIEUC E CIEUC + {0xA0A7, 0xC833}, //5609 #HANGUL SYLLABLE CIEUC E CHIEUCH + {0xA0A8, 0xC834}, //5610 #HANGUL SYLLABLE CIEUC E KHIEUKH + {0xA0A9, 0xC835}, //5611 #HANGUL SYLLABLE CIEUC E THIEUTH + {0xA0AA, 0xC836}, //5612 #HANGUL SYLLABLE CIEUC E PHIEUPH + {0xA0AB, 0xC837}, //5613 #HANGUL SYLLABLE CIEUC E HIEUH + {0xA0AC, 0xC839}, //5614 #HANGUL SYLLABLE CIEUC YEO KIYEOK + {0xA0AD, 0xC83A}, //5615 #HANGUL SYLLABLE CIEUC YEO SSANGKIYEOK + {0xA0AE, 0xC83B}, //5616 #HANGUL SYLLABLE CIEUC YEO KIYEOKSIOS + {0xA0AF, 0xC83D}, //5617 #HANGUL SYLLABLE CIEUC YEO NIEUNCIEUC + {0xA0B0, 0xC83E}, //5618 #HANGUL SYLLABLE CIEUC YEO NIEUNHIEUH + {0xA0B1, 0xC83F}, //5619 #HANGUL SYLLABLE CIEUC YEO TIKEUT + {0xA0B2, 0xC841}, //5620 #HANGUL SYLLABLE CIEUC YEO RIEULKIYEOK + {0xA0B3, 0xC842}, //5621 #HANGUL SYLLABLE CIEUC YEO RIEULMIEUM + {0xA0B4, 0xC843}, //5622 #HANGUL SYLLABLE CIEUC YEO RIEULPIEUP + {0xA0B5, 0xC844}, //5623 #HANGUL SYLLABLE CIEUC YEO RIEULSIOS + {0xA0B6, 0xC845}, //5624 #HANGUL SYLLABLE CIEUC YEO RIEULTHIEUTH + {0xA0B7, 0xC846}, //5625 #HANGUL SYLLABLE CIEUC YEO RIEULPHIEUPH + {0xA0B8, 0xC847}, //5626 #HANGUL SYLLABLE CIEUC YEO RIEULHIEUH + {0xA0B9, 0xC84A}, //5627 #HANGUL SYLLABLE CIEUC YEO PIEUPSIOS + {0xA0BA, 0xC84B}, //5628 #HANGUL SYLLABLE CIEUC YEO SIOS + {0xA0BB, 0xC84E}, //5629 #HANGUL SYLLABLE CIEUC YEO CIEUC + {0xA0BC, 0xC84F}, //5630 #HANGUL SYLLABLE CIEUC YEO CHIEUCH + {0xA0BD, 0xC850}, //5631 #HANGUL SYLLABLE CIEUC YEO KHIEUKH + {0xA0BE, 0xC851}, //5632 #HANGUL SYLLABLE CIEUC YEO THIEUTH + {0xA0BF, 0xC852}, //5633 #HANGUL SYLLABLE CIEUC YEO PHIEUPH + {0xA0C0, 0xC853}, //5634 #HANGUL SYLLABLE CIEUC YEO HIEUH + {0xA0C1, 0xC855}, //5635 #HANGUL SYLLABLE CIEUC YE KIYEOK + {0xA0C2, 0xC856}, //5636 #HANGUL SYLLABLE CIEUC YE SSANGKIYEOK + {0xA0C3, 0xC857}, //5637 #HANGUL SYLLABLE CIEUC YE KIYEOKSIOS + {0xA0C4, 0xC858}, //5638 #HANGUL SYLLABLE CIEUC YE NIEUN + {0xA0C5, 0xC859}, //5639 #HANGUL SYLLABLE CIEUC YE NIEUNCIEUC + {0xA0C6, 0xC85A}, //5640 #HANGUL SYLLABLE CIEUC YE NIEUNHIEUH + {0xA0C7, 0xC85B}, //5641 #HANGUL SYLLABLE CIEUC YE TIKEUT + {0xA0C8, 0xC85C}, //5642 #HANGUL SYLLABLE CIEUC YE RIEUL + {0xA0C9, 0xC85D}, //5643 #HANGUL SYLLABLE CIEUC YE RIEULKIYEOK + {0xA0CA, 0xC85E}, //5644 #HANGUL SYLLABLE CIEUC YE RIEULMIEUM + {0xA0CB, 0xC85F}, //5645 #HANGUL SYLLABLE CIEUC YE RIEULPIEUP + {0xA0CC, 0xC860}, //5646 #HANGUL SYLLABLE CIEUC YE RIEULSIOS + {0xA0CD, 0xC861}, //5647 #HANGUL SYLLABLE CIEUC YE RIEULTHIEUTH + {0xA0CE, 0xC862}, //5648 #HANGUL SYLLABLE CIEUC YE RIEULPHIEUPH + {0xA0CF, 0xC863}, //5649 #HANGUL SYLLABLE CIEUC YE RIEULHIEUH + {0xA0D0, 0xC864}, //5650 #HANGUL SYLLABLE CIEUC YE MIEUM + {0xA0D1, 0xC865}, //5651 #HANGUL SYLLABLE CIEUC YE PIEUP + {0xA0D2, 0xC866}, //5652 #HANGUL SYLLABLE CIEUC YE PIEUPSIOS + {0xA0D3, 0xC867}, //5653 #HANGUL SYLLABLE CIEUC YE SIOS + {0xA0D4, 0xC868}, //5654 #HANGUL SYLLABLE CIEUC YE SSANGSIOS + {0xA0D5, 0xC869}, //5655 #HANGUL SYLLABLE CIEUC YE IEUNG + {0xA0D6, 0xC86A}, //5656 #HANGUL SYLLABLE CIEUC YE CIEUC + {0xA0D7, 0xC86B}, //5657 #HANGUL SYLLABLE CIEUC YE CHIEUCH + {0xA0D8, 0xC86C}, //5658 #HANGUL SYLLABLE CIEUC YE KHIEUKH + {0xA0D9, 0xC86D}, //5659 #HANGUL SYLLABLE CIEUC YE THIEUTH + {0xA0DA, 0xC86E}, //5660 #HANGUL SYLLABLE CIEUC YE PHIEUPH + {0xA0DB, 0xC86F}, //5661 #HANGUL SYLLABLE CIEUC YE HIEUH + {0xA0DC, 0xC872}, //5662 #HANGUL SYLLABLE CIEUC O SSANGKIYEOK + {0xA0DD, 0xC873}, //5663 #HANGUL SYLLABLE CIEUC O KIYEOKSIOS + {0xA0DE, 0xC875}, //5664 #HANGUL SYLLABLE CIEUC O NIEUNCIEUC + {0xA0DF, 0xC876}, //5665 #HANGUL SYLLABLE CIEUC O NIEUNHIEUH + {0xA0E0, 0xC877}, //5666 #HANGUL SYLLABLE CIEUC O TIKEUT + {0xA0E1, 0xC879}, //5667 #HANGUL SYLLABLE CIEUC O RIEULKIYEOK + {0xA0E2, 0xC87B}, //5668 #HANGUL SYLLABLE CIEUC O RIEULPIEUP + {0xA0E3, 0xC87C}, //5669 #HANGUL SYLLABLE CIEUC O RIEULSIOS + {0xA0E4, 0xC87D}, //5670 #HANGUL SYLLABLE CIEUC O RIEULTHIEUTH + {0xA0E5, 0xC87E}, //5671 #HANGUL SYLLABLE CIEUC O RIEULPHIEUPH + {0xA0E6, 0xC87F}, //5672 #HANGUL SYLLABLE CIEUC O RIEULHIEUH + {0xA0E7, 0xC882}, //5673 #HANGUL SYLLABLE CIEUC O PIEUPSIOS + {0xA0E8, 0xC884}, //5674 #HANGUL SYLLABLE CIEUC O SSANGSIOS + {0xA0E9, 0xC888}, //5675 #HANGUL SYLLABLE CIEUC O KHIEUKH + {0xA0EA, 0xC889}, //5676 #HANGUL SYLLABLE CIEUC O THIEUTH + {0xA0EB, 0xC88A}, //5677 #HANGUL SYLLABLE CIEUC O PHIEUPH + {0xA0EC, 0xC88E}, //5678 #HANGUL SYLLABLE CIEUC WA SSANGKIYEOK + {0xA0ED, 0xC88F}, //5679 #HANGUL SYLLABLE CIEUC WA KIYEOKSIOS + {0xA0EE, 0xC890}, //5680 #HANGUL SYLLABLE CIEUC WA NIEUN + {0xA0EF, 0xC891}, //5681 #HANGUL SYLLABLE CIEUC WA NIEUNCIEUC + {0xA0F0, 0xC892}, //5682 #HANGUL SYLLABLE CIEUC WA NIEUNHIEUH + {0xA0F1, 0xC893}, //5683 #HANGUL SYLLABLE CIEUC WA TIKEUT + {0xA0F2, 0xC895}, //5684 #HANGUL SYLLABLE CIEUC WA RIEULKIYEOK + {0xA0F3, 0xC896}, //5685 #HANGUL SYLLABLE CIEUC WA RIEULMIEUM + {0xA0F4, 0xC897}, //5686 #HANGUL SYLLABLE CIEUC WA RIEULPIEUP + {0xA0F5, 0xC898}, //5687 #HANGUL SYLLABLE CIEUC WA RIEULSIOS + {0xA0F6, 0xC899}, //5688 #HANGUL SYLLABLE CIEUC WA RIEULTHIEUTH + {0xA0F7, 0xC89A}, //5689 #HANGUL SYLLABLE CIEUC WA RIEULPHIEUPH + {0xA0F8, 0xC89B}, //5690 #HANGUL SYLLABLE CIEUC WA RIEULHIEUH + {0xA0F9, 0xC89C}, //5691 #HANGUL SYLLABLE CIEUC WA MIEUM + {0xA0FA, 0xC89E}, //5692 #HANGUL SYLLABLE CIEUC WA PIEUPSIOS + {0xA0FB, 0xC8A0}, //5693 #HANGUL SYLLABLE CIEUC WA SSANGSIOS + {0xA0FC, 0xC8A2}, //5694 #HANGUL SYLLABLE CIEUC WA CIEUC + {0xA0FD, 0xC8A3}, //5695 #HANGUL SYLLABLE CIEUC WA CHIEUCH + {0xA0FE, 0xC8A4}, //5696 #HANGUL SYLLABLE CIEUC WA KHIEUKH + {0xA141, 0xC8A5}, //5697 #HANGUL SYLLABLE CIEUC WA THIEUTH + {0xA142, 0xC8A6}, //5698 #HANGUL SYLLABLE CIEUC WA PHIEUPH + {0xA143, 0xC8A7}, //5699 #HANGUL SYLLABLE CIEUC WA HIEUH + {0xA144, 0xC8A9}, //5700 #HANGUL SYLLABLE CIEUC WAE KIYEOK + {0xA145, 0xC8AA}, //5701 #HANGUL SYLLABLE CIEUC WAE SSANGKIYEOK + {0xA146, 0xC8AB}, //5702 #HANGUL SYLLABLE CIEUC WAE KIYEOKSIOS + {0xA147, 0xC8AC}, //5703 #HANGUL SYLLABLE CIEUC WAE NIEUN + {0xA148, 0xC8AD}, //5704 #HANGUL SYLLABLE CIEUC WAE NIEUNCIEUC + {0xA149, 0xC8AE}, //5705 #HANGUL SYLLABLE CIEUC WAE NIEUNHIEUH + {0xA14A, 0xC8AF}, //5706 #HANGUL SYLLABLE CIEUC WAE TIKEUT + {0xA14B, 0xC8B0}, //5707 #HANGUL SYLLABLE CIEUC WAE RIEUL + {0xA14C, 0xC8B1}, //5708 #HANGUL SYLLABLE CIEUC WAE RIEULKIYEOK + {0xA14D, 0xC8B2}, //5709 #HANGUL SYLLABLE CIEUC WAE RIEULMIEUM + {0xA14E, 0xC8B3}, //5710 #HANGUL SYLLABLE CIEUC WAE RIEULPIEUP + {0xA14F, 0xC8B4}, //5711 #HANGUL SYLLABLE CIEUC WAE RIEULSIOS + {0xA150, 0xC8B5}, //5712 #HANGUL SYLLABLE CIEUC WAE RIEULTHIEUTH + {0xA151, 0xC8B6}, //5713 #HANGUL SYLLABLE CIEUC WAE RIEULPHIEUPH + {0xA152, 0xC8B7}, //5714 #HANGUL SYLLABLE CIEUC WAE RIEULHIEUH + {0xA153, 0xC8B8}, //5715 #HANGUL SYLLABLE CIEUC WAE MIEUM + {0xA154, 0xC8B9}, //5716 #HANGUL SYLLABLE CIEUC WAE PIEUP + {0xA155, 0xC8BA}, //5717 #HANGUL SYLLABLE CIEUC WAE PIEUPSIOS + {0xA156, 0xC8BB}, //5718 #HANGUL SYLLABLE CIEUC WAE SIOS + {0xA157, 0xC8BE}, //5719 #HANGUL SYLLABLE CIEUC WAE CIEUC + {0xA158, 0xC8BF}, //5720 #HANGUL SYLLABLE CIEUC WAE CHIEUCH + {0xA159, 0xC8C0}, //5721 #HANGUL SYLLABLE CIEUC WAE KHIEUKH + {0xA15A, 0xC8C1}, //5722 #HANGUL SYLLABLE CIEUC WAE THIEUTH + {0xA161, 0xC8C2}, //5723 #HANGUL SYLLABLE CIEUC WAE PHIEUPH + {0xA162, 0xC8C3}, //5724 #HANGUL SYLLABLE CIEUC WAE HIEUH + {0xA163, 0xC8C5}, //5725 #HANGUL SYLLABLE CIEUC OE KIYEOK + {0xA164, 0xC8C6}, //5726 #HANGUL SYLLABLE CIEUC OE SSANGKIYEOK + {0xA165, 0xC8C7}, //5727 #HANGUL SYLLABLE CIEUC OE KIYEOKSIOS + {0xA166, 0xC8C9}, //5728 #HANGUL SYLLABLE CIEUC OE NIEUNCIEUC + {0xA167, 0xC8CA}, //5729 #HANGUL SYLLABLE CIEUC OE NIEUNHIEUH + {0xA168, 0xC8CB}, //5730 #HANGUL SYLLABLE CIEUC OE TIKEUT + {0xA169, 0xC8CD}, //5731 #HANGUL SYLLABLE CIEUC OE RIEULKIYEOK + {0xA16A, 0xC8CE}, //5732 #HANGUL SYLLABLE CIEUC OE RIEULMIEUM + {0xA16B, 0xC8CF}, //5733 #HANGUL SYLLABLE CIEUC OE RIEULPIEUP + {0xA16C, 0xC8D0}, //5734 #HANGUL SYLLABLE CIEUC OE RIEULSIOS + {0xA16D, 0xC8D1}, //5735 #HANGUL SYLLABLE CIEUC OE RIEULTHIEUTH + {0xA16E, 0xC8D2}, //5736 #HANGUL SYLLABLE CIEUC OE RIEULPHIEUPH + {0xA16F, 0xC8D3}, //5737 #HANGUL SYLLABLE CIEUC OE RIEULHIEUH + {0xA170, 0xC8D6}, //5738 #HANGUL SYLLABLE CIEUC OE PIEUPSIOS + {0xA171, 0xC8D8}, //5739 #HANGUL SYLLABLE CIEUC OE SSANGSIOS + {0xA172, 0xC8DA}, //5740 #HANGUL SYLLABLE CIEUC OE CIEUC + {0xA173, 0xC8DB}, //5741 #HANGUL SYLLABLE CIEUC OE CHIEUCH + {0xA174, 0xC8DC}, //5742 #HANGUL SYLLABLE CIEUC OE KHIEUKH + {0xA175, 0xC8DD}, //5743 #HANGUL SYLLABLE CIEUC OE THIEUTH + {0xA176, 0xC8DE}, //5744 #HANGUL SYLLABLE CIEUC OE PHIEUPH + {0xA177, 0xC8DF}, //5745 #HANGUL SYLLABLE CIEUC OE HIEUH + {0xA178, 0xC8E2}, //5746 #HANGUL SYLLABLE CIEUC YO SSANGKIYEOK + {0xA179, 0xC8E3}, //5747 #HANGUL SYLLABLE CIEUC YO KIYEOKSIOS + {0xA17A, 0xC8E5}, //5748 #HANGUL SYLLABLE CIEUC YO NIEUNCIEUC + {0xA181, 0xC8E6}, //5749 #HANGUL SYLLABLE CIEUC YO NIEUNHIEUH + {0xA182, 0xC8E7}, //5750 #HANGUL SYLLABLE CIEUC YO TIKEUT + {0xA183, 0xC8E8}, //5751 #HANGUL SYLLABLE CIEUC YO RIEUL + {0xA184, 0xC8E9}, //5752 #HANGUL SYLLABLE CIEUC YO RIEULKIYEOK + {0xA185, 0xC8EA}, //5753 #HANGUL SYLLABLE CIEUC YO RIEULMIEUM + {0xA186, 0xC8EB}, //5754 #HANGUL SYLLABLE CIEUC YO RIEULPIEUP + {0xA187, 0xC8EC}, //5755 #HANGUL SYLLABLE CIEUC YO RIEULSIOS + {0xA188, 0xC8ED}, //5756 #HANGUL SYLLABLE CIEUC YO RIEULTHIEUTH + {0xA189, 0xC8EE}, //5757 #HANGUL SYLLABLE CIEUC YO RIEULPHIEUPH + {0xA18A, 0xC8EF}, //5758 #HANGUL SYLLABLE CIEUC YO RIEULHIEUH + {0xA18B, 0xC8F0}, //5759 #HANGUL SYLLABLE CIEUC YO MIEUM + {0xA18C, 0xC8F1}, //5760 #HANGUL SYLLABLE CIEUC YO PIEUP + {0xA18D, 0xC8F2}, //5761 #HANGUL SYLLABLE CIEUC YO PIEUPSIOS + {0xA18E, 0xC8F3}, //5762 #HANGUL SYLLABLE CIEUC YO SIOS + {0xA18F, 0xC8F4}, //5763 #HANGUL SYLLABLE CIEUC YO SSANGSIOS + {0xA190, 0xC8F6}, //5764 #HANGUL SYLLABLE CIEUC YO CIEUC + {0xA191, 0xC8F7}, //5765 #HANGUL SYLLABLE CIEUC YO CHIEUCH + {0xA192, 0xC8F8}, //5766 #HANGUL SYLLABLE CIEUC YO KHIEUKH + {0xA193, 0xC8F9}, //5767 #HANGUL SYLLABLE CIEUC YO THIEUTH + {0xA194, 0xC8FA}, //5768 #HANGUL SYLLABLE CIEUC YO PHIEUPH + {0xA195, 0xC8FB}, //5769 #HANGUL SYLLABLE CIEUC YO HIEUH + {0xA196, 0xC8FE}, //5770 #HANGUL SYLLABLE CIEUC U SSANGKIYEOK + {0xA197, 0xC8FF}, //5771 #HANGUL SYLLABLE CIEUC U KIYEOKSIOS + {0xA198, 0xC901}, //5772 #HANGUL SYLLABLE CIEUC U NIEUNCIEUC + {0xA199, 0xC902}, //5773 #HANGUL SYLLABLE CIEUC U NIEUNHIEUH + {0xA19A, 0xC903}, //5774 #HANGUL SYLLABLE CIEUC U TIKEUT + {0xA19B, 0xC907}, //5775 #HANGUL SYLLABLE CIEUC U RIEULPIEUP + {0xA19C, 0xC908}, //5776 #HANGUL SYLLABLE CIEUC U RIEULSIOS + {0xA19D, 0xC909}, //5777 #HANGUL SYLLABLE CIEUC U RIEULTHIEUTH + {0xA19E, 0xC90A}, //5778 #HANGUL SYLLABLE CIEUC U RIEULPHIEUPH + {0xA19F, 0xC90B}, //5779 #HANGUL SYLLABLE CIEUC U RIEULHIEUH + {0xA1A0, 0xC90E}, //5780 #HANGUL SYLLABLE CIEUC U PIEUPSIOS + {0xA1A1, 0x3000}, //5781 #IDEOGRAPHIC SPACE + {0xA1A2, 0x3001}, //5782 #IDEOGRAPHIC COMMA + {0xA1A3, 0x3002}, //5783 #IDEOGRAPHIC FULL STOP + {0xA1A4, 0x00B7}, //5784 #MIDDLE DOT + {0xA1A5, 0x2025}, //5785 #TWO DOT LEADER + {0xA1A6, 0x2026}, //5786 #HORIZONTAL ELLIPSIS + {0xA1A7, 0x00A8}, //5787 #DIAERESIS + {0xA1A8, 0x3003}, //5788 #DITTO MARK + {0xA1A9, 0x00AD}, //5789 #SOFT HYPHEN + {0xA1AA, 0x2015}, //5790 #HORIZONTAL BAR + {0xA1AB, 0x2225}, //5791 #PARALLEL TO + {0xA1AC, 0xFF3C}, //5792 #FULLWIDTH REVERSE SOLIDUS + {0xA1AD, 0x223C}, //5793 #TILDE OPERATOR + {0xA1AE, 0x2018}, //5794 #LEFT SINGLE QUOTATION MARK + {0xA1AF, 0x2019}, //5795 #RIGHT SINGLE QUOTATION MARK + {0xA1B0, 0x201C}, //5796 #LEFT DOUBLE QUOTATION MARK + {0xA1B1, 0x201D}, //5797 #RIGHT DOUBLE QUOTATION MARK + {0xA1B2, 0x3014}, //5798 #LEFT TORTOISE SHELL BRACKET + {0xA1B3, 0x3015}, //5799 #RIGHT TORTOISE SHELL BRACKET + {0xA1B4, 0x3008}, //5800 #LEFT ANGLE BRACKET + {0xA1B5, 0x3009}, //5801 #RIGHT ANGLE BRACKET + {0xA1B6, 0x300A}, //5802 #LEFT DOUBLE ANGLE BRACKET + {0xA1B7, 0x300B}, //5803 #RIGHT DOUBLE ANGLE BRACKET + {0xA1B8, 0x300C}, //5804 #LEFT CORNER BRACKET + {0xA1B9, 0x300D}, //5805 #RIGHT CORNER BRACKET + {0xA1BA, 0x300E}, //5806 #LEFT WHITE CORNER BRACKET + {0xA1BB, 0x300F}, //5807 #RIGHT WHITE CORNER BRACKET + {0xA1BC, 0x3010}, //5808 #LEFT BLACK LENTICULAR BRACKET + {0xA1BD, 0x3011}, //5809 #RIGHT BLACK LENTICULAR BRACKET + {0xA1BE, 0x00B1}, //5810 #PLUS-MINUS SIGN + {0xA1BF, 0x00D7}, //5811 #MULTIPLICATION SIGN + {0xA1C0, 0x00F7}, //5812 #DIVISION SIGN + {0xA1C1, 0x2260}, //5813 #NOT EQUAL TO + {0xA1C2, 0x2264}, //5814 #LESS-THAN OR EQUAL TO + {0xA1C3, 0x2265}, //5815 #GREATER-THAN OR EQUAL TO + {0xA1C4, 0x221E}, //5816 #INFINITY + {0xA1C5, 0x2234}, //5817 #THEREFORE + {0xA1C6, 0x00B0}, //5818 #DEGREE SIGN + {0xA1C7, 0x2032}, //5819 #PRIME + {0xA1C8, 0x2033}, //5820 #DOUBLE PRIME + {0xA1C9, 0x2103}, //5821 #DEGREE CELSIUS + {0xA1CA, 0x212B}, //5822 #ANGSTROM SIGN + {0xA1CB, 0xFFE0}, //5823 #FULLWIDTH CENT SIGN + {0xA1CC, 0xFFE1}, //5824 #FULLWIDTH POUND SIGN + {0xA1CD, 0xFFE5}, //5825 #FULLWIDTH YEN SIGN + {0xA1CE, 0x2642}, //5826 #MALE SIGN + {0xA1CF, 0x2640}, //5827 #FEMALE SIGN + {0xA1D0, 0x2220}, //5828 #ANGLE + {0xA1D1, 0x22A5}, //5829 #UP TACK + {0xA1D2, 0x2312}, //5830 #ARC + {0xA1D3, 0x2202}, //5831 #PARTIAL DIFFERENTIAL + {0xA1D4, 0x2207}, //5832 #NABLA + {0xA1D5, 0x2261}, //5833 #IDENTICAL TO + {0xA1D6, 0x2252}, //5834 #APPROXIMATELY EQUAL TO OR THE IMAGE OF + {0xA1D7, 0x00A7}, //5835 #SECTION SIGN + {0xA1D8, 0x203B}, //5836 #REFERENCE MARK + {0xA1D9, 0x2606}, //5837 #WHITE STAR + {0xA1DA, 0x2605}, //5838 #BLACK STAR + {0xA1DB, 0x25CB}, //5839 #WHITE CIRCLE + {0xA1DC, 0x25CF}, //5840 #BLACK CIRCLE + {0xA1DD, 0x25CE}, //5841 #BULLSEYE + {0xA1DE, 0x25C7}, //5842 #WHITE DIAMOND + {0xA1DF, 0x25C6}, //5843 #BLACK DIAMOND + {0xA1E0, 0x25A1}, //5844 #WHITE SQUARE + {0xA1E1, 0x25A0}, //5845 #BLACK SQUARE + {0xA1E2, 0x25B3}, //5846 #WHITE UP-POINTING TRIANGLE + {0xA1E3, 0x25B2}, //5847 #BLACK UP-POINTING TRIANGLE + {0xA1E4, 0x25BD}, //5848 #WHITE DOWN-POINTING TRIANGLE + {0xA1E5, 0x25BC}, //5849 #BLACK DOWN-POINTING TRIANGLE + {0xA1E6, 0x2192}, //5850 #RIGHTWARDS ARROW + {0xA1E7, 0x2190}, //5851 #LEFTWARDS ARROW + {0xA1E8, 0x2191}, //5852 #UPWARDS ARROW + {0xA1E9, 0x2193}, //5853 #DOWNWARDS ARROW + {0xA1EA, 0x2194}, //5854 #LEFT RIGHT ARROW + {0xA1EB, 0x3013}, //5855 #GETA MARK + {0xA1EC, 0x226A}, //5856 #MUCH LESS-THAN + {0xA1ED, 0x226B}, //5857 #MUCH GREATER-THAN + {0xA1EE, 0x221A}, //5858 #SQUARE ROOT + {0xA1EF, 0x223D}, //5859 #REVERSED TILDE + {0xA1F0, 0x221D}, //5860 #PROPORTIONAL TO + {0xA1F1, 0x2235}, //5861 #BECAUSE + {0xA1F2, 0x222B}, //5862 #INTEGRAL + {0xA1F3, 0x222C}, //5863 #DOUBLE INTEGRAL + {0xA1F4, 0x2208}, //5864 #ELEMENT OF + {0xA1F5, 0x220B}, //5865 #CONTAINS AS MEMBER + {0xA1F6, 0x2286}, //5866 #SUBSET OF OR EQUAL TO + {0xA1F7, 0x2287}, //5867 #SUPERSET OF OR EQUAL TO + {0xA1F8, 0x2282}, //5868 #SUBSET OF + {0xA1F9, 0x2283}, //5869 #SUPERSET OF + {0xA1FA, 0x222A}, //5870 #UNION + {0xA1FB, 0x2229}, //5871 #INTERSECTION + {0xA1FC, 0x2227}, //5872 #LOGICAL AND + {0xA1FD, 0x2228}, //5873 #LOGICAL OR + {0xA1FE, 0xFFE2}, //5874 #FULLWIDTH NOT SIGN + {0xA241, 0xC910}, //5875 #HANGUL SYLLABLE CIEUC U SSANGSIOS + {0xA242, 0xC912}, //5876 #HANGUL SYLLABLE CIEUC U CIEUC + {0xA243, 0xC913}, //5877 #HANGUL SYLLABLE CIEUC U CHIEUCH + {0xA244, 0xC914}, //5878 #HANGUL SYLLABLE CIEUC U KHIEUKH + {0xA245, 0xC915}, //5879 #HANGUL SYLLABLE CIEUC U THIEUTH + {0xA246, 0xC916}, //5880 #HANGUL SYLLABLE CIEUC U PHIEUPH + {0xA247, 0xC917}, //5881 #HANGUL SYLLABLE CIEUC U HIEUH + {0xA248, 0xC919}, //5882 #HANGUL SYLLABLE CIEUC WEO KIYEOK + {0xA249, 0xC91A}, //5883 #HANGUL SYLLABLE CIEUC WEO SSANGKIYEOK + {0xA24A, 0xC91B}, //5884 #HANGUL SYLLABLE CIEUC WEO KIYEOKSIOS + {0xA24B, 0xC91C}, //5885 #HANGUL SYLLABLE CIEUC WEO NIEUN + {0xA24C, 0xC91D}, //5886 #HANGUL SYLLABLE CIEUC WEO NIEUNCIEUC + {0xA24D, 0xC91E}, //5887 #HANGUL SYLLABLE CIEUC WEO NIEUNHIEUH + {0xA24E, 0xC91F}, //5888 #HANGUL SYLLABLE CIEUC WEO TIKEUT + {0xA24F, 0xC920}, //5889 #HANGUL SYLLABLE CIEUC WEO RIEUL + {0xA250, 0xC921}, //5890 #HANGUL SYLLABLE CIEUC WEO RIEULKIYEOK + {0xA251, 0xC922}, //5891 #HANGUL SYLLABLE CIEUC WEO RIEULMIEUM + {0xA252, 0xC923}, //5892 #HANGUL SYLLABLE CIEUC WEO RIEULPIEUP + {0xA253, 0xC924}, //5893 #HANGUL SYLLABLE CIEUC WEO RIEULSIOS + {0xA254, 0xC925}, //5894 #HANGUL SYLLABLE CIEUC WEO RIEULTHIEUTH + {0xA255, 0xC926}, //5895 #HANGUL SYLLABLE CIEUC WEO RIEULPHIEUPH + {0xA256, 0xC927}, //5896 #HANGUL SYLLABLE CIEUC WEO RIEULHIEUH + {0xA257, 0xC928}, //5897 #HANGUL SYLLABLE CIEUC WEO MIEUM + {0xA258, 0xC929}, //5898 #HANGUL SYLLABLE CIEUC WEO PIEUP + {0xA259, 0xC92A}, //5899 #HANGUL SYLLABLE CIEUC WEO PIEUPSIOS + {0xA25A, 0xC92B}, //5900 #HANGUL SYLLABLE CIEUC WEO SIOS + {0xA261, 0xC92D}, //5901 #HANGUL SYLLABLE CIEUC WEO IEUNG + {0xA262, 0xC92E}, //5902 #HANGUL SYLLABLE CIEUC WEO CIEUC + {0xA263, 0xC92F}, //5903 #HANGUL SYLLABLE CIEUC WEO CHIEUCH + {0xA264, 0xC930}, //5904 #HANGUL SYLLABLE CIEUC WEO KHIEUKH + {0xA265, 0xC931}, //5905 #HANGUL SYLLABLE CIEUC WEO THIEUTH + {0xA266, 0xC932}, //5906 #HANGUL SYLLABLE CIEUC WEO PHIEUPH + {0xA267, 0xC933}, //5907 #HANGUL SYLLABLE CIEUC WEO HIEUH + {0xA268, 0xC935}, //5908 #HANGUL SYLLABLE CIEUC WE KIYEOK + {0xA269, 0xC936}, //5909 #HANGUL SYLLABLE CIEUC WE SSANGKIYEOK + {0xA26A, 0xC937}, //5910 #HANGUL SYLLABLE CIEUC WE KIYEOKSIOS + {0xA26B, 0xC938}, //5911 #HANGUL SYLLABLE CIEUC WE NIEUN + {0xA26C, 0xC939}, //5912 #HANGUL SYLLABLE CIEUC WE NIEUNCIEUC + {0xA26D, 0xC93A}, //5913 #HANGUL SYLLABLE CIEUC WE NIEUNHIEUH + {0xA26E, 0xC93B}, //5914 #HANGUL SYLLABLE CIEUC WE TIKEUT + {0xA26F, 0xC93C}, //5915 #HANGUL SYLLABLE CIEUC WE RIEUL + {0xA270, 0xC93D}, //5916 #HANGUL SYLLABLE CIEUC WE RIEULKIYEOK + {0xA271, 0xC93E}, //5917 #HANGUL SYLLABLE CIEUC WE RIEULMIEUM + {0xA272, 0xC93F}, //5918 #HANGUL SYLLABLE CIEUC WE RIEULPIEUP + {0xA273, 0xC940}, //5919 #HANGUL SYLLABLE CIEUC WE RIEULSIOS + {0xA274, 0xC941}, //5920 #HANGUL SYLLABLE CIEUC WE RIEULTHIEUTH + {0xA275, 0xC942}, //5921 #HANGUL SYLLABLE CIEUC WE RIEULPHIEUPH + {0xA276, 0xC943}, //5922 #HANGUL SYLLABLE CIEUC WE RIEULHIEUH + {0xA277, 0xC944}, //5923 #HANGUL SYLLABLE CIEUC WE MIEUM + {0xA278, 0xC945}, //5924 #HANGUL SYLLABLE CIEUC WE PIEUP + {0xA279, 0xC946}, //5925 #HANGUL SYLLABLE CIEUC WE PIEUPSIOS + {0xA27A, 0xC947}, //5926 #HANGUL SYLLABLE CIEUC WE SIOS + {0xA281, 0xC948}, //5927 #HANGUL SYLLABLE CIEUC WE SSANGSIOS + {0xA282, 0xC949}, //5928 #HANGUL SYLLABLE CIEUC WE IEUNG + {0xA283, 0xC94A}, //5929 #HANGUL SYLLABLE CIEUC WE CIEUC + {0xA284, 0xC94B}, //5930 #HANGUL SYLLABLE CIEUC WE CHIEUCH + {0xA285, 0xC94C}, //5931 #HANGUL SYLLABLE CIEUC WE KHIEUKH + {0xA286, 0xC94D}, //5932 #HANGUL SYLLABLE CIEUC WE THIEUTH + {0xA287, 0xC94E}, //5933 #HANGUL SYLLABLE CIEUC WE PHIEUPH + {0xA288, 0xC94F}, //5934 #HANGUL SYLLABLE CIEUC WE HIEUH + {0xA289, 0xC952}, //5935 #HANGUL SYLLABLE CIEUC WI SSANGKIYEOK + {0xA28A, 0xC953}, //5936 #HANGUL SYLLABLE CIEUC WI KIYEOKSIOS + {0xA28B, 0xC955}, //5937 #HANGUL SYLLABLE CIEUC WI NIEUNCIEUC + {0xA28C, 0xC956}, //5938 #HANGUL SYLLABLE CIEUC WI NIEUNHIEUH + {0xA28D, 0xC957}, //5939 #HANGUL SYLLABLE CIEUC WI TIKEUT + {0xA28E, 0xC959}, //5940 #HANGUL SYLLABLE CIEUC WI RIEULKIYEOK + {0xA28F, 0xC95A}, //5941 #HANGUL SYLLABLE CIEUC WI RIEULMIEUM + {0xA290, 0xC95B}, //5942 #HANGUL SYLLABLE CIEUC WI RIEULPIEUP + {0xA291, 0xC95C}, //5943 #HANGUL SYLLABLE CIEUC WI RIEULSIOS + {0xA292, 0xC95D}, //5944 #HANGUL SYLLABLE CIEUC WI RIEULTHIEUTH + {0xA293, 0xC95E}, //5945 #HANGUL SYLLABLE CIEUC WI RIEULPHIEUPH + {0xA294, 0xC95F}, //5946 #HANGUL SYLLABLE CIEUC WI RIEULHIEUH + {0xA295, 0xC962}, //5947 #HANGUL SYLLABLE CIEUC WI PIEUPSIOS + {0xA296, 0xC964}, //5948 #HANGUL SYLLABLE CIEUC WI SSANGSIOS + {0xA297, 0xC965}, //5949 #HANGUL SYLLABLE CIEUC WI IEUNG + {0xA298, 0xC966}, //5950 #HANGUL SYLLABLE CIEUC WI CIEUC + {0xA299, 0xC967}, //5951 #HANGUL SYLLABLE CIEUC WI CHIEUCH + {0xA29A, 0xC968}, //5952 #HANGUL SYLLABLE CIEUC WI KHIEUKH + {0xA29B, 0xC969}, //5953 #HANGUL SYLLABLE CIEUC WI THIEUTH + {0xA29C, 0xC96A}, //5954 #HANGUL SYLLABLE CIEUC WI PHIEUPH + {0xA29D, 0xC96B}, //5955 #HANGUL SYLLABLE CIEUC WI HIEUH + {0xA29E, 0xC96D}, //5956 #HANGUL SYLLABLE CIEUC YU KIYEOK + {0xA29F, 0xC96E}, //5957 #HANGUL SYLLABLE CIEUC YU SSANGKIYEOK + {0xA2A0, 0xC96F}, //5958 #HANGUL SYLLABLE CIEUC YU KIYEOKSIOS + {0xA2A1, 0x21D2}, //5959 #RIGHTWARDS DOUBLE ARROW + {0xA2A2, 0x21D4}, //5960 #LEFT RIGHT DOUBLE ARROW + {0xA2A3, 0x2200}, //5961 #FOR ALL + {0xA2A4, 0x2203}, //5962 #THERE EXISTS + {0xA2A5, 0x00B4}, //5963 #ACUTE ACCENT + {0xA2A6, 0xFF5E}, //5964 #FULLWIDTH TILDE + {0xA2A7, 0x02C7}, //5965 #CARON + {0xA2A8, 0x02D8}, //5966 #BREVE + {0xA2A9, 0x02DD}, //5967 #DOUBLE ACUTE ACCENT + {0xA2AA, 0x02DA}, //5968 #RING ABOVE + {0xA2AB, 0x02D9}, //5969 #DOT ABOVE + {0xA2AC, 0x00B8}, //5970 #CEDILLA + {0xA2AD, 0x02DB}, //5971 #OGONEK + {0xA2AE, 0x00A1}, //5972 #INVERTED EXCLAMATION MARK + {0xA2AF, 0x00BF}, //5973 #INVERTED QUESTION MARK + {0xA2B0, 0x02D0}, //5974 #MODIFIER LETTER TRIANGULAR COLON + {0xA2B1, 0x222E}, //5975 #CONTOUR INTEGRAL + {0xA2B2, 0x2211}, //5976 #N-ARY SUMMATION + {0xA2B3, 0x220F}, //5977 #N-ARY PRODUCT + {0xA2B4, 0x00A4}, //5978 #CURRENCY SIGN + {0xA2B5, 0x2109}, //5979 #DEGREE FAHRENHEIT + {0xA2B6, 0x2030}, //5980 #PER MILLE SIGN + {0xA2B7, 0x25C1}, //5981 #WHITE LEFT-POINTING TRIANGLE + {0xA2B8, 0x25C0}, //5982 #BLACK LEFT-POINTING TRIANGLE + {0xA2B9, 0x25B7}, //5983 #WHITE RIGHT-POINTING TRIANGLE + {0xA2BA, 0x25B6}, //5984 #BLACK RIGHT-POINTING TRIANGLE + {0xA2BB, 0x2664}, //5985 #WHITE SPADE SUIT + {0xA2BC, 0x2660}, //5986 #BLACK SPADE SUIT + {0xA2BD, 0x2661}, //5987 #WHITE HEART SUIT + {0xA2BE, 0x2665}, //5988 #BLACK HEART SUIT + {0xA2BF, 0x2667}, //5989 #WHITE CLUB SUIT + {0xA2C0, 0x2663}, //5990 #BLACK CLUB SUIT + {0xA2C1, 0x2299}, //5991 #CIRCLED DOT OPERATOR + {0xA2C2, 0x25C8}, //5992 #WHITE DIAMOND CONTAINING BLACK SMALL DIAMOND + {0xA2C3, 0x25A3}, //5993 #WHITE SQUARE CONTAINING BLACK SMALL SQUARE + {0xA2C4, 0x25D0}, //5994 #CIRCLE WITH LEFT HALF BLACK + {0xA2C5, 0x25D1}, //5995 #CIRCLE WITH RIGHT HALF BLACK + {0xA2C6, 0x2592}, //5996 #MEDIUM SHADE + {0xA2C7, 0x25A4}, //5997 #SQUARE WITH HORIZONTAL FILL + {0xA2C8, 0x25A5}, //5998 #SQUARE WITH VERTICAL FILL + {0xA2C9, 0x25A8}, //5999 #SQUARE WITH UPPER RIGHT TO LOWER LEFT FILL + {0xA2CA, 0x25A7}, //6000 #SQUARE WITH UPPER LEFT TO LOWER RIGHT FILL + {0xA2CB, 0x25A6}, //6001 #SQUARE WITH ORTHOGONAL CROSSHATCH FILL + {0xA2CC, 0x25A9}, //6002 #SQUARE WITH DIAGONAL CROSSHATCH FILL + {0xA2CD, 0x2668}, //6003 #HOT SPRINGS + {0xA2CE, 0x260F}, //6004 #WHITE TELEPHONE + {0xA2CF, 0x260E}, //6005 #BLACK TELEPHONE + {0xA2D0, 0x261C}, //6006 #WHITE LEFT POINTING INDEX + {0xA2D1, 0x261E}, //6007 #WHITE RIGHT POINTING INDEX + {0xA2D2, 0x00B6}, //6008 #PILCROW SIGN + {0xA2D3, 0x2020}, //6009 #DAGGER + {0xA2D4, 0x2021}, //6010 #DOUBLE DAGGER + {0xA2D5, 0x2195}, //6011 #UP DOWN ARROW + {0xA2D6, 0x2197}, //6012 #NORTH EAST ARROW + {0xA2D7, 0x2199}, //6013 #SOUTH WEST ARROW + {0xA2D8, 0x2196}, //6014 #NORTH WEST ARROW + {0xA2D9, 0x2198}, //6015 #SOUTH EAST ARROW + {0xA2DA, 0x266D}, //6016 #MUSIC FLAT SIGN + {0xA2DB, 0x2669}, //6017 #QUARTER NOTE + {0xA2DC, 0x266A}, //6018 #EIGHTH NOTE + {0xA2DD, 0x266C}, //6019 #BEAMED SIXTEENTH NOTES + {0xA2DE, 0x327F}, //6020 #KOREAN STANDARD SYMBOL + {0xA2DF, 0x321C}, //6021 #PARENTHESIZED HANGUL CIEUC U + {0xA2E0, 0x2116}, //6022 #NUMERO SIGN + {0xA2E1, 0x33C7}, //6023 #SQUARE CO + {0xA2E2, 0x2122}, //6024 #TRADE MARK SIGN + {0xA2E3, 0x33C2}, //6025 #SQUARE AM + {0xA2E4, 0x33D8}, //6026 #SQUARE PM + {0xA2E5, 0x2121}, //6027 #TELEPHONE SIGN + {0xA2E6, 0x20AC}, //6028 #EURO SIGN + {0xA2E7, 0x00AE}, //6029 #REGISTERED SIGN + {0xA341, 0xC971}, //6030 #HANGUL SYLLABLE CIEUC YU NIEUNCIEUC + {0xA342, 0xC972}, //6031 #HANGUL SYLLABLE CIEUC YU NIEUNHIEUH + {0xA343, 0xC973}, //6032 #HANGUL SYLLABLE CIEUC YU TIKEUT + {0xA344, 0xC975}, //6033 #HANGUL SYLLABLE CIEUC YU RIEULKIYEOK + {0xA345, 0xC976}, //6034 #HANGUL SYLLABLE CIEUC YU RIEULMIEUM + {0xA346, 0xC977}, //6035 #HANGUL SYLLABLE CIEUC YU RIEULPIEUP + {0xA347, 0xC978}, //6036 #HANGUL SYLLABLE CIEUC YU RIEULSIOS + {0xA348, 0xC979}, //6037 #HANGUL SYLLABLE CIEUC YU RIEULTHIEUTH + {0xA349, 0xC97A}, //6038 #HANGUL SYLLABLE CIEUC YU RIEULPHIEUPH + {0xA34A, 0xC97B}, //6039 #HANGUL SYLLABLE CIEUC YU RIEULHIEUH + {0xA34B, 0xC97D}, //6040 #HANGUL SYLLABLE CIEUC YU PIEUP + {0xA34C, 0xC97E}, //6041 #HANGUL SYLLABLE CIEUC YU PIEUPSIOS + {0xA34D, 0xC97F}, //6042 #HANGUL SYLLABLE CIEUC YU SIOS + {0xA34E, 0xC980}, //6043 #HANGUL SYLLABLE CIEUC YU SSANGSIOS + {0xA34F, 0xC981}, //6044 #HANGUL SYLLABLE CIEUC YU IEUNG + {0xA350, 0xC982}, //6045 #HANGUL SYLLABLE CIEUC YU CIEUC + {0xA351, 0xC983}, //6046 #HANGUL SYLLABLE CIEUC YU CHIEUCH + {0xA352, 0xC984}, //6047 #HANGUL SYLLABLE CIEUC YU KHIEUKH + {0xA353, 0xC985}, //6048 #HANGUL SYLLABLE CIEUC YU THIEUTH + {0xA354, 0xC986}, //6049 #HANGUL SYLLABLE CIEUC YU PHIEUPH + {0xA355, 0xC987}, //6050 #HANGUL SYLLABLE CIEUC YU HIEUH + {0xA356, 0xC98A}, //6051 #HANGUL SYLLABLE CIEUC EU SSANGKIYEOK + {0xA357, 0xC98B}, //6052 #HANGUL SYLLABLE CIEUC EU KIYEOKSIOS + {0xA358, 0xC98D}, //6053 #HANGUL SYLLABLE CIEUC EU NIEUNCIEUC + {0xA359, 0xC98E}, //6054 #HANGUL SYLLABLE CIEUC EU NIEUNHIEUH + {0xA35A, 0xC98F}, //6055 #HANGUL SYLLABLE CIEUC EU TIKEUT + {0xA361, 0xC991}, //6056 #HANGUL SYLLABLE CIEUC EU RIEULKIYEOK + {0xA362, 0xC992}, //6057 #HANGUL SYLLABLE CIEUC EU RIEULMIEUM + {0xA363, 0xC993}, //6058 #HANGUL SYLLABLE CIEUC EU RIEULPIEUP + {0xA364, 0xC994}, //6059 #HANGUL SYLLABLE CIEUC EU RIEULSIOS + {0xA365, 0xC995}, //6060 #HANGUL SYLLABLE CIEUC EU RIEULTHIEUTH + {0xA366, 0xC996}, //6061 #HANGUL SYLLABLE CIEUC EU RIEULPHIEUPH + {0xA367, 0xC997}, //6062 #HANGUL SYLLABLE CIEUC EU RIEULHIEUH + {0xA368, 0xC99A}, //6063 #HANGUL SYLLABLE CIEUC EU PIEUPSIOS + {0xA369, 0xC99C}, //6064 #HANGUL SYLLABLE CIEUC EU SSANGSIOS + {0xA36A, 0xC99E}, //6065 #HANGUL SYLLABLE CIEUC EU CIEUC + {0xA36B, 0xC99F}, //6066 #HANGUL SYLLABLE CIEUC EU CHIEUCH + {0xA36C, 0xC9A0}, //6067 #HANGUL SYLLABLE CIEUC EU KHIEUKH + {0xA36D, 0xC9A1}, //6068 #HANGUL SYLLABLE CIEUC EU THIEUTH + {0xA36E, 0xC9A2}, //6069 #HANGUL SYLLABLE CIEUC EU PHIEUPH + {0xA36F, 0xC9A3}, //6070 #HANGUL SYLLABLE CIEUC EU HIEUH + {0xA370, 0xC9A4}, //6071 #HANGUL SYLLABLE CIEUC YI + {0xA371, 0xC9A5}, //6072 #HANGUL SYLLABLE CIEUC YI KIYEOK + {0xA372, 0xC9A6}, //6073 #HANGUL SYLLABLE CIEUC YI SSANGKIYEOK + {0xA373, 0xC9A7}, //6074 #HANGUL SYLLABLE CIEUC YI KIYEOKSIOS + {0xA374, 0xC9A8}, //6075 #HANGUL SYLLABLE CIEUC YI NIEUN + {0xA375, 0xC9A9}, //6076 #HANGUL SYLLABLE CIEUC YI NIEUNCIEUC + {0xA376, 0xC9AA}, //6077 #HANGUL SYLLABLE CIEUC YI NIEUNHIEUH + {0xA377, 0xC9AB}, //6078 #HANGUL SYLLABLE CIEUC YI TIKEUT + {0xA378, 0xC9AC}, //6079 #HANGUL SYLLABLE CIEUC YI RIEUL + {0xA379, 0xC9AD}, //6080 #HANGUL SYLLABLE CIEUC YI RIEULKIYEOK + {0xA37A, 0xC9AE}, //6081 #HANGUL SYLLABLE CIEUC YI RIEULMIEUM + {0xA381, 0xC9AF}, //6082 #HANGUL SYLLABLE CIEUC YI RIEULPIEUP + {0xA382, 0xC9B0}, //6083 #HANGUL SYLLABLE CIEUC YI RIEULSIOS + {0xA383, 0xC9B1}, //6084 #HANGUL SYLLABLE CIEUC YI RIEULTHIEUTH + {0xA384, 0xC9B2}, //6085 #HANGUL SYLLABLE CIEUC YI RIEULPHIEUPH + {0xA385, 0xC9B3}, //6086 #HANGUL SYLLABLE CIEUC YI RIEULHIEUH + {0xA386, 0xC9B4}, //6087 #HANGUL SYLLABLE CIEUC YI MIEUM + {0xA387, 0xC9B5}, //6088 #HANGUL SYLLABLE CIEUC YI PIEUP + {0xA388, 0xC9B6}, //6089 #HANGUL SYLLABLE CIEUC YI PIEUPSIOS + {0xA389, 0xC9B7}, //6090 #HANGUL SYLLABLE CIEUC YI SIOS + {0xA38A, 0xC9B8}, //6091 #HANGUL SYLLABLE CIEUC YI SSANGSIOS + {0xA38B, 0xC9B9}, //6092 #HANGUL SYLLABLE CIEUC YI IEUNG + {0xA38C, 0xC9BA}, //6093 #HANGUL SYLLABLE CIEUC YI CIEUC + {0xA38D, 0xC9BB}, //6094 #HANGUL SYLLABLE CIEUC YI CHIEUCH + {0xA38E, 0xC9BC}, //6095 #HANGUL SYLLABLE CIEUC YI KHIEUKH + {0xA38F, 0xC9BD}, //6096 #HANGUL SYLLABLE CIEUC YI THIEUTH + {0xA390, 0xC9BE}, //6097 #HANGUL SYLLABLE CIEUC YI PHIEUPH + {0xA391, 0xC9BF}, //6098 #HANGUL SYLLABLE CIEUC YI HIEUH + {0xA392, 0xC9C2}, //6099 #HANGUL SYLLABLE CIEUC I SSANGKIYEOK + {0xA393, 0xC9C3}, //6100 #HANGUL SYLLABLE CIEUC I KIYEOKSIOS + {0xA394, 0xC9C5}, //6101 #HANGUL SYLLABLE CIEUC I NIEUNCIEUC + {0xA395, 0xC9C6}, //6102 #HANGUL SYLLABLE CIEUC I NIEUNHIEUH + {0xA396, 0xC9C9}, //6103 #HANGUL SYLLABLE CIEUC I RIEULKIYEOK + {0xA397, 0xC9CB}, //6104 #HANGUL SYLLABLE CIEUC I RIEULPIEUP + {0xA398, 0xC9CC}, //6105 #HANGUL SYLLABLE CIEUC I RIEULSIOS + {0xA399, 0xC9CD}, //6106 #HANGUL SYLLABLE CIEUC I RIEULTHIEUTH + {0xA39A, 0xC9CE}, //6107 #HANGUL SYLLABLE CIEUC I RIEULPHIEUPH + {0xA39B, 0xC9CF}, //6108 #HANGUL SYLLABLE CIEUC I RIEULHIEUH + {0xA39C, 0xC9D2}, //6109 #HANGUL SYLLABLE CIEUC I PIEUPSIOS + {0xA39D, 0xC9D4}, //6110 #HANGUL SYLLABLE CIEUC I SSANGSIOS + {0xA39E, 0xC9D7}, //6111 #HANGUL SYLLABLE CIEUC I CHIEUCH + {0xA39F, 0xC9D8}, //6112 #HANGUL SYLLABLE CIEUC I KHIEUKH + {0xA3A0, 0xC9DB}, //6113 #HANGUL SYLLABLE CIEUC I HIEUH + {0xA3A1, 0xFF01}, //6114 #FULLWIDTH EXCLAMATION MARK + {0xA3A2, 0xFF02}, //6115 #FULLWIDTH QUOTATION MARK + {0xA3A3, 0xFF03}, //6116 #FULLWIDTH NUMBER SIGN + {0xA3A4, 0xFF04}, //6117 #FULLWIDTH DOLLAR SIGN + {0xA3A5, 0xFF05}, //6118 #FULLWIDTH PERCENT SIGN + {0xA3A6, 0xFF06}, //6119 #FULLWIDTH AMPERSAND + {0xA3A7, 0xFF07}, //6120 #FULLWIDTH APOSTROPHE + {0xA3A8, 0xFF08}, //6121 #FULLWIDTH LEFT PARENTHESIS + {0xA3A9, 0xFF09}, //6122 #FULLWIDTH RIGHT PARENTHESIS + {0xA3AA, 0xFF0A}, //6123 #FULLWIDTH ASTERISK + {0xA3AB, 0xFF0B}, //6124 #FULLWIDTH PLUS SIGN + {0xA3AC, 0xFF0C}, //6125 #FULLWIDTH COMMA + {0xA3AD, 0xFF0D}, //6126 #FULLWIDTH HYPHEN-MINUS + {0xA3AE, 0xFF0E}, //6127 #FULLWIDTH FULL STOP + {0xA3AF, 0xFF0F}, //6128 #FULLWIDTH SOLIDUS + {0xA3B0, 0xFF10}, //6129 #FULLWIDTH DIGIT ZERO + {0xA3B1, 0xFF11}, //6130 #FULLWIDTH DIGIT ONE + {0xA3B2, 0xFF12}, //6131 #FULLWIDTH DIGIT TWO + {0xA3B3, 0xFF13}, //6132 #FULLWIDTH DIGIT THREE + {0xA3B4, 0xFF14}, //6133 #FULLWIDTH DIGIT FOUR + {0xA3B5, 0xFF15}, //6134 #FULLWIDTH DIGIT FIVE + {0xA3B6, 0xFF16}, //6135 #FULLWIDTH DIGIT SIX + {0xA3B7, 0xFF17}, //6136 #FULLWIDTH DIGIT SEVEN + {0xA3B8, 0xFF18}, //6137 #FULLWIDTH DIGIT EIGHT + {0xA3B9, 0xFF19}, //6138 #FULLWIDTH DIGIT NINE + {0xA3BA, 0xFF1A}, //6139 #FULLWIDTH COLON + {0xA3BB, 0xFF1B}, //6140 #FULLWIDTH SEMICOLON + {0xA3BC, 0xFF1C}, //6141 #FULLWIDTH LESS-THAN SIGN + {0xA3BD, 0xFF1D}, //6142 #FULLWIDTH EQUALS SIGN + {0xA3BE, 0xFF1E}, //6143 #FULLWIDTH GREATER-THAN SIGN + {0xA3BF, 0xFF1F}, //6144 #FULLWIDTH QUESTION MARK + {0xA3C0, 0xFF20}, //6145 #FULLWIDTH COMMERCIAL AT + {0xA3C1, 0xFF21}, //6146 #FULLWIDTH LATIN CAPITAL LETTER A + {0xA3C2, 0xFF22}, //6147 #FULLWIDTH LATIN CAPITAL LETTER B + {0xA3C3, 0xFF23}, //6148 #FULLWIDTH LATIN CAPITAL LETTER C + {0xA3C4, 0xFF24}, //6149 #FULLWIDTH LATIN CAPITAL LETTER D + {0xA3C5, 0xFF25}, //6150 #FULLWIDTH LATIN CAPITAL LETTER E + {0xA3C6, 0xFF26}, //6151 #FULLWIDTH LATIN CAPITAL LETTER F + {0xA3C7, 0xFF27}, //6152 #FULLWIDTH LATIN CAPITAL LETTER G + {0xA3C8, 0xFF28}, //6153 #FULLWIDTH LATIN CAPITAL LETTER H + {0xA3C9, 0xFF29}, //6154 #FULLWIDTH LATIN CAPITAL LETTER I + {0xA3CA, 0xFF2A}, //6155 #FULLWIDTH LATIN CAPITAL LETTER J + {0xA3CB, 0xFF2B}, //6156 #FULLWIDTH LATIN CAPITAL LETTER K + {0xA3CC, 0xFF2C}, //6157 #FULLWIDTH LATIN CAPITAL LETTER L + {0xA3CD, 0xFF2D}, //6158 #FULLWIDTH LATIN CAPITAL LETTER M + {0xA3CE, 0xFF2E}, //6159 #FULLWIDTH LATIN CAPITAL LETTER N + {0xA3CF, 0xFF2F}, //6160 #FULLWIDTH LATIN CAPITAL LETTER O + {0xA3D0, 0xFF30}, //6161 #FULLWIDTH LATIN CAPITAL LETTER P + {0xA3D1, 0xFF31}, //6162 #FULLWIDTH LATIN CAPITAL LETTER Q + {0xA3D2, 0xFF32}, //6163 #FULLWIDTH LATIN CAPITAL LETTER R + {0xA3D3, 0xFF33}, //6164 #FULLWIDTH LATIN CAPITAL LETTER S + {0xA3D4, 0xFF34}, //6165 #FULLWIDTH LATIN CAPITAL LETTER T + {0xA3D5, 0xFF35}, //6166 #FULLWIDTH LATIN CAPITAL LETTER U + {0xA3D6, 0xFF36}, //6167 #FULLWIDTH LATIN CAPITAL LETTER V + {0xA3D7, 0xFF37}, //6168 #FULLWIDTH LATIN CAPITAL LETTER W + {0xA3D8, 0xFF38}, //6169 #FULLWIDTH LATIN CAPITAL LETTER X + {0xA3D9, 0xFF39}, //6170 #FULLWIDTH LATIN CAPITAL LETTER Y + {0xA3DA, 0xFF3A}, //6171 #FULLWIDTH LATIN CAPITAL LETTER Z + {0xA3DB, 0xFF3B}, //6172 #FULLWIDTH LEFT SQUARE BRACKET + {0xA3DC, 0xFFE6}, //6173 #FULLWIDTH WON SIGN + {0xA3DD, 0xFF3D}, //6174 #FULLWIDTH RIGHT SQUARE BRACKET + {0xA3DE, 0xFF3E}, //6175 #FULLWIDTH CIRCUMFLEX ACCENT + {0xA3DF, 0xFF3F}, //6176 #FULLWIDTH LOW LINE + {0xA3E0, 0xFF40}, //6177 #FULLWIDTH GRAVE ACCENT + {0xA3E1, 0xFF41}, //6178 #FULLWIDTH LATIN SMALL LETTER A + {0xA3E2, 0xFF42}, //6179 #FULLWIDTH LATIN SMALL LETTER B + {0xA3E3, 0xFF43}, //6180 #FULLWIDTH LATIN SMALL LETTER C + {0xA3E4, 0xFF44}, //6181 #FULLWIDTH LATIN SMALL LETTER D + {0xA3E5, 0xFF45}, //6182 #FULLWIDTH LATIN SMALL LETTER E + {0xA3E6, 0xFF46}, //6183 #FULLWIDTH LATIN SMALL LETTER F + {0xA3E7, 0xFF47}, //6184 #FULLWIDTH LATIN SMALL LETTER G + {0xA3E8, 0xFF48}, //6185 #FULLWIDTH LATIN SMALL LETTER H + {0xA3E9, 0xFF49}, //6186 #FULLWIDTH LATIN SMALL LETTER I + {0xA3EA, 0xFF4A}, //6187 #FULLWIDTH LATIN SMALL LETTER J + {0xA3EB, 0xFF4B}, //6188 #FULLWIDTH LATIN SMALL LETTER K + {0xA3EC, 0xFF4C}, //6189 #FULLWIDTH LATIN SMALL LETTER L + {0xA3ED, 0xFF4D}, //6190 #FULLWIDTH LATIN SMALL LETTER M + {0xA3EE, 0xFF4E}, //6191 #FULLWIDTH LATIN SMALL LETTER N + {0xA3EF, 0xFF4F}, //6192 #FULLWIDTH LATIN SMALL LETTER O + {0xA3F0, 0xFF50}, //6193 #FULLWIDTH LATIN SMALL LETTER P + {0xA3F1, 0xFF51}, //6194 #FULLWIDTH LATIN SMALL LETTER Q + {0xA3F2, 0xFF52}, //6195 #FULLWIDTH LATIN SMALL LETTER R + {0xA3F3, 0xFF53}, //6196 #FULLWIDTH LATIN SMALL LETTER S + {0xA3F4, 0xFF54}, //6197 #FULLWIDTH LATIN SMALL LETTER T + {0xA3F5, 0xFF55}, //6198 #FULLWIDTH LATIN SMALL LETTER U + {0xA3F6, 0xFF56}, //6199 #FULLWIDTH LATIN SMALL LETTER V + {0xA3F7, 0xFF57}, //6200 #FULLWIDTH LATIN SMALL LETTER W + {0xA3F8, 0xFF58}, //6201 #FULLWIDTH LATIN SMALL LETTER X + {0xA3F9, 0xFF59}, //6202 #FULLWIDTH LATIN SMALL LETTER Y + {0xA3FA, 0xFF5A}, //6203 #FULLWIDTH LATIN SMALL LETTER Z + {0xA3FB, 0xFF5B}, //6204 #FULLWIDTH LEFT CURLY BRACKET + {0xA3FC, 0xFF5C}, //6205 #FULLWIDTH VERTICAL LINE + {0xA3FD, 0xFF5D}, //6206 #FULLWIDTH RIGHT CURLY BRACKET + {0xA3FE, 0xFFE3}, //6207 #FULLWIDTH MACRON + {0xA441, 0xC9DE}, //6208 #HANGUL SYLLABLE SSANGCIEUC A SSANGKIYEOK + {0xA442, 0xC9DF}, //6209 #HANGUL SYLLABLE SSANGCIEUC A KIYEOKSIOS + {0xA443, 0xC9E1}, //6210 #HANGUL SYLLABLE SSANGCIEUC A NIEUNCIEUC + {0xA444, 0xC9E3}, //6211 #HANGUL SYLLABLE SSANGCIEUC A TIKEUT + {0xA445, 0xC9E5}, //6212 #HANGUL SYLLABLE SSANGCIEUC A RIEULKIYEOK + {0xA446, 0xC9E6}, //6213 #HANGUL SYLLABLE SSANGCIEUC A RIEULMIEUM + {0xA447, 0xC9E8}, //6214 #HANGUL SYLLABLE SSANGCIEUC A RIEULSIOS + {0xA448, 0xC9E9}, //6215 #HANGUL SYLLABLE SSANGCIEUC A RIEULTHIEUTH + {0xA449, 0xC9EA}, //6216 #HANGUL SYLLABLE SSANGCIEUC A RIEULPHIEUPH + {0xA44A, 0xC9EB}, //6217 #HANGUL SYLLABLE SSANGCIEUC A RIEULHIEUH + {0xA44B, 0xC9EE}, //6218 #HANGUL SYLLABLE SSANGCIEUC A PIEUPSIOS + {0xA44C, 0xC9F2}, //6219 #HANGUL SYLLABLE SSANGCIEUC A CIEUC + {0xA44D, 0xC9F3}, //6220 #HANGUL SYLLABLE SSANGCIEUC A CHIEUCH + {0xA44E, 0xC9F4}, //6221 #HANGUL SYLLABLE SSANGCIEUC A KHIEUKH + {0xA44F, 0xC9F5}, //6222 #HANGUL SYLLABLE SSANGCIEUC A THIEUTH + {0xA450, 0xC9F6}, //6223 #HANGUL SYLLABLE SSANGCIEUC A PHIEUPH + {0xA451, 0xC9F7}, //6224 #HANGUL SYLLABLE SSANGCIEUC A HIEUH + {0xA452, 0xC9FA}, //6225 #HANGUL SYLLABLE SSANGCIEUC AE SSANGKIYEOK + {0xA453, 0xC9FB}, //6226 #HANGUL SYLLABLE SSANGCIEUC AE KIYEOKSIOS + {0xA454, 0xC9FD}, //6227 #HANGUL SYLLABLE SSANGCIEUC AE NIEUNCIEUC + {0xA455, 0xC9FE}, //6228 #HANGUL SYLLABLE SSANGCIEUC AE NIEUNHIEUH + {0xA456, 0xC9FF}, //6229 #HANGUL SYLLABLE SSANGCIEUC AE TIKEUT + {0xA457, 0xCA01}, //6230 #HANGUL SYLLABLE SSANGCIEUC AE RIEULKIYEOK + {0xA458, 0xCA02}, //6231 #HANGUL SYLLABLE SSANGCIEUC AE RIEULMIEUM + {0xA459, 0xCA03}, //6232 #HANGUL SYLLABLE SSANGCIEUC AE RIEULPIEUP + {0xA45A, 0xCA04}, //6233 #HANGUL SYLLABLE SSANGCIEUC AE RIEULSIOS + {0xA461, 0xCA05}, //6234 #HANGUL SYLLABLE SSANGCIEUC AE RIEULTHIEUTH + {0xA462, 0xCA06}, //6235 #HANGUL SYLLABLE SSANGCIEUC AE RIEULPHIEUPH + {0xA463, 0xCA07}, //6236 #HANGUL SYLLABLE SSANGCIEUC AE RIEULHIEUH + {0xA464, 0xCA0A}, //6237 #HANGUL SYLLABLE SSANGCIEUC AE PIEUPSIOS + {0xA465, 0xCA0E}, //6238 #HANGUL SYLLABLE SSANGCIEUC AE CIEUC + {0xA466, 0xCA0F}, //6239 #HANGUL SYLLABLE SSANGCIEUC AE CHIEUCH + {0xA467, 0xCA10}, //6240 #HANGUL SYLLABLE SSANGCIEUC AE KHIEUKH + {0xA468, 0xCA11}, //6241 #HANGUL SYLLABLE SSANGCIEUC AE THIEUTH + {0xA469, 0xCA12}, //6242 #HANGUL SYLLABLE SSANGCIEUC AE PHIEUPH + {0xA46A, 0xCA13}, //6243 #HANGUL SYLLABLE SSANGCIEUC AE HIEUH + {0xA46B, 0xCA15}, //6244 #HANGUL SYLLABLE SSANGCIEUC YA KIYEOK + {0xA46C, 0xCA16}, //6245 #HANGUL SYLLABLE SSANGCIEUC YA SSANGKIYEOK + {0xA46D, 0xCA17}, //6246 #HANGUL SYLLABLE SSANGCIEUC YA KIYEOKSIOS + {0xA46E, 0xCA19}, //6247 #HANGUL SYLLABLE SSANGCIEUC YA NIEUNCIEUC + {0xA46F, 0xCA1A}, //6248 #HANGUL SYLLABLE SSANGCIEUC YA NIEUNHIEUH + {0xA470, 0xCA1B}, //6249 #HANGUL SYLLABLE SSANGCIEUC YA TIKEUT + {0xA471, 0xCA1C}, //6250 #HANGUL SYLLABLE SSANGCIEUC YA RIEUL + {0xA472, 0xCA1D}, //6251 #HANGUL SYLLABLE SSANGCIEUC YA RIEULKIYEOK + {0xA473, 0xCA1E}, //6252 #HANGUL SYLLABLE SSANGCIEUC YA RIEULMIEUM + {0xA474, 0xCA1F}, //6253 #HANGUL SYLLABLE SSANGCIEUC YA RIEULPIEUP + {0xA475, 0xCA20}, //6254 #HANGUL SYLLABLE SSANGCIEUC YA RIEULSIOS + {0xA476, 0xCA21}, //6255 #HANGUL SYLLABLE SSANGCIEUC YA RIEULTHIEUTH + {0xA477, 0xCA22}, //6256 #HANGUL SYLLABLE SSANGCIEUC YA RIEULPHIEUPH + {0xA478, 0xCA23}, //6257 #HANGUL SYLLABLE SSANGCIEUC YA RIEULHIEUH + {0xA479, 0xCA24}, //6258 #HANGUL SYLLABLE SSANGCIEUC YA MIEUM + {0xA47A, 0xCA25}, //6259 #HANGUL SYLLABLE SSANGCIEUC YA PIEUP + {0xA481, 0xCA26}, //6260 #HANGUL SYLLABLE SSANGCIEUC YA PIEUPSIOS + {0xA482, 0xCA27}, //6261 #HANGUL SYLLABLE SSANGCIEUC YA SIOS + {0xA483, 0xCA28}, //6262 #HANGUL SYLLABLE SSANGCIEUC YA SSANGSIOS + {0xA484, 0xCA2A}, //6263 #HANGUL SYLLABLE SSANGCIEUC YA CIEUC + {0xA485, 0xCA2B}, //6264 #HANGUL SYLLABLE SSANGCIEUC YA CHIEUCH + {0xA486, 0xCA2C}, //6265 #HANGUL SYLLABLE SSANGCIEUC YA KHIEUKH + {0xA487, 0xCA2D}, //6266 #HANGUL SYLLABLE SSANGCIEUC YA THIEUTH + {0xA488, 0xCA2E}, //6267 #HANGUL SYLLABLE SSANGCIEUC YA PHIEUPH + {0xA489, 0xCA2F}, //6268 #HANGUL SYLLABLE SSANGCIEUC YA HIEUH + {0xA48A, 0xCA30}, //6269 #HANGUL SYLLABLE SSANGCIEUC YAE + {0xA48B, 0xCA31}, //6270 #HANGUL SYLLABLE SSANGCIEUC YAE KIYEOK + {0xA48C, 0xCA32}, //6271 #HANGUL SYLLABLE SSANGCIEUC YAE SSANGKIYEOK + {0xA48D, 0xCA33}, //6272 #HANGUL SYLLABLE SSANGCIEUC YAE KIYEOKSIOS + {0xA48E, 0xCA34}, //6273 #HANGUL SYLLABLE SSANGCIEUC YAE NIEUN + {0xA48F, 0xCA35}, //6274 #HANGUL SYLLABLE SSANGCIEUC YAE NIEUNCIEUC + {0xA490, 0xCA36}, //6275 #HANGUL SYLLABLE SSANGCIEUC YAE NIEUNHIEUH + {0xA491, 0xCA37}, //6276 #HANGUL SYLLABLE SSANGCIEUC YAE TIKEUT + {0xA492, 0xCA38}, //6277 #HANGUL SYLLABLE SSANGCIEUC YAE RIEUL + {0xA493, 0xCA39}, //6278 #HANGUL SYLLABLE SSANGCIEUC YAE RIEULKIYEOK + {0xA494, 0xCA3A}, //6279 #HANGUL SYLLABLE SSANGCIEUC YAE RIEULMIEUM + {0xA495, 0xCA3B}, //6280 #HANGUL SYLLABLE SSANGCIEUC YAE RIEULPIEUP + {0xA496, 0xCA3C}, //6281 #HANGUL SYLLABLE SSANGCIEUC YAE RIEULSIOS + {0xA497, 0xCA3D}, //6282 #HANGUL SYLLABLE SSANGCIEUC YAE RIEULTHIEUTH + {0xA498, 0xCA3E}, //6283 #HANGUL SYLLABLE SSANGCIEUC YAE RIEULPHIEUPH + {0xA499, 0xCA3F}, //6284 #HANGUL SYLLABLE SSANGCIEUC YAE RIEULHIEUH + {0xA49A, 0xCA40}, //6285 #HANGUL SYLLABLE SSANGCIEUC YAE MIEUM + {0xA49B, 0xCA41}, //6286 #HANGUL SYLLABLE SSANGCIEUC YAE PIEUP + {0xA49C, 0xCA42}, //6287 #HANGUL SYLLABLE SSANGCIEUC YAE PIEUPSIOS + {0xA49D, 0xCA43}, //6288 #HANGUL SYLLABLE SSANGCIEUC YAE SIOS + {0xA49E, 0xCA44}, //6289 #HANGUL SYLLABLE SSANGCIEUC YAE SSANGSIOS + {0xA49F, 0xCA45}, //6290 #HANGUL SYLLABLE SSANGCIEUC YAE IEUNG + {0xA4A0, 0xCA46}, //6291 #HANGUL SYLLABLE SSANGCIEUC YAE CIEUC + {0xA4A1, 0x3131}, //6292 #HANGUL LETTER KIYEOK + {0xA4A2, 0x3132}, //6293 #HANGUL LETTER SSANGKIYEOK + {0xA4A3, 0x3133}, //6294 #HANGUL LETTER KIYEOK-SIOS + {0xA4A4, 0x3134}, //6295 #HANGUL LETTER NIEUN + {0xA4A5, 0x3135}, //6296 #HANGUL LETTER NIEUN-CIEUC + {0xA4A6, 0x3136}, //6297 #HANGUL LETTER NIEUN-HIEUH + {0xA4A7, 0x3137}, //6298 #HANGUL LETTER TIKEUT + {0xA4A8, 0x3138}, //6299 #HANGUL LETTER SSANGTIKEUT + {0xA4A9, 0x3139}, //6300 #HANGUL LETTER RIEUL + {0xA4AA, 0x313A}, //6301 #HANGUL LETTER RIEUL-KIYEOK + {0xA4AB, 0x313B}, //6302 #HANGUL LETTER RIEUL-MIEUM + {0xA4AC, 0x313C}, //6303 #HANGUL LETTER RIEUL-PIEUP + {0xA4AD, 0x313D}, //6304 #HANGUL LETTER RIEUL-SIOS + {0xA4AE, 0x313E}, //6305 #HANGUL LETTER RIEUL-THIEUTH + {0xA4AF, 0x313F}, //6306 #HANGUL LETTER RIEUL-PHIEUPH + {0xA4B0, 0x3140}, //6307 #HANGUL LETTER RIEUL-HIEUH + {0xA4B1, 0x3141}, //6308 #HANGUL LETTER MIEUM + {0xA4B2, 0x3142}, //6309 #HANGUL LETTER PIEUP + {0xA4B3, 0x3143}, //6310 #HANGUL LETTER SSANGPIEUP + {0xA4B4, 0x3144}, //6311 #HANGUL LETTER PIEUP-SIOS + {0xA4B5, 0x3145}, //6312 #HANGUL LETTER SIOS + {0xA4B6, 0x3146}, //6313 #HANGUL LETTER SSANGSIOS + {0xA4B7, 0x3147}, //6314 #HANGUL LETTER IEUNG + {0xA4B8, 0x3148}, //6315 #HANGUL LETTER CIEUC + {0xA4B9, 0x3149}, //6316 #HANGUL LETTER SSANGCIEUC + {0xA4BA, 0x314A}, //6317 #HANGUL LETTER CHIEUCH + {0xA4BB, 0x314B}, //6318 #HANGUL LETTER KHIEUKH + {0xA4BC, 0x314C}, //6319 #HANGUL LETTER THIEUTH + {0xA4BD, 0x314D}, //6320 #HANGUL LETTER PHIEUPH + {0xA4BE, 0x314E}, //6321 #HANGUL LETTER HIEUH + {0xA4BF, 0x314F}, //6322 #HANGUL LETTER A + {0xA4C0, 0x3150}, //6323 #HANGUL LETTER AE + {0xA4C1, 0x3151}, //6324 #HANGUL LETTER YA + {0xA4C2, 0x3152}, //6325 #HANGUL LETTER YAE + {0xA4C3, 0x3153}, //6326 #HANGUL LETTER EO + {0xA4C4, 0x3154}, //6327 #HANGUL LETTER E + {0xA4C5, 0x3155}, //6328 #HANGUL LETTER YEO + {0xA4C6, 0x3156}, //6329 #HANGUL LETTER YE + {0xA4C7, 0x3157}, //6330 #HANGUL LETTER O + {0xA4C8, 0x3158}, //6331 #HANGUL LETTER WA + {0xA4C9, 0x3159}, //6332 #HANGUL LETTER WAE + {0xA4CA, 0x315A}, //6333 #HANGUL LETTER OE + {0xA4CB, 0x315B}, //6334 #HANGUL LETTER YO + {0xA4CC, 0x315C}, //6335 #HANGUL LETTER U + {0xA4CD, 0x315D}, //6336 #HANGUL LETTER WEO + {0xA4CE, 0x315E}, //6337 #HANGUL LETTER WE + {0xA4CF, 0x315F}, //6338 #HANGUL LETTER WI + {0xA4D0, 0x3160}, //6339 #HANGUL LETTER YU + {0xA4D1, 0x3161}, //6340 #HANGUL LETTER EU + {0xA4D2, 0x3162}, //6341 #HANGUL LETTER YI + {0xA4D3, 0x3163}, //6342 #HANGUL LETTER I + {0xA4D4, 0x3164}, //6343 #HANGUL FILLER + {0xA4D5, 0x3165}, //6344 #HANGUL LETTER SSANGNIEUN + {0xA4D6, 0x3166}, //6345 #HANGUL LETTER NIEUN-TIKEUT + {0xA4D7, 0x3167}, //6346 #HANGUL LETTER NIEUN-SIOS + {0xA4D8, 0x3168}, //6347 #HANGUL LETTER NIEUN-PANSIOS + {0xA4D9, 0x3169}, //6348 #HANGUL LETTER RIEUL-KIYEOK-SIOS + {0xA4DA, 0x316A}, //6349 #HANGUL LETTER RIEUL-TIKEUT + {0xA4DB, 0x316B}, //6350 #HANGUL LETTER RIEUL-PIEUP-SIOS + {0xA4DC, 0x316C}, //6351 #HANGUL LETTER RIEUL-PANSIOS + {0xA4DD, 0x316D}, //6352 #HANGUL LETTER RIEUL-YEORINHIEUH + {0xA4DE, 0x316E}, //6353 #HANGUL LETTER MIEUM-PIEUP + {0xA4DF, 0x316F}, //6354 #HANGUL LETTER MIEUM-SIOS + {0xA4E0, 0x3170}, //6355 #HANGUL LETTER MIEUM-PANSIOS + {0xA4E1, 0x3171}, //6356 #HANGUL LETTER KAPYEOUNMIEUM + {0xA4E2, 0x3172}, //6357 #HANGUL LETTER PIEUP-KIYEOK + {0xA4E3, 0x3173}, //6358 #HANGUL LETTER PIEUP-TIKEUT + {0xA4E4, 0x3174}, //6359 #HANGUL LETTER PIEUP-SIOS-KIYEOK + {0xA4E5, 0x3175}, //6360 #HANGUL LETTER PIEUP-SIOS-TIKEUT + {0xA4E6, 0x3176}, //6361 #HANGUL LETTER PIEUP-CIEUC + {0xA4E7, 0x3177}, //6362 #HANGUL LETTER PIEUP-THIEUTH + {0xA4E8, 0x3178}, //6363 #HANGUL LETTER KAPYEOUNPIEUP + {0xA4E9, 0x3179}, //6364 #HANGUL LETTER KAPYEOUNSSANGPIEUP + {0xA4EA, 0x317A}, //6365 #HANGUL LETTER SIOS-KIYEOK + {0xA4EB, 0x317B}, //6366 #HANGUL LETTER SIOS-NIEUN + {0xA4EC, 0x317C}, //6367 #HANGUL LETTER SIOS-TIKEUT + {0xA4ED, 0x317D}, //6368 #HANGUL LETTER SIOS-PIEUP + {0xA4EE, 0x317E}, //6369 #HANGUL LETTER SIOS-CIEUC + {0xA4EF, 0x317F}, //6370 #HANGUL LETTER PANSIOS + {0xA4F0, 0x3180}, //6371 #HANGUL LETTER SSANGIEUNG + {0xA4F1, 0x3181}, //6372 #HANGUL LETTER YESIEUNG + {0xA4F2, 0x3182}, //6373 #HANGUL LETTER YESIEUNG-SIOS + {0xA4F3, 0x3183}, //6374 #HANGUL LETTER YESIEUNG-PANSIOS + {0xA4F4, 0x3184}, //6375 #HANGUL LETTER KAPYEOUNPHIEUPH + {0xA4F5, 0x3185}, //6376 #HANGUL LETTER SSANGHIEUH + {0xA4F6, 0x3186}, //6377 #HANGUL LETTER YEORINHIEUH + {0xA4F7, 0x3187}, //6378 #HANGUL LETTER YO-YA + {0xA4F8, 0x3188}, //6379 #HANGUL LETTER YO-YAE + {0xA4F9, 0x3189}, //6380 #HANGUL LETTER YO-I + {0xA4FA, 0x318A}, //6381 #HANGUL LETTER YU-YEO + {0xA4FB, 0x318B}, //6382 #HANGUL LETTER YU-YE + {0xA4FC, 0x318C}, //6383 #HANGUL LETTER YU-I + {0xA4FD, 0x318D}, //6384 #HANGUL LETTER ARAEA + {0xA4FE, 0x318E}, //6385 #HANGUL LETTER ARAEAE + {0xA541, 0xCA47}, //6386 #HANGUL SYLLABLE SSANGCIEUC YAE CHIEUCH + {0xA542, 0xCA48}, //6387 #HANGUL SYLLABLE SSANGCIEUC YAE KHIEUKH + {0xA543, 0xCA49}, //6388 #HANGUL SYLLABLE SSANGCIEUC YAE THIEUTH + {0xA544, 0xCA4A}, //6389 #HANGUL SYLLABLE SSANGCIEUC YAE PHIEUPH + {0xA545, 0xCA4B}, //6390 #HANGUL SYLLABLE SSANGCIEUC YAE HIEUH + {0xA546, 0xCA4E}, //6391 #HANGUL SYLLABLE SSANGCIEUC EO SSANGKIYEOK + {0xA547, 0xCA4F}, //6392 #HANGUL SYLLABLE SSANGCIEUC EO KIYEOKSIOS + {0xA548, 0xCA51}, //6393 #HANGUL SYLLABLE SSANGCIEUC EO NIEUNCIEUC + {0xA549, 0xCA52}, //6394 #HANGUL SYLLABLE SSANGCIEUC EO NIEUNHIEUH + {0xA54A, 0xCA53}, //6395 #HANGUL SYLLABLE SSANGCIEUC EO TIKEUT + {0xA54B, 0xCA55}, //6396 #HANGUL SYLLABLE SSANGCIEUC EO RIEULKIYEOK + {0xA54C, 0xCA56}, //6397 #HANGUL SYLLABLE SSANGCIEUC EO RIEULMIEUM + {0xA54D, 0xCA57}, //6398 #HANGUL SYLLABLE SSANGCIEUC EO RIEULPIEUP + {0xA54E, 0xCA58}, //6399 #HANGUL SYLLABLE SSANGCIEUC EO RIEULSIOS + {0xA54F, 0xCA59}, //6400 #HANGUL SYLLABLE SSANGCIEUC EO RIEULTHIEUTH + {0xA550, 0xCA5A}, //6401 #HANGUL SYLLABLE SSANGCIEUC EO RIEULPHIEUPH + {0xA551, 0xCA5B}, //6402 #HANGUL SYLLABLE SSANGCIEUC EO RIEULHIEUH + {0xA552, 0xCA5E}, //6403 #HANGUL SYLLABLE SSANGCIEUC EO PIEUPSIOS + {0xA553, 0xCA62}, //6404 #HANGUL SYLLABLE SSANGCIEUC EO CIEUC + {0xA554, 0xCA63}, //6405 #HANGUL SYLLABLE SSANGCIEUC EO CHIEUCH + {0xA555, 0xCA64}, //6406 #HANGUL SYLLABLE SSANGCIEUC EO KHIEUKH + {0xA556, 0xCA65}, //6407 #HANGUL SYLLABLE SSANGCIEUC EO THIEUTH + {0xA557, 0xCA66}, //6408 #HANGUL SYLLABLE SSANGCIEUC EO PHIEUPH + {0xA558, 0xCA67}, //6409 #HANGUL SYLLABLE SSANGCIEUC EO HIEUH + {0xA559, 0xCA69}, //6410 #HANGUL SYLLABLE SSANGCIEUC E KIYEOK + {0xA55A, 0xCA6A}, //6411 #HANGUL SYLLABLE SSANGCIEUC E SSANGKIYEOK + {0xA561, 0xCA6B}, //6412 #HANGUL SYLLABLE SSANGCIEUC E KIYEOKSIOS + {0xA562, 0xCA6C}, //6413 #HANGUL SYLLABLE SSANGCIEUC E NIEUN + {0xA563, 0xCA6D}, //6414 #HANGUL SYLLABLE SSANGCIEUC E NIEUNCIEUC + {0xA564, 0xCA6E}, //6415 #HANGUL SYLLABLE SSANGCIEUC E NIEUNHIEUH + {0xA565, 0xCA6F}, //6416 #HANGUL SYLLABLE SSANGCIEUC E TIKEUT + {0xA566, 0xCA70}, //6417 #HANGUL SYLLABLE SSANGCIEUC E RIEUL + {0xA567, 0xCA71}, //6418 #HANGUL SYLLABLE SSANGCIEUC E RIEULKIYEOK + {0xA568, 0xCA72}, //6419 #HANGUL SYLLABLE SSANGCIEUC E RIEULMIEUM + {0xA569, 0xCA73}, //6420 #HANGUL SYLLABLE SSANGCIEUC E RIEULPIEUP + {0xA56A, 0xCA74}, //6421 #HANGUL SYLLABLE SSANGCIEUC E RIEULSIOS + {0xA56B, 0xCA75}, //6422 #HANGUL SYLLABLE SSANGCIEUC E RIEULTHIEUTH + {0xA56C, 0xCA76}, //6423 #HANGUL SYLLABLE SSANGCIEUC E RIEULPHIEUPH + {0xA56D, 0xCA77}, //6424 #HANGUL SYLLABLE SSANGCIEUC E RIEULHIEUH + {0xA56E, 0xCA78}, //6425 #HANGUL SYLLABLE SSANGCIEUC E MIEUM + {0xA56F, 0xCA79}, //6426 #HANGUL SYLLABLE SSANGCIEUC E PIEUP + {0xA570, 0xCA7A}, //6427 #HANGUL SYLLABLE SSANGCIEUC E PIEUPSIOS + {0xA571, 0xCA7B}, //6428 #HANGUL SYLLABLE SSANGCIEUC E SIOS + {0xA572, 0xCA7C}, //6429 #HANGUL SYLLABLE SSANGCIEUC E SSANGSIOS + {0xA573, 0xCA7E}, //6430 #HANGUL SYLLABLE SSANGCIEUC E CIEUC + {0xA574, 0xCA7F}, //6431 #HANGUL SYLLABLE SSANGCIEUC E CHIEUCH + {0xA575, 0xCA80}, //6432 #HANGUL SYLLABLE SSANGCIEUC E KHIEUKH + {0xA576, 0xCA81}, //6433 #HANGUL SYLLABLE SSANGCIEUC E THIEUTH + {0xA577, 0xCA82}, //6434 #HANGUL SYLLABLE SSANGCIEUC E PHIEUPH + {0xA578, 0xCA83}, //6435 #HANGUL SYLLABLE SSANGCIEUC E HIEUH + {0xA579, 0xCA85}, //6436 #HANGUL SYLLABLE SSANGCIEUC YEO KIYEOK + {0xA57A, 0xCA86}, //6437 #HANGUL SYLLABLE SSANGCIEUC YEO SSANGKIYEOK + {0xA581, 0xCA87}, //6438 #HANGUL SYLLABLE SSANGCIEUC YEO KIYEOKSIOS + {0xA582, 0xCA88}, //6439 #HANGUL SYLLABLE SSANGCIEUC YEO NIEUN + {0xA583, 0xCA89}, //6440 #HANGUL SYLLABLE SSANGCIEUC YEO NIEUNCIEUC + {0xA584, 0xCA8A}, //6441 #HANGUL SYLLABLE SSANGCIEUC YEO NIEUNHIEUH + {0xA585, 0xCA8B}, //6442 #HANGUL SYLLABLE SSANGCIEUC YEO TIKEUT + {0xA586, 0xCA8C}, //6443 #HANGUL SYLLABLE SSANGCIEUC YEO RIEUL + {0xA587, 0xCA8D}, //6444 #HANGUL SYLLABLE SSANGCIEUC YEO RIEULKIYEOK + {0xA588, 0xCA8E}, //6445 #HANGUL SYLLABLE SSANGCIEUC YEO RIEULMIEUM + {0xA589, 0xCA8F}, //6446 #HANGUL SYLLABLE SSANGCIEUC YEO RIEULPIEUP + {0xA58A, 0xCA90}, //6447 #HANGUL SYLLABLE SSANGCIEUC YEO RIEULSIOS + {0xA58B, 0xCA91}, //6448 #HANGUL SYLLABLE SSANGCIEUC YEO RIEULTHIEUTH + {0xA58C, 0xCA92}, //6449 #HANGUL SYLLABLE SSANGCIEUC YEO RIEULPHIEUPH + {0xA58D, 0xCA93}, //6450 #HANGUL SYLLABLE SSANGCIEUC YEO RIEULHIEUH + {0xA58E, 0xCA94}, //6451 #HANGUL SYLLABLE SSANGCIEUC YEO MIEUM + {0xA58F, 0xCA95}, //6452 #HANGUL SYLLABLE SSANGCIEUC YEO PIEUP + {0xA590, 0xCA96}, //6453 #HANGUL SYLLABLE SSANGCIEUC YEO PIEUPSIOS + {0xA591, 0xCA97}, //6454 #HANGUL SYLLABLE SSANGCIEUC YEO SIOS + {0xA592, 0xCA99}, //6455 #HANGUL SYLLABLE SSANGCIEUC YEO IEUNG + {0xA593, 0xCA9A}, //6456 #HANGUL SYLLABLE SSANGCIEUC YEO CIEUC + {0xA594, 0xCA9B}, //6457 #HANGUL SYLLABLE SSANGCIEUC YEO CHIEUCH + {0xA595, 0xCA9C}, //6458 #HANGUL SYLLABLE SSANGCIEUC YEO KHIEUKH + {0xA596, 0xCA9D}, //6459 #HANGUL SYLLABLE SSANGCIEUC YEO THIEUTH + {0xA597, 0xCA9E}, //6460 #HANGUL SYLLABLE SSANGCIEUC YEO PHIEUPH + {0xA598, 0xCA9F}, //6461 #HANGUL SYLLABLE SSANGCIEUC YEO HIEUH + {0xA599, 0xCAA0}, //6462 #HANGUL SYLLABLE SSANGCIEUC YE + {0xA59A, 0xCAA1}, //6463 #HANGUL SYLLABLE SSANGCIEUC YE KIYEOK + {0xA59B, 0xCAA2}, //6464 #HANGUL SYLLABLE SSANGCIEUC YE SSANGKIYEOK + {0xA59C, 0xCAA3}, //6465 #HANGUL SYLLABLE SSANGCIEUC YE KIYEOKSIOS + {0xA59D, 0xCAA4}, //6466 #HANGUL SYLLABLE SSANGCIEUC YE NIEUN + {0xA59E, 0xCAA5}, //6467 #HANGUL SYLLABLE SSANGCIEUC YE NIEUNCIEUC + {0xA59F, 0xCAA6}, //6468 #HANGUL SYLLABLE SSANGCIEUC YE NIEUNHIEUH + {0xA5A0, 0xCAA7}, //6469 #HANGUL SYLLABLE SSANGCIEUC YE TIKEUT + {0xA5A1, 0x2170}, //6470 #SMALL ROMAN NUMERAL ONE + {0xA5A2, 0x2171}, //6471 #SMALL ROMAN NUMERAL TWO + {0xA5A3, 0x2172}, //6472 #SMALL ROMAN NUMERAL THREE + {0xA5A4, 0x2173}, //6473 #SMALL ROMAN NUMERAL FOUR + {0xA5A5, 0x2174}, //6474 #SMALL ROMAN NUMERAL FIVE + {0xA5A6, 0x2175}, //6475 #SMALL ROMAN NUMERAL SIX + {0xA5A7, 0x2176}, //6476 #SMALL ROMAN NUMERAL SEVEN + {0xA5A8, 0x2177}, //6477 #SMALL ROMAN NUMERAL EIGHT + {0xA5A9, 0x2178}, //6478 #SMALL ROMAN NUMERAL NINE + {0xA5AA, 0x2179}, //6479 #SMALL ROMAN NUMERAL TEN + {0xA5B0, 0x2160}, //6480 #ROMAN NUMERAL ONE + {0xA5B1, 0x2161}, //6481 #ROMAN NUMERAL TWO + {0xA5B2, 0x2162}, //6482 #ROMAN NUMERAL THREE + {0xA5B3, 0x2163}, //6483 #ROMAN NUMERAL FOUR + {0xA5B4, 0x2164}, //6484 #ROMAN NUMERAL FIVE + {0xA5B5, 0x2165}, //6485 #ROMAN NUMERAL SIX + {0xA5B6, 0x2166}, //6486 #ROMAN NUMERAL SEVEN + {0xA5B7, 0x2167}, //6487 #ROMAN NUMERAL EIGHT + {0xA5B8, 0x2168}, //6488 #ROMAN NUMERAL NINE + {0xA5B9, 0x2169}, //6489 #ROMAN NUMERAL TEN + {0xA5C1, 0x0391}, //6490 #GREEK CAPITAL LETTER ALPHA + {0xA5C2, 0x0392}, //6491 #GREEK CAPITAL LETTER BETA + {0xA5C3, 0x0393}, //6492 #GREEK CAPITAL LETTER GAMMA + {0xA5C4, 0x0394}, //6493 #GREEK CAPITAL LETTER DELTA + {0xA5C5, 0x0395}, //6494 #GREEK CAPITAL LETTER EPSILON + {0xA5C6, 0x0396}, //6495 #GREEK CAPITAL LETTER ZETA + {0xA5C7, 0x0397}, //6496 #GREEK CAPITAL LETTER ETA + {0xA5C8, 0x0398}, //6497 #GREEK CAPITAL LETTER THETA + {0xA5C9, 0x0399}, //6498 #GREEK CAPITAL LETTER IOTA + {0xA5CA, 0x039A}, //6499 #GREEK CAPITAL LETTER KAPPA + {0xA5CB, 0x039B}, //6500 #GREEK CAPITAL LETTER LAMDA + {0xA5CC, 0x039C}, //6501 #GREEK CAPITAL LETTER MU + {0xA5CD, 0x039D}, //6502 #GREEK CAPITAL LETTER NU + {0xA5CE, 0x039E}, //6503 #GREEK CAPITAL LETTER XI + {0xA5CF, 0x039F}, //6504 #GREEK CAPITAL LETTER OMICRON + {0xA5D0, 0x03A0}, //6505 #GREEK CAPITAL LETTER PI + {0xA5D1, 0x03A1}, //6506 #GREEK CAPITAL LETTER RHO + {0xA5D2, 0x03A3}, //6507 #GREEK CAPITAL LETTER SIGMA + {0xA5D3, 0x03A4}, //6508 #GREEK CAPITAL LETTER TAU + {0xA5D4, 0x03A5}, //6509 #GREEK CAPITAL LETTER UPSILON + {0xA5D5, 0x03A6}, //6510 #GREEK CAPITAL LETTER PHI + {0xA5D6, 0x03A7}, //6511 #GREEK CAPITAL LETTER CHI + {0xA5D7, 0x03A8}, //6512 #GREEK CAPITAL LETTER PSI + {0xA5D8, 0x03A9}, //6513 #GREEK CAPITAL LETTER OMEGA + {0xA5E1, 0x03B1}, //6514 #GREEK SMALL LETTER ALPHA + {0xA5E2, 0x03B2}, //6515 #GREEK SMALL LETTER BETA + {0xA5E3, 0x03B3}, //6516 #GREEK SMALL LETTER GAMMA + {0xA5E4, 0x03B4}, //6517 #GREEK SMALL LETTER DELTA + {0xA5E5, 0x03B5}, //6518 #GREEK SMALL LETTER EPSILON + {0xA5E6, 0x03B6}, //6519 #GREEK SMALL LETTER ZETA + {0xA5E7, 0x03B7}, //6520 #GREEK SMALL LETTER ETA + {0xA5E8, 0x03B8}, //6521 #GREEK SMALL LETTER THETA + {0xA5E9, 0x03B9}, //6522 #GREEK SMALL LETTER IOTA + {0xA5EA, 0x03BA}, //6523 #GREEK SMALL LETTER KAPPA + {0xA5EB, 0x03BB}, //6524 #GREEK SMALL LETTER LAMDA + {0xA5EC, 0x03BC}, //6525 #GREEK SMALL LETTER MU + {0xA5ED, 0x03BD}, //6526 #GREEK SMALL LETTER NU + {0xA5EE, 0x03BE}, //6527 #GREEK SMALL LETTER XI + {0xA5EF, 0x03BF}, //6528 #GREEK SMALL LETTER OMICRON + {0xA5F0, 0x03C0}, //6529 #GREEK SMALL LETTER PI + {0xA5F1, 0x03C1}, //6530 #GREEK SMALL LETTER RHO + {0xA5F2, 0x03C3}, //6531 #GREEK SMALL LETTER SIGMA + {0xA5F3, 0x03C4}, //6532 #GREEK SMALL LETTER TAU + {0xA5F4, 0x03C5}, //6533 #GREEK SMALL LETTER UPSILON + {0xA5F5, 0x03C6}, //6534 #GREEK SMALL LETTER PHI + {0xA5F6, 0x03C7}, //6535 #GREEK SMALL LETTER CHI + {0xA5F7, 0x03C8}, //6536 #GREEK SMALL LETTER PSI + {0xA5F8, 0x03C9}, //6537 #GREEK SMALL LETTER OMEGA + {0xA641, 0xCAA8}, //6538 #HANGUL SYLLABLE SSANGCIEUC YE RIEUL + {0xA642, 0xCAA9}, //6539 #HANGUL SYLLABLE SSANGCIEUC YE RIEULKIYEOK + {0xA643, 0xCAAA}, //6540 #HANGUL SYLLABLE SSANGCIEUC YE RIEULMIEUM + {0xA644, 0xCAAB}, //6541 #HANGUL SYLLABLE SSANGCIEUC YE RIEULPIEUP + {0xA645, 0xCAAC}, //6542 #HANGUL SYLLABLE SSANGCIEUC YE RIEULSIOS + {0xA646, 0xCAAD}, //6543 #HANGUL SYLLABLE SSANGCIEUC YE RIEULTHIEUTH + {0xA647, 0xCAAE}, //6544 #HANGUL SYLLABLE SSANGCIEUC YE RIEULPHIEUPH + {0xA648, 0xCAAF}, //6545 #HANGUL SYLLABLE SSANGCIEUC YE RIEULHIEUH + {0xA649, 0xCAB0}, //6546 #HANGUL SYLLABLE SSANGCIEUC YE MIEUM + {0xA64A, 0xCAB1}, //6547 #HANGUL SYLLABLE SSANGCIEUC YE PIEUP + {0xA64B, 0xCAB2}, //6548 #HANGUL SYLLABLE SSANGCIEUC YE PIEUPSIOS + {0xA64C, 0xCAB3}, //6549 #HANGUL SYLLABLE SSANGCIEUC YE SIOS + {0xA64D, 0xCAB4}, //6550 #HANGUL SYLLABLE SSANGCIEUC YE SSANGSIOS + {0xA64E, 0xCAB5}, //6551 #HANGUL SYLLABLE SSANGCIEUC YE IEUNG + {0xA64F, 0xCAB6}, //6552 #HANGUL SYLLABLE SSANGCIEUC YE CIEUC + {0xA650, 0xCAB7}, //6553 #HANGUL SYLLABLE SSANGCIEUC YE CHIEUCH + {0xA651, 0xCAB8}, //6554 #HANGUL SYLLABLE SSANGCIEUC YE KHIEUKH + {0xA652, 0xCAB9}, //6555 #HANGUL SYLLABLE SSANGCIEUC YE THIEUTH + {0xA653, 0xCABA}, //6556 #HANGUL SYLLABLE SSANGCIEUC YE PHIEUPH + {0xA654, 0xCABB}, //6557 #HANGUL SYLLABLE SSANGCIEUC YE HIEUH + {0xA655, 0xCABE}, //6558 #HANGUL SYLLABLE SSANGCIEUC O SSANGKIYEOK + {0xA656, 0xCABF}, //6559 #HANGUL SYLLABLE SSANGCIEUC O KIYEOKSIOS + {0xA657, 0xCAC1}, //6560 #HANGUL SYLLABLE SSANGCIEUC O NIEUNCIEUC + {0xA658, 0xCAC2}, //6561 #HANGUL SYLLABLE SSANGCIEUC O NIEUNHIEUH + {0xA659, 0xCAC3}, //6562 #HANGUL SYLLABLE SSANGCIEUC O TIKEUT + {0xA65A, 0xCAC5}, //6563 #HANGUL SYLLABLE SSANGCIEUC O RIEULKIYEOK + {0xA661, 0xCAC6}, //6564 #HANGUL SYLLABLE SSANGCIEUC O RIEULMIEUM + {0xA662, 0xCAC7}, //6565 #HANGUL SYLLABLE SSANGCIEUC O RIEULPIEUP + {0xA663, 0xCAC8}, //6566 #HANGUL SYLLABLE SSANGCIEUC O RIEULSIOS + {0xA664, 0xCAC9}, //6567 #HANGUL SYLLABLE SSANGCIEUC O RIEULTHIEUTH + {0xA665, 0xCACA}, //6568 #HANGUL SYLLABLE SSANGCIEUC O RIEULPHIEUPH + {0xA666, 0xCACB}, //6569 #HANGUL SYLLABLE SSANGCIEUC O RIEULHIEUH + {0xA667, 0xCACE}, //6570 #HANGUL SYLLABLE SSANGCIEUC O PIEUPSIOS + {0xA668, 0xCAD0}, //6571 #HANGUL SYLLABLE SSANGCIEUC O SSANGSIOS + {0xA669, 0xCAD2}, //6572 #HANGUL SYLLABLE SSANGCIEUC O CIEUC + {0xA66A, 0xCAD4}, //6573 #HANGUL SYLLABLE SSANGCIEUC O KHIEUKH + {0xA66B, 0xCAD5}, //6574 #HANGUL SYLLABLE SSANGCIEUC O THIEUTH + {0xA66C, 0xCAD6}, //6575 #HANGUL SYLLABLE SSANGCIEUC O PHIEUPH + {0xA66D, 0xCAD7}, //6576 #HANGUL SYLLABLE SSANGCIEUC O HIEUH + {0xA66E, 0xCADA}, //6577 #HANGUL SYLLABLE SSANGCIEUC WA SSANGKIYEOK + {0xA66F, 0xCADB}, //6578 #HANGUL SYLLABLE SSANGCIEUC WA KIYEOKSIOS + {0xA670, 0xCADC}, //6579 #HANGUL SYLLABLE SSANGCIEUC WA NIEUN + {0xA671, 0xCADD}, //6580 #HANGUL SYLLABLE SSANGCIEUC WA NIEUNCIEUC + {0xA672, 0xCADE}, //6581 #HANGUL SYLLABLE SSANGCIEUC WA NIEUNHIEUH + {0xA673, 0xCADF}, //6582 #HANGUL SYLLABLE SSANGCIEUC WA TIKEUT + {0xA674, 0xCAE1}, //6583 #HANGUL SYLLABLE SSANGCIEUC WA RIEULKIYEOK + {0xA675, 0xCAE2}, //6584 #HANGUL SYLLABLE SSANGCIEUC WA RIEULMIEUM + {0xA676, 0xCAE3}, //6585 #HANGUL SYLLABLE SSANGCIEUC WA RIEULPIEUP + {0xA677, 0xCAE4}, //6586 #HANGUL SYLLABLE SSANGCIEUC WA RIEULSIOS + {0xA678, 0xCAE5}, //6587 #HANGUL SYLLABLE SSANGCIEUC WA RIEULTHIEUTH + {0xA679, 0xCAE6}, //6588 #HANGUL SYLLABLE SSANGCIEUC WA RIEULPHIEUPH + {0xA67A, 0xCAE7}, //6589 #HANGUL SYLLABLE SSANGCIEUC WA RIEULHIEUH + {0xA681, 0xCAE8}, //6590 #HANGUL SYLLABLE SSANGCIEUC WA MIEUM + {0xA682, 0xCAE9}, //6591 #HANGUL SYLLABLE SSANGCIEUC WA PIEUP + {0xA683, 0xCAEA}, //6592 #HANGUL SYLLABLE SSANGCIEUC WA PIEUPSIOS + {0xA684, 0xCAEB}, //6593 #HANGUL SYLLABLE SSANGCIEUC WA SIOS + {0xA685, 0xCAED}, //6594 #HANGUL SYLLABLE SSANGCIEUC WA IEUNG + {0xA686, 0xCAEE}, //6595 #HANGUL SYLLABLE SSANGCIEUC WA CIEUC + {0xA687, 0xCAEF}, //6596 #HANGUL SYLLABLE SSANGCIEUC WA CHIEUCH + {0xA688, 0xCAF0}, //6597 #HANGUL SYLLABLE SSANGCIEUC WA KHIEUKH + {0xA689, 0xCAF1}, //6598 #HANGUL SYLLABLE SSANGCIEUC WA THIEUTH + {0xA68A, 0xCAF2}, //6599 #HANGUL SYLLABLE SSANGCIEUC WA PHIEUPH + {0xA68B, 0xCAF3}, //6600 #HANGUL SYLLABLE SSANGCIEUC WA HIEUH + {0xA68C, 0xCAF5}, //6601 #HANGUL SYLLABLE SSANGCIEUC WAE KIYEOK + {0xA68D, 0xCAF6}, //6602 #HANGUL SYLLABLE SSANGCIEUC WAE SSANGKIYEOK + {0xA68E, 0xCAF7}, //6603 #HANGUL SYLLABLE SSANGCIEUC WAE KIYEOKSIOS + {0xA68F, 0xCAF8}, //6604 #HANGUL SYLLABLE SSANGCIEUC WAE NIEUN + {0xA690, 0xCAF9}, //6605 #HANGUL SYLLABLE SSANGCIEUC WAE NIEUNCIEUC + {0xA691, 0xCAFA}, //6606 #HANGUL SYLLABLE SSANGCIEUC WAE NIEUNHIEUH + {0xA692, 0xCAFB}, //6607 #HANGUL SYLLABLE SSANGCIEUC WAE TIKEUT + {0xA693, 0xCAFC}, //6608 #HANGUL SYLLABLE SSANGCIEUC WAE RIEUL + {0xA694, 0xCAFD}, //6609 #HANGUL SYLLABLE SSANGCIEUC WAE RIEULKIYEOK + {0xA695, 0xCAFE}, //6610 #HANGUL SYLLABLE SSANGCIEUC WAE RIEULMIEUM + {0xA696, 0xCAFF}, //6611 #HANGUL SYLLABLE SSANGCIEUC WAE RIEULPIEUP + {0xA697, 0xCB00}, //6612 #HANGUL SYLLABLE SSANGCIEUC WAE RIEULSIOS + {0xA698, 0xCB01}, //6613 #HANGUL SYLLABLE SSANGCIEUC WAE RIEULTHIEUTH + {0xA699, 0xCB02}, //6614 #HANGUL SYLLABLE SSANGCIEUC WAE RIEULPHIEUPH + {0xA69A, 0xCB03}, //6615 #HANGUL SYLLABLE SSANGCIEUC WAE RIEULHIEUH + {0xA69B, 0xCB04}, //6616 #HANGUL SYLLABLE SSANGCIEUC WAE MIEUM + {0xA69C, 0xCB05}, //6617 #HANGUL SYLLABLE SSANGCIEUC WAE PIEUP + {0xA69D, 0xCB06}, //6618 #HANGUL SYLLABLE SSANGCIEUC WAE PIEUPSIOS + {0xA69E, 0xCB07}, //6619 #HANGUL SYLLABLE SSANGCIEUC WAE SIOS + {0xA69F, 0xCB09}, //6620 #HANGUL SYLLABLE SSANGCIEUC WAE IEUNG + {0xA6A0, 0xCB0A}, //6621 #HANGUL SYLLABLE SSANGCIEUC WAE CIEUC + {0xA6A1, 0x2500}, //6622 #BOX DRAWINGS LIGHT HORIZONTAL + {0xA6A2, 0x2502}, //6623 #BOX DRAWINGS LIGHT VERTICAL + {0xA6A3, 0x250C}, //6624 #BOX DRAWINGS LIGHT DOWN AND RIGHT + {0xA6A4, 0x2510}, //6625 #BOX DRAWINGS LIGHT DOWN AND LEFT + {0xA6A5, 0x2518}, //6626 #BOX DRAWINGS LIGHT UP AND LEFT + {0xA6A6, 0x2514}, //6627 #BOX DRAWINGS LIGHT UP AND RIGHT + {0xA6A7, 0x251C}, //6628 #BOX DRAWINGS LIGHT VERTICAL AND RIGHT + {0xA6A8, 0x252C}, //6629 #BOX DRAWINGS LIGHT DOWN AND HORIZONTAL + {0xA6A9, 0x2524}, //6630 #BOX DRAWINGS LIGHT VERTICAL AND LEFT + {0xA6AA, 0x2534}, //6631 #BOX DRAWINGS LIGHT UP AND HORIZONTAL + {0xA6AB, 0x253C}, //6632 #BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL + {0xA6AC, 0x2501}, //6633 #BOX DRAWINGS HEAVY HORIZONTAL + {0xA6AD, 0x2503}, //6634 #BOX DRAWINGS HEAVY VERTICAL + {0xA6AE, 0x250F}, //6635 #BOX DRAWINGS HEAVY DOWN AND RIGHT + {0xA6AF, 0x2513}, //6636 #BOX DRAWINGS HEAVY DOWN AND LEFT + {0xA6B0, 0x251B}, //6637 #BOX DRAWINGS HEAVY UP AND LEFT + {0xA6B1, 0x2517}, //6638 #BOX DRAWINGS HEAVY UP AND RIGHT + {0xA6B2, 0x2523}, //6639 #BOX DRAWINGS HEAVY VERTICAL AND RIGHT + {0xA6B3, 0x2533}, //6640 #BOX DRAWINGS HEAVY DOWN AND HORIZONTAL + {0xA6B4, 0x252B}, //6641 #BOX DRAWINGS HEAVY VERTICAL AND LEFT + {0xA6B5, 0x253B}, //6642 #BOX DRAWINGS HEAVY UP AND HORIZONTAL + {0xA6B6, 0x254B}, //6643 #BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL + {0xA6B7, 0x2520}, //6644 #BOX DRAWINGS VERTICAL HEAVY AND RIGHT LIGHT + {0xA6B8, 0x252F}, //6645 #BOX DRAWINGS DOWN LIGHT AND HORIZONTAL HEAVY + {0xA6B9, 0x2528}, //6646 #BOX DRAWINGS VERTICAL HEAVY AND LEFT LIGHT + {0xA6BA, 0x2537}, //6647 #BOX DRAWINGS UP LIGHT AND HORIZONTAL HEAVY + {0xA6BB, 0x253F}, //6648 #BOX DRAWINGS VERTICAL LIGHT AND HORIZONTAL HEAVY + {0xA6BC, 0x251D}, //6649 #BOX DRAWINGS VERTICAL LIGHT AND RIGHT HEAVY + {0xA6BD, 0x2530}, //6650 #BOX DRAWINGS DOWN HEAVY AND HORIZONTAL LIGHT + {0xA6BE, 0x2525}, //6651 #BOX DRAWINGS VERTICAL LIGHT AND LEFT HEAVY + {0xA6BF, 0x2538}, //6652 #BOX DRAWINGS UP HEAVY AND HORIZONTAL LIGHT + {0xA6C0, 0x2542}, //6653 #BOX DRAWINGS VERTICAL HEAVY AND HORIZONTAL LIGHT + {0xA6C1, 0x2512}, //6654 #BOX DRAWINGS DOWN HEAVY AND LEFT LIGHT + {0xA6C2, 0x2511}, //6655 #BOX DRAWINGS DOWN LIGHT AND LEFT HEAVY + {0xA6C3, 0x251A}, //6656 #BOX DRAWINGS UP HEAVY AND LEFT LIGHT + {0xA6C4, 0x2519}, //6657 #BOX DRAWINGS UP LIGHT AND LEFT HEAVY + {0xA6C5, 0x2516}, //6658 #BOX DRAWINGS UP HEAVY AND RIGHT LIGHT + {0xA6C6, 0x2515}, //6659 #BOX DRAWINGS UP LIGHT AND RIGHT HEAVY + {0xA6C7, 0x250E}, //6660 #BOX DRAWINGS DOWN HEAVY AND RIGHT LIGHT + {0xA6C8, 0x250D}, //6661 #BOX DRAWINGS DOWN LIGHT AND RIGHT HEAVY + {0xA6C9, 0x251E}, //6662 #BOX DRAWINGS UP HEAVY AND RIGHT DOWN LIGHT + {0xA6CA, 0x251F}, //6663 #BOX DRAWINGS DOWN HEAVY AND RIGHT UP LIGHT + {0xA6CB, 0x2521}, //6664 #BOX DRAWINGS DOWN LIGHT AND RIGHT UP HEAVY + {0xA6CC, 0x2522}, //6665 #BOX DRAWINGS UP LIGHT AND RIGHT DOWN HEAVY + {0xA6CD, 0x2526}, //6666 #BOX DRAWINGS UP HEAVY AND LEFT DOWN LIGHT + {0xA6CE, 0x2527}, //6667 #BOX DRAWINGS DOWN HEAVY AND LEFT UP LIGHT + {0xA6CF, 0x2529}, //6668 #BOX DRAWINGS DOWN LIGHT AND LEFT UP HEAVY + {0xA6D0, 0x252A}, //6669 #BOX DRAWINGS UP LIGHT AND LEFT DOWN HEAVY + {0xA6D1, 0x252D}, //6670 #BOX DRAWINGS LEFT HEAVY AND RIGHT DOWN LIGHT + {0xA6D2, 0x252E}, //6671 #BOX DRAWINGS RIGHT HEAVY AND LEFT DOWN LIGHT + {0xA6D3, 0x2531}, //6672 #BOX DRAWINGS RIGHT LIGHT AND LEFT DOWN HEAVY + {0xA6D4, 0x2532}, //6673 #BOX DRAWINGS LEFT LIGHT AND RIGHT DOWN HEAVY + {0xA6D5, 0x2535}, //6674 #BOX DRAWINGS LEFT HEAVY AND RIGHT UP LIGHT + {0xA6D6, 0x2536}, //6675 #BOX DRAWINGS RIGHT HEAVY AND LEFT UP LIGHT + {0xA6D7, 0x2539}, //6676 #BOX DRAWINGS RIGHT LIGHT AND LEFT UP HEAVY + {0xA6D8, 0x253A}, //6677 #BOX DRAWINGS LEFT LIGHT AND RIGHT UP HEAVY + {0xA6D9, 0x253D}, //6678 #BOX DRAWINGS LEFT HEAVY AND RIGHT VERTICAL LIGHT + {0xA6DA, 0x253E}, //6679 #BOX DRAWINGS RIGHT HEAVY AND LEFT VERTICAL LIGHT + {0xA6DB, 0x2540}, //6680 #BOX DRAWINGS UP HEAVY AND DOWN HORIZONTAL LIGHT + {0xA6DC, 0x2541}, //6681 #BOX DRAWINGS DOWN HEAVY AND UP HORIZONTAL LIGHT + {0xA6DD, 0x2543}, //6682 #BOX DRAWINGS LEFT UP HEAVY AND RIGHT DOWN LIGHT + {0xA6DE, 0x2544}, //6683 #BOX DRAWINGS RIGHT UP HEAVY AND LEFT DOWN LIGHT + {0xA6DF, 0x2545}, //6684 #BOX DRAWINGS LEFT DOWN HEAVY AND RIGHT UP LIGHT + {0xA6E0, 0x2546}, //6685 #BOX DRAWINGS RIGHT DOWN HEAVY AND LEFT UP LIGHT + {0xA6E1, 0x2547}, //6686 #BOX DRAWINGS DOWN LIGHT AND UP HORIZONTAL HEAVY + {0xA6E2, 0x2548}, //6687 #BOX DRAWINGS UP LIGHT AND DOWN HORIZONTAL HEAVY + {0xA6E3, 0x2549}, //6688 #BOX DRAWINGS RIGHT LIGHT AND LEFT VERTICAL HEAVY + {0xA6E4, 0x254A}, //6689 #BOX DRAWINGS LEFT LIGHT AND RIGHT VERTICAL HEAVY + {0xA741, 0xCB0B}, //6690 #HANGUL SYLLABLE SSANGCIEUC WAE CHIEUCH + {0xA742, 0xCB0C}, //6691 #HANGUL SYLLABLE SSANGCIEUC WAE KHIEUKH + {0xA743, 0xCB0D}, //6692 #HANGUL SYLLABLE SSANGCIEUC WAE THIEUTH + {0xA744, 0xCB0E}, //6693 #HANGUL SYLLABLE SSANGCIEUC WAE PHIEUPH + {0xA745, 0xCB0F}, //6694 #HANGUL SYLLABLE SSANGCIEUC WAE HIEUH + {0xA746, 0xCB11}, //6695 #HANGUL SYLLABLE SSANGCIEUC OE KIYEOK + {0xA747, 0xCB12}, //6696 #HANGUL SYLLABLE SSANGCIEUC OE SSANGKIYEOK + {0xA748, 0xCB13}, //6697 #HANGUL SYLLABLE SSANGCIEUC OE KIYEOKSIOS + {0xA749, 0xCB15}, //6698 #HANGUL SYLLABLE SSANGCIEUC OE NIEUNCIEUC + {0xA74A, 0xCB16}, //6699 #HANGUL SYLLABLE SSANGCIEUC OE NIEUNHIEUH + {0xA74B, 0xCB17}, //6700 #HANGUL SYLLABLE SSANGCIEUC OE TIKEUT + {0xA74C, 0xCB19}, //6701 #HANGUL SYLLABLE SSANGCIEUC OE RIEULKIYEOK + {0xA74D, 0xCB1A}, //6702 #HANGUL SYLLABLE SSANGCIEUC OE RIEULMIEUM + {0xA74E, 0xCB1B}, //6703 #HANGUL SYLLABLE SSANGCIEUC OE RIEULPIEUP + {0xA74F, 0xCB1C}, //6704 #HANGUL SYLLABLE SSANGCIEUC OE RIEULSIOS + {0xA750, 0xCB1D}, //6705 #HANGUL SYLLABLE SSANGCIEUC OE RIEULTHIEUTH + {0xA751, 0xCB1E}, //6706 #HANGUL SYLLABLE SSANGCIEUC OE RIEULPHIEUPH + {0xA752, 0xCB1F}, //6707 #HANGUL SYLLABLE SSANGCIEUC OE RIEULHIEUH + {0xA753, 0xCB22}, //6708 #HANGUL SYLLABLE SSANGCIEUC OE PIEUPSIOS + {0xA754, 0xCB23}, //6709 #HANGUL SYLLABLE SSANGCIEUC OE SIOS + {0xA755, 0xCB24}, //6710 #HANGUL SYLLABLE SSANGCIEUC OE SSANGSIOS + {0xA756, 0xCB25}, //6711 #HANGUL SYLLABLE SSANGCIEUC OE IEUNG + {0xA757, 0xCB26}, //6712 #HANGUL SYLLABLE SSANGCIEUC OE CIEUC + {0xA758, 0xCB27}, //6713 #HANGUL SYLLABLE SSANGCIEUC OE CHIEUCH + {0xA759, 0xCB28}, //6714 #HANGUL SYLLABLE SSANGCIEUC OE KHIEUKH + {0xA75A, 0xCB29}, //6715 #HANGUL SYLLABLE SSANGCIEUC OE THIEUTH + {0xA761, 0xCB2A}, //6716 #HANGUL SYLLABLE SSANGCIEUC OE PHIEUPH + {0xA762, 0xCB2B}, //6717 #HANGUL SYLLABLE SSANGCIEUC OE HIEUH + {0xA763, 0xCB2C}, //6718 #HANGUL SYLLABLE SSANGCIEUC YO + {0xA764, 0xCB2D}, //6719 #HANGUL SYLLABLE SSANGCIEUC YO KIYEOK + {0xA765, 0xCB2E}, //6720 #HANGUL SYLLABLE SSANGCIEUC YO SSANGKIYEOK + {0xA766, 0xCB2F}, //6721 #HANGUL SYLLABLE SSANGCIEUC YO KIYEOKSIOS + {0xA767, 0xCB30}, //6722 #HANGUL SYLLABLE SSANGCIEUC YO NIEUN + {0xA768, 0xCB31}, //6723 #HANGUL SYLLABLE SSANGCIEUC YO NIEUNCIEUC + {0xA769, 0xCB32}, //6724 #HANGUL SYLLABLE SSANGCIEUC YO NIEUNHIEUH + {0xA76A, 0xCB33}, //6725 #HANGUL SYLLABLE SSANGCIEUC YO TIKEUT + {0xA76B, 0xCB34}, //6726 #HANGUL SYLLABLE SSANGCIEUC YO RIEUL + {0xA76C, 0xCB35}, //6727 #HANGUL SYLLABLE SSANGCIEUC YO RIEULKIYEOK + {0xA76D, 0xCB36}, //6728 #HANGUL SYLLABLE SSANGCIEUC YO RIEULMIEUM + {0xA76E, 0xCB37}, //6729 #HANGUL SYLLABLE SSANGCIEUC YO RIEULPIEUP + {0xA76F, 0xCB38}, //6730 #HANGUL SYLLABLE SSANGCIEUC YO RIEULSIOS + {0xA770, 0xCB39}, //6731 #HANGUL SYLLABLE SSANGCIEUC YO RIEULTHIEUTH + {0xA771, 0xCB3A}, //6732 #HANGUL SYLLABLE SSANGCIEUC YO RIEULPHIEUPH + {0xA772, 0xCB3B}, //6733 #HANGUL SYLLABLE SSANGCIEUC YO RIEULHIEUH + {0xA773, 0xCB3C}, //6734 #HANGUL SYLLABLE SSANGCIEUC YO MIEUM + {0xA774, 0xCB3D}, //6735 #HANGUL SYLLABLE SSANGCIEUC YO PIEUP + {0xA775, 0xCB3E}, //6736 #HANGUL SYLLABLE SSANGCIEUC YO PIEUPSIOS + {0xA776, 0xCB3F}, //6737 #HANGUL SYLLABLE SSANGCIEUC YO SIOS + {0xA777, 0xCB40}, //6738 #HANGUL SYLLABLE SSANGCIEUC YO SSANGSIOS + {0xA778, 0xCB42}, //6739 #HANGUL SYLLABLE SSANGCIEUC YO CIEUC + {0xA779, 0xCB43}, //6740 #HANGUL SYLLABLE SSANGCIEUC YO CHIEUCH + {0xA77A, 0xCB44}, //6741 #HANGUL SYLLABLE SSANGCIEUC YO KHIEUKH + {0xA781, 0xCB45}, //6742 #HANGUL SYLLABLE SSANGCIEUC YO THIEUTH + {0xA782, 0xCB46}, //6743 #HANGUL SYLLABLE SSANGCIEUC YO PHIEUPH + {0xA783, 0xCB47}, //6744 #HANGUL SYLLABLE SSANGCIEUC YO HIEUH + {0xA784, 0xCB4A}, //6745 #HANGUL SYLLABLE SSANGCIEUC U SSANGKIYEOK + {0xA785, 0xCB4B}, //6746 #HANGUL SYLLABLE SSANGCIEUC U KIYEOKSIOS + {0xA786, 0xCB4D}, //6747 #HANGUL SYLLABLE SSANGCIEUC U NIEUNCIEUC + {0xA787, 0xCB4E}, //6748 #HANGUL SYLLABLE SSANGCIEUC U NIEUNHIEUH + {0xA788, 0xCB4F}, //6749 #HANGUL SYLLABLE SSANGCIEUC U TIKEUT + {0xA789, 0xCB51}, //6750 #HANGUL SYLLABLE SSANGCIEUC U RIEULKIYEOK + {0xA78A, 0xCB52}, //6751 #HANGUL SYLLABLE SSANGCIEUC U RIEULMIEUM + {0xA78B, 0xCB53}, //6752 #HANGUL SYLLABLE SSANGCIEUC U RIEULPIEUP + {0xA78C, 0xCB54}, //6753 #HANGUL SYLLABLE SSANGCIEUC U RIEULSIOS + {0xA78D, 0xCB55}, //6754 #HANGUL SYLLABLE SSANGCIEUC U RIEULTHIEUTH + {0xA78E, 0xCB56}, //6755 #HANGUL SYLLABLE SSANGCIEUC U RIEULPHIEUPH + {0xA78F, 0xCB57}, //6756 #HANGUL SYLLABLE SSANGCIEUC U RIEULHIEUH + {0xA790, 0xCB5A}, //6757 #HANGUL SYLLABLE SSANGCIEUC U PIEUPSIOS + {0xA791, 0xCB5B}, //6758 #HANGUL SYLLABLE SSANGCIEUC U SIOS + {0xA792, 0xCB5C}, //6759 #HANGUL SYLLABLE SSANGCIEUC U SSANGSIOS + {0xA793, 0xCB5E}, //6760 #HANGUL SYLLABLE SSANGCIEUC U CIEUC + {0xA794, 0xCB5F}, //6761 #HANGUL SYLLABLE SSANGCIEUC U CHIEUCH + {0xA795, 0xCB60}, //6762 #HANGUL SYLLABLE SSANGCIEUC U KHIEUKH + {0xA796, 0xCB61}, //6763 #HANGUL SYLLABLE SSANGCIEUC U THIEUTH + {0xA797, 0xCB62}, //6764 #HANGUL SYLLABLE SSANGCIEUC U PHIEUPH + {0xA798, 0xCB63}, //6765 #HANGUL SYLLABLE SSANGCIEUC U HIEUH + {0xA799, 0xCB65}, //6766 #HANGUL SYLLABLE SSANGCIEUC WEO KIYEOK + {0xA79A, 0xCB66}, //6767 #HANGUL SYLLABLE SSANGCIEUC WEO SSANGKIYEOK + {0xA79B, 0xCB67}, //6768 #HANGUL SYLLABLE SSANGCIEUC WEO KIYEOKSIOS + {0xA79C, 0xCB68}, //6769 #HANGUL SYLLABLE SSANGCIEUC WEO NIEUN + {0xA79D, 0xCB69}, //6770 #HANGUL SYLLABLE SSANGCIEUC WEO NIEUNCIEUC + {0xA79E, 0xCB6A}, //6771 #HANGUL SYLLABLE SSANGCIEUC WEO NIEUNHIEUH + {0xA79F, 0xCB6B}, //6772 #HANGUL SYLLABLE SSANGCIEUC WEO TIKEUT + {0xA7A0, 0xCB6C}, //6773 #HANGUL SYLLABLE SSANGCIEUC WEO RIEUL + {0xA7A1, 0x3395}, //6774 #SQUARE MU L + {0xA7A2, 0x3396}, //6775 #SQUARE ML + {0xA7A3, 0x3397}, //6776 #SQUARE DL + {0xA7A4, 0x2113}, //6777 #SCRIPT SMALL L + {0xA7A5, 0x3398}, //6778 #SQUARE KL + {0xA7A6, 0x33C4}, //6779 #SQUARE CC + {0xA7A7, 0x33A3}, //6780 #SQUARE MM CUBED + {0xA7A8, 0x33A4}, //6781 #SQUARE CM CUBED + {0xA7A9, 0x33A5}, //6782 #SQUARE M CUBED + {0xA7AA, 0x33A6}, //6783 #SQUARE KM CUBED + {0xA7AB, 0x3399}, //6784 #SQUARE FM + {0xA7AC, 0x339A}, //6785 #SQUARE NM + {0xA7AD, 0x339B}, //6786 #SQUARE MU M + {0xA7AE, 0x339C}, //6787 #SQUARE MM + {0xA7AF, 0x339D}, //6788 #SQUARE CM + {0xA7B0, 0x339E}, //6789 #SQUARE KM + {0xA7B1, 0x339F}, //6790 #SQUARE MM SQUARED + {0xA7B2, 0x33A0}, //6791 #SQUARE CM SQUARED + {0xA7B3, 0x33A1}, //6792 #SQUARE M SQUARED + {0xA7B4, 0x33A2}, //6793 #SQUARE KM SQUARED + {0xA7B5, 0x33CA}, //6794 #SQUARE HA + {0xA7B6, 0x338D}, //6795 #SQUARE MU G + {0xA7B7, 0x338E}, //6796 #SQUARE MG + {0xA7B8, 0x338F}, //6797 #SQUARE KG + {0xA7B9, 0x33CF}, //6798 #SQUARE KT + {0xA7BA, 0x3388}, //6799 #SQUARE CAL + {0xA7BB, 0x3389}, //6800 #SQUARE KCAL + {0xA7BC, 0x33C8}, //6801 #SQUARE DB + {0xA7BD, 0x33A7}, //6802 #SQUARE M OVER S + {0xA7BE, 0x33A8}, //6803 #SQUARE M OVER S SQUARED + {0xA7BF, 0x33B0}, //6804 #SQUARE PS + {0xA7C0, 0x33B1}, //6805 #SQUARE NS + {0xA7C1, 0x33B2}, //6806 #SQUARE MU S + {0xA7C2, 0x33B3}, //6807 #SQUARE MS + {0xA7C3, 0x33B4}, //6808 #SQUARE PV + {0xA7C4, 0x33B5}, //6809 #SQUARE NV + {0xA7C5, 0x33B6}, //6810 #SQUARE MU V + {0xA7C6, 0x33B7}, //6811 #SQUARE MV + {0xA7C7, 0x33B8}, //6812 #SQUARE KV + {0xA7C8, 0x33B9}, //6813 #SQUARE MV MEGA + {0xA7C9, 0x3380}, //6814 #SQUARE PA AMPS + {0xA7CA, 0x3381}, //6815 #SQUARE NA + {0xA7CB, 0x3382}, //6816 #SQUARE MU A + {0xA7CC, 0x3383}, //6817 #SQUARE MA + {0xA7CD, 0x3384}, //6818 #SQUARE KA + {0xA7CE, 0x33BA}, //6819 #SQUARE PW + {0xA7CF, 0x33BB}, //6820 #SQUARE NW + {0xA7D0, 0x33BC}, //6821 #SQUARE MU W + {0xA7D1, 0x33BD}, //6822 #SQUARE MW + {0xA7D2, 0x33BE}, //6823 #SQUARE KW + {0xA7D3, 0x33BF}, //6824 #SQUARE MW MEGA + {0xA7D4, 0x3390}, //6825 #SQUARE HZ + {0xA7D5, 0x3391}, //6826 #SQUARE KHZ + {0xA7D6, 0x3392}, //6827 #SQUARE MHZ + {0xA7D7, 0x3393}, //6828 #SQUARE GHZ + {0xA7D8, 0x3394}, //6829 #SQUARE THZ + {0xA7D9, 0x2126}, //6830 #OHM SIGN + {0xA7DA, 0x33C0}, //6831 #SQUARE K OHM + {0xA7DB, 0x33C1}, //6832 #SQUARE M OHM + {0xA7DC, 0x338A}, //6833 #SQUARE PF + {0xA7DD, 0x338B}, //6834 #SQUARE NF + {0xA7DE, 0x338C}, //6835 #SQUARE MU F + {0xA7DF, 0x33D6}, //6836 #SQUARE MOL + {0xA7E0, 0x33C5}, //6837 #SQUARE CD + {0xA7E1, 0x33AD}, //6838 #SQUARE RAD + {0xA7E2, 0x33AE}, //6839 #SQUARE RAD OVER S + {0xA7E3, 0x33AF}, //6840 #SQUARE RAD OVER S SQUARED + {0xA7E4, 0x33DB}, //6841 #SQUARE SR + {0xA7E5, 0x33A9}, //6842 #SQUARE PA + {0xA7E6, 0x33AA}, //6843 #SQUARE KPA + {0xA7E7, 0x33AB}, //6844 #SQUARE MPA + {0xA7E8, 0x33AC}, //6845 #SQUARE GPA + {0xA7E9, 0x33DD}, //6846 #SQUARE WB + {0xA7EA, 0x33D0}, //6847 #SQUARE LM + {0xA7EB, 0x33D3}, //6848 #SQUARE LX + {0xA7EC, 0x33C3}, //6849 #SQUARE BQ + {0xA7ED, 0x33C9}, //6850 #SQUARE GY + {0xA7EE, 0x33DC}, //6851 #SQUARE SV + {0xA7EF, 0x33C6}, //6852 #SQUARE C OVER KG + {0xA841, 0xCB6D}, //6853 #HANGUL SYLLABLE SSANGCIEUC WEO RIEULKIYEOK + {0xA842, 0xCB6E}, //6854 #HANGUL SYLLABLE SSANGCIEUC WEO RIEULMIEUM + {0xA843, 0xCB6F}, //6855 #HANGUL SYLLABLE SSANGCIEUC WEO RIEULPIEUP + {0xA844, 0xCB70}, //6856 #HANGUL SYLLABLE SSANGCIEUC WEO RIEULSIOS + {0xA845, 0xCB71}, //6857 #HANGUL SYLLABLE SSANGCIEUC WEO RIEULTHIEUTH + {0xA846, 0xCB72}, //6858 #HANGUL SYLLABLE SSANGCIEUC WEO RIEULPHIEUPH + {0xA847, 0xCB73}, //6859 #HANGUL SYLLABLE SSANGCIEUC WEO RIEULHIEUH + {0xA848, 0xCB74}, //6860 #HANGUL SYLLABLE SSANGCIEUC WEO MIEUM + {0xA849, 0xCB75}, //6861 #HANGUL SYLLABLE SSANGCIEUC WEO PIEUP + {0xA84A, 0xCB76}, //6862 #HANGUL SYLLABLE SSANGCIEUC WEO PIEUPSIOS + {0xA84B, 0xCB77}, //6863 #HANGUL SYLLABLE SSANGCIEUC WEO SIOS + {0xA84C, 0xCB7A}, //6864 #HANGUL SYLLABLE SSANGCIEUC WEO CIEUC + {0xA84D, 0xCB7B}, //6865 #HANGUL SYLLABLE SSANGCIEUC WEO CHIEUCH + {0xA84E, 0xCB7C}, //6866 #HANGUL SYLLABLE SSANGCIEUC WEO KHIEUKH + {0xA84F, 0xCB7D}, //6867 #HANGUL SYLLABLE SSANGCIEUC WEO THIEUTH + {0xA850, 0xCB7E}, //6868 #HANGUL SYLLABLE SSANGCIEUC WEO PHIEUPH + {0xA851, 0xCB7F}, //6869 #HANGUL SYLLABLE SSANGCIEUC WEO HIEUH + {0xA852, 0xCB80}, //6870 #HANGUL SYLLABLE SSANGCIEUC WE + {0xA853, 0xCB81}, //6871 #HANGUL SYLLABLE SSANGCIEUC WE KIYEOK + {0xA854, 0xCB82}, //6872 #HANGUL SYLLABLE SSANGCIEUC WE SSANGKIYEOK + {0xA855, 0xCB83}, //6873 #HANGUL SYLLABLE SSANGCIEUC WE KIYEOKSIOS + {0xA856, 0xCB84}, //6874 #HANGUL SYLLABLE SSANGCIEUC WE NIEUN + {0xA857, 0xCB85}, //6875 #HANGUL SYLLABLE SSANGCIEUC WE NIEUNCIEUC + {0xA858, 0xCB86}, //6876 #HANGUL SYLLABLE SSANGCIEUC WE NIEUNHIEUH + {0xA859, 0xCB87}, //6877 #HANGUL SYLLABLE SSANGCIEUC WE TIKEUT + {0xA85A, 0xCB88}, //6878 #HANGUL SYLLABLE SSANGCIEUC WE RIEUL + {0xA861, 0xCB89}, //6879 #HANGUL SYLLABLE SSANGCIEUC WE RIEULKIYEOK + {0xA862, 0xCB8A}, //6880 #HANGUL SYLLABLE SSANGCIEUC WE RIEULMIEUM + {0xA863, 0xCB8B}, //6881 #HANGUL SYLLABLE SSANGCIEUC WE RIEULPIEUP + {0xA864, 0xCB8C}, //6882 #HANGUL SYLLABLE SSANGCIEUC WE RIEULSIOS + {0xA865, 0xCB8D}, //6883 #HANGUL SYLLABLE SSANGCIEUC WE RIEULTHIEUTH + {0xA866, 0xCB8E}, //6884 #HANGUL SYLLABLE SSANGCIEUC WE RIEULPHIEUPH + {0xA867, 0xCB8F}, //6885 #HANGUL SYLLABLE SSANGCIEUC WE RIEULHIEUH + {0xA868, 0xCB90}, //6886 #HANGUL SYLLABLE SSANGCIEUC WE MIEUM + {0xA869, 0xCB91}, //6887 #HANGUL SYLLABLE SSANGCIEUC WE PIEUP + {0xA86A, 0xCB92}, //6888 #HANGUL SYLLABLE SSANGCIEUC WE PIEUPSIOS + {0xA86B, 0xCB93}, //6889 #HANGUL SYLLABLE SSANGCIEUC WE SIOS + {0xA86C, 0xCB94}, //6890 #HANGUL SYLLABLE SSANGCIEUC WE SSANGSIOS + {0xA86D, 0xCB95}, //6891 #HANGUL SYLLABLE SSANGCIEUC WE IEUNG + {0xA86E, 0xCB96}, //6892 #HANGUL SYLLABLE SSANGCIEUC WE CIEUC + {0xA86F, 0xCB97}, //6893 #HANGUL SYLLABLE SSANGCIEUC WE CHIEUCH + {0xA870, 0xCB98}, //6894 #HANGUL SYLLABLE SSANGCIEUC WE KHIEUKH + {0xA871, 0xCB99}, //6895 #HANGUL SYLLABLE SSANGCIEUC WE THIEUTH + {0xA872, 0xCB9A}, //6896 #HANGUL SYLLABLE SSANGCIEUC WE PHIEUPH + {0xA873, 0xCB9B}, //6897 #HANGUL SYLLABLE SSANGCIEUC WE HIEUH + {0xA874, 0xCB9D}, //6898 #HANGUL SYLLABLE SSANGCIEUC WI KIYEOK + {0xA875, 0xCB9E}, //6899 #HANGUL SYLLABLE SSANGCIEUC WI SSANGKIYEOK + {0xA876, 0xCB9F}, //6900 #HANGUL SYLLABLE SSANGCIEUC WI KIYEOKSIOS + {0xA877, 0xCBA0}, //6901 #HANGUL SYLLABLE SSANGCIEUC WI NIEUN + {0xA878, 0xCBA1}, //6902 #HANGUL SYLLABLE SSANGCIEUC WI NIEUNCIEUC + {0xA879, 0xCBA2}, //6903 #HANGUL SYLLABLE SSANGCIEUC WI NIEUNHIEUH + {0xA87A, 0xCBA3}, //6904 #HANGUL SYLLABLE SSANGCIEUC WI TIKEUT + {0xA881, 0xCBA4}, //6905 #HANGUL SYLLABLE SSANGCIEUC WI RIEUL + {0xA882, 0xCBA5}, //6906 #HANGUL SYLLABLE SSANGCIEUC WI RIEULKIYEOK + {0xA883, 0xCBA6}, //6907 #HANGUL SYLLABLE SSANGCIEUC WI RIEULMIEUM + {0xA884, 0xCBA7}, //6908 #HANGUL SYLLABLE SSANGCIEUC WI RIEULPIEUP + {0xA885, 0xCBA8}, //6909 #HANGUL SYLLABLE SSANGCIEUC WI RIEULSIOS + {0xA886, 0xCBA9}, //6910 #HANGUL SYLLABLE SSANGCIEUC WI RIEULTHIEUTH + {0xA887, 0xCBAA}, //6911 #HANGUL SYLLABLE SSANGCIEUC WI RIEULPHIEUPH + {0xA888, 0xCBAB}, //6912 #HANGUL SYLLABLE SSANGCIEUC WI RIEULHIEUH + {0xA889, 0xCBAC}, //6913 #HANGUL SYLLABLE SSANGCIEUC WI MIEUM + {0xA88A, 0xCBAD}, //6914 #HANGUL SYLLABLE SSANGCIEUC WI PIEUP + {0xA88B, 0xCBAE}, //6915 #HANGUL SYLLABLE SSANGCIEUC WI PIEUPSIOS + {0xA88C, 0xCBAF}, //6916 #HANGUL SYLLABLE SSANGCIEUC WI SIOS + {0xA88D, 0xCBB0}, //6917 #HANGUL SYLLABLE SSANGCIEUC WI SSANGSIOS + {0xA88E, 0xCBB1}, //6918 #HANGUL SYLLABLE SSANGCIEUC WI IEUNG + {0xA88F, 0xCBB2}, //6919 #HANGUL SYLLABLE SSANGCIEUC WI CIEUC + {0xA890, 0xCBB3}, //6920 #HANGUL SYLLABLE SSANGCIEUC WI CHIEUCH + {0xA891, 0xCBB4}, //6921 #HANGUL SYLLABLE SSANGCIEUC WI KHIEUKH + {0xA892, 0xCBB5}, //6922 #HANGUL SYLLABLE SSANGCIEUC WI THIEUTH + {0xA893, 0xCBB6}, //6923 #HANGUL SYLLABLE SSANGCIEUC WI PHIEUPH + {0xA894, 0xCBB7}, //6924 #HANGUL SYLLABLE SSANGCIEUC WI HIEUH + {0xA895, 0xCBB9}, //6925 #HANGUL SYLLABLE SSANGCIEUC YU KIYEOK + {0xA896, 0xCBBA}, //6926 #HANGUL SYLLABLE SSANGCIEUC YU SSANGKIYEOK + {0xA897, 0xCBBB}, //6927 #HANGUL SYLLABLE SSANGCIEUC YU KIYEOKSIOS + {0xA898, 0xCBBC}, //6928 #HANGUL SYLLABLE SSANGCIEUC YU NIEUN + {0xA899, 0xCBBD}, //6929 #HANGUL SYLLABLE SSANGCIEUC YU NIEUNCIEUC + {0xA89A, 0xCBBE}, //6930 #HANGUL SYLLABLE SSANGCIEUC YU NIEUNHIEUH + {0xA89B, 0xCBBF}, //6931 #HANGUL SYLLABLE SSANGCIEUC YU TIKEUT + {0xA89C, 0xCBC0}, //6932 #HANGUL SYLLABLE SSANGCIEUC YU RIEUL + {0xA89D, 0xCBC1}, //6933 #HANGUL SYLLABLE SSANGCIEUC YU RIEULKIYEOK + {0xA89E, 0xCBC2}, //6934 #HANGUL SYLLABLE SSANGCIEUC YU RIEULMIEUM + {0xA89F, 0xCBC3}, //6935 #HANGUL SYLLABLE SSANGCIEUC YU RIEULPIEUP + {0xA8A0, 0xCBC4}, //6936 #HANGUL SYLLABLE SSANGCIEUC YU RIEULSIOS + {0xA8A1, 0x00C6}, //6937 #LATIN CAPITAL LETTER AE + {0xA8A2, 0x00D0}, //6938 #LATIN CAPITAL LETTER ETH + {0xA8A3, 0x00AA}, //6939 #FEMININE ORDINAL INDICATOR + {0xA8A4, 0x0126}, //6940 #LATIN CAPITAL LETTER H WITH STROKE + {0xA8A6, 0x0132}, //6941 #LATIN CAPITAL LIGATURE IJ + {0xA8A8, 0x013F}, //6942 #LATIN CAPITAL LETTER L WITH MIDDLE DOT + {0xA8A9, 0x0141}, //6943 #LATIN CAPITAL LETTER L WITH STROKE + {0xA8AA, 0x00D8}, //6944 #LATIN CAPITAL LETTER O WITH STROKE + {0xA8AB, 0x0152}, //6945 #LATIN CAPITAL LIGATURE OE + {0xA8AC, 0x00BA}, //6946 #MASCULINE ORDINAL INDICATOR + {0xA8AD, 0x00DE}, //6947 #LATIN CAPITAL LETTER THORN + {0xA8AE, 0x0166}, //6948 #LATIN CAPITAL LETTER T WITH STROKE + {0xA8AF, 0x014A}, //6949 #LATIN CAPITAL LETTER ENG + {0xA8B1, 0x3260}, //6950 #CIRCLED HANGUL KIYEOK + {0xA8B2, 0x3261}, //6951 #CIRCLED HANGUL NIEUN + {0xA8B3, 0x3262}, //6952 #CIRCLED HANGUL TIKEUT + {0xA8B4, 0x3263}, //6953 #CIRCLED HANGUL RIEUL + {0xA8B5, 0x3264}, //6954 #CIRCLED HANGUL MIEUM + {0xA8B6, 0x3265}, //6955 #CIRCLED HANGUL PIEUP + {0xA8B7, 0x3266}, //6956 #CIRCLED HANGUL SIOS + {0xA8B8, 0x3267}, //6957 #CIRCLED HANGUL IEUNG + {0xA8B9, 0x3268}, //6958 #CIRCLED HANGUL CIEUC + {0xA8BA, 0x3269}, //6959 #CIRCLED HANGUL CHIEUCH + {0xA8BB, 0x326A}, //6960 #CIRCLED HANGUL KHIEUKH + {0xA8BC, 0x326B}, //6961 #CIRCLED HANGUL THIEUTH + {0xA8BD, 0x326C}, //6962 #CIRCLED HANGUL PHIEUPH + {0xA8BE, 0x326D}, //6963 #CIRCLED HANGUL HIEUH + {0xA8BF, 0x326E}, //6964 #CIRCLED HANGUL KIYEOK A + {0xA8C0, 0x326F}, //6965 #CIRCLED HANGUL NIEUN A + {0xA8C1, 0x3270}, //6966 #CIRCLED HANGUL TIKEUT A + {0xA8C2, 0x3271}, //6967 #CIRCLED HANGUL RIEUL A + {0xA8C3, 0x3272}, //6968 #CIRCLED HANGUL MIEUM A + {0xA8C4, 0x3273}, //6969 #CIRCLED HANGUL PIEUP A + {0xA8C5, 0x3274}, //6970 #CIRCLED HANGUL SIOS A + {0xA8C6, 0x3275}, //6971 #CIRCLED HANGUL IEUNG A + {0xA8C7, 0x3276}, //6972 #CIRCLED HANGUL CIEUC A + {0xA8C8, 0x3277}, //6973 #CIRCLED HANGUL CHIEUCH A + {0xA8C9, 0x3278}, //6974 #CIRCLED HANGUL KHIEUKH A + {0xA8CA, 0x3279}, //6975 #CIRCLED HANGUL THIEUTH A + {0xA8CB, 0x327A}, //6976 #CIRCLED HANGUL PHIEUPH A + {0xA8CC, 0x327B}, //6977 #CIRCLED HANGUL HIEUH A + {0xA8CD, 0x24D0}, //6978 #CIRCLED LATIN SMALL LETTER A + {0xA8CE, 0x24D1}, //6979 #CIRCLED LATIN SMALL LETTER B + {0xA8CF, 0x24D2}, //6980 #CIRCLED LATIN SMALL LETTER C + {0xA8D0, 0x24D3}, //6981 #CIRCLED LATIN SMALL LETTER D + {0xA8D1, 0x24D4}, //6982 #CIRCLED LATIN SMALL LETTER E + {0xA8D2, 0x24D5}, //6983 #CIRCLED LATIN SMALL LETTER F + {0xA8D3, 0x24D6}, //6984 #CIRCLED LATIN SMALL LETTER G + {0xA8D4, 0x24D7}, //6985 #CIRCLED LATIN SMALL LETTER H + {0xA8D5, 0x24D8}, //6986 #CIRCLED LATIN SMALL LETTER I + {0xA8D6, 0x24D9}, //6987 #CIRCLED LATIN SMALL LETTER J + {0xA8D7, 0x24DA}, //6988 #CIRCLED LATIN SMALL LETTER K + {0xA8D8, 0x24DB}, //6989 #CIRCLED LATIN SMALL LETTER L + {0xA8D9, 0x24DC}, //6990 #CIRCLED LATIN SMALL LETTER M + {0xA8DA, 0x24DD}, //6991 #CIRCLED LATIN SMALL LETTER N + {0xA8DB, 0x24DE}, //6992 #CIRCLED LATIN SMALL LETTER O + {0xA8DC, 0x24DF}, //6993 #CIRCLED LATIN SMALL LETTER P + {0xA8DD, 0x24E0}, //6994 #CIRCLED LATIN SMALL LETTER Q + {0xA8DE, 0x24E1}, //6995 #CIRCLED LATIN SMALL LETTER R + {0xA8DF, 0x24E2}, //6996 #CIRCLED LATIN SMALL LETTER S + {0xA8E0, 0x24E3}, //6997 #CIRCLED LATIN SMALL LETTER T + {0xA8E1, 0x24E4}, //6998 #CIRCLED LATIN SMALL LETTER U + {0xA8E2, 0x24E5}, //6999 #CIRCLED LATIN SMALL LETTER V + {0xA8E3, 0x24E6}, //7000 #CIRCLED LATIN SMALL LETTER W + {0xA8E4, 0x24E7}, //7001 #CIRCLED LATIN SMALL LETTER X + {0xA8E5, 0x24E8}, //7002 #CIRCLED LATIN SMALL LETTER Y + {0xA8E6, 0x24E9}, //7003 #CIRCLED LATIN SMALL LETTER Z + {0xA8E7, 0x2460}, //7004 #CIRCLED DIGIT ONE + {0xA8E8, 0x2461}, //7005 #CIRCLED DIGIT TWO + {0xA8E9, 0x2462}, //7006 #CIRCLED DIGIT THREE + {0xA8EA, 0x2463}, //7007 #CIRCLED DIGIT FOUR + {0xA8EB, 0x2464}, //7008 #CIRCLED DIGIT FIVE + {0xA8EC, 0x2465}, //7009 #CIRCLED DIGIT SIX + {0xA8ED, 0x2466}, //7010 #CIRCLED DIGIT SEVEN + {0xA8EE, 0x2467}, //7011 #CIRCLED DIGIT EIGHT + {0xA8EF, 0x2468}, //7012 #CIRCLED DIGIT NINE + {0xA8F0, 0x2469}, //7013 #CIRCLED NUMBER TEN + {0xA8F1, 0x246A}, //7014 #CIRCLED NUMBER ELEVEN + {0xA8F2, 0x246B}, //7015 #CIRCLED NUMBER TWELVE + {0xA8F3, 0x246C}, //7016 #CIRCLED NUMBER THIRTEEN + {0xA8F4, 0x246D}, //7017 #CIRCLED NUMBER FOURTEEN + {0xA8F5, 0x246E}, //7018 #CIRCLED NUMBER FIFTEEN + {0xA8F6, 0x00BD}, //7019 #VULGAR FRACTION ONE HALF + {0xA8F7, 0x2153}, //7020 #VULGAR FRACTION ONE THIRD + {0xA8F8, 0x2154}, //7021 #VULGAR FRACTION TWO THIRDS + {0xA8F9, 0x00BC}, //7022 #VULGAR FRACTION ONE QUARTER + {0xA8FA, 0x00BE}, //7023 #VULGAR FRACTION THREE QUARTERS + {0xA8FB, 0x215B}, //7024 #VULGAR FRACTION ONE EIGHTH + {0xA8FC, 0x215C}, //7025 #VULGAR FRACTION THREE EIGHTHS + {0xA8FD, 0x215D}, //7026 #VULGAR FRACTION FIVE EIGHTHS + {0xA8FE, 0x215E}, //7027 #VULGAR FRACTION SEVEN EIGHTHS + {0xA941, 0xCBC5}, //7028 #HANGUL SYLLABLE SSANGCIEUC YU RIEULTHIEUTH + {0xA942, 0xCBC6}, //7029 #HANGUL SYLLABLE SSANGCIEUC YU RIEULPHIEUPH + {0xA943, 0xCBC7}, //7030 #HANGUL SYLLABLE SSANGCIEUC YU RIEULHIEUH + {0xA944, 0xCBC8}, //7031 #HANGUL SYLLABLE SSANGCIEUC YU MIEUM + {0xA945, 0xCBC9}, //7032 #HANGUL SYLLABLE SSANGCIEUC YU PIEUP + {0xA946, 0xCBCA}, //7033 #HANGUL SYLLABLE SSANGCIEUC YU PIEUPSIOS + {0xA947, 0xCBCB}, //7034 #HANGUL SYLLABLE SSANGCIEUC YU SIOS + {0xA948, 0xCBCC}, //7035 #HANGUL SYLLABLE SSANGCIEUC YU SSANGSIOS + {0xA949, 0xCBCD}, //7036 #HANGUL SYLLABLE SSANGCIEUC YU IEUNG + {0xA94A, 0xCBCE}, //7037 #HANGUL SYLLABLE SSANGCIEUC YU CIEUC + {0xA94B, 0xCBCF}, //7038 #HANGUL SYLLABLE SSANGCIEUC YU CHIEUCH + {0xA94C, 0xCBD0}, //7039 #HANGUL SYLLABLE SSANGCIEUC YU KHIEUKH + {0xA94D, 0xCBD1}, //7040 #HANGUL SYLLABLE SSANGCIEUC YU THIEUTH + {0xA94E, 0xCBD2}, //7041 #HANGUL SYLLABLE SSANGCIEUC YU PHIEUPH + {0xA94F, 0xCBD3}, //7042 #HANGUL SYLLABLE SSANGCIEUC YU HIEUH + {0xA950, 0xCBD5}, //7043 #HANGUL SYLLABLE SSANGCIEUC EU KIYEOK + {0xA951, 0xCBD6}, //7044 #HANGUL SYLLABLE SSANGCIEUC EU SSANGKIYEOK + {0xA952, 0xCBD7}, //7045 #HANGUL SYLLABLE SSANGCIEUC EU KIYEOKSIOS + {0xA953, 0xCBD8}, //7046 #HANGUL SYLLABLE SSANGCIEUC EU NIEUN + {0xA954, 0xCBD9}, //7047 #HANGUL SYLLABLE SSANGCIEUC EU NIEUNCIEUC + {0xA955, 0xCBDA}, //7048 #HANGUL SYLLABLE SSANGCIEUC EU NIEUNHIEUH + {0xA956, 0xCBDB}, //7049 #HANGUL SYLLABLE SSANGCIEUC EU TIKEUT + {0xA957, 0xCBDC}, //7050 #HANGUL SYLLABLE SSANGCIEUC EU RIEUL + {0xA958, 0xCBDD}, //7051 #HANGUL SYLLABLE SSANGCIEUC EU RIEULKIYEOK + {0xA959, 0xCBDE}, //7052 #HANGUL SYLLABLE SSANGCIEUC EU RIEULMIEUM + {0xA95A, 0xCBDF}, //7053 #HANGUL SYLLABLE SSANGCIEUC EU RIEULPIEUP + {0xA961, 0xCBE0}, //7054 #HANGUL SYLLABLE SSANGCIEUC EU RIEULSIOS + {0xA962, 0xCBE1}, //7055 #HANGUL SYLLABLE SSANGCIEUC EU RIEULTHIEUTH + {0xA963, 0xCBE2}, //7056 #HANGUL SYLLABLE SSANGCIEUC EU RIEULPHIEUPH + {0xA964, 0xCBE3}, //7057 #HANGUL SYLLABLE SSANGCIEUC EU RIEULHIEUH + {0xA965, 0xCBE5}, //7058 #HANGUL SYLLABLE SSANGCIEUC EU PIEUP + {0xA966, 0xCBE6}, //7059 #HANGUL SYLLABLE SSANGCIEUC EU PIEUPSIOS + {0xA967, 0xCBE8}, //7060 #HANGUL SYLLABLE SSANGCIEUC EU SSANGSIOS + {0xA968, 0xCBEA}, //7061 #HANGUL SYLLABLE SSANGCIEUC EU CIEUC + {0xA969, 0xCBEB}, //7062 #HANGUL SYLLABLE SSANGCIEUC EU CHIEUCH + {0xA96A, 0xCBEC}, //7063 #HANGUL SYLLABLE SSANGCIEUC EU KHIEUKH + {0xA96B, 0xCBED}, //7064 #HANGUL SYLLABLE SSANGCIEUC EU THIEUTH + {0xA96C, 0xCBEE}, //7065 #HANGUL SYLLABLE SSANGCIEUC EU PHIEUPH + {0xA96D, 0xCBEF}, //7066 #HANGUL SYLLABLE SSANGCIEUC EU HIEUH + {0xA96E, 0xCBF0}, //7067 #HANGUL SYLLABLE SSANGCIEUC YI + {0xA96F, 0xCBF1}, //7068 #HANGUL SYLLABLE SSANGCIEUC YI KIYEOK + {0xA970, 0xCBF2}, //7069 #HANGUL SYLLABLE SSANGCIEUC YI SSANGKIYEOK + {0xA971, 0xCBF3}, //7070 #HANGUL SYLLABLE SSANGCIEUC YI KIYEOKSIOS + {0xA972, 0xCBF4}, //7071 #HANGUL SYLLABLE SSANGCIEUC YI NIEUN + {0xA973, 0xCBF5}, //7072 #HANGUL SYLLABLE SSANGCIEUC YI NIEUNCIEUC + {0xA974, 0xCBF6}, //7073 #HANGUL SYLLABLE SSANGCIEUC YI NIEUNHIEUH + {0xA975, 0xCBF7}, //7074 #HANGUL SYLLABLE SSANGCIEUC YI TIKEUT + {0xA976, 0xCBF8}, //7075 #HANGUL SYLLABLE SSANGCIEUC YI RIEUL + {0xA977, 0xCBF9}, //7076 #HANGUL SYLLABLE SSANGCIEUC YI RIEULKIYEOK + {0xA978, 0xCBFA}, //7077 #HANGUL SYLLABLE SSANGCIEUC YI RIEULMIEUM + {0xA979, 0xCBFB}, //7078 #HANGUL SYLLABLE SSANGCIEUC YI RIEULPIEUP + {0xA97A, 0xCBFC}, //7079 #HANGUL SYLLABLE SSANGCIEUC YI RIEULSIOS + {0xA981, 0xCBFD}, //7080 #HANGUL SYLLABLE SSANGCIEUC YI RIEULTHIEUTH + {0xA982, 0xCBFE}, //7081 #HANGUL SYLLABLE SSANGCIEUC YI RIEULPHIEUPH + {0xA983, 0xCBFF}, //7082 #HANGUL SYLLABLE SSANGCIEUC YI RIEULHIEUH + {0xA984, 0xCC00}, //7083 #HANGUL SYLLABLE SSANGCIEUC YI MIEUM + {0xA985, 0xCC01}, //7084 #HANGUL SYLLABLE SSANGCIEUC YI PIEUP + {0xA986, 0xCC02}, //7085 #HANGUL SYLLABLE SSANGCIEUC YI PIEUPSIOS + {0xA987, 0xCC03}, //7086 #HANGUL SYLLABLE SSANGCIEUC YI SIOS + {0xA988, 0xCC04}, //7087 #HANGUL SYLLABLE SSANGCIEUC YI SSANGSIOS + {0xA989, 0xCC05}, //7088 #HANGUL SYLLABLE SSANGCIEUC YI IEUNG + {0xA98A, 0xCC06}, //7089 #HANGUL SYLLABLE SSANGCIEUC YI CIEUC + {0xA98B, 0xCC07}, //7090 #HANGUL SYLLABLE SSANGCIEUC YI CHIEUCH + {0xA98C, 0xCC08}, //7091 #HANGUL SYLLABLE SSANGCIEUC YI KHIEUKH + {0xA98D, 0xCC09}, //7092 #HANGUL SYLLABLE SSANGCIEUC YI THIEUTH + {0xA98E, 0xCC0A}, //7093 #HANGUL SYLLABLE SSANGCIEUC YI PHIEUPH + {0xA98F, 0xCC0B}, //7094 #HANGUL SYLLABLE SSANGCIEUC YI HIEUH + {0xA990, 0xCC0E}, //7095 #HANGUL SYLLABLE SSANGCIEUC I SSANGKIYEOK + {0xA991, 0xCC0F}, //7096 #HANGUL SYLLABLE SSANGCIEUC I KIYEOKSIOS + {0xA992, 0xCC11}, //7097 #HANGUL SYLLABLE SSANGCIEUC I NIEUNCIEUC + {0xA993, 0xCC12}, //7098 #HANGUL SYLLABLE SSANGCIEUC I NIEUNHIEUH + {0xA994, 0xCC13}, //7099 #HANGUL SYLLABLE SSANGCIEUC I TIKEUT + {0xA995, 0xCC15}, //7100 #HANGUL SYLLABLE SSANGCIEUC I RIEULKIYEOK + {0xA996, 0xCC16}, //7101 #HANGUL SYLLABLE SSANGCIEUC I RIEULMIEUM + {0xA997, 0xCC17}, //7102 #HANGUL SYLLABLE SSANGCIEUC I RIEULPIEUP + {0xA998, 0xCC18}, //7103 #HANGUL SYLLABLE SSANGCIEUC I RIEULSIOS + {0xA999, 0xCC19}, //7104 #HANGUL SYLLABLE SSANGCIEUC I RIEULTHIEUTH + {0xA99A, 0xCC1A}, //7105 #HANGUL SYLLABLE SSANGCIEUC I RIEULPHIEUPH + {0xA99B, 0xCC1B}, //7106 #HANGUL SYLLABLE SSANGCIEUC I RIEULHIEUH + {0xA99C, 0xCC1E}, //7107 #HANGUL SYLLABLE SSANGCIEUC I PIEUPSIOS + {0xA99D, 0xCC1F}, //7108 #HANGUL SYLLABLE SSANGCIEUC I SIOS + {0xA99E, 0xCC20}, //7109 #HANGUL SYLLABLE SSANGCIEUC I SSANGSIOS + {0xA99F, 0xCC23}, //7110 #HANGUL SYLLABLE SSANGCIEUC I CHIEUCH + {0xA9A0, 0xCC24}, //7111 #HANGUL SYLLABLE SSANGCIEUC I KHIEUKH + {0xA9A1, 0x00E6}, //7112 #LATIN SMALL LETTER AE + {0xA9A2, 0x0111}, //7113 #LATIN SMALL LETTER D WITH STROKE + {0xA9A3, 0x00F0}, //7114 #LATIN SMALL LETTER ETH + {0xA9A4, 0x0127}, //7115 #LATIN SMALL LETTER H WITH STROKE + {0xA9A5, 0x0131}, //7116 #LATIN SMALL LETTER DOTLESS I + {0xA9A6, 0x0133}, //7117 #LATIN SMALL LIGATURE IJ + {0xA9A7, 0x0138}, //7118 #LATIN SMALL LETTER KRA + {0xA9A8, 0x0140}, //7119 #LATIN SMALL LETTER L WITH MIDDLE DOT + {0xA9A9, 0x0142}, //7120 #LATIN SMALL LETTER L WITH STROKE + {0xA9AA, 0x00F8}, //7121 #LATIN SMALL LETTER O WITH STROKE + {0xA9AB, 0x0153}, //7122 #LATIN SMALL LIGATURE OE + {0xA9AC, 0x00DF}, //7123 #LATIN SMALL LETTER SHARP S + {0xA9AD, 0x00FE}, //7124 #LATIN SMALL LETTER THORN + {0xA9AE, 0x0167}, //7125 #LATIN SMALL LETTER T WITH STROKE + {0xA9AF, 0x014B}, //7126 #LATIN SMALL LETTER ENG + {0xA9B0, 0x0149}, //7127 #LATIN SMALL LETTER N PRECEDED BY APOSTROPHE + {0xA9B1, 0x3200}, //7128 #PARENTHESIZED HANGUL KIYEOK + {0xA9B2, 0x3201}, //7129 #PARENTHESIZED HANGUL NIEUN + {0xA9B3, 0x3202}, //7130 #PARENTHESIZED HANGUL TIKEUT + {0xA9B4, 0x3203}, //7131 #PARENTHESIZED HANGUL RIEUL + {0xA9B5, 0x3204}, //7132 #PARENTHESIZED HANGUL MIEUM + {0xA9B6, 0x3205}, //7133 #PARENTHESIZED HANGUL PIEUP + {0xA9B7, 0x3206}, //7134 #PARENTHESIZED HANGUL SIOS + {0xA9B8, 0x3207}, //7135 #PARENTHESIZED HANGUL IEUNG + {0xA9B9, 0x3208}, //7136 #PARENTHESIZED HANGUL CIEUC + {0xA9BA, 0x3209}, //7137 #PARENTHESIZED HANGUL CHIEUCH + {0xA9BB, 0x320A}, //7138 #PARENTHESIZED HANGUL KHIEUKH + {0xA9BC, 0x320B}, //7139 #PARENTHESIZED HANGUL THIEUTH + {0xA9BD, 0x320C}, //7140 #PARENTHESIZED HANGUL PHIEUPH + {0xA9BE, 0x320D}, //7141 #PARENTHESIZED HANGUL HIEUH + {0xA9BF, 0x320E}, //7142 #PARENTHESIZED HANGUL KIYEOK A + {0xA9C0, 0x320F}, //7143 #PARENTHESIZED HANGUL NIEUN A + {0xA9C1, 0x3210}, //7144 #PARENTHESIZED HANGUL TIKEUT A + {0xA9C2, 0x3211}, //7145 #PARENTHESIZED HANGUL RIEUL A + {0xA9C3, 0x3212}, //7146 #PARENTHESIZED HANGUL MIEUM A + {0xA9C4, 0x3213}, //7147 #PARENTHESIZED HANGUL PIEUP A + {0xA9C5, 0x3214}, //7148 #PARENTHESIZED HANGUL SIOS A + {0xA9C6, 0x3215}, //7149 #PARENTHESIZED HANGUL IEUNG A + {0xA9C7, 0x3216}, //7150 #PARENTHESIZED HANGUL CIEUC A + {0xA9C8, 0x3217}, //7151 #PARENTHESIZED HANGUL CHIEUCH A + {0xA9C9, 0x3218}, //7152 #PARENTHESIZED HANGUL KHIEUKH A + {0xA9CA, 0x3219}, //7153 #PARENTHESIZED HANGUL THIEUTH A + {0xA9CB, 0x321A}, //7154 #PARENTHESIZED HANGUL PHIEUPH A + {0xA9CC, 0x321B}, //7155 #PARENTHESIZED HANGUL HIEUH A + {0xA9CD, 0x249C}, //7156 #PARENTHESIZED LATIN SMALL LETTER A + {0xA9CE, 0x249D}, //7157 #PARENTHESIZED LATIN SMALL LETTER B + {0xA9CF, 0x249E}, //7158 #PARENTHESIZED LATIN SMALL LETTER C + {0xA9D0, 0x249F}, //7159 #PARENTHESIZED LATIN SMALL LETTER D + {0xA9D1, 0x24A0}, //7160 #PARENTHESIZED LATIN SMALL LETTER E + {0xA9D2, 0x24A1}, //7161 #PARENTHESIZED LATIN SMALL LETTER F + {0xA9D3, 0x24A2}, //7162 #PARENTHESIZED LATIN SMALL LETTER G + {0xA9D4, 0x24A3}, //7163 #PARENTHESIZED LATIN SMALL LETTER H + {0xA9D5, 0x24A4}, //7164 #PARENTHESIZED LATIN SMALL LETTER I + {0xA9D6, 0x24A5}, //7165 #PARENTHESIZED LATIN SMALL LETTER J + {0xA9D7, 0x24A6}, //7166 #PARENTHESIZED LATIN SMALL LETTER K + {0xA9D8, 0x24A7}, //7167 #PARENTHESIZED LATIN SMALL LETTER L + {0xA9D9, 0x24A8}, //7168 #PARENTHESIZED LATIN SMALL LETTER M + {0xA9DA, 0x24A9}, //7169 #PARENTHESIZED LATIN SMALL LETTER N + {0xA9DB, 0x24AA}, //7170 #PARENTHESIZED LATIN SMALL LETTER O + {0xA9DC, 0x24AB}, //7171 #PARENTHESIZED LATIN SMALL LETTER P + {0xA9DD, 0x24AC}, //7172 #PARENTHESIZED LATIN SMALL LETTER Q + {0xA9DE, 0x24AD}, //7173 #PARENTHESIZED LATIN SMALL LETTER R + {0xA9DF, 0x24AE}, //7174 #PARENTHESIZED LATIN SMALL LETTER S + {0xA9E0, 0x24AF}, //7175 #PARENTHESIZED LATIN SMALL LETTER T + {0xA9E1, 0x24B0}, //7176 #PARENTHESIZED LATIN SMALL LETTER U + {0xA9E2, 0x24B1}, //7177 #PARENTHESIZED LATIN SMALL LETTER V + {0xA9E3, 0x24B2}, //7178 #PARENTHESIZED LATIN SMALL LETTER W + {0xA9E4, 0x24B3}, //7179 #PARENTHESIZED LATIN SMALL LETTER X + {0xA9E5, 0x24B4}, //7180 #PARENTHESIZED LATIN SMALL LETTER Y + {0xA9E6, 0x24B5}, //7181 #PARENTHESIZED LATIN SMALL LETTER Z + {0xA9E7, 0x2474}, //7182 #PARENTHESIZED DIGIT ONE + {0xA9E8, 0x2475}, //7183 #PARENTHESIZED DIGIT TWO + {0xA9E9, 0x2476}, //7184 #PARENTHESIZED DIGIT THREE + {0xA9EA, 0x2477}, //7185 #PARENTHESIZED DIGIT FOUR + {0xA9EB, 0x2478}, //7186 #PARENTHESIZED DIGIT FIVE + {0xA9EC, 0x2479}, //7187 #PARENTHESIZED DIGIT SIX + {0xA9ED, 0x247A}, //7188 #PARENTHESIZED DIGIT SEVEN + {0xA9EE, 0x247B}, //7189 #PARENTHESIZED DIGIT EIGHT + {0xA9EF, 0x247C}, //7190 #PARENTHESIZED DIGIT NINE + {0xA9F0, 0x247D}, //7191 #PARENTHESIZED NUMBER TEN + {0xA9F1, 0x247E}, //7192 #PARENTHESIZED NUMBER ELEVEN + {0xA9F2, 0x247F}, //7193 #PARENTHESIZED NUMBER TWELVE + {0xA9F3, 0x2480}, //7194 #PARENTHESIZED NUMBER THIRTEEN + {0xA9F4, 0x2481}, //7195 #PARENTHESIZED NUMBER FOURTEEN + {0xA9F5, 0x2482}, //7196 #PARENTHESIZED NUMBER FIFTEEN + {0xA9F6, 0x00B9}, //7197 #SUPERSCRIPT ONE + {0xA9F7, 0x00B2}, //7198 #SUPERSCRIPT TWO + {0xA9F8, 0x00B3}, //7199 #SUPERSCRIPT THREE + {0xA9F9, 0x2074}, //7200 #SUPERSCRIPT FOUR + {0xA9FA, 0x207F}, //7201 #SUPERSCRIPT LATIN SMALL LETTER N + {0xA9FB, 0x2081}, //7202 #SUBSCRIPT ONE + {0xA9FC, 0x2082}, //7203 #SUBSCRIPT TWO + {0xA9FD, 0x2083}, //7204 #SUBSCRIPT THREE + {0xA9FE, 0x2084}, //7205 #SUBSCRIPT FOUR + {0xAA41, 0xCC25}, //7206 #HANGUL SYLLABLE SSANGCIEUC I THIEUTH + {0xAA42, 0xCC26}, //7207 #HANGUL SYLLABLE SSANGCIEUC I PHIEUPH + {0xAA43, 0xCC2A}, //7208 #HANGUL SYLLABLE CHIEUCH A SSANGKIYEOK + {0xAA44, 0xCC2B}, //7209 #HANGUL SYLLABLE CHIEUCH A KIYEOKSIOS + {0xAA45, 0xCC2D}, //7210 #HANGUL SYLLABLE CHIEUCH A NIEUNCIEUC + {0xAA46, 0xCC2F}, //7211 #HANGUL SYLLABLE CHIEUCH A TIKEUT + {0xAA47, 0xCC31}, //7212 #HANGUL SYLLABLE CHIEUCH A RIEULKIYEOK + {0xAA48, 0xCC32}, //7213 #HANGUL SYLLABLE CHIEUCH A RIEULMIEUM + {0xAA49, 0xCC33}, //7214 #HANGUL SYLLABLE CHIEUCH A RIEULPIEUP + {0xAA4A, 0xCC34}, //7215 #HANGUL SYLLABLE CHIEUCH A RIEULSIOS + {0xAA4B, 0xCC35}, //7216 #HANGUL SYLLABLE CHIEUCH A RIEULTHIEUTH + {0xAA4C, 0xCC36}, //7217 #HANGUL SYLLABLE CHIEUCH A RIEULPHIEUPH + {0xAA4D, 0xCC37}, //7218 #HANGUL SYLLABLE CHIEUCH A RIEULHIEUH + {0xAA4E, 0xCC3A}, //7219 #HANGUL SYLLABLE CHIEUCH A PIEUPSIOS + {0xAA4F, 0xCC3F}, //7220 #HANGUL SYLLABLE CHIEUCH A CHIEUCH + {0xAA50, 0xCC40}, //7221 #HANGUL SYLLABLE CHIEUCH A KHIEUKH + {0xAA51, 0xCC41}, //7222 #HANGUL SYLLABLE CHIEUCH A THIEUTH + {0xAA52, 0xCC42}, //7223 #HANGUL SYLLABLE CHIEUCH A PHIEUPH + {0xAA53, 0xCC43}, //7224 #HANGUL SYLLABLE CHIEUCH A HIEUH + {0xAA54, 0xCC46}, //7225 #HANGUL SYLLABLE CHIEUCH AE SSANGKIYEOK + {0xAA55, 0xCC47}, //7226 #HANGUL SYLLABLE CHIEUCH AE KIYEOKSIOS + {0xAA56, 0xCC49}, //7227 #HANGUL SYLLABLE CHIEUCH AE NIEUNCIEUC + {0xAA57, 0xCC4A}, //7228 #HANGUL SYLLABLE CHIEUCH AE NIEUNHIEUH + {0xAA58, 0xCC4B}, //7229 #HANGUL SYLLABLE CHIEUCH AE TIKEUT + {0xAA59, 0xCC4D}, //7230 #HANGUL SYLLABLE CHIEUCH AE RIEULKIYEOK + {0xAA5A, 0xCC4E}, //7231 #HANGUL SYLLABLE CHIEUCH AE RIEULMIEUM + {0xAA61, 0xCC4F}, //7232 #HANGUL SYLLABLE CHIEUCH AE RIEULPIEUP + {0xAA62, 0xCC50}, //7233 #HANGUL SYLLABLE CHIEUCH AE RIEULSIOS + {0xAA63, 0xCC51}, //7234 #HANGUL SYLLABLE CHIEUCH AE RIEULTHIEUTH + {0xAA64, 0xCC52}, //7235 #HANGUL SYLLABLE CHIEUCH AE RIEULPHIEUPH + {0xAA65, 0xCC53}, //7236 #HANGUL SYLLABLE CHIEUCH AE RIEULHIEUH + {0xAA66, 0xCC56}, //7237 #HANGUL SYLLABLE CHIEUCH AE PIEUPSIOS + {0xAA67, 0xCC5A}, //7238 #HANGUL SYLLABLE CHIEUCH AE CIEUC + {0xAA68, 0xCC5B}, //7239 #HANGUL SYLLABLE CHIEUCH AE CHIEUCH + {0xAA69, 0xCC5C}, //7240 #HANGUL SYLLABLE CHIEUCH AE KHIEUKH + {0xAA6A, 0xCC5D}, //7241 #HANGUL SYLLABLE CHIEUCH AE THIEUTH + {0xAA6B, 0xCC5E}, //7242 #HANGUL SYLLABLE CHIEUCH AE PHIEUPH + {0xAA6C, 0xCC5F}, //7243 #HANGUL SYLLABLE CHIEUCH AE HIEUH + {0xAA6D, 0xCC61}, //7244 #HANGUL SYLLABLE CHIEUCH YA KIYEOK + {0xAA6E, 0xCC62}, //7245 #HANGUL SYLLABLE CHIEUCH YA SSANGKIYEOK + {0xAA6F, 0xCC63}, //7246 #HANGUL SYLLABLE CHIEUCH YA KIYEOKSIOS + {0xAA70, 0xCC65}, //7247 #HANGUL SYLLABLE CHIEUCH YA NIEUNCIEUC + {0xAA71, 0xCC67}, //7248 #HANGUL SYLLABLE CHIEUCH YA TIKEUT + {0xAA72, 0xCC69}, //7249 #HANGUL SYLLABLE CHIEUCH YA RIEULKIYEOK + {0xAA73, 0xCC6A}, //7250 #HANGUL SYLLABLE CHIEUCH YA RIEULMIEUM + {0xAA74, 0xCC6B}, //7251 #HANGUL SYLLABLE CHIEUCH YA RIEULPIEUP + {0xAA75, 0xCC6C}, //7252 #HANGUL SYLLABLE CHIEUCH YA RIEULSIOS + {0xAA76, 0xCC6D}, //7253 #HANGUL SYLLABLE CHIEUCH YA RIEULTHIEUTH + {0xAA77, 0xCC6E}, //7254 #HANGUL SYLLABLE CHIEUCH YA RIEULPHIEUPH + {0xAA78, 0xCC6F}, //7255 #HANGUL SYLLABLE CHIEUCH YA RIEULHIEUH + {0xAA79, 0xCC71}, //7256 #HANGUL SYLLABLE CHIEUCH YA PIEUP + {0xAA7A, 0xCC72}, //7257 #HANGUL SYLLABLE CHIEUCH YA PIEUPSIOS + {0xAA81, 0xCC73}, //7258 #HANGUL SYLLABLE CHIEUCH YA SIOS + {0xAA82, 0xCC74}, //7259 #HANGUL SYLLABLE CHIEUCH YA SSANGSIOS + {0xAA83, 0xCC76}, //7260 #HANGUL SYLLABLE CHIEUCH YA CIEUC + {0xAA84, 0xCC77}, //7261 #HANGUL SYLLABLE CHIEUCH YA CHIEUCH + {0xAA85, 0xCC78}, //7262 #HANGUL SYLLABLE CHIEUCH YA KHIEUKH + {0xAA86, 0xCC79}, //7263 #HANGUL SYLLABLE CHIEUCH YA THIEUTH + {0xAA87, 0xCC7A}, //7264 #HANGUL SYLLABLE CHIEUCH YA PHIEUPH + {0xAA88, 0xCC7B}, //7265 #HANGUL SYLLABLE CHIEUCH YA HIEUH + {0xAA89, 0xCC7C}, //7266 #HANGUL SYLLABLE CHIEUCH YAE + {0xAA8A, 0xCC7D}, //7267 #HANGUL SYLLABLE CHIEUCH YAE KIYEOK + {0xAA8B, 0xCC7E}, //7268 #HANGUL SYLLABLE CHIEUCH YAE SSANGKIYEOK + {0xAA8C, 0xCC7F}, //7269 #HANGUL SYLLABLE CHIEUCH YAE KIYEOKSIOS + {0xAA8D, 0xCC80}, //7270 #HANGUL SYLLABLE CHIEUCH YAE NIEUN + {0xAA8E, 0xCC81}, //7271 #HANGUL SYLLABLE CHIEUCH YAE NIEUNCIEUC + {0xAA8F, 0xCC82}, //7272 #HANGUL SYLLABLE CHIEUCH YAE NIEUNHIEUH + {0xAA90, 0xCC83}, //7273 #HANGUL SYLLABLE CHIEUCH YAE TIKEUT + {0xAA91, 0xCC84}, //7274 #HANGUL SYLLABLE CHIEUCH YAE RIEUL + {0xAA92, 0xCC85}, //7275 #HANGUL SYLLABLE CHIEUCH YAE RIEULKIYEOK + {0xAA93, 0xCC86}, //7276 #HANGUL SYLLABLE CHIEUCH YAE RIEULMIEUM + {0xAA94, 0xCC87}, //7277 #HANGUL SYLLABLE CHIEUCH YAE RIEULPIEUP + {0xAA95, 0xCC88}, //7278 #HANGUL SYLLABLE CHIEUCH YAE RIEULSIOS + {0xAA96, 0xCC89}, //7279 #HANGUL SYLLABLE CHIEUCH YAE RIEULTHIEUTH + {0xAA97, 0xCC8A}, //7280 #HANGUL SYLLABLE CHIEUCH YAE RIEULPHIEUPH + {0xAA98, 0xCC8B}, //7281 #HANGUL SYLLABLE CHIEUCH YAE RIEULHIEUH + {0xAA99, 0xCC8C}, //7282 #HANGUL SYLLABLE CHIEUCH YAE MIEUM + {0xAA9A, 0xCC8D}, //7283 #HANGUL SYLLABLE CHIEUCH YAE PIEUP + {0xAA9B, 0xCC8E}, //7284 #HANGUL SYLLABLE CHIEUCH YAE PIEUPSIOS + {0xAA9C, 0xCC8F}, //7285 #HANGUL SYLLABLE CHIEUCH YAE SIOS + {0xAA9D, 0xCC90}, //7286 #HANGUL SYLLABLE CHIEUCH YAE SSANGSIOS + {0xAA9E, 0xCC91}, //7287 #HANGUL SYLLABLE CHIEUCH YAE IEUNG + {0xAA9F, 0xCC92}, //7288 #HANGUL SYLLABLE CHIEUCH YAE CIEUC + {0xAAA0, 0xCC93}, //7289 #HANGUL SYLLABLE CHIEUCH YAE CHIEUCH + {0xAAA1, 0x3041}, //7290 #HIRAGANA LETTER SMALL A + {0xAAA2, 0x3042}, //7291 #HIRAGANA LETTER A + {0xAAA3, 0x3043}, //7292 #HIRAGANA LETTER SMALL I + {0xAAA4, 0x3044}, //7293 #HIRAGANA LETTER I + {0xAAA5, 0x3045}, //7294 #HIRAGANA LETTER SMALL U + {0xAAA6, 0x3046}, //7295 #HIRAGANA LETTER U + {0xAAA7, 0x3047}, //7296 #HIRAGANA LETTER SMALL E + {0xAAA8, 0x3048}, //7297 #HIRAGANA LETTER E + {0xAAA9, 0x3049}, //7298 #HIRAGANA LETTER SMALL O + {0xAAAA, 0x304A}, //7299 #HIRAGANA LETTER O + {0xAAAB, 0x304B}, //7300 #HIRAGANA LETTER KA + {0xAAAC, 0x304C}, //7301 #HIRAGANA LETTER GA + {0xAAAD, 0x304D}, //7302 #HIRAGANA LETTER KI + {0xAAAE, 0x304E}, //7303 #HIRAGANA LETTER GI + {0xAAAF, 0x304F}, //7304 #HIRAGANA LETTER KU + {0xAAB0, 0x3050}, //7305 #HIRAGANA LETTER GU + {0xAAB1, 0x3051}, //7306 #HIRAGANA LETTER KE + {0xAAB2, 0x3052}, //7307 #HIRAGANA LETTER GE + {0xAAB3, 0x3053}, //7308 #HIRAGANA LETTER KO + {0xAAB4, 0x3054}, //7309 #HIRAGANA LETTER GO + {0xAAB5, 0x3055}, //7310 #HIRAGANA LETTER SA + {0xAAB6, 0x3056}, //7311 #HIRAGANA LETTER ZA + {0xAAB7, 0x3057}, //7312 #HIRAGANA LETTER SI + {0xAAB8, 0x3058}, //7313 #HIRAGANA LETTER ZI + {0xAAB9, 0x3059}, //7314 #HIRAGANA LETTER SU + {0xAABA, 0x305A}, //7315 #HIRAGANA LETTER ZU + {0xAABB, 0x305B}, //7316 #HIRAGANA LETTER SE + {0xAABC, 0x305C}, //7317 #HIRAGANA LETTER ZE + {0xAABD, 0x305D}, //7318 #HIRAGANA LETTER SO + {0xAABE, 0x305E}, //7319 #HIRAGANA LETTER ZO + {0xAABF, 0x305F}, //7320 #HIRAGANA LETTER TA + {0xAAC0, 0x3060}, //7321 #HIRAGANA LETTER DA + {0xAAC1, 0x3061}, //7322 #HIRAGANA LETTER TI + {0xAAC2, 0x3062}, //7323 #HIRAGANA LETTER DI + {0xAAC3, 0x3063}, //7324 #HIRAGANA LETTER SMALL TU + {0xAAC4, 0x3064}, //7325 #HIRAGANA LETTER TU + {0xAAC5, 0x3065}, //7326 #HIRAGANA LETTER DU + {0xAAC6, 0x3066}, //7327 #HIRAGANA LETTER TE + {0xAAC7, 0x3067}, //7328 #HIRAGANA LETTER DE + {0xAAC8, 0x3068}, //7329 #HIRAGANA LETTER TO + {0xAAC9, 0x3069}, //7330 #HIRAGANA LETTER DO + {0xAACA, 0x306A}, //7331 #HIRAGANA LETTER NA + {0xAACB, 0x306B}, //7332 #HIRAGANA LETTER NI + {0xAACC, 0x306C}, //7333 #HIRAGANA LETTER NU + {0xAACD, 0x306D}, //7334 #HIRAGANA LETTER NE + {0xAACE, 0x306E}, //7335 #HIRAGANA LETTER NO + {0xAACF, 0x306F}, //7336 #HIRAGANA LETTER HA + {0xAAD0, 0x3070}, //7337 #HIRAGANA LETTER BA + {0xAAD1, 0x3071}, //7338 #HIRAGANA LETTER PA + {0xAAD2, 0x3072}, //7339 #HIRAGANA LETTER HI + {0xAAD3, 0x3073}, //7340 #HIRAGANA LETTER BI + {0xAAD4, 0x3074}, //7341 #HIRAGANA LETTER PI + {0xAAD5, 0x3075}, //7342 #HIRAGANA LETTER HU + {0xAAD6, 0x3076}, //7343 #HIRAGANA LETTER BU + {0xAAD7, 0x3077}, //7344 #HIRAGANA LETTER PU + {0xAAD8, 0x3078}, //7345 #HIRAGANA LETTER HE + {0xAAD9, 0x3079}, //7346 #HIRAGANA LETTER BE + {0xAADA, 0x307A}, //7347 #HIRAGANA LETTER PE + {0xAADB, 0x307B}, //7348 #HIRAGANA LETTER HO + {0xAADC, 0x307C}, //7349 #HIRAGANA LETTER BO + {0xAADD, 0x307D}, //7350 #HIRAGANA LETTER PO + {0xAADE, 0x307E}, //7351 #HIRAGANA LETTER MA + {0xAADF, 0x307F}, //7352 #HIRAGANA LETTER MI + {0xAAE0, 0x3080}, //7353 #HIRAGANA LETTER MU + {0xAAE1, 0x3081}, //7354 #HIRAGANA LETTER ME + {0xAAE2, 0x3082}, //7355 #HIRAGANA LETTER MO + {0xAAE3, 0x3083}, //7356 #HIRAGANA LETTER SMALL YA + {0xAAE4, 0x3084}, //7357 #HIRAGANA LETTER YA + {0xAAE5, 0x3085}, //7358 #HIRAGANA LETTER SMALL YU + {0xAAE6, 0x3086}, //7359 #HIRAGANA LETTER YU + {0xAAE7, 0x3087}, //7360 #HIRAGANA LETTER SMALL YO + {0xAAE8, 0x3088}, //7361 #HIRAGANA LETTER YO + {0xAAE9, 0x3089}, //7362 #HIRAGANA LETTER RA + {0xAAEA, 0x308A}, //7363 #HIRAGANA LETTER RI + {0xAAEB, 0x308B}, //7364 #HIRAGANA LETTER RU + {0xAAEC, 0x308C}, //7365 #HIRAGANA LETTER RE + {0xAAED, 0x308D}, //7366 #HIRAGANA LETTER RO + {0xAAEE, 0x308E}, //7367 #HIRAGANA LETTER SMALL WA + {0xAAEF, 0x308F}, //7368 #HIRAGANA LETTER WA + {0xAAF0, 0x3090}, //7369 #HIRAGANA LETTER WI + {0xAAF1, 0x3091}, //7370 #HIRAGANA LETTER WE + {0xAAF2, 0x3092}, //7371 #HIRAGANA LETTER WO + {0xAAF3, 0x3093}, //7372 #HIRAGANA LETTER N + {0xAB41, 0xCC94}, //7373 #HANGUL SYLLABLE CHIEUCH YAE KHIEUKH + {0xAB42, 0xCC95}, //7374 #HANGUL SYLLABLE CHIEUCH YAE THIEUTH + {0xAB43, 0xCC96}, //7375 #HANGUL SYLLABLE CHIEUCH YAE PHIEUPH + {0xAB44, 0xCC97}, //7376 #HANGUL SYLLABLE CHIEUCH YAE HIEUH + {0xAB45, 0xCC9A}, //7377 #HANGUL SYLLABLE CHIEUCH EO SSANGKIYEOK + {0xAB46, 0xCC9B}, //7378 #HANGUL SYLLABLE CHIEUCH EO KIYEOKSIOS + {0xAB47, 0xCC9D}, //7379 #HANGUL SYLLABLE CHIEUCH EO NIEUNCIEUC + {0xAB48, 0xCC9E}, //7380 #HANGUL SYLLABLE CHIEUCH EO NIEUNHIEUH + {0xAB49, 0xCC9F}, //7381 #HANGUL SYLLABLE CHIEUCH EO TIKEUT + {0xAB4A, 0xCCA1}, //7382 #HANGUL SYLLABLE CHIEUCH EO RIEULKIYEOK + {0xAB4B, 0xCCA2}, //7383 #HANGUL SYLLABLE CHIEUCH EO RIEULMIEUM + {0xAB4C, 0xCCA3}, //7384 #HANGUL SYLLABLE CHIEUCH EO RIEULPIEUP + {0xAB4D, 0xCCA4}, //7385 #HANGUL SYLLABLE CHIEUCH EO RIEULSIOS + {0xAB4E, 0xCCA5}, //7386 #HANGUL SYLLABLE CHIEUCH EO RIEULTHIEUTH + {0xAB4F, 0xCCA6}, //7387 #HANGUL SYLLABLE CHIEUCH EO RIEULPHIEUPH + {0xAB50, 0xCCA7}, //7388 #HANGUL SYLLABLE CHIEUCH EO RIEULHIEUH + {0xAB51, 0xCCAA}, //7389 #HANGUL SYLLABLE CHIEUCH EO PIEUPSIOS + {0xAB52, 0xCCAE}, //7390 #HANGUL SYLLABLE CHIEUCH EO CIEUC + {0xAB53, 0xCCAF}, //7391 #HANGUL SYLLABLE CHIEUCH EO CHIEUCH + {0xAB54, 0xCCB0}, //7392 #HANGUL SYLLABLE CHIEUCH EO KHIEUKH + {0xAB55, 0xCCB1}, //7393 #HANGUL SYLLABLE CHIEUCH EO THIEUTH + {0xAB56, 0xCCB2}, //7394 #HANGUL SYLLABLE CHIEUCH EO PHIEUPH + {0xAB57, 0xCCB3}, //7395 #HANGUL SYLLABLE CHIEUCH EO HIEUH + {0xAB58, 0xCCB6}, //7396 #HANGUL SYLLABLE CHIEUCH E SSANGKIYEOK + {0xAB59, 0xCCB7}, //7397 #HANGUL SYLLABLE CHIEUCH E KIYEOKSIOS + {0xAB5A, 0xCCB9}, //7398 #HANGUL SYLLABLE CHIEUCH E NIEUNCIEUC + {0xAB61, 0xCCBA}, //7399 #HANGUL SYLLABLE CHIEUCH E NIEUNHIEUH + {0xAB62, 0xCCBB}, //7400 #HANGUL SYLLABLE CHIEUCH E TIKEUT + {0xAB63, 0xCCBD}, //7401 #HANGUL SYLLABLE CHIEUCH E RIEULKIYEOK + {0xAB64, 0xCCBE}, //7402 #HANGUL SYLLABLE CHIEUCH E RIEULMIEUM + {0xAB65, 0xCCBF}, //7403 #HANGUL SYLLABLE CHIEUCH E RIEULPIEUP + {0xAB66, 0xCCC0}, //7404 #HANGUL SYLLABLE CHIEUCH E RIEULSIOS + {0xAB67, 0xCCC1}, //7405 #HANGUL SYLLABLE CHIEUCH E RIEULTHIEUTH + {0xAB68, 0xCCC2}, //7406 #HANGUL SYLLABLE CHIEUCH E RIEULPHIEUPH + {0xAB69, 0xCCC3}, //7407 #HANGUL SYLLABLE CHIEUCH E RIEULHIEUH + {0xAB6A, 0xCCC6}, //7408 #HANGUL SYLLABLE CHIEUCH E PIEUPSIOS + {0xAB6B, 0xCCC8}, //7409 #HANGUL SYLLABLE CHIEUCH E SSANGSIOS + {0xAB6C, 0xCCCA}, //7410 #HANGUL SYLLABLE CHIEUCH E CIEUC + {0xAB6D, 0xCCCB}, //7411 #HANGUL SYLLABLE CHIEUCH E CHIEUCH + {0xAB6E, 0xCCCC}, //7412 #HANGUL SYLLABLE CHIEUCH E KHIEUKH + {0xAB6F, 0xCCCD}, //7413 #HANGUL SYLLABLE CHIEUCH E THIEUTH + {0xAB70, 0xCCCE}, //7414 #HANGUL SYLLABLE CHIEUCH E PHIEUPH + {0xAB71, 0xCCCF}, //7415 #HANGUL SYLLABLE CHIEUCH E HIEUH + {0xAB72, 0xCCD1}, //7416 #HANGUL SYLLABLE CHIEUCH YEO KIYEOK + {0xAB73, 0xCCD2}, //7417 #HANGUL SYLLABLE CHIEUCH YEO SSANGKIYEOK + {0xAB74, 0xCCD3}, //7418 #HANGUL SYLLABLE CHIEUCH YEO KIYEOKSIOS + {0xAB75, 0xCCD5}, //7419 #HANGUL SYLLABLE CHIEUCH YEO NIEUNCIEUC + {0xAB76, 0xCCD6}, //7420 #HANGUL SYLLABLE CHIEUCH YEO NIEUNHIEUH + {0xAB77, 0xCCD7}, //7421 #HANGUL SYLLABLE CHIEUCH YEO TIKEUT + {0xAB78, 0xCCD8}, //7422 #HANGUL SYLLABLE CHIEUCH YEO RIEUL + {0xAB79, 0xCCD9}, //7423 #HANGUL SYLLABLE CHIEUCH YEO RIEULKIYEOK + {0xAB7A, 0xCCDA}, //7424 #HANGUL SYLLABLE CHIEUCH YEO RIEULMIEUM + {0xAB81, 0xCCDB}, //7425 #HANGUL SYLLABLE CHIEUCH YEO RIEULPIEUP + {0xAB82, 0xCCDC}, //7426 #HANGUL SYLLABLE CHIEUCH YEO RIEULSIOS + {0xAB83, 0xCCDD}, //7427 #HANGUL SYLLABLE CHIEUCH YEO RIEULTHIEUTH + {0xAB84, 0xCCDE}, //7428 #HANGUL SYLLABLE CHIEUCH YEO RIEULPHIEUPH + {0xAB85, 0xCCDF}, //7429 #HANGUL SYLLABLE CHIEUCH YEO RIEULHIEUH + {0xAB86, 0xCCE0}, //7430 #HANGUL SYLLABLE CHIEUCH YEO MIEUM + {0xAB87, 0xCCE1}, //7431 #HANGUL SYLLABLE CHIEUCH YEO PIEUP + {0xAB88, 0xCCE2}, //7432 #HANGUL SYLLABLE CHIEUCH YEO PIEUPSIOS + {0xAB89, 0xCCE3}, //7433 #HANGUL SYLLABLE CHIEUCH YEO SIOS + {0xAB8A, 0xCCE5}, //7434 #HANGUL SYLLABLE CHIEUCH YEO IEUNG + {0xAB8B, 0xCCE6}, //7435 #HANGUL SYLLABLE CHIEUCH YEO CIEUC + {0xAB8C, 0xCCE7}, //7436 #HANGUL SYLLABLE CHIEUCH YEO CHIEUCH + {0xAB8D, 0xCCE8}, //7437 #HANGUL SYLLABLE CHIEUCH YEO KHIEUKH + {0xAB8E, 0xCCE9}, //7438 #HANGUL SYLLABLE CHIEUCH YEO THIEUTH + {0xAB8F, 0xCCEA}, //7439 #HANGUL SYLLABLE CHIEUCH YEO PHIEUPH + {0xAB90, 0xCCEB}, //7440 #HANGUL SYLLABLE CHIEUCH YEO HIEUH + {0xAB91, 0xCCED}, //7441 #HANGUL SYLLABLE CHIEUCH YE KIYEOK + {0xAB92, 0xCCEE}, //7442 #HANGUL SYLLABLE CHIEUCH YE SSANGKIYEOK + {0xAB93, 0xCCEF}, //7443 #HANGUL SYLLABLE CHIEUCH YE KIYEOKSIOS + {0xAB94, 0xCCF1}, //7444 #HANGUL SYLLABLE CHIEUCH YE NIEUNCIEUC + {0xAB95, 0xCCF2}, //7445 #HANGUL SYLLABLE CHIEUCH YE NIEUNHIEUH + {0xAB96, 0xCCF3}, //7446 #HANGUL SYLLABLE CHIEUCH YE TIKEUT + {0xAB97, 0xCCF4}, //7447 #HANGUL SYLLABLE CHIEUCH YE RIEUL + {0xAB98, 0xCCF5}, //7448 #HANGUL SYLLABLE CHIEUCH YE RIEULKIYEOK + {0xAB99, 0xCCF6}, //7449 #HANGUL SYLLABLE CHIEUCH YE RIEULMIEUM + {0xAB9A, 0xCCF7}, //7450 #HANGUL SYLLABLE CHIEUCH YE RIEULPIEUP + {0xAB9B, 0xCCF8}, //7451 #HANGUL SYLLABLE CHIEUCH YE RIEULSIOS + {0xAB9C, 0xCCF9}, //7452 #HANGUL SYLLABLE CHIEUCH YE RIEULTHIEUTH + {0xAB9D, 0xCCFA}, //7453 #HANGUL SYLLABLE CHIEUCH YE RIEULPHIEUPH + {0xAB9E, 0xCCFB}, //7454 #HANGUL SYLLABLE CHIEUCH YE RIEULHIEUH + {0xAB9F, 0xCCFC}, //7455 #HANGUL SYLLABLE CHIEUCH YE MIEUM + {0xABA0, 0xCCFD}, //7456 #HANGUL SYLLABLE CHIEUCH YE PIEUP + {0xABA1, 0x30A1}, //7457 #KATAKANA LETTER SMALL A + {0xABA2, 0x30A2}, //7458 #KATAKANA LETTER A + {0xABA3, 0x30A3}, //7459 #KATAKANA LETTER SMALL I + {0xABA4, 0x30A4}, //7460 #KATAKANA LETTER I + {0xABA5, 0x30A5}, //7461 #KATAKANA LETTER SMALL U + {0xABA6, 0x30A6}, //7462 #KATAKANA LETTER U + {0xABA7, 0x30A7}, //7463 #KATAKANA LETTER SMALL E + {0xABA8, 0x30A8}, //7464 #KATAKANA LETTER E + {0xABA9, 0x30A9}, //7465 #KATAKANA LETTER SMALL O + {0xABAA, 0x30AA}, //7466 #KATAKANA LETTER O + {0xABAB, 0x30AB}, //7467 #KATAKANA LETTER KA + {0xABAC, 0x30AC}, //7468 #KATAKANA LETTER GA + {0xABAD, 0x30AD}, //7469 #KATAKANA LETTER KI + {0xABAE, 0x30AE}, //7470 #KATAKANA LETTER GI + {0xABAF, 0x30AF}, //7471 #KATAKANA LETTER KU + {0xABB0, 0x30B0}, //7472 #KATAKANA LETTER GU + {0xABB1, 0x30B1}, //7473 #KATAKANA LETTER KE + {0xABB2, 0x30B2}, //7474 #KATAKANA LETTER GE + {0xABB3, 0x30B3}, //7475 #KATAKANA LETTER KO + {0xABB4, 0x30B4}, //7476 #KATAKANA LETTER GO + {0xABB5, 0x30B5}, //7477 #KATAKANA LETTER SA + {0xABB6, 0x30B6}, //7478 #KATAKANA LETTER ZA + {0xABB7, 0x30B7}, //7479 #KATAKANA LETTER SI + {0xABB8, 0x30B8}, //7480 #KATAKANA LETTER ZI + {0xABB9, 0x30B9}, //7481 #KATAKANA LETTER SU + {0xABBA, 0x30BA}, //7482 #KATAKANA LETTER ZU + {0xABBB, 0x30BB}, //7483 #KATAKANA LETTER SE + {0xABBC, 0x30BC}, //7484 #KATAKANA LETTER ZE + {0xABBD, 0x30BD}, //7485 #KATAKANA LETTER SO + {0xABBE, 0x30BE}, //7486 #KATAKANA LETTER ZO + {0xABBF, 0x30BF}, //7487 #KATAKANA LETTER TA + {0xABC0, 0x30C0}, //7488 #KATAKANA LETTER DA + {0xABC1, 0x30C1}, //7489 #KATAKANA LETTER TI + {0xABC2, 0x30C2}, //7490 #KATAKANA LETTER DI + {0xABC3, 0x30C3}, //7491 #KATAKANA LETTER SMALL TU + {0xABC4, 0x30C4}, //7492 #KATAKANA LETTER TU + {0xABC5, 0x30C5}, //7493 #KATAKANA LETTER DU + {0xABC6, 0x30C6}, //7494 #KATAKANA LETTER TE + {0xABC7, 0x30C7}, //7495 #KATAKANA LETTER DE + {0xABC8, 0x30C8}, //7496 #KATAKANA LETTER TO + {0xABC9, 0x30C9}, //7497 #KATAKANA LETTER DO + {0xABCA, 0x30CA}, //7498 #KATAKANA LETTER NA + {0xABCB, 0x30CB}, //7499 #KATAKANA LETTER NI + {0xABCC, 0x30CC}, //7500 #KATAKANA LETTER NU + {0xABCD, 0x30CD}, //7501 #KATAKANA LETTER NE + {0xABCE, 0x30CE}, //7502 #KATAKANA LETTER NO + {0xABCF, 0x30CF}, //7503 #KATAKANA LETTER HA + {0xABD0, 0x30D0}, //7504 #KATAKANA LETTER BA + {0xABD1, 0x30D1}, //7505 #KATAKANA LETTER PA + {0xABD2, 0x30D2}, //7506 #KATAKANA LETTER HI + {0xABD3, 0x30D3}, //7507 #KATAKANA LETTER BI + {0xABD4, 0x30D4}, //7508 #KATAKANA LETTER PI + {0xABD5, 0x30D5}, //7509 #KATAKANA LETTER HU + {0xABD6, 0x30D6}, //7510 #KATAKANA LETTER BU + {0xABD7, 0x30D7}, //7511 #KATAKANA LETTER PU + {0xABD8, 0x30D8}, //7512 #KATAKANA LETTER HE + {0xABD9, 0x30D9}, //7513 #KATAKANA LETTER BE + {0xABDA, 0x30DA}, //7514 #KATAKANA LETTER PE + {0xABDB, 0x30DB}, //7515 #KATAKANA LETTER HO + {0xABDC, 0x30DC}, //7516 #KATAKANA LETTER BO + {0xABDD, 0x30DD}, //7517 #KATAKANA LETTER PO + {0xABDE, 0x30DE}, //7518 #KATAKANA LETTER MA + {0xABDF, 0x30DF}, //7519 #KATAKANA LETTER MI + {0xABE0, 0x30E0}, //7520 #KATAKANA LETTER MU + {0xABE1, 0x30E1}, //7521 #KATAKANA LETTER ME + {0xABE2, 0x30E2}, //7522 #KATAKANA LETTER MO + {0xABE3, 0x30E3}, //7523 #KATAKANA LETTER SMALL YA + {0xABE4, 0x30E4}, //7524 #KATAKANA LETTER YA + {0xABE5, 0x30E5}, //7525 #KATAKANA LETTER SMALL YU + {0xABE6, 0x30E6}, //7526 #KATAKANA LETTER YU + {0xABE7, 0x30E7}, //7527 #KATAKANA LETTER SMALL YO + {0xABE8, 0x30E8}, //7528 #KATAKANA LETTER YO + {0xABE9, 0x30E9}, //7529 #KATAKANA LETTER RA + {0xABEA, 0x30EA}, //7530 #KATAKANA LETTER RI + {0xABEB, 0x30EB}, //7531 #KATAKANA LETTER RU + {0xABEC, 0x30EC}, //7532 #KATAKANA LETTER RE + {0xABED, 0x30ED}, //7533 #KATAKANA LETTER RO + {0xABEE, 0x30EE}, //7534 #KATAKANA LETTER SMALL WA + {0xABEF, 0x30EF}, //7535 #KATAKANA LETTER WA + {0xABF0, 0x30F0}, //7536 #KATAKANA LETTER WI + {0xABF1, 0x30F1}, //7537 #KATAKANA LETTER WE + {0xABF2, 0x30F2}, //7538 #KATAKANA LETTER WO + {0xABF3, 0x30F3}, //7539 #KATAKANA LETTER N + {0xABF4, 0x30F4}, //7540 #KATAKANA LETTER VU + {0xABF5, 0x30F5}, //7541 #KATAKANA LETTER SMALL KA + {0xABF6, 0x30F6}, //7542 #KATAKANA LETTER SMALL KE + {0xAC41, 0xCCFE}, //7543 #HANGUL SYLLABLE CHIEUCH YE PIEUPSIOS + {0xAC42, 0xCCFF}, //7544 #HANGUL SYLLABLE CHIEUCH YE SIOS + {0xAC43, 0xCD00}, //7545 #HANGUL SYLLABLE CHIEUCH YE SSANGSIOS + {0xAC44, 0xCD02}, //7546 #HANGUL SYLLABLE CHIEUCH YE CIEUC + {0xAC45, 0xCD03}, //7547 #HANGUL SYLLABLE CHIEUCH YE CHIEUCH + {0xAC46, 0xCD04}, //7548 #HANGUL SYLLABLE CHIEUCH YE KHIEUKH + {0xAC47, 0xCD05}, //7549 #HANGUL SYLLABLE CHIEUCH YE THIEUTH + {0xAC48, 0xCD06}, //7550 #HANGUL SYLLABLE CHIEUCH YE PHIEUPH + {0xAC49, 0xCD07}, //7551 #HANGUL SYLLABLE CHIEUCH YE HIEUH + {0xAC4A, 0xCD0A}, //7552 #HANGUL SYLLABLE CHIEUCH O SSANGKIYEOK + {0xAC4B, 0xCD0B}, //7553 #HANGUL SYLLABLE CHIEUCH O KIYEOKSIOS + {0xAC4C, 0xCD0D}, //7554 #HANGUL SYLLABLE CHIEUCH O NIEUNCIEUC + {0xAC4D, 0xCD0E}, //7555 #HANGUL SYLLABLE CHIEUCH O NIEUNHIEUH + {0xAC4E, 0xCD0F}, //7556 #HANGUL SYLLABLE CHIEUCH O TIKEUT + {0xAC4F, 0xCD11}, //7557 #HANGUL SYLLABLE CHIEUCH O RIEULKIYEOK + {0xAC50, 0xCD12}, //7558 #HANGUL SYLLABLE CHIEUCH O RIEULMIEUM + {0xAC51, 0xCD13}, //7559 #HANGUL SYLLABLE CHIEUCH O RIEULPIEUP + {0xAC52, 0xCD14}, //7560 #HANGUL SYLLABLE CHIEUCH O RIEULSIOS + {0xAC53, 0xCD15}, //7561 #HANGUL SYLLABLE CHIEUCH O RIEULTHIEUTH + {0xAC54, 0xCD16}, //7562 #HANGUL SYLLABLE CHIEUCH O RIEULPHIEUPH + {0xAC55, 0xCD17}, //7563 #HANGUL SYLLABLE CHIEUCH O RIEULHIEUH + {0xAC56, 0xCD1A}, //7564 #HANGUL SYLLABLE CHIEUCH O PIEUPSIOS + {0xAC57, 0xCD1C}, //7565 #HANGUL SYLLABLE CHIEUCH O SSANGSIOS + {0xAC58, 0xCD1E}, //7566 #HANGUL SYLLABLE CHIEUCH O CIEUC + {0xAC59, 0xCD1F}, //7567 #HANGUL SYLLABLE CHIEUCH O CHIEUCH + {0xAC5A, 0xCD20}, //7568 #HANGUL SYLLABLE CHIEUCH O KHIEUKH + {0xAC61, 0xCD21}, //7569 #HANGUL SYLLABLE CHIEUCH O THIEUTH + {0xAC62, 0xCD22}, //7570 #HANGUL SYLLABLE CHIEUCH O PHIEUPH + {0xAC63, 0xCD23}, //7571 #HANGUL SYLLABLE CHIEUCH O HIEUH + {0xAC64, 0xCD25}, //7572 #HANGUL SYLLABLE CHIEUCH WA KIYEOK + {0xAC65, 0xCD26}, //7573 #HANGUL SYLLABLE CHIEUCH WA SSANGKIYEOK + {0xAC66, 0xCD27}, //7574 #HANGUL SYLLABLE CHIEUCH WA KIYEOKSIOS + {0xAC67, 0xCD29}, //7575 #HANGUL SYLLABLE CHIEUCH WA NIEUNCIEUC + {0xAC68, 0xCD2A}, //7576 #HANGUL SYLLABLE CHIEUCH WA NIEUNHIEUH + {0xAC69, 0xCD2B}, //7577 #HANGUL SYLLABLE CHIEUCH WA TIKEUT + {0xAC6A, 0xCD2D}, //7578 #HANGUL SYLLABLE CHIEUCH WA RIEULKIYEOK + {0xAC6B, 0xCD2E}, //7579 #HANGUL SYLLABLE CHIEUCH WA RIEULMIEUM + {0xAC6C, 0xCD2F}, //7580 #HANGUL SYLLABLE CHIEUCH WA RIEULPIEUP + {0xAC6D, 0xCD30}, //7581 #HANGUL SYLLABLE CHIEUCH WA RIEULSIOS + {0xAC6E, 0xCD31}, //7582 #HANGUL SYLLABLE CHIEUCH WA RIEULTHIEUTH + {0xAC6F, 0xCD32}, //7583 #HANGUL SYLLABLE CHIEUCH WA RIEULPHIEUPH + {0xAC70, 0xCD33}, //7584 #HANGUL SYLLABLE CHIEUCH WA RIEULHIEUH + {0xAC71, 0xCD34}, //7585 #HANGUL SYLLABLE CHIEUCH WA MIEUM + {0xAC72, 0xCD35}, //7586 #HANGUL SYLLABLE CHIEUCH WA PIEUP + {0xAC73, 0xCD36}, //7587 #HANGUL SYLLABLE CHIEUCH WA PIEUPSIOS + {0xAC74, 0xCD37}, //7588 #HANGUL SYLLABLE CHIEUCH WA SIOS + {0xAC75, 0xCD38}, //7589 #HANGUL SYLLABLE CHIEUCH WA SSANGSIOS + {0xAC76, 0xCD3A}, //7590 #HANGUL SYLLABLE CHIEUCH WA CIEUC + {0xAC77, 0xCD3B}, //7591 #HANGUL SYLLABLE CHIEUCH WA CHIEUCH + {0xAC78, 0xCD3C}, //7592 #HANGUL SYLLABLE CHIEUCH WA KHIEUKH + {0xAC79, 0xCD3D}, //7593 #HANGUL SYLLABLE CHIEUCH WA THIEUTH + {0xAC7A, 0xCD3E}, //7594 #HANGUL SYLLABLE CHIEUCH WA PHIEUPH + {0xAC81, 0xCD3F}, //7595 #HANGUL SYLLABLE CHIEUCH WA HIEUH + {0xAC82, 0xCD40}, //7596 #HANGUL SYLLABLE CHIEUCH WAE + {0xAC83, 0xCD41}, //7597 #HANGUL SYLLABLE CHIEUCH WAE KIYEOK + {0xAC84, 0xCD42}, //7598 #HANGUL SYLLABLE CHIEUCH WAE SSANGKIYEOK + {0xAC85, 0xCD43}, //7599 #HANGUL SYLLABLE CHIEUCH WAE KIYEOKSIOS + {0xAC86, 0xCD44}, //7600 #HANGUL SYLLABLE CHIEUCH WAE NIEUN + {0xAC87, 0xCD45}, //7601 #HANGUL SYLLABLE CHIEUCH WAE NIEUNCIEUC + {0xAC88, 0xCD46}, //7602 #HANGUL SYLLABLE CHIEUCH WAE NIEUNHIEUH + {0xAC89, 0xCD47}, //7603 #HANGUL SYLLABLE CHIEUCH WAE TIKEUT + {0xAC8A, 0xCD48}, //7604 #HANGUL SYLLABLE CHIEUCH WAE RIEUL + {0xAC8B, 0xCD49}, //7605 #HANGUL SYLLABLE CHIEUCH WAE RIEULKIYEOK + {0xAC8C, 0xCD4A}, //7606 #HANGUL SYLLABLE CHIEUCH WAE RIEULMIEUM + {0xAC8D, 0xCD4B}, //7607 #HANGUL SYLLABLE CHIEUCH WAE RIEULPIEUP + {0xAC8E, 0xCD4C}, //7608 #HANGUL SYLLABLE CHIEUCH WAE RIEULSIOS + {0xAC8F, 0xCD4D}, //7609 #HANGUL SYLLABLE CHIEUCH WAE RIEULTHIEUTH + {0xAC90, 0xCD4E}, //7610 #HANGUL SYLLABLE CHIEUCH WAE RIEULPHIEUPH + {0xAC91, 0xCD4F}, //7611 #HANGUL SYLLABLE CHIEUCH WAE RIEULHIEUH + {0xAC92, 0xCD50}, //7612 #HANGUL SYLLABLE CHIEUCH WAE MIEUM + {0xAC93, 0xCD51}, //7613 #HANGUL SYLLABLE CHIEUCH WAE PIEUP + {0xAC94, 0xCD52}, //7614 #HANGUL SYLLABLE CHIEUCH WAE PIEUPSIOS + {0xAC95, 0xCD53}, //7615 #HANGUL SYLLABLE CHIEUCH WAE SIOS + {0xAC96, 0xCD54}, //7616 #HANGUL SYLLABLE CHIEUCH WAE SSANGSIOS + {0xAC97, 0xCD55}, //7617 #HANGUL SYLLABLE CHIEUCH WAE IEUNG + {0xAC98, 0xCD56}, //7618 #HANGUL SYLLABLE CHIEUCH WAE CIEUC + {0xAC99, 0xCD57}, //7619 #HANGUL SYLLABLE CHIEUCH WAE CHIEUCH + {0xAC9A, 0xCD58}, //7620 #HANGUL SYLLABLE CHIEUCH WAE KHIEUKH + {0xAC9B, 0xCD59}, //7621 #HANGUL SYLLABLE CHIEUCH WAE THIEUTH + {0xAC9C, 0xCD5A}, //7622 #HANGUL SYLLABLE CHIEUCH WAE PHIEUPH + {0xAC9D, 0xCD5B}, //7623 #HANGUL SYLLABLE CHIEUCH WAE HIEUH + {0xAC9E, 0xCD5D}, //7624 #HANGUL SYLLABLE CHIEUCH OE KIYEOK + {0xAC9F, 0xCD5E}, //7625 #HANGUL SYLLABLE CHIEUCH OE SSANGKIYEOK + {0xACA0, 0xCD5F}, //7626 #HANGUL SYLLABLE CHIEUCH OE KIYEOKSIOS + {0xACA1, 0x0410}, //7627 #CYRILLIC CAPITAL LETTER A + {0xACA2, 0x0411}, //7628 #CYRILLIC CAPITAL LETTER BE + {0xACA3, 0x0412}, //7629 #CYRILLIC CAPITAL LETTER VE + {0xACA4, 0x0413}, //7630 #CYRILLIC CAPITAL LETTER GHE + {0xACA5, 0x0414}, //7631 #CYRILLIC CAPITAL LETTER DE + {0xACA6, 0x0415}, //7632 #CYRILLIC CAPITAL LETTER IE + {0xACA7, 0x0401}, //7633 #CYRILLIC CAPITAL LETTER IO + {0xACA8, 0x0416}, //7634 #CYRILLIC CAPITAL LETTER ZHE + {0xACA9, 0x0417}, //7635 #CYRILLIC CAPITAL LETTER ZE + {0xACAA, 0x0418}, //7636 #CYRILLIC CAPITAL LETTER I + {0xACAB, 0x0419}, //7637 #CYRILLIC CAPITAL LETTER SHORT I + {0xACAC, 0x041A}, //7638 #CYRILLIC CAPITAL LETTER KA + {0xACAD, 0x041B}, //7639 #CYRILLIC CAPITAL LETTER EL + {0xACAE, 0x041C}, //7640 #CYRILLIC CAPITAL LETTER EM + {0xACAF, 0x041D}, //7641 #CYRILLIC CAPITAL LETTER EN + {0xACB0, 0x041E}, //7642 #CYRILLIC CAPITAL LETTER O + {0xACB1, 0x041F}, //7643 #CYRILLIC CAPITAL LETTER PE + {0xACB2, 0x0420}, //7644 #CYRILLIC CAPITAL LETTER ER + {0xACB3, 0x0421}, //7645 #CYRILLIC CAPITAL LETTER ES + {0xACB4, 0x0422}, //7646 #CYRILLIC CAPITAL LETTER TE + {0xACB5, 0x0423}, //7647 #CYRILLIC CAPITAL LETTER U + {0xACB6, 0x0424}, //7648 #CYRILLIC CAPITAL LETTER EF + {0xACB7, 0x0425}, //7649 #CYRILLIC CAPITAL LETTER HA + {0xACB8, 0x0426}, //7650 #CYRILLIC CAPITAL LETTER TSE + {0xACB9, 0x0427}, //7651 #CYRILLIC CAPITAL LETTER CHE + {0xACBA, 0x0428}, //7652 #CYRILLIC CAPITAL LETTER SHA + {0xACBB, 0x0429}, //7653 #CYRILLIC CAPITAL LETTER SHCHA + {0xACBC, 0x042A}, //7654 #CYRILLIC CAPITAL LETTER HARD SIGN + {0xACBD, 0x042B}, //7655 #CYRILLIC CAPITAL LETTER YERU + {0xACBE, 0x042C}, //7656 #CYRILLIC CAPITAL LETTER SOFT SIGN + {0xACBF, 0x042D}, //7657 #CYRILLIC CAPITAL LETTER E + {0xACC0, 0x042E}, //7658 #CYRILLIC CAPITAL LETTER YU + {0xACC1, 0x042F}, //7659 #CYRILLIC CAPITAL LETTER YA + {0xACD1, 0x0430}, //7660 #CYRILLIC SMALL LETTER A + {0xACD2, 0x0431}, //7661 #CYRILLIC SMALL LETTER BE + {0xACD3, 0x0432}, //7662 #CYRILLIC SMALL LETTER VE + {0xACD4, 0x0433}, //7663 #CYRILLIC SMALL LETTER GHE + {0xACD5, 0x0434}, //7664 #CYRILLIC SMALL LETTER DE + {0xACD6, 0x0435}, //7665 #CYRILLIC SMALL LETTER IE + {0xACD7, 0x0451}, //7666 #CYRILLIC SMALL LETTER IO + {0xACD8, 0x0436}, //7667 #CYRILLIC SMALL LETTER ZHE + {0xACD9, 0x0437}, //7668 #CYRILLIC SMALL LETTER ZE + {0xACDA, 0x0438}, //7669 #CYRILLIC SMALL LETTER I + {0xACDB, 0x0439}, //7670 #CYRILLIC SMALL LETTER SHORT I + {0xACDC, 0x043A}, //7671 #CYRILLIC SMALL LETTER KA + {0xACDD, 0x043B}, //7672 #CYRILLIC SMALL LETTER EL + {0xACDE, 0x043C}, //7673 #CYRILLIC SMALL LETTER EM + {0xACDF, 0x043D}, //7674 #CYRILLIC SMALL LETTER EN + {0xACE0, 0x043E}, //7675 #CYRILLIC SMALL LETTER O + {0xACE1, 0x043F}, //7676 #CYRILLIC SMALL LETTER PE + {0xACE2, 0x0440}, //7677 #CYRILLIC SMALL LETTER ER + {0xACE3, 0x0441}, //7678 #CYRILLIC SMALL LETTER ES + {0xACE4, 0x0442}, //7679 #CYRILLIC SMALL LETTER TE + {0xACE5, 0x0443}, //7680 #CYRILLIC SMALL LETTER U + {0xACE6, 0x0444}, //7681 #CYRILLIC SMALL LETTER EF + {0xACE7, 0x0445}, //7682 #CYRILLIC SMALL LETTER HA + {0xACE8, 0x0446}, //7683 #CYRILLIC SMALL LETTER TSE + {0xACE9, 0x0447}, //7684 #CYRILLIC SMALL LETTER CHE + {0xACEA, 0x0448}, //7685 #CYRILLIC SMALL LETTER SHA + {0xACEB, 0x0449}, //7686 #CYRILLIC SMALL LETTER SHCHA + {0xACEC, 0x044A}, //7687 #CYRILLIC SMALL LETTER HARD SIGN + {0xACED, 0x044B}, //7688 #CYRILLIC SMALL LETTER YERU + {0xACEE, 0x044C}, //7689 #CYRILLIC SMALL LETTER SOFT SIGN + {0xACEF, 0x044D}, //7690 #CYRILLIC SMALL LETTER E + {0xACF0, 0x044E}, //7691 #CYRILLIC SMALL LETTER YU + {0xACF1, 0x044F}, //7692 #CYRILLIC SMALL LETTER YA + {0xAD41, 0xCD61}, //7693 #HANGUL SYLLABLE CHIEUCH OE NIEUNCIEUC + {0xAD42, 0xCD62}, //7694 #HANGUL SYLLABLE CHIEUCH OE NIEUNHIEUH + {0xAD43, 0xCD63}, //7695 #HANGUL SYLLABLE CHIEUCH OE TIKEUT + {0xAD44, 0xCD65}, //7696 #HANGUL SYLLABLE CHIEUCH OE RIEULKIYEOK + {0xAD45, 0xCD66}, //7697 #HANGUL SYLLABLE CHIEUCH OE RIEULMIEUM + {0xAD46, 0xCD67}, //7698 #HANGUL SYLLABLE CHIEUCH OE RIEULPIEUP + {0xAD47, 0xCD68}, //7699 #HANGUL SYLLABLE CHIEUCH OE RIEULSIOS + {0xAD48, 0xCD69}, //7700 #HANGUL SYLLABLE CHIEUCH OE RIEULTHIEUTH + {0xAD49, 0xCD6A}, //7701 #HANGUL SYLLABLE CHIEUCH OE RIEULPHIEUPH + {0xAD4A, 0xCD6B}, //7702 #HANGUL SYLLABLE CHIEUCH OE RIEULHIEUH + {0xAD4B, 0xCD6E}, //7703 #HANGUL SYLLABLE CHIEUCH OE PIEUPSIOS + {0xAD4C, 0xCD70}, //7704 #HANGUL SYLLABLE CHIEUCH OE SSANGSIOS + {0xAD4D, 0xCD72}, //7705 #HANGUL SYLLABLE CHIEUCH OE CIEUC + {0xAD4E, 0xCD73}, //7706 #HANGUL SYLLABLE CHIEUCH OE CHIEUCH + {0xAD4F, 0xCD74}, //7707 #HANGUL SYLLABLE CHIEUCH OE KHIEUKH + {0xAD50, 0xCD75}, //7708 #HANGUL SYLLABLE CHIEUCH OE THIEUTH + {0xAD51, 0xCD76}, //7709 #HANGUL SYLLABLE CHIEUCH OE PHIEUPH + {0xAD52, 0xCD77}, //7710 #HANGUL SYLLABLE CHIEUCH OE HIEUH + {0xAD53, 0xCD79}, //7711 #HANGUL SYLLABLE CHIEUCH YO KIYEOK + {0xAD54, 0xCD7A}, //7712 #HANGUL SYLLABLE CHIEUCH YO SSANGKIYEOK + {0xAD55, 0xCD7B}, //7713 #HANGUL SYLLABLE CHIEUCH YO KIYEOKSIOS + {0xAD56, 0xCD7C}, //7714 #HANGUL SYLLABLE CHIEUCH YO NIEUN + {0xAD57, 0xCD7D}, //7715 #HANGUL SYLLABLE CHIEUCH YO NIEUNCIEUC + {0xAD58, 0xCD7E}, //7716 #HANGUL SYLLABLE CHIEUCH YO NIEUNHIEUH + {0xAD59, 0xCD7F}, //7717 #HANGUL SYLLABLE CHIEUCH YO TIKEUT + {0xAD5A, 0xCD80}, //7718 #HANGUL SYLLABLE CHIEUCH YO RIEUL + {0xAD61, 0xCD81}, //7719 #HANGUL SYLLABLE CHIEUCH YO RIEULKIYEOK + {0xAD62, 0xCD82}, //7720 #HANGUL SYLLABLE CHIEUCH YO RIEULMIEUM + {0xAD63, 0xCD83}, //7721 #HANGUL SYLLABLE CHIEUCH YO RIEULPIEUP + {0xAD64, 0xCD84}, //7722 #HANGUL SYLLABLE CHIEUCH YO RIEULSIOS + {0xAD65, 0xCD85}, //7723 #HANGUL SYLLABLE CHIEUCH YO RIEULTHIEUTH + {0xAD66, 0xCD86}, //7724 #HANGUL SYLLABLE CHIEUCH YO RIEULPHIEUPH + {0xAD67, 0xCD87}, //7725 #HANGUL SYLLABLE CHIEUCH YO RIEULHIEUH + {0xAD68, 0xCD89}, //7726 #HANGUL SYLLABLE CHIEUCH YO PIEUP + {0xAD69, 0xCD8A}, //7727 #HANGUL SYLLABLE CHIEUCH YO PIEUPSIOS + {0xAD6A, 0xCD8B}, //7728 #HANGUL SYLLABLE CHIEUCH YO SIOS + {0xAD6B, 0xCD8C}, //7729 #HANGUL SYLLABLE CHIEUCH YO SSANGSIOS + {0xAD6C, 0xCD8D}, //7730 #HANGUL SYLLABLE CHIEUCH YO IEUNG + {0xAD6D, 0xCD8E}, //7731 #HANGUL SYLLABLE CHIEUCH YO CIEUC + {0xAD6E, 0xCD8F}, //7732 #HANGUL SYLLABLE CHIEUCH YO CHIEUCH + {0xAD6F, 0xCD90}, //7733 #HANGUL SYLLABLE CHIEUCH YO KHIEUKH + {0xAD70, 0xCD91}, //7734 #HANGUL SYLLABLE CHIEUCH YO THIEUTH + {0xAD71, 0xCD92}, //7735 #HANGUL SYLLABLE CHIEUCH YO PHIEUPH + {0xAD72, 0xCD93}, //7736 #HANGUL SYLLABLE CHIEUCH YO HIEUH + {0xAD73, 0xCD96}, //7737 #HANGUL SYLLABLE CHIEUCH U SSANGKIYEOK + {0xAD74, 0xCD97}, //7738 #HANGUL SYLLABLE CHIEUCH U KIYEOKSIOS + {0xAD75, 0xCD99}, //7739 #HANGUL SYLLABLE CHIEUCH U NIEUNCIEUC + {0xAD76, 0xCD9A}, //7740 #HANGUL SYLLABLE CHIEUCH U NIEUNHIEUH + {0xAD77, 0xCD9B}, //7741 #HANGUL SYLLABLE CHIEUCH U TIKEUT + {0xAD78, 0xCD9D}, //7742 #HANGUL SYLLABLE CHIEUCH U RIEULKIYEOK + {0xAD79, 0xCD9E}, //7743 #HANGUL SYLLABLE CHIEUCH U RIEULMIEUM + {0xAD7A, 0xCD9F}, //7744 #HANGUL SYLLABLE CHIEUCH U RIEULPIEUP + {0xAD81, 0xCDA0}, //7745 #HANGUL SYLLABLE CHIEUCH U RIEULSIOS + {0xAD82, 0xCDA1}, //7746 #HANGUL SYLLABLE CHIEUCH U RIEULTHIEUTH + {0xAD83, 0xCDA2}, //7747 #HANGUL SYLLABLE CHIEUCH U RIEULPHIEUPH + {0xAD84, 0xCDA3}, //7748 #HANGUL SYLLABLE CHIEUCH U RIEULHIEUH + {0xAD85, 0xCDA6}, //7749 #HANGUL SYLLABLE CHIEUCH U PIEUPSIOS + {0xAD86, 0xCDA8}, //7750 #HANGUL SYLLABLE CHIEUCH U SSANGSIOS + {0xAD87, 0xCDAA}, //7751 #HANGUL SYLLABLE CHIEUCH U CIEUC + {0xAD88, 0xCDAB}, //7752 #HANGUL SYLLABLE CHIEUCH U CHIEUCH + {0xAD89, 0xCDAC}, //7753 #HANGUL SYLLABLE CHIEUCH U KHIEUKH + {0xAD8A, 0xCDAD}, //7754 #HANGUL SYLLABLE CHIEUCH U THIEUTH + {0xAD8B, 0xCDAE}, //7755 #HANGUL SYLLABLE CHIEUCH U PHIEUPH + {0xAD8C, 0xCDAF}, //7756 #HANGUL SYLLABLE CHIEUCH U HIEUH + {0xAD8D, 0xCDB1}, //7757 #HANGUL SYLLABLE CHIEUCH WEO KIYEOK + {0xAD8E, 0xCDB2}, //7758 #HANGUL SYLLABLE CHIEUCH WEO SSANGKIYEOK + {0xAD8F, 0xCDB3}, //7759 #HANGUL SYLLABLE CHIEUCH WEO KIYEOKSIOS + {0xAD90, 0xCDB4}, //7760 #HANGUL SYLLABLE CHIEUCH WEO NIEUN + {0xAD91, 0xCDB5}, //7761 #HANGUL SYLLABLE CHIEUCH WEO NIEUNCIEUC + {0xAD92, 0xCDB6}, //7762 #HANGUL SYLLABLE CHIEUCH WEO NIEUNHIEUH + {0xAD93, 0xCDB7}, //7763 #HANGUL SYLLABLE CHIEUCH WEO TIKEUT + {0xAD94, 0xCDB8}, //7764 #HANGUL SYLLABLE CHIEUCH WEO RIEUL + {0xAD95, 0xCDB9}, //7765 #HANGUL SYLLABLE CHIEUCH WEO RIEULKIYEOK + {0xAD96, 0xCDBA}, //7766 #HANGUL SYLLABLE CHIEUCH WEO RIEULMIEUM + {0xAD97, 0xCDBB}, //7767 #HANGUL SYLLABLE CHIEUCH WEO RIEULPIEUP + {0xAD98, 0xCDBC}, //7768 #HANGUL SYLLABLE CHIEUCH WEO RIEULSIOS + {0xAD99, 0xCDBD}, //7769 #HANGUL SYLLABLE CHIEUCH WEO RIEULTHIEUTH + {0xAD9A, 0xCDBE}, //7770 #HANGUL SYLLABLE CHIEUCH WEO RIEULPHIEUPH + {0xAD9B, 0xCDBF}, //7771 #HANGUL SYLLABLE CHIEUCH WEO RIEULHIEUH + {0xAD9C, 0xCDC0}, //7772 #HANGUL SYLLABLE CHIEUCH WEO MIEUM + {0xAD9D, 0xCDC1}, //7773 #HANGUL SYLLABLE CHIEUCH WEO PIEUP + {0xAD9E, 0xCDC2}, //7774 #HANGUL SYLLABLE CHIEUCH WEO PIEUPSIOS + {0xAD9F, 0xCDC3}, //7775 #HANGUL SYLLABLE CHIEUCH WEO SIOS + {0xADA0, 0xCDC5}, //7776 #HANGUL SYLLABLE CHIEUCH WEO IEUNG + {0xAE41, 0xCDC6}, //7777 #HANGUL SYLLABLE CHIEUCH WEO CIEUC + {0xAE42, 0xCDC7}, //7778 #HANGUL SYLLABLE CHIEUCH WEO CHIEUCH + {0xAE43, 0xCDC8}, //7779 #HANGUL SYLLABLE CHIEUCH WEO KHIEUKH + {0xAE44, 0xCDC9}, //7780 #HANGUL SYLLABLE CHIEUCH WEO THIEUTH + {0xAE45, 0xCDCA}, //7781 #HANGUL SYLLABLE CHIEUCH WEO PHIEUPH + {0xAE46, 0xCDCB}, //7782 #HANGUL SYLLABLE CHIEUCH WEO HIEUH + {0xAE47, 0xCDCD}, //7783 #HANGUL SYLLABLE CHIEUCH WE KIYEOK + {0xAE48, 0xCDCE}, //7784 #HANGUL SYLLABLE CHIEUCH WE SSANGKIYEOK + {0xAE49, 0xCDCF}, //7785 #HANGUL SYLLABLE CHIEUCH WE KIYEOKSIOS + {0xAE4A, 0xCDD1}, //7786 #HANGUL SYLLABLE CHIEUCH WE NIEUNCIEUC + {0xAE4B, 0xCDD2}, //7787 #HANGUL SYLLABLE CHIEUCH WE NIEUNHIEUH + {0xAE4C, 0xCDD3}, //7788 #HANGUL SYLLABLE CHIEUCH WE TIKEUT + {0xAE4D, 0xCDD4}, //7789 #HANGUL SYLLABLE CHIEUCH WE RIEUL + {0xAE4E, 0xCDD5}, //7790 #HANGUL SYLLABLE CHIEUCH WE RIEULKIYEOK + {0xAE4F, 0xCDD6}, //7791 #HANGUL SYLLABLE CHIEUCH WE RIEULMIEUM + {0xAE50, 0xCDD7}, //7792 #HANGUL SYLLABLE CHIEUCH WE RIEULPIEUP + {0xAE51, 0xCDD8}, //7793 #HANGUL SYLLABLE CHIEUCH WE RIEULSIOS + {0xAE52, 0xCDD9}, //7794 #HANGUL SYLLABLE CHIEUCH WE RIEULTHIEUTH + {0xAE53, 0xCDDA}, //7795 #HANGUL SYLLABLE CHIEUCH WE RIEULPHIEUPH + {0xAE54, 0xCDDB}, //7796 #HANGUL SYLLABLE CHIEUCH WE RIEULHIEUH + {0xAE55, 0xCDDC}, //7797 #HANGUL SYLLABLE CHIEUCH WE MIEUM + {0xAE56, 0xCDDD}, //7798 #HANGUL SYLLABLE CHIEUCH WE PIEUP + {0xAE57, 0xCDDE}, //7799 #HANGUL SYLLABLE CHIEUCH WE PIEUPSIOS + {0xAE58, 0xCDDF}, //7800 #HANGUL SYLLABLE CHIEUCH WE SIOS + {0xAE59, 0xCDE0}, //7801 #HANGUL SYLLABLE CHIEUCH WE SSANGSIOS + {0xAE5A, 0xCDE1}, //7802 #HANGUL SYLLABLE CHIEUCH WE IEUNG + {0xAE61, 0xCDE2}, //7803 #HANGUL SYLLABLE CHIEUCH WE CIEUC + {0xAE62, 0xCDE3}, //7804 #HANGUL SYLLABLE CHIEUCH WE CHIEUCH + {0xAE63, 0xCDE4}, //7805 #HANGUL SYLLABLE CHIEUCH WE KHIEUKH + {0xAE64, 0xCDE5}, //7806 #HANGUL SYLLABLE CHIEUCH WE THIEUTH + {0xAE65, 0xCDE6}, //7807 #HANGUL SYLLABLE CHIEUCH WE PHIEUPH + {0xAE66, 0xCDE7}, //7808 #HANGUL SYLLABLE CHIEUCH WE HIEUH + {0xAE67, 0xCDE9}, //7809 #HANGUL SYLLABLE CHIEUCH WI KIYEOK + {0xAE68, 0xCDEA}, //7810 #HANGUL SYLLABLE CHIEUCH WI SSANGKIYEOK + {0xAE69, 0xCDEB}, //7811 #HANGUL SYLLABLE CHIEUCH WI KIYEOKSIOS + {0xAE6A, 0xCDED}, //7812 #HANGUL SYLLABLE CHIEUCH WI NIEUNCIEUC + {0xAE6B, 0xCDEE}, //7813 #HANGUL SYLLABLE CHIEUCH WI NIEUNHIEUH + {0xAE6C, 0xCDEF}, //7814 #HANGUL SYLLABLE CHIEUCH WI TIKEUT + {0xAE6D, 0xCDF1}, //7815 #HANGUL SYLLABLE CHIEUCH WI RIEULKIYEOK + {0xAE6E, 0xCDF2}, //7816 #HANGUL SYLLABLE CHIEUCH WI RIEULMIEUM + {0xAE6F, 0xCDF3}, //7817 #HANGUL SYLLABLE CHIEUCH WI RIEULPIEUP + {0xAE70, 0xCDF4}, //7818 #HANGUL SYLLABLE CHIEUCH WI RIEULSIOS + {0xAE71, 0xCDF5}, //7819 #HANGUL SYLLABLE CHIEUCH WI RIEULTHIEUTH + {0xAE72, 0xCDF6}, //7820 #HANGUL SYLLABLE CHIEUCH WI RIEULPHIEUPH + {0xAE73, 0xCDF7}, //7821 #HANGUL SYLLABLE CHIEUCH WI RIEULHIEUH + {0xAE74, 0xCDFA}, //7822 #HANGUL SYLLABLE CHIEUCH WI PIEUPSIOS + {0xAE75, 0xCDFC}, //7823 #HANGUL SYLLABLE CHIEUCH WI SSANGSIOS + {0xAE76, 0xCDFE}, //7824 #HANGUL SYLLABLE CHIEUCH WI CIEUC + {0xAE77, 0xCDFF}, //7825 #HANGUL SYLLABLE CHIEUCH WI CHIEUCH + {0xAE78, 0xCE00}, //7826 #HANGUL SYLLABLE CHIEUCH WI KHIEUKH + {0xAE79, 0xCE01}, //7827 #HANGUL SYLLABLE CHIEUCH WI THIEUTH + {0xAE7A, 0xCE02}, //7828 #HANGUL SYLLABLE CHIEUCH WI PHIEUPH + {0xAE81, 0xCE03}, //7829 #HANGUL SYLLABLE CHIEUCH WI HIEUH + {0xAE82, 0xCE05}, //7830 #HANGUL SYLLABLE CHIEUCH YU KIYEOK + {0xAE83, 0xCE06}, //7831 #HANGUL SYLLABLE CHIEUCH YU SSANGKIYEOK + {0xAE84, 0xCE07}, //7832 #HANGUL SYLLABLE CHIEUCH YU KIYEOKSIOS + {0xAE85, 0xCE09}, //7833 #HANGUL SYLLABLE CHIEUCH YU NIEUNCIEUC + {0xAE86, 0xCE0A}, //7834 #HANGUL SYLLABLE CHIEUCH YU NIEUNHIEUH + {0xAE87, 0xCE0B}, //7835 #HANGUL SYLLABLE CHIEUCH YU TIKEUT + {0xAE88, 0xCE0D}, //7836 #HANGUL SYLLABLE CHIEUCH YU RIEULKIYEOK + {0xAE89, 0xCE0E}, //7837 #HANGUL SYLLABLE CHIEUCH YU RIEULMIEUM + {0xAE8A, 0xCE0F}, //7838 #HANGUL SYLLABLE CHIEUCH YU RIEULPIEUP + {0xAE8B, 0xCE10}, //7839 #HANGUL SYLLABLE CHIEUCH YU RIEULSIOS + {0xAE8C, 0xCE11}, //7840 #HANGUL SYLLABLE CHIEUCH YU RIEULTHIEUTH + {0xAE8D, 0xCE12}, //7841 #HANGUL SYLLABLE CHIEUCH YU RIEULPHIEUPH + {0xAE8E, 0xCE13}, //7842 #HANGUL SYLLABLE CHIEUCH YU RIEULHIEUH + {0xAE8F, 0xCE15}, //7843 #HANGUL SYLLABLE CHIEUCH YU PIEUP + {0xAE90, 0xCE16}, //7844 #HANGUL SYLLABLE CHIEUCH YU PIEUPSIOS + {0xAE91, 0xCE17}, //7845 #HANGUL SYLLABLE CHIEUCH YU SIOS + {0xAE92, 0xCE18}, //7846 #HANGUL SYLLABLE CHIEUCH YU SSANGSIOS + {0xAE93, 0xCE1A}, //7847 #HANGUL SYLLABLE CHIEUCH YU CIEUC + {0xAE94, 0xCE1B}, //7848 #HANGUL SYLLABLE CHIEUCH YU CHIEUCH + {0xAE95, 0xCE1C}, //7849 #HANGUL SYLLABLE CHIEUCH YU KHIEUKH + {0xAE96, 0xCE1D}, //7850 #HANGUL SYLLABLE CHIEUCH YU THIEUTH + {0xAE97, 0xCE1E}, //7851 #HANGUL SYLLABLE CHIEUCH YU PHIEUPH + {0xAE98, 0xCE1F}, //7852 #HANGUL SYLLABLE CHIEUCH YU HIEUH + {0xAE99, 0xCE22}, //7853 #HANGUL SYLLABLE CHIEUCH EU SSANGKIYEOK + {0xAE9A, 0xCE23}, //7854 #HANGUL SYLLABLE CHIEUCH EU KIYEOKSIOS + {0xAE9B, 0xCE25}, //7855 #HANGUL SYLLABLE CHIEUCH EU NIEUNCIEUC + {0xAE9C, 0xCE26}, //7856 #HANGUL SYLLABLE CHIEUCH EU NIEUNHIEUH + {0xAE9D, 0xCE27}, //7857 #HANGUL SYLLABLE CHIEUCH EU TIKEUT + {0xAE9E, 0xCE29}, //7858 #HANGUL SYLLABLE CHIEUCH EU RIEULKIYEOK + {0xAE9F, 0xCE2A}, //7859 #HANGUL SYLLABLE CHIEUCH EU RIEULMIEUM + {0xAEA0, 0xCE2B}, //7860 #HANGUL SYLLABLE CHIEUCH EU RIEULPIEUP + {0xAF41, 0xCE2C}, //7861 #HANGUL SYLLABLE CHIEUCH EU RIEULSIOS + {0xAF42, 0xCE2D}, //7862 #HANGUL SYLLABLE CHIEUCH EU RIEULTHIEUTH + {0xAF43, 0xCE2E}, //7863 #HANGUL SYLLABLE CHIEUCH EU RIEULPHIEUPH + {0xAF44, 0xCE2F}, //7864 #HANGUL SYLLABLE CHIEUCH EU RIEULHIEUH + {0xAF45, 0xCE32}, //7865 #HANGUL SYLLABLE CHIEUCH EU PIEUPSIOS + {0xAF46, 0xCE34}, //7866 #HANGUL SYLLABLE CHIEUCH EU SSANGSIOS + {0xAF47, 0xCE36}, //7867 #HANGUL SYLLABLE CHIEUCH EU CIEUC + {0xAF48, 0xCE37}, //7868 #HANGUL SYLLABLE CHIEUCH EU CHIEUCH + {0xAF49, 0xCE38}, //7869 #HANGUL SYLLABLE CHIEUCH EU KHIEUKH + {0xAF4A, 0xCE39}, //7870 #HANGUL SYLLABLE CHIEUCH EU THIEUTH + {0xAF4B, 0xCE3A}, //7871 #HANGUL SYLLABLE CHIEUCH EU PHIEUPH + {0xAF4C, 0xCE3B}, //7872 #HANGUL SYLLABLE CHIEUCH EU HIEUH + {0xAF4D, 0xCE3C}, //7873 #HANGUL SYLLABLE CHIEUCH YI + {0xAF4E, 0xCE3D}, //7874 #HANGUL SYLLABLE CHIEUCH YI KIYEOK + {0xAF4F, 0xCE3E}, //7875 #HANGUL SYLLABLE CHIEUCH YI SSANGKIYEOK + {0xAF50, 0xCE3F}, //7876 #HANGUL SYLLABLE CHIEUCH YI KIYEOKSIOS + {0xAF51, 0xCE40}, //7877 #HANGUL SYLLABLE CHIEUCH YI NIEUN + {0xAF52, 0xCE41}, //7878 #HANGUL SYLLABLE CHIEUCH YI NIEUNCIEUC + {0xAF53, 0xCE42}, //7879 #HANGUL SYLLABLE CHIEUCH YI NIEUNHIEUH + {0xAF54, 0xCE43}, //7880 #HANGUL SYLLABLE CHIEUCH YI TIKEUT + {0xAF55, 0xCE44}, //7881 #HANGUL SYLLABLE CHIEUCH YI RIEUL + {0xAF56, 0xCE45}, //7882 #HANGUL SYLLABLE CHIEUCH YI RIEULKIYEOK + {0xAF57, 0xCE46}, //7883 #HANGUL SYLLABLE CHIEUCH YI RIEULMIEUM + {0xAF58, 0xCE47}, //7884 #HANGUL SYLLABLE CHIEUCH YI RIEULPIEUP + {0xAF59, 0xCE48}, //7885 #HANGUL SYLLABLE CHIEUCH YI RIEULSIOS + {0xAF5A, 0xCE49}, //7886 #HANGUL SYLLABLE CHIEUCH YI RIEULTHIEUTH + {0xAF61, 0xCE4A}, //7887 #HANGUL SYLLABLE CHIEUCH YI RIEULPHIEUPH + {0xAF62, 0xCE4B}, //7888 #HANGUL SYLLABLE CHIEUCH YI RIEULHIEUH + {0xAF63, 0xCE4C}, //7889 #HANGUL SYLLABLE CHIEUCH YI MIEUM + {0xAF64, 0xCE4D}, //7890 #HANGUL SYLLABLE CHIEUCH YI PIEUP + {0xAF65, 0xCE4E}, //7891 #HANGUL SYLLABLE CHIEUCH YI PIEUPSIOS + {0xAF66, 0xCE4F}, //7892 #HANGUL SYLLABLE CHIEUCH YI SIOS + {0xAF67, 0xCE50}, //7893 #HANGUL SYLLABLE CHIEUCH YI SSANGSIOS + {0xAF68, 0xCE51}, //7894 #HANGUL SYLLABLE CHIEUCH YI IEUNG + {0xAF69, 0xCE52}, //7895 #HANGUL SYLLABLE CHIEUCH YI CIEUC + {0xAF6A, 0xCE53}, //7896 #HANGUL SYLLABLE CHIEUCH YI CHIEUCH + {0xAF6B, 0xCE54}, //7897 #HANGUL SYLLABLE CHIEUCH YI KHIEUKH + {0xAF6C, 0xCE55}, //7898 #HANGUL SYLLABLE CHIEUCH YI THIEUTH + {0xAF6D, 0xCE56}, //7899 #HANGUL SYLLABLE CHIEUCH YI PHIEUPH + {0xAF6E, 0xCE57}, //7900 #HANGUL SYLLABLE CHIEUCH YI HIEUH + {0xAF6F, 0xCE5A}, //7901 #HANGUL SYLLABLE CHIEUCH I SSANGKIYEOK + {0xAF70, 0xCE5B}, //7902 #HANGUL SYLLABLE CHIEUCH I KIYEOKSIOS + {0xAF71, 0xCE5D}, //7903 #HANGUL SYLLABLE CHIEUCH I NIEUNCIEUC + {0xAF72, 0xCE5E}, //7904 #HANGUL SYLLABLE CHIEUCH I NIEUNHIEUH + {0xAF73, 0xCE62}, //7905 #HANGUL SYLLABLE CHIEUCH I RIEULMIEUM + {0xAF74, 0xCE63}, //7906 #HANGUL SYLLABLE CHIEUCH I RIEULPIEUP + {0xAF75, 0xCE64}, //7907 #HANGUL SYLLABLE CHIEUCH I RIEULSIOS + {0xAF76, 0xCE65}, //7908 #HANGUL SYLLABLE CHIEUCH I RIEULTHIEUTH + {0xAF77, 0xCE66}, //7909 #HANGUL SYLLABLE CHIEUCH I RIEULPHIEUPH + {0xAF78, 0xCE67}, //7910 #HANGUL SYLLABLE CHIEUCH I RIEULHIEUH + {0xAF79, 0xCE6A}, //7911 #HANGUL SYLLABLE CHIEUCH I PIEUPSIOS + {0xAF7A, 0xCE6C}, //7912 #HANGUL SYLLABLE CHIEUCH I SSANGSIOS + {0xAF81, 0xCE6E}, //7913 #HANGUL SYLLABLE CHIEUCH I CIEUC + {0xAF82, 0xCE6F}, //7914 #HANGUL SYLLABLE CHIEUCH I CHIEUCH + {0xAF83, 0xCE70}, //7915 #HANGUL SYLLABLE CHIEUCH I KHIEUKH + {0xAF84, 0xCE71}, //7916 #HANGUL SYLLABLE CHIEUCH I THIEUTH + {0xAF85, 0xCE72}, //7917 #HANGUL SYLLABLE CHIEUCH I PHIEUPH + {0xAF86, 0xCE73}, //7918 #HANGUL SYLLABLE CHIEUCH I HIEUH + {0xAF87, 0xCE76}, //7919 #HANGUL SYLLABLE KHIEUKH A SSANGKIYEOK + {0xAF88, 0xCE77}, //7920 #HANGUL SYLLABLE KHIEUKH A KIYEOKSIOS + {0xAF89, 0xCE79}, //7921 #HANGUL SYLLABLE KHIEUKH A NIEUNCIEUC + {0xAF8A, 0xCE7A}, //7922 #HANGUL SYLLABLE KHIEUKH A NIEUNHIEUH + {0xAF8B, 0xCE7B}, //7923 #HANGUL SYLLABLE KHIEUKH A TIKEUT + {0xAF8C, 0xCE7D}, //7924 #HANGUL SYLLABLE KHIEUKH A RIEULKIYEOK + {0xAF8D, 0xCE7E}, //7925 #HANGUL SYLLABLE KHIEUKH A RIEULMIEUM + {0xAF8E, 0xCE7F}, //7926 #HANGUL SYLLABLE KHIEUKH A RIEULPIEUP + {0xAF8F, 0xCE80}, //7927 #HANGUL SYLLABLE KHIEUKH A RIEULSIOS + {0xAF90, 0xCE81}, //7928 #HANGUL SYLLABLE KHIEUKH A RIEULTHIEUTH + {0xAF91, 0xCE82}, //7929 #HANGUL SYLLABLE KHIEUKH A RIEULPHIEUPH + {0xAF92, 0xCE83}, //7930 #HANGUL SYLLABLE KHIEUKH A RIEULHIEUH + {0xAF93, 0xCE86}, //7931 #HANGUL SYLLABLE KHIEUKH A PIEUPSIOS + {0xAF94, 0xCE88}, //7932 #HANGUL SYLLABLE KHIEUKH A SSANGSIOS + {0xAF95, 0xCE8A}, //7933 #HANGUL SYLLABLE KHIEUKH A CIEUC + {0xAF96, 0xCE8B}, //7934 #HANGUL SYLLABLE KHIEUKH A CHIEUCH + {0xAF97, 0xCE8C}, //7935 #HANGUL SYLLABLE KHIEUKH A KHIEUKH + {0xAF98, 0xCE8D}, //7936 #HANGUL SYLLABLE KHIEUKH A THIEUTH + {0xAF99, 0xCE8E}, //7937 #HANGUL SYLLABLE KHIEUKH A PHIEUPH + {0xAF9A, 0xCE8F}, //7938 #HANGUL SYLLABLE KHIEUKH A HIEUH + {0xAF9B, 0xCE92}, //7939 #HANGUL SYLLABLE KHIEUKH AE SSANGKIYEOK + {0xAF9C, 0xCE93}, //7940 #HANGUL SYLLABLE KHIEUKH AE KIYEOKSIOS + {0xAF9D, 0xCE95}, //7941 #HANGUL SYLLABLE KHIEUKH AE NIEUNCIEUC + {0xAF9E, 0xCE96}, //7942 #HANGUL SYLLABLE KHIEUKH AE NIEUNHIEUH + {0xAF9F, 0xCE97}, //7943 #HANGUL SYLLABLE KHIEUKH AE TIKEUT + {0xAFA0, 0xCE99}, //7944 #HANGUL SYLLABLE KHIEUKH AE RIEULKIYEOK + {0xB041, 0xCE9A}, //7945 #HANGUL SYLLABLE KHIEUKH AE RIEULMIEUM + {0xB042, 0xCE9B}, //7946 #HANGUL SYLLABLE KHIEUKH AE RIEULPIEUP + {0xB043, 0xCE9C}, //7947 #HANGUL SYLLABLE KHIEUKH AE RIEULSIOS + {0xB044, 0xCE9D}, //7948 #HANGUL SYLLABLE KHIEUKH AE RIEULTHIEUTH + {0xB045, 0xCE9E}, //7949 #HANGUL SYLLABLE KHIEUKH AE RIEULPHIEUPH + {0xB046, 0xCE9F}, //7950 #HANGUL SYLLABLE KHIEUKH AE RIEULHIEUH + {0xB047, 0xCEA2}, //7951 #HANGUL SYLLABLE KHIEUKH AE PIEUPSIOS + {0xB048, 0xCEA6}, //7952 #HANGUL SYLLABLE KHIEUKH AE CIEUC + {0xB049, 0xCEA7}, //7953 #HANGUL SYLLABLE KHIEUKH AE CHIEUCH + {0xB04A, 0xCEA8}, //7954 #HANGUL SYLLABLE KHIEUKH AE KHIEUKH + {0xB04B, 0xCEA9}, //7955 #HANGUL SYLLABLE KHIEUKH AE THIEUTH + {0xB04C, 0xCEAA}, //7956 #HANGUL SYLLABLE KHIEUKH AE PHIEUPH + {0xB04D, 0xCEAB}, //7957 #HANGUL SYLLABLE KHIEUKH AE HIEUH + {0xB04E, 0xCEAE}, //7958 #HANGUL SYLLABLE KHIEUKH YA SSANGKIYEOK + {0xB04F, 0xCEAF}, //7959 #HANGUL SYLLABLE KHIEUKH YA KIYEOKSIOS + {0xB050, 0xCEB0}, //7960 #HANGUL SYLLABLE KHIEUKH YA NIEUN + {0xB051, 0xCEB1}, //7961 #HANGUL SYLLABLE KHIEUKH YA NIEUNCIEUC + {0xB052, 0xCEB2}, //7962 #HANGUL SYLLABLE KHIEUKH YA NIEUNHIEUH + {0xB053, 0xCEB3}, //7963 #HANGUL SYLLABLE KHIEUKH YA TIKEUT + {0xB054, 0xCEB4}, //7964 #HANGUL SYLLABLE KHIEUKH YA RIEUL + {0xB055, 0xCEB5}, //7965 #HANGUL SYLLABLE KHIEUKH YA RIEULKIYEOK + {0xB056, 0xCEB6}, //7966 #HANGUL SYLLABLE KHIEUKH YA RIEULMIEUM + {0xB057, 0xCEB7}, //7967 #HANGUL SYLLABLE KHIEUKH YA RIEULPIEUP + {0xB058, 0xCEB8}, //7968 #HANGUL SYLLABLE KHIEUKH YA RIEULSIOS + {0xB059, 0xCEB9}, //7969 #HANGUL SYLLABLE KHIEUKH YA RIEULTHIEUTH + {0xB05A, 0xCEBA}, //7970 #HANGUL SYLLABLE KHIEUKH YA RIEULPHIEUPH + {0xB061, 0xCEBB}, //7971 #HANGUL SYLLABLE KHIEUKH YA RIEULHIEUH + {0xB062, 0xCEBC}, //7972 #HANGUL SYLLABLE KHIEUKH YA MIEUM + {0xB063, 0xCEBD}, //7973 #HANGUL SYLLABLE KHIEUKH YA PIEUP + {0xB064, 0xCEBE}, //7974 #HANGUL SYLLABLE KHIEUKH YA PIEUPSIOS + {0xB065, 0xCEBF}, //7975 #HANGUL SYLLABLE KHIEUKH YA SIOS + {0xB066, 0xCEC0}, //7976 #HANGUL SYLLABLE KHIEUKH YA SSANGSIOS + {0xB067, 0xCEC2}, //7977 #HANGUL SYLLABLE KHIEUKH YA CIEUC + {0xB068, 0xCEC3}, //7978 #HANGUL SYLLABLE KHIEUKH YA CHIEUCH + {0xB069, 0xCEC4}, //7979 #HANGUL SYLLABLE KHIEUKH YA KHIEUKH + {0xB06A, 0xCEC5}, //7980 #HANGUL SYLLABLE KHIEUKH YA THIEUTH + {0xB06B, 0xCEC6}, //7981 #HANGUL SYLLABLE KHIEUKH YA PHIEUPH + {0xB06C, 0xCEC7}, //7982 #HANGUL SYLLABLE KHIEUKH YA HIEUH + {0xB06D, 0xCEC8}, //7983 #HANGUL SYLLABLE KHIEUKH YAE + {0xB06E, 0xCEC9}, //7984 #HANGUL SYLLABLE KHIEUKH YAE KIYEOK + {0xB06F, 0xCECA}, //7985 #HANGUL SYLLABLE KHIEUKH YAE SSANGKIYEOK + {0xB070, 0xCECB}, //7986 #HANGUL SYLLABLE KHIEUKH YAE KIYEOKSIOS + {0xB071, 0xCECC}, //7987 #HANGUL SYLLABLE KHIEUKH YAE NIEUN + {0xB072, 0xCECD}, //7988 #HANGUL SYLLABLE KHIEUKH YAE NIEUNCIEUC + {0xB073, 0xCECE}, //7989 #HANGUL SYLLABLE KHIEUKH YAE NIEUNHIEUH + {0xB074, 0xCECF}, //7990 #HANGUL SYLLABLE KHIEUKH YAE TIKEUT + {0xB075, 0xCED0}, //7991 #HANGUL SYLLABLE KHIEUKH YAE RIEUL + {0xB076, 0xCED1}, //7992 #HANGUL SYLLABLE KHIEUKH YAE RIEULKIYEOK + {0xB077, 0xCED2}, //7993 #HANGUL SYLLABLE KHIEUKH YAE RIEULMIEUM + {0xB078, 0xCED3}, //7994 #HANGUL SYLLABLE KHIEUKH YAE RIEULPIEUP + {0xB079, 0xCED4}, //7995 #HANGUL SYLLABLE KHIEUKH YAE RIEULSIOS + {0xB07A, 0xCED5}, //7996 #HANGUL SYLLABLE KHIEUKH YAE RIEULTHIEUTH + {0xB081, 0xCED6}, //7997 #HANGUL SYLLABLE KHIEUKH YAE RIEULPHIEUPH + {0xB082, 0xCED7}, //7998 #HANGUL SYLLABLE KHIEUKH YAE RIEULHIEUH + {0xB083, 0xCED8}, //7999 #HANGUL SYLLABLE KHIEUKH YAE MIEUM + {0xB084, 0xCED9}, //8000 #HANGUL SYLLABLE KHIEUKH YAE PIEUP + {0xB085, 0xCEDA}, //8001 #HANGUL SYLLABLE KHIEUKH YAE PIEUPSIOS + {0xB086, 0xCEDB}, //8002 #HANGUL SYLLABLE KHIEUKH YAE SIOS + {0xB087, 0xCEDC}, //8003 #HANGUL SYLLABLE KHIEUKH YAE SSANGSIOS + {0xB088, 0xCEDD}, //8004 #HANGUL SYLLABLE KHIEUKH YAE IEUNG + {0xB089, 0xCEDE}, //8005 #HANGUL SYLLABLE KHIEUKH YAE CIEUC + {0xB08A, 0xCEDF}, //8006 #HANGUL SYLLABLE KHIEUKH YAE CHIEUCH + {0xB08B, 0xCEE0}, //8007 #HANGUL SYLLABLE KHIEUKH YAE KHIEUKH + {0xB08C, 0xCEE1}, //8008 #HANGUL SYLLABLE KHIEUKH YAE THIEUTH + {0xB08D, 0xCEE2}, //8009 #HANGUL SYLLABLE KHIEUKH YAE PHIEUPH + {0xB08E, 0xCEE3}, //8010 #HANGUL SYLLABLE KHIEUKH YAE HIEUH + {0xB08F, 0xCEE6}, //8011 #HANGUL SYLLABLE KHIEUKH EO SSANGKIYEOK + {0xB090, 0xCEE7}, //8012 #HANGUL SYLLABLE KHIEUKH EO KIYEOKSIOS + {0xB091, 0xCEE9}, //8013 #HANGUL SYLLABLE KHIEUKH EO NIEUNCIEUC + {0xB092, 0xCEEA}, //8014 #HANGUL SYLLABLE KHIEUKH EO NIEUNHIEUH + {0xB093, 0xCEED}, //8015 #HANGUL SYLLABLE KHIEUKH EO RIEULKIYEOK + {0xB094, 0xCEEE}, //8016 #HANGUL SYLLABLE KHIEUKH EO RIEULMIEUM + {0xB095, 0xCEEF}, //8017 #HANGUL SYLLABLE KHIEUKH EO RIEULPIEUP + {0xB096, 0xCEF0}, //8018 #HANGUL SYLLABLE KHIEUKH EO RIEULSIOS + {0xB097, 0xCEF1}, //8019 #HANGUL SYLLABLE KHIEUKH EO RIEULTHIEUTH + {0xB098, 0xCEF2}, //8020 #HANGUL SYLLABLE KHIEUKH EO RIEULPHIEUPH + {0xB099, 0xCEF3}, //8021 #HANGUL SYLLABLE KHIEUKH EO RIEULHIEUH + {0xB09A, 0xCEF6}, //8022 #HANGUL SYLLABLE KHIEUKH EO PIEUPSIOS + {0xB09B, 0xCEFA}, //8023 #HANGUL SYLLABLE KHIEUKH EO CIEUC + {0xB09C, 0xCEFB}, //8024 #HANGUL SYLLABLE KHIEUKH EO CHIEUCH + {0xB09D, 0xCEFC}, //8025 #HANGUL SYLLABLE KHIEUKH EO KHIEUKH + {0xB09E, 0xCEFD}, //8026 #HANGUL SYLLABLE KHIEUKH EO THIEUTH + {0xB09F, 0xCEFE}, //8027 #HANGUL SYLLABLE KHIEUKH EO PHIEUPH + {0xB0A0, 0xCEFF}, //8028 #HANGUL SYLLABLE KHIEUKH EO HIEUH + {0xB0A1, 0xAC00}, //8029 #HANGUL SYLLABLE KIYEOK A + {0xB0A2, 0xAC01}, //8030 #HANGUL SYLLABLE KIYEOK A KIYEOK + {0xB0A3, 0xAC04}, //8031 #HANGUL SYLLABLE KIYEOK A NIEUN + {0xB0A4, 0xAC07}, //8032 #HANGUL SYLLABLE KIYEOK A TIKEUT + {0xB0A5, 0xAC08}, //8033 #HANGUL SYLLABLE KIYEOK A RIEUL + {0xB0A6, 0xAC09}, //8034 #HANGUL SYLLABLE KIYEOK A RIEULKIYEOK + {0xB0A7, 0xAC0A}, //8035 #HANGUL SYLLABLE KIYEOK A RIEULMIEUM + {0xB0A8, 0xAC10}, //8036 #HANGUL SYLLABLE KIYEOK A MIEUM + {0xB0A9, 0xAC11}, //8037 #HANGUL SYLLABLE KIYEOK A PIEUP + {0xB0AA, 0xAC12}, //8038 #HANGUL SYLLABLE KIYEOK A PIEUPSIOS + {0xB0AB, 0xAC13}, //8039 #HANGUL SYLLABLE KIYEOK A SIOS + {0xB0AC, 0xAC14}, //8040 #HANGUL SYLLABLE KIYEOK A SSANGSIOS + {0xB0AD, 0xAC15}, //8041 #HANGUL SYLLABLE KIYEOK A IEUNG + {0xB0AE, 0xAC16}, //8042 #HANGUL SYLLABLE KIYEOK A CIEUC + {0xB0AF, 0xAC17}, //8043 #HANGUL SYLLABLE KIYEOK A CHIEUCH + {0xB0B0, 0xAC19}, //8044 #HANGUL SYLLABLE KIYEOK A THIEUTH + {0xB0B1, 0xAC1A}, //8045 #HANGUL SYLLABLE KIYEOK A PHIEUPH + {0xB0B2, 0xAC1B}, //8046 #HANGUL SYLLABLE KIYEOK A HIEUH + {0xB0B3, 0xAC1C}, //8047 #HANGUL SYLLABLE KIYEOK AE + {0xB0B4, 0xAC1D}, //8048 #HANGUL SYLLABLE KIYEOK AE KIYEOK + {0xB0B5, 0xAC20}, //8049 #HANGUL SYLLABLE KIYEOK AE NIEUN + {0xB0B6, 0xAC24}, //8050 #HANGUL SYLLABLE KIYEOK AE RIEUL + {0xB0B7, 0xAC2C}, //8051 #HANGUL SYLLABLE KIYEOK AE MIEUM + {0xB0B8, 0xAC2D}, //8052 #HANGUL SYLLABLE KIYEOK AE PIEUP + {0xB0B9, 0xAC2F}, //8053 #HANGUL SYLLABLE KIYEOK AE SIOS + {0xB0BA, 0xAC30}, //8054 #HANGUL SYLLABLE KIYEOK AE SSANGSIOS + {0xB0BB, 0xAC31}, //8055 #HANGUL SYLLABLE KIYEOK AE IEUNG + {0xB0BC, 0xAC38}, //8056 #HANGUL SYLLABLE KIYEOK YA + {0xB0BD, 0xAC39}, //8057 #HANGUL SYLLABLE KIYEOK YA KIYEOK + {0xB0BE, 0xAC3C}, //8058 #HANGUL SYLLABLE KIYEOK YA NIEUN + {0xB0BF, 0xAC40}, //8059 #HANGUL SYLLABLE KIYEOK YA RIEUL + {0xB0C0, 0xAC4B}, //8060 #HANGUL SYLLABLE KIYEOK YA SIOS + {0xB0C1, 0xAC4D}, //8061 #HANGUL SYLLABLE KIYEOK YA IEUNG + {0xB0C2, 0xAC54}, //8062 #HANGUL SYLLABLE KIYEOK YAE + {0xB0C3, 0xAC58}, //8063 #HANGUL SYLLABLE KIYEOK YAE NIEUN + {0xB0C4, 0xAC5C}, //8064 #HANGUL SYLLABLE KIYEOK YAE RIEUL + {0xB0C5, 0xAC70}, //8065 #HANGUL SYLLABLE KIYEOK EO + {0xB0C6, 0xAC71}, //8066 #HANGUL SYLLABLE KIYEOK EO KIYEOK + {0xB0C7, 0xAC74}, //8067 #HANGUL SYLLABLE KIYEOK EO NIEUN + {0xB0C8, 0xAC77}, //8068 #HANGUL SYLLABLE KIYEOK EO TIKEUT + {0xB0C9, 0xAC78}, //8069 #HANGUL SYLLABLE KIYEOK EO RIEUL + {0xB0CA, 0xAC7A}, //8070 #HANGUL SYLLABLE KIYEOK EO RIEULMIEUM + {0xB0CB, 0xAC80}, //8071 #HANGUL SYLLABLE KIYEOK EO MIEUM + {0xB0CC, 0xAC81}, //8072 #HANGUL SYLLABLE KIYEOK EO PIEUP + {0xB0CD, 0xAC83}, //8073 #HANGUL SYLLABLE KIYEOK EO SIOS + {0xB0CE, 0xAC84}, //8074 #HANGUL SYLLABLE KIYEOK EO SSANGSIOS + {0xB0CF, 0xAC85}, //8075 #HANGUL SYLLABLE KIYEOK EO IEUNG + {0xB0D0, 0xAC86}, //8076 #HANGUL SYLLABLE KIYEOK EO CIEUC + {0xB0D1, 0xAC89}, //8077 #HANGUL SYLLABLE KIYEOK EO THIEUTH + {0xB0D2, 0xAC8A}, //8078 #HANGUL SYLLABLE KIYEOK EO PHIEUPH + {0xB0D3, 0xAC8B}, //8079 #HANGUL SYLLABLE KIYEOK EO HIEUH + {0xB0D4, 0xAC8C}, //8080 #HANGUL SYLLABLE KIYEOK E + {0xB0D5, 0xAC90}, //8081 #HANGUL SYLLABLE KIYEOK E NIEUN + {0xB0D6, 0xAC94}, //8082 #HANGUL SYLLABLE KIYEOK E RIEUL + {0xB0D7, 0xAC9C}, //8083 #HANGUL SYLLABLE KIYEOK E MIEUM + {0xB0D8, 0xAC9D}, //8084 #HANGUL SYLLABLE KIYEOK E PIEUP + {0xB0D9, 0xAC9F}, //8085 #HANGUL SYLLABLE KIYEOK E SIOS + {0xB0DA, 0xACA0}, //8086 #HANGUL SYLLABLE KIYEOK E SSANGSIOS + {0xB0DB, 0xACA1}, //8087 #HANGUL SYLLABLE KIYEOK E IEUNG + {0xB0DC, 0xACA8}, //8088 #HANGUL SYLLABLE KIYEOK YEO + {0xB0DD, 0xACA9}, //8089 #HANGUL SYLLABLE KIYEOK YEO KIYEOK + {0xB0DE, 0xACAA}, //8090 #HANGUL SYLLABLE KIYEOK YEO SSANGKIYEOK + {0xB0DF, 0xACAC}, //8091 #HANGUL SYLLABLE KIYEOK YEO NIEUN + {0xB0E0, 0xACAF}, //8092 #HANGUL SYLLABLE KIYEOK YEO TIKEUT + {0xB0E1, 0xACB0}, //8093 #HANGUL SYLLABLE KIYEOK YEO RIEUL + {0xB0E2, 0xACB8}, //8094 #HANGUL SYLLABLE KIYEOK YEO MIEUM + {0xB0E3, 0xACB9}, //8095 #HANGUL SYLLABLE KIYEOK YEO PIEUP + {0xB0E4, 0xACBB}, //8096 #HANGUL SYLLABLE KIYEOK YEO SIOS + {0xB0E5, 0xACBC}, //8097 #HANGUL SYLLABLE KIYEOK YEO SSANGSIOS + {0xB0E6, 0xACBD}, //8098 #HANGUL SYLLABLE KIYEOK YEO IEUNG + {0xB0E7, 0xACC1}, //8099 #HANGUL SYLLABLE KIYEOK YEO THIEUTH + {0xB0E8, 0xACC4}, //8100 #HANGUL SYLLABLE KIYEOK YE + {0xB0E9, 0xACC8}, //8101 #HANGUL SYLLABLE KIYEOK YE NIEUN + {0xB0EA, 0xACCC}, //8102 #HANGUL SYLLABLE KIYEOK YE RIEUL + {0xB0EB, 0xACD5}, //8103 #HANGUL SYLLABLE KIYEOK YE PIEUP + {0xB0EC, 0xACD7}, //8104 #HANGUL SYLLABLE KIYEOK YE SIOS + {0xB0ED, 0xACE0}, //8105 #HANGUL SYLLABLE KIYEOK O + {0xB0EE, 0xACE1}, //8106 #HANGUL SYLLABLE KIYEOK O KIYEOK + {0xB0EF, 0xACE4}, //8107 #HANGUL SYLLABLE KIYEOK O NIEUN + {0xB0F0, 0xACE7}, //8108 #HANGUL SYLLABLE KIYEOK O TIKEUT + {0xB0F1, 0xACE8}, //8109 #HANGUL SYLLABLE KIYEOK O RIEUL + {0xB0F2, 0xACEA}, //8110 #HANGUL SYLLABLE KIYEOK O RIEULMIEUM + {0xB0F3, 0xACEC}, //8111 #HANGUL SYLLABLE KIYEOK O RIEULSIOS + {0xB0F4, 0xACEF}, //8112 #HANGUL SYLLABLE KIYEOK O RIEULHIEUH + {0xB0F5, 0xACF0}, //8113 #HANGUL SYLLABLE KIYEOK O MIEUM + {0xB0F6, 0xACF1}, //8114 #HANGUL SYLLABLE KIYEOK O PIEUP + {0xB0F7, 0xACF3}, //8115 #HANGUL SYLLABLE KIYEOK O SIOS + {0xB0F8, 0xACF5}, //8116 #HANGUL SYLLABLE KIYEOK O IEUNG + {0xB0F9, 0xACF6}, //8117 #HANGUL SYLLABLE KIYEOK O CIEUC + {0xB0FA, 0xACFC}, //8118 #HANGUL SYLLABLE KIYEOK WA + {0xB0FB, 0xACFD}, //8119 #HANGUL SYLLABLE KIYEOK WA KIYEOK + {0xB0FC, 0xAD00}, //8120 #HANGUL SYLLABLE KIYEOK WA NIEUN + {0xB0FD, 0xAD04}, //8121 #HANGUL SYLLABLE KIYEOK WA RIEUL + {0xB0FE, 0xAD06}, //8122 #HANGUL SYLLABLE KIYEOK WA RIEULMIEUM + {0xB141, 0xCF02}, //8123 #HANGUL SYLLABLE KHIEUKH E SSANGKIYEOK + {0xB142, 0xCF03}, //8124 #HANGUL SYLLABLE KHIEUKH E KIYEOKSIOS + {0xB143, 0xCF05}, //8125 #HANGUL SYLLABLE KHIEUKH E NIEUNCIEUC + {0xB144, 0xCF06}, //8126 #HANGUL SYLLABLE KHIEUKH E NIEUNHIEUH + {0xB145, 0xCF07}, //8127 #HANGUL SYLLABLE KHIEUKH E TIKEUT + {0xB146, 0xCF09}, //8128 #HANGUL SYLLABLE KHIEUKH E RIEULKIYEOK + {0xB147, 0xCF0A}, //8129 #HANGUL SYLLABLE KHIEUKH E RIEULMIEUM + {0xB148, 0xCF0B}, //8130 #HANGUL SYLLABLE KHIEUKH E RIEULPIEUP + {0xB149, 0xCF0C}, //8131 #HANGUL SYLLABLE KHIEUKH E RIEULSIOS + {0xB14A, 0xCF0D}, //8132 #HANGUL SYLLABLE KHIEUKH E RIEULTHIEUTH + {0xB14B, 0xCF0E}, //8133 #HANGUL SYLLABLE KHIEUKH E RIEULPHIEUPH + {0xB14C, 0xCF0F}, //8134 #HANGUL SYLLABLE KHIEUKH E RIEULHIEUH + {0xB14D, 0xCF12}, //8135 #HANGUL SYLLABLE KHIEUKH E PIEUPSIOS + {0xB14E, 0xCF14}, //8136 #HANGUL SYLLABLE KHIEUKH E SSANGSIOS + {0xB14F, 0xCF16}, //8137 #HANGUL SYLLABLE KHIEUKH E CIEUC + {0xB150, 0xCF17}, //8138 #HANGUL SYLLABLE KHIEUKH E CHIEUCH + {0xB151, 0xCF18}, //8139 #HANGUL SYLLABLE KHIEUKH E KHIEUKH + {0xB152, 0xCF19}, //8140 #HANGUL SYLLABLE KHIEUKH E THIEUTH + {0xB153, 0xCF1A}, //8141 #HANGUL SYLLABLE KHIEUKH E PHIEUPH + {0xB154, 0xCF1B}, //8142 #HANGUL SYLLABLE KHIEUKH E HIEUH + {0xB155, 0xCF1D}, //8143 #HANGUL SYLLABLE KHIEUKH YEO KIYEOK + {0xB156, 0xCF1E}, //8144 #HANGUL SYLLABLE KHIEUKH YEO SSANGKIYEOK + {0xB157, 0xCF1F}, //8145 #HANGUL SYLLABLE KHIEUKH YEO KIYEOKSIOS + {0xB158, 0xCF21}, //8146 #HANGUL SYLLABLE KHIEUKH YEO NIEUNCIEUC + {0xB159, 0xCF22}, //8147 #HANGUL SYLLABLE KHIEUKH YEO NIEUNHIEUH + {0xB15A, 0xCF23}, //8148 #HANGUL SYLLABLE KHIEUKH YEO TIKEUT + {0xB161, 0xCF25}, //8149 #HANGUL SYLLABLE KHIEUKH YEO RIEULKIYEOK + {0xB162, 0xCF26}, //8150 #HANGUL SYLLABLE KHIEUKH YEO RIEULMIEUM + {0xB163, 0xCF27}, //8151 #HANGUL SYLLABLE KHIEUKH YEO RIEULPIEUP + {0xB164, 0xCF28}, //8152 #HANGUL SYLLABLE KHIEUKH YEO RIEULSIOS + {0xB165, 0xCF29}, //8153 #HANGUL SYLLABLE KHIEUKH YEO RIEULTHIEUTH + {0xB166, 0xCF2A}, //8154 #HANGUL SYLLABLE KHIEUKH YEO RIEULPHIEUPH + {0xB167, 0xCF2B}, //8155 #HANGUL SYLLABLE KHIEUKH YEO RIEULHIEUH + {0xB168, 0xCF2E}, //8156 #HANGUL SYLLABLE KHIEUKH YEO PIEUPSIOS + {0xB169, 0xCF32}, //8157 #HANGUL SYLLABLE KHIEUKH YEO CIEUC + {0xB16A, 0xCF33}, //8158 #HANGUL SYLLABLE KHIEUKH YEO CHIEUCH + {0xB16B, 0xCF34}, //8159 #HANGUL SYLLABLE KHIEUKH YEO KHIEUKH + {0xB16C, 0xCF35}, //8160 #HANGUL SYLLABLE KHIEUKH YEO THIEUTH + {0xB16D, 0xCF36}, //8161 #HANGUL SYLLABLE KHIEUKH YEO PHIEUPH + {0xB16E, 0xCF37}, //8162 #HANGUL SYLLABLE KHIEUKH YEO HIEUH + {0xB16F, 0xCF39}, //8163 #HANGUL SYLLABLE KHIEUKH YE KIYEOK + {0xB170, 0xCF3A}, //8164 #HANGUL SYLLABLE KHIEUKH YE SSANGKIYEOK + {0xB171, 0xCF3B}, //8165 #HANGUL SYLLABLE KHIEUKH YE KIYEOKSIOS + {0xB172, 0xCF3C}, //8166 #HANGUL SYLLABLE KHIEUKH YE NIEUN + {0xB173, 0xCF3D}, //8167 #HANGUL SYLLABLE KHIEUKH YE NIEUNCIEUC + {0xB174, 0xCF3E}, //8168 #HANGUL SYLLABLE KHIEUKH YE NIEUNHIEUH + {0xB175, 0xCF3F}, //8169 #HANGUL SYLLABLE KHIEUKH YE TIKEUT + {0xB176, 0xCF40}, //8170 #HANGUL SYLLABLE KHIEUKH YE RIEUL + {0xB177, 0xCF41}, //8171 #HANGUL SYLLABLE KHIEUKH YE RIEULKIYEOK + {0xB178, 0xCF42}, //8172 #HANGUL SYLLABLE KHIEUKH YE RIEULMIEUM + {0xB179, 0xCF43}, //8173 #HANGUL SYLLABLE KHIEUKH YE RIEULPIEUP + {0xB17A, 0xCF44}, //8174 #HANGUL SYLLABLE KHIEUKH YE RIEULSIOS + {0xB181, 0xCF45}, //8175 #HANGUL SYLLABLE KHIEUKH YE RIEULTHIEUTH + {0xB182, 0xCF46}, //8176 #HANGUL SYLLABLE KHIEUKH YE RIEULPHIEUPH + {0xB183, 0xCF47}, //8177 #HANGUL SYLLABLE KHIEUKH YE RIEULHIEUH + {0xB184, 0xCF48}, //8178 #HANGUL SYLLABLE KHIEUKH YE MIEUM + {0xB185, 0xCF49}, //8179 #HANGUL SYLLABLE KHIEUKH YE PIEUP + {0xB186, 0xCF4A}, //8180 #HANGUL SYLLABLE KHIEUKH YE PIEUPSIOS + {0xB187, 0xCF4B}, //8181 #HANGUL SYLLABLE KHIEUKH YE SIOS + {0xB188, 0xCF4C}, //8182 #HANGUL SYLLABLE KHIEUKH YE SSANGSIOS + {0xB189, 0xCF4D}, //8183 #HANGUL SYLLABLE KHIEUKH YE IEUNG + {0xB18A, 0xCF4E}, //8184 #HANGUL SYLLABLE KHIEUKH YE CIEUC + {0xB18B, 0xCF4F}, //8185 #HANGUL SYLLABLE KHIEUKH YE CHIEUCH + {0xB18C, 0xCF50}, //8186 #HANGUL SYLLABLE KHIEUKH YE KHIEUKH + {0xB18D, 0xCF51}, //8187 #HANGUL SYLLABLE KHIEUKH YE THIEUTH + {0xB18E, 0xCF52}, //8188 #HANGUL SYLLABLE KHIEUKH YE PHIEUPH + {0xB18F, 0xCF53}, //8189 #HANGUL SYLLABLE KHIEUKH YE HIEUH + {0xB190, 0xCF56}, //8190 #HANGUL SYLLABLE KHIEUKH O SSANGKIYEOK + {0xB191, 0xCF57}, //8191 #HANGUL SYLLABLE KHIEUKH O KIYEOKSIOS + {0xB192, 0xCF59}, //8192 #HANGUL SYLLABLE KHIEUKH O NIEUNCIEUC + {0xB193, 0xCF5A}, //8193 #HANGUL SYLLABLE KHIEUKH O NIEUNHIEUH + {0xB194, 0xCF5B}, //8194 #HANGUL SYLLABLE KHIEUKH O TIKEUT + {0xB195, 0xCF5D}, //8195 #HANGUL SYLLABLE KHIEUKH O RIEULKIYEOK + {0xB196, 0xCF5E}, //8196 #HANGUL SYLLABLE KHIEUKH O RIEULMIEUM + {0xB197, 0xCF5F}, //8197 #HANGUL SYLLABLE KHIEUKH O RIEULPIEUP + {0xB198, 0xCF60}, //8198 #HANGUL SYLLABLE KHIEUKH O RIEULSIOS + {0xB199, 0xCF61}, //8199 #HANGUL SYLLABLE KHIEUKH O RIEULTHIEUTH + {0xB19A, 0xCF62}, //8200 #HANGUL SYLLABLE KHIEUKH O RIEULPHIEUPH + {0xB19B, 0xCF63}, //8201 #HANGUL SYLLABLE KHIEUKH O RIEULHIEUH + {0xB19C, 0xCF66}, //8202 #HANGUL SYLLABLE KHIEUKH O PIEUPSIOS + {0xB19D, 0xCF68}, //8203 #HANGUL SYLLABLE KHIEUKH O SSANGSIOS + {0xB19E, 0xCF6A}, //8204 #HANGUL SYLLABLE KHIEUKH O CIEUC + {0xB19F, 0xCF6B}, //8205 #HANGUL SYLLABLE KHIEUKH O CHIEUCH + {0xB1A0, 0xCF6C}, //8206 #HANGUL SYLLABLE KHIEUKH O KHIEUKH + {0xB1A1, 0xAD0C}, //8207 #HANGUL SYLLABLE KIYEOK WA MIEUM + {0xB1A2, 0xAD0D}, //8208 #HANGUL SYLLABLE KIYEOK WA PIEUP + {0xB1A3, 0xAD0F}, //8209 #HANGUL SYLLABLE KIYEOK WA SIOS + {0xB1A4, 0xAD11}, //8210 #HANGUL SYLLABLE KIYEOK WA IEUNG + {0xB1A5, 0xAD18}, //8211 #HANGUL SYLLABLE KIYEOK WAE + {0xB1A6, 0xAD1C}, //8212 #HANGUL SYLLABLE KIYEOK WAE NIEUN + {0xB1A7, 0xAD20}, //8213 #HANGUL SYLLABLE KIYEOK WAE RIEUL + {0xB1A8, 0xAD29}, //8214 #HANGUL SYLLABLE KIYEOK WAE PIEUP + {0xB1A9, 0xAD2C}, //8215 #HANGUL SYLLABLE KIYEOK WAE SSANGSIOS + {0xB1AA, 0xAD2D}, //8216 #HANGUL SYLLABLE KIYEOK WAE IEUNG + {0xB1AB, 0xAD34}, //8217 #HANGUL SYLLABLE KIYEOK OE + {0xB1AC, 0xAD35}, //8218 #HANGUL SYLLABLE KIYEOK OE KIYEOK + {0xB1AD, 0xAD38}, //8219 #HANGUL SYLLABLE KIYEOK OE NIEUN + {0xB1AE, 0xAD3C}, //8220 #HANGUL SYLLABLE KIYEOK OE RIEUL + {0xB1AF, 0xAD44}, //8221 #HANGUL SYLLABLE KIYEOK OE MIEUM + {0xB1B0, 0xAD45}, //8222 #HANGUL SYLLABLE KIYEOK OE PIEUP + {0xB1B1, 0xAD47}, //8223 #HANGUL SYLLABLE KIYEOK OE SIOS + {0xB1B2, 0xAD49}, //8224 #HANGUL SYLLABLE KIYEOK OE IEUNG + {0xB1B3, 0xAD50}, //8225 #HANGUL SYLLABLE KIYEOK YO + {0xB1B4, 0xAD54}, //8226 #HANGUL SYLLABLE KIYEOK YO NIEUN + {0xB1B5, 0xAD58}, //8227 #HANGUL SYLLABLE KIYEOK YO RIEUL + {0xB1B6, 0xAD61}, //8228 #HANGUL SYLLABLE KIYEOK YO PIEUP + {0xB1B7, 0xAD63}, //8229 #HANGUL SYLLABLE KIYEOK YO SIOS + {0xB1B8, 0xAD6C}, //8230 #HANGUL SYLLABLE KIYEOK U + {0xB1B9, 0xAD6D}, //8231 #HANGUL SYLLABLE KIYEOK U KIYEOK + {0xB1BA, 0xAD70}, //8232 #HANGUL SYLLABLE KIYEOK U NIEUN + {0xB1BB, 0xAD73}, //8233 #HANGUL SYLLABLE KIYEOK U TIKEUT + {0xB1BC, 0xAD74}, //8234 #HANGUL SYLLABLE KIYEOK U RIEUL + {0xB1BD, 0xAD75}, //8235 #HANGUL SYLLABLE KIYEOK U RIEULKIYEOK + {0xB1BE, 0xAD76}, //8236 #HANGUL SYLLABLE KIYEOK U RIEULMIEUM + {0xB1BF, 0xAD7B}, //8237 #HANGUL SYLLABLE KIYEOK U RIEULHIEUH + {0xB1C0, 0xAD7C}, //8238 #HANGUL SYLLABLE KIYEOK U MIEUM + {0xB1C1, 0xAD7D}, //8239 #HANGUL SYLLABLE KIYEOK U PIEUP + {0xB1C2, 0xAD7F}, //8240 #HANGUL SYLLABLE KIYEOK U SIOS + {0xB1C3, 0xAD81}, //8241 #HANGUL SYLLABLE KIYEOK U IEUNG + {0xB1C4, 0xAD82}, //8242 #HANGUL SYLLABLE KIYEOK U CIEUC + {0xB1C5, 0xAD88}, //8243 #HANGUL SYLLABLE KIYEOK WEO + {0xB1C6, 0xAD89}, //8244 #HANGUL SYLLABLE KIYEOK WEO KIYEOK + {0xB1C7, 0xAD8C}, //8245 #HANGUL SYLLABLE KIYEOK WEO NIEUN + {0xB1C8, 0xAD90}, //8246 #HANGUL SYLLABLE KIYEOK WEO RIEUL + {0xB1C9, 0xAD9C}, //8247 #HANGUL SYLLABLE KIYEOK WEO SSANGSIOS + {0xB1CA, 0xAD9D}, //8248 #HANGUL SYLLABLE KIYEOK WEO IEUNG + {0xB1CB, 0xADA4}, //8249 #HANGUL SYLLABLE KIYEOK WE + {0xB1CC, 0xADB7}, //8250 #HANGUL SYLLABLE KIYEOK WE SIOS + {0xB1CD, 0xADC0}, //8251 #HANGUL SYLLABLE KIYEOK WI + {0xB1CE, 0xADC1}, //8252 #HANGUL SYLLABLE KIYEOK WI KIYEOK + {0xB1CF, 0xADC4}, //8253 #HANGUL SYLLABLE KIYEOK WI NIEUN + {0xB1D0, 0xADC8}, //8254 #HANGUL SYLLABLE KIYEOK WI RIEUL + {0xB1D1, 0xADD0}, //8255 #HANGUL SYLLABLE KIYEOK WI MIEUM + {0xB1D2, 0xADD1}, //8256 #HANGUL SYLLABLE KIYEOK WI PIEUP + {0xB1D3, 0xADD3}, //8257 #HANGUL SYLLABLE KIYEOK WI SIOS + {0xB1D4, 0xADDC}, //8258 #HANGUL SYLLABLE KIYEOK YU + {0xB1D5, 0xADE0}, //8259 #HANGUL SYLLABLE KIYEOK YU NIEUN + {0xB1D6, 0xADE4}, //8260 #HANGUL SYLLABLE KIYEOK YU RIEUL + {0xB1D7, 0xADF8}, //8261 #HANGUL SYLLABLE KIYEOK EU + {0xB1D8, 0xADF9}, //8262 #HANGUL SYLLABLE KIYEOK EU KIYEOK + {0xB1D9, 0xADFC}, //8263 #HANGUL SYLLABLE KIYEOK EU NIEUN + {0xB1DA, 0xADFF}, //8264 #HANGUL SYLLABLE KIYEOK EU TIKEUT + {0xB1DB, 0xAE00}, //8265 #HANGUL SYLLABLE KIYEOK EU RIEUL + {0xB1DC, 0xAE01}, //8266 #HANGUL SYLLABLE KIYEOK EU RIEULKIYEOK + {0xB1DD, 0xAE08}, //8267 #HANGUL SYLLABLE KIYEOK EU MIEUM + {0xB1DE, 0xAE09}, //8268 #HANGUL SYLLABLE KIYEOK EU PIEUP + {0xB1DF, 0xAE0B}, //8269 #HANGUL SYLLABLE KIYEOK EU SIOS + {0xB1E0, 0xAE0D}, //8270 #HANGUL SYLLABLE KIYEOK EU IEUNG + {0xB1E1, 0xAE14}, //8271 #HANGUL SYLLABLE KIYEOK YI + {0xB1E2, 0xAE30}, //8272 #HANGUL SYLLABLE KIYEOK I + {0xB1E3, 0xAE31}, //8273 #HANGUL SYLLABLE KIYEOK I KIYEOK + {0xB1E4, 0xAE34}, //8274 #HANGUL SYLLABLE KIYEOK I NIEUN + {0xB1E5, 0xAE37}, //8275 #HANGUL SYLLABLE KIYEOK I TIKEUT + {0xB1E6, 0xAE38}, //8276 #HANGUL SYLLABLE KIYEOK I RIEUL + {0xB1E7, 0xAE3A}, //8277 #HANGUL SYLLABLE KIYEOK I RIEULMIEUM + {0xB1E8, 0xAE40}, //8278 #HANGUL SYLLABLE KIYEOK I MIEUM + {0xB1E9, 0xAE41}, //8279 #HANGUL SYLLABLE KIYEOK I PIEUP + {0xB1EA, 0xAE43}, //8280 #HANGUL SYLLABLE KIYEOK I SIOS + {0xB1EB, 0xAE45}, //8281 #HANGUL SYLLABLE KIYEOK I IEUNG + {0xB1EC, 0xAE46}, //8282 #HANGUL SYLLABLE KIYEOK I CIEUC + {0xB1ED, 0xAE4A}, //8283 #HANGUL SYLLABLE KIYEOK I PHIEUPH + {0xB1EE, 0xAE4C}, //8284 #HANGUL SYLLABLE SSANGKIYEOK A + {0xB1EF, 0xAE4D}, //8285 #HANGUL SYLLABLE SSANGKIYEOK A KIYEOK + {0xB1F0, 0xAE4E}, //8286 #HANGUL SYLLABLE SSANGKIYEOK A SSANGKIYEOK + {0xB1F1, 0xAE50}, //8287 #HANGUL SYLLABLE SSANGKIYEOK A NIEUN + {0xB1F2, 0xAE54}, //8288 #HANGUL SYLLABLE SSANGKIYEOK A RIEUL + {0xB1F3, 0xAE56}, //8289 #HANGUL SYLLABLE SSANGKIYEOK A RIEULMIEUM + {0xB1F4, 0xAE5C}, //8290 #HANGUL SYLLABLE SSANGKIYEOK A MIEUM + {0xB1F5, 0xAE5D}, //8291 #HANGUL SYLLABLE SSANGKIYEOK A PIEUP + {0xB1F6, 0xAE5F}, //8292 #HANGUL SYLLABLE SSANGKIYEOK A SIOS + {0xB1F7, 0xAE60}, //8293 #HANGUL SYLLABLE SSANGKIYEOK A SSANGSIOS + {0xB1F8, 0xAE61}, //8294 #HANGUL SYLLABLE SSANGKIYEOK A IEUNG + {0xB1F9, 0xAE65}, //8295 #HANGUL SYLLABLE SSANGKIYEOK A THIEUTH + {0xB1FA, 0xAE68}, //8296 #HANGUL SYLLABLE SSANGKIYEOK AE + {0xB1FB, 0xAE69}, //8297 #HANGUL SYLLABLE SSANGKIYEOK AE KIYEOK + {0xB1FC, 0xAE6C}, //8298 #HANGUL SYLLABLE SSANGKIYEOK AE NIEUN + {0xB1FD, 0xAE70}, //8299 #HANGUL SYLLABLE SSANGKIYEOK AE RIEUL + {0xB1FE, 0xAE78}, //8300 #HANGUL SYLLABLE SSANGKIYEOK AE MIEUM + {0xB241, 0xCF6D}, //8301 #HANGUL SYLLABLE KHIEUKH O THIEUTH + {0xB242, 0xCF6E}, //8302 #HANGUL SYLLABLE KHIEUKH O PHIEUPH + {0xB243, 0xCF6F}, //8303 #HANGUL SYLLABLE KHIEUKH O HIEUH + {0xB244, 0xCF72}, //8304 #HANGUL SYLLABLE KHIEUKH WA SSANGKIYEOK + {0xB245, 0xCF73}, //8305 #HANGUL SYLLABLE KHIEUKH WA KIYEOKSIOS + {0xB246, 0xCF75}, //8306 #HANGUL SYLLABLE KHIEUKH WA NIEUNCIEUC + {0xB247, 0xCF76}, //8307 #HANGUL SYLLABLE KHIEUKH WA NIEUNHIEUH + {0xB248, 0xCF77}, //8308 #HANGUL SYLLABLE KHIEUKH WA TIKEUT + {0xB249, 0xCF79}, //8309 #HANGUL SYLLABLE KHIEUKH WA RIEULKIYEOK + {0xB24A, 0xCF7A}, //8310 #HANGUL SYLLABLE KHIEUKH WA RIEULMIEUM + {0xB24B, 0xCF7B}, //8311 #HANGUL SYLLABLE KHIEUKH WA RIEULPIEUP + {0xB24C, 0xCF7C}, //8312 #HANGUL SYLLABLE KHIEUKH WA RIEULSIOS + {0xB24D, 0xCF7D}, //8313 #HANGUL SYLLABLE KHIEUKH WA RIEULTHIEUTH + {0xB24E, 0xCF7E}, //8314 #HANGUL SYLLABLE KHIEUKH WA RIEULPHIEUPH + {0xB24F, 0xCF7F}, //8315 #HANGUL SYLLABLE KHIEUKH WA RIEULHIEUH + {0xB250, 0xCF81}, //8316 #HANGUL SYLLABLE KHIEUKH WA PIEUP + {0xB251, 0xCF82}, //8317 #HANGUL SYLLABLE KHIEUKH WA PIEUPSIOS + {0xB252, 0xCF83}, //8318 #HANGUL SYLLABLE KHIEUKH WA SIOS + {0xB253, 0xCF84}, //8319 #HANGUL SYLLABLE KHIEUKH WA SSANGSIOS + {0xB254, 0xCF86}, //8320 #HANGUL SYLLABLE KHIEUKH WA CIEUC + {0xB255, 0xCF87}, //8321 #HANGUL SYLLABLE KHIEUKH WA CHIEUCH + {0xB256, 0xCF88}, //8322 #HANGUL SYLLABLE KHIEUKH WA KHIEUKH + {0xB257, 0xCF89}, //8323 #HANGUL SYLLABLE KHIEUKH WA THIEUTH + {0xB258, 0xCF8A}, //8324 #HANGUL SYLLABLE KHIEUKH WA PHIEUPH + {0xB259, 0xCF8B}, //8325 #HANGUL SYLLABLE KHIEUKH WA HIEUH + {0xB25A, 0xCF8D}, //8326 #HANGUL SYLLABLE KHIEUKH WAE KIYEOK + {0xB261, 0xCF8E}, //8327 #HANGUL SYLLABLE KHIEUKH WAE SSANGKIYEOK + {0xB262, 0xCF8F}, //8328 #HANGUL SYLLABLE KHIEUKH WAE KIYEOKSIOS + {0xB263, 0xCF90}, //8329 #HANGUL SYLLABLE KHIEUKH WAE NIEUN + {0xB264, 0xCF91}, //8330 #HANGUL SYLLABLE KHIEUKH WAE NIEUNCIEUC + {0xB265, 0xCF92}, //8331 #HANGUL SYLLABLE KHIEUKH WAE NIEUNHIEUH + {0xB266, 0xCF93}, //8332 #HANGUL SYLLABLE KHIEUKH WAE TIKEUT + {0xB267, 0xCF94}, //8333 #HANGUL SYLLABLE KHIEUKH WAE RIEUL + {0xB268, 0xCF95}, //8334 #HANGUL SYLLABLE KHIEUKH WAE RIEULKIYEOK + {0xB269, 0xCF96}, //8335 #HANGUL SYLLABLE KHIEUKH WAE RIEULMIEUM + {0xB26A, 0xCF97}, //8336 #HANGUL SYLLABLE KHIEUKH WAE RIEULPIEUP + {0xB26B, 0xCF98}, //8337 #HANGUL SYLLABLE KHIEUKH WAE RIEULSIOS + {0xB26C, 0xCF99}, //8338 #HANGUL SYLLABLE KHIEUKH WAE RIEULTHIEUTH + {0xB26D, 0xCF9A}, //8339 #HANGUL SYLLABLE KHIEUKH WAE RIEULPHIEUPH + {0xB26E, 0xCF9B}, //8340 #HANGUL SYLLABLE KHIEUKH WAE RIEULHIEUH + {0xB26F, 0xCF9C}, //8341 #HANGUL SYLLABLE KHIEUKH WAE MIEUM + {0xB270, 0xCF9D}, //8342 #HANGUL SYLLABLE KHIEUKH WAE PIEUP + {0xB271, 0xCF9E}, //8343 #HANGUL SYLLABLE KHIEUKH WAE PIEUPSIOS + {0xB272, 0xCF9F}, //8344 #HANGUL SYLLABLE KHIEUKH WAE SIOS + {0xB273, 0xCFA0}, //8345 #HANGUL SYLLABLE KHIEUKH WAE SSANGSIOS + {0xB274, 0xCFA2}, //8346 #HANGUL SYLLABLE KHIEUKH WAE CIEUC + {0xB275, 0xCFA3}, //8347 #HANGUL SYLLABLE KHIEUKH WAE CHIEUCH + {0xB276, 0xCFA4}, //8348 #HANGUL SYLLABLE KHIEUKH WAE KHIEUKH + {0xB277, 0xCFA5}, //8349 #HANGUL SYLLABLE KHIEUKH WAE THIEUTH + {0xB278, 0xCFA6}, //8350 #HANGUL SYLLABLE KHIEUKH WAE PHIEUPH + {0xB279, 0xCFA7}, //8351 #HANGUL SYLLABLE KHIEUKH WAE HIEUH + {0xB27A, 0xCFA9}, //8352 #HANGUL SYLLABLE KHIEUKH OE KIYEOK + {0xB281, 0xCFAA}, //8353 #HANGUL SYLLABLE KHIEUKH OE SSANGKIYEOK + {0xB282, 0xCFAB}, //8354 #HANGUL SYLLABLE KHIEUKH OE KIYEOKSIOS + {0xB283, 0xCFAC}, //8355 #HANGUL SYLLABLE KHIEUKH OE NIEUN + {0xB284, 0xCFAD}, //8356 #HANGUL SYLLABLE KHIEUKH OE NIEUNCIEUC + {0xB285, 0xCFAE}, //8357 #HANGUL SYLLABLE KHIEUKH OE NIEUNHIEUH + {0xB286, 0xCFAF}, //8358 #HANGUL SYLLABLE KHIEUKH OE TIKEUT + {0xB287, 0xCFB1}, //8359 #HANGUL SYLLABLE KHIEUKH OE RIEULKIYEOK + {0xB288, 0xCFB2}, //8360 #HANGUL SYLLABLE KHIEUKH OE RIEULMIEUM + {0xB289, 0xCFB3}, //8361 #HANGUL SYLLABLE KHIEUKH OE RIEULPIEUP + {0xB28A, 0xCFB4}, //8362 #HANGUL SYLLABLE KHIEUKH OE RIEULSIOS + {0xB28B, 0xCFB5}, //8363 #HANGUL SYLLABLE KHIEUKH OE RIEULTHIEUTH + {0xB28C, 0xCFB6}, //8364 #HANGUL SYLLABLE KHIEUKH OE RIEULPHIEUPH + {0xB28D, 0xCFB7}, //8365 #HANGUL SYLLABLE KHIEUKH OE RIEULHIEUH + {0xB28E, 0xCFB8}, //8366 #HANGUL SYLLABLE KHIEUKH OE MIEUM + {0xB28F, 0xCFB9}, //8367 #HANGUL SYLLABLE KHIEUKH OE PIEUP + {0xB290, 0xCFBA}, //8368 #HANGUL SYLLABLE KHIEUKH OE PIEUPSIOS + {0xB291, 0xCFBB}, //8369 #HANGUL SYLLABLE KHIEUKH OE SIOS + {0xB292, 0xCFBC}, //8370 #HANGUL SYLLABLE KHIEUKH OE SSANGSIOS + {0xB293, 0xCFBD}, //8371 #HANGUL SYLLABLE KHIEUKH OE IEUNG + {0xB294, 0xCFBE}, //8372 #HANGUL SYLLABLE KHIEUKH OE CIEUC + {0xB295, 0xCFBF}, //8373 #HANGUL SYLLABLE KHIEUKH OE CHIEUCH + {0xB296, 0xCFC0}, //8374 #HANGUL SYLLABLE KHIEUKH OE KHIEUKH + {0xB297, 0xCFC1}, //8375 #HANGUL SYLLABLE KHIEUKH OE THIEUTH + {0xB298, 0xCFC2}, //8376 #HANGUL SYLLABLE KHIEUKH OE PHIEUPH + {0xB299, 0xCFC3}, //8377 #HANGUL SYLLABLE KHIEUKH OE HIEUH + {0xB29A, 0xCFC5}, //8378 #HANGUL SYLLABLE KHIEUKH YO KIYEOK + {0xB29B, 0xCFC6}, //8379 #HANGUL SYLLABLE KHIEUKH YO SSANGKIYEOK + {0xB29C, 0xCFC7}, //8380 #HANGUL SYLLABLE KHIEUKH YO KIYEOKSIOS + {0xB29D, 0xCFC8}, //8381 #HANGUL SYLLABLE KHIEUKH YO NIEUN + {0xB29E, 0xCFC9}, //8382 #HANGUL SYLLABLE KHIEUKH YO NIEUNCIEUC + {0xB29F, 0xCFCA}, //8383 #HANGUL SYLLABLE KHIEUKH YO NIEUNHIEUH + {0xB2A0, 0xCFCB}, //8384 #HANGUL SYLLABLE KHIEUKH YO TIKEUT + {0xB2A1, 0xAE79}, //8385 #HANGUL SYLLABLE SSANGKIYEOK AE PIEUP + {0xB2A2, 0xAE7B}, //8386 #HANGUL SYLLABLE SSANGKIYEOK AE SIOS + {0xB2A3, 0xAE7C}, //8387 #HANGUL SYLLABLE SSANGKIYEOK AE SSANGSIOS + {0xB2A4, 0xAE7D}, //8388 #HANGUL SYLLABLE SSANGKIYEOK AE IEUNG + {0xB2A5, 0xAE84}, //8389 #HANGUL SYLLABLE SSANGKIYEOK YA + {0xB2A6, 0xAE85}, //8390 #HANGUL SYLLABLE SSANGKIYEOK YA KIYEOK + {0xB2A7, 0xAE8C}, //8391 #HANGUL SYLLABLE SSANGKIYEOK YA RIEUL + {0xB2A8, 0xAEBC}, //8392 #HANGUL SYLLABLE SSANGKIYEOK EO + {0xB2A9, 0xAEBD}, //8393 #HANGUL SYLLABLE SSANGKIYEOK EO KIYEOK + {0xB2AA, 0xAEBE}, //8394 #HANGUL SYLLABLE SSANGKIYEOK EO SSANGKIYEOK + {0xB2AB, 0xAEC0}, //8395 #HANGUL SYLLABLE SSANGKIYEOK EO NIEUN + {0xB2AC, 0xAEC4}, //8396 #HANGUL SYLLABLE SSANGKIYEOK EO RIEUL + {0xB2AD, 0xAECC}, //8397 #HANGUL SYLLABLE SSANGKIYEOK EO MIEUM + {0xB2AE, 0xAECD}, //8398 #HANGUL SYLLABLE SSANGKIYEOK EO PIEUP + {0xB2AF, 0xAECF}, //8399 #HANGUL SYLLABLE SSANGKIYEOK EO SIOS + {0xB2B0, 0xAED0}, //8400 #HANGUL SYLLABLE SSANGKIYEOK EO SSANGSIOS + {0xB2B1, 0xAED1}, //8401 #HANGUL SYLLABLE SSANGKIYEOK EO IEUNG + {0xB2B2, 0xAED8}, //8402 #HANGUL SYLLABLE SSANGKIYEOK E + {0xB2B3, 0xAED9}, //8403 #HANGUL SYLLABLE SSANGKIYEOK E KIYEOK + {0xB2B4, 0xAEDC}, //8404 #HANGUL SYLLABLE SSANGKIYEOK E NIEUN + {0xB2B5, 0xAEE8}, //8405 #HANGUL SYLLABLE SSANGKIYEOK E MIEUM + {0xB2B6, 0xAEEB}, //8406 #HANGUL SYLLABLE SSANGKIYEOK E SIOS + {0xB2B7, 0xAEED}, //8407 #HANGUL SYLLABLE SSANGKIYEOK E IEUNG + {0xB2B8, 0xAEF4}, //8408 #HANGUL SYLLABLE SSANGKIYEOK YEO + {0xB2B9, 0xAEF8}, //8409 #HANGUL SYLLABLE SSANGKIYEOK YEO NIEUN + {0xB2BA, 0xAEFC}, //8410 #HANGUL SYLLABLE SSANGKIYEOK YEO RIEUL + {0xB2BB, 0xAF07}, //8411 #HANGUL SYLLABLE SSANGKIYEOK YEO SIOS + {0xB2BC, 0xAF08}, //8412 #HANGUL SYLLABLE SSANGKIYEOK YEO SSANGSIOS + {0xB2BD, 0xAF0D}, //8413 #HANGUL SYLLABLE SSANGKIYEOK YEO THIEUTH + {0xB2BE, 0xAF10}, //8414 #HANGUL SYLLABLE SSANGKIYEOK YE + {0xB2BF, 0xAF2C}, //8415 #HANGUL SYLLABLE SSANGKIYEOK O + {0xB2C0, 0xAF2D}, //8416 #HANGUL SYLLABLE SSANGKIYEOK O KIYEOK + {0xB2C1, 0xAF30}, //8417 #HANGUL SYLLABLE SSANGKIYEOK O NIEUN + {0xB2C2, 0xAF32}, //8418 #HANGUL SYLLABLE SSANGKIYEOK O NIEUNHIEUH + {0xB2C3, 0xAF34}, //8419 #HANGUL SYLLABLE SSANGKIYEOK O RIEUL + {0xB2C4, 0xAF3C}, //8420 #HANGUL SYLLABLE SSANGKIYEOK O MIEUM + {0xB2C5, 0xAF3D}, //8421 #HANGUL SYLLABLE SSANGKIYEOK O PIEUP + {0xB2C6, 0xAF3F}, //8422 #HANGUL SYLLABLE SSANGKIYEOK O SIOS + {0xB2C7, 0xAF41}, //8423 #HANGUL SYLLABLE SSANGKIYEOK O IEUNG + {0xB2C8, 0xAF42}, //8424 #HANGUL SYLLABLE SSANGKIYEOK O CIEUC + {0xB2C9, 0xAF43}, //8425 #HANGUL SYLLABLE SSANGKIYEOK O CHIEUCH + {0xB2CA, 0xAF48}, //8426 #HANGUL SYLLABLE SSANGKIYEOK WA + {0xB2CB, 0xAF49}, //8427 #HANGUL SYLLABLE SSANGKIYEOK WA KIYEOK + {0xB2CC, 0xAF50}, //8428 #HANGUL SYLLABLE SSANGKIYEOK WA RIEUL + {0xB2CD, 0xAF5C}, //8429 #HANGUL SYLLABLE SSANGKIYEOK WA SSANGSIOS + {0xB2CE, 0xAF5D}, //8430 #HANGUL SYLLABLE SSANGKIYEOK WA IEUNG + {0xB2CF, 0xAF64}, //8431 #HANGUL SYLLABLE SSANGKIYEOK WAE + {0xB2D0, 0xAF65}, //8432 #HANGUL SYLLABLE SSANGKIYEOK WAE KIYEOK + {0xB2D1, 0xAF79}, //8433 #HANGUL SYLLABLE SSANGKIYEOK WAE IEUNG + {0xB2D2, 0xAF80}, //8434 #HANGUL SYLLABLE SSANGKIYEOK OE + {0xB2D3, 0xAF84}, //8435 #HANGUL SYLLABLE SSANGKIYEOK OE NIEUN + {0xB2D4, 0xAF88}, //8436 #HANGUL SYLLABLE SSANGKIYEOK OE RIEUL + {0xB2D5, 0xAF90}, //8437 #HANGUL SYLLABLE SSANGKIYEOK OE MIEUM + {0xB2D6, 0xAF91}, //8438 #HANGUL SYLLABLE SSANGKIYEOK OE PIEUP + {0xB2D7, 0xAF95}, //8439 #HANGUL SYLLABLE SSANGKIYEOK OE IEUNG + {0xB2D8, 0xAF9C}, //8440 #HANGUL SYLLABLE SSANGKIYEOK YO + {0xB2D9, 0xAFB8}, //8441 #HANGUL SYLLABLE SSANGKIYEOK U + {0xB2DA, 0xAFB9}, //8442 #HANGUL SYLLABLE SSANGKIYEOK U KIYEOK + {0xB2DB, 0xAFBC}, //8443 #HANGUL SYLLABLE SSANGKIYEOK U NIEUN + {0xB2DC, 0xAFC0}, //8444 #HANGUL SYLLABLE SSANGKIYEOK U RIEUL + {0xB2DD, 0xAFC7}, //8445 #HANGUL SYLLABLE SSANGKIYEOK U RIEULHIEUH + {0xB2DE, 0xAFC8}, //8446 #HANGUL SYLLABLE SSANGKIYEOK U MIEUM + {0xB2DF, 0xAFC9}, //8447 #HANGUL SYLLABLE SSANGKIYEOK U PIEUP + {0xB2E0, 0xAFCB}, //8448 #HANGUL SYLLABLE SSANGKIYEOK U SIOS + {0xB2E1, 0xAFCD}, //8449 #HANGUL SYLLABLE SSANGKIYEOK U IEUNG + {0xB2E2, 0xAFCE}, //8450 #HANGUL SYLLABLE SSANGKIYEOK U CIEUC + {0xB2E3, 0xAFD4}, //8451 #HANGUL SYLLABLE SSANGKIYEOK WEO + {0xB2E4, 0xAFDC}, //8452 #HANGUL SYLLABLE SSANGKIYEOK WEO RIEUL + {0xB2E5, 0xAFE8}, //8453 #HANGUL SYLLABLE SSANGKIYEOK WEO SSANGSIOS + {0xB2E6, 0xAFE9}, //8454 #HANGUL SYLLABLE SSANGKIYEOK WEO IEUNG + {0xB2E7, 0xAFF0}, //8455 #HANGUL SYLLABLE SSANGKIYEOK WE + {0xB2E8, 0xAFF1}, //8456 #HANGUL SYLLABLE SSANGKIYEOK WE KIYEOK + {0xB2E9, 0xAFF4}, //8457 #HANGUL SYLLABLE SSANGKIYEOK WE NIEUN + {0xB2EA, 0xAFF8}, //8458 #HANGUL SYLLABLE SSANGKIYEOK WE RIEUL + {0xB2EB, 0xB000}, //8459 #HANGUL SYLLABLE SSANGKIYEOK WE MIEUM + {0xB2EC, 0xB001}, //8460 #HANGUL SYLLABLE SSANGKIYEOK WE PIEUP + {0xB2ED, 0xB004}, //8461 #HANGUL SYLLABLE SSANGKIYEOK WE SSANGSIOS + {0xB2EE, 0xB00C}, //8462 #HANGUL SYLLABLE SSANGKIYEOK WI + {0xB2EF, 0xB010}, //8463 #HANGUL SYLLABLE SSANGKIYEOK WI NIEUN + {0xB2F0, 0xB014}, //8464 #HANGUL SYLLABLE SSANGKIYEOK WI RIEUL + {0xB2F1, 0xB01C}, //8465 #HANGUL SYLLABLE SSANGKIYEOK WI MIEUM + {0xB2F2, 0xB01D}, //8466 #HANGUL SYLLABLE SSANGKIYEOK WI PIEUP + {0xB2F3, 0xB028}, //8467 #HANGUL SYLLABLE SSANGKIYEOK YU + {0xB2F4, 0xB044}, //8468 #HANGUL SYLLABLE SSANGKIYEOK EU + {0xB2F5, 0xB045}, //8469 #HANGUL SYLLABLE SSANGKIYEOK EU KIYEOK + {0xB2F6, 0xB048}, //8470 #HANGUL SYLLABLE SSANGKIYEOK EU NIEUN + {0xB2F7, 0xB04A}, //8471 #HANGUL SYLLABLE SSANGKIYEOK EU NIEUNHIEUH + {0xB2F8, 0xB04C}, //8472 #HANGUL SYLLABLE SSANGKIYEOK EU RIEUL + {0xB2F9, 0xB04E}, //8473 #HANGUL SYLLABLE SSANGKIYEOK EU RIEULMIEUM + {0xB2FA, 0xB053}, //8474 #HANGUL SYLLABLE SSANGKIYEOK EU RIEULHIEUH + {0xB2FB, 0xB054}, //8475 #HANGUL SYLLABLE SSANGKIYEOK EU MIEUM + {0xB2FC, 0xB055}, //8476 #HANGUL SYLLABLE SSANGKIYEOK EU PIEUP + {0xB2FD, 0xB057}, //8477 #HANGUL SYLLABLE SSANGKIYEOK EU SIOS + {0xB2FE, 0xB059}, //8478 #HANGUL SYLLABLE SSANGKIYEOK EU IEUNG + {0xB341, 0xCFCC}, //8479 #HANGUL SYLLABLE KHIEUKH YO RIEUL + {0xB342, 0xCFCD}, //8480 #HANGUL SYLLABLE KHIEUKH YO RIEULKIYEOK + {0xB343, 0xCFCE}, //8481 #HANGUL SYLLABLE KHIEUKH YO RIEULMIEUM + {0xB344, 0xCFCF}, //8482 #HANGUL SYLLABLE KHIEUKH YO RIEULPIEUP + {0xB345, 0xCFD0}, //8483 #HANGUL SYLLABLE KHIEUKH YO RIEULSIOS + {0xB346, 0xCFD1}, //8484 #HANGUL SYLLABLE KHIEUKH YO RIEULTHIEUTH + {0xB347, 0xCFD2}, //8485 #HANGUL SYLLABLE KHIEUKH YO RIEULPHIEUPH + {0xB348, 0xCFD3}, //8486 #HANGUL SYLLABLE KHIEUKH YO RIEULHIEUH + {0xB349, 0xCFD4}, //8487 #HANGUL SYLLABLE KHIEUKH YO MIEUM + {0xB34A, 0xCFD5}, //8488 #HANGUL SYLLABLE KHIEUKH YO PIEUP + {0xB34B, 0xCFD6}, //8489 #HANGUL SYLLABLE KHIEUKH YO PIEUPSIOS + {0xB34C, 0xCFD7}, //8490 #HANGUL SYLLABLE KHIEUKH YO SIOS + {0xB34D, 0xCFD8}, //8491 #HANGUL SYLLABLE KHIEUKH YO SSANGSIOS + {0xB34E, 0xCFD9}, //8492 #HANGUL SYLLABLE KHIEUKH YO IEUNG + {0xB34F, 0xCFDA}, //8493 #HANGUL SYLLABLE KHIEUKH YO CIEUC + {0xB350, 0xCFDB}, //8494 #HANGUL SYLLABLE KHIEUKH YO CHIEUCH + {0xB351, 0xCFDC}, //8495 #HANGUL SYLLABLE KHIEUKH YO KHIEUKH + {0xB352, 0xCFDD}, //8496 #HANGUL SYLLABLE KHIEUKH YO THIEUTH + {0xB353, 0xCFDE}, //8497 #HANGUL SYLLABLE KHIEUKH YO PHIEUPH + {0xB354, 0xCFDF}, //8498 #HANGUL SYLLABLE KHIEUKH YO HIEUH + {0xB355, 0xCFE2}, //8499 #HANGUL SYLLABLE KHIEUKH U SSANGKIYEOK + {0xB356, 0xCFE3}, //8500 #HANGUL SYLLABLE KHIEUKH U KIYEOKSIOS + {0xB357, 0xCFE5}, //8501 #HANGUL SYLLABLE KHIEUKH U NIEUNCIEUC + {0xB358, 0xCFE6}, //8502 #HANGUL SYLLABLE KHIEUKH U NIEUNHIEUH + {0xB359, 0xCFE7}, //8503 #HANGUL SYLLABLE KHIEUKH U TIKEUT + {0xB35A, 0xCFE9}, //8504 #HANGUL SYLLABLE KHIEUKH U RIEULKIYEOK + {0xB361, 0xCFEA}, //8505 #HANGUL SYLLABLE KHIEUKH U RIEULMIEUM + {0xB362, 0xCFEB}, //8506 #HANGUL SYLLABLE KHIEUKH U RIEULPIEUP + {0xB363, 0xCFEC}, //8507 #HANGUL SYLLABLE KHIEUKH U RIEULSIOS + {0xB364, 0xCFED}, //8508 #HANGUL SYLLABLE KHIEUKH U RIEULTHIEUTH + {0xB365, 0xCFEE}, //8509 #HANGUL SYLLABLE KHIEUKH U RIEULPHIEUPH + {0xB366, 0xCFEF}, //8510 #HANGUL SYLLABLE KHIEUKH U RIEULHIEUH + {0xB367, 0xCFF2}, //8511 #HANGUL SYLLABLE KHIEUKH U PIEUPSIOS + {0xB368, 0xCFF4}, //8512 #HANGUL SYLLABLE KHIEUKH U SSANGSIOS + {0xB369, 0xCFF6}, //8513 #HANGUL SYLLABLE KHIEUKH U CIEUC + {0xB36A, 0xCFF7}, //8514 #HANGUL SYLLABLE KHIEUKH U CHIEUCH + {0xB36B, 0xCFF8}, //8515 #HANGUL SYLLABLE KHIEUKH U KHIEUKH + {0xB36C, 0xCFF9}, //8516 #HANGUL SYLLABLE KHIEUKH U THIEUTH + {0xB36D, 0xCFFA}, //8517 #HANGUL SYLLABLE KHIEUKH U PHIEUPH + {0xB36E, 0xCFFB}, //8518 #HANGUL SYLLABLE KHIEUKH U HIEUH + {0xB36F, 0xCFFD}, //8519 #HANGUL SYLLABLE KHIEUKH WEO KIYEOK + {0xB370, 0xCFFE}, //8520 #HANGUL SYLLABLE KHIEUKH WEO SSANGKIYEOK + {0xB371, 0xCFFF}, //8521 #HANGUL SYLLABLE KHIEUKH WEO KIYEOKSIOS + {0xB372, 0xD001}, //8522 #HANGUL SYLLABLE KHIEUKH WEO NIEUNCIEUC + {0xB373, 0xD002}, //8523 #HANGUL SYLLABLE KHIEUKH WEO NIEUNHIEUH + {0xB374, 0xD003}, //8524 #HANGUL SYLLABLE KHIEUKH WEO TIKEUT + {0xB375, 0xD005}, //8525 #HANGUL SYLLABLE KHIEUKH WEO RIEULKIYEOK + {0xB376, 0xD006}, //8526 #HANGUL SYLLABLE KHIEUKH WEO RIEULMIEUM + {0xB377, 0xD007}, //8527 #HANGUL SYLLABLE KHIEUKH WEO RIEULPIEUP + {0xB378, 0xD008}, //8528 #HANGUL SYLLABLE KHIEUKH WEO RIEULSIOS + {0xB379, 0xD009}, //8529 #HANGUL SYLLABLE KHIEUKH WEO RIEULTHIEUTH + {0xB37A, 0xD00A}, //8530 #HANGUL SYLLABLE KHIEUKH WEO RIEULPHIEUPH + {0xB381, 0xD00B}, //8531 #HANGUL SYLLABLE KHIEUKH WEO RIEULHIEUH + {0xB382, 0xD00C}, //8532 #HANGUL SYLLABLE KHIEUKH WEO MIEUM + {0xB383, 0xD00D}, //8533 #HANGUL SYLLABLE KHIEUKH WEO PIEUP + {0xB384, 0xD00E}, //8534 #HANGUL SYLLABLE KHIEUKH WEO PIEUPSIOS + {0xB385, 0xD00F}, //8535 #HANGUL SYLLABLE KHIEUKH WEO SIOS + {0xB386, 0xD010}, //8536 #HANGUL SYLLABLE KHIEUKH WEO SSANGSIOS + {0xB387, 0xD012}, //8537 #HANGUL SYLLABLE KHIEUKH WEO CIEUC + {0xB388, 0xD013}, //8538 #HANGUL SYLLABLE KHIEUKH WEO CHIEUCH + {0xB389, 0xD014}, //8539 #HANGUL SYLLABLE KHIEUKH WEO KHIEUKH + {0xB38A, 0xD015}, //8540 #HANGUL SYLLABLE KHIEUKH WEO THIEUTH + {0xB38B, 0xD016}, //8541 #HANGUL SYLLABLE KHIEUKH WEO PHIEUPH + {0xB38C, 0xD017}, //8542 #HANGUL SYLLABLE KHIEUKH WEO HIEUH + {0xB38D, 0xD019}, //8543 #HANGUL SYLLABLE KHIEUKH WE KIYEOK + {0xB38E, 0xD01A}, //8544 #HANGUL SYLLABLE KHIEUKH WE SSANGKIYEOK + {0xB38F, 0xD01B}, //8545 #HANGUL SYLLABLE KHIEUKH WE KIYEOKSIOS + {0xB390, 0xD01C}, //8546 #HANGUL SYLLABLE KHIEUKH WE NIEUN + {0xB391, 0xD01D}, //8547 #HANGUL SYLLABLE KHIEUKH WE NIEUNCIEUC + {0xB392, 0xD01E}, //8548 #HANGUL SYLLABLE KHIEUKH WE NIEUNHIEUH + {0xB393, 0xD01F}, //8549 #HANGUL SYLLABLE KHIEUKH WE TIKEUT + {0xB394, 0xD020}, //8550 #HANGUL SYLLABLE KHIEUKH WE RIEUL + {0xB395, 0xD021}, //8551 #HANGUL SYLLABLE KHIEUKH WE RIEULKIYEOK + {0xB396, 0xD022}, //8552 #HANGUL SYLLABLE KHIEUKH WE RIEULMIEUM + {0xB397, 0xD023}, //8553 #HANGUL SYLLABLE KHIEUKH WE RIEULPIEUP + {0xB398, 0xD024}, //8554 #HANGUL SYLLABLE KHIEUKH WE RIEULSIOS + {0xB399, 0xD025}, //8555 #HANGUL SYLLABLE KHIEUKH WE RIEULTHIEUTH + {0xB39A, 0xD026}, //8556 #HANGUL SYLLABLE KHIEUKH WE RIEULPHIEUPH + {0xB39B, 0xD027}, //8557 #HANGUL SYLLABLE KHIEUKH WE RIEULHIEUH + {0xB39C, 0xD028}, //8558 #HANGUL SYLLABLE KHIEUKH WE MIEUM + {0xB39D, 0xD029}, //8559 #HANGUL SYLLABLE KHIEUKH WE PIEUP + {0xB39E, 0xD02A}, //8560 #HANGUL SYLLABLE KHIEUKH WE PIEUPSIOS + {0xB39F, 0xD02B}, //8561 #HANGUL SYLLABLE KHIEUKH WE SIOS + {0xB3A0, 0xD02C}, //8562 #HANGUL SYLLABLE KHIEUKH WE SSANGSIOS + {0xB3A1, 0xB05D}, //8563 #HANGUL SYLLABLE SSANGKIYEOK EU THIEUTH + {0xB3A2, 0xB07C}, //8564 #HANGUL SYLLABLE SSANGKIYEOK I + {0xB3A3, 0xB07D}, //8565 #HANGUL SYLLABLE SSANGKIYEOK I KIYEOK + {0xB3A4, 0xB080}, //8566 #HANGUL SYLLABLE SSANGKIYEOK I NIEUN + {0xB3A5, 0xB084}, //8567 #HANGUL SYLLABLE SSANGKIYEOK I RIEUL + {0xB3A6, 0xB08C}, //8568 #HANGUL SYLLABLE SSANGKIYEOK I MIEUM + {0xB3A7, 0xB08D}, //8569 #HANGUL SYLLABLE SSANGKIYEOK I PIEUP + {0xB3A8, 0xB08F}, //8570 #HANGUL SYLLABLE SSANGKIYEOK I SIOS + {0xB3A9, 0xB091}, //8571 #HANGUL SYLLABLE SSANGKIYEOK I IEUNG + {0xB3AA, 0xB098}, //8572 #HANGUL SYLLABLE NIEUN A + {0xB3AB, 0xB099}, //8573 #HANGUL SYLLABLE NIEUN A KIYEOK + {0xB3AC, 0xB09A}, //8574 #HANGUL SYLLABLE NIEUN A SSANGKIYEOK + {0xB3AD, 0xB09C}, //8575 #HANGUL SYLLABLE NIEUN A NIEUN + {0xB3AE, 0xB09F}, //8576 #HANGUL SYLLABLE NIEUN A TIKEUT + {0xB3AF, 0xB0A0}, //8577 #HANGUL SYLLABLE NIEUN A RIEUL + {0xB3B0, 0xB0A1}, //8578 #HANGUL SYLLABLE NIEUN A RIEULKIYEOK + {0xB3B1, 0xB0A2}, //8579 #HANGUL SYLLABLE NIEUN A RIEULMIEUM + {0xB3B2, 0xB0A8}, //8580 #HANGUL SYLLABLE NIEUN A MIEUM + {0xB3B3, 0xB0A9}, //8581 #HANGUL SYLLABLE NIEUN A PIEUP + {0xB3B4, 0xB0AB}, //8582 #HANGUL SYLLABLE NIEUN A SIOS + {0xB3B5, 0xB0AC}, //8583 #HANGUL SYLLABLE NIEUN A SSANGSIOS + {0xB3B6, 0xB0AD}, //8584 #HANGUL SYLLABLE NIEUN A IEUNG + {0xB3B7, 0xB0AE}, //8585 #HANGUL SYLLABLE NIEUN A CIEUC + {0xB3B8, 0xB0AF}, //8586 #HANGUL SYLLABLE NIEUN A CHIEUCH + {0xB3B9, 0xB0B1}, //8587 #HANGUL SYLLABLE NIEUN A THIEUTH + {0xB3BA, 0xB0B3}, //8588 #HANGUL SYLLABLE NIEUN A HIEUH + {0xB3BB, 0xB0B4}, //8589 #HANGUL SYLLABLE NIEUN AE + {0xB3BC, 0xB0B5}, //8590 #HANGUL SYLLABLE NIEUN AE KIYEOK + {0xB3BD, 0xB0B8}, //8591 #HANGUL SYLLABLE NIEUN AE NIEUN + {0xB3BE, 0xB0BC}, //8592 #HANGUL SYLLABLE NIEUN AE RIEUL + {0xB3BF, 0xB0C4}, //8593 #HANGUL SYLLABLE NIEUN AE MIEUM + {0xB3C0, 0xB0C5}, //8594 #HANGUL SYLLABLE NIEUN AE PIEUP + {0xB3C1, 0xB0C7}, //8595 #HANGUL SYLLABLE NIEUN AE SIOS + {0xB3C2, 0xB0C8}, //8596 #HANGUL SYLLABLE NIEUN AE SSANGSIOS + {0xB3C3, 0xB0C9}, //8597 #HANGUL SYLLABLE NIEUN AE IEUNG + {0xB3C4, 0xB0D0}, //8598 #HANGUL SYLLABLE NIEUN YA + {0xB3C5, 0xB0D1}, //8599 #HANGUL SYLLABLE NIEUN YA KIYEOK + {0xB3C6, 0xB0D4}, //8600 #HANGUL SYLLABLE NIEUN YA NIEUN + {0xB3C7, 0xB0D8}, //8601 #HANGUL SYLLABLE NIEUN YA RIEUL + {0xB3C8, 0xB0E0}, //8602 #HANGUL SYLLABLE NIEUN YA MIEUM + {0xB3C9, 0xB0E5}, //8603 #HANGUL SYLLABLE NIEUN YA IEUNG + {0xB3CA, 0xB108}, //8604 #HANGUL SYLLABLE NIEUN EO + {0xB3CB, 0xB109}, //8605 #HANGUL SYLLABLE NIEUN EO KIYEOK + {0xB3CC, 0xB10B}, //8606 #HANGUL SYLLABLE NIEUN EO KIYEOKSIOS + {0xB3CD, 0xB10C}, //8607 #HANGUL SYLLABLE NIEUN EO NIEUN + {0xB3CE, 0xB110}, //8608 #HANGUL SYLLABLE NIEUN EO RIEUL + {0xB3CF, 0xB112}, //8609 #HANGUL SYLLABLE NIEUN EO RIEULMIEUM + {0xB3D0, 0xB113}, //8610 #HANGUL SYLLABLE NIEUN EO RIEULPIEUP + {0xB3D1, 0xB118}, //8611 #HANGUL SYLLABLE NIEUN EO MIEUM + {0xB3D2, 0xB119}, //8612 #HANGUL SYLLABLE NIEUN EO PIEUP + {0xB3D3, 0xB11B}, //8613 #HANGUL SYLLABLE NIEUN EO SIOS + {0xB3D4, 0xB11C}, //8614 #HANGUL SYLLABLE NIEUN EO SSANGSIOS + {0xB3D5, 0xB11D}, //8615 #HANGUL SYLLABLE NIEUN EO IEUNG + {0xB3D6, 0xB123}, //8616 #HANGUL SYLLABLE NIEUN EO HIEUH + {0xB3D7, 0xB124}, //8617 #HANGUL SYLLABLE NIEUN E + {0xB3D8, 0xB125}, //8618 #HANGUL SYLLABLE NIEUN E KIYEOK + {0xB3D9, 0xB128}, //8619 #HANGUL SYLLABLE NIEUN E NIEUN + {0xB3DA, 0xB12C}, //8620 #HANGUL SYLLABLE NIEUN E RIEUL + {0xB3DB, 0xB134}, //8621 #HANGUL SYLLABLE NIEUN E MIEUM + {0xB3DC, 0xB135}, //8622 #HANGUL SYLLABLE NIEUN E PIEUP + {0xB3DD, 0xB137}, //8623 #HANGUL SYLLABLE NIEUN E SIOS + {0xB3DE, 0xB138}, //8624 #HANGUL SYLLABLE NIEUN E SSANGSIOS + {0xB3DF, 0xB139}, //8625 #HANGUL SYLLABLE NIEUN E IEUNG + {0xB3E0, 0xB140}, //8626 #HANGUL SYLLABLE NIEUN YEO + {0xB3E1, 0xB141}, //8627 #HANGUL SYLLABLE NIEUN YEO KIYEOK + {0xB3E2, 0xB144}, //8628 #HANGUL SYLLABLE NIEUN YEO NIEUN + {0xB3E3, 0xB148}, //8629 #HANGUL SYLLABLE NIEUN YEO RIEUL + {0xB3E4, 0xB150}, //8630 #HANGUL SYLLABLE NIEUN YEO MIEUM + {0xB3E5, 0xB151}, //8631 #HANGUL SYLLABLE NIEUN YEO PIEUP + {0xB3E6, 0xB154}, //8632 #HANGUL SYLLABLE NIEUN YEO SSANGSIOS + {0xB3E7, 0xB155}, //8633 #HANGUL SYLLABLE NIEUN YEO IEUNG + {0xB3E8, 0xB158}, //8634 #HANGUL SYLLABLE NIEUN YEO KHIEUKH + {0xB3E9, 0xB15C}, //8635 #HANGUL SYLLABLE NIEUN YE + {0xB3EA, 0xB160}, //8636 #HANGUL SYLLABLE NIEUN YE NIEUN + {0xB3EB, 0xB178}, //8637 #HANGUL SYLLABLE NIEUN O + {0xB3EC, 0xB179}, //8638 #HANGUL SYLLABLE NIEUN O KIYEOK + {0xB3ED, 0xB17C}, //8639 #HANGUL SYLLABLE NIEUN O NIEUN + {0xB3EE, 0xB180}, //8640 #HANGUL SYLLABLE NIEUN O RIEUL + {0xB3EF, 0xB182}, //8641 #HANGUL SYLLABLE NIEUN O RIEULMIEUM + {0xB3F0, 0xB188}, //8642 #HANGUL SYLLABLE NIEUN O MIEUM + {0xB3F1, 0xB189}, //8643 #HANGUL SYLLABLE NIEUN O PIEUP + {0xB3F2, 0xB18B}, //8644 #HANGUL SYLLABLE NIEUN O SIOS + {0xB3F3, 0xB18D}, //8645 #HANGUL SYLLABLE NIEUN O IEUNG + {0xB3F4, 0xB192}, //8646 #HANGUL SYLLABLE NIEUN O PHIEUPH + {0xB3F5, 0xB193}, //8647 #HANGUL SYLLABLE NIEUN O HIEUH + {0xB3F6, 0xB194}, //8648 #HANGUL SYLLABLE NIEUN WA + {0xB3F7, 0xB198}, //8649 #HANGUL SYLLABLE NIEUN WA NIEUN + {0xB3F8, 0xB19C}, //8650 #HANGUL SYLLABLE NIEUN WA RIEUL + {0xB3F9, 0xB1A8}, //8651 #HANGUL SYLLABLE NIEUN WA SSANGSIOS + {0xB3FA, 0xB1CC}, //8652 #HANGUL SYLLABLE NIEUN OE + {0xB3FB, 0xB1D0}, //8653 #HANGUL SYLLABLE NIEUN OE NIEUN + {0xB3FC, 0xB1D4}, //8654 #HANGUL SYLLABLE NIEUN OE RIEUL + {0xB3FD, 0xB1DC}, //8655 #HANGUL SYLLABLE NIEUN OE MIEUM + {0xB3FE, 0xB1DD}, //8656 #HANGUL SYLLABLE NIEUN OE PIEUP + {0xB441, 0xD02E}, //8657 #HANGUL SYLLABLE KHIEUKH WE CIEUC + {0xB442, 0xD02F}, //8658 #HANGUL SYLLABLE KHIEUKH WE CHIEUCH + {0xB443, 0xD030}, //8659 #HANGUL SYLLABLE KHIEUKH WE KHIEUKH + {0xB444, 0xD031}, //8660 #HANGUL SYLLABLE KHIEUKH WE THIEUTH + {0xB445, 0xD032}, //8661 #HANGUL SYLLABLE KHIEUKH WE PHIEUPH + {0xB446, 0xD033}, //8662 #HANGUL SYLLABLE KHIEUKH WE HIEUH + {0xB447, 0xD036}, //8663 #HANGUL SYLLABLE KHIEUKH WI SSANGKIYEOK + {0xB448, 0xD037}, //8664 #HANGUL SYLLABLE KHIEUKH WI KIYEOKSIOS + {0xB449, 0xD039}, //8665 #HANGUL SYLLABLE KHIEUKH WI NIEUNCIEUC + {0xB44A, 0xD03A}, //8666 #HANGUL SYLLABLE KHIEUKH WI NIEUNHIEUH + {0xB44B, 0xD03B}, //8667 #HANGUL SYLLABLE KHIEUKH WI TIKEUT + {0xB44C, 0xD03D}, //8668 #HANGUL SYLLABLE KHIEUKH WI RIEULKIYEOK + {0xB44D, 0xD03E}, //8669 #HANGUL SYLLABLE KHIEUKH WI RIEULMIEUM + {0xB44E, 0xD03F}, //8670 #HANGUL SYLLABLE KHIEUKH WI RIEULPIEUP + {0xB44F, 0xD040}, //8671 #HANGUL SYLLABLE KHIEUKH WI RIEULSIOS + {0xB450, 0xD041}, //8672 #HANGUL SYLLABLE KHIEUKH WI RIEULTHIEUTH + {0xB451, 0xD042}, //8673 #HANGUL SYLLABLE KHIEUKH WI RIEULPHIEUPH + {0xB452, 0xD043}, //8674 #HANGUL SYLLABLE KHIEUKH WI RIEULHIEUH + {0xB453, 0xD046}, //8675 #HANGUL SYLLABLE KHIEUKH WI PIEUPSIOS + {0xB454, 0xD048}, //8676 #HANGUL SYLLABLE KHIEUKH WI SSANGSIOS + {0xB455, 0xD04A}, //8677 #HANGUL SYLLABLE KHIEUKH WI CIEUC + {0xB456, 0xD04B}, //8678 #HANGUL SYLLABLE KHIEUKH WI CHIEUCH + {0xB457, 0xD04C}, //8679 #HANGUL SYLLABLE KHIEUKH WI KHIEUKH + {0xB458, 0xD04D}, //8680 #HANGUL SYLLABLE KHIEUKH WI THIEUTH + {0xB459, 0xD04E}, //8681 #HANGUL SYLLABLE KHIEUKH WI PHIEUPH + {0xB45A, 0xD04F}, //8682 #HANGUL SYLLABLE KHIEUKH WI HIEUH + {0xB461, 0xD051}, //8683 #HANGUL SYLLABLE KHIEUKH YU KIYEOK + {0xB462, 0xD052}, //8684 #HANGUL SYLLABLE KHIEUKH YU SSANGKIYEOK + {0xB463, 0xD053}, //8685 #HANGUL SYLLABLE KHIEUKH YU KIYEOKSIOS + {0xB464, 0xD055}, //8686 #HANGUL SYLLABLE KHIEUKH YU NIEUNCIEUC + {0xB465, 0xD056}, //8687 #HANGUL SYLLABLE KHIEUKH YU NIEUNHIEUH + {0xB466, 0xD057}, //8688 #HANGUL SYLLABLE KHIEUKH YU TIKEUT + {0xB467, 0xD059}, //8689 #HANGUL SYLLABLE KHIEUKH YU RIEULKIYEOK + {0xB468, 0xD05A}, //8690 #HANGUL SYLLABLE KHIEUKH YU RIEULMIEUM + {0xB469, 0xD05B}, //8691 #HANGUL SYLLABLE KHIEUKH YU RIEULPIEUP + {0xB46A, 0xD05C}, //8692 #HANGUL SYLLABLE KHIEUKH YU RIEULSIOS + {0xB46B, 0xD05D}, //8693 #HANGUL SYLLABLE KHIEUKH YU RIEULTHIEUTH + {0xB46C, 0xD05E}, //8694 #HANGUL SYLLABLE KHIEUKH YU RIEULPHIEUPH + {0xB46D, 0xD05F}, //8695 #HANGUL SYLLABLE KHIEUKH YU RIEULHIEUH + {0xB46E, 0xD061}, //8696 #HANGUL SYLLABLE KHIEUKH YU PIEUP + {0xB46F, 0xD062}, //8697 #HANGUL SYLLABLE KHIEUKH YU PIEUPSIOS + {0xB470, 0xD063}, //8698 #HANGUL SYLLABLE KHIEUKH YU SIOS + {0xB471, 0xD064}, //8699 #HANGUL SYLLABLE KHIEUKH YU SSANGSIOS + {0xB472, 0xD065}, //8700 #HANGUL SYLLABLE KHIEUKH YU IEUNG + {0xB473, 0xD066}, //8701 #HANGUL SYLLABLE KHIEUKH YU CIEUC + {0xB474, 0xD067}, //8702 #HANGUL SYLLABLE KHIEUKH YU CHIEUCH + {0xB475, 0xD068}, //8703 #HANGUL SYLLABLE KHIEUKH YU KHIEUKH + {0xB476, 0xD069}, //8704 #HANGUL SYLLABLE KHIEUKH YU THIEUTH + {0xB477, 0xD06A}, //8705 #HANGUL SYLLABLE KHIEUKH YU PHIEUPH + {0xB478, 0xD06B}, //8706 #HANGUL SYLLABLE KHIEUKH YU HIEUH + {0xB479, 0xD06E}, //8707 #HANGUL SYLLABLE KHIEUKH EU SSANGKIYEOK + {0xB47A, 0xD06F}, //8708 #HANGUL SYLLABLE KHIEUKH EU KIYEOKSIOS + {0xB481, 0xD071}, //8709 #HANGUL SYLLABLE KHIEUKH EU NIEUNCIEUC + {0xB482, 0xD072}, //8710 #HANGUL SYLLABLE KHIEUKH EU NIEUNHIEUH + {0xB483, 0xD073}, //8711 #HANGUL SYLLABLE KHIEUKH EU TIKEUT + {0xB484, 0xD075}, //8712 #HANGUL SYLLABLE KHIEUKH EU RIEULKIYEOK + {0xB485, 0xD076}, //8713 #HANGUL SYLLABLE KHIEUKH EU RIEULMIEUM + {0xB486, 0xD077}, //8714 #HANGUL SYLLABLE KHIEUKH EU RIEULPIEUP + {0xB487, 0xD078}, //8715 #HANGUL SYLLABLE KHIEUKH EU RIEULSIOS + {0xB488, 0xD079}, //8716 #HANGUL SYLLABLE KHIEUKH EU RIEULTHIEUTH + {0xB489, 0xD07A}, //8717 #HANGUL SYLLABLE KHIEUKH EU RIEULPHIEUPH + {0xB48A, 0xD07B}, //8718 #HANGUL SYLLABLE KHIEUKH EU RIEULHIEUH + {0xB48B, 0xD07E}, //8719 #HANGUL SYLLABLE KHIEUKH EU PIEUPSIOS + {0xB48C, 0xD07F}, //8720 #HANGUL SYLLABLE KHIEUKH EU SIOS + {0xB48D, 0xD080}, //8721 #HANGUL SYLLABLE KHIEUKH EU SSANGSIOS + {0xB48E, 0xD082}, //8722 #HANGUL SYLLABLE KHIEUKH EU CIEUC + {0xB48F, 0xD083}, //8723 #HANGUL SYLLABLE KHIEUKH EU CHIEUCH + {0xB490, 0xD084}, //8724 #HANGUL SYLLABLE KHIEUKH EU KHIEUKH + {0xB491, 0xD085}, //8725 #HANGUL SYLLABLE KHIEUKH EU THIEUTH + {0xB492, 0xD086}, //8726 #HANGUL SYLLABLE KHIEUKH EU PHIEUPH + {0xB493, 0xD087}, //8727 #HANGUL SYLLABLE KHIEUKH EU HIEUH + {0xB494, 0xD088}, //8728 #HANGUL SYLLABLE KHIEUKH YI + {0xB495, 0xD089}, //8729 #HANGUL SYLLABLE KHIEUKH YI KIYEOK + {0xB496, 0xD08A}, //8730 #HANGUL SYLLABLE KHIEUKH YI SSANGKIYEOK + {0xB497, 0xD08B}, //8731 #HANGUL SYLLABLE KHIEUKH YI KIYEOKSIOS + {0xB498, 0xD08C}, //8732 #HANGUL SYLLABLE KHIEUKH YI NIEUN + {0xB499, 0xD08D}, //8733 #HANGUL SYLLABLE KHIEUKH YI NIEUNCIEUC + {0xB49A, 0xD08E}, //8734 #HANGUL SYLLABLE KHIEUKH YI NIEUNHIEUH + {0xB49B, 0xD08F}, //8735 #HANGUL SYLLABLE KHIEUKH YI TIKEUT + {0xB49C, 0xD090}, //8736 #HANGUL SYLLABLE KHIEUKH YI RIEUL + {0xB49D, 0xD091}, //8737 #HANGUL SYLLABLE KHIEUKH YI RIEULKIYEOK + {0xB49E, 0xD092}, //8738 #HANGUL SYLLABLE KHIEUKH YI RIEULMIEUM + {0xB49F, 0xD093}, //8739 #HANGUL SYLLABLE KHIEUKH YI RIEULPIEUP + {0xB4A0, 0xD094}, //8740 #HANGUL SYLLABLE KHIEUKH YI RIEULSIOS + {0xB4A1, 0xB1DF}, //8741 #HANGUL SYLLABLE NIEUN OE SIOS + {0xB4A2, 0xB1E8}, //8742 #HANGUL SYLLABLE NIEUN YO + {0xB4A3, 0xB1E9}, //8743 #HANGUL SYLLABLE NIEUN YO KIYEOK + {0xB4A4, 0xB1EC}, //8744 #HANGUL SYLLABLE NIEUN YO NIEUN + {0xB4A5, 0xB1F0}, //8745 #HANGUL SYLLABLE NIEUN YO RIEUL + {0xB4A6, 0xB1F9}, //8746 #HANGUL SYLLABLE NIEUN YO PIEUP + {0xB4A7, 0xB1FB}, //8747 #HANGUL SYLLABLE NIEUN YO SIOS + {0xB4A8, 0xB1FD}, //8748 #HANGUL SYLLABLE NIEUN YO IEUNG + {0xB4A9, 0xB204}, //8749 #HANGUL SYLLABLE NIEUN U + {0xB4AA, 0xB205}, //8750 #HANGUL SYLLABLE NIEUN U KIYEOK + {0xB4AB, 0xB208}, //8751 #HANGUL SYLLABLE NIEUN U NIEUN + {0xB4AC, 0xB20B}, //8752 #HANGUL SYLLABLE NIEUN U TIKEUT + {0xB4AD, 0xB20C}, //8753 #HANGUL SYLLABLE NIEUN U RIEUL + {0xB4AE, 0xB214}, //8754 #HANGUL SYLLABLE NIEUN U MIEUM + {0xB4AF, 0xB215}, //8755 #HANGUL SYLLABLE NIEUN U PIEUP + {0xB4B0, 0xB217}, //8756 #HANGUL SYLLABLE NIEUN U SIOS + {0xB4B1, 0xB219}, //8757 #HANGUL SYLLABLE NIEUN U IEUNG + {0xB4B2, 0xB220}, //8758 #HANGUL SYLLABLE NIEUN WEO + {0xB4B3, 0xB234}, //8759 #HANGUL SYLLABLE NIEUN WEO SSANGSIOS + {0xB4B4, 0xB23C}, //8760 #HANGUL SYLLABLE NIEUN WE + {0xB4B5, 0xB258}, //8761 #HANGUL SYLLABLE NIEUN WI + {0xB4B6, 0xB25C}, //8762 #HANGUL SYLLABLE NIEUN WI NIEUN + {0xB4B7, 0xB260}, //8763 #HANGUL SYLLABLE NIEUN WI RIEUL + {0xB4B8, 0xB268}, //8764 #HANGUL SYLLABLE NIEUN WI MIEUM + {0xB4B9, 0xB269}, //8765 #HANGUL SYLLABLE NIEUN WI PIEUP + {0xB4BA, 0xB274}, //8766 #HANGUL SYLLABLE NIEUN YU + {0xB4BB, 0xB275}, //8767 #HANGUL SYLLABLE NIEUN YU KIYEOK + {0xB4BC, 0xB27C}, //8768 #HANGUL SYLLABLE NIEUN YU RIEUL + {0xB4BD, 0xB284}, //8769 #HANGUL SYLLABLE NIEUN YU MIEUM + {0xB4BE, 0xB285}, //8770 #HANGUL SYLLABLE NIEUN YU PIEUP + {0xB4BF, 0xB289}, //8771 #HANGUL SYLLABLE NIEUN YU IEUNG + {0xB4C0, 0xB290}, //8772 #HANGUL SYLLABLE NIEUN EU + {0xB4C1, 0xB291}, //8773 #HANGUL SYLLABLE NIEUN EU KIYEOK + {0xB4C2, 0xB294}, //8774 #HANGUL SYLLABLE NIEUN EU NIEUN + {0xB4C3, 0xB298}, //8775 #HANGUL SYLLABLE NIEUN EU RIEUL + {0xB4C4, 0xB299}, //8776 #HANGUL SYLLABLE NIEUN EU RIEULKIYEOK + {0xB4C5, 0xB29A}, //8777 #HANGUL SYLLABLE NIEUN EU RIEULMIEUM + {0xB4C6, 0xB2A0}, //8778 #HANGUL SYLLABLE NIEUN EU MIEUM + {0xB4C7, 0xB2A1}, //8779 #HANGUL SYLLABLE NIEUN EU PIEUP + {0xB4C8, 0xB2A3}, //8780 #HANGUL SYLLABLE NIEUN EU SIOS + {0xB4C9, 0xB2A5}, //8781 #HANGUL SYLLABLE NIEUN EU IEUNG + {0xB4CA, 0xB2A6}, //8782 #HANGUL SYLLABLE NIEUN EU CIEUC + {0xB4CB, 0xB2AA}, //8783 #HANGUL SYLLABLE NIEUN EU PHIEUPH + {0xB4CC, 0xB2AC}, //8784 #HANGUL SYLLABLE NIEUN YI + {0xB4CD, 0xB2B0}, //8785 #HANGUL SYLLABLE NIEUN YI NIEUN + {0xB4CE, 0xB2B4}, //8786 #HANGUL SYLLABLE NIEUN YI RIEUL + {0xB4CF, 0xB2C8}, //8787 #HANGUL SYLLABLE NIEUN I + {0xB4D0, 0xB2C9}, //8788 #HANGUL SYLLABLE NIEUN I KIYEOK + {0xB4D1, 0xB2CC}, //8789 #HANGUL SYLLABLE NIEUN I NIEUN + {0xB4D2, 0xB2D0}, //8790 #HANGUL SYLLABLE NIEUN I RIEUL + {0xB4D3, 0xB2D2}, //8791 #HANGUL SYLLABLE NIEUN I RIEULMIEUM + {0xB4D4, 0xB2D8}, //8792 #HANGUL SYLLABLE NIEUN I MIEUM + {0xB4D5, 0xB2D9}, //8793 #HANGUL SYLLABLE NIEUN I PIEUP + {0xB4D6, 0xB2DB}, //8794 #HANGUL SYLLABLE NIEUN I SIOS + {0xB4D7, 0xB2DD}, //8795 #HANGUL SYLLABLE NIEUN I IEUNG + {0xB4D8, 0xB2E2}, //8796 #HANGUL SYLLABLE NIEUN I PHIEUPH + {0xB4D9, 0xB2E4}, //8797 #HANGUL SYLLABLE TIKEUT A + {0xB4DA, 0xB2E5}, //8798 #HANGUL SYLLABLE TIKEUT A KIYEOK + {0xB4DB, 0xB2E6}, //8799 #HANGUL SYLLABLE TIKEUT A SSANGKIYEOK + {0xB4DC, 0xB2E8}, //8800 #HANGUL SYLLABLE TIKEUT A NIEUN + {0xB4DD, 0xB2EB}, //8801 #HANGUL SYLLABLE TIKEUT A TIKEUT + {0xB4DE, 0xB2EC}, //8802 #HANGUL SYLLABLE TIKEUT A RIEUL + {0xB4DF, 0xB2ED}, //8803 #HANGUL SYLLABLE TIKEUT A RIEULKIYEOK + {0xB4E0, 0xB2EE}, //8804 #HANGUL SYLLABLE TIKEUT A RIEULMIEUM + {0xB4E1, 0xB2EF}, //8805 #HANGUL SYLLABLE TIKEUT A RIEULPIEUP + {0xB4E2, 0xB2F3}, //8806 #HANGUL SYLLABLE TIKEUT A RIEULHIEUH + {0xB4E3, 0xB2F4}, //8807 #HANGUL SYLLABLE TIKEUT A MIEUM + {0xB4E4, 0xB2F5}, //8808 #HANGUL SYLLABLE TIKEUT A PIEUP + {0xB4E5, 0xB2F7}, //8809 #HANGUL SYLLABLE TIKEUT A SIOS + {0xB4E6, 0xB2F8}, //8810 #HANGUL SYLLABLE TIKEUT A SSANGSIOS + {0xB4E7, 0xB2F9}, //8811 #HANGUL SYLLABLE TIKEUT A IEUNG + {0xB4E8, 0xB2FA}, //8812 #HANGUL SYLLABLE TIKEUT A CIEUC + {0xB4E9, 0xB2FB}, //8813 #HANGUL SYLLABLE TIKEUT A CHIEUCH + {0xB4EA, 0xB2FF}, //8814 #HANGUL SYLLABLE TIKEUT A HIEUH + {0xB4EB, 0xB300}, //8815 #HANGUL SYLLABLE TIKEUT AE + {0xB4EC, 0xB301}, //8816 #HANGUL SYLLABLE TIKEUT AE KIYEOK + {0xB4ED, 0xB304}, //8817 #HANGUL SYLLABLE TIKEUT AE NIEUN + {0xB4EE, 0xB308}, //8818 #HANGUL SYLLABLE TIKEUT AE RIEUL + {0xB4EF, 0xB310}, //8819 #HANGUL SYLLABLE TIKEUT AE MIEUM + {0xB4F0, 0xB311}, //8820 #HANGUL SYLLABLE TIKEUT AE PIEUP + {0xB4F1, 0xB313}, //8821 #HANGUL SYLLABLE TIKEUT AE SIOS + {0xB4F2, 0xB314}, //8822 #HANGUL SYLLABLE TIKEUT AE SSANGSIOS + {0xB4F3, 0xB315}, //8823 #HANGUL SYLLABLE TIKEUT AE IEUNG + {0xB4F4, 0xB31C}, //8824 #HANGUL SYLLABLE TIKEUT YA + {0xB4F5, 0xB354}, //8825 #HANGUL SYLLABLE TIKEUT EO + {0xB4F6, 0xB355}, //8826 #HANGUL SYLLABLE TIKEUT EO KIYEOK + {0xB4F7, 0xB356}, //8827 #HANGUL SYLLABLE TIKEUT EO SSANGKIYEOK + {0xB4F8, 0xB358}, //8828 #HANGUL SYLLABLE TIKEUT EO NIEUN + {0xB4F9, 0xB35B}, //8829 #HANGUL SYLLABLE TIKEUT EO TIKEUT + {0xB4FA, 0xB35C}, //8830 #HANGUL SYLLABLE TIKEUT EO RIEUL + {0xB4FB, 0xB35E}, //8831 #HANGUL SYLLABLE TIKEUT EO RIEULMIEUM + {0xB4FC, 0xB35F}, //8832 #HANGUL SYLLABLE TIKEUT EO RIEULPIEUP + {0xB4FD, 0xB364}, //8833 #HANGUL SYLLABLE TIKEUT EO MIEUM + {0xB4FE, 0xB365}, //8834 #HANGUL SYLLABLE TIKEUT EO PIEUP + {0xB541, 0xD095}, //8835 #HANGUL SYLLABLE KHIEUKH YI RIEULTHIEUTH + {0xB542, 0xD096}, //8836 #HANGUL SYLLABLE KHIEUKH YI RIEULPHIEUPH + {0xB543, 0xD097}, //8837 #HANGUL SYLLABLE KHIEUKH YI RIEULHIEUH + {0xB544, 0xD098}, //8838 #HANGUL SYLLABLE KHIEUKH YI MIEUM + {0xB545, 0xD099}, //8839 #HANGUL SYLLABLE KHIEUKH YI PIEUP + {0xB546, 0xD09A}, //8840 #HANGUL SYLLABLE KHIEUKH YI PIEUPSIOS + {0xB547, 0xD09B}, //8841 #HANGUL SYLLABLE KHIEUKH YI SIOS + {0xB548, 0xD09C}, //8842 #HANGUL SYLLABLE KHIEUKH YI SSANGSIOS + {0xB549, 0xD09D}, //8843 #HANGUL SYLLABLE KHIEUKH YI IEUNG + {0xB54A, 0xD09E}, //8844 #HANGUL SYLLABLE KHIEUKH YI CIEUC + {0xB54B, 0xD09F}, //8845 #HANGUL SYLLABLE KHIEUKH YI CHIEUCH + {0xB54C, 0xD0A0}, //8846 #HANGUL SYLLABLE KHIEUKH YI KHIEUKH + {0xB54D, 0xD0A1}, //8847 #HANGUL SYLLABLE KHIEUKH YI THIEUTH + {0xB54E, 0xD0A2}, //8848 #HANGUL SYLLABLE KHIEUKH YI PHIEUPH + {0xB54F, 0xD0A3}, //8849 #HANGUL SYLLABLE KHIEUKH YI HIEUH + {0xB550, 0xD0A6}, //8850 #HANGUL SYLLABLE KHIEUKH I SSANGKIYEOK + {0xB551, 0xD0A7}, //8851 #HANGUL SYLLABLE KHIEUKH I KIYEOKSIOS + {0xB552, 0xD0A9}, //8852 #HANGUL SYLLABLE KHIEUKH I NIEUNCIEUC + {0xB553, 0xD0AA}, //8853 #HANGUL SYLLABLE KHIEUKH I NIEUNHIEUH + {0xB554, 0xD0AB}, //8854 #HANGUL SYLLABLE KHIEUKH I TIKEUT + {0xB555, 0xD0AD}, //8855 #HANGUL SYLLABLE KHIEUKH I RIEULKIYEOK + {0xB556, 0xD0AE}, //8856 #HANGUL SYLLABLE KHIEUKH I RIEULMIEUM + {0xB557, 0xD0AF}, //8857 #HANGUL SYLLABLE KHIEUKH I RIEULPIEUP + {0xB558, 0xD0B0}, //8858 #HANGUL SYLLABLE KHIEUKH I RIEULSIOS + {0xB559, 0xD0B1}, //8859 #HANGUL SYLLABLE KHIEUKH I RIEULTHIEUTH + {0xB55A, 0xD0B2}, //8860 #HANGUL SYLLABLE KHIEUKH I RIEULPHIEUPH + {0xB561, 0xD0B3}, //8861 #HANGUL SYLLABLE KHIEUKH I RIEULHIEUH + {0xB562, 0xD0B6}, //8862 #HANGUL SYLLABLE KHIEUKH I PIEUPSIOS + {0xB563, 0xD0B8}, //8863 #HANGUL SYLLABLE KHIEUKH I SSANGSIOS + {0xB564, 0xD0BA}, //8864 #HANGUL SYLLABLE KHIEUKH I CIEUC + {0xB565, 0xD0BB}, //8865 #HANGUL SYLLABLE KHIEUKH I CHIEUCH + {0xB566, 0xD0BC}, //8866 #HANGUL SYLLABLE KHIEUKH I KHIEUKH + {0xB567, 0xD0BD}, //8867 #HANGUL SYLLABLE KHIEUKH I THIEUTH + {0xB568, 0xD0BE}, //8868 #HANGUL SYLLABLE KHIEUKH I PHIEUPH + {0xB569, 0xD0BF}, //8869 #HANGUL SYLLABLE KHIEUKH I HIEUH + {0xB56A, 0xD0C2}, //8870 #HANGUL SYLLABLE THIEUTH A SSANGKIYEOK + {0xB56B, 0xD0C3}, //8871 #HANGUL SYLLABLE THIEUTH A KIYEOKSIOS + {0xB56C, 0xD0C5}, //8872 #HANGUL SYLLABLE THIEUTH A NIEUNCIEUC + {0xB56D, 0xD0C6}, //8873 #HANGUL SYLLABLE THIEUTH A NIEUNHIEUH + {0xB56E, 0xD0C7}, //8874 #HANGUL SYLLABLE THIEUTH A TIKEUT + {0xB56F, 0xD0CA}, //8875 #HANGUL SYLLABLE THIEUTH A RIEULMIEUM + {0xB570, 0xD0CB}, //8876 #HANGUL SYLLABLE THIEUTH A RIEULPIEUP + {0xB571, 0xD0CC}, //8877 #HANGUL SYLLABLE THIEUTH A RIEULSIOS + {0xB572, 0xD0CD}, //8878 #HANGUL SYLLABLE THIEUTH A RIEULTHIEUTH + {0xB573, 0xD0CE}, //8879 #HANGUL SYLLABLE THIEUTH A RIEULPHIEUPH + {0xB574, 0xD0CF}, //8880 #HANGUL SYLLABLE THIEUTH A RIEULHIEUH + {0xB575, 0xD0D2}, //8881 #HANGUL SYLLABLE THIEUTH A PIEUPSIOS + {0xB576, 0xD0D6}, //8882 #HANGUL SYLLABLE THIEUTH A CIEUC + {0xB577, 0xD0D7}, //8883 #HANGUL SYLLABLE THIEUTH A CHIEUCH + {0xB578, 0xD0D8}, //8884 #HANGUL SYLLABLE THIEUTH A KHIEUKH + {0xB579, 0xD0D9}, //8885 #HANGUL SYLLABLE THIEUTH A THIEUTH + {0xB57A, 0xD0DA}, //8886 #HANGUL SYLLABLE THIEUTH A PHIEUPH + {0xB581, 0xD0DB}, //8887 #HANGUL SYLLABLE THIEUTH A HIEUH + {0xB582, 0xD0DE}, //8888 #HANGUL SYLLABLE THIEUTH AE SSANGKIYEOK + {0xB583, 0xD0DF}, //8889 #HANGUL SYLLABLE THIEUTH AE KIYEOKSIOS + {0xB584, 0xD0E1}, //8890 #HANGUL SYLLABLE THIEUTH AE NIEUNCIEUC + {0xB585, 0xD0E2}, //8891 #HANGUL SYLLABLE THIEUTH AE NIEUNHIEUH + {0xB586, 0xD0E3}, //8892 #HANGUL SYLLABLE THIEUTH AE TIKEUT + {0xB587, 0xD0E5}, //8893 #HANGUL SYLLABLE THIEUTH AE RIEULKIYEOK + {0xB588, 0xD0E6}, //8894 #HANGUL SYLLABLE THIEUTH AE RIEULMIEUM + {0xB589, 0xD0E7}, //8895 #HANGUL SYLLABLE THIEUTH AE RIEULPIEUP + {0xB58A, 0xD0E8}, //8896 #HANGUL SYLLABLE THIEUTH AE RIEULSIOS + {0xB58B, 0xD0E9}, //8897 #HANGUL SYLLABLE THIEUTH AE RIEULTHIEUTH + {0xB58C, 0xD0EA}, //8898 #HANGUL SYLLABLE THIEUTH AE RIEULPHIEUPH + {0xB58D, 0xD0EB}, //8899 #HANGUL SYLLABLE THIEUTH AE RIEULHIEUH + {0xB58E, 0xD0EE}, //8900 #HANGUL SYLLABLE THIEUTH AE PIEUPSIOS + {0xB58F, 0xD0F2}, //8901 #HANGUL SYLLABLE THIEUTH AE CIEUC + {0xB590, 0xD0F3}, //8902 #HANGUL SYLLABLE THIEUTH AE CHIEUCH + {0xB591, 0xD0F4}, //8903 #HANGUL SYLLABLE THIEUTH AE KHIEUKH + {0xB592, 0xD0F5}, //8904 #HANGUL SYLLABLE THIEUTH AE THIEUTH + {0xB593, 0xD0F6}, //8905 #HANGUL SYLLABLE THIEUTH AE PHIEUPH + {0xB594, 0xD0F7}, //8906 #HANGUL SYLLABLE THIEUTH AE HIEUH + {0xB595, 0xD0F9}, //8907 #HANGUL SYLLABLE THIEUTH YA KIYEOK + {0xB596, 0xD0FA}, //8908 #HANGUL SYLLABLE THIEUTH YA SSANGKIYEOK + {0xB597, 0xD0FB}, //8909 #HANGUL SYLLABLE THIEUTH YA KIYEOKSIOS + {0xB598, 0xD0FC}, //8910 #HANGUL SYLLABLE THIEUTH YA NIEUN + {0xB599, 0xD0FD}, //8911 #HANGUL SYLLABLE THIEUTH YA NIEUNCIEUC + {0xB59A, 0xD0FE}, //8912 #HANGUL SYLLABLE THIEUTH YA NIEUNHIEUH + {0xB59B, 0xD0FF}, //8913 #HANGUL SYLLABLE THIEUTH YA TIKEUT + {0xB59C, 0xD100}, //8914 #HANGUL SYLLABLE THIEUTH YA RIEUL + {0xB59D, 0xD101}, //8915 #HANGUL SYLLABLE THIEUTH YA RIEULKIYEOK + {0xB59E, 0xD102}, //8916 #HANGUL SYLLABLE THIEUTH YA RIEULMIEUM + {0xB59F, 0xD103}, //8917 #HANGUL SYLLABLE THIEUTH YA RIEULPIEUP + {0xB5A0, 0xD104}, //8918 #HANGUL SYLLABLE THIEUTH YA RIEULSIOS + {0xB5A1, 0xB367}, //8919 #HANGUL SYLLABLE TIKEUT EO SIOS + {0xB5A2, 0xB369}, //8920 #HANGUL SYLLABLE TIKEUT EO IEUNG + {0xB5A3, 0xB36B}, //8921 #HANGUL SYLLABLE TIKEUT EO CHIEUCH + {0xB5A4, 0xB36E}, //8922 #HANGUL SYLLABLE TIKEUT EO PHIEUPH + {0xB5A5, 0xB370}, //8923 #HANGUL SYLLABLE TIKEUT E + {0xB5A6, 0xB371}, //8924 #HANGUL SYLLABLE TIKEUT E KIYEOK + {0xB5A7, 0xB374}, //8925 #HANGUL SYLLABLE TIKEUT E NIEUN + {0xB5A8, 0xB378}, //8926 #HANGUL SYLLABLE TIKEUT E RIEUL + {0xB5A9, 0xB380}, //8927 #HANGUL SYLLABLE TIKEUT E MIEUM + {0xB5AA, 0xB381}, //8928 #HANGUL SYLLABLE TIKEUT E PIEUP + {0xB5AB, 0xB383}, //8929 #HANGUL SYLLABLE TIKEUT E SIOS + {0xB5AC, 0xB384}, //8930 #HANGUL SYLLABLE TIKEUT E SSANGSIOS + {0xB5AD, 0xB385}, //8931 #HANGUL SYLLABLE TIKEUT E IEUNG + {0xB5AE, 0xB38C}, //8932 #HANGUL SYLLABLE TIKEUT YEO + {0xB5AF, 0xB390}, //8933 #HANGUL SYLLABLE TIKEUT YEO NIEUN + {0xB5B0, 0xB394}, //8934 #HANGUL SYLLABLE TIKEUT YEO RIEUL + {0xB5B1, 0xB3A0}, //8935 #HANGUL SYLLABLE TIKEUT YEO SSANGSIOS + {0xB5B2, 0xB3A1}, //8936 #HANGUL SYLLABLE TIKEUT YEO IEUNG + {0xB5B3, 0xB3A8}, //8937 #HANGUL SYLLABLE TIKEUT YE + {0xB5B4, 0xB3AC}, //8938 #HANGUL SYLLABLE TIKEUT YE NIEUN + {0xB5B5, 0xB3C4}, //8939 #HANGUL SYLLABLE TIKEUT O + {0xB5B6, 0xB3C5}, //8940 #HANGUL SYLLABLE TIKEUT O KIYEOK + {0xB5B7, 0xB3C8}, //8941 #HANGUL SYLLABLE TIKEUT O NIEUN + {0xB5B8, 0xB3CB}, //8942 #HANGUL SYLLABLE TIKEUT O TIKEUT + {0xB5B9, 0xB3CC}, //8943 #HANGUL SYLLABLE TIKEUT O RIEUL + {0xB5BA, 0xB3CE}, //8944 #HANGUL SYLLABLE TIKEUT O RIEULMIEUM + {0xB5BB, 0xB3D0}, //8945 #HANGUL SYLLABLE TIKEUT O RIEULSIOS + {0xB5BC, 0xB3D4}, //8946 #HANGUL SYLLABLE TIKEUT O MIEUM + {0xB5BD, 0xB3D5}, //8947 #HANGUL SYLLABLE TIKEUT O PIEUP + {0xB5BE, 0xB3D7}, //8948 #HANGUL SYLLABLE TIKEUT O SIOS + {0xB5BF, 0xB3D9}, //8949 #HANGUL SYLLABLE TIKEUT O IEUNG + {0xB5C0, 0xB3DB}, //8950 #HANGUL SYLLABLE TIKEUT O CHIEUCH + {0xB5C1, 0xB3DD}, //8951 #HANGUL SYLLABLE TIKEUT O THIEUTH + {0xB5C2, 0xB3E0}, //8952 #HANGUL SYLLABLE TIKEUT WA + {0xB5C3, 0xB3E4}, //8953 #HANGUL SYLLABLE TIKEUT WA NIEUN + {0xB5C4, 0xB3E8}, //8954 #HANGUL SYLLABLE TIKEUT WA RIEUL + {0xB5C5, 0xB3FC}, //8955 #HANGUL SYLLABLE TIKEUT WAE + {0xB5C6, 0xB410}, //8956 #HANGUL SYLLABLE TIKEUT WAE SSANGSIOS + {0xB5C7, 0xB418}, //8957 #HANGUL SYLLABLE TIKEUT OE + {0xB5C8, 0xB41C}, //8958 #HANGUL SYLLABLE TIKEUT OE NIEUN + {0xB5C9, 0xB420}, //8959 #HANGUL SYLLABLE TIKEUT OE RIEUL + {0xB5CA, 0xB428}, //8960 #HANGUL SYLLABLE TIKEUT OE MIEUM + {0xB5CB, 0xB429}, //8961 #HANGUL SYLLABLE TIKEUT OE PIEUP + {0xB5CC, 0xB42B}, //8962 #HANGUL SYLLABLE TIKEUT OE SIOS + {0xB5CD, 0xB434}, //8963 #HANGUL SYLLABLE TIKEUT YO + {0xB5CE, 0xB450}, //8964 #HANGUL SYLLABLE TIKEUT U + {0xB5CF, 0xB451}, //8965 #HANGUL SYLLABLE TIKEUT U KIYEOK + {0xB5D0, 0xB454}, //8966 #HANGUL SYLLABLE TIKEUT U NIEUN + {0xB5D1, 0xB458}, //8967 #HANGUL SYLLABLE TIKEUT U RIEUL + {0xB5D2, 0xB460}, //8968 #HANGUL SYLLABLE TIKEUT U MIEUM + {0xB5D3, 0xB461}, //8969 #HANGUL SYLLABLE TIKEUT U PIEUP + {0xB5D4, 0xB463}, //8970 #HANGUL SYLLABLE TIKEUT U SIOS + {0xB5D5, 0xB465}, //8971 #HANGUL SYLLABLE TIKEUT U IEUNG + {0xB5D6, 0xB46C}, //8972 #HANGUL SYLLABLE TIKEUT WEO + {0xB5D7, 0xB480}, //8973 #HANGUL SYLLABLE TIKEUT WEO SSANGSIOS + {0xB5D8, 0xB488}, //8974 #HANGUL SYLLABLE TIKEUT WE + {0xB5D9, 0xB49D}, //8975 #HANGUL SYLLABLE TIKEUT WE IEUNG + {0xB5DA, 0xB4A4}, //8976 #HANGUL SYLLABLE TIKEUT WI + {0xB5DB, 0xB4A8}, //8977 #HANGUL SYLLABLE TIKEUT WI NIEUN + {0xB5DC, 0xB4AC}, //8978 #HANGUL SYLLABLE TIKEUT WI RIEUL + {0xB5DD, 0xB4B5}, //8979 #HANGUL SYLLABLE TIKEUT WI PIEUP + {0xB5DE, 0xB4B7}, //8980 #HANGUL SYLLABLE TIKEUT WI SIOS + {0xB5DF, 0xB4B9}, //8981 #HANGUL SYLLABLE TIKEUT WI IEUNG + {0xB5E0, 0xB4C0}, //8982 #HANGUL SYLLABLE TIKEUT YU + {0xB5E1, 0xB4C4}, //8983 #HANGUL SYLLABLE TIKEUT YU NIEUN + {0xB5E2, 0xB4C8}, //8984 #HANGUL SYLLABLE TIKEUT YU RIEUL + {0xB5E3, 0xB4D0}, //8985 #HANGUL SYLLABLE TIKEUT YU MIEUM + {0xB5E4, 0xB4D5}, //8986 #HANGUL SYLLABLE TIKEUT YU IEUNG + {0xB5E5, 0xB4DC}, //8987 #HANGUL SYLLABLE TIKEUT EU + {0xB5E6, 0xB4DD}, //8988 #HANGUL SYLLABLE TIKEUT EU KIYEOK + {0xB5E7, 0xB4E0}, //8989 #HANGUL SYLLABLE TIKEUT EU NIEUN + {0xB5E8, 0xB4E3}, //8990 #HANGUL SYLLABLE TIKEUT EU TIKEUT + {0xB5E9, 0xB4E4}, //8991 #HANGUL SYLLABLE TIKEUT EU RIEUL + {0xB5EA, 0xB4E6}, //8992 #HANGUL SYLLABLE TIKEUT EU RIEULMIEUM + {0xB5EB, 0xB4EC}, //8993 #HANGUL SYLLABLE TIKEUT EU MIEUM + {0xB5EC, 0xB4ED}, //8994 #HANGUL SYLLABLE TIKEUT EU PIEUP + {0xB5ED, 0xB4EF}, //8995 #HANGUL SYLLABLE TIKEUT EU SIOS + {0xB5EE, 0xB4F1}, //8996 #HANGUL SYLLABLE TIKEUT EU IEUNG + {0xB5EF, 0xB4F8}, //8997 #HANGUL SYLLABLE TIKEUT YI + {0xB5F0, 0xB514}, //8998 #HANGUL SYLLABLE TIKEUT I + {0xB5F1, 0xB515}, //8999 #HANGUL SYLLABLE TIKEUT I KIYEOK + {0xB5F2, 0xB518}, //9000 #HANGUL SYLLABLE TIKEUT I NIEUN + {0xB5F3, 0xB51B}, //9001 #HANGUL SYLLABLE TIKEUT I TIKEUT + {0xB5F4, 0xB51C}, //9002 #HANGUL SYLLABLE TIKEUT I RIEUL + {0xB5F5, 0xB524}, //9003 #HANGUL SYLLABLE TIKEUT I MIEUM + {0xB5F6, 0xB525}, //9004 #HANGUL SYLLABLE TIKEUT I PIEUP + {0xB5F7, 0xB527}, //9005 #HANGUL SYLLABLE TIKEUT I SIOS + {0xB5F8, 0xB528}, //9006 #HANGUL SYLLABLE TIKEUT I SSANGSIOS + {0xB5F9, 0xB529}, //9007 #HANGUL SYLLABLE TIKEUT I IEUNG + {0xB5FA, 0xB52A}, //9008 #HANGUL SYLLABLE TIKEUT I CIEUC + {0xB5FB, 0xB530}, //9009 #HANGUL SYLLABLE SSANGTIKEUT A + {0xB5FC, 0xB531}, //9010 #HANGUL SYLLABLE SSANGTIKEUT A KIYEOK + {0xB5FD, 0xB534}, //9011 #HANGUL SYLLABLE SSANGTIKEUT A NIEUN + {0xB5FE, 0xB538}, //9012 #HANGUL SYLLABLE SSANGTIKEUT A RIEUL + {0xB641, 0xD105}, //9013 #HANGUL SYLLABLE THIEUTH YA RIEULTHIEUTH + {0xB642, 0xD106}, //9014 #HANGUL SYLLABLE THIEUTH YA RIEULPHIEUPH + {0xB643, 0xD107}, //9015 #HANGUL SYLLABLE THIEUTH YA RIEULHIEUH + {0xB644, 0xD108}, //9016 #HANGUL SYLLABLE THIEUTH YA MIEUM + {0xB645, 0xD109}, //9017 #HANGUL SYLLABLE THIEUTH YA PIEUP + {0xB646, 0xD10A}, //9018 #HANGUL SYLLABLE THIEUTH YA PIEUPSIOS + {0xB647, 0xD10B}, //9019 #HANGUL SYLLABLE THIEUTH YA SIOS + {0xB648, 0xD10C}, //9020 #HANGUL SYLLABLE THIEUTH YA SSANGSIOS + {0xB649, 0xD10E}, //9021 #HANGUL SYLLABLE THIEUTH YA CIEUC + {0xB64A, 0xD10F}, //9022 #HANGUL SYLLABLE THIEUTH YA CHIEUCH + {0xB64B, 0xD110}, //9023 #HANGUL SYLLABLE THIEUTH YA KHIEUKH + {0xB64C, 0xD111}, //9024 #HANGUL SYLLABLE THIEUTH YA THIEUTH + {0xB64D, 0xD112}, //9025 #HANGUL SYLLABLE THIEUTH YA PHIEUPH + {0xB64E, 0xD113}, //9026 #HANGUL SYLLABLE THIEUTH YA HIEUH + {0xB64F, 0xD114}, //9027 #HANGUL SYLLABLE THIEUTH YAE + {0xB650, 0xD115}, //9028 #HANGUL SYLLABLE THIEUTH YAE KIYEOK + {0xB651, 0xD116}, //9029 #HANGUL SYLLABLE THIEUTH YAE SSANGKIYEOK + {0xB652, 0xD117}, //9030 #HANGUL SYLLABLE THIEUTH YAE KIYEOKSIOS + {0xB653, 0xD118}, //9031 #HANGUL SYLLABLE THIEUTH YAE NIEUN + {0xB654, 0xD119}, //9032 #HANGUL SYLLABLE THIEUTH YAE NIEUNCIEUC + {0xB655, 0xD11A}, //9033 #HANGUL SYLLABLE THIEUTH YAE NIEUNHIEUH + {0xB656, 0xD11B}, //9034 #HANGUL SYLLABLE THIEUTH YAE TIKEUT + {0xB657, 0xD11C}, //9035 #HANGUL SYLLABLE THIEUTH YAE RIEUL + {0xB658, 0xD11D}, //9036 #HANGUL SYLLABLE THIEUTH YAE RIEULKIYEOK + {0xB659, 0xD11E}, //9037 #HANGUL SYLLABLE THIEUTH YAE RIEULMIEUM + {0xB65A, 0xD11F}, //9038 #HANGUL SYLLABLE THIEUTH YAE RIEULPIEUP + {0xB661, 0xD120}, //9039 #HANGUL SYLLABLE THIEUTH YAE RIEULSIOS + {0xB662, 0xD121}, //9040 #HANGUL SYLLABLE THIEUTH YAE RIEULTHIEUTH + {0xB663, 0xD122}, //9041 #HANGUL SYLLABLE THIEUTH YAE RIEULPHIEUPH + {0xB664, 0xD123}, //9042 #HANGUL SYLLABLE THIEUTH YAE RIEULHIEUH + {0xB665, 0xD124}, //9043 #HANGUL SYLLABLE THIEUTH YAE MIEUM + {0xB666, 0xD125}, //9044 #HANGUL SYLLABLE THIEUTH YAE PIEUP + {0xB667, 0xD126}, //9045 #HANGUL SYLLABLE THIEUTH YAE PIEUPSIOS + {0xB668, 0xD127}, //9046 #HANGUL SYLLABLE THIEUTH YAE SIOS + {0xB669, 0xD128}, //9047 #HANGUL SYLLABLE THIEUTH YAE SSANGSIOS + {0xB66A, 0xD129}, //9048 #HANGUL SYLLABLE THIEUTH YAE IEUNG + {0xB66B, 0xD12A}, //9049 #HANGUL SYLLABLE THIEUTH YAE CIEUC + {0xB66C, 0xD12B}, //9050 #HANGUL SYLLABLE THIEUTH YAE CHIEUCH + {0xB66D, 0xD12C}, //9051 #HANGUL SYLLABLE THIEUTH YAE KHIEUKH + {0xB66E, 0xD12D}, //9052 #HANGUL SYLLABLE THIEUTH YAE THIEUTH + {0xB66F, 0xD12E}, //9053 #HANGUL SYLLABLE THIEUTH YAE PHIEUPH + {0xB670, 0xD12F}, //9054 #HANGUL SYLLABLE THIEUTH YAE HIEUH + {0xB671, 0xD132}, //9055 #HANGUL SYLLABLE THIEUTH EO SSANGKIYEOK + {0xB672, 0xD133}, //9056 #HANGUL SYLLABLE THIEUTH EO KIYEOKSIOS + {0xB673, 0xD135}, //9057 #HANGUL SYLLABLE THIEUTH EO NIEUNCIEUC + {0xB674, 0xD136}, //9058 #HANGUL SYLLABLE THIEUTH EO NIEUNHIEUH + {0xB675, 0xD137}, //9059 #HANGUL SYLLABLE THIEUTH EO TIKEUT + {0xB676, 0xD139}, //9060 #HANGUL SYLLABLE THIEUTH EO RIEULKIYEOK + {0xB677, 0xD13B}, //9061 #HANGUL SYLLABLE THIEUTH EO RIEULPIEUP + {0xB678, 0xD13C}, //9062 #HANGUL SYLLABLE THIEUTH EO RIEULSIOS + {0xB679, 0xD13D}, //9063 #HANGUL SYLLABLE THIEUTH EO RIEULTHIEUTH + {0xB67A, 0xD13E}, //9064 #HANGUL SYLLABLE THIEUTH EO RIEULPHIEUPH + {0xB681, 0xD13F}, //9065 #HANGUL SYLLABLE THIEUTH EO RIEULHIEUH + {0xB682, 0xD142}, //9066 #HANGUL SYLLABLE THIEUTH EO PIEUPSIOS + {0xB683, 0xD146}, //9067 #HANGUL SYLLABLE THIEUTH EO CIEUC + {0xB684, 0xD147}, //9068 #HANGUL SYLLABLE THIEUTH EO CHIEUCH + {0xB685, 0xD148}, //9069 #HANGUL SYLLABLE THIEUTH EO KHIEUKH + {0xB686, 0xD149}, //9070 #HANGUL SYLLABLE THIEUTH EO THIEUTH + {0xB687, 0xD14A}, //9071 #HANGUL SYLLABLE THIEUTH EO PHIEUPH + {0xB688, 0xD14B}, //9072 #HANGUL SYLLABLE THIEUTH EO HIEUH + {0xB689, 0xD14E}, //9073 #HANGUL SYLLABLE THIEUTH E SSANGKIYEOK + {0xB68A, 0xD14F}, //9074 #HANGUL SYLLABLE THIEUTH E KIYEOKSIOS + {0xB68B, 0xD151}, //9075 #HANGUL SYLLABLE THIEUTH E NIEUNCIEUC + {0xB68C, 0xD152}, //9076 #HANGUL SYLLABLE THIEUTH E NIEUNHIEUH + {0xB68D, 0xD153}, //9077 #HANGUL SYLLABLE THIEUTH E TIKEUT + {0xB68E, 0xD155}, //9078 #HANGUL SYLLABLE THIEUTH E RIEULKIYEOK + {0xB68F, 0xD156}, //9079 #HANGUL SYLLABLE THIEUTH E RIEULMIEUM + {0xB690, 0xD157}, //9080 #HANGUL SYLLABLE THIEUTH E RIEULPIEUP + {0xB691, 0xD158}, //9081 #HANGUL SYLLABLE THIEUTH E RIEULSIOS + {0xB692, 0xD159}, //9082 #HANGUL SYLLABLE THIEUTH E RIEULTHIEUTH + {0xB693, 0xD15A}, //9083 #HANGUL SYLLABLE THIEUTH E RIEULPHIEUPH + {0xB694, 0xD15B}, //9084 #HANGUL SYLLABLE THIEUTH E RIEULHIEUH + {0xB695, 0xD15E}, //9085 #HANGUL SYLLABLE THIEUTH E PIEUPSIOS + {0xB696, 0xD160}, //9086 #HANGUL SYLLABLE THIEUTH E SSANGSIOS + {0xB697, 0xD162}, //9087 #HANGUL SYLLABLE THIEUTH E CIEUC + {0xB698, 0xD163}, //9088 #HANGUL SYLLABLE THIEUTH E CHIEUCH + {0xB699, 0xD164}, //9089 #HANGUL SYLLABLE THIEUTH E KHIEUKH + {0xB69A, 0xD165}, //9090 #HANGUL SYLLABLE THIEUTH E THIEUTH + {0xB69B, 0xD166}, //9091 #HANGUL SYLLABLE THIEUTH E PHIEUPH + {0xB69C, 0xD167}, //9092 #HANGUL SYLLABLE THIEUTH E HIEUH + {0xB69D, 0xD169}, //9093 #HANGUL SYLLABLE THIEUTH YEO KIYEOK + {0xB69E, 0xD16A}, //9094 #HANGUL SYLLABLE THIEUTH YEO SSANGKIYEOK + {0xB69F, 0xD16B}, //9095 #HANGUL SYLLABLE THIEUTH YEO KIYEOKSIOS + {0xB6A0, 0xD16D}, //9096 #HANGUL SYLLABLE THIEUTH YEO NIEUNCIEUC + {0xB6A1, 0xB540}, //9097 #HANGUL SYLLABLE SSANGTIKEUT A MIEUM + {0xB6A2, 0xB541}, //9098 #HANGUL SYLLABLE SSANGTIKEUT A PIEUP + {0xB6A3, 0xB543}, //9099 #HANGUL SYLLABLE SSANGTIKEUT A SIOS + {0xB6A4, 0xB544}, //9100 #HANGUL SYLLABLE SSANGTIKEUT A SSANGSIOS + {0xB6A5, 0xB545}, //9101 #HANGUL SYLLABLE SSANGTIKEUT A IEUNG + {0xB6A6, 0xB54B}, //9102 #HANGUL SYLLABLE SSANGTIKEUT A HIEUH + {0xB6A7, 0xB54C}, //9103 #HANGUL SYLLABLE SSANGTIKEUT AE + {0xB6A8, 0xB54D}, //9104 #HANGUL SYLLABLE SSANGTIKEUT AE KIYEOK + {0xB6A9, 0xB550}, //9105 #HANGUL SYLLABLE SSANGTIKEUT AE NIEUN + {0xB6AA, 0xB554}, //9106 #HANGUL SYLLABLE SSANGTIKEUT AE RIEUL + {0xB6AB, 0xB55C}, //9107 #HANGUL SYLLABLE SSANGTIKEUT AE MIEUM + {0xB6AC, 0xB55D}, //9108 #HANGUL SYLLABLE SSANGTIKEUT AE PIEUP + {0xB6AD, 0xB55F}, //9109 #HANGUL SYLLABLE SSANGTIKEUT AE SIOS + {0xB6AE, 0xB560}, //9110 #HANGUL SYLLABLE SSANGTIKEUT AE SSANGSIOS + {0xB6AF, 0xB561}, //9111 #HANGUL SYLLABLE SSANGTIKEUT AE IEUNG + {0xB6B0, 0xB5A0}, //9112 #HANGUL SYLLABLE SSANGTIKEUT EO + {0xB6B1, 0xB5A1}, //9113 #HANGUL SYLLABLE SSANGTIKEUT EO KIYEOK + {0xB6B2, 0xB5A4}, //9114 #HANGUL SYLLABLE SSANGTIKEUT EO NIEUN + {0xB6B3, 0xB5A8}, //9115 #HANGUL SYLLABLE SSANGTIKEUT EO RIEUL + {0xB6B4, 0xB5AA}, //9116 #HANGUL SYLLABLE SSANGTIKEUT EO RIEULMIEUM + {0xB6B5, 0xB5AB}, //9117 #HANGUL SYLLABLE SSANGTIKEUT EO RIEULPIEUP + {0xB6B6, 0xB5B0}, //9118 #HANGUL SYLLABLE SSANGTIKEUT EO MIEUM + {0xB6B7, 0xB5B1}, //9119 #HANGUL SYLLABLE SSANGTIKEUT EO PIEUP + {0xB6B8, 0xB5B3}, //9120 #HANGUL SYLLABLE SSANGTIKEUT EO SIOS + {0xB6B9, 0xB5B4}, //9121 #HANGUL SYLLABLE SSANGTIKEUT EO SSANGSIOS + {0xB6BA, 0xB5B5}, //9122 #HANGUL SYLLABLE SSANGTIKEUT EO IEUNG + {0xB6BB, 0xB5BB}, //9123 #HANGUL SYLLABLE SSANGTIKEUT EO HIEUH + {0xB6BC, 0xB5BC}, //9124 #HANGUL SYLLABLE SSANGTIKEUT E + {0xB6BD, 0xB5BD}, //9125 #HANGUL SYLLABLE SSANGTIKEUT E KIYEOK + {0xB6BE, 0xB5C0}, //9126 #HANGUL SYLLABLE SSANGTIKEUT E NIEUN + {0xB6BF, 0xB5C4}, //9127 #HANGUL SYLLABLE SSANGTIKEUT E RIEUL + {0xB6C0, 0xB5CC}, //9128 #HANGUL SYLLABLE SSANGTIKEUT E MIEUM + {0xB6C1, 0xB5CD}, //9129 #HANGUL SYLLABLE SSANGTIKEUT E PIEUP + {0xB6C2, 0xB5CF}, //9130 #HANGUL SYLLABLE SSANGTIKEUT E SIOS + {0xB6C3, 0xB5D0}, //9131 #HANGUL SYLLABLE SSANGTIKEUT E SSANGSIOS + {0xB6C4, 0xB5D1}, //9132 #HANGUL SYLLABLE SSANGTIKEUT E IEUNG + {0xB6C5, 0xB5D8}, //9133 #HANGUL SYLLABLE SSANGTIKEUT YEO + {0xB6C6, 0xB5EC}, //9134 #HANGUL SYLLABLE SSANGTIKEUT YEO SSANGSIOS + {0xB6C7, 0xB610}, //9135 #HANGUL SYLLABLE SSANGTIKEUT O + {0xB6C8, 0xB611}, //9136 #HANGUL SYLLABLE SSANGTIKEUT O KIYEOK + {0xB6C9, 0xB614}, //9137 #HANGUL SYLLABLE SSANGTIKEUT O NIEUN + {0xB6CA, 0xB618}, //9138 #HANGUL SYLLABLE SSANGTIKEUT O RIEUL + {0xB6CB, 0xB625}, //9139 #HANGUL SYLLABLE SSANGTIKEUT O IEUNG + {0xB6CC, 0xB62C}, //9140 #HANGUL SYLLABLE SSANGTIKEUT WA + {0xB6CD, 0xB634}, //9141 #HANGUL SYLLABLE SSANGTIKEUT WA RIEUL + {0xB6CE, 0xB648}, //9142 #HANGUL SYLLABLE SSANGTIKEUT WAE + {0xB6CF, 0xB664}, //9143 #HANGUL SYLLABLE SSANGTIKEUT OE + {0xB6D0, 0xB668}, //9144 #HANGUL SYLLABLE SSANGTIKEUT OE NIEUN + {0xB6D1, 0xB69C}, //9145 #HANGUL SYLLABLE SSANGTIKEUT U + {0xB6D2, 0xB69D}, //9146 #HANGUL SYLLABLE SSANGTIKEUT U KIYEOK + {0xB6D3, 0xB6A0}, //9147 #HANGUL SYLLABLE SSANGTIKEUT U NIEUN + {0xB6D4, 0xB6A4}, //9148 #HANGUL SYLLABLE SSANGTIKEUT U RIEUL + {0xB6D5, 0xB6AB}, //9149 #HANGUL SYLLABLE SSANGTIKEUT U RIEULHIEUH + {0xB6D6, 0xB6AC}, //9150 #HANGUL SYLLABLE SSANGTIKEUT U MIEUM + {0xB6D7, 0xB6B1}, //9151 #HANGUL SYLLABLE SSANGTIKEUT U IEUNG + {0xB6D8, 0xB6D4}, //9152 #HANGUL SYLLABLE SSANGTIKEUT WE + {0xB6D9, 0xB6F0}, //9153 #HANGUL SYLLABLE SSANGTIKEUT WI + {0xB6DA, 0xB6F4}, //9154 #HANGUL SYLLABLE SSANGTIKEUT WI NIEUN + {0xB6DB, 0xB6F8}, //9155 #HANGUL SYLLABLE SSANGTIKEUT WI RIEUL + {0xB6DC, 0xB700}, //9156 #HANGUL SYLLABLE SSANGTIKEUT WI MIEUM + {0xB6DD, 0xB701}, //9157 #HANGUL SYLLABLE SSANGTIKEUT WI PIEUP + {0xB6DE, 0xB705}, //9158 #HANGUL SYLLABLE SSANGTIKEUT WI IEUNG + {0xB6DF, 0xB728}, //9159 #HANGUL SYLLABLE SSANGTIKEUT EU + {0xB6E0, 0xB729}, //9160 #HANGUL SYLLABLE SSANGTIKEUT EU KIYEOK + {0xB6E1, 0xB72C}, //9161 #HANGUL SYLLABLE SSANGTIKEUT EU NIEUN + {0xB6E2, 0xB72F}, //9162 #HANGUL SYLLABLE SSANGTIKEUT EU TIKEUT + {0xB6E3, 0xB730}, //9163 #HANGUL SYLLABLE SSANGTIKEUT EU RIEUL + {0xB6E4, 0xB738}, //9164 #HANGUL SYLLABLE SSANGTIKEUT EU MIEUM + {0xB6E5, 0xB739}, //9165 #HANGUL SYLLABLE SSANGTIKEUT EU PIEUP + {0xB6E6, 0xB73B}, //9166 #HANGUL SYLLABLE SSANGTIKEUT EU SIOS + {0xB6E7, 0xB744}, //9167 #HANGUL SYLLABLE SSANGTIKEUT YI + {0xB6E8, 0xB748}, //9168 #HANGUL SYLLABLE SSANGTIKEUT YI NIEUN + {0xB6E9, 0xB74C}, //9169 #HANGUL SYLLABLE SSANGTIKEUT YI RIEUL + {0xB6EA, 0xB754}, //9170 #HANGUL SYLLABLE SSANGTIKEUT YI MIEUM + {0xB6EB, 0xB755}, //9171 #HANGUL SYLLABLE SSANGTIKEUT YI PIEUP + {0xB6EC, 0xB760}, //9172 #HANGUL SYLLABLE SSANGTIKEUT I + {0xB6ED, 0xB764}, //9173 #HANGUL SYLLABLE SSANGTIKEUT I NIEUN + {0xB6EE, 0xB768}, //9174 #HANGUL SYLLABLE SSANGTIKEUT I RIEUL + {0xB6EF, 0xB770}, //9175 #HANGUL SYLLABLE SSANGTIKEUT I MIEUM + {0xB6F0, 0xB771}, //9176 #HANGUL SYLLABLE SSANGTIKEUT I PIEUP + {0xB6F1, 0xB773}, //9177 #HANGUL SYLLABLE SSANGTIKEUT I SIOS + {0xB6F2, 0xB775}, //9178 #HANGUL SYLLABLE SSANGTIKEUT I IEUNG + {0xB6F3, 0xB77C}, //9179 #HANGUL SYLLABLE RIEUL A + {0xB6F4, 0xB77D}, //9180 #HANGUL SYLLABLE RIEUL A KIYEOK + {0xB6F5, 0xB780}, //9181 #HANGUL SYLLABLE RIEUL A NIEUN + {0xB6F6, 0xB784}, //9182 #HANGUL SYLLABLE RIEUL A RIEUL + {0xB6F7, 0xB78C}, //9183 #HANGUL SYLLABLE RIEUL A MIEUM + {0xB6F8, 0xB78D}, //9184 #HANGUL SYLLABLE RIEUL A PIEUP + {0xB6F9, 0xB78F}, //9185 #HANGUL SYLLABLE RIEUL A SIOS + {0xB6FA, 0xB790}, //9186 #HANGUL SYLLABLE RIEUL A SSANGSIOS + {0xB6FB, 0xB791}, //9187 #HANGUL SYLLABLE RIEUL A IEUNG + {0xB6FC, 0xB792}, //9188 #HANGUL SYLLABLE RIEUL A CIEUC + {0xB6FD, 0xB796}, //9189 #HANGUL SYLLABLE RIEUL A PHIEUPH + {0xB6FE, 0xB797}, //9190 #HANGUL SYLLABLE RIEUL A HIEUH + {0xB741, 0xD16E}, //9191 #HANGUL SYLLABLE THIEUTH YEO NIEUNHIEUH + {0xB742, 0xD16F}, //9192 #HANGUL SYLLABLE THIEUTH YEO TIKEUT + {0xB743, 0xD170}, //9193 #HANGUL SYLLABLE THIEUTH YEO RIEUL + {0xB744, 0xD171}, //9194 #HANGUL SYLLABLE THIEUTH YEO RIEULKIYEOK + {0xB745, 0xD172}, //9195 #HANGUL SYLLABLE THIEUTH YEO RIEULMIEUM + {0xB746, 0xD173}, //9196 #HANGUL SYLLABLE THIEUTH YEO RIEULPIEUP + {0xB747, 0xD174}, //9197 #HANGUL SYLLABLE THIEUTH YEO RIEULSIOS + {0xB748, 0xD175}, //9198 #HANGUL SYLLABLE THIEUTH YEO RIEULTHIEUTH + {0xB749, 0xD176}, //9199 #HANGUL SYLLABLE THIEUTH YEO RIEULPHIEUPH + {0xB74A, 0xD177}, //9200 #HANGUL SYLLABLE THIEUTH YEO RIEULHIEUH + {0xB74B, 0xD178}, //9201 #HANGUL SYLLABLE THIEUTH YEO MIEUM + {0xB74C, 0xD179}, //9202 #HANGUL SYLLABLE THIEUTH YEO PIEUP + {0xB74D, 0xD17A}, //9203 #HANGUL SYLLABLE THIEUTH YEO PIEUPSIOS + {0xB74E, 0xD17B}, //9204 #HANGUL SYLLABLE THIEUTH YEO SIOS + {0xB74F, 0xD17D}, //9205 #HANGUL SYLLABLE THIEUTH YEO IEUNG + {0xB750, 0xD17E}, //9206 #HANGUL SYLLABLE THIEUTH YEO CIEUC + {0xB751, 0xD17F}, //9207 #HANGUL SYLLABLE THIEUTH YEO CHIEUCH + {0xB752, 0xD180}, //9208 #HANGUL SYLLABLE THIEUTH YEO KHIEUKH + {0xB753, 0xD181}, //9209 #HANGUL SYLLABLE THIEUTH YEO THIEUTH + {0xB754, 0xD182}, //9210 #HANGUL SYLLABLE THIEUTH YEO PHIEUPH + {0xB755, 0xD183}, //9211 #HANGUL SYLLABLE THIEUTH YEO HIEUH + {0xB756, 0xD185}, //9212 #HANGUL SYLLABLE THIEUTH YE KIYEOK + {0xB757, 0xD186}, //9213 #HANGUL SYLLABLE THIEUTH YE SSANGKIYEOK + {0xB758, 0xD187}, //9214 #HANGUL SYLLABLE THIEUTH YE KIYEOKSIOS + {0xB759, 0xD189}, //9215 #HANGUL SYLLABLE THIEUTH YE NIEUNCIEUC + {0xB75A, 0xD18A}, //9216 #HANGUL SYLLABLE THIEUTH YE NIEUNHIEUH + {0xB761, 0xD18B}, //9217 #HANGUL SYLLABLE THIEUTH YE TIKEUT + {0xB762, 0xD18C}, //9218 #HANGUL SYLLABLE THIEUTH YE RIEUL + {0xB763, 0xD18D}, //9219 #HANGUL SYLLABLE THIEUTH YE RIEULKIYEOK + {0xB764, 0xD18E}, //9220 #HANGUL SYLLABLE THIEUTH YE RIEULMIEUM + {0xB765, 0xD18F}, //9221 #HANGUL SYLLABLE THIEUTH YE RIEULPIEUP + {0xB766, 0xD190}, //9222 #HANGUL SYLLABLE THIEUTH YE RIEULSIOS + {0xB767, 0xD191}, //9223 #HANGUL SYLLABLE THIEUTH YE RIEULTHIEUTH + {0xB768, 0xD192}, //9224 #HANGUL SYLLABLE THIEUTH YE RIEULPHIEUPH + {0xB769, 0xD193}, //9225 #HANGUL SYLLABLE THIEUTH YE RIEULHIEUH + {0xB76A, 0xD194}, //9226 #HANGUL SYLLABLE THIEUTH YE MIEUM + {0xB76B, 0xD195}, //9227 #HANGUL SYLLABLE THIEUTH YE PIEUP + {0xB76C, 0xD196}, //9228 #HANGUL SYLLABLE THIEUTH YE PIEUPSIOS + {0xB76D, 0xD197}, //9229 #HANGUL SYLLABLE THIEUTH YE SIOS + {0xB76E, 0xD198}, //9230 #HANGUL SYLLABLE THIEUTH YE SSANGSIOS + {0xB76F, 0xD199}, //9231 #HANGUL SYLLABLE THIEUTH YE IEUNG + {0xB770, 0xD19A}, //9232 #HANGUL SYLLABLE THIEUTH YE CIEUC + {0xB771, 0xD19B}, //9233 #HANGUL SYLLABLE THIEUTH YE CHIEUCH + {0xB772, 0xD19C}, //9234 #HANGUL SYLLABLE THIEUTH YE KHIEUKH + {0xB773, 0xD19D}, //9235 #HANGUL SYLLABLE THIEUTH YE THIEUTH + {0xB774, 0xD19E}, //9236 #HANGUL SYLLABLE THIEUTH YE PHIEUPH + {0xB775, 0xD19F}, //9237 #HANGUL SYLLABLE THIEUTH YE HIEUH + {0xB776, 0xD1A2}, //9238 #HANGUL SYLLABLE THIEUTH O SSANGKIYEOK + {0xB777, 0xD1A3}, //9239 #HANGUL SYLLABLE THIEUTH O KIYEOKSIOS + {0xB778, 0xD1A5}, //9240 #HANGUL SYLLABLE THIEUTH O NIEUNCIEUC + {0xB779, 0xD1A6}, //9241 #HANGUL SYLLABLE THIEUTH O NIEUNHIEUH + {0xB77A, 0xD1A7}, //9242 #HANGUL SYLLABLE THIEUTH O TIKEUT + {0xB781, 0xD1A9}, //9243 #HANGUL SYLLABLE THIEUTH O RIEULKIYEOK + {0xB782, 0xD1AA}, //9244 #HANGUL SYLLABLE THIEUTH O RIEULMIEUM + {0xB783, 0xD1AB}, //9245 #HANGUL SYLLABLE THIEUTH O RIEULPIEUP + {0xB784, 0xD1AC}, //9246 #HANGUL SYLLABLE THIEUTH O RIEULSIOS + {0xB785, 0xD1AD}, //9247 #HANGUL SYLLABLE THIEUTH O RIEULTHIEUTH + {0xB786, 0xD1AE}, //9248 #HANGUL SYLLABLE THIEUTH O RIEULPHIEUPH + {0xB787, 0xD1AF}, //9249 #HANGUL SYLLABLE THIEUTH O RIEULHIEUH + {0xB788, 0xD1B2}, //9250 #HANGUL SYLLABLE THIEUTH O PIEUPSIOS + {0xB789, 0xD1B4}, //9251 #HANGUL SYLLABLE THIEUTH O SSANGSIOS + {0xB78A, 0xD1B6}, //9252 #HANGUL SYLLABLE THIEUTH O CIEUC + {0xB78B, 0xD1B7}, //9253 #HANGUL SYLLABLE THIEUTH O CHIEUCH + {0xB78C, 0xD1B8}, //9254 #HANGUL SYLLABLE THIEUTH O KHIEUKH + {0xB78D, 0xD1B9}, //9255 #HANGUL SYLLABLE THIEUTH O THIEUTH + {0xB78E, 0xD1BB}, //9256 #HANGUL SYLLABLE THIEUTH O HIEUH + {0xB78F, 0xD1BD}, //9257 #HANGUL SYLLABLE THIEUTH WA KIYEOK + {0xB790, 0xD1BE}, //9258 #HANGUL SYLLABLE THIEUTH WA SSANGKIYEOK + {0xB791, 0xD1BF}, //9259 #HANGUL SYLLABLE THIEUTH WA KIYEOKSIOS + {0xB792, 0xD1C1}, //9260 #HANGUL SYLLABLE THIEUTH WA NIEUNCIEUC + {0xB793, 0xD1C2}, //9261 #HANGUL SYLLABLE THIEUTH WA NIEUNHIEUH + {0xB794, 0xD1C3}, //9262 #HANGUL SYLLABLE THIEUTH WA TIKEUT + {0xB795, 0xD1C4}, //9263 #HANGUL SYLLABLE THIEUTH WA RIEUL + {0xB796, 0xD1C5}, //9264 #HANGUL SYLLABLE THIEUTH WA RIEULKIYEOK + {0xB797, 0xD1C6}, //9265 #HANGUL SYLLABLE THIEUTH WA RIEULMIEUM + {0xB798, 0xD1C7}, //9266 #HANGUL SYLLABLE THIEUTH WA RIEULPIEUP + {0xB799, 0xD1C8}, //9267 #HANGUL SYLLABLE THIEUTH WA RIEULSIOS + {0xB79A, 0xD1C9}, //9268 #HANGUL SYLLABLE THIEUTH WA RIEULTHIEUTH + {0xB79B, 0xD1CA}, //9269 #HANGUL SYLLABLE THIEUTH WA RIEULPHIEUPH + {0xB79C, 0xD1CB}, //9270 #HANGUL SYLLABLE THIEUTH WA RIEULHIEUH + {0xB79D, 0xD1CC}, //9271 #HANGUL SYLLABLE THIEUTH WA MIEUM + {0xB79E, 0xD1CD}, //9272 #HANGUL SYLLABLE THIEUTH WA PIEUP + {0xB79F, 0xD1CE}, //9273 #HANGUL SYLLABLE THIEUTH WA PIEUPSIOS + {0xB7A0, 0xD1CF}, //9274 #HANGUL SYLLABLE THIEUTH WA SIOS + {0xB7A1, 0xB798}, //9275 #HANGUL SYLLABLE RIEUL AE + {0xB7A2, 0xB799}, //9276 #HANGUL SYLLABLE RIEUL AE KIYEOK + {0xB7A3, 0xB79C}, //9277 #HANGUL SYLLABLE RIEUL AE NIEUN + {0xB7A4, 0xB7A0}, //9278 #HANGUL SYLLABLE RIEUL AE RIEUL + {0xB7A5, 0xB7A8}, //9279 #HANGUL SYLLABLE RIEUL AE MIEUM + {0xB7A6, 0xB7A9}, //9280 #HANGUL SYLLABLE RIEUL AE PIEUP + {0xB7A7, 0xB7AB}, //9281 #HANGUL SYLLABLE RIEUL AE SIOS + {0xB7A8, 0xB7AC}, //9282 #HANGUL SYLLABLE RIEUL AE SSANGSIOS + {0xB7A9, 0xB7AD}, //9283 #HANGUL SYLLABLE RIEUL AE IEUNG + {0xB7AA, 0xB7B4}, //9284 #HANGUL SYLLABLE RIEUL YA + {0xB7AB, 0xB7B5}, //9285 #HANGUL SYLLABLE RIEUL YA KIYEOK + {0xB7AC, 0xB7B8}, //9286 #HANGUL SYLLABLE RIEUL YA NIEUN + {0xB7AD, 0xB7C7}, //9287 #HANGUL SYLLABLE RIEUL YA SIOS + {0xB7AE, 0xB7C9}, //9288 #HANGUL SYLLABLE RIEUL YA IEUNG + {0xB7AF, 0xB7EC}, //9289 #HANGUL SYLLABLE RIEUL EO + {0xB7B0, 0xB7ED}, //9290 #HANGUL SYLLABLE RIEUL EO KIYEOK + {0xB7B1, 0xB7F0}, //9291 #HANGUL SYLLABLE RIEUL EO NIEUN + {0xB7B2, 0xB7F4}, //9292 #HANGUL SYLLABLE RIEUL EO RIEUL + {0xB7B3, 0xB7FC}, //9293 #HANGUL SYLLABLE RIEUL EO MIEUM + {0xB7B4, 0xB7FD}, //9294 #HANGUL SYLLABLE RIEUL EO PIEUP + {0xB7B5, 0xB7FF}, //9295 #HANGUL SYLLABLE RIEUL EO SIOS + {0xB7B6, 0xB800}, //9296 #HANGUL SYLLABLE RIEUL EO SSANGSIOS + {0xB7B7, 0xB801}, //9297 #HANGUL SYLLABLE RIEUL EO IEUNG + {0xB7B8, 0xB807}, //9298 #HANGUL SYLLABLE RIEUL EO HIEUH + {0xB7B9, 0xB808}, //9299 #HANGUL SYLLABLE RIEUL E + {0xB7BA, 0xB809}, //9300 #HANGUL SYLLABLE RIEUL E KIYEOK + {0xB7BB, 0xB80C}, //9301 #HANGUL SYLLABLE RIEUL E NIEUN + {0xB7BC, 0xB810}, //9302 #HANGUL SYLLABLE RIEUL E RIEUL + {0xB7BD, 0xB818}, //9303 #HANGUL SYLLABLE RIEUL E MIEUM + {0xB7BE, 0xB819}, //9304 #HANGUL SYLLABLE RIEUL E PIEUP + {0xB7BF, 0xB81B}, //9305 #HANGUL SYLLABLE RIEUL E SIOS + {0xB7C0, 0xB81D}, //9306 #HANGUL SYLLABLE RIEUL E IEUNG + {0xB7C1, 0xB824}, //9307 #HANGUL SYLLABLE RIEUL YEO + {0xB7C2, 0xB825}, //9308 #HANGUL SYLLABLE RIEUL YEO KIYEOK + {0xB7C3, 0xB828}, //9309 #HANGUL SYLLABLE RIEUL YEO NIEUN + {0xB7C4, 0xB82C}, //9310 #HANGUL SYLLABLE RIEUL YEO RIEUL + {0xB7C5, 0xB834}, //9311 #HANGUL SYLLABLE RIEUL YEO MIEUM + {0xB7C6, 0xB835}, //9312 #HANGUL SYLLABLE RIEUL YEO PIEUP + {0xB7C7, 0xB837}, //9313 #HANGUL SYLLABLE RIEUL YEO SIOS + {0xB7C8, 0xB838}, //9314 #HANGUL SYLLABLE RIEUL YEO SSANGSIOS + {0xB7C9, 0xB839}, //9315 #HANGUL SYLLABLE RIEUL YEO IEUNG + {0xB7CA, 0xB840}, //9316 #HANGUL SYLLABLE RIEUL YE + {0xB7CB, 0xB844}, //9317 #HANGUL SYLLABLE RIEUL YE NIEUN + {0xB7CC, 0xB851}, //9318 #HANGUL SYLLABLE RIEUL YE PIEUP + {0xB7CD, 0xB853}, //9319 #HANGUL SYLLABLE RIEUL YE SIOS + {0xB7CE, 0xB85C}, //9320 #HANGUL SYLLABLE RIEUL O + {0xB7CF, 0xB85D}, //9321 #HANGUL SYLLABLE RIEUL O KIYEOK + {0xB7D0, 0xB860}, //9322 #HANGUL SYLLABLE RIEUL O NIEUN + {0xB7D1, 0xB864}, //9323 #HANGUL SYLLABLE RIEUL O RIEUL + {0xB7D2, 0xB86C}, //9324 #HANGUL SYLLABLE RIEUL O MIEUM + {0xB7D3, 0xB86D}, //9325 #HANGUL SYLLABLE RIEUL O PIEUP + {0xB7D4, 0xB86F}, //9326 #HANGUL SYLLABLE RIEUL O SIOS + {0xB7D5, 0xB871}, //9327 #HANGUL SYLLABLE RIEUL O IEUNG + {0xB7D6, 0xB878}, //9328 #HANGUL SYLLABLE RIEUL WA + {0xB7D7, 0xB87C}, //9329 #HANGUL SYLLABLE RIEUL WA NIEUN + {0xB7D8, 0xB88D}, //9330 #HANGUL SYLLABLE RIEUL WA IEUNG + {0xB7D9, 0xB8A8}, //9331 #HANGUL SYLLABLE RIEUL WAE SSANGSIOS + {0xB7DA, 0xB8B0}, //9332 #HANGUL SYLLABLE RIEUL OE + {0xB7DB, 0xB8B4}, //9333 #HANGUL SYLLABLE RIEUL OE NIEUN + {0xB7DC, 0xB8B8}, //9334 #HANGUL SYLLABLE RIEUL OE RIEUL + {0xB7DD, 0xB8C0}, //9335 #HANGUL SYLLABLE RIEUL OE MIEUM + {0xB7DE, 0xB8C1}, //9336 #HANGUL SYLLABLE RIEUL OE PIEUP + {0xB7DF, 0xB8C3}, //9337 #HANGUL SYLLABLE RIEUL OE SIOS + {0xB7E0, 0xB8C5}, //9338 #HANGUL SYLLABLE RIEUL OE IEUNG + {0xB7E1, 0xB8CC}, //9339 #HANGUL SYLLABLE RIEUL YO + {0xB7E2, 0xB8D0}, //9340 #HANGUL SYLLABLE RIEUL YO NIEUN + {0xB7E3, 0xB8D4}, //9341 #HANGUL SYLLABLE RIEUL YO RIEUL + {0xB7E4, 0xB8DD}, //9342 #HANGUL SYLLABLE RIEUL YO PIEUP + {0xB7E5, 0xB8DF}, //9343 #HANGUL SYLLABLE RIEUL YO SIOS + {0xB7E6, 0xB8E1}, //9344 #HANGUL SYLLABLE RIEUL YO IEUNG + {0xB7E7, 0xB8E8}, //9345 #HANGUL SYLLABLE RIEUL U + {0xB7E8, 0xB8E9}, //9346 #HANGUL SYLLABLE RIEUL U KIYEOK + {0xB7E9, 0xB8EC}, //9347 #HANGUL SYLLABLE RIEUL U NIEUN + {0xB7EA, 0xB8F0}, //9348 #HANGUL SYLLABLE RIEUL U RIEUL + {0xB7EB, 0xB8F8}, //9349 #HANGUL SYLLABLE RIEUL U MIEUM + {0xB7EC, 0xB8F9}, //9350 #HANGUL SYLLABLE RIEUL U PIEUP + {0xB7ED, 0xB8FB}, //9351 #HANGUL SYLLABLE RIEUL U SIOS + {0xB7EE, 0xB8FD}, //9352 #HANGUL SYLLABLE RIEUL U IEUNG + {0xB7EF, 0xB904}, //9353 #HANGUL SYLLABLE RIEUL WEO + {0xB7F0, 0xB918}, //9354 #HANGUL SYLLABLE RIEUL WEO SSANGSIOS + {0xB7F1, 0xB920}, //9355 #HANGUL SYLLABLE RIEUL WE + {0xB7F2, 0xB93C}, //9356 #HANGUL SYLLABLE RIEUL WI + {0xB7F3, 0xB93D}, //9357 #HANGUL SYLLABLE RIEUL WI KIYEOK + {0xB7F4, 0xB940}, //9358 #HANGUL SYLLABLE RIEUL WI NIEUN + {0xB7F5, 0xB944}, //9359 #HANGUL SYLLABLE RIEUL WI RIEUL + {0xB7F6, 0xB94C}, //9360 #HANGUL SYLLABLE RIEUL WI MIEUM + {0xB7F7, 0xB94F}, //9361 #HANGUL SYLLABLE RIEUL WI SIOS + {0xB7F8, 0xB951}, //9362 #HANGUL SYLLABLE RIEUL WI IEUNG + {0xB7F9, 0xB958}, //9363 #HANGUL SYLLABLE RIEUL YU + {0xB7FA, 0xB959}, //9364 #HANGUL SYLLABLE RIEUL YU KIYEOK + {0xB7FB, 0xB95C}, //9365 #HANGUL SYLLABLE RIEUL YU NIEUN + {0xB7FC, 0xB960}, //9366 #HANGUL SYLLABLE RIEUL YU RIEUL + {0xB7FD, 0xB968}, //9367 #HANGUL SYLLABLE RIEUL YU MIEUM + {0xB7FE, 0xB969}, //9368 #HANGUL SYLLABLE RIEUL YU PIEUP + {0xB841, 0xD1D0}, //9369 #HANGUL SYLLABLE THIEUTH WA SSANGSIOS + {0xB842, 0xD1D1}, //9370 #HANGUL SYLLABLE THIEUTH WA IEUNG + {0xB843, 0xD1D2}, //9371 #HANGUL SYLLABLE THIEUTH WA CIEUC + {0xB844, 0xD1D3}, //9372 #HANGUL SYLLABLE THIEUTH WA CHIEUCH + {0xB845, 0xD1D4}, //9373 #HANGUL SYLLABLE THIEUTH WA KHIEUKH + {0xB846, 0xD1D5}, //9374 #HANGUL SYLLABLE THIEUTH WA THIEUTH + {0xB847, 0xD1D6}, //9375 #HANGUL SYLLABLE THIEUTH WA PHIEUPH + {0xB848, 0xD1D7}, //9376 #HANGUL SYLLABLE THIEUTH WA HIEUH + {0xB849, 0xD1D9}, //9377 #HANGUL SYLLABLE THIEUTH WAE KIYEOK + {0xB84A, 0xD1DA}, //9378 #HANGUL SYLLABLE THIEUTH WAE SSANGKIYEOK + {0xB84B, 0xD1DB}, //9379 #HANGUL SYLLABLE THIEUTH WAE KIYEOKSIOS + {0xB84C, 0xD1DC}, //9380 #HANGUL SYLLABLE THIEUTH WAE NIEUN + {0xB84D, 0xD1DD}, //9381 #HANGUL SYLLABLE THIEUTH WAE NIEUNCIEUC + {0xB84E, 0xD1DE}, //9382 #HANGUL SYLLABLE THIEUTH WAE NIEUNHIEUH + {0xB84F, 0xD1DF}, //9383 #HANGUL SYLLABLE THIEUTH WAE TIKEUT + {0xB850, 0xD1E0}, //9384 #HANGUL SYLLABLE THIEUTH WAE RIEUL + {0xB851, 0xD1E1}, //9385 #HANGUL SYLLABLE THIEUTH WAE RIEULKIYEOK + {0xB852, 0xD1E2}, //9386 #HANGUL SYLLABLE THIEUTH WAE RIEULMIEUM + {0xB853, 0xD1E3}, //9387 #HANGUL SYLLABLE THIEUTH WAE RIEULPIEUP + {0xB854, 0xD1E4}, //9388 #HANGUL SYLLABLE THIEUTH WAE RIEULSIOS + {0xB855, 0xD1E5}, //9389 #HANGUL SYLLABLE THIEUTH WAE RIEULTHIEUTH + {0xB856, 0xD1E6}, //9390 #HANGUL SYLLABLE THIEUTH WAE RIEULPHIEUPH + {0xB857, 0xD1E7}, //9391 #HANGUL SYLLABLE THIEUTH WAE RIEULHIEUH + {0xB858, 0xD1E8}, //9392 #HANGUL SYLLABLE THIEUTH WAE MIEUM + {0xB859, 0xD1E9}, //9393 #HANGUL SYLLABLE THIEUTH WAE PIEUP + {0xB85A, 0xD1EA}, //9394 #HANGUL SYLLABLE THIEUTH WAE PIEUPSIOS + {0xB861, 0xD1EB}, //9395 #HANGUL SYLLABLE THIEUTH WAE SIOS + {0xB862, 0xD1EC}, //9396 #HANGUL SYLLABLE THIEUTH WAE SSANGSIOS + {0xB863, 0xD1ED}, //9397 #HANGUL SYLLABLE THIEUTH WAE IEUNG + {0xB864, 0xD1EE}, //9398 #HANGUL SYLLABLE THIEUTH WAE CIEUC + {0xB865, 0xD1EF}, //9399 #HANGUL SYLLABLE THIEUTH WAE CHIEUCH + {0xB866, 0xD1F0}, //9400 #HANGUL SYLLABLE THIEUTH WAE KHIEUKH + {0xB867, 0xD1F1}, //9401 #HANGUL SYLLABLE THIEUTH WAE THIEUTH + {0xB868, 0xD1F2}, //9402 #HANGUL SYLLABLE THIEUTH WAE PHIEUPH + {0xB869, 0xD1F3}, //9403 #HANGUL SYLLABLE THIEUTH WAE HIEUH + {0xB86A, 0xD1F5}, //9404 #HANGUL SYLLABLE THIEUTH OE KIYEOK + {0xB86B, 0xD1F6}, //9405 #HANGUL SYLLABLE THIEUTH OE SSANGKIYEOK + {0xB86C, 0xD1F7}, //9406 #HANGUL SYLLABLE THIEUTH OE KIYEOKSIOS + {0xB86D, 0xD1F9}, //9407 #HANGUL SYLLABLE THIEUTH OE NIEUNCIEUC + {0xB86E, 0xD1FA}, //9408 #HANGUL SYLLABLE THIEUTH OE NIEUNHIEUH + {0xB86F, 0xD1FB}, //9409 #HANGUL SYLLABLE THIEUTH OE TIKEUT + {0xB870, 0xD1FC}, //9410 #HANGUL SYLLABLE THIEUTH OE RIEUL + {0xB871, 0xD1FD}, //9411 #HANGUL SYLLABLE THIEUTH OE RIEULKIYEOK + {0xB872, 0xD1FE}, //9412 #HANGUL SYLLABLE THIEUTH OE RIEULMIEUM + {0xB873, 0xD1FF}, //9413 #HANGUL SYLLABLE THIEUTH OE RIEULPIEUP + {0xB874, 0xD200}, //9414 #HANGUL SYLLABLE THIEUTH OE RIEULSIOS + {0xB875, 0xD201}, //9415 #HANGUL SYLLABLE THIEUTH OE RIEULTHIEUTH + {0xB876, 0xD202}, //9416 #HANGUL SYLLABLE THIEUTH OE RIEULPHIEUPH + {0xB877, 0xD203}, //9417 #HANGUL SYLLABLE THIEUTH OE RIEULHIEUH + {0xB878, 0xD204}, //9418 #HANGUL SYLLABLE THIEUTH OE MIEUM + {0xB879, 0xD205}, //9419 #HANGUL SYLLABLE THIEUTH OE PIEUP + {0xB87A, 0xD206}, //9420 #HANGUL SYLLABLE THIEUTH OE PIEUPSIOS + {0xB881, 0xD208}, //9421 #HANGUL SYLLABLE THIEUTH OE SSANGSIOS + {0xB882, 0xD20A}, //9422 #HANGUL SYLLABLE THIEUTH OE CIEUC + {0xB883, 0xD20B}, //9423 #HANGUL SYLLABLE THIEUTH OE CHIEUCH + {0xB884, 0xD20C}, //9424 #HANGUL SYLLABLE THIEUTH OE KHIEUKH + {0xB885, 0xD20D}, //9425 #HANGUL SYLLABLE THIEUTH OE THIEUTH + {0xB886, 0xD20E}, //9426 #HANGUL SYLLABLE THIEUTH OE PHIEUPH + {0xB887, 0xD20F}, //9427 #HANGUL SYLLABLE THIEUTH OE HIEUH + {0xB888, 0xD211}, //9428 #HANGUL SYLLABLE THIEUTH YO KIYEOK + {0xB889, 0xD212}, //9429 #HANGUL SYLLABLE THIEUTH YO SSANGKIYEOK + {0xB88A, 0xD213}, //9430 #HANGUL SYLLABLE THIEUTH YO KIYEOKSIOS + {0xB88B, 0xD214}, //9431 #HANGUL SYLLABLE THIEUTH YO NIEUN + {0xB88C, 0xD215}, //9432 #HANGUL SYLLABLE THIEUTH YO NIEUNCIEUC + {0xB88D, 0xD216}, //9433 #HANGUL SYLLABLE THIEUTH YO NIEUNHIEUH + {0xB88E, 0xD217}, //9434 #HANGUL SYLLABLE THIEUTH YO TIKEUT + {0xB88F, 0xD218}, //9435 #HANGUL SYLLABLE THIEUTH YO RIEUL + {0xB890, 0xD219}, //9436 #HANGUL SYLLABLE THIEUTH YO RIEULKIYEOK + {0xB891, 0xD21A}, //9437 #HANGUL SYLLABLE THIEUTH YO RIEULMIEUM + {0xB892, 0xD21B}, //9438 #HANGUL SYLLABLE THIEUTH YO RIEULPIEUP + {0xB893, 0xD21C}, //9439 #HANGUL SYLLABLE THIEUTH YO RIEULSIOS + {0xB894, 0xD21D}, //9440 #HANGUL SYLLABLE THIEUTH YO RIEULTHIEUTH + {0xB895, 0xD21E}, //9441 #HANGUL SYLLABLE THIEUTH YO RIEULPHIEUPH + {0xB896, 0xD21F}, //9442 #HANGUL SYLLABLE THIEUTH YO RIEULHIEUH + {0xB897, 0xD220}, //9443 #HANGUL SYLLABLE THIEUTH YO MIEUM + {0xB898, 0xD221}, //9444 #HANGUL SYLLABLE THIEUTH YO PIEUP + {0xB899, 0xD222}, //9445 #HANGUL SYLLABLE THIEUTH YO PIEUPSIOS + {0xB89A, 0xD223}, //9446 #HANGUL SYLLABLE THIEUTH YO SIOS + {0xB89B, 0xD224}, //9447 #HANGUL SYLLABLE THIEUTH YO SSANGSIOS + {0xB89C, 0xD225}, //9448 #HANGUL SYLLABLE THIEUTH YO IEUNG + {0xB89D, 0xD226}, //9449 #HANGUL SYLLABLE THIEUTH YO CIEUC + {0xB89E, 0xD227}, //9450 #HANGUL SYLLABLE THIEUTH YO CHIEUCH + {0xB89F, 0xD228}, //9451 #HANGUL SYLLABLE THIEUTH YO KHIEUKH + {0xB8A0, 0xD229}, //9452 #HANGUL SYLLABLE THIEUTH YO THIEUTH + {0xB8A1, 0xB96B}, //9453 #HANGUL SYLLABLE RIEUL YU SIOS + {0xB8A2, 0xB96D}, //9454 #HANGUL SYLLABLE RIEUL YU IEUNG + {0xB8A3, 0xB974}, //9455 #HANGUL SYLLABLE RIEUL EU + {0xB8A4, 0xB975}, //9456 #HANGUL SYLLABLE RIEUL EU KIYEOK + {0xB8A5, 0xB978}, //9457 #HANGUL SYLLABLE RIEUL EU NIEUN + {0xB8A6, 0xB97C}, //9458 #HANGUL SYLLABLE RIEUL EU RIEUL + {0xB8A7, 0xB984}, //9459 #HANGUL SYLLABLE RIEUL EU MIEUM + {0xB8A8, 0xB985}, //9460 #HANGUL SYLLABLE RIEUL EU PIEUP + {0xB8A9, 0xB987}, //9461 #HANGUL SYLLABLE RIEUL EU SIOS + {0xB8AA, 0xB989}, //9462 #HANGUL SYLLABLE RIEUL EU IEUNG + {0xB8AB, 0xB98A}, //9463 #HANGUL SYLLABLE RIEUL EU CIEUC + {0xB8AC, 0xB98D}, //9464 #HANGUL SYLLABLE RIEUL EU THIEUTH + {0xB8AD, 0xB98E}, //9465 #HANGUL SYLLABLE RIEUL EU PHIEUPH + {0xB8AE, 0xB9AC}, //9466 #HANGUL SYLLABLE RIEUL I + {0xB8AF, 0xB9AD}, //9467 #HANGUL SYLLABLE RIEUL I KIYEOK + {0xB8B0, 0xB9B0}, //9468 #HANGUL SYLLABLE RIEUL I NIEUN + {0xB8B1, 0xB9B4}, //9469 #HANGUL SYLLABLE RIEUL I RIEUL + {0xB8B2, 0xB9BC}, //9470 #HANGUL SYLLABLE RIEUL I MIEUM + {0xB8B3, 0xB9BD}, //9471 #HANGUL SYLLABLE RIEUL I PIEUP + {0xB8B4, 0xB9BF}, //9472 #HANGUL SYLLABLE RIEUL I SIOS + {0xB8B5, 0xB9C1}, //9473 #HANGUL SYLLABLE RIEUL I IEUNG + {0xB8B6, 0xB9C8}, //9474 #HANGUL SYLLABLE MIEUM A + {0xB8B7, 0xB9C9}, //9475 #HANGUL SYLLABLE MIEUM A KIYEOK + {0xB8B8, 0xB9CC}, //9476 #HANGUL SYLLABLE MIEUM A NIEUN + {0xB8B9, 0xB9CE}, //9477 #HANGUL SYLLABLE MIEUM A NIEUNHIEUH + {0xB8BA, 0xB9CF}, //9478 #HANGUL SYLLABLE MIEUM A TIKEUT + {0xB8BB, 0xB9D0}, //9479 #HANGUL SYLLABLE MIEUM A RIEUL + {0xB8BC, 0xB9D1}, //9480 #HANGUL SYLLABLE MIEUM A RIEULKIYEOK + {0xB8BD, 0xB9D2}, //9481 #HANGUL SYLLABLE MIEUM A RIEULMIEUM + {0xB8BE, 0xB9D8}, //9482 #HANGUL SYLLABLE MIEUM A MIEUM + {0xB8BF, 0xB9D9}, //9483 #HANGUL SYLLABLE MIEUM A PIEUP + {0xB8C0, 0xB9DB}, //9484 #HANGUL SYLLABLE MIEUM A SIOS + {0xB8C1, 0xB9DD}, //9485 #HANGUL SYLLABLE MIEUM A IEUNG + {0xB8C2, 0xB9DE}, //9486 #HANGUL SYLLABLE MIEUM A CIEUC + {0xB8C3, 0xB9E1}, //9487 #HANGUL SYLLABLE MIEUM A THIEUTH + {0xB8C4, 0xB9E3}, //9488 #HANGUL SYLLABLE MIEUM A HIEUH + {0xB8C5, 0xB9E4}, //9489 #HANGUL SYLLABLE MIEUM AE + {0xB8C6, 0xB9E5}, //9490 #HANGUL SYLLABLE MIEUM AE KIYEOK + {0xB8C7, 0xB9E8}, //9491 #HANGUL SYLLABLE MIEUM AE NIEUN + {0xB8C8, 0xB9EC}, //9492 #HANGUL SYLLABLE MIEUM AE RIEUL + {0xB8C9, 0xB9F4}, //9493 #HANGUL SYLLABLE MIEUM AE MIEUM + {0xB8CA, 0xB9F5}, //9494 #HANGUL SYLLABLE MIEUM AE PIEUP + {0xB8CB, 0xB9F7}, //9495 #HANGUL SYLLABLE MIEUM AE SIOS + {0xB8CC, 0xB9F8}, //9496 #HANGUL SYLLABLE MIEUM AE SSANGSIOS + {0xB8CD, 0xB9F9}, //9497 #HANGUL SYLLABLE MIEUM AE IEUNG + {0xB8CE, 0xB9FA}, //9498 #HANGUL SYLLABLE MIEUM AE CIEUC + {0xB8CF, 0xBA00}, //9499 #HANGUL SYLLABLE MIEUM YA + {0xB8D0, 0xBA01}, //9500 #HANGUL SYLLABLE MIEUM YA KIYEOK + {0xB8D1, 0xBA08}, //9501 #HANGUL SYLLABLE MIEUM YA RIEUL + {0xB8D2, 0xBA15}, //9502 #HANGUL SYLLABLE MIEUM YA IEUNG + {0xB8D3, 0xBA38}, //9503 #HANGUL SYLLABLE MIEUM EO + {0xB8D4, 0xBA39}, //9504 #HANGUL SYLLABLE MIEUM EO KIYEOK + {0xB8D5, 0xBA3C}, //9505 #HANGUL SYLLABLE MIEUM EO NIEUN + {0xB8D6, 0xBA40}, //9506 #HANGUL SYLLABLE MIEUM EO RIEUL + {0xB8D7, 0xBA42}, //9507 #HANGUL SYLLABLE MIEUM EO RIEULMIEUM + {0xB8D8, 0xBA48}, //9508 #HANGUL SYLLABLE MIEUM EO MIEUM + {0xB8D9, 0xBA49}, //9509 #HANGUL SYLLABLE MIEUM EO PIEUP + {0xB8DA, 0xBA4B}, //9510 #HANGUL SYLLABLE MIEUM EO SIOS + {0xB8DB, 0xBA4D}, //9511 #HANGUL SYLLABLE MIEUM EO IEUNG + {0xB8DC, 0xBA4E}, //9512 #HANGUL SYLLABLE MIEUM EO CIEUC + {0xB8DD, 0xBA53}, //9513 #HANGUL SYLLABLE MIEUM EO HIEUH + {0xB8DE, 0xBA54}, //9514 #HANGUL SYLLABLE MIEUM E + {0xB8DF, 0xBA55}, //9515 #HANGUL SYLLABLE MIEUM E KIYEOK + {0xB8E0, 0xBA58}, //9516 #HANGUL SYLLABLE MIEUM E NIEUN + {0xB8E1, 0xBA5C}, //9517 #HANGUL SYLLABLE MIEUM E RIEUL + {0xB8E2, 0xBA64}, //9518 #HANGUL SYLLABLE MIEUM E MIEUM + {0xB8E3, 0xBA65}, //9519 #HANGUL SYLLABLE MIEUM E PIEUP + {0xB8E4, 0xBA67}, //9520 #HANGUL SYLLABLE MIEUM E SIOS + {0xB8E5, 0xBA68}, //9521 #HANGUL SYLLABLE MIEUM E SSANGSIOS + {0xB8E6, 0xBA69}, //9522 #HANGUL SYLLABLE MIEUM E IEUNG + {0xB8E7, 0xBA70}, //9523 #HANGUL SYLLABLE MIEUM YEO + {0xB8E8, 0xBA71}, //9524 #HANGUL SYLLABLE MIEUM YEO KIYEOK + {0xB8E9, 0xBA74}, //9525 #HANGUL SYLLABLE MIEUM YEO NIEUN + {0xB8EA, 0xBA78}, //9526 #HANGUL SYLLABLE MIEUM YEO RIEUL + {0xB8EB, 0xBA83}, //9527 #HANGUL SYLLABLE MIEUM YEO SIOS + {0xB8EC, 0xBA84}, //9528 #HANGUL SYLLABLE MIEUM YEO SSANGSIOS + {0xB8ED, 0xBA85}, //9529 #HANGUL SYLLABLE MIEUM YEO IEUNG + {0xB8EE, 0xBA87}, //9530 #HANGUL SYLLABLE MIEUM YEO CHIEUCH + {0xB8EF, 0xBA8C}, //9531 #HANGUL SYLLABLE MIEUM YE + {0xB8F0, 0xBAA8}, //9532 #HANGUL SYLLABLE MIEUM O + {0xB8F1, 0xBAA9}, //9533 #HANGUL SYLLABLE MIEUM O KIYEOK + {0xB8F2, 0xBAAB}, //9534 #HANGUL SYLLABLE MIEUM O KIYEOKSIOS + {0xB8F3, 0xBAAC}, //9535 #HANGUL SYLLABLE MIEUM O NIEUN + {0xB8F4, 0xBAB0}, //9536 #HANGUL SYLLABLE MIEUM O RIEUL + {0xB8F5, 0xBAB2}, //9537 #HANGUL SYLLABLE MIEUM O RIEULMIEUM + {0xB8F6, 0xBAB8}, //9538 #HANGUL SYLLABLE MIEUM O MIEUM + {0xB8F7, 0xBAB9}, //9539 #HANGUL SYLLABLE MIEUM O PIEUP + {0xB8F8, 0xBABB}, //9540 #HANGUL SYLLABLE MIEUM O SIOS + {0xB8F9, 0xBABD}, //9541 #HANGUL SYLLABLE MIEUM O IEUNG + {0xB8FA, 0xBAC4}, //9542 #HANGUL SYLLABLE MIEUM WA + {0xB8FB, 0xBAC8}, //9543 #HANGUL SYLLABLE MIEUM WA NIEUN + {0xB8FC, 0xBAD8}, //9544 #HANGUL SYLLABLE MIEUM WA SSANGSIOS + {0xB8FD, 0xBAD9}, //9545 #HANGUL SYLLABLE MIEUM WA IEUNG + {0xB8FE, 0xBAFC}, //9546 #HANGUL SYLLABLE MIEUM OE + {0xB941, 0xD22A}, //9547 #HANGUL SYLLABLE THIEUTH YO PHIEUPH + {0xB942, 0xD22B}, //9548 #HANGUL SYLLABLE THIEUTH YO HIEUH + {0xB943, 0xD22E}, //9549 #HANGUL SYLLABLE THIEUTH U SSANGKIYEOK + {0xB944, 0xD22F}, //9550 #HANGUL SYLLABLE THIEUTH U KIYEOKSIOS + {0xB945, 0xD231}, //9551 #HANGUL SYLLABLE THIEUTH U NIEUNCIEUC + {0xB946, 0xD232}, //9552 #HANGUL SYLLABLE THIEUTH U NIEUNHIEUH + {0xB947, 0xD233}, //9553 #HANGUL SYLLABLE THIEUTH U TIKEUT + {0xB948, 0xD235}, //9554 #HANGUL SYLLABLE THIEUTH U RIEULKIYEOK + {0xB949, 0xD236}, //9555 #HANGUL SYLLABLE THIEUTH U RIEULMIEUM + {0xB94A, 0xD237}, //9556 #HANGUL SYLLABLE THIEUTH U RIEULPIEUP + {0xB94B, 0xD238}, //9557 #HANGUL SYLLABLE THIEUTH U RIEULSIOS + {0xB94C, 0xD239}, //9558 #HANGUL SYLLABLE THIEUTH U RIEULTHIEUTH + {0xB94D, 0xD23A}, //9559 #HANGUL SYLLABLE THIEUTH U RIEULPHIEUPH + {0xB94E, 0xD23B}, //9560 #HANGUL SYLLABLE THIEUTH U RIEULHIEUH + {0xB94F, 0xD23E}, //9561 #HANGUL SYLLABLE THIEUTH U PIEUPSIOS + {0xB950, 0xD240}, //9562 #HANGUL SYLLABLE THIEUTH U SSANGSIOS + {0xB951, 0xD242}, //9563 #HANGUL SYLLABLE THIEUTH U CIEUC + {0xB952, 0xD243}, //9564 #HANGUL SYLLABLE THIEUTH U CHIEUCH + {0xB953, 0xD244}, //9565 #HANGUL SYLLABLE THIEUTH U KHIEUKH + {0xB954, 0xD245}, //9566 #HANGUL SYLLABLE THIEUTH U THIEUTH + {0xB955, 0xD246}, //9567 #HANGUL SYLLABLE THIEUTH U PHIEUPH + {0xB956, 0xD247}, //9568 #HANGUL SYLLABLE THIEUTH U HIEUH + {0xB957, 0xD249}, //9569 #HANGUL SYLLABLE THIEUTH WEO KIYEOK + {0xB958, 0xD24A}, //9570 #HANGUL SYLLABLE THIEUTH WEO SSANGKIYEOK + {0xB959, 0xD24B}, //9571 #HANGUL SYLLABLE THIEUTH WEO KIYEOKSIOS + {0xB95A, 0xD24C}, //9572 #HANGUL SYLLABLE THIEUTH WEO NIEUN + {0xB961, 0xD24D}, //9573 #HANGUL SYLLABLE THIEUTH WEO NIEUNCIEUC + {0xB962, 0xD24E}, //9574 #HANGUL SYLLABLE THIEUTH WEO NIEUNHIEUH + {0xB963, 0xD24F}, //9575 #HANGUL SYLLABLE THIEUTH WEO TIKEUT + {0xB964, 0xD250}, //9576 #HANGUL SYLLABLE THIEUTH WEO RIEUL + {0xB965, 0xD251}, //9577 #HANGUL SYLLABLE THIEUTH WEO RIEULKIYEOK + {0xB966, 0xD252}, //9578 #HANGUL SYLLABLE THIEUTH WEO RIEULMIEUM + {0xB967, 0xD253}, //9579 #HANGUL SYLLABLE THIEUTH WEO RIEULPIEUP + {0xB968, 0xD254}, //9580 #HANGUL SYLLABLE THIEUTH WEO RIEULSIOS + {0xB969, 0xD255}, //9581 #HANGUL SYLLABLE THIEUTH WEO RIEULTHIEUTH + {0xB96A, 0xD256}, //9582 #HANGUL SYLLABLE THIEUTH WEO RIEULPHIEUPH + {0xB96B, 0xD257}, //9583 #HANGUL SYLLABLE THIEUTH WEO RIEULHIEUH + {0xB96C, 0xD258}, //9584 #HANGUL SYLLABLE THIEUTH WEO MIEUM + {0xB96D, 0xD259}, //9585 #HANGUL SYLLABLE THIEUTH WEO PIEUP + {0xB96E, 0xD25A}, //9586 #HANGUL SYLLABLE THIEUTH WEO PIEUPSIOS + {0xB96F, 0xD25B}, //9587 #HANGUL SYLLABLE THIEUTH WEO SIOS + {0xB970, 0xD25D}, //9588 #HANGUL SYLLABLE THIEUTH WEO IEUNG + {0xB971, 0xD25E}, //9589 #HANGUL SYLLABLE THIEUTH WEO CIEUC + {0xB972, 0xD25F}, //9590 #HANGUL SYLLABLE THIEUTH WEO CHIEUCH + {0xB973, 0xD260}, //9591 #HANGUL SYLLABLE THIEUTH WEO KHIEUKH + {0xB974, 0xD261}, //9592 #HANGUL SYLLABLE THIEUTH WEO THIEUTH + {0xB975, 0xD262}, //9593 #HANGUL SYLLABLE THIEUTH WEO PHIEUPH + {0xB976, 0xD263}, //9594 #HANGUL SYLLABLE THIEUTH WEO HIEUH + {0xB977, 0xD265}, //9595 #HANGUL SYLLABLE THIEUTH WE KIYEOK + {0xB978, 0xD266}, //9596 #HANGUL SYLLABLE THIEUTH WE SSANGKIYEOK + {0xB979, 0xD267}, //9597 #HANGUL SYLLABLE THIEUTH WE KIYEOKSIOS + {0xB97A, 0xD268}, //9598 #HANGUL SYLLABLE THIEUTH WE NIEUN + {0xB981, 0xD269}, //9599 #HANGUL SYLLABLE THIEUTH WE NIEUNCIEUC + {0xB982, 0xD26A}, //9600 #HANGUL SYLLABLE THIEUTH WE NIEUNHIEUH + {0xB983, 0xD26B}, //9601 #HANGUL SYLLABLE THIEUTH WE TIKEUT + {0xB984, 0xD26C}, //9602 #HANGUL SYLLABLE THIEUTH WE RIEUL + {0xB985, 0xD26D}, //9603 #HANGUL SYLLABLE THIEUTH WE RIEULKIYEOK + {0xB986, 0xD26E}, //9604 #HANGUL SYLLABLE THIEUTH WE RIEULMIEUM + {0xB987, 0xD26F}, //9605 #HANGUL SYLLABLE THIEUTH WE RIEULPIEUP + {0xB988, 0xD270}, //9606 #HANGUL SYLLABLE THIEUTH WE RIEULSIOS + {0xB989, 0xD271}, //9607 #HANGUL SYLLABLE THIEUTH WE RIEULTHIEUTH + {0xB98A, 0xD272}, //9608 #HANGUL SYLLABLE THIEUTH WE RIEULPHIEUPH + {0xB98B, 0xD273}, //9609 #HANGUL SYLLABLE THIEUTH WE RIEULHIEUH + {0xB98C, 0xD274}, //9610 #HANGUL SYLLABLE THIEUTH WE MIEUM + {0xB98D, 0xD275}, //9611 #HANGUL SYLLABLE THIEUTH WE PIEUP + {0xB98E, 0xD276}, //9612 #HANGUL SYLLABLE THIEUTH WE PIEUPSIOS + {0xB98F, 0xD277}, //9613 #HANGUL SYLLABLE THIEUTH WE SIOS + {0xB990, 0xD278}, //9614 #HANGUL SYLLABLE THIEUTH WE SSANGSIOS + {0xB991, 0xD279}, //9615 #HANGUL SYLLABLE THIEUTH WE IEUNG + {0xB992, 0xD27A}, //9616 #HANGUL SYLLABLE THIEUTH WE CIEUC + {0xB993, 0xD27B}, //9617 #HANGUL SYLLABLE THIEUTH WE CHIEUCH + {0xB994, 0xD27C}, //9618 #HANGUL SYLLABLE THIEUTH WE KHIEUKH + {0xB995, 0xD27D}, //9619 #HANGUL SYLLABLE THIEUTH WE THIEUTH + {0xB996, 0xD27E}, //9620 #HANGUL SYLLABLE THIEUTH WE PHIEUPH + {0xB997, 0xD27F}, //9621 #HANGUL SYLLABLE THIEUTH WE HIEUH + {0xB998, 0xD282}, //9622 #HANGUL SYLLABLE THIEUTH WI SSANGKIYEOK + {0xB999, 0xD283}, //9623 #HANGUL SYLLABLE THIEUTH WI KIYEOKSIOS + {0xB99A, 0xD285}, //9624 #HANGUL SYLLABLE THIEUTH WI NIEUNCIEUC + {0xB99B, 0xD286}, //9625 #HANGUL SYLLABLE THIEUTH WI NIEUNHIEUH + {0xB99C, 0xD287}, //9626 #HANGUL SYLLABLE THIEUTH WI TIKEUT + {0xB99D, 0xD289}, //9627 #HANGUL SYLLABLE THIEUTH WI RIEULKIYEOK + {0xB99E, 0xD28A}, //9628 #HANGUL SYLLABLE THIEUTH WI RIEULMIEUM + {0xB99F, 0xD28B}, //9629 #HANGUL SYLLABLE THIEUTH WI RIEULPIEUP + {0xB9A0, 0xD28C}, //9630 #HANGUL SYLLABLE THIEUTH WI RIEULSIOS + {0xB9A1, 0xBB00}, //9631 #HANGUL SYLLABLE MIEUM OE NIEUN + {0xB9A2, 0xBB04}, //9632 #HANGUL SYLLABLE MIEUM OE RIEUL + {0xB9A3, 0xBB0D}, //9633 #HANGUL SYLLABLE MIEUM OE PIEUP + {0xB9A4, 0xBB0F}, //9634 #HANGUL SYLLABLE MIEUM OE SIOS + {0xB9A5, 0xBB11}, //9635 #HANGUL SYLLABLE MIEUM OE IEUNG + {0xB9A6, 0xBB18}, //9636 #HANGUL SYLLABLE MIEUM YO + {0xB9A7, 0xBB1C}, //9637 #HANGUL SYLLABLE MIEUM YO NIEUN + {0xB9A8, 0xBB20}, //9638 #HANGUL SYLLABLE MIEUM YO RIEUL + {0xB9A9, 0xBB29}, //9639 #HANGUL SYLLABLE MIEUM YO PIEUP + {0xB9AA, 0xBB2B}, //9640 #HANGUL SYLLABLE MIEUM YO SIOS + {0xB9AB, 0xBB34}, //9641 #HANGUL SYLLABLE MIEUM U + {0xB9AC, 0xBB35}, //9642 #HANGUL SYLLABLE MIEUM U KIYEOK + {0xB9AD, 0xBB36}, //9643 #HANGUL SYLLABLE MIEUM U SSANGKIYEOK + {0xB9AE, 0xBB38}, //9644 #HANGUL SYLLABLE MIEUM U NIEUN + {0xB9AF, 0xBB3B}, //9645 #HANGUL SYLLABLE MIEUM U TIKEUT + {0xB9B0, 0xBB3C}, //9646 #HANGUL SYLLABLE MIEUM U RIEUL + {0xB9B1, 0xBB3D}, //9647 #HANGUL SYLLABLE MIEUM U RIEULKIYEOK + {0xB9B2, 0xBB3E}, //9648 #HANGUL SYLLABLE MIEUM U RIEULMIEUM + {0xB9B3, 0xBB44}, //9649 #HANGUL SYLLABLE MIEUM U MIEUM + {0xB9B4, 0xBB45}, //9650 #HANGUL SYLLABLE MIEUM U PIEUP + {0xB9B5, 0xBB47}, //9651 #HANGUL SYLLABLE MIEUM U SIOS + {0xB9B6, 0xBB49}, //9652 #HANGUL SYLLABLE MIEUM U IEUNG + {0xB9B7, 0xBB4D}, //9653 #HANGUL SYLLABLE MIEUM U THIEUTH + {0xB9B8, 0xBB4F}, //9654 #HANGUL SYLLABLE MIEUM U HIEUH + {0xB9B9, 0xBB50}, //9655 #HANGUL SYLLABLE MIEUM WEO + {0xB9BA, 0xBB54}, //9656 #HANGUL SYLLABLE MIEUM WEO NIEUN + {0xB9BB, 0xBB58}, //9657 #HANGUL SYLLABLE MIEUM WEO RIEUL + {0xB9BC, 0xBB61}, //9658 #HANGUL SYLLABLE MIEUM WEO PIEUP + {0xB9BD, 0xBB63}, //9659 #HANGUL SYLLABLE MIEUM WEO SIOS + {0xB9BE, 0xBB6C}, //9660 #HANGUL SYLLABLE MIEUM WE + {0xB9BF, 0xBB88}, //9661 #HANGUL SYLLABLE MIEUM WI + {0xB9C0, 0xBB8C}, //9662 #HANGUL SYLLABLE MIEUM WI NIEUN + {0xB9C1, 0xBB90}, //9663 #HANGUL SYLLABLE MIEUM WI RIEUL + {0xB9C2, 0xBBA4}, //9664 #HANGUL SYLLABLE MIEUM YU + {0xB9C3, 0xBBA8}, //9665 #HANGUL SYLLABLE MIEUM YU NIEUN + {0xB9C4, 0xBBAC}, //9666 #HANGUL SYLLABLE MIEUM YU RIEUL + {0xB9C5, 0xBBB4}, //9667 #HANGUL SYLLABLE MIEUM YU MIEUM + {0xB9C6, 0xBBB7}, //9668 #HANGUL SYLLABLE MIEUM YU SIOS + {0xB9C7, 0xBBC0}, //9669 #HANGUL SYLLABLE MIEUM EU + {0xB9C8, 0xBBC4}, //9670 #HANGUL SYLLABLE MIEUM EU NIEUN + {0xB9C9, 0xBBC8}, //9671 #HANGUL SYLLABLE MIEUM EU RIEUL + {0xB9CA, 0xBBD0}, //9672 #HANGUL SYLLABLE MIEUM EU MIEUM + {0xB9CB, 0xBBD3}, //9673 #HANGUL SYLLABLE MIEUM EU SIOS + {0xB9CC, 0xBBF8}, //9674 #HANGUL SYLLABLE MIEUM I + {0xB9CD, 0xBBF9}, //9675 #HANGUL SYLLABLE MIEUM I KIYEOK + {0xB9CE, 0xBBFC}, //9676 #HANGUL SYLLABLE MIEUM I NIEUN + {0xB9CF, 0xBBFF}, //9677 #HANGUL SYLLABLE MIEUM I TIKEUT + {0xB9D0, 0xBC00}, //9678 #HANGUL SYLLABLE MIEUM I RIEUL + {0xB9D1, 0xBC02}, //9679 #HANGUL SYLLABLE MIEUM I RIEULMIEUM + {0xB9D2, 0xBC08}, //9680 #HANGUL SYLLABLE MIEUM I MIEUM + {0xB9D3, 0xBC09}, //9681 #HANGUL SYLLABLE MIEUM I PIEUP + {0xB9D4, 0xBC0B}, //9682 #HANGUL SYLLABLE MIEUM I SIOS + {0xB9D5, 0xBC0C}, //9683 #HANGUL SYLLABLE MIEUM I SSANGSIOS + {0xB9D6, 0xBC0D}, //9684 #HANGUL SYLLABLE MIEUM I IEUNG + {0xB9D7, 0xBC0F}, //9685 #HANGUL SYLLABLE MIEUM I CHIEUCH + {0xB9D8, 0xBC11}, //9686 #HANGUL SYLLABLE MIEUM I THIEUTH + {0xB9D9, 0xBC14}, //9687 #HANGUL SYLLABLE PIEUP A + {0xB9DA, 0xBC15}, //9688 #HANGUL SYLLABLE PIEUP A KIYEOK + {0xB9DB, 0xBC16}, //9689 #HANGUL SYLLABLE PIEUP A SSANGKIYEOK + {0xB9DC, 0xBC17}, //9690 #HANGUL SYLLABLE PIEUP A KIYEOKSIOS + {0xB9DD, 0xBC18}, //9691 #HANGUL SYLLABLE PIEUP A NIEUN + {0xB9DE, 0xBC1B}, //9692 #HANGUL SYLLABLE PIEUP A TIKEUT + {0xB9DF, 0xBC1C}, //9693 #HANGUL SYLLABLE PIEUP A RIEUL + {0xB9E0, 0xBC1D}, //9694 #HANGUL SYLLABLE PIEUP A RIEULKIYEOK + {0xB9E1, 0xBC1E}, //9695 #HANGUL SYLLABLE PIEUP A RIEULMIEUM + {0xB9E2, 0xBC1F}, //9696 #HANGUL SYLLABLE PIEUP A RIEULPIEUP + {0xB9E3, 0xBC24}, //9697 #HANGUL SYLLABLE PIEUP A MIEUM + {0xB9E4, 0xBC25}, //9698 #HANGUL SYLLABLE PIEUP A PIEUP + {0xB9E5, 0xBC27}, //9699 #HANGUL SYLLABLE PIEUP A SIOS + {0xB9E6, 0xBC29}, //9700 #HANGUL SYLLABLE PIEUP A IEUNG + {0xB9E7, 0xBC2D}, //9701 #HANGUL SYLLABLE PIEUP A THIEUTH + {0xB9E8, 0xBC30}, //9702 #HANGUL SYLLABLE PIEUP AE + {0xB9E9, 0xBC31}, //9703 #HANGUL SYLLABLE PIEUP AE KIYEOK + {0xB9EA, 0xBC34}, //9704 #HANGUL SYLLABLE PIEUP AE NIEUN + {0xB9EB, 0xBC38}, //9705 #HANGUL SYLLABLE PIEUP AE RIEUL + {0xB9EC, 0xBC40}, //9706 #HANGUL SYLLABLE PIEUP AE MIEUM + {0xB9ED, 0xBC41}, //9707 #HANGUL SYLLABLE PIEUP AE PIEUP + {0xB9EE, 0xBC43}, //9708 #HANGUL SYLLABLE PIEUP AE SIOS + {0xB9EF, 0xBC44}, //9709 #HANGUL SYLLABLE PIEUP AE SSANGSIOS + {0xB9F0, 0xBC45}, //9710 #HANGUL SYLLABLE PIEUP AE IEUNG + {0xB9F1, 0xBC49}, //9711 #HANGUL SYLLABLE PIEUP AE THIEUTH + {0xB9F2, 0xBC4C}, //9712 #HANGUL SYLLABLE PIEUP YA + {0xB9F3, 0xBC4D}, //9713 #HANGUL SYLLABLE PIEUP YA KIYEOK + {0xB9F4, 0xBC50}, //9714 #HANGUL SYLLABLE PIEUP YA NIEUN + {0xB9F5, 0xBC5D}, //9715 #HANGUL SYLLABLE PIEUP YA PIEUP + {0xB9F6, 0xBC84}, //9716 #HANGUL SYLLABLE PIEUP EO + {0xB9F7, 0xBC85}, //9717 #HANGUL SYLLABLE PIEUP EO KIYEOK + {0xB9F8, 0xBC88}, //9718 #HANGUL SYLLABLE PIEUP EO NIEUN + {0xB9F9, 0xBC8B}, //9719 #HANGUL SYLLABLE PIEUP EO TIKEUT + {0xB9FA, 0xBC8C}, //9720 #HANGUL SYLLABLE PIEUP EO RIEUL + {0xB9FB, 0xBC8E}, //9721 #HANGUL SYLLABLE PIEUP EO RIEULMIEUM + {0xB9FC, 0xBC94}, //9722 #HANGUL SYLLABLE PIEUP EO MIEUM + {0xB9FD, 0xBC95}, //9723 #HANGUL SYLLABLE PIEUP EO PIEUP + {0xB9FE, 0xBC97}, //9724 #HANGUL SYLLABLE PIEUP EO SIOS + {0xBA41, 0xD28D}, //9725 #HANGUL SYLLABLE THIEUTH WI RIEULTHIEUTH + {0xBA42, 0xD28E}, //9726 #HANGUL SYLLABLE THIEUTH WI RIEULPHIEUPH + {0xBA43, 0xD28F}, //9727 #HANGUL SYLLABLE THIEUTH WI RIEULHIEUH + {0xBA44, 0xD292}, //9728 #HANGUL SYLLABLE THIEUTH WI PIEUPSIOS + {0xBA45, 0xD293}, //9729 #HANGUL SYLLABLE THIEUTH WI SIOS + {0xBA46, 0xD294}, //9730 #HANGUL SYLLABLE THIEUTH WI SSANGSIOS + {0xBA47, 0xD296}, //9731 #HANGUL SYLLABLE THIEUTH WI CIEUC + {0xBA48, 0xD297}, //9732 #HANGUL SYLLABLE THIEUTH WI CHIEUCH + {0xBA49, 0xD298}, //9733 #HANGUL SYLLABLE THIEUTH WI KHIEUKH + {0xBA4A, 0xD299}, //9734 #HANGUL SYLLABLE THIEUTH WI THIEUTH + {0xBA4B, 0xD29A}, //9735 #HANGUL SYLLABLE THIEUTH WI PHIEUPH + {0xBA4C, 0xD29B}, //9736 #HANGUL SYLLABLE THIEUTH WI HIEUH + {0xBA4D, 0xD29D}, //9737 #HANGUL SYLLABLE THIEUTH YU KIYEOK + {0xBA4E, 0xD29E}, //9738 #HANGUL SYLLABLE THIEUTH YU SSANGKIYEOK + {0xBA4F, 0xD29F}, //9739 #HANGUL SYLLABLE THIEUTH YU KIYEOKSIOS + {0xBA50, 0xD2A1}, //9740 #HANGUL SYLLABLE THIEUTH YU NIEUNCIEUC + {0xBA51, 0xD2A2}, //9741 #HANGUL SYLLABLE THIEUTH YU NIEUNHIEUH + {0xBA52, 0xD2A3}, //9742 #HANGUL SYLLABLE THIEUTH YU TIKEUT + {0xBA53, 0xD2A5}, //9743 #HANGUL SYLLABLE THIEUTH YU RIEULKIYEOK + {0xBA54, 0xD2A6}, //9744 #HANGUL SYLLABLE THIEUTH YU RIEULMIEUM + {0xBA55, 0xD2A7}, //9745 #HANGUL SYLLABLE THIEUTH YU RIEULPIEUP + {0xBA56, 0xD2A8}, //9746 #HANGUL SYLLABLE THIEUTH YU RIEULSIOS + {0xBA57, 0xD2A9}, //9747 #HANGUL SYLLABLE THIEUTH YU RIEULTHIEUTH + {0xBA58, 0xD2AA}, //9748 #HANGUL SYLLABLE THIEUTH YU RIEULPHIEUPH + {0xBA59, 0xD2AB}, //9749 #HANGUL SYLLABLE THIEUTH YU RIEULHIEUH + {0xBA5A, 0xD2AD}, //9750 #HANGUL SYLLABLE THIEUTH YU PIEUP + {0xBA61, 0xD2AE}, //9751 #HANGUL SYLLABLE THIEUTH YU PIEUPSIOS + {0xBA62, 0xD2AF}, //9752 #HANGUL SYLLABLE THIEUTH YU SIOS + {0xBA63, 0xD2B0}, //9753 #HANGUL SYLLABLE THIEUTH YU SSANGSIOS + {0xBA64, 0xD2B2}, //9754 #HANGUL SYLLABLE THIEUTH YU CIEUC + {0xBA65, 0xD2B3}, //9755 #HANGUL SYLLABLE THIEUTH YU CHIEUCH + {0xBA66, 0xD2B4}, //9756 #HANGUL SYLLABLE THIEUTH YU KHIEUKH + {0xBA67, 0xD2B5}, //9757 #HANGUL SYLLABLE THIEUTH YU THIEUTH + {0xBA68, 0xD2B6}, //9758 #HANGUL SYLLABLE THIEUTH YU PHIEUPH + {0xBA69, 0xD2B7}, //9759 #HANGUL SYLLABLE THIEUTH YU HIEUH + {0xBA6A, 0xD2BA}, //9760 #HANGUL SYLLABLE THIEUTH EU SSANGKIYEOK + {0xBA6B, 0xD2BB}, //9761 #HANGUL SYLLABLE THIEUTH EU KIYEOKSIOS + {0xBA6C, 0xD2BD}, //9762 #HANGUL SYLLABLE THIEUTH EU NIEUNCIEUC + {0xBA6D, 0xD2BE}, //9763 #HANGUL SYLLABLE THIEUTH EU NIEUNHIEUH + {0xBA6E, 0xD2C1}, //9764 #HANGUL SYLLABLE THIEUTH EU RIEULKIYEOK + {0xBA6F, 0xD2C3}, //9765 #HANGUL SYLLABLE THIEUTH EU RIEULPIEUP + {0xBA70, 0xD2C4}, //9766 #HANGUL SYLLABLE THIEUTH EU RIEULSIOS + {0xBA71, 0xD2C5}, //9767 #HANGUL SYLLABLE THIEUTH EU RIEULTHIEUTH + {0xBA72, 0xD2C6}, //9768 #HANGUL SYLLABLE THIEUTH EU RIEULPHIEUPH + {0xBA73, 0xD2C7}, //9769 #HANGUL SYLLABLE THIEUTH EU RIEULHIEUH + {0xBA74, 0xD2CA}, //9770 #HANGUL SYLLABLE THIEUTH EU PIEUPSIOS + {0xBA75, 0xD2CC}, //9771 #HANGUL SYLLABLE THIEUTH EU SSANGSIOS + {0xBA76, 0xD2CD}, //9772 #HANGUL SYLLABLE THIEUTH EU IEUNG + {0xBA77, 0xD2CE}, //9773 #HANGUL SYLLABLE THIEUTH EU CIEUC + {0xBA78, 0xD2CF}, //9774 #HANGUL SYLLABLE THIEUTH EU CHIEUCH + {0xBA79, 0xD2D0}, //9775 #HANGUL SYLLABLE THIEUTH EU KHIEUKH + {0xBA7A, 0xD2D1}, //9776 #HANGUL SYLLABLE THIEUTH EU THIEUTH + {0xBA81, 0xD2D2}, //9777 #HANGUL SYLLABLE THIEUTH EU PHIEUPH + {0xBA82, 0xD2D3}, //9778 #HANGUL SYLLABLE THIEUTH EU HIEUH + {0xBA83, 0xD2D5}, //9779 #HANGUL SYLLABLE THIEUTH YI KIYEOK + {0xBA84, 0xD2D6}, //9780 #HANGUL SYLLABLE THIEUTH YI SSANGKIYEOK + {0xBA85, 0xD2D7}, //9781 #HANGUL SYLLABLE THIEUTH YI KIYEOKSIOS + {0xBA86, 0xD2D9}, //9782 #HANGUL SYLLABLE THIEUTH YI NIEUNCIEUC + {0xBA87, 0xD2DA}, //9783 #HANGUL SYLLABLE THIEUTH YI NIEUNHIEUH + {0xBA88, 0xD2DB}, //9784 #HANGUL SYLLABLE THIEUTH YI TIKEUT + {0xBA89, 0xD2DD}, //9785 #HANGUL SYLLABLE THIEUTH YI RIEULKIYEOK + {0xBA8A, 0xD2DE}, //9786 #HANGUL SYLLABLE THIEUTH YI RIEULMIEUM + {0xBA8B, 0xD2DF}, //9787 #HANGUL SYLLABLE THIEUTH YI RIEULPIEUP + {0xBA8C, 0xD2E0}, //9788 #HANGUL SYLLABLE THIEUTH YI RIEULSIOS + {0xBA8D, 0xD2E1}, //9789 #HANGUL SYLLABLE THIEUTH YI RIEULTHIEUTH + {0xBA8E, 0xD2E2}, //9790 #HANGUL SYLLABLE THIEUTH YI RIEULPHIEUPH + {0xBA8F, 0xD2E3}, //9791 #HANGUL SYLLABLE THIEUTH YI RIEULHIEUH + {0xBA90, 0xD2E6}, //9792 #HANGUL SYLLABLE THIEUTH YI PIEUPSIOS + {0xBA91, 0xD2E7}, //9793 #HANGUL SYLLABLE THIEUTH YI SIOS + {0xBA92, 0xD2E8}, //9794 #HANGUL SYLLABLE THIEUTH YI SSANGSIOS + {0xBA93, 0xD2E9}, //9795 #HANGUL SYLLABLE THIEUTH YI IEUNG + {0xBA94, 0xD2EA}, //9796 #HANGUL SYLLABLE THIEUTH YI CIEUC + {0xBA95, 0xD2EB}, //9797 #HANGUL SYLLABLE THIEUTH YI CHIEUCH + {0xBA96, 0xD2EC}, //9798 #HANGUL SYLLABLE THIEUTH YI KHIEUKH + {0xBA97, 0xD2ED}, //9799 #HANGUL SYLLABLE THIEUTH YI THIEUTH + {0xBA98, 0xD2EE}, //9800 #HANGUL SYLLABLE THIEUTH YI PHIEUPH + {0xBA99, 0xD2EF}, //9801 #HANGUL SYLLABLE THIEUTH YI HIEUH + {0xBA9A, 0xD2F2}, //9802 #HANGUL SYLLABLE THIEUTH I SSANGKIYEOK + {0xBA9B, 0xD2F3}, //9803 #HANGUL SYLLABLE THIEUTH I KIYEOKSIOS + {0xBA9C, 0xD2F5}, //9804 #HANGUL SYLLABLE THIEUTH I NIEUNCIEUC + {0xBA9D, 0xD2F6}, //9805 #HANGUL SYLLABLE THIEUTH I NIEUNHIEUH + {0xBA9E, 0xD2F7}, //9806 #HANGUL SYLLABLE THIEUTH I TIKEUT + {0xBA9F, 0xD2F9}, //9807 #HANGUL SYLLABLE THIEUTH I RIEULKIYEOK + {0xBAA0, 0xD2FA}, //9808 #HANGUL SYLLABLE THIEUTH I RIEULMIEUM + {0xBAA1, 0xBC99}, //9809 #HANGUL SYLLABLE PIEUP EO IEUNG + {0xBAA2, 0xBC9A}, //9810 #HANGUL SYLLABLE PIEUP EO CIEUC + {0xBAA3, 0xBCA0}, //9811 #HANGUL SYLLABLE PIEUP E + {0xBAA4, 0xBCA1}, //9812 #HANGUL SYLLABLE PIEUP E KIYEOK + {0xBAA5, 0xBCA4}, //9813 #HANGUL SYLLABLE PIEUP E NIEUN + {0xBAA6, 0xBCA7}, //9814 #HANGUL SYLLABLE PIEUP E TIKEUT + {0xBAA7, 0xBCA8}, //9815 #HANGUL SYLLABLE PIEUP E RIEUL + {0xBAA8, 0xBCB0}, //9816 #HANGUL SYLLABLE PIEUP E MIEUM + {0xBAA9, 0xBCB1}, //9817 #HANGUL SYLLABLE PIEUP E PIEUP + {0xBAAA, 0xBCB3}, //9818 #HANGUL SYLLABLE PIEUP E SIOS + {0xBAAB, 0xBCB4}, //9819 #HANGUL SYLLABLE PIEUP E SSANGSIOS + {0xBAAC, 0xBCB5}, //9820 #HANGUL SYLLABLE PIEUP E IEUNG + {0xBAAD, 0xBCBC}, //9821 #HANGUL SYLLABLE PIEUP YEO + {0xBAAE, 0xBCBD}, //9822 #HANGUL SYLLABLE PIEUP YEO KIYEOK + {0xBAAF, 0xBCC0}, //9823 #HANGUL SYLLABLE PIEUP YEO NIEUN + {0xBAB0, 0xBCC4}, //9824 #HANGUL SYLLABLE PIEUP YEO RIEUL + {0xBAB1, 0xBCCD}, //9825 #HANGUL SYLLABLE PIEUP YEO PIEUP + {0xBAB2, 0xBCCF}, //9826 #HANGUL SYLLABLE PIEUP YEO SIOS + {0xBAB3, 0xBCD0}, //9827 #HANGUL SYLLABLE PIEUP YEO SSANGSIOS + {0xBAB4, 0xBCD1}, //9828 #HANGUL SYLLABLE PIEUP YEO IEUNG + {0xBAB5, 0xBCD5}, //9829 #HANGUL SYLLABLE PIEUP YEO THIEUTH + {0xBAB6, 0xBCD8}, //9830 #HANGUL SYLLABLE PIEUP YE + {0xBAB7, 0xBCDC}, //9831 #HANGUL SYLLABLE PIEUP YE NIEUN + {0xBAB8, 0xBCF4}, //9832 #HANGUL SYLLABLE PIEUP O + {0xBAB9, 0xBCF5}, //9833 #HANGUL SYLLABLE PIEUP O KIYEOK + {0xBABA, 0xBCF6}, //9834 #HANGUL SYLLABLE PIEUP O SSANGKIYEOK + {0xBABB, 0xBCF8}, //9835 #HANGUL SYLLABLE PIEUP O NIEUN + {0xBABC, 0xBCFC}, //9836 #HANGUL SYLLABLE PIEUP O RIEUL + {0xBABD, 0xBD04}, //9837 #HANGUL SYLLABLE PIEUP O MIEUM + {0xBABE, 0xBD05}, //9838 #HANGUL SYLLABLE PIEUP O PIEUP + {0xBABF, 0xBD07}, //9839 #HANGUL SYLLABLE PIEUP O SIOS + {0xBAC0, 0xBD09}, //9840 #HANGUL SYLLABLE PIEUP O IEUNG + {0xBAC1, 0xBD10}, //9841 #HANGUL SYLLABLE PIEUP WA + {0xBAC2, 0xBD14}, //9842 #HANGUL SYLLABLE PIEUP WA NIEUN + {0xBAC3, 0xBD24}, //9843 #HANGUL SYLLABLE PIEUP WA SSANGSIOS + {0xBAC4, 0xBD2C}, //9844 #HANGUL SYLLABLE PIEUP WAE + {0xBAC5, 0xBD40}, //9845 #HANGUL SYLLABLE PIEUP WAE SSANGSIOS + {0xBAC6, 0xBD48}, //9846 #HANGUL SYLLABLE PIEUP OE + {0xBAC7, 0xBD49}, //9847 #HANGUL SYLLABLE PIEUP OE KIYEOK + {0xBAC8, 0xBD4C}, //9848 #HANGUL SYLLABLE PIEUP OE NIEUN + {0xBAC9, 0xBD50}, //9849 #HANGUL SYLLABLE PIEUP OE RIEUL + {0xBACA, 0xBD58}, //9850 #HANGUL SYLLABLE PIEUP OE MIEUM + {0xBACB, 0xBD59}, //9851 #HANGUL SYLLABLE PIEUP OE PIEUP + {0xBACC, 0xBD64}, //9852 #HANGUL SYLLABLE PIEUP YO + {0xBACD, 0xBD68}, //9853 #HANGUL SYLLABLE PIEUP YO NIEUN + {0xBACE, 0xBD80}, //9854 #HANGUL SYLLABLE PIEUP U + {0xBACF, 0xBD81}, //9855 #HANGUL SYLLABLE PIEUP U KIYEOK + {0xBAD0, 0xBD84}, //9856 #HANGUL SYLLABLE PIEUP U NIEUN + {0xBAD1, 0xBD87}, //9857 #HANGUL SYLLABLE PIEUP U TIKEUT + {0xBAD2, 0xBD88}, //9858 #HANGUL SYLLABLE PIEUP U RIEUL + {0xBAD3, 0xBD89}, //9859 #HANGUL SYLLABLE PIEUP U RIEULKIYEOK + {0xBAD4, 0xBD8A}, //9860 #HANGUL SYLLABLE PIEUP U RIEULMIEUM + {0xBAD5, 0xBD90}, //9861 #HANGUL SYLLABLE PIEUP U MIEUM + {0xBAD6, 0xBD91}, //9862 #HANGUL SYLLABLE PIEUP U PIEUP + {0xBAD7, 0xBD93}, //9863 #HANGUL SYLLABLE PIEUP U SIOS + {0xBAD8, 0xBD95}, //9864 #HANGUL SYLLABLE PIEUP U IEUNG + {0xBAD9, 0xBD99}, //9865 #HANGUL SYLLABLE PIEUP U THIEUTH + {0xBADA, 0xBD9A}, //9866 #HANGUL SYLLABLE PIEUP U PHIEUPH + {0xBADB, 0xBD9C}, //9867 #HANGUL SYLLABLE PIEUP WEO + {0xBADC, 0xBDA4}, //9868 #HANGUL SYLLABLE PIEUP WEO RIEUL + {0xBADD, 0xBDB0}, //9869 #HANGUL SYLLABLE PIEUP WEO SSANGSIOS + {0xBADE, 0xBDB8}, //9870 #HANGUL SYLLABLE PIEUP WE + {0xBADF, 0xBDD4}, //9871 #HANGUL SYLLABLE PIEUP WI + {0xBAE0, 0xBDD5}, //9872 #HANGUL SYLLABLE PIEUP WI KIYEOK + {0xBAE1, 0xBDD8}, //9873 #HANGUL SYLLABLE PIEUP WI NIEUN + {0xBAE2, 0xBDDC}, //9874 #HANGUL SYLLABLE PIEUP WI RIEUL + {0xBAE3, 0xBDE9}, //9875 #HANGUL SYLLABLE PIEUP WI IEUNG + {0xBAE4, 0xBDF0}, //9876 #HANGUL SYLLABLE PIEUP YU + {0xBAE5, 0xBDF4}, //9877 #HANGUL SYLLABLE PIEUP YU NIEUN + {0xBAE6, 0xBDF8}, //9878 #HANGUL SYLLABLE PIEUP YU RIEUL + {0xBAE7, 0xBE00}, //9879 #HANGUL SYLLABLE PIEUP YU MIEUM + {0xBAE8, 0xBE03}, //9880 #HANGUL SYLLABLE PIEUP YU SIOS + {0xBAE9, 0xBE05}, //9881 #HANGUL SYLLABLE PIEUP YU IEUNG + {0xBAEA, 0xBE0C}, //9882 #HANGUL SYLLABLE PIEUP EU + {0xBAEB, 0xBE0D}, //9883 #HANGUL SYLLABLE PIEUP EU KIYEOK + {0xBAEC, 0xBE10}, //9884 #HANGUL SYLLABLE PIEUP EU NIEUN + {0xBAED, 0xBE14}, //9885 #HANGUL SYLLABLE PIEUP EU RIEUL + {0xBAEE, 0xBE1C}, //9886 #HANGUL SYLLABLE PIEUP EU MIEUM + {0xBAEF, 0xBE1D}, //9887 #HANGUL SYLLABLE PIEUP EU PIEUP + {0xBAF0, 0xBE1F}, //9888 #HANGUL SYLLABLE PIEUP EU SIOS + {0xBAF1, 0xBE44}, //9889 #HANGUL SYLLABLE PIEUP I + {0xBAF2, 0xBE45}, //9890 #HANGUL SYLLABLE PIEUP I KIYEOK + {0xBAF3, 0xBE48}, //9891 #HANGUL SYLLABLE PIEUP I NIEUN + {0xBAF4, 0xBE4C}, //9892 #HANGUL SYLLABLE PIEUP I RIEUL + {0xBAF5, 0xBE4E}, //9893 #HANGUL SYLLABLE PIEUP I RIEULMIEUM + {0xBAF6, 0xBE54}, //9894 #HANGUL SYLLABLE PIEUP I MIEUM + {0xBAF7, 0xBE55}, //9895 #HANGUL SYLLABLE PIEUP I PIEUP + {0xBAF8, 0xBE57}, //9896 #HANGUL SYLLABLE PIEUP I SIOS + {0xBAF9, 0xBE59}, //9897 #HANGUL SYLLABLE PIEUP I IEUNG + {0xBAFA, 0xBE5A}, //9898 #HANGUL SYLLABLE PIEUP I CIEUC + {0xBAFB, 0xBE5B}, //9899 #HANGUL SYLLABLE PIEUP I CHIEUCH + {0xBAFC, 0xBE60}, //9900 #HANGUL SYLLABLE SSANGPIEUP A + {0xBAFD, 0xBE61}, //9901 #HANGUL SYLLABLE SSANGPIEUP A KIYEOK + {0xBAFE, 0xBE64}, //9902 #HANGUL SYLLABLE SSANGPIEUP A NIEUN + {0xBB41, 0xD2FB}, //9903 #HANGUL SYLLABLE THIEUTH I RIEULPIEUP + {0xBB42, 0xD2FC}, //9904 #HANGUL SYLLABLE THIEUTH I RIEULSIOS + {0xBB43, 0xD2FD}, //9905 #HANGUL SYLLABLE THIEUTH I RIEULTHIEUTH + {0xBB44, 0xD2FE}, //9906 #HANGUL SYLLABLE THIEUTH I RIEULPHIEUPH + {0xBB45, 0xD2FF}, //9907 #HANGUL SYLLABLE THIEUTH I RIEULHIEUH + {0xBB46, 0xD302}, //9908 #HANGUL SYLLABLE THIEUTH I PIEUPSIOS + {0xBB47, 0xD304}, //9909 #HANGUL SYLLABLE THIEUTH I SSANGSIOS + {0xBB48, 0xD306}, //9910 #HANGUL SYLLABLE THIEUTH I CIEUC + {0xBB49, 0xD307}, //9911 #HANGUL SYLLABLE THIEUTH I CHIEUCH + {0xBB4A, 0xD308}, //9912 #HANGUL SYLLABLE THIEUTH I KHIEUKH + {0xBB4B, 0xD309}, //9913 #HANGUL SYLLABLE THIEUTH I THIEUTH + {0xBB4C, 0xD30A}, //9914 #HANGUL SYLLABLE THIEUTH I PHIEUPH + {0xBB4D, 0xD30B}, //9915 #HANGUL SYLLABLE THIEUTH I HIEUH + {0xBB4E, 0xD30F}, //9916 #HANGUL SYLLABLE PHIEUPH A KIYEOKSIOS + {0xBB4F, 0xD311}, //9917 #HANGUL SYLLABLE PHIEUPH A NIEUNCIEUC + {0xBB50, 0xD312}, //9918 #HANGUL SYLLABLE PHIEUPH A NIEUNHIEUH + {0xBB51, 0xD313}, //9919 #HANGUL SYLLABLE PHIEUPH A TIKEUT + {0xBB52, 0xD315}, //9920 #HANGUL SYLLABLE PHIEUPH A RIEULKIYEOK + {0xBB53, 0xD317}, //9921 #HANGUL SYLLABLE PHIEUPH A RIEULPIEUP + {0xBB54, 0xD318}, //9922 #HANGUL SYLLABLE PHIEUPH A RIEULSIOS + {0xBB55, 0xD319}, //9923 #HANGUL SYLLABLE PHIEUPH A RIEULTHIEUTH + {0xBB56, 0xD31A}, //9924 #HANGUL SYLLABLE PHIEUPH A RIEULPHIEUPH + {0xBB57, 0xD31B}, //9925 #HANGUL SYLLABLE PHIEUPH A RIEULHIEUH + {0xBB58, 0xD31E}, //9926 #HANGUL SYLLABLE PHIEUPH A PIEUPSIOS + {0xBB59, 0xD322}, //9927 #HANGUL SYLLABLE PHIEUPH A CIEUC + {0xBB5A, 0xD323}, //9928 #HANGUL SYLLABLE PHIEUPH A CHIEUCH + {0xBB61, 0xD324}, //9929 #HANGUL SYLLABLE PHIEUPH A KHIEUKH + {0xBB62, 0xD326}, //9930 #HANGUL SYLLABLE PHIEUPH A PHIEUPH + {0xBB63, 0xD327}, //9931 #HANGUL SYLLABLE PHIEUPH A HIEUH + {0xBB64, 0xD32A}, //9932 #HANGUL SYLLABLE PHIEUPH AE SSANGKIYEOK + {0xBB65, 0xD32B}, //9933 #HANGUL SYLLABLE PHIEUPH AE KIYEOKSIOS + {0xBB66, 0xD32D}, //9934 #HANGUL SYLLABLE PHIEUPH AE NIEUNCIEUC + {0xBB67, 0xD32E}, //9935 #HANGUL SYLLABLE PHIEUPH AE NIEUNHIEUH + {0xBB68, 0xD32F}, //9936 #HANGUL SYLLABLE PHIEUPH AE TIKEUT + {0xBB69, 0xD331}, //9937 #HANGUL SYLLABLE PHIEUPH AE RIEULKIYEOK + {0xBB6A, 0xD332}, //9938 #HANGUL SYLLABLE PHIEUPH AE RIEULMIEUM + {0xBB6B, 0xD333}, //9939 #HANGUL SYLLABLE PHIEUPH AE RIEULPIEUP + {0xBB6C, 0xD334}, //9940 #HANGUL SYLLABLE PHIEUPH AE RIEULSIOS + {0xBB6D, 0xD335}, //9941 #HANGUL SYLLABLE PHIEUPH AE RIEULTHIEUTH + {0xBB6E, 0xD336}, //9942 #HANGUL SYLLABLE PHIEUPH AE RIEULPHIEUPH + {0xBB6F, 0xD337}, //9943 #HANGUL SYLLABLE PHIEUPH AE RIEULHIEUH + {0xBB70, 0xD33A}, //9944 #HANGUL SYLLABLE PHIEUPH AE PIEUPSIOS + {0xBB71, 0xD33E}, //9945 #HANGUL SYLLABLE PHIEUPH AE CIEUC + {0xBB72, 0xD33F}, //9946 #HANGUL SYLLABLE PHIEUPH AE CHIEUCH + {0xBB73, 0xD340}, //9947 #HANGUL SYLLABLE PHIEUPH AE KHIEUKH + {0xBB74, 0xD341}, //9948 #HANGUL SYLLABLE PHIEUPH AE THIEUTH + {0xBB75, 0xD342}, //9949 #HANGUL SYLLABLE PHIEUPH AE PHIEUPH + {0xBB76, 0xD343}, //9950 #HANGUL SYLLABLE PHIEUPH AE HIEUH + {0xBB77, 0xD346}, //9951 #HANGUL SYLLABLE PHIEUPH YA SSANGKIYEOK + {0xBB78, 0xD347}, //9952 #HANGUL SYLLABLE PHIEUPH YA KIYEOKSIOS + {0xBB79, 0xD348}, //9953 #HANGUL SYLLABLE PHIEUPH YA NIEUN + {0xBB7A, 0xD349}, //9954 #HANGUL SYLLABLE PHIEUPH YA NIEUNCIEUC + {0xBB81, 0xD34A}, //9955 #HANGUL SYLLABLE PHIEUPH YA NIEUNHIEUH + {0xBB82, 0xD34B}, //9956 #HANGUL SYLLABLE PHIEUPH YA TIKEUT + {0xBB83, 0xD34C}, //9957 #HANGUL SYLLABLE PHIEUPH YA RIEUL + {0xBB84, 0xD34D}, //9958 #HANGUL SYLLABLE PHIEUPH YA RIEULKIYEOK + {0xBB85, 0xD34E}, //9959 #HANGUL SYLLABLE PHIEUPH YA RIEULMIEUM + {0xBB86, 0xD34F}, //9960 #HANGUL SYLLABLE PHIEUPH YA RIEULPIEUP + {0xBB87, 0xD350}, //9961 #HANGUL SYLLABLE PHIEUPH YA RIEULSIOS + {0xBB88, 0xD351}, //9962 #HANGUL SYLLABLE PHIEUPH YA RIEULTHIEUTH + {0xBB89, 0xD352}, //9963 #HANGUL SYLLABLE PHIEUPH YA RIEULPHIEUPH + {0xBB8A, 0xD353}, //9964 #HANGUL SYLLABLE PHIEUPH YA RIEULHIEUH + {0xBB8B, 0xD354}, //9965 #HANGUL SYLLABLE PHIEUPH YA MIEUM + {0xBB8C, 0xD355}, //9966 #HANGUL SYLLABLE PHIEUPH YA PIEUP + {0xBB8D, 0xD356}, //9967 #HANGUL SYLLABLE PHIEUPH YA PIEUPSIOS + {0xBB8E, 0xD357}, //9968 #HANGUL SYLLABLE PHIEUPH YA SIOS + {0xBB8F, 0xD358}, //9969 #HANGUL SYLLABLE PHIEUPH YA SSANGSIOS + {0xBB90, 0xD359}, //9970 #HANGUL SYLLABLE PHIEUPH YA IEUNG + {0xBB91, 0xD35A}, //9971 #HANGUL SYLLABLE PHIEUPH YA CIEUC + {0xBB92, 0xD35B}, //9972 #HANGUL SYLLABLE PHIEUPH YA CHIEUCH + {0xBB93, 0xD35C}, //9973 #HANGUL SYLLABLE PHIEUPH YA KHIEUKH + {0xBB94, 0xD35D}, //9974 #HANGUL SYLLABLE PHIEUPH YA THIEUTH + {0xBB95, 0xD35E}, //9975 #HANGUL SYLLABLE PHIEUPH YA PHIEUPH + {0xBB96, 0xD35F}, //9976 #HANGUL SYLLABLE PHIEUPH YA HIEUH + {0xBB97, 0xD360}, //9977 #HANGUL SYLLABLE PHIEUPH YAE + {0xBB98, 0xD361}, //9978 #HANGUL SYLLABLE PHIEUPH YAE KIYEOK + {0xBB99, 0xD362}, //9979 #HANGUL SYLLABLE PHIEUPH YAE SSANGKIYEOK + {0xBB9A, 0xD363}, //9980 #HANGUL SYLLABLE PHIEUPH YAE KIYEOKSIOS + {0xBB9B, 0xD364}, //9981 #HANGUL SYLLABLE PHIEUPH YAE NIEUN + {0xBB9C, 0xD365}, //9982 #HANGUL SYLLABLE PHIEUPH YAE NIEUNCIEUC + {0xBB9D, 0xD366}, //9983 #HANGUL SYLLABLE PHIEUPH YAE NIEUNHIEUH + {0xBB9E, 0xD367}, //9984 #HANGUL SYLLABLE PHIEUPH YAE TIKEUT + {0xBB9F, 0xD368}, //9985 #HANGUL SYLLABLE PHIEUPH YAE RIEUL + {0xBBA0, 0xD369}, //9986 #HANGUL SYLLABLE PHIEUPH YAE RIEULKIYEOK + {0xBBA1, 0xBE68}, //9987 #HANGUL SYLLABLE SSANGPIEUP A RIEUL + {0xBBA2, 0xBE6A}, //9988 #HANGUL SYLLABLE SSANGPIEUP A RIEULMIEUM + {0xBBA3, 0xBE70}, //9989 #HANGUL SYLLABLE SSANGPIEUP A MIEUM + {0xBBA4, 0xBE71}, //9990 #HANGUL SYLLABLE SSANGPIEUP A PIEUP + {0xBBA5, 0xBE73}, //9991 #HANGUL SYLLABLE SSANGPIEUP A SIOS + {0xBBA6, 0xBE74}, //9992 #HANGUL SYLLABLE SSANGPIEUP A SSANGSIOS + {0xBBA7, 0xBE75}, //9993 #HANGUL SYLLABLE SSANGPIEUP A IEUNG + {0xBBA8, 0xBE7B}, //9994 #HANGUL SYLLABLE SSANGPIEUP A HIEUH + {0xBBA9, 0xBE7C}, //9995 #HANGUL SYLLABLE SSANGPIEUP AE + {0xBBAA, 0xBE7D}, //9996 #HANGUL SYLLABLE SSANGPIEUP AE KIYEOK + {0xBBAB, 0xBE80}, //9997 #HANGUL SYLLABLE SSANGPIEUP AE NIEUN + {0xBBAC, 0xBE84}, //9998 #HANGUL SYLLABLE SSANGPIEUP AE RIEUL + {0xBBAD, 0xBE8C}, //9999 #HANGUL SYLLABLE SSANGPIEUP AE MIEUM + {0xBBAE, 0xBE8D}, //10000 #HANGUL SYLLABLE SSANGPIEUP AE PIEUP + {0xBBAF, 0xBE8F}, //10001 #HANGUL SYLLABLE SSANGPIEUP AE SIOS + {0xBBB0, 0xBE90}, //10002 #HANGUL SYLLABLE SSANGPIEUP AE SSANGSIOS + {0xBBB1, 0xBE91}, //10003 #HANGUL SYLLABLE SSANGPIEUP AE IEUNG + {0xBBB2, 0xBE98}, //10004 #HANGUL SYLLABLE SSANGPIEUP YA + {0xBBB3, 0xBE99}, //10005 #HANGUL SYLLABLE SSANGPIEUP YA KIYEOK + {0xBBB4, 0xBEA8}, //10006 #HANGUL SYLLABLE SSANGPIEUP YA MIEUM + {0xBBB5, 0xBED0}, //10007 #HANGUL SYLLABLE SSANGPIEUP EO + {0xBBB6, 0xBED1}, //10008 #HANGUL SYLLABLE SSANGPIEUP EO KIYEOK + {0xBBB7, 0xBED4}, //10009 #HANGUL SYLLABLE SSANGPIEUP EO NIEUN + {0xBBB8, 0xBED7}, //10010 #HANGUL SYLLABLE SSANGPIEUP EO TIKEUT + {0xBBB9, 0xBED8}, //10011 #HANGUL SYLLABLE SSANGPIEUP EO RIEUL + {0xBBBA, 0xBEE0}, //10012 #HANGUL SYLLABLE SSANGPIEUP EO MIEUM + {0xBBBB, 0xBEE3}, //10013 #HANGUL SYLLABLE SSANGPIEUP EO SIOS + {0xBBBC, 0xBEE4}, //10014 #HANGUL SYLLABLE SSANGPIEUP EO SSANGSIOS + {0xBBBD, 0xBEE5}, //10015 #HANGUL SYLLABLE SSANGPIEUP EO IEUNG + {0xBBBE, 0xBEEC}, //10016 #HANGUL SYLLABLE SSANGPIEUP E + {0xBBBF, 0xBF01}, //10017 #HANGUL SYLLABLE SSANGPIEUP E IEUNG + {0xBBC0, 0xBF08}, //10018 #HANGUL SYLLABLE SSANGPIEUP YEO + {0xBBC1, 0xBF09}, //10019 #HANGUL SYLLABLE SSANGPIEUP YEO KIYEOK + {0xBBC2, 0xBF18}, //10020 #HANGUL SYLLABLE SSANGPIEUP YEO MIEUM + {0xBBC3, 0xBF19}, //10021 #HANGUL SYLLABLE SSANGPIEUP YEO PIEUP + {0xBBC4, 0xBF1B}, //10022 #HANGUL SYLLABLE SSANGPIEUP YEO SIOS + {0xBBC5, 0xBF1C}, //10023 #HANGUL SYLLABLE SSANGPIEUP YEO SSANGSIOS + {0xBBC6, 0xBF1D}, //10024 #HANGUL SYLLABLE SSANGPIEUP YEO IEUNG + {0xBBC7, 0xBF40}, //10025 #HANGUL SYLLABLE SSANGPIEUP O + {0xBBC8, 0xBF41}, //10026 #HANGUL SYLLABLE SSANGPIEUP O KIYEOK + {0xBBC9, 0xBF44}, //10027 #HANGUL SYLLABLE SSANGPIEUP O NIEUN + {0xBBCA, 0xBF48}, //10028 #HANGUL SYLLABLE SSANGPIEUP O RIEUL + {0xBBCB, 0xBF50}, //10029 #HANGUL SYLLABLE SSANGPIEUP O MIEUM + {0xBBCC, 0xBF51}, //10030 #HANGUL SYLLABLE SSANGPIEUP O PIEUP + {0xBBCD, 0xBF55}, //10031 #HANGUL SYLLABLE SSANGPIEUP O IEUNG + {0xBBCE, 0xBF94}, //10032 #HANGUL SYLLABLE SSANGPIEUP OE + {0xBBCF, 0xBFB0}, //10033 #HANGUL SYLLABLE SSANGPIEUP YO + {0xBBD0, 0xBFC5}, //10034 #HANGUL SYLLABLE SSANGPIEUP YO IEUNG + {0xBBD1, 0xBFCC}, //10035 #HANGUL SYLLABLE SSANGPIEUP U + {0xBBD2, 0xBFCD}, //10036 #HANGUL SYLLABLE SSANGPIEUP U KIYEOK + {0xBBD3, 0xBFD0}, //10037 #HANGUL SYLLABLE SSANGPIEUP U NIEUN + {0xBBD4, 0xBFD4}, //10038 #HANGUL SYLLABLE SSANGPIEUP U RIEUL + {0xBBD5, 0xBFDC}, //10039 #HANGUL SYLLABLE SSANGPIEUP U MIEUM + {0xBBD6, 0xBFDF}, //10040 #HANGUL SYLLABLE SSANGPIEUP U SIOS + {0xBBD7, 0xBFE1}, //10041 #HANGUL SYLLABLE SSANGPIEUP U IEUNG + {0xBBD8, 0xC03C}, //10042 #HANGUL SYLLABLE SSANGPIEUP YU + {0xBBD9, 0xC051}, //10043 #HANGUL SYLLABLE SSANGPIEUP YU IEUNG + {0xBBDA, 0xC058}, //10044 #HANGUL SYLLABLE SSANGPIEUP EU + {0xBBDB, 0xC05C}, //10045 #HANGUL SYLLABLE SSANGPIEUP EU NIEUN + {0xBBDC, 0xC060}, //10046 #HANGUL SYLLABLE SSANGPIEUP EU RIEUL + {0xBBDD, 0xC068}, //10047 #HANGUL SYLLABLE SSANGPIEUP EU MIEUM + {0xBBDE, 0xC069}, //10048 #HANGUL SYLLABLE SSANGPIEUP EU PIEUP + {0xBBDF, 0xC090}, //10049 #HANGUL SYLLABLE SSANGPIEUP I + {0xBBE0, 0xC091}, //10050 #HANGUL SYLLABLE SSANGPIEUP I KIYEOK + {0xBBE1, 0xC094}, //10051 #HANGUL SYLLABLE SSANGPIEUP I NIEUN + {0xBBE2, 0xC098}, //10052 #HANGUL SYLLABLE SSANGPIEUP I RIEUL + {0xBBE3, 0xC0A0}, //10053 #HANGUL SYLLABLE SSANGPIEUP I MIEUM + {0xBBE4, 0xC0A1}, //10054 #HANGUL SYLLABLE SSANGPIEUP I PIEUP + {0xBBE5, 0xC0A3}, //10055 #HANGUL SYLLABLE SSANGPIEUP I SIOS + {0xBBE6, 0xC0A5}, //10056 #HANGUL SYLLABLE SSANGPIEUP I IEUNG + {0xBBE7, 0xC0AC}, //10057 #HANGUL SYLLABLE SIOS A + {0xBBE8, 0xC0AD}, //10058 #HANGUL SYLLABLE SIOS A KIYEOK + {0xBBE9, 0xC0AF}, //10059 #HANGUL SYLLABLE SIOS A KIYEOKSIOS + {0xBBEA, 0xC0B0}, //10060 #HANGUL SYLLABLE SIOS A NIEUN + {0xBBEB, 0xC0B3}, //10061 #HANGUL SYLLABLE SIOS A TIKEUT + {0xBBEC, 0xC0B4}, //10062 #HANGUL SYLLABLE SIOS A RIEUL + {0xBBED, 0xC0B5}, //10063 #HANGUL SYLLABLE SIOS A RIEULKIYEOK + {0xBBEE, 0xC0B6}, //10064 #HANGUL SYLLABLE SIOS A RIEULMIEUM + {0xBBEF, 0xC0BC}, //10065 #HANGUL SYLLABLE SIOS A MIEUM + {0xBBF0, 0xC0BD}, //10066 #HANGUL SYLLABLE SIOS A PIEUP + {0xBBF1, 0xC0BF}, //10067 #HANGUL SYLLABLE SIOS A SIOS + {0xBBF2, 0xC0C0}, //10068 #HANGUL SYLLABLE SIOS A SSANGSIOS + {0xBBF3, 0xC0C1}, //10069 #HANGUL SYLLABLE SIOS A IEUNG + {0xBBF4, 0xC0C5}, //10070 #HANGUL SYLLABLE SIOS A THIEUTH + {0xBBF5, 0xC0C8}, //10071 #HANGUL SYLLABLE SIOS AE + {0xBBF6, 0xC0C9}, //10072 #HANGUL SYLLABLE SIOS AE KIYEOK + {0xBBF7, 0xC0CC}, //10073 #HANGUL SYLLABLE SIOS AE NIEUN + {0xBBF8, 0xC0D0}, //10074 #HANGUL SYLLABLE SIOS AE RIEUL + {0xBBF9, 0xC0D8}, //10075 #HANGUL SYLLABLE SIOS AE MIEUM + {0xBBFA, 0xC0D9}, //10076 #HANGUL SYLLABLE SIOS AE PIEUP + {0xBBFB, 0xC0DB}, //10077 #HANGUL SYLLABLE SIOS AE SIOS + {0xBBFC, 0xC0DC}, //10078 #HANGUL SYLLABLE SIOS AE SSANGSIOS + {0xBBFD, 0xC0DD}, //10079 #HANGUL SYLLABLE SIOS AE IEUNG + {0xBBFE, 0xC0E4}, //10080 #HANGUL SYLLABLE SIOS YA + {0xBC41, 0xD36A}, //10081 #HANGUL SYLLABLE PHIEUPH YAE RIEULMIEUM + {0xBC42, 0xD36B}, //10082 #HANGUL SYLLABLE PHIEUPH YAE RIEULPIEUP + {0xBC43, 0xD36C}, //10083 #HANGUL SYLLABLE PHIEUPH YAE RIEULSIOS + {0xBC44, 0xD36D}, //10084 #HANGUL SYLLABLE PHIEUPH YAE RIEULTHIEUTH + {0xBC45, 0xD36E}, //10085 #HANGUL SYLLABLE PHIEUPH YAE RIEULPHIEUPH + {0xBC46, 0xD36F}, //10086 #HANGUL SYLLABLE PHIEUPH YAE RIEULHIEUH + {0xBC47, 0xD370}, //10087 #HANGUL SYLLABLE PHIEUPH YAE MIEUM + {0xBC48, 0xD371}, //10088 #HANGUL SYLLABLE PHIEUPH YAE PIEUP + {0xBC49, 0xD372}, //10089 #HANGUL SYLLABLE PHIEUPH YAE PIEUPSIOS + {0xBC4A, 0xD373}, //10090 #HANGUL SYLLABLE PHIEUPH YAE SIOS + {0xBC4B, 0xD374}, //10091 #HANGUL SYLLABLE PHIEUPH YAE SSANGSIOS + {0xBC4C, 0xD375}, //10092 #HANGUL SYLLABLE PHIEUPH YAE IEUNG + {0xBC4D, 0xD376}, //10093 #HANGUL SYLLABLE PHIEUPH YAE CIEUC + {0xBC4E, 0xD377}, //10094 #HANGUL SYLLABLE PHIEUPH YAE CHIEUCH + {0xBC4F, 0xD378}, //10095 #HANGUL SYLLABLE PHIEUPH YAE KHIEUKH + {0xBC50, 0xD379}, //10096 #HANGUL SYLLABLE PHIEUPH YAE THIEUTH + {0xBC51, 0xD37A}, //10097 #HANGUL SYLLABLE PHIEUPH YAE PHIEUPH + {0xBC52, 0xD37B}, //10098 #HANGUL SYLLABLE PHIEUPH YAE HIEUH + {0xBC53, 0xD37E}, //10099 #HANGUL SYLLABLE PHIEUPH EO SSANGKIYEOK + {0xBC54, 0xD37F}, //10100 #HANGUL SYLLABLE PHIEUPH EO KIYEOKSIOS + {0xBC55, 0xD381}, //10101 #HANGUL SYLLABLE PHIEUPH EO NIEUNCIEUC + {0xBC56, 0xD382}, //10102 #HANGUL SYLLABLE PHIEUPH EO NIEUNHIEUH + {0xBC57, 0xD383}, //10103 #HANGUL SYLLABLE PHIEUPH EO TIKEUT + {0xBC58, 0xD385}, //10104 #HANGUL SYLLABLE PHIEUPH EO RIEULKIYEOK + {0xBC59, 0xD386}, //10105 #HANGUL SYLLABLE PHIEUPH EO RIEULMIEUM + {0xBC5A, 0xD387}, //10106 #HANGUL SYLLABLE PHIEUPH EO RIEULPIEUP + {0xBC61, 0xD388}, //10107 #HANGUL SYLLABLE PHIEUPH EO RIEULSIOS + {0xBC62, 0xD389}, //10108 #HANGUL SYLLABLE PHIEUPH EO RIEULTHIEUTH + {0xBC63, 0xD38A}, //10109 #HANGUL SYLLABLE PHIEUPH EO RIEULPHIEUPH + {0xBC64, 0xD38B}, //10110 #HANGUL SYLLABLE PHIEUPH EO RIEULHIEUH + {0xBC65, 0xD38E}, //10111 #HANGUL SYLLABLE PHIEUPH EO PIEUPSIOS + {0xBC66, 0xD392}, //10112 #HANGUL SYLLABLE PHIEUPH EO CIEUC + {0xBC67, 0xD393}, //10113 #HANGUL SYLLABLE PHIEUPH EO CHIEUCH + {0xBC68, 0xD394}, //10114 #HANGUL SYLLABLE PHIEUPH EO KHIEUKH + {0xBC69, 0xD395}, //10115 #HANGUL SYLLABLE PHIEUPH EO THIEUTH + {0xBC6A, 0xD396}, //10116 #HANGUL SYLLABLE PHIEUPH EO PHIEUPH + {0xBC6B, 0xD397}, //10117 #HANGUL SYLLABLE PHIEUPH EO HIEUH + {0xBC6C, 0xD39A}, //10118 #HANGUL SYLLABLE PHIEUPH E SSANGKIYEOK + {0xBC6D, 0xD39B}, //10119 #HANGUL SYLLABLE PHIEUPH E KIYEOKSIOS + {0xBC6E, 0xD39D}, //10120 #HANGUL SYLLABLE PHIEUPH E NIEUNCIEUC + {0xBC6F, 0xD39E}, //10121 #HANGUL SYLLABLE PHIEUPH E NIEUNHIEUH + {0xBC70, 0xD39F}, //10122 #HANGUL SYLLABLE PHIEUPH E TIKEUT + {0xBC71, 0xD3A1}, //10123 #HANGUL SYLLABLE PHIEUPH E RIEULKIYEOK + {0xBC72, 0xD3A2}, //10124 #HANGUL SYLLABLE PHIEUPH E RIEULMIEUM + {0xBC73, 0xD3A3}, //10125 #HANGUL SYLLABLE PHIEUPH E RIEULPIEUP + {0xBC74, 0xD3A4}, //10126 #HANGUL SYLLABLE PHIEUPH E RIEULSIOS + {0xBC75, 0xD3A5}, //10127 #HANGUL SYLLABLE PHIEUPH E RIEULTHIEUTH + {0xBC76, 0xD3A6}, //10128 #HANGUL SYLLABLE PHIEUPH E RIEULPHIEUPH + {0xBC77, 0xD3A7}, //10129 #HANGUL SYLLABLE PHIEUPH E RIEULHIEUH + {0xBC78, 0xD3AA}, //10130 #HANGUL SYLLABLE PHIEUPH E PIEUPSIOS + {0xBC79, 0xD3AC}, //10131 #HANGUL SYLLABLE PHIEUPH E SSANGSIOS + {0xBC7A, 0xD3AE}, //10132 #HANGUL SYLLABLE PHIEUPH E CIEUC + {0xBC81, 0xD3AF}, //10133 #HANGUL SYLLABLE PHIEUPH E CHIEUCH + {0xBC82, 0xD3B0}, //10134 #HANGUL SYLLABLE PHIEUPH E KHIEUKH + {0xBC83, 0xD3B1}, //10135 #HANGUL SYLLABLE PHIEUPH E THIEUTH + {0xBC84, 0xD3B2}, //10136 #HANGUL SYLLABLE PHIEUPH E PHIEUPH + {0xBC85, 0xD3B3}, //10137 #HANGUL SYLLABLE PHIEUPH E HIEUH + {0xBC86, 0xD3B5}, //10138 #HANGUL SYLLABLE PHIEUPH YEO KIYEOK + {0xBC87, 0xD3B6}, //10139 #HANGUL SYLLABLE PHIEUPH YEO SSANGKIYEOK + {0xBC88, 0xD3B7}, //10140 #HANGUL SYLLABLE PHIEUPH YEO KIYEOKSIOS + {0xBC89, 0xD3B9}, //10141 #HANGUL SYLLABLE PHIEUPH YEO NIEUNCIEUC + {0xBC8A, 0xD3BA}, //10142 #HANGUL SYLLABLE PHIEUPH YEO NIEUNHIEUH + {0xBC8B, 0xD3BB}, //10143 #HANGUL SYLLABLE PHIEUPH YEO TIKEUT + {0xBC8C, 0xD3BD}, //10144 #HANGUL SYLLABLE PHIEUPH YEO RIEULKIYEOK + {0xBC8D, 0xD3BE}, //10145 #HANGUL SYLLABLE PHIEUPH YEO RIEULMIEUM + {0xBC8E, 0xD3BF}, //10146 #HANGUL SYLLABLE PHIEUPH YEO RIEULPIEUP + {0xBC8F, 0xD3C0}, //10147 #HANGUL SYLLABLE PHIEUPH YEO RIEULSIOS + {0xBC90, 0xD3C1}, //10148 #HANGUL SYLLABLE PHIEUPH YEO RIEULTHIEUTH + {0xBC91, 0xD3C2}, //10149 #HANGUL SYLLABLE PHIEUPH YEO RIEULPHIEUPH + {0xBC92, 0xD3C3}, //10150 #HANGUL SYLLABLE PHIEUPH YEO RIEULHIEUH + {0xBC93, 0xD3C6}, //10151 #HANGUL SYLLABLE PHIEUPH YEO PIEUPSIOS + {0xBC94, 0xD3C7}, //10152 #HANGUL SYLLABLE PHIEUPH YEO SIOS + {0xBC95, 0xD3CA}, //10153 #HANGUL SYLLABLE PHIEUPH YEO CIEUC + {0xBC96, 0xD3CB}, //10154 #HANGUL SYLLABLE PHIEUPH YEO CHIEUCH + {0xBC97, 0xD3CC}, //10155 #HANGUL SYLLABLE PHIEUPH YEO KHIEUKH + {0xBC98, 0xD3CD}, //10156 #HANGUL SYLLABLE PHIEUPH YEO THIEUTH + {0xBC99, 0xD3CE}, //10157 #HANGUL SYLLABLE PHIEUPH YEO PHIEUPH + {0xBC9A, 0xD3CF}, //10158 #HANGUL SYLLABLE PHIEUPH YEO HIEUH + {0xBC9B, 0xD3D1}, //10159 #HANGUL SYLLABLE PHIEUPH YE KIYEOK + {0xBC9C, 0xD3D2}, //10160 #HANGUL SYLLABLE PHIEUPH YE SSANGKIYEOK + {0xBC9D, 0xD3D3}, //10161 #HANGUL SYLLABLE PHIEUPH YE KIYEOKSIOS + {0xBC9E, 0xD3D4}, //10162 #HANGUL SYLLABLE PHIEUPH YE NIEUN + {0xBC9F, 0xD3D5}, //10163 #HANGUL SYLLABLE PHIEUPH YE NIEUNCIEUC + {0xBCA0, 0xD3D6}, //10164 #HANGUL SYLLABLE PHIEUPH YE NIEUNHIEUH + {0xBCA1, 0xC0E5}, //10165 #HANGUL SYLLABLE SIOS YA KIYEOK + {0xBCA2, 0xC0E8}, //10166 #HANGUL SYLLABLE SIOS YA NIEUN + {0xBCA3, 0xC0EC}, //10167 #HANGUL SYLLABLE SIOS YA RIEUL + {0xBCA4, 0xC0F4}, //10168 #HANGUL SYLLABLE SIOS YA MIEUM + {0xBCA5, 0xC0F5}, //10169 #HANGUL SYLLABLE SIOS YA PIEUP + {0xBCA6, 0xC0F7}, //10170 #HANGUL SYLLABLE SIOS YA SIOS + {0xBCA7, 0xC0F9}, //10171 #HANGUL SYLLABLE SIOS YA IEUNG + {0xBCA8, 0xC100}, //10172 #HANGUL SYLLABLE SIOS YAE + {0xBCA9, 0xC104}, //10173 #HANGUL SYLLABLE SIOS YAE NIEUN + {0xBCAA, 0xC108}, //10174 #HANGUL SYLLABLE SIOS YAE RIEUL + {0xBCAB, 0xC110}, //10175 #HANGUL SYLLABLE SIOS YAE MIEUM + {0xBCAC, 0xC115}, //10176 #HANGUL SYLLABLE SIOS YAE IEUNG + {0xBCAD, 0xC11C}, //10177 #HANGUL SYLLABLE SIOS EO + {0xBCAE, 0xC11D}, //10178 #HANGUL SYLLABLE SIOS EO KIYEOK + {0xBCAF, 0xC11E}, //10179 #HANGUL SYLLABLE SIOS EO SSANGKIYEOK + {0xBCB0, 0xC11F}, //10180 #HANGUL SYLLABLE SIOS EO KIYEOKSIOS + {0xBCB1, 0xC120}, //10181 #HANGUL SYLLABLE SIOS EO NIEUN + {0xBCB2, 0xC123}, //10182 #HANGUL SYLLABLE SIOS EO TIKEUT + {0xBCB3, 0xC124}, //10183 #HANGUL SYLLABLE SIOS EO RIEUL + {0xBCB4, 0xC126}, //10184 #HANGUL SYLLABLE SIOS EO RIEULMIEUM + {0xBCB5, 0xC127}, //10185 #HANGUL SYLLABLE SIOS EO RIEULPIEUP + {0xBCB6, 0xC12C}, //10186 #HANGUL SYLLABLE SIOS EO MIEUM + {0xBCB7, 0xC12D}, //10187 #HANGUL SYLLABLE SIOS EO PIEUP + {0xBCB8, 0xC12F}, //10188 #HANGUL SYLLABLE SIOS EO SIOS + {0xBCB9, 0xC130}, //10189 #HANGUL SYLLABLE SIOS EO SSANGSIOS + {0xBCBA, 0xC131}, //10190 #HANGUL SYLLABLE SIOS EO IEUNG + {0xBCBB, 0xC136}, //10191 #HANGUL SYLLABLE SIOS EO PHIEUPH + {0xBCBC, 0xC138}, //10192 #HANGUL SYLLABLE SIOS E + {0xBCBD, 0xC139}, //10193 #HANGUL SYLLABLE SIOS E KIYEOK + {0xBCBE, 0xC13C}, //10194 #HANGUL SYLLABLE SIOS E NIEUN + {0xBCBF, 0xC140}, //10195 #HANGUL SYLLABLE SIOS E RIEUL + {0xBCC0, 0xC148}, //10196 #HANGUL SYLLABLE SIOS E MIEUM + {0xBCC1, 0xC149}, //10197 #HANGUL SYLLABLE SIOS E PIEUP + {0xBCC2, 0xC14B}, //10198 #HANGUL SYLLABLE SIOS E SIOS + {0xBCC3, 0xC14C}, //10199 #HANGUL SYLLABLE SIOS E SSANGSIOS + {0xBCC4, 0xC14D}, //10200 #HANGUL SYLLABLE SIOS E IEUNG + {0xBCC5, 0xC154}, //10201 #HANGUL SYLLABLE SIOS YEO + {0xBCC6, 0xC155}, //10202 #HANGUL SYLLABLE SIOS YEO KIYEOK + {0xBCC7, 0xC158}, //10203 #HANGUL SYLLABLE SIOS YEO NIEUN + {0xBCC8, 0xC15C}, //10204 #HANGUL SYLLABLE SIOS YEO RIEUL + {0xBCC9, 0xC164}, //10205 #HANGUL SYLLABLE SIOS YEO MIEUM + {0xBCCA, 0xC165}, //10206 #HANGUL SYLLABLE SIOS YEO PIEUP + {0xBCCB, 0xC167}, //10207 #HANGUL SYLLABLE SIOS YEO SIOS + {0xBCCC, 0xC168}, //10208 #HANGUL SYLLABLE SIOS YEO SSANGSIOS + {0xBCCD, 0xC169}, //10209 #HANGUL SYLLABLE SIOS YEO IEUNG + {0xBCCE, 0xC170}, //10210 #HANGUL SYLLABLE SIOS YE + {0xBCCF, 0xC174}, //10211 #HANGUL SYLLABLE SIOS YE NIEUN + {0xBCD0, 0xC178}, //10212 #HANGUL SYLLABLE SIOS YE RIEUL + {0xBCD1, 0xC185}, //10213 #HANGUL SYLLABLE SIOS YE IEUNG + {0xBCD2, 0xC18C}, //10214 #HANGUL SYLLABLE SIOS O + {0xBCD3, 0xC18D}, //10215 #HANGUL SYLLABLE SIOS O KIYEOK + {0xBCD4, 0xC18E}, //10216 #HANGUL SYLLABLE SIOS O SSANGKIYEOK + {0xBCD5, 0xC190}, //10217 #HANGUL SYLLABLE SIOS O NIEUN + {0xBCD6, 0xC194}, //10218 #HANGUL SYLLABLE SIOS O RIEUL + {0xBCD7, 0xC196}, //10219 #HANGUL SYLLABLE SIOS O RIEULMIEUM + {0xBCD8, 0xC19C}, //10220 #HANGUL SYLLABLE SIOS O MIEUM + {0xBCD9, 0xC19D}, //10221 #HANGUL SYLLABLE SIOS O PIEUP + {0xBCDA, 0xC19F}, //10222 #HANGUL SYLLABLE SIOS O SIOS + {0xBCDB, 0xC1A1}, //10223 #HANGUL SYLLABLE SIOS O IEUNG + {0xBCDC, 0xC1A5}, //10224 #HANGUL SYLLABLE SIOS O THIEUTH + {0xBCDD, 0xC1A8}, //10225 #HANGUL SYLLABLE SIOS WA + {0xBCDE, 0xC1A9}, //10226 #HANGUL SYLLABLE SIOS WA KIYEOK + {0xBCDF, 0xC1AC}, //10227 #HANGUL SYLLABLE SIOS WA NIEUN + {0xBCE0, 0xC1B0}, //10228 #HANGUL SYLLABLE SIOS WA RIEUL + {0xBCE1, 0xC1BD}, //10229 #HANGUL SYLLABLE SIOS WA IEUNG + {0xBCE2, 0xC1C4}, //10230 #HANGUL SYLLABLE SIOS WAE + {0xBCE3, 0xC1C8}, //10231 #HANGUL SYLLABLE SIOS WAE NIEUN + {0xBCE4, 0xC1CC}, //10232 #HANGUL SYLLABLE SIOS WAE RIEUL + {0xBCE5, 0xC1D4}, //10233 #HANGUL SYLLABLE SIOS WAE MIEUM + {0xBCE6, 0xC1D7}, //10234 #HANGUL SYLLABLE SIOS WAE SIOS + {0xBCE7, 0xC1D8}, //10235 #HANGUL SYLLABLE SIOS WAE SSANGSIOS + {0xBCE8, 0xC1E0}, //10236 #HANGUL SYLLABLE SIOS OE + {0xBCE9, 0xC1E4}, //10237 #HANGUL SYLLABLE SIOS OE NIEUN + {0xBCEA, 0xC1E8}, //10238 #HANGUL SYLLABLE SIOS OE RIEUL + {0xBCEB, 0xC1F0}, //10239 #HANGUL SYLLABLE SIOS OE MIEUM + {0xBCEC, 0xC1F1}, //10240 #HANGUL SYLLABLE SIOS OE PIEUP + {0xBCED, 0xC1F3}, //10241 #HANGUL SYLLABLE SIOS OE SIOS + {0xBCEE, 0xC1FC}, //10242 #HANGUL SYLLABLE SIOS YO + {0xBCEF, 0xC1FD}, //10243 #HANGUL SYLLABLE SIOS YO KIYEOK + {0xBCF0, 0xC200}, //10244 #HANGUL SYLLABLE SIOS YO NIEUN + {0xBCF1, 0xC204}, //10245 #HANGUL SYLLABLE SIOS YO RIEUL + {0xBCF2, 0xC20C}, //10246 #HANGUL SYLLABLE SIOS YO MIEUM + {0xBCF3, 0xC20D}, //10247 #HANGUL SYLLABLE SIOS YO PIEUP + {0xBCF4, 0xC20F}, //10248 #HANGUL SYLLABLE SIOS YO SIOS + {0xBCF5, 0xC211}, //10249 #HANGUL SYLLABLE SIOS YO IEUNG + {0xBCF6, 0xC218}, //10250 #HANGUL SYLLABLE SIOS U + {0xBCF7, 0xC219}, //10251 #HANGUL SYLLABLE SIOS U KIYEOK + {0xBCF8, 0xC21C}, //10252 #HANGUL SYLLABLE SIOS U NIEUN + {0xBCF9, 0xC21F}, //10253 #HANGUL SYLLABLE SIOS U TIKEUT + {0xBCFA, 0xC220}, //10254 #HANGUL SYLLABLE SIOS U RIEUL + {0xBCFB, 0xC228}, //10255 #HANGUL SYLLABLE SIOS U MIEUM + {0xBCFC, 0xC229}, //10256 #HANGUL SYLLABLE SIOS U PIEUP + {0xBCFD, 0xC22B}, //10257 #HANGUL SYLLABLE SIOS U SIOS + {0xBCFE, 0xC22D}, //10258 #HANGUL SYLLABLE SIOS U IEUNG + {0xBD41, 0xD3D7}, //10259 #HANGUL SYLLABLE PHIEUPH YE TIKEUT + {0xBD42, 0xD3D9}, //10260 #HANGUL SYLLABLE PHIEUPH YE RIEULKIYEOK + {0xBD43, 0xD3DA}, //10261 #HANGUL SYLLABLE PHIEUPH YE RIEULMIEUM + {0xBD44, 0xD3DB}, //10262 #HANGUL SYLLABLE PHIEUPH YE RIEULPIEUP + {0xBD45, 0xD3DC}, //10263 #HANGUL SYLLABLE PHIEUPH YE RIEULSIOS + {0xBD46, 0xD3DD}, //10264 #HANGUL SYLLABLE PHIEUPH YE RIEULTHIEUTH + {0xBD47, 0xD3DE}, //10265 #HANGUL SYLLABLE PHIEUPH YE RIEULPHIEUPH + {0xBD48, 0xD3DF}, //10266 #HANGUL SYLLABLE PHIEUPH YE RIEULHIEUH + {0xBD49, 0xD3E0}, //10267 #HANGUL SYLLABLE PHIEUPH YE MIEUM + {0xBD4A, 0xD3E2}, //10268 #HANGUL SYLLABLE PHIEUPH YE PIEUPSIOS + {0xBD4B, 0xD3E4}, //10269 #HANGUL SYLLABLE PHIEUPH YE SSANGSIOS + {0xBD4C, 0xD3E5}, //10270 #HANGUL SYLLABLE PHIEUPH YE IEUNG + {0xBD4D, 0xD3E6}, //10271 #HANGUL SYLLABLE PHIEUPH YE CIEUC + {0xBD4E, 0xD3E7}, //10272 #HANGUL SYLLABLE PHIEUPH YE CHIEUCH + {0xBD4F, 0xD3E8}, //10273 #HANGUL SYLLABLE PHIEUPH YE KHIEUKH + {0xBD50, 0xD3E9}, //10274 #HANGUL SYLLABLE PHIEUPH YE THIEUTH + {0xBD51, 0xD3EA}, //10275 #HANGUL SYLLABLE PHIEUPH YE PHIEUPH + {0xBD52, 0xD3EB}, //10276 #HANGUL SYLLABLE PHIEUPH YE HIEUH + {0xBD53, 0xD3EE}, //10277 #HANGUL SYLLABLE PHIEUPH O SSANGKIYEOK + {0xBD54, 0xD3EF}, //10278 #HANGUL SYLLABLE PHIEUPH O KIYEOKSIOS + {0xBD55, 0xD3F1}, //10279 #HANGUL SYLLABLE PHIEUPH O NIEUNCIEUC + {0xBD56, 0xD3F2}, //10280 #HANGUL SYLLABLE PHIEUPH O NIEUNHIEUH + {0xBD57, 0xD3F3}, //10281 #HANGUL SYLLABLE PHIEUPH O TIKEUT + {0xBD58, 0xD3F5}, //10282 #HANGUL SYLLABLE PHIEUPH O RIEULKIYEOK + {0xBD59, 0xD3F6}, //10283 #HANGUL SYLLABLE PHIEUPH O RIEULMIEUM + {0xBD5A, 0xD3F7}, //10284 #HANGUL SYLLABLE PHIEUPH O RIEULPIEUP + {0xBD61, 0xD3F8}, //10285 #HANGUL SYLLABLE PHIEUPH O RIEULSIOS + {0xBD62, 0xD3F9}, //10286 #HANGUL SYLLABLE PHIEUPH O RIEULTHIEUTH + {0xBD63, 0xD3FA}, //10287 #HANGUL SYLLABLE PHIEUPH O RIEULPHIEUPH + {0xBD64, 0xD3FB}, //10288 #HANGUL SYLLABLE PHIEUPH O RIEULHIEUH + {0xBD65, 0xD3FE}, //10289 #HANGUL SYLLABLE PHIEUPH O PIEUPSIOS + {0xBD66, 0xD400}, //10290 #HANGUL SYLLABLE PHIEUPH O SSANGSIOS + {0xBD67, 0xD402}, //10291 #HANGUL SYLLABLE PHIEUPH O CIEUC + {0xBD68, 0xD403}, //10292 #HANGUL SYLLABLE PHIEUPH O CHIEUCH + {0xBD69, 0xD404}, //10293 #HANGUL SYLLABLE PHIEUPH O KHIEUKH + {0xBD6A, 0xD405}, //10294 #HANGUL SYLLABLE PHIEUPH O THIEUTH + {0xBD6B, 0xD406}, //10295 #HANGUL SYLLABLE PHIEUPH O PHIEUPH + {0xBD6C, 0xD407}, //10296 #HANGUL SYLLABLE PHIEUPH O HIEUH + {0xBD6D, 0xD409}, //10297 #HANGUL SYLLABLE PHIEUPH WA KIYEOK + {0xBD6E, 0xD40A}, //10298 #HANGUL SYLLABLE PHIEUPH WA SSANGKIYEOK + {0xBD6F, 0xD40B}, //10299 #HANGUL SYLLABLE PHIEUPH WA KIYEOKSIOS + {0xBD70, 0xD40C}, //10300 #HANGUL SYLLABLE PHIEUPH WA NIEUN + {0xBD71, 0xD40D}, //10301 #HANGUL SYLLABLE PHIEUPH WA NIEUNCIEUC + {0xBD72, 0xD40E}, //10302 #HANGUL SYLLABLE PHIEUPH WA NIEUNHIEUH + {0xBD73, 0xD40F}, //10303 #HANGUL SYLLABLE PHIEUPH WA TIKEUT + {0xBD74, 0xD410}, //10304 #HANGUL SYLLABLE PHIEUPH WA RIEUL + {0xBD75, 0xD411}, //10305 #HANGUL SYLLABLE PHIEUPH WA RIEULKIYEOK + {0xBD76, 0xD412}, //10306 #HANGUL SYLLABLE PHIEUPH WA RIEULMIEUM + {0xBD77, 0xD413}, //10307 #HANGUL SYLLABLE PHIEUPH WA RIEULPIEUP + {0xBD78, 0xD414}, //10308 #HANGUL SYLLABLE PHIEUPH WA RIEULSIOS + {0xBD79, 0xD415}, //10309 #HANGUL SYLLABLE PHIEUPH WA RIEULTHIEUTH + {0xBD7A, 0xD416}, //10310 #HANGUL SYLLABLE PHIEUPH WA RIEULPHIEUPH + {0xBD81, 0xD417}, //10311 #HANGUL SYLLABLE PHIEUPH WA RIEULHIEUH + {0xBD82, 0xD418}, //10312 #HANGUL SYLLABLE PHIEUPH WA MIEUM + {0xBD83, 0xD419}, //10313 #HANGUL SYLLABLE PHIEUPH WA PIEUP + {0xBD84, 0xD41A}, //10314 #HANGUL SYLLABLE PHIEUPH WA PIEUPSIOS + {0xBD85, 0xD41B}, //10315 #HANGUL SYLLABLE PHIEUPH WA SIOS + {0xBD86, 0xD41C}, //10316 #HANGUL SYLLABLE PHIEUPH WA SSANGSIOS + {0xBD87, 0xD41E}, //10317 #HANGUL SYLLABLE PHIEUPH WA CIEUC + {0xBD88, 0xD41F}, //10318 #HANGUL SYLLABLE PHIEUPH WA CHIEUCH + {0xBD89, 0xD420}, //10319 #HANGUL SYLLABLE PHIEUPH WA KHIEUKH + {0xBD8A, 0xD421}, //10320 #HANGUL SYLLABLE PHIEUPH WA THIEUTH + {0xBD8B, 0xD422}, //10321 #HANGUL SYLLABLE PHIEUPH WA PHIEUPH + {0xBD8C, 0xD423}, //10322 #HANGUL SYLLABLE PHIEUPH WA HIEUH + {0xBD8D, 0xD424}, //10323 #HANGUL SYLLABLE PHIEUPH WAE + {0xBD8E, 0xD425}, //10324 #HANGUL SYLLABLE PHIEUPH WAE KIYEOK + {0xBD8F, 0xD426}, //10325 #HANGUL SYLLABLE PHIEUPH WAE SSANGKIYEOK + {0xBD90, 0xD427}, //10326 #HANGUL SYLLABLE PHIEUPH WAE KIYEOKSIOS + {0xBD91, 0xD428}, //10327 #HANGUL SYLLABLE PHIEUPH WAE NIEUN + {0xBD92, 0xD429}, //10328 #HANGUL SYLLABLE PHIEUPH WAE NIEUNCIEUC + {0xBD93, 0xD42A}, //10329 #HANGUL SYLLABLE PHIEUPH WAE NIEUNHIEUH + {0xBD94, 0xD42B}, //10330 #HANGUL SYLLABLE PHIEUPH WAE TIKEUT + {0xBD95, 0xD42C}, //10331 #HANGUL SYLLABLE PHIEUPH WAE RIEUL + {0xBD96, 0xD42D}, //10332 #HANGUL SYLLABLE PHIEUPH WAE RIEULKIYEOK + {0xBD97, 0xD42E}, //10333 #HANGUL SYLLABLE PHIEUPH WAE RIEULMIEUM + {0xBD98, 0xD42F}, //10334 #HANGUL SYLLABLE PHIEUPH WAE RIEULPIEUP + {0xBD99, 0xD430}, //10335 #HANGUL SYLLABLE PHIEUPH WAE RIEULSIOS + {0xBD9A, 0xD431}, //10336 #HANGUL SYLLABLE PHIEUPH WAE RIEULTHIEUTH + {0xBD9B, 0xD432}, //10337 #HANGUL SYLLABLE PHIEUPH WAE RIEULPHIEUPH + {0xBD9C, 0xD433}, //10338 #HANGUL SYLLABLE PHIEUPH WAE RIEULHIEUH + {0xBD9D, 0xD434}, //10339 #HANGUL SYLLABLE PHIEUPH WAE MIEUM + {0xBD9E, 0xD435}, //10340 #HANGUL SYLLABLE PHIEUPH WAE PIEUP + {0xBD9F, 0xD436}, //10341 #HANGUL SYLLABLE PHIEUPH WAE PIEUPSIOS + {0xBDA0, 0xD437}, //10342 #HANGUL SYLLABLE PHIEUPH WAE SIOS + {0xBDA1, 0xC22F}, //10343 #HANGUL SYLLABLE SIOS U CHIEUCH + {0xBDA2, 0xC231}, //10344 #HANGUL SYLLABLE SIOS U THIEUTH + {0xBDA3, 0xC232}, //10345 #HANGUL SYLLABLE SIOS U PHIEUPH + {0xBDA4, 0xC234}, //10346 #HANGUL SYLLABLE SIOS WEO + {0xBDA5, 0xC248}, //10347 #HANGUL SYLLABLE SIOS WEO SSANGSIOS + {0xBDA6, 0xC250}, //10348 #HANGUL SYLLABLE SIOS WE + {0xBDA7, 0xC251}, //10349 #HANGUL SYLLABLE SIOS WE KIYEOK + {0xBDA8, 0xC254}, //10350 #HANGUL SYLLABLE SIOS WE NIEUN + {0xBDA9, 0xC258}, //10351 #HANGUL SYLLABLE SIOS WE RIEUL + {0xBDAA, 0xC260}, //10352 #HANGUL SYLLABLE SIOS WE MIEUM + {0xBDAB, 0xC265}, //10353 #HANGUL SYLLABLE SIOS WE IEUNG + {0xBDAC, 0xC26C}, //10354 #HANGUL SYLLABLE SIOS WI + {0xBDAD, 0xC26D}, //10355 #HANGUL SYLLABLE SIOS WI KIYEOK + {0xBDAE, 0xC270}, //10356 #HANGUL SYLLABLE SIOS WI NIEUN + {0xBDAF, 0xC274}, //10357 #HANGUL SYLLABLE SIOS WI RIEUL + {0xBDB0, 0xC27C}, //10358 #HANGUL SYLLABLE SIOS WI MIEUM + {0xBDB1, 0xC27D}, //10359 #HANGUL SYLLABLE SIOS WI PIEUP + {0xBDB2, 0xC27F}, //10360 #HANGUL SYLLABLE SIOS WI SIOS + {0xBDB3, 0xC281}, //10361 #HANGUL SYLLABLE SIOS WI IEUNG + {0xBDB4, 0xC288}, //10362 #HANGUL SYLLABLE SIOS YU + {0xBDB5, 0xC289}, //10363 #HANGUL SYLLABLE SIOS YU KIYEOK + {0xBDB6, 0xC290}, //10364 #HANGUL SYLLABLE SIOS YU RIEUL + {0xBDB7, 0xC298}, //10365 #HANGUL SYLLABLE SIOS YU MIEUM + {0xBDB8, 0xC29B}, //10366 #HANGUL SYLLABLE SIOS YU SIOS + {0xBDB9, 0xC29D}, //10367 #HANGUL SYLLABLE SIOS YU IEUNG + {0xBDBA, 0xC2A4}, //10368 #HANGUL SYLLABLE SIOS EU + {0xBDBB, 0xC2A5}, //10369 #HANGUL SYLLABLE SIOS EU KIYEOK + {0xBDBC, 0xC2A8}, //10370 #HANGUL SYLLABLE SIOS EU NIEUN + {0xBDBD, 0xC2AC}, //10371 #HANGUL SYLLABLE SIOS EU RIEUL + {0xBDBE, 0xC2AD}, //10372 #HANGUL SYLLABLE SIOS EU RIEULKIYEOK + {0xBDBF, 0xC2B4}, //10373 #HANGUL SYLLABLE SIOS EU MIEUM + {0xBDC0, 0xC2B5}, //10374 #HANGUL SYLLABLE SIOS EU PIEUP + {0xBDC1, 0xC2B7}, //10375 #HANGUL SYLLABLE SIOS EU SIOS + {0xBDC2, 0xC2B9}, //10376 #HANGUL SYLLABLE SIOS EU IEUNG + {0xBDC3, 0xC2DC}, //10377 #HANGUL SYLLABLE SIOS I + {0xBDC4, 0xC2DD}, //10378 #HANGUL SYLLABLE SIOS I KIYEOK + {0xBDC5, 0xC2E0}, //10379 #HANGUL SYLLABLE SIOS I NIEUN + {0xBDC6, 0xC2E3}, //10380 #HANGUL SYLLABLE SIOS I TIKEUT + {0xBDC7, 0xC2E4}, //10381 #HANGUL SYLLABLE SIOS I RIEUL + {0xBDC8, 0xC2EB}, //10382 #HANGUL SYLLABLE SIOS I RIEULHIEUH + {0xBDC9, 0xC2EC}, //10383 #HANGUL SYLLABLE SIOS I MIEUM + {0xBDCA, 0xC2ED}, //10384 #HANGUL SYLLABLE SIOS I PIEUP + {0xBDCB, 0xC2EF}, //10385 #HANGUL SYLLABLE SIOS I SIOS + {0xBDCC, 0xC2F1}, //10386 #HANGUL SYLLABLE SIOS I IEUNG + {0xBDCD, 0xC2F6}, //10387 #HANGUL SYLLABLE SIOS I PHIEUPH + {0xBDCE, 0xC2F8}, //10388 #HANGUL SYLLABLE SSANGSIOS A + {0xBDCF, 0xC2F9}, //10389 #HANGUL SYLLABLE SSANGSIOS A KIYEOK + {0xBDD0, 0xC2FB}, //10390 #HANGUL SYLLABLE SSANGSIOS A KIYEOKSIOS + {0xBDD1, 0xC2FC}, //10391 #HANGUL SYLLABLE SSANGSIOS A NIEUN + {0xBDD2, 0xC300}, //10392 #HANGUL SYLLABLE SSANGSIOS A RIEUL + {0xBDD3, 0xC308}, //10393 #HANGUL SYLLABLE SSANGSIOS A MIEUM + {0xBDD4, 0xC309}, //10394 #HANGUL SYLLABLE SSANGSIOS A PIEUP + {0xBDD5, 0xC30C}, //10395 #HANGUL SYLLABLE SSANGSIOS A SSANGSIOS + {0xBDD6, 0xC30D}, //10396 #HANGUL SYLLABLE SSANGSIOS A IEUNG + {0xBDD7, 0xC313}, //10397 #HANGUL SYLLABLE SSANGSIOS A HIEUH + {0xBDD8, 0xC314}, //10398 #HANGUL SYLLABLE SSANGSIOS AE + {0xBDD9, 0xC315}, //10399 #HANGUL SYLLABLE SSANGSIOS AE KIYEOK + {0xBDDA, 0xC318}, //10400 #HANGUL SYLLABLE SSANGSIOS AE NIEUN + {0xBDDB, 0xC31C}, //10401 #HANGUL SYLLABLE SSANGSIOS AE RIEUL + {0xBDDC, 0xC324}, //10402 #HANGUL SYLLABLE SSANGSIOS AE MIEUM + {0xBDDD, 0xC325}, //10403 #HANGUL SYLLABLE SSANGSIOS AE PIEUP + {0xBDDE, 0xC328}, //10404 #HANGUL SYLLABLE SSANGSIOS AE SSANGSIOS + {0xBDDF, 0xC329}, //10405 #HANGUL SYLLABLE SSANGSIOS AE IEUNG + {0xBDE0, 0xC345}, //10406 #HANGUL SYLLABLE SSANGSIOS YA IEUNG + {0xBDE1, 0xC368}, //10407 #HANGUL SYLLABLE SSANGSIOS EO + {0xBDE2, 0xC369}, //10408 #HANGUL SYLLABLE SSANGSIOS EO KIYEOK + {0xBDE3, 0xC36C}, //10409 #HANGUL SYLLABLE SSANGSIOS EO NIEUN + {0xBDE4, 0xC370}, //10410 #HANGUL SYLLABLE SSANGSIOS EO RIEUL + {0xBDE5, 0xC372}, //10411 #HANGUL SYLLABLE SSANGSIOS EO RIEULMIEUM + {0xBDE6, 0xC378}, //10412 #HANGUL SYLLABLE SSANGSIOS EO MIEUM + {0xBDE7, 0xC379}, //10413 #HANGUL SYLLABLE SSANGSIOS EO PIEUP + {0xBDE8, 0xC37C}, //10414 #HANGUL SYLLABLE SSANGSIOS EO SSANGSIOS + {0xBDE9, 0xC37D}, //10415 #HANGUL SYLLABLE SSANGSIOS EO IEUNG + {0xBDEA, 0xC384}, //10416 #HANGUL SYLLABLE SSANGSIOS E + {0xBDEB, 0xC388}, //10417 #HANGUL SYLLABLE SSANGSIOS E NIEUN + {0xBDEC, 0xC38C}, //10418 #HANGUL SYLLABLE SSANGSIOS E RIEUL + {0xBDED, 0xC3C0}, //10419 #HANGUL SYLLABLE SSANGSIOS YE NIEUN + {0xBDEE, 0xC3D8}, //10420 #HANGUL SYLLABLE SSANGSIOS O + {0xBDEF, 0xC3D9}, //10421 #HANGUL SYLLABLE SSANGSIOS O KIYEOK + {0xBDF0, 0xC3DC}, //10422 #HANGUL SYLLABLE SSANGSIOS O NIEUN + {0xBDF1, 0xC3DF}, //10423 #HANGUL SYLLABLE SSANGSIOS O TIKEUT + {0xBDF2, 0xC3E0}, //10424 #HANGUL SYLLABLE SSANGSIOS O RIEUL + {0xBDF3, 0xC3E2}, //10425 #HANGUL SYLLABLE SSANGSIOS O RIEULMIEUM + {0xBDF4, 0xC3E8}, //10426 #HANGUL SYLLABLE SSANGSIOS O MIEUM + {0xBDF5, 0xC3E9}, //10427 #HANGUL SYLLABLE SSANGSIOS O PIEUP + {0xBDF6, 0xC3ED}, //10428 #HANGUL SYLLABLE SSANGSIOS O IEUNG + {0xBDF7, 0xC3F4}, //10429 #HANGUL SYLLABLE SSANGSIOS WA + {0xBDF8, 0xC3F5}, //10430 #HANGUL SYLLABLE SSANGSIOS WA KIYEOK + {0xBDF9, 0xC3F8}, //10431 #HANGUL SYLLABLE SSANGSIOS WA NIEUN + {0xBDFA, 0xC408}, //10432 #HANGUL SYLLABLE SSANGSIOS WA SSANGSIOS + {0xBDFB, 0xC410}, //10433 #HANGUL SYLLABLE SSANGSIOS WAE + {0xBDFC, 0xC424}, //10434 #HANGUL SYLLABLE SSANGSIOS WAE SSANGSIOS + {0xBDFD, 0xC42C}, //10435 #HANGUL SYLLABLE SSANGSIOS OE + {0xBDFE, 0xC430}, //10436 #HANGUL SYLLABLE SSANGSIOS OE NIEUN + {0xBE41, 0xD438}, //10437 #HANGUL SYLLABLE PHIEUPH WAE SSANGSIOS + {0xBE42, 0xD439}, //10438 #HANGUL SYLLABLE PHIEUPH WAE IEUNG + {0xBE43, 0xD43A}, //10439 #HANGUL SYLLABLE PHIEUPH WAE CIEUC + {0xBE44, 0xD43B}, //10440 #HANGUL SYLLABLE PHIEUPH WAE CHIEUCH + {0xBE45, 0xD43C}, //10441 #HANGUL SYLLABLE PHIEUPH WAE KHIEUKH + {0xBE46, 0xD43D}, //10442 #HANGUL SYLLABLE PHIEUPH WAE THIEUTH + {0xBE47, 0xD43E}, //10443 #HANGUL SYLLABLE PHIEUPH WAE PHIEUPH + {0xBE48, 0xD43F}, //10444 #HANGUL SYLLABLE PHIEUPH WAE HIEUH + {0xBE49, 0xD441}, //10445 #HANGUL SYLLABLE PHIEUPH OE KIYEOK + {0xBE4A, 0xD442}, //10446 #HANGUL SYLLABLE PHIEUPH OE SSANGKIYEOK + {0xBE4B, 0xD443}, //10447 #HANGUL SYLLABLE PHIEUPH OE KIYEOKSIOS + {0xBE4C, 0xD445}, //10448 #HANGUL SYLLABLE PHIEUPH OE NIEUNCIEUC + {0xBE4D, 0xD446}, //10449 #HANGUL SYLLABLE PHIEUPH OE NIEUNHIEUH + {0xBE4E, 0xD447}, //10450 #HANGUL SYLLABLE PHIEUPH OE TIKEUT + {0xBE4F, 0xD448}, //10451 #HANGUL SYLLABLE PHIEUPH OE RIEUL + {0xBE50, 0xD449}, //10452 #HANGUL SYLLABLE PHIEUPH OE RIEULKIYEOK + {0xBE51, 0xD44A}, //10453 #HANGUL SYLLABLE PHIEUPH OE RIEULMIEUM + {0xBE52, 0xD44B}, //10454 #HANGUL SYLLABLE PHIEUPH OE RIEULPIEUP + {0xBE53, 0xD44C}, //10455 #HANGUL SYLLABLE PHIEUPH OE RIEULSIOS + {0xBE54, 0xD44D}, //10456 #HANGUL SYLLABLE PHIEUPH OE RIEULTHIEUTH + {0xBE55, 0xD44E}, //10457 #HANGUL SYLLABLE PHIEUPH OE RIEULPHIEUPH + {0xBE56, 0xD44F}, //10458 #HANGUL SYLLABLE PHIEUPH OE RIEULHIEUH + {0xBE57, 0xD450}, //10459 #HANGUL SYLLABLE PHIEUPH OE MIEUM + {0xBE58, 0xD451}, //10460 #HANGUL SYLLABLE PHIEUPH OE PIEUP + {0xBE59, 0xD452}, //10461 #HANGUL SYLLABLE PHIEUPH OE PIEUPSIOS + {0xBE5A, 0xD453}, //10462 #HANGUL SYLLABLE PHIEUPH OE SIOS + {0xBE61, 0xD454}, //10463 #HANGUL SYLLABLE PHIEUPH OE SSANGSIOS + {0xBE62, 0xD455}, //10464 #HANGUL SYLLABLE PHIEUPH OE IEUNG + {0xBE63, 0xD456}, //10465 #HANGUL SYLLABLE PHIEUPH OE CIEUC + {0xBE64, 0xD457}, //10466 #HANGUL SYLLABLE PHIEUPH OE CHIEUCH + {0xBE65, 0xD458}, //10467 #HANGUL SYLLABLE PHIEUPH OE KHIEUKH + {0xBE66, 0xD459}, //10468 #HANGUL SYLLABLE PHIEUPH OE THIEUTH + {0xBE67, 0xD45A}, //10469 #HANGUL SYLLABLE PHIEUPH OE PHIEUPH + {0xBE68, 0xD45B}, //10470 #HANGUL SYLLABLE PHIEUPH OE HIEUH + {0xBE69, 0xD45D}, //10471 #HANGUL SYLLABLE PHIEUPH YO KIYEOK + {0xBE6A, 0xD45E}, //10472 #HANGUL SYLLABLE PHIEUPH YO SSANGKIYEOK + {0xBE6B, 0xD45F}, //10473 #HANGUL SYLLABLE PHIEUPH YO KIYEOKSIOS + {0xBE6C, 0xD461}, //10474 #HANGUL SYLLABLE PHIEUPH YO NIEUNCIEUC + {0xBE6D, 0xD462}, //10475 #HANGUL SYLLABLE PHIEUPH YO NIEUNHIEUH + {0xBE6E, 0xD463}, //10476 #HANGUL SYLLABLE PHIEUPH YO TIKEUT + {0xBE6F, 0xD465}, //10477 #HANGUL SYLLABLE PHIEUPH YO RIEULKIYEOK + {0xBE70, 0xD466}, //10478 #HANGUL SYLLABLE PHIEUPH YO RIEULMIEUM + {0xBE71, 0xD467}, //10479 #HANGUL SYLLABLE PHIEUPH YO RIEULPIEUP + {0xBE72, 0xD468}, //10480 #HANGUL SYLLABLE PHIEUPH YO RIEULSIOS + {0xBE73, 0xD469}, //10481 #HANGUL SYLLABLE PHIEUPH YO RIEULTHIEUTH + {0xBE74, 0xD46A}, //10482 #HANGUL SYLLABLE PHIEUPH YO RIEULPHIEUPH + {0xBE75, 0xD46B}, //10483 #HANGUL SYLLABLE PHIEUPH YO RIEULHIEUH + {0xBE76, 0xD46C}, //10484 #HANGUL SYLLABLE PHIEUPH YO MIEUM + {0xBE77, 0xD46E}, //10485 #HANGUL SYLLABLE PHIEUPH YO PIEUPSIOS + {0xBE78, 0xD470}, //10486 #HANGUL SYLLABLE PHIEUPH YO SSANGSIOS + {0xBE79, 0xD471}, //10487 #HANGUL SYLLABLE PHIEUPH YO IEUNG + {0xBE7A, 0xD472}, //10488 #HANGUL SYLLABLE PHIEUPH YO CIEUC + {0xBE81, 0xD473}, //10489 #HANGUL SYLLABLE PHIEUPH YO CHIEUCH + {0xBE82, 0xD474}, //10490 #HANGUL SYLLABLE PHIEUPH YO KHIEUKH + {0xBE83, 0xD475}, //10491 #HANGUL SYLLABLE PHIEUPH YO THIEUTH + {0xBE84, 0xD476}, //10492 #HANGUL SYLLABLE PHIEUPH YO PHIEUPH + {0xBE85, 0xD477}, //10493 #HANGUL SYLLABLE PHIEUPH YO HIEUH + {0xBE86, 0xD47A}, //10494 #HANGUL SYLLABLE PHIEUPH U SSANGKIYEOK + {0xBE87, 0xD47B}, //10495 #HANGUL SYLLABLE PHIEUPH U KIYEOKSIOS + {0xBE88, 0xD47D}, //10496 #HANGUL SYLLABLE PHIEUPH U NIEUNCIEUC + {0xBE89, 0xD47E}, //10497 #HANGUL SYLLABLE PHIEUPH U NIEUNHIEUH + {0xBE8A, 0xD481}, //10498 #HANGUL SYLLABLE PHIEUPH U RIEULKIYEOK + {0xBE8B, 0xD483}, //10499 #HANGUL SYLLABLE PHIEUPH U RIEULPIEUP + {0xBE8C, 0xD484}, //10500 #HANGUL SYLLABLE PHIEUPH U RIEULSIOS + {0xBE8D, 0xD485}, //10501 #HANGUL SYLLABLE PHIEUPH U RIEULTHIEUTH + {0xBE8E, 0xD486}, //10502 #HANGUL SYLLABLE PHIEUPH U RIEULPHIEUPH + {0xBE8F, 0xD487}, //10503 #HANGUL SYLLABLE PHIEUPH U RIEULHIEUH + {0xBE90, 0xD48A}, //10504 #HANGUL SYLLABLE PHIEUPH U PIEUPSIOS + {0xBE91, 0xD48C}, //10505 #HANGUL SYLLABLE PHIEUPH U SSANGSIOS + {0xBE92, 0xD48E}, //10506 #HANGUL SYLLABLE PHIEUPH U CIEUC + {0xBE93, 0xD48F}, //10507 #HANGUL SYLLABLE PHIEUPH U CHIEUCH + {0xBE94, 0xD490}, //10508 #HANGUL SYLLABLE PHIEUPH U KHIEUKH + {0xBE95, 0xD491}, //10509 #HANGUL SYLLABLE PHIEUPH U THIEUTH + {0xBE96, 0xD492}, //10510 #HANGUL SYLLABLE PHIEUPH U PHIEUPH + {0xBE97, 0xD493}, //10511 #HANGUL SYLLABLE PHIEUPH U HIEUH + {0xBE98, 0xD495}, //10512 #HANGUL SYLLABLE PHIEUPH WEO KIYEOK + {0xBE99, 0xD496}, //10513 #HANGUL SYLLABLE PHIEUPH WEO SSANGKIYEOK + {0xBE9A, 0xD497}, //10514 #HANGUL SYLLABLE PHIEUPH WEO KIYEOKSIOS + {0xBE9B, 0xD498}, //10515 #HANGUL SYLLABLE PHIEUPH WEO NIEUN + {0xBE9C, 0xD499}, //10516 #HANGUL SYLLABLE PHIEUPH WEO NIEUNCIEUC + {0xBE9D, 0xD49A}, //10517 #HANGUL SYLLABLE PHIEUPH WEO NIEUNHIEUH + {0xBE9E, 0xD49B}, //10518 #HANGUL SYLLABLE PHIEUPH WEO TIKEUT + {0xBE9F, 0xD49C}, //10519 #HANGUL SYLLABLE PHIEUPH WEO RIEUL + {0xBEA0, 0xD49D}, //10520 #HANGUL SYLLABLE PHIEUPH WEO RIEULKIYEOK + {0xBEA1, 0xC434}, //10521 #HANGUL SYLLABLE SSANGSIOS OE RIEUL + {0xBEA2, 0xC43C}, //10522 #HANGUL SYLLABLE SSANGSIOS OE MIEUM + {0xBEA3, 0xC43D}, //10523 #HANGUL SYLLABLE SSANGSIOS OE PIEUP + {0xBEA4, 0xC448}, //10524 #HANGUL SYLLABLE SSANGSIOS YO + {0xBEA5, 0xC464}, //10525 #HANGUL SYLLABLE SSANGSIOS U + {0xBEA6, 0xC465}, //10526 #HANGUL SYLLABLE SSANGSIOS U KIYEOK + {0xBEA7, 0xC468}, //10527 #HANGUL SYLLABLE SSANGSIOS U NIEUN + {0xBEA8, 0xC46C}, //10528 #HANGUL SYLLABLE SSANGSIOS U RIEUL + {0xBEA9, 0xC474}, //10529 #HANGUL SYLLABLE SSANGSIOS U MIEUM + {0xBEAA, 0xC475}, //10530 #HANGUL SYLLABLE SSANGSIOS U PIEUP + {0xBEAB, 0xC479}, //10531 #HANGUL SYLLABLE SSANGSIOS U IEUNG + {0xBEAC, 0xC480}, //10532 #HANGUL SYLLABLE SSANGSIOS WEO + {0xBEAD, 0xC494}, //10533 #HANGUL SYLLABLE SSANGSIOS WEO SSANGSIOS + {0xBEAE, 0xC49C}, //10534 #HANGUL SYLLABLE SSANGSIOS WE + {0xBEAF, 0xC4B8}, //10535 #HANGUL SYLLABLE SSANGSIOS WI + {0xBEB0, 0xC4BC}, //10536 #HANGUL SYLLABLE SSANGSIOS WI NIEUN + {0xBEB1, 0xC4E9}, //10537 #HANGUL SYLLABLE SSANGSIOS YU IEUNG + {0xBEB2, 0xC4F0}, //10538 #HANGUL SYLLABLE SSANGSIOS EU + {0xBEB3, 0xC4F1}, //10539 #HANGUL SYLLABLE SSANGSIOS EU KIYEOK + {0xBEB4, 0xC4F4}, //10540 #HANGUL SYLLABLE SSANGSIOS EU NIEUN + {0xBEB5, 0xC4F8}, //10541 #HANGUL SYLLABLE SSANGSIOS EU RIEUL + {0xBEB6, 0xC4FA}, //10542 #HANGUL SYLLABLE SSANGSIOS EU RIEULMIEUM + {0xBEB7, 0xC4FF}, //10543 #HANGUL SYLLABLE SSANGSIOS EU RIEULHIEUH + {0xBEB8, 0xC500}, //10544 #HANGUL SYLLABLE SSANGSIOS EU MIEUM + {0xBEB9, 0xC501}, //10545 #HANGUL SYLLABLE SSANGSIOS EU PIEUP + {0xBEBA, 0xC50C}, //10546 #HANGUL SYLLABLE SSANGSIOS YI + {0xBEBB, 0xC510}, //10547 #HANGUL SYLLABLE SSANGSIOS YI NIEUN + {0xBEBC, 0xC514}, //10548 #HANGUL SYLLABLE SSANGSIOS YI RIEUL + {0xBEBD, 0xC51C}, //10549 #HANGUL SYLLABLE SSANGSIOS YI MIEUM + {0xBEBE, 0xC528}, //10550 #HANGUL SYLLABLE SSANGSIOS I + {0xBEBF, 0xC529}, //10551 #HANGUL SYLLABLE SSANGSIOS I KIYEOK + {0xBEC0, 0xC52C}, //10552 #HANGUL SYLLABLE SSANGSIOS I NIEUN + {0xBEC1, 0xC530}, //10553 #HANGUL SYLLABLE SSANGSIOS I RIEUL + {0xBEC2, 0xC538}, //10554 #HANGUL SYLLABLE SSANGSIOS I MIEUM + {0xBEC3, 0xC539}, //10555 #HANGUL SYLLABLE SSANGSIOS I PIEUP + {0xBEC4, 0xC53B}, //10556 #HANGUL SYLLABLE SSANGSIOS I SIOS + {0xBEC5, 0xC53D}, //10557 #HANGUL SYLLABLE SSANGSIOS I IEUNG + {0xBEC6, 0xC544}, //10558 #HANGUL SYLLABLE IEUNG A + {0xBEC7, 0xC545}, //10559 #HANGUL SYLLABLE IEUNG A KIYEOK + {0xBEC8, 0xC548}, //10560 #HANGUL SYLLABLE IEUNG A NIEUN + {0xBEC9, 0xC549}, //10561 #HANGUL SYLLABLE IEUNG A NIEUNCIEUC + {0xBECA, 0xC54A}, //10562 #HANGUL SYLLABLE IEUNG A NIEUNHIEUH + {0xBECB, 0xC54C}, //10563 #HANGUL SYLLABLE IEUNG A RIEUL + {0xBECC, 0xC54D}, //10564 #HANGUL SYLLABLE IEUNG A RIEULKIYEOK + {0xBECD, 0xC54E}, //10565 #HANGUL SYLLABLE IEUNG A RIEULMIEUM + {0xBECE, 0xC553}, //10566 #HANGUL SYLLABLE IEUNG A RIEULHIEUH + {0xBECF, 0xC554}, //10567 #HANGUL SYLLABLE IEUNG A MIEUM + {0xBED0, 0xC555}, //10568 #HANGUL SYLLABLE IEUNG A PIEUP + {0xBED1, 0xC557}, //10569 #HANGUL SYLLABLE IEUNG A SIOS + {0xBED2, 0xC558}, //10570 #HANGUL SYLLABLE IEUNG A SSANGSIOS + {0xBED3, 0xC559}, //10571 #HANGUL SYLLABLE IEUNG A IEUNG + {0xBED4, 0xC55D}, //10572 #HANGUL SYLLABLE IEUNG A THIEUTH + {0xBED5, 0xC55E}, //10573 #HANGUL SYLLABLE IEUNG A PHIEUPH + {0xBED6, 0xC560}, //10574 #HANGUL SYLLABLE IEUNG AE + {0xBED7, 0xC561}, //10575 #HANGUL SYLLABLE IEUNG AE KIYEOK + {0xBED8, 0xC564}, //10576 #HANGUL SYLLABLE IEUNG AE NIEUN + {0xBED9, 0xC568}, //10577 #HANGUL SYLLABLE IEUNG AE RIEUL + {0xBEDA, 0xC570}, //10578 #HANGUL SYLLABLE IEUNG AE MIEUM + {0xBEDB, 0xC571}, //10579 #HANGUL SYLLABLE IEUNG AE PIEUP + {0xBEDC, 0xC573}, //10580 #HANGUL SYLLABLE IEUNG AE SIOS + {0xBEDD, 0xC574}, //10581 #HANGUL SYLLABLE IEUNG AE SSANGSIOS + {0xBEDE, 0xC575}, //10582 #HANGUL SYLLABLE IEUNG AE IEUNG + {0xBEDF, 0xC57C}, //10583 #HANGUL SYLLABLE IEUNG YA + {0xBEE0, 0xC57D}, //10584 #HANGUL SYLLABLE IEUNG YA KIYEOK + {0xBEE1, 0xC580}, //10585 #HANGUL SYLLABLE IEUNG YA NIEUN + {0xBEE2, 0xC584}, //10586 #HANGUL SYLLABLE IEUNG YA RIEUL + {0xBEE3, 0xC587}, //10587 #HANGUL SYLLABLE IEUNG YA RIEULPIEUP + {0xBEE4, 0xC58C}, //10588 #HANGUL SYLLABLE IEUNG YA MIEUM + {0xBEE5, 0xC58D}, //10589 #HANGUL SYLLABLE IEUNG YA PIEUP + {0xBEE6, 0xC58F}, //10590 #HANGUL SYLLABLE IEUNG YA SIOS + {0xBEE7, 0xC591}, //10591 #HANGUL SYLLABLE IEUNG YA IEUNG + {0xBEE8, 0xC595}, //10592 #HANGUL SYLLABLE IEUNG YA THIEUTH + {0xBEE9, 0xC597}, //10593 #HANGUL SYLLABLE IEUNG YA HIEUH + {0xBEEA, 0xC598}, //10594 #HANGUL SYLLABLE IEUNG YAE + {0xBEEB, 0xC59C}, //10595 #HANGUL SYLLABLE IEUNG YAE NIEUN + {0xBEEC, 0xC5A0}, //10596 #HANGUL SYLLABLE IEUNG YAE RIEUL + {0xBEED, 0xC5A9}, //10597 #HANGUL SYLLABLE IEUNG YAE PIEUP + {0xBEEE, 0xC5B4}, //10598 #HANGUL SYLLABLE IEUNG EO + {0xBEEF, 0xC5B5}, //10599 #HANGUL SYLLABLE IEUNG EO KIYEOK + {0xBEF0, 0xC5B8}, //10600 #HANGUL SYLLABLE IEUNG EO NIEUN + {0xBEF1, 0xC5B9}, //10601 #HANGUL SYLLABLE IEUNG EO NIEUNCIEUC + {0xBEF2, 0xC5BB}, //10602 #HANGUL SYLLABLE IEUNG EO TIKEUT + {0xBEF3, 0xC5BC}, //10603 #HANGUL SYLLABLE IEUNG EO RIEUL + {0xBEF4, 0xC5BD}, //10604 #HANGUL SYLLABLE IEUNG EO RIEULKIYEOK + {0xBEF5, 0xC5BE}, //10605 #HANGUL SYLLABLE IEUNG EO RIEULMIEUM + {0xBEF6, 0xC5C4}, //10606 #HANGUL SYLLABLE IEUNG EO MIEUM + {0xBEF7, 0xC5C5}, //10607 #HANGUL SYLLABLE IEUNG EO PIEUP + {0xBEF8, 0xC5C6}, //10608 #HANGUL SYLLABLE IEUNG EO PIEUPSIOS + {0xBEF9, 0xC5C7}, //10609 #HANGUL SYLLABLE IEUNG EO SIOS + {0xBEFA, 0xC5C8}, //10610 #HANGUL SYLLABLE IEUNG EO SSANGSIOS + {0xBEFB, 0xC5C9}, //10611 #HANGUL SYLLABLE IEUNG EO IEUNG + {0xBEFC, 0xC5CA}, //10612 #HANGUL SYLLABLE IEUNG EO CIEUC + {0xBEFD, 0xC5CC}, //10613 #HANGUL SYLLABLE IEUNG EO KHIEUKH + {0xBEFE, 0xC5CE}, //10614 #HANGUL SYLLABLE IEUNG EO PHIEUPH + {0xBF41, 0xD49E}, //10615 #HANGUL SYLLABLE PHIEUPH WEO RIEULMIEUM + {0xBF42, 0xD49F}, //10616 #HANGUL SYLLABLE PHIEUPH WEO RIEULPIEUP + {0xBF43, 0xD4A0}, //10617 #HANGUL SYLLABLE PHIEUPH WEO RIEULSIOS + {0xBF44, 0xD4A1}, //10618 #HANGUL SYLLABLE PHIEUPH WEO RIEULTHIEUTH + {0xBF45, 0xD4A2}, //10619 #HANGUL SYLLABLE PHIEUPH WEO RIEULPHIEUPH + {0xBF46, 0xD4A3}, //10620 #HANGUL SYLLABLE PHIEUPH WEO RIEULHIEUH + {0xBF47, 0xD4A4}, //10621 #HANGUL SYLLABLE PHIEUPH WEO MIEUM + {0xBF48, 0xD4A5}, //10622 #HANGUL SYLLABLE PHIEUPH WEO PIEUP + {0xBF49, 0xD4A6}, //10623 #HANGUL SYLLABLE PHIEUPH WEO PIEUPSIOS + {0xBF4A, 0xD4A7}, //10624 #HANGUL SYLLABLE PHIEUPH WEO SIOS + {0xBF4B, 0xD4A8}, //10625 #HANGUL SYLLABLE PHIEUPH WEO SSANGSIOS + {0xBF4C, 0xD4AA}, //10626 #HANGUL SYLLABLE PHIEUPH WEO CIEUC + {0xBF4D, 0xD4AB}, //10627 #HANGUL SYLLABLE PHIEUPH WEO CHIEUCH + {0xBF4E, 0xD4AC}, //10628 #HANGUL SYLLABLE PHIEUPH WEO KHIEUKH + {0xBF4F, 0xD4AD}, //10629 #HANGUL SYLLABLE PHIEUPH WEO THIEUTH + {0xBF50, 0xD4AE}, //10630 #HANGUL SYLLABLE PHIEUPH WEO PHIEUPH + {0xBF51, 0xD4AF}, //10631 #HANGUL SYLLABLE PHIEUPH WEO HIEUH + {0xBF52, 0xD4B0}, //10632 #HANGUL SYLLABLE PHIEUPH WE + {0xBF53, 0xD4B1}, //10633 #HANGUL SYLLABLE PHIEUPH WE KIYEOK + {0xBF54, 0xD4B2}, //10634 #HANGUL SYLLABLE PHIEUPH WE SSANGKIYEOK + {0xBF55, 0xD4B3}, //10635 #HANGUL SYLLABLE PHIEUPH WE KIYEOKSIOS + {0xBF56, 0xD4B4}, //10636 #HANGUL SYLLABLE PHIEUPH WE NIEUN + {0xBF57, 0xD4B5}, //10637 #HANGUL SYLLABLE PHIEUPH WE NIEUNCIEUC + {0xBF58, 0xD4B6}, //10638 #HANGUL SYLLABLE PHIEUPH WE NIEUNHIEUH + {0xBF59, 0xD4B7}, //10639 #HANGUL SYLLABLE PHIEUPH WE TIKEUT + {0xBF5A, 0xD4B8}, //10640 #HANGUL SYLLABLE PHIEUPH WE RIEUL + {0xBF61, 0xD4B9}, //10641 #HANGUL SYLLABLE PHIEUPH WE RIEULKIYEOK + {0xBF62, 0xD4BA}, //10642 #HANGUL SYLLABLE PHIEUPH WE RIEULMIEUM + {0xBF63, 0xD4BB}, //10643 #HANGUL SYLLABLE PHIEUPH WE RIEULPIEUP + {0xBF64, 0xD4BC}, //10644 #HANGUL SYLLABLE PHIEUPH WE RIEULSIOS + {0xBF65, 0xD4BD}, //10645 #HANGUL SYLLABLE PHIEUPH WE RIEULTHIEUTH + {0xBF66, 0xD4BE}, //10646 #HANGUL SYLLABLE PHIEUPH WE RIEULPHIEUPH + {0xBF67, 0xD4BF}, //10647 #HANGUL SYLLABLE PHIEUPH WE RIEULHIEUH + {0xBF68, 0xD4C0}, //10648 #HANGUL SYLLABLE PHIEUPH WE MIEUM + {0xBF69, 0xD4C1}, //10649 #HANGUL SYLLABLE PHIEUPH WE PIEUP + {0xBF6A, 0xD4C2}, //10650 #HANGUL SYLLABLE PHIEUPH WE PIEUPSIOS + {0xBF6B, 0xD4C3}, //10651 #HANGUL SYLLABLE PHIEUPH WE SIOS + {0xBF6C, 0xD4C4}, //10652 #HANGUL SYLLABLE PHIEUPH WE SSANGSIOS + {0xBF6D, 0xD4C5}, //10653 #HANGUL SYLLABLE PHIEUPH WE IEUNG + {0xBF6E, 0xD4C6}, //10654 #HANGUL SYLLABLE PHIEUPH WE CIEUC + {0xBF6F, 0xD4C7}, //10655 #HANGUL SYLLABLE PHIEUPH WE CHIEUCH + {0xBF70, 0xD4C8}, //10656 #HANGUL SYLLABLE PHIEUPH WE KHIEUKH + {0xBF71, 0xD4C9}, //10657 #HANGUL SYLLABLE PHIEUPH WE THIEUTH + {0xBF72, 0xD4CA}, //10658 #HANGUL SYLLABLE PHIEUPH WE PHIEUPH + {0xBF73, 0xD4CB}, //10659 #HANGUL SYLLABLE PHIEUPH WE HIEUH + {0xBF74, 0xD4CD}, //10660 #HANGUL SYLLABLE PHIEUPH WI KIYEOK + {0xBF75, 0xD4CE}, //10661 #HANGUL SYLLABLE PHIEUPH WI SSANGKIYEOK + {0xBF76, 0xD4CF}, //10662 #HANGUL SYLLABLE PHIEUPH WI KIYEOKSIOS + {0xBF77, 0xD4D1}, //10663 #HANGUL SYLLABLE PHIEUPH WI NIEUNCIEUC + {0xBF78, 0xD4D2}, //10664 #HANGUL SYLLABLE PHIEUPH WI NIEUNHIEUH + {0xBF79, 0xD4D3}, //10665 #HANGUL SYLLABLE PHIEUPH WI TIKEUT + {0xBF7A, 0xD4D5}, //10666 #HANGUL SYLLABLE PHIEUPH WI RIEULKIYEOK + {0xBF81, 0xD4D6}, //10667 #HANGUL SYLLABLE PHIEUPH WI RIEULMIEUM + {0xBF82, 0xD4D7}, //10668 #HANGUL SYLLABLE PHIEUPH WI RIEULPIEUP + {0xBF83, 0xD4D8}, //10669 #HANGUL SYLLABLE PHIEUPH WI RIEULSIOS + {0xBF84, 0xD4D9}, //10670 #HANGUL SYLLABLE PHIEUPH WI RIEULTHIEUTH + {0xBF85, 0xD4DA}, //10671 #HANGUL SYLLABLE PHIEUPH WI RIEULPHIEUPH + {0xBF86, 0xD4DB}, //10672 #HANGUL SYLLABLE PHIEUPH WI RIEULHIEUH + {0xBF87, 0xD4DD}, //10673 #HANGUL SYLLABLE PHIEUPH WI PIEUP + {0xBF88, 0xD4DE}, //10674 #HANGUL SYLLABLE PHIEUPH WI PIEUPSIOS + {0xBF89, 0xD4E0}, //10675 #HANGUL SYLLABLE PHIEUPH WI SSANGSIOS + {0xBF8A, 0xD4E1}, //10676 #HANGUL SYLLABLE PHIEUPH WI IEUNG + {0xBF8B, 0xD4E2}, //10677 #HANGUL SYLLABLE PHIEUPH WI CIEUC + {0xBF8C, 0xD4E3}, //10678 #HANGUL SYLLABLE PHIEUPH WI CHIEUCH + {0xBF8D, 0xD4E4}, //10679 #HANGUL SYLLABLE PHIEUPH WI KHIEUKH + {0xBF8E, 0xD4E5}, //10680 #HANGUL SYLLABLE PHIEUPH WI THIEUTH + {0xBF8F, 0xD4E6}, //10681 #HANGUL SYLLABLE PHIEUPH WI PHIEUPH + {0xBF90, 0xD4E7}, //10682 #HANGUL SYLLABLE PHIEUPH WI HIEUH + {0xBF91, 0xD4E9}, //10683 #HANGUL SYLLABLE PHIEUPH YU KIYEOK + {0xBF92, 0xD4EA}, //10684 #HANGUL SYLLABLE PHIEUPH YU SSANGKIYEOK + {0xBF93, 0xD4EB}, //10685 #HANGUL SYLLABLE PHIEUPH YU KIYEOKSIOS + {0xBF94, 0xD4ED}, //10686 #HANGUL SYLLABLE PHIEUPH YU NIEUNCIEUC + {0xBF95, 0xD4EE}, //10687 #HANGUL SYLLABLE PHIEUPH YU NIEUNHIEUH + {0xBF96, 0xD4EF}, //10688 #HANGUL SYLLABLE PHIEUPH YU TIKEUT + {0xBF97, 0xD4F1}, //10689 #HANGUL SYLLABLE PHIEUPH YU RIEULKIYEOK + {0xBF98, 0xD4F2}, //10690 #HANGUL SYLLABLE PHIEUPH YU RIEULMIEUM + {0xBF99, 0xD4F3}, //10691 #HANGUL SYLLABLE PHIEUPH YU RIEULPIEUP + {0xBF9A, 0xD4F4}, //10692 #HANGUL SYLLABLE PHIEUPH YU RIEULSIOS + {0xBF9B, 0xD4F5}, //10693 #HANGUL SYLLABLE PHIEUPH YU RIEULTHIEUTH + {0xBF9C, 0xD4F6}, //10694 #HANGUL SYLLABLE PHIEUPH YU RIEULPHIEUPH + {0xBF9D, 0xD4F7}, //10695 #HANGUL SYLLABLE PHIEUPH YU RIEULHIEUH + {0xBF9E, 0xD4F9}, //10696 #HANGUL SYLLABLE PHIEUPH YU PIEUP + {0xBF9F, 0xD4FA}, //10697 #HANGUL SYLLABLE PHIEUPH YU PIEUPSIOS + {0xBFA0, 0xD4FC}, //10698 #HANGUL SYLLABLE PHIEUPH YU SSANGSIOS + {0xBFA1, 0xC5D0}, //10699 #HANGUL SYLLABLE IEUNG E + {0xBFA2, 0xC5D1}, //10700 #HANGUL SYLLABLE IEUNG E KIYEOK + {0xBFA3, 0xC5D4}, //10701 #HANGUL SYLLABLE IEUNG E NIEUN + {0xBFA4, 0xC5D8}, //10702 #HANGUL SYLLABLE IEUNG E RIEUL + {0xBFA5, 0xC5E0}, //10703 #HANGUL SYLLABLE IEUNG E MIEUM + {0xBFA6, 0xC5E1}, //10704 #HANGUL SYLLABLE IEUNG E PIEUP + {0xBFA7, 0xC5E3}, //10705 #HANGUL SYLLABLE IEUNG E SIOS + {0xBFA8, 0xC5E5}, //10706 #HANGUL SYLLABLE IEUNG E IEUNG + {0xBFA9, 0xC5EC}, //10707 #HANGUL SYLLABLE IEUNG YEO + {0xBFAA, 0xC5ED}, //10708 #HANGUL SYLLABLE IEUNG YEO KIYEOK + {0xBFAB, 0xC5EE}, //10709 #HANGUL SYLLABLE IEUNG YEO SSANGKIYEOK + {0xBFAC, 0xC5F0}, //10710 #HANGUL SYLLABLE IEUNG YEO NIEUN + {0xBFAD, 0xC5F4}, //10711 #HANGUL SYLLABLE IEUNG YEO RIEUL + {0xBFAE, 0xC5F6}, //10712 #HANGUL SYLLABLE IEUNG YEO RIEULMIEUM + {0xBFAF, 0xC5F7}, //10713 #HANGUL SYLLABLE IEUNG YEO RIEULPIEUP + {0xBFB0, 0xC5FC}, //10714 #HANGUL SYLLABLE IEUNG YEO MIEUM + {0xBFB1, 0xC5FD}, //10715 #HANGUL SYLLABLE IEUNG YEO PIEUP + {0xBFB2, 0xC5FE}, //10716 #HANGUL SYLLABLE IEUNG YEO PIEUPSIOS + {0xBFB3, 0xC5FF}, //10717 #HANGUL SYLLABLE IEUNG YEO SIOS + {0xBFB4, 0xC600}, //10718 #HANGUL SYLLABLE IEUNG YEO SSANGSIOS + {0xBFB5, 0xC601}, //10719 #HANGUL SYLLABLE IEUNG YEO IEUNG + {0xBFB6, 0xC605}, //10720 #HANGUL SYLLABLE IEUNG YEO THIEUTH + {0xBFB7, 0xC606}, //10721 #HANGUL SYLLABLE IEUNG YEO PHIEUPH + {0xBFB8, 0xC607}, //10722 #HANGUL SYLLABLE IEUNG YEO HIEUH + {0xBFB9, 0xC608}, //10723 #HANGUL SYLLABLE IEUNG YE + {0xBFBA, 0xC60C}, //10724 #HANGUL SYLLABLE IEUNG YE NIEUN + {0xBFBB, 0xC610}, //10725 #HANGUL SYLLABLE IEUNG YE RIEUL + {0xBFBC, 0xC618}, //10726 #HANGUL SYLLABLE IEUNG YE MIEUM + {0xBFBD, 0xC619}, //10727 #HANGUL SYLLABLE IEUNG YE PIEUP + {0xBFBE, 0xC61B}, //10728 #HANGUL SYLLABLE IEUNG YE SIOS + {0xBFBF, 0xC61C}, //10729 #HANGUL SYLLABLE IEUNG YE SSANGSIOS + {0xBFC0, 0xC624}, //10730 #HANGUL SYLLABLE IEUNG O + {0xBFC1, 0xC625}, //10731 #HANGUL SYLLABLE IEUNG O KIYEOK + {0xBFC2, 0xC628}, //10732 #HANGUL SYLLABLE IEUNG O NIEUN + {0xBFC3, 0xC62C}, //10733 #HANGUL SYLLABLE IEUNG O RIEUL + {0xBFC4, 0xC62D}, //10734 #HANGUL SYLLABLE IEUNG O RIEULKIYEOK + {0xBFC5, 0xC62E}, //10735 #HANGUL SYLLABLE IEUNG O RIEULMIEUM + {0xBFC6, 0xC630}, //10736 #HANGUL SYLLABLE IEUNG O RIEULSIOS + {0xBFC7, 0xC633}, //10737 #HANGUL SYLLABLE IEUNG O RIEULHIEUH + {0xBFC8, 0xC634}, //10738 #HANGUL SYLLABLE IEUNG O MIEUM + {0xBFC9, 0xC635}, //10739 #HANGUL SYLLABLE IEUNG O PIEUP + {0xBFCA, 0xC637}, //10740 #HANGUL SYLLABLE IEUNG O SIOS + {0xBFCB, 0xC639}, //10741 #HANGUL SYLLABLE IEUNG O IEUNG + {0xBFCC, 0xC63B}, //10742 #HANGUL SYLLABLE IEUNG O CHIEUCH + {0xBFCD, 0xC640}, //10743 #HANGUL SYLLABLE IEUNG WA + {0xBFCE, 0xC641}, //10744 #HANGUL SYLLABLE IEUNG WA KIYEOK + {0xBFCF, 0xC644}, //10745 #HANGUL SYLLABLE IEUNG WA NIEUN + {0xBFD0, 0xC648}, //10746 #HANGUL SYLLABLE IEUNG WA RIEUL + {0xBFD1, 0xC650}, //10747 #HANGUL SYLLABLE IEUNG WA MIEUM + {0xBFD2, 0xC651}, //10748 #HANGUL SYLLABLE IEUNG WA PIEUP + {0xBFD3, 0xC653}, //10749 #HANGUL SYLLABLE IEUNG WA SIOS + {0xBFD4, 0xC654}, //10750 #HANGUL SYLLABLE IEUNG WA SSANGSIOS + {0xBFD5, 0xC655}, //10751 #HANGUL SYLLABLE IEUNG WA IEUNG + {0xBFD6, 0xC65C}, //10752 #HANGUL SYLLABLE IEUNG WAE + {0xBFD7, 0xC65D}, //10753 #HANGUL SYLLABLE IEUNG WAE KIYEOK + {0xBFD8, 0xC660}, //10754 #HANGUL SYLLABLE IEUNG WAE NIEUN + {0xBFD9, 0xC66C}, //10755 #HANGUL SYLLABLE IEUNG WAE MIEUM + {0xBFDA, 0xC66F}, //10756 #HANGUL SYLLABLE IEUNG WAE SIOS + {0xBFDB, 0xC671}, //10757 #HANGUL SYLLABLE IEUNG WAE IEUNG + {0xBFDC, 0xC678}, //10758 #HANGUL SYLLABLE IEUNG OE + {0xBFDD, 0xC679}, //10759 #HANGUL SYLLABLE IEUNG OE KIYEOK + {0xBFDE, 0xC67C}, //10760 #HANGUL SYLLABLE IEUNG OE NIEUN + {0xBFDF, 0xC680}, //10761 #HANGUL SYLLABLE IEUNG OE RIEUL + {0xBFE0, 0xC688}, //10762 #HANGUL SYLLABLE IEUNG OE MIEUM + {0xBFE1, 0xC689}, //10763 #HANGUL SYLLABLE IEUNG OE PIEUP + {0xBFE2, 0xC68B}, //10764 #HANGUL SYLLABLE IEUNG OE SIOS + {0xBFE3, 0xC68D}, //10765 #HANGUL SYLLABLE IEUNG OE IEUNG + {0xBFE4, 0xC694}, //10766 #HANGUL SYLLABLE IEUNG YO + {0xBFE5, 0xC695}, //10767 #HANGUL SYLLABLE IEUNG YO KIYEOK + {0xBFE6, 0xC698}, //10768 #HANGUL SYLLABLE IEUNG YO NIEUN + {0xBFE7, 0xC69C}, //10769 #HANGUL SYLLABLE IEUNG YO RIEUL + {0xBFE8, 0xC6A4}, //10770 #HANGUL SYLLABLE IEUNG YO MIEUM + {0xBFE9, 0xC6A5}, //10771 #HANGUL SYLLABLE IEUNG YO PIEUP + {0xBFEA, 0xC6A7}, //10772 #HANGUL SYLLABLE IEUNG YO SIOS + {0xBFEB, 0xC6A9}, //10773 #HANGUL SYLLABLE IEUNG YO IEUNG + {0xBFEC, 0xC6B0}, //10774 #HANGUL SYLLABLE IEUNG U + {0xBFED, 0xC6B1}, //10775 #HANGUL SYLLABLE IEUNG U KIYEOK + {0xBFEE, 0xC6B4}, //10776 #HANGUL SYLLABLE IEUNG U NIEUN + {0xBFEF, 0xC6B8}, //10777 #HANGUL SYLLABLE IEUNG U RIEUL + {0xBFF0, 0xC6B9}, //10778 #HANGUL SYLLABLE IEUNG U RIEULKIYEOK + {0xBFF1, 0xC6BA}, //10779 #HANGUL SYLLABLE IEUNG U RIEULMIEUM + {0xBFF2, 0xC6C0}, //10780 #HANGUL SYLLABLE IEUNG U MIEUM + {0xBFF3, 0xC6C1}, //10781 #HANGUL SYLLABLE IEUNG U PIEUP + {0xBFF4, 0xC6C3}, //10782 #HANGUL SYLLABLE IEUNG U SIOS + {0xBFF5, 0xC6C5}, //10783 #HANGUL SYLLABLE IEUNG U IEUNG + {0xBFF6, 0xC6CC}, //10784 #HANGUL SYLLABLE IEUNG WEO + {0xBFF7, 0xC6CD}, //10785 #HANGUL SYLLABLE IEUNG WEO KIYEOK + {0xBFF8, 0xC6D0}, //10786 #HANGUL SYLLABLE IEUNG WEO NIEUN + {0xBFF9, 0xC6D4}, //10787 #HANGUL SYLLABLE IEUNG WEO RIEUL + {0xBFFA, 0xC6DC}, //10788 #HANGUL SYLLABLE IEUNG WEO MIEUM + {0xBFFB, 0xC6DD}, //10789 #HANGUL SYLLABLE IEUNG WEO PIEUP + {0xBFFC, 0xC6E0}, //10790 #HANGUL SYLLABLE IEUNG WEO SSANGSIOS + {0xBFFD, 0xC6E1}, //10791 #HANGUL SYLLABLE IEUNG WEO IEUNG + {0xBFFE, 0xC6E8}, //10792 #HANGUL SYLLABLE IEUNG WE + {0xC041, 0xD4FE}, //10793 #HANGUL SYLLABLE PHIEUPH YU CIEUC + {0xC042, 0xD4FF}, //10794 #HANGUL SYLLABLE PHIEUPH YU CHIEUCH + {0xC043, 0xD500}, //10795 #HANGUL SYLLABLE PHIEUPH YU KHIEUKH + {0xC044, 0xD501}, //10796 #HANGUL SYLLABLE PHIEUPH YU THIEUTH + {0xC045, 0xD502}, //10797 #HANGUL SYLLABLE PHIEUPH YU PHIEUPH + {0xC046, 0xD503}, //10798 #HANGUL SYLLABLE PHIEUPH YU HIEUH + {0xC047, 0xD505}, //10799 #HANGUL SYLLABLE PHIEUPH EU KIYEOK + {0xC048, 0xD506}, //10800 #HANGUL SYLLABLE PHIEUPH EU SSANGKIYEOK + {0xC049, 0xD507}, //10801 #HANGUL SYLLABLE PHIEUPH EU KIYEOKSIOS + {0xC04A, 0xD509}, //10802 #HANGUL SYLLABLE PHIEUPH EU NIEUNCIEUC + {0xC04B, 0xD50A}, //10803 #HANGUL SYLLABLE PHIEUPH EU NIEUNHIEUH + {0xC04C, 0xD50B}, //10804 #HANGUL SYLLABLE PHIEUPH EU TIKEUT + {0xC04D, 0xD50D}, //10805 #HANGUL SYLLABLE PHIEUPH EU RIEULKIYEOK + {0xC04E, 0xD50E}, //10806 #HANGUL SYLLABLE PHIEUPH EU RIEULMIEUM + {0xC04F, 0xD50F}, //10807 #HANGUL SYLLABLE PHIEUPH EU RIEULPIEUP + {0xC050, 0xD510}, //10808 #HANGUL SYLLABLE PHIEUPH EU RIEULSIOS + {0xC051, 0xD511}, //10809 #HANGUL SYLLABLE PHIEUPH EU RIEULTHIEUTH + {0xC052, 0xD512}, //10810 #HANGUL SYLLABLE PHIEUPH EU RIEULPHIEUPH + {0xC053, 0xD513}, //10811 #HANGUL SYLLABLE PHIEUPH EU RIEULHIEUH + {0xC054, 0xD516}, //10812 #HANGUL SYLLABLE PHIEUPH EU PIEUPSIOS + {0xC055, 0xD518}, //10813 #HANGUL SYLLABLE PHIEUPH EU SSANGSIOS + {0xC056, 0xD519}, //10814 #HANGUL SYLLABLE PHIEUPH EU IEUNG + {0xC057, 0xD51A}, //10815 #HANGUL SYLLABLE PHIEUPH EU CIEUC + {0xC058, 0xD51B}, //10816 #HANGUL SYLLABLE PHIEUPH EU CHIEUCH + {0xC059, 0xD51C}, //10817 #HANGUL SYLLABLE PHIEUPH EU KHIEUKH + {0xC05A, 0xD51D}, //10818 #HANGUL SYLLABLE PHIEUPH EU THIEUTH + {0xC061, 0xD51E}, //10819 #HANGUL SYLLABLE PHIEUPH EU PHIEUPH + {0xC062, 0xD51F}, //10820 #HANGUL SYLLABLE PHIEUPH EU HIEUH + {0xC063, 0xD520}, //10821 #HANGUL SYLLABLE PHIEUPH YI + {0xC064, 0xD521}, //10822 #HANGUL SYLLABLE PHIEUPH YI KIYEOK + {0xC065, 0xD522}, //10823 #HANGUL SYLLABLE PHIEUPH YI SSANGKIYEOK + {0xC066, 0xD523}, //10824 #HANGUL SYLLABLE PHIEUPH YI KIYEOKSIOS + {0xC067, 0xD524}, //10825 #HANGUL SYLLABLE PHIEUPH YI NIEUN + {0xC068, 0xD525}, //10826 #HANGUL SYLLABLE PHIEUPH YI NIEUNCIEUC + {0xC069, 0xD526}, //10827 #HANGUL SYLLABLE PHIEUPH YI NIEUNHIEUH + {0xC06A, 0xD527}, //10828 #HANGUL SYLLABLE PHIEUPH YI TIKEUT + {0xC06B, 0xD528}, //10829 #HANGUL SYLLABLE PHIEUPH YI RIEUL + {0xC06C, 0xD529}, //10830 #HANGUL SYLLABLE PHIEUPH YI RIEULKIYEOK + {0xC06D, 0xD52A}, //10831 #HANGUL SYLLABLE PHIEUPH YI RIEULMIEUM + {0xC06E, 0xD52B}, //10832 #HANGUL SYLLABLE PHIEUPH YI RIEULPIEUP + {0xC06F, 0xD52C}, //10833 #HANGUL SYLLABLE PHIEUPH YI RIEULSIOS + {0xC070, 0xD52D}, //10834 #HANGUL SYLLABLE PHIEUPH YI RIEULTHIEUTH + {0xC071, 0xD52E}, //10835 #HANGUL SYLLABLE PHIEUPH YI RIEULPHIEUPH + {0xC072, 0xD52F}, //10836 #HANGUL SYLLABLE PHIEUPH YI RIEULHIEUH + {0xC073, 0xD530}, //10837 #HANGUL SYLLABLE PHIEUPH YI MIEUM + {0xC074, 0xD531}, //10838 #HANGUL SYLLABLE PHIEUPH YI PIEUP + {0xC075, 0xD532}, //10839 #HANGUL SYLLABLE PHIEUPH YI PIEUPSIOS + {0xC076, 0xD533}, //10840 #HANGUL SYLLABLE PHIEUPH YI SIOS + {0xC077, 0xD534}, //10841 #HANGUL SYLLABLE PHIEUPH YI SSANGSIOS + {0xC078, 0xD535}, //10842 #HANGUL SYLLABLE PHIEUPH YI IEUNG + {0xC079, 0xD536}, //10843 #HANGUL SYLLABLE PHIEUPH YI CIEUC + {0xC07A, 0xD537}, //10844 #HANGUL SYLLABLE PHIEUPH YI CHIEUCH + {0xC081, 0xD538}, //10845 #HANGUL SYLLABLE PHIEUPH YI KHIEUKH + {0xC082, 0xD539}, //10846 #HANGUL SYLLABLE PHIEUPH YI THIEUTH + {0xC083, 0xD53A}, //10847 #HANGUL SYLLABLE PHIEUPH YI PHIEUPH + {0xC084, 0xD53B}, //10848 #HANGUL SYLLABLE PHIEUPH YI HIEUH + {0xC085, 0xD53E}, //10849 #HANGUL SYLLABLE PHIEUPH I SSANGKIYEOK + {0xC086, 0xD53F}, //10850 #HANGUL SYLLABLE PHIEUPH I KIYEOKSIOS + {0xC087, 0xD541}, //10851 #HANGUL SYLLABLE PHIEUPH I NIEUNCIEUC + {0xC088, 0xD542}, //10852 #HANGUL SYLLABLE PHIEUPH I NIEUNHIEUH + {0xC089, 0xD543}, //10853 #HANGUL SYLLABLE PHIEUPH I TIKEUT + {0xC08A, 0xD545}, //10854 #HANGUL SYLLABLE PHIEUPH I RIEULKIYEOK + {0xC08B, 0xD546}, //10855 #HANGUL SYLLABLE PHIEUPH I RIEULMIEUM + {0xC08C, 0xD547}, //10856 #HANGUL SYLLABLE PHIEUPH I RIEULPIEUP + {0xC08D, 0xD548}, //10857 #HANGUL SYLLABLE PHIEUPH I RIEULSIOS + {0xC08E, 0xD549}, //10858 #HANGUL SYLLABLE PHIEUPH I RIEULTHIEUTH + {0xC08F, 0xD54A}, //10859 #HANGUL SYLLABLE PHIEUPH I RIEULPHIEUPH + {0xC090, 0xD54B}, //10860 #HANGUL SYLLABLE PHIEUPH I RIEULHIEUH + {0xC091, 0xD54E}, //10861 #HANGUL SYLLABLE PHIEUPH I PIEUPSIOS + {0xC092, 0xD550}, //10862 #HANGUL SYLLABLE PHIEUPH I SSANGSIOS + {0xC093, 0xD552}, //10863 #HANGUL SYLLABLE PHIEUPH I CIEUC + {0xC094, 0xD553}, //10864 #HANGUL SYLLABLE PHIEUPH I CHIEUCH + {0xC095, 0xD554}, //10865 #HANGUL SYLLABLE PHIEUPH I KHIEUKH + {0xC096, 0xD555}, //10866 #HANGUL SYLLABLE PHIEUPH I THIEUTH + {0xC097, 0xD556}, //10867 #HANGUL SYLLABLE PHIEUPH I PHIEUPH + {0xC098, 0xD557}, //10868 #HANGUL SYLLABLE PHIEUPH I HIEUH + {0xC099, 0xD55A}, //10869 #HANGUL SYLLABLE HIEUH A SSANGKIYEOK + {0xC09A, 0xD55B}, //10870 #HANGUL SYLLABLE HIEUH A KIYEOKSIOS + {0xC09B, 0xD55D}, //10871 #HANGUL SYLLABLE HIEUH A NIEUNCIEUC + {0xC09C, 0xD55E}, //10872 #HANGUL SYLLABLE HIEUH A NIEUNHIEUH + {0xC09D, 0xD55F}, //10873 #HANGUL SYLLABLE HIEUH A TIKEUT + {0xC09E, 0xD561}, //10874 #HANGUL SYLLABLE HIEUH A RIEULKIYEOK + {0xC09F, 0xD562}, //10875 #HANGUL SYLLABLE HIEUH A RIEULMIEUM + {0xC0A0, 0xD563}, //10876 #HANGUL SYLLABLE HIEUH A RIEULPIEUP + {0xC0A1, 0xC6E9}, //10877 #HANGUL SYLLABLE IEUNG WE KIYEOK + {0xC0A2, 0xC6EC}, //10878 #HANGUL SYLLABLE IEUNG WE NIEUN + {0xC0A3, 0xC6F0}, //10879 #HANGUL SYLLABLE IEUNG WE RIEUL + {0xC0A4, 0xC6F8}, //10880 #HANGUL SYLLABLE IEUNG WE MIEUM + {0xC0A5, 0xC6F9}, //10881 #HANGUL SYLLABLE IEUNG WE PIEUP + {0xC0A6, 0xC6FD}, //10882 #HANGUL SYLLABLE IEUNG WE IEUNG + {0xC0A7, 0xC704}, //10883 #HANGUL SYLLABLE IEUNG WI + {0xC0A8, 0xC705}, //10884 #HANGUL SYLLABLE IEUNG WI KIYEOK + {0xC0A9, 0xC708}, //10885 #HANGUL SYLLABLE IEUNG WI NIEUN + {0xC0AA, 0xC70C}, //10886 #HANGUL SYLLABLE IEUNG WI RIEUL + {0xC0AB, 0xC714}, //10887 #HANGUL SYLLABLE IEUNG WI MIEUM + {0xC0AC, 0xC715}, //10888 #HANGUL SYLLABLE IEUNG WI PIEUP + {0xC0AD, 0xC717}, //10889 #HANGUL SYLLABLE IEUNG WI SIOS + {0xC0AE, 0xC719}, //10890 #HANGUL SYLLABLE IEUNG WI IEUNG + {0xC0AF, 0xC720}, //10891 #HANGUL SYLLABLE IEUNG YU + {0xC0B0, 0xC721}, //10892 #HANGUL SYLLABLE IEUNG YU KIYEOK + {0xC0B1, 0xC724}, //10893 #HANGUL SYLLABLE IEUNG YU NIEUN + {0xC0B2, 0xC728}, //10894 #HANGUL SYLLABLE IEUNG YU RIEUL + {0xC0B3, 0xC730}, //10895 #HANGUL SYLLABLE IEUNG YU MIEUM + {0xC0B4, 0xC731}, //10896 #HANGUL SYLLABLE IEUNG YU PIEUP + {0xC0B5, 0xC733}, //10897 #HANGUL SYLLABLE IEUNG YU SIOS + {0xC0B6, 0xC735}, //10898 #HANGUL SYLLABLE IEUNG YU IEUNG + {0xC0B7, 0xC737}, //10899 #HANGUL SYLLABLE IEUNG YU CHIEUCH + {0xC0B8, 0xC73C}, //10900 #HANGUL SYLLABLE IEUNG EU + {0xC0B9, 0xC73D}, //10901 #HANGUL SYLLABLE IEUNG EU KIYEOK + {0xC0BA, 0xC740}, //10902 #HANGUL SYLLABLE IEUNG EU NIEUN + {0xC0BB, 0xC744}, //10903 #HANGUL SYLLABLE IEUNG EU RIEUL + {0xC0BC, 0xC74A}, //10904 #HANGUL SYLLABLE IEUNG EU RIEULPHIEUPH + {0xC0BD, 0xC74C}, //10905 #HANGUL SYLLABLE IEUNG EU MIEUM + {0xC0BE, 0xC74D}, //10906 #HANGUL SYLLABLE IEUNG EU PIEUP + {0xC0BF, 0xC74F}, //10907 #HANGUL SYLLABLE IEUNG EU SIOS + {0xC0C0, 0xC751}, //10908 #HANGUL SYLLABLE IEUNG EU IEUNG + {0xC0C1, 0xC752}, //10909 #HANGUL SYLLABLE IEUNG EU CIEUC + {0xC0C2, 0xC753}, //10910 #HANGUL SYLLABLE IEUNG EU CHIEUCH + {0xC0C3, 0xC754}, //10911 #HANGUL SYLLABLE IEUNG EU KHIEUKH + {0xC0C4, 0xC755}, //10912 #HANGUL SYLLABLE IEUNG EU THIEUTH + {0xC0C5, 0xC756}, //10913 #HANGUL SYLLABLE IEUNG EU PHIEUPH + {0xC0C6, 0xC757}, //10914 #HANGUL SYLLABLE IEUNG EU HIEUH + {0xC0C7, 0xC758}, //10915 #HANGUL SYLLABLE IEUNG YI + {0xC0C8, 0xC75C}, //10916 #HANGUL SYLLABLE IEUNG YI NIEUN + {0xC0C9, 0xC760}, //10917 #HANGUL SYLLABLE IEUNG YI RIEUL + {0xC0CA, 0xC768}, //10918 #HANGUL SYLLABLE IEUNG YI MIEUM + {0xC0CB, 0xC76B}, //10919 #HANGUL SYLLABLE IEUNG YI SIOS + {0xC0CC, 0xC774}, //10920 #HANGUL SYLLABLE IEUNG I + {0xC0CD, 0xC775}, //10921 #HANGUL SYLLABLE IEUNG I KIYEOK + {0xC0CE, 0xC778}, //10922 #HANGUL SYLLABLE IEUNG I NIEUN + {0xC0CF, 0xC77C}, //10923 #HANGUL SYLLABLE IEUNG I RIEUL + {0xC0D0, 0xC77D}, //10924 #HANGUL SYLLABLE IEUNG I RIEULKIYEOK + {0xC0D1, 0xC77E}, //10925 #HANGUL SYLLABLE IEUNG I RIEULMIEUM + {0xC0D2, 0xC783}, //10926 #HANGUL SYLLABLE IEUNG I RIEULHIEUH + {0xC0D3, 0xC784}, //10927 #HANGUL SYLLABLE IEUNG I MIEUM + {0xC0D4, 0xC785}, //10928 #HANGUL SYLLABLE IEUNG I PIEUP + {0xC0D5, 0xC787}, //10929 #HANGUL SYLLABLE IEUNG I SIOS + {0xC0D6, 0xC788}, //10930 #HANGUL SYLLABLE IEUNG I SSANGSIOS + {0xC0D7, 0xC789}, //10931 #HANGUL SYLLABLE IEUNG I IEUNG + {0xC0D8, 0xC78A}, //10932 #HANGUL SYLLABLE IEUNG I CIEUC + {0xC0D9, 0xC78E}, //10933 #HANGUL SYLLABLE IEUNG I PHIEUPH + {0xC0DA, 0xC790}, //10934 #HANGUL SYLLABLE CIEUC A + {0xC0DB, 0xC791}, //10935 #HANGUL SYLLABLE CIEUC A KIYEOK + {0xC0DC, 0xC794}, //10936 #HANGUL SYLLABLE CIEUC A NIEUN + {0xC0DD, 0xC796}, //10937 #HANGUL SYLLABLE CIEUC A NIEUNHIEUH + {0xC0DE, 0xC797}, //10938 #HANGUL SYLLABLE CIEUC A TIKEUT + {0xC0DF, 0xC798}, //10939 #HANGUL SYLLABLE CIEUC A RIEUL + {0xC0E0, 0xC79A}, //10940 #HANGUL SYLLABLE CIEUC A RIEULMIEUM + {0xC0E1, 0xC7A0}, //10941 #HANGUL SYLLABLE CIEUC A MIEUM + {0xC0E2, 0xC7A1}, //10942 #HANGUL SYLLABLE CIEUC A PIEUP + {0xC0E3, 0xC7A3}, //10943 #HANGUL SYLLABLE CIEUC A SIOS + {0xC0E4, 0xC7A4}, //10944 #HANGUL SYLLABLE CIEUC A SSANGSIOS + {0xC0E5, 0xC7A5}, //10945 #HANGUL SYLLABLE CIEUC A IEUNG + {0xC0E6, 0xC7A6}, //10946 #HANGUL SYLLABLE CIEUC A CIEUC + {0xC0E7, 0xC7AC}, //10947 #HANGUL SYLLABLE CIEUC AE + {0xC0E8, 0xC7AD}, //10948 #HANGUL SYLLABLE CIEUC AE KIYEOK + {0xC0E9, 0xC7B0}, //10949 #HANGUL SYLLABLE CIEUC AE NIEUN + {0xC0EA, 0xC7B4}, //10950 #HANGUL SYLLABLE CIEUC AE RIEUL + {0xC0EB, 0xC7BC}, //10951 #HANGUL SYLLABLE CIEUC AE MIEUM + {0xC0EC, 0xC7BD}, //10952 #HANGUL SYLLABLE CIEUC AE PIEUP + {0xC0ED, 0xC7BF}, //10953 #HANGUL SYLLABLE CIEUC AE SIOS + {0xC0EE, 0xC7C0}, //10954 #HANGUL SYLLABLE CIEUC AE SSANGSIOS + {0xC0EF, 0xC7C1}, //10955 #HANGUL SYLLABLE CIEUC AE IEUNG + {0xC0F0, 0xC7C8}, //10956 #HANGUL SYLLABLE CIEUC YA + {0xC0F1, 0xC7C9}, //10957 #HANGUL SYLLABLE CIEUC YA KIYEOK + {0xC0F2, 0xC7CC}, //10958 #HANGUL SYLLABLE CIEUC YA NIEUN + {0xC0F3, 0xC7CE}, //10959 #HANGUL SYLLABLE CIEUC YA NIEUNHIEUH + {0xC0F4, 0xC7D0}, //10960 #HANGUL SYLLABLE CIEUC YA RIEUL + {0xC0F5, 0xC7D8}, //10961 #HANGUL SYLLABLE CIEUC YA MIEUM + {0xC0F6, 0xC7DD}, //10962 #HANGUL SYLLABLE CIEUC YA IEUNG + {0xC0F7, 0xC7E4}, //10963 #HANGUL SYLLABLE CIEUC YAE + {0xC0F8, 0xC7E8}, //10964 #HANGUL SYLLABLE CIEUC YAE NIEUN + {0xC0F9, 0xC7EC}, //10965 #HANGUL SYLLABLE CIEUC YAE RIEUL + {0xC0FA, 0xC800}, //10966 #HANGUL SYLLABLE CIEUC EO + {0xC0FB, 0xC801}, //10967 #HANGUL SYLLABLE CIEUC EO KIYEOK + {0xC0FC, 0xC804}, //10968 #HANGUL SYLLABLE CIEUC EO NIEUN + {0xC0FD, 0xC808}, //10969 #HANGUL SYLLABLE CIEUC EO RIEUL + {0xC0FE, 0xC80A}, //10970 #HANGUL SYLLABLE CIEUC EO RIEULMIEUM + {0xC141, 0xD564}, //10971 #HANGUL SYLLABLE HIEUH A RIEULSIOS + {0xC142, 0xD566}, //10972 #HANGUL SYLLABLE HIEUH A RIEULPHIEUPH + {0xC143, 0xD567}, //10973 #HANGUL SYLLABLE HIEUH A RIEULHIEUH + {0xC144, 0xD56A}, //10974 #HANGUL SYLLABLE HIEUH A PIEUPSIOS + {0xC145, 0xD56C}, //10975 #HANGUL SYLLABLE HIEUH A SSANGSIOS + {0xC146, 0xD56E}, //10976 #HANGUL SYLLABLE HIEUH A CIEUC + {0xC147, 0xD56F}, //10977 #HANGUL SYLLABLE HIEUH A CHIEUCH + {0xC148, 0xD570}, //10978 #HANGUL SYLLABLE HIEUH A KHIEUKH + {0xC149, 0xD571}, //10979 #HANGUL SYLLABLE HIEUH A THIEUTH + {0xC14A, 0xD572}, //10980 #HANGUL SYLLABLE HIEUH A PHIEUPH + {0xC14B, 0xD573}, //10981 #HANGUL SYLLABLE HIEUH A HIEUH + {0xC14C, 0xD576}, //10982 #HANGUL SYLLABLE HIEUH AE SSANGKIYEOK + {0xC14D, 0xD577}, //10983 #HANGUL SYLLABLE HIEUH AE KIYEOKSIOS + {0xC14E, 0xD579}, //10984 #HANGUL SYLLABLE HIEUH AE NIEUNCIEUC + {0xC14F, 0xD57A}, //10985 #HANGUL SYLLABLE HIEUH AE NIEUNHIEUH + {0xC150, 0xD57B}, //10986 #HANGUL SYLLABLE HIEUH AE TIKEUT + {0xC151, 0xD57D}, //10987 #HANGUL SYLLABLE HIEUH AE RIEULKIYEOK + {0xC152, 0xD57E}, //10988 #HANGUL SYLLABLE HIEUH AE RIEULMIEUM + {0xC153, 0xD57F}, //10989 #HANGUL SYLLABLE HIEUH AE RIEULPIEUP + {0xC154, 0xD580}, //10990 #HANGUL SYLLABLE HIEUH AE RIEULSIOS + {0xC155, 0xD581}, //10991 #HANGUL SYLLABLE HIEUH AE RIEULTHIEUTH + {0xC156, 0xD582}, //10992 #HANGUL SYLLABLE HIEUH AE RIEULPHIEUPH + {0xC157, 0xD583}, //10993 #HANGUL SYLLABLE HIEUH AE RIEULHIEUH + {0xC158, 0xD586}, //10994 #HANGUL SYLLABLE HIEUH AE PIEUPSIOS + {0xC159, 0xD58A}, //10995 #HANGUL SYLLABLE HIEUH AE CIEUC + {0xC15A, 0xD58B}, //10996 #HANGUL SYLLABLE HIEUH AE CHIEUCH + {0xC161, 0xD58C}, //10997 #HANGUL SYLLABLE HIEUH AE KHIEUKH + {0xC162, 0xD58D}, //10998 #HANGUL SYLLABLE HIEUH AE THIEUTH + {0xC163, 0xD58E}, //10999 #HANGUL SYLLABLE HIEUH AE PHIEUPH + {0xC164, 0xD58F}, //11000 #HANGUL SYLLABLE HIEUH AE HIEUH + {0xC165, 0xD591}, //11001 #HANGUL SYLLABLE HIEUH YA KIYEOK + {0xC166, 0xD592}, //11002 #HANGUL SYLLABLE HIEUH YA SSANGKIYEOK + {0xC167, 0xD593}, //11003 #HANGUL SYLLABLE HIEUH YA KIYEOKSIOS + {0xC168, 0xD594}, //11004 #HANGUL SYLLABLE HIEUH YA NIEUN + {0xC169, 0xD595}, //11005 #HANGUL SYLLABLE HIEUH YA NIEUNCIEUC + {0xC16A, 0xD596}, //11006 #HANGUL SYLLABLE HIEUH YA NIEUNHIEUH + {0xC16B, 0xD597}, //11007 #HANGUL SYLLABLE HIEUH YA TIKEUT + {0xC16C, 0xD598}, //11008 #HANGUL SYLLABLE HIEUH YA RIEUL + {0xC16D, 0xD599}, //11009 #HANGUL SYLLABLE HIEUH YA RIEULKIYEOK + {0xC16E, 0xD59A}, //11010 #HANGUL SYLLABLE HIEUH YA RIEULMIEUM + {0xC16F, 0xD59B}, //11011 #HANGUL SYLLABLE HIEUH YA RIEULPIEUP + {0xC170, 0xD59C}, //11012 #HANGUL SYLLABLE HIEUH YA RIEULSIOS + {0xC171, 0xD59D}, //11013 #HANGUL SYLLABLE HIEUH YA RIEULTHIEUTH + {0xC172, 0xD59E}, //11014 #HANGUL SYLLABLE HIEUH YA RIEULPHIEUPH + {0xC173, 0xD59F}, //11015 #HANGUL SYLLABLE HIEUH YA RIEULHIEUH + {0xC174, 0xD5A0}, //11016 #HANGUL SYLLABLE HIEUH YA MIEUM + {0xC175, 0xD5A1}, //11017 #HANGUL SYLLABLE HIEUH YA PIEUP + {0xC176, 0xD5A2}, //11018 #HANGUL SYLLABLE HIEUH YA PIEUPSIOS + {0xC177, 0xD5A3}, //11019 #HANGUL SYLLABLE HIEUH YA SIOS + {0xC178, 0xD5A4}, //11020 #HANGUL SYLLABLE HIEUH YA SSANGSIOS + {0xC179, 0xD5A6}, //11021 #HANGUL SYLLABLE HIEUH YA CIEUC + {0xC17A, 0xD5A7}, //11022 #HANGUL SYLLABLE HIEUH YA CHIEUCH + {0xC181, 0xD5A8}, //11023 #HANGUL SYLLABLE HIEUH YA KHIEUKH + {0xC182, 0xD5A9}, //11024 #HANGUL SYLLABLE HIEUH YA THIEUTH + {0xC183, 0xD5AA}, //11025 #HANGUL SYLLABLE HIEUH YA PHIEUPH + {0xC184, 0xD5AB}, //11026 #HANGUL SYLLABLE HIEUH YA HIEUH + {0xC185, 0xD5AC}, //11027 #HANGUL SYLLABLE HIEUH YAE + {0xC186, 0xD5AD}, //11028 #HANGUL SYLLABLE HIEUH YAE KIYEOK + {0xC187, 0xD5AE}, //11029 #HANGUL SYLLABLE HIEUH YAE SSANGKIYEOK + {0xC188, 0xD5AF}, //11030 #HANGUL SYLLABLE HIEUH YAE KIYEOKSIOS + {0xC189, 0xD5B0}, //11031 #HANGUL SYLLABLE HIEUH YAE NIEUN + {0xC18A, 0xD5B1}, //11032 #HANGUL SYLLABLE HIEUH YAE NIEUNCIEUC + {0xC18B, 0xD5B2}, //11033 #HANGUL SYLLABLE HIEUH YAE NIEUNHIEUH + {0xC18C, 0xD5B3}, //11034 #HANGUL SYLLABLE HIEUH YAE TIKEUT + {0xC18D, 0xD5B4}, //11035 #HANGUL SYLLABLE HIEUH YAE RIEUL + {0xC18E, 0xD5B5}, //11036 #HANGUL SYLLABLE HIEUH YAE RIEULKIYEOK + {0xC18F, 0xD5B6}, //11037 #HANGUL SYLLABLE HIEUH YAE RIEULMIEUM + {0xC190, 0xD5B7}, //11038 #HANGUL SYLLABLE HIEUH YAE RIEULPIEUP + {0xC191, 0xD5B8}, //11039 #HANGUL SYLLABLE HIEUH YAE RIEULSIOS + {0xC192, 0xD5B9}, //11040 #HANGUL SYLLABLE HIEUH YAE RIEULTHIEUTH + {0xC193, 0xD5BA}, //11041 #HANGUL SYLLABLE HIEUH YAE RIEULPHIEUPH + {0xC194, 0xD5BB}, //11042 #HANGUL SYLLABLE HIEUH YAE RIEULHIEUH + {0xC195, 0xD5BC}, //11043 #HANGUL SYLLABLE HIEUH YAE MIEUM + {0xC196, 0xD5BD}, //11044 #HANGUL SYLLABLE HIEUH YAE PIEUP + {0xC197, 0xD5BE}, //11045 #HANGUL SYLLABLE HIEUH YAE PIEUPSIOS + {0xC198, 0xD5BF}, //11046 #HANGUL SYLLABLE HIEUH YAE SIOS + {0xC199, 0xD5C0}, //11047 #HANGUL SYLLABLE HIEUH YAE SSANGSIOS + {0xC19A, 0xD5C1}, //11048 #HANGUL SYLLABLE HIEUH YAE IEUNG + {0xC19B, 0xD5C2}, //11049 #HANGUL SYLLABLE HIEUH YAE CIEUC + {0xC19C, 0xD5C3}, //11050 #HANGUL SYLLABLE HIEUH YAE CHIEUCH + {0xC19D, 0xD5C4}, //11051 #HANGUL SYLLABLE HIEUH YAE KHIEUKH + {0xC19E, 0xD5C5}, //11052 #HANGUL SYLLABLE HIEUH YAE THIEUTH + {0xC19F, 0xD5C6}, //11053 #HANGUL SYLLABLE HIEUH YAE PHIEUPH + {0xC1A0, 0xD5C7}, //11054 #HANGUL SYLLABLE HIEUH YAE HIEUH + {0xC1A1, 0xC810}, //11055 #HANGUL SYLLABLE CIEUC EO MIEUM + {0xC1A2, 0xC811}, //11056 #HANGUL SYLLABLE CIEUC EO PIEUP + {0xC1A3, 0xC813}, //11057 #HANGUL SYLLABLE CIEUC EO SIOS + {0xC1A4, 0xC815}, //11058 #HANGUL SYLLABLE CIEUC EO IEUNG + {0xC1A5, 0xC816}, //11059 #HANGUL SYLLABLE CIEUC EO CIEUC + {0xC1A6, 0xC81C}, //11060 #HANGUL SYLLABLE CIEUC E + {0xC1A7, 0xC81D}, //11061 #HANGUL SYLLABLE CIEUC E KIYEOK + {0xC1A8, 0xC820}, //11062 #HANGUL SYLLABLE CIEUC E NIEUN + {0xC1A9, 0xC824}, //11063 #HANGUL SYLLABLE CIEUC E RIEUL + {0xC1AA, 0xC82C}, //11064 #HANGUL SYLLABLE CIEUC E MIEUM + {0xC1AB, 0xC82D}, //11065 #HANGUL SYLLABLE CIEUC E PIEUP + {0xC1AC, 0xC82F}, //11066 #HANGUL SYLLABLE CIEUC E SIOS + {0xC1AD, 0xC831}, //11067 #HANGUL SYLLABLE CIEUC E IEUNG + {0xC1AE, 0xC838}, //11068 #HANGUL SYLLABLE CIEUC YEO + {0xC1AF, 0xC83C}, //11069 #HANGUL SYLLABLE CIEUC YEO NIEUN + {0xC1B0, 0xC840}, //11070 #HANGUL SYLLABLE CIEUC YEO RIEUL + {0xC1B1, 0xC848}, //11071 #HANGUL SYLLABLE CIEUC YEO MIEUM + {0xC1B2, 0xC849}, //11072 #HANGUL SYLLABLE CIEUC YEO PIEUP + {0xC1B3, 0xC84C}, //11073 #HANGUL SYLLABLE CIEUC YEO SSANGSIOS + {0xC1B4, 0xC84D}, //11074 #HANGUL SYLLABLE CIEUC YEO IEUNG + {0xC1B5, 0xC854}, //11075 #HANGUL SYLLABLE CIEUC YE + {0xC1B6, 0xC870}, //11076 #HANGUL SYLLABLE CIEUC O + {0xC1B7, 0xC871}, //11077 #HANGUL SYLLABLE CIEUC O KIYEOK + {0xC1B8, 0xC874}, //11078 #HANGUL SYLLABLE CIEUC O NIEUN + {0xC1B9, 0xC878}, //11079 #HANGUL SYLLABLE CIEUC O RIEUL + {0xC1BA, 0xC87A}, //11080 #HANGUL SYLLABLE CIEUC O RIEULMIEUM + {0xC1BB, 0xC880}, //11081 #HANGUL SYLLABLE CIEUC O MIEUM + {0xC1BC, 0xC881}, //11082 #HANGUL SYLLABLE CIEUC O PIEUP + {0xC1BD, 0xC883}, //11083 #HANGUL SYLLABLE CIEUC O SIOS + {0xC1BE, 0xC885}, //11084 #HANGUL SYLLABLE CIEUC O IEUNG + {0xC1BF, 0xC886}, //11085 #HANGUL SYLLABLE CIEUC O CIEUC + {0xC1C0, 0xC887}, //11086 #HANGUL SYLLABLE CIEUC O CHIEUCH + {0xC1C1, 0xC88B}, //11087 #HANGUL SYLLABLE CIEUC O HIEUH + {0xC1C2, 0xC88C}, //11088 #HANGUL SYLLABLE CIEUC WA + {0xC1C3, 0xC88D}, //11089 #HANGUL SYLLABLE CIEUC WA KIYEOK + {0xC1C4, 0xC894}, //11090 #HANGUL SYLLABLE CIEUC WA RIEUL + {0xC1C5, 0xC89D}, //11091 #HANGUL SYLLABLE CIEUC WA PIEUP + {0xC1C6, 0xC89F}, //11092 #HANGUL SYLLABLE CIEUC WA SIOS + {0xC1C7, 0xC8A1}, //11093 #HANGUL SYLLABLE CIEUC WA IEUNG + {0xC1C8, 0xC8A8}, //11094 #HANGUL SYLLABLE CIEUC WAE + {0xC1C9, 0xC8BC}, //11095 #HANGUL SYLLABLE CIEUC WAE SSANGSIOS + {0xC1CA, 0xC8BD}, //11096 #HANGUL SYLLABLE CIEUC WAE IEUNG + {0xC1CB, 0xC8C4}, //11097 #HANGUL SYLLABLE CIEUC OE + {0xC1CC, 0xC8C8}, //11098 #HANGUL SYLLABLE CIEUC OE NIEUN + {0xC1CD, 0xC8CC}, //11099 #HANGUL SYLLABLE CIEUC OE RIEUL + {0xC1CE, 0xC8D4}, //11100 #HANGUL SYLLABLE CIEUC OE MIEUM + {0xC1CF, 0xC8D5}, //11101 #HANGUL SYLLABLE CIEUC OE PIEUP + {0xC1D0, 0xC8D7}, //11102 #HANGUL SYLLABLE CIEUC OE SIOS + {0xC1D1, 0xC8D9}, //11103 #HANGUL SYLLABLE CIEUC OE IEUNG + {0xC1D2, 0xC8E0}, //11104 #HANGUL SYLLABLE CIEUC YO + {0xC1D3, 0xC8E1}, //11105 #HANGUL SYLLABLE CIEUC YO KIYEOK + {0xC1D4, 0xC8E4}, //11106 #HANGUL SYLLABLE CIEUC YO NIEUN + {0xC1D5, 0xC8F5}, //11107 #HANGUL SYLLABLE CIEUC YO IEUNG + {0xC1D6, 0xC8FC}, //11108 #HANGUL SYLLABLE CIEUC U + {0xC1D7, 0xC8FD}, //11109 #HANGUL SYLLABLE CIEUC U KIYEOK + {0xC1D8, 0xC900}, //11110 #HANGUL SYLLABLE CIEUC U NIEUN + {0xC1D9, 0xC904}, //11111 #HANGUL SYLLABLE CIEUC U RIEUL + {0xC1DA, 0xC905}, //11112 #HANGUL SYLLABLE CIEUC U RIEULKIYEOK + {0xC1DB, 0xC906}, //11113 #HANGUL SYLLABLE CIEUC U RIEULMIEUM + {0xC1DC, 0xC90C}, //11114 #HANGUL SYLLABLE CIEUC U MIEUM + {0xC1DD, 0xC90D}, //11115 #HANGUL SYLLABLE CIEUC U PIEUP + {0xC1DE, 0xC90F}, //11116 #HANGUL SYLLABLE CIEUC U SIOS + {0xC1DF, 0xC911}, //11117 #HANGUL SYLLABLE CIEUC U IEUNG + {0xC1E0, 0xC918}, //11118 #HANGUL SYLLABLE CIEUC WEO + {0xC1E1, 0xC92C}, //11119 #HANGUL SYLLABLE CIEUC WEO SSANGSIOS + {0xC1E2, 0xC934}, //11120 #HANGUL SYLLABLE CIEUC WE + {0xC1E3, 0xC950}, //11121 #HANGUL SYLLABLE CIEUC WI + {0xC1E4, 0xC951}, //11122 #HANGUL SYLLABLE CIEUC WI KIYEOK + {0xC1E5, 0xC954}, //11123 #HANGUL SYLLABLE CIEUC WI NIEUN + {0xC1E6, 0xC958}, //11124 #HANGUL SYLLABLE CIEUC WI RIEUL + {0xC1E7, 0xC960}, //11125 #HANGUL SYLLABLE CIEUC WI MIEUM + {0xC1E8, 0xC961}, //11126 #HANGUL SYLLABLE CIEUC WI PIEUP + {0xC1E9, 0xC963}, //11127 #HANGUL SYLLABLE CIEUC WI SIOS + {0xC1EA, 0xC96C}, //11128 #HANGUL SYLLABLE CIEUC YU + {0xC1EB, 0xC970}, //11129 #HANGUL SYLLABLE CIEUC YU NIEUN + {0xC1EC, 0xC974}, //11130 #HANGUL SYLLABLE CIEUC YU RIEUL + {0xC1ED, 0xC97C}, //11131 #HANGUL SYLLABLE CIEUC YU MIEUM + {0xC1EE, 0xC988}, //11132 #HANGUL SYLLABLE CIEUC EU + {0xC1EF, 0xC989}, //11133 #HANGUL SYLLABLE CIEUC EU KIYEOK + {0xC1F0, 0xC98C}, //11134 #HANGUL SYLLABLE CIEUC EU NIEUN + {0xC1F1, 0xC990}, //11135 #HANGUL SYLLABLE CIEUC EU RIEUL + {0xC1F2, 0xC998}, //11136 #HANGUL SYLLABLE CIEUC EU MIEUM + {0xC1F3, 0xC999}, //11137 #HANGUL SYLLABLE CIEUC EU PIEUP + {0xC1F4, 0xC99B}, //11138 #HANGUL SYLLABLE CIEUC EU SIOS + {0xC1F5, 0xC99D}, //11139 #HANGUL SYLLABLE CIEUC EU IEUNG + {0xC1F6, 0xC9C0}, //11140 #HANGUL SYLLABLE CIEUC I + {0xC1F7, 0xC9C1}, //11141 #HANGUL SYLLABLE CIEUC I KIYEOK + {0xC1F8, 0xC9C4}, //11142 #HANGUL SYLLABLE CIEUC I NIEUN + {0xC1F9, 0xC9C7}, //11143 #HANGUL SYLLABLE CIEUC I TIKEUT + {0xC1FA, 0xC9C8}, //11144 #HANGUL SYLLABLE CIEUC I RIEUL + {0xC1FB, 0xC9CA}, //11145 #HANGUL SYLLABLE CIEUC I RIEULMIEUM + {0xC1FC, 0xC9D0}, //11146 #HANGUL SYLLABLE CIEUC I MIEUM + {0xC1FD, 0xC9D1}, //11147 #HANGUL SYLLABLE CIEUC I PIEUP + {0xC1FE, 0xC9D3}, //11148 #HANGUL SYLLABLE CIEUC I SIOS + {0xC241, 0xD5CA}, //11149 #HANGUL SYLLABLE HIEUH EO SSANGKIYEOK + {0xC242, 0xD5CB}, //11150 #HANGUL SYLLABLE HIEUH EO KIYEOKSIOS + {0xC243, 0xD5CD}, //11151 #HANGUL SYLLABLE HIEUH EO NIEUNCIEUC + {0xC244, 0xD5CE}, //11152 #HANGUL SYLLABLE HIEUH EO NIEUNHIEUH + {0xC245, 0xD5CF}, //11153 #HANGUL SYLLABLE HIEUH EO TIKEUT + {0xC246, 0xD5D1}, //11154 #HANGUL SYLLABLE HIEUH EO RIEULKIYEOK + {0xC247, 0xD5D3}, //11155 #HANGUL SYLLABLE HIEUH EO RIEULPIEUP + {0xC248, 0xD5D4}, //11156 #HANGUL SYLLABLE HIEUH EO RIEULSIOS + {0xC249, 0xD5D5}, //11157 #HANGUL SYLLABLE HIEUH EO RIEULTHIEUTH + {0xC24A, 0xD5D6}, //11158 #HANGUL SYLLABLE HIEUH EO RIEULPHIEUPH + {0xC24B, 0xD5D7}, //11159 #HANGUL SYLLABLE HIEUH EO RIEULHIEUH + {0xC24C, 0xD5DA}, //11160 #HANGUL SYLLABLE HIEUH EO PIEUPSIOS + {0xC24D, 0xD5DC}, //11161 #HANGUL SYLLABLE HIEUH EO SSANGSIOS + {0xC24E, 0xD5DE}, //11162 #HANGUL SYLLABLE HIEUH EO CIEUC + {0xC24F, 0xD5DF}, //11163 #HANGUL SYLLABLE HIEUH EO CHIEUCH + {0xC250, 0xD5E0}, //11164 #HANGUL SYLLABLE HIEUH EO KHIEUKH + {0xC251, 0xD5E1}, //11165 #HANGUL SYLLABLE HIEUH EO THIEUTH + {0xC252, 0xD5E2}, //11166 #HANGUL SYLLABLE HIEUH EO PHIEUPH + {0xC253, 0xD5E3}, //11167 #HANGUL SYLLABLE HIEUH EO HIEUH + {0xC254, 0xD5E6}, //11168 #HANGUL SYLLABLE HIEUH E SSANGKIYEOK + {0xC255, 0xD5E7}, //11169 #HANGUL SYLLABLE HIEUH E KIYEOKSIOS + {0xC256, 0xD5E9}, //11170 #HANGUL SYLLABLE HIEUH E NIEUNCIEUC + {0xC257, 0xD5EA}, //11171 #HANGUL SYLLABLE HIEUH E NIEUNHIEUH + {0xC258, 0xD5EB}, //11172 #HANGUL SYLLABLE HIEUH E TIKEUT + {0xC259, 0xD5ED}, //11173 #HANGUL SYLLABLE HIEUH E RIEULKIYEOK + {0xC25A, 0xD5EE}, //11174 #HANGUL SYLLABLE HIEUH E RIEULMIEUM + {0xC261, 0xD5EF}, //11175 #HANGUL SYLLABLE HIEUH E RIEULPIEUP + {0xC262, 0xD5F0}, //11176 #HANGUL SYLLABLE HIEUH E RIEULSIOS + {0xC263, 0xD5F1}, //11177 #HANGUL SYLLABLE HIEUH E RIEULTHIEUTH + {0xC264, 0xD5F2}, //11178 #HANGUL SYLLABLE HIEUH E RIEULPHIEUPH + {0xC265, 0xD5F3}, //11179 #HANGUL SYLLABLE HIEUH E RIEULHIEUH + {0xC266, 0xD5F6}, //11180 #HANGUL SYLLABLE HIEUH E PIEUPSIOS + {0xC267, 0xD5F8}, //11181 #HANGUL SYLLABLE HIEUH E SSANGSIOS + {0xC268, 0xD5FA}, //11182 #HANGUL SYLLABLE HIEUH E CIEUC + {0xC269, 0xD5FB}, //11183 #HANGUL SYLLABLE HIEUH E CHIEUCH + {0xC26A, 0xD5FC}, //11184 #HANGUL SYLLABLE HIEUH E KHIEUKH + {0xC26B, 0xD5FD}, //11185 #HANGUL SYLLABLE HIEUH E THIEUTH + {0xC26C, 0xD5FE}, //11186 #HANGUL SYLLABLE HIEUH E PHIEUPH + {0xC26D, 0xD5FF}, //11187 #HANGUL SYLLABLE HIEUH E HIEUH + {0xC26E, 0xD602}, //11188 #HANGUL SYLLABLE HIEUH YEO SSANGKIYEOK + {0xC26F, 0xD603}, //11189 #HANGUL SYLLABLE HIEUH YEO KIYEOKSIOS + {0xC270, 0xD605}, //11190 #HANGUL SYLLABLE HIEUH YEO NIEUNCIEUC + {0xC271, 0xD606}, //11191 #HANGUL SYLLABLE HIEUH YEO NIEUNHIEUH + {0xC272, 0xD607}, //11192 #HANGUL SYLLABLE HIEUH YEO TIKEUT + {0xC273, 0xD609}, //11193 #HANGUL SYLLABLE HIEUH YEO RIEULKIYEOK + {0xC274, 0xD60A}, //11194 #HANGUL SYLLABLE HIEUH YEO RIEULMIEUM + {0xC275, 0xD60B}, //11195 #HANGUL SYLLABLE HIEUH YEO RIEULPIEUP + {0xC276, 0xD60C}, //11196 #HANGUL SYLLABLE HIEUH YEO RIEULSIOS + {0xC277, 0xD60D}, //11197 #HANGUL SYLLABLE HIEUH YEO RIEULTHIEUTH + {0xC278, 0xD60E}, //11198 #HANGUL SYLLABLE HIEUH YEO RIEULPHIEUPH + {0xC279, 0xD60F}, //11199 #HANGUL SYLLABLE HIEUH YEO RIEULHIEUH + {0xC27A, 0xD612}, //11200 #HANGUL SYLLABLE HIEUH YEO PIEUPSIOS + {0xC281, 0xD616}, //11201 #HANGUL SYLLABLE HIEUH YEO CIEUC + {0xC282, 0xD617}, //11202 #HANGUL SYLLABLE HIEUH YEO CHIEUCH + {0xC283, 0xD618}, //11203 #HANGUL SYLLABLE HIEUH YEO KHIEUKH + {0xC284, 0xD619}, //11204 #HANGUL SYLLABLE HIEUH YEO THIEUTH + {0xC285, 0xD61A}, //11205 #HANGUL SYLLABLE HIEUH YEO PHIEUPH + {0xC286, 0xD61B}, //11206 #HANGUL SYLLABLE HIEUH YEO HIEUH + {0xC287, 0xD61D}, //11207 #HANGUL SYLLABLE HIEUH YE KIYEOK + {0xC288, 0xD61E}, //11208 #HANGUL SYLLABLE HIEUH YE SSANGKIYEOK + {0xC289, 0xD61F}, //11209 #HANGUL SYLLABLE HIEUH YE KIYEOKSIOS + {0xC28A, 0xD621}, //11210 #HANGUL SYLLABLE HIEUH YE NIEUNCIEUC + {0xC28B, 0xD622}, //11211 #HANGUL SYLLABLE HIEUH YE NIEUNHIEUH + {0xC28C, 0xD623}, //11212 #HANGUL SYLLABLE HIEUH YE TIKEUT + {0xC28D, 0xD625}, //11213 #HANGUL SYLLABLE HIEUH YE RIEULKIYEOK + {0xC28E, 0xD626}, //11214 #HANGUL SYLLABLE HIEUH YE RIEULMIEUM + {0xC28F, 0xD627}, //11215 #HANGUL SYLLABLE HIEUH YE RIEULPIEUP + {0xC290, 0xD628}, //11216 #HANGUL SYLLABLE HIEUH YE RIEULSIOS + {0xC291, 0xD629}, //11217 #HANGUL SYLLABLE HIEUH YE RIEULTHIEUTH + {0xC292, 0xD62A}, //11218 #HANGUL SYLLABLE HIEUH YE RIEULPHIEUPH + {0xC293, 0xD62B}, //11219 #HANGUL SYLLABLE HIEUH YE RIEULHIEUH + {0xC294, 0xD62C}, //11220 #HANGUL SYLLABLE HIEUH YE MIEUM + {0xC295, 0xD62E}, //11221 #HANGUL SYLLABLE HIEUH YE PIEUPSIOS + {0xC296, 0xD62F}, //11222 #HANGUL SYLLABLE HIEUH YE SIOS + {0xC297, 0xD630}, //11223 #HANGUL SYLLABLE HIEUH YE SSANGSIOS + {0xC298, 0xD631}, //11224 #HANGUL SYLLABLE HIEUH YE IEUNG + {0xC299, 0xD632}, //11225 #HANGUL SYLLABLE HIEUH YE CIEUC + {0xC29A, 0xD633}, //11226 #HANGUL SYLLABLE HIEUH YE CHIEUCH + {0xC29B, 0xD634}, //11227 #HANGUL SYLLABLE HIEUH YE KHIEUKH + {0xC29C, 0xD635}, //11228 #HANGUL SYLLABLE HIEUH YE THIEUTH + {0xC29D, 0xD636}, //11229 #HANGUL SYLLABLE HIEUH YE PHIEUPH + {0xC29E, 0xD637}, //11230 #HANGUL SYLLABLE HIEUH YE HIEUH + {0xC29F, 0xD63A}, //11231 #HANGUL SYLLABLE HIEUH O SSANGKIYEOK + {0xC2A0, 0xD63B}, //11232 #HANGUL SYLLABLE HIEUH O KIYEOKSIOS + {0xC2A1, 0xC9D5}, //11233 #HANGUL SYLLABLE CIEUC I IEUNG + {0xC2A2, 0xC9D6}, //11234 #HANGUL SYLLABLE CIEUC I CIEUC + {0xC2A3, 0xC9D9}, //11235 #HANGUL SYLLABLE CIEUC I THIEUTH + {0xC2A4, 0xC9DA}, //11236 #HANGUL SYLLABLE CIEUC I PHIEUPH + {0xC2A5, 0xC9DC}, //11237 #HANGUL SYLLABLE SSANGCIEUC A + {0xC2A6, 0xC9DD}, //11238 #HANGUL SYLLABLE SSANGCIEUC A KIYEOK + {0xC2A7, 0xC9E0}, //11239 #HANGUL SYLLABLE SSANGCIEUC A NIEUN + {0xC2A8, 0xC9E2}, //11240 #HANGUL SYLLABLE SSANGCIEUC A NIEUNHIEUH + {0xC2A9, 0xC9E4}, //11241 #HANGUL SYLLABLE SSANGCIEUC A RIEUL + {0xC2AA, 0xC9E7}, //11242 #HANGUL SYLLABLE SSANGCIEUC A RIEULPIEUP + {0xC2AB, 0xC9EC}, //11243 #HANGUL SYLLABLE SSANGCIEUC A MIEUM + {0xC2AC, 0xC9ED}, //11244 #HANGUL SYLLABLE SSANGCIEUC A PIEUP + {0xC2AD, 0xC9EF}, //11245 #HANGUL SYLLABLE SSANGCIEUC A SIOS + {0xC2AE, 0xC9F0}, //11246 #HANGUL SYLLABLE SSANGCIEUC A SSANGSIOS + {0xC2AF, 0xC9F1}, //11247 #HANGUL SYLLABLE SSANGCIEUC A IEUNG + {0xC2B0, 0xC9F8}, //11248 #HANGUL SYLLABLE SSANGCIEUC AE + {0xC2B1, 0xC9F9}, //11249 #HANGUL SYLLABLE SSANGCIEUC AE KIYEOK + {0xC2B2, 0xC9FC}, //11250 #HANGUL SYLLABLE SSANGCIEUC AE NIEUN + {0xC2B3, 0xCA00}, //11251 #HANGUL SYLLABLE SSANGCIEUC AE RIEUL + {0xC2B4, 0xCA08}, //11252 #HANGUL SYLLABLE SSANGCIEUC AE MIEUM + {0xC2B5, 0xCA09}, //11253 #HANGUL SYLLABLE SSANGCIEUC AE PIEUP + {0xC2B6, 0xCA0B}, //11254 #HANGUL SYLLABLE SSANGCIEUC AE SIOS + {0xC2B7, 0xCA0C}, //11255 #HANGUL SYLLABLE SSANGCIEUC AE SSANGSIOS + {0xC2B8, 0xCA0D}, //11256 #HANGUL SYLLABLE SSANGCIEUC AE IEUNG + {0xC2B9, 0xCA14}, //11257 #HANGUL SYLLABLE SSANGCIEUC YA + {0xC2BA, 0xCA18}, //11258 #HANGUL SYLLABLE SSANGCIEUC YA NIEUN + {0xC2BB, 0xCA29}, //11259 #HANGUL SYLLABLE SSANGCIEUC YA IEUNG + {0xC2BC, 0xCA4C}, //11260 #HANGUL SYLLABLE SSANGCIEUC EO + {0xC2BD, 0xCA4D}, //11261 #HANGUL SYLLABLE SSANGCIEUC EO KIYEOK + {0xC2BE, 0xCA50}, //11262 #HANGUL SYLLABLE SSANGCIEUC EO NIEUN + {0xC2BF, 0xCA54}, //11263 #HANGUL SYLLABLE SSANGCIEUC EO RIEUL + {0xC2C0, 0xCA5C}, //11264 #HANGUL SYLLABLE SSANGCIEUC EO MIEUM + {0xC2C1, 0xCA5D}, //11265 #HANGUL SYLLABLE SSANGCIEUC EO PIEUP + {0xC2C2, 0xCA5F}, //11266 #HANGUL SYLLABLE SSANGCIEUC EO SIOS + {0xC2C3, 0xCA60}, //11267 #HANGUL SYLLABLE SSANGCIEUC EO SSANGSIOS + {0xC2C4, 0xCA61}, //11268 #HANGUL SYLLABLE SSANGCIEUC EO IEUNG + {0xC2C5, 0xCA68}, //11269 #HANGUL SYLLABLE SSANGCIEUC E + {0xC2C6, 0xCA7D}, //11270 #HANGUL SYLLABLE SSANGCIEUC E IEUNG + {0xC2C7, 0xCA84}, //11271 #HANGUL SYLLABLE SSANGCIEUC YEO + {0xC2C8, 0xCA98}, //11272 #HANGUL SYLLABLE SSANGCIEUC YEO SSANGSIOS + {0xC2C9, 0xCABC}, //11273 #HANGUL SYLLABLE SSANGCIEUC O + {0xC2CA, 0xCABD}, //11274 #HANGUL SYLLABLE SSANGCIEUC O KIYEOK + {0xC2CB, 0xCAC0}, //11275 #HANGUL SYLLABLE SSANGCIEUC O NIEUN + {0xC2CC, 0xCAC4}, //11276 #HANGUL SYLLABLE SSANGCIEUC O RIEUL + {0xC2CD, 0xCACC}, //11277 #HANGUL SYLLABLE SSANGCIEUC O MIEUM + {0xC2CE, 0xCACD}, //11278 #HANGUL SYLLABLE SSANGCIEUC O PIEUP + {0xC2CF, 0xCACF}, //11279 #HANGUL SYLLABLE SSANGCIEUC O SIOS + {0xC2D0, 0xCAD1}, //11280 #HANGUL SYLLABLE SSANGCIEUC O IEUNG + {0xC2D1, 0xCAD3}, //11281 #HANGUL SYLLABLE SSANGCIEUC O CHIEUCH + {0xC2D2, 0xCAD8}, //11282 #HANGUL SYLLABLE SSANGCIEUC WA + {0xC2D3, 0xCAD9}, //11283 #HANGUL SYLLABLE SSANGCIEUC WA KIYEOK + {0xC2D4, 0xCAE0}, //11284 #HANGUL SYLLABLE SSANGCIEUC WA RIEUL + {0xC2D5, 0xCAEC}, //11285 #HANGUL SYLLABLE SSANGCIEUC WA SSANGSIOS + {0xC2D6, 0xCAF4}, //11286 #HANGUL SYLLABLE SSANGCIEUC WAE + {0xC2D7, 0xCB08}, //11287 #HANGUL SYLLABLE SSANGCIEUC WAE SSANGSIOS + {0xC2D8, 0xCB10}, //11288 #HANGUL SYLLABLE SSANGCIEUC OE + {0xC2D9, 0xCB14}, //11289 #HANGUL SYLLABLE SSANGCIEUC OE NIEUN + {0xC2DA, 0xCB18}, //11290 #HANGUL SYLLABLE SSANGCIEUC OE RIEUL + {0xC2DB, 0xCB20}, //11291 #HANGUL SYLLABLE SSANGCIEUC OE MIEUM + {0xC2DC, 0xCB21}, //11292 #HANGUL SYLLABLE SSANGCIEUC OE PIEUP + {0xC2DD, 0xCB41}, //11293 #HANGUL SYLLABLE SSANGCIEUC YO IEUNG + {0xC2DE, 0xCB48}, //11294 #HANGUL SYLLABLE SSANGCIEUC U + {0xC2DF, 0xCB49}, //11295 #HANGUL SYLLABLE SSANGCIEUC U KIYEOK + {0xC2E0, 0xCB4C}, //11296 #HANGUL SYLLABLE SSANGCIEUC U NIEUN + {0xC2E1, 0xCB50}, //11297 #HANGUL SYLLABLE SSANGCIEUC U RIEUL + {0xC2E2, 0xCB58}, //11298 #HANGUL SYLLABLE SSANGCIEUC U MIEUM + {0xC2E3, 0xCB59}, //11299 #HANGUL SYLLABLE SSANGCIEUC U PIEUP + {0xC2E4, 0xCB5D}, //11300 #HANGUL SYLLABLE SSANGCIEUC U IEUNG + {0xC2E5, 0xCB64}, //11301 #HANGUL SYLLABLE SSANGCIEUC WEO + {0xC2E6, 0xCB78}, //11302 #HANGUL SYLLABLE SSANGCIEUC WEO SSANGSIOS + {0xC2E7, 0xCB79}, //11303 #HANGUL SYLLABLE SSANGCIEUC WEO IEUNG + {0xC2E8, 0xCB9C}, //11304 #HANGUL SYLLABLE SSANGCIEUC WI + {0xC2E9, 0xCBB8}, //11305 #HANGUL SYLLABLE SSANGCIEUC YU + {0xC2EA, 0xCBD4}, //11306 #HANGUL SYLLABLE SSANGCIEUC EU + {0xC2EB, 0xCBE4}, //11307 #HANGUL SYLLABLE SSANGCIEUC EU MIEUM + {0xC2EC, 0xCBE7}, //11308 #HANGUL SYLLABLE SSANGCIEUC EU SIOS + {0xC2ED, 0xCBE9}, //11309 #HANGUL SYLLABLE SSANGCIEUC EU IEUNG + {0xC2EE, 0xCC0C}, //11310 #HANGUL SYLLABLE SSANGCIEUC I + {0xC2EF, 0xCC0D}, //11311 #HANGUL SYLLABLE SSANGCIEUC I KIYEOK + {0xC2F0, 0xCC10}, //11312 #HANGUL SYLLABLE SSANGCIEUC I NIEUN + {0xC2F1, 0xCC14}, //11313 #HANGUL SYLLABLE SSANGCIEUC I RIEUL + {0xC2F2, 0xCC1C}, //11314 #HANGUL SYLLABLE SSANGCIEUC I MIEUM + {0xC2F3, 0xCC1D}, //11315 #HANGUL SYLLABLE SSANGCIEUC I PIEUP + {0xC2F4, 0xCC21}, //11316 #HANGUL SYLLABLE SSANGCIEUC I IEUNG + {0xC2F5, 0xCC22}, //11317 #HANGUL SYLLABLE SSANGCIEUC I CIEUC + {0xC2F6, 0xCC27}, //11318 #HANGUL SYLLABLE SSANGCIEUC I HIEUH + {0xC2F7, 0xCC28}, //11319 #HANGUL SYLLABLE CHIEUCH A + {0xC2F8, 0xCC29}, //11320 #HANGUL SYLLABLE CHIEUCH A KIYEOK + {0xC2F9, 0xCC2C}, //11321 #HANGUL SYLLABLE CHIEUCH A NIEUN + {0xC2FA, 0xCC2E}, //11322 #HANGUL SYLLABLE CHIEUCH A NIEUNHIEUH + {0xC2FB, 0xCC30}, //11323 #HANGUL SYLLABLE CHIEUCH A RIEUL + {0xC2FC, 0xCC38}, //11324 #HANGUL SYLLABLE CHIEUCH A MIEUM + {0xC2FD, 0xCC39}, //11325 #HANGUL SYLLABLE CHIEUCH A PIEUP + {0xC2FE, 0xCC3B}, //11326 #HANGUL SYLLABLE CHIEUCH A SIOS + {0xC341, 0xD63D}, //11327 #HANGUL SYLLABLE HIEUH O NIEUNCIEUC + {0xC342, 0xD63E}, //11328 #HANGUL SYLLABLE HIEUH O NIEUNHIEUH + {0xC343, 0xD63F}, //11329 #HANGUL SYLLABLE HIEUH O TIKEUT + {0xC344, 0xD641}, //11330 #HANGUL SYLLABLE HIEUH O RIEULKIYEOK + {0xC345, 0xD642}, //11331 #HANGUL SYLLABLE HIEUH O RIEULMIEUM + {0xC346, 0xD643}, //11332 #HANGUL SYLLABLE HIEUH O RIEULPIEUP + {0xC347, 0xD644}, //11333 #HANGUL SYLLABLE HIEUH O RIEULSIOS + {0xC348, 0xD646}, //11334 #HANGUL SYLLABLE HIEUH O RIEULPHIEUPH + {0xC349, 0xD647}, //11335 #HANGUL SYLLABLE HIEUH O RIEULHIEUH + {0xC34A, 0xD64A}, //11336 #HANGUL SYLLABLE HIEUH O PIEUPSIOS + {0xC34B, 0xD64C}, //11337 #HANGUL SYLLABLE HIEUH O SSANGSIOS + {0xC34C, 0xD64E}, //11338 #HANGUL SYLLABLE HIEUH O CIEUC + {0xC34D, 0xD64F}, //11339 #HANGUL SYLLABLE HIEUH O CHIEUCH + {0xC34E, 0xD650}, //11340 #HANGUL SYLLABLE HIEUH O KHIEUKH + {0xC34F, 0xD652}, //11341 #HANGUL SYLLABLE HIEUH O PHIEUPH + {0xC350, 0xD653}, //11342 #HANGUL SYLLABLE HIEUH O HIEUH + {0xC351, 0xD656}, //11343 #HANGUL SYLLABLE HIEUH WA SSANGKIYEOK + {0xC352, 0xD657}, //11344 #HANGUL SYLLABLE HIEUH WA KIYEOKSIOS + {0xC353, 0xD659}, //11345 #HANGUL SYLLABLE HIEUH WA NIEUNCIEUC + {0xC354, 0xD65A}, //11346 #HANGUL SYLLABLE HIEUH WA NIEUNHIEUH + {0xC355, 0xD65B}, //11347 #HANGUL SYLLABLE HIEUH WA TIKEUT + {0xC356, 0xD65D}, //11348 #HANGUL SYLLABLE HIEUH WA RIEULKIYEOK + {0xC357, 0xD65E}, //11349 #HANGUL SYLLABLE HIEUH WA RIEULMIEUM + {0xC358, 0xD65F}, //11350 #HANGUL SYLLABLE HIEUH WA RIEULPIEUP + {0xC359, 0xD660}, //11351 #HANGUL SYLLABLE HIEUH WA RIEULSIOS + {0xC35A, 0xD661}, //11352 #HANGUL SYLLABLE HIEUH WA RIEULTHIEUTH + {0xC361, 0xD662}, //11353 #HANGUL SYLLABLE HIEUH WA RIEULPHIEUPH + {0xC362, 0xD663}, //11354 #HANGUL SYLLABLE HIEUH WA RIEULHIEUH + {0xC363, 0xD664}, //11355 #HANGUL SYLLABLE HIEUH WA MIEUM + {0xC364, 0xD665}, //11356 #HANGUL SYLLABLE HIEUH WA PIEUP + {0xC365, 0xD666}, //11357 #HANGUL SYLLABLE HIEUH WA PIEUPSIOS + {0xC366, 0xD668}, //11358 #HANGUL SYLLABLE HIEUH WA SSANGSIOS + {0xC367, 0xD66A}, //11359 #HANGUL SYLLABLE HIEUH WA CIEUC + {0xC368, 0xD66B}, //11360 #HANGUL SYLLABLE HIEUH WA CHIEUCH + {0xC369, 0xD66C}, //11361 #HANGUL SYLLABLE HIEUH WA KHIEUKH + {0xC36A, 0xD66D}, //11362 #HANGUL SYLLABLE HIEUH WA THIEUTH + {0xC36B, 0xD66E}, //11363 #HANGUL SYLLABLE HIEUH WA PHIEUPH + {0xC36C, 0xD66F}, //11364 #HANGUL SYLLABLE HIEUH WA HIEUH + {0xC36D, 0xD672}, //11365 #HANGUL SYLLABLE HIEUH WAE SSANGKIYEOK + {0xC36E, 0xD673}, //11366 #HANGUL SYLLABLE HIEUH WAE KIYEOKSIOS + {0xC36F, 0xD675}, //11367 #HANGUL SYLLABLE HIEUH WAE NIEUNCIEUC + {0xC370, 0xD676}, //11368 #HANGUL SYLLABLE HIEUH WAE NIEUNHIEUH + {0xC371, 0xD677}, //11369 #HANGUL SYLLABLE HIEUH WAE TIKEUT + {0xC372, 0xD678}, //11370 #HANGUL SYLLABLE HIEUH WAE RIEUL + {0xC373, 0xD679}, //11371 #HANGUL SYLLABLE HIEUH WAE RIEULKIYEOK + {0xC374, 0xD67A}, //11372 #HANGUL SYLLABLE HIEUH WAE RIEULMIEUM + {0xC375, 0xD67B}, //11373 #HANGUL SYLLABLE HIEUH WAE RIEULPIEUP + {0xC376, 0xD67C}, //11374 #HANGUL SYLLABLE HIEUH WAE RIEULSIOS + {0xC377, 0xD67D}, //11375 #HANGUL SYLLABLE HIEUH WAE RIEULTHIEUTH + {0xC378, 0xD67E}, //11376 #HANGUL SYLLABLE HIEUH WAE RIEULPHIEUPH + {0xC379, 0xD67F}, //11377 #HANGUL SYLLABLE HIEUH WAE RIEULHIEUH + {0xC37A, 0xD680}, //11378 #HANGUL SYLLABLE HIEUH WAE MIEUM + {0xC381, 0xD681}, //11379 #HANGUL SYLLABLE HIEUH WAE PIEUP + {0xC382, 0xD682}, //11380 #HANGUL SYLLABLE HIEUH WAE PIEUPSIOS + {0xC383, 0xD684}, //11381 #HANGUL SYLLABLE HIEUH WAE SSANGSIOS + {0xC384, 0xD686}, //11382 #HANGUL SYLLABLE HIEUH WAE CIEUC + {0xC385, 0xD687}, //11383 #HANGUL SYLLABLE HIEUH WAE CHIEUCH + {0xC386, 0xD688}, //11384 #HANGUL SYLLABLE HIEUH WAE KHIEUKH + {0xC387, 0xD689}, //11385 #HANGUL SYLLABLE HIEUH WAE THIEUTH + {0xC388, 0xD68A}, //11386 #HANGUL SYLLABLE HIEUH WAE PHIEUPH + {0xC389, 0xD68B}, //11387 #HANGUL SYLLABLE HIEUH WAE HIEUH + {0xC38A, 0xD68E}, //11388 #HANGUL SYLLABLE HIEUH OE SSANGKIYEOK + {0xC38B, 0xD68F}, //11389 #HANGUL SYLLABLE HIEUH OE KIYEOKSIOS + {0xC38C, 0xD691}, //11390 #HANGUL SYLLABLE HIEUH OE NIEUNCIEUC + {0xC38D, 0xD692}, //11391 #HANGUL SYLLABLE HIEUH OE NIEUNHIEUH + {0xC38E, 0xD693}, //11392 #HANGUL SYLLABLE HIEUH OE TIKEUT + {0xC38F, 0xD695}, //11393 #HANGUL SYLLABLE HIEUH OE RIEULKIYEOK + {0xC390, 0xD696}, //11394 #HANGUL SYLLABLE HIEUH OE RIEULMIEUM + {0xC391, 0xD697}, //11395 #HANGUL SYLLABLE HIEUH OE RIEULPIEUP + {0xC392, 0xD698}, //11396 #HANGUL SYLLABLE HIEUH OE RIEULSIOS + {0xC393, 0xD699}, //11397 #HANGUL SYLLABLE HIEUH OE RIEULTHIEUTH + {0xC394, 0xD69A}, //11398 #HANGUL SYLLABLE HIEUH OE RIEULPHIEUPH + {0xC395, 0xD69B}, //11399 #HANGUL SYLLABLE HIEUH OE RIEULHIEUH + {0xC396, 0xD69C}, //11400 #HANGUL SYLLABLE HIEUH OE MIEUM + {0xC397, 0xD69E}, //11401 #HANGUL SYLLABLE HIEUH OE PIEUPSIOS + {0xC398, 0xD6A0}, //11402 #HANGUL SYLLABLE HIEUH OE SSANGSIOS + {0xC399, 0xD6A2}, //11403 #HANGUL SYLLABLE HIEUH OE CIEUC + {0xC39A, 0xD6A3}, //11404 #HANGUL SYLLABLE HIEUH OE CHIEUCH + {0xC39B, 0xD6A4}, //11405 #HANGUL SYLLABLE HIEUH OE KHIEUKH + {0xC39C, 0xD6A5}, //11406 #HANGUL SYLLABLE HIEUH OE THIEUTH + {0xC39D, 0xD6A6}, //11407 #HANGUL SYLLABLE HIEUH OE PHIEUPH + {0xC39E, 0xD6A7}, //11408 #HANGUL SYLLABLE HIEUH OE HIEUH + {0xC39F, 0xD6A9}, //11409 #HANGUL SYLLABLE HIEUH YO KIYEOK + {0xC3A0, 0xD6AA}, //11410 #HANGUL SYLLABLE HIEUH YO SSANGKIYEOK + {0xC3A1, 0xCC3C}, //11411 #HANGUL SYLLABLE CHIEUCH A SSANGSIOS + {0xC3A2, 0xCC3D}, //11412 #HANGUL SYLLABLE CHIEUCH A IEUNG + {0xC3A3, 0xCC3E}, //11413 #HANGUL SYLLABLE CHIEUCH A CIEUC + {0xC3A4, 0xCC44}, //11414 #HANGUL SYLLABLE CHIEUCH AE + {0xC3A5, 0xCC45}, //11415 #HANGUL SYLLABLE CHIEUCH AE KIYEOK + {0xC3A6, 0xCC48}, //11416 #HANGUL SYLLABLE CHIEUCH AE NIEUN + {0xC3A7, 0xCC4C}, //11417 #HANGUL SYLLABLE CHIEUCH AE RIEUL + {0xC3A8, 0xCC54}, //11418 #HANGUL SYLLABLE CHIEUCH AE MIEUM + {0xC3A9, 0xCC55}, //11419 #HANGUL SYLLABLE CHIEUCH AE PIEUP + {0xC3AA, 0xCC57}, //11420 #HANGUL SYLLABLE CHIEUCH AE SIOS + {0xC3AB, 0xCC58}, //11421 #HANGUL SYLLABLE CHIEUCH AE SSANGSIOS + {0xC3AC, 0xCC59}, //11422 #HANGUL SYLLABLE CHIEUCH AE IEUNG + {0xC3AD, 0xCC60}, //11423 #HANGUL SYLLABLE CHIEUCH YA + {0xC3AE, 0xCC64}, //11424 #HANGUL SYLLABLE CHIEUCH YA NIEUN + {0xC3AF, 0xCC66}, //11425 #HANGUL SYLLABLE CHIEUCH YA NIEUNHIEUH + {0xC3B0, 0xCC68}, //11426 #HANGUL SYLLABLE CHIEUCH YA RIEUL + {0xC3B1, 0xCC70}, //11427 #HANGUL SYLLABLE CHIEUCH YA MIEUM + {0xC3B2, 0xCC75}, //11428 #HANGUL SYLLABLE CHIEUCH YA IEUNG + {0xC3B3, 0xCC98}, //11429 #HANGUL SYLLABLE CHIEUCH EO + {0xC3B4, 0xCC99}, //11430 #HANGUL SYLLABLE CHIEUCH EO KIYEOK + {0xC3B5, 0xCC9C}, //11431 #HANGUL SYLLABLE CHIEUCH EO NIEUN + {0xC3B6, 0xCCA0}, //11432 #HANGUL SYLLABLE CHIEUCH EO RIEUL + {0xC3B7, 0xCCA8}, //11433 #HANGUL SYLLABLE CHIEUCH EO MIEUM + {0xC3B8, 0xCCA9}, //11434 #HANGUL SYLLABLE CHIEUCH EO PIEUP + {0xC3B9, 0xCCAB}, //11435 #HANGUL SYLLABLE CHIEUCH EO SIOS + {0xC3BA, 0xCCAC}, //11436 #HANGUL SYLLABLE CHIEUCH EO SSANGSIOS + {0xC3BB, 0xCCAD}, //11437 #HANGUL SYLLABLE CHIEUCH EO IEUNG + {0xC3BC, 0xCCB4}, //11438 #HANGUL SYLLABLE CHIEUCH E + {0xC3BD, 0xCCB5}, //11439 #HANGUL SYLLABLE CHIEUCH E KIYEOK + {0xC3BE, 0xCCB8}, //11440 #HANGUL SYLLABLE CHIEUCH E NIEUN + {0xC3BF, 0xCCBC}, //11441 #HANGUL SYLLABLE CHIEUCH E RIEUL + {0xC3C0, 0xCCC4}, //11442 #HANGUL SYLLABLE CHIEUCH E MIEUM + {0xC3C1, 0xCCC5}, //11443 #HANGUL SYLLABLE CHIEUCH E PIEUP + {0xC3C2, 0xCCC7}, //11444 #HANGUL SYLLABLE CHIEUCH E SIOS + {0xC3C3, 0xCCC9}, //11445 #HANGUL SYLLABLE CHIEUCH E IEUNG + {0xC3C4, 0xCCD0}, //11446 #HANGUL SYLLABLE CHIEUCH YEO + {0xC3C5, 0xCCD4}, //11447 #HANGUL SYLLABLE CHIEUCH YEO NIEUN + {0xC3C6, 0xCCE4}, //11448 #HANGUL SYLLABLE CHIEUCH YEO SSANGSIOS + {0xC3C7, 0xCCEC}, //11449 #HANGUL SYLLABLE CHIEUCH YE + {0xC3C8, 0xCCF0}, //11450 #HANGUL SYLLABLE CHIEUCH YE NIEUN + {0xC3C9, 0xCD01}, //11451 #HANGUL SYLLABLE CHIEUCH YE IEUNG + {0xC3CA, 0xCD08}, //11452 #HANGUL SYLLABLE CHIEUCH O + {0xC3CB, 0xCD09}, //11453 #HANGUL SYLLABLE CHIEUCH O KIYEOK + {0xC3CC, 0xCD0C}, //11454 #HANGUL SYLLABLE CHIEUCH O NIEUN + {0xC3CD, 0xCD10}, //11455 #HANGUL SYLLABLE CHIEUCH O RIEUL + {0xC3CE, 0xCD18}, //11456 #HANGUL SYLLABLE CHIEUCH O MIEUM + {0xC3CF, 0xCD19}, //11457 #HANGUL SYLLABLE CHIEUCH O PIEUP + {0xC3D0, 0xCD1B}, //11458 #HANGUL SYLLABLE CHIEUCH O SIOS + {0xC3D1, 0xCD1D}, //11459 #HANGUL SYLLABLE CHIEUCH O IEUNG + {0xC3D2, 0xCD24}, //11460 #HANGUL SYLLABLE CHIEUCH WA + {0xC3D3, 0xCD28}, //11461 #HANGUL SYLLABLE CHIEUCH WA NIEUN + {0xC3D4, 0xCD2C}, //11462 #HANGUL SYLLABLE CHIEUCH WA RIEUL + {0xC3D5, 0xCD39}, //11463 #HANGUL SYLLABLE CHIEUCH WA IEUNG + {0xC3D6, 0xCD5C}, //11464 #HANGUL SYLLABLE CHIEUCH OE + {0xC3D7, 0xCD60}, //11465 #HANGUL SYLLABLE CHIEUCH OE NIEUN + {0xC3D8, 0xCD64}, //11466 #HANGUL SYLLABLE CHIEUCH OE RIEUL + {0xC3D9, 0xCD6C}, //11467 #HANGUL SYLLABLE CHIEUCH OE MIEUM + {0xC3DA, 0xCD6D}, //11468 #HANGUL SYLLABLE CHIEUCH OE PIEUP + {0xC3DB, 0xCD6F}, //11469 #HANGUL SYLLABLE CHIEUCH OE SIOS + {0xC3DC, 0xCD71}, //11470 #HANGUL SYLLABLE CHIEUCH OE IEUNG + {0xC3DD, 0xCD78}, //11471 #HANGUL SYLLABLE CHIEUCH YO + {0xC3DE, 0xCD88}, //11472 #HANGUL SYLLABLE CHIEUCH YO MIEUM + {0xC3DF, 0xCD94}, //11473 #HANGUL SYLLABLE CHIEUCH U + {0xC3E0, 0xCD95}, //11474 #HANGUL SYLLABLE CHIEUCH U KIYEOK + {0xC3E1, 0xCD98}, //11475 #HANGUL SYLLABLE CHIEUCH U NIEUN + {0xC3E2, 0xCD9C}, //11476 #HANGUL SYLLABLE CHIEUCH U RIEUL + {0xC3E3, 0xCDA4}, //11477 #HANGUL SYLLABLE CHIEUCH U MIEUM + {0xC3E4, 0xCDA5}, //11478 #HANGUL SYLLABLE CHIEUCH U PIEUP + {0xC3E5, 0xCDA7}, //11479 #HANGUL SYLLABLE CHIEUCH U SIOS + {0xC3E6, 0xCDA9}, //11480 #HANGUL SYLLABLE CHIEUCH U IEUNG + {0xC3E7, 0xCDB0}, //11481 #HANGUL SYLLABLE CHIEUCH WEO + {0xC3E8, 0xCDC4}, //11482 #HANGUL SYLLABLE CHIEUCH WEO SSANGSIOS + {0xC3E9, 0xCDCC}, //11483 #HANGUL SYLLABLE CHIEUCH WE + {0xC3EA, 0xCDD0}, //11484 #HANGUL SYLLABLE CHIEUCH WE NIEUN + {0xC3EB, 0xCDE8}, //11485 #HANGUL SYLLABLE CHIEUCH WI + {0xC3EC, 0xCDEC}, //11486 #HANGUL SYLLABLE CHIEUCH WI NIEUN + {0xC3ED, 0xCDF0}, //11487 #HANGUL SYLLABLE CHIEUCH WI RIEUL + {0xC3EE, 0xCDF8}, //11488 #HANGUL SYLLABLE CHIEUCH WI MIEUM + {0xC3EF, 0xCDF9}, //11489 #HANGUL SYLLABLE CHIEUCH WI PIEUP + {0xC3F0, 0xCDFB}, //11490 #HANGUL SYLLABLE CHIEUCH WI SIOS + {0xC3F1, 0xCDFD}, //11491 #HANGUL SYLLABLE CHIEUCH WI IEUNG + {0xC3F2, 0xCE04}, //11492 #HANGUL SYLLABLE CHIEUCH YU + {0xC3F3, 0xCE08}, //11493 #HANGUL SYLLABLE CHIEUCH YU NIEUN + {0xC3F4, 0xCE0C}, //11494 #HANGUL SYLLABLE CHIEUCH YU RIEUL + {0xC3F5, 0xCE14}, //11495 #HANGUL SYLLABLE CHIEUCH YU MIEUM + {0xC3F6, 0xCE19}, //11496 #HANGUL SYLLABLE CHIEUCH YU IEUNG + {0xC3F7, 0xCE20}, //11497 #HANGUL SYLLABLE CHIEUCH EU + {0xC3F8, 0xCE21}, //11498 #HANGUL SYLLABLE CHIEUCH EU KIYEOK + {0xC3F9, 0xCE24}, //11499 #HANGUL SYLLABLE CHIEUCH EU NIEUN + {0xC3FA, 0xCE28}, //11500 #HANGUL SYLLABLE CHIEUCH EU RIEUL + {0xC3FB, 0xCE30}, //11501 #HANGUL SYLLABLE CHIEUCH EU MIEUM + {0xC3FC, 0xCE31}, //11502 #HANGUL SYLLABLE CHIEUCH EU PIEUP + {0xC3FD, 0xCE33}, //11503 #HANGUL SYLLABLE CHIEUCH EU SIOS + {0xC3FE, 0xCE35}, //11504 #HANGUL SYLLABLE CHIEUCH EU IEUNG + {0xC441, 0xD6AB}, //11505 #HANGUL SYLLABLE HIEUH YO KIYEOKSIOS + {0xC442, 0xD6AD}, //11506 #HANGUL SYLLABLE HIEUH YO NIEUNCIEUC + {0xC443, 0xD6AE}, //11507 #HANGUL SYLLABLE HIEUH YO NIEUNHIEUH + {0xC444, 0xD6AF}, //11508 #HANGUL SYLLABLE HIEUH YO TIKEUT + {0xC445, 0xD6B1}, //11509 #HANGUL SYLLABLE HIEUH YO RIEULKIYEOK + {0xC446, 0xD6B2}, //11510 #HANGUL SYLLABLE HIEUH YO RIEULMIEUM + {0xC447, 0xD6B3}, //11511 #HANGUL SYLLABLE HIEUH YO RIEULPIEUP + {0xC448, 0xD6B4}, //11512 #HANGUL SYLLABLE HIEUH YO RIEULSIOS + {0xC449, 0xD6B5}, //11513 #HANGUL SYLLABLE HIEUH YO RIEULTHIEUTH + {0xC44A, 0xD6B6}, //11514 #HANGUL SYLLABLE HIEUH YO RIEULPHIEUPH + {0xC44B, 0xD6B7}, //11515 #HANGUL SYLLABLE HIEUH YO RIEULHIEUH + {0xC44C, 0xD6B8}, //11516 #HANGUL SYLLABLE HIEUH YO MIEUM + {0xC44D, 0xD6BA}, //11517 #HANGUL SYLLABLE HIEUH YO PIEUPSIOS + {0xC44E, 0xD6BC}, //11518 #HANGUL SYLLABLE HIEUH YO SSANGSIOS + {0xC44F, 0xD6BD}, //11519 #HANGUL SYLLABLE HIEUH YO IEUNG + {0xC450, 0xD6BE}, //11520 #HANGUL SYLLABLE HIEUH YO CIEUC + {0xC451, 0xD6BF}, //11521 #HANGUL SYLLABLE HIEUH YO CHIEUCH + {0xC452, 0xD6C0}, //11522 #HANGUL SYLLABLE HIEUH YO KHIEUKH + {0xC453, 0xD6C1}, //11523 #HANGUL SYLLABLE HIEUH YO THIEUTH + {0xC454, 0xD6C2}, //11524 #HANGUL SYLLABLE HIEUH YO PHIEUPH + {0xC455, 0xD6C3}, //11525 #HANGUL SYLLABLE HIEUH YO HIEUH + {0xC456, 0xD6C6}, //11526 #HANGUL SYLLABLE HIEUH U SSANGKIYEOK + {0xC457, 0xD6C7}, //11527 #HANGUL SYLLABLE HIEUH U KIYEOKSIOS + {0xC458, 0xD6C9}, //11528 #HANGUL SYLLABLE HIEUH U NIEUNCIEUC + {0xC459, 0xD6CA}, //11529 #HANGUL SYLLABLE HIEUH U NIEUNHIEUH + {0xC45A, 0xD6CB}, //11530 #HANGUL SYLLABLE HIEUH U TIKEUT + {0xC461, 0xD6CD}, //11531 #HANGUL SYLLABLE HIEUH U RIEULKIYEOK + {0xC462, 0xD6CE}, //11532 #HANGUL SYLLABLE HIEUH U RIEULMIEUM + {0xC463, 0xD6CF}, //11533 #HANGUL SYLLABLE HIEUH U RIEULPIEUP + {0xC464, 0xD6D0}, //11534 #HANGUL SYLLABLE HIEUH U RIEULSIOS + {0xC465, 0xD6D2}, //11535 #HANGUL SYLLABLE HIEUH U RIEULPHIEUPH + {0xC466, 0xD6D3}, //11536 #HANGUL SYLLABLE HIEUH U RIEULHIEUH + {0xC467, 0xD6D5}, //11537 #HANGUL SYLLABLE HIEUH U PIEUP + {0xC468, 0xD6D6}, //11538 #HANGUL SYLLABLE HIEUH U PIEUPSIOS + {0xC469, 0xD6D8}, //11539 #HANGUL SYLLABLE HIEUH U SSANGSIOS + {0xC46A, 0xD6DA}, //11540 #HANGUL SYLLABLE HIEUH U CIEUC + {0xC46B, 0xD6DB}, //11541 #HANGUL SYLLABLE HIEUH U CHIEUCH + {0xC46C, 0xD6DC}, //11542 #HANGUL SYLLABLE HIEUH U KHIEUKH + {0xC46D, 0xD6DD}, //11543 #HANGUL SYLLABLE HIEUH U THIEUTH + {0xC46E, 0xD6DE}, //11544 #HANGUL SYLLABLE HIEUH U PHIEUPH + {0xC46F, 0xD6DF}, //11545 #HANGUL SYLLABLE HIEUH U HIEUH + {0xC470, 0xD6E1}, //11546 #HANGUL SYLLABLE HIEUH WEO KIYEOK + {0xC471, 0xD6E2}, //11547 #HANGUL SYLLABLE HIEUH WEO SSANGKIYEOK + {0xC472, 0xD6E3}, //11548 #HANGUL SYLLABLE HIEUH WEO KIYEOKSIOS + {0xC473, 0xD6E5}, //11549 #HANGUL SYLLABLE HIEUH WEO NIEUNCIEUC + {0xC474, 0xD6E6}, //11550 #HANGUL SYLLABLE HIEUH WEO NIEUNHIEUH + {0xC475, 0xD6E7}, //11551 #HANGUL SYLLABLE HIEUH WEO TIKEUT + {0xC476, 0xD6E9}, //11552 #HANGUL SYLLABLE HIEUH WEO RIEULKIYEOK + {0xC477, 0xD6EA}, //11553 #HANGUL SYLLABLE HIEUH WEO RIEULMIEUM + {0xC478, 0xD6EB}, //11554 #HANGUL SYLLABLE HIEUH WEO RIEULPIEUP + {0xC479, 0xD6EC}, //11555 #HANGUL SYLLABLE HIEUH WEO RIEULSIOS + {0xC47A, 0xD6ED}, //11556 #HANGUL SYLLABLE HIEUH WEO RIEULTHIEUTH + {0xC481, 0xD6EE}, //11557 #HANGUL SYLLABLE HIEUH WEO RIEULPHIEUPH + {0xC482, 0xD6EF}, //11558 #HANGUL SYLLABLE HIEUH WEO RIEULHIEUH + {0xC483, 0xD6F1}, //11559 #HANGUL SYLLABLE HIEUH WEO PIEUP + {0xC484, 0xD6F2}, //11560 #HANGUL SYLLABLE HIEUH WEO PIEUPSIOS + {0xC485, 0xD6F3}, //11561 #HANGUL SYLLABLE HIEUH WEO SIOS + {0xC486, 0xD6F4}, //11562 #HANGUL SYLLABLE HIEUH WEO SSANGSIOS + {0xC487, 0xD6F6}, //11563 #HANGUL SYLLABLE HIEUH WEO CIEUC + {0xC488, 0xD6F7}, //11564 #HANGUL SYLLABLE HIEUH WEO CHIEUCH + {0xC489, 0xD6F8}, //11565 #HANGUL SYLLABLE HIEUH WEO KHIEUKH + {0xC48A, 0xD6F9}, //11566 #HANGUL SYLLABLE HIEUH WEO THIEUTH + {0xC48B, 0xD6FA}, //11567 #HANGUL SYLLABLE HIEUH WEO PHIEUPH + {0xC48C, 0xD6FB}, //11568 #HANGUL SYLLABLE HIEUH WEO HIEUH + {0xC48D, 0xD6FE}, //11569 #HANGUL SYLLABLE HIEUH WE SSANGKIYEOK + {0xC48E, 0xD6FF}, //11570 #HANGUL SYLLABLE HIEUH WE KIYEOKSIOS + {0xC48F, 0xD701}, //11571 #HANGUL SYLLABLE HIEUH WE NIEUNCIEUC + {0xC490, 0xD702}, //11572 #HANGUL SYLLABLE HIEUH WE NIEUNHIEUH + {0xC491, 0xD703}, //11573 #HANGUL SYLLABLE HIEUH WE TIKEUT + {0xC492, 0xD705}, //11574 #HANGUL SYLLABLE HIEUH WE RIEULKIYEOK + {0xC493, 0xD706}, //11575 #HANGUL SYLLABLE HIEUH WE RIEULMIEUM + {0xC494, 0xD707}, //11576 #HANGUL SYLLABLE HIEUH WE RIEULPIEUP + {0xC495, 0xD708}, //11577 #HANGUL SYLLABLE HIEUH WE RIEULSIOS + {0xC496, 0xD709}, //11578 #HANGUL SYLLABLE HIEUH WE RIEULTHIEUTH + {0xC497, 0xD70A}, //11579 #HANGUL SYLLABLE HIEUH WE RIEULPHIEUPH + {0xC498, 0xD70B}, //11580 #HANGUL SYLLABLE HIEUH WE RIEULHIEUH + {0xC499, 0xD70C}, //11581 #HANGUL SYLLABLE HIEUH WE MIEUM + {0xC49A, 0xD70D}, //11582 #HANGUL SYLLABLE HIEUH WE PIEUP + {0xC49B, 0xD70E}, //11583 #HANGUL SYLLABLE HIEUH WE PIEUPSIOS + {0xC49C, 0xD70F}, //11584 #HANGUL SYLLABLE HIEUH WE SIOS + {0xC49D, 0xD710}, //11585 #HANGUL SYLLABLE HIEUH WE SSANGSIOS + {0xC49E, 0xD712}, //11586 #HANGUL SYLLABLE HIEUH WE CIEUC + {0xC49F, 0xD713}, //11587 #HANGUL SYLLABLE HIEUH WE CHIEUCH + {0xC4A0, 0xD714}, //11588 #HANGUL SYLLABLE HIEUH WE KHIEUKH + {0xC4A1, 0xCE58}, //11589 #HANGUL SYLLABLE CHIEUCH I + {0xC4A2, 0xCE59}, //11590 #HANGUL SYLLABLE CHIEUCH I KIYEOK + {0xC4A3, 0xCE5C}, //11591 #HANGUL SYLLABLE CHIEUCH I NIEUN + {0xC4A4, 0xCE5F}, //11592 #HANGUL SYLLABLE CHIEUCH I TIKEUT + {0xC4A5, 0xCE60}, //11593 #HANGUL SYLLABLE CHIEUCH I RIEUL + {0xC4A6, 0xCE61}, //11594 #HANGUL SYLLABLE CHIEUCH I RIEULKIYEOK + {0xC4A7, 0xCE68}, //11595 #HANGUL SYLLABLE CHIEUCH I MIEUM + {0xC4A8, 0xCE69}, //11596 #HANGUL SYLLABLE CHIEUCH I PIEUP + {0xC4A9, 0xCE6B}, //11597 #HANGUL SYLLABLE CHIEUCH I SIOS + {0xC4AA, 0xCE6D}, //11598 #HANGUL SYLLABLE CHIEUCH I IEUNG + {0xC4AB, 0xCE74}, //11599 #HANGUL SYLLABLE KHIEUKH A + {0xC4AC, 0xCE75}, //11600 #HANGUL SYLLABLE KHIEUKH A KIYEOK + {0xC4AD, 0xCE78}, //11601 #HANGUL SYLLABLE KHIEUKH A NIEUN + {0xC4AE, 0xCE7C}, //11602 #HANGUL SYLLABLE KHIEUKH A RIEUL + {0xC4AF, 0xCE84}, //11603 #HANGUL SYLLABLE KHIEUKH A MIEUM + {0xC4B0, 0xCE85}, //11604 #HANGUL SYLLABLE KHIEUKH A PIEUP + {0xC4B1, 0xCE87}, //11605 #HANGUL SYLLABLE KHIEUKH A SIOS + {0xC4B2, 0xCE89}, //11606 #HANGUL SYLLABLE KHIEUKH A IEUNG + {0xC4B3, 0xCE90}, //11607 #HANGUL SYLLABLE KHIEUKH AE + {0xC4B4, 0xCE91}, //11608 #HANGUL SYLLABLE KHIEUKH AE KIYEOK + {0xC4B5, 0xCE94}, //11609 #HANGUL SYLLABLE KHIEUKH AE NIEUN + {0xC4B6, 0xCE98}, //11610 #HANGUL SYLLABLE KHIEUKH AE RIEUL + {0xC4B7, 0xCEA0}, //11611 #HANGUL SYLLABLE KHIEUKH AE MIEUM + {0xC4B8, 0xCEA1}, //11612 #HANGUL SYLLABLE KHIEUKH AE PIEUP + {0xC4B9, 0xCEA3}, //11613 #HANGUL SYLLABLE KHIEUKH AE SIOS + {0xC4BA, 0xCEA4}, //11614 #HANGUL SYLLABLE KHIEUKH AE SSANGSIOS + {0xC4BB, 0xCEA5}, //11615 #HANGUL SYLLABLE KHIEUKH AE IEUNG + {0xC4BC, 0xCEAC}, //11616 #HANGUL SYLLABLE KHIEUKH YA + {0xC4BD, 0xCEAD}, //11617 #HANGUL SYLLABLE KHIEUKH YA KIYEOK + {0xC4BE, 0xCEC1}, //11618 #HANGUL SYLLABLE KHIEUKH YA IEUNG + {0xC4BF, 0xCEE4}, //11619 #HANGUL SYLLABLE KHIEUKH EO + {0xC4C0, 0xCEE5}, //11620 #HANGUL SYLLABLE KHIEUKH EO KIYEOK + {0xC4C1, 0xCEE8}, //11621 #HANGUL SYLLABLE KHIEUKH EO NIEUN + {0xC4C2, 0xCEEB}, //11622 #HANGUL SYLLABLE KHIEUKH EO TIKEUT + {0xC4C3, 0xCEEC}, //11623 #HANGUL SYLLABLE KHIEUKH EO RIEUL + {0xC4C4, 0xCEF4}, //11624 #HANGUL SYLLABLE KHIEUKH EO MIEUM + {0xC4C5, 0xCEF5}, //11625 #HANGUL SYLLABLE KHIEUKH EO PIEUP + {0xC4C6, 0xCEF7}, //11626 #HANGUL SYLLABLE KHIEUKH EO SIOS + {0xC4C7, 0xCEF8}, //11627 #HANGUL SYLLABLE KHIEUKH EO SSANGSIOS + {0xC4C8, 0xCEF9}, //11628 #HANGUL SYLLABLE KHIEUKH EO IEUNG + {0xC4C9, 0xCF00}, //11629 #HANGUL SYLLABLE KHIEUKH E + {0xC4CA, 0xCF01}, //11630 #HANGUL SYLLABLE KHIEUKH E KIYEOK + {0xC4CB, 0xCF04}, //11631 #HANGUL SYLLABLE KHIEUKH E NIEUN + {0xC4CC, 0xCF08}, //11632 #HANGUL SYLLABLE KHIEUKH E RIEUL + {0xC4CD, 0xCF10}, //11633 #HANGUL SYLLABLE KHIEUKH E MIEUM + {0xC4CE, 0xCF11}, //11634 #HANGUL SYLLABLE KHIEUKH E PIEUP + {0xC4CF, 0xCF13}, //11635 #HANGUL SYLLABLE KHIEUKH E SIOS + {0xC4D0, 0xCF15}, //11636 #HANGUL SYLLABLE KHIEUKH E IEUNG + {0xC4D1, 0xCF1C}, //11637 #HANGUL SYLLABLE KHIEUKH YEO + {0xC4D2, 0xCF20}, //11638 #HANGUL SYLLABLE KHIEUKH YEO NIEUN + {0xC4D3, 0xCF24}, //11639 #HANGUL SYLLABLE KHIEUKH YEO RIEUL + {0xC4D4, 0xCF2C}, //11640 #HANGUL SYLLABLE KHIEUKH YEO MIEUM + {0xC4D5, 0xCF2D}, //11641 #HANGUL SYLLABLE KHIEUKH YEO PIEUP + {0xC4D6, 0xCF2F}, //11642 #HANGUL SYLLABLE KHIEUKH YEO SIOS + {0xC4D7, 0xCF30}, //11643 #HANGUL SYLLABLE KHIEUKH YEO SSANGSIOS + {0xC4D8, 0xCF31}, //11644 #HANGUL SYLLABLE KHIEUKH YEO IEUNG + {0xC4D9, 0xCF38}, //11645 #HANGUL SYLLABLE KHIEUKH YE + {0xC4DA, 0xCF54}, //11646 #HANGUL SYLLABLE KHIEUKH O + {0xC4DB, 0xCF55}, //11647 #HANGUL SYLLABLE KHIEUKH O KIYEOK + {0xC4DC, 0xCF58}, //11648 #HANGUL SYLLABLE KHIEUKH O NIEUN + {0xC4DD, 0xCF5C}, //11649 #HANGUL SYLLABLE KHIEUKH O RIEUL + {0xC4DE, 0xCF64}, //11650 #HANGUL SYLLABLE KHIEUKH O MIEUM + {0xC4DF, 0xCF65}, //11651 #HANGUL SYLLABLE KHIEUKH O PIEUP + {0xC4E0, 0xCF67}, //11652 #HANGUL SYLLABLE KHIEUKH O SIOS + {0xC4E1, 0xCF69}, //11653 #HANGUL SYLLABLE KHIEUKH O IEUNG + {0xC4E2, 0xCF70}, //11654 #HANGUL SYLLABLE KHIEUKH WA + {0xC4E3, 0xCF71}, //11655 #HANGUL SYLLABLE KHIEUKH WA KIYEOK + {0xC4E4, 0xCF74}, //11656 #HANGUL SYLLABLE KHIEUKH WA NIEUN + {0xC4E5, 0xCF78}, //11657 #HANGUL SYLLABLE KHIEUKH WA RIEUL + {0xC4E6, 0xCF80}, //11658 #HANGUL SYLLABLE KHIEUKH WA MIEUM + {0xC4E7, 0xCF85}, //11659 #HANGUL SYLLABLE KHIEUKH WA IEUNG + {0xC4E8, 0xCF8C}, //11660 #HANGUL SYLLABLE KHIEUKH WAE + {0xC4E9, 0xCFA1}, //11661 #HANGUL SYLLABLE KHIEUKH WAE IEUNG + {0xC4EA, 0xCFA8}, //11662 #HANGUL SYLLABLE KHIEUKH OE + {0xC4EB, 0xCFB0}, //11663 #HANGUL SYLLABLE KHIEUKH OE RIEUL + {0xC4EC, 0xCFC4}, //11664 #HANGUL SYLLABLE KHIEUKH YO + {0xC4ED, 0xCFE0}, //11665 #HANGUL SYLLABLE KHIEUKH U + {0xC4EE, 0xCFE1}, //11666 #HANGUL SYLLABLE KHIEUKH U KIYEOK + {0xC4EF, 0xCFE4}, //11667 #HANGUL SYLLABLE KHIEUKH U NIEUN + {0xC4F0, 0xCFE8}, //11668 #HANGUL SYLLABLE KHIEUKH U RIEUL + {0xC4F1, 0xCFF0}, //11669 #HANGUL SYLLABLE KHIEUKH U MIEUM + {0xC4F2, 0xCFF1}, //11670 #HANGUL SYLLABLE KHIEUKH U PIEUP + {0xC4F3, 0xCFF3}, //11671 #HANGUL SYLLABLE KHIEUKH U SIOS + {0xC4F4, 0xCFF5}, //11672 #HANGUL SYLLABLE KHIEUKH U IEUNG + {0xC4F5, 0xCFFC}, //11673 #HANGUL SYLLABLE KHIEUKH WEO + {0xC4F6, 0xD000}, //11674 #HANGUL SYLLABLE KHIEUKH WEO NIEUN + {0xC4F7, 0xD004}, //11675 #HANGUL SYLLABLE KHIEUKH WEO RIEUL + {0xC4F8, 0xD011}, //11676 #HANGUL SYLLABLE KHIEUKH WEO IEUNG + {0xC4F9, 0xD018}, //11677 #HANGUL SYLLABLE KHIEUKH WE + {0xC4FA, 0xD02D}, //11678 #HANGUL SYLLABLE KHIEUKH WE IEUNG + {0xC4FB, 0xD034}, //11679 #HANGUL SYLLABLE KHIEUKH WI + {0xC4FC, 0xD035}, //11680 #HANGUL SYLLABLE KHIEUKH WI KIYEOK + {0xC4FD, 0xD038}, //11681 #HANGUL SYLLABLE KHIEUKH WI NIEUN + {0xC4FE, 0xD03C}, //11682 #HANGUL SYLLABLE KHIEUKH WI RIEUL + {0xC541, 0xD715}, //11683 #HANGUL SYLLABLE HIEUH WE THIEUTH + {0xC542, 0xD716}, //11684 #HANGUL SYLLABLE HIEUH WE PHIEUPH + {0xC543, 0xD717}, //11685 #HANGUL SYLLABLE HIEUH WE HIEUH + {0xC544, 0xD71A}, //11686 #HANGUL SYLLABLE HIEUH WI SSANGKIYEOK + {0xC545, 0xD71B}, //11687 #HANGUL SYLLABLE HIEUH WI KIYEOKSIOS + {0xC546, 0xD71D}, //11688 #HANGUL SYLLABLE HIEUH WI NIEUNCIEUC + {0xC547, 0xD71E}, //11689 #HANGUL SYLLABLE HIEUH WI NIEUNHIEUH + {0xC548, 0xD71F}, //11690 #HANGUL SYLLABLE HIEUH WI TIKEUT + {0xC549, 0xD721}, //11691 #HANGUL SYLLABLE HIEUH WI RIEULKIYEOK + {0xC54A, 0xD722}, //11692 #HANGUL SYLLABLE HIEUH WI RIEULMIEUM + {0xC54B, 0xD723}, //11693 #HANGUL SYLLABLE HIEUH WI RIEULPIEUP + {0xC54C, 0xD724}, //11694 #HANGUL SYLLABLE HIEUH WI RIEULSIOS + {0xC54D, 0xD725}, //11695 #HANGUL SYLLABLE HIEUH WI RIEULTHIEUTH + {0xC54E, 0xD726}, //11696 #HANGUL SYLLABLE HIEUH WI RIEULPHIEUPH + {0xC54F, 0xD727}, //11697 #HANGUL SYLLABLE HIEUH WI RIEULHIEUH + {0xC550, 0xD72A}, //11698 #HANGUL SYLLABLE HIEUH WI PIEUPSIOS + {0xC551, 0xD72C}, //11699 #HANGUL SYLLABLE HIEUH WI SSANGSIOS + {0xC552, 0xD72E}, //11700 #HANGUL SYLLABLE HIEUH WI CIEUC + {0xC553, 0xD72F}, //11701 #HANGUL SYLLABLE HIEUH WI CHIEUCH + {0xC554, 0xD730}, //11702 #HANGUL SYLLABLE HIEUH WI KHIEUKH + {0xC555, 0xD731}, //11703 #HANGUL SYLLABLE HIEUH WI THIEUTH + {0xC556, 0xD732}, //11704 #HANGUL SYLLABLE HIEUH WI PHIEUPH + {0xC557, 0xD733}, //11705 #HANGUL SYLLABLE HIEUH WI HIEUH + {0xC558, 0xD736}, //11706 #HANGUL SYLLABLE HIEUH YU SSANGKIYEOK + {0xC559, 0xD737}, //11707 #HANGUL SYLLABLE HIEUH YU KIYEOKSIOS + {0xC55A, 0xD739}, //11708 #HANGUL SYLLABLE HIEUH YU NIEUNCIEUC + {0xC561, 0xD73A}, //11709 #HANGUL SYLLABLE HIEUH YU NIEUNHIEUH + {0xC562, 0xD73B}, //11710 #HANGUL SYLLABLE HIEUH YU TIKEUT + {0xC563, 0xD73D}, //11711 #HANGUL SYLLABLE HIEUH YU RIEULKIYEOK + {0xC564, 0xD73E}, //11712 #HANGUL SYLLABLE HIEUH YU RIEULMIEUM + {0xC565, 0xD73F}, //11713 #HANGUL SYLLABLE HIEUH YU RIEULPIEUP + {0xC566, 0xD740}, //11714 #HANGUL SYLLABLE HIEUH YU RIEULSIOS + {0xC567, 0xD741}, //11715 #HANGUL SYLLABLE HIEUH YU RIEULTHIEUTH + {0xC568, 0xD742}, //11716 #HANGUL SYLLABLE HIEUH YU RIEULPHIEUPH + {0xC569, 0xD743}, //11717 #HANGUL SYLLABLE HIEUH YU RIEULHIEUH + {0xC56A, 0xD745}, //11718 #HANGUL SYLLABLE HIEUH YU PIEUP + {0xC56B, 0xD746}, //11719 #HANGUL SYLLABLE HIEUH YU PIEUPSIOS + {0xC56C, 0xD748}, //11720 #HANGUL SYLLABLE HIEUH YU SSANGSIOS + {0xC56D, 0xD74A}, //11721 #HANGUL SYLLABLE HIEUH YU CIEUC + {0xC56E, 0xD74B}, //11722 #HANGUL SYLLABLE HIEUH YU CHIEUCH + {0xC56F, 0xD74C}, //11723 #HANGUL SYLLABLE HIEUH YU KHIEUKH + {0xC570, 0xD74D}, //11724 #HANGUL SYLLABLE HIEUH YU THIEUTH + {0xC571, 0xD74E}, //11725 #HANGUL SYLLABLE HIEUH YU PHIEUPH + {0xC572, 0xD74F}, //11726 #HANGUL SYLLABLE HIEUH YU HIEUH + {0xC573, 0xD752}, //11727 #HANGUL SYLLABLE HIEUH EU SSANGKIYEOK + {0xC574, 0xD753}, //11728 #HANGUL SYLLABLE HIEUH EU KIYEOKSIOS + {0xC575, 0xD755}, //11729 #HANGUL SYLLABLE HIEUH EU NIEUNCIEUC + {0xC576, 0xD75A}, //11730 #HANGUL SYLLABLE HIEUH EU RIEULMIEUM + {0xC577, 0xD75B}, //11731 #HANGUL SYLLABLE HIEUH EU RIEULPIEUP + {0xC578, 0xD75C}, //11732 #HANGUL SYLLABLE HIEUH EU RIEULSIOS + {0xC579, 0xD75D}, //11733 #HANGUL SYLLABLE HIEUH EU RIEULTHIEUTH + {0xC57A, 0xD75E}, //11734 #HANGUL SYLLABLE HIEUH EU RIEULPHIEUPH + {0xC581, 0xD75F}, //11735 #HANGUL SYLLABLE HIEUH EU RIEULHIEUH + {0xC582, 0xD762}, //11736 #HANGUL SYLLABLE HIEUH EU PIEUPSIOS + {0xC583, 0xD764}, //11737 #HANGUL SYLLABLE HIEUH EU SSANGSIOS + {0xC584, 0xD766}, //11738 #HANGUL SYLLABLE HIEUH EU CIEUC + {0xC585, 0xD767}, //11739 #HANGUL SYLLABLE HIEUH EU CHIEUCH + {0xC586, 0xD768}, //11740 #HANGUL SYLLABLE HIEUH EU KHIEUKH + {0xC587, 0xD76A}, //11741 #HANGUL SYLLABLE HIEUH EU PHIEUPH + {0xC588, 0xD76B}, //11742 #HANGUL SYLLABLE HIEUH EU HIEUH + {0xC589, 0xD76D}, //11743 #HANGUL SYLLABLE HIEUH YI KIYEOK + {0xC58A, 0xD76E}, //11744 #HANGUL SYLLABLE HIEUH YI SSANGKIYEOK + {0xC58B, 0xD76F}, //11745 #HANGUL SYLLABLE HIEUH YI KIYEOKSIOS + {0xC58C, 0xD771}, //11746 #HANGUL SYLLABLE HIEUH YI NIEUNCIEUC + {0xC58D, 0xD772}, //11747 #HANGUL SYLLABLE HIEUH YI NIEUNHIEUH + {0xC58E, 0xD773}, //11748 #HANGUL SYLLABLE HIEUH YI TIKEUT + {0xC58F, 0xD775}, //11749 #HANGUL SYLLABLE HIEUH YI RIEULKIYEOK + {0xC590, 0xD776}, //11750 #HANGUL SYLLABLE HIEUH YI RIEULMIEUM + {0xC591, 0xD777}, //11751 #HANGUL SYLLABLE HIEUH YI RIEULPIEUP + {0xC592, 0xD778}, //11752 #HANGUL SYLLABLE HIEUH YI RIEULSIOS + {0xC593, 0xD779}, //11753 #HANGUL SYLLABLE HIEUH YI RIEULTHIEUTH + {0xC594, 0xD77A}, //11754 #HANGUL SYLLABLE HIEUH YI RIEULPHIEUPH + {0xC595, 0xD77B}, //11755 #HANGUL SYLLABLE HIEUH YI RIEULHIEUH + {0xC596, 0xD77E}, //11756 #HANGUL SYLLABLE HIEUH YI PIEUPSIOS + {0xC597, 0xD77F}, //11757 #HANGUL SYLLABLE HIEUH YI SIOS + {0xC598, 0xD780}, //11758 #HANGUL SYLLABLE HIEUH YI SSANGSIOS + {0xC599, 0xD782}, //11759 #HANGUL SYLLABLE HIEUH YI CIEUC + {0xC59A, 0xD783}, //11760 #HANGUL SYLLABLE HIEUH YI CHIEUCH + {0xC59B, 0xD784}, //11761 #HANGUL SYLLABLE HIEUH YI KHIEUKH + {0xC59C, 0xD785}, //11762 #HANGUL SYLLABLE HIEUH YI THIEUTH + {0xC59D, 0xD786}, //11763 #HANGUL SYLLABLE HIEUH YI PHIEUPH + {0xC59E, 0xD787}, //11764 #HANGUL SYLLABLE HIEUH YI HIEUH + {0xC59F, 0xD78A}, //11765 #HANGUL SYLLABLE HIEUH I SSANGKIYEOK + {0xC5A0, 0xD78B}, //11766 #HANGUL SYLLABLE HIEUH I KIYEOKSIOS + {0xC5A1, 0xD044}, //11767 #HANGUL SYLLABLE KHIEUKH WI MIEUM + {0xC5A2, 0xD045}, //11768 #HANGUL SYLLABLE KHIEUKH WI PIEUP + {0xC5A3, 0xD047}, //11769 #HANGUL SYLLABLE KHIEUKH WI SIOS + {0xC5A4, 0xD049}, //11770 #HANGUL SYLLABLE KHIEUKH WI IEUNG + {0xC5A5, 0xD050}, //11771 #HANGUL SYLLABLE KHIEUKH YU + {0xC5A6, 0xD054}, //11772 #HANGUL SYLLABLE KHIEUKH YU NIEUN + {0xC5A7, 0xD058}, //11773 #HANGUL SYLLABLE KHIEUKH YU RIEUL + {0xC5A8, 0xD060}, //11774 #HANGUL SYLLABLE KHIEUKH YU MIEUM + {0xC5A9, 0xD06C}, //11775 #HANGUL SYLLABLE KHIEUKH EU + {0xC5AA, 0xD06D}, //11776 #HANGUL SYLLABLE KHIEUKH EU KIYEOK + {0xC5AB, 0xD070}, //11777 #HANGUL SYLLABLE KHIEUKH EU NIEUN + {0xC5AC, 0xD074}, //11778 #HANGUL SYLLABLE KHIEUKH EU RIEUL + {0xC5AD, 0xD07C}, //11779 #HANGUL SYLLABLE KHIEUKH EU MIEUM + {0xC5AE, 0xD07D}, //11780 #HANGUL SYLLABLE KHIEUKH EU PIEUP + {0xC5AF, 0xD081}, //11781 #HANGUL SYLLABLE KHIEUKH EU IEUNG + {0xC5B0, 0xD0A4}, //11782 #HANGUL SYLLABLE KHIEUKH I + {0xC5B1, 0xD0A5}, //11783 #HANGUL SYLLABLE KHIEUKH I KIYEOK + {0xC5B2, 0xD0A8}, //11784 #HANGUL SYLLABLE KHIEUKH I NIEUN + {0xC5B3, 0xD0AC}, //11785 #HANGUL SYLLABLE KHIEUKH I RIEUL + {0xC5B4, 0xD0B4}, //11786 #HANGUL SYLLABLE KHIEUKH I MIEUM + {0xC5B5, 0xD0B5}, //11787 #HANGUL SYLLABLE KHIEUKH I PIEUP + {0xC5B6, 0xD0B7}, //11788 #HANGUL SYLLABLE KHIEUKH I SIOS + {0xC5B7, 0xD0B9}, //11789 #HANGUL SYLLABLE KHIEUKH I IEUNG + {0xC5B8, 0xD0C0}, //11790 #HANGUL SYLLABLE THIEUTH A + {0xC5B9, 0xD0C1}, //11791 #HANGUL SYLLABLE THIEUTH A KIYEOK + {0xC5BA, 0xD0C4}, //11792 #HANGUL SYLLABLE THIEUTH A NIEUN + {0xC5BB, 0xD0C8}, //11793 #HANGUL SYLLABLE THIEUTH A RIEUL + {0xC5BC, 0xD0C9}, //11794 #HANGUL SYLLABLE THIEUTH A RIEULKIYEOK + {0xC5BD, 0xD0D0}, //11795 #HANGUL SYLLABLE THIEUTH A MIEUM + {0xC5BE, 0xD0D1}, //11796 #HANGUL SYLLABLE THIEUTH A PIEUP + {0xC5BF, 0xD0D3}, //11797 #HANGUL SYLLABLE THIEUTH A SIOS + {0xC5C0, 0xD0D4}, //11798 #HANGUL SYLLABLE THIEUTH A SSANGSIOS + {0xC5C1, 0xD0D5}, //11799 #HANGUL SYLLABLE THIEUTH A IEUNG + {0xC5C2, 0xD0DC}, //11800 #HANGUL SYLLABLE THIEUTH AE + {0xC5C3, 0xD0DD}, //11801 #HANGUL SYLLABLE THIEUTH AE KIYEOK + {0xC5C4, 0xD0E0}, //11802 #HANGUL SYLLABLE THIEUTH AE NIEUN + {0xC5C5, 0xD0E4}, //11803 #HANGUL SYLLABLE THIEUTH AE RIEUL + {0xC5C6, 0xD0EC}, //11804 #HANGUL SYLLABLE THIEUTH AE MIEUM + {0xC5C7, 0xD0ED}, //11805 #HANGUL SYLLABLE THIEUTH AE PIEUP + {0xC5C8, 0xD0EF}, //11806 #HANGUL SYLLABLE THIEUTH AE SIOS + {0xC5C9, 0xD0F0}, //11807 #HANGUL SYLLABLE THIEUTH AE SSANGSIOS + {0xC5CA, 0xD0F1}, //11808 #HANGUL SYLLABLE THIEUTH AE IEUNG + {0xC5CB, 0xD0F8}, //11809 #HANGUL SYLLABLE THIEUTH YA + {0xC5CC, 0xD10D}, //11810 #HANGUL SYLLABLE THIEUTH YA IEUNG + {0xC5CD, 0xD130}, //11811 #HANGUL SYLLABLE THIEUTH EO + {0xC5CE, 0xD131}, //11812 #HANGUL SYLLABLE THIEUTH EO KIYEOK + {0xC5CF, 0xD134}, //11813 #HANGUL SYLLABLE THIEUTH EO NIEUN + {0xC5D0, 0xD138}, //11814 #HANGUL SYLLABLE THIEUTH EO RIEUL + {0xC5D1, 0xD13A}, //11815 #HANGUL SYLLABLE THIEUTH EO RIEULMIEUM + {0xC5D2, 0xD140}, //11816 #HANGUL SYLLABLE THIEUTH EO MIEUM + {0xC5D3, 0xD141}, //11817 #HANGUL SYLLABLE THIEUTH EO PIEUP + {0xC5D4, 0xD143}, //11818 #HANGUL SYLLABLE THIEUTH EO SIOS + {0xC5D5, 0xD144}, //11819 #HANGUL SYLLABLE THIEUTH EO SSANGSIOS + {0xC5D6, 0xD145}, //11820 #HANGUL SYLLABLE THIEUTH EO IEUNG + {0xC5D7, 0xD14C}, //11821 #HANGUL SYLLABLE THIEUTH E + {0xC5D8, 0xD14D}, //11822 #HANGUL SYLLABLE THIEUTH E KIYEOK + {0xC5D9, 0xD150}, //11823 #HANGUL SYLLABLE THIEUTH E NIEUN + {0xC5DA, 0xD154}, //11824 #HANGUL SYLLABLE THIEUTH E RIEUL + {0xC5DB, 0xD15C}, //11825 #HANGUL SYLLABLE THIEUTH E MIEUM + {0xC5DC, 0xD15D}, //11826 #HANGUL SYLLABLE THIEUTH E PIEUP + {0xC5DD, 0xD15F}, //11827 #HANGUL SYLLABLE THIEUTH E SIOS + {0xC5DE, 0xD161}, //11828 #HANGUL SYLLABLE THIEUTH E IEUNG + {0xC5DF, 0xD168}, //11829 #HANGUL SYLLABLE THIEUTH YEO + {0xC5E0, 0xD16C}, //11830 #HANGUL SYLLABLE THIEUTH YEO NIEUN + {0xC5E1, 0xD17C}, //11831 #HANGUL SYLLABLE THIEUTH YEO SSANGSIOS + {0xC5E2, 0xD184}, //11832 #HANGUL SYLLABLE THIEUTH YE + {0xC5E3, 0xD188}, //11833 #HANGUL SYLLABLE THIEUTH YE NIEUN + {0xC5E4, 0xD1A0}, //11834 #HANGUL SYLLABLE THIEUTH O + {0xC5E5, 0xD1A1}, //11835 #HANGUL SYLLABLE THIEUTH O KIYEOK + {0xC5E6, 0xD1A4}, //11836 #HANGUL SYLLABLE THIEUTH O NIEUN + {0xC5E7, 0xD1A8}, //11837 #HANGUL SYLLABLE THIEUTH O RIEUL + {0xC5E8, 0xD1B0}, //11838 #HANGUL SYLLABLE THIEUTH O MIEUM + {0xC5E9, 0xD1B1}, //11839 #HANGUL SYLLABLE THIEUTH O PIEUP + {0xC5EA, 0xD1B3}, //11840 #HANGUL SYLLABLE THIEUTH O SIOS + {0xC5EB, 0xD1B5}, //11841 #HANGUL SYLLABLE THIEUTH O IEUNG + {0xC5EC, 0xD1BA}, //11842 #HANGUL SYLLABLE THIEUTH O PHIEUPH + {0xC5ED, 0xD1BC}, //11843 #HANGUL SYLLABLE THIEUTH WA + {0xC5EE, 0xD1C0}, //11844 #HANGUL SYLLABLE THIEUTH WA NIEUN + {0xC5EF, 0xD1D8}, //11845 #HANGUL SYLLABLE THIEUTH WAE + {0xC5F0, 0xD1F4}, //11846 #HANGUL SYLLABLE THIEUTH OE + {0xC5F1, 0xD1F8}, //11847 #HANGUL SYLLABLE THIEUTH OE NIEUN + {0xC5F2, 0xD207}, //11848 #HANGUL SYLLABLE THIEUTH OE SIOS + {0xC5F3, 0xD209}, //11849 #HANGUL SYLLABLE THIEUTH OE IEUNG + {0xC5F4, 0xD210}, //11850 #HANGUL SYLLABLE THIEUTH YO + {0xC5F5, 0xD22C}, //11851 #HANGUL SYLLABLE THIEUTH U + {0xC5F6, 0xD22D}, //11852 #HANGUL SYLLABLE THIEUTH U KIYEOK + {0xC5F7, 0xD230}, //11853 #HANGUL SYLLABLE THIEUTH U NIEUN + {0xC5F8, 0xD234}, //11854 #HANGUL SYLLABLE THIEUTH U RIEUL + {0xC5F9, 0xD23C}, //11855 #HANGUL SYLLABLE THIEUTH U MIEUM + {0xC5FA, 0xD23D}, //11856 #HANGUL SYLLABLE THIEUTH U PIEUP + {0xC5FB, 0xD23F}, //11857 #HANGUL SYLLABLE THIEUTH U SIOS + {0xC5FC, 0xD241}, //11858 #HANGUL SYLLABLE THIEUTH U IEUNG + {0xC5FD, 0xD248}, //11859 #HANGUL SYLLABLE THIEUTH WEO + {0xC5FE, 0xD25C}, //11860 #HANGUL SYLLABLE THIEUTH WEO SSANGSIOS + {0xC641, 0xD78D}, //11861 #HANGUL SYLLABLE HIEUH I NIEUNCIEUC + {0xC642, 0xD78E}, //11862 #HANGUL SYLLABLE HIEUH I NIEUNHIEUH + {0xC643, 0xD78F}, //11863 #HANGUL SYLLABLE HIEUH I TIKEUT + {0xC644, 0xD791}, //11864 #HANGUL SYLLABLE HIEUH I RIEULKIYEOK + {0xC645, 0xD792}, //11865 #HANGUL SYLLABLE HIEUH I RIEULMIEUM + {0xC646, 0xD793}, //11866 #HANGUL SYLLABLE HIEUH I RIEULPIEUP + {0xC647, 0xD794}, //11867 #HANGUL SYLLABLE HIEUH I RIEULSIOS + {0xC648, 0xD795}, //11868 #HANGUL SYLLABLE HIEUH I RIEULTHIEUTH + {0xC649, 0xD796}, //11869 #HANGUL SYLLABLE HIEUH I RIEULPHIEUPH + {0xC64A, 0xD797}, //11870 #HANGUL SYLLABLE HIEUH I RIEULHIEUH + {0xC64B, 0xD79A}, //11871 #HANGUL SYLLABLE HIEUH I PIEUPSIOS + {0xC64C, 0xD79C}, //11872 #HANGUL SYLLABLE HIEUH I SSANGSIOS + {0xC64D, 0xD79E}, //11873 #HANGUL SYLLABLE HIEUH I CIEUC + {0xC64E, 0xD79F}, //11874 #HANGUL SYLLABLE HIEUH I CHIEUCH + {0xC64F, 0xD7A0}, //11875 #HANGUL SYLLABLE HIEUH I KHIEUKH + {0xC650, 0xD7A1}, //11876 #HANGUL SYLLABLE HIEUH I THIEUTH + {0xC651, 0xD7A2}, //11877 #HANGUL SYLLABLE HIEUH I PHIEUPH + {0xC652, 0xD7A3}, //11878 #HANGUL SYLLABLE HIEUH I HIEUH + {0xC6A1, 0xD264}, //11879 #HANGUL SYLLABLE THIEUTH WE + {0xC6A2, 0xD280}, //11880 #HANGUL SYLLABLE THIEUTH WI + {0xC6A3, 0xD281}, //11881 #HANGUL SYLLABLE THIEUTH WI KIYEOK + {0xC6A4, 0xD284}, //11882 #HANGUL SYLLABLE THIEUTH WI NIEUN + {0xC6A5, 0xD288}, //11883 #HANGUL SYLLABLE THIEUTH WI RIEUL + {0xC6A6, 0xD290}, //11884 #HANGUL SYLLABLE THIEUTH WI MIEUM + {0xC6A7, 0xD291}, //11885 #HANGUL SYLLABLE THIEUTH WI PIEUP + {0xC6A8, 0xD295}, //11886 #HANGUL SYLLABLE THIEUTH WI IEUNG + {0xC6A9, 0xD29C}, //11887 #HANGUL SYLLABLE THIEUTH YU + {0xC6AA, 0xD2A0}, //11888 #HANGUL SYLLABLE THIEUTH YU NIEUN + {0xC6AB, 0xD2A4}, //11889 #HANGUL SYLLABLE THIEUTH YU RIEUL + {0xC6AC, 0xD2AC}, //11890 #HANGUL SYLLABLE THIEUTH YU MIEUM + {0xC6AD, 0xD2B1}, //11891 #HANGUL SYLLABLE THIEUTH YU IEUNG + {0xC6AE, 0xD2B8}, //11892 #HANGUL SYLLABLE THIEUTH EU + {0xC6AF, 0xD2B9}, //11893 #HANGUL SYLLABLE THIEUTH EU KIYEOK + {0xC6B0, 0xD2BC}, //11894 #HANGUL SYLLABLE THIEUTH EU NIEUN + {0xC6B1, 0xD2BF}, //11895 #HANGUL SYLLABLE THIEUTH EU TIKEUT + {0xC6B2, 0xD2C0}, //11896 #HANGUL SYLLABLE THIEUTH EU RIEUL + {0xC6B3, 0xD2C2}, //11897 #HANGUL SYLLABLE THIEUTH EU RIEULMIEUM + {0xC6B4, 0xD2C8}, //11898 #HANGUL SYLLABLE THIEUTH EU MIEUM + {0xC6B5, 0xD2C9}, //11899 #HANGUL SYLLABLE THIEUTH EU PIEUP + {0xC6B6, 0xD2CB}, //11900 #HANGUL SYLLABLE THIEUTH EU SIOS + {0xC6B7, 0xD2D4}, //11901 #HANGUL SYLLABLE THIEUTH YI + {0xC6B8, 0xD2D8}, //11902 #HANGUL SYLLABLE THIEUTH YI NIEUN + {0xC6B9, 0xD2DC}, //11903 #HANGUL SYLLABLE THIEUTH YI RIEUL + {0xC6BA, 0xD2E4}, //11904 #HANGUL SYLLABLE THIEUTH YI MIEUM + {0xC6BB, 0xD2E5}, //11905 #HANGUL SYLLABLE THIEUTH YI PIEUP + {0xC6BC, 0xD2F0}, //11906 #HANGUL SYLLABLE THIEUTH I + {0xC6BD, 0xD2F1}, //11907 #HANGUL SYLLABLE THIEUTH I KIYEOK + {0xC6BE, 0xD2F4}, //11908 #HANGUL SYLLABLE THIEUTH I NIEUN + {0xC6BF, 0xD2F8}, //11909 #HANGUL SYLLABLE THIEUTH I RIEUL + {0xC6C0, 0xD300}, //11910 #HANGUL SYLLABLE THIEUTH I MIEUM + {0xC6C1, 0xD301}, //11911 #HANGUL SYLLABLE THIEUTH I PIEUP + {0xC6C2, 0xD303}, //11912 #HANGUL SYLLABLE THIEUTH I SIOS + {0xC6C3, 0xD305}, //11913 #HANGUL SYLLABLE THIEUTH I IEUNG + {0xC6C4, 0xD30C}, //11914 #HANGUL SYLLABLE PHIEUPH A + {0xC6C5, 0xD30D}, //11915 #HANGUL SYLLABLE PHIEUPH A KIYEOK + {0xC6C6, 0xD30E}, //11916 #HANGUL SYLLABLE PHIEUPH A SSANGKIYEOK + {0xC6C7, 0xD310}, //11917 #HANGUL SYLLABLE PHIEUPH A NIEUN + {0xC6C8, 0xD314}, //11918 #HANGUL SYLLABLE PHIEUPH A RIEUL + {0xC6C9, 0xD316}, //11919 #HANGUL SYLLABLE PHIEUPH A RIEULMIEUM + {0xC6CA, 0xD31C}, //11920 #HANGUL SYLLABLE PHIEUPH A MIEUM + {0xC6CB, 0xD31D}, //11921 #HANGUL SYLLABLE PHIEUPH A PIEUP + {0xC6CC, 0xD31F}, //11922 #HANGUL SYLLABLE PHIEUPH A SIOS + {0xC6CD, 0xD320}, //11923 #HANGUL SYLLABLE PHIEUPH A SSANGSIOS + {0xC6CE, 0xD321}, //11924 #HANGUL SYLLABLE PHIEUPH A IEUNG + {0xC6CF, 0xD325}, //11925 #HANGUL SYLLABLE PHIEUPH A THIEUTH + {0xC6D0, 0xD328}, //11926 #HANGUL SYLLABLE PHIEUPH AE + {0xC6D1, 0xD329}, //11927 #HANGUL SYLLABLE PHIEUPH AE KIYEOK + {0xC6D2, 0xD32C}, //11928 #HANGUL SYLLABLE PHIEUPH AE NIEUN + {0xC6D3, 0xD330}, //11929 #HANGUL SYLLABLE PHIEUPH AE RIEUL + {0xC6D4, 0xD338}, //11930 #HANGUL SYLLABLE PHIEUPH AE MIEUM + {0xC6D5, 0xD339}, //11931 #HANGUL SYLLABLE PHIEUPH AE PIEUP + {0xC6D6, 0xD33B}, //11932 #HANGUL SYLLABLE PHIEUPH AE SIOS + {0xC6D7, 0xD33C}, //11933 #HANGUL SYLLABLE PHIEUPH AE SSANGSIOS + {0xC6D8, 0xD33D}, //11934 #HANGUL SYLLABLE PHIEUPH AE IEUNG + {0xC6D9, 0xD344}, //11935 #HANGUL SYLLABLE PHIEUPH YA + {0xC6DA, 0xD345}, //11936 #HANGUL SYLLABLE PHIEUPH YA KIYEOK + {0xC6DB, 0xD37C}, //11937 #HANGUL SYLLABLE PHIEUPH EO + {0xC6DC, 0xD37D}, //11938 #HANGUL SYLLABLE PHIEUPH EO KIYEOK + {0xC6DD, 0xD380}, //11939 #HANGUL SYLLABLE PHIEUPH EO NIEUN + {0xC6DE, 0xD384}, //11940 #HANGUL SYLLABLE PHIEUPH EO RIEUL + {0xC6DF, 0xD38C}, //11941 #HANGUL SYLLABLE PHIEUPH EO MIEUM + {0xC6E0, 0xD38D}, //11942 #HANGUL SYLLABLE PHIEUPH EO PIEUP + {0xC6E1, 0xD38F}, //11943 #HANGUL SYLLABLE PHIEUPH EO SIOS + {0xC6E2, 0xD390}, //11944 #HANGUL SYLLABLE PHIEUPH EO SSANGSIOS + {0xC6E3, 0xD391}, //11945 #HANGUL SYLLABLE PHIEUPH EO IEUNG + {0xC6E4, 0xD398}, //11946 #HANGUL SYLLABLE PHIEUPH E + {0xC6E5, 0xD399}, //11947 #HANGUL SYLLABLE PHIEUPH E KIYEOK + {0xC6E6, 0xD39C}, //11948 #HANGUL SYLLABLE PHIEUPH E NIEUN + {0xC6E7, 0xD3A0}, //11949 #HANGUL SYLLABLE PHIEUPH E RIEUL + {0xC6E8, 0xD3A8}, //11950 #HANGUL SYLLABLE PHIEUPH E MIEUM + {0xC6E9, 0xD3A9}, //11951 #HANGUL SYLLABLE PHIEUPH E PIEUP + {0xC6EA, 0xD3AB}, //11952 #HANGUL SYLLABLE PHIEUPH E SIOS + {0xC6EB, 0xD3AD}, //11953 #HANGUL SYLLABLE PHIEUPH E IEUNG + {0xC6EC, 0xD3B4}, //11954 #HANGUL SYLLABLE PHIEUPH YEO + {0xC6ED, 0xD3B8}, //11955 #HANGUL SYLLABLE PHIEUPH YEO NIEUN + {0xC6EE, 0xD3BC}, //11956 #HANGUL SYLLABLE PHIEUPH YEO RIEUL + {0xC6EF, 0xD3C4}, //11957 #HANGUL SYLLABLE PHIEUPH YEO MIEUM + {0xC6F0, 0xD3C5}, //11958 #HANGUL SYLLABLE PHIEUPH YEO PIEUP + {0xC6F1, 0xD3C8}, //11959 #HANGUL SYLLABLE PHIEUPH YEO SSANGSIOS + {0xC6F2, 0xD3C9}, //11960 #HANGUL SYLLABLE PHIEUPH YEO IEUNG + {0xC6F3, 0xD3D0}, //11961 #HANGUL SYLLABLE PHIEUPH YE + {0xC6F4, 0xD3D8}, //11962 #HANGUL SYLLABLE PHIEUPH YE RIEUL + {0xC6F5, 0xD3E1}, //11963 #HANGUL SYLLABLE PHIEUPH YE PIEUP + {0xC6F6, 0xD3E3}, //11964 #HANGUL SYLLABLE PHIEUPH YE SIOS + {0xC6F7, 0xD3EC}, //11965 #HANGUL SYLLABLE PHIEUPH O + {0xC6F8, 0xD3ED}, //11966 #HANGUL SYLLABLE PHIEUPH O KIYEOK + {0xC6F9, 0xD3F0}, //11967 #HANGUL SYLLABLE PHIEUPH O NIEUN + {0xC6FA, 0xD3F4}, //11968 #HANGUL SYLLABLE PHIEUPH O RIEUL + {0xC6FB, 0xD3FC}, //11969 #HANGUL SYLLABLE PHIEUPH O MIEUM + {0xC6FC, 0xD3FD}, //11970 #HANGUL SYLLABLE PHIEUPH O PIEUP + {0xC6FD, 0xD3FF}, //11971 #HANGUL SYLLABLE PHIEUPH O SIOS + {0xC6FE, 0xD401}, //11972 #HANGUL SYLLABLE PHIEUPH O IEUNG + {0xC7A1, 0xD408}, //11973 #HANGUL SYLLABLE PHIEUPH WA + {0xC7A2, 0xD41D}, //11974 #HANGUL SYLLABLE PHIEUPH WA IEUNG + {0xC7A3, 0xD440}, //11975 #HANGUL SYLLABLE PHIEUPH OE + {0xC7A4, 0xD444}, //11976 #HANGUL SYLLABLE PHIEUPH OE NIEUN + {0xC7A5, 0xD45C}, //11977 #HANGUL SYLLABLE PHIEUPH YO + {0xC7A6, 0xD460}, //11978 #HANGUL SYLLABLE PHIEUPH YO NIEUN + {0xC7A7, 0xD464}, //11979 #HANGUL SYLLABLE PHIEUPH YO RIEUL + {0xC7A8, 0xD46D}, //11980 #HANGUL SYLLABLE PHIEUPH YO PIEUP + {0xC7A9, 0xD46F}, //11981 #HANGUL SYLLABLE PHIEUPH YO SIOS + {0xC7AA, 0xD478}, //11982 #HANGUL SYLLABLE PHIEUPH U + {0xC7AB, 0xD479}, //11983 #HANGUL SYLLABLE PHIEUPH U KIYEOK + {0xC7AC, 0xD47C}, //11984 #HANGUL SYLLABLE PHIEUPH U NIEUN + {0xC7AD, 0xD47F}, //11985 #HANGUL SYLLABLE PHIEUPH U TIKEUT + {0xC7AE, 0xD480}, //11986 #HANGUL SYLLABLE PHIEUPH U RIEUL + {0xC7AF, 0xD482}, //11987 #HANGUL SYLLABLE PHIEUPH U RIEULMIEUM + {0xC7B0, 0xD488}, //11988 #HANGUL SYLLABLE PHIEUPH U MIEUM + {0xC7B1, 0xD489}, //11989 #HANGUL SYLLABLE PHIEUPH U PIEUP + {0xC7B2, 0xD48B}, //11990 #HANGUL SYLLABLE PHIEUPH U SIOS + {0xC7B3, 0xD48D}, //11991 #HANGUL SYLLABLE PHIEUPH U IEUNG + {0xC7B4, 0xD494}, //11992 #HANGUL SYLLABLE PHIEUPH WEO + {0xC7B5, 0xD4A9}, //11993 #HANGUL SYLLABLE PHIEUPH WEO IEUNG + {0xC7B6, 0xD4CC}, //11994 #HANGUL SYLLABLE PHIEUPH WI + {0xC7B7, 0xD4D0}, //11995 #HANGUL SYLLABLE PHIEUPH WI NIEUN + {0xC7B8, 0xD4D4}, //11996 #HANGUL SYLLABLE PHIEUPH WI RIEUL + {0xC7B9, 0xD4DC}, //11997 #HANGUL SYLLABLE PHIEUPH WI MIEUM + {0xC7BA, 0xD4DF}, //11998 #HANGUL SYLLABLE PHIEUPH WI SIOS + {0xC7BB, 0xD4E8}, //11999 #HANGUL SYLLABLE PHIEUPH YU + {0xC7BC, 0xD4EC}, //12000 #HANGUL SYLLABLE PHIEUPH YU NIEUN + {0xC7BD, 0xD4F0}, //12001 #HANGUL SYLLABLE PHIEUPH YU RIEUL + {0xC7BE, 0xD4F8}, //12002 #HANGUL SYLLABLE PHIEUPH YU MIEUM + {0xC7BF, 0xD4FB}, //12003 #HANGUL SYLLABLE PHIEUPH YU SIOS + {0xC7C0, 0xD4FD}, //12004 #HANGUL SYLLABLE PHIEUPH YU IEUNG + {0xC7C1, 0xD504}, //12005 #HANGUL SYLLABLE PHIEUPH EU + {0xC7C2, 0xD508}, //12006 #HANGUL SYLLABLE PHIEUPH EU NIEUN + {0xC7C3, 0xD50C}, //12007 #HANGUL SYLLABLE PHIEUPH EU RIEUL + {0xC7C4, 0xD514}, //12008 #HANGUL SYLLABLE PHIEUPH EU MIEUM + {0xC7C5, 0xD515}, //12009 #HANGUL SYLLABLE PHIEUPH EU PIEUP + {0xC7C6, 0xD517}, //12010 #HANGUL SYLLABLE PHIEUPH EU SIOS + {0xC7C7, 0xD53C}, //12011 #HANGUL SYLLABLE PHIEUPH I + {0xC7C8, 0xD53D}, //12012 #HANGUL SYLLABLE PHIEUPH I KIYEOK + {0xC7C9, 0xD540}, //12013 #HANGUL SYLLABLE PHIEUPH I NIEUN + {0xC7CA, 0xD544}, //12014 #HANGUL SYLLABLE PHIEUPH I RIEUL + {0xC7CB, 0xD54C}, //12015 #HANGUL SYLLABLE PHIEUPH I MIEUM + {0xC7CC, 0xD54D}, //12016 #HANGUL SYLLABLE PHIEUPH I PIEUP + {0xC7CD, 0xD54F}, //12017 #HANGUL SYLLABLE PHIEUPH I SIOS + {0xC7CE, 0xD551}, //12018 #HANGUL SYLLABLE PHIEUPH I IEUNG + {0xC7CF, 0xD558}, //12019 #HANGUL SYLLABLE HIEUH A + {0xC7D0, 0xD559}, //12020 #HANGUL SYLLABLE HIEUH A KIYEOK + {0xC7D1, 0xD55C}, //12021 #HANGUL SYLLABLE HIEUH A NIEUN + {0xC7D2, 0xD560}, //12022 #HANGUL SYLLABLE HIEUH A RIEUL + {0xC7D3, 0xD565}, //12023 #HANGUL SYLLABLE HIEUH A RIEULTHIEUTH + {0xC7D4, 0xD568}, //12024 #HANGUL SYLLABLE HIEUH A MIEUM + {0xC7D5, 0xD569}, //12025 #HANGUL SYLLABLE HIEUH A PIEUP + {0xC7D6, 0xD56B}, //12026 #HANGUL SYLLABLE HIEUH A SIOS + {0xC7D7, 0xD56D}, //12027 #HANGUL SYLLABLE HIEUH A IEUNG + {0xC7D8, 0xD574}, //12028 #HANGUL SYLLABLE HIEUH AE + {0xC7D9, 0xD575}, //12029 #HANGUL SYLLABLE HIEUH AE KIYEOK + {0xC7DA, 0xD578}, //12030 #HANGUL SYLLABLE HIEUH AE NIEUN + {0xC7DB, 0xD57C}, //12031 #HANGUL SYLLABLE HIEUH AE RIEUL + {0xC7DC, 0xD584}, //12032 #HANGUL SYLLABLE HIEUH AE MIEUM + {0xC7DD, 0xD585}, //12033 #HANGUL SYLLABLE HIEUH AE PIEUP + {0xC7DE, 0xD587}, //12034 #HANGUL SYLLABLE HIEUH AE SIOS + {0xC7DF, 0xD588}, //12035 #HANGUL SYLLABLE HIEUH AE SSANGSIOS + {0xC7E0, 0xD589}, //12036 #HANGUL SYLLABLE HIEUH AE IEUNG + {0xC7E1, 0xD590}, //12037 #HANGUL SYLLABLE HIEUH YA + {0xC7E2, 0xD5A5}, //12038 #HANGUL SYLLABLE HIEUH YA IEUNG + {0xC7E3, 0xD5C8}, //12039 #HANGUL SYLLABLE HIEUH EO + {0xC7E4, 0xD5C9}, //12040 #HANGUL SYLLABLE HIEUH EO KIYEOK + {0xC7E5, 0xD5CC}, //12041 #HANGUL SYLLABLE HIEUH EO NIEUN + {0xC7E6, 0xD5D0}, //12042 #HANGUL SYLLABLE HIEUH EO RIEUL + {0xC7E7, 0xD5D2}, //12043 #HANGUL SYLLABLE HIEUH EO RIEULMIEUM + {0xC7E8, 0xD5D8}, //12044 #HANGUL SYLLABLE HIEUH EO MIEUM + {0xC7E9, 0xD5D9}, //12045 #HANGUL SYLLABLE HIEUH EO PIEUP + {0xC7EA, 0xD5DB}, //12046 #HANGUL SYLLABLE HIEUH EO SIOS + {0xC7EB, 0xD5DD}, //12047 #HANGUL SYLLABLE HIEUH EO IEUNG + {0xC7EC, 0xD5E4}, //12048 #HANGUL SYLLABLE HIEUH E + {0xC7ED, 0xD5E5}, //12049 #HANGUL SYLLABLE HIEUH E KIYEOK + {0xC7EE, 0xD5E8}, //12050 #HANGUL SYLLABLE HIEUH E NIEUN + {0xC7EF, 0xD5EC}, //12051 #HANGUL SYLLABLE HIEUH E RIEUL + {0xC7F0, 0xD5F4}, //12052 #HANGUL SYLLABLE HIEUH E MIEUM + {0xC7F1, 0xD5F5}, //12053 #HANGUL SYLLABLE HIEUH E PIEUP + {0xC7F2, 0xD5F7}, //12054 #HANGUL SYLLABLE HIEUH E SIOS + {0xC7F3, 0xD5F9}, //12055 #HANGUL SYLLABLE HIEUH E IEUNG + {0xC7F4, 0xD600}, //12056 #HANGUL SYLLABLE HIEUH YEO + {0xC7F5, 0xD601}, //12057 #HANGUL SYLLABLE HIEUH YEO KIYEOK + {0xC7F6, 0xD604}, //12058 #HANGUL SYLLABLE HIEUH YEO NIEUN + {0xC7F7, 0xD608}, //12059 #HANGUL SYLLABLE HIEUH YEO RIEUL + {0xC7F8, 0xD610}, //12060 #HANGUL SYLLABLE HIEUH YEO MIEUM + {0xC7F9, 0xD611}, //12061 #HANGUL SYLLABLE HIEUH YEO PIEUP + {0xC7FA, 0xD613}, //12062 #HANGUL SYLLABLE HIEUH YEO SIOS + {0xC7FB, 0xD614}, //12063 #HANGUL SYLLABLE HIEUH YEO SSANGSIOS + {0xC7FC, 0xD615}, //12064 #HANGUL SYLLABLE HIEUH YEO IEUNG + {0xC7FD, 0xD61C}, //12065 #HANGUL SYLLABLE HIEUH YE + {0xC7FE, 0xD620}, //12066 #HANGUL SYLLABLE HIEUH YE NIEUN + {0xC8A1, 0xD624}, //12067 #HANGUL SYLLABLE HIEUH YE RIEUL + {0xC8A2, 0xD62D}, //12068 #HANGUL SYLLABLE HIEUH YE PIEUP + {0xC8A3, 0xD638}, //12069 #HANGUL SYLLABLE HIEUH O + {0xC8A4, 0xD639}, //12070 #HANGUL SYLLABLE HIEUH O KIYEOK + {0xC8A5, 0xD63C}, //12071 #HANGUL SYLLABLE HIEUH O NIEUN + {0xC8A6, 0xD640}, //12072 #HANGUL SYLLABLE HIEUH O RIEUL + {0xC8A7, 0xD645}, //12073 #HANGUL SYLLABLE HIEUH O RIEULTHIEUTH + {0xC8A8, 0xD648}, //12074 #HANGUL SYLLABLE HIEUH O MIEUM + {0xC8A9, 0xD649}, //12075 #HANGUL SYLLABLE HIEUH O PIEUP + {0xC8AA, 0xD64B}, //12076 #HANGUL SYLLABLE HIEUH O SIOS + {0xC8AB, 0xD64D}, //12077 #HANGUL SYLLABLE HIEUH O IEUNG + {0xC8AC, 0xD651}, //12078 #HANGUL SYLLABLE HIEUH O THIEUTH + {0xC8AD, 0xD654}, //12079 #HANGUL SYLLABLE HIEUH WA + {0xC8AE, 0xD655}, //12080 #HANGUL SYLLABLE HIEUH WA KIYEOK + {0xC8AF, 0xD658}, //12081 #HANGUL SYLLABLE HIEUH WA NIEUN + {0xC8B0, 0xD65C}, //12082 #HANGUL SYLLABLE HIEUH WA RIEUL + {0xC8B1, 0xD667}, //12083 #HANGUL SYLLABLE HIEUH WA SIOS + {0xC8B2, 0xD669}, //12084 #HANGUL SYLLABLE HIEUH WA IEUNG + {0xC8B3, 0xD670}, //12085 #HANGUL SYLLABLE HIEUH WAE + {0xC8B4, 0xD671}, //12086 #HANGUL SYLLABLE HIEUH WAE KIYEOK + {0xC8B5, 0xD674}, //12087 #HANGUL SYLLABLE HIEUH WAE NIEUN + {0xC8B6, 0xD683}, //12088 #HANGUL SYLLABLE HIEUH WAE SIOS + {0xC8B7, 0xD685}, //12089 #HANGUL SYLLABLE HIEUH WAE IEUNG + {0xC8B8, 0xD68C}, //12090 #HANGUL SYLLABLE HIEUH OE + {0xC8B9, 0xD68D}, //12091 #HANGUL SYLLABLE HIEUH OE KIYEOK + {0xC8BA, 0xD690}, //12092 #HANGUL SYLLABLE HIEUH OE NIEUN + {0xC8BB, 0xD694}, //12093 #HANGUL SYLLABLE HIEUH OE RIEUL + {0xC8BC, 0xD69D}, //12094 #HANGUL SYLLABLE HIEUH OE PIEUP + {0xC8BD, 0xD69F}, //12095 #HANGUL SYLLABLE HIEUH OE SIOS + {0xC8BE, 0xD6A1}, //12096 #HANGUL SYLLABLE HIEUH OE IEUNG + {0xC8BF, 0xD6A8}, //12097 #HANGUL SYLLABLE HIEUH YO + {0xC8C0, 0xD6AC}, //12098 #HANGUL SYLLABLE HIEUH YO NIEUN + {0xC8C1, 0xD6B0}, //12099 #HANGUL SYLLABLE HIEUH YO RIEUL + {0xC8C2, 0xD6B9}, //12100 #HANGUL SYLLABLE HIEUH YO PIEUP + {0xC8C3, 0xD6BB}, //12101 #HANGUL SYLLABLE HIEUH YO SIOS + {0xC8C4, 0xD6C4}, //12102 #HANGUL SYLLABLE HIEUH U + {0xC8C5, 0xD6C5}, //12103 #HANGUL SYLLABLE HIEUH U KIYEOK + {0xC8C6, 0xD6C8}, //12104 #HANGUL SYLLABLE HIEUH U NIEUN + {0xC8C7, 0xD6CC}, //12105 #HANGUL SYLLABLE HIEUH U RIEUL + {0xC8C8, 0xD6D1}, //12106 #HANGUL SYLLABLE HIEUH U RIEULTHIEUTH + {0xC8C9, 0xD6D4}, //12107 #HANGUL SYLLABLE HIEUH U MIEUM + {0xC8CA, 0xD6D7}, //12108 #HANGUL SYLLABLE HIEUH U SIOS + {0xC8CB, 0xD6D9}, //12109 #HANGUL SYLLABLE HIEUH U IEUNG + {0xC8CC, 0xD6E0}, //12110 #HANGUL SYLLABLE HIEUH WEO + {0xC8CD, 0xD6E4}, //12111 #HANGUL SYLLABLE HIEUH WEO NIEUN + {0xC8CE, 0xD6E8}, //12112 #HANGUL SYLLABLE HIEUH WEO RIEUL + {0xC8CF, 0xD6F0}, //12113 #HANGUL SYLLABLE HIEUH WEO MIEUM + {0xC8D0, 0xD6F5}, //12114 #HANGUL SYLLABLE HIEUH WEO IEUNG + {0xC8D1, 0xD6FC}, //12115 #HANGUL SYLLABLE HIEUH WE + {0xC8D2, 0xD6FD}, //12116 #HANGUL SYLLABLE HIEUH WE KIYEOK + {0xC8D3, 0xD700}, //12117 #HANGUL SYLLABLE HIEUH WE NIEUN + {0xC8D4, 0xD704}, //12118 #HANGUL SYLLABLE HIEUH WE RIEUL + {0xC8D5, 0xD711}, //12119 #HANGUL SYLLABLE HIEUH WE IEUNG + {0xC8D6, 0xD718}, //12120 #HANGUL SYLLABLE HIEUH WI + {0xC8D7, 0xD719}, //12121 #HANGUL SYLLABLE HIEUH WI KIYEOK + {0xC8D8, 0xD71C}, //12122 #HANGUL SYLLABLE HIEUH WI NIEUN + {0xC8D9, 0xD720}, //12123 #HANGUL SYLLABLE HIEUH WI RIEUL + {0xC8DA, 0xD728}, //12124 #HANGUL SYLLABLE HIEUH WI MIEUM + {0xC8DB, 0xD729}, //12125 #HANGUL SYLLABLE HIEUH WI PIEUP + {0xC8DC, 0xD72B}, //12126 #HANGUL SYLLABLE HIEUH WI SIOS + {0xC8DD, 0xD72D}, //12127 #HANGUL SYLLABLE HIEUH WI IEUNG + {0xC8DE, 0xD734}, //12128 #HANGUL SYLLABLE HIEUH YU + {0xC8DF, 0xD735}, //12129 #HANGUL SYLLABLE HIEUH YU KIYEOK + {0xC8E0, 0xD738}, //12130 #HANGUL SYLLABLE HIEUH YU NIEUN + {0xC8E1, 0xD73C}, //12131 #HANGUL SYLLABLE HIEUH YU RIEUL + {0xC8E2, 0xD744}, //12132 #HANGUL SYLLABLE HIEUH YU MIEUM + {0xC8E3, 0xD747}, //12133 #HANGUL SYLLABLE HIEUH YU SIOS + {0xC8E4, 0xD749}, //12134 #HANGUL SYLLABLE HIEUH YU IEUNG + {0xC8E5, 0xD750}, //12135 #HANGUL SYLLABLE HIEUH EU + {0xC8E6, 0xD751}, //12136 #HANGUL SYLLABLE HIEUH EU KIYEOK + {0xC8E7, 0xD754}, //12137 #HANGUL SYLLABLE HIEUH EU NIEUN + {0xC8E8, 0xD756}, //12138 #HANGUL SYLLABLE HIEUH EU NIEUNHIEUH + {0xC8E9, 0xD757}, //12139 #HANGUL SYLLABLE HIEUH EU TIKEUT + {0xC8EA, 0xD758}, //12140 #HANGUL SYLLABLE HIEUH EU RIEUL + {0xC8EB, 0xD759}, //12141 #HANGUL SYLLABLE HIEUH EU RIEULKIYEOK + {0xC8EC, 0xD760}, //12142 #HANGUL SYLLABLE HIEUH EU MIEUM + {0xC8ED, 0xD761}, //12143 #HANGUL SYLLABLE HIEUH EU PIEUP + {0xC8EE, 0xD763}, //12144 #HANGUL SYLLABLE HIEUH EU SIOS + {0xC8EF, 0xD765}, //12145 #HANGUL SYLLABLE HIEUH EU IEUNG + {0xC8F0, 0xD769}, //12146 #HANGUL SYLLABLE HIEUH EU THIEUTH + {0xC8F1, 0xD76C}, //12147 #HANGUL SYLLABLE HIEUH YI + {0xC8F2, 0xD770}, //12148 #HANGUL SYLLABLE HIEUH YI NIEUN + {0xC8F3, 0xD774}, //12149 #HANGUL SYLLABLE HIEUH YI RIEUL + {0xC8F4, 0xD77C}, //12150 #HANGUL SYLLABLE HIEUH YI MIEUM + {0xC8F5, 0xD77D}, //12151 #HANGUL SYLLABLE HIEUH YI PIEUP + {0xC8F6, 0xD781}, //12152 #HANGUL SYLLABLE HIEUH YI IEUNG + {0xC8F7, 0xD788}, //12153 #HANGUL SYLLABLE HIEUH I + {0xC8F8, 0xD789}, //12154 #HANGUL SYLLABLE HIEUH I KIYEOK + {0xC8F9, 0xD78C}, //12155 #HANGUL SYLLABLE HIEUH I NIEUN + {0xC8FA, 0xD790}, //12156 #HANGUL SYLLABLE HIEUH I RIEUL + {0xC8FB, 0xD798}, //12157 #HANGUL SYLLABLE HIEUH I MIEUM + {0xC8FC, 0xD799}, //12158 #HANGUL SYLLABLE HIEUH I PIEUP + {0xC8FD, 0xD79B}, //12159 #HANGUL SYLLABLE HIEUH I SIOS + {0xC8FE, 0xD79D}, //12160 #HANGUL SYLLABLE HIEUH I IEUNG + {0xCAA1, 0x4F3D}, //12161 #CJK UNIFIED IDEOGRAPH + {0xCAA2, 0x4F73}, //12162 #CJK UNIFIED IDEOGRAPH + {0xCAA3, 0x5047}, //12163 #CJK UNIFIED IDEOGRAPH + {0xCAA4, 0x50F9}, //12164 #CJK UNIFIED IDEOGRAPH + {0xCAA5, 0x52A0}, //12165 #CJK UNIFIED IDEOGRAPH + {0xCAA6, 0x53EF}, //12166 #CJK UNIFIED IDEOGRAPH + {0xCAA7, 0x5475}, //12167 #CJK UNIFIED IDEOGRAPH + {0xCAA8, 0x54E5}, //12168 #CJK UNIFIED IDEOGRAPH + {0xCAA9, 0x5609}, //12169 #CJK UNIFIED IDEOGRAPH + {0xCAAA, 0x5AC1}, //12170 #CJK UNIFIED IDEOGRAPH + {0xCAAB, 0x5BB6}, //12171 #CJK UNIFIED IDEOGRAPH + {0xCAAC, 0x6687}, //12172 #CJK UNIFIED IDEOGRAPH + {0xCAAD, 0x67B6}, //12173 #CJK UNIFIED IDEOGRAPH + {0xCAAE, 0x67B7}, //12174 #CJK UNIFIED IDEOGRAPH + {0xCAAF, 0x67EF}, //12175 #CJK UNIFIED IDEOGRAPH + {0xCAB0, 0x6B4C}, //12176 #CJK UNIFIED IDEOGRAPH + {0xCAB1, 0x73C2}, //12177 #CJK UNIFIED IDEOGRAPH + {0xCAB2, 0x75C2}, //12178 #CJK UNIFIED IDEOGRAPH + {0xCAB3, 0x7A3C}, //12179 #CJK UNIFIED IDEOGRAPH + {0xCAB4, 0x82DB}, //12180 #CJK UNIFIED IDEOGRAPH + {0xCAB5, 0x8304}, //12181 #CJK UNIFIED IDEOGRAPH + {0xCAB6, 0x8857}, //12182 #CJK UNIFIED IDEOGRAPH + {0xCAB7, 0x8888}, //12183 #CJK UNIFIED IDEOGRAPH + {0xCAB8, 0x8A36}, //12184 #CJK UNIFIED IDEOGRAPH + {0xCAB9, 0x8CC8}, //12185 #CJK UNIFIED IDEOGRAPH + {0xCABA, 0x8DCF}, //12186 #CJK UNIFIED IDEOGRAPH + {0xCABB, 0x8EFB}, //12187 #CJK UNIFIED IDEOGRAPH + {0xCABC, 0x8FE6}, //12188 #CJK UNIFIED IDEOGRAPH + {0xCABD, 0x99D5}, //12189 #CJK UNIFIED IDEOGRAPH + {0xCABE, 0x523B}, //12190 #CJK UNIFIED IDEOGRAPH + {0xCABF, 0x5374}, //12191 #CJK UNIFIED IDEOGRAPH + {0xCAC0, 0x5404}, //12192 #CJK UNIFIED IDEOGRAPH + {0xCAC1, 0x606A}, //12193 #CJK UNIFIED IDEOGRAPH + {0xCAC2, 0x6164}, //12194 #CJK UNIFIED IDEOGRAPH + {0xCAC3, 0x6BBC}, //12195 #CJK UNIFIED IDEOGRAPH + {0xCAC4, 0x73CF}, //12196 #CJK UNIFIED IDEOGRAPH + {0xCAC5, 0x811A}, //12197 #CJK UNIFIED IDEOGRAPH + {0xCAC6, 0x89BA}, //12198 #CJK UNIFIED IDEOGRAPH + {0xCAC7, 0x89D2}, //12199 #CJK UNIFIED IDEOGRAPH + {0xCAC8, 0x95A3}, //12200 #CJK UNIFIED IDEOGRAPH + {0xCAC9, 0x4F83}, //12201 #CJK UNIFIED IDEOGRAPH + {0xCACA, 0x520A}, //12202 #CJK UNIFIED IDEOGRAPH + {0xCACB, 0x58BE}, //12203 #CJK UNIFIED IDEOGRAPH + {0xCACC, 0x5978}, //12204 #CJK UNIFIED IDEOGRAPH + {0xCACD, 0x59E6}, //12205 #CJK UNIFIED IDEOGRAPH + {0xCACE, 0x5E72}, //12206 #CJK UNIFIED IDEOGRAPH + {0xCACF, 0x5E79}, //12207 #CJK UNIFIED IDEOGRAPH + {0xCAD0, 0x61C7}, //12208 #CJK UNIFIED IDEOGRAPH + {0xCAD1, 0x63C0}, //12209 #CJK UNIFIED IDEOGRAPH + {0xCAD2, 0x6746}, //12210 #CJK UNIFIED IDEOGRAPH + {0xCAD3, 0x67EC}, //12211 #CJK UNIFIED IDEOGRAPH + {0xCAD4, 0x687F}, //12212 #CJK UNIFIED IDEOGRAPH + {0xCAD5, 0x6F97}, //12213 #CJK UNIFIED IDEOGRAPH + {0xCAD6, 0x764E}, //12214 #CJK UNIFIED IDEOGRAPH + {0xCAD7, 0x770B}, //12215 #CJK UNIFIED IDEOGRAPH + {0xCAD8, 0x78F5}, //12216 #CJK UNIFIED IDEOGRAPH + {0xCAD9, 0x7A08}, //12217 #CJK UNIFIED IDEOGRAPH + {0xCADA, 0x7AFF}, //12218 #CJK UNIFIED IDEOGRAPH + {0xCADB, 0x7C21}, //12219 #CJK UNIFIED IDEOGRAPH + {0xCADC, 0x809D}, //12220 #CJK UNIFIED IDEOGRAPH + {0xCADD, 0x826E}, //12221 #CJK UNIFIED IDEOGRAPH + {0xCADE, 0x8271}, //12222 #CJK UNIFIED IDEOGRAPH + {0xCADF, 0x8AEB}, //12223 #CJK UNIFIED IDEOGRAPH + {0xCAE0, 0x9593}, //12224 #CJK UNIFIED IDEOGRAPH + {0xCAE1, 0x4E6B}, //12225 #CJK UNIFIED IDEOGRAPH + {0xCAE2, 0x559D}, //12226 #CJK UNIFIED IDEOGRAPH + {0xCAE3, 0x66F7}, //12227 #CJK UNIFIED IDEOGRAPH + {0xCAE4, 0x6E34}, //12228 #CJK UNIFIED IDEOGRAPH + {0xCAE5, 0x78A3}, //12229 #CJK UNIFIED IDEOGRAPH + {0xCAE6, 0x7AED}, //12230 #CJK UNIFIED IDEOGRAPH + {0xCAE7, 0x845B}, //12231 #CJK UNIFIED IDEOGRAPH + {0xCAE8, 0x8910}, //12232 #CJK UNIFIED IDEOGRAPH + {0xCAE9, 0x874E}, //12233 #CJK UNIFIED IDEOGRAPH + {0xCAEA, 0x97A8}, //12234 #CJK UNIFIED IDEOGRAPH + {0xCAEB, 0x52D8}, //12235 #CJK UNIFIED IDEOGRAPH + {0xCAEC, 0x574E}, //12236 #CJK UNIFIED IDEOGRAPH + {0xCAED, 0x582A}, //12237 #CJK UNIFIED IDEOGRAPH + {0xCAEE, 0x5D4C}, //12238 #CJK UNIFIED IDEOGRAPH + {0xCAEF, 0x611F}, //12239 #CJK UNIFIED IDEOGRAPH + {0xCAF0, 0x61BE}, //12240 #CJK UNIFIED IDEOGRAPH + {0xCAF1, 0x6221}, //12241 #CJK UNIFIED IDEOGRAPH + {0xCAF2, 0x6562}, //12242 #CJK UNIFIED IDEOGRAPH + {0xCAF3, 0x67D1}, //12243 #CJK UNIFIED IDEOGRAPH + {0xCAF4, 0x6A44}, //12244 #CJK UNIFIED IDEOGRAPH + {0xCAF5, 0x6E1B}, //12245 #CJK UNIFIED IDEOGRAPH + {0xCAF6, 0x7518}, //12246 #CJK UNIFIED IDEOGRAPH + {0xCAF7, 0x75B3}, //12247 #CJK UNIFIED IDEOGRAPH + {0xCAF8, 0x76E3}, //12248 #CJK UNIFIED IDEOGRAPH + {0xCAF9, 0x77B0}, //12249 #CJK UNIFIED IDEOGRAPH + {0xCAFA, 0x7D3A}, //12250 #CJK UNIFIED IDEOGRAPH + {0xCAFB, 0x90AF}, //12251 #CJK UNIFIED IDEOGRAPH + {0xCAFC, 0x9451}, //12252 #CJK UNIFIED IDEOGRAPH + {0xCAFD, 0x9452}, //12253 #CJK UNIFIED IDEOGRAPH + {0xCAFE, 0x9F95}, //12254 #CJK UNIFIED IDEOGRAPH + {0xCBA1, 0x5323}, //12255 #CJK UNIFIED IDEOGRAPH + {0xCBA2, 0x5CAC}, //12256 #CJK UNIFIED IDEOGRAPH + {0xCBA3, 0x7532}, //12257 #CJK UNIFIED IDEOGRAPH + {0xCBA4, 0x80DB}, //12258 #CJK UNIFIED IDEOGRAPH + {0xCBA5, 0x9240}, //12259 #CJK UNIFIED IDEOGRAPH + {0xCBA6, 0x9598}, //12260 #CJK UNIFIED IDEOGRAPH + {0xCBA7, 0x525B}, //12261 #CJK UNIFIED IDEOGRAPH + {0xCBA8, 0x5808}, //12262 #CJK UNIFIED IDEOGRAPH + {0xCBA9, 0x59DC}, //12263 #CJK UNIFIED IDEOGRAPH + {0xCBAA, 0x5CA1}, //12264 #CJK UNIFIED IDEOGRAPH + {0xCBAB, 0x5D17}, //12265 #CJK UNIFIED IDEOGRAPH + {0xCBAC, 0x5EB7}, //12266 #CJK UNIFIED IDEOGRAPH + {0xCBAD, 0x5F3A}, //12267 #CJK UNIFIED IDEOGRAPH + {0xCBAE, 0x5F4A}, //12268 #CJK UNIFIED IDEOGRAPH + {0xCBAF, 0x6177}, //12269 #CJK UNIFIED IDEOGRAPH + {0xCBB0, 0x6C5F}, //12270 #CJK UNIFIED IDEOGRAPH + {0xCBB1, 0x757A}, //12271 #CJK UNIFIED IDEOGRAPH + {0xCBB2, 0x7586}, //12272 #CJK UNIFIED IDEOGRAPH + {0xCBB3, 0x7CE0}, //12273 #CJK UNIFIED IDEOGRAPH + {0xCBB4, 0x7D73}, //12274 #CJK UNIFIED IDEOGRAPH + {0xCBB5, 0x7DB1}, //12275 #CJK UNIFIED IDEOGRAPH + {0xCBB6, 0x7F8C}, //12276 #CJK UNIFIED IDEOGRAPH + {0xCBB7, 0x8154}, //12277 #CJK UNIFIED IDEOGRAPH + {0xCBB8, 0x8221}, //12278 #CJK UNIFIED IDEOGRAPH + {0xCBB9, 0x8591}, //12279 #CJK UNIFIED IDEOGRAPH + {0xCBBA, 0x8941}, //12280 #CJK UNIFIED IDEOGRAPH + {0xCBBB, 0x8B1B}, //12281 #CJK UNIFIED IDEOGRAPH + {0xCBBC, 0x92FC}, //12282 #CJK UNIFIED IDEOGRAPH + {0xCBBD, 0x964D}, //12283 #CJK UNIFIED IDEOGRAPH + {0xCBBE, 0x9C47}, //12284 #CJK UNIFIED IDEOGRAPH + {0xCBBF, 0x4ECB}, //12285 #CJK UNIFIED IDEOGRAPH + {0xCBC0, 0x4EF7}, //12286 #CJK UNIFIED IDEOGRAPH + {0xCBC1, 0x500B}, //12287 #CJK UNIFIED IDEOGRAPH + {0xCBC2, 0x51F1}, //12288 #CJK UNIFIED IDEOGRAPH + {0xCBC3, 0x584F}, //12289 #CJK UNIFIED IDEOGRAPH + {0xCBC4, 0x6137}, //12290 #CJK UNIFIED IDEOGRAPH + {0xCBC5, 0x613E}, //12291 #CJK UNIFIED IDEOGRAPH + {0xCBC6, 0x6168}, //12292 #CJK UNIFIED IDEOGRAPH + {0xCBC7, 0x6539}, //12293 #CJK UNIFIED IDEOGRAPH + {0xCBC8, 0x69EA}, //12294 #CJK UNIFIED IDEOGRAPH + {0xCBC9, 0x6F11}, //12295 #CJK UNIFIED IDEOGRAPH + {0xCBCA, 0x75A5}, //12296 #CJK UNIFIED IDEOGRAPH + {0xCBCB, 0x7686}, //12297 #CJK UNIFIED IDEOGRAPH + {0xCBCC, 0x76D6}, //12298 #CJK UNIFIED IDEOGRAPH + {0xCBCD, 0x7B87}, //12299 #CJK UNIFIED IDEOGRAPH + {0xCBCE, 0x82A5}, //12300 #CJK UNIFIED IDEOGRAPH + {0xCBCF, 0x84CB}, //12301 #CJK UNIFIED IDEOGRAPH + {0xCBD0, 0xF900}, //12302 #CJK COMPATIBILITY IDEOGRAPH + {0xCBD1, 0x93A7}, //12303 #CJK UNIFIED IDEOGRAPH + {0xCBD2, 0x958B}, //12304 #CJK UNIFIED IDEOGRAPH + {0xCBD3, 0x5580}, //12305 #CJK UNIFIED IDEOGRAPH + {0xCBD4, 0x5BA2}, //12306 #CJK UNIFIED IDEOGRAPH + {0xCBD5, 0x5751}, //12307 #CJK UNIFIED IDEOGRAPH + {0xCBD6, 0xF901}, //12308 #CJK COMPATIBILITY IDEOGRAPH + {0xCBD7, 0x7CB3}, //12309 #CJK UNIFIED IDEOGRAPH + {0xCBD8, 0x7FB9}, //12310 #CJK UNIFIED IDEOGRAPH + {0xCBD9, 0x91B5}, //12311 #CJK UNIFIED IDEOGRAPH + {0xCBDA, 0x5028}, //12312 #CJK UNIFIED IDEOGRAPH + {0xCBDB, 0x53BB}, //12313 #CJK UNIFIED IDEOGRAPH + {0xCBDC, 0x5C45}, //12314 #CJK UNIFIED IDEOGRAPH + {0xCBDD, 0x5DE8}, //12315 #CJK UNIFIED IDEOGRAPH + {0xCBDE, 0x62D2}, //12316 #CJK UNIFIED IDEOGRAPH + {0xCBDF, 0x636E}, //12317 #CJK UNIFIED IDEOGRAPH + {0xCBE0, 0x64DA}, //12318 #CJK UNIFIED IDEOGRAPH + {0xCBE1, 0x64E7}, //12319 #CJK UNIFIED IDEOGRAPH + {0xCBE2, 0x6E20}, //12320 #CJK UNIFIED IDEOGRAPH + {0xCBE3, 0x70AC}, //12321 #CJK UNIFIED IDEOGRAPH + {0xCBE4, 0x795B}, //12322 #CJK UNIFIED IDEOGRAPH + {0xCBE5, 0x8DDD}, //12323 #CJK UNIFIED IDEOGRAPH + {0xCBE6, 0x8E1E}, //12324 #CJK UNIFIED IDEOGRAPH + {0xCBE7, 0xF902}, //12325 #CJK COMPATIBILITY IDEOGRAPH + {0xCBE8, 0x907D}, //12326 #CJK UNIFIED IDEOGRAPH + {0xCBE9, 0x9245}, //12327 #CJK UNIFIED IDEOGRAPH + {0xCBEA, 0x92F8}, //12328 #CJK UNIFIED IDEOGRAPH + {0xCBEB, 0x4E7E}, //12329 #CJK UNIFIED IDEOGRAPH + {0xCBEC, 0x4EF6}, //12330 #CJK UNIFIED IDEOGRAPH + {0xCBED, 0x5065}, //12331 #CJK UNIFIED IDEOGRAPH + {0xCBEE, 0x5DFE}, //12332 #CJK UNIFIED IDEOGRAPH + {0xCBEF, 0x5EFA}, //12333 #CJK UNIFIED IDEOGRAPH + {0xCBF0, 0x6106}, //12334 #CJK UNIFIED IDEOGRAPH + {0xCBF1, 0x6957}, //12335 #CJK UNIFIED IDEOGRAPH + {0xCBF2, 0x8171}, //12336 #CJK UNIFIED IDEOGRAPH + {0xCBF3, 0x8654}, //12337 #CJK UNIFIED IDEOGRAPH + {0xCBF4, 0x8E47}, //12338 #CJK UNIFIED IDEOGRAPH + {0xCBF5, 0x9375}, //12339 #CJK UNIFIED IDEOGRAPH + {0xCBF6, 0x9A2B}, //12340 #CJK UNIFIED IDEOGRAPH + {0xCBF7, 0x4E5E}, //12341 #CJK UNIFIED IDEOGRAPH + {0xCBF8, 0x5091}, //12342 #CJK UNIFIED IDEOGRAPH + {0xCBF9, 0x6770}, //12343 #CJK UNIFIED IDEOGRAPH + {0xCBFA, 0x6840}, //12344 #CJK UNIFIED IDEOGRAPH + {0xCBFB, 0x5109}, //12345 #CJK UNIFIED IDEOGRAPH + {0xCBFC, 0x528D}, //12346 #CJK UNIFIED IDEOGRAPH + {0xCBFD, 0x5292}, //12347 #CJK UNIFIED IDEOGRAPH + {0xCBFE, 0x6AA2}, //12348 #CJK UNIFIED IDEOGRAPH + {0xCCA1, 0x77BC}, //12349 #CJK UNIFIED IDEOGRAPH + {0xCCA2, 0x9210}, //12350 #CJK UNIFIED IDEOGRAPH + {0xCCA3, 0x9ED4}, //12351 #CJK UNIFIED IDEOGRAPH + {0xCCA4, 0x52AB}, //12352 #CJK UNIFIED IDEOGRAPH + {0xCCA5, 0x602F}, //12353 #CJK UNIFIED IDEOGRAPH + {0xCCA6, 0x8FF2}, //12354 #CJK UNIFIED IDEOGRAPH + {0xCCA7, 0x5048}, //12355 #CJK UNIFIED IDEOGRAPH + {0xCCA8, 0x61A9}, //12356 #CJK UNIFIED IDEOGRAPH + {0xCCA9, 0x63ED}, //12357 #CJK UNIFIED IDEOGRAPH + {0xCCAA, 0x64CA}, //12358 #CJK UNIFIED IDEOGRAPH + {0xCCAB, 0x683C}, //12359 #CJK UNIFIED IDEOGRAPH + {0xCCAC, 0x6A84}, //12360 #CJK UNIFIED IDEOGRAPH + {0xCCAD, 0x6FC0}, //12361 #CJK UNIFIED IDEOGRAPH + {0xCCAE, 0x8188}, //12362 #CJK UNIFIED IDEOGRAPH + {0xCCAF, 0x89A1}, //12363 #CJK UNIFIED IDEOGRAPH + {0xCCB0, 0x9694}, //12364 #CJK UNIFIED IDEOGRAPH + {0xCCB1, 0x5805}, //12365 #CJK UNIFIED IDEOGRAPH + {0xCCB2, 0x727D}, //12366 #CJK UNIFIED IDEOGRAPH + {0xCCB3, 0x72AC}, //12367 #CJK UNIFIED IDEOGRAPH + {0xCCB4, 0x7504}, //12368 #CJK UNIFIED IDEOGRAPH + {0xCCB5, 0x7D79}, //12369 #CJK UNIFIED IDEOGRAPH + {0xCCB6, 0x7E6D}, //12370 #CJK UNIFIED IDEOGRAPH + {0xCCB7, 0x80A9}, //12371 #CJK UNIFIED IDEOGRAPH + {0xCCB8, 0x898B}, //12372 #CJK UNIFIED IDEOGRAPH + {0xCCB9, 0x8B74}, //12373 #CJK UNIFIED IDEOGRAPH + {0xCCBA, 0x9063}, //12374 #CJK UNIFIED IDEOGRAPH + {0xCCBB, 0x9D51}, //12375 #CJK UNIFIED IDEOGRAPH + {0xCCBC, 0x6289}, //12376 #CJK UNIFIED IDEOGRAPH + {0xCCBD, 0x6C7A}, //12377 #CJK UNIFIED IDEOGRAPH + {0xCCBE, 0x6F54}, //12378 #CJK UNIFIED IDEOGRAPH + {0xCCBF, 0x7D50}, //12379 #CJK UNIFIED IDEOGRAPH + {0xCCC0, 0x7F3A}, //12380 #CJK UNIFIED IDEOGRAPH + {0xCCC1, 0x8A23}, //12381 #CJK UNIFIED IDEOGRAPH + {0xCCC2, 0x517C}, //12382 #CJK UNIFIED IDEOGRAPH + {0xCCC3, 0x614A}, //12383 #CJK UNIFIED IDEOGRAPH + {0xCCC4, 0x7B9D}, //12384 #CJK UNIFIED IDEOGRAPH + {0xCCC5, 0x8B19}, //12385 #CJK UNIFIED IDEOGRAPH + {0xCCC6, 0x9257}, //12386 #CJK UNIFIED IDEOGRAPH + {0xCCC7, 0x938C}, //12387 #CJK UNIFIED IDEOGRAPH + {0xCCC8, 0x4EAC}, //12388 #CJK UNIFIED IDEOGRAPH + {0xCCC9, 0x4FD3}, //12389 #CJK UNIFIED IDEOGRAPH + {0xCCCA, 0x501E}, //12390 #CJK UNIFIED IDEOGRAPH + {0xCCCB, 0x50BE}, //12391 #CJK UNIFIED IDEOGRAPH + {0xCCCC, 0x5106}, //12392 #CJK UNIFIED IDEOGRAPH + {0xCCCD, 0x52C1}, //12393 #CJK UNIFIED IDEOGRAPH + {0xCCCE, 0x52CD}, //12394 #CJK UNIFIED IDEOGRAPH + {0xCCCF, 0x537F}, //12395 #CJK UNIFIED IDEOGRAPH + {0xCCD0, 0x5770}, //12396 #CJK UNIFIED IDEOGRAPH + {0xCCD1, 0x5883}, //12397 #CJK UNIFIED IDEOGRAPH + {0xCCD2, 0x5E9A}, //12398 #CJK UNIFIED IDEOGRAPH + {0xCCD3, 0x5F91}, //12399 #CJK UNIFIED IDEOGRAPH + {0xCCD4, 0x6176}, //12400 #CJK UNIFIED IDEOGRAPH + {0xCCD5, 0x61AC}, //12401 #CJK UNIFIED IDEOGRAPH + {0xCCD6, 0x64CE}, //12402 #CJK UNIFIED IDEOGRAPH + {0xCCD7, 0x656C}, //12403 #CJK UNIFIED IDEOGRAPH + {0xCCD8, 0x666F}, //12404 #CJK UNIFIED IDEOGRAPH + {0xCCD9, 0x66BB}, //12405 #CJK UNIFIED IDEOGRAPH + {0xCCDA, 0x66F4}, //12406 #CJK UNIFIED IDEOGRAPH + {0xCCDB, 0x6897}, //12407 #CJK UNIFIED IDEOGRAPH + {0xCCDC, 0x6D87}, //12408 #CJK UNIFIED IDEOGRAPH + {0xCCDD, 0x7085}, //12409 #CJK UNIFIED IDEOGRAPH + {0xCCDE, 0x70F1}, //12410 #CJK UNIFIED IDEOGRAPH + {0xCCDF, 0x749F}, //12411 #CJK UNIFIED IDEOGRAPH + {0xCCE0, 0x74A5}, //12412 #CJK UNIFIED IDEOGRAPH + {0xCCE1, 0x74CA}, //12413 #CJK UNIFIED IDEOGRAPH + {0xCCE2, 0x75D9}, //12414 #CJK UNIFIED IDEOGRAPH + {0xCCE3, 0x786C}, //12415 #CJK UNIFIED IDEOGRAPH + {0xCCE4, 0x78EC}, //12416 #CJK UNIFIED IDEOGRAPH + {0xCCE5, 0x7ADF}, //12417 #CJK UNIFIED IDEOGRAPH + {0xCCE6, 0x7AF6}, //12418 #CJK UNIFIED IDEOGRAPH + {0xCCE7, 0x7D45}, //12419 #CJK UNIFIED IDEOGRAPH + {0xCCE8, 0x7D93}, //12420 #CJK UNIFIED IDEOGRAPH + {0xCCE9, 0x8015}, //12421 #CJK UNIFIED IDEOGRAPH + {0xCCEA, 0x803F}, //12422 #CJK UNIFIED IDEOGRAPH + {0xCCEB, 0x811B}, //12423 #CJK UNIFIED IDEOGRAPH + {0xCCEC, 0x8396}, //12424 #CJK UNIFIED IDEOGRAPH + {0xCCED, 0x8B66}, //12425 #CJK UNIFIED IDEOGRAPH + {0xCCEE, 0x8F15}, //12426 #CJK UNIFIED IDEOGRAPH + {0xCCEF, 0x9015}, //12427 #CJK UNIFIED IDEOGRAPH + {0xCCF0, 0x93E1}, //12428 #CJK UNIFIED IDEOGRAPH + {0xCCF1, 0x9803}, //12429 #CJK UNIFIED IDEOGRAPH + {0xCCF2, 0x9838}, //12430 #CJK UNIFIED IDEOGRAPH + {0xCCF3, 0x9A5A}, //12431 #CJK UNIFIED IDEOGRAPH + {0xCCF4, 0x9BE8}, //12432 #CJK UNIFIED IDEOGRAPH + {0xCCF5, 0x4FC2}, //12433 #CJK UNIFIED IDEOGRAPH + {0xCCF6, 0x5553}, //12434 #CJK UNIFIED IDEOGRAPH + {0xCCF7, 0x583A}, //12435 #CJK UNIFIED IDEOGRAPH + {0xCCF8, 0x5951}, //12436 #CJK UNIFIED IDEOGRAPH + {0xCCF9, 0x5B63}, //12437 #CJK UNIFIED IDEOGRAPH + {0xCCFA, 0x5C46}, //12438 #CJK UNIFIED IDEOGRAPH + {0xCCFB, 0x60B8}, //12439 #CJK UNIFIED IDEOGRAPH + {0xCCFC, 0x6212}, //12440 #CJK UNIFIED IDEOGRAPH + {0xCCFD, 0x6842}, //12441 #CJK UNIFIED IDEOGRAPH + {0xCCFE, 0x68B0}, //12442 #CJK UNIFIED IDEOGRAPH + {0xCDA1, 0x68E8}, //12443 #CJK UNIFIED IDEOGRAPH + {0xCDA2, 0x6EAA}, //12444 #CJK UNIFIED IDEOGRAPH + {0xCDA3, 0x754C}, //12445 #CJK UNIFIED IDEOGRAPH + {0xCDA4, 0x7678}, //12446 #CJK UNIFIED IDEOGRAPH + {0xCDA5, 0x78CE}, //12447 #CJK UNIFIED IDEOGRAPH + {0xCDA6, 0x7A3D}, //12448 #CJK UNIFIED IDEOGRAPH + {0xCDA7, 0x7CFB}, //12449 #CJK UNIFIED IDEOGRAPH + {0xCDA8, 0x7E6B}, //12450 #CJK UNIFIED IDEOGRAPH + {0xCDA9, 0x7E7C}, //12451 #CJK UNIFIED IDEOGRAPH + {0xCDAA, 0x8A08}, //12452 #CJK UNIFIED IDEOGRAPH + {0xCDAB, 0x8AA1}, //12453 #CJK UNIFIED IDEOGRAPH + {0xCDAC, 0x8C3F}, //12454 #CJK UNIFIED IDEOGRAPH + {0xCDAD, 0x968E}, //12455 #CJK UNIFIED IDEOGRAPH + {0xCDAE, 0x9DC4}, //12456 #CJK UNIFIED IDEOGRAPH + {0xCDAF, 0x53E4}, //12457 #CJK UNIFIED IDEOGRAPH + {0xCDB0, 0x53E9}, //12458 #CJK UNIFIED IDEOGRAPH + {0xCDB1, 0x544A}, //12459 #CJK UNIFIED IDEOGRAPH + {0xCDB2, 0x5471}, //12460 #CJK UNIFIED IDEOGRAPH + {0xCDB3, 0x56FA}, //12461 #CJK UNIFIED IDEOGRAPH + {0xCDB4, 0x59D1}, //12462 #CJK UNIFIED IDEOGRAPH + {0xCDB5, 0x5B64}, //12463 #CJK UNIFIED IDEOGRAPH + {0xCDB6, 0x5C3B}, //12464 #CJK UNIFIED IDEOGRAPH + {0xCDB7, 0x5EAB}, //12465 #CJK UNIFIED IDEOGRAPH + {0xCDB8, 0x62F7}, //12466 #CJK UNIFIED IDEOGRAPH + {0xCDB9, 0x6537}, //12467 #CJK UNIFIED IDEOGRAPH + {0xCDBA, 0x6545}, //12468 #CJK UNIFIED IDEOGRAPH + {0xCDBB, 0x6572}, //12469 #CJK UNIFIED IDEOGRAPH + {0xCDBC, 0x66A0}, //12470 #CJK UNIFIED IDEOGRAPH + {0xCDBD, 0x67AF}, //12471 #CJK UNIFIED IDEOGRAPH + {0xCDBE, 0x69C1}, //12472 #CJK UNIFIED IDEOGRAPH + {0xCDBF, 0x6CBD}, //12473 #CJK UNIFIED IDEOGRAPH + {0xCDC0, 0x75FC}, //12474 #CJK UNIFIED IDEOGRAPH + {0xCDC1, 0x7690}, //12475 #CJK UNIFIED IDEOGRAPH + {0xCDC2, 0x777E}, //12476 #CJK UNIFIED IDEOGRAPH + {0xCDC3, 0x7A3F}, //12477 #CJK UNIFIED IDEOGRAPH + {0xCDC4, 0x7F94}, //12478 #CJK UNIFIED IDEOGRAPH + {0xCDC5, 0x8003}, //12479 #CJK UNIFIED IDEOGRAPH + {0xCDC6, 0x80A1}, //12480 #CJK UNIFIED IDEOGRAPH + {0xCDC7, 0x818F}, //12481 #CJK UNIFIED IDEOGRAPH + {0xCDC8, 0x82E6}, //12482 #CJK UNIFIED IDEOGRAPH + {0xCDC9, 0x82FD}, //12483 #CJK UNIFIED IDEOGRAPH + {0xCDCA, 0x83F0}, //12484 #CJK UNIFIED IDEOGRAPH + {0xCDCB, 0x85C1}, //12485 #CJK UNIFIED IDEOGRAPH + {0xCDCC, 0x8831}, //12486 #CJK UNIFIED IDEOGRAPH + {0xCDCD, 0x88B4}, //12487 #CJK UNIFIED IDEOGRAPH + {0xCDCE, 0x8AA5}, //12488 #CJK UNIFIED IDEOGRAPH + {0xCDCF, 0xF903}, //12489 #CJK COMPATIBILITY IDEOGRAPH + {0xCDD0, 0x8F9C}, //12490 #CJK UNIFIED IDEOGRAPH + {0xCDD1, 0x932E}, //12491 #CJK UNIFIED IDEOGRAPH + {0xCDD2, 0x96C7}, //12492 #CJK UNIFIED IDEOGRAPH + {0xCDD3, 0x9867}, //12493 #CJK UNIFIED IDEOGRAPH + {0xCDD4, 0x9AD8}, //12494 #CJK UNIFIED IDEOGRAPH + {0xCDD5, 0x9F13}, //12495 #CJK UNIFIED IDEOGRAPH + {0xCDD6, 0x54ED}, //12496 #CJK UNIFIED IDEOGRAPH + {0xCDD7, 0x659B}, //12497 #CJK UNIFIED IDEOGRAPH + {0xCDD8, 0x66F2}, //12498 #CJK UNIFIED IDEOGRAPH + {0xCDD9, 0x688F}, //12499 #CJK UNIFIED IDEOGRAPH + {0xCDDA, 0x7A40}, //12500 #CJK UNIFIED IDEOGRAPH + {0xCDDB, 0x8C37}, //12501 #CJK UNIFIED IDEOGRAPH + {0xCDDC, 0x9D60}, //12502 #CJK UNIFIED IDEOGRAPH + {0xCDDD, 0x56F0}, //12503 #CJK UNIFIED IDEOGRAPH + {0xCDDE, 0x5764}, //12504 #CJK UNIFIED IDEOGRAPH + {0xCDDF, 0x5D11}, //12505 #CJK UNIFIED IDEOGRAPH + {0xCDE0, 0x6606}, //12506 #CJK UNIFIED IDEOGRAPH + {0xCDE1, 0x68B1}, //12507 #CJK UNIFIED IDEOGRAPH + {0xCDE2, 0x68CD}, //12508 #CJK UNIFIED IDEOGRAPH + {0xCDE3, 0x6EFE}, //12509 #CJK UNIFIED IDEOGRAPH + {0xCDE4, 0x7428}, //12510 #CJK UNIFIED IDEOGRAPH + {0xCDE5, 0x889E}, //12511 #CJK UNIFIED IDEOGRAPH + {0xCDE6, 0x9BE4}, //12512 #CJK UNIFIED IDEOGRAPH + {0xCDE7, 0x6C68}, //12513 #CJK UNIFIED IDEOGRAPH + {0xCDE8, 0xF904}, //12514 #CJK COMPATIBILITY IDEOGRAPH + {0xCDE9, 0x9AA8}, //12515 #CJK UNIFIED IDEOGRAPH + {0xCDEA, 0x4F9B}, //12516 #CJK UNIFIED IDEOGRAPH + {0xCDEB, 0x516C}, //12517 #CJK UNIFIED IDEOGRAPH + {0xCDEC, 0x5171}, //12518 #CJK UNIFIED IDEOGRAPH + {0xCDED, 0x529F}, //12519 #CJK UNIFIED IDEOGRAPH + {0xCDEE, 0x5B54}, //12520 #CJK UNIFIED IDEOGRAPH + {0xCDEF, 0x5DE5}, //12521 #CJK UNIFIED IDEOGRAPH + {0xCDF0, 0x6050}, //12522 #CJK UNIFIED IDEOGRAPH + {0xCDF1, 0x606D}, //12523 #CJK UNIFIED IDEOGRAPH + {0xCDF2, 0x62F1}, //12524 #CJK UNIFIED IDEOGRAPH + {0xCDF3, 0x63A7}, //12525 #CJK UNIFIED IDEOGRAPH + {0xCDF4, 0x653B}, //12526 #CJK UNIFIED IDEOGRAPH + {0xCDF5, 0x73D9}, //12527 #CJK UNIFIED IDEOGRAPH + {0xCDF6, 0x7A7A}, //12528 #CJK UNIFIED IDEOGRAPH + {0xCDF7, 0x86A3}, //12529 #CJK UNIFIED IDEOGRAPH + {0xCDF8, 0x8CA2}, //12530 #CJK UNIFIED IDEOGRAPH + {0xCDF9, 0x978F}, //12531 #CJK UNIFIED IDEOGRAPH + {0xCDFA, 0x4E32}, //12532 #CJK UNIFIED IDEOGRAPH + {0xCDFB, 0x5BE1}, //12533 #CJK UNIFIED IDEOGRAPH + {0xCDFC, 0x6208}, //12534 #CJK UNIFIED IDEOGRAPH + {0xCDFD, 0x679C}, //12535 #CJK UNIFIED IDEOGRAPH + {0xCDFE, 0x74DC}, //12536 #CJK UNIFIED IDEOGRAPH + {0xCEA1, 0x79D1}, //12537 #CJK UNIFIED IDEOGRAPH + {0xCEA2, 0x83D3}, //12538 #CJK UNIFIED IDEOGRAPH + {0xCEA3, 0x8A87}, //12539 #CJK UNIFIED IDEOGRAPH + {0xCEA4, 0x8AB2}, //12540 #CJK UNIFIED IDEOGRAPH + {0xCEA5, 0x8DE8}, //12541 #CJK UNIFIED IDEOGRAPH + {0xCEA6, 0x904E}, //12542 #CJK UNIFIED IDEOGRAPH + {0xCEA7, 0x934B}, //12543 #CJK UNIFIED IDEOGRAPH + {0xCEA8, 0x9846}, //12544 #CJK UNIFIED IDEOGRAPH + {0xCEA9, 0x5ED3}, //12545 #CJK UNIFIED IDEOGRAPH + {0xCEAA, 0x69E8}, //12546 #CJK UNIFIED IDEOGRAPH + {0xCEAB, 0x85FF}, //12547 #CJK UNIFIED IDEOGRAPH + {0xCEAC, 0x90ED}, //12548 #CJK UNIFIED IDEOGRAPH + {0xCEAD, 0xF905}, //12549 #CJK COMPATIBILITY IDEOGRAPH + {0xCEAE, 0x51A0}, //12550 #CJK UNIFIED IDEOGRAPH + {0xCEAF, 0x5B98}, //12551 #CJK UNIFIED IDEOGRAPH + {0xCEB0, 0x5BEC}, //12552 #CJK UNIFIED IDEOGRAPH + {0xCEB1, 0x6163}, //12553 #CJK UNIFIED IDEOGRAPH + {0xCEB2, 0x68FA}, //12554 #CJK UNIFIED IDEOGRAPH + {0xCEB3, 0x6B3E}, //12555 #CJK UNIFIED IDEOGRAPH + {0xCEB4, 0x704C}, //12556 #CJK UNIFIED IDEOGRAPH + {0xCEB5, 0x742F}, //12557 #CJK UNIFIED IDEOGRAPH + {0xCEB6, 0x74D8}, //12558 #CJK UNIFIED IDEOGRAPH + {0xCEB7, 0x7BA1}, //12559 #CJK UNIFIED IDEOGRAPH + {0xCEB8, 0x7F50}, //12560 #CJK UNIFIED IDEOGRAPH + {0xCEB9, 0x83C5}, //12561 #CJK UNIFIED IDEOGRAPH + {0xCEBA, 0x89C0}, //12562 #CJK UNIFIED IDEOGRAPH + {0xCEBB, 0x8CAB}, //12563 #CJK UNIFIED IDEOGRAPH + {0xCEBC, 0x95DC}, //12564 #CJK UNIFIED IDEOGRAPH + {0xCEBD, 0x9928}, //12565 #CJK UNIFIED IDEOGRAPH + {0xCEBE, 0x522E}, //12566 #CJK UNIFIED IDEOGRAPH + {0xCEBF, 0x605D}, //12567 #CJK UNIFIED IDEOGRAPH + {0xCEC0, 0x62EC}, //12568 #CJK UNIFIED IDEOGRAPH + {0xCEC1, 0x9002}, //12569 #CJK UNIFIED IDEOGRAPH + {0xCEC2, 0x4F8A}, //12570 #CJK UNIFIED IDEOGRAPH + {0xCEC3, 0x5149}, //12571 #CJK UNIFIED IDEOGRAPH + {0xCEC4, 0x5321}, //12572 #CJK UNIFIED IDEOGRAPH + {0xCEC5, 0x58D9}, //12573 #CJK UNIFIED IDEOGRAPH + {0xCEC6, 0x5EE3}, //12574 #CJK UNIFIED IDEOGRAPH + {0xCEC7, 0x66E0}, //12575 #CJK UNIFIED IDEOGRAPH + {0xCEC8, 0x6D38}, //12576 #CJK UNIFIED IDEOGRAPH + {0xCEC9, 0x709A}, //12577 #CJK UNIFIED IDEOGRAPH + {0xCECA, 0x72C2}, //12578 #CJK UNIFIED IDEOGRAPH + {0xCECB, 0x73D6}, //12579 #CJK UNIFIED IDEOGRAPH + {0xCECC, 0x7B50}, //12580 #CJK UNIFIED IDEOGRAPH + {0xCECD, 0x80F1}, //12581 #CJK UNIFIED IDEOGRAPH + {0xCECE, 0x945B}, //12582 #CJK UNIFIED IDEOGRAPH + {0xCECF, 0x5366}, //12583 #CJK UNIFIED IDEOGRAPH + {0xCED0, 0x639B}, //12584 #CJK UNIFIED IDEOGRAPH + {0xCED1, 0x7F6B}, //12585 #CJK UNIFIED IDEOGRAPH + {0xCED2, 0x4E56}, //12586 #CJK UNIFIED IDEOGRAPH + {0xCED3, 0x5080}, //12587 #CJK UNIFIED IDEOGRAPH + {0xCED4, 0x584A}, //12588 #CJK UNIFIED IDEOGRAPH + {0xCED5, 0x58DE}, //12589 #CJK UNIFIED IDEOGRAPH + {0xCED6, 0x602A}, //12590 #CJK UNIFIED IDEOGRAPH + {0xCED7, 0x6127}, //12591 #CJK UNIFIED IDEOGRAPH + {0xCED8, 0x62D0}, //12592 #CJK UNIFIED IDEOGRAPH + {0xCED9, 0x69D0}, //12593 #CJK UNIFIED IDEOGRAPH + {0xCEDA, 0x9B41}, //12594 #CJK UNIFIED IDEOGRAPH + {0xCEDB, 0x5B8F}, //12595 #CJK UNIFIED IDEOGRAPH + {0xCEDC, 0x7D18}, //12596 #CJK UNIFIED IDEOGRAPH + {0xCEDD, 0x80B1}, //12597 #CJK UNIFIED IDEOGRAPH + {0xCEDE, 0x8F5F}, //12598 #CJK UNIFIED IDEOGRAPH + {0xCEDF, 0x4EA4}, //12599 #CJK UNIFIED IDEOGRAPH + {0xCEE0, 0x50D1}, //12600 #CJK UNIFIED IDEOGRAPH + {0xCEE1, 0x54AC}, //12601 #CJK UNIFIED IDEOGRAPH + {0xCEE2, 0x55AC}, //12602 #CJK UNIFIED IDEOGRAPH + {0xCEE3, 0x5B0C}, //12603 #CJK UNIFIED IDEOGRAPH + {0xCEE4, 0x5DA0}, //12604 #CJK UNIFIED IDEOGRAPH + {0xCEE5, 0x5DE7}, //12605 #CJK UNIFIED IDEOGRAPH + {0xCEE6, 0x652A}, //12606 #CJK UNIFIED IDEOGRAPH + {0xCEE7, 0x654E}, //12607 #CJK UNIFIED IDEOGRAPH + {0xCEE8, 0x6821}, //12608 #CJK UNIFIED IDEOGRAPH + {0xCEE9, 0x6A4B}, //12609 #CJK UNIFIED IDEOGRAPH + {0xCEEA, 0x72E1}, //12610 #CJK UNIFIED IDEOGRAPH + {0xCEEB, 0x768E}, //12611 #CJK UNIFIED IDEOGRAPH + {0xCEEC, 0x77EF}, //12612 #CJK UNIFIED IDEOGRAPH + {0xCEED, 0x7D5E}, //12613 #CJK UNIFIED IDEOGRAPH + {0xCEEE, 0x7FF9}, //12614 #CJK UNIFIED IDEOGRAPH + {0xCEEF, 0x81A0}, //12615 #CJK UNIFIED IDEOGRAPH + {0xCEF0, 0x854E}, //12616 #CJK UNIFIED IDEOGRAPH + {0xCEF1, 0x86DF}, //12617 #CJK UNIFIED IDEOGRAPH + {0xCEF2, 0x8F03}, //12618 #CJK UNIFIED IDEOGRAPH + {0xCEF3, 0x8F4E}, //12619 #CJK UNIFIED IDEOGRAPH + {0xCEF4, 0x90CA}, //12620 #CJK UNIFIED IDEOGRAPH + {0xCEF5, 0x9903}, //12621 #CJK UNIFIED IDEOGRAPH + {0xCEF6, 0x9A55}, //12622 #CJK UNIFIED IDEOGRAPH + {0xCEF7, 0x9BAB}, //12623 #CJK UNIFIED IDEOGRAPH + {0xCEF8, 0x4E18}, //12624 #CJK UNIFIED IDEOGRAPH + {0xCEF9, 0x4E45}, //12625 #CJK UNIFIED IDEOGRAPH + {0xCEFA, 0x4E5D}, //12626 #CJK UNIFIED IDEOGRAPH + {0xCEFB, 0x4EC7}, //12627 #CJK UNIFIED IDEOGRAPH + {0xCEFC, 0x4FF1}, //12628 #CJK UNIFIED IDEOGRAPH + {0xCEFD, 0x5177}, //12629 #CJK UNIFIED IDEOGRAPH + {0xCEFE, 0x52FE}, //12630 #CJK UNIFIED IDEOGRAPH + {0xCFA1, 0x5340}, //12631 #CJK UNIFIED IDEOGRAPH + {0xCFA2, 0x53E3}, //12632 #CJK UNIFIED IDEOGRAPH + {0xCFA3, 0x53E5}, //12633 #CJK UNIFIED IDEOGRAPH + {0xCFA4, 0x548E}, //12634 #CJK UNIFIED IDEOGRAPH + {0xCFA5, 0x5614}, //12635 #CJK UNIFIED IDEOGRAPH + {0xCFA6, 0x5775}, //12636 #CJK UNIFIED IDEOGRAPH + {0xCFA7, 0x57A2}, //12637 #CJK UNIFIED IDEOGRAPH + {0xCFA8, 0x5BC7}, //12638 #CJK UNIFIED IDEOGRAPH + {0xCFA9, 0x5D87}, //12639 #CJK UNIFIED IDEOGRAPH + {0xCFAA, 0x5ED0}, //12640 #CJK UNIFIED IDEOGRAPH + {0xCFAB, 0x61FC}, //12641 #CJK UNIFIED IDEOGRAPH + {0xCFAC, 0x62D8}, //12642 #CJK UNIFIED IDEOGRAPH + {0xCFAD, 0x6551}, //12643 #CJK UNIFIED IDEOGRAPH + {0xCFAE, 0x67B8}, //12644 #CJK UNIFIED IDEOGRAPH + {0xCFAF, 0x67E9}, //12645 #CJK UNIFIED IDEOGRAPH + {0xCFB0, 0x69CB}, //12646 #CJK UNIFIED IDEOGRAPH + {0xCFB1, 0x6B50}, //12647 #CJK UNIFIED IDEOGRAPH + {0xCFB2, 0x6BC6}, //12648 #CJK UNIFIED IDEOGRAPH + {0xCFB3, 0x6BEC}, //12649 #CJK UNIFIED IDEOGRAPH + {0xCFB4, 0x6C42}, //12650 #CJK UNIFIED IDEOGRAPH + {0xCFB5, 0x6E9D}, //12651 #CJK UNIFIED IDEOGRAPH + {0xCFB6, 0x7078}, //12652 #CJK UNIFIED IDEOGRAPH + {0xCFB7, 0x72D7}, //12653 #CJK UNIFIED IDEOGRAPH + {0xCFB8, 0x7396}, //12654 #CJK UNIFIED IDEOGRAPH + {0xCFB9, 0x7403}, //12655 #CJK UNIFIED IDEOGRAPH + {0xCFBA, 0x77BF}, //12656 #CJK UNIFIED IDEOGRAPH + {0xCFBB, 0x77E9}, //12657 #CJK UNIFIED IDEOGRAPH + {0xCFBC, 0x7A76}, //12658 #CJK UNIFIED IDEOGRAPH + {0xCFBD, 0x7D7F}, //12659 #CJK UNIFIED IDEOGRAPH + {0xCFBE, 0x8009}, //12660 #CJK UNIFIED IDEOGRAPH + {0xCFBF, 0x81FC}, //12661 #CJK UNIFIED IDEOGRAPH + {0xCFC0, 0x8205}, //12662 #CJK UNIFIED IDEOGRAPH + {0xCFC1, 0x820A}, //12663 #CJK UNIFIED IDEOGRAPH + {0xCFC2, 0x82DF}, //12664 #CJK UNIFIED IDEOGRAPH + {0xCFC3, 0x8862}, //12665 #CJK UNIFIED IDEOGRAPH + {0xCFC4, 0x8B33}, //12666 #CJK UNIFIED IDEOGRAPH + {0xCFC5, 0x8CFC}, //12667 #CJK UNIFIED IDEOGRAPH + {0xCFC6, 0x8EC0}, //12668 #CJK UNIFIED IDEOGRAPH + {0xCFC7, 0x9011}, //12669 #CJK UNIFIED IDEOGRAPH + {0xCFC8, 0x90B1}, //12670 #CJK UNIFIED IDEOGRAPH + {0xCFC9, 0x9264}, //12671 #CJK UNIFIED IDEOGRAPH + {0xCFCA, 0x92B6}, //12672 #CJK UNIFIED IDEOGRAPH + {0xCFCB, 0x99D2}, //12673 #CJK UNIFIED IDEOGRAPH + {0xCFCC, 0x9A45}, //12674 #CJK UNIFIED IDEOGRAPH + {0xCFCD, 0x9CE9}, //12675 #CJK UNIFIED IDEOGRAPH + {0xCFCE, 0x9DD7}, //12676 #CJK UNIFIED IDEOGRAPH + {0xCFCF, 0x9F9C}, //12677 #CJK UNIFIED IDEOGRAPH + {0xCFD0, 0x570B}, //12678 #CJK UNIFIED IDEOGRAPH + {0xCFD1, 0x5C40}, //12679 #CJK UNIFIED IDEOGRAPH + {0xCFD2, 0x83CA}, //12680 #CJK UNIFIED IDEOGRAPH + {0xCFD3, 0x97A0}, //12681 #CJK UNIFIED IDEOGRAPH + {0xCFD4, 0x97AB}, //12682 #CJK UNIFIED IDEOGRAPH + {0xCFD5, 0x9EB4}, //12683 #CJK UNIFIED IDEOGRAPH + {0xCFD6, 0x541B}, //12684 #CJK UNIFIED IDEOGRAPH + {0xCFD7, 0x7A98}, //12685 #CJK UNIFIED IDEOGRAPH + {0xCFD8, 0x7FA4}, //12686 #CJK UNIFIED IDEOGRAPH + {0xCFD9, 0x88D9}, //12687 #CJK UNIFIED IDEOGRAPH + {0xCFDA, 0x8ECD}, //12688 #CJK UNIFIED IDEOGRAPH + {0xCFDB, 0x90E1}, //12689 #CJK UNIFIED IDEOGRAPH + {0xCFDC, 0x5800}, //12690 #CJK UNIFIED IDEOGRAPH + {0xCFDD, 0x5C48}, //12691 #CJK UNIFIED IDEOGRAPH + {0xCFDE, 0x6398}, //12692 #CJK UNIFIED IDEOGRAPH + {0xCFDF, 0x7A9F}, //12693 #CJK UNIFIED IDEOGRAPH + {0xCFE0, 0x5BAE}, //12694 #CJK UNIFIED IDEOGRAPH + {0xCFE1, 0x5F13}, //12695 #CJK UNIFIED IDEOGRAPH + {0xCFE2, 0x7A79}, //12696 #CJK UNIFIED IDEOGRAPH + {0xCFE3, 0x7AAE}, //12697 #CJK UNIFIED IDEOGRAPH + {0xCFE4, 0x828E}, //12698 #CJK UNIFIED IDEOGRAPH + {0xCFE5, 0x8EAC}, //12699 #CJK UNIFIED IDEOGRAPH + {0xCFE6, 0x5026}, //12700 #CJK UNIFIED IDEOGRAPH + {0xCFE7, 0x5238}, //12701 #CJK UNIFIED IDEOGRAPH + {0xCFE8, 0x52F8}, //12702 #CJK UNIFIED IDEOGRAPH + {0xCFE9, 0x5377}, //12703 #CJK UNIFIED IDEOGRAPH + {0xCFEA, 0x5708}, //12704 #CJK UNIFIED IDEOGRAPH + {0xCFEB, 0x62F3}, //12705 #CJK UNIFIED IDEOGRAPH + {0xCFEC, 0x6372}, //12706 #CJK UNIFIED IDEOGRAPH + {0xCFED, 0x6B0A}, //12707 #CJK UNIFIED IDEOGRAPH + {0xCFEE, 0x6DC3}, //12708 #CJK UNIFIED IDEOGRAPH + {0xCFEF, 0x7737}, //12709 #CJK UNIFIED IDEOGRAPH + {0xCFF0, 0x53A5}, //12710 #CJK UNIFIED IDEOGRAPH + {0xCFF1, 0x7357}, //12711 #CJK UNIFIED IDEOGRAPH + {0xCFF2, 0x8568}, //12712 #CJK UNIFIED IDEOGRAPH + {0xCFF3, 0x8E76}, //12713 #CJK UNIFIED IDEOGRAPH + {0xCFF4, 0x95D5}, //12714 #CJK UNIFIED IDEOGRAPH + {0xCFF5, 0x673A}, //12715 #CJK UNIFIED IDEOGRAPH + {0xCFF6, 0x6AC3}, //12716 #CJK UNIFIED IDEOGRAPH + {0xCFF7, 0x6F70}, //12717 #CJK UNIFIED IDEOGRAPH + {0xCFF8, 0x8A6D}, //12718 #CJK UNIFIED IDEOGRAPH + {0xCFF9, 0x8ECC}, //12719 #CJK UNIFIED IDEOGRAPH + {0xCFFA, 0x994B}, //12720 #CJK UNIFIED IDEOGRAPH + {0xCFFB, 0xF906}, //12721 #CJK COMPATIBILITY IDEOGRAPH + {0xCFFC, 0x6677}, //12722 #CJK UNIFIED IDEOGRAPH + {0xCFFD, 0x6B78}, //12723 #CJK UNIFIED IDEOGRAPH + {0xCFFE, 0x8CB4}, //12724 #CJK UNIFIED IDEOGRAPH + {0xD0A1, 0x9B3C}, //12725 #CJK UNIFIED IDEOGRAPH + {0xD0A2, 0xF907}, //12726 #CJK COMPATIBILITY IDEOGRAPH + {0xD0A3, 0x53EB}, //12727 #CJK UNIFIED IDEOGRAPH + {0xD0A4, 0x572D}, //12728 #CJK UNIFIED IDEOGRAPH + {0xD0A5, 0x594E}, //12729 #CJK UNIFIED IDEOGRAPH + {0xD0A6, 0x63C6}, //12730 #CJK UNIFIED IDEOGRAPH + {0xD0A7, 0x69FB}, //12731 #CJK UNIFIED IDEOGRAPH + {0xD0A8, 0x73EA}, //12732 #CJK UNIFIED IDEOGRAPH + {0xD0A9, 0x7845}, //12733 #CJK UNIFIED IDEOGRAPH + {0xD0AA, 0x7ABA}, //12734 #CJK UNIFIED IDEOGRAPH + {0xD0AB, 0x7AC5}, //12735 #CJK UNIFIED IDEOGRAPH + {0xD0AC, 0x7CFE}, //12736 #CJK UNIFIED IDEOGRAPH + {0xD0AD, 0x8475}, //12737 #CJK UNIFIED IDEOGRAPH + {0xD0AE, 0x898F}, //12738 #CJK UNIFIED IDEOGRAPH + {0xD0AF, 0x8D73}, //12739 #CJK UNIFIED IDEOGRAPH + {0xD0B0, 0x9035}, //12740 #CJK UNIFIED IDEOGRAPH + {0xD0B1, 0x95A8}, //12741 #CJK UNIFIED IDEOGRAPH + {0xD0B2, 0x52FB}, //12742 #CJK UNIFIED IDEOGRAPH + {0xD0B3, 0x5747}, //12743 #CJK UNIFIED IDEOGRAPH + {0xD0B4, 0x7547}, //12744 #CJK UNIFIED IDEOGRAPH + {0xD0B5, 0x7B60}, //12745 #CJK UNIFIED IDEOGRAPH + {0xD0B6, 0x83CC}, //12746 #CJK UNIFIED IDEOGRAPH + {0xD0B7, 0x921E}, //12747 #CJK UNIFIED IDEOGRAPH + {0xD0B8, 0xF908}, //12748 #CJK COMPATIBILITY IDEOGRAPH + {0xD0B9, 0x6A58}, //12749 #CJK UNIFIED IDEOGRAPH + {0xD0BA, 0x514B}, //12750 #CJK UNIFIED IDEOGRAPH + {0xD0BB, 0x524B}, //12751 #CJK UNIFIED IDEOGRAPH + {0xD0BC, 0x5287}, //12752 #CJK UNIFIED IDEOGRAPH + {0xD0BD, 0x621F}, //12753 #CJK UNIFIED IDEOGRAPH + {0xD0BE, 0x68D8}, //12754 #CJK UNIFIED IDEOGRAPH + {0xD0BF, 0x6975}, //12755 #CJK UNIFIED IDEOGRAPH + {0xD0C0, 0x9699}, //12756 #CJK UNIFIED IDEOGRAPH + {0xD0C1, 0x50C5}, //12757 #CJK UNIFIED IDEOGRAPH + {0xD0C2, 0x52A4}, //12758 #CJK UNIFIED IDEOGRAPH + {0xD0C3, 0x52E4}, //12759 #CJK UNIFIED IDEOGRAPH + {0xD0C4, 0x61C3}, //12760 #CJK UNIFIED IDEOGRAPH + {0xD0C5, 0x65A4}, //12761 #CJK UNIFIED IDEOGRAPH + {0xD0C6, 0x6839}, //12762 #CJK UNIFIED IDEOGRAPH + {0xD0C7, 0x69FF}, //12763 #CJK UNIFIED IDEOGRAPH + {0xD0C8, 0x747E}, //12764 #CJK UNIFIED IDEOGRAPH + {0xD0C9, 0x7B4B}, //12765 #CJK UNIFIED IDEOGRAPH + {0xD0CA, 0x82B9}, //12766 #CJK UNIFIED IDEOGRAPH + {0xD0CB, 0x83EB}, //12767 #CJK UNIFIED IDEOGRAPH + {0xD0CC, 0x89B2}, //12768 #CJK UNIFIED IDEOGRAPH + {0xD0CD, 0x8B39}, //12769 #CJK UNIFIED IDEOGRAPH + {0xD0CE, 0x8FD1}, //12770 #CJK UNIFIED IDEOGRAPH + {0xD0CF, 0x9949}, //12771 #CJK UNIFIED IDEOGRAPH + {0xD0D0, 0xF909}, //12772 #CJK COMPATIBILITY IDEOGRAPH + {0xD0D1, 0x4ECA}, //12773 #CJK UNIFIED IDEOGRAPH + {0xD0D2, 0x5997}, //12774 #CJK UNIFIED IDEOGRAPH + {0xD0D3, 0x64D2}, //12775 #CJK UNIFIED IDEOGRAPH + {0xD0D4, 0x6611}, //12776 #CJK UNIFIED IDEOGRAPH + {0xD0D5, 0x6A8E}, //12777 #CJK UNIFIED IDEOGRAPH + {0xD0D6, 0x7434}, //12778 #CJK UNIFIED IDEOGRAPH + {0xD0D7, 0x7981}, //12779 #CJK UNIFIED IDEOGRAPH + {0xD0D8, 0x79BD}, //12780 #CJK UNIFIED IDEOGRAPH + {0xD0D9, 0x82A9}, //12781 #CJK UNIFIED IDEOGRAPH + {0xD0DA, 0x887E}, //12782 #CJK UNIFIED IDEOGRAPH + {0xD0DB, 0x887F}, //12783 #CJK UNIFIED IDEOGRAPH + {0xD0DC, 0x895F}, //12784 #CJK UNIFIED IDEOGRAPH + {0xD0DD, 0xF90A}, //12785 #CJK COMPATIBILITY IDEOGRAPH + {0xD0DE, 0x9326}, //12786 #CJK UNIFIED IDEOGRAPH + {0xD0DF, 0x4F0B}, //12787 #CJK UNIFIED IDEOGRAPH + {0xD0E0, 0x53CA}, //12788 #CJK UNIFIED IDEOGRAPH + {0xD0E1, 0x6025}, //12789 #CJK UNIFIED IDEOGRAPH + {0xD0E2, 0x6271}, //12790 #CJK UNIFIED IDEOGRAPH + {0xD0E3, 0x6C72}, //12791 #CJK UNIFIED IDEOGRAPH + {0xD0E4, 0x7D1A}, //12792 #CJK UNIFIED IDEOGRAPH + {0xD0E5, 0x7D66}, //12793 #CJK UNIFIED IDEOGRAPH + {0xD0E6, 0x4E98}, //12794 #CJK UNIFIED IDEOGRAPH + {0xD0E7, 0x5162}, //12795 #CJK UNIFIED IDEOGRAPH + {0xD0E8, 0x77DC}, //12796 #CJK UNIFIED IDEOGRAPH + {0xD0E9, 0x80AF}, //12797 #CJK UNIFIED IDEOGRAPH + {0xD0EA, 0x4F01}, //12798 #CJK UNIFIED IDEOGRAPH + {0xD0EB, 0x4F0E}, //12799 #CJK UNIFIED IDEOGRAPH + {0xD0EC, 0x5176}, //12800 #CJK UNIFIED IDEOGRAPH + {0xD0ED, 0x5180}, //12801 #CJK UNIFIED IDEOGRAPH + {0xD0EE, 0x55DC}, //12802 #CJK UNIFIED IDEOGRAPH + {0xD0EF, 0x5668}, //12803 #CJK UNIFIED IDEOGRAPH + {0xD0F0, 0x573B}, //12804 #CJK UNIFIED IDEOGRAPH + {0xD0F1, 0x57FA}, //12805 #CJK UNIFIED IDEOGRAPH + {0xD0F2, 0x57FC}, //12806 #CJK UNIFIED IDEOGRAPH + {0xD0F3, 0x5914}, //12807 #CJK UNIFIED IDEOGRAPH + {0xD0F4, 0x5947}, //12808 #CJK UNIFIED IDEOGRAPH + {0xD0F5, 0x5993}, //12809 #CJK UNIFIED IDEOGRAPH + {0xD0F6, 0x5BC4}, //12810 #CJK UNIFIED IDEOGRAPH + {0xD0F7, 0x5C90}, //12811 #CJK UNIFIED IDEOGRAPH + {0xD0F8, 0x5D0E}, //12812 #CJK UNIFIED IDEOGRAPH + {0xD0F9, 0x5DF1}, //12813 #CJK UNIFIED IDEOGRAPH + {0xD0FA, 0x5E7E}, //12814 #CJK UNIFIED IDEOGRAPH + {0xD0FB, 0x5FCC}, //12815 #CJK UNIFIED IDEOGRAPH + {0xD0FC, 0x6280}, //12816 #CJK UNIFIED IDEOGRAPH + {0xD0FD, 0x65D7}, //12817 #CJK UNIFIED IDEOGRAPH + {0xD0FE, 0x65E3}, //12818 #CJK UNIFIED IDEOGRAPH + {0xD1A1, 0x671E}, //12819 #CJK UNIFIED IDEOGRAPH + {0xD1A2, 0x671F}, //12820 #CJK UNIFIED IDEOGRAPH + {0xD1A3, 0x675E}, //12821 #CJK UNIFIED IDEOGRAPH + {0xD1A4, 0x68CB}, //12822 #CJK UNIFIED IDEOGRAPH + {0xD1A5, 0x68C4}, //12823 #CJK UNIFIED IDEOGRAPH + {0xD1A6, 0x6A5F}, //12824 #CJK UNIFIED IDEOGRAPH + {0xD1A7, 0x6B3A}, //12825 #CJK UNIFIED IDEOGRAPH + {0xD1A8, 0x6C23}, //12826 #CJK UNIFIED IDEOGRAPH + {0xD1A9, 0x6C7D}, //12827 #CJK UNIFIED IDEOGRAPH + {0xD1AA, 0x6C82}, //12828 #CJK UNIFIED IDEOGRAPH + {0xD1AB, 0x6DC7}, //12829 #CJK UNIFIED IDEOGRAPH + {0xD1AC, 0x7398}, //12830 #CJK UNIFIED IDEOGRAPH + {0xD1AD, 0x7426}, //12831 #CJK UNIFIED IDEOGRAPH + {0xD1AE, 0x742A}, //12832 #CJK UNIFIED IDEOGRAPH + {0xD1AF, 0x7482}, //12833 #CJK UNIFIED IDEOGRAPH + {0xD1B0, 0x74A3}, //12834 #CJK UNIFIED IDEOGRAPH + {0xD1B1, 0x7578}, //12835 #CJK UNIFIED IDEOGRAPH + {0xD1B2, 0x757F}, //12836 #CJK UNIFIED IDEOGRAPH + {0xD1B3, 0x7881}, //12837 #CJK UNIFIED IDEOGRAPH + {0xD1B4, 0x78EF}, //12838 #CJK UNIFIED IDEOGRAPH + {0xD1B5, 0x7941}, //12839 #CJK UNIFIED IDEOGRAPH + {0xD1B6, 0x7947}, //12840 #CJK UNIFIED IDEOGRAPH + {0xD1B7, 0x7948}, //12841 #CJK UNIFIED IDEOGRAPH + {0xD1B8, 0x797A}, //12842 #CJK UNIFIED IDEOGRAPH + {0xD1B9, 0x7B95}, //12843 #CJK UNIFIED IDEOGRAPH + {0xD1BA, 0x7D00}, //12844 #CJK UNIFIED IDEOGRAPH + {0xD1BB, 0x7DBA}, //12845 #CJK UNIFIED IDEOGRAPH + {0xD1BC, 0x7F88}, //12846 #CJK UNIFIED IDEOGRAPH + {0xD1BD, 0x8006}, //12847 #CJK UNIFIED IDEOGRAPH + {0xD1BE, 0x802D}, //12848 #CJK UNIFIED IDEOGRAPH + {0xD1BF, 0x808C}, //12849 #CJK UNIFIED IDEOGRAPH + {0xD1C0, 0x8A18}, //12850 #CJK UNIFIED IDEOGRAPH + {0xD1C1, 0x8B4F}, //12851 #CJK UNIFIED IDEOGRAPH + {0xD1C2, 0x8C48}, //12852 #CJK UNIFIED IDEOGRAPH + {0xD1C3, 0x8D77}, //12853 #CJK UNIFIED IDEOGRAPH + {0xD1C4, 0x9321}, //12854 #CJK UNIFIED IDEOGRAPH + {0xD1C5, 0x9324}, //12855 #CJK UNIFIED IDEOGRAPH + {0xD1C6, 0x98E2}, //12856 #CJK UNIFIED IDEOGRAPH + {0xD1C7, 0x9951}, //12857 #CJK UNIFIED IDEOGRAPH + {0xD1C8, 0x9A0E}, //12858 #CJK UNIFIED IDEOGRAPH + {0xD1C9, 0x9A0F}, //12859 #CJK UNIFIED IDEOGRAPH + {0xD1CA, 0x9A65}, //12860 #CJK UNIFIED IDEOGRAPH + {0xD1CB, 0x9E92}, //12861 #CJK UNIFIED IDEOGRAPH + {0xD1CC, 0x7DCA}, //12862 #CJK UNIFIED IDEOGRAPH + {0xD1CD, 0x4F76}, //12863 #CJK UNIFIED IDEOGRAPH + {0xD1CE, 0x5409}, //12864 #CJK UNIFIED IDEOGRAPH + {0xD1CF, 0x62EE}, //12865 #CJK UNIFIED IDEOGRAPH + {0xD1D0, 0x6854}, //12866 #CJK UNIFIED IDEOGRAPH + {0xD1D1, 0x91D1}, //12867 #CJK UNIFIED IDEOGRAPH + {0xD1D2, 0x55AB}, //12868 #CJK UNIFIED IDEOGRAPH + {0xD1D3, 0x513A}, //12869 #CJK UNIFIED IDEOGRAPH + {0xD1D4, 0xF90B}, //12870 #CJK COMPATIBILITY IDEOGRAPH + {0xD1D5, 0xF90C}, //12871 #CJK COMPATIBILITY IDEOGRAPH + {0xD1D6, 0x5A1C}, //12872 #CJK UNIFIED IDEOGRAPH + {0xD1D7, 0x61E6}, //12873 #CJK UNIFIED IDEOGRAPH + {0xD1D8, 0xF90D}, //12874 #CJK COMPATIBILITY IDEOGRAPH + {0xD1D9, 0x62CF}, //12875 #CJK UNIFIED IDEOGRAPH + {0xD1DA, 0x62FF}, //12876 #CJK UNIFIED IDEOGRAPH + {0xD1DB, 0xF90E}, //12877 #CJK COMPATIBILITY IDEOGRAPH + {0xD1DC, 0xF90F}, //12878 #CJK COMPATIBILITY IDEOGRAPH + {0xD1DD, 0xF910}, //12879 #CJK COMPATIBILITY IDEOGRAPH + {0xD1DE, 0xF911}, //12880 #CJK COMPATIBILITY IDEOGRAPH + {0xD1DF, 0xF912}, //12881 #CJK COMPATIBILITY IDEOGRAPH + {0xD1E0, 0xF913}, //12882 #CJK COMPATIBILITY IDEOGRAPH + {0xD1E1, 0x90A3}, //12883 #CJK UNIFIED IDEOGRAPH + {0xD1E2, 0xF914}, //12884 #CJK COMPATIBILITY IDEOGRAPH + {0xD1E3, 0xF915}, //12885 #CJK COMPATIBILITY IDEOGRAPH + {0xD1E4, 0xF916}, //12886 #CJK COMPATIBILITY IDEOGRAPH + {0xD1E5, 0xF917}, //12887 #CJK COMPATIBILITY IDEOGRAPH + {0xD1E6, 0xF918}, //12888 #CJK COMPATIBILITY IDEOGRAPH + {0xD1E7, 0x8AFE}, //12889 #CJK UNIFIED IDEOGRAPH + {0xD1E8, 0xF919}, //12890 #CJK COMPATIBILITY IDEOGRAPH + {0xD1E9, 0xF91A}, //12891 #CJK COMPATIBILITY IDEOGRAPH + {0xD1EA, 0xF91B}, //12892 #CJK COMPATIBILITY IDEOGRAPH + {0xD1EB, 0xF91C}, //12893 #CJK COMPATIBILITY IDEOGRAPH + {0xD1EC, 0x6696}, //12894 #CJK UNIFIED IDEOGRAPH + {0xD1ED, 0xF91D}, //12895 #CJK COMPATIBILITY IDEOGRAPH + {0xD1EE, 0x7156}, //12896 #CJK UNIFIED IDEOGRAPH + {0xD1EF, 0xF91E}, //12897 #CJK COMPATIBILITY IDEOGRAPH + {0xD1F0, 0xF91F}, //12898 #CJK COMPATIBILITY IDEOGRAPH + {0xD1F1, 0x96E3}, //12899 #CJK UNIFIED IDEOGRAPH + {0xD1F2, 0xF920}, //12900 #CJK COMPATIBILITY IDEOGRAPH + {0xD1F3, 0x634F}, //12901 #CJK UNIFIED IDEOGRAPH + {0xD1F4, 0x637A}, //12902 #CJK UNIFIED IDEOGRAPH + {0xD1F5, 0x5357}, //12903 #CJK UNIFIED IDEOGRAPH + {0xD1F6, 0xF921}, //12904 #CJK COMPATIBILITY IDEOGRAPH + {0xD1F7, 0x678F}, //12905 #CJK UNIFIED IDEOGRAPH + {0xD1F8, 0x6960}, //12906 #CJK UNIFIED IDEOGRAPH + {0xD1F9, 0x6E73}, //12907 #CJK UNIFIED IDEOGRAPH + {0xD1FA, 0xF922}, //12908 #CJK COMPATIBILITY IDEOGRAPH + {0xD1FB, 0x7537}, //12909 #CJK UNIFIED IDEOGRAPH + {0xD1FC, 0xF923}, //12910 #CJK COMPATIBILITY IDEOGRAPH + {0xD1FD, 0xF924}, //12911 #CJK COMPATIBILITY IDEOGRAPH + {0xD1FE, 0xF925}, //12912 #CJK COMPATIBILITY IDEOGRAPH + {0xD2A1, 0x7D0D}, //12913 #CJK UNIFIED IDEOGRAPH + {0xD2A2, 0xF926}, //12914 #CJK COMPATIBILITY IDEOGRAPH + {0xD2A3, 0xF927}, //12915 #CJK COMPATIBILITY IDEOGRAPH + {0xD2A4, 0x8872}, //12916 #CJK UNIFIED IDEOGRAPH + {0xD2A5, 0x56CA}, //12917 #CJK UNIFIED IDEOGRAPH + {0xD2A6, 0x5A18}, //12918 #CJK UNIFIED IDEOGRAPH + {0xD2A7, 0xF928}, //12919 #CJK COMPATIBILITY IDEOGRAPH + {0xD2A8, 0xF929}, //12920 #CJK COMPATIBILITY IDEOGRAPH + {0xD2A9, 0xF92A}, //12921 #CJK COMPATIBILITY IDEOGRAPH + {0xD2AA, 0xF92B}, //12922 #CJK COMPATIBILITY IDEOGRAPH + {0xD2AB, 0xF92C}, //12923 #CJK COMPATIBILITY IDEOGRAPH + {0xD2AC, 0x4E43}, //12924 #CJK UNIFIED IDEOGRAPH + {0xD2AD, 0xF92D}, //12925 #CJK COMPATIBILITY IDEOGRAPH + {0xD2AE, 0x5167}, //12926 #CJK UNIFIED IDEOGRAPH + {0xD2AF, 0x5948}, //12927 #CJK UNIFIED IDEOGRAPH + {0xD2B0, 0x67F0}, //12928 #CJK UNIFIED IDEOGRAPH + {0xD2B1, 0x8010}, //12929 #CJK UNIFIED IDEOGRAPH + {0xD2B2, 0xF92E}, //12930 #CJK COMPATIBILITY IDEOGRAPH + {0xD2B3, 0x5973}, //12931 #CJK UNIFIED IDEOGRAPH + {0xD2B4, 0x5E74}, //12932 #CJK UNIFIED IDEOGRAPH + {0xD2B5, 0x649A}, //12933 #CJK UNIFIED IDEOGRAPH + {0xD2B6, 0x79CA}, //12934 #CJK UNIFIED IDEOGRAPH + {0xD2B7, 0x5FF5}, //12935 #CJK UNIFIED IDEOGRAPH + {0xD2B8, 0x606C}, //12936 #CJK UNIFIED IDEOGRAPH + {0xD2B9, 0x62C8}, //12937 #CJK UNIFIED IDEOGRAPH + {0xD2BA, 0x637B}, //12938 #CJK UNIFIED IDEOGRAPH + {0xD2BB, 0x5BE7}, //12939 #CJK UNIFIED IDEOGRAPH + {0xD2BC, 0x5BD7}, //12940 #CJK UNIFIED IDEOGRAPH + {0xD2BD, 0x52AA}, //12941 #CJK UNIFIED IDEOGRAPH + {0xD2BE, 0xF92F}, //12942 #CJK COMPATIBILITY IDEOGRAPH + {0xD2BF, 0x5974}, //12943 #CJK UNIFIED IDEOGRAPH + {0xD2C0, 0x5F29}, //12944 #CJK UNIFIED IDEOGRAPH + {0xD2C1, 0x6012}, //12945 #CJK UNIFIED IDEOGRAPH + {0xD2C2, 0xF930}, //12946 #CJK COMPATIBILITY IDEOGRAPH + {0xD2C3, 0xF931}, //12947 #CJK COMPATIBILITY IDEOGRAPH + {0xD2C4, 0xF932}, //12948 #CJK COMPATIBILITY IDEOGRAPH + {0xD2C5, 0x7459}, //12949 #CJK UNIFIED IDEOGRAPH + {0xD2C6, 0xF933}, //12950 #CJK COMPATIBILITY IDEOGRAPH + {0xD2C7, 0xF934}, //12951 #CJK COMPATIBILITY IDEOGRAPH + {0xD2C8, 0xF935}, //12952 #CJK COMPATIBILITY IDEOGRAPH + {0xD2C9, 0xF936}, //12953 #CJK COMPATIBILITY IDEOGRAPH + {0xD2CA, 0xF937}, //12954 #CJK COMPATIBILITY IDEOGRAPH + {0xD2CB, 0xF938}, //12955 #CJK COMPATIBILITY IDEOGRAPH + {0xD2CC, 0x99D1}, //12956 #CJK UNIFIED IDEOGRAPH + {0xD2CD, 0xF939}, //12957 #CJK COMPATIBILITY IDEOGRAPH + {0xD2CE, 0xF93A}, //12958 #CJK COMPATIBILITY IDEOGRAPH + {0xD2CF, 0xF93B}, //12959 #CJK COMPATIBILITY IDEOGRAPH + {0xD2D0, 0xF93C}, //12960 #CJK COMPATIBILITY IDEOGRAPH + {0xD2D1, 0xF93D}, //12961 #CJK COMPATIBILITY IDEOGRAPH + {0xD2D2, 0xF93E}, //12962 #CJK COMPATIBILITY IDEOGRAPH + {0xD2D3, 0xF93F}, //12963 #CJK COMPATIBILITY IDEOGRAPH + {0xD2D4, 0xF940}, //12964 #CJK COMPATIBILITY IDEOGRAPH + {0xD2D5, 0xF941}, //12965 #CJK COMPATIBILITY IDEOGRAPH + {0xD2D6, 0xF942}, //12966 #CJK COMPATIBILITY IDEOGRAPH + {0xD2D7, 0xF943}, //12967 #CJK COMPATIBILITY IDEOGRAPH + {0xD2D8, 0x6FC3}, //12968 #CJK UNIFIED IDEOGRAPH + {0xD2D9, 0xF944}, //12969 #CJK COMPATIBILITY IDEOGRAPH + {0xD2DA, 0xF945}, //12970 #CJK COMPATIBILITY IDEOGRAPH + {0xD2DB, 0x81BF}, //12971 #CJK UNIFIED IDEOGRAPH + {0xD2DC, 0x8FB2}, //12972 #CJK UNIFIED IDEOGRAPH + {0xD2DD, 0x60F1}, //12973 #CJK UNIFIED IDEOGRAPH + {0xD2DE, 0xF946}, //12974 #CJK COMPATIBILITY IDEOGRAPH + {0xD2DF, 0xF947}, //12975 #CJK COMPATIBILITY IDEOGRAPH + {0xD2E0, 0x8166}, //12976 #CJK UNIFIED IDEOGRAPH + {0xD2E1, 0xF948}, //12977 #CJK COMPATIBILITY IDEOGRAPH + {0xD2E2, 0xF949}, //12978 #CJK COMPATIBILITY IDEOGRAPH + {0xD2E3, 0x5C3F}, //12979 #CJK UNIFIED IDEOGRAPH + {0xD2E4, 0xF94A}, //12980 #CJK COMPATIBILITY IDEOGRAPH + {0xD2E5, 0xF94B}, //12981 #CJK COMPATIBILITY IDEOGRAPH + {0xD2E6, 0xF94C}, //12982 #CJK COMPATIBILITY IDEOGRAPH + {0xD2E7, 0xF94D}, //12983 #CJK COMPATIBILITY IDEOGRAPH + {0xD2E8, 0xF94E}, //12984 #CJK COMPATIBILITY IDEOGRAPH + {0xD2E9, 0xF94F}, //12985 #CJK COMPATIBILITY IDEOGRAPH + {0xD2EA, 0xF950}, //12986 #CJK COMPATIBILITY IDEOGRAPH + {0xD2EB, 0xF951}, //12987 #CJK COMPATIBILITY IDEOGRAPH + {0xD2EC, 0x5AE9}, //12988 #CJK UNIFIED IDEOGRAPH + {0xD2ED, 0x8A25}, //12989 #CJK UNIFIED IDEOGRAPH + {0xD2EE, 0x677B}, //12990 #CJK UNIFIED IDEOGRAPH + {0xD2EF, 0x7D10}, //12991 #CJK UNIFIED IDEOGRAPH + {0xD2F0, 0xF952}, //12992 #CJK COMPATIBILITY IDEOGRAPH + {0xD2F1, 0xF953}, //12993 #CJK COMPATIBILITY IDEOGRAPH + {0xD2F2, 0xF954}, //12994 #CJK COMPATIBILITY IDEOGRAPH + {0xD2F3, 0xF955}, //12995 #CJK COMPATIBILITY IDEOGRAPH + {0xD2F4, 0xF956}, //12996 #CJK COMPATIBILITY IDEOGRAPH + {0xD2F5, 0xF957}, //12997 #CJK COMPATIBILITY IDEOGRAPH + {0xD2F6, 0x80FD}, //12998 #CJK UNIFIED IDEOGRAPH + {0xD2F7, 0xF958}, //12999 #CJK COMPATIBILITY IDEOGRAPH + {0xD2F8, 0xF959}, //13000 #CJK COMPATIBILITY IDEOGRAPH + {0xD2F9, 0x5C3C}, //13001 #CJK UNIFIED IDEOGRAPH + {0xD2FA, 0x6CE5}, //13002 #CJK UNIFIED IDEOGRAPH + {0xD2FB, 0x533F}, //13003 #CJK UNIFIED IDEOGRAPH + {0xD2FC, 0x6EBA}, //13004 #CJK UNIFIED IDEOGRAPH + {0xD2FD, 0x591A}, //13005 #CJK UNIFIED IDEOGRAPH + {0xD2FE, 0x8336}, //13006 #CJK UNIFIED IDEOGRAPH + {0xD3A1, 0x4E39}, //13007 #CJK UNIFIED IDEOGRAPH + {0xD3A2, 0x4EB6}, //13008 #CJK UNIFIED IDEOGRAPH + {0xD3A3, 0x4F46}, //13009 #CJK UNIFIED IDEOGRAPH + {0xD3A4, 0x55AE}, //13010 #CJK UNIFIED IDEOGRAPH + {0xD3A5, 0x5718}, //13011 #CJK UNIFIED IDEOGRAPH + {0xD3A6, 0x58C7}, //13012 #CJK UNIFIED IDEOGRAPH + {0xD3A7, 0x5F56}, //13013 #CJK UNIFIED IDEOGRAPH + {0xD3A8, 0x65B7}, //13014 #CJK UNIFIED IDEOGRAPH + {0xD3A9, 0x65E6}, //13015 #CJK UNIFIED IDEOGRAPH + {0xD3AA, 0x6A80}, //13016 #CJK UNIFIED IDEOGRAPH + {0xD3AB, 0x6BB5}, //13017 #CJK UNIFIED IDEOGRAPH + {0xD3AC, 0x6E4D}, //13018 #CJK UNIFIED IDEOGRAPH + {0xD3AD, 0x77ED}, //13019 #CJK UNIFIED IDEOGRAPH + {0xD3AE, 0x7AEF}, //13020 #CJK UNIFIED IDEOGRAPH + {0xD3AF, 0x7C1E}, //13021 #CJK UNIFIED IDEOGRAPH + {0xD3B0, 0x7DDE}, //13022 #CJK UNIFIED IDEOGRAPH + {0xD3B1, 0x86CB}, //13023 #CJK UNIFIED IDEOGRAPH + {0xD3B2, 0x8892}, //13024 #CJK UNIFIED IDEOGRAPH + {0xD3B3, 0x9132}, //13025 #CJK UNIFIED IDEOGRAPH + {0xD3B4, 0x935B}, //13026 #CJK UNIFIED IDEOGRAPH + {0xD3B5, 0x64BB}, //13027 #CJK UNIFIED IDEOGRAPH + {0xD3B6, 0x6FBE}, //13028 #CJK UNIFIED IDEOGRAPH + {0xD3B7, 0x737A}, //13029 #CJK UNIFIED IDEOGRAPH + {0xD3B8, 0x75B8}, //13030 #CJK UNIFIED IDEOGRAPH + {0xD3B9, 0x9054}, //13031 #CJK UNIFIED IDEOGRAPH + {0xD3BA, 0x5556}, //13032 #CJK UNIFIED IDEOGRAPH + {0xD3BB, 0x574D}, //13033 #CJK UNIFIED IDEOGRAPH + {0xD3BC, 0x61BA}, //13034 #CJK UNIFIED IDEOGRAPH + {0xD3BD, 0x64D4}, //13035 #CJK UNIFIED IDEOGRAPH + {0xD3BE, 0x66C7}, //13036 #CJK UNIFIED IDEOGRAPH + {0xD3BF, 0x6DE1}, //13037 #CJK UNIFIED IDEOGRAPH + {0xD3C0, 0x6E5B}, //13038 #CJK UNIFIED IDEOGRAPH + {0xD3C1, 0x6F6D}, //13039 #CJK UNIFIED IDEOGRAPH + {0xD3C2, 0x6FB9}, //13040 #CJK UNIFIED IDEOGRAPH + {0xD3C3, 0x75F0}, //13041 #CJK UNIFIED IDEOGRAPH + {0xD3C4, 0x8043}, //13042 #CJK UNIFIED IDEOGRAPH + {0xD3C5, 0x81BD}, //13043 #CJK UNIFIED IDEOGRAPH + {0xD3C6, 0x8541}, //13044 #CJK UNIFIED IDEOGRAPH + {0xD3C7, 0x8983}, //13045 #CJK UNIFIED IDEOGRAPH + {0xD3C8, 0x8AC7}, //13046 #CJK UNIFIED IDEOGRAPH + {0xD3C9, 0x8B5A}, //13047 #CJK UNIFIED IDEOGRAPH + {0xD3CA, 0x931F}, //13048 #CJK UNIFIED IDEOGRAPH + {0xD3CB, 0x6C93}, //13049 #CJK UNIFIED IDEOGRAPH + {0xD3CC, 0x7553}, //13050 #CJK UNIFIED IDEOGRAPH + {0xD3CD, 0x7B54}, //13051 #CJK UNIFIED IDEOGRAPH + {0xD3CE, 0x8E0F}, //13052 #CJK UNIFIED IDEOGRAPH + {0xD3CF, 0x905D}, //13053 #CJK UNIFIED IDEOGRAPH + {0xD3D0, 0x5510}, //13054 #CJK UNIFIED IDEOGRAPH + {0xD3D1, 0x5802}, //13055 #CJK UNIFIED IDEOGRAPH + {0xD3D2, 0x5858}, //13056 #CJK UNIFIED IDEOGRAPH + {0xD3D3, 0x5E62}, //13057 #CJK UNIFIED IDEOGRAPH + {0xD3D4, 0x6207}, //13058 #CJK UNIFIED IDEOGRAPH + {0xD3D5, 0x649E}, //13059 #CJK UNIFIED IDEOGRAPH + {0xD3D6, 0x68E0}, //13060 #CJK UNIFIED IDEOGRAPH + {0xD3D7, 0x7576}, //13061 #CJK UNIFIED IDEOGRAPH + {0xD3D8, 0x7CD6}, //13062 #CJK UNIFIED IDEOGRAPH + {0xD3D9, 0x87B3}, //13063 #CJK UNIFIED IDEOGRAPH + {0xD3DA, 0x9EE8}, //13064 #CJK UNIFIED IDEOGRAPH + {0xD3DB, 0x4EE3}, //13065 #CJK UNIFIED IDEOGRAPH + {0xD3DC, 0x5788}, //13066 #CJK UNIFIED IDEOGRAPH + {0xD3DD, 0x576E}, //13067 #CJK UNIFIED IDEOGRAPH + {0xD3DE, 0x5927}, //13068 #CJK UNIFIED IDEOGRAPH + {0xD3DF, 0x5C0D}, //13069 #CJK UNIFIED IDEOGRAPH + {0xD3E0, 0x5CB1}, //13070 #CJK UNIFIED IDEOGRAPH + {0xD3E1, 0x5E36}, //13071 #CJK UNIFIED IDEOGRAPH + {0xD3E2, 0x5F85}, //13072 #CJK UNIFIED IDEOGRAPH + {0xD3E3, 0x6234}, //13073 #CJK UNIFIED IDEOGRAPH + {0xD3E4, 0x64E1}, //13074 #CJK UNIFIED IDEOGRAPH + {0xD3E5, 0x73B3}, //13075 #CJK UNIFIED IDEOGRAPH + {0xD3E6, 0x81FA}, //13076 #CJK UNIFIED IDEOGRAPH + {0xD3E7, 0x888B}, //13077 #CJK UNIFIED IDEOGRAPH + {0xD3E8, 0x8CB8}, //13078 #CJK UNIFIED IDEOGRAPH + {0xD3E9, 0x968A}, //13079 #CJK UNIFIED IDEOGRAPH + {0xD3EA, 0x9EDB}, //13080 #CJK UNIFIED IDEOGRAPH + {0xD3EB, 0x5B85}, //13081 #CJK UNIFIED IDEOGRAPH + {0xD3EC, 0x5FB7}, //13082 #CJK UNIFIED IDEOGRAPH + {0xD3ED, 0x60B3}, //13083 #CJK UNIFIED IDEOGRAPH + {0xD3EE, 0x5012}, //13084 #CJK UNIFIED IDEOGRAPH + {0xD3EF, 0x5200}, //13085 #CJK UNIFIED IDEOGRAPH + {0xD3F0, 0x5230}, //13086 #CJK UNIFIED IDEOGRAPH + {0xD3F1, 0x5716}, //13087 #CJK UNIFIED IDEOGRAPH + {0xD3F2, 0x5835}, //13088 #CJK UNIFIED IDEOGRAPH + {0xD3F3, 0x5857}, //13089 #CJK UNIFIED IDEOGRAPH + {0xD3F4, 0x5C0E}, //13090 #CJK UNIFIED IDEOGRAPH + {0xD3F5, 0x5C60}, //13091 #CJK UNIFIED IDEOGRAPH + {0xD3F6, 0x5CF6}, //13092 #CJK UNIFIED IDEOGRAPH + {0xD3F7, 0x5D8B}, //13093 #CJK UNIFIED IDEOGRAPH + {0xD3F8, 0x5EA6}, //13094 #CJK UNIFIED IDEOGRAPH + {0xD3F9, 0x5F92}, //13095 #CJK UNIFIED IDEOGRAPH + {0xD3FA, 0x60BC}, //13096 #CJK UNIFIED IDEOGRAPH + {0xD3FB, 0x6311}, //13097 #CJK UNIFIED IDEOGRAPH + {0xD3FC, 0x6389}, //13098 #CJK UNIFIED IDEOGRAPH + {0xD3FD, 0x6417}, //13099 #CJK UNIFIED IDEOGRAPH + {0xD3FE, 0x6843}, //13100 #CJK UNIFIED IDEOGRAPH + {0xD4A1, 0x68F9}, //13101 #CJK UNIFIED IDEOGRAPH + {0xD4A2, 0x6AC2}, //13102 #CJK UNIFIED IDEOGRAPH + {0xD4A3, 0x6DD8}, //13103 #CJK UNIFIED IDEOGRAPH + {0xD4A4, 0x6E21}, //13104 #CJK UNIFIED IDEOGRAPH + {0xD4A5, 0x6ED4}, //13105 #CJK UNIFIED IDEOGRAPH + {0xD4A6, 0x6FE4}, //13106 #CJK UNIFIED IDEOGRAPH + {0xD4A7, 0x71FE}, //13107 #CJK UNIFIED IDEOGRAPH + {0xD4A8, 0x76DC}, //13108 #CJK UNIFIED IDEOGRAPH + {0xD4A9, 0x7779}, //13109 #CJK UNIFIED IDEOGRAPH + {0xD4AA, 0x79B1}, //13110 #CJK UNIFIED IDEOGRAPH + {0xD4AB, 0x7A3B}, //13111 #CJK UNIFIED IDEOGRAPH + {0xD4AC, 0x8404}, //13112 #CJK UNIFIED IDEOGRAPH + {0xD4AD, 0x89A9}, //13113 #CJK UNIFIED IDEOGRAPH + {0xD4AE, 0x8CED}, //13114 #CJK UNIFIED IDEOGRAPH + {0xD4AF, 0x8DF3}, //13115 #CJK UNIFIED IDEOGRAPH + {0xD4B0, 0x8E48}, //13116 #CJK UNIFIED IDEOGRAPH + {0xD4B1, 0x9003}, //13117 #CJK UNIFIED IDEOGRAPH + {0xD4B2, 0x9014}, //13118 #CJK UNIFIED IDEOGRAPH + {0xD4B3, 0x9053}, //13119 #CJK UNIFIED IDEOGRAPH + {0xD4B4, 0x90FD}, //13120 #CJK UNIFIED IDEOGRAPH + {0xD4B5, 0x934D}, //13121 #CJK UNIFIED IDEOGRAPH + {0xD4B6, 0x9676}, //13122 #CJK UNIFIED IDEOGRAPH + {0xD4B7, 0x97DC}, //13123 #CJK UNIFIED IDEOGRAPH + {0xD4B8, 0x6BD2}, //13124 #CJK UNIFIED IDEOGRAPH + {0xD4B9, 0x7006}, //13125 #CJK UNIFIED IDEOGRAPH + {0xD4BA, 0x7258}, //13126 #CJK UNIFIED IDEOGRAPH + {0xD4BB, 0x72A2}, //13127 #CJK UNIFIED IDEOGRAPH + {0xD4BC, 0x7368}, //13128 #CJK UNIFIED IDEOGRAPH + {0xD4BD, 0x7763}, //13129 #CJK UNIFIED IDEOGRAPH + {0xD4BE, 0x79BF}, //13130 #CJK UNIFIED IDEOGRAPH + {0xD4BF, 0x7BE4}, //13131 #CJK UNIFIED IDEOGRAPH + {0xD4C0, 0x7E9B}, //13132 #CJK UNIFIED IDEOGRAPH + {0xD4C1, 0x8B80}, //13133 #CJK UNIFIED IDEOGRAPH + {0xD4C2, 0x58A9}, //13134 #CJK UNIFIED IDEOGRAPH + {0xD4C3, 0x60C7}, //13135 #CJK UNIFIED IDEOGRAPH + {0xD4C4, 0x6566}, //13136 #CJK UNIFIED IDEOGRAPH + {0xD4C5, 0x65FD}, //13137 #CJK UNIFIED IDEOGRAPH + {0xD4C6, 0x66BE}, //13138 #CJK UNIFIED IDEOGRAPH + {0xD4C7, 0x6C8C}, //13139 #CJK UNIFIED IDEOGRAPH + {0xD4C8, 0x711E}, //13140 #CJK UNIFIED IDEOGRAPH + {0xD4C9, 0x71C9}, //13141 #CJK UNIFIED IDEOGRAPH + {0xD4CA, 0x8C5A}, //13142 #CJK UNIFIED IDEOGRAPH + {0xD4CB, 0x9813}, //13143 #CJK UNIFIED IDEOGRAPH + {0xD4CC, 0x4E6D}, //13144 #CJK UNIFIED IDEOGRAPH + {0xD4CD, 0x7A81}, //13145 #CJK UNIFIED IDEOGRAPH + {0xD4CE, 0x4EDD}, //13146 #CJK UNIFIED IDEOGRAPH + {0xD4CF, 0x51AC}, //13147 #CJK UNIFIED IDEOGRAPH + {0xD4D0, 0x51CD}, //13148 #CJK UNIFIED IDEOGRAPH + {0xD4D1, 0x52D5}, //13149 #CJK UNIFIED IDEOGRAPH + {0xD4D2, 0x540C}, //13150 #CJK UNIFIED IDEOGRAPH + {0xD4D3, 0x61A7}, //13151 #CJK UNIFIED IDEOGRAPH + {0xD4D4, 0x6771}, //13152 #CJK UNIFIED IDEOGRAPH + {0xD4D5, 0x6850}, //13153 #CJK UNIFIED IDEOGRAPH + {0xD4D6, 0x68DF}, //13154 #CJK UNIFIED IDEOGRAPH + {0xD4D7, 0x6D1E}, //13155 #CJK UNIFIED IDEOGRAPH + {0xD4D8, 0x6F7C}, //13156 #CJK UNIFIED IDEOGRAPH + {0xD4D9, 0x75BC}, //13157 #CJK UNIFIED IDEOGRAPH + {0xD4DA, 0x77B3}, //13158 #CJK UNIFIED IDEOGRAPH + {0xD4DB, 0x7AE5}, //13159 #CJK UNIFIED IDEOGRAPH + {0xD4DC, 0x80F4}, //13160 #CJK UNIFIED IDEOGRAPH + {0xD4DD, 0x8463}, //13161 #CJK UNIFIED IDEOGRAPH + {0xD4DE, 0x9285}, //13162 #CJK UNIFIED IDEOGRAPH + {0xD4DF, 0x515C}, //13163 #CJK UNIFIED IDEOGRAPH + {0xD4E0, 0x6597}, //13164 #CJK UNIFIED IDEOGRAPH + {0xD4E1, 0x675C}, //13165 #CJK UNIFIED IDEOGRAPH + {0xD4E2, 0x6793}, //13166 #CJK UNIFIED IDEOGRAPH + {0xD4E3, 0x75D8}, //13167 #CJK UNIFIED IDEOGRAPH + {0xD4E4, 0x7AC7}, //13168 #CJK UNIFIED IDEOGRAPH + {0xD4E5, 0x8373}, //13169 #CJK UNIFIED IDEOGRAPH + {0xD4E6, 0xF95A}, //13170 #CJK COMPATIBILITY IDEOGRAPH + {0xD4E7, 0x8C46}, //13171 #CJK UNIFIED IDEOGRAPH + {0xD4E8, 0x9017}, //13172 #CJK UNIFIED IDEOGRAPH + {0xD4E9, 0x982D}, //13173 #CJK UNIFIED IDEOGRAPH + {0xD4EA, 0x5C6F}, //13174 #CJK UNIFIED IDEOGRAPH + {0xD4EB, 0x81C0}, //13175 #CJK UNIFIED IDEOGRAPH + {0xD4EC, 0x829A}, //13176 #CJK UNIFIED IDEOGRAPH + {0xD4ED, 0x9041}, //13177 #CJK UNIFIED IDEOGRAPH + {0xD4EE, 0x906F}, //13178 #CJK UNIFIED IDEOGRAPH + {0xD4EF, 0x920D}, //13179 #CJK UNIFIED IDEOGRAPH + {0xD4F0, 0x5F97}, //13180 #CJK UNIFIED IDEOGRAPH + {0xD4F1, 0x5D9D}, //13181 #CJK UNIFIED IDEOGRAPH + {0xD4F2, 0x6A59}, //13182 #CJK UNIFIED IDEOGRAPH + {0xD4F3, 0x71C8}, //13183 #CJK UNIFIED IDEOGRAPH + {0xD4F4, 0x767B}, //13184 #CJK UNIFIED IDEOGRAPH + {0xD4F5, 0x7B49}, //13185 #CJK UNIFIED IDEOGRAPH + {0xD4F6, 0x85E4}, //13186 #CJK UNIFIED IDEOGRAPH + {0xD4F7, 0x8B04}, //13187 #CJK UNIFIED IDEOGRAPH + {0xD4F8, 0x9127}, //13188 #CJK UNIFIED IDEOGRAPH + {0xD4F9, 0x9A30}, //13189 #CJK UNIFIED IDEOGRAPH + {0xD4FA, 0x5587}, //13190 #CJK UNIFIED IDEOGRAPH + {0xD4FB, 0x61F6}, //13191 #CJK UNIFIED IDEOGRAPH + {0xD4FC, 0xF95B}, //13192 #CJK COMPATIBILITY IDEOGRAPH + {0xD4FD, 0x7669}, //13193 #CJK UNIFIED IDEOGRAPH + {0xD4FE, 0x7F85}, //13194 #CJK UNIFIED IDEOGRAPH + {0xD5A1, 0x863F}, //13195 #CJK UNIFIED IDEOGRAPH + {0xD5A2, 0x87BA}, //13196 #CJK UNIFIED IDEOGRAPH + {0xD5A3, 0x88F8}, //13197 #CJK UNIFIED IDEOGRAPH + {0xD5A4, 0x908F}, //13198 #CJK UNIFIED IDEOGRAPH + {0xD5A5, 0xF95C}, //13199 #CJK COMPATIBILITY IDEOGRAPH + {0xD5A6, 0x6D1B}, //13200 #CJK UNIFIED IDEOGRAPH + {0xD5A7, 0x70D9}, //13201 #CJK UNIFIED IDEOGRAPH + {0xD5A8, 0x73DE}, //13202 #CJK UNIFIED IDEOGRAPH + {0xD5A9, 0x7D61}, //13203 #CJK UNIFIED IDEOGRAPH + {0xD5AA, 0x843D}, //13204 #CJK UNIFIED IDEOGRAPH + {0xD5AB, 0xF95D}, //13205 #CJK COMPATIBILITY IDEOGRAPH + {0xD5AC, 0x916A}, //13206 #CJK UNIFIED IDEOGRAPH + {0xD5AD, 0x99F1}, //13207 #CJK UNIFIED IDEOGRAPH + {0xD5AE, 0xF95E}, //13208 #CJK COMPATIBILITY IDEOGRAPH + {0xD5AF, 0x4E82}, //13209 #CJK UNIFIED IDEOGRAPH + {0xD5B0, 0x5375}, //13210 #CJK UNIFIED IDEOGRAPH + {0xD5B1, 0x6B04}, //13211 #CJK UNIFIED IDEOGRAPH + {0xD5B2, 0x6B12}, //13212 #CJK UNIFIED IDEOGRAPH + {0xD5B3, 0x703E}, //13213 #CJK UNIFIED IDEOGRAPH + {0xD5B4, 0x721B}, //13214 #CJK UNIFIED IDEOGRAPH + {0xD5B5, 0x862D}, //13215 #CJK UNIFIED IDEOGRAPH + {0xD5B6, 0x9E1E}, //13216 #CJK UNIFIED IDEOGRAPH + {0xD5B7, 0x524C}, //13217 #CJK UNIFIED IDEOGRAPH + {0xD5B8, 0x8FA3}, //13218 #CJK UNIFIED IDEOGRAPH + {0xD5B9, 0x5D50}, //13219 #CJK UNIFIED IDEOGRAPH + {0xD5BA, 0x64E5}, //13220 #CJK UNIFIED IDEOGRAPH + {0xD5BB, 0x652C}, //13221 #CJK UNIFIED IDEOGRAPH + {0xD5BC, 0x6B16}, //13222 #CJK UNIFIED IDEOGRAPH + {0xD5BD, 0x6FEB}, //13223 #CJK UNIFIED IDEOGRAPH + {0xD5BE, 0x7C43}, //13224 #CJK UNIFIED IDEOGRAPH + {0xD5BF, 0x7E9C}, //13225 #CJK UNIFIED IDEOGRAPH + {0xD5C0, 0x85CD}, //13226 #CJK UNIFIED IDEOGRAPH + {0xD5C1, 0x8964}, //13227 #CJK UNIFIED IDEOGRAPH + {0xD5C2, 0x89BD}, //13228 #CJK UNIFIED IDEOGRAPH + {0xD5C3, 0x62C9}, //13229 #CJK UNIFIED IDEOGRAPH + {0xD5C4, 0x81D8}, //13230 #CJK UNIFIED IDEOGRAPH + {0xD5C5, 0x881F}, //13231 #CJK UNIFIED IDEOGRAPH + {0xD5C6, 0x5ECA}, //13232 #CJK UNIFIED IDEOGRAPH + {0xD5C7, 0x6717}, //13233 #CJK UNIFIED IDEOGRAPH + {0xD5C8, 0x6D6A}, //13234 #CJK UNIFIED IDEOGRAPH + {0xD5C9, 0x72FC}, //13235 #CJK UNIFIED IDEOGRAPH + {0xD5CA, 0x7405}, //13236 #CJK UNIFIED IDEOGRAPH + {0xD5CB, 0x746F}, //13237 #CJK UNIFIED IDEOGRAPH + {0xD5CC, 0x8782}, //13238 #CJK UNIFIED IDEOGRAPH + {0xD5CD, 0x90DE}, //13239 #CJK UNIFIED IDEOGRAPH + {0xD5CE, 0x4F86}, //13240 #CJK UNIFIED IDEOGRAPH + {0xD5CF, 0x5D0D}, //13241 #CJK UNIFIED IDEOGRAPH + {0xD5D0, 0x5FA0}, //13242 #CJK UNIFIED IDEOGRAPH + {0xD5D1, 0x840A}, //13243 #CJK UNIFIED IDEOGRAPH + {0xD5D2, 0x51B7}, //13244 #CJK UNIFIED IDEOGRAPH + {0xD5D3, 0x63A0}, //13245 #CJK UNIFIED IDEOGRAPH + {0xD5D4, 0x7565}, //13246 #CJK UNIFIED IDEOGRAPH + {0xD5D5, 0x4EAE}, //13247 #CJK UNIFIED IDEOGRAPH + {0xD5D6, 0x5006}, //13248 #CJK UNIFIED IDEOGRAPH + {0xD5D7, 0x5169}, //13249 #CJK UNIFIED IDEOGRAPH + {0xD5D8, 0x51C9}, //13250 #CJK UNIFIED IDEOGRAPH + {0xD5D9, 0x6881}, //13251 #CJK UNIFIED IDEOGRAPH + {0xD5DA, 0x6A11}, //13252 #CJK UNIFIED IDEOGRAPH + {0xD5DB, 0x7CAE}, //13253 #CJK UNIFIED IDEOGRAPH + {0xD5DC, 0x7CB1}, //13254 #CJK UNIFIED IDEOGRAPH + {0xD5DD, 0x7CE7}, //13255 #CJK UNIFIED IDEOGRAPH + {0xD5DE, 0x826F}, //13256 #CJK UNIFIED IDEOGRAPH + {0xD5DF, 0x8AD2}, //13257 #CJK UNIFIED IDEOGRAPH + {0xD5E0, 0x8F1B}, //13258 #CJK UNIFIED IDEOGRAPH + {0xD5E1, 0x91CF}, //13259 #CJK UNIFIED IDEOGRAPH + {0xD5E2, 0x4FB6}, //13260 #CJK UNIFIED IDEOGRAPH + {0xD5E3, 0x5137}, //13261 #CJK UNIFIED IDEOGRAPH + {0xD5E4, 0x52F5}, //13262 #CJK UNIFIED IDEOGRAPH + {0xD5E5, 0x5442}, //13263 #CJK UNIFIED IDEOGRAPH + {0xD5E6, 0x5EEC}, //13264 #CJK UNIFIED IDEOGRAPH + {0xD5E7, 0x616E}, //13265 #CJK UNIFIED IDEOGRAPH + {0xD5E8, 0x623E}, //13266 #CJK UNIFIED IDEOGRAPH + {0xD5E9, 0x65C5}, //13267 #CJK UNIFIED IDEOGRAPH + {0xD5EA, 0x6ADA}, //13268 #CJK UNIFIED IDEOGRAPH + {0xD5EB, 0x6FFE}, //13269 #CJK UNIFIED IDEOGRAPH + {0xD5EC, 0x792A}, //13270 #CJK UNIFIED IDEOGRAPH + {0xD5ED, 0x85DC}, //13271 #CJK UNIFIED IDEOGRAPH + {0xD5EE, 0x8823}, //13272 #CJK UNIFIED IDEOGRAPH + {0xD5EF, 0x95AD}, //13273 #CJK UNIFIED IDEOGRAPH + {0xD5F0, 0x9A62}, //13274 #CJK UNIFIED IDEOGRAPH + {0xD5F1, 0x9A6A}, //13275 #CJK UNIFIED IDEOGRAPH + {0xD5F2, 0x9E97}, //13276 #CJK UNIFIED IDEOGRAPH + {0xD5F3, 0x9ECE}, //13277 #CJK UNIFIED IDEOGRAPH + {0xD5F4, 0x529B}, //13278 #CJK UNIFIED IDEOGRAPH + {0xD5F5, 0x66C6}, //13279 #CJK UNIFIED IDEOGRAPH + {0xD5F6, 0x6B77}, //13280 #CJK UNIFIED IDEOGRAPH + {0xD5F7, 0x701D}, //13281 #CJK UNIFIED IDEOGRAPH + {0xD5F8, 0x792B}, //13282 #CJK UNIFIED IDEOGRAPH + {0xD5F9, 0x8F62}, //13283 #CJK UNIFIED IDEOGRAPH + {0xD5FA, 0x9742}, //13284 #CJK UNIFIED IDEOGRAPH + {0xD5FB, 0x6190}, //13285 #CJK UNIFIED IDEOGRAPH + {0xD5FC, 0x6200}, //13286 #CJK UNIFIED IDEOGRAPH + {0xD5FD, 0x6523}, //13287 #CJK UNIFIED IDEOGRAPH + {0xD5FE, 0x6F23}, //13288 #CJK UNIFIED IDEOGRAPH + {0xD6A1, 0x7149}, //13289 #CJK UNIFIED IDEOGRAPH + {0xD6A2, 0x7489}, //13290 #CJK UNIFIED IDEOGRAPH + {0xD6A3, 0x7DF4}, //13291 #CJK UNIFIED IDEOGRAPH + {0xD6A4, 0x806F}, //13292 #CJK UNIFIED IDEOGRAPH + {0xD6A5, 0x84EE}, //13293 #CJK UNIFIED IDEOGRAPH + {0xD6A6, 0x8F26}, //13294 #CJK UNIFIED IDEOGRAPH + {0xD6A7, 0x9023}, //13295 #CJK UNIFIED IDEOGRAPH + {0xD6A8, 0x934A}, //13296 #CJK UNIFIED IDEOGRAPH + {0xD6A9, 0x51BD}, //13297 #CJK UNIFIED IDEOGRAPH + {0xD6AA, 0x5217}, //13298 #CJK UNIFIED IDEOGRAPH + {0xD6AB, 0x52A3}, //13299 #CJK UNIFIED IDEOGRAPH + {0xD6AC, 0x6D0C}, //13300 #CJK UNIFIED IDEOGRAPH + {0xD6AD, 0x70C8}, //13301 #CJK UNIFIED IDEOGRAPH + {0xD6AE, 0x88C2}, //13302 #CJK UNIFIED IDEOGRAPH + {0xD6AF, 0x5EC9}, //13303 #CJK UNIFIED IDEOGRAPH + {0xD6B0, 0x6582}, //13304 #CJK UNIFIED IDEOGRAPH + {0xD6B1, 0x6BAE}, //13305 #CJK UNIFIED IDEOGRAPH + {0xD6B2, 0x6FC2}, //13306 #CJK UNIFIED IDEOGRAPH + {0xD6B3, 0x7C3E}, //13307 #CJK UNIFIED IDEOGRAPH + {0xD6B4, 0x7375}, //13308 #CJK UNIFIED IDEOGRAPH + {0xD6B5, 0x4EE4}, //13309 #CJK UNIFIED IDEOGRAPH + {0xD6B6, 0x4F36}, //13310 #CJK UNIFIED IDEOGRAPH + {0xD6B7, 0x56F9}, //13311 #CJK UNIFIED IDEOGRAPH + {0xD6B8, 0xF95F}, //13312 #CJK COMPATIBILITY IDEOGRAPH + {0xD6B9, 0x5CBA}, //13313 #CJK UNIFIED IDEOGRAPH + {0xD6BA, 0x5DBA}, //13314 #CJK UNIFIED IDEOGRAPH + {0xD6BB, 0x601C}, //13315 #CJK UNIFIED IDEOGRAPH + {0xD6BC, 0x73B2}, //13316 #CJK UNIFIED IDEOGRAPH + {0xD6BD, 0x7B2D}, //13317 #CJK UNIFIED IDEOGRAPH + {0xD6BE, 0x7F9A}, //13318 #CJK UNIFIED IDEOGRAPH + {0xD6BF, 0x7FCE}, //13319 #CJK UNIFIED IDEOGRAPH + {0xD6C0, 0x8046}, //13320 #CJK UNIFIED IDEOGRAPH + {0xD6C1, 0x901E}, //13321 #CJK UNIFIED IDEOGRAPH + {0xD6C2, 0x9234}, //13322 #CJK UNIFIED IDEOGRAPH + {0xD6C3, 0x96F6}, //13323 #CJK UNIFIED IDEOGRAPH + {0xD6C4, 0x9748}, //13324 #CJK UNIFIED IDEOGRAPH + {0xD6C5, 0x9818}, //13325 #CJK UNIFIED IDEOGRAPH + {0xD6C6, 0x9F61}, //13326 #CJK UNIFIED IDEOGRAPH + {0xD6C7, 0x4F8B}, //13327 #CJK UNIFIED IDEOGRAPH + {0xD6C8, 0x6FA7}, //13328 #CJK UNIFIED IDEOGRAPH + {0xD6C9, 0x79AE}, //13329 #CJK UNIFIED IDEOGRAPH + {0xD6CA, 0x91B4}, //13330 #CJK UNIFIED IDEOGRAPH + {0xD6CB, 0x96B7}, //13331 #CJK UNIFIED IDEOGRAPH + {0xD6CC, 0x52DE}, //13332 #CJK UNIFIED IDEOGRAPH + {0xD6CD, 0xF960}, //13333 #CJK COMPATIBILITY IDEOGRAPH + {0xD6CE, 0x6488}, //13334 #CJK UNIFIED IDEOGRAPH + {0xD6CF, 0x64C4}, //13335 #CJK UNIFIED IDEOGRAPH + {0xD6D0, 0x6AD3}, //13336 #CJK UNIFIED IDEOGRAPH + {0xD6D1, 0x6F5E}, //13337 #CJK UNIFIED IDEOGRAPH + {0xD6D2, 0x7018}, //13338 #CJK UNIFIED IDEOGRAPH + {0xD6D3, 0x7210}, //13339 #CJK UNIFIED IDEOGRAPH + {0xD6D4, 0x76E7}, //13340 #CJK UNIFIED IDEOGRAPH + {0xD6D5, 0x8001}, //13341 #CJK UNIFIED IDEOGRAPH + {0xD6D6, 0x8606}, //13342 #CJK UNIFIED IDEOGRAPH + {0xD6D7, 0x865C}, //13343 #CJK UNIFIED IDEOGRAPH + {0xD6D8, 0x8DEF}, //13344 #CJK UNIFIED IDEOGRAPH + {0xD6D9, 0x8F05}, //13345 #CJK UNIFIED IDEOGRAPH + {0xD6DA, 0x9732}, //13346 #CJK UNIFIED IDEOGRAPH + {0xD6DB, 0x9B6F}, //13347 #CJK UNIFIED IDEOGRAPH + {0xD6DC, 0x9DFA}, //13348 #CJK UNIFIED IDEOGRAPH + {0xD6DD, 0x9E75}, //13349 #CJK UNIFIED IDEOGRAPH + {0xD6DE, 0x788C}, //13350 #CJK UNIFIED IDEOGRAPH + {0xD6DF, 0x797F}, //13351 #CJK UNIFIED IDEOGRAPH + {0xD6E0, 0x7DA0}, //13352 #CJK UNIFIED IDEOGRAPH + {0xD6E1, 0x83C9}, //13353 #CJK UNIFIED IDEOGRAPH + {0xD6E2, 0x9304}, //13354 #CJK UNIFIED IDEOGRAPH + {0xD6E3, 0x9E7F}, //13355 #CJK UNIFIED IDEOGRAPH + {0xD6E4, 0x9E93}, //13356 #CJK UNIFIED IDEOGRAPH + {0xD6E5, 0x8AD6}, //13357 #CJK UNIFIED IDEOGRAPH + {0xD6E6, 0x58DF}, //13358 #CJK UNIFIED IDEOGRAPH + {0xD6E7, 0x5F04}, //13359 #CJK UNIFIED IDEOGRAPH + {0xD6E8, 0x6727}, //13360 #CJK UNIFIED IDEOGRAPH + {0xD6E9, 0x7027}, //13361 #CJK UNIFIED IDEOGRAPH + {0xD6EA, 0x74CF}, //13362 #CJK UNIFIED IDEOGRAPH + {0xD6EB, 0x7C60}, //13363 #CJK UNIFIED IDEOGRAPH + {0xD6EC, 0x807E}, //13364 #CJK UNIFIED IDEOGRAPH + {0xD6ED, 0x5121}, //13365 #CJK UNIFIED IDEOGRAPH + {0xD6EE, 0x7028}, //13366 #CJK UNIFIED IDEOGRAPH + {0xD6EF, 0x7262}, //13367 #CJK UNIFIED IDEOGRAPH + {0xD6F0, 0x78CA}, //13368 #CJK UNIFIED IDEOGRAPH + {0xD6F1, 0x8CC2}, //13369 #CJK UNIFIED IDEOGRAPH + {0xD6F2, 0x8CDA}, //13370 #CJK UNIFIED IDEOGRAPH + {0xD6F3, 0x8CF4}, //13371 #CJK UNIFIED IDEOGRAPH + {0xD6F4, 0x96F7}, //13372 #CJK UNIFIED IDEOGRAPH + {0xD6F5, 0x4E86}, //13373 #CJK UNIFIED IDEOGRAPH + {0xD6F6, 0x50DA}, //13374 #CJK UNIFIED IDEOGRAPH + {0xD6F7, 0x5BEE}, //13375 #CJK UNIFIED IDEOGRAPH + {0xD6F8, 0x5ED6}, //13376 #CJK UNIFIED IDEOGRAPH + {0xD6F9, 0x6599}, //13377 #CJK UNIFIED IDEOGRAPH + {0xD6FA, 0x71CE}, //13378 #CJK UNIFIED IDEOGRAPH + {0xD6FB, 0x7642}, //13379 #CJK UNIFIED IDEOGRAPH + {0xD6FC, 0x77AD}, //13380 #CJK UNIFIED IDEOGRAPH + {0xD6FD, 0x804A}, //13381 #CJK UNIFIED IDEOGRAPH + {0xD6FE, 0x84FC}, //13382 #CJK UNIFIED IDEOGRAPH + {0xD7A1, 0x907C}, //13383 #CJK UNIFIED IDEOGRAPH + {0xD7A2, 0x9B27}, //13384 #CJK UNIFIED IDEOGRAPH + {0xD7A3, 0x9F8D}, //13385 #CJK UNIFIED IDEOGRAPH + {0xD7A4, 0x58D8}, //13386 #CJK UNIFIED IDEOGRAPH + {0xD7A5, 0x5A41}, //13387 #CJK UNIFIED IDEOGRAPH + {0xD7A6, 0x5C62}, //13388 #CJK UNIFIED IDEOGRAPH + {0xD7A7, 0x6A13}, //13389 #CJK UNIFIED IDEOGRAPH + {0xD7A8, 0x6DDA}, //13390 #CJK UNIFIED IDEOGRAPH + {0xD7A9, 0x6F0F}, //13391 #CJK UNIFIED IDEOGRAPH + {0xD7AA, 0x763B}, //13392 #CJK UNIFIED IDEOGRAPH + {0xD7AB, 0x7D2F}, //13393 #CJK UNIFIED IDEOGRAPH + {0xD7AC, 0x7E37}, //13394 #CJK UNIFIED IDEOGRAPH + {0xD7AD, 0x851E}, //13395 #CJK UNIFIED IDEOGRAPH + {0xD7AE, 0x8938}, //13396 #CJK UNIFIED IDEOGRAPH + {0xD7AF, 0x93E4}, //13397 #CJK UNIFIED IDEOGRAPH + {0xD7B0, 0x964B}, //13398 #CJK UNIFIED IDEOGRAPH + {0xD7B1, 0x5289}, //13399 #CJK UNIFIED IDEOGRAPH + {0xD7B2, 0x65D2}, //13400 #CJK UNIFIED IDEOGRAPH + {0xD7B3, 0x67F3}, //13401 #CJK UNIFIED IDEOGRAPH + {0xD7B4, 0x69B4}, //13402 #CJK UNIFIED IDEOGRAPH + {0xD7B5, 0x6D41}, //13403 #CJK UNIFIED IDEOGRAPH + {0xD7B6, 0x6E9C}, //13404 #CJK UNIFIED IDEOGRAPH + {0xD7B7, 0x700F}, //13405 #CJK UNIFIED IDEOGRAPH + {0xD7B8, 0x7409}, //13406 #CJK UNIFIED IDEOGRAPH + {0xD7B9, 0x7460}, //13407 #CJK UNIFIED IDEOGRAPH + {0xD7BA, 0x7559}, //13408 #CJK UNIFIED IDEOGRAPH + {0xD7BB, 0x7624}, //13409 #CJK UNIFIED IDEOGRAPH + {0xD7BC, 0x786B}, //13410 #CJK UNIFIED IDEOGRAPH + {0xD7BD, 0x8B2C}, //13411 #CJK UNIFIED IDEOGRAPH + {0xD7BE, 0x985E}, //13412 #CJK UNIFIED IDEOGRAPH + {0xD7BF, 0x516D}, //13413 #CJK UNIFIED IDEOGRAPH + {0xD7C0, 0x622E}, //13414 #CJK UNIFIED IDEOGRAPH + {0xD7C1, 0x9678}, //13415 #CJK UNIFIED IDEOGRAPH + {0xD7C2, 0x4F96}, //13416 #CJK UNIFIED IDEOGRAPH + {0xD7C3, 0x502B}, //13417 #CJK UNIFIED IDEOGRAPH + {0xD7C4, 0x5D19}, //13418 #CJK UNIFIED IDEOGRAPH + {0xD7C5, 0x6DEA}, //13419 #CJK UNIFIED IDEOGRAPH + {0xD7C6, 0x7DB8}, //13420 #CJK UNIFIED IDEOGRAPH + {0xD7C7, 0x8F2A}, //13421 #CJK UNIFIED IDEOGRAPH + {0xD7C8, 0x5F8B}, //13422 #CJK UNIFIED IDEOGRAPH + {0xD7C9, 0x6144}, //13423 #CJK UNIFIED IDEOGRAPH + {0xD7CA, 0x6817}, //13424 #CJK UNIFIED IDEOGRAPH + {0xD7CB, 0xF961}, //13425 #CJK COMPATIBILITY IDEOGRAPH + {0xD7CC, 0x9686}, //13426 #CJK UNIFIED IDEOGRAPH + {0xD7CD, 0x52D2}, //13427 #CJK UNIFIED IDEOGRAPH + {0xD7CE, 0x808B}, //13428 #CJK UNIFIED IDEOGRAPH + {0xD7CF, 0x51DC}, //13429 #CJK UNIFIED IDEOGRAPH + {0xD7D0, 0x51CC}, //13430 #CJK UNIFIED IDEOGRAPH + {0xD7D1, 0x695E}, //13431 #CJK UNIFIED IDEOGRAPH + {0xD7D2, 0x7A1C}, //13432 #CJK UNIFIED IDEOGRAPH + {0xD7D3, 0x7DBE}, //13433 #CJK UNIFIED IDEOGRAPH + {0xD7D4, 0x83F1}, //13434 #CJK UNIFIED IDEOGRAPH + {0xD7D5, 0x9675}, //13435 #CJK UNIFIED IDEOGRAPH + {0xD7D6, 0x4FDA}, //13436 #CJK UNIFIED IDEOGRAPH + {0xD7D7, 0x5229}, //13437 #CJK UNIFIED IDEOGRAPH + {0xD7D8, 0x5398}, //13438 #CJK UNIFIED IDEOGRAPH + {0xD7D9, 0x540F}, //13439 #CJK UNIFIED IDEOGRAPH + {0xD7DA, 0x550E}, //13440 #CJK UNIFIED IDEOGRAPH + {0xD7DB, 0x5C65}, //13441 #CJK UNIFIED IDEOGRAPH + {0xD7DC, 0x60A7}, //13442 #CJK UNIFIED IDEOGRAPH + {0xD7DD, 0x674E}, //13443 #CJK UNIFIED IDEOGRAPH + {0xD7DE, 0x68A8}, //13444 #CJK UNIFIED IDEOGRAPH + {0xD7DF, 0x6D6C}, //13445 #CJK UNIFIED IDEOGRAPH + {0xD7E0, 0x7281}, //13446 #CJK UNIFIED IDEOGRAPH + {0xD7E1, 0x72F8}, //13447 #CJK UNIFIED IDEOGRAPH + {0xD7E2, 0x7406}, //13448 #CJK UNIFIED IDEOGRAPH + {0xD7E3, 0x7483}, //13449 #CJK UNIFIED IDEOGRAPH + {0xD7E4, 0xF962}, //13450 #CJK COMPATIBILITY IDEOGRAPH + {0xD7E5, 0x75E2}, //13451 #CJK UNIFIED IDEOGRAPH + {0xD7E6, 0x7C6C}, //13452 #CJK UNIFIED IDEOGRAPH + {0xD7E7, 0x7F79}, //13453 #CJK UNIFIED IDEOGRAPH + {0xD7E8, 0x7FB8}, //13454 #CJK UNIFIED IDEOGRAPH + {0xD7E9, 0x8389}, //13455 #CJK UNIFIED IDEOGRAPH + {0xD7EA, 0x88CF}, //13456 #CJK UNIFIED IDEOGRAPH + {0xD7EB, 0x88E1}, //13457 #CJK UNIFIED IDEOGRAPH + {0xD7EC, 0x91CC}, //13458 #CJK UNIFIED IDEOGRAPH + {0xD7ED, 0x91D0}, //13459 #CJK UNIFIED IDEOGRAPH + {0xD7EE, 0x96E2}, //13460 #CJK UNIFIED IDEOGRAPH + {0xD7EF, 0x9BC9}, //13461 #CJK UNIFIED IDEOGRAPH + {0xD7F0, 0x541D}, //13462 #CJK UNIFIED IDEOGRAPH + {0xD7F1, 0x6F7E}, //13463 #CJK UNIFIED IDEOGRAPH + {0xD7F2, 0x71D0}, //13464 #CJK UNIFIED IDEOGRAPH + {0xD7F3, 0x7498}, //13465 #CJK UNIFIED IDEOGRAPH + {0xD7F4, 0x85FA}, //13466 #CJK UNIFIED IDEOGRAPH + {0xD7F5, 0x8EAA}, //13467 #CJK UNIFIED IDEOGRAPH + {0xD7F6, 0x96A3}, //13468 #CJK UNIFIED IDEOGRAPH + {0xD7F7, 0x9C57}, //13469 #CJK UNIFIED IDEOGRAPH + {0xD7F8, 0x9E9F}, //13470 #CJK UNIFIED IDEOGRAPH + {0xD7F9, 0x6797}, //13471 #CJK UNIFIED IDEOGRAPH + {0xD7FA, 0x6DCB}, //13472 #CJK UNIFIED IDEOGRAPH + {0xD7FB, 0x7433}, //13473 #CJK UNIFIED IDEOGRAPH + {0xD7FC, 0x81E8}, //13474 #CJK UNIFIED IDEOGRAPH + {0xD7FD, 0x9716}, //13475 #CJK UNIFIED IDEOGRAPH + {0xD7FE, 0x782C}, //13476 #CJK UNIFIED IDEOGRAPH + {0xD8A1, 0x7ACB}, //13477 #CJK UNIFIED IDEOGRAPH + {0xD8A2, 0x7B20}, //13478 #CJK UNIFIED IDEOGRAPH + {0xD8A3, 0x7C92}, //13479 #CJK UNIFIED IDEOGRAPH + {0xD8A4, 0x6469}, //13480 #CJK UNIFIED IDEOGRAPH + {0xD8A5, 0x746A}, //13481 #CJK UNIFIED IDEOGRAPH + {0xD8A6, 0x75F2}, //13482 #CJK UNIFIED IDEOGRAPH + {0xD8A7, 0x78BC}, //13483 #CJK UNIFIED IDEOGRAPH + {0xD8A8, 0x78E8}, //13484 #CJK UNIFIED IDEOGRAPH + {0xD8A9, 0x99AC}, //13485 #CJK UNIFIED IDEOGRAPH + {0xD8AA, 0x9B54}, //13486 #CJK UNIFIED IDEOGRAPH + {0xD8AB, 0x9EBB}, //13487 #CJK UNIFIED IDEOGRAPH + {0xD8AC, 0x5BDE}, //13488 #CJK UNIFIED IDEOGRAPH + {0xD8AD, 0x5E55}, //13489 #CJK UNIFIED IDEOGRAPH + {0xD8AE, 0x6F20}, //13490 #CJK UNIFIED IDEOGRAPH + {0xD8AF, 0x819C}, //13491 #CJK UNIFIED IDEOGRAPH + {0xD8B0, 0x83AB}, //13492 #CJK UNIFIED IDEOGRAPH + {0xD8B1, 0x9088}, //13493 #CJK UNIFIED IDEOGRAPH + {0xD8B2, 0x4E07}, //13494 #CJK UNIFIED IDEOGRAPH + {0xD8B3, 0x534D}, //13495 #CJK UNIFIED IDEOGRAPH + {0xD8B4, 0x5A29}, //13496 #CJK UNIFIED IDEOGRAPH + {0xD8B5, 0x5DD2}, //13497 #CJK UNIFIED IDEOGRAPH + {0xD8B6, 0x5F4E}, //13498 #CJK UNIFIED IDEOGRAPH + {0xD8B7, 0x6162}, //13499 #CJK UNIFIED IDEOGRAPH + {0xD8B8, 0x633D}, //13500 #CJK UNIFIED IDEOGRAPH + {0xD8B9, 0x6669}, //13501 #CJK UNIFIED IDEOGRAPH + {0xD8BA, 0x66FC}, //13502 #CJK UNIFIED IDEOGRAPH + {0xD8BB, 0x6EFF}, //13503 #CJK UNIFIED IDEOGRAPH + {0xD8BC, 0x6F2B}, //13504 #CJK UNIFIED IDEOGRAPH + {0xD8BD, 0x7063}, //13505 #CJK UNIFIED IDEOGRAPH + {0xD8BE, 0x779E}, //13506 #CJK UNIFIED IDEOGRAPH + {0xD8BF, 0x842C}, //13507 #CJK UNIFIED IDEOGRAPH + {0xD8C0, 0x8513}, //13508 #CJK UNIFIED IDEOGRAPH + {0xD8C1, 0x883B}, //13509 #CJK UNIFIED IDEOGRAPH + {0xD8C2, 0x8F13}, //13510 #CJK UNIFIED IDEOGRAPH + {0xD8C3, 0x9945}, //13511 #CJK UNIFIED IDEOGRAPH + {0xD8C4, 0x9C3B}, //13512 #CJK UNIFIED IDEOGRAPH + {0xD8C5, 0x551C}, //13513 #CJK UNIFIED IDEOGRAPH + {0xD8C6, 0x62B9}, //13514 #CJK UNIFIED IDEOGRAPH + {0xD8C7, 0x672B}, //13515 #CJK UNIFIED IDEOGRAPH + {0xD8C8, 0x6CAB}, //13516 #CJK UNIFIED IDEOGRAPH + {0xD8C9, 0x8309}, //13517 #CJK UNIFIED IDEOGRAPH + {0xD8CA, 0x896A}, //13518 #CJK UNIFIED IDEOGRAPH + {0xD8CB, 0x977A}, //13519 #CJK UNIFIED IDEOGRAPH + {0xD8CC, 0x4EA1}, //13520 #CJK UNIFIED IDEOGRAPH + {0xD8CD, 0x5984}, //13521 #CJK UNIFIED IDEOGRAPH + {0xD8CE, 0x5FD8}, //13522 #CJK UNIFIED IDEOGRAPH + {0xD8CF, 0x5FD9}, //13523 #CJK UNIFIED IDEOGRAPH + {0xD8D0, 0x671B}, //13524 #CJK UNIFIED IDEOGRAPH + {0xD8D1, 0x7DB2}, //13525 #CJK UNIFIED IDEOGRAPH + {0xD8D2, 0x7F54}, //13526 #CJK UNIFIED IDEOGRAPH + {0xD8D3, 0x8292}, //13527 #CJK UNIFIED IDEOGRAPH + {0xD8D4, 0x832B}, //13528 #CJK UNIFIED IDEOGRAPH + {0xD8D5, 0x83BD}, //13529 #CJK UNIFIED IDEOGRAPH + {0xD8D6, 0x8F1E}, //13530 #CJK UNIFIED IDEOGRAPH + {0xD8D7, 0x9099}, //13531 #CJK UNIFIED IDEOGRAPH + {0xD8D8, 0x57CB}, //13532 #CJK UNIFIED IDEOGRAPH + {0xD8D9, 0x59B9}, //13533 #CJK UNIFIED IDEOGRAPH + {0xD8DA, 0x5A92}, //13534 #CJK UNIFIED IDEOGRAPH + {0xD8DB, 0x5BD0}, //13535 #CJK UNIFIED IDEOGRAPH + {0xD8DC, 0x6627}, //13536 #CJK UNIFIED IDEOGRAPH + {0xD8DD, 0x679A}, //13537 #CJK UNIFIED IDEOGRAPH + {0xD8DE, 0x6885}, //13538 #CJK UNIFIED IDEOGRAPH + {0xD8DF, 0x6BCF}, //13539 #CJK UNIFIED IDEOGRAPH + {0xD8E0, 0x7164}, //13540 #CJK UNIFIED IDEOGRAPH + {0xD8E1, 0x7F75}, //13541 #CJK UNIFIED IDEOGRAPH + {0xD8E2, 0x8CB7}, //13542 #CJK UNIFIED IDEOGRAPH + {0xD8E3, 0x8CE3}, //13543 #CJK UNIFIED IDEOGRAPH + {0xD8E4, 0x9081}, //13544 #CJK UNIFIED IDEOGRAPH + {0xD8E5, 0x9B45}, //13545 #CJK UNIFIED IDEOGRAPH + {0xD8E6, 0x8108}, //13546 #CJK UNIFIED IDEOGRAPH + {0xD8E7, 0x8C8A}, //13547 #CJK UNIFIED IDEOGRAPH + {0xD8E8, 0x964C}, //13548 #CJK UNIFIED IDEOGRAPH + {0xD8E9, 0x9A40}, //13549 #CJK UNIFIED IDEOGRAPH + {0xD8EA, 0x9EA5}, //13550 #CJK UNIFIED IDEOGRAPH + {0xD8EB, 0x5B5F}, //13551 #CJK UNIFIED IDEOGRAPH + {0xD8EC, 0x6C13}, //13552 #CJK UNIFIED IDEOGRAPH + {0xD8ED, 0x731B}, //13553 #CJK UNIFIED IDEOGRAPH + {0xD8EE, 0x76F2}, //13554 #CJK UNIFIED IDEOGRAPH + {0xD8EF, 0x76DF}, //13555 #CJK UNIFIED IDEOGRAPH + {0xD8F0, 0x840C}, //13556 #CJK UNIFIED IDEOGRAPH + {0xD8F1, 0x51AA}, //13557 #CJK UNIFIED IDEOGRAPH + {0xD8F2, 0x8993}, //13558 #CJK UNIFIED IDEOGRAPH + {0xD8F3, 0x514D}, //13559 #CJK UNIFIED IDEOGRAPH + {0xD8F4, 0x5195}, //13560 #CJK UNIFIED IDEOGRAPH + {0xD8F5, 0x52C9}, //13561 #CJK UNIFIED IDEOGRAPH + {0xD8F6, 0x68C9}, //13562 #CJK UNIFIED IDEOGRAPH + {0xD8F7, 0x6C94}, //13563 #CJK UNIFIED IDEOGRAPH + {0xD8F8, 0x7704}, //13564 #CJK UNIFIED IDEOGRAPH + {0xD8F9, 0x7720}, //13565 #CJK UNIFIED IDEOGRAPH + {0xD8FA, 0x7DBF}, //13566 #CJK UNIFIED IDEOGRAPH + {0xD8FB, 0x7DEC}, //13567 #CJK UNIFIED IDEOGRAPH + {0xD8FC, 0x9762}, //13568 #CJK UNIFIED IDEOGRAPH + {0xD8FD, 0x9EB5}, //13569 #CJK UNIFIED IDEOGRAPH + {0xD8FE, 0x6EC5}, //13570 #CJK UNIFIED IDEOGRAPH + {0xD9A1, 0x8511}, //13571 #CJK UNIFIED IDEOGRAPH + {0xD9A2, 0x51A5}, //13572 #CJK UNIFIED IDEOGRAPH + {0xD9A3, 0x540D}, //13573 #CJK UNIFIED IDEOGRAPH + {0xD9A4, 0x547D}, //13574 #CJK UNIFIED IDEOGRAPH + {0xD9A5, 0x660E}, //13575 #CJK UNIFIED IDEOGRAPH + {0xD9A6, 0x669D}, //13576 #CJK UNIFIED IDEOGRAPH + {0xD9A7, 0x6927}, //13577 #CJK UNIFIED IDEOGRAPH + {0xD9A8, 0x6E9F}, //13578 #CJK UNIFIED IDEOGRAPH + {0xD9A9, 0x76BF}, //13579 #CJK UNIFIED IDEOGRAPH + {0xD9AA, 0x7791}, //13580 #CJK UNIFIED IDEOGRAPH + {0xD9AB, 0x8317}, //13581 #CJK UNIFIED IDEOGRAPH + {0xD9AC, 0x84C2}, //13582 #CJK UNIFIED IDEOGRAPH + {0xD9AD, 0x879F}, //13583 #CJK UNIFIED IDEOGRAPH + {0xD9AE, 0x9169}, //13584 #CJK UNIFIED IDEOGRAPH + {0xD9AF, 0x9298}, //13585 #CJK UNIFIED IDEOGRAPH + {0xD9B0, 0x9CF4}, //13586 #CJK UNIFIED IDEOGRAPH + {0xD9B1, 0x8882}, //13587 #CJK UNIFIED IDEOGRAPH + {0xD9B2, 0x4FAE}, //13588 #CJK UNIFIED IDEOGRAPH + {0xD9B3, 0x5192}, //13589 #CJK UNIFIED IDEOGRAPH + {0xD9B4, 0x52DF}, //13590 #CJK UNIFIED IDEOGRAPH + {0xD9B5, 0x59C6}, //13591 #CJK UNIFIED IDEOGRAPH + {0xD9B6, 0x5E3D}, //13592 #CJK UNIFIED IDEOGRAPH + {0xD9B7, 0x6155}, //13593 #CJK UNIFIED IDEOGRAPH + {0xD9B8, 0x6478}, //13594 #CJK UNIFIED IDEOGRAPH + {0xD9B9, 0x6479}, //13595 #CJK UNIFIED IDEOGRAPH + {0xD9BA, 0x66AE}, //13596 #CJK UNIFIED IDEOGRAPH + {0xD9BB, 0x67D0}, //13597 #CJK UNIFIED IDEOGRAPH + {0xD9BC, 0x6A21}, //13598 #CJK UNIFIED IDEOGRAPH + {0xD9BD, 0x6BCD}, //13599 #CJK UNIFIED IDEOGRAPH + {0xD9BE, 0x6BDB}, //13600 #CJK UNIFIED IDEOGRAPH + {0xD9BF, 0x725F}, //13601 #CJK UNIFIED IDEOGRAPH + {0xD9C0, 0x7261}, //13602 #CJK UNIFIED IDEOGRAPH + {0xD9C1, 0x7441}, //13603 #CJK UNIFIED IDEOGRAPH + {0xD9C2, 0x7738}, //13604 #CJK UNIFIED IDEOGRAPH + {0xD9C3, 0x77DB}, //13605 #CJK UNIFIED IDEOGRAPH + {0xD9C4, 0x8017}, //13606 #CJK UNIFIED IDEOGRAPH + {0xD9C5, 0x82BC}, //13607 #CJK UNIFIED IDEOGRAPH + {0xD9C6, 0x8305}, //13608 #CJK UNIFIED IDEOGRAPH + {0xD9C7, 0x8B00}, //13609 #CJK UNIFIED IDEOGRAPH + {0xD9C8, 0x8B28}, //13610 #CJK UNIFIED IDEOGRAPH + {0xD9C9, 0x8C8C}, //13611 #CJK UNIFIED IDEOGRAPH + {0xD9CA, 0x6728}, //13612 #CJK UNIFIED IDEOGRAPH + {0xD9CB, 0x6C90}, //13613 #CJK UNIFIED IDEOGRAPH + {0xD9CC, 0x7267}, //13614 #CJK UNIFIED IDEOGRAPH + {0xD9CD, 0x76EE}, //13615 #CJK UNIFIED IDEOGRAPH + {0xD9CE, 0x7766}, //13616 #CJK UNIFIED IDEOGRAPH + {0xD9CF, 0x7A46}, //13617 #CJK UNIFIED IDEOGRAPH + {0xD9D0, 0x9DA9}, //13618 #CJK UNIFIED IDEOGRAPH + {0xD9D1, 0x6B7F}, //13619 #CJK UNIFIED IDEOGRAPH + {0xD9D2, 0x6C92}, //13620 #CJK UNIFIED IDEOGRAPH + {0xD9D3, 0x5922}, //13621 #CJK UNIFIED IDEOGRAPH + {0xD9D4, 0x6726}, //13622 #CJK UNIFIED IDEOGRAPH + {0xD9D5, 0x8499}, //13623 #CJK UNIFIED IDEOGRAPH + {0xD9D6, 0x536F}, //13624 #CJK UNIFIED IDEOGRAPH + {0xD9D7, 0x5893}, //13625 #CJK UNIFIED IDEOGRAPH + {0xD9D8, 0x5999}, //13626 #CJK UNIFIED IDEOGRAPH + {0xD9D9, 0x5EDF}, //13627 #CJK UNIFIED IDEOGRAPH + {0xD9DA, 0x63CF}, //13628 #CJK UNIFIED IDEOGRAPH + {0xD9DB, 0x6634}, //13629 #CJK UNIFIED IDEOGRAPH + {0xD9DC, 0x6773}, //13630 #CJK UNIFIED IDEOGRAPH + {0xD9DD, 0x6E3A}, //13631 #CJK UNIFIED IDEOGRAPH + {0xD9DE, 0x732B}, //13632 #CJK UNIFIED IDEOGRAPH + {0xD9DF, 0x7AD7}, //13633 #CJK UNIFIED IDEOGRAPH + {0xD9E0, 0x82D7}, //13634 #CJK UNIFIED IDEOGRAPH + {0xD9E1, 0x9328}, //13635 #CJK UNIFIED IDEOGRAPH + {0xD9E2, 0x52D9}, //13636 #CJK UNIFIED IDEOGRAPH + {0xD9E3, 0x5DEB}, //13637 #CJK UNIFIED IDEOGRAPH + {0xD9E4, 0x61AE}, //13638 #CJK UNIFIED IDEOGRAPH + {0xD9E5, 0x61CB}, //13639 #CJK UNIFIED IDEOGRAPH + {0xD9E6, 0x620A}, //13640 #CJK UNIFIED IDEOGRAPH + {0xD9E7, 0x62C7}, //13641 #CJK UNIFIED IDEOGRAPH + {0xD9E8, 0x64AB}, //13642 #CJK UNIFIED IDEOGRAPH + {0xD9E9, 0x65E0}, //13643 #CJK UNIFIED IDEOGRAPH + {0xD9EA, 0x6959}, //13644 #CJK UNIFIED IDEOGRAPH + {0xD9EB, 0x6B66}, //13645 #CJK UNIFIED IDEOGRAPH + {0xD9EC, 0x6BCB}, //13646 #CJK UNIFIED IDEOGRAPH + {0xD9ED, 0x7121}, //13647 #CJK UNIFIED IDEOGRAPH + {0xD9EE, 0x73F7}, //13648 #CJK UNIFIED IDEOGRAPH + {0xD9EF, 0x755D}, //13649 #CJK UNIFIED IDEOGRAPH + {0xD9F0, 0x7E46}, //13650 #CJK UNIFIED IDEOGRAPH + {0xD9F1, 0x821E}, //13651 #CJK UNIFIED IDEOGRAPH + {0xD9F2, 0x8302}, //13652 #CJK UNIFIED IDEOGRAPH + {0xD9F3, 0x856A}, //13653 #CJK UNIFIED IDEOGRAPH + {0xD9F4, 0x8AA3}, //13654 #CJK UNIFIED IDEOGRAPH + {0xD9F5, 0x8CBF}, //13655 #CJK UNIFIED IDEOGRAPH + {0xD9F6, 0x9727}, //13656 #CJK UNIFIED IDEOGRAPH + {0xD9F7, 0x9D61}, //13657 #CJK UNIFIED IDEOGRAPH + {0xD9F8, 0x58A8}, //13658 #CJK UNIFIED IDEOGRAPH + {0xD9F9, 0x9ED8}, //13659 #CJK UNIFIED IDEOGRAPH + {0xD9FA, 0x5011}, //13660 #CJK UNIFIED IDEOGRAPH + {0xD9FB, 0x520E}, //13661 #CJK UNIFIED IDEOGRAPH + {0xD9FC, 0x543B}, //13662 #CJK UNIFIED IDEOGRAPH + {0xD9FD, 0x554F}, //13663 #CJK UNIFIED IDEOGRAPH + {0xD9FE, 0x6587}, //13664 #CJK UNIFIED IDEOGRAPH + {0xDAA1, 0x6C76}, //13665 #CJK UNIFIED IDEOGRAPH + {0xDAA2, 0x7D0A}, //13666 #CJK UNIFIED IDEOGRAPH + {0xDAA3, 0x7D0B}, //13667 #CJK UNIFIED IDEOGRAPH + {0xDAA4, 0x805E}, //13668 #CJK UNIFIED IDEOGRAPH + {0xDAA5, 0x868A}, //13669 #CJK UNIFIED IDEOGRAPH + {0xDAA6, 0x9580}, //13670 #CJK UNIFIED IDEOGRAPH + {0xDAA7, 0x96EF}, //13671 #CJK UNIFIED IDEOGRAPH + {0xDAA8, 0x52FF}, //13672 #CJK UNIFIED IDEOGRAPH + {0xDAA9, 0x6C95}, //13673 #CJK UNIFIED IDEOGRAPH + {0xDAAA, 0x7269}, //13674 #CJK UNIFIED IDEOGRAPH + {0xDAAB, 0x5473}, //13675 #CJK UNIFIED IDEOGRAPH + {0xDAAC, 0x5A9A}, //13676 #CJK UNIFIED IDEOGRAPH + {0xDAAD, 0x5C3E}, //13677 #CJK UNIFIED IDEOGRAPH + {0xDAAE, 0x5D4B}, //13678 #CJK UNIFIED IDEOGRAPH + {0xDAAF, 0x5F4C}, //13679 #CJK UNIFIED IDEOGRAPH + {0xDAB0, 0x5FAE}, //13680 #CJK UNIFIED IDEOGRAPH + {0xDAB1, 0x672A}, //13681 #CJK UNIFIED IDEOGRAPH + {0xDAB2, 0x68B6}, //13682 #CJK UNIFIED IDEOGRAPH + {0xDAB3, 0x6963}, //13683 #CJK UNIFIED IDEOGRAPH + {0xDAB4, 0x6E3C}, //13684 #CJK UNIFIED IDEOGRAPH + {0xDAB5, 0x6E44}, //13685 #CJK UNIFIED IDEOGRAPH + {0xDAB6, 0x7709}, //13686 #CJK UNIFIED IDEOGRAPH + {0xDAB7, 0x7C73}, //13687 #CJK UNIFIED IDEOGRAPH + {0xDAB8, 0x7F8E}, //13688 #CJK UNIFIED IDEOGRAPH + {0xDAB9, 0x8587}, //13689 #CJK UNIFIED IDEOGRAPH + {0xDABA, 0x8B0E}, //13690 #CJK UNIFIED IDEOGRAPH + {0xDABB, 0x8FF7}, //13691 #CJK UNIFIED IDEOGRAPH + {0xDABC, 0x9761}, //13692 #CJK UNIFIED IDEOGRAPH + {0xDABD, 0x9EF4}, //13693 #CJK UNIFIED IDEOGRAPH + {0xDABE, 0x5CB7}, //13694 #CJK UNIFIED IDEOGRAPH + {0xDABF, 0x60B6}, //13695 #CJK UNIFIED IDEOGRAPH + {0xDAC0, 0x610D}, //13696 #CJK UNIFIED IDEOGRAPH + {0xDAC1, 0x61AB}, //13697 #CJK UNIFIED IDEOGRAPH + {0xDAC2, 0x654F}, //13698 #CJK UNIFIED IDEOGRAPH + {0xDAC3, 0x65FB}, //13699 #CJK UNIFIED IDEOGRAPH + {0xDAC4, 0x65FC}, //13700 #CJK UNIFIED IDEOGRAPH + {0xDAC5, 0x6C11}, //13701 #CJK UNIFIED IDEOGRAPH + {0xDAC6, 0x6CEF}, //13702 #CJK UNIFIED IDEOGRAPH + {0xDAC7, 0x739F}, //13703 #CJK UNIFIED IDEOGRAPH + {0xDAC8, 0x73C9}, //13704 #CJK UNIFIED IDEOGRAPH + {0xDAC9, 0x7DE1}, //13705 #CJK UNIFIED IDEOGRAPH + {0xDACA, 0x9594}, //13706 #CJK UNIFIED IDEOGRAPH + {0xDACB, 0x5BC6}, //13707 #CJK UNIFIED IDEOGRAPH + {0xDACC, 0x871C}, //13708 #CJK UNIFIED IDEOGRAPH + {0xDACD, 0x8B10}, //13709 #CJK UNIFIED IDEOGRAPH + {0xDACE, 0x525D}, //13710 #CJK UNIFIED IDEOGRAPH + {0xDACF, 0x535A}, //13711 #CJK UNIFIED IDEOGRAPH + {0xDAD0, 0x62CD}, //13712 #CJK UNIFIED IDEOGRAPH + {0xDAD1, 0x640F}, //13713 #CJK UNIFIED IDEOGRAPH + {0xDAD2, 0x64B2}, //13714 #CJK UNIFIED IDEOGRAPH + {0xDAD3, 0x6734}, //13715 #CJK UNIFIED IDEOGRAPH + {0xDAD4, 0x6A38}, //13716 #CJK UNIFIED IDEOGRAPH + {0xDAD5, 0x6CCA}, //13717 #CJK UNIFIED IDEOGRAPH + {0xDAD6, 0x73C0}, //13718 #CJK UNIFIED IDEOGRAPH + {0xDAD7, 0x749E}, //13719 #CJK UNIFIED IDEOGRAPH + {0xDAD8, 0x7B94}, //13720 #CJK UNIFIED IDEOGRAPH + {0xDAD9, 0x7C95}, //13721 #CJK UNIFIED IDEOGRAPH + {0xDADA, 0x7E1B}, //13722 #CJK UNIFIED IDEOGRAPH + {0xDADB, 0x818A}, //13723 #CJK UNIFIED IDEOGRAPH + {0xDADC, 0x8236}, //13724 #CJK UNIFIED IDEOGRAPH + {0xDADD, 0x8584}, //13725 #CJK UNIFIED IDEOGRAPH + {0xDADE, 0x8FEB}, //13726 #CJK UNIFIED IDEOGRAPH + {0xDADF, 0x96F9}, //13727 #CJK UNIFIED IDEOGRAPH + {0xDAE0, 0x99C1}, //13728 #CJK UNIFIED IDEOGRAPH + {0xDAE1, 0x4F34}, //13729 #CJK UNIFIED IDEOGRAPH + {0xDAE2, 0x534A}, //13730 #CJK UNIFIED IDEOGRAPH + {0xDAE3, 0x53CD}, //13731 #CJK UNIFIED IDEOGRAPH + {0xDAE4, 0x53DB}, //13732 #CJK UNIFIED IDEOGRAPH + {0xDAE5, 0x62CC}, //13733 #CJK UNIFIED IDEOGRAPH + {0xDAE6, 0x642C}, //13734 #CJK UNIFIED IDEOGRAPH + {0xDAE7, 0x6500}, //13735 #CJK UNIFIED IDEOGRAPH + {0xDAE8, 0x6591}, //13736 #CJK UNIFIED IDEOGRAPH + {0xDAE9, 0x69C3}, //13737 #CJK UNIFIED IDEOGRAPH + {0xDAEA, 0x6CEE}, //13738 #CJK UNIFIED IDEOGRAPH + {0xDAEB, 0x6F58}, //13739 #CJK UNIFIED IDEOGRAPH + {0xDAEC, 0x73ED}, //13740 #CJK UNIFIED IDEOGRAPH + {0xDAED, 0x7554}, //13741 #CJK UNIFIED IDEOGRAPH + {0xDAEE, 0x7622}, //13742 #CJK UNIFIED IDEOGRAPH + {0xDAEF, 0x76E4}, //13743 #CJK UNIFIED IDEOGRAPH + {0xDAF0, 0x76FC}, //13744 #CJK UNIFIED IDEOGRAPH + {0xDAF1, 0x78D0}, //13745 #CJK UNIFIED IDEOGRAPH + {0xDAF2, 0x78FB}, //13746 #CJK UNIFIED IDEOGRAPH + {0xDAF3, 0x792C}, //13747 #CJK UNIFIED IDEOGRAPH + {0xDAF4, 0x7D46}, //13748 #CJK UNIFIED IDEOGRAPH + {0xDAF5, 0x822C}, //13749 #CJK UNIFIED IDEOGRAPH + {0xDAF6, 0x87E0}, //13750 #CJK UNIFIED IDEOGRAPH + {0xDAF7, 0x8FD4}, //13751 #CJK UNIFIED IDEOGRAPH + {0xDAF8, 0x9812}, //13752 #CJK UNIFIED IDEOGRAPH + {0xDAF9, 0x98EF}, //13753 #CJK UNIFIED IDEOGRAPH + {0xDAFA, 0x52C3}, //13754 #CJK UNIFIED IDEOGRAPH + {0xDAFB, 0x62D4}, //13755 #CJK UNIFIED IDEOGRAPH + {0xDAFC, 0x64A5}, //13756 #CJK UNIFIED IDEOGRAPH + {0xDAFD, 0x6E24}, //13757 #CJK UNIFIED IDEOGRAPH + {0xDAFE, 0x6F51}, //13758 #CJK UNIFIED IDEOGRAPH + {0xDBA1, 0x767C}, //13759 #CJK UNIFIED IDEOGRAPH + {0xDBA2, 0x8DCB}, //13760 #CJK UNIFIED IDEOGRAPH + {0xDBA3, 0x91B1}, //13761 #CJK UNIFIED IDEOGRAPH + {0xDBA4, 0x9262}, //13762 #CJK UNIFIED IDEOGRAPH + {0xDBA5, 0x9AEE}, //13763 #CJK UNIFIED IDEOGRAPH + {0xDBA6, 0x9B43}, //13764 #CJK UNIFIED IDEOGRAPH + {0xDBA7, 0x5023}, //13765 #CJK UNIFIED IDEOGRAPH + {0xDBA8, 0x508D}, //13766 #CJK UNIFIED IDEOGRAPH + {0xDBA9, 0x574A}, //13767 #CJK UNIFIED IDEOGRAPH + {0xDBAA, 0x59A8}, //13768 #CJK UNIFIED IDEOGRAPH + {0xDBAB, 0x5C28}, //13769 #CJK UNIFIED IDEOGRAPH + {0xDBAC, 0x5E47}, //13770 #CJK UNIFIED IDEOGRAPH + {0xDBAD, 0x5F77}, //13771 #CJK UNIFIED IDEOGRAPH + {0xDBAE, 0x623F}, //13772 #CJK UNIFIED IDEOGRAPH + {0xDBAF, 0x653E}, //13773 #CJK UNIFIED IDEOGRAPH + {0xDBB0, 0x65B9}, //13774 #CJK UNIFIED IDEOGRAPH + {0xDBB1, 0x65C1}, //13775 #CJK UNIFIED IDEOGRAPH + {0xDBB2, 0x6609}, //13776 #CJK UNIFIED IDEOGRAPH + {0xDBB3, 0x678B}, //13777 #CJK UNIFIED IDEOGRAPH + {0xDBB4, 0x699C}, //13778 #CJK UNIFIED IDEOGRAPH + {0xDBB5, 0x6EC2}, //13779 #CJK UNIFIED IDEOGRAPH + {0xDBB6, 0x78C5}, //13780 #CJK UNIFIED IDEOGRAPH + {0xDBB7, 0x7D21}, //13781 #CJK UNIFIED IDEOGRAPH + {0xDBB8, 0x80AA}, //13782 #CJK UNIFIED IDEOGRAPH + {0xDBB9, 0x8180}, //13783 #CJK UNIFIED IDEOGRAPH + {0xDBBA, 0x822B}, //13784 #CJK UNIFIED IDEOGRAPH + {0xDBBB, 0x82B3}, //13785 #CJK UNIFIED IDEOGRAPH + {0xDBBC, 0x84A1}, //13786 #CJK UNIFIED IDEOGRAPH + {0xDBBD, 0x868C}, //13787 #CJK UNIFIED IDEOGRAPH + {0xDBBE, 0x8A2A}, //13788 #CJK UNIFIED IDEOGRAPH + {0xDBBF, 0x8B17}, //13789 #CJK UNIFIED IDEOGRAPH + {0xDBC0, 0x90A6}, //13790 #CJK UNIFIED IDEOGRAPH + {0xDBC1, 0x9632}, //13791 #CJK UNIFIED IDEOGRAPH + {0xDBC2, 0x9F90}, //13792 #CJK UNIFIED IDEOGRAPH + {0xDBC3, 0x500D}, //13793 #CJK UNIFIED IDEOGRAPH + {0xDBC4, 0x4FF3}, //13794 #CJK UNIFIED IDEOGRAPH + {0xDBC5, 0xF963}, //13795 #CJK COMPATIBILITY IDEOGRAPH + {0xDBC6, 0x57F9}, //13796 #CJK UNIFIED IDEOGRAPH + {0xDBC7, 0x5F98}, //13797 #CJK UNIFIED IDEOGRAPH + {0xDBC8, 0x62DC}, //13798 #CJK UNIFIED IDEOGRAPH + {0xDBC9, 0x6392}, //13799 #CJK UNIFIED IDEOGRAPH + {0xDBCA, 0x676F}, //13800 #CJK UNIFIED IDEOGRAPH + {0xDBCB, 0x6E43}, //13801 #CJK UNIFIED IDEOGRAPH + {0xDBCC, 0x7119}, //13802 #CJK UNIFIED IDEOGRAPH + {0xDBCD, 0x76C3}, //13803 #CJK UNIFIED IDEOGRAPH + {0xDBCE, 0x80CC}, //13804 #CJK UNIFIED IDEOGRAPH + {0xDBCF, 0x80DA}, //13805 #CJK UNIFIED IDEOGRAPH + {0xDBD0, 0x88F4}, //13806 #CJK UNIFIED IDEOGRAPH + {0xDBD1, 0x88F5}, //13807 #CJK UNIFIED IDEOGRAPH + {0xDBD2, 0x8919}, //13808 #CJK UNIFIED IDEOGRAPH + {0xDBD3, 0x8CE0}, //13809 #CJK UNIFIED IDEOGRAPH + {0xDBD4, 0x8F29}, //13810 #CJK UNIFIED IDEOGRAPH + {0xDBD5, 0x914D}, //13811 #CJK UNIFIED IDEOGRAPH + {0xDBD6, 0x966A}, //13812 #CJK UNIFIED IDEOGRAPH + {0xDBD7, 0x4F2F}, //13813 #CJK UNIFIED IDEOGRAPH + {0xDBD8, 0x4F70}, //13814 #CJK UNIFIED IDEOGRAPH + {0xDBD9, 0x5E1B}, //13815 #CJK UNIFIED IDEOGRAPH + {0xDBDA, 0x67CF}, //13816 #CJK UNIFIED IDEOGRAPH + {0xDBDB, 0x6822}, //13817 #CJK UNIFIED IDEOGRAPH + {0xDBDC, 0x767D}, //13818 #CJK UNIFIED IDEOGRAPH + {0xDBDD, 0x767E}, //13819 #CJK UNIFIED IDEOGRAPH + {0xDBDE, 0x9B44}, //13820 #CJK UNIFIED IDEOGRAPH + {0xDBDF, 0x5E61}, //13821 #CJK UNIFIED IDEOGRAPH + {0xDBE0, 0x6A0A}, //13822 #CJK UNIFIED IDEOGRAPH + {0xDBE1, 0x7169}, //13823 #CJK UNIFIED IDEOGRAPH + {0xDBE2, 0x71D4}, //13824 #CJK UNIFIED IDEOGRAPH + {0xDBE3, 0x756A}, //13825 #CJK UNIFIED IDEOGRAPH + {0xDBE4, 0xF964}, //13826 #CJK COMPATIBILITY IDEOGRAPH + {0xDBE5, 0x7E41}, //13827 #CJK UNIFIED IDEOGRAPH + {0xDBE6, 0x8543}, //13828 #CJK UNIFIED IDEOGRAPH + {0xDBE7, 0x85E9}, //13829 #CJK UNIFIED IDEOGRAPH + {0xDBE8, 0x98DC}, //13830 #CJK UNIFIED IDEOGRAPH + {0xDBE9, 0x4F10}, //13831 #CJK UNIFIED IDEOGRAPH + {0xDBEA, 0x7B4F}, //13832 #CJK UNIFIED IDEOGRAPH + {0xDBEB, 0x7F70}, //13833 #CJK UNIFIED IDEOGRAPH + {0xDBEC, 0x95A5}, //13834 #CJK UNIFIED IDEOGRAPH + {0xDBED, 0x51E1}, //13835 #CJK UNIFIED IDEOGRAPH + {0xDBEE, 0x5E06}, //13836 #CJK UNIFIED IDEOGRAPH + {0xDBEF, 0x68B5}, //13837 #CJK UNIFIED IDEOGRAPH + {0xDBF0, 0x6C3E}, //13838 #CJK UNIFIED IDEOGRAPH + {0xDBF1, 0x6C4E}, //13839 #CJK UNIFIED IDEOGRAPH + {0xDBF2, 0x6CDB}, //13840 #CJK UNIFIED IDEOGRAPH + {0xDBF3, 0x72AF}, //13841 #CJK UNIFIED IDEOGRAPH + {0xDBF4, 0x7BC4}, //13842 #CJK UNIFIED IDEOGRAPH + {0xDBF5, 0x8303}, //13843 #CJK UNIFIED IDEOGRAPH + {0xDBF6, 0x6CD5}, //13844 #CJK UNIFIED IDEOGRAPH + {0xDBF7, 0x743A}, //13845 #CJK UNIFIED IDEOGRAPH + {0xDBF8, 0x50FB}, //13846 #CJK UNIFIED IDEOGRAPH + {0xDBF9, 0x5288}, //13847 #CJK UNIFIED IDEOGRAPH + {0xDBFA, 0x58C1}, //13848 #CJK UNIFIED IDEOGRAPH + {0xDBFB, 0x64D8}, //13849 #CJK UNIFIED IDEOGRAPH + {0xDBFC, 0x6A97}, //13850 #CJK UNIFIED IDEOGRAPH + {0xDBFD, 0x74A7}, //13851 #CJK UNIFIED IDEOGRAPH + {0xDBFE, 0x7656}, //13852 #CJK UNIFIED IDEOGRAPH + {0xDCA1, 0x78A7}, //13853 #CJK UNIFIED IDEOGRAPH + {0xDCA2, 0x8617}, //13854 #CJK UNIFIED IDEOGRAPH + {0xDCA3, 0x95E2}, //13855 #CJK UNIFIED IDEOGRAPH + {0xDCA4, 0x9739}, //13856 #CJK UNIFIED IDEOGRAPH + {0xDCA5, 0xF965}, //13857 #CJK COMPATIBILITY IDEOGRAPH + {0xDCA6, 0x535E}, //13858 #CJK UNIFIED IDEOGRAPH + {0xDCA7, 0x5F01}, //13859 #CJK UNIFIED IDEOGRAPH + {0xDCA8, 0x8B8A}, //13860 #CJK UNIFIED IDEOGRAPH + {0xDCA9, 0x8FA8}, //13861 #CJK UNIFIED IDEOGRAPH + {0xDCAA, 0x8FAF}, //13862 #CJK UNIFIED IDEOGRAPH + {0xDCAB, 0x908A}, //13863 #CJK UNIFIED IDEOGRAPH + {0xDCAC, 0x5225}, //13864 #CJK UNIFIED IDEOGRAPH + {0xDCAD, 0x77A5}, //13865 #CJK UNIFIED IDEOGRAPH + {0xDCAE, 0x9C49}, //13866 #CJK UNIFIED IDEOGRAPH + {0xDCAF, 0x9F08}, //13867 #CJK UNIFIED IDEOGRAPH + {0xDCB0, 0x4E19}, //13868 #CJK UNIFIED IDEOGRAPH + {0xDCB1, 0x5002}, //13869 #CJK UNIFIED IDEOGRAPH + {0xDCB2, 0x5175}, //13870 #CJK UNIFIED IDEOGRAPH + {0xDCB3, 0x5C5B}, //13871 #CJK UNIFIED IDEOGRAPH + {0xDCB4, 0x5E77}, //13872 #CJK UNIFIED IDEOGRAPH + {0xDCB5, 0x661E}, //13873 #CJK UNIFIED IDEOGRAPH + {0xDCB6, 0x663A}, //13874 #CJK UNIFIED IDEOGRAPH + {0xDCB7, 0x67C4}, //13875 #CJK UNIFIED IDEOGRAPH + {0xDCB8, 0x68C5}, //13876 #CJK UNIFIED IDEOGRAPH + {0xDCB9, 0x70B3}, //13877 #CJK UNIFIED IDEOGRAPH + {0xDCBA, 0x7501}, //13878 #CJK UNIFIED IDEOGRAPH + {0xDCBB, 0x75C5}, //13879 #CJK UNIFIED IDEOGRAPH + {0xDCBC, 0x79C9}, //13880 #CJK UNIFIED IDEOGRAPH + {0xDCBD, 0x7ADD}, //13881 #CJK UNIFIED IDEOGRAPH + {0xDCBE, 0x8F27}, //13882 #CJK UNIFIED IDEOGRAPH + {0xDCBF, 0x9920}, //13883 #CJK UNIFIED IDEOGRAPH + {0xDCC0, 0x9A08}, //13884 #CJK UNIFIED IDEOGRAPH + {0xDCC1, 0x4FDD}, //13885 #CJK UNIFIED IDEOGRAPH + {0xDCC2, 0x5821}, //13886 #CJK UNIFIED IDEOGRAPH + {0xDCC3, 0x5831}, //13887 #CJK UNIFIED IDEOGRAPH + {0xDCC4, 0x5BF6}, //13888 #CJK UNIFIED IDEOGRAPH + {0xDCC5, 0x666E}, //13889 #CJK UNIFIED IDEOGRAPH + {0xDCC6, 0x6B65}, //13890 #CJK UNIFIED IDEOGRAPH + {0xDCC7, 0x6D11}, //13891 #CJK UNIFIED IDEOGRAPH + {0xDCC8, 0x6E7A}, //13892 #CJK UNIFIED IDEOGRAPH + {0xDCC9, 0x6F7D}, //13893 #CJK UNIFIED IDEOGRAPH + {0xDCCA, 0x73E4}, //13894 #CJK UNIFIED IDEOGRAPH + {0xDCCB, 0x752B}, //13895 #CJK UNIFIED IDEOGRAPH + {0xDCCC, 0x83E9}, //13896 #CJK UNIFIED IDEOGRAPH + {0xDCCD, 0x88DC}, //13897 #CJK UNIFIED IDEOGRAPH + {0xDCCE, 0x8913}, //13898 #CJK UNIFIED IDEOGRAPH + {0xDCCF, 0x8B5C}, //13899 #CJK UNIFIED IDEOGRAPH + {0xDCD0, 0x8F14}, //13900 #CJK UNIFIED IDEOGRAPH + {0xDCD1, 0x4F0F}, //13901 #CJK UNIFIED IDEOGRAPH + {0xDCD2, 0x50D5}, //13902 #CJK UNIFIED IDEOGRAPH + {0xDCD3, 0x5310}, //13903 #CJK UNIFIED IDEOGRAPH + {0xDCD4, 0x535C}, //13904 #CJK UNIFIED IDEOGRAPH + {0xDCD5, 0x5B93}, //13905 #CJK UNIFIED IDEOGRAPH + {0xDCD6, 0x5FA9}, //13906 #CJK UNIFIED IDEOGRAPH + {0xDCD7, 0x670D}, //13907 #CJK UNIFIED IDEOGRAPH + {0xDCD8, 0x798F}, //13908 #CJK UNIFIED IDEOGRAPH + {0xDCD9, 0x8179}, //13909 #CJK UNIFIED IDEOGRAPH + {0xDCDA, 0x832F}, //13910 #CJK UNIFIED IDEOGRAPH + {0xDCDB, 0x8514}, //13911 #CJK UNIFIED IDEOGRAPH + {0xDCDC, 0x8907}, //13912 #CJK UNIFIED IDEOGRAPH + {0xDCDD, 0x8986}, //13913 #CJK UNIFIED IDEOGRAPH + {0xDCDE, 0x8F39}, //13914 #CJK UNIFIED IDEOGRAPH + {0xDCDF, 0x8F3B}, //13915 #CJK UNIFIED IDEOGRAPH + {0xDCE0, 0x99A5}, //13916 #CJK UNIFIED IDEOGRAPH + {0xDCE1, 0x9C12}, //13917 #CJK UNIFIED IDEOGRAPH + {0xDCE2, 0x672C}, //13918 #CJK UNIFIED IDEOGRAPH + {0xDCE3, 0x4E76}, //13919 #CJK UNIFIED IDEOGRAPH + {0xDCE4, 0x4FF8}, //13920 #CJK UNIFIED IDEOGRAPH + {0xDCE5, 0x5949}, //13921 #CJK UNIFIED IDEOGRAPH + {0xDCE6, 0x5C01}, //13922 #CJK UNIFIED IDEOGRAPH + {0xDCE7, 0x5CEF}, //13923 #CJK UNIFIED IDEOGRAPH + {0xDCE8, 0x5CF0}, //13924 #CJK UNIFIED IDEOGRAPH + {0xDCE9, 0x6367}, //13925 #CJK UNIFIED IDEOGRAPH + {0xDCEA, 0x68D2}, //13926 #CJK UNIFIED IDEOGRAPH + {0xDCEB, 0x70FD}, //13927 #CJK UNIFIED IDEOGRAPH + {0xDCEC, 0x71A2}, //13928 #CJK UNIFIED IDEOGRAPH + {0xDCED, 0x742B}, //13929 #CJK UNIFIED IDEOGRAPH + {0xDCEE, 0x7E2B}, //13930 #CJK UNIFIED IDEOGRAPH + {0xDCEF, 0x84EC}, //13931 #CJK UNIFIED IDEOGRAPH + {0xDCF0, 0x8702}, //13932 #CJK UNIFIED IDEOGRAPH + {0xDCF1, 0x9022}, //13933 #CJK UNIFIED IDEOGRAPH + {0xDCF2, 0x92D2}, //13934 #CJK UNIFIED IDEOGRAPH + {0xDCF3, 0x9CF3}, //13935 #CJK UNIFIED IDEOGRAPH + {0xDCF4, 0x4E0D}, //13936 #CJK UNIFIED IDEOGRAPH + {0xDCF5, 0x4ED8}, //13937 #CJK UNIFIED IDEOGRAPH + {0xDCF6, 0x4FEF}, //13938 #CJK UNIFIED IDEOGRAPH + {0xDCF7, 0x5085}, //13939 #CJK UNIFIED IDEOGRAPH + {0xDCF8, 0x5256}, //13940 #CJK UNIFIED IDEOGRAPH + {0xDCF9, 0x526F}, //13941 #CJK UNIFIED IDEOGRAPH + {0xDCFA, 0x5426}, //13942 #CJK UNIFIED IDEOGRAPH + {0xDCFB, 0x5490}, //13943 #CJK UNIFIED IDEOGRAPH + {0xDCFC, 0x57E0}, //13944 #CJK UNIFIED IDEOGRAPH + {0xDCFD, 0x592B}, //13945 #CJK UNIFIED IDEOGRAPH + {0xDCFE, 0x5A66}, //13946 #CJK UNIFIED IDEOGRAPH + {0xDDA1, 0x5B5A}, //13947 #CJK UNIFIED IDEOGRAPH + {0xDDA2, 0x5B75}, //13948 #CJK UNIFIED IDEOGRAPH + {0xDDA3, 0x5BCC}, //13949 #CJK UNIFIED IDEOGRAPH + {0xDDA4, 0x5E9C}, //13950 #CJK UNIFIED IDEOGRAPH + {0xDDA5, 0xF966}, //13951 #CJK COMPATIBILITY IDEOGRAPH + {0xDDA6, 0x6276}, //13952 #CJK UNIFIED IDEOGRAPH + {0xDDA7, 0x6577}, //13953 #CJK UNIFIED IDEOGRAPH + {0xDDA8, 0x65A7}, //13954 #CJK UNIFIED IDEOGRAPH + {0xDDA9, 0x6D6E}, //13955 #CJK UNIFIED IDEOGRAPH + {0xDDAA, 0x6EA5}, //13956 #CJK UNIFIED IDEOGRAPH + {0xDDAB, 0x7236}, //13957 #CJK UNIFIED IDEOGRAPH + {0xDDAC, 0x7B26}, //13958 #CJK UNIFIED IDEOGRAPH + {0xDDAD, 0x7C3F}, //13959 #CJK UNIFIED IDEOGRAPH + {0xDDAE, 0x7F36}, //13960 #CJK UNIFIED IDEOGRAPH + {0xDDAF, 0x8150}, //13961 #CJK UNIFIED IDEOGRAPH + {0xDDB0, 0x8151}, //13962 #CJK UNIFIED IDEOGRAPH + {0xDDB1, 0x819A}, //13963 #CJK UNIFIED IDEOGRAPH + {0xDDB2, 0x8240}, //13964 #CJK UNIFIED IDEOGRAPH + {0xDDB3, 0x8299}, //13965 #CJK UNIFIED IDEOGRAPH + {0xDDB4, 0x83A9}, //13966 #CJK UNIFIED IDEOGRAPH + {0xDDB5, 0x8A03}, //13967 #CJK UNIFIED IDEOGRAPH + {0xDDB6, 0x8CA0}, //13968 #CJK UNIFIED IDEOGRAPH + {0xDDB7, 0x8CE6}, //13969 #CJK UNIFIED IDEOGRAPH + {0xDDB8, 0x8CFB}, //13970 #CJK UNIFIED IDEOGRAPH + {0xDDB9, 0x8D74}, //13971 #CJK UNIFIED IDEOGRAPH + {0xDDBA, 0x8DBA}, //13972 #CJK UNIFIED IDEOGRAPH + {0xDDBB, 0x90E8}, //13973 #CJK UNIFIED IDEOGRAPH + {0xDDBC, 0x91DC}, //13974 #CJK UNIFIED IDEOGRAPH + {0xDDBD, 0x961C}, //13975 #CJK UNIFIED IDEOGRAPH + {0xDDBE, 0x9644}, //13976 #CJK UNIFIED IDEOGRAPH + {0xDDBF, 0x99D9}, //13977 #CJK UNIFIED IDEOGRAPH + {0xDDC0, 0x9CE7}, //13978 #CJK UNIFIED IDEOGRAPH + {0xDDC1, 0x5317}, //13979 #CJK UNIFIED IDEOGRAPH + {0xDDC2, 0x5206}, //13980 #CJK UNIFIED IDEOGRAPH + {0xDDC3, 0x5429}, //13981 #CJK UNIFIED IDEOGRAPH + {0xDDC4, 0x5674}, //13982 #CJK UNIFIED IDEOGRAPH + {0xDDC5, 0x58B3}, //13983 #CJK UNIFIED IDEOGRAPH + {0xDDC6, 0x5954}, //13984 #CJK UNIFIED IDEOGRAPH + {0xDDC7, 0x596E}, //13985 #CJK UNIFIED IDEOGRAPH + {0xDDC8, 0x5FFF}, //13986 #CJK UNIFIED IDEOGRAPH + {0xDDC9, 0x61A4}, //13987 #CJK UNIFIED IDEOGRAPH + {0xDDCA, 0x626E}, //13988 #CJK UNIFIED IDEOGRAPH + {0xDDCB, 0x6610}, //13989 #CJK UNIFIED IDEOGRAPH + {0xDDCC, 0x6C7E}, //13990 #CJK UNIFIED IDEOGRAPH + {0xDDCD, 0x711A}, //13991 #CJK UNIFIED IDEOGRAPH + {0xDDCE, 0x76C6}, //13992 #CJK UNIFIED IDEOGRAPH + {0xDDCF, 0x7C89}, //13993 #CJK UNIFIED IDEOGRAPH + {0xDDD0, 0x7CDE}, //13994 #CJK UNIFIED IDEOGRAPH + {0xDDD1, 0x7D1B}, //13995 #CJK UNIFIED IDEOGRAPH + {0xDDD2, 0x82AC}, //13996 #CJK UNIFIED IDEOGRAPH + {0xDDD3, 0x8CC1}, //13997 #CJK UNIFIED IDEOGRAPH + {0xDDD4, 0x96F0}, //13998 #CJK UNIFIED IDEOGRAPH + {0xDDD5, 0xF967}, //13999 #CJK COMPATIBILITY IDEOGRAPH + {0xDDD6, 0x4F5B}, //14000 #CJK UNIFIED IDEOGRAPH + {0xDDD7, 0x5F17}, //14001 #CJK UNIFIED IDEOGRAPH + {0xDDD8, 0x5F7F}, //14002 #CJK UNIFIED IDEOGRAPH + {0xDDD9, 0x62C2}, //14003 #CJK UNIFIED IDEOGRAPH + {0xDDDA, 0x5D29}, //14004 #CJK UNIFIED IDEOGRAPH + {0xDDDB, 0x670B}, //14005 #CJK UNIFIED IDEOGRAPH + {0xDDDC, 0x68DA}, //14006 #CJK UNIFIED IDEOGRAPH + {0xDDDD, 0x787C}, //14007 #CJK UNIFIED IDEOGRAPH + {0xDDDE, 0x7E43}, //14008 #CJK UNIFIED IDEOGRAPH + {0xDDDF, 0x9D6C}, //14009 #CJK UNIFIED IDEOGRAPH + {0xDDE0, 0x4E15}, //14010 #CJK UNIFIED IDEOGRAPH + {0xDDE1, 0x5099}, //14011 #CJK UNIFIED IDEOGRAPH + {0xDDE2, 0x5315}, //14012 #CJK UNIFIED IDEOGRAPH + {0xDDE3, 0x532A}, //14013 #CJK UNIFIED IDEOGRAPH + {0xDDE4, 0x5351}, //14014 #CJK UNIFIED IDEOGRAPH + {0xDDE5, 0x5983}, //14015 #CJK UNIFIED IDEOGRAPH + {0xDDE6, 0x5A62}, //14016 #CJK UNIFIED IDEOGRAPH + {0xDDE7, 0x5E87}, //14017 #CJK UNIFIED IDEOGRAPH + {0xDDE8, 0x60B2}, //14018 #CJK UNIFIED IDEOGRAPH + {0xDDE9, 0x618A}, //14019 #CJK UNIFIED IDEOGRAPH + {0xDDEA, 0x6249}, //14020 #CJK UNIFIED IDEOGRAPH + {0xDDEB, 0x6279}, //14021 #CJK UNIFIED IDEOGRAPH + {0xDDEC, 0x6590}, //14022 #CJK UNIFIED IDEOGRAPH + {0xDDED, 0x6787}, //14023 #CJK UNIFIED IDEOGRAPH + {0xDDEE, 0x69A7}, //14024 #CJK UNIFIED IDEOGRAPH + {0xDDEF, 0x6BD4}, //14025 #CJK UNIFIED IDEOGRAPH + {0xDDF0, 0x6BD6}, //14026 #CJK UNIFIED IDEOGRAPH + {0xDDF1, 0x6BD7}, //14027 #CJK UNIFIED IDEOGRAPH + {0xDDF2, 0x6BD8}, //14028 #CJK UNIFIED IDEOGRAPH + {0xDDF3, 0x6CB8}, //14029 #CJK UNIFIED IDEOGRAPH + {0xDDF4, 0xF968}, //14030 #CJK COMPATIBILITY IDEOGRAPH + {0xDDF5, 0x7435}, //14031 #CJK UNIFIED IDEOGRAPH + {0xDDF6, 0x75FA}, //14032 #CJK UNIFIED IDEOGRAPH + {0xDDF7, 0x7812}, //14033 #CJK UNIFIED IDEOGRAPH + {0xDDF8, 0x7891}, //14034 #CJK UNIFIED IDEOGRAPH + {0xDDF9, 0x79D5}, //14035 #CJK UNIFIED IDEOGRAPH + {0xDDFA, 0x79D8}, //14036 #CJK UNIFIED IDEOGRAPH + {0xDDFB, 0x7C83}, //14037 #CJK UNIFIED IDEOGRAPH + {0xDDFC, 0x7DCB}, //14038 #CJK UNIFIED IDEOGRAPH + {0xDDFD, 0x7FE1}, //14039 #CJK UNIFIED IDEOGRAPH + {0xDDFE, 0x80A5}, //14040 #CJK UNIFIED IDEOGRAPH + {0xDEA1, 0x813E}, //14041 #CJK UNIFIED IDEOGRAPH + {0xDEA2, 0x81C2}, //14042 #CJK UNIFIED IDEOGRAPH + {0xDEA3, 0x83F2}, //14043 #CJK UNIFIED IDEOGRAPH + {0xDEA4, 0x871A}, //14044 #CJK UNIFIED IDEOGRAPH + {0xDEA5, 0x88E8}, //14045 #CJK UNIFIED IDEOGRAPH + {0xDEA6, 0x8AB9}, //14046 #CJK UNIFIED IDEOGRAPH + {0xDEA7, 0x8B6C}, //14047 #CJK UNIFIED IDEOGRAPH + {0xDEA8, 0x8CBB}, //14048 #CJK UNIFIED IDEOGRAPH + {0xDEA9, 0x9119}, //14049 #CJK UNIFIED IDEOGRAPH + {0xDEAA, 0x975E}, //14050 #CJK UNIFIED IDEOGRAPH + {0xDEAB, 0x98DB}, //14051 #CJK UNIFIED IDEOGRAPH + {0xDEAC, 0x9F3B}, //14052 #CJK UNIFIED IDEOGRAPH + {0xDEAD, 0x56AC}, //14053 #CJK UNIFIED IDEOGRAPH + {0xDEAE, 0x5B2A}, //14054 #CJK UNIFIED IDEOGRAPH + {0xDEAF, 0x5F6C}, //14055 #CJK UNIFIED IDEOGRAPH + {0xDEB0, 0x658C}, //14056 #CJK UNIFIED IDEOGRAPH + {0xDEB1, 0x6AB3}, //14057 #CJK UNIFIED IDEOGRAPH + {0xDEB2, 0x6BAF}, //14058 #CJK UNIFIED IDEOGRAPH + {0xDEB3, 0x6D5C}, //14059 #CJK UNIFIED IDEOGRAPH + {0xDEB4, 0x6FF1}, //14060 #CJK UNIFIED IDEOGRAPH + {0xDEB5, 0x7015}, //14061 #CJK UNIFIED IDEOGRAPH + {0xDEB6, 0x725D}, //14062 #CJK UNIFIED IDEOGRAPH + {0xDEB7, 0x73AD}, //14063 #CJK UNIFIED IDEOGRAPH + {0xDEB8, 0x8CA7}, //14064 #CJK UNIFIED IDEOGRAPH + {0xDEB9, 0x8CD3}, //14065 #CJK UNIFIED IDEOGRAPH + {0xDEBA, 0x983B}, //14066 #CJK UNIFIED IDEOGRAPH + {0xDEBB, 0x6191}, //14067 #CJK UNIFIED IDEOGRAPH + {0xDEBC, 0x6C37}, //14068 #CJK UNIFIED IDEOGRAPH + {0xDEBD, 0x8058}, //14069 #CJK UNIFIED IDEOGRAPH + {0xDEBE, 0x9A01}, //14070 #CJK UNIFIED IDEOGRAPH + {0xDEBF, 0x4E4D}, //14071 #CJK UNIFIED IDEOGRAPH + {0xDEC0, 0x4E8B}, //14072 #CJK UNIFIED IDEOGRAPH + {0xDEC1, 0x4E9B}, //14073 #CJK UNIFIED IDEOGRAPH + {0xDEC2, 0x4ED5}, //14074 #CJK UNIFIED IDEOGRAPH + {0xDEC3, 0x4F3A}, //14075 #CJK UNIFIED IDEOGRAPH + {0xDEC4, 0x4F3C}, //14076 #CJK UNIFIED IDEOGRAPH + {0xDEC5, 0x4F7F}, //14077 #CJK UNIFIED IDEOGRAPH + {0xDEC6, 0x4FDF}, //14078 #CJK UNIFIED IDEOGRAPH + {0xDEC7, 0x50FF}, //14079 #CJK UNIFIED IDEOGRAPH + {0xDEC8, 0x53F2}, //14080 #CJK UNIFIED IDEOGRAPH + {0xDEC9, 0x53F8}, //14081 #CJK UNIFIED IDEOGRAPH + {0xDECA, 0x5506}, //14082 #CJK UNIFIED IDEOGRAPH + {0xDECB, 0x55E3}, //14083 #CJK UNIFIED IDEOGRAPH + {0xDECC, 0x56DB}, //14084 #CJK UNIFIED IDEOGRAPH + {0xDECD, 0x58EB}, //14085 #CJK UNIFIED IDEOGRAPH + {0xDECE, 0x5962}, //14086 #CJK UNIFIED IDEOGRAPH + {0xDECF, 0x5A11}, //14087 #CJK UNIFIED IDEOGRAPH + {0xDED0, 0x5BEB}, //14088 #CJK UNIFIED IDEOGRAPH + {0xDED1, 0x5BFA}, //14089 #CJK UNIFIED IDEOGRAPH + {0xDED2, 0x5C04}, //14090 #CJK UNIFIED IDEOGRAPH + {0xDED3, 0x5DF3}, //14091 #CJK UNIFIED IDEOGRAPH + {0xDED4, 0x5E2B}, //14092 #CJK UNIFIED IDEOGRAPH + {0xDED5, 0x5F99}, //14093 #CJK UNIFIED IDEOGRAPH + {0xDED6, 0x601D}, //14094 #CJK UNIFIED IDEOGRAPH + {0xDED7, 0x6368}, //14095 #CJK UNIFIED IDEOGRAPH + {0xDED8, 0x659C}, //14096 #CJK UNIFIED IDEOGRAPH + {0xDED9, 0x65AF}, //14097 #CJK UNIFIED IDEOGRAPH + {0xDEDA, 0x67F6}, //14098 #CJK UNIFIED IDEOGRAPH + {0xDEDB, 0x67FB}, //14099 #CJK UNIFIED IDEOGRAPH + {0xDEDC, 0x68AD}, //14100 #CJK UNIFIED IDEOGRAPH + {0xDEDD, 0x6B7B}, //14101 #CJK UNIFIED IDEOGRAPH + {0xDEDE, 0x6C99}, //14102 #CJK UNIFIED IDEOGRAPH + {0xDEDF, 0x6CD7}, //14103 #CJK UNIFIED IDEOGRAPH + {0xDEE0, 0x6E23}, //14104 #CJK UNIFIED IDEOGRAPH + {0xDEE1, 0x7009}, //14105 #CJK UNIFIED IDEOGRAPH + {0xDEE2, 0x7345}, //14106 #CJK UNIFIED IDEOGRAPH + {0xDEE3, 0x7802}, //14107 #CJK UNIFIED IDEOGRAPH + {0xDEE4, 0x793E}, //14108 #CJK UNIFIED IDEOGRAPH + {0xDEE5, 0x7940}, //14109 #CJK UNIFIED IDEOGRAPH + {0xDEE6, 0x7960}, //14110 #CJK UNIFIED IDEOGRAPH + {0xDEE7, 0x79C1}, //14111 #CJK UNIFIED IDEOGRAPH + {0xDEE8, 0x7BE9}, //14112 #CJK UNIFIED IDEOGRAPH + {0xDEE9, 0x7D17}, //14113 #CJK UNIFIED IDEOGRAPH + {0xDEEA, 0x7D72}, //14114 #CJK UNIFIED IDEOGRAPH + {0xDEEB, 0x8086}, //14115 #CJK UNIFIED IDEOGRAPH + {0xDEEC, 0x820D}, //14116 #CJK UNIFIED IDEOGRAPH + {0xDEED, 0x838E}, //14117 #CJK UNIFIED IDEOGRAPH + {0xDEEE, 0x84D1}, //14118 #CJK UNIFIED IDEOGRAPH + {0xDEEF, 0x86C7}, //14119 #CJK UNIFIED IDEOGRAPH + {0xDEF0, 0x88DF}, //14120 #CJK UNIFIED IDEOGRAPH + {0xDEF1, 0x8A50}, //14121 #CJK UNIFIED IDEOGRAPH + {0xDEF2, 0x8A5E}, //14122 #CJK UNIFIED IDEOGRAPH + {0xDEF3, 0x8B1D}, //14123 #CJK UNIFIED IDEOGRAPH + {0xDEF4, 0x8CDC}, //14124 #CJK UNIFIED IDEOGRAPH + {0xDEF5, 0x8D66}, //14125 #CJK UNIFIED IDEOGRAPH + {0xDEF6, 0x8FAD}, //14126 #CJK UNIFIED IDEOGRAPH + {0xDEF7, 0x90AA}, //14127 #CJK UNIFIED IDEOGRAPH + {0xDEF8, 0x98FC}, //14128 #CJK UNIFIED IDEOGRAPH + {0xDEF9, 0x99DF}, //14129 #CJK UNIFIED IDEOGRAPH + {0xDEFA, 0x9E9D}, //14130 #CJK UNIFIED IDEOGRAPH + {0xDEFB, 0x524A}, //14131 #CJK UNIFIED IDEOGRAPH + {0xDEFC, 0xF969}, //14132 #CJK COMPATIBILITY IDEOGRAPH + {0xDEFD, 0x6714}, //14133 #CJK UNIFIED IDEOGRAPH + {0xDEFE, 0xF96A}, //14134 #CJK COMPATIBILITY IDEOGRAPH + {0xDFA1, 0x5098}, //14135 #CJK UNIFIED IDEOGRAPH + {0xDFA2, 0x522A}, //14136 #CJK UNIFIED IDEOGRAPH + {0xDFA3, 0x5C71}, //14137 #CJK UNIFIED IDEOGRAPH + {0xDFA4, 0x6563}, //14138 #CJK UNIFIED IDEOGRAPH + {0xDFA5, 0x6C55}, //14139 #CJK UNIFIED IDEOGRAPH + {0xDFA6, 0x73CA}, //14140 #CJK UNIFIED IDEOGRAPH + {0xDFA7, 0x7523}, //14141 #CJK UNIFIED IDEOGRAPH + {0xDFA8, 0x759D}, //14142 #CJK UNIFIED IDEOGRAPH + {0xDFA9, 0x7B97}, //14143 #CJK UNIFIED IDEOGRAPH + {0xDFAA, 0x849C}, //14144 #CJK UNIFIED IDEOGRAPH + {0xDFAB, 0x9178}, //14145 #CJK UNIFIED IDEOGRAPH + {0xDFAC, 0x9730}, //14146 #CJK UNIFIED IDEOGRAPH + {0xDFAD, 0x4E77}, //14147 #CJK UNIFIED IDEOGRAPH + {0xDFAE, 0x6492}, //14148 #CJK UNIFIED IDEOGRAPH + {0xDFAF, 0x6BBA}, //14149 #CJK UNIFIED IDEOGRAPH + {0xDFB0, 0x715E}, //14150 #CJK UNIFIED IDEOGRAPH + {0xDFB1, 0x85A9}, //14151 #CJK UNIFIED IDEOGRAPH + {0xDFB2, 0x4E09}, //14152 #CJK UNIFIED IDEOGRAPH + {0xDFB3, 0xF96B}, //14153 #CJK COMPATIBILITY IDEOGRAPH + {0xDFB4, 0x6749}, //14154 #CJK UNIFIED IDEOGRAPH + {0xDFB5, 0x68EE}, //14155 #CJK UNIFIED IDEOGRAPH + {0xDFB6, 0x6E17}, //14156 #CJK UNIFIED IDEOGRAPH + {0xDFB7, 0x829F}, //14157 #CJK UNIFIED IDEOGRAPH + {0xDFB8, 0x8518}, //14158 #CJK UNIFIED IDEOGRAPH + {0xDFB9, 0x886B}, //14159 #CJK UNIFIED IDEOGRAPH + {0xDFBA, 0x63F7}, //14160 #CJK UNIFIED IDEOGRAPH + {0xDFBB, 0x6F81}, //14161 #CJK UNIFIED IDEOGRAPH + {0xDFBC, 0x9212}, //14162 #CJK UNIFIED IDEOGRAPH + {0xDFBD, 0x98AF}, //14163 #CJK UNIFIED IDEOGRAPH + {0xDFBE, 0x4E0A}, //14164 #CJK UNIFIED IDEOGRAPH + {0xDFBF, 0x50B7}, //14165 #CJK UNIFIED IDEOGRAPH + {0xDFC0, 0x50CF}, //14166 #CJK UNIFIED IDEOGRAPH + {0xDFC1, 0x511F}, //14167 #CJK UNIFIED IDEOGRAPH + {0xDFC2, 0x5546}, //14168 #CJK UNIFIED IDEOGRAPH + {0xDFC3, 0x55AA}, //14169 #CJK UNIFIED IDEOGRAPH + {0xDFC4, 0x5617}, //14170 #CJK UNIFIED IDEOGRAPH + {0xDFC5, 0x5B40}, //14171 #CJK UNIFIED IDEOGRAPH + {0xDFC6, 0x5C19}, //14172 #CJK UNIFIED IDEOGRAPH + {0xDFC7, 0x5CE0}, //14173 #CJK UNIFIED IDEOGRAPH + {0xDFC8, 0x5E38}, //14174 #CJK UNIFIED IDEOGRAPH + {0xDFC9, 0x5E8A}, //14175 #CJK UNIFIED IDEOGRAPH + {0xDFCA, 0x5EA0}, //14176 #CJK UNIFIED IDEOGRAPH + {0xDFCB, 0x5EC2}, //14177 #CJK UNIFIED IDEOGRAPH + {0xDFCC, 0x60F3}, //14178 #CJK UNIFIED IDEOGRAPH + {0xDFCD, 0x6851}, //14179 #CJK UNIFIED IDEOGRAPH + {0xDFCE, 0x6A61}, //14180 #CJK UNIFIED IDEOGRAPH + {0xDFCF, 0x6E58}, //14181 #CJK UNIFIED IDEOGRAPH + {0xDFD0, 0x723D}, //14182 #CJK UNIFIED IDEOGRAPH + {0xDFD1, 0x7240}, //14183 #CJK UNIFIED IDEOGRAPH + {0xDFD2, 0x72C0}, //14184 #CJK UNIFIED IDEOGRAPH + {0xDFD3, 0x76F8}, //14185 #CJK UNIFIED IDEOGRAPH + {0xDFD4, 0x7965}, //14186 #CJK UNIFIED IDEOGRAPH + {0xDFD5, 0x7BB1}, //14187 #CJK UNIFIED IDEOGRAPH + {0xDFD6, 0x7FD4}, //14188 #CJK UNIFIED IDEOGRAPH + {0xDFD7, 0x88F3}, //14189 #CJK UNIFIED IDEOGRAPH + {0xDFD8, 0x89F4}, //14190 #CJK UNIFIED IDEOGRAPH + {0xDFD9, 0x8A73}, //14191 #CJK UNIFIED IDEOGRAPH + {0xDFDA, 0x8C61}, //14192 #CJK UNIFIED IDEOGRAPH + {0xDFDB, 0x8CDE}, //14193 #CJK UNIFIED IDEOGRAPH + {0xDFDC, 0x971C}, //14194 #CJK UNIFIED IDEOGRAPH + {0xDFDD, 0x585E}, //14195 #CJK UNIFIED IDEOGRAPH + {0xDFDE, 0x74BD}, //14196 #CJK UNIFIED IDEOGRAPH + {0xDFDF, 0x8CFD}, //14197 #CJK UNIFIED IDEOGRAPH + {0xDFE0, 0x55C7}, //14198 #CJK UNIFIED IDEOGRAPH + {0xDFE1, 0xF96C}, //14199 #CJK COMPATIBILITY IDEOGRAPH + {0xDFE2, 0x7A61}, //14200 #CJK UNIFIED IDEOGRAPH + {0xDFE3, 0x7D22}, //14201 #CJK UNIFIED IDEOGRAPH + {0xDFE4, 0x8272}, //14202 #CJK UNIFIED IDEOGRAPH + {0xDFE5, 0x7272}, //14203 #CJK UNIFIED IDEOGRAPH + {0xDFE6, 0x751F}, //14204 #CJK UNIFIED IDEOGRAPH + {0xDFE7, 0x7525}, //14205 #CJK UNIFIED IDEOGRAPH + {0xDFE8, 0xF96D}, //14206 #CJK COMPATIBILITY IDEOGRAPH + {0xDFE9, 0x7B19}, //14207 #CJK UNIFIED IDEOGRAPH + {0xDFEA, 0x5885}, //14208 #CJK UNIFIED IDEOGRAPH + {0xDFEB, 0x58FB}, //14209 #CJK UNIFIED IDEOGRAPH + {0xDFEC, 0x5DBC}, //14210 #CJK UNIFIED IDEOGRAPH + {0xDFED, 0x5E8F}, //14211 #CJK UNIFIED IDEOGRAPH + {0xDFEE, 0x5EB6}, //14212 #CJK UNIFIED IDEOGRAPH + {0xDFEF, 0x5F90}, //14213 #CJK UNIFIED IDEOGRAPH + {0xDFF0, 0x6055}, //14214 #CJK UNIFIED IDEOGRAPH + {0xDFF1, 0x6292}, //14215 #CJK UNIFIED IDEOGRAPH + {0xDFF2, 0x637F}, //14216 #CJK UNIFIED IDEOGRAPH + {0xDFF3, 0x654D}, //14217 #CJK UNIFIED IDEOGRAPH + {0xDFF4, 0x6691}, //14218 #CJK UNIFIED IDEOGRAPH + {0xDFF5, 0x66D9}, //14219 #CJK UNIFIED IDEOGRAPH + {0xDFF6, 0x66F8}, //14220 #CJK UNIFIED IDEOGRAPH + {0xDFF7, 0x6816}, //14221 #CJK UNIFIED IDEOGRAPH + {0xDFF8, 0x68F2}, //14222 #CJK UNIFIED IDEOGRAPH + {0xDFF9, 0x7280}, //14223 #CJK UNIFIED IDEOGRAPH + {0xDFFA, 0x745E}, //14224 #CJK UNIFIED IDEOGRAPH + {0xDFFB, 0x7B6E}, //14225 #CJK UNIFIED IDEOGRAPH + {0xDFFC, 0x7D6E}, //14226 #CJK UNIFIED IDEOGRAPH + {0xDFFD, 0x7DD6}, //14227 #CJK UNIFIED IDEOGRAPH + {0xDFFE, 0x7F72}, //14228 #CJK UNIFIED IDEOGRAPH + {0xE0A1, 0x80E5}, //14229 #CJK UNIFIED IDEOGRAPH + {0xE0A2, 0x8212}, //14230 #CJK UNIFIED IDEOGRAPH + {0xE0A3, 0x85AF}, //14231 #CJK UNIFIED IDEOGRAPH + {0xE0A4, 0x897F}, //14232 #CJK UNIFIED IDEOGRAPH + {0xE0A5, 0x8A93}, //14233 #CJK UNIFIED IDEOGRAPH + {0xE0A6, 0x901D}, //14234 #CJK UNIFIED IDEOGRAPH + {0xE0A7, 0x92E4}, //14235 #CJK UNIFIED IDEOGRAPH + {0xE0A8, 0x9ECD}, //14236 #CJK UNIFIED IDEOGRAPH + {0xE0A9, 0x9F20}, //14237 #CJK UNIFIED IDEOGRAPH + {0xE0AA, 0x5915}, //14238 #CJK UNIFIED IDEOGRAPH + {0xE0AB, 0x596D}, //14239 #CJK UNIFIED IDEOGRAPH + {0xE0AC, 0x5E2D}, //14240 #CJK UNIFIED IDEOGRAPH + {0xE0AD, 0x60DC}, //14241 #CJK UNIFIED IDEOGRAPH + {0xE0AE, 0x6614}, //14242 #CJK UNIFIED IDEOGRAPH + {0xE0AF, 0x6673}, //14243 #CJK UNIFIED IDEOGRAPH + {0xE0B0, 0x6790}, //14244 #CJK UNIFIED IDEOGRAPH + {0xE0B1, 0x6C50}, //14245 #CJK UNIFIED IDEOGRAPH + {0xE0B2, 0x6DC5}, //14246 #CJK UNIFIED IDEOGRAPH + {0xE0B3, 0x6F5F}, //14247 #CJK UNIFIED IDEOGRAPH + {0xE0B4, 0x77F3}, //14248 #CJK UNIFIED IDEOGRAPH + {0xE0B5, 0x78A9}, //14249 #CJK UNIFIED IDEOGRAPH + {0xE0B6, 0x84C6}, //14250 #CJK UNIFIED IDEOGRAPH + {0xE0B7, 0x91CB}, //14251 #CJK UNIFIED IDEOGRAPH + {0xE0B8, 0x932B}, //14252 #CJK UNIFIED IDEOGRAPH + {0xE0B9, 0x4ED9}, //14253 #CJK UNIFIED IDEOGRAPH + {0xE0BA, 0x50CA}, //14254 #CJK UNIFIED IDEOGRAPH + {0xE0BB, 0x5148}, //14255 #CJK UNIFIED IDEOGRAPH + {0xE0BC, 0x5584}, //14256 #CJK UNIFIED IDEOGRAPH + {0xE0BD, 0x5B0B}, //14257 #CJK UNIFIED IDEOGRAPH + {0xE0BE, 0x5BA3}, //14258 #CJK UNIFIED IDEOGRAPH + {0xE0BF, 0x6247}, //14259 #CJK UNIFIED IDEOGRAPH + {0xE0C0, 0x657E}, //14260 #CJK UNIFIED IDEOGRAPH + {0xE0C1, 0x65CB}, //14261 #CJK UNIFIED IDEOGRAPH + {0xE0C2, 0x6E32}, //14262 #CJK UNIFIED IDEOGRAPH + {0xE0C3, 0x717D}, //14263 #CJK UNIFIED IDEOGRAPH + {0xE0C4, 0x7401}, //14264 #CJK UNIFIED IDEOGRAPH + {0xE0C5, 0x7444}, //14265 #CJK UNIFIED IDEOGRAPH + {0xE0C6, 0x7487}, //14266 #CJK UNIFIED IDEOGRAPH + {0xE0C7, 0x74BF}, //14267 #CJK UNIFIED IDEOGRAPH + {0xE0C8, 0x766C}, //14268 #CJK UNIFIED IDEOGRAPH + {0xE0C9, 0x79AA}, //14269 #CJK UNIFIED IDEOGRAPH + {0xE0CA, 0x7DDA}, //14270 #CJK UNIFIED IDEOGRAPH + {0xE0CB, 0x7E55}, //14271 #CJK UNIFIED IDEOGRAPH + {0xE0CC, 0x7FA8}, //14272 #CJK UNIFIED IDEOGRAPH + {0xE0CD, 0x817A}, //14273 #CJK UNIFIED IDEOGRAPH + {0xE0CE, 0x81B3}, //14274 #CJK UNIFIED IDEOGRAPH + {0xE0CF, 0x8239}, //14275 #CJK UNIFIED IDEOGRAPH + {0xE0D0, 0x861A}, //14276 #CJK UNIFIED IDEOGRAPH + {0xE0D1, 0x87EC}, //14277 #CJK UNIFIED IDEOGRAPH + {0xE0D2, 0x8A75}, //14278 #CJK UNIFIED IDEOGRAPH + {0xE0D3, 0x8DE3}, //14279 #CJK UNIFIED IDEOGRAPH + {0xE0D4, 0x9078}, //14280 #CJK UNIFIED IDEOGRAPH + {0xE0D5, 0x9291}, //14281 #CJK UNIFIED IDEOGRAPH + {0xE0D6, 0x9425}, //14282 #CJK UNIFIED IDEOGRAPH + {0xE0D7, 0x994D}, //14283 #CJK UNIFIED IDEOGRAPH + {0xE0D8, 0x9BAE}, //14284 #CJK UNIFIED IDEOGRAPH + {0xE0D9, 0x5368}, //14285 #CJK UNIFIED IDEOGRAPH + {0xE0DA, 0x5C51}, //14286 #CJK UNIFIED IDEOGRAPH + {0xE0DB, 0x6954}, //14287 #CJK UNIFIED IDEOGRAPH + {0xE0DC, 0x6CC4}, //14288 #CJK UNIFIED IDEOGRAPH + {0xE0DD, 0x6D29}, //14289 #CJK UNIFIED IDEOGRAPH + {0xE0DE, 0x6E2B}, //14290 #CJK UNIFIED IDEOGRAPH + {0xE0DF, 0x820C}, //14291 #CJK UNIFIED IDEOGRAPH + {0xE0E0, 0x859B}, //14292 #CJK UNIFIED IDEOGRAPH + {0xE0E1, 0x893B}, //14293 #CJK UNIFIED IDEOGRAPH + {0xE0E2, 0x8A2D}, //14294 #CJK UNIFIED IDEOGRAPH + {0xE0E3, 0x8AAA}, //14295 #CJK UNIFIED IDEOGRAPH + {0xE0E4, 0x96EA}, //14296 #CJK UNIFIED IDEOGRAPH + {0xE0E5, 0x9F67}, //14297 #CJK UNIFIED IDEOGRAPH + {0xE0E6, 0x5261}, //14298 #CJK UNIFIED IDEOGRAPH + {0xE0E7, 0x66B9}, //14299 #CJK UNIFIED IDEOGRAPH + {0xE0E8, 0x6BB2}, //14300 #CJK UNIFIED IDEOGRAPH + {0xE0E9, 0x7E96}, //14301 #CJK UNIFIED IDEOGRAPH + {0xE0EA, 0x87FE}, //14302 #CJK UNIFIED IDEOGRAPH + {0xE0EB, 0x8D0D}, //14303 #CJK UNIFIED IDEOGRAPH + {0xE0EC, 0x9583}, //14304 #CJK UNIFIED IDEOGRAPH + {0xE0ED, 0x965D}, //14305 #CJK UNIFIED IDEOGRAPH + {0xE0EE, 0x651D}, //14306 #CJK UNIFIED IDEOGRAPH + {0xE0EF, 0x6D89}, //14307 #CJK UNIFIED IDEOGRAPH + {0xE0F0, 0x71EE}, //14308 #CJK UNIFIED IDEOGRAPH + {0xE0F1, 0xF96E}, //14309 #CJK COMPATIBILITY IDEOGRAPH + {0xE0F2, 0x57CE}, //14310 #CJK UNIFIED IDEOGRAPH + {0xE0F3, 0x59D3}, //14311 #CJK UNIFIED IDEOGRAPH + {0xE0F4, 0x5BAC}, //14312 #CJK UNIFIED IDEOGRAPH + {0xE0F5, 0x6027}, //14313 #CJK UNIFIED IDEOGRAPH + {0xE0F6, 0x60FA}, //14314 #CJK UNIFIED IDEOGRAPH + {0xE0F7, 0x6210}, //14315 #CJK UNIFIED IDEOGRAPH + {0xE0F8, 0x661F}, //14316 #CJK UNIFIED IDEOGRAPH + {0xE0F9, 0x665F}, //14317 #CJK UNIFIED IDEOGRAPH + {0xE0FA, 0x7329}, //14318 #CJK UNIFIED IDEOGRAPH + {0xE0FB, 0x73F9}, //14319 #CJK UNIFIED IDEOGRAPH + {0xE0FC, 0x76DB}, //14320 #CJK UNIFIED IDEOGRAPH + {0xE0FD, 0x7701}, //14321 #CJK UNIFIED IDEOGRAPH + {0xE0FE, 0x7B6C}, //14322 #CJK UNIFIED IDEOGRAPH + {0xE1A1, 0x8056}, //14323 #CJK UNIFIED IDEOGRAPH + {0xE1A2, 0x8072}, //14324 #CJK UNIFIED IDEOGRAPH + {0xE1A3, 0x8165}, //14325 #CJK UNIFIED IDEOGRAPH + {0xE1A4, 0x8AA0}, //14326 #CJK UNIFIED IDEOGRAPH + {0xE1A5, 0x9192}, //14327 #CJK UNIFIED IDEOGRAPH + {0xE1A6, 0x4E16}, //14328 #CJK UNIFIED IDEOGRAPH + {0xE1A7, 0x52E2}, //14329 #CJK UNIFIED IDEOGRAPH + {0xE1A8, 0x6B72}, //14330 #CJK UNIFIED IDEOGRAPH + {0xE1A9, 0x6D17}, //14331 #CJK UNIFIED IDEOGRAPH + {0xE1AA, 0x7A05}, //14332 #CJK UNIFIED IDEOGRAPH + {0xE1AB, 0x7B39}, //14333 #CJK UNIFIED IDEOGRAPH + {0xE1AC, 0x7D30}, //14334 #CJK UNIFIED IDEOGRAPH + {0xE1AD, 0xF96F}, //14335 #CJK COMPATIBILITY IDEOGRAPH + {0xE1AE, 0x8CB0}, //14336 #CJK UNIFIED IDEOGRAPH + {0xE1AF, 0x53EC}, //14337 #CJK UNIFIED IDEOGRAPH + {0xE1B0, 0x562F}, //14338 #CJK UNIFIED IDEOGRAPH + {0xE1B1, 0x5851}, //14339 #CJK UNIFIED IDEOGRAPH + {0xE1B2, 0x5BB5}, //14340 #CJK UNIFIED IDEOGRAPH + {0xE1B3, 0x5C0F}, //14341 #CJK UNIFIED IDEOGRAPH + {0xE1B4, 0x5C11}, //14342 #CJK UNIFIED IDEOGRAPH + {0xE1B5, 0x5DE2}, //14343 #CJK UNIFIED IDEOGRAPH + {0xE1B6, 0x6240}, //14344 #CJK UNIFIED IDEOGRAPH + {0xE1B7, 0x6383}, //14345 #CJK UNIFIED IDEOGRAPH + {0xE1B8, 0x6414}, //14346 #CJK UNIFIED IDEOGRAPH + {0xE1B9, 0x662D}, //14347 #CJK UNIFIED IDEOGRAPH + {0xE1BA, 0x68B3}, //14348 #CJK UNIFIED IDEOGRAPH + {0xE1BB, 0x6CBC}, //14349 #CJK UNIFIED IDEOGRAPH + {0xE1BC, 0x6D88}, //14350 #CJK UNIFIED IDEOGRAPH + {0xE1BD, 0x6EAF}, //14351 #CJK UNIFIED IDEOGRAPH + {0xE1BE, 0x701F}, //14352 #CJK UNIFIED IDEOGRAPH + {0xE1BF, 0x70A4}, //14353 #CJK UNIFIED IDEOGRAPH + {0xE1C0, 0x71D2}, //14354 #CJK UNIFIED IDEOGRAPH + {0xE1C1, 0x7526}, //14355 #CJK UNIFIED IDEOGRAPH + {0xE1C2, 0x758F}, //14356 #CJK UNIFIED IDEOGRAPH + {0xE1C3, 0x758E}, //14357 #CJK UNIFIED IDEOGRAPH + {0xE1C4, 0x7619}, //14358 #CJK UNIFIED IDEOGRAPH + {0xE1C5, 0x7B11}, //14359 #CJK UNIFIED IDEOGRAPH + {0xE1C6, 0x7BE0}, //14360 #CJK UNIFIED IDEOGRAPH + {0xE1C7, 0x7C2B}, //14361 #CJK UNIFIED IDEOGRAPH + {0xE1C8, 0x7D20}, //14362 #CJK UNIFIED IDEOGRAPH + {0xE1C9, 0x7D39}, //14363 #CJK UNIFIED IDEOGRAPH + {0xE1CA, 0x852C}, //14364 #CJK UNIFIED IDEOGRAPH + {0xE1CB, 0x856D}, //14365 #CJK UNIFIED IDEOGRAPH + {0xE1CC, 0x8607}, //14366 #CJK UNIFIED IDEOGRAPH + {0xE1CD, 0x8A34}, //14367 #CJK UNIFIED IDEOGRAPH + {0xE1CE, 0x900D}, //14368 #CJK UNIFIED IDEOGRAPH + {0xE1CF, 0x9061}, //14369 #CJK UNIFIED IDEOGRAPH + {0xE1D0, 0x90B5}, //14370 #CJK UNIFIED IDEOGRAPH + {0xE1D1, 0x92B7}, //14371 #CJK UNIFIED IDEOGRAPH + {0xE1D2, 0x97F6}, //14372 #CJK UNIFIED IDEOGRAPH + {0xE1D3, 0x9A37}, //14373 #CJK UNIFIED IDEOGRAPH + {0xE1D4, 0x4FD7}, //14374 #CJK UNIFIED IDEOGRAPH + {0xE1D5, 0x5C6C}, //14375 #CJK UNIFIED IDEOGRAPH + {0xE1D6, 0x675F}, //14376 #CJK UNIFIED IDEOGRAPH + {0xE1D7, 0x6D91}, //14377 #CJK UNIFIED IDEOGRAPH + {0xE1D8, 0x7C9F}, //14378 #CJK UNIFIED IDEOGRAPH + {0xE1D9, 0x7E8C}, //14379 #CJK UNIFIED IDEOGRAPH + {0xE1DA, 0x8B16}, //14380 #CJK UNIFIED IDEOGRAPH + {0xE1DB, 0x8D16}, //14381 #CJK UNIFIED IDEOGRAPH + {0xE1DC, 0x901F}, //14382 #CJK UNIFIED IDEOGRAPH + {0xE1DD, 0x5B6B}, //14383 #CJK UNIFIED IDEOGRAPH + {0xE1DE, 0x5DFD}, //14384 #CJK UNIFIED IDEOGRAPH + {0xE1DF, 0x640D}, //14385 #CJK UNIFIED IDEOGRAPH + {0xE1E0, 0x84C0}, //14386 #CJK UNIFIED IDEOGRAPH + {0xE1E1, 0x905C}, //14387 #CJK UNIFIED IDEOGRAPH + {0xE1E2, 0x98E1}, //14388 #CJK UNIFIED IDEOGRAPH + {0xE1E3, 0x7387}, //14389 #CJK UNIFIED IDEOGRAPH + {0xE1E4, 0x5B8B}, //14390 #CJK UNIFIED IDEOGRAPH + {0xE1E5, 0x609A}, //14391 #CJK UNIFIED IDEOGRAPH + {0xE1E6, 0x677E}, //14392 #CJK UNIFIED IDEOGRAPH + {0xE1E7, 0x6DDE}, //14393 #CJK UNIFIED IDEOGRAPH + {0xE1E8, 0x8A1F}, //14394 #CJK UNIFIED IDEOGRAPH + {0xE1E9, 0x8AA6}, //14395 #CJK UNIFIED IDEOGRAPH + {0xE1EA, 0x9001}, //14396 #CJK UNIFIED IDEOGRAPH + {0xE1EB, 0x980C}, //14397 #CJK UNIFIED IDEOGRAPH + {0xE1EC, 0x5237}, //14398 #CJK UNIFIED IDEOGRAPH + {0xE1ED, 0xF970}, //14399 #CJK COMPATIBILITY IDEOGRAPH + {0xE1EE, 0x7051}, //14400 #CJK UNIFIED IDEOGRAPH + {0xE1EF, 0x788E}, //14401 #CJK UNIFIED IDEOGRAPH + {0xE1F0, 0x9396}, //14402 #CJK UNIFIED IDEOGRAPH + {0xE1F1, 0x8870}, //14403 #CJK UNIFIED IDEOGRAPH + {0xE1F2, 0x91D7}, //14404 #CJK UNIFIED IDEOGRAPH + {0xE1F3, 0x4FEE}, //14405 #CJK UNIFIED IDEOGRAPH + {0xE1F4, 0x53D7}, //14406 #CJK UNIFIED IDEOGRAPH + {0xE1F5, 0x55FD}, //14407 #CJK UNIFIED IDEOGRAPH + {0xE1F6, 0x56DA}, //14408 #CJK UNIFIED IDEOGRAPH + {0xE1F7, 0x5782}, //14409 #CJK UNIFIED IDEOGRAPH + {0xE1F8, 0x58FD}, //14410 #CJK UNIFIED IDEOGRAPH + {0xE1F9, 0x5AC2}, //14411 #CJK UNIFIED IDEOGRAPH + {0xE1FA, 0x5B88}, //14412 #CJK UNIFIED IDEOGRAPH + {0xE1FB, 0x5CAB}, //14413 #CJK UNIFIED IDEOGRAPH + {0xE1FC, 0x5CC0}, //14414 #CJK UNIFIED IDEOGRAPH + {0xE1FD, 0x5E25}, //14415 #CJK UNIFIED IDEOGRAPH + {0xE1FE, 0x6101}, //14416 #CJK UNIFIED IDEOGRAPH + {0xE2A1, 0x620D}, //14417 #CJK UNIFIED IDEOGRAPH + {0xE2A2, 0x624B}, //14418 #CJK UNIFIED IDEOGRAPH + {0xE2A3, 0x6388}, //14419 #CJK UNIFIED IDEOGRAPH + {0xE2A4, 0x641C}, //14420 #CJK UNIFIED IDEOGRAPH + {0xE2A5, 0x6536}, //14421 #CJK UNIFIED IDEOGRAPH + {0xE2A6, 0x6578}, //14422 #CJK UNIFIED IDEOGRAPH + {0xE2A7, 0x6A39}, //14423 #CJK UNIFIED IDEOGRAPH + {0xE2A8, 0x6B8A}, //14424 #CJK UNIFIED IDEOGRAPH + {0xE2A9, 0x6C34}, //14425 #CJK UNIFIED IDEOGRAPH + {0xE2AA, 0x6D19}, //14426 #CJK UNIFIED IDEOGRAPH + {0xE2AB, 0x6F31}, //14427 #CJK UNIFIED IDEOGRAPH + {0xE2AC, 0x71E7}, //14428 #CJK UNIFIED IDEOGRAPH + {0xE2AD, 0x72E9}, //14429 #CJK UNIFIED IDEOGRAPH + {0xE2AE, 0x7378}, //14430 #CJK UNIFIED IDEOGRAPH + {0xE2AF, 0x7407}, //14431 #CJK UNIFIED IDEOGRAPH + {0xE2B0, 0x74B2}, //14432 #CJK UNIFIED IDEOGRAPH + {0xE2B1, 0x7626}, //14433 #CJK UNIFIED IDEOGRAPH + {0xE2B2, 0x7761}, //14434 #CJK UNIFIED IDEOGRAPH + {0xE2B3, 0x79C0}, //14435 #CJK UNIFIED IDEOGRAPH + {0xE2B4, 0x7A57}, //14436 #CJK UNIFIED IDEOGRAPH + {0xE2B5, 0x7AEA}, //14437 #CJK UNIFIED IDEOGRAPH + {0xE2B6, 0x7CB9}, //14438 #CJK UNIFIED IDEOGRAPH + {0xE2B7, 0x7D8F}, //14439 #CJK UNIFIED IDEOGRAPH + {0xE2B8, 0x7DAC}, //14440 #CJK UNIFIED IDEOGRAPH + {0xE2B9, 0x7E61}, //14441 #CJK UNIFIED IDEOGRAPH + {0xE2BA, 0x7F9E}, //14442 #CJK UNIFIED IDEOGRAPH + {0xE2BB, 0x8129}, //14443 #CJK UNIFIED IDEOGRAPH + {0xE2BC, 0x8331}, //14444 #CJK UNIFIED IDEOGRAPH + {0xE2BD, 0x8490}, //14445 #CJK UNIFIED IDEOGRAPH + {0xE2BE, 0x84DA}, //14446 #CJK UNIFIED IDEOGRAPH + {0xE2BF, 0x85EA}, //14447 #CJK UNIFIED IDEOGRAPH + {0xE2C0, 0x8896}, //14448 #CJK UNIFIED IDEOGRAPH + {0xE2C1, 0x8AB0}, //14449 #CJK UNIFIED IDEOGRAPH + {0xE2C2, 0x8B90}, //14450 #CJK UNIFIED IDEOGRAPH + {0xE2C3, 0x8F38}, //14451 #CJK UNIFIED IDEOGRAPH + {0xE2C4, 0x9042}, //14452 #CJK UNIFIED IDEOGRAPH + {0xE2C5, 0x9083}, //14453 #CJK UNIFIED IDEOGRAPH + {0xE2C6, 0x916C}, //14454 #CJK UNIFIED IDEOGRAPH + {0xE2C7, 0x9296}, //14455 #CJK UNIFIED IDEOGRAPH + {0xE2C8, 0x92B9}, //14456 #CJK UNIFIED IDEOGRAPH + {0xE2C9, 0x968B}, //14457 #CJK UNIFIED IDEOGRAPH + {0xE2CA, 0x96A7}, //14458 #CJK UNIFIED IDEOGRAPH + {0xE2CB, 0x96A8}, //14459 #CJK UNIFIED IDEOGRAPH + {0xE2CC, 0x96D6}, //14460 #CJK UNIFIED IDEOGRAPH + {0xE2CD, 0x9700}, //14461 #CJK UNIFIED IDEOGRAPH + {0xE2CE, 0x9808}, //14462 #CJK UNIFIED IDEOGRAPH + {0xE2CF, 0x9996}, //14463 #CJK UNIFIED IDEOGRAPH + {0xE2D0, 0x9AD3}, //14464 #CJK UNIFIED IDEOGRAPH + {0xE2D1, 0x9B1A}, //14465 #CJK UNIFIED IDEOGRAPH + {0xE2D2, 0x53D4}, //14466 #CJK UNIFIED IDEOGRAPH + {0xE2D3, 0x587E}, //14467 #CJK UNIFIED IDEOGRAPH + {0xE2D4, 0x5919}, //14468 #CJK UNIFIED IDEOGRAPH + {0xE2D5, 0x5B70}, //14469 #CJK UNIFIED IDEOGRAPH + {0xE2D6, 0x5BBF}, //14470 #CJK UNIFIED IDEOGRAPH + {0xE2D7, 0x6DD1}, //14471 #CJK UNIFIED IDEOGRAPH + {0xE2D8, 0x6F5A}, //14472 #CJK UNIFIED IDEOGRAPH + {0xE2D9, 0x719F}, //14473 #CJK UNIFIED IDEOGRAPH + {0xE2DA, 0x7421}, //14474 #CJK UNIFIED IDEOGRAPH + {0xE2DB, 0x74B9}, //14475 #CJK UNIFIED IDEOGRAPH + {0xE2DC, 0x8085}, //14476 #CJK UNIFIED IDEOGRAPH + {0xE2DD, 0x83FD}, //14477 #CJK UNIFIED IDEOGRAPH + {0xE2DE, 0x5DE1}, //14478 #CJK UNIFIED IDEOGRAPH + {0xE2DF, 0x5F87}, //14479 #CJK UNIFIED IDEOGRAPH + {0xE2E0, 0x5FAA}, //14480 #CJK UNIFIED IDEOGRAPH + {0xE2E1, 0x6042}, //14481 #CJK UNIFIED IDEOGRAPH + {0xE2E2, 0x65EC}, //14482 #CJK UNIFIED IDEOGRAPH + {0xE2E3, 0x6812}, //14483 #CJK UNIFIED IDEOGRAPH + {0xE2E4, 0x696F}, //14484 #CJK UNIFIED IDEOGRAPH + {0xE2E5, 0x6A53}, //14485 #CJK UNIFIED IDEOGRAPH + {0xE2E6, 0x6B89}, //14486 #CJK UNIFIED IDEOGRAPH + {0xE2E7, 0x6D35}, //14487 #CJK UNIFIED IDEOGRAPH + {0xE2E8, 0x6DF3}, //14488 #CJK UNIFIED IDEOGRAPH + {0xE2E9, 0x73E3}, //14489 #CJK UNIFIED IDEOGRAPH + {0xE2EA, 0x76FE}, //14490 #CJK UNIFIED IDEOGRAPH + {0xE2EB, 0x77AC}, //14491 #CJK UNIFIED IDEOGRAPH + {0xE2EC, 0x7B4D}, //14492 #CJK UNIFIED IDEOGRAPH + {0xE2ED, 0x7D14}, //14493 #CJK UNIFIED IDEOGRAPH + {0xE2EE, 0x8123}, //14494 #CJK UNIFIED IDEOGRAPH + {0xE2EF, 0x821C}, //14495 #CJK UNIFIED IDEOGRAPH + {0xE2F0, 0x8340}, //14496 #CJK UNIFIED IDEOGRAPH + {0xE2F1, 0x84F4}, //14497 #CJK UNIFIED IDEOGRAPH + {0xE2F2, 0x8563}, //14498 #CJK UNIFIED IDEOGRAPH + {0xE2F3, 0x8A62}, //14499 #CJK UNIFIED IDEOGRAPH + {0xE2F4, 0x8AC4}, //14500 #CJK UNIFIED IDEOGRAPH + {0xE2F5, 0x9187}, //14501 #CJK UNIFIED IDEOGRAPH + {0xE2F6, 0x931E}, //14502 #CJK UNIFIED IDEOGRAPH + {0xE2F7, 0x9806}, //14503 #CJK UNIFIED IDEOGRAPH + {0xE2F8, 0x99B4}, //14504 #CJK UNIFIED IDEOGRAPH + {0xE2F9, 0x620C}, //14505 #CJK UNIFIED IDEOGRAPH + {0xE2FA, 0x8853}, //14506 #CJK UNIFIED IDEOGRAPH + {0xE2FB, 0x8FF0}, //14507 #CJK UNIFIED IDEOGRAPH + {0xE2FC, 0x9265}, //14508 #CJK UNIFIED IDEOGRAPH + {0xE2FD, 0x5D07}, //14509 #CJK UNIFIED IDEOGRAPH + {0xE2FE, 0x5D27}, //14510 #CJK UNIFIED IDEOGRAPH + {0xE3A1, 0x5D69}, //14511 #CJK UNIFIED IDEOGRAPH + {0xE3A2, 0x745F}, //14512 #CJK UNIFIED IDEOGRAPH + {0xE3A3, 0x819D}, //14513 #CJK UNIFIED IDEOGRAPH + {0xE3A4, 0x8768}, //14514 #CJK UNIFIED IDEOGRAPH + {0xE3A5, 0x6FD5}, //14515 #CJK UNIFIED IDEOGRAPH + {0xE3A6, 0x62FE}, //14516 #CJK UNIFIED IDEOGRAPH + {0xE3A7, 0x7FD2}, //14517 #CJK UNIFIED IDEOGRAPH + {0xE3A8, 0x8936}, //14518 #CJK UNIFIED IDEOGRAPH + {0xE3A9, 0x8972}, //14519 #CJK UNIFIED IDEOGRAPH + {0xE3AA, 0x4E1E}, //14520 #CJK UNIFIED IDEOGRAPH + {0xE3AB, 0x4E58}, //14521 #CJK UNIFIED IDEOGRAPH + {0xE3AC, 0x50E7}, //14522 #CJK UNIFIED IDEOGRAPH + {0xE3AD, 0x52DD}, //14523 #CJK UNIFIED IDEOGRAPH + {0xE3AE, 0x5347}, //14524 #CJK UNIFIED IDEOGRAPH + {0xE3AF, 0x627F}, //14525 #CJK UNIFIED IDEOGRAPH + {0xE3B0, 0x6607}, //14526 #CJK UNIFIED IDEOGRAPH + {0xE3B1, 0x7E69}, //14527 #CJK UNIFIED IDEOGRAPH + {0xE3B2, 0x8805}, //14528 #CJK UNIFIED IDEOGRAPH + {0xE3B3, 0x965E}, //14529 #CJK UNIFIED IDEOGRAPH + {0xE3B4, 0x4F8D}, //14530 #CJK UNIFIED IDEOGRAPH + {0xE3B5, 0x5319}, //14531 #CJK UNIFIED IDEOGRAPH + {0xE3B6, 0x5636}, //14532 #CJK UNIFIED IDEOGRAPH + {0xE3B7, 0x59CB}, //14533 #CJK UNIFIED IDEOGRAPH + {0xE3B8, 0x5AA4}, //14534 #CJK UNIFIED IDEOGRAPH + {0xE3B9, 0x5C38}, //14535 #CJK UNIFIED IDEOGRAPH + {0xE3BA, 0x5C4E}, //14536 #CJK UNIFIED IDEOGRAPH + {0xE3BB, 0x5C4D}, //14537 #CJK UNIFIED IDEOGRAPH + {0xE3BC, 0x5E02}, //14538 #CJK UNIFIED IDEOGRAPH + {0xE3BD, 0x5F11}, //14539 #CJK UNIFIED IDEOGRAPH + {0xE3BE, 0x6043}, //14540 #CJK UNIFIED IDEOGRAPH + {0xE3BF, 0x65BD}, //14541 #CJK UNIFIED IDEOGRAPH + {0xE3C0, 0x662F}, //14542 #CJK UNIFIED IDEOGRAPH + {0xE3C1, 0x6642}, //14543 #CJK UNIFIED IDEOGRAPH + {0xE3C2, 0x67BE}, //14544 #CJK UNIFIED IDEOGRAPH + {0xE3C3, 0x67F4}, //14545 #CJK UNIFIED IDEOGRAPH + {0xE3C4, 0x731C}, //14546 #CJK UNIFIED IDEOGRAPH + {0xE3C5, 0x77E2}, //14547 #CJK UNIFIED IDEOGRAPH + {0xE3C6, 0x793A}, //14548 #CJK UNIFIED IDEOGRAPH + {0xE3C7, 0x7FC5}, //14549 #CJK UNIFIED IDEOGRAPH + {0xE3C8, 0x8494}, //14550 #CJK UNIFIED IDEOGRAPH + {0xE3C9, 0x84CD}, //14551 #CJK UNIFIED IDEOGRAPH + {0xE3CA, 0x8996}, //14552 #CJK UNIFIED IDEOGRAPH + {0xE3CB, 0x8A66}, //14553 #CJK UNIFIED IDEOGRAPH + {0xE3CC, 0x8A69}, //14554 #CJK UNIFIED IDEOGRAPH + {0xE3CD, 0x8AE1}, //14555 #CJK UNIFIED IDEOGRAPH + {0xE3CE, 0x8C55}, //14556 #CJK UNIFIED IDEOGRAPH + {0xE3CF, 0x8C7A}, //14557 #CJK UNIFIED IDEOGRAPH + {0xE3D0, 0x57F4}, //14558 #CJK UNIFIED IDEOGRAPH + {0xE3D1, 0x5BD4}, //14559 #CJK UNIFIED IDEOGRAPH + {0xE3D2, 0x5F0F}, //14560 #CJK UNIFIED IDEOGRAPH + {0xE3D3, 0x606F}, //14561 #CJK UNIFIED IDEOGRAPH + {0xE3D4, 0x62ED}, //14562 #CJK UNIFIED IDEOGRAPH + {0xE3D5, 0x690D}, //14563 #CJK UNIFIED IDEOGRAPH + {0xE3D6, 0x6B96}, //14564 #CJK UNIFIED IDEOGRAPH + {0xE3D7, 0x6E5C}, //14565 #CJK UNIFIED IDEOGRAPH + {0xE3D8, 0x7184}, //14566 #CJK UNIFIED IDEOGRAPH + {0xE3D9, 0x7BD2}, //14567 #CJK UNIFIED IDEOGRAPH + {0xE3DA, 0x8755}, //14568 #CJK UNIFIED IDEOGRAPH + {0xE3DB, 0x8B58}, //14569 #CJK UNIFIED IDEOGRAPH + {0xE3DC, 0x8EFE}, //14570 #CJK UNIFIED IDEOGRAPH + {0xE3DD, 0x98DF}, //14571 #CJK UNIFIED IDEOGRAPH + {0xE3DE, 0x98FE}, //14572 #CJK UNIFIED IDEOGRAPH + {0xE3DF, 0x4F38}, //14573 #CJK UNIFIED IDEOGRAPH + {0xE3E0, 0x4F81}, //14574 #CJK UNIFIED IDEOGRAPH + {0xE3E1, 0x4FE1}, //14575 #CJK UNIFIED IDEOGRAPH + {0xE3E2, 0x547B}, //14576 #CJK UNIFIED IDEOGRAPH + {0xE3E3, 0x5A20}, //14577 #CJK UNIFIED IDEOGRAPH + {0xE3E4, 0x5BB8}, //14578 #CJK UNIFIED IDEOGRAPH + {0xE3E5, 0x613C}, //14579 #CJK UNIFIED IDEOGRAPH + {0xE3E6, 0x65B0}, //14580 #CJK UNIFIED IDEOGRAPH + {0xE3E7, 0x6668}, //14581 #CJK UNIFIED IDEOGRAPH + {0xE3E8, 0x71FC}, //14582 #CJK UNIFIED IDEOGRAPH + {0xE3E9, 0x7533}, //14583 #CJK UNIFIED IDEOGRAPH + {0xE3EA, 0x795E}, //14584 #CJK UNIFIED IDEOGRAPH + {0xE3EB, 0x7D33}, //14585 #CJK UNIFIED IDEOGRAPH + {0xE3EC, 0x814E}, //14586 #CJK UNIFIED IDEOGRAPH + {0xE3ED, 0x81E3}, //14587 #CJK UNIFIED IDEOGRAPH + {0xE3EE, 0x8398}, //14588 #CJK UNIFIED IDEOGRAPH + {0xE3EF, 0x85AA}, //14589 #CJK UNIFIED IDEOGRAPH + {0xE3F0, 0x85CE}, //14590 #CJK UNIFIED IDEOGRAPH + {0xE3F1, 0x8703}, //14591 #CJK UNIFIED IDEOGRAPH + {0xE3F2, 0x8A0A}, //14592 #CJK UNIFIED IDEOGRAPH + {0xE3F3, 0x8EAB}, //14593 #CJK UNIFIED IDEOGRAPH + {0xE3F4, 0x8F9B}, //14594 #CJK UNIFIED IDEOGRAPH + {0xE3F5, 0xF971}, //14595 #CJK COMPATIBILITY IDEOGRAPH + {0xE3F6, 0x8FC5}, //14596 #CJK UNIFIED IDEOGRAPH + {0xE3F7, 0x5931}, //14597 #CJK UNIFIED IDEOGRAPH + {0xE3F8, 0x5BA4}, //14598 #CJK UNIFIED IDEOGRAPH + {0xE3F9, 0x5BE6}, //14599 #CJK UNIFIED IDEOGRAPH + {0xE3FA, 0x6089}, //14600 #CJK UNIFIED IDEOGRAPH + {0xE3FB, 0x5BE9}, //14601 #CJK UNIFIED IDEOGRAPH + {0xE3FC, 0x5C0B}, //14602 #CJK UNIFIED IDEOGRAPH + {0xE3FD, 0x5FC3}, //14603 #CJK UNIFIED IDEOGRAPH + {0xE3FE, 0x6C81}, //14604 #CJK UNIFIED IDEOGRAPH + {0xE4A1, 0xF972}, //14605 #CJK COMPATIBILITY IDEOGRAPH + {0xE4A2, 0x6DF1}, //14606 #CJK UNIFIED IDEOGRAPH + {0xE4A3, 0x700B}, //14607 #CJK UNIFIED IDEOGRAPH + {0xE4A4, 0x751A}, //14608 #CJK UNIFIED IDEOGRAPH + {0xE4A5, 0x82AF}, //14609 #CJK UNIFIED IDEOGRAPH + {0xE4A6, 0x8AF6}, //14610 #CJK UNIFIED IDEOGRAPH + {0xE4A7, 0x4EC0}, //14611 #CJK UNIFIED IDEOGRAPH + {0xE4A8, 0x5341}, //14612 #CJK UNIFIED IDEOGRAPH + {0xE4A9, 0xF973}, //14613 #CJK COMPATIBILITY IDEOGRAPH + {0xE4AA, 0x96D9}, //14614 #CJK UNIFIED IDEOGRAPH + {0xE4AB, 0x6C0F}, //14615 #CJK UNIFIED IDEOGRAPH + {0xE4AC, 0x4E9E}, //14616 #CJK UNIFIED IDEOGRAPH + {0xE4AD, 0x4FC4}, //14617 #CJK UNIFIED IDEOGRAPH + {0xE4AE, 0x5152}, //14618 #CJK UNIFIED IDEOGRAPH + {0xE4AF, 0x555E}, //14619 #CJK UNIFIED IDEOGRAPH + {0xE4B0, 0x5A25}, //14620 #CJK UNIFIED IDEOGRAPH + {0xE4B1, 0x5CE8}, //14621 #CJK UNIFIED IDEOGRAPH + {0xE4B2, 0x6211}, //14622 #CJK UNIFIED IDEOGRAPH + {0xE4B3, 0x7259}, //14623 #CJK UNIFIED IDEOGRAPH + {0xE4B4, 0x82BD}, //14624 #CJK UNIFIED IDEOGRAPH + {0xE4B5, 0x83AA}, //14625 #CJK UNIFIED IDEOGRAPH + {0xE4B6, 0x86FE}, //14626 #CJK UNIFIED IDEOGRAPH + {0xE4B7, 0x8859}, //14627 #CJK UNIFIED IDEOGRAPH + {0xE4B8, 0x8A1D}, //14628 #CJK UNIFIED IDEOGRAPH + {0xE4B9, 0x963F}, //14629 #CJK UNIFIED IDEOGRAPH + {0xE4BA, 0x96C5}, //14630 #CJK UNIFIED IDEOGRAPH + {0xE4BB, 0x9913}, //14631 #CJK UNIFIED IDEOGRAPH + {0xE4BC, 0x9D09}, //14632 #CJK UNIFIED IDEOGRAPH + {0xE4BD, 0x9D5D}, //14633 #CJK UNIFIED IDEOGRAPH + {0xE4BE, 0x580A}, //14634 #CJK UNIFIED IDEOGRAPH + {0xE4BF, 0x5CB3}, //14635 #CJK UNIFIED IDEOGRAPH + {0xE4C0, 0x5DBD}, //14636 #CJK UNIFIED IDEOGRAPH + {0xE4C1, 0x5E44}, //14637 #CJK UNIFIED IDEOGRAPH + {0xE4C2, 0x60E1}, //14638 #CJK UNIFIED IDEOGRAPH + {0xE4C3, 0x6115}, //14639 #CJK UNIFIED IDEOGRAPH + {0xE4C4, 0x63E1}, //14640 #CJK UNIFIED IDEOGRAPH + {0xE4C5, 0x6A02}, //14641 #CJK UNIFIED IDEOGRAPH + {0xE4C6, 0x6E25}, //14642 #CJK UNIFIED IDEOGRAPH + {0xE4C7, 0x9102}, //14643 #CJK UNIFIED IDEOGRAPH + {0xE4C8, 0x9354}, //14644 #CJK UNIFIED IDEOGRAPH + {0xE4C9, 0x984E}, //14645 #CJK UNIFIED IDEOGRAPH + {0xE4CA, 0x9C10}, //14646 #CJK UNIFIED IDEOGRAPH + {0xE4CB, 0x9F77}, //14647 #CJK UNIFIED IDEOGRAPH + {0xE4CC, 0x5B89}, //14648 #CJK UNIFIED IDEOGRAPH + {0xE4CD, 0x5CB8}, //14649 #CJK UNIFIED IDEOGRAPH + {0xE4CE, 0x6309}, //14650 #CJK UNIFIED IDEOGRAPH + {0xE4CF, 0x664F}, //14651 #CJK UNIFIED IDEOGRAPH + {0xE4D0, 0x6848}, //14652 #CJK UNIFIED IDEOGRAPH + {0xE4D1, 0x773C}, //14653 #CJK UNIFIED IDEOGRAPH + {0xE4D2, 0x96C1}, //14654 #CJK UNIFIED IDEOGRAPH + {0xE4D3, 0x978D}, //14655 #CJK UNIFIED IDEOGRAPH + {0xE4D4, 0x9854}, //14656 #CJK UNIFIED IDEOGRAPH + {0xE4D5, 0x9B9F}, //14657 #CJK UNIFIED IDEOGRAPH + {0xE4D6, 0x65A1}, //14658 #CJK UNIFIED IDEOGRAPH + {0xE4D7, 0x8B01}, //14659 #CJK UNIFIED IDEOGRAPH + {0xE4D8, 0x8ECB}, //14660 #CJK UNIFIED IDEOGRAPH + {0xE4D9, 0x95BC}, //14661 #CJK UNIFIED IDEOGRAPH + {0xE4DA, 0x5535}, //14662 #CJK UNIFIED IDEOGRAPH + {0xE4DB, 0x5CA9}, //14663 #CJK UNIFIED IDEOGRAPH + {0xE4DC, 0x5DD6}, //14664 #CJK UNIFIED IDEOGRAPH + {0xE4DD, 0x5EB5}, //14665 #CJK UNIFIED IDEOGRAPH + {0xE4DE, 0x6697}, //14666 #CJK UNIFIED IDEOGRAPH + {0xE4DF, 0x764C}, //14667 #CJK UNIFIED IDEOGRAPH + {0xE4E0, 0x83F4}, //14668 #CJK UNIFIED IDEOGRAPH + {0xE4E1, 0x95C7}, //14669 #CJK UNIFIED IDEOGRAPH + {0xE4E2, 0x58D3}, //14670 #CJK UNIFIED IDEOGRAPH + {0xE4E3, 0x62BC}, //14671 #CJK UNIFIED IDEOGRAPH + {0xE4E4, 0x72CE}, //14672 #CJK UNIFIED IDEOGRAPH + {0xE4E5, 0x9D28}, //14673 #CJK UNIFIED IDEOGRAPH + {0xE4E6, 0x4EF0}, //14674 #CJK UNIFIED IDEOGRAPH + {0xE4E7, 0x592E}, //14675 #CJK UNIFIED IDEOGRAPH + {0xE4E8, 0x600F}, //14676 #CJK UNIFIED IDEOGRAPH + {0xE4E9, 0x663B}, //14677 #CJK UNIFIED IDEOGRAPH + {0xE4EA, 0x6B83}, //14678 #CJK UNIFIED IDEOGRAPH + {0xE4EB, 0x79E7}, //14679 #CJK UNIFIED IDEOGRAPH + {0xE4EC, 0x9D26}, //14680 #CJK UNIFIED IDEOGRAPH + {0xE4ED, 0x5393}, //14681 #CJK UNIFIED IDEOGRAPH + {0xE4EE, 0x54C0}, //14682 #CJK UNIFIED IDEOGRAPH + {0xE4EF, 0x57C3}, //14683 #CJK UNIFIED IDEOGRAPH + {0xE4F0, 0x5D16}, //14684 #CJK UNIFIED IDEOGRAPH + {0xE4F1, 0x611B}, //14685 #CJK UNIFIED IDEOGRAPH + {0xE4F2, 0x66D6}, //14686 #CJK UNIFIED IDEOGRAPH + {0xE4F3, 0x6DAF}, //14687 #CJK UNIFIED IDEOGRAPH + {0xE4F4, 0x788D}, //14688 #CJK UNIFIED IDEOGRAPH + {0xE4F5, 0x827E}, //14689 #CJK UNIFIED IDEOGRAPH + {0xE4F6, 0x9698}, //14690 #CJK UNIFIED IDEOGRAPH + {0xE4F7, 0x9744}, //14691 #CJK UNIFIED IDEOGRAPH + {0xE4F8, 0x5384}, //14692 #CJK UNIFIED IDEOGRAPH + {0xE4F9, 0x627C}, //14693 #CJK UNIFIED IDEOGRAPH + {0xE4FA, 0x6396}, //14694 #CJK UNIFIED IDEOGRAPH + {0xE4FB, 0x6DB2}, //14695 #CJK UNIFIED IDEOGRAPH + {0xE4FC, 0x7E0A}, //14696 #CJK UNIFIED IDEOGRAPH + {0xE4FD, 0x814B}, //14697 #CJK UNIFIED IDEOGRAPH + {0xE4FE, 0x984D}, //14698 #CJK UNIFIED IDEOGRAPH + {0xE5A1, 0x6AFB}, //14699 #CJK UNIFIED IDEOGRAPH + {0xE5A2, 0x7F4C}, //14700 #CJK UNIFIED IDEOGRAPH + {0xE5A3, 0x9DAF}, //14701 #CJK UNIFIED IDEOGRAPH + {0xE5A4, 0x9E1A}, //14702 #CJK UNIFIED IDEOGRAPH + {0xE5A5, 0x4E5F}, //14703 #CJK UNIFIED IDEOGRAPH + {0xE5A6, 0x503B}, //14704 #CJK UNIFIED IDEOGRAPH + {0xE5A7, 0x51B6}, //14705 #CJK UNIFIED IDEOGRAPH + {0xE5A8, 0x591C}, //14706 #CJK UNIFIED IDEOGRAPH + {0xE5A9, 0x60F9}, //14707 #CJK UNIFIED IDEOGRAPH + {0xE5AA, 0x63F6}, //14708 #CJK UNIFIED IDEOGRAPH + {0xE5AB, 0x6930}, //14709 #CJK UNIFIED IDEOGRAPH + {0xE5AC, 0x723A}, //14710 #CJK UNIFIED IDEOGRAPH + {0xE5AD, 0x8036}, //14711 #CJK UNIFIED IDEOGRAPH + {0xE5AE, 0xF974}, //14712 #CJK COMPATIBILITY IDEOGRAPH + {0xE5AF, 0x91CE}, //14713 #CJK UNIFIED IDEOGRAPH + {0xE5B0, 0x5F31}, //14714 #CJK UNIFIED IDEOGRAPH + {0xE5B1, 0xF975}, //14715 #CJK COMPATIBILITY IDEOGRAPH + {0xE5B2, 0xF976}, //14716 #CJK COMPATIBILITY IDEOGRAPH + {0xE5B3, 0x7D04}, //14717 #CJK UNIFIED IDEOGRAPH + {0xE5B4, 0x82E5}, //14718 #CJK UNIFIED IDEOGRAPH + {0xE5B5, 0x846F}, //14719 #CJK UNIFIED IDEOGRAPH + {0xE5B6, 0x84BB}, //14720 #CJK UNIFIED IDEOGRAPH + {0xE5B7, 0x85E5}, //14721 #CJK UNIFIED IDEOGRAPH + {0xE5B8, 0x8E8D}, //14722 #CJK UNIFIED IDEOGRAPH + {0xE5B9, 0xF977}, //14723 #CJK COMPATIBILITY IDEOGRAPH + {0xE5BA, 0x4F6F}, //14724 #CJK UNIFIED IDEOGRAPH + {0xE5BB, 0xF978}, //14725 #CJK COMPATIBILITY IDEOGRAPH + {0xE5BC, 0xF979}, //14726 #CJK COMPATIBILITY IDEOGRAPH + {0xE5BD, 0x58E4}, //14727 #CJK UNIFIED IDEOGRAPH + {0xE5BE, 0x5B43}, //14728 #CJK UNIFIED IDEOGRAPH + {0xE5BF, 0x6059}, //14729 #CJK UNIFIED IDEOGRAPH + {0xE5C0, 0x63DA}, //14730 #CJK UNIFIED IDEOGRAPH + {0xE5C1, 0x6518}, //14731 #CJK UNIFIED IDEOGRAPH + {0xE5C2, 0x656D}, //14732 #CJK UNIFIED IDEOGRAPH + {0xE5C3, 0x6698}, //14733 #CJK UNIFIED IDEOGRAPH + {0xE5C4, 0xF97A}, //14734 #CJK COMPATIBILITY IDEOGRAPH + {0xE5C5, 0x694A}, //14735 #CJK UNIFIED IDEOGRAPH + {0xE5C6, 0x6A23}, //14736 #CJK UNIFIED IDEOGRAPH + {0xE5C7, 0x6D0B}, //14737 #CJK UNIFIED IDEOGRAPH + {0xE5C8, 0x7001}, //14738 #CJK UNIFIED IDEOGRAPH + {0xE5C9, 0x716C}, //14739 #CJK UNIFIED IDEOGRAPH + {0xE5CA, 0x75D2}, //14740 #CJK UNIFIED IDEOGRAPH + {0xE5CB, 0x760D}, //14741 #CJK UNIFIED IDEOGRAPH + {0xE5CC, 0x79B3}, //14742 #CJK UNIFIED IDEOGRAPH + {0xE5CD, 0x7A70}, //14743 #CJK UNIFIED IDEOGRAPH + {0xE5CE, 0xF97B}, //14744 #CJK COMPATIBILITY IDEOGRAPH + {0xE5CF, 0x7F8A}, //14745 #CJK UNIFIED IDEOGRAPH + {0xE5D0, 0xF97C}, //14746 #CJK COMPATIBILITY IDEOGRAPH + {0xE5D1, 0x8944}, //14747 #CJK UNIFIED IDEOGRAPH + {0xE5D2, 0xF97D}, //14748 #CJK COMPATIBILITY IDEOGRAPH + {0xE5D3, 0x8B93}, //14749 #CJK UNIFIED IDEOGRAPH + {0xE5D4, 0x91C0}, //14750 #CJK UNIFIED IDEOGRAPH + {0xE5D5, 0x967D}, //14751 #CJK UNIFIED IDEOGRAPH + {0xE5D6, 0xF97E}, //14752 #CJK COMPATIBILITY IDEOGRAPH + {0xE5D7, 0x990A}, //14753 #CJK UNIFIED IDEOGRAPH + {0xE5D8, 0x5704}, //14754 #CJK UNIFIED IDEOGRAPH + {0xE5D9, 0x5FA1}, //14755 #CJK UNIFIED IDEOGRAPH + {0xE5DA, 0x65BC}, //14756 #CJK UNIFIED IDEOGRAPH + {0xE5DB, 0x6F01}, //14757 #CJK UNIFIED IDEOGRAPH + {0xE5DC, 0x7600}, //14758 #CJK UNIFIED IDEOGRAPH + {0xE5DD, 0x79A6}, //14759 #CJK UNIFIED IDEOGRAPH + {0xE5DE, 0x8A9E}, //14760 #CJK UNIFIED IDEOGRAPH + {0xE5DF, 0x99AD}, //14761 #CJK UNIFIED IDEOGRAPH + {0xE5E0, 0x9B5A}, //14762 #CJK UNIFIED IDEOGRAPH + {0xE5E1, 0x9F6C}, //14763 #CJK UNIFIED IDEOGRAPH + {0xE5E2, 0x5104}, //14764 #CJK UNIFIED IDEOGRAPH + {0xE5E3, 0x61B6}, //14765 #CJK UNIFIED IDEOGRAPH + {0xE5E4, 0x6291}, //14766 #CJK UNIFIED IDEOGRAPH + {0xE5E5, 0x6A8D}, //14767 #CJK UNIFIED IDEOGRAPH + {0xE5E6, 0x81C6}, //14768 #CJK UNIFIED IDEOGRAPH + {0xE5E7, 0x5043}, //14769 #CJK UNIFIED IDEOGRAPH + {0xE5E8, 0x5830}, //14770 #CJK UNIFIED IDEOGRAPH + {0xE5E9, 0x5F66}, //14771 #CJK UNIFIED IDEOGRAPH + {0xE5EA, 0x7109}, //14772 #CJK UNIFIED IDEOGRAPH + {0xE5EB, 0x8A00}, //14773 #CJK UNIFIED IDEOGRAPH + {0xE5EC, 0x8AFA}, //14774 #CJK UNIFIED IDEOGRAPH + {0xE5ED, 0x5B7C}, //14775 #CJK UNIFIED IDEOGRAPH + {0xE5EE, 0x8616}, //14776 #CJK UNIFIED IDEOGRAPH + {0xE5EF, 0x4FFA}, //14777 #CJK UNIFIED IDEOGRAPH + {0xE5F0, 0x513C}, //14778 #CJK UNIFIED IDEOGRAPH + {0xE5F1, 0x56B4}, //14779 #CJK UNIFIED IDEOGRAPH + {0xE5F2, 0x5944}, //14780 #CJK UNIFIED IDEOGRAPH + {0xE5F3, 0x63A9}, //14781 #CJK UNIFIED IDEOGRAPH + {0xE5F4, 0x6DF9}, //14782 #CJK UNIFIED IDEOGRAPH + {0xE5F5, 0x5DAA}, //14783 #CJK UNIFIED IDEOGRAPH + {0xE5F6, 0x696D}, //14784 #CJK UNIFIED IDEOGRAPH + {0xE5F7, 0x5186}, //14785 #CJK UNIFIED IDEOGRAPH + {0xE5F8, 0x4E88}, //14786 #CJK UNIFIED IDEOGRAPH + {0xE5F9, 0x4F59}, //14787 #CJK UNIFIED IDEOGRAPH + {0xE5FA, 0xF97F}, //14788 #CJK COMPATIBILITY IDEOGRAPH + {0xE5FB, 0xF980}, //14789 #CJK COMPATIBILITY IDEOGRAPH + {0xE5FC, 0xF981}, //14790 #CJK COMPATIBILITY IDEOGRAPH + {0xE5FD, 0x5982}, //14791 #CJK UNIFIED IDEOGRAPH + {0xE5FE, 0xF982}, //14792 #CJK COMPATIBILITY IDEOGRAPH + {0xE6A1, 0xF983}, //14793 #CJK COMPATIBILITY IDEOGRAPH + {0xE6A2, 0x6B5F}, //14794 #CJK UNIFIED IDEOGRAPH + {0xE6A3, 0x6C5D}, //14795 #CJK UNIFIED IDEOGRAPH + {0xE6A4, 0xF984}, //14796 #CJK COMPATIBILITY IDEOGRAPH + {0xE6A5, 0x74B5}, //14797 #CJK UNIFIED IDEOGRAPH + {0xE6A6, 0x7916}, //14798 #CJK UNIFIED IDEOGRAPH + {0xE6A7, 0xF985}, //14799 #CJK COMPATIBILITY IDEOGRAPH + {0xE6A8, 0x8207}, //14800 #CJK UNIFIED IDEOGRAPH + {0xE6A9, 0x8245}, //14801 #CJK UNIFIED IDEOGRAPH + {0xE6AA, 0x8339}, //14802 #CJK UNIFIED IDEOGRAPH + {0xE6AB, 0x8F3F}, //14803 #CJK UNIFIED IDEOGRAPH + {0xE6AC, 0x8F5D}, //14804 #CJK UNIFIED IDEOGRAPH + {0xE6AD, 0xF986}, //14805 #CJK COMPATIBILITY IDEOGRAPH + {0xE6AE, 0x9918}, //14806 #CJK UNIFIED IDEOGRAPH + {0xE6AF, 0xF987}, //14807 #CJK COMPATIBILITY IDEOGRAPH + {0xE6B0, 0xF988}, //14808 #CJK COMPATIBILITY IDEOGRAPH + {0xE6B1, 0xF989}, //14809 #CJK COMPATIBILITY IDEOGRAPH + {0xE6B2, 0x4EA6}, //14810 #CJK UNIFIED IDEOGRAPH + {0xE6B3, 0xF98A}, //14811 #CJK COMPATIBILITY IDEOGRAPH + {0xE6B4, 0x57DF}, //14812 #CJK UNIFIED IDEOGRAPH + {0xE6B5, 0x5F79}, //14813 #CJK UNIFIED IDEOGRAPH + {0xE6B6, 0x6613}, //14814 #CJK UNIFIED IDEOGRAPH + {0xE6B7, 0xF98B}, //14815 #CJK COMPATIBILITY IDEOGRAPH + {0xE6B8, 0xF98C}, //14816 #CJK COMPATIBILITY IDEOGRAPH + {0xE6B9, 0x75AB}, //14817 #CJK UNIFIED IDEOGRAPH + {0xE6BA, 0x7E79}, //14818 #CJK UNIFIED IDEOGRAPH + {0xE6BB, 0x8B6F}, //14819 #CJK UNIFIED IDEOGRAPH + {0xE6BC, 0xF98D}, //14820 #CJK COMPATIBILITY IDEOGRAPH + {0xE6BD, 0x9006}, //14821 #CJK UNIFIED IDEOGRAPH + {0xE6BE, 0x9A5B}, //14822 #CJK UNIFIED IDEOGRAPH + {0xE6BF, 0x56A5}, //14823 #CJK UNIFIED IDEOGRAPH + {0xE6C0, 0x5827}, //14824 #CJK UNIFIED IDEOGRAPH + {0xE6C1, 0x59F8}, //14825 #CJK UNIFIED IDEOGRAPH + {0xE6C2, 0x5A1F}, //14826 #CJK UNIFIED IDEOGRAPH + {0xE6C3, 0x5BB4}, //14827 #CJK UNIFIED IDEOGRAPH + {0xE6C4, 0xF98E}, //14828 #CJK COMPATIBILITY IDEOGRAPH + {0xE6C5, 0x5EF6}, //14829 #CJK UNIFIED IDEOGRAPH + {0xE6C6, 0xF98F}, //14830 #CJK COMPATIBILITY IDEOGRAPH + {0xE6C7, 0xF990}, //14831 #CJK COMPATIBILITY IDEOGRAPH + {0xE6C8, 0x6350}, //14832 #CJK UNIFIED IDEOGRAPH + {0xE6C9, 0x633B}, //14833 #CJK UNIFIED IDEOGRAPH + {0xE6CA, 0xF991}, //14834 #CJK COMPATIBILITY IDEOGRAPH + {0xE6CB, 0x693D}, //14835 #CJK UNIFIED IDEOGRAPH + {0xE6CC, 0x6C87}, //14836 #CJK UNIFIED IDEOGRAPH + {0xE6CD, 0x6CBF}, //14837 #CJK UNIFIED IDEOGRAPH + {0xE6CE, 0x6D8E}, //14838 #CJK UNIFIED IDEOGRAPH + {0xE6CF, 0x6D93}, //14839 #CJK UNIFIED IDEOGRAPH + {0xE6D0, 0x6DF5}, //14840 #CJK UNIFIED IDEOGRAPH + {0xE6D1, 0x6F14}, //14841 #CJK UNIFIED IDEOGRAPH + {0xE6D2, 0xF992}, //14842 #CJK COMPATIBILITY IDEOGRAPH + {0xE6D3, 0x70DF}, //14843 #CJK UNIFIED IDEOGRAPH + {0xE6D4, 0x7136}, //14844 #CJK UNIFIED IDEOGRAPH + {0xE6D5, 0x7159}, //14845 #CJK UNIFIED IDEOGRAPH + {0xE6D6, 0xF993}, //14846 #CJK COMPATIBILITY IDEOGRAPH + {0xE6D7, 0x71C3}, //14847 #CJK UNIFIED IDEOGRAPH + {0xE6D8, 0x71D5}, //14848 #CJK UNIFIED IDEOGRAPH + {0xE6D9, 0xF994}, //14849 #CJK COMPATIBILITY IDEOGRAPH + {0xE6DA, 0x784F}, //14850 #CJK UNIFIED IDEOGRAPH + {0xE6DB, 0x786F}, //14851 #CJK UNIFIED IDEOGRAPH + {0xE6DC, 0xF995}, //14852 #CJK COMPATIBILITY IDEOGRAPH + {0xE6DD, 0x7B75}, //14853 #CJK UNIFIED IDEOGRAPH + {0xE6DE, 0x7DE3}, //14854 #CJK UNIFIED IDEOGRAPH + {0xE6DF, 0xF996}, //14855 #CJK COMPATIBILITY IDEOGRAPH + {0xE6E0, 0x7E2F}, //14856 #CJK UNIFIED IDEOGRAPH + {0xE6E1, 0xF997}, //14857 #CJK COMPATIBILITY IDEOGRAPH + {0xE6E2, 0x884D}, //14858 #CJK UNIFIED IDEOGRAPH + {0xE6E3, 0x8EDF}, //14859 #CJK UNIFIED IDEOGRAPH + {0xE6E4, 0xF998}, //14860 #CJK COMPATIBILITY IDEOGRAPH + {0xE6E5, 0xF999}, //14861 #CJK COMPATIBILITY IDEOGRAPH + {0xE6E6, 0xF99A}, //14862 #CJK COMPATIBILITY IDEOGRAPH + {0xE6E7, 0x925B}, //14863 #CJK UNIFIED IDEOGRAPH + {0xE6E8, 0xF99B}, //14864 #CJK COMPATIBILITY IDEOGRAPH + {0xE6E9, 0x9CF6}, //14865 #CJK UNIFIED IDEOGRAPH + {0xE6EA, 0xF99C}, //14866 #CJK COMPATIBILITY IDEOGRAPH + {0xE6EB, 0xF99D}, //14867 #CJK COMPATIBILITY IDEOGRAPH + {0xE6EC, 0xF99E}, //14868 #CJK COMPATIBILITY IDEOGRAPH + {0xE6ED, 0x6085}, //14869 #CJK UNIFIED IDEOGRAPH + {0xE6EE, 0x6D85}, //14870 #CJK UNIFIED IDEOGRAPH + {0xE6EF, 0xF99F}, //14871 #CJK COMPATIBILITY IDEOGRAPH + {0xE6F0, 0x71B1}, //14872 #CJK UNIFIED IDEOGRAPH + {0xE6F1, 0xF9A0}, //14873 #CJK COMPATIBILITY IDEOGRAPH + {0xE6F2, 0xF9A1}, //14874 #CJK COMPATIBILITY IDEOGRAPH + {0xE6F3, 0x95B1}, //14875 #CJK UNIFIED IDEOGRAPH + {0xE6F4, 0x53AD}, //14876 #CJK UNIFIED IDEOGRAPH + {0xE6F5, 0xF9A2}, //14877 #CJK COMPATIBILITY IDEOGRAPH + {0xE6F6, 0xF9A3}, //14878 #CJK COMPATIBILITY IDEOGRAPH + {0xE6F7, 0xF9A4}, //14879 #CJK COMPATIBILITY IDEOGRAPH + {0xE6F8, 0x67D3}, //14880 #CJK UNIFIED IDEOGRAPH + {0xE6F9, 0xF9A5}, //14881 #CJK COMPATIBILITY IDEOGRAPH + {0xE6FA, 0x708E}, //14882 #CJK UNIFIED IDEOGRAPH + {0xE6FB, 0x7130}, //14883 #CJK UNIFIED IDEOGRAPH + {0xE6FC, 0x7430}, //14884 #CJK UNIFIED IDEOGRAPH + {0xE6FD, 0x8276}, //14885 #CJK UNIFIED IDEOGRAPH + {0xE6FE, 0x82D2}, //14886 #CJK UNIFIED IDEOGRAPH + {0xE7A1, 0xF9A6}, //14887 #CJK COMPATIBILITY IDEOGRAPH + {0xE7A2, 0x95BB}, //14888 #CJK UNIFIED IDEOGRAPH + {0xE7A3, 0x9AE5}, //14889 #CJK UNIFIED IDEOGRAPH + {0xE7A4, 0x9E7D}, //14890 #CJK UNIFIED IDEOGRAPH + {0xE7A5, 0x66C4}, //14891 #CJK UNIFIED IDEOGRAPH + {0xE7A6, 0xF9A7}, //14892 #CJK COMPATIBILITY IDEOGRAPH + {0xE7A7, 0x71C1}, //14893 #CJK UNIFIED IDEOGRAPH + {0xE7A8, 0x8449}, //14894 #CJK UNIFIED IDEOGRAPH + {0xE7A9, 0xF9A8}, //14895 #CJK COMPATIBILITY IDEOGRAPH + {0xE7AA, 0xF9A9}, //14896 #CJK COMPATIBILITY IDEOGRAPH + {0xE7AB, 0x584B}, //14897 #CJK UNIFIED IDEOGRAPH + {0xE7AC, 0xF9AA}, //14898 #CJK COMPATIBILITY IDEOGRAPH + {0xE7AD, 0xF9AB}, //14899 #CJK COMPATIBILITY IDEOGRAPH + {0xE7AE, 0x5DB8}, //14900 #CJK UNIFIED IDEOGRAPH + {0xE7AF, 0x5F71}, //14901 #CJK UNIFIED IDEOGRAPH + {0xE7B0, 0xF9AC}, //14902 #CJK COMPATIBILITY IDEOGRAPH + {0xE7B1, 0x6620}, //14903 #CJK UNIFIED IDEOGRAPH + {0xE7B2, 0x668E}, //14904 #CJK UNIFIED IDEOGRAPH + {0xE7B3, 0x6979}, //14905 #CJK UNIFIED IDEOGRAPH + {0xE7B4, 0x69AE}, //14906 #CJK UNIFIED IDEOGRAPH + {0xE7B5, 0x6C38}, //14907 #CJK UNIFIED IDEOGRAPH + {0xE7B6, 0x6CF3}, //14908 #CJK UNIFIED IDEOGRAPH + {0xE7B7, 0x6E36}, //14909 #CJK UNIFIED IDEOGRAPH + {0xE7B8, 0x6F41}, //14910 #CJK UNIFIED IDEOGRAPH + {0xE7B9, 0x6FDA}, //14911 #CJK UNIFIED IDEOGRAPH + {0xE7BA, 0x701B}, //14912 #CJK UNIFIED IDEOGRAPH + {0xE7BB, 0x702F}, //14913 #CJK UNIFIED IDEOGRAPH + {0xE7BC, 0x7150}, //14914 #CJK UNIFIED IDEOGRAPH + {0xE7BD, 0x71DF}, //14915 #CJK UNIFIED IDEOGRAPH + {0xE7BE, 0x7370}, //14916 #CJK UNIFIED IDEOGRAPH + {0xE7BF, 0xF9AD}, //14917 #CJK COMPATIBILITY IDEOGRAPH + {0xE7C0, 0x745B}, //14918 #CJK UNIFIED IDEOGRAPH + {0xE7C1, 0xF9AE}, //14919 #CJK COMPATIBILITY IDEOGRAPH + {0xE7C2, 0x74D4}, //14920 #CJK UNIFIED IDEOGRAPH + {0xE7C3, 0x76C8}, //14921 #CJK UNIFIED IDEOGRAPH + {0xE7C4, 0x7A4E}, //14922 #CJK UNIFIED IDEOGRAPH + {0xE7C5, 0x7E93}, //14923 #CJK UNIFIED IDEOGRAPH + {0xE7C6, 0xF9AF}, //14924 #CJK COMPATIBILITY IDEOGRAPH + {0xE7C7, 0xF9B0}, //14925 #CJK COMPATIBILITY IDEOGRAPH + {0xE7C8, 0x82F1}, //14926 #CJK UNIFIED IDEOGRAPH + {0xE7C9, 0x8A60}, //14927 #CJK UNIFIED IDEOGRAPH + {0xE7CA, 0x8FCE}, //14928 #CJK UNIFIED IDEOGRAPH + {0xE7CB, 0xF9B1}, //14929 #CJK COMPATIBILITY IDEOGRAPH + {0xE7CC, 0x9348}, //14930 #CJK UNIFIED IDEOGRAPH + {0xE7CD, 0xF9B2}, //14931 #CJK COMPATIBILITY IDEOGRAPH + {0xE7CE, 0x9719}, //14932 #CJK UNIFIED IDEOGRAPH + {0xE7CF, 0xF9B3}, //14933 #CJK COMPATIBILITY IDEOGRAPH + {0xE7D0, 0xF9B4}, //14934 #CJK COMPATIBILITY IDEOGRAPH + {0xE7D1, 0x4E42}, //14935 #CJK UNIFIED IDEOGRAPH + {0xE7D2, 0x502A}, //14936 #CJK UNIFIED IDEOGRAPH + {0xE7D3, 0xF9B5}, //14937 #CJK COMPATIBILITY IDEOGRAPH + {0xE7D4, 0x5208}, //14938 #CJK UNIFIED IDEOGRAPH + {0xE7D5, 0x53E1}, //14939 #CJK UNIFIED IDEOGRAPH + {0xE7D6, 0x66F3}, //14940 #CJK UNIFIED IDEOGRAPH + {0xE7D7, 0x6C6D}, //14941 #CJK UNIFIED IDEOGRAPH + {0xE7D8, 0x6FCA}, //14942 #CJK UNIFIED IDEOGRAPH + {0xE7D9, 0x730A}, //14943 #CJK UNIFIED IDEOGRAPH + {0xE7DA, 0x777F}, //14944 #CJK UNIFIED IDEOGRAPH + {0xE7DB, 0x7A62}, //14945 #CJK UNIFIED IDEOGRAPH + {0xE7DC, 0x82AE}, //14946 #CJK UNIFIED IDEOGRAPH + {0xE7DD, 0x85DD}, //14947 #CJK UNIFIED IDEOGRAPH + {0xE7DE, 0x8602}, //14948 #CJK UNIFIED IDEOGRAPH + {0xE7DF, 0xF9B6}, //14949 #CJK COMPATIBILITY IDEOGRAPH + {0xE7E0, 0x88D4}, //14950 #CJK UNIFIED IDEOGRAPH + {0xE7E1, 0x8A63}, //14951 #CJK UNIFIED IDEOGRAPH + {0xE7E2, 0x8B7D}, //14952 #CJK UNIFIED IDEOGRAPH + {0xE7E3, 0x8C6B}, //14953 #CJK UNIFIED IDEOGRAPH + {0xE7E4, 0xF9B7}, //14954 #CJK COMPATIBILITY IDEOGRAPH + {0xE7E5, 0x92B3}, //14955 #CJK UNIFIED IDEOGRAPH + {0xE7E6, 0xF9B8}, //14956 #CJK COMPATIBILITY IDEOGRAPH + {0xE7E7, 0x9713}, //14957 #CJK UNIFIED IDEOGRAPH + {0xE7E8, 0x9810}, //14958 #CJK UNIFIED IDEOGRAPH + {0xE7E9, 0x4E94}, //14959 #CJK UNIFIED IDEOGRAPH + {0xE7EA, 0x4F0D}, //14960 #CJK UNIFIED IDEOGRAPH + {0xE7EB, 0x4FC9}, //14961 #CJK UNIFIED IDEOGRAPH + {0xE7EC, 0x50B2}, //14962 #CJK UNIFIED IDEOGRAPH + {0xE7ED, 0x5348}, //14963 #CJK UNIFIED IDEOGRAPH + {0xE7EE, 0x543E}, //14964 #CJK UNIFIED IDEOGRAPH + {0xE7EF, 0x5433}, //14965 #CJK UNIFIED IDEOGRAPH + {0xE7F0, 0x55DA}, //14966 #CJK UNIFIED IDEOGRAPH + {0xE7F1, 0x5862}, //14967 #CJK UNIFIED IDEOGRAPH + {0xE7F2, 0x58BA}, //14968 #CJK UNIFIED IDEOGRAPH + {0xE7F3, 0x5967}, //14969 #CJK UNIFIED IDEOGRAPH + {0xE7F4, 0x5A1B}, //14970 #CJK UNIFIED IDEOGRAPH + {0xE7F5, 0x5BE4}, //14971 #CJK UNIFIED IDEOGRAPH + {0xE7F6, 0x609F}, //14972 #CJK UNIFIED IDEOGRAPH + {0xE7F7, 0xF9B9}, //14973 #CJK COMPATIBILITY IDEOGRAPH + {0xE7F8, 0x61CA}, //14974 #CJK UNIFIED IDEOGRAPH + {0xE7F9, 0x6556}, //14975 #CJK UNIFIED IDEOGRAPH + {0xE7FA, 0x65FF}, //14976 #CJK UNIFIED IDEOGRAPH + {0xE7FB, 0x6664}, //14977 #CJK UNIFIED IDEOGRAPH + {0xE7FC, 0x68A7}, //14978 #CJK UNIFIED IDEOGRAPH + {0xE7FD, 0x6C5A}, //14979 #CJK UNIFIED IDEOGRAPH + {0xE7FE, 0x6FB3}, //14980 #CJK UNIFIED IDEOGRAPH + {0xE8A1, 0x70CF}, //14981 #CJK UNIFIED IDEOGRAPH + {0xE8A2, 0x71AC}, //14982 #CJK UNIFIED IDEOGRAPH + {0xE8A3, 0x7352}, //14983 #CJK UNIFIED IDEOGRAPH + {0xE8A4, 0x7B7D}, //14984 #CJK UNIFIED IDEOGRAPH + {0xE8A5, 0x8708}, //14985 #CJK UNIFIED IDEOGRAPH + {0xE8A6, 0x8AA4}, //14986 #CJK UNIFIED IDEOGRAPH + {0xE8A7, 0x9C32}, //14987 #CJK UNIFIED IDEOGRAPH + {0xE8A8, 0x9F07}, //14988 #CJK UNIFIED IDEOGRAPH + {0xE8A9, 0x5C4B}, //14989 #CJK UNIFIED IDEOGRAPH + {0xE8AA, 0x6C83}, //14990 #CJK UNIFIED IDEOGRAPH + {0xE8AB, 0x7344}, //14991 #CJK UNIFIED IDEOGRAPH + {0xE8AC, 0x7389}, //14992 #CJK UNIFIED IDEOGRAPH + {0xE8AD, 0x923A}, //14993 #CJK UNIFIED IDEOGRAPH + {0xE8AE, 0x6EAB}, //14994 #CJK UNIFIED IDEOGRAPH + {0xE8AF, 0x7465}, //14995 #CJK UNIFIED IDEOGRAPH + {0xE8B0, 0x761F}, //14996 #CJK UNIFIED IDEOGRAPH + {0xE8B1, 0x7A69}, //14997 #CJK UNIFIED IDEOGRAPH + {0xE8B2, 0x7E15}, //14998 #CJK UNIFIED IDEOGRAPH + {0xE8B3, 0x860A}, //14999 #CJK UNIFIED IDEOGRAPH + {0xE8B4, 0x5140}, //15000 #CJK UNIFIED IDEOGRAPH + {0xE8B5, 0x58C5}, //15001 #CJK UNIFIED IDEOGRAPH + {0xE8B6, 0x64C1}, //15002 #CJK UNIFIED IDEOGRAPH + {0xE8B7, 0x74EE}, //15003 #CJK UNIFIED IDEOGRAPH + {0xE8B8, 0x7515}, //15004 #CJK UNIFIED IDEOGRAPH + {0xE8B9, 0x7670}, //15005 #CJK UNIFIED IDEOGRAPH + {0xE8BA, 0x7FC1}, //15006 #CJK UNIFIED IDEOGRAPH + {0xE8BB, 0x9095}, //15007 #CJK UNIFIED IDEOGRAPH + {0xE8BC, 0x96CD}, //15008 #CJK UNIFIED IDEOGRAPH + {0xE8BD, 0x9954}, //15009 #CJK UNIFIED IDEOGRAPH + {0xE8BE, 0x6E26}, //15010 #CJK UNIFIED IDEOGRAPH + {0xE8BF, 0x74E6}, //15011 #CJK UNIFIED IDEOGRAPH + {0xE8C0, 0x7AA9}, //15012 #CJK UNIFIED IDEOGRAPH + {0xE8C1, 0x7AAA}, //15013 #CJK UNIFIED IDEOGRAPH + {0xE8C2, 0x81E5}, //15014 #CJK UNIFIED IDEOGRAPH + {0xE8C3, 0x86D9}, //15015 #CJK UNIFIED IDEOGRAPH + {0xE8C4, 0x8778}, //15016 #CJK UNIFIED IDEOGRAPH + {0xE8C5, 0x8A1B}, //15017 #CJK UNIFIED IDEOGRAPH + {0xE8C6, 0x5A49}, //15018 #CJK UNIFIED IDEOGRAPH + {0xE8C7, 0x5B8C}, //15019 #CJK UNIFIED IDEOGRAPH + {0xE8C8, 0x5B9B}, //15020 #CJK UNIFIED IDEOGRAPH + {0xE8C9, 0x68A1}, //15021 #CJK UNIFIED IDEOGRAPH + {0xE8CA, 0x6900}, //15022 #CJK UNIFIED IDEOGRAPH + {0xE8CB, 0x6D63}, //15023 #CJK UNIFIED IDEOGRAPH + {0xE8CC, 0x73A9}, //15024 #CJK UNIFIED IDEOGRAPH + {0xE8CD, 0x7413}, //15025 #CJK UNIFIED IDEOGRAPH + {0xE8CE, 0x742C}, //15026 #CJK UNIFIED IDEOGRAPH + {0xE8CF, 0x7897}, //15027 #CJK UNIFIED IDEOGRAPH + {0xE8D0, 0x7DE9}, //15028 #CJK UNIFIED IDEOGRAPH + {0xE8D1, 0x7FEB}, //15029 #CJK UNIFIED IDEOGRAPH + {0xE8D2, 0x8118}, //15030 #CJK UNIFIED IDEOGRAPH + {0xE8D3, 0x8155}, //15031 #CJK UNIFIED IDEOGRAPH + {0xE8D4, 0x839E}, //15032 #CJK UNIFIED IDEOGRAPH + {0xE8D5, 0x8C4C}, //15033 #CJK UNIFIED IDEOGRAPH + {0xE8D6, 0x962E}, //15034 #CJK UNIFIED IDEOGRAPH + {0xE8D7, 0x9811}, //15035 #CJK UNIFIED IDEOGRAPH + {0xE8D8, 0x66F0}, //15036 #CJK UNIFIED IDEOGRAPH + {0xE8D9, 0x5F80}, //15037 #CJK UNIFIED IDEOGRAPH + {0xE8DA, 0x65FA}, //15038 #CJK UNIFIED IDEOGRAPH + {0xE8DB, 0x6789}, //15039 #CJK UNIFIED IDEOGRAPH + {0xE8DC, 0x6C6A}, //15040 #CJK UNIFIED IDEOGRAPH + {0xE8DD, 0x738B}, //15041 #CJK UNIFIED IDEOGRAPH + {0xE8DE, 0x502D}, //15042 #CJK UNIFIED IDEOGRAPH + {0xE8DF, 0x5A03}, //15043 #CJK UNIFIED IDEOGRAPH + {0xE8E0, 0x6B6A}, //15044 #CJK UNIFIED IDEOGRAPH + {0xE8E1, 0x77EE}, //15045 #CJK UNIFIED IDEOGRAPH + {0xE8E2, 0x5916}, //15046 #CJK UNIFIED IDEOGRAPH + {0xE8E3, 0x5D6C}, //15047 #CJK UNIFIED IDEOGRAPH + {0xE8E4, 0x5DCD}, //15048 #CJK UNIFIED IDEOGRAPH + {0xE8E5, 0x7325}, //15049 #CJK UNIFIED IDEOGRAPH + {0xE8E6, 0x754F}, //15050 #CJK UNIFIED IDEOGRAPH + {0xE8E7, 0xF9BA}, //15051 #CJK COMPATIBILITY IDEOGRAPH + {0xE8E8, 0xF9BB}, //15052 #CJK COMPATIBILITY IDEOGRAPH + {0xE8E9, 0x50E5}, //15053 #CJK UNIFIED IDEOGRAPH + {0xE8EA, 0x51F9}, //15054 #CJK UNIFIED IDEOGRAPH + {0xE8EB, 0x582F}, //15055 #CJK UNIFIED IDEOGRAPH + {0xE8EC, 0x592D}, //15056 #CJK UNIFIED IDEOGRAPH + {0xE8ED, 0x5996}, //15057 #CJK UNIFIED IDEOGRAPH + {0xE8EE, 0x59DA}, //15058 #CJK UNIFIED IDEOGRAPH + {0xE8EF, 0x5BE5}, //15059 #CJK UNIFIED IDEOGRAPH + {0xE8F0, 0xF9BC}, //15060 #CJK COMPATIBILITY IDEOGRAPH + {0xE8F1, 0xF9BD}, //15061 #CJK COMPATIBILITY IDEOGRAPH + {0xE8F2, 0x5DA2}, //15062 #CJK UNIFIED IDEOGRAPH + {0xE8F3, 0x62D7}, //15063 #CJK UNIFIED IDEOGRAPH + {0xE8F4, 0x6416}, //15064 #CJK UNIFIED IDEOGRAPH + {0xE8F5, 0x6493}, //15065 #CJK UNIFIED IDEOGRAPH + {0xE8F6, 0x64FE}, //15066 #CJK UNIFIED IDEOGRAPH + {0xE8F7, 0xF9BE}, //15067 #CJK COMPATIBILITY IDEOGRAPH + {0xE8F8, 0x66DC}, //15068 #CJK UNIFIED IDEOGRAPH + {0xE8F9, 0xF9BF}, //15069 #CJK COMPATIBILITY IDEOGRAPH + {0xE8FA, 0x6A48}, //15070 #CJK UNIFIED IDEOGRAPH + {0xE8FB, 0xF9C0}, //15071 #CJK COMPATIBILITY IDEOGRAPH + {0xE8FC, 0x71FF}, //15072 #CJK UNIFIED IDEOGRAPH + {0xE8FD, 0x7464}, //15073 #CJK UNIFIED IDEOGRAPH + {0xE8FE, 0xF9C1}, //15074 #CJK COMPATIBILITY IDEOGRAPH + {0xE9A1, 0x7A88}, //15075 #CJK UNIFIED IDEOGRAPH + {0xE9A2, 0x7AAF}, //15076 #CJK UNIFIED IDEOGRAPH + {0xE9A3, 0x7E47}, //15077 #CJK UNIFIED IDEOGRAPH + {0xE9A4, 0x7E5E}, //15078 #CJK UNIFIED IDEOGRAPH + {0xE9A5, 0x8000}, //15079 #CJK UNIFIED IDEOGRAPH + {0xE9A6, 0x8170}, //15080 #CJK UNIFIED IDEOGRAPH + {0xE9A7, 0xF9C2}, //15081 #CJK COMPATIBILITY IDEOGRAPH + {0xE9A8, 0x87EF}, //15082 #CJK UNIFIED IDEOGRAPH + {0xE9A9, 0x8981}, //15083 #CJK UNIFIED IDEOGRAPH + {0xE9AA, 0x8B20}, //15084 #CJK UNIFIED IDEOGRAPH + {0xE9AB, 0x9059}, //15085 #CJK UNIFIED IDEOGRAPH + {0xE9AC, 0xF9C3}, //15086 #CJK COMPATIBILITY IDEOGRAPH + {0xE9AD, 0x9080}, //15087 #CJK UNIFIED IDEOGRAPH + {0xE9AE, 0x9952}, //15088 #CJK UNIFIED IDEOGRAPH + {0xE9AF, 0x617E}, //15089 #CJK UNIFIED IDEOGRAPH + {0xE9B0, 0x6B32}, //15090 #CJK UNIFIED IDEOGRAPH + {0xE9B1, 0x6D74}, //15091 #CJK UNIFIED IDEOGRAPH + {0xE9B2, 0x7E1F}, //15092 #CJK UNIFIED IDEOGRAPH + {0xE9B3, 0x8925}, //15093 #CJK UNIFIED IDEOGRAPH + {0xE9B4, 0x8FB1}, //15094 #CJK UNIFIED IDEOGRAPH + {0xE9B5, 0x4FD1}, //15095 #CJK UNIFIED IDEOGRAPH + {0xE9B6, 0x50AD}, //15096 #CJK UNIFIED IDEOGRAPH + {0xE9B7, 0x5197}, //15097 #CJK UNIFIED IDEOGRAPH + {0xE9B8, 0x52C7}, //15098 #CJK UNIFIED IDEOGRAPH + {0xE9B9, 0x57C7}, //15099 #CJK UNIFIED IDEOGRAPH + {0xE9BA, 0x5889}, //15100 #CJK UNIFIED IDEOGRAPH + {0xE9BB, 0x5BB9}, //15101 #CJK UNIFIED IDEOGRAPH + {0xE9BC, 0x5EB8}, //15102 #CJK UNIFIED IDEOGRAPH + {0xE9BD, 0x6142}, //15103 #CJK UNIFIED IDEOGRAPH + {0xE9BE, 0x6995}, //15104 #CJK UNIFIED IDEOGRAPH + {0xE9BF, 0x6D8C}, //15105 #CJK UNIFIED IDEOGRAPH + {0xE9C0, 0x6E67}, //15106 #CJK UNIFIED IDEOGRAPH + {0xE9C1, 0x6EB6}, //15107 #CJK UNIFIED IDEOGRAPH + {0xE9C2, 0x7194}, //15108 #CJK UNIFIED IDEOGRAPH + {0xE9C3, 0x7462}, //15109 #CJK UNIFIED IDEOGRAPH + {0xE9C4, 0x7528}, //15110 #CJK UNIFIED IDEOGRAPH + {0xE9C5, 0x752C}, //15111 #CJK UNIFIED IDEOGRAPH + {0xE9C6, 0x8073}, //15112 #CJK UNIFIED IDEOGRAPH + {0xE9C7, 0x8338}, //15113 #CJK UNIFIED IDEOGRAPH + {0xE9C8, 0x84C9}, //15114 #CJK UNIFIED IDEOGRAPH + {0xE9C9, 0x8E0A}, //15115 #CJK UNIFIED IDEOGRAPH + {0xE9CA, 0x9394}, //15116 #CJK UNIFIED IDEOGRAPH + {0xE9CB, 0x93DE}, //15117 #CJK UNIFIED IDEOGRAPH + {0xE9CC, 0xF9C4}, //15118 #CJK COMPATIBILITY IDEOGRAPH + {0xE9CD, 0x4E8E}, //15119 #CJK UNIFIED IDEOGRAPH + {0xE9CE, 0x4F51}, //15120 #CJK UNIFIED IDEOGRAPH + {0xE9CF, 0x5076}, //15121 #CJK UNIFIED IDEOGRAPH + {0xE9D0, 0x512A}, //15122 #CJK UNIFIED IDEOGRAPH + {0xE9D1, 0x53C8}, //15123 #CJK UNIFIED IDEOGRAPH + {0xE9D2, 0x53CB}, //15124 #CJK UNIFIED IDEOGRAPH + {0xE9D3, 0x53F3}, //15125 #CJK UNIFIED IDEOGRAPH + {0xE9D4, 0x5B87}, //15126 #CJK UNIFIED IDEOGRAPH + {0xE9D5, 0x5BD3}, //15127 #CJK UNIFIED IDEOGRAPH + {0xE9D6, 0x5C24}, //15128 #CJK UNIFIED IDEOGRAPH + {0xE9D7, 0x611A}, //15129 #CJK UNIFIED IDEOGRAPH + {0xE9D8, 0x6182}, //15130 #CJK UNIFIED IDEOGRAPH + {0xE9D9, 0x65F4}, //15131 #CJK UNIFIED IDEOGRAPH + {0xE9DA, 0x725B}, //15132 #CJK UNIFIED IDEOGRAPH + {0xE9DB, 0x7397}, //15133 #CJK UNIFIED IDEOGRAPH + {0xE9DC, 0x7440}, //15134 #CJK UNIFIED IDEOGRAPH + {0xE9DD, 0x76C2}, //15135 #CJK UNIFIED IDEOGRAPH + {0xE9DE, 0x7950}, //15136 #CJK UNIFIED IDEOGRAPH + {0xE9DF, 0x7991}, //15137 #CJK UNIFIED IDEOGRAPH + {0xE9E0, 0x79B9}, //15138 #CJK UNIFIED IDEOGRAPH + {0xE9E1, 0x7D06}, //15139 #CJK UNIFIED IDEOGRAPH + {0xE9E2, 0x7FBD}, //15140 #CJK UNIFIED IDEOGRAPH + {0xE9E3, 0x828B}, //15141 #CJK UNIFIED IDEOGRAPH + {0xE9E4, 0x85D5}, //15142 #CJK UNIFIED IDEOGRAPH + {0xE9E5, 0x865E}, //15143 #CJK UNIFIED IDEOGRAPH + {0xE9E6, 0x8FC2}, //15144 #CJK UNIFIED IDEOGRAPH + {0xE9E7, 0x9047}, //15145 #CJK UNIFIED IDEOGRAPH + {0xE9E8, 0x90F5}, //15146 #CJK UNIFIED IDEOGRAPH + {0xE9E9, 0x91EA}, //15147 #CJK UNIFIED IDEOGRAPH + {0xE9EA, 0x9685}, //15148 #CJK UNIFIED IDEOGRAPH + {0xE9EB, 0x96E8}, //15149 #CJK UNIFIED IDEOGRAPH + {0xE9EC, 0x96E9}, //15150 #CJK UNIFIED IDEOGRAPH + {0xE9ED, 0x52D6}, //15151 #CJK UNIFIED IDEOGRAPH + {0xE9EE, 0x5F67}, //15152 #CJK UNIFIED IDEOGRAPH + {0xE9EF, 0x65ED}, //15153 #CJK UNIFIED IDEOGRAPH + {0xE9F0, 0x6631}, //15154 #CJK UNIFIED IDEOGRAPH + {0xE9F1, 0x682F}, //15155 #CJK UNIFIED IDEOGRAPH + {0xE9F2, 0x715C}, //15156 #CJK UNIFIED IDEOGRAPH + {0xE9F3, 0x7A36}, //15157 #CJK UNIFIED IDEOGRAPH + {0xE9F4, 0x90C1}, //15158 #CJK UNIFIED IDEOGRAPH + {0xE9F5, 0x980A}, //15159 #CJK UNIFIED IDEOGRAPH + {0xE9F6, 0x4E91}, //15160 #CJK UNIFIED IDEOGRAPH + {0xE9F7, 0xF9C5}, //15161 #CJK COMPATIBILITY IDEOGRAPH + {0xE9F8, 0x6A52}, //15162 #CJK UNIFIED IDEOGRAPH + {0xE9F9, 0x6B9E}, //15163 #CJK UNIFIED IDEOGRAPH + {0xE9FA, 0x6F90}, //15164 #CJK UNIFIED IDEOGRAPH + {0xE9FB, 0x7189}, //15165 #CJK UNIFIED IDEOGRAPH + {0xE9FC, 0x8018}, //15166 #CJK UNIFIED IDEOGRAPH + {0xE9FD, 0x82B8}, //15167 #CJK UNIFIED IDEOGRAPH + {0xE9FE, 0x8553}, //15168 #CJK UNIFIED IDEOGRAPH + {0xEAA1, 0x904B}, //15169 #CJK UNIFIED IDEOGRAPH + {0xEAA2, 0x9695}, //15170 #CJK UNIFIED IDEOGRAPH + {0xEAA3, 0x96F2}, //15171 #CJK UNIFIED IDEOGRAPH + {0xEAA4, 0x97FB}, //15172 #CJK UNIFIED IDEOGRAPH + {0xEAA5, 0x851A}, //15173 #CJK UNIFIED IDEOGRAPH + {0xEAA6, 0x9B31}, //15174 #CJK UNIFIED IDEOGRAPH + {0xEAA7, 0x4E90}, //15175 #CJK UNIFIED IDEOGRAPH + {0xEAA8, 0x718A}, //15176 #CJK UNIFIED IDEOGRAPH + {0xEAA9, 0x96C4}, //15177 #CJK UNIFIED IDEOGRAPH + {0xEAAA, 0x5143}, //15178 #CJK UNIFIED IDEOGRAPH + {0xEAAB, 0x539F}, //15179 #CJK UNIFIED IDEOGRAPH + {0xEAAC, 0x54E1}, //15180 #CJK UNIFIED IDEOGRAPH + {0xEAAD, 0x5713}, //15181 #CJK UNIFIED IDEOGRAPH + {0xEAAE, 0x5712}, //15182 #CJK UNIFIED IDEOGRAPH + {0xEAAF, 0x57A3}, //15183 #CJK UNIFIED IDEOGRAPH + {0xEAB0, 0x5A9B}, //15184 #CJK UNIFIED IDEOGRAPH + {0xEAB1, 0x5AC4}, //15185 #CJK UNIFIED IDEOGRAPH + {0xEAB2, 0x5BC3}, //15186 #CJK UNIFIED IDEOGRAPH + {0xEAB3, 0x6028}, //15187 #CJK UNIFIED IDEOGRAPH + {0xEAB4, 0x613F}, //15188 #CJK UNIFIED IDEOGRAPH + {0xEAB5, 0x63F4}, //15189 #CJK UNIFIED IDEOGRAPH + {0xEAB6, 0x6C85}, //15190 #CJK UNIFIED IDEOGRAPH + {0xEAB7, 0x6D39}, //15191 #CJK UNIFIED IDEOGRAPH + {0xEAB8, 0x6E72}, //15192 #CJK UNIFIED IDEOGRAPH + {0xEAB9, 0x6E90}, //15193 #CJK UNIFIED IDEOGRAPH + {0xEABA, 0x7230}, //15194 #CJK UNIFIED IDEOGRAPH + {0xEABB, 0x733F}, //15195 #CJK UNIFIED IDEOGRAPH + {0xEABC, 0x7457}, //15196 #CJK UNIFIED IDEOGRAPH + {0xEABD, 0x82D1}, //15197 #CJK UNIFIED IDEOGRAPH + {0xEABE, 0x8881}, //15198 #CJK UNIFIED IDEOGRAPH + {0xEABF, 0x8F45}, //15199 #CJK UNIFIED IDEOGRAPH + {0xEAC0, 0x9060}, //15200 #CJK UNIFIED IDEOGRAPH + {0xEAC1, 0xF9C6}, //15201 #CJK COMPATIBILITY IDEOGRAPH + {0xEAC2, 0x9662}, //15202 #CJK UNIFIED IDEOGRAPH + {0xEAC3, 0x9858}, //15203 #CJK UNIFIED IDEOGRAPH + {0xEAC4, 0x9D1B}, //15204 #CJK UNIFIED IDEOGRAPH + {0xEAC5, 0x6708}, //15205 #CJK UNIFIED IDEOGRAPH + {0xEAC6, 0x8D8A}, //15206 #CJK UNIFIED IDEOGRAPH + {0xEAC7, 0x925E}, //15207 #CJK UNIFIED IDEOGRAPH + {0xEAC8, 0x4F4D}, //15208 #CJK UNIFIED IDEOGRAPH + {0xEAC9, 0x5049}, //15209 #CJK UNIFIED IDEOGRAPH + {0xEACA, 0x50DE}, //15210 #CJK UNIFIED IDEOGRAPH + {0xEACB, 0x5371}, //15211 #CJK UNIFIED IDEOGRAPH + {0xEACC, 0x570D}, //15212 #CJK UNIFIED IDEOGRAPH + {0xEACD, 0x59D4}, //15213 #CJK UNIFIED IDEOGRAPH + {0xEACE, 0x5A01}, //15214 #CJK UNIFIED IDEOGRAPH + {0xEACF, 0x5C09}, //15215 #CJK UNIFIED IDEOGRAPH + {0xEAD0, 0x6170}, //15216 #CJK UNIFIED IDEOGRAPH + {0xEAD1, 0x6690}, //15217 #CJK UNIFIED IDEOGRAPH + {0xEAD2, 0x6E2D}, //15218 #CJK UNIFIED IDEOGRAPH + {0xEAD3, 0x7232}, //15219 #CJK UNIFIED IDEOGRAPH + {0xEAD4, 0x744B}, //15220 #CJK UNIFIED IDEOGRAPH + {0xEAD5, 0x7DEF}, //15221 #CJK UNIFIED IDEOGRAPH + {0xEAD6, 0x80C3}, //15222 #CJK UNIFIED IDEOGRAPH + {0xEAD7, 0x840E}, //15223 #CJK UNIFIED IDEOGRAPH + {0xEAD8, 0x8466}, //15224 #CJK UNIFIED IDEOGRAPH + {0xEAD9, 0x853F}, //15225 #CJK UNIFIED IDEOGRAPH + {0xEADA, 0x875F}, //15226 #CJK UNIFIED IDEOGRAPH + {0xEADB, 0x885B}, //15227 #CJK UNIFIED IDEOGRAPH + {0xEADC, 0x8918}, //15228 #CJK UNIFIED IDEOGRAPH + {0xEADD, 0x8B02}, //15229 #CJK UNIFIED IDEOGRAPH + {0xEADE, 0x9055}, //15230 #CJK UNIFIED IDEOGRAPH + {0xEADF, 0x97CB}, //15231 #CJK UNIFIED IDEOGRAPH + {0xEAE0, 0x9B4F}, //15232 #CJK UNIFIED IDEOGRAPH + {0xEAE1, 0x4E73}, //15233 #CJK UNIFIED IDEOGRAPH + {0xEAE2, 0x4F91}, //15234 #CJK UNIFIED IDEOGRAPH + {0xEAE3, 0x5112}, //15235 #CJK UNIFIED IDEOGRAPH + {0xEAE4, 0x516A}, //15236 #CJK UNIFIED IDEOGRAPH + {0xEAE5, 0xF9C7}, //15237 #CJK COMPATIBILITY IDEOGRAPH + {0xEAE6, 0x552F}, //15238 #CJK UNIFIED IDEOGRAPH + {0xEAE7, 0x55A9}, //15239 #CJK UNIFIED IDEOGRAPH + {0xEAE8, 0x5B7A}, //15240 #CJK UNIFIED IDEOGRAPH + {0xEAE9, 0x5BA5}, //15241 #CJK UNIFIED IDEOGRAPH + {0xEAEA, 0x5E7C}, //15242 #CJK UNIFIED IDEOGRAPH + {0xEAEB, 0x5E7D}, //15243 #CJK UNIFIED IDEOGRAPH + {0xEAEC, 0x5EBE}, //15244 #CJK UNIFIED IDEOGRAPH + {0xEAED, 0x60A0}, //15245 #CJK UNIFIED IDEOGRAPH + {0xEAEE, 0x60DF}, //15246 #CJK UNIFIED IDEOGRAPH + {0xEAEF, 0x6108}, //15247 #CJK UNIFIED IDEOGRAPH + {0xEAF0, 0x6109}, //15248 #CJK UNIFIED IDEOGRAPH + {0xEAF1, 0x63C4}, //15249 #CJK UNIFIED IDEOGRAPH + {0xEAF2, 0x6538}, //15250 #CJK UNIFIED IDEOGRAPH + {0xEAF3, 0x6709}, //15251 #CJK UNIFIED IDEOGRAPH + {0xEAF4, 0xF9C8}, //15252 #CJK COMPATIBILITY IDEOGRAPH + {0xEAF5, 0x67D4}, //15253 #CJK UNIFIED IDEOGRAPH + {0xEAF6, 0x67DA}, //15254 #CJK UNIFIED IDEOGRAPH + {0xEAF7, 0xF9C9}, //15255 #CJK COMPATIBILITY IDEOGRAPH + {0xEAF8, 0x6961}, //15256 #CJK UNIFIED IDEOGRAPH + {0xEAF9, 0x6962}, //15257 #CJK UNIFIED IDEOGRAPH + {0xEAFA, 0x6CB9}, //15258 #CJK UNIFIED IDEOGRAPH + {0xEAFB, 0x6D27}, //15259 #CJK UNIFIED IDEOGRAPH + {0xEAFC, 0xF9CA}, //15260 #CJK COMPATIBILITY IDEOGRAPH + {0xEAFD, 0x6E38}, //15261 #CJK UNIFIED IDEOGRAPH + {0xEAFE, 0xF9CB}, //15262 #CJK COMPATIBILITY IDEOGRAPH + {0xEBA1, 0x6FE1}, //15263 #CJK UNIFIED IDEOGRAPH + {0xEBA2, 0x7336}, //15264 #CJK UNIFIED IDEOGRAPH + {0xEBA3, 0x7337}, //15265 #CJK UNIFIED IDEOGRAPH + {0xEBA4, 0xF9CC}, //15266 #CJK COMPATIBILITY IDEOGRAPH + {0xEBA5, 0x745C}, //15267 #CJK UNIFIED IDEOGRAPH + {0xEBA6, 0x7531}, //15268 #CJK UNIFIED IDEOGRAPH + {0xEBA7, 0xF9CD}, //15269 #CJK COMPATIBILITY IDEOGRAPH + {0xEBA8, 0x7652}, //15270 #CJK UNIFIED IDEOGRAPH + {0xEBA9, 0xF9CE}, //15271 #CJK COMPATIBILITY IDEOGRAPH + {0xEBAA, 0xF9CF}, //15272 #CJK COMPATIBILITY IDEOGRAPH + {0xEBAB, 0x7DAD}, //15273 #CJK UNIFIED IDEOGRAPH + {0xEBAC, 0x81FE}, //15274 #CJK UNIFIED IDEOGRAPH + {0xEBAD, 0x8438}, //15275 #CJK UNIFIED IDEOGRAPH + {0xEBAE, 0x88D5}, //15276 #CJK UNIFIED IDEOGRAPH + {0xEBAF, 0x8A98}, //15277 #CJK UNIFIED IDEOGRAPH + {0xEBB0, 0x8ADB}, //15278 #CJK UNIFIED IDEOGRAPH + {0xEBB1, 0x8AED}, //15279 #CJK UNIFIED IDEOGRAPH + {0xEBB2, 0x8E30}, //15280 #CJK UNIFIED IDEOGRAPH + {0xEBB3, 0x8E42}, //15281 #CJK UNIFIED IDEOGRAPH + {0xEBB4, 0x904A}, //15282 #CJK UNIFIED IDEOGRAPH + {0xEBB5, 0x903E}, //15283 #CJK UNIFIED IDEOGRAPH + {0xEBB6, 0x907A}, //15284 #CJK UNIFIED IDEOGRAPH + {0xEBB7, 0x9149}, //15285 #CJK UNIFIED IDEOGRAPH + {0xEBB8, 0x91C9}, //15286 #CJK UNIFIED IDEOGRAPH + {0xEBB9, 0x936E}, //15287 #CJK UNIFIED IDEOGRAPH + {0xEBBA, 0xF9D0}, //15288 #CJK COMPATIBILITY IDEOGRAPH + {0xEBBB, 0xF9D1}, //15289 #CJK COMPATIBILITY IDEOGRAPH + {0xEBBC, 0x5809}, //15290 #CJK UNIFIED IDEOGRAPH + {0xEBBD, 0xF9D2}, //15291 #CJK COMPATIBILITY IDEOGRAPH + {0xEBBE, 0x6BD3}, //15292 #CJK UNIFIED IDEOGRAPH + {0xEBBF, 0x8089}, //15293 #CJK UNIFIED IDEOGRAPH + {0xEBC0, 0x80B2}, //15294 #CJK UNIFIED IDEOGRAPH + {0xEBC1, 0xF9D3}, //15295 #CJK COMPATIBILITY IDEOGRAPH + {0xEBC2, 0xF9D4}, //15296 #CJK COMPATIBILITY IDEOGRAPH + {0xEBC3, 0x5141}, //15297 #CJK UNIFIED IDEOGRAPH + {0xEBC4, 0x596B}, //15298 #CJK UNIFIED IDEOGRAPH + {0xEBC5, 0x5C39}, //15299 #CJK UNIFIED IDEOGRAPH + {0xEBC6, 0xF9D5}, //15300 #CJK COMPATIBILITY IDEOGRAPH + {0xEBC7, 0xF9D6}, //15301 #CJK COMPATIBILITY IDEOGRAPH + {0xEBC8, 0x6F64}, //15302 #CJK UNIFIED IDEOGRAPH + {0xEBC9, 0x73A7}, //15303 #CJK UNIFIED IDEOGRAPH + {0xEBCA, 0x80E4}, //15304 #CJK UNIFIED IDEOGRAPH + {0xEBCB, 0x8D07}, //15305 #CJK UNIFIED IDEOGRAPH + {0xEBCC, 0xF9D7}, //15306 #CJK COMPATIBILITY IDEOGRAPH + {0xEBCD, 0x9217}, //15307 #CJK UNIFIED IDEOGRAPH + {0xEBCE, 0x958F}, //15308 #CJK UNIFIED IDEOGRAPH + {0xEBCF, 0xF9D8}, //15309 #CJK COMPATIBILITY IDEOGRAPH + {0xEBD0, 0xF9D9}, //15310 #CJK COMPATIBILITY IDEOGRAPH + {0xEBD1, 0xF9DA}, //15311 #CJK COMPATIBILITY IDEOGRAPH + {0xEBD2, 0xF9DB}, //15312 #CJK COMPATIBILITY IDEOGRAPH + {0xEBD3, 0x807F}, //15313 #CJK UNIFIED IDEOGRAPH + {0xEBD4, 0x620E}, //15314 #CJK UNIFIED IDEOGRAPH + {0xEBD5, 0x701C}, //15315 #CJK UNIFIED IDEOGRAPH + {0xEBD6, 0x7D68}, //15316 #CJK UNIFIED IDEOGRAPH + {0xEBD7, 0x878D}, //15317 #CJK UNIFIED IDEOGRAPH + {0xEBD8, 0xF9DC}, //15318 #CJK COMPATIBILITY IDEOGRAPH + {0xEBD9, 0x57A0}, //15319 #CJK UNIFIED IDEOGRAPH + {0xEBDA, 0x6069}, //15320 #CJK UNIFIED IDEOGRAPH + {0xEBDB, 0x6147}, //15321 #CJK UNIFIED IDEOGRAPH + {0xEBDC, 0x6BB7}, //15322 #CJK UNIFIED IDEOGRAPH + {0xEBDD, 0x8ABE}, //15323 #CJK UNIFIED IDEOGRAPH + {0xEBDE, 0x9280}, //15324 #CJK UNIFIED IDEOGRAPH + {0xEBDF, 0x96B1}, //15325 #CJK UNIFIED IDEOGRAPH + {0xEBE0, 0x4E59}, //15326 #CJK UNIFIED IDEOGRAPH + {0xEBE1, 0x541F}, //15327 #CJK UNIFIED IDEOGRAPH + {0xEBE2, 0x6DEB}, //15328 #CJK UNIFIED IDEOGRAPH + {0xEBE3, 0x852D}, //15329 #CJK UNIFIED IDEOGRAPH + {0xEBE4, 0x9670}, //15330 #CJK UNIFIED IDEOGRAPH + {0xEBE5, 0x97F3}, //15331 #CJK UNIFIED IDEOGRAPH + {0xEBE6, 0x98EE}, //15332 #CJK UNIFIED IDEOGRAPH + {0xEBE7, 0x63D6}, //15333 #CJK UNIFIED IDEOGRAPH + {0xEBE8, 0x6CE3}, //15334 #CJK UNIFIED IDEOGRAPH + {0xEBE9, 0x9091}, //15335 #CJK UNIFIED IDEOGRAPH + {0xEBEA, 0x51DD}, //15336 #CJK UNIFIED IDEOGRAPH + {0xEBEB, 0x61C9}, //15337 #CJK UNIFIED IDEOGRAPH + {0xEBEC, 0x81BA}, //15338 #CJK UNIFIED IDEOGRAPH + {0xEBED, 0x9DF9}, //15339 #CJK UNIFIED IDEOGRAPH + {0xEBEE, 0x4F9D}, //15340 #CJK UNIFIED IDEOGRAPH + {0xEBEF, 0x501A}, //15341 #CJK UNIFIED IDEOGRAPH + {0xEBF0, 0x5100}, //15342 #CJK UNIFIED IDEOGRAPH + {0xEBF1, 0x5B9C}, //15343 #CJK UNIFIED IDEOGRAPH + {0xEBF2, 0x610F}, //15344 #CJK UNIFIED IDEOGRAPH + {0xEBF3, 0x61FF}, //15345 #CJK UNIFIED IDEOGRAPH + {0xEBF4, 0x64EC}, //15346 #CJK UNIFIED IDEOGRAPH + {0xEBF5, 0x6905}, //15347 #CJK UNIFIED IDEOGRAPH + {0xEBF6, 0x6BC5}, //15348 #CJK UNIFIED IDEOGRAPH + {0xEBF7, 0x7591}, //15349 #CJK UNIFIED IDEOGRAPH + {0xEBF8, 0x77E3}, //15350 #CJK UNIFIED IDEOGRAPH + {0xEBF9, 0x7FA9}, //15351 #CJK UNIFIED IDEOGRAPH + {0xEBFA, 0x8264}, //15352 #CJK UNIFIED IDEOGRAPH + {0xEBFB, 0x858F}, //15353 #CJK UNIFIED IDEOGRAPH + {0xEBFC, 0x87FB}, //15354 #CJK UNIFIED IDEOGRAPH + {0xEBFD, 0x8863}, //15355 #CJK UNIFIED IDEOGRAPH + {0xEBFE, 0x8ABC}, //15356 #CJK UNIFIED IDEOGRAPH + {0xECA1, 0x8B70}, //15357 #CJK UNIFIED IDEOGRAPH + {0xECA2, 0x91AB}, //15358 #CJK UNIFIED IDEOGRAPH + {0xECA3, 0x4E8C}, //15359 #CJK UNIFIED IDEOGRAPH + {0xECA4, 0x4EE5}, //15360 #CJK UNIFIED IDEOGRAPH + {0xECA5, 0x4F0A}, //15361 #CJK UNIFIED IDEOGRAPH + {0xECA6, 0xF9DD}, //15362 #CJK COMPATIBILITY IDEOGRAPH + {0xECA7, 0xF9DE}, //15363 #CJK COMPATIBILITY IDEOGRAPH + {0xECA8, 0x5937}, //15364 #CJK UNIFIED IDEOGRAPH + {0xECA9, 0x59E8}, //15365 #CJK UNIFIED IDEOGRAPH + {0xECAA, 0xF9DF}, //15366 #CJK COMPATIBILITY IDEOGRAPH + {0xECAB, 0x5DF2}, //15367 #CJK UNIFIED IDEOGRAPH + {0xECAC, 0x5F1B}, //15368 #CJK UNIFIED IDEOGRAPH + {0xECAD, 0x5F5B}, //15369 #CJK UNIFIED IDEOGRAPH + {0xECAE, 0x6021}, //15370 #CJK UNIFIED IDEOGRAPH + {0xECAF, 0xF9E0}, //15371 #CJK COMPATIBILITY IDEOGRAPH + {0xECB0, 0xF9E1}, //15372 #CJK COMPATIBILITY IDEOGRAPH + {0xECB1, 0xF9E2}, //15373 #CJK COMPATIBILITY IDEOGRAPH + {0xECB2, 0xF9E3}, //15374 #CJK COMPATIBILITY IDEOGRAPH + {0xECB3, 0x723E}, //15375 #CJK UNIFIED IDEOGRAPH + {0xECB4, 0x73E5}, //15376 #CJK UNIFIED IDEOGRAPH + {0xECB5, 0xF9E4}, //15377 #CJK COMPATIBILITY IDEOGRAPH + {0xECB6, 0x7570}, //15378 #CJK UNIFIED IDEOGRAPH + {0xECB7, 0x75CD}, //15379 #CJK UNIFIED IDEOGRAPH + {0xECB8, 0xF9E5}, //15380 #CJK COMPATIBILITY IDEOGRAPH + {0xECB9, 0x79FB}, //15381 #CJK UNIFIED IDEOGRAPH + {0xECBA, 0xF9E6}, //15382 #CJK COMPATIBILITY IDEOGRAPH + {0xECBB, 0x800C}, //15383 #CJK UNIFIED IDEOGRAPH + {0xECBC, 0x8033}, //15384 #CJK UNIFIED IDEOGRAPH + {0xECBD, 0x8084}, //15385 #CJK UNIFIED IDEOGRAPH + {0xECBE, 0x82E1}, //15386 #CJK UNIFIED IDEOGRAPH + {0xECBF, 0x8351}, //15387 #CJK UNIFIED IDEOGRAPH + {0xECC0, 0xF9E7}, //15388 #CJK COMPATIBILITY IDEOGRAPH + {0xECC1, 0xF9E8}, //15389 #CJK COMPATIBILITY IDEOGRAPH + {0xECC2, 0x8CBD}, //15390 #CJK UNIFIED IDEOGRAPH + {0xECC3, 0x8CB3}, //15391 #CJK UNIFIED IDEOGRAPH + {0xECC4, 0x9087}, //15392 #CJK UNIFIED IDEOGRAPH + {0xECC5, 0xF9E9}, //15393 #CJK COMPATIBILITY IDEOGRAPH + {0xECC6, 0xF9EA}, //15394 #CJK COMPATIBILITY IDEOGRAPH + {0xECC7, 0x98F4}, //15395 #CJK UNIFIED IDEOGRAPH + {0xECC8, 0x990C}, //15396 #CJK UNIFIED IDEOGRAPH + {0xECC9, 0xF9EB}, //15397 #CJK COMPATIBILITY IDEOGRAPH + {0xECCA, 0xF9EC}, //15398 #CJK COMPATIBILITY IDEOGRAPH + {0xECCB, 0x7037}, //15399 #CJK UNIFIED IDEOGRAPH + {0xECCC, 0x76CA}, //15400 #CJK UNIFIED IDEOGRAPH + {0xECCD, 0x7FCA}, //15401 #CJK UNIFIED IDEOGRAPH + {0xECCE, 0x7FCC}, //15402 #CJK UNIFIED IDEOGRAPH + {0xECCF, 0x7FFC}, //15403 #CJK UNIFIED IDEOGRAPH + {0xECD0, 0x8B1A}, //15404 #CJK UNIFIED IDEOGRAPH + {0xECD1, 0x4EBA}, //15405 #CJK UNIFIED IDEOGRAPH + {0xECD2, 0x4EC1}, //15406 #CJK UNIFIED IDEOGRAPH + {0xECD3, 0x5203}, //15407 #CJK UNIFIED IDEOGRAPH + {0xECD4, 0x5370}, //15408 #CJK UNIFIED IDEOGRAPH + {0xECD5, 0xF9ED}, //15409 #CJK COMPATIBILITY IDEOGRAPH + {0xECD6, 0x54BD}, //15410 #CJK UNIFIED IDEOGRAPH + {0xECD7, 0x56E0}, //15411 #CJK UNIFIED IDEOGRAPH + {0xECD8, 0x59FB}, //15412 #CJK UNIFIED IDEOGRAPH + {0xECD9, 0x5BC5}, //15413 #CJK UNIFIED IDEOGRAPH + {0xECDA, 0x5F15}, //15414 #CJK UNIFIED IDEOGRAPH + {0xECDB, 0x5FCD}, //15415 #CJK UNIFIED IDEOGRAPH + {0xECDC, 0x6E6E}, //15416 #CJK UNIFIED IDEOGRAPH + {0xECDD, 0xF9EE}, //15417 #CJK COMPATIBILITY IDEOGRAPH + {0xECDE, 0xF9EF}, //15418 #CJK COMPATIBILITY IDEOGRAPH + {0xECDF, 0x7D6A}, //15419 #CJK UNIFIED IDEOGRAPH + {0xECE0, 0x8335}, //15420 #CJK UNIFIED IDEOGRAPH + {0xECE1, 0xF9F0}, //15421 #CJK COMPATIBILITY IDEOGRAPH + {0xECE2, 0x8693}, //15422 #CJK UNIFIED IDEOGRAPH + {0xECE3, 0x8A8D}, //15423 #CJK UNIFIED IDEOGRAPH + {0xECE4, 0xF9F1}, //15424 #CJK COMPATIBILITY IDEOGRAPH + {0xECE5, 0x976D}, //15425 #CJK UNIFIED IDEOGRAPH + {0xECE6, 0x9777}, //15426 #CJK UNIFIED IDEOGRAPH + {0xECE7, 0xF9F2}, //15427 #CJK COMPATIBILITY IDEOGRAPH + {0xECE8, 0xF9F3}, //15428 #CJK COMPATIBILITY IDEOGRAPH + {0xECE9, 0x4E00}, //15429 #CJK UNIFIED IDEOGRAPH + {0xECEA, 0x4F5A}, //15430 #CJK UNIFIED IDEOGRAPH + {0xECEB, 0x4F7E}, //15431 #CJK UNIFIED IDEOGRAPH + {0xECEC, 0x58F9}, //15432 #CJK UNIFIED IDEOGRAPH + {0xECED, 0x65E5}, //15433 #CJK UNIFIED IDEOGRAPH + {0xECEE, 0x6EA2}, //15434 #CJK UNIFIED IDEOGRAPH + {0xECEF, 0x9038}, //15435 #CJK UNIFIED IDEOGRAPH + {0xECF0, 0x93B0}, //15436 #CJK UNIFIED IDEOGRAPH + {0xECF1, 0x99B9}, //15437 #CJK UNIFIED IDEOGRAPH + {0xECF2, 0x4EFB}, //15438 #CJK UNIFIED IDEOGRAPH + {0xECF3, 0x58EC}, //15439 #CJK UNIFIED IDEOGRAPH + {0xECF4, 0x598A}, //15440 #CJK UNIFIED IDEOGRAPH + {0xECF5, 0x59D9}, //15441 #CJK UNIFIED IDEOGRAPH + {0xECF6, 0x6041}, //15442 #CJK UNIFIED IDEOGRAPH + {0xECF7, 0xF9F4}, //15443 #CJK COMPATIBILITY IDEOGRAPH + {0xECF8, 0xF9F5}, //15444 #CJK COMPATIBILITY IDEOGRAPH + {0xECF9, 0x7A14}, //15445 #CJK UNIFIED IDEOGRAPH + {0xECFA, 0xF9F6}, //15446 #CJK COMPATIBILITY IDEOGRAPH + {0xECFB, 0x834F}, //15447 #CJK UNIFIED IDEOGRAPH + {0xECFC, 0x8CC3}, //15448 #CJK UNIFIED IDEOGRAPH + {0xECFD, 0x5165}, //15449 #CJK UNIFIED IDEOGRAPH + {0xECFE, 0x5344}, //15450 #CJK UNIFIED IDEOGRAPH + {0xEDA1, 0xF9F7}, //15451 #CJK COMPATIBILITY IDEOGRAPH + {0xEDA2, 0xF9F8}, //15452 #CJK COMPATIBILITY IDEOGRAPH + {0xEDA3, 0xF9F9}, //15453 #CJK COMPATIBILITY IDEOGRAPH + {0xEDA4, 0x4ECD}, //15454 #CJK UNIFIED IDEOGRAPH + {0xEDA5, 0x5269}, //15455 #CJK UNIFIED IDEOGRAPH + {0xEDA6, 0x5B55}, //15456 #CJK UNIFIED IDEOGRAPH + {0xEDA7, 0x82BF}, //15457 #CJK UNIFIED IDEOGRAPH + {0xEDA8, 0x4ED4}, //15458 #CJK UNIFIED IDEOGRAPH + {0xEDA9, 0x523A}, //15459 #CJK UNIFIED IDEOGRAPH + {0xEDAA, 0x54A8}, //15460 #CJK UNIFIED IDEOGRAPH + {0xEDAB, 0x59C9}, //15461 #CJK UNIFIED IDEOGRAPH + {0xEDAC, 0x59FF}, //15462 #CJK UNIFIED IDEOGRAPH + {0xEDAD, 0x5B50}, //15463 #CJK UNIFIED IDEOGRAPH + {0xEDAE, 0x5B57}, //15464 #CJK UNIFIED IDEOGRAPH + {0xEDAF, 0x5B5C}, //15465 #CJK UNIFIED IDEOGRAPH + {0xEDB0, 0x6063}, //15466 #CJK UNIFIED IDEOGRAPH + {0xEDB1, 0x6148}, //15467 #CJK UNIFIED IDEOGRAPH + {0xEDB2, 0x6ECB}, //15468 #CJK UNIFIED IDEOGRAPH + {0xEDB3, 0x7099}, //15469 #CJK UNIFIED IDEOGRAPH + {0xEDB4, 0x716E}, //15470 #CJK UNIFIED IDEOGRAPH + {0xEDB5, 0x7386}, //15471 #CJK UNIFIED IDEOGRAPH + {0xEDB6, 0x74F7}, //15472 #CJK UNIFIED IDEOGRAPH + {0xEDB7, 0x75B5}, //15473 #CJK UNIFIED IDEOGRAPH + {0xEDB8, 0x78C1}, //15474 #CJK UNIFIED IDEOGRAPH + {0xEDB9, 0x7D2B}, //15475 #CJK UNIFIED IDEOGRAPH + {0xEDBA, 0x8005}, //15476 #CJK UNIFIED IDEOGRAPH + {0xEDBB, 0x81EA}, //15477 #CJK UNIFIED IDEOGRAPH + {0xEDBC, 0x8328}, //15478 #CJK UNIFIED IDEOGRAPH + {0xEDBD, 0x8517}, //15479 #CJK UNIFIED IDEOGRAPH + {0xEDBE, 0x85C9}, //15480 #CJK UNIFIED IDEOGRAPH + {0xEDBF, 0x8AEE}, //15481 #CJK UNIFIED IDEOGRAPH + {0xEDC0, 0x8CC7}, //15482 #CJK UNIFIED IDEOGRAPH + {0xEDC1, 0x96CC}, //15483 #CJK UNIFIED IDEOGRAPH + {0xEDC2, 0x4F5C}, //15484 #CJK UNIFIED IDEOGRAPH + {0xEDC3, 0x52FA}, //15485 #CJK UNIFIED IDEOGRAPH + {0xEDC4, 0x56BC}, //15486 #CJK UNIFIED IDEOGRAPH + {0xEDC5, 0x65AB}, //15487 #CJK UNIFIED IDEOGRAPH + {0xEDC6, 0x6628}, //15488 #CJK UNIFIED IDEOGRAPH + {0xEDC7, 0x707C}, //15489 #CJK UNIFIED IDEOGRAPH + {0xEDC8, 0x70B8}, //15490 #CJK UNIFIED IDEOGRAPH + {0xEDC9, 0x7235}, //15491 #CJK UNIFIED IDEOGRAPH + {0xEDCA, 0x7DBD}, //15492 #CJK UNIFIED IDEOGRAPH + {0xEDCB, 0x828D}, //15493 #CJK UNIFIED IDEOGRAPH + {0xEDCC, 0x914C}, //15494 #CJK UNIFIED IDEOGRAPH + {0xEDCD, 0x96C0}, //15495 #CJK UNIFIED IDEOGRAPH + {0xEDCE, 0x9D72}, //15496 #CJK UNIFIED IDEOGRAPH + {0xEDCF, 0x5B71}, //15497 #CJK UNIFIED IDEOGRAPH + {0xEDD0, 0x68E7}, //15498 #CJK UNIFIED IDEOGRAPH + {0xEDD1, 0x6B98}, //15499 #CJK UNIFIED IDEOGRAPH + {0xEDD2, 0x6F7A}, //15500 #CJK UNIFIED IDEOGRAPH + {0xEDD3, 0x76DE}, //15501 #CJK UNIFIED IDEOGRAPH + {0xEDD4, 0x5C91}, //15502 #CJK UNIFIED IDEOGRAPH + {0xEDD5, 0x66AB}, //15503 #CJK UNIFIED IDEOGRAPH + {0xEDD6, 0x6F5B}, //15504 #CJK UNIFIED IDEOGRAPH + {0xEDD7, 0x7BB4}, //15505 #CJK UNIFIED IDEOGRAPH + {0xEDD8, 0x7C2A}, //15506 #CJK UNIFIED IDEOGRAPH + {0xEDD9, 0x8836}, //15507 #CJK UNIFIED IDEOGRAPH + {0xEDDA, 0x96DC}, //15508 #CJK UNIFIED IDEOGRAPH + {0xEDDB, 0x4E08}, //15509 #CJK UNIFIED IDEOGRAPH + {0xEDDC, 0x4ED7}, //15510 #CJK UNIFIED IDEOGRAPH + {0xEDDD, 0x5320}, //15511 #CJK UNIFIED IDEOGRAPH + {0xEDDE, 0x5834}, //15512 #CJK UNIFIED IDEOGRAPH + {0xEDDF, 0x58BB}, //15513 #CJK UNIFIED IDEOGRAPH + {0xEDE0, 0x58EF}, //15514 #CJK UNIFIED IDEOGRAPH + {0xEDE1, 0x596C}, //15515 #CJK UNIFIED IDEOGRAPH + {0xEDE2, 0x5C07}, //15516 #CJK UNIFIED IDEOGRAPH + {0xEDE3, 0x5E33}, //15517 #CJK UNIFIED IDEOGRAPH + {0xEDE4, 0x5E84}, //15518 #CJK UNIFIED IDEOGRAPH + {0xEDE5, 0x5F35}, //15519 #CJK UNIFIED IDEOGRAPH + {0xEDE6, 0x638C}, //15520 #CJK UNIFIED IDEOGRAPH + {0xEDE7, 0x66B2}, //15521 #CJK UNIFIED IDEOGRAPH + {0xEDE8, 0x6756}, //15522 #CJK UNIFIED IDEOGRAPH + {0xEDE9, 0x6A1F}, //15523 #CJK UNIFIED IDEOGRAPH + {0xEDEA, 0x6AA3}, //15524 #CJK UNIFIED IDEOGRAPH + {0xEDEB, 0x6B0C}, //15525 #CJK UNIFIED IDEOGRAPH + {0xEDEC, 0x6F3F}, //15526 #CJK UNIFIED IDEOGRAPH + {0xEDED, 0x7246}, //15527 #CJK UNIFIED IDEOGRAPH + {0xEDEE, 0xF9FA}, //15528 #CJK COMPATIBILITY IDEOGRAPH + {0xEDEF, 0x7350}, //15529 #CJK UNIFIED IDEOGRAPH + {0xEDF0, 0x748B}, //15530 #CJK UNIFIED IDEOGRAPH + {0xEDF1, 0x7AE0}, //15531 #CJK UNIFIED IDEOGRAPH + {0xEDF2, 0x7CA7}, //15532 #CJK UNIFIED IDEOGRAPH + {0xEDF3, 0x8178}, //15533 #CJK UNIFIED IDEOGRAPH + {0xEDF4, 0x81DF}, //15534 #CJK UNIFIED IDEOGRAPH + {0xEDF5, 0x81E7}, //15535 #CJK UNIFIED IDEOGRAPH + {0xEDF6, 0x838A}, //15536 #CJK UNIFIED IDEOGRAPH + {0xEDF7, 0x846C}, //15537 #CJK UNIFIED IDEOGRAPH + {0xEDF8, 0x8523}, //15538 #CJK UNIFIED IDEOGRAPH + {0xEDF9, 0x8594}, //15539 #CJK UNIFIED IDEOGRAPH + {0xEDFA, 0x85CF}, //15540 #CJK UNIFIED IDEOGRAPH + {0xEDFB, 0x88DD}, //15541 #CJK UNIFIED IDEOGRAPH + {0xEDFC, 0x8D13}, //15542 #CJK UNIFIED IDEOGRAPH + {0xEDFD, 0x91AC}, //15543 #CJK UNIFIED IDEOGRAPH + {0xEDFE, 0x9577}, //15544 #CJK UNIFIED IDEOGRAPH + {0xEEA1, 0x969C}, //15545 #CJK UNIFIED IDEOGRAPH + {0xEEA2, 0x518D}, //15546 #CJK UNIFIED IDEOGRAPH + {0xEEA3, 0x54C9}, //15547 #CJK UNIFIED IDEOGRAPH + {0xEEA4, 0x5728}, //15548 #CJK UNIFIED IDEOGRAPH + {0xEEA5, 0x5BB0}, //15549 #CJK UNIFIED IDEOGRAPH + {0xEEA6, 0x624D}, //15550 #CJK UNIFIED IDEOGRAPH + {0xEEA7, 0x6750}, //15551 #CJK UNIFIED IDEOGRAPH + {0xEEA8, 0x683D}, //15552 #CJK UNIFIED IDEOGRAPH + {0xEEA9, 0x6893}, //15553 #CJK UNIFIED IDEOGRAPH + {0xEEAA, 0x6E3D}, //15554 #CJK UNIFIED IDEOGRAPH + {0xEEAB, 0x6ED3}, //15555 #CJK UNIFIED IDEOGRAPH + {0xEEAC, 0x707D}, //15556 #CJK UNIFIED IDEOGRAPH + {0xEEAD, 0x7E21}, //15557 #CJK UNIFIED IDEOGRAPH + {0xEEAE, 0x88C1}, //15558 #CJK UNIFIED IDEOGRAPH + {0xEEAF, 0x8CA1}, //15559 #CJK UNIFIED IDEOGRAPH + {0xEEB0, 0x8F09}, //15560 #CJK UNIFIED IDEOGRAPH + {0xEEB1, 0x9F4B}, //15561 #CJK UNIFIED IDEOGRAPH + {0xEEB2, 0x9F4E}, //15562 #CJK UNIFIED IDEOGRAPH + {0xEEB3, 0x722D}, //15563 #CJK UNIFIED IDEOGRAPH + {0xEEB4, 0x7B8F}, //15564 #CJK UNIFIED IDEOGRAPH + {0xEEB5, 0x8ACD}, //15565 #CJK UNIFIED IDEOGRAPH + {0xEEB6, 0x931A}, //15566 #CJK UNIFIED IDEOGRAPH + {0xEEB7, 0x4F47}, //15567 #CJK UNIFIED IDEOGRAPH + {0xEEB8, 0x4F4E}, //15568 #CJK UNIFIED IDEOGRAPH + {0xEEB9, 0x5132}, //15569 #CJK UNIFIED IDEOGRAPH + {0xEEBA, 0x5480}, //15570 #CJK UNIFIED IDEOGRAPH + {0xEEBB, 0x59D0}, //15571 #CJK UNIFIED IDEOGRAPH + {0xEEBC, 0x5E95}, //15572 #CJK UNIFIED IDEOGRAPH + {0xEEBD, 0x62B5}, //15573 #CJK UNIFIED IDEOGRAPH + {0xEEBE, 0x6775}, //15574 #CJK UNIFIED IDEOGRAPH + {0xEEBF, 0x696E}, //15575 #CJK UNIFIED IDEOGRAPH + {0xEEC0, 0x6A17}, //15576 #CJK UNIFIED IDEOGRAPH + {0xEEC1, 0x6CAE}, //15577 #CJK UNIFIED IDEOGRAPH + {0xEEC2, 0x6E1A}, //15578 #CJK UNIFIED IDEOGRAPH + {0xEEC3, 0x72D9}, //15579 #CJK UNIFIED IDEOGRAPH + {0xEEC4, 0x732A}, //15580 #CJK UNIFIED IDEOGRAPH + {0xEEC5, 0x75BD}, //15581 #CJK UNIFIED IDEOGRAPH + {0xEEC6, 0x7BB8}, //15582 #CJK UNIFIED IDEOGRAPH + {0xEEC7, 0x7D35}, //15583 #CJK UNIFIED IDEOGRAPH + {0xEEC8, 0x82E7}, //15584 #CJK UNIFIED IDEOGRAPH + {0xEEC9, 0x83F9}, //15585 #CJK UNIFIED IDEOGRAPH + {0xEECA, 0x8457}, //15586 #CJK UNIFIED IDEOGRAPH + {0xEECB, 0x85F7}, //15587 #CJK UNIFIED IDEOGRAPH + {0xEECC, 0x8A5B}, //15588 #CJK UNIFIED IDEOGRAPH + {0xEECD, 0x8CAF}, //15589 #CJK UNIFIED IDEOGRAPH + {0xEECE, 0x8E87}, //15590 #CJK UNIFIED IDEOGRAPH + {0xEECF, 0x9019}, //15591 #CJK UNIFIED IDEOGRAPH + {0xEED0, 0x90B8}, //15592 #CJK UNIFIED IDEOGRAPH + {0xEED1, 0x96CE}, //15593 #CJK UNIFIED IDEOGRAPH + {0xEED2, 0x9F5F}, //15594 #CJK UNIFIED IDEOGRAPH + {0xEED3, 0x52E3}, //15595 #CJK UNIFIED IDEOGRAPH + {0xEED4, 0x540A}, //15596 #CJK UNIFIED IDEOGRAPH + {0xEED5, 0x5AE1}, //15597 #CJK UNIFIED IDEOGRAPH + {0xEED6, 0x5BC2}, //15598 #CJK UNIFIED IDEOGRAPH + {0xEED7, 0x6458}, //15599 #CJK UNIFIED IDEOGRAPH + {0xEED8, 0x6575}, //15600 #CJK UNIFIED IDEOGRAPH + {0xEED9, 0x6EF4}, //15601 #CJK UNIFIED IDEOGRAPH + {0xEEDA, 0x72C4}, //15602 #CJK UNIFIED IDEOGRAPH + {0xEEDB, 0xF9FB}, //15603 #CJK COMPATIBILITY IDEOGRAPH + {0xEEDC, 0x7684}, //15604 #CJK UNIFIED IDEOGRAPH + {0xEEDD, 0x7A4D}, //15605 #CJK UNIFIED IDEOGRAPH + {0xEEDE, 0x7B1B}, //15606 #CJK UNIFIED IDEOGRAPH + {0xEEDF, 0x7C4D}, //15607 #CJK UNIFIED IDEOGRAPH + {0xEEE0, 0x7E3E}, //15608 #CJK UNIFIED IDEOGRAPH + {0xEEE1, 0x7FDF}, //15609 #CJK UNIFIED IDEOGRAPH + {0xEEE2, 0x837B}, //15610 #CJK UNIFIED IDEOGRAPH + {0xEEE3, 0x8B2B}, //15611 #CJK UNIFIED IDEOGRAPH + {0xEEE4, 0x8CCA}, //15612 #CJK UNIFIED IDEOGRAPH + {0xEEE5, 0x8D64}, //15613 #CJK UNIFIED IDEOGRAPH + {0xEEE6, 0x8DE1}, //15614 #CJK UNIFIED IDEOGRAPH + {0xEEE7, 0x8E5F}, //15615 #CJK UNIFIED IDEOGRAPH + {0xEEE8, 0x8FEA}, //15616 #CJK UNIFIED IDEOGRAPH + {0xEEE9, 0x8FF9}, //15617 #CJK UNIFIED IDEOGRAPH + {0xEEEA, 0x9069}, //15618 #CJK UNIFIED IDEOGRAPH + {0xEEEB, 0x93D1}, //15619 #CJK UNIFIED IDEOGRAPH + {0xEEEC, 0x4F43}, //15620 #CJK UNIFIED IDEOGRAPH + {0xEEED, 0x4F7A}, //15621 #CJK UNIFIED IDEOGRAPH + {0xEEEE, 0x50B3}, //15622 #CJK UNIFIED IDEOGRAPH + {0xEEEF, 0x5168}, //15623 #CJK UNIFIED IDEOGRAPH + {0xEEF0, 0x5178}, //15624 #CJK UNIFIED IDEOGRAPH + {0xEEF1, 0x524D}, //15625 #CJK UNIFIED IDEOGRAPH + {0xEEF2, 0x526A}, //15626 #CJK UNIFIED IDEOGRAPH + {0xEEF3, 0x5861}, //15627 #CJK UNIFIED IDEOGRAPH + {0xEEF4, 0x587C}, //15628 #CJK UNIFIED IDEOGRAPH + {0xEEF5, 0x5960}, //15629 #CJK UNIFIED IDEOGRAPH + {0xEEF6, 0x5C08}, //15630 #CJK UNIFIED IDEOGRAPH + {0xEEF7, 0x5C55}, //15631 #CJK UNIFIED IDEOGRAPH + {0xEEF8, 0x5EDB}, //15632 #CJK UNIFIED IDEOGRAPH + {0xEEF9, 0x609B}, //15633 #CJK UNIFIED IDEOGRAPH + {0xEEFA, 0x6230}, //15634 #CJK UNIFIED IDEOGRAPH + {0xEEFB, 0x6813}, //15635 #CJK UNIFIED IDEOGRAPH + {0xEEFC, 0x6BBF}, //15636 #CJK UNIFIED IDEOGRAPH + {0xEEFD, 0x6C08}, //15637 #CJK UNIFIED IDEOGRAPH + {0xEEFE, 0x6FB1}, //15638 #CJK UNIFIED IDEOGRAPH + {0xEFA1, 0x714E}, //15639 #CJK UNIFIED IDEOGRAPH + {0xEFA2, 0x7420}, //15640 #CJK UNIFIED IDEOGRAPH + {0xEFA3, 0x7530}, //15641 #CJK UNIFIED IDEOGRAPH + {0xEFA4, 0x7538}, //15642 #CJK UNIFIED IDEOGRAPH + {0xEFA5, 0x7551}, //15643 #CJK UNIFIED IDEOGRAPH + {0xEFA6, 0x7672}, //15644 #CJK UNIFIED IDEOGRAPH + {0xEFA7, 0x7B4C}, //15645 #CJK UNIFIED IDEOGRAPH + {0xEFA8, 0x7B8B}, //15646 #CJK UNIFIED IDEOGRAPH + {0xEFA9, 0x7BAD}, //15647 #CJK UNIFIED IDEOGRAPH + {0xEFAA, 0x7BC6}, //15648 #CJK UNIFIED IDEOGRAPH + {0xEFAB, 0x7E8F}, //15649 #CJK UNIFIED IDEOGRAPH + {0xEFAC, 0x8A6E}, //15650 #CJK UNIFIED IDEOGRAPH + {0xEFAD, 0x8F3E}, //15651 #CJK UNIFIED IDEOGRAPH + {0xEFAE, 0x8F49}, //15652 #CJK UNIFIED IDEOGRAPH + {0xEFAF, 0x923F}, //15653 #CJK UNIFIED IDEOGRAPH + {0xEFB0, 0x9293}, //15654 #CJK UNIFIED IDEOGRAPH + {0xEFB1, 0x9322}, //15655 #CJK UNIFIED IDEOGRAPH + {0xEFB2, 0x942B}, //15656 #CJK UNIFIED IDEOGRAPH + {0xEFB3, 0x96FB}, //15657 #CJK UNIFIED IDEOGRAPH + {0xEFB4, 0x985A}, //15658 #CJK UNIFIED IDEOGRAPH + {0xEFB5, 0x986B}, //15659 #CJK UNIFIED IDEOGRAPH + {0xEFB6, 0x991E}, //15660 #CJK UNIFIED IDEOGRAPH + {0xEFB7, 0x5207}, //15661 #CJK UNIFIED IDEOGRAPH + {0xEFB8, 0x622A}, //15662 #CJK UNIFIED IDEOGRAPH + {0xEFB9, 0x6298}, //15663 #CJK UNIFIED IDEOGRAPH + {0xEFBA, 0x6D59}, //15664 #CJK UNIFIED IDEOGRAPH + {0xEFBB, 0x7664}, //15665 #CJK UNIFIED IDEOGRAPH + {0xEFBC, 0x7ACA}, //15666 #CJK UNIFIED IDEOGRAPH + {0xEFBD, 0x7BC0}, //15667 #CJK UNIFIED IDEOGRAPH + {0xEFBE, 0x7D76}, //15668 #CJK UNIFIED IDEOGRAPH + {0xEFBF, 0x5360}, //15669 #CJK UNIFIED IDEOGRAPH + {0xEFC0, 0x5CBE}, //15670 #CJK UNIFIED IDEOGRAPH + {0xEFC1, 0x5E97}, //15671 #CJK UNIFIED IDEOGRAPH + {0xEFC2, 0x6F38}, //15672 #CJK UNIFIED IDEOGRAPH + {0xEFC3, 0x70B9}, //15673 #CJK UNIFIED IDEOGRAPH + {0xEFC4, 0x7C98}, //15674 #CJK UNIFIED IDEOGRAPH + {0xEFC5, 0x9711}, //15675 #CJK UNIFIED IDEOGRAPH + {0xEFC6, 0x9B8E}, //15676 #CJK UNIFIED IDEOGRAPH + {0xEFC7, 0x9EDE}, //15677 #CJK UNIFIED IDEOGRAPH + {0xEFC8, 0x63A5}, //15678 #CJK UNIFIED IDEOGRAPH + {0xEFC9, 0x647A}, //15679 #CJK UNIFIED IDEOGRAPH + {0xEFCA, 0x8776}, //15680 #CJK UNIFIED IDEOGRAPH + {0xEFCB, 0x4E01}, //15681 #CJK UNIFIED IDEOGRAPH + {0xEFCC, 0x4E95}, //15682 #CJK UNIFIED IDEOGRAPH + {0xEFCD, 0x4EAD}, //15683 #CJK UNIFIED IDEOGRAPH + {0xEFCE, 0x505C}, //15684 #CJK UNIFIED IDEOGRAPH + {0xEFCF, 0x5075}, //15685 #CJK UNIFIED IDEOGRAPH + {0xEFD0, 0x5448}, //15686 #CJK UNIFIED IDEOGRAPH + {0xEFD1, 0x59C3}, //15687 #CJK UNIFIED IDEOGRAPH + {0xEFD2, 0x5B9A}, //15688 #CJK UNIFIED IDEOGRAPH + {0xEFD3, 0x5E40}, //15689 #CJK UNIFIED IDEOGRAPH + {0xEFD4, 0x5EAD}, //15690 #CJK UNIFIED IDEOGRAPH + {0xEFD5, 0x5EF7}, //15691 #CJK UNIFIED IDEOGRAPH + {0xEFD6, 0x5F81}, //15692 #CJK UNIFIED IDEOGRAPH + {0xEFD7, 0x60C5}, //15693 #CJK UNIFIED IDEOGRAPH + {0xEFD8, 0x633A}, //15694 #CJK UNIFIED IDEOGRAPH + {0xEFD9, 0x653F}, //15695 #CJK UNIFIED IDEOGRAPH + {0xEFDA, 0x6574}, //15696 #CJK UNIFIED IDEOGRAPH + {0xEFDB, 0x65CC}, //15697 #CJK UNIFIED IDEOGRAPH + {0xEFDC, 0x6676}, //15698 #CJK UNIFIED IDEOGRAPH + {0xEFDD, 0x6678}, //15699 #CJK UNIFIED IDEOGRAPH + {0xEFDE, 0x67FE}, //15700 #CJK UNIFIED IDEOGRAPH + {0xEFDF, 0x6968}, //15701 #CJK UNIFIED IDEOGRAPH + {0xEFE0, 0x6A89}, //15702 #CJK UNIFIED IDEOGRAPH + {0xEFE1, 0x6B63}, //15703 #CJK UNIFIED IDEOGRAPH + {0xEFE2, 0x6C40}, //15704 #CJK UNIFIED IDEOGRAPH + {0xEFE3, 0x6DC0}, //15705 #CJK UNIFIED IDEOGRAPH + {0xEFE4, 0x6DE8}, //15706 #CJK UNIFIED IDEOGRAPH + {0xEFE5, 0x6E1F}, //15707 #CJK UNIFIED IDEOGRAPH + {0xEFE6, 0x6E5E}, //15708 #CJK UNIFIED IDEOGRAPH + {0xEFE7, 0x701E}, //15709 #CJK UNIFIED IDEOGRAPH + {0xEFE8, 0x70A1}, //15710 #CJK UNIFIED IDEOGRAPH + {0xEFE9, 0x738E}, //15711 #CJK UNIFIED IDEOGRAPH + {0xEFEA, 0x73FD}, //15712 #CJK UNIFIED IDEOGRAPH + {0xEFEB, 0x753A}, //15713 #CJK UNIFIED IDEOGRAPH + {0xEFEC, 0x775B}, //15714 #CJK UNIFIED IDEOGRAPH + {0xEFED, 0x7887}, //15715 #CJK UNIFIED IDEOGRAPH + {0xEFEE, 0x798E}, //15716 #CJK UNIFIED IDEOGRAPH + {0xEFEF, 0x7A0B}, //15717 #CJK UNIFIED IDEOGRAPH + {0xEFF0, 0x7A7D}, //15718 #CJK UNIFIED IDEOGRAPH + {0xEFF1, 0x7CBE}, //15719 #CJK UNIFIED IDEOGRAPH + {0xEFF2, 0x7D8E}, //15720 #CJK UNIFIED IDEOGRAPH + {0xEFF3, 0x8247}, //15721 #CJK UNIFIED IDEOGRAPH + {0xEFF4, 0x8A02}, //15722 #CJK UNIFIED IDEOGRAPH + {0xEFF5, 0x8AEA}, //15723 #CJK UNIFIED IDEOGRAPH + {0xEFF6, 0x8C9E}, //15724 #CJK UNIFIED IDEOGRAPH + {0xEFF7, 0x912D}, //15725 #CJK UNIFIED IDEOGRAPH + {0xEFF8, 0x914A}, //15726 #CJK UNIFIED IDEOGRAPH + {0xEFF9, 0x91D8}, //15727 #CJK UNIFIED IDEOGRAPH + {0xEFFA, 0x9266}, //15728 #CJK UNIFIED IDEOGRAPH + {0xEFFB, 0x92CC}, //15729 #CJK UNIFIED IDEOGRAPH + {0xEFFC, 0x9320}, //15730 #CJK UNIFIED IDEOGRAPH + {0xEFFD, 0x9706}, //15731 #CJK UNIFIED IDEOGRAPH + {0xEFFE, 0x9756}, //15732 #CJK UNIFIED IDEOGRAPH + {0xF0A1, 0x975C}, //15733 #CJK UNIFIED IDEOGRAPH + {0xF0A2, 0x9802}, //15734 #CJK UNIFIED IDEOGRAPH + {0xF0A3, 0x9F0E}, //15735 #CJK UNIFIED IDEOGRAPH + {0xF0A4, 0x5236}, //15736 #CJK UNIFIED IDEOGRAPH + {0xF0A5, 0x5291}, //15737 #CJK UNIFIED IDEOGRAPH + {0xF0A6, 0x557C}, //15738 #CJK UNIFIED IDEOGRAPH + {0xF0A7, 0x5824}, //15739 #CJK UNIFIED IDEOGRAPH + {0xF0A8, 0x5E1D}, //15740 #CJK UNIFIED IDEOGRAPH + {0xF0A9, 0x5F1F}, //15741 #CJK UNIFIED IDEOGRAPH + {0xF0AA, 0x608C}, //15742 #CJK UNIFIED IDEOGRAPH + {0xF0AB, 0x63D0}, //15743 #CJK UNIFIED IDEOGRAPH + {0xF0AC, 0x68AF}, //15744 #CJK UNIFIED IDEOGRAPH + {0xF0AD, 0x6FDF}, //15745 #CJK UNIFIED IDEOGRAPH + {0xF0AE, 0x796D}, //15746 #CJK UNIFIED IDEOGRAPH + {0xF0AF, 0x7B2C}, //15747 #CJK UNIFIED IDEOGRAPH + {0xF0B0, 0x81CD}, //15748 #CJK UNIFIED IDEOGRAPH + {0xF0B1, 0x85BA}, //15749 #CJK UNIFIED IDEOGRAPH + {0xF0B2, 0x88FD}, //15750 #CJK UNIFIED IDEOGRAPH + {0xF0B3, 0x8AF8}, //15751 #CJK UNIFIED IDEOGRAPH + {0xF0B4, 0x8E44}, //15752 #CJK UNIFIED IDEOGRAPH + {0xF0B5, 0x918D}, //15753 #CJK UNIFIED IDEOGRAPH + {0xF0B6, 0x9664}, //15754 #CJK UNIFIED IDEOGRAPH + {0xF0B7, 0x969B}, //15755 #CJK UNIFIED IDEOGRAPH + {0xF0B8, 0x973D}, //15756 #CJK UNIFIED IDEOGRAPH + {0xF0B9, 0x984C}, //15757 #CJK UNIFIED IDEOGRAPH + {0xF0BA, 0x9F4A}, //15758 #CJK UNIFIED IDEOGRAPH + {0xF0BB, 0x4FCE}, //15759 #CJK UNIFIED IDEOGRAPH + {0xF0BC, 0x5146}, //15760 #CJK UNIFIED IDEOGRAPH + {0xF0BD, 0x51CB}, //15761 #CJK UNIFIED IDEOGRAPH + {0xF0BE, 0x52A9}, //15762 #CJK UNIFIED IDEOGRAPH + {0xF0BF, 0x5632}, //15763 #CJK UNIFIED IDEOGRAPH + {0xF0C0, 0x5F14}, //15764 #CJK UNIFIED IDEOGRAPH + {0xF0C1, 0x5F6B}, //15765 #CJK UNIFIED IDEOGRAPH + {0xF0C2, 0x63AA}, //15766 #CJK UNIFIED IDEOGRAPH + {0xF0C3, 0x64CD}, //15767 #CJK UNIFIED IDEOGRAPH + {0xF0C4, 0x65E9}, //15768 #CJK UNIFIED IDEOGRAPH + {0xF0C5, 0x6641}, //15769 #CJK UNIFIED IDEOGRAPH + {0xF0C6, 0x66FA}, //15770 #CJK UNIFIED IDEOGRAPH + {0xF0C7, 0x66F9}, //15771 #CJK UNIFIED IDEOGRAPH + {0xF0C8, 0x671D}, //15772 #CJK UNIFIED IDEOGRAPH + {0xF0C9, 0x689D}, //15773 #CJK UNIFIED IDEOGRAPH + {0xF0CA, 0x68D7}, //15774 #CJK UNIFIED IDEOGRAPH + {0xF0CB, 0x69FD}, //15775 #CJK UNIFIED IDEOGRAPH + {0xF0CC, 0x6F15}, //15776 #CJK UNIFIED IDEOGRAPH + {0xF0CD, 0x6F6E}, //15777 #CJK UNIFIED IDEOGRAPH + {0xF0CE, 0x7167}, //15778 #CJK UNIFIED IDEOGRAPH + {0xF0CF, 0x71E5}, //15779 #CJK UNIFIED IDEOGRAPH + {0xF0D0, 0x722A}, //15780 #CJK UNIFIED IDEOGRAPH + {0xF0D1, 0x74AA}, //15781 #CJK UNIFIED IDEOGRAPH + {0xF0D2, 0x773A}, //15782 #CJK UNIFIED IDEOGRAPH + {0xF0D3, 0x7956}, //15783 #CJK UNIFIED IDEOGRAPH + {0xF0D4, 0x795A}, //15784 #CJK UNIFIED IDEOGRAPH + {0xF0D5, 0x79DF}, //15785 #CJK UNIFIED IDEOGRAPH + {0xF0D6, 0x7A20}, //15786 #CJK UNIFIED IDEOGRAPH + {0xF0D7, 0x7A95}, //15787 #CJK UNIFIED IDEOGRAPH + {0xF0D8, 0x7C97}, //15788 #CJK UNIFIED IDEOGRAPH + {0xF0D9, 0x7CDF}, //15789 #CJK UNIFIED IDEOGRAPH + {0xF0DA, 0x7D44}, //15790 #CJK UNIFIED IDEOGRAPH + {0xF0DB, 0x7E70}, //15791 #CJK UNIFIED IDEOGRAPH + {0xF0DC, 0x8087}, //15792 #CJK UNIFIED IDEOGRAPH + {0xF0DD, 0x85FB}, //15793 #CJK UNIFIED IDEOGRAPH + {0xF0DE, 0x86A4}, //15794 #CJK UNIFIED IDEOGRAPH + {0xF0DF, 0x8A54}, //15795 #CJK UNIFIED IDEOGRAPH + {0xF0E0, 0x8ABF}, //15796 #CJK UNIFIED IDEOGRAPH + {0xF0E1, 0x8D99}, //15797 #CJK UNIFIED IDEOGRAPH + {0xF0E2, 0x8E81}, //15798 #CJK UNIFIED IDEOGRAPH + {0xF0E3, 0x9020}, //15799 #CJK UNIFIED IDEOGRAPH + {0xF0E4, 0x906D}, //15800 #CJK UNIFIED IDEOGRAPH + {0xF0E5, 0x91E3}, //15801 #CJK UNIFIED IDEOGRAPH + {0xF0E6, 0x963B}, //15802 #CJK UNIFIED IDEOGRAPH + {0xF0E7, 0x96D5}, //15803 #CJK UNIFIED IDEOGRAPH + {0xF0E8, 0x9CE5}, //15804 #CJK UNIFIED IDEOGRAPH + {0xF0E9, 0x65CF}, //15805 #CJK UNIFIED IDEOGRAPH + {0xF0EA, 0x7C07}, //15806 #CJK UNIFIED IDEOGRAPH + {0xF0EB, 0x8DB3}, //15807 #CJK UNIFIED IDEOGRAPH + {0xF0EC, 0x93C3}, //15808 #CJK UNIFIED IDEOGRAPH + {0xF0ED, 0x5B58}, //15809 #CJK UNIFIED IDEOGRAPH + {0xF0EE, 0x5C0A}, //15810 #CJK UNIFIED IDEOGRAPH + {0xF0EF, 0x5352}, //15811 #CJK UNIFIED IDEOGRAPH + {0xF0F0, 0x62D9}, //15812 #CJK UNIFIED IDEOGRAPH + {0xF0F1, 0x731D}, //15813 #CJK UNIFIED IDEOGRAPH + {0xF0F2, 0x5027}, //15814 #CJK UNIFIED IDEOGRAPH + {0xF0F3, 0x5B97}, //15815 #CJK UNIFIED IDEOGRAPH + {0xF0F4, 0x5F9E}, //15816 #CJK UNIFIED IDEOGRAPH + {0xF0F5, 0x60B0}, //15817 #CJK UNIFIED IDEOGRAPH + {0xF0F6, 0x616B}, //15818 #CJK UNIFIED IDEOGRAPH + {0xF0F7, 0x68D5}, //15819 #CJK UNIFIED IDEOGRAPH + {0xF0F8, 0x6DD9}, //15820 #CJK UNIFIED IDEOGRAPH + {0xF0F9, 0x742E}, //15821 #CJK UNIFIED IDEOGRAPH + {0xF0FA, 0x7A2E}, //15822 #CJK UNIFIED IDEOGRAPH + {0xF0FB, 0x7D42}, //15823 #CJK UNIFIED IDEOGRAPH + {0xF0FC, 0x7D9C}, //15824 #CJK UNIFIED IDEOGRAPH + {0xF0FD, 0x7E31}, //15825 #CJK UNIFIED IDEOGRAPH + {0xF0FE, 0x816B}, //15826 #CJK UNIFIED IDEOGRAPH + {0xF1A1, 0x8E2A}, //15827 #CJK UNIFIED IDEOGRAPH + {0xF1A2, 0x8E35}, //15828 #CJK UNIFIED IDEOGRAPH + {0xF1A3, 0x937E}, //15829 #CJK UNIFIED IDEOGRAPH + {0xF1A4, 0x9418}, //15830 #CJK UNIFIED IDEOGRAPH + {0xF1A5, 0x4F50}, //15831 #CJK UNIFIED IDEOGRAPH + {0xF1A6, 0x5750}, //15832 #CJK UNIFIED IDEOGRAPH + {0xF1A7, 0x5DE6}, //15833 #CJK UNIFIED IDEOGRAPH + {0xF1A8, 0x5EA7}, //15834 #CJK UNIFIED IDEOGRAPH + {0xF1A9, 0x632B}, //15835 #CJK UNIFIED IDEOGRAPH + {0xF1AA, 0x7F6A}, //15836 #CJK UNIFIED IDEOGRAPH + {0xF1AB, 0x4E3B}, //15837 #CJK UNIFIED IDEOGRAPH + {0xF1AC, 0x4F4F}, //15838 #CJK UNIFIED IDEOGRAPH + {0xF1AD, 0x4F8F}, //15839 #CJK UNIFIED IDEOGRAPH + {0xF1AE, 0x505A}, //15840 #CJK UNIFIED IDEOGRAPH + {0xF1AF, 0x59DD}, //15841 #CJK UNIFIED IDEOGRAPH + {0xF1B0, 0x80C4}, //15842 #CJK UNIFIED IDEOGRAPH + {0xF1B1, 0x546A}, //15843 #CJK UNIFIED IDEOGRAPH + {0xF1B2, 0x5468}, //15844 #CJK UNIFIED IDEOGRAPH + {0xF1B3, 0x55FE}, //15845 #CJK UNIFIED IDEOGRAPH + {0xF1B4, 0x594F}, //15846 #CJK UNIFIED IDEOGRAPH + {0xF1B5, 0x5B99}, //15847 #CJK UNIFIED IDEOGRAPH + {0xF1B6, 0x5DDE}, //15848 #CJK UNIFIED IDEOGRAPH + {0xF1B7, 0x5EDA}, //15849 #CJK UNIFIED IDEOGRAPH + {0xF1B8, 0x665D}, //15850 #CJK UNIFIED IDEOGRAPH + {0xF1B9, 0x6731}, //15851 #CJK UNIFIED IDEOGRAPH + {0xF1BA, 0x67F1}, //15852 #CJK UNIFIED IDEOGRAPH + {0xF1BB, 0x682A}, //15853 #CJK UNIFIED IDEOGRAPH + {0xF1BC, 0x6CE8}, //15854 #CJK UNIFIED IDEOGRAPH + {0xF1BD, 0x6D32}, //15855 #CJK UNIFIED IDEOGRAPH + {0xF1BE, 0x6E4A}, //15856 #CJK UNIFIED IDEOGRAPH + {0xF1BF, 0x6F8D}, //15857 #CJK UNIFIED IDEOGRAPH + {0xF1C0, 0x70B7}, //15858 #CJK UNIFIED IDEOGRAPH + {0xF1C1, 0x73E0}, //15859 #CJK UNIFIED IDEOGRAPH + {0xF1C2, 0x7587}, //15860 #CJK UNIFIED IDEOGRAPH + {0xF1C3, 0x7C4C}, //15861 #CJK UNIFIED IDEOGRAPH + {0xF1C4, 0x7D02}, //15862 #CJK UNIFIED IDEOGRAPH + {0xF1C5, 0x7D2C}, //15863 #CJK UNIFIED IDEOGRAPH + {0xF1C6, 0x7DA2}, //15864 #CJK UNIFIED IDEOGRAPH + {0xF1C7, 0x821F}, //15865 #CJK UNIFIED IDEOGRAPH + {0xF1C8, 0x86DB}, //15866 #CJK UNIFIED IDEOGRAPH + {0xF1C9, 0x8A3B}, //15867 #CJK UNIFIED IDEOGRAPH + {0xF1CA, 0x8A85}, //15868 #CJK UNIFIED IDEOGRAPH + {0xF1CB, 0x8D70}, //15869 #CJK UNIFIED IDEOGRAPH + {0xF1CC, 0x8E8A}, //15870 #CJK UNIFIED IDEOGRAPH + {0xF1CD, 0x8F33}, //15871 #CJK UNIFIED IDEOGRAPH + {0xF1CE, 0x9031}, //15872 #CJK UNIFIED IDEOGRAPH + {0xF1CF, 0x914E}, //15873 #CJK UNIFIED IDEOGRAPH + {0xF1D0, 0x9152}, //15874 #CJK UNIFIED IDEOGRAPH + {0xF1D1, 0x9444}, //15875 #CJK UNIFIED IDEOGRAPH + {0xF1D2, 0x99D0}, //15876 #CJK UNIFIED IDEOGRAPH + {0xF1D3, 0x7AF9}, //15877 #CJK UNIFIED IDEOGRAPH + {0xF1D4, 0x7CA5}, //15878 #CJK UNIFIED IDEOGRAPH + {0xF1D5, 0x4FCA}, //15879 #CJK UNIFIED IDEOGRAPH + {0xF1D6, 0x5101}, //15880 #CJK UNIFIED IDEOGRAPH + {0xF1D7, 0x51C6}, //15881 #CJK UNIFIED IDEOGRAPH + {0xF1D8, 0x57C8}, //15882 #CJK UNIFIED IDEOGRAPH + {0xF1D9, 0x5BEF}, //15883 #CJK UNIFIED IDEOGRAPH + {0xF1DA, 0x5CFB}, //15884 #CJK UNIFIED IDEOGRAPH + {0xF1DB, 0x6659}, //15885 #CJK UNIFIED IDEOGRAPH + {0xF1DC, 0x6A3D}, //15886 #CJK UNIFIED IDEOGRAPH + {0xF1DD, 0x6D5A}, //15887 #CJK UNIFIED IDEOGRAPH + {0xF1DE, 0x6E96}, //15888 #CJK UNIFIED IDEOGRAPH + {0xF1DF, 0x6FEC}, //15889 #CJK UNIFIED IDEOGRAPH + {0xF1E0, 0x710C}, //15890 #CJK UNIFIED IDEOGRAPH + {0xF1E1, 0x756F}, //15891 #CJK UNIFIED IDEOGRAPH + {0xF1E2, 0x7AE3}, //15892 #CJK UNIFIED IDEOGRAPH + {0xF1E3, 0x8822}, //15893 #CJK UNIFIED IDEOGRAPH + {0xF1E4, 0x9021}, //15894 #CJK UNIFIED IDEOGRAPH + {0xF1E5, 0x9075}, //15895 #CJK UNIFIED IDEOGRAPH + {0xF1E6, 0x96CB}, //15896 #CJK UNIFIED IDEOGRAPH + {0xF1E7, 0x99FF}, //15897 #CJK UNIFIED IDEOGRAPH + {0xF1E8, 0x8301}, //15898 #CJK UNIFIED IDEOGRAPH + {0xF1E9, 0x4E2D}, //15899 #CJK UNIFIED IDEOGRAPH + {0xF1EA, 0x4EF2}, //15900 #CJK UNIFIED IDEOGRAPH + {0xF1EB, 0x8846}, //15901 #CJK UNIFIED IDEOGRAPH + {0xF1EC, 0x91CD}, //15902 #CJK UNIFIED IDEOGRAPH + {0xF1ED, 0x537D}, //15903 #CJK UNIFIED IDEOGRAPH + {0xF1EE, 0x6ADB}, //15904 #CJK UNIFIED IDEOGRAPH + {0xF1EF, 0x696B}, //15905 #CJK UNIFIED IDEOGRAPH + {0xF1F0, 0x6C41}, //15906 #CJK UNIFIED IDEOGRAPH + {0xF1F1, 0x847A}, //15907 #CJK UNIFIED IDEOGRAPH + {0xF1F2, 0x589E}, //15908 #CJK UNIFIED IDEOGRAPH + {0xF1F3, 0x618E}, //15909 #CJK UNIFIED IDEOGRAPH + {0xF1F4, 0x66FE}, //15910 #CJK UNIFIED IDEOGRAPH + {0xF1F5, 0x62EF}, //15911 #CJK UNIFIED IDEOGRAPH + {0xF1F6, 0x70DD}, //15912 #CJK UNIFIED IDEOGRAPH + {0xF1F7, 0x7511}, //15913 #CJK UNIFIED IDEOGRAPH + {0xF1F8, 0x75C7}, //15914 #CJK UNIFIED IDEOGRAPH + {0xF1F9, 0x7E52}, //15915 #CJK UNIFIED IDEOGRAPH + {0xF1FA, 0x84B8}, //15916 #CJK UNIFIED IDEOGRAPH + {0xF1FB, 0x8B49}, //15917 #CJK UNIFIED IDEOGRAPH + {0xF1FC, 0x8D08}, //15918 #CJK UNIFIED IDEOGRAPH + {0xF1FD, 0x4E4B}, //15919 #CJK UNIFIED IDEOGRAPH + {0xF1FE, 0x53EA}, //15920 #CJK UNIFIED IDEOGRAPH + {0xF2A1, 0x54AB}, //15921 #CJK UNIFIED IDEOGRAPH + {0xF2A2, 0x5730}, //15922 #CJK UNIFIED IDEOGRAPH + {0xF2A3, 0x5740}, //15923 #CJK UNIFIED IDEOGRAPH + {0xF2A4, 0x5FD7}, //15924 #CJK UNIFIED IDEOGRAPH + {0xF2A5, 0x6301}, //15925 #CJK UNIFIED IDEOGRAPH + {0xF2A6, 0x6307}, //15926 #CJK UNIFIED IDEOGRAPH + {0xF2A7, 0x646F}, //15927 #CJK UNIFIED IDEOGRAPH + {0xF2A8, 0x652F}, //15928 #CJK UNIFIED IDEOGRAPH + {0xF2A9, 0x65E8}, //15929 #CJK UNIFIED IDEOGRAPH + {0xF2AA, 0x667A}, //15930 #CJK UNIFIED IDEOGRAPH + {0xF2AB, 0x679D}, //15931 #CJK UNIFIED IDEOGRAPH + {0xF2AC, 0x67B3}, //15932 #CJK UNIFIED IDEOGRAPH + {0xF2AD, 0x6B62}, //15933 #CJK UNIFIED IDEOGRAPH + {0xF2AE, 0x6C60}, //15934 #CJK UNIFIED IDEOGRAPH + {0xF2AF, 0x6C9A}, //15935 #CJK UNIFIED IDEOGRAPH + {0xF2B0, 0x6F2C}, //15936 #CJK UNIFIED IDEOGRAPH + {0xF2B1, 0x77E5}, //15937 #CJK UNIFIED IDEOGRAPH + {0xF2B2, 0x7825}, //15938 #CJK UNIFIED IDEOGRAPH + {0xF2B3, 0x7949}, //15939 #CJK UNIFIED IDEOGRAPH + {0xF2B4, 0x7957}, //15940 #CJK UNIFIED IDEOGRAPH + {0xF2B5, 0x7D19}, //15941 #CJK UNIFIED IDEOGRAPH + {0xF2B6, 0x80A2}, //15942 #CJK UNIFIED IDEOGRAPH + {0xF2B7, 0x8102}, //15943 #CJK UNIFIED IDEOGRAPH + {0xF2B8, 0x81F3}, //15944 #CJK UNIFIED IDEOGRAPH + {0xF2B9, 0x829D}, //15945 #CJK UNIFIED IDEOGRAPH + {0xF2BA, 0x82B7}, //15946 #CJK UNIFIED IDEOGRAPH + {0xF2BB, 0x8718}, //15947 #CJK UNIFIED IDEOGRAPH + {0xF2BC, 0x8A8C}, //15948 #CJK UNIFIED IDEOGRAPH + {0xF2BD, 0xF9FC}, //15949 #CJK COMPATIBILITY IDEOGRAPH + {0xF2BE, 0x8D04}, //15950 #CJK UNIFIED IDEOGRAPH + {0xF2BF, 0x8DBE}, //15951 #CJK UNIFIED IDEOGRAPH + {0xF2C0, 0x9072}, //15952 #CJK UNIFIED IDEOGRAPH + {0xF2C1, 0x76F4}, //15953 #CJK UNIFIED IDEOGRAPH + {0xF2C2, 0x7A19}, //15954 #CJK UNIFIED IDEOGRAPH + {0xF2C3, 0x7A37}, //15955 #CJK UNIFIED IDEOGRAPH + {0xF2C4, 0x7E54}, //15956 #CJK UNIFIED IDEOGRAPH + {0xF2C5, 0x8077}, //15957 #CJK UNIFIED IDEOGRAPH + {0xF2C6, 0x5507}, //15958 #CJK UNIFIED IDEOGRAPH + {0xF2C7, 0x55D4}, //15959 #CJK UNIFIED IDEOGRAPH + {0xF2C8, 0x5875}, //15960 #CJK UNIFIED IDEOGRAPH + {0xF2C9, 0x632F}, //15961 #CJK UNIFIED IDEOGRAPH + {0xF2CA, 0x6422}, //15962 #CJK UNIFIED IDEOGRAPH + {0xF2CB, 0x6649}, //15963 #CJK UNIFIED IDEOGRAPH + {0xF2CC, 0x664B}, //15964 #CJK UNIFIED IDEOGRAPH + {0xF2CD, 0x686D}, //15965 #CJK UNIFIED IDEOGRAPH + {0xF2CE, 0x699B}, //15966 #CJK UNIFIED IDEOGRAPH + {0xF2CF, 0x6B84}, //15967 #CJK UNIFIED IDEOGRAPH + {0xF2D0, 0x6D25}, //15968 #CJK UNIFIED IDEOGRAPH + {0xF2D1, 0x6EB1}, //15969 #CJK UNIFIED IDEOGRAPH + {0xF2D2, 0x73CD}, //15970 #CJK UNIFIED IDEOGRAPH + {0xF2D3, 0x7468}, //15971 #CJK UNIFIED IDEOGRAPH + {0xF2D4, 0x74A1}, //15972 #CJK UNIFIED IDEOGRAPH + {0xF2D5, 0x755B}, //15973 #CJK UNIFIED IDEOGRAPH + {0xF2D6, 0x75B9}, //15974 #CJK UNIFIED IDEOGRAPH + {0xF2D7, 0x76E1}, //15975 #CJK UNIFIED IDEOGRAPH + {0xF2D8, 0x771E}, //15976 #CJK UNIFIED IDEOGRAPH + {0xF2D9, 0x778B}, //15977 #CJK UNIFIED IDEOGRAPH + {0xF2DA, 0x79E6}, //15978 #CJK UNIFIED IDEOGRAPH + {0xF2DB, 0x7E09}, //15979 #CJK UNIFIED IDEOGRAPH + {0xF2DC, 0x7E1D}, //15980 #CJK UNIFIED IDEOGRAPH + {0xF2DD, 0x81FB}, //15981 #CJK UNIFIED IDEOGRAPH + {0xF2DE, 0x852F}, //15982 #CJK UNIFIED IDEOGRAPH + {0xF2DF, 0x8897}, //15983 #CJK UNIFIED IDEOGRAPH + {0xF2E0, 0x8A3A}, //15984 #CJK UNIFIED IDEOGRAPH + {0xF2E1, 0x8CD1}, //15985 #CJK UNIFIED IDEOGRAPH + {0xF2E2, 0x8EEB}, //15986 #CJK UNIFIED IDEOGRAPH + {0xF2E3, 0x8FB0}, //15987 #CJK UNIFIED IDEOGRAPH + {0xF2E4, 0x9032}, //15988 #CJK UNIFIED IDEOGRAPH + {0xF2E5, 0x93AD}, //15989 #CJK UNIFIED IDEOGRAPH + {0xF2E6, 0x9663}, //15990 #CJK UNIFIED IDEOGRAPH + {0xF2E7, 0x9673}, //15991 #CJK UNIFIED IDEOGRAPH + {0xF2E8, 0x9707}, //15992 #CJK UNIFIED IDEOGRAPH + {0xF2E9, 0x4F84}, //15993 #CJK UNIFIED IDEOGRAPH + {0xF2EA, 0x53F1}, //15994 #CJK UNIFIED IDEOGRAPH + {0xF2EB, 0x59EA}, //15995 #CJK UNIFIED IDEOGRAPH + {0xF2EC, 0x5AC9}, //15996 #CJK UNIFIED IDEOGRAPH + {0xF2ED, 0x5E19}, //15997 #CJK UNIFIED IDEOGRAPH + {0xF2EE, 0x684E}, //15998 #CJK UNIFIED IDEOGRAPH + {0xF2EF, 0x74C6}, //15999 #CJK UNIFIED IDEOGRAPH + {0xF2F0, 0x75BE}, //16000 #CJK UNIFIED IDEOGRAPH + {0xF2F1, 0x79E9}, //16001 #CJK UNIFIED IDEOGRAPH + {0xF2F2, 0x7A92}, //16002 #CJK UNIFIED IDEOGRAPH + {0xF2F3, 0x81A3}, //16003 #CJK UNIFIED IDEOGRAPH + {0xF2F4, 0x86ED}, //16004 #CJK UNIFIED IDEOGRAPH + {0xF2F5, 0x8CEA}, //16005 #CJK UNIFIED IDEOGRAPH + {0xF2F6, 0x8DCC}, //16006 #CJK UNIFIED IDEOGRAPH + {0xF2F7, 0x8FED}, //16007 #CJK UNIFIED IDEOGRAPH + {0xF2F8, 0x659F}, //16008 #CJK UNIFIED IDEOGRAPH + {0xF2F9, 0x6715}, //16009 #CJK UNIFIED IDEOGRAPH + {0xF2FA, 0xF9FD}, //16010 #CJK COMPATIBILITY IDEOGRAPH + {0xF2FB, 0x57F7}, //16011 #CJK UNIFIED IDEOGRAPH + {0xF2FC, 0x6F57}, //16012 #CJK UNIFIED IDEOGRAPH + {0xF2FD, 0x7DDD}, //16013 #CJK UNIFIED IDEOGRAPH + {0xF2FE, 0x8F2F}, //16014 #CJK UNIFIED IDEOGRAPH + {0xF3A1, 0x93F6}, //16015 #CJK UNIFIED IDEOGRAPH + {0xF3A2, 0x96C6}, //16016 #CJK UNIFIED IDEOGRAPH + {0xF3A3, 0x5FB5}, //16017 #CJK UNIFIED IDEOGRAPH + {0xF3A4, 0x61F2}, //16018 #CJK UNIFIED IDEOGRAPH + {0xF3A5, 0x6F84}, //16019 #CJK UNIFIED IDEOGRAPH + {0xF3A6, 0x4E14}, //16020 #CJK UNIFIED IDEOGRAPH + {0xF3A7, 0x4F98}, //16021 #CJK UNIFIED IDEOGRAPH + {0xF3A8, 0x501F}, //16022 #CJK UNIFIED IDEOGRAPH + {0xF3A9, 0x53C9}, //16023 #CJK UNIFIED IDEOGRAPH + {0xF3AA, 0x55DF}, //16024 #CJK UNIFIED IDEOGRAPH + {0xF3AB, 0x5D6F}, //16025 #CJK UNIFIED IDEOGRAPH + {0xF3AC, 0x5DEE}, //16026 #CJK UNIFIED IDEOGRAPH + {0xF3AD, 0x6B21}, //16027 #CJK UNIFIED IDEOGRAPH + {0xF3AE, 0x6B64}, //16028 #CJK UNIFIED IDEOGRAPH + {0xF3AF, 0x78CB}, //16029 #CJK UNIFIED IDEOGRAPH + {0xF3B0, 0x7B9A}, //16030 #CJK UNIFIED IDEOGRAPH + {0xF3B1, 0xF9FE}, //16031 #CJK COMPATIBILITY IDEOGRAPH + {0xF3B2, 0x8E49}, //16032 #CJK UNIFIED IDEOGRAPH + {0xF3B3, 0x8ECA}, //16033 #CJK UNIFIED IDEOGRAPH + {0xF3B4, 0x906E}, //16034 #CJK UNIFIED IDEOGRAPH + {0xF3B5, 0x6349}, //16035 #CJK UNIFIED IDEOGRAPH + {0xF3B6, 0x643E}, //16036 #CJK UNIFIED IDEOGRAPH + {0xF3B7, 0x7740}, //16037 #CJK UNIFIED IDEOGRAPH + {0xF3B8, 0x7A84}, //16038 #CJK UNIFIED IDEOGRAPH + {0xF3B9, 0x932F}, //16039 #CJK UNIFIED IDEOGRAPH + {0xF3BA, 0x947F}, //16040 #CJK UNIFIED IDEOGRAPH + {0xF3BB, 0x9F6A}, //16041 #CJK UNIFIED IDEOGRAPH + {0xF3BC, 0x64B0}, //16042 #CJK UNIFIED IDEOGRAPH + {0xF3BD, 0x6FAF}, //16043 #CJK UNIFIED IDEOGRAPH + {0xF3BE, 0x71E6}, //16044 #CJK UNIFIED IDEOGRAPH + {0xF3BF, 0x74A8}, //16045 #CJK UNIFIED IDEOGRAPH + {0xF3C0, 0x74DA}, //16046 #CJK UNIFIED IDEOGRAPH + {0xF3C1, 0x7AC4}, //16047 #CJK UNIFIED IDEOGRAPH + {0xF3C2, 0x7C12}, //16048 #CJK UNIFIED IDEOGRAPH + {0xF3C3, 0x7E82}, //16049 #CJK UNIFIED IDEOGRAPH + {0xF3C4, 0x7CB2}, //16050 #CJK UNIFIED IDEOGRAPH + {0xF3C5, 0x7E98}, //16051 #CJK UNIFIED IDEOGRAPH + {0xF3C6, 0x8B9A}, //16052 #CJK UNIFIED IDEOGRAPH + {0xF3C7, 0x8D0A}, //16053 #CJK UNIFIED IDEOGRAPH + {0xF3C8, 0x947D}, //16054 #CJK UNIFIED IDEOGRAPH + {0xF3C9, 0x9910}, //16055 #CJK UNIFIED IDEOGRAPH + {0xF3CA, 0x994C}, //16056 #CJK UNIFIED IDEOGRAPH + {0xF3CB, 0x5239}, //16057 #CJK UNIFIED IDEOGRAPH + {0xF3CC, 0x5BDF}, //16058 #CJK UNIFIED IDEOGRAPH + {0xF3CD, 0x64E6}, //16059 #CJK UNIFIED IDEOGRAPH + {0xF3CE, 0x672D}, //16060 #CJK UNIFIED IDEOGRAPH + {0xF3CF, 0x7D2E}, //16061 #CJK UNIFIED IDEOGRAPH + {0xF3D0, 0x50ED}, //16062 #CJK UNIFIED IDEOGRAPH + {0xF3D1, 0x53C3}, //16063 #CJK UNIFIED IDEOGRAPH + {0xF3D2, 0x5879}, //16064 #CJK UNIFIED IDEOGRAPH + {0xF3D3, 0x6158}, //16065 #CJK UNIFIED IDEOGRAPH + {0xF3D4, 0x6159}, //16066 #CJK UNIFIED IDEOGRAPH + {0xF3D5, 0x61FA}, //16067 #CJK UNIFIED IDEOGRAPH + {0xF3D6, 0x65AC}, //16068 #CJK UNIFIED IDEOGRAPH + {0xF3D7, 0x7AD9}, //16069 #CJK UNIFIED IDEOGRAPH + {0xF3D8, 0x8B92}, //16070 #CJK UNIFIED IDEOGRAPH + {0xF3D9, 0x8B96}, //16071 #CJK UNIFIED IDEOGRAPH + {0xF3DA, 0x5009}, //16072 #CJK UNIFIED IDEOGRAPH + {0xF3DB, 0x5021}, //16073 #CJK UNIFIED IDEOGRAPH + {0xF3DC, 0x5275}, //16074 #CJK UNIFIED IDEOGRAPH + {0xF3DD, 0x5531}, //16075 #CJK UNIFIED IDEOGRAPH + {0xF3DE, 0x5A3C}, //16076 #CJK UNIFIED IDEOGRAPH + {0xF3DF, 0x5EE0}, //16077 #CJK UNIFIED IDEOGRAPH + {0xF3E0, 0x5F70}, //16078 #CJK UNIFIED IDEOGRAPH + {0xF3E1, 0x6134}, //16079 #CJK UNIFIED IDEOGRAPH + {0xF3E2, 0x655E}, //16080 #CJK UNIFIED IDEOGRAPH + {0xF3E3, 0x660C}, //16081 #CJK UNIFIED IDEOGRAPH + {0xF3E4, 0x6636}, //16082 #CJK UNIFIED IDEOGRAPH + {0xF3E5, 0x66A2}, //16083 #CJK UNIFIED IDEOGRAPH + {0xF3E6, 0x69CD}, //16084 #CJK UNIFIED IDEOGRAPH + {0xF3E7, 0x6EC4}, //16085 #CJK UNIFIED IDEOGRAPH + {0xF3E8, 0x6F32}, //16086 #CJK UNIFIED IDEOGRAPH + {0xF3E9, 0x7316}, //16087 #CJK UNIFIED IDEOGRAPH + {0xF3EA, 0x7621}, //16088 #CJK UNIFIED IDEOGRAPH + {0xF3EB, 0x7A93}, //16089 #CJK UNIFIED IDEOGRAPH + {0xF3EC, 0x8139}, //16090 #CJK UNIFIED IDEOGRAPH + {0xF3ED, 0x8259}, //16091 #CJK UNIFIED IDEOGRAPH + {0xF3EE, 0x83D6}, //16092 #CJK UNIFIED IDEOGRAPH + {0xF3EF, 0x84BC}, //16093 #CJK UNIFIED IDEOGRAPH + {0xF3F0, 0x50B5}, //16094 #CJK UNIFIED IDEOGRAPH + {0xF3F1, 0x57F0}, //16095 #CJK UNIFIED IDEOGRAPH + {0xF3F2, 0x5BC0}, //16096 #CJK UNIFIED IDEOGRAPH + {0xF3F3, 0x5BE8}, //16097 #CJK UNIFIED IDEOGRAPH + {0xF3F4, 0x5F69}, //16098 #CJK UNIFIED IDEOGRAPH + {0xF3F5, 0x63A1}, //16099 #CJK UNIFIED IDEOGRAPH + {0xF3F6, 0x7826}, //16100 #CJK UNIFIED IDEOGRAPH + {0xF3F7, 0x7DB5}, //16101 #CJK UNIFIED IDEOGRAPH + {0xF3F8, 0x83DC}, //16102 #CJK UNIFIED IDEOGRAPH + {0xF3F9, 0x8521}, //16103 #CJK UNIFIED IDEOGRAPH + {0xF3FA, 0x91C7}, //16104 #CJK UNIFIED IDEOGRAPH + {0xF3FB, 0x91F5}, //16105 #CJK UNIFIED IDEOGRAPH + {0xF3FC, 0x518A}, //16106 #CJK UNIFIED IDEOGRAPH + {0xF3FD, 0x67F5}, //16107 #CJK UNIFIED IDEOGRAPH + {0xF3FE, 0x7B56}, //16108 #CJK UNIFIED IDEOGRAPH + {0xF4A1, 0x8CAC}, //16109 #CJK UNIFIED IDEOGRAPH + {0xF4A2, 0x51C4}, //16110 #CJK UNIFIED IDEOGRAPH + {0xF4A3, 0x59BB}, //16111 #CJK UNIFIED IDEOGRAPH + {0xF4A4, 0x60BD}, //16112 #CJK UNIFIED IDEOGRAPH + {0xF4A5, 0x8655}, //16113 #CJK UNIFIED IDEOGRAPH + {0xF4A6, 0x501C}, //16114 #CJK UNIFIED IDEOGRAPH + {0xF4A7, 0xF9FF}, //16115 #CJK COMPATIBILITY IDEOGRAPH + {0xF4A8, 0x5254}, //16116 #CJK UNIFIED IDEOGRAPH + {0xF4A9, 0x5C3A}, //16117 #CJK UNIFIED IDEOGRAPH + {0xF4AA, 0x617D}, //16118 #CJK UNIFIED IDEOGRAPH + {0xF4AB, 0x621A}, //16119 #CJK UNIFIED IDEOGRAPH + {0xF4AC, 0x62D3}, //16120 #CJK UNIFIED IDEOGRAPH + {0xF4AD, 0x64F2}, //16121 #CJK UNIFIED IDEOGRAPH + {0xF4AE, 0x65A5}, //16122 #CJK UNIFIED IDEOGRAPH + {0xF4AF, 0x6ECC}, //16123 #CJK UNIFIED IDEOGRAPH + {0xF4B0, 0x7620}, //16124 #CJK UNIFIED IDEOGRAPH + {0xF4B1, 0x810A}, //16125 #CJK UNIFIED IDEOGRAPH + {0xF4B2, 0x8E60}, //16126 #CJK UNIFIED IDEOGRAPH + {0xF4B3, 0x965F}, //16127 #CJK UNIFIED IDEOGRAPH + {0xF4B4, 0x96BB}, //16128 #CJK UNIFIED IDEOGRAPH + {0xF4B5, 0x4EDF}, //16129 #CJK UNIFIED IDEOGRAPH + {0xF4B6, 0x5343}, //16130 #CJK UNIFIED IDEOGRAPH + {0xF4B7, 0x5598}, //16131 #CJK UNIFIED IDEOGRAPH + {0xF4B8, 0x5929}, //16132 #CJK UNIFIED IDEOGRAPH + {0xF4B9, 0x5DDD}, //16133 #CJK UNIFIED IDEOGRAPH + {0xF4BA, 0x64C5}, //16134 #CJK UNIFIED IDEOGRAPH + {0xF4BB, 0x6CC9}, //16135 #CJK UNIFIED IDEOGRAPH + {0xF4BC, 0x6DFA}, //16136 #CJK UNIFIED IDEOGRAPH + {0xF4BD, 0x7394}, //16137 #CJK UNIFIED IDEOGRAPH + {0xF4BE, 0x7A7F}, //16138 #CJK UNIFIED IDEOGRAPH + {0xF4BF, 0x821B}, //16139 #CJK UNIFIED IDEOGRAPH + {0xF4C0, 0x85A6}, //16140 #CJK UNIFIED IDEOGRAPH + {0xF4C1, 0x8CE4}, //16141 #CJK UNIFIED IDEOGRAPH + {0xF4C2, 0x8E10}, //16142 #CJK UNIFIED IDEOGRAPH + {0xF4C3, 0x9077}, //16143 #CJK UNIFIED IDEOGRAPH + {0xF4C4, 0x91E7}, //16144 #CJK UNIFIED IDEOGRAPH + {0xF4C5, 0x95E1}, //16145 #CJK UNIFIED IDEOGRAPH + {0xF4C6, 0x9621}, //16146 #CJK UNIFIED IDEOGRAPH + {0xF4C7, 0x97C6}, //16147 #CJK UNIFIED IDEOGRAPH + {0xF4C8, 0x51F8}, //16148 #CJK UNIFIED IDEOGRAPH + {0xF4C9, 0x54F2}, //16149 #CJK UNIFIED IDEOGRAPH + {0xF4CA, 0x5586}, //16150 #CJK UNIFIED IDEOGRAPH + {0xF4CB, 0x5FB9}, //16151 #CJK UNIFIED IDEOGRAPH + {0xF4CC, 0x64A4}, //16152 #CJK UNIFIED IDEOGRAPH + {0xF4CD, 0x6F88}, //16153 #CJK UNIFIED IDEOGRAPH + {0xF4CE, 0x7DB4}, //16154 #CJK UNIFIED IDEOGRAPH + {0xF4CF, 0x8F1F}, //16155 #CJK UNIFIED IDEOGRAPH + {0xF4D0, 0x8F4D}, //16156 #CJK UNIFIED IDEOGRAPH + {0xF4D1, 0x9435}, //16157 #CJK UNIFIED IDEOGRAPH + {0xF4D2, 0x50C9}, //16158 #CJK UNIFIED IDEOGRAPH + {0xF4D3, 0x5C16}, //16159 #CJK UNIFIED IDEOGRAPH + {0xF4D4, 0x6CBE}, //16160 #CJK UNIFIED IDEOGRAPH + {0xF4D5, 0x6DFB}, //16161 #CJK UNIFIED IDEOGRAPH + {0xF4D6, 0x751B}, //16162 #CJK UNIFIED IDEOGRAPH + {0xF4D7, 0x77BB}, //16163 #CJK UNIFIED IDEOGRAPH + {0xF4D8, 0x7C3D}, //16164 #CJK UNIFIED IDEOGRAPH + {0xF4D9, 0x7C64}, //16165 #CJK UNIFIED IDEOGRAPH + {0xF4DA, 0x8A79}, //16166 #CJK UNIFIED IDEOGRAPH + {0xF4DB, 0x8AC2}, //16167 #CJK UNIFIED IDEOGRAPH + {0xF4DC, 0x581E}, //16168 #CJK UNIFIED IDEOGRAPH + {0xF4DD, 0x59BE}, //16169 #CJK UNIFIED IDEOGRAPH + {0xF4DE, 0x5E16}, //16170 #CJK UNIFIED IDEOGRAPH + {0xF4DF, 0x6377}, //16171 #CJK UNIFIED IDEOGRAPH + {0xF4E0, 0x7252}, //16172 #CJK UNIFIED IDEOGRAPH + {0xF4E1, 0x758A}, //16173 #CJK UNIFIED IDEOGRAPH + {0xF4E2, 0x776B}, //16174 #CJK UNIFIED IDEOGRAPH + {0xF4E3, 0x8ADC}, //16175 #CJK UNIFIED IDEOGRAPH + {0xF4E4, 0x8CBC}, //16176 #CJK UNIFIED IDEOGRAPH + {0xF4E5, 0x8F12}, //16177 #CJK UNIFIED IDEOGRAPH + {0xF4E6, 0x5EF3}, //16178 #CJK UNIFIED IDEOGRAPH + {0xF4E7, 0x6674}, //16179 #CJK UNIFIED IDEOGRAPH + {0xF4E8, 0x6DF8}, //16180 #CJK UNIFIED IDEOGRAPH + {0xF4E9, 0x807D}, //16181 #CJK UNIFIED IDEOGRAPH + {0xF4EA, 0x83C1}, //16182 #CJK UNIFIED IDEOGRAPH + {0xF4EB, 0x8ACB}, //16183 #CJK UNIFIED IDEOGRAPH + {0xF4EC, 0x9751}, //16184 #CJK UNIFIED IDEOGRAPH + {0xF4ED, 0x9BD6}, //16185 #CJK UNIFIED IDEOGRAPH + {0xF4EE, 0xFA00}, //16186 #CJK COMPATIBILITY IDEOGRAPH + {0xF4EF, 0x5243}, //16187 #CJK UNIFIED IDEOGRAPH + {0xF4F0, 0x66FF}, //16188 #CJK UNIFIED IDEOGRAPH + {0xF4F1, 0x6D95}, //16189 #CJK UNIFIED IDEOGRAPH + {0xF4F2, 0x6EEF}, //16190 #CJK UNIFIED IDEOGRAPH + {0xF4F3, 0x7DE0}, //16191 #CJK UNIFIED IDEOGRAPH + {0xF4F4, 0x8AE6}, //16192 #CJK UNIFIED IDEOGRAPH + {0xF4F5, 0x902E}, //16193 #CJK UNIFIED IDEOGRAPH + {0xF4F6, 0x905E}, //16194 #CJK UNIFIED IDEOGRAPH + {0xF4F7, 0x9AD4}, //16195 #CJK UNIFIED IDEOGRAPH + {0xF4F8, 0x521D}, //16196 #CJK UNIFIED IDEOGRAPH + {0xF4F9, 0x527F}, //16197 #CJK UNIFIED IDEOGRAPH + {0xF4FA, 0x54E8}, //16198 #CJK UNIFIED IDEOGRAPH + {0xF4FB, 0x6194}, //16199 #CJK UNIFIED IDEOGRAPH + {0xF4FC, 0x6284}, //16200 #CJK UNIFIED IDEOGRAPH + {0xF4FD, 0x62DB}, //16201 #CJK UNIFIED IDEOGRAPH + {0xF4FE, 0x68A2}, //16202 #CJK UNIFIED IDEOGRAPH + {0xF5A1, 0x6912}, //16203 #CJK UNIFIED IDEOGRAPH + {0xF5A2, 0x695A}, //16204 #CJK UNIFIED IDEOGRAPH + {0xF5A3, 0x6A35}, //16205 #CJK UNIFIED IDEOGRAPH + {0xF5A4, 0x7092}, //16206 #CJK UNIFIED IDEOGRAPH + {0xF5A5, 0x7126}, //16207 #CJK UNIFIED IDEOGRAPH + {0xF5A6, 0x785D}, //16208 #CJK UNIFIED IDEOGRAPH + {0xF5A7, 0x7901}, //16209 #CJK UNIFIED IDEOGRAPH + {0xF5A8, 0x790E}, //16210 #CJK UNIFIED IDEOGRAPH + {0xF5A9, 0x79D2}, //16211 #CJK UNIFIED IDEOGRAPH + {0xF5AA, 0x7A0D}, //16212 #CJK UNIFIED IDEOGRAPH + {0xF5AB, 0x8096}, //16213 #CJK UNIFIED IDEOGRAPH + {0xF5AC, 0x8278}, //16214 #CJK UNIFIED IDEOGRAPH + {0xF5AD, 0x82D5}, //16215 #CJK UNIFIED IDEOGRAPH + {0xF5AE, 0x8349}, //16216 #CJK UNIFIED IDEOGRAPH + {0xF5AF, 0x8549}, //16217 #CJK UNIFIED IDEOGRAPH + {0xF5B0, 0x8C82}, //16218 #CJK UNIFIED IDEOGRAPH + {0xF5B1, 0x8D85}, //16219 #CJK UNIFIED IDEOGRAPH + {0xF5B2, 0x9162}, //16220 #CJK UNIFIED IDEOGRAPH + {0xF5B3, 0x918B}, //16221 #CJK UNIFIED IDEOGRAPH + {0xF5B4, 0x91AE}, //16222 #CJK UNIFIED IDEOGRAPH + {0xF5B5, 0x4FC3}, //16223 #CJK UNIFIED IDEOGRAPH + {0xF5B6, 0x56D1}, //16224 #CJK UNIFIED IDEOGRAPH + {0xF5B7, 0x71ED}, //16225 #CJK UNIFIED IDEOGRAPH + {0xF5B8, 0x77D7}, //16226 #CJK UNIFIED IDEOGRAPH + {0xF5B9, 0x8700}, //16227 #CJK UNIFIED IDEOGRAPH + {0xF5BA, 0x89F8}, //16228 #CJK UNIFIED IDEOGRAPH + {0xF5BB, 0x5BF8}, //16229 #CJK UNIFIED IDEOGRAPH + {0xF5BC, 0x5FD6}, //16230 #CJK UNIFIED IDEOGRAPH + {0xF5BD, 0x6751}, //16231 #CJK UNIFIED IDEOGRAPH + {0xF5BE, 0x90A8}, //16232 #CJK UNIFIED IDEOGRAPH + {0xF5BF, 0x53E2}, //16233 #CJK UNIFIED IDEOGRAPH + {0xF5C0, 0x585A}, //16234 #CJK UNIFIED IDEOGRAPH + {0xF5C1, 0x5BF5}, //16235 #CJK UNIFIED IDEOGRAPH + {0xF5C2, 0x60A4}, //16236 #CJK UNIFIED IDEOGRAPH + {0xF5C3, 0x6181}, //16237 #CJK UNIFIED IDEOGRAPH + {0xF5C4, 0x6460}, //16238 #CJK UNIFIED IDEOGRAPH + {0xF5C5, 0x7E3D}, //16239 #CJK UNIFIED IDEOGRAPH + {0xF5C6, 0x8070}, //16240 #CJK UNIFIED IDEOGRAPH + {0xF5C7, 0x8525}, //16241 #CJK UNIFIED IDEOGRAPH + {0xF5C8, 0x9283}, //16242 #CJK UNIFIED IDEOGRAPH + {0xF5C9, 0x64AE}, //16243 #CJK UNIFIED IDEOGRAPH + {0xF5CA, 0x50AC}, //16244 #CJK UNIFIED IDEOGRAPH + {0xF5CB, 0x5D14}, //16245 #CJK UNIFIED IDEOGRAPH + {0xF5CC, 0x6700}, //16246 #CJK UNIFIED IDEOGRAPH + {0xF5CD, 0x589C}, //16247 #CJK UNIFIED IDEOGRAPH + {0xF5CE, 0x62BD}, //16248 #CJK UNIFIED IDEOGRAPH + {0xF5CF, 0x63A8}, //16249 #CJK UNIFIED IDEOGRAPH + {0xF5D0, 0x690E}, //16250 #CJK UNIFIED IDEOGRAPH + {0xF5D1, 0x6978}, //16251 #CJK UNIFIED IDEOGRAPH + {0xF5D2, 0x6A1E}, //16252 #CJK UNIFIED IDEOGRAPH + {0xF5D3, 0x6E6B}, //16253 #CJK UNIFIED IDEOGRAPH + {0xF5D4, 0x76BA}, //16254 #CJK UNIFIED IDEOGRAPH + {0xF5D5, 0x79CB}, //16255 #CJK UNIFIED IDEOGRAPH + {0xF5D6, 0x82BB}, //16256 #CJK UNIFIED IDEOGRAPH + {0xF5D7, 0x8429}, //16257 #CJK UNIFIED IDEOGRAPH + {0xF5D8, 0x8ACF}, //16258 #CJK UNIFIED IDEOGRAPH + {0xF5D9, 0x8DA8}, //16259 #CJK UNIFIED IDEOGRAPH + {0xF5DA, 0x8FFD}, //16260 #CJK UNIFIED IDEOGRAPH + {0xF5DB, 0x9112}, //16261 #CJK UNIFIED IDEOGRAPH + {0xF5DC, 0x914B}, //16262 #CJK UNIFIED IDEOGRAPH + {0xF5DD, 0x919C}, //16263 #CJK UNIFIED IDEOGRAPH + {0xF5DE, 0x9310}, //16264 #CJK UNIFIED IDEOGRAPH + {0xF5DF, 0x9318}, //16265 #CJK UNIFIED IDEOGRAPH + {0xF5E0, 0x939A}, //16266 #CJK UNIFIED IDEOGRAPH + {0xF5E1, 0x96DB}, //16267 #CJK UNIFIED IDEOGRAPH + {0xF5E2, 0x9A36}, //16268 #CJK UNIFIED IDEOGRAPH + {0xF5E3, 0x9C0D}, //16269 #CJK UNIFIED IDEOGRAPH + {0xF5E4, 0x4E11}, //16270 #CJK UNIFIED IDEOGRAPH + {0xF5E5, 0x755C}, //16271 #CJK UNIFIED IDEOGRAPH + {0xF5E6, 0x795D}, //16272 #CJK UNIFIED IDEOGRAPH + {0xF5E7, 0x7AFA}, //16273 #CJK UNIFIED IDEOGRAPH + {0xF5E8, 0x7B51}, //16274 #CJK UNIFIED IDEOGRAPH + {0xF5E9, 0x7BC9}, //16275 #CJK UNIFIED IDEOGRAPH + {0xF5EA, 0x7E2E}, //16276 #CJK UNIFIED IDEOGRAPH + {0xF5EB, 0x84C4}, //16277 #CJK UNIFIED IDEOGRAPH + {0xF5EC, 0x8E59}, //16278 #CJK UNIFIED IDEOGRAPH + {0xF5ED, 0x8E74}, //16279 #CJK UNIFIED IDEOGRAPH + {0xF5EE, 0x8EF8}, //16280 #CJK UNIFIED IDEOGRAPH + {0xF5EF, 0x9010}, //16281 #CJK UNIFIED IDEOGRAPH + {0xF5F0, 0x6625}, //16282 #CJK UNIFIED IDEOGRAPH + {0xF5F1, 0x693F}, //16283 #CJK UNIFIED IDEOGRAPH + {0xF5F2, 0x7443}, //16284 #CJK UNIFIED IDEOGRAPH + {0xF5F3, 0x51FA}, //16285 #CJK UNIFIED IDEOGRAPH + {0xF5F4, 0x672E}, //16286 #CJK UNIFIED IDEOGRAPH + {0xF5F5, 0x9EDC}, //16287 #CJK UNIFIED IDEOGRAPH + {0xF5F6, 0x5145}, //16288 #CJK UNIFIED IDEOGRAPH + {0xF5F7, 0x5FE0}, //16289 #CJK UNIFIED IDEOGRAPH + {0xF5F8, 0x6C96}, //16290 #CJK UNIFIED IDEOGRAPH + {0xF5F9, 0x87F2}, //16291 #CJK UNIFIED IDEOGRAPH + {0xF5FA, 0x885D}, //16292 #CJK UNIFIED IDEOGRAPH + {0xF5FB, 0x8877}, //16293 #CJK UNIFIED IDEOGRAPH + {0xF5FC, 0x60B4}, //16294 #CJK UNIFIED IDEOGRAPH + {0xF5FD, 0x81B5}, //16295 #CJK UNIFIED IDEOGRAPH + {0xF5FE, 0x8403}, //16296 #CJK UNIFIED IDEOGRAPH + {0xF6A1, 0x8D05}, //16297 #CJK UNIFIED IDEOGRAPH + {0xF6A2, 0x53D6}, //16298 #CJK UNIFIED IDEOGRAPH + {0xF6A3, 0x5439}, //16299 #CJK UNIFIED IDEOGRAPH + {0xF6A4, 0x5634}, //16300 #CJK UNIFIED IDEOGRAPH + {0xF6A5, 0x5A36}, //16301 #CJK UNIFIED IDEOGRAPH + {0xF6A6, 0x5C31}, //16302 #CJK UNIFIED IDEOGRAPH + {0xF6A7, 0x708A}, //16303 #CJK UNIFIED IDEOGRAPH + {0xF6A8, 0x7FE0}, //16304 #CJK UNIFIED IDEOGRAPH + {0xF6A9, 0x805A}, //16305 #CJK UNIFIED IDEOGRAPH + {0xF6AA, 0x8106}, //16306 #CJK UNIFIED IDEOGRAPH + {0xF6AB, 0x81ED}, //16307 #CJK UNIFIED IDEOGRAPH + {0xF6AC, 0x8DA3}, //16308 #CJK UNIFIED IDEOGRAPH + {0xF6AD, 0x9189}, //16309 #CJK UNIFIED IDEOGRAPH + {0xF6AE, 0x9A5F}, //16310 #CJK UNIFIED IDEOGRAPH + {0xF6AF, 0x9DF2}, //16311 #CJK UNIFIED IDEOGRAPH + {0xF6B0, 0x5074}, //16312 #CJK UNIFIED IDEOGRAPH + {0xF6B1, 0x4EC4}, //16313 #CJK UNIFIED IDEOGRAPH + {0xF6B2, 0x53A0}, //16314 #CJK UNIFIED IDEOGRAPH + {0xF6B3, 0x60FB}, //16315 #CJK UNIFIED IDEOGRAPH + {0xF6B4, 0x6E2C}, //16316 #CJK UNIFIED IDEOGRAPH + {0xF6B5, 0x5C64}, //16317 #CJK UNIFIED IDEOGRAPH + {0xF6B6, 0x4F88}, //16318 #CJK UNIFIED IDEOGRAPH + {0xF6B7, 0x5024}, //16319 #CJK UNIFIED IDEOGRAPH + {0xF6B8, 0x55E4}, //16320 #CJK UNIFIED IDEOGRAPH + {0xF6B9, 0x5CD9}, //16321 #CJK UNIFIED IDEOGRAPH + {0xF6BA, 0x5E5F}, //16322 #CJK UNIFIED IDEOGRAPH + {0xF6BB, 0x6065}, //16323 #CJK UNIFIED IDEOGRAPH + {0xF6BC, 0x6894}, //16324 #CJK UNIFIED IDEOGRAPH + {0xF6BD, 0x6CBB}, //16325 #CJK UNIFIED IDEOGRAPH + {0xF6BE, 0x6DC4}, //16326 #CJK UNIFIED IDEOGRAPH + {0xF6BF, 0x71BE}, //16327 #CJK UNIFIED IDEOGRAPH + {0xF6C0, 0x75D4}, //16328 #CJK UNIFIED IDEOGRAPH + {0xF6C1, 0x75F4}, //16329 #CJK UNIFIED IDEOGRAPH + {0xF6C2, 0x7661}, //16330 #CJK UNIFIED IDEOGRAPH + {0xF6C3, 0x7A1A}, //16331 #CJK UNIFIED IDEOGRAPH + {0xF6C4, 0x7A49}, //16332 #CJK UNIFIED IDEOGRAPH + {0xF6C5, 0x7DC7}, //16333 #CJK UNIFIED IDEOGRAPH + {0xF6C6, 0x7DFB}, //16334 #CJK UNIFIED IDEOGRAPH + {0xF6C7, 0x7F6E}, //16335 #CJK UNIFIED IDEOGRAPH + {0xF6C8, 0x81F4}, //16336 #CJK UNIFIED IDEOGRAPH + {0xF6C9, 0x86A9}, //16337 #CJK UNIFIED IDEOGRAPH + {0xF6CA, 0x8F1C}, //16338 #CJK UNIFIED IDEOGRAPH + {0xF6CB, 0x96C9}, //16339 #CJK UNIFIED IDEOGRAPH + {0xF6CC, 0x99B3}, //16340 #CJK UNIFIED IDEOGRAPH + {0xF6CD, 0x9F52}, //16341 #CJK UNIFIED IDEOGRAPH + {0xF6CE, 0x5247}, //16342 #CJK UNIFIED IDEOGRAPH + {0xF6CF, 0x52C5}, //16343 #CJK UNIFIED IDEOGRAPH + {0xF6D0, 0x98ED}, //16344 #CJK UNIFIED IDEOGRAPH + {0xF6D1, 0x89AA}, //16345 #CJK UNIFIED IDEOGRAPH + {0xF6D2, 0x4E03}, //16346 #CJK UNIFIED IDEOGRAPH + {0xF6D3, 0x67D2}, //16347 #CJK UNIFIED IDEOGRAPH + {0xF6D4, 0x6F06}, //16348 #CJK UNIFIED IDEOGRAPH + {0xF6D5, 0x4FB5}, //16349 #CJK UNIFIED IDEOGRAPH + {0xF6D6, 0x5BE2}, //16350 #CJK UNIFIED IDEOGRAPH + {0xF6D7, 0x6795}, //16351 #CJK UNIFIED IDEOGRAPH + {0xF6D8, 0x6C88}, //16352 #CJK UNIFIED IDEOGRAPH + {0xF6D9, 0x6D78}, //16353 #CJK UNIFIED IDEOGRAPH + {0xF6DA, 0x741B}, //16354 #CJK UNIFIED IDEOGRAPH + {0xF6DB, 0x7827}, //16355 #CJK UNIFIED IDEOGRAPH + {0xF6DC, 0x91DD}, //16356 #CJK UNIFIED IDEOGRAPH + {0xF6DD, 0x937C}, //16357 #CJK UNIFIED IDEOGRAPH + {0xF6DE, 0x87C4}, //16358 #CJK UNIFIED IDEOGRAPH + {0xF6DF, 0x79E4}, //16359 #CJK UNIFIED IDEOGRAPH + {0xF6E0, 0x7A31}, //16360 #CJK UNIFIED IDEOGRAPH + {0xF6E1, 0x5FEB}, //16361 #CJK UNIFIED IDEOGRAPH + {0xF6E2, 0x4ED6}, //16362 #CJK UNIFIED IDEOGRAPH + {0xF6E3, 0x54A4}, //16363 #CJK UNIFIED IDEOGRAPH + {0xF6E4, 0x553E}, //16364 #CJK UNIFIED IDEOGRAPH + {0xF6E5, 0x58AE}, //16365 #CJK UNIFIED IDEOGRAPH + {0xF6E6, 0x59A5}, //16366 #CJK UNIFIED IDEOGRAPH + {0xF6E7, 0x60F0}, //16367 #CJK UNIFIED IDEOGRAPH + {0xF6E8, 0x6253}, //16368 #CJK UNIFIED IDEOGRAPH + {0xF6E9, 0x62D6}, //16369 #CJK UNIFIED IDEOGRAPH + {0xF6EA, 0x6736}, //16370 #CJK UNIFIED IDEOGRAPH + {0xF6EB, 0x6955}, //16371 #CJK UNIFIED IDEOGRAPH + {0xF6EC, 0x8235}, //16372 #CJK UNIFIED IDEOGRAPH + {0xF6ED, 0x9640}, //16373 #CJK UNIFIED IDEOGRAPH + {0xF6EE, 0x99B1}, //16374 #CJK UNIFIED IDEOGRAPH + {0xF6EF, 0x99DD}, //16375 #CJK UNIFIED IDEOGRAPH + {0xF6F0, 0x502C}, //16376 #CJK UNIFIED IDEOGRAPH + {0xF6F1, 0x5353}, //16377 #CJK UNIFIED IDEOGRAPH + {0xF6F2, 0x5544}, //16378 #CJK UNIFIED IDEOGRAPH + {0xF6F3, 0x577C}, //16379 #CJK UNIFIED IDEOGRAPH + {0xF6F4, 0xFA01}, //16380 #CJK COMPATIBILITY IDEOGRAPH + {0xF6F5, 0x6258}, //16381 #CJK UNIFIED IDEOGRAPH + {0xF6F6, 0xFA02}, //16382 #CJK COMPATIBILITY IDEOGRAPH + {0xF6F7, 0x64E2}, //16383 #CJK UNIFIED IDEOGRAPH + {0xF6F8, 0x666B}, //16384 #CJK UNIFIED IDEOGRAPH + {0xF6F9, 0x67DD}, //16385 #CJK UNIFIED IDEOGRAPH + {0xF6FA, 0x6FC1}, //16386 #CJK UNIFIED IDEOGRAPH + {0xF6FB, 0x6FEF}, //16387 #CJK UNIFIED IDEOGRAPH + {0xF6FC, 0x7422}, //16388 #CJK UNIFIED IDEOGRAPH + {0xF6FD, 0x7438}, //16389 #CJK UNIFIED IDEOGRAPH + {0xF6FE, 0x8A17}, //16390 #CJK UNIFIED IDEOGRAPH + {0xF7A1, 0x9438}, //16391 #CJK UNIFIED IDEOGRAPH + {0xF7A2, 0x5451}, //16392 #CJK UNIFIED IDEOGRAPH + {0xF7A3, 0x5606}, //16393 #CJK UNIFIED IDEOGRAPH + {0xF7A4, 0x5766}, //16394 #CJK UNIFIED IDEOGRAPH + {0xF7A5, 0x5F48}, //16395 #CJK UNIFIED IDEOGRAPH + {0xF7A6, 0x619A}, //16396 #CJK UNIFIED IDEOGRAPH + {0xF7A7, 0x6B4E}, //16397 #CJK UNIFIED IDEOGRAPH + {0xF7A8, 0x7058}, //16398 #CJK UNIFIED IDEOGRAPH + {0xF7A9, 0x70AD}, //16399 #CJK UNIFIED IDEOGRAPH + {0xF7AA, 0x7DBB}, //16400 #CJK UNIFIED IDEOGRAPH + {0xF7AB, 0x8A95}, //16401 #CJK UNIFIED IDEOGRAPH + {0xF7AC, 0x596A}, //16402 #CJK UNIFIED IDEOGRAPH + {0xF7AD, 0x812B}, //16403 #CJK UNIFIED IDEOGRAPH + {0xF7AE, 0x63A2}, //16404 #CJK UNIFIED IDEOGRAPH + {0xF7AF, 0x7708}, //16405 #CJK UNIFIED IDEOGRAPH + {0xF7B0, 0x803D}, //16406 #CJK UNIFIED IDEOGRAPH + {0xF7B1, 0x8CAA}, //16407 #CJK UNIFIED IDEOGRAPH + {0xF7B2, 0x5854}, //16408 #CJK UNIFIED IDEOGRAPH + {0xF7B3, 0x642D}, //16409 #CJK UNIFIED IDEOGRAPH + {0xF7B4, 0x69BB}, //16410 #CJK UNIFIED IDEOGRAPH + {0xF7B5, 0x5B95}, //16411 #CJK UNIFIED IDEOGRAPH + {0xF7B6, 0x5E11}, //16412 #CJK UNIFIED IDEOGRAPH + {0xF7B7, 0x6E6F}, //16413 #CJK UNIFIED IDEOGRAPH + {0xF7B8, 0xFA03}, //16414 #CJK COMPATIBILITY IDEOGRAPH + {0xF7B9, 0x8569}, //16415 #CJK UNIFIED IDEOGRAPH + {0xF7BA, 0x514C}, //16416 #CJK UNIFIED IDEOGRAPH + {0xF7BB, 0x53F0}, //16417 #CJK UNIFIED IDEOGRAPH + {0xF7BC, 0x592A}, //16418 #CJK UNIFIED IDEOGRAPH + {0xF7BD, 0x6020}, //16419 #CJK UNIFIED IDEOGRAPH + {0xF7BE, 0x614B}, //16420 #CJK UNIFIED IDEOGRAPH + {0xF7BF, 0x6B86}, //16421 #CJK UNIFIED IDEOGRAPH + {0xF7C0, 0x6C70}, //16422 #CJK UNIFIED IDEOGRAPH + {0xF7C1, 0x6CF0}, //16423 #CJK UNIFIED IDEOGRAPH + {0xF7C2, 0x7B1E}, //16424 #CJK UNIFIED IDEOGRAPH + {0xF7C3, 0x80CE}, //16425 #CJK UNIFIED IDEOGRAPH + {0xF7C4, 0x82D4}, //16426 #CJK UNIFIED IDEOGRAPH + {0xF7C5, 0x8DC6}, //16427 #CJK UNIFIED IDEOGRAPH + {0xF7C6, 0x90B0}, //16428 #CJK UNIFIED IDEOGRAPH + {0xF7C7, 0x98B1}, //16429 #CJK UNIFIED IDEOGRAPH + {0xF7C8, 0xFA04}, //16430 #CJK COMPATIBILITY IDEOGRAPH + {0xF7C9, 0x64C7}, //16431 #CJK UNIFIED IDEOGRAPH + {0xF7CA, 0x6FA4}, //16432 #CJK UNIFIED IDEOGRAPH + {0xF7CB, 0x6491}, //16433 #CJK UNIFIED IDEOGRAPH + {0xF7CC, 0x6504}, //16434 #CJK UNIFIED IDEOGRAPH + {0xF7CD, 0x514E}, //16435 #CJK UNIFIED IDEOGRAPH + {0xF7CE, 0x5410}, //16436 #CJK UNIFIED IDEOGRAPH + {0xF7CF, 0x571F}, //16437 #CJK UNIFIED IDEOGRAPH + {0xF7D0, 0x8A0E}, //16438 #CJK UNIFIED IDEOGRAPH + {0xF7D1, 0x615F}, //16439 #CJK UNIFIED IDEOGRAPH + {0xF7D2, 0x6876}, //16440 #CJK UNIFIED IDEOGRAPH + {0xF7D3, 0xFA05}, //16441 #CJK COMPATIBILITY IDEOGRAPH + {0xF7D4, 0x75DB}, //16442 #CJK UNIFIED IDEOGRAPH + {0xF7D5, 0x7B52}, //16443 #CJK UNIFIED IDEOGRAPH + {0xF7D6, 0x7D71}, //16444 #CJK UNIFIED IDEOGRAPH + {0xF7D7, 0x901A}, //16445 #CJK UNIFIED IDEOGRAPH + {0xF7D8, 0x5806}, //16446 #CJK UNIFIED IDEOGRAPH + {0xF7D9, 0x69CC}, //16447 #CJK UNIFIED IDEOGRAPH + {0xF7DA, 0x817F}, //16448 #CJK UNIFIED IDEOGRAPH + {0xF7DB, 0x892A}, //16449 #CJK UNIFIED IDEOGRAPH + {0xF7DC, 0x9000}, //16450 #CJK UNIFIED IDEOGRAPH + {0xF7DD, 0x9839}, //16451 #CJK UNIFIED IDEOGRAPH + {0xF7DE, 0x5078}, //16452 #CJK UNIFIED IDEOGRAPH + {0xF7DF, 0x5957}, //16453 #CJK UNIFIED IDEOGRAPH + {0xF7E0, 0x59AC}, //16454 #CJK UNIFIED IDEOGRAPH + {0xF7E1, 0x6295}, //16455 #CJK UNIFIED IDEOGRAPH + {0xF7E2, 0x900F}, //16456 #CJK UNIFIED IDEOGRAPH + {0xF7E3, 0x9B2A}, //16457 #CJK UNIFIED IDEOGRAPH + {0xF7E4, 0x615D}, //16458 #CJK UNIFIED IDEOGRAPH + {0xF7E5, 0x7279}, //16459 #CJK UNIFIED IDEOGRAPH + {0xF7E6, 0x95D6}, //16460 #CJK UNIFIED IDEOGRAPH + {0xF7E7, 0x5761}, //16461 #CJK UNIFIED IDEOGRAPH + {0xF7E8, 0x5A46}, //16462 #CJK UNIFIED IDEOGRAPH + {0xF7E9, 0x5DF4}, //16463 #CJK UNIFIED IDEOGRAPH + {0xF7EA, 0x628A}, //16464 #CJK UNIFIED IDEOGRAPH + {0xF7EB, 0x64AD}, //16465 #CJK UNIFIED IDEOGRAPH + {0xF7EC, 0x64FA}, //16466 #CJK UNIFIED IDEOGRAPH + {0xF7ED, 0x6777}, //16467 #CJK UNIFIED IDEOGRAPH + {0xF7EE, 0x6CE2}, //16468 #CJK UNIFIED IDEOGRAPH + {0xF7EF, 0x6D3E}, //16469 #CJK UNIFIED IDEOGRAPH + {0xF7F0, 0x722C}, //16470 #CJK UNIFIED IDEOGRAPH + {0xF7F1, 0x7436}, //16471 #CJK UNIFIED IDEOGRAPH + {0xF7F2, 0x7834}, //16472 #CJK UNIFIED IDEOGRAPH + {0xF7F3, 0x7F77}, //16473 #CJK UNIFIED IDEOGRAPH + {0xF7F4, 0x82AD}, //16474 #CJK UNIFIED IDEOGRAPH + {0xF7F5, 0x8DDB}, //16475 #CJK UNIFIED IDEOGRAPH + {0xF7F6, 0x9817}, //16476 #CJK UNIFIED IDEOGRAPH + {0xF7F7, 0x5224}, //16477 #CJK UNIFIED IDEOGRAPH + {0xF7F8, 0x5742}, //16478 #CJK UNIFIED IDEOGRAPH + {0xF7F9, 0x677F}, //16479 #CJK UNIFIED IDEOGRAPH + {0xF7FA, 0x7248}, //16480 #CJK UNIFIED IDEOGRAPH + {0xF7FB, 0x74E3}, //16481 #CJK UNIFIED IDEOGRAPH + {0xF7FC, 0x8CA9}, //16482 #CJK UNIFIED IDEOGRAPH + {0xF7FD, 0x8FA6}, //16483 #CJK UNIFIED IDEOGRAPH + {0xF7FE, 0x9211}, //16484 #CJK UNIFIED IDEOGRAPH + {0xF8A1, 0x962A}, //16485 #CJK UNIFIED IDEOGRAPH + {0xF8A2, 0x516B}, //16486 #CJK UNIFIED IDEOGRAPH + {0xF8A3, 0x53ED}, //16487 #CJK UNIFIED IDEOGRAPH + {0xF8A4, 0x634C}, //16488 #CJK UNIFIED IDEOGRAPH + {0xF8A5, 0x4F69}, //16489 #CJK UNIFIED IDEOGRAPH + {0xF8A6, 0x5504}, //16490 #CJK UNIFIED IDEOGRAPH + {0xF8A7, 0x6096}, //16491 #CJK UNIFIED IDEOGRAPH + {0xF8A8, 0x6557}, //16492 #CJK UNIFIED IDEOGRAPH + {0xF8A9, 0x6C9B}, //16493 #CJK UNIFIED IDEOGRAPH + {0xF8AA, 0x6D7F}, //16494 #CJK UNIFIED IDEOGRAPH + {0xF8AB, 0x724C}, //16495 #CJK UNIFIED IDEOGRAPH + {0xF8AC, 0x72FD}, //16496 #CJK UNIFIED IDEOGRAPH + {0xF8AD, 0x7A17}, //16497 #CJK UNIFIED IDEOGRAPH + {0xF8AE, 0x8987}, //16498 #CJK UNIFIED IDEOGRAPH + {0xF8AF, 0x8C9D}, //16499 #CJK UNIFIED IDEOGRAPH + {0xF8B0, 0x5F6D}, //16500 #CJK UNIFIED IDEOGRAPH + {0xF8B1, 0x6F8E}, //16501 #CJK UNIFIED IDEOGRAPH + {0xF8B2, 0x70F9}, //16502 #CJK UNIFIED IDEOGRAPH + {0xF8B3, 0x81A8}, //16503 #CJK UNIFIED IDEOGRAPH + {0xF8B4, 0x610E}, //16504 #CJK UNIFIED IDEOGRAPH + {0xF8B5, 0x4FBF}, //16505 #CJK UNIFIED IDEOGRAPH + {0xF8B6, 0x504F}, //16506 #CJK UNIFIED IDEOGRAPH + {0xF8B7, 0x6241}, //16507 #CJK UNIFIED IDEOGRAPH + {0xF8B8, 0x7247}, //16508 #CJK UNIFIED IDEOGRAPH + {0xF8B9, 0x7BC7}, //16509 #CJK UNIFIED IDEOGRAPH + {0xF8BA, 0x7DE8}, //16510 #CJK UNIFIED IDEOGRAPH + {0xF8BB, 0x7FE9}, //16511 #CJK UNIFIED IDEOGRAPH + {0xF8BC, 0x904D}, //16512 #CJK UNIFIED IDEOGRAPH + {0xF8BD, 0x97AD}, //16513 #CJK UNIFIED IDEOGRAPH + {0xF8BE, 0x9A19}, //16514 #CJK UNIFIED IDEOGRAPH + {0xF8BF, 0x8CB6}, //16515 #CJK UNIFIED IDEOGRAPH + {0xF8C0, 0x576A}, //16516 #CJK UNIFIED IDEOGRAPH + {0xF8C1, 0x5E73}, //16517 #CJK UNIFIED IDEOGRAPH + {0xF8C2, 0x67B0}, //16518 #CJK UNIFIED IDEOGRAPH + {0xF8C3, 0x840D}, //16519 #CJK UNIFIED IDEOGRAPH + {0xF8C4, 0x8A55}, //16520 #CJK UNIFIED IDEOGRAPH + {0xF8C5, 0x5420}, //16521 #CJK UNIFIED IDEOGRAPH + {0xF8C6, 0x5B16}, //16522 #CJK UNIFIED IDEOGRAPH + {0xF8C7, 0x5E63}, //16523 #CJK UNIFIED IDEOGRAPH + {0xF8C8, 0x5EE2}, //16524 #CJK UNIFIED IDEOGRAPH + {0xF8C9, 0x5F0A}, //16525 #CJK UNIFIED IDEOGRAPH + {0xF8CA, 0x6583}, //16526 #CJK UNIFIED IDEOGRAPH + {0xF8CB, 0x80BA}, //16527 #CJK UNIFIED IDEOGRAPH + {0xF8CC, 0x853D}, //16528 #CJK UNIFIED IDEOGRAPH + {0xF8CD, 0x9589}, //16529 #CJK UNIFIED IDEOGRAPH + {0xF8CE, 0x965B}, //16530 #CJK UNIFIED IDEOGRAPH + {0xF8CF, 0x4F48}, //16531 #CJK UNIFIED IDEOGRAPH + {0xF8D0, 0x5305}, //16532 #CJK UNIFIED IDEOGRAPH + {0xF8D1, 0x530D}, //16533 #CJK UNIFIED IDEOGRAPH + {0xF8D2, 0x530F}, //16534 #CJK UNIFIED IDEOGRAPH + {0xF8D3, 0x5486}, //16535 #CJK UNIFIED IDEOGRAPH + {0xF8D4, 0x54FA}, //16536 #CJK UNIFIED IDEOGRAPH + {0xF8D5, 0x5703}, //16537 #CJK UNIFIED IDEOGRAPH + {0xF8D6, 0x5E03}, //16538 #CJK UNIFIED IDEOGRAPH + {0xF8D7, 0x6016}, //16539 #CJK UNIFIED IDEOGRAPH + {0xF8D8, 0x629B}, //16540 #CJK UNIFIED IDEOGRAPH + {0xF8D9, 0x62B1}, //16541 #CJK UNIFIED IDEOGRAPH + {0xF8DA, 0x6355}, //16542 #CJK UNIFIED IDEOGRAPH + {0xF8DB, 0xFA06}, //16543 #CJK COMPATIBILITY IDEOGRAPH + {0xF8DC, 0x6CE1}, //16544 #CJK UNIFIED IDEOGRAPH + {0xF8DD, 0x6D66}, //16545 #CJK UNIFIED IDEOGRAPH + {0xF8DE, 0x75B1}, //16546 #CJK UNIFIED IDEOGRAPH + {0xF8DF, 0x7832}, //16547 #CJK UNIFIED IDEOGRAPH + {0xF8E0, 0x80DE}, //16548 #CJK UNIFIED IDEOGRAPH + {0xF8E1, 0x812F}, //16549 #CJK UNIFIED IDEOGRAPH + {0xF8E2, 0x82DE}, //16550 #CJK UNIFIED IDEOGRAPH + {0xF8E3, 0x8461}, //16551 #CJK UNIFIED IDEOGRAPH + {0xF8E4, 0x84B2}, //16552 #CJK UNIFIED IDEOGRAPH + {0xF8E5, 0x888D}, //16553 #CJK UNIFIED IDEOGRAPH + {0xF8E6, 0x8912}, //16554 #CJK UNIFIED IDEOGRAPH + {0xF8E7, 0x900B}, //16555 #CJK UNIFIED IDEOGRAPH + {0xF8E8, 0x92EA}, //16556 #CJK UNIFIED IDEOGRAPH + {0xF8E9, 0x98FD}, //16557 #CJK UNIFIED IDEOGRAPH + {0xF8EA, 0x9B91}, //16558 #CJK UNIFIED IDEOGRAPH + {0xF8EB, 0x5E45}, //16559 #CJK UNIFIED IDEOGRAPH + {0xF8EC, 0x66B4}, //16560 #CJK UNIFIED IDEOGRAPH + {0xF8ED, 0x66DD}, //16561 #CJK UNIFIED IDEOGRAPH + {0xF8EE, 0x7011}, //16562 #CJK UNIFIED IDEOGRAPH + {0xF8EF, 0x7206}, //16563 #CJK UNIFIED IDEOGRAPH + {0xF8F0, 0xFA07}, //16564 #CJK COMPATIBILITY IDEOGRAPH + {0xF8F1, 0x4FF5}, //16565 #CJK UNIFIED IDEOGRAPH + {0xF8F2, 0x527D}, //16566 #CJK UNIFIED IDEOGRAPH + {0xF8F3, 0x5F6A}, //16567 #CJK UNIFIED IDEOGRAPH + {0xF8F4, 0x6153}, //16568 #CJK UNIFIED IDEOGRAPH + {0xF8F5, 0x6753}, //16569 #CJK UNIFIED IDEOGRAPH + {0xF8F6, 0x6A19}, //16570 #CJK UNIFIED IDEOGRAPH + {0xF8F7, 0x6F02}, //16571 #CJK UNIFIED IDEOGRAPH + {0xF8F8, 0x74E2}, //16572 #CJK UNIFIED IDEOGRAPH + {0xF8F9, 0x7968}, //16573 #CJK UNIFIED IDEOGRAPH + {0xF8FA, 0x8868}, //16574 #CJK UNIFIED IDEOGRAPH + {0xF8FB, 0x8C79}, //16575 #CJK UNIFIED IDEOGRAPH + {0xF8FC, 0x98C7}, //16576 #CJK UNIFIED IDEOGRAPH + {0xF8FD, 0x98C4}, //16577 #CJK UNIFIED IDEOGRAPH + {0xF8FE, 0x9A43}, //16578 #CJK UNIFIED IDEOGRAPH + {0xF9A1, 0x54C1}, //16579 #CJK UNIFIED IDEOGRAPH + {0xF9A2, 0x7A1F}, //16580 #CJK UNIFIED IDEOGRAPH + {0xF9A3, 0x6953}, //16581 #CJK UNIFIED IDEOGRAPH + {0xF9A4, 0x8AF7}, //16582 #CJK UNIFIED IDEOGRAPH + {0xF9A5, 0x8C4A}, //16583 #CJK UNIFIED IDEOGRAPH + {0xF9A6, 0x98A8}, //16584 #CJK UNIFIED IDEOGRAPH + {0xF9A7, 0x99AE}, //16585 #CJK UNIFIED IDEOGRAPH + {0xF9A8, 0x5F7C}, //16586 #CJK UNIFIED IDEOGRAPH + {0xF9A9, 0x62AB}, //16587 #CJK UNIFIED IDEOGRAPH + {0xF9AA, 0x75B2}, //16588 #CJK UNIFIED IDEOGRAPH + {0xF9AB, 0x76AE}, //16589 #CJK UNIFIED IDEOGRAPH + {0xF9AC, 0x88AB}, //16590 #CJK UNIFIED IDEOGRAPH + {0xF9AD, 0x907F}, //16591 #CJK UNIFIED IDEOGRAPH + {0xF9AE, 0x9642}, //16592 #CJK UNIFIED IDEOGRAPH + {0xF9AF, 0x5339}, //16593 #CJK UNIFIED IDEOGRAPH + {0xF9B0, 0x5F3C}, //16594 #CJK UNIFIED IDEOGRAPH + {0xF9B1, 0x5FC5}, //16595 #CJK UNIFIED IDEOGRAPH + {0xF9B2, 0x6CCC}, //16596 #CJK UNIFIED IDEOGRAPH + {0xF9B3, 0x73CC}, //16597 #CJK UNIFIED IDEOGRAPH + {0xF9B4, 0x7562}, //16598 #CJK UNIFIED IDEOGRAPH + {0xF9B5, 0x758B}, //16599 #CJK UNIFIED IDEOGRAPH + {0xF9B6, 0x7B46}, //16600 #CJK UNIFIED IDEOGRAPH + {0xF9B7, 0x82FE}, //16601 #CJK UNIFIED IDEOGRAPH + {0xF9B8, 0x999D}, //16602 #CJK UNIFIED IDEOGRAPH + {0xF9B9, 0x4E4F}, //16603 #CJK UNIFIED IDEOGRAPH + {0xF9BA, 0x903C}, //16604 #CJK UNIFIED IDEOGRAPH + {0xF9BB, 0x4E0B}, //16605 #CJK UNIFIED IDEOGRAPH + {0xF9BC, 0x4F55}, //16606 #CJK UNIFIED IDEOGRAPH + {0xF9BD, 0x53A6}, //16607 #CJK UNIFIED IDEOGRAPH + {0xF9BE, 0x590F}, //16608 #CJK UNIFIED IDEOGRAPH + {0xF9BF, 0x5EC8}, //16609 #CJK UNIFIED IDEOGRAPH + {0xF9C0, 0x6630}, //16610 #CJK UNIFIED IDEOGRAPH + {0xF9C1, 0x6CB3}, //16611 #CJK UNIFIED IDEOGRAPH + {0xF9C2, 0x7455}, //16612 #CJK UNIFIED IDEOGRAPH + {0xF9C3, 0x8377}, //16613 #CJK UNIFIED IDEOGRAPH + {0xF9C4, 0x8766}, //16614 #CJK UNIFIED IDEOGRAPH + {0xF9C5, 0x8CC0}, //16615 #CJK UNIFIED IDEOGRAPH + {0xF9C6, 0x9050}, //16616 #CJK UNIFIED IDEOGRAPH + {0xF9C7, 0x971E}, //16617 #CJK UNIFIED IDEOGRAPH + {0xF9C8, 0x9C15}, //16618 #CJK UNIFIED IDEOGRAPH + {0xF9C9, 0x58D1}, //16619 #CJK UNIFIED IDEOGRAPH + {0xF9CA, 0x5B78}, //16620 #CJK UNIFIED IDEOGRAPH + {0xF9CB, 0x8650}, //16621 #CJK UNIFIED IDEOGRAPH + {0xF9CC, 0x8B14}, //16622 #CJK UNIFIED IDEOGRAPH + {0xF9CD, 0x9DB4}, //16623 #CJK UNIFIED IDEOGRAPH + {0xF9CE, 0x5BD2}, //16624 #CJK UNIFIED IDEOGRAPH + {0xF9CF, 0x6068}, //16625 #CJK UNIFIED IDEOGRAPH + {0xF9D0, 0x608D}, //16626 #CJK UNIFIED IDEOGRAPH + {0xF9D1, 0x65F1}, //16627 #CJK UNIFIED IDEOGRAPH + {0xF9D2, 0x6C57}, //16628 #CJK UNIFIED IDEOGRAPH + {0xF9D3, 0x6F22}, //16629 #CJK UNIFIED IDEOGRAPH + {0xF9D4, 0x6FA3}, //16630 #CJK UNIFIED IDEOGRAPH + {0xF9D5, 0x701A}, //16631 #CJK UNIFIED IDEOGRAPH + {0xF9D6, 0x7F55}, //16632 #CJK UNIFIED IDEOGRAPH + {0xF9D7, 0x7FF0}, //16633 #CJK UNIFIED IDEOGRAPH + {0xF9D8, 0x9591}, //16634 #CJK UNIFIED IDEOGRAPH + {0xF9D9, 0x9592}, //16635 #CJK UNIFIED IDEOGRAPH + {0xF9DA, 0x9650}, //16636 #CJK UNIFIED IDEOGRAPH + {0xF9DB, 0x97D3}, //16637 #CJK UNIFIED IDEOGRAPH + {0xF9DC, 0x5272}, //16638 #CJK UNIFIED IDEOGRAPH + {0xF9DD, 0x8F44}, //16639 #CJK UNIFIED IDEOGRAPH + {0xF9DE, 0x51FD}, //16640 #CJK UNIFIED IDEOGRAPH + {0xF9DF, 0x542B}, //16641 #CJK UNIFIED IDEOGRAPH + {0xF9E0, 0x54B8}, //16642 #CJK UNIFIED IDEOGRAPH + {0xF9E1, 0x5563}, //16643 #CJK UNIFIED IDEOGRAPH + {0xF9E2, 0x558A}, //16644 #CJK UNIFIED IDEOGRAPH + {0xF9E3, 0x6ABB}, //16645 #CJK UNIFIED IDEOGRAPH + {0xF9E4, 0x6DB5}, //16646 #CJK UNIFIED IDEOGRAPH + {0xF9E5, 0x7DD8}, //16647 #CJK UNIFIED IDEOGRAPH + {0xF9E6, 0x8266}, //16648 #CJK UNIFIED IDEOGRAPH + {0xF9E7, 0x929C}, //16649 #CJK UNIFIED IDEOGRAPH + {0xF9E8, 0x9677}, //16650 #CJK UNIFIED IDEOGRAPH + {0xF9E9, 0x9E79}, //16651 #CJK UNIFIED IDEOGRAPH + {0xF9EA, 0x5408}, //16652 #CJK UNIFIED IDEOGRAPH + {0xF9EB, 0x54C8}, //16653 #CJK UNIFIED IDEOGRAPH + {0xF9EC, 0x76D2}, //16654 #CJK UNIFIED IDEOGRAPH + {0xF9ED, 0x86E4}, //16655 #CJK UNIFIED IDEOGRAPH + {0xF9EE, 0x95A4}, //16656 #CJK UNIFIED IDEOGRAPH + {0xF9EF, 0x95D4}, //16657 #CJK UNIFIED IDEOGRAPH + {0xF9F0, 0x965C}, //16658 #CJK UNIFIED IDEOGRAPH + {0xF9F1, 0x4EA2}, //16659 #CJK UNIFIED IDEOGRAPH + {0xF9F2, 0x4F09}, //16660 #CJK UNIFIED IDEOGRAPH + {0xF9F3, 0x59EE}, //16661 #CJK UNIFIED IDEOGRAPH + {0xF9F4, 0x5AE6}, //16662 #CJK UNIFIED IDEOGRAPH + {0xF9F5, 0x5DF7}, //16663 #CJK UNIFIED IDEOGRAPH + {0xF9F6, 0x6052}, //16664 #CJK UNIFIED IDEOGRAPH + {0xF9F7, 0x6297}, //16665 #CJK UNIFIED IDEOGRAPH + {0xF9F8, 0x676D}, //16666 #CJK UNIFIED IDEOGRAPH + {0xF9F9, 0x6841}, //16667 #CJK UNIFIED IDEOGRAPH + {0xF9FA, 0x6C86}, //16668 #CJK UNIFIED IDEOGRAPH + {0xF9FB, 0x6E2F}, //16669 #CJK UNIFIED IDEOGRAPH + {0xF9FC, 0x7F38}, //16670 #CJK UNIFIED IDEOGRAPH + {0xF9FD, 0x809B}, //16671 #CJK UNIFIED IDEOGRAPH + {0xF9FE, 0x822A}, //16672 #CJK UNIFIED IDEOGRAPH + {0xFAA1, 0xFA08}, //16673 #CJK COMPATIBILITY IDEOGRAPH + {0xFAA2, 0xFA09}, //16674 #CJK COMPATIBILITY IDEOGRAPH + {0xFAA3, 0x9805}, //16675 #CJK UNIFIED IDEOGRAPH + {0xFAA4, 0x4EA5}, //16676 #CJK UNIFIED IDEOGRAPH + {0xFAA5, 0x5055}, //16677 #CJK UNIFIED IDEOGRAPH + {0xFAA6, 0x54B3}, //16678 #CJK UNIFIED IDEOGRAPH + {0xFAA7, 0x5793}, //16679 #CJK UNIFIED IDEOGRAPH + {0xFAA8, 0x595A}, //16680 #CJK UNIFIED IDEOGRAPH + {0xFAA9, 0x5B69}, //16681 #CJK UNIFIED IDEOGRAPH + {0xFAAA, 0x5BB3}, //16682 #CJK UNIFIED IDEOGRAPH + {0xFAAB, 0x61C8}, //16683 #CJK UNIFIED IDEOGRAPH + {0xFAAC, 0x6977}, //16684 #CJK UNIFIED IDEOGRAPH + {0xFAAD, 0x6D77}, //16685 #CJK UNIFIED IDEOGRAPH + {0xFAAE, 0x7023}, //16686 #CJK UNIFIED IDEOGRAPH + {0xFAAF, 0x87F9}, //16687 #CJK UNIFIED IDEOGRAPH + {0xFAB0, 0x89E3}, //16688 #CJK UNIFIED IDEOGRAPH + {0xFAB1, 0x8A72}, //16689 #CJK UNIFIED IDEOGRAPH + {0xFAB2, 0x8AE7}, //16690 #CJK UNIFIED IDEOGRAPH + {0xFAB3, 0x9082}, //16691 #CJK UNIFIED IDEOGRAPH + {0xFAB4, 0x99ED}, //16692 #CJK UNIFIED IDEOGRAPH + {0xFAB5, 0x9AB8}, //16693 #CJK UNIFIED IDEOGRAPH + {0xFAB6, 0x52BE}, //16694 #CJK UNIFIED IDEOGRAPH + {0xFAB7, 0x6838}, //16695 #CJK UNIFIED IDEOGRAPH + {0xFAB8, 0x5016}, //16696 #CJK UNIFIED IDEOGRAPH + {0xFAB9, 0x5E78}, //16697 #CJK UNIFIED IDEOGRAPH + {0xFABA, 0x674F}, //16698 #CJK UNIFIED IDEOGRAPH + {0xFABB, 0x8347}, //16699 #CJK UNIFIED IDEOGRAPH + {0xFABC, 0x884C}, //16700 #CJK UNIFIED IDEOGRAPH + {0xFABD, 0x4EAB}, //16701 #CJK UNIFIED IDEOGRAPH + {0xFABE, 0x5411}, //16702 #CJK UNIFIED IDEOGRAPH + {0xFABF, 0x56AE}, //16703 #CJK UNIFIED IDEOGRAPH + {0xFAC0, 0x73E6}, //16704 #CJK UNIFIED IDEOGRAPH + {0xFAC1, 0x9115}, //16705 #CJK UNIFIED IDEOGRAPH + {0xFAC2, 0x97FF}, //16706 #CJK UNIFIED IDEOGRAPH + {0xFAC3, 0x9909}, //16707 #CJK UNIFIED IDEOGRAPH + {0xFAC4, 0x9957}, //16708 #CJK UNIFIED IDEOGRAPH + {0xFAC5, 0x9999}, //16709 #CJK UNIFIED IDEOGRAPH + {0xFAC6, 0x5653}, //16710 #CJK UNIFIED IDEOGRAPH + {0xFAC7, 0x589F}, //16711 #CJK UNIFIED IDEOGRAPH + {0xFAC8, 0x865B}, //16712 #CJK UNIFIED IDEOGRAPH + {0xFAC9, 0x8A31}, //16713 #CJK UNIFIED IDEOGRAPH + {0xFACA, 0x61B2}, //16714 #CJK UNIFIED IDEOGRAPH + {0xFACB, 0x6AF6}, //16715 #CJK UNIFIED IDEOGRAPH + {0xFACC, 0x737B}, //16716 #CJK UNIFIED IDEOGRAPH + {0xFACD, 0x8ED2}, //16717 #CJK UNIFIED IDEOGRAPH + {0xFACE, 0x6B47}, //16718 #CJK UNIFIED IDEOGRAPH + {0xFACF, 0x96AA}, //16719 #CJK UNIFIED IDEOGRAPH + {0xFAD0, 0x9A57}, //16720 #CJK UNIFIED IDEOGRAPH + {0xFAD1, 0x5955}, //16721 #CJK UNIFIED IDEOGRAPH + {0xFAD2, 0x7200}, //16722 #CJK UNIFIED IDEOGRAPH + {0xFAD3, 0x8D6B}, //16723 #CJK UNIFIED IDEOGRAPH + {0xFAD4, 0x9769}, //16724 #CJK UNIFIED IDEOGRAPH + {0xFAD5, 0x4FD4}, //16725 #CJK UNIFIED IDEOGRAPH + {0xFAD6, 0x5CF4}, //16726 #CJK UNIFIED IDEOGRAPH + {0xFAD7, 0x5F26}, //16727 #CJK UNIFIED IDEOGRAPH + {0xFAD8, 0x61F8}, //16728 #CJK UNIFIED IDEOGRAPH + {0xFAD9, 0x665B}, //16729 #CJK UNIFIED IDEOGRAPH + {0xFADA, 0x6CEB}, //16730 #CJK UNIFIED IDEOGRAPH + {0xFADB, 0x70AB}, //16731 #CJK UNIFIED IDEOGRAPH + {0xFADC, 0x7384}, //16732 #CJK UNIFIED IDEOGRAPH + {0xFADD, 0x73B9}, //16733 #CJK UNIFIED IDEOGRAPH + {0xFADE, 0x73FE}, //16734 #CJK UNIFIED IDEOGRAPH + {0xFADF, 0x7729}, //16735 #CJK UNIFIED IDEOGRAPH + {0xFAE0, 0x774D}, //16736 #CJK UNIFIED IDEOGRAPH + {0xFAE1, 0x7D43}, //16737 #CJK UNIFIED IDEOGRAPH + {0xFAE2, 0x7D62}, //16738 #CJK UNIFIED IDEOGRAPH + {0xFAE3, 0x7E23}, //16739 #CJK UNIFIED IDEOGRAPH + {0xFAE4, 0x8237}, //16740 #CJK UNIFIED IDEOGRAPH + {0xFAE5, 0x8852}, //16741 #CJK UNIFIED IDEOGRAPH + {0xFAE6, 0xFA0A}, //16742 #CJK COMPATIBILITY IDEOGRAPH + {0xFAE7, 0x8CE2}, //16743 #CJK UNIFIED IDEOGRAPH + {0xFAE8, 0x9249}, //16744 #CJK UNIFIED IDEOGRAPH + {0xFAE9, 0x986F}, //16745 #CJK UNIFIED IDEOGRAPH + {0xFAEA, 0x5B51}, //16746 #CJK UNIFIED IDEOGRAPH + {0xFAEB, 0x7A74}, //16747 #CJK UNIFIED IDEOGRAPH + {0xFAEC, 0x8840}, //16748 #CJK UNIFIED IDEOGRAPH + {0xFAED, 0x9801}, //16749 #CJK UNIFIED IDEOGRAPH + {0xFAEE, 0x5ACC}, //16750 #CJK UNIFIED IDEOGRAPH + {0xFAEF, 0x4FE0}, //16751 #CJK UNIFIED IDEOGRAPH + {0xFAF0, 0x5354}, //16752 #CJK UNIFIED IDEOGRAPH + {0xFAF1, 0x593E}, //16753 #CJK UNIFIED IDEOGRAPH + {0xFAF2, 0x5CFD}, //16754 #CJK UNIFIED IDEOGRAPH + {0xFAF3, 0x633E}, //16755 #CJK UNIFIED IDEOGRAPH + {0xFAF4, 0x6D79}, //16756 #CJK UNIFIED IDEOGRAPH + {0xFAF5, 0x72F9}, //16757 #CJK UNIFIED IDEOGRAPH + {0xFAF6, 0x8105}, //16758 #CJK UNIFIED IDEOGRAPH + {0xFAF7, 0x8107}, //16759 #CJK UNIFIED IDEOGRAPH + {0xFAF8, 0x83A2}, //16760 #CJK UNIFIED IDEOGRAPH + {0xFAF9, 0x92CF}, //16761 #CJK UNIFIED IDEOGRAPH + {0xFAFA, 0x9830}, //16762 #CJK UNIFIED IDEOGRAPH + {0xFAFB, 0x4EA8}, //16763 #CJK UNIFIED IDEOGRAPH + {0xFAFC, 0x5144}, //16764 #CJK UNIFIED IDEOGRAPH + {0xFAFD, 0x5211}, //16765 #CJK UNIFIED IDEOGRAPH + {0xFAFE, 0x578B}, //16766 #CJK UNIFIED IDEOGRAPH + {0xFBA1, 0x5F62}, //16767 #CJK UNIFIED IDEOGRAPH + {0xFBA2, 0x6CC2}, //16768 #CJK UNIFIED IDEOGRAPH + {0xFBA3, 0x6ECE}, //16769 #CJK UNIFIED IDEOGRAPH + {0xFBA4, 0x7005}, //16770 #CJK UNIFIED IDEOGRAPH + {0xFBA5, 0x7050}, //16771 #CJK UNIFIED IDEOGRAPH + {0xFBA6, 0x70AF}, //16772 #CJK UNIFIED IDEOGRAPH + {0xFBA7, 0x7192}, //16773 #CJK UNIFIED IDEOGRAPH + {0xFBA8, 0x73E9}, //16774 #CJK UNIFIED IDEOGRAPH + {0xFBA9, 0x7469}, //16775 #CJK UNIFIED IDEOGRAPH + {0xFBAA, 0x834A}, //16776 #CJK UNIFIED IDEOGRAPH + {0xFBAB, 0x87A2}, //16777 #CJK UNIFIED IDEOGRAPH + {0xFBAC, 0x8861}, //16778 #CJK UNIFIED IDEOGRAPH + {0xFBAD, 0x9008}, //16779 #CJK UNIFIED IDEOGRAPH + {0xFBAE, 0x90A2}, //16780 #CJK UNIFIED IDEOGRAPH + {0xFBAF, 0x93A3}, //16781 #CJK UNIFIED IDEOGRAPH + {0xFBB0, 0x99A8}, //16782 #CJK UNIFIED IDEOGRAPH + {0xFBB1, 0x516E}, //16783 #CJK UNIFIED IDEOGRAPH + {0xFBB2, 0x5F57}, //16784 #CJK UNIFIED IDEOGRAPH + {0xFBB3, 0x60E0}, //16785 #CJK UNIFIED IDEOGRAPH + {0xFBB4, 0x6167}, //16786 #CJK UNIFIED IDEOGRAPH + {0xFBB5, 0x66B3}, //16787 #CJK UNIFIED IDEOGRAPH + {0xFBB6, 0x8559}, //16788 #CJK UNIFIED IDEOGRAPH + {0xFBB7, 0x8E4A}, //16789 #CJK UNIFIED IDEOGRAPH + {0xFBB8, 0x91AF}, //16790 #CJK UNIFIED IDEOGRAPH + {0xFBB9, 0x978B}, //16791 #CJK UNIFIED IDEOGRAPH + {0xFBBA, 0x4E4E}, //16792 #CJK UNIFIED IDEOGRAPH + {0xFBBB, 0x4E92}, //16793 #CJK UNIFIED IDEOGRAPH + {0xFBBC, 0x547C}, //16794 #CJK UNIFIED IDEOGRAPH + {0xFBBD, 0x58D5}, //16795 #CJK UNIFIED IDEOGRAPH + {0xFBBE, 0x58FA}, //16796 #CJK UNIFIED IDEOGRAPH + {0xFBBF, 0x597D}, //16797 #CJK UNIFIED IDEOGRAPH + {0xFBC0, 0x5CB5}, //16798 #CJK UNIFIED IDEOGRAPH + {0xFBC1, 0x5F27}, //16799 #CJK UNIFIED IDEOGRAPH + {0xFBC2, 0x6236}, //16800 #CJK UNIFIED IDEOGRAPH + {0xFBC3, 0x6248}, //16801 #CJK UNIFIED IDEOGRAPH + {0xFBC4, 0x660A}, //16802 #CJK UNIFIED IDEOGRAPH + {0xFBC5, 0x6667}, //16803 #CJK UNIFIED IDEOGRAPH + {0xFBC6, 0x6BEB}, //16804 #CJK UNIFIED IDEOGRAPH + {0xFBC7, 0x6D69}, //16805 #CJK UNIFIED IDEOGRAPH + {0xFBC8, 0x6DCF}, //16806 #CJK UNIFIED IDEOGRAPH + {0xFBC9, 0x6E56}, //16807 #CJK UNIFIED IDEOGRAPH + {0xFBCA, 0x6EF8}, //16808 #CJK UNIFIED IDEOGRAPH + {0xFBCB, 0x6F94}, //16809 #CJK UNIFIED IDEOGRAPH + {0xFBCC, 0x6FE0}, //16810 #CJK UNIFIED IDEOGRAPH + {0xFBCD, 0x6FE9}, //16811 #CJK UNIFIED IDEOGRAPH + {0xFBCE, 0x705D}, //16812 #CJK UNIFIED IDEOGRAPH + {0xFBCF, 0x72D0}, //16813 #CJK UNIFIED IDEOGRAPH + {0xFBD0, 0x7425}, //16814 #CJK UNIFIED IDEOGRAPH + {0xFBD1, 0x745A}, //16815 #CJK UNIFIED IDEOGRAPH + {0xFBD2, 0x74E0}, //16816 #CJK UNIFIED IDEOGRAPH + {0xFBD3, 0x7693}, //16817 #CJK UNIFIED IDEOGRAPH + {0xFBD4, 0x795C}, //16818 #CJK UNIFIED IDEOGRAPH + {0xFBD5, 0x7CCA}, //16819 #CJK UNIFIED IDEOGRAPH + {0xFBD6, 0x7E1E}, //16820 #CJK UNIFIED IDEOGRAPH + {0xFBD7, 0x80E1}, //16821 #CJK UNIFIED IDEOGRAPH + {0xFBD8, 0x82A6}, //16822 #CJK UNIFIED IDEOGRAPH + {0xFBD9, 0x846B}, //16823 #CJK UNIFIED IDEOGRAPH + {0xFBDA, 0x84BF}, //16824 #CJK UNIFIED IDEOGRAPH + {0xFBDB, 0x864E}, //16825 #CJK UNIFIED IDEOGRAPH + {0xFBDC, 0x865F}, //16826 #CJK UNIFIED IDEOGRAPH + {0xFBDD, 0x8774}, //16827 #CJK UNIFIED IDEOGRAPH + {0xFBDE, 0x8B77}, //16828 #CJK UNIFIED IDEOGRAPH + {0xFBDF, 0x8C6A}, //16829 #CJK UNIFIED IDEOGRAPH + {0xFBE0, 0x93AC}, //16830 #CJK UNIFIED IDEOGRAPH + {0xFBE1, 0x9800}, //16831 #CJK UNIFIED IDEOGRAPH + {0xFBE2, 0x9865}, //16832 #CJK UNIFIED IDEOGRAPH + {0xFBE3, 0x60D1}, //16833 #CJK UNIFIED IDEOGRAPH + {0xFBE4, 0x6216}, //16834 #CJK UNIFIED IDEOGRAPH + {0xFBE5, 0x9177}, //16835 #CJK UNIFIED IDEOGRAPH + {0xFBE6, 0x5A5A}, //16836 #CJK UNIFIED IDEOGRAPH + {0xFBE7, 0x660F}, //16837 #CJK UNIFIED IDEOGRAPH + {0xFBE8, 0x6DF7}, //16838 #CJK UNIFIED IDEOGRAPH + {0xFBE9, 0x6E3E}, //16839 #CJK UNIFIED IDEOGRAPH + {0xFBEA, 0x743F}, //16840 #CJK UNIFIED IDEOGRAPH + {0xFBEB, 0x9B42}, //16841 #CJK UNIFIED IDEOGRAPH + {0xFBEC, 0x5FFD}, //16842 #CJK UNIFIED IDEOGRAPH + {0xFBED, 0x60DA}, //16843 #CJK UNIFIED IDEOGRAPH + {0xFBEE, 0x7B0F}, //16844 #CJK UNIFIED IDEOGRAPH + {0xFBEF, 0x54C4}, //16845 #CJK UNIFIED IDEOGRAPH + {0xFBF0, 0x5F18}, //16846 #CJK UNIFIED IDEOGRAPH + {0xFBF1, 0x6C5E}, //16847 #CJK UNIFIED IDEOGRAPH + {0xFBF2, 0x6CD3}, //16848 #CJK UNIFIED IDEOGRAPH + {0xFBF3, 0x6D2A}, //16849 #CJK UNIFIED IDEOGRAPH + {0xFBF4, 0x70D8}, //16850 #CJK UNIFIED IDEOGRAPH + {0xFBF5, 0x7D05}, //16851 #CJK UNIFIED IDEOGRAPH + {0xFBF6, 0x8679}, //16852 #CJK UNIFIED IDEOGRAPH + {0xFBF7, 0x8A0C}, //16853 #CJK UNIFIED IDEOGRAPH + {0xFBF8, 0x9D3B}, //16854 #CJK UNIFIED IDEOGRAPH + {0xFBF9, 0x5316}, //16855 #CJK UNIFIED IDEOGRAPH + {0xFBFA, 0x548C}, //16856 #CJK UNIFIED IDEOGRAPH + {0xFBFB, 0x5B05}, //16857 #CJK UNIFIED IDEOGRAPH + {0xFBFC, 0x6A3A}, //16858 #CJK UNIFIED IDEOGRAPH + {0xFBFD, 0x706B}, //16859 #CJK UNIFIED IDEOGRAPH + {0xFBFE, 0x7575}, //16860 #CJK UNIFIED IDEOGRAPH + {0xFCA1, 0x798D}, //16861 #CJK UNIFIED IDEOGRAPH + {0xFCA2, 0x79BE}, //16862 #CJK UNIFIED IDEOGRAPH + {0xFCA3, 0x82B1}, //16863 #CJK UNIFIED IDEOGRAPH + {0xFCA4, 0x83EF}, //16864 #CJK UNIFIED IDEOGRAPH + {0xFCA5, 0x8A71}, //16865 #CJK UNIFIED IDEOGRAPH + {0xFCA6, 0x8B41}, //16866 #CJK UNIFIED IDEOGRAPH + {0xFCA7, 0x8CA8}, //16867 #CJK UNIFIED IDEOGRAPH + {0xFCA8, 0x9774}, //16868 #CJK UNIFIED IDEOGRAPH + {0xFCA9, 0xFA0B}, //16869 #CJK COMPATIBILITY IDEOGRAPH + {0xFCAA, 0x64F4}, //16870 #CJK UNIFIED IDEOGRAPH + {0xFCAB, 0x652B}, //16871 #CJK UNIFIED IDEOGRAPH + {0xFCAC, 0x78BA}, //16872 #CJK UNIFIED IDEOGRAPH + {0xFCAD, 0x78BB}, //16873 #CJK UNIFIED IDEOGRAPH + {0xFCAE, 0x7A6B}, //16874 #CJK UNIFIED IDEOGRAPH + {0xFCAF, 0x4E38}, //16875 #CJK UNIFIED IDEOGRAPH + {0xFCB0, 0x559A}, //16876 #CJK UNIFIED IDEOGRAPH + {0xFCB1, 0x5950}, //16877 #CJK UNIFIED IDEOGRAPH + {0xFCB2, 0x5BA6}, //16878 #CJK UNIFIED IDEOGRAPH + {0xFCB3, 0x5E7B}, //16879 #CJK UNIFIED IDEOGRAPH + {0xFCB4, 0x60A3}, //16880 #CJK UNIFIED IDEOGRAPH + {0xFCB5, 0x63DB}, //16881 #CJK UNIFIED IDEOGRAPH + {0xFCB6, 0x6B61}, //16882 #CJK UNIFIED IDEOGRAPH + {0xFCB7, 0x6665}, //16883 #CJK UNIFIED IDEOGRAPH + {0xFCB8, 0x6853}, //16884 #CJK UNIFIED IDEOGRAPH + {0xFCB9, 0x6E19}, //16885 #CJK UNIFIED IDEOGRAPH + {0xFCBA, 0x7165}, //16886 #CJK UNIFIED IDEOGRAPH + {0xFCBB, 0x74B0}, //16887 #CJK UNIFIED IDEOGRAPH + {0xFCBC, 0x7D08}, //16888 #CJK UNIFIED IDEOGRAPH + {0xFCBD, 0x9084}, //16889 #CJK UNIFIED IDEOGRAPH + {0xFCBE, 0x9A69}, //16890 #CJK UNIFIED IDEOGRAPH + {0xFCBF, 0x9C25}, //16891 #CJK UNIFIED IDEOGRAPH + {0xFCC0, 0x6D3B}, //16892 #CJK UNIFIED IDEOGRAPH + {0xFCC1, 0x6ED1}, //16893 #CJK UNIFIED IDEOGRAPH + {0xFCC2, 0x733E}, //16894 #CJK UNIFIED IDEOGRAPH + {0xFCC3, 0x8C41}, //16895 #CJK UNIFIED IDEOGRAPH + {0xFCC4, 0x95CA}, //16896 #CJK UNIFIED IDEOGRAPH + {0xFCC5, 0x51F0}, //16897 #CJK UNIFIED IDEOGRAPH + {0xFCC6, 0x5E4C}, //16898 #CJK UNIFIED IDEOGRAPH + {0xFCC7, 0x5FA8}, //16899 #CJK UNIFIED IDEOGRAPH + {0xFCC8, 0x604D}, //16900 #CJK UNIFIED IDEOGRAPH + {0xFCC9, 0x60F6}, //16901 #CJK UNIFIED IDEOGRAPH + {0xFCCA, 0x6130}, //16902 #CJK UNIFIED IDEOGRAPH + {0xFCCB, 0x614C}, //16903 #CJK UNIFIED IDEOGRAPH + {0xFCCC, 0x6643}, //16904 #CJK UNIFIED IDEOGRAPH + {0xFCCD, 0x6644}, //16905 #CJK UNIFIED IDEOGRAPH + {0xFCCE, 0x69A5}, //16906 #CJK UNIFIED IDEOGRAPH + {0xFCCF, 0x6CC1}, //16907 #CJK UNIFIED IDEOGRAPH + {0xFCD0, 0x6E5F}, //16908 #CJK UNIFIED IDEOGRAPH + {0xFCD1, 0x6EC9}, //16909 #CJK UNIFIED IDEOGRAPH + {0xFCD2, 0x6F62}, //16910 #CJK UNIFIED IDEOGRAPH + {0xFCD3, 0x714C}, //16911 #CJK UNIFIED IDEOGRAPH + {0xFCD4, 0x749C}, //16912 #CJK UNIFIED IDEOGRAPH + {0xFCD5, 0x7687}, //16913 #CJK UNIFIED IDEOGRAPH + {0xFCD6, 0x7BC1}, //16914 #CJK UNIFIED IDEOGRAPH + {0xFCD7, 0x7C27}, //16915 #CJK UNIFIED IDEOGRAPH + {0xFCD8, 0x8352}, //16916 #CJK UNIFIED IDEOGRAPH + {0xFCD9, 0x8757}, //16917 #CJK UNIFIED IDEOGRAPH + {0xFCDA, 0x9051}, //16918 #CJK UNIFIED IDEOGRAPH + {0xFCDB, 0x968D}, //16919 #CJK UNIFIED IDEOGRAPH + {0xFCDC, 0x9EC3}, //16920 #CJK UNIFIED IDEOGRAPH + {0xFCDD, 0x532F}, //16921 #CJK UNIFIED IDEOGRAPH + {0xFCDE, 0x56DE}, //16922 #CJK UNIFIED IDEOGRAPH + {0xFCDF, 0x5EFB}, //16923 #CJK UNIFIED IDEOGRAPH + {0xFCE0, 0x5F8A}, //16924 #CJK UNIFIED IDEOGRAPH + {0xFCE1, 0x6062}, //16925 #CJK UNIFIED IDEOGRAPH + {0xFCE2, 0x6094}, //16926 #CJK UNIFIED IDEOGRAPH + {0xFCE3, 0x61F7}, //16927 #CJK UNIFIED IDEOGRAPH + {0xFCE4, 0x6666}, //16928 #CJK UNIFIED IDEOGRAPH + {0xFCE5, 0x6703}, //16929 #CJK UNIFIED IDEOGRAPH + {0xFCE6, 0x6A9C}, //16930 #CJK UNIFIED IDEOGRAPH + {0xFCE7, 0x6DEE}, //16931 #CJK UNIFIED IDEOGRAPH + {0xFCE8, 0x6FAE}, //16932 #CJK UNIFIED IDEOGRAPH + {0xFCE9, 0x7070}, //16933 #CJK UNIFIED IDEOGRAPH + {0xFCEA, 0x736A}, //16934 #CJK UNIFIED IDEOGRAPH + {0xFCEB, 0x7E6A}, //16935 #CJK UNIFIED IDEOGRAPH + {0xFCEC, 0x81BE}, //16936 #CJK UNIFIED IDEOGRAPH + {0xFCED, 0x8334}, //16937 #CJK UNIFIED IDEOGRAPH + {0xFCEE, 0x86D4}, //16938 #CJK UNIFIED IDEOGRAPH + {0xFCEF, 0x8AA8}, //16939 #CJK UNIFIED IDEOGRAPH + {0xFCF0, 0x8CC4}, //16940 #CJK UNIFIED IDEOGRAPH + {0xFCF1, 0x5283}, //16941 #CJK UNIFIED IDEOGRAPH + {0xFCF2, 0x7372}, //16942 #CJK UNIFIED IDEOGRAPH + {0xFCF3, 0x5B96}, //16943 #CJK UNIFIED IDEOGRAPH + {0xFCF4, 0x6A6B}, //16944 #CJK UNIFIED IDEOGRAPH + {0xFCF5, 0x9404}, //16945 #CJK UNIFIED IDEOGRAPH + {0xFCF6, 0x54EE}, //16946 #CJK UNIFIED IDEOGRAPH + {0xFCF7, 0x5686}, //16947 #CJK UNIFIED IDEOGRAPH + {0xFCF8, 0x5B5D}, //16948 #CJK UNIFIED IDEOGRAPH + {0xFCF9, 0x6548}, //16949 #CJK UNIFIED IDEOGRAPH + {0xFCFA, 0x6585}, //16950 #CJK UNIFIED IDEOGRAPH + {0xFCFB, 0x66C9}, //16951 #CJK UNIFIED IDEOGRAPH + {0xFCFC, 0x689F}, //16952 #CJK UNIFIED IDEOGRAPH + {0xFCFD, 0x6D8D}, //16953 #CJK UNIFIED IDEOGRAPH + {0xFCFE, 0x6DC6}, //16954 #CJK UNIFIED IDEOGRAPH + {0xFDA1, 0x723B}, //16955 #CJK UNIFIED IDEOGRAPH + {0xFDA2, 0x80B4}, //16956 #CJK UNIFIED IDEOGRAPH + {0xFDA3, 0x9175}, //16957 #CJK UNIFIED IDEOGRAPH + {0xFDA4, 0x9A4D}, //16958 #CJK UNIFIED IDEOGRAPH + {0xFDA5, 0x4FAF}, //16959 #CJK UNIFIED IDEOGRAPH + {0xFDA6, 0x5019}, //16960 #CJK UNIFIED IDEOGRAPH + {0xFDA7, 0x539A}, //16961 #CJK UNIFIED IDEOGRAPH + {0xFDA8, 0x540E}, //16962 #CJK UNIFIED IDEOGRAPH + {0xFDA9, 0x543C}, //16963 #CJK UNIFIED IDEOGRAPH + {0xFDAA, 0x5589}, //16964 #CJK UNIFIED IDEOGRAPH + {0xFDAB, 0x55C5}, //16965 #CJK UNIFIED IDEOGRAPH + {0xFDAC, 0x5E3F}, //16966 #CJK UNIFIED IDEOGRAPH + {0xFDAD, 0x5F8C}, //16967 #CJK UNIFIED IDEOGRAPH + {0xFDAE, 0x673D}, //16968 #CJK UNIFIED IDEOGRAPH + {0xFDAF, 0x7166}, //16969 #CJK UNIFIED IDEOGRAPH + {0xFDB0, 0x73DD}, //16970 #CJK UNIFIED IDEOGRAPH + {0xFDB1, 0x9005}, //16971 #CJK UNIFIED IDEOGRAPH + {0xFDB2, 0x52DB}, //16972 #CJK UNIFIED IDEOGRAPH + {0xFDB3, 0x52F3}, //16973 #CJK UNIFIED IDEOGRAPH + {0xFDB4, 0x5864}, //16974 #CJK UNIFIED IDEOGRAPH + {0xFDB5, 0x58CE}, //16975 #CJK UNIFIED IDEOGRAPH + {0xFDB6, 0x7104}, //16976 #CJK UNIFIED IDEOGRAPH + {0xFDB7, 0x718F}, //16977 #CJK UNIFIED IDEOGRAPH + {0xFDB8, 0x71FB}, //16978 #CJK UNIFIED IDEOGRAPH + {0xFDB9, 0x85B0}, //16979 #CJK UNIFIED IDEOGRAPH + {0xFDBA, 0x8A13}, //16980 #CJK UNIFIED IDEOGRAPH + {0xFDBB, 0x6688}, //16981 #CJK UNIFIED IDEOGRAPH + {0xFDBC, 0x85A8}, //16982 #CJK UNIFIED IDEOGRAPH + {0xFDBD, 0x55A7}, //16983 #CJK UNIFIED IDEOGRAPH + {0xFDBE, 0x6684}, //16984 #CJK UNIFIED IDEOGRAPH + {0xFDBF, 0x714A}, //16985 #CJK UNIFIED IDEOGRAPH + {0xFDC0, 0x8431}, //16986 #CJK UNIFIED IDEOGRAPH + {0xFDC1, 0x5349}, //16987 #CJK UNIFIED IDEOGRAPH + {0xFDC2, 0x5599}, //16988 #CJK UNIFIED IDEOGRAPH + {0xFDC3, 0x6BC1}, //16989 #CJK UNIFIED IDEOGRAPH + {0xFDC4, 0x5F59}, //16990 #CJK UNIFIED IDEOGRAPH + {0xFDC5, 0x5FBD}, //16991 #CJK UNIFIED IDEOGRAPH + {0xFDC6, 0x63EE}, //16992 #CJK UNIFIED IDEOGRAPH + {0xFDC7, 0x6689}, //16993 #CJK UNIFIED IDEOGRAPH + {0xFDC8, 0x7147}, //16994 #CJK UNIFIED IDEOGRAPH + {0xFDC9, 0x8AF1}, //16995 #CJK UNIFIED IDEOGRAPH + {0xFDCA, 0x8F1D}, //16996 #CJK UNIFIED IDEOGRAPH + {0xFDCB, 0x9EBE}, //16997 #CJK UNIFIED IDEOGRAPH + {0xFDCC, 0x4F11}, //16998 #CJK UNIFIED IDEOGRAPH + {0xFDCD, 0x643A}, //16999 #CJK UNIFIED IDEOGRAPH + {0xFDCE, 0x70CB}, //17000 #CJK UNIFIED IDEOGRAPH + {0xFDCF, 0x7566}, //17001 #CJK UNIFIED IDEOGRAPH + {0xFDD0, 0x8667}, //17002 #CJK UNIFIED IDEOGRAPH + {0xFDD1, 0x6064}, //17003 #CJK UNIFIED IDEOGRAPH + {0xFDD2, 0x8B4E}, //17004 #CJK UNIFIED IDEOGRAPH + {0xFDD3, 0x9DF8}, //17005 #CJK UNIFIED IDEOGRAPH + {0xFDD4, 0x5147}, //17006 #CJK UNIFIED IDEOGRAPH + {0xFDD5, 0x51F6}, //17007 #CJK UNIFIED IDEOGRAPH + {0xFDD6, 0x5308}, //17008 #CJK UNIFIED IDEOGRAPH + {0xFDD7, 0x6D36}, //17009 #CJK UNIFIED IDEOGRAPH + {0xFDD8, 0x80F8}, //17010 #CJK UNIFIED IDEOGRAPH + {0xFDD9, 0x9ED1}, //17011 #CJK UNIFIED IDEOGRAPH + {0xFDDA, 0x6615}, //17012 #CJK UNIFIED IDEOGRAPH + {0xFDDB, 0x6B23}, //17013 #CJK UNIFIED IDEOGRAPH + {0xFDDC, 0x7098}, //17014 #CJK UNIFIED IDEOGRAPH + {0xFDDD, 0x75D5}, //17015 #CJK UNIFIED IDEOGRAPH + {0xFDDE, 0x5403}, //17016 #CJK UNIFIED IDEOGRAPH + {0xFDDF, 0x5C79}, //17017 #CJK UNIFIED IDEOGRAPH + {0xFDE0, 0x7D07}, //17018 #CJK UNIFIED IDEOGRAPH + {0xFDE1, 0x8A16}, //17019 #CJK UNIFIED IDEOGRAPH + {0xFDE2, 0x6B20}, //17020 #CJK UNIFIED IDEOGRAPH + {0xFDE3, 0x6B3D}, //17021 #CJK UNIFIED IDEOGRAPH + {0xFDE4, 0x6B46}, //17022 #CJK UNIFIED IDEOGRAPH + {0xFDE5, 0x5438}, //17023 #CJK UNIFIED IDEOGRAPH + {0xFDE6, 0x6070}, //17024 #CJK UNIFIED IDEOGRAPH + {0xFDE7, 0x6D3D}, //17025 #CJK UNIFIED IDEOGRAPH + {0xFDE8, 0x7FD5}, //17026 #CJK UNIFIED IDEOGRAPH + {0xFDE9, 0x8208}, //17027 #CJK UNIFIED IDEOGRAPH + {0xFDEA, 0x50D6}, //17028 #CJK UNIFIED IDEOGRAPH + {0xFDEB, 0x51DE}, //17029 #CJK UNIFIED IDEOGRAPH + {0xFDEC, 0x559C}, //17030 #CJK UNIFIED IDEOGRAPH + {0xFDED, 0x566B}, //17031 #CJK UNIFIED IDEOGRAPH + {0xFDEE, 0x56CD}, //17032 #CJK UNIFIED IDEOGRAPH + {0xFDEF, 0x59EC}, //17033 #CJK UNIFIED IDEOGRAPH + {0xFDF0, 0x5B09}, //17034 #CJK UNIFIED IDEOGRAPH + {0xFDF1, 0x5E0C}, //17035 #CJK UNIFIED IDEOGRAPH + {0xFDF2, 0x6199}, //17036 #CJK UNIFIED IDEOGRAPH + {0xFDF3, 0x6198}, //17037 #CJK UNIFIED IDEOGRAPH + {0xFDF4, 0x6231}, //17038 #CJK UNIFIED IDEOGRAPH + {0xFDF5, 0x665E}, //17039 #CJK UNIFIED IDEOGRAPH + {0xFDF6, 0x66E6}, //17040 #CJK UNIFIED IDEOGRAPH + {0xFDF7, 0x7199}, //17041 #CJK UNIFIED IDEOGRAPH + {0xFDF8, 0x71B9}, //17042 #CJK UNIFIED IDEOGRAPH + {0xFDF9, 0x71BA}, //17043 #CJK UNIFIED IDEOGRAPH + {0xFDFA, 0x72A7}, //17044 #CJK UNIFIED IDEOGRAPH + {0xFDFB, 0x79A7}, //17045 #CJK UNIFIED IDEOGRAPH + {0xFDFC, 0x7A00}, //17046 #CJK UNIFIED IDEOGRAPH + {0xFDFD, 0x7FB2}, //17047 #CJK UNIFIED IDEOGRAPH + {0xFDFE, 0x8A70}, //17048 #CJK UNIFIED IDEOGRAPH +}; + +#endif // DRW_CPTABLE949_H diff --git a/lib_dxf/intern/drw_cptable950.h b/lib_dxf/intern/drw_cptable950.h new file mode 100644 index 0000000000..2afb89d065 --- /dev/null +++ b/lib_dxf/intern/drw_cptable950.h @@ -0,0 +1,13654 @@ +#ifndef DRW_CPTABLE950_H +#define DRW_CPTABLE950_H + +//Chinese (Taiwan, Hong Kong SAR) + +//first entry in this table are 0x80 +#define CPOFFSET950 0x80 +#define CPLENGHT950 13503 +#define NOTFOUND950 0x003F + +//Table 950 one byte +static const int DRW_Table950[1] = { +}; + +//Table 950 lead byte +//pairs of start/end in DRW_DoubleTable950 +static const int DRW_LeadTable950[] = { + 0, //1#DBCS LEAD BYTE 0x81, empty + 0, //2#DBCS LEAD BYTE 0x82, empty + 0, //3#DBCS LEAD BYTE 0x83, empty + 0, //4#DBCS LEAD BYTE 0x84, empty + 0, //5#DBCS LEAD BYTE 0x85, empty + 0, //6#DBCS LEAD BYTE 0x86, empty + 0, //7#DBCS LEAD BYTE 0x87, empty + 0, //8#DBCS LEAD BYTE 0x88, empty + 0, //9#DBCS LEAD BYTE 0x89, empty + 0, //10#DBCS LEAD BYTE 0x8A, empty + 0, //11#DBCS LEAD BYTE 0x8B, empty + 0, //12#DBCS LEAD BYTE 0x8C, empty + 0, //13#DBCS LEAD BYTE 0x8D, empty + 0, //14#DBCS LEAD BYTE 0x8E, empty + 0, //15#DBCS LEAD BYTE 0x8F, empty + 0, //16#DBCS LEAD BYTE 0x90, empty + 0, //17#DBCS LEAD BYTE 0x91, empty + 0, //18#DBCS LEAD BYTE 0x92, empty + 0, //19#DBCS LEAD BYTE 0x93, empty + 0, //20#DBCS LEAD BYTE 0x94, empty + 0, //21#DBCS LEAD BYTE 0x95, empty + 0, //22#DBCS LEAD BYTE 0x96, empty + 0, //23#DBCS LEAD BYTE 0x97, empty + 0, //24#DBCS LEAD BYTE 0x98, empty + 0, //25#DBCS LEAD BYTE 0x99, empty + 0, //26#DBCS LEAD BYTE 0x9A, empty + 0, //27#DBCS LEAD BYTE 0x9B, empty + 0, //28#DBCS LEAD BYTE 0x9C, empty + 0, //29#DBCS LEAD BYTE 0x9D, empty + 0, //30#DBCS LEAD BYTE 0x9E, empty + 0, //31#DBCS LEAD BYTE 0x9F, empty + 0, //32#DBCS LEAD BYTE 0xA0, empty + 0, //33#DBCS LEAD BYTE 0xA1 + 157, //34#DBCS LEAD BYTE 0xA2 + 314, //35#DBCS LEAD BYTE 0xA3 + 409, //36#DBCS LEAD BYTE 0xA4 + 566, //37#DBCS LEAD BYTE 0xA5 + 723, //38#DBCS LEAD BYTE 0xA6 + 880, //39#DBCS LEAD BYTE 0xA7 + 1037, //40#DBCS LEAD BYTE 0xA8 + 1194, //41#DBCS LEAD BYTE 0xA9 + 1351, //42#DBCS LEAD BYTE 0xAA + 1508, //43#DBCS LEAD BYTE 0xAB + 1665, //44#DBCS LEAD BYTE 0xAC + 1822, //45#DBCS LEAD BYTE 0xAD + 1979, //46#DBCS LEAD BYTE 0xAE + 2136, //47#DBCS LEAD BYTE 0xAF + 2293, //48#DBCS LEAD BYTE 0xB0 + 2450, //49#DBCS LEAD BYTE 0xB1 + 2607, //50#DBCS LEAD BYTE 0xB2 + 2764, //51#DBCS LEAD BYTE 0xB3 + 2921, //52#DBCS LEAD BYTE 0xB4 + 3078, //53#DBCS LEAD BYTE 0xB5 + 3235, //54#DBCS LEAD BYTE 0xB6 + 3392, //55#DBCS LEAD BYTE 0xB7 + 3549, //56#DBCS LEAD BYTE 0xB8 + 3706, //57#DBCS LEAD BYTE 0xB9 + 3863, //58#DBCS LEAD BYTE 0xBA + 4020, //59#DBCS LEAD BYTE 0xBB + 4177, //60#DBCS LEAD BYTE 0xBC + 4334, //61#DBCS LEAD BYTE 0xBD + 4491, //62#DBCS LEAD BYTE 0xBE + 4648, //63#DBCS LEAD BYTE 0xBF + 4805, //64#DBCS LEAD BYTE 0xC0 + 4962, //65#DBCS LEAD BYTE 0xC1 + 5119, //66#DBCS LEAD BYTE 0xC2 + 5276, //67#DBCS LEAD BYTE 0xC3 + 5443, //68#DBCS LEAD BYTE 0xC4 + 5590, //69#DBCS LEAD BYTE 0xC5 + 5747, //70#DBCS LEAD BYTE 0xC6 + 5810, //71#DBCS LEAD BYTE 0xC7, empty + 5810, //72#DBCS LEAD BYTE 0xC8, empty + 5810, //73#DBCS LEAD BYTE 0xC9 + 5967, //74#DBCS LEAD BYTE 0xCA + 6124, //75#DBCS LEAD BYTE 0xCB + 6281, //76#DBCS LEAD BYTE 0xCC + 6438, //77#DBCS LEAD BYTE 0xCD + 6595, //78#DBCS LEAD BYTE 0xCE + 6752, //79#DBCS LEAD BYTE 0xCF + 6909, //80#DBCS LEAD BYTE 0xD0 + 7066, //81#DBCS LEAD BYTE 0xD1 + 7223, //82#DBCS LEAD BYTE 0xD2 + 7380, //83#DBCS LEAD BYTE 0xD3 + 7537, //84#DBCS LEAD BYTE 0xD4 + 7694, //85#DBCS LEAD BYTE 0xD5 + 7851, //86#DBCS LEAD BYTE 0xD6 + 8008, //87#DBCS LEAD BYTE 0xD7 + 8165, //88#DBCS LEAD BYTE 0xD8 + 8322, //89#DBCS LEAD BYTE 0xD9 + 8479, //90#DBCS LEAD BYTE 0xDA + 8636, //91#DBCS LEAD BYTE 0xDB + 8793, //92#DBCS LEAD BYTE 0xDC + 8950, //93#DBCS LEAD BYTE 0xDD + 9107, //94#DBCS LEAD BYTE 0xDE + 9264, //95#DBCS LEAD BYTE 0xDF + 9421, //96#DBCS LEAD BYTE 0xE0 + 9578, //97#DBCS LEAD BYTE 0xE1 + 9735, //98#DBCS LEAD BYTE 0xE2 + 9892, //99#DBCS LEAD BYTE 0xE3 + 10049, //100#DBCS LEAD BYTE 0xE4 + 10206, //101#DBCS LEAD BYTE 0xE5 + 10363, //102#DBCS LEAD BYTE 0xE6 + 10520, //103#DBCS LEAD BYTE 0xE7 + 10677, //104#DBCS LEAD BYTE 0xE8 + 10834, //105#DBCS LEAD BYTE 0xE9 + 10991, //106#DBCS LEAD BYTE 0xEA + 11148, //107#DBCS LEAD BYTE 0xEB + 11305, //108#DBCS LEAD BYTE 0xEC + 11462, //109#DBCS LEAD BYTE 0xED + 11619, //110#DBCS LEAD BYTE 0xEE + 11776, //111#DBCS LEAD BYTE 0xEF + 11933, //112#DBCS LEAD BYTE 0xF0 + 12090, //113#DBCS LEAD BYTE 0xF1 + 12247, //114#DBCS LEAD BYTE 0xF2 + 12404, //115#DBCS LEAD BYTE 0xF3 + 12561, //116#DBCS LEAD BYTE 0xF4 + 12718, //117#DBCS LEAD BYTE 0xF5 + 12875, //118#DBCS LEAD BYTE 0xF6 + 13032, //119#DBCS LEAD BYTE 0xF7 + 13189, //120#DBCS LEAD BYTE 0xF8 + 13346, //121#DBCS LEAD BYTE 0xF9 + 13502, //122#DBCS LEAD BYTE 0xFA, empty + 13502, //123#DBCS LEAD BYTE 0xFB, empty + 13502, //124#DBCS LEAD BYTE 0xFC, empty + 13502, //125#DBCS LEAD BYTE 0xFD, empty + 13502, //126#DBCS LEAD BYTE 0xFE, empty + 13502, //127#UNDEFINED 0xFF, END OF TABLE +}; + +//Table 950 tail byte +static const int DRW_DoubleTable950[][2] = { + {0xA140, 0x3000}, //1 #IDEOGRAPHIC SPACE + {0xA141, 0xFF0C}, //2 #FULLWIDTH COMMA + {0xA142, 0x3001}, //3 #IDEOGRAPHIC COMMA + {0xA143, 0x3002}, //4 #IDEOGRAPHIC FULL STOP + {0xA144, 0xFF0E}, //5 #FULLWIDTH FULL STOP + {0xA145, 0x2027}, //6 #HYPHENATION POINT + {0xA146, 0xFF1B}, //7 #FULLWIDTH SEMICOLON + {0xA147, 0xFF1A}, //8 #FULLWIDTH COLON + {0xA148, 0xFF1F}, //9 #FULLWIDTH QUESTION MARK + {0xA149, 0xFF01}, //10 #FULLWIDTH EXCLAMATION MARK + {0xA14A, 0xFE30}, //11 #PRESENTATION FORM FOR VERTICAL TWO DOT LEADER + {0xA14B, 0x2026}, //12 #HORIZONTAL ELLIPSIS + {0xA14C, 0x2025}, //13 #TWO DOT LEADER + {0xA14D, 0xFE50}, //14 #SMALL COMMA + {0xA14E, 0xFE51}, //15 #SMALL IDEOGRAPHIC COMMA + {0xA14F, 0xFE52}, //16 #SMALL FULL STOP + {0xA150, 0x00B7}, //17 #MIDDLE DOT + {0xA151, 0xFE54}, //18 #SMALL SEMICOLON + {0xA152, 0xFE55}, //19 #SMALL COLON + {0xA153, 0xFE56}, //20 #SMALL QUESTION MARK + {0xA154, 0xFE57}, //21 #SMALL EXCLAMATION MARK + {0xA155, 0xFF5C}, //22 #FULLWIDTH VERTICAL LINE + {0xA156, 0x2013}, //23 #EN DASH + {0xA157, 0xFE31}, //24 #PRESENTATION FORM FOR VERTICAL EM DASH + {0xA158, 0x2014}, //25 #EM DASH + {0xA159, 0xFE33}, //26 #PRESENTATION FORM FOR VERTICAL LOW LINE + {0xA15A, 0x2574}, //27 #BOX DRAWINGS LIGHT LEFT + {0xA15B, 0xFE34}, //28 #PRESENTATION FORM FOR VERTICAL WAVY LOW LINE + {0xA15C, 0xFE4F}, //29 #WAVY LOW LINE + {0xA15D, 0xFF08}, //30 #FULLWIDTH LEFT PARENTHESIS + {0xA15E, 0xFF09}, //31 #FULLWIDTH RIGHT PARENTHESIS + {0xA15F, 0xFE35}, //32 #PRESENTATION FORM FOR VERTICAL LEFT PARENTHESIS + {0xA160, 0xFE36}, //33 #PRESENTATION FORM FOR VERTICAL RIGHT PARENTHESIS + {0xA161, 0xFF5B}, //34 #FULLWIDTH LEFT CURLY BRACKET + {0xA162, 0xFF5D}, //35 #FULLWIDTH RIGHT CURLY BRACKET + {0xA163, 0xFE37}, //36 #PRESENTATION FORM FOR VERTICAL LEFT CURLY BRACKET + {0xA164, 0xFE38}, //37 #PRESENTATION FORM FOR VERTICAL RIGHT CURLY BRACKET + {0xA165, 0x3014}, //38 #LEFT TORTOISE SHELL BRACKET + {0xA166, 0x3015}, //39 #RIGHT TORTOISE SHELL BRACKET + {0xA167, 0xFE39}, //40 #PRESENTATION FORM FOR VERTICAL LEFT TORTOISE SHELL BRACKET + {0xA168, 0xFE3A}, //41 #PRESENTATION FORM FOR VERTICAL RIGHT TORTOISE SHELL BRACKET + {0xA169, 0x3010}, //42 #LEFT BLACK LENTICULAR BRACKET + {0xA16A, 0x3011}, //43 #RIGHT BLACK LENTICULAR BRACKET + {0xA16B, 0xFE3B}, //44 #PRESENTATION FORM FOR VERTICAL LEFT BLACK LENTICULAR BRACKET + {0xA16C, 0xFE3C}, //45 #PRESENTATION FORM FOR VERTICAL RIGHT BLACK LENTICULAR BRACKET + {0xA16D, 0x300A}, //46 #LEFT DOUBLE ANGLE BRACKET + {0xA16E, 0x300B}, //47 #RIGHT DOUBLE ANGLE BRACKET + {0xA16F, 0xFE3D}, //48 #PRESENTATION FORM FOR VERTICAL LEFT DOUBLE ANGLE BRACKET + {0xA170, 0xFE3E}, //49 #PRESENTATION FORM FOR VERTICAL RIGHT DOUBLE ANGLE BRACKET + {0xA171, 0x3008}, //50 #LEFT ANGLE BRACKET + {0xA172, 0x3009}, //51 #RIGHT ANGLE BRACKET + {0xA173, 0xFE3F}, //52 #PRESENTATION FORM FOR VERTICAL LEFT ANGLE BRACKET + {0xA174, 0xFE40}, //53 #PRESENTATION FORM FOR VERTICAL RIGHT ANGLE BRACKET + {0xA175, 0x300C}, //54 #LEFT CORNER BRACKET + {0xA176, 0x300D}, //55 #RIGHT CORNER BRACKET + {0xA177, 0xFE41}, //56 #PRESENTATION FORM FOR VERTICAL LEFT CORNER BRACKET + {0xA178, 0xFE42}, //57 #PRESENTATION FORM FOR VERTICAL RIGHT CORNER BRACKET + {0xA179, 0x300E}, //58 #LEFT WHITE CORNER BRACKET + {0xA17A, 0x300F}, //59 #RIGHT WHITE CORNER BRACKET + {0xA17B, 0xFE43}, //60 #PRESENTATION FORM FOR VERTICAL LEFT WHITE CORNER BRACKET + {0xA17C, 0xFE44}, //61 #PRESENTATION FORM FOR VERTICAL RIGHT WHITE CORNER BRACKET + {0xA17D, 0xFE59}, //62 #SMALL LEFT PARENTHESIS + {0xA17E, 0xFE5A}, //63 #SMALL RIGHT PARENTHESIS + {0xA1A1, 0xFE5B}, //64 #SMALL LEFT CURLY BRACKET + {0xA1A2, 0xFE5C}, //65 #SMALL RIGHT CURLY BRACKET + {0xA1A3, 0xFE5D}, //66 #SMALL LEFT TORTOISE SHELL BRACKET + {0xA1A4, 0xFE5E}, //67 #SMALL RIGHT TORTOISE SHELL BRACKET + {0xA1A5, 0x2018}, //68 #LEFT SINGLE QUOTATION MARK + {0xA1A6, 0x2019}, //69 #RIGHT SINGLE QUOTATION MARK + {0xA1A7, 0x201C}, //70 #LEFT DOUBLE QUOTATION MARK + {0xA1A8, 0x201D}, //71 #RIGHT DOUBLE QUOTATION MARK + {0xA1A9, 0x301D}, //72 #REVERSED DOUBLE PRIME QUOTATION MARK + {0xA1AA, 0x301E}, //73 #DOUBLE PRIME QUOTATION MARK + {0xA1AB, 0x2035}, //74 #REVERSED PRIME + {0xA1AC, 0x2032}, //75 #PRIME + {0xA1AD, 0xFF03}, //76 #FULLWIDTH NUMBER SIGN + {0xA1AE, 0xFF06}, //77 #FULLWIDTH AMPERSAND + {0xA1AF, 0xFF0A}, //78 #FULLWIDTH ASTERISK + {0xA1B0, 0x203B}, //79 #REFERENCE MARK + {0xA1B1, 0x00A7}, //80 #SECTION SIGN + {0xA1B2, 0x3003}, //81 #DITTO MARK + {0xA1B3, 0x25CB}, //82 #WHITE CIRCLE + {0xA1B4, 0x25CF}, //83 #BLACK CIRCLE + {0xA1B5, 0x25B3}, //84 #WHITE UP-POINTING TRIANGLE + {0xA1B6, 0x25B2}, //85 #BLACK UP-POINTING TRIANGLE + {0xA1B7, 0x25CE}, //86 #BULLSEYE + {0xA1B8, 0x2606}, //87 #WHITE STAR + {0xA1B9, 0x2605}, //88 #BLACK STAR + {0xA1BA, 0x25C7}, //89 #WHITE DIAMOND + {0xA1BB, 0x25C6}, //90 #BLACK DIAMOND + {0xA1BC, 0x25A1}, //91 #WHITE SQUARE + {0xA1BD, 0x25A0}, //92 #BLACK SQUARE + {0xA1BE, 0x25BD}, //93 #WHITE DOWN-POINTING TRIANGLE + {0xA1BF, 0x25BC}, //94 #BLACK DOWN-POINTING TRIANGLE + {0xA1C0, 0x32A3}, //95 #CIRCLED IDEOGRAPH CORRECT + {0xA1C1, 0x2105}, //96 #CARE OF + {0xA1C2, 0x00AF}, //97 #MACRON + {0xA1C3, 0xFFE3}, //98 #FULLWIDTH MACRON + {0xA1C4, 0xFF3F}, //99 #FULLWIDTH LOW LINE + {0xA1C5, 0x02CD}, //100 #MODIFIER LETTER LOW MACRON + {0xA1C6, 0xFE49}, //101 #DASHED OVERLINE + {0xA1C7, 0xFE4A}, //102 #CENTRELINE OVERLINE + {0xA1C8, 0xFE4D}, //103 #DASHED LOW LINE + {0xA1C9, 0xFE4E}, //104 #CENTRELINE LOW LINE + {0xA1CA, 0xFE4B}, //105 #WAVY OVERLINE + {0xA1CB, 0xFE4C}, //106 #DOUBLE WAVY OVERLINE + {0xA1CC, 0xFE5F}, //107 #SMALL NUMBER SIGN + {0xA1CD, 0xFE60}, //108 #SMALL AMPERSAND + {0xA1CE, 0xFE61}, //109 #SMALL ASTERISK + {0xA1CF, 0xFF0B}, //110 #FULLWIDTH PLUS SIGN + {0xA1D0, 0xFF0D}, //111 #FULLWIDTH HYPHEN-MINUS + {0xA1D1, 0x00D7}, //112 #MULTIPLICATION SIGN + {0xA1D2, 0x00F7}, //113 #DIVISION SIGN + {0xA1D3, 0x00B1}, //114 #PLUS-MINUS SIGN + {0xA1D4, 0x221A}, //115 #SQUARE ROOT + {0xA1D5, 0xFF1C}, //116 #FULLWIDTH LESS-THAN SIGN + {0xA1D6, 0xFF1E}, //117 #FULLWIDTH GREATER-THAN SIGN + {0xA1D7, 0xFF1D}, //118 #FULLWIDTH EQUALS SIGN + {0xA1D8, 0x2266}, //119 #LESS-THAN OVER EQUAL TO + {0xA1D9, 0x2267}, //120 #GREATER-THAN OVER EQUAL TO + {0xA1DA, 0x2260}, //121 #NOT EQUAL TO + {0xA1DB, 0x221E}, //122 #INFINITY + {0xA1DC, 0x2252}, //123 #APPROXIMATELY EQUAL TO OR THE IMAGE OF + {0xA1DD, 0x2261}, //124 #IDENTICAL TO + {0xA1DE, 0xFE62}, //125 #SMALL PLUS SIGN + {0xA1DF, 0xFE63}, //126 #SMALL HYPHEN-MINUS + {0xA1E0, 0xFE64}, //127 #SMALL LESS-THAN SIGN + {0xA1E1, 0xFE65}, //128 #SMALL GREATER-THAN SIGN + {0xA1E2, 0xFE66}, //129 #SMALL EQUALS SIGN + {0xA1E3, 0xFF5E}, //130 #FULLWIDTH TILDE + {0xA1E4, 0x2229}, //131 #INTERSECTION + {0xA1E5, 0x222A}, //132 #UNION + {0xA1E6, 0x22A5}, //133 #UP TACK + {0xA1E7, 0x2220}, //134 #ANGLE + {0xA1E8, 0x221F}, //135 #RIGHT ANGLE + {0xA1E9, 0x22BF}, //136 #RIGHT TRIANGLE + {0xA1EA, 0x33D2}, //137 #SQUARE LOG + {0xA1EB, 0x33D1}, //138 #SQUARE LN + {0xA1EC, 0x222B}, //139 #INTEGRAL + {0xA1ED, 0x222E}, //140 #CONTOUR INTEGRAL + {0xA1EE, 0x2235}, //141 #BECAUSE + {0xA1EF, 0x2234}, //142 #THEREFORE + {0xA1F0, 0x2640}, //143 #FEMALE SIGN + {0xA1F1, 0x2642}, //144 #MALE SIGN + {0xA1F2, 0x2295}, //145 #CIRCLED PLUS + {0xA1F3, 0x2299}, //146 #CIRCLED DOT OPERATOR + {0xA1F4, 0x2191}, //147 #UPWARDS ARROW + {0xA1F5, 0x2193}, //148 #DOWNWARDS ARROW + {0xA1F6, 0x2190}, //149 #LEFTWARDS ARROW + {0xA1F7, 0x2192}, //150 #RIGHTWARDS ARROW + {0xA1F8, 0x2196}, //151 #NORTH WEST ARROW + {0xA1F9, 0x2197}, //152 #NORTH EAST ARROW + {0xA1FA, 0x2199}, //153 #SOUTH WEST ARROW + {0xA1FB, 0x2198}, //154 #SOUTH EAST ARROW + {0xA1FC, 0x2225}, //155 #PARALLEL TO + {0xA1FD, 0x2223}, //156 #DIVIDES + {0xA1FE, 0xFF0F}, //157 #FULLWIDTH SOLIDUS + {0xA240, 0xFF3C}, //158 #FULLWIDTH REVERSE SOLIDUS + {0xA241, 0x2215}, //159 #DIVISION SLASH + {0xA242, 0xFE68}, //160 #SMALL REVERSE SOLIDUS + {0xA243, 0xFF04}, //161 #FULLWIDTH DOLLAR SIGN + {0xA244, 0xFFE5}, //162 #FULLWIDTH YEN SIGN + {0xA245, 0x3012}, //163 #POSTAL MARK + {0xA246, 0xFFE0}, //164 #FULLWIDTH CENT SIGN + {0xA247, 0xFFE1}, //165 #FULLWIDTH POUND SIGN + {0xA248, 0xFF05}, //166 #FULLWIDTH PERCENT SIGN + {0xA249, 0xFF20}, //167 #FULLWIDTH COMMERCIAL AT + {0xA24A, 0x2103}, //168 #DEGREE CELSIUS + {0xA24B, 0x2109}, //169 #DEGREE FAHRENHEIT + {0xA24C, 0xFE69}, //170 #SMALL DOLLAR SIGN + {0xA24D, 0xFE6A}, //171 #SMALL PERCENT SIGN + {0xA24E, 0xFE6B}, //172 #SMALL COMMERCIAL AT + {0xA24F, 0x33D5}, //173 #SQUARE MIL + {0xA250, 0x339C}, //174 #SQUARE MM + {0xA251, 0x339D}, //175 #SQUARE CM + {0xA252, 0x339E}, //176 #SQUARE KM + {0xA253, 0x33CE}, //177 #SQUARE KM CAPITAL + {0xA254, 0x33A1}, //178 #SQUARE M SQUARED + {0xA255, 0x338E}, //179 #SQUARE MG + {0xA256, 0x338F}, //180 #SQUARE KG + {0xA257, 0x33C4}, //181 #SQUARE CC + {0xA258, 0x00B0}, //182 #DEGREE SIGN + {0xA259, 0x5159}, //183 #CJK UNIFIED IDEOGRAPH + {0xA25A, 0x515B}, //184 #CJK UNIFIED IDEOGRAPH + {0xA25B, 0x515E}, //185 #CJK UNIFIED IDEOGRAPH + {0xA25C, 0x515D}, //186 #CJK UNIFIED IDEOGRAPH + {0xA25D, 0x5161}, //187 #CJK UNIFIED IDEOGRAPH + {0xA25E, 0x5163}, //188 #CJK UNIFIED IDEOGRAPH + {0xA25F, 0x55E7}, //189 #CJK UNIFIED IDEOGRAPH + {0xA260, 0x74E9}, //190 #CJK UNIFIED IDEOGRAPH + {0xA261, 0x7CCE}, //191 #CJK UNIFIED IDEOGRAPH + {0xA262, 0x2581}, //192 #LOWER ONE EIGHTH BLOCK + {0xA263, 0x2582}, //193 #LOWER ONE QUARTER BLOCK + {0xA264, 0x2583}, //194 #LOWER THREE EIGHTHS BLOCK + {0xA265, 0x2584}, //195 #LOWER HALF BLOCK + {0xA266, 0x2585}, //196 #LOWER FIVE EIGHTHS BLOCK + {0xA267, 0x2586}, //197 #LOWER THREE QUARTERS BLOCK + {0xA268, 0x2587}, //198 #LOWER SEVEN EIGHTHS BLOCK + {0xA269, 0x2588}, //199 #FULL BLOCK + {0xA26A, 0x258F}, //200 #LEFT ONE EIGHTH BLOCK + {0xA26B, 0x258E}, //201 #LEFT ONE QUARTER BLOCK + {0xA26C, 0x258D}, //202 #LEFT THREE EIGHTHS BLOCK + {0xA26D, 0x258C}, //203 #LEFT HALF BLOCK + {0xA26E, 0x258B}, //204 #LEFT FIVE EIGHTHS BLOCK + {0xA26F, 0x258A}, //205 #LEFT THREE QUARTERS BLOCK + {0xA270, 0x2589}, //206 #LEFT SEVEN EIGHTHS BLOCK + {0xA271, 0x253C}, //207 #BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL + {0xA272, 0x2534}, //208 #BOX DRAWINGS LIGHT UP AND HORIZONTAL + {0xA273, 0x252C}, //209 #BOX DRAWINGS LIGHT DOWN AND HORIZONTAL + {0xA274, 0x2524}, //210 #BOX DRAWINGS LIGHT VERTICAL AND LEFT + {0xA275, 0x251C}, //211 #BOX DRAWINGS LIGHT VERTICAL AND RIGHT + {0xA276, 0x2594}, //212 #UPPER ONE EIGHTH BLOCK + {0xA277, 0x2500}, //213 #BOX DRAWINGS LIGHT HORIZONTAL + {0xA278, 0x2502}, //214 #BOX DRAWINGS LIGHT VERTICAL + {0xA279, 0x2595}, //215 #RIGHT ONE EIGHTH BLOCK + {0xA27A, 0x250C}, //216 #BOX DRAWINGS LIGHT DOWN AND RIGHT + {0xA27B, 0x2510}, //217 #BOX DRAWINGS LIGHT DOWN AND LEFT + {0xA27C, 0x2514}, //218 #BOX DRAWINGS LIGHT UP AND RIGHT + {0xA27D, 0x2518}, //219 #BOX DRAWINGS LIGHT UP AND LEFT + {0xA27E, 0x256D}, //220 #BOX DRAWINGS LIGHT ARC DOWN AND RIGHT + {0xA2A1, 0x256E}, //221 #BOX DRAWINGS LIGHT ARC DOWN AND LEFT + {0xA2A2, 0x2570}, //222 #BOX DRAWINGS LIGHT ARC UP AND RIGHT + {0xA2A3, 0x256F}, //223 #BOX DRAWINGS LIGHT ARC UP AND LEFT + {0xA2A4, 0x2550}, //224 #BOX DRAWINGS DOUBLE HORIZONTAL + {0xA2A5, 0x255E}, //225 #BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE + {0xA2A6, 0x256A}, //226 #BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE + {0xA2A7, 0x2561}, //227 #BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE + {0xA2A8, 0x25E2}, //228 #BLACK LOWER RIGHT TRIANGLE + {0xA2A9, 0x25E3}, //229 #BLACK LOWER LEFT TRIANGLE + {0xA2AA, 0x25E5}, //230 #BLACK UPPER RIGHT TRIANGLE + {0xA2AB, 0x25E4}, //231 #BLACK UPPER LEFT TRIANGLE + {0xA2AC, 0x2571}, //232 #BOX DRAWINGS LIGHT DIAGONAL UPPER RIGHT TO LOWER LEFT + {0xA2AD, 0x2572}, //233 #BOX DRAWINGS LIGHT DIAGONAL UPPER LEFT TO LOWER RIGHT + {0xA2AE, 0x2573}, //234 #BOX DRAWINGS LIGHT DIAGONAL CROSS + {0xA2AF, 0xFF10}, //235 #FULLWIDTH DIGIT ZERO + {0xA2B0, 0xFF11}, //236 #FULLWIDTH DIGIT ONE + {0xA2B1, 0xFF12}, //237 #FULLWIDTH DIGIT TWO + {0xA2B2, 0xFF13}, //238 #FULLWIDTH DIGIT THREE + {0xA2B3, 0xFF14}, //239 #FULLWIDTH DIGIT FOUR + {0xA2B4, 0xFF15}, //240 #FULLWIDTH DIGIT FIVE + {0xA2B5, 0xFF16}, //241 #FULLWIDTH DIGIT SIX + {0xA2B6, 0xFF17}, //242 #FULLWIDTH DIGIT SEVEN + {0xA2B7, 0xFF18}, //243 #FULLWIDTH DIGIT EIGHT + {0xA2B8, 0xFF19}, //244 #FULLWIDTH DIGIT NINE + {0xA2B9, 0x2160}, //245 #ROMAN NUMERAL ONE + {0xA2BA, 0x2161}, //246 #ROMAN NUMERAL TWO + {0xA2BB, 0x2162}, //247 #ROMAN NUMERAL THREE + {0xA2BC, 0x2163}, //248 #ROMAN NUMERAL FOUR + {0xA2BD, 0x2164}, //249 #ROMAN NUMERAL FIVE + {0xA2BE, 0x2165}, //250 #ROMAN NUMERAL SIX + {0xA2BF, 0x2166}, //251 #ROMAN NUMERAL SEVEN + {0xA2C0, 0x2167}, //252 #ROMAN NUMERAL EIGHT + {0xA2C1, 0x2168}, //253 #ROMAN NUMERAL NINE + {0xA2C2, 0x2169}, //254 #ROMAN NUMERAL TEN + {0xA2C3, 0x3021}, //255 #HANGZHOU NUMERAL ONE + {0xA2C4, 0x3022}, //256 #HANGZHOU NUMERAL TWO + {0xA2C5, 0x3023}, //257 #HANGZHOU NUMERAL THREE + {0xA2C6, 0x3024}, //258 #HANGZHOU NUMERAL FOUR + {0xA2C7, 0x3025}, //259 #HANGZHOU NUMERAL FIVE + {0xA2C8, 0x3026}, //260 #HANGZHOU NUMERAL SIX + {0xA2C9, 0x3027}, //261 #HANGZHOU NUMERAL SEVEN + {0xA2CA, 0x3028}, //262 #HANGZHOU NUMERAL EIGHT + {0xA2CB, 0x3029}, //263 #HANGZHOU NUMERAL NINE + {0xA2CC, 0x5341}, //264 #CJK UNIFIED IDEOGRAPH + {0xA2CD, 0x5344}, //265 #CJK UNIFIED IDEOGRAPH + {0xA2CE, 0x5345}, //266 #CJK UNIFIED IDEOGRAPH + {0xA2CF, 0xFF21}, //267 #FULLWIDTH LATIN CAPITAL LETTER A + {0xA2D0, 0xFF22}, //268 #FULLWIDTH LATIN CAPITAL LETTER B + {0xA2D1, 0xFF23}, //269 #FULLWIDTH LATIN CAPITAL LETTER C + {0xA2D2, 0xFF24}, //270 #FULLWIDTH LATIN CAPITAL LETTER D + {0xA2D3, 0xFF25}, //271 #FULLWIDTH LATIN CAPITAL LETTER E + {0xA2D4, 0xFF26}, //272 #FULLWIDTH LATIN CAPITAL LETTER F + {0xA2D5, 0xFF27}, //273 #FULLWIDTH LATIN CAPITAL LETTER G + {0xA2D6, 0xFF28}, //274 #FULLWIDTH LATIN CAPITAL LETTER H + {0xA2D7, 0xFF29}, //275 #FULLWIDTH LATIN CAPITAL LETTER I + {0xA2D8, 0xFF2A}, //276 #FULLWIDTH LATIN CAPITAL LETTER J + {0xA2D9, 0xFF2B}, //277 #FULLWIDTH LATIN CAPITAL LETTER K + {0xA2DA, 0xFF2C}, //278 #FULLWIDTH LATIN CAPITAL LETTER L + {0xA2DB, 0xFF2D}, //279 #FULLWIDTH LATIN CAPITAL LETTER M + {0xA2DC, 0xFF2E}, //280 #FULLWIDTH LATIN CAPITAL LETTER N + {0xA2DD, 0xFF2F}, //281 #FULLWIDTH LATIN CAPITAL LETTER O + {0xA2DE, 0xFF30}, //282 #FULLWIDTH LATIN CAPITAL LETTER P + {0xA2DF, 0xFF31}, //283 #FULLWIDTH LATIN CAPITAL LETTER Q + {0xA2E0, 0xFF32}, //284 #FULLWIDTH LATIN CAPITAL LETTER R + {0xA2E1, 0xFF33}, //285 #FULLWIDTH LATIN CAPITAL LETTER S + {0xA2E2, 0xFF34}, //286 #FULLWIDTH LATIN CAPITAL LETTER T + {0xA2E3, 0xFF35}, //287 #FULLWIDTH LATIN CAPITAL LETTER U + {0xA2E4, 0xFF36}, //288 #FULLWIDTH LATIN CAPITAL LETTER V + {0xA2E5, 0xFF37}, //289 #FULLWIDTH LATIN CAPITAL LETTER W + {0xA2E6, 0xFF38}, //290 #FULLWIDTH LATIN CAPITAL LETTER X + {0xA2E7, 0xFF39}, //291 #FULLWIDTH LATIN CAPITAL LETTER Y + {0xA2E8, 0xFF3A}, //292 #FULLWIDTH LATIN CAPITAL LETTER Z + {0xA2E9, 0xFF41}, //293 #FULLWIDTH LATIN SMALL LETTER A + {0xA2EA, 0xFF42}, //294 #FULLWIDTH LATIN SMALL LETTER B + {0xA2EB, 0xFF43}, //295 #FULLWIDTH LATIN SMALL LETTER C + {0xA2EC, 0xFF44}, //296 #FULLWIDTH LATIN SMALL LETTER D + {0xA2ED, 0xFF45}, //297 #FULLWIDTH LATIN SMALL LETTER E + {0xA2EE, 0xFF46}, //298 #FULLWIDTH LATIN SMALL LETTER F + {0xA2EF, 0xFF47}, //299 #FULLWIDTH LATIN SMALL LETTER G + {0xA2F0, 0xFF48}, //300 #FULLWIDTH LATIN SMALL LETTER H + {0xA2F1, 0xFF49}, //301 #FULLWIDTH LATIN SMALL LETTER I + {0xA2F2, 0xFF4A}, //302 #FULLWIDTH LATIN SMALL LETTER J + {0xA2F3, 0xFF4B}, //303 #FULLWIDTH LATIN SMALL LETTER K + {0xA2F4, 0xFF4C}, //304 #FULLWIDTH LATIN SMALL LETTER L + {0xA2F5, 0xFF4D}, //305 #FULLWIDTH LATIN SMALL LETTER M + {0xA2F6, 0xFF4E}, //306 #FULLWIDTH LATIN SMALL LETTER N + {0xA2F7, 0xFF4F}, //307 #FULLWIDTH LATIN SMALL LETTER O + {0xA2F8, 0xFF50}, //308 #FULLWIDTH LATIN SMALL LETTER P + {0xA2F9, 0xFF51}, //309 #FULLWIDTH LATIN SMALL LETTER Q + {0xA2FA, 0xFF52}, //310 #FULLWIDTH LATIN SMALL LETTER R + {0xA2FB, 0xFF53}, //311 #FULLWIDTH LATIN SMALL LETTER S + {0xA2FC, 0xFF54}, //312 #FULLWIDTH LATIN SMALL LETTER T + {0xA2FD, 0xFF55}, //313 #FULLWIDTH LATIN SMALL LETTER U + {0xA2FE, 0xFF56}, //314 #FULLWIDTH LATIN SMALL LETTER V + {0xA340, 0xFF57}, //315 #FULLWIDTH LATIN SMALL LETTER W + {0xA341, 0xFF58}, //316 #FULLWIDTH LATIN SMALL LETTER X + {0xA342, 0xFF59}, //317 #FULLWIDTH LATIN SMALL LETTER Y + {0xA343, 0xFF5A}, //318 #FULLWIDTH LATIN SMALL LETTER Z + {0xA344, 0x0391}, //319 #GREEK CAPITAL LETTER ALPHA + {0xA345, 0x0392}, //320 #GREEK CAPITAL LETTER BETA + {0xA346, 0x0393}, //321 #GREEK CAPITAL LETTER GAMMA + {0xA347, 0x0394}, //322 #GREEK CAPITAL LETTER DELTA + {0xA348, 0x0395}, //323 #GREEK CAPITAL LETTER EPSILON + {0xA349, 0x0396}, //324 #GREEK CAPITAL LETTER ZETA + {0xA34A, 0x0397}, //325 #GREEK CAPITAL LETTER ETA + {0xA34B, 0x0398}, //326 #GREEK CAPITAL LETTER THETA + {0xA34C, 0x0399}, //327 #GREEK CAPITAL LETTER IOTA + {0xA34D, 0x039A}, //328 #GREEK CAPITAL LETTER KAPPA + {0xA34E, 0x039B}, //329 #GREEK CAPITAL LETTER LAMDA + {0xA34F, 0x039C}, //330 #GREEK CAPITAL LETTER MU + {0xA350, 0x039D}, //331 #GREEK CAPITAL LETTER NU + {0xA351, 0x039E}, //332 #GREEK CAPITAL LETTER XI + {0xA352, 0x039F}, //333 #GREEK CAPITAL LETTER OMICRON + {0xA353, 0x03A0}, //334 #GREEK CAPITAL LETTER PI + {0xA354, 0x03A1}, //335 #GREEK CAPITAL LETTER RHO + {0xA355, 0x03A3}, //336 #GREEK CAPITAL LETTER SIGMA + {0xA356, 0x03A4}, //337 #GREEK CAPITAL LETTER TAU + {0xA357, 0x03A5}, //338 #GREEK CAPITAL LETTER UPSILON + {0xA358, 0x03A6}, //339 #GREEK CAPITAL LETTER PHI + {0xA359, 0x03A7}, //340 #GREEK CAPITAL LETTER CHI + {0xA35A, 0x03A8}, //341 #GREEK CAPITAL LETTER PSI + {0xA35B, 0x03A9}, //342 #GREEK CAPITAL LETTER OMEGA + {0xA35C, 0x03B1}, //343 #GREEK SMALL LETTER ALPHA + {0xA35D, 0x03B2}, //344 #GREEK SMALL LETTER BETA + {0xA35E, 0x03B3}, //345 #GREEK SMALL LETTER GAMMA + {0xA35F, 0x03B4}, //346 #GREEK SMALL LETTER DELTA + {0xA360, 0x03B5}, //347 #GREEK SMALL LETTER EPSILON + {0xA361, 0x03B6}, //348 #GREEK SMALL LETTER ZETA + {0xA362, 0x03B7}, //349 #GREEK SMALL LETTER ETA + {0xA363, 0x03B8}, //350 #GREEK SMALL LETTER THETA + {0xA364, 0x03B9}, //351 #GREEK SMALL LETTER IOTA + {0xA365, 0x03BA}, //352 #GREEK SMALL LETTER KAPPA + {0xA366, 0x03BB}, //353 #GREEK SMALL LETTER LAMDA + {0xA367, 0x03BC}, //354 #GREEK SMALL LETTER MU + {0xA368, 0x03BD}, //355 #GREEK SMALL LETTER NU + {0xA369, 0x03BE}, //356 #GREEK SMALL LETTER XI + {0xA36A, 0x03BF}, //357 #GREEK SMALL LETTER OMICRON + {0xA36B, 0x03C0}, //358 #GREEK SMALL LETTER PI + {0xA36C, 0x03C1}, //359 #GREEK SMALL LETTER RHO + {0xA36D, 0x03C3}, //360 #GREEK SMALL LETTER SIGMA + {0xA36E, 0x03C4}, //361 #GREEK SMALL LETTER TAU + {0xA36F, 0x03C5}, //362 #GREEK SMALL LETTER UPSILON + {0xA370, 0x03C6}, //363 #GREEK SMALL LETTER PHI + {0xA371, 0x03C7}, //364 #GREEK SMALL LETTER CHI + {0xA372, 0x03C8}, //365 #GREEK SMALL LETTER PSI + {0xA373, 0x03C9}, //366 #GREEK SMALL LETTER OMEGA + {0xA374, 0x3105}, //367 #BOPOMOFO LETTER B + {0xA375, 0x3106}, //368 #BOPOMOFO LETTER P + {0xA376, 0x3107}, //369 #BOPOMOFO LETTER M + {0xA377, 0x3108}, //370 #BOPOMOFO LETTER F + {0xA378, 0x3109}, //371 #BOPOMOFO LETTER D + {0xA379, 0x310A}, //372 #BOPOMOFO LETTER T + {0xA37A, 0x310B}, //373 #BOPOMOFO LETTER N + {0xA37B, 0x310C}, //374 #BOPOMOFO LETTER L + {0xA37C, 0x310D}, //375 #BOPOMOFO LETTER G + {0xA37D, 0x310E}, //376 #BOPOMOFO LETTER K + {0xA37E, 0x310F}, //377 #BOPOMOFO LETTER H + {0xA3A1, 0x3110}, //378 #BOPOMOFO LETTER J + {0xA3A2, 0x3111}, //379 #BOPOMOFO LETTER Q + {0xA3A3, 0x3112}, //380 #BOPOMOFO LETTER X + {0xA3A4, 0x3113}, //381 #BOPOMOFO LETTER ZH + {0xA3A5, 0x3114}, //382 #BOPOMOFO LETTER CH + {0xA3A6, 0x3115}, //383 #BOPOMOFO LETTER SH + {0xA3A7, 0x3116}, //384 #BOPOMOFO LETTER R + {0xA3A8, 0x3117}, //385 #BOPOMOFO LETTER Z + {0xA3A9, 0x3118}, //386 #BOPOMOFO LETTER C + {0xA3AA, 0x3119}, //387 #BOPOMOFO LETTER S + {0xA3AB, 0x311A}, //388 #BOPOMOFO LETTER A + {0xA3AC, 0x311B}, //389 #BOPOMOFO LETTER O + {0xA3AD, 0x311C}, //390 #BOPOMOFO LETTER E + {0xA3AE, 0x311D}, //391 #BOPOMOFO LETTER EH + {0xA3AF, 0x311E}, //392 #BOPOMOFO LETTER AI + {0xA3B0, 0x311F}, //393 #BOPOMOFO LETTER EI + {0xA3B1, 0x3120}, //394 #BOPOMOFO LETTER AU + {0xA3B2, 0x3121}, //395 #BOPOMOFO LETTER OU + {0xA3B3, 0x3122}, //396 #BOPOMOFO LETTER AN + {0xA3B4, 0x3123}, //397 #BOPOMOFO LETTER EN + {0xA3B5, 0x3124}, //398 #BOPOMOFO LETTER ANG + {0xA3B6, 0x3125}, //399 #BOPOMOFO LETTER ENG + {0xA3B7, 0x3126}, //400 #BOPOMOFO LETTER ER + {0xA3B8, 0x3127}, //401 #BOPOMOFO LETTER I + {0xA3B9, 0x3128}, //402 #BOPOMOFO LETTER U + {0xA3BA, 0x3129}, //403 #BOPOMOFO LETTER IU + {0xA3BB, 0x02D9}, //404 #DOT ABOVE + {0xA3BC, 0x02C9}, //405 #MODIFIER LETTER MACRON + {0xA3BD, 0x02CA}, //406 #MODIFIER LETTER ACUTE ACCENT + {0xA3BE, 0x02C7}, //407 #CARON + {0xA3BF, 0x02CB}, //408 #MODIFIER LETTER GRAVE ACCENT + {0xA3E1, 0x20AC}, //409 #EURO SIGN + {0xA440, 0x4E00}, //410 #CJK UNIFIED IDEOGRAPH + {0xA441, 0x4E59}, //411 #CJK UNIFIED IDEOGRAPH + {0xA442, 0x4E01}, //412 #CJK UNIFIED IDEOGRAPH + {0xA443, 0x4E03}, //413 #CJK UNIFIED IDEOGRAPH + {0xA444, 0x4E43}, //414 #CJK UNIFIED IDEOGRAPH + {0xA445, 0x4E5D}, //415 #CJK UNIFIED IDEOGRAPH + {0xA446, 0x4E86}, //416 #CJK UNIFIED IDEOGRAPH + {0xA447, 0x4E8C}, //417 #CJK UNIFIED IDEOGRAPH + {0xA448, 0x4EBA}, //418 #CJK UNIFIED IDEOGRAPH + {0xA449, 0x513F}, //419 #CJK UNIFIED IDEOGRAPH + {0xA44A, 0x5165}, //420 #CJK UNIFIED IDEOGRAPH + {0xA44B, 0x516B}, //421 #CJK UNIFIED IDEOGRAPH + {0xA44C, 0x51E0}, //422 #CJK UNIFIED IDEOGRAPH + {0xA44D, 0x5200}, //423 #CJK UNIFIED IDEOGRAPH + {0xA44E, 0x5201}, //424 #CJK UNIFIED IDEOGRAPH + {0xA44F, 0x529B}, //425 #CJK UNIFIED IDEOGRAPH + {0xA450, 0x5315}, //426 #CJK UNIFIED IDEOGRAPH + {0xA451, 0x5341}, //427 #CJK UNIFIED IDEOGRAPH + {0xA452, 0x535C}, //428 #CJK UNIFIED IDEOGRAPH + {0xA453, 0x53C8}, //429 #CJK UNIFIED IDEOGRAPH + {0xA454, 0x4E09}, //430 #CJK UNIFIED IDEOGRAPH + {0xA455, 0x4E0B}, //431 #CJK UNIFIED IDEOGRAPH + {0xA456, 0x4E08}, //432 #CJK UNIFIED IDEOGRAPH + {0xA457, 0x4E0A}, //433 #CJK UNIFIED IDEOGRAPH + {0xA458, 0x4E2B}, //434 #CJK UNIFIED IDEOGRAPH + {0xA459, 0x4E38}, //435 #CJK UNIFIED IDEOGRAPH + {0xA45A, 0x51E1}, //436 #CJK UNIFIED IDEOGRAPH + {0xA45B, 0x4E45}, //437 #CJK UNIFIED IDEOGRAPH + {0xA45C, 0x4E48}, //438 #CJK UNIFIED IDEOGRAPH + {0xA45D, 0x4E5F}, //439 #CJK UNIFIED IDEOGRAPH + {0xA45E, 0x4E5E}, //440 #CJK UNIFIED IDEOGRAPH + {0xA45F, 0x4E8E}, //441 #CJK UNIFIED IDEOGRAPH + {0xA460, 0x4EA1}, //442 #CJK UNIFIED IDEOGRAPH + {0xA461, 0x5140}, //443 #CJK UNIFIED IDEOGRAPH + {0xA462, 0x5203}, //444 #CJK UNIFIED IDEOGRAPH + {0xA463, 0x52FA}, //445 #CJK UNIFIED IDEOGRAPH + {0xA464, 0x5343}, //446 #CJK UNIFIED IDEOGRAPH + {0xA465, 0x53C9}, //447 #CJK UNIFIED IDEOGRAPH + {0xA466, 0x53E3}, //448 #CJK UNIFIED IDEOGRAPH + {0xA467, 0x571F}, //449 #CJK UNIFIED IDEOGRAPH + {0xA468, 0x58EB}, //450 #CJK UNIFIED IDEOGRAPH + {0xA469, 0x5915}, //451 #CJK UNIFIED IDEOGRAPH + {0xA46A, 0x5927}, //452 #CJK UNIFIED IDEOGRAPH + {0xA46B, 0x5973}, //453 #CJK UNIFIED IDEOGRAPH + {0xA46C, 0x5B50}, //454 #CJK UNIFIED IDEOGRAPH + {0xA46D, 0x5B51}, //455 #CJK UNIFIED IDEOGRAPH + {0xA46E, 0x5B53}, //456 #CJK UNIFIED IDEOGRAPH + {0xA46F, 0x5BF8}, //457 #CJK UNIFIED IDEOGRAPH + {0xA470, 0x5C0F}, //458 #CJK UNIFIED IDEOGRAPH + {0xA471, 0x5C22}, //459 #CJK UNIFIED IDEOGRAPH + {0xA472, 0x5C38}, //460 #CJK UNIFIED IDEOGRAPH + {0xA473, 0x5C71}, //461 #CJK UNIFIED IDEOGRAPH + {0xA474, 0x5DDD}, //462 #CJK UNIFIED IDEOGRAPH + {0xA475, 0x5DE5}, //463 #CJK UNIFIED IDEOGRAPH + {0xA476, 0x5DF1}, //464 #CJK UNIFIED IDEOGRAPH + {0xA477, 0x5DF2}, //465 #CJK UNIFIED IDEOGRAPH + {0xA478, 0x5DF3}, //466 #CJK UNIFIED IDEOGRAPH + {0xA479, 0x5DFE}, //467 #CJK UNIFIED IDEOGRAPH + {0xA47A, 0x5E72}, //468 #CJK UNIFIED IDEOGRAPH + {0xA47B, 0x5EFE}, //469 #CJK UNIFIED IDEOGRAPH + {0xA47C, 0x5F0B}, //470 #CJK UNIFIED IDEOGRAPH + {0xA47D, 0x5F13}, //471 #CJK UNIFIED IDEOGRAPH + {0xA47E, 0x624D}, //472 #CJK UNIFIED IDEOGRAPH + {0xA4A1, 0x4E11}, //473 #CJK UNIFIED IDEOGRAPH + {0xA4A2, 0x4E10}, //474 #CJK UNIFIED IDEOGRAPH + {0xA4A3, 0x4E0D}, //475 #CJK UNIFIED IDEOGRAPH + {0xA4A4, 0x4E2D}, //476 #CJK UNIFIED IDEOGRAPH + {0xA4A5, 0x4E30}, //477 #CJK UNIFIED IDEOGRAPH + {0xA4A6, 0x4E39}, //478 #CJK UNIFIED IDEOGRAPH + {0xA4A7, 0x4E4B}, //479 #CJK UNIFIED IDEOGRAPH + {0xA4A8, 0x5C39}, //480 #CJK UNIFIED IDEOGRAPH + {0xA4A9, 0x4E88}, //481 #CJK UNIFIED IDEOGRAPH + {0xA4AA, 0x4E91}, //482 #CJK UNIFIED IDEOGRAPH + {0xA4AB, 0x4E95}, //483 #CJK UNIFIED IDEOGRAPH + {0xA4AC, 0x4E92}, //484 #CJK UNIFIED IDEOGRAPH + {0xA4AD, 0x4E94}, //485 #CJK UNIFIED IDEOGRAPH + {0xA4AE, 0x4EA2}, //486 #CJK UNIFIED IDEOGRAPH + {0xA4AF, 0x4EC1}, //487 #CJK UNIFIED IDEOGRAPH + {0xA4B0, 0x4EC0}, //488 #CJK UNIFIED IDEOGRAPH + {0xA4B1, 0x4EC3}, //489 #CJK UNIFIED IDEOGRAPH + {0xA4B2, 0x4EC6}, //490 #CJK UNIFIED IDEOGRAPH + {0xA4B3, 0x4EC7}, //491 #CJK UNIFIED IDEOGRAPH + {0xA4B4, 0x4ECD}, //492 #CJK UNIFIED IDEOGRAPH + {0xA4B5, 0x4ECA}, //493 #CJK UNIFIED IDEOGRAPH + {0xA4B6, 0x4ECB}, //494 #CJK UNIFIED IDEOGRAPH + {0xA4B7, 0x4EC4}, //495 #CJK UNIFIED IDEOGRAPH + {0xA4B8, 0x5143}, //496 #CJK UNIFIED IDEOGRAPH + {0xA4B9, 0x5141}, //497 #CJK UNIFIED IDEOGRAPH + {0xA4BA, 0x5167}, //498 #CJK UNIFIED IDEOGRAPH + {0xA4BB, 0x516D}, //499 #CJK UNIFIED IDEOGRAPH + {0xA4BC, 0x516E}, //500 #CJK UNIFIED IDEOGRAPH + {0xA4BD, 0x516C}, //501 #CJK UNIFIED IDEOGRAPH + {0xA4BE, 0x5197}, //502 #CJK UNIFIED IDEOGRAPH + {0xA4BF, 0x51F6}, //503 #CJK UNIFIED IDEOGRAPH + {0xA4C0, 0x5206}, //504 #CJK UNIFIED IDEOGRAPH + {0xA4C1, 0x5207}, //505 #CJK UNIFIED IDEOGRAPH + {0xA4C2, 0x5208}, //506 #CJK UNIFIED IDEOGRAPH + {0xA4C3, 0x52FB}, //507 #CJK UNIFIED IDEOGRAPH + {0xA4C4, 0x52FE}, //508 #CJK UNIFIED IDEOGRAPH + {0xA4C5, 0x52FF}, //509 #CJK UNIFIED IDEOGRAPH + {0xA4C6, 0x5316}, //510 #CJK UNIFIED IDEOGRAPH + {0xA4C7, 0x5339}, //511 #CJK UNIFIED IDEOGRAPH + {0xA4C8, 0x5348}, //512 #CJK UNIFIED IDEOGRAPH + {0xA4C9, 0x5347}, //513 #CJK UNIFIED IDEOGRAPH + {0xA4CA, 0x5345}, //514 #CJK UNIFIED IDEOGRAPH + {0xA4CB, 0x535E}, //515 #CJK UNIFIED IDEOGRAPH + {0xA4CC, 0x5384}, //516 #CJK UNIFIED IDEOGRAPH + {0xA4CD, 0x53CB}, //517 #CJK UNIFIED IDEOGRAPH + {0xA4CE, 0x53CA}, //518 #CJK UNIFIED IDEOGRAPH + {0xA4CF, 0x53CD}, //519 #CJK UNIFIED IDEOGRAPH + {0xA4D0, 0x58EC}, //520 #CJK UNIFIED IDEOGRAPH + {0xA4D1, 0x5929}, //521 #CJK UNIFIED IDEOGRAPH + {0xA4D2, 0x592B}, //522 #CJK UNIFIED IDEOGRAPH + {0xA4D3, 0x592A}, //523 #CJK UNIFIED IDEOGRAPH + {0xA4D4, 0x592D}, //524 #CJK UNIFIED IDEOGRAPH + {0xA4D5, 0x5B54}, //525 #CJK UNIFIED IDEOGRAPH + {0xA4D6, 0x5C11}, //526 #CJK UNIFIED IDEOGRAPH + {0xA4D7, 0x5C24}, //527 #CJK UNIFIED IDEOGRAPH + {0xA4D8, 0x5C3A}, //528 #CJK UNIFIED IDEOGRAPH + {0xA4D9, 0x5C6F}, //529 #CJK UNIFIED IDEOGRAPH + {0xA4DA, 0x5DF4}, //530 #CJK UNIFIED IDEOGRAPH + {0xA4DB, 0x5E7B}, //531 #CJK UNIFIED IDEOGRAPH + {0xA4DC, 0x5EFF}, //532 #CJK UNIFIED IDEOGRAPH + {0xA4DD, 0x5F14}, //533 #CJK UNIFIED IDEOGRAPH + {0xA4DE, 0x5F15}, //534 #CJK UNIFIED IDEOGRAPH + {0xA4DF, 0x5FC3}, //535 #CJK UNIFIED IDEOGRAPH + {0xA4E0, 0x6208}, //536 #CJK UNIFIED IDEOGRAPH + {0xA4E1, 0x6236}, //537 #CJK UNIFIED IDEOGRAPH + {0xA4E2, 0x624B}, //538 #CJK UNIFIED IDEOGRAPH + {0xA4E3, 0x624E}, //539 #CJK UNIFIED IDEOGRAPH + {0xA4E4, 0x652F}, //540 #CJK UNIFIED IDEOGRAPH + {0xA4E5, 0x6587}, //541 #CJK UNIFIED IDEOGRAPH + {0xA4E6, 0x6597}, //542 #CJK UNIFIED IDEOGRAPH + {0xA4E7, 0x65A4}, //543 #CJK UNIFIED IDEOGRAPH + {0xA4E8, 0x65B9}, //544 #CJK UNIFIED IDEOGRAPH + {0xA4E9, 0x65E5}, //545 #CJK UNIFIED IDEOGRAPH + {0xA4EA, 0x66F0}, //546 #CJK UNIFIED IDEOGRAPH + {0xA4EB, 0x6708}, //547 #CJK UNIFIED IDEOGRAPH + {0xA4EC, 0x6728}, //548 #CJK UNIFIED IDEOGRAPH + {0xA4ED, 0x6B20}, //549 #CJK UNIFIED IDEOGRAPH + {0xA4EE, 0x6B62}, //550 #CJK UNIFIED IDEOGRAPH + {0xA4EF, 0x6B79}, //551 #CJK UNIFIED IDEOGRAPH + {0xA4F0, 0x6BCB}, //552 #CJK UNIFIED IDEOGRAPH + {0xA4F1, 0x6BD4}, //553 #CJK UNIFIED IDEOGRAPH + {0xA4F2, 0x6BDB}, //554 #CJK UNIFIED IDEOGRAPH + {0xA4F3, 0x6C0F}, //555 #CJK UNIFIED IDEOGRAPH + {0xA4F4, 0x6C34}, //556 #CJK UNIFIED IDEOGRAPH + {0xA4F5, 0x706B}, //557 #CJK UNIFIED IDEOGRAPH + {0xA4F6, 0x722A}, //558 #CJK UNIFIED IDEOGRAPH + {0xA4F7, 0x7236}, //559 #CJK UNIFIED IDEOGRAPH + {0xA4F8, 0x723B}, //560 #CJK UNIFIED IDEOGRAPH + {0xA4F9, 0x7247}, //561 #CJK UNIFIED IDEOGRAPH + {0xA4FA, 0x7259}, //562 #CJK UNIFIED IDEOGRAPH + {0xA4FB, 0x725B}, //563 #CJK UNIFIED IDEOGRAPH + {0xA4FC, 0x72AC}, //564 #CJK UNIFIED IDEOGRAPH + {0xA4FD, 0x738B}, //565 #CJK UNIFIED IDEOGRAPH + {0xA4FE, 0x4E19}, //566 #CJK UNIFIED IDEOGRAPH + {0xA540, 0x4E16}, //567 #CJK UNIFIED IDEOGRAPH + {0xA541, 0x4E15}, //568 #CJK UNIFIED IDEOGRAPH + {0xA542, 0x4E14}, //569 #CJK UNIFIED IDEOGRAPH + {0xA543, 0x4E18}, //570 #CJK UNIFIED IDEOGRAPH + {0xA544, 0x4E3B}, //571 #CJK UNIFIED IDEOGRAPH + {0xA545, 0x4E4D}, //572 #CJK UNIFIED IDEOGRAPH + {0xA546, 0x4E4F}, //573 #CJK UNIFIED IDEOGRAPH + {0xA547, 0x4E4E}, //574 #CJK UNIFIED IDEOGRAPH + {0xA548, 0x4EE5}, //575 #CJK UNIFIED IDEOGRAPH + {0xA549, 0x4ED8}, //576 #CJK UNIFIED IDEOGRAPH + {0xA54A, 0x4ED4}, //577 #CJK UNIFIED IDEOGRAPH + {0xA54B, 0x4ED5}, //578 #CJK UNIFIED IDEOGRAPH + {0xA54C, 0x4ED6}, //579 #CJK UNIFIED IDEOGRAPH + {0xA54D, 0x4ED7}, //580 #CJK UNIFIED IDEOGRAPH + {0xA54E, 0x4EE3}, //581 #CJK UNIFIED IDEOGRAPH + {0xA54F, 0x4EE4}, //582 #CJK UNIFIED IDEOGRAPH + {0xA550, 0x4ED9}, //583 #CJK UNIFIED IDEOGRAPH + {0xA551, 0x4EDE}, //584 #CJK UNIFIED IDEOGRAPH + {0xA552, 0x5145}, //585 #CJK UNIFIED IDEOGRAPH + {0xA553, 0x5144}, //586 #CJK UNIFIED IDEOGRAPH + {0xA554, 0x5189}, //587 #CJK UNIFIED IDEOGRAPH + {0xA555, 0x518A}, //588 #CJK UNIFIED IDEOGRAPH + {0xA556, 0x51AC}, //589 #CJK UNIFIED IDEOGRAPH + {0xA557, 0x51F9}, //590 #CJK UNIFIED IDEOGRAPH + {0xA558, 0x51FA}, //591 #CJK UNIFIED IDEOGRAPH + {0xA559, 0x51F8}, //592 #CJK UNIFIED IDEOGRAPH + {0xA55A, 0x520A}, //593 #CJK UNIFIED IDEOGRAPH + {0xA55B, 0x52A0}, //594 #CJK UNIFIED IDEOGRAPH + {0xA55C, 0x529F}, //595 #CJK UNIFIED IDEOGRAPH + {0xA55D, 0x5305}, //596 #CJK UNIFIED IDEOGRAPH + {0xA55E, 0x5306}, //597 #CJK UNIFIED IDEOGRAPH + {0xA55F, 0x5317}, //598 #CJK UNIFIED IDEOGRAPH + {0xA560, 0x531D}, //599 #CJK UNIFIED IDEOGRAPH + {0xA561, 0x4EDF}, //600 #CJK UNIFIED IDEOGRAPH + {0xA562, 0x534A}, //601 #CJK UNIFIED IDEOGRAPH + {0xA563, 0x5349}, //602 #CJK UNIFIED IDEOGRAPH + {0xA564, 0x5361}, //603 #CJK UNIFIED IDEOGRAPH + {0xA565, 0x5360}, //604 #CJK UNIFIED IDEOGRAPH + {0xA566, 0x536F}, //605 #CJK UNIFIED IDEOGRAPH + {0xA567, 0x536E}, //606 #CJK UNIFIED IDEOGRAPH + {0xA568, 0x53BB}, //607 #CJK UNIFIED IDEOGRAPH + {0xA569, 0x53EF}, //608 #CJK UNIFIED IDEOGRAPH + {0xA56A, 0x53E4}, //609 #CJK UNIFIED IDEOGRAPH + {0xA56B, 0x53F3}, //610 #CJK UNIFIED IDEOGRAPH + {0xA56C, 0x53EC}, //611 #CJK UNIFIED IDEOGRAPH + {0xA56D, 0x53EE}, //612 #CJK UNIFIED IDEOGRAPH + {0xA56E, 0x53E9}, //613 #CJK UNIFIED IDEOGRAPH + {0xA56F, 0x53E8}, //614 #CJK UNIFIED IDEOGRAPH + {0xA570, 0x53FC}, //615 #CJK UNIFIED IDEOGRAPH + {0xA571, 0x53F8}, //616 #CJK UNIFIED IDEOGRAPH + {0xA572, 0x53F5}, //617 #CJK UNIFIED IDEOGRAPH + {0xA573, 0x53EB}, //618 #CJK UNIFIED IDEOGRAPH + {0xA574, 0x53E6}, //619 #CJK UNIFIED IDEOGRAPH + {0xA575, 0x53EA}, //620 #CJK UNIFIED IDEOGRAPH + {0xA576, 0x53F2}, //621 #CJK UNIFIED IDEOGRAPH + {0xA577, 0x53F1}, //622 #CJK UNIFIED IDEOGRAPH + {0xA578, 0x53F0}, //623 #CJK UNIFIED IDEOGRAPH + {0xA579, 0x53E5}, //624 #CJK UNIFIED IDEOGRAPH + {0xA57A, 0x53ED}, //625 #CJK UNIFIED IDEOGRAPH + {0xA57B, 0x53FB}, //626 #CJK UNIFIED IDEOGRAPH + {0xA57C, 0x56DB}, //627 #CJK UNIFIED IDEOGRAPH + {0xA57D, 0x56DA}, //628 #CJK UNIFIED IDEOGRAPH + {0xA57E, 0x5916}, //629 #CJK UNIFIED IDEOGRAPH + {0xA5A1, 0x592E}, //630 #CJK UNIFIED IDEOGRAPH + {0xA5A2, 0x5931}, //631 #CJK UNIFIED IDEOGRAPH + {0xA5A3, 0x5974}, //632 #CJK UNIFIED IDEOGRAPH + {0xA5A4, 0x5976}, //633 #CJK UNIFIED IDEOGRAPH + {0xA5A5, 0x5B55}, //634 #CJK UNIFIED IDEOGRAPH + {0xA5A6, 0x5B83}, //635 #CJK UNIFIED IDEOGRAPH + {0xA5A7, 0x5C3C}, //636 #CJK UNIFIED IDEOGRAPH + {0xA5A8, 0x5DE8}, //637 #CJK UNIFIED IDEOGRAPH + {0xA5A9, 0x5DE7}, //638 #CJK UNIFIED IDEOGRAPH + {0xA5AA, 0x5DE6}, //639 #CJK UNIFIED IDEOGRAPH + {0xA5AB, 0x5E02}, //640 #CJK UNIFIED IDEOGRAPH + {0xA5AC, 0x5E03}, //641 #CJK UNIFIED IDEOGRAPH + {0xA5AD, 0x5E73}, //642 #CJK UNIFIED IDEOGRAPH + {0xA5AE, 0x5E7C}, //643 #CJK UNIFIED IDEOGRAPH + {0xA5AF, 0x5F01}, //644 #CJK UNIFIED IDEOGRAPH + {0xA5B0, 0x5F18}, //645 #CJK UNIFIED IDEOGRAPH + {0xA5B1, 0x5F17}, //646 #CJK UNIFIED IDEOGRAPH + {0xA5B2, 0x5FC5}, //647 #CJK UNIFIED IDEOGRAPH + {0xA5B3, 0x620A}, //648 #CJK UNIFIED IDEOGRAPH + {0xA5B4, 0x6253}, //649 #CJK UNIFIED IDEOGRAPH + {0xA5B5, 0x6254}, //650 #CJK UNIFIED IDEOGRAPH + {0xA5B6, 0x6252}, //651 #CJK UNIFIED IDEOGRAPH + {0xA5B7, 0x6251}, //652 #CJK UNIFIED IDEOGRAPH + {0xA5B8, 0x65A5}, //653 #CJK UNIFIED IDEOGRAPH + {0xA5B9, 0x65E6}, //654 #CJK UNIFIED IDEOGRAPH + {0xA5BA, 0x672E}, //655 #CJK UNIFIED IDEOGRAPH + {0xA5BB, 0x672C}, //656 #CJK UNIFIED IDEOGRAPH + {0xA5BC, 0x672A}, //657 #CJK UNIFIED IDEOGRAPH + {0xA5BD, 0x672B}, //658 #CJK UNIFIED IDEOGRAPH + {0xA5BE, 0x672D}, //659 #CJK UNIFIED IDEOGRAPH + {0xA5BF, 0x6B63}, //660 #CJK UNIFIED IDEOGRAPH + {0xA5C0, 0x6BCD}, //661 #CJK UNIFIED IDEOGRAPH + {0xA5C1, 0x6C11}, //662 #CJK UNIFIED IDEOGRAPH + {0xA5C2, 0x6C10}, //663 #CJK UNIFIED IDEOGRAPH + {0xA5C3, 0x6C38}, //664 #CJK UNIFIED IDEOGRAPH + {0xA5C4, 0x6C41}, //665 #CJK UNIFIED IDEOGRAPH + {0xA5C5, 0x6C40}, //666 #CJK UNIFIED IDEOGRAPH + {0xA5C6, 0x6C3E}, //667 #CJK UNIFIED IDEOGRAPH + {0xA5C7, 0x72AF}, //668 #CJK UNIFIED IDEOGRAPH + {0xA5C8, 0x7384}, //669 #CJK UNIFIED IDEOGRAPH + {0xA5C9, 0x7389}, //670 #CJK UNIFIED IDEOGRAPH + {0xA5CA, 0x74DC}, //671 #CJK UNIFIED IDEOGRAPH + {0xA5CB, 0x74E6}, //672 #CJK UNIFIED IDEOGRAPH + {0xA5CC, 0x7518}, //673 #CJK UNIFIED IDEOGRAPH + {0xA5CD, 0x751F}, //674 #CJK UNIFIED IDEOGRAPH + {0xA5CE, 0x7528}, //675 #CJK UNIFIED IDEOGRAPH + {0xA5CF, 0x7529}, //676 #CJK UNIFIED IDEOGRAPH + {0xA5D0, 0x7530}, //677 #CJK UNIFIED IDEOGRAPH + {0xA5D1, 0x7531}, //678 #CJK UNIFIED IDEOGRAPH + {0xA5D2, 0x7532}, //679 #CJK UNIFIED IDEOGRAPH + {0xA5D3, 0x7533}, //680 #CJK UNIFIED IDEOGRAPH + {0xA5D4, 0x758B}, //681 #CJK UNIFIED IDEOGRAPH + {0xA5D5, 0x767D}, //682 #CJK UNIFIED IDEOGRAPH + {0xA5D6, 0x76AE}, //683 #CJK UNIFIED IDEOGRAPH + {0xA5D7, 0x76BF}, //684 #CJK UNIFIED IDEOGRAPH + {0xA5D8, 0x76EE}, //685 #CJK UNIFIED IDEOGRAPH + {0xA5D9, 0x77DB}, //686 #CJK UNIFIED IDEOGRAPH + {0xA5DA, 0x77E2}, //687 #CJK UNIFIED IDEOGRAPH + {0xA5DB, 0x77F3}, //688 #CJK UNIFIED IDEOGRAPH + {0xA5DC, 0x793A}, //689 #CJK UNIFIED IDEOGRAPH + {0xA5DD, 0x79BE}, //690 #CJK UNIFIED IDEOGRAPH + {0xA5DE, 0x7A74}, //691 #CJK UNIFIED IDEOGRAPH + {0xA5DF, 0x7ACB}, //692 #CJK UNIFIED IDEOGRAPH + {0xA5E0, 0x4E1E}, //693 #CJK UNIFIED IDEOGRAPH + {0xA5E1, 0x4E1F}, //694 #CJK UNIFIED IDEOGRAPH + {0xA5E2, 0x4E52}, //695 #CJK UNIFIED IDEOGRAPH + {0xA5E3, 0x4E53}, //696 #CJK UNIFIED IDEOGRAPH + {0xA5E4, 0x4E69}, //697 #CJK UNIFIED IDEOGRAPH + {0xA5E5, 0x4E99}, //698 #CJK UNIFIED IDEOGRAPH + {0xA5E6, 0x4EA4}, //699 #CJK UNIFIED IDEOGRAPH + {0xA5E7, 0x4EA6}, //700 #CJK UNIFIED IDEOGRAPH + {0xA5E8, 0x4EA5}, //701 #CJK UNIFIED IDEOGRAPH + {0xA5E9, 0x4EFF}, //702 #CJK UNIFIED IDEOGRAPH + {0xA5EA, 0x4F09}, //703 #CJK UNIFIED IDEOGRAPH + {0xA5EB, 0x4F19}, //704 #CJK UNIFIED IDEOGRAPH + {0xA5EC, 0x4F0A}, //705 #CJK UNIFIED IDEOGRAPH + {0xA5ED, 0x4F15}, //706 #CJK UNIFIED IDEOGRAPH + {0xA5EE, 0x4F0D}, //707 #CJK UNIFIED IDEOGRAPH + {0xA5EF, 0x4F10}, //708 #CJK UNIFIED IDEOGRAPH + {0xA5F0, 0x4F11}, //709 #CJK UNIFIED IDEOGRAPH + {0xA5F1, 0x4F0F}, //710 #CJK UNIFIED IDEOGRAPH + {0xA5F2, 0x4EF2}, //711 #CJK UNIFIED IDEOGRAPH + {0xA5F3, 0x4EF6}, //712 #CJK UNIFIED IDEOGRAPH + {0xA5F4, 0x4EFB}, //713 #CJK UNIFIED IDEOGRAPH + {0xA5F5, 0x4EF0}, //714 #CJK UNIFIED IDEOGRAPH + {0xA5F6, 0x4EF3}, //715 #CJK UNIFIED IDEOGRAPH + {0xA5F7, 0x4EFD}, //716 #CJK UNIFIED IDEOGRAPH + {0xA5F8, 0x4F01}, //717 #CJK UNIFIED IDEOGRAPH + {0xA5F9, 0x4F0B}, //718 #CJK UNIFIED IDEOGRAPH + {0xA5FA, 0x5149}, //719 #CJK UNIFIED IDEOGRAPH + {0xA5FB, 0x5147}, //720 #CJK UNIFIED IDEOGRAPH + {0xA5FC, 0x5146}, //721 #CJK UNIFIED IDEOGRAPH + {0xA5FD, 0x5148}, //722 #CJK UNIFIED IDEOGRAPH + {0xA5FE, 0x5168}, //723 #CJK UNIFIED IDEOGRAPH + {0xA640, 0x5171}, //724 #CJK UNIFIED IDEOGRAPH + {0xA641, 0x518D}, //725 #CJK UNIFIED IDEOGRAPH + {0xA642, 0x51B0}, //726 #CJK UNIFIED IDEOGRAPH + {0xA643, 0x5217}, //727 #CJK UNIFIED IDEOGRAPH + {0xA644, 0x5211}, //728 #CJK UNIFIED IDEOGRAPH + {0xA645, 0x5212}, //729 #CJK UNIFIED IDEOGRAPH + {0xA646, 0x520E}, //730 #CJK UNIFIED IDEOGRAPH + {0xA647, 0x5216}, //731 #CJK UNIFIED IDEOGRAPH + {0xA648, 0x52A3}, //732 #CJK UNIFIED IDEOGRAPH + {0xA649, 0x5308}, //733 #CJK UNIFIED IDEOGRAPH + {0xA64A, 0x5321}, //734 #CJK UNIFIED IDEOGRAPH + {0xA64B, 0x5320}, //735 #CJK UNIFIED IDEOGRAPH + {0xA64C, 0x5370}, //736 #CJK UNIFIED IDEOGRAPH + {0xA64D, 0x5371}, //737 #CJK UNIFIED IDEOGRAPH + {0xA64E, 0x5409}, //738 #CJK UNIFIED IDEOGRAPH + {0xA64F, 0x540F}, //739 #CJK UNIFIED IDEOGRAPH + {0xA650, 0x540C}, //740 #CJK UNIFIED IDEOGRAPH + {0xA651, 0x540A}, //741 #CJK UNIFIED IDEOGRAPH + {0xA652, 0x5410}, //742 #CJK UNIFIED IDEOGRAPH + {0xA653, 0x5401}, //743 #CJK UNIFIED IDEOGRAPH + {0xA654, 0x540B}, //744 #CJK UNIFIED IDEOGRAPH + {0xA655, 0x5404}, //745 #CJK UNIFIED IDEOGRAPH + {0xA656, 0x5411}, //746 #CJK UNIFIED IDEOGRAPH + {0xA657, 0x540D}, //747 #CJK UNIFIED IDEOGRAPH + {0xA658, 0x5408}, //748 #CJK UNIFIED IDEOGRAPH + {0xA659, 0x5403}, //749 #CJK UNIFIED IDEOGRAPH + {0xA65A, 0x540E}, //750 #CJK UNIFIED IDEOGRAPH + {0xA65B, 0x5406}, //751 #CJK UNIFIED IDEOGRAPH + {0xA65C, 0x5412}, //752 #CJK UNIFIED IDEOGRAPH + {0xA65D, 0x56E0}, //753 #CJK UNIFIED IDEOGRAPH + {0xA65E, 0x56DE}, //754 #CJK UNIFIED IDEOGRAPH + {0xA65F, 0x56DD}, //755 #CJK UNIFIED IDEOGRAPH + {0xA660, 0x5733}, //756 #CJK UNIFIED IDEOGRAPH + {0xA661, 0x5730}, //757 #CJK UNIFIED IDEOGRAPH + {0xA662, 0x5728}, //758 #CJK UNIFIED IDEOGRAPH + {0xA663, 0x572D}, //759 #CJK UNIFIED IDEOGRAPH + {0xA664, 0x572C}, //760 #CJK UNIFIED IDEOGRAPH + {0xA665, 0x572F}, //761 #CJK UNIFIED IDEOGRAPH + {0xA666, 0x5729}, //762 #CJK UNIFIED IDEOGRAPH + {0xA667, 0x5919}, //763 #CJK UNIFIED IDEOGRAPH + {0xA668, 0x591A}, //764 #CJK UNIFIED IDEOGRAPH + {0xA669, 0x5937}, //765 #CJK UNIFIED IDEOGRAPH + {0xA66A, 0x5938}, //766 #CJK UNIFIED IDEOGRAPH + {0xA66B, 0x5984}, //767 #CJK UNIFIED IDEOGRAPH + {0xA66C, 0x5978}, //768 #CJK UNIFIED IDEOGRAPH + {0xA66D, 0x5983}, //769 #CJK UNIFIED IDEOGRAPH + {0xA66E, 0x597D}, //770 #CJK UNIFIED IDEOGRAPH + {0xA66F, 0x5979}, //771 #CJK UNIFIED IDEOGRAPH + {0xA670, 0x5982}, //772 #CJK UNIFIED IDEOGRAPH + {0xA671, 0x5981}, //773 #CJK UNIFIED IDEOGRAPH + {0xA672, 0x5B57}, //774 #CJK UNIFIED IDEOGRAPH + {0xA673, 0x5B58}, //775 #CJK UNIFIED IDEOGRAPH + {0xA674, 0x5B87}, //776 #CJK UNIFIED IDEOGRAPH + {0xA675, 0x5B88}, //777 #CJK UNIFIED IDEOGRAPH + {0xA676, 0x5B85}, //778 #CJK UNIFIED IDEOGRAPH + {0xA677, 0x5B89}, //779 #CJK UNIFIED IDEOGRAPH + {0xA678, 0x5BFA}, //780 #CJK UNIFIED IDEOGRAPH + {0xA679, 0x5C16}, //781 #CJK UNIFIED IDEOGRAPH + {0xA67A, 0x5C79}, //782 #CJK UNIFIED IDEOGRAPH + {0xA67B, 0x5DDE}, //783 #CJK UNIFIED IDEOGRAPH + {0xA67C, 0x5E06}, //784 #CJK UNIFIED IDEOGRAPH + {0xA67D, 0x5E76}, //785 #CJK UNIFIED IDEOGRAPH + {0xA67E, 0x5E74}, //786 #CJK UNIFIED IDEOGRAPH + {0xA6A1, 0x5F0F}, //787 #CJK UNIFIED IDEOGRAPH + {0xA6A2, 0x5F1B}, //788 #CJK UNIFIED IDEOGRAPH + {0xA6A3, 0x5FD9}, //789 #CJK UNIFIED IDEOGRAPH + {0xA6A4, 0x5FD6}, //790 #CJK UNIFIED IDEOGRAPH + {0xA6A5, 0x620E}, //791 #CJK UNIFIED IDEOGRAPH + {0xA6A6, 0x620C}, //792 #CJK UNIFIED IDEOGRAPH + {0xA6A7, 0x620D}, //793 #CJK UNIFIED IDEOGRAPH + {0xA6A8, 0x6210}, //794 #CJK UNIFIED IDEOGRAPH + {0xA6A9, 0x6263}, //795 #CJK UNIFIED IDEOGRAPH + {0xA6AA, 0x625B}, //796 #CJK UNIFIED IDEOGRAPH + {0xA6AB, 0x6258}, //797 #CJK UNIFIED IDEOGRAPH + {0xA6AC, 0x6536}, //798 #CJK UNIFIED IDEOGRAPH + {0xA6AD, 0x65E9}, //799 #CJK UNIFIED IDEOGRAPH + {0xA6AE, 0x65E8}, //800 #CJK UNIFIED IDEOGRAPH + {0xA6AF, 0x65EC}, //801 #CJK UNIFIED IDEOGRAPH + {0xA6B0, 0x65ED}, //802 #CJK UNIFIED IDEOGRAPH + {0xA6B1, 0x66F2}, //803 #CJK UNIFIED IDEOGRAPH + {0xA6B2, 0x66F3}, //804 #CJK UNIFIED IDEOGRAPH + {0xA6B3, 0x6709}, //805 #CJK UNIFIED IDEOGRAPH + {0xA6B4, 0x673D}, //806 #CJK UNIFIED IDEOGRAPH + {0xA6B5, 0x6734}, //807 #CJK UNIFIED IDEOGRAPH + {0xA6B6, 0x6731}, //808 #CJK UNIFIED IDEOGRAPH + {0xA6B7, 0x6735}, //809 #CJK UNIFIED IDEOGRAPH + {0xA6B8, 0x6B21}, //810 #CJK UNIFIED IDEOGRAPH + {0xA6B9, 0x6B64}, //811 #CJK UNIFIED IDEOGRAPH + {0xA6BA, 0x6B7B}, //812 #CJK UNIFIED IDEOGRAPH + {0xA6BB, 0x6C16}, //813 #CJK UNIFIED IDEOGRAPH + {0xA6BC, 0x6C5D}, //814 #CJK UNIFIED IDEOGRAPH + {0xA6BD, 0x6C57}, //815 #CJK UNIFIED IDEOGRAPH + {0xA6BE, 0x6C59}, //816 #CJK UNIFIED IDEOGRAPH + {0xA6BF, 0x6C5F}, //817 #CJK UNIFIED IDEOGRAPH + {0xA6C0, 0x6C60}, //818 #CJK UNIFIED IDEOGRAPH + {0xA6C1, 0x6C50}, //819 #CJK UNIFIED IDEOGRAPH + {0xA6C2, 0x6C55}, //820 #CJK UNIFIED IDEOGRAPH + {0xA6C3, 0x6C61}, //821 #CJK UNIFIED IDEOGRAPH + {0xA6C4, 0x6C5B}, //822 #CJK UNIFIED IDEOGRAPH + {0xA6C5, 0x6C4D}, //823 #CJK UNIFIED IDEOGRAPH + {0xA6C6, 0x6C4E}, //824 #CJK UNIFIED IDEOGRAPH + {0xA6C7, 0x7070}, //825 #CJK UNIFIED IDEOGRAPH + {0xA6C8, 0x725F}, //826 #CJK UNIFIED IDEOGRAPH + {0xA6C9, 0x725D}, //827 #CJK UNIFIED IDEOGRAPH + {0xA6CA, 0x767E}, //828 #CJK UNIFIED IDEOGRAPH + {0xA6CB, 0x7AF9}, //829 #CJK UNIFIED IDEOGRAPH + {0xA6CC, 0x7C73}, //830 #CJK UNIFIED IDEOGRAPH + {0xA6CD, 0x7CF8}, //831 #CJK UNIFIED IDEOGRAPH + {0xA6CE, 0x7F36}, //832 #CJK UNIFIED IDEOGRAPH + {0xA6CF, 0x7F8A}, //833 #CJK UNIFIED IDEOGRAPH + {0xA6D0, 0x7FBD}, //834 #CJK UNIFIED IDEOGRAPH + {0xA6D1, 0x8001}, //835 #CJK UNIFIED IDEOGRAPH + {0xA6D2, 0x8003}, //836 #CJK UNIFIED IDEOGRAPH + {0xA6D3, 0x800C}, //837 #CJK UNIFIED IDEOGRAPH + {0xA6D4, 0x8012}, //838 #CJK UNIFIED IDEOGRAPH + {0xA6D5, 0x8033}, //839 #CJK UNIFIED IDEOGRAPH + {0xA6D6, 0x807F}, //840 #CJK UNIFIED IDEOGRAPH + {0xA6D7, 0x8089}, //841 #CJK UNIFIED IDEOGRAPH + {0xA6D8, 0x808B}, //842 #CJK UNIFIED IDEOGRAPH + {0xA6D9, 0x808C}, //843 #CJK UNIFIED IDEOGRAPH + {0xA6DA, 0x81E3}, //844 #CJK UNIFIED IDEOGRAPH + {0xA6DB, 0x81EA}, //845 #CJK UNIFIED IDEOGRAPH + {0xA6DC, 0x81F3}, //846 #CJK UNIFIED IDEOGRAPH + {0xA6DD, 0x81FC}, //847 #CJK UNIFIED IDEOGRAPH + {0xA6DE, 0x820C}, //848 #CJK UNIFIED IDEOGRAPH + {0xA6DF, 0x821B}, //849 #CJK UNIFIED IDEOGRAPH + {0xA6E0, 0x821F}, //850 #CJK UNIFIED IDEOGRAPH + {0xA6E1, 0x826E}, //851 #CJK UNIFIED IDEOGRAPH + {0xA6E2, 0x8272}, //852 #CJK UNIFIED IDEOGRAPH + {0xA6E3, 0x827E}, //853 #CJK UNIFIED IDEOGRAPH + {0xA6E4, 0x866B}, //854 #CJK UNIFIED IDEOGRAPH + {0xA6E5, 0x8840}, //855 #CJK UNIFIED IDEOGRAPH + {0xA6E6, 0x884C}, //856 #CJK UNIFIED IDEOGRAPH + {0xA6E7, 0x8863}, //857 #CJK UNIFIED IDEOGRAPH + {0xA6E8, 0x897F}, //858 #CJK UNIFIED IDEOGRAPH + {0xA6E9, 0x9621}, //859 #CJK UNIFIED IDEOGRAPH + {0xA6EA, 0x4E32}, //860 #CJK UNIFIED IDEOGRAPH + {0xA6EB, 0x4EA8}, //861 #CJK UNIFIED IDEOGRAPH + {0xA6EC, 0x4F4D}, //862 #CJK UNIFIED IDEOGRAPH + {0xA6ED, 0x4F4F}, //863 #CJK UNIFIED IDEOGRAPH + {0xA6EE, 0x4F47}, //864 #CJK UNIFIED IDEOGRAPH + {0xA6EF, 0x4F57}, //865 #CJK UNIFIED IDEOGRAPH + {0xA6F0, 0x4F5E}, //866 #CJK UNIFIED IDEOGRAPH + {0xA6F1, 0x4F34}, //867 #CJK UNIFIED IDEOGRAPH + {0xA6F2, 0x4F5B}, //868 #CJK UNIFIED IDEOGRAPH + {0xA6F3, 0x4F55}, //869 #CJK UNIFIED IDEOGRAPH + {0xA6F4, 0x4F30}, //870 #CJK UNIFIED IDEOGRAPH + {0xA6F5, 0x4F50}, //871 #CJK UNIFIED IDEOGRAPH + {0xA6F6, 0x4F51}, //872 #CJK UNIFIED IDEOGRAPH + {0xA6F7, 0x4F3D}, //873 #CJK UNIFIED IDEOGRAPH + {0xA6F8, 0x4F3A}, //874 #CJK UNIFIED IDEOGRAPH + {0xA6F9, 0x4F38}, //875 #CJK UNIFIED IDEOGRAPH + {0xA6FA, 0x4F43}, //876 #CJK UNIFIED IDEOGRAPH + {0xA6FB, 0x4F54}, //877 #CJK UNIFIED IDEOGRAPH + {0xA6FC, 0x4F3C}, //878 #CJK UNIFIED IDEOGRAPH + {0xA6FD, 0x4F46}, //879 #CJK UNIFIED IDEOGRAPH + {0xA6FE, 0x4F63}, //880 #CJK UNIFIED IDEOGRAPH + {0xA740, 0x4F5C}, //881 #CJK UNIFIED IDEOGRAPH + {0xA741, 0x4F60}, //882 #CJK UNIFIED IDEOGRAPH + {0xA742, 0x4F2F}, //883 #CJK UNIFIED IDEOGRAPH + {0xA743, 0x4F4E}, //884 #CJK UNIFIED IDEOGRAPH + {0xA744, 0x4F36}, //885 #CJK UNIFIED IDEOGRAPH + {0xA745, 0x4F59}, //886 #CJK UNIFIED IDEOGRAPH + {0xA746, 0x4F5D}, //887 #CJK UNIFIED IDEOGRAPH + {0xA747, 0x4F48}, //888 #CJK UNIFIED IDEOGRAPH + {0xA748, 0x4F5A}, //889 #CJK UNIFIED IDEOGRAPH + {0xA749, 0x514C}, //890 #CJK UNIFIED IDEOGRAPH + {0xA74A, 0x514B}, //891 #CJK UNIFIED IDEOGRAPH + {0xA74B, 0x514D}, //892 #CJK UNIFIED IDEOGRAPH + {0xA74C, 0x5175}, //893 #CJK UNIFIED IDEOGRAPH + {0xA74D, 0x51B6}, //894 #CJK UNIFIED IDEOGRAPH + {0xA74E, 0x51B7}, //895 #CJK UNIFIED IDEOGRAPH + {0xA74F, 0x5225}, //896 #CJK UNIFIED IDEOGRAPH + {0xA750, 0x5224}, //897 #CJK UNIFIED IDEOGRAPH + {0xA751, 0x5229}, //898 #CJK UNIFIED IDEOGRAPH + {0xA752, 0x522A}, //899 #CJK UNIFIED IDEOGRAPH + {0xA753, 0x5228}, //900 #CJK UNIFIED IDEOGRAPH + {0xA754, 0x52AB}, //901 #CJK UNIFIED IDEOGRAPH + {0xA755, 0x52A9}, //902 #CJK UNIFIED IDEOGRAPH + {0xA756, 0x52AA}, //903 #CJK UNIFIED IDEOGRAPH + {0xA757, 0x52AC}, //904 #CJK UNIFIED IDEOGRAPH + {0xA758, 0x5323}, //905 #CJK UNIFIED IDEOGRAPH + {0xA759, 0x5373}, //906 #CJK UNIFIED IDEOGRAPH + {0xA75A, 0x5375}, //907 #CJK UNIFIED IDEOGRAPH + {0xA75B, 0x541D}, //908 #CJK UNIFIED IDEOGRAPH + {0xA75C, 0x542D}, //909 #CJK UNIFIED IDEOGRAPH + {0xA75D, 0x541E}, //910 #CJK UNIFIED IDEOGRAPH + {0xA75E, 0x543E}, //911 #CJK UNIFIED IDEOGRAPH + {0xA75F, 0x5426}, //912 #CJK UNIFIED IDEOGRAPH + {0xA760, 0x544E}, //913 #CJK UNIFIED IDEOGRAPH + {0xA761, 0x5427}, //914 #CJK UNIFIED IDEOGRAPH + {0xA762, 0x5446}, //915 #CJK UNIFIED IDEOGRAPH + {0xA763, 0x5443}, //916 #CJK UNIFIED IDEOGRAPH + {0xA764, 0x5433}, //917 #CJK UNIFIED IDEOGRAPH + {0xA765, 0x5448}, //918 #CJK UNIFIED IDEOGRAPH + {0xA766, 0x5442}, //919 #CJK UNIFIED IDEOGRAPH + {0xA767, 0x541B}, //920 #CJK UNIFIED IDEOGRAPH + {0xA768, 0x5429}, //921 #CJK UNIFIED IDEOGRAPH + {0xA769, 0x544A}, //922 #CJK UNIFIED IDEOGRAPH + {0xA76A, 0x5439}, //923 #CJK UNIFIED IDEOGRAPH + {0xA76B, 0x543B}, //924 #CJK UNIFIED IDEOGRAPH + {0xA76C, 0x5438}, //925 #CJK UNIFIED IDEOGRAPH + {0xA76D, 0x542E}, //926 #CJK UNIFIED IDEOGRAPH + {0xA76E, 0x5435}, //927 #CJK UNIFIED IDEOGRAPH + {0xA76F, 0x5436}, //928 #CJK UNIFIED IDEOGRAPH + {0xA770, 0x5420}, //929 #CJK UNIFIED IDEOGRAPH + {0xA771, 0x543C}, //930 #CJK UNIFIED IDEOGRAPH + {0xA772, 0x5440}, //931 #CJK UNIFIED IDEOGRAPH + {0xA773, 0x5431}, //932 #CJK UNIFIED IDEOGRAPH + {0xA774, 0x542B}, //933 #CJK UNIFIED IDEOGRAPH + {0xA775, 0x541F}, //934 #CJK UNIFIED IDEOGRAPH + {0xA776, 0x542C}, //935 #CJK UNIFIED IDEOGRAPH + {0xA777, 0x56EA}, //936 #CJK UNIFIED IDEOGRAPH + {0xA778, 0x56F0}, //937 #CJK UNIFIED IDEOGRAPH + {0xA779, 0x56E4}, //938 #CJK UNIFIED IDEOGRAPH + {0xA77A, 0x56EB}, //939 #CJK UNIFIED IDEOGRAPH + {0xA77B, 0x574A}, //940 #CJK UNIFIED IDEOGRAPH + {0xA77C, 0x5751}, //941 #CJK UNIFIED IDEOGRAPH + {0xA77D, 0x5740}, //942 #CJK UNIFIED IDEOGRAPH + {0xA77E, 0x574D}, //943 #CJK UNIFIED IDEOGRAPH + {0xA7A1, 0x5747}, //944 #CJK UNIFIED IDEOGRAPH + {0xA7A2, 0x574E}, //945 #CJK UNIFIED IDEOGRAPH + {0xA7A3, 0x573E}, //946 #CJK UNIFIED IDEOGRAPH + {0xA7A4, 0x5750}, //947 #CJK UNIFIED IDEOGRAPH + {0xA7A5, 0x574F}, //948 #CJK UNIFIED IDEOGRAPH + {0xA7A6, 0x573B}, //949 #CJK UNIFIED IDEOGRAPH + {0xA7A7, 0x58EF}, //950 #CJK UNIFIED IDEOGRAPH + {0xA7A8, 0x593E}, //951 #CJK UNIFIED IDEOGRAPH + {0xA7A9, 0x599D}, //952 #CJK UNIFIED IDEOGRAPH + {0xA7AA, 0x5992}, //953 #CJK UNIFIED IDEOGRAPH + {0xA7AB, 0x59A8}, //954 #CJK UNIFIED IDEOGRAPH + {0xA7AC, 0x599E}, //955 #CJK UNIFIED IDEOGRAPH + {0xA7AD, 0x59A3}, //956 #CJK UNIFIED IDEOGRAPH + {0xA7AE, 0x5999}, //957 #CJK UNIFIED IDEOGRAPH + {0xA7AF, 0x5996}, //958 #CJK UNIFIED IDEOGRAPH + {0xA7B0, 0x598D}, //959 #CJK UNIFIED IDEOGRAPH + {0xA7B1, 0x59A4}, //960 #CJK UNIFIED IDEOGRAPH + {0xA7B2, 0x5993}, //961 #CJK UNIFIED IDEOGRAPH + {0xA7B3, 0x598A}, //962 #CJK UNIFIED IDEOGRAPH + {0xA7B4, 0x59A5}, //963 #CJK UNIFIED IDEOGRAPH + {0xA7B5, 0x5B5D}, //964 #CJK UNIFIED IDEOGRAPH + {0xA7B6, 0x5B5C}, //965 #CJK UNIFIED IDEOGRAPH + {0xA7B7, 0x5B5A}, //966 #CJK UNIFIED IDEOGRAPH + {0xA7B8, 0x5B5B}, //967 #CJK UNIFIED IDEOGRAPH + {0xA7B9, 0x5B8C}, //968 #CJK UNIFIED IDEOGRAPH + {0xA7BA, 0x5B8B}, //969 #CJK UNIFIED IDEOGRAPH + {0xA7BB, 0x5B8F}, //970 #CJK UNIFIED IDEOGRAPH + {0xA7BC, 0x5C2C}, //971 #CJK UNIFIED IDEOGRAPH + {0xA7BD, 0x5C40}, //972 #CJK UNIFIED IDEOGRAPH + {0xA7BE, 0x5C41}, //973 #CJK UNIFIED IDEOGRAPH + {0xA7BF, 0x5C3F}, //974 #CJK UNIFIED IDEOGRAPH + {0xA7C0, 0x5C3E}, //975 #CJK UNIFIED IDEOGRAPH + {0xA7C1, 0x5C90}, //976 #CJK UNIFIED IDEOGRAPH + {0xA7C2, 0x5C91}, //977 #CJK UNIFIED IDEOGRAPH + {0xA7C3, 0x5C94}, //978 #CJK UNIFIED IDEOGRAPH + {0xA7C4, 0x5C8C}, //979 #CJK UNIFIED IDEOGRAPH + {0xA7C5, 0x5DEB}, //980 #CJK UNIFIED IDEOGRAPH + {0xA7C6, 0x5E0C}, //981 #CJK UNIFIED IDEOGRAPH + {0xA7C7, 0x5E8F}, //982 #CJK UNIFIED IDEOGRAPH + {0xA7C8, 0x5E87}, //983 #CJK UNIFIED IDEOGRAPH + {0xA7C9, 0x5E8A}, //984 #CJK UNIFIED IDEOGRAPH + {0xA7CA, 0x5EF7}, //985 #CJK UNIFIED IDEOGRAPH + {0xA7CB, 0x5F04}, //986 #CJK UNIFIED IDEOGRAPH + {0xA7CC, 0x5F1F}, //987 #CJK UNIFIED IDEOGRAPH + {0xA7CD, 0x5F64}, //988 #CJK UNIFIED IDEOGRAPH + {0xA7CE, 0x5F62}, //989 #CJK UNIFIED IDEOGRAPH + {0xA7CF, 0x5F77}, //990 #CJK UNIFIED IDEOGRAPH + {0xA7D0, 0x5F79}, //991 #CJK UNIFIED IDEOGRAPH + {0xA7D1, 0x5FD8}, //992 #CJK UNIFIED IDEOGRAPH + {0xA7D2, 0x5FCC}, //993 #CJK UNIFIED IDEOGRAPH + {0xA7D3, 0x5FD7}, //994 #CJK UNIFIED IDEOGRAPH + {0xA7D4, 0x5FCD}, //995 #CJK UNIFIED IDEOGRAPH + {0xA7D5, 0x5FF1}, //996 #CJK UNIFIED IDEOGRAPH + {0xA7D6, 0x5FEB}, //997 #CJK UNIFIED IDEOGRAPH + {0xA7D7, 0x5FF8}, //998 #CJK UNIFIED IDEOGRAPH + {0xA7D8, 0x5FEA}, //999 #CJK UNIFIED IDEOGRAPH + {0xA7D9, 0x6212}, //1000 #CJK UNIFIED IDEOGRAPH + {0xA7DA, 0x6211}, //1001 #CJK UNIFIED IDEOGRAPH + {0xA7DB, 0x6284}, //1002 #CJK UNIFIED IDEOGRAPH + {0xA7DC, 0x6297}, //1003 #CJK UNIFIED IDEOGRAPH + {0xA7DD, 0x6296}, //1004 #CJK UNIFIED IDEOGRAPH + {0xA7DE, 0x6280}, //1005 #CJK UNIFIED IDEOGRAPH + {0xA7DF, 0x6276}, //1006 #CJK UNIFIED IDEOGRAPH + {0xA7E0, 0x6289}, //1007 #CJK UNIFIED IDEOGRAPH + {0xA7E1, 0x626D}, //1008 #CJK UNIFIED IDEOGRAPH + {0xA7E2, 0x628A}, //1009 #CJK UNIFIED IDEOGRAPH + {0xA7E3, 0x627C}, //1010 #CJK UNIFIED IDEOGRAPH + {0xA7E4, 0x627E}, //1011 #CJK UNIFIED IDEOGRAPH + {0xA7E5, 0x6279}, //1012 #CJK UNIFIED IDEOGRAPH + {0xA7E6, 0x6273}, //1013 #CJK UNIFIED IDEOGRAPH + {0xA7E7, 0x6292}, //1014 #CJK UNIFIED IDEOGRAPH + {0xA7E8, 0x626F}, //1015 #CJK UNIFIED IDEOGRAPH + {0xA7E9, 0x6298}, //1016 #CJK UNIFIED IDEOGRAPH + {0xA7EA, 0x626E}, //1017 #CJK UNIFIED IDEOGRAPH + {0xA7EB, 0x6295}, //1018 #CJK UNIFIED IDEOGRAPH + {0xA7EC, 0x6293}, //1019 #CJK UNIFIED IDEOGRAPH + {0xA7ED, 0x6291}, //1020 #CJK UNIFIED IDEOGRAPH + {0xA7EE, 0x6286}, //1021 #CJK UNIFIED IDEOGRAPH + {0xA7EF, 0x6539}, //1022 #CJK UNIFIED IDEOGRAPH + {0xA7F0, 0x653B}, //1023 #CJK UNIFIED IDEOGRAPH + {0xA7F1, 0x6538}, //1024 #CJK UNIFIED IDEOGRAPH + {0xA7F2, 0x65F1}, //1025 #CJK UNIFIED IDEOGRAPH + {0xA7F3, 0x66F4}, //1026 #CJK UNIFIED IDEOGRAPH + {0xA7F4, 0x675F}, //1027 #CJK UNIFIED IDEOGRAPH + {0xA7F5, 0x674E}, //1028 #CJK UNIFIED IDEOGRAPH + {0xA7F6, 0x674F}, //1029 #CJK UNIFIED IDEOGRAPH + {0xA7F7, 0x6750}, //1030 #CJK UNIFIED IDEOGRAPH + {0xA7F8, 0x6751}, //1031 #CJK UNIFIED IDEOGRAPH + {0xA7F9, 0x675C}, //1032 #CJK UNIFIED IDEOGRAPH + {0xA7FA, 0x6756}, //1033 #CJK UNIFIED IDEOGRAPH + {0xA7FB, 0x675E}, //1034 #CJK UNIFIED IDEOGRAPH + {0xA7FC, 0x6749}, //1035 #CJK UNIFIED IDEOGRAPH + {0xA7FD, 0x6746}, //1036 #CJK UNIFIED IDEOGRAPH + {0xA7FE, 0x6760}, //1037 #CJK UNIFIED IDEOGRAPH + {0xA840, 0x6753}, //1038 #CJK UNIFIED IDEOGRAPH + {0xA841, 0x6757}, //1039 #CJK UNIFIED IDEOGRAPH + {0xA842, 0x6B65}, //1040 #CJK UNIFIED IDEOGRAPH + {0xA843, 0x6BCF}, //1041 #CJK UNIFIED IDEOGRAPH + {0xA844, 0x6C42}, //1042 #CJK UNIFIED IDEOGRAPH + {0xA845, 0x6C5E}, //1043 #CJK UNIFIED IDEOGRAPH + {0xA846, 0x6C99}, //1044 #CJK UNIFIED IDEOGRAPH + {0xA847, 0x6C81}, //1045 #CJK UNIFIED IDEOGRAPH + {0xA848, 0x6C88}, //1046 #CJK UNIFIED IDEOGRAPH + {0xA849, 0x6C89}, //1047 #CJK UNIFIED IDEOGRAPH + {0xA84A, 0x6C85}, //1048 #CJK UNIFIED IDEOGRAPH + {0xA84B, 0x6C9B}, //1049 #CJK UNIFIED IDEOGRAPH + {0xA84C, 0x6C6A}, //1050 #CJK UNIFIED IDEOGRAPH + {0xA84D, 0x6C7A}, //1051 #CJK UNIFIED IDEOGRAPH + {0xA84E, 0x6C90}, //1052 #CJK UNIFIED IDEOGRAPH + {0xA84F, 0x6C70}, //1053 #CJK UNIFIED IDEOGRAPH + {0xA850, 0x6C8C}, //1054 #CJK UNIFIED IDEOGRAPH + {0xA851, 0x6C68}, //1055 #CJK UNIFIED IDEOGRAPH + {0xA852, 0x6C96}, //1056 #CJK UNIFIED IDEOGRAPH + {0xA853, 0x6C92}, //1057 #CJK UNIFIED IDEOGRAPH + {0xA854, 0x6C7D}, //1058 #CJK UNIFIED IDEOGRAPH + {0xA855, 0x6C83}, //1059 #CJK UNIFIED IDEOGRAPH + {0xA856, 0x6C72}, //1060 #CJK UNIFIED IDEOGRAPH + {0xA857, 0x6C7E}, //1061 #CJK UNIFIED IDEOGRAPH + {0xA858, 0x6C74}, //1062 #CJK UNIFIED IDEOGRAPH + {0xA859, 0x6C86}, //1063 #CJK UNIFIED IDEOGRAPH + {0xA85A, 0x6C76}, //1064 #CJK UNIFIED IDEOGRAPH + {0xA85B, 0x6C8D}, //1065 #CJK UNIFIED IDEOGRAPH + {0xA85C, 0x6C94}, //1066 #CJK UNIFIED IDEOGRAPH + {0xA85D, 0x6C98}, //1067 #CJK UNIFIED IDEOGRAPH + {0xA85E, 0x6C82}, //1068 #CJK UNIFIED IDEOGRAPH + {0xA85F, 0x7076}, //1069 #CJK UNIFIED IDEOGRAPH + {0xA860, 0x707C}, //1070 #CJK UNIFIED IDEOGRAPH + {0xA861, 0x707D}, //1071 #CJK UNIFIED IDEOGRAPH + {0xA862, 0x7078}, //1072 #CJK UNIFIED IDEOGRAPH + {0xA863, 0x7262}, //1073 #CJK UNIFIED IDEOGRAPH + {0xA864, 0x7261}, //1074 #CJK UNIFIED IDEOGRAPH + {0xA865, 0x7260}, //1075 #CJK UNIFIED IDEOGRAPH + {0xA866, 0x72C4}, //1076 #CJK UNIFIED IDEOGRAPH + {0xA867, 0x72C2}, //1077 #CJK UNIFIED IDEOGRAPH + {0xA868, 0x7396}, //1078 #CJK UNIFIED IDEOGRAPH + {0xA869, 0x752C}, //1079 #CJK UNIFIED IDEOGRAPH + {0xA86A, 0x752B}, //1080 #CJK UNIFIED IDEOGRAPH + {0xA86B, 0x7537}, //1081 #CJK UNIFIED IDEOGRAPH + {0xA86C, 0x7538}, //1082 #CJK UNIFIED IDEOGRAPH + {0xA86D, 0x7682}, //1083 #CJK UNIFIED IDEOGRAPH + {0xA86E, 0x76EF}, //1084 #CJK UNIFIED IDEOGRAPH + {0xA86F, 0x77E3}, //1085 #CJK UNIFIED IDEOGRAPH + {0xA870, 0x79C1}, //1086 #CJK UNIFIED IDEOGRAPH + {0xA871, 0x79C0}, //1087 #CJK UNIFIED IDEOGRAPH + {0xA872, 0x79BF}, //1088 #CJK UNIFIED IDEOGRAPH + {0xA873, 0x7A76}, //1089 #CJK UNIFIED IDEOGRAPH + {0xA874, 0x7CFB}, //1090 #CJK UNIFIED IDEOGRAPH + {0xA875, 0x7F55}, //1091 #CJK UNIFIED IDEOGRAPH + {0xA876, 0x8096}, //1092 #CJK UNIFIED IDEOGRAPH + {0xA877, 0x8093}, //1093 #CJK UNIFIED IDEOGRAPH + {0xA878, 0x809D}, //1094 #CJK UNIFIED IDEOGRAPH + {0xA879, 0x8098}, //1095 #CJK UNIFIED IDEOGRAPH + {0xA87A, 0x809B}, //1096 #CJK UNIFIED IDEOGRAPH + {0xA87B, 0x809A}, //1097 #CJK UNIFIED IDEOGRAPH + {0xA87C, 0x80B2}, //1098 #CJK UNIFIED IDEOGRAPH + {0xA87D, 0x826F}, //1099 #CJK UNIFIED IDEOGRAPH + {0xA87E, 0x8292}, //1100 #CJK UNIFIED IDEOGRAPH + {0xA8A1, 0x828B}, //1101 #CJK UNIFIED IDEOGRAPH + {0xA8A2, 0x828D}, //1102 #CJK UNIFIED IDEOGRAPH + {0xA8A3, 0x898B}, //1103 #CJK UNIFIED IDEOGRAPH + {0xA8A4, 0x89D2}, //1104 #CJK UNIFIED IDEOGRAPH + {0xA8A5, 0x8A00}, //1105 #CJK UNIFIED IDEOGRAPH + {0xA8A6, 0x8C37}, //1106 #CJK UNIFIED IDEOGRAPH + {0xA8A7, 0x8C46}, //1107 #CJK UNIFIED IDEOGRAPH + {0xA8A8, 0x8C55}, //1108 #CJK UNIFIED IDEOGRAPH + {0xA8A9, 0x8C9D}, //1109 #CJK UNIFIED IDEOGRAPH + {0xA8AA, 0x8D64}, //1110 #CJK UNIFIED IDEOGRAPH + {0xA8AB, 0x8D70}, //1111 #CJK UNIFIED IDEOGRAPH + {0xA8AC, 0x8DB3}, //1112 #CJK UNIFIED IDEOGRAPH + {0xA8AD, 0x8EAB}, //1113 #CJK UNIFIED IDEOGRAPH + {0xA8AE, 0x8ECA}, //1114 #CJK UNIFIED IDEOGRAPH + {0xA8AF, 0x8F9B}, //1115 #CJK UNIFIED IDEOGRAPH + {0xA8B0, 0x8FB0}, //1116 #CJK UNIFIED IDEOGRAPH + {0xA8B1, 0x8FC2}, //1117 #CJK UNIFIED IDEOGRAPH + {0xA8B2, 0x8FC6}, //1118 #CJK UNIFIED IDEOGRAPH + {0xA8B3, 0x8FC5}, //1119 #CJK UNIFIED IDEOGRAPH + {0xA8B4, 0x8FC4}, //1120 #CJK UNIFIED IDEOGRAPH + {0xA8B5, 0x5DE1}, //1121 #CJK UNIFIED IDEOGRAPH + {0xA8B6, 0x9091}, //1122 #CJK UNIFIED IDEOGRAPH + {0xA8B7, 0x90A2}, //1123 #CJK UNIFIED IDEOGRAPH + {0xA8B8, 0x90AA}, //1124 #CJK UNIFIED IDEOGRAPH + {0xA8B9, 0x90A6}, //1125 #CJK UNIFIED IDEOGRAPH + {0xA8BA, 0x90A3}, //1126 #CJK UNIFIED IDEOGRAPH + {0xA8BB, 0x9149}, //1127 #CJK UNIFIED IDEOGRAPH + {0xA8BC, 0x91C6}, //1128 #CJK UNIFIED IDEOGRAPH + {0xA8BD, 0x91CC}, //1129 #CJK UNIFIED IDEOGRAPH + {0xA8BE, 0x9632}, //1130 #CJK UNIFIED IDEOGRAPH + {0xA8BF, 0x962E}, //1131 #CJK UNIFIED IDEOGRAPH + {0xA8C0, 0x9631}, //1132 #CJK UNIFIED IDEOGRAPH + {0xA8C1, 0x962A}, //1133 #CJK UNIFIED IDEOGRAPH + {0xA8C2, 0x962C}, //1134 #CJK UNIFIED IDEOGRAPH + {0xA8C3, 0x4E26}, //1135 #CJK UNIFIED IDEOGRAPH + {0xA8C4, 0x4E56}, //1136 #CJK UNIFIED IDEOGRAPH + {0xA8C5, 0x4E73}, //1137 #CJK UNIFIED IDEOGRAPH + {0xA8C6, 0x4E8B}, //1138 #CJK UNIFIED IDEOGRAPH + {0xA8C7, 0x4E9B}, //1139 #CJK UNIFIED IDEOGRAPH + {0xA8C8, 0x4E9E}, //1140 #CJK UNIFIED IDEOGRAPH + {0xA8C9, 0x4EAB}, //1141 #CJK UNIFIED IDEOGRAPH + {0xA8CA, 0x4EAC}, //1142 #CJK UNIFIED IDEOGRAPH + {0xA8CB, 0x4F6F}, //1143 #CJK UNIFIED IDEOGRAPH + {0xA8CC, 0x4F9D}, //1144 #CJK UNIFIED IDEOGRAPH + {0xA8CD, 0x4F8D}, //1145 #CJK UNIFIED IDEOGRAPH + {0xA8CE, 0x4F73}, //1146 #CJK UNIFIED IDEOGRAPH + {0xA8CF, 0x4F7F}, //1147 #CJK UNIFIED IDEOGRAPH + {0xA8D0, 0x4F6C}, //1148 #CJK UNIFIED IDEOGRAPH + {0xA8D1, 0x4F9B}, //1149 #CJK UNIFIED IDEOGRAPH + {0xA8D2, 0x4F8B}, //1150 #CJK UNIFIED IDEOGRAPH + {0xA8D3, 0x4F86}, //1151 #CJK UNIFIED IDEOGRAPH + {0xA8D4, 0x4F83}, //1152 #CJK UNIFIED IDEOGRAPH + {0xA8D5, 0x4F70}, //1153 #CJK UNIFIED IDEOGRAPH + {0xA8D6, 0x4F75}, //1154 #CJK UNIFIED IDEOGRAPH + {0xA8D7, 0x4F88}, //1155 #CJK UNIFIED IDEOGRAPH + {0xA8D8, 0x4F69}, //1156 #CJK UNIFIED IDEOGRAPH + {0xA8D9, 0x4F7B}, //1157 #CJK UNIFIED IDEOGRAPH + {0xA8DA, 0x4F96}, //1158 #CJK UNIFIED IDEOGRAPH + {0xA8DB, 0x4F7E}, //1159 #CJK UNIFIED IDEOGRAPH + {0xA8DC, 0x4F8F}, //1160 #CJK UNIFIED IDEOGRAPH + {0xA8DD, 0x4F91}, //1161 #CJK UNIFIED IDEOGRAPH + {0xA8DE, 0x4F7A}, //1162 #CJK UNIFIED IDEOGRAPH + {0xA8DF, 0x5154}, //1163 #CJK UNIFIED IDEOGRAPH + {0xA8E0, 0x5152}, //1164 #CJK UNIFIED IDEOGRAPH + {0xA8E1, 0x5155}, //1165 #CJK UNIFIED IDEOGRAPH + {0xA8E2, 0x5169}, //1166 #CJK UNIFIED IDEOGRAPH + {0xA8E3, 0x5177}, //1167 #CJK UNIFIED IDEOGRAPH + {0xA8E4, 0x5176}, //1168 #CJK UNIFIED IDEOGRAPH + {0xA8E5, 0x5178}, //1169 #CJK UNIFIED IDEOGRAPH + {0xA8E6, 0x51BD}, //1170 #CJK UNIFIED IDEOGRAPH + {0xA8E7, 0x51FD}, //1171 #CJK UNIFIED IDEOGRAPH + {0xA8E8, 0x523B}, //1172 #CJK UNIFIED IDEOGRAPH + {0xA8E9, 0x5238}, //1173 #CJK UNIFIED IDEOGRAPH + {0xA8EA, 0x5237}, //1174 #CJK UNIFIED IDEOGRAPH + {0xA8EB, 0x523A}, //1175 #CJK UNIFIED IDEOGRAPH + {0xA8EC, 0x5230}, //1176 #CJK UNIFIED IDEOGRAPH + {0xA8ED, 0x522E}, //1177 #CJK UNIFIED IDEOGRAPH + {0xA8EE, 0x5236}, //1178 #CJK UNIFIED IDEOGRAPH + {0xA8EF, 0x5241}, //1179 #CJK UNIFIED IDEOGRAPH + {0xA8F0, 0x52BE}, //1180 #CJK UNIFIED IDEOGRAPH + {0xA8F1, 0x52BB}, //1181 #CJK UNIFIED IDEOGRAPH + {0xA8F2, 0x5352}, //1182 #CJK UNIFIED IDEOGRAPH + {0xA8F3, 0x5354}, //1183 #CJK UNIFIED IDEOGRAPH + {0xA8F4, 0x5353}, //1184 #CJK UNIFIED IDEOGRAPH + {0xA8F5, 0x5351}, //1185 #CJK UNIFIED IDEOGRAPH + {0xA8F6, 0x5366}, //1186 #CJK UNIFIED IDEOGRAPH + {0xA8F7, 0x5377}, //1187 #CJK UNIFIED IDEOGRAPH + {0xA8F8, 0x5378}, //1188 #CJK UNIFIED IDEOGRAPH + {0xA8F9, 0x5379}, //1189 #CJK UNIFIED IDEOGRAPH + {0xA8FA, 0x53D6}, //1190 #CJK UNIFIED IDEOGRAPH + {0xA8FB, 0x53D4}, //1191 #CJK UNIFIED IDEOGRAPH + {0xA8FC, 0x53D7}, //1192 #CJK UNIFIED IDEOGRAPH + {0xA8FD, 0x5473}, //1193 #CJK UNIFIED IDEOGRAPH + {0xA8FE, 0x5475}, //1194 #CJK UNIFIED IDEOGRAPH + {0xA940, 0x5496}, //1195 #CJK UNIFIED IDEOGRAPH + {0xA941, 0x5478}, //1196 #CJK UNIFIED IDEOGRAPH + {0xA942, 0x5495}, //1197 #CJK UNIFIED IDEOGRAPH + {0xA943, 0x5480}, //1198 #CJK UNIFIED IDEOGRAPH + {0xA944, 0x547B}, //1199 #CJK UNIFIED IDEOGRAPH + {0xA945, 0x5477}, //1200 #CJK UNIFIED IDEOGRAPH + {0xA946, 0x5484}, //1201 #CJK UNIFIED IDEOGRAPH + {0xA947, 0x5492}, //1202 #CJK UNIFIED IDEOGRAPH + {0xA948, 0x5486}, //1203 #CJK UNIFIED IDEOGRAPH + {0xA949, 0x547C}, //1204 #CJK UNIFIED IDEOGRAPH + {0xA94A, 0x5490}, //1205 #CJK UNIFIED IDEOGRAPH + {0xA94B, 0x5471}, //1206 #CJK UNIFIED IDEOGRAPH + {0xA94C, 0x5476}, //1207 #CJK UNIFIED IDEOGRAPH + {0xA94D, 0x548C}, //1208 #CJK UNIFIED IDEOGRAPH + {0xA94E, 0x549A}, //1209 #CJK UNIFIED IDEOGRAPH + {0xA94F, 0x5462}, //1210 #CJK UNIFIED IDEOGRAPH + {0xA950, 0x5468}, //1211 #CJK UNIFIED IDEOGRAPH + {0xA951, 0x548B}, //1212 #CJK UNIFIED IDEOGRAPH + {0xA952, 0x547D}, //1213 #CJK UNIFIED IDEOGRAPH + {0xA953, 0x548E}, //1214 #CJK UNIFIED IDEOGRAPH + {0xA954, 0x56FA}, //1215 #CJK UNIFIED IDEOGRAPH + {0xA955, 0x5783}, //1216 #CJK UNIFIED IDEOGRAPH + {0xA956, 0x5777}, //1217 #CJK UNIFIED IDEOGRAPH + {0xA957, 0x576A}, //1218 #CJK UNIFIED IDEOGRAPH + {0xA958, 0x5769}, //1219 #CJK UNIFIED IDEOGRAPH + {0xA959, 0x5761}, //1220 #CJK UNIFIED IDEOGRAPH + {0xA95A, 0x5766}, //1221 #CJK UNIFIED IDEOGRAPH + {0xA95B, 0x5764}, //1222 #CJK UNIFIED IDEOGRAPH + {0xA95C, 0x577C}, //1223 #CJK UNIFIED IDEOGRAPH + {0xA95D, 0x591C}, //1224 #CJK UNIFIED IDEOGRAPH + {0xA95E, 0x5949}, //1225 #CJK UNIFIED IDEOGRAPH + {0xA95F, 0x5947}, //1226 #CJK UNIFIED IDEOGRAPH + {0xA960, 0x5948}, //1227 #CJK UNIFIED IDEOGRAPH + {0xA961, 0x5944}, //1228 #CJK UNIFIED IDEOGRAPH + {0xA962, 0x5954}, //1229 #CJK UNIFIED IDEOGRAPH + {0xA963, 0x59BE}, //1230 #CJK UNIFIED IDEOGRAPH + {0xA964, 0x59BB}, //1231 #CJK UNIFIED IDEOGRAPH + {0xA965, 0x59D4}, //1232 #CJK UNIFIED IDEOGRAPH + {0xA966, 0x59B9}, //1233 #CJK UNIFIED IDEOGRAPH + {0xA967, 0x59AE}, //1234 #CJK UNIFIED IDEOGRAPH + {0xA968, 0x59D1}, //1235 #CJK UNIFIED IDEOGRAPH + {0xA969, 0x59C6}, //1236 #CJK UNIFIED IDEOGRAPH + {0xA96A, 0x59D0}, //1237 #CJK UNIFIED IDEOGRAPH + {0xA96B, 0x59CD}, //1238 #CJK UNIFIED IDEOGRAPH + {0xA96C, 0x59CB}, //1239 #CJK UNIFIED IDEOGRAPH + {0xA96D, 0x59D3}, //1240 #CJK UNIFIED IDEOGRAPH + {0xA96E, 0x59CA}, //1241 #CJK UNIFIED IDEOGRAPH + {0xA96F, 0x59AF}, //1242 #CJK UNIFIED IDEOGRAPH + {0xA970, 0x59B3}, //1243 #CJK UNIFIED IDEOGRAPH + {0xA971, 0x59D2}, //1244 #CJK UNIFIED IDEOGRAPH + {0xA972, 0x59C5}, //1245 #CJK UNIFIED IDEOGRAPH + {0xA973, 0x5B5F}, //1246 #CJK UNIFIED IDEOGRAPH + {0xA974, 0x5B64}, //1247 #CJK UNIFIED IDEOGRAPH + {0xA975, 0x5B63}, //1248 #CJK UNIFIED IDEOGRAPH + {0xA976, 0x5B97}, //1249 #CJK UNIFIED IDEOGRAPH + {0xA977, 0x5B9A}, //1250 #CJK UNIFIED IDEOGRAPH + {0xA978, 0x5B98}, //1251 #CJK UNIFIED IDEOGRAPH + {0xA979, 0x5B9C}, //1252 #CJK UNIFIED IDEOGRAPH + {0xA97A, 0x5B99}, //1253 #CJK UNIFIED IDEOGRAPH + {0xA97B, 0x5B9B}, //1254 #CJK UNIFIED IDEOGRAPH + {0xA97C, 0x5C1A}, //1255 #CJK UNIFIED IDEOGRAPH + {0xA97D, 0x5C48}, //1256 #CJK UNIFIED IDEOGRAPH + {0xA97E, 0x5C45}, //1257 #CJK UNIFIED IDEOGRAPH + {0xA9A1, 0x5C46}, //1258 #CJK UNIFIED IDEOGRAPH + {0xA9A2, 0x5CB7}, //1259 #CJK UNIFIED IDEOGRAPH + {0xA9A3, 0x5CA1}, //1260 #CJK UNIFIED IDEOGRAPH + {0xA9A4, 0x5CB8}, //1261 #CJK UNIFIED IDEOGRAPH + {0xA9A5, 0x5CA9}, //1262 #CJK UNIFIED IDEOGRAPH + {0xA9A6, 0x5CAB}, //1263 #CJK UNIFIED IDEOGRAPH + {0xA9A7, 0x5CB1}, //1264 #CJK UNIFIED IDEOGRAPH + {0xA9A8, 0x5CB3}, //1265 #CJK UNIFIED IDEOGRAPH + {0xA9A9, 0x5E18}, //1266 #CJK UNIFIED IDEOGRAPH + {0xA9AA, 0x5E1A}, //1267 #CJK UNIFIED IDEOGRAPH + {0xA9AB, 0x5E16}, //1268 #CJK UNIFIED IDEOGRAPH + {0xA9AC, 0x5E15}, //1269 #CJK UNIFIED IDEOGRAPH + {0xA9AD, 0x5E1B}, //1270 #CJK UNIFIED IDEOGRAPH + {0xA9AE, 0x5E11}, //1271 #CJK UNIFIED IDEOGRAPH + {0xA9AF, 0x5E78}, //1272 #CJK UNIFIED IDEOGRAPH + {0xA9B0, 0x5E9A}, //1273 #CJK UNIFIED IDEOGRAPH + {0xA9B1, 0x5E97}, //1274 #CJK UNIFIED IDEOGRAPH + {0xA9B2, 0x5E9C}, //1275 #CJK UNIFIED IDEOGRAPH + {0xA9B3, 0x5E95}, //1276 #CJK UNIFIED IDEOGRAPH + {0xA9B4, 0x5E96}, //1277 #CJK UNIFIED IDEOGRAPH + {0xA9B5, 0x5EF6}, //1278 #CJK UNIFIED IDEOGRAPH + {0xA9B6, 0x5F26}, //1279 #CJK UNIFIED IDEOGRAPH + {0xA9B7, 0x5F27}, //1280 #CJK UNIFIED IDEOGRAPH + {0xA9B8, 0x5F29}, //1281 #CJK UNIFIED IDEOGRAPH + {0xA9B9, 0x5F80}, //1282 #CJK UNIFIED IDEOGRAPH + {0xA9BA, 0x5F81}, //1283 #CJK UNIFIED IDEOGRAPH + {0xA9BB, 0x5F7F}, //1284 #CJK UNIFIED IDEOGRAPH + {0xA9BC, 0x5F7C}, //1285 #CJK UNIFIED IDEOGRAPH + {0xA9BD, 0x5FDD}, //1286 #CJK UNIFIED IDEOGRAPH + {0xA9BE, 0x5FE0}, //1287 #CJK UNIFIED IDEOGRAPH + {0xA9BF, 0x5FFD}, //1288 #CJK UNIFIED IDEOGRAPH + {0xA9C0, 0x5FF5}, //1289 #CJK UNIFIED IDEOGRAPH + {0xA9C1, 0x5FFF}, //1290 #CJK UNIFIED IDEOGRAPH + {0xA9C2, 0x600F}, //1291 #CJK UNIFIED IDEOGRAPH + {0xA9C3, 0x6014}, //1292 #CJK UNIFIED IDEOGRAPH + {0xA9C4, 0x602F}, //1293 #CJK UNIFIED IDEOGRAPH + {0xA9C5, 0x6035}, //1294 #CJK UNIFIED IDEOGRAPH + {0xA9C6, 0x6016}, //1295 #CJK UNIFIED IDEOGRAPH + {0xA9C7, 0x602A}, //1296 #CJK UNIFIED IDEOGRAPH + {0xA9C8, 0x6015}, //1297 #CJK UNIFIED IDEOGRAPH + {0xA9C9, 0x6021}, //1298 #CJK UNIFIED IDEOGRAPH + {0xA9CA, 0x6027}, //1299 #CJK UNIFIED IDEOGRAPH + {0xA9CB, 0x6029}, //1300 #CJK UNIFIED IDEOGRAPH + {0xA9CC, 0x602B}, //1301 #CJK UNIFIED IDEOGRAPH + {0xA9CD, 0x601B}, //1302 #CJK UNIFIED IDEOGRAPH + {0xA9CE, 0x6216}, //1303 #CJK UNIFIED IDEOGRAPH + {0xA9CF, 0x6215}, //1304 #CJK UNIFIED IDEOGRAPH + {0xA9D0, 0x623F}, //1305 #CJK UNIFIED IDEOGRAPH + {0xA9D1, 0x623E}, //1306 #CJK UNIFIED IDEOGRAPH + {0xA9D2, 0x6240}, //1307 #CJK UNIFIED IDEOGRAPH + {0xA9D3, 0x627F}, //1308 #CJK UNIFIED IDEOGRAPH + {0xA9D4, 0x62C9}, //1309 #CJK UNIFIED IDEOGRAPH + {0xA9D5, 0x62CC}, //1310 #CJK UNIFIED IDEOGRAPH + {0xA9D6, 0x62C4}, //1311 #CJK UNIFIED IDEOGRAPH + {0xA9D7, 0x62BF}, //1312 #CJK UNIFIED IDEOGRAPH + {0xA9D8, 0x62C2}, //1313 #CJK UNIFIED IDEOGRAPH + {0xA9D9, 0x62B9}, //1314 #CJK UNIFIED IDEOGRAPH + {0xA9DA, 0x62D2}, //1315 #CJK UNIFIED IDEOGRAPH + {0xA9DB, 0x62DB}, //1316 #CJK UNIFIED IDEOGRAPH + {0xA9DC, 0x62AB}, //1317 #CJK UNIFIED IDEOGRAPH + {0xA9DD, 0x62D3}, //1318 #CJK UNIFIED IDEOGRAPH + {0xA9DE, 0x62D4}, //1319 #CJK UNIFIED IDEOGRAPH + {0xA9DF, 0x62CB}, //1320 #CJK UNIFIED IDEOGRAPH + {0xA9E0, 0x62C8}, //1321 #CJK UNIFIED IDEOGRAPH + {0xA9E1, 0x62A8}, //1322 #CJK UNIFIED IDEOGRAPH + {0xA9E2, 0x62BD}, //1323 #CJK UNIFIED IDEOGRAPH + {0xA9E3, 0x62BC}, //1324 #CJK UNIFIED IDEOGRAPH + {0xA9E4, 0x62D0}, //1325 #CJK UNIFIED IDEOGRAPH + {0xA9E5, 0x62D9}, //1326 #CJK UNIFIED IDEOGRAPH + {0xA9E6, 0x62C7}, //1327 #CJK UNIFIED IDEOGRAPH + {0xA9E7, 0x62CD}, //1328 #CJK UNIFIED IDEOGRAPH + {0xA9E8, 0x62B5}, //1329 #CJK UNIFIED IDEOGRAPH + {0xA9E9, 0x62DA}, //1330 #CJK UNIFIED IDEOGRAPH + {0xA9EA, 0x62B1}, //1331 #CJK UNIFIED IDEOGRAPH + {0xA9EB, 0x62D8}, //1332 #CJK UNIFIED IDEOGRAPH + {0xA9EC, 0x62D6}, //1333 #CJK UNIFIED IDEOGRAPH + {0xA9ED, 0x62D7}, //1334 #CJK UNIFIED IDEOGRAPH + {0xA9EE, 0x62C6}, //1335 #CJK UNIFIED IDEOGRAPH + {0xA9EF, 0x62AC}, //1336 #CJK UNIFIED IDEOGRAPH + {0xA9F0, 0x62CE}, //1337 #CJK UNIFIED IDEOGRAPH + {0xA9F1, 0x653E}, //1338 #CJK UNIFIED IDEOGRAPH + {0xA9F2, 0x65A7}, //1339 #CJK UNIFIED IDEOGRAPH + {0xA9F3, 0x65BC}, //1340 #CJK UNIFIED IDEOGRAPH + {0xA9F4, 0x65FA}, //1341 #CJK UNIFIED IDEOGRAPH + {0xA9F5, 0x6614}, //1342 #CJK UNIFIED IDEOGRAPH + {0xA9F6, 0x6613}, //1343 #CJK UNIFIED IDEOGRAPH + {0xA9F7, 0x660C}, //1344 #CJK UNIFIED IDEOGRAPH + {0xA9F8, 0x6606}, //1345 #CJK UNIFIED IDEOGRAPH + {0xA9F9, 0x6602}, //1346 #CJK UNIFIED IDEOGRAPH + {0xA9FA, 0x660E}, //1347 #CJK UNIFIED IDEOGRAPH + {0xA9FB, 0x6600}, //1348 #CJK UNIFIED IDEOGRAPH + {0xA9FC, 0x660F}, //1349 #CJK UNIFIED IDEOGRAPH + {0xA9FD, 0x6615}, //1350 #CJK UNIFIED IDEOGRAPH + {0xA9FE, 0x660A}, //1351 #CJK UNIFIED IDEOGRAPH + {0xAA40, 0x6607}, //1352 #CJK UNIFIED IDEOGRAPH + {0xAA41, 0x670D}, //1353 #CJK UNIFIED IDEOGRAPH + {0xAA42, 0x670B}, //1354 #CJK UNIFIED IDEOGRAPH + {0xAA43, 0x676D}, //1355 #CJK UNIFIED IDEOGRAPH + {0xAA44, 0x678B}, //1356 #CJK UNIFIED IDEOGRAPH + {0xAA45, 0x6795}, //1357 #CJK UNIFIED IDEOGRAPH + {0xAA46, 0x6771}, //1358 #CJK UNIFIED IDEOGRAPH + {0xAA47, 0x679C}, //1359 #CJK UNIFIED IDEOGRAPH + {0xAA48, 0x6773}, //1360 #CJK UNIFIED IDEOGRAPH + {0xAA49, 0x6777}, //1361 #CJK UNIFIED IDEOGRAPH + {0xAA4A, 0x6787}, //1362 #CJK UNIFIED IDEOGRAPH + {0xAA4B, 0x679D}, //1363 #CJK UNIFIED IDEOGRAPH + {0xAA4C, 0x6797}, //1364 #CJK UNIFIED IDEOGRAPH + {0xAA4D, 0x676F}, //1365 #CJK UNIFIED IDEOGRAPH + {0xAA4E, 0x6770}, //1366 #CJK UNIFIED IDEOGRAPH + {0xAA4F, 0x677F}, //1367 #CJK UNIFIED IDEOGRAPH + {0xAA50, 0x6789}, //1368 #CJK UNIFIED IDEOGRAPH + {0xAA51, 0x677E}, //1369 #CJK UNIFIED IDEOGRAPH + {0xAA52, 0x6790}, //1370 #CJK UNIFIED IDEOGRAPH + {0xAA53, 0x6775}, //1371 #CJK UNIFIED IDEOGRAPH + {0xAA54, 0x679A}, //1372 #CJK UNIFIED IDEOGRAPH + {0xAA55, 0x6793}, //1373 #CJK UNIFIED IDEOGRAPH + {0xAA56, 0x677C}, //1374 #CJK UNIFIED IDEOGRAPH + {0xAA57, 0x676A}, //1375 #CJK UNIFIED IDEOGRAPH + {0xAA58, 0x6772}, //1376 #CJK UNIFIED IDEOGRAPH + {0xAA59, 0x6B23}, //1377 #CJK UNIFIED IDEOGRAPH + {0xAA5A, 0x6B66}, //1378 #CJK UNIFIED IDEOGRAPH + {0xAA5B, 0x6B67}, //1379 #CJK UNIFIED IDEOGRAPH + {0xAA5C, 0x6B7F}, //1380 #CJK UNIFIED IDEOGRAPH + {0xAA5D, 0x6C13}, //1381 #CJK UNIFIED IDEOGRAPH + {0xAA5E, 0x6C1B}, //1382 #CJK UNIFIED IDEOGRAPH + {0xAA5F, 0x6CE3}, //1383 #CJK UNIFIED IDEOGRAPH + {0xAA60, 0x6CE8}, //1384 #CJK UNIFIED IDEOGRAPH + {0xAA61, 0x6CF3}, //1385 #CJK UNIFIED IDEOGRAPH + {0xAA62, 0x6CB1}, //1386 #CJK UNIFIED IDEOGRAPH + {0xAA63, 0x6CCC}, //1387 #CJK UNIFIED IDEOGRAPH + {0xAA64, 0x6CE5}, //1388 #CJK UNIFIED IDEOGRAPH + {0xAA65, 0x6CB3}, //1389 #CJK UNIFIED IDEOGRAPH + {0xAA66, 0x6CBD}, //1390 #CJK UNIFIED IDEOGRAPH + {0xAA67, 0x6CBE}, //1391 #CJK UNIFIED IDEOGRAPH + {0xAA68, 0x6CBC}, //1392 #CJK UNIFIED IDEOGRAPH + {0xAA69, 0x6CE2}, //1393 #CJK UNIFIED IDEOGRAPH + {0xAA6A, 0x6CAB}, //1394 #CJK UNIFIED IDEOGRAPH + {0xAA6B, 0x6CD5}, //1395 #CJK UNIFIED IDEOGRAPH + {0xAA6C, 0x6CD3}, //1396 #CJK UNIFIED IDEOGRAPH + {0xAA6D, 0x6CB8}, //1397 #CJK UNIFIED IDEOGRAPH + {0xAA6E, 0x6CC4}, //1398 #CJK UNIFIED IDEOGRAPH + {0xAA6F, 0x6CB9}, //1399 #CJK UNIFIED IDEOGRAPH + {0xAA70, 0x6CC1}, //1400 #CJK UNIFIED IDEOGRAPH + {0xAA71, 0x6CAE}, //1401 #CJK UNIFIED IDEOGRAPH + {0xAA72, 0x6CD7}, //1402 #CJK UNIFIED IDEOGRAPH + {0xAA73, 0x6CC5}, //1403 #CJK UNIFIED IDEOGRAPH + {0xAA74, 0x6CF1}, //1404 #CJK UNIFIED IDEOGRAPH + {0xAA75, 0x6CBF}, //1405 #CJK UNIFIED IDEOGRAPH + {0xAA76, 0x6CBB}, //1406 #CJK UNIFIED IDEOGRAPH + {0xAA77, 0x6CE1}, //1407 #CJK UNIFIED IDEOGRAPH + {0xAA78, 0x6CDB}, //1408 #CJK UNIFIED IDEOGRAPH + {0xAA79, 0x6CCA}, //1409 #CJK UNIFIED IDEOGRAPH + {0xAA7A, 0x6CAC}, //1410 #CJK UNIFIED IDEOGRAPH + {0xAA7B, 0x6CEF}, //1411 #CJK UNIFIED IDEOGRAPH + {0xAA7C, 0x6CDC}, //1412 #CJK UNIFIED IDEOGRAPH + {0xAA7D, 0x6CD6}, //1413 #CJK UNIFIED IDEOGRAPH + {0xAA7E, 0x6CE0}, //1414 #CJK UNIFIED IDEOGRAPH + {0xAAA1, 0x7095}, //1415 #CJK UNIFIED IDEOGRAPH + {0xAAA2, 0x708E}, //1416 #CJK UNIFIED IDEOGRAPH + {0xAAA3, 0x7092}, //1417 #CJK UNIFIED IDEOGRAPH + {0xAAA4, 0x708A}, //1418 #CJK UNIFIED IDEOGRAPH + {0xAAA5, 0x7099}, //1419 #CJK UNIFIED IDEOGRAPH + {0xAAA6, 0x722C}, //1420 #CJK UNIFIED IDEOGRAPH + {0xAAA7, 0x722D}, //1421 #CJK UNIFIED IDEOGRAPH + {0xAAA8, 0x7238}, //1422 #CJK UNIFIED IDEOGRAPH + {0xAAA9, 0x7248}, //1423 #CJK UNIFIED IDEOGRAPH + {0xAAAA, 0x7267}, //1424 #CJK UNIFIED IDEOGRAPH + {0xAAAB, 0x7269}, //1425 #CJK UNIFIED IDEOGRAPH + {0xAAAC, 0x72C0}, //1426 #CJK UNIFIED IDEOGRAPH + {0xAAAD, 0x72CE}, //1427 #CJK UNIFIED IDEOGRAPH + {0xAAAE, 0x72D9}, //1428 #CJK UNIFIED IDEOGRAPH + {0xAAAF, 0x72D7}, //1429 #CJK UNIFIED IDEOGRAPH + {0xAAB0, 0x72D0}, //1430 #CJK UNIFIED IDEOGRAPH + {0xAAB1, 0x73A9}, //1431 #CJK UNIFIED IDEOGRAPH + {0xAAB2, 0x73A8}, //1432 #CJK UNIFIED IDEOGRAPH + {0xAAB3, 0x739F}, //1433 #CJK UNIFIED IDEOGRAPH + {0xAAB4, 0x73AB}, //1434 #CJK UNIFIED IDEOGRAPH + {0xAAB5, 0x73A5}, //1435 #CJK UNIFIED IDEOGRAPH + {0xAAB6, 0x753D}, //1436 #CJK UNIFIED IDEOGRAPH + {0xAAB7, 0x759D}, //1437 #CJK UNIFIED IDEOGRAPH + {0xAAB8, 0x7599}, //1438 #CJK UNIFIED IDEOGRAPH + {0xAAB9, 0x759A}, //1439 #CJK UNIFIED IDEOGRAPH + {0xAABA, 0x7684}, //1440 #CJK UNIFIED IDEOGRAPH + {0xAABB, 0x76C2}, //1441 #CJK UNIFIED IDEOGRAPH + {0xAABC, 0x76F2}, //1442 #CJK UNIFIED IDEOGRAPH + {0xAABD, 0x76F4}, //1443 #CJK UNIFIED IDEOGRAPH + {0xAABE, 0x77E5}, //1444 #CJK UNIFIED IDEOGRAPH + {0xAABF, 0x77FD}, //1445 #CJK UNIFIED IDEOGRAPH + {0xAAC0, 0x793E}, //1446 #CJK UNIFIED IDEOGRAPH + {0xAAC1, 0x7940}, //1447 #CJK UNIFIED IDEOGRAPH + {0xAAC2, 0x7941}, //1448 #CJK UNIFIED IDEOGRAPH + {0xAAC3, 0x79C9}, //1449 #CJK UNIFIED IDEOGRAPH + {0xAAC4, 0x79C8}, //1450 #CJK UNIFIED IDEOGRAPH + {0xAAC5, 0x7A7A}, //1451 #CJK UNIFIED IDEOGRAPH + {0xAAC6, 0x7A79}, //1452 #CJK UNIFIED IDEOGRAPH + {0xAAC7, 0x7AFA}, //1453 #CJK UNIFIED IDEOGRAPH + {0xAAC8, 0x7CFE}, //1454 #CJK UNIFIED IDEOGRAPH + {0xAAC9, 0x7F54}, //1455 #CJK UNIFIED IDEOGRAPH + {0xAACA, 0x7F8C}, //1456 #CJK UNIFIED IDEOGRAPH + {0xAACB, 0x7F8B}, //1457 #CJK UNIFIED IDEOGRAPH + {0xAACC, 0x8005}, //1458 #CJK UNIFIED IDEOGRAPH + {0xAACD, 0x80BA}, //1459 #CJK UNIFIED IDEOGRAPH + {0xAACE, 0x80A5}, //1460 #CJK UNIFIED IDEOGRAPH + {0xAACF, 0x80A2}, //1461 #CJK UNIFIED IDEOGRAPH + {0xAAD0, 0x80B1}, //1462 #CJK UNIFIED IDEOGRAPH + {0xAAD1, 0x80A1}, //1463 #CJK UNIFIED IDEOGRAPH + {0xAAD2, 0x80AB}, //1464 #CJK UNIFIED IDEOGRAPH + {0xAAD3, 0x80A9}, //1465 #CJK UNIFIED IDEOGRAPH + {0xAAD4, 0x80B4}, //1466 #CJK UNIFIED IDEOGRAPH + {0xAAD5, 0x80AA}, //1467 #CJK UNIFIED IDEOGRAPH + {0xAAD6, 0x80AF}, //1468 #CJK UNIFIED IDEOGRAPH + {0xAAD7, 0x81E5}, //1469 #CJK UNIFIED IDEOGRAPH + {0xAAD8, 0x81FE}, //1470 #CJK UNIFIED IDEOGRAPH + {0xAAD9, 0x820D}, //1471 #CJK UNIFIED IDEOGRAPH + {0xAADA, 0x82B3}, //1472 #CJK UNIFIED IDEOGRAPH + {0xAADB, 0x829D}, //1473 #CJK UNIFIED IDEOGRAPH + {0xAADC, 0x8299}, //1474 #CJK UNIFIED IDEOGRAPH + {0xAADD, 0x82AD}, //1475 #CJK UNIFIED IDEOGRAPH + {0xAADE, 0x82BD}, //1476 #CJK UNIFIED IDEOGRAPH + {0xAADF, 0x829F}, //1477 #CJK UNIFIED IDEOGRAPH + {0xAAE0, 0x82B9}, //1478 #CJK UNIFIED IDEOGRAPH + {0xAAE1, 0x82B1}, //1479 #CJK UNIFIED IDEOGRAPH + {0xAAE2, 0x82AC}, //1480 #CJK UNIFIED IDEOGRAPH + {0xAAE3, 0x82A5}, //1481 #CJK UNIFIED IDEOGRAPH + {0xAAE4, 0x82AF}, //1482 #CJK UNIFIED IDEOGRAPH + {0xAAE5, 0x82B8}, //1483 #CJK UNIFIED IDEOGRAPH + {0xAAE6, 0x82A3}, //1484 #CJK UNIFIED IDEOGRAPH + {0xAAE7, 0x82B0}, //1485 #CJK UNIFIED IDEOGRAPH + {0xAAE8, 0x82BE}, //1486 #CJK UNIFIED IDEOGRAPH + {0xAAE9, 0x82B7}, //1487 #CJK UNIFIED IDEOGRAPH + {0xAAEA, 0x864E}, //1488 #CJK UNIFIED IDEOGRAPH + {0xAAEB, 0x8671}, //1489 #CJK UNIFIED IDEOGRAPH + {0xAAEC, 0x521D}, //1490 #CJK UNIFIED IDEOGRAPH + {0xAAED, 0x8868}, //1491 #CJK UNIFIED IDEOGRAPH + {0xAAEE, 0x8ECB}, //1492 #CJK UNIFIED IDEOGRAPH + {0xAAEF, 0x8FCE}, //1493 #CJK UNIFIED IDEOGRAPH + {0xAAF0, 0x8FD4}, //1494 #CJK UNIFIED IDEOGRAPH + {0xAAF1, 0x8FD1}, //1495 #CJK UNIFIED IDEOGRAPH + {0xAAF2, 0x90B5}, //1496 #CJK UNIFIED IDEOGRAPH + {0xAAF3, 0x90B8}, //1497 #CJK UNIFIED IDEOGRAPH + {0xAAF4, 0x90B1}, //1498 #CJK UNIFIED IDEOGRAPH + {0xAAF5, 0x90B6}, //1499 #CJK UNIFIED IDEOGRAPH + {0xAAF6, 0x91C7}, //1500 #CJK UNIFIED IDEOGRAPH + {0xAAF7, 0x91D1}, //1501 #CJK UNIFIED IDEOGRAPH + {0xAAF8, 0x9577}, //1502 #CJK UNIFIED IDEOGRAPH + {0xAAF9, 0x9580}, //1503 #CJK UNIFIED IDEOGRAPH + {0xAAFA, 0x961C}, //1504 #CJK UNIFIED IDEOGRAPH + {0xAAFB, 0x9640}, //1505 #CJK UNIFIED IDEOGRAPH + {0xAAFC, 0x963F}, //1506 #CJK UNIFIED IDEOGRAPH + {0xAAFD, 0x963B}, //1507 #CJK UNIFIED IDEOGRAPH + {0xAAFE, 0x9644}, //1508 #CJK UNIFIED IDEOGRAPH + {0xAB40, 0x9642}, //1509 #CJK UNIFIED IDEOGRAPH + {0xAB41, 0x96B9}, //1510 #CJK UNIFIED IDEOGRAPH + {0xAB42, 0x96E8}, //1511 #CJK UNIFIED IDEOGRAPH + {0xAB43, 0x9752}, //1512 #CJK UNIFIED IDEOGRAPH + {0xAB44, 0x975E}, //1513 #CJK UNIFIED IDEOGRAPH + {0xAB45, 0x4E9F}, //1514 #CJK UNIFIED IDEOGRAPH + {0xAB46, 0x4EAD}, //1515 #CJK UNIFIED IDEOGRAPH + {0xAB47, 0x4EAE}, //1516 #CJK UNIFIED IDEOGRAPH + {0xAB48, 0x4FE1}, //1517 #CJK UNIFIED IDEOGRAPH + {0xAB49, 0x4FB5}, //1518 #CJK UNIFIED IDEOGRAPH + {0xAB4A, 0x4FAF}, //1519 #CJK UNIFIED IDEOGRAPH + {0xAB4B, 0x4FBF}, //1520 #CJK UNIFIED IDEOGRAPH + {0xAB4C, 0x4FE0}, //1521 #CJK UNIFIED IDEOGRAPH + {0xAB4D, 0x4FD1}, //1522 #CJK UNIFIED IDEOGRAPH + {0xAB4E, 0x4FCF}, //1523 #CJK UNIFIED IDEOGRAPH + {0xAB4F, 0x4FDD}, //1524 #CJK UNIFIED IDEOGRAPH + {0xAB50, 0x4FC3}, //1525 #CJK UNIFIED IDEOGRAPH + {0xAB51, 0x4FB6}, //1526 #CJK UNIFIED IDEOGRAPH + {0xAB52, 0x4FD8}, //1527 #CJK UNIFIED IDEOGRAPH + {0xAB53, 0x4FDF}, //1528 #CJK UNIFIED IDEOGRAPH + {0xAB54, 0x4FCA}, //1529 #CJK UNIFIED IDEOGRAPH + {0xAB55, 0x4FD7}, //1530 #CJK UNIFIED IDEOGRAPH + {0xAB56, 0x4FAE}, //1531 #CJK UNIFIED IDEOGRAPH + {0xAB57, 0x4FD0}, //1532 #CJK UNIFIED IDEOGRAPH + {0xAB58, 0x4FC4}, //1533 #CJK UNIFIED IDEOGRAPH + {0xAB59, 0x4FC2}, //1534 #CJK UNIFIED IDEOGRAPH + {0xAB5A, 0x4FDA}, //1535 #CJK UNIFIED IDEOGRAPH + {0xAB5B, 0x4FCE}, //1536 #CJK UNIFIED IDEOGRAPH + {0xAB5C, 0x4FDE}, //1537 #CJK UNIFIED IDEOGRAPH + {0xAB5D, 0x4FB7}, //1538 #CJK UNIFIED IDEOGRAPH + {0xAB5E, 0x5157}, //1539 #CJK UNIFIED IDEOGRAPH + {0xAB5F, 0x5192}, //1540 #CJK UNIFIED IDEOGRAPH + {0xAB60, 0x5191}, //1541 #CJK UNIFIED IDEOGRAPH + {0xAB61, 0x51A0}, //1542 #CJK UNIFIED IDEOGRAPH + {0xAB62, 0x524E}, //1543 #CJK UNIFIED IDEOGRAPH + {0xAB63, 0x5243}, //1544 #CJK UNIFIED IDEOGRAPH + {0xAB64, 0x524A}, //1545 #CJK UNIFIED IDEOGRAPH + {0xAB65, 0x524D}, //1546 #CJK UNIFIED IDEOGRAPH + {0xAB66, 0x524C}, //1547 #CJK UNIFIED IDEOGRAPH + {0xAB67, 0x524B}, //1548 #CJK UNIFIED IDEOGRAPH + {0xAB68, 0x5247}, //1549 #CJK UNIFIED IDEOGRAPH + {0xAB69, 0x52C7}, //1550 #CJK UNIFIED IDEOGRAPH + {0xAB6A, 0x52C9}, //1551 #CJK UNIFIED IDEOGRAPH + {0xAB6B, 0x52C3}, //1552 #CJK UNIFIED IDEOGRAPH + {0xAB6C, 0x52C1}, //1553 #CJK UNIFIED IDEOGRAPH + {0xAB6D, 0x530D}, //1554 #CJK UNIFIED IDEOGRAPH + {0xAB6E, 0x5357}, //1555 #CJK UNIFIED IDEOGRAPH + {0xAB6F, 0x537B}, //1556 #CJK UNIFIED IDEOGRAPH + {0xAB70, 0x539A}, //1557 #CJK UNIFIED IDEOGRAPH + {0xAB71, 0x53DB}, //1558 #CJK UNIFIED IDEOGRAPH + {0xAB72, 0x54AC}, //1559 #CJK UNIFIED IDEOGRAPH + {0xAB73, 0x54C0}, //1560 #CJK UNIFIED IDEOGRAPH + {0xAB74, 0x54A8}, //1561 #CJK UNIFIED IDEOGRAPH + {0xAB75, 0x54CE}, //1562 #CJK UNIFIED IDEOGRAPH + {0xAB76, 0x54C9}, //1563 #CJK UNIFIED IDEOGRAPH + {0xAB77, 0x54B8}, //1564 #CJK UNIFIED IDEOGRAPH + {0xAB78, 0x54A6}, //1565 #CJK UNIFIED IDEOGRAPH + {0xAB79, 0x54B3}, //1566 #CJK UNIFIED IDEOGRAPH + {0xAB7A, 0x54C7}, //1567 #CJK UNIFIED IDEOGRAPH + {0xAB7B, 0x54C2}, //1568 #CJK UNIFIED IDEOGRAPH + {0xAB7C, 0x54BD}, //1569 #CJK UNIFIED IDEOGRAPH + {0xAB7D, 0x54AA}, //1570 #CJK UNIFIED IDEOGRAPH + {0xAB7E, 0x54C1}, //1571 #CJK UNIFIED IDEOGRAPH + {0xABA1, 0x54C4}, //1572 #CJK UNIFIED IDEOGRAPH + {0xABA2, 0x54C8}, //1573 #CJK UNIFIED IDEOGRAPH + {0xABA3, 0x54AF}, //1574 #CJK UNIFIED IDEOGRAPH + {0xABA4, 0x54AB}, //1575 #CJK UNIFIED IDEOGRAPH + {0xABA5, 0x54B1}, //1576 #CJK UNIFIED IDEOGRAPH + {0xABA6, 0x54BB}, //1577 #CJK UNIFIED IDEOGRAPH + {0xABA7, 0x54A9}, //1578 #CJK UNIFIED IDEOGRAPH + {0xABA8, 0x54A7}, //1579 #CJK UNIFIED IDEOGRAPH + {0xABA9, 0x54BF}, //1580 #CJK UNIFIED IDEOGRAPH + {0xABAA, 0x56FF}, //1581 #CJK UNIFIED IDEOGRAPH + {0xABAB, 0x5782}, //1582 #CJK UNIFIED IDEOGRAPH + {0xABAC, 0x578B}, //1583 #CJK UNIFIED IDEOGRAPH + {0xABAD, 0x57A0}, //1584 #CJK UNIFIED IDEOGRAPH + {0xABAE, 0x57A3}, //1585 #CJK UNIFIED IDEOGRAPH + {0xABAF, 0x57A2}, //1586 #CJK UNIFIED IDEOGRAPH + {0xABB0, 0x57CE}, //1587 #CJK UNIFIED IDEOGRAPH + {0xABB1, 0x57AE}, //1588 #CJK UNIFIED IDEOGRAPH + {0xABB2, 0x5793}, //1589 #CJK UNIFIED IDEOGRAPH + {0xABB3, 0x5955}, //1590 #CJK UNIFIED IDEOGRAPH + {0xABB4, 0x5951}, //1591 #CJK UNIFIED IDEOGRAPH + {0xABB5, 0x594F}, //1592 #CJK UNIFIED IDEOGRAPH + {0xABB6, 0x594E}, //1593 #CJK UNIFIED IDEOGRAPH + {0xABB7, 0x5950}, //1594 #CJK UNIFIED IDEOGRAPH + {0xABB8, 0x59DC}, //1595 #CJK UNIFIED IDEOGRAPH + {0xABB9, 0x59D8}, //1596 #CJK UNIFIED IDEOGRAPH + {0xABBA, 0x59FF}, //1597 #CJK UNIFIED IDEOGRAPH + {0xABBB, 0x59E3}, //1598 #CJK UNIFIED IDEOGRAPH + {0xABBC, 0x59E8}, //1599 #CJK UNIFIED IDEOGRAPH + {0xABBD, 0x5A03}, //1600 #CJK UNIFIED IDEOGRAPH + {0xABBE, 0x59E5}, //1601 #CJK UNIFIED IDEOGRAPH + {0xABBF, 0x59EA}, //1602 #CJK UNIFIED IDEOGRAPH + {0xABC0, 0x59DA}, //1603 #CJK UNIFIED IDEOGRAPH + {0xABC1, 0x59E6}, //1604 #CJK UNIFIED IDEOGRAPH + {0xABC2, 0x5A01}, //1605 #CJK UNIFIED IDEOGRAPH + {0xABC3, 0x59FB}, //1606 #CJK UNIFIED IDEOGRAPH + {0xABC4, 0x5B69}, //1607 #CJK UNIFIED IDEOGRAPH + {0xABC5, 0x5BA3}, //1608 #CJK UNIFIED IDEOGRAPH + {0xABC6, 0x5BA6}, //1609 #CJK UNIFIED IDEOGRAPH + {0xABC7, 0x5BA4}, //1610 #CJK UNIFIED IDEOGRAPH + {0xABC8, 0x5BA2}, //1611 #CJK UNIFIED IDEOGRAPH + {0xABC9, 0x5BA5}, //1612 #CJK UNIFIED IDEOGRAPH + {0xABCA, 0x5C01}, //1613 #CJK UNIFIED IDEOGRAPH + {0xABCB, 0x5C4E}, //1614 #CJK UNIFIED IDEOGRAPH + {0xABCC, 0x5C4F}, //1615 #CJK UNIFIED IDEOGRAPH + {0xABCD, 0x5C4D}, //1616 #CJK UNIFIED IDEOGRAPH + {0xABCE, 0x5C4B}, //1617 #CJK UNIFIED IDEOGRAPH + {0xABCF, 0x5CD9}, //1618 #CJK UNIFIED IDEOGRAPH + {0xABD0, 0x5CD2}, //1619 #CJK UNIFIED IDEOGRAPH + {0xABD1, 0x5DF7}, //1620 #CJK UNIFIED IDEOGRAPH + {0xABD2, 0x5E1D}, //1621 #CJK UNIFIED IDEOGRAPH + {0xABD3, 0x5E25}, //1622 #CJK UNIFIED IDEOGRAPH + {0xABD4, 0x5E1F}, //1623 #CJK UNIFIED IDEOGRAPH + {0xABD5, 0x5E7D}, //1624 #CJK UNIFIED IDEOGRAPH + {0xABD6, 0x5EA0}, //1625 #CJK UNIFIED IDEOGRAPH + {0xABD7, 0x5EA6}, //1626 #CJK UNIFIED IDEOGRAPH + {0xABD8, 0x5EFA}, //1627 #CJK UNIFIED IDEOGRAPH + {0xABD9, 0x5F08}, //1628 #CJK UNIFIED IDEOGRAPH + {0xABDA, 0x5F2D}, //1629 #CJK UNIFIED IDEOGRAPH + {0xABDB, 0x5F65}, //1630 #CJK UNIFIED IDEOGRAPH + {0xABDC, 0x5F88}, //1631 #CJK UNIFIED IDEOGRAPH + {0xABDD, 0x5F85}, //1632 #CJK UNIFIED IDEOGRAPH + {0xABDE, 0x5F8A}, //1633 #CJK UNIFIED IDEOGRAPH + {0xABDF, 0x5F8B}, //1634 #CJK UNIFIED IDEOGRAPH + {0xABE0, 0x5F87}, //1635 #CJK UNIFIED IDEOGRAPH + {0xABE1, 0x5F8C}, //1636 #CJK UNIFIED IDEOGRAPH + {0xABE2, 0x5F89}, //1637 #CJK UNIFIED IDEOGRAPH + {0xABE3, 0x6012}, //1638 #CJK UNIFIED IDEOGRAPH + {0xABE4, 0x601D}, //1639 #CJK UNIFIED IDEOGRAPH + {0xABE5, 0x6020}, //1640 #CJK UNIFIED IDEOGRAPH + {0xABE6, 0x6025}, //1641 #CJK UNIFIED IDEOGRAPH + {0xABE7, 0x600E}, //1642 #CJK UNIFIED IDEOGRAPH + {0xABE8, 0x6028}, //1643 #CJK UNIFIED IDEOGRAPH + {0xABE9, 0x604D}, //1644 #CJK UNIFIED IDEOGRAPH + {0xABEA, 0x6070}, //1645 #CJK UNIFIED IDEOGRAPH + {0xABEB, 0x6068}, //1646 #CJK UNIFIED IDEOGRAPH + {0xABEC, 0x6062}, //1647 #CJK UNIFIED IDEOGRAPH + {0xABED, 0x6046}, //1648 #CJK UNIFIED IDEOGRAPH + {0xABEE, 0x6043}, //1649 #CJK UNIFIED IDEOGRAPH + {0xABEF, 0x606C}, //1650 #CJK UNIFIED IDEOGRAPH + {0xABF0, 0x606B}, //1651 #CJK UNIFIED IDEOGRAPH + {0xABF1, 0x606A}, //1652 #CJK UNIFIED IDEOGRAPH + {0xABF2, 0x6064}, //1653 #CJK UNIFIED IDEOGRAPH + {0xABF3, 0x6241}, //1654 #CJK UNIFIED IDEOGRAPH + {0xABF4, 0x62DC}, //1655 #CJK UNIFIED IDEOGRAPH + {0xABF5, 0x6316}, //1656 #CJK UNIFIED IDEOGRAPH + {0xABF6, 0x6309}, //1657 #CJK UNIFIED IDEOGRAPH + {0xABF7, 0x62FC}, //1658 #CJK UNIFIED IDEOGRAPH + {0xABF8, 0x62ED}, //1659 #CJK UNIFIED IDEOGRAPH + {0xABF9, 0x6301}, //1660 #CJK UNIFIED IDEOGRAPH + {0xABFA, 0x62EE}, //1661 #CJK UNIFIED IDEOGRAPH + {0xABFB, 0x62FD}, //1662 #CJK UNIFIED IDEOGRAPH + {0xABFC, 0x6307}, //1663 #CJK UNIFIED IDEOGRAPH + {0xABFD, 0x62F1}, //1664 #CJK UNIFIED IDEOGRAPH + {0xABFE, 0x62F7}, //1665 #CJK UNIFIED IDEOGRAPH + {0xAC40, 0x62EF}, //1666 #CJK UNIFIED IDEOGRAPH + {0xAC41, 0x62EC}, //1667 #CJK UNIFIED IDEOGRAPH + {0xAC42, 0x62FE}, //1668 #CJK UNIFIED IDEOGRAPH + {0xAC43, 0x62F4}, //1669 #CJK UNIFIED IDEOGRAPH + {0xAC44, 0x6311}, //1670 #CJK UNIFIED IDEOGRAPH + {0xAC45, 0x6302}, //1671 #CJK UNIFIED IDEOGRAPH + {0xAC46, 0x653F}, //1672 #CJK UNIFIED IDEOGRAPH + {0xAC47, 0x6545}, //1673 #CJK UNIFIED IDEOGRAPH + {0xAC48, 0x65AB}, //1674 #CJK UNIFIED IDEOGRAPH + {0xAC49, 0x65BD}, //1675 #CJK UNIFIED IDEOGRAPH + {0xAC4A, 0x65E2}, //1676 #CJK UNIFIED IDEOGRAPH + {0xAC4B, 0x6625}, //1677 #CJK UNIFIED IDEOGRAPH + {0xAC4C, 0x662D}, //1678 #CJK UNIFIED IDEOGRAPH + {0xAC4D, 0x6620}, //1679 #CJK UNIFIED IDEOGRAPH + {0xAC4E, 0x6627}, //1680 #CJK UNIFIED IDEOGRAPH + {0xAC4F, 0x662F}, //1681 #CJK UNIFIED IDEOGRAPH + {0xAC50, 0x661F}, //1682 #CJK UNIFIED IDEOGRAPH + {0xAC51, 0x6628}, //1683 #CJK UNIFIED IDEOGRAPH + {0xAC52, 0x6631}, //1684 #CJK UNIFIED IDEOGRAPH + {0xAC53, 0x6624}, //1685 #CJK UNIFIED IDEOGRAPH + {0xAC54, 0x66F7}, //1686 #CJK UNIFIED IDEOGRAPH + {0xAC55, 0x67FF}, //1687 #CJK UNIFIED IDEOGRAPH + {0xAC56, 0x67D3}, //1688 #CJK UNIFIED IDEOGRAPH + {0xAC57, 0x67F1}, //1689 #CJK UNIFIED IDEOGRAPH + {0xAC58, 0x67D4}, //1690 #CJK UNIFIED IDEOGRAPH + {0xAC59, 0x67D0}, //1691 #CJK UNIFIED IDEOGRAPH + {0xAC5A, 0x67EC}, //1692 #CJK UNIFIED IDEOGRAPH + {0xAC5B, 0x67B6}, //1693 #CJK UNIFIED IDEOGRAPH + {0xAC5C, 0x67AF}, //1694 #CJK UNIFIED IDEOGRAPH + {0xAC5D, 0x67F5}, //1695 #CJK UNIFIED IDEOGRAPH + {0xAC5E, 0x67E9}, //1696 #CJK UNIFIED IDEOGRAPH + {0xAC5F, 0x67EF}, //1697 #CJK UNIFIED IDEOGRAPH + {0xAC60, 0x67C4}, //1698 #CJK UNIFIED IDEOGRAPH + {0xAC61, 0x67D1}, //1699 #CJK UNIFIED IDEOGRAPH + {0xAC62, 0x67B4}, //1700 #CJK UNIFIED IDEOGRAPH + {0xAC63, 0x67DA}, //1701 #CJK UNIFIED IDEOGRAPH + {0xAC64, 0x67E5}, //1702 #CJK UNIFIED IDEOGRAPH + {0xAC65, 0x67B8}, //1703 #CJK UNIFIED IDEOGRAPH + {0xAC66, 0x67CF}, //1704 #CJK UNIFIED IDEOGRAPH + {0xAC67, 0x67DE}, //1705 #CJK UNIFIED IDEOGRAPH + {0xAC68, 0x67F3}, //1706 #CJK UNIFIED IDEOGRAPH + {0xAC69, 0x67B0}, //1707 #CJK UNIFIED IDEOGRAPH + {0xAC6A, 0x67D9}, //1708 #CJK UNIFIED IDEOGRAPH + {0xAC6B, 0x67E2}, //1709 #CJK UNIFIED IDEOGRAPH + {0xAC6C, 0x67DD}, //1710 #CJK UNIFIED IDEOGRAPH + {0xAC6D, 0x67D2}, //1711 #CJK UNIFIED IDEOGRAPH + {0xAC6E, 0x6B6A}, //1712 #CJK UNIFIED IDEOGRAPH + {0xAC6F, 0x6B83}, //1713 #CJK UNIFIED IDEOGRAPH + {0xAC70, 0x6B86}, //1714 #CJK UNIFIED IDEOGRAPH + {0xAC71, 0x6BB5}, //1715 #CJK UNIFIED IDEOGRAPH + {0xAC72, 0x6BD2}, //1716 #CJK UNIFIED IDEOGRAPH + {0xAC73, 0x6BD7}, //1717 #CJK UNIFIED IDEOGRAPH + {0xAC74, 0x6C1F}, //1718 #CJK UNIFIED IDEOGRAPH + {0xAC75, 0x6CC9}, //1719 #CJK UNIFIED IDEOGRAPH + {0xAC76, 0x6D0B}, //1720 #CJK UNIFIED IDEOGRAPH + {0xAC77, 0x6D32}, //1721 #CJK UNIFIED IDEOGRAPH + {0xAC78, 0x6D2A}, //1722 #CJK UNIFIED IDEOGRAPH + {0xAC79, 0x6D41}, //1723 #CJK UNIFIED IDEOGRAPH + {0xAC7A, 0x6D25}, //1724 #CJK UNIFIED IDEOGRAPH + {0xAC7B, 0x6D0C}, //1725 #CJK UNIFIED IDEOGRAPH + {0xAC7C, 0x6D31}, //1726 #CJK UNIFIED IDEOGRAPH + {0xAC7D, 0x6D1E}, //1727 #CJK UNIFIED IDEOGRAPH + {0xAC7E, 0x6D17}, //1728 #CJK UNIFIED IDEOGRAPH + {0xACA1, 0x6D3B}, //1729 #CJK UNIFIED IDEOGRAPH + {0xACA2, 0x6D3D}, //1730 #CJK UNIFIED IDEOGRAPH + {0xACA3, 0x6D3E}, //1731 #CJK UNIFIED IDEOGRAPH + {0xACA4, 0x6D36}, //1732 #CJK UNIFIED IDEOGRAPH + {0xACA5, 0x6D1B}, //1733 #CJK UNIFIED IDEOGRAPH + {0xACA6, 0x6CF5}, //1734 #CJK UNIFIED IDEOGRAPH + {0xACA7, 0x6D39}, //1735 #CJK UNIFIED IDEOGRAPH + {0xACA8, 0x6D27}, //1736 #CJK UNIFIED IDEOGRAPH + {0xACA9, 0x6D38}, //1737 #CJK UNIFIED IDEOGRAPH + {0xACAA, 0x6D29}, //1738 #CJK UNIFIED IDEOGRAPH + {0xACAB, 0x6D2E}, //1739 #CJK UNIFIED IDEOGRAPH + {0xACAC, 0x6D35}, //1740 #CJK UNIFIED IDEOGRAPH + {0xACAD, 0x6D0E}, //1741 #CJK UNIFIED IDEOGRAPH + {0xACAE, 0x6D2B}, //1742 #CJK UNIFIED IDEOGRAPH + {0xACAF, 0x70AB}, //1743 #CJK UNIFIED IDEOGRAPH + {0xACB0, 0x70BA}, //1744 #CJK UNIFIED IDEOGRAPH + {0xACB1, 0x70B3}, //1745 #CJK UNIFIED IDEOGRAPH + {0xACB2, 0x70AC}, //1746 #CJK UNIFIED IDEOGRAPH + {0xACB3, 0x70AF}, //1747 #CJK UNIFIED IDEOGRAPH + {0xACB4, 0x70AD}, //1748 #CJK UNIFIED IDEOGRAPH + {0xACB5, 0x70B8}, //1749 #CJK UNIFIED IDEOGRAPH + {0xACB6, 0x70AE}, //1750 #CJK UNIFIED IDEOGRAPH + {0xACB7, 0x70A4}, //1751 #CJK UNIFIED IDEOGRAPH + {0xACB8, 0x7230}, //1752 #CJK UNIFIED IDEOGRAPH + {0xACB9, 0x7272}, //1753 #CJK UNIFIED IDEOGRAPH + {0xACBA, 0x726F}, //1754 #CJK UNIFIED IDEOGRAPH + {0xACBB, 0x7274}, //1755 #CJK UNIFIED IDEOGRAPH + {0xACBC, 0x72E9}, //1756 #CJK UNIFIED IDEOGRAPH + {0xACBD, 0x72E0}, //1757 #CJK UNIFIED IDEOGRAPH + {0xACBE, 0x72E1}, //1758 #CJK UNIFIED IDEOGRAPH + {0xACBF, 0x73B7}, //1759 #CJK UNIFIED IDEOGRAPH + {0xACC0, 0x73CA}, //1760 #CJK UNIFIED IDEOGRAPH + {0xACC1, 0x73BB}, //1761 #CJK UNIFIED IDEOGRAPH + {0xACC2, 0x73B2}, //1762 #CJK UNIFIED IDEOGRAPH + {0xACC3, 0x73CD}, //1763 #CJK UNIFIED IDEOGRAPH + {0xACC4, 0x73C0}, //1764 #CJK UNIFIED IDEOGRAPH + {0xACC5, 0x73B3}, //1765 #CJK UNIFIED IDEOGRAPH + {0xACC6, 0x751A}, //1766 #CJK UNIFIED IDEOGRAPH + {0xACC7, 0x752D}, //1767 #CJK UNIFIED IDEOGRAPH + {0xACC8, 0x754F}, //1768 #CJK UNIFIED IDEOGRAPH + {0xACC9, 0x754C}, //1769 #CJK UNIFIED IDEOGRAPH + {0xACCA, 0x754E}, //1770 #CJK UNIFIED IDEOGRAPH + {0xACCB, 0x754B}, //1771 #CJK UNIFIED IDEOGRAPH + {0xACCC, 0x75AB}, //1772 #CJK UNIFIED IDEOGRAPH + {0xACCD, 0x75A4}, //1773 #CJK UNIFIED IDEOGRAPH + {0xACCE, 0x75A5}, //1774 #CJK UNIFIED IDEOGRAPH + {0xACCF, 0x75A2}, //1775 #CJK UNIFIED IDEOGRAPH + {0xACD0, 0x75A3}, //1776 #CJK UNIFIED IDEOGRAPH + {0xACD1, 0x7678}, //1777 #CJK UNIFIED IDEOGRAPH + {0xACD2, 0x7686}, //1778 #CJK UNIFIED IDEOGRAPH + {0xACD3, 0x7687}, //1779 #CJK UNIFIED IDEOGRAPH + {0xACD4, 0x7688}, //1780 #CJK UNIFIED IDEOGRAPH + {0xACD5, 0x76C8}, //1781 #CJK UNIFIED IDEOGRAPH + {0xACD6, 0x76C6}, //1782 #CJK UNIFIED IDEOGRAPH + {0xACD7, 0x76C3}, //1783 #CJK UNIFIED IDEOGRAPH + {0xACD8, 0x76C5}, //1784 #CJK UNIFIED IDEOGRAPH + {0xACD9, 0x7701}, //1785 #CJK UNIFIED IDEOGRAPH + {0xACDA, 0x76F9}, //1786 #CJK UNIFIED IDEOGRAPH + {0xACDB, 0x76F8}, //1787 #CJK UNIFIED IDEOGRAPH + {0xACDC, 0x7709}, //1788 #CJK UNIFIED IDEOGRAPH + {0xACDD, 0x770B}, //1789 #CJK UNIFIED IDEOGRAPH + {0xACDE, 0x76FE}, //1790 #CJK UNIFIED IDEOGRAPH + {0xACDF, 0x76FC}, //1791 #CJK UNIFIED IDEOGRAPH + {0xACE0, 0x7707}, //1792 #CJK UNIFIED IDEOGRAPH + {0xACE1, 0x77DC}, //1793 #CJK UNIFIED IDEOGRAPH + {0xACE2, 0x7802}, //1794 #CJK UNIFIED IDEOGRAPH + {0xACE3, 0x7814}, //1795 #CJK UNIFIED IDEOGRAPH + {0xACE4, 0x780C}, //1796 #CJK UNIFIED IDEOGRAPH + {0xACE5, 0x780D}, //1797 #CJK UNIFIED IDEOGRAPH + {0xACE6, 0x7946}, //1798 #CJK UNIFIED IDEOGRAPH + {0xACE7, 0x7949}, //1799 #CJK UNIFIED IDEOGRAPH + {0xACE8, 0x7948}, //1800 #CJK UNIFIED IDEOGRAPH + {0xACE9, 0x7947}, //1801 #CJK UNIFIED IDEOGRAPH + {0xACEA, 0x79B9}, //1802 #CJK UNIFIED IDEOGRAPH + {0xACEB, 0x79BA}, //1803 #CJK UNIFIED IDEOGRAPH + {0xACEC, 0x79D1}, //1804 #CJK UNIFIED IDEOGRAPH + {0xACED, 0x79D2}, //1805 #CJK UNIFIED IDEOGRAPH + {0xACEE, 0x79CB}, //1806 #CJK UNIFIED IDEOGRAPH + {0xACEF, 0x7A7F}, //1807 #CJK UNIFIED IDEOGRAPH + {0xACF0, 0x7A81}, //1808 #CJK UNIFIED IDEOGRAPH + {0xACF1, 0x7AFF}, //1809 #CJK UNIFIED IDEOGRAPH + {0xACF2, 0x7AFD}, //1810 #CJK UNIFIED IDEOGRAPH + {0xACF3, 0x7C7D}, //1811 #CJK UNIFIED IDEOGRAPH + {0xACF4, 0x7D02}, //1812 #CJK UNIFIED IDEOGRAPH + {0xACF5, 0x7D05}, //1813 #CJK UNIFIED IDEOGRAPH + {0xACF6, 0x7D00}, //1814 #CJK UNIFIED IDEOGRAPH + {0xACF7, 0x7D09}, //1815 #CJK UNIFIED IDEOGRAPH + {0xACF8, 0x7D07}, //1816 #CJK UNIFIED IDEOGRAPH + {0xACF9, 0x7D04}, //1817 #CJK UNIFIED IDEOGRAPH + {0xACFA, 0x7D06}, //1818 #CJK UNIFIED IDEOGRAPH + {0xACFB, 0x7F38}, //1819 #CJK UNIFIED IDEOGRAPH + {0xACFC, 0x7F8E}, //1820 #CJK UNIFIED IDEOGRAPH + {0xACFD, 0x7FBF}, //1821 #CJK UNIFIED IDEOGRAPH + {0xACFE, 0x8004}, //1822 #CJK UNIFIED IDEOGRAPH + {0xAD40, 0x8010}, //1823 #CJK UNIFIED IDEOGRAPH + {0xAD41, 0x800D}, //1824 #CJK UNIFIED IDEOGRAPH + {0xAD42, 0x8011}, //1825 #CJK UNIFIED IDEOGRAPH + {0xAD43, 0x8036}, //1826 #CJK UNIFIED IDEOGRAPH + {0xAD44, 0x80D6}, //1827 #CJK UNIFIED IDEOGRAPH + {0xAD45, 0x80E5}, //1828 #CJK UNIFIED IDEOGRAPH + {0xAD46, 0x80DA}, //1829 #CJK UNIFIED IDEOGRAPH + {0xAD47, 0x80C3}, //1830 #CJK UNIFIED IDEOGRAPH + {0xAD48, 0x80C4}, //1831 #CJK UNIFIED IDEOGRAPH + {0xAD49, 0x80CC}, //1832 #CJK UNIFIED IDEOGRAPH + {0xAD4A, 0x80E1}, //1833 #CJK UNIFIED IDEOGRAPH + {0xAD4B, 0x80DB}, //1834 #CJK UNIFIED IDEOGRAPH + {0xAD4C, 0x80CE}, //1835 #CJK UNIFIED IDEOGRAPH + {0xAD4D, 0x80DE}, //1836 #CJK UNIFIED IDEOGRAPH + {0xAD4E, 0x80E4}, //1837 #CJK UNIFIED IDEOGRAPH + {0xAD4F, 0x80DD}, //1838 #CJK UNIFIED IDEOGRAPH + {0xAD50, 0x81F4}, //1839 #CJK UNIFIED IDEOGRAPH + {0xAD51, 0x8222}, //1840 #CJK UNIFIED IDEOGRAPH + {0xAD52, 0x82E7}, //1841 #CJK UNIFIED IDEOGRAPH + {0xAD53, 0x8303}, //1842 #CJK UNIFIED IDEOGRAPH + {0xAD54, 0x8305}, //1843 #CJK UNIFIED IDEOGRAPH + {0xAD55, 0x82E3}, //1844 #CJK UNIFIED IDEOGRAPH + {0xAD56, 0x82DB}, //1845 #CJK UNIFIED IDEOGRAPH + {0xAD57, 0x82E6}, //1846 #CJK UNIFIED IDEOGRAPH + {0xAD58, 0x8304}, //1847 #CJK UNIFIED IDEOGRAPH + {0xAD59, 0x82E5}, //1848 #CJK UNIFIED IDEOGRAPH + {0xAD5A, 0x8302}, //1849 #CJK UNIFIED IDEOGRAPH + {0xAD5B, 0x8309}, //1850 #CJK UNIFIED IDEOGRAPH + {0xAD5C, 0x82D2}, //1851 #CJK UNIFIED IDEOGRAPH + {0xAD5D, 0x82D7}, //1852 #CJK UNIFIED IDEOGRAPH + {0xAD5E, 0x82F1}, //1853 #CJK UNIFIED IDEOGRAPH + {0xAD5F, 0x8301}, //1854 #CJK UNIFIED IDEOGRAPH + {0xAD60, 0x82DC}, //1855 #CJK UNIFIED IDEOGRAPH + {0xAD61, 0x82D4}, //1856 #CJK UNIFIED IDEOGRAPH + {0xAD62, 0x82D1}, //1857 #CJK UNIFIED IDEOGRAPH + {0xAD63, 0x82DE}, //1858 #CJK UNIFIED IDEOGRAPH + {0xAD64, 0x82D3}, //1859 #CJK UNIFIED IDEOGRAPH + {0xAD65, 0x82DF}, //1860 #CJK UNIFIED IDEOGRAPH + {0xAD66, 0x82EF}, //1861 #CJK UNIFIED IDEOGRAPH + {0xAD67, 0x8306}, //1862 #CJK UNIFIED IDEOGRAPH + {0xAD68, 0x8650}, //1863 #CJK UNIFIED IDEOGRAPH + {0xAD69, 0x8679}, //1864 #CJK UNIFIED IDEOGRAPH + {0xAD6A, 0x867B}, //1865 #CJK UNIFIED IDEOGRAPH + {0xAD6B, 0x867A}, //1866 #CJK UNIFIED IDEOGRAPH + {0xAD6C, 0x884D}, //1867 #CJK UNIFIED IDEOGRAPH + {0xAD6D, 0x886B}, //1868 #CJK UNIFIED IDEOGRAPH + {0xAD6E, 0x8981}, //1869 #CJK UNIFIED IDEOGRAPH + {0xAD6F, 0x89D4}, //1870 #CJK UNIFIED IDEOGRAPH + {0xAD70, 0x8A08}, //1871 #CJK UNIFIED IDEOGRAPH + {0xAD71, 0x8A02}, //1872 #CJK UNIFIED IDEOGRAPH + {0xAD72, 0x8A03}, //1873 #CJK UNIFIED IDEOGRAPH + {0xAD73, 0x8C9E}, //1874 #CJK UNIFIED IDEOGRAPH + {0xAD74, 0x8CA0}, //1875 #CJK UNIFIED IDEOGRAPH + {0xAD75, 0x8D74}, //1876 #CJK UNIFIED IDEOGRAPH + {0xAD76, 0x8D73}, //1877 #CJK UNIFIED IDEOGRAPH + {0xAD77, 0x8DB4}, //1878 #CJK UNIFIED IDEOGRAPH + {0xAD78, 0x8ECD}, //1879 #CJK UNIFIED IDEOGRAPH + {0xAD79, 0x8ECC}, //1880 #CJK UNIFIED IDEOGRAPH + {0xAD7A, 0x8FF0}, //1881 #CJK UNIFIED IDEOGRAPH + {0xAD7B, 0x8FE6}, //1882 #CJK UNIFIED IDEOGRAPH + {0xAD7C, 0x8FE2}, //1883 #CJK UNIFIED IDEOGRAPH + {0xAD7D, 0x8FEA}, //1884 #CJK UNIFIED IDEOGRAPH + {0xAD7E, 0x8FE5}, //1885 #CJK UNIFIED IDEOGRAPH + {0xADA1, 0x8FED}, //1886 #CJK UNIFIED IDEOGRAPH + {0xADA2, 0x8FEB}, //1887 #CJK UNIFIED IDEOGRAPH + {0xADA3, 0x8FE4}, //1888 #CJK UNIFIED IDEOGRAPH + {0xADA4, 0x8FE8}, //1889 #CJK UNIFIED IDEOGRAPH + {0xADA5, 0x90CA}, //1890 #CJK UNIFIED IDEOGRAPH + {0xADA6, 0x90CE}, //1891 #CJK UNIFIED IDEOGRAPH + {0xADA7, 0x90C1}, //1892 #CJK UNIFIED IDEOGRAPH + {0xADA8, 0x90C3}, //1893 #CJK UNIFIED IDEOGRAPH + {0xADA9, 0x914B}, //1894 #CJK UNIFIED IDEOGRAPH + {0xADAA, 0x914A}, //1895 #CJK UNIFIED IDEOGRAPH + {0xADAB, 0x91CD}, //1896 #CJK UNIFIED IDEOGRAPH + {0xADAC, 0x9582}, //1897 #CJK UNIFIED IDEOGRAPH + {0xADAD, 0x9650}, //1898 #CJK UNIFIED IDEOGRAPH + {0xADAE, 0x964B}, //1899 #CJK UNIFIED IDEOGRAPH + {0xADAF, 0x964C}, //1900 #CJK UNIFIED IDEOGRAPH + {0xADB0, 0x964D}, //1901 #CJK UNIFIED IDEOGRAPH + {0xADB1, 0x9762}, //1902 #CJK UNIFIED IDEOGRAPH + {0xADB2, 0x9769}, //1903 #CJK UNIFIED IDEOGRAPH + {0xADB3, 0x97CB}, //1904 #CJK UNIFIED IDEOGRAPH + {0xADB4, 0x97ED}, //1905 #CJK UNIFIED IDEOGRAPH + {0xADB5, 0x97F3}, //1906 #CJK UNIFIED IDEOGRAPH + {0xADB6, 0x9801}, //1907 #CJK UNIFIED IDEOGRAPH + {0xADB7, 0x98A8}, //1908 #CJK UNIFIED IDEOGRAPH + {0xADB8, 0x98DB}, //1909 #CJK UNIFIED IDEOGRAPH + {0xADB9, 0x98DF}, //1910 #CJK UNIFIED IDEOGRAPH + {0xADBA, 0x9996}, //1911 #CJK UNIFIED IDEOGRAPH + {0xADBB, 0x9999}, //1912 #CJK UNIFIED IDEOGRAPH + {0xADBC, 0x4E58}, //1913 #CJK UNIFIED IDEOGRAPH + {0xADBD, 0x4EB3}, //1914 #CJK UNIFIED IDEOGRAPH + {0xADBE, 0x500C}, //1915 #CJK UNIFIED IDEOGRAPH + {0xADBF, 0x500D}, //1916 #CJK UNIFIED IDEOGRAPH + {0xADC0, 0x5023}, //1917 #CJK UNIFIED IDEOGRAPH + {0xADC1, 0x4FEF}, //1918 #CJK UNIFIED IDEOGRAPH + {0xADC2, 0x5026}, //1919 #CJK UNIFIED IDEOGRAPH + {0xADC3, 0x5025}, //1920 #CJK UNIFIED IDEOGRAPH + {0xADC4, 0x4FF8}, //1921 #CJK UNIFIED IDEOGRAPH + {0xADC5, 0x5029}, //1922 #CJK UNIFIED IDEOGRAPH + {0xADC6, 0x5016}, //1923 #CJK UNIFIED IDEOGRAPH + {0xADC7, 0x5006}, //1924 #CJK UNIFIED IDEOGRAPH + {0xADC8, 0x503C}, //1925 #CJK UNIFIED IDEOGRAPH + {0xADC9, 0x501F}, //1926 #CJK UNIFIED IDEOGRAPH + {0xADCA, 0x501A}, //1927 #CJK UNIFIED IDEOGRAPH + {0xADCB, 0x5012}, //1928 #CJK UNIFIED IDEOGRAPH + {0xADCC, 0x5011}, //1929 #CJK UNIFIED IDEOGRAPH + {0xADCD, 0x4FFA}, //1930 #CJK UNIFIED IDEOGRAPH + {0xADCE, 0x5000}, //1931 #CJK UNIFIED IDEOGRAPH + {0xADCF, 0x5014}, //1932 #CJK UNIFIED IDEOGRAPH + {0xADD0, 0x5028}, //1933 #CJK UNIFIED IDEOGRAPH + {0xADD1, 0x4FF1}, //1934 #CJK UNIFIED IDEOGRAPH + {0xADD2, 0x5021}, //1935 #CJK UNIFIED IDEOGRAPH + {0xADD3, 0x500B}, //1936 #CJK UNIFIED IDEOGRAPH + {0xADD4, 0x5019}, //1937 #CJK UNIFIED IDEOGRAPH + {0xADD5, 0x5018}, //1938 #CJK UNIFIED IDEOGRAPH + {0xADD6, 0x4FF3}, //1939 #CJK UNIFIED IDEOGRAPH + {0xADD7, 0x4FEE}, //1940 #CJK UNIFIED IDEOGRAPH + {0xADD8, 0x502D}, //1941 #CJK UNIFIED IDEOGRAPH + {0xADD9, 0x502A}, //1942 #CJK UNIFIED IDEOGRAPH + {0xADDA, 0x4FFE}, //1943 #CJK UNIFIED IDEOGRAPH + {0xADDB, 0x502B}, //1944 #CJK UNIFIED IDEOGRAPH + {0xADDC, 0x5009}, //1945 #CJK UNIFIED IDEOGRAPH + {0xADDD, 0x517C}, //1946 #CJK UNIFIED IDEOGRAPH + {0xADDE, 0x51A4}, //1947 #CJK UNIFIED IDEOGRAPH + {0xADDF, 0x51A5}, //1948 #CJK UNIFIED IDEOGRAPH + {0xADE0, 0x51A2}, //1949 #CJK UNIFIED IDEOGRAPH + {0xADE1, 0x51CD}, //1950 #CJK UNIFIED IDEOGRAPH + {0xADE2, 0x51CC}, //1951 #CJK UNIFIED IDEOGRAPH + {0xADE3, 0x51C6}, //1952 #CJK UNIFIED IDEOGRAPH + {0xADE4, 0x51CB}, //1953 #CJK UNIFIED IDEOGRAPH + {0xADE5, 0x5256}, //1954 #CJK UNIFIED IDEOGRAPH + {0xADE6, 0x525C}, //1955 #CJK UNIFIED IDEOGRAPH + {0xADE7, 0x5254}, //1956 #CJK UNIFIED IDEOGRAPH + {0xADE8, 0x525B}, //1957 #CJK UNIFIED IDEOGRAPH + {0xADE9, 0x525D}, //1958 #CJK UNIFIED IDEOGRAPH + {0xADEA, 0x532A}, //1959 #CJK UNIFIED IDEOGRAPH + {0xADEB, 0x537F}, //1960 #CJK UNIFIED IDEOGRAPH + {0xADEC, 0x539F}, //1961 #CJK UNIFIED IDEOGRAPH + {0xADED, 0x539D}, //1962 #CJK UNIFIED IDEOGRAPH + {0xADEE, 0x53DF}, //1963 #CJK UNIFIED IDEOGRAPH + {0xADEF, 0x54E8}, //1964 #CJK UNIFIED IDEOGRAPH + {0xADF0, 0x5510}, //1965 #CJK UNIFIED IDEOGRAPH + {0xADF1, 0x5501}, //1966 #CJK UNIFIED IDEOGRAPH + {0xADF2, 0x5537}, //1967 #CJK UNIFIED IDEOGRAPH + {0xADF3, 0x54FC}, //1968 #CJK UNIFIED IDEOGRAPH + {0xADF4, 0x54E5}, //1969 #CJK UNIFIED IDEOGRAPH + {0xADF5, 0x54F2}, //1970 #CJK UNIFIED IDEOGRAPH + {0xADF6, 0x5506}, //1971 #CJK UNIFIED IDEOGRAPH + {0xADF7, 0x54FA}, //1972 #CJK UNIFIED IDEOGRAPH + {0xADF8, 0x5514}, //1973 #CJK UNIFIED IDEOGRAPH + {0xADF9, 0x54E9}, //1974 #CJK UNIFIED IDEOGRAPH + {0xADFA, 0x54ED}, //1975 #CJK UNIFIED IDEOGRAPH + {0xADFB, 0x54E1}, //1976 #CJK UNIFIED IDEOGRAPH + {0xADFC, 0x5509}, //1977 #CJK UNIFIED IDEOGRAPH + {0xADFD, 0x54EE}, //1978 #CJK UNIFIED IDEOGRAPH + {0xADFE, 0x54EA}, //1979 #CJK UNIFIED IDEOGRAPH + {0xAE40, 0x54E6}, //1980 #CJK UNIFIED IDEOGRAPH + {0xAE41, 0x5527}, //1981 #CJK UNIFIED IDEOGRAPH + {0xAE42, 0x5507}, //1982 #CJK UNIFIED IDEOGRAPH + {0xAE43, 0x54FD}, //1983 #CJK UNIFIED IDEOGRAPH + {0xAE44, 0x550F}, //1984 #CJK UNIFIED IDEOGRAPH + {0xAE45, 0x5703}, //1985 #CJK UNIFIED IDEOGRAPH + {0xAE46, 0x5704}, //1986 #CJK UNIFIED IDEOGRAPH + {0xAE47, 0x57C2}, //1987 #CJK UNIFIED IDEOGRAPH + {0xAE48, 0x57D4}, //1988 #CJK UNIFIED IDEOGRAPH + {0xAE49, 0x57CB}, //1989 #CJK UNIFIED IDEOGRAPH + {0xAE4A, 0x57C3}, //1990 #CJK UNIFIED IDEOGRAPH + {0xAE4B, 0x5809}, //1991 #CJK UNIFIED IDEOGRAPH + {0xAE4C, 0x590F}, //1992 #CJK UNIFIED IDEOGRAPH + {0xAE4D, 0x5957}, //1993 #CJK UNIFIED IDEOGRAPH + {0xAE4E, 0x5958}, //1994 #CJK UNIFIED IDEOGRAPH + {0xAE4F, 0x595A}, //1995 #CJK UNIFIED IDEOGRAPH + {0xAE50, 0x5A11}, //1996 #CJK UNIFIED IDEOGRAPH + {0xAE51, 0x5A18}, //1997 #CJK UNIFIED IDEOGRAPH + {0xAE52, 0x5A1C}, //1998 #CJK UNIFIED IDEOGRAPH + {0xAE53, 0x5A1F}, //1999 #CJK UNIFIED IDEOGRAPH + {0xAE54, 0x5A1B}, //2000 #CJK UNIFIED IDEOGRAPH + {0xAE55, 0x5A13}, //2001 #CJK UNIFIED IDEOGRAPH + {0xAE56, 0x59EC}, //2002 #CJK UNIFIED IDEOGRAPH + {0xAE57, 0x5A20}, //2003 #CJK UNIFIED IDEOGRAPH + {0xAE58, 0x5A23}, //2004 #CJK UNIFIED IDEOGRAPH + {0xAE59, 0x5A29}, //2005 #CJK UNIFIED IDEOGRAPH + {0xAE5A, 0x5A25}, //2006 #CJK UNIFIED IDEOGRAPH + {0xAE5B, 0x5A0C}, //2007 #CJK UNIFIED IDEOGRAPH + {0xAE5C, 0x5A09}, //2008 #CJK UNIFIED IDEOGRAPH + {0xAE5D, 0x5B6B}, //2009 #CJK UNIFIED IDEOGRAPH + {0xAE5E, 0x5C58}, //2010 #CJK UNIFIED IDEOGRAPH + {0xAE5F, 0x5BB0}, //2011 #CJK UNIFIED IDEOGRAPH + {0xAE60, 0x5BB3}, //2012 #CJK UNIFIED IDEOGRAPH + {0xAE61, 0x5BB6}, //2013 #CJK UNIFIED IDEOGRAPH + {0xAE62, 0x5BB4}, //2014 #CJK UNIFIED IDEOGRAPH + {0xAE63, 0x5BAE}, //2015 #CJK UNIFIED IDEOGRAPH + {0xAE64, 0x5BB5}, //2016 #CJK UNIFIED IDEOGRAPH + {0xAE65, 0x5BB9}, //2017 #CJK UNIFIED IDEOGRAPH + {0xAE66, 0x5BB8}, //2018 #CJK UNIFIED IDEOGRAPH + {0xAE67, 0x5C04}, //2019 #CJK UNIFIED IDEOGRAPH + {0xAE68, 0x5C51}, //2020 #CJK UNIFIED IDEOGRAPH + {0xAE69, 0x5C55}, //2021 #CJK UNIFIED IDEOGRAPH + {0xAE6A, 0x5C50}, //2022 #CJK UNIFIED IDEOGRAPH + {0xAE6B, 0x5CED}, //2023 #CJK UNIFIED IDEOGRAPH + {0xAE6C, 0x5CFD}, //2024 #CJK UNIFIED IDEOGRAPH + {0xAE6D, 0x5CFB}, //2025 #CJK UNIFIED IDEOGRAPH + {0xAE6E, 0x5CEA}, //2026 #CJK UNIFIED IDEOGRAPH + {0xAE6F, 0x5CE8}, //2027 #CJK UNIFIED IDEOGRAPH + {0xAE70, 0x5CF0}, //2028 #CJK UNIFIED IDEOGRAPH + {0xAE71, 0x5CF6}, //2029 #CJK UNIFIED IDEOGRAPH + {0xAE72, 0x5D01}, //2030 #CJK UNIFIED IDEOGRAPH + {0xAE73, 0x5CF4}, //2031 #CJK UNIFIED IDEOGRAPH + {0xAE74, 0x5DEE}, //2032 #CJK UNIFIED IDEOGRAPH + {0xAE75, 0x5E2D}, //2033 #CJK UNIFIED IDEOGRAPH + {0xAE76, 0x5E2B}, //2034 #CJK UNIFIED IDEOGRAPH + {0xAE77, 0x5EAB}, //2035 #CJK UNIFIED IDEOGRAPH + {0xAE78, 0x5EAD}, //2036 #CJK UNIFIED IDEOGRAPH + {0xAE79, 0x5EA7}, //2037 #CJK UNIFIED IDEOGRAPH + {0xAE7A, 0x5F31}, //2038 #CJK UNIFIED IDEOGRAPH + {0xAE7B, 0x5F92}, //2039 #CJK UNIFIED IDEOGRAPH + {0xAE7C, 0x5F91}, //2040 #CJK UNIFIED IDEOGRAPH + {0xAE7D, 0x5F90}, //2041 #CJK UNIFIED IDEOGRAPH + {0xAE7E, 0x6059}, //2042 #CJK UNIFIED IDEOGRAPH + {0xAEA1, 0x6063}, //2043 #CJK UNIFIED IDEOGRAPH + {0xAEA2, 0x6065}, //2044 #CJK UNIFIED IDEOGRAPH + {0xAEA3, 0x6050}, //2045 #CJK UNIFIED IDEOGRAPH + {0xAEA4, 0x6055}, //2046 #CJK UNIFIED IDEOGRAPH + {0xAEA5, 0x606D}, //2047 #CJK UNIFIED IDEOGRAPH + {0xAEA6, 0x6069}, //2048 #CJK UNIFIED IDEOGRAPH + {0xAEA7, 0x606F}, //2049 #CJK UNIFIED IDEOGRAPH + {0xAEA8, 0x6084}, //2050 #CJK UNIFIED IDEOGRAPH + {0xAEA9, 0x609F}, //2051 #CJK UNIFIED IDEOGRAPH + {0xAEAA, 0x609A}, //2052 #CJK UNIFIED IDEOGRAPH + {0xAEAB, 0x608D}, //2053 #CJK UNIFIED IDEOGRAPH + {0xAEAC, 0x6094}, //2054 #CJK UNIFIED IDEOGRAPH + {0xAEAD, 0x608C}, //2055 #CJK UNIFIED IDEOGRAPH + {0xAEAE, 0x6085}, //2056 #CJK UNIFIED IDEOGRAPH + {0xAEAF, 0x6096}, //2057 #CJK UNIFIED IDEOGRAPH + {0xAEB0, 0x6247}, //2058 #CJK UNIFIED IDEOGRAPH + {0xAEB1, 0x62F3}, //2059 #CJK UNIFIED IDEOGRAPH + {0xAEB2, 0x6308}, //2060 #CJK UNIFIED IDEOGRAPH + {0xAEB3, 0x62FF}, //2061 #CJK UNIFIED IDEOGRAPH + {0xAEB4, 0x634E}, //2062 #CJK UNIFIED IDEOGRAPH + {0xAEB5, 0x633E}, //2063 #CJK UNIFIED IDEOGRAPH + {0xAEB6, 0x632F}, //2064 #CJK UNIFIED IDEOGRAPH + {0xAEB7, 0x6355}, //2065 #CJK UNIFIED IDEOGRAPH + {0xAEB8, 0x6342}, //2066 #CJK UNIFIED IDEOGRAPH + {0xAEB9, 0x6346}, //2067 #CJK UNIFIED IDEOGRAPH + {0xAEBA, 0x634F}, //2068 #CJK UNIFIED IDEOGRAPH + {0xAEBB, 0x6349}, //2069 #CJK UNIFIED IDEOGRAPH + {0xAEBC, 0x633A}, //2070 #CJK UNIFIED IDEOGRAPH + {0xAEBD, 0x6350}, //2071 #CJK UNIFIED IDEOGRAPH + {0xAEBE, 0x633D}, //2072 #CJK UNIFIED IDEOGRAPH + {0xAEBF, 0x632A}, //2073 #CJK UNIFIED IDEOGRAPH + {0xAEC0, 0x632B}, //2074 #CJK UNIFIED IDEOGRAPH + {0xAEC1, 0x6328}, //2075 #CJK UNIFIED IDEOGRAPH + {0xAEC2, 0x634D}, //2076 #CJK UNIFIED IDEOGRAPH + {0xAEC3, 0x634C}, //2077 #CJK UNIFIED IDEOGRAPH + {0xAEC4, 0x6548}, //2078 #CJK UNIFIED IDEOGRAPH + {0xAEC5, 0x6549}, //2079 #CJK UNIFIED IDEOGRAPH + {0xAEC6, 0x6599}, //2080 #CJK UNIFIED IDEOGRAPH + {0xAEC7, 0x65C1}, //2081 #CJK UNIFIED IDEOGRAPH + {0xAEC8, 0x65C5}, //2082 #CJK UNIFIED IDEOGRAPH + {0xAEC9, 0x6642}, //2083 #CJK UNIFIED IDEOGRAPH + {0xAECA, 0x6649}, //2084 #CJK UNIFIED IDEOGRAPH + {0xAECB, 0x664F}, //2085 #CJK UNIFIED IDEOGRAPH + {0xAECC, 0x6643}, //2086 #CJK UNIFIED IDEOGRAPH + {0xAECD, 0x6652}, //2087 #CJK UNIFIED IDEOGRAPH + {0xAECE, 0x664C}, //2088 #CJK UNIFIED IDEOGRAPH + {0xAECF, 0x6645}, //2089 #CJK UNIFIED IDEOGRAPH + {0xAED0, 0x6641}, //2090 #CJK UNIFIED IDEOGRAPH + {0xAED1, 0x66F8}, //2091 #CJK UNIFIED IDEOGRAPH + {0xAED2, 0x6714}, //2092 #CJK UNIFIED IDEOGRAPH + {0xAED3, 0x6715}, //2093 #CJK UNIFIED IDEOGRAPH + {0xAED4, 0x6717}, //2094 #CJK UNIFIED IDEOGRAPH + {0xAED5, 0x6821}, //2095 #CJK UNIFIED IDEOGRAPH + {0xAED6, 0x6838}, //2096 #CJK UNIFIED IDEOGRAPH + {0xAED7, 0x6848}, //2097 #CJK UNIFIED IDEOGRAPH + {0xAED8, 0x6846}, //2098 #CJK UNIFIED IDEOGRAPH + {0xAED9, 0x6853}, //2099 #CJK UNIFIED IDEOGRAPH + {0xAEDA, 0x6839}, //2100 #CJK UNIFIED IDEOGRAPH + {0xAEDB, 0x6842}, //2101 #CJK UNIFIED IDEOGRAPH + {0xAEDC, 0x6854}, //2102 #CJK UNIFIED IDEOGRAPH + {0xAEDD, 0x6829}, //2103 #CJK UNIFIED IDEOGRAPH + {0xAEDE, 0x68B3}, //2104 #CJK UNIFIED IDEOGRAPH + {0xAEDF, 0x6817}, //2105 #CJK UNIFIED IDEOGRAPH + {0xAEE0, 0x684C}, //2106 #CJK UNIFIED IDEOGRAPH + {0xAEE1, 0x6851}, //2107 #CJK UNIFIED IDEOGRAPH + {0xAEE2, 0x683D}, //2108 #CJK UNIFIED IDEOGRAPH + {0xAEE3, 0x67F4}, //2109 #CJK UNIFIED IDEOGRAPH + {0xAEE4, 0x6850}, //2110 #CJK UNIFIED IDEOGRAPH + {0xAEE5, 0x6840}, //2111 #CJK UNIFIED IDEOGRAPH + {0xAEE6, 0x683C}, //2112 #CJK UNIFIED IDEOGRAPH + {0xAEE7, 0x6843}, //2113 #CJK UNIFIED IDEOGRAPH + {0xAEE8, 0x682A}, //2114 #CJK UNIFIED IDEOGRAPH + {0xAEE9, 0x6845}, //2115 #CJK UNIFIED IDEOGRAPH + {0xAEEA, 0x6813}, //2116 #CJK UNIFIED IDEOGRAPH + {0xAEEB, 0x6818}, //2117 #CJK UNIFIED IDEOGRAPH + {0xAEEC, 0x6841}, //2118 #CJK UNIFIED IDEOGRAPH + {0xAEED, 0x6B8A}, //2119 #CJK UNIFIED IDEOGRAPH + {0xAEEE, 0x6B89}, //2120 #CJK UNIFIED IDEOGRAPH + {0xAEEF, 0x6BB7}, //2121 #CJK UNIFIED IDEOGRAPH + {0xAEF0, 0x6C23}, //2122 #CJK UNIFIED IDEOGRAPH + {0xAEF1, 0x6C27}, //2123 #CJK UNIFIED IDEOGRAPH + {0xAEF2, 0x6C28}, //2124 #CJK UNIFIED IDEOGRAPH + {0xAEF3, 0x6C26}, //2125 #CJK UNIFIED IDEOGRAPH + {0xAEF4, 0x6C24}, //2126 #CJK UNIFIED IDEOGRAPH + {0xAEF5, 0x6CF0}, //2127 #CJK UNIFIED IDEOGRAPH + {0xAEF6, 0x6D6A}, //2128 #CJK UNIFIED IDEOGRAPH + {0xAEF7, 0x6D95}, //2129 #CJK UNIFIED IDEOGRAPH + {0xAEF8, 0x6D88}, //2130 #CJK UNIFIED IDEOGRAPH + {0xAEF9, 0x6D87}, //2131 #CJK UNIFIED IDEOGRAPH + {0xAEFA, 0x6D66}, //2132 #CJK UNIFIED IDEOGRAPH + {0xAEFB, 0x6D78}, //2133 #CJK UNIFIED IDEOGRAPH + {0xAEFC, 0x6D77}, //2134 #CJK UNIFIED IDEOGRAPH + {0xAEFD, 0x6D59}, //2135 #CJK UNIFIED IDEOGRAPH + {0xAEFE, 0x6D93}, //2136 #CJK UNIFIED IDEOGRAPH + {0xAF40, 0x6D6C}, //2137 #CJK UNIFIED IDEOGRAPH + {0xAF41, 0x6D89}, //2138 #CJK UNIFIED IDEOGRAPH + {0xAF42, 0x6D6E}, //2139 #CJK UNIFIED IDEOGRAPH + {0xAF43, 0x6D5A}, //2140 #CJK UNIFIED IDEOGRAPH + {0xAF44, 0x6D74}, //2141 #CJK UNIFIED IDEOGRAPH + {0xAF45, 0x6D69}, //2142 #CJK UNIFIED IDEOGRAPH + {0xAF46, 0x6D8C}, //2143 #CJK UNIFIED IDEOGRAPH + {0xAF47, 0x6D8A}, //2144 #CJK UNIFIED IDEOGRAPH + {0xAF48, 0x6D79}, //2145 #CJK UNIFIED IDEOGRAPH + {0xAF49, 0x6D85}, //2146 #CJK UNIFIED IDEOGRAPH + {0xAF4A, 0x6D65}, //2147 #CJK UNIFIED IDEOGRAPH + {0xAF4B, 0x6D94}, //2148 #CJK UNIFIED IDEOGRAPH + {0xAF4C, 0x70CA}, //2149 #CJK UNIFIED IDEOGRAPH + {0xAF4D, 0x70D8}, //2150 #CJK UNIFIED IDEOGRAPH + {0xAF4E, 0x70E4}, //2151 #CJK UNIFIED IDEOGRAPH + {0xAF4F, 0x70D9}, //2152 #CJK UNIFIED IDEOGRAPH + {0xAF50, 0x70C8}, //2153 #CJK UNIFIED IDEOGRAPH + {0xAF51, 0x70CF}, //2154 #CJK UNIFIED IDEOGRAPH + {0xAF52, 0x7239}, //2155 #CJK UNIFIED IDEOGRAPH + {0xAF53, 0x7279}, //2156 #CJK UNIFIED IDEOGRAPH + {0xAF54, 0x72FC}, //2157 #CJK UNIFIED IDEOGRAPH + {0xAF55, 0x72F9}, //2158 #CJK UNIFIED IDEOGRAPH + {0xAF56, 0x72FD}, //2159 #CJK UNIFIED IDEOGRAPH + {0xAF57, 0x72F8}, //2160 #CJK UNIFIED IDEOGRAPH + {0xAF58, 0x72F7}, //2161 #CJK UNIFIED IDEOGRAPH + {0xAF59, 0x7386}, //2162 #CJK UNIFIED IDEOGRAPH + {0xAF5A, 0x73ED}, //2163 #CJK UNIFIED IDEOGRAPH + {0xAF5B, 0x7409}, //2164 #CJK UNIFIED IDEOGRAPH + {0xAF5C, 0x73EE}, //2165 #CJK UNIFIED IDEOGRAPH + {0xAF5D, 0x73E0}, //2166 #CJK UNIFIED IDEOGRAPH + {0xAF5E, 0x73EA}, //2167 #CJK UNIFIED IDEOGRAPH + {0xAF5F, 0x73DE}, //2168 #CJK UNIFIED IDEOGRAPH + {0xAF60, 0x7554}, //2169 #CJK UNIFIED IDEOGRAPH + {0xAF61, 0x755D}, //2170 #CJK UNIFIED IDEOGRAPH + {0xAF62, 0x755C}, //2171 #CJK UNIFIED IDEOGRAPH + {0xAF63, 0x755A}, //2172 #CJK UNIFIED IDEOGRAPH + {0xAF64, 0x7559}, //2173 #CJK UNIFIED IDEOGRAPH + {0xAF65, 0x75BE}, //2174 #CJK UNIFIED IDEOGRAPH + {0xAF66, 0x75C5}, //2175 #CJK UNIFIED IDEOGRAPH + {0xAF67, 0x75C7}, //2176 #CJK UNIFIED IDEOGRAPH + {0xAF68, 0x75B2}, //2177 #CJK UNIFIED IDEOGRAPH + {0xAF69, 0x75B3}, //2178 #CJK UNIFIED IDEOGRAPH + {0xAF6A, 0x75BD}, //2179 #CJK UNIFIED IDEOGRAPH + {0xAF6B, 0x75BC}, //2180 #CJK UNIFIED IDEOGRAPH + {0xAF6C, 0x75B9}, //2181 #CJK UNIFIED IDEOGRAPH + {0xAF6D, 0x75C2}, //2182 #CJK UNIFIED IDEOGRAPH + {0xAF6E, 0x75B8}, //2183 #CJK UNIFIED IDEOGRAPH + {0xAF6F, 0x768B}, //2184 #CJK UNIFIED IDEOGRAPH + {0xAF70, 0x76B0}, //2185 #CJK UNIFIED IDEOGRAPH + {0xAF71, 0x76CA}, //2186 #CJK UNIFIED IDEOGRAPH + {0xAF72, 0x76CD}, //2187 #CJK UNIFIED IDEOGRAPH + {0xAF73, 0x76CE}, //2188 #CJK UNIFIED IDEOGRAPH + {0xAF74, 0x7729}, //2189 #CJK UNIFIED IDEOGRAPH + {0xAF75, 0x771F}, //2190 #CJK UNIFIED IDEOGRAPH + {0xAF76, 0x7720}, //2191 #CJK UNIFIED IDEOGRAPH + {0xAF77, 0x7728}, //2192 #CJK UNIFIED IDEOGRAPH + {0xAF78, 0x77E9}, //2193 #CJK UNIFIED IDEOGRAPH + {0xAF79, 0x7830}, //2194 #CJK UNIFIED IDEOGRAPH + {0xAF7A, 0x7827}, //2195 #CJK UNIFIED IDEOGRAPH + {0xAF7B, 0x7838}, //2196 #CJK UNIFIED IDEOGRAPH + {0xAF7C, 0x781D}, //2197 #CJK UNIFIED IDEOGRAPH + {0xAF7D, 0x7834}, //2198 #CJK UNIFIED IDEOGRAPH + {0xAF7E, 0x7837}, //2199 #CJK UNIFIED IDEOGRAPH + {0xAFA1, 0x7825}, //2200 #CJK UNIFIED IDEOGRAPH + {0xAFA2, 0x782D}, //2201 #CJK UNIFIED IDEOGRAPH + {0xAFA3, 0x7820}, //2202 #CJK UNIFIED IDEOGRAPH + {0xAFA4, 0x781F}, //2203 #CJK UNIFIED IDEOGRAPH + {0xAFA5, 0x7832}, //2204 #CJK UNIFIED IDEOGRAPH + {0xAFA6, 0x7955}, //2205 #CJK UNIFIED IDEOGRAPH + {0xAFA7, 0x7950}, //2206 #CJK UNIFIED IDEOGRAPH + {0xAFA8, 0x7960}, //2207 #CJK UNIFIED IDEOGRAPH + {0xAFA9, 0x795F}, //2208 #CJK UNIFIED IDEOGRAPH + {0xAFAA, 0x7956}, //2209 #CJK UNIFIED IDEOGRAPH + {0xAFAB, 0x795E}, //2210 #CJK UNIFIED IDEOGRAPH + {0xAFAC, 0x795D}, //2211 #CJK UNIFIED IDEOGRAPH + {0xAFAD, 0x7957}, //2212 #CJK UNIFIED IDEOGRAPH + {0xAFAE, 0x795A}, //2213 #CJK UNIFIED IDEOGRAPH + {0xAFAF, 0x79E4}, //2214 #CJK UNIFIED IDEOGRAPH + {0xAFB0, 0x79E3}, //2215 #CJK UNIFIED IDEOGRAPH + {0xAFB1, 0x79E7}, //2216 #CJK UNIFIED IDEOGRAPH + {0xAFB2, 0x79DF}, //2217 #CJK UNIFIED IDEOGRAPH + {0xAFB3, 0x79E6}, //2218 #CJK UNIFIED IDEOGRAPH + {0xAFB4, 0x79E9}, //2219 #CJK UNIFIED IDEOGRAPH + {0xAFB5, 0x79D8}, //2220 #CJK UNIFIED IDEOGRAPH + {0xAFB6, 0x7A84}, //2221 #CJK UNIFIED IDEOGRAPH + {0xAFB7, 0x7A88}, //2222 #CJK UNIFIED IDEOGRAPH + {0xAFB8, 0x7AD9}, //2223 #CJK UNIFIED IDEOGRAPH + {0xAFB9, 0x7B06}, //2224 #CJK UNIFIED IDEOGRAPH + {0xAFBA, 0x7B11}, //2225 #CJK UNIFIED IDEOGRAPH + {0xAFBB, 0x7C89}, //2226 #CJK UNIFIED IDEOGRAPH + {0xAFBC, 0x7D21}, //2227 #CJK UNIFIED IDEOGRAPH + {0xAFBD, 0x7D17}, //2228 #CJK UNIFIED IDEOGRAPH + {0xAFBE, 0x7D0B}, //2229 #CJK UNIFIED IDEOGRAPH + {0xAFBF, 0x7D0A}, //2230 #CJK UNIFIED IDEOGRAPH + {0xAFC0, 0x7D20}, //2231 #CJK UNIFIED IDEOGRAPH + {0xAFC1, 0x7D22}, //2232 #CJK UNIFIED IDEOGRAPH + {0xAFC2, 0x7D14}, //2233 #CJK UNIFIED IDEOGRAPH + {0xAFC3, 0x7D10}, //2234 #CJK UNIFIED IDEOGRAPH + {0xAFC4, 0x7D15}, //2235 #CJK UNIFIED IDEOGRAPH + {0xAFC5, 0x7D1A}, //2236 #CJK UNIFIED IDEOGRAPH + {0xAFC6, 0x7D1C}, //2237 #CJK UNIFIED IDEOGRAPH + {0xAFC7, 0x7D0D}, //2238 #CJK UNIFIED IDEOGRAPH + {0xAFC8, 0x7D19}, //2239 #CJK UNIFIED IDEOGRAPH + {0xAFC9, 0x7D1B}, //2240 #CJK UNIFIED IDEOGRAPH + {0xAFCA, 0x7F3A}, //2241 #CJK UNIFIED IDEOGRAPH + {0xAFCB, 0x7F5F}, //2242 #CJK UNIFIED IDEOGRAPH + {0xAFCC, 0x7F94}, //2243 #CJK UNIFIED IDEOGRAPH + {0xAFCD, 0x7FC5}, //2244 #CJK UNIFIED IDEOGRAPH + {0xAFCE, 0x7FC1}, //2245 #CJK UNIFIED IDEOGRAPH + {0xAFCF, 0x8006}, //2246 #CJK UNIFIED IDEOGRAPH + {0xAFD0, 0x8018}, //2247 #CJK UNIFIED IDEOGRAPH + {0xAFD1, 0x8015}, //2248 #CJK UNIFIED IDEOGRAPH + {0xAFD2, 0x8019}, //2249 #CJK UNIFIED IDEOGRAPH + {0xAFD3, 0x8017}, //2250 #CJK UNIFIED IDEOGRAPH + {0xAFD4, 0x803D}, //2251 #CJK UNIFIED IDEOGRAPH + {0xAFD5, 0x803F}, //2252 #CJK UNIFIED IDEOGRAPH + {0xAFD6, 0x80F1}, //2253 #CJK UNIFIED IDEOGRAPH + {0xAFD7, 0x8102}, //2254 #CJK UNIFIED IDEOGRAPH + {0xAFD8, 0x80F0}, //2255 #CJK UNIFIED IDEOGRAPH + {0xAFD9, 0x8105}, //2256 #CJK UNIFIED IDEOGRAPH + {0xAFDA, 0x80ED}, //2257 #CJK UNIFIED IDEOGRAPH + {0xAFDB, 0x80F4}, //2258 #CJK UNIFIED IDEOGRAPH + {0xAFDC, 0x8106}, //2259 #CJK UNIFIED IDEOGRAPH + {0xAFDD, 0x80F8}, //2260 #CJK UNIFIED IDEOGRAPH + {0xAFDE, 0x80F3}, //2261 #CJK UNIFIED IDEOGRAPH + {0xAFDF, 0x8108}, //2262 #CJK UNIFIED IDEOGRAPH + {0xAFE0, 0x80FD}, //2263 #CJK UNIFIED IDEOGRAPH + {0xAFE1, 0x810A}, //2264 #CJK UNIFIED IDEOGRAPH + {0xAFE2, 0x80FC}, //2265 #CJK UNIFIED IDEOGRAPH + {0xAFE3, 0x80EF}, //2266 #CJK UNIFIED IDEOGRAPH + {0xAFE4, 0x81ED}, //2267 #CJK UNIFIED IDEOGRAPH + {0xAFE5, 0x81EC}, //2268 #CJK UNIFIED IDEOGRAPH + {0xAFE6, 0x8200}, //2269 #CJK UNIFIED IDEOGRAPH + {0xAFE7, 0x8210}, //2270 #CJK UNIFIED IDEOGRAPH + {0xAFE8, 0x822A}, //2271 #CJK UNIFIED IDEOGRAPH + {0xAFE9, 0x822B}, //2272 #CJK UNIFIED IDEOGRAPH + {0xAFEA, 0x8228}, //2273 #CJK UNIFIED IDEOGRAPH + {0xAFEB, 0x822C}, //2274 #CJK UNIFIED IDEOGRAPH + {0xAFEC, 0x82BB}, //2275 #CJK UNIFIED IDEOGRAPH + {0xAFED, 0x832B}, //2276 #CJK UNIFIED IDEOGRAPH + {0xAFEE, 0x8352}, //2277 #CJK UNIFIED IDEOGRAPH + {0xAFEF, 0x8354}, //2278 #CJK UNIFIED IDEOGRAPH + {0xAFF0, 0x834A}, //2279 #CJK UNIFIED IDEOGRAPH + {0xAFF1, 0x8338}, //2280 #CJK UNIFIED IDEOGRAPH + {0xAFF2, 0x8350}, //2281 #CJK UNIFIED IDEOGRAPH + {0xAFF3, 0x8349}, //2282 #CJK UNIFIED IDEOGRAPH + {0xAFF4, 0x8335}, //2283 #CJK UNIFIED IDEOGRAPH + {0xAFF5, 0x8334}, //2284 #CJK UNIFIED IDEOGRAPH + {0xAFF6, 0x834F}, //2285 #CJK UNIFIED IDEOGRAPH + {0xAFF7, 0x8332}, //2286 #CJK UNIFIED IDEOGRAPH + {0xAFF8, 0x8339}, //2287 #CJK UNIFIED IDEOGRAPH + {0xAFF9, 0x8336}, //2288 #CJK UNIFIED IDEOGRAPH + {0xAFFA, 0x8317}, //2289 #CJK UNIFIED IDEOGRAPH + {0xAFFB, 0x8340}, //2290 #CJK UNIFIED IDEOGRAPH + {0xAFFC, 0x8331}, //2291 #CJK UNIFIED IDEOGRAPH + {0xAFFD, 0x8328}, //2292 #CJK UNIFIED IDEOGRAPH + {0xAFFE, 0x8343}, //2293 #CJK UNIFIED IDEOGRAPH + {0xB040, 0x8654}, //2294 #CJK UNIFIED IDEOGRAPH + {0xB041, 0x868A}, //2295 #CJK UNIFIED IDEOGRAPH + {0xB042, 0x86AA}, //2296 #CJK UNIFIED IDEOGRAPH + {0xB043, 0x8693}, //2297 #CJK UNIFIED IDEOGRAPH + {0xB044, 0x86A4}, //2298 #CJK UNIFIED IDEOGRAPH + {0xB045, 0x86A9}, //2299 #CJK UNIFIED IDEOGRAPH + {0xB046, 0x868C}, //2300 #CJK UNIFIED IDEOGRAPH + {0xB047, 0x86A3}, //2301 #CJK UNIFIED IDEOGRAPH + {0xB048, 0x869C}, //2302 #CJK UNIFIED IDEOGRAPH + {0xB049, 0x8870}, //2303 #CJK UNIFIED IDEOGRAPH + {0xB04A, 0x8877}, //2304 #CJK UNIFIED IDEOGRAPH + {0xB04B, 0x8881}, //2305 #CJK UNIFIED IDEOGRAPH + {0xB04C, 0x8882}, //2306 #CJK UNIFIED IDEOGRAPH + {0xB04D, 0x887D}, //2307 #CJK UNIFIED IDEOGRAPH + {0xB04E, 0x8879}, //2308 #CJK UNIFIED IDEOGRAPH + {0xB04F, 0x8A18}, //2309 #CJK UNIFIED IDEOGRAPH + {0xB050, 0x8A10}, //2310 #CJK UNIFIED IDEOGRAPH + {0xB051, 0x8A0E}, //2311 #CJK UNIFIED IDEOGRAPH + {0xB052, 0x8A0C}, //2312 #CJK UNIFIED IDEOGRAPH + {0xB053, 0x8A15}, //2313 #CJK UNIFIED IDEOGRAPH + {0xB054, 0x8A0A}, //2314 #CJK UNIFIED IDEOGRAPH + {0xB055, 0x8A17}, //2315 #CJK UNIFIED IDEOGRAPH + {0xB056, 0x8A13}, //2316 #CJK UNIFIED IDEOGRAPH + {0xB057, 0x8A16}, //2317 #CJK UNIFIED IDEOGRAPH + {0xB058, 0x8A0F}, //2318 #CJK UNIFIED IDEOGRAPH + {0xB059, 0x8A11}, //2319 #CJK UNIFIED IDEOGRAPH + {0xB05A, 0x8C48}, //2320 #CJK UNIFIED IDEOGRAPH + {0xB05B, 0x8C7A}, //2321 #CJK UNIFIED IDEOGRAPH + {0xB05C, 0x8C79}, //2322 #CJK UNIFIED IDEOGRAPH + {0xB05D, 0x8CA1}, //2323 #CJK UNIFIED IDEOGRAPH + {0xB05E, 0x8CA2}, //2324 #CJK UNIFIED IDEOGRAPH + {0xB05F, 0x8D77}, //2325 #CJK UNIFIED IDEOGRAPH + {0xB060, 0x8EAC}, //2326 #CJK UNIFIED IDEOGRAPH + {0xB061, 0x8ED2}, //2327 #CJK UNIFIED IDEOGRAPH + {0xB062, 0x8ED4}, //2328 #CJK UNIFIED IDEOGRAPH + {0xB063, 0x8ECF}, //2329 #CJK UNIFIED IDEOGRAPH + {0xB064, 0x8FB1}, //2330 #CJK UNIFIED IDEOGRAPH + {0xB065, 0x9001}, //2331 #CJK UNIFIED IDEOGRAPH + {0xB066, 0x9006}, //2332 #CJK UNIFIED IDEOGRAPH + {0xB067, 0x8FF7}, //2333 #CJK UNIFIED IDEOGRAPH + {0xB068, 0x9000}, //2334 #CJK UNIFIED IDEOGRAPH + {0xB069, 0x8FFA}, //2335 #CJK UNIFIED IDEOGRAPH + {0xB06A, 0x8FF4}, //2336 #CJK UNIFIED IDEOGRAPH + {0xB06B, 0x9003}, //2337 #CJK UNIFIED IDEOGRAPH + {0xB06C, 0x8FFD}, //2338 #CJK UNIFIED IDEOGRAPH + {0xB06D, 0x9005}, //2339 #CJK UNIFIED IDEOGRAPH + {0xB06E, 0x8FF8}, //2340 #CJK UNIFIED IDEOGRAPH + {0xB06F, 0x9095}, //2341 #CJK UNIFIED IDEOGRAPH + {0xB070, 0x90E1}, //2342 #CJK UNIFIED IDEOGRAPH + {0xB071, 0x90DD}, //2343 #CJK UNIFIED IDEOGRAPH + {0xB072, 0x90E2}, //2344 #CJK UNIFIED IDEOGRAPH + {0xB073, 0x9152}, //2345 #CJK UNIFIED IDEOGRAPH + {0xB074, 0x914D}, //2346 #CJK UNIFIED IDEOGRAPH + {0xB075, 0x914C}, //2347 #CJK UNIFIED IDEOGRAPH + {0xB076, 0x91D8}, //2348 #CJK UNIFIED IDEOGRAPH + {0xB077, 0x91DD}, //2349 #CJK UNIFIED IDEOGRAPH + {0xB078, 0x91D7}, //2350 #CJK UNIFIED IDEOGRAPH + {0xB079, 0x91DC}, //2351 #CJK UNIFIED IDEOGRAPH + {0xB07A, 0x91D9}, //2352 #CJK UNIFIED IDEOGRAPH + {0xB07B, 0x9583}, //2353 #CJK UNIFIED IDEOGRAPH + {0xB07C, 0x9662}, //2354 #CJK UNIFIED IDEOGRAPH + {0xB07D, 0x9663}, //2355 #CJK UNIFIED IDEOGRAPH + {0xB07E, 0x9661}, //2356 #CJK UNIFIED IDEOGRAPH + {0xB0A1, 0x965B}, //2357 #CJK UNIFIED IDEOGRAPH + {0xB0A2, 0x965D}, //2358 #CJK UNIFIED IDEOGRAPH + {0xB0A3, 0x9664}, //2359 #CJK UNIFIED IDEOGRAPH + {0xB0A4, 0x9658}, //2360 #CJK UNIFIED IDEOGRAPH + {0xB0A5, 0x965E}, //2361 #CJK UNIFIED IDEOGRAPH + {0xB0A6, 0x96BB}, //2362 #CJK UNIFIED IDEOGRAPH + {0xB0A7, 0x98E2}, //2363 #CJK UNIFIED IDEOGRAPH + {0xB0A8, 0x99AC}, //2364 #CJK UNIFIED IDEOGRAPH + {0xB0A9, 0x9AA8}, //2365 #CJK UNIFIED IDEOGRAPH + {0xB0AA, 0x9AD8}, //2366 #CJK UNIFIED IDEOGRAPH + {0xB0AB, 0x9B25}, //2367 #CJK UNIFIED IDEOGRAPH + {0xB0AC, 0x9B32}, //2368 #CJK UNIFIED IDEOGRAPH + {0xB0AD, 0x9B3C}, //2369 #CJK UNIFIED IDEOGRAPH + {0xB0AE, 0x4E7E}, //2370 #CJK UNIFIED IDEOGRAPH + {0xB0AF, 0x507A}, //2371 #CJK UNIFIED IDEOGRAPH + {0xB0B0, 0x507D}, //2372 #CJK UNIFIED IDEOGRAPH + {0xB0B1, 0x505C}, //2373 #CJK UNIFIED IDEOGRAPH + {0xB0B2, 0x5047}, //2374 #CJK UNIFIED IDEOGRAPH + {0xB0B3, 0x5043}, //2375 #CJK UNIFIED IDEOGRAPH + {0xB0B4, 0x504C}, //2376 #CJK UNIFIED IDEOGRAPH + {0xB0B5, 0x505A}, //2377 #CJK UNIFIED IDEOGRAPH + {0xB0B6, 0x5049}, //2378 #CJK UNIFIED IDEOGRAPH + {0xB0B7, 0x5065}, //2379 #CJK UNIFIED IDEOGRAPH + {0xB0B8, 0x5076}, //2380 #CJK UNIFIED IDEOGRAPH + {0xB0B9, 0x504E}, //2381 #CJK UNIFIED IDEOGRAPH + {0xB0BA, 0x5055}, //2382 #CJK UNIFIED IDEOGRAPH + {0xB0BB, 0x5075}, //2383 #CJK UNIFIED IDEOGRAPH + {0xB0BC, 0x5074}, //2384 #CJK UNIFIED IDEOGRAPH + {0xB0BD, 0x5077}, //2385 #CJK UNIFIED IDEOGRAPH + {0xB0BE, 0x504F}, //2386 #CJK UNIFIED IDEOGRAPH + {0xB0BF, 0x500F}, //2387 #CJK UNIFIED IDEOGRAPH + {0xB0C0, 0x506F}, //2388 #CJK UNIFIED IDEOGRAPH + {0xB0C1, 0x506D}, //2389 #CJK UNIFIED IDEOGRAPH + {0xB0C2, 0x515C}, //2390 #CJK UNIFIED IDEOGRAPH + {0xB0C3, 0x5195}, //2391 #CJK UNIFIED IDEOGRAPH + {0xB0C4, 0x51F0}, //2392 #CJK UNIFIED IDEOGRAPH + {0xB0C5, 0x526A}, //2393 #CJK UNIFIED IDEOGRAPH + {0xB0C6, 0x526F}, //2394 #CJK UNIFIED IDEOGRAPH + {0xB0C7, 0x52D2}, //2395 #CJK UNIFIED IDEOGRAPH + {0xB0C8, 0x52D9}, //2396 #CJK UNIFIED IDEOGRAPH + {0xB0C9, 0x52D8}, //2397 #CJK UNIFIED IDEOGRAPH + {0xB0CA, 0x52D5}, //2398 #CJK UNIFIED IDEOGRAPH + {0xB0CB, 0x5310}, //2399 #CJK UNIFIED IDEOGRAPH + {0xB0CC, 0x530F}, //2400 #CJK UNIFIED IDEOGRAPH + {0xB0CD, 0x5319}, //2401 #CJK UNIFIED IDEOGRAPH + {0xB0CE, 0x533F}, //2402 #CJK UNIFIED IDEOGRAPH + {0xB0CF, 0x5340}, //2403 #CJK UNIFIED IDEOGRAPH + {0xB0D0, 0x533E}, //2404 #CJK UNIFIED IDEOGRAPH + {0xB0D1, 0x53C3}, //2405 #CJK UNIFIED IDEOGRAPH + {0xB0D2, 0x66FC}, //2406 #CJK UNIFIED IDEOGRAPH + {0xB0D3, 0x5546}, //2407 #CJK UNIFIED IDEOGRAPH + {0xB0D4, 0x556A}, //2408 #CJK UNIFIED IDEOGRAPH + {0xB0D5, 0x5566}, //2409 #CJK UNIFIED IDEOGRAPH + {0xB0D6, 0x5544}, //2410 #CJK UNIFIED IDEOGRAPH + {0xB0D7, 0x555E}, //2411 #CJK UNIFIED IDEOGRAPH + {0xB0D8, 0x5561}, //2412 #CJK UNIFIED IDEOGRAPH + {0xB0D9, 0x5543}, //2413 #CJK UNIFIED IDEOGRAPH + {0xB0DA, 0x554A}, //2414 #CJK UNIFIED IDEOGRAPH + {0xB0DB, 0x5531}, //2415 #CJK UNIFIED IDEOGRAPH + {0xB0DC, 0x5556}, //2416 #CJK UNIFIED IDEOGRAPH + {0xB0DD, 0x554F}, //2417 #CJK UNIFIED IDEOGRAPH + {0xB0DE, 0x5555}, //2418 #CJK UNIFIED IDEOGRAPH + {0xB0DF, 0x552F}, //2419 #CJK UNIFIED IDEOGRAPH + {0xB0E0, 0x5564}, //2420 #CJK UNIFIED IDEOGRAPH + {0xB0E1, 0x5538}, //2421 #CJK UNIFIED IDEOGRAPH + {0xB0E2, 0x552E}, //2422 #CJK UNIFIED IDEOGRAPH + {0xB0E3, 0x555C}, //2423 #CJK UNIFIED IDEOGRAPH + {0xB0E4, 0x552C}, //2424 #CJK UNIFIED IDEOGRAPH + {0xB0E5, 0x5563}, //2425 #CJK UNIFIED IDEOGRAPH + {0xB0E6, 0x5533}, //2426 #CJK UNIFIED IDEOGRAPH + {0xB0E7, 0x5541}, //2427 #CJK UNIFIED IDEOGRAPH + {0xB0E8, 0x5557}, //2428 #CJK UNIFIED IDEOGRAPH + {0xB0E9, 0x5708}, //2429 #CJK UNIFIED IDEOGRAPH + {0xB0EA, 0x570B}, //2430 #CJK UNIFIED IDEOGRAPH + {0xB0EB, 0x5709}, //2431 #CJK UNIFIED IDEOGRAPH + {0xB0EC, 0x57DF}, //2432 #CJK UNIFIED IDEOGRAPH + {0xB0ED, 0x5805}, //2433 #CJK UNIFIED IDEOGRAPH + {0xB0EE, 0x580A}, //2434 #CJK UNIFIED IDEOGRAPH + {0xB0EF, 0x5806}, //2435 #CJK UNIFIED IDEOGRAPH + {0xB0F0, 0x57E0}, //2436 #CJK UNIFIED IDEOGRAPH + {0xB0F1, 0x57E4}, //2437 #CJK UNIFIED IDEOGRAPH + {0xB0F2, 0x57FA}, //2438 #CJK UNIFIED IDEOGRAPH + {0xB0F3, 0x5802}, //2439 #CJK UNIFIED IDEOGRAPH + {0xB0F4, 0x5835}, //2440 #CJK UNIFIED IDEOGRAPH + {0xB0F5, 0x57F7}, //2441 #CJK UNIFIED IDEOGRAPH + {0xB0F6, 0x57F9}, //2442 #CJK UNIFIED IDEOGRAPH + {0xB0F7, 0x5920}, //2443 #CJK UNIFIED IDEOGRAPH + {0xB0F8, 0x5962}, //2444 #CJK UNIFIED IDEOGRAPH + {0xB0F9, 0x5A36}, //2445 #CJK UNIFIED IDEOGRAPH + {0xB0FA, 0x5A41}, //2446 #CJK UNIFIED IDEOGRAPH + {0xB0FB, 0x5A49}, //2447 #CJK UNIFIED IDEOGRAPH + {0xB0FC, 0x5A66}, //2448 #CJK UNIFIED IDEOGRAPH + {0xB0FD, 0x5A6A}, //2449 #CJK UNIFIED IDEOGRAPH + {0xB0FE, 0x5A40}, //2450 #CJK UNIFIED IDEOGRAPH + {0xB140, 0x5A3C}, //2451 #CJK UNIFIED IDEOGRAPH + {0xB141, 0x5A62}, //2452 #CJK UNIFIED IDEOGRAPH + {0xB142, 0x5A5A}, //2453 #CJK UNIFIED IDEOGRAPH + {0xB143, 0x5A46}, //2454 #CJK UNIFIED IDEOGRAPH + {0xB144, 0x5A4A}, //2455 #CJK UNIFIED IDEOGRAPH + {0xB145, 0x5B70}, //2456 #CJK UNIFIED IDEOGRAPH + {0xB146, 0x5BC7}, //2457 #CJK UNIFIED IDEOGRAPH + {0xB147, 0x5BC5}, //2458 #CJK UNIFIED IDEOGRAPH + {0xB148, 0x5BC4}, //2459 #CJK UNIFIED IDEOGRAPH + {0xB149, 0x5BC2}, //2460 #CJK UNIFIED IDEOGRAPH + {0xB14A, 0x5BBF}, //2461 #CJK UNIFIED IDEOGRAPH + {0xB14B, 0x5BC6}, //2462 #CJK UNIFIED IDEOGRAPH + {0xB14C, 0x5C09}, //2463 #CJK UNIFIED IDEOGRAPH + {0xB14D, 0x5C08}, //2464 #CJK UNIFIED IDEOGRAPH + {0xB14E, 0x5C07}, //2465 #CJK UNIFIED IDEOGRAPH + {0xB14F, 0x5C60}, //2466 #CJK UNIFIED IDEOGRAPH + {0xB150, 0x5C5C}, //2467 #CJK UNIFIED IDEOGRAPH + {0xB151, 0x5C5D}, //2468 #CJK UNIFIED IDEOGRAPH + {0xB152, 0x5D07}, //2469 #CJK UNIFIED IDEOGRAPH + {0xB153, 0x5D06}, //2470 #CJK UNIFIED IDEOGRAPH + {0xB154, 0x5D0E}, //2471 #CJK UNIFIED IDEOGRAPH + {0xB155, 0x5D1B}, //2472 #CJK UNIFIED IDEOGRAPH + {0xB156, 0x5D16}, //2473 #CJK UNIFIED IDEOGRAPH + {0xB157, 0x5D22}, //2474 #CJK UNIFIED IDEOGRAPH + {0xB158, 0x5D11}, //2475 #CJK UNIFIED IDEOGRAPH + {0xB159, 0x5D29}, //2476 #CJK UNIFIED IDEOGRAPH + {0xB15A, 0x5D14}, //2477 #CJK UNIFIED IDEOGRAPH + {0xB15B, 0x5D19}, //2478 #CJK UNIFIED IDEOGRAPH + {0xB15C, 0x5D24}, //2479 #CJK UNIFIED IDEOGRAPH + {0xB15D, 0x5D27}, //2480 #CJK UNIFIED IDEOGRAPH + {0xB15E, 0x5D17}, //2481 #CJK UNIFIED IDEOGRAPH + {0xB15F, 0x5DE2}, //2482 #CJK UNIFIED IDEOGRAPH + {0xB160, 0x5E38}, //2483 #CJK UNIFIED IDEOGRAPH + {0xB161, 0x5E36}, //2484 #CJK UNIFIED IDEOGRAPH + {0xB162, 0x5E33}, //2485 #CJK UNIFIED IDEOGRAPH + {0xB163, 0x5E37}, //2486 #CJK UNIFIED IDEOGRAPH + {0xB164, 0x5EB7}, //2487 #CJK UNIFIED IDEOGRAPH + {0xB165, 0x5EB8}, //2488 #CJK UNIFIED IDEOGRAPH + {0xB166, 0x5EB6}, //2489 #CJK UNIFIED IDEOGRAPH + {0xB167, 0x5EB5}, //2490 #CJK UNIFIED IDEOGRAPH + {0xB168, 0x5EBE}, //2491 #CJK UNIFIED IDEOGRAPH + {0xB169, 0x5F35}, //2492 #CJK UNIFIED IDEOGRAPH + {0xB16A, 0x5F37}, //2493 #CJK UNIFIED IDEOGRAPH + {0xB16B, 0x5F57}, //2494 #CJK UNIFIED IDEOGRAPH + {0xB16C, 0x5F6C}, //2495 #CJK UNIFIED IDEOGRAPH + {0xB16D, 0x5F69}, //2496 #CJK UNIFIED IDEOGRAPH + {0xB16E, 0x5F6B}, //2497 #CJK UNIFIED IDEOGRAPH + {0xB16F, 0x5F97}, //2498 #CJK UNIFIED IDEOGRAPH + {0xB170, 0x5F99}, //2499 #CJK UNIFIED IDEOGRAPH + {0xB171, 0x5F9E}, //2500 #CJK UNIFIED IDEOGRAPH + {0xB172, 0x5F98}, //2501 #CJK UNIFIED IDEOGRAPH + {0xB173, 0x5FA1}, //2502 #CJK UNIFIED IDEOGRAPH + {0xB174, 0x5FA0}, //2503 #CJK UNIFIED IDEOGRAPH + {0xB175, 0x5F9C}, //2504 #CJK UNIFIED IDEOGRAPH + {0xB176, 0x607F}, //2505 #CJK UNIFIED IDEOGRAPH + {0xB177, 0x60A3}, //2506 #CJK UNIFIED IDEOGRAPH + {0xB178, 0x6089}, //2507 #CJK UNIFIED IDEOGRAPH + {0xB179, 0x60A0}, //2508 #CJK UNIFIED IDEOGRAPH + {0xB17A, 0x60A8}, //2509 #CJK UNIFIED IDEOGRAPH + {0xB17B, 0x60CB}, //2510 #CJK UNIFIED IDEOGRAPH + {0xB17C, 0x60B4}, //2511 #CJK UNIFIED IDEOGRAPH + {0xB17D, 0x60E6}, //2512 #CJK UNIFIED IDEOGRAPH + {0xB17E, 0x60BD}, //2513 #CJK UNIFIED IDEOGRAPH + {0xB1A1, 0x60C5}, //2514 #CJK UNIFIED IDEOGRAPH + {0xB1A2, 0x60BB}, //2515 #CJK UNIFIED IDEOGRAPH + {0xB1A3, 0x60B5}, //2516 #CJK UNIFIED IDEOGRAPH + {0xB1A4, 0x60DC}, //2517 #CJK UNIFIED IDEOGRAPH + {0xB1A5, 0x60BC}, //2518 #CJK UNIFIED IDEOGRAPH + {0xB1A6, 0x60D8}, //2519 #CJK UNIFIED IDEOGRAPH + {0xB1A7, 0x60D5}, //2520 #CJK UNIFIED IDEOGRAPH + {0xB1A8, 0x60C6}, //2521 #CJK UNIFIED IDEOGRAPH + {0xB1A9, 0x60DF}, //2522 #CJK UNIFIED IDEOGRAPH + {0xB1AA, 0x60B8}, //2523 #CJK UNIFIED IDEOGRAPH + {0xB1AB, 0x60DA}, //2524 #CJK UNIFIED IDEOGRAPH + {0xB1AC, 0x60C7}, //2525 #CJK UNIFIED IDEOGRAPH + {0xB1AD, 0x621A}, //2526 #CJK UNIFIED IDEOGRAPH + {0xB1AE, 0x621B}, //2527 #CJK UNIFIED IDEOGRAPH + {0xB1AF, 0x6248}, //2528 #CJK UNIFIED IDEOGRAPH + {0xB1B0, 0x63A0}, //2529 #CJK UNIFIED IDEOGRAPH + {0xB1B1, 0x63A7}, //2530 #CJK UNIFIED IDEOGRAPH + {0xB1B2, 0x6372}, //2531 #CJK UNIFIED IDEOGRAPH + {0xB1B3, 0x6396}, //2532 #CJK UNIFIED IDEOGRAPH + {0xB1B4, 0x63A2}, //2533 #CJK UNIFIED IDEOGRAPH + {0xB1B5, 0x63A5}, //2534 #CJK UNIFIED IDEOGRAPH + {0xB1B6, 0x6377}, //2535 #CJK UNIFIED IDEOGRAPH + {0xB1B7, 0x6367}, //2536 #CJK UNIFIED IDEOGRAPH + {0xB1B8, 0x6398}, //2537 #CJK UNIFIED IDEOGRAPH + {0xB1B9, 0x63AA}, //2538 #CJK UNIFIED IDEOGRAPH + {0xB1BA, 0x6371}, //2539 #CJK UNIFIED IDEOGRAPH + {0xB1BB, 0x63A9}, //2540 #CJK UNIFIED IDEOGRAPH + {0xB1BC, 0x6389}, //2541 #CJK UNIFIED IDEOGRAPH + {0xB1BD, 0x6383}, //2542 #CJK UNIFIED IDEOGRAPH + {0xB1BE, 0x639B}, //2543 #CJK UNIFIED IDEOGRAPH + {0xB1BF, 0x636B}, //2544 #CJK UNIFIED IDEOGRAPH + {0xB1C0, 0x63A8}, //2545 #CJK UNIFIED IDEOGRAPH + {0xB1C1, 0x6384}, //2546 #CJK UNIFIED IDEOGRAPH + {0xB1C2, 0x6388}, //2547 #CJK UNIFIED IDEOGRAPH + {0xB1C3, 0x6399}, //2548 #CJK UNIFIED IDEOGRAPH + {0xB1C4, 0x63A1}, //2549 #CJK UNIFIED IDEOGRAPH + {0xB1C5, 0x63AC}, //2550 #CJK UNIFIED IDEOGRAPH + {0xB1C6, 0x6392}, //2551 #CJK UNIFIED IDEOGRAPH + {0xB1C7, 0x638F}, //2552 #CJK UNIFIED IDEOGRAPH + {0xB1C8, 0x6380}, //2553 #CJK UNIFIED IDEOGRAPH + {0xB1C9, 0x637B}, //2554 #CJK UNIFIED IDEOGRAPH + {0xB1CA, 0x6369}, //2555 #CJK UNIFIED IDEOGRAPH + {0xB1CB, 0x6368}, //2556 #CJK UNIFIED IDEOGRAPH + {0xB1CC, 0x637A}, //2557 #CJK UNIFIED IDEOGRAPH + {0xB1CD, 0x655D}, //2558 #CJK UNIFIED IDEOGRAPH + {0xB1CE, 0x6556}, //2559 #CJK UNIFIED IDEOGRAPH + {0xB1CF, 0x6551}, //2560 #CJK UNIFIED IDEOGRAPH + {0xB1D0, 0x6559}, //2561 #CJK UNIFIED IDEOGRAPH + {0xB1D1, 0x6557}, //2562 #CJK UNIFIED IDEOGRAPH + {0xB1D2, 0x555F}, //2563 #CJK UNIFIED IDEOGRAPH + {0xB1D3, 0x654F}, //2564 #CJK UNIFIED IDEOGRAPH + {0xB1D4, 0x6558}, //2565 #CJK UNIFIED IDEOGRAPH + {0xB1D5, 0x6555}, //2566 #CJK UNIFIED IDEOGRAPH + {0xB1D6, 0x6554}, //2567 #CJK UNIFIED IDEOGRAPH + {0xB1D7, 0x659C}, //2568 #CJK UNIFIED IDEOGRAPH + {0xB1D8, 0x659B}, //2569 #CJK UNIFIED IDEOGRAPH + {0xB1D9, 0x65AC}, //2570 #CJK UNIFIED IDEOGRAPH + {0xB1DA, 0x65CF}, //2571 #CJK UNIFIED IDEOGRAPH + {0xB1DB, 0x65CB}, //2572 #CJK UNIFIED IDEOGRAPH + {0xB1DC, 0x65CC}, //2573 #CJK UNIFIED IDEOGRAPH + {0xB1DD, 0x65CE}, //2574 #CJK UNIFIED IDEOGRAPH + {0xB1DE, 0x665D}, //2575 #CJK UNIFIED IDEOGRAPH + {0xB1DF, 0x665A}, //2576 #CJK UNIFIED IDEOGRAPH + {0xB1E0, 0x6664}, //2577 #CJK UNIFIED IDEOGRAPH + {0xB1E1, 0x6668}, //2578 #CJK UNIFIED IDEOGRAPH + {0xB1E2, 0x6666}, //2579 #CJK UNIFIED IDEOGRAPH + {0xB1E3, 0x665E}, //2580 #CJK UNIFIED IDEOGRAPH + {0xB1E4, 0x66F9}, //2581 #CJK UNIFIED IDEOGRAPH + {0xB1E5, 0x52D7}, //2582 #CJK UNIFIED IDEOGRAPH + {0xB1E6, 0x671B}, //2583 #CJK UNIFIED IDEOGRAPH + {0xB1E7, 0x6881}, //2584 #CJK UNIFIED IDEOGRAPH + {0xB1E8, 0x68AF}, //2585 #CJK UNIFIED IDEOGRAPH + {0xB1E9, 0x68A2}, //2586 #CJK UNIFIED IDEOGRAPH + {0xB1EA, 0x6893}, //2587 #CJK UNIFIED IDEOGRAPH + {0xB1EB, 0x68B5}, //2588 #CJK UNIFIED IDEOGRAPH + {0xB1EC, 0x687F}, //2589 #CJK UNIFIED IDEOGRAPH + {0xB1ED, 0x6876}, //2590 #CJK UNIFIED IDEOGRAPH + {0xB1EE, 0x68B1}, //2591 #CJK UNIFIED IDEOGRAPH + {0xB1EF, 0x68A7}, //2592 #CJK UNIFIED IDEOGRAPH + {0xB1F0, 0x6897}, //2593 #CJK UNIFIED IDEOGRAPH + {0xB1F1, 0x68B0}, //2594 #CJK UNIFIED IDEOGRAPH + {0xB1F2, 0x6883}, //2595 #CJK UNIFIED IDEOGRAPH + {0xB1F3, 0x68C4}, //2596 #CJK UNIFIED IDEOGRAPH + {0xB1F4, 0x68AD}, //2597 #CJK UNIFIED IDEOGRAPH + {0xB1F5, 0x6886}, //2598 #CJK UNIFIED IDEOGRAPH + {0xB1F6, 0x6885}, //2599 #CJK UNIFIED IDEOGRAPH + {0xB1F7, 0x6894}, //2600 #CJK UNIFIED IDEOGRAPH + {0xB1F8, 0x689D}, //2601 #CJK UNIFIED IDEOGRAPH + {0xB1F9, 0x68A8}, //2602 #CJK UNIFIED IDEOGRAPH + {0xB1FA, 0x689F}, //2603 #CJK UNIFIED IDEOGRAPH + {0xB1FB, 0x68A1}, //2604 #CJK UNIFIED IDEOGRAPH + {0xB1FC, 0x6882}, //2605 #CJK UNIFIED IDEOGRAPH + {0xB1FD, 0x6B32}, //2606 #CJK UNIFIED IDEOGRAPH + {0xB1FE, 0x6BBA}, //2607 #CJK UNIFIED IDEOGRAPH + {0xB240, 0x6BEB}, //2608 #CJK UNIFIED IDEOGRAPH + {0xB241, 0x6BEC}, //2609 #CJK UNIFIED IDEOGRAPH + {0xB242, 0x6C2B}, //2610 #CJK UNIFIED IDEOGRAPH + {0xB243, 0x6D8E}, //2611 #CJK UNIFIED IDEOGRAPH + {0xB244, 0x6DBC}, //2612 #CJK UNIFIED IDEOGRAPH + {0xB245, 0x6DF3}, //2613 #CJK UNIFIED IDEOGRAPH + {0xB246, 0x6DD9}, //2614 #CJK UNIFIED IDEOGRAPH + {0xB247, 0x6DB2}, //2615 #CJK UNIFIED IDEOGRAPH + {0xB248, 0x6DE1}, //2616 #CJK UNIFIED IDEOGRAPH + {0xB249, 0x6DCC}, //2617 #CJK UNIFIED IDEOGRAPH + {0xB24A, 0x6DE4}, //2618 #CJK UNIFIED IDEOGRAPH + {0xB24B, 0x6DFB}, //2619 #CJK UNIFIED IDEOGRAPH + {0xB24C, 0x6DFA}, //2620 #CJK UNIFIED IDEOGRAPH + {0xB24D, 0x6E05}, //2621 #CJK UNIFIED IDEOGRAPH + {0xB24E, 0x6DC7}, //2622 #CJK UNIFIED IDEOGRAPH + {0xB24F, 0x6DCB}, //2623 #CJK UNIFIED IDEOGRAPH + {0xB250, 0x6DAF}, //2624 #CJK UNIFIED IDEOGRAPH + {0xB251, 0x6DD1}, //2625 #CJK UNIFIED IDEOGRAPH + {0xB252, 0x6DAE}, //2626 #CJK UNIFIED IDEOGRAPH + {0xB253, 0x6DDE}, //2627 #CJK UNIFIED IDEOGRAPH + {0xB254, 0x6DF9}, //2628 #CJK UNIFIED IDEOGRAPH + {0xB255, 0x6DB8}, //2629 #CJK UNIFIED IDEOGRAPH + {0xB256, 0x6DF7}, //2630 #CJK UNIFIED IDEOGRAPH + {0xB257, 0x6DF5}, //2631 #CJK UNIFIED IDEOGRAPH + {0xB258, 0x6DC5}, //2632 #CJK UNIFIED IDEOGRAPH + {0xB259, 0x6DD2}, //2633 #CJK UNIFIED IDEOGRAPH + {0xB25A, 0x6E1A}, //2634 #CJK UNIFIED IDEOGRAPH + {0xB25B, 0x6DB5}, //2635 #CJK UNIFIED IDEOGRAPH + {0xB25C, 0x6DDA}, //2636 #CJK UNIFIED IDEOGRAPH + {0xB25D, 0x6DEB}, //2637 #CJK UNIFIED IDEOGRAPH + {0xB25E, 0x6DD8}, //2638 #CJK UNIFIED IDEOGRAPH + {0xB25F, 0x6DEA}, //2639 #CJK UNIFIED IDEOGRAPH + {0xB260, 0x6DF1}, //2640 #CJK UNIFIED IDEOGRAPH + {0xB261, 0x6DEE}, //2641 #CJK UNIFIED IDEOGRAPH + {0xB262, 0x6DE8}, //2642 #CJK UNIFIED IDEOGRAPH + {0xB263, 0x6DC6}, //2643 #CJK UNIFIED IDEOGRAPH + {0xB264, 0x6DC4}, //2644 #CJK UNIFIED IDEOGRAPH + {0xB265, 0x6DAA}, //2645 #CJK UNIFIED IDEOGRAPH + {0xB266, 0x6DEC}, //2646 #CJK UNIFIED IDEOGRAPH + {0xB267, 0x6DBF}, //2647 #CJK UNIFIED IDEOGRAPH + {0xB268, 0x6DE6}, //2648 #CJK UNIFIED IDEOGRAPH + {0xB269, 0x70F9}, //2649 #CJK UNIFIED IDEOGRAPH + {0xB26A, 0x7109}, //2650 #CJK UNIFIED IDEOGRAPH + {0xB26B, 0x710A}, //2651 #CJK UNIFIED IDEOGRAPH + {0xB26C, 0x70FD}, //2652 #CJK UNIFIED IDEOGRAPH + {0xB26D, 0x70EF}, //2653 #CJK UNIFIED IDEOGRAPH + {0xB26E, 0x723D}, //2654 #CJK UNIFIED IDEOGRAPH + {0xB26F, 0x727D}, //2655 #CJK UNIFIED IDEOGRAPH + {0xB270, 0x7281}, //2656 #CJK UNIFIED IDEOGRAPH + {0xB271, 0x731C}, //2657 #CJK UNIFIED IDEOGRAPH + {0xB272, 0x731B}, //2658 #CJK UNIFIED IDEOGRAPH + {0xB273, 0x7316}, //2659 #CJK UNIFIED IDEOGRAPH + {0xB274, 0x7313}, //2660 #CJK UNIFIED IDEOGRAPH + {0xB275, 0x7319}, //2661 #CJK UNIFIED IDEOGRAPH + {0xB276, 0x7387}, //2662 #CJK UNIFIED IDEOGRAPH + {0xB277, 0x7405}, //2663 #CJK UNIFIED IDEOGRAPH + {0xB278, 0x740A}, //2664 #CJK UNIFIED IDEOGRAPH + {0xB279, 0x7403}, //2665 #CJK UNIFIED IDEOGRAPH + {0xB27A, 0x7406}, //2666 #CJK UNIFIED IDEOGRAPH + {0xB27B, 0x73FE}, //2667 #CJK UNIFIED IDEOGRAPH + {0xB27C, 0x740D}, //2668 #CJK UNIFIED IDEOGRAPH + {0xB27D, 0x74E0}, //2669 #CJK UNIFIED IDEOGRAPH + {0xB27E, 0x74F6}, //2670 #CJK UNIFIED IDEOGRAPH + {0xB2A1, 0x74F7}, //2671 #CJK UNIFIED IDEOGRAPH + {0xB2A2, 0x751C}, //2672 #CJK UNIFIED IDEOGRAPH + {0xB2A3, 0x7522}, //2673 #CJK UNIFIED IDEOGRAPH + {0xB2A4, 0x7565}, //2674 #CJK UNIFIED IDEOGRAPH + {0xB2A5, 0x7566}, //2675 #CJK UNIFIED IDEOGRAPH + {0xB2A6, 0x7562}, //2676 #CJK UNIFIED IDEOGRAPH + {0xB2A7, 0x7570}, //2677 #CJK UNIFIED IDEOGRAPH + {0xB2A8, 0x758F}, //2678 #CJK UNIFIED IDEOGRAPH + {0xB2A9, 0x75D4}, //2679 #CJK UNIFIED IDEOGRAPH + {0xB2AA, 0x75D5}, //2680 #CJK UNIFIED IDEOGRAPH + {0xB2AB, 0x75B5}, //2681 #CJK UNIFIED IDEOGRAPH + {0xB2AC, 0x75CA}, //2682 #CJK UNIFIED IDEOGRAPH + {0xB2AD, 0x75CD}, //2683 #CJK UNIFIED IDEOGRAPH + {0xB2AE, 0x768E}, //2684 #CJK UNIFIED IDEOGRAPH + {0xB2AF, 0x76D4}, //2685 #CJK UNIFIED IDEOGRAPH + {0xB2B0, 0x76D2}, //2686 #CJK UNIFIED IDEOGRAPH + {0xB2B1, 0x76DB}, //2687 #CJK UNIFIED IDEOGRAPH + {0xB2B2, 0x7737}, //2688 #CJK UNIFIED IDEOGRAPH + {0xB2B3, 0x773E}, //2689 #CJK UNIFIED IDEOGRAPH + {0xB2B4, 0x773C}, //2690 #CJK UNIFIED IDEOGRAPH + {0xB2B5, 0x7736}, //2691 #CJK UNIFIED IDEOGRAPH + {0xB2B6, 0x7738}, //2692 #CJK UNIFIED IDEOGRAPH + {0xB2B7, 0x773A}, //2693 #CJK UNIFIED IDEOGRAPH + {0xB2B8, 0x786B}, //2694 #CJK UNIFIED IDEOGRAPH + {0xB2B9, 0x7843}, //2695 #CJK UNIFIED IDEOGRAPH + {0xB2BA, 0x784E}, //2696 #CJK UNIFIED IDEOGRAPH + {0xB2BB, 0x7965}, //2697 #CJK UNIFIED IDEOGRAPH + {0xB2BC, 0x7968}, //2698 #CJK UNIFIED IDEOGRAPH + {0xB2BD, 0x796D}, //2699 #CJK UNIFIED IDEOGRAPH + {0xB2BE, 0x79FB}, //2700 #CJK UNIFIED IDEOGRAPH + {0xB2BF, 0x7A92}, //2701 #CJK UNIFIED IDEOGRAPH + {0xB2C0, 0x7A95}, //2702 #CJK UNIFIED IDEOGRAPH + {0xB2C1, 0x7B20}, //2703 #CJK UNIFIED IDEOGRAPH + {0xB2C2, 0x7B28}, //2704 #CJK UNIFIED IDEOGRAPH + {0xB2C3, 0x7B1B}, //2705 #CJK UNIFIED IDEOGRAPH + {0xB2C4, 0x7B2C}, //2706 #CJK UNIFIED IDEOGRAPH + {0xB2C5, 0x7B26}, //2707 #CJK UNIFIED IDEOGRAPH + {0xB2C6, 0x7B19}, //2708 #CJK UNIFIED IDEOGRAPH + {0xB2C7, 0x7B1E}, //2709 #CJK UNIFIED IDEOGRAPH + {0xB2C8, 0x7B2E}, //2710 #CJK UNIFIED IDEOGRAPH + {0xB2C9, 0x7C92}, //2711 #CJK UNIFIED IDEOGRAPH + {0xB2CA, 0x7C97}, //2712 #CJK UNIFIED IDEOGRAPH + {0xB2CB, 0x7C95}, //2713 #CJK UNIFIED IDEOGRAPH + {0xB2CC, 0x7D46}, //2714 #CJK UNIFIED IDEOGRAPH + {0xB2CD, 0x7D43}, //2715 #CJK UNIFIED IDEOGRAPH + {0xB2CE, 0x7D71}, //2716 #CJK UNIFIED IDEOGRAPH + {0xB2CF, 0x7D2E}, //2717 #CJK UNIFIED IDEOGRAPH + {0xB2D0, 0x7D39}, //2718 #CJK UNIFIED IDEOGRAPH + {0xB2D1, 0x7D3C}, //2719 #CJK UNIFIED IDEOGRAPH + {0xB2D2, 0x7D40}, //2720 #CJK UNIFIED IDEOGRAPH + {0xB2D3, 0x7D30}, //2721 #CJK UNIFIED IDEOGRAPH + {0xB2D4, 0x7D33}, //2722 #CJK UNIFIED IDEOGRAPH + {0xB2D5, 0x7D44}, //2723 #CJK UNIFIED IDEOGRAPH + {0xB2D6, 0x7D2F}, //2724 #CJK UNIFIED IDEOGRAPH + {0xB2D7, 0x7D42}, //2725 #CJK UNIFIED IDEOGRAPH + {0xB2D8, 0x7D32}, //2726 #CJK UNIFIED IDEOGRAPH + {0xB2D9, 0x7D31}, //2727 #CJK UNIFIED IDEOGRAPH + {0xB2DA, 0x7F3D}, //2728 #CJK UNIFIED IDEOGRAPH + {0xB2DB, 0x7F9E}, //2729 #CJK UNIFIED IDEOGRAPH + {0xB2DC, 0x7F9A}, //2730 #CJK UNIFIED IDEOGRAPH + {0xB2DD, 0x7FCC}, //2731 #CJK UNIFIED IDEOGRAPH + {0xB2DE, 0x7FCE}, //2732 #CJK UNIFIED IDEOGRAPH + {0xB2DF, 0x7FD2}, //2733 #CJK UNIFIED IDEOGRAPH + {0xB2E0, 0x801C}, //2734 #CJK UNIFIED IDEOGRAPH + {0xB2E1, 0x804A}, //2735 #CJK UNIFIED IDEOGRAPH + {0xB2E2, 0x8046}, //2736 #CJK UNIFIED IDEOGRAPH + {0xB2E3, 0x812F}, //2737 #CJK UNIFIED IDEOGRAPH + {0xB2E4, 0x8116}, //2738 #CJK UNIFIED IDEOGRAPH + {0xB2E5, 0x8123}, //2739 #CJK UNIFIED IDEOGRAPH + {0xB2E6, 0x812B}, //2740 #CJK UNIFIED IDEOGRAPH + {0xB2E7, 0x8129}, //2741 #CJK UNIFIED IDEOGRAPH + {0xB2E8, 0x8130}, //2742 #CJK UNIFIED IDEOGRAPH + {0xB2E9, 0x8124}, //2743 #CJK UNIFIED IDEOGRAPH + {0xB2EA, 0x8202}, //2744 #CJK UNIFIED IDEOGRAPH + {0xB2EB, 0x8235}, //2745 #CJK UNIFIED IDEOGRAPH + {0xB2EC, 0x8237}, //2746 #CJK UNIFIED IDEOGRAPH + {0xB2ED, 0x8236}, //2747 #CJK UNIFIED IDEOGRAPH + {0xB2EE, 0x8239}, //2748 #CJK UNIFIED IDEOGRAPH + {0xB2EF, 0x838E}, //2749 #CJK UNIFIED IDEOGRAPH + {0xB2F0, 0x839E}, //2750 #CJK UNIFIED IDEOGRAPH + {0xB2F1, 0x8398}, //2751 #CJK UNIFIED IDEOGRAPH + {0xB2F2, 0x8378}, //2752 #CJK UNIFIED IDEOGRAPH + {0xB2F3, 0x83A2}, //2753 #CJK UNIFIED IDEOGRAPH + {0xB2F4, 0x8396}, //2754 #CJK UNIFIED IDEOGRAPH + {0xB2F5, 0x83BD}, //2755 #CJK UNIFIED IDEOGRAPH + {0xB2F6, 0x83AB}, //2756 #CJK UNIFIED IDEOGRAPH + {0xB2F7, 0x8392}, //2757 #CJK UNIFIED IDEOGRAPH + {0xB2F8, 0x838A}, //2758 #CJK UNIFIED IDEOGRAPH + {0xB2F9, 0x8393}, //2759 #CJK UNIFIED IDEOGRAPH + {0xB2FA, 0x8389}, //2760 #CJK UNIFIED IDEOGRAPH + {0xB2FB, 0x83A0}, //2761 #CJK UNIFIED IDEOGRAPH + {0xB2FC, 0x8377}, //2762 #CJK UNIFIED IDEOGRAPH + {0xB2FD, 0x837B}, //2763 #CJK UNIFIED IDEOGRAPH + {0xB2FE, 0x837C}, //2764 #CJK UNIFIED IDEOGRAPH + {0xB340, 0x8386}, //2765 #CJK UNIFIED IDEOGRAPH + {0xB341, 0x83A7}, //2766 #CJK UNIFIED IDEOGRAPH + {0xB342, 0x8655}, //2767 #CJK UNIFIED IDEOGRAPH + {0xB343, 0x5F6A}, //2768 #CJK UNIFIED IDEOGRAPH + {0xB344, 0x86C7}, //2769 #CJK UNIFIED IDEOGRAPH + {0xB345, 0x86C0}, //2770 #CJK UNIFIED IDEOGRAPH + {0xB346, 0x86B6}, //2771 #CJK UNIFIED IDEOGRAPH + {0xB347, 0x86C4}, //2772 #CJK UNIFIED IDEOGRAPH + {0xB348, 0x86B5}, //2773 #CJK UNIFIED IDEOGRAPH + {0xB349, 0x86C6}, //2774 #CJK UNIFIED IDEOGRAPH + {0xB34A, 0x86CB}, //2775 #CJK UNIFIED IDEOGRAPH + {0xB34B, 0x86B1}, //2776 #CJK UNIFIED IDEOGRAPH + {0xB34C, 0x86AF}, //2777 #CJK UNIFIED IDEOGRAPH + {0xB34D, 0x86C9}, //2778 #CJK UNIFIED IDEOGRAPH + {0xB34E, 0x8853}, //2779 #CJK UNIFIED IDEOGRAPH + {0xB34F, 0x889E}, //2780 #CJK UNIFIED IDEOGRAPH + {0xB350, 0x8888}, //2781 #CJK UNIFIED IDEOGRAPH + {0xB351, 0x88AB}, //2782 #CJK UNIFIED IDEOGRAPH + {0xB352, 0x8892}, //2783 #CJK UNIFIED IDEOGRAPH + {0xB353, 0x8896}, //2784 #CJK UNIFIED IDEOGRAPH + {0xB354, 0x888D}, //2785 #CJK UNIFIED IDEOGRAPH + {0xB355, 0x888B}, //2786 #CJK UNIFIED IDEOGRAPH + {0xB356, 0x8993}, //2787 #CJK UNIFIED IDEOGRAPH + {0xB357, 0x898F}, //2788 #CJK UNIFIED IDEOGRAPH + {0xB358, 0x8A2A}, //2789 #CJK UNIFIED IDEOGRAPH + {0xB359, 0x8A1D}, //2790 #CJK UNIFIED IDEOGRAPH + {0xB35A, 0x8A23}, //2791 #CJK UNIFIED IDEOGRAPH + {0xB35B, 0x8A25}, //2792 #CJK UNIFIED IDEOGRAPH + {0xB35C, 0x8A31}, //2793 #CJK UNIFIED IDEOGRAPH + {0xB35D, 0x8A2D}, //2794 #CJK UNIFIED IDEOGRAPH + {0xB35E, 0x8A1F}, //2795 #CJK UNIFIED IDEOGRAPH + {0xB35F, 0x8A1B}, //2796 #CJK UNIFIED IDEOGRAPH + {0xB360, 0x8A22}, //2797 #CJK UNIFIED IDEOGRAPH + {0xB361, 0x8C49}, //2798 #CJK UNIFIED IDEOGRAPH + {0xB362, 0x8C5A}, //2799 #CJK UNIFIED IDEOGRAPH + {0xB363, 0x8CA9}, //2800 #CJK UNIFIED IDEOGRAPH + {0xB364, 0x8CAC}, //2801 #CJK UNIFIED IDEOGRAPH + {0xB365, 0x8CAB}, //2802 #CJK UNIFIED IDEOGRAPH + {0xB366, 0x8CA8}, //2803 #CJK UNIFIED IDEOGRAPH + {0xB367, 0x8CAA}, //2804 #CJK UNIFIED IDEOGRAPH + {0xB368, 0x8CA7}, //2805 #CJK UNIFIED IDEOGRAPH + {0xB369, 0x8D67}, //2806 #CJK UNIFIED IDEOGRAPH + {0xB36A, 0x8D66}, //2807 #CJK UNIFIED IDEOGRAPH + {0xB36B, 0x8DBE}, //2808 #CJK UNIFIED IDEOGRAPH + {0xB36C, 0x8DBA}, //2809 #CJK UNIFIED IDEOGRAPH + {0xB36D, 0x8EDB}, //2810 #CJK UNIFIED IDEOGRAPH + {0xB36E, 0x8EDF}, //2811 #CJK UNIFIED IDEOGRAPH + {0xB36F, 0x9019}, //2812 #CJK UNIFIED IDEOGRAPH + {0xB370, 0x900D}, //2813 #CJK UNIFIED IDEOGRAPH + {0xB371, 0x901A}, //2814 #CJK UNIFIED IDEOGRAPH + {0xB372, 0x9017}, //2815 #CJK UNIFIED IDEOGRAPH + {0xB373, 0x9023}, //2816 #CJK UNIFIED IDEOGRAPH + {0xB374, 0x901F}, //2817 #CJK UNIFIED IDEOGRAPH + {0xB375, 0x901D}, //2818 #CJK UNIFIED IDEOGRAPH + {0xB376, 0x9010}, //2819 #CJK UNIFIED IDEOGRAPH + {0xB377, 0x9015}, //2820 #CJK UNIFIED IDEOGRAPH + {0xB378, 0x901E}, //2821 #CJK UNIFIED IDEOGRAPH + {0xB379, 0x9020}, //2822 #CJK UNIFIED IDEOGRAPH + {0xB37A, 0x900F}, //2823 #CJK UNIFIED IDEOGRAPH + {0xB37B, 0x9022}, //2824 #CJK UNIFIED IDEOGRAPH + {0xB37C, 0x9016}, //2825 #CJK UNIFIED IDEOGRAPH + {0xB37D, 0x901B}, //2826 #CJK UNIFIED IDEOGRAPH + {0xB37E, 0x9014}, //2827 #CJK UNIFIED IDEOGRAPH + {0xB3A1, 0x90E8}, //2828 #CJK UNIFIED IDEOGRAPH + {0xB3A2, 0x90ED}, //2829 #CJK UNIFIED IDEOGRAPH + {0xB3A3, 0x90FD}, //2830 #CJK UNIFIED IDEOGRAPH + {0xB3A4, 0x9157}, //2831 #CJK UNIFIED IDEOGRAPH + {0xB3A5, 0x91CE}, //2832 #CJK UNIFIED IDEOGRAPH + {0xB3A6, 0x91F5}, //2833 #CJK UNIFIED IDEOGRAPH + {0xB3A7, 0x91E6}, //2834 #CJK UNIFIED IDEOGRAPH + {0xB3A8, 0x91E3}, //2835 #CJK UNIFIED IDEOGRAPH + {0xB3A9, 0x91E7}, //2836 #CJK UNIFIED IDEOGRAPH + {0xB3AA, 0x91ED}, //2837 #CJK UNIFIED IDEOGRAPH + {0xB3AB, 0x91E9}, //2838 #CJK UNIFIED IDEOGRAPH + {0xB3AC, 0x9589}, //2839 #CJK UNIFIED IDEOGRAPH + {0xB3AD, 0x966A}, //2840 #CJK UNIFIED IDEOGRAPH + {0xB3AE, 0x9675}, //2841 #CJK UNIFIED IDEOGRAPH + {0xB3AF, 0x9673}, //2842 #CJK UNIFIED IDEOGRAPH + {0xB3B0, 0x9678}, //2843 #CJK UNIFIED IDEOGRAPH + {0xB3B1, 0x9670}, //2844 #CJK UNIFIED IDEOGRAPH + {0xB3B2, 0x9674}, //2845 #CJK UNIFIED IDEOGRAPH + {0xB3B3, 0x9676}, //2846 #CJK UNIFIED IDEOGRAPH + {0xB3B4, 0x9677}, //2847 #CJK UNIFIED IDEOGRAPH + {0xB3B5, 0x966C}, //2848 #CJK UNIFIED IDEOGRAPH + {0xB3B6, 0x96C0}, //2849 #CJK UNIFIED IDEOGRAPH + {0xB3B7, 0x96EA}, //2850 #CJK UNIFIED IDEOGRAPH + {0xB3B8, 0x96E9}, //2851 #CJK UNIFIED IDEOGRAPH + {0xB3B9, 0x7AE0}, //2852 #CJK UNIFIED IDEOGRAPH + {0xB3BA, 0x7ADF}, //2853 #CJK UNIFIED IDEOGRAPH + {0xB3BB, 0x9802}, //2854 #CJK UNIFIED IDEOGRAPH + {0xB3BC, 0x9803}, //2855 #CJK UNIFIED IDEOGRAPH + {0xB3BD, 0x9B5A}, //2856 #CJK UNIFIED IDEOGRAPH + {0xB3BE, 0x9CE5}, //2857 #CJK UNIFIED IDEOGRAPH + {0xB3BF, 0x9E75}, //2858 #CJK UNIFIED IDEOGRAPH + {0xB3C0, 0x9E7F}, //2859 #CJK UNIFIED IDEOGRAPH + {0xB3C1, 0x9EA5}, //2860 #CJK UNIFIED IDEOGRAPH + {0xB3C2, 0x9EBB}, //2861 #CJK UNIFIED IDEOGRAPH + {0xB3C3, 0x50A2}, //2862 #CJK UNIFIED IDEOGRAPH + {0xB3C4, 0x508D}, //2863 #CJK UNIFIED IDEOGRAPH + {0xB3C5, 0x5085}, //2864 #CJK UNIFIED IDEOGRAPH + {0xB3C6, 0x5099}, //2865 #CJK UNIFIED IDEOGRAPH + {0xB3C7, 0x5091}, //2866 #CJK UNIFIED IDEOGRAPH + {0xB3C8, 0x5080}, //2867 #CJK UNIFIED IDEOGRAPH + {0xB3C9, 0x5096}, //2868 #CJK UNIFIED IDEOGRAPH + {0xB3CA, 0x5098}, //2869 #CJK UNIFIED IDEOGRAPH + {0xB3CB, 0x509A}, //2870 #CJK UNIFIED IDEOGRAPH + {0xB3CC, 0x6700}, //2871 #CJK UNIFIED IDEOGRAPH + {0xB3CD, 0x51F1}, //2872 #CJK UNIFIED IDEOGRAPH + {0xB3CE, 0x5272}, //2873 #CJK UNIFIED IDEOGRAPH + {0xB3CF, 0x5274}, //2874 #CJK UNIFIED IDEOGRAPH + {0xB3D0, 0x5275}, //2875 #CJK UNIFIED IDEOGRAPH + {0xB3D1, 0x5269}, //2876 #CJK UNIFIED IDEOGRAPH + {0xB3D2, 0x52DE}, //2877 #CJK UNIFIED IDEOGRAPH + {0xB3D3, 0x52DD}, //2878 #CJK UNIFIED IDEOGRAPH + {0xB3D4, 0x52DB}, //2879 #CJK UNIFIED IDEOGRAPH + {0xB3D5, 0x535A}, //2880 #CJK UNIFIED IDEOGRAPH + {0xB3D6, 0x53A5}, //2881 #CJK UNIFIED IDEOGRAPH + {0xB3D7, 0x557B}, //2882 #CJK UNIFIED IDEOGRAPH + {0xB3D8, 0x5580}, //2883 #CJK UNIFIED IDEOGRAPH + {0xB3D9, 0x55A7}, //2884 #CJK UNIFIED IDEOGRAPH + {0xB3DA, 0x557C}, //2885 #CJK UNIFIED IDEOGRAPH + {0xB3DB, 0x558A}, //2886 #CJK UNIFIED IDEOGRAPH + {0xB3DC, 0x559D}, //2887 #CJK UNIFIED IDEOGRAPH + {0xB3DD, 0x5598}, //2888 #CJK UNIFIED IDEOGRAPH + {0xB3DE, 0x5582}, //2889 #CJK UNIFIED IDEOGRAPH + {0xB3DF, 0x559C}, //2890 #CJK UNIFIED IDEOGRAPH + {0xB3E0, 0x55AA}, //2891 #CJK UNIFIED IDEOGRAPH + {0xB3E1, 0x5594}, //2892 #CJK UNIFIED IDEOGRAPH + {0xB3E2, 0x5587}, //2893 #CJK UNIFIED IDEOGRAPH + {0xB3E3, 0x558B}, //2894 #CJK UNIFIED IDEOGRAPH + {0xB3E4, 0x5583}, //2895 #CJK UNIFIED IDEOGRAPH + {0xB3E5, 0x55B3}, //2896 #CJK UNIFIED IDEOGRAPH + {0xB3E6, 0x55AE}, //2897 #CJK UNIFIED IDEOGRAPH + {0xB3E7, 0x559F}, //2898 #CJK UNIFIED IDEOGRAPH + {0xB3E8, 0x553E}, //2899 #CJK UNIFIED IDEOGRAPH + {0xB3E9, 0x55B2}, //2900 #CJK UNIFIED IDEOGRAPH + {0xB3EA, 0x559A}, //2901 #CJK UNIFIED IDEOGRAPH + {0xB3EB, 0x55BB}, //2902 #CJK UNIFIED IDEOGRAPH + {0xB3EC, 0x55AC}, //2903 #CJK UNIFIED IDEOGRAPH + {0xB3ED, 0x55B1}, //2904 #CJK UNIFIED IDEOGRAPH + {0xB3EE, 0x557E}, //2905 #CJK UNIFIED IDEOGRAPH + {0xB3EF, 0x5589}, //2906 #CJK UNIFIED IDEOGRAPH + {0xB3F0, 0x55AB}, //2907 #CJK UNIFIED IDEOGRAPH + {0xB3F1, 0x5599}, //2908 #CJK UNIFIED IDEOGRAPH + {0xB3F2, 0x570D}, //2909 #CJK UNIFIED IDEOGRAPH + {0xB3F3, 0x582F}, //2910 #CJK UNIFIED IDEOGRAPH + {0xB3F4, 0x582A}, //2911 #CJK UNIFIED IDEOGRAPH + {0xB3F5, 0x5834}, //2912 #CJK UNIFIED IDEOGRAPH + {0xB3F6, 0x5824}, //2913 #CJK UNIFIED IDEOGRAPH + {0xB3F7, 0x5830}, //2914 #CJK UNIFIED IDEOGRAPH + {0xB3F8, 0x5831}, //2915 #CJK UNIFIED IDEOGRAPH + {0xB3F9, 0x5821}, //2916 #CJK UNIFIED IDEOGRAPH + {0xB3FA, 0x581D}, //2917 #CJK UNIFIED IDEOGRAPH + {0xB3FB, 0x5820}, //2918 #CJK UNIFIED IDEOGRAPH + {0xB3FC, 0x58F9}, //2919 #CJK UNIFIED IDEOGRAPH + {0xB3FD, 0x58FA}, //2920 #CJK UNIFIED IDEOGRAPH + {0xB3FE, 0x5960}, //2921 #CJK UNIFIED IDEOGRAPH + {0xB440, 0x5A77}, //2922 #CJK UNIFIED IDEOGRAPH + {0xB441, 0x5A9A}, //2923 #CJK UNIFIED IDEOGRAPH + {0xB442, 0x5A7F}, //2924 #CJK UNIFIED IDEOGRAPH + {0xB443, 0x5A92}, //2925 #CJK UNIFIED IDEOGRAPH + {0xB444, 0x5A9B}, //2926 #CJK UNIFIED IDEOGRAPH + {0xB445, 0x5AA7}, //2927 #CJK UNIFIED IDEOGRAPH + {0xB446, 0x5B73}, //2928 #CJK UNIFIED IDEOGRAPH + {0xB447, 0x5B71}, //2929 #CJK UNIFIED IDEOGRAPH + {0xB448, 0x5BD2}, //2930 #CJK UNIFIED IDEOGRAPH + {0xB449, 0x5BCC}, //2931 #CJK UNIFIED IDEOGRAPH + {0xB44A, 0x5BD3}, //2932 #CJK UNIFIED IDEOGRAPH + {0xB44B, 0x5BD0}, //2933 #CJK UNIFIED IDEOGRAPH + {0xB44C, 0x5C0A}, //2934 #CJK UNIFIED IDEOGRAPH + {0xB44D, 0x5C0B}, //2935 #CJK UNIFIED IDEOGRAPH + {0xB44E, 0x5C31}, //2936 #CJK UNIFIED IDEOGRAPH + {0xB44F, 0x5D4C}, //2937 #CJK UNIFIED IDEOGRAPH + {0xB450, 0x5D50}, //2938 #CJK UNIFIED IDEOGRAPH + {0xB451, 0x5D34}, //2939 #CJK UNIFIED IDEOGRAPH + {0xB452, 0x5D47}, //2940 #CJK UNIFIED IDEOGRAPH + {0xB453, 0x5DFD}, //2941 #CJK UNIFIED IDEOGRAPH + {0xB454, 0x5E45}, //2942 #CJK UNIFIED IDEOGRAPH + {0xB455, 0x5E3D}, //2943 #CJK UNIFIED IDEOGRAPH + {0xB456, 0x5E40}, //2944 #CJK UNIFIED IDEOGRAPH + {0xB457, 0x5E43}, //2945 #CJK UNIFIED IDEOGRAPH + {0xB458, 0x5E7E}, //2946 #CJK UNIFIED IDEOGRAPH + {0xB459, 0x5ECA}, //2947 #CJK UNIFIED IDEOGRAPH + {0xB45A, 0x5EC1}, //2948 #CJK UNIFIED IDEOGRAPH + {0xB45B, 0x5EC2}, //2949 #CJK UNIFIED IDEOGRAPH + {0xB45C, 0x5EC4}, //2950 #CJK UNIFIED IDEOGRAPH + {0xB45D, 0x5F3C}, //2951 #CJK UNIFIED IDEOGRAPH + {0xB45E, 0x5F6D}, //2952 #CJK UNIFIED IDEOGRAPH + {0xB45F, 0x5FA9}, //2953 #CJK UNIFIED IDEOGRAPH + {0xB460, 0x5FAA}, //2954 #CJK UNIFIED IDEOGRAPH + {0xB461, 0x5FA8}, //2955 #CJK UNIFIED IDEOGRAPH + {0xB462, 0x60D1}, //2956 #CJK UNIFIED IDEOGRAPH + {0xB463, 0x60E1}, //2957 #CJK UNIFIED IDEOGRAPH + {0xB464, 0x60B2}, //2958 #CJK UNIFIED IDEOGRAPH + {0xB465, 0x60B6}, //2959 #CJK UNIFIED IDEOGRAPH + {0xB466, 0x60E0}, //2960 #CJK UNIFIED IDEOGRAPH + {0xB467, 0x611C}, //2961 #CJK UNIFIED IDEOGRAPH + {0xB468, 0x6123}, //2962 #CJK UNIFIED IDEOGRAPH + {0xB469, 0x60FA}, //2963 #CJK UNIFIED IDEOGRAPH + {0xB46A, 0x6115}, //2964 #CJK UNIFIED IDEOGRAPH + {0xB46B, 0x60F0}, //2965 #CJK UNIFIED IDEOGRAPH + {0xB46C, 0x60FB}, //2966 #CJK UNIFIED IDEOGRAPH + {0xB46D, 0x60F4}, //2967 #CJK UNIFIED IDEOGRAPH + {0xB46E, 0x6168}, //2968 #CJK UNIFIED IDEOGRAPH + {0xB46F, 0x60F1}, //2969 #CJK UNIFIED IDEOGRAPH + {0xB470, 0x610E}, //2970 #CJK UNIFIED IDEOGRAPH + {0xB471, 0x60F6}, //2971 #CJK UNIFIED IDEOGRAPH + {0xB472, 0x6109}, //2972 #CJK UNIFIED IDEOGRAPH + {0xB473, 0x6100}, //2973 #CJK UNIFIED IDEOGRAPH + {0xB474, 0x6112}, //2974 #CJK UNIFIED IDEOGRAPH + {0xB475, 0x621F}, //2975 #CJK UNIFIED IDEOGRAPH + {0xB476, 0x6249}, //2976 #CJK UNIFIED IDEOGRAPH + {0xB477, 0x63A3}, //2977 #CJK UNIFIED IDEOGRAPH + {0xB478, 0x638C}, //2978 #CJK UNIFIED IDEOGRAPH + {0xB479, 0x63CF}, //2979 #CJK UNIFIED IDEOGRAPH + {0xB47A, 0x63C0}, //2980 #CJK UNIFIED IDEOGRAPH + {0xB47B, 0x63E9}, //2981 #CJK UNIFIED IDEOGRAPH + {0xB47C, 0x63C9}, //2982 #CJK UNIFIED IDEOGRAPH + {0xB47D, 0x63C6}, //2983 #CJK UNIFIED IDEOGRAPH + {0xB47E, 0x63CD}, //2984 #CJK UNIFIED IDEOGRAPH + {0xB4A1, 0x63D2}, //2985 #CJK UNIFIED IDEOGRAPH + {0xB4A2, 0x63E3}, //2986 #CJK UNIFIED IDEOGRAPH + {0xB4A3, 0x63D0}, //2987 #CJK UNIFIED IDEOGRAPH + {0xB4A4, 0x63E1}, //2988 #CJK UNIFIED IDEOGRAPH + {0xB4A5, 0x63D6}, //2989 #CJK UNIFIED IDEOGRAPH + {0xB4A6, 0x63ED}, //2990 #CJK UNIFIED IDEOGRAPH + {0xB4A7, 0x63EE}, //2991 #CJK UNIFIED IDEOGRAPH + {0xB4A8, 0x6376}, //2992 #CJK UNIFIED IDEOGRAPH + {0xB4A9, 0x63F4}, //2993 #CJK UNIFIED IDEOGRAPH + {0xB4AA, 0x63EA}, //2994 #CJK UNIFIED IDEOGRAPH + {0xB4AB, 0x63DB}, //2995 #CJK UNIFIED IDEOGRAPH + {0xB4AC, 0x6452}, //2996 #CJK UNIFIED IDEOGRAPH + {0xB4AD, 0x63DA}, //2997 #CJK UNIFIED IDEOGRAPH + {0xB4AE, 0x63F9}, //2998 #CJK UNIFIED IDEOGRAPH + {0xB4AF, 0x655E}, //2999 #CJK UNIFIED IDEOGRAPH + {0xB4B0, 0x6566}, //3000 #CJK UNIFIED IDEOGRAPH + {0xB4B1, 0x6562}, //3001 #CJK UNIFIED IDEOGRAPH + {0xB4B2, 0x6563}, //3002 #CJK UNIFIED IDEOGRAPH + {0xB4B3, 0x6591}, //3003 #CJK UNIFIED IDEOGRAPH + {0xB4B4, 0x6590}, //3004 #CJK UNIFIED IDEOGRAPH + {0xB4B5, 0x65AF}, //3005 #CJK UNIFIED IDEOGRAPH + {0xB4B6, 0x666E}, //3006 #CJK UNIFIED IDEOGRAPH + {0xB4B7, 0x6670}, //3007 #CJK UNIFIED IDEOGRAPH + {0xB4B8, 0x6674}, //3008 #CJK UNIFIED IDEOGRAPH + {0xB4B9, 0x6676}, //3009 #CJK UNIFIED IDEOGRAPH + {0xB4BA, 0x666F}, //3010 #CJK UNIFIED IDEOGRAPH + {0xB4BB, 0x6691}, //3011 #CJK UNIFIED IDEOGRAPH + {0xB4BC, 0x667A}, //3012 #CJK UNIFIED IDEOGRAPH + {0xB4BD, 0x667E}, //3013 #CJK UNIFIED IDEOGRAPH + {0xB4BE, 0x6677}, //3014 #CJK UNIFIED IDEOGRAPH + {0xB4BF, 0x66FE}, //3015 #CJK UNIFIED IDEOGRAPH + {0xB4C0, 0x66FF}, //3016 #CJK UNIFIED IDEOGRAPH + {0xB4C1, 0x671F}, //3017 #CJK UNIFIED IDEOGRAPH + {0xB4C2, 0x671D}, //3018 #CJK UNIFIED IDEOGRAPH + {0xB4C3, 0x68FA}, //3019 #CJK UNIFIED IDEOGRAPH + {0xB4C4, 0x68D5}, //3020 #CJK UNIFIED IDEOGRAPH + {0xB4C5, 0x68E0}, //3021 #CJK UNIFIED IDEOGRAPH + {0xB4C6, 0x68D8}, //3022 #CJK UNIFIED IDEOGRAPH + {0xB4C7, 0x68D7}, //3023 #CJK UNIFIED IDEOGRAPH + {0xB4C8, 0x6905}, //3024 #CJK UNIFIED IDEOGRAPH + {0xB4C9, 0x68DF}, //3025 #CJK UNIFIED IDEOGRAPH + {0xB4CA, 0x68F5}, //3026 #CJK UNIFIED IDEOGRAPH + {0xB4CB, 0x68EE}, //3027 #CJK UNIFIED IDEOGRAPH + {0xB4CC, 0x68E7}, //3028 #CJK UNIFIED IDEOGRAPH + {0xB4CD, 0x68F9}, //3029 #CJK UNIFIED IDEOGRAPH + {0xB4CE, 0x68D2}, //3030 #CJK UNIFIED IDEOGRAPH + {0xB4CF, 0x68F2}, //3031 #CJK UNIFIED IDEOGRAPH + {0xB4D0, 0x68E3}, //3032 #CJK UNIFIED IDEOGRAPH + {0xB4D1, 0x68CB}, //3033 #CJK UNIFIED IDEOGRAPH + {0xB4D2, 0x68CD}, //3034 #CJK UNIFIED IDEOGRAPH + {0xB4D3, 0x690D}, //3035 #CJK UNIFIED IDEOGRAPH + {0xB4D4, 0x6912}, //3036 #CJK UNIFIED IDEOGRAPH + {0xB4D5, 0x690E}, //3037 #CJK UNIFIED IDEOGRAPH + {0xB4D6, 0x68C9}, //3038 #CJK UNIFIED IDEOGRAPH + {0xB4D7, 0x68DA}, //3039 #CJK UNIFIED IDEOGRAPH + {0xB4D8, 0x696E}, //3040 #CJK UNIFIED IDEOGRAPH + {0xB4D9, 0x68FB}, //3041 #CJK UNIFIED IDEOGRAPH + {0xB4DA, 0x6B3E}, //3042 #CJK UNIFIED IDEOGRAPH + {0xB4DB, 0x6B3A}, //3043 #CJK UNIFIED IDEOGRAPH + {0xB4DC, 0x6B3D}, //3044 #CJK UNIFIED IDEOGRAPH + {0xB4DD, 0x6B98}, //3045 #CJK UNIFIED IDEOGRAPH + {0xB4DE, 0x6B96}, //3046 #CJK UNIFIED IDEOGRAPH + {0xB4DF, 0x6BBC}, //3047 #CJK UNIFIED IDEOGRAPH + {0xB4E0, 0x6BEF}, //3048 #CJK UNIFIED IDEOGRAPH + {0xB4E1, 0x6C2E}, //3049 #CJK UNIFIED IDEOGRAPH + {0xB4E2, 0x6C2F}, //3050 #CJK UNIFIED IDEOGRAPH + {0xB4E3, 0x6C2C}, //3051 #CJK UNIFIED IDEOGRAPH + {0xB4E4, 0x6E2F}, //3052 #CJK UNIFIED IDEOGRAPH + {0xB4E5, 0x6E38}, //3053 #CJK UNIFIED IDEOGRAPH + {0xB4E6, 0x6E54}, //3054 #CJK UNIFIED IDEOGRAPH + {0xB4E7, 0x6E21}, //3055 #CJK UNIFIED IDEOGRAPH + {0xB4E8, 0x6E32}, //3056 #CJK UNIFIED IDEOGRAPH + {0xB4E9, 0x6E67}, //3057 #CJK UNIFIED IDEOGRAPH + {0xB4EA, 0x6E4A}, //3058 #CJK UNIFIED IDEOGRAPH + {0xB4EB, 0x6E20}, //3059 #CJK UNIFIED IDEOGRAPH + {0xB4EC, 0x6E25}, //3060 #CJK UNIFIED IDEOGRAPH + {0xB4ED, 0x6E23}, //3061 #CJK UNIFIED IDEOGRAPH + {0xB4EE, 0x6E1B}, //3062 #CJK UNIFIED IDEOGRAPH + {0xB4EF, 0x6E5B}, //3063 #CJK UNIFIED IDEOGRAPH + {0xB4F0, 0x6E58}, //3064 #CJK UNIFIED IDEOGRAPH + {0xB4F1, 0x6E24}, //3065 #CJK UNIFIED IDEOGRAPH + {0xB4F2, 0x6E56}, //3066 #CJK UNIFIED IDEOGRAPH + {0xB4F3, 0x6E6E}, //3067 #CJK UNIFIED IDEOGRAPH + {0xB4F4, 0x6E2D}, //3068 #CJK UNIFIED IDEOGRAPH + {0xB4F5, 0x6E26}, //3069 #CJK UNIFIED IDEOGRAPH + {0xB4F6, 0x6E6F}, //3070 #CJK UNIFIED IDEOGRAPH + {0xB4F7, 0x6E34}, //3071 #CJK UNIFIED IDEOGRAPH + {0xB4F8, 0x6E4D}, //3072 #CJK UNIFIED IDEOGRAPH + {0xB4F9, 0x6E3A}, //3073 #CJK UNIFIED IDEOGRAPH + {0xB4FA, 0x6E2C}, //3074 #CJK UNIFIED IDEOGRAPH + {0xB4FB, 0x6E43}, //3075 #CJK UNIFIED IDEOGRAPH + {0xB4FC, 0x6E1D}, //3076 #CJK UNIFIED IDEOGRAPH + {0xB4FD, 0x6E3E}, //3077 #CJK UNIFIED IDEOGRAPH + {0xB4FE, 0x6ECB}, //3078 #CJK UNIFIED IDEOGRAPH + {0xB540, 0x6E89}, //3079 #CJK UNIFIED IDEOGRAPH + {0xB541, 0x6E19}, //3080 #CJK UNIFIED IDEOGRAPH + {0xB542, 0x6E4E}, //3081 #CJK UNIFIED IDEOGRAPH + {0xB543, 0x6E63}, //3082 #CJK UNIFIED IDEOGRAPH + {0xB544, 0x6E44}, //3083 #CJK UNIFIED IDEOGRAPH + {0xB545, 0x6E72}, //3084 #CJK UNIFIED IDEOGRAPH + {0xB546, 0x6E69}, //3085 #CJK UNIFIED IDEOGRAPH + {0xB547, 0x6E5F}, //3086 #CJK UNIFIED IDEOGRAPH + {0xB548, 0x7119}, //3087 #CJK UNIFIED IDEOGRAPH + {0xB549, 0x711A}, //3088 #CJK UNIFIED IDEOGRAPH + {0xB54A, 0x7126}, //3089 #CJK UNIFIED IDEOGRAPH + {0xB54B, 0x7130}, //3090 #CJK UNIFIED IDEOGRAPH + {0xB54C, 0x7121}, //3091 #CJK UNIFIED IDEOGRAPH + {0xB54D, 0x7136}, //3092 #CJK UNIFIED IDEOGRAPH + {0xB54E, 0x716E}, //3093 #CJK UNIFIED IDEOGRAPH + {0xB54F, 0x711C}, //3094 #CJK UNIFIED IDEOGRAPH + {0xB550, 0x724C}, //3095 #CJK UNIFIED IDEOGRAPH + {0xB551, 0x7284}, //3096 #CJK UNIFIED IDEOGRAPH + {0xB552, 0x7280}, //3097 #CJK UNIFIED IDEOGRAPH + {0xB553, 0x7336}, //3098 #CJK UNIFIED IDEOGRAPH + {0xB554, 0x7325}, //3099 #CJK UNIFIED IDEOGRAPH + {0xB555, 0x7334}, //3100 #CJK UNIFIED IDEOGRAPH + {0xB556, 0x7329}, //3101 #CJK UNIFIED IDEOGRAPH + {0xB557, 0x743A}, //3102 #CJK UNIFIED IDEOGRAPH + {0xB558, 0x742A}, //3103 #CJK UNIFIED IDEOGRAPH + {0xB559, 0x7433}, //3104 #CJK UNIFIED IDEOGRAPH + {0xB55A, 0x7422}, //3105 #CJK UNIFIED IDEOGRAPH + {0xB55B, 0x7425}, //3106 #CJK UNIFIED IDEOGRAPH + {0xB55C, 0x7435}, //3107 #CJK UNIFIED IDEOGRAPH + {0xB55D, 0x7436}, //3108 #CJK UNIFIED IDEOGRAPH + {0xB55E, 0x7434}, //3109 #CJK UNIFIED IDEOGRAPH + {0xB55F, 0x742F}, //3110 #CJK UNIFIED IDEOGRAPH + {0xB560, 0x741B}, //3111 #CJK UNIFIED IDEOGRAPH + {0xB561, 0x7426}, //3112 #CJK UNIFIED IDEOGRAPH + {0xB562, 0x7428}, //3113 #CJK UNIFIED IDEOGRAPH + {0xB563, 0x7525}, //3114 #CJK UNIFIED IDEOGRAPH + {0xB564, 0x7526}, //3115 #CJK UNIFIED IDEOGRAPH + {0xB565, 0x756B}, //3116 #CJK UNIFIED IDEOGRAPH + {0xB566, 0x756A}, //3117 #CJK UNIFIED IDEOGRAPH + {0xB567, 0x75E2}, //3118 #CJK UNIFIED IDEOGRAPH + {0xB568, 0x75DB}, //3119 #CJK UNIFIED IDEOGRAPH + {0xB569, 0x75E3}, //3120 #CJK UNIFIED IDEOGRAPH + {0xB56A, 0x75D9}, //3121 #CJK UNIFIED IDEOGRAPH + {0xB56B, 0x75D8}, //3122 #CJK UNIFIED IDEOGRAPH + {0xB56C, 0x75DE}, //3123 #CJK UNIFIED IDEOGRAPH + {0xB56D, 0x75E0}, //3124 #CJK UNIFIED IDEOGRAPH + {0xB56E, 0x767B}, //3125 #CJK UNIFIED IDEOGRAPH + {0xB56F, 0x767C}, //3126 #CJK UNIFIED IDEOGRAPH + {0xB570, 0x7696}, //3127 #CJK UNIFIED IDEOGRAPH + {0xB571, 0x7693}, //3128 #CJK UNIFIED IDEOGRAPH + {0xB572, 0x76B4}, //3129 #CJK UNIFIED IDEOGRAPH + {0xB573, 0x76DC}, //3130 #CJK UNIFIED IDEOGRAPH + {0xB574, 0x774F}, //3131 #CJK UNIFIED IDEOGRAPH + {0xB575, 0x77ED}, //3132 #CJK UNIFIED IDEOGRAPH + {0xB576, 0x785D}, //3133 #CJK UNIFIED IDEOGRAPH + {0xB577, 0x786C}, //3134 #CJK UNIFIED IDEOGRAPH + {0xB578, 0x786F}, //3135 #CJK UNIFIED IDEOGRAPH + {0xB579, 0x7A0D}, //3136 #CJK UNIFIED IDEOGRAPH + {0xB57A, 0x7A08}, //3137 #CJK UNIFIED IDEOGRAPH + {0xB57B, 0x7A0B}, //3138 #CJK UNIFIED IDEOGRAPH + {0xB57C, 0x7A05}, //3139 #CJK UNIFIED IDEOGRAPH + {0xB57D, 0x7A00}, //3140 #CJK UNIFIED IDEOGRAPH + {0xB57E, 0x7A98}, //3141 #CJK UNIFIED IDEOGRAPH + {0xB5A1, 0x7A97}, //3142 #CJK UNIFIED IDEOGRAPH + {0xB5A2, 0x7A96}, //3143 #CJK UNIFIED IDEOGRAPH + {0xB5A3, 0x7AE5}, //3144 #CJK UNIFIED IDEOGRAPH + {0xB5A4, 0x7AE3}, //3145 #CJK UNIFIED IDEOGRAPH + {0xB5A5, 0x7B49}, //3146 #CJK UNIFIED IDEOGRAPH + {0xB5A6, 0x7B56}, //3147 #CJK UNIFIED IDEOGRAPH + {0xB5A7, 0x7B46}, //3148 #CJK UNIFIED IDEOGRAPH + {0xB5A8, 0x7B50}, //3149 #CJK UNIFIED IDEOGRAPH + {0xB5A9, 0x7B52}, //3150 #CJK UNIFIED IDEOGRAPH + {0xB5AA, 0x7B54}, //3151 #CJK UNIFIED IDEOGRAPH + {0xB5AB, 0x7B4D}, //3152 #CJK UNIFIED IDEOGRAPH + {0xB5AC, 0x7B4B}, //3153 #CJK UNIFIED IDEOGRAPH + {0xB5AD, 0x7B4F}, //3154 #CJK UNIFIED IDEOGRAPH + {0xB5AE, 0x7B51}, //3155 #CJK UNIFIED IDEOGRAPH + {0xB5AF, 0x7C9F}, //3156 #CJK UNIFIED IDEOGRAPH + {0xB5B0, 0x7CA5}, //3157 #CJK UNIFIED IDEOGRAPH + {0xB5B1, 0x7D5E}, //3158 #CJK UNIFIED IDEOGRAPH + {0xB5B2, 0x7D50}, //3159 #CJK UNIFIED IDEOGRAPH + {0xB5B3, 0x7D68}, //3160 #CJK UNIFIED IDEOGRAPH + {0xB5B4, 0x7D55}, //3161 #CJK UNIFIED IDEOGRAPH + {0xB5B5, 0x7D2B}, //3162 #CJK UNIFIED IDEOGRAPH + {0xB5B6, 0x7D6E}, //3163 #CJK UNIFIED IDEOGRAPH + {0xB5B7, 0x7D72}, //3164 #CJK UNIFIED IDEOGRAPH + {0xB5B8, 0x7D61}, //3165 #CJK UNIFIED IDEOGRAPH + {0xB5B9, 0x7D66}, //3166 #CJK UNIFIED IDEOGRAPH + {0xB5BA, 0x7D62}, //3167 #CJK UNIFIED IDEOGRAPH + {0xB5BB, 0x7D70}, //3168 #CJK UNIFIED IDEOGRAPH + {0xB5BC, 0x7D73}, //3169 #CJK UNIFIED IDEOGRAPH + {0xB5BD, 0x5584}, //3170 #CJK UNIFIED IDEOGRAPH + {0xB5BE, 0x7FD4}, //3171 #CJK UNIFIED IDEOGRAPH + {0xB5BF, 0x7FD5}, //3172 #CJK UNIFIED IDEOGRAPH + {0xB5C0, 0x800B}, //3173 #CJK UNIFIED IDEOGRAPH + {0xB5C1, 0x8052}, //3174 #CJK UNIFIED IDEOGRAPH + {0xB5C2, 0x8085}, //3175 #CJK UNIFIED IDEOGRAPH + {0xB5C3, 0x8155}, //3176 #CJK UNIFIED IDEOGRAPH + {0xB5C4, 0x8154}, //3177 #CJK UNIFIED IDEOGRAPH + {0xB5C5, 0x814B}, //3178 #CJK UNIFIED IDEOGRAPH + {0xB5C6, 0x8151}, //3179 #CJK UNIFIED IDEOGRAPH + {0xB5C7, 0x814E}, //3180 #CJK UNIFIED IDEOGRAPH + {0xB5C8, 0x8139}, //3181 #CJK UNIFIED IDEOGRAPH + {0xB5C9, 0x8146}, //3182 #CJK UNIFIED IDEOGRAPH + {0xB5CA, 0x813E}, //3183 #CJK UNIFIED IDEOGRAPH + {0xB5CB, 0x814C}, //3184 #CJK UNIFIED IDEOGRAPH + {0xB5CC, 0x8153}, //3185 #CJK UNIFIED IDEOGRAPH + {0xB5CD, 0x8174}, //3186 #CJK UNIFIED IDEOGRAPH + {0xB5CE, 0x8212}, //3187 #CJK UNIFIED IDEOGRAPH + {0xB5CF, 0x821C}, //3188 #CJK UNIFIED IDEOGRAPH + {0xB5D0, 0x83E9}, //3189 #CJK UNIFIED IDEOGRAPH + {0xB5D1, 0x8403}, //3190 #CJK UNIFIED IDEOGRAPH + {0xB5D2, 0x83F8}, //3191 #CJK UNIFIED IDEOGRAPH + {0xB5D3, 0x840D}, //3192 #CJK UNIFIED IDEOGRAPH + {0xB5D4, 0x83E0}, //3193 #CJK UNIFIED IDEOGRAPH + {0xB5D5, 0x83C5}, //3194 #CJK UNIFIED IDEOGRAPH + {0xB5D6, 0x840B}, //3195 #CJK UNIFIED IDEOGRAPH + {0xB5D7, 0x83C1}, //3196 #CJK UNIFIED IDEOGRAPH + {0xB5D8, 0x83EF}, //3197 #CJK UNIFIED IDEOGRAPH + {0xB5D9, 0x83F1}, //3198 #CJK UNIFIED IDEOGRAPH + {0xB5DA, 0x83F4}, //3199 #CJK UNIFIED IDEOGRAPH + {0xB5DB, 0x8457}, //3200 #CJK UNIFIED IDEOGRAPH + {0xB5DC, 0x840A}, //3201 #CJK UNIFIED IDEOGRAPH + {0xB5DD, 0x83F0}, //3202 #CJK UNIFIED IDEOGRAPH + {0xB5DE, 0x840C}, //3203 #CJK UNIFIED IDEOGRAPH + {0xB5DF, 0x83CC}, //3204 #CJK UNIFIED IDEOGRAPH + {0xB5E0, 0x83FD}, //3205 #CJK UNIFIED IDEOGRAPH + {0xB5E1, 0x83F2}, //3206 #CJK UNIFIED IDEOGRAPH + {0xB5E2, 0x83CA}, //3207 #CJK UNIFIED IDEOGRAPH + {0xB5E3, 0x8438}, //3208 #CJK UNIFIED IDEOGRAPH + {0xB5E4, 0x840E}, //3209 #CJK UNIFIED IDEOGRAPH + {0xB5E5, 0x8404}, //3210 #CJK UNIFIED IDEOGRAPH + {0xB5E6, 0x83DC}, //3211 #CJK UNIFIED IDEOGRAPH + {0xB5E7, 0x8407}, //3212 #CJK UNIFIED IDEOGRAPH + {0xB5E8, 0x83D4}, //3213 #CJK UNIFIED IDEOGRAPH + {0xB5E9, 0x83DF}, //3214 #CJK UNIFIED IDEOGRAPH + {0xB5EA, 0x865B}, //3215 #CJK UNIFIED IDEOGRAPH + {0xB5EB, 0x86DF}, //3216 #CJK UNIFIED IDEOGRAPH + {0xB5EC, 0x86D9}, //3217 #CJK UNIFIED IDEOGRAPH + {0xB5ED, 0x86ED}, //3218 #CJK UNIFIED IDEOGRAPH + {0xB5EE, 0x86D4}, //3219 #CJK UNIFIED IDEOGRAPH + {0xB5EF, 0x86DB}, //3220 #CJK UNIFIED IDEOGRAPH + {0xB5F0, 0x86E4}, //3221 #CJK UNIFIED IDEOGRAPH + {0xB5F1, 0x86D0}, //3222 #CJK UNIFIED IDEOGRAPH + {0xB5F2, 0x86DE}, //3223 #CJK UNIFIED IDEOGRAPH + {0xB5F3, 0x8857}, //3224 #CJK UNIFIED IDEOGRAPH + {0xB5F4, 0x88C1}, //3225 #CJK UNIFIED IDEOGRAPH + {0xB5F5, 0x88C2}, //3226 #CJK UNIFIED IDEOGRAPH + {0xB5F6, 0x88B1}, //3227 #CJK UNIFIED IDEOGRAPH + {0xB5F7, 0x8983}, //3228 #CJK UNIFIED IDEOGRAPH + {0xB5F8, 0x8996}, //3229 #CJK UNIFIED IDEOGRAPH + {0xB5F9, 0x8A3B}, //3230 #CJK UNIFIED IDEOGRAPH + {0xB5FA, 0x8A60}, //3231 #CJK UNIFIED IDEOGRAPH + {0xB5FB, 0x8A55}, //3232 #CJK UNIFIED IDEOGRAPH + {0xB5FC, 0x8A5E}, //3233 #CJK UNIFIED IDEOGRAPH + {0xB5FD, 0x8A3C}, //3234 #CJK UNIFIED IDEOGRAPH + {0xB5FE, 0x8A41}, //3235 #CJK UNIFIED IDEOGRAPH + {0xB640, 0x8A54}, //3236 #CJK UNIFIED IDEOGRAPH + {0xB641, 0x8A5B}, //3237 #CJK UNIFIED IDEOGRAPH + {0xB642, 0x8A50}, //3238 #CJK UNIFIED IDEOGRAPH + {0xB643, 0x8A46}, //3239 #CJK UNIFIED IDEOGRAPH + {0xB644, 0x8A34}, //3240 #CJK UNIFIED IDEOGRAPH + {0xB645, 0x8A3A}, //3241 #CJK UNIFIED IDEOGRAPH + {0xB646, 0x8A36}, //3242 #CJK UNIFIED IDEOGRAPH + {0xB647, 0x8A56}, //3243 #CJK UNIFIED IDEOGRAPH + {0xB648, 0x8C61}, //3244 #CJK UNIFIED IDEOGRAPH + {0xB649, 0x8C82}, //3245 #CJK UNIFIED IDEOGRAPH + {0xB64A, 0x8CAF}, //3246 #CJK UNIFIED IDEOGRAPH + {0xB64B, 0x8CBC}, //3247 #CJK UNIFIED IDEOGRAPH + {0xB64C, 0x8CB3}, //3248 #CJK UNIFIED IDEOGRAPH + {0xB64D, 0x8CBD}, //3249 #CJK UNIFIED IDEOGRAPH + {0xB64E, 0x8CC1}, //3250 #CJK UNIFIED IDEOGRAPH + {0xB64F, 0x8CBB}, //3251 #CJK UNIFIED IDEOGRAPH + {0xB650, 0x8CC0}, //3252 #CJK UNIFIED IDEOGRAPH + {0xB651, 0x8CB4}, //3253 #CJK UNIFIED IDEOGRAPH + {0xB652, 0x8CB7}, //3254 #CJK UNIFIED IDEOGRAPH + {0xB653, 0x8CB6}, //3255 #CJK UNIFIED IDEOGRAPH + {0xB654, 0x8CBF}, //3256 #CJK UNIFIED IDEOGRAPH + {0xB655, 0x8CB8}, //3257 #CJK UNIFIED IDEOGRAPH + {0xB656, 0x8D8A}, //3258 #CJK UNIFIED IDEOGRAPH + {0xB657, 0x8D85}, //3259 #CJK UNIFIED IDEOGRAPH + {0xB658, 0x8D81}, //3260 #CJK UNIFIED IDEOGRAPH + {0xB659, 0x8DCE}, //3261 #CJK UNIFIED IDEOGRAPH + {0xB65A, 0x8DDD}, //3262 #CJK UNIFIED IDEOGRAPH + {0xB65B, 0x8DCB}, //3263 #CJK UNIFIED IDEOGRAPH + {0xB65C, 0x8DDA}, //3264 #CJK UNIFIED IDEOGRAPH + {0xB65D, 0x8DD1}, //3265 #CJK UNIFIED IDEOGRAPH + {0xB65E, 0x8DCC}, //3266 #CJK UNIFIED IDEOGRAPH + {0xB65F, 0x8DDB}, //3267 #CJK UNIFIED IDEOGRAPH + {0xB660, 0x8DC6}, //3268 #CJK UNIFIED IDEOGRAPH + {0xB661, 0x8EFB}, //3269 #CJK UNIFIED IDEOGRAPH + {0xB662, 0x8EF8}, //3270 #CJK UNIFIED IDEOGRAPH + {0xB663, 0x8EFC}, //3271 #CJK UNIFIED IDEOGRAPH + {0xB664, 0x8F9C}, //3272 #CJK UNIFIED IDEOGRAPH + {0xB665, 0x902E}, //3273 #CJK UNIFIED IDEOGRAPH + {0xB666, 0x9035}, //3274 #CJK UNIFIED IDEOGRAPH + {0xB667, 0x9031}, //3275 #CJK UNIFIED IDEOGRAPH + {0xB668, 0x9038}, //3276 #CJK UNIFIED IDEOGRAPH + {0xB669, 0x9032}, //3277 #CJK UNIFIED IDEOGRAPH + {0xB66A, 0x9036}, //3278 #CJK UNIFIED IDEOGRAPH + {0xB66B, 0x9102}, //3279 #CJK UNIFIED IDEOGRAPH + {0xB66C, 0x90F5}, //3280 #CJK UNIFIED IDEOGRAPH + {0xB66D, 0x9109}, //3281 #CJK UNIFIED IDEOGRAPH + {0xB66E, 0x90FE}, //3282 #CJK UNIFIED IDEOGRAPH + {0xB66F, 0x9163}, //3283 #CJK UNIFIED IDEOGRAPH + {0xB670, 0x9165}, //3284 #CJK UNIFIED IDEOGRAPH + {0xB671, 0x91CF}, //3285 #CJK UNIFIED IDEOGRAPH + {0xB672, 0x9214}, //3286 #CJK UNIFIED IDEOGRAPH + {0xB673, 0x9215}, //3287 #CJK UNIFIED IDEOGRAPH + {0xB674, 0x9223}, //3288 #CJK UNIFIED IDEOGRAPH + {0xB675, 0x9209}, //3289 #CJK UNIFIED IDEOGRAPH + {0xB676, 0x921E}, //3290 #CJK UNIFIED IDEOGRAPH + {0xB677, 0x920D}, //3291 #CJK UNIFIED IDEOGRAPH + {0xB678, 0x9210}, //3292 #CJK UNIFIED IDEOGRAPH + {0xB679, 0x9207}, //3293 #CJK UNIFIED IDEOGRAPH + {0xB67A, 0x9211}, //3294 #CJK UNIFIED IDEOGRAPH + {0xB67B, 0x9594}, //3295 #CJK UNIFIED IDEOGRAPH + {0xB67C, 0x958F}, //3296 #CJK UNIFIED IDEOGRAPH + {0xB67D, 0x958B}, //3297 #CJK UNIFIED IDEOGRAPH + {0xB67E, 0x9591}, //3298 #CJK UNIFIED IDEOGRAPH + {0xB6A1, 0x9593}, //3299 #CJK UNIFIED IDEOGRAPH + {0xB6A2, 0x9592}, //3300 #CJK UNIFIED IDEOGRAPH + {0xB6A3, 0x958E}, //3301 #CJK UNIFIED IDEOGRAPH + {0xB6A4, 0x968A}, //3302 #CJK UNIFIED IDEOGRAPH + {0xB6A5, 0x968E}, //3303 #CJK UNIFIED IDEOGRAPH + {0xB6A6, 0x968B}, //3304 #CJK UNIFIED IDEOGRAPH + {0xB6A7, 0x967D}, //3305 #CJK UNIFIED IDEOGRAPH + {0xB6A8, 0x9685}, //3306 #CJK UNIFIED IDEOGRAPH + {0xB6A9, 0x9686}, //3307 #CJK UNIFIED IDEOGRAPH + {0xB6AA, 0x968D}, //3308 #CJK UNIFIED IDEOGRAPH + {0xB6AB, 0x9672}, //3309 #CJK UNIFIED IDEOGRAPH + {0xB6AC, 0x9684}, //3310 #CJK UNIFIED IDEOGRAPH + {0xB6AD, 0x96C1}, //3311 #CJK UNIFIED IDEOGRAPH + {0xB6AE, 0x96C5}, //3312 #CJK UNIFIED IDEOGRAPH + {0xB6AF, 0x96C4}, //3313 #CJK UNIFIED IDEOGRAPH + {0xB6B0, 0x96C6}, //3314 #CJK UNIFIED IDEOGRAPH + {0xB6B1, 0x96C7}, //3315 #CJK UNIFIED IDEOGRAPH + {0xB6B2, 0x96EF}, //3316 #CJK UNIFIED IDEOGRAPH + {0xB6B3, 0x96F2}, //3317 #CJK UNIFIED IDEOGRAPH + {0xB6B4, 0x97CC}, //3318 #CJK UNIFIED IDEOGRAPH + {0xB6B5, 0x9805}, //3319 #CJK UNIFIED IDEOGRAPH + {0xB6B6, 0x9806}, //3320 #CJK UNIFIED IDEOGRAPH + {0xB6B7, 0x9808}, //3321 #CJK UNIFIED IDEOGRAPH + {0xB6B8, 0x98E7}, //3322 #CJK UNIFIED IDEOGRAPH + {0xB6B9, 0x98EA}, //3323 #CJK UNIFIED IDEOGRAPH + {0xB6BA, 0x98EF}, //3324 #CJK UNIFIED IDEOGRAPH + {0xB6BB, 0x98E9}, //3325 #CJK UNIFIED IDEOGRAPH + {0xB6BC, 0x98F2}, //3326 #CJK UNIFIED IDEOGRAPH + {0xB6BD, 0x98ED}, //3327 #CJK UNIFIED IDEOGRAPH + {0xB6BE, 0x99AE}, //3328 #CJK UNIFIED IDEOGRAPH + {0xB6BF, 0x99AD}, //3329 #CJK UNIFIED IDEOGRAPH + {0xB6C0, 0x9EC3}, //3330 #CJK UNIFIED IDEOGRAPH + {0xB6C1, 0x9ECD}, //3331 #CJK UNIFIED IDEOGRAPH + {0xB6C2, 0x9ED1}, //3332 #CJK UNIFIED IDEOGRAPH + {0xB6C3, 0x4E82}, //3333 #CJK UNIFIED IDEOGRAPH + {0xB6C4, 0x50AD}, //3334 #CJK UNIFIED IDEOGRAPH + {0xB6C5, 0x50B5}, //3335 #CJK UNIFIED IDEOGRAPH + {0xB6C6, 0x50B2}, //3336 #CJK UNIFIED IDEOGRAPH + {0xB6C7, 0x50B3}, //3337 #CJK UNIFIED IDEOGRAPH + {0xB6C8, 0x50C5}, //3338 #CJK UNIFIED IDEOGRAPH + {0xB6C9, 0x50BE}, //3339 #CJK UNIFIED IDEOGRAPH + {0xB6CA, 0x50AC}, //3340 #CJK UNIFIED IDEOGRAPH + {0xB6CB, 0x50B7}, //3341 #CJK UNIFIED IDEOGRAPH + {0xB6CC, 0x50BB}, //3342 #CJK UNIFIED IDEOGRAPH + {0xB6CD, 0x50AF}, //3343 #CJK UNIFIED IDEOGRAPH + {0xB6CE, 0x50C7}, //3344 #CJK UNIFIED IDEOGRAPH + {0xB6CF, 0x527F}, //3345 #CJK UNIFIED IDEOGRAPH + {0xB6D0, 0x5277}, //3346 #CJK UNIFIED IDEOGRAPH + {0xB6D1, 0x527D}, //3347 #CJK UNIFIED IDEOGRAPH + {0xB6D2, 0x52DF}, //3348 #CJK UNIFIED IDEOGRAPH + {0xB6D3, 0x52E6}, //3349 #CJK UNIFIED IDEOGRAPH + {0xB6D4, 0x52E4}, //3350 #CJK UNIFIED IDEOGRAPH + {0xB6D5, 0x52E2}, //3351 #CJK UNIFIED IDEOGRAPH + {0xB6D6, 0x52E3}, //3352 #CJK UNIFIED IDEOGRAPH + {0xB6D7, 0x532F}, //3353 #CJK UNIFIED IDEOGRAPH + {0xB6D8, 0x55DF}, //3354 #CJK UNIFIED IDEOGRAPH + {0xB6D9, 0x55E8}, //3355 #CJK UNIFIED IDEOGRAPH + {0xB6DA, 0x55D3}, //3356 #CJK UNIFIED IDEOGRAPH + {0xB6DB, 0x55E6}, //3357 #CJK UNIFIED IDEOGRAPH + {0xB6DC, 0x55CE}, //3358 #CJK UNIFIED IDEOGRAPH + {0xB6DD, 0x55DC}, //3359 #CJK UNIFIED IDEOGRAPH + {0xB6DE, 0x55C7}, //3360 #CJK UNIFIED IDEOGRAPH + {0xB6DF, 0x55D1}, //3361 #CJK UNIFIED IDEOGRAPH + {0xB6E0, 0x55E3}, //3362 #CJK UNIFIED IDEOGRAPH + {0xB6E1, 0x55E4}, //3363 #CJK UNIFIED IDEOGRAPH + {0xB6E2, 0x55EF}, //3364 #CJK UNIFIED IDEOGRAPH + {0xB6E3, 0x55DA}, //3365 #CJK UNIFIED IDEOGRAPH + {0xB6E4, 0x55E1}, //3366 #CJK UNIFIED IDEOGRAPH + {0xB6E5, 0x55C5}, //3367 #CJK UNIFIED IDEOGRAPH + {0xB6E6, 0x55C6}, //3368 #CJK UNIFIED IDEOGRAPH + {0xB6E7, 0x55E5}, //3369 #CJK UNIFIED IDEOGRAPH + {0xB6E8, 0x55C9}, //3370 #CJK UNIFIED IDEOGRAPH + {0xB6E9, 0x5712}, //3371 #CJK UNIFIED IDEOGRAPH + {0xB6EA, 0x5713}, //3372 #CJK UNIFIED IDEOGRAPH + {0xB6EB, 0x585E}, //3373 #CJK UNIFIED IDEOGRAPH + {0xB6EC, 0x5851}, //3374 #CJK UNIFIED IDEOGRAPH + {0xB6ED, 0x5858}, //3375 #CJK UNIFIED IDEOGRAPH + {0xB6EE, 0x5857}, //3376 #CJK UNIFIED IDEOGRAPH + {0xB6EF, 0x585A}, //3377 #CJK UNIFIED IDEOGRAPH + {0xB6F0, 0x5854}, //3378 #CJK UNIFIED IDEOGRAPH + {0xB6F1, 0x586B}, //3379 #CJK UNIFIED IDEOGRAPH + {0xB6F2, 0x584C}, //3380 #CJK UNIFIED IDEOGRAPH + {0xB6F3, 0x586D}, //3381 #CJK UNIFIED IDEOGRAPH + {0xB6F4, 0x584A}, //3382 #CJK UNIFIED IDEOGRAPH + {0xB6F5, 0x5862}, //3383 #CJK UNIFIED IDEOGRAPH + {0xB6F6, 0x5852}, //3384 #CJK UNIFIED IDEOGRAPH + {0xB6F7, 0x584B}, //3385 #CJK UNIFIED IDEOGRAPH + {0xB6F8, 0x5967}, //3386 #CJK UNIFIED IDEOGRAPH + {0xB6F9, 0x5AC1}, //3387 #CJK UNIFIED IDEOGRAPH + {0xB6FA, 0x5AC9}, //3388 #CJK UNIFIED IDEOGRAPH + {0xB6FB, 0x5ACC}, //3389 #CJK UNIFIED IDEOGRAPH + {0xB6FC, 0x5ABE}, //3390 #CJK UNIFIED IDEOGRAPH + {0xB6FD, 0x5ABD}, //3391 #CJK UNIFIED IDEOGRAPH + {0xB6FE, 0x5ABC}, //3392 #CJK UNIFIED IDEOGRAPH + {0xB740, 0x5AB3}, //3393 #CJK UNIFIED IDEOGRAPH + {0xB741, 0x5AC2}, //3394 #CJK UNIFIED IDEOGRAPH + {0xB742, 0x5AB2}, //3395 #CJK UNIFIED IDEOGRAPH + {0xB743, 0x5D69}, //3396 #CJK UNIFIED IDEOGRAPH + {0xB744, 0x5D6F}, //3397 #CJK UNIFIED IDEOGRAPH + {0xB745, 0x5E4C}, //3398 #CJK UNIFIED IDEOGRAPH + {0xB746, 0x5E79}, //3399 #CJK UNIFIED IDEOGRAPH + {0xB747, 0x5EC9}, //3400 #CJK UNIFIED IDEOGRAPH + {0xB748, 0x5EC8}, //3401 #CJK UNIFIED IDEOGRAPH + {0xB749, 0x5F12}, //3402 #CJK UNIFIED IDEOGRAPH + {0xB74A, 0x5F59}, //3403 #CJK UNIFIED IDEOGRAPH + {0xB74B, 0x5FAC}, //3404 #CJK UNIFIED IDEOGRAPH + {0xB74C, 0x5FAE}, //3405 #CJK UNIFIED IDEOGRAPH + {0xB74D, 0x611A}, //3406 #CJK UNIFIED IDEOGRAPH + {0xB74E, 0x610F}, //3407 #CJK UNIFIED IDEOGRAPH + {0xB74F, 0x6148}, //3408 #CJK UNIFIED IDEOGRAPH + {0xB750, 0x611F}, //3409 #CJK UNIFIED IDEOGRAPH + {0xB751, 0x60F3}, //3410 #CJK UNIFIED IDEOGRAPH + {0xB752, 0x611B}, //3411 #CJK UNIFIED IDEOGRAPH + {0xB753, 0x60F9}, //3412 #CJK UNIFIED IDEOGRAPH + {0xB754, 0x6101}, //3413 #CJK UNIFIED IDEOGRAPH + {0xB755, 0x6108}, //3414 #CJK UNIFIED IDEOGRAPH + {0xB756, 0x614E}, //3415 #CJK UNIFIED IDEOGRAPH + {0xB757, 0x614C}, //3416 #CJK UNIFIED IDEOGRAPH + {0xB758, 0x6144}, //3417 #CJK UNIFIED IDEOGRAPH + {0xB759, 0x614D}, //3418 #CJK UNIFIED IDEOGRAPH + {0xB75A, 0x613E}, //3419 #CJK UNIFIED IDEOGRAPH + {0xB75B, 0x6134}, //3420 #CJK UNIFIED IDEOGRAPH + {0xB75C, 0x6127}, //3421 #CJK UNIFIED IDEOGRAPH + {0xB75D, 0x610D}, //3422 #CJK UNIFIED IDEOGRAPH + {0xB75E, 0x6106}, //3423 #CJK UNIFIED IDEOGRAPH + {0xB75F, 0x6137}, //3424 #CJK UNIFIED IDEOGRAPH + {0xB760, 0x6221}, //3425 #CJK UNIFIED IDEOGRAPH + {0xB761, 0x6222}, //3426 #CJK UNIFIED IDEOGRAPH + {0xB762, 0x6413}, //3427 #CJK UNIFIED IDEOGRAPH + {0xB763, 0x643E}, //3428 #CJK UNIFIED IDEOGRAPH + {0xB764, 0x641E}, //3429 #CJK UNIFIED IDEOGRAPH + {0xB765, 0x642A}, //3430 #CJK UNIFIED IDEOGRAPH + {0xB766, 0x642D}, //3431 #CJK UNIFIED IDEOGRAPH + {0xB767, 0x643D}, //3432 #CJK UNIFIED IDEOGRAPH + {0xB768, 0x642C}, //3433 #CJK UNIFIED IDEOGRAPH + {0xB769, 0x640F}, //3434 #CJK UNIFIED IDEOGRAPH + {0xB76A, 0x641C}, //3435 #CJK UNIFIED IDEOGRAPH + {0xB76B, 0x6414}, //3436 #CJK UNIFIED IDEOGRAPH + {0xB76C, 0x640D}, //3437 #CJK UNIFIED IDEOGRAPH + {0xB76D, 0x6436}, //3438 #CJK UNIFIED IDEOGRAPH + {0xB76E, 0x6416}, //3439 #CJK UNIFIED IDEOGRAPH + {0xB76F, 0x6417}, //3440 #CJK UNIFIED IDEOGRAPH + {0xB770, 0x6406}, //3441 #CJK UNIFIED IDEOGRAPH + {0xB771, 0x656C}, //3442 #CJK UNIFIED IDEOGRAPH + {0xB772, 0x659F}, //3443 #CJK UNIFIED IDEOGRAPH + {0xB773, 0x65B0}, //3444 #CJK UNIFIED IDEOGRAPH + {0xB774, 0x6697}, //3445 #CJK UNIFIED IDEOGRAPH + {0xB775, 0x6689}, //3446 #CJK UNIFIED IDEOGRAPH + {0xB776, 0x6687}, //3447 #CJK UNIFIED IDEOGRAPH + {0xB777, 0x6688}, //3448 #CJK UNIFIED IDEOGRAPH + {0xB778, 0x6696}, //3449 #CJK UNIFIED IDEOGRAPH + {0xB779, 0x6684}, //3450 #CJK UNIFIED IDEOGRAPH + {0xB77A, 0x6698}, //3451 #CJK UNIFIED IDEOGRAPH + {0xB77B, 0x668D}, //3452 #CJK UNIFIED IDEOGRAPH + {0xB77C, 0x6703}, //3453 #CJK UNIFIED IDEOGRAPH + {0xB77D, 0x6994}, //3454 #CJK UNIFIED IDEOGRAPH + {0xB77E, 0x696D}, //3455 #CJK UNIFIED IDEOGRAPH + {0xB7A1, 0x695A}, //3456 #CJK UNIFIED IDEOGRAPH + {0xB7A2, 0x6977}, //3457 #CJK UNIFIED IDEOGRAPH + {0xB7A3, 0x6960}, //3458 #CJK UNIFIED IDEOGRAPH + {0xB7A4, 0x6954}, //3459 #CJK UNIFIED IDEOGRAPH + {0xB7A5, 0x6975}, //3460 #CJK UNIFIED IDEOGRAPH + {0xB7A6, 0x6930}, //3461 #CJK UNIFIED IDEOGRAPH + {0xB7A7, 0x6982}, //3462 #CJK UNIFIED IDEOGRAPH + {0xB7A8, 0x694A}, //3463 #CJK UNIFIED IDEOGRAPH + {0xB7A9, 0x6968}, //3464 #CJK UNIFIED IDEOGRAPH + {0xB7AA, 0x696B}, //3465 #CJK UNIFIED IDEOGRAPH + {0xB7AB, 0x695E}, //3466 #CJK UNIFIED IDEOGRAPH + {0xB7AC, 0x6953}, //3467 #CJK UNIFIED IDEOGRAPH + {0xB7AD, 0x6979}, //3468 #CJK UNIFIED IDEOGRAPH + {0xB7AE, 0x6986}, //3469 #CJK UNIFIED IDEOGRAPH + {0xB7AF, 0x695D}, //3470 #CJK UNIFIED IDEOGRAPH + {0xB7B0, 0x6963}, //3471 #CJK UNIFIED IDEOGRAPH + {0xB7B1, 0x695B}, //3472 #CJK UNIFIED IDEOGRAPH + {0xB7B2, 0x6B47}, //3473 #CJK UNIFIED IDEOGRAPH + {0xB7B3, 0x6B72}, //3474 #CJK UNIFIED IDEOGRAPH + {0xB7B4, 0x6BC0}, //3475 #CJK UNIFIED IDEOGRAPH + {0xB7B5, 0x6BBF}, //3476 #CJK UNIFIED IDEOGRAPH + {0xB7B6, 0x6BD3}, //3477 #CJK UNIFIED IDEOGRAPH + {0xB7B7, 0x6BFD}, //3478 #CJK UNIFIED IDEOGRAPH + {0xB7B8, 0x6EA2}, //3479 #CJK UNIFIED IDEOGRAPH + {0xB7B9, 0x6EAF}, //3480 #CJK UNIFIED IDEOGRAPH + {0xB7BA, 0x6ED3}, //3481 #CJK UNIFIED IDEOGRAPH + {0xB7BB, 0x6EB6}, //3482 #CJK UNIFIED IDEOGRAPH + {0xB7BC, 0x6EC2}, //3483 #CJK UNIFIED IDEOGRAPH + {0xB7BD, 0x6E90}, //3484 #CJK UNIFIED IDEOGRAPH + {0xB7BE, 0x6E9D}, //3485 #CJK UNIFIED IDEOGRAPH + {0xB7BF, 0x6EC7}, //3486 #CJK UNIFIED IDEOGRAPH + {0xB7C0, 0x6EC5}, //3487 #CJK UNIFIED IDEOGRAPH + {0xB7C1, 0x6EA5}, //3488 #CJK UNIFIED IDEOGRAPH + {0xB7C2, 0x6E98}, //3489 #CJK UNIFIED IDEOGRAPH + {0xB7C3, 0x6EBC}, //3490 #CJK UNIFIED IDEOGRAPH + {0xB7C4, 0x6EBA}, //3491 #CJK UNIFIED IDEOGRAPH + {0xB7C5, 0x6EAB}, //3492 #CJK UNIFIED IDEOGRAPH + {0xB7C6, 0x6ED1}, //3493 #CJK UNIFIED IDEOGRAPH + {0xB7C7, 0x6E96}, //3494 #CJK UNIFIED IDEOGRAPH + {0xB7C8, 0x6E9C}, //3495 #CJK UNIFIED IDEOGRAPH + {0xB7C9, 0x6EC4}, //3496 #CJK UNIFIED IDEOGRAPH + {0xB7CA, 0x6ED4}, //3497 #CJK UNIFIED IDEOGRAPH + {0xB7CB, 0x6EAA}, //3498 #CJK UNIFIED IDEOGRAPH + {0xB7CC, 0x6EA7}, //3499 #CJK UNIFIED IDEOGRAPH + {0xB7CD, 0x6EB4}, //3500 #CJK UNIFIED IDEOGRAPH + {0xB7CE, 0x714E}, //3501 #CJK UNIFIED IDEOGRAPH + {0xB7CF, 0x7159}, //3502 #CJK UNIFIED IDEOGRAPH + {0xB7D0, 0x7169}, //3503 #CJK UNIFIED IDEOGRAPH + {0xB7D1, 0x7164}, //3504 #CJK UNIFIED IDEOGRAPH + {0xB7D2, 0x7149}, //3505 #CJK UNIFIED IDEOGRAPH + {0xB7D3, 0x7167}, //3506 #CJK UNIFIED IDEOGRAPH + {0xB7D4, 0x715C}, //3507 #CJK UNIFIED IDEOGRAPH + {0xB7D5, 0x716C}, //3508 #CJK UNIFIED IDEOGRAPH + {0xB7D6, 0x7166}, //3509 #CJK UNIFIED IDEOGRAPH + {0xB7D7, 0x714C}, //3510 #CJK UNIFIED IDEOGRAPH + {0xB7D8, 0x7165}, //3511 #CJK UNIFIED IDEOGRAPH + {0xB7D9, 0x715E}, //3512 #CJK UNIFIED IDEOGRAPH + {0xB7DA, 0x7146}, //3513 #CJK UNIFIED IDEOGRAPH + {0xB7DB, 0x7168}, //3514 #CJK UNIFIED IDEOGRAPH + {0xB7DC, 0x7156}, //3515 #CJK UNIFIED IDEOGRAPH + {0xB7DD, 0x723A}, //3516 #CJK UNIFIED IDEOGRAPH + {0xB7DE, 0x7252}, //3517 #CJK UNIFIED IDEOGRAPH + {0xB7DF, 0x7337}, //3518 #CJK UNIFIED IDEOGRAPH + {0xB7E0, 0x7345}, //3519 #CJK UNIFIED IDEOGRAPH + {0xB7E1, 0x733F}, //3520 #CJK UNIFIED IDEOGRAPH + {0xB7E2, 0x733E}, //3521 #CJK UNIFIED IDEOGRAPH + {0xB7E3, 0x746F}, //3522 #CJK UNIFIED IDEOGRAPH + {0xB7E4, 0x745A}, //3523 #CJK UNIFIED IDEOGRAPH + {0xB7E5, 0x7455}, //3524 #CJK UNIFIED IDEOGRAPH + {0xB7E6, 0x745F}, //3525 #CJK UNIFIED IDEOGRAPH + {0xB7E7, 0x745E}, //3526 #CJK UNIFIED IDEOGRAPH + {0xB7E8, 0x7441}, //3527 #CJK UNIFIED IDEOGRAPH + {0xB7E9, 0x743F}, //3528 #CJK UNIFIED IDEOGRAPH + {0xB7EA, 0x7459}, //3529 #CJK UNIFIED IDEOGRAPH + {0xB7EB, 0x745B}, //3530 #CJK UNIFIED IDEOGRAPH + {0xB7EC, 0x745C}, //3531 #CJK UNIFIED IDEOGRAPH + {0xB7ED, 0x7576}, //3532 #CJK UNIFIED IDEOGRAPH + {0xB7EE, 0x7578}, //3533 #CJK UNIFIED IDEOGRAPH + {0xB7EF, 0x7600}, //3534 #CJK UNIFIED IDEOGRAPH + {0xB7F0, 0x75F0}, //3535 #CJK UNIFIED IDEOGRAPH + {0xB7F1, 0x7601}, //3536 #CJK UNIFIED IDEOGRAPH + {0xB7F2, 0x75F2}, //3537 #CJK UNIFIED IDEOGRAPH + {0xB7F3, 0x75F1}, //3538 #CJK UNIFIED IDEOGRAPH + {0xB7F4, 0x75FA}, //3539 #CJK UNIFIED IDEOGRAPH + {0xB7F5, 0x75FF}, //3540 #CJK UNIFIED IDEOGRAPH + {0xB7F6, 0x75F4}, //3541 #CJK UNIFIED IDEOGRAPH + {0xB7F7, 0x75F3}, //3542 #CJK UNIFIED IDEOGRAPH + {0xB7F8, 0x76DE}, //3543 #CJK UNIFIED IDEOGRAPH + {0xB7F9, 0x76DF}, //3544 #CJK UNIFIED IDEOGRAPH + {0xB7FA, 0x775B}, //3545 #CJK UNIFIED IDEOGRAPH + {0xB7FB, 0x776B}, //3546 #CJK UNIFIED IDEOGRAPH + {0xB7FC, 0x7766}, //3547 #CJK UNIFIED IDEOGRAPH + {0xB7FD, 0x775E}, //3548 #CJK UNIFIED IDEOGRAPH + {0xB7FE, 0x7763}, //3549 #CJK UNIFIED IDEOGRAPH + {0xB840, 0x7779}, //3550 #CJK UNIFIED IDEOGRAPH + {0xB841, 0x776A}, //3551 #CJK UNIFIED IDEOGRAPH + {0xB842, 0x776C}, //3552 #CJK UNIFIED IDEOGRAPH + {0xB843, 0x775C}, //3553 #CJK UNIFIED IDEOGRAPH + {0xB844, 0x7765}, //3554 #CJK UNIFIED IDEOGRAPH + {0xB845, 0x7768}, //3555 #CJK UNIFIED IDEOGRAPH + {0xB846, 0x7762}, //3556 #CJK UNIFIED IDEOGRAPH + {0xB847, 0x77EE}, //3557 #CJK UNIFIED IDEOGRAPH + {0xB848, 0x788E}, //3558 #CJK UNIFIED IDEOGRAPH + {0xB849, 0x78B0}, //3559 #CJK UNIFIED IDEOGRAPH + {0xB84A, 0x7897}, //3560 #CJK UNIFIED IDEOGRAPH + {0xB84B, 0x7898}, //3561 #CJK UNIFIED IDEOGRAPH + {0xB84C, 0x788C}, //3562 #CJK UNIFIED IDEOGRAPH + {0xB84D, 0x7889}, //3563 #CJK UNIFIED IDEOGRAPH + {0xB84E, 0x787C}, //3564 #CJK UNIFIED IDEOGRAPH + {0xB84F, 0x7891}, //3565 #CJK UNIFIED IDEOGRAPH + {0xB850, 0x7893}, //3566 #CJK UNIFIED IDEOGRAPH + {0xB851, 0x787F}, //3567 #CJK UNIFIED IDEOGRAPH + {0xB852, 0x797A}, //3568 #CJK UNIFIED IDEOGRAPH + {0xB853, 0x797F}, //3569 #CJK UNIFIED IDEOGRAPH + {0xB854, 0x7981}, //3570 #CJK UNIFIED IDEOGRAPH + {0xB855, 0x842C}, //3571 #CJK UNIFIED IDEOGRAPH + {0xB856, 0x79BD}, //3572 #CJK UNIFIED IDEOGRAPH + {0xB857, 0x7A1C}, //3573 #CJK UNIFIED IDEOGRAPH + {0xB858, 0x7A1A}, //3574 #CJK UNIFIED IDEOGRAPH + {0xB859, 0x7A20}, //3575 #CJK UNIFIED IDEOGRAPH + {0xB85A, 0x7A14}, //3576 #CJK UNIFIED IDEOGRAPH + {0xB85B, 0x7A1F}, //3577 #CJK UNIFIED IDEOGRAPH + {0xB85C, 0x7A1E}, //3578 #CJK UNIFIED IDEOGRAPH + {0xB85D, 0x7A9F}, //3579 #CJK UNIFIED IDEOGRAPH + {0xB85E, 0x7AA0}, //3580 #CJK UNIFIED IDEOGRAPH + {0xB85F, 0x7B77}, //3581 #CJK UNIFIED IDEOGRAPH + {0xB860, 0x7BC0}, //3582 #CJK UNIFIED IDEOGRAPH + {0xB861, 0x7B60}, //3583 #CJK UNIFIED IDEOGRAPH + {0xB862, 0x7B6E}, //3584 #CJK UNIFIED IDEOGRAPH + {0xB863, 0x7B67}, //3585 #CJK UNIFIED IDEOGRAPH + {0xB864, 0x7CB1}, //3586 #CJK UNIFIED IDEOGRAPH + {0xB865, 0x7CB3}, //3587 #CJK UNIFIED IDEOGRAPH + {0xB866, 0x7CB5}, //3588 #CJK UNIFIED IDEOGRAPH + {0xB867, 0x7D93}, //3589 #CJK UNIFIED IDEOGRAPH + {0xB868, 0x7D79}, //3590 #CJK UNIFIED IDEOGRAPH + {0xB869, 0x7D91}, //3591 #CJK UNIFIED IDEOGRAPH + {0xB86A, 0x7D81}, //3592 #CJK UNIFIED IDEOGRAPH + {0xB86B, 0x7D8F}, //3593 #CJK UNIFIED IDEOGRAPH + {0xB86C, 0x7D5B}, //3594 #CJK UNIFIED IDEOGRAPH + {0xB86D, 0x7F6E}, //3595 #CJK UNIFIED IDEOGRAPH + {0xB86E, 0x7F69}, //3596 #CJK UNIFIED IDEOGRAPH + {0xB86F, 0x7F6A}, //3597 #CJK UNIFIED IDEOGRAPH + {0xB870, 0x7F72}, //3598 #CJK UNIFIED IDEOGRAPH + {0xB871, 0x7FA9}, //3599 #CJK UNIFIED IDEOGRAPH + {0xB872, 0x7FA8}, //3600 #CJK UNIFIED IDEOGRAPH + {0xB873, 0x7FA4}, //3601 #CJK UNIFIED IDEOGRAPH + {0xB874, 0x8056}, //3602 #CJK UNIFIED IDEOGRAPH + {0xB875, 0x8058}, //3603 #CJK UNIFIED IDEOGRAPH + {0xB876, 0x8086}, //3604 #CJK UNIFIED IDEOGRAPH + {0xB877, 0x8084}, //3605 #CJK UNIFIED IDEOGRAPH + {0xB878, 0x8171}, //3606 #CJK UNIFIED IDEOGRAPH + {0xB879, 0x8170}, //3607 #CJK UNIFIED IDEOGRAPH + {0xB87A, 0x8178}, //3608 #CJK UNIFIED IDEOGRAPH + {0xB87B, 0x8165}, //3609 #CJK UNIFIED IDEOGRAPH + {0xB87C, 0x816E}, //3610 #CJK UNIFIED IDEOGRAPH + {0xB87D, 0x8173}, //3611 #CJK UNIFIED IDEOGRAPH + {0xB87E, 0x816B}, //3612 #CJK UNIFIED IDEOGRAPH + {0xB8A1, 0x8179}, //3613 #CJK UNIFIED IDEOGRAPH + {0xB8A2, 0x817A}, //3614 #CJK UNIFIED IDEOGRAPH + {0xB8A3, 0x8166}, //3615 #CJK UNIFIED IDEOGRAPH + {0xB8A4, 0x8205}, //3616 #CJK UNIFIED IDEOGRAPH + {0xB8A5, 0x8247}, //3617 #CJK UNIFIED IDEOGRAPH + {0xB8A6, 0x8482}, //3618 #CJK UNIFIED IDEOGRAPH + {0xB8A7, 0x8477}, //3619 #CJK UNIFIED IDEOGRAPH + {0xB8A8, 0x843D}, //3620 #CJK UNIFIED IDEOGRAPH + {0xB8A9, 0x8431}, //3621 #CJK UNIFIED IDEOGRAPH + {0xB8AA, 0x8475}, //3622 #CJK UNIFIED IDEOGRAPH + {0xB8AB, 0x8466}, //3623 #CJK UNIFIED IDEOGRAPH + {0xB8AC, 0x846B}, //3624 #CJK UNIFIED IDEOGRAPH + {0xB8AD, 0x8449}, //3625 #CJK UNIFIED IDEOGRAPH + {0xB8AE, 0x846C}, //3626 #CJK UNIFIED IDEOGRAPH + {0xB8AF, 0x845B}, //3627 #CJK UNIFIED IDEOGRAPH + {0xB8B0, 0x843C}, //3628 #CJK UNIFIED IDEOGRAPH + {0xB8B1, 0x8435}, //3629 #CJK UNIFIED IDEOGRAPH + {0xB8B2, 0x8461}, //3630 #CJK UNIFIED IDEOGRAPH + {0xB8B3, 0x8463}, //3631 #CJK UNIFIED IDEOGRAPH + {0xB8B4, 0x8469}, //3632 #CJK UNIFIED IDEOGRAPH + {0xB8B5, 0x846D}, //3633 #CJK UNIFIED IDEOGRAPH + {0xB8B6, 0x8446}, //3634 #CJK UNIFIED IDEOGRAPH + {0xB8B7, 0x865E}, //3635 #CJK UNIFIED IDEOGRAPH + {0xB8B8, 0x865C}, //3636 #CJK UNIFIED IDEOGRAPH + {0xB8B9, 0x865F}, //3637 #CJK UNIFIED IDEOGRAPH + {0xB8BA, 0x86F9}, //3638 #CJK UNIFIED IDEOGRAPH + {0xB8BB, 0x8713}, //3639 #CJK UNIFIED IDEOGRAPH + {0xB8BC, 0x8708}, //3640 #CJK UNIFIED IDEOGRAPH + {0xB8BD, 0x8707}, //3641 #CJK UNIFIED IDEOGRAPH + {0xB8BE, 0x8700}, //3642 #CJK UNIFIED IDEOGRAPH + {0xB8BF, 0x86FE}, //3643 #CJK UNIFIED IDEOGRAPH + {0xB8C0, 0x86FB}, //3644 #CJK UNIFIED IDEOGRAPH + {0xB8C1, 0x8702}, //3645 #CJK UNIFIED IDEOGRAPH + {0xB8C2, 0x8703}, //3646 #CJK UNIFIED IDEOGRAPH + {0xB8C3, 0x8706}, //3647 #CJK UNIFIED IDEOGRAPH + {0xB8C4, 0x870A}, //3648 #CJK UNIFIED IDEOGRAPH + {0xB8C5, 0x8859}, //3649 #CJK UNIFIED IDEOGRAPH + {0xB8C6, 0x88DF}, //3650 #CJK UNIFIED IDEOGRAPH + {0xB8C7, 0x88D4}, //3651 #CJK UNIFIED IDEOGRAPH + {0xB8C8, 0x88D9}, //3652 #CJK UNIFIED IDEOGRAPH + {0xB8C9, 0x88DC}, //3653 #CJK UNIFIED IDEOGRAPH + {0xB8CA, 0x88D8}, //3654 #CJK UNIFIED IDEOGRAPH + {0xB8CB, 0x88DD}, //3655 #CJK UNIFIED IDEOGRAPH + {0xB8CC, 0x88E1}, //3656 #CJK UNIFIED IDEOGRAPH + {0xB8CD, 0x88CA}, //3657 #CJK UNIFIED IDEOGRAPH + {0xB8CE, 0x88D5}, //3658 #CJK UNIFIED IDEOGRAPH + {0xB8CF, 0x88D2}, //3659 #CJK UNIFIED IDEOGRAPH + {0xB8D0, 0x899C}, //3660 #CJK UNIFIED IDEOGRAPH + {0xB8D1, 0x89E3}, //3661 #CJK UNIFIED IDEOGRAPH + {0xB8D2, 0x8A6B}, //3662 #CJK UNIFIED IDEOGRAPH + {0xB8D3, 0x8A72}, //3663 #CJK UNIFIED IDEOGRAPH + {0xB8D4, 0x8A73}, //3664 #CJK UNIFIED IDEOGRAPH + {0xB8D5, 0x8A66}, //3665 #CJK UNIFIED IDEOGRAPH + {0xB8D6, 0x8A69}, //3666 #CJK UNIFIED IDEOGRAPH + {0xB8D7, 0x8A70}, //3667 #CJK UNIFIED IDEOGRAPH + {0xB8D8, 0x8A87}, //3668 #CJK UNIFIED IDEOGRAPH + {0xB8D9, 0x8A7C}, //3669 #CJK UNIFIED IDEOGRAPH + {0xB8DA, 0x8A63}, //3670 #CJK UNIFIED IDEOGRAPH + {0xB8DB, 0x8AA0}, //3671 #CJK UNIFIED IDEOGRAPH + {0xB8DC, 0x8A71}, //3672 #CJK UNIFIED IDEOGRAPH + {0xB8DD, 0x8A85}, //3673 #CJK UNIFIED IDEOGRAPH + {0xB8DE, 0x8A6D}, //3674 #CJK UNIFIED IDEOGRAPH + {0xB8DF, 0x8A62}, //3675 #CJK UNIFIED IDEOGRAPH + {0xB8E0, 0x8A6E}, //3676 #CJK UNIFIED IDEOGRAPH + {0xB8E1, 0x8A6C}, //3677 #CJK UNIFIED IDEOGRAPH + {0xB8E2, 0x8A79}, //3678 #CJK UNIFIED IDEOGRAPH + {0xB8E3, 0x8A7B}, //3679 #CJK UNIFIED IDEOGRAPH + {0xB8E4, 0x8A3E}, //3680 #CJK UNIFIED IDEOGRAPH + {0xB8E5, 0x8A68}, //3681 #CJK UNIFIED IDEOGRAPH + {0xB8E6, 0x8C62}, //3682 #CJK UNIFIED IDEOGRAPH + {0xB8E7, 0x8C8A}, //3683 #CJK UNIFIED IDEOGRAPH + {0xB8E8, 0x8C89}, //3684 #CJK UNIFIED IDEOGRAPH + {0xB8E9, 0x8CCA}, //3685 #CJK UNIFIED IDEOGRAPH + {0xB8EA, 0x8CC7}, //3686 #CJK UNIFIED IDEOGRAPH + {0xB8EB, 0x8CC8}, //3687 #CJK UNIFIED IDEOGRAPH + {0xB8EC, 0x8CC4}, //3688 #CJK UNIFIED IDEOGRAPH + {0xB8ED, 0x8CB2}, //3689 #CJK UNIFIED IDEOGRAPH + {0xB8EE, 0x8CC3}, //3690 #CJK UNIFIED IDEOGRAPH + {0xB8EF, 0x8CC2}, //3691 #CJK UNIFIED IDEOGRAPH + {0xB8F0, 0x8CC5}, //3692 #CJK UNIFIED IDEOGRAPH + {0xB8F1, 0x8DE1}, //3693 #CJK UNIFIED IDEOGRAPH + {0xB8F2, 0x8DDF}, //3694 #CJK UNIFIED IDEOGRAPH + {0xB8F3, 0x8DE8}, //3695 #CJK UNIFIED IDEOGRAPH + {0xB8F4, 0x8DEF}, //3696 #CJK UNIFIED IDEOGRAPH + {0xB8F5, 0x8DF3}, //3697 #CJK UNIFIED IDEOGRAPH + {0xB8F6, 0x8DFA}, //3698 #CJK UNIFIED IDEOGRAPH + {0xB8F7, 0x8DEA}, //3699 #CJK UNIFIED IDEOGRAPH + {0xB8F8, 0x8DE4}, //3700 #CJK UNIFIED IDEOGRAPH + {0xB8F9, 0x8DE6}, //3701 #CJK UNIFIED IDEOGRAPH + {0xB8FA, 0x8EB2}, //3702 #CJK UNIFIED IDEOGRAPH + {0xB8FB, 0x8F03}, //3703 #CJK UNIFIED IDEOGRAPH + {0xB8FC, 0x8F09}, //3704 #CJK UNIFIED IDEOGRAPH + {0xB8FD, 0x8EFE}, //3705 #CJK UNIFIED IDEOGRAPH + {0xB8FE, 0x8F0A}, //3706 #CJK UNIFIED IDEOGRAPH + {0xB940, 0x8F9F}, //3707 #CJK UNIFIED IDEOGRAPH + {0xB941, 0x8FB2}, //3708 #CJK UNIFIED IDEOGRAPH + {0xB942, 0x904B}, //3709 #CJK UNIFIED IDEOGRAPH + {0xB943, 0x904A}, //3710 #CJK UNIFIED IDEOGRAPH + {0xB944, 0x9053}, //3711 #CJK UNIFIED IDEOGRAPH + {0xB945, 0x9042}, //3712 #CJK UNIFIED IDEOGRAPH + {0xB946, 0x9054}, //3713 #CJK UNIFIED IDEOGRAPH + {0xB947, 0x903C}, //3714 #CJK UNIFIED IDEOGRAPH + {0xB948, 0x9055}, //3715 #CJK UNIFIED IDEOGRAPH + {0xB949, 0x9050}, //3716 #CJK UNIFIED IDEOGRAPH + {0xB94A, 0x9047}, //3717 #CJK UNIFIED IDEOGRAPH + {0xB94B, 0x904F}, //3718 #CJK UNIFIED IDEOGRAPH + {0xB94C, 0x904E}, //3719 #CJK UNIFIED IDEOGRAPH + {0xB94D, 0x904D}, //3720 #CJK UNIFIED IDEOGRAPH + {0xB94E, 0x9051}, //3721 #CJK UNIFIED IDEOGRAPH + {0xB94F, 0x903E}, //3722 #CJK UNIFIED IDEOGRAPH + {0xB950, 0x9041}, //3723 #CJK UNIFIED IDEOGRAPH + {0xB951, 0x9112}, //3724 #CJK UNIFIED IDEOGRAPH + {0xB952, 0x9117}, //3725 #CJK UNIFIED IDEOGRAPH + {0xB953, 0x916C}, //3726 #CJK UNIFIED IDEOGRAPH + {0xB954, 0x916A}, //3727 #CJK UNIFIED IDEOGRAPH + {0xB955, 0x9169}, //3728 #CJK UNIFIED IDEOGRAPH + {0xB956, 0x91C9}, //3729 #CJK UNIFIED IDEOGRAPH + {0xB957, 0x9237}, //3730 #CJK UNIFIED IDEOGRAPH + {0xB958, 0x9257}, //3731 #CJK UNIFIED IDEOGRAPH + {0xB959, 0x9238}, //3732 #CJK UNIFIED IDEOGRAPH + {0xB95A, 0x923D}, //3733 #CJK UNIFIED IDEOGRAPH + {0xB95B, 0x9240}, //3734 #CJK UNIFIED IDEOGRAPH + {0xB95C, 0x923E}, //3735 #CJK UNIFIED IDEOGRAPH + {0xB95D, 0x925B}, //3736 #CJK UNIFIED IDEOGRAPH + {0xB95E, 0x924B}, //3737 #CJK UNIFIED IDEOGRAPH + {0xB95F, 0x9264}, //3738 #CJK UNIFIED IDEOGRAPH + {0xB960, 0x9251}, //3739 #CJK UNIFIED IDEOGRAPH + {0xB961, 0x9234}, //3740 #CJK UNIFIED IDEOGRAPH + {0xB962, 0x9249}, //3741 #CJK UNIFIED IDEOGRAPH + {0xB963, 0x924D}, //3742 #CJK UNIFIED IDEOGRAPH + {0xB964, 0x9245}, //3743 #CJK UNIFIED IDEOGRAPH + {0xB965, 0x9239}, //3744 #CJK UNIFIED IDEOGRAPH + {0xB966, 0x923F}, //3745 #CJK UNIFIED IDEOGRAPH + {0xB967, 0x925A}, //3746 #CJK UNIFIED IDEOGRAPH + {0xB968, 0x9598}, //3747 #CJK UNIFIED IDEOGRAPH + {0xB969, 0x9698}, //3748 #CJK UNIFIED IDEOGRAPH + {0xB96A, 0x9694}, //3749 #CJK UNIFIED IDEOGRAPH + {0xB96B, 0x9695}, //3750 #CJK UNIFIED IDEOGRAPH + {0xB96C, 0x96CD}, //3751 #CJK UNIFIED IDEOGRAPH + {0xB96D, 0x96CB}, //3752 #CJK UNIFIED IDEOGRAPH + {0xB96E, 0x96C9}, //3753 #CJK UNIFIED IDEOGRAPH + {0xB96F, 0x96CA}, //3754 #CJK UNIFIED IDEOGRAPH + {0xB970, 0x96F7}, //3755 #CJK UNIFIED IDEOGRAPH + {0xB971, 0x96FB}, //3756 #CJK UNIFIED IDEOGRAPH + {0xB972, 0x96F9}, //3757 #CJK UNIFIED IDEOGRAPH + {0xB973, 0x96F6}, //3758 #CJK UNIFIED IDEOGRAPH + {0xB974, 0x9756}, //3759 #CJK UNIFIED IDEOGRAPH + {0xB975, 0x9774}, //3760 #CJK UNIFIED IDEOGRAPH + {0xB976, 0x9776}, //3761 #CJK UNIFIED IDEOGRAPH + {0xB977, 0x9810}, //3762 #CJK UNIFIED IDEOGRAPH + {0xB978, 0x9811}, //3763 #CJK UNIFIED IDEOGRAPH + {0xB979, 0x9813}, //3764 #CJK UNIFIED IDEOGRAPH + {0xB97A, 0x980A}, //3765 #CJK UNIFIED IDEOGRAPH + {0xB97B, 0x9812}, //3766 #CJK UNIFIED IDEOGRAPH + {0xB97C, 0x980C}, //3767 #CJK UNIFIED IDEOGRAPH + {0xB97D, 0x98FC}, //3768 #CJK UNIFIED IDEOGRAPH + {0xB97E, 0x98F4}, //3769 #CJK UNIFIED IDEOGRAPH + {0xB9A1, 0x98FD}, //3770 #CJK UNIFIED IDEOGRAPH + {0xB9A2, 0x98FE}, //3771 #CJK UNIFIED IDEOGRAPH + {0xB9A3, 0x99B3}, //3772 #CJK UNIFIED IDEOGRAPH + {0xB9A4, 0x99B1}, //3773 #CJK UNIFIED IDEOGRAPH + {0xB9A5, 0x99B4}, //3774 #CJK UNIFIED IDEOGRAPH + {0xB9A6, 0x9AE1}, //3775 #CJK UNIFIED IDEOGRAPH + {0xB9A7, 0x9CE9}, //3776 #CJK UNIFIED IDEOGRAPH + {0xB9A8, 0x9E82}, //3777 #CJK UNIFIED IDEOGRAPH + {0xB9A9, 0x9F0E}, //3778 #CJK UNIFIED IDEOGRAPH + {0xB9AA, 0x9F13}, //3779 #CJK UNIFIED IDEOGRAPH + {0xB9AB, 0x9F20}, //3780 #CJK UNIFIED IDEOGRAPH + {0xB9AC, 0x50E7}, //3781 #CJK UNIFIED IDEOGRAPH + {0xB9AD, 0x50EE}, //3782 #CJK UNIFIED IDEOGRAPH + {0xB9AE, 0x50E5}, //3783 #CJK UNIFIED IDEOGRAPH + {0xB9AF, 0x50D6}, //3784 #CJK UNIFIED IDEOGRAPH + {0xB9B0, 0x50ED}, //3785 #CJK UNIFIED IDEOGRAPH + {0xB9B1, 0x50DA}, //3786 #CJK UNIFIED IDEOGRAPH + {0xB9B2, 0x50D5}, //3787 #CJK UNIFIED IDEOGRAPH + {0xB9B3, 0x50CF}, //3788 #CJK UNIFIED IDEOGRAPH + {0xB9B4, 0x50D1}, //3789 #CJK UNIFIED IDEOGRAPH + {0xB9B5, 0x50F1}, //3790 #CJK UNIFIED IDEOGRAPH + {0xB9B6, 0x50CE}, //3791 #CJK UNIFIED IDEOGRAPH + {0xB9B7, 0x50E9}, //3792 #CJK UNIFIED IDEOGRAPH + {0xB9B8, 0x5162}, //3793 #CJK UNIFIED IDEOGRAPH + {0xB9B9, 0x51F3}, //3794 #CJK UNIFIED IDEOGRAPH + {0xB9BA, 0x5283}, //3795 #CJK UNIFIED IDEOGRAPH + {0xB9BB, 0x5282}, //3796 #CJK UNIFIED IDEOGRAPH + {0xB9BC, 0x5331}, //3797 #CJK UNIFIED IDEOGRAPH + {0xB9BD, 0x53AD}, //3798 #CJK UNIFIED IDEOGRAPH + {0xB9BE, 0x55FE}, //3799 #CJK UNIFIED IDEOGRAPH + {0xB9BF, 0x5600}, //3800 #CJK UNIFIED IDEOGRAPH + {0xB9C0, 0x561B}, //3801 #CJK UNIFIED IDEOGRAPH + {0xB9C1, 0x5617}, //3802 #CJK UNIFIED IDEOGRAPH + {0xB9C2, 0x55FD}, //3803 #CJK UNIFIED IDEOGRAPH + {0xB9C3, 0x5614}, //3804 #CJK UNIFIED IDEOGRAPH + {0xB9C4, 0x5606}, //3805 #CJK UNIFIED IDEOGRAPH + {0xB9C5, 0x5609}, //3806 #CJK UNIFIED IDEOGRAPH + {0xB9C6, 0x560D}, //3807 #CJK UNIFIED IDEOGRAPH + {0xB9C7, 0x560E}, //3808 #CJK UNIFIED IDEOGRAPH + {0xB9C8, 0x55F7}, //3809 #CJK UNIFIED IDEOGRAPH + {0xB9C9, 0x5616}, //3810 #CJK UNIFIED IDEOGRAPH + {0xB9CA, 0x561F}, //3811 #CJK UNIFIED IDEOGRAPH + {0xB9CB, 0x5608}, //3812 #CJK UNIFIED IDEOGRAPH + {0xB9CC, 0x5610}, //3813 #CJK UNIFIED IDEOGRAPH + {0xB9CD, 0x55F6}, //3814 #CJK UNIFIED IDEOGRAPH + {0xB9CE, 0x5718}, //3815 #CJK UNIFIED IDEOGRAPH + {0xB9CF, 0x5716}, //3816 #CJK UNIFIED IDEOGRAPH + {0xB9D0, 0x5875}, //3817 #CJK UNIFIED IDEOGRAPH + {0xB9D1, 0x587E}, //3818 #CJK UNIFIED IDEOGRAPH + {0xB9D2, 0x5883}, //3819 #CJK UNIFIED IDEOGRAPH + {0xB9D3, 0x5893}, //3820 #CJK UNIFIED IDEOGRAPH + {0xB9D4, 0x588A}, //3821 #CJK UNIFIED IDEOGRAPH + {0xB9D5, 0x5879}, //3822 #CJK UNIFIED IDEOGRAPH + {0xB9D6, 0x5885}, //3823 #CJK UNIFIED IDEOGRAPH + {0xB9D7, 0x587D}, //3824 #CJK UNIFIED IDEOGRAPH + {0xB9D8, 0x58FD}, //3825 #CJK UNIFIED IDEOGRAPH + {0xB9D9, 0x5925}, //3826 #CJK UNIFIED IDEOGRAPH + {0xB9DA, 0x5922}, //3827 #CJK UNIFIED IDEOGRAPH + {0xB9DB, 0x5924}, //3828 #CJK UNIFIED IDEOGRAPH + {0xB9DC, 0x596A}, //3829 #CJK UNIFIED IDEOGRAPH + {0xB9DD, 0x5969}, //3830 #CJK UNIFIED IDEOGRAPH + {0xB9DE, 0x5AE1}, //3831 #CJK UNIFIED IDEOGRAPH + {0xB9DF, 0x5AE6}, //3832 #CJK UNIFIED IDEOGRAPH + {0xB9E0, 0x5AE9}, //3833 #CJK UNIFIED IDEOGRAPH + {0xB9E1, 0x5AD7}, //3834 #CJK UNIFIED IDEOGRAPH + {0xB9E2, 0x5AD6}, //3835 #CJK UNIFIED IDEOGRAPH + {0xB9E3, 0x5AD8}, //3836 #CJK UNIFIED IDEOGRAPH + {0xB9E4, 0x5AE3}, //3837 #CJK UNIFIED IDEOGRAPH + {0xB9E5, 0x5B75}, //3838 #CJK UNIFIED IDEOGRAPH + {0xB9E6, 0x5BDE}, //3839 #CJK UNIFIED IDEOGRAPH + {0xB9E7, 0x5BE7}, //3840 #CJK UNIFIED IDEOGRAPH + {0xB9E8, 0x5BE1}, //3841 #CJK UNIFIED IDEOGRAPH + {0xB9E9, 0x5BE5}, //3842 #CJK UNIFIED IDEOGRAPH + {0xB9EA, 0x5BE6}, //3843 #CJK UNIFIED IDEOGRAPH + {0xB9EB, 0x5BE8}, //3844 #CJK UNIFIED IDEOGRAPH + {0xB9EC, 0x5BE2}, //3845 #CJK UNIFIED IDEOGRAPH + {0xB9ED, 0x5BE4}, //3846 #CJK UNIFIED IDEOGRAPH + {0xB9EE, 0x5BDF}, //3847 #CJK UNIFIED IDEOGRAPH + {0xB9EF, 0x5C0D}, //3848 #CJK UNIFIED IDEOGRAPH + {0xB9F0, 0x5C62}, //3849 #CJK UNIFIED IDEOGRAPH + {0xB9F1, 0x5D84}, //3850 #CJK UNIFIED IDEOGRAPH + {0xB9F2, 0x5D87}, //3851 #CJK UNIFIED IDEOGRAPH + {0xB9F3, 0x5E5B}, //3852 #CJK UNIFIED IDEOGRAPH + {0xB9F4, 0x5E63}, //3853 #CJK UNIFIED IDEOGRAPH + {0xB9F5, 0x5E55}, //3854 #CJK UNIFIED IDEOGRAPH + {0xB9F6, 0x5E57}, //3855 #CJK UNIFIED IDEOGRAPH + {0xB9F7, 0x5E54}, //3856 #CJK UNIFIED IDEOGRAPH + {0xB9F8, 0x5ED3}, //3857 #CJK UNIFIED IDEOGRAPH + {0xB9F9, 0x5ED6}, //3858 #CJK UNIFIED IDEOGRAPH + {0xB9FA, 0x5F0A}, //3859 #CJK UNIFIED IDEOGRAPH + {0xB9FB, 0x5F46}, //3860 #CJK UNIFIED IDEOGRAPH + {0xB9FC, 0x5F70}, //3861 #CJK UNIFIED IDEOGRAPH + {0xB9FD, 0x5FB9}, //3862 #CJK UNIFIED IDEOGRAPH + {0xB9FE, 0x6147}, //3863 #CJK UNIFIED IDEOGRAPH + {0xBA40, 0x613F}, //3864 #CJK UNIFIED IDEOGRAPH + {0xBA41, 0x614B}, //3865 #CJK UNIFIED IDEOGRAPH + {0xBA42, 0x6177}, //3866 #CJK UNIFIED IDEOGRAPH + {0xBA43, 0x6162}, //3867 #CJK UNIFIED IDEOGRAPH + {0xBA44, 0x6163}, //3868 #CJK UNIFIED IDEOGRAPH + {0xBA45, 0x615F}, //3869 #CJK UNIFIED IDEOGRAPH + {0xBA46, 0x615A}, //3870 #CJK UNIFIED IDEOGRAPH + {0xBA47, 0x6158}, //3871 #CJK UNIFIED IDEOGRAPH + {0xBA48, 0x6175}, //3872 #CJK UNIFIED IDEOGRAPH + {0xBA49, 0x622A}, //3873 #CJK UNIFIED IDEOGRAPH + {0xBA4A, 0x6487}, //3874 #CJK UNIFIED IDEOGRAPH + {0xBA4B, 0x6458}, //3875 #CJK UNIFIED IDEOGRAPH + {0xBA4C, 0x6454}, //3876 #CJK UNIFIED IDEOGRAPH + {0xBA4D, 0x64A4}, //3877 #CJK UNIFIED IDEOGRAPH + {0xBA4E, 0x6478}, //3878 #CJK UNIFIED IDEOGRAPH + {0xBA4F, 0x645F}, //3879 #CJK UNIFIED IDEOGRAPH + {0xBA50, 0x647A}, //3880 #CJK UNIFIED IDEOGRAPH + {0xBA51, 0x6451}, //3881 #CJK UNIFIED IDEOGRAPH + {0xBA52, 0x6467}, //3882 #CJK UNIFIED IDEOGRAPH + {0xBA53, 0x6434}, //3883 #CJK UNIFIED IDEOGRAPH + {0xBA54, 0x646D}, //3884 #CJK UNIFIED IDEOGRAPH + {0xBA55, 0x647B}, //3885 #CJK UNIFIED IDEOGRAPH + {0xBA56, 0x6572}, //3886 #CJK UNIFIED IDEOGRAPH + {0xBA57, 0x65A1}, //3887 #CJK UNIFIED IDEOGRAPH + {0xBA58, 0x65D7}, //3888 #CJK UNIFIED IDEOGRAPH + {0xBA59, 0x65D6}, //3889 #CJK UNIFIED IDEOGRAPH + {0xBA5A, 0x66A2}, //3890 #CJK UNIFIED IDEOGRAPH + {0xBA5B, 0x66A8}, //3891 #CJK UNIFIED IDEOGRAPH + {0xBA5C, 0x669D}, //3892 #CJK UNIFIED IDEOGRAPH + {0xBA5D, 0x699C}, //3893 #CJK UNIFIED IDEOGRAPH + {0xBA5E, 0x69A8}, //3894 #CJK UNIFIED IDEOGRAPH + {0xBA5F, 0x6995}, //3895 #CJK UNIFIED IDEOGRAPH + {0xBA60, 0x69C1}, //3896 #CJK UNIFIED IDEOGRAPH + {0xBA61, 0x69AE}, //3897 #CJK UNIFIED IDEOGRAPH + {0xBA62, 0x69D3}, //3898 #CJK UNIFIED IDEOGRAPH + {0xBA63, 0x69CB}, //3899 #CJK UNIFIED IDEOGRAPH + {0xBA64, 0x699B}, //3900 #CJK UNIFIED IDEOGRAPH + {0xBA65, 0x69B7}, //3901 #CJK UNIFIED IDEOGRAPH + {0xBA66, 0x69BB}, //3902 #CJK UNIFIED IDEOGRAPH + {0xBA67, 0x69AB}, //3903 #CJK UNIFIED IDEOGRAPH + {0xBA68, 0x69B4}, //3904 #CJK UNIFIED IDEOGRAPH + {0xBA69, 0x69D0}, //3905 #CJK UNIFIED IDEOGRAPH + {0xBA6A, 0x69CD}, //3906 #CJK UNIFIED IDEOGRAPH + {0xBA6B, 0x69AD}, //3907 #CJK UNIFIED IDEOGRAPH + {0xBA6C, 0x69CC}, //3908 #CJK UNIFIED IDEOGRAPH + {0xBA6D, 0x69A6}, //3909 #CJK UNIFIED IDEOGRAPH + {0xBA6E, 0x69C3}, //3910 #CJK UNIFIED IDEOGRAPH + {0xBA6F, 0x69A3}, //3911 #CJK UNIFIED IDEOGRAPH + {0xBA70, 0x6B49}, //3912 #CJK UNIFIED IDEOGRAPH + {0xBA71, 0x6B4C}, //3913 #CJK UNIFIED IDEOGRAPH + {0xBA72, 0x6C33}, //3914 #CJK UNIFIED IDEOGRAPH + {0xBA73, 0x6F33}, //3915 #CJK UNIFIED IDEOGRAPH + {0xBA74, 0x6F14}, //3916 #CJK UNIFIED IDEOGRAPH + {0xBA75, 0x6EFE}, //3917 #CJK UNIFIED IDEOGRAPH + {0xBA76, 0x6F13}, //3918 #CJK UNIFIED IDEOGRAPH + {0xBA77, 0x6EF4}, //3919 #CJK UNIFIED IDEOGRAPH + {0xBA78, 0x6F29}, //3920 #CJK UNIFIED IDEOGRAPH + {0xBA79, 0x6F3E}, //3921 #CJK UNIFIED IDEOGRAPH + {0xBA7A, 0x6F20}, //3922 #CJK UNIFIED IDEOGRAPH + {0xBA7B, 0x6F2C}, //3923 #CJK UNIFIED IDEOGRAPH + {0xBA7C, 0x6F0F}, //3924 #CJK UNIFIED IDEOGRAPH + {0xBA7D, 0x6F02}, //3925 #CJK UNIFIED IDEOGRAPH + {0xBA7E, 0x6F22}, //3926 #CJK UNIFIED IDEOGRAPH + {0xBAA1, 0x6EFF}, //3927 #CJK UNIFIED IDEOGRAPH + {0xBAA2, 0x6EEF}, //3928 #CJK UNIFIED IDEOGRAPH + {0xBAA3, 0x6F06}, //3929 #CJK UNIFIED IDEOGRAPH + {0xBAA4, 0x6F31}, //3930 #CJK UNIFIED IDEOGRAPH + {0xBAA5, 0x6F38}, //3931 #CJK UNIFIED IDEOGRAPH + {0xBAA6, 0x6F32}, //3932 #CJK UNIFIED IDEOGRAPH + {0xBAA7, 0x6F23}, //3933 #CJK UNIFIED IDEOGRAPH + {0xBAA8, 0x6F15}, //3934 #CJK UNIFIED IDEOGRAPH + {0xBAA9, 0x6F2B}, //3935 #CJK UNIFIED IDEOGRAPH + {0xBAAA, 0x6F2F}, //3936 #CJK UNIFIED IDEOGRAPH + {0xBAAB, 0x6F88}, //3937 #CJK UNIFIED IDEOGRAPH + {0xBAAC, 0x6F2A}, //3938 #CJK UNIFIED IDEOGRAPH + {0xBAAD, 0x6EEC}, //3939 #CJK UNIFIED IDEOGRAPH + {0xBAAE, 0x6F01}, //3940 #CJK UNIFIED IDEOGRAPH + {0xBAAF, 0x6EF2}, //3941 #CJK UNIFIED IDEOGRAPH + {0xBAB0, 0x6ECC}, //3942 #CJK UNIFIED IDEOGRAPH + {0xBAB1, 0x6EF7}, //3943 #CJK UNIFIED IDEOGRAPH + {0xBAB2, 0x7194}, //3944 #CJK UNIFIED IDEOGRAPH + {0xBAB3, 0x7199}, //3945 #CJK UNIFIED IDEOGRAPH + {0xBAB4, 0x717D}, //3946 #CJK UNIFIED IDEOGRAPH + {0xBAB5, 0x718A}, //3947 #CJK UNIFIED IDEOGRAPH + {0xBAB6, 0x7184}, //3948 #CJK UNIFIED IDEOGRAPH + {0xBAB7, 0x7192}, //3949 #CJK UNIFIED IDEOGRAPH + {0xBAB8, 0x723E}, //3950 #CJK UNIFIED IDEOGRAPH + {0xBAB9, 0x7292}, //3951 #CJK UNIFIED IDEOGRAPH + {0xBABA, 0x7296}, //3952 #CJK UNIFIED IDEOGRAPH + {0xBABB, 0x7344}, //3953 #CJK UNIFIED IDEOGRAPH + {0xBABC, 0x7350}, //3954 #CJK UNIFIED IDEOGRAPH + {0xBABD, 0x7464}, //3955 #CJK UNIFIED IDEOGRAPH + {0xBABE, 0x7463}, //3956 #CJK UNIFIED IDEOGRAPH + {0xBABF, 0x746A}, //3957 #CJK UNIFIED IDEOGRAPH + {0xBAC0, 0x7470}, //3958 #CJK UNIFIED IDEOGRAPH + {0xBAC1, 0x746D}, //3959 #CJK UNIFIED IDEOGRAPH + {0xBAC2, 0x7504}, //3960 #CJK UNIFIED IDEOGRAPH + {0xBAC3, 0x7591}, //3961 #CJK UNIFIED IDEOGRAPH + {0xBAC4, 0x7627}, //3962 #CJK UNIFIED IDEOGRAPH + {0xBAC5, 0x760D}, //3963 #CJK UNIFIED IDEOGRAPH + {0xBAC6, 0x760B}, //3964 #CJK UNIFIED IDEOGRAPH + {0xBAC7, 0x7609}, //3965 #CJK UNIFIED IDEOGRAPH + {0xBAC8, 0x7613}, //3966 #CJK UNIFIED IDEOGRAPH + {0xBAC9, 0x76E1}, //3967 #CJK UNIFIED IDEOGRAPH + {0xBACA, 0x76E3}, //3968 #CJK UNIFIED IDEOGRAPH + {0xBACB, 0x7784}, //3969 #CJK UNIFIED IDEOGRAPH + {0xBACC, 0x777D}, //3970 #CJK UNIFIED IDEOGRAPH + {0xBACD, 0x777F}, //3971 #CJK UNIFIED IDEOGRAPH + {0xBACE, 0x7761}, //3972 #CJK UNIFIED IDEOGRAPH + {0xBACF, 0x78C1}, //3973 #CJK UNIFIED IDEOGRAPH + {0xBAD0, 0x789F}, //3974 #CJK UNIFIED IDEOGRAPH + {0xBAD1, 0x78A7}, //3975 #CJK UNIFIED IDEOGRAPH + {0xBAD2, 0x78B3}, //3976 #CJK UNIFIED IDEOGRAPH + {0xBAD3, 0x78A9}, //3977 #CJK UNIFIED IDEOGRAPH + {0xBAD4, 0x78A3}, //3978 #CJK UNIFIED IDEOGRAPH + {0xBAD5, 0x798E}, //3979 #CJK UNIFIED IDEOGRAPH + {0xBAD6, 0x798F}, //3980 #CJK UNIFIED IDEOGRAPH + {0xBAD7, 0x798D}, //3981 #CJK UNIFIED IDEOGRAPH + {0xBAD8, 0x7A2E}, //3982 #CJK UNIFIED IDEOGRAPH + {0xBAD9, 0x7A31}, //3983 #CJK UNIFIED IDEOGRAPH + {0xBADA, 0x7AAA}, //3984 #CJK UNIFIED IDEOGRAPH + {0xBADB, 0x7AA9}, //3985 #CJK UNIFIED IDEOGRAPH + {0xBADC, 0x7AED}, //3986 #CJK UNIFIED IDEOGRAPH + {0xBADD, 0x7AEF}, //3987 #CJK UNIFIED IDEOGRAPH + {0xBADE, 0x7BA1}, //3988 #CJK UNIFIED IDEOGRAPH + {0xBADF, 0x7B95}, //3989 #CJK UNIFIED IDEOGRAPH + {0xBAE0, 0x7B8B}, //3990 #CJK UNIFIED IDEOGRAPH + {0xBAE1, 0x7B75}, //3991 #CJK UNIFIED IDEOGRAPH + {0xBAE2, 0x7B97}, //3992 #CJK UNIFIED IDEOGRAPH + {0xBAE3, 0x7B9D}, //3993 #CJK UNIFIED IDEOGRAPH + {0xBAE4, 0x7B94}, //3994 #CJK UNIFIED IDEOGRAPH + {0xBAE5, 0x7B8F}, //3995 #CJK UNIFIED IDEOGRAPH + {0xBAE6, 0x7BB8}, //3996 #CJK UNIFIED IDEOGRAPH + {0xBAE7, 0x7B87}, //3997 #CJK UNIFIED IDEOGRAPH + {0xBAE8, 0x7B84}, //3998 #CJK UNIFIED IDEOGRAPH + {0xBAE9, 0x7CB9}, //3999 #CJK UNIFIED IDEOGRAPH + {0xBAEA, 0x7CBD}, //4000 #CJK UNIFIED IDEOGRAPH + {0xBAEB, 0x7CBE}, //4001 #CJK UNIFIED IDEOGRAPH + {0xBAEC, 0x7DBB}, //4002 #CJK UNIFIED IDEOGRAPH + {0xBAED, 0x7DB0}, //4003 #CJK UNIFIED IDEOGRAPH + {0xBAEE, 0x7D9C}, //4004 #CJK UNIFIED IDEOGRAPH + {0xBAEF, 0x7DBD}, //4005 #CJK UNIFIED IDEOGRAPH + {0xBAF0, 0x7DBE}, //4006 #CJK UNIFIED IDEOGRAPH + {0xBAF1, 0x7DA0}, //4007 #CJK UNIFIED IDEOGRAPH + {0xBAF2, 0x7DCA}, //4008 #CJK UNIFIED IDEOGRAPH + {0xBAF3, 0x7DB4}, //4009 #CJK UNIFIED IDEOGRAPH + {0xBAF4, 0x7DB2}, //4010 #CJK UNIFIED IDEOGRAPH + {0xBAF5, 0x7DB1}, //4011 #CJK UNIFIED IDEOGRAPH + {0xBAF6, 0x7DBA}, //4012 #CJK UNIFIED IDEOGRAPH + {0xBAF7, 0x7DA2}, //4013 #CJK UNIFIED IDEOGRAPH + {0xBAF8, 0x7DBF}, //4014 #CJK UNIFIED IDEOGRAPH + {0xBAF9, 0x7DB5}, //4015 #CJK UNIFIED IDEOGRAPH + {0xBAFA, 0x7DB8}, //4016 #CJK UNIFIED IDEOGRAPH + {0xBAFB, 0x7DAD}, //4017 #CJK UNIFIED IDEOGRAPH + {0xBAFC, 0x7DD2}, //4018 #CJK UNIFIED IDEOGRAPH + {0xBAFD, 0x7DC7}, //4019 #CJK UNIFIED IDEOGRAPH + {0xBAFE, 0x7DAC}, //4020 #CJK UNIFIED IDEOGRAPH + {0xBB40, 0x7F70}, //4021 #CJK UNIFIED IDEOGRAPH + {0xBB41, 0x7FE0}, //4022 #CJK UNIFIED IDEOGRAPH + {0xBB42, 0x7FE1}, //4023 #CJK UNIFIED IDEOGRAPH + {0xBB43, 0x7FDF}, //4024 #CJK UNIFIED IDEOGRAPH + {0xBB44, 0x805E}, //4025 #CJK UNIFIED IDEOGRAPH + {0xBB45, 0x805A}, //4026 #CJK UNIFIED IDEOGRAPH + {0xBB46, 0x8087}, //4027 #CJK UNIFIED IDEOGRAPH + {0xBB47, 0x8150}, //4028 #CJK UNIFIED IDEOGRAPH + {0xBB48, 0x8180}, //4029 #CJK UNIFIED IDEOGRAPH + {0xBB49, 0x818F}, //4030 #CJK UNIFIED IDEOGRAPH + {0xBB4A, 0x8188}, //4031 #CJK UNIFIED IDEOGRAPH + {0xBB4B, 0x818A}, //4032 #CJK UNIFIED IDEOGRAPH + {0xBB4C, 0x817F}, //4033 #CJK UNIFIED IDEOGRAPH + {0xBB4D, 0x8182}, //4034 #CJK UNIFIED IDEOGRAPH + {0xBB4E, 0x81E7}, //4035 #CJK UNIFIED IDEOGRAPH + {0xBB4F, 0x81FA}, //4036 #CJK UNIFIED IDEOGRAPH + {0xBB50, 0x8207}, //4037 #CJK UNIFIED IDEOGRAPH + {0xBB51, 0x8214}, //4038 #CJK UNIFIED IDEOGRAPH + {0xBB52, 0x821E}, //4039 #CJK UNIFIED IDEOGRAPH + {0xBB53, 0x824B}, //4040 #CJK UNIFIED IDEOGRAPH + {0xBB54, 0x84C9}, //4041 #CJK UNIFIED IDEOGRAPH + {0xBB55, 0x84BF}, //4042 #CJK UNIFIED IDEOGRAPH + {0xBB56, 0x84C6}, //4043 #CJK UNIFIED IDEOGRAPH + {0xBB57, 0x84C4}, //4044 #CJK UNIFIED IDEOGRAPH + {0xBB58, 0x8499}, //4045 #CJK UNIFIED IDEOGRAPH + {0xBB59, 0x849E}, //4046 #CJK UNIFIED IDEOGRAPH + {0xBB5A, 0x84B2}, //4047 #CJK UNIFIED IDEOGRAPH + {0xBB5B, 0x849C}, //4048 #CJK UNIFIED IDEOGRAPH + {0xBB5C, 0x84CB}, //4049 #CJK UNIFIED IDEOGRAPH + {0xBB5D, 0x84B8}, //4050 #CJK UNIFIED IDEOGRAPH + {0xBB5E, 0x84C0}, //4051 #CJK UNIFIED IDEOGRAPH + {0xBB5F, 0x84D3}, //4052 #CJK UNIFIED IDEOGRAPH + {0xBB60, 0x8490}, //4053 #CJK UNIFIED IDEOGRAPH + {0xBB61, 0x84BC}, //4054 #CJK UNIFIED IDEOGRAPH + {0xBB62, 0x84D1}, //4055 #CJK UNIFIED IDEOGRAPH + {0xBB63, 0x84CA}, //4056 #CJK UNIFIED IDEOGRAPH + {0xBB64, 0x873F}, //4057 #CJK UNIFIED IDEOGRAPH + {0xBB65, 0x871C}, //4058 #CJK UNIFIED IDEOGRAPH + {0xBB66, 0x873B}, //4059 #CJK UNIFIED IDEOGRAPH + {0xBB67, 0x8722}, //4060 #CJK UNIFIED IDEOGRAPH + {0xBB68, 0x8725}, //4061 #CJK UNIFIED IDEOGRAPH + {0xBB69, 0x8734}, //4062 #CJK UNIFIED IDEOGRAPH + {0xBB6A, 0x8718}, //4063 #CJK UNIFIED IDEOGRAPH + {0xBB6B, 0x8755}, //4064 #CJK UNIFIED IDEOGRAPH + {0xBB6C, 0x8737}, //4065 #CJK UNIFIED IDEOGRAPH + {0xBB6D, 0x8729}, //4066 #CJK UNIFIED IDEOGRAPH + {0xBB6E, 0x88F3}, //4067 #CJK UNIFIED IDEOGRAPH + {0xBB6F, 0x8902}, //4068 #CJK UNIFIED IDEOGRAPH + {0xBB70, 0x88F4}, //4069 #CJK UNIFIED IDEOGRAPH + {0xBB71, 0x88F9}, //4070 #CJK UNIFIED IDEOGRAPH + {0xBB72, 0x88F8}, //4071 #CJK UNIFIED IDEOGRAPH + {0xBB73, 0x88FD}, //4072 #CJK UNIFIED IDEOGRAPH + {0xBB74, 0x88E8}, //4073 #CJK UNIFIED IDEOGRAPH + {0xBB75, 0x891A}, //4074 #CJK UNIFIED IDEOGRAPH + {0xBB76, 0x88EF}, //4075 #CJK UNIFIED IDEOGRAPH + {0xBB77, 0x8AA6}, //4076 #CJK UNIFIED IDEOGRAPH + {0xBB78, 0x8A8C}, //4077 #CJK UNIFIED IDEOGRAPH + {0xBB79, 0x8A9E}, //4078 #CJK UNIFIED IDEOGRAPH + {0xBB7A, 0x8AA3}, //4079 #CJK UNIFIED IDEOGRAPH + {0xBB7B, 0x8A8D}, //4080 #CJK UNIFIED IDEOGRAPH + {0xBB7C, 0x8AA1}, //4081 #CJK UNIFIED IDEOGRAPH + {0xBB7D, 0x8A93}, //4082 #CJK UNIFIED IDEOGRAPH + {0xBB7E, 0x8AA4}, //4083 #CJK UNIFIED IDEOGRAPH + {0xBBA1, 0x8AAA}, //4084 #CJK UNIFIED IDEOGRAPH + {0xBBA2, 0x8AA5}, //4085 #CJK UNIFIED IDEOGRAPH + {0xBBA3, 0x8AA8}, //4086 #CJK UNIFIED IDEOGRAPH + {0xBBA4, 0x8A98}, //4087 #CJK UNIFIED IDEOGRAPH + {0xBBA5, 0x8A91}, //4088 #CJK UNIFIED IDEOGRAPH + {0xBBA6, 0x8A9A}, //4089 #CJK UNIFIED IDEOGRAPH + {0xBBA7, 0x8AA7}, //4090 #CJK UNIFIED IDEOGRAPH + {0xBBA8, 0x8C6A}, //4091 #CJK UNIFIED IDEOGRAPH + {0xBBA9, 0x8C8D}, //4092 #CJK UNIFIED IDEOGRAPH + {0xBBAA, 0x8C8C}, //4093 #CJK UNIFIED IDEOGRAPH + {0xBBAB, 0x8CD3}, //4094 #CJK UNIFIED IDEOGRAPH + {0xBBAC, 0x8CD1}, //4095 #CJK UNIFIED IDEOGRAPH + {0xBBAD, 0x8CD2}, //4096 #CJK UNIFIED IDEOGRAPH + {0xBBAE, 0x8D6B}, //4097 #CJK UNIFIED IDEOGRAPH + {0xBBAF, 0x8D99}, //4098 #CJK UNIFIED IDEOGRAPH + {0xBBB0, 0x8D95}, //4099 #CJK UNIFIED IDEOGRAPH + {0xBBB1, 0x8DFC}, //4100 #CJK UNIFIED IDEOGRAPH + {0xBBB2, 0x8F14}, //4101 #CJK UNIFIED IDEOGRAPH + {0xBBB3, 0x8F12}, //4102 #CJK UNIFIED IDEOGRAPH + {0xBBB4, 0x8F15}, //4103 #CJK UNIFIED IDEOGRAPH + {0xBBB5, 0x8F13}, //4104 #CJK UNIFIED IDEOGRAPH + {0xBBB6, 0x8FA3}, //4105 #CJK UNIFIED IDEOGRAPH + {0xBBB7, 0x9060}, //4106 #CJK UNIFIED IDEOGRAPH + {0xBBB8, 0x9058}, //4107 #CJK UNIFIED IDEOGRAPH + {0xBBB9, 0x905C}, //4108 #CJK UNIFIED IDEOGRAPH + {0xBBBA, 0x9063}, //4109 #CJK UNIFIED IDEOGRAPH + {0xBBBB, 0x9059}, //4110 #CJK UNIFIED IDEOGRAPH + {0xBBBC, 0x905E}, //4111 #CJK UNIFIED IDEOGRAPH + {0xBBBD, 0x9062}, //4112 #CJK UNIFIED IDEOGRAPH + {0xBBBE, 0x905D}, //4113 #CJK UNIFIED IDEOGRAPH + {0xBBBF, 0x905B}, //4114 #CJK UNIFIED IDEOGRAPH + {0xBBC0, 0x9119}, //4115 #CJK UNIFIED IDEOGRAPH + {0xBBC1, 0x9118}, //4116 #CJK UNIFIED IDEOGRAPH + {0xBBC2, 0x911E}, //4117 #CJK UNIFIED IDEOGRAPH + {0xBBC3, 0x9175}, //4118 #CJK UNIFIED IDEOGRAPH + {0xBBC4, 0x9178}, //4119 #CJK UNIFIED IDEOGRAPH + {0xBBC5, 0x9177}, //4120 #CJK UNIFIED IDEOGRAPH + {0xBBC6, 0x9174}, //4121 #CJK UNIFIED IDEOGRAPH + {0xBBC7, 0x9278}, //4122 #CJK UNIFIED IDEOGRAPH + {0xBBC8, 0x9280}, //4123 #CJK UNIFIED IDEOGRAPH + {0xBBC9, 0x9285}, //4124 #CJK UNIFIED IDEOGRAPH + {0xBBCA, 0x9298}, //4125 #CJK UNIFIED IDEOGRAPH + {0xBBCB, 0x9296}, //4126 #CJK UNIFIED IDEOGRAPH + {0xBBCC, 0x927B}, //4127 #CJK UNIFIED IDEOGRAPH + {0xBBCD, 0x9293}, //4128 #CJK UNIFIED IDEOGRAPH + {0xBBCE, 0x929C}, //4129 #CJK UNIFIED IDEOGRAPH + {0xBBCF, 0x92A8}, //4130 #CJK UNIFIED IDEOGRAPH + {0xBBD0, 0x927C}, //4131 #CJK UNIFIED IDEOGRAPH + {0xBBD1, 0x9291}, //4132 #CJK UNIFIED IDEOGRAPH + {0xBBD2, 0x95A1}, //4133 #CJK UNIFIED IDEOGRAPH + {0xBBD3, 0x95A8}, //4134 #CJK UNIFIED IDEOGRAPH + {0xBBD4, 0x95A9}, //4135 #CJK UNIFIED IDEOGRAPH + {0xBBD5, 0x95A3}, //4136 #CJK UNIFIED IDEOGRAPH + {0xBBD6, 0x95A5}, //4137 #CJK UNIFIED IDEOGRAPH + {0xBBD7, 0x95A4}, //4138 #CJK UNIFIED IDEOGRAPH + {0xBBD8, 0x9699}, //4139 #CJK UNIFIED IDEOGRAPH + {0xBBD9, 0x969C}, //4140 #CJK UNIFIED IDEOGRAPH + {0xBBDA, 0x969B}, //4141 #CJK UNIFIED IDEOGRAPH + {0xBBDB, 0x96CC}, //4142 #CJK UNIFIED IDEOGRAPH + {0xBBDC, 0x96D2}, //4143 #CJK UNIFIED IDEOGRAPH + {0xBBDD, 0x9700}, //4144 #CJK UNIFIED IDEOGRAPH + {0xBBDE, 0x977C}, //4145 #CJK UNIFIED IDEOGRAPH + {0xBBDF, 0x9785}, //4146 #CJK UNIFIED IDEOGRAPH + {0xBBE0, 0x97F6}, //4147 #CJK UNIFIED IDEOGRAPH + {0xBBE1, 0x9817}, //4148 #CJK UNIFIED IDEOGRAPH + {0xBBE2, 0x9818}, //4149 #CJK UNIFIED IDEOGRAPH + {0xBBE3, 0x98AF}, //4150 #CJK UNIFIED IDEOGRAPH + {0xBBE4, 0x98B1}, //4151 #CJK UNIFIED IDEOGRAPH + {0xBBE5, 0x9903}, //4152 #CJK UNIFIED IDEOGRAPH + {0xBBE6, 0x9905}, //4153 #CJK UNIFIED IDEOGRAPH + {0xBBE7, 0x990C}, //4154 #CJK UNIFIED IDEOGRAPH + {0xBBE8, 0x9909}, //4155 #CJK UNIFIED IDEOGRAPH + {0xBBE9, 0x99C1}, //4156 #CJK UNIFIED IDEOGRAPH + {0xBBEA, 0x9AAF}, //4157 #CJK UNIFIED IDEOGRAPH + {0xBBEB, 0x9AB0}, //4158 #CJK UNIFIED IDEOGRAPH + {0xBBEC, 0x9AE6}, //4159 #CJK UNIFIED IDEOGRAPH + {0xBBED, 0x9B41}, //4160 #CJK UNIFIED IDEOGRAPH + {0xBBEE, 0x9B42}, //4161 #CJK UNIFIED IDEOGRAPH + {0xBBEF, 0x9CF4}, //4162 #CJK UNIFIED IDEOGRAPH + {0xBBF0, 0x9CF6}, //4163 #CJK UNIFIED IDEOGRAPH + {0xBBF1, 0x9CF3}, //4164 #CJK UNIFIED IDEOGRAPH + {0xBBF2, 0x9EBC}, //4165 #CJK UNIFIED IDEOGRAPH + {0xBBF3, 0x9F3B}, //4166 #CJK UNIFIED IDEOGRAPH + {0xBBF4, 0x9F4A}, //4167 #CJK UNIFIED IDEOGRAPH + {0xBBF5, 0x5104}, //4168 #CJK UNIFIED IDEOGRAPH + {0xBBF6, 0x5100}, //4169 #CJK UNIFIED IDEOGRAPH + {0xBBF7, 0x50FB}, //4170 #CJK UNIFIED IDEOGRAPH + {0xBBF8, 0x50F5}, //4171 #CJK UNIFIED IDEOGRAPH + {0xBBF9, 0x50F9}, //4172 #CJK UNIFIED IDEOGRAPH + {0xBBFA, 0x5102}, //4173 #CJK UNIFIED IDEOGRAPH + {0xBBFB, 0x5108}, //4174 #CJK UNIFIED IDEOGRAPH + {0xBBFC, 0x5109}, //4175 #CJK UNIFIED IDEOGRAPH + {0xBBFD, 0x5105}, //4176 #CJK UNIFIED IDEOGRAPH + {0xBBFE, 0x51DC}, //4177 #CJK UNIFIED IDEOGRAPH + {0xBC40, 0x5287}, //4178 #CJK UNIFIED IDEOGRAPH + {0xBC41, 0x5288}, //4179 #CJK UNIFIED IDEOGRAPH + {0xBC42, 0x5289}, //4180 #CJK UNIFIED IDEOGRAPH + {0xBC43, 0x528D}, //4181 #CJK UNIFIED IDEOGRAPH + {0xBC44, 0x528A}, //4182 #CJK UNIFIED IDEOGRAPH + {0xBC45, 0x52F0}, //4183 #CJK UNIFIED IDEOGRAPH + {0xBC46, 0x53B2}, //4184 #CJK UNIFIED IDEOGRAPH + {0xBC47, 0x562E}, //4185 #CJK UNIFIED IDEOGRAPH + {0xBC48, 0x563B}, //4186 #CJK UNIFIED IDEOGRAPH + {0xBC49, 0x5639}, //4187 #CJK UNIFIED IDEOGRAPH + {0xBC4A, 0x5632}, //4188 #CJK UNIFIED IDEOGRAPH + {0xBC4B, 0x563F}, //4189 #CJK UNIFIED IDEOGRAPH + {0xBC4C, 0x5634}, //4190 #CJK UNIFIED IDEOGRAPH + {0xBC4D, 0x5629}, //4191 #CJK UNIFIED IDEOGRAPH + {0xBC4E, 0x5653}, //4192 #CJK UNIFIED IDEOGRAPH + {0xBC4F, 0x564E}, //4193 #CJK UNIFIED IDEOGRAPH + {0xBC50, 0x5657}, //4194 #CJK UNIFIED IDEOGRAPH + {0xBC51, 0x5674}, //4195 #CJK UNIFIED IDEOGRAPH + {0xBC52, 0x5636}, //4196 #CJK UNIFIED IDEOGRAPH + {0xBC53, 0x562F}, //4197 #CJK UNIFIED IDEOGRAPH + {0xBC54, 0x5630}, //4198 #CJK UNIFIED IDEOGRAPH + {0xBC55, 0x5880}, //4199 #CJK UNIFIED IDEOGRAPH + {0xBC56, 0x589F}, //4200 #CJK UNIFIED IDEOGRAPH + {0xBC57, 0x589E}, //4201 #CJK UNIFIED IDEOGRAPH + {0xBC58, 0x58B3}, //4202 #CJK UNIFIED IDEOGRAPH + {0xBC59, 0x589C}, //4203 #CJK UNIFIED IDEOGRAPH + {0xBC5A, 0x58AE}, //4204 #CJK UNIFIED IDEOGRAPH + {0xBC5B, 0x58A9}, //4205 #CJK UNIFIED IDEOGRAPH + {0xBC5C, 0x58A6}, //4206 #CJK UNIFIED IDEOGRAPH + {0xBC5D, 0x596D}, //4207 #CJK UNIFIED IDEOGRAPH + {0xBC5E, 0x5B09}, //4208 #CJK UNIFIED IDEOGRAPH + {0xBC5F, 0x5AFB}, //4209 #CJK UNIFIED IDEOGRAPH + {0xBC60, 0x5B0B}, //4210 #CJK UNIFIED IDEOGRAPH + {0xBC61, 0x5AF5}, //4211 #CJK UNIFIED IDEOGRAPH + {0xBC62, 0x5B0C}, //4212 #CJK UNIFIED IDEOGRAPH + {0xBC63, 0x5B08}, //4213 #CJK UNIFIED IDEOGRAPH + {0xBC64, 0x5BEE}, //4214 #CJK UNIFIED IDEOGRAPH + {0xBC65, 0x5BEC}, //4215 #CJK UNIFIED IDEOGRAPH + {0xBC66, 0x5BE9}, //4216 #CJK UNIFIED IDEOGRAPH + {0xBC67, 0x5BEB}, //4217 #CJK UNIFIED IDEOGRAPH + {0xBC68, 0x5C64}, //4218 #CJK UNIFIED IDEOGRAPH + {0xBC69, 0x5C65}, //4219 #CJK UNIFIED IDEOGRAPH + {0xBC6A, 0x5D9D}, //4220 #CJK UNIFIED IDEOGRAPH + {0xBC6B, 0x5D94}, //4221 #CJK UNIFIED IDEOGRAPH + {0xBC6C, 0x5E62}, //4222 #CJK UNIFIED IDEOGRAPH + {0xBC6D, 0x5E5F}, //4223 #CJK UNIFIED IDEOGRAPH + {0xBC6E, 0x5E61}, //4224 #CJK UNIFIED IDEOGRAPH + {0xBC6F, 0x5EE2}, //4225 #CJK UNIFIED IDEOGRAPH + {0xBC70, 0x5EDA}, //4226 #CJK UNIFIED IDEOGRAPH + {0xBC71, 0x5EDF}, //4227 #CJK UNIFIED IDEOGRAPH + {0xBC72, 0x5EDD}, //4228 #CJK UNIFIED IDEOGRAPH + {0xBC73, 0x5EE3}, //4229 #CJK UNIFIED IDEOGRAPH + {0xBC74, 0x5EE0}, //4230 #CJK UNIFIED IDEOGRAPH + {0xBC75, 0x5F48}, //4231 #CJK UNIFIED IDEOGRAPH + {0xBC76, 0x5F71}, //4232 #CJK UNIFIED IDEOGRAPH + {0xBC77, 0x5FB7}, //4233 #CJK UNIFIED IDEOGRAPH + {0xBC78, 0x5FB5}, //4234 #CJK UNIFIED IDEOGRAPH + {0xBC79, 0x6176}, //4235 #CJK UNIFIED IDEOGRAPH + {0xBC7A, 0x6167}, //4236 #CJK UNIFIED IDEOGRAPH + {0xBC7B, 0x616E}, //4237 #CJK UNIFIED IDEOGRAPH + {0xBC7C, 0x615D}, //4238 #CJK UNIFIED IDEOGRAPH + {0xBC7D, 0x6155}, //4239 #CJK UNIFIED IDEOGRAPH + {0xBC7E, 0x6182}, //4240 #CJK UNIFIED IDEOGRAPH + {0xBCA1, 0x617C}, //4241 #CJK UNIFIED IDEOGRAPH + {0xBCA2, 0x6170}, //4242 #CJK UNIFIED IDEOGRAPH + {0xBCA3, 0x616B}, //4243 #CJK UNIFIED IDEOGRAPH + {0xBCA4, 0x617E}, //4244 #CJK UNIFIED IDEOGRAPH + {0xBCA5, 0x61A7}, //4245 #CJK UNIFIED IDEOGRAPH + {0xBCA6, 0x6190}, //4246 #CJK UNIFIED IDEOGRAPH + {0xBCA7, 0x61AB}, //4247 #CJK UNIFIED IDEOGRAPH + {0xBCA8, 0x618E}, //4248 #CJK UNIFIED IDEOGRAPH + {0xBCA9, 0x61AC}, //4249 #CJK UNIFIED IDEOGRAPH + {0xBCAA, 0x619A}, //4250 #CJK UNIFIED IDEOGRAPH + {0xBCAB, 0x61A4}, //4251 #CJK UNIFIED IDEOGRAPH + {0xBCAC, 0x6194}, //4252 #CJK UNIFIED IDEOGRAPH + {0xBCAD, 0x61AE}, //4253 #CJK UNIFIED IDEOGRAPH + {0xBCAE, 0x622E}, //4254 #CJK UNIFIED IDEOGRAPH + {0xBCAF, 0x6469}, //4255 #CJK UNIFIED IDEOGRAPH + {0xBCB0, 0x646F}, //4256 #CJK UNIFIED IDEOGRAPH + {0xBCB1, 0x6479}, //4257 #CJK UNIFIED IDEOGRAPH + {0xBCB2, 0x649E}, //4258 #CJK UNIFIED IDEOGRAPH + {0xBCB3, 0x64B2}, //4259 #CJK UNIFIED IDEOGRAPH + {0xBCB4, 0x6488}, //4260 #CJK UNIFIED IDEOGRAPH + {0xBCB5, 0x6490}, //4261 #CJK UNIFIED IDEOGRAPH + {0xBCB6, 0x64B0}, //4262 #CJK UNIFIED IDEOGRAPH + {0xBCB7, 0x64A5}, //4263 #CJK UNIFIED IDEOGRAPH + {0xBCB8, 0x6493}, //4264 #CJK UNIFIED IDEOGRAPH + {0xBCB9, 0x6495}, //4265 #CJK UNIFIED IDEOGRAPH + {0xBCBA, 0x64A9}, //4266 #CJK UNIFIED IDEOGRAPH + {0xBCBB, 0x6492}, //4267 #CJK UNIFIED IDEOGRAPH + {0xBCBC, 0x64AE}, //4268 #CJK UNIFIED IDEOGRAPH + {0xBCBD, 0x64AD}, //4269 #CJK UNIFIED IDEOGRAPH + {0xBCBE, 0x64AB}, //4270 #CJK UNIFIED IDEOGRAPH + {0xBCBF, 0x649A}, //4271 #CJK UNIFIED IDEOGRAPH + {0xBCC0, 0x64AC}, //4272 #CJK UNIFIED IDEOGRAPH + {0xBCC1, 0x6499}, //4273 #CJK UNIFIED IDEOGRAPH + {0xBCC2, 0x64A2}, //4274 #CJK UNIFIED IDEOGRAPH + {0xBCC3, 0x64B3}, //4275 #CJK UNIFIED IDEOGRAPH + {0xBCC4, 0x6575}, //4276 #CJK UNIFIED IDEOGRAPH + {0xBCC5, 0x6577}, //4277 #CJK UNIFIED IDEOGRAPH + {0xBCC6, 0x6578}, //4278 #CJK UNIFIED IDEOGRAPH + {0xBCC7, 0x66AE}, //4279 #CJK UNIFIED IDEOGRAPH + {0xBCC8, 0x66AB}, //4280 #CJK UNIFIED IDEOGRAPH + {0xBCC9, 0x66B4}, //4281 #CJK UNIFIED IDEOGRAPH + {0xBCCA, 0x66B1}, //4282 #CJK UNIFIED IDEOGRAPH + {0xBCCB, 0x6A23}, //4283 #CJK UNIFIED IDEOGRAPH + {0xBCCC, 0x6A1F}, //4284 #CJK UNIFIED IDEOGRAPH + {0xBCCD, 0x69E8}, //4285 #CJK UNIFIED IDEOGRAPH + {0xBCCE, 0x6A01}, //4286 #CJK UNIFIED IDEOGRAPH + {0xBCCF, 0x6A1E}, //4287 #CJK UNIFIED IDEOGRAPH + {0xBCD0, 0x6A19}, //4288 #CJK UNIFIED IDEOGRAPH + {0xBCD1, 0x69FD}, //4289 #CJK UNIFIED IDEOGRAPH + {0xBCD2, 0x6A21}, //4290 #CJK UNIFIED IDEOGRAPH + {0xBCD3, 0x6A13}, //4291 #CJK UNIFIED IDEOGRAPH + {0xBCD4, 0x6A0A}, //4292 #CJK UNIFIED IDEOGRAPH + {0xBCD5, 0x69F3}, //4293 #CJK UNIFIED IDEOGRAPH + {0xBCD6, 0x6A02}, //4294 #CJK UNIFIED IDEOGRAPH + {0xBCD7, 0x6A05}, //4295 #CJK UNIFIED IDEOGRAPH + {0xBCD8, 0x69ED}, //4296 #CJK UNIFIED IDEOGRAPH + {0xBCD9, 0x6A11}, //4297 #CJK UNIFIED IDEOGRAPH + {0xBCDA, 0x6B50}, //4298 #CJK UNIFIED IDEOGRAPH + {0xBCDB, 0x6B4E}, //4299 #CJK UNIFIED IDEOGRAPH + {0xBCDC, 0x6BA4}, //4300 #CJK UNIFIED IDEOGRAPH + {0xBCDD, 0x6BC5}, //4301 #CJK UNIFIED IDEOGRAPH + {0xBCDE, 0x6BC6}, //4302 #CJK UNIFIED IDEOGRAPH + {0xBCDF, 0x6F3F}, //4303 #CJK UNIFIED IDEOGRAPH + {0xBCE0, 0x6F7C}, //4304 #CJK UNIFIED IDEOGRAPH + {0xBCE1, 0x6F84}, //4305 #CJK UNIFIED IDEOGRAPH + {0xBCE2, 0x6F51}, //4306 #CJK UNIFIED IDEOGRAPH + {0xBCE3, 0x6F66}, //4307 #CJK UNIFIED IDEOGRAPH + {0xBCE4, 0x6F54}, //4308 #CJK UNIFIED IDEOGRAPH + {0xBCE5, 0x6F86}, //4309 #CJK UNIFIED IDEOGRAPH + {0xBCE6, 0x6F6D}, //4310 #CJK UNIFIED IDEOGRAPH + {0xBCE7, 0x6F5B}, //4311 #CJK UNIFIED IDEOGRAPH + {0xBCE8, 0x6F78}, //4312 #CJK UNIFIED IDEOGRAPH + {0xBCE9, 0x6F6E}, //4313 #CJK UNIFIED IDEOGRAPH + {0xBCEA, 0x6F8E}, //4314 #CJK UNIFIED IDEOGRAPH + {0xBCEB, 0x6F7A}, //4315 #CJK UNIFIED IDEOGRAPH + {0xBCEC, 0x6F70}, //4316 #CJK UNIFIED IDEOGRAPH + {0xBCED, 0x6F64}, //4317 #CJK UNIFIED IDEOGRAPH + {0xBCEE, 0x6F97}, //4318 #CJK UNIFIED IDEOGRAPH + {0xBCEF, 0x6F58}, //4319 #CJK UNIFIED IDEOGRAPH + {0xBCF0, 0x6ED5}, //4320 #CJK UNIFIED IDEOGRAPH + {0xBCF1, 0x6F6F}, //4321 #CJK UNIFIED IDEOGRAPH + {0xBCF2, 0x6F60}, //4322 #CJK UNIFIED IDEOGRAPH + {0xBCF3, 0x6F5F}, //4323 #CJK UNIFIED IDEOGRAPH + {0xBCF4, 0x719F}, //4324 #CJK UNIFIED IDEOGRAPH + {0xBCF5, 0x71AC}, //4325 #CJK UNIFIED IDEOGRAPH + {0xBCF6, 0x71B1}, //4326 #CJK UNIFIED IDEOGRAPH + {0xBCF7, 0x71A8}, //4327 #CJK UNIFIED IDEOGRAPH + {0xBCF8, 0x7256}, //4328 #CJK UNIFIED IDEOGRAPH + {0xBCF9, 0x729B}, //4329 #CJK UNIFIED IDEOGRAPH + {0xBCFA, 0x734E}, //4330 #CJK UNIFIED IDEOGRAPH + {0xBCFB, 0x7357}, //4331 #CJK UNIFIED IDEOGRAPH + {0xBCFC, 0x7469}, //4332 #CJK UNIFIED IDEOGRAPH + {0xBCFD, 0x748B}, //4333 #CJK UNIFIED IDEOGRAPH + {0xBCFE, 0x7483}, //4334 #CJK UNIFIED IDEOGRAPH + {0xBD40, 0x747E}, //4335 #CJK UNIFIED IDEOGRAPH + {0xBD41, 0x7480}, //4336 #CJK UNIFIED IDEOGRAPH + {0xBD42, 0x757F}, //4337 #CJK UNIFIED IDEOGRAPH + {0xBD43, 0x7620}, //4338 #CJK UNIFIED IDEOGRAPH + {0xBD44, 0x7629}, //4339 #CJK UNIFIED IDEOGRAPH + {0xBD45, 0x761F}, //4340 #CJK UNIFIED IDEOGRAPH + {0xBD46, 0x7624}, //4341 #CJK UNIFIED IDEOGRAPH + {0xBD47, 0x7626}, //4342 #CJK UNIFIED IDEOGRAPH + {0xBD48, 0x7621}, //4343 #CJK UNIFIED IDEOGRAPH + {0xBD49, 0x7622}, //4344 #CJK UNIFIED IDEOGRAPH + {0xBD4A, 0x769A}, //4345 #CJK UNIFIED IDEOGRAPH + {0xBD4B, 0x76BA}, //4346 #CJK UNIFIED IDEOGRAPH + {0xBD4C, 0x76E4}, //4347 #CJK UNIFIED IDEOGRAPH + {0xBD4D, 0x778E}, //4348 #CJK UNIFIED IDEOGRAPH + {0xBD4E, 0x7787}, //4349 #CJK UNIFIED IDEOGRAPH + {0xBD4F, 0x778C}, //4350 #CJK UNIFIED IDEOGRAPH + {0xBD50, 0x7791}, //4351 #CJK UNIFIED IDEOGRAPH + {0xBD51, 0x778B}, //4352 #CJK UNIFIED IDEOGRAPH + {0xBD52, 0x78CB}, //4353 #CJK UNIFIED IDEOGRAPH + {0xBD53, 0x78C5}, //4354 #CJK UNIFIED IDEOGRAPH + {0xBD54, 0x78BA}, //4355 #CJK UNIFIED IDEOGRAPH + {0xBD55, 0x78CA}, //4356 #CJK UNIFIED IDEOGRAPH + {0xBD56, 0x78BE}, //4357 #CJK UNIFIED IDEOGRAPH + {0xBD57, 0x78D5}, //4358 #CJK UNIFIED IDEOGRAPH + {0xBD58, 0x78BC}, //4359 #CJK UNIFIED IDEOGRAPH + {0xBD59, 0x78D0}, //4360 #CJK UNIFIED IDEOGRAPH + {0xBD5A, 0x7A3F}, //4361 #CJK UNIFIED IDEOGRAPH + {0xBD5B, 0x7A3C}, //4362 #CJK UNIFIED IDEOGRAPH + {0xBD5C, 0x7A40}, //4363 #CJK UNIFIED IDEOGRAPH + {0xBD5D, 0x7A3D}, //4364 #CJK UNIFIED IDEOGRAPH + {0xBD5E, 0x7A37}, //4365 #CJK UNIFIED IDEOGRAPH + {0xBD5F, 0x7A3B}, //4366 #CJK UNIFIED IDEOGRAPH + {0xBD60, 0x7AAF}, //4367 #CJK UNIFIED IDEOGRAPH + {0xBD61, 0x7AAE}, //4368 #CJK UNIFIED IDEOGRAPH + {0xBD62, 0x7BAD}, //4369 #CJK UNIFIED IDEOGRAPH + {0xBD63, 0x7BB1}, //4370 #CJK UNIFIED IDEOGRAPH + {0xBD64, 0x7BC4}, //4371 #CJK UNIFIED IDEOGRAPH + {0xBD65, 0x7BB4}, //4372 #CJK UNIFIED IDEOGRAPH + {0xBD66, 0x7BC6}, //4373 #CJK UNIFIED IDEOGRAPH + {0xBD67, 0x7BC7}, //4374 #CJK UNIFIED IDEOGRAPH + {0xBD68, 0x7BC1}, //4375 #CJK UNIFIED IDEOGRAPH + {0xBD69, 0x7BA0}, //4376 #CJK UNIFIED IDEOGRAPH + {0xBD6A, 0x7BCC}, //4377 #CJK UNIFIED IDEOGRAPH + {0xBD6B, 0x7CCA}, //4378 #CJK UNIFIED IDEOGRAPH + {0xBD6C, 0x7DE0}, //4379 #CJK UNIFIED IDEOGRAPH + {0xBD6D, 0x7DF4}, //4380 #CJK UNIFIED IDEOGRAPH + {0xBD6E, 0x7DEF}, //4381 #CJK UNIFIED IDEOGRAPH + {0xBD6F, 0x7DFB}, //4382 #CJK UNIFIED IDEOGRAPH + {0xBD70, 0x7DD8}, //4383 #CJK UNIFIED IDEOGRAPH + {0xBD71, 0x7DEC}, //4384 #CJK UNIFIED IDEOGRAPH + {0xBD72, 0x7DDD}, //4385 #CJK UNIFIED IDEOGRAPH + {0xBD73, 0x7DE8}, //4386 #CJK UNIFIED IDEOGRAPH + {0xBD74, 0x7DE3}, //4387 #CJK UNIFIED IDEOGRAPH + {0xBD75, 0x7DDA}, //4388 #CJK UNIFIED IDEOGRAPH + {0xBD76, 0x7DDE}, //4389 #CJK UNIFIED IDEOGRAPH + {0xBD77, 0x7DE9}, //4390 #CJK UNIFIED IDEOGRAPH + {0xBD78, 0x7D9E}, //4391 #CJK UNIFIED IDEOGRAPH + {0xBD79, 0x7DD9}, //4392 #CJK UNIFIED IDEOGRAPH + {0xBD7A, 0x7DF2}, //4393 #CJK UNIFIED IDEOGRAPH + {0xBD7B, 0x7DF9}, //4394 #CJK UNIFIED IDEOGRAPH + {0xBD7C, 0x7F75}, //4395 #CJK UNIFIED IDEOGRAPH + {0xBD7D, 0x7F77}, //4396 #CJK UNIFIED IDEOGRAPH + {0xBD7E, 0x7FAF}, //4397 #CJK UNIFIED IDEOGRAPH + {0xBDA1, 0x7FE9}, //4398 #CJK UNIFIED IDEOGRAPH + {0xBDA2, 0x8026}, //4399 #CJK UNIFIED IDEOGRAPH + {0xBDA3, 0x819B}, //4400 #CJK UNIFIED IDEOGRAPH + {0xBDA4, 0x819C}, //4401 #CJK UNIFIED IDEOGRAPH + {0xBDA5, 0x819D}, //4402 #CJK UNIFIED IDEOGRAPH + {0xBDA6, 0x81A0}, //4403 #CJK UNIFIED IDEOGRAPH + {0xBDA7, 0x819A}, //4404 #CJK UNIFIED IDEOGRAPH + {0xBDA8, 0x8198}, //4405 #CJK UNIFIED IDEOGRAPH + {0xBDA9, 0x8517}, //4406 #CJK UNIFIED IDEOGRAPH + {0xBDAA, 0x853D}, //4407 #CJK UNIFIED IDEOGRAPH + {0xBDAB, 0x851A}, //4408 #CJK UNIFIED IDEOGRAPH + {0xBDAC, 0x84EE}, //4409 #CJK UNIFIED IDEOGRAPH + {0xBDAD, 0x852C}, //4410 #CJK UNIFIED IDEOGRAPH + {0xBDAE, 0x852D}, //4411 #CJK UNIFIED IDEOGRAPH + {0xBDAF, 0x8513}, //4412 #CJK UNIFIED IDEOGRAPH + {0xBDB0, 0x8511}, //4413 #CJK UNIFIED IDEOGRAPH + {0xBDB1, 0x8523}, //4414 #CJK UNIFIED IDEOGRAPH + {0xBDB2, 0x8521}, //4415 #CJK UNIFIED IDEOGRAPH + {0xBDB3, 0x8514}, //4416 #CJK UNIFIED IDEOGRAPH + {0xBDB4, 0x84EC}, //4417 #CJK UNIFIED IDEOGRAPH + {0xBDB5, 0x8525}, //4418 #CJK UNIFIED IDEOGRAPH + {0xBDB6, 0x84FF}, //4419 #CJK UNIFIED IDEOGRAPH + {0xBDB7, 0x8506}, //4420 #CJK UNIFIED IDEOGRAPH + {0xBDB8, 0x8782}, //4421 #CJK UNIFIED IDEOGRAPH + {0xBDB9, 0x8774}, //4422 #CJK UNIFIED IDEOGRAPH + {0xBDBA, 0x8776}, //4423 #CJK UNIFIED IDEOGRAPH + {0xBDBB, 0x8760}, //4424 #CJK UNIFIED IDEOGRAPH + {0xBDBC, 0x8766}, //4425 #CJK UNIFIED IDEOGRAPH + {0xBDBD, 0x8778}, //4426 #CJK UNIFIED IDEOGRAPH + {0xBDBE, 0x8768}, //4427 #CJK UNIFIED IDEOGRAPH + {0xBDBF, 0x8759}, //4428 #CJK UNIFIED IDEOGRAPH + {0xBDC0, 0x8757}, //4429 #CJK UNIFIED IDEOGRAPH + {0xBDC1, 0x874C}, //4430 #CJK UNIFIED IDEOGRAPH + {0xBDC2, 0x8753}, //4431 #CJK UNIFIED IDEOGRAPH + {0xBDC3, 0x885B}, //4432 #CJK UNIFIED IDEOGRAPH + {0xBDC4, 0x885D}, //4433 #CJK UNIFIED IDEOGRAPH + {0xBDC5, 0x8910}, //4434 #CJK UNIFIED IDEOGRAPH + {0xBDC6, 0x8907}, //4435 #CJK UNIFIED IDEOGRAPH + {0xBDC7, 0x8912}, //4436 #CJK UNIFIED IDEOGRAPH + {0xBDC8, 0x8913}, //4437 #CJK UNIFIED IDEOGRAPH + {0xBDC9, 0x8915}, //4438 #CJK UNIFIED IDEOGRAPH + {0xBDCA, 0x890A}, //4439 #CJK UNIFIED IDEOGRAPH + {0xBDCB, 0x8ABC}, //4440 #CJK UNIFIED IDEOGRAPH + {0xBDCC, 0x8AD2}, //4441 #CJK UNIFIED IDEOGRAPH + {0xBDCD, 0x8AC7}, //4442 #CJK UNIFIED IDEOGRAPH + {0xBDCE, 0x8AC4}, //4443 #CJK UNIFIED IDEOGRAPH + {0xBDCF, 0x8A95}, //4444 #CJK UNIFIED IDEOGRAPH + {0xBDD0, 0x8ACB}, //4445 #CJK UNIFIED IDEOGRAPH + {0xBDD1, 0x8AF8}, //4446 #CJK UNIFIED IDEOGRAPH + {0xBDD2, 0x8AB2}, //4447 #CJK UNIFIED IDEOGRAPH + {0xBDD3, 0x8AC9}, //4448 #CJK UNIFIED IDEOGRAPH + {0xBDD4, 0x8AC2}, //4449 #CJK UNIFIED IDEOGRAPH + {0xBDD5, 0x8ABF}, //4450 #CJK UNIFIED IDEOGRAPH + {0xBDD6, 0x8AB0}, //4451 #CJK UNIFIED IDEOGRAPH + {0xBDD7, 0x8AD6}, //4452 #CJK UNIFIED IDEOGRAPH + {0xBDD8, 0x8ACD}, //4453 #CJK UNIFIED IDEOGRAPH + {0xBDD9, 0x8AB6}, //4454 #CJK UNIFIED IDEOGRAPH + {0xBDDA, 0x8AB9}, //4455 #CJK UNIFIED IDEOGRAPH + {0xBDDB, 0x8ADB}, //4456 #CJK UNIFIED IDEOGRAPH + {0xBDDC, 0x8C4C}, //4457 #CJK UNIFIED IDEOGRAPH + {0xBDDD, 0x8C4E}, //4458 #CJK UNIFIED IDEOGRAPH + {0xBDDE, 0x8C6C}, //4459 #CJK UNIFIED IDEOGRAPH + {0xBDDF, 0x8CE0}, //4460 #CJK UNIFIED IDEOGRAPH + {0xBDE0, 0x8CDE}, //4461 #CJK UNIFIED IDEOGRAPH + {0xBDE1, 0x8CE6}, //4462 #CJK UNIFIED IDEOGRAPH + {0xBDE2, 0x8CE4}, //4463 #CJK UNIFIED IDEOGRAPH + {0xBDE3, 0x8CEC}, //4464 #CJK UNIFIED IDEOGRAPH + {0xBDE4, 0x8CED}, //4465 #CJK UNIFIED IDEOGRAPH + {0xBDE5, 0x8CE2}, //4466 #CJK UNIFIED IDEOGRAPH + {0xBDE6, 0x8CE3}, //4467 #CJK UNIFIED IDEOGRAPH + {0xBDE7, 0x8CDC}, //4468 #CJK UNIFIED IDEOGRAPH + {0xBDE8, 0x8CEA}, //4469 #CJK UNIFIED IDEOGRAPH + {0xBDE9, 0x8CE1}, //4470 #CJK UNIFIED IDEOGRAPH + {0xBDEA, 0x8D6D}, //4471 #CJK UNIFIED IDEOGRAPH + {0xBDEB, 0x8D9F}, //4472 #CJK UNIFIED IDEOGRAPH + {0xBDEC, 0x8DA3}, //4473 #CJK UNIFIED IDEOGRAPH + {0xBDED, 0x8E2B}, //4474 #CJK UNIFIED IDEOGRAPH + {0xBDEE, 0x8E10}, //4475 #CJK UNIFIED IDEOGRAPH + {0xBDEF, 0x8E1D}, //4476 #CJK UNIFIED IDEOGRAPH + {0xBDF0, 0x8E22}, //4477 #CJK UNIFIED IDEOGRAPH + {0xBDF1, 0x8E0F}, //4478 #CJK UNIFIED IDEOGRAPH + {0xBDF2, 0x8E29}, //4479 #CJK UNIFIED IDEOGRAPH + {0xBDF3, 0x8E1F}, //4480 #CJK UNIFIED IDEOGRAPH + {0xBDF4, 0x8E21}, //4481 #CJK UNIFIED IDEOGRAPH + {0xBDF5, 0x8E1E}, //4482 #CJK UNIFIED IDEOGRAPH + {0xBDF6, 0x8EBA}, //4483 #CJK UNIFIED IDEOGRAPH + {0xBDF7, 0x8F1D}, //4484 #CJK UNIFIED IDEOGRAPH + {0xBDF8, 0x8F1B}, //4485 #CJK UNIFIED IDEOGRAPH + {0xBDF9, 0x8F1F}, //4486 #CJK UNIFIED IDEOGRAPH + {0xBDFA, 0x8F29}, //4487 #CJK UNIFIED IDEOGRAPH + {0xBDFB, 0x8F26}, //4488 #CJK UNIFIED IDEOGRAPH + {0xBDFC, 0x8F2A}, //4489 #CJK UNIFIED IDEOGRAPH + {0xBDFD, 0x8F1C}, //4490 #CJK UNIFIED IDEOGRAPH + {0xBDFE, 0x8F1E}, //4491 #CJK UNIFIED IDEOGRAPH + {0xBE40, 0x8F25}, //4492 #CJK UNIFIED IDEOGRAPH + {0xBE41, 0x9069}, //4493 #CJK UNIFIED IDEOGRAPH + {0xBE42, 0x906E}, //4494 #CJK UNIFIED IDEOGRAPH + {0xBE43, 0x9068}, //4495 #CJK UNIFIED IDEOGRAPH + {0xBE44, 0x906D}, //4496 #CJK UNIFIED IDEOGRAPH + {0xBE45, 0x9077}, //4497 #CJK UNIFIED IDEOGRAPH + {0xBE46, 0x9130}, //4498 #CJK UNIFIED IDEOGRAPH + {0xBE47, 0x912D}, //4499 #CJK UNIFIED IDEOGRAPH + {0xBE48, 0x9127}, //4500 #CJK UNIFIED IDEOGRAPH + {0xBE49, 0x9131}, //4501 #CJK UNIFIED IDEOGRAPH + {0xBE4A, 0x9187}, //4502 #CJK UNIFIED IDEOGRAPH + {0xBE4B, 0x9189}, //4503 #CJK UNIFIED IDEOGRAPH + {0xBE4C, 0x918B}, //4504 #CJK UNIFIED IDEOGRAPH + {0xBE4D, 0x9183}, //4505 #CJK UNIFIED IDEOGRAPH + {0xBE4E, 0x92C5}, //4506 #CJK UNIFIED IDEOGRAPH + {0xBE4F, 0x92BB}, //4507 #CJK UNIFIED IDEOGRAPH + {0xBE50, 0x92B7}, //4508 #CJK UNIFIED IDEOGRAPH + {0xBE51, 0x92EA}, //4509 #CJK UNIFIED IDEOGRAPH + {0xBE52, 0x92AC}, //4510 #CJK UNIFIED IDEOGRAPH + {0xBE53, 0x92E4}, //4511 #CJK UNIFIED IDEOGRAPH + {0xBE54, 0x92C1}, //4512 #CJK UNIFIED IDEOGRAPH + {0xBE55, 0x92B3}, //4513 #CJK UNIFIED IDEOGRAPH + {0xBE56, 0x92BC}, //4514 #CJK UNIFIED IDEOGRAPH + {0xBE57, 0x92D2}, //4515 #CJK UNIFIED IDEOGRAPH + {0xBE58, 0x92C7}, //4516 #CJK UNIFIED IDEOGRAPH + {0xBE59, 0x92F0}, //4517 #CJK UNIFIED IDEOGRAPH + {0xBE5A, 0x92B2}, //4518 #CJK UNIFIED IDEOGRAPH + {0xBE5B, 0x95AD}, //4519 #CJK UNIFIED IDEOGRAPH + {0xBE5C, 0x95B1}, //4520 #CJK UNIFIED IDEOGRAPH + {0xBE5D, 0x9704}, //4521 #CJK UNIFIED IDEOGRAPH + {0xBE5E, 0x9706}, //4522 #CJK UNIFIED IDEOGRAPH + {0xBE5F, 0x9707}, //4523 #CJK UNIFIED IDEOGRAPH + {0xBE60, 0x9709}, //4524 #CJK UNIFIED IDEOGRAPH + {0xBE61, 0x9760}, //4525 #CJK UNIFIED IDEOGRAPH + {0xBE62, 0x978D}, //4526 #CJK UNIFIED IDEOGRAPH + {0xBE63, 0x978B}, //4527 #CJK UNIFIED IDEOGRAPH + {0xBE64, 0x978F}, //4528 #CJK UNIFIED IDEOGRAPH + {0xBE65, 0x9821}, //4529 #CJK UNIFIED IDEOGRAPH + {0xBE66, 0x982B}, //4530 #CJK UNIFIED IDEOGRAPH + {0xBE67, 0x981C}, //4531 #CJK UNIFIED IDEOGRAPH + {0xBE68, 0x98B3}, //4532 #CJK UNIFIED IDEOGRAPH + {0xBE69, 0x990A}, //4533 #CJK UNIFIED IDEOGRAPH + {0xBE6A, 0x9913}, //4534 #CJK UNIFIED IDEOGRAPH + {0xBE6B, 0x9912}, //4535 #CJK UNIFIED IDEOGRAPH + {0xBE6C, 0x9918}, //4536 #CJK UNIFIED IDEOGRAPH + {0xBE6D, 0x99DD}, //4537 #CJK UNIFIED IDEOGRAPH + {0xBE6E, 0x99D0}, //4538 #CJK UNIFIED IDEOGRAPH + {0xBE6F, 0x99DF}, //4539 #CJK UNIFIED IDEOGRAPH + {0xBE70, 0x99DB}, //4540 #CJK UNIFIED IDEOGRAPH + {0xBE71, 0x99D1}, //4541 #CJK UNIFIED IDEOGRAPH + {0xBE72, 0x99D5}, //4542 #CJK UNIFIED IDEOGRAPH + {0xBE73, 0x99D2}, //4543 #CJK UNIFIED IDEOGRAPH + {0xBE74, 0x99D9}, //4544 #CJK UNIFIED IDEOGRAPH + {0xBE75, 0x9AB7}, //4545 #CJK UNIFIED IDEOGRAPH + {0xBE76, 0x9AEE}, //4546 #CJK UNIFIED IDEOGRAPH + {0xBE77, 0x9AEF}, //4547 #CJK UNIFIED IDEOGRAPH + {0xBE78, 0x9B27}, //4548 #CJK UNIFIED IDEOGRAPH + {0xBE79, 0x9B45}, //4549 #CJK UNIFIED IDEOGRAPH + {0xBE7A, 0x9B44}, //4550 #CJK UNIFIED IDEOGRAPH + {0xBE7B, 0x9B77}, //4551 #CJK UNIFIED IDEOGRAPH + {0xBE7C, 0x9B6F}, //4552 #CJK UNIFIED IDEOGRAPH + {0xBE7D, 0x9D06}, //4553 #CJK UNIFIED IDEOGRAPH + {0xBE7E, 0x9D09}, //4554 #CJK UNIFIED IDEOGRAPH + {0xBEA1, 0x9D03}, //4555 #CJK UNIFIED IDEOGRAPH + {0xBEA2, 0x9EA9}, //4556 #CJK UNIFIED IDEOGRAPH + {0xBEA3, 0x9EBE}, //4557 #CJK UNIFIED IDEOGRAPH + {0xBEA4, 0x9ECE}, //4558 #CJK UNIFIED IDEOGRAPH + {0xBEA5, 0x58A8}, //4559 #CJK UNIFIED IDEOGRAPH + {0xBEA6, 0x9F52}, //4560 #CJK UNIFIED IDEOGRAPH + {0xBEA7, 0x5112}, //4561 #CJK UNIFIED IDEOGRAPH + {0xBEA8, 0x5118}, //4562 #CJK UNIFIED IDEOGRAPH + {0xBEA9, 0x5114}, //4563 #CJK UNIFIED IDEOGRAPH + {0xBEAA, 0x5110}, //4564 #CJK UNIFIED IDEOGRAPH + {0xBEAB, 0x5115}, //4565 #CJK UNIFIED IDEOGRAPH + {0xBEAC, 0x5180}, //4566 #CJK UNIFIED IDEOGRAPH + {0xBEAD, 0x51AA}, //4567 #CJK UNIFIED IDEOGRAPH + {0xBEAE, 0x51DD}, //4568 #CJK UNIFIED IDEOGRAPH + {0xBEAF, 0x5291}, //4569 #CJK UNIFIED IDEOGRAPH + {0xBEB0, 0x5293}, //4570 #CJK UNIFIED IDEOGRAPH + {0xBEB1, 0x52F3}, //4571 #CJK UNIFIED IDEOGRAPH + {0xBEB2, 0x5659}, //4572 #CJK UNIFIED IDEOGRAPH + {0xBEB3, 0x566B}, //4573 #CJK UNIFIED IDEOGRAPH + {0xBEB4, 0x5679}, //4574 #CJK UNIFIED IDEOGRAPH + {0xBEB5, 0x5669}, //4575 #CJK UNIFIED IDEOGRAPH + {0xBEB6, 0x5664}, //4576 #CJK UNIFIED IDEOGRAPH + {0xBEB7, 0x5678}, //4577 #CJK UNIFIED IDEOGRAPH + {0xBEB8, 0x566A}, //4578 #CJK UNIFIED IDEOGRAPH + {0xBEB9, 0x5668}, //4579 #CJK UNIFIED IDEOGRAPH + {0xBEBA, 0x5665}, //4580 #CJK UNIFIED IDEOGRAPH + {0xBEBB, 0x5671}, //4581 #CJK UNIFIED IDEOGRAPH + {0xBEBC, 0x566F}, //4582 #CJK UNIFIED IDEOGRAPH + {0xBEBD, 0x566C}, //4583 #CJK UNIFIED IDEOGRAPH + {0xBEBE, 0x5662}, //4584 #CJK UNIFIED IDEOGRAPH + {0xBEBF, 0x5676}, //4585 #CJK UNIFIED IDEOGRAPH + {0xBEC0, 0x58C1}, //4586 #CJK UNIFIED IDEOGRAPH + {0xBEC1, 0x58BE}, //4587 #CJK UNIFIED IDEOGRAPH + {0xBEC2, 0x58C7}, //4588 #CJK UNIFIED IDEOGRAPH + {0xBEC3, 0x58C5}, //4589 #CJK UNIFIED IDEOGRAPH + {0xBEC4, 0x596E}, //4590 #CJK UNIFIED IDEOGRAPH + {0xBEC5, 0x5B1D}, //4591 #CJK UNIFIED IDEOGRAPH + {0xBEC6, 0x5B34}, //4592 #CJK UNIFIED IDEOGRAPH + {0xBEC7, 0x5B78}, //4593 #CJK UNIFIED IDEOGRAPH + {0xBEC8, 0x5BF0}, //4594 #CJK UNIFIED IDEOGRAPH + {0xBEC9, 0x5C0E}, //4595 #CJK UNIFIED IDEOGRAPH + {0xBECA, 0x5F4A}, //4596 #CJK UNIFIED IDEOGRAPH + {0xBECB, 0x61B2}, //4597 #CJK UNIFIED IDEOGRAPH + {0xBECC, 0x6191}, //4598 #CJK UNIFIED IDEOGRAPH + {0xBECD, 0x61A9}, //4599 #CJK UNIFIED IDEOGRAPH + {0xBECE, 0x618A}, //4600 #CJK UNIFIED IDEOGRAPH + {0xBECF, 0x61CD}, //4601 #CJK UNIFIED IDEOGRAPH + {0xBED0, 0x61B6}, //4602 #CJK UNIFIED IDEOGRAPH + {0xBED1, 0x61BE}, //4603 #CJK UNIFIED IDEOGRAPH + {0xBED2, 0x61CA}, //4604 #CJK UNIFIED IDEOGRAPH + {0xBED3, 0x61C8}, //4605 #CJK UNIFIED IDEOGRAPH + {0xBED4, 0x6230}, //4606 #CJK UNIFIED IDEOGRAPH + {0xBED5, 0x64C5}, //4607 #CJK UNIFIED IDEOGRAPH + {0xBED6, 0x64C1}, //4608 #CJK UNIFIED IDEOGRAPH + {0xBED7, 0x64CB}, //4609 #CJK UNIFIED IDEOGRAPH + {0xBED8, 0x64BB}, //4610 #CJK UNIFIED IDEOGRAPH + {0xBED9, 0x64BC}, //4611 #CJK UNIFIED IDEOGRAPH + {0xBEDA, 0x64DA}, //4612 #CJK UNIFIED IDEOGRAPH + {0xBEDB, 0x64C4}, //4613 #CJK UNIFIED IDEOGRAPH + {0xBEDC, 0x64C7}, //4614 #CJK UNIFIED IDEOGRAPH + {0xBEDD, 0x64C2}, //4615 #CJK UNIFIED IDEOGRAPH + {0xBEDE, 0x64CD}, //4616 #CJK UNIFIED IDEOGRAPH + {0xBEDF, 0x64BF}, //4617 #CJK UNIFIED IDEOGRAPH + {0xBEE0, 0x64D2}, //4618 #CJK UNIFIED IDEOGRAPH + {0xBEE1, 0x64D4}, //4619 #CJK UNIFIED IDEOGRAPH + {0xBEE2, 0x64BE}, //4620 #CJK UNIFIED IDEOGRAPH + {0xBEE3, 0x6574}, //4621 #CJK UNIFIED IDEOGRAPH + {0xBEE4, 0x66C6}, //4622 #CJK UNIFIED IDEOGRAPH + {0xBEE5, 0x66C9}, //4623 #CJK UNIFIED IDEOGRAPH + {0xBEE6, 0x66B9}, //4624 #CJK UNIFIED IDEOGRAPH + {0xBEE7, 0x66C4}, //4625 #CJK UNIFIED IDEOGRAPH + {0xBEE8, 0x66C7}, //4626 #CJK UNIFIED IDEOGRAPH + {0xBEE9, 0x66B8}, //4627 #CJK UNIFIED IDEOGRAPH + {0xBEEA, 0x6A3D}, //4628 #CJK UNIFIED IDEOGRAPH + {0xBEEB, 0x6A38}, //4629 #CJK UNIFIED IDEOGRAPH + {0xBEEC, 0x6A3A}, //4630 #CJK UNIFIED IDEOGRAPH + {0xBEED, 0x6A59}, //4631 #CJK UNIFIED IDEOGRAPH + {0xBEEE, 0x6A6B}, //4632 #CJK UNIFIED IDEOGRAPH + {0xBEEF, 0x6A58}, //4633 #CJK UNIFIED IDEOGRAPH + {0xBEF0, 0x6A39}, //4634 #CJK UNIFIED IDEOGRAPH + {0xBEF1, 0x6A44}, //4635 #CJK UNIFIED IDEOGRAPH + {0xBEF2, 0x6A62}, //4636 #CJK UNIFIED IDEOGRAPH + {0xBEF3, 0x6A61}, //4637 #CJK UNIFIED IDEOGRAPH + {0xBEF4, 0x6A4B}, //4638 #CJK UNIFIED IDEOGRAPH + {0xBEF5, 0x6A47}, //4639 #CJK UNIFIED IDEOGRAPH + {0xBEF6, 0x6A35}, //4640 #CJK UNIFIED IDEOGRAPH + {0xBEF7, 0x6A5F}, //4641 #CJK UNIFIED IDEOGRAPH + {0xBEF8, 0x6A48}, //4642 #CJK UNIFIED IDEOGRAPH + {0xBEF9, 0x6B59}, //4643 #CJK UNIFIED IDEOGRAPH + {0xBEFA, 0x6B77}, //4644 #CJK UNIFIED IDEOGRAPH + {0xBEFB, 0x6C05}, //4645 #CJK UNIFIED IDEOGRAPH + {0xBEFC, 0x6FC2}, //4646 #CJK UNIFIED IDEOGRAPH + {0xBEFD, 0x6FB1}, //4647 #CJK UNIFIED IDEOGRAPH + {0xBEFE, 0x6FA1}, //4648 #CJK UNIFIED IDEOGRAPH + {0xBF40, 0x6FC3}, //4649 #CJK UNIFIED IDEOGRAPH + {0xBF41, 0x6FA4}, //4650 #CJK UNIFIED IDEOGRAPH + {0xBF42, 0x6FC1}, //4651 #CJK UNIFIED IDEOGRAPH + {0xBF43, 0x6FA7}, //4652 #CJK UNIFIED IDEOGRAPH + {0xBF44, 0x6FB3}, //4653 #CJK UNIFIED IDEOGRAPH + {0xBF45, 0x6FC0}, //4654 #CJK UNIFIED IDEOGRAPH + {0xBF46, 0x6FB9}, //4655 #CJK UNIFIED IDEOGRAPH + {0xBF47, 0x6FB6}, //4656 #CJK UNIFIED IDEOGRAPH + {0xBF48, 0x6FA6}, //4657 #CJK UNIFIED IDEOGRAPH + {0xBF49, 0x6FA0}, //4658 #CJK UNIFIED IDEOGRAPH + {0xBF4A, 0x6FB4}, //4659 #CJK UNIFIED IDEOGRAPH + {0xBF4B, 0x71BE}, //4660 #CJK UNIFIED IDEOGRAPH + {0xBF4C, 0x71C9}, //4661 #CJK UNIFIED IDEOGRAPH + {0xBF4D, 0x71D0}, //4662 #CJK UNIFIED IDEOGRAPH + {0xBF4E, 0x71D2}, //4663 #CJK UNIFIED IDEOGRAPH + {0xBF4F, 0x71C8}, //4664 #CJK UNIFIED IDEOGRAPH + {0xBF50, 0x71D5}, //4665 #CJK UNIFIED IDEOGRAPH + {0xBF51, 0x71B9}, //4666 #CJK UNIFIED IDEOGRAPH + {0xBF52, 0x71CE}, //4667 #CJK UNIFIED IDEOGRAPH + {0xBF53, 0x71D9}, //4668 #CJK UNIFIED IDEOGRAPH + {0xBF54, 0x71DC}, //4669 #CJK UNIFIED IDEOGRAPH + {0xBF55, 0x71C3}, //4670 #CJK UNIFIED IDEOGRAPH + {0xBF56, 0x71C4}, //4671 #CJK UNIFIED IDEOGRAPH + {0xBF57, 0x7368}, //4672 #CJK UNIFIED IDEOGRAPH + {0xBF58, 0x749C}, //4673 #CJK UNIFIED IDEOGRAPH + {0xBF59, 0x74A3}, //4674 #CJK UNIFIED IDEOGRAPH + {0xBF5A, 0x7498}, //4675 #CJK UNIFIED IDEOGRAPH + {0xBF5B, 0x749F}, //4676 #CJK UNIFIED IDEOGRAPH + {0xBF5C, 0x749E}, //4677 #CJK UNIFIED IDEOGRAPH + {0xBF5D, 0x74E2}, //4678 #CJK UNIFIED IDEOGRAPH + {0xBF5E, 0x750C}, //4679 #CJK UNIFIED IDEOGRAPH + {0xBF5F, 0x750D}, //4680 #CJK UNIFIED IDEOGRAPH + {0xBF60, 0x7634}, //4681 #CJK UNIFIED IDEOGRAPH + {0xBF61, 0x7638}, //4682 #CJK UNIFIED IDEOGRAPH + {0xBF62, 0x763A}, //4683 #CJK UNIFIED IDEOGRAPH + {0xBF63, 0x76E7}, //4684 #CJK UNIFIED IDEOGRAPH + {0xBF64, 0x76E5}, //4685 #CJK UNIFIED IDEOGRAPH + {0xBF65, 0x77A0}, //4686 #CJK UNIFIED IDEOGRAPH + {0xBF66, 0x779E}, //4687 #CJK UNIFIED IDEOGRAPH + {0xBF67, 0x779F}, //4688 #CJK UNIFIED IDEOGRAPH + {0xBF68, 0x77A5}, //4689 #CJK UNIFIED IDEOGRAPH + {0xBF69, 0x78E8}, //4690 #CJK UNIFIED IDEOGRAPH + {0xBF6A, 0x78DA}, //4691 #CJK UNIFIED IDEOGRAPH + {0xBF6B, 0x78EC}, //4692 #CJK UNIFIED IDEOGRAPH + {0xBF6C, 0x78E7}, //4693 #CJK UNIFIED IDEOGRAPH + {0xBF6D, 0x79A6}, //4694 #CJK UNIFIED IDEOGRAPH + {0xBF6E, 0x7A4D}, //4695 #CJK UNIFIED IDEOGRAPH + {0xBF6F, 0x7A4E}, //4696 #CJK UNIFIED IDEOGRAPH + {0xBF70, 0x7A46}, //4697 #CJK UNIFIED IDEOGRAPH + {0xBF71, 0x7A4C}, //4698 #CJK UNIFIED IDEOGRAPH + {0xBF72, 0x7A4B}, //4699 #CJK UNIFIED IDEOGRAPH + {0xBF73, 0x7ABA}, //4700 #CJK UNIFIED IDEOGRAPH + {0xBF74, 0x7BD9}, //4701 #CJK UNIFIED IDEOGRAPH + {0xBF75, 0x7C11}, //4702 #CJK UNIFIED IDEOGRAPH + {0xBF76, 0x7BC9}, //4703 #CJK UNIFIED IDEOGRAPH + {0xBF77, 0x7BE4}, //4704 #CJK UNIFIED IDEOGRAPH + {0xBF78, 0x7BDB}, //4705 #CJK UNIFIED IDEOGRAPH + {0xBF79, 0x7BE1}, //4706 #CJK UNIFIED IDEOGRAPH + {0xBF7A, 0x7BE9}, //4707 #CJK UNIFIED IDEOGRAPH + {0xBF7B, 0x7BE6}, //4708 #CJK UNIFIED IDEOGRAPH + {0xBF7C, 0x7CD5}, //4709 #CJK UNIFIED IDEOGRAPH + {0xBF7D, 0x7CD6}, //4710 #CJK UNIFIED IDEOGRAPH + {0xBF7E, 0x7E0A}, //4711 #CJK UNIFIED IDEOGRAPH + {0xBFA1, 0x7E11}, //4712 #CJK UNIFIED IDEOGRAPH + {0xBFA2, 0x7E08}, //4713 #CJK UNIFIED IDEOGRAPH + {0xBFA3, 0x7E1B}, //4714 #CJK UNIFIED IDEOGRAPH + {0xBFA4, 0x7E23}, //4715 #CJK UNIFIED IDEOGRAPH + {0xBFA5, 0x7E1E}, //4716 #CJK UNIFIED IDEOGRAPH + {0xBFA6, 0x7E1D}, //4717 #CJK UNIFIED IDEOGRAPH + {0xBFA7, 0x7E09}, //4718 #CJK UNIFIED IDEOGRAPH + {0xBFA8, 0x7E10}, //4719 #CJK UNIFIED IDEOGRAPH + {0xBFA9, 0x7F79}, //4720 #CJK UNIFIED IDEOGRAPH + {0xBFAA, 0x7FB2}, //4721 #CJK UNIFIED IDEOGRAPH + {0xBFAB, 0x7FF0}, //4722 #CJK UNIFIED IDEOGRAPH + {0xBFAC, 0x7FF1}, //4723 #CJK UNIFIED IDEOGRAPH + {0xBFAD, 0x7FEE}, //4724 #CJK UNIFIED IDEOGRAPH + {0xBFAE, 0x8028}, //4725 #CJK UNIFIED IDEOGRAPH + {0xBFAF, 0x81B3}, //4726 #CJK UNIFIED IDEOGRAPH + {0xBFB0, 0x81A9}, //4727 #CJK UNIFIED IDEOGRAPH + {0xBFB1, 0x81A8}, //4728 #CJK UNIFIED IDEOGRAPH + {0xBFB2, 0x81FB}, //4729 #CJK UNIFIED IDEOGRAPH + {0xBFB3, 0x8208}, //4730 #CJK UNIFIED IDEOGRAPH + {0xBFB4, 0x8258}, //4731 #CJK UNIFIED IDEOGRAPH + {0xBFB5, 0x8259}, //4732 #CJK UNIFIED IDEOGRAPH + {0xBFB6, 0x854A}, //4733 #CJK UNIFIED IDEOGRAPH + {0xBFB7, 0x8559}, //4734 #CJK UNIFIED IDEOGRAPH + {0xBFB8, 0x8548}, //4735 #CJK UNIFIED IDEOGRAPH + {0xBFB9, 0x8568}, //4736 #CJK UNIFIED IDEOGRAPH + {0xBFBA, 0x8569}, //4737 #CJK UNIFIED IDEOGRAPH + {0xBFBB, 0x8543}, //4738 #CJK UNIFIED IDEOGRAPH + {0xBFBC, 0x8549}, //4739 #CJK UNIFIED IDEOGRAPH + {0xBFBD, 0x856D}, //4740 #CJK UNIFIED IDEOGRAPH + {0xBFBE, 0x856A}, //4741 #CJK UNIFIED IDEOGRAPH + {0xBFBF, 0x855E}, //4742 #CJK UNIFIED IDEOGRAPH + {0xBFC0, 0x8783}, //4743 #CJK UNIFIED IDEOGRAPH + {0xBFC1, 0x879F}, //4744 #CJK UNIFIED IDEOGRAPH + {0xBFC2, 0x879E}, //4745 #CJK UNIFIED IDEOGRAPH + {0xBFC3, 0x87A2}, //4746 #CJK UNIFIED IDEOGRAPH + {0xBFC4, 0x878D}, //4747 #CJK UNIFIED IDEOGRAPH + {0xBFC5, 0x8861}, //4748 #CJK UNIFIED IDEOGRAPH + {0xBFC6, 0x892A}, //4749 #CJK UNIFIED IDEOGRAPH + {0xBFC7, 0x8932}, //4750 #CJK UNIFIED IDEOGRAPH + {0xBFC8, 0x8925}, //4751 #CJK UNIFIED IDEOGRAPH + {0xBFC9, 0x892B}, //4752 #CJK UNIFIED IDEOGRAPH + {0xBFCA, 0x8921}, //4753 #CJK UNIFIED IDEOGRAPH + {0xBFCB, 0x89AA}, //4754 #CJK UNIFIED IDEOGRAPH + {0xBFCC, 0x89A6}, //4755 #CJK UNIFIED IDEOGRAPH + {0xBFCD, 0x8AE6}, //4756 #CJK UNIFIED IDEOGRAPH + {0xBFCE, 0x8AFA}, //4757 #CJK UNIFIED IDEOGRAPH + {0xBFCF, 0x8AEB}, //4758 #CJK UNIFIED IDEOGRAPH + {0xBFD0, 0x8AF1}, //4759 #CJK UNIFIED IDEOGRAPH + {0xBFD1, 0x8B00}, //4760 #CJK UNIFIED IDEOGRAPH + {0xBFD2, 0x8ADC}, //4761 #CJK UNIFIED IDEOGRAPH + {0xBFD3, 0x8AE7}, //4762 #CJK UNIFIED IDEOGRAPH + {0xBFD4, 0x8AEE}, //4763 #CJK UNIFIED IDEOGRAPH + {0xBFD5, 0x8AFE}, //4764 #CJK UNIFIED IDEOGRAPH + {0xBFD6, 0x8B01}, //4765 #CJK UNIFIED IDEOGRAPH + {0xBFD7, 0x8B02}, //4766 #CJK UNIFIED IDEOGRAPH + {0xBFD8, 0x8AF7}, //4767 #CJK UNIFIED IDEOGRAPH + {0xBFD9, 0x8AED}, //4768 #CJK UNIFIED IDEOGRAPH + {0xBFDA, 0x8AF3}, //4769 #CJK UNIFIED IDEOGRAPH + {0xBFDB, 0x8AF6}, //4770 #CJK UNIFIED IDEOGRAPH + {0xBFDC, 0x8AFC}, //4771 #CJK UNIFIED IDEOGRAPH + {0xBFDD, 0x8C6B}, //4772 #CJK UNIFIED IDEOGRAPH + {0xBFDE, 0x8C6D}, //4773 #CJK UNIFIED IDEOGRAPH + {0xBFDF, 0x8C93}, //4774 #CJK UNIFIED IDEOGRAPH + {0xBFE0, 0x8CF4}, //4775 #CJK UNIFIED IDEOGRAPH + {0xBFE1, 0x8E44}, //4776 #CJK UNIFIED IDEOGRAPH + {0xBFE2, 0x8E31}, //4777 #CJK UNIFIED IDEOGRAPH + {0xBFE3, 0x8E34}, //4778 #CJK UNIFIED IDEOGRAPH + {0xBFE4, 0x8E42}, //4779 #CJK UNIFIED IDEOGRAPH + {0xBFE5, 0x8E39}, //4780 #CJK UNIFIED IDEOGRAPH + {0xBFE6, 0x8E35}, //4781 #CJK UNIFIED IDEOGRAPH + {0xBFE7, 0x8F3B}, //4782 #CJK UNIFIED IDEOGRAPH + {0xBFE8, 0x8F2F}, //4783 #CJK UNIFIED IDEOGRAPH + {0xBFE9, 0x8F38}, //4784 #CJK UNIFIED IDEOGRAPH + {0xBFEA, 0x8F33}, //4785 #CJK UNIFIED IDEOGRAPH + {0xBFEB, 0x8FA8}, //4786 #CJK UNIFIED IDEOGRAPH + {0xBFEC, 0x8FA6}, //4787 #CJK UNIFIED IDEOGRAPH + {0xBFED, 0x9075}, //4788 #CJK UNIFIED IDEOGRAPH + {0xBFEE, 0x9074}, //4789 #CJK UNIFIED IDEOGRAPH + {0xBFEF, 0x9078}, //4790 #CJK UNIFIED IDEOGRAPH + {0xBFF0, 0x9072}, //4791 #CJK UNIFIED IDEOGRAPH + {0xBFF1, 0x907C}, //4792 #CJK UNIFIED IDEOGRAPH + {0xBFF2, 0x907A}, //4793 #CJK UNIFIED IDEOGRAPH + {0xBFF3, 0x9134}, //4794 #CJK UNIFIED IDEOGRAPH + {0xBFF4, 0x9192}, //4795 #CJK UNIFIED IDEOGRAPH + {0xBFF5, 0x9320}, //4796 #CJK UNIFIED IDEOGRAPH + {0xBFF6, 0x9336}, //4797 #CJK UNIFIED IDEOGRAPH + {0xBFF7, 0x92F8}, //4798 #CJK UNIFIED IDEOGRAPH + {0xBFF8, 0x9333}, //4799 #CJK UNIFIED IDEOGRAPH + {0xBFF9, 0x932F}, //4800 #CJK UNIFIED IDEOGRAPH + {0xBFFA, 0x9322}, //4801 #CJK UNIFIED IDEOGRAPH + {0xBFFB, 0x92FC}, //4802 #CJK UNIFIED IDEOGRAPH + {0xBFFC, 0x932B}, //4803 #CJK UNIFIED IDEOGRAPH + {0xBFFD, 0x9304}, //4804 #CJK UNIFIED IDEOGRAPH + {0xBFFE, 0x931A}, //4805 #CJK UNIFIED IDEOGRAPH + {0xC040, 0x9310}, //4806 #CJK UNIFIED IDEOGRAPH + {0xC041, 0x9326}, //4807 #CJK UNIFIED IDEOGRAPH + {0xC042, 0x9321}, //4808 #CJK UNIFIED IDEOGRAPH + {0xC043, 0x9315}, //4809 #CJK UNIFIED IDEOGRAPH + {0xC044, 0x932E}, //4810 #CJK UNIFIED IDEOGRAPH + {0xC045, 0x9319}, //4811 #CJK UNIFIED IDEOGRAPH + {0xC046, 0x95BB}, //4812 #CJK UNIFIED IDEOGRAPH + {0xC047, 0x96A7}, //4813 #CJK UNIFIED IDEOGRAPH + {0xC048, 0x96A8}, //4814 #CJK UNIFIED IDEOGRAPH + {0xC049, 0x96AA}, //4815 #CJK UNIFIED IDEOGRAPH + {0xC04A, 0x96D5}, //4816 #CJK UNIFIED IDEOGRAPH + {0xC04B, 0x970E}, //4817 #CJK UNIFIED IDEOGRAPH + {0xC04C, 0x9711}, //4818 #CJK UNIFIED IDEOGRAPH + {0xC04D, 0x9716}, //4819 #CJK UNIFIED IDEOGRAPH + {0xC04E, 0x970D}, //4820 #CJK UNIFIED IDEOGRAPH + {0xC04F, 0x9713}, //4821 #CJK UNIFIED IDEOGRAPH + {0xC050, 0x970F}, //4822 #CJK UNIFIED IDEOGRAPH + {0xC051, 0x975B}, //4823 #CJK UNIFIED IDEOGRAPH + {0xC052, 0x975C}, //4824 #CJK UNIFIED IDEOGRAPH + {0xC053, 0x9766}, //4825 #CJK UNIFIED IDEOGRAPH + {0xC054, 0x9798}, //4826 #CJK UNIFIED IDEOGRAPH + {0xC055, 0x9830}, //4827 #CJK UNIFIED IDEOGRAPH + {0xC056, 0x9838}, //4828 #CJK UNIFIED IDEOGRAPH + {0xC057, 0x983B}, //4829 #CJK UNIFIED IDEOGRAPH + {0xC058, 0x9837}, //4830 #CJK UNIFIED IDEOGRAPH + {0xC059, 0x982D}, //4831 #CJK UNIFIED IDEOGRAPH + {0xC05A, 0x9839}, //4832 #CJK UNIFIED IDEOGRAPH + {0xC05B, 0x9824}, //4833 #CJK UNIFIED IDEOGRAPH + {0xC05C, 0x9910}, //4834 #CJK UNIFIED IDEOGRAPH + {0xC05D, 0x9928}, //4835 #CJK UNIFIED IDEOGRAPH + {0xC05E, 0x991E}, //4836 #CJK UNIFIED IDEOGRAPH + {0xC05F, 0x991B}, //4837 #CJK UNIFIED IDEOGRAPH + {0xC060, 0x9921}, //4838 #CJK UNIFIED IDEOGRAPH + {0xC061, 0x991A}, //4839 #CJK UNIFIED IDEOGRAPH + {0xC062, 0x99ED}, //4840 #CJK UNIFIED IDEOGRAPH + {0xC063, 0x99E2}, //4841 #CJK UNIFIED IDEOGRAPH + {0xC064, 0x99F1}, //4842 #CJK UNIFIED IDEOGRAPH + {0xC065, 0x9AB8}, //4843 #CJK UNIFIED IDEOGRAPH + {0xC066, 0x9ABC}, //4844 #CJK UNIFIED IDEOGRAPH + {0xC067, 0x9AFB}, //4845 #CJK UNIFIED IDEOGRAPH + {0xC068, 0x9AED}, //4846 #CJK UNIFIED IDEOGRAPH + {0xC069, 0x9B28}, //4847 #CJK UNIFIED IDEOGRAPH + {0xC06A, 0x9B91}, //4848 #CJK UNIFIED IDEOGRAPH + {0xC06B, 0x9D15}, //4849 #CJK UNIFIED IDEOGRAPH + {0xC06C, 0x9D23}, //4850 #CJK UNIFIED IDEOGRAPH + {0xC06D, 0x9D26}, //4851 #CJK UNIFIED IDEOGRAPH + {0xC06E, 0x9D28}, //4852 #CJK UNIFIED IDEOGRAPH + {0xC06F, 0x9D12}, //4853 #CJK UNIFIED IDEOGRAPH + {0xC070, 0x9D1B}, //4854 #CJK UNIFIED IDEOGRAPH + {0xC071, 0x9ED8}, //4855 #CJK UNIFIED IDEOGRAPH + {0xC072, 0x9ED4}, //4856 #CJK UNIFIED IDEOGRAPH + {0xC073, 0x9F8D}, //4857 #CJK UNIFIED IDEOGRAPH + {0xC074, 0x9F9C}, //4858 #CJK UNIFIED IDEOGRAPH + {0xC075, 0x512A}, //4859 #CJK UNIFIED IDEOGRAPH + {0xC076, 0x511F}, //4860 #CJK UNIFIED IDEOGRAPH + {0xC077, 0x5121}, //4861 #CJK UNIFIED IDEOGRAPH + {0xC078, 0x5132}, //4862 #CJK UNIFIED IDEOGRAPH + {0xC079, 0x52F5}, //4863 #CJK UNIFIED IDEOGRAPH + {0xC07A, 0x568E}, //4864 #CJK UNIFIED IDEOGRAPH + {0xC07B, 0x5680}, //4865 #CJK UNIFIED IDEOGRAPH + {0xC07C, 0x5690}, //4866 #CJK UNIFIED IDEOGRAPH + {0xC07D, 0x5685}, //4867 #CJK UNIFIED IDEOGRAPH + {0xC07E, 0x5687}, //4868 #CJK UNIFIED IDEOGRAPH + {0xC0A1, 0x568F}, //4869 #CJK UNIFIED IDEOGRAPH + {0xC0A2, 0x58D5}, //4870 #CJK UNIFIED IDEOGRAPH + {0xC0A3, 0x58D3}, //4871 #CJK UNIFIED IDEOGRAPH + {0xC0A4, 0x58D1}, //4872 #CJK UNIFIED IDEOGRAPH + {0xC0A5, 0x58CE}, //4873 #CJK UNIFIED IDEOGRAPH + {0xC0A6, 0x5B30}, //4874 #CJK UNIFIED IDEOGRAPH + {0xC0A7, 0x5B2A}, //4875 #CJK UNIFIED IDEOGRAPH + {0xC0A8, 0x5B24}, //4876 #CJK UNIFIED IDEOGRAPH + {0xC0A9, 0x5B7A}, //4877 #CJK UNIFIED IDEOGRAPH + {0xC0AA, 0x5C37}, //4878 #CJK UNIFIED IDEOGRAPH + {0xC0AB, 0x5C68}, //4879 #CJK UNIFIED IDEOGRAPH + {0xC0AC, 0x5DBC}, //4880 #CJK UNIFIED IDEOGRAPH + {0xC0AD, 0x5DBA}, //4881 #CJK UNIFIED IDEOGRAPH + {0xC0AE, 0x5DBD}, //4882 #CJK UNIFIED IDEOGRAPH + {0xC0AF, 0x5DB8}, //4883 #CJK UNIFIED IDEOGRAPH + {0xC0B0, 0x5E6B}, //4884 #CJK UNIFIED IDEOGRAPH + {0xC0B1, 0x5F4C}, //4885 #CJK UNIFIED IDEOGRAPH + {0xC0B2, 0x5FBD}, //4886 #CJK UNIFIED IDEOGRAPH + {0xC0B3, 0x61C9}, //4887 #CJK UNIFIED IDEOGRAPH + {0xC0B4, 0x61C2}, //4888 #CJK UNIFIED IDEOGRAPH + {0xC0B5, 0x61C7}, //4889 #CJK UNIFIED IDEOGRAPH + {0xC0B6, 0x61E6}, //4890 #CJK UNIFIED IDEOGRAPH + {0xC0B7, 0x61CB}, //4891 #CJK UNIFIED IDEOGRAPH + {0xC0B8, 0x6232}, //4892 #CJK UNIFIED IDEOGRAPH + {0xC0B9, 0x6234}, //4893 #CJK UNIFIED IDEOGRAPH + {0xC0BA, 0x64CE}, //4894 #CJK UNIFIED IDEOGRAPH + {0xC0BB, 0x64CA}, //4895 #CJK UNIFIED IDEOGRAPH + {0xC0BC, 0x64D8}, //4896 #CJK UNIFIED IDEOGRAPH + {0xC0BD, 0x64E0}, //4897 #CJK UNIFIED IDEOGRAPH + {0xC0BE, 0x64F0}, //4898 #CJK UNIFIED IDEOGRAPH + {0xC0BF, 0x64E6}, //4899 #CJK UNIFIED IDEOGRAPH + {0xC0C0, 0x64EC}, //4900 #CJK UNIFIED IDEOGRAPH + {0xC0C1, 0x64F1}, //4901 #CJK UNIFIED IDEOGRAPH + {0xC0C2, 0x64E2}, //4902 #CJK UNIFIED IDEOGRAPH + {0xC0C3, 0x64ED}, //4903 #CJK UNIFIED IDEOGRAPH + {0xC0C4, 0x6582}, //4904 #CJK UNIFIED IDEOGRAPH + {0xC0C5, 0x6583}, //4905 #CJK UNIFIED IDEOGRAPH + {0xC0C6, 0x66D9}, //4906 #CJK UNIFIED IDEOGRAPH + {0xC0C7, 0x66D6}, //4907 #CJK UNIFIED IDEOGRAPH + {0xC0C8, 0x6A80}, //4908 #CJK UNIFIED IDEOGRAPH + {0xC0C9, 0x6A94}, //4909 #CJK UNIFIED IDEOGRAPH + {0xC0CA, 0x6A84}, //4910 #CJK UNIFIED IDEOGRAPH + {0xC0CB, 0x6AA2}, //4911 #CJK UNIFIED IDEOGRAPH + {0xC0CC, 0x6A9C}, //4912 #CJK UNIFIED IDEOGRAPH + {0xC0CD, 0x6ADB}, //4913 #CJK UNIFIED IDEOGRAPH + {0xC0CE, 0x6AA3}, //4914 #CJK UNIFIED IDEOGRAPH + {0xC0CF, 0x6A7E}, //4915 #CJK UNIFIED IDEOGRAPH + {0xC0D0, 0x6A97}, //4916 #CJK UNIFIED IDEOGRAPH + {0xC0D1, 0x6A90}, //4917 #CJK UNIFIED IDEOGRAPH + {0xC0D2, 0x6AA0}, //4918 #CJK UNIFIED IDEOGRAPH + {0xC0D3, 0x6B5C}, //4919 #CJK UNIFIED IDEOGRAPH + {0xC0D4, 0x6BAE}, //4920 #CJK UNIFIED IDEOGRAPH + {0xC0D5, 0x6BDA}, //4921 #CJK UNIFIED IDEOGRAPH + {0xC0D6, 0x6C08}, //4922 #CJK UNIFIED IDEOGRAPH + {0xC0D7, 0x6FD8}, //4923 #CJK UNIFIED IDEOGRAPH + {0xC0D8, 0x6FF1}, //4924 #CJK UNIFIED IDEOGRAPH + {0xC0D9, 0x6FDF}, //4925 #CJK UNIFIED IDEOGRAPH + {0xC0DA, 0x6FE0}, //4926 #CJK UNIFIED IDEOGRAPH + {0xC0DB, 0x6FDB}, //4927 #CJK UNIFIED IDEOGRAPH + {0xC0DC, 0x6FE4}, //4928 #CJK UNIFIED IDEOGRAPH + {0xC0DD, 0x6FEB}, //4929 #CJK UNIFIED IDEOGRAPH + {0xC0DE, 0x6FEF}, //4930 #CJK UNIFIED IDEOGRAPH + {0xC0DF, 0x6F80}, //4931 #CJK UNIFIED IDEOGRAPH + {0xC0E0, 0x6FEC}, //4932 #CJK UNIFIED IDEOGRAPH + {0xC0E1, 0x6FE1}, //4933 #CJK UNIFIED IDEOGRAPH + {0xC0E2, 0x6FE9}, //4934 #CJK UNIFIED IDEOGRAPH + {0xC0E3, 0x6FD5}, //4935 #CJK UNIFIED IDEOGRAPH + {0xC0E4, 0x6FEE}, //4936 #CJK UNIFIED IDEOGRAPH + {0xC0E5, 0x6FF0}, //4937 #CJK UNIFIED IDEOGRAPH + {0xC0E6, 0x71E7}, //4938 #CJK UNIFIED IDEOGRAPH + {0xC0E7, 0x71DF}, //4939 #CJK UNIFIED IDEOGRAPH + {0xC0E8, 0x71EE}, //4940 #CJK UNIFIED IDEOGRAPH + {0xC0E9, 0x71E6}, //4941 #CJK UNIFIED IDEOGRAPH + {0xC0EA, 0x71E5}, //4942 #CJK UNIFIED IDEOGRAPH + {0xC0EB, 0x71ED}, //4943 #CJK UNIFIED IDEOGRAPH + {0xC0EC, 0x71EC}, //4944 #CJK UNIFIED IDEOGRAPH + {0xC0ED, 0x71F4}, //4945 #CJK UNIFIED IDEOGRAPH + {0xC0EE, 0x71E0}, //4946 #CJK UNIFIED IDEOGRAPH + {0xC0EF, 0x7235}, //4947 #CJK UNIFIED IDEOGRAPH + {0xC0F0, 0x7246}, //4948 #CJK UNIFIED IDEOGRAPH + {0xC0F1, 0x7370}, //4949 #CJK UNIFIED IDEOGRAPH + {0xC0F2, 0x7372}, //4950 #CJK UNIFIED IDEOGRAPH + {0xC0F3, 0x74A9}, //4951 #CJK UNIFIED IDEOGRAPH + {0xC0F4, 0x74B0}, //4952 #CJK UNIFIED IDEOGRAPH + {0xC0F5, 0x74A6}, //4953 #CJK UNIFIED IDEOGRAPH + {0xC0F6, 0x74A8}, //4954 #CJK UNIFIED IDEOGRAPH + {0xC0F7, 0x7646}, //4955 #CJK UNIFIED IDEOGRAPH + {0xC0F8, 0x7642}, //4956 #CJK UNIFIED IDEOGRAPH + {0xC0F9, 0x764C}, //4957 #CJK UNIFIED IDEOGRAPH + {0xC0FA, 0x76EA}, //4958 #CJK UNIFIED IDEOGRAPH + {0xC0FB, 0x77B3}, //4959 #CJK UNIFIED IDEOGRAPH + {0xC0FC, 0x77AA}, //4960 #CJK UNIFIED IDEOGRAPH + {0xC0FD, 0x77B0}, //4961 #CJK UNIFIED IDEOGRAPH + {0xC0FE, 0x77AC}, //4962 #CJK UNIFIED IDEOGRAPH + {0xC140, 0x77A7}, //4963 #CJK UNIFIED IDEOGRAPH + {0xC141, 0x77AD}, //4964 #CJK UNIFIED IDEOGRAPH + {0xC142, 0x77EF}, //4965 #CJK UNIFIED IDEOGRAPH + {0xC143, 0x78F7}, //4966 #CJK UNIFIED IDEOGRAPH + {0xC144, 0x78FA}, //4967 #CJK UNIFIED IDEOGRAPH + {0xC145, 0x78F4}, //4968 #CJK UNIFIED IDEOGRAPH + {0xC146, 0x78EF}, //4969 #CJK UNIFIED IDEOGRAPH + {0xC147, 0x7901}, //4970 #CJK UNIFIED IDEOGRAPH + {0xC148, 0x79A7}, //4971 #CJK UNIFIED IDEOGRAPH + {0xC149, 0x79AA}, //4972 #CJK UNIFIED IDEOGRAPH + {0xC14A, 0x7A57}, //4973 #CJK UNIFIED IDEOGRAPH + {0xC14B, 0x7ABF}, //4974 #CJK UNIFIED IDEOGRAPH + {0xC14C, 0x7C07}, //4975 #CJK UNIFIED IDEOGRAPH + {0xC14D, 0x7C0D}, //4976 #CJK UNIFIED IDEOGRAPH + {0xC14E, 0x7BFE}, //4977 #CJK UNIFIED IDEOGRAPH + {0xC14F, 0x7BF7}, //4978 #CJK UNIFIED IDEOGRAPH + {0xC150, 0x7C0C}, //4979 #CJK UNIFIED IDEOGRAPH + {0xC151, 0x7BE0}, //4980 #CJK UNIFIED IDEOGRAPH + {0xC152, 0x7CE0}, //4981 #CJK UNIFIED IDEOGRAPH + {0xC153, 0x7CDC}, //4982 #CJK UNIFIED IDEOGRAPH + {0xC154, 0x7CDE}, //4983 #CJK UNIFIED IDEOGRAPH + {0xC155, 0x7CE2}, //4984 #CJK UNIFIED IDEOGRAPH + {0xC156, 0x7CDF}, //4985 #CJK UNIFIED IDEOGRAPH + {0xC157, 0x7CD9}, //4986 #CJK UNIFIED IDEOGRAPH + {0xC158, 0x7CDD}, //4987 #CJK UNIFIED IDEOGRAPH + {0xC159, 0x7E2E}, //4988 #CJK UNIFIED IDEOGRAPH + {0xC15A, 0x7E3E}, //4989 #CJK UNIFIED IDEOGRAPH + {0xC15B, 0x7E46}, //4990 #CJK UNIFIED IDEOGRAPH + {0xC15C, 0x7E37}, //4991 #CJK UNIFIED IDEOGRAPH + {0xC15D, 0x7E32}, //4992 #CJK UNIFIED IDEOGRAPH + {0xC15E, 0x7E43}, //4993 #CJK UNIFIED IDEOGRAPH + {0xC15F, 0x7E2B}, //4994 #CJK UNIFIED IDEOGRAPH + {0xC160, 0x7E3D}, //4995 #CJK UNIFIED IDEOGRAPH + {0xC161, 0x7E31}, //4996 #CJK UNIFIED IDEOGRAPH + {0xC162, 0x7E45}, //4997 #CJK UNIFIED IDEOGRAPH + {0xC163, 0x7E41}, //4998 #CJK UNIFIED IDEOGRAPH + {0xC164, 0x7E34}, //4999 #CJK UNIFIED IDEOGRAPH + {0xC165, 0x7E39}, //5000 #CJK UNIFIED IDEOGRAPH + {0xC166, 0x7E48}, //5001 #CJK UNIFIED IDEOGRAPH + {0xC167, 0x7E35}, //5002 #CJK UNIFIED IDEOGRAPH + {0xC168, 0x7E3F}, //5003 #CJK UNIFIED IDEOGRAPH + {0xC169, 0x7E2F}, //5004 #CJK UNIFIED IDEOGRAPH + {0xC16A, 0x7F44}, //5005 #CJK UNIFIED IDEOGRAPH + {0xC16B, 0x7FF3}, //5006 #CJK UNIFIED IDEOGRAPH + {0xC16C, 0x7FFC}, //5007 #CJK UNIFIED IDEOGRAPH + {0xC16D, 0x8071}, //5008 #CJK UNIFIED IDEOGRAPH + {0xC16E, 0x8072}, //5009 #CJK UNIFIED IDEOGRAPH + {0xC16F, 0x8070}, //5010 #CJK UNIFIED IDEOGRAPH + {0xC170, 0x806F}, //5011 #CJK UNIFIED IDEOGRAPH + {0xC171, 0x8073}, //5012 #CJK UNIFIED IDEOGRAPH + {0xC172, 0x81C6}, //5013 #CJK UNIFIED IDEOGRAPH + {0xC173, 0x81C3}, //5014 #CJK UNIFIED IDEOGRAPH + {0xC174, 0x81BA}, //5015 #CJK UNIFIED IDEOGRAPH + {0xC175, 0x81C2}, //5016 #CJK UNIFIED IDEOGRAPH + {0xC176, 0x81C0}, //5017 #CJK UNIFIED IDEOGRAPH + {0xC177, 0x81BF}, //5018 #CJK UNIFIED IDEOGRAPH + {0xC178, 0x81BD}, //5019 #CJK UNIFIED IDEOGRAPH + {0xC179, 0x81C9}, //5020 #CJK UNIFIED IDEOGRAPH + {0xC17A, 0x81BE}, //5021 #CJK UNIFIED IDEOGRAPH + {0xC17B, 0x81E8}, //5022 #CJK UNIFIED IDEOGRAPH + {0xC17C, 0x8209}, //5023 #CJK UNIFIED IDEOGRAPH + {0xC17D, 0x8271}, //5024 #CJK UNIFIED IDEOGRAPH + {0xC17E, 0x85AA}, //5025 #CJK UNIFIED IDEOGRAPH + {0xC1A1, 0x8584}, //5026 #CJK UNIFIED IDEOGRAPH + {0xC1A2, 0x857E}, //5027 #CJK UNIFIED IDEOGRAPH + {0xC1A3, 0x859C}, //5028 #CJK UNIFIED IDEOGRAPH + {0xC1A4, 0x8591}, //5029 #CJK UNIFIED IDEOGRAPH + {0xC1A5, 0x8594}, //5030 #CJK UNIFIED IDEOGRAPH + {0xC1A6, 0x85AF}, //5031 #CJK UNIFIED IDEOGRAPH + {0xC1A7, 0x859B}, //5032 #CJK UNIFIED IDEOGRAPH + {0xC1A8, 0x8587}, //5033 #CJK UNIFIED IDEOGRAPH + {0xC1A9, 0x85A8}, //5034 #CJK UNIFIED IDEOGRAPH + {0xC1AA, 0x858A}, //5035 #CJK UNIFIED IDEOGRAPH + {0xC1AB, 0x8667}, //5036 #CJK UNIFIED IDEOGRAPH + {0xC1AC, 0x87C0}, //5037 #CJK UNIFIED IDEOGRAPH + {0xC1AD, 0x87D1}, //5038 #CJK UNIFIED IDEOGRAPH + {0xC1AE, 0x87B3}, //5039 #CJK UNIFIED IDEOGRAPH + {0xC1AF, 0x87D2}, //5040 #CJK UNIFIED IDEOGRAPH + {0xC1B0, 0x87C6}, //5041 #CJK UNIFIED IDEOGRAPH + {0xC1B1, 0x87AB}, //5042 #CJK UNIFIED IDEOGRAPH + {0xC1B2, 0x87BB}, //5043 #CJK UNIFIED IDEOGRAPH + {0xC1B3, 0x87BA}, //5044 #CJK UNIFIED IDEOGRAPH + {0xC1B4, 0x87C8}, //5045 #CJK UNIFIED IDEOGRAPH + {0xC1B5, 0x87CB}, //5046 #CJK UNIFIED IDEOGRAPH + {0xC1B6, 0x893B}, //5047 #CJK UNIFIED IDEOGRAPH + {0xC1B7, 0x8936}, //5048 #CJK UNIFIED IDEOGRAPH + {0xC1B8, 0x8944}, //5049 #CJK UNIFIED IDEOGRAPH + {0xC1B9, 0x8938}, //5050 #CJK UNIFIED IDEOGRAPH + {0xC1BA, 0x893D}, //5051 #CJK UNIFIED IDEOGRAPH + {0xC1BB, 0x89AC}, //5052 #CJK UNIFIED IDEOGRAPH + {0xC1BC, 0x8B0E}, //5053 #CJK UNIFIED IDEOGRAPH + {0xC1BD, 0x8B17}, //5054 #CJK UNIFIED IDEOGRAPH + {0xC1BE, 0x8B19}, //5055 #CJK UNIFIED IDEOGRAPH + {0xC1BF, 0x8B1B}, //5056 #CJK UNIFIED IDEOGRAPH + {0xC1C0, 0x8B0A}, //5057 #CJK UNIFIED IDEOGRAPH + {0xC1C1, 0x8B20}, //5058 #CJK UNIFIED IDEOGRAPH + {0xC1C2, 0x8B1D}, //5059 #CJK UNIFIED IDEOGRAPH + {0xC1C3, 0x8B04}, //5060 #CJK UNIFIED IDEOGRAPH + {0xC1C4, 0x8B10}, //5061 #CJK UNIFIED IDEOGRAPH + {0xC1C5, 0x8C41}, //5062 #CJK UNIFIED IDEOGRAPH + {0xC1C6, 0x8C3F}, //5063 #CJK UNIFIED IDEOGRAPH + {0xC1C7, 0x8C73}, //5064 #CJK UNIFIED IDEOGRAPH + {0xC1C8, 0x8CFA}, //5065 #CJK UNIFIED IDEOGRAPH + {0xC1C9, 0x8CFD}, //5066 #CJK UNIFIED IDEOGRAPH + {0xC1CA, 0x8CFC}, //5067 #CJK UNIFIED IDEOGRAPH + {0xC1CB, 0x8CF8}, //5068 #CJK UNIFIED IDEOGRAPH + {0xC1CC, 0x8CFB}, //5069 #CJK UNIFIED IDEOGRAPH + {0xC1CD, 0x8DA8}, //5070 #CJK UNIFIED IDEOGRAPH + {0xC1CE, 0x8E49}, //5071 #CJK UNIFIED IDEOGRAPH + {0xC1CF, 0x8E4B}, //5072 #CJK UNIFIED IDEOGRAPH + {0xC1D0, 0x8E48}, //5073 #CJK UNIFIED IDEOGRAPH + {0xC1D1, 0x8E4A}, //5074 #CJK UNIFIED IDEOGRAPH + {0xC1D2, 0x8F44}, //5075 #CJK UNIFIED IDEOGRAPH + {0xC1D3, 0x8F3E}, //5076 #CJK UNIFIED IDEOGRAPH + {0xC1D4, 0x8F42}, //5077 #CJK UNIFIED IDEOGRAPH + {0xC1D5, 0x8F45}, //5078 #CJK UNIFIED IDEOGRAPH + {0xC1D6, 0x8F3F}, //5079 #CJK UNIFIED IDEOGRAPH + {0xC1D7, 0x907F}, //5080 #CJK UNIFIED IDEOGRAPH + {0xC1D8, 0x907D}, //5081 #CJK UNIFIED IDEOGRAPH + {0xC1D9, 0x9084}, //5082 #CJK UNIFIED IDEOGRAPH + {0xC1DA, 0x9081}, //5083 #CJK UNIFIED IDEOGRAPH + {0xC1DB, 0x9082}, //5084 #CJK UNIFIED IDEOGRAPH + {0xC1DC, 0x9080}, //5085 #CJK UNIFIED IDEOGRAPH + {0xC1DD, 0x9139}, //5086 #CJK UNIFIED IDEOGRAPH + {0xC1DE, 0x91A3}, //5087 #CJK UNIFIED IDEOGRAPH + {0xC1DF, 0x919E}, //5088 #CJK UNIFIED IDEOGRAPH + {0xC1E0, 0x919C}, //5089 #CJK UNIFIED IDEOGRAPH + {0xC1E1, 0x934D}, //5090 #CJK UNIFIED IDEOGRAPH + {0xC1E2, 0x9382}, //5091 #CJK UNIFIED IDEOGRAPH + {0xC1E3, 0x9328}, //5092 #CJK UNIFIED IDEOGRAPH + {0xC1E4, 0x9375}, //5093 #CJK UNIFIED IDEOGRAPH + {0xC1E5, 0x934A}, //5094 #CJK UNIFIED IDEOGRAPH + {0xC1E6, 0x9365}, //5095 #CJK UNIFIED IDEOGRAPH + {0xC1E7, 0x934B}, //5096 #CJK UNIFIED IDEOGRAPH + {0xC1E8, 0x9318}, //5097 #CJK UNIFIED IDEOGRAPH + {0xC1E9, 0x937E}, //5098 #CJK UNIFIED IDEOGRAPH + {0xC1EA, 0x936C}, //5099 #CJK UNIFIED IDEOGRAPH + {0xC1EB, 0x935B}, //5100 #CJK UNIFIED IDEOGRAPH + {0xC1EC, 0x9370}, //5101 #CJK UNIFIED IDEOGRAPH + {0xC1ED, 0x935A}, //5102 #CJK UNIFIED IDEOGRAPH + {0xC1EE, 0x9354}, //5103 #CJK UNIFIED IDEOGRAPH + {0xC1EF, 0x95CA}, //5104 #CJK UNIFIED IDEOGRAPH + {0xC1F0, 0x95CB}, //5105 #CJK UNIFIED IDEOGRAPH + {0xC1F1, 0x95CC}, //5106 #CJK UNIFIED IDEOGRAPH + {0xC1F2, 0x95C8}, //5107 #CJK UNIFIED IDEOGRAPH + {0xC1F3, 0x95C6}, //5108 #CJK UNIFIED IDEOGRAPH + {0xC1F4, 0x96B1}, //5109 #CJK UNIFIED IDEOGRAPH + {0xC1F5, 0x96B8}, //5110 #CJK UNIFIED IDEOGRAPH + {0xC1F6, 0x96D6}, //5111 #CJK UNIFIED IDEOGRAPH + {0xC1F7, 0x971C}, //5112 #CJK UNIFIED IDEOGRAPH + {0xC1F8, 0x971E}, //5113 #CJK UNIFIED IDEOGRAPH + {0xC1F9, 0x97A0}, //5114 #CJK UNIFIED IDEOGRAPH + {0xC1FA, 0x97D3}, //5115 #CJK UNIFIED IDEOGRAPH + {0xC1FB, 0x9846}, //5116 #CJK UNIFIED IDEOGRAPH + {0xC1FC, 0x98B6}, //5117 #CJK UNIFIED IDEOGRAPH + {0xC1FD, 0x9935}, //5118 #CJK UNIFIED IDEOGRAPH + {0xC1FE, 0x9A01}, //5119 #CJK UNIFIED IDEOGRAPH + {0xC240, 0x99FF}, //5120 #CJK UNIFIED IDEOGRAPH + {0xC241, 0x9BAE}, //5121 #CJK UNIFIED IDEOGRAPH + {0xC242, 0x9BAB}, //5122 #CJK UNIFIED IDEOGRAPH + {0xC243, 0x9BAA}, //5123 #CJK UNIFIED IDEOGRAPH + {0xC244, 0x9BAD}, //5124 #CJK UNIFIED IDEOGRAPH + {0xC245, 0x9D3B}, //5125 #CJK UNIFIED IDEOGRAPH + {0xC246, 0x9D3F}, //5126 #CJK UNIFIED IDEOGRAPH + {0xC247, 0x9E8B}, //5127 #CJK UNIFIED IDEOGRAPH + {0xC248, 0x9ECF}, //5128 #CJK UNIFIED IDEOGRAPH + {0xC249, 0x9EDE}, //5129 #CJK UNIFIED IDEOGRAPH + {0xC24A, 0x9EDC}, //5130 #CJK UNIFIED IDEOGRAPH + {0xC24B, 0x9EDD}, //5131 #CJK UNIFIED IDEOGRAPH + {0xC24C, 0x9EDB}, //5132 #CJK UNIFIED IDEOGRAPH + {0xC24D, 0x9F3E}, //5133 #CJK UNIFIED IDEOGRAPH + {0xC24E, 0x9F4B}, //5134 #CJK UNIFIED IDEOGRAPH + {0xC24F, 0x53E2}, //5135 #CJK UNIFIED IDEOGRAPH + {0xC250, 0x5695}, //5136 #CJK UNIFIED IDEOGRAPH + {0xC251, 0x56AE}, //5137 #CJK UNIFIED IDEOGRAPH + {0xC252, 0x58D9}, //5138 #CJK UNIFIED IDEOGRAPH + {0xC253, 0x58D8}, //5139 #CJK UNIFIED IDEOGRAPH + {0xC254, 0x5B38}, //5140 #CJK UNIFIED IDEOGRAPH + {0xC255, 0x5F5D}, //5141 #CJK UNIFIED IDEOGRAPH + {0xC256, 0x61E3}, //5142 #CJK UNIFIED IDEOGRAPH + {0xC257, 0x6233}, //5143 #CJK UNIFIED IDEOGRAPH + {0xC258, 0x64F4}, //5144 #CJK UNIFIED IDEOGRAPH + {0xC259, 0x64F2}, //5145 #CJK UNIFIED IDEOGRAPH + {0xC25A, 0x64FE}, //5146 #CJK UNIFIED IDEOGRAPH + {0xC25B, 0x6506}, //5147 #CJK UNIFIED IDEOGRAPH + {0xC25C, 0x64FA}, //5148 #CJK UNIFIED IDEOGRAPH + {0xC25D, 0x64FB}, //5149 #CJK UNIFIED IDEOGRAPH + {0xC25E, 0x64F7}, //5150 #CJK UNIFIED IDEOGRAPH + {0xC25F, 0x65B7}, //5151 #CJK UNIFIED IDEOGRAPH + {0xC260, 0x66DC}, //5152 #CJK UNIFIED IDEOGRAPH + {0xC261, 0x6726}, //5153 #CJK UNIFIED IDEOGRAPH + {0xC262, 0x6AB3}, //5154 #CJK UNIFIED IDEOGRAPH + {0xC263, 0x6AAC}, //5155 #CJK UNIFIED IDEOGRAPH + {0xC264, 0x6AC3}, //5156 #CJK UNIFIED IDEOGRAPH + {0xC265, 0x6ABB}, //5157 #CJK UNIFIED IDEOGRAPH + {0xC266, 0x6AB8}, //5158 #CJK UNIFIED IDEOGRAPH + {0xC267, 0x6AC2}, //5159 #CJK UNIFIED IDEOGRAPH + {0xC268, 0x6AAE}, //5160 #CJK UNIFIED IDEOGRAPH + {0xC269, 0x6AAF}, //5161 #CJK UNIFIED IDEOGRAPH + {0xC26A, 0x6B5F}, //5162 #CJK UNIFIED IDEOGRAPH + {0xC26B, 0x6B78}, //5163 #CJK UNIFIED IDEOGRAPH + {0xC26C, 0x6BAF}, //5164 #CJK UNIFIED IDEOGRAPH + {0xC26D, 0x7009}, //5165 #CJK UNIFIED IDEOGRAPH + {0xC26E, 0x700B}, //5166 #CJK UNIFIED IDEOGRAPH + {0xC26F, 0x6FFE}, //5167 #CJK UNIFIED IDEOGRAPH + {0xC270, 0x7006}, //5168 #CJK UNIFIED IDEOGRAPH + {0xC271, 0x6FFA}, //5169 #CJK UNIFIED IDEOGRAPH + {0xC272, 0x7011}, //5170 #CJK UNIFIED IDEOGRAPH + {0xC273, 0x700F}, //5171 #CJK UNIFIED IDEOGRAPH + {0xC274, 0x71FB}, //5172 #CJK UNIFIED IDEOGRAPH + {0xC275, 0x71FC}, //5173 #CJK UNIFIED IDEOGRAPH + {0xC276, 0x71FE}, //5174 #CJK UNIFIED IDEOGRAPH + {0xC277, 0x71F8}, //5175 #CJK UNIFIED IDEOGRAPH + {0xC278, 0x7377}, //5176 #CJK UNIFIED IDEOGRAPH + {0xC279, 0x7375}, //5177 #CJK UNIFIED IDEOGRAPH + {0xC27A, 0x74A7}, //5178 #CJK UNIFIED IDEOGRAPH + {0xC27B, 0x74BF}, //5179 #CJK UNIFIED IDEOGRAPH + {0xC27C, 0x7515}, //5180 #CJK UNIFIED IDEOGRAPH + {0xC27D, 0x7656}, //5181 #CJK UNIFIED IDEOGRAPH + {0xC27E, 0x7658}, //5182 #CJK UNIFIED IDEOGRAPH + {0xC2A1, 0x7652}, //5183 #CJK UNIFIED IDEOGRAPH + {0xC2A2, 0x77BD}, //5184 #CJK UNIFIED IDEOGRAPH + {0xC2A3, 0x77BF}, //5185 #CJK UNIFIED IDEOGRAPH + {0xC2A4, 0x77BB}, //5186 #CJK UNIFIED IDEOGRAPH + {0xC2A5, 0x77BC}, //5187 #CJK UNIFIED IDEOGRAPH + {0xC2A6, 0x790E}, //5188 #CJK UNIFIED IDEOGRAPH + {0xC2A7, 0x79AE}, //5189 #CJK UNIFIED IDEOGRAPH + {0xC2A8, 0x7A61}, //5190 #CJK UNIFIED IDEOGRAPH + {0xC2A9, 0x7A62}, //5191 #CJK UNIFIED IDEOGRAPH + {0xC2AA, 0x7A60}, //5192 #CJK UNIFIED IDEOGRAPH + {0xC2AB, 0x7AC4}, //5193 #CJK UNIFIED IDEOGRAPH + {0xC2AC, 0x7AC5}, //5194 #CJK UNIFIED IDEOGRAPH + {0xC2AD, 0x7C2B}, //5195 #CJK UNIFIED IDEOGRAPH + {0xC2AE, 0x7C27}, //5196 #CJK UNIFIED IDEOGRAPH + {0xC2AF, 0x7C2A}, //5197 #CJK UNIFIED IDEOGRAPH + {0xC2B0, 0x7C1E}, //5198 #CJK UNIFIED IDEOGRAPH + {0xC2B1, 0x7C23}, //5199 #CJK UNIFIED IDEOGRAPH + {0xC2B2, 0x7C21}, //5200 #CJK UNIFIED IDEOGRAPH + {0xC2B3, 0x7CE7}, //5201 #CJK UNIFIED IDEOGRAPH + {0xC2B4, 0x7E54}, //5202 #CJK UNIFIED IDEOGRAPH + {0xC2B5, 0x7E55}, //5203 #CJK UNIFIED IDEOGRAPH + {0xC2B6, 0x7E5E}, //5204 #CJK UNIFIED IDEOGRAPH + {0xC2B7, 0x7E5A}, //5205 #CJK UNIFIED IDEOGRAPH + {0xC2B8, 0x7E61}, //5206 #CJK UNIFIED IDEOGRAPH + {0xC2B9, 0x7E52}, //5207 #CJK UNIFIED IDEOGRAPH + {0xC2BA, 0x7E59}, //5208 #CJK UNIFIED IDEOGRAPH + {0xC2BB, 0x7F48}, //5209 #CJK UNIFIED IDEOGRAPH + {0xC2BC, 0x7FF9}, //5210 #CJK UNIFIED IDEOGRAPH + {0xC2BD, 0x7FFB}, //5211 #CJK UNIFIED IDEOGRAPH + {0xC2BE, 0x8077}, //5212 #CJK UNIFIED IDEOGRAPH + {0xC2BF, 0x8076}, //5213 #CJK UNIFIED IDEOGRAPH + {0xC2C0, 0x81CD}, //5214 #CJK UNIFIED IDEOGRAPH + {0xC2C1, 0x81CF}, //5215 #CJK UNIFIED IDEOGRAPH + {0xC2C2, 0x820A}, //5216 #CJK UNIFIED IDEOGRAPH + {0xC2C3, 0x85CF}, //5217 #CJK UNIFIED IDEOGRAPH + {0xC2C4, 0x85A9}, //5218 #CJK UNIFIED IDEOGRAPH + {0xC2C5, 0x85CD}, //5219 #CJK UNIFIED IDEOGRAPH + {0xC2C6, 0x85D0}, //5220 #CJK UNIFIED IDEOGRAPH + {0xC2C7, 0x85C9}, //5221 #CJK UNIFIED IDEOGRAPH + {0xC2C8, 0x85B0}, //5222 #CJK UNIFIED IDEOGRAPH + {0xC2C9, 0x85BA}, //5223 #CJK UNIFIED IDEOGRAPH + {0xC2CA, 0x85B9}, //5224 #CJK UNIFIED IDEOGRAPH + {0xC2CB, 0x85A6}, //5225 #CJK UNIFIED IDEOGRAPH + {0xC2CC, 0x87EF}, //5226 #CJK UNIFIED IDEOGRAPH + {0xC2CD, 0x87EC}, //5227 #CJK UNIFIED IDEOGRAPH + {0xC2CE, 0x87F2}, //5228 #CJK UNIFIED IDEOGRAPH + {0xC2CF, 0x87E0}, //5229 #CJK UNIFIED IDEOGRAPH + {0xC2D0, 0x8986}, //5230 #CJK UNIFIED IDEOGRAPH + {0xC2D1, 0x89B2}, //5231 #CJK UNIFIED IDEOGRAPH + {0xC2D2, 0x89F4}, //5232 #CJK UNIFIED IDEOGRAPH + {0xC2D3, 0x8B28}, //5233 #CJK UNIFIED IDEOGRAPH + {0xC2D4, 0x8B39}, //5234 #CJK UNIFIED IDEOGRAPH + {0xC2D5, 0x8B2C}, //5235 #CJK UNIFIED IDEOGRAPH + {0xC2D6, 0x8B2B}, //5236 #CJK UNIFIED IDEOGRAPH + {0xC2D7, 0x8C50}, //5237 #CJK UNIFIED IDEOGRAPH + {0xC2D8, 0x8D05}, //5238 #CJK UNIFIED IDEOGRAPH + {0xC2D9, 0x8E59}, //5239 #CJK UNIFIED IDEOGRAPH + {0xC2DA, 0x8E63}, //5240 #CJK UNIFIED IDEOGRAPH + {0xC2DB, 0x8E66}, //5241 #CJK UNIFIED IDEOGRAPH + {0xC2DC, 0x8E64}, //5242 #CJK UNIFIED IDEOGRAPH + {0xC2DD, 0x8E5F}, //5243 #CJK UNIFIED IDEOGRAPH + {0xC2DE, 0x8E55}, //5244 #CJK UNIFIED IDEOGRAPH + {0xC2DF, 0x8EC0}, //5245 #CJK UNIFIED IDEOGRAPH + {0xC2E0, 0x8F49}, //5246 #CJK UNIFIED IDEOGRAPH + {0xC2E1, 0x8F4D}, //5247 #CJK UNIFIED IDEOGRAPH + {0xC2E2, 0x9087}, //5248 #CJK UNIFIED IDEOGRAPH + {0xC2E3, 0x9083}, //5249 #CJK UNIFIED IDEOGRAPH + {0xC2E4, 0x9088}, //5250 #CJK UNIFIED IDEOGRAPH + {0xC2E5, 0x91AB}, //5251 #CJK UNIFIED IDEOGRAPH + {0xC2E6, 0x91AC}, //5252 #CJK UNIFIED IDEOGRAPH + {0xC2E7, 0x91D0}, //5253 #CJK UNIFIED IDEOGRAPH + {0xC2E8, 0x9394}, //5254 #CJK UNIFIED IDEOGRAPH + {0xC2E9, 0x938A}, //5255 #CJK UNIFIED IDEOGRAPH + {0xC2EA, 0x9396}, //5256 #CJK UNIFIED IDEOGRAPH + {0xC2EB, 0x93A2}, //5257 #CJK UNIFIED IDEOGRAPH + {0xC2EC, 0x93B3}, //5258 #CJK UNIFIED IDEOGRAPH + {0xC2ED, 0x93AE}, //5259 #CJK UNIFIED IDEOGRAPH + {0xC2EE, 0x93AC}, //5260 #CJK UNIFIED IDEOGRAPH + {0xC2EF, 0x93B0}, //5261 #CJK UNIFIED IDEOGRAPH + {0xC2F0, 0x9398}, //5262 #CJK UNIFIED IDEOGRAPH + {0xC2F1, 0x939A}, //5263 #CJK UNIFIED IDEOGRAPH + {0xC2F2, 0x9397}, //5264 #CJK UNIFIED IDEOGRAPH + {0xC2F3, 0x95D4}, //5265 #CJK UNIFIED IDEOGRAPH + {0xC2F4, 0x95D6}, //5266 #CJK UNIFIED IDEOGRAPH + {0xC2F5, 0x95D0}, //5267 #CJK UNIFIED IDEOGRAPH + {0xC2F6, 0x95D5}, //5268 #CJK UNIFIED IDEOGRAPH + {0xC2F7, 0x96E2}, //5269 #CJK UNIFIED IDEOGRAPH + {0xC2F8, 0x96DC}, //5270 #CJK UNIFIED IDEOGRAPH + {0xC2F9, 0x96D9}, //5271 #CJK UNIFIED IDEOGRAPH + {0xC2FA, 0x96DB}, //5272 #CJK UNIFIED IDEOGRAPH + {0xC2FB, 0x96DE}, //5273 #CJK UNIFIED IDEOGRAPH + {0xC2FC, 0x9724}, //5274 #CJK UNIFIED IDEOGRAPH + {0xC2FD, 0x97A3}, //5275 #CJK UNIFIED IDEOGRAPH + {0xC2FE, 0x97A6}, //5276 #CJK UNIFIED IDEOGRAPH + {0xC340, 0x97AD}, //5277 #CJK UNIFIED IDEOGRAPH + {0xC341, 0x97F9}, //5278 #CJK UNIFIED IDEOGRAPH + {0xC342, 0x984D}, //5279 #CJK UNIFIED IDEOGRAPH + {0xC343, 0x984F}, //5280 #CJK UNIFIED IDEOGRAPH + {0xC344, 0x984C}, //5281 #CJK UNIFIED IDEOGRAPH + {0xC345, 0x984E}, //5282 #CJK UNIFIED IDEOGRAPH + {0xC346, 0x9853}, //5283 #CJK UNIFIED IDEOGRAPH + {0xC347, 0x98BA}, //5284 #CJK UNIFIED IDEOGRAPH + {0xC348, 0x993E}, //5285 #CJK UNIFIED IDEOGRAPH + {0xC349, 0x993F}, //5286 #CJK UNIFIED IDEOGRAPH + {0xC34A, 0x993D}, //5287 #CJK UNIFIED IDEOGRAPH + {0xC34B, 0x992E}, //5288 #CJK UNIFIED IDEOGRAPH + {0xC34C, 0x99A5}, //5289 #CJK UNIFIED IDEOGRAPH + {0xC34D, 0x9A0E}, //5290 #CJK UNIFIED IDEOGRAPH + {0xC34E, 0x9AC1}, //5291 #CJK UNIFIED IDEOGRAPH + {0xC34F, 0x9B03}, //5292 #CJK UNIFIED IDEOGRAPH + {0xC350, 0x9B06}, //5293 #CJK UNIFIED IDEOGRAPH + {0xC351, 0x9B4F}, //5294 #CJK UNIFIED IDEOGRAPH + {0xC352, 0x9B4E}, //5295 #CJK UNIFIED IDEOGRAPH + {0xC353, 0x9B4D}, //5296 #CJK UNIFIED IDEOGRAPH + {0xC354, 0x9BCA}, //5297 #CJK UNIFIED IDEOGRAPH + {0xC355, 0x9BC9}, //5298 #CJK UNIFIED IDEOGRAPH + {0xC356, 0x9BFD}, //5299 #CJK UNIFIED IDEOGRAPH + {0xC357, 0x9BC8}, //5300 #CJK UNIFIED IDEOGRAPH + {0xC358, 0x9BC0}, //5301 #CJK UNIFIED IDEOGRAPH + {0xC359, 0x9D51}, //5302 #CJK UNIFIED IDEOGRAPH + {0xC35A, 0x9D5D}, //5303 #CJK UNIFIED IDEOGRAPH + {0xC35B, 0x9D60}, //5304 #CJK UNIFIED IDEOGRAPH + {0xC35C, 0x9EE0}, //5305 #CJK UNIFIED IDEOGRAPH + {0xC35D, 0x9F15}, //5306 #CJK UNIFIED IDEOGRAPH + {0xC35E, 0x9F2C}, //5307 #CJK UNIFIED IDEOGRAPH + {0xC35F, 0x5133}, //5308 #CJK UNIFIED IDEOGRAPH + {0xC360, 0x56A5}, //5309 #CJK UNIFIED IDEOGRAPH + {0xC361, 0x58DE}, //5310 #CJK UNIFIED IDEOGRAPH + {0xC362, 0x58DF}, //5311 #CJK UNIFIED IDEOGRAPH + {0xC363, 0x58E2}, //5312 #CJK UNIFIED IDEOGRAPH + {0xC364, 0x5BF5}, //5313 #CJK UNIFIED IDEOGRAPH + {0xC365, 0x9F90}, //5314 #CJK UNIFIED IDEOGRAPH + {0xC366, 0x5EEC}, //5315 #CJK UNIFIED IDEOGRAPH + {0xC367, 0x61F2}, //5316 #CJK UNIFIED IDEOGRAPH + {0xC368, 0x61F7}, //5317 #CJK UNIFIED IDEOGRAPH + {0xC369, 0x61F6}, //5318 #CJK UNIFIED IDEOGRAPH + {0xC36A, 0x61F5}, //5319 #CJK UNIFIED IDEOGRAPH + {0xC36B, 0x6500}, //5320 #CJK UNIFIED IDEOGRAPH + {0xC36C, 0x650F}, //5321 #CJK UNIFIED IDEOGRAPH + {0xC36D, 0x66E0}, //5322 #CJK UNIFIED IDEOGRAPH + {0xC36E, 0x66DD}, //5323 #CJK UNIFIED IDEOGRAPH + {0xC36F, 0x6AE5}, //5324 #CJK UNIFIED IDEOGRAPH + {0xC370, 0x6ADD}, //5325 #CJK UNIFIED IDEOGRAPH + {0xC371, 0x6ADA}, //5326 #CJK UNIFIED IDEOGRAPH + {0xC372, 0x6AD3}, //5327 #CJK UNIFIED IDEOGRAPH + {0xC373, 0x701B}, //5328 #CJK UNIFIED IDEOGRAPH + {0xC374, 0x701F}, //5329 #CJK UNIFIED IDEOGRAPH + {0xC375, 0x7028}, //5330 #CJK UNIFIED IDEOGRAPH + {0xC376, 0x701A}, //5331 #CJK UNIFIED IDEOGRAPH + {0xC377, 0x701D}, //5332 #CJK UNIFIED IDEOGRAPH + {0xC378, 0x7015}, //5333 #CJK UNIFIED IDEOGRAPH + {0xC379, 0x7018}, //5334 #CJK UNIFIED IDEOGRAPH + {0xC37A, 0x7206}, //5335 #CJK UNIFIED IDEOGRAPH + {0xC37B, 0x720D}, //5336 #CJK UNIFIED IDEOGRAPH + {0xC37C, 0x7258}, //5337 #CJK UNIFIED IDEOGRAPH + {0xC37D, 0x72A2}, //5338 #CJK UNIFIED IDEOGRAPH + {0xC37E, 0x7378}, //5339 #CJK UNIFIED IDEOGRAPH + {0xC3A1, 0x737A}, //5340 #CJK UNIFIED IDEOGRAPH + {0xC3A2, 0x74BD}, //5341 #CJK UNIFIED IDEOGRAPH + {0xC3A3, 0x74CA}, //5342 #CJK UNIFIED IDEOGRAPH + {0xC3A4, 0x74E3}, //5343 #CJK UNIFIED IDEOGRAPH + {0xC3A5, 0x7587}, //5344 #CJK UNIFIED IDEOGRAPH + {0xC3A6, 0x7586}, //5345 #CJK UNIFIED IDEOGRAPH + {0xC3A7, 0x765F}, //5346 #CJK UNIFIED IDEOGRAPH + {0xC3A8, 0x7661}, //5347 #CJK UNIFIED IDEOGRAPH + {0xC3A9, 0x77C7}, //5348 #CJK UNIFIED IDEOGRAPH + {0xC3AA, 0x7919}, //5349 #CJK UNIFIED IDEOGRAPH + {0xC3AB, 0x79B1}, //5350 #CJK UNIFIED IDEOGRAPH + {0xC3AC, 0x7A6B}, //5351 #CJK UNIFIED IDEOGRAPH + {0xC3AD, 0x7A69}, //5352 #CJK UNIFIED IDEOGRAPH + {0xC3AE, 0x7C3E}, //5353 #CJK UNIFIED IDEOGRAPH + {0xC3AF, 0x7C3F}, //5354 #CJK UNIFIED IDEOGRAPH + {0xC3B0, 0x7C38}, //5355 #CJK UNIFIED IDEOGRAPH + {0xC3B1, 0x7C3D}, //5356 #CJK UNIFIED IDEOGRAPH + {0xC3B2, 0x7C37}, //5357 #CJK UNIFIED IDEOGRAPH + {0xC3B3, 0x7C40}, //5358 #CJK UNIFIED IDEOGRAPH + {0xC3B4, 0x7E6B}, //5359 #CJK UNIFIED IDEOGRAPH + {0xC3B5, 0x7E6D}, //5360 #CJK UNIFIED IDEOGRAPH + {0xC3B6, 0x7E79}, //5361 #CJK UNIFIED IDEOGRAPH + {0xC3B7, 0x7E69}, //5362 #CJK UNIFIED IDEOGRAPH + {0xC3B8, 0x7E6A}, //5363 #CJK UNIFIED IDEOGRAPH + {0xC3B9, 0x7F85}, //5364 #CJK UNIFIED IDEOGRAPH + {0xC3BA, 0x7E73}, //5365 #CJK UNIFIED IDEOGRAPH + {0xC3BB, 0x7FB6}, //5366 #CJK UNIFIED IDEOGRAPH + {0xC3BC, 0x7FB9}, //5367 #CJK UNIFIED IDEOGRAPH + {0xC3BD, 0x7FB8}, //5368 #CJK UNIFIED IDEOGRAPH + {0xC3BE, 0x81D8}, //5369 #CJK UNIFIED IDEOGRAPH + {0xC3BF, 0x85E9}, //5370 #CJK UNIFIED IDEOGRAPH + {0xC3C0, 0x85DD}, //5371 #CJK UNIFIED IDEOGRAPH + {0xC3C1, 0x85EA}, //5372 #CJK UNIFIED IDEOGRAPH + {0xC3C2, 0x85D5}, //5373 #CJK UNIFIED IDEOGRAPH + {0xC3C3, 0x85E4}, //5374 #CJK UNIFIED IDEOGRAPH + {0xC3C4, 0x85E5}, //5375 #CJK UNIFIED IDEOGRAPH + {0xC3C5, 0x85F7}, //5376 #CJK UNIFIED IDEOGRAPH + {0xC3C6, 0x87FB}, //5377 #CJK UNIFIED IDEOGRAPH + {0xC3C7, 0x8805}, //5378 #CJK UNIFIED IDEOGRAPH + {0xC3C8, 0x880D}, //5379 #CJK UNIFIED IDEOGRAPH + {0xC3C9, 0x87F9}, //5380 #CJK UNIFIED IDEOGRAPH + {0xC3CA, 0x87FE}, //5381 #CJK UNIFIED IDEOGRAPH + {0xC3CB, 0x8960}, //5382 #CJK UNIFIED IDEOGRAPH + {0xC3CC, 0x895F}, //5383 #CJK UNIFIED IDEOGRAPH + {0xC3CD, 0x8956}, //5384 #CJK UNIFIED IDEOGRAPH + {0xC3CE, 0x895E}, //5385 #CJK UNIFIED IDEOGRAPH + {0xC3CF, 0x8B41}, //5386 #CJK UNIFIED IDEOGRAPH + {0xC3D0, 0x8B5C}, //5387 #CJK UNIFIED IDEOGRAPH + {0xC3D1, 0x8B58}, //5388 #CJK UNIFIED IDEOGRAPH + {0xC3D2, 0x8B49}, //5389 #CJK UNIFIED IDEOGRAPH + {0xC3D3, 0x8B5A}, //5390 #CJK UNIFIED IDEOGRAPH + {0xC3D4, 0x8B4E}, //5391 #CJK UNIFIED IDEOGRAPH + {0xC3D5, 0x8B4F}, //5392 #CJK UNIFIED IDEOGRAPH + {0xC3D6, 0x8B46}, //5393 #CJK UNIFIED IDEOGRAPH + {0xC3D7, 0x8B59}, //5394 #CJK UNIFIED IDEOGRAPH + {0xC3D8, 0x8D08}, //5395 #CJK UNIFIED IDEOGRAPH + {0xC3D9, 0x8D0A}, //5396 #CJK UNIFIED IDEOGRAPH + {0xC3DA, 0x8E7C}, //5397 #CJK UNIFIED IDEOGRAPH + {0xC3DB, 0x8E72}, //5398 #CJK UNIFIED IDEOGRAPH + {0xC3DC, 0x8E87}, //5399 #CJK UNIFIED IDEOGRAPH + {0xC3DD, 0x8E76}, //5400 #CJK UNIFIED IDEOGRAPH + {0xC3DE, 0x8E6C}, //5401 #CJK UNIFIED IDEOGRAPH + {0xC3DF, 0x8E7A}, //5402 #CJK UNIFIED IDEOGRAPH + {0xC3E0, 0x8E74}, //5403 #CJK UNIFIED IDEOGRAPH + {0xC3E1, 0x8F54}, //5404 #CJK UNIFIED IDEOGRAPH + {0xC3E2, 0x8F4E}, //5405 #CJK UNIFIED IDEOGRAPH + {0xC3E3, 0x8FAD}, //5406 #CJK UNIFIED IDEOGRAPH + {0xC3E4, 0x908A}, //5407 #CJK UNIFIED IDEOGRAPH + {0xC3E5, 0x908B}, //5408 #CJK UNIFIED IDEOGRAPH + {0xC3E6, 0x91B1}, //5409 #CJK UNIFIED IDEOGRAPH + {0xC3E7, 0x91AE}, //5410 #CJK UNIFIED IDEOGRAPH + {0xC3E8, 0x93E1}, //5411 #CJK UNIFIED IDEOGRAPH + {0xC3E9, 0x93D1}, //5412 #CJK UNIFIED IDEOGRAPH + {0xC3EA, 0x93DF}, //5413 #CJK UNIFIED IDEOGRAPH + {0xC3EB, 0x93C3}, //5414 #CJK UNIFIED IDEOGRAPH + {0xC3EC, 0x93C8}, //5415 #CJK UNIFIED IDEOGRAPH + {0xC3ED, 0x93DC}, //5416 #CJK UNIFIED IDEOGRAPH + {0xC3EE, 0x93DD}, //5417 #CJK UNIFIED IDEOGRAPH + {0xC3EF, 0x93D6}, //5418 #CJK UNIFIED IDEOGRAPH + {0xC3F0, 0x93E2}, //5419 #CJK UNIFIED IDEOGRAPH + {0xC3F1, 0x93CD}, //5420 #CJK UNIFIED IDEOGRAPH + {0xC3F2, 0x93D8}, //5421 #CJK UNIFIED IDEOGRAPH + {0xC3F3, 0x93E4}, //5422 #CJK UNIFIED IDEOGRAPH + {0xC3F4, 0x93D7}, //5423 #CJK UNIFIED IDEOGRAPH + {0xC3F5, 0x93E8}, //5424 #CJK UNIFIED IDEOGRAPH + {0xC3F6, 0x95DC}, //5425 #CJK UNIFIED IDEOGRAPH + {0xC3F7, 0x96B4}, //5426 #CJK UNIFIED IDEOGRAPH + {0xC3F8, 0x96E3}, //5427 #CJK UNIFIED IDEOGRAPH + {0xC3F9, 0x972A}, //5428 #CJK UNIFIED IDEOGRAPH + {0xC3FA, 0x9727}, //5429 #CJK UNIFIED IDEOGRAPH + {0xC3FB, 0x9761}, //5430 #CJK UNIFIED IDEOGRAPH + {0xC3FC, 0x97DC}, //5431 #CJK UNIFIED IDEOGRAPH + {0xC3FD, 0x97FB}, //5432 #CJK UNIFIED IDEOGRAPH + {0xC3FE, 0x985E}, //5433 #CJK UNIFIED IDEOGRAPH + {0xC440, 0x9858}, //5434 #CJK UNIFIED IDEOGRAPH + {0xC441, 0x985B}, //5435 #CJK UNIFIED IDEOGRAPH + {0xC442, 0x98BC}, //5436 #CJK UNIFIED IDEOGRAPH + {0xC443, 0x9945}, //5437 #CJK UNIFIED IDEOGRAPH + {0xC444, 0x9949}, //5438 #CJK UNIFIED IDEOGRAPH + {0xC445, 0x9A16}, //5439 #CJK UNIFIED IDEOGRAPH + {0xC446, 0x9A19}, //5440 #CJK UNIFIED IDEOGRAPH + {0xC447, 0x9B0D}, //5441 #CJK UNIFIED IDEOGRAPH + {0xC448, 0x9BE8}, //5442 #CJK UNIFIED IDEOGRAPH + {0xC449, 0x9BE7}, //5443 #CJK UNIFIED IDEOGRAPH + {0xC44A, 0x9BD6}, //5444 #CJK UNIFIED IDEOGRAPH + {0xC44B, 0x9BDB}, //5445 #CJK UNIFIED IDEOGRAPH + {0xC44C, 0x9D89}, //5446 #CJK UNIFIED IDEOGRAPH + {0xC44D, 0x9D61}, //5447 #CJK UNIFIED IDEOGRAPH + {0xC44E, 0x9D72}, //5448 #CJK UNIFIED IDEOGRAPH + {0xC44F, 0x9D6A}, //5449 #CJK UNIFIED IDEOGRAPH + {0xC450, 0x9D6C}, //5450 #CJK UNIFIED IDEOGRAPH + {0xC451, 0x9E92}, //5451 #CJK UNIFIED IDEOGRAPH + {0xC452, 0x9E97}, //5452 #CJK UNIFIED IDEOGRAPH + {0xC453, 0x9E93}, //5453 #CJK UNIFIED IDEOGRAPH + {0xC454, 0x9EB4}, //5454 #CJK UNIFIED IDEOGRAPH + {0xC455, 0x52F8}, //5455 #CJK UNIFIED IDEOGRAPH + {0xC456, 0x56A8}, //5456 #CJK UNIFIED IDEOGRAPH + {0xC457, 0x56B7}, //5457 #CJK UNIFIED IDEOGRAPH + {0xC458, 0x56B6}, //5458 #CJK UNIFIED IDEOGRAPH + {0xC459, 0x56B4}, //5459 #CJK UNIFIED IDEOGRAPH + {0xC45A, 0x56BC}, //5460 #CJK UNIFIED IDEOGRAPH + {0xC45B, 0x58E4}, //5461 #CJK UNIFIED IDEOGRAPH + {0xC45C, 0x5B40}, //5462 #CJK UNIFIED IDEOGRAPH + {0xC45D, 0x5B43}, //5463 #CJK UNIFIED IDEOGRAPH + {0xC45E, 0x5B7D}, //5464 #CJK UNIFIED IDEOGRAPH + {0xC45F, 0x5BF6}, //5465 #CJK UNIFIED IDEOGRAPH + {0xC460, 0x5DC9}, //5466 #CJK UNIFIED IDEOGRAPH + {0xC461, 0x61F8}, //5467 #CJK UNIFIED IDEOGRAPH + {0xC462, 0x61FA}, //5468 #CJK UNIFIED IDEOGRAPH + {0xC463, 0x6518}, //5469 #CJK UNIFIED IDEOGRAPH + {0xC464, 0x6514}, //5470 #CJK UNIFIED IDEOGRAPH + {0xC465, 0x6519}, //5471 #CJK UNIFIED IDEOGRAPH + {0xC466, 0x66E6}, //5472 #CJK UNIFIED IDEOGRAPH + {0xC467, 0x6727}, //5473 #CJK UNIFIED IDEOGRAPH + {0xC468, 0x6AEC}, //5474 #CJK UNIFIED IDEOGRAPH + {0xC469, 0x703E}, //5475 #CJK UNIFIED IDEOGRAPH + {0xC46A, 0x7030}, //5476 #CJK UNIFIED IDEOGRAPH + {0xC46B, 0x7032}, //5477 #CJK UNIFIED IDEOGRAPH + {0xC46C, 0x7210}, //5478 #CJK UNIFIED IDEOGRAPH + {0xC46D, 0x737B}, //5479 #CJK UNIFIED IDEOGRAPH + {0xC46E, 0x74CF}, //5480 #CJK UNIFIED IDEOGRAPH + {0xC46F, 0x7662}, //5481 #CJK UNIFIED IDEOGRAPH + {0xC470, 0x7665}, //5482 #CJK UNIFIED IDEOGRAPH + {0xC471, 0x7926}, //5483 #CJK UNIFIED IDEOGRAPH + {0xC472, 0x792A}, //5484 #CJK UNIFIED IDEOGRAPH + {0xC473, 0x792C}, //5485 #CJK UNIFIED IDEOGRAPH + {0xC474, 0x792B}, //5486 #CJK UNIFIED IDEOGRAPH + {0xC475, 0x7AC7}, //5487 #CJK UNIFIED IDEOGRAPH + {0xC476, 0x7AF6}, //5488 #CJK UNIFIED IDEOGRAPH + {0xC477, 0x7C4C}, //5489 #CJK UNIFIED IDEOGRAPH + {0xC478, 0x7C43}, //5490 #CJK UNIFIED IDEOGRAPH + {0xC479, 0x7C4D}, //5491 #CJK UNIFIED IDEOGRAPH + {0xC47A, 0x7CEF}, //5492 #CJK UNIFIED IDEOGRAPH + {0xC47B, 0x7CF0}, //5493 #CJK UNIFIED IDEOGRAPH + {0xC47C, 0x8FAE}, //5494 #CJK UNIFIED IDEOGRAPH + {0xC47D, 0x7E7D}, //5495 #CJK UNIFIED IDEOGRAPH + {0xC47E, 0x7E7C}, //5496 #CJK UNIFIED IDEOGRAPH + {0xC4A1, 0x7E82}, //5497 #CJK UNIFIED IDEOGRAPH + {0xC4A2, 0x7F4C}, //5498 #CJK UNIFIED IDEOGRAPH + {0xC4A3, 0x8000}, //5499 #CJK UNIFIED IDEOGRAPH + {0xC4A4, 0x81DA}, //5500 #CJK UNIFIED IDEOGRAPH + {0xC4A5, 0x8266}, //5501 #CJK UNIFIED IDEOGRAPH + {0xC4A6, 0x85FB}, //5502 #CJK UNIFIED IDEOGRAPH + {0xC4A7, 0x85F9}, //5503 #CJK UNIFIED IDEOGRAPH + {0xC4A8, 0x8611}, //5504 #CJK UNIFIED IDEOGRAPH + {0xC4A9, 0x85FA}, //5505 #CJK UNIFIED IDEOGRAPH + {0xC4AA, 0x8606}, //5506 #CJK UNIFIED IDEOGRAPH + {0xC4AB, 0x860B}, //5507 #CJK UNIFIED IDEOGRAPH + {0xC4AC, 0x8607}, //5508 #CJK UNIFIED IDEOGRAPH + {0xC4AD, 0x860A}, //5509 #CJK UNIFIED IDEOGRAPH + {0xC4AE, 0x8814}, //5510 #CJK UNIFIED IDEOGRAPH + {0xC4AF, 0x8815}, //5511 #CJK UNIFIED IDEOGRAPH + {0xC4B0, 0x8964}, //5512 #CJK UNIFIED IDEOGRAPH + {0xC4B1, 0x89BA}, //5513 #CJK UNIFIED IDEOGRAPH + {0xC4B2, 0x89F8}, //5514 #CJK UNIFIED IDEOGRAPH + {0xC4B3, 0x8B70}, //5515 #CJK UNIFIED IDEOGRAPH + {0xC4B4, 0x8B6C}, //5516 #CJK UNIFIED IDEOGRAPH + {0xC4B5, 0x8B66}, //5517 #CJK UNIFIED IDEOGRAPH + {0xC4B6, 0x8B6F}, //5518 #CJK UNIFIED IDEOGRAPH + {0xC4B7, 0x8B5F}, //5519 #CJK UNIFIED IDEOGRAPH + {0xC4B8, 0x8B6B}, //5520 #CJK UNIFIED IDEOGRAPH + {0xC4B9, 0x8D0F}, //5521 #CJK UNIFIED IDEOGRAPH + {0xC4BA, 0x8D0D}, //5522 #CJK UNIFIED IDEOGRAPH + {0xC4BB, 0x8E89}, //5523 #CJK UNIFIED IDEOGRAPH + {0xC4BC, 0x8E81}, //5524 #CJK UNIFIED IDEOGRAPH + {0xC4BD, 0x8E85}, //5525 #CJK UNIFIED IDEOGRAPH + {0xC4BE, 0x8E82}, //5526 #CJK UNIFIED IDEOGRAPH + {0xC4BF, 0x91B4}, //5527 #CJK UNIFIED IDEOGRAPH + {0xC4C0, 0x91CB}, //5528 #CJK UNIFIED IDEOGRAPH + {0xC4C1, 0x9418}, //5529 #CJK UNIFIED IDEOGRAPH + {0xC4C2, 0x9403}, //5530 #CJK UNIFIED IDEOGRAPH + {0xC4C3, 0x93FD}, //5531 #CJK UNIFIED IDEOGRAPH + {0xC4C4, 0x95E1}, //5532 #CJK UNIFIED IDEOGRAPH + {0xC4C5, 0x9730}, //5533 #CJK UNIFIED IDEOGRAPH + {0xC4C6, 0x98C4}, //5534 #CJK UNIFIED IDEOGRAPH + {0xC4C7, 0x9952}, //5535 #CJK UNIFIED IDEOGRAPH + {0xC4C8, 0x9951}, //5536 #CJK UNIFIED IDEOGRAPH + {0xC4C9, 0x99A8}, //5537 #CJK UNIFIED IDEOGRAPH + {0xC4CA, 0x9A2B}, //5538 #CJK UNIFIED IDEOGRAPH + {0xC4CB, 0x9A30}, //5539 #CJK UNIFIED IDEOGRAPH + {0xC4CC, 0x9A37}, //5540 #CJK UNIFIED IDEOGRAPH + {0xC4CD, 0x9A35}, //5541 #CJK UNIFIED IDEOGRAPH + {0xC4CE, 0x9C13}, //5542 #CJK UNIFIED IDEOGRAPH + {0xC4CF, 0x9C0D}, //5543 #CJK UNIFIED IDEOGRAPH + {0xC4D0, 0x9E79}, //5544 #CJK UNIFIED IDEOGRAPH + {0xC4D1, 0x9EB5}, //5545 #CJK UNIFIED IDEOGRAPH + {0xC4D2, 0x9EE8}, //5546 #CJK UNIFIED IDEOGRAPH + {0xC4D3, 0x9F2F}, //5547 #CJK UNIFIED IDEOGRAPH + {0xC4D4, 0x9F5F}, //5548 #CJK UNIFIED IDEOGRAPH + {0xC4D5, 0x9F63}, //5549 #CJK UNIFIED IDEOGRAPH + {0xC4D6, 0x9F61}, //5550 #CJK UNIFIED IDEOGRAPH + {0xC4D7, 0x5137}, //5551 #CJK UNIFIED IDEOGRAPH + {0xC4D8, 0x5138}, //5552 #CJK UNIFIED IDEOGRAPH + {0xC4D9, 0x56C1}, //5553 #CJK UNIFIED IDEOGRAPH + {0xC4DA, 0x56C0}, //5554 #CJK UNIFIED IDEOGRAPH + {0xC4DB, 0x56C2}, //5555 #CJK UNIFIED IDEOGRAPH + {0xC4DC, 0x5914}, //5556 #CJK UNIFIED IDEOGRAPH + {0xC4DD, 0x5C6C}, //5557 #CJK UNIFIED IDEOGRAPH + {0xC4DE, 0x5DCD}, //5558 #CJK UNIFIED IDEOGRAPH + {0xC4DF, 0x61FC}, //5559 #CJK UNIFIED IDEOGRAPH + {0xC4E0, 0x61FE}, //5560 #CJK UNIFIED IDEOGRAPH + {0xC4E1, 0x651D}, //5561 #CJK UNIFIED IDEOGRAPH + {0xC4E2, 0x651C}, //5562 #CJK UNIFIED IDEOGRAPH + {0xC4E3, 0x6595}, //5563 #CJK UNIFIED IDEOGRAPH + {0xC4E4, 0x66E9}, //5564 #CJK UNIFIED IDEOGRAPH + {0xC4E5, 0x6AFB}, //5565 #CJK UNIFIED IDEOGRAPH + {0xC4E6, 0x6B04}, //5566 #CJK UNIFIED IDEOGRAPH + {0xC4E7, 0x6AFA}, //5567 #CJK UNIFIED IDEOGRAPH + {0xC4E8, 0x6BB2}, //5568 #CJK UNIFIED IDEOGRAPH + {0xC4E9, 0x704C}, //5569 #CJK UNIFIED IDEOGRAPH + {0xC4EA, 0x721B}, //5570 #CJK UNIFIED IDEOGRAPH + {0xC4EB, 0x72A7}, //5571 #CJK UNIFIED IDEOGRAPH + {0xC4EC, 0x74D6}, //5572 #CJK UNIFIED IDEOGRAPH + {0xC4ED, 0x74D4}, //5573 #CJK UNIFIED IDEOGRAPH + {0xC4EE, 0x7669}, //5574 #CJK UNIFIED IDEOGRAPH + {0xC4EF, 0x77D3}, //5575 #CJK UNIFIED IDEOGRAPH + {0xC4F0, 0x7C50}, //5576 #CJK UNIFIED IDEOGRAPH + {0xC4F1, 0x7E8F}, //5577 #CJK UNIFIED IDEOGRAPH + {0xC4F2, 0x7E8C}, //5578 #CJK UNIFIED IDEOGRAPH + {0xC4F3, 0x7FBC}, //5579 #CJK UNIFIED IDEOGRAPH + {0xC4F4, 0x8617}, //5580 #CJK UNIFIED IDEOGRAPH + {0xC4F5, 0x862D}, //5581 #CJK UNIFIED IDEOGRAPH + {0xC4F6, 0x861A}, //5582 #CJK UNIFIED IDEOGRAPH + {0xC4F7, 0x8823}, //5583 #CJK UNIFIED IDEOGRAPH + {0xC4F8, 0x8822}, //5584 #CJK UNIFIED IDEOGRAPH + {0xC4F9, 0x8821}, //5585 #CJK UNIFIED IDEOGRAPH + {0xC4FA, 0x881F}, //5586 #CJK UNIFIED IDEOGRAPH + {0xC4FB, 0x896A}, //5587 #CJK UNIFIED IDEOGRAPH + {0xC4FC, 0x896C}, //5588 #CJK UNIFIED IDEOGRAPH + {0xC4FD, 0x89BD}, //5589 #CJK UNIFIED IDEOGRAPH + {0xC4FE, 0x8B74}, //5590 #CJK UNIFIED IDEOGRAPH + {0xC540, 0x8B77}, //5591 #CJK UNIFIED IDEOGRAPH + {0xC541, 0x8B7D}, //5592 #CJK UNIFIED IDEOGRAPH + {0xC542, 0x8D13}, //5593 #CJK UNIFIED IDEOGRAPH + {0xC543, 0x8E8A}, //5594 #CJK UNIFIED IDEOGRAPH + {0xC544, 0x8E8D}, //5595 #CJK UNIFIED IDEOGRAPH + {0xC545, 0x8E8B}, //5596 #CJK UNIFIED IDEOGRAPH + {0xC546, 0x8F5F}, //5597 #CJK UNIFIED IDEOGRAPH + {0xC547, 0x8FAF}, //5598 #CJK UNIFIED IDEOGRAPH + {0xC548, 0x91BA}, //5599 #CJK UNIFIED IDEOGRAPH + {0xC549, 0x942E}, //5600 #CJK UNIFIED IDEOGRAPH + {0xC54A, 0x9433}, //5601 #CJK UNIFIED IDEOGRAPH + {0xC54B, 0x9435}, //5602 #CJK UNIFIED IDEOGRAPH + {0xC54C, 0x943A}, //5603 #CJK UNIFIED IDEOGRAPH + {0xC54D, 0x9438}, //5604 #CJK UNIFIED IDEOGRAPH + {0xC54E, 0x9432}, //5605 #CJK UNIFIED IDEOGRAPH + {0xC54F, 0x942B}, //5606 #CJK UNIFIED IDEOGRAPH + {0xC550, 0x95E2}, //5607 #CJK UNIFIED IDEOGRAPH + {0xC551, 0x9738}, //5608 #CJK UNIFIED IDEOGRAPH + {0xC552, 0x9739}, //5609 #CJK UNIFIED IDEOGRAPH + {0xC553, 0x9732}, //5610 #CJK UNIFIED IDEOGRAPH + {0xC554, 0x97FF}, //5611 #CJK UNIFIED IDEOGRAPH + {0xC555, 0x9867}, //5612 #CJK UNIFIED IDEOGRAPH + {0xC556, 0x9865}, //5613 #CJK UNIFIED IDEOGRAPH + {0xC557, 0x9957}, //5614 #CJK UNIFIED IDEOGRAPH + {0xC558, 0x9A45}, //5615 #CJK UNIFIED IDEOGRAPH + {0xC559, 0x9A43}, //5616 #CJK UNIFIED IDEOGRAPH + {0xC55A, 0x9A40}, //5617 #CJK UNIFIED IDEOGRAPH + {0xC55B, 0x9A3E}, //5618 #CJK UNIFIED IDEOGRAPH + {0xC55C, 0x9ACF}, //5619 #CJK UNIFIED IDEOGRAPH + {0xC55D, 0x9B54}, //5620 #CJK UNIFIED IDEOGRAPH + {0xC55E, 0x9B51}, //5621 #CJK UNIFIED IDEOGRAPH + {0xC55F, 0x9C2D}, //5622 #CJK UNIFIED IDEOGRAPH + {0xC560, 0x9C25}, //5623 #CJK UNIFIED IDEOGRAPH + {0xC561, 0x9DAF}, //5624 #CJK UNIFIED IDEOGRAPH + {0xC562, 0x9DB4}, //5625 #CJK UNIFIED IDEOGRAPH + {0xC563, 0x9DC2}, //5626 #CJK UNIFIED IDEOGRAPH + {0xC564, 0x9DB8}, //5627 #CJK UNIFIED IDEOGRAPH + {0xC565, 0x9E9D}, //5628 #CJK UNIFIED IDEOGRAPH + {0xC566, 0x9EEF}, //5629 #CJK UNIFIED IDEOGRAPH + {0xC567, 0x9F19}, //5630 #CJK UNIFIED IDEOGRAPH + {0xC568, 0x9F5C}, //5631 #CJK UNIFIED IDEOGRAPH + {0xC569, 0x9F66}, //5632 #CJK UNIFIED IDEOGRAPH + {0xC56A, 0x9F67}, //5633 #CJK UNIFIED IDEOGRAPH + {0xC56B, 0x513C}, //5634 #CJK UNIFIED IDEOGRAPH + {0xC56C, 0x513B}, //5635 #CJK UNIFIED IDEOGRAPH + {0xC56D, 0x56C8}, //5636 #CJK UNIFIED IDEOGRAPH + {0xC56E, 0x56CA}, //5637 #CJK UNIFIED IDEOGRAPH + {0xC56F, 0x56C9}, //5638 #CJK UNIFIED IDEOGRAPH + {0xC570, 0x5B7F}, //5639 #CJK UNIFIED IDEOGRAPH + {0xC571, 0x5DD4}, //5640 #CJK UNIFIED IDEOGRAPH + {0xC572, 0x5DD2}, //5641 #CJK UNIFIED IDEOGRAPH + {0xC573, 0x5F4E}, //5642 #CJK UNIFIED IDEOGRAPH + {0xC574, 0x61FF}, //5643 #CJK UNIFIED IDEOGRAPH + {0xC575, 0x6524}, //5644 #CJK UNIFIED IDEOGRAPH + {0xC576, 0x6B0A}, //5645 #CJK UNIFIED IDEOGRAPH + {0xC577, 0x6B61}, //5646 #CJK UNIFIED IDEOGRAPH + {0xC578, 0x7051}, //5647 #CJK UNIFIED IDEOGRAPH + {0xC579, 0x7058}, //5648 #CJK UNIFIED IDEOGRAPH + {0xC57A, 0x7380}, //5649 #CJK UNIFIED IDEOGRAPH + {0xC57B, 0x74E4}, //5650 #CJK UNIFIED IDEOGRAPH + {0xC57C, 0x758A}, //5651 #CJK UNIFIED IDEOGRAPH + {0xC57D, 0x766E}, //5652 #CJK UNIFIED IDEOGRAPH + {0xC57E, 0x766C}, //5653 #CJK UNIFIED IDEOGRAPH + {0xC5A1, 0x79B3}, //5654 #CJK UNIFIED IDEOGRAPH + {0xC5A2, 0x7C60}, //5655 #CJK UNIFIED IDEOGRAPH + {0xC5A3, 0x7C5F}, //5656 #CJK UNIFIED IDEOGRAPH + {0xC5A4, 0x807E}, //5657 #CJK UNIFIED IDEOGRAPH + {0xC5A5, 0x807D}, //5658 #CJK UNIFIED IDEOGRAPH + {0xC5A6, 0x81DF}, //5659 #CJK UNIFIED IDEOGRAPH + {0xC5A7, 0x8972}, //5660 #CJK UNIFIED IDEOGRAPH + {0xC5A8, 0x896F}, //5661 #CJK UNIFIED IDEOGRAPH + {0xC5A9, 0x89FC}, //5662 #CJK UNIFIED IDEOGRAPH + {0xC5AA, 0x8B80}, //5663 #CJK UNIFIED IDEOGRAPH + {0xC5AB, 0x8D16}, //5664 #CJK UNIFIED IDEOGRAPH + {0xC5AC, 0x8D17}, //5665 #CJK UNIFIED IDEOGRAPH + {0xC5AD, 0x8E91}, //5666 #CJK UNIFIED IDEOGRAPH + {0xC5AE, 0x8E93}, //5667 #CJK UNIFIED IDEOGRAPH + {0xC5AF, 0x8F61}, //5668 #CJK UNIFIED IDEOGRAPH + {0xC5B0, 0x9148}, //5669 #CJK UNIFIED IDEOGRAPH + {0xC5B1, 0x9444}, //5670 #CJK UNIFIED IDEOGRAPH + {0xC5B2, 0x9451}, //5671 #CJK UNIFIED IDEOGRAPH + {0xC5B3, 0x9452}, //5672 #CJK UNIFIED IDEOGRAPH + {0xC5B4, 0x973D}, //5673 #CJK UNIFIED IDEOGRAPH + {0xC5B5, 0x973E}, //5674 #CJK UNIFIED IDEOGRAPH + {0xC5B6, 0x97C3}, //5675 #CJK UNIFIED IDEOGRAPH + {0xC5B7, 0x97C1}, //5676 #CJK UNIFIED IDEOGRAPH + {0xC5B8, 0x986B}, //5677 #CJK UNIFIED IDEOGRAPH + {0xC5B9, 0x9955}, //5678 #CJK UNIFIED IDEOGRAPH + {0xC5BA, 0x9A55}, //5679 #CJK UNIFIED IDEOGRAPH + {0xC5BB, 0x9A4D}, //5680 #CJK UNIFIED IDEOGRAPH + {0xC5BC, 0x9AD2}, //5681 #CJK UNIFIED IDEOGRAPH + {0xC5BD, 0x9B1A}, //5682 #CJK UNIFIED IDEOGRAPH + {0xC5BE, 0x9C49}, //5683 #CJK UNIFIED IDEOGRAPH + {0xC5BF, 0x9C31}, //5684 #CJK UNIFIED IDEOGRAPH + {0xC5C0, 0x9C3E}, //5685 #CJK UNIFIED IDEOGRAPH + {0xC5C1, 0x9C3B}, //5686 #CJK UNIFIED IDEOGRAPH + {0xC5C2, 0x9DD3}, //5687 #CJK UNIFIED IDEOGRAPH + {0xC5C3, 0x9DD7}, //5688 #CJK UNIFIED IDEOGRAPH + {0xC5C4, 0x9F34}, //5689 #CJK UNIFIED IDEOGRAPH + {0xC5C5, 0x9F6C}, //5690 #CJK UNIFIED IDEOGRAPH + {0xC5C6, 0x9F6A}, //5691 #CJK UNIFIED IDEOGRAPH + {0xC5C7, 0x9F94}, //5692 #CJK UNIFIED IDEOGRAPH + {0xC5C8, 0x56CC}, //5693 #CJK UNIFIED IDEOGRAPH + {0xC5C9, 0x5DD6}, //5694 #CJK UNIFIED IDEOGRAPH + {0xC5CA, 0x6200}, //5695 #CJK UNIFIED IDEOGRAPH + {0xC5CB, 0x6523}, //5696 #CJK UNIFIED IDEOGRAPH + {0xC5CC, 0x652B}, //5697 #CJK UNIFIED IDEOGRAPH + {0xC5CD, 0x652A}, //5698 #CJK UNIFIED IDEOGRAPH + {0xC5CE, 0x66EC}, //5699 #CJK UNIFIED IDEOGRAPH + {0xC5CF, 0x6B10}, //5700 #CJK UNIFIED IDEOGRAPH + {0xC5D0, 0x74DA}, //5701 #CJK UNIFIED IDEOGRAPH + {0xC5D1, 0x7ACA}, //5702 #CJK UNIFIED IDEOGRAPH + {0xC5D2, 0x7C64}, //5703 #CJK UNIFIED IDEOGRAPH + {0xC5D3, 0x7C63}, //5704 #CJK UNIFIED IDEOGRAPH + {0xC5D4, 0x7C65}, //5705 #CJK UNIFIED IDEOGRAPH + {0xC5D5, 0x7E93}, //5706 #CJK UNIFIED IDEOGRAPH + {0xC5D6, 0x7E96}, //5707 #CJK UNIFIED IDEOGRAPH + {0xC5D7, 0x7E94}, //5708 #CJK UNIFIED IDEOGRAPH + {0xC5D8, 0x81E2}, //5709 #CJK UNIFIED IDEOGRAPH + {0xC5D9, 0x8638}, //5710 #CJK UNIFIED IDEOGRAPH + {0xC5DA, 0x863F}, //5711 #CJK UNIFIED IDEOGRAPH + {0xC5DB, 0x8831}, //5712 #CJK UNIFIED IDEOGRAPH + {0xC5DC, 0x8B8A}, //5713 #CJK UNIFIED IDEOGRAPH + {0xC5DD, 0x9090}, //5714 #CJK UNIFIED IDEOGRAPH + {0xC5DE, 0x908F}, //5715 #CJK UNIFIED IDEOGRAPH + {0xC5DF, 0x9463}, //5716 #CJK UNIFIED IDEOGRAPH + {0xC5E0, 0x9460}, //5717 #CJK UNIFIED IDEOGRAPH + {0xC5E1, 0x9464}, //5718 #CJK UNIFIED IDEOGRAPH + {0xC5E2, 0x9768}, //5719 #CJK UNIFIED IDEOGRAPH + {0xC5E3, 0x986F}, //5720 #CJK UNIFIED IDEOGRAPH + {0xC5E4, 0x995C}, //5721 #CJK UNIFIED IDEOGRAPH + {0xC5E5, 0x9A5A}, //5722 #CJK UNIFIED IDEOGRAPH + {0xC5E6, 0x9A5B}, //5723 #CJK UNIFIED IDEOGRAPH + {0xC5E7, 0x9A57}, //5724 #CJK UNIFIED IDEOGRAPH + {0xC5E8, 0x9AD3}, //5725 #CJK UNIFIED IDEOGRAPH + {0xC5E9, 0x9AD4}, //5726 #CJK UNIFIED IDEOGRAPH + {0xC5EA, 0x9AD1}, //5727 #CJK UNIFIED IDEOGRAPH + {0xC5EB, 0x9C54}, //5728 #CJK UNIFIED IDEOGRAPH + {0xC5EC, 0x9C57}, //5729 #CJK UNIFIED IDEOGRAPH + {0xC5ED, 0x9C56}, //5730 #CJK UNIFIED IDEOGRAPH + {0xC5EE, 0x9DE5}, //5731 #CJK UNIFIED IDEOGRAPH + {0xC5EF, 0x9E9F}, //5732 #CJK UNIFIED IDEOGRAPH + {0xC5F0, 0x9EF4}, //5733 #CJK UNIFIED IDEOGRAPH + {0xC5F1, 0x56D1}, //5734 #CJK UNIFIED IDEOGRAPH + {0xC5F2, 0x58E9}, //5735 #CJK UNIFIED IDEOGRAPH + {0xC5F3, 0x652C}, //5736 #CJK UNIFIED IDEOGRAPH + {0xC5F4, 0x705E}, //5737 #CJK UNIFIED IDEOGRAPH + {0xC5F5, 0x7671}, //5738 #CJK UNIFIED IDEOGRAPH + {0xC5F6, 0x7672}, //5739 #CJK UNIFIED IDEOGRAPH + {0xC5F7, 0x77D7}, //5740 #CJK UNIFIED IDEOGRAPH + {0xC5F8, 0x7F50}, //5741 #CJK UNIFIED IDEOGRAPH + {0xC5F9, 0x7F88}, //5742 #CJK UNIFIED IDEOGRAPH + {0xC5FA, 0x8836}, //5743 #CJK UNIFIED IDEOGRAPH + {0xC5FB, 0x8839}, //5744 #CJK UNIFIED IDEOGRAPH + {0xC5FC, 0x8862}, //5745 #CJK UNIFIED IDEOGRAPH + {0xC5FD, 0x8B93}, //5746 #CJK UNIFIED IDEOGRAPH + {0xC5FE, 0x8B92}, //5747 #CJK UNIFIED IDEOGRAPH + {0xC640, 0x8B96}, //5748 #CJK UNIFIED IDEOGRAPH + {0xC641, 0x8277}, //5749 #CJK UNIFIED IDEOGRAPH + {0xC642, 0x8D1B}, //5750 #CJK UNIFIED IDEOGRAPH + {0xC643, 0x91C0}, //5751 #CJK UNIFIED IDEOGRAPH + {0xC644, 0x946A}, //5752 #CJK UNIFIED IDEOGRAPH + {0xC645, 0x9742}, //5753 #CJK UNIFIED IDEOGRAPH + {0xC646, 0x9748}, //5754 #CJK UNIFIED IDEOGRAPH + {0xC647, 0x9744}, //5755 #CJK UNIFIED IDEOGRAPH + {0xC648, 0x97C6}, //5756 #CJK UNIFIED IDEOGRAPH + {0xC649, 0x9870}, //5757 #CJK UNIFIED IDEOGRAPH + {0xC64A, 0x9A5F}, //5758 #CJK UNIFIED IDEOGRAPH + {0xC64B, 0x9B22}, //5759 #CJK UNIFIED IDEOGRAPH + {0xC64C, 0x9B58}, //5760 #CJK UNIFIED IDEOGRAPH + {0xC64D, 0x9C5F}, //5761 #CJK UNIFIED IDEOGRAPH + {0xC64E, 0x9DF9}, //5762 #CJK UNIFIED IDEOGRAPH + {0xC64F, 0x9DFA}, //5763 #CJK UNIFIED IDEOGRAPH + {0xC650, 0x9E7C}, //5764 #CJK UNIFIED IDEOGRAPH + {0xC651, 0x9E7D}, //5765 #CJK UNIFIED IDEOGRAPH + {0xC652, 0x9F07}, //5766 #CJK UNIFIED IDEOGRAPH + {0xC653, 0x9F77}, //5767 #CJK UNIFIED IDEOGRAPH + {0xC654, 0x9F72}, //5768 #CJK UNIFIED IDEOGRAPH + {0xC655, 0x5EF3}, //5769 #CJK UNIFIED IDEOGRAPH + {0xC656, 0x6B16}, //5770 #CJK UNIFIED IDEOGRAPH + {0xC657, 0x7063}, //5771 #CJK UNIFIED IDEOGRAPH + {0xC658, 0x7C6C}, //5772 #CJK UNIFIED IDEOGRAPH + {0xC659, 0x7C6E}, //5773 #CJK UNIFIED IDEOGRAPH + {0xC65A, 0x883B}, //5774 #CJK UNIFIED IDEOGRAPH + {0xC65B, 0x89C0}, //5775 #CJK UNIFIED IDEOGRAPH + {0xC65C, 0x8EA1}, //5776 #CJK UNIFIED IDEOGRAPH + {0xC65D, 0x91C1}, //5777 #CJK UNIFIED IDEOGRAPH + {0xC65E, 0x9472}, //5778 #CJK UNIFIED IDEOGRAPH + {0xC65F, 0x9470}, //5779 #CJK UNIFIED IDEOGRAPH + {0xC660, 0x9871}, //5780 #CJK UNIFIED IDEOGRAPH + {0xC661, 0x995E}, //5781 #CJK UNIFIED IDEOGRAPH + {0xC662, 0x9AD6}, //5782 #CJK UNIFIED IDEOGRAPH + {0xC663, 0x9B23}, //5783 #CJK UNIFIED IDEOGRAPH + {0xC664, 0x9ECC}, //5784 #CJK UNIFIED IDEOGRAPH + {0xC665, 0x7064}, //5785 #CJK UNIFIED IDEOGRAPH + {0xC666, 0x77DA}, //5786 #CJK UNIFIED IDEOGRAPH + {0xC667, 0x8B9A}, //5787 #CJK UNIFIED IDEOGRAPH + {0xC668, 0x9477}, //5788 #CJK UNIFIED IDEOGRAPH + {0xC669, 0x97C9}, //5789 #CJK UNIFIED IDEOGRAPH + {0xC66A, 0x9A62}, //5790 #CJK UNIFIED IDEOGRAPH + {0xC66B, 0x9A65}, //5791 #CJK UNIFIED IDEOGRAPH + {0xC66C, 0x7E9C}, //5792 #CJK UNIFIED IDEOGRAPH + {0xC66D, 0x8B9C}, //5793 #CJK UNIFIED IDEOGRAPH + {0xC66E, 0x8EAA}, //5794 #CJK UNIFIED IDEOGRAPH + {0xC66F, 0x91C5}, //5795 #CJK UNIFIED IDEOGRAPH + {0xC670, 0x947D}, //5796 #CJK UNIFIED IDEOGRAPH + {0xC671, 0x947E}, //5797 #CJK UNIFIED IDEOGRAPH + {0xC672, 0x947C}, //5798 #CJK UNIFIED IDEOGRAPH + {0xC673, 0x9C77}, //5799 #CJK UNIFIED IDEOGRAPH + {0xC674, 0x9C78}, //5800 #CJK UNIFIED IDEOGRAPH + {0xC675, 0x9EF7}, //5801 #CJK UNIFIED IDEOGRAPH + {0xC676, 0x8C54}, //5802 #CJK UNIFIED IDEOGRAPH + {0xC677, 0x947F}, //5803 #CJK UNIFIED IDEOGRAPH + {0xC678, 0x9E1A}, //5804 #CJK UNIFIED IDEOGRAPH + {0xC679, 0x7228}, //5805 #CJK UNIFIED IDEOGRAPH + {0xC67A, 0x9A6A}, //5806 #CJK UNIFIED IDEOGRAPH + {0xC67B, 0x9B31}, //5807 #CJK UNIFIED IDEOGRAPH + {0xC67C, 0x9E1B}, //5808 #CJK UNIFIED IDEOGRAPH + {0xC67D, 0x9E1E}, //5809 #CJK UNIFIED IDEOGRAPH + {0xC67E, 0x7C72}, //5810 #CJK UNIFIED IDEOGRAPH + {0xC940, 0x4E42}, //5811 #CJK UNIFIED IDEOGRAPH + {0xC941, 0x4E5C}, //5812 #CJK UNIFIED IDEOGRAPH + {0xC942, 0x51F5}, //5813 #CJK UNIFIED IDEOGRAPH + {0xC943, 0x531A}, //5814 #CJK UNIFIED IDEOGRAPH + {0xC944, 0x5382}, //5815 #CJK UNIFIED IDEOGRAPH + {0xC945, 0x4E07}, //5816 #CJK UNIFIED IDEOGRAPH + {0xC946, 0x4E0C}, //5817 #CJK UNIFIED IDEOGRAPH + {0xC947, 0x4E47}, //5818 #CJK UNIFIED IDEOGRAPH + {0xC948, 0x4E8D}, //5819 #CJK UNIFIED IDEOGRAPH + {0xC949, 0x56D7}, //5820 #CJK UNIFIED IDEOGRAPH + {0xC94A, 0xFA0C}, //5821 #CJK COMPATIBILITY IDEOGRAPH + {0xC94B, 0x5C6E}, //5822 #CJK UNIFIED IDEOGRAPH + {0xC94C, 0x5F73}, //5823 #CJK UNIFIED IDEOGRAPH + {0xC94D, 0x4E0F}, //5824 #CJK UNIFIED IDEOGRAPH + {0xC94E, 0x5187}, //5825 #CJK UNIFIED IDEOGRAPH + {0xC94F, 0x4E0E}, //5826 #CJK UNIFIED IDEOGRAPH + {0xC950, 0x4E2E}, //5827 #CJK UNIFIED IDEOGRAPH + {0xC951, 0x4E93}, //5828 #CJK UNIFIED IDEOGRAPH + {0xC952, 0x4EC2}, //5829 #CJK UNIFIED IDEOGRAPH + {0xC953, 0x4EC9}, //5830 #CJK UNIFIED IDEOGRAPH + {0xC954, 0x4EC8}, //5831 #CJK UNIFIED IDEOGRAPH + {0xC955, 0x5198}, //5832 #CJK UNIFIED IDEOGRAPH + {0xC956, 0x52FC}, //5833 #CJK UNIFIED IDEOGRAPH + {0xC957, 0x536C}, //5834 #CJK UNIFIED IDEOGRAPH + {0xC958, 0x53B9}, //5835 #CJK UNIFIED IDEOGRAPH + {0xC959, 0x5720}, //5836 #CJK UNIFIED IDEOGRAPH + {0xC95A, 0x5903}, //5837 #CJK UNIFIED IDEOGRAPH + {0xC95B, 0x592C}, //5838 #CJK UNIFIED IDEOGRAPH + {0xC95C, 0x5C10}, //5839 #CJK UNIFIED IDEOGRAPH + {0xC95D, 0x5DFF}, //5840 #CJK UNIFIED IDEOGRAPH + {0xC95E, 0x65E1}, //5841 #CJK UNIFIED IDEOGRAPH + {0xC95F, 0x6BB3}, //5842 #CJK UNIFIED IDEOGRAPH + {0xC960, 0x6BCC}, //5843 #CJK UNIFIED IDEOGRAPH + {0xC961, 0x6C14}, //5844 #CJK UNIFIED IDEOGRAPH + {0xC962, 0x723F}, //5845 #CJK UNIFIED IDEOGRAPH + {0xC963, 0x4E31}, //5846 #CJK UNIFIED IDEOGRAPH + {0xC964, 0x4E3C}, //5847 #CJK UNIFIED IDEOGRAPH + {0xC965, 0x4EE8}, //5848 #CJK UNIFIED IDEOGRAPH + {0xC966, 0x4EDC}, //5849 #CJK UNIFIED IDEOGRAPH + {0xC967, 0x4EE9}, //5850 #CJK UNIFIED IDEOGRAPH + {0xC968, 0x4EE1}, //5851 #CJK UNIFIED IDEOGRAPH + {0xC969, 0x4EDD}, //5852 #CJK UNIFIED IDEOGRAPH + {0xC96A, 0x4EDA}, //5853 #CJK UNIFIED IDEOGRAPH + {0xC96B, 0x520C}, //5854 #CJK UNIFIED IDEOGRAPH + {0xC96C, 0x531C}, //5855 #CJK UNIFIED IDEOGRAPH + {0xC96D, 0x534C}, //5856 #CJK UNIFIED IDEOGRAPH + {0xC96E, 0x5722}, //5857 #CJK UNIFIED IDEOGRAPH + {0xC96F, 0x5723}, //5858 #CJK UNIFIED IDEOGRAPH + {0xC970, 0x5917}, //5859 #CJK UNIFIED IDEOGRAPH + {0xC971, 0x592F}, //5860 #CJK UNIFIED IDEOGRAPH + {0xC972, 0x5B81}, //5861 #CJK UNIFIED IDEOGRAPH + {0xC973, 0x5B84}, //5862 #CJK UNIFIED IDEOGRAPH + {0xC974, 0x5C12}, //5863 #CJK UNIFIED IDEOGRAPH + {0xC975, 0x5C3B}, //5864 #CJK UNIFIED IDEOGRAPH + {0xC976, 0x5C74}, //5865 #CJK UNIFIED IDEOGRAPH + {0xC977, 0x5C73}, //5866 #CJK UNIFIED IDEOGRAPH + {0xC978, 0x5E04}, //5867 #CJK UNIFIED IDEOGRAPH + {0xC979, 0x5E80}, //5868 #CJK UNIFIED IDEOGRAPH + {0xC97A, 0x5E82}, //5869 #CJK UNIFIED IDEOGRAPH + {0xC97B, 0x5FC9}, //5870 #CJK UNIFIED IDEOGRAPH + {0xC97C, 0x6209}, //5871 #CJK UNIFIED IDEOGRAPH + {0xC97D, 0x6250}, //5872 #CJK UNIFIED IDEOGRAPH + {0xC97E, 0x6C15}, //5873 #CJK UNIFIED IDEOGRAPH + {0xC9A1, 0x6C36}, //5874 #CJK UNIFIED IDEOGRAPH + {0xC9A2, 0x6C43}, //5875 #CJK UNIFIED IDEOGRAPH + {0xC9A3, 0x6C3F}, //5876 #CJK UNIFIED IDEOGRAPH + {0xC9A4, 0x6C3B}, //5877 #CJK UNIFIED IDEOGRAPH + {0xC9A5, 0x72AE}, //5878 #CJK UNIFIED IDEOGRAPH + {0xC9A6, 0x72B0}, //5879 #CJK UNIFIED IDEOGRAPH + {0xC9A7, 0x738A}, //5880 #CJK UNIFIED IDEOGRAPH + {0xC9A8, 0x79B8}, //5881 #CJK UNIFIED IDEOGRAPH + {0xC9A9, 0x808A}, //5882 #CJK UNIFIED IDEOGRAPH + {0xC9AA, 0x961E}, //5883 #CJK UNIFIED IDEOGRAPH + {0xC9AB, 0x4F0E}, //5884 #CJK UNIFIED IDEOGRAPH + {0xC9AC, 0x4F18}, //5885 #CJK UNIFIED IDEOGRAPH + {0xC9AD, 0x4F2C}, //5886 #CJK UNIFIED IDEOGRAPH + {0xC9AE, 0x4EF5}, //5887 #CJK UNIFIED IDEOGRAPH + {0xC9AF, 0x4F14}, //5888 #CJK UNIFIED IDEOGRAPH + {0xC9B0, 0x4EF1}, //5889 #CJK UNIFIED IDEOGRAPH + {0xC9B1, 0x4F00}, //5890 #CJK UNIFIED IDEOGRAPH + {0xC9B2, 0x4EF7}, //5891 #CJK UNIFIED IDEOGRAPH + {0xC9B3, 0x4F08}, //5892 #CJK UNIFIED IDEOGRAPH + {0xC9B4, 0x4F1D}, //5893 #CJK UNIFIED IDEOGRAPH + {0xC9B5, 0x4F02}, //5894 #CJK UNIFIED IDEOGRAPH + {0xC9B6, 0x4F05}, //5895 #CJK UNIFIED IDEOGRAPH + {0xC9B7, 0x4F22}, //5896 #CJK UNIFIED IDEOGRAPH + {0xC9B8, 0x4F13}, //5897 #CJK UNIFIED IDEOGRAPH + {0xC9B9, 0x4F04}, //5898 #CJK UNIFIED IDEOGRAPH + {0xC9BA, 0x4EF4}, //5899 #CJK UNIFIED IDEOGRAPH + {0xC9BB, 0x4F12}, //5900 #CJK UNIFIED IDEOGRAPH + {0xC9BC, 0x51B1}, //5901 #CJK UNIFIED IDEOGRAPH + {0xC9BD, 0x5213}, //5902 #CJK UNIFIED IDEOGRAPH + {0xC9BE, 0x5209}, //5903 #CJK UNIFIED IDEOGRAPH + {0xC9BF, 0x5210}, //5904 #CJK UNIFIED IDEOGRAPH + {0xC9C0, 0x52A6}, //5905 #CJK UNIFIED IDEOGRAPH + {0xC9C1, 0x5322}, //5906 #CJK UNIFIED IDEOGRAPH + {0xC9C2, 0x531F}, //5907 #CJK UNIFIED IDEOGRAPH + {0xC9C3, 0x534D}, //5908 #CJK UNIFIED IDEOGRAPH + {0xC9C4, 0x538A}, //5909 #CJK UNIFIED IDEOGRAPH + {0xC9C5, 0x5407}, //5910 #CJK UNIFIED IDEOGRAPH + {0xC9C6, 0x56E1}, //5911 #CJK UNIFIED IDEOGRAPH + {0xC9C7, 0x56DF}, //5912 #CJK UNIFIED IDEOGRAPH + {0xC9C8, 0x572E}, //5913 #CJK UNIFIED IDEOGRAPH + {0xC9C9, 0x572A}, //5914 #CJK UNIFIED IDEOGRAPH + {0xC9CA, 0x5734}, //5915 #CJK UNIFIED IDEOGRAPH + {0xC9CB, 0x593C}, //5916 #CJK UNIFIED IDEOGRAPH + {0xC9CC, 0x5980}, //5917 #CJK UNIFIED IDEOGRAPH + {0xC9CD, 0x597C}, //5918 #CJK UNIFIED IDEOGRAPH + {0xC9CE, 0x5985}, //5919 #CJK UNIFIED IDEOGRAPH + {0xC9CF, 0x597B}, //5920 #CJK UNIFIED IDEOGRAPH + {0xC9D0, 0x597E}, //5921 #CJK UNIFIED IDEOGRAPH + {0xC9D1, 0x5977}, //5922 #CJK UNIFIED IDEOGRAPH + {0xC9D2, 0x597F}, //5923 #CJK UNIFIED IDEOGRAPH + {0xC9D3, 0x5B56}, //5924 #CJK UNIFIED IDEOGRAPH + {0xC9D4, 0x5C15}, //5925 #CJK UNIFIED IDEOGRAPH + {0xC9D5, 0x5C25}, //5926 #CJK UNIFIED IDEOGRAPH + {0xC9D6, 0x5C7C}, //5927 #CJK UNIFIED IDEOGRAPH + {0xC9D7, 0x5C7A}, //5928 #CJK UNIFIED IDEOGRAPH + {0xC9D8, 0x5C7B}, //5929 #CJK UNIFIED IDEOGRAPH + {0xC9D9, 0x5C7E}, //5930 #CJK UNIFIED IDEOGRAPH + {0xC9DA, 0x5DDF}, //5931 #CJK UNIFIED IDEOGRAPH + {0xC9DB, 0x5E75}, //5932 #CJK UNIFIED IDEOGRAPH + {0xC9DC, 0x5E84}, //5933 #CJK UNIFIED IDEOGRAPH + {0xC9DD, 0x5F02}, //5934 #CJK UNIFIED IDEOGRAPH + {0xC9DE, 0x5F1A}, //5935 #CJK UNIFIED IDEOGRAPH + {0xC9DF, 0x5F74}, //5936 #CJK UNIFIED IDEOGRAPH + {0xC9E0, 0x5FD5}, //5937 #CJK UNIFIED IDEOGRAPH + {0xC9E1, 0x5FD4}, //5938 #CJK UNIFIED IDEOGRAPH + {0xC9E2, 0x5FCF}, //5939 #CJK UNIFIED IDEOGRAPH + {0xC9E3, 0x625C}, //5940 #CJK UNIFIED IDEOGRAPH + {0xC9E4, 0x625E}, //5941 #CJK UNIFIED IDEOGRAPH + {0xC9E5, 0x6264}, //5942 #CJK UNIFIED IDEOGRAPH + {0xC9E6, 0x6261}, //5943 #CJK UNIFIED IDEOGRAPH + {0xC9E7, 0x6266}, //5944 #CJK UNIFIED IDEOGRAPH + {0xC9E8, 0x6262}, //5945 #CJK UNIFIED IDEOGRAPH + {0xC9E9, 0x6259}, //5946 #CJK UNIFIED IDEOGRAPH + {0xC9EA, 0x6260}, //5947 #CJK UNIFIED IDEOGRAPH + {0xC9EB, 0x625A}, //5948 #CJK UNIFIED IDEOGRAPH + {0xC9EC, 0x6265}, //5949 #CJK UNIFIED IDEOGRAPH + {0xC9ED, 0x65EF}, //5950 #CJK UNIFIED IDEOGRAPH + {0xC9EE, 0x65EE}, //5951 #CJK UNIFIED IDEOGRAPH + {0xC9EF, 0x673E}, //5952 #CJK UNIFIED IDEOGRAPH + {0xC9F0, 0x6739}, //5953 #CJK UNIFIED IDEOGRAPH + {0xC9F1, 0x6738}, //5954 #CJK UNIFIED IDEOGRAPH + {0xC9F2, 0x673B}, //5955 #CJK UNIFIED IDEOGRAPH + {0xC9F3, 0x673A}, //5956 #CJK UNIFIED IDEOGRAPH + {0xC9F4, 0x673F}, //5957 #CJK UNIFIED IDEOGRAPH + {0xC9F5, 0x673C}, //5958 #CJK UNIFIED IDEOGRAPH + {0xC9F6, 0x6733}, //5959 #CJK UNIFIED IDEOGRAPH + {0xC9F7, 0x6C18}, //5960 #CJK UNIFIED IDEOGRAPH + {0xC9F8, 0x6C46}, //5961 #CJK UNIFIED IDEOGRAPH + {0xC9F9, 0x6C52}, //5962 #CJK UNIFIED IDEOGRAPH + {0xC9FA, 0x6C5C}, //5963 #CJK UNIFIED IDEOGRAPH + {0xC9FB, 0x6C4F}, //5964 #CJK UNIFIED IDEOGRAPH + {0xC9FC, 0x6C4A}, //5965 #CJK UNIFIED IDEOGRAPH + {0xC9FD, 0x6C54}, //5966 #CJK UNIFIED IDEOGRAPH + {0xC9FE, 0x6C4B}, //5967 #CJK UNIFIED IDEOGRAPH + {0xCA40, 0x6C4C}, //5968 #CJK UNIFIED IDEOGRAPH + {0xCA41, 0x7071}, //5969 #CJK UNIFIED IDEOGRAPH + {0xCA42, 0x725E}, //5970 #CJK UNIFIED IDEOGRAPH + {0xCA43, 0x72B4}, //5971 #CJK UNIFIED IDEOGRAPH + {0xCA44, 0x72B5}, //5972 #CJK UNIFIED IDEOGRAPH + {0xCA45, 0x738E}, //5973 #CJK UNIFIED IDEOGRAPH + {0xCA46, 0x752A}, //5974 #CJK UNIFIED IDEOGRAPH + {0xCA47, 0x767F}, //5975 #CJK UNIFIED IDEOGRAPH + {0xCA48, 0x7A75}, //5976 #CJK UNIFIED IDEOGRAPH + {0xCA49, 0x7F51}, //5977 #CJK UNIFIED IDEOGRAPH + {0xCA4A, 0x8278}, //5978 #CJK UNIFIED IDEOGRAPH + {0xCA4B, 0x827C}, //5979 #CJK UNIFIED IDEOGRAPH + {0xCA4C, 0x8280}, //5980 #CJK UNIFIED IDEOGRAPH + {0xCA4D, 0x827D}, //5981 #CJK UNIFIED IDEOGRAPH + {0xCA4E, 0x827F}, //5982 #CJK UNIFIED IDEOGRAPH + {0xCA4F, 0x864D}, //5983 #CJK UNIFIED IDEOGRAPH + {0xCA50, 0x897E}, //5984 #CJK UNIFIED IDEOGRAPH + {0xCA51, 0x9099}, //5985 #CJK UNIFIED IDEOGRAPH + {0xCA52, 0x9097}, //5986 #CJK UNIFIED IDEOGRAPH + {0xCA53, 0x9098}, //5987 #CJK UNIFIED IDEOGRAPH + {0xCA54, 0x909B}, //5988 #CJK UNIFIED IDEOGRAPH + {0xCA55, 0x9094}, //5989 #CJK UNIFIED IDEOGRAPH + {0xCA56, 0x9622}, //5990 #CJK UNIFIED IDEOGRAPH + {0xCA57, 0x9624}, //5991 #CJK UNIFIED IDEOGRAPH + {0xCA58, 0x9620}, //5992 #CJK UNIFIED IDEOGRAPH + {0xCA59, 0x9623}, //5993 #CJK UNIFIED IDEOGRAPH + {0xCA5A, 0x4F56}, //5994 #CJK UNIFIED IDEOGRAPH + {0xCA5B, 0x4F3B}, //5995 #CJK UNIFIED IDEOGRAPH + {0xCA5C, 0x4F62}, //5996 #CJK UNIFIED IDEOGRAPH + {0xCA5D, 0x4F49}, //5997 #CJK UNIFIED IDEOGRAPH + {0xCA5E, 0x4F53}, //5998 #CJK UNIFIED IDEOGRAPH + {0xCA5F, 0x4F64}, //5999 #CJK UNIFIED IDEOGRAPH + {0xCA60, 0x4F3E}, //6000 #CJK UNIFIED IDEOGRAPH + {0xCA61, 0x4F67}, //6001 #CJK UNIFIED IDEOGRAPH + {0xCA62, 0x4F52}, //6002 #CJK UNIFIED IDEOGRAPH + {0xCA63, 0x4F5F}, //6003 #CJK UNIFIED IDEOGRAPH + {0xCA64, 0x4F41}, //6004 #CJK UNIFIED IDEOGRAPH + {0xCA65, 0x4F58}, //6005 #CJK UNIFIED IDEOGRAPH + {0xCA66, 0x4F2D}, //6006 #CJK UNIFIED IDEOGRAPH + {0xCA67, 0x4F33}, //6007 #CJK UNIFIED IDEOGRAPH + {0xCA68, 0x4F3F}, //6008 #CJK UNIFIED IDEOGRAPH + {0xCA69, 0x4F61}, //6009 #CJK UNIFIED IDEOGRAPH + {0xCA6A, 0x518F}, //6010 #CJK UNIFIED IDEOGRAPH + {0xCA6B, 0x51B9}, //6011 #CJK UNIFIED IDEOGRAPH + {0xCA6C, 0x521C}, //6012 #CJK UNIFIED IDEOGRAPH + {0xCA6D, 0x521E}, //6013 #CJK UNIFIED IDEOGRAPH + {0xCA6E, 0x5221}, //6014 #CJK UNIFIED IDEOGRAPH + {0xCA6F, 0x52AD}, //6015 #CJK UNIFIED IDEOGRAPH + {0xCA70, 0x52AE}, //6016 #CJK UNIFIED IDEOGRAPH + {0xCA71, 0x5309}, //6017 #CJK UNIFIED IDEOGRAPH + {0xCA72, 0x5363}, //6018 #CJK UNIFIED IDEOGRAPH + {0xCA73, 0x5372}, //6019 #CJK UNIFIED IDEOGRAPH + {0xCA74, 0x538E}, //6020 #CJK UNIFIED IDEOGRAPH + {0xCA75, 0x538F}, //6021 #CJK UNIFIED IDEOGRAPH + {0xCA76, 0x5430}, //6022 #CJK UNIFIED IDEOGRAPH + {0xCA77, 0x5437}, //6023 #CJK UNIFIED IDEOGRAPH + {0xCA78, 0x542A}, //6024 #CJK UNIFIED IDEOGRAPH + {0xCA79, 0x5454}, //6025 #CJK UNIFIED IDEOGRAPH + {0xCA7A, 0x5445}, //6026 #CJK UNIFIED IDEOGRAPH + {0xCA7B, 0x5419}, //6027 #CJK UNIFIED IDEOGRAPH + {0xCA7C, 0x541C}, //6028 #CJK UNIFIED IDEOGRAPH + {0xCA7D, 0x5425}, //6029 #CJK UNIFIED IDEOGRAPH + {0xCA7E, 0x5418}, //6030 #CJK UNIFIED IDEOGRAPH + {0xCAA1, 0x543D}, //6031 #CJK UNIFIED IDEOGRAPH + {0xCAA2, 0x544F}, //6032 #CJK UNIFIED IDEOGRAPH + {0xCAA3, 0x5441}, //6033 #CJK UNIFIED IDEOGRAPH + {0xCAA4, 0x5428}, //6034 #CJK UNIFIED IDEOGRAPH + {0xCAA5, 0x5424}, //6035 #CJK UNIFIED IDEOGRAPH + {0xCAA6, 0x5447}, //6036 #CJK UNIFIED IDEOGRAPH + {0xCAA7, 0x56EE}, //6037 #CJK UNIFIED IDEOGRAPH + {0xCAA8, 0x56E7}, //6038 #CJK UNIFIED IDEOGRAPH + {0xCAA9, 0x56E5}, //6039 #CJK UNIFIED IDEOGRAPH + {0xCAAA, 0x5741}, //6040 #CJK UNIFIED IDEOGRAPH + {0xCAAB, 0x5745}, //6041 #CJK UNIFIED IDEOGRAPH + {0xCAAC, 0x574C}, //6042 #CJK UNIFIED IDEOGRAPH + {0xCAAD, 0x5749}, //6043 #CJK UNIFIED IDEOGRAPH + {0xCAAE, 0x574B}, //6044 #CJK UNIFIED IDEOGRAPH + {0xCAAF, 0x5752}, //6045 #CJK UNIFIED IDEOGRAPH + {0xCAB0, 0x5906}, //6046 #CJK UNIFIED IDEOGRAPH + {0xCAB1, 0x5940}, //6047 #CJK UNIFIED IDEOGRAPH + {0xCAB2, 0x59A6}, //6048 #CJK UNIFIED IDEOGRAPH + {0xCAB3, 0x5998}, //6049 #CJK UNIFIED IDEOGRAPH + {0xCAB4, 0x59A0}, //6050 #CJK UNIFIED IDEOGRAPH + {0xCAB5, 0x5997}, //6051 #CJK UNIFIED IDEOGRAPH + {0xCAB6, 0x598E}, //6052 #CJK UNIFIED IDEOGRAPH + {0xCAB7, 0x59A2}, //6053 #CJK UNIFIED IDEOGRAPH + {0xCAB8, 0x5990}, //6054 #CJK UNIFIED IDEOGRAPH + {0xCAB9, 0x598F}, //6055 #CJK UNIFIED IDEOGRAPH + {0xCABA, 0x59A7}, //6056 #CJK UNIFIED IDEOGRAPH + {0xCABB, 0x59A1}, //6057 #CJK UNIFIED IDEOGRAPH + {0xCABC, 0x5B8E}, //6058 #CJK UNIFIED IDEOGRAPH + {0xCABD, 0x5B92}, //6059 #CJK UNIFIED IDEOGRAPH + {0xCABE, 0x5C28}, //6060 #CJK UNIFIED IDEOGRAPH + {0xCABF, 0x5C2A}, //6061 #CJK UNIFIED IDEOGRAPH + {0xCAC0, 0x5C8D}, //6062 #CJK UNIFIED IDEOGRAPH + {0xCAC1, 0x5C8F}, //6063 #CJK UNIFIED IDEOGRAPH + {0xCAC2, 0x5C88}, //6064 #CJK UNIFIED IDEOGRAPH + {0xCAC3, 0x5C8B}, //6065 #CJK UNIFIED IDEOGRAPH + {0xCAC4, 0x5C89}, //6066 #CJK UNIFIED IDEOGRAPH + {0xCAC5, 0x5C92}, //6067 #CJK UNIFIED IDEOGRAPH + {0xCAC6, 0x5C8A}, //6068 #CJK UNIFIED IDEOGRAPH + {0xCAC7, 0x5C86}, //6069 #CJK UNIFIED IDEOGRAPH + {0xCAC8, 0x5C93}, //6070 #CJK UNIFIED IDEOGRAPH + {0xCAC9, 0x5C95}, //6071 #CJK UNIFIED IDEOGRAPH + {0xCACA, 0x5DE0}, //6072 #CJK UNIFIED IDEOGRAPH + {0xCACB, 0x5E0A}, //6073 #CJK UNIFIED IDEOGRAPH + {0xCACC, 0x5E0E}, //6074 #CJK UNIFIED IDEOGRAPH + {0xCACD, 0x5E8B}, //6075 #CJK UNIFIED IDEOGRAPH + {0xCACE, 0x5E89}, //6076 #CJK UNIFIED IDEOGRAPH + {0xCACF, 0x5E8C}, //6077 #CJK UNIFIED IDEOGRAPH + {0xCAD0, 0x5E88}, //6078 #CJK UNIFIED IDEOGRAPH + {0xCAD1, 0x5E8D}, //6079 #CJK UNIFIED IDEOGRAPH + {0xCAD2, 0x5F05}, //6080 #CJK UNIFIED IDEOGRAPH + {0xCAD3, 0x5F1D}, //6081 #CJK UNIFIED IDEOGRAPH + {0xCAD4, 0x5F78}, //6082 #CJK UNIFIED IDEOGRAPH + {0xCAD5, 0x5F76}, //6083 #CJK UNIFIED IDEOGRAPH + {0xCAD6, 0x5FD2}, //6084 #CJK UNIFIED IDEOGRAPH + {0xCAD7, 0x5FD1}, //6085 #CJK UNIFIED IDEOGRAPH + {0xCAD8, 0x5FD0}, //6086 #CJK UNIFIED IDEOGRAPH + {0xCAD9, 0x5FED}, //6087 #CJK UNIFIED IDEOGRAPH + {0xCADA, 0x5FE8}, //6088 #CJK UNIFIED IDEOGRAPH + {0xCADB, 0x5FEE}, //6089 #CJK UNIFIED IDEOGRAPH + {0xCADC, 0x5FF3}, //6090 #CJK UNIFIED IDEOGRAPH + {0xCADD, 0x5FE1}, //6091 #CJK UNIFIED IDEOGRAPH + {0xCADE, 0x5FE4}, //6092 #CJK UNIFIED IDEOGRAPH + {0xCADF, 0x5FE3}, //6093 #CJK UNIFIED IDEOGRAPH + {0xCAE0, 0x5FFA}, //6094 #CJK UNIFIED IDEOGRAPH + {0xCAE1, 0x5FEF}, //6095 #CJK UNIFIED IDEOGRAPH + {0xCAE2, 0x5FF7}, //6096 #CJK UNIFIED IDEOGRAPH + {0xCAE3, 0x5FFB}, //6097 #CJK UNIFIED IDEOGRAPH + {0xCAE4, 0x6000}, //6098 #CJK UNIFIED IDEOGRAPH + {0xCAE5, 0x5FF4}, //6099 #CJK UNIFIED IDEOGRAPH + {0xCAE6, 0x623A}, //6100 #CJK UNIFIED IDEOGRAPH + {0xCAE7, 0x6283}, //6101 #CJK UNIFIED IDEOGRAPH + {0xCAE8, 0x628C}, //6102 #CJK UNIFIED IDEOGRAPH + {0xCAE9, 0x628E}, //6103 #CJK UNIFIED IDEOGRAPH + {0xCAEA, 0x628F}, //6104 #CJK UNIFIED IDEOGRAPH + {0xCAEB, 0x6294}, //6105 #CJK UNIFIED IDEOGRAPH + {0xCAEC, 0x6287}, //6106 #CJK UNIFIED IDEOGRAPH + {0xCAED, 0x6271}, //6107 #CJK UNIFIED IDEOGRAPH + {0xCAEE, 0x627B}, //6108 #CJK UNIFIED IDEOGRAPH + {0xCAEF, 0x627A}, //6109 #CJK UNIFIED IDEOGRAPH + {0xCAF0, 0x6270}, //6110 #CJK UNIFIED IDEOGRAPH + {0xCAF1, 0x6281}, //6111 #CJK UNIFIED IDEOGRAPH + {0xCAF2, 0x6288}, //6112 #CJK UNIFIED IDEOGRAPH + {0xCAF3, 0x6277}, //6113 #CJK UNIFIED IDEOGRAPH + {0xCAF4, 0x627D}, //6114 #CJK UNIFIED IDEOGRAPH + {0xCAF5, 0x6272}, //6115 #CJK UNIFIED IDEOGRAPH + {0xCAF6, 0x6274}, //6116 #CJK UNIFIED IDEOGRAPH + {0xCAF7, 0x6537}, //6117 #CJK UNIFIED IDEOGRAPH + {0xCAF8, 0x65F0}, //6118 #CJK UNIFIED IDEOGRAPH + {0xCAF9, 0x65F4}, //6119 #CJK UNIFIED IDEOGRAPH + {0xCAFA, 0x65F3}, //6120 #CJK UNIFIED IDEOGRAPH + {0xCAFB, 0x65F2}, //6121 #CJK UNIFIED IDEOGRAPH + {0xCAFC, 0x65F5}, //6122 #CJK UNIFIED IDEOGRAPH + {0xCAFD, 0x6745}, //6123 #CJK UNIFIED IDEOGRAPH + {0xCAFE, 0x6747}, //6124 #CJK UNIFIED IDEOGRAPH + {0xCB40, 0x6759}, //6125 #CJK UNIFIED IDEOGRAPH + {0xCB41, 0x6755}, //6126 #CJK UNIFIED IDEOGRAPH + {0xCB42, 0x674C}, //6127 #CJK UNIFIED IDEOGRAPH + {0xCB43, 0x6748}, //6128 #CJK UNIFIED IDEOGRAPH + {0xCB44, 0x675D}, //6129 #CJK UNIFIED IDEOGRAPH + {0xCB45, 0x674D}, //6130 #CJK UNIFIED IDEOGRAPH + {0xCB46, 0x675A}, //6131 #CJK UNIFIED IDEOGRAPH + {0xCB47, 0x674B}, //6132 #CJK UNIFIED IDEOGRAPH + {0xCB48, 0x6BD0}, //6133 #CJK UNIFIED IDEOGRAPH + {0xCB49, 0x6C19}, //6134 #CJK UNIFIED IDEOGRAPH + {0xCB4A, 0x6C1A}, //6135 #CJK UNIFIED IDEOGRAPH + {0xCB4B, 0x6C78}, //6136 #CJK UNIFIED IDEOGRAPH + {0xCB4C, 0x6C67}, //6137 #CJK UNIFIED IDEOGRAPH + {0xCB4D, 0x6C6B}, //6138 #CJK UNIFIED IDEOGRAPH + {0xCB4E, 0x6C84}, //6139 #CJK UNIFIED IDEOGRAPH + {0xCB4F, 0x6C8B}, //6140 #CJK UNIFIED IDEOGRAPH + {0xCB50, 0x6C8F}, //6141 #CJK UNIFIED IDEOGRAPH + {0xCB51, 0x6C71}, //6142 #CJK UNIFIED IDEOGRAPH + {0xCB52, 0x6C6F}, //6143 #CJK UNIFIED IDEOGRAPH + {0xCB53, 0x6C69}, //6144 #CJK UNIFIED IDEOGRAPH + {0xCB54, 0x6C9A}, //6145 #CJK UNIFIED IDEOGRAPH + {0xCB55, 0x6C6D}, //6146 #CJK UNIFIED IDEOGRAPH + {0xCB56, 0x6C87}, //6147 #CJK UNIFIED IDEOGRAPH + {0xCB57, 0x6C95}, //6148 #CJK UNIFIED IDEOGRAPH + {0xCB58, 0x6C9C}, //6149 #CJK UNIFIED IDEOGRAPH + {0xCB59, 0x6C66}, //6150 #CJK UNIFIED IDEOGRAPH + {0xCB5A, 0x6C73}, //6151 #CJK UNIFIED IDEOGRAPH + {0xCB5B, 0x6C65}, //6152 #CJK UNIFIED IDEOGRAPH + {0xCB5C, 0x6C7B}, //6153 #CJK UNIFIED IDEOGRAPH + {0xCB5D, 0x6C8E}, //6154 #CJK UNIFIED IDEOGRAPH + {0xCB5E, 0x7074}, //6155 #CJK UNIFIED IDEOGRAPH + {0xCB5F, 0x707A}, //6156 #CJK UNIFIED IDEOGRAPH + {0xCB60, 0x7263}, //6157 #CJK UNIFIED IDEOGRAPH + {0xCB61, 0x72BF}, //6158 #CJK UNIFIED IDEOGRAPH + {0xCB62, 0x72BD}, //6159 #CJK UNIFIED IDEOGRAPH + {0xCB63, 0x72C3}, //6160 #CJK UNIFIED IDEOGRAPH + {0xCB64, 0x72C6}, //6161 #CJK UNIFIED IDEOGRAPH + {0xCB65, 0x72C1}, //6162 #CJK UNIFIED IDEOGRAPH + {0xCB66, 0x72BA}, //6163 #CJK UNIFIED IDEOGRAPH + {0xCB67, 0x72C5}, //6164 #CJK UNIFIED IDEOGRAPH + {0xCB68, 0x7395}, //6165 #CJK UNIFIED IDEOGRAPH + {0xCB69, 0x7397}, //6166 #CJK UNIFIED IDEOGRAPH + {0xCB6A, 0x7393}, //6167 #CJK UNIFIED IDEOGRAPH + {0xCB6B, 0x7394}, //6168 #CJK UNIFIED IDEOGRAPH + {0xCB6C, 0x7392}, //6169 #CJK UNIFIED IDEOGRAPH + {0xCB6D, 0x753A}, //6170 #CJK UNIFIED IDEOGRAPH + {0xCB6E, 0x7539}, //6171 #CJK UNIFIED IDEOGRAPH + {0xCB6F, 0x7594}, //6172 #CJK UNIFIED IDEOGRAPH + {0xCB70, 0x7595}, //6173 #CJK UNIFIED IDEOGRAPH + {0xCB71, 0x7681}, //6174 #CJK UNIFIED IDEOGRAPH + {0xCB72, 0x793D}, //6175 #CJK UNIFIED IDEOGRAPH + {0xCB73, 0x8034}, //6176 #CJK UNIFIED IDEOGRAPH + {0xCB74, 0x8095}, //6177 #CJK UNIFIED IDEOGRAPH + {0xCB75, 0x8099}, //6178 #CJK UNIFIED IDEOGRAPH + {0xCB76, 0x8090}, //6179 #CJK UNIFIED IDEOGRAPH + {0xCB77, 0x8092}, //6180 #CJK UNIFIED IDEOGRAPH + {0xCB78, 0x809C}, //6181 #CJK UNIFIED IDEOGRAPH + {0xCB79, 0x8290}, //6182 #CJK UNIFIED IDEOGRAPH + {0xCB7A, 0x828F}, //6183 #CJK UNIFIED IDEOGRAPH + {0xCB7B, 0x8285}, //6184 #CJK UNIFIED IDEOGRAPH + {0xCB7C, 0x828E}, //6185 #CJK UNIFIED IDEOGRAPH + {0xCB7D, 0x8291}, //6186 #CJK UNIFIED IDEOGRAPH + {0xCB7E, 0x8293}, //6187 #CJK UNIFIED IDEOGRAPH + {0xCBA1, 0x828A}, //6188 #CJK UNIFIED IDEOGRAPH + {0xCBA2, 0x8283}, //6189 #CJK UNIFIED IDEOGRAPH + {0xCBA3, 0x8284}, //6190 #CJK UNIFIED IDEOGRAPH + {0xCBA4, 0x8C78}, //6191 #CJK UNIFIED IDEOGRAPH + {0xCBA5, 0x8FC9}, //6192 #CJK UNIFIED IDEOGRAPH + {0xCBA6, 0x8FBF}, //6193 #CJK UNIFIED IDEOGRAPH + {0xCBA7, 0x909F}, //6194 #CJK UNIFIED IDEOGRAPH + {0xCBA8, 0x90A1}, //6195 #CJK UNIFIED IDEOGRAPH + {0xCBA9, 0x90A5}, //6196 #CJK UNIFIED IDEOGRAPH + {0xCBAA, 0x909E}, //6197 #CJK UNIFIED IDEOGRAPH + {0xCBAB, 0x90A7}, //6198 #CJK UNIFIED IDEOGRAPH + {0xCBAC, 0x90A0}, //6199 #CJK UNIFIED IDEOGRAPH + {0xCBAD, 0x9630}, //6200 #CJK UNIFIED IDEOGRAPH + {0xCBAE, 0x9628}, //6201 #CJK UNIFIED IDEOGRAPH + {0xCBAF, 0x962F}, //6202 #CJK UNIFIED IDEOGRAPH + {0xCBB0, 0x962D}, //6203 #CJK UNIFIED IDEOGRAPH + {0xCBB1, 0x4E33}, //6204 #CJK UNIFIED IDEOGRAPH + {0xCBB2, 0x4F98}, //6205 #CJK UNIFIED IDEOGRAPH + {0xCBB3, 0x4F7C}, //6206 #CJK UNIFIED IDEOGRAPH + {0xCBB4, 0x4F85}, //6207 #CJK UNIFIED IDEOGRAPH + {0xCBB5, 0x4F7D}, //6208 #CJK UNIFIED IDEOGRAPH + {0xCBB6, 0x4F80}, //6209 #CJK UNIFIED IDEOGRAPH + {0xCBB7, 0x4F87}, //6210 #CJK UNIFIED IDEOGRAPH + {0xCBB8, 0x4F76}, //6211 #CJK UNIFIED IDEOGRAPH + {0xCBB9, 0x4F74}, //6212 #CJK UNIFIED IDEOGRAPH + {0xCBBA, 0x4F89}, //6213 #CJK UNIFIED IDEOGRAPH + {0xCBBB, 0x4F84}, //6214 #CJK UNIFIED IDEOGRAPH + {0xCBBC, 0x4F77}, //6215 #CJK UNIFIED IDEOGRAPH + {0xCBBD, 0x4F4C}, //6216 #CJK UNIFIED IDEOGRAPH + {0xCBBE, 0x4F97}, //6217 #CJK UNIFIED IDEOGRAPH + {0xCBBF, 0x4F6A}, //6218 #CJK UNIFIED IDEOGRAPH + {0xCBC0, 0x4F9A}, //6219 #CJK UNIFIED IDEOGRAPH + {0xCBC1, 0x4F79}, //6220 #CJK UNIFIED IDEOGRAPH + {0xCBC2, 0x4F81}, //6221 #CJK UNIFIED IDEOGRAPH + {0xCBC3, 0x4F78}, //6222 #CJK UNIFIED IDEOGRAPH + {0xCBC4, 0x4F90}, //6223 #CJK UNIFIED IDEOGRAPH + {0xCBC5, 0x4F9C}, //6224 #CJK UNIFIED IDEOGRAPH + {0xCBC6, 0x4F94}, //6225 #CJK UNIFIED IDEOGRAPH + {0xCBC7, 0x4F9E}, //6226 #CJK UNIFIED IDEOGRAPH + {0xCBC8, 0x4F92}, //6227 #CJK UNIFIED IDEOGRAPH + {0xCBC9, 0x4F82}, //6228 #CJK UNIFIED IDEOGRAPH + {0xCBCA, 0x4F95}, //6229 #CJK UNIFIED IDEOGRAPH + {0xCBCB, 0x4F6B}, //6230 #CJK UNIFIED IDEOGRAPH + {0xCBCC, 0x4F6E}, //6231 #CJK UNIFIED IDEOGRAPH + {0xCBCD, 0x519E}, //6232 #CJK UNIFIED IDEOGRAPH + {0xCBCE, 0x51BC}, //6233 #CJK UNIFIED IDEOGRAPH + {0xCBCF, 0x51BE}, //6234 #CJK UNIFIED IDEOGRAPH + {0xCBD0, 0x5235}, //6235 #CJK UNIFIED IDEOGRAPH + {0xCBD1, 0x5232}, //6236 #CJK UNIFIED IDEOGRAPH + {0xCBD2, 0x5233}, //6237 #CJK UNIFIED IDEOGRAPH + {0xCBD3, 0x5246}, //6238 #CJK UNIFIED IDEOGRAPH + {0xCBD4, 0x5231}, //6239 #CJK UNIFIED IDEOGRAPH + {0xCBD5, 0x52BC}, //6240 #CJK UNIFIED IDEOGRAPH + {0xCBD6, 0x530A}, //6241 #CJK UNIFIED IDEOGRAPH + {0xCBD7, 0x530B}, //6242 #CJK UNIFIED IDEOGRAPH + {0xCBD8, 0x533C}, //6243 #CJK UNIFIED IDEOGRAPH + {0xCBD9, 0x5392}, //6244 #CJK UNIFIED IDEOGRAPH + {0xCBDA, 0x5394}, //6245 #CJK UNIFIED IDEOGRAPH + {0xCBDB, 0x5487}, //6246 #CJK UNIFIED IDEOGRAPH + {0xCBDC, 0x547F}, //6247 #CJK UNIFIED IDEOGRAPH + {0xCBDD, 0x5481}, //6248 #CJK UNIFIED IDEOGRAPH + {0xCBDE, 0x5491}, //6249 #CJK UNIFIED IDEOGRAPH + {0xCBDF, 0x5482}, //6250 #CJK UNIFIED IDEOGRAPH + {0xCBE0, 0x5488}, //6251 #CJK UNIFIED IDEOGRAPH + {0xCBE1, 0x546B}, //6252 #CJK UNIFIED IDEOGRAPH + {0xCBE2, 0x547A}, //6253 #CJK UNIFIED IDEOGRAPH + {0xCBE3, 0x547E}, //6254 #CJK UNIFIED IDEOGRAPH + {0xCBE4, 0x5465}, //6255 #CJK UNIFIED IDEOGRAPH + {0xCBE5, 0x546C}, //6256 #CJK UNIFIED IDEOGRAPH + {0xCBE6, 0x5474}, //6257 #CJK UNIFIED IDEOGRAPH + {0xCBE7, 0x5466}, //6258 #CJK UNIFIED IDEOGRAPH + {0xCBE8, 0x548D}, //6259 #CJK UNIFIED IDEOGRAPH + {0xCBE9, 0x546F}, //6260 #CJK UNIFIED IDEOGRAPH + {0xCBEA, 0x5461}, //6261 #CJK UNIFIED IDEOGRAPH + {0xCBEB, 0x5460}, //6262 #CJK UNIFIED IDEOGRAPH + {0xCBEC, 0x5498}, //6263 #CJK UNIFIED IDEOGRAPH + {0xCBED, 0x5463}, //6264 #CJK UNIFIED IDEOGRAPH + {0xCBEE, 0x5467}, //6265 #CJK UNIFIED IDEOGRAPH + {0xCBEF, 0x5464}, //6266 #CJK UNIFIED IDEOGRAPH + {0xCBF0, 0x56F7}, //6267 #CJK UNIFIED IDEOGRAPH + {0xCBF1, 0x56F9}, //6268 #CJK UNIFIED IDEOGRAPH + {0xCBF2, 0x576F}, //6269 #CJK UNIFIED IDEOGRAPH + {0xCBF3, 0x5772}, //6270 #CJK UNIFIED IDEOGRAPH + {0xCBF4, 0x576D}, //6271 #CJK UNIFIED IDEOGRAPH + {0xCBF5, 0x576B}, //6272 #CJK UNIFIED IDEOGRAPH + {0xCBF6, 0x5771}, //6273 #CJK UNIFIED IDEOGRAPH + {0xCBF7, 0x5770}, //6274 #CJK UNIFIED IDEOGRAPH + {0xCBF8, 0x5776}, //6275 #CJK UNIFIED IDEOGRAPH + {0xCBF9, 0x5780}, //6276 #CJK UNIFIED IDEOGRAPH + {0xCBFA, 0x5775}, //6277 #CJK UNIFIED IDEOGRAPH + {0xCBFB, 0x577B}, //6278 #CJK UNIFIED IDEOGRAPH + {0xCBFC, 0x5773}, //6279 #CJK UNIFIED IDEOGRAPH + {0xCBFD, 0x5774}, //6280 #CJK UNIFIED IDEOGRAPH + {0xCBFE, 0x5762}, //6281 #CJK UNIFIED IDEOGRAPH + {0xCC40, 0x5768}, //6282 #CJK UNIFIED IDEOGRAPH + {0xCC41, 0x577D}, //6283 #CJK UNIFIED IDEOGRAPH + {0xCC42, 0x590C}, //6284 #CJK UNIFIED IDEOGRAPH + {0xCC43, 0x5945}, //6285 #CJK UNIFIED IDEOGRAPH + {0xCC44, 0x59B5}, //6286 #CJK UNIFIED IDEOGRAPH + {0xCC45, 0x59BA}, //6287 #CJK UNIFIED IDEOGRAPH + {0xCC46, 0x59CF}, //6288 #CJK UNIFIED IDEOGRAPH + {0xCC47, 0x59CE}, //6289 #CJK UNIFIED IDEOGRAPH + {0xCC48, 0x59B2}, //6290 #CJK UNIFIED IDEOGRAPH + {0xCC49, 0x59CC}, //6291 #CJK UNIFIED IDEOGRAPH + {0xCC4A, 0x59C1}, //6292 #CJK UNIFIED IDEOGRAPH + {0xCC4B, 0x59B6}, //6293 #CJK UNIFIED IDEOGRAPH + {0xCC4C, 0x59BC}, //6294 #CJK UNIFIED IDEOGRAPH + {0xCC4D, 0x59C3}, //6295 #CJK UNIFIED IDEOGRAPH + {0xCC4E, 0x59D6}, //6296 #CJK UNIFIED IDEOGRAPH + {0xCC4F, 0x59B1}, //6297 #CJK UNIFIED IDEOGRAPH + {0xCC50, 0x59BD}, //6298 #CJK UNIFIED IDEOGRAPH + {0xCC51, 0x59C0}, //6299 #CJK UNIFIED IDEOGRAPH + {0xCC52, 0x59C8}, //6300 #CJK UNIFIED IDEOGRAPH + {0xCC53, 0x59B4}, //6301 #CJK UNIFIED IDEOGRAPH + {0xCC54, 0x59C7}, //6302 #CJK UNIFIED IDEOGRAPH + {0xCC55, 0x5B62}, //6303 #CJK UNIFIED IDEOGRAPH + {0xCC56, 0x5B65}, //6304 #CJK UNIFIED IDEOGRAPH + {0xCC57, 0x5B93}, //6305 #CJK UNIFIED IDEOGRAPH + {0xCC58, 0x5B95}, //6306 #CJK UNIFIED IDEOGRAPH + {0xCC59, 0x5C44}, //6307 #CJK UNIFIED IDEOGRAPH + {0xCC5A, 0x5C47}, //6308 #CJK UNIFIED IDEOGRAPH + {0xCC5B, 0x5CAE}, //6309 #CJK UNIFIED IDEOGRAPH + {0xCC5C, 0x5CA4}, //6310 #CJK UNIFIED IDEOGRAPH + {0xCC5D, 0x5CA0}, //6311 #CJK UNIFIED IDEOGRAPH + {0xCC5E, 0x5CB5}, //6312 #CJK UNIFIED IDEOGRAPH + {0xCC5F, 0x5CAF}, //6313 #CJK UNIFIED IDEOGRAPH + {0xCC60, 0x5CA8}, //6314 #CJK UNIFIED IDEOGRAPH + {0xCC61, 0x5CAC}, //6315 #CJK UNIFIED IDEOGRAPH + {0xCC62, 0x5C9F}, //6316 #CJK UNIFIED IDEOGRAPH + {0xCC63, 0x5CA3}, //6317 #CJK UNIFIED IDEOGRAPH + {0xCC64, 0x5CAD}, //6318 #CJK UNIFIED IDEOGRAPH + {0xCC65, 0x5CA2}, //6319 #CJK UNIFIED IDEOGRAPH + {0xCC66, 0x5CAA}, //6320 #CJK UNIFIED IDEOGRAPH + {0xCC67, 0x5CA7}, //6321 #CJK UNIFIED IDEOGRAPH + {0xCC68, 0x5C9D}, //6322 #CJK UNIFIED IDEOGRAPH + {0xCC69, 0x5CA5}, //6323 #CJK UNIFIED IDEOGRAPH + {0xCC6A, 0x5CB6}, //6324 #CJK UNIFIED IDEOGRAPH + {0xCC6B, 0x5CB0}, //6325 #CJK UNIFIED IDEOGRAPH + {0xCC6C, 0x5CA6}, //6326 #CJK UNIFIED IDEOGRAPH + {0xCC6D, 0x5E17}, //6327 #CJK UNIFIED IDEOGRAPH + {0xCC6E, 0x5E14}, //6328 #CJK UNIFIED IDEOGRAPH + {0xCC6F, 0x5E19}, //6329 #CJK UNIFIED IDEOGRAPH + {0xCC70, 0x5F28}, //6330 #CJK UNIFIED IDEOGRAPH + {0xCC71, 0x5F22}, //6331 #CJK UNIFIED IDEOGRAPH + {0xCC72, 0x5F23}, //6332 #CJK UNIFIED IDEOGRAPH + {0xCC73, 0x5F24}, //6333 #CJK UNIFIED IDEOGRAPH + {0xCC74, 0x5F54}, //6334 #CJK UNIFIED IDEOGRAPH + {0xCC75, 0x5F82}, //6335 #CJK UNIFIED IDEOGRAPH + {0xCC76, 0x5F7E}, //6336 #CJK UNIFIED IDEOGRAPH + {0xCC77, 0x5F7D}, //6337 #CJK UNIFIED IDEOGRAPH + {0xCC78, 0x5FDE}, //6338 #CJK UNIFIED IDEOGRAPH + {0xCC79, 0x5FE5}, //6339 #CJK UNIFIED IDEOGRAPH + {0xCC7A, 0x602D}, //6340 #CJK UNIFIED IDEOGRAPH + {0xCC7B, 0x6026}, //6341 #CJK UNIFIED IDEOGRAPH + {0xCC7C, 0x6019}, //6342 #CJK UNIFIED IDEOGRAPH + {0xCC7D, 0x6032}, //6343 #CJK UNIFIED IDEOGRAPH + {0xCC7E, 0x600B}, //6344 #CJK UNIFIED IDEOGRAPH + {0xCCA1, 0x6034}, //6345 #CJK UNIFIED IDEOGRAPH + {0xCCA2, 0x600A}, //6346 #CJK UNIFIED IDEOGRAPH + {0xCCA3, 0x6017}, //6347 #CJK UNIFIED IDEOGRAPH + {0xCCA4, 0x6033}, //6348 #CJK UNIFIED IDEOGRAPH + {0xCCA5, 0x601A}, //6349 #CJK UNIFIED IDEOGRAPH + {0xCCA6, 0x601E}, //6350 #CJK UNIFIED IDEOGRAPH + {0xCCA7, 0x602C}, //6351 #CJK UNIFIED IDEOGRAPH + {0xCCA8, 0x6022}, //6352 #CJK UNIFIED IDEOGRAPH + {0xCCA9, 0x600D}, //6353 #CJK UNIFIED IDEOGRAPH + {0xCCAA, 0x6010}, //6354 #CJK UNIFIED IDEOGRAPH + {0xCCAB, 0x602E}, //6355 #CJK UNIFIED IDEOGRAPH + {0xCCAC, 0x6013}, //6356 #CJK UNIFIED IDEOGRAPH + {0xCCAD, 0x6011}, //6357 #CJK UNIFIED IDEOGRAPH + {0xCCAE, 0x600C}, //6358 #CJK UNIFIED IDEOGRAPH + {0xCCAF, 0x6009}, //6359 #CJK UNIFIED IDEOGRAPH + {0xCCB0, 0x601C}, //6360 #CJK UNIFIED IDEOGRAPH + {0xCCB1, 0x6214}, //6361 #CJK UNIFIED IDEOGRAPH + {0xCCB2, 0x623D}, //6362 #CJK UNIFIED IDEOGRAPH + {0xCCB3, 0x62AD}, //6363 #CJK UNIFIED IDEOGRAPH + {0xCCB4, 0x62B4}, //6364 #CJK UNIFIED IDEOGRAPH + {0xCCB5, 0x62D1}, //6365 #CJK UNIFIED IDEOGRAPH + {0xCCB6, 0x62BE}, //6366 #CJK UNIFIED IDEOGRAPH + {0xCCB7, 0x62AA}, //6367 #CJK UNIFIED IDEOGRAPH + {0xCCB8, 0x62B6}, //6368 #CJK UNIFIED IDEOGRAPH + {0xCCB9, 0x62CA}, //6369 #CJK UNIFIED IDEOGRAPH + {0xCCBA, 0x62AE}, //6370 #CJK UNIFIED IDEOGRAPH + {0xCCBB, 0x62B3}, //6371 #CJK UNIFIED IDEOGRAPH + {0xCCBC, 0x62AF}, //6372 #CJK UNIFIED IDEOGRAPH + {0xCCBD, 0x62BB}, //6373 #CJK UNIFIED IDEOGRAPH + {0xCCBE, 0x62A9}, //6374 #CJK UNIFIED IDEOGRAPH + {0xCCBF, 0x62B0}, //6375 #CJK UNIFIED IDEOGRAPH + {0xCCC0, 0x62B8}, //6376 #CJK UNIFIED IDEOGRAPH + {0xCCC1, 0x653D}, //6377 #CJK UNIFIED IDEOGRAPH + {0xCCC2, 0x65A8}, //6378 #CJK UNIFIED IDEOGRAPH + {0xCCC3, 0x65BB}, //6379 #CJK UNIFIED IDEOGRAPH + {0xCCC4, 0x6609}, //6380 #CJK UNIFIED IDEOGRAPH + {0xCCC5, 0x65FC}, //6381 #CJK UNIFIED IDEOGRAPH + {0xCCC6, 0x6604}, //6382 #CJK UNIFIED IDEOGRAPH + {0xCCC7, 0x6612}, //6383 #CJK UNIFIED IDEOGRAPH + {0xCCC8, 0x6608}, //6384 #CJK UNIFIED IDEOGRAPH + {0xCCC9, 0x65FB}, //6385 #CJK UNIFIED IDEOGRAPH + {0xCCCA, 0x6603}, //6386 #CJK UNIFIED IDEOGRAPH + {0xCCCB, 0x660B}, //6387 #CJK UNIFIED IDEOGRAPH + {0xCCCC, 0x660D}, //6388 #CJK UNIFIED IDEOGRAPH + {0xCCCD, 0x6605}, //6389 #CJK UNIFIED IDEOGRAPH + {0xCCCE, 0x65FD}, //6390 #CJK UNIFIED IDEOGRAPH + {0xCCCF, 0x6611}, //6391 #CJK UNIFIED IDEOGRAPH + {0xCCD0, 0x6610}, //6392 #CJK UNIFIED IDEOGRAPH + {0xCCD1, 0x66F6}, //6393 #CJK UNIFIED IDEOGRAPH + {0xCCD2, 0x670A}, //6394 #CJK UNIFIED IDEOGRAPH + {0xCCD3, 0x6785}, //6395 #CJK UNIFIED IDEOGRAPH + {0xCCD4, 0x676C}, //6396 #CJK UNIFIED IDEOGRAPH + {0xCCD5, 0x678E}, //6397 #CJK UNIFIED IDEOGRAPH + {0xCCD6, 0x6792}, //6398 #CJK UNIFIED IDEOGRAPH + {0xCCD7, 0x6776}, //6399 #CJK UNIFIED IDEOGRAPH + {0xCCD8, 0x677B}, //6400 #CJK UNIFIED IDEOGRAPH + {0xCCD9, 0x6798}, //6401 #CJK UNIFIED IDEOGRAPH + {0xCCDA, 0x6786}, //6402 #CJK UNIFIED IDEOGRAPH + {0xCCDB, 0x6784}, //6403 #CJK UNIFIED IDEOGRAPH + {0xCCDC, 0x6774}, //6404 #CJK UNIFIED IDEOGRAPH + {0xCCDD, 0x678D}, //6405 #CJK UNIFIED IDEOGRAPH + {0xCCDE, 0x678C}, //6406 #CJK UNIFIED IDEOGRAPH + {0xCCDF, 0x677A}, //6407 #CJK UNIFIED IDEOGRAPH + {0xCCE0, 0x679F}, //6408 #CJK UNIFIED IDEOGRAPH + {0xCCE1, 0x6791}, //6409 #CJK UNIFIED IDEOGRAPH + {0xCCE2, 0x6799}, //6410 #CJK UNIFIED IDEOGRAPH + {0xCCE3, 0x6783}, //6411 #CJK UNIFIED IDEOGRAPH + {0xCCE4, 0x677D}, //6412 #CJK UNIFIED IDEOGRAPH + {0xCCE5, 0x6781}, //6413 #CJK UNIFIED IDEOGRAPH + {0xCCE6, 0x6778}, //6414 #CJK UNIFIED IDEOGRAPH + {0xCCE7, 0x6779}, //6415 #CJK UNIFIED IDEOGRAPH + {0xCCE8, 0x6794}, //6416 #CJK UNIFIED IDEOGRAPH + {0xCCE9, 0x6B25}, //6417 #CJK UNIFIED IDEOGRAPH + {0xCCEA, 0x6B80}, //6418 #CJK UNIFIED IDEOGRAPH + {0xCCEB, 0x6B7E}, //6419 #CJK UNIFIED IDEOGRAPH + {0xCCEC, 0x6BDE}, //6420 #CJK UNIFIED IDEOGRAPH + {0xCCED, 0x6C1D}, //6421 #CJK UNIFIED IDEOGRAPH + {0xCCEE, 0x6C93}, //6422 #CJK UNIFIED IDEOGRAPH + {0xCCEF, 0x6CEC}, //6423 #CJK UNIFIED IDEOGRAPH + {0xCCF0, 0x6CEB}, //6424 #CJK UNIFIED IDEOGRAPH + {0xCCF1, 0x6CEE}, //6425 #CJK UNIFIED IDEOGRAPH + {0xCCF2, 0x6CD9}, //6426 #CJK UNIFIED IDEOGRAPH + {0xCCF3, 0x6CB6}, //6427 #CJK UNIFIED IDEOGRAPH + {0xCCF4, 0x6CD4}, //6428 #CJK UNIFIED IDEOGRAPH + {0xCCF5, 0x6CAD}, //6429 #CJK UNIFIED IDEOGRAPH + {0xCCF6, 0x6CE7}, //6430 #CJK UNIFIED IDEOGRAPH + {0xCCF7, 0x6CB7}, //6431 #CJK UNIFIED IDEOGRAPH + {0xCCF8, 0x6CD0}, //6432 #CJK UNIFIED IDEOGRAPH + {0xCCF9, 0x6CC2}, //6433 #CJK UNIFIED IDEOGRAPH + {0xCCFA, 0x6CBA}, //6434 #CJK UNIFIED IDEOGRAPH + {0xCCFB, 0x6CC3}, //6435 #CJK UNIFIED IDEOGRAPH + {0xCCFC, 0x6CC6}, //6436 #CJK UNIFIED IDEOGRAPH + {0xCCFD, 0x6CED}, //6437 #CJK UNIFIED IDEOGRAPH + {0xCCFE, 0x6CF2}, //6438 #CJK UNIFIED IDEOGRAPH + {0xCD40, 0x6CD2}, //6439 #CJK UNIFIED IDEOGRAPH + {0xCD41, 0x6CDD}, //6440 #CJK UNIFIED IDEOGRAPH + {0xCD42, 0x6CB4}, //6441 #CJK UNIFIED IDEOGRAPH + {0xCD43, 0x6C8A}, //6442 #CJK UNIFIED IDEOGRAPH + {0xCD44, 0x6C9D}, //6443 #CJK UNIFIED IDEOGRAPH + {0xCD45, 0x6C80}, //6444 #CJK UNIFIED IDEOGRAPH + {0xCD46, 0x6CDE}, //6445 #CJK UNIFIED IDEOGRAPH + {0xCD47, 0x6CC0}, //6446 #CJK UNIFIED IDEOGRAPH + {0xCD48, 0x6D30}, //6447 #CJK UNIFIED IDEOGRAPH + {0xCD49, 0x6CCD}, //6448 #CJK UNIFIED IDEOGRAPH + {0xCD4A, 0x6CC7}, //6449 #CJK UNIFIED IDEOGRAPH + {0xCD4B, 0x6CB0}, //6450 #CJK UNIFIED IDEOGRAPH + {0xCD4C, 0x6CF9}, //6451 #CJK UNIFIED IDEOGRAPH + {0xCD4D, 0x6CCF}, //6452 #CJK UNIFIED IDEOGRAPH + {0xCD4E, 0x6CE9}, //6453 #CJK UNIFIED IDEOGRAPH + {0xCD4F, 0x6CD1}, //6454 #CJK UNIFIED IDEOGRAPH + {0xCD50, 0x7094}, //6455 #CJK UNIFIED IDEOGRAPH + {0xCD51, 0x7098}, //6456 #CJK UNIFIED IDEOGRAPH + {0xCD52, 0x7085}, //6457 #CJK UNIFIED IDEOGRAPH + {0xCD53, 0x7093}, //6458 #CJK UNIFIED IDEOGRAPH + {0xCD54, 0x7086}, //6459 #CJK UNIFIED IDEOGRAPH + {0xCD55, 0x7084}, //6460 #CJK UNIFIED IDEOGRAPH + {0xCD56, 0x7091}, //6461 #CJK UNIFIED IDEOGRAPH + {0xCD57, 0x7096}, //6462 #CJK UNIFIED IDEOGRAPH + {0xCD58, 0x7082}, //6463 #CJK UNIFIED IDEOGRAPH + {0xCD59, 0x709A}, //6464 #CJK UNIFIED IDEOGRAPH + {0xCD5A, 0x7083}, //6465 #CJK UNIFIED IDEOGRAPH + {0xCD5B, 0x726A}, //6466 #CJK UNIFIED IDEOGRAPH + {0xCD5C, 0x72D6}, //6467 #CJK UNIFIED IDEOGRAPH + {0xCD5D, 0x72CB}, //6468 #CJK UNIFIED IDEOGRAPH + {0xCD5E, 0x72D8}, //6469 #CJK UNIFIED IDEOGRAPH + {0xCD5F, 0x72C9}, //6470 #CJK UNIFIED IDEOGRAPH + {0xCD60, 0x72DC}, //6471 #CJK UNIFIED IDEOGRAPH + {0xCD61, 0x72D2}, //6472 #CJK UNIFIED IDEOGRAPH + {0xCD62, 0x72D4}, //6473 #CJK UNIFIED IDEOGRAPH + {0xCD63, 0x72DA}, //6474 #CJK UNIFIED IDEOGRAPH + {0xCD64, 0x72CC}, //6475 #CJK UNIFIED IDEOGRAPH + {0xCD65, 0x72D1}, //6476 #CJK UNIFIED IDEOGRAPH + {0xCD66, 0x73A4}, //6477 #CJK UNIFIED IDEOGRAPH + {0xCD67, 0x73A1}, //6478 #CJK UNIFIED IDEOGRAPH + {0xCD68, 0x73AD}, //6479 #CJK UNIFIED IDEOGRAPH + {0xCD69, 0x73A6}, //6480 #CJK UNIFIED IDEOGRAPH + {0xCD6A, 0x73A2}, //6481 #CJK UNIFIED IDEOGRAPH + {0xCD6B, 0x73A0}, //6482 #CJK UNIFIED IDEOGRAPH + {0xCD6C, 0x73AC}, //6483 #CJK UNIFIED IDEOGRAPH + {0xCD6D, 0x739D}, //6484 #CJK UNIFIED IDEOGRAPH + {0xCD6E, 0x74DD}, //6485 #CJK UNIFIED IDEOGRAPH + {0xCD6F, 0x74E8}, //6486 #CJK UNIFIED IDEOGRAPH + {0xCD70, 0x753F}, //6487 #CJK UNIFIED IDEOGRAPH + {0xCD71, 0x7540}, //6488 #CJK UNIFIED IDEOGRAPH + {0xCD72, 0x753E}, //6489 #CJK UNIFIED IDEOGRAPH + {0xCD73, 0x758C}, //6490 #CJK UNIFIED IDEOGRAPH + {0xCD74, 0x7598}, //6491 #CJK UNIFIED IDEOGRAPH + {0xCD75, 0x76AF}, //6492 #CJK UNIFIED IDEOGRAPH + {0xCD76, 0x76F3}, //6493 #CJK UNIFIED IDEOGRAPH + {0xCD77, 0x76F1}, //6494 #CJK UNIFIED IDEOGRAPH + {0xCD78, 0x76F0}, //6495 #CJK UNIFIED IDEOGRAPH + {0xCD79, 0x76F5}, //6496 #CJK UNIFIED IDEOGRAPH + {0xCD7A, 0x77F8}, //6497 #CJK UNIFIED IDEOGRAPH + {0xCD7B, 0x77FC}, //6498 #CJK UNIFIED IDEOGRAPH + {0xCD7C, 0x77F9}, //6499 #CJK UNIFIED IDEOGRAPH + {0xCD7D, 0x77FB}, //6500 #CJK UNIFIED IDEOGRAPH + {0xCD7E, 0x77FA}, //6501 #CJK UNIFIED IDEOGRAPH + {0xCDA1, 0x77F7}, //6502 #CJK UNIFIED IDEOGRAPH + {0xCDA2, 0x7942}, //6503 #CJK UNIFIED IDEOGRAPH + {0xCDA3, 0x793F}, //6504 #CJK UNIFIED IDEOGRAPH + {0xCDA4, 0x79C5}, //6505 #CJK UNIFIED IDEOGRAPH + {0xCDA5, 0x7A78}, //6506 #CJK UNIFIED IDEOGRAPH + {0xCDA6, 0x7A7B}, //6507 #CJK UNIFIED IDEOGRAPH + {0xCDA7, 0x7AFB}, //6508 #CJK UNIFIED IDEOGRAPH + {0xCDA8, 0x7C75}, //6509 #CJK UNIFIED IDEOGRAPH + {0xCDA9, 0x7CFD}, //6510 #CJK UNIFIED IDEOGRAPH + {0xCDAA, 0x8035}, //6511 #CJK UNIFIED IDEOGRAPH + {0xCDAB, 0x808F}, //6512 #CJK UNIFIED IDEOGRAPH + {0xCDAC, 0x80AE}, //6513 #CJK UNIFIED IDEOGRAPH + {0xCDAD, 0x80A3}, //6514 #CJK UNIFIED IDEOGRAPH + {0xCDAE, 0x80B8}, //6515 #CJK UNIFIED IDEOGRAPH + {0xCDAF, 0x80B5}, //6516 #CJK UNIFIED IDEOGRAPH + {0xCDB0, 0x80AD}, //6517 #CJK UNIFIED IDEOGRAPH + {0xCDB1, 0x8220}, //6518 #CJK UNIFIED IDEOGRAPH + {0xCDB2, 0x82A0}, //6519 #CJK UNIFIED IDEOGRAPH + {0xCDB3, 0x82C0}, //6520 #CJK UNIFIED IDEOGRAPH + {0xCDB4, 0x82AB}, //6521 #CJK UNIFIED IDEOGRAPH + {0xCDB5, 0x829A}, //6522 #CJK UNIFIED IDEOGRAPH + {0xCDB6, 0x8298}, //6523 #CJK UNIFIED IDEOGRAPH + {0xCDB7, 0x829B}, //6524 #CJK UNIFIED IDEOGRAPH + {0xCDB8, 0x82B5}, //6525 #CJK UNIFIED IDEOGRAPH + {0xCDB9, 0x82A7}, //6526 #CJK UNIFIED IDEOGRAPH + {0xCDBA, 0x82AE}, //6527 #CJK UNIFIED IDEOGRAPH + {0xCDBB, 0x82BC}, //6528 #CJK UNIFIED IDEOGRAPH + {0xCDBC, 0x829E}, //6529 #CJK UNIFIED IDEOGRAPH + {0xCDBD, 0x82BA}, //6530 #CJK UNIFIED IDEOGRAPH + {0xCDBE, 0x82B4}, //6531 #CJK UNIFIED IDEOGRAPH + {0xCDBF, 0x82A8}, //6532 #CJK UNIFIED IDEOGRAPH + {0xCDC0, 0x82A1}, //6533 #CJK UNIFIED IDEOGRAPH + {0xCDC1, 0x82A9}, //6534 #CJK UNIFIED IDEOGRAPH + {0xCDC2, 0x82C2}, //6535 #CJK UNIFIED IDEOGRAPH + {0xCDC3, 0x82A4}, //6536 #CJK UNIFIED IDEOGRAPH + {0xCDC4, 0x82C3}, //6537 #CJK UNIFIED IDEOGRAPH + {0xCDC5, 0x82B6}, //6538 #CJK UNIFIED IDEOGRAPH + {0xCDC6, 0x82A2}, //6539 #CJK UNIFIED IDEOGRAPH + {0xCDC7, 0x8670}, //6540 #CJK UNIFIED IDEOGRAPH + {0xCDC8, 0x866F}, //6541 #CJK UNIFIED IDEOGRAPH + {0xCDC9, 0x866D}, //6542 #CJK UNIFIED IDEOGRAPH + {0xCDCA, 0x866E}, //6543 #CJK UNIFIED IDEOGRAPH + {0xCDCB, 0x8C56}, //6544 #CJK UNIFIED IDEOGRAPH + {0xCDCC, 0x8FD2}, //6545 #CJK UNIFIED IDEOGRAPH + {0xCDCD, 0x8FCB}, //6546 #CJK UNIFIED IDEOGRAPH + {0xCDCE, 0x8FD3}, //6547 #CJK UNIFIED IDEOGRAPH + {0xCDCF, 0x8FCD}, //6548 #CJK UNIFIED IDEOGRAPH + {0xCDD0, 0x8FD6}, //6549 #CJK UNIFIED IDEOGRAPH + {0xCDD1, 0x8FD5}, //6550 #CJK UNIFIED IDEOGRAPH + {0xCDD2, 0x8FD7}, //6551 #CJK UNIFIED IDEOGRAPH + {0xCDD3, 0x90B2}, //6552 #CJK UNIFIED IDEOGRAPH + {0xCDD4, 0x90B4}, //6553 #CJK UNIFIED IDEOGRAPH + {0xCDD5, 0x90AF}, //6554 #CJK UNIFIED IDEOGRAPH + {0xCDD6, 0x90B3}, //6555 #CJK UNIFIED IDEOGRAPH + {0xCDD7, 0x90B0}, //6556 #CJK UNIFIED IDEOGRAPH + {0xCDD8, 0x9639}, //6557 #CJK UNIFIED IDEOGRAPH + {0xCDD9, 0x963D}, //6558 #CJK UNIFIED IDEOGRAPH + {0xCDDA, 0x963C}, //6559 #CJK UNIFIED IDEOGRAPH + {0xCDDB, 0x963A}, //6560 #CJK UNIFIED IDEOGRAPH + {0xCDDC, 0x9643}, //6561 #CJK UNIFIED IDEOGRAPH + {0xCDDD, 0x4FCD}, //6562 #CJK UNIFIED IDEOGRAPH + {0xCDDE, 0x4FC5}, //6563 #CJK UNIFIED IDEOGRAPH + {0xCDDF, 0x4FD3}, //6564 #CJK UNIFIED IDEOGRAPH + {0xCDE0, 0x4FB2}, //6565 #CJK UNIFIED IDEOGRAPH + {0xCDE1, 0x4FC9}, //6566 #CJK UNIFIED IDEOGRAPH + {0xCDE2, 0x4FCB}, //6567 #CJK UNIFIED IDEOGRAPH + {0xCDE3, 0x4FC1}, //6568 #CJK UNIFIED IDEOGRAPH + {0xCDE4, 0x4FD4}, //6569 #CJK UNIFIED IDEOGRAPH + {0xCDE5, 0x4FDC}, //6570 #CJK UNIFIED IDEOGRAPH + {0xCDE6, 0x4FD9}, //6571 #CJK UNIFIED IDEOGRAPH + {0xCDE7, 0x4FBB}, //6572 #CJK UNIFIED IDEOGRAPH + {0xCDE8, 0x4FB3}, //6573 #CJK UNIFIED IDEOGRAPH + {0xCDE9, 0x4FDB}, //6574 #CJK UNIFIED IDEOGRAPH + {0xCDEA, 0x4FC7}, //6575 #CJK UNIFIED IDEOGRAPH + {0xCDEB, 0x4FD6}, //6576 #CJK UNIFIED IDEOGRAPH + {0xCDEC, 0x4FBA}, //6577 #CJK UNIFIED IDEOGRAPH + {0xCDED, 0x4FC0}, //6578 #CJK UNIFIED IDEOGRAPH + {0xCDEE, 0x4FB9}, //6579 #CJK UNIFIED IDEOGRAPH + {0xCDEF, 0x4FEC}, //6580 #CJK UNIFIED IDEOGRAPH + {0xCDF0, 0x5244}, //6581 #CJK UNIFIED IDEOGRAPH + {0xCDF1, 0x5249}, //6582 #CJK UNIFIED IDEOGRAPH + {0xCDF2, 0x52C0}, //6583 #CJK UNIFIED IDEOGRAPH + {0xCDF3, 0x52C2}, //6584 #CJK UNIFIED IDEOGRAPH + {0xCDF4, 0x533D}, //6585 #CJK UNIFIED IDEOGRAPH + {0xCDF5, 0x537C}, //6586 #CJK UNIFIED IDEOGRAPH + {0xCDF6, 0x5397}, //6587 #CJK UNIFIED IDEOGRAPH + {0xCDF7, 0x5396}, //6588 #CJK UNIFIED IDEOGRAPH + {0xCDF8, 0x5399}, //6589 #CJK UNIFIED IDEOGRAPH + {0xCDF9, 0x5398}, //6590 #CJK UNIFIED IDEOGRAPH + {0xCDFA, 0x54BA}, //6591 #CJK UNIFIED IDEOGRAPH + {0xCDFB, 0x54A1}, //6592 #CJK UNIFIED IDEOGRAPH + {0xCDFC, 0x54AD}, //6593 #CJK UNIFIED IDEOGRAPH + {0xCDFD, 0x54A5}, //6594 #CJK UNIFIED IDEOGRAPH + {0xCDFE, 0x54CF}, //6595 #CJK UNIFIED IDEOGRAPH + {0xCE40, 0x54C3}, //6596 #CJK UNIFIED IDEOGRAPH + {0xCE41, 0x830D}, //6597 #CJK UNIFIED IDEOGRAPH + {0xCE42, 0x54B7}, //6598 #CJK UNIFIED IDEOGRAPH + {0xCE43, 0x54AE}, //6599 #CJK UNIFIED IDEOGRAPH + {0xCE44, 0x54D6}, //6600 #CJK UNIFIED IDEOGRAPH + {0xCE45, 0x54B6}, //6601 #CJK UNIFIED IDEOGRAPH + {0xCE46, 0x54C5}, //6602 #CJK UNIFIED IDEOGRAPH + {0xCE47, 0x54C6}, //6603 #CJK UNIFIED IDEOGRAPH + {0xCE48, 0x54A0}, //6604 #CJK UNIFIED IDEOGRAPH + {0xCE49, 0x5470}, //6605 #CJK UNIFIED IDEOGRAPH + {0xCE4A, 0x54BC}, //6606 #CJK UNIFIED IDEOGRAPH + {0xCE4B, 0x54A2}, //6607 #CJK UNIFIED IDEOGRAPH + {0xCE4C, 0x54BE}, //6608 #CJK UNIFIED IDEOGRAPH + {0xCE4D, 0x5472}, //6609 #CJK UNIFIED IDEOGRAPH + {0xCE4E, 0x54DE}, //6610 #CJK UNIFIED IDEOGRAPH + {0xCE4F, 0x54B0}, //6611 #CJK UNIFIED IDEOGRAPH + {0xCE50, 0x57B5}, //6612 #CJK UNIFIED IDEOGRAPH + {0xCE51, 0x579E}, //6613 #CJK UNIFIED IDEOGRAPH + {0xCE52, 0x579F}, //6614 #CJK UNIFIED IDEOGRAPH + {0xCE53, 0x57A4}, //6615 #CJK UNIFIED IDEOGRAPH + {0xCE54, 0x578C}, //6616 #CJK UNIFIED IDEOGRAPH + {0xCE55, 0x5797}, //6617 #CJK UNIFIED IDEOGRAPH + {0xCE56, 0x579D}, //6618 #CJK UNIFIED IDEOGRAPH + {0xCE57, 0x579B}, //6619 #CJK UNIFIED IDEOGRAPH + {0xCE58, 0x5794}, //6620 #CJK UNIFIED IDEOGRAPH + {0xCE59, 0x5798}, //6621 #CJK UNIFIED IDEOGRAPH + {0xCE5A, 0x578F}, //6622 #CJK UNIFIED IDEOGRAPH + {0xCE5B, 0x5799}, //6623 #CJK UNIFIED IDEOGRAPH + {0xCE5C, 0x57A5}, //6624 #CJK UNIFIED IDEOGRAPH + {0xCE5D, 0x579A}, //6625 #CJK UNIFIED IDEOGRAPH + {0xCE5E, 0x5795}, //6626 #CJK UNIFIED IDEOGRAPH + {0xCE5F, 0x58F4}, //6627 #CJK UNIFIED IDEOGRAPH + {0xCE60, 0x590D}, //6628 #CJK UNIFIED IDEOGRAPH + {0xCE61, 0x5953}, //6629 #CJK UNIFIED IDEOGRAPH + {0xCE62, 0x59E1}, //6630 #CJK UNIFIED IDEOGRAPH + {0xCE63, 0x59DE}, //6631 #CJK UNIFIED IDEOGRAPH + {0xCE64, 0x59EE}, //6632 #CJK UNIFIED IDEOGRAPH + {0xCE65, 0x5A00}, //6633 #CJK UNIFIED IDEOGRAPH + {0xCE66, 0x59F1}, //6634 #CJK UNIFIED IDEOGRAPH + {0xCE67, 0x59DD}, //6635 #CJK UNIFIED IDEOGRAPH + {0xCE68, 0x59FA}, //6636 #CJK UNIFIED IDEOGRAPH + {0xCE69, 0x59FD}, //6637 #CJK UNIFIED IDEOGRAPH + {0xCE6A, 0x59FC}, //6638 #CJK UNIFIED IDEOGRAPH + {0xCE6B, 0x59F6}, //6639 #CJK UNIFIED IDEOGRAPH + {0xCE6C, 0x59E4}, //6640 #CJK UNIFIED IDEOGRAPH + {0xCE6D, 0x59F2}, //6641 #CJK UNIFIED IDEOGRAPH + {0xCE6E, 0x59F7}, //6642 #CJK UNIFIED IDEOGRAPH + {0xCE6F, 0x59DB}, //6643 #CJK UNIFIED IDEOGRAPH + {0xCE70, 0x59E9}, //6644 #CJK UNIFIED IDEOGRAPH + {0xCE71, 0x59F3}, //6645 #CJK UNIFIED IDEOGRAPH + {0xCE72, 0x59F5}, //6646 #CJK UNIFIED IDEOGRAPH + {0xCE73, 0x59E0}, //6647 #CJK UNIFIED IDEOGRAPH + {0xCE74, 0x59FE}, //6648 #CJK UNIFIED IDEOGRAPH + {0xCE75, 0x59F4}, //6649 #CJK UNIFIED IDEOGRAPH + {0xCE76, 0x59ED}, //6650 #CJK UNIFIED IDEOGRAPH + {0xCE77, 0x5BA8}, //6651 #CJK UNIFIED IDEOGRAPH + {0xCE78, 0x5C4C}, //6652 #CJK UNIFIED IDEOGRAPH + {0xCE79, 0x5CD0}, //6653 #CJK UNIFIED IDEOGRAPH + {0xCE7A, 0x5CD8}, //6654 #CJK UNIFIED IDEOGRAPH + {0xCE7B, 0x5CCC}, //6655 #CJK UNIFIED IDEOGRAPH + {0xCE7C, 0x5CD7}, //6656 #CJK UNIFIED IDEOGRAPH + {0xCE7D, 0x5CCB}, //6657 #CJK UNIFIED IDEOGRAPH + {0xCE7E, 0x5CDB}, //6658 #CJK UNIFIED IDEOGRAPH + {0xCEA1, 0x5CDE}, //6659 #CJK UNIFIED IDEOGRAPH + {0xCEA2, 0x5CDA}, //6660 #CJK UNIFIED IDEOGRAPH + {0xCEA3, 0x5CC9}, //6661 #CJK UNIFIED IDEOGRAPH + {0xCEA4, 0x5CC7}, //6662 #CJK UNIFIED IDEOGRAPH + {0xCEA5, 0x5CCA}, //6663 #CJK UNIFIED IDEOGRAPH + {0xCEA6, 0x5CD6}, //6664 #CJK UNIFIED IDEOGRAPH + {0xCEA7, 0x5CD3}, //6665 #CJK UNIFIED IDEOGRAPH + {0xCEA8, 0x5CD4}, //6666 #CJK UNIFIED IDEOGRAPH + {0xCEA9, 0x5CCF}, //6667 #CJK UNIFIED IDEOGRAPH + {0xCEAA, 0x5CC8}, //6668 #CJK UNIFIED IDEOGRAPH + {0xCEAB, 0x5CC6}, //6669 #CJK UNIFIED IDEOGRAPH + {0xCEAC, 0x5CCE}, //6670 #CJK UNIFIED IDEOGRAPH + {0xCEAD, 0x5CDF}, //6671 #CJK UNIFIED IDEOGRAPH + {0xCEAE, 0x5CF8}, //6672 #CJK UNIFIED IDEOGRAPH + {0xCEAF, 0x5DF9}, //6673 #CJK UNIFIED IDEOGRAPH + {0xCEB0, 0x5E21}, //6674 #CJK UNIFIED IDEOGRAPH + {0xCEB1, 0x5E22}, //6675 #CJK UNIFIED IDEOGRAPH + {0xCEB2, 0x5E23}, //6676 #CJK UNIFIED IDEOGRAPH + {0xCEB3, 0x5E20}, //6677 #CJK UNIFIED IDEOGRAPH + {0xCEB4, 0x5E24}, //6678 #CJK UNIFIED IDEOGRAPH + {0xCEB5, 0x5EB0}, //6679 #CJK UNIFIED IDEOGRAPH + {0xCEB6, 0x5EA4}, //6680 #CJK UNIFIED IDEOGRAPH + {0xCEB7, 0x5EA2}, //6681 #CJK UNIFIED IDEOGRAPH + {0xCEB8, 0x5E9B}, //6682 #CJK UNIFIED IDEOGRAPH + {0xCEB9, 0x5EA3}, //6683 #CJK UNIFIED IDEOGRAPH + {0xCEBA, 0x5EA5}, //6684 #CJK UNIFIED IDEOGRAPH + {0xCEBB, 0x5F07}, //6685 #CJK UNIFIED IDEOGRAPH + {0xCEBC, 0x5F2E}, //6686 #CJK UNIFIED IDEOGRAPH + {0xCEBD, 0x5F56}, //6687 #CJK UNIFIED IDEOGRAPH + {0xCEBE, 0x5F86}, //6688 #CJK UNIFIED IDEOGRAPH + {0xCEBF, 0x6037}, //6689 #CJK UNIFIED IDEOGRAPH + {0xCEC0, 0x6039}, //6690 #CJK UNIFIED IDEOGRAPH + {0xCEC1, 0x6054}, //6691 #CJK UNIFIED IDEOGRAPH + {0xCEC2, 0x6072}, //6692 #CJK UNIFIED IDEOGRAPH + {0xCEC3, 0x605E}, //6693 #CJK UNIFIED IDEOGRAPH + {0xCEC4, 0x6045}, //6694 #CJK UNIFIED IDEOGRAPH + {0xCEC5, 0x6053}, //6695 #CJK UNIFIED IDEOGRAPH + {0xCEC6, 0x6047}, //6696 #CJK UNIFIED IDEOGRAPH + {0xCEC7, 0x6049}, //6697 #CJK UNIFIED IDEOGRAPH + {0xCEC8, 0x605B}, //6698 #CJK UNIFIED IDEOGRAPH + {0xCEC9, 0x604C}, //6699 #CJK UNIFIED IDEOGRAPH + {0xCECA, 0x6040}, //6700 #CJK UNIFIED IDEOGRAPH + {0xCECB, 0x6042}, //6701 #CJK UNIFIED IDEOGRAPH + {0xCECC, 0x605F}, //6702 #CJK UNIFIED IDEOGRAPH + {0xCECD, 0x6024}, //6703 #CJK UNIFIED IDEOGRAPH + {0xCECE, 0x6044}, //6704 #CJK UNIFIED IDEOGRAPH + {0xCECF, 0x6058}, //6705 #CJK UNIFIED IDEOGRAPH + {0xCED0, 0x6066}, //6706 #CJK UNIFIED IDEOGRAPH + {0xCED1, 0x606E}, //6707 #CJK UNIFIED IDEOGRAPH + {0xCED2, 0x6242}, //6708 #CJK UNIFIED IDEOGRAPH + {0xCED3, 0x6243}, //6709 #CJK UNIFIED IDEOGRAPH + {0xCED4, 0x62CF}, //6710 #CJK UNIFIED IDEOGRAPH + {0xCED5, 0x630D}, //6711 #CJK UNIFIED IDEOGRAPH + {0xCED6, 0x630B}, //6712 #CJK UNIFIED IDEOGRAPH + {0xCED7, 0x62F5}, //6713 #CJK UNIFIED IDEOGRAPH + {0xCED8, 0x630E}, //6714 #CJK UNIFIED IDEOGRAPH + {0xCED9, 0x6303}, //6715 #CJK UNIFIED IDEOGRAPH + {0xCEDA, 0x62EB}, //6716 #CJK UNIFIED IDEOGRAPH + {0xCEDB, 0x62F9}, //6717 #CJK UNIFIED IDEOGRAPH + {0xCEDC, 0x630F}, //6718 #CJK UNIFIED IDEOGRAPH + {0xCEDD, 0x630C}, //6719 #CJK UNIFIED IDEOGRAPH + {0xCEDE, 0x62F8}, //6720 #CJK UNIFIED IDEOGRAPH + {0xCEDF, 0x62F6}, //6721 #CJK UNIFIED IDEOGRAPH + {0xCEE0, 0x6300}, //6722 #CJK UNIFIED IDEOGRAPH + {0xCEE1, 0x6313}, //6723 #CJK UNIFIED IDEOGRAPH + {0xCEE2, 0x6314}, //6724 #CJK UNIFIED IDEOGRAPH + {0xCEE3, 0x62FA}, //6725 #CJK UNIFIED IDEOGRAPH + {0xCEE4, 0x6315}, //6726 #CJK UNIFIED IDEOGRAPH + {0xCEE5, 0x62FB}, //6727 #CJK UNIFIED IDEOGRAPH + {0xCEE6, 0x62F0}, //6728 #CJK UNIFIED IDEOGRAPH + {0xCEE7, 0x6541}, //6729 #CJK UNIFIED IDEOGRAPH + {0xCEE8, 0x6543}, //6730 #CJK UNIFIED IDEOGRAPH + {0xCEE9, 0x65AA}, //6731 #CJK UNIFIED IDEOGRAPH + {0xCEEA, 0x65BF}, //6732 #CJK UNIFIED IDEOGRAPH + {0xCEEB, 0x6636}, //6733 #CJK UNIFIED IDEOGRAPH + {0xCEEC, 0x6621}, //6734 #CJK UNIFIED IDEOGRAPH + {0xCEED, 0x6632}, //6735 #CJK UNIFIED IDEOGRAPH + {0xCEEE, 0x6635}, //6736 #CJK UNIFIED IDEOGRAPH + {0xCEEF, 0x661C}, //6737 #CJK UNIFIED IDEOGRAPH + {0xCEF0, 0x6626}, //6738 #CJK UNIFIED IDEOGRAPH + {0xCEF1, 0x6622}, //6739 #CJK UNIFIED IDEOGRAPH + {0xCEF2, 0x6633}, //6740 #CJK UNIFIED IDEOGRAPH + {0xCEF3, 0x662B}, //6741 #CJK UNIFIED IDEOGRAPH + {0xCEF4, 0x663A}, //6742 #CJK UNIFIED IDEOGRAPH + {0xCEF5, 0x661D}, //6743 #CJK UNIFIED IDEOGRAPH + {0xCEF6, 0x6634}, //6744 #CJK UNIFIED IDEOGRAPH + {0xCEF7, 0x6639}, //6745 #CJK UNIFIED IDEOGRAPH + {0xCEF8, 0x662E}, //6746 #CJK UNIFIED IDEOGRAPH + {0xCEF9, 0x670F}, //6747 #CJK UNIFIED IDEOGRAPH + {0xCEFA, 0x6710}, //6748 #CJK UNIFIED IDEOGRAPH + {0xCEFB, 0x67C1}, //6749 #CJK UNIFIED IDEOGRAPH + {0xCEFC, 0x67F2}, //6750 #CJK UNIFIED IDEOGRAPH + {0xCEFD, 0x67C8}, //6751 #CJK UNIFIED IDEOGRAPH + {0xCEFE, 0x67BA}, //6752 #CJK UNIFIED IDEOGRAPH + {0xCF40, 0x67DC}, //6753 #CJK UNIFIED IDEOGRAPH + {0xCF41, 0x67BB}, //6754 #CJK UNIFIED IDEOGRAPH + {0xCF42, 0x67F8}, //6755 #CJK UNIFIED IDEOGRAPH + {0xCF43, 0x67D8}, //6756 #CJK UNIFIED IDEOGRAPH + {0xCF44, 0x67C0}, //6757 #CJK UNIFIED IDEOGRAPH + {0xCF45, 0x67B7}, //6758 #CJK UNIFIED IDEOGRAPH + {0xCF46, 0x67C5}, //6759 #CJK UNIFIED IDEOGRAPH + {0xCF47, 0x67EB}, //6760 #CJK UNIFIED IDEOGRAPH + {0xCF48, 0x67E4}, //6761 #CJK UNIFIED IDEOGRAPH + {0xCF49, 0x67DF}, //6762 #CJK UNIFIED IDEOGRAPH + {0xCF4A, 0x67B5}, //6763 #CJK UNIFIED IDEOGRAPH + {0xCF4B, 0x67CD}, //6764 #CJK UNIFIED IDEOGRAPH + {0xCF4C, 0x67B3}, //6765 #CJK UNIFIED IDEOGRAPH + {0xCF4D, 0x67F7}, //6766 #CJK UNIFIED IDEOGRAPH + {0xCF4E, 0x67F6}, //6767 #CJK UNIFIED IDEOGRAPH + {0xCF4F, 0x67EE}, //6768 #CJK UNIFIED IDEOGRAPH + {0xCF50, 0x67E3}, //6769 #CJK UNIFIED IDEOGRAPH + {0xCF51, 0x67C2}, //6770 #CJK UNIFIED IDEOGRAPH + {0xCF52, 0x67B9}, //6771 #CJK UNIFIED IDEOGRAPH + {0xCF53, 0x67CE}, //6772 #CJK UNIFIED IDEOGRAPH + {0xCF54, 0x67E7}, //6773 #CJK UNIFIED IDEOGRAPH + {0xCF55, 0x67F0}, //6774 #CJK UNIFIED IDEOGRAPH + {0xCF56, 0x67B2}, //6775 #CJK UNIFIED IDEOGRAPH + {0xCF57, 0x67FC}, //6776 #CJK UNIFIED IDEOGRAPH + {0xCF58, 0x67C6}, //6777 #CJK UNIFIED IDEOGRAPH + {0xCF59, 0x67ED}, //6778 #CJK UNIFIED IDEOGRAPH + {0xCF5A, 0x67CC}, //6779 #CJK UNIFIED IDEOGRAPH + {0xCF5B, 0x67AE}, //6780 #CJK UNIFIED IDEOGRAPH + {0xCF5C, 0x67E6}, //6781 #CJK UNIFIED IDEOGRAPH + {0xCF5D, 0x67DB}, //6782 #CJK UNIFIED IDEOGRAPH + {0xCF5E, 0x67FA}, //6783 #CJK UNIFIED IDEOGRAPH + {0xCF5F, 0x67C9}, //6784 #CJK UNIFIED IDEOGRAPH + {0xCF60, 0x67CA}, //6785 #CJK UNIFIED IDEOGRAPH + {0xCF61, 0x67C3}, //6786 #CJK UNIFIED IDEOGRAPH + {0xCF62, 0x67EA}, //6787 #CJK UNIFIED IDEOGRAPH + {0xCF63, 0x67CB}, //6788 #CJK UNIFIED IDEOGRAPH + {0xCF64, 0x6B28}, //6789 #CJK UNIFIED IDEOGRAPH + {0xCF65, 0x6B82}, //6790 #CJK UNIFIED IDEOGRAPH + {0xCF66, 0x6B84}, //6791 #CJK UNIFIED IDEOGRAPH + {0xCF67, 0x6BB6}, //6792 #CJK UNIFIED IDEOGRAPH + {0xCF68, 0x6BD6}, //6793 #CJK UNIFIED IDEOGRAPH + {0xCF69, 0x6BD8}, //6794 #CJK UNIFIED IDEOGRAPH + {0xCF6A, 0x6BE0}, //6795 #CJK UNIFIED IDEOGRAPH + {0xCF6B, 0x6C20}, //6796 #CJK UNIFIED IDEOGRAPH + {0xCF6C, 0x6C21}, //6797 #CJK UNIFIED IDEOGRAPH + {0xCF6D, 0x6D28}, //6798 #CJK UNIFIED IDEOGRAPH + {0xCF6E, 0x6D34}, //6799 #CJK UNIFIED IDEOGRAPH + {0xCF6F, 0x6D2D}, //6800 #CJK UNIFIED IDEOGRAPH + {0xCF70, 0x6D1F}, //6801 #CJK UNIFIED IDEOGRAPH + {0xCF71, 0x6D3C}, //6802 #CJK UNIFIED IDEOGRAPH + {0xCF72, 0x6D3F}, //6803 #CJK UNIFIED IDEOGRAPH + {0xCF73, 0x6D12}, //6804 #CJK UNIFIED IDEOGRAPH + {0xCF74, 0x6D0A}, //6805 #CJK UNIFIED IDEOGRAPH + {0xCF75, 0x6CDA}, //6806 #CJK UNIFIED IDEOGRAPH + {0xCF76, 0x6D33}, //6807 #CJK UNIFIED IDEOGRAPH + {0xCF77, 0x6D04}, //6808 #CJK UNIFIED IDEOGRAPH + {0xCF78, 0x6D19}, //6809 #CJK UNIFIED IDEOGRAPH + {0xCF79, 0x6D3A}, //6810 #CJK UNIFIED IDEOGRAPH + {0xCF7A, 0x6D1A}, //6811 #CJK UNIFIED IDEOGRAPH + {0xCF7B, 0x6D11}, //6812 #CJK UNIFIED IDEOGRAPH + {0xCF7C, 0x6D00}, //6813 #CJK UNIFIED IDEOGRAPH + {0xCF7D, 0x6D1D}, //6814 #CJK UNIFIED IDEOGRAPH + {0xCF7E, 0x6D42}, //6815 #CJK UNIFIED IDEOGRAPH + {0xCFA1, 0x6D01}, //6816 #CJK UNIFIED IDEOGRAPH + {0xCFA2, 0x6D18}, //6817 #CJK UNIFIED IDEOGRAPH + {0xCFA3, 0x6D37}, //6818 #CJK UNIFIED IDEOGRAPH + {0xCFA4, 0x6D03}, //6819 #CJK UNIFIED IDEOGRAPH + {0xCFA5, 0x6D0F}, //6820 #CJK UNIFIED IDEOGRAPH + {0xCFA6, 0x6D40}, //6821 #CJK UNIFIED IDEOGRAPH + {0xCFA7, 0x6D07}, //6822 #CJK UNIFIED IDEOGRAPH + {0xCFA8, 0x6D20}, //6823 #CJK UNIFIED IDEOGRAPH + {0xCFA9, 0x6D2C}, //6824 #CJK UNIFIED IDEOGRAPH + {0xCFAA, 0x6D08}, //6825 #CJK UNIFIED IDEOGRAPH + {0xCFAB, 0x6D22}, //6826 #CJK UNIFIED IDEOGRAPH + {0xCFAC, 0x6D09}, //6827 #CJK UNIFIED IDEOGRAPH + {0xCFAD, 0x6D10}, //6828 #CJK UNIFIED IDEOGRAPH + {0xCFAE, 0x70B7}, //6829 #CJK UNIFIED IDEOGRAPH + {0xCFAF, 0x709F}, //6830 #CJK UNIFIED IDEOGRAPH + {0xCFB0, 0x70BE}, //6831 #CJK UNIFIED IDEOGRAPH + {0xCFB1, 0x70B1}, //6832 #CJK UNIFIED IDEOGRAPH + {0xCFB2, 0x70B0}, //6833 #CJK UNIFIED IDEOGRAPH + {0xCFB3, 0x70A1}, //6834 #CJK UNIFIED IDEOGRAPH + {0xCFB4, 0x70B4}, //6835 #CJK UNIFIED IDEOGRAPH + {0xCFB5, 0x70B5}, //6836 #CJK UNIFIED IDEOGRAPH + {0xCFB6, 0x70A9}, //6837 #CJK UNIFIED IDEOGRAPH + {0xCFB7, 0x7241}, //6838 #CJK UNIFIED IDEOGRAPH + {0xCFB8, 0x7249}, //6839 #CJK UNIFIED IDEOGRAPH + {0xCFB9, 0x724A}, //6840 #CJK UNIFIED IDEOGRAPH + {0xCFBA, 0x726C}, //6841 #CJK UNIFIED IDEOGRAPH + {0xCFBB, 0x7270}, //6842 #CJK UNIFIED IDEOGRAPH + {0xCFBC, 0x7273}, //6843 #CJK UNIFIED IDEOGRAPH + {0xCFBD, 0x726E}, //6844 #CJK UNIFIED IDEOGRAPH + {0xCFBE, 0x72CA}, //6845 #CJK UNIFIED IDEOGRAPH + {0xCFBF, 0x72E4}, //6846 #CJK UNIFIED IDEOGRAPH + {0xCFC0, 0x72E8}, //6847 #CJK UNIFIED IDEOGRAPH + {0xCFC1, 0x72EB}, //6848 #CJK UNIFIED IDEOGRAPH + {0xCFC2, 0x72DF}, //6849 #CJK UNIFIED IDEOGRAPH + {0xCFC3, 0x72EA}, //6850 #CJK UNIFIED IDEOGRAPH + {0xCFC4, 0x72E6}, //6851 #CJK UNIFIED IDEOGRAPH + {0xCFC5, 0x72E3}, //6852 #CJK UNIFIED IDEOGRAPH + {0xCFC6, 0x7385}, //6853 #CJK UNIFIED IDEOGRAPH + {0xCFC7, 0x73CC}, //6854 #CJK UNIFIED IDEOGRAPH + {0xCFC8, 0x73C2}, //6855 #CJK UNIFIED IDEOGRAPH + {0xCFC9, 0x73C8}, //6856 #CJK UNIFIED IDEOGRAPH + {0xCFCA, 0x73C5}, //6857 #CJK UNIFIED IDEOGRAPH + {0xCFCB, 0x73B9}, //6858 #CJK UNIFIED IDEOGRAPH + {0xCFCC, 0x73B6}, //6859 #CJK UNIFIED IDEOGRAPH + {0xCFCD, 0x73B5}, //6860 #CJK UNIFIED IDEOGRAPH + {0xCFCE, 0x73B4}, //6861 #CJK UNIFIED IDEOGRAPH + {0xCFCF, 0x73EB}, //6862 #CJK UNIFIED IDEOGRAPH + {0xCFD0, 0x73BF}, //6863 #CJK UNIFIED IDEOGRAPH + {0xCFD1, 0x73C7}, //6864 #CJK UNIFIED IDEOGRAPH + {0xCFD2, 0x73BE}, //6865 #CJK UNIFIED IDEOGRAPH + {0xCFD3, 0x73C3}, //6866 #CJK UNIFIED IDEOGRAPH + {0xCFD4, 0x73C6}, //6867 #CJK UNIFIED IDEOGRAPH + {0xCFD5, 0x73B8}, //6868 #CJK UNIFIED IDEOGRAPH + {0xCFD6, 0x73CB}, //6869 #CJK UNIFIED IDEOGRAPH + {0xCFD7, 0x74EC}, //6870 #CJK UNIFIED IDEOGRAPH + {0xCFD8, 0x74EE}, //6871 #CJK UNIFIED IDEOGRAPH + {0xCFD9, 0x752E}, //6872 #CJK UNIFIED IDEOGRAPH + {0xCFDA, 0x7547}, //6873 #CJK UNIFIED IDEOGRAPH + {0xCFDB, 0x7548}, //6874 #CJK UNIFIED IDEOGRAPH + {0xCFDC, 0x75A7}, //6875 #CJK UNIFIED IDEOGRAPH + {0xCFDD, 0x75AA}, //6876 #CJK UNIFIED IDEOGRAPH + {0xCFDE, 0x7679}, //6877 #CJK UNIFIED IDEOGRAPH + {0xCFDF, 0x76C4}, //6878 #CJK UNIFIED IDEOGRAPH + {0xCFE0, 0x7708}, //6879 #CJK UNIFIED IDEOGRAPH + {0xCFE1, 0x7703}, //6880 #CJK UNIFIED IDEOGRAPH + {0xCFE2, 0x7704}, //6881 #CJK UNIFIED IDEOGRAPH + {0xCFE3, 0x7705}, //6882 #CJK UNIFIED IDEOGRAPH + {0xCFE4, 0x770A}, //6883 #CJK UNIFIED IDEOGRAPH + {0xCFE5, 0x76F7}, //6884 #CJK UNIFIED IDEOGRAPH + {0xCFE6, 0x76FB}, //6885 #CJK UNIFIED IDEOGRAPH + {0xCFE7, 0x76FA}, //6886 #CJK UNIFIED IDEOGRAPH + {0xCFE8, 0x77E7}, //6887 #CJK UNIFIED IDEOGRAPH + {0xCFE9, 0x77E8}, //6888 #CJK UNIFIED IDEOGRAPH + {0xCFEA, 0x7806}, //6889 #CJK UNIFIED IDEOGRAPH + {0xCFEB, 0x7811}, //6890 #CJK UNIFIED IDEOGRAPH + {0xCFEC, 0x7812}, //6891 #CJK UNIFIED IDEOGRAPH + {0xCFED, 0x7805}, //6892 #CJK UNIFIED IDEOGRAPH + {0xCFEE, 0x7810}, //6893 #CJK UNIFIED IDEOGRAPH + {0xCFEF, 0x780F}, //6894 #CJK UNIFIED IDEOGRAPH + {0xCFF0, 0x780E}, //6895 #CJK UNIFIED IDEOGRAPH + {0xCFF1, 0x7809}, //6896 #CJK UNIFIED IDEOGRAPH + {0xCFF2, 0x7803}, //6897 #CJK UNIFIED IDEOGRAPH + {0xCFF3, 0x7813}, //6898 #CJK UNIFIED IDEOGRAPH + {0xCFF4, 0x794A}, //6899 #CJK UNIFIED IDEOGRAPH + {0xCFF5, 0x794C}, //6900 #CJK UNIFIED IDEOGRAPH + {0xCFF6, 0x794B}, //6901 #CJK UNIFIED IDEOGRAPH + {0xCFF7, 0x7945}, //6902 #CJK UNIFIED IDEOGRAPH + {0xCFF8, 0x7944}, //6903 #CJK UNIFIED IDEOGRAPH + {0xCFF9, 0x79D5}, //6904 #CJK UNIFIED IDEOGRAPH + {0xCFFA, 0x79CD}, //6905 #CJK UNIFIED IDEOGRAPH + {0xCFFB, 0x79CF}, //6906 #CJK UNIFIED IDEOGRAPH + {0xCFFC, 0x79D6}, //6907 #CJK UNIFIED IDEOGRAPH + {0xCFFD, 0x79CE}, //6908 #CJK UNIFIED IDEOGRAPH + {0xCFFE, 0x7A80}, //6909 #CJK UNIFIED IDEOGRAPH + {0xD040, 0x7A7E}, //6910 #CJK UNIFIED IDEOGRAPH + {0xD041, 0x7AD1}, //6911 #CJK UNIFIED IDEOGRAPH + {0xD042, 0x7B00}, //6912 #CJK UNIFIED IDEOGRAPH + {0xD043, 0x7B01}, //6913 #CJK UNIFIED IDEOGRAPH + {0xD044, 0x7C7A}, //6914 #CJK UNIFIED IDEOGRAPH + {0xD045, 0x7C78}, //6915 #CJK UNIFIED IDEOGRAPH + {0xD046, 0x7C79}, //6916 #CJK UNIFIED IDEOGRAPH + {0xD047, 0x7C7F}, //6917 #CJK UNIFIED IDEOGRAPH + {0xD048, 0x7C80}, //6918 #CJK UNIFIED IDEOGRAPH + {0xD049, 0x7C81}, //6919 #CJK UNIFIED IDEOGRAPH + {0xD04A, 0x7D03}, //6920 #CJK UNIFIED IDEOGRAPH + {0xD04B, 0x7D08}, //6921 #CJK UNIFIED IDEOGRAPH + {0xD04C, 0x7D01}, //6922 #CJK UNIFIED IDEOGRAPH + {0xD04D, 0x7F58}, //6923 #CJK UNIFIED IDEOGRAPH + {0xD04E, 0x7F91}, //6924 #CJK UNIFIED IDEOGRAPH + {0xD04F, 0x7F8D}, //6925 #CJK UNIFIED IDEOGRAPH + {0xD050, 0x7FBE}, //6926 #CJK UNIFIED IDEOGRAPH + {0xD051, 0x8007}, //6927 #CJK UNIFIED IDEOGRAPH + {0xD052, 0x800E}, //6928 #CJK UNIFIED IDEOGRAPH + {0xD053, 0x800F}, //6929 #CJK UNIFIED IDEOGRAPH + {0xD054, 0x8014}, //6930 #CJK UNIFIED IDEOGRAPH + {0xD055, 0x8037}, //6931 #CJK UNIFIED IDEOGRAPH + {0xD056, 0x80D8}, //6932 #CJK UNIFIED IDEOGRAPH + {0xD057, 0x80C7}, //6933 #CJK UNIFIED IDEOGRAPH + {0xD058, 0x80E0}, //6934 #CJK UNIFIED IDEOGRAPH + {0xD059, 0x80D1}, //6935 #CJK UNIFIED IDEOGRAPH + {0xD05A, 0x80C8}, //6936 #CJK UNIFIED IDEOGRAPH + {0xD05B, 0x80C2}, //6937 #CJK UNIFIED IDEOGRAPH + {0xD05C, 0x80D0}, //6938 #CJK UNIFIED IDEOGRAPH + {0xD05D, 0x80C5}, //6939 #CJK UNIFIED IDEOGRAPH + {0xD05E, 0x80E3}, //6940 #CJK UNIFIED IDEOGRAPH + {0xD05F, 0x80D9}, //6941 #CJK UNIFIED IDEOGRAPH + {0xD060, 0x80DC}, //6942 #CJK UNIFIED IDEOGRAPH + {0xD061, 0x80CA}, //6943 #CJK UNIFIED IDEOGRAPH + {0xD062, 0x80D5}, //6944 #CJK UNIFIED IDEOGRAPH + {0xD063, 0x80C9}, //6945 #CJK UNIFIED IDEOGRAPH + {0xD064, 0x80CF}, //6946 #CJK UNIFIED IDEOGRAPH + {0xD065, 0x80D7}, //6947 #CJK UNIFIED IDEOGRAPH + {0xD066, 0x80E6}, //6948 #CJK UNIFIED IDEOGRAPH + {0xD067, 0x80CD}, //6949 #CJK UNIFIED IDEOGRAPH + {0xD068, 0x81FF}, //6950 #CJK UNIFIED IDEOGRAPH + {0xD069, 0x8221}, //6951 #CJK UNIFIED IDEOGRAPH + {0xD06A, 0x8294}, //6952 #CJK UNIFIED IDEOGRAPH + {0xD06B, 0x82D9}, //6953 #CJK UNIFIED IDEOGRAPH + {0xD06C, 0x82FE}, //6954 #CJK UNIFIED IDEOGRAPH + {0xD06D, 0x82F9}, //6955 #CJK UNIFIED IDEOGRAPH + {0xD06E, 0x8307}, //6956 #CJK UNIFIED IDEOGRAPH + {0xD06F, 0x82E8}, //6957 #CJK UNIFIED IDEOGRAPH + {0xD070, 0x8300}, //6958 #CJK UNIFIED IDEOGRAPH + {0xD071, 0x82D5}, //6959 #CJK UNIFIED IDEOGRAPH + {0xD072, 0x833A}, //6960 #CJK UNIFIED IDEOGRAPH + {0xD073, 0x82EB}, //6961 #CJK UNIFIED IDEOGRAPH + {0xD074, 0x82D6}, //6962 #CJK UNIFIED IDEOGRAPH + {0xD075, 0x82F4}, //6963 #CJK UNIFIED IDEOGRAPH + {0xD076, 0x82EC}, //6964 #CJK UNIFIED IDEOGRAPH + {0xD077, 0x82E1}, //6965 #CJK UNIFIED IDEOGRAPH + {0xD078, 0x82F2}, //6966 #CJK UNIFIED IDEOGRAPH + {0xD079, 0x82F5}, //6967 #CJK UNIFIED IDEOGRAPH + {0xD07A, 0x830C}, //6968 #CJK UNIFIED IDEOGRAPH + {0xD07B, 0x82FB}, //6969 #CJK UNIFIED IDEOGRAPH + {0xD07C, 0x82F6}, //6970 #CJK UNIFIED IDEOGRAPH + {0xD07D, 0x82F0}, //6971 #CJK UNIFIED IDEOGRAPH + {0xD07E, 0x82EA}, //6972 #CJK UNIFIED IDEOGRAPH + {0xD0A1, 0x82E4}, //6973 #CJK UNIFIED IDEOGRAPH + {0xD0A2, 0x82E0}, //6974 #CJK UNIFIED IDEOGRAPH + {0xD0A3, 0x82FA}, //6975 #CJK UNIFIED IDEOGRAPH + {0xD0A4, 0x82F3}, //6976 #CJK UNIFIED IDEOGRAPH + {0xD0A5, 0x82ED}, //6977 #CJK UNIFIED IDEOGRAPH + {0xD0A6, 0x8677}, //6978 #CJK UNIFIED IDEOGRAPH + {0xD0A7, 0x8674}, //6979 #CJK UNIFIED IDEOGRAPH + {0xD0A8, 0x867C}, //6980 #CJK UNIFIED IDEOGRAPH + {0xD0A9, 0x8673}, //6981 #CJK UNIFIED IDEOGRAPH + {0xD0AA, 0x8841}, //6982 #CJK UNIFIED IDEOGRAPH + {0xD0AB, 0x884E}, //6983 #CJK UNIFIED IDEOGRAPH + {0xD0AC, 0x8867}, //6984 #CJK UNIFIED IDEOGRAPH + {0xD0AD, 0x886A}, //6985 #CJK UNIFIED IDEOGRAPH + {0xD0AE, 0x8869}, //6986 #CJK UNIFIED IDEOGRAPH + {0xD0AF, 0x89D3}, //6987 #CJK UNIFIED IDEOGRAPH + {0xD0B0, 0x8A04}, //6988 #CJK UNIFIED IDEOGRAPH + {0xD0B1, 0x8A07}, //6989 #CJK UNIFIED IDEOGRAPH + {0xD0B2, 0x8D72}, //6990 #CJK UNIFIED IDEOGRAPH + {0xD0B3, 0x8FE3}, //6991 #CJK UNIFIED IDEOGRAPH + {0xD0B4, 0x8FE1}, //6992 #CJK UNIFIED IDEOGRAPH + {0xD0B5, 0x8FEE}, //6993 #CJK UNIFIED IDEOGRAPH + {0xD0B6, 0x8FE0}, //6994 #CJK UNIFIED IDEOGRAPH + {0xD0B7, 0x90F1}, //6995 #CJK UNIFIED IDEOGRAPH + {0xD0B8, 0x90BD}, //6996 #CJK UNIFIED IDEOGRAPH + {0xD0B9, 0x90BF}, //6997 #CJK UNIFIED IDEOGRAPH + {0xD0BA, 0x90D5}, //6998 #CJK UNIFIED IDEOGRAPH + {0xD0BB, 0x90C5}, //6999 #CJK UNIFIED IDEOGRAPH + {0xD0BC, 0x90BE}, //7000 #CJK UNIFIED IDEOGRAPH + {0xD0BD, 0x90C7}, //7001 #CJK UNIFIED IDEOGRAPH + {0xD0BE, 0x90CB}, //7002 #CJK UNIFIED IDEOGRAPH + {0xD0BF, 0x90C8}, //7003 #CJK UNIFIED IDEOGRAPH + {0xD0C0, 0x91D4}, //7004 #CJK UNIFIED IDEOGRAPH + {0xD0C1, 0x91D3}, //7005 #CJK UNIFIED IDEOGRAPH + {0xD0C2, 0x9654}, //7006 #CJK UNIFIED IDEOGRAPH + {0xD0C3, 0x964F}, //7007 #CJK UNIFIED IDEOGRAPH + {0xD0C4, 0x9651}, //7008 #CJK UNIFIED IDEOGRAPH + {0xD0C5, 0x9653}, //7009 #CJK UNIFIED IDEOGRAPH + {0xD0C6, 0x964A}, //7010 #CJK UNIFIED IDEOGRAPH + {0xD0C7, 0x964E}, //7011 #CJK UNIFIED IDEOGRAPH + {0xD0C8, 0x501E}, //7012 #CJK UNIFIED IDEOGRAPH + {0xD0C9, 0x5005}, //7013 #CJK UNIFIED IDEOGRAPH + {0xD0CA, 0x5007}, //7014 #CJK UNIFIED IDEOGRAPH + {0xD0CB, 0x5013}, //7015 #CJK UNIFIED IDEOGRAPH + {0xD0CC, 0x5022}, //7016 #CJK UNIFIED IDEOGRAPH + {0xD0CD, 0x5030}, //7017 #CJK UNIFIED IDEOGRAPH + {0xD0CE, 0x501B}, //7018 #CJK UNIFIED IDEOGRAPH + {0xD0CF, 0x4FF5}, //7019 #CJK UNIFIED IDEOGRAPH + {0xD0D0, 0x4FF4}, //7020 #CJK UNIFIED IDEOGRAPH + {0xD0D1, 0x5033}, //7021 #CJK UNIFIED IDEOGRAPH + {0xD0D2, 0x5037}, //7022 #CJK UNIFIED IDEOGRAPH + {0xD0D3, 0x502C}, //7023 #CJK UNIFIED IDEOGRAPH + {0xD0D4, 0x4FF6}, //7024 #CJK UNIFIED IDEOGRAPH + {0xD0D5, 0x4FF7}, //7025 #CJK UNIFIED IDEOGRAPH + {0xD0D6, 0x5017}, //7026 #CJK UNIFIED IDEOGRAPH + {0xD0D7, 0x501C}, //7027 #CJK UNIFIED IDEOGRAPH + {0xD0D8, 0x5020}, //7028 #CJK UNIFIED IDEOGRAPH + {0xD0D9, 0x5027}, //7029 #CJK UNIFIED IDEOGRAPH + {0xD0DA, 0x5035}, //7030 #CJK UNIFIED IDEOGRAPH + {0xD0DB, 0x502F}, //7031 #CJK UNIFIED IDEOGRAPH + {0xD0DC, 0x5031}, //7032 #CJK UNIFIED IDEOGRAPH + {0xD0DD, 0x500E}, //7033 #CJK UNIFIED IDEOGRAPH + {0xD0DE, 0x515A}, //7034 #CJK UNIFIED IDEOGRAPH + {0xD0DF, 0x5194}, //7035 #CJK UNIFIED IDEOGRAPH + {0xD0E0, 0x5193}, //7036 #CJK UNIFIED IDEOGRAPH + {0xD0E1, 0x51CA}, //7037 #CJK UNIFIED IDEOGRAPH + {0xD0E2, 0x51C4}, //7038 #CJK UNIFIED IDEOGRAPH + {0xD0E3, 0x51C5}, //7039 #CJK UNIFIED IDEOGRAPH + {0xD0E4, 0x51C8}, //7040 #CJK UNIFIED IDEOGRAPH + {0xD0E5, 0x51CE}, //7041 #CJK UNIFIED IDEOGRAPH + {0xD0E6, 0x5261}, //7042 #CJK UNIFIED IDEOGRAPH + {0xD0E7, 0x525A}, //7043 #CJK UNIFIED IDEOGRAPH + {0xD0E8, 0x5252}, //7044 #CJK UNIFIED IDEOGRAPH + {0xD0E9, 0x525E}, //7045 #CJK UNIFIED IDEOGRAPH + {0xD0EA, 0x525F}, //7046 #CJK UNIFIED IDEOGRAPH + {0xD0EB, 0x5255}, //7047 #CJK UNIFIED IDEOGRAPH + {0xD0EC, 0x5262}, //7048 #CJK UNIFIED IDEOGRAPH + {0xD0ED, 0x52CD}, //7049 #CJK UNIFIED IDEOGRAPH + {0xD0EE, 0x530E}, //7050 #CJK UNIFIED IDEOGRAPH + {0xD0EF, 0x539E}, //7051 #CJK UNIFIED IDEOGRAPH + {0xD0F0, 0x5526}, //7052 #CJK UNIFIED IDEOGRAPH + {0xD0F1, 0x54E2}, //7053 #CJK UNIFIED IDEOGRAPH + {0xD0F2, 0x5517}, //7054 #CJK UNIFIED IDEOGRAPH + {0xD0F3, 0x5512}, //7055 #CJK UNIFIED IDEOGRAPH + {0xD0F4, 0x54E7}, //7056 #CJK UNIFIED IDEOGRAPH + {0xD0F5, 0x54F3}, //7057 #CJK UNIFIED IDEOGRAPH + {0xD0F6, 0x54E4}, //7058 #CJK UNIFIED IDEOGRAPH + {0xD0F7, 0x551A}, //7059 #CJK UNIFIED IDEOGRAPH + {0xD0F8, 0x54FF}, //7060 #CJK UNIFIED IDEOGRAPH + {0xD0F9, 0x5504}, //7061 #CJK UNIFIED IDEOGRAPH + {0xD0FA, 0x5508}, //7062 #CJK UNIFIED IDEOGRAPH + {0xD0FB, 0x54EB}, //7063 #CJK UNIFIED IDEOGRAPH + {0xD0FC, 0x5511}, //7064 #CJK UNIFIED IDEOGRAPH + {0xD0FD, 0x5505}, //7065 #CJK UNIFIED IDEOGRAPH + {0xD0FE, 0x54F1}, //7066 #CJK UNIFIED IDEOGRAPH + {0xD140, 0x550A}, //7067 #CJK UNIFIED IDEOGRAPH + {0xD141, 0x54FB}, //7068 #CJK UNIFIED IDEOGRAPH + {0xD142, 0x54F7}, //7069 #CJK UNIFIED IDEOGRAPH + {0xD143, 0x54F8}, //7070 #CJK UNIFIED IDEOGRAPH + {0xD144, 0x54E0}, //7071 #CJK UNIFIED IDEOGRAPH + {0xD145, 0x550E}, //7072 #CJK UNIFIED IDEOGRAPH + {0xD146, 0x5503}, //7073 #CJK UNIFIED IDEOGRAPH + {0xD147, 0x550B}, //7074 #CJK UNIFIED IDEOGRAPH + {0xD148, 0x5701}, //7075 #CJK UNIFIED IDEOGRAPH + {0xD149, 0x5702}, //7076 #CJK UNIFIED IDEOGRAPH + {0xD14A, 0x57CC}, //7077 #CJK UNIFIED IDEOGRAPH + {0xD14B, 0x5832}, //7078 #CJK UNIFIED IDEOGRAPH + {0xD14C, 0x57D5}, //7079 #CJK UNIFIED IDEOGRAPH + {0xD14D, 0x57D2}, //7080 #CJK UNIFIED IDEOGRAPH + {0xD14E, 0x57BA}, //7081 #CJK UNIFIED IDEOGRAPH + {0xD14F, 0x57C6}, //7082 #CJK UNIFIED IDEOGRAPH + {0xD150, 0x57BD}, //7083 #CJK UNIFIED IDEOGRAPH + {0xD151, 0x57BC}, //7084 #CJK UNIFIED IDEOGRAPH + {0xD152, 0x57B8}, //7085 #CJK UNIFIED IDEOGRAPH + {0xD153, 0x57B6}, //7086 #CJK UNIFIED IDEOGRAPH + {0xD154, 0x57BF}, //7087 #CJK UNIFIED IDEOGRAPH + {0xD155, 0x57C7}, //7088 #CJK UNIFIED IDEOGRAPH + {0xD156, 0x57D0}, //7089 #CJK UNIFIED IDEOGRAPH + {0xD157, 0x57B9}, //7090 #CJK UNIFIED IDEOGRAPH + {0xD158, 0x57C1}, //7091 #CJK UNIFIED IDEOGRAPH + {0xD159, 0x590E}, //7092 #CJK UNIFIED IDEOGRAPH + {0xD15A, 0x594A}, //7093 #CJK UNIFIED IDEOGRAPH + {0xD15B, 0x5A19}, //7094 #CJK UNIFIED IDEOGRAPH + {0xD15C, 0x5A16}, //7095 #CJK UNIFIED IDEOGRAPH + {0xD15D, 0x5A2D}, //7096 #CJK UNIFIED IDEOGRAPH + {0xD15E, 0x5A2E}, //7097 #CJK UNIFIED IDEOGRAPH + {0xD15F, 0x5A15}, //7098 #CJK UNIFIED IDEOGRAPH + {0xD160, 0x5A0F}, //7099 #CJK UNIFIED IDEOGRAPH + {0xD161, 0x5A17}, //7100 #CJK UNIFIED IDEOGRAPH + {0xD162, 0x5A0A}, //7101 #CJK UNIFIED IDEOGRAPH + {0xD163, 0x5A1E}, //7102 #CJK UNIFIED IDEOGRAPH + {0xD164, 0x5A33}, //7103 #CJK UNIFIED IDEOGRAPH + {0xD165, 0x5B6C}, //7104 #CJK UNIFIED IDEOGRAPH + {0xD166, 0x5BA7}, //7105 #CJK UNIFIED IDEOGRAPH + {0xD167, 0x5BAD}, //7106 #CJK UNIFIED IDEOGRAPH + {0xD168, 0x5BAC}, //7107 #CJK UNIFIED IDEOGRAPH + {0xD169, 0x5C03}, //7108 #CJK UNIFIED IDEOGRAPH + {0xD16A, 0x5C56}, //7109 #CJK UNIFIED IDEOGRAPH + {0xD16B, 0x5C54}, //7110 #CJK UNIFIED IDEOGRAPH + {0xD16C, 0x5CEC}, //7111 #CJK UNIFIED IDEOGRAPH + {0xD16D, 0x5CFF}, //7112 #CJK UNIFIED IDEOGRAPH + {0xD16E, 0x5CEE}, //7113 #CJK UNIFIED IDEOGRAPH + {0xD16F, 0x5CF1}, //7114 #CJK UNIFIED IDEOGRAPH + {0xD170, 0x5CF7}, //7115 #CJK UNIFIED IDEOGRAPH + {0xD171, 0x5D00}, //7116 #CJK UNIFIED IDEOGRAPH + {0xD172, 0x5CF9}, //7117 #CJK UNIFIED IDEOGRAPH + {0xD173, 0x5E29}, //7118 #CJK UNIFIED IDEOGRAPH + {0xD174, 0x5E28}, //7119 #CJK UNIFIED IDEOGRAPH + {0xD175, 0x5EA8}, //7120 #CJK UNIFIED IDEOGRAPH + {0xD176, 0x5EAE}, //7121 #CJK UNIFIED IDEOGRAPH + {0xD177, 0x5EAA}, //7122 #CJK UNIFIED IDEOGRAPH + {0xD178, 0x5EAC}, //7123 #CJK UNIFIED IDEOGRAPH + {0xD179, 0x5F33}, //7124 #CJK UNIFIED IDEOGRAPH + {0xD17A, 0x5F30}, //7125 #CJK UNIFIED IDEOGRAPH + {0xD17B, 0x5F67}, //7126 #CJK UNIFIED IDEOGRAPH + {0xD17C, 0x605D}, //7127 #CJK UNIFIED IDEOGRAPH + {0xD17D, 0x605A}, //7128 #CJK UNIFIED IDEOGRAPH + {0xD17E, 0x6067}, //7129 #CJK UNIFIED IDEOGRAPH + {0xD1A1, 0x6041}, //7130 #CJK UNIFIED IDEOGRAPH + {0xD1A2, 0x60A2}, //7131 #CJK UNIFIED IDEOGRAPH + {0xD1A3, 0x6088}, //7132 #CJK UNIFIED IDEOGRAPH + {0xD1A4, 0x6080}, //7133 #CJK UNIFIED IDEOGRAPH + {0xD1A5, 0x6092}, //7134 #CJK UNIFIED IDEOGRAPH + {0xD1A6, 0x6081}, //7135 #CJK UNIFIED IDEOGRAPH + {0xD1A7, 0x609D}, //7136 #CJK UNIFIED IDEOGRAPH + {0xD1A8, 0x6083}, //7137 #CJK UNIFIED IDEOGRAPH + {0xD1A9, 0x6095}, //7138 #CJK UNIFIED IDEOGRAPH + {0xD1AA, 0x609B}, //7139 #CJK UNIFIED IDEOGRAPH + {0xD1AB, 0x6097}, //7140 #CJK UNIFIED IDEOGRAPH + {0xD1AC, 0x6087}, //7141 #CJK UNIFIED IDEOGRAPH + {0xD1AD, 0x609C}, //7142 #CJK UNIFIED IDEOGRAPH + {0xD1AE, 0x608E}, //7143 #CJK UNIFIED IDEOGRAPH + {0xD1AF, 0x6219}, //7144 #CJK UNIFIED IDEOGRAPH + {0xD1B0, 0x6246}, //7145 #CJK UNIFIED IDEOGRAPH + {0xD1B1, 0x62F2}, //7146 #CJK UNIFIED IDEOGRAPH + {0xD1B2, 0x6310}, //7147 #CJK UNIFIED IDEOGRAPH + {0xD1B3, 0x6356}, //7148 #CJK UNIFIED IDEOGRAPH + {0xD1B4, 0x632C}, //7149 #CJK UNIFIED IDEOGRAPH + {0xD1B5, 0x6344}, //7150 #CJK UNIFIED IDEOGRAPH + {0xD1B6, 0x6345}, //7151 #CJK UNIFIED IDEOGRAPH + {0xD1B7, 0x6336}, //7152 #CJK UNIFIED IDEOGRAPH + {0xD1B8, 0x6343}, //7153 #CJK UNIFIED IDEOGRAPH + {0xD1B9, 0x63E4}, //7154 #CJK UNIFIED IDEOGRAPH + {0xD1BA, 0x6339}, //7155 #CJK UNIFIED IDEOGRAPH + {0xD1BB, 0x634B}, //7156 #CJK UNIFIED IDEOGRAPH + {0xD1BC, 0x634A}, //7157 #CJK UNIFIED IDEOGRAPH + {0xD1BD, 0x633C}, //7158 #CJK UNIFIED IDEOGRAPH + {0xD1BE, 0x6329}, //7159 #CJK UNIFIED IDEOGRAPH + {0xD1BF, 0x6341}, //7160 #CJK UNIFIED IDEOGRAPH + {0xD1C0, 0x6334}, //7161 #CJK UNIFIED IDEOGRAPH + {0xD1C1, 0x6358}, //7162 #CJK UNIFIED IDEOGRAPH + {0xD1C2, 0x6354}, //7163 #CJK UNIFIED IDEOGRAPH + {0xD1C3, 0x6359}, //7164 #CJK UNIFIED IDEOGRAPH + {0xD1C4, 0x632D}, //7165 #CJK UNIFIED IDEOGRAPH + {0xD1C5, 0x6347}, //7166 #CJK UNIFIED IDEOGRAPH + {0xD1C6, 0x6333}, //7167 #CJK UNIFIED IDEOGRAPH + {0xD1C7, 0x635A}, //7168 #CJK UNIFIED IDEOGRAPH + {0xD1C8, 0x6351}, //7169 #CJK UNIFIED IDEOGRAPH + {0xD1C9, 0x6338}, //7170 #CJK UNIFIED IDEOGRAPH + {0xD1CA, 0x6357}, //7171 #CJK UNIFIED IDEOGRAPH + {0xD1CB, 0x6340}, //7172 #CJK UNIFIED IDEOGRAPH + {0xD1CC, 0x6348}, //7173 #CJK UNIFIED IDEOGRAPH + {0xD1CD, 0x654A}, //7174 #CJK UNIFIED IDEOGRAPH + {0xD1CE, 0x6546}, //7175 #CJK UNIFIED IDEOGRAPH + {0xD1CF, 0x65C6}, //7176 #CJK UNIFIED IDEOGRAPH + {0xD1D0, 0x65C3}, //7177 #CJK UNIFIED IDEOGRAPH + {0xD1D1, 0x65C4}, //7178 #CJK UNIFIED IDEOGRAPH + {0xD1D2, 0x65C2}, //7179 #CJK UNIFIED IDEOGRAPH + {0xD1D3, 0x664A}, //7180 #CJK UNIFIED IDEOGRAPH + {0xD1D4, 0x665F}, //7181 #CJK UNIFIED IDEOGRAPH + {0xD1D5, 0x6647}, //7182 #CJK UNIFIED IDEOGRAPH + {0xD1D6, 0x6651}, //7183 #CJK UNIFIED IDEOGRAPH + {0xD1D7, 0x6712}, //7184 #CJK UNIFIED IDEOGRAPH + {0xD1D8, 0x6713}, //7185 #CJK UNIFIED IDEOGRAPH + {0xD1D9, 0x681F}, //7186 #CJK UNIFIED IDEOGRAPH + {0xD1DA, 0x681A}, //7187 #CJK UNIFIED IDEOGRAPH + {0xD1DB, 0x6849}, //7188 #CJK UNIFIED IDEOGRAPH + {0xD1DC, 0x6832}, //7189 #CJK UNIFIED IDEOGRAPH + {0xD1DD, 0x6833}, //7190 #CJK UNIFIED IDEOGRAPH + {0xD1DE, 0x683B}, //7191 #CJK UNIFIED IDEOGRAPH + {0xD1DF, 0x684B}, //7192 #CJK UNIFIED IDEOGRAPH + {0xD1E0, 0x684F}, //7193 #CJK UNIFIED IDEOGRAPH + {0xD1E1, 0x6816}, //7194 #CJK UNIFIED IDEOGRAPH + {0xD1E2, 0x6831}, //7195 #CJK UNIFIED IDEOGRAPH + {0xD1E3, 0x681C}, //7196 #CJK UNIFIED IDEOGRAPH + {0xD1E4, 0x6835}, //7197 #CJK UNIFIED IDEOGRAPH + {0xD1E5, 0x682B}, //7198 #CJK UNIFIED IDEOGRAPH + {0xD1E6, 0x682D}, //7199 #CJK UNIFIED IDEOGRAPH + {0xD1E7, 0x682F}, //7200 #CJK UNIFIED IDEOGRAPH + {0xD1E8, 0x684E}, //7201 #CJK UNIFIED IDEOGRAPH + {0xD1E9, 0x6844}, //7202 #CJK UNIFIED IDEOGRAPH + {0xD1EA, 0x6834}, //7203 #CJK UNIFIED IDEOGRAPH + {0xD1EB, 0x681D}, //7204 #CJK UNIFIED IDEOGRAPH + {0xD1EC, 0x6812}, //7205 #CJK UNIFIED IDEOGRAPH + {0xD1ED, 0x6814}, //7206 #CJK UNIFIED IDEOGRAPH + {0xD1EE, 0x6826}, //7207 #CJK UNIFIED IDEOGRAPH + {0xD1EF, 0x6828}, //7208 #CJK UNIFIED IDEOGRAPH + {0xD1F0, 0x682E}, //7209 #CJK UNIFIED IDEOGRAPH + {0xD1F1, 0x684D}, //7210 #CJK UNIFIED IDEOGRAPH + {0xD1F2, 0x683A}, //7211 #CJK UNIFIED IDEOGRAPH + {0xD1F3, 0x6825}, //7212 #CJK UNIFIED IDEOGRAPH + {0xD1F4, 0x6820}, //7213 #CJK UNIFIED IDEOGRAPH + {0xD1F5, 0x6B2C}, //7214 #CJK UNIFIED IDEOGRAPH + {0xD1F6, 0x6B2F}, //7215 #CJK UNIFIED IDEOGRAPH + {0xD1F7, 0x6B2D}, //7216 #CJK UNIFIED IDEOGRAPH + {0xD1F8, 0x6B31}, //7217 #CJK UNIFIED IDEOGRAPH + {0xD1F9, 0x6B34}, //7218 #CJK UNIFIED IDEOGRAPH + {0xD1FA, 0x6B6D}, //7219 #CJK UNIFIED IDEOGRAPH + {0xD1FB, 0x8082}, //7220 #CJK UNIFIED IDEOGRAPH + {0xD1FC, 0x6B88}, //7221 #CJK UNIFIED IDEOGRAPH + {0xD1FD, 0x6BE6}, //7222 #CJK UNIFIED IDEOGRAPH + {0xD1FE, 0x6BE4}, //7223 #CJK UNIFIED IDEOGRAPH + {0xD240, 0x6BE8}, //7224 #CJK UNIFIED IDEOGRAPH + {0xD241, 0x6BE3}, //7225 #CJK UNIFIED IDEOGRAPH + {0xD242, 0x6BE2}, //7226 #CJK UNIFIED IDEOGRAPH + {0xD243, 0x6BE7}, //7227 #CJK UNIFIED IDEOGRAPH + {0xD244, 0x6C25}, //7228 #CJK UNIFIED IDEOGRAPH + {0xD245, 0x6D7A}, //7229 #CJK UNIFIED IDEOGRAPH + {0xD246, 0x6D63}, //7230 #CJK UNIFIED IDEOGRAPH + {0xD247, 0x6D64}, //7231 #CJK UNIFIED IDEOGRAPH + {0xD248, 0x6D76}, //7232 #CJK UNIFIED IDEOGRAPH + {0xD249, 0x6D0D}, //7233 #CJK UNIFIED IDEOGRAPH + {0xD24A, 0x6D61}, //7234 #CJK UNIFIED IDEOGRAPH + {0xD24B, 0x6D92}, //7235 #CJK UNIFIED IDEOGRAPH + {0xD24C, 0x6D58}, //7236 #CJK UNIFIED IDEOGRAPH + {0xD24D, 0x6D62}, //7237 #CJK UNIFIED IDEOGRAPH + {0xD24E, 0x6D6D}, //7238 #CJK UNIFIED IDEOGRAPH + {0xD24F, 0x6D6F}, //7239 #CJK UNIFIED IDEOGRAPH + {0xD250, 0x6D91}, //7240 #CJK UNIFIED IDEOGRAPH + {0xD251, 0x6D8D}, //7241 #CJK UNIFIED IDEOGRAPH + {0xD252, 0x6DEF}, //7242 #CJK UNIFIED IDEOGRAPH + {0xD253, 0x6D7F}, //7243 #CJK UNIFIED IDEOGRAPH + {0xD254, 0x6D86}, //7244 #CJK UNIFIED IDEOGRAPH + {0xD255, 0x6D5E}, //7245 #CJK UNIFIED IDEOGRAPH + {0xD256, 0x6D67}, //7246 #CJK UNIFIED IDEOGRAPH + {0xD257, 0x6D60}, //7247 #CJK UNIFIED IDEOGRAPH + {0xD258, 0x6D97}, //7248 #CJK UNIFIED IDEOGRAPH + {0xD259, 0x6D70}, //7249 #CJK UNIFIED IDEOGRAPH + {0xD25A, 0x6D7C}, //7250 #CJK UNIFIED IDEOGRAPH + {0xD25B, 0x6D5F}, //7251 #CJK UNIFIED IDEOGRAPH + {0xD25C, 0x6D82}, //7252 #CJK UNIFIED IDEOGRAPH + {0xD25D, 0x6D98}, //7253 #CJK UNIFIED IDEOGRAPH + {0xD25E, 0x6D2F}, //7254 #CJK UNIFIED IDEOGRAPH + {0xD25F, 0x6D68}, //7255 #CJK UNIFIED IDEOGRAPH + {0xD260, 0x6D8B}, //7256 #CJK UNIFIED IDEOGRAPH + {0xD261, 0x6D7E}, //7257 #CJK UNIFIED IDEOGRAPH + {0xD262, 0x6D80}, //7258 #CJK UNIFIED IDEOGRAPH + {0xD263, 0x6D84}, //7259 #CJK UNIFIED IDEOGRAPH + {0xD264, 0x6D16}, //7260 #CJK UNIFIED IDEOGRAPH + {0xD265, 0x6D83}, //7261 #CJK UNIFIED IDEOGRAPH + {0xD266, 0x6D7B}, //7262 #CJK UNIFIED IDEOGRAPH + {0xD267, 0x6D7D}, //7263 #CJK UNIFIED IDEOGRAPH + {0xD268, 0x6D75}, //7264 #CJK UNIFIED IDEOGRAPH + {0xD269, 0x6D90}, //7265 #CJK UNIFIED IDEOGRAPH + {0xD26A, 0x70DC}, //7266 #CJK UNIFIED IDEOGRAPH + {0xD26B, 0x70D3}, //7267 #CJK UNIFIED IDEOGRAPH + {0xD26C, 0x70D1}, //7268 #CJK UNIFIED IDEOGRAPH + {0xD26D, 0x70DD}, //7269 #CJK UNIFIED IDEOGRAPH + {0xD26E, 0x70CB}, //7270 #CJK UNIFIED IDEOGRAPH + {0xD26F, 0x7F39}, //7271 #CJK UNIFIED IDEOGRAPH + {0xD270, 0x70E2}, //7272 #CJK UNIFIED IDEOGRAPH + {0xD271, 0x70D7}, //7273 #CJK UNIFIED IDEOGRAPH + {0xD272, 0x70D2}, //7274 #CJK UNIFIED IDEOGRAPH + {0xD273, 0x70DE}, //7275 #CJK UNIFIED IDEOGRAPH + {0xD274, 0x70E0}, //7276 #CJK UNIFIED IDEOGRAPH + {0xD275, 0x70D4}, //7277 #CJK UNIFIED IDEOGRAPH + {0xD276, 0x70CD}, //7278 #CJK UNIFIED IDEOGRAPH + {0xD277, 0x70C5}, //7279 #CJK UNIFIED IDEOGRAPH + {0xD278, 0x70C6}, //7280 #CJK UNIFIED IDEOGRAPH + {0xD279, 0x70C7}, //7281 #CJK UNIFIED IDEOGRAPH + {0xD27A, 0x70DA}, //7282 #CJK UNIFIED IDEOGRAPH + {0xD27B, 0x70CE}, //7283 #CJK UNIFIED IDEOGRAPH + {0xD27C, 0x70E1}, //7284 #CJK UNIFIED IDEOGRAPH + {0xD27D, 0x7242}, //7285 #CJK UNIFIED IDEOGRAPH + {0xD27E, 0x7278}, //7286 #CJK UNIFIED IDEOGRAPH + {0xD2A1, 0x7277}, //7287 #CJK UNIFIED IDEOGRAPH + {0xD2A2, 0x7276}, //7288 #CJK UNIFIED IDEOGRAPH + {0xD2A3, 0x7300}, //7289 #CJK UNIFIED IDEOGRAPH + {0xD2A4, 0x72FA}, //7290 #CJK UNIFIED IDEOGRAPH + {0xD2A5, 0x72F4}, //7291 #CJK UNIFIED IDEOGRAPH + {0xD2A6, 0x72FE}, //7292 #CJK UNIFIED IDEOGRAPH + {0xD2A7, 0x72F6}, //7293 #CJK UNIFIED IDEOGRAPH + {0xD2A8, 0x72F3}, //7294 #CJK UNIFIED IDEOGRAPH + {0xD2A9, 0x72FB}, //7295 #CJK UNIFIED IDEOGRAPH + {0xD2AA, 0x7301}, //7296 #CJK UNIFIED IDEOGRAPH + {0xD2AB, 0x73D3}, //7297 #CJK UNIFIED IDEOGRAPH + {0xD2AC, 0x73D9}, //7298 #CJK UNIFIED IDEOGRAPH + {0xD2AD, 0x73E5}, //7299 #CJK UNIFIED IDEOGRAPH + {0xD2AE, 0x73D6}, //7300 #CJK UNIFIED IDEOGRAPH + {0xD2AF, 0x73BC}, //7301 #CJK UNIFIED IDEOGRAPH + {0xD2B0, 0x73E7}, //7302 #CJK UNIFIED IDEOGRAPH + {0xD2B1, 0x73E3}, //7303 #CJK UNIFIED IDEOGRAPH + {0xD2B2, 0x73E9}, //7304 #CJK UNIFIED IDEOGRAPH + {0xD2B3, 0x73DC}, //7305 #CJK UNIFIED IDEOGRAPH + {0xD2B4, 0x73D2}, //7306 #CJK UNIFIED IDEOGRAPH + {0xD2B5, 0x73DB}, //7307 #CJK UNIFIED IDEOGRAPH + {0xD2B6, 0x73D4}, //7308 #CJK UNIFIED IDEOGRAPH + {0xD2B7, 0x73DD}, //7309 #CJK UNIFIED IDEOGRAPH + {0xD2B8, 0x73DA}, //7310 #CJK UNIFIED IDEOGRAPH + {0xD2B9, 0x73D7}, //7311 #CJK UNIFIED IDEOGRAPH + {0xD2BA, 0x73D8}, //7312 #CJK UNIFIED IDEOGRAPH + {0xD2BB, 0x73E8}, //7313 #CJK UNIFIED IDEOGRAPH + {0xD2BC, 0x74DE}, //7314 #CJK UNIFIED IDEOGRAPH + {0xD2BD, 0x74DF}, //7315 #CJK UNIFIED IDEOGRAPH + {0xD2BE, 0x74F4}, //7316 #CJK UNIFIED IDEOGRAPH + {0xD2BF, 0x74F5}, //7317 #CJK UNIFIED IDEOGRAPH + {0xD2C0, 0x7521}, //7318 #CJK UNIFIED IDEOGRAPH + {0xD2C1, 0x755B}, //7319 #CJK UNIFIED IDEOGRAPH + {0xD2C2, 0x755F}, //7320 #CJK UNIFIED IDEOGRAPH + {0xD2C3, 0x75B0}, //7321 #CJK UNIFIED IDEOGRAPH + {0xD2C4, 0x75C1}, //7322 #CJK UNIFIED IDEOGRAPH + {0xD2C5, 0x75BB}, //7323 #CJK UNIFIED IDEOGRAPH + {0xD2C6, 0x75C4}, //7324 #CJK UNIFIED IDEOGRAPH + {0xD2C7, 0x75C0}, //7325 #CJK UNIFIED IDEOGRAPH + {0xD2C8, 0x75BF}, //7326 #CJK UNIFIED IDEOGRAPH + {0xD2C9, 0x75B6}, //7327 #CJK UNIFIED IDEOGRAPH + {0xD2CA, 0x75BA}, //7328 #CJK UNIFIED IDEOGRAPH + {0xD2CB, 0x768A}, //7329 #CJK UNIFIED IDEOGRAPH + {0xD2CC, 0x76C9}, //7330 #CJK UNIFIED IDEOGRAPH + {0xD2CD, 0x771D}, //7331 #CJK UNIFIED IDEOGRAPH + {0xD2CE, 0x771B}, //7332 #CJK UNIFIED IDEOGRAPH + {0xD2CF, 0x7710}, //7333 #CJK UNIFIED IDEOGRAPH + {0xD2D0, 0x7713}, //7334 #CJK UNIFIED IDEOGRAPH + {0xD2D1, 0x7712}, //7335 #CJK UNIFIED IDEOGRAPH + {0xD2D2, 0x7723}, //7336 #CJK UNIFIED IDEOGRAPH + {0xD2D3, 0x7711}, //7337 #CJK UNIFIED IDEOGRAPH + {0xD2D4, 0x7715}, //7338 #CJK UNIFIED IDEOGRAPH + {0xD2D5, 0x7719}, //7339 #CJK UNIFIED IDEOGRAPH + {0xD2D6, 0x771A}, //7340 #CJK UNIFIED IDEOGRAPH + {0xD2D7, 0x7722}, //7341 #CJK UNIFIED IDEOGRAPH + {0xD2D8, 0x7727}, //7342 #CJK UNIFIED IDEOGRAPH + {0xD2D9, 0x7823}, //7343 #CJK UNIFIED IDEOGRAPH + {0xD2DA, 0x782C}, //7344 #CJK UNIFIED IDEOGRAPH + {0xD2DB, 0x7822}, //7345 #CJK UNIFIED IDEOGRAPH + {0xD2DC, 0x7835}, //7346 #CJK UNIFIED IDEOGRAPH + {0xD2DD, 0x782F}, //7347 #CJK UNIFIED IDEOGRAPH + {0xD2DE, 0x7828}, //7348 #CJK UNIFIED IDEOGRAPH + {0xD2DF, 0x782E}, //7349 #CJK UNIFIED IDEOGRAPH + {0xD2E0, 0x782B}, //7350 #CJK UNIFIED IDEOGRAPH + {0xD2E1, 0x7821}, //7351 #CJK UNIFIED IDEOGRAPH + {0xD2E2, 0x7829}, //7352 #CJK UNIFIED IDEOGRAPH + {0xD2E3, 0x7833}, //7353 #CJK UNIFIED IDEOGRAPH + {0xD2E4, 0x782A}, //7354 #CJK UNIFIED IDEOGRAPH + {0xD2E5, 0x7831}, //7355 #CJK UNIFIED IDEOGRAPH + {0xD2E6, 0x7954}, //7356 #CJK UNIFIED IDEOGRAPH + {0xD2E7, 0x795B}, //7357 #CJK UNIFIED IDEOGRAPH + {0xD2E8, 0x794F}, //7358 #CJK UNIFIED IDEOGRAPH + {0xD2E9, 0x795C}, //7359 #CJK UNIFIED IDEOGRAPH + {0xD2EA, 0x7953}, //7360 #CJK UNIFIED IDEOGRAPH + {0xD2EB, 0x7952}, //7361 #CJK UNIFIED IDEOGRAPH + {0xD2EC, 0x7951}, //7362 #CJK UNIFIED IDEOGRAPH + {0xD2ED, 0x79EB}, //7363 #CJK UNIFIED IDEOGRAPH + {0xD2EE, 0x79EC}, //7364 #CJK UNIFIED IDEOGRAPH + {0xD2EF, 0x79E0}, //7365 #CJK UNIFIED IDEOGRAPH + {0xD2F0, 0x79EE}, //7366 #CJK UNIFIED IDEOGRAPH + {0xD2F1, 0x79ED}, //7367 #CJK UNIFIED IDEOGRAPH + {0xD2F2, 0x79EA}, //7368 #CJK UNIFIED IDEOGRAPH + {0xD2F3, 0x79DC}, //7369 #CJK UNIFIED IDEOGRAPH + {0xD2F4, 0x79DE}, //7370 #CJK UNIFIED IDEOGRAPH + {0xD2F5, 0x79DD}, //7371 #CJK UNIFIED IDEOGRAPH + {0xD2F6, 0x7A86}, //7372 #CJK UNIFIED IDEOGRAPH + {0xD2F7, 0x7A89}, //7373 #CJK UNIFIED IDEOGRAPH + {0xD2F8, 0x7A85}, //7374 #CJK UNIFIED IDEOGRAPH + {0xD2F9, 0x7A8B}, //7375 #CJK UNIFIED IDEOGRAPH + {0xD2FA, 0x7A8C}, //7376 #CJK UNIFIED IDEOGRAPH + {0xD2FB, 0x7A8A}, //7377 #CJK UNIFIED IDEOGRAPH + {0xD2FC, 0x7A87}, //7378 #CJK UNIFIED IDEOGRAPH + {0xD2FD, 0x7AD8}, //7379 #CJK UNIFIED IDEOGRAPH + {0xD2FE, 0x7B10}, //7380 #CJK UNIFIED IDEOGRAPH + {0xD340, 0x7B04}, //7381 #CJK UNIFIED IDEOGRAPH + {0xD341, 0x7B13}, //7382 #CJK UNIFIED IDEOGRAPH + {0xD342, 0x7B05}, //7383 #CJK UNIFIED IDEOGRAPH + {0xD343, 0x7B0F}, //7384 #CJK UNIFIED IDEOGRAPH + {0xD344, 0x7B08}, //7385 #CJK UNIFIED IDEOGRAPH + {0xD345, 0x7B0A}, //7386 #CJK UNIFIED IDEOGRAPH + {0xD346, 0x7B0E}, //7387 #CJK UNIFIED IDEOGRAPH + {0xD347, 0x7B09}, //7388 #CJK UNIFIED IDEOGRAPH + {0xD348, 0x7B12}, //7389 #CJK UNIFIED IDEOGRAPH + {0xD349, 0x7C84}, //7390 #CJK UNIFIED IDEOGRAPH + {0xD34A, 0x7C91}, //7391 #CJK UNIFIED IDEOGRAPH + {0xD34B, 0x7C8A}, //7392 #CJK UNIFIED IDEOGRAPH + {0xD34C, 0x7C8C}, //7393 #CJK UNIFIED IDEOGRAPH + {0xD34D, 0x7C88}, //7394 #CJK UNIFIED IDEOGRAPH + {0xD34E, 0x7C8D}, //7395 #CJK UNIFIED IDEOGRAPH + {0xD34F, 0x7C85}, //7396 #CJK UNIFIED IDEOGRAPH + {0xD350, 0x7D1E}, //7397 #CJK UNIFIED IDEOGRAPH + {0xD351, 0x7D1D}, //7398 #CJK UNIFIED IDEOGRAPH + {0xD352, 0x7D11}, //7399 #CJK UNIFIED IDEOGRAPH + {0xD353, 0x7D0E}, //7400 #CJK UNIFIED IDEOGRAPH + {0xD354, 0x7D18}, //7401 #CJK UNIFIED IDEOGRAPH + {0xD355, 0x7D16}, //7402 #CJK UNIFIED IDEOGRAPH + {0xD356, 0x7D13}, //7403 #CJK UNIFIED IDEOGRAPH + {0xD357, 0x7D1F}, //7404 #CJK UNIFIED IDEOGRAPH + {0xD358, 0x7D12}, //7405 #CJK UNIFIED IDEOGRAPH + {0xD359, 0x7D0F}, //7406 #CJK UNIFIED IDEOGRAPH + {0xD35A, 0x7D0C}, //7407 #CJK UNIFIED IDEOGRAPH + {0xD35B, 0x7F5C}, //7408 #CJK UNIFIED IDEOGRAPH + {0xD35C, 0x7F61}, //7409 #CJK UNIFIED IDEOGRAPH + {0xD35D, 0x7F5E}, //7410 #CJK UNIFIED IDEOGRAPH + {0xD35E, 0x7F60}, //7411 #CJK UNIFIED IDEOGRAPH + {0xD35F, 0x7F5D}, //7412 #CJK UNIFIED IDEOGRAPH + {0xD360, 0x7F5B}, //7413 #CJK UNIFIED IDEOGRAPH + {0xD361, 0x7F96}, //7414 #CJK UNIFIED IDEOGRAPH + {0xD362, 0x7F92}, //7415 #CJK UNIFIED IDEOGRAPH + {0xD363, 0x7FC3}, //7416 #CJK UNIFIED IDEOGRAPH + {0xD364, 0x7FC2}, //7417 #CJK UNIFIED IDEOGRAPH + {0xD365, 0x7FC0}, //7418 #CJK UNIFIED IDEOGRAPH + {0xD366, 0x8016}, //7419 #CJK UNIFIED IDEOGRAPH + {0xD367, 0x803E}, //7420 #CJK UNIFIED IDEOGRAPH + {0xD368, 0x8039}, //7421 #CJK UNIFIED IDEOGRAPH + {0xD369, 0x80FA}, //7422 #CJK UNIFIED IDEOGRAPH + {0xD36A, 0x80F2}, //7423 #CJK UNIFIED IDEOGRAPH + {0xD36B, 0x80F9}, //7424 #CJK UNIFIED IDEOGRAPH + {0xD36C, 0x80F5}, //7425 #CJK UNIFIED IDEOGRAPH + {0xD36D, 0x8101}, //7426 #CJK UNIFIED IDEOGRAPH + {0xD36E, 0x80FB}, //7427 #CJK UNIFIED IDEOGRAPH + {0xD36F, 0x8100}, //7428 #CJK UNIFIED IDEOGRAPH + {0xD370, 0x8201}, //7429 #CJK UNIFIED IDEOGRAPH + {0xD371, 0x822F}, //7430 #CJK UNIFIED IDEOGRAPH + {0xD372, 0x8225}, //7431 #CJK UNIFIED IDEOGRAPH + {0xD373, 0x8333}, //7432 #CJK UNIFIED IDEOGRAPH + {0xD374, 0x832D}, //7433 #CJK UNIFIED IDEOGRAPH + {0xD375, 0x8344}, //7434 #CJK UNIFIED IDEOGRAPH + {0xD376, 0x8319}, //7435 #CJK UNIFIED IDEOGRAPH + {0xD377, 0x8351}, //7436 #CJK UNIFIED IDEOGRAPH + {0xD378, 0x8325}, //7437 #CJK UNIFIED IDEOGRAPH + {0xD379, 0x8356}, //7438 #CJK UNIFIED IDEOGRAPH + {0xD37A, 0x833F}, //7439 #CJK UNIFIED IDEOGRAPH + {0xD37B, 0x8341}, //7440 #CJK UNIFIED IDEOGRAPH + {0xD37C, 0x8326}, //7441 #CJK UNIFIED IDEOGRAPH + {0xD37D, 0x831C}, //7442 #CJK UNIFIED IDEOGRAPH + {0xD37E, 0x8322}, //7443 #CJK UNIFIED IDEOGRAPH + {0xD3A1, 0x8342}, //7444 #CJK UNIFIED IDEOGRAPH + {0xD3A2, 0x834E}, //7445 #CJK UNIFIED IDEOGRAPH + {0xD3A3, 0x831B}, //7446 #CJK UNIFIED IDEOGRAPH + {0xD3A4, 0x832A}, //7447 #CJK UNIFIED IDEOGRAPH + {0xD3A5, 0x8308}, //7448 #CJK UNIFIED IDEOGRAPH + {0xD3A6, 0x833C}, //7449 #CJK UNIFIED IDEOGRAPH + {0xD3A7, 0x834D}, //7450 #CJK UNIFIED IDEOGRAPH + {0xD3A8, 0x8316}, //7451 #CJK UNIFIED IDEOGRAPH + {0xD3A9, 0x8324}, //7452 #CJK UNIFIED IDEOGRAPH + {0xD3AA, 0x8320}, //7453 #CJK UNIFIED IDEOGRAPH + {0xD3AB, 0x8337}, //7454 #CJK UNIFIED IDEOGRAPH + {0xD3AC, 0x832F}, //7455 #CJK UNIFIED IDEOGRAPH + {0xD3AD, 0x8329}, //7456 #CJK UNIFIED IDEOGRAPH + {0xD3AE, 0x8347}, //7457 #CJK UNIFIED IDEOGRAPH + {0xD3AF, 0x8345}, //7458 #CJK UNIFIED IDEOGRAPH + {0xD3B0, 0x834C}, //7459 #CJK UNIFIED IDEOGRAPH + {0xD3B1, 0x8353}, //7460 #CJK UNIFIED IDEOGRAPH + {0xD3B2, 0x831E}, //7461 #CJK UNIFIED IDEOGRAPH + {0xD3B3, 0x832C}, //7462 #CJK UNIFIED IDEOGRAPH + {0xD3B4, 0x834B}, //7463 #CJK UNIFIED IDEOGRAPH + {0xD3B5, 0x8327}, //7464 #CJK UNIFIED IDEOGRAPH + {0xD3B6, 0x8348}, //7465 #CJK UNIFIED IDEOGRAPH + {0xD3B7, 0x8653}, //7466 #CJK UNIFIED IDEOGRAPH + {0xD3B8, 0x8652}, //7467 #CJK UNIFIED IDEOGRAPH + {0xD3B9, 0x86A2}, //7468 #CJK UNIFIED IDEOGRAPH + {0xD3BA, 0x86A8}, //7469 #CJK UNIFIED IDEOGRAPH + {0xD3BB, 0x8696}, //7470 #CJK UNIFIED IDEOGRAPH + {0xD3BC, 0x868D}, //7471 #CJK UNIFIED IDEOGRAPH + {0xD3BD, 0x8691}, //7472 #CJK UNIFIED IDEOGRAPH + {0xD3BE, 0x869E}, //7473 #CJK UNIFIED IDEOGRAPH + {0xD3BF, 0x8687}, //7474 #CJK UNIFIED IDEOGRAPH + {0xD3C0, 0x8697}, //7475 #CJK UNIFIED IDEOGRAPH + {0xD3C1, 0x8686}, //7476 #CJK UNIFIED IDEOGRAPH + {0xD3C2, 0x868B}, //7477 #CJK UNIFIED IDEOGRAPH + {0xD3C3, 0x869A}, //7478 #CJK UNIFIED IDEOGRAPH + {0xD3C4, 0x8685}, //7479 #CJK UNIFIED IDEOGRAPH + {0xD3C5, 0x86A5}, //7480 #CJK UNIFIED IDEOGRAPH + {0xD3C6, 0x8699}, //7481 #CJK UNIFIED IDEOGRAPH + {0xD3C7, 0x86A1}, //7482 #CJK UNIFIED IDEOGRAPH + {0xD3C8, 0x86A7}, //7483 #CJK UNIFIED IDEOGRAPH + {0xD3C9, 0x8695}, //7484 #CJK UNIFIED IDEOGRAPH + {0xD3CA, 0x8698}, //7485 #CJK UNIFIED IDEOGRAPH + {0xD3CB, 0x868E}, //7486 #CJK UNIFIED IDEOGRAPH + {0xD3CC, 0x869D}, //7487 #CJK UNIFIED IDEOGRAPH + {0xD3CD, 0x8690}, //7488 #CJK UNIFIED IDEOGRAPH + {0xD3CE, 0x8694}, //7489 #CJK UNIFIED IDEOGRAPH + {0xD3CF, 0x8843}, //7490 #CJK UNIFIED IDEOGRAPH + {0xD3D0, 0x8844}, //7491 #CJK UNIFIED IDEOGRAPH + {0xD3D1, 0x886D}, //7492 #CJK UNIFIED IDEOGRAPH + {0xD3D2, 0x8875}, //7493 #CJK UNIFIED IDEOGRAPH + {0xD3D3, 0x8876}, //7494 #CJK UNIFIED IDEOGRAPH + {0xD3D4, 0x8872}, //7495 #CJK UNIFIED IDEOGRAPH + {0xD3D5, 0x8880}, //7496 #CJK UNIFIED IDEOGRAPH + {0xD3D6, 0x8871}, //7497 #CJK UNIFIED IDEOGRAPH + {0xD3D7, 0x887F}, //7498 #CJK UNIFIED IDEOGRAPH + {0xD3D8, 0x886F}, //7499 #CJK UNIFIED IDEOGRAPH + {0xD3D9, 0x8883}, //7500 #CJK UNIFIED IDEOGRAPH + {0xD3DA, 0x887E}, //7501 #CJK UNIFIED IDEOGRAPH + {0xD3DB, 0x8874}, //7502 #CJK UNIFIED IDEOGRAPH + {0xD3DC, 0x887C}, //7503 #CJK UNIFIED IDEOGRAPH + {0xD3DD, 0x8A12}, //7504 #CJK UNIFIED IDEOGRAPH + {0xD3DE, 0x8C47}, //7505 #CJK UNIFIED IDEOGRAPH + {0xD3DF, 0x8C57}, //7506 #CJK UNIFIED IDEOGRAPH + {0xD3E0, 0x8C7B}, //7507 #CJK UNIFIED IDEOGRAPH + {0xD3E1, 0x8CA4}, //7508 #CJK UNIFIED IDEOGRAPH + {0xD3E2, 0x8CA3}, //7509 #CJK UNIFIED IDEOGRAPH + {0xD3E3, 0x8D76}, //7510 #CJK UNIFIED IDEOGRAPH + {0xD3E4, 0x8D78}, //7511 #CJK UNIFIED IDEOGRAPH + {0xD3E5, 0x8DB5}, //7512 #CJK UNIFIED IDEOGRAPH + {0xD3E6, 0x8DB7}, //7513 #CJK UNIFIED IDEOGRAPH + {0xD3E7, 0x8DB6}, //7514 #CJK UNIFIED IDEOGRAPH + {0xD3E8, 0x8ED1}, //7515 #CJK UNIFIED IDEOGRAPH + {0xD3E9, 0x8ED3}, //7516 #CJK UNIFIED IDEOGRAPH + {0xD3EA, 0x8FFE}, //7517 #CJK UNIFIED IDEOGRAPH + {0xD3EB, 0x8FF5}, //7518 #CJK UNIFIED IDEOGRAPH + {0xD3EC, 0x9002}, //7519 #CJK UNIFIED IDEOGRAPH + {0xD3ED, 0x8FFF}, //7520 #CJK UNIFIED IDEOGRAPH + {0xD3EE, 0x8FFB}, //7521 #CJK UNIFIED IDEOGRAPH + {0xD3EF, 0x9004}, //7522 #CJK UNIFIED IDEOGRAPH + {0xD3F0, 0x8FFC}, //7523 #CJK UNIFIED IDEOGRAPH + {0xD3F1, 0x8FF6}, //7524 #CJK UNIFIED IDEOGRAPH + {0xD3F2, 0x90D6}, //7525 #CJK UNIFIED IDEOGRAPH + {0xD3F3, 0x90E0}, //7526 #CJK UNIFIED IDEOGRAPH + {0xD3F4, 0x90D9}, //7527 #CJK UNIFIED IDEOGRAPH + {0xD3F5, 0x90DA}, //7528 #CJK UNIFIED IDEOGRAPH + {0xD3F6, 0x90E3}, //7529 #CJK UNIFIED IDEOGRAPH + {0xD3F7, 0x90DF}, //7530 #CJK UNIFIED IDEOGRAPH + {0xD3F8, 0x90E5}, //7531 #CJK UNIFIED IDEOGRAPH + {0xD3F9, 0x90D8}, //7532 #CJK UNIFIED IDEOGRAPH + {0xD3FA, 0x90DB}, //7533 #CJK UNIFIED IDEOGRAPH + {0xD3FB, 0x90D7}, //7534 #CJK UNIFIED IDEOGRAPH + {0xD3FC, 0x90DC}, //7535 #CJK UNIFIED IDEOGRAPH + {0xD3FD, 0x90E4}, //7536 #CJK UNIFIED IDEOGRAPH + {0xD3FE, 0x9150}, //7537 #CJK UNIFIED IDEOGRAPH + {0xD440, 0x914E}, //7538 #CJK UNIFIED IDEOGRAPH + {0xD441, 0x914F}, //7539 #CJK UNIFIED IDEOGRAPH + {0xD442, 0x91D5}, //7540 #CJK UNIFIED IDEOGRAPH + {0xD443, 0x91E2}, //7541 #CJK UNIFIED IDEOGRAPH + {0xD444, 0x91DA}, //7542 #CJK UNIFIED IDEOGRAPH + {0xD445, 0x965C}, //7543 #CJK UNIFIED IDEOGRAPH + {0xD446, 0x965F}, //7544 #CJK UNIFIED IDEOGRAPH + {0xD447, 0x96BC}, //7545 #CJK UNIFIED IDEOGRAPH + {0xD448, 0x98E3}, //7546 #CJK UNIFIED IDEOGRAPH + {0xD449, 0x9ADF}, //7547 #CJK UNIFIED IDEOGRAPH + {0xD44A, 0x9B2F}, //7548 #CJK UNIFIED IDEOGRAPH + {0xD44B, 0x4E7F}, //7549 #CJK UNIFIED IDEOGRAPH + {0xD44C, 0x5070}, //7550 #CJK UNIFIED IDEOGRAPH + {0xD44D, 0x506A}, //7551 #CJK UNIFIED IDEOGRAPH + {0xD44E, 0x5061}, //7552 #CJK UNIFIED IDEOGRAPH + {0xD44F, 0x505E}, //7553 #CJK UNIFIED IDEOGRAPH + {0xD450, 0x5060}, //7554 #CJK UNIFIED IDEOGRAPH + {0xD451, 0x5053}, //7555 #CJK UNIFIED IDEOGRAPH + {0xD452, 0x504B}, //7556 #CJK UNIFIED IDEOGRAPH + {0xD453, 0x505D}, //7557 #CJK UNIFIED IDEOGRAPH + {0xD454, 0x5072}, //7558 #CJK UNIFIED IDEOGRAPH + {0xD455, 0x5048}, //7559 #CJK UNIFIED IDEOGRAPH + {0xD456, 0x504D}, //7560 #CJK UNIFIED IDEOGRAPH + {0xD457, 0x5041}, //7561 #CJK UNIFIED IDEOGRAPH + {0xD458, 0x505B}, //7562 #CJK UNIFIED IDEOGRAPH + {0xD459, 0x504A}, //7563 #CJK UNIFIED IDEOGRAPH + {0xD45A, 0x5062}, //7564 #CJK UNIFIED IDEOGRAPH + {0xD45B, 0x5015}, //7565 #CJK UNIFIED IDEOGRAPH + {0xD45C, 0x5045}, //7566 #CJK UNIFIED IDEOGRAPH + {0xD45D, 0x505F}, //7567 #CJK UNIFIED IDEOGRAPH + {0xD45E, 0x5069}, //7568 #CJK UNIFIED IDEOGRAPH + {0xD45F, 0x506B}, //7569 #CJK UNIFIED IDEOGRAPH + {0xD460, 0x5063}, //7570 #CJK UNIFIED IDEOGRAPH + {0xD461, 0x5064}, //7571 #CJK UNIFIED IDEOGRAPH + {0xD462, 0x5046}, //7572 #CJK UNIFIED IDEOGRAPH + {0xD463, 0x5040}, //7573 #CJK UNIFIED IDEOGRAPH + {0xD464, 0x506E}, //7574 #CJK UNIFIED IDEOGRAPH + {0xD465, 0x5073}, //7575 #CJK UNIFIED IDEOGRAPH + {0xD466, 0x5057}, //7576 #CJK UNIFIED IDEOGRAPH + {0xD467, 0x5051}, //7577 #CJK UNIFIED IDEOGRAPH + {0xD468, 0x51D0}, //7578 #CJK UNIFIED IDEOGRAPH + {0xD469, 0x526B}, //7579 #CJK UNIFIED IDEOGRAPH + {0xD46A, 0x526D}, //7580 #CJK UNIFIED IDEOGRAPH + {0xD46B, 0x526C}, //7581 #CJK UNIFIED IDEOGRAPH + {0xD46C, 0x526E}, //7582 #CJK UNIFIED IDEOGRAPH + {0xD46D, 0x52D6}, //7583 #CJK UNIFIED IDEOGRAPH + {0xD46E, 0x52D3}, //7584 #CJK UNIFIED IDEOGRAPH + {0xD46F, 0x532D}, //7585 #CJK UNIFIED IDEOGRAPH + {0xD470, 0x539C}, //7586 #CJK UNIFIED IDEOGRAPH + {0xD471, 0x5575}, //7587 #CJK UNIFIED IDEOGRAPH + {0xD472, 0x5576}, //7588 #CJK UNIFIED IDEOGRAPH + {0xD473, 0x553C}, //7589 #CJK UNIFIED IDEOGRAPH + {0xD474, 0x554D}, //7590 #CJK UNIFIED IDEOGRAPH + {0xD475, 0x5550}, //7591 #CJK UNIFIED IDEOGRAPH + {0xD476, 0x5534}, //7592 #CJK UNIFIED IDEOGRAPH + {0xD477, 0x552A}, //7593 #CJK UNIFIED IDEOGRAPH + {0xD478, 0x5551}, //7594 #CJK UNIFIED IDEOGRAPH + {0xD479, 0x5562}, //7595 #CJK UNIFIED IDEOGRAPH + {0xD47A, 0x5536}, //7596 #CJK UNIFIED IDEOGRAPH + {0xD47B, 0x5535}, //7597 #CJK UNIFIED IDEOGRAPH + {0xD47C, 0x5530}, //7598 #CJK UNIFIED IDEOGRAPH + {0xD47D, 0x5552}, //7599 #CJK UNIFIED IDEOGRAPH + {0xD47E, 0x5545}, //7600 #CJK UNIFIED IDEOGRAPH + {0xD4A1, 0x550C}, //7601 #CJK UNIFIED IDEOGRAPH + {0xD4A2, 0x5532}, //7602 #CJK UNIFIED IDEOGRAPH + {0xD4A3, 0x5565}, //7603 #CJK UNIFIED IDEOGRAPH + {0xD4A4, 0x554E}, //7604 #CJK UNIFIED IDEOGRAPH + {0xD4A5, 0x5539}, //7605 #CJK UNIFIED IDEOGRAPH + {0xD4A6, 0x5548}, //7606 #CJK UNIFIED IDEOGRAPH + {0xD4A7, 0x552D}, //7607 #CJK UNIFIED IDEOGRAPH + {0xD4A8, 0x553B}, //7608 #CJK UNIFIED IDEOGRAPH + {0xD4A9, 0x5540}, //7609 #CJK UNIFIED IDEOGRAPH + {0xD4AA, 0x554B}, //7610 #CJK UNIFIED IDEOGRAPH + {0xD4AB, 0x570A}, //7611 #CJK UNIFIED IDEOGRAPH + {0xD4AC, 0x5707}, //7612 #CJK UNIFIED IDEOGRAPH + {0xD4AD, 0x57FB}, //7613 #CJK UNIFIED IDEOGRAPH + {0xD4AE, 0x5814}, //7614 #CJK UNIFIED IDEOGRAPH + {0xD4AF, 0x57E2}, //7615 #CJK UNIFIED IDEOGRAPH + {0xD4B0, 0x57F6}, //7616 #CJK UNIFIED IDEOGRAPH + {0xD4B1, 0x57DC}, //7617 #CJK UNIFIED IDEOGRAPH + {0xD4B2, 0x57F4}, //7618 #CJK UNIFIED IDEOGRAPH + {0xD4B3, 0x5800}, //7619 #CJK UNIFIED IDEOGRAPH + {0xD4B4, 0x57ED}, //7620 #CJK UNIFIED IDEOGRAPH + {0xD4B5, 0x57FD}, //7621 #CJK UNIFIED IDEOGRAPH + {0xD4B6, 0x5808}, //7622 #CJK UNIFIED IDEOGRAPH + {0xD4B7, 0x57F8}, //7623 #CJK UNIFIED IDEOGRAPH + {0xD4B8, 0x580B}, //7624 #CJK UNIFIED IDEOGRAPH + {0xD4B9, 0x57F3}, //7625 #CJK UNIFIED IDEOGRAPH + {0xD4BA, 0x57CF}, //7626 #CJK UNIFIED IDEOGRAPH + {0xD4BB, 0x5807}, //7627 #CJK UNIFIED IDEOGRAPH + {0xD4BC, 0x57EE}, //7628 #CJK UNIFIED IDEOGRAPH + {0xD4BD, 0x57E3}, //7629 #CJK UNIFIED IDEOGRAPH + {0xD4BE, 0x57F2}, //7630 #CJK UNIFIED IDEOGRAPH + {0xD4BF, 0x57E5}, //7631 #CJK UNIFIED IDEOGRAPH + {0xD4C0, 0x57EC}, //7632 #CJK UNIFIED IDEOGRAPH + {0xD4C1, 0x57E1}, //7633 #CJK UNIFIED IDEOGRAPH + {0xD4C2, 0x580E}, //7634 #CJK UNIFIED IDEOGRAPH + {0xD4C3, 0x57FC}, //7635 #CJK UNIFIED IDEOGRAPH + {0xD4C4, 0x5810}, //7636 #CJK UNIFIED IDEOGRAPH + {0xD4C5, 0x57E7}, //7637 #CJK UNIFIED IDEOGRAPH + {0xD4C6, 0x5801}, //7638 #CJK UNIFIED IDEOGRAPH + {0xD4C7, 0x580C}, //7639 #CJK UNIFIED IDEOGRAPH + {0xD4C8, 0x57F1}, //7640 #CJK UNIFIED IDEOGRAPH + {0xD4C9, 0x57E9}, //7641 #CJK UNIFIED IDEOGRAPH + {0xD4CA, 0x57F0}, //7642 #CJK UNIFIED IDEOGRAPH + {0xD4CB, 0x580D}, //7643 #CJK UNIFIED IDEOGRAPH + {0xD4CC, 0x5804}, //7644 #CJK UNIFIED IDEOGRAPH + {0xD4CD, 0x595C}, //7645 #CJK UNIFIED IDEOGRAPH + {0xD4CE, 0x5A60}, //7646 #CJK UNIFIED IDEOGRAPH + {0xD4CF, 0x5A58}, //7647 #CJK UNIFIED IDEOGRAPH + {0xD4D0, 0x5A55}, //7648 #CJK UNIFIED IDEOGRAPH + {0xD4D1, 0x5A67}, //7649 #CJK UNIFIED IDEOGRAPH + {0xD4D2, 0x5A5E}, //7650 #CJK UNIFIED IDEOGRAPH + {0xD4D3, 0x5A38}, //7651 #CJK UNIFIED IDEOGRAPH + {0xD4D4, 0x5A35}, //7652 #CJK UNIFIED IDEOGRAPH + {0xD4D5, 0x5A6D}, //7653 #CJK UNIFIED IDEOGRAPH + {0xD4D6, 0x5A50}, //7654 #CJK UNIFIED IDEOGRAPH + {0xD4D7, 0x5A5F}, //7655 #CJK UNIFIED IDEOGRAPH + {0xD4D8, 0x5A65}, //7656 #CJK UNIFIED IDEOGRAPH + {0xD4D9, 0x5A6C}, //7657 #CJK UNIFIED IDEOGRAPH + {0xD4DA, 0x5A53}, //7658 #CJK UNIFIED IDEOGRAPH + {0xD4DB, 0x5A64}, //7659 #CJK UNIFIED IDEOGRAPH + {0xD4DC, 0x5A57}, //7660 #CJK UNIFIED IDEOGRAPH + {0xD4DD, 0x5A43}, //7661 #CJK UNIFIED IDEOGRAPH + {0xD4DE, 0x5A5D}, //7662 #CJK UNIFIED IDEOGRAPH + {0xD4DF, 0x5A52}, //7663 #CJK UNIFIED IDEOGRAPH + {0xD4E0, 0x5A44}, //7664 #CJK UNIFIED IDEOGRAPH + {0xD4E1, 0x5A5B}, //7665 #CJK UNIFIED IDEOGRAPH + {0xD4E2, 0x5A48}, //7666 #CJK UNIFIED IDEOGRAPH + {0xD4E3, 0x5A8E}, //7667 #CJK UNIFIED IDEOGRAPH + {0xD4E4, 0x5A3E}, //7668 #CJK UNIFIED IDEOGRAPH + {0xD4E5, 0x5A4D}, //7669 #CJK UNIFIED IDEOGRAPH + {0xD4E6, 0x5A39}, //7670 #CJK UNIFIED IDEOGRAPH + {0xD4E7, 0x5A4C}, //7671 #CJK UNIFIED IDEOGRAPH + {0xD4E8, 0x5A70}, //7672 #CJK UNIFIED IDEOGRAPH + {0xD4E9, 0x5A69}, //7673 #CJK UNIFIED IDEOGRAPH + {0xD4EA, 0x5A47}, //7674 #CJK UNIFIED IDEOGRAPH + {0xD4EB, 0x5A51}, //7675 #CJK UNIFIED IDEOGRAPH + {0xD4EC, 0x5A56}, //7676 #CJK UNIFIED IDEOGRAPH + {0xD4ED, 0x5A42}, //7677 #CJK UNIFIED IDEOGRAPH + {0xD4EE, 0x5A5C}, //7678 #CJK UNIFIED IDEOGRAPH + {0xD4EF, 0x5B72}, //7679 #CJK UNIFIED IDEOGRAPH + {0xD4F0, 0x5B6E}, //7680 #CJK UNIFIED IDEOGRAPH + {0xD4F1, 0x5BC1}, //7681 #CJK UNIFIED IDEOGRAPH + {0xD4F2, 0x5BC0}, //7682 #CJK UNIFIED IDEOGRAPH + {0xD4F3, 0x5C59}, //7683 #CJK UNIFIED IDEOGRAPH + {0xD4F4, 0x5D1E}, //7684 #CJK UNIFIED IDEOGRAPH + {0xD4F5, 0x5D0B}, //7685 #CJK UNIFIED IDEOGRAPH + {0xD4F6, 0x5D1D}, //7686 #CJK UNIFIED IDEOGRAPH + {0xD4F7, 0x5D1A}, //7687 #CJK UNIFIED IDEOGRAPH + {0xD4F8, 0x5D20}, //7688 #CJK UNIFIED IDEOGRAPH + {0xD4F9, 0x5D0C}, //7689 #CJK UNIFIED IDEOGRAPH + {0xD4FA, 0x5D28}, //7690 #CJK UNIFIED IDEOGRAPH + {0xD4FB, 0x5D0D}, //7691 #CJK UNIFIED IDEOGRAPH + {0xD4FC, 0x5D26}, //7692 #CJK UNIFIED IDEOGRAPH + {0xD4FD, 0x5D25}, //7693 #CJK UNIFIED IDEOGRAPH + {0xD4FE, 0x5D0F}, //7694 #CJK UNIFIED IDEOGRAPH + {0xD540, 0x5D30}, //7695 #CJK UNIFIED IDEOGRAPH + {0xD541, 0x5D12}, //7696 #CJK UNIFIED IDEOGRAPH + {0xD542, 0x5D23}, //7697 #CJK UNIFIED IDEOGRAPH + {0xD543, 0x5D1F}, //7698 #CJK UNIFIED IDEOGRAPH + {0xD544, 0x5D2E}, //7699 #CJK UNIFIED IDEOGRAPH + {0xD545, 0x5E3E}, //7700 #CJK UNIFIED IDEOGRAPH + {0xD546, 0x5E34}, //7701 #CJK UNIFIED IDEOGRAPH + {0xD547, 0x5EB1}, //7702 #CJK UNIFIED IDEOGRAPH + {0xD548, 0x5EB4}, //7703 #CJK UNIFIED IDEOGRAPH + {0xD549, 0x5EB9}, //7704 #CJK UNIFIED IDEOGRAPH + {0xD54A, 0x5EB2}, //7705 #CJK UNIFIED IDEOGRAPH + {0xD54B, 0x5EB3}, //7706 #CJK UNIFIED IDEOGRAPH + {0xD54C, 0x5F36}, //7707 #CJK UNIFIED IDEOGRAPH + {0xD54D, 0x5F38}, //7708 #CJK UNIFIED IDEOGRAPH + {0xD54E, 0x5F9B}, //7709 #CJK UNIFIED IDEOGRAPH + {0xD54F, 0x5F96}, //7710 #CJK UNIFIED IDEOGRAPH + {0xD550, 0x5F9F}, //7711 #CJK UNIFIED IDEOGRAPH + {0xD551, 0x608A}, //7712 #CJK UNIFIED IDEOGRAPH + {0xD552, 0x6090}, //7713 #CJK UNIFIED IDEOGRAPH + {0xD553, 0x6086}, //7714 #CJK UNIFIED IDEOGRAPH + {0xD554, 0x60BE}, //7715 #CJK UNIFIED IDEOGRAPH + {0xD555, 0x60B0}, //7716 #CJK UNIFIED IDEOGRAPH + {0xD556, 0x60BA}, //7717 #CJK UNIFIED IDEOGRAPH + {0xD557, 0x60D3}, //7718 #CJK UNIFIED IDEOGRAPH + {0xD558, 0x60D4}, //7719 #CJK UNIFIED IDEOGRAPH + {0xD559, 0x60CF}, //7720 #CJK UNIFIED IDEOGRAPH + {0xD55A, 0x60E4}, //7721 #CJK UNIFIED IDEOGRAPH + {0xD55B, 0x60D9}, //7722 #CJK UNIFIED IDEOGRAPH + {0xD55C, 0x60DD}, //7723 #CJK UNIFIED IDEOGRAPH + {0xD55D, 0x60C8}, //7724 #CJK UNIFIED IDEOGRAPH + {0xD55E, 0x60B1}, //7725 #CJK UNIFIED IDEOGRAPH + {0xD55F, 0x60DB}, //7726 #CJK UNIFIED IDEOGRAPH + {0xD560, 0x60B7}, //7727 #CJK UNIFIED IDEOGRAPH + {0xD561, 0x60CA}, //7728 #CJK UNIFIED IDEOGRAPH + {0xD562, 0x60BF}, //7729 #CJK UNIFIED IDEOGRAPH + {0xD563, 0x60C3}, //7730 #CJK UNIFIED IDEOGRAPH + {0xD564, 0x60CD}, //7731 #CJK UNIFIED IDEOGRAPH + {0xD565, 0x60C0}, //7732 #CJK UNIFIED IDEOGRAPH + {0xD566, 0x6332}, //7733 #CJK UNIFIED IDEOGRAPH + {0xD567, 0x6365}, //7734 #CJK UNIFIED IDEOGRAPH + {0xD568, 0x638A}, //7735 #CJK UNIFIED IDEOGRAPH + {0xD569, 0x6382}, //7736 #CJK UNIFIED IDEOGRAPH + {0xD56A, 0x637D}, //7737 #CJK UNIFIED IDEOGRAPH + {0xD56B, 0x63BD}, //7738 #CJK UNIFIED IDEOGRAPH + {0xD56C, 0x639E}, //7739 #CJK UNIFIED IDEOGRAPH + {0xD56D, 0x63AD}, //7740 #CJK UNIFIED IDEOGRAPH + {0xD56E, 0x639D}, //7741 #CJK UNIFIED IDEOGRAPH + {0xD56F, 0x6397}, //7742 #CJK UNIFIED IDEOGRAPH + {0xD570, 0x63AB}, //7743 #CJK UNIFIED IDEOGRAPH + {0xD571, 0x638E}, //7744 #CJK UNIFIED IDEOGRAPH + {0xD572, 0x636F}, //7745 #CJK UNIFIED IDEOGRAPH + {0xD573, 0x6387}, //7746 #CJK UNIFIED IDEOGRAPH + {0xD574, 0x6390}, //7747 #CJK UNIFIED IDEOGRAPH + {0xD575, 0x636E}, //7748 #CJK UNIFIED IDEOGRAPH + {0xD576, 0x63AF}, //7749 #CJK UNIFIED IDEOGRAPH + {0xD577, 0x6375}, //7750 #CJK UNIFIED IDEOGRAPH + {0xD578, 0x639C}, //7751 #CJK UNIFIED IDEOGRAPH + {0xD579, 0x636D}, //7752 #CJK UNIFIED IDEOGRAPH + {0xD57A, 0x63AE}, //7753 #CJK UNIFIED IDEOGRAPH + {0xD57B, 0x637C}, //7754 #CJK UNIFIED IDEOGRAPH + {0xD57C, 0x63A4}, //7755 #CJK UNIFIED IDEOGRAPH + {0xD57D, 0x633B}, //7756 #CJK UNIFIED IDEOGRAPH + {0xD57E, 0x639F}, //7757 #CJK UNIFIED IDEOGRAPH + {0xD5A1, 0x6378}, //7758 #CJK UNIFIED IDEOGRAPH + {0xD5A2, 0x6385}, //7759 #CJK UNIFIED IDEOGRAPH + {0xD5A3, 0x6381}, //7760 #CJK UNIFIED IDEOGRAPH + {0xD5A4, 0x6391}, //7761 #CJK UNIFIED IDEOGRAPH + {0xD5A5, 0x638D}, //7762 #CJK UNIFIED IDEOGRAPH + {0xD5A6, 0x6370}, //7763 #CJK UNIFIED IDEOGRAPH + {0xD5A7, 0x6553}, //7764 #CJK UNIFIED IDEOGRAPH + {0xD5A8, 0x65CD}, //7765 #CJK UNIFIED IDEOGRAPH + {0xD5A9, 0x6665}, //7766 #CJK UNIFIED IDEOGRAPH + {0xD5AA, 0x6661}, //7767 #CJK UNIFIED IDEOGRAPH + {0xD5AB, 0x665B}, //7768 #CJK UNIFIED IDEOGRAPH + {0xD5AC, 0x6659}, //7769 #CJK UNIFIED IDEOGRAPH + {0xD5AD, 0x665C}, //7770 #CJK UNIFIED IDEOGRAPH + {0xD5AE, 0x6662}, //7771 #CJK UNIFIED IDEOGRAPH + {0xD5AF, 0x6718}, //7772 #CJK UNIFIED IDEOGRAPH + {0xD5B0, 0x6879}, //7773 #CJK UNIFIED IDEOGRAPH + {0xD5B1, 0x6887}, //7774 #CJK UNIFIED IDEOGRAPH + {0xD5B2, 0x6890}, //7775 #CJK UNIFIED IDEOGRAPH + {0xD5B3, 0x689C}, //7776 #CJK UNIFIED IDEOGRAPH + {0xD5B4, 0x686D}, //7777 #CJK UNIFIED IDEOGRAPH + {0xD5B5, 0x686E}, //7778 #CJK UNIFIED IDEOGRAPH + {0xD5B6, 0x68AE}, //7779 #CJK UNIFIED IDEOGRAPH + {0xD5B7, 0x68AB}, //7780 #CJK UNIFIED IDEOGRAPH + {0xD5B8, 0x6956}, //7781 #CJK UNIFIED IDEOGRAPH + {0xD5B9, 0x686F}, //7782 #CJK UNIFIED IDEOGRAPH + {0xD5BA, 0x68A3}, //7783 #CJK UNIFIED IDEOGRAPH + {0xD5BB, 0x68AC}, //7784 #CJK UNIFIED IDEOGRAPH + {0xD5BC, 0x68A9}, //7785 #CJK UNIFIED IDEOGRAPH + {0xD5BD, 0x6875}, //7786 #CJK UNIFIED IDEOGRAPH + {0xD5BE, 0x6874}, //7787 #CJK UNIFIED IDEOGRAPH + {0xD5BF, 0x68B2}, //7788 #CJK UNIFIED IDEOGRAPH + {0xD5C0, 0x688F}, //7789 #CJK UNIFIED IDEOGRAPH + {0xD5C1, 0x6877}, //7790 #CJK UNIFIED IDEOGRAPH + {0xD5C2, 0x6892}, //7791 #CJK UNIFIED IDEOGRAPH + {0xD5C3, 0x687C}, //7792 #CJK UNIFIED IDEOGRAPH + {0xD5C4, 0x686B}, //7793 #CJK UNIFIED IDEOGRAPH + {0xD5C5, 0x6872}, //7794 #CJK UNIFIED IDEOGRAPH + {0xD5C6, 0x68AA}, //7795 #CJK UNIFIED IDEOGRAPH + {0xD5C7, 0x6880}, //7796 #CJK UNIFIED IDEOGRAPH + {0xD5C8, 0x6871}, //7797 #CJK UNIFIED IDEOGRAPH + {0xD5C9, 0x687E}, //7798 #CJK UNIFIED IDEOGRAPH + {0xD5CA, 0x689B}, //7799 #CJK UNIFIED IDEOGRAPH + {0xD5CB, 0x6896}, //7800 #CJK UNIFIED IDEOGRAPH + {0xD5CC, 0x688B}, //7801 #CJK UNIFIED IDEOGRAPH + {0xD5CD, 0x68A0}, //7802 #CJK UNIFIED IDEOGRAPH + {0xD5CE, 0x6889}, //7803 #CJK UNIFIED IDEOGRAPH + {0xD5CF, 0x68A4}, //7804 #CJK UNIFIED IDEOGRAPH + {0xD5D0, 0x6878}, //7805 #CJK UNIFIED IDEOGRAPH + {0xD5D1, 0x687B}, //7806 #CJK UNIFIED IDEOGRAPH + {0xD5D2, 0x6891}, //7807 #CJK UNIFIED IDEOGRAPH + {0xD5D3, 0x688C}, //7808 #CJK UNIFIED IDEOGRAPH + {0xD5D4, 0x688A}, //7809 #CJK UNIFIED IDEOGRAPH + {0xD5D5, 0x687D}, //7810 #CJK UNIFIED IDEOGRAPH + {0xD5D6, 0x6B36}, //7811 #CJK UNIFIED IDEOGRAPH + {0xD5D7, 0x6B33}, //7812 #CJK UNIFIED IDEOGRAPH + {0xD5D8, 0x6B37}, //7813 #CJK UNIFIED IDEOGRAPH + {0xD5D9, 0x6B38}, //7814 #CJK UNIFIED IDEOGRAPH + {0xD5DA, 0x6B91}, //7815 #CJK UNIFIED IDEOGRAPH + {0xD5DB, 0x6B8F}, //7816 #CJK UNIFIED IDEOGRAPH + {0xD5DC, 0x6B8D}, //7817 #CJK UNIFIED IDEOGRAPH + {0xD5DD, 0x6B8E}, //7818 #CJK UNIFIED IDEOGRAPH + {0xD5DE, 0x6B8C}, //7819 #CJK UNIFIED IDEOGRAPH + {0xD5DF, 0x6C2A}, //7820 #CJK UNIFIED IDEOGRAPH + {0xD5E0, 0x6DC0}, //7821 #CJK UNIFIED IDEOGRAPH + {0xD5E1, 0x6DAB}, //7822 #CJK UNIFIED IDEOGRAPH + {0xD5E2, 0x6DB4}, //7823 #CJK UNIFIED IDEOGRAPH + {0xD5E3, 0x6DB3}, //7824 #CJK UNIFIED IDEOGRAPH + {0xD5E4, 0x6E74}, //7825 #CJK UNIFIED IDEOGRAPH + {0xD5E5, 0x6DAC}, //7826 #CJK UNIFIED IDEOGRAPH + {0xD5E6, 0x6DE9}, //7827 #CJK UNIFIED IDEOGRAPH + {0xD5E7, 0x6DE2}, //7828 #CJK UNIFIED IDEOGRAPH + {0xD5E8, 0x6DB7}, //7829 #CJK UNIFIED IDEOGRAPH + {0xD5E9, 0x6DF6}, //7830 #CJK UNIFIED IDEOGRAPH + {0xD5EA, 0x6DD4}, //7831 #CJK UNIFIED IDEOGRAPH + {0xD5EB, 0x6E00}, //7832 #CJK UNIFIED IDEOGRAPH + {0xD5EC, 0x6DC8}, //7833 #CJK UNIFIED IDEOGRAPH + {0xD5ED, 0x6DE0}, //7834 #CJK UNIFIED IDEOGRAPH + {0xD5EE, 0x6DDF}, //7835 #CJK UNIFIED IDEOGRAPH + {0xD5EF, 0x6DD6}, //7836 #CJK UNIFIED IDEOGRAPH + {0xD5F0, 0x6DBE}, //7837 #CJK UNIFIED IDEOGRAPH + {0xD5F1, 0x6DE5}, //7838 #CJK UNIFIED IDEOGRAPH + {0xD5F2, 0x6DDC}, //7839 #CJK UNIFIED IDEOGRAPH + {0xD5F3, 0x6DDD}, //7840 #CJK UNIFIED IDEOGRAPH + {0xD5F4, 0x6DDB}, //7841 #CJK UNIFIED IDEOGRAPH + {0xD5F5, 0x6DF4}, //7842 #CJK UNIFIED IDEOGRAPH + {0xD5F6, 0x6DCA}, //7843 #CJK UNIFIED IDEOGRAPH + {0xD5F7, 0x6DBD}, //7844 #CJK UNIFIED IDEOGRAPH + {0xD5F8, 0x6DED}, //7845 #CJK UNIFIED IDEOGRAPH + {0xD5F9, 0x6DF0}, //7846 #CJK UNIFIED IDEOGRAPH + {0xD5FA, 0x6DBA}, //7847 #CJK UNIFIED IDEOGRAPH + {0xD5FB, 0x6DD5}, //7848 #CJK UNIFIED IDEOGRAPH + {0xD5FC, 0x6DC2}, //7849 #CJK UNIFIED IDEOGRAPH + {0xD5FD, 0x6DCF}, //7850 #CJK UNIFIED IDEOGRAPH + {0xD5FE, 0x6DC9}, //7851 #CJK UNIFIED IDEOGRAPH + {0xD640, 0x6DD0}, //7852 #CJK UNIFIED IDEOGRAPH + {0xD641, 0x6DF2}, //7853 #CJK UNIFIED IDEOGRAPH + {0xD642, 0x6DD3}, //7854 #CJK UNIFIED IDEOGRAPH + {0xD643, 0x6DFD}, //7855 #CJK UNIFIED IDEOGRAPH + {0xD644, 0x6DD7}, //7856 #CJK UNIFIED IDEOGRAPH + {0xD645, 0x6DCD}, //7857 #CJK UNIFIED IDEOGRAPH + {0xD646, 0x6DE3}, //7858 #CJK UNIFIED IDEOGRAPH + {0xD647, 0x6DBB}, //7859 #CJK UNIFIED IDEOGRAPH + {0xD648, 0x70FA}, //7860 #CJK UNIFIED IDEOGRAPH + {0xD649, 0x710D}, //7861 #CJK UNIFIED IDEOGRAPH + {0xD64A, 0x70F7}, //7862 #CJK UNIFIED IDEOGRAPH + {0xD64B, 0x7117}, //7863 #CJK UNIFIED IDEOGRAPH + {0xD64C, 0x70F4}, //7864 #CJK UNIFIED IDEOGRAPH + {0xD64D, 0x710C}, //7865 #CJK UNIFIED IDEOGRAPH + {0xD64E, 0x70F0}, //7866 #CJK UNIFIED IDEOGRAPH + {0xD64F, 0x7104}, //7867 #CJK UNIFIED IDEOGRAPH + {0xD650, 0x70F3}, //7868 #CJK UNIFIED IDEOGRAPH + {0xD651, 0x7110}, //7869 #CJK UNIFIED IDEOGRAPH + {0xD652, 0x70FC}, //7870 #CJK UNIFIED IDEOGRAPH + {0xD653, 0x70FF}, //7871 #CJK UNIFIED IDEOGRAPH + {0xD654, 0x7106}, //7872 #CJK UNIFIED IDEOGRAPH + {0xD655, 0x7113}, //7873 #CJK UNIFIED IDEOGRAPH + {0xD656, 0x7100}, //7874 #CJK UNIFIED IDEOGRAPH + {0xD657, 0x70F8}, //7875 #CJK UNIFIED IDEOGRAPH + {0xD658, 0x70F6}, //7876 #CJK UNIFIED IDEOGRAPH + {0xD659, 0x710B}, //7877 #CJK UNIFIED IDEOGRAPH + {0xD65A, 0x7102}, //7878 #CJK UNIFIED IDEOGRAPH + {0xD65B, 0x710E}, //7879 #CJK UNIFIED IDEOGRAPH + {0xD65C, 0x727E}, //7880 #CJK UNIFIED IDEOGRAPH + {0xD65D, 0x727B}, //7881 #CJK UNIFIED IDEOGRAPH + {0xD65E, 0x727C}, //7882 #CJK UNIFIED IDEOGRAPH + {0xD65F, 0x727F}, //7883 #CJK UNIFIED IDEOGRAPH + {0xD660, 0x731D}, //7884 #CJK UNIFIED IDEOGRAPH + {0xD661, 0x7317}, //7885 #CJK UNIFIED IDEOGRAPH + {0xD662, 0x7307}, //7886 #CJK UNIFIED IDEOGRAPH + {0xD663, 0x7311}, //7887 #CJK UNIFIED IDEOGRAPH + {0xD664, 0x7318}, //7888 #CJK UNIFIED IDEOGRAPH + {0xD665, 0x730A}, //7889 #CJK UNIFIED IDEOGRAPH + {0xD666, 0x7308}, //7890 #CJK UNIFIED IDEOGRAPH + {0xD667, 0x72FF}, //7891 #CJK UNIFIED IDEOGRAPH + {0xD668, 0x730F}, //7892 #CJK UNIFIED IDEOGRAPH + {0xD669, 0x731E}, //7893 #CJK UNIFIED IDEOGRAPH + {0xD66A, 0x7388}, //7894 #CJK UNIFIED IDEOGRAPH + {0xD66B, 0x73F6}, //7895 #CJK UNIFIED IDEOGRAPH + {0xD66C, 0x73F8}, //7896 #CJK UNIFIED IDEOGRAPH + {0xD66D, 0x73F5}, //7897 #CJK UNIFIED IDEOGRAPH + {0xD66E, 0x7404}, //7898 #CJK UNIFIED IDEOGRAPH + {0xD66F, 0x7401}, //7899 #CJK UNIFIED IDEOGRAPH + {0xD670, 0x73FD}, //7900 #CJK UNIFIED IDEOGRAPH + {0xD671, 0x7407}, //7901 #CJK UNIFIED IDEOGRAPH + {0xD672, 0x7400}, //7902 #CJK UNIFIED IDEOGRAPH + {0xD673, 0x73FA}, //7903 #CJK UNIFIED IDEOGRAPH + {0xD674, 0x73FC}, //7904 #CJK UNIFIED IDEOGRAPH + {0xD675, 0x73FF}, //7905 #CJK UNIFIED IDEOGRAPH + {0xD676, 0x740C}, //7906 #CJK UNIFIED IDEOGRAPH + {0xD677, 0x740B}, //7907 #CJK UNIFIED IDEOGRAPH + {0xD678, 0x73F4}, //7908 #CJK UNIFIED IDEOGRAPH + {0xD679, 0x7408}, //7909 #CJK UNIFIED IDEOGRAPH + {0xD67A, 0x7564}, //7910 #CJK UNIFIED IDEOGRAPH + {0xD67B, 0x7563}, //7911 #CJK UNIFIED IDEOGRAPH + {0xD67C, 0x75CE}, //7912 #CJK UNIFIED IDEOGRAPH + {0xD67D, 0x75D2}, //7913 #CJK UNIFIED IDEOGRAPH + {0xD67E, 0x75CF}, //7914 #CJK UNIFIED IDEOGRAPH + {0xD6A1, 0x75CB}, //7915 #CJK UNIFIED IDEOGRAPH + {0xD6A2, 0x75CC}, //7916 #CJK UNIFIED IDEOGRAPH + {0xD6A3, 0x75D1}, //7917 #CJK UNIFIED IDEOGRAPH + {0xD6A4, 0x75D0}, //7918 #CJK UNIFIED IDEOGRAPH + {0xD6A5, 0x768F}, //7919 #CJK UNIFIED IDEOGRAPH + {0xD6A6, 0x7689}, //7920 #CJK UNIFIED IDEOGRAPH + {0xD6A7, 0x76D3}, //7921 #CJK UNIFIED IDEOGRAPH + {0xD6A8, 0x7739}, //7922 #CJK UNIFIED IDEOGRAPH + {0xD6A9, 0x772F}, //7923 #CJK UNIFIED IDEOGRAPH + {0xD6AA, 0x772D}, //7924 #CJK UNIFIED IDEOGRAPH + {0xD6AB, 0x7731}, //7925 #CJK UNIFIED IDEOGRAPH + {0xD6AC, 0x7732}, //7926 #CJK UNIFIED IDEOGRAPH + {0xD6AD, 0x7734}, //7927 #CJK UNIFIED IDEOGRAPH + {0xD6AE, 0x7733}, //7928 #CJK UNIFIED IDEOGRAPH + {0xD6AF, 0x773D}, //7929 #CJK UNIFIED IDEOGRAPH + {0xD6B0, 0x7725}, //7930 #CJK UNIFIED IDEOGRAPH + {0xD6B1, 0x773B}, //7931 #CJK UNIFIED IDEOGRAPH + {0xD6B2, 0x7735}, //7932 #CJK UNIFIED IDEOGRAPH + {0xD6B3, 0x7848}, //7933 #CJK UNIFIED IDEOGRAPH + {0xD6B4, 0x7852}, //7934 #CJK UNIFIED IDEOGRAPH + {0xD6B5, 0x7849}, //7935 #CJK UNIFIED IDEOGRAPH + {0xD6B6, 0x784D}, //7936 #CJK UNIFIED IDEOGRAPH + {0xD6B7, 0x784A}, //7937 #CJK UNIFIED IDEOGRAPH + {0xD6B8, 0x784C}, //7938 #CJK UNIFIED IDEOGRAPH + {0xD6B9, 0x7826}, //7939 #CJK UNIFIED IDEOGRAPH + {0xD6BA, 0x7845}, //7940 #CJK UNIFIED IDEOGRAPH + {0xD6BB, 0x7850}, //7941 #CJK UNIFIED IDEOGRAPH + {0xD6BC, 0x7964}, //7942 #CJK UNIFIED IDEOGRAPH + {0xD6BD, 0x7967}, //7943 #CJK UNIFIED IDEOGRAPH + {0xD6BE, 0x7969}, //7944 #CJK UNIFIED IDEOGRAPH + {0xD6BF, 0x796A}, //7945 #CJK UNIFIED IDEOGRAPH + {0xD6C0, 0x7963}, //7946 #CJK UNIFIED IDEOGRAPH + {0xD6C1, 0x796B}, //7947 #CJK UNIFIED IDEOGRAPH + {0xD6C2, 0x7961}, //7948 #CJK UNIFIED IDEOGRAPH + {0xD6C3, 0x79BB}, //7949 #CJK UNIFIED IDEOGRAPH + {0xD6C4, 0x79FA}, //7950 #CJK UNIFIED IDEOGRAPH + {0xD6C5, 0x79F8}, //7951 #CJK UNIFIED IDEOGRAPH + {0xD6C6, 0x79F6}, //7952 #CJK UNIFIED IDEOGRAPH + {0xD6C7, 0x79F7}, //7953 #CJK UNIFIED IDEOGRAPH + {0xD6C8, 0x7A8F}, //7954 #CJK UNIFIED IDEOGRAPH + {0xD6C9, 0x7A94}, //7955 #CJK UNIFIED IDEOGRAPH + {0xD6CA, 0x7A90}, //7956 #CJK UNIFIED IDEOGRAPH + {0xD6CB, 0x7B35}, //7957 #CJK UNIFIED IDEOGRAPH + {0xD6CC, 0x7B47}, //7958 #CJK UNIFIED IDEOGRAPH + {0xD6CD, 0x7B34}, //7959 #CJK UNIFIED IDEOGRAPH + {0xD6CE, 0x7B25}, //7960 #CJK UNIFIED IDEOGRAPH + {0xD6CF, 0x7B30}, //7961 #CJK UNIFIED IDEOGRAPH + {0xD6D0, 0x7B22}, //7962 #CJK UNIFIED IDEOGRAPH + {0xD6D1, 0x7B24}, //7963 #CJK UNIFIED IDEOGRAPH + {0xD6D2, 0x7B33}, //7964 #CJK UNIFIED IDEOGRAPH + {0xD6D3, 0x7B18}, //7965 #CJK UNIFIED IDEOGRAPH + {0xD6D4, 0x7B2A}, //7966 #CJK UNIFIED IDEOGRAPH + {0xD6D5, 0x7B1D}, //7967 #CJK UNIFIED IDEOGRAPH + {0xD6D6, 0x7B31}, //7968 #CJK UNIFIED IDEOGRAPH + {0xD6D7, 0x7B2B}, //7969 #CJK UNIFIED IDEOGRAPH + {0xD6D8, 0x7B2D}, //7970 #CJK UNIFIED IDEOGRAPH + {0xD6D9, 0x7B2F}, //7971 #CJK UNIFIED IDEOGRAPH + {0xD6DA, 0x7B32}, //7972 #CJK UNIFIED IDEOGRAPH + {0xD6DB, 0x7B38}, //7973 #CJK UNIFIED IDEOGRAPH + {0xD6DC, 0x7B1A}, //7974 #CJK UNIFIED IDEOGRAPH + {0xD6DD, 0x7B23}, //7975 #CJK UNIFIED IDEOGRAPH + {0xD6DE, 0x7C94}, //7976 #CJK UNIFIED IDEOGRAPH + {0xD6DF, 0x7C98}, //7977 #CJK UNIFIED IDEOGRAPH + {0xD6E0, 0x7C96}, //7978 #CJK UNIFIED IDEOGRAPH + {0xD6E1, 0x7CA3}, //7979 #CJK UNIFIED IDEOGRAPH + {0xD6E2, 0x7D35}, //7980 #CJK UNIFIED IDEOGRAPH + {0xD6E3, 0x7D3D}, //7981 #CJK UNIFIED IDEOGRAPH + {0xD6E4, 0x7D38}, //7982 #CJK UNIFIED IDEOGRAPH + {0xD6E5, 0x7D36}, //7983 #CJK UNIFIED IDEOGRAPH + {0xD6E6, 0x7D3A}, //7984 #CJK UNIFIED IDEOGRAPH + {0xD6E7, 0x7D45}, //7985 #CJK UNIFIED IDEOGRAPH + {0xD6E8, 0x7D2C}, //7986 #CJK UNIFIED IDEOGRAPH + {0xD6E9, 0x7D29}, //7987 #CJK UNIFIED IDEOGRAPH + {0xD6EA, 0x7D41}, //7988 #CJK UNIFIED IDEOGRAPH + {0xD6EB, 0x7D47}, //7989 #CJK UNIFIED IDEOGRAPH + {0xD6EC, 0x7D3E}, //7990 #CJK UNIFIED IDEOGRAPH + {0xD6ED, 0x7D3F}, //7991 #CJK UNIFIED IDEOGRAPH + {0xD6EE, 0x7D4A}, //7992 #CJK UNIFIED IDEOGRAPH + {0xD6EF, 0x7D3B}, //7993 #CJK UNIFIED IDEOGRAPH + {0xD6F0, 0x7D28}, //7994 #CJK UNIFIED IDEOGRAPH + {0xD6F1, 0x7F63}, //7995 #CJK UNIFIED IDEOGRAPH + {0xD6F2, 0x7F95}, //7996 #CJK UNIFIED IDEOGRAPH + {0xD6F3, 0x7F9C}, //7997 #CJK UNIFIED IDEOGRAPH + {0xD6F4, 0x7F9D}, //7998 #CJK UNIFIED IDEOGRAPH + {0xD6F5, 0x7F9B}, //7999 #CJK UNIFIED IDEOGRAPH + {0xD6F6, 0x7FCA}, //8000 #CJK UNIFIED IDEOGRAPH + {0xD6F7, 0x7FCB}, //8001 #CJK UNIFIED IDEOGRAPH + {0xD6F8, 0x7FCD}, //8002 #CJK UNIFIED IDEOGRAPH + {0xD6F9, 0x7FD0}, //8003 #CJK UNIFIED IDEOGRAPH + {0xD6FA, 0x7FD1}, //8004 #CJK UNIFIED IDEOGRAPH + {0xD6FB, 0x7FC7}, //8005 #CJK UNIFIED IDEOGRAPH + {0xD6FC, 0x7FCF}, //8006 #CJK UNIFIED IDEOGRAPH + {0xD6FD, 0x7FC9}, //8007 #CJK UNIFIED IDEOGRAPH + {0xD6FE, 0x801F}, //8008 #CJK UNIFIED IDEOGRAPH + {0xD740, 0x801E}, //8009 #CJK UNIFIED IDEOGRAPH + {0xD741, 0x801B}, //8010 #CJK UNIFIED IDEOGRAPH + {0xD742, 0x8047}, //8011 #CJK UNIFIED IDEOGRAPH + {0xD743, 0x8043}, //8012 #CJK UNIFIED IDEOGRAPH + {0xD744, 0x8048}, //8013 #CJK UNIFIED IDEOGRAPH + {0xD745, 0x8118}, //8014 #CJK UNIFIED IDEOGRAPH + {0xD746, 0x8125}, //8015 #CJK UNIFIED IDEOGRAPH + {0xD747, 0x8119}, //8016 #CJK UNIFIED IDEOGRAPH + {0xD748, 0x811B}, //8017 #CJK UNIFIED IDEOGRAPH + {0xD749, 0x812D}, //8018 #CJK UNIFIED IDEOGRAPH + {0xD74A, 0x811F}, //8019 #CJK UNIFIED IDEOGRAPH + {0xD74B, 0x812C}, //8020 #CJK UNIFIED IDEOGRAPH + {0xD74C, 0x811E}, //8021 #CJK UNIFIED IDEOGRAPH + {0xD74D, 0x8121}, //8022 #CJK UNIFIED IDEOGRAPH + {0xD74E, 0x8115}, //8023 #CJK UNIFIED IDEOGRAPH + {0xD74F, 0x8127}, //8024 #CJK UNIFIED IDEOGRAPH + {0xD750, 0x811D}, //8025 #CJK UNIFIED IDEOGRAPH + {0xD751, 0x8122}, //8026 #CJK UNIFIED IDEOGRAPH + {0xD752, 0x8211}, //8027 #CJK UNIFIED IDEOGRAPH + {0xD753, 0x8238}, //8028 #CJK UNIFIED IDEOGRAPH + {0xD754, 0x8233}, //8029 #CJK UNIFIED IDEOGRAPH + {0xD755, 0x823A}, //8030 #CJK UNIFIED IDEOGRAPH + {0xD756, 0x8234}, //8031 #CJK UNIFIED IDEOGRAPH + {0xD757, 0x8232}, //8032 #CJK UNIFIED IDEOGRAPH + {0xD758, 0x8274}, //8033 #CJK UNIFIED IDEOGRAPH + {0xD759, 0x8390}, //8034 #CJK UNIFIED IDEOGRAPH + {0xD75A, 0x83A3}, //8035 #CJK UNIFIED IDEOGRAPH + {0xD75B, 0x83A8}, //8036 #CJK UNIFIED IDEOGRAPH + {0xD75C, 0x838D}, //8037 #CJK UNIFIED IDEOGRAPH + {0xD75D, 0x837A}, //8038 #CJK UNIFIED IDEOGRAPH + {0xD75E, 0x8373}, //8039 #CJK UNIFIED IDEOGRAPH + {0xD75F, 0x83A4}, //8040 #CJK UNIFIED IDEOGRAPH + {0xD760, 0x8374}, //8041 #CJK UNIFIED IDEOGRAPH + {0xD761, 0x838F}, //8042 #CJK UNIFIED IDEOGRAPH + {0xD762, 0x8381}, //8043 #CJK UNIFIED IDEOGRAPH + {0xD763, 0x8395}, //8044 #CJK UNIFIED IDEOGRAPH + {0xD764, 0x8399}, //8045 #CJK UNIFIED IDEOGRAPH + {0xD765, 0x8375}, //8046 #CJK UNIFIED IDEOGRAPH + {0xD766, 0x8394}, //8047 #CJK UNIFIED IDEOGRAPH + {0xD767, 0x83A9}, //8048 #CJK UNIFIED IDEOGRAPH + {0xD768, 0x837D}, //8049 #CJK UNIFIED IDEOGRAPH + {0xD769, 0x8383}, //8050 #CJK UNIFIED IDEOGRAPH + {0xD76A, 0x838C}, //8051 #CJK UNIFIED IDEOGRAPH + {0xD76B, 0x839D}, //8052 #CJK UNIFIED IDEOGRAPH + {0xD76C, 0x839B}, //8053 #CJK UNIFIED IDEOGRAPH + {0xD76D, 0x83AA}, //8054 #CJK UNIFIED IDEOGRAPH + {0xD76E, 0x838B}, //8055 #CJK UNIFIED IDEOGRAPH + {0xD76F, 0x837E}, //8056 #CJK UNIFIED IDEOGRAPH + {0xD770, 0x83A5}, //8057 #CJK UNIFIED IDEOGRAPH + {0xD771, 0x83AF}, //8058 #CJK UNIFIED IDEOGRAPH + {0xD772, 0x8388}, //8059 #CJK UNIFIED IDEOGRAPH + {0xD773, 0x8397}, //8060 #CJK UNIFIED IDEOGRAPH + {0xD774, 0x83B0}, //8061 #CJK UNIFIED IDEOGRAPH + {0xD775, 0x837F}, //8062 #CJK UNIFIED IDEOGRAPH + {0xD776, 0x83A6}, //8063 #CJK UNIFIED IDEOGRAPH + {0xD777, 0x8387}, //8064 #CJK UNIFIED IDEOGRAPH + {0xD778, 0x83AE}, //8065 #CJK UNIFIED IDEOGRAPH + {0xD779, 0x8376}, //8066 #CJK UNIFIED IDEOGRAPH + {0xD77A, 0x839A}, //8067 #CJK UNIFIED IDEOGRAPH + {0xD77B, 0x8659}, //8068 #CJK UNIFIED IDEOGRAPH + {0xD77C, 0x8656}, //8069 #CJK UNIFIED IDEOGRAPH + {0xD77D, 0x86BF}, //8070 #CJK UNIFIED IDEOGRAPH + {0xD77E, 0x86B7}, //8071 #CJK UNIFIED IDEOGRAPH + {0xD7A1, 0x86C2}, //8072 #CJK UNIFIED IDEOGRAPH + {0xD7A2, 0x86C1}, //8073 #CJK UNIFIED IDEOGRAPH + {0xD7A3, 0x86C5}, //8074 #CJK UNIFIED IDEOGRAPH + {0xD7A4, 0x86BA}, //8075 #CJK UNIFIED IDEOGRAPH + {0xD7A5, 0x86B0}, //8076 #CJK UNIFIED IDEOGRAPH + {0xD7A6, 0x86C8}, //8077 #CJK UNIFIED IDEOGRAPH + {0xD7A7, 0x86B9}, //8078 #CJK UNIFIED IDEOGRAPH + {0xD7A8, 0x86B3}, //8079 #CJK UNIFIED IDEOGRAPH + {0xD7A9, 0x86B8}, //8080 #CJK UNIFIED IDEOGRAPH + {0xD7AA, 0x86CC}, //8081 #CJK UNIFIED IDEOGRAPH + {0xD7AB, 0x86B4}, //8082 #CJK UNIFIED IDEOGRAPH + {0xD7AC, 0x86BB}, //8083 #CJK UNIFIED IDEOGRAPH + {0xD7AD, 0x86BC}, //8084 #CJK UNIFIED IDEOGRAPH + {0xD7AE, 0x86C3}, //8085 #CJK UNIFIED IDEOGRAPH + {0xD7AF, 0x86BD}, //8086 #CJK UNIFIED IDEOGRAPH + {0xD7B0, 0x86BE}, //8087 #CJK UNIFIED IDEOGRAPH + {0xD7B1, 0x8852}, //8088 #CJK UNIFIED IDEOGRAPH + {0xD7B2, 0x8889}, //8089 #CJK UNIFIED IDEOGRAPH + {0xD7B3, 0x8895}, //8090 #CJK UNIFIED IDEOGRAPH + {0xD7B4, 0x88A8}, //8091 #CJK UNIFIED IDEOGRAPH + {0xD7B5, 0x88A2}, //8092 #CJK UNIFIED IDEOGRAPH + {0xD7B6, 0x88AA}, //8093 #CJK UNIFIED IDEOGRAPH + {0xD7B7, 0x889A}, //8094 #CJK UNIFIED IDEOGRAPH + {0xD7B8, 0x8891}, //8095 #CJK UNIFIED IDEOGRAPH + {0xD7B9, 0x88A1}, //8096 #CJK UNIFIED IDEOGRAPH + {0xD7BA, 0x889F}, //8097 #CJK UNIFIED IDEOGRAPH + {0xD7BB, 0x8898}, //8098 #CJK UNIFIED IDEOGRAPH + {0xD7BC, 0x88A7}, //8099 #CJK UNIFIED IDEOGRAPH + {0xD7BD, 0x8899}, //8100 #CJK UNIFIED IDEOGRAPH + {0xD7BE, 0x889B}, //8101 #CJK UNIFIED IDEOGRAPH + {0xD7BF, 0x8897}, //8102 #CJK UNIFIED IDEOGRAPH + {0xD7C0, 0x88A4}, //8103 #CJK UNIFIED IDEOGRAPH + {0xD7C1, 0x88AC}, //8104 #CJK UNIFIED IDEOGRAPH + {0xD7C2, 0x888C}, //8105 #CJK UNIFIED IDEOGRAPH + {0xD7C3, 0x8893}, //8106 #CJK UNIFIED IDEOGRAPH + {0xD7C4, 0x888E}, //8107 #CJK UNIFIED IDEOGRAPH + {0xD7C5, 0x8982}, //8108 #CJK UNIFIED IDEOGRAPH + {0xD7C6, 0x89D6}, //8109 #CJK UNIFIED IDEOGRAPH + {0xD7C7, 0x89D9}, //8110 #CJK UNIFIED IDEOGRAPH + {0xD7C8, 0x89D5}, //8111 #CJK UNIFIED IDEOGRAPH + {0xD7C9, 0x8A30}, //8112 #CJK UNIFIED IDEOGRAPH + {0xD7CA, 0x8A27}, //8113 #CJK UNIFIED IDEOGRAPH + {0xD7CB, 0x8A2C}, //8114 #CJK UNIFIED IDEOGRAPH + {0xD7CC, 0x8A1E}, //8115 #CJK UNIFIED IDEOGRAPH + {0xD7CD, 0x8C39}, //8116 #CJK UNIFIED IDEOGRAPH + {0xD7CE, 0x8C3B}, //8117 #CJK UNIFIED IDEOGRAPH + {0xD7CF, 0x8C5C}, //8118 #CJK UNIFIED IDEOGRAPH + {0xD7D0, 0x8C5D}, //8119 #CJK UNIFIED IDEOGRAPH + {0xD7D1, 0x8C7D}, //8120 #CJK UNIFIED IDEOGRAPH + {0xD7D2, 0x8CA5}, //8121 #CJK UNIFIED IDEOGRAPH + {0xD7D3, 0x8D7D}, //8122 #CJK UNIFIED IDEOGRAPH + {0xD7D4, 0x8D7B}, //8123 #CJK UNIFIED IDEOGRAPH + {0xD7D5, 0x8D79}, //8124 #CJK UNIFIED IDEOGRAPH + {0xD7D6, 0x8DBC}, //8125 #CJK UNIFIED IDEOGRAPH + {0xD7D7, 0x8DC2}, //8126 #CJK UNIFIED IDEOGRAPH + {0xD7D8, 0x8DB9}, //8127 #CJK UNIFIED IDEOGRAPH + {0xD7D9, 0x8DBF}, //8128 #CJK UNIFIED IDEOGRAPH + {0xD7DA, 0x8DC1}, //8129 #CJK UNIFIED IDEOGRAPH + {0xD7DB, 0x8ED8}, //8130 #CJK UNIFIED IDEOGRAPH + {0xD7DC, 0x8EDE}, //8131 #CJK UNIFIED IDEOGRAPH + {0xD7DD, 0x8EDD}, //8132 #CJK UNIFIED IDEOGRAPH + {0xD7DE, 0x8EDC}, //8133 #CJK UNIFIED IDEOGRAPH + {0xD7DF, 0x8ED7}, //8134 #CJK UNIFIED IDEOGRAPH + {0xD7E0, 0x8EE0}, //8135 #CJK UNIFIED IDEOGRAPH + {0xD7E1, 0x8EE1}, //8136 #CJK UNIFIED IDEOGRAPH + {0xD7E2, 0x9024}, //8137 #CJK UNIFIED IDEOGRAPH + {0xD7E3, 0x900B}, //8138 #CJK UNIFIED IDEOGRAPH + {0xD7E4, 0x9011}, //8139 #CJK UNIFIED IDEOGRAPH + {0xD7E5, 0x901C}, //8140 #CJK UNIFIED IDEOGRAPH + {0xD7E6, 0x900C}, //8141 #CJK UNIFIED IDEOGRAPH + {0xD7E7, 0x9021}, //8142 #CJK UNIFIED IDEOGRAPH + {0xD7E8, 0x90EF}, //8143 #CJK UNIFIED IDEOGRAPH + {0xD7E9, 0x90EA}, //8144 #CJK UNIFIED IDEOGRAPH + {0xD7EA, 0x90F0}, //8145 #CJK UNIFIED IDEOGRAPH + {0xD7EB, 0x90F4}, //8146 #CJK UNIFIED IDEOGRAPH + {0xD7EC, 0x90F2}, //8147 #CJK UNIFIED IDEOGRAPH + {0xD7ED, 0x90F3}, //8148 #CJK UNIFIED IDEOGRAPH + {0xD7EE, 0x90D4}, //8149 #CJK UNIFIED IDEOGRAPH + {0xD7EF, 0x90EB}, //8150 #CJK UNIFIED IDEOGRAPH + {0xD7F0, 0x90EC}, //8151 #CJK UNIFIED IDEOGRAPH + {0xD7F1, 0x90E9}, //8152 #CJK UNIFIED IDEOGRAPH + {0xD7F2, 0x9156}, //8153 #CJK UNIFIED IDEOGRAPH + {0xD7F3, 0x9158}, //8154 #CJK UNIFIED IDEOGRAPH + {0xD7F4, 0x915A}, //8155 #CJK UNIFIED IDEOGRAPH + {0xD7F5, 0x9153}, //8156 #CJK UNIFIED IDEOGRAPH + {0xD7F6, 0x9155}, //8157 #CJK UNIFIED IDEOGRAPH + {0xD7F7, 0x91EC}, //8158 #CJK UNIFIED IDEOGRAPH + {0xD7F8, 0x91F4}, //8159 #CJK UNIFIED IDEOGRAPH + {0xD7F9, 0x91F1}, //8160 #CJK UNIFIED IDEOGRAPH + {0xD7FA, 0x91F3}, //8161 #CJK UNIFIED IDEOGRAPH + {0xD7FB, 0x91F8}, //8162 #CJK UNIFIED IDEOGRAPH + {0xD7FC, 0x91E4}, //8163 #CJK UNIFIED IDEOGRAPH + {0xD7FD, 0x91F9}, //8164 #CJK UNIFIED IDEOGRAPH + {0xD7FE, 0x91EA}, //8165 #CJK UNIFIED IDEOGRAPH + {0xD840, 0x91EB}, //8166 #CJK UNIFIED IDEOGRAPH + {0xD841, 0x91F7}, //8167 #CJK UNIFIED IDEOGRAPH + {0xD842, 0x91E8}, //8168 #CJK UNIFIED IDEOGRAPH + {0xD843, 0x91EE}, //8169 #CJK UNIFIED IDEOGRAPH + {0xD844, 0x957A}, //8170 #CJK UNIFIED IDEOGRAPH + {0xD845, 0x9586}, //8171 #CJK UNIFIED IDEOGRAPH + {0xD846, 0x9588}, //8172 #CJK UNIFIED IDEOGRAPH + {0xD847, 0x967C}, //8173 #CJK UNIFIED IDEOGRAPH + {0xD848, 0x966D}, //8174 #CJK UNIFIED IDEOGRAPH + {0xD849, 0x966B}, //8175 #CJK UNIFIED IDEOGRAPH + {0xD84A, 0x9671}, //8176 #CJK UNIFIED IDEOGRAPH + {0xD84B, 0x966F}, //8177 #CJK UNIFIED IDEOGRAPH + {0xD84C, 0x96BF}, //8178 #CJK UNIFIED IDEOGRAPH + {0xD84D, 0x976A}, //8179 #CJK UNIFIED IDEOGRAPH + {0xD84E, 0x9804}, //8180 #CJK UNIFIED IDEOGRAPH + {0xD84F, 0x98E5}, //8181 #CJK UNIFIED IDEOGRAPH + {0xD850, 0x9997}, //8182 #CJK UNIFIED IDEOGRAPH + {0xD851, 0x509B}, //8183 #CJK UNIFIED IDEOGRAPH + {0xD852, 0x5095}, //8184 #CJK UNIFIED IDEOGRAPH + {0xD853, 0x5094}, //8185 #CJK UNIFIED IDEOGRAPH + {0xD854, 0x509E}, //8186 #CJK UNIFIED IDEOGRAPH + {0xD855, 0x508B}, //8187 #CJK UNIFIED IDEOGRAPH + {0xD856, 0x50A3}, //8188 #CJK UNIFIED IDEOGRAPH + {0xD857, 0x5083}, //8189 #CJK UNIFIED IDEOGRAPH + {0xD858, 0x508C}, //8190 #CJK UNIFIED IDEOGRAPH + {0xD859, 0x508E}, //8191 #CJK UNIFIED IDEOGRAPH + {0xD85A, 0x509D}, //8192 #CJK UNIFIED IDEOGRAPH + {0xD85B, 0x5068}, //8193 #CJK UNIFIED IDEOGRAPH + {0xD85C, 0x509C}, //8194 #CJK UNIFIED IDEOGRAPH + {0xD85D, 0x5092}, //8195 #CJK UNIFIED IDEOGRAPH + {0xD85E, 0x5082}, //8196 #CJK UNIFIED IDEOGRAPH + {0xD85F, 0x5087}, //8197 #CJK UNIFIED IDEOGRAPH + {0xD860, 0x515F}, //8198 #CJK UNIFIED IDEOGRAPH + {0xD861, 0x51D4}, //8199 #CJK UNIFIED IDEOGRAPH + {0xD862, 0x5312}, //8200 #CJK UNIFIED IDEOGRAPH + {0xD863, 0x5311}, //8201 #CJK UNIFIED IDEOGRAPH + {0xD864, 0x53A4}, //8202 #CJK UNIFIED IDEOGRAPH + {0xD865, 0x53A7}, //8203 #CJK UNIFIED IDEOGRAPH + {0xD866, 0x5591}, //8204 #CJK UNIFIED IDEOGRAPH + {0xD867, 0x55A8}, //8205 #CJK UNIFIED IDEOGRAPH + {0xD868, 0x55A5}, //8206 #CJK UNIFIED IDEOGRAPH + {0xD869, 0x55AD}, //8207 #CJK UNIFIED IDEOGRAPH + {0xD86A, 0x5577}, //8208 #CJK UNIFIED IDEOGRAPH + {0xD86B, 0x5645}, //8209 #CJK UNIFIED IDEOGRAPH + {0xD86C, 0x55A2}, //8210 #CJK UNIFIED IDEOGRAPH + {0xD86D, 0x5593}, //8211 #CJK UNIFIED IDEOGRAPH + {0xD86E, 0x5588}, //8212 #CJK UNIFIED IDEOGRAPH + {0xD86F, 0x558F}, //8213 #CJK UNIFIED IDEOGRAPH + {0xD870, 0x55B5}, //8214 #CJK UNIFIED IDEOGRAPH + {0xD871, 0x5581}, //8215 #CJK UNIFIED IDEOGRAPH + {0xD872, 0x55A3}, //8216 #CJK UNIFIED IDEOGRAPH + {0xD873, 0x5592}, //8217 #CJK UNIFIED IDEOGRAPH + {0xD874, 0x55A4}, //8218 #CJK UNIFIED IDEOGRAPH + {0xD875, 0x557D}, //8219 #CJK UNIFIED IDEOGRAPH + {0xD876, 0x558C}, //8220 #CJK UNIFIED IDEOGRAPH + {0xD877, 0x55A6}, //8221 #CJK UNIFIED IDEOGRAPH + {0xD878, 0x557F}, //8222 #CJK UNIFIED IDEOGRAPH + {0xD879, 0x5595}, //8223 #CJK UNIFIED IDEOGRAPH + {0xD87A, 0x55A1}, //8224 #CJK UNIFIED IDEOGRAPH + {0xD87B, 0x558E}, //8225 #CJK UNIFIED IDEOGRAPH + {0xD87C, 0x570C}, //8226 #CJK UNIFIED IDEOGRAPH + {0xD87D, 0x5829}, //8227 #CJK UNIFIED IDEOGRAPH + {0xD87E, 0x5837}, //8228 #CJK UNIFIED IDEOGRAPH + {0xD8A1, 0x5819}, //8229 #CJK UNIFIED IDEOGRAPH + {0xD8A2, 0x581E}, //8230 #CJK UNIFIED IDEOGRAPH + {0xD8A3, 0x5827}, //8231 #CJK UNIFIED IDEOGRAPH + {0xD8A4, 0x5823}, //8232 #CJK UNIFIED IDEOGRAPH + {0xD8A5, 0x5828}, //8233 #CJK UNIFIED IDEOGRAPH + {0xD8A6, 0x57F5}, //8234 #CJK UNIFIED IDEOGRAPH + {0xD8A7, 0x5848}, //8235 #CJK UNIFIED IDEOGRAPH + {0xD8A8, 0x5825}, //8236 #CJK UNIFIED IDEOGRAPH + {0xD8A9, 0x581C}, //8237 #CJK UNIFIED IDEOGRAPH + {0xD8AA, 0x581B}, //8238 #CJK UNIFIED IDEOGRAPH + {0xD8AB, 0x5833}, //8239 #CJK UNIFIED IDEOGRAPH + {0xD8AC, 0x583F}, //8240 #CJK UNIFIED IDEOGRAPH + {0xD8AD, 0x5836}, //8241 #CJK UNIFIED IDEOGRAPH + {0xD8AE, 0x582E}, //8242 #CJK UNIFIED IDEOGRAPH + {0xD8AF, 0x5839}, //8243 #CJK UNIFIED IDEOGRAPH + {0xD8B0, 0x5838}, //8244 #CJK UNIFIED IDEOGRAPH + {0xD8B1, 0x582D}, //8245 #CJK UNIFIED IDEOGRAPH + {0xD8B2, 0x582C}, //8246 #CJK UNIFIED IDEOGRAPH + {0xD8B3, 0x583B}, //8247 #CJK UNIFIED IDEOGRAPH + {0xD8B4, 0x5961}, //8248 #CJK UNIFIED IDEOGRAPH + {0xD8B5, 0x5AAF}, //8249 #CJK UNIFIED IDEOGRAPH + {0xD8B6, 0x5A94}, //8250 #CJK UNIFIED IDEOGRAPH + {0xD8B7, 0x5A9F}, //8251 #CJK UNIFIED IDEOGRAPH + {0xD8B8, 0x5A7A}, //8252 #CJK UNIFIED IDEOGRAPH + {0xD8B9, 0x5AA2}, //8253 #CJK UNIFIED IDEOGRAPH + {0xD8BA, 0x5A9E}, //8254 #CJK UNIFIED IDEOGRAPH + {0xD8BB, 0x5A78}, //8255 #CJK UNIFIED IDEOGRAPH + {0xD8BC, 0x5AA6}, //8256 #CJK UNIFIED IDEOGRAPH + {0xD8BD, 0x5A7C}, //8257 #CJK UNIFIED IDEOGRAPH + {0xD8BE, 0x5AA5}, //8258 #CJK UNIFIED IDEOGRAPH + {0xD8BF, 0x5AAC}, //8259 #CJK UNIFIED IDEOGRAPH + {0xD8C0, 0x5A95}, //8260 #CJK UNIFIED IDEOGRAPH + {0xD8C1, 0x5AAE}, //8261 #CJK UNIFIED IDEOGRAPH + {0xD8C2, 0x5A37}, //8262 #CJK UNIFIED IDEOGRAPH + {0xD8C3, 0x5A84}, //8263 #CJK UNIFIED IDEOGRAPH + {0xD8C4, 0x5A8A}, //8264 #CJK UNIFIED IDEOGRAPH + {0xD8C5, 0x5A97}, //8265 #CJK UNIFIED IDEOGRAPH + {0xD8C6, 0x5A83}, //8266 #CJK UNIFIED IDEOGRAPH + {0xD8C7, 0x5A8B}, //8267 #CJK UNIFIED IDEOGRAPH + {0xD8C8, 0x5AA9}, //8268 #CJK UNIFIED IDEOGRAPH + {0xD8C9, 0x5A7B}, //8269 #CJK UNIFIED IDEOGRAPH + {0xD8CA, 0x5A7D}, //8270 #CJK UNIFIED IDEOGRAPH + {0xD8CB, 0x5A8C}, //8271 #CJK UNIFIED IDEOGRAPH + {0xD8CC, 0x5A9C}, //8272 #CJK UNIFIED IDEOGRAPH + {0xD8CD, 0x5A8F}, //8273 #CJK UNIFIED IDEOGRAPH + {0xD8CE, 0x5A93}, //8274 #CJK UNIFIED IDEOGRAPH + {0xD8CF, 0x5A9D}, //8275 #CJK UNIFIED IDEOGRAPH + {0xD8D0, 0x5BEA}, //8276 #CJK UNIFIED IDEOGRAPH + {0xD8D1, 0x5BCD}, //8277 #CJK UNIFIED IDEOGRAPH + {0xD8D2, 0x5BCB}, //8278 #CJK UNIFIED IDEOGRAPH + {0xD8D3, 0x5BD4}, //8279 #CJK UNIFIED IDEOGRAPH + {0xD8D4, 0x5BD1}, //8280 #CJK UNIFIED IDEOGRAPH + {0xD8D5, 0x5BCA}, //8281 #CJK UNIFIED IDEOGRAPH + {0xD8D6, 0x5BCE}, //8282 #CJK UNIFIED IDEOGRAPH + {0xD8D7, 0x5C0C}, //8283 #CJK UNIFIED IDEOGRAPH + {0xD8D8, 0x5C30}, //8284 #CJK UNIFIED IDEOGRAPH + {0xD8D9, 0x5D37}, //8285 #CJK UNIFIED IDEOGRAPH + {0xD8DA, 0x5D43}, //8286 #CJK UNIFIED IDEOGRAPH + {0xD8DB, 0x5D6B}, //8287 #CJK UNIFIED IDEOGRAPH + {0xD8DC, 0x5D41}, //8288 #CJK UNIFIED IDEOGRAPH + {0xD8DD, 0x5D4B}, //8289 #CJK UNIFIED IDEOGRAPH + {0xD8DE, 0x5D3F}, //8290 #CJK UNIFIED IDEOGRAPH + {0xD8DF, 0x5D35}, //8291 #CJK UNIFIED IDEOGRAPH + {0xD8E0, 0x5D51}, //8292 #CJK UNIFIED IDEOGRAPH + {0xD8E1, 0x5D4E}, //8293 #CJK UNIFIED IDEOGRAPH + {0xD8E2, 0x5D55}, //8294 #CJK UNIFIED IDEOGRAPH + {0xD8E3, 0x5D33}, //8295 #CJK UNIFIED IDEOGRAPH + {0xD8E4, 0x5D3A}, //8296 #CJK UNIFIED IDEOGRAPH + {0xD8E5, 0x5D52}, //8297 #CJK UNIFIED IDEOGRAPH + {0xD8E6, 0x5D3D}, //8298 #CJK UNIFIED IDEOGRAPH + {0xD8E7, 0x5D31}, //8299 #CJK UNIFIED IDEOGRAPH + {0xD8E8, 0x5D59}, //8300 #CJK UNIFIED IDEOGRAPH + {0xD8E9, 0x5D42}, //8301 #CJK UNIFIED IDEOGRAPH + {0xD8EA, 0x5D39}, //8302 #CJK UNIFIED IDEOGRAPH + {0xD8EB, 0x5D49}, //8303 #CJK UNIFIED IDEOGRAPH + {0xD8EC, 0x5D38}, //8304 #CJK UNIFIED IDEOGRAPH + {0xD8ED, 0x5D3C}, //8305 #CJK UNIFIED IDEOGRAPH + {0xD8EE, 0x5D32}, //8306 #CJK UNIFIED IDEOGRAPH + {0xD8EF, 0x5D36}, //8307 #CJK UNIFIED IDEOGRAPH + {0xD8F0, 0x5D40}, //8308 #CJK UNIFIED IDEOGRAPH + {0xD8F1, 0x5D45}, //8309 #CJK UNIFIED IDEOGRAPH + {0xD8F2, 0x5E44}, //8310 #CJK UNIFIED IDEOGRAPH + {0xD8F3, 0x5E41}, //8311 #CJK UNIFIED IDEOGRAPH + {0xD8F4, 0x5F58}, //8312 #CJK UNIFIED IDEOGRAPH + {0xD8F5, 0x5FA6}, //8313 #CJK UNIFIED IDEOGRAPH + {0xD8F6, 0x5FA5}, //8314 #CJK UNIFIED IDEOGRAPH + {0xD8F7, 0x5FAB}, //8315 #CJK UNIFIED IDEOGRAPH + {0xD8F8, 0x60C9}, //8316 #CJK UNIFIED IDEOGRAPH + {0xD8F9, 0x60B9}, //8317 #CJK UNIFIED IDEOGRAPH + {0xD8FA, 0x60CC}, //8318 #CJK UNIFIED IDEOGRAPH + {0xD8FB, 0x60E2}, //8319 #CJK UNIFIED IDEOGRAPH + {0xD8FC, 0x60CE}, //8320 #CJK UNIFIED IDEOGRAPH + {0xD8FD, 0x60C4}, //8321 #CJK UNIFIED IDEOGRAPH + {0xD8FE, 0x6114}, //8322 #CJK UNIFIED IDEOGRAPH + {0xD940, 0x60F2}, //8323 #CJK UNIFIED IDEOGRAPH + {0xD941, 0x610A}, //8324 #CJK UNIFIED IDEOGRAPH + {0xD942, 0x6116}, //8325 #CJK UNIFIED IDEOGRAPH + {0xD943, 0x6105}, //8326 #CJK UNIFIED IDEOGRAPH + {0xD944, 0x60F5}, //8327 #CJK UNIFIED IDEOGRAPH + {0xD945, 0x6113}, //8328 #CJK UNIFIED IDEOGRAPH + {0xD946, 0x60F8}, //8329 #CJK UNIFIED IDEOGRAPH + {0xD947, 0x60FC}, //8330 #CJK UNIFIED IDEOGRAPH + {0xD948, 0x60FE}, //8331 #CJK UNIFIED IDEOGRAPH + {0xD949, 0x60C1}, //8332 #CJK UNIFIED IDEOGRAPH + {0xD94A, 0x6103}, //8333 #CJK UNIFIED IDEOGRAPH + {0xD94B, 0x6118}, //8334 #CJK UNIFIED IDEOGRAPH + {0xD94C, 0x611D}, //8335 #CJK UNIFIED IDEOGRAPH + {0xD94D, 0x6110}, //8336 #CJK UNIFIED IDEOGRAPH + {0xD94E, 0x60FF}, //8337 #CJK UNIFIED IDEOGRAPH + {0xD94F, 0x6104}, //8338 #CJK UNIFIED IDEOGRAPH + {0xD950, 0x610B}, //8339 #CJK UNIFIED IDEOGRAPH + {0xD951, 0x624A}, //8340 #CJK UNIFIED IDEOGRAPH + {0xD952, 0x6394}, //8341 #CJK UNIFIED IDEOGRAPH + {0xD953, 0x63B1}, //8342 #CJK UNIFIED IDEOGRAPH + {0xD954, 0x63B0}, //8343 #CJK UNIFIED IDEOGRAPH + {0xD955, 0x63CE}, //8344 #CJK UNIFIED IDEOGRAPH + {0xD956, 0x63E5}, //8345 #CJK UNIFIED IDEOGRAPH + {0xD957, 0x63E8}, //8346 #CJK UNIFIED IDEOGRAPH + {0xD958, 0x63EF}, //8347 #CJK UNIFIED IDEOGRAPH + {0xD959, 0x63C3}, //8348 #CJK UNIFIED IDEOGRAPH + {0xD95A, 0x649D}, //8349 #CJK UNIFIED IDEOGRAPH + {0xD95B, 0x63F3}, //8350 #CJK UNIFIED IDEOGRAPH + {0xD95C, 0x63CA}, //8351 #CJK UNIFIED IDEOGRAPH + {0xD95D, 0x63E0}, //8352 #CJK UNIFIED IDEOGRAPH + {0xD95E, 0x63F6}, //8353 #CJK UNIFIED IDEOGRAPH + {0xD95F, 0x63D5}, //8354 #CJK UNIFIED IDEOGRAPH + {0xD960, 0x63F2}, //8355 #CJK UNIFIED IDEOGRAPH + {0xD961, 0x63F5}, //8356 #CJK UNIFIED IDEOGRAPH + {0xD962, 0x6461}, //8357 #CJK UNIFIED IDEOGRAPH + {0xD963, 0x63DF}, //8358 #CJK UNIFIED IDEOGRAPH + {0xD964, 0x63BE}, //8359 #CJK UNIFIED IDEOGRAPH + {0xD965, 0x63DD}, //8360 #CJK UNIFIED IDEOGRAPH + {0xD966, 0x63DC}, //8361 #CJK UNIFIED IDEOGRAPH + {0xD967, 0x63C4}, //8362 #CJK UNIFIED IDEOGRAPH + {0xD968, 0x63D8}, //8363 #CJK UNIFIED IDEOGRAPH + {0xD969, 0x63D3}, //8364 #CJK UNIFIED IDEOGRAPH + {0xD96A, 0x63C2}, //8365 #CJK UNIFIED IDEOGRAPH + {0xD96B, 0x63C7}, //8366 #CJK UNIFIED IDEOGRAPH + {0xD96C, 0x63CC}, //8367 #CJK UNIFIED IDEOGRAPH + {0xD96D, 0x63CB}, //8368 #CJK UNIFIED IDEOGRAPH + {0xD96E, 0x63C8}, //8369 #CJK UNIFIED IDEOGRAPH + {0xD96F, 0x63F0}, //8370 #CJK UNIFIED IDEOGRAPH + {0xD970, 0x63D7}, //8371 #CJK UNIFIED IDEOGRAPH + {0xD971, 0x63D9}, //8372 #CJK UNIFIED IDEOGRAPH + {0xD972, 0x6532}, //8373 #CJK UNIFIED IDEOGRAPH + {0xD973, 0x6567}, //8374 #CJK UNIFIED IDEOGRAPH + {0xD974, 0x656A}, //8375 #CJK UNIFIED IDEOGRAPH + {0xD975, 0x6564}, //8376 #CJK UNIFIED IDEOGRAPH + {0xD976, 0x655C}, //8377 #CJK UNIFIED IDEOGRAPH + {0xD977, 0x6568}, //8378 #CJK UNIFIED IDEOGRAPH + {0xD978, 0x6565}, //8379 #CJK UNIFIED IDEOGRAPH + {0xD979, 0x658C}, //8380 #CJK UNIFIED IDEOGRAPH + {0xD97A, 0x659D}, //8381 #CJK UNIFIED IDEOGRAPH + {0xD97B, 0x659E}, //8382 #CJK UNIFIED IDEOGRAPH + {0xD97C, 0x65AE}, //8383 #CJK UNIFIED IDEOGRAPH + {0xD97D, 0x65D0}, //8384 #CJK UNIFIED IDEOGRAPH + {0xD97E, 0x65D2}, //8385 #CJK UNIFIED IDEOGRAPH + {0xD9A1, 0x667C}, //8386 #CJK UNIFIED IDEOGRAPH + {0xD9A2, 0x666C}, //8387 #CJK UNIFIED IDEOGRAPH + {0xD9A3, 0x667B}, //8388 #CJK UNIFIED IDEOGRAPH + {0xD9A4, 0x6680}, //8389 #CJK UNIFIED IDEOGRAPH + {0xD9A5, 0x6671}, //8390 #CJK UNIFIED IDEOGRAPH + {0xD9A6, 0x6679}, //8391 #CJK UNIFIED IDEOGRAPH + {0xD9A7, 0x666A}, //8392 #CJK UNIFIED IDEOGRAPH + {0xD9A8, 0x6672}, //8393 #CJK UNIFIED IDEOGRAPH + {0xD9A9, 0x6701}, //8394 #CJK UNIFIED IDEOGRAPH + {0xD9AA, 0x690C}, //8395 #CJK UNIFIED IDEOGRAPH + {0xD9AB, 0x68D3}, //8396 #CJK UNIFIED IDEOGRAPH + {0xD9AC, 0x6904}, //8397 #CJK UNIFIED IDEOGRAPH + {0xD9AD, 0x68DC}, //8398 #CJK UNIFIED IDEOGRAPH + {0xD9AE, 0x692A}, //8399 #CJK UNIFIED IDEOGRAPH + {0xD9AF, 0x68EC}, //8400 #CJK UNIFIED IDEOGRAPH + {0xD9B0, 0x68EA}, //8401 #CJK UNIFIED IDEOGRAPH + {0xD9B1, 0x68F1}, //8402 #CJK UNIFIED IDEOGRAPH + {0xD9B2, 0x690F}, //8403 #CJK UNIFIED IDEOGRAPH + {0xD9B3, 0x68D6}, //8404 #CJK UNIFIED IDEOGRAPH + {0xD9B4, 0x68F7}, //8405 #CJK UNIFIED IDEOGRAPH + {0xD9B5, 0x68EB}, //8406 #CJK UNIFIED IDEOGRAPH + {0xD9B6, 0x68E4}, //8407 #CJK UNIFIED IDEOGRAPH + {0xD9B7, 0x68F6}, //8408 #CJK UNIFIED IDEOGRAPH + {0xD9B8, 0x6913}, //8409 #CJK UNIFIED IDEOGRAPH + {0xD9B9, 0x6910}, //8410 #CJK UNIFIED IDEOGRAPH + {0xD9BA, 0x68F3}, //8411 #CJK UNIFIED IDEOGRAPH + {0xD9BB, 0x68E1}, //8412 #CJK UNIFIED IDEOGRAPH + {0xD9BC, 0x6907}, //8413 #CJK UNIFIED IDEOGRAPH + {0xD9BD, 0x68CC}, //8414 #CJK UNIFIED IDEOGRAPH + {0xD9BE, 0x6908}, //8415 #CJK UNIFIED IDEOGRAPH + {0xD9BF, 0x6970}, //8416 #CJK UNIFIED IDEOGRAPH + {0xD9C0, 0x68B4}, //8417 #CJK UNIFIED IDEOGRAPH + {0xD9C1, 0x6911}, //8418 #CJK UNIFIED IDEOGRAPH + {0xD9C2, 0x68EF}, //8419 #CJK UNIFIED IDEOGRAPH + {0xD9C3, 0x68C6}, //8420 #CJK UNIFIED IDEOGRAPH + {0xD9C4, 0x6914}, //8421 #CJK UNIFIED IDEOGRAPH + {0xD9C5, 0x68F8}, //8422 #CJK UNIFIED IDEOGRAPH + {0xD9C6, 0x68D0}, //8423 #CJK UNIFIED IDEOGRAPH + {0xD9C7, 0x68FD}, //8424 #CJK UNIFIED IDEOGRAPH + {0xD9C8, 0x68FC}, //8425 #CJK UNIFIED IDEOGRAPH + {0xD9C9, 0x68E8}, //8426 #CJK UNIFIED IDEOGRAPH + {0xD9CA, 0x690B}, //8427 #CJK UNIFIED IDEOGRAPH + {0xD9CB, 0x690A}, //8428 #CJK UNIFIED IDEOGRAPH + {0xD9CC, 0x6917}, //8429 #CJK UNIFIED IDEOGRAPH + {0xD9CD, 0x68CE}, //8430 #CJK UNIFIED IDEOGRAPH + {0xD9CE, 0x68C8}, //8431 #CJK UNIFIED IDEOGRAPH + {0xD9CF, 0x68DD}, //8432 #CJK UNIFIED IDEOGRAPH + {0xD9D0, 0x68DE}, //8433 #CJK UNIFIED IDEOGRAPH + {0xD9D1, 0x68E6}, //8434 #CJK UNIFIED IDEOGRAPH + {0xD9D2, 0x68F4}, //8435 #CJK UNIFIED IDEOGRAPH + {0xD9D3, 0x68D1}, //8436 #CJK UNIFIED IDEOGRAPH + {0xD9D4, 0x6906}, //8437 #CJK UNIFIED IDEOGRAPH + {0xD9D5, 0x68D4}, //8438 #CJK UNIFIED IDEOGRAPH + {0xD9D6, 0x68E9}, //8439 #CJK UNIFIED IDEOGRAPH + {0xD9D7, 0x6915}, //8440 #CJK UNIFIED IDEOGRAPH + {0xD9D8, 0x6925}, //8441 #CJK UNIFIED IDEOGRAPH + {0xD9D9, 0x68C7}, //8442 #CJK UNIFIED IDEOGRAPH + {0xD9DA, 0x6B39}, //8443 #CJK UNIFIED IDEOGRAPH + {0xD9DB, 0x6B3B}, //8444 #CJK UNIFIED IDEOGRAPH + {0xD9DC, 0x6B3F}, //8445 #CJK UNIFIED IDEOGRAPH + {0xD9DD, 0x6B3C}, //8446 #CJK UNIFIED IDEOGRAPH + {0xD9DE, 0x6B94}, //8447 #CJK UNIFIED IDEOGRAPH + {0xD9DF, 0x6B97}, //8448 #CJK UNIFIED IDEOGRAPH + {0xD9E0, 0x6B99}, //8449 #CJK UNIFIED IDEOGRAPH + {0xD9E1, 0x6B95}, //8450 #CJK UNIFIED IDEOGRAPH + {0xD9E2, 0x6BBD}, //8451 #CJK UNIFIED IDEOGRAPH + {0xD9E3, 0x6BF0}, //8452 #CJK UNIFIED IDEOGRAPH + {0xD9E4, 0x6BF2}, //8453 #CJK UNIFIED IDEOGRAPH + {0xD9E5, 0x6BF3}, //8454 #CJK UNIFIED IDEOGRAPH + {0xD9E6, 0x6C30}, //8455 #CJK UNIFIED IDEOGRAPH + {0xD9E7, 0x6DFC}, //8456 #CJK UNIFIED IDEOGRAPH + {0xD9E8, 0x6E46}, //8457 #CJK UNIFIED IDEOGRAPH + {0xD9E9, 0x6E47}, //8458 #CJK UNIFIED IDEOGRAPH + {0xD9EA, 0x6E1F}, //8459 #CJK UNIFIED IDEOGRAPH + {0xD9EB, 0x6E49}, //8460 #CJK UNIFIED IDEOGRAPH + {0xD9EC, 0x6E88}, //8461 #CJK UNIFIED IDEOGRAPH + {0xD9ED, 0x6E3C}, //8462 #CJK UNIFIED IDEOGRAPH + {0xD9EE, 0x6E3D}, //8463 #CJK UNIFIED IDEOGRAPH + {0xD9EF, 0x6E45}, //8464 #CJK UNIFIED IDEOGRAPH + {0xD9F0, 0x6E62}, //8465 #CJK UNIFIED IDEOGRAPH + {0xD9F1, 0x6E2B}, //8466 #CJK UNIFIED IDEOGRAPH + {0xD9F2, 0x6E3F}, //8467 #CJK UNIFIED IDEOGRAPH + {0xD9F3, 0x6E41}, //8468 #CJK UNIFIED IDEOGRAPH + {0xD9F4, 0x6E5D}, //8469 #CJK UNIFIED IDEOGRAPH + {0xD9F5, 0x6E73}, //8470 #CJK UNIFIED IDEOGRAPH + {0xD9F6, 0x6E1C}, //8471 #CJK UNIFIED IDEOGRAPH + {0xD9F7, 0x6E33}, //8472 #CJK UNIFIED IDEOGRAPH + {0xD9F8, 0x6E4B}, //8473 #CJK UNIFIED IDEOGRAPH + {0xD9F9, 0x6E40}, //8474 #CJK UNIFIED IDEOGRAPH + {0xD9FA, 0x6E51}, //8475 #CJK UNIFIED IDEOGRAPH + {0xD9FB, 0x6E3B}, //8476 #CJK UNIFIED IDEOGRAPH + {0xD9FC, 0x6E03}, //8477 #CJK UNIFIED IDEOGRAPH + {0xD9FD, 0x6E2E}, //8478 #CJK UNIFIED IDEOGRAPH + {0xD9FE, 0x6E5E}, //8479 #CJK UNIFIED IDEOGRAPH + {0xDA40, 0x6E68}, //8480 #CJK UNIFIED IDEOGRAPH + {0xDA41, 0x6E5C}, //8481 #CJK UNIFIED IDEOGRAPH + {0xDA42, 0x6E61}, //8482 #CJK UNIFIED IDEOGRAPH + {0xDA43, 0x6E31}, //8483 #CJK UNIFIED IDEOGRAPH + {0xDA44, 0x6E28}, //8484 #CJK UNIFIED IDEOGRAPH + {0xDA45, 0x6E60}, //8485 #CJK UNIFIED IDEOGRAPH + {0xDA46, 0x6E71}, //8486 #CJK UNIFIED IDEOGRAPH + {0xDA47, 0x6E6B}, //8487 #CJK UNIFIED IDEOGRAPH + {0xDA48, 0x6E39}, //8488 #CJK UNIFIED IDEOGRAPH + {0xDA49, 0x6E22}, //8489 #CJK UNIFIED IDEOGRAPH + {0xDA4A, 0x6E30}, //8490 #CJK UNIFIED IDEOGRAPH + {0xDA4B, 0x6E53}, //8491 #CJK UNIFIED IDEOGRAPH + {0xDA4C, 0x6E65}, //8492 #CJK UNIFIED IDEOGRAPH + {0xDA4D, 0x6E27}, //8493 #CJK UNIFIED IDEOGRAPH + {0xDA4E, 0x6E78}, //8494 #CJK UNIFIED IDEOGRAPH + {0xDA4F, 0x6E64}, //8495 #CJK UNIFIED IDEOGRAPH + {0xDA50, 0x6E77}, //8496 #CJK UNIFIED IDEOGRAPH + {0xDA51, 0x6E55}, //8497 #CJK UNIFIED IDEOGRAPH + {0xDA52, 0x6E79}, //8498 #CJK UNIFIED IDEOGRAPH + {0xDA53, 0x6E52}, //8499 #CJK UNIFIED IDEOGRAPH + {0xDA54, 0x6E66}, //8500 #CJK UNIFIED IDEOGRAPH + {0xDA55, 0x6E35}, //8501 #CJK UNIFIED IDEOGRAPH + {0xDA56, 0x6E36}, //8502 #CJK UNIFIED IDEOGRAPH + {0xDA57, 0x6E5A}, //8503 #CJK UNIFIED IDEOGRAPH + {0xDA58, 0x7120}, //8504 #CJK UNIFIED IDEOGRAPH + {0xDA59, 0x711E}, //8505 #CJK UNIFIED IDEOGRAPH + {0xDA5A, 0x712F}, //8506 #CJK UNIFIED IDEOGRAPH + {0xDA5B, 0x70FB}, //8507 #CJK UNIFIED IDEOGRAPH + {0xDA5C, 0x712E}, //8508 #CJK UNIFIED IDEOGRAPH + {0xDA5D, 0x7131}, //8509 #CJK UNIFIED IDEOGRAPH + {0xDA5E, 0x7123}, //8510 #CJK UNIFIED IDEOGRAPH + {0xDA5F, 0x7125}, //8511 #CJK UNIFIED IDEOGRAPH + {0xDA60, 0x7122}, //8512 #CJK UNIFIED IDEOGRAPH + {0xDA61, 0x7132}, //8513 #CJK UNIFIED IDEOGRAPH + {0xDA62, 0x711F}, //8514 #CJK UNIFIED IDEOGRAPH + {0xDA63, 0x7128}, //8515 #CJK UNIFIED IDEOGRAPH + {0xDA64, 0x713A}, //8516 #CJK UNIFIED IDEOGRAPH + {0xDA65, 0x711B}, //8517 #CJK UNIFIED IDEOGRAPH + {0xDA66, 0x724B}, //8518 #CJK UNIFIED IDEOGRAPH + {0xDA67, 0x725A}, //8519 #CJK UNIFIED IDEOGRAPH + {0xDA68, 0x7288}, //8520 #CJK UNIFIED IDEOGRAPH + {0xDA69, 0x7289}, //8521 #CJK UNIFIED IDEOGRAPH + {0xDA6A, 0x7286}, //8522 #CJK UNIFIED IDEOGRAPH + {0xDA6B, 0x7285}, //8523 #CJK UNIFIED IDEOGRAPH + {0xDA6C, 0x728B}, //8524 #CJK UNIFIED IDEOGRAPH + {0xDA6D, 0x7312}, //8525 #CJK UNIFIED IDEOGRAPH + {0xDA6E, 0x730B}, //8526 #CJK UNIFIED IDEOGRAPH + {0xDA6F, 0x7330}, //8527 #CJK UNIFIED IDEOGRAPH + {0xDA70, 0x7322}, //8528 #CJK UNIFIED IDEOGRAPH + {0xDA71, 0x7331}, //8529 #CJK UNIFIED IDEOGRAPH + {0xDA72, 0x7333}, //8530 #CJK UNIFIED IDEOGRAPH + {0xDA73, 0x7327}, //8531 #CJK UNIFIED IDEOGRAPH + {0xDA74, 0x7332}, //8532 #CJK UNIFIED IDEOGRAPH + {0xDA75, 0x732D}, //8533 #CJK UNIFIED IDEOGRAPH + {0xDA76, 0x7326}, //8534 #CJK UNIFIED IDEOGRAPH + {0xDA77, 0x7323}, //8535 #CJK UNIFIED IDEOGRAPH + {0xDA78, 0x7335}, //8536 #CJK UNIFIED IDEOGRAPH + {0xDA79, 0x730C}, //8537 #CJK UNIFIED IDEOGRAPH + {0xDA7A, 0x742E}, //8538 #CJK UNIFIED IDEOGRAPH + {0xDA7B, 0x742C}, //8539 #CJK UNIFIED IDEOGRAPH + {0xDA7C, 0x7430}, //8540 #CJK UNIFIED IDEOGRAPH + {0xDA7D, 0x742B}, //8541 #CJK UNIFIED IDEOGRAPH + {0xDA7E, 0x7416}, //8542 #CJK UNIFIED IDEOGRAPH + {0xDAA1, 0x741A}, //8543 #CJK UNIFIED IDEOGRAPH + {0xDAA2, 0x7421}, //8544 #CJK UNIFIED IDEOGRAPH + {0xDAA3, 0x742D}, //8545 #CJK UNIFIED IDEOGRAPH + {0xDAA4, 0x7431}, //8546 #CJK UNIFIED IDEOGRAPH + {0xDAA5, 0x7424}, //8547 #CJK UNIFIED IDEOGRAPH + {0xDAA6, 0x7423}, //8548 #CJK UNIFIED IDEOGRAPH + {0xDAA7, 0x741D}, //8549 #CJK UNIFIED IDEOGRAPH + {0xDAA8, 0x7429}, //8550 #CJK UNIFIED IDEOGRAPH + {0xDAA9, 0x7420}, //8551 #CJK UNIFIED IDEOGRAPH + {0xDAAA, 0x7432}, //8552 #CJK UNIFIED IDEOGRAPH + {0xDAAB, 0x74FB}, //8553 #CJK UNIFIED IDEOGRAPH + {0xDAAC, 0x752F}, //8554 #CJK UNIFIED IDEOGRAPH + {0xDAAD, 0x756F}, //8555 #CJK UNIFIED IDEOGRAPH + {0xDAAE, 0x756C}, //8556 #CJK UNIFIED IDEOGRAPH + {0xDAAF, 0x75E7}, //8557 #CJK UNIFIED IDEOGRAPH + {0xDAB0, 0x75DA}, //8558 #CJK UNIFIED IDEOGRAPH + {0xDAB1, 0x75E1}, //8559 #CJK UNIFIED IDEOGRAPH + {0xDAB2, 0x75E6}, //8560 #CJK UNIFIED IDEOGRAPH + {0xDAB3, 0x75DD}, //8561 #CJK UNIFIED IDEOGRAPH + {0xDAB4, 0x75DF}, //8562 #CJK UNIFIED IDEOGRAPH + {0xDAB5, 0x75E4}, //8563 #CJK UNIFIED IDEOGRAPH + {0xDAB6, 0x75D7}, //8564 #CJK UNIFIED IDEOGRAPH + {0xDAB7, 0x7695}, //8565 #CJK UNIFIED IDEOGRAPH + {0xDAB8, 0x7692}, //8566 #CJK UNIFIED IDEOGRAPH + {0xDAB9, 0x76DA}, //8567 #CJK UNIFIED IDEOGRAPH + {0xDABA, 0x7746}, //8568 #CJK UNIFIED IDEOGRAPH + {0xDABB, 0x7747}, //8569 #CJK UNIFIED IDEOGRAPH + {0xDABC, 0x7744}, //8570 #CJK UNIFIED IDEOGRAPH + {0xDABD, 0x774D}, //8571 #CJK UNIFIED IDEOGRAPH + {0xDABE, 0x7745}, //8572 #CJK UNIFIED IDEOGRAPH + {0xDABF, 0x774A}, //8573 #CJK UNIFIED IDEOGRAPH + {0xDAC0, 0x774E}, //8574 #CJK UNIFIED IDEOGRAPH + {0xDAC1, 0x774B}, //8575 #CJK UNIFIED IDEOGRAPH + {0xDAC2, 0x774C}, //8576 #CJK UNIFIED IDEOGRAPH + {0xDAC3, 0x77DE}, //8577 #CJK UNIFIED IDEOGRAPH + {0xDAC4, 0x77EC}, //8578 #CJK UNIFIED IDEOGRAPH + {0xDAC5, 0x7860}, //8579 #CJK UNIFIED IDEOGRAPH + {0xDAC6, 0x7864}, //8580 #CJK UNIFIED IDEOGRAPH + {0xDAC7, 0x7865}, //8581 #CJK UNIFIED IDEOGRAPH + {0xDAC8, 0x785C}, //8582 #CJK UNIFIED IDEOGRAPH + {0xDAC9, 0x786D}, //8583 #CJK UNIFIED IDEOGRAPH + {0xDACA, 0x7871}, //8584 #CJK UNIFIED IDEOGRAPH + {0xDACB, 0x786A}, //8585 #CJK UNIFIED IDEOGRAPH + {0xDACC, 0x786E}, //8586 #CJK UNIFIED IDEOGRAPH + {0xDACD, 0x7870}, //8587 #CJK UNIFIED IDEOGRAPH + {0xDACE, 0x7869}, //8588 #CJK UNIFIED IDEOGRAPH + {0xDACF, 0x7868}, //8589 #CJK UNIFIED IDEOGRAPH + {0xDAD0, 0x785E}, //8590 #CJK UNIFIED IDEOGRAPH + {0xDAD1, 0x7862}, //8591 #CJK UNIFIED IDEOGRAPH + {0xDAD2, 0x7974}, //8592 #CJK UNIFIED IDEOGRAPH + {0xDAD3, 0x7973}, //8593 #CJK UNIFIED IDEOGRAPH + {0xDAD4, 0x7972}, //8594 #CJK UNIFIED IDEOGRAPH + {0xDAD5, 0x7970}, //8595 #CJK UNIFIED IDEOGRAPH + {0xDAD6, 0x7A02}, //8596 #CJK UNIFIED IDEOGRAPH + {0xDAD7, 0x7A0A}, //8597 #CJK UNIFIED IDEOGRAPH + {0xDAD8, 0x7A03}, //8598 #CJK UNIFIED IDEOGRAPH + {0xDAD9, 0x7A0C}, //8599 #CJK UNIFIED IDEOGRAPH + {0xDADA, 0x7A04}, //8600 #CJK UNIFIED IDEOGRAPH + {0xDADB, 0x7A99}, //8601 #CJK UNIFIED IDEOGRAPH + {0xDADC, 0x7AE6}, //8602 #CJK UNIFIED IDEOGRAPH + {0xDADD, 0x7AE4}, //8603 #CJK UNIFIED IDEOGRAPH + {0xDADE, 0x7B4A}, //8604 #CJK UNIFIED IDEOGRAPH + {0xDADF, 0x7B3B}, //8605 #CJK UNIFIED IDEOGRAPH + {0xDAE0, 0x7B44}, //8606 #CJK UNIFIED IDEOGRAPH + {0xDAE1, 0x7B48}, //8607 #CJK UNIFIED IDEOGRAPH + {0xDAE2, 0x7B4C}, //8608 #CJK UNIFIED IDEOGRAPH + {0xDAE3, 0x7B4E}, //8609 #CJK UNIFIED IDEOGRAPH + {0xDAE4, 0x7B40}, //8610 #CJK UNIFIED IDEOGRAPH + {0xDAE5, 0x7B58}, //8611 #CJK UNIFIED IDEOGRAPH + {0xDAE6, 0x7B45}, //8612 #CJK UNIFIED IDEOGRAPH + {0xDAE7, 0x7CA2}, //8613 #CJK UNIFIED IDEOGRAPH + {0xDAE8, 0x7C9E}, //8614 #CJK UNIFIED IDEOGRAPH + {0xDAE9, 0x7CA8}, //8615 #CJK UNIFIED IDEOGRAPH + {0xDAEA, 0x7CA1}, //8616 #CJK UNIFIED IDEOGRAPH + {0xDAEB, 0x7D58}, //8617 #CJK UNIFIED IDEOGRAPH + {0xDAEC, 0x7D6F}, //8618 #CJK UNIFIED IDEOGRAPH + {0xDAED, 0x7D63}, //8619 #CJK UNIFIED IDEOGRAPH + {0xDAEE, 0x7D53}, //8620 #CJK UNIFIED IDEOGRAPH + {0xDAEF, 0x7D56}, //8621 #CJK UNIFIED IDEOGRAPH + {0xDAF0, 0x7D67}, //8622 #CJK UNIFIED IDEOGRAPH + {0xDAF1, 0x7D6A}, //8623 #CJK UNIFIED IDEOGRAPH + {0xDAF2, 0x7D4F}, //8624 #CJK UNIFIED IDEOGRAPH + {0xDAF3, 0x7D6D}, //8625 #CJK UNIFIED IDEOGRAPH + {0xDAF4, 0x7D5C}, //8626 #CJK UNIFIED IDEOGRAPH + {0xDAF5, 0x7D6B}, //8627 #CJK UNIFIED IDEOGRAPH + {0xDAF6, 0x7D52}, //8628 #CJK UNIFIED IDEOGRAPH + {0xDAF7, 0x7D54}, //8629 #CJK UNIFIED IDEOGRAPH + {0xDAF8, 0x7D69}, //8630 #CJK UNIFIED IDEOGRAPH + {0xDAF9, 0x7D51}, //8631 #CJK UNIFIED IDEOGRAPH + {0xDAFA, 0x7D5F}, //8632 #CJK UNIFIED IDEOGRAPH + {0xDAFB, 0x7D4E}, //8633 #CJK UNIFIED IDEOGRAPH + {0xDAFC, 0x7F3E}, //8634 #CJK UNIFIED IDEOGRAPH + {0xDAFD, 0x7F3F}, //8635 #CJK UNIFIED IDEOGRAPH + {0xDAFE, 0x7F65}, //8636 #CJK UNIFIED IDEOGRAPH + {0xDB40, 0x7F66}, //8637 #CJK UNIFIED IDEOGRAPH + {0xDB41, 0x7FA2}, //8638 #CJK UNIFIED IDEOGRAPH + {0xDB42, 0x7FA0}, //8639 #CJK UNIFIED IDEOGRAPH + {0xDB43, 0x7FA1}, //8640 #CJK UNIFIED IDEOGRAPH + {0xDB44, 0x7FD7}, //8641 #CJK UNIFIED IDEOGRAPH + {0xDB45, 0x8051}, //8642 #CJK UNIFIED IDEOGRAPH + {0xDB46, 0x804F}, //8643 #CJK UNIFIED IDEOGRAPH + {0xDB47, 0x8050}, //8644 #CJK UNIFIED IDEOGRAPH + {0xDB48, 0x80FE}, //8645 #CJK UNIFIED IDEOGRAPH + {0xDB49, 0x80D4}, //8646 #CJK UNIFIED IDEOGRAPH + {0xDB4A, 0x8143}, //8647 #CJK UNIFIED IDEOGRAPH + {0xDB4B, 0x814A}, //8648 #CJK UNIFIED IDEOGRAPH + {0xDB4C, 0x8152}, //8649 #CJK UNIFIED IDEOGRAPH + {0xDB4D, 0x814F}, //8650 #CJK UNIFIED IDEOGRAPH + {0xDB4E, 0x8147}, //8651 #CJK UNIFIED IDEOGRAPH + {0xDB4F, 0x813D}, //8652 #CJK UNIFIED IDEOGRAPH + {0xDB50, 0x814D}, //8653 #CJK UNIFIED IDEOGRAPH + {0xDB51, 0x813A}, //8654 #CJK UNIFIED IDEOGRAPH + {0xDB52, 0x81E6}, //8655 #CJK UNIFIED IDEOGRAPH + {0xDB53, 0x81EE}, //8656 #CJK UNIFIED IDEOGRAPH + {0xDB54, 0x81F7}, //8657 #CJK UNIFIED IDEOGRAPH + {0xDB55, 0x81F8}, //8658 #CJK UNIFIED IDEOGRAPH + {0xDB56, 0x81F9}, //8659 #CJK UNIFIED IDEOGRAPH + {0xDB57, 0x8204}, //8660 #CJK UNIFIED IDEOGRAPH + {0xDB58, 0x823C}, //8661 #CJK UNIFIED IDEOGRAPH + {0xDB59, 0x823D}, //8662 #CJK UNIFIED IDEOGRAPH + {0xDB5A, 0x823F}, //8663 #CJK UNIFIED IDEOGRAPH + {0xDB5B, 0x8275}, //8664 #CJK UNIFIED IDEOGRAPH + {0xDB5C, 0x833B}, //8665 #CJK UNIFIED IDEOGRAPH + {0xDB5D, 0x83CF}, //8666 #CJK UNIFIED IDEOGRAPH + {0xDB5E, 0x83F9}, //8667 #CJK UNIFIED IDEOGRAPH + {0xDB5F, 0x8423}, //8668 #CJK UNIFIED IDEOGRAPH + {0xDB60, 0x83C0}, //8669 #CJK UNIFIED IDEOGRAPH + {0xDB61, 0x83E8}, //8670 #CJK UNIFIED IDEOGRAPH + {0xDB62, 0x8412}, //8671 #CJK UNIFIED IDEOGRAPH + {0xDB63, 0x83E7}, //8672 #CJK UNIFIED IDEOGRAPH + {0xDB64, 0x83E4}, //8673 #CJK UNIFIED IDEOGRAPH + {0xDB65, 0x83FC}, //8674 #CJK UNIFIED IDEOGRAPH + {0xDB66, 0x83F6}, //8675 #CJK UNIFIED IDEOGRAPH + {0xDB67, 0x8410}, //8676 #CJK UNIFIED IDEOGRAPH + {0xDB68, 0x83C6}, //8677 #CJK UNIFIED IDEOGRAPH + {0xDB69, 0x83C8}, //8678 #CJK UNIFIED IDEOGRAPH + {0xDB6A, 0x83EB}, //8679 #CJK UNIFIED IDEOGRAPH + {0xDB6B, 0x83E3}, //8680 #CJK UNIFIED IDEOGRAPH + {0xDB6C, 0x83BF}, //8681 #CJK UNIFIED IDEOGRAPH + {0xDB6D, 0x8401}, //8682 #CJK UNIFIED IDEOGRAPH + {0xDB6E, 0x83DD}, //8683 #CJK UNIFIED IDEOGRAPH + {0xDB6F, 0x83E5}, //8684 #CJK UNIFIED IDEOGRAPH + {0xDB70, 0x83D8}, //8685 #CJK UNIFIED IDEOGRAPH + {0xDB71, 0x83FF}, //8686 #CJK UNIFIED IDEOGRAPH + {0xDB72, 0x83E1}, //8687 #CJK UNIFIED IDEOGRAPH + {0xDB73, 0x83CB}, //8688 #CJK UNIFIED IDEOGRAPH + {0xDB74, 0x83CE}, //8689 #CJK UNIFIED IDEOGRAPH + {0xDB75, 0x83D6}, //8690 #CJK UNIFIED IDEOGRAPH + {0xDB76, 0x83F5}, //8691 #CJK UNIFIED IDEOGRAPH + {0xDB77, 0x83C9}, //8692 #CJK UNIFIED IDEOGRAPH + {0xDB78, 0x8409}, //8693 #CJK UNIFIED IDEOGRAPH + {0xDB79, 0x840F}, //8694 #CJK UNIFIED IDEOGRAPH + {0xDB7A, 0x83DE}, //8695 #CJK UNIFIED IDEOGRAPH + {0xDB7B, 0x8411}, //8696 #CJK UNIFIED IDEOGRAPH + {0xDB7C, 0x8406}, //8697 #CJK UNIFIED IDEOGRAPH + {0xDB7D, 0x83C2}, //8698 #CJK UNIFIED IDEOGRAPH + {0xDB7E, 0x83F3}, //8699 #CJK UNIFIED IDEOGRAPH + {0xDBA1, 0x83D5}, //8700 #CJK UNIFIED IDEOGRAPH + {0xDBA2, 0x83FA}, //8701 #CJK UNIFIED IDEOGRAPH + {0xDBA3, 0x83C7}, //8702 #CJK UNIFIED IDEOGRAPH + {0xDBA4, 0x83D1}, //8703 #CJK UNIFIED IDEOGRAPH + {0xDBA5, 0x83EA}, //8704 #CJK UNIFIED IDEOGRAPH + {0xDBA6, 0x8413}, //8705 #CJK UNIFIED IDEOGRAPH + {0xDBA7, 0x83C3}, //8706 #CJK UNIFIED IDEOGRAPH + {0xDBA8, 0x83EC}, //8707 #CJK UNIFIED IDEOGRAPH + {0xDBA9, 0x83EE}, //8708 #CJK UNIFIED IDEOGRAPH + {0xDBAA, 0x83C4}, //8709 #CJK UNIFIED IDEOGRAPH + {0xDBAB, 0x83FB}, //8710 #CJK UNIFIED IDEOGRAPH + {0xDBAC, 0x83D7}, //8711 #CJK UNIFIED IDEOGRAPH + {0xDBAD, 0x83E2}, //8712 #CJK UNIFIED IDEOGRAPH + {0xDBAE, 0x841B}, //8713 #CJK UNIFIED IDEOGRAPH + {0xDBAF, 0x83DB}, //8714 #CJK UNIFIED IDEOGRAPH + {0xDBB0, 0x83FE}, //8715 #CJK UNIFIED IDEOGRAPH + {0xDBB1, 0x86D8}, //8716 #CJK UNIFIED IDEOGRAPH + {0xDBB2, 0x86E2}, //8717 #CJK UNIFIED IDEOGRAPH + {0xDBB3, 0x86E6}, //8718 #CJK UNIFIED IDEOGRAPH + {0xDBB4, 0x86D3}, //8719 #CJK UNIFIED IDEOGRAPH + {0xDBB5, 0x86E3}, //8720 #CJK UNIFIED IDEOGRAPH + {0xDBB6, 0x86DA}, //8721 #CJK UNIFIED IDEOGRAPH + {0xDBB7, 0x86EA}, //8722 #CJK UNIFIED IDEOGRAPH + {0xDBB8, 0x86DD}, //8723 #CJK UNIFIED IDEOGRAPH + {0xDBB9, 0x86EB}, //8724 #CJK UNIFIED IDEOGRAPH + {0xDBBA, 0x86DC}, //8725 #CJK UNIFIED IDEOGRAPH + {0xDBBB, 0x86EC}, //8726 #CJK UNIFIED IDEOGRAPH + {0xDBBC, 0x86E9}, //8727 #CJK UNIFIED IDEOGRAPH + {0xDBBD, 0x86D7}, //8728 #CJK UNIFIED IDEOGRAPH + {0xDBBE, 0x86E8}, //8729 #CJK UNIFIED IDEOGRAPH + {0xDBBF, 0x86D1}, //8730 #CJK UNIFIED IDEOGRAPH + {0xDBC0, 0x8848}, //8731 #CJK UNIFIED IDEOGRAPH + {0xDBC1, 0x8856}, //8732 #CJK UNIFIED IDEOGRAPH + {0xDBC2, 0x8855}, //8733 #CJK UNIFIED IDEOGRAPH + {0xDBC3, 0x88BA}, //8734 #CJK UNIFIED IDEOGRAPH + {0xDBC4, 0x88D7}, //8735 #CJK UNIFIED IDEOGRAPH + {0xDBC5, 0x88B9}, //8736 #CJK UNIFIED IDEOGRAPH + {0xDBC6, 0x88B8}, //8737 #CJK UNIFIED IDEOGRAPH + {0xDBC7, 0x88C0}, //8738 #CJK UNIFIED IDEOGRAPH + {0xDBC8, 0x88BE}, //8739 #CJK UNIFIED IDEOGRAPH + {0xDBC9, 0x88B6}, //8740 #CJK UNIFIED IDEOGRAPH + {0xDBCA, 0x88BC}, //8741 #CJK UNIFIED IDEOGRAPH + {0xDBCB, 0x88B7}, //8742 #CJK UNIFIED IDEOGRAPH + {0xDBCC, 0x88BD}, //8743 #CJK UNIFIED IDEOGRAPH + {0xDBCD, 0x88B2}, //8744 #CJK UNIFIED IDEOGRAPH + {0xDBCE, 0x8901}, //8745 #CJK UNIFIED IDEOGRAPH + {0xDBCF, 0x88C9}, //8746 #CJK UNIFIED IDEOGRAPH + {0xDBD0, 0x8995}, //8747 #CJK UNIFIED IDEOGRAPH + {0xDBD1, 0x8998}, //8748 #CJK UNIFIED IDEOGRAPH + {0xDBD2, 0x8997}, //8749 #CJK UNIFIED IDEOGRAPH + {0xDBD3, 0x89DD}, //8750 #CJK UNIFIED IDEOGRAPH + {0xDBD4, 0x89DA}, //8751 #CJK UNIFIED IDEOGRAPH + {0xDBD5, 0x89DB}, //8752 #CJK UNIFIED IDEOGRAPH + {0xDBD6, 0x8A4E}, //8753 #CJK UNIFIED IDEOGRAPH + {0xDBD7, 0x8A4D}, //8754 #CJK UNIFIED IDEOGRAPH + {0xDBD8, 0x8A39}, //8755 #CJK UNIFIED IDEOGRAPH + {0xDBD9, 0x8A59}, //8756 #CJK UNIFIED IDEOGRAPH + {0xDBDA, 0x8A40}, //8757 #CJK UNIFIED IDEOGRAPH + {0xDBDB, 0x8A57}, //8758 #CJK UNIFIED IDEOGRAPH + {0xDBDC, 0x8A58}, //8759 #CJK UNIFIED IDEOGRAPH + {0xDBDD, 0x8A44}, //8760 #CJK UNIFIED IDEOGRAPH + {0xDBDE, 0x8A45}, //8761 #CJK UNIFIED IDEOGRAPH + {0xDBDF, 0x8A52}, //8762 #CJK UNIFIED IDEOGRAPH + {0xDBE0, 0x8A48}, //8763 #CJK UNIFIED IDEOGRAPH + {0xDBE1, 0x8A51}, //8764 #CJK UNIFIED IDEOGRAPH + {0xDBE2, 0x8A4A}, //8765 #CJK UNIFIED IDEOGRAPH + {0xDBE3, 0x8A4C}, //8766 #CJK UNIFIED IDEOGRAPH + {0xDBE4, 0x8A4F}, //8767 #CJK UNIFIED IDEOGRAPH + {0xDBE5, 0x8C5F}, //8768 #CJK UNIFIED IDEOGRAPH + {0xDBE6, 0x8C81}, //8769 #CJK UNIFIED IDEOGRAPH + {0xDBE7, 0x8C80}, //8770 #CJK UNIFIED IDEOGRAPH + {0xDBE8, 0x8CBA}, //8771 #CJK UNIFIED IDEOGRAPH + {0xDBE9, 0x8CBE}, //8772 #CJK UNIFIED IDEOGRAPH + {0xDBEA, 0x8CB0}, //8773 #CJK UNIFIED IDEOGRAPH + {0xDBEB, 0x8CB9}, //8774 #CJK UNIFIED IDEOGRAPH + {0xDBEC, 0x8CB5}, //8775 #CJK UNIFIED IDEOGRAPH + {0xDBED, 0x8D84}, //8776 #CJK UNIFIED IDEOGRAPH + {0xDBEE, 0x8D80}, //8777 #CJK UNIFIED IDEOGRAPH + {0xDBEF, 0x8D89}, //8778 #CJK UNIFIED IDEOGRAPH + {0xDBF0, 0x8DD8}, //8779 #CJK UNIFIED IDEOGRAPH + {0xDBF1, 0x8DD3}, //8780 #CJK UNIFIED IDEOGRAPH + {0xDBF2, 0x8DCD}, //8781 #CJK UNIFIED IDEOGRAPH + {0xDBF3, 0x8DC7}, //8782 #CJK UNIFIED IDEOGRAPH + {0xDBF4, 0x8DD6}, //8783 #CJK UNIFIED IDEOGRAPH + {0xDBF5, 0x8DDC}, //8784 #CJK UNIFIED IDEOGRAPH + {0xDBF6, 0x8DCF}, //8785 #CJK UNIFIED IDEOGRAPH + {0xDBF7, 0x8DD5}, //8786 #CJK UNIFIED IDEOGRAPH + {0xDBF8, 0x8DD9}, //8787 #CJK UNIFIED IDEOGRAPH + {0xDBF9, 0x8DC8}, //8788 #CJK UNIFIED IDEOGRAPH + {0xDBFA, 0x8DD7}, //8789 #CJK UNIFIED IDEOGRAPH + {0xDBFB, 0x8DC5}, //8790 #CJK UNIFIED IDEOGRAPH + {0xDBFC, 0x8EEF}, //8791 #CJK UNIFIED IDEOGRAPH + {0xDBFD, 0x8EF7}, //8792 #CJK UNIFIED IDEOGRAPH + {0xDBFE, 0x8EFA}, //8793 #CJK UNIFIED IDEOGRAPH + {0xDC40, 0x8EF9}, //8794 #CJK UNIFIED IDEOGRAPH + {0xDC41, 0x8EE6}, //8795 #CJK UNIFIED IDEOGRAPH + {0xDC42, 0x8EEE}, //8796 #CJK UNIFIED IDEOGRAPH + {0xDC43, 0x8EE5}, //8797 #CJK UNIFIED IDEOGRAPH + {0xDC44, 0x8EF5}, //8798 #CJK UNIFIED IDEOGRAPH + {0xDC45, 0x8EE7}, //8799 #CJK UNIFIED IDEOGRAPH + {0xDC46, 0x8EE8}, //8800 #CJK UNIFIED IDEOGRAPH + {0xDC47, 0x8EF6}, //8801 #CJK UNIFIED IDEOGRAPH + {0xDC48, 0x8EEB}, //8802 #CJK UNIFIED IDEOGRAPH + {0xDC49, 0x8EF1}, //8803 #CJK UNIFIED IDEOGRAPH + {0xDC4A, 0x8EEC}, //8804 #CJK UNIFIED IDEOGRAPH + {0xDC4B, 0x8EF4}, //8805 #CJK UNIFIED IDEOGRAPH + {0xDC4C, 0x8EE9}, //8806 #CJK UNIFIED IDEOGRAPH + {0xDC4D, 0x902D}, //8807 #CJK UNIFIED IDEOGRAPH + {0xDC4E, 0x9034}, //8808 #CJK UNIFIED IDEOGRAPH + {0xDC4F, 0x902F}, //8809 #CJK UNIFIED IDEOGRAPH + {0xDC50, 0x9106}, //8810 #CJK UNIFIED IDEOGRAPH + {0xDC51, 0x912C}, //8811 #CJK UNIFIED IDEOGRAPH + {0xDC52, 0x9104}, //8812 #CJK UNIFIED IDEOGRAPH + {0xDC53, 0x90FF}, //8813 #CJK UNIFIED IDEOGRAPH + {0xDC54, 0x90FC}, //8814 #CJK UNIFIED IDEOGRAPH + {0xDC55, 0x9108}, //8815 #CJK UNIFIED IDEOGRAPH + {0xDC56, 0x90F9}, //8816 #CJK UNIFIED IDEOGRAPH + {0xDC57, 0x90FB}, //8817 #CJK UNIFIED IDEOGRAPH + {0xDC58, 0x9101}, //8818 #CJK UNIFIED IDEOGRAPH + {0xDC59, 0x9100}, //8819 #CJK UNIFIED IDEOGRAPH + {0xDC5A, 0x9107}, //8820 #CJK UNIFIED IDEOGRAPH + {0xDC5B, 0x9105}, //8821 #CJK UNIFIED IDEOGRAPH + {0xDC5C, 0x9103}, //8822 #CJK UNIFIED IDEOGRAPH + {0xDC5D, 0x9161}, //8823 #CJK UNIFIED IDEOGRAPH + {0xDC5E, 0x9164}, //8824 #CJK UNIFIED IDEOGRAPH + {0xDC5F, 0x915F}, //8825 #CJK UNIFIED IDEOGRAPH + {0xDC60, 0x9162}, //8826 #CJK UNIFIED IDEOGRAPH + {0xDC61, 0x9160}, //8827 #CJK UNIFIED IDEOGRAPH + {0xDC62, 0x9201}, //8828 #CJK UNIFIED IDEOGRAPH + {0xDC63, 0x920A}, //8829 #CJK UNIFIED IDEOGRAPH + {0xDC64, 0x9225}, //8830 #CJK UNIFIED IDEOGRAPH + {0xDC65, 0x9203}, //8831 #CJK UNIFIED IDEOGRAPH + {0xDC66, 0x921A}, //8832 #CJK UNIFIED IDEOGRAPH + {0xDC67, 0x9226}, //8833 #CJK UNIFIED IDEOGRAPH + {0xDC68, 0x920F}, //8834 #CJK UNIFIED IDEOGRAPH + {0xDC69, 0x920C}, //8835 #CJK UNIFIED IDEOGRAPH + {0xDC6A, 0x9200}, //8836 #CJK UNIFIED IDEOGRAPH + {0xDC6B, 0x9212}, //8837 #CJK UNIFIED IDEOGRAPH + {0xDC6C, 0x91FF}, //8838 #CJK UNIFIED IDEOGRAPH + {0xDC6D, 0x91FD}, //8839 #CJK UNIFIED IDEOGRAPH + {0xDC6E, 0x9206}, //8840 #CJK UNIFIED IDEOGRAPH + {0xDC6F, 0x9204}, //8841 #CJK UNIFIED IDEOGRAPH + {0xDC70, 0x9227}, //8842 #CJK UNIFIED IDEOGRAPH + {0xDC71, 0x9202}, //8843 #CJK UNIFIED IDEOGRAPH + {0xDC72, 0x921C}, //8844 #CJK UNIFIED IDEOGRAPH + {0xDC73, 0x9224}, //8845 #CJK UNIFIED IDEOGRAPH + {0xDC74, 0x9219}, //8846 #CJK UNIFIED IDEOGRAPH + {0xDC75, 0x9217}, //8847 #CJK UNIFIED IDEOGRAPH + {0xDC76, 0x9205}, //8848 #CJK UNIFIED IDEOGRAPH + {0xDC77, 0x9216}, //8849 #CJK UNIFIED IDEOGRAPH + {0xDC78, 0x957B}, //8850 #CJK UNIFIED IDEOGRAPH + {0xDC79, 0x958D}, //8851 #CJK UNIFIED IDEOGRAPH + {0xDC7A, 0x958C}, //8852 #CJK UNIFIED IDEOGRAPH + {0xDC7B, 0x9590}, //8853 #CJK UNIFIED IDEOGRAPH + {0xDC7C, 0x9687}, //8854 #CJK UNIFIED IDEOGRAPH + {0xDC7D, 0x967E}, //8855 #CJK UNIFIED IDEOGRAPH + {0xDC7E, 0x9688}, //8856 #CJK UNIFIED IDEOGRAPH + {0xDCA1, 0x9689}, //8857 #CJK UNIFIED IDEOGRAPH + {0xDCA2, 0x9683}, //8858 #CJK UNIFIED IDEOGRAPH + {0xDCA3, 0x9680}, //8859 #CJK UNIFIED IDEOGRAPH + {0xDCA4, 0x96C2}, //8860 #CJK UNIFIED IDEOGRAPH + {0xDCA5, 0x96C8}, //8861 #CJK UNIFIED IDEOGRAPH + {0xDCA6, 0x96C3}, //8862 #CJK UNIFIED IDEOGRAPH + {0xDCA7, 0x96F1}, //8863 #CJK UNIFIED IDEOGRAPH + {0xDCA8, 0x96F0}, //8864 #CJK UNIFIED IDEOGRAPH + {0xDCA9, 0x976C}, //8865 #CJK UNIFIED IDEOGRAPH + {0xDCAA, 0x9770}, //8866 #CJK UNIFIED IDEOGRAPH + {0xDCAB, 0x976E}, //8867 #CJK UNIFIED IDEOGRAPH + {0xDCAC, 0x9807}, //8868 #CJK UNIFIED IDEOGRAPH + {0xDCAD, 0x98A9}, //8869 #CJK UNIFIED IDEOGRAPH + {0xDCAE, 0x98EB}, //8870 #CJK UNIFIED IDEOGRAPH + {0xDCAF, 0x9CE6}, //8871 #CJK UNIFIED IDEOGRAPH + {0xDCB0, 0x9EF9}, //8872 #CJK UNIFIED IDEOGRAPH + {0xDCB1, 0x4E83}, //8873 #CJK UNIFIED IDEOGRAPH + {0xDCB2, 0x4E84}, //8874 #CJK UNIFIED IDEOGRAPH + {0xDCB3, 0x4EB6}, //8875 #CJK UNIFIED IDEOGRAPH + {0xDCB4, 0x50BD}, //8876 #CJK UNIFIED IDEOGRAPH + {0xDCB5, 0x50BF}, //8877 #CJK UNIFIED IDEOGRAPH + {0xDCB6, 0x50C6}, //8878 #CJK UNIFIED IDEOGRAPH + {0xDCB7, 0x50AE}, //8879 #CJK UNIFIED IDEOGRAPH + {0xDCB8, 0x50C4}, //8880 #CJK UNIFIED IDEOGRAPH + {0xDCB9, 0x50CA}, //8881 #CJK UNIFIED IDEOGRAPH + {0xDCBA, 0x50B4}, //8882 #CJK UNIFIED IDEOGRAPH + {0xDCBB, 0x50C8}, //8883 #CJK UNIFIED IDEOGRAPH + {0xDCBC, 0x50C2}, //8884 #CJK UNIFIED IDEOGRAPH + {0xDCBD, 0x50B0}, //8885 #CJK UNIFIED IDEOGRAPH + {0xDCBE, 0x50C1}, //8886 #CJK UNIFIED IDEOGRAPH + {0xDCBF, 0x50BA}, //8887 #CJK UNIFIED IDEOGRAPH + {0xDCC0, 0x50B1}, //8888 #CJK UNIFIED IDEOGRAPH + {0xDCC1, 0x50CB}, //8889 #CJK UNIFIED IDEOGRAPH + {0xDCC2, 0x50C9}, //8890 #CJK UNIFIED IDEOGRAPH + {0xDCC3, 0x50B6}, //8891 #CJK UNIFIED IDEOGRAPH + {0xDCC4, 0x50B8}, //8892 #CJK UNIFIED IDEOGRAPH + {0xDCC5, 0x51D7}, //8893 #CJK UNIFIED IDEOGRAPH + {0xDCC6, 0x527A}, //8894 #CJK UNIFIED IDEOGRAPH + {0xDCC7, 0x5278}, //8895 #CJK UNIFIED IDEOGRAPH + {0xDCC8, 0x527B}, //8896 #CJK UNIFIED IDEOGRAPH + {0xDCC9, 0x527C}, //8897 #CJK UNIFIED IDEOGRAPH + {0xDCCA, 0x55C3}, //8898 #CJK UNIFIED IDEOGRAPH + {0xDCCB, 0x55DB}, //8899 #CJK UNIFIED IDEOGRAPH + {0xDCCC, 0x55CC}, //8900 #CJK UNIFIED IDEOGRAPH + {0xDCCD, 0x55D0}, //8901 #CJK UNIFIED IDEOGRAPH + {0xDCCE, 0x55CB}, //8902 #CJK UNIFIED IDEOGRAPH + {0xDCCF, 0x55CA}, //8903 #CJK UNIFIED IDEOGRAPH + {0xDCD0, 0x55DD}, //8904 #CJK UNIFIED IDEOGRAPH + {0xDCD1, 0x55C0}, //8905 #CJK UNIFIED IDEOGRAPH + {0xDCD2, 0x55D4}, //8906 #CJK UNIFIED IDEOGRAPH + {0xDCD3, 0x55C4}, //8907 #CJK UNIFIED IDEOGRAPH + {0xDCD4, 0x55E9}, //8908 #CJK UNIFIED IDEOGRAPH + {0xDCD5, 0x55BF}, //8909 #CJK UNIFIED IDEOGRAPH + {0xDCD6, 0x55D2}, //8910 #CJK UNIFIED IDEOGRAPH + {0xDCD7, 0x558D}, //8911 #CJK UNIFIED IDEOGRAPH + {0xDCD8, 0x55CF}, //8912 #CJK UNIFIED IDEOGRAPH + {0xDCD9, 0x55D5}, //8913 #CJK UNIFIED IDEOGRAPH + {0xDCDA, 0x55E2}, //8914 #CJK UNIFIED IDEOGRAPH + {0xDCDB, 0x55D6}, //8915 #CJK UNIFIED IDEOGRAPH + {0xDCDC, 0x55C8}, //8916 #CJK UNIFIED IDEOGRAPH + {0xDCDD, 0x55F2}, //8917 #CJK UNIFIED IDEOGRAPH + {0xDCDE, 0x55CD}, //8918 #CJK UNIFIED IDEOGRAPH + {0xDCDF, 0x55D9}, //8919 #CJK UNIFIED IDEOGRAPH + {0xDCE0, 0x55C2}, //8920 #CJK UNIFIED IDEOGRAPH + {0xDCE1, 0x5714}, //8921 #CJK UNIFIED IDEOGRAPH + {0xDCE2, 0x5853}, //8922 #CJK UNIFIED IDEOGRAPH + {0xDCE3, 0x5868}, //8923 #CJK UNIFIED IDEOGRAPH + {0xDCE4, 0x5864}, //8924 #CJK UNIFIED IDEOGRAPH + {0xDCE5, 0x584F}, //8925 #CJK UNIFIED IDEOGRAPH + {0xDCE6, 0x584D}, //8926 #CJK UNIFIED IDEOGRAPH + {0xDCE7, 0x5849}, //8927 #CJK UNIFIED IDEOGRAPH + {0xDCE8, 0x586F}, //8928 #CJK UNIFIED IDEOGRAPH + {0xDCE9, 0x5855}, //8929 #CJK UNIFIED IDEOGRAPH + {0xDCEA, 0x584E}, //8930 #CJK UNIFIED IDEOGRAPH + {0xDCEB, 0x585D}, //8931 #CJK UNIFIED IDEOGRAPH + {0xDCEC, 0x5859}, //8932 #CJK UNIFIED IDEOGRAPH + {0xDCED, 0x5865}, //8933 #CJK UNIFIED IDEOGRAPH + {0xDCEE, 0x585B}, //8934 #CJK UNIFIED IDEOGRAPH + {0xDCEF, 0x583D}, //8935 #CJK UNIFIED IDEOGRAPH + {0xDCF0, 0x5863}, //8936 #CJK UNIFIED IDEOGRAPH + {0xDCF1, 0x5871}, //8937 #CJK UNIFIED IDEOGRAPH + {0xDCF2, 0x58FC}, //8938 #CJK UNIFIED IDEOGRAPH + {0xDCF3, 0x5AC7}, //8939 #CJK UNIFIED IDEOGRAPH + {0xDCF4, 0x5AC4}, //8940 #CJK UNIFIED IDEOGRAPH + {0xDCF5, 0x5ACB}, //8941 #CJK UNIFIED IDEOGRAPH + {0xDCF6, 0x5ABA}, //8942 #CJK UNIFIED IDEOGRAPH + {0xDCF7, 0x5AB8}, //8943 #CJK UNIFIED IDEOGRAPH + {0xDCF8, 0x5AB1}, //8944 #CJK UNIFIED IDEOGRAPH + {0xDCF9, 0x5AB5}, //8945 #CJK UNIFIED IDEOGRAPH + {0xDCFA, 0x5AB0}, //8946 #CJK UNIFIED IDEOGRAPH + {0xDCFB, 0x5ABF}, //8947 #CJK UNIFIED IDEOGRAPH + {0xDCFC, 0x5AC8}, //8948 #CJK UNIFIED IDEOGRAPH + {0xDCFD, 0x5ABB}, //8949 #CJK UNIFIED IDEOGRAPH + {0xDCFE, 0x5AC6}, //8950 #CJK UNIFIED IDEOGRAPH + {0xDD40, 0x5AB7}, //8951 #CJK UNIFIED IDEOGRAPH + {0xDD41, 0x5AC0}, //8952 #CJK UNIFIED IDEOGRAPH + {0xDD42, 0x5ACA}, //8953 #CJK UNIFIED IDEOGRAPH + {0xDD43, 0x5AB4}, //8954 #CJK UNIFIED IDEOGRAPH + {0xDD44, 0x5AB6}, //8955 #CJK UNIFIED IDEOGRAPH + {0xDD45, 0x5ACD}, //8956 #CJK UNIFIED IDEOGRAPH + {0xDD46, 0x5AB9}, //8957 #CJK UNIFIED IDEOGRAPH + {0xDD47, 0x5A90}, //8958 #CJK UNIFIED IDEOGRAPH + {0xDD48, 0x5BD6}, //8959 #CJK UNIFIED IDEOGRAPH + {0xDD49, 0x5BD8}, //8960 #CJK UNIFIED IDEOGRAPH + {0xDD4A, 0x5BD9}, //8961 #CJK UNIFIED IDEOGRAPH + {0xDD4B, 0x5C1F}, //8962 #CJK UNIFIED IDEOGRAPH + {0xDD4C, 0x5C33}, //8963 #CJK UNIFIED IDEOGRAPH + {0xDD4D, 0x5D71}, //8964 #CJK UNIFIED IDEOGRAPH + {0xDD4E, 0x5D63}, //8965 #CJK UNIFIED IDEOGRAPH + {0xDD4F, 0x5D4A}, //8966 #CJK UNIFIED IDEOGRAPH + {0xDD50, 0x5D65}, //8967 #CJK UNIFIED IDEOGRAPH + {0xDD51, 0x5D72}, //8968 #CJK UNIFIED IDEOGRAPH + {0xDD52, 0x5D6C}, //8969 #CJK UNIFIED IDEOGRAPH + {0xDD53, 0x5D5E}, //8970 #CJK UNIFIED IDEOGRAPH + {0xDD54, 0x5D68}, //8971 #CJK UNIFIED IDEOGRAPH + {0xDD55, 0x5D67}, //8972 #CJK UNIFIED IDEOGRAPH + {0xDD56, 0x5D62}, //8973 #CJK UNIFIED IDEOGRAPH + {0xDD57, 0x5DF0}, //8974 #CJK UNIFIED IDEOGRAPH + {0xDD58, 0x5E4F}, //8975 #CJK UNIFIED IDEOGRAPH + {0xDD59, 0x5E4E}, //8976 #CJK UNIFIED IDEOGRAPH + {0xDD5A, 0x5E4A}, //8977 #CJK UNIFIED IDEOGRAPH + {0xDD5B, 0x5E4D}, //8978 #CJK UNIFIED IDEOGRAPH + {0xDD5C, 0x5E4B}, //8979 #CJK UNIFIED IDEOGRAPH + {0xDD5D, 0x5EC5}, //8980 #CJK UNIFIED IDEOGRAPH + {0xDD5E, 0x5ECC}, //8981 #CJK UNIFIED IDEOGRAPH + {0xDD5F, 0x5EC6}, //8982 #CJK UNIFIED IDEOGRAPH + {0xDD60, 0x5ECB}, //8983 #CJK UNIFIED IDEOGRAPH + {0xDD61, 0x5EC7}, //8984 #CJK UNIFIED IDEOGRAPH + {0xDD62, 0x5F40}, //8985 #CJK UNIFIED IDEOGRAPH + {0xDD63, 0x5FAF}, //8986 #CJK UNIFIED IDEOGRAPH + {0xDD64, 0x5FAD}, //8987 #CJK UNIFIED IDEOGRAPH + {0xDD65, 0x60F7}, //8988 #CJK UNIFIED IDEOGRAPH + {0xDD66, 0x6149}, //8989 #CJK UNIFIED IDEOGRAPH + {0xDD67, 0x614A}, //8990 #CJK UNIFIED IDEOGRAPH + {0xDD68, 0x612B}, //8991 #CJK UNIFIED IDEOGRAPH + {0xDD69, 0x6145}, //8992 #CJK UNIFIED IDEOGRAPH + {0xDD6A, 0x6136}, //8993 #CJK UNIFIED IDEOGRAPH + {0xDD6B, 0x6132}, //8994 #CJK UNIFIED IDEOGRAPH + {0xDD6C, 0x612E}, //8995 #CJK UNIFIED IDEOGRAPH + {0xDD6D, 0x6146}, //8996 #CJK UNIFIED IDEOGRAPH + {0xDD6E, 0x612F}, //8997 #CJK UNIFIED IDEOGRAPH + {0xDD6F, 0x614F}, //8998 #CJK UNIFIED IDEOGRAPH + {0xDD70, 0x6129}, //8999 #CJK UNIFIED IDEOGRAPH + {0xDD71, 0x6140}, //9000 #CJK UNIFIED IDEOGRAPH + {0xDD72, 0x6220}, //9001 #CJK UNIFIED IDEOGRAPH + {0xDD73, 0x9168}, //9002 #CJK UNIFIED IDEOGRAPH + {0xDD74, 0x6223}, //9003 #CJK UNIFIED IDEOGRAPH + {0xDD75, 0x6225}, //9004 #CJK UNIFIED IDEOGRAPH + {0xDD76, 0x6224}, //9005 #CJK UNIFIED IDEOGRAPH + {0xDD77, 0x63C5}, //9006 #CJK UNIFIED IDEOGRAPH + {0xDD78, 0x63F1}, //9007 #CJK UNIFIED IDEOGRAPH + {0xDD79, 0x63EB}, //9008 #CJK UNIFIED IDEOGRAPH + {0xDD7A, 0x6410}, //9009 #CJK UNIFIED IDEOGRAPH + {0xDD7B, 0x6412}, //9010 #CJK UNIFIED IDEOGRAPH + {0xDD7C, 0x6409}, //9011 #CJK UNIFIED IDEOGRAPH + {0xDD7D, 0x6420}, //9012 #CJK UNIFIED IDEOGRAPH + {0xDD7E, 0x6424}, //9013 #CJK UNIFIED IDEOGRAPH + {0xDDA1, 0x6433}, //9014 #CJK UNIFIED IDEOGRAPH + {0xDDA2, 0x6443}, //9015 #CJK UNIFIED IDEOGRAPH + {0xDDA3, 0x641F}, //9016 #CJK UNIFIED IDEOGRAPH + {0xDDA4, 0x6415}, //9017 #CJK UNIFIED IDEOGRAPH + {0xDDA5, 0x6418}, //9018 #CJK UNIFIED IDEOGRAPH + {0xDDA6, 0x6439}, //9019 #CJK UNIFIED IDEOGRAPH + {0xDDA7, 0x6437}, //9020 #CJK UNIFIED IDEOGRAPH + {0xDDA8, 0x6422}, //9021 #CJK UNIFIED IDEOGRAPH + {0xDDA9, 0x6423}, //9022 #CJK UNIFIED IDEOGRAPH + {0xDDAA, 0x640C}, //9023 #CJK UNIFIED IDEOGRAPH + {0xDDAB, 0x6426}, //9024 #CJK UNIFIED IDEOGRAPH + {0xDDAC, 0x6430}, //9025 #CJK UNIFIED IDEOGRAPH + {0xDDAD, 0x6428}, //9026 #CJK UNIFIED IDEOGRAPH + {0xDDAE, 0x6441}, //9027 #CJK UNIFIED IDEOGRAPH + {0xDDAF, 0x6435}, //9028 #CJK UNIFIED IDEOGRAPH + {0xDDB0, 0x642F}, //9029 #CJK UNIFIED IDEOGRAPH + {0xDDB1, 0x640A}, //9030 #CJK UNIFIED IDEOGRAPH + {0xDDB2, 0x641A}, //9031 #CJK UNIFIED IDEOGRAPH + {0xDDB3, 0x6440}, //9032 #CJK UNIFIED IDEOGRAPH + {0xDDB4, 0x6425}, //9033 #CJK UNIFIED IDEOGRAPH + {0xDDB5, 0x6427}, //9034 #CJK UNIFIED IDEOGRAPH + {0xDDB6, 0x640B}, //9035 #CJK UNIFIED IDEOGRAPH + {0xDDB7, 0x63E7}, //9036 #CJK UNIFIED IDEOGRAPH + {0xDDB8, 0x641B}, //9037 #CJK UNIFIED IDEOGRAPH + {0xDDB9, 0x642E}, //9038 #CJK UNIFIED IDEOGRAPH + {0xDDBA, 0x6421}, //9039 #CJK UNIFIED IDEOGRAPH + {0xDDBB, 0x640E}, //9040 #CJK UNIFIED IDEOGRAPH + {0xDDBC, 0x656F}, //9041 #CJK UNIFIED IDEOGRAPH + {0xDDBD, 0x6592}, //9042 #CJK UNIFIED IDEOGRAPH + {0xDDBE, 0x65D3}, //9043 #CJK UNIFIED IDEOGRAPH + {0xDDBF, 0x6686}, //9044 #CJK UNIFIED IDEOGRAPH + {0xDDC0, 0x668C}, //9045 #CJK UNIFIED IDEOGRAPH + {0xDDC1, 0x6695}, //9046 #CJK UNIFIED IDEOGRAPH + {0xDDC2, 0x6690}, //9047 #CJK UNIFIED IDEOGRAPH + {0xDDC3, 0x668B}, //9048 #CJK UNIFIED IDEOGRAPH + {0xDDC4, 0x668A}, //9049 #CJK UNIFIED IDEOGRAPH + {0xDDC5, 0x6699}, //9050 #CJK UNIFIED IDEOGRAPH + {0xDDC6, 0x6694}, //9051 #CJK UNIFIED IDEOGRAPH + {0xDDC7, 0x6678}, //9052 #CJK UNIFIED IDEOGRAPH + {0xDDC8, 0x6720}, //9053 #CJK UNIFIED IDEOGRAPH + {0xDDC9, 0x6966}, //9054 #CJK UNIFIED IDEOGRAPH + {0xDDCA, 0x695F}, //9055 #CJK UNIFIED IDEOGRAPH + {0xDDCB, 0x6938}, //9056 #CJK UNIFIED IDEOGRAPH + {0xDDCC, 0x694E}, //9057 #CJK UNIFIED IDEOGRAPH + {0xDDCD, 0x6962}, //9058 #CJK UNIFIED IDEOGRAPH + {0xDDCE, 0x6971}, //9059 #CJK UNIFIED IDEOGRAPH + {0xDDCF, 0x693F}, //9060 #CJK UNIFIED IDEOGRAPH + {0xDDD0, 0x6945}, //9061 #CJK UNIFIED IDEOGRAPH + {0xDDD1, 0x696A}, //9062 #CJK UNIFIED IDEOGRAPH + {0xDDD2, 0x6939}, //9063 #CJK UNIFIED IDEOGRAPH + {0xDDD3, 0x6942}, //9064 #CJK UNIFIED IDEOGRAPH + {0xDDD4, 0x6957}, //9065 #CJK UNIFIED IDEOGRAPH + {0xDDD5, 0x6959}, //9066 #CJK UNIFIED IDEOGRAPH + {0xDDD6, 0x697A}, //9067 #CJK UNIFIED IDEOGRAPH + {0xDDD7, 0x6948}, //9068 #CJK UNIFIED IDEOGRAPH + {0xDDD8, 0x6949}, //9069 #CJK UNIFIED IDEOGRAPH + {0xDDD9, 0x6935}, //9070 #CJK UNIFIED IDEOGRAPH + {0xDDDA, 0x696C}, //9071 #CJK UNIFIED IDEOGRAPH + {0xDDDB, 0x6933}, //9072 #CJK UNIFIED IDEOGRAPH + {0xDDDC, 0x693D}, //9073 #CJK UNIFIED IDEOGRAPH + {0xDDDD, 0x6965}, //9074 #CJK UNIFIED IDEOGRAPH + {0xDDDE, 0x68F0}, //9075 #CJK UNIFIED IDEOGRAPH + {0xDDDF, 0x6978}, //9076 #CJK UNIFIED IDEOGRAPH + {0xDDE0, 0x6934}, //9077 #CJK UNIFIED IDEOGRAPH + {0xDDE1, 0x6969}, //9078 #CJK UNIFIED IDEOGRAPH + {0xDDE2, 0x6940}, //9079 #CJK UNIFIED IDEOGRAPH + {0xDDE3, 0x696F}, //9080 #CJK UNIFIED IDEOGRAPH + {0xDDE4, 0x6944}, //9081 #CJK UNIFIED IDEOGRAPH + {0xDDE5, 0x6976}, //9082 #CJK UNIFIED IDEOGRAPH + {0xDDE6, 0x6958}, //9083 #CJK UNIFIED IDEOGRAPH + {0xDDE7, 0x6941}, //9084 #CJK UNIFIED IDEOGRAPH + {0xDDE8, 0x6974}, //9085 #CJK UNIFIED IDEOGRAPH + {0xDDE9, 0x694C}, //9086 #CJK UNIFIED IDEOGRAPH + {0xDDEA, 0x693B}, //9087 #CJK UNIFIED IDEOGRAPH + {0xDDEB, 0x694B}, //9088 #CJK UNIFIED IDEOGRAPH + {0xDDEC, 0x6937}, //9089 #CJK UNIFIED IDEOGRAPH + {0xDDED, 0x695C}, //9090 #CJK UNIFIED IDEOGRAPH + {0xDDEE, 0x694F}, //9091 #CJK UNIFIED IDEOGRAPH + {0xDDEF, 0x6951}, //9092 #CJK UNIFIED IDEOGRAPH + {0xDDF0, 0x6932}, //9093 #CJK UNIFIED IDEOGRAPH + {0xDDF1, 0x6952}, //9094 #CJK UNIFIED IDEOGRAPH + {0xDDF2, 0x692F}, //9095 #CJK UNIFIED IDEOGRAPH + {0xDDF3, 0x697B}, //9096 #CJK UNIFIED IDEOGRAPH + {0xDDF4, 0x693C}, //9097 #CJK UNIFIED IDEOGRAPH + {0xDDF5, 0x6B46}, //9098 #CJK UNIFIED IDEOGRAPH + {0xDDF6, 0x6B45}, //9099 #CJK UNIFIED IDEOGRAPH + {0xDDF7, 0x6B43}, //9100 #CJK UNIFIED IDEOGRAPH + {0xDDF8, 0x6B42}, //9101 #CJK UNIFIED IDEOGRAPH + {0xDDF9, 0x6B48}, //9102 #CJK UNIFIED IDEOGRAPH + {0xDDFA, 0x6B41}, //9103 #CJK UNIFIED IDEOGRAPH + {0xDDFB, 0x6B9B}, //9104 #CJK UNIFIED IDEOGRAPH + {0xDDFC, 0xFA0D}, //9105 #CJK COMPATIBILITY IDEOGRAPH + {0xDDFD, 0x6BFB}, //9106 #CJK UNIFIED IDEOGRAPH + {0xDDFE, 0x6BFC}, //9107 #CJK UNIFIED IDEOGRAPH + {0xDE40, 0x6BF9}, //9108 #CJK UNIFIED IDEOGRAPH + {0xDE41, 0x6BF7}, //9109 #CJK UNIFIED IDEOGRAPH + {0xDE42, 0x6BF8}, //9110 #CJK UNIFIED IDEOGRAPH + {0xDE43, 0x6E9B}, //9111 #CJK UNIFIED IDEOGRAPH + {0xDE44, 0x6ED6}, //9112 #CJK UNIFIED IDEOGRAPH + {0xDE45, 0x6EC8}, //9113 #CJK UNIFIED IDEOGRAPH + {0xDE46, 0x6E8F}, //9114 #CJK UNIFIED IDEOGRAPH + {0xDE47, 0x6EC0}, //9115 #CJK UNIFIED IDEOGRAPH + {0xDE48, 0x6E9F}, //9116 #CJK UNIFIED IDEOGRAPH + {0xDE49, 0x6E93}, //9117 #CJK UNIFIED IDEOGRAPH + {0xDE4A, 0x6E94}, //9118 #CJK UNIFIED IDEOGRAPH + {0xDE4B, 0x6EA0}, //9119 #CJK UNIFIED IDEOGRAPH + {0xDE4C, 0x6EB1}, //9120 #CJK UNIFIED IDEOGRAPH + {0xDE4D, 0x6EB9}, //9121 #CJK UNIFIED IDEOGRAPH + {0xDE4E, 0x6EC6}, //9122 #CJK UNIFIED IDEOGRAPH + {0xDE4F, 0x6ED2}, //9123 #CJK UNIFIED IDEOGRAPH + {0xDE50, 0x6EBD}, //9124 #CJK UNIFIED IDEOGRAPH + {0xDE51, 0x6EC1}, //9125 #CJK UNIFIED IDEOGRAPH + {0xDE52, 0x6E9E}, //9126 #CJK UNIFIED IDEOGRAPH + {0xDE53, 0x6EC9}, //9127 #CJK UNIFIED IDEOGRAPH + {0xDE54, 0x6EB7}, //9128 #CJK UNIFIED IDEOGRAPH + {0xDE55, 0x6EB0}, //9129 #CJK UNIFIED IDEOGRAPH + {0xDE56, 0x6ECD}, //9130 #CJK UNIFIED IDEOGRAPH + {0xDE57, 0x6EA6}, //9131 #CJK UNIFIED IDEOGRAPH + {0xDE58, 0x6ECF}, //9132 #CJK UNIFIED IDEOGRAPH + {0xDE59, 0x6EB2}, //9133 #CJK UNIFIED IDEOGRAPH + {0xDE5A, 0x6EBE}, //9134 #CJK UNIFIED IDEOGRAPH + {0xDE5B, 0x6EC3}, //9135 #CJK UNIFIED IDEOGRAPH + {0xDE5C, 0x6EDC}, //9136 #CJK UNIFIED IDEOGRAPH + {0xDE5D, 0x6ED8}, //9137 #CJK UNIFIED IDEOGRAPH + {0xDE5E, 0x6E99}, //9138 #CJK UNIFIED IDEOGRAPH + {0xDE5F, 0x6E92}, //9139 #CJK UNIFIED IDEOGRAPH + {0xDE60, 0x6E8E}, //9140 #CJK UNIFIED IDEOGRAPH + {0xDE61, 0x6E8D}, //9141 #CJK UNIFIED IDEOGRAPH + {0xDE62, 0x6EA4}, //9142 #CJK UNIFIED IDEOGRAPH + {0xDE63, 0x6EA1}, //9143 #CJK UNIFIED IDEOGRAPH + {0xDE64, 0x6EBF}, //9144 #CJK UNIFIED IDEOGRAPH + {0xDE65, 0x6EB3}, //9145 #CJK UNIFIED IDEOGRAPH + {0xDE66, 0x6ED0}, //9146 #CJK UNIFIED IDEOGRAPH + {0xDE67, 0x6ECA}, //9147 #CJK UNIFIED IDEOGRAPH + {0xDE68, 0x6E97}, //9148 #CJK UNIFIED IDEOGRAPH + {0xDE69, 0x6EAE}, //9149 #CJK UNIFIED IDEOGRAPH + {0xDE6A, 0x6EA3}, //9150 #CJK UNIFIED IDEOGRAPH + {0xDE6B, 0x7147}, //9151 #CJK UNIFIED IDEOGRAPH + {0xDE6C, 0x7154}, //9152 #CJK UNIFIED IDEOGRAPH + {0xDE6D, 0x7152}, //9153 #CJK UNIFIED IDEOGRAPH + {0xDE6E, 0x7163}, //9154 #CJK UNIFIED IDEOGRAPH + {0xDE6F, 0x7160}, //9155 #CJK UNIFIED IDEOGRAPH + {0xDE70, 0x7141}, //9156 #CJK UNIFIED IDEOGRAPH + {0xDE71, 0x715D}, //9157 #CJK UNIFIED IDEOGRAPH + {0xDE72, 0x7162}, //9158 #CJK UNIFIED IDEOGRAPH + {0xDE73, 0x7172}, //9159 #CJK UNIFIED IDEOGRAPH + {0xDE74, 0x7178}, //9160 #CJK UNIFIED IDEOGRAPH + {0xDE75, 0x716A}, //9161 #CJK UNIFIED IDEOGRAPH + {0xDE76, 0x7161}, //9162 #CJK UNIFIED IDEOGRAPH + {0xDE77, 0x7142}, //9163 #CJK UNIFIED IDEOGRAPH + {0xDE78, 0x7158}, //9164 #CJK UNIFIED IDEOGRAPH + {0xDE79, 0x7143}, //9165 #CJK UNIFIED IDEOGRAPH + {0xDE7A, 0x714B}, //9166 #CJK UNIFIED IDEOGRAPH + {0xDE7B, 0x7170}, //9167 #CJK UNIFIED IDEOGRAPH + {0xDE7C, 0x715F}, //9168 #CJK UNIFIED IDEOGRAPH + {0xDE7D, 0x7150}, //9169 #CJK UNIFIED IDEOGRAPH + {0xDE7E, 0x7153}, //9170 #CJK UNIFIED IDEOGRAPH + {0xDEA1, 0x7144}, //9171 #CJK UNIFIED IDEOGRAPH + {0xDEA2, 0x714D}, //9172 #CJK UNIFIED IDEOGRAPH + {0xDEA3, 0x715A}, //9173 #CJK UNIFIED IDEOGRAPH + {0xDEA4, 0x724F}, //9174 #CJK UNIFIED IDEOGRAPH + {0xDEA5, 0x728D}, //9175 #CJK UNIFIED IDEOGRAPH + {0xDEA6, 0x728C}, //9176 #CJK UNIFIED IDEOGRAPH + {0xDEA7, 0x7291}, //9177 #CJK UNIFIED IDEOGRAPH + {0xDEA8, 0x7290}, //9178 #CJK UNIFIED IDEOGRAPH + {0xDEA9, 0x728E}, //9179 #CJK UNIFIED IDEOGRAPH + {0xDEAA, 0x733C}, //9180 #CJK UNIFIED IDEOGRAPH + {0xDEAB, 0x7342}, //9181 #CJK UNIFIED IDEOGRAPH + {0xDEAC, 0x733B}, //9182 #CJK UNIFIED IDEOGRAPH + {0xDEAD, 0x733A}, //9183 #CJK UNIFIED IDEOGRAPH + {0xDEAE, 0x7340}, //9184 #CJK UNIFIED IDEOGRAPH + {0xDEAF, 0x734A}, //9185 #CJK UNIFIED IDEOGRAPH + {0xDEB0, 0x7349}, //9186 #CJK UNIFIED IDEOGRAPH + {0xDEB1, 0x7444}, //9187 #CJK UNIFIED IDEOGRAPH + {0xDEB2, 0x744A}, //9188 #CJK UNIFIED IDEOGRAPH + {0xDEB3, 0x744B}, //9189 #CJK UNIFIED IDEOGRAPH + {0xDEB4, 0x7452}, //9190 #CJK UNIFIED IDEOGRAPH + {0xDEB5, 0x7451}, //9191 #CJK UNIFIED IDEOGRAPH + {0xDEB6, 0x7457}, //9192 #CJK UNIFIED IDEOGRAPH + {0xDEB7, 0x7440}, //9193 #CJK UNIFIED IDEOGRAPH + {0xDEB8, 0x744F}, //9194 #CJK UNIFIED IDEOGRAPH + {0xDEB9, 0x7450}, //9195 #CJK UNIFIED IDEOGRAPH + {0xDEBA, 0x744E}, //9196 #CJK UNIFIED IDEOGRAPH + {0xDEBB, 0x7442}, //9197 #CJK UNIFIED IDEOGRAPH + {0xDEBC, 0x7446}, //9198 #CJK UNIFIED IDEOGRAPH + {0xDEBD, 0x744D}, //9199 #CJK UNIFIED IDEOGRAPH + {0xDEBE, 0x7454}, //9200 #CJK UNIFIED IDEOGRAPH + {0xDEBF, 0x74E1}, //9201 #CJK UNIFIED IDEOGRAPH + {0xDEC0, 0x74FF}, //9202 #CJK UNIFIED IDEOGRAPH + {0xDEC1, 0x74FE}, //9203 #CJK UNIFIED IDEOGRAPH + {0xDEC2, 0x74FD}, //9204 #CJK UNIFIED IDEOGRAPH + {0xDEC3, 0x751D}, //9205 #CJK UNIFIED IDEOGRAPH + {0xDEC4, 0x7579}, //9206 #CJK UNIFIED IDEOGRAPH + {0xDEC5, 0x7577}, //9207 #CJK UNIFIED IDEOGRAPH + {0xDEC6, 0x6983}, //9208 #CJK UNIFIED IDEOGRAPH + {0xDEC7, 0x75EF}, //9209 #CJK UNIFIED IDEOGRAPH + {0xDEC8, 0x760F}, //9210 #CJK UNIFIED IDEOGRAPH + {0xDEC9, 0x7603}, //9211 #CJK UNIFIED IDEOGRAPH + {0xDECA, 0x75F7}, //9212 #CJK UNIFIED IDEOGRAPH + {0xDECB, 0x75FE}, //9213 #CJK UNIFIED IDEOGRAPH + {0xDECC, 0x75FC}, //9214 #CJK UNIFIED IDEOGRAPH + {0xDECD, 0x75F9}, //9215 #CJK UNIFIED IDEOGRAPH + {0xDECE, 0x75F8}, //9216 #CJK UNIFIED IDEOGRAPH + {0xDECF, 0x7610}, //9217 #CJK UNIFIED IDEOGRAPH + {0xDED0, 0x75FB}, //9218 #CJK UNIFIED IDEOGRAPH + {0xDED1, 0x75F6}, //9219 #CJK UNIFIED IDEOGRAPH + {0xDED2, 0x75ED}, //9220 #CJK UNIFIED IDEOGRAPH + {0xDED3, 0x75F5}, //9221 #CJK UNIFIED IDEOGRAPH + {0xDED4, 0x75FD}, //9222 #CJK UNIFIED IDEOGRAPH + {0xDED5, 0x7699}, //9223 #CJK UNIFIED IDEOGRAPH + {0xDED6, 0x76B5}, //9224 #CJK UNIFIED IDEOGRAPH + {0xDED7, 0x76DD}, //9225 #CJK UNIFIED IDEOGRAPH + {0xDED8, 0x7755}, //9226 #CJK UNIFIED IDEOGRAPH + {0xDED9, 0x775F}, //9227 #CJK UNIFIED IDEOGRAPH + {0xDEDA, 0x7760}, //9228 #CJK UNIFIED IDEOGRAPH + {0xDEDB, 0x7752}, //9229 #CJK UNIFIED IDEOGRAPH + {0xDEDC, 0x7756}, //9230 #CJK UNIFIED IDEOGRAPH + {0xDEDD, 0x775A}, //9231 #CJK UNIFIED IDEOGRAPH + {0xDEDE, 0x7769}, //9232 #CJK UNIFIED IDEOGRAPH + {0xDEDF, 0x7767}, //9233 #CJK UNIFIED IDEOGRAPH + {0xDEE0, 0x7754}, //9234 #CJK UNIFIED IDEOGRAPH + {0xDEE1, 0x7759}, //9235 #CJK UNIFIED IDEOGRAPH + {0xDEE2, 0x776D}, //9236 #CJK UNIFIED IDEOGRAPH + {0xDEE3, 0x77E0}, //9237 #CJK UNIFIED IDEOGRAPH + {0xDEE4, 0x7887}, //9238 #CJK UNIFIED IDEOGRAPH + {0xDEE5, 0x789A}, //9239 #CJK UNIFIED IDEOGRAPH + {0xDEE6, 0x7894}, //9240 #CJK UNIFIED IDEOGRAPH + {0xDEE7, 0x788F}, //9241 #CJK UNIFIED IDEOGRAPH + {0xDEE8, 0x7884}, //9242 #CJK UNIFIED IDEOGRAPH + {0xDEE9, 0x7895}, //9243 #CJK UNIFIED IDEOGRAPH + {0xDEEA, 0x7885}, //9244 #CJK UNIFIED IDEOGRAPH + {0xDEEB, 0x7886}, //9245 #CJK UNIFIED IDEOGRAPH + {0xDEEC, 0x78A1}, //9246 #CJK UNIFIED IDEOGRAPH + {0xDEED, 0x7883}, //9247 #CJK UNIFIED IDEOGRAPH + {0xDEEE, 0x7879}, //9248 #CJK UNIFIED IDEOGRAPH + {0xDEEF, 0x7899}, //9249 #CJK UNIFIED IDEOGRAPH + {0xDEF0, 0x7880}, //9250 #CJK UNIFIED IDEOGRAPH + {0xDEF1, 0x7896}, //9251 #CJK UNIFIED IDEOGRAPH + {0xDEF2, 0x787B}, //9252 #CJK UNIFIED IDEOGRAPH + {0xDEF3, 0x797C}, //9253 #CJK UNIFIED IDEOGRAPH + {0xDEF4, 0x7982}, //9254 #CJK UNIFIED IDEOGRAPH + {0xDEF5, 0x797D}, //9255 #CJK UNIFIED IDEOGRAPH + {0xDEF6, 0x7979}, //9256 #CJK UNIFIED IDEOGRAPH + {0xDEF7, 0x7A11}, //9257 #CJK UNIFIED IDEOGRAPH + {0xDEF8, 0x7A18}, //9258 #CJK UNIFIED IDEOGRAPH + {0xDEF9, 0x7A19}, //9259 #CJK UNIFIED IDEOGRAPH + {0xDEFA, 0x7A12}, //9260 #CJK UNIFIED IDEOGRAPH + {0xDEFB, 0x7A17}, //9261 #CJK UNIFIED IDEOGRAPH + {0xDEFC, 0x7A15}, //9262 #CJK UNIFIED IDEOGRAPH + {0xDEFD, 0x7A22}, //9263 #CJK UNIFIED IDEOGRAPH + {0xDEFE, 0x7A13}, //9264 #CJK UNIFIED IDEOGRAPH + {0xDF40, 0x7A1B}, //9265 #CJK UNIFIED IDEOGRAPH + {0xDF41, 0x7A10}, //9266 #CJK UNIFIED IDEOGRAPH + {0xDF42, 0x7AA3}, //9267 #CJK UNIFIED IDEOGRAPH + {0xDF43, 0x7AA2}, //9268 #CJK UNIFIED IDEOGRAPH + {0xDF44, 0x7A9E}, //9269 #CJK UNIFIED IDEOGRAPH + {0xDF45, 0x7AEB}, //9270 #CJK UNIFIED IDEOGRAPH + {0xDF46, 0x7B66}, //9271 #CJK UNIFIED IDEOGRAPH + {0xDF47, 0x7B64}, //9272 #CJK UNIFIED IDEOGRAPH + {0xDF48, 0x7B6D}, //9273 #CJK UNIFIED IDEOGRAPH + {0xDF49, 0x7B74}, //9274 #CJK UNIFIED IDEOGRAPH + {0xDF4A, 0x7B69}, //9275 #CJK UNIFIED IDEOGRAPH + {0xDF4B, 0x7B72}, //9276 #CJK UNIFIED IDEOGRAPH + {0xDF4C, 0x7B65}, //9277 #CJK UNIFIED IDEOGRAPH + {0xDF4D, 0x7B73}, //9278 #CJK UNIFIED IDEOGRAPH + {0xDF4E, 0x7B71}, //9279 #CJK UNIFIED IDEOGRAPH + {0xDF4F, 0x7B70}, //9280 #CJK UNIFIED IDEOGRAPH + {0xDF50, 0x7B61}, //9281 #CJK UNIFIED IDEOGRAPH + {0xDF51, 0x7B78}, //9282 #CJK UNIFIED IDEOGRAPH + {0xDF52, 0x7B76}, //9283 #CJK UNIFIED IDEOGRAPH + {0xDF53, 0x7B63}, //9284 #CJK UNIFIED IDEOGRAPH + {0xDF54, 0x7CB2}, //9285 #CJK UNIFIED IDEOGRAPH + {0xDF55, 0x7CB4}, //9286 #CJK UNIFIED IDEOGRAPH + {0xDF56, 0x7CAF}, //9287 #CJK UNIFIED IDEOGRAPH + {0xDF57, 0x7D88}, //9288 #CJK UNIFIED IDEOGRAPH + {0xDF58, 0x7D86}, //9289 #CJK UNIFIED IDEOGRAPH + {0xDF59, 0x7D80}, //9290 #CJK UNIFIED IDEOGRAPH + {0xDF5A, 0x7D8D}, //9291 #CJK UNIFIED IDEOGRAPH + {0xDF5B, 0x7D7F}, //9292 #CJK UNIFIED IDEOGRAPH + {0xDF5C, 0x7D85}, //9293 #CJK UNIFIED IDEOGRAPH + {0xDF5D, 0x7D7A}, //9294 #CJK UNIFIED IDEOGRAPH + {0xDF5E, 0x7D8E}, //9295 #CJK UNIFIED IDEOGRAPH + {0xDF5F, 0x7D7B}, //9296 #CJK UNIFIED IDEOGRAPH + {0xDF60, 0x7D83}, //9297 #CJK UNIFIED IDEOGRAPH + {0xDF61, 0x7D7C}, //9298 #CJK UNIFIED IDEOGRAPH + {0xDF62, 0x7D8C}, //9299 #CJK UNIFIED IDEOGRAPH + {0xDF63, 0x7D94}, //9300 #CJK UNIFIED IDEOGRAPH + {0xDF64, 0x7D84}, //9301 #CJK UNIFIED IDEOGRAPH + {0xDF65, 0x7D7D}, //9302 #CJK UNIFIED IDEOGRAPH + {0xDF66, 0x7D92}, //9303 #CJK UNIFIED IDEOGRAPH + {0xDF67, 0x7F6D}, //9304 #CJK UNIFIED IDEOGRAPH + {0xDF68, 0x7F6B}, //9305 #CJK UNIFIED IDEOGRAPH + {0xDF69, 0x7F67}, //9306 #CJK UNIFIED IDEOGRAPH + {0xDF6A, 0x7F68}, //9307 #CJK UNIFIED IDEOGRAPH + {0xDF6B, 0x7F6C}, //9308 #CJK UNIFIED IDEOGRAPH + {0xDF6C, 0x7FA6}, //9309 #CJK UNIFIED IDEOGRAPH + {0xDF6D, 0x7FA5}, //9310 #CJK UNIFIED IDEOGRAPH + {0xDF6E, 0x7FA7}, //9311 #CJK UNIFIED IDEOGRAPH + {0xDF6F, 0x7FDB}, //9312 #CJK UNIFIED IDEOGRAPH + {0xDF70, 0x7FDC}, //9313 #CJK UNIFIED IDEOGRAPH + {0xDF71, 0x8021}, //9314 #CJK UNIFIED IDEOGRAPH + {0xDF72, 0x8164}, //9315 #CJK UNIFIED IDEOGRAPH + {0xDF73, 0x8160}, //9316 #CJK UNIFIED IDEOGRAPH + {0xDF74, 0x8177}, //9317 #CJK UNIFIED IDEOGRAPH + {0xDF75, 0x815C}, //9318 #CJK UNIFIED IDEOGRAPH + {0xDF76, 0x8169}, //9319 #CJK UNIFIED IDEOGRAPH + {0xDF77, 0x815B}, //9320 #CJK UNIFIED IDEOGRAPH + {0xDF78, 0x8162}, //9321 #CJK UNIFIED IDEOGRAPH + {0xDF79, 0x8172}, //9322 #CJK UNIFIED IDEOGRAPH + {0xDF7A, 0x6721}, //9323 #CJK UNIFIED IDEOGRAPH + {0xDF7B, 0x815E}, //9324 #CJK UNIFIED IDEOGRAPH + {0xDF7C, 0x8176}, //9325 #CJK UNIFIED IDEOGRAPH + {0xDF7D, 0x8167}, //9326 #CJK UNIFIED IDEOGRAPH + {0xDF7E, 0x816F}, //9327 #CJK UNIFIED IDEOGRAPH + {0xDFA1, 0x8144}, //9328 #CJK UNIFIED IDEOGRAPH + {0xDFA2, 0x8161}, //9329 #CJK UNIFIED IDEOGRAPH + {0xDFA3, 0x821D}, //9330 #CJK UNIFIED IDEOGRAPH + {0xDFA4, 0x8249}, //9331 #CJK UNIFIED IDEOGRAPH + {0xDFA5, 0x8244}, //9332 #CJK UNIFIED IDEOGRAPH + {0xDFA6, 0x8240}, //9333 #CJK UNIFIED IDEOGRAPH + {0xDFA7, 0x8242}, //9334 #CJK UNIFIED IDEOGRAPH + {0xDFA8, 0x8245}, //9335 #CJK UNIFIED IDEOGRAPH + {0xDFA9, 0x84F1}, //9336 #CJK UNIFIED IDEOGRAPH + {0xDFAA, 0x843F}, //9337 #CJK UNIFIED IDEOGRAPH + {0xDFAB, 0x8456}, //9338 #CJK UNIFIED IDEOGRAPH + {0xDFAC, 0x8476}, //9339 #CJK UNIFIED IDEOGRAPH + {0xDFAD, 0x8479}, //9340 #CJK UNIFIED IDEOGRAPH + {0xDFAE, 0x848F}, //9341 #CJK UNIFIED IDEOGRAPH + {0xDFAF, 0x848D}, //9342 #CJK UNIFIED IDEOGRAPH + {0xDFB0, 0x8465}, //9343 #CJK UNIFIED IDEOGRAPH + {0xDFB1, 0x8451}, //9344 #CJK UNIFIED IDEOGRAPH + {0xDFB2, 0x8440}, //9345 #CJK UNIFIED IDEOGRAPH + {0xDFB3, 0x8486}, //9346 #CJK UNIFIED IDEOGRAPH + {0xDFB4, 0x8467}, //9347 #CJK UNIFIED IDEOGRAPH + {0xDFB5, 0x8430}, //9348 #CJK UNIFIED IDEOGRAPH + {0xDFB6, 0x844D}, //9349 #CJK UNIFIED IDEOGRAPH + {0xDFB7, 0x847D}, //9350 #CJK UNIFIED IDEOGRAPH + {0xDFB8, 0x845A}, //9351 #CJK UNIFIED IDEOGRAPH + {0xDFB9, 0x8459}, //9352 #CJK UNIFIED IDEOGRAPH + {0xDFBA, 0x8474}, //9353 #CJK UNIFIED IDEOGRAPH + {0xDFBB, 0x8473}, //9354 #CJK UNIFIED IDEOGRAPH + {0xDFBC, 0x845D}, //9355 #CJK UNIFIED IDEOGRAPH + {0xDFBD, 0x8507}, //9356 #CJK UNIFIED IDEOGRAPH + {0xDFBE, 0x845E}, //9357 #CJK UNIFIED IDEOGRAPH + {0xDFBF, 0x8437}, //9358 #CJK UNIFIED IDEOGRAPH + {0xDFC0, 0x843A}, //9359 #CJK UNIFIED IDEOGRAPH + {0xDFC1, 0x8434}, //9360 #CJK UNIFIED IDEOGRAPH + {0xDFC2, 0x847A}, //9361 #CJK UNIFIED IDEOGRAPH + {0xDFC3, 0x8443}, //9362 #CJK UNIFIED IDEOGRAPH + {0xDFC4, 0x8478}, //9363 #CJK UNIFIED IDEOGRAPH + {0xDFC5, 0x8432}, //9364 #CJK UNIFIED IDEOGRAPH + {0xDFC6, 0x8445}, //9365 #CJK UNIFIED IDEOGRAPH + {0xDFC7, 0x8429}, //9366 #CJK UNIFIED IDEOGRAPH + {0xDFC8, 0x83D9}, //9367 #CJK UNIFIED IDEOGRAPH + {0xDFC9, 0x844B}, //9368 #CJK UNIFIED IDEOGRAPH + {0xDFCA, 0x842F}, //9369 #CJK UNIFIED IDEOGRAPH + {0xDFCB, 0x8442}, //9370 #CJK UNIFIED IDEOGRAPH + {0xDFCC, 0x842D}, //9371 #CJK UNIFIED IDEOGRAPH + {0xDFCD, 0x845F}, //9372 #CJK UNIFIED IDEOGRAPH + {0xDFCE, 0x8470}, //9373 #CJK UNIFIED IDEOGRAPH + {0xDFCF, 0x8439}, //9374 #CJK UNIFIED IDEOGRAPH + {0xDFD0, 0x844E}, //9375 #CJK UNIFIED IDEOGRAPH + {0xDFD1, 0x844C}, //9376 #CJK UNIFIED IDEOGRAPH + {0xDFD2, 0x8452}, //9377 #CJK UNIFIED IDEOGRAPH + {0xDFD3, 0x846F}, //9378 #CJK UNIFIED IDEOGRAPH + {0xDFD4, 0x84C5}, //9379 #CJK UNIFIED IDEOGRAPH + {0xDFD5, 0x848E}, //9380 #CJK UNIFIED IDEOGRAPH + {0xDFD6, 0x843B}, //9381 #CJK UNIFIED IDEOGRAPH + {0xDFD7, 0x8447}, //9382 #CJK UNIFIED IDEOGRAPH + {0xDFD8, 0x8436}, //9383 #CJK UNIFIED IDEOGRAPH + {0xDFD9, 0x8433}, //9384 #CJK UNIFIED IDEOGRAPH + {0xDFDA, 0x8468}, //9385 #CJK UNIFIED IDEOGRAPH + {0xDFDB, 0x847E}, //9386 #CJK UNIFIED IDEOGRAPH + {0xDFDC, 0x8444}, //9387 #CJK UNIFIED IDEOGRAPH + {0xDFDD, 0x842B}, //9388 #CJK UNIFIED IDEOGRAPH + {0xDFDE, 0x8460}, //9389 #CJK UNIFIED IDEOGRAPH + {0xDFDF, 0x8454}, //9390 #CJK UNIFIED IDEOGRAPH + {0xDFE0, 0x846E}, //9391 #CJK UNIFIED IDEOGRAPH + {0xDFE1, 0x8450}, //9392 #CJK UNIFIED IDEOGRAPH + {0xDFE2, 0x870B}, //9393 #CJK UNIFIED IDEOGRAPH + {0xDFE3, 0x8704}, //9394 #CJK UNIFIED IDEOGRAPH + {0xDFE4, 0x86F7}, //9395 #CJK UNIFIED IDEOGRAPH + {0xDFE5, 0x870C}, //9396 #CJK UNIFIED IDEOGRAPH + {0xDFE6, 0x86FA}, //9397 #CJK UNIFIED IDEOGRAPH + {0xDFE7, 0x86D6}, //9398 #CJK UNIFIED IDEOGRAPH + {0xDFE8, 0x86F5}, //9399 #CJK UNIFIED IDEOGRAPH + {0xDFE9, 0x874D}, //9400 #CJK UNIFIED IDEOGRAPH + {0xDFEA, 0x86F8}, //9401 #CJK UNIFIED IDEOGRAPH + {0xDFEB, 0x870E}, //9402 #CJK UNIFIED IDEOGRAPH + {0xDFEC, 0x8709}, //9403 #CJK UNIFIED IDEOGRAPH + {0xDFED, 0x8701}, //9404 #CJK UNIFIED IDEOGRAPH + {0xDFEE, 0x86F6}, //9405 #CJK UNIFIED IDEOGRAPH + {0xDFEF, 0x870D}, //9406 #CJK UNIFIED IDEOGRAPH + {0xDFF0, 0x8705}, //9407 #CJK UNIFIED IDEOGRAPH + {0xDFF1, 0x88D6}, //9408 #CJK UNIFIED IDEOGRAPH + {0xDFF2, 0x88CB}, //9409 #CJK UNIFIED IDEOGRAPH + {0xDFF3, 0x88CD}, //9410 #CJK UNIFIED IDEOGRAPH + {0xDFF4, 0x88CE}, //9411 #CJK UNIFIED IDEOGRAPH + {0xDFF5, 0x88DE}, //9412 #CJK UNIFIED IDEOGRAPH + {0xDFF6, 0x88DB}, //9413 #CJK UNIFIED IDEOGRAPH + {0xDFF7, 0x88DA}, //9414 #CJK UNIFIED IDEOGRAPH + {0xDFF8, 0x88CC}, //9415 #CJK UNIFIED IDEOGRAPH + {0xDFF9, 0x88D0}, //9416 #CJK UNIFIED IDEOGRAPH + {0xDFFA, 0x8985}, //9417 #CJK UNIFIED IDEOGRAPH + {0xDFFB, 0x899B}, //9418 #CJK UNIFIED IDEOGRAPH + {0xDFFC, 0x89DF}, //9419 #CJK UNIFIED IDEOGRAPH + {0xDFFD, 0x89E5}, //9420 #CJK UNIFIED IDEOGRAPH + {0xDFFE, 0x89E4}, //9421 #CJK UNIFIED IDEOGRAPH + {0xE040, 0x89E1}, //9422 #CJK UNIFIED IDEOGRAPH + {0xE041, 0x89E0}, //9423 #CJK UNIFIED IDEOGRAPH + {0xE042, 0x89E2}, //9424 #CJK UNIFIED IDEOGRAPH + {0xE043, 0x89DC}, //9425 #CJK UNIFIED IDEOGRAPH + {0xE044, 0x89E6}, //9426 #CJK UNIFIED IDEOGRAPH + {0xE045, 0x8A76}, //9427 #CJK UNIFIED IDEOGRAPH + {0xE046, 0x8A86}, //9428 #CJK UNIFIED IDEOGRAPH + {0xE047, 0x8A7F}, //9429 #CJK UNIFIED IDEOGRAPH + {0xE048, 0x8A61}, //9430 #CJK UNIFIED IDEOGRAPH + {0xE049, 0x8A3F}, //9431 #CJK UNIFIED IDEOGRAPH + {0xE04A, 0x8A77}, //9432 #CJK UNIFIED IDEOGRAPH + {0xE04B, 0x8A82}, //9433 #CJK UNIFIED IDEOGRAPH + {0xE04C, 0x8A84}, //9434 #CJK UNIFIED IDEOGRAPH + {0xE04D, 0x8A75}, //9435 #CJK UNIFIED IDEOGRAPH + {0xE04E, 0x8A83}, //9436 #CJK UNIFIED IDEOGRAPH + {0xE04F, 0x8A81}, //9437 #CJK UNIFIED IDEOGRAPH + {0xE050, 0x8A74}, //9438 #CJK UNIFIED IDEOGRAPH + {0xE051, 0x8A7A}, //9439 #CJK UNIFIED IDEOGRAPH + {0xE052, 0x8C3C}, //9440 #CJK UNIFIED IDEOGRAPH + {0xE053, 0x8C4B}, //9441 #CJK UNIFIED IDEOGRAPH + {0xE054, 0x8C4A}, //9442 #CJK UNIFIED IDEOGRAPH + {0xE055, 0x8C65}, //9443 #CJK UNIFIED IDEOGRAPH + {0xE056, 0x8C64}, //9444 #CJK UNIFIED IDEOGRAPH + {0xE057, 0x8C66}, //9445 #CJK UNIFIED IDEOGRAPH + {0xE058, 0x8C86}, //9446 #CJK UNIFIED IDEOGRAPH + {0xE059, 0x8C84}, //9447 #CJK UNIFIED IDEOGRAPH + {0xE05A, 0x8C85}, //9448 #CJK UNIFIED IDEOGRAPH + {0xE05B, 0x8CCC}, //9449 #CJK UNIFIED IDEOGRAPH + {0xE05C, 0x8D68}, //9450 #CJK UNIFIED IDEOGRAPH + {0xE05D, 0x8D69}, //9451 #CJK UNIFIED IDEOGRAPH + {0xE05E, 0x8D91}, //9452 #CJK UNIFIED IDEOGRAPH + {0xE05F, 0x8D8C}, //9453 #CJK UNIFIED IDEOGRAPH + {0xE060, 0x8D8E}, //9454 #CJK UNIFIED IDEOGRAPH + {0xE061, 0x8D8F}, //9455 #CJK UNIFIED IDEOGRAPH + {0xE062, 0x8D8D}, //9456 #CJK UNIFIED IDEOGRAPH + {0xE063, 0x8D93}, //9457 #CJK UNIFIED IDEOGRAPH + {0xE064, 0x8D94}, //9458 #CJK UNIFIED IDEOGRAPH + {0xE065, 0x8D90}, //9459 #CJK UNIFIED IDEOGRAPH + {0xE066, 0x8D92}, //9460 #CJK UNIFIED IDEOGRAPH + {0xE067, 0x8DF0}, //9461 #CJK UNIFIED IDEOGRAPH + {0xE068, 0x8DE0}, //9462 #CJK UNIFIED IDEOGRAPH + {0xE069, 0x8DEC}, //9463 #CJK UNIFIED IDEOGRAPH + {0xE06A, 0x8DF1}, //9464 #CJK UNIFIED IDEOGRAPH + {0xE06B, 0x8DEE}, //9465 #CJK UNIFIED IDEOGRAPH + {0xE06C, 0x8DD0}, //9466 #CJK UNIFIED IDEOGRAPH + {0xE06D, 0x8DE9}, //9467 #CJK UNIFIED IDEOGRAPH + {0xE06E, 0x8DE3}, //9468 #CJK UNIFIED IDEOGRAPH + {0xE06F, 0x8DE2}, //9469 #CJK UNIFIED IDEOGRAPH + {0xE070, 0x8DE7}, //9470 #CJK UNIFIED IDEOGRAPH + {0xE071, 0x8DF2}, //9471 #CJK UNIFIED IDEOGRAPH + {0xE072, 0x8DEB}, //9472 #CJK UNIFIED IDEOGRAPH + {0xE073, 0x8DF4}, //9473 #CJK UNIFIED IDEOGRAPH + {0xE074, 0x8F06}, //9474 #CJK UNIFIED IDEOGRAPH + {0xE075, 0x8EFF}, //9475 #CJK UNIFIED IDEOGRAPH + {0xE076, 0x8F01}, //9476 #CJK UNIFIED IDEOGRAPH + {0xE077, 0x8F00}, //9477 #CJK UNIFIED IDEOGRAPH + {0xE078, 0x8F05}, //9478 #CJK UNIFIED IDEOGRAPH + {0xE079, 0x8F07}, //9479 #CJK UNIFIED IDEOGRAPH + {0xE07A, 0x8F08}, //9480 #CJK UNIFIED IDEOGRAPH + {0xE07B, 0x8F02}, //9481 #CJK UNIFIED IDEOGRAPH + {0xE07C, 0x8F0B}, //9482 #CJK UNIFIED IDEOGRAPH + {0xE07D, 0x9052}, //9483 #CJK UNIFIED IDEOGRAPH + {0xE07E, 0x903F}, //9484 #CJK UNIFIED IDEOGRAPH + {0xE0A1, 0x9044}, //9485 #CJK UNIFIED IDEOGRAPH + {0xE0A2, 0x9049}, //9486 #CJK UNIFIED IDEOGRAPH + {0xE0A3, 0x903D}, //9487 #CJK UNIFIED IDEOGRAPH + {0xE0A4, 0x9110}, //9488 #CJK UNIFIED IDEOGRAPH + {0xE0A5, 0x910D}, //9489 #CJK UNIFIED IDEOGRAPH + {0xE0A6, 0x910F}, //9490 #CJK UNIFIED IDEOGRAPH + {0xE0A7, 0x9111}, //9491 #CJK UNIFIED IDEOGRAPH + {0xE0A8, 0x9116}, //9492 #CJK UNIFIED IDEOGRAPH + {0xE0A9, 0x9114}, //9493 #CJK UNIFIED IDEOGRAPH + {0xE0AA, 0x910B}, //9494 #CJK UNIFIED IDEOGRAPH + {0xE0AB, 0x910E}, //9495 #CJK UNIFIED IDEOGRAPH + {0xE0AC, 0x916E}, //9496 #CJK UNIFIED IDEOGRAPH + {0xE0AD, 0x916F}, //9497 #CJK UNIFIED IDEOGRAPH + {0xE0AE, 0x9248}, //9498 #CJK UNIFIED IDEOGRAPH + {0xE0AF, 0x9252}, //9499 #CJK UNIFIED IDEOGRAPH + {0xE0B0, 0x9230}, //9500 #CJK UNIFIED IDEOGRAPH + {0xE0B1, 0x923A}, //9501 #CJK UNIFIED IDEOGRAPH + {0xE0B2, 0x9266}, //9502 #CJK UNIFIED IDEOGRAPH + {0xE0B3, 0x9233}, //9503 #CJK UNIFIED IDEOGRAPH + {0xE0B4, 0x9265}, //9504 #CJK UNIFIED IDEOGRAPH + {0xE0B5, 0x925E}, //9505 #CJK UNIFIED IDEOGRAPH + {0xE0B6, 0x9283}, //9506 #CJK UNIFIED IDEOGRAPH + {0xE0B7, 0x922E}, //9507 #CJK UNIFIED IDEOGRAPH + {0xE0B8, 0x924A}, //9508 #CJK UNIFIED IDEOGRAPH + {0xE0B9, 0x9246}, //9509 #CJK UNIFIED IDEOGRAPH + {0xE0BA, 0x926D}, //9510 #CJK UNIFIED IDEOGRAPH + {0xE0BB, 0x926C}, //9511 #CJK UNIFIED IDEOGRAPH + {0xE0BC, 0x924F}, //9512 #CJK UNIFIED IDEOGRAPH + {0xE0BD, 0x9260}, //9513 #CJK UNIFIED IDEOGRAPH + {0xE0BE, 0x9267}, //9514 #CJK UNIFIED IDEOGRAPH + {0xE0BF, 0x926F}, //9515 #CJK UNIFIED IDEOGRAPH + {0xE0C0, 0x9236}, //9516 #CJK UNIFIED IDEOGRAPH + {0xE0C1, 0x9261}, //9517 #CJK UNIFIED IDEOGRAPH + {0xE0C2, 0x9270}, //9518 #CJK UNIFIED IDEOGRAPH + {0xE0C3, 0x9231}, //9519 #CJK UNIFIED IDEOGRAPH + {0xE0C4, 0x9254}, //9520 #CJK UNIFIED IDEOGRAPH + {0xE0C5, 0x9263}, //9521 #CJK UNIFIED IDEOGRAPH + {0xE0C6, 0x9250}, //9522 #CJK UNIFIED IDEOGRAPH + {0xE0C7, 0x9272}, //9523 #CJK UNIFIED IDEOGRAPH + {0xE0C8, 0x924E}, //9524 #CJK UNIFIED IDEOGRAPH + {0xE0C9, 0x9253}, //9525 #CJK UNIFIED IDEOGRAPH + {0xE0CA, 0x924C}, //9526 #CJK UNIFIED IDEOGRAPH + {0xE0CB, 0x9256}, //9527 #CJK UNIFIED IDEOGRAPH + {0xE0CC, 0x9232}, //9528 #CJK UNIFIED IDEOGRAPH + {0xE0CD, 0x959F}, //9529 #CJK UNIFIED IDEOGRAPH + {0xE0CE, 0x959C}, //9530 #CJK UNIFIED IDEOGRAPH + {0xE0CF, 0x959E}, //9531 #CJK UNIFIED IDEOGRAPH + {0xE0D0, 0x959B}, //9532 #CJK UNIFIED IDEOGRAPH + {0xE0D1, 0x9692}, //9533 #CJK UNIFIED IDEOGRAPH + {0xE0D2, 0x9693}, //9534 #CJK UNIFIED IDEOGRAPH + {0xE0D3, 0x9691}, //9535 #CJK UNIFIED IDEOGRAPH + {0xE0D4, 0x9697}, //9536 #CJK UNIFIED IDEOGRAPH + {0xE0D5, 0x96CE}, //9537 #CJK UNIFIED IDEOGRAPH + {0xE0D6, 0x96FA}, //9538 #CJK UNIFIED IDEOGRAPH + {0xE0D7, 0x96FD}, //9539 #CJK UNIFIED IDEOGRAPH + {0xE0D8, 0x96F8}, //9540 #CJK UNIFIED IDEOGRAPH + {0xE0D9, 0x96F5}, //9541 #CJK UNIFIED IDEOGRAPH + {0xE0DA, 0x9773}, //9542 #CJK UNIFIED IDEOGRAPH + {0xE0DB, 0x9777}, //9543 #CJK UNIFIED IDEOGRAPH + {0xE0DC, 0x9778}, //9544 #CJK UNIFIED IDEOGRAPH + {0xE0DD, 0x9772}, //9545 #CJK UNIFIED IDEOGRAPH + {0xE0DE, 0x980F}, //9546 #CJK UNIFIED IDEOGRAPH + {0xE0DF, 0x980D}, //9547 #CJK UNIFIED IDEOGRAPH + {0xE0E0, 0x980E}, //9548 #CJK UNIFIED IDEOGRAPH + {0xE0E1, 0x98AC}, //9549 #CJK UNIFIED IDEOGRAPH + {0xE0E2, 0x98F6}, //9550 #CJK UNIFIED IDEOGRAPH + {0xE0E3, 0x98F9}, //9551 #CJK UNIFIED IDEOGRAPH + {0xE0E4, 0x99AF}, //9552 #CJK UNIFIED IDEOGRAPH + {0xE0E5, 0x99B2}, //9553 #CJK UNIFIED IDEOGRAPH + {0xE0E6, 0x99B0}, //9554 #CJK UNIFIED IDEOGRAPH + {0xE0E7, 0x99B5}, //9555 #CJK UNIFIED IDEOGRAPH + {0xE0E8, 0x9AAD}, //9556 #CJK UNIFIED IDEOGRAPH + {0xE0E9, 0x9AAB}, //9557 #CJK UNIFIED IDEOGRAPH + {0xE0EA, 0x9B5B}, //9558 #CJK UNIFIED IDEOGRAPH + {0xE0EB, 0x9CEA}, //9559 #CJK UNIFIED IDEOGRAPH + {0xE0EC, 0x9CED}, //9560 #CJK UNIFIED IDEOGRAPH + {0xE0ED, 0x9CE7}, //9561 #CJK UNIFIED IDEOGRAPH + {0xE0EE, 0x9E80}, //9562 #CJK UNIFIED IDEOGRAPH + {0xE0EF, 0x9EFD}, //9563 #CJK UNIFIED IDEOGRAPH + {0xE0F0, 0x50E6}, //9564 #CJK UNIFIED IDEOGRAPH + {0xE0F1, 0x50D4}, //9565 #CJK UNIFIED IDEOGRAPH + {0xE0F2, 0x50D7}, //9566 #CJK UNIFIED IDEOGRAPH + {0xE0F3, 0x50E8}, //9567 #CJK UNIFIED IDEOGRAPH + {0xE0F4, 0x50F3}, //9568 #CJK UNIFIED IDEOGRAPH + {0xE0F5, 0x50DB}, //9569 #CJK UNIFIED IDEOGRAPH + {0xE0F6, 0x50EA}, //9570 #CJK UNIFIED IDEOGRAPH + {0xE0F7, 0x50DD}, //9571 #CJK UNIFIED IDEOGRAPH + {0xE0F8, 0x50E4}, //9572 #CJK UNIFIED IDEOGRAPH + {0xE0F9, 0x50D3}, //9573 #CJK UNIFIED IDEOGRAPH + {0xE0FA, 0x50EC}, //9574 #CJK UNIFIED IDEOGRAPH + {0xE0FB, 0x50F0}, //9575 #CJK UNIFIED IDEOGRAPH + {0xE0FC, 0x50EF}, //9576 #CJK UNIFIED IDEOGRAPH + {0xE0FD, 0x50E3}, //9577 #CJK UNIFIED IDEOGRAPH + {0xE0FE, 0x50E0}, //9578 #CJK UNIFIED IDEOGRAPH + {0xE140, 0x51D8}, //9579 #CJK UNIFIED IDEOGRAPH + {0xE141, 0x5280}, //9580 #CJK UNIFIED IDEOGRAPH + {0xE142, 0x5281}, //9581 #CJK UNIFIED IDEOGRAPH + {0xE143, 0x52E9}, //9582 #CJK UNIFIED IDEOGRAPH + {0xE144, 0x52EB}, //9583 #CJK UNIFIED IDEOGRAPH + {0xE145, 0x5330}, //9584 #CJK UNIFIED IDEOGRAPH + {0xE146, 0x53AC}, //9585 #CJK UNIFIED IDEOGRAPH + {0xE147, 0x5627}, //9586 #CJK UNIFIED IDEOGRAPH + {0xE148, 0x5615}, //9587 #CJK UNIFIED IDEOGRAPH + {0xE149, 0x560C}, //9588 #CJK UNIFIED IDEOGRAPH + {0xE14A, 0x5612}, //9589 #CJK UNIFIED IDEOGRAPH + {0xE14B, 0x55FC}, //9590 #CJK UNIFIED IDEOGRAPH + {0xE14C, 0x560F}, //9591 #CJK UNIFIED IDEOGRAPH + {0xE14D, 0x561C}, //9592 #CJK UNIFIED IDEOGRAPH + {0xE14E, 0x5601}, //9593 #CJK UNIFIED IDEOGRAPH + {0xE14F, 0x5613}, //9594 #CJK UNIFIED IDEOGRAPH + {0xE150, 0x5602}, //9595 #CJK UNIFIED IDEOGRAPH + {0xE151, 0x55FA}, //9596 #CJK UNIFIED IDEOGRAPH + {0xE152, 0x561D}, //9597 #CJK UNIFIED IDEOGRAPH + {0xE153, 0x5604}, //9598 #CJK UNIFIED IDEOGRAPH + {0xE154, 0x55FF}, //9599 #CJK UNIFIED IDEOGRAPH + {0xE155, 0x55F9}, //9600 #CJK UNIFIED IDEOGRAPH + {0xE156, 0x5889}, //9601 #CJK UNIFIED IDEOGRAPH + {0xE157, 0x587C}, //9602 #CJK UNIFIED IDEOGRAPH + {0xE158, 0x5890}, //9603 #CJK UNIFIED IDEOGRAPH + {0xE159, 0x5898}, //9604 #CJK UNIFIED IDEOGRAPH + {0xE15A, 0x5886}, //9605 #CJK UNIFIED IDEOGRAPH + {0xE15B, 0x5881}, //9606 #CJK UNIFIED IDEOGRAPH + {0xE15C, 0x587F}, //9607 #CJK UNIFIED IDEOGRAPH + {0xE15D, 0x5874}, //9608 #CJK UNIFIED IDEOGRAPH + {0xE15E, 0x588B}, //9609 #CJK UNIFIED IDEOGRAPH + {0xE15F, 0x587A}, //9610 #CJK UNIFIED IDEOGRAPH + {0xE160, 0x5887}, //9611 #CJK UNIFIED IDEOGRAPH + {0xE161, 0x5891}, //9612 #CJK UNIFIED IDEOGRAPH + {0xE162, 0x588E}, //9613 #CJK UNIFIED IDEOGRAPH + {0xE163, 0x5876}, //9614 #CJK UNIFIED IDEOGRAPH + {0xE164, 0x5882}, //9615 #CJK UNIFIED IDEOGRAPH + {0xE165, 0x5888}, //9616 #CJK UNIFIED IDEOGRAPH + {0xE166, 0x587B}, //9617 #CJK UNIFIED IDEOGRAPH + {0xE167, 0x5894}, //9618 #CJK UNIFIED IDEOGRAPH + {0xE168, 0x588F}, //9619 #CJK UNIFIED IDEOGRAPH + {0xE169, 0x58FE}, //9620 #CJK UNIFIED IDEOGRAPH + {0xE16A, 0x596B}, //9621 #CJK UNIFIED IDEOGRAPH + {0xE16B, 0x5ADC}, //9622 #CJK UNIFIED IDEOGRAPH + {0xE16C, 0x5AEE}, //9623 #CJK UNIFIED IDEOGRAPH + {0xE16D, 0x5AE5}, //9624 #CJK UNIFIED IDEOGRAPH + {0xE16E, 0x5AD5}, //9625 #CJK UNIFIED IDEOGRAPH + {0xE16F, 0x5AEA}, //9626 #CJK UNIFIED IDEOGRAPH + {0xE170, 0x5ADA}, //9627 #CJK UNIFIED IDEOGRAPH + {0xE171, 0x5AED}, //9628 #CJK UNIFIED IDEOGRAPH + {0xE172, 0x5AEB}, //9629 #CJK UNIFIED IDEOGRAPH + {0xE173, 0x5AF3}, //9630 #CJK UNIFIED IDEOGRAPH + {0xE174, 0x5AE2}, //9631 #CJK UNIFIED IDEOGRAPH + {0xE175, 0x5AE0}, //9632 #CJK UNIFIED IDEOGRAPH + {0xE176, 0x5ADB}, //9633 #CJK UNIFIED IDEOGRAPH + {0xE177, 0x5AEC}, //9634 #CJK UNIFIED IDEOGRAPH + {0xE178, 0x5ADE}, //9635 #CJK UNIFIED IDEOGRAPH + {0xE179, 0x5ADD}, //9636 #CJK UNIFIED IDEOGRAPH + {0xE17A, 0x5AD9}, //9637 #CJK UNIFIED IDEOGRAPH + {0xE17B, 0x5AE8}, //9638 #CJK UNIFIED IDEOGRAPH + {0xE17C, 0x5ADF}, //9639 #CJK UNIFIED IDEOGRAPH + {0xE17D, 0x5B77}, //9640 #CJK UNIFIED IDEOGRAPH + {0xE17E, 0x5BE0}, //9641 #CJK UNIFIED IDEOGRAPH + {0xE1A1, 0x5BE3}, //9642 #CJK UNIFIED IDEOGRAPH + {0xE1A2, 0x5C63}, //9643 #CJK UNIFIED IDEOGRAPH + {0xE1A3, 0x5D82}, //9644 #CJK UNIFIED IDEOGRAPH + {0xE1A4, 0x5D80}, //9645 #CJK UNIFIED IDEOGRAPH + {0xE1A5, 0x5D7D}, //9646 #CJK UNIFIED IDEOGRAPH + {0xE1A6, 0x5D86}, //9647 #CJK UNIFIED IDEOGRAPH + {0xE1A7, 0x5D7A}, //9648 #CJK UNIFIED IDEOGRAPH + {0xE1A8, 0x5D81}, //9649 #CJK UNIFIED IDEOGRAPH + {0xE1A9, 0x5D77}, //9650 #CJK UNIFIED IDEOGRAPH + {0xE1AA, 0x5D8A}, //9651 #CJK UNIFIED IDEOGRAPH + {0xE1AB, 0x5D89}, //9652 #CJK UNIFIED IDEOGRAPH + {0xE1AC, 0x5D88}, //9653 #CJK UNIFIED IDEOGRAPH + {0xE1AD, 0x5D7E}, //9654 #CJK UNIFIED IDEOGRAPH + {0xE1AE, 0x5D7C}, //9655 #CJK UNIFIED IDEOGRAPH + {0xE1AF, 0x5D8D}, //9656 #CJK UNIFIED IDEOGRAPH + {0xE1B0, 0x5D79}, //9657 #CJK UNIFIED IDEOGRAPH + {0xE1B1, 0x5D7F}, //9658 #CJK UNIFIED IDEOGRAPH + {0xE1B2, 0x5E58}, //9659 #CJK UNIFIED IDEOGRAPH + {0xE1B3, 0x5E59}, //9660 #CJK UNIFIED IDEOGRAPH + {0xE1B4, 0x5E53}, //9661 #CJK UNIFIED IDEOGRAPH + {0xE1B5, 0x5ED8}, //9662 #CJK UNIFIED IDEOGRAPH + {0xE1B6, 0x5ED1}, //9663 #CJK UNIFIED IDEOGRAPH + {0xE1B7, 0x5ED7}, //9664 #CJK UNIFIED IDEOGRAPH + {0xE1B8, 0x5ECE}, //9665 #CJK UNIFIED IDEOGRAPH + {0xE1B9, 0x5EDC}, //9666 #CJK UNIFIED IDEOGRAPH + {0xE1BA, 0x5ED5}, //9667 #CJK UNIFIED IDEOGRAPH + {0xE1BB, 0x5ED9}, //9668 #CJK UNIFIED IDEOGRAPH + {0xE1BC, 0x5ED2}, //9669 #CJK UNIFIED IDEOGRAPH + {0xE1BD, 0x5ED4}, //9670 #CJK UNIFIED IDEOGRAPH + {0xE1BE, 0x5F44}, //9671 #CJK UNIFIED IDEOGRAPH + {0xE1BF, 0x5F43}, //9672 #CJK UNIFIED IDEOGRAPH + {0xE1C0, 0x5F6F}, //9673 #CJK UNIFIED IDEOGRAPH + {0xE1C1, 0x5FB6}, //9674 #CJK UNIFIED IDEOGRAPH + {0xE1C2, 0x612C}, //9675 #CJK UNIFIED IDEOGRAPH + {0xE1C3, 0x6128}, //9676 #CJK UNIFIED IDEOGRAPH + {0xE1C4, 0x6141}, //9677 #CJK UNIFIED IDEOGRAPH + {0xE1C5, 0x615E}, //9678 #CJK UNIFIED IDEOGRAPH + {0xE1C6, 0x6171}, //9679 #CJK UNIFIED IDEOGRAPH + {0xE1C7, 0x6173}, //9680 #CJK UNIFIED IDEOGRAPH + {0xE1C8, 0x6152}, //9681 #CJK UNIFIED IDEOGRAPH + {0xE1C9, 0x6153}, //9682 #CJK UNIFIED IDEOGRAPH + {0xE1CA, 0x6172}, //9683 #CJK UNIFIED IDEOGRAPH + {0xE1CB, 0x616C}, //9684 #CJK UNIFIED IDEOGRAPH + {0xE1CC, 0x6180}, //9685 #CJK UNIFIED IDEOGRAPH + {0xE1CD, 0x6174}, //9686 #CJK UNIFIED IDEOGRAPH + {0xE1CE, 0x6154}, //9687 #CJK UNIFIED IDEOGRAPH + {0xE1CF, 0x617A}, //9688 #CJK UNIFIED IDEOGRAPH + {0xE1D0, 0x615B}, //9689 #CJK UNIFIED IDEOGRAPH + {0xE1D1, 0x6165}, //9690 #CJK UNIFIED IDEOGRAPH + {0xE1D2, 0x613B}, //9691 #CJK UNIFIED IDEOGRAPH + {0xE1D3, 0x616A}, //9692 #CJK UNIFIED IDEOGRAPH + {0xE1D4, 0x6161}, //9693 #CJK UNIFIED IDEOGRAPH + {0xE1D5, 0x6156}, //9694 #CJK UNIFIED IDEOGRAPH + {0xE1D6, 0x6229}, //9695 #CJK UNIFIED IDEOGRAPH + {0xE1D7, 0x6227}, //9696 #CJK UNIFIED IDEOGRAPH + {0xE1D8, 0x622B}, //9697 #CJK UNIFIED IDEOGRAPH + {0xE1D9, 0x642B}, //9698 #CJK UNIFIED IDEOGRAPH + {0xE1DA, 0x644D}, //9699 #CJK UNIFIED IDEOGRAPH + {0xE1DB, 0x645B}, //9700 #CJK UNIFIED IDEOGRAPH + {0xE1DC, 0x645D}, //9701 #CJK UNIFIED IDEOGRAPH + {0xE1DD, 0x6474}, //9702 #CJK UNIFIED IDEOGRAPH + {0xE1DE, 0x6476}, //9703 #CJK UNIFIED IDEOGRAPH + {0xE1DF, 0x6472}, //9704 #CJK UNIFIED IDEOGRAPH + {0xE1E0, 0x6473}, //9705 #CJK UNIFIED IDEOGRAPH + {0xE1E1, 0x647D}, //9706 #CJK UNIFIED IDEOGRAPH + {0xE1E2, 0x6475}, //9707 #CJK UNIFIED IDEOGRAPH + {0xE1E3, 0x6466}, //9708 #CJK UNIFIED IDEOGRAPH + {0xE1E4, 0x64A6}, //9709 #CJK UNIFIED IDEOGRAPH + {0xE1E5, 0x644E}, //9710 #CJK UNIFIED IDEOGRAPH + {0xE1E6, 0x6482}, //9711 #CJK UNIFIED IDEOGRAPH + {0xE1E7, 0x645E}, //9712 #CJK UNIFIED IDEOGRAPH + {0xE1E8, 0x645C}, //9713 #CJK UNIFIED IDEOGRAPH + {0xE1E9, 0x644B}, //9714 #CJK UNIFIED IDEOGRAPH + {0xE1EA, 0x6453}, //9715 #CJK UNIFIED IDEOGRAPH + {0xE1EB, 0x6460}, //9716 #CJK UNIFIED IDEOGRAPH + {0xE1EC, 0x6450}, //9717 #CJK UNIFIED IDEOGRAPH + {0xE1ED, 0x647F}, //9718 #CJK UNIFIED IDEOGRAPH + {0xE1EE, 0x643F}, //9719 #CJK UNIFIED IDEOGRAPH + {0xE1EF, 0x646C}, //9720 #CJK UNIFIED IDEOGRAPH + {0xE1F0, 0x646B}, //9721 #CJK UNIFIED IDEOGRAPH + {0xE1F1, 0x6459}, //9722 #CJK UNIFIED IDEOGRAPH + {0xE1F2, 0x6465}, //9723 #CJK UNIFIED IDEOGRAPH + {0xE1F3, 0x6477}, //9724 #CJK UNIFIED IDEOGRAPH + {0xE1F4, 0x6573}, //9725 #CJK UNIFIED IDEOGRAPH + {0xE1F5, 0x65A0}, //9726 #CJK UNIFIED IDEOGRAPH + {0xE1F6, 0x66A1}, //9727 #CJK UNIFIED IDEOGRAPH + {0xE1F7, 0x66A0}, //9728 #CJK UNIFIED IDEOGRAPH + {0xE1F8, 0x669F}, //9729 #CJK UNIFIED IDEOGRAPH + {0xE1F9, 0x6705}, //9730 #CJK UNIFIED IDEOGRAPH + {0xE1FA, 0x6704}, //9731 #CJK UNIFIED IDEOGRAPH + {0xE1FB, 0x6722}, //9732 #CJK UNIFIED IDEOGRAPH + {0xE1FC, 0x69B1}, //9733 #CJK UNIFIED IDEOGRAPH + {0xE1FD, 0x69B6}, //9734 #CJK UNIFIED IDEOGRAPH + {0xE1FE, 0x69C9}, //9735 #CJK UNIFIED IDEOGRAPH + {0xE240, 0x69A0}, //9736 #CJK UNIFIED IDEOGRAPH + {0xE241, 0x69CE}, //9737 #CJK UNIFIED IDEOGRAPH + {0xE242, 0x6996}, //9738 #CJK UNIFIED IDEOGRAPH + {0xE243, 0x69B0}, //9739 #CJK UNIFIED IDEOGRAPH + {0xE244, 0x69AC}, //9740 #CJK UNIFIED IDEOGRAPH + {0xE245, 0x69BC}, //9741 #CJK UNIFIED IDEOGRAPH + {0xE246, 0x6991}, //9742 #CJK UNIFIED IDEOGRAPH + {0xE247, 0x6999}, //9743 #CJK UNIFIED IDEOGRAPH + {0xE248, 0x698E}, //9744 #CJK UNIFIED IDEOGRAPH + {0xE249, 0x69A7}, //9745 #CJK UNIFIED IDEOGRAPH + {0xE24A, 0x698D}, //9746 #CJK UNIFIED IDEOGRAPH + {0xE24B, 0x69A9}, //9747 #CJK UNIFIED IDEOGRAPH + {0xE24C, 0x69BE}, //9748 #CJK UNIFIED IDEOGRAPH + {0xE24D, 0x69AF}, //9749 #CJK UNIFIED IDEOGRAPH + {0xE24E, 0x69BF}, //9750 #CJK UNIFIED IDEOGRAPH + {0xE24F, 0x69C4}, //9751 #CJK UNIFIED IDEOGRAPH + {0xE250, 0x69BD}, //9752 #CJK UNIFIED IDEOGRAPH + {0xE251, 0x69A4}, //9753 #CJK UNIFIED IDEOGRAPH + {0xE252, 0x69D4}, //9754 #CJK UNIFIED IDEOGRAPH + {0xE253, 0x69B9}, //9755 #CJK UNIFIED IDEOGRAPH + {0xE254, 0x69CA}, //9756 #CJK UNIFIED IDEOGRAPH + {0xE255, 0x699A}, //9757 #CJK UNIFIED IDEOGRAPH + {0xE256, 0x69CF}, //9758 #CJK UNIFIED IDEOGRAPH + {0xE257, 0x69B3}, //9759 #CJK UNIFIED IDEOGRAPH + {0xE258, 0x6993}, //9760 #CJK UNIFIED IDEOGRAPH + {0xE259, 0x69AA}, //9761 #CJK UNIFIED IDEOGRAPH + {0xE25A, 0x69A1}, //9762 #CJK UNIFIED IDEOGRAPH + {0xE25B, 0x699E}, //9763 #CJK UNIFIED IDEOGRAPH + {0xE25C, 0x69D9}, //9764 #CJK UNIFIED IDEOGRAPH + {0xE25D, 0x6997}, //9765 #CJK UNIFIED IDEOGRAPH + {0xE25E, 0x6990}, //9766 #CJK UNIFIED IDEOGRAPH + {0xE25F, 0x69C2}, //9767 #CJK UNIFIED IDEOGRAPH + {0xE260, 0x69B5}, //9768 #CJK UNIFIED IDEOGRAPH + {0xE261, 0x69A5}, //9769 #CJK UNIFIED IDEOGRAPH + {0xE262, 0x69C6}, //9770 #CJK UNIFIED IDEOGRAPH + {0xE263, 0x6B4A}, //9771 #CJK UNIFIED IDEOGRAPH + {0xE264, 0x6B4D}, //9772 #CJK UNIFIED IDEOGRAPH + {0xE265, 0x6B4B}, //9773 #CJK UNIFIED IDEOGRAPH + {0xE266, 0x6B9E}, //9774 #CJK UNIFIED IDEOGRAPH + {0xE267, 0x6B9F}, //9775 #CJK UNIFIED IDEOGRAPH + {0xE268, 0x6BA0}, //9776 #CJK UNIFIED IDEOGRAPH + {0xE269, 0x6BC3}, //9777 #CJK UNIFIED IDEOGRAPH + {0xE26A, 0x6BC4}, //9778 #CJK UNIFIED IDEOGRAPH + {0xE26B, 0x6BFE}, //9779 #CJK UNIFIED IDEOGRAPH + {0xE26C, 0x6ECE}, //9780 #CJK UNIFIED IDEOGRAPH + {0xE26D, 0x6EF5}, //9781 #CJK UNIFIED IDEOGRAPH + {0xE26E, 0x6EF1}, //9782 #CJK UNIFIED IDEOGRAPH + {0xE26F, 0x6F03}, //9783 #CJK UNIFIED IDEOGRAPH + {0xE270, 0x6F25}, //9784 #CJK UNIFIED IDEOGRAPH + {0xE271, 0x6EF8}, //9785 #CJK UNIFIED IDEOGRAPH + {0xE272, 0x6F37}, //9786 #CJK UNIFIED IDEOGRAPH + {0xE273, 0x6EFB}, //9787 #CJK UNIFIED IDEOGRAPH + {0xE274, 0x6F2E}, //9788 #CJK UNIFIED IDEOGRAPH + {0xE275, 0x6F09}, //9789 #CJK UNIFIED IDEOGRAPH + {0xE276, 0x6F4E}, //9790 #CJK UNIFIED IDEOGRAPH + {0xE277, 0x6F19}, //9791 #CJK UNIFIED IDEOGRAPH + {0xE278, 0x6F1A}, //9792 #CJK UNIFIED IDEOGRAPH + {0xE279, 0x6F27}, //9793 #CJK UNIFIED IDEOGRAPH + {0xE27A, 0x6F18}, //9794 #CJK UNIFIED IDEOGRAPH + {0xE27B, 0x6F3B}, //9795 #CJK UNIFIED IDEOGRAPH + {0xE27C, 0x6F12}, //9796 #CJK UNIFIED IDEOGRAPH + {0xE27D, 0x6EED}, //9797 #CJK UNIFIED IDEOGRAPH + {0xE27E, 0x6F0A}, //9798 #CJK UNIFIED IDEOGRAPH + {0xE2A1, 0x6F36}, //9799 #CJK UNIFIED IDEOGRAPH + {0xE2A2, 0x6F73}, //9800 #CJK UNIFIED IDEOGRAPH + {0xE2A3, 0x6EF9}, //9801 #CJK UNIFIED IDEOGRAPH + {0xE2A4, 0x6EEE}, //9802 #CJK UNIFIED IDEOGRAPH + {0xE2A5, 0x6F2D}, //9803 #CJK UNIFIED IDEOGRAPH + {0xE2A6, 0x6F40}, //9804 #CJK UNIFIED IDEOGRAPH + {0xE2A7, 0x6F30}, //9805 #CJK UNIFIED IDEOGRAPH + {0xE2A8, 0x6F3C}, //9806 #CJK UNIFIED IDEOGRAPH + {0xE2A9, 0x6F35}, //9807 #CJK UNIFIED IDEOGRAPH + {0xE2AA, 0x6EEB}, //9808 #CJK UNIFIED IDEOGRAPH + {0xE2AB, 0x6F07}, //9809 #CJK UNIFIED IDEOGRAPH + {0xE2AC, 0x6F0E}, //9810 #CJK UNIFIED IDEOGRAPH + {0xE2AD, 0x6F43}, //9811 #CJK UNIFIED IDEOGRAPH + {0xE2AE, 0x6F05}, //9812 #CJK UNIFIED IDEOGRAPH + {0xE2AF, 0x6EFD}, //9813 #CJK UNIFIED IDEOGRAPH + {0xE2B0, 0x6EF6}, //9814 #CJK UNIFIED IDEOGRAPH + {0xE2B1, 0x6F39}, //9815 #CJK UNIFIED IDEOGRAPH + {0xE2B2, 0x6F1C}, //9816 #CJK UNIFIED IDEOGRAPH + {0xE2B3, 0x6EFC}, //9817 #CJK UNIFIED IDEOGRAPH + {0xE2B4, 0x6F3A}, //9818 #CJK UNIFIED IDEOGRAPH + {0xE2B5, 0x6F1F}, //9819 #CJK UNIFIED IDEOGRAPH + {0xE2B6, 0x6F0D}, //9820 #CJK UNIFIED IDEOGRAPH + {0xE2B7, 0x6F1E}, //9821 #CJK UNIFIED IDEOGRAPH + {0xE2B8, 0x6F08}, //9822 #CJK UNIFIED IDEOGRAPH + {0xE2B9, 0x6F21}, //9823 #CJK UNIFIED IDEOGRAPH + {0xE2BA, 0x7187}, //9824 #CJK UNIFIED IDEOGRAPH + {0xE2BB, 0x7190}, //9825 #CJK UNIFIED IDEOGRAPH + {0xE2BC, 0x7189}, //9826 #CJK UNIFIED IDEOGRAPH + {0xE2BD, 0x7180}, //9827 #CJK UNIFIED IDEOGRAPH + {0xE2BE, 0x7185}, //9828 #CJK UNIFIED IDEOGRAPH + {0xE2BF, 0x7182}, //9829 #CJK UNIFIED IDEOGRAPH + {0xE2C0, 0x718F}, //9830 #CJK UNIFIED IDEOGRAPH + {0xE2C1, 0x717B}, //9831 #CJK UNIFIED IDEOGRAPH + {0xE2C2, 0x7186}, //9832 #CJK UNIFIED IDEOGRAPH + {0xE2C3, 0x7181}, //9833 #CJK UNIFIED IDEOGRAPH + {0xE2C4, 0x7197}, //9834 #CJK UNIFIED IDEOGRAPH + {0xE2C5, 0x7244}, //9835 #CJK UNIFIED IDEOGRAPH + {0xE2C6, 0x7253}, //9836 #CJK UNIFIED IDEOGRAPH + {0xE2C7, 0x7297}, //9837 #CJK UNIFIED IDEOGRAPH + {0xE2C8, 0x7295}, //9838 #CJK UNIFIED IDEOGRAPH + {0xE2C9, 0x7293}, //9839 #CJK UNIFIED IDEOGRAPH + {0xE2CA, 0x7343}, //9840 #CJK UNIFIED IDEOGRAPH + {0xE2CB, 0x734D}, //9841 #CJK UNIFIED IDEOGRAPH + {0xE2CC, 0x7351}, //9842 #CJK UNIFIED IDEOGRAPH + {0xE2CD, 0x734C}, //9843 #CJK UNIFIED IDEOGRAPH + {0xE2CE, 0x7462}, //9844 #CJK UNIFIED IDEOGRAPH + {0xE2CF, 0x7473}, //9845 #CJK UNIFIED IDEOGRAPH + {0xE2D0, 0x7471}, //9846 #CJK UNIFIED IDEOGRAPH + {0xE2D1, 0x7475}, //9847 #CJK UNIFIED IDEOGRAPH + {0xE2D2, 0x7472}, //9848 #CJK UNIFIED IDEOGRAPH + {0xE2D3, 0x7467}, //9849 #CJK UNIFIED IDEOGRAPH + {0xE2D4, 0x746E}, //9850 #CJK UNIFIED IDEOGRAPH + {0xE2D5, 0x7500}, //9851 #CJK UNIFIED IDEOGRAPH + {0xE2D6, 0x7502}, //9852 #CJK UNIFIED IDEOGRAPH + {0xE2D7, 0x7503}, //9853 #CJK UNIFIED IDEOGRAPH + {0xE2D8, 0x757D}, //9854 #CJK UNIFIED IDEOGRAPH + {0xE2D9, 0x7590}, //9855 #CJK UNIFIED IDEOGRAPH + {0xE2DA, 0x7616}, //9856 #CJK UNIFIED IDEOGRAPH + {0xE2DB, 0x7608}, //9857 #CJK UNIFIED IDEOGRAPH + {0xE2DC, 0x760C}, //9858 #CJK UNIFIED IDEOGRAPH + {0xE2DD, 0x7615}, //9859 #CJK UNIFIED IDEOGRAPH + {0xE2DE, 0x7611}, //9860 #CJK UNIFIED IDEOGRAPH + {0xE2DF, 0x760A}, //9861 #CJK UNIFIED IDEOGRAPH + {0xE2E0, 0x7614}, //9862 #CJK UNIFIED IDEOGRAPH + {0xE2E1, 0x76B8}, //9863 #CJK UNIFIED IDEOGRAPH + {0xE2E2, 0x7781}, //9864 #CJK UNIFIED IDEOGRAPH + {0xE2E3, 0x777C}, //9865 #CJK UNIFIED IDEOGRAPH + {0xE2E4, 0x7785}, //9866 #CJK UNIFIED IDEOGRAPH + {0xE2E5, 0x7782}, //9867 #CJK UNIFIED IDEOGRAPH + {0xE2E6, 0x776E}, //9868 #CJK UNIFIED IDEOGRAPH + {0xE2E7, 0x7780}, //9869 #CJK UNIFIED IDEOGRAPH + {0xE2E8, 0x776F}, //9870 #CJK UNIFIED IDEOGRAPH + {0xE2E9, 0x777E}, //9871 #CJK UNIFIED IDEOGRAPH + {0xE2EA, 0x7783}, //9872 #CJK UNIFIED IDEOGRAPH + {0xE2EB, 0x78B2}, //9873 #CJK UNIFIED IDEOGRAPH + {0xE2EC, 0x78AA}, //9874 #CJK UNIFIED IDEOGRAPH + {0xE2ED, 0x78B4}, //9875 #CJK UNIFIED IDEOGRAPH + {0xE2EE, 0x78AD}, //9876 #CJK UNIFIED IDEOGRAPH + {0xE2EF, 0x78A8}, //9877 #CJK UNIFIED IDEOGRAPH + {0xE2F0, 0x787E}, //9878 #CJK UNIFIED IDEOGRAPH + {0xE2F1, 0x78AB}, //9879 #CJK UNIFIED IDEOGRAPH + {0xE2F2, 0x789E}, //9880 #CJK UNIFIED IDEOGRAPH + {0xE2F3, 0x78A5}, //9881 #CJK UNIFIED IDEOGRAPH + {0xE2F4, 0x78A0}, //9882 #CJK UNIFIED IDEOGRAPH + {0xE2F5, 0x78AC}, //9883 #CJK UNIFIED IDEOGRAPH + {0xE2F6, 0x78A2}, //9884 #CJK UNIFIED IDEOGRAPH + {0xE2F7, 0x78A4}, //9885 #CJK UNIFIED IDEOGRAPH + {0xE2F8, 0x7998}, //9886 #CJK UNIFIED IDEOGRAPH + {0xE2F9, 0x798A}, //9887 #CJK UNIFIED IDEOGRAPH + {0xE2FA, 0x798B}, //9888 #CJK UNIFIED IDEOGRAPH + {0xE2FB, 0x7996}, //9889 #CJK UNIFIED IDEOGRAPH + {0xE2FC, 0x7995}, //9890 #CJK UNIFIED IDEOGRAPH + {0xE2FD, 0x7994}, //9891 #CJK UNIFIED IDEOGRAPH + {0xE2FE, 0x7993}, //9892 #CJK UNIFIED IDEOGRAPH + {0xE340, 0x7997}, //9893 #CJK UNIFIED IDEOGRAPH + {0xE341, 0x7988}, //9894 #CJK UNIFIED IDEOGRAPH + {0xE342, 0x7992}, //9895 #CJK UNIFIED IDEOGRAPH + {0xE343, 0x7990}, //9896 #CJK UNIFIED IDEOGRAPH + {0xE344, 0x7A2B}, //9897 #CJK UNIFIED IDEOGRAPH + {0xE345, 0x7A4A}, //9898 #CJK UNIFIED IDEOGRAPH + {0xE346, 0x7A30}, //9899 #CJK UNIFIED IDEOGRAPH + {0xE347, 0x7A2F}, //9900 #CJK UNIFIED IDEOGRAPH + {0xE348, 0x7A28}, //9901 #CJK UNIFIED IDEOGRAPH + {0xE349, 0x7A26}, //9902 #CJK UNIFIED IDEOGRAPH + {0xE34A, 0x7AA8}, //9903 #CJK UNIFIED IDEOGRAPH + {0xE34B, 0x7AAB}, //9904 #CJK UNIFIED IDEOGRAPH + {0xE34C, 0x7AAC}, //9905 #CJK UNIFIED IDEOGRAPH + {0xE34D, 0x7AEE}, //9906 #CJK UNIFIED IDEOGRAPH + {0xE34E, 0x7B88}, //9907 #CJK UNIFIED IDEOGRAPH + {0xE34F, 0x7B9C}, //9908 #CJK UNIFIED IDEOGRAPH + {0xE350, 0x7B8A}, //9909 #CJK UNIFIED IDEOGRAPH + {0xE351, 0x7B91}, //9910 #CJK UNIFIED IDEOGRAPH + {0xE352, 0x7B90}, //9911 #CJK UNIFIED IDEOGRAPH + {0xE353, 0x7B96}, //9912 #CJK UNIFIED IDEOGRAPH + {0xE354, 0x7B8D}, //9913 #CJK UNIFIED IDEOGRAPH + {0xE355, 0x7B8C}, //9914 #CJK UNIFIED IDEOGRAPH + {0xE356, 0x7B9B}, //9915 #CJK UNIFIED IDEOGRAPH + {0xE357, 0x7B8E}, //9916 #CJK UNIFIED IDEOGRAPH + {0xE358, 0x7B85}, //9917 #CJK UNIFIED IDEOGRAPH + {0xE359, 0x7B98}, //9918 #CJK UNIFIED IDEOGRAPH + {0xE35A, 0x5284}, //9919 #CJK UNIFIED IDEOGRAPH + {0xE35B, 0x7B99}, //9920 #CJK UNIFIED IDEOGRAPH + {0xE35C, 0x7BA4}, //9921 #CJK UNIFIED IDEOGRAPH + {0xE35D, 0x7B82}, //9922 #CJK UNIFIED IDEOGRAPH + {0xE35E, 0x7CBB}, //9923 #CJK UNIFIED IDEOGRAPH + {0xE35F, 0x7CBF}, //9924 #CJK UNIFIED IDEOGRAPH + {0xE360, 0x7CBC}, //9925 #CJK UNIFIED IDEOGRAPH + {0xE361, 0x7CBA}, //9926 #CJK UNIFIED IDEOGRAPH + {0xE362, 0x7DA7}, //9927 #CJK UNIFIED IDEOGRAPH + {0xE363, 0x7DB7}, //9928 #CJK UNIFIED IDEOGRAPH + {0xE364, 0x7DC2}, //9929 #CJK UNIFIED IDEOGRAPH + {0xE365, 0x7DA3}, //9930 #CJK UNIFIED IDEOGRAPH + {0xE366, 0x7DAA}, //9931 #CJK UNIFIED IDEOGRAPH + {0xE367, 0x7DC1}, //9932 #CJK UNIFIED IDEOGRAPH + {0xE368, 0x7DC0}, //9933 #CJK UNIFIED IDEOGRAPH + {0xE369, 0x7DC5}, //9934 #CJK UNIFIED IDEOGRAPH + {0xE36A, 0x7D9D}, //9935 #CJK UNIFIED IDEOGRAPH + {0xE36B, 0x7DCE}, //9936 #CJK UNIFIED IDEOGRAPH + {0xE36C, 0x7DC4}, //9937 #CJK UNIFIED IDEOGRAPH + {0xE36D, 0x7DC6}, //9938 #CJK UNIFIED IDEOGRAPH + {0xE36E, 0x7DCB}, //9939 #CJK UNIFIED IDEOGRAPH + {0xE36F, 0x7DCC}, //9940 #CJK UNIFIED IDEOGRAPH + {0xE370, 0x7DAF}, //9941 #CJK UNIFIED IDEOGRAPH + {0xE371, 0x7DB9}, //9942 #CJK UNIFIED IDEOGRAPH + {0xE372, 0x7D96}, //9943 #CJK UNIFIED IDEOGRAPH + {0xE373, 0x7DBC}, //9944 #CJK UNIFIED IDEOGRAPH + {0xE374, 0x7D9F}, //9945 #CJK UNIFIED IDEOGRAPH + {0xE375, 0x7DA6}, //9946 #CJK UNIFIED IDEOGRAPH + {0xE376, 0x7DAE}, //9947 #CJK UNIFIED IDEOGRAPH + {0xE377, 0x7DA9}, //9948 #CJK UNIFIED IDEOGRAPH + {0xE378, 0x7DA1}, //9949 #CJK UNIFIED IDEOGRAPH + {0xE379, 0x7DC9}, //9950 #CJK UNIFIED IDEOGRAPH + {0xE37A, 0x7F73}, //9951 #CJK UNIFIED IDEOGRAPH + {0xE37B, 0x7FE2}, //9952 #CJK UNIFIED IDEOGRAPH + {0xE37C, 0x7FE3}, //9953 #CJK UNIFIED IDEOGRAPH + {0xE37D, 0x7FE5}, //9954 #CJK UNIFIED IDEOGRAPH + {0xE37E, 0x7FDE}, //9955 #CJK UNIFIED IDEOGRAPH + {0xE3A1, 0x8024}, //9956 #CJK UNIFIED IDEOGRAPH + {0xE3A2, 0x805D}, //9957 #CJK UNIFIED IDEOGRAPH + {0xE3A3, 0x805C}, //9958 #CJK UNIFIED IDEOGRAPH + {0xE3A4, 0x8189}, //9959 #CJK UNIFIED IDEOGRAPH + {0xE3A5, 0x8186}, //9960 #CJK UNIFIED IDEOGRAPH + {0xE3A6, 0x8183}, //9961 #CJK UNIFIED IDEOGRAPH + {0xE3A7, 0x8187}, //9962 #CJK UNIFIED IDEOGRAPH + {0xE3A8, 0x818D}, //9963 #CJK UNIFIED IDEOGRAPH + {0xE3A9, 0x818C}, //9964 #CJK UNIFIED IDEOGRAPH + {0xE3AA, 0x818B}, //9965 #CJK UNIFIED IDEOGRAPH + {0xE3AB, 0x8215}, //9966 #CJK UNIFIED IDEOGRAPH + {0xE3AC, 0x8497}, //9967 #CJK UNIFIED IDEOGRAPH + {0xE3AD, 0x84A4}, //9968 #CJK UNIFIED IDEOGRAPH + {0xE3AE, 0x84A1}, //9969 #CJK UNIFIED IDEOGRAPH + {0xE3AF, 0x849F}, //9970 #CJK UNIFIED IDEOGRAPH + {0xE3B0, 0x84BA}, //9971 #CJK UNIFIED IDEOGRAPH + {0xE3B1, 0x84CE}, //9972 #CJK UNIFIED IDEOGRAPH + {0xE3B2, 0x84C2}, //9973 #CJK UNIFIED IDEOGRAPH + {0xE3B3, 0x84AC}, //9974 #CJK UNIFIED IDEOGRAPH + {0xE3B4, 0x84AE}, //9975 #CJK UNIFIED IDEOGRAPH + {0xE3B5, 0x84AB}, //9976 #CJK UNIFIED IDEOGRAPH + {0xE3B6, 0x84B9}, //9977 #CJK UNIFIED IDEOGRAPH + {0xE3B7, 0x84B4}, //9978 #CJK UNIFIED IDEOGRAPH + {0xE3B8, 0x84C1}, //9979 #CJK UNIFIED IDEOGRAPH + {0xE3B9, 0x84CD}, //9980 #CJK UNIFIED IDEOGRAPH + {0xE3BA, 0x84AA}, //9981 #CJK UNIFIED IDEOGRAPH + {0xE3BB, 0x849A}, //9982 #CJK UNIFIED IDEOGRAPH + {0xE3BC, 0x84B1}, //9983 #CJK UNIFIED IDEOGRAPH + {0xE3BD, 0x84D0}, //9984 #CJK UNIFIED IDEOGRAPH + {0xE3BE, 0x849D}, //9985 #CJK UNIFIED IDEOGRAPH + {0xE3BF, 0x84A7}, //9986 #CJK UNIFIED IDEOGRAPH + {0xE3C0, 0x84BB}, //9987 #CJK UNIFIED IDEOGRAPH + {0xE3C1, 0x84A2}, //9988 #CJK UNIFIED IDEOGRAPH + {0xE3C2, 0x8494}, //9989 #CJK UNIFIED IDEOGRAPH + {0xE3C3, 0x84C7}, //9990 #CJK UNIFIED IDEOGRAPH + {0xE3C4, 0x84CC}, //9991 #CJK UNIFIED IDEOGRAPH + {0xE3C5, 0x849B}, //9992 #CJK UNIFIED IDEOGRAPH + {0xE3C6, 0x84A9}, //9993 #CJK UNIFIED IDEOGRAPH + {0xE3C7, 0x84AF}, //9994 #CJK UNIFIED IDEOGRAPH + {0xE3C8, 0x84A8}, //9995 #CJK UNIFIED IDEOGRAPH + {0xE3C9, 0x84D6}, //9996 #CJK UNIFIED IDEOGRAPH + {0xE3CA, 0x8498}, //9997 #CJK UNIFIED IDEOGRAPH + {0xE3CB, 0x84B6}, //9998 #CJK UNIFIED IDEOGRAPH + {0xE3CC, 0x84CF}, //9999 #CJK UNIFIED IDEOGRAPH + {0xE3CD, 0x84A0}, //10000 #CJK UNIFIED IDEOGRAPH + {0xE3CE, 0x84D7}, //10001 #CJK UNIFIED IDEOGRAPH + {0xE3CF, 0x84D4}, //10002 #CJK UNIFIED IDEOGRAPH + {0xE3D0, 0x84D2}, //10003 #CJK UNIFIED IDEOGRAPH + {0xE3D1, 0x84DB}, //10004 #CJK UNIFIED IDEOGRAPH + {0xE3D2, 0x84B0}, //10005 #CJK UNIFIED IDEOGRAPH + {0xE3D3, 0x8491}, //10006 #CJK UNIFIED IDEOGRAPH + {0xE3D4, 0x8661}, //10007 #CJK UNIFIED IDEOGRAPH + {0xE3D5, 0x8733}, //10008 #CJK UNIFIED IDEOGRAPH + {0xE3D6, 0x8723}, //10009 #CJK UNIFIED IDEOGRAPH + {0xE3D7, 0x8728}, //10010 #CJK UNIFIED IDEOGRAPH + {0xE3D8, 0x876B}, //10011 #CJK UNIFIED IDEOGRAPH + {0xE3D9, 0x8740}, //10012 #CJK UNIFIED IDEOGRAPH + {0xE3DA, 0x872E}, //10013 #CJK UNIFIED IDEOGRAPH + {0xE3DB, 0x871E}, //10014 #CJK UNIFIED IDEOGRAPH + {0xE3DC, 0x8721}, //10015 #CJK UNIFIED IDEOGRAPH + {0xE3DD, 0x8719}, //10016 #CJK UNIFIED IDEOGRAPH + {0xE3DE, 0x871B}, //10017 #CJK UNIFIED IDEOGRAPH + {0xE3DF, 0x8743}, //10018 #CJK UNIFIED IDEOGRAPH + {0xE3E0, 0x872C}, //10019 #CJK UNIFIED IDEOGRAPH + {0xE3E1, 0x8741}, //10020 #CJK UNIFIED IDEOGRAPH + {0xE3E2, 0x873E}, //10021 #CJK UNIFIED IDEOGRAPH + {0xE3E3, 0x8746}, //10022 #CJK UNIFIED IDEOGRAPH + {0xE3E4, 0x8720}, //10023 #CJK UNIFIED IDEOGRAPH + {0xE3E5, 0x8732}, //10024 #CJK UNIFIED IDEOGRAPH + {0xE3E6, 0x872A}, //10025 #CJK UNIFIED IDEOGRAPH + {0xE3E7, 0x872D}, //10026 #CJK UNIFIED IDEOGRAPH + {0xE3E8, 0x873C}, //10027 #CJK UNIFIED IDEOGRAPH + {0xE3E9, 0x8712}, //10028 #CJK UNIFIED IDEOGRAPH + {0xE3EA, 0x873A}, //10029 #CJK UNIFIED IDEOGRAPH + {0xE3EB, 0x8731}, //10030 #CJK UNIFIED IDEOGRAPH + {0xE3EC, 0x8735}, //10031 #CJK UNIFIED IDEOGRAPH + {0xE3ED, 0x8742}, //10032 #CJK UNIFIED IDEOGRAPH + {0xE3EE, 0x8726}, //10033 #CJK UNIFIED IDEOGRAPH + {0xE3EF, 0x8727}, //10034 #CJK UNIFIED IDEOGRAPH + {0xE3F0, 0x8738}, //10035 #CJK UNIFIED IDEOGRAPH + {0xE3F1, 0x8724}, //10036 #CJK UNIFIED IDEOGRAPH + {0xE3F2, 0x871A}, //10037 #CJK UNIFIED IDEOGRAPH + {0xE3F3, 0x8730}, //10038 #CJK UNIFIED IDEOGRAPH + {0xE3F4, 0x8711}, //10039 #CJK UNIFIED IDEOGRAPH + {0xE3F5, 0x88F7}, //10040 #CJK UNIFIED IDEOGRAPH + {0xE3F6, 0x88E7}, //10041 #CJK UNIFIED IDEOGRAPH + {0xE3F7, 0x88F1}, //10042 #CJK UNIFIED IDEOGRAPH + {0xE3F8, 0x88F2}, //10043 #CJK UNIFIED IDEOGRAPH + {0xE3F9, 0x88FA}, //10044 #CJK UNIFIED IDEOGRAPH + {0xE3FA, 0x88FE}, //10045 #CJK UNIFIED IDEOGRAPH + {0xE3FB, 0x88EE}, //10046 #CJK UNIFIED IDEOGRAPH + {0xE3FC, 0x88FC}, //10047 #CJK UNIFIED IDEOGRAPH + {0xE3FD, 0x88F6}, //10048 #CJK UNIFIED IDEOGRAPH + {0xE3FE, 0x88FB}, //10049 #CJK UNIFIED IDEOGRAPH + {0xE440, 0x88F0}, //10050 #CJK UNIFIED IDEOGRAPH + {0xE441, 0x88EC}, //10051 #CJK UNIFIED IDEOGRAPH + {0xE442, 0x88EB}, //10052 #CJK UNIFIED IDEOGRAPH + {0xE443, 0x899D}, //10053 #CJK UNIFIED IDEOGRAPH + {0xE444, 0x89A1}, //10054 #CJK UNIFIED IDEOGRAPH + {0xE445, 0x899F}, //10055 #CJK UNIFIED IDEOGRAPH + {0xE446, 0x899E}, //10056 #CJK UNIFIED IDEOGRAPH + {0xE447, 0x89E9}, //10057 #CJK UNIFIED IDEOGRAPH + {0xE448, 0x89EB}, //10058 #CJK UNIFIED IDEOGRAPH + {0xE449, 0x89E8}, //10059 #CJK UNIFIED IDEOGRAPH + {0xE44A, 0x8AAB}, //10060 #CJK UNIFIED IDEOGRAPH + {0xE44B, 0x8A99}, //10061 #CJK UNIFIED IDEOGRAPH + {0xE44C, 0x8A8B}, //10062 #CJK UNIFIED IDEOGRAPH + {0xE44D, 0x8A92}, //10063 #CJK UNIFIED IDEOGRAPH + {0xE44E, 0x8A8F}, //10064 #CJK UNIFIED IDEOGRAPH + {0xE44F, 0x8A96}, //10065 #CJK UNIFIED IDEOGRAPH + {0xE450, 0x8C3D}, //10066 #CJK UNIFIED IDEOGRAPH + {0xE451, 0x8C68}, //10067 #CJK UNIFIED IDEOGRAPH + {0xE452, 0x8C69}, //10068 #CJK UNIFIED IDEOGRAPH + {0xE453, 0x8CD5}, //10069 #CJK UNIFIED IDEOGRAPH + {0xE454, 0x8CCF}, //10070 #CJK UNIFIED IDEOGRAPH + {0xE455, 0x8CD7}, //10071 #CJK UNIFIED IDEOGRAPH + {0xE456, 0x8D96}, //10072 #CJK UNIFIED IDEOGRAPH + {0xE457, 0x8E09}, //10073 #CJK UNIFIED IDEOGRAPH + {0xE458, 0x8E02}, //10074 #CJK UNIFIED IDEOGRAPH + {0xE459, 0x8DFF}, //10075 #CJK UNIFIED IDEOGRAPH + {0xE45A, 0x8E0D}, //10076 #CJK UNIFIED IDEOGRAPH + {0xE45B, 0x8DFD}, //10077 #CJK UNIFIED IDEOGRAPH + {0xE45C, 0x8E0A}, //10078 #CJK UNIFIED IDEOGRAPH + {0xE45D, 0x8E03}, //10079 #CJK UNIFIED IDEOGRAPH + {0xE45E, 0x8E07}, //10080 #CJK UNIFIED IDEOGRAPH + {0xE45F, 0x8E06}, //10081 #CJK UNIFIED IDEOGRAPH + {0xE460, 0x8E05}, //10082 #CJK UNIFIED IDEOGRAPH + {0xE461, 0x8DFE}, //10083 #CJK UNIFIED IDEOGRAPH + {0xE462, 0x8E00}, //10084 #CJK UNIFIED IDEOGRAPH + {0xE463, 0x8E04}, //10085 #CJK UNIFIED IDEOGRAPH + {0xE464, 0x8F10}, //10086 #CJK UNIFIED IDEOGRAPH + {0xE465, 0x8F11}, //10087 #CJK UNIFIED IDEOGRAPH + {0xE466, 0x8F0E}, //10088 #CJK UNIFIED IDEOGRAPH + {0xE467, 0x8F0D}, //10089 #CJK UNIFIED IDEOGRAPH + {0xE468, 0x9123}, //10090 #CJK UNIFIED IDEOGRAPH + {0xE469, 0x911C}, //10091 #CJK UNIFIED IDEOGRAPH + {0xE46A, 0x9120}, //10092 #CJK UNIFIED IDEOGRAPH + {0xE46B, 0x9122}, //10093 #CJK UNIFIED IDEOGRAPH + {0xE46C, 0x911F}, //10094 #CJK UNIFIED IDEOGRAPH + {0xE46D, 0x911D}, //10095 #CJK UNIFIED IDEOGRAPH + {0xE46E, 0x911A}, //10096 #CJK UNIFIED IDEOGRAPH + {0xE46F, 0x9124}, //10097 #CJK UNIFIED IDEOGRAPH + {0xE470, 0x9121}, //10098 #CJK UNIFIED IDEOGRAPH + {0xE471, 0x911B}, //10099 #CJK UNIFIED IDEOGRAPH + {0xE472, 0x917A}, //10100 #CJK UNIFIED IDEOGRAPH + {0xE473, 0x9172}, //10101 #CJK UNIFIED IDEOGRAPH + {0xE474, 0x9179}, //10102 #CJK UNIFIED IDEOGRAPH + {0xE475, 0x9173}, //10103 #CJK UNIFIED IDEOGRAPH + {0xE476, 0x92A5}, //10104 #CJK UNIFIED IDEOGRAPH + {0xE477, 0x92A4}, //10105 #CJK UNIFIED IDEOGRAPH + {0xE478, 0x9276}, //10106 #CJK UNIFIED IDEOGRAPH + {0xE479, 0x929B}, //10107 #CJK UNIFIED IDEOGRAPH + {0xE47A, 0x927A}, //10108 #CJK UNIFIED IDEOGRAPH + {0xE47B, 0x92A0}, //10109 #CJK UNIFIED IDEOGRAPH + {0xE47C, 0x9294}, //10110 #CJK UNIFIED IDEOGRAPH + {0xE47D, 0x92AA}, //10111 #CJK UNIFIED IDEOGRAPH + {0xE47E, 0x928D}, //10112 #CJK UNIFIED IDEOGRAPH + {0xE4A1, 0x92A6}, //10113 #CJK UNIFIED IDEOGRAPH + {0xE4A2, 0x929A}, //10114 #CJK UNIFIED IDEOGRAPH + {0xE4A3, 0x92AB}, //10115 #CJK UNIFIED IDEOGRAPH + {0xE4A4, 0x9279}, //10116 #CJK UNIFIED IDEOGRAPH + {0xE4A5, 0x9297}, //10117 #CJK UNIFIED IDEOGRAPH + {0xE4A6, 0x927F}, //10118 #CJK UNIFIED IDEOGRAPH + {0xE4A7, 0x92A3}, //10119 #CJK UNIFIED IDEOGRAPH + {0xE4A8, 0x92EE}, //10120 #CJK UNIFIED IDEOGRAPH + {0xE4A9, 0x928E}, //10121 #CJK UNIFIED IDEOGRAPH + {0xE4AA, 0x9282}, //10122 #CJK UNIFIED IDEOGRAPH + {0xE4AB, 0x9295}, //10123 #CJK UNIFIED IDEOGRAPH + {0xE4AC, 0x92A2}, //10124 #CJK UNIFIED IDEOGRAPH + {0xE4AD, 0x927D}, //10125 #CJK UNIFIED IDEOGRAPH + {0xE4AE, 0x9288}, //10126 #CJK UNIFIED IDEOGRAPH + {0xE4AF, 0x92A1}, //10127 #CJK UNIFIED IDEOGRAPH + {0xE4B0, 0x928A}, //10128 #CJK UNIFIED IDEOGRAPH + {0xE4B1, 0x9286}, //10129 #CJK UNIFIED IDEOGRAPH + {0xE4B2, 0x928C}, //10130 #CJK UNIFIED IDEOGRAPH + {0xE4B3, 0x9299}, //10131 #CJK UNIFIED IDEOGRAPH + {0xE4B4, 0x92A7}, //10132 #CJK UNIFIED IDEOGRAPH + {0xE4B5, 0x927E}, //10133 #CJK UNIFIED IDEOGRAPH + {0xE4B6, 0x9287}, //10134 #CJK UNIFIED IDEOGRAPH + {0xE4B7, 0x92A9}, //10135 #CJK UNIFIED IDEOGRAPH + {0xE4B8, 0x929D}, //10136 #CJK UNIFIED IDEOGRAPH + {0xE4B9, 0x928B}, //10137 #CJK UNIFIED IDEOGRAPH + {0xE4BA, 0x922D}, //10138 #CJK UNIFIED IDEOGRAPH + {0xE4BB, 0x969E}, //10139 #CJK UNIFIED IDEOGRAPH + {0xE4BC, 0x96A1}, //10140 #CJK UNIFIED IDEOGRAPH + {0xE4BD, 0x96FF}, //10141 #CJK UNIFIED IDEOGRAPH + {0xE4BE, 0x9758}, //10142 #CJK UNIFIED IDEOGRAPH + {0xE4BF, 0x977D}, //10143 #CJK UNIFIED IDEOGRAPH + {0xE4C0, 0x977A}, //10144 #CJK UNIFIED IDEOGRAPH + {0xE4C1, 0x977E}, //10145 #CJK UNIFIED IDEOGRAPH + {0xE4C2, 0x9783}, //10146 #CJK UNIFIED IDEOGRAPH + {0xE4C3, 0x9780}, //10147 #CJK UNIFIED IDEOGRAPH + {0xE4C4, 0x9782}, //10148 #CJK UNIFIED IDEOGRAPH + {0xE4C5, 0x977B}, //10149 #CJK UNIFIED IDEOGRAPH + {0xE4C6, 0x9784}, //10150 #CJK UNIFIED IDEOGRAPH + {0xE4C7, 0x9781}, //10151 #CJK UNIFIED IDEOGRAPH + {0xE4C8, 0x977F}, //10152 #CJK UNIFIED IDEOGRAPH + {0xE4C9, 0x97CE}, //10153 #CJK UNIFIED IDEOGRAPH + {0xE4CA, 0x97CD}, //10154 #CJK UNIFIED IDEOGRAPH + {0xE4CB, 0x9816}, //10155 #CJK UNIFIED IDEOGRAPH + {0xE4CC, 0x98AD}, //10156 #CJK UNIFIED IDEOGRAPH + {0xE4CD, 0x98AE}, //10157 #CJK UNIFIED IDEOGRAPH + {0xE4CE, 0x9902}, //10158 #CJK UNIFIED IDEOGRAPH + {0xE4CF, 0x9900}, //10159 #CJK UNIFIED IDEOGRAPH + {0xE4D0, 0x9907}, //10160 #CJK UNIFIED IDEOGRAPH + {0xE4D1, 0x999D}, //10161 #CJK UNIFIED IDEOGRAPH + {0xE4D2, 0x999C}, //10162 #CJK UNIFIED IDEOGRAPH + {0xE4D3, 0x99C3}, //10163 #CJK UNIFIED IDEOGRAPH + {0xE4D4, 0x99B9}, //10164 #CJK UNIFIED IDEOGRAPH + {0xE4D5, 0x99BB}, //10165 #CJK UNIFIED IDEOGRAPH + {0xE4D6, 0x99BA}, //10166 #CJK UNIFIED IDEOGRAPH + {0xE4D7, 0x99C2}, //10167 #CJK UNIFIED IDEOGRAPH + {0xE4D8, 0x99BD}, //10168 #CJK UNIFIED IDEOGRAPH + {0xE4D9, 0x99C7}, //10169 #CJK UNIFIED IDEOGRAPH + {0xE4DA, 0x9AB1}, //10170 #CJK UNIFIED IDEOGRAPH + {0xE4DB, 0x9AE3}, //10171 #CJK UNIFIED IDEOGRAPH + {0xE4DC, 0x9AE7}, //10172 #CJK UNIFIED IDEOGRAPH + {0xE4DD, 0x9B3E}, //10173 #CJK UNIFIED IDEOGRAPH + {0xE4DE, 0x9B3F}, //10174 #CJK UNIFIED IDEOGRAPH + {0xE4DF, 0x9B60}, //10175 #CJK UNIFIED IDEOGRAPH + {0xE4E0, 0x9B61}, //10176 #CJK UNIFIED IDEOGRAPH + {0xE4E1, 0x9B5F}, //10177 #CJK UNIFIED IDEOGRAPH + {0xE4E2, 0x9CF1}, //10178 #CJK UNIFIED IDEOGRAPH + {0xE4E3, 0x9CF2}, //10179 #CJK UNIFIED IDEOGRAPH + {0xE4E4, 0x9CF5}, //10180 #CJK UNIFIED IDEOGRAPH + {0xE4E5, 0x9EA7}, //10181 #CJK UNIFIED IDEOGRAPH + {0xE4E6, 0x50FF}, //10182 #CJK UNIFIED IDEOGRAPH + {0xE4E7, 0x5103}, //10183 #CJK UNIFIED IDEOGRAPH + {0xE4E8, 0x5130}, //10184 #CJK UNIFIED IDEOGRAPH + {0xE4E9, 0x50F8}, //10185 #CJK UNIFIED IDEOGRAPH + {0xE4EA, 0x5106}, //10186 #CJK UNIFIED IDEOGRAPH + {0xE4EB, 0x5107}, //10187 #CJK UNIFIED IDEOGRAPH + {0xE4EC, 0x50F6}, //10188 #CJK UNIFIED IDEOGRAPH + {0xE4ED, 0x50FE}, //10189 #CJK UNIFIED IDEOGRAPH + {0xE4EE, 0x510B}, //10190 #CJK UNIFIED IDEOGRAPH + {0xE4EF, 0x510C}, //10191 #CJK UNIFIED IDEOGRAPH + {0xE4F0, 0x50FD}, //10192 #CJK UNIFIED IDEOGRAPH + {0xE4F1, 0x510A}, //10193 #CJK UNIFIED IDEOGRAPH + {0xE4F2, 0x528B}, //10194 #CJK UNIFIED IDEOGRAPH + {0xE4F3, 0x528C}, //10195 #CJK UNIFIED IDEOGRAPH + {0xE4F4, 0x52F1}, //10196 #CJK UNIFIED IDEOGRAPH + {0xE4F5, 0x52EF}, //10197 #CJK UNIFIED IDEOGRAPH + {0xE4F6, 0x5648}, //10198 #CJK UNIFIED IDEOGRAPH + {0xE4F7, 0x5642}, //10199 #CJK UNIFIED IDEOGRAPH + {0xE4F8, 0x564C}, //10200 #CJK UNIFIED IDEOGRAPH + {0xE4F9, 0x5635}, //10201 #CJK UNIFIED IDEOGRAPH + {0xE4FA, 0x5641}, //10202 #CJK UNIFIED IDEOGRAPH + {0xE4FB, 0x564A}, //10203 #CJK UNIFIED IDEOGRAPH + {0xE4FC, 0x5649}, //10204 #CJK UNIFIED IDEOGRAPH + {0xE4FD, 0x5646}, //10205 #CJK UNIFIED IDEOGRAPH + {0xE4FE, 0x5658}, //10206 #CJK UNIFIED IDEOGRAPH + {0xE540, 0x565A}, //10207 #CJK UNIFIED IDEOGRAPH + {0xE541, 0x5640}, //10208 #CJK UNIFIED IDEOGRAPH + {0xE542, 0x5633}, //10209 #CJK UNIFIED IDEOGRAPH + {0xE543, 0x563D}, //10210 #CJK UNIFIED IDEOGRAPH + {0xE544, 0x562C}, //10211 #CJK UNIFIED IDEOGRAPH + {0xE545, 0x563E}, //10212 #CJK UNIFIED IDEOGRAPH + {0xE546, 0x5638}, //10213 #CJK UNIFIED IDEOGRAPH + {0xE547, 0x562A}, //10214 #CJK UNIFIED IDEOGRAPH + {0xE548, 0x563A}, //10215 #CJK UNIFIED IDEOGRAPH + {0xE549, 0x571A}, //10216 #CJK UNIFIED IDEOGRAPH + {0xE54A, 0x58AB}, //10217 #CJK UNIFIED IDEOGRAPH + {0xE54B, 0x589D}, //10218 #CJK UNIFIED IDEOGRAPH + {0xE54C, 0x58B1}, //10219 #CJK UNIFIED IDEOGRAPH + {0xE54D, 0x58A0}, //10220 #CJK UNIFIED IDEOGRAPH + {0xE54E, 0x58A3}, //10221 #CJK UNIFIED IDEOGRAPH + {0xE54F, 0x58AF}, //10222 #CJK UNIFIED IDEOGRAPH + {0xE550, 0x58AC}, //10223 #CJK UNIFIED IDEOGRAPH + {0xE551, 0x58A5}, //10224 #CJK UNIFIED IDEOGRAPH + {0xE552, 0x58A1}, //10225 #CJK UNIFIED IDEOGRAPH + {0xE553, 0x58FF}, //10226 #CJK UNIFIED IDEOGRAPH + {0xE554, 0x5AFF}, //10227 #CJK UNIFIED IDEOGRAPH + {0xE555, 0x5AF4}, //10228 #CJK UNIFIED IDEOGRAPH + {0xE556, 0x5AFD}, //10229 #CJK UNIFIED IDEOGRAPH + {0xE557, 0x5AF7}, //10230 #CJK UNIFIED IDEOGRAPH + {0xE558, 0x5AF6}, //10231 #CJK UNIFIED IDEOGRAPH + {0xE559, 0x5B03}, //10232 #CJK UNIFIED IDEOGRAPH + {0xE55A, 0x5AF8}, //10233 #CJK UNIFIED IDEOGRAPH + {0xE55B, 0x5B02}, //10234 #CJK UNIFIED IDEOGRAPH + {0xE55C, 0x5AF9}, //10235 #CJK UNIFIED IDEOGRAPH + {0xE55D, 0x5B01}, //10236 #CJK UNIFIED IDEOGRAPH + {0xE55E, 0x5B07}, //10237 #CJK UNIFIED IDEOGRAPH + {0xE55F, 0x5B05}, //10238 #CJK UNIFIED IDEOGRAPH + {0xE560, 0x5B0F}, //10239 #CJK UNIFIED IDEOGRAPH + {0xE561, 0x5C67}, //10240 #CJK UNIFIED IDEOGRAPH + {0xE562, 0x5D99}, //10241 #CJK UNIFIED IDEOGRAPH + {0xE563, 0x5D97}, //10242 #CJK UNIFIED IDEOGRAPH + {0xE564, 0x5D9F}, //10243 #CJK UNIFIED IDEOGRAPH + {0xE565, 0x5D92}, //10244 #CJK UNIFIED IDEOGRAPH + {0xE566, 0x5DA2}, //10245 #CJK UNIFIED IDEOGRAPH + {0xE567, 0x5D93}, //10246 #CJK UNIFIED IDEOGRAPH + {0xE568, 0x5D95}, //10247 #CJK UNIFIED IDEOGRAPH + {0xE569, 0x5DA0}, //10248 #CJK UNIFIED IDEOGRAPH + {0xE56A, 0x5D9C}, //10249 #CJK UNIFIED IDEOGRAPH + {0xE56B, 0x5DA1}, //10250 #CJK UNIFIED IDEOGRAPH + {0xE56C, 0x5D9A}, //10251 #CJK UNIFIED IDEOGRAPH + {0xE56D, 0x5D9E}, //10252 #CJK UNIFIED IDEOGRAPH + {0xE56E, 0x5E69}, //10253 #CJK UNIFIED IDEOGRAPH + {0xE56F, 0x5E5D}, //10254 #CJK UNIFIED IDEOGRAPH + {0xE570, 0x5E60}, //10255 #CJK UNIFIED IDEOGRAPH + {0xE571, 0x5E5C}, //10256 #CJK UNIFIED IDEOGRAPH + {0xE572, 0x7DF3}, //10257 #CJK UNIFIED IDEOGRAPH + {0xE573, 0x5EDB}, //10258 #CJK UNIFIED IDEOGRAPH + {0xE574, 0x5EDE}, //10259 #CJK UNIFIED IDEOGRAPH + {0xE575, 0x5EE1}, //10260 #CJK UNIFIED IDEOGRAPH + {0xE576, 0x5F49}, //10261 #CJK UNIFIED IDEOGRAPH + {0xE577, 0x5FB2}, //10262 #CJK UNIFIED IDEOGRAPH + {0xE578, 0x618B}, //10263 #CJK UNIFIED IDEOGRAPH + {0xE579, 0x6183}, //10264 #CJK UNIFIED IDEOGRAPH + {0xE57A, 0x6179}, //10265 #CJK UNIFIED IDEOGRAPH + {0xE57B, 0x61B1}, //10266 #CJK UNIFIED IDEOGRAPH + {0xE57C, 0x61B0}, //10267 #CJK UNIFIED IDEOGRAPH + {0xE57D, 0x61A2}, //10268 #CJK UNIFIED IDEOGRAPH + {0xE57E, 0x6189}, //10269 #CJK UNIFIED IDEOGRAPH + {0xE5A1, 0x619B}, //10270 #CJK UNIFIED IDEOGRAPH + {0xE5A2, 0x6193}, //10271 #CJK UNIFIED IDEOGRAPH + {0xE5A3, 0x61AF}, //10272 #CJK UNIFIED IDEOGRAPH + {0xE5A4, 0x61AD}, //10273 #CJK UNIFIED IDEOGRAPH + {0xE5A5, 0x619F}, //10274 #CJK UNIFIED IDEOGRAPH + {0xE5A6, 0x6192}, //10275 #CJK UNIFIED IDEOGRAPH + {0xE5A7, 0x61AA}, //10276 #CJK UNIFIED IDEOGRAPH + {0xE5A8, 0x61A1}, //10277 #CJK UNIFIED IDEOGRAPH + {0xE5A9, 0x618D}, //10278 #CJK UNIFIED IDEOGRAPH + {0xE5AA, 0x6166}, //10279 #CJK UNIFIED IDEOGRAPH + {0xE5AB, 0x61B3}, //10280 #CJK UNIFIED IDEOGRAPH + {0xE5AC, 0x622D}, //10281 #CJK UNIFIED IDEOGRAPH + {0xE5AD, 0x646E}, //10282 #CJK UNIFIED IDEOGRAPH + {0xE5AE, 0x6470}, //10283 #CJK UNIFIED IDEOGRAPH + {0xE5AF, 0x6496}, //10284 #CJK UNIFIED IDEOGRAPH + {0xE5B0, 0x64A0}, //10285 #CJK UNIFIED IDEOGRAPH + {0xE5B1, 0x6485}, //10286 #CJK UNIFIED IDEOGRAPH + {0xE5B2, 0x6497}, //10287 #CJK UNIFIED IDEOGRAPH + {0xE5B3, 0x649C}, //10288 #CJK UNIFIED IDEOGRAPH + {0xE5B4, 0x648F}, //10289 #CJK UNIFIED IDEOGRAPH + {0xE5B5, 0x648B}, //10290 #CJK UNIFIED IDEOGRAPH + {0xE5B6, 0x648A}, //10291 #CJK UNIFIED IDEOGRAPH + {0xE5B7, 0x648C}, //10292 #CJK UNIFIED IDEOGRAPH + {0xE5B8, 0x64A3}, //10293 #CJK UNIFIED IDEOGRAPH + {0xE5B9, 0x649F}, //10294 #CJK UNIFIED IDEOGRAPH + {0xE5BA, 0x6468}, //10295 #CJK UNIFIED IDEOGRAPH + {0xE5BB, 0x64B1}, //10296 #CJK UNIFIED IDEOGRAPH + {0xE5BC, 0x6498}, //10297 #CJK UNIFIED IDEOGRAPH + {0xE5BD, 0x6576}, //10298 #CJK UNIFIED IDEOGRAPH + {0xE5BE, 0x657A}, //10299 #CJK UNIFIED IDEOGRAPH + {0xE5BF, 0x6579}, //10300 #CJK UNIFIED IDEOGRAPH + {0xE5C0, 0x657B}, //10301 #CJK UNIFIED IDEOGRAPH + {0xE5C1, 0x65B2}, //10302 #CJK UNIFIED IDEOGRAPH + {0xE5C2, 0x65B3}, //10303 #CJK UNIFIED IDEOGRAPH + {0xE5C3, 0x66B5}, //10304 #CJK UNIFIED IDEOGRAPH + {0xE5C4, 0x66B0}, //10305 #CJK UNIFIED IDEOGRAPH + {0xE5C5, 0x66A9}, //10306 #CJK UNIFIED IDEOGRAPH + {0xE5C6, 0x66B2}, //10307 #CJK UNIFIED IDEOGRAPH + {0xE5C7, 0x66B7}, //10308 #CJK UNIFIED IDEOGRAPH + {0xE5C8, 0x66AA}, //10309 #CJK UNIFIED IDEOGRAPH + {0xE5C9, 0x66AF}, //10310 #CJK UNIFIED IDEOGRAPH + {0xE5CA, 0x6A00}, //10311 #CJK UNIFIED IDEOGRAPH + {0xE5CB, 0x6A06}, //10312 #CJK UNIFIED IDEOGRAPH + {0xE5CC, 0x6A17}, //10313 #CJK UNIFIED IDEOGRAPH + {0xE5CD, 0x69E5}, //10314 #CJK UNIFIED IDEOGRAPH + {0xE5CE, 0x69F8}, //10315 #CJK UNIFIED IDEOGRAPH + {0xE5CF, 0x6A15}, //10316 #CJK UNIFIED IDEOGRAPH + {0xE5D0, 0x69F1}, //10317 #CJK UNIFIED IDEOGRAPH + {0xE5D1, 0x69E4}, //10318 #CJK UNIFIED IDEOGRAPH + {0xE5D2, 0x6A20}, //10319 #CJK UNIFIED IDEOGRAPH + {0xE5D3, 0x69FF}, //10320 #CJK UNIFIED IDEOGRAPH + {0xE5D4, 0x69EC}, //10321 #CJK UNIFIED IDEOGRAPH + {0xE5D5, 0x69E2}, //10322 #CJK UNIFIED IDEOGRAPH + {0xE5D6, 0x6A1B}, //10323 #CJK UNIFIED IDEOGRAPH + {0xE5D7, 0x6A1D}, //10324 #CJK UNIFIED IDEOGRAPH + {0xE5D8, 0x69FE}, //10325 #CJK UNIFIED IDEOGRAPH + {0xE5D9, 0x6A27}, //10326 #CJK UNIFIED IDEOGRAPH + {0xE5DA, 0x69F2}, //10327 #CJK UNIFIED IDEOGRAPH + {0xE5DB, 0x69EE}, //10328 #CJK UNIFIED IDEOGRAPH + {0xE5DC, 0x6A14}, //10329 #CJK UNIFIED IDEOGRAPH + {0xE5DD, 0x69F7}, //10330 #CJK UNIFIED IDEOGRAPH + {0xE5DE, 0x69E7}, //10331 #CJK UNIFIED IDEOGRAPH + {0xE5DF, 0x6A40}, //10332 #CJK UNIFIED IDEOGRAPH + {0xE5E0, 0x6A08}, //10333 #CJK UNIFIED IDEOGRAPH + {0xE5E1, 0x69E6}, //10334 #CJK UNIFIED IDEOGRAPH + {0xE5E2, 0x69FB}, //10335 #CJK UNIFIED IDEOGRAPH + {0xE5E3, 0x6A0D}, //10336 #CJK UNIFIED IDEOGRAPH + {0xE5E4, 0x69FC}, //10337 #CJK UNIFIED IDEOGRAPH + {0xE5E5, 0x69EB}, //10338 #CJK UNIFIED IDEOGRAPH + {0xE5E6, 0x6A09}, //10339 #CJK UNIFIED IDEOGRAPH + {0xE5E7, 0x6A04}, //10340 #CJK UNIFIED IDEOGRAPH + {0xE5E8, 0x6A18}, //10341 #CJK UNIFIED IDEOGRAPH + {0xE5E9, 0x6A25}, //10342 #CJK UNIFIED IDEOGRAPH + {0xE5EA, 0x6A0F}, //10343 #CJK UNIFIED IDEOGRAPH + {0xE5EB, 0x69F6}, //10344 #CJK UNIFIED IDEOGRAPH + {0xE5EC, 0x6A26}, //10345 #CJK UNIFIED IDEOGRAPH + {0xE5ED, 0x6A07}, //10346 #CJK UNIFIED IDEOGRAPH + {0xE5EE, 0x69F4}, //10347 #CJK UNIFIED IDEOGRAPH + {0xE5EF, 0x6A16}, //10348 #CJK UNIFIED IDEOGRAPH + {0xE5F0, 0x6B51}, //10349 #CJK UNIFIED IDEOGRAPH + {0xE5F1, 0x6BA5}, //10350 #CJK UNIFIED IDEOGRAPH + {0xE5F2, 0x6BA3}, //10351 #CJK UNIFIED IDEOGRAPH + {0xE5F3, 0x6BA2}, //10352 #CJK UNIFIED IDEOGRAPH + {0xE5F4, 0x6BA6}, //10353 #CJK UNIFIED IDEOGRAPH + {0xE5F5, 0x6C01}, //10354 #CJK UNIFIED IDEOGRAPH + {0xE5F6, 0x6C00}, //10355 #CJK UNIFIED IDEOGRAPH + {0xE5F7, 0x6BFF}, //10356 #CJK UNIFIED IDEOGRAPH + {0xE5F8, 0x6C02}, //10357 #CJK UNIFIED IDEOGRAPH + {0xE5F9, 0x6F41}, //10358 #CJK UNIFIED IDEOGRAPH + {0xE5FA, 0x6F26}, //10359 #CJK UNIFIED IDEOGRAPH + {0xE5FB, 0x6F7E}, //10360 #CJK UNIFIED IDEOGRAPH + {0xE5FC, 0x6F87}, //10361 #CJK UNIFIED IDEOGRAPH + {0xE5FD, 0x6FC6}, //10362 #CJK UNIFIED IDEOGRAPH + {0xE5FE, 0x6F92}, //10363 #CJK UNIFIED IDEOGRAPH + {0xE640, 0x6F8D}, //10364 #CJK UNIFIED IDEOGRAPH + {0xE641, 0x6F89}, //10365 #CJK UNIFIED IDEOGRAPH + {0xE642, 0x6F8C}, //10366 #CJK UNIFIED IDEOGRAPH + {0xE643, 0x6F62}, //10367 #CJK UNIFIED IDEOGRAPH + {0xE644, 0x6F4F}, //10368 #CJK UNIFIED IDEOGRAPH + {0xE645, 0x6F85}, //10369 #CJK UNIFIED IDEOGRAPH + {0xE646, 0x6F5A}, //10370 #CJK UNIFIED IDEOGRAPH + {0xE647, 0x6F96}, //10371 #CJK UNIFIED IDEOGRAPH + {0xE648, 0x6F76}, //10372 #CJK UNIFIED IDEOGRAPH + {0xE649, 0x6F6C}, //10373 #CJK UNIFIED IDEOGRAPH + {0xE64A, 0x6F82}, //10374 #CJK UNIFIED IDEOGRAPH + {0xE64B, 0x6F55}, //10375 #CJK UNIFIED IDEOGRAPH + {0xE64C, 0x6F72}, //10376 #CJK UNIFIED IDEOGRAPH + {0xE64D, 0x6F52}, //10377 #CJK UNIFIED IDEOGRAPH + {0xE64E, 0x6F50}, //10378 #CJK UNIFIED IDEOGRAPH + {0xE64F, 0x6F57}, //10379 #CJK UNIFIED IDEOGRAPH + {0xE650, 0x6F94}, //10380 #CJK UNIFIED IDEOGRAPH + {0xE651, 0x6F93}, //10381 #CJK UNIFIED IDEOGRAPH + {0xE652, 0x6F5D}, //10382 #CJK UNIFIED IDEOGRAPH + {0xE653, 0x6F00}, //10383 #CJK UNIFIED IDEOGRAPH + {0xE654, 0x6F61}, //10384 #CJK UNIFIED IDEOGRAPH + {0xE655, 0x6F6B}, //10385 #CJK UNIFIED IDEOGRAPH + {0xE656, 0x6F7D}, //10386 #CJK UNIFIED IDEOGRAPH + {0xE657, 0x6F67}, //10387 #CJK UNIFIED IDEOGRAPH + {0xE658, 0x6F90}, //10388 #CJK UNIFIED IDEOGRAPH + {0xE659, 0x6F53}, //10389 #CJK UNIFIED IDEOGRAPH + {0xE65A, 0x6F8B}, //10390 #CJK UNIFIED IDEOGRAPH + {0xE65B, 0x6F69}, //10391 #CJK UNIFIED IDEOGRAPH + {0xE65C, 0x6F7F}, //10392 #CJK UNIFIED IDEOGRAPH + {0xE65D, 0x6F95}, //10393 #CJK UNIFIED IDEOGRAPH + {0xE65E, 0x6F63}, //10394 #CJK UNIFIED IDEOGRAPH + {0xE65F, 0x6F77}, //10395 #CJK UNIFIED IDEOGRAPH + {0xE660, 0x6F6A}, //10396 #CJK UNIFIED IDEOGRAPH + {0xE661, 0x6F7B}, //10397 #CJK UNIFIED IDEOGRAPH + {0xE662, 0x71B2}, //10398 #CJK UNIFIED IDEOGRAPH + {0xE663, 0x71AF}, //10399 #CJK UNIFIED IDEOGRAPH + {0xE664, 0x719B}, //10400 #CJK UNIFIED IDEOGRAPH + {0xE665, 0x71B0}, //10401 #CJK UNIFIED IDEOGRAPH + {0xE666, 0x71A0}, //10402 #CJK UNIFIED IDEOGRAPH + {0xE667, 0x719A}, //10403 #CJK UNIFIED IDEOGRAPH + {0xE668, 0x71A9}, //10404 #CJK UNIFIED IDEOGRAPH + {0xE669, 0x71B5}, //10405 #CJK UNIFIED IDEOGRAPH + {0xE66A, 0x719D}, //10406 #CJK UNIFIED IDEOGRAPH + {0xE66B, 0x71A5}, //10407 #CJK UNIFIED IDEOGRAPH + {0xE66C, 0x719E}, //10408 #CJK UNIFIED IDEOGRAPH + {0xE66D, 0x71A4}, //10409 #CJK UNIFIED IDEOGRAPH + {0xE66E, 0x71A1}, //10410 #CJK UNIFIED IDEOGRAPH + {0xE66F, 0x71AA}, //10411 #CJK UNIFIED IDEOGRAPH + {0xE670, 0x719C}, //10412 #CJK UNIFIED IDEOGRAPH + {0xE671, 0x71A7}, //10413 #CJK UNIFIED IDEOGRAPH + {0xE672, 0x71B3}, //10414 #CJK UNIFIED IDEOGRAPH + {0xE673, 0x7298}, //10415 #CJK UNIFIED IDEOGRAPH + {0xE674, 0x729A}, //10416 #CJK UNIFIED IDEOGRAPH + {0xE675, 0x7358}, //10417 #CJK UNIFIED IDEOGRAPH + {0xE676, 0x7352}, //10418 #CJK UNIFIED IDEOGRAPH + {0xE677, 0x735E}, //10419 #CJK UNIFIED IDEOGRAPH + {0xE678, 0x735F}, //10420 #CJK UNIFIED IDEOGRAPH + {0xE679, 0x7360}, //10421 #CJK UNIFIED IDEOGRAPH + {0xE67A, 0x735D}, //10422 #CJK UNIFIED IDEOGRAPH + {0xE67B, 0x735B}, //10423 #CJK UNIFIED IDEOGRAPH + {0xE67C, 0x7361}, //10424 #CJK UNIFIED IDEOGRAPH + {0xE67D, 0x735A}, //10425 #CJK UNIFIED IDEOGRAPH + {0xE67E, 0x7359}, //10426 #CJK UNIFIED IDEOGRAPH + {0xE6A1, 0x7362}, //10427 #CJK UNIFIED IDEOGRAPH + {0xE6A2, 0x7487}, //10428 #CJK UNIFIED IDEOGRAPH + {0xE6A3, 0x7489}, //10429 #CJK UNIFIED IDEOGRAPH + {0xE6A4, 0x748A}, //10430 #CJK UNIFIED IDEOGRAPH + {0xE6A5, 0x7486}, //10431 #CJK UNIFIED IDEOGRAPH + {0xE6A6, 0x7481}, //10432 #CJK UNIFIED IDEOGRAPH + {0xE6A7, 0x747D}, //10433 #CJK UNIFIED IDEOGRAPH + {0xE6A8, 0x7485}, //10434 #CJK UNIFIED IDEOGRAPH + {0xE6A9, 0x7488}, //10435 #CJK UNIFIED IDEOGRAPH + {0xE6AA, 0x747C}, //10436 #CJK UNIFIED IDEOGRAPH + {0xE6AB, 0x7479}, //10437 #CJK UNIFIED IDEOGRAPH + {0xE6AC, 0x7508}, //10438 #CJK UNIFIED IDEOGRAPH + {0xE6AD, 0x7507}, //10439 #CJK UNIFIED IDEOGRAPH + {0xE6AE, 0x757E}, //10440 #CJK UNIFIED IDEOGRAPH + {0xE6AF, 0x7625}, //10441 #CJK UNIFIED IDEOGRAPH + {0xE6B0, 0x761E}, //10442 #CJK UNIFIED IDEOGRAPH + {0xE6B1, 0x7619}, //10443 #CJK UNIFIED IDEOGRAPH + {0xE6B2, 0x761D}, //10444 #CJK UNIFIED IDEOGRAPH + {0xE6B3, 0x761C}, //10445 #CJK UNIFIED IDEOGRAPH + {0xE6B4, 0x7623}, //10446 #CJK UNIFIED IDEOGRAPH + {0xE6B5, 0x761A}, //10447 #CJK UNIFIED IDEOGRAPH + {0xE6B6, 0x7628}, //10448 #CJK UNIFIED IDEOGRAPH + {0xE6B7, 0x761B}, //10449 #CJK UNIFIED IDEOGRAPH + {0xE6B8, 0x769C}, //10450 #CJK UNIFIED IDEOGRAPH + {0xE6B9, 0x769D}, //10451 #CJK UNIFIED IDEOGRAPH + {0xE6BA, 0x769E}, //10452 #CJK UNIFIED IDEOGRAPH + {0xE6BB, 0x769B}, //10453 #CJK UNIFIED IDEOGRAPH + {0xE6BC, 0x778D}, //10454 #CJK UNIFIED IDEOGRAPH + {0xE6BD, 0x778F}, //10455 #CJK UNIFIED IDEOGRAPH + {0xE6BE, 0x7789}, //10456 #CJK UNIFIED IDEOGRAPH + {0xE6BF, 0x7788}, //10457 #CJK UNIFIED IDEOGRAPH + {0xE6C0, 0x78CD}, //10458 #CJK UNIFIED IDEOGRAPH + {0xE6C1, 0x78BB}, //10459 #CJK UNIFIED IDEOGRAPH + {0xE6C2, 0x78CF}, //10460 #CJK UNIFIED IDEOGRAPH + {0xE6C3, 0x78CC}, //10461 #CJK UNIFIED IDEOGRAPH + {0xE6C4, 0x78D1}, //10462 #CJK UNIFIED IDEOGRAPH + {0xE6C5, 0x78CE}, //10463 #CJK UNIFIED IDEOGRAPH + {0xE6C6, 0x78D4}, //10464 #CJK UNIFIED IDEOGRAPH + {0xE6C7, 0x78C8}, //10465 #CJK UNIFIED IDEOGRAPH + {0xE6C8, 0x78C3}, //10466 #CJK UNIFIED IDEOGRAPH + {0xE6C9, 0x78C4}, //10467 #CJK UNIFIED IDEOGRAPH + {0xE6CA, 0x78C9}, //10468 #CJK UNIFIED IDEOGRAPH + {0xE6CB, 0x799A}, //10469 #CJK UNIFIED IDEOGRAPH + {0xE6CC, 0x79A1}, //10470 #CJK UNIFIED IDEOGRAPH + {0xE6CD, 0x79A0}, //10471 #CJK UNIFIED IDEOGRAPH + {0xE6CE, 0x799C}, //10472 #CJK UNIFIED IDEOGRAPH + {0xE6CF, 0x79A2}, //10473 #CJK UNIFIED IDEOGRAPH + {0xE6D0, 0x799B}, //10474 #CJK UNIFIED IDEOGRAPH + {0xE6D1, 0x6B76}, //10475 #CJK UNIFIED IDEOGRAPH + {0xE6D2, 0x7A39}, //10476 #CJK UNIFIED IDEOGRAPH + {0xE6D3, 0x7AB2}, //10477 #CJK UNIFIED IDEOGRAPH + {0xE6D4, 0x7AB4}, //10478 #CJK UNIFIED IDEOGRAPH + {0xE6D5, 0x7AB3}, //10479 #CJK UNIFIED IDEOGRAPH + {0xE6D6, 0x7BB7}, //10480 #CJK UNIFIED IDEOGRAPH + {0xE6D7, 0x7BCB}, //10481 #CJK UNIFIED IDEOGRAPH + {0xE6D8, 0x7BBE}, //10482 #CJK UNIFIED IDEOGRAPH + {0xE6D9, 0x7BAC}, //10483 #CJK UNIFIED IDEOGRAPH + {0xE6DA, 0x7BCE}, //10484 #CJK UNIFIED IDEOGRAPH + {0xE6DB, 0x7BAF}, //10485 #CJK UNIFIED IDEOGRAPH + {0xE6DC, 0x7BB9}, //10486 #CJK UNIFIED IDEOGRAPH + {0xE6DD, 0x7BCA}, //10487 #CJK UNIFIED IDEOGRAPH + {0xE6DE, 0x7BB5}, //10488 #CJK UNIFIED IDEOGRAPH + {0xE6DF, 0x7CC5}, //10489 #CJK UNIFIED IDEOGRAPH + {0xE6E0, 0x7CC8}, //10490 #CJK UNIFIED IDEOGRAPH + {0xE6E1, 0x7CCC}, //10491 #CJK UNIFIED IDEOGRAPH + {0xE6E2, 0x7CCB}, //10492 #CJK UNIFIED IDEOGRAPH + {0xE6E3, 0x7DF7}, //10493 #CJK UNIFIED IDEOGRAPH + {0xE6E4, 0x7DDB}, //10494 #CJK UNIFIED IDEOGRAPH + {0xE6E5, 0x7DEA}, //10495 #CJK UNIFIED IDEOGRAPH + {0xE6E6, 0x7DE7}, //10496 #CJK UNIFIED IDEOGRAPH + {0xE6E7, 0x7DD7}, //10497 #CJK UNIFIED IDEOGRAPH + {0xE6E8, 0x7DE1}, //10498 #CJK UNIFIED IDEOGRAPH + {0xE6E9, 0x7E03}, //10499 #CJK UNIFIED IDEOGRAPH + {0xE6EA, 0x7DFA}, //10500 #CJK UNIFIED IDEOGRAPH + {0xE6EB, 0x7DE6}, //10501 #CJK UNIFIED IDEOGRAPH + {0xE6EC, 0x7DF6}, //10502 #CJK UNIFIED IDEOGRAPH + {0xE6ED, 0x7DF1}, //10503 #CJK UNIFIED IDEOGRAPH + {0xE6EE, 0x7DF0}, //10504 #CJK UNIFIED IDEOGRAPH + {0xE6EF, 0x7DEE}, //10505 #CJK UNIFIED IDEOGRAPH + {0xE6F0, 0x7DDF}, //10506 #CJK UNIFIED IDEOGRAPH + {0xE6F1, 0x7F76}, //10507 #CJK UNIFIED IDEOGRAPH + {0xE6F2, 0x7FAC}, //10508 #CJK UNIFIED IDEOGRAPH + {0xE6F3, 0x7FB0}, //10509 #CJK UNIFIED IDEOGRAPH + {0xE6F4, 0x7FAD}, //10510 #CJK UNIFIED IDEOGRAPH + {0xE6F5, 0x7FED}, //10511 #CJK UNIFIED IDEOGRAPH + {0xE6F6, 0x7FEB}, //10512 #CJK UNIFIED IDEOGRAPH + {0xE6F7, 0x7FEA}, //10513 #CJK UNIFIED IDEOGRAPH + {0xE6F8, 0x7FEC}, //10514 #CJK UNIFIED IDEOGRAPH + {0xE6F9, 0x7FE6}, //10515 #CJK UNIFIED IDEOGRAPH + {0xE6FA, 0x7FE8}, //10516 #CJK UNIFIED IDEOGRAPH + {0xE6FB, 0x8064}, //10517 #CJK UNIFIED IDEOGRAPH + {0xE6FC, 0x8067}, //10518 #CJK UNIFIED IDEOGRAPH + {0xE6FD, 0x81A3}, //10519 #CJK UNIFIED IDEOGRAPH + {0xE6FE, 0x819F}, //10520 #CJK UNIFIED IDEOGRAPH + {0xE740, 0x819E}, //10521 #CJK UNIFIED IDEOGRAPH + {0xE741, 0x8195}, //10522 #CJK UNIFIED IDEOGRAPH + {0xE742, 0x81A2}, //10523 #CJK UNIFIED IDEOGRAPH + {0xE743, 0x8199}, //10524 #CJK UNIFIED IDEOGRAPH + {0xE744, 0x8197}, //10525 #CJK UNIFIED IDEOGRAPH + {0xE745, 0x8216}, //10526 #CJK UNIFIED IDEOGRAPH + {0xE746, 0x824F}, //10527 #CJK UNIFIED IDEOGRAPH + {0xE747, 0x8253}, //10528 #CJK UNIFIED IDEOGRAPH + {0xE748, 0x8252}, //10529 #CJK UNIFIED IDEOGRAPH + {0xE749, 0x8250}, //10530 #CJK UNIFIED IDEOGRAPH + {0xE74A, 0x824E}, //10531 #CJK UNIFIED IDEOGRAPH + {0xE74B, 0x8251}, //10532 #CJK UNIFIED IDEOGRAPH + {0xE74C, 0x8524}, //10533 #CJK UNIFIED IDEOGRAPH + {0xE74D, 0x853B}, //10534 #CJK UNIFIED IDEOGRAPH + {0xE74E, 0x850F}, //10535 #CJK UNIFIED IDEOGRAPH + {0xE74F, 0x8500}, //10536 #CJK UNIFIED IDEOGRAPH + {0xE750, 0x8529}, //10537 #CJK UNIFIED IDEOGRAPH + {0xE751, 0x850E}, //10538 #CJK UNIFIED IDEOGRAPH + {0xE752, 0x8509}, //10539 #CJK UNIFIED IDEOGRAPH + {0xE753, 0x850D}, //10540 #CJK UNIFIED IDEOGRAPH + {0xE754, 0x851F}, //10541 #CJK UNIFIED IDEOGRAPH + {0xE755, 0x850A}, //10542 #CJK UNIFIED IDEOGRAPH + {0xE756, 0x8527}, //10543 #CJK UNIFIED IDEOGRAPH + {0xE757, 0x851C}, //10544 #CJK UNIFIED IDEOGRAPH + {0xE758, 0x84FB}, //10545 #CJK UNIFIED IDEOGRAPH + {0xE759, 0x852B}, //10546 #CJK UNIFIED IDEOGRAPH + {0xE75A, 0x84FA}, //10547 #CJK UNIFIED IDEOGRAPH + {0xE75B, 0x8508}, //10548 #CJK UNIFIED IDEOGRAPH + {0xE75C, 0x850C}, //10549 #CJK UNIFIED IDEOGRAPH + {0xE75D, 0x84F4}, //10550 #CJK UNIFIED IDEOGRAPH + {0xE75E, 0x852A}, //10551 #CJK UNIFIED IDEOGRAPH + {0xE75F, 0x84F2}, //10552 #CJK UNIFIED IDEOGRAPH + {0xE760, 0x8515}, //10553 #CJK UNIFIED IDEOGRAPH + {0xE761, 0x84F7}, //10554 #CJK UNIFIED IDEOGRAPH + {0xE762, 0x84EB}, //10555 #CJK UNIFIED IDEOGRAPH + {0xE763, 0x84F3}, //10556 #CJK UNIFIED IDEOGRAPH + {0xE764, 0x84FC}, //10557 #CJK UNIFIED IDEOGRAPH + {0xE765, 0x8512}, //10558 #CJK UNIFIED IDEOGRAPH + {0xE766, 0x84EA}, //10559 #CJK UNIFIED IDEOGRAPH + {0xE767, 0x84E9}, //10560 #CJK UNIFIED IDEOGRAPH + {0xE768, 0x8516}, //10561 #CJK UNIFIED IDEOGRAPH + {0xE769, 0x84FE}, //10562 #CJK UNIFIED IDEOGRAPH + {0xE76A, 0x8528}, //10563 #CJK UNIFIED IDEOGRAPH + {0xE76B, 0x851D}, //10564 #CJK UNIFIED IDEOGRAPH + {0xE76C, 0x852E}, //10565 #CJK UNIFIED IDEOGRAPH + {0xE76D, 0x8502}, //10566 #CJK UNIFIED IDEOGRAPH + {0xE76E, 0x84FD}, //10567 #CJK UNIFIED IDEOGRAPH + {0xE76F, 0x851E}, //10568 #CJK UNIFIED IDEOGRAPH + {0xE770, 0x84F6}, //10569 #CJK UNIFIED IDEOGRAPH + {0xE771, 0x8531}, //10570 #CJK UNIFIED IDEOGRAPH + {0xE772, 0x8526}, //10571 #CJK UNIFIED IDEOGRAPH + {0xE773, 0x84E7}, //10572 #CJK UNIFIED IDEOGRAPH + {0xE774, 0x84E8}, //10573 #CJK UNIFIED IDEOGRAPH + {0xE775, 0x84F0}, //10574 #CJK UNIFIED IDEOGRAPH + {0xE776, 0x84EF}, //10575 #CJK UNIFIED IDEOGRAPH + {0xE777, 0x84F9}, //10576 #CJK UNIFIED IDEOGRAPH + {0xE778, 0x8518}, //10577 #CJK UNIFIED IDEOGRAPH + {0xE779, 0x8520}, //10578 #CJK UNIFIED IDEOGRAPH + {0xE77A, 0x8530}, //10579 #CJK UNIFIED IDEOGRAPH + {0xE77B, 0x850B}, //10580 #CJK UNIFIED IDEOGRAPH + {0xE77C, 0x8519}, //10581 #CJK UNIFIED IDEOGRAPH + {0xE77D, 0x852F}, //10582 #CJK UNIFIED IDEOGRAPH + {0xE77E, 0x8662}, //10583 #CJK UNIFIED IDEOGRAPH + {0xE7A1, 0x8756}, //10584 #CJK UNIFIED IDEOGRAPH + {0xE7A2, 0x8763}, //10585 #CJK UNIFIED IDEOGRAPH + {0xE7A3, 0x8764}, //10586 #CJK UNIFIED IDEOGRAPH + {0xE7A4, 0x8777}, //10587 #CJK UNIFIED IDEOGRAPH + {0xE7A5, 0x87E1}, //10588 #CJK UNIFIED IDEOGRAPH + {0xE7A6, 0x8773}, //10589 #CJK UNIFIED IDEOGRAPH + {0xE7A7, 0x8758}, //10590 #CJK UNIFIED IDEOGRAPH + {0xE7A8, 0x8754}, //10591 #CJK UNIFIED IDEOGRAPH + {0xE7A9, 0x875B}, //10592 #CJK UNIFIED IDEOGRAPH + {0xE7AA, 0x8752}, //10593 #CJK UNIFIED IDEOGRAPH + {0xE7AB, 0x8761}, //10594 #CJK UNIFIED IDEOGRAPH + {0xE7AC, 0x875A}, //10595 #CJK UNIFIED IDEOGRAPH + {0xE7AD, 0x8751}, //10596 #CJK UNIFIED IDEOGRAPH + {0xE7AE, 0x875E}, //10597 #CJK UNIFIED IDEOGRAPH + {0xE7AF, 0x876D}, //10598 #CJK UNIFIED IDEOGRAPH + {0xE7B0, 0x876A}, //10599 #CJK UNIFIED IDEOGRAPH + {0xE7B1, 0x8750}, //10600 #CJK UNIFIED IDEOGRAPH + {0xE7B2, 0x874E}, //10601 #CJK UNIFIED IDEOGRAPH + {0xE7B3, 0x875F}, //10602 #CJK UNIFIED IDEOGRAPH + {0xE7B4, 0x875D}, //10603 #CJK UNIFIED IDEOGRAPH + {0xE7B5, 0x876F}, //10604 #CJK UNIFIED IDEOGRAPH + {0xE7B6, 0x876C}, //10605 #CJK UNIFIED IDEOGRAPH + {0xE7B7, 0x877A}, //10606 #CJK UNIFIED IDEOGRAPH + {0xE7B8, 0x876E}, //10607 #CJK UNIFIED IDEOGRAPH + {0xE7B9, 0x875C}, //10608 #CJK UNIFIED IDEOGRAPH + {0xE7BA, 0x8765}, //10609 #CJK UNIFIED IDEOGRAPH + {0xE7BB, 0x874F}, //10610 #CJK UNIFIED IDEOGRAPH + {0xE7BC, 0x877B}, //10611 #CJK UNIFIED IDEOGRAPH + {0xE7BD, 0x8775}, //10612 #CJK UNIFIED IDEOGRAPH + {0xE7BE, 0x8762}, //10613 #CJK UNIFIED IDEOGRAPH + {0xE7BF, 0x8767}, //10614 #CJK UNIFIED IDEOGRAPH + {0xE7C0, 0x8769}, //10615 #CJK UNIFIED IDEOGRAPH + {0xE7C1, 0x885A}, //10616 #CJK UNIFIED IDEOGRAPH + {0xE7C2, 0x8905}, //10617 #CJK UNIFIED IDEOGRAPH + {0xE7C3, 0x890C}, //10618 #CJK UNIFIED IDEOGRAPH + {0xE7C4, 0x8914}, //10619 #CJK UNIFIED IDEOGRAPH + {0xE7C5, 0x890B}, //10620 #CJK UNIFIED IDEOGRAPH + {0xE7C6, 0x8917}, //10621 #CJK UNIFIED IDEOGRAPH + {0xE7C7, 0x8918}, //10622 #CJK UNIFIED IDEOGRAPH + {0xE7C8, 0x8919}, //10623 #CJK UNIFIED IDEOGRAPH + {0xE7C9, 0x8906}, //10624 #CJK UNIFIED IDEOGRAPH + {0xE7CA, 0x8916}, //10625 #CJK UNIFIED IDEOGRAPH + {0xE7CB, 0x8911}, //10626 #CJK UNIFIED IDEOGRAPH + {0xE7CC, 0x890E}, //10627 #CJK UNIFIED IDEOGRAPH + {0xE7CD, 0x8909}, //10628 #CJK UNIFIED IDEOGRAPH + {0xE7CE, 0x89A2}, //10629 #CJK UNIFIED IDEOGRAPH + {0xE7CF, 0x89A4}, //10630 #CJK UNIFIED IDEOGRAPH + {0xE7D0, 0x89A3}, //10631 #CJK UNIFIED IDEOGRAPH + {0xE7D1, 0x89ED}, //10632 #CJK UNIFIED IDEOGRAPH + {0xE7D2, 0x89F0}, //10633 #CJK UNIFIED IDEOGRAPH + {0xE7D3, 0x89EC}, //10634 #CJK UNIFIED IDEOGRAPH + {0xE7D4, 0x8ACF}, //10635 #CJK UNIFIED IDEOGRAPH + {0xE7D5, 0x8AC6}, //10636 #CJK UNIFIED IDEOGRAPH + {0xE7D6, 0x8AB8}, //10637 #CJK UNIFIED IDEOGRAPH + {0xE7D7, 0x8AD3}, //10638 #CJK UNIFIED IDEOGRAPH + {0xE7D8, 0x8AD1}, //10639 #CJK UNIFIED IDEOGRAPH + {0xE7D9, 0x8AD4}, //10640 #CJK UNIFIED IDEOGRAPH + {0xE7DA, 0x8AD5}, //10641 #CJK UNIFIED IDEOGRAPH + {0xE7DB, 0x8ABB}, //10642 #CJK UNIFIED IDEOGRAPH + {0xE7DC, 0x8AD7}, //10643 #CJK UNIFIED IDEOGRAPH + {0xE7DD, 0x8ABE}, //10644 #CJK UNIFIED IDEOGRAPH + {0xE7DE, 0x8AC0}, //10645 #CJK UNIFIED IDEOGRAPH + {0xE7DF, 0x8AC5}, //10646 #CJK UNIFIED IDEOGRAPH + {0xE7E0, 0x8AD8}, //10647 #CJK UNIFIED IDEOGRAPH + {0xE7E1, 0x8AC3}, //10648 #CJK UNIFIED IDEOGRAPH + {0xE7E2, 0x8ABA}, //10649 #CJK UNIFIED IDEOGRAPH + {0xE7E3, 0x8ABD}, //10650 #CJK UNIFIED IDEOGRAPH + {0xE7E4, 0x8AD9}, //10651 #CJK UNIFIED IDEOGRAPH + {0xE7E5, 0x8C3E}, //10652 #CJK UNIFIED IDEOGRAPH + {0xE7E6, 0x8C4D}, //10653 #CJK UNIFIED IDEOGRAPH + {0xE7E7, 0x8C8F}, //10654 #CJK UNIFIED IDEOGRAPH + {0xE7E8, 0x8CE5}, //10655 #CJK UNIFIED IDEOGRAPH + {0xE7E9, 0x8CDF}, //10656 #CJK UNIFIED IDEOGRAPH + {0xE7EA, 0x8CD9}, //10657 #CJK UNIFIED IDEOGRAPH + {0xE7EB, 0x8CE8}, //10658 #CJK UNIFIED IDEOGRAPH + {0xE7EC, 0x8CDA}, //10659 #CJK UNIFIED IDEOGRAPH + {0xE7ED, 0x8CDD}, //10660 #CJK UNIFIED IDEOGRAPH + {0xE7EE, 0x8CE7}, //10661 #CJK UNIFIED IDEOGRAPH + {0xE7EF, 0x8DA0}, //10662 #CJK UNIFIED IDEOGRAPH + {0xE7F0, 0x8D9C}, //10663 #CJK UNIFIED IDEOGRAPH + {0xE7F1, 0x8DA1}, //10664 #CJK UNIFIED IDEOGRAPH + {0xE7F2, 0x8D9B}, //10665 #CJK UNIFIED IDEOGRAPH + {0xE7F3, 0x8E20}, //10666 #CJK UNIFIED IDEOGRAPH + {0xE7F4, 0x8E23}, //10667 #CJK UNIFIED IDEOGRAPH + {0xE7F5, 0x8E25}, //10668 #CJK UNIFIED IDEOGRAPH + {0xE7F6, 0x8E24}, //10669 #CJK UNIFIED IDEOGRAPH + {0xE7F7, 0x8E2E}, //10670 #CJK UNIFIED IDEOGRAPH + {0xE7F8, 0x8E15}, //10671 #CJK UNIFIED IDEOGRAPH + {0xE7F9, 0x8E1B}, //10672 #CJK UNIFIED IDEOGRAPH + {0xE7FA, 0x8E16}, //10673 #CJK UNIFIED IDEOGRAPH + {0xE7FB, 0x8E11}, //10674 #CJK UNIFIED IDEOGRAPH + {0xE7FC, 0x8E19}, //10675 #CJK UNIFIED IDEOGRAPH + {0xE7FD, 0x8E26}, //10676 #CJK UNIFIED IDEOGRAPH + {0xE7FE, 0x8E27}, //10677 #CJK UNIFIED IDEOGRAPH + {0xE840, 0x8E14}, //10678 #CJK UNIFIED IDEOGRAPH + {0xE841, 0x8E12}, //10679 #CJK UNIFIED IDEOGRAPH + {0xE842, 0x8E18}, //10680 #CJK UNIFIED IDEOGRAPH + {0xE843, 0x8E13}, //10681 #CJK UNIFIED IDEOGRAPH + {0xE844, 0x8E1C}, //10682 #CJK UNIFIED IDEOGRAPH + {0xE845, 0x8E17}, //10683 #CJK UNIFIED IDEOGRAPH + {0xE846, 0x8E1A}, //10684 #CJK UNIFIED IDEOGRAPH + {0xE847, 0x8F2C}, //10685 #CJK UNIFIED IDEOGRAPH + {0xE848, 0x8F24}, //10686 #CJK UNIFIED IDEOGRAPH + {0xE849, 0x8F18}, //10687 #CJK UNIFIED IDEOGRAPH + {0xE84A, 0x8F1A}, //10688 #CJK UNIFIED IDEOGRAPH + {0xE84B, 0x8F20}, //10689 #CJK UNIFIED IDEOGRAPH + {0xE84C, 0x8F23}, //10690 #CJK UNIFIED IDEOGRAPH + {0xE84D, 0x8F16}, //10691 #CJK UNIFIED IDEOGRAPH + {0xE84E, 0x8F17}, //10692 #CJK UNIFIED IDEOGRAPH + {0xE84F, 0x9073}, //10693 #CJK UNIFIED IDEOGRAPH + {0xE850, 0x9070}, //10694 #CJK UNIFIED IDEOGRAPH + {0xE851, 0x906F}, //10695 #CJK UNIFIED IDEOGRAPH + {0xE852, 0x9067}, //10696 #CJK UNIFIED IDEOGRAPH + {0xE853, 0x906B}, //10697 #CJK UNIFIED IDEOGRAPH + {0xE854, 0x912F}, //10698 #CJK UNIFIED IDEOGRAPH + {0xE855, 0x912B}, //10699 #CJK UNIFIED IDEOGRAPH + {0xE856, 0x9129}, //10700 #CJK UNIFIED IDEOGRAPH + {0xE857, 0x912A}, //10701 #CJK UNIFIED IDEOGRAPH + {0xE858, 0x9132}, //10702 #CJK UNIFIED IDEOGRAPH + {0xE859, 0x9126}, //10703 #CJK UNIFIED IDEOGRAPH + {0xE85A, 0x912E}, //10704 #CJK UNIFIED IDEOGRAPH + {0xE85B, 0x9185}, //10705 #CJK UNIFIED IDEOGRAPH + {0xE85C, 0x9186}, //10706 #CJK UNIFIED IDEOGRAPH + {0xE85D, 0x918A}, //10707 #CJK UNIFIED IDEOGRAPH + {0xE85E, 0x9181}, //10708 #CJK UNIFIED IDEOGRAPH + {0xE85F, 0x9182}, //10709 #CJK UNIFIED IDEOGRAPH + {0xE860, 0x9184}, //10710 #CJK UNIFIED IDEOGRAPH + {0xE861, 0x9180}, //10711 #CJK UNIFIED IDEOGRAPH + {0xE862, 0x92D0}, //10712 #CJK UNIFIED IDEOGRAPH + {0xE863, 0x92C3}, //10713 #CJK UNIFIED IDEOGRAPH + {0xE864, 0x92C4}, //10714 #CJK UNIFIED IDEOGRAPH + {0xE865, 0x92C0}, //10715 #CJK UNIFIED IDEOGRAPH + {0xE866, 0x92D9}, //10716 #CJK UNIFIED IDEOGRAPH + {0xE867, 0x92B6}, //10717 #CJK UNIFIED IDEOGRAPH + {0xE868, 0x92CF}, //10718 #CJK UNIFIED IDEOGRAPH + {0xE869, 0x92F1}, //10719 #CJK UNIFIED IDEOGRAPH + {0xE86A, 0x92DF}, //10720 #CJK UNIFIED IDEOGRAPH + {0xE86B, 0x92D8}, //10721 #CJK UNIFIED IDEOGRAPH + {0xE86C, 0x92E9}, //10722 #CJK UNIFIED IDEOGRAPH + {0xE86D, 0x92D7}, //10723 #CJK UNIFIED IDEOGRAPH + {0xE86E, 0x92DD}, //10724 #CJK UNIFIED IDEOGRAPH + {0xE86F, 0x92CC}, //10725 #CJK UNIFIED IDEOGRAPH + {0xE870, 0x92EF}, //10726 #CJK UNIFIED IDEOGRAPH + {0xE871, 0x92C2}, //10727 #CJK UNIFIED IDEOGRAPH + {0xE872, 0x92E8}, //10728 #CJK UNIFIED IDEOGRAPH + {0xE873, 0x92CA}, //10729 #CJK UNIFIED IDEOGRAPH + {0xE874, 0x92C8}, //10730 #CJK UNIFIED IDEOGRAPH + {0xE875, 0x92CE}, //10731 #CJK UNIFIED IDEOGRAPH + {0xE876, 0x92E6}, //10732 #CJK UNIFIED IDEOGRAPH + {0xE877, 0x92CD}, //10733 #CJK UNIFIED IDEOGRAPH + {0xE878, 0x92D5}, //10734 #CJK UNIFIED IDEOGRAPH + {0xE879, 0x92C9}, //10735 #CJK UNIFIED IDEOGRAPH + {0xE87A, 0x92E0}, //10736 #CJK UNIFIED IDEOGRAPH + {0xE87B, 0x92DE}, //10737 #CJK UNIFIED IDEOGRAPH + {0xE87C, 0x92E7}, //10738 #CJK UNIFIED IDEOGRAPH + {0xE87D, 0x92D1}, //10739 #CJK UNIFIED IDEOGRAPH + {0xE87E, 0x92D3}, //10740 #CJK UNIFIED IDEOGRAPH + {0xE8A1, 0x92B5}, //10741 #CJK UNIFIED IDEOGRAPH + {0xE8A2, 0x92E1}, //10742 #CJK UNIFIED IDEOGRAPH + {0xE8A3, 0x92C6}, //10743 #CJK UNIFIED IDEOGRAPH + {0xE8A4, 0x92B4}, //10744 #CJK UNIFIED IDEOGRAPH + {0xE8A5, 0x957C}, //10745 #CJK UNIFIED IDEOGRAPH + {0xE8A6, 0x95AC}, //10746 #CJK UNIFIED IDEOGRAPH + {0xE8A7, 0x95AB}, //10747 #CJK UNIFIED IDEOGRAPH + {0xE8A8, 0x95AE}, //10748 #CJK UNIFIED IDEOGRAPH + {0xE8A9, 0x95B0}, //10749 #CJK UNIFIED IDEOGRAPH + {0xE8AA, 0x96A4}, //10750 #CJK UNIFIED IDEOGRAPH + {0xE8AB, 0x96A2}, //10751 #CJK UNIFIED IDEOGRAPH + {0xE8AC, 0x96D3}, //10752 #CJK UNIFIED IDEOGRAPH + {0xE8AD, 0x9705}, //10753 #CJK UNIFIED IDEOGRAPH + {0xE8AE, 0x9708}, //10754 #CJK UNIFIED IDEOGRAPH + {0xE8AF, 0x9702}, //10755 #CJK UNIFIED IDEOGRAPH + {0xE8B0, 0x975A}, //10756 #CJK UNIFIED IDEOGRAPH + {0xE8B1, 0x978A}, //10757 #CJK UNIFIED IDEOGRAPH + {0xE8B2, 0x978E}, //10758 #CJK UNIFIED IDEOGRAPH + {0xE8B3, 0x9788}, //10759 #CJK UNIFIED IDEOGRAPH + {0xE8B4, 0x97D0}, //10760 #CJK UNIFIED IDEOGRAPH + {0xE8B5, 0x97CF}, //10761 #CJK UNIFIED IDEOGRAPH + {0xE8B6, 0x981E}, //10762 #CJK UNIFIED IDEOGRAPH + {0xE8B7, 0x981D}, //10763 #CJK UNIFIED IDEOGRAPH + {0xE8B8, 0x9826}, //10764 #CJK UNIFIED IDEOGRAPH + {0xE8B9, 0x9829}, //10765 #CJK UNIFIED IDEOGRAPH + {0xE8BA, 0x9828}, //10766 #CJK UNIFIED IDEOGRAPH + {0xE8BB, 0x9820}, //10767 #CJK UNIFIED IDEOGRAPH + {0xE8BC, 0x981B}, //10768 #CJK UNIFIED IDEOGRAPH + {0xE8BD, 0x9827}, //10769 #CJK UNIFIED IDEOGRAPH + {0xE8BE, 0x98B2}, //10770 #CJK UNIFIED IDEOGRAPH + {0xE8BF, 0x9908}, //10771 #CJK UNIFIED IDEOGRAPH + {0xE8C0, 0x98FA}, //10772 #CJK UNIFIED IDEOGRAPH + {0xE8C1, 0x9911}, //10773 #CJK UNIFIED IDEOGRAPH + {0xE8C2, 0x9914}, //10774 #CJK UNIFIED IDEOGRAPH + {0xE8C3, 0x9916}, //10775 #CJK UNIFIED IDEOGRAPH + {0xE8C4, 0x9917}, //10776 #CJK UNIFIED IDEOGRAPH + {0xE8C5, 0x9915}, //10777 #CJK UNIFIED IDEOGRAPH + {0xE8C6, 0x99DC}, //10778 #CJK UNIFIED IDEOGRAPH + {0xE8C7, 0x99CD}, //10779 #CJK UNIFIED IDEOGRAPH + {0xE8C8, 0x99CF}, //10780 #CJK UNIFIED IDEOGRAPH + {0xE8C9, 0x99D3}, //10781 #CJK UNIFIED IDEOGRAPH + {0xE8CA, 0x99D4}, //10782 #CJK UNIFIED IDEOGRAPH + {0xE8CB, 0x99CE}, //10783 #CJK UNIFIED IDEOGRAPH + {0xE8CC, 0x99C9}, //10784 #CJK UNIFIED IDEOGRAPH + {0xE8CD, 0x99D6}, //10785 #CJK UNIFIED IDEOGRAPH + {0xE8CE, 0x99D8}, //10786 #CJK UNIFIED IDEOGRAPH + {0xE8CF, 0x99CB}, //10787 #CJK UNIFIED IDEOGRAPH + {0xE8D0, 0x99D7}, //10788 #CJK UNIFIED IDEOGRAPH + {0xE8D1, 0x99CC}, //10789 #CJK UNIFIED IDEOGRAPH + {0xE8D2, 0x9AB3}, //10790 #CJK UNIFIED IDEOGRAPH + {0xE8D3, 0x9AEC}, //10791 #CJK UNIFIED IDEOGRAPH + {0xE8D4, 0x9AEB}, //10792 #CJK UNIFIED IDEOGRAPH + {0xE8D5, 0x9AF3}, //10793 #CJK UNIFIED IDEOGRAPH + {0xE8D6, 0x9AF2}, //10794 #CJK UNIFIED IDEOGRAPH + {0xE8D7, 0x9AF1}, //10795 #CJK UNIFIED IDEOGRAPH + {0xE8D8, 0x9B46}, //10796 #CJK UNIFIED IDEOGRAPH + {0xE8D9, 0x9B43}, //10797 #CJK UNIFIED IDEOGRAPH + {0xE8DA, 0x9B67}, //10798 #CJK UNIFIED IDEOGRAPH + {0xE8DB, 0x9B74}, //10799 #CJK UNIFIED IDEOGRAPH + {0xE8DC, 0x9B71}, //10800 #CJK UNIFIED IDEOGRAPH + {0xE8DD, 0x9B66}, //10801 #CJK UNIFIED IDEOGRAPH + {0xE8DE, 0x9B76}, //10802 #CJK UNIFIED IDEOGRAPH + {0xE8DF, 0x9B75}, //10803 #CJK UNIFIED IDEOGRAPH + {0xE8E0, 0x9B70}, //10804 #CJK UNIFIED IDEOGRAPH + {0xE8E1, 0x9B68}, //10805 #CJK UNIFIED IDEOGRAPH + {0xE8E2, 0x9B64}, //10806 #CJK UNIFIED IDEOGRAPH + {0xE8E3, 0x9B6C}, //10807 #CJK UNIFIED IDEOGRAPH + {0xE8E4, 0x9CFC}, //10808 #CJK UNIFIED IDEOGRAPH + {0xE8E5, 0x9CFA}, //10809 #CJK UNIFIED IDEOGRAPH + {0xE8E6, 0x9CFD}, //10810 #CJK UNIFIED IDEOGRAPH + {0xE8E7, 0x9CFF}, //10811 #CJK UNIFIED IDEOGRAPH + {0xE8E8, 0x9CF7}, //10812 #CJK UNIFIED IDEOGRAPH + {0xE8E9, 0x9D07}, //10813 #CJK UNIFIED IDEOGRAPH + {0xE8EA, 0x9D00}, //10814 #CJK UNIFIED IDEOGRAPH + {0xE8EB, 0x9CF9}, //10815 #CJK UNIFIED IDEOGRAPH + {0xE8EC, 0x9CFB}, //10816 #CJK UNIFIED IDEOGRAPH + {0xE8ED, 0x9D08}, //10817 #CJK UNIFIED IDEOGRAPH + {0xE8EE, 0x9D05}, //10818 #CJK UNIFIED IDEOGRAPH + {0xE8EF, 0x9D04}, //10819 #CJK UNIFIED IDEOGRAPH + {0xE8F0, 0x9E83}, //10820 #CJK UNIFIED IDEOGRAPH + {0xE8F1, 0x9ED3}, //10821 #CJK UNIFIED IDEOGRAPH + {0xE8F2, 0x9F0F}, //10822 #CJK UNIFIED IDEOGRAPH + {0xE8F3, 0x9F10}, //10823 #CJK UNIFIED IDEOGRAPH + {0xE8F4, 0x511C}, //10824 #CJK UNIFIED IDEOGRAPH + {0xE8F5, 0x5113}, //10825 #CJK UNIFIED IDEOGRAPH + {0xE8F6, 0x5117}, //10826 #CJK UNIFIED IDEOGRAPH + {0xE8F7, 0x511A}, //10827 #CJK UNIFIED IDEOGRAPH + {0xE8F8, 0x5111}, //10828 #CJK UNIFIED IDEOGRAPH + {0xE8F9, 0x51DE}, //10829 #CJK UNIFIED IDEOGRAPH + {0xE8FA, 0x5334}, //10830 #CJK UNIFIED IDEOGRAPH + {0xE8FB, 0x53E1}, //10831 #CJK UNIFIED IDEOGRAPH + {0xE8FC, 0x5670}, //10832 #CJK UNIFIED IDEOGRAPH + {0xE8FD, 0x5660}, //10833 #CJK UNIFIED IDEOGRAPH + {0xE8FE, 0x566E}, //10834 #CJK UNIFIED IDEOGRAPH + {0xE940, 0x5673}, //10835 #CJK UNIFIED IDEOGRAPH + {0xE941, 0x5666}, //10836 #CJK UNIFIED IDEOGRAPH + {0xE942, 0x5663}, //10837 #CJK UNIFIED IDEOGRAPH + {0xE943, 0x566D}, //10838 #CJK UNIFIED IDEOGRAPH + {0xE944, 0x5672}, //10839 #CJK UNIFIED IDEOGRAPH + {0xE945, 0x565E}, //10840 #CJK UNIFIED IDEOGRAPH + {0xE946, 0x5677}, //10841 #CJK UNIFIED IDEOGRAPH + {0xE947, 0x571C}, //10842 #CJK UNIFIED IDEOGRAPH + {0xE948, 0x571B}, //10843 #CJK UNIFIED IDEOGRAPH + {0xE949, 0x58C8}, //10844 #CJK UNIFIED IDEOGRAPH + {0xE94A, 0x58BD}, //10845 #CJK UNIFIED IDEOGRAPH + {0xE94B, 0x58C9}, //10846 #CJK UNIFIED IDEOGRAPH + {0xE94C, 0x58BF}, //10847 #CJK UNIFIED IDEOGRAPH + {0xE94D, 0x58BA}, //10848 #CJK UNIFIED IDEOGRAPH + {0xE94E, 0x58C2}, //10849 #CJK UNIFIED IDEOGRAPH + {0xE94F, 0x58BC}, //10850 #CJK UNIFIED IDEOGRAPH + {0xE950, 0x58C6}, //10851 #CJK UNIFIED IDEOGRAPH + {0xE951, 0x5B17}, //10852 #CJK UNIFIED IDEOGRAPH + {0xE952, 0x5B19}, //10853 #CJK UNIFIED IDEOGRAPH + {0xE953, 0x5B1B}, //10854 #CJK UNIFIED IDEOGRAPH + {0xE954, 0x5B21}, //10855 #CJK UNIFIED IDEOGRAPH + {0xE955, 0x5B14}, //10856 #CJK UNIFIED IDEOGRAPH + {0xE956, 0x5B13}, //10857 #CJK UNIFIED IDEOGRAPH + {0xE957, 0x5B10}, //10858 #CJK UNIFIED IDEOGRAPH + {0xE958, 0x5B16}, //10859 #CJK UNIFIED IDEOGRAPH + {0xE959, 0x5B28}, //10860 #CJK UNIFIED IDEOGRAPH + {0xE95A, 0x5B1A}, //10861 #CJK UNIFIED IDEOGRAPH + {0xE95B, 0x5B20}, //10862 #CJK UNIFIED IDEOGRAPH + {0xE95C, 0x5B1E}, //10863 #CJK UNIFIED IDEOGRAPH + {0xE95D, 0x5BEF}, //10864 #CJK UNIFIED IDEOGRAPH + {0xE95E, 0x5DAC}, //10865 #CJK UNIFIED IDEOGRAPH + {0xE95F, 0x5DB1}, //10866 #CJK UNIFIED IDEOGRAPH + {0xE960, 0x5DA9}, //10867 #CJK UNIFIED IDEOGRAPH + {0xE961, 0x5DA7}, //10868 #CJK UNIFIED IDEOGRAPH + {0xE962, 0x5DB5}, //10869 #CJK UNIFIED IDEOGRAPH + {0xE963, 0x5DB0}, //10870 #CJK UNIFIED IDEOGRAPH + {0xE964, 0x5DAE}, //10871 #CJK UNIFIED IDEOGRAPH + {0xE965, 0x5DAA}, //10872 #CJK UNIFIED IDEOGRAPH + {0xE966, 0x5DA8}, //10873 #CJK UNIFIED IDEOGRAPH + {0xE967, 0x5DB2}, //10874 #CJK UNIFIED IDEOGRAPH + {0xE968, 0x5DAD}, //10875 #CJK UNIFIED IDEOGRAPH + {0xE969, 0x5DAF}, //10876 #CJK UNIFIED IDEOGRAPH + {0xE96A, 0x5DB4}, //10877 #CJK UNIFIED IDEOGRAPH + {0xE96B, 0x5E67}, //10878 #CJK UNIFIED IDEOGRAPH + {0xE96C, 0x5E68}, //10879 #CJK UNIFIED IDEOGRAPH + {0xE96D, 0x5E66}, //10880 #CJK UNIFIED IDEOGRAPH + {0xE96E, 0x5E6F}, //10881 #CJK UNIFIED IDEOGRAPH + {0xE96F, 0x5EE9}, //10882 #CJK UNIFIED IDEOGRAPH + {0xE970, 0x5EE7}, //10883 #CJK UNIFIED IDEOGRAPH + {0xE971, 0x5EE6}, //10884 #CJK UNIFIED IDEOGRAPH + {0xE972, 0x5EE8}, //10885 #CJK UNIFIED IDEOGRAPH + {0xE973, 0x5EE5}, //10886 #CJK UNIFIED IDEOGRAPH + {0xE974, 0x5F4B}, //10887 #CJK UNIFIED IDEOGRAPH + {0xE975, 0x5FBC}, //10888 #CJK UNIFIED IDEOGRAPH + {0xE976, 0x619D}, //10889 #CJK UNIFIED IDEOGRAPH + {0xE977, 0x61A8}, //10890 #CJK UNIFIED IDEOGRAPH + {0xE978, 0x6196}, //10891 #CJK UNIFIED IDEOGRAPH + {0xE979, 0x61C5}, //10892 #CJK UNIFIED IDEOGRAPH + {0xE97A, 0x61B4}, //10893 #CJK UNIFIED IDEOGRAPH + {0xE97B, 0x61C6}, //10894 #CJK UNIFIED IDEOGRAPH + {0xE97C, 0x61C1}, //10895 #CJK UNIFIED IDEOGRAPH + {0xE97D, 0x61CC}, //10896 #CJK UNIFIED IDEOGRAPH + {0xE97E, 0x61BA}, //10897 #CJK UNIFIED IDEOGRAPH + {0xE9A1, 0x61BF}, //10898 #CJK UNIFIED IDEOGRAPH + {0xE9A2, 0x61B8}, //10899 #CJK UNIFIED IDEOGRAPH + {0xE9A3, 0x618C}, //10900 #CJK UNIFIED IDEOGRAPH + {0xE9A4, 0x64D7}, //10901 #CJK UNIFIED IDEOGRAPH + {0xE9A5, 0x64D6}, //10902 #CJK UNIFIED IDEOGRAPH + {0xE9A6, 0x64D0}, //10903 #CJK UNIFIED IDEOGRAPH + {0xE9A7, 0x64CF}, //10904 #CJK UNIFIED IDEOGRAPH + {0xE9A8, 0x64C9}, //10905 #CJK UNIFIED IDEOGRAPH + {0xE9A9, 0x64BD}, //10906 #CJK UNIFIED IDEOGRAPH + {0xE9AA, 0x6489}, //10907 #CJK UNIFIED IDEOGRAPH + {0xE9AB, 0x64C3}, //10908 #CJK UNIFIED IDEOGRAPH + {0xE9AC, 0x64DB}, //10909 #CJK UNIFIED IDEOGRAPH + {0xE9AD, 0x64F3}, //10910 #CJK UNIFIED IDEOGRAPH + {0xE9AE, 0x64D9}, //10911 #CJK UNIFIED IDEOGRAPH + {0xE9AF, 0x6533}, //10912 #CJK UNIFIED IDEOGRAPH + {0xE9B0, 0x657F}, //10913 #CJK UNIFIED IDEOGRAPH + {0xE9B1, 0x657C}, //10914 #CJK UNIFIED IDEOGRAPH + {0xE9B2, 0x65A2}, //10915 #CJK UNIFIED IDEOGRAPH + {0xE9B3, 0x66C8}, //10916 #CJK UNIFIED IDEOGRAPH + {0xE9B4, 0x66BE}, //10917 #CJK UNIFIED IDEOGRAPH + {0xE9B5, 0x66C0}, //10918 #CJK UNIFIED IDEOGRAPH + {0xE9B6, 0x66CA}, //10919 #CJK UNIFIED IDEOGRAPH + {0xE9B7, 0x66CB}, //10920 #CJK UNIFIED IDEOGRAPH + {0xE9B8, 0x66CF}, //10921 #CJK UNIFIED IDEOGRAPH + {0xE9B9, 0x66BD}, //10922 #CJK UNIFIED IDEOGRAPH + {0xE9BA, 0x66BB}, //10923 #CJK UNIFIED IDEOGRAPH + {0xE9BB, 0x66BA}, //10924 #CJK UNIFIED IDEOGRAPH + {0xE9BC, 0x66CC}, //10925 #CJK UNIFIED IDEOGRAPH + {0xE9BD, 0x6723}, //10926 #CJK UNIFIED IDEOGRAPH + {0xE9BE, 0x6A34}, //10927 #CJK UNIFIED IDEOGRAPH + {0xE9BF, 0x6A66}, //10928 #CJK UNIFIED IDEOGRAPH + {0xE9C0, 0x6A49}, //10929 #CJK UNIFIED IDEOGRAPH + {0xE9C1, 0x6A67}, //10930 #CJK UNIFIED IDEOGRAPH + {0xE9C2, 0x6A32}, //10931 #CJK UNIFIED IDEOGRAPH + {0xE9C3, 0x6A68}, //10932 #CJK UNIFIED IDEOGRAPH + {0xE9C4, 0x6A3E}, //10933 #CJK UNIFIED IDEOGRAPH + {0xE9C5, 0x6A5D}, //10934 #CJK UNIFIED IDEOGRAPH + {0xE9C6, 0x6A6D}, //10935 #CJK UNIFIED IDEOGRAPH + {0xE9C7, 0x6A76}, //10936 #CJK UNIFIED IDEOGRAPH + {0xE9C8, 0x6A5B}, //10937 #CJK UNIFIED IDEOGRAPH + {0xE9C9, 0x6A51}, //10938 #CJK UNIFIED IDEOGRAPH + {0xE9CA, 0x6A28}, //10939 #CJK UNIFIED IDEOGRAPH + {0xE9CB, 0x6A5A}, //10940 #CJK UNIFIED IDEOGRAPH + {0xE9CC, 0x6A3B}, //10941 #CJK UNIFIED IDEOGRAPH + {0xE9CD, 0x6A3F}, //10942 #CJK UNIFIED IDEOGRAPH + {0xE9CE, 0x6A41}, //10943 #CJK UNIFIED IDEOGRAPH + {0xE9CF, 0x6A6A}, //10944 #CJK UNIFIED IDEOGRAPH + {0xE9D0, 0x6A64}, //10945 #CJK UNIFIED IDEOGRAPH + {0xE9D1, 0x6A50}, //10946 #CJK UNIFIED IDEOGRAPH + {0xE9D2, 0x6A4F}, //10947 #CJK UNIFIED IDEOGRAPH + {0xE9D3, 0x6A54}, //10948 #CJK UNIFIED IDEOGRAPH + {0xE9D4, 0x6A6F}, //10949 #CJK UNIFIED IDEOGRAPH + {0xE9D5, 0x6A69}, //10950 #CJK UNIFIED IDEOGRAPH + {0xE9D6, 0x6A60}, //10951 #CJK UNIFIED IDEOGRAPH + {0xE9D7, 0x6A3C}, //10952 #CJK UNIFIED IDEOGRAPH + {0xE9D8, 0x6A5E}, //10953 #CJK UNIFIED IDEOGRAPH + {0xE9D9, 0x6A56}, //10954 #CJK UNIFIED IDEOGRAPH + {0xE9DA, 0x6A55}, //10955 #CJK UNIFIED IDEOGRAPH + {0xE9DB, 0x6A4D}, //10956 #CJK UNIFIED IDEOGRAPH + {0xE9DC, 0x6A4E}, //10957 #CJK UNIFIED IDEOGRAPH + {0xE9DD, 0x6A46}, //10958 #CJK UNIFIED IDEOGRAPH + {0xE9DE, 0x6B55}, //10959 #CJK UNIFIED IDEOGRAPH + {0xE9DF, 0x6B54}, //10960 #CJK UNIFIED IDEOGRAPH + {0xE9E0, 0x6B56}, //10961 #CJK UNIFIED IDEOGRAPH + {0xE9E1, 0x6BA7}, //10962 #CJK UNIFIED IDEOGRAPH + {0xE9E2, 0x6BAA}, //10963 #CJK UNIFIED IDEOGRAPH + {0xE9E3, 0x6BAB}, //10964 #CJK UNIFIED IDEOGRAPH + {0xE9E4, 0x6BC8}, //10965 #CJK UNIFIED IDEOGRAPH + {0xE9E5, 0x6BC7}, //10966 #CJK UNIFIED IDEOGRAPH + {0xE9E6, 0x6C04}, //10967 #CJK UNIFIED IDEOGRAPH + {0xE9E7, 0x6C03}, //10968 #CJK UNIFIED IDEOGRAPH + {0xE9E8, 0x6C06}, //10969 #CJK UNIFIED IDEOGRAPH + {0xE9E9, 0x6FAD}, //10970 #CJK UNIFIED IDEOGRAPH + {0xE9EA, 0x6FCB}, //10971 #CJK UNIFIED IDEOGRAPH + {0xE9EB, 0x6FA3}, //10972 #CJK UNIFIED IDEOGRAPH + {0xE9EC, 0x6FC7}, //10973 #CJK UNIFIED IDEOGRAPH + {0xE9ED, 0x6FBC}, //10974 #CJK UNIFIED IDEOGRAPH + {0xE9EE, 0x6FCE}, //10975 #CJK UNIFIED IDEOGRAPH + {0xE9EF, 0x6FC8}, //10976 #CJK UNIFIED IDEOGRAPH + {0xE9F0, 0x6F5E}, //10977 #CJK UNIFIED IDEOGRAPH + {0xE9F1, 0x6FC4}, //10978 #CJK UNIFIED IDEOGRAPH + {0xE9F2, 0x6FBD}, //10979 #CJK UNIFIED IDEOGRAPH + {0xE9F3, 0x6F9E}, //10980 #CJK UNIFIED IDEOGRAPH + {0xE9F4, 0x6FCA}, //10981 #CJK UNIFIED IDEOGRAPH + {0xE9F5, 0x6FA8}, //10982 #CJK UNIFIED IDEOGRAPH + {0xE9F6, 0x7004}, //10983 #CJK UNIFIED IDEOGRAPH + {0xE9F7, 0x6FA5}, //10984 #CJK UNIFIED IDEOGRAPH + {0xE9F8, 0x6FAE}, //10985 #CJK UNIFIED IDEOGRAPH + {0xE9F9, 0x6FBA}, //10986 #CJK UNIFIED IDEOGRAPH + {0xE9FA, 0x6FAC}, //10987 #CJK UNIFIED IDEOGRAPH + {0xE9FB, 0x6FAA}, //10988 #CJK UNIFIED IDEOGRAPH + {0xE9FC, 0x6FCF}, //10989 #CJK UNIFIED IDEOGRAPH + {0xE9FD, 0x6FBF}, //10990 #CJK UNIFIED IDEOGRAPH + {0xE9FE, 0x6FB8}, //10991 #CJK UNIFIED IDEOGRAPH + {0xEA40, 0x6FA2}, //10992 #CJK UNIFIED IDEOGRAPH + {0xEA41, 0x6FC9}, //10993 #CJK UNIFIED IDEOGRAPH + {0xEA42, 0x6FAB}, //10994 #CJK UNIFIED IDEOGRAPH + {0xEA43, 0x6FCD}, //10995 #CJK UNIFIED IDEOGRAPH + {0xEA44, 0x6FAF}, //10996 #CJK UNIFIED IDEOGRAPH + {0xEA45, 0x6FB2}, //10997 #CJK UNIFIED IDEOGRAPH + {0xEA46, 0x6FB0}, //10998 #CJK UNIFIED IDEOGRAPH + {0xEA47, 0x71C5}, //10999 #CJK UNIFIED IDEOGRAPH + {0xEA48, 0x71C2}, //11000 #CJK UNIFIED IDEOGRAPH + {0xEA49, 0x71BF}, //11001 #CJK UNIFIED IDEOGRAPH + {0xEA4A, 0x71B8}, //11002 #CJK UNIFIED IDEOGRAPH + {0xEA4B, 0x71D6}, //11003 #CJK UNIFIED IDEOGRAPH + {0xEA4C, 0x71C0}, //11004 #CJK UNIFIED IDEOGRAPH + {0xEA4D, 0x71C1}, //11005 #CJK UNIFIED IDEOGRAPH + {0xEA4E, 0x71CB}, //11006 #CJK UNIFIED IDEOGRAPH + {0xEA4F, 0x71D4}, //11007 #CJK UNIFIED IDEOGRAPH + {0xEA50, 0x71CA}, //11008 #CJK UNIFIED IDEOGRAPH + {0xEA51, 0x71C7}, //11009 #CJK UNIFIED IDEOGRAPH + {0xEA52, 0x71CF}, //11010 #CJK UNIFIED IDEOGRAPH + {0xEA53, 0x71BD}, //11011 #CJK UNIFIED IDEOGRAPH + {0xEA54, 0x71D8}, //11012 #CJK UNIFIED IDEOGRAPH + {0xEA55, 0x71BC}, //11013 #CJK UNIFIED IDEOGRAPH + {0xEA56, 0x71C6}, //11014 #CJK UNIFIED IDEOGRAPH + {0xEA57, 0x71DA}, //11015 #CJK UNIFIED IDEOGRAPH + {0xEA58, 0x71DB}, //11016 #CJK UNIFIED IDEOGRAPH + {0xEA59, 0x729D}, //11017 #CJK UNIFIED IDEOGRAPH + {0xEA5A, 0x729E}, //11018 #CJK UNIFIED IDEOGRAPH + {0xEA5B, 0x7369}, //11019 #CJK UNIFIED IDEOGRAPH + {0xEA5C, 0x7366}, //11020 #CJK UNIFIED IDEOGRAPH + {0xEA5D, 0x7367}, //11021 #CJK UNIFIED IDEOGRAPH + {0xEA5E, 0x736C}, //11022 #CJK UNIFIED IDEOGRAPH + {0xEA5F, 0x7365}, //11023 #CJK UNIFIED IDEOGRAPH + {0xEA60, 0x736B}, //11024 #CJK UNIFIED IDEOGRAPH + {0xEA61, 0x736A}, //11025 #CJK UNIFIED IDEOGRAPH + {0xEA62, 0x747F}, //11026 #CJK UNIFIED IDEOGRAPH + {0xEA63, 0x749A}, //11027 #CJK UNIFIED IDEOGRAPH + {0xEA64, 0x74A0}, //11028 #CJK UNIFIED IDEOGRAPH + {0xEA65, 0x7494}, //11029 #CJK UNIFIED IDEOGRAPH + {0xEA66, 0x7492}, //11030 #CJK UNIFIED IDEOGRAPH + {0xEA67, 0x7495}, //11031 #CJK UNIFIED IDEOGRAPH + {0xEA68, 0x74A1}, //11032 #CJK UNIFIED IDEOGRAPH + {0xEA69, 0x750B}, //11033 #CJK UNIFIED IDEOGRAPH + {0xEA6A, 0x7580}, //11034 #CJK UNIFIED IDEOGRAPH + {0xEA6B, 0x762F}, //11035 #CJK UNIFIED IDEOGRAPH + {0xEA6C, 0x762D}, //11036 #CJK UNIFIED IDEOGRAPH + {0xEA6D, 0x7631}, //11037 #CJK UNIFIED IDEOGRAPH + {0xEA6E, 0x763D}, //11038 #CJK UNIFIED IDEOGRAPH + {0xEA6F, 0x7633}, //11039 #CJK UNIFIED IDEOGRAPH + {0xEA70, 0x763C}, //11040 #CJK UNIFIED IDEOGRAPH + {0xEA71, 0x7635}, //11041 #CJK UNIFIED IDEOGRAPH + {0xEA72, 0x7632}, //11042 #CJK UNIFIED IDEOGRAPH + {0xEA73, 0x7630}, //11043 #CJK UNIFIED IDEOGRAPH + {0xEA74, 0x76BB}, //11044 #CJK UNIFIED IDEOGRAPH + {0xEA75, 0x76E6}, //11045 #CJK UNIFIED IDEOGRAPH + {0xEA76, 0x779A}, //11046 #CJK UNIFIED IDEOGRAPH + {0xEA77, 0x779D}, //11047 #CJK UNIFIED IDEOGRAPH + {0xEA78, 0x77A1}, //11048 #CJK UNIFIED IDEOGRAPH + {0xEA79, 0x779C}, //11049 #CJK UNIFIED IDEOGRAPH + {0xEA7A, 0x779B}, //11050 #CJK UNIFIED IDEOGRAPH + {0xEA7B, 0x77A2}, //11051 #CJK UNIFIED IDEOGRAPH + {0xEA7C, 0x77A3}, //11052 #CJK UNIFIED IDEOGRAPH + {0xEA7D, 0x7795}, //11053 #CJK UNIFIED IDEOGRAPH + {0xEA7E, 0x7799}, //11054 #CJK UNIFIED IDEOGRAPH + {0xEAA1, 0x7797}, //11055 #CJK UNIFIED IDEOGRAPH + {0xEAA2, 0x78DD}, //11056 #CJK UNIFIED IDEOGRAPH + {0xEAA3, 0x78E9}, //11057 #CJK UNIFIED IDEOGRAPH + {0xEAA4, 0x78E5}, //11058 #CJK UNIFIED IDEOGRAPH + {0xEAA5, 0x78EA}, //11059 #CJK UNIFIED IDEOGRAPH + {0xEAA6, 0x78DE}, //11060 #CJK UNIFIED IDEOGRAPH + {0xEAA7, 0x78E3}, //11061 #CJK UNIFIED IDEOGRAPH + {0xEAA8, 0x78DB}, //11062 #CJK UNIFIED IDEOGRAPH + {0xEAA9, 0x78E1}, //11063 #CJK UNIFIED IDEOGRAPH + {0xEAAA, 0x78E2}, //11064 #CJK UNIFIED IDEOGRAPH + {0xEAAB, 0x78ED}, //11065 #CJK UNIFIED IDEOGRAPH + {0xEAAC, 0x78DF}, //11066 #CJK UNIFIED IDEOGRAPH + {0xEAAD, 0x78E0}, //11067 #CJK UNIFIED IDEOGRAPH + {0xEAAE, 0x79A4}, //11068 #CJK UNIFIED IDEOGRAPH + {0xEAAF, 0x7A44}, //11069 #CJK UNIFIED IDEOGRAPH + {0xEAB0, 0x7A48}, //11070 #CJK UNIFIED IDEOGRAPH + {0xEAB1, 0x7A47}, //11071 #CJK UNIFIED IDEOGRAPH + {0xEAB2, 0x7AB6}, //11072 #CJK UNIFIED IDEOGRAPH + {0xEAB3, 0x7AB8}, //11073 #CJK UNIFIED IDEOGRAPH + {0xEAB4, 0x7AB5}, //11074 #CJK UNIFIED IDEOGRAPH + {0xEAB5, 0x7AB1}, //11075 #CJK UNIFIED IDEOGRAPH + {0xEAB6, 0x7AB7}, //11076 #CJK UNIFIED IDEOGRAPH + {0xEAB7, 0x7BDE}, //11077 #CJK UNIFIED IDEOGRAPH + {0xEAB8, 0x7BE3}, //11078 #CJK UNIFIED IDEOGRAPH + {0xEAB9, 0x7BE7}, //11079 #CJK UNIFIED IDEOGRAPH + {0xEABA, 0x7BDD}, //11080 #CJK UNIFIED IDEOGRAPH + {0xEABB, 0x7BD5}, //11081 #CJK UNIFIED IDEOGRAPH + {0xEABC, 0x7BE5}, //11082 #CJK UNIFIED IDEOGRAPH + {0xEABD, 0x7BDA}, //11083 #CJK UNIFIED IDEOGRAPH + {0xEABE, 0x7BE8}, //11084 #CJK UNIFIED IDEOGRAPH + {0xEABF, 0x7BF9}, //11085 #CJK UNIFIED IDEOGRAPH + {0xEAC0, 0x7BD4}, //11086 #CJK UNIFIED IDEOGRAPH + {0xEAC1, 0x7BEA}, //11087 #CJK UNIFIED IDEOGRAPH + {0xEAC2, 0x7BE2}, //11088 #CJK UNIFIED IDEOGRAPH + {0xEAC3, 0x7BDC}, //11089 #CJK UNIFIED IDEOGRAPH + {0xEAC4, 0x7BEB}, //11090 #CJK UNIFIED IDEOGRAPH + {0xEAC5, 0x7BD8}, //11091 #CJK UNIFIED IDEOGRAPH + {0xEAC6, 0x7BDF}, //11092 #CJK UNIFIED IDEOGRAPH + {0xEAC7, 0x7CD2}, //11093 #CJK UNIFIED IDEOGRAPH + {0xEAC8, 0x7CD4}, //11094 #CJK UNIFIED IDEOGRAPH + {0xEAC9, 0x7CD7}, //11095 #CJK UNIFIED IDEOGRAPH + {0xEACA, 0x7CD0}, //11096 #CJK UNIFIED IDEOGRAPH + {0xEACB, 0x7CD1}, //11097 #CJK UNIFIED IDEOGRAPH + {0xEACC, 0x7E12}, //11098 #CJK UNIFIED IDEOGRAPH + {0xEACD, 0x7E21}, //11099 #CJK UNIFIED IDEOGRAPH + {0xEACE, 0x7E17}, //11100 #CJK UNIFIED IDEOGRAPH + {0xEACF, 0x7E0C}, //11101 #CJK UNIFIED IDEOGRAPH + {0xEAD0, 0x7E1F}, //11102 #CJK UNIFIED IDEOGRAPH + {0xEAD1, 0x7E20}, //11103 #CJK UNIFIED IDEOGRAPH + {0xEAD2, 0x7E13}, //11104 #CJK UNIFIED IDEOGRAPH + {0xEAD3, 0x7E0E}, //11105 #CJK UNIFIED IDEOGRAPH + {0xEAD4, 0x7E1C}, //11106 #CJK UNIFIED IDEOGRAPH + {0xEAD5, 0x7E15}, //11107 #CJK UNIFIED IDEOGRAPH + {0xEAD6, 0x7E1A}, //11108 #CJK UNIFIED IDEOGRAPH + {0xEAD7, 0x7E22}, //11109 #CJK UNIFIED IDEOGRAPH + {0xEAD8, 0x7E0B}, //11110 #CJK UNIFIED IDEOGRAPH + {0xEAD9, 0x7E0F}, //11111 #CJK UNIFIED IDEOGRAPH + {0xEADA, 0x7E16}, //11112 #CJK UNIFIED IDEOGRAPH + {0xEADB, 0x7E0D}, //11113 #CJK UNIFIED IDEOGRAPH + {0xEADC, 0x7E14}, //11114 #CJK UNIFIED IDEOGRAPH + {0xEADD, 0x7E25}, //11115 #CJK UNIFIED IDEOGRAPH + {0xEADE, 0x7E24}, //11116 #CJK UNIFIED IDEOGRAPH + {0xEADF, 0x7F43}, //11117 #CJK UNIFIED IDEOGRAPH + {0xEAE0, 0x7F7B}, //11118 #CJK UNIFIED IDEOGRAPH + {0xEAE1, 0x7F7C}, //11119 #CJK UNIFIED IDEOGRAPH + {0xEAE2, 0x7F7A}, //11120 #CJK UNIFIED IDEOGRAPH + {0xEAE3, 0x7FB1}, //11121 #CJK UNIFIED IDEOGRAPH + {0xEAE4, 0x7FEF}, //11122 #CJK UNIFIED IDEOGRAPH + {0xEAE5, 0x802A}, //11123 #CJK UNIFIED IDEOGRAPH + {0xEAE6, 0x8029}, //11124 #CJK UNIFIED IDEOGRAPH + {0xEAE7, 0x806C}, //11125 #CJK UNIFIED IDEOGRAPH + {0xEAE8, 0x81B1}, //11126 #CJK UNIFIED IDEOGRAPH + {0xEAE9, 0x81A6}, //11127 #CJK UNIFIED IDEOGRAPH + {0xEAEA, 0x81AE}, //11128 #CJK UNIFIED IDEOGRAPH + {0xEAEB, 0x81B9}, //11129 #CJK UNIFIED IDEOGRAPH + {0xEAEC, 0x81B5}, //11130 #CJK UNIFIED IDEOGRAPH + {0xEAED, 0x81AB}, //11131 #CJK UNIFIED IDEOGRAPH + {0xEAEE, 0x81B0}, //11132 #CJK UNIFIED IDEOGRAPH + {0xEAEF, 0x81AC}, //11133 #CJK UNIFIED IDEOGRAPH + {0xEAF0, 0x81B4}, //11134 #CJK UNIFIED IDEOGRAPH + {0xEAF1, 0x81B2}, //11135 #CJK UNIFIED IDEOGRAPH + {0xEAF2, 0x81B7}, //11136 #CJK UNIFIED IDEOGRAPH + {0xEAF3, 0x81A7}, //11137 #CJK UNIFIED IDEOGRAPH + {0xEAF4, 0x81F2}, //11138 #CJK UNIFIED IDEOGRAPH + {0xEAF5, 0x8255}, //11139 #CJK UNIFIED IDEOGRAPH + {0xEAF6, 0x8256}, //11140 #CJK UNIFIED IDEOGRAPH + {0xEAF7, 0x8257}, //11141 #CJK UNIFIED IDEOGRAPH + {0xEAF8, 0x8556}, //11142 #CJK UNIFIED IDEOGRAPH + {0xEAF9, 0x8545}, //11143 #CJK UNIFIED IDEOGRAPH + {0xEAFA, 0x856B}, //11144 #CJK UNIFIED IDEOGRAPH + {0xEAFB, 0x854D}, //11145 #CJK UNIFIED IDEOGRAPH + {0xEAFC, 0x8553}, //11146 #CJK UNIFIED IDEOGRAPH + {0xEAFD, 0x8561}, //11147 #CJK UNIFIED IDEOGRAPH + {0xEAFE, 0x8558}, //11148 #CJK UNIFIED IDEOGRAPH + {0xEB40, 0x8540}, //11149 #CJK UNIFIED IDEOGRAPH + {0xEB41, 0x8546}, //11150 #CJK UNIFIED IDEOGRAPH + {0xEB42, 0x8564}, //11151 #CJK UNIFIED IDEOGRAPH + {0xEB43, 0x8541}, //11152 #CJK UNIFIED IDEOGRAPH + {0xEB44, 0x8562}, //11153 #CJK UNIFIED IDEOGRAPH + {0xEB45, 0x8544}, //11154 #CJK UNIFIED IDEOGRAPH + {0xEB46, 0x8551}, //11155 #CJK UNIFIED IDEOGRAPH + {0xEB47, 0x8547}, //11156 #CJK UNIFIED IDEOGRAPH + {0xEB48, 0x8563}, //11157 #CJK UNIFIED IDEOGRAPH + {0xEB49, 0x853E}, //11158 #CJK UNIFIED IDEOGRAPH + {0xEB4A, 0x855B}, //11159 #CJK UNIFIED IDEOGRAPH + {0xEB4B, 0x8571}, //11160 #CJK UNIFIED IDEOGRAPH + {0xEB4C, 0x854E}, //11161 #CJK UNIFIED IDEOGRAPH + {0xEB4D, 0x856E}, //11162 #CJK UNIFIED IDEOGRAPH + {0xEB4E, 0x8575}, //11163 #CJK UNIFIED IDEOGRAPH + {0xEB4F, 0x8555}, //11164 #CJK UNIFIED IDEOGRAPH + {0xEB50, 0x8567}, //11165 #CJK UNIFIED IDEOGRAPH + {0xEB51, 0x8560}, //11166 #CJK UNIFIED IDEOGRAPH + {0xEB52, 0x858C}, //11167 #CJK UNIFIED IDEOGRAPH + {0xEB53, 0x8566}, //11168 #CJK UNIFIED IDEOGRAPH + {0xEB54, 0x855D}, //11169 #CJK UNIFIED IDEOGRAPH + {0xEB55, 0x8554}, //11170 #CJK UNIFIED IDEOGRAPH + {0xEB56, 0x8565}, //11171 #CJK UNIFIED IDEOGRAPH + {0xEB57, 0x856C}, //11172 #CJK UNIFIED IDEOGRAPH + {0xEB58, 0x8663}, //11173 #CJK UNIFIED IDEOGRAPH + {0xEB59, 0x8665}, //11174 #CJK UNIFIED IDEOGRAPH + {0xEB5A, 0x8664}, //11175 #CJK UNIFIED IDEOGRAPH + {0xEB5B, 0x879B}, //11176 #CJK UNIFIED IDEOGRAPH + {0xEB5C, 0x878F}, //11177 #CJK UNIFIED IDEOGRAPH + {0xEB5D, 0x8797}, //11178 #CJK UNIFIED IDEOGRAPH + {0xEB5E, 0x8793}, //11179 #CJK UNIFIED IDEOGRAPH + {0xEB5F, 0x8792}, //11180 #CJK UNIFIED IDEOGRAPH + {0xEB60, 0x8788}, //11181 #CJK UNIFIED IDEOGRAPH + {0xEB61, 0x8781}, //11182 #CJK UNIFIED IDEOGRAPH + {0xEB62, 0x8796}, //11183 #CJK UNIFIED IDEOGRAPH + {0xEB63, 0x8798}, //11184 #CJK UNIFIED IDEOGRAPH + {0xEB64, 0x8779}, //11185 #CJK UNIFIED IDEOGRAPH + {0xEB65, 0x8787}, //11186 #CJK UNIFIED IDEOGRAPH + {0xEB66, 0x87A3}, //11187 #CJK UNIFIED IDEOGRAPH + {0xEB67, 0x8785}, //11188 #CJK UNIFIED IDEOGRAPH + {0xEB68, 0x8790}, //11189 #CJK UNIFIED IDEOGRAPH + {0xEB69, 0x8791}, //11190 #CJK UNIFIED IDEOGRAPH + {0xEB6A, 0x879D}, //11191 #CJK UNIFIED IDEOGRAPH + {0xEB6B, 0x8784}, //11192 #CJK UNIFIED IDEOGRAPH + {0xEB6C, 0x8794}, //11193 #CJK UNIFIED IDEOGRAPH + {0xEB6D, 0x879C}, //11194 #CJK UNIFIED IDEOGRAPH + {0xEB6E, 0x879A}, //11195 #CJK UNIFIED IDEOGRAPH + {0xEB6F, 0x8789}, //11196 #CJK UNIFIED IDEOGRAPH + {0xEB70, 0x891E}, //11197 #CJK UNIFIED IDEOGRAPH + {0xEB71, 0x8926}, //11198 #CJK UNIFIED IDEOGRAPH + {0xEB72, 0x8930}, //11199 #CJK UNIFIED IDEOGRAPH + {0xEB73, 0x892D}, //11200 #CJK UNIFIED IDEOGRAPH + {0xEB74, 0x892E}, //11201 #CJK UNIFIED IDEOGRAPH + {0xEB75, 0x8927}, //11202 #CJK UNIFIED IDEOGRAPH + {0xEB76, 0x8931}, //11203 #CJK UNIFIED IDEOGRAPH + {0xEB77, 0x8922}, //11204 #CJK UNIFIED IDEOGRAPH + {0xEB78, 0x8929}, //11205 #CJK UNIFIED IDEOGRAPH + {0xEB79, 0x8923}, //11206 #CJK UNIFIED IDEOGRAPH + {0xEB7A, 0x892F}, //11207 #CJK UNIFIED IDEOGRAPH + {0xEB7B, 0x892C}, //11208 #CJK UNIFIED IDEOGRAPH + {0xEB7C, 0x891F}, //11209 #CJK UNIFIED IDEOGRAPH + {0xEB7D, 0x89F1}, //11210 #CJK UNIFIED IDEOGRAPH + {0xEB7E, 0x8AE0}, //11211 #CJK UNIFIED IDEOGRAPH + {0xEBA1, 0x8AE2}, //11212 #CJK UNIFIED IDEOGRAPH + {0xEBA2, 0x8AF2}, //11213 #CJK UNIFIED IDEOGRAPH + {0xEBA3, 0x8AF4}, //11214 #CJK UNIFIED IDEOGRAPH + {0xEBA4, 0x8AF5}, //11215 #CJK UNIFIED IDEOGRAPH + {0xEBA5, 0x8ADD}, //11216 #CJK UNIFIED IDEOGRAPH + {0xEBA6, 0x8B14}, //11217 #CJK UNIFIED IDEOGRAPH + {0xEBA7, 0x8AE4}, //11218 #CJK UNIFIED IDEOGRAPH + {0xEBA8, 0x8ADF}, //11219 #CJK UNIFIED IDEOGRAPH + {0xEBA9, 0x8AF0}, //11220 #CJK UNIFIED IDEOGRAPH + {0xEBAA, 0x8AC8}, //11221 #CJK UNIFIED IDEOGRAPH + {0xEBAB, 0x8ADE}, //11222 #CJK UNIFIED IDEOGRAPH + {0xEBAC, 0x8AE1}, //11223 #CJK UNIFIED IDEOGRAPH + {0xEBAD, 0x8AE8}, //11224 #CJK UNIFIED IDEOGRAPH + {0xEBAE, 0x8AFF}, //11225 #CJK UNIFIED IDEOGRAPH + {0xEBAF, 0x8AEF}, //11226 #CJK UNIFIED IDEOGRAPH + {0xEBB0, 0x8AFB}, //11227 #CJK UNIFIED IDEOGRAPH + {0xEBB1, 0x8C91}, //11228 #CJK UNIFIED IDEOGRAPH + {0xEBB2, 0x8C92}, //11229 #CJK UNIFIED IDEOGRAPH + {0xEBB3, 0x8C90}, //11230 #CJK UNIFIED IDEOGRAPH + {0xEBB4, 0x8CF5}, //11231 #CJK UNIFIED IDEOGRAPH + {0xEBB5, 0x8CEE}, //11232 #CJK UNIFIED IDEOGRAPH + {0xEBB6, 0x8CF1}, //11233 #CJK UNIFIED IDEOGRAPH + {0xEBB7, 0x8CF0}, //11234 #CJK UNIFIED IDEOGRAPH + {0xEBB8, 0x8CF3}, //11235 #CJK UNIFIED IDEOGRAPH + {0xEBB9, 0x8D6C}, //11236 #CJK UNIFIED IDEOGRAPH + {0xEBBA, 0x8D6E}, //11237 #CJK UNIFIED IDEOGRAPH + {0xEBBB, 0x8DA5}, //11238 #CJK UNIFIED IDEOGRAPH + {0xEBBC, 0x8DA7}, //11239 #CJK UNIFIED IDEOGRAPH + {0xEBBD, 0x8E33}, //11240 #CJK UNIFIED IDEOGRAPH + {0xEBBE, 0x8E3E}, //11241 #CJK UNIFIED IDEOGRAPH + {0xEBBF, 0x8E38}, //11242 #CJK UNIFIED IDEOGRAPH + {0xEBC0, 0x8E40}, //11243 #CJK UNIFIED IDEOGRAPH + {0xEBC1, 0x8E45}, //11244 #CJK UNIFIED IDEOGRAPH + {0xEBC2, 0x8E36}, //11245 #CJK UNIFIED IDEOGRAPH + {0xEBC3, 0x8E3C}, //11246 #CJK UNIFIED IDEOGRAPH + {0xEBC4, 0x8E3D}, //11247 #CJK UNIFIED IDEOGRAPH + {0xEBC5, 0x8E41}, //11248 #CJK UNIFIED IDEOGRAPH + {0xEBC6, 0x8E30}, //11249 #CJK UNIFIED IDEOGRAPH + {0xEBC7, 0x8E3F}, //11250 #CJK UNIFIED IDEOGRAPH + {0xEBC8, 0x8EBD}, //11251 #CJK UNIFIED IDEOGRAPH + {0xEBC9, 0x8F36}, //11252 #CJK UNIFIED IDEOGRAPH + {0xEBCA, 0x8F2E}, //11253 #CJK UNIFIED IDEOGRAPH + {0xEBCB, 0x8F35}, //11254 #CJK UNIFIED IDEOGRAPH + {0xEBCC, 0x8F32}, //11255 #CJK UNIFIED IDEOGRAPH + {0xEBCD, 0x8F39}, //11256 #CJK UNIFIED IDEOGRAPH + {0xEBCE, 0x8F37}, //11257 #CJK UNIFIED IDEOGRAPH + {0xEBCF, 0x8F34}, //11258 #CJK UNIFIED IDEOGRAPH + {0xEBD0, 0x9076}, //11259 #CJK UNIFIED IDEOGRAPH + {0xEBD1, 0x9079}, //11260 #CJK UNIFIED IDEOGRAPH + {0xEBD2, 0x907B}, //11261 #CJK UNIFIED IDEOGRAPH + {0xEBD3, 0x9086}, //11262 #CJK UNIFIED IDEOGRAPH + {0xEBD4, 0x90FA}, //11263 #CJK UNIFIED IDEOGRAPH + {0xEBD5, 0x9133}, //11264 #CJK UNIFIED IDEOGRAPH + {0xEBD6, 0x9135}, //11265 #CJK UNIFIED IDEOGRAPH + {0xEBD7, 0x9136}, //11266 #CJK UNIFIED IDEOGRAPH + {0xEBD8, 0x9193}, //11267 #CJK UNIFIED IDEOGRAPH + {0xEBD9, 0x9190}, //11268 #CJK UNIFIED IDEOGRAPH + {0xEBDA, 0x9191}, //11269 #CJK UNIFIED IDEOGRAPH + {0xEBDB, 0x918D}, //11270 #CJK UNIFIED IDEOGRAPH + {0xEBDC, 0x918F}, //11271 #CJK UNIFIED IDEOGRAPH + {0xEBDD, 0x9327}, //11272 #CJK UNIFIED IDEOGRAPH + {0xEBDE, 0x931E}, //11273 #CJK UNIFIED IDEOGRAPH + {0xEBDF, 0x9308}, //11274 #CJK UNIFIED IDEOGRAPH + {0xEBE0, 0x931F}, //11275 #CJK UNIFIED IDEOGRAPH + {0xEBE1, 0x9306}, //11276 #CJK UNIFIED IDEOGRAPH + {0xEBE2, 0x930F}, //11277 #CJK UNIFIED IDEOGRAPH + {0xEBE3, 0x937A}, //11278 #CJK UNIFIED IDEOGRAPH + {0xEBE4, 0x9338}, //11279 #CJK UNIFIED IDEOGRAPH + {0xEBE5, 0x933C}, //11280 #CJK UNIFIED IDEOGRAPH + {0xEBE6, 0x931B}, //11281 #CJK UNIFIED IDEOGRAPH + {0xEBE7, 0x9323}, //11282 #CJK UNIFIED IDEOGRAPH + {0xEBE8, 0x9312}, //11283 #CJK UNIFIED IDEOGRAPH + {0xEBE9, 0x9301}, //11284 #CJK UNIFIED IDEOGRAPH + {0xEBEA, 0x9346}, //11285 #CJK UNIFIED IDEOGRAPH + {0xEBEB, 0x932D}, //11286 #CJK UNIFIED IDEOGRAPH + {0xEBEC, 0x930E}, //11287 #CJK UNIFIED IDEOGRAPH + {0xEBED, 0x930D}, //11288 #CJK UNIFIED IDEOGRAPH + {0xEBEE, 0x92CB}, //11289 #CJK UNIFIED IDEOGRAPH + {0xEBEF, 0x931D}, //11290 #CJK UNIFIED IDEOGRAPH + {0xEBF0, 0x92FA}, //11291 #CJK UNIFIED IDEOGRAPH + {0xEBF1, 0x9325}, //11292 #CJK UNIFIED IDEOGRAPH + {0xEBF2, 0x9313}, //11293 #CJK UNIFIED IDEOGRAPH + {0xEBF3, 0x92F9}, //11294 #CJK UNIFIED IDEOGRAPH + {0xEBF4, 0x92F7}, //11295 #CJK UNIFIED IDEOGRAPH + {0xEBF5, 0x9334}, //11296 #CJK UNIFIED IDEOGRAPH + {0xEBF6, 0x9302}, //11297 #CJK UNIFIED IDEOGRAPH + {0xEBF7, 0x9324}, //11298 #CJK UNIFIED IDEOGRAPH + {0xEBF8, 0x92FF}, //11299 #CJK UNIFIED IDEOGRAPH + {0xEBF9, 0x9329}, //11300 #CJK UNIFIED IDEOGRAPH + {0xEBFA, 0x9339}, //11301 #CJK UNIFIED IDEOGRAPH + {0xEBFB, 0x9335}, //11302 #CJK UNIFIED IDEOGRAPH + {0xEBFC, 0x932A}, //11303 #CJK UNIFIED IDEOGRAPH + {0xEBFD, 0x9314}, //11304 #CJK UNIFIED IDEOGRAPH + {0xEBFE, 0x930C}, //11305 #CJK UNIFIED IDEOGRAPH + {0xEC40, 0x930B}, //11306 #CJK UNIFIED IDEOGRAPH + {0xEC41, 0x92FE}, //11307 #CJK UNIFIED IDEOGRAPH + {0xEC42, 0x9309}, //11308 #CJK UNIFIED IDEOGRAPH + {0xEC43, 0x9300}, //11309 #CJK UNIFIED IDEOGRAPH + {0xEC44, 0x92FB}, //11310 #CJK UNIFIED IDEOGRAPH + {0xEC45, 0x9316}, //11311 #CJK UNIFIED IDEOGRAPH + {0xEC46, 0x95BC}, //11312 #CJK UNIFIED IDEOGRAPH + {0xEC47, 0x95CD}, //11313 #CJK UNIFIED IDEOGRAPH + {0xEC48, 0x95BE}, //11314 #CJK UNIFIED IDEOGRAPH + {0xEC49, 0x95B9}, //11315 #CJK UNIFIED IDEOGRAPH + {0xEC4A, 0x95BA}, //11316 #CJK UNIFIED IDEOGRAPH + {0xEC4B, 0x95B6}, //11317 #CJK UNIFIED IDEOGRAPH + {0xEC4C, 0x95BF}, //11318 #CJK UNIFIED IDEOGRAPH + {0xEC4D, 0x95B5}, //11319 #CJK UNIFIED IDEOGRAPH + {0xEC4E, 0x95BD}, //11320 #CJK UNIFIED IDEOGRAPH + {0xEC4F, 0x96A9}, //11321 #CJK UNIFIED IDEOGRAPH + {0xEC50, 0x96D4}, //11322 #CJK UNIFIED IDEOGRAPH + {0xEC51, 0x970B}, //11323 #CJK UNIFIED IDEOGRAPH + {0xEC52, 0x9712}, //11324 #CJK UNIFIED IDEOGRAPH + {0xEC53, 0x9710}, //11325 #CJK UNIFIED IDEOGRAPH + {0xEC54, 0x9799}, //11326 #CJK UNIFIED IDEOGRAPH + {0xEC55, 0x9797}, //11327 #CJK UNIFIED IDEOGRAPH + {0xEC56, 0x9794}, //11328 #CJK UNIFIED IDEOGRAPH + {0xEC57, 0x97F0}, //11329 #CJK UNIFIED IDEOGRAPH + {0xEC58, 0x97F8}, //11330 #CJK UNIFIED IDEOGRAPH + {0xEC59, 0x9835}, //11331 #CJK UNIFIED IDEOGRAPH + {0xEC5A, 0x982F}, //11332 #CJK UNIFIED IDEOGRAPH + {0xEC5B, 0x9832}, //11333 #CJK UNIFIED IDEOGRAPH + {0xEC5C, 0x9924}, //11334 #CJK UNIFIED IDEOGRAPH + {0xEC5D, 0x991F}, //11335 #CJK UNIFIED IDEOGRAPH + {0xEC5E, 0x9927}, //11336 #CJK UNIFIED IDEOGRAPH + {0xEC5F, 0x9929}, //11337 #CJK UNIFIED IDEOGRAPH + {0xEC60, 0x999E}, //11338 #CJK UNIFIED IDEOGRAPH + {0xEC61, 0x99EE}, //11339 #CJK UNIFIED IDEOGRAPH + {0xEC62, 0x99EC}, //11340 #CJK UNIFIED IDEOGRAPH + {0xEC63, 0x99E5}, //11341 #CJK UNIFIED IDEOGRAPH + {0xEC64, 0x99E4}, //11342 #CJK UNIFIED IDEOGRAPH + {0xEC65, 0x99F0}, //11343 #CJK UNIFIED IDEOGRAPH + {0xEC66, 0x99E3}, //11344 #CJK UNIFIED IDEOGRAPH + {0xEC67, 0x99EA}, //11345 #CJK UNIFIED IDEOGRAPH + {0xEC68, 0x99E9}, //11346 #CJK UNIFIED IDEOGRAPH + {0xEC69, 0x99E7}, //11347 #CJK UNIFIED IDEOGRAPH + {0xEC6A, 0x9AB9}, //11348 #CJK UNIFIED IDEOGRAPH + {0xEC6B, 0x9ABF}, //11349 #CJK UNIFIED IDEOGRAPH + {0xEC6C, 0x9AB4}, //11350 #CJK UNIFIED IDEOGRAPH + {0xEC6D, 0x9ABB}, //11351 #CJK UNIFIED IDEOGRAPH + {0xEC6E, 0x9AF6}, //11352 #CJK UNIFIED IDEOGRAPH + {0xEC6F, 0x9AFA}, //11353 #CJK UNIFIED IDEOGRAPH + {0xEC70, 0x9AF9}, //11354 #CJK UNIFIED IDEOGRAPH + {0xEC71, 0x9AF7}, //11355 #CJK UNIFIED IDEOGRAPH + {0xEC72, 0x9B33}, //11356 #CJK UNIFIED IDEOGRAPH + {0xEC73, 0x9B80}, //11357 #CJK UNIFIED IDEOGRAPH + {0xEC74, 0x9B85}, //11358 #CJK UNIFIED IDEOGRAPH + {0xEC75, 0x9B87}, //11359 #CJK UNIFIED IDEOGRAPH + {0xEC76, 0x9B7C}, //11360 #CJK UNIFIED IDEOGRAPH + {0xEC77, 0x9B7E}, //11361 #CJK UNIFIED IDEOGRAPH + {0xEC78, 0x9B7B}, //11362 #CJK UNIFIED IDEOGRAPH + {0xEC79, 0x9B82}, //11363 #CJK UNIFIED IDEOGRAPH + {0xEC7A, 0x9B93}, //11364 #CJK UNIFIED IDEOGRAPH + {0xEC7B, 0x9B92}, //11365 #CJK UNIFIED IDEOGRAPH + {0xEC7C, 0x9B90}, //11366 #CJK UNIFIED IDEOGRAPH + {0xEC7D, 0x9B7A}, //11367 #CJK UNIFIED IDEOGRAPH + {0xEC7E, 0x9B95}, //11368 #CJK UNIFIED IDEOGRAPH + {0xECA1, 0x9B7D}, //11369 #CJK UNIFIED IDEOGRAPH + {0xECA2, 0x9B88}, //11370 #CJK UNIFIED IDEOGRAPH + {0xECA3, 0x9D25}, //11371 #CJK UNIFIED IDEOGRAPH + {0xECA4, 0x9D17}, //11372 #CJK UNIFIED IDEOGRAPH + {0xECA5, 0x9D20}, //11373 #CJK UNIFIED IDEOGRAPH + {0xECA6, 0x9D1E}, //11374 #CJK UNIFIED IDEOGRAPH + {0xECA7, 0x9D14}, //11375 #CJK UNIFIED IDEOGRAPH + {0xECA8, 0x9D29}, //11376 #CJK UNIFIED IDEOGRAPH + {0xECA9, 0x9D1D}, //11377 #CJK UNIFIED IDEOGRAPH + {0xECAA, 0x9D18}, //11378 #CJK UNIFIED IDEOGRAPH + {0xECAB, 0x9D22}, //11379 #CJK UNIFIED IDEOGRAPH + {0xECAC, 0x9D10}, //11380 #CJK UNIFIED IDEOGRAPH + {0xECAD, 0x9D19}, //11381 #CJK UNIFIED IDEOGRAPH + {0xECAE, 0x9D1F}, //11382 #CJK UNIFIED IDEOGRAPH + {0xECAF, 0x9E88}, //11383 #CJK UNIFIED IDEOGRAPH + {0xECB0, 0x9E86}, //11384 #CJK UNIFIED IDEOGRAPH + {0xECB1, 0x9E87}, //11385 #CJK UNIFIED IDEOGRAPH + {0xECB2, 0x9EAE}, //11386 #CJK UNIFIED IDEOGRAPH + {0xECB3, 0x9EAD}, //11387 #CJK UNIFIED IDEOGRAPH + {0xECB4, 0x9ED5}, //11388 #CJK UNIFIED IDEOGRAPH + {0xECB5, 0x9ED6}, //11389 #CJK UNIFIED IDEOGRAPH + {0xECB6, 0x9EFA}, //11390 #CJK UNIFIED IDEOGRAPH + {0xECB7, 0x9F12}, //11391 #CJK UNIFIED IDEOGRAPH + {0xECB8, 0x9F3D}, //11392 #CJK UNIFIED IDEOGRAPH + {0xECB9, 0x5126}, //11393 #CJK UNIFIED IDEOGRAPH + {0xECBA, 0x5125}, //11394 #CJK UNIFIED IDEOGRAPH + {0xECBB, 0x5122}, //11395 #CJK UNIFIED IDEOGRAPH + {0xECBC, 0x5124}, //11396 #CJK UNIFIED IDEOGRAPH + {0xECBD, 0x5120}, //11397 #CJK UNIFIED IDEOGRAPH + {0xECBE, 0x5129}, //11398 #CJK UNIFIED IDEOGRAPH + {0xECBF, 0x52F4}, //11399 #CJK UNIFIED IDEOGRAPH + {0xECC0, 0x5693}, //11400 #CJK UNIFIED IDEOGRAPH + {0xECC1, 0x568C}, //11401 #CJK UNIFIED IDEOGRAPH + {0xECC2, 0x568D}, //11402 #CJK UNIFIED IDEOGRAPH + {0xECC3, 0x5686}, //11403 #CJK UNIFIED IDEOGRAPH + {0xECC4, 0x5684}, //11404 #CJK UNIFIED IDEOGRAPH + {0xECC5, 0x5683}, //11405 #CJK UNIFIED IDEOGRAPH + {0xECC6, 0x567E}, //11406 #CJK UNIFIED IDEOGRAPH + {0xECC7, 0x5682}, //11407 #CJK UNIFIED IDEOGRAPH + {0xECC8, 0x567F}, //11408 #CJK UNIFIED IDEOGRAPH + {0xECC9, 0x5681}, //11409 #CJK UNIFIED IDEOGRAPH + {0xECCA, 0x58D6}, //11410 #CJK UNIFIED IDEOGRAPH + {0xECCB, 0x58D4}, //11411 #CJK UNIFIED IDEOGRAPH + {0xECCC, 0x58CF}, //11412 #CJK UNIFIED IDEOGRAPH + {0xECCD, 0x58D2}, //11413 #CJK UNIFIED IDEOGRAPH + {0xECCE, 0x5B2D}, //11414 #CJK UNIFIED IDEOGRAPH + {0xECCF, 0x5B25}, //11415 #CJK UNIFIED IDEOGRAPH + {0xECD0, 0x5B32}, //11416 #CJK UNIFIED IDEOGRAPH + {0xECD1, 0x5B23}, //11417 #CJK UNIFIED IDEOGRAPH + {0xECD2, 0x5B2C}, //11418 #CJK UNIFIED IDEOGRAPH + {0xECD3, 0x5B27}, //11419 #CJK UNIFIED IDEOGRAPH + {0xECD4, 0x5B26}, //11420 #CJK UNIFIED IDEOGRAPH + {0xECD5, 0x5B2F}, //11421 #CJK UNIFIED IDEOGRAPH + {0xECD6, 0x5B2E}, //11422 #CJK UNIFIED IDEOGRAPH + {0xECD7, 0x5B7B}, //11423 #CJK UNIFIED IDEOGRAPH + {0xECD8, 0x5BF1}, //11424 #CJK UNIFIED IDEOGRAPH + {0xECD9, 0x5BF2}, //11425 #CJK UNIFIED IDEOGRAPH + {0xECDA, 0x5DB7}, //11426 #CJK UNIFIED IDEOGRAPH + {0xECDB, 0x5E6C}, //11427 #CJK UNIFIED IDEOGRAPH + {0xECDC, 0x5E6A}, //11428 #CJK UNIFIED IDEOGRAPH + {0xECDD, 0x5FBE}, //11429 #CJK UNIFIED IDEOGRAPH + {0xECDE, 0x5FBB}, //11430 #CJK UNIFIED IDEOGRAPH + {0xECDF, 0x61C3}, //11431 #CJK UNIFIED IDEOGRAPH + {0xECE0, 0x61B5}, //11432 #CJK UNIFIED IDEOGRAPH + {0xECE1, 0x61BC}, //11433 #CJK UNIFIED IDEOGRAPH + {0xECE2, 0x61E7}, //11434 #CJK UNIFIED IDEOGRAPH + {0xECE3, 0x61E0}, //11435 #CJK UNIFIED IDEOGRAPH + {0xECE4, 0x61E5}, //11436 #CJK UNIFIED IDEOGRAPH + {0xECE5, 0x61E4}, //11437 #CJK UNIFIED IDEOGRAPH + {0xECE6, 0x61E8}, //11438 #CJK UNIFIED IDEOGRAPH + {0xECE7, 0x61DE}, //11439 #CJK UNIFIED IDEOGRAPH + {0xECE8, 0x64EF}, //11440 #CJK UNIFIED IDEOGRAPH + {0xECE9, 0x64E9}, //11441 #CJK UNIFIED IDEOGRAPH + {0xECEA, 0x64E3}, //11442 #CJK UNIFIED IDEOGRAPH + {0xECEB, 0x64EB}, //11443 #CJK UNIFIED IDEOGRAPH + {0xECEC, 0x64E4}, //11444 #CJK UNIFIED IDEOGRAPH + {0xECED, 0x64E8}, //11445 #CJK UNIFIED IDEOGRAPH + {0xECEE, 0x6581}, //11446 #CJK UNIFIED IDEOGRAPH + {0xECEF, 0x6580}, //11447 #CJK UNIFIED IDEOGRAPH + {0xECF0, 0x65B6}, //11448 #CJK UNIFIED IDEOGRAPH + {0xECF1, 0x65DA}, //11449 #CJK UNIFIED IDEOGRAPH + {0xECF2, 0x66D2}, //11450 #CJK UNIFIED IDEOGRAPH + {0xECF3, 0x6A8D}, //11451 #CJK UNIFIED IDEOGRAPH + {0xECF4, 0x6A96}, //11452 #CJK UNIFIED IDEOGRAPH + {0xECF5, 0x6A81}, //11453 #CJK UNIFIED IDEOGRAPH + {0xECF6, 0x6AA5}, //11454 #CJK UNIFIED IDEOGRAPH + {0xECF7, 0x6A89}, //11455 #CJK UNIFIED IDEOGRAPH + {0xECF8, 0x6A9F}, //11456 #CJK UNIFIED IDEOGRAPH + {0xECF9, 0x6A9B}, //11457 #CJK UNIFIED IDEOGRAPH + {0xECFA, 0x6AA1}, //11458 #CJK UNIFIED IDEOGRAPH + {0xECFB, 0x6A9E}, //11459 #CJK UNIFIED IDEOGRAPH + {0xECFC, 0x6A87}, //11460 #CJK UNIFIED IDEOGRAPH + {0xECFD, 0x6A93}, //11461 #CJK UNIFIED IDEOGRAPH + {0xECFE, 0x6A8E}, //11462 #CJK UNIFIED IDEOGRAPH + {0xED40, 0x6A95}, //11463 #CJK UNIFIED IDEOGRAPH + {0xED41, 0x6A83}, //11464 #CJK UNIFIED IDEOGRAPH + {0xED42, 0x6AA8}, //11465 #CJK UNIFIED IDEOGRAPH + {0xED43, 0x6AA4}, //11466 #CJK UNIFIED IDEOGRAPH + {0xED44, 0x6A91}, //11467 #CJK UNIFIED IDEOGRAPH + {0xED45, 0x6A7F}, //11468 #CJK UNIFIED IDEOGRAPH + {0xED46, 0x6AA6}, //11469 #CJK UNIFIED IDEOGRAPH + {0xED47, 0x6A9A}, //11470 #CJK UNIFIED IDEOGRAPH + {0xED48, 0x6A85}, //11471 #CJK UNIFIED IDEOGRAPH + {0xED49, 0x6A8C}, //11472 #CJK UNIFIED IDEOGRAPH + {0xED4A, 0x6A92}, //11473 #CJK UNIFIED IDEOGRAPH + {0xED4B, 0x6B5B}, //11474 #CJK UNIFIED IDEOGRAPH + {0xED4C, 0x6BAD}, //11475 #CJK UNIFIED IDEOGRAPH + {0xED4D, 0x6C09}, //11476 #CJK UNIFIED IDEOGRAPH + {0xED4E, 0x6FCC}, //11477 #CJK UNIFIED IDEOGRAPH + {0xED4F, 0x6FA9}, //11478 #CJK UNIFIED IDEOGRAPH + {0xED50, 0x6FF4}, //11479 #CJK UNIFIED IDEOGRAPH + {0xED51, 0x6FD4}, //11480 #CJK UNIFIED IDEOGRAPH + {0xED52, 0x6FE3}, //11481 #CJK UNIFIED IDEOGRAPH + {0xED53, 0x6FDC}, //11482 #CJK UNIFIED IDEOGRAPH + {0xED54, 0x6FED}, //11483 #CJK UNIFIED IDEOGRAPH + {0xED55, 0x6FE7}, //11484 #CJK UNIFIED IDEOGRAPH + {0xED56, 0x6FE6}, //11485 #CJK UNIFIED IDEOGRAPH + {0xED57, 0x6FDE}, //11486 #CJK UNIFIED IDEOGRAPH + {0xED58, 0x6FF2}, //11487 #CJK UNIFIED IDEOGRAPH + {0xED59, 0x6FDD}, //11488 #CJK UNIFIED IDEOGRAPH + {0xED5A, 0x6FE2}, //11489 #CJK UNIFIED IDEOGRAPH + {0xED5B, 0x6FE8}, //11490 #CJK UNIFIED IDEOGRAPH + {0xED5C, 0x71E1}, //11491 #CJK UNIFIED IDEOGRAPH + {0xED5D, 0x71F1}, //11492 #CJK UNIFIED IDEOGRAPH + {0xED5E, 0x71E8}, //11493 #CJK UNIFIED IDEOGRAPH + {0xED5F, 0x71F2}, //11494 #CJK UNIFIED IDEOGRAPH + {0xED60, 0x71E4}, //11495 #CJK UNIFIED IDEOGRAPH + {0xED61, 0x71F0}, //11496 #CJK UNIFIED IDEOGRAPH + {0xED62, 0x71E2}, //11497 #CJK UNIFIED IDEOGRAPH + {0xED63, 0x7373}, //11498 #CJK UNIFIED IDEOGRAPH + {0xED64, 0x736E}, //11499 #CJK UNIFIED IDEOGRAPH + {0xED65, 0x736F}, //11500 #CJK UNIFIED IDEOGRAPH + {0xED66, 0x7497}, //11501 #CJK UNIFIED IDEOGRAPH + {0xED67, 0x74B2}, //11502 #CJK UNIFIED IDEOGRAPH + {0xED68, 0x74AB}, //11503 #CJK UNIFIED IDEOGRAPH + {0xED69, 0x7490}, //11504 #CJK UNIFIED IDEOGRAPH + {0xED6A, 0x74AA}, //11505 #CJK UNIFIED IDEOGRAPH + {0xED6B, 0x74AD}, //11506 #CJK UNIFIED IDEOGRAPH + {0xED6C, 0x74B1}, //11507 #CJK UNIFIED IDEOGRAPH + {0xED6D, 0x74A5}, //11508 #CJK UNIFIED IDEOGRAPH + {0xED6E, 0x74AF}, //11509 #CJK UNIFIED IDEOGRAPH + {0xED6F, 0x7510}, //11510 #CJK UNIFIED IDEOGRAPH + {0xED70, 0x7511}, //11511 #CJK UNIFIED IDEOGRAPH + {0xED71, 0x7512}, //11512 #CJK UNIFIED IDEOGRAPH + {0xED72, 0x750F}, //11513 #CJK UNIFIED IDEOGRAPH + {0xED73, 0x7584}, //11514 #CJK UNIFIED IDEOGRAPH + {0xED74, 0x7643}, //11515 #CJK UNIFIED IDEOGRAPH + {0xED75, 0x7648}, //11516 #CJK UNIFIED IDEOGRAPH + {0xED76, 0x7649}, //11517 #CJK UNIFIED IDEOGRAPH + {0xED77, 0x7647}, //11518 #CJK UNIFIED IDEOGRAPH + {0xED78, 0x76A4}, //11519 #CJK UNIFIED IDEOGRAPH + {0xED79, 0x76E9}, //11520 #CJK UNIFIED IDEOGRAPH + {0xED7A, 0x77B5}, //11521 #CJK UNIFIED IDEOGRAPH + {0xED7B, 0x77AB}, //11522 #CJK UNIFIED IDEOGRAPH + {0xED7C, 0x77B2}, //11523 #CJK UNIFIED IDEOGRAPH + {0xED7D, 0x77B7}, //11524 #CJK UNIFIED IDEOGRAPH + {0xED7E, 0x77B6}, //11525 #CJK UNIFIED IDEOGRAPH + {0xEDA1, 0x77B4}, //11526 #CJK UNIFIED IDEOGRAPH + {0xEDA2, 0x77B1}, //11527 #CJK UNIFIED IDEOGRAPH + {0xEDA3, 0x77A8}, //11528 #CJK UNIFIED IDEOGRAPH + {0xEDA4, 0x77F0}, //11529 #CJK UNIFIED IDEOGRAPH + {0xEDA5, 0x78F3}, //11530 #CJK UNIFIED IDEOGRAPH + {0xEDA6, 0x78FD}, //11531 #CJK UNIFIED IDEOGRAPH + {0xEDA7, 0x7902}, //11532 #CJK UNIFIED IDEOGRAPH + {0xEDA8, 0x78FB}, //11533 #CJK UNIFIED IDEOGRAPH + {0xEDA9, 0x78FC}, //11534 #CJK UNIFIED IDEOGRAPH + {0xEDAA, 0x78F2}, //11535 #CJK UNIFIED IDEOGRAPH + {0xEDAB, 0x7905}, //11536 #CJK UNIFIED IDEOGRAPH + {0xEDAC, 0x78F9}, //11537 #CJK UNIFIED IDEOGRAPH + {0xEDAD, 0x78FE}, //11538 #CJK UNIFIED IDEOGRAPH + {0xEDAE, 0x7904}, //11539 #CJK UNIFIED IDEOGRAPH + {0xEDAF, 0x79AB}, //11540 #CJK UNIFIED IDEOGRAPH + {0xEDB0, 0x79A8}, //11541 #CJK UNIFIED IDEOGRAPH + {0xEDB1, 0x7A5C}, //11542 #CJK UNIFIED IDEOGRAPH + {0xEDB2, 0x7A5B}, //11543 #CJK UNIFIED IDEOGRAPH + {0xEDB3, 0x7A56}, //11544 #CJK UNIFIED IDEOGRAPH + {0xEDB4, 0x7A58}, //11545 #CJK UNIFIED IDEOGRAPH + {0xEDB5, 0x7A54}, //11546 #CJK UNIFIED IDEOGRAPH + {0xEDB6, 0x7A5A}, //11547 #CJK UNIFIED IDEOGRAPH + {0xEDB7, 0x7ABE}, //11548 #CJK UNIFIED IDEOGRAPH + {0xEDB8, 0x7AC0}, //11549 #CJK UNIFIED IDEOGRAPH + {0xEDB9, 0x7AC1}, //11550 #CJK UNIFIED IDEOGRAPH + {0xEDBA, 0x7C05}, //11551 #CJK UNIFIED IDEOGRAPH + {0xEDBB, 0x7C0F}, //11552 #CJK UNIFIED IDEOGRAPH + {0xEDBC, 0x7BF2}, //11553 #CJK UNIFIED IDEOGRAPH + {0xEDBD, 0x7C00}, //11554 #CJK UNIFIED IDEOGRAPH + {0xEDBE, 0x7BFF}, //11555 #CJK UNIFIED IDEOGRAPH + {0xEDBF, 0x7BFB}, //11556 #CJK UNIFIED IDEOGRAPH + {0xEDC0, 0x7C0E}, //11557 #CJK UNIFIED IDEOGRAPH + {0xEDC1, 0x7BF4}, //11558 #CJK UNIFIED IDEOGRAPH + {0xEDC2, 0x7C0B}, //11559 #CJK UNIFIED IDEOGRAPH + {0xEDC3, 0x7BF3}, //11560 #CJK UNIFIED IDEOGRAPH + {0xEDC4, 0x7C02}, //11561 #CJK UNIFIED IDEOGRAPH + {0xEDC5, 0x7C09}, //11562 #CJK UNIFIED IDEOGRAPH + {0xEDC6, 0x7C03}, //11563 #CJK UNIFIED IDEOGRAPH + {0xEDC7, 0x7C01}, //11564 #CJK UNIFIED IDEOGRAPH + {0xEDC8, 0x7BF8}, //11565 #CJK UNIFIED IDEOGRAPH + {0xEDC9, 0x7BFD}, //11566 #CJK UNIFIED IDEOGRAPH + {0xEDCA, 0x7C06}, //11567 #CJK UNIFIED IDEOGRAPH + {0xEDCB, 0x7BF0}, //11568 #CJK UNIFIED IDEOGRAPH + {0xEDCC, 0x7BF1}, //11569 #CJK UNIFIED IDEOGRAPH + {0xEDCD, 0x7C10}, //11570 #CJK UNIFIED IDEOGRAPH + {0xEDCE, 0x7C0A}, //11571 #CJK UNIFIED IDEOGRAPH + {0xEDCF, 0x7CE8}, //11572 #CJK UNIFIED IDEOGRAPH + {0xEDD0, 0x7E2D}, //11573 #CJK UNIFIED IDEOGRAPH + {0xEDD1, 0x7E3C}, //11574 #CJK UNIFIED IDEOGRAPH + {0xEDD2, 0x7E42}, //11575 #CJK UNIFIED IDEOGRAPH + {0xEDD3, 0x7E33}, //11576 #CJK UNIFIED IDEOGRAPH + {0xEDD4, 0x9848}, //11577 #CJK UNIFIED IDEOGRAPH + {0xEDD5, 0x7E38}, //11578 #CJK UNIFIED IDEOGRAPH + {0xEDD6, 0x7E2A}, //11579 #CJK UNIFIED IDEOGRAPH + {0xEDD7, 0x7E49}, //11580 #CJK UNIFIED IDEOGRAPH + {0xEDD8, 0x7E40}, //11581 #CJK UNIFIED IDEOGRAPH + {0xEDD9, 0x7E47}, //11582 #CJK UNIFIED IDEOGRAPH + {0xEDDA, 0x7E29}, //11583 #CJK UNIFIED IDEOGRAPH + {0xEDDB, 0x7E4C}, //11584 #CJK UNIFIED IDEOGRAPH + {0xEDDC, 0x7E30}, //11585 #CJK UNIFIED IDEOGRAPH + {0xEDDD, 0x7E3B}, //11586 #CJK UNIFIED IDEOGRAPH + {0xEDDE, 0x7E36}, //11587 #CJK UNIFIED IDEOGRAPH + {0xEDDF, 0x7E44}, //11588 #CJK UNIFIED IDEOGRAPH + {0xEDE0, 0x7E3A}, //11589 #CJK UNIFIED IDEOGRAPH + {0xEDE1, 0x7F45}, //11590 #CJK UNIFIED IDEOGRAPH + {0xEDE2, 0x7F7F}, //11591 #CJK UNIFIED IDEOGRAPH + {0xEDE3, 0x7F7E}, //11592 #CJK UNIFIED IDEOGRAPH + {0xEDE4, 0x7F7D}, //11593 #CJK UNIFIED IDEOGRAPH + {0xEDE5, 0x7FF4}, //11594 #CJK UNIFIED IDEOGRAPH + {0xEDE6, 0x7FF2}, //11595 #CJK UNIFIED IDEOGRAPH + {0xEDE7, 0x802C}, //11596 #CJK UNIFIED IDEOGRAPH + {0xEDE8, 0x81BB}, //11597 #CJK UNIFIED IDEOGRAPH + {0xEDE9, 0x81C4}, //11598 #CJK UNIFIED IDEOGRAPH + {0xEDEA, 0x81CC}, //11599 #CJK UNIFIED IDEOGRAPH + {0xEDEB, 0x81CA}, //11600 #CJK UNIFIED IDEOGRAPH + {0xEDEC, 0x81C5}, //11601 #CJK UNIFIED IDEOGRAPH + {0xEDED, 0x81C7}, //11602 #CJK UNIFIED IDEOGRAPH + {0xEDEE, 0x81BC}, //11603 #CJK UNIFIED IDEOGRAPH + {0xEDEF, 0x81E9}, //11604 #CJK UNIFIED IDEOGRAPH + {0xEDF0, 0x825B}, //11605 #CJK UNIFIED IDEOGRAPH + {0xEDF1, 0x825A}, //11606 #CJK UNIFIED IDEOGRAPH + {0xEDF2, 0x825C}, //11607 #CJK UNIFIED IDEOGRAPH + {0xEDF3, 0x8583}, //11608 #CJK UNIFIED IDEOGRAPH + {0xEDF4, 0x8580}, //11609 #CJK UNIFIED IDEOGRAPH + {0xEDF5, 0x858F}, //11610 #CJK UNIFIED IDEOGRAPH + {0xEDF6, 0x85A7}, //11611 #CJK UNIFIED IDEOGRAPH + {0xEDF7, 0x8595}, //11612 #CJK UNIFIED IDEOGRAPH + {0xEDF8, 0x85A0}, //11613 #CJK UNIFIED IDEOGRAPH + {0xEDF9, 0x858B}, //11614 #CJK UNIFIED IDEOGRAPH + {0xEDFA, 0x85A3}, //11615 #CJK UNIFIED IDEOGRAPH + {0xEDFB, 0x857B}, //11616 #CJK UNIFIED IDEOGRAPH + {0xEDFC, 0x85A4}, //11617 #CJK UNIFIED IDEOGRAPH + {0xEDFD, 0x859A}, //11618 #CJK UNIFIED IDEOGRAPH + {0xEDFE, 0x859E}, //11619 #CJK UNIFIED IDEOGRAPH + {0xEE40, 0x8577}, //11620 #CJK UNIFIED IDEOGRAPH + {0xEE41, 0x857C}, //11621 #CJK UNIFIED IDEOGRAPH + {0xEE42, 0x8589}, //11622 #CJK UNIFIED IDEOGRAPH + {0xEE43, 0x85A1}, //11623 #CJK UNIFIED IDEOGRAPH + {0xEE44, 0x857A}, //11624 #CJK UNIFIED IDEOGRAPH + {0xEE45, 0x8578}, //11625 #CJK UNIFIED IDEOGRAPH + {0xEE46, 0x8557}, //11626 #CJK UNIFIED IDEOGRAPH + {0xEE47, 0x858E}, //11627 #CJK UNIFIED IDEOGRAPH + {0xEE48, 0x8596}, //11628 #CJK UNIFIED IDEOGRAPH + {0xEE49, 0x8586}, //11629 #CJK UNIFIED IDEOGRAPH + {0xEE4A, 0x858D}, //11630 #CJK UNIFIED IDEOGRAPH + {0xEE4B, 0x8599}, //11631 #CJK UNIFIED IDEOGRAPH + {0xEE4C, 0x859D}, //11632 #CJK UNIFIED IDEOGRAPH + {0xEE4D, 0x8581}, //11633 #CJK UNIFIED IDEOGRAPH + {0xEE4E, 0x85A2}, //11634 #CJK UNIFIED IDEOGRAPH + {0xEE4F, 0x8582}, //11635 #CJK UNIFIED IDEOGRAPH + {0xEE50, 0x8588}, //11636 #CJK UNIFIED IDEOGRAPH + {0xEE51, 0x8585}, //11637 #CJK UNIFIED IDEOGRAPH + {0xEE52, 0x8579}, //11638 #CJK UNIFIED IDEOGRAPH + {0xEE53, 0x8576}, //11639 #CJK UNIFIED IDEOGRAPH + {0xEE54, 0x8598}, //11640 #CJK UNIFIED IDEOGRAPH + {0xEE55, 0x8590}, //11641 #CJK UNIFIED IDEOGRAPH + {0xEE56, 0x859F}, //11642 #CJK UNIFIED IDEOGRAPH + {0xEE57, 0x8668}, //11643 #CJK UNIFIED IDEOGRAPH + {0xEE58, 0x87BE}, //11644 #CJK UNIFIED IDEOGRAPH + {0xEE59, 0x87AA}, //11645 #CJK UNIFIED IDEOGRAPH + {0xEE5A, 0x87AD}, //11646 #CJK UNIFIED IDEOGRAPH + {0xEE5B, 0x87C5}, //11647 #CJK UNIFIED IDEOGRAPH + {0xEE5C, 0x87B0}, //11648 #CJK UNIFIED IDEOGRAPH + {0xEE5D, 0x87AC}, //11649 #CJK UNIFIED IDEOGRAPH + {0xEE5E, 0x87B9}, //11650 #CJK UNIFIED IDEOGRAPH + {0xEE5F, 0x87B5}, //11651 #CJK UNIFIED IDEOGRAPH + {0xEE60, 0x87BC}, //11652 #CJK UNIFIED IDEOGRAPH + {0xEE61, 0x87AE}, //11653 #CJK UNIFIED IDEOGRAPH + {0xEE62, 0x87C9}, //11654 #CJK UNIFIED IDEOGRAPH + {0xEE63, 0x87C3}, //11655 #CJK UNIFIED IDEOGRAPH + {0xEE64, 0x87C2}, //11656 #CJK UNIFIED IDEOGRAPH + {0xEE65, 0x87CC}, //11657 #CJK UNIFIED IDEOGRAPH + {0xEE66, 0x87B7}, //11658 #CJK UNIFIED IDEOGRAPH + {0xEE67, 0x87AF}, //11659 #CJK UNIFIED IDEOGRAPH + {0xEE68, 0x87C4}, //11660 #CJK UNIFIED IDEOGRAPH + {0xEE69, 0x87CA}, //11661 #CJK UNIFIED IDEOGRAPH + {0xEE6A, 0x87B4}, //11662 #CJK UNIFIED IDEOGRAPH + {0xEE6B, 0x87B6}, //11663 #CJK UNIFIED IDEOGRAPH + {0xEE6C, 0x87BF}, //11664 #CJK UNIFIED IDEOGRAPH + {0xEE6D, 0x87B8}, //11665 #CJK UNIFIED IDEOGRAPH + {0xEE6E, 0x87BD}, //11666 #CJK UNIFIED IDEOGRAPH + {0xEE6F, 0x87DE}, //11667 #CJK UNIFIED IDEOGRAPH + {0xEE70, 0x87B2}, //11668 #CJK UNIFIED IDEOGRAPH + {0xEE71, 0x8935}, //11669 #CJK UNIFIED IDEOGRAPH + {0xEE72, 0x8933}, //11670 #CJK UNIFIED IDEOGRAPH + {0xEE73, 0x893C}, //11671 #CJK UNIFIED IDEOGRAPH + {0xEE74, 0x893E}, //11672 #CJK UNIFIED IDEOGRAPH + {0xEE75, 0x8941}, //11673 #CJK UNIFIED IDEOGRAPH + {0xEE76, 0x8952}, //11674 #CJK UNIFIED IDEOGRAPH + {0xEE77, 0x8937}, //11675 #CJK UNIFIED IDEOGRAPH + {0xEE78, 0x8942}, //11676 #CJK UNIFIED IDEOGRAPH + {0xEE79, 0x89AD}, //11677 #CJK UNIFIED IDEOGRAPH + {0xEE7A, 0x89AF}, //11678 #CJK UNIFIED IDEOGRAPH + {0xEE7B, 0x89AE}, //11679 #CJK UNIFIED IDEOGRAPH + {0xEE7C, 0x89F2}, //11680 #CJK UNIFIED IDEOGRAPH + {0xEE7D, 0x89F3}, //11681 #CJK UNIFIED IDEOGRAPH + {0xEE7E, 0x8B1E}, //11682 #CJK UNIFIED IDEOGRAPH + {0xEEA1, 0x8B18}, //11683 #CJK UNIFIED IDEOGRAPH + {0xEEA2, 0x8B16}, //11684 #CJK UNIFIED IDEOGRAPH + {0xEEA3, 0x8B11}, //11685 #CJK UNIFIED IDEOGRAPH + {0xEEA4, 0x8B05}, //11686 #CJK UNIFIED IDEOGRAPH + {0xEEA5, 0x8B0B}, //11687 #CJK UNIFIED IDEOGRAPH + {0xEEA6, 0x8B22}, //11688 #CJK UNIFIED IDEOGRAPH + {0xEEA7, 0x8B0F}, //11689 #CJK UNIFIED IDEOGRAPH + {0xEEA8, 0x8B12}, //11690 #CJK UNIFIED IDEOGRAPH + {0xEEA9, 0x8B15}, //11691 #CJK UNIFIED IDEOGRAPH + {0xEEAA, 0x8B07}, //11692 #CJK UNIFIED IDEOGRAPH + {0xEEAB, 0x8B0D}, //11693 #CJK UNIFIED IDEOGRAPH + {0xEEAC, 0x8B08}, //11694 #CJK UNIFIED IDEOGRAPH + {0xEEAD, 0x8B06}, //11695 #CJK UNIFIED IDEOGRAPH + {0xEEAE, 0x8B1C}, //11696 #CJK UNIFIED IDEOGRAPH + {0xEEAF, 0x8B13}, //11697 #CJK UNIFIED IDEOGRAPH + {0xEEB0, 0x8B1A}, //11698 #CJK UNIFIED IDEOGRAPH + {0xEEB1, 0x8C4F}, //11699 #CJK UNIFIED IDEOGRAPH + {0xEEB2, 0x8C70}, //11700 #CJK UNIFIED IDEOGRAPH + {0xEEB3, 0x8C72}, //11701 #CJK UNIFIED IDEOGRAPH + {0xEEB4, 0x8C71}, //11702 #CJK UNIFIED IDEOGRAPH + {0xEEB5, 0x8C6F}, //11703 #CJK UNIFIED IDEOGRAPH + {0xEEB6, 0x8C95}, //11704 #CJK UNIFIED IDEOGRAPH + {0xEEB7, 0x8C94}, //11705 #CJK UNIFIED IDEOGRAPH + {0xEEB8, 0x8CF9}, //11706 #CJK UNIFIED IDEOGRAPH + {0xEEB9, 0x8D6F}, //11707 #CJK UNIFIED IDEOGRAPH + {0xEEBA, 0x8E4E}, //11708 #CJK UNIFIED IDEOGRAPH + {0xEEBB, 0x8E4D}, //11709 #CJK UNIFIED IDEOGRAPH + {0xEEBC, 0x8E53}, //11710 #CJK UNIFIED IDEOGRAPH + {0xEEBD, 0x8E50}, //11711 #CJK UNIFIED IDEOGRAPH + {0xEEBE, 0x8E4C}, //11712 #CJK UNIFIED IDEOGRAPH + {0xEEBF, 0x8E47}, //11713 #CJK UNIFIED IDEOGRAPH + {0xEEC0, 0x8F43}, //11714 #CJK UNIFIED IDEOGRAPH + {0xEEC1, 0x8F40}, //11715 #CJK UNIFIED IDEOGRAPH + {0xEEC2, 0x9085}, //11716 #CJK UNIFIED IDEOGRAPH + {0xEEC3, 0x907E}, //11717 #CJK UNIFIED IDEOGRAPH + {0xEEC4, 0x9138}, //11718 #CJK UNIFIED IDEOGRAPH + {0xEEC5, 0x919A}, //11719 #CJK UNIFIED IDEOGRAPH + {0xEEC6, 0x91A2}, //11720 #CJK UNIFIED IDEOGRAPH + {0xEEC7, 0x919B}, //11721 #CJK UNIFIED IDEOGRAPH + {0xEEC8, 0x9199}, //11722 #CJK UNIFIED IDEOGRAPH + {0xEEC9, 0x919F}, //11723 #CJK UNIFIED IDEOGRAPH + {0xEECA, 0x91A1}, //11724 #CJK UNIFIED IDEOGRAPH + {0xEECB, 0x919D}, //11725 #CJK UNIFIED IDEOGRAPH + {0xEECC, 0x91A0}, //11726 #CJK UNIFIED IDEOGRAPH + {0xEECD, 0x93A1}, //11727 #CJK UNIFIED IDEOGRAPH + {0xEECE, 0x9383}, //11728 #CJK UNIFIED IDEOGRAPH + {0xEECF, 0x93AF}, //11729 #CJK UNIFIED IDEOGRAPH + {0xEED0, 0x9364}, //11730 #CJK UNIFIED IDEOGRAPH + {0xEED1, 0x9356}, //11731 #CJK UNIFIED IDEOGRAPH + {0xEED2, 0x9347}, //11732 #CJK UNIFIED IDEOGRAPH + {0xEED3, 0x937C}, //11733 #CJK UNIFIED IDEOGRAPH + {0xEED4, 0x9358}, //11734 #CJK UNIFIED IDEOGRAPH + {0xEED5, 0x935C}, //11735 #CJK UNIFIED IDEOGRAPH + {0xEED6, 0x9376}, //11736 #CJK UNIFIED IDEOGRAPH + {0xEED7, 0x9349}, //11737 #CJK UNIFIED IDEOGRAPH + {0xEED8, 0x9350}, //11738 #CJK UNIFIED IDEOGRAPH + {0xEED9, 0x9351}, //11739 #CJK UNIFIED IDEOGRAPH + {0xEEDA, 0x9360}, //11740 #CJK UNIFIED IDEOGRAPH + {0xEEDB, 0x936D}, //11741 #CJK UNIFIED IDEOGRAPH + {0xEEDC, 0x938F}, //11742 #CJK UNIFIED IDEOGRAPH + {0xEEDD, 0x934C}, //11743 #CJK UNIFIED IDEOGRAPH + {0xEEDE, 0x936A}, //11744 #CJK UNIFIED IDEOGRAPH + {0xEEDF, 0x9379}, //11745 #CJK UNIFIED IDEOGRAPH + {0xEEE0, 0x9357}, //11746 #CJK UNIFIED IDEOGRAPH + {0xEEE1, 0x9355}, //11747 #CJK UNIFIED IDEOGRAPH + {0xEEE2, 0x9352}, //11748 #CJK UNIFIED IDEOGRAPH + {0xEEE3, 0x934F}, //11749 #CJK UNIFIED IDEOGRAPH + {0xEEE4, 0x9371}, //11750 #CJK UNIFIED IDEOGRAPH + {0xEEE5, 0x9377}, //11751 #CJK UNIFIED IDEOGRAPH + {0xEEE6, 0x937B}, //11752 #CJK UNIFIED IDEOGRAPH + {0xEEE7, 0x9361}, //11753 #CJK UNIFIED IDEOGRAPH + {0xEEE8, 0x935E}, //11754 #CJK UNIFIED IDEOGRAPH + {0xEEE9, 0x9363}, //11755 #CJK UNIFIED IDEOGRAPH + {0xEEEA, 0x9367}, //11756 #CJK UNIFIED IDEOGRAPH + {0xEEEB, 0x9380}, //11757 #CJK UNIFIED IDEOGRAPH + {0xEEEC, 0x934E}, //11758 #CJK UNIFIED IDEOGRAPH + {0xEEED, 0x9359}, //11759 #CJK UNIFIED IDEOGRAPH + {0xEEEE, 0x95C7}, //11760 #CJK UNIFIED IDEOGRAPH + {0xEEEF, 0x95C0}, //11761 #CJK UNIFIED IDEOGRAPH + {0xEEF0, 0x95C9}, //11762 #CJK UNIFIED IDEOGRAPH + {0xEEF1, 0x95C3}, //11763 #CJK UNIFIED IDEOGRAPH + {0xEEF2, 0x95C5}, //11764 #CJK UNIFIED IDEOGRAPH + {0xEEF3, 0x95B7}, //11765 #CJK UNIFIED IDEOGRAPH + {0xEEF4, 0x96AE}, //11766 #CJK UNIFIED IDEOGRAPH + {0xEEF5, 0x96B0}, //11767 #CJK UNIFIED IDEOGRAPH + {0xEEF6, 0x96AC}, //11768 #CJK UNIFIED IDEOGRAPH + {0xEEF7, 0x9720}, //11769 #CJK UNIFIED IDEOGRAPH + {0xEEF8, 0x971F}, //11770 #CJK UNIFIED IDEOGRAPH + {0xEEF9, 0x9718}, //11771 #CJK UNIFIED IDEOGRAPH + {0xEEFA, 0x971D}, //11772 #CJK UNIFIED IDEOGRAPH + {0xEEFB, 0x9719}, //11773 #CJK UNIFIED IDEOGRAPH + {0xEEFC, 0x979A}, //11774 #CJK UNIFIED IDEOGRAPH + {0xEEFD, 0x97A1}, //11775 #CJK UNIFIED IDEOGRAPH + {0xEEFE, 0x979C}, //11776 #CJK UNIFIED IDEOGRAPH + {0xEF40, 0x979E}, //11777 #CJK UNIFIED IDEOGRAPH + {0xEF41, 0x979D}, //11778 #CJK UNIFIED IDEOGRAPH + {0xEF42, 0x97D5}, //11779 #CJK UNIFIED IDEOGRAPH + {0xEF43, 0x97D4}, //11780 #CJK UNIFIED IDEOGRAPH + {0xEF44, 0x97F1}, //11781 #CJK UNIFIED IDEOGRAPH + {0xEF45, 0x9841}, //11782 #CJK UNIFIED IDEOGRAPH + {0xEF46, 0x9844}, //11783 #CJK UNIFIED IDEOGRAPH + {0xEF47, 0x984A}, //11784 #CJK UNIFIED IDEOGRAPH + {0xEF48, 0x9849}, //11785 #CJK UNIFIED IDEOGRAPH + {0xEF49, 0x9845}, //11786 #CJK UNIFIED IDEOGRAPH + {0xEF4A, 0x9843}, //11787 #CJK UNIFIED IDEOGRAPH + {0xEF4B, 0x9925}, //11788 #CJK UNIFIED IDEOGRAPH + {0xEF4C, 0x992B}, //11789 #CJK UNIFIED IDEOGRAPH + {0xEF4D, 0x992C}, //11790 #CJK UNIFIED IDEOGRAPH + {0xEF4E, 0x992A}, //11791 #CJK UNIFIED IDEOGRAPH + {0xEF4F, 0x9933}, //11792 #CJK UNIFIED IDEOGRAPH + {0xEF50, 0x9932}, //11793 #CJK UNIFIED IDEOGRAPH + {0xEF51, 0x992F}, //11794 #CJK UNIFIED IDEOGRAPH + {0xEF52, 0x992D}, //11795 #CJK UNIFIED IDEOGRAPH + {0xEF53, 0x9931}, //11796 #CJK UNIFIED IDEOGRAPH + {0xEF54, 0x9930}, //11797 #CJK UNIFIED IDEOGRAPH + {0xEF55, 0x9998}, //11798 #CJK UNIFIED IDEOGRAPH + {0xEF56, 0x99A3}, //11799 #CJK UNIFIED IDEOGRAPH + {0xEF57, 0x99A1}, //11800 #CJK UNIFIED IDEOGRAPH + {0xEF58, 0x9A02}, //11801 #CJK UNIFIED IDEOGRAPH + {0xEF59, 0x99FA}, //11802 #CJK UNIFIED IDEOGRAPH + {0xEF5A, 0x99F4}, //11803 #CJK UNIFIED IDEOGRAPH + {0xEF5B, 0x99F7}, //11804 #CJK UNIFIED IDEOGRAPH + {0xEF5C, 0x99F9}, //11805 #CJK UNIFIED IDEOGRAPH + {0xEF5D, 0x99F8}, //11806 #CJK UNIFIED IDEOGRAPH + {0xEF5E, 0x99F6}, //11807 #CJK UNIFIED IDEOGRAPH + {0xEF5F, 0x99FB}, //11808 #CJK UNIFIED IDEOGRAPH + {0xEF60, 0x99FD}, //11809 #CJK UNIFIED IDEOGRAPH + {0xEF61, 0x99FE}, //11810 #CJK UNIFIED IDEOGRAPH + {0xEF62, 0x99FC}, //11811 #CJK UNIFIED IDEOGRAPH + {0xEF63, 0x9A03}, //11812 #CJK UNIFIED IDEOGRAPH + {0xEF64, 0x9ABE}, //11813 #CJK UNIFIED IDEOGRAPH + {0xEF65, 0x9AFE}, //11814 #CJK UNIFIED IDEOGRAPH + {0xEF66, 0x9AFD}, //11815 #CJK UNIFIED IDEOGRAPH + {0xEF67, 0x9B01}, //11816 #CJK UNIFIED IDEOGRAPH + {0xEF68, 0x9AFC}, //11817 #CJK UNIFIED IDEOGRAPH + {0xEF69, 0x9B48}, //11818 #CJK UNIFIED IDEOGRAPH + {0xEF6A, 0x9B9A}, //11819 #CJK UNIFIED IDEOGRAPH + {0xEF6B, 0x9BA8}, //11820 #CJK UNIFIED IDEOGRAPH + {0xEF6C, 0x9B9E}, //11821 #CJK UNIFIED IDEOGRAPH + {0xEF6D, 0x9B9B}, //11822 #CJK UNIFIED IDEOGRAPH + {0xEF6E, 0x9BA6}, //11823 #CJK UNIFIED IDEOGRAPH + {0xEF6F, 0x9BA1}, //11824 #CJK UNIFIED IDEOGRAPH + {0xEF70, 0x9BA5}, //11825 #CJK UNIFIED IDEOGRAPH + {0xEF71, 0x9BA4}, //11826 #CJK UNIFIED IDEOGRAPH + {0xEF72, 0x9B86}, //11827 #CJK UNIFIED IDEOGRAPH + {0xEF73, 0x9BA2}, //11828 #CJK UNIFIED IDEOGRAPH + {0xEF74, 0x9BA0}, //11829 #CJK UNIFIED IDEOGRAPH + {0xEF75, 0x9BAF}, //11830 #CJK UNIFIED IDEOGRAPH + {0xEF76, 0x9D33}, //11831 #CJK UNIFIED IDEOGRAPH + {0xEF77, 0x9D41}, //11832 #CJK UNIFIED IDEOGRAPH + {0xEF78, 0x9D67}, //11833 #CJK UNIFIED IDEOGRAPH + {0xEF79, 0x9D36}, //11834 #CJK UNIFIED IDEOGRAPH + {0xEF7A, 0x9D2E}, //11835 #CJK UNIFIED IDEOGRAPH + {0xEF7B, 0x9D2F}, //11836 #CJK UNIFIED IDEOGRAPH + {0xEF7C, 0x9D31}, //11837 #CJK UNIFIED IDEOGRAPH + {0xEF7D, 0x9D38}, //11838 #CJK UNIFIED IDEOGRAPH + {0xEF7E, 0x9D30}, //11839 #CJK UNIFIED IDEOGRAPH + {0xEFA1, 0x9D45}, //11840 #CJK UNIFIED IDEOGRAPH + {0xEFA2, 0x9D42}, //11841 #CJK UNIFIED IDEOGRAPH + {0xEFA3, 0x9D43}, //11842 #CJK UNIFIED IDEOGRAPH + {0xEFA4, 0x9D3E}, //11843 #CJK UNIFIED IDEOGRAPH + {0xEFA5, 0x9D37}, //11844 #CJK UNIFIED IDEOGRAPH + {0xEFA6, 0x9D40}, //11845 #CJK UNIFIED IDEOGRAPH + {0xEFA7, 0x9D3D}, //11846 #CJK UNIFIED IDEOGRAPH + {0xEFA8, 0x7FF5}, //11847 #CJK UNIFIED IDEOGRAPH + {0xEFA9, 0x9D2D}, //11848 #CJK UNIFIED IDEOGRAPH + {0xEFAA, 0x9E8A}, //11849 #CJK UNIFIED IDEOGRAPH + {0xEFAB, 0x9E89}, //11850 #CJK UNIFIED IDEOGRAPH + {0xEFAC, 0x9E8D}, //11851 #CJK UNIFIED IDEOGRAPH + {0xEFAD, 0x9EB0}, //11852 #CJK UNIFIED IDEOGRAPH + {0xEFAE, 0x9EC8}, //11853 #CJK UNIFIED IDEOGRAPH + {0xEFAF, 0x9EDA}, //11854 #CJK UNIFIED IDEOGRAPH + {0xEFB0, 0x9EFB}, //11855 #CJK UNIFIED IDEOGRAPH + {0xEFB1, 0x9EFF}, //11856 #CJK UNIFIED IDEOGRAPH + {0xEFB2, 0x9F24}, //11857 #CJK UNIFIED IDEOGRAPH + {0xEFB3, 0x9F23}, //11858 #CJK UNIFIED IDEOGRAPH + {0xEFB4, 0x9F22}, //11859 #CJK UNIFIED IDEOGRAPH + {0xEFB5, 0x9F54}, //11860 #CJK UNIFIED IDEOGRAPH + {0xEFB6, 0x9FA0}, //11861 #CJK UNIFIED IDEOGRAPH + {0xEFB7, 0x5131}, //11862 #CJK UNIFIED IDEOGRAPH + {0xEFB8, 0x512D}, //11863 #CJK UNIFIED IDEOGRAPH + {0xEFB9, 0x512E}, //11864 #CJK UNIFIED IDEOGRAPH + {0xEFBA, 0x5698}, //11865 #CJK UNIFIED IDEOGRAPH + {0xEFBB, 0x569C}, //11866 #CJK UNIFIED IDEOGRAPH + {0xEFBC, 0x5697}, //11867 #CJK UNIFIED IDEOGRAPH + {0xEFBD, 0x569A}, //11868 #CJK UNIFIED IDEOGRAPH + {0xEFBE, 0x569D}, //11869 #CJK UNIFIED IDEOGRAPH + {0xEFBF, 0x5699}, //11870 #CJK UNIFIED IDEOGRAPH + {0xEFC0, 0x5970}, //11871 #CJK UNIFIED IDEOGRAPH + {0xEFC1, 0x5B3C}, //11872 #CJK UNIFIED IDEOGRAPH + {0xEFC2, 0x5C69}, //11873 #CJK UNIFIED IDEOGRAPH + {0xEFC3, 0x5C6A}, //11874 #CJK UNIFIED IDEOGRAPH + {0xEFC4, 0x5DC0}, //11875 #CJK UNIFIED IDEOGRAPH + {0xEFC5, 0x5E6D}, //11876 #CJK UNIFIED IDEOGRAPH + {0xEFC6, 0x5E6E}, //11877 #CJK UNIFIED IDEOGRAPH + {0xEFC7, 0x61D8}, //11878 #CJK UNIFIED IDEOGRAPH + {0xEFC8, 0x61DF}, //11879 #CJK UNIFIED IDEOGRAPH + {0xEFC9, 0x61ED}, //11880 #CJK UNIFIED IDEOGRAPH + {0xEFCA, 0x61EE}, //11881 #CJK UNIFIED IDEOGRAPH + {0xEFCB, 0x61F1}, //11882 #CJK UNIFIED IDEOGRAPH + {0xEFCC, 0x61EA}, //11883 #CJK UNIFIED IDEOGRAPH + {0xEFCD, 0x61F0}, //11884 #CJK UNIFIED IDEOGRAPH + {0xEFCE, 0x61EB}, //11885 #CJK UNIFIED IDEOGRAPH + {0xEFCF, 0x61D6}, //11886 #CJK UNIFIED IDEOGRAPH + {0xEFD0, 0x61E9}, //11887 #CJK UNIFIED IDEOGRAPH + {0xEFD1, 0x64FF}, //11888 #CJK UNIFIED IDEOGRAPH + {0xEFD2, 0x6504}, //11889 #CJK UNIFIED IDEOGRAPH + {0xEFD3, 0x64FD}, //11890 #CJK UNIFIED IDEOGRAPH + {0xEFD4, 0x64F8}, //11891 #CJK UNIFIED IDEOGRAPH + {0xEFD5, 0x6501}, //11892 #CJK UNIFIED IDEOGRAPH + {0xEFD6, 0x6503}, //11893 #CJK UNIFIED IDEOGRAPH + {0xEFD7, 0x64FC}, //11894 #CJK UNIFIED IDEOGRAPH + {0xEFD8, 0x6594}, //11895 #CJK UNIFIED IDEOGRAPH + {0xEFD9, 0x65DB}, //11896 #CJK UNIFIED IDEOGRAPH + {0xEFDA, 0x66DA}, //11897 #CJK UNIFIED IDEOGRAPH + {0xEFDB, 0x66DB}, //11898 #CJK UNIFIED IDEOGRAPH + {0xEFDC, 0x66D8}, //11899 #CJK UNIFIED IDEOGRAPH + {0xEFDD, 0x6AC5}, //11900 #CJK UNIFIED IDEOGRAPH + {0xEFDE, 0x6AB9}, //11901 #CJK UNIFIED IDEOGRAPH + {0xEFDF, 0x6ABD}, //11902 #CJK UNIFIED IDEOGRAPH + {0xEFE0, 0x6AE1}, //11903 #CJK UNIFIED IDEOGRAPH + {0xEFE1, 0x6AC6}, //11904 #CJK UNIFIED IDEOGRAPH + {0xEFE2, 0x6ABA}, //11905 #CJK UNIFIED IDEOGRAPH + {0xEFE3, 0x6AB6}, //11906 #CJK UNIFIED IDEOGRAPH + {0xEFE4, 0x6AB7}, //11907 #CJK UNIFIED IDEOGRAPH + {0xEFE5, 0x6AC7}, //11908 #CJK UNIFIED IDEOGRAPH + {0xEFE6, 0x6AB4}, //11909 #CJK UNIFIED IDEOGRAPH + {0xEFE7, 0x6AAD}, //11910 #CJK UNIFIED IDEOGRAPH + {0xEFE8, 0x6B5E}, //11911 #CJK UNIFIED IDEOGRAPH + {0xEFE9, 0x6BC9}, //11912 #CJK UNIFIED IDEOGRAPH + {0xEFEA, 0x6C0B}, //11913 #CJK UNIFIED IDEOGRAPH + {0xEFEB, 0x7007}, //11914 #CJK UNIFIED IDEOGRAPH + {0xEFEC, 0x700C}, //11915 #CJK UNIFIED IDEOGRAPH + {0xEFED, 0x700D}, //11916 #CJK UNIFIED IDEOGRAPH + {0xEFEE, 0x7001}, //11917 #CJK UNIFIED IDEOGRAPH + {0xEFEF, 0x7005}, //11918 #CJK UNIFIED IDEOGRAPH + {0xEFF0, 0x7014}, //11919 #CJK UNIFIED IDEOGRAPH + {0xEFF1, 0x700E}, //11920 #CJK UNIFIED IDEOGRAPH + {0xEFF2, 0x6FFF}, //11921 #CJK UNIFIED IDEOGRAPH + {0xEFF3, 0x7000}, //11922 #CJK UNIFIED IDEOGRAPH + {0xEFF4, 0x6FFB}, //11923 #CJK UNIFIED IDEOGRAPH + {0xEFF5, 0x7026}, //11924 #CJK UNIFIED IDEOGRAPH + {0xEFF6, 0x6FFC}, //11925 #CJK UNIFIED IDEOGRAPH + {0xEFF7, 0x6FF7}, //11926 #CJK UNIFIED IDEOGRAPH + {0xEFF8, 0x700A}, //11927 #CJK UNIFIED IDEOGRAPH + {0xEFF9, 0x7201}, //11928 #CJK UNIFIED IDEOGRAPH + {0xEFFA, 0x71FF}, //11929 #CJK UNIFIED IDEOGRAPH + {0xEFFB, 0x71F9}, //11930 #CJK UNIFIED IDEOGRAPH + {0xEFFC, 0x7203}, //11931 #CJK UNIFIED IDEOGRAPH + {0xEFFD, 0x71FD}, //11932 #CJK UNIFIED IDEOGRAPH + {0xEFFE, 0x7376}, //11933 #CJK UNIFIED IDEOGRAPH + {0xF040, 0x74B8}, //11934 #CJK UNIFIED IDEOGRAPH + {0xF041, 0x74C0}, //11935 #CJK UNIFIED IDEOGRAPH + {0xF042, 0x74B5}, //11936 #CJK UNIFIED IDEOGRAPH + {0xF043, 0x74C1}, //11937 #CJK UNIFIED IDEOGRAPH + {0xF044, 0x74BE}, //11938 #CJK UNIFIED IDEOGRAPH + {0xF045, 0x74B6}, //11939 #CJK UNIFIED IDEOGRAPH + {0xF046, 0x74BB}, //11940 #CJK UNIFIED IDEOGRAPH + {0xF047, 0x74C2}, //11941 #CJK UNIFIED IDEOGRAPH + {0xF048, 0x7514}, //11942 #CJK UNIFIED IDEOGRAPH + {0xF049, 0x7513}, //11943 #CJK UNIFIED IDEOGRAPH + {0xF04A, 0x765C}, //11944 #CJK UNIFIED IDEOGRAPH + {0xF04B, 0x7664}, //11945 #CJK UNIFIED IDEOGRAPH + {0xF04C, 0x7659}, //11946 #CJK UNIFIED IDEOGRAPH + {0xF04D, 0x7650}, //11947 #CJK UNIFIED IDEOGRAPH + {0xF04E, 0x7653}, //11948 #CJK UNIFIED IDEOGRAPH + {0xF04F, 0x7657}, //11949 #CJK UNIFIED IDEOGRAPH + {0xF050, 0x765A}, //11950 #CJK UNIFIED IDEOGRAPH + {0xF051, 0x76A6}, //11951 #CJK UNIFIED IDEOGRAPH + {0xF052, 0x76BD}, //11952 #CJK UNIFIED IDEOGRAPH + {0xF053, 0x76EC}, //11953 #CJK UNIFIED IDEOGRAPH + {0xF054, 0x77C2}, //11954 #CJK UNIFIED IDEOGRAPH + {0xF055, 0x77BA}, //11955 #CJK UNIFIED IDEOGRAPH + {0xF056, 0x78FF}, //11956 #CJK UNIFIED IDEOGRAPH + {0xF057, 0x790C}, //11957 #CJK UNIFIED IDEOGRAPH + {0xF058, 0x7913}, //11958 #CJK UNIFIED IDEOGRAPH + {0xF059, 0x7914}, //11959 #CJK UNIFIED IDEOGRAPH + {0xF05A, 0x7909}, //11960 #CJK UNIFIED IDEOGRAPH + {0xF05B, 0x7910}, //11961 #CJK UNIFIED IDEOGRAPH + {0xF05C, 0x7912}, //11962 #CJK UNIFIED IDEOGRAPH + {0xF05D, 0x7911}, //11963 #CJK UNIFIED IDEOGRAPH + {0xF05E, 0x79AD}, //11964 #CJK UNIFIED IDEOGRAPH + {0xF05F, 0x79AC}, //11965 #CJK UNIFIED IDEOGRAPH + {0xF060, 0x7A5F}, //11966 #CJK UNIFIED IDEOGRAPH + {0xF061, 0x7C1C}, //11967 #CJK UNIFIED IDEOGRAPH + {0xF062, 0x7C29}, //11968 #CJK UNIFIED IDEOGRAPH + {0xF063, 0x7C19}, //11969 #CJK UNIFIED IDEOGRAPH + {0xF064, 0x7C20}, //11970 #CJK UNIFIED IDEOGRAPH + {0xF065, 0x7C1F}, //11971 #CJK UNIFIED IDEOGRAPH + {0xF066, 0x7C2D}, //11972 #CJK UNIFIED IDEOGRAPH + {0xF067, 0x7C1D}, //11973 #CJK UNIFIED IDEOGRAPH + {0xF068, 0x7C26}, //11974 #CJK UNIFIED IDEOGRAPH + {0xF069, 0x7C28}, //11975 #CJK UNIFIED IDEOGRAPH + {0xF06A, 0x7C22}, //11976 #CJK UNIFIED IDEOGRAPH + {0xF06B, 0x7C25}, //11977 #CJK UNIFIED IDEOGRAPH + {0xF06C, 0x7C30}, //11978 #CJK UNIFIED IDEOGRAPH + {0xF06D, 0x7E5C}, //11979 #CJK UNIFIED IDEOGRAPH + {0xF06E, 0x7E50}, //11980 #CJK UNIFIED IDEOGRAPH + {0xF06F, 0x7E56}, //11981 #CJK UNIFIED IDEOGRAPH + {0xF070, 0x7E63}, //11982 #CJK UNIFIED IDEOGRAPH + {0xF071, 0x7E58}, //11983 #CJK UNIFIED IDEOGRAPH + {0xF072, 0x7E62}, //11984 #CJK UNIFIED IDEOGRAPH + {0xF073, 0x7E5F}, //11985 #CJK UNIFIED IDEOGRAPH + {0xF074, 0x7E51}, //11986 #CJK UNIFIED IDEOGRAPH + {0xF075, 0x7E60}, //11987 #CJK UNIFIED IDEOGRAPH + {0xF076, 0x7E57}, //11988 #CJK UNIFIED IDEOGRAPH + {0xF077, 0x7E53}, //11989 #CJK UNIFIED IDEOGRAPH + {0xF078, 0x7FB5}, //11990 #CJK UNIFIED IDEOGRAPH + {0xF079, 0x7FB3}, //11991 #CJK UNIFIED IDEOGRAPH + {0xF07A, 0x7FF7}, //11992 #CJK UNIFIED IDEOGRAPH + {0xF07B, 0x7FF8}, //11993 #CJK UNIFIED IDEOGRAPH + {0xF07C, 0x8075}, //11994 #CJK UNIFIED IDEOGRAPH + {0xF07D, 0x81D1}, //11995 #CJK UNIFIED IDEOGRAPH + {0xF07E, 0x81D2}, //11996 #CJK UNIFIED IDEOGRAPH + {0xF0A1, 0x81D0}, //11997 #CJK UNIFIED IDEOGRAPH + {0xF0A2, 0x825F}, //11998 #CJK UNIFIED IDEOGRAPH + {0xF0A3, 0x825E}, //11999 #CJK UNIFIED IDEOGRAPH + {0xF0A4, 0x85B4}, //12000 #CJK UNIFIED IDEOGRAPH + {0xF0A5, 0x85C6}, //12001 #CJK UNIFIED IDEOGRAPH + {0xF0A6, 0x85C0}, //12002 #CJK UNIFIED IDEOGRAPH + {0xF0A7, 0x85C3}, //12003 #CJK UNIFIED IDEOGRAPH + {0xF0A8, 0x85C2}, //12004 #CJK UNIFIED IDEOGRAPH + {0xF0A9, 0x85B3}, //12005 #CJK UNIFIED IDEOGRAPH + {0xF0AA, 0x85B5}, //12006 #CJK UNIFIED IDEOGRAPH + {0xF0AB, 0x85BD}, //12007 #CJK UNIFIED IDEOGRAPH + {0xF0AC, 0x85C7}, //12008 #CJK UNIFIED IDEOGRAPH + {0xF0AD, 0x85C4}, //12009 #CJK UNIFIED IDEOGRAPH + {0xF0AE, 0x85BF}, //12010 #CJK UNIFIED IDEOGRAPH + {0xF0AF, 0x85CB}, //12011 #CJK UNIFIED IDEOGRAPH + {0xF0B0, 0x85CE}, //12012 #CJK UNIFIED IDEOGRAPH + {0xF0B1, 0x85C8}, //12013 #CJK UNIFIED IDEOGRAPH + {0xF0B2, 0x85C5}, //12014 #CJK UNIFIED IDEOGRAPH + {0xF0B3, 0x85B1}, //12015 #CJK UNIFIED IDEOGRAPH + {0xF0B4, 0x85B6}, //12016 #CJK UNIFIED IDEOGRAPH + {0xF0B5, 0x85D2}, //12017 #CJK UNIFIED IDEOGRAPH + {0xF0B6, 0x8624}, //12018 #CJK UNIFIED IDEOGRAPH + {0xF0B7, 0x85B8}, //12019 #CJK UNIFIED IDEOGRAPH + {0xF0B8, 0x85B7}, //12020 #CJK UNIFIED IDEOGRAPH + {0xF0B9, 0x85BE}, //12021 #CJK UNIFIED IDEOGRAPH + {0xF0BA, 0x8669}, //12022 #CJK UNIFIED IDEOGRAPH + {0xF0BB, 0x87E7}, //12023 #CJK UNIFIED IDEOGRAPH + {0xF0BC, 0x87E6}, //12024 #CJK UNIFIED IDEOGRAPH + {0xF0BD, 0x87E2}, //12025 #CJK UNIFIED IDEOGRAPH + {0xF0BE, 0x87DB}, //12026 #CJK UNIFIED IDEOGRAPH + {0xF0BF, 0x87EB}, //12027 #CJK UNIFIED IDEOGRAPH + {0xF0C0, 0x87EA}, //12028 #CJK UNIFIED IDEOGRAPH + {0xF0C1, 0x87E5}, //12029 #CJK UNIFIED IDEOGRAPH + {0xF0C2, 0x87DF}, //12030 #CJK UNIFIED IDEOGRAPH + {0xF0C3, 0x87F3}, //12031 #CJK UNIFIED IDEOGRAPH + {0xF0C4, 0x87E4}, //12032 #CJK UNIFIED IDEOGRAPH + {0xF0C5, 0x87D4}, //12033 #CJK UNIFIED IDEOGRAPH + {0xF0C6, 0x87DC}, //12034 #CJK UNIFIED IDEOGRAPH + {0xF0C7, 0x87D3}, //12035 #CJK UNIFIED IDEOGRAPH + {0xF0C8, 0x87ED}, //12036 #CJK UNIFIED IDEOGRAPH + {0xF0C9, 0x87D8}, //12037 #CJK UNIFIED IDEOGRAPH + {0xF0CA, 0x87E3}, //12038 #CJK UNIFIED IDEOGRAPH + {0xF0CB, 0x87A4}, //12039 #CJK UNIFIED IDEOGRAPH + {0xF0CC, 0x87D7}, //12040 #CJK UNIFIED IDEOGRAPH + {0xF0CD, 0x87D9}, //12041 #CJK UNIFIED IDEOGRAPH + {0xF0CE, 0x8801}, //12042 #CJK UNIFIED IDEOGRAPH + {0xF0CF, 0x87F4}, //12043 #CJK UNIFIED IDEOGRAPH + {0xF0D0, 0x87E8}, //12044 #CJK UNIFIED IDEOGRAPH + {0xF0D1, 0x87DD}, //12045 #CJK UNIFIED IDEOGRAPH + {0xF0D2, 0x8953}, //12046 #CJK UNIFIED IDEOGRAPH + {0xF0D3, 0x894B}, //12047 #CJK UNIFIED IDEOGRAPH + {0xF0D4, 0x894F}, //12048 #CJK UNIFIED IDEOGRAPH + {0xF0D5, 0x894C}, //12049 #CJK UNIFIED IDEOGRAPH + {0xF0D6, 0x8946}, //12050 #CJK UNIFIED IDEOGRAPH + {0xF0D7, 0x8950}, //12051 #CJK UNIFIED IDEOGRAPH + {0xF0D8, 0x8951}, //12052 #CJK UNIFIED IDEOGRAPH + {0xF0D9, 0x8949}, //12053 #CJK UNIFIED IDEOGRAPH + {0xF0DA, 0x8B2A}, //12054 #CJK UNIFIED IDEOGRAPH + {0xF0DB, 0x8B27}, //12055 #CJK UNIFIED IDEOGRAPH + {0xF0DC, 0x8B23}, //12056 #CJK UNIFIED IDEOGRAPH + {0xF0DD, 0x8B33}, //12057 #CJK UNIFIED IDEOGRAPH + {0xF0DE, 0x8B30}, //12058 #CJK UNIFIED IDEOGRAPH + {0xF0DF, 0x8B35}, //12059 #CJK UNIFIED IDEOGRAPH + {0xF0E0, 0x8B47}, //12060 #CJK UNIFIED IDEOGRAPH + {0xF0E1, 0x8B2F}, //12061 #CJK UNIFIED IDEOGRAPH + {0xF0E2, 0x8B3C}, //12062 #CJK UNIFIED IDEOGRAPH + {0xF0E3, 0x8B3E}, //12063 #CJK UNIFIED IDEOGRAPH + {0xF0E4, 0x8B31}, //12064 #CJK UNIFIED IDEOGRAPH + {0xF0E5, 0x8B25}, //12065 #CJK UNIFIED IDEOGRAPH + {0xF0E6, 0x8B37}, //12066 #CJK UNIFIED IDEOGRAPH + {0xF0E7, 0x8B26}, //12067 #CJK UNIFIED IDEOGRAPH + {0xF0E8, 0x8B36}, //12068 #CJK UNIFIED IDEOGRAPH + {0xF0E9, 0x8B2E}, //12069 #CJK UNIFIED IDEOGRAPH + {0xF0EA, 0x8B24}, //12070 #CJK UNIFIED IDEOGRAPH + {0xF0EB, 0x8B3B}, //12071 #CJK UNIFIED IDEOGRAPH + {0xF0EC, 0x8B3D}, //12072 #CJK UNIFIED IDEOGRAPH + {0xF0ED, 0x8B3A}, //12073 #CJK UNIFIED IDEOGRAPH + {0xF0EE, 0x8C42}, //12074 #CJK UNIFIED IDEOGRAPH + {0xF0EF, 0x8C75}, //12075 #CJK UNIFIED IDEOGRAPH + {0xF0F0, 0x8C99}, //12076 #CJK UNIFIED IDEOGRAPH + {0xF0F1, 0x8C98}, //12077 #CJK UNIFIED IDEOGRAPH + {0xF0F2, 0x8C97}, //12078 #CJK UNIFIED IDEOGRAPH + {0xF0F3, 0x8CFE}, //12079 #CJK UNIFIED IDEOGRAPH + {0xF0F4, 0x8D04}, //12080 #CJK UNIFIED IDEOGRAPH + {0xF0F5, 0x8D02}, //12081 #CJK UNIFIED IDEOGRAPH + {0xF0F6, 0x8D00}, //12082 #CJK UNIFIED IDEOGRAPH + {0xF0F7, 0x8E5C}, //12083 #CJK UNIFIED IDEOGRAPH + {0xF0F8, 0x8E62}, //12084 #CJK UNIFIED IDEOGRAPH + {0xF0F9, 0x8E60}, //12085 #CJK UNIFIED IDEOGRAPH + {0xF0FA, 0x8E57}, //12086 #CJK UNIFIED IDEOGRAPH + {0xF0FB, 0x8E56}, //12087 #CJK UNIFIED IDEOGRAPH + {0xF0FC, 0x8E5E}, //12088 #CJK UNIFIED IDEOGRAPH + {0xF0FD, 0x8E65}, //12089 #CJK UNIFIED IDEOGRAPH + {0xF0FE, 0x8E67}, //12090 #CJK UNIFIED IDEOGRAPH + {0xF140, 0x8E5B}, //12091 #CJK UNIFIED IDEOGRAPH + {0xF141, 0x8E5A}, //12092 #CJK UNIFIED IDEOGRAPH + {0xF142, 0x8E61}, //12093 #CJK UNIFIED IDEOGRAPH + {0xF143, 0x8E5D}, //12094 #CJK UNIFIED IDEOGRAPH + {0xF144, 0x8E69}, //12095 #CJK UNIFIED IDEOGRAPH + {0xF145, 0x8E54}, //12096 #CJK UNIFIED IDEOGRAPH + {0xF146, 0x8F46}, //12097 #CJK UNIFIED IDEOGRAPH + {0xF147, 0x8F47}, //12098 #CJK UNIFIED IDEOGRAPH + {0xF148, 0x8F48}, //12099 #CJK UNIFIED IDEOGRAPH + {0xF149, 0x8F4B}, //12100 #CJK UNIFIED IDEOGRAPH + {0xF14A, 0x9128}, //12101 #CJK UNIFIED IDEOGRAPH + {0xF14B, 0x913A}, //12102 #CJK UNIFIED IDEOGRAPH + {0xF14C, 0x913B}, //12103 #CJK UNIFIED IDEOGRAPH + {0xF14D, 0x913E}, //12104 #CJK UNIFIED IDEOGRAPH + {0xF14E, 0x91A8}, //12105 #CJK UNIFIED IDEOGRAPH + {0xF14F, 0x91A5}, //12106 #CJK UNIFIED IDEOGRAPH + {0xF150, 0x91A7}, //12107 #CJK UNIFIED IDEOGRAPH + {0xF151, 0x91AF}, //12108 #CJK UNIFIED IDEOGRAPH + {0xF152, 0x91AA}, //12109 #CJK UNIFIED IDEOGRAPH + {0xF153, 0x93B5}, //12110 #CJK UNIFIED IDEOGRAPH + {0xF154, 0x938C}, //12111 #CJK UNIFIED IDEOGRAPH + {0xF155, 0x9392}, //12112 #CJK UNIFIED IDEOGRAPH + {0xF156, 0x93B7}, //12113 #CJK UNIFIED IDEOGRAPH + {0xF157, 0x939B}, //12114 #CJK UNIFIED IDEOGRAPH + {0xF158, 0x939D}, //12115 #CJK UNIFIED IDEOGRAPH + {0xF159, 0x9389}, //12116 #CJK UNIFIED IDEOGRAPH + {0xF15A, 0x93A7}, //12117 #CJK UNIFIED IDEOGRAPH + {0xF15B, 0x938E}, //12118 #CJK UNIFIED IDEOGRAPH + {0xF15C, 0x93AA}, //12119 #CJK UNIFIED IDEOGRAPH + {0xF15D, 0x939E}, //12120 #CJK UNIFIED IDEOGRAPH + {0xF15E, 0x93A6}, //12121 #CJK UNIFIED IDEOGRAPH + {0xF15F, 0x9395}, //12122 #CJK UNIFIED IDEOGRAPH + {0xF160, 0x9388}, //12123 #CJK UNIFIED IDEOGRAPH + {0xF161, 0x9399}, //12124 #CJK UNIFIED IDEOGRAPH + {0xF162, 0x939F}, //12125 #CJK UNIFIED IDEOGRAPH + {0xF163, 0x938D}, //12126 #CJK UNIFIED IDEOGRAPH + {0xF164, 0x93B1}, //12127 #CJK UNIFIED IDEOGRAPH + {0xF165, 0x9391}, //12128 #CJK UNIFIED IDEOGRAPH + {0xF166, 0x93B2}, //12129 #CJK UNIFIED IDEOGRAPH + {0xF167, 0x93A4}, //12130 #CJK UNIFIED IDEOGRAPH + {0xF168, 0x93A8}, //12131 #CJK UNIFIED IDEOGRAPH + {0xF169, 0x93B4}, //12132 #CJK UNIFIED IDEOGRAPH + {0xF16A, 0x93A3}, //12133 #CJK UNIFIED IDEOGRAPH + {0xF16B, 0x93A5}, //12134 #CJK UNIFIED IDEOGRAPH + {0xF16C, 0x95D2}, //12135 #CJK UNIFIED IDEOGRAPH + {0xF16D, 0x95D3}, //12136 #CJK UNIFIED IDEOGRAPH + {0xF16E, 0x95D1}, //12137 #CJK UNIFIED IDEOGRAPH + {0xF16F, 0x96B3}, //12138 #CJK UNIFIED IDEOGRAPH + {0xF170, 0x96D7}, //12139 #CJK UNIFIED IDEOGRAPH + {0xF171, 0x96DA}, //12140 #CJK UNIFIED IDEOGRAPH + {0xF172, 0x5DC2}, //12141 #CJK UNIFIED IDEOGRAPH + {0xF173, 0x96DF}, //12142 #CJK UNIFIED IDEOGRAPH + {0xF174, 0x96D8}, //12143 #CJK UNIFIED IDEOGRAPH + {0xF175, 0x96DD}, //12144 #CJK UNIFIED IDEOGRAPH + {0xF176, 0x9723}, //12145 #CJK UNIFIED IDEOGRAPH + {0xF177, 0x9722}, //12146 #CJK UNIFIED IDEOGRAPH + {0xF178, 0x9725}, //12147 #CJK UNIFIED IDEOGRAPH + {0xF179, 0x97AC}, //12148 #CJK UNIFIED IDEOGRAPH + {0xF17A, 0x97AE}, //12149 #CJK UNIFIED IDEOGRAPH + {0xF17B, 0x97A8}, //12150 #CJK UNIFIED IDEOGRAPH + {0xF17C, 0x97AB}, //12151 #CJK UNIFIED IDEOGRAPH + {0xF17D, 0x97A4}, //12152 #CJK UNIFIED IDEOGRAPH + {0xF17E, 0x97AA}, //12153 #CJK UNIFIED IDEOGRAPH + {0xF1A1, 0x97A2}, //12154 #CJK UNIFIED IDEOGRAPH + {0xF1A2, 0x97A5}, //12155 #CJK UNIFIED IDEOGRAPH + {0xF1A3, 0x97D7}, //12156 #CJK UNIFIED IDEOGRAPH + {0xF1A4, 0x97D9}, //12157 #CJK UNIFIED IDEOGRAPH + {0xF1A5, 0x97D6}, //12158 #CJK UNIFIED IDEOGRAPH + {0xF1A6, 0x97D8}, //12159 #CJK UNIFIED IDEOGRAPH + {0xF1A7, 0x97FA}, //12160 #CJK UNIFIED IDEOGRAPH + {0xF1A8, 0x9850}, //12161 #CJK UNIFIED IDEOGRAPH + {0xF1A9, 0x9851}, //12162 #CJK UNIFIED IDEOGRAPH + {0xF1AA, 0x9852}, //12163 #CJK UNIFIED IDEOGRAPH + {0xF1AB, 0x98B8}, //12164 #CJK UNIFIED IDEOGRAPH + {0xF1AC, 0x9941}, //12165 #CJK UNIFIED IDEOGRAPH + {0xF1AD, 0x993C}, //12166 #CJK UNIFIED IDEOGRAPH + {0xF1AE, 0x993A}, //12167 #CJK UNIFIED IDEOGRAPH + {0xF1AF, 0x9A0F}, //12168 #CJK UNIFIED IDEOGRAPH + {0xF1B0, 0x9A0B}, //12169 #CJK UNIFIED IDEOGRAPH + {0xF1B1, 0x9A09}, //12170 #CJK UNIFIED IDEOGRAPH + {0xF1B2, 0x9A0D}, //12171 #CJK UNIFIED IDEOGRAPH + {0xF1B3, 0x9A04}, //12172 #CJK UNIFIED IDEOGRAPH + {0xF1B4, 0x9A11}, //12173 #CJK UNIFIED IDEOGRAPH + {0xF1B5, 0x9A0A}, //12174 #CJK UNIFIED IDEOGRAPH + {0xF1B6, 0x9A05}, //12175 #CJK UNIFIED IDEOGRAPH + {0xF1B7, 0x9A07}, //12176 #CJK UNIFIED IDEOGRAPH + {0xF1B8, 0x9A06}, //12177 #CJK UNIFIED IDEOGRAPH + {0xF1B9, 0x9AC0}, //12178 #CJK UNIFIED IDEOGRAPH + {0xF1BA, 0x9ADC}, //12179 #CJK UNIFIED IDEOGRAPH + {0xF1BB, 0x9B08}, //12180 #CJK UNIFIED IDEOGRAPH + {0xF1BC, 0x9B04}, //12181 #CJK UNIFIED IDEOGRAPH + {0xF1BD, 0x9B05}, //12182 #CJK UNIFIED IDEOGRAPH + {0xF1BE, 0x9B29}, //12183 #CJK UNIFIED IDEOGRAPH + {0xF1BF, 0x9B35}, //12184 #CJK UNIFIED IDEOGRAPH + {0xF1C0, 0x9B4A}, //12185 #CJK UNIFIED IDEOGRAPH + {0xF1C1, 0x9B4C}, //12186 #CJK UNIFIED IDEOGRAPH + {0xF1C2, 0x9B4B}, //12187 #CJK UNIFIED IDEOGRAPH + {0xF1C3, 0x9BC7}, //12188 #CJK UNIFIED IDEOGRAPH + {0xF1C4, 0x9BC6}, //12189 #CJK UNIFIED IDEOGRAPH + {0xF1C5, 0x9BC3}, //12190 #CJK UNIFIED IDEOGRAPH + {0xF1C6, 0x9BBF}, //12191 #CJK UNIFIED IDEOGRAPH + {0xF1C7, 0x9BC1}, //12192 #CJK UNIFIED IDEOGRAPH + {0xF1C8, 0x9BB5}, //12193 #CJK UNIFIED IDEOGRAPH + {0xF1C9, 0x9BB8}, //12194 #CJK UNIFIED IDEOGRAPH + {0xF1CA, 0x9BD3}, //12195 #CJK UNIFIED IDEOGRAPH + {0xF1CB, 0x9BB6}, //12196 #CJK UNIFIED IDEOGRAPH + {0xF1CC, 0x9BC4}, //12197 #CJK UNIFIED IDEOGRAPH + {0xF1CD, 0x9BB9}, //12198 #CJK UNIFIED IDEOGRAPH + {0xF1CE, 0x9BBD}, //12199 #CJK UNIFIED IDEOGRAPH + {0xF1CF, 0x9D5C}, //12200 #CJK UNIFIED IDEOGRAPH + {0xF1D0, 0x9D53}, //12201 #CJK UNIFIED IDEOGRAPH + {0xF1D1, 0x9D4F}, //12202 #CJK UNIFIED IDEOGRAPH + {0xF1D2, 0x9D4A}, //12203 #CJK UNIFIED IDEOGRAPH + {0xF1D3, 0x9D5B}, //12204 #CJK UNIFIED IDEOGRAPH + {0xF1D4, 0x9D4B}, //12205 #CJK UNIFIED IDEOGRAPH + {0xF1D5, 0x9D59}, //12206 #CJK UNIFIED IDEOGRAPH + {0xF1D6, 0x9D56}, //12207 #CJK UNIFIED IDEOGRAPH + {0xF1D7, 0x9D4C}, //12208 #CJK UNIFIED IDEOGRAPH + {0xF1D8, 0x9D57}, //12209 #CJK UNIFIED IDEOGRAPH + {0xF1D9, 0x9D52}, //12210 #CJK UNIFIED IDEOGRAPH + {0xF1DA, 0x9D54}, //12211 #CJK UNIFIED IDEOGRAPH + {0xF1DB, 0x9D5F}, //12212 #CJK UNIFIED IDEOGRAPH + {0xF1DC, 0x9D58}, //12213 #CJK UNIFIED IDEOGRAPH + {0xF1DD, 0x9D5A}, //12214 #CJK UNIFIED IDEOGRAPH + {0xF1DE, 0x9E8E}, //12215 #CJK UNIFIED IDEOGRAPH + {0xF1DF, 0x9E8C}, //12216 #CJK UNIFIED IDEOGRAPH + {0xF1E0, 0x9EDF}, //12217 #CJK UNIFIED IDEOGRAPH + {0xF1E1, 0x9F01}, //12218 #CJK UNIFIED IDEOGRAPH + {0xF1E2, 0x9F00}, //12219 #CJK UNIFIED IDEOGRAPH + {0xF1E3, 0x9F16}, //12220 #CJK UNIFIED IDEOGRAPH + {0xF1E4, 0x9F25}, //12221 #CJK UNIFIED IDEOGRAPH + {0xF1E5, 0x9F2B}, //12222 #CJK UNIFIED IDEOGRAPH + {0xF1E6, 0x9F2A}, //12223 #CJK UNIFIED IDEOGRAPH + {0xF1E7, 0x9F29}, //12224 #CJK UNIFIED IDEOGRAPH + {0xF1E8, 0x9F28}, //12225 #CJK UNIFIED IDEOGRAPH + {0xF1E9, 0x9F4C}, //12226 #CJK UNIFIED IDEOGRAPH + {0xF1EA, 0x9F55}, //12227 #CJK UNIFIED IDEOGRAPH + {0xF1EB, 0x5134}, //12228 #CJK UNIFIED IDEOGRAPH + {0xF1EC, 0x5135}, //12229 #CJK UNIFIED IDEOGRAPH + {0xF1ED, 0x5296}, //12230 #CJK UNIFIED IDEOGRAPH + {0xF1EE, 0x52F7}, //12231 #CJK UNIFIED IDEOGRAPH + {0xF1EF, 0x53B4}, //12232 #CJK UNIFIED IDEOGRAPH + {0xF1F0, 0x56AB}, //12233 #CJK UNIFIED IDEOGRAPH + {0xF1F1, 0x56AD}, //12234 #CJK UNIFIED IDEOGRAPH + {0xF1F2, 0x56A6}, //12235 #CJK UNIFIED IDEOGRAPH + {0xF1F3, 0x56A7}, //12236 #CJK UNIFIED IDEOGRAPH + {0xF1F4, 0x56AA}, //12237 #CJK UNIFIED IDEOGRAPH + {0xF1F5, 0x56AC}, //12238 #CJK UNIFIED IDEOGRAPH + {0xF1F6, 0x58DA}, //12239 #CJK UNIFIED IDEOGRAPH + {0xF1F7, 0x58DD}, //12240 #CJK UNIFIED IDEOGRAPH + {0xF1F8, 0x58DB}, //12241 #CJK UNIFIED IDEOGRAPH + {0xF1F9, 0x5912}, //12242 #CJK UNIFIED IDEOGRAPH + {0xF1FA, 0x5B3D}, //12243 #CJK UNIFIED IDEOGRAPH + {0xF1FB, 0x5B3E}, //12244 #CJK UNIFIED IDEOGRAPH + {0xF1FC, 0x5B3F}, //12245 #CJK UNIFIED IDEOGRAPH + {0xF1FD, 0x5DC3}, //12246 #CJK UNIFIED IDEOGRAPH + {0xF1FE, 0x5E70}, //12247 #CJK UNIFIED IDEOGRAPH + {0xF240, 0x5FBF}, //12248 #CJK UNIFIED IDEOGRAPH + {0xF241, 0x61FB}, //12249 #CJK UNIFIED IDEOGRAPH + {0xF242, 0x6507}, //12250 #CJK UNIFIED IDEOGRAPH + {0xF243, 0x6510}, //12251 #CJK UNIFIED IDEOGRAPH + {0xF244, 0x650D}, //12252 #CJK UNIFIED IDEOGRAPH + {0xF245, 0x6509}, //12253 #CJK UNIFIED IDEOGRAPH + {0xF246, 0x650C}, //12254 #CJK UNIFIED IDEOGRAPH + {0xF247, 0x650E}, //12255 #CJK UNIFIED IDEOGRAPH + {0xF248, 0x6584}, //12256 #CJK UNIFIED IDEOGRAPH + {0xF249, 0x65DE}, //12257 #CJK UNIFIED IDEOGRAPH + {0xF24A, 0x65DD}, //12258 #CJK UNIFIED IDEOGRAPH + {0xF24B, 0x66DE}, //12259 #CJK UNIFIED IDEOGRAPH + {0xF24C, 0x6AE7}, //12260 #CJK UNIFIED IDEOGRAPH + {0xF24D, 0x6AE0}, //12261 #CJK UNIFIED IDEOGRAPH + {0xF24E, 0x6ACC}, //12262 #CJK UNIFIED IDEOGRAPH + {0xF24F, 0x6AD1}, //12263 #CJK UNIFIED IDEOGRAPH + {0xF250, 0x6AD9}, //12264 #CJK UNIFIED IDEOGRAPH + {0xF251, 0x6ACB}, //12265 #CJK UNIFIED IDEOGRAPH + {0xF252, 0x6ADF}, //12266 #CJK UNIFIED IDEOGRAPH + {0xF253, 0x6ADC}, //12267 #CJK UNIFIED IDEOGRAPH + {0xF254, 0x6AD0}, //12268 #CJK UNIFIED IDEOGRAPH + {0xF255, 0x6AEB}, //12269 #CJK UNIFIED IDEOGRAPH + {0xF256, 0x6ACF}, //12270 #CJK UNIFIED IDEOGRAPH + {0xF257, 0x6ACD}, //12271 #CJK UNIFIED IDEOGRAPH + {0xF258, 0x6ADE}, //12272 #CJK UNIFIED IDEOGRAPH + {0xF259, 0x6B60}, //12273 #CJK UNIFIED IDEOGRAPH + {0xF25A, 0x6BB0}, //12274 #CJK UNIFIED IDEOGRAPH + {0xF25B, 0x6C0C}, //12275 #CJK UNIFIED IDEOGRAPH + {0xF25C, 0x7019}, //12276 #CJK UNIFIED IDEOGRAPH + {0xF25D, 0x7027}, //12277 #CJK UNIFIED IDEOGRAPH + {0xF25E, 0x7020}, //12278 #CJK UNIFIED IDEOGRAPH + {0xF25F, 0x7016}, //12279 #CJK UNIFIED IDEOGRAPH + {0xF260, 0x702B}, //12280 #CJK UNIFIED IDEOGRAPH + {0xF261, 0x7021}, //12281 #CJK UNIFIED IDEOGRAPH + {0xF262, 0x7022}, //12282 #CJK UNIFIED IDEOGRAPH + {0xF263, 0x7023}, //12283 #CJK UNIFIED IDEOGRAPH + {0xF264, 0x7029}, //12284 #CJK UNIFIED IDEOGRAPH + {0xF265, 0x7017}, //12285 #CJK UNIFIED IDEOGRAPH + {0xF266, 0x7024}, //12286 #CJK UNIFIED IDEOGRAPH + {0xF267, 0x701C}, //12287 #CJK UNIFIED IDEOGRAPH + {0xF268, 0x702A}, //12288 #CJK UNIFIED IDEOGRAPH + {0xF269, 0x720C}, //12289 #CJK UNIFIED IDEOGRAPH + {0xF26A, 0x720A}, //12290 #CJK UNIFIED IDEOGRAPH + {0xF26B, 0x7207}, //12291 #CJK UNIFIED IDEOGRAPH + {0xF26C, 0x7202}, //12292 #CJK UNIFIED IDEOGRAPH + {0xF26D, 0x7205}, //12293 #CJK UNIFIED IDEOGRAPH + {0xF26E, 0x72A5}, //12294 #CJK UNIFIED IDEOGRAPH + {0xF26F, 0x72A6}, //12295 #CJK UNIFIED IDEOGRAPH + {0xF270, 0x72A4}, //12296 #CJK UNIFIED IDEOGRAPH + {0xF271, 0x72A3}, //12297 #CJK UNIFIED IDEOGRAPH + {0xF272, 0x72A1}, //12298 #CJK UNIFIED IDEOGRAPH + {0xF273, 0x74CB}, //12299 #CJK UNIFIED IDEOGRAPH + {0xF274, 0x74C5}, //12300 #CJK UNIFIED IDEOGRAPH + {0xF275, 0x74B7}, //12301 #CJK UNIFIED IDEOGRAPH + {0xF276, 0x74C3}, //12302 #CJK UNIFIED IDEOGRAPH + {0xF277, 0x7516}, //12303 #CJK UNIFIED IDEOGRAPH + {0xF278, 0x7660}, //12304 #CJK UNIFIED IDEOGRAPH + {0xF279, 0x77C9}, //12305 #CJK UNIFIED IDEOGRAPH + {0xF27A, 0x77CA}, //12306 #CJK UNIFIED IDEOGRAPH + {0xF27B, 0x77C4}, //12307 #CJK UNIFIED IDEOGRAPH + {0xF27C, 0x77F1}, //12308 #CJK UNIFIED IDEOGRAPH + {0xF27D, 0x791D}, //12309 #CJK UNIFIED IDEOGRAPH + {0xF27E, 0x791B}, //12310 #CJK UNIFIED IDEOGRAPH + {0xF2A1, 0x7921}, //12311 #CJK UNIFIED IDEOGRAPH + {0xF2A2, 0x791C}, //12312 #CJK UNIFIED IDEOGRAPH + {0xF2A3, 0x7917}, //12313 #CJK UNIFIED IDEOGRAPH + {0xF2A4, 0x791E}, //12314 #CJK UNIFIED IDEOGRAPH + {0xF2A5, 0x79B0}, //12315 #CJK UNIFIED IDEOGRAPH + {0xF2A6, 0x7A67}, //12316 #CJK UNIFIED IDEOGRAPH + {0xF2A7, 0x7A68}, //12317 #CJK UNIFIED IDEOGRAPH + {0xF2A8, 0x7C33}, //12318 #CJK UNIFIED IDEOGRAPH + {0xF2A9, 0x7C3C}, //12319 #CJK UNIFIED IDEOGRAPH + {0xF2AA, 0x7C39}, //12320 #CJK UNIFIED IDEOGRAPH + {0xF2AB, 0x7C2C}, //12321 #CJK UNIFIED IDEOGRAPH + {0xF2AC, 0x7C3B}, //12322 #CJK UNIFIED IDEOGRAPH + {0xF2AD, 0x7CEC}, //12323 #CJK UNIFIED IDEOGRAPH + {0xF2AE, 0x7CEA}, //12324 #CJK UNIFIED IDEOGRAPH + {0xF2AF, 0x7E76}, //12325 #CJK UNIFIED IDEOGRAPH + {0xF2B0, 0x7E75}, //12326 #CJK UNIFIED IDEOGRAPH + {0xF2B1, 0x7E78}, //12327 #CJK UNIFIED IDEOGRAPH + {0xF2B2, 0x7E70}, //12328 #CJK UNIFIED IDEOGRAPH + {0xF2B3, 0x7E77}, //12329 #CJK UNIFIED IDEOGRAPH + {0xF2B4, 0x7E6F}, //12330 #CJK UNIFIED IDEOGRAPH + {0xF2B5, 0x7E7A}, //12331 #CJK UNIFIED IDEOGRAPH + {0xF2B6, 0x7E72}, //12332 #CJK UNIFIED IDEOGRAPH + {0xF2B7, 0x7E74}, //12333 #CJK UNIFIED IDEOGRAPH + {0xF2B8, 0x7E68}, //12334 #CJK UNIFIED IDEOGRAPH + {0xF2B9, 0x7F4B}, //12335 #CJK UNIFIED IDEOGRAPH + {0xF2BA, 0x7F4A}, //12336 #CJK UNIFIED IDEOGRAPH + {0xF2BB, 0x7F83}, //12337 #CJK UNIFIED IDEOGRAPH + {0xF2BC, 0x7F86}, //12338 #CJK UNIFIED IDEOGRAPH + {0xF2BD, 0x7FB7}, //12339 #CJK UNIFIED IDEOGRAPH + {0xF2BE, 0x7FFD}, //12340 #CJK UNIFIED IDEOGRAPH + {0xF2BF, 0x7FFE}, //12341 #CJK UNIFIED IDEOGRAPH + {0xF2C0, 0x8078}, //12342 #CJK UNIFIED IDEOGRAPH + {0xF2C1, 0x81D7}, //12343 #CJK UNIFIED IDEOGRAPH + {0xF2C2, 0x81D5}, //12344 #CJK UNIFIED IDEOGRAPH + {0xF2C3, 0x8264}, //12345 #CJK UNIFIED IDEOGRAPH + {0xF2C4, 0x8261}, //12346 #CJK UNIFIED IDEOGRAPH + {0xF2C5, 0x8263}, //12347 #CJK UNIFIED IDEOGRAPH + {0xF2C6, 0x85EB}, //12348 #CJK UNIFIED IDEOGRAPH + {0xF2C7, 0x85F1}, //12349 #CJK UNIFIED IDEOGRAPH + {0xF2C8, 0x85ED}, //12350 #CJK UNIFIED IDEOGRAPH + {0xF2C9, 0x85D9}, //12351 #CJK UNIFIED IDEOGRAPH + {0xF2CA, 0x85E1}, //12352 #CJK UNIFIED IDEOGRAPH + {0xF2CB, 0x85E8}, //12353 #CJK UNIFIED IDEOGRAPH + {0xF2CC, 0x85DA}, //12354 #CJK UNIFIED IDEOGRAPH + {0xF2CD, 0x85D7}, //12355 #CJK UNIFIED IDEOGRAPH + {0xF2CE, 0x85EC}, //12356 #CJK UNIFIED IDEOGRAPH + {0xF2CF, 0x85F2}, //12357 #CJK UNIFIED IDEOGRAPH + {0xF2D0, 0x85F8}, //12358 #CJK UNIFIED IDEOGRAPH + {0xF2D1, 0x85D8}, //12359 #CJK UNIFIED IDEOGRAPH + {0xF2D2, 0x85DF}, //12360 #CJK UNIFIED IDEOGRAPH + {0xF2D3, 0x85E3}, //12361 #CJK UNIFIED IDEOGRAPH + {0xF2D4, 0x85DC}, //12362 #CJK UNIFIED IDEOGRAPH + {0xF2D5, 0x85D1}, //12363 #CJK UNIFIED IDEOGRAPH + {0xF2D6, 0x85F0}, //12364 #CJK UNIFIED IDEOGRAPH + {0xF2D7, 0x85E6}, //12365 #CJK UNIFIED IDEOGRAPH + {0xF2D8, 0x85EF}, //12366 #CJK UNIFIED IDEOGRAPH + {0xF2D9, 0x85DE}, //12367 #CJK UNIFIED IDEOGRAPH + {0xF2DA, 0x85E2}, //12368 #CJK UNIFIED IDEOGRAPH + {0xF2DB, 0x8800}, //12369 #CJK UNIFIED IDEOGRAPH + {0xF2DC, 0x87FA}, //12370 #CJK UNIFIED IDEOGRAPH + {0xF2DD, 0x8803}, //12371 #CJK UNIFIED IDEOGRAPH + {0xF2DE, 0x87F6}, //12372 #CJK UNIFIED IDEOGRAPH + {0xF2DF, 0x87F7}, //12373 #CJK UNIFIED IDEOGRAPH + {0xF2E0, 0x8809}, //12374 #CJK UNIFIED IDEOGRAPH + {0xF2E1, 0x880C}, //12375 #CJK UNIFIED IDEOGRAPH + {0xF2E2, 0x880B}, //12376 #CJK UNIFIED IDEOGRAPH + {0xF2E3, 0x8806}, //12377 #CJK UNIFIED IDEOGRAPH + {0xF2E4, 0x87FC}, //12378 #CJK UNIFIED IDEOGRAPH + {0xF2E5, 0x8808}, //12379 #CJK UNIFIED IDEOGRAPH + {0xF2E6, 0x87FF}, //12380 #CJK UNIFIED IDEOGRAPH + {0xF2E7, 0x880A}, //12381 #CJK UNIFIED IDEOGRAPH + {0xF2E8, 0x8802}, //12382 #CJK UNIFIED IDEOGRAPH + {0xF2E9, 0x8962}, //12383 #CJK UNIFIED IDEOGRAPH + {0xF2EA, 0x895A}, //12384 #CJK UNIFIED IDEOGRAPH + {0xF2EB, 0x895B}, //12385 #CJK UNIFIED IDEOGRAPH + {0xF2EC, 0x8957}, //12386 #CJK UNIFIED IDEOGRAPH + {0xF2ED, 0x8961}, //12387 #CJK UNIFIED IDEOGRAPH + {0xF2EE, 0x895C}, //12388 #CJK UNIFIED IDEOGRAPH + {0xF2EF, 0x8958}, //12389 #CJK UNIFIED IDEOGRAPH + {0xF2F0, 0x895D}, //12390 #CJK UNIFIED IDEOGRAPH + {0xF2F1, 0x8959}, //12391 #CJK UNIFIED IDEOGRAPH + {0xF2F2, 0x8988}, //12392 #CJK UNIFIED IDEOGRAPH + {0xF2F3, 0x89B7}, //12393 #CJK UNIFIED IDEOGRAPH + {0xF2F4, 0x89B6}, //12394 #CJK UNIFIED IDEOGRAPH + {0xF2F5, 0x89F6}, //12395 #CJK UNIFIED IDEOGRAPH + {0xF2F6, 0x8B50}, //12396 #CJK UNIFIED IDEOGRAPH + {0xF2F7, 0x8B48}, //12397 #CJK UNIFIED IDEOGRAPH + {0xF2F8, 0x8B4A}, //12398 #CJK UNIFIED IDEOGRAPH + {0xF2F9, 0x8B40}, //12399 #CJK UNIFIED IDEOGRAPH + {0xF2FA, 0x8B53}, //12400 #CJK UNIFIED IDEOGRAPH + {0xF2FB, 0x8B56}, //12401 #CJK UNIFIED IDEOGRAPH + {0xF2FC, 0x8B54}, //12402 #CJK UNIFIED IDEOGRAPH + {0xF2FD, 0x8B4B}, //12403 #CJK UNIFIED IDEOGRAPH + {0xF2FE, 0x8B55}, //12404 #CJK UNIFIED IDEOGRAPH + {0xF340, 0x8B51}, //12405 #CJK UNIFIED IDEOGRAPH + {0xF341, 0x8B42}, //12406 #CJK UNIFIED IDEOGRAPH + {0xF342, 0x8B52}, //12407 #CJK UNIFIED IDEOGRAPH + {0xF343, 0x8B57}, //12408 #CJK UNIFIED IDEOGRAPH + {0xF344, 0x8C43}, //12409 #CJK UNIFIED IDEOGRAPH + {0xF345, 0x8C77}, //12410 #CJK UNIFIED IDEOGRAPH + {0xF346, 0x8C76}, //12411 #CJK UNIFIED IDEOGRAPH + {0xF347, 0x8C9A}, //12412 #CJK UNIFIED IDEOGRAPH + {0xF348, 0x8D06}, //12413 #CJK UNIFIED IDEOGRAPH + {0xF349, 0x8D07}, //12414 #CJK UNIFIED IDEOGRAPH + {0xF34A, 0x8D09}, //12415 #CJK UNIFIED IDEOGRAPH + {0xF34B, 0x8DAC}, //12416 #CJK UNIFIED IDEOGRAPH + {0xF34C, 0x8DAA}, //12417 #CJK UNIFIED IDEOGRAPH + {0xF34D, 0x8DAD}, //12418 #CJK UNIFIED IDEOGRAPH + {0xF34E, 0x8DAB}, //12419 #CJK UNIFIED IDEOGRAPH + {0xF34F, 0x8E6D}, //12420 #CJK UNIFIED IDEOGRAPH + {0xF350, 0x8E78}, //12421 #CJK UNIFIED IDEOGRAPH + {0xF351, 0x8E73}, //12422 #CJK UNIFIED IDEOGRAPH + {0xF352, 0x8E6A}, //12423 #CJK UNIFIED IDEOGRAPH + {0xF353, 0x8E6F}, //12424 #CJK UNIFIED IDEOGRAPH + {0xF354, 0x8E7B}, //12425 #CJK UNIFIED IDEOGRAPH + {0xF355, 0x8EC2}, //12426 #CJK UNIFIED IDEOGRAPH + {0xF356, 0x8F52}, //12427 #CJK UNIFIED IDEOGRAPH + {0xF357, 0x8F51}, //12428 #CJK UNIFIED IDEOGRAPH + {0xF358, 0x8F4F}, //12429 #CJK UNIFIED IDEOGRAPH + {0xF359, 0x8F50}, //12430 #CJK UNIFIED IDEOGRAPH + {0xF35A, 0x8F53}, //12431 #CJK UNIFIED IDEOGRAPH + {0xF35B, 0x8FB4}, //12432 #CJK UNIFIED IDEOGRAPH + {0xF35C, 0x9140}, //12433 #CJK UNIFIED IDEOGRAPH + {0xF35D, 0x913F}, //12434 #CJK UNIFIED IDEOGRAPH + {0xF35E, 0x91B0}, //12435 #CJK UNIFIED IDEOGRAPH + {0xF35F, 0x91AD}, //12436 #CJK UNIFIED IDEOGRAPH + {0xF360, 0x93DE}, //12437 #CJK UNIFIED IDEOGRAPH + {0xF361, 0x93C7}, //12438 #CJK UNIFIED IDEOGRAPH + {0xF362, 0x93CF}, //12439 #CJK UNIFIED IDEOGRAPH + {0xF363, 0x93C2}, //12440 #CJK UNIFIED IDEOGRAPH + {0xF364, 0x93DA}, //12441 #CJK UNIFIED IDEOGRAPH + {0xF365, 0x93D0}, //12442 #CJK UNIFIED IDEOGRAPH + {0xF366, 0x93F9}, //12443 #CJK UNIFIED IDEOGRAPH + {0xF367, 0x93EC}, //12444 #CJK UNIFIED IDEOGRAPH + {0xF368, 0x93CC}, //12445 #CJK UNIFIED IDEOGRAPH + {0xF369, 0x93D9}, //12446 #CJK UNIFIED IDEOGRAPH + {0xF36A, 0x93A9}, //12447 #CJK UNIFIED IDEOGRAPH + {0xF36B, 0x93E6}, //12448 #CJK UNIFIED IDEOGRAPH + {0xF36C, 0x93CA}, //12449 #CJK UNIFIED IDEOGRAPH + {0xF36D, 0x93D4}, //12450 #CJK UNIFIED IDEOGRAPH + {0xF36E, 0x93EE}, //12451 #CJK UNIFIED IDEOGRAPH + {0xF36F, 0x93E3}, //12452 #CJK UNIFIED IDEOGRAPH + {0xF370, 0x93D5}, //12453 #CJK UNIFIED IDEOGRAPH + {0xF371, 0x93C4}, //12454 #CJK UNIFIED IDEOGRAPH + {0xF372, 0x93CE}, //12455 #CJK UNIFIED IDEOGRAPH + {0xF373, 0x93C0}, //12456 #CJK UNIFIED IDEOGRAPH + {0xF374, 0x93D2}, //12457 #CJK UNIFIED IDEOGRAPH + {0xF375, 0x93E7}, //12458 #CJK UNIFIED IDEOGRAPH + {0xF376, 0x957D}, //12459 #CJK UNIFIED IDEOGRAPH + {0xF377, 0x95DA}, //12460 #CJK UNIFIED IDEOGRAPH + {0xF378, 0x95DB}, //12461 #CJK UNIFIED IDEOGRAPH + {0xF379, 0x96E1}, //12462 #CJK UNIFIED IDEOGRAPH + {0xF37A, 0x9729}, //12463 #CJK UNIFIED IDEOGRAPH + {0xF37B, 0x972B}, //12464 #CJK UNIFIED IDEOGRAPH + {0xF37C, 0x972C}, //12465 #CJK UNIFIED IDEOGRAPH + {0xF37D, 0x9728}, //12466 #CJK UNIFIED IDEOGRAPH + {0xF37E, 0x9726}, //12467 #CJK UNIFIED IDEOGRAPH + {0xF3A1, 0x97B3}, //12468 #CJK UNIFIED IDEOGRAPH + {0xF3A2, 0x97B7}, //12469 #CJK UNIFIED IDEOGRAPH + {0xF3A3, 0x97B6}, //12470 #CJK UNIFIED IDEOGRAPH + {0xF3A4, 0x97DD}, //12471 #CJK UNIFIED IDEOGRAPH + {0xF3A5, 0x97DE}, //12472 #CJK UNIFIED IDEOGRAPH + {0xF3A6, 0x97DF}, //12473 #CJK UNIFIED IDEOGRAPH + {0xF3A7, 0x985C}, //12474 #CJK UNIFIED IDEOGRAPH + {0xF3A8, 0x9859}, //12475 #CJK UNIFIED IDEOGRAPH + {0xF3A9, 0x985D}, //12476 #CJK UNIFIED IDEOGRAPH + {0xF3AA, 0x9857}, //12477 #CJK UNIFIED IDEOGRAPH + {0xF3AB, 0x98BF}, //12478 #CJK UNIFIED IDEOGRAPH + {0xF3AC, 0x98BD}, //12479 #CJK UNIFIED IDEOGRAPH + {0xF3AD, 0x98BB}, //12480 #CJK UNIFIED IDEOGRAPH + {0xF3AE, 0x98BE}, //12481 #CJK UNIFIED IDEOGRAPH + {0xF3AF, 0x9948}, //12482 #CJK UNIFIED IDEOGRAPH + {0xF3B0, 0x9947}, //12483 #CJK UNIFIED IDEOGRAPH + {0xF3B1, 0x9943}, //12484 #CJK UNIFIED IDEOGRAPH + {0xF3B2, 0x99A6}, //12485 #CJK UNIFIED IDEOGRAPH + {0xF3B3, 0x99A7}, //12486 #CJK UNIFIED IDEOGRAPH + {0xF3B4, 0x9A1A}, //12487 #CJK UNIFIED IDEOGRAPH + {0xF3B5, 0x9A15}, //12488 #CJK UNIFIED IDEOGRAPH + {0xF3B6, 0x9A25}, //12489 #CJK UNIFIED IDEOGRAPH + {0xF3B7, 0x9A1D}, //12490 #CJK UNIFIED IDEOGRAPH + {0xF3B8, 0x9A24}, //12491 #CJK UNIFIED IDEOGRAPH + {0xF3B9, 0x9A1B}, //12492 #CJK UNIFIED IDEOGRAPH + {0xF3BA, 0x9A22}, //12493 #CJK UNIFIED IDEOGRAPH + {0xF3BB, 0x9A20}, //12494 #CJK UNIFIED IDEOGRAPH + {0xF3BC, 0x9A27}, //12495 #CJK UNIFIED IDEOGRAPH + {0xF3BD, 0x9A23}, //12496 #CJK UNIFIED IDEOGRAPH + {0xF3BE, 0x9A1E}, //12497 #CJK UNIFIED IDEOGRAPH + {0xF3BF, 0x9A1C}, //12498 #CJK UNIFIED IDEOGRAPH + {0xF3C0, 0x9A14}, //12499 #CJK UNIFIED IDEOGRAPH + {0xF3C1, 0x9AC2}, //12500 #CJK UNIFIED IDEOGRAPH + {0xF3C2, 0x9B0B}, //12501 #CJK UNIFIED IDEOGRAPH + {0xF3C3, 0x9B0A}, //12502 #CJK UNIFIED IDEOGRAPH + {0xF3C4, 0x9B0E}, //12503 #CJK UNIFIED IDEOGRAPH + {0xF3C5, 0x9B0C}, //12504 #CJK UNIFIED IDEOGRAPH + {0xF3C6, 0x9B37}, //12505 #CJK UNIFIED IDEOGRAPH + {0xF3C7, 0x9BEA}, //12506 #CJK UNIFIED IDEOGRAPH + {0xF3C8, 0x9BEB}, //12507 #CJK UNIFIED IDEOGRAPH + {0xF3C9, 0x9BE0}, //12508 #CJK UNIFIED IDEOGRAPH + {0xF3CA, 0x9BDE}, //12509 #CJK UNIFIED IDEOGRAPH + {0xF3CB, 0x9BE4}, //12510 #CJK UNIFIED IDEOGRAPH + {0xF3CC, 0x9BE6}, //12511 #CJK UNIFIED IDEOGRAPH + {0xF3CD, 0x9BE2}, //12512 #CJK UNIFIED IDEOGRAPH + {0xF3CE, 0x9BF0}, //12513 #CJK UNIFIED IDEOGRAPH + {0xF3CF, 0x9BD4}, //12514 #CJK UNIFIED IDEOGRAPH + {0xF3D0, 0x9BD7}, //12515 #CJK UNIFIED IDEOGRAPH + {0xF3D1, 0x9BEC}, //12516 #CJK UNIFIED IDEOGRAPH + {0xF3D2, 0x9BDC}, //12517 #CJK UNIFIED IDEOGRAPH + {0xF3D3, 0x9BD9}, //12518 #CJK UNIFIED IDEOGRAPH + {0xF3D4, 0x9BE5}, //12519 #CJK UNIFIED IDEOGRAPH + {0xF3D5, 0x9BD5}, //12520 #CJK UNIFIED IDEOGRAPH + {0xF3D6, 0x9BE1}, //12521 #CJK UNIFIED IDEOGRAPH + {0xF3D7, 0x9BDA}, //12522 #CJK UNIFIED IDEOGRAPH + {0xF3D8, 0x9D77}, //12523 #CJK UNIFIED IDEOGRAPH + {0xF3D9, 0x9D81}, //12524 #CJK UNIFIED IDEOGRAPH + {0xF3DA, 0x9D8A}, //12525 #CJK UNIFIED IDEOGRAPH + {0xF3DB, 0x9D84}, //12526 #CJK UNIFIED IDEOGRAPH + {0xF3DC, 0x9D88}, //12527 #CJK UNIFIED IDEOGRAPH + {0xF3DD, 0x9D71}, //12528 #CJK UNIFIED IDEOGRAPH + {0xF3DE, 0x9D80}, //12529 #CJK UNIFIED IDEOGRAPH + {0xF3DF, 0x9D78}, //12530 #CJK UNIFIED IDEOGRAPH + {0xF3E0, 0x9D86}, //12531 #CJK UNIFIED IDEOGRAPH + {0xF3E1, 0x9D8B}, //12532 #CJK UNIFIED IDEOGRAPH + {0xF3E2, 0x9D8C}, //12533 #CJK UNIFIED IDEOGRAPH + {0xF3E3, 0x9D7D}, //12534 #CJK UNIFIED IDEOGRAPH + {0xF3E4, 0x9D6B}, //12535 #CJK UNIFIED IDEOGRAPH + {0xF3E5, 0x9D74}, //12536 #CJK UNIFIED IDEOGRAPH + {0xF3E6, 0x9D75}, //12537 #CJK UNIFIED IDEOGRAPH + {0xF3E7, 0x9D70}, //12538 #CJK UNIFIED IDEOGRAPH + {0xF3E8, 0x9D69}, //12539 #CJK UNIFIED IDEOGRAPH + {0xF3E9, 0x9D85}, //12540 #CJK UNIFIED IDEOGRAPH + {0xF3EA, 0x9D73}, //12541 #CJK UNIFIED IDEOGRAPH + {0xF3EB, 0x9D7B}, //12542 #CJK UNIFIED IDEOGRAPH + {0xF3EC, 0x9D82}, //12543 #CJK UNIFIED IDEOGRAPH + {0xF3ED, 0x9D6F}, //12544 #CJK UNIFIED IDEOGRAPH + {0xF3EE, 0x9D79}, //12545 #CJK UNIFIED IDEOGRAPH + {0xF3EF, 0x9D7F}, //12546 #CJK UNIFIED IDEOGRAPH + {0xF3F0, 0x9D87}, //12547 #CJK UNIFIED IDEOGRAPH + {0xF3F1, 0x9D68}, //12548 #CJK UNIFIED IDEOGRAPH + {0xF3F2, 0x9E94}, //12549 #CJK UNIFIED IDEOGRAPH + {0xF3F3, 0x9E91}, //12550 #CJK UNIFIED IDEOGRAPH + {0xF3F4, 0x9EC0}, //12551 #CJK UNIFIED IDEOGRAPH + {0xF3F5, 0x9EFC}, //12552 #CJK UNIFIED IDEOGRAPH + {0xF3F6, 0x9F2D}, //12553 #CJK UNIFIED IDEOGRAPH + {0xF3F7, 0x9F40}, //12554 #CJK UNIFIED IDEOGRAPH + {0xF3F8, 0x9F41}, //12555 #CJK UNIFIED IDEOGRAPH + {0xF3F9, 0x9F4D}, //12556 #CJK UNIFIED IDEOGRAPH + {0xF3FA, 0x9F56}, //12557 #CJK UNIFIED IDEOGRAPH + {0xF3FB, 0x9F57}, //12558 #CJK UNIFIED IDEOGRAPH + {0xF3FC, 0x9F58}, //12559 #CJK UNIFIED IDEOGRAPH + {0xF3FD, 0x5337}, //12560 #CJK UNIFIED IDEOGRAPH + {0xF3FE, 0x56B2}, //12561 #CJK UNIFIED IDEOGRAPH + {0xF440, 0x56B5}, //12562 #CJK UNIFIED IDEOGRAPH + {0xF441, 0x56B3}, //12563 #CJK UNIFIED IDEOGRAPH + {0xF442, 0x58E3}, //12564 #CJK UNIFIED IDEOGRAPH + {0xF443, 0x5B45}, //12565 #CJK UNIFIED IDEOGRAPH + {0xF444, 0x5DC6}, //12566 #CJK UNIFIED IDEOGRAPH + {0xF445, 0x5DC7}, //12567 #CJK UNIFIED IDEOGRAPH + {0xF446, 0x5EEE}, //12568 #CJK UNIFIED IDEOGRAPH + {0xF447, 0x5EEF}, //12569 #CJK UNIFIED IDEOGRAPH + {0xF448, 0x5FC0}, //12570 #CJK UNIFIED IDEOGRAPH + {0xF449, 0x5FC1}, //12571 #CJK UNIFIED IDEOGRAPH + {0xF44A, 0x61F9}, //12572 #CJK UNIFIED IDEOGRAPH + {0xF44B, 0x6517}, //12573 #CJK UNIFIED IDEOGRAPH + {0xF44C, 0x6516}, //12574 #CJK UNIFIED IDEOGRAPH + {0xF44D, 0x6515}, //12575 #CJK UNIFIED IDEOGRAPH + {0xF44E, 0x6513}, //12576 #CJK UNIFIED IDEOGRAPH + {0xF44F, 0x65DF}, //12577 #CJK UNIFIED IDEOGRAPH + {0xF450, 0x66E8}, //12578 #CJK UNIFIED IDEOGRAPH + {0xF451, 0x66E3}, //12579 #CJK UNIFIED IDEOGRAPH + {0xF452, 0x66E4}, //12580 #CJK UNIFIED IDEOGRAPH + {0xF453, 0x6AF3}, //12581 #CJK UNIFIED IDEOGRAPH + {0xF454, 0x6AF0}, //12582 #CJK UNIFIED IDEOGRAPH + {0xF455, 0x6AEA}, //12583 #CJK UNIFIED IDEOGRAPH + {0xF456, 0x6AE8}, //12584 #CJK UNIFIED IDEOGRAPH + {0xF457, 0x6AF9}, //12585 #CJK UNIFIED IDEOGRAPH + {0xF458, 0x6AF1}, //12586 #CJK UNIFIED IDEOGRAPH + {0xF459, 0x6AEE}, //12587 #CJK UNIFIED IDEOGRAPH + {0xF45A, 0x6AEF}, //12588 #CJK UNIFIED IDEOGRAPH + {0xF45B, 0x703C}, //12589 #CJK UNIFIED IDEOGRAPH + {0xF45C, 0x7035}, //12590 #CJK UNIFIED IDEOGRAPH + {0xF45D, 0x702F}, //12591 #CJK UNIFIED IDEOGRAPH + {0xF45E, 0x7037}, //12592 #CJK UNIFIED IDEOGRAPH + {0xF45F, 0x7034}, //12593 #CJK UNIFIED IDEOGRAPH + {0xF460, 0x7031}, //12594 #CJK UNIFIED IDEOGRAPH + {0xF461, 0x7042}, //12595 #CJK UNIFIED IDEOGRAPH + {0xF462, 0x7038}, //12596 #CJK UNIFIED IDEOGRAPH + {0xF463, 0x703F}, //12597 #CJK UNIFIED IDEOGRAPH + {0xF464, 0x703A}, //12598 #CJK UNIFIED IDEOGRAPH + {0xF465, 0x7039}, //12599 #CJK UNIFIED IDEOGRAPH + {0xF466, 0x7040}, //12600 #CJK UNIFIED IDEOGRAPH + {0xF467, 0x703B}, //12601 #CJK UNIFIED IDEOGRAPH + {0xF468, 0x7033}, //12602 #CJK UNIFIED IDEOGRAPH + {0xF469, 0x7041}, //12603 #CJK UNIFIED IDEOGRAPH + {0xF46A, 0x7213}, //12604 #CJK UNIFIED IDEOGRAPH + {0xF46B, 0x7214}, //12605 #CJK UNIFIED IDEOGRAPH + {0xF46C, 0x72A8}, //12606 #CJK UNIFIED IDEOGRAPH + {0xF46D, 0x737D}, //12607 #CJK UNIFIED IDEOGRAPH + {0xF46E, 0x737C}, //12608 #CJK UNIFIED IDEOGRAPH + {0xF46F, 0x74BA}, //12609 #CJK UNIFIED IDEOGRAPH + {0xF470, 0x76AB}, //12610 #CJK UNIFIED IDEOGRAPH + {0xF471, 0x76AA}, //12611 #CJK UNIFIED IDEOGRAPH + {0xF472, 0x76BE}, //12612 #CJK UNIFIED IDEOGRAPH + {0xF473, 0x76ED}, //12613 #CJK UNIFIED IDEOGRAPH + {0xF474, 0x77CC}, //12614 #CJK UNIFIED IDEOGRAPH + {0xF475, 0x77CE}, //12615 #CJK UNIFIED IDEOGRAPH + {0xF476, 0x77CF}, //12616 #CJK UNIFIED IDEOGRAPH + {0xF477, 0x77CD}, //12617 #CJK UNIFIED IDEOGRAPH + {0xF478, 0x77F2}, //12618 #CJK UNIFIED IDEOGRAPH + {0xF479, 0x7925}, //12619 #CJK UNIFIED IDEOGRAPH + {0xF47A, 0x7923}, //12620 #CJK UNIFIED IDEOGRAPH + {0xF47B, 0x7927}, //12621 #CJK UNIFIED IDEOGRAPH + {0xF47C, 0x7928}, //12622 #CJK UNIFIED IDEOGRAPH + {0xF47D, 0x7924}, //12623 #CJK UNIFIED IDEOGRAPH + {0xF47E, 0x7929}, //12624 #CJK UNIFIED IDEOGRAPH + {0xF4A1, 0x79B2}, //12625 #CJK UNIFIED IDEOGRAPH + {0xF4A2, 0x7A6E}, //12626 #CJK UNIFIED IDEOGRAPH + {0xF4A3, 0x7A6C}, //12627 #CJK UNIFIED IDEOGRAPH + {0xF4A4, 0x7A6D}, //12628 #CJK UNIFIED IDEOGRAPH + {0xF4A5, 0x7AF7}, //12629 #CJK UNIFIED IDEOGRAPH + {0xF4A6, 0x7C49}, //12630 #CJK UNIFIED IDEOGRAPH + {0xF4A7, 0x7C48}, //12631 #CJK UNIFIED IDEOGRAPH + {0xF4A8, 0x7C4A}, //12632 #CJK UNIFIED IDEOGRAPH + {0xF4A9, 0x7C47}, //12633 #CJK UNIFIED IDEOGRAPH + {0xF4AA, 0x7C45}, //12634 #CJK UNIFIED IDEOGRAPH + {0xF4AB, 0x7CEE}, //12635 #CJK UNIFIED IDEOGRAPH + {0xF4AC, 0x7E7B}, //12636 #CJK UNIFIED IDEOGRAPH + {0xF4AD, 0x7E7E}, //12637 #CJK UNIFIED IDEOGRAPH + {0xF4AE, 0x7E81}, //12638 #CJK UNIFIED IDEOGRAPH + {0xF4AF, 0x7E80}, //12639 #CJK UNIFIED IDEOGRAPH + {0xF4B0, 0x7FBA}, //12640 #CJK UNIFIED IDEOGRAPH + {0xF4B1, 0x7FFF}, //12641 #CJK UNIFIED IDEOGRAPH + {0xF4B2, 0x8079}, //12642 #CJK UNIFIED IDEOGRAPH + {0xF4B3, 0x81DB}, //12643 #CJK UNIFIED IDEOGRAPH + {0xF4B4, 0x81D9}, //12644 #CJK UNIFIED IDEOGRAPH + {0xF4B5, 0x820B}, //12645 #CJK UNIFIED IDEOGRAPH + {0xF4B6, 0x8268}, //12646 #CJK UNIFIED IDEOGRAPH + {0xF4B7, 0x8269}, //12647 #CJK UNIFIED IDEOGRAPH + {0xF4B8, 0x8622}, //12648 #CJK UNIFIED IDEOGRAPH + {0xF4B9, 0x85FF}, //12649 #CJK UNIFIED IDEOGRAPH + {0xF4BA, 0x8601}, //12650 #CJK UNIFIED IDEOGRAPH + {0xF4BB, 0x85FE}, //12651 #CJK UNIFIED IDEOGRAPH + {0xF4BC, 0x861B}, //12652 #CJK UNIFIED IDEOGRAPH + {0xF4BD, 0x8600}, //12653 #CJK UNIFIED IDEOGRAPH + {0xF4BE, 0x85F6}, //12654 #CJK UNIFIED IDEOGRAPH + {0xF4BF, 0x8604}, //12655 #CJK UNIFIED IDEOGRAPH + {0xF4C0, 0x8609}, //12656 #CJK UNIFIED IDEOGRAPH + {0xF4C1, 0x8605}, //12657 #CJK UNIFIED IDEOGRAPH + {0xF4C2, 0x860C}, //12658 #CJK UNIFIED IDEOGRAPH + {0xF4C3, 0x85FD}, //12659 #CJK UNIFIED IDEOGRAPH + {0xF4C4, 0x8819}, //12660 #CJK UNIFIED IDEOGRAPH + {0xF4C5, 0x8810}, //12661 #CJK UNIFIED IDEOGRAPH + {0xF4C6, 0x8811}, //12662 #CJK UNIFIED IDEOGRAPH + {0xF4C7, 0x8817}, //12663 #CJK UNIFIED IDEOGRAPH + {0xF4C8, 0x8813}, //12664 #CJK UNIFIED IDEOGRAPH + {0xF4C9, 0x8816}, //12665 #CJK UNIFIED IDEOGRAPH + {0xF4CA, 0x8963}, //12666 #CJK UNIFIED IDEOGRAPH + {0xF4CB, 0x8966}, //12667 #CJK UNIFIED IDEOGRAPH + {0xF4CC, 0x89B9}, //12668 #CJK UNIFIED IDEOGRAPH + {0xF4CD, 0x89F7}, //12669 #CJK UNIFIED IDEOGRAPH + {0xF4CE, 0x8B60}, //12670 #CJK UNIFIED IDEOGRAPH + {0xF4CF, 0x8B6A}, //12671 #CJK UNIFIED IDEOGRAPH + {0xF4D0, 0x8B5D}, //12672 #CJK UNIFIED IDEOGRAPH + {0xF4D1, 0x8B68}, //12673 #CJK UNIFIED IDEOGRAPH + {0xF4D2, 0x8B63}, //12674 #CJK UNIFIED IDEOGRAPH + {0xF4D3, 0x8B65}, //12675 #CJK UNIFIED IDEOGRAPH + {0xF4D4, 0x8B67}, //12676 #CJK UNIFIED IDEOGRAPH + {0xF4D5, 0x8B6D}, //12677 #CJK UNIFIED IDEOGRAPH + {0xF4D6, 0x8DAE}, //12678 #CJK UNIFIED IDEOGRAPH + {0xF4D7, 0x8E86}, //12679 #CJK UNIFIED IDEOGRAPH + {0xF4D8, 0x8E88}, //12680 #CJK UNIFIED IDEOGRAPH + {0xF4D9, 0x8E84}, //12681 #CJK UNIFIED IDEOGRAPH + {0xF4DA, 0x8F59}, //12682 #CJK UNIFIED IDEOGRAPH + {0xF4DB, 0x8F56}, //12683 #CJK UNIFIED IDEOGRAPH + {0xF4DC, 0x8F57}, //12684 #CJK UNIFIED IDEOGRAPH + {0xF4DD, 0x8F55}, //12685 #CJK UNIFIED IDEOGRAPH + {0xF4DE, 0x8F58}, //12686 #CJK UNIFIED IDEOGRAPH + {0xF4DF, 0x8F5A}, //12687 #CJK UNIFIED IDEOGRAPH + {0xF4E0, 0x908D}, //12688 #CJK UNIFIED IDEOGRAPH + {0xF4E1, 0x9143}, //12689 #CJK UNIFIED IDEOGRAPH + {0xF4E2, 0x9141}, //12690 #CJK UNIFIED IDEOGRAPH + {0xF4E3, 0x91B7}, //12691 #CJK UNIFIED IDEOGRAPH + {0xF4E4, 0x91B5}, //12692 #CJK UNIFIED IDEOGRAPH + {0xF4E5, 0x91B2}, //12693 #CJK UNIFIED IDEOGRAPH + {0xF4E6, 0x91B3}, //12694 #CJK UNIFIED IDEOGRAPH + {0xF4E7, 0x940B}, //12695 #CJK UNIFIED IDEOGRAPH + {0xF4E8, 0x9413}, //12696 #CJK UNIFIED IDEOGRAPH + {0xF4E9, 0x93FB}, //12697 #CJK UNIFIED IDEOGRAPH + {0xF4EA, 0x9420}, //12698 #CJK UNIFIED IDEOGRAPH + {0xF4EB, 0x940F}, //12699 #CJK UNIFIED IDEOGRAPH + {0xF4EC, 0x9414}, //12700 #CJK UNIFIED IDEOGRAPH + {0xF4ED, 0x93FE}, //12701 #CJK UNIFIED IDEOGRAPH + {0xF4EE, 0x9415}, //12702 #CJK UNIFIED IDEOGRAPH + {0xF4EF, 0x9410}, //12703 #CJK UNIFIED IDEOGRAPH + {0xF4F0, 0x9428}, //12704 #CJK UNIFIED IDEOGRAPH + {0xF4F1, 0x9419}, //12705 #CJK UNIFIED IDEOGRAPH + {0xF4F2, 0x940D}, //12706 #CJK UNIFIED IDEOGRAPH + {0xF4F3, 0x93F5}, //12707 #CJK UNIFIED IDEOGRAPH + {0xF4F4, 0x9400}, //12708 #CJK UNIFIED IDEOGRAPH + {0xF4F5, 0x93F7}, //12709 #CJK UNIFIED IDEOGRAPH + {0xF4F6, 0x9407}, //12710 #CJK UNIFIED IDEOGRAPH + {0xF4F7, 0x940E}, //12711 #CJK UNIFIED IDEOGRAPH + {0xF4F8, 0x9416}, //12712 #CJK UNIFIED IDEOGRAPH + {0xF4F9, 0x9412}, //12713 #CJK UNIFIED IDEOGRAPH + {0xF4FA, 0x93FA}, //12714 #CJK UNIFIED IDEOGRAPH + {0xF4FB, 0x9409}, //12715 #CJK UNIFIED IDEOGRAPH + {0xF4FC, 0x93F8}, //12716 #CJK UNIFIED IDEOGRAPH + {0xF4FD, 0x940A}, //12717 #CJK UNIFIED IDEOGRAPH + {0xF4FE, 0x93FF}, //12718 #CJK UNIFIED IDEOGRAPH + {0xF540, 0x93FC}, //12719 #CJK UNIFIED IDEOGRAPH + {0xF541, 0x940C}, //12720 #CJK UNIFIED IDEOGRAPH + {0xF542, 0x93F6}, //12721 #CJK UNIFIED IDEOGRAPH + {0xF543, 0x9411}, //12722 #CJK UNIFIED IDEOGRAPH + {0xF544, 0x9406}, //12723 #CJK UNIFIED IDEOGRAPH + {0xF545, 0x95DE}, //12724 #CJK UNIFIED IDEOGRAPH + {0xF546, 0x95E0}, //12725 #CJK UNIFIED IDEOGRAPH + {0xF547, 0x95DF}, //12726 #CJK UNIFIED IDEOGRAPH + {0xF548, 0x972E}, //12727 #CJK UNIFIED IDEOGRAPH + {0xF549, 0x972F}, //12728 #CJK UNIFIED IDEOGRAPH + {0xF54A, 0x97B9}, //12729 #CJK UNIFIED IDEOGRAPH + {0xF54B, 0x97BB}, //12730 #CJK UNIFIED IDEOGRAPH + {0xF54C, 0x97FD}, //12731 #CJK UNIFIED IDEOGRAPH + {0xF54D, 0x97FE}, //12732 #CJK UNIFIED IDEOGRAPH + {0xF54E, 0x9860}, //12733 #CJK UNIFIED IDEOGRAPH + {0xF54F, 0x9862}, //12734 #CJK UNIFIED IDEOGRAPH + {0xF550, 0x9863}, //12735 #CJK UNIFIED IDEOGRAPH + {0xF551, 0x985F}, //12736 #CJK UNIFIED IDEOGRAPH + {0xF552, 0x98C1}, //12737 #CJK UNIFIED IDEOGRAPH + {0xF553, 0x98C2}, //12738 #CJK UNIFIED IDEOGRAPH + {0xF554, 0x9950}, //12739 #CJK UNIFIED IDEOGRAPH + {0xF555, 0x994E}, //12740 #CJK UNIFIED IDEOGRAPH + {0xF556, 0x9959}, //12741 #CJK UNIFIED IDEOGRAPH + {0xF557, 0x994C}, //12742 #CJK UNIFIED IDEOGRAPH + {0xF558, 0x994B}, //12743 #CJK UNIFIED IDEOGRAPH + {0xF559, 0x9953}, //12744 #CJK UNIFIED IDEOGRAPH + {0xF55A, 0x9A32}, //12745 #CJK UNIFIED IDEOGRAPH + {0xF55B, 0x9A34}, //12746 #CJK UNIFIED IDEOGRAPH + {0xF55C, 0x9A31}, //12747 #CJK UNIFIED IDEOGRAPH + {0xF55D, 0x9A2C}, //12748 #CJK UNIFIED IDEOGRAPH + {0xF55E, 0x9A2A}, //12749 #CJK UNIFIED IDEOGRAPH + {0xF55F, 0x9A36}, //12750 #CJK UNIFIED IDEOGRAPH + {0xF560, 0x9A29}, //12751 #CJK UNIFIED IDEOGRAPH + {0xF561, 0x9A2E}, //12752 #CJK UNIFIED IDEOGRAPH + {0xF562, 0x9A38}, //12753 #CJK UNIFIED IDEOGRAPH + {0xF563, 0x9A2D}, //12754 #CJK UNIFIED IDEOGRAPH + {0xF564, 0x9AC7}, //12755 #CJK UNIFIED IDEOGRAPH + {0xF565, 0x9ACA}, //12756 #CJK UNIFIED IDEOGRAPH + {0xF566, 0x9AC6}, //12757 #CJK UNIFIED IDEOGRAPH + {0xF567, 0x9B10}, //12758 #CJK UNIFIED IDEOGRAPH + {0xF568, 0x9B12}, //12759 #CJK UNIFIED IDEOGRAPH + {0xF569, 0x9B11}, //12760 #CJK UNIFIED IDEOGRAPH + {0xF56A, 0x9C0B}, //12761 #CJK UNIFIED IDEOGRAPH + {0xF56B, 0x9C08}, //12762 #CJK UNIFIED IDEOGRAPH + {0xF56C, 0x9BF7}, //12763 #CJK UNIFIED IDEOGRAPH + {0xF56D, 0x9C05}, //12764 #CJK UNIFIED IDEOGRAPH + {0xF56E, 0x9C12}, //12765 #CJK UNIFIED IDEOGRAPH + {0xF56F, 0x9BF8}, //12766 #CJK UNIFIED IDEOGRAPH + {0xF570, 0x9C40}, //12767 #CJK UNIFIED IDEOGRAPH + {0xF571, 0x9C07}, //12768 #CJK UNIFIED IDEOGRAPH + {0xF572, 0x9C0E}, //12769 #CJK UNIFIED IDEOGRAPH + {0xF573, 0x9C06}, //12770 #CJK UNIFIED IDEOGRAPH + {0xF574, 0x9C17}, //12771 #CJK UNIFIED IDEOGRAPH + {0xF575, 0x9C14}, //12772 #CJK UNIFIED IDEOGRAPH + {0xF576, 0x9C09}, //12773 #CJK UNIFIED IDEOGRAPH + {0xF577, 0x9D9F}, //12774 #CJK UNIFIED IDEOGRAPH + {0xF578, 0x9D99}, //12775 #CJK UNIFIED IDEOGRAPH + {0xF579, 0x9DA4}, //12776 #CJK UNIFIED IDEOGRAPH + {0xF57A, 0x9D9D}, //12777 #CJK UNIFIED IDEOGRAPH + {0xF57B, 0x9D92}, //12778 #CJK UNIFIED IDEOGRAPH + {0xF57C, 0x9D98}, //12779 #CJK UNIFIED IDEOGRAPH + {0xF57D, 0x9D90}, //12780 #CJK UNIFIED IDEOGRAPH + {0xF57E, 0x9D9B}, //12781 #CJK UNIFIED IDEOGRAPH + {0xF5A1, 0x9DA0}, //12782 #CJK UNIFIED IDEOGRAPH + {0xF5A2, 0x9D94}, //12783 #CJK UNIFIED IDEOGRAPH + {0xF5A3, 0x9D9C}, //12784 #CJK UNIFIED IDEOGRAPH + {0xF5A4, 0x9DAA}, //12785 #CJK UNIFIED IDEOGRAPH + {0xF5A5, 0x9D97}, //12786 #CJK UNIFIED IDEOGRAPH + {0xF5A6, 0x9DA1}, //12787 #CJK UNIFIED IDEOGRAPH + {0xF5A7, 0x9D9A}, //12788 #CJK UNIFIED IDEOGRAPH + {0xF5A8, 0x9DA2}, //12789 #CJK UNIFIED IDEOGRAPH + {0xF5A9, 0x9DA8}, //12790 #CJK UNIFIED IDEOGRAPH + {0xF5AA, 0x9D9E}, //12791 #CJK UNIFIED IDEOGRAPH + {0xF5AB, 0x9DA3}, //12792 #CJK UNIFIED IDEOGRAPH + {0xF5AC, 0x9DBF}, //12793 #CJK UNIFIED IDEOGRAPH + {0xF5AD, 0x9DA9}, //12794 #CJK UNIFIED IDEOGRAPH + {0xF5AE, 0x9D96}, //12795 #CJK UNIFIED IDEOGRAPH + {0xF5AF, 0x9DA6}, //12796 #CJK UNIFIED IDEOGRAPH + {0xF5B0, 0x9DA7}, //12797 #CJK UNIFIED IDEOGRAPH + {0xF5B1, 0x9E99}, //12798 #CJK UNIFIED IDEOGRAPH + {0xF5B2, 0x9E9B}, //12799 #CJK UNIFIED IDEOGRAPH + {0xF5B3, 0x9E9A}, //12800 #CJK UNIFIED IDEOGRAPH + {0xF5B4, 0x9EE5}, //12801 #CJK UNIFIED IDEOGRAPH + {0xF5B5, 0x9EE4}, //12802 #CJK UNIFIED IDEOGRAPH + {0xF5B6, 0x9EE7}, //12803 #CJK UNIFIED IDEOGRAPH + {0xF5B7, 0x9EE6}, //12804 #CJK UNIFIED IDEOGRAPH + {0xF5B8, 0x9F30}, //12805 #CJK UNIFIED IDEOGRAPH + {0xF5B9, 0x9F2E}, //12806 #CJK UNIFIED IDEOGRAPH + {0xF5BA, 0x9F5B}, //12807 #CJK UNIFIED IDEOGRAPH + {0xF5BB, 0x9F60}, //12808 #CJK UNIFIED IDEOGRAPH + {0xF5BC, 0x9F5E}, //12809 #CJK UNIFIED IDEOGRAPH + {0xF5BD, 0x9F5D}, //12810 #CJK UNIFIED IDEOGRAPH + {0xF5BE, 0x9F59}, //12811 #CJK UNIFIED IDEOGRAPH + {0xF5BF, 0x9F91}, //12812 #CJK UNIFIED IDEOGRAPH + {0xF5C0, 0x513A}, //12813 #CJK UNIFIED IDEOGRAPH + {0xF5C1, 0x5139}, //12814 #CJK UNIFIED IDEOGRAPH + {0xF5C2, 0x5298}, //12815 #CJK UNIFIED IDEOGRAPH + {0xF5C3, 0x5297}, //12816 #CJK UNIFIED IDEOGRAPH + {0xF5C4, 0x56C3}, //12817 #CJK UNIFIED IDEOGRAPH + {0xF5C5, 0x56BD}, //12818 #CJK UNIFIED IDEOGRAPH + {0xF5C6, 0x56BE}, //12819 #CJK UNIFIED IDEOGRAPH + {0xF5C7, 0x5B48}, //12820 #CJK UNIFIED IDEOGRAPH + {0xF5C8, 0x5B47}, //12821 #CJK UNIFIED IDEOGRAPH + {0xF5C9, 0x5DCB}, //12822 #CJK UNIFIED IDEOGRAPH + {0xF5CA, 0x5DCF}, //12823 #CJK UNIFIED IDEOGRAPH + {0xF5CB, 0x5EF1}, //12824 #CJK UNIFIED IDEOGRAPH + {0xF5CC, 0x61FD}, //12825 #CJK UNIFIED IDEOGRAPH + {0xF5CD, 0x651B}, //12826 #CJK UNIFIED IDEOGRAPH + {0xF5CE, 0x6B02}, //12827 #CJK UNIFIED IDEOGRAPH + {0xF5CF, 0x6AFC}, //12828 #CJK UNIFIED IDEOGRAPH + {0xF5D0, 0x6B03}, //12829 #CJK UNIFIED IDEOGRAPH + {0xF5D1, 0x6AF8}, //12830 #CJK UNIFIED IDEOGRAPH + {0xF5D2, 0x6B00}, //12831 #CJK UNIFIED IDEOGRAPH + {0xF5D3, 0x7043}, //12832 #CJK UNIFIED IDEOGRAPH + {0xF5D4, 0x7044}, //12833 #CJK UNIFIED IDEOGRAPH + {0xF5D5, 0x704A}, //12834 #CJK UNIFIED IDEOGRAPH + {0xF5D6, 0x7048}, //12835 #CJK UNIFIED IDEOGRAPH + {0xF5D7, 0x7049}, //12836 #CJK UNIFIED IDEOGRAPH + {0xF5D8, 0x7045}, //12837 #CJK UNIFIED IDEOGRAPH + {0xF5D9, 0x7046}, //12838 #CJK UNIFIED IDEOGRAPH + {0xF5DA, 0x721D}, //12839 #CJK UNIFIED IDEOGRAPH + {0xF5DB, 0x721A}, //12840 #CJK UNIFIED IDEOGRAPH + {0xF5DC, 0x7219}, //12841 #CJK UNIFIED IDEOGRAPH + {0xF5DD, 0x737E}, //12842 #CJK UNIFIED IDEOGRAPH + {0xF5DE, 0x7517}, //12843 #CJK UNIFIED IDEOGRAPH + {0xF5DF, 0x766A}, //12844 #CJK UNIFIED IDEOGRAPH + {0xF5E0, 0x77D0}, //12845 #CJK UNIFIED IDEOGRAPH + {0xF5E1, 0x792D}, //12846 #CJK UNIFIED IDEOGRAPH + {0xF5E2, 0x7931}, //12847 #CJK UNIFIED IDEOGRAPH + {0xF5E3, 0x792F}, //12848 #CJK UNIFIED IDEOGRAPH + {0xF5E4, 0x7C54}, //12849 #CJK UNIFIED IDEOGRAPH + {0xF5E5, 0x7C53}, //12850 #CJK UNIFIED IDEOGRAPH + {0xF5E6, 0x7CF2}, //12851 #CJK UNIFIED IDEOGRAPH + {0xF5E7, 0x7E8A}, //12852 #CJK UNIFIED IDEOGRAPH + {0xF5E8, 0x7E87}, //12853 #CJK UNIFIED IDEOGRAPH + {0xF5E9, 0x7E88}, //12854 #CJK UNIFIED IDEOGRAPH + {0xF5EA, 0x7E8B}, //12855 #CJK UNIFIED IDEOGRAPH + {0xF5EB, 0x7E86}, //12856 #CJK UNIFIED IDEOGRAPH + {0xF5EC, 0x7E8D}, //12857 #CJK UNIFIED IDEOGRAPH + {0xF5ED, 0x7F4D}, //12858 #CJK UNIFIED IDEOGRAPH + {0xF5EE, 0x7FBB}, //12859 #CJK UNIFIED IDEOGRAPH + {0xF5EF, 0x8030}, //12860 #CJK UNIFIED IDEOGRAPH + {0xF5F0, 0x81DD}, //12861 #CJK UNIFIED IDEOGRAPH + {0xF5F1, 0x8618}, //12862 #CJK UNIFIED IDEOGRAPH + {0xF5F2, 0x862A}, //12863 #CJK UNIFIED IDEOGRAPH + {0xF5F3, 0x8626}, //12864 #CJK UNIFIED IDEOGRAPH + {0xF5F4, 0x861F}, //12865 #CJK UNIFIED IDEOGRAPH + {0xF5F5, 0x8623}, //12866 #CJK UNIFIED IDEOGRAPH + {0xF5F6, 0x861C}, //12867 #CJK UNIFIED IDEOGRAPH + {0xF5F7, 0x8619}, //12868 #CJK UNIFIED IDEOGRAPH + {0xF5F8, 0x8627}, //12869 #CJK UNIFIED IDEOGRAPH + {0xF5F9, 0x862E}, //12870 #CJK UNIFIED IDEOGRAPH + {0xF5FA, 0x8621}, //12871 #CJK UNIFIED IDEOGRAPH + {0xF5FB, 0x8620}, //12872 #CJK UNIFIED IDEOGRAPH + {0xF5FC, 0x8629}, //12873 #CJK UNIFIED IDEOGRAPH + {0xF5FD, 0x861E}, //12874 #CJK UNIFIED IDEOGRAPH + {0xF5FE, 0x8625}, //12875 #CJK UNIFIED IDEOGRAPH + {0xF640, 0x8829}, //12876 #CJK UNIFIED IDEOGRAPH + {0xF641, 0x881D}, //12877 #CJK UNIFIED IDEOGRAPH + {0xF642, 0x881B}, //12878 #CJK UNIFIED IDEOGRAPH + {0xF643, 0x8820}, //12879 #CJK UNIFIED IDEOGRAPH + {0xF644, 0x8824}, //12880 #CJK UNIFIED IDEOGRAPH + {0xF645, 0x881C}, //12881 #CJK UNIFIED IDEOGRAPH + {0xF646, 0x882B}, //12882 #CJK UNIFIED IDEOGRAPH + {0xF647, 0x884A}, //12883 #CJK UNIFIED IDEOGRAPH + {0xF648, 0x896D}, //12884 #CJK UNIFIED IDEOGRAPH + {0xF649, 0x8969}, //12885 #CJK UNIFIED IDEOGRAPH + {0xF64A, 0x896E}, //12886 #CJK UNIFIED IDEOGRAPH + {0xF64B, 0x896B}, //12887 #CJK UNIFIED IDEOGRAPH + {0xF64C, 0x89FA}, //12888 #CJK UNIFIED IDEOGRAPH + {0xF64D, 0x8B79}, //12889 #CJK UNIFIED IDEOGRAPH + {0xF64E, 0x8B78}, //12890 #CJK UNIFIED IDEOGRAPH + {0xF64F, 0x8B45}, //12891 #CJK UNIFIED IDEOGRAPH + {0xF650, 0x8B7A}, //12892 #CJK UNIFIED IDEOGRAPH + {0xF651, 0x8B7B}, //12893 #CJK UNIFIED IDEOGRAPH + {0xF652, 0x8D10}, //12894 #CJK UNIFIED IDEOGRAPH + {0xF653, 0x8D14}, //12895 #CJK UNIFIED IDEOGRAPH + {0xF654, 0x8DAF}, //12896 #CJK UNIFIED IDEOGRAPH + {0xF655, 0x8E8E}, //12897 #CJK UNIFIED IDEOGRAPH + {0xF656, 0x8E8C}, //12898 #CJK UNIFIED IDEOGRAPH + {0xF657, 0x8F5E}, //12899 #CJK UNIFIED IDEOGRAPH + {0xF658, 0x8F5B}, //12900 #CJK UNIFIED IDEOGRAPH + {0xF659, 0x8F5D}, //12901 #CJK UNIFIED IDEOGRAPH + {0xF65A, 0x9146}, //12902 #CJK UNIFIED IDEOGRAPH + {0xF65B, 0x9144}, //12903 #CJK UNIFIED IDEOGRAPH + {0xF65C, 0x9145}, //12904 #CJK UNIFIED IDEOGRAPH + {0xF65D, 0x91B9}, //12905 #CJK UNIFIED IDEOGRAPH + {0xF65E, 0x943F}, //12906 #CJK UNIFIED IDEOGRAPH + {0xF65F, 0x943B}, //12907 #CJK UNIFIED IDEOGRAPH + {0xF660, 0x9436}, //12908 #CJK UNIFIED IDEOGRAPH + {0xF661, 0x9429}, //12909 #CJK UNIFIED IDEOGRAPH + {0xF662, 0x943D}, //12910 #CJK UNIFIED IDEOGRAPH + {0xF663, 0x943C}, //12911 #CJK UNIFIED IDEOGRAPH + {0xF664, 0x9430}, //12912 #CJK UNIFIED IDEOGRAPH + {0xF665, 0x9439}, //12913 #CJK UNIFIED IDEOGRAPH + {0xF666, 0x942A}, //12914 #CJK UNIFIED IDEOGRAPH + {0xF667, 0x9437}, //12915 #CJK UNIFIED IDEOGRAPH + {0xF668, 0x942C}, //12916 #CJK UNIFIED IDEOGRAPH + {0xF669, 0x9440}, //12917 #CJK UNIFIED IDEOGRAPH + {0xF66A, 0x9431}, //12918 #CJK UNIFIED IDEOGRAPH + {0xF66B, 0x95E5}, //12919 #CJK UNIFIED IDEOGRAPH + {0xF66C, 0x95E4}, //12920 #CJK UNIFIED IDEOGRAPH + {0xF66D, 0x95E3}, //12921 #CJK UNIFIED IDEOGRAPH + {0xF66E, 0x9735}, //12922 #CJK UNIFIED IDEOGRAPH + {0xF66F, 0x973A}, //12923 #CJK UNIFIED IDEOGRAPH + {0xF670, 0x97BF}, //12924 #CJK UNIFIED IDEOGRAPH + {0xF671, 0x97E1}, //12925 #CJK UNIFIED IDEOGRAPH + {0xF672, 0x9864}, //12926 #CJK UNIFIED IDEOGRAPH + {0xF673, 0x98C9}, //12927 #CJK UNIFIED IDEOGRAPH + {0xF674, 0x98C6}, //12928 #CJK UNIFIED IDEOGRAPH + {0xF675, 0x98C0}, //12929 #CJK UNIFIED IDEOGRAPH + {0xF676, 0x9958}, //12930 #CJK UNIFIED IDEOGRAPH + {0xF677, 0x9956}, //12931 #CJK UNIFIED IDEOGRAPH + {0xF678, 0x9A39}, //12932 #CJK UNIFIED IDEOGRAPH + {0xF679, 0x9A3D}, //12933 #CJK UNIFIED IDEOGRAPH + {0xF67A, 0x9A46}, //12934 #CJK UNIFIED IDEOGRAPH + {0xF67B, 0x9A44}, //12935 #CJK UNIFIED IDEOGRAPH + {0xF67C, 0x9A42}, //12936 #CJK UNIFIED IDEOGRAPH + {0xF67D, 0x9A41}, //12937 #CJK UNIFIED IDEOGRAPH + {0xF67E, 0x9A3A}, //12938 #CJK UNIFIED IDEOGRAPH + {0xF6A1, 0x9A3F}, //12939 #CJK UNIFIED IDEOGRAPH + {0xF6A2, 0x9ACD}, //12940 #CJK UNIFIED IDEOGRAPH + {0xF6A3, 0x9B15}, //12941 #CJK UNIFIED IDEOGRAPH + {0xF6A4, 0x9B17}, //12942 #CJK UNIFIED IDEOGRAPH + {0xF6A5, 0x9B18}, //12943 #CJK UNIFIED IDEOGRAPH + {0xF6A6, 0x9B16}, //12944 #CJK UNIFIED IDEOGRAPH + {0xF6A7, 0x9B3A}, //12945 #CJK UNIFIED IDEOGRAPH + {0xF6A8, 0x9B52}, //12946 #CJK UNIFIED IDEOGRAPH + {0xF6A9, 0x9C2B}, //12947 #CJK UNIFIED IDEOGRAPH + {0xF6AA, 0x9C1D}, //12948 #CJK UNIFIED IDEOGRAPH + {0xF6AB, 0x9C1C}, //12949 #CJK UNIFIED IDEOGRAPH + {0xF6AC, 0x9C2C}, //12950 #CJK UNIFIED IDEOGRAPH + {0xF6AD, 0x9C23}, //12951 #CJK UNIFIED IDEOGRAPH + {0xF6AE, 0x9C28}, //12952 #CJK UNIFIED IDEOGRAPH + {0xF6AF, 0x9C29}, //12953 #CJK UNIFIED IDEOGRAPH + {0xF6B0, 0x9C24}, //12954 #CJK UNIFIED IDEOGRAPH + {0xF6B1, 0x9C21}, //12955 #CJK UNIFIED IDEOGRAPH + {0xF6B2, 0x9DB7}, //12956 #CJK UNIFIED IDEOGRAPH + {0xF6B3, 0x9DB6}, //12957 #CJK UNIFIED IDEOGRAPH + {0xF6B4, 0x9DBC}, //12958 #CJK UNIFIED IDEOGRAPH + {0xF6B5, 0x9DC1}, //12959 #CJK UNIFIED IDEOGRAPH + {0xF6B6, 0x9DC7}, //12960 #CJK UNIFIED IDEOGRAPH + {0xF6B7, 0x9DCA}, //12961 #CJK UNIFIED IDEOGRAPH + {0xF6B8, 0x9DCF}, //12962 #CJK UNIFIED IDEOGRAPH + {0xF6B9, 0x9DBE}, //12963 #CJK UNIFIED IDEOGRAPH + {0xF6BA, 0x9DC5}, //12964 #CJK UNIFIED IDEOGRAPH + {0xF6BB, 0x9DC3}, //12965 #CJK UNIFIED IDEOGRAPH + {0xF6BC, 0x9DBB}, //12966 #CJK UNIFIED IDEOGRAPH + {0xF6BD, 0x9DB5}, //12967 #CJK UNIFIED IDEOGRAPH + {0xF6BE, 0x9DCE}, //12968 #CJK UNIFIED IDEOGRAPH + {0xF6BF, 0x9DB9}, //12969 #CJK UNIFIED IDEOGRAPH + {0xF6C0, 0x9DBA}, //12970 #CJK UNIFIED IDEOGRAPH + {0xF6C1, 0x9DAC}, //12971 #CJK UNIFIED IDEOGRAPH + {0xF6C2, 0x9DC8}, //12972 #CJK UNIFIED IDEOGRAPH + {0xF6C3, 0x9DB1}, //12973 #CJK UNIFIED IDEOGRAPH + {0xF6C4, 0x9DAD}, //12974 #CJK UNIFIED IDEOGRAPH + {0xF6C5, 0x9DCC}, //12975 #CJK UNIFIED IDEOGRAPH + {0xF6C6, 0x9DB3}, //12976 #CJK UNIFIED IDEOGRAPH + {0xF6C7, 0x9DCD}, //12977 #CJK UNIFIED IDEOGRAPH + {0xF6C8, 0x9DB2}, //12978 #CJK UNIFIED IDEOGRAPH + {0xF6C9, 0x9E7A}, //12979 #CJK UNIFIED IDEOGRAPH + {0xF6CA, 0x9E9C}, //12980 #CJK UNIFIED IDEOGRAPH + {0xF6CB, 0x9EEB}, //12981 #CJK UNIFIED IDEOGRAPH + {0xF6CC, 0x9EEE}, //12982 #CJK UNIFIED IDEOGRAPH + {0xF6CD, 0x9EED}, //12983 #CJK UNIFIED IDEOGRAPH + {0xF6CE, 0x9F1B}, //12984 #CJK UNIFIED IDEOGRAPH + {0xF6CF, 0x9F18}, //12985 #CJK UNIFIED IDEOGRAPH + {0xF6D0, 0x9F1A}, //12986 #CJK UNIFIED IDEOGRAPH + {0xF6D1, 0x9F31}, //12987 #CJK UNIFIED IDEOGRAPH + {0xF6D2, 0x9F4E}, //12988 #CJK UNIFIED IDEOGRAPH + {0xF6D3, 0x9F65}, //12989 #CJK UNIFIED IDEOGRAPH + {0xF6D4, 0x9F64}, //12990 #CJK UNIFIED IDEOGRAPH + {0xF6D5, 0x9F92}, //12991 #CJK UNIFIED IDEOGRAPH + {0xF6D6, 0x4EB9}, //12992 #CJK UNIFIED IDEOGRAPH + {0xF6D7, 0x56C6}, //12993 #CJK UNIFIED IDEOGRAPH + {0xF6D8, 0x56C5}, //12994 #CJK UNIFIED IDEOGRAPH + {0xF6D9, 0x56CB}, //12995 #CJK UNIFIED IDEOGRAPH + {0xF6DA, 0x5971}, //12996 #CJK UNIFIED IDEOGRAPH + {0xF6DB, 0x5B4B}, //12997 #CJK UNIFIED IDEOGRAPH + {0xF6DC, 0x5B4C}, //12998 #CJK UNIFIED IDEOGRAPH + {0xF6DD, 0x5DD5}, //12999 #CJK UNIFIED IDEOGRAPH + {0xF6DE, 0x5DD1}, //13000 #CJK UNIFIED IDEOGRAPH + {0xF6DF, 0x5EF2}, //13001 #CJK UNIFIED IDEOGRAPH + {0xF6E0, 0x6521}, //13002 #CJK UNIFIED IDEOGRAPH + {0xF6E1, 0x6520}, //13003 #CJK UNIFIED IDEOGRAPH + {0xF6E2, 0x6526}, //13004 #CJK UNIFIED IDEOGRAPH + {0xF6E3, 0x6522}, //13005 #CJK UNIFIED IDEOGRAPH + {0xF6E4, 0x6B0B}, //13006 #CJK UNIFIED IDEOGRAPH + {0xF6E5, 0x6B08}, //13007 #CJK UNIFIED IDEOGRAPH + {0xF6E6, 0x6B09}, //13008 #CJK UNIFIED IDEOGRAPH + {0xF6E7, 0x6C0D}, //13009 #CJK UNIFIED IDEOGRAPH + {0xF6E8, 0x7055}, //13010 #CJK UNIFIED IDEOGRAPH + {0xF6E9, 0x7056}, //13011 #CJK UNIFIED IDEOGRAPH + {0xF6EA, 0x7057}, //13012 #CJK UNIFIED IDEOGRAPH + {0xF6EB, 0x7052}, //13013 #CJK UNIFIED IDEOGRAPH + {0xF6EC, 0x721E}, //13014 #CJK UNIFIED IDEOGRAPH + {0xF6ED, 0x721F}, //13015 #CJK UNIFIED IDEOGRAPH + {0xF6EE, 0x72A9}, //13016 #CJK UNIFIED IDEOGRAPH + {0xF6EF, 0x737F}, //13017 #CJK UNIFIED IDEOGRAPH + {0xF6F0, 0x74D8}, //13018 #CJK UNIFIED IDEOGRAPH + {0xF6F1, 0x74D5}, //13019 #CJK UNIFIED IDEOGRAPH + {0xF6F2, 0x74D9}, //13020 #CJK UNIFIED IDEOGRAPH + {0xF6F3, 0x74D7}, //13021 #CJK UNIFIED IDEOGRAPH + {0xF6F4, 0x766D}, //13022 #CJK UNIFIED IDEOGRAPH + {0xF6F5, 0x76AD}, //13023 #CJK UNIFIED IDEOGRAPH + {0xF6F6, 0x7935}, //13024 #CJK UNIFIED IDEOGRAPH + {0xF6F7, 0x79B4}, //13025 #CJK UNIFIED IDEOGRAPH + {0xF6F8, 0x7A70}, //13026 #CJK UNIFIED IDEOGRAPH + {0xF6F9, 0x7A71}, //13027 #CJK UNIFIED IDEOGRAPH + {0xF6FA, 0x7C57}, //13028 #CJK UNIFIED IDEOGRAPH + {0xF6FB, 0x7C5C}, //13029 #CJK UNIFIED IDEOGRAPH + {0xF6FC, 0x7C59}, //13030 #CJK UNIFIED IDEOGRAPH + {0xF6FD, 0x7C5B}, //13031 #CJK UNIFIED IDEOGRAPH + {0xF6FE, 0x7C5A}, //13032 #CJK UNIFIED IDEOGRAPH + {0xF740, 0x7CF4}, //13033 #CJK UNIFIED IDEOGRAPH + {0xF741, 0x7CF1}, //13034 #CJK UNIFIED IDEOGRAPH + {0xF742, 0x7E91}, //13035 #CJK UNIFIED IDEOGRAPH + {0xF743, 0x7F4F}, //13036 #CJK UNIFIED IDEOGRAPH + {0xF744, 0x7F87}, //13037 #CJK UNIFIED IDEOGRAPH + {0xF745, 0x81DE}, //13038 #CJK UNIFIED IDEOGRAPH + {0xF746, 0x826B}, //13039 #CJK UNIFIED IDEOGRAPH + {0xF747, 0x8634}, //13040 #CJK UNIFIED IDEOGRAPH + {0xF748, 0x8635}, //13041 #CJK UNIFIED IDEOGRAPH + {0xF749, 0x8633}, //13042 #CJK UNIFIED IDEOGRAPH + {0xF74A, 0x862C}, //13043 #CJK UNIFIED IDEOGRAPH + {0xF74B, 0x8632}, //13044 #CJK UNIFIED IDEOGRAPH + {0xF74C, 0x8636}, //13045 #CJK UNIFIED IDEOGRAPH + {0xF74D, 0x882C}, //13046 #CJK UNIFIED IDEOGRAPH + {0xF74E, 0x8828}, //13047 #CJK UNIFIED IDEOGRAPH + {0xF74F, 0x8826}, //13048 #CJK UNIFIED IDEOGRAPH + {0xF750, 0x882A}, //13049 #CJK UNIFIED IDEOGRAPH + {0xF751, 0x8825}, //13050 #CJK UNIFIED IDEOGRAPH + {0xF752, 0x8971}, //13051 #CJK UNIFIED IDEOGRAPH + {0xF753, 0x89BF}, //13052 #CJK UNIFIED IDEOGRAPH + {0xF754, 0x89BE}, //13053 #CJK UNIFIED IDEOGRAPH + {0xF755, 0x89FB}, //13054 #CJK UNIFIED IDEOGRAPH + {0xF756, 0x8B7E}, //13055 #CJK UNIFIED IDEOGRAPH + {0xF757, 0x8B84}, //13056 #CJK UNIFIED IDEOGRAPH + {0xF758, 0x8B82}, //13057 #CJK UNIFIED IDEOGRAPH + {0xF759, 0x8B86}, //13058 #CJK UNIFIED IDEOGRAPH + {0xF75A, 0x8B85}, //13059 #CJK UNIFIED IDEOGRAPH + {0xF75B, 0x8B7F}, //13060 #CJK UNIFIED IDEOGRAPH + {0xF75C, 0x8D15}, //13061 #CJK UNIFIED IDEOGRAPH + {0xF75D, 0x8E95}, //13062 #CJK UNIFIED IDEOGRAPH + {0xF75E, 0x8E94}, //13063 #CJK UNIFIED IDEOGRAPH + {0xF75F, 0x8E9A}, //13064 #CJK UNIFIED IDEOGRAPH + {0xF760, 0x8E92}, //13065 #CJK UNIFIED IDEOGRAPH + {0xF761, 0x8E90}, //13066 #CJK UNIFIED IDEOGRAPH + {0xF762, 0x8E96}, //13067 #CJK UNIFIED IDEOGRAPH + {0xF763, 0x8E97}, //13068 #CJK UNIFIED IDEOGRAPH + {0xF764, 0x8F60}, //13069 #CJK UNIFIED IDEOGRAPH + {0xF765, 0x8F62}, //13070 #CJK UNIFIED IDEOGRAPH + {0xF766, 0x9147}, //13071 #CJK UNIFIED IDEOGRAPH + {0xF767, 0x944C}, //13072 #CJK UNIFIED IDEOGRAPH + {0xF768, 0x9450}, //13073 #CJK UNIFIED IDEOGRAPH + {0xF769, 0x944A}, //13074 #CJK UNIFIED IDEOGRAPH + {0xF76A, 0x944B}, //13075 #CJK UNIFIED IDEOGRAPH + {0xF76B, 0x944F}, //13076 #CJK UNIFIED IDEOGRAPH + {0xF76C, 0x9447}, //13077 #CJK UNIFIED IDEOGRAPH + {0xF76D, 0x9445}, //13078 #CJK UNIFIED IDEOGRAPH + {0xF76E, 0x9448}, //13079 #CJK UNIFIED IDEOGRAPH + {0xF76F, 0x9449}, //13080 #CJK UNIFIED IDEOGRAPH + {0xF770, 0x9446}, //13081 #CJK UNIFIED IDEOGRAPH + {0xF771, 0x973F}, //13082 #CJK UNIFIED IDEOGRAPH + {0xF772, 0x97E3}, //13083 #CJK UNIFIED IDEOGRAPH + {0xF773, 0x986A}, //13084 #CJK UNIFIED IDEOGRAPH + {0xF774, 0x9869}, //13085 #CJK UNIFIED IDEOGRAPH + {0xF775, 0x98CB}, //13086 #CJK UNIFIED IDEOGRAPH + {0xF776, 0x9954}, //13087 #CJK UNIFIED IDEOGRAPH + {0xF777, 0x995B}, //13088 #CJK UNIFIED IDEOGRAPH + {0xF778, 0x9A4E}, //13089 #CJK UNIFIED IDEOGRAPH + {0xF779, 0x9A53}, //13090 #CJK UNIFIED IDEOGRAPH + {0xF77A, 0x9A54}, //13091 #CJK UNIFIED IDEOGRAPH + {0xF77B, 0x9A4C}, //13092 #CJK UNIFIED IDEOGRAPH + {0xF77C, 0x9A4F}, //13093 #CJK UNIFIED IDEOGRAPH + {0xF77D, 0x9A48}, //13094 #CJK UNIFIED IDEOGRAPH + {0xF77E, 0x9A4A}, //13095 #CJK UNIFIED IDEOGRAPH + {0xF7A1, 0x9A49}, //13096 #CJK UNIFIED IDEOGRAPH + {0xF7A2, 0x9A52}, //13097 #CJK UNIFIED IDEOGRAPH + {0xF7A3, 0x9A50}, //13098 #CJK UNIFIED IDEOGRAPH + {0xF7A4, 0x9AD0}, //13099 #CJK UNIFIED IDEOGRAPH + {0xF7A5, 0x9B19}, //13100 #CJK UNIFIED IDEOGRAPH + {0xF7A6, 0x9B2B}, //13101 #CJK UNIFIED IDEOGRAPH + {0xF7A7, 0x9B3B}, //13102 #CJK UNIFIED IDEOGRAPH + {0xF7A8, 0x9B56}, //13103 #CJK UNIFIED IDEOGRAPH + {0xF7A9, 0x9B55}, //13104 #CJK UNIFIED IDEOGRAPH + {0xF7AA, 0x9C46}, //13105 #CJK UNIFIED IDEOGRAPH + {0xF7AB, 0x9C48}, //13106 #CJK UNIFIED IDEOGRAPH + {0xF7AC, 0x9C3F}, //13107 #CJK UNIFIED IDEOGRAPH + {0xF7AD, 0x9C44}, //13108 #CJK UNIFIED IDEOGRAPH + {0xF7AE, 0x9C39}, //13109 #CJK UNIFIED IDEOGRAPH + {0xF7AF, 0x9C33}, //13110 #CJK UNIFIED IDEOGRAPH + {0xF7B0, 0x9C41}, //13111 #CJK UNIFIED IDEOGRAPH + {0xF7B1, 0x9C3C}, //13112 #CJK UNIFIED IDEOGRAPH + {0xF7B2, 0x9C37}, //13113 #CJK UNIFIED IDEOGRAPH + {0xF7B3, 0x9C34}, //13114 #CJK UNIFIED IDEOGRAPH + {0xF7B4, 0x9C32}, //13115 #CJK UNIFIED IDEOGRAPH + {0xF7B5, 0x9C3D}, //13116 #CJK UNIFIED IDEOGRAPH + {0xF7B6, 0x9C36}, //13117 #CJK UNIFIED IDEOGRAPH + {0xF7B7, 0x9DDB}, //13118 #CJK UNIFIED IDEOGRAPH + {0xF7B8, 0x9DD2}, //13119 #CJK UNIFIED IDEOGRAPH + {0xF7B9, 0x9DDE}, //13120 #CJK UNIFIED IDEOGRAPH + {0xF7BA, 0x9DDA}, //13121 #CJK UNIFIED IDEOGRAPH + {0xF7BB, 0x9DCB}, //13122 #CJK UNIFIED IDEOGRAPH + {0xF7BC, 0x9DD0}, //13123 #CJK UNIFIED IDEOGRAPH + {0xF7BD, 0x9DDC}, //13124 #CJK UNIFIED IDEOGRAPH + {0xF7BE, 0x9DD1}, //13125 #CJK UNIFIED IDEOGRAPH + {0xF7BF, 0x9DDF}, //13126 #CJK UNIFIED IDEOGRAPH + {0xF7C0, 0x9DE9}, //13127 #CJK UNIFIED IDEOGRAPH + {0xF7C1, 0x9DD9}, //13128 #CJK UNIFIED IDEOGRAPH + {0xF7C2, 0x9DD8}, //13129 #CJK UNIFIED IDEOGRAPH + {0xF7C3, 0x9DD6}, //13130 #CJK UNIFIED IDEOGRAPH + {0xF7C4, 0x9DF5}, //13131 #CJK UNIFIED IDEOGRAPH + {0xF7C5, 0x9DD5}, //13132 #CJK UNIFIED IDEOGRAPH + {0xF7C6, 0x9DDD}, //13133 #CJK UNIFIED IDEOGRAPH + {0xF7C7, 0x9EB6}, //13134 #CJK UNIFIED IDEOGRAPH + {0xF7C8, 0x9EF0}, //13135 #CJK UNIFIED IDEOGRAPH + {0xF7C9, 0x9F35}, //13136 #CJK UNIFIED IDEOGRAPH + {0xF7CA, 0x9F33}, //13137 #CJK UNIFIED IDEOGRAPH + {0xF7CB, 0x9F32}, //13138 #CJK UNIFIED IDEOGRAPH + {0xF7CC, 0x9F42}, //13139 #CJK UNIFIED IDEOGRAPH + {0xF7CD, 0x9F6B}, //13140 #CJK UNIFIED IDEOGRAPH + {0xF7CE, 0x9F95}, //13141 #CJK UNIFIED IDEOGRAPH + {0xF7CF, 0x9FA2}, //13142 #CJK UNIFIED IDEOGRAPH + {0xF7D0, 0x513D}, //13143 #CJK UNIFIED IDEOGRAPH + {0xF7D1, 0x5299}, //13144 #CJK UNIFIED IDEOGRAPH + {0xF7D2, 0x58E8}, //13145 #CJK UNIFIED IDEOGRAPH + {0xF7D3, 0x58E7}, //13146 #CJK UNIFIED IDEOGRAPH + {0xF7D4, 0x5972}, //13147 #CJK UNIFIED IDEOGRAPH + {0xF7D5, 0x5B4D}, //13148 #CJK UNIFIED IDEOGRAPH + {0xF7D6, 0x5DD8}, //13149 #CJK UNIFIED IDEOGRAPH + {0xF7D7, 0x882F}, //13150 #CJK UNIFIED IDEOGRAPH + {0xF7D8, 0x5F4F}, //13151 #CJK UNIFIED IDEOGRAPH + {0xF7D9, 0x6201}, //13152 #CJK UNIFIED IDEOGRAPH + {0xF7DA, 0x6203}, //13153 #CJK UNIFIED IDEOGRAPH + {0xF7DB, 0x6204}, //13154 #CJK UNIFIED IDEOGRAPH + {0xF7DC, 0x6529}, //13155 #CJK UNIFIED IDEOGRAPH + {0xF7DD, 0x6525}, //13156 #CJK UNIFIED IDEOGRAPH + {0xF7DE, 0x6596}, //13157 #CJK UNIFIED IDEOGRAPH + {0xF7DF, 0x66EB}, //13158 #CJK UNIFIED IDEOGRAPH + {0xF7E0, 0x6B11}, //13159 #CJK UNIFIED IDEOGRAPH + {0xF7E1, 0x6B12}, //13160 #CJK UNIFIED IDEOGRAPH + {0xF7E2, 0x6B0F}, //13161 #CJK UNIFIED IDEOGRAPH + {0xF7E3, 0x6BCA}, //13162 #CJK UNIFIED IDEOGRAPH + {0xF7E4, 0x705B}, //13163 #CJK UNIFIED IDEOGRAPH + {0xF7E5, 0x705A}, //13164 #CJK UNIFIED IDEOGRAPH + {0xF7E6, 0x7222}, //13165 #CJK UNIFIED IDEOGRAPH + {0xF7E7, 0x7382}, //13166 #CJK UNIFIED IDEOGRAPH + {0xF7E8, 0x7381}, //13167 #CJK UNIFIED IDEOGRAPH + {0xF7E9, 0x7383}, //13168 #CJK UNIFIED IDEOGRAPH + {0xF7EA, 0x7670}, //13169 #CJK UNIFIED IDEOGRAPH + {0xF7EB, 0x77D4}, //13170 #CJK UNIFIED IDEOGRAPH + {0xF7EC, 0x7C67}, //13171 #CJK UNIFIED IDEOGRAPH + {0xF7ED, 0x7C66}, //13172 #CJK UNIFIED IDEOGRAPH + {0xF7EE, 0x7E95}, //13173 #CJK UNIFIED IDEOGRAPH + {0xF7EF, 0x826C}, //13174 #CJK UNIFIED IDEOGRAPH + {0xF7F0, 0x863A}, //13175 #CJK UNIFIED IDEOGRAPH + {0xF7F1, 0x8640}, //13176 #CJK UNIFIED IDEOGRAPH + {0xF7F2, 0x8639}, //13177 #CJK UNIFIED IDEOGRAPH + {0xF7F3, 0x863C}, //13178 #CJK UNIFIED IDEOGRAPH + {0xF7F4, 0x8631}, //13179 #CJK UNIFIED IDEOGRAPH + {0xF7F5, 0x863B}, //13180 #CJK UNIFIED IDEOGRAPH + {0xF7F6, 0x863E}, //13181 #CJK UNIFIED IDEOGRAPH + {0xF7F7, 0x8830}, //13182 #CJK UNIFIED IDEOGRAPH + {0xF7F8, 0x8832}, //13183 #CJK UNIFIED IDEOGRAPH + {0xF7F9, 0x882E}, //13184 #CJK UNIFIED IDEOGRAPH + {0xF7FA, 0x8833}, //13185 #CJK UNIFIED IDEOGRAPH + {0xF7FB, 0x8976}, //13186 #CJK UNIFIED IDEOGRAPH + {0xF7FC, 0x8974}, //13187 #CJK UNIFIED IDEOGRAPH + {0xF7FD, 0x8973}, //13188 #CJK UNIFIED IDEOGRAPH + {0xF7FE, 0x89FE}, //13189 #CJK UNIFIED IDEOGRAPH + {0xF840, 0x8B8C}, //13190 #CJK UNIFIED IDEOGRAPH + {0xF841, 0x8B8E}, //13191 #CJK UNIFIED IDEOGRAPH + {0xF842, 0x8B8B}, //13192 #CJK UNIFIED IDEOGRAPH + {0xF843, 0x8B88}, //13193 #CJK UNIFIED IDEOGRAPH + {0xF844, 0x8C45}, //13194 #CJK UNIFIED IDEOGRAPH + {0xF845, 0x8D19}, //13195 #CJK UNIFIED IDEOGRAPH + {0xF846, 0x8E98}, //13196 #CJK UNIFIED IDEOGRAPH + {0xF847, 0x8F64}, //13197 #CJK UNIFIED IDEOGRAPH + {0xF848, 0x8F63}, //13198 #CJK UNIFIED IDEOGRAPH + {0xF849, 0x91BC}, //13199 #CJK UNIFIED IDEOGRAPH + {0xF84A, 0x9462}, //13200 #CJK UNIFIED IDEOGRAPH + {0xF84B, 0x9455}, //13201 #CJK UNIFIED IDEOGRAPH + {0xF84C, 0x945D}, //13202 #CJK UNIFIED IDEOGRAPH + {0xF84D, 0x9457}, //13203 #CJK UNIFIED IDEOGRAPH + {0xF84E, 0x945E}, //13204 #CJK UNIFIED IDEOGRAPH + {0xF84F, 0x97C4}, //13205 #CJK UNIFIED IDEOGRAPH + {0xF850, 0x97C5}, //13206 #CJK UNIFIED IDEOGRAPH + {0xF851, 0x9800}, //13207 #CJK UNIFIED IDEOGRAPH + {0xF852, 0x9A56}, //13208 #CJK UNIFIED IDEOGRAPH + {0xF853, 0x9A59}, //13209 #CJK UNIFIED IDEOGRAPH + {0xF854, 0x9B1E}, //13210 #CJK UNIFIED IDEOGRAPH + {0xF855, 0x9B1F}, //13211 #CJK UNIFIED IDEOGRAPH + {0xF856, 0x9B20}, //13212 #CJK UNIFIED IDEOGRAPH + {0xF857, 0x9C52}, //13213 #CJK UNIFIED IDEOGRAPH + {0xF858, 0x9C58}, //13214 #CJK UNIFIED IDEOGRAPH + {0xF859, 0x9C50}, //13215 #CJK UNIFIED IDEOGRAPH + {0xF85A, 0x9C4A}, //13216 #CJK UNIFIED IDEOGRAPH + {0xF85B, 0x9C4D}, //13217 #CJK UNIFIED IDEOGRAPH + {0xF85C, 0x9C4B}, //13218 #CJK UNIFIED IDEOGRAPH + {0xF85D, 0x9C55}, //13219 #CJK UNIFIED IDEOGRAPH + {0xF85E, 0x9C59}, //13220 #CJK UNIFIED IDEOGRAPH + {0xF85F, 0x9C4C}, //13221 #CJK UNIFIED IDEOGRAPH + {0xF860, 0x9C4E}, //13222 #CJK UNIFIED IDEOGRAPH + {0xF861, 0x9DFB}, //13223 #CJK UNIFIED IDEOGRAPH + {0xF862, 0x9DF7}, //13224 #CJK UNIFIED IDEOGRAPH + {0xF863, 0x9DEF}, //13225 #CJK UNIFIED IDEOGRAPH + {0xF864, 0x9DE3}, //13226 #CJK UNIFIED IDEOGRAPH + {0xF865, 0x9DEB}, //13227 #CJK UNIFIED IDEOGRAPH + {0xF866, 0x9DF8}, //13228 #CJK UNIFIED IDEOGRAPH + {0xF867, 0x9DE4}, //13229 #CJK UNIFIED IDEOGRAPH + {0xF868, 0x9DF6}, //13230 #CJK UNIFIED IDEOGRAPH + {0xF869, 0x9DE1}, //13231 #CJK UNIFIED IDEOGRAPH + {0xF86A, 0x9DEE}, //13232 #CJK UNIFIED IDEOGRAPH + {0xF86B, 0x9DE6}, //13233 #CJK UNIFIED IDEOGRAPH + {0xF86C, 0x9DF2}, //13234 #CJK UNIFIED IDEOGRAPH + {0xF86D, 0x9DF0}, //13235 #CJK UNIFIED IDEOGRAPH + {0xF86E, 0x9DE2}, //13236 #CJK UNIFIED IDEOGRAPH + {0xF86F, 0x9DEC}, //13237 #CJK UNIFIED IDEOGRAPH + {0xF870, 0x9DF4}, //13238 #CJK UNIFIED IDEOGRAPH + {0xF871, 0x9DF3}, //13239 #CJK UNIFIED IDEOGRAPH + {0xF872, 0x9DE8}, //13240 #CJK UNIFIED IDEOGRAPH + {0xF873, 0x9DED}, //13241 #CJK UNIFIED IDEOGRAPH + {0xF874, 0x9EC2}, //13242 #CJK UNIFIED IDEOGRAPH + {0xF875, 0x9ED0}, //13243 #CJK UNIFIED IDEOGRAPH + {0xF876, 0x9EF2}, //13244 #CJK UNIFIED IDEOGRAPH + {0xF877, 0x9EF3}, //13245 #CJK UNIFIED IDEOGRAPH + {0xF878, 0x9F06}, //13246 #CJK UNIFIED IDEOGRAPH + {0xF879, 0x9F1C}, //13247 #CJK UNIFIED IDEOGRAPH + {0xF87A, 0x9F38}, //13248 #CJK UNIFIED IDEOGRAPH + {0xF87B, 0x9F37}, //13249 #CJK UNIFIED IDEOGRAPH + {0xF87C, 0x9F36}, //13250 #CJK UNIFIED IDEOGRAPH + {0xF87D, 0x9F43}, //13251 #CJK UNIFIED IDEOGRAPH + {0xF87E, 0x9F4F}, //13252 #CJK UNIFIED IDEOGRAPH + {0xF8A1, 0x9F71}, //13253 #CJK UNIFIED IDEOGRAPH + {0xF8A2, 0x9F70}, //13254 #CJK UNIFIED IDEOGRAPH + {0xF8A3, 0x9F6E}, //13255 #CJK UNIFIED IDEOGRAPH + {0xF8A4, 0x9F6F}, //13256 #CJK UNIFIED IDEOGRAPH + {0xF8A5, 0x56D3}, //13257 #CJK UNIFIED IDEOGRAPH + {0xF8A6, 0x56CD}, //13258 #CJK UNIFIED IDEOGRAPH + {0xF8A7, 0x5B4E}, //13259 #CJK UNIFIED IDEOGRAPH + {0xF8A8, 0x5C6D}, //13260 #CJK UNIFIED IDEOGRAPH + {0xF8A9, 0x652D}, //13261 #CJK UNIFIED IDEOGRAPH + {0xF8AA, 0x66ED}, //13262 #CJK UNIFIED IDEOGRAPH + {0xF8AB, 0x66EE}, //13263 #CJK UNIFIED IDEOGRAPH + {0xF8AC, 0x6B13}, //13264 #CJK UNIFIED IDEOGRAPH + {0xF8AD, 0x705F}, //13265 #CJK UNIFIED IDEOGRAPH + {0xF8AE, 0x7061}, //13266 #CJK UNIFIED IDEOGRAPH + {0xF8AF, 0x705D}, //13267 #CJK UNIFIED IDEOGRAPH + {0xF8B0, 0x7060}, //13268 #CJK UNIFIED IDEOGRAPH + {0xF8B1, 0x7223}, //13269 #CJK UNIFIED IDEOGRAPH + {0xF8B2, 0x74DB}, //13270 #CJK UNIFIED IDEOGRAPH + {0xF8B3, 0x74E5}, //13271 #CJK UNIFIED IDEOGRAPH + {0xF8B4, 0x77D5}, //13272 #CJK UNIFIED IDEOGRAPH + {0xF8B5, 0x7938}, //13273 #CJK UNIFIED IDEOGRAPH + {0xF8B6, 0x79B7}, //13274 #CJK UNIFIED IDEOGRAPH + {0xF8B7, 0x79B6}, //13275 #CJK UNIFIED IDEOGRAPH + {0xF8B8, 0x7C6A}, //13276 #CJK UNIFIED IDEOGRAPH + {0xF8B9, 0x7E97}, //13277 #CJK UNIFIED IDEOGRAPH + {0xF8BA, 0x7F89}, //13278 #CJK UNIFIED IDEOGRAPH + {0xF8BB, 0x826D}, //13279 #CJK UNIFIED IDEOGRAPH + {0xF8BC, 0x8643}, //13280 #CJK UNIFIED IDEOGRAPH + {0xF8BD, 0x8838}, //13281 #CJK UNIFIED IDEOGRAPH + {0xF8BE, 0x8837}, //13282 #CJK UNIFIED IDEOGRAPH + {0xF8BF, 0x8835}, //13283 #CJK UNIFIED IDEOGRAPH + {0xF8C0, 0x884B}, //13284 #CJK UNIFIED IDEOGRAPH + {0xF8C1, 0x8B94}, //13285 #CJK UNIFIED IDEOGRAPH + {0xF8C2, 0x8B95}, //13286 #CJK UNIFIED IDEOGRAPH + {0xF8C3, 0x8E9E}, //13287 #CJK UNIFIED IDEOGRAPH + {0xF8C4, 0x8E9F}, //13288 #CJK UNIFIED IDEOGRAPH + {0xF8C5, 0x8EA0}, //13289 #CJK UNIFIED IDEOGRAPH + {0xF8C6, 0x8E9D}, //13290 #CJK UNIFIED IDEOGRAPH + {0xF8C7, 0x91BE}, //13291 #CJK UNIFIED IDEOGRAPH + {0xF8C8, 0x91BD}, //13292 #CJK UNIFIED IDEOGRAPH + {0xF8C9, 0x91C2}, //13293 #CJK UNIFIED IDEOGRAPH + {0xF8CA, 0x946B}, //13294 #CJK UNIFIED IDEOGRAPH + {0xF8CB, 0x9468}, //13295 #CJK UNIFIED IDEOGRAPH + {0xF8CC, 0x9469}, //13296 #CJK UNIFIED IDEOGRAPH + {0xF8CD, 0x96E5}, //13297 #CJK UNIFIED IDEOGRAPH + {0xF8CE, 0x9746}, //13298 #CJK UNIFIED IDEOGRAPH + {0xF8CF, 0x9743}, //13299 #CJK UNIFIED IDEOGRAPH + {0xF8D0, 0x9747}, //13300 #CJK UNIFIED IDEOGRAPH + {0xF8D1, 0x97C7}, //13301 #CJK UNIFIED IDEOGRAPH + {0xF8D2, 0x97E5}, //13302 #CJK UNIFIED IDEOGRAPH + {0xF8D3, 0x9A5E}, //13303 #CJK UNIFIED IDEOGRAPH + {0xF8D4, 0x9AD5}, //13304 #CJK UNIFIED IDEOGRAPH + {0xF8D5, 0x9B59}, //13305 #CJK UNIFIED IDEOGRAPH + {0xF8D6, 0x9C63}, //13306 #CJK UNIFIED IDEOGRAPH + {0xF8D7, 0x9C67}, //13307 #CJK UNIFIED IDEOGRAPH + {0xF8D8, 0x9C66}, //13308 #CJK UNIFIED IDEOGRAPH + {0xF8D9, 0x9C62}, //13309 #CJK UNIFIED IDEOGRAPH + {0xF8DA, 0x9C5E}, //13310 #CJK UNIFIED IDEOGRAPH + {0xF8DB, 0x9C60}, //13311 #CJK UNIFIED IDEOGRAPH + {0xF8DC, 0x9E02}, //13312 #CJK UNIFIED IDEOGRAPH + {0xF8DD, 0x9DFE}, //13313 #CJK UNIFIED IDEOGRAPH + {0xF8DE, 0x9E07}, //13314 #CJK UNIFIED IDEOGRAPH + {0xF8DF, 0x9E03}, //13315 #CJK UNIFIED IDEOGRAPH + {0xF8E0, 0x9E06}, //13316 #CJK UNIFIED IDEOGRAPH + {0xF8E1, 0x9E05}, //13317 #CJK UNIFIED IDEOGRAPH + {0xF8E2, 0x9E00}, //13318 #CJK UNIFIED IDEOGRAPH + {0xF8E3, 0x9E01}, //13319 #CJK UNIFIED IDEOGRAPH + {0xF8E4, 0x9E09}, //13320 #CJK UNIFIED IDEOGRAPH + {0xF8E5, 0x9DFF}, //13321 #CJK UNIFIED IDEOGRAPH + {0xF8E6, 0x9DFD}, //13322 #CJK UNIFIED IDEOGRAPH + {0xF8E7, 0x9E04}, //13323 #CJK UNIFIED IDEOGRAPH + {0xF8E8, 0x9EA0}, //13324 #CJK UNIFIED IDEOGRAPH + {0xF8E9, 0x9F1E}, //13325 #CJK UNIFIED IDEOGRAPH + {0xF8EA, 0x9F46}, //13326 #CJK UNIFIED IDEOGRAPH + {0xF8EB, 0x9F74}, //13327 #CJK UNIFIED IDEOGRAPH + {0xF8EC, 0x9F75}, //13328 #CJK UNIFIED IDEOGRAPH + {0xF8ED, 0x9F76}, //13329 #CJK UNIFIED IDEOGRAPH + {0xF8EE, 0x56D4}, //13330 #CJK UNIFIED IDEOGRAPH + {0xF8EF, 0x652E}, //13331 #CJK UNIFIED IDEOGRAPH + {0xF8F0, 0x65B8}, //13332 #CJK UNIFIED IDEOGRAPH + {0xF8F1, 0x6B18}, //13333 #CJK UNIFIED IDEOGRAPH + {0xF8F2, 0x6B19}, //13334 #CJK UNIFIED IDEOGRAPH + {0xF8F3, 0x6B17}, //13335 #CJK UNIFIED IDEOGRAPH + {0xF8F4, 0x6B1A}, //13336 #CJK UNIFIED IDEOGRAPH + {0xF8F5, 0x7062}, //13337 #CJK UNIFIED IDEOGRAPH + {0xF8F6, 0x7226}, //13338 #CJK UNIFIED IDEOGRAPH + {0xF8F7, 0x72AA}, //13339 #CJK UNIFIED IDEOGRAPH + {0xF8F8, 0x77D8}, //13340 #CJK UNIFIED IDEOGRAPH + {0xF8F9, 0x77D9}, //13341 #CJK UNIFIED IDEOGRAPH + {0xF8FA, 0x7939}, //13342 #CJK UNIFIED IDEOGRAPH + {0xF8FB, 0x7C69}, //13343 #CJK UNIFIED IDEOGRAPH + {0xF8FC, 0x7C6B}, //13344 #CJK UNIFIED IDEOGRAPH + {0xF8FD, 0x7CF6}, //13345 #CJK UNIFIED IDEOGRAPH + {0xF8FE, 0x7E9A}, //13346 #CJK UNIFIED IDEOGRAPH + {0xF940, 0x7E98}, //13347 #CJK UNIFIED IDEOGRAPH + {0xF941, 0x7E9B}, //13348 #CJK UNIFIED IDEOGRAPH + {0xF942, 0x7E99}, //13349 #CJK UNIFIED IDEOGRAPH + {0xF943, 0x81E0}, //13350 #CJK UNIFIED IDEOGRAPH + {0xF944, 0x81E1}, //13351 #CJK UNIFIED IDEOGRAPH + {0xF945, 0x8646}, //13352 #CJK UNIFIED IDEOGRAPH + {0xF946, 0x8647}, //13353 #CJK UNIFIED IDEOGRAPH + {0xF947, 0x8648}, //13354 #CJK UNIFIED IDEOGRAPH + {0xF948, 0x8979}, //13355 #CJK UNIFIED IDEOGRAPH + {0xF949, 0x897A}, //13356 #CJK UNIFIED IDEOGRAPH + {0xF94A, 0x897C}, //13357 #CJK UNIFIED IDEOGRAPH + {0xF94B, 0x897B}, //13358 #CJK UNIFIED IDEOGRAPH + {0xF94C, 0x89FF}, //13359 #CJK UNIFIED IDEOGRAPH + {0xF94D, 0x8B98}, //13360 #CJK UNIFIED IDEOGRAPH + {0xF94E, 0x8B99}, //13361 #CJK UNIFIED IDEOGRAPH + {0xF94F, 0x8EA5}, //13362 #CJK UNIFIED IDEOGRAPH + {0xF950, 0x8EA4}, //13363 #CJK UNIFIED IDEOGRAPH + {0xF951, 0x8EA3}, //13364 #CJK UNIFIED IDEOGRAPH + {0xF952, 0x946E}, //13365 #CJK UNIFIED IDEOGRAPH + {0xF953, 0x946D}, //13366 #CJK UNIFIED IDEOGRAPH + {0xF954, 0x946F}, //13367 #CJK UNIFIED IDEOGRAPH + {0xF955, 0x9471}, //13368 #CJK UNIFIED IDEOGRAPH + {0xF956, 0x9473}, //13369 #CJK UNIFIED IDEOGRAPH + {0xF957, 0x9749}, //13370 #CJK UNIFIED IDEOGRAPH + {0xF958, 0x9872}, //13371 #CJK UNIFIED IDEOGRAPH + {0xF959, 0x995F}, //13372 #CJK UNIFIED IDEOGRAPH + {0xF95A, 0x9C68}, //13373 #CJK UNIFIED IDEOGRAPH + {0xF95B, 0x9C6E}, //13374 #CJK UNIFIED IDEOGRAPH + {0xF95C, 0x9C6D}, //13375 #CJK UNIFIED IDEOGRAPH + {0xF95D, 0x9E0B}, //13376 #CJK UNIFIED IDEOGRAPH + {0xF95E, 0x9E0D}, //13377 #CJK UNIFIED IDEOGRAPH + {0xF95F, 0x9E10}, //13378 #CJK UNIFIED IDEOGRAPH + {0xF960, 0x9E0F}, //13379 #CJK UNIFIED IDEOGRAPH + {0xF961, 0x9E12}, //13380 #CJK UNIFIED IDEOGRAPH + {0xF962, 0x9E11}, //13381 #CJK UNIFIED IDEOGRAPH + {0xF963, 0x9EA1}, //13382 #CJK UNIFIED IDEOGRAPH + {0xF964, 0x9EF5}, //13383 #CJK UNIFIED IDEOGRAPH + {0xF965, 0x9F09}, //13384 #CJK UNIFIED IDEOGRAPH + {0xF966, 0x9F47}, //13385 #CJK UNIFIED IDEOGRAPH + {0xF967, 0x9F78}, //13386 #CJK UNIFIED IDEOGRAPH + {0xF968, 0x9F7B}, //13387 #CJK UNIFIED IDEOGRAPH + {0xF969, 0x9F7A}, //13388 #CJK UNIFIED IDEOGRAPH + {0xF96A, 0x9F79}, //13389 #CJK UNIFIED IDEOGRAPH + {0xF96B, 0x571E}, //13390 #CJK UNIFIED IDEOGRAPH + {0xF96C, 0x7066}, //13391 #CJK UNIFIED IDEOGRAPH + {0xF96D, 0x7C6F}, //13392 #CJK UNIFIED IDEOGRAPH + {0xF96E, 0x883C}, //13393 #CJK UNIFIED IDEOGRAPH + {0xF96F, 0x8DB2}, //13394 #CJK UNIFIED IDEOGRAPH + {0xF970, 0x8EA6}, //13395 #CJK UNIFIED IDEOGRAPH + {0xF971, 0x91C3}, //13396 #CJK UNIFIED IDEOGRAPH + {0xF972, 0x9474}, //13397 #CJK UNIFIED IDEOGRAPH + {0xF973, 0x9478}, //13398 #CJK UNIFIED IDEOGRAPH + {0xF974, 0x9476}, //13399 #CJK UNIFIED IDEOGRAPH + {0xF975, 0x9475}, //13400 #CJK UNIFIED IDEOGRAPH + {0xF976, 0x9A60}, //13401 #CJK UNIFIED IDEOGRAPH + {0xF977, 0x9C74}, //13402 #CJK UNIFIED IDEOGRAPH + {0xF978, 0x9C73}, //13403 #CJK UNIFIED IDEOGRAPH + {0xF979, 0x9C71}, //13404 #CJK UNIFIED IDEOGRAPH + {0xF97A, 0x9C75}, //13405 #CJK UNIFIED IDEOGRAPH + {0xF97B, 0x9E14}, //13406 #CJK UNIFIED IDEOGRAPH + {0xF97C, 0x9E13}, //13407 #CJK UNIFIED IDEOGRAPH + {0xF97D, 0x9EF6}, //13408 #CJK UNIFIED IDEOGRAPH + {0xF97E, 0x9F0A}, //13409 #CJK UNIFIED IDEOGRAPH + {0xF9A1, 0x9FA4}, //13410 #CJK UNIFIED IDEOGRAPH + {0xF9A2, 0x7068}, //13411 #CJK UNIFIED IDEOGRAPH + {0xF9A3, 0x7065}, //13412 #CJK UNIFIED IDEOGRAPH + {0xF9A4, 0x7CF7}, //13413 #CJK UNIFIED IDEOGRAPH + {0xF9A5, 0x866A}, //13414 #CJK UNIFIED IDEOGRAPH + {0xF9A6, 0x883E}, //13415 #CJK UNIFIED IDEOGRAPH + {0xF9A7, 0x883D}, //13416 #CJK UNIFIED IDEOGRAPH + {0xF9A8, 0x883F}, //13417 #CJK UNIFIED IDEOGRAPH + {0xF9A9, 0x8B9E}, //13418 #CJK UNIFIED IDEOGRAPH + {0xF9AA, 0x8C9C}, //13419 #CJK UNIFIED IDEOGRAPH + {0xF9AB, 0x8EA9}, //13420 #CJK UNIFIED IDEOGRAPH + {0xF9AC, 0x8EC9}, //13421 #CJK UNIFIED IDEOGRAPH + {0xF9AD, 0x974B}, //13422 #CJK UNIFIED IDEOGRAPH + {0xF9AE, 0x9873}, //13423 #CJK UNIFIED IDEOGRAPH + {0xF9AF, 0x9874}, //13424 #CJK UNIFIED IDEOGRAPH + {0xF9B0, 0x98CC}, //13425 #CJK UNIFIED IDEOGRAPH + {0xF9B1, 0x9961}, //13426 #CJK UNIFIED IDEOGRAPH + {0xF9B2, 0x99AB}, //13427 #CJK UNIFIED IDEOGRAPH + {0xF9B3, 0x9A64}, //13428 #CJK UNIFIED IDEOGRAPH + {0xF9B4, 0x9A66}, //13429 #CJK UNIFIED IDEOGRAPH + {0xF9B5, 0x9A67}, //13430 #CJK UNIFIED IDEOGRAPH + {0xF9B6, 0x9B24}, //13431 #CJK UNIFIED IDEOGRAPH + {0xF9B7, 0x9E15}, //13432 #CJK UNIFIED IDEOGRAPH + {0xF9B8, 0x9E17}, //13433 #CJK UNIFIED IDEOGRAPH + {0xF9B9, 0x9F48}, //13434 #CJK UNIFIED IDEOGRAPH + {0xF9BA, 0x6207}, //13435 #CJK UNIFIED IDEOGRAPH + {0xF9BB, 0x6B1E}, //13436 #CJK UNIFIED IDEOGRAPH + {0xF9BC, 0x7227}, //13437 #CJK UNIFIED IDEOGRAPH + {0xF9BD, 0x864C}, //13438 #CJK UNIFIED IDEOGRAPH + {0xF9BE, 0x8EA8}, //13439 #CJK UNIFIED IDEOGRAPH + {0xF9BF, 0x9482}, //13440 #CJK UNIFIED IDEOGRAPH + {0xF9C0, 0x9480}, //13441 #CJK UNIFIED IDEOGRAPH + {0xF9C1, 0x9481}, //13442 #CJK UNIFIED IDEOGRAPH + {0xF9C2, 0x9A69}, //13443 #CJK UNIFIED IDEOGRAPH + {0xF9C3, 0x9A68}, //13444 #CJK UNIFIED IDEOGRAPH + {0xF9C4, 0x9B2E}, //13445 #CJK UNIFIED IDEOGRAPH + {0xF9C5, 0x9E19}, //13446 #CJK UNIFIED IDEOGRAPH + {0xF9C6, 0x7229}, //13447 #CJK UNIFIED IDEOGRAPH + {0xF9C7, 0x864B}, //13448 #CJK UNIFIED IDEOGRAPH + {0xF9C8, 0x8B9F}, //13449 #CJK UNIFIED IDEOGRAPH + {0xF9C9, 0x9483}, //13450 #CJK UNIFIED IDEOGRAPH + {0xF9CA, 0x9C79}, //13451 #CJK UNIFIED IDEOGRAPH + {0xF9CB, 0x9EB7}, //13452 #CJK UNIFIED IDEOGRAPH + {0xF9CC, 0x7675}, //13453 #CJK UNIFIED IDEOGRAPH + {0xF9CD, 0x9A6B}, //13454 #CJK UNIFIED IDEOGRAPH + {0xF9CE, 0x9C7A}, //13455 #CJK UNIFIED IDEOGRAPH + {0xF9CF, 0x9E1D}, //13456 #CJK UNIFIED IDEOGRAPH + {0xF9D0, 0x7069}, //13457 #CJK UNIFIED IDEOGRAPH + {0xF9D1, 0x706A}, //13458 #CJK UNIFIED IDEOGRAPH + {0xF9D2, 0x9EA4}, //13459 #CJK UNIFIED IDEOGRAPH + {0xF9D3, 0x9F7E}, //13460 #CJK UNIFIED IDEOGRAPH + {0xF9D4, 0x9F49}, //13461 #CJK UNIFIED IDEOGRAPH + {0xF9D5, 0x9F98}, //13462 #CJK UNIFIED IDEOGRAPH + {0xF9D6, 0x7881}, //13463 #CJK UNIFIED IDEOGRAPH + {0xF9D7, 0x92B9}, //13464 #CJK UNIFIED IDEOGRAPH + {0xF9D8, 0x88CF}, //13465 #CJK UNIFIED IDEOGRAPH + {0xF9D9, 0x58BB}, //13466 #CJK UNIFIED IDEOGRAPH + {0xF9DA, 0x6052}, //13467 #CJK UNIFIED IDEOGRAPH + {0xF9DB, 0x7CA7}, //13468 #CJK UNIFIED IDEOGRAPH + {0xF9DC, 0x5AFA}, //13469 #CJK UNIFIED IDEOGRAPH + {0xF9DD, 0x2554}, //13470 #BOX DRAWINGS DOUBLE DOWN AND RIGHT + {0xF9DE, 0x2566}, //13471 #BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL + {0xF9DF, 0x2557}, //13472 #BOX DRAWINGS DOUBLE DOWN AND LEFT + {0xF9E0, 0x2560}, //13473 #BOX DRAWINGS DOUBLE VERTICAL AND RIGHT + {0xF9E1, 0x256C}, //13474 #BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL + {0xF9E2, 0x2563}, //13475 #BOX DRAWINGS DOUBLE VERTICAL AND LEFT + {0xF9E3, 0x255A}, //13476 #BOX DRAWINGS DOUBLE UP AND RIGHT + {0xF9E4, 0x2569}, //13477 #BOX DRAWINGS DOUBLE UP AND HORIZONTAL + {0xF9E5, 0x255D}, //13478 #BOX DRAWINGS DOUBLE UP AND LEFT + {0xF9E6, 0x2552}, //13479 #BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE + {0xF9E7, 0x2564}, //13480 #BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE + {0xF9E8, 0x2555}, //13481 #BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE + {0xF9E9, 0x255E}, //13482 #BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE + {0xF9EA, 0x256A}, //13483 #BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE + {0xF9EB, 0x2561}, //13484 #BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE + {0xF9EC, 0x2558}, //13485 #BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE + {0xF9ED, 0x2567}, //13486 #BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE + {0xF9EE, 0x255B}, //13487 #BOX DRAWINGS UP SINGLE AND LEFT DOUBLE + {0xF9EF, 0x2553}, //13488 #BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE + {0xF9F0, 0x2565}, //13489 #BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE + {0xF9F1, 0x2556}, //13490 #BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE + {0xF9F2, 0x255F}, //13491 #BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE + {0xF9F3, 0x256B}, //13492 #BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE + {0xF9F4, 0x2562}, //13493 #BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE + {0xF9F5, 0x2559}, //13494 #BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE + {0xF9F6, 0x2568}, //13495 #BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE + {0xF9F7, 0x255C}, //13496 #BOX DRAWINGS UP DOUBLE AND LEFT SINGLE + {0xF9F8, 0x2551}, //13497 #BOX DRAWINGS DOUBLE VERTICAL + {0xF9F9, 0x2550}, //13498 #BOX DRAWINGS DOUBLE HORIZONTAL + {0xF9FA, 0x256D}, //13499 #BOX DRAWINGS LIGHT ARC DOWN AND RIGHT + {0xF9FB, 0x256E}, //13500 #BOX DRAWINGS LIGHT ARC DOWN AND LEFT + {0xF9FC, 0x2570}, //13501 #BOX DRAWINGS LIGHT ARC UP AND RIGHT + {0xF9FD, 0x256F}, //13502 #BOX DRAWINGS LIGHT ARC UP AND LEFT + {0xF9FE, 0x2593}, //13503 #DARK SHADE +}; + +#endif // DRW_CPTABLE950_H diff --git a/lib_dxf/intern/drw_cptables.h b/lib_dxf/intern/drw_cptables.h new file mode 100644 index 0000000000..2f7d758e5d --- /dev/null +++ b/lib_dxf/intern/drw_cptables.h @@ -0,0 +1,1330 @@ +#ifndef DRW_CPTABLES_H +#define DRW_CPTABLES_H + +//first entry in all tables are 0x80 +#define CPOFFSET 0x80 +#define CPLENGHTCOMMON 128 + +//Table 874 +static const int DRW_Table874[] = { + 0x20AC, //1 #EURO SIGN + 0x00 , //2 #UNDEFINED + 0x00 , //3 #UNDEFINED + 0x00 , //4 #UNDEFINED + 0x00 , //5 #UNDEFINED + 0x2026, //6 #HORIZONTAL ELLIPSIS + 0x00 , //7 #UNDEFINED + 0x00 , //8 #UNDEFINED + 0x00 , //9 #UNDEFINED + 0x00 , //10 #UNDEFINED + 0x00 , //11 #UNDEFINED + 0x00 , //12 #UNDEFINED + 0x00 , //13 #UNDEFINED + 0x00 , //14 #UNDEFINED + 0x00 , //15 #UNDEFINED + 0x00 , //16 #UNDEFINED + 0x00 , //17 #UNDEFINED + 0x2018, //18 #LEFT SINGLE QUOTATION MARK + 0x2019, //19 #RIGHT SINGLE QUOTATION MARK + 0x201C, //20 #LEFT DOUBLE QUOTATION MARK + 0x201D, //21 #RIGHT DOUBLE QUOTATION MARK + 0x2022, //22 #BULLET + 0x2013, //23 #EN DASH + 0x2014, //24 #EM DASH + 0x00 , //25 #UNDEFINED + 0x00 , //26 #UNDEFINED + 0x00 , //27 #UNDEFINED + 0x00 , //28 #UNDEFINED + 0x00 , //29 #UNDEFINED + 0x00 , //30 #UNDEFINED + 0x00 , //31 #UNDEFINED + 0x00 , //32 #UNDEFINED + 0x00A0, //33 #NO-BREAK SPACE + 0x0E01, //34 #THAI CHARACTER KO KAI + 0x0E02, //35 #THAI CHARACTER KHO KHAI + 0x0E03, //36 #THAI CHARACTER KHO KHUAT + 0x0E04, //37 #THAI CHARACTER KHO KHWAI + 0x0E05, //38 #THAI CHARACTER KHO KHON + 0x0E06, //39 #THAI CHARACTER KHO RAKHANG + 0x0E07, //40 #THAI CHARACTER NGO NGU + 0x0E08, //41 #THAI CHARACTER CHO CHAN + 0x0E09, //42 #THAI CHARACTER CHO CHING + 0x0E0A, //43 #THAI CHARACTER CHO CHANG + 0x0E0B, //44 #THAI CHARACTER SO SO + 0x0E0C, //45 #THAI CHARACTER CHO CHOE + 0x0E0D, //46 #THAI CHARACTER YO YING + 0x0E0E, //47 #THAI CHARACTER DO CHADA + 0x0E0F, //48 #THAI CHARACTER TO PATAK + 0x0E10, //49 #THAI CHARACTER THO THAN + 0x0E11, //50 #THAI CHARACTER THO NANGMONTHO + 0x0E12, //51 #THAI CHARACTER THO PHUTHAO + 0x0E13, //52 #THAI CHARACTER NO NEN + 0x0E14, //53 #THAI CHARACTER DO DEK + 0x0E15, //54 #THAI CHARACTER TO TAO + 0x0E16, //55 #THAI CHARACTER THO THUNG + 0x0E17, //56 #THAI CHARACTER THO THAHAN + 0x0E18, //57 #THAI CHARACTER THO THONG + 0x0E19, //58 #THAI CHARACTER NO NU + 0x0E1A, //59 #THAI CHARACTER BO BAIMAI + 0x0E1B, //60 #THAI CHARACTER PO PLA + 0x0E1C, //61 #THAI CHARACTER PHO PHUNG + 0x0E1D, //62 #THAI CHARACTER FO FA + 0x0E1E, //63 #THAI CHARACTER PHO PHAN + 0x0E1F, //64 #THAI CHARACTER FO FAN + 0x0E20, //65 #THAI CHARACTER PHO SAMPHAO + 0x0E21, //66 #THAI CHARACTER MO MA + 0x0E22, //67 #THAI CHARACTER YO YAK + 0x0E23, //68 #THAI CHARACTER RO RUA + 0x0E24, //69 #THAI CHARACTER RU + 0x0E25, //70 #THAI CHARACTER LO LING + 0x0E26, //71 #THAI CHARACTER LU + 0x0E27, //72 #THAI CHARACTER WO WAEN + 0x0E28, //73 #THAI CHARACTER SO SALA + 0x0E29, //74 #THAI CHARACTER SO RUSI + 0x0E2A, //75 #THAI CHARACTER SO SUA + 0x0E2B, //76 #THAI CHARACTER HO HIP + 0x0E2C, //77 #THAI CHARACTER LO CHULA + 0x0E2D, //78 #THAI CHARACTER O ANG + 0x0E2E, //79 #THAI CHARACTER HO NOKHUK + 0x0E2F, //80 #THAI CHARACTER PAIYANNOI + 0x0E30, //81 #THAI CHARACTER SARA A + 0x0E31, //82 #THAI CHARACTER MAI HAN-AKAT + 0x0E32, //83 #THAI CHARACTER SARA AA + 0x0E33, //84 #THAI CHARACTER SARA AM + 0x0E34, //85 #THAI CHARACTER SARA I + 0x0E35, //86 #THAI CHARACTER SARA II + 0x0E36, //87 #THAI CHARACTER SARA UE + 0x0E37, //88 #THAI CHARACTER SARA UEE + 0x0E38, //89 #THAI CHARACTER SARA U + 0x0E39, //90 #THAI CHARACTER SARA UU + 0x0E3A, //91 #THAI CHARACTER PHINTHU + 0x00 , //92 #UNDEFINED + 0x00 , //93 #UNDEFINED + 0x00 , //94 #UNDEFINED + 0x00 , //95 #UNDEFINED + 0x0E3F, //96 #THAI CURRENCY SYMBOL BAHT + 0x0E40, //97 #THAI CHARACTER SARA E + 0x0E41, //98 #THAI CHARACTER SARA AE + 0x0E42, //99 #THAI CHARACTER SARA O + 0x0E43, //100 #THAI CHARACTER SARA AI MAIMUAN + 0x0E44, //101 #THAI CHARACTER SARA AI MAIMALAI + 0x0E45, //102 #THAI CHARACTER LAKKHANGYAO + 0x0E46, //103 #THAI CHARACTER MAIYAMOK + 0x0E47, //104 #THAI CHARACTER MAITAIKHU + 0x0E48, //105 #THAI CHARACTER MAI EK + 0x0E49, //106 #THAI CHARACTER MAI THO + 0x0E4A, //107 #THAI CHARACTER MAI TRI + 0x0E4B, //108 #THAI CHARACTER MAI CHATTAWA + 0x0E4C, //109 #THAI CHARACTER THANTHAKHAT + 0x0E4D, //110 #THAI CHARACTER NIKHAHIT + 0x0E4E, //111 #THAI CHARACTER YAMAKKAN + 0x0E4F, //112 #THAI CHARACTER FONGMAN + 0x0E50, //113 #THAI DIGIT ZERO + 0x0E51, //114 #THAI DIGIT ONE + 0x0E52, //115 #THAI DIGIT TWO + 0x0E53, //116 #THAI DIGIT THREE + 0x0E54, //117 #THAI DIGIT FOUR + 0x0E55, //118 #THAI DIGIT FIVE + 0x0E56, //119 #THAI DIGIT SIX + 0x0E57, //120 #THAI DIGIT SEVEN + 0x0E58, //121 #THAI DIGIT EIGHT + 0x0E59, //122 #THAI DIGIT NINE + 0x0E5A, //123 #THAI CHARACTER ANGKHANKHU + 0x0E5B, //124 #THAI CHARACTER KHOMUT + 0x00 , //125 #UNDEFINED + 0x00 , //126 #UNDEFINED + 0x00 , //127 #UNDEFINED + 0x00 //128 #UNDEFINED +}; + +//Table 1250 +static const int DRW_Table1250[] = { +0x20AC, //1 #EURO SIGN +0x00, //2 #UNDEFINED +0x201A, //3 #SINGLE LOW-9 QUOTATION MARK +0x00, //4 #UNDEFINED +0x201E, //5 #DOUBLE LOW-9 QUOTATION MARK +0x2026, //6 #HORIZONTAL ELLIPSIS +0x2020, //7 #DAGGER +0x2021, //8 #DOUBLE DAGGER +0x00, //9 #UNDEFINED +0x2030, //10 #PER MILLE SIGN +0x0160, //11 #LATIN CAPITAL LETTER S WITH CARON +0x2039, //12 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK +0x015A, //13 #LATIN CAPITAL LETTER S WITH ACUTE +0x0164, //14 #LATIN CAPITAL LETTER T WITH CARON +0x017D, //15 #LATIN CAPITAL LETTER Z WITH CARON +0x0179, //16 #LATIN CAPITAL LETTER Z WITH ACUTE +0x00, //17 #UNDEFINED +0x2018, //18 #LEFT SINGLE QUOTATION MARK +0x2019, //19 #RIGHT SINGLE QUOTATION MARK +0x201C, //20 #LEFT DOUBLE QUOTATION MARK +0x201D, //21 #RIGHT DOUBLE QUOTATION MARK +0x2022, //22 #BULLET +0x2013, //23 #EN DASH +0x2014, //24 #EM DASH +0x00, //25 #UNDEFINED +0x2122, //26 #TRADE MARK SIGN +0x0161, //27 #LATIN SMALL LETTER S WITH CARON +0x203A, //28 #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK +0x015B, //29 #LATIN SMALL LETTER S WITH ACUTE +0x0165, //30 #LATIN SMALL LETTER T WITH CARON +0x017E, //31 #LATIN SMALL LETTER Z WITH CARON +0x017A, //32 #LATIN SMALL LETTER Z WITH ACUTE +0x00A0, //33 #NO-BREAK SPACE +0x02C7, //34 #CARON +0x02D8, //35 #BREVE +0x0141, //36 #LATIN CAPITAL LETTER L WITH STROKE +0x00A4, //37 #CURRENCY SIGN +0x0104, //38 #LATIN CAPITAL LETTER A WITH OGONEK +0x00A6, //39 #BROKEN BAR +0x00A7, //40 #SECTION SIGN +0x00A8, //41 #DIAERESIS +0x00A9, //42 #COPYRIGHT SIGN +0x015E, //43 #LATIN CAPITAL LETTER S WITH CEDILLA +0x00AB, //44 #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK +0x00AC, //45 #NOT SIGN +0x00AD, //46 #SOFT HYPHEN +0x00AE, //47 #REGISTERED SIGN +0x017B, //48 #LATIN CAPITAL LETTER Z WITH DOT ABOVE +0x00B0, //49 #DEGREE SIGN +0x00B1, //50 #PLUS-MINUS SIGN +0x02DB, //51 #OGONEK +0x0142, //52 #LATIN SMALL LETTER L WITH STROKE +0x00B4, //53 #ACUTE ACCENT +0x00B5, //54 #MICRO SIGN +0x00B6, //55 #PILCROW SIGN +0x00B7, //56 #MIDDLE DOT +0x00B8, //57 #CEDILLA +0x0105, //58 #LATIN SMALL LETTER A WITH OGONEK +0x015F, //59 #LATIN SMALL LETTER S WITH CEDILLA +0x00BB, //60 #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK +0x013D, //61 #LATIN CAPITAL LETTER L WITH CARON +0x02DD, //62 #DOUBLE ACUTE ACCENT +0x013E, //63 #LATIN SMALL LETTER L WITH CARON +0x017C, //64 #LATIN SMALL LETTER Z WITH DOT ABOVE +0x0154, //65 #LATIN CAPITAL LETTER R WITH ACUTE +0x00C1, //66 #LATIN CAPITAL LETTER A WITH ACUTE +0x00C2, //67 #LATIN CAPITAL LETTER A WITH CIRCUMFLEX +0x0102, //68 #LATIN CAPITAL LETTER A WITH BREVE +0x00C4, //69 #LATIN CAPITAL LETTER A WITH DIAERESIS +0x0139, //70 #LATIN CAPITAL LETTER L WITH ACUTE +0x0106, //71 #LATIN CAPITAL LETTER C WITH ACUTE +0x00C7, //72 #LATIN CAPITAL LETTER C WITH CEDILLA +0x010C, //73 #LATIN CAPITAL LETTER C WITH CARON +0x00C9, //74 #LATIN CAPITAL LETTER E WITH ACUTE +0x0118, //75 #LATIN CAPITAL LETTER E WITH OGONEK +0x00CB, //76 #LATIN CAPITAL LETTER E WITH DIAERESIS +0x011A, //77 #LATIN CAPITAL LETTER E WITH CARON +0x00CD, //78 #LATIN CAPITAL LETTER I WITH ACUTE +0x00CE, //79 #LATIN CAPITAL LETTER I WITH CIRCUMFLEX +0x010E, //80 #LATIN CAPITAL LETTER D WITH CARON +0x0110, //81 #LATIN CAPITAL LETTER D WITH STROKE +0x0143, //82 #LATIN CAPITAL LETTER N WITH ACUTE +0x0147, //83 #LATIN CAPITAL LETTER N WITH CARON +0x00D3, //84 #LATIN CAPITAL LETTER O WITH ACUTE +0x00D4, //85 #LATIN CAPITAL LETTER O WITH CIRCUMFLEX +0x0150, //86 #LATIN CAPITAL LETTER O WITH DOUBLE ACUTE +0x00D6, //87 #LATIN CAPITAL LETTER O WITH DIAERESIS +0x00D7, //88 #MULTIPLICATION SIGN +0x0158, //89 #LATIN CAPITAL LETTER R WITH CARON +0x016E, //90 #LATIN CAPITAL LETTER U WITH RING ABOVE +0x00DA, //91 #LATIN CAPITAL LETTER U WITH ACUTE +0x0170, //92 #LATIN CAPITAL LETTER U WITH DOUBLE ACUTE +0x00DC, //93 #LATIN CAPITAL LETTER U WITH DIAERESIS +0x00DD, //94 #LATIN CAPITAL LETTER Y WITH ACUTE +0x0162, //95 #LATIN CAPITAL LETTER T WITH CEDILLA +0x00DF, //96 #LATIN SMALL LETTER SHARP S +0x0155, //97 #LATIN SMALL LETTER R WITH ACUTE +0x00E1, //98 #LATIN SMALL LETTER A WITH ACUTE +0x00E2, //99 #LATIN SMALL LETTER A WITH CIRCUMFLEX +0x0103, //100 #LATIN SMALL LETTER A WITH BREVE +0x00E4, //101 #LATIN SMALL LETTER A WITH DIAERESIS +0x013A, //102 #LATIN SMALL LETTER L WITH ACUTE +0x0107, //103 #LATIN SMALL LETTER C WITH ACUTE +0x00E7, //104 #LATIN SMALL LETTER C WITH CEDILLA +0x010D, //105 #LATIN SMALL LETTER C WITH CARON +0x00E9, //106 #LATIN SMALL LETTER E WITH ACUTE +0x0119, //107 #LATIN SMALL LETTER E WITH OGONEK +0x00EB, //108 #LATIN SMALL LETTER E WITH DIAERESIS +0x011B, //109 #LATIN SMALL LETTER E WITH CARON +0x00ED, //110 #LATIN SMALL LETTER I WITH ACUTE +0x00EE, //111 #LATIN SMALL LETTER I WITH CIRCUMFLEX +0x010F, //112 #LATIN SMALL LETTER D WITH CARON +0x0111, //113 #LATIN SMALL LETTER D WITH STROKE +0x0144, //114 #LATIN SMALL LETTER N WITH ACUTE +0x0148, //115 #LATIN SMALL LETTER N WITH CARON +0x00F3, //116 #LATIN SMALL LETTER O WITH ACUTE +0x00F4, //117 #LATIN SMALL LETTER O WITH CIRCUMFLEX +0x0151, //118 #LATIN SMALL LETTER O WITH DOUBLE ACUTE +0x00F6, //119 #LATIN SMALL LETTER O WITH DIAERESIS +0x00F7, //120 #DIVISION SIGN +0x0159, //121 #LATIN SMALL LETTER R WITH CARON +0x016F, //122 #LATIN SMALL LETTER U WITH RING ABOVE +0x00FA, //123 #LATIN SMALL LETTER U WITH ACUTE +0x0171, //124 #LATIN SMALL LETTER U WITH DOUBLE ACUTE +0x00FC, //125 #LATIN SMALL LETTER U WITH DIAERESIS +0x00FD, //126 #LATIN SMALL LETTER Y WITH ACUTE +0x0163, //127 #LATIN SMALL LETTER T WITH CEDILLA +0x02D9 //128 #DOT ABOVE +}; + + +//Table 1251 +static const int DRW_Table1251[] = { + 0x0402, //1 #CYRILLIC CAPITAL LETTER DJE + 0x0403, //2 #CYRILLIC CAPITAL LETTER GJE + 0x201A, //3 #SINGLE LOW-9 QUOTATION MARK + 0x0453, //4 #CYRILLIC SMALL LETTER GJE + 0x201E, //5 #DOUBLE LOW-9 QUOTATION MARK + 0x2026, //6 #HORIZONTAL ELLIPSIS + 0x2020, //7 #DAGGER + 0x2021, //8 #DOUBLE DAGGER + 0x20AC, //9 #EURO SIGN + 0x2030, //10 #PER MILLE SIGN + 0x0409, //11 #CYRILLIC CAPITAL LETTER LJE + 0x2039, //12 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK + 0x040A, //13 #CYRILLIC CAPITAL LETTER NJE + 0x040C, //14 #CYRILLIC CAPITAL LETTER KJE + 0x040B, //15 #CYRILLIC CAPITAL LETTER TSHE + 0x040F, //16 #CYRILLIC CAPITAL LETTER DZHE + 0x0452, //17 #CYRILLIC SMALL LETTER DJE + 0x2018, //18 #LEFT SINGLE QUOTATION MARK + 0x2019, //19 #RIGHT SINGLE QUOTATION MARK + 0x201C, //20 #LEFT DOUBLE QUOTATION MARK + 0x201D, //21 #RIGHT DOUBLE QUOTATION MARK + 0x2022, //22 #BULLET + 0x2013, //23 #EN DASH + 0x2014, //24 #EM DASH + 0x00, //25 #UNDEFINED + 0x2122, //26 #TRADE MARK SIGN + 0x0459, //27 #CYRILLIC SMALL LETTER LJE + 0x203A, //28 #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + 0x045A, //29 #CYRILLIC SMALL LETTER NJE + 0x045C, //30 #CYRILLIC SMALL LETTER KJE + 0x045B, //31 #CYRILLIC SMALL LETTER TSHE + 0x045F, //32 #CYRILLIC SMALL LETTER DZHE + 0x00A0, //33 #NO-BREAK SPACE + 0x040E, //34 #CYRILLIC CAPITAL LETTER SHORT U + 0x045E, //35 #CYRILLIC SMALL LETTER SHORT U + 0x0408, //36 #CYRILLIC CAPITAL LETTER JE + 0x00A4, //37 #CURRENCY SIGN + 0x0490, //38 #CYRILLIC CAPITAL LETTER GHE WITH UPTURN + 0x00A6, //39 #BROKEN BAR + 0x00A7, //40 #SECTION SIGN + 0x0401, //41 #CYRILLIC CAPITAL LETTER IO + 0x00A9, //42 #COPYRIGHT SIGN + 0x0404, //43 #CYRILLIC CAPITAL LETTER UKRAINIAN IE + 0x00AB, //44 #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + 0x00AC, //45 #NOT SIGN + 0x00AD, //46 #SOFT HYPHEN + 0x00AE, //47 #REGISTERED SIGN + 0x0407, //48 #CYRILLIC CAPITAL LETTER YI + 0x00B0, //49 #DEGREE SIGN + 0x00B1, //50 #PLUS-MINUS SIGN + 0x0406, //51 #CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I + 0x0456, //52 #CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I + 0x0491, //53 #CYRILLIC SMALL LETTER GHE WITH UPTURN + 0x00B5, //54 #MICRO SIGN + 0x00B6, //55 #PILCROW SIGN + 0x00B7, //56 #MIDDLE DOT + 0x0451, //57 #CYRILLIC SMALL LETTER IO + 0x2116, //58 #NUMERO SIGN + 0x0454, //59 #CYRILLIC SMALL LETTER UKRAINIAN IE + 0x00BB, //60 #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + 0x0458, //61 #CYRILLIC SMALL LETTER JE + 0x0405, //62 #CYRILLIC CAPITAL LETTER DZE + 0x0455, //63 #CYRILLIC SMALL LETTER DZE + 0x0457, //64 #CYRILLIC SMALL LETTER YI + 0x0410, //65 #CYRILLIC CAPITAL LETTER A + 0x0411, //66 #CYRILLIC CAPITAL LETTER BE + 0x0412, //67 #CYRILLIC CAPITAL LETTER VE + 0x0413, //68 #CYRILLIC CAPITAL LETTER GHE + 0x0414, //69 #CYRILLIC CAPITAL LETTER DE + 0x0415, //70 #CYRILLIC CAPITAL LETTER IE + 0x0416, //71 #CYRILLIC CAPITAL LETTER ZHE + 0x0417, //72 #CYRILLIC CAPITAL LETTER ZE + 0x0418, //73 #CYRILLIC CAPITAL LETTER I + 0x0419, //74 #CYRILLIC CAPITAL LETTER SHORT I + 0x041A, //75 #CYRILLIC CAPITAL LETTER KA + 0x041B, //76 #CYRILLIC CAPITAL LETTER EL + 0x041C, //77 #CYRILLIC CAPITAL LETTER EM + 0x041D, //78 #CYRILLIC CAPITAL LETTER EN + 0x041E, //79 #CYRILLIC CAPITAL LETTER O + 0x041F, //80 #CYRILLIC CAPITAL LETTER PE + 0x0420, //81 #CYRILLIC CAPITAL LETTER ER + 0x0421, //82 #CYRILLIC CAPITAL LETTER ES + 0x0422, //83 #CYRILLIC CAPITAL LETTER TE + 0x0423, //84 #CYRILLIC CAPITAL LETTER U + 0x0424, //85 #CYRILLIC CAPITAL LETTER EF + 0x0425, //86 #CYRILLIC CAPITAL LETTER HA + 0x0426, //87 #CYRILLIC CAPITAL LETTER TSE + 0x0427, //88 #CYRILLIC CAPITAL LETTER CHE + 0x0428, //89 #CYRILLIC CAPITAL LETTER SHA + 0x0429, //90 #CYRILLIC CAPITAL LETTER SHCHA + 0x042A, //91 #CYRILLIC CAPITAL LETTER HARD SIGN + 0x042B, //92 #CYRILLIC CAPITAL LETTER YERU + 0x042C, //93 #CYRILLIC CAPITAL LETTER SOFT SIGN + 0x042D, //94 #CYRILLIC CAPITAL LETTER E + 0x042E, //95 #CYRILLIC CAPITAL LETTER YU + 0x042F, //96 #CYRILLIC CAPITAL LETTER YA + 0x0430, //97 #CYRILLIC SMALL LETTER A + 0x0431, //98 #CYRILLIC SMALL LETTER BE + 0x0432, //99 #CYRILLIC SMALL LETTER VE + 0x0433, //100 #CYRILLIC SMALL LETTER GHE + 0x0434, //101 #CYRILLIC SMALL LETTER DE + 0x0435, //102 #CYRILLIC SMALL LETTER IE + 0x0436, //103 #CYRILLIC SMALL LETTER ZHE + 0x0437, //104 #CYRILLIC SMALL LETTER ZE + 0x0438, //105 #CYRILLIC SMALL LETTER I + 0x0439, //106 #CYRILLIC SMALL LETTER SHORT I + 0x043A, //107 #CYRILLIC SMALL LETTER KA + 0x043B, //108 #CYRILLIC SMALL LETTER EL + 0x043C, //109 #CYRILLIC SMALL LETTER EM + 0x043D, //110 #CYRILLIC SMALL LETTER EN + 0x043E, //111 #CYRILLIC SMALL LETTER O + 0x043F, //112 #CYRILLIC SMALL LETTER PE + 0x0440, //113 #CYRILLIC SMALL LETTER ER + 0x0441, //114 #CYRILLIC SMALL LETTER ES + 0x0442, //115 #CYRILLIC SMALL LETTER TE + 0x0443, //116 #CYRILLIC SMALL LETTER U + 0x0444, //117 #CYRILLIC SMALL LETTER EF + 0x0445, //118 #CYRILLIC SMALL LETTER HA + 0x0446, //119 #CYRILLIC SMALL LETTER TSE + 0x0447, //120 #CYRILLIC SMALL LETTER CHE + 0x0448, //121 #CYRILLIC SMALL LETTER SHA + 0x0449, //122 #CYRILLIC SMALL LETTER SHCHA + 0x044A, //123 #CYRILLIC SMALL LETTER HARD SIGN + 0x044B, //124 #CYRILLIC SMALL LETTER YERU + 0x044C, //125 #CYRILLIC SMALL LETTER SOFT SIGN + 0x044D, //126 #CYRILLIC SMALL LETTER E + 0x044E, //127 #CYRILLIC SMALL LETTER YU + 0x044F //128 #CYRILLIC SMALL LETTER YA +}; + + +//Table 1252 +static const int DRW_Table1252[] = { + 0x20AC, //1 #EURO SIGN + 0x00, //2 #UNDEFINED + 0x201A, //3 #SINGLE LOW-9 QUOTATION MARK + 0x0192, //4 #LATIN SMALL LETTER F WITH HOOK + 0x201E, //5 #DOUBLE LOW-9 QUOTATION MARK + 0x2026, //6 #HORIZONTAL ELLIPSIS + 0x2020, //7 #DAGGER + 0x2021, //8 #DOUBLE DAGGER + 0x02C6, //9 #MODIFIER LETTER CIRCUMFLEX ACCENT + 0x2030, //10 #PER MILLE SIGN + 0x0160, //11 #LATIN CAPITAL LETTER S WITH CARON + 0x2039, //12 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK + 0x0152, //13 #LATIN CAPITAL LIGATURE OE + 0x00, //14 #UNDEFINED + 0x017D, //15 #LATIN CAPITAL LETTER Z WITH CARON + 0x00, //16 #UNDEFINED + 0x00, //17 #UNDEFINED + 0x2018, //18 #LEFT SINGLE QUOTATION MARK + 0x2019, //19 #RIGHT SINGLE QUOTATION MARK + 0x201C, //20 #LEFT DOUBLE QUOTATION MARK + 0x201D, //21 #RIGHT DOUBLE QUOTATION MARK + 0x2022, //22 #BULLET + 0x2013, //23 #EN DASH + 0x2014, //24 #EM DASH + 0x02DC, //25 #SMALL TILDE + 0x2122, //26 #TRADE MARK SIGN + 0x0161, //27 #LATIN SMALL LETTER S WITH CARON + 0x203A, //28 #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + 0x0153, //29 #LATIN SMALL LIGATURE OE + 0x00, //30 #UNDEFINED + 0x017E, //31 #LATIN SMALL LETTER Z WITH CARON + 0x0178, //32 #LATIN CAPITAL LETTER Y WITH DIAERESIS + 0x00A0, //33 #NO-BREAK SPACE + 0x00A1, //34 #INVERTED EXCLAMATION MARK + 0x00A2, //35 #CENT SIGN + 0x00A3, //36 #POUND SIGN + 0x00A4, //37 #CURRENCY SIGN + 0x00A5, //38 #YEN SIGN + 0x00A6, //39 #BROKEN BAR + 0x00A7, //40 #SECTION SIGN + 0x00A8, //41 #DIAERESIS + 0x00A9, //42 #COPYRIGHT SIGN + 0x00AA, //43 #FEMININE ORDINAL INDICATOR + 0x00AB, //44 #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + 0x00AC, //45 #NOT SIGN + 0x00AD, //46 #SOFT HYPHEN + 0x00AE, //47 #REGISTERED SIGN + 0x00AF, //48 #MACRON + 0x00B0, //49 #DEGREE SIGN + 0x00B1, //50 #PLUS-MINUS SIGN + 0x00B2, //51 #SUPERSCRIPT TWO + 0x00B3, //52 #SUPERSCRIPT THREE + 0x00B4, //53 #ACUTE ACCENT + 0x00B5, //54 #MICRO SIGN + 0x00B6, //55 #PILCROW SIGN + 0x00B7, //56 #MIDDLE DOT + 0x00B8, //57 #CEDILLA + 0x00B9, //58 #SUPERSCRIPT ONE + 0x00BA, //59 #MASCULINE ORDINAL INDICATOR + 0x00BB, //60 #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + 0x00BC, //61 #VULGAR FRACTION ONE QUARTER + 0x00BD, //62 #VULGAR FRACTION ONE HALF + 0x00BE, //63 #VULGAR FRACTION THREE QUARTERS + 0x00BF, //64 #INVERTED QUESTION MARK + 0x00C0, //65 #LATIN CAPITAL LETTER A WITH GRAVE + 0x00C1, //66 #LATIN CAPITAL LETTER A WITH ACUTE + 0x00C2, //67 #LATIN CAPITAL LETTER A WITH CIRCUMFLEX + 0x00C3, //68 #LATIN CAPITAL LETTER A WITH TILDE + 0x00C4, //69 #LATIN CAPITAL LETTER A WITH DIAERESIS + 0x00C5, //70 #LATIN CAPITAL LETTER A WITH RING ABOVE + 0x00C6, //71 #LATIN CAPITAL LETTER AE + 0x00C7, //72 #LATIN CAPITAL LETTER C WITH CEDILLA + 0x00C8, //73 #LATIN CAPITAL LETTER E WITH GRAVE + 0x00C9, //74 #LATIN CAPITAL LETTER E WITH ACUTE + 0x00CA, //75 #LATIN CAPITAL LETTER E WITH CIRCUMFLEX + 0x00CB, //76 #LATIN CAPITAL LETTER E WITH DIAERESIS + 0x00CC, //77 #LATIN CAPITAL LETTER I WITH GRAVE + 0x00CD, //78 #LATIN CAPITAL LETTER I WITH ACUTE + 0x00CE, //79 #LATIN CAPITAL LETTER I WITH CIRCUMFLEX + 0x00CF, //80 #LATIN CAPITAL LETTER I WITH DIAERESIS + 0x00D0, //81 #LATIN CAPITAL LETTER ETH + 0x00D1, //82 #LATIN CAPITAL LETTER N WITH TILDE + 0x00D2, //83 #LATIN CAPITAL LETTER O WITH GRAVE + 0x00D3, //84 #LATIN CAPITAL LETTER O WITH ACUTE + 0x00D4, //85 #LATIN CAPITAL LETTER O WITH CIRCUMFLEX + 0x00D5, //86 #LATIN CAPITAL LETTER O WITH TILDE + 0x00D6, //87 #LATIN CAPITAL LETTER O WITH DIAERESIS + 0x00D7, //88 #MULTIPLICATION SIGN + 0x00D8, //89 #LATIN CAPITAL LETTER O WITH STROKE + 0x00D9, //90 #LATIN CAPITAL LETTER U WITH GRAVE + 0x00DA, //91 #LATIN CAPITAL LETTER U WITH ACUTE + 0x00DB, //92 #LATIN CAPITAL LETTER U WITH CIRCUMFLEX + 0x00DC, //93 #LATIN CAPITAL LETTER U WITH DIAERESIS + 0x00DD, //94 #LATIN CAPITAL LETTER Y WITH ACUTE + 0x00DE, //95 #LATIN CAPITAL LETTER THORN + 0x00DF, //96 #LATIN SMALL LETTER SHARP S + 0x00E0, //97 #LATIN SMALL LETTER A WITH GRAVE + 0x00E1, //98 #LATIN SMALL LETTER A WITH ACUTE + 0x00E2, //99 #LATIN SMALL LETTER A WITH CIRCUMFLEX + 0x00E3, //100 #LATIN SMALL LETTER A WITH TILDE + 0x00E4, //101 #LATIN SMALL LETTER A WITH DIAERESIS + 0x00E5, //102 #LATIN SMALL LETTER A WITH RING ABOVE + 0x00E6, //103 #LATIN SMALL LETTER AE + 0x00E7, //104 #LATIN SMALL LETTER C WITH CEDILLA + 0x00E8, //105 #LATIN SMALL LETTER E WITH GRAVE + 0x00E9, //106 #LATIN SMALL LETTER E WITH ACUTE + 0x00EA, //107 #LATIN SMALL LETTER E WITH CIRCUMFLEX + 0x00EB, //108 #LATIN SMALL LETTER E WITH DIAERESIS + 0x00EC, //109 #LATIN SMALL LETTER I WITH GRAVE + 0x00ED, //110 #LATIN SMALL LETTER I WITH ACUTE + 0x00EE, //111 #LATIN SMALL LETTER I WITH CIRCUMFLEX + 0x00EF, //112 #LATIN SMALL LETTER I WITH DIAERESIS + 0x00F0, //113 #LATIN SMALL LETTER ETH + 0x00F1, //114 #LATIN SMALL LETTER N WITH TILDE + 0x00F2, //115 #LATIN SMALL LETTER O WITH GRAVE + 0x00F3, //116 #LATIN SMALL LETTER O WITH ACUTE + 0x00F4, //117 #LATIN SMALL LETTER O WITH CIRCUMFLEX + 0x00F5, //118 #LATIN SMALL LETTER O WITH TILDE + 0x00F6, //119 #LATIN SMALL LETTER O WITH DIAERESIS + 0x00F7, //120 #DIVISION SIGN + 0x00F8, //121 #LATIN SMALL LETTER O WITH STROKE + 0x00F9, //122 #LATIN SMALL LETTER U WITH GRAVE + 0x00FA, //123 #LATIN SMALL LETTER U WITH ACUTE + 0x00FB, //124 #LATIN SMALL LETTER U WITH CIRCUMFLEX + 0x00FC, //125 #LATIN SMALL LETTER U WITH DIAERESIS + 0x00FD, //126 #LATIN SMALL LETTER Y WITH ACUTE + 0x00FE, //127 #LATIN SMALL LETTER THORN + 0x00FF //128 #LATIN SMALL LETTER Y WITH DIAERESIS +}; + +//Table 1253 +static const int DRW_Table1253[] = { + 0x20AC, //1 #EURO SIGN + 0x00 , //2 #UNDEFINED + 0x201A, //3 #SINGLE LOW-9 QUOTATION MARK + 0x0192, //4 #LATIN SMALL LETTER F WITH HOOK + 0x201E, //5 #DOUBLE LOW-9 QUOTATION MARK + 0x2026, //6 #HORIZONTAL ELLIPSIS + 0x2020, //7 #DAGGER + 0x2021, //8 #DOUBLE DAGGER + 0x00 , //9 #UNDEFINED + 0x2030, //10 #PER MILLE SIGN + 0x00 , //11 #UNDEFINED + 0x2039, //12 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK + 0x00 , //13 #UNDEFINED + 0x00 , //14 #UNDEFINED + 0x00 , //15 #UNDEFINED + 0x00 , //16 #UNDEFINED + 0x00 , //17 #UNDEFINED + 0x2018, //18 #LEFT SINGLE QUOTATION MARK + 0x2019, //19 #RIGHT SINGLE QUOTATION MARK + 0x201C, //20 #LEFT DOUBLE QUOTATION MARK + 0x201D, //21 #RIGHT DOUBLE QUOTATION MARK + 0x2022, //22 #BULLET + 0x2013, //23 #EN DASH + 0x2014, //24 #EM DASH + 0x00 , //25 #UNDEFINED + 0x2122, //26 #TRADE MARK SIGN + 0x00 , //27 #UNDEFINED + 0x203A, //28 #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + 0x00 , //29 #UNDEFINED + 0x00 , //30 #UNDEFINED + 0x00 , //31 #UNDEFINED + 0x00 , //32 #UNDEFINED + 0x00A0, //33 #NO-BREAK SPACE + 0x0385, //34 #GREEK DIALYTIKA TONOS + 0x0386, //35 #GREEK CAPITAL LETTER ALPHA WITH TONOS + 0x00A3, //36 #POUND SIGN + 0x00A4, //37 #CURRENCY SIGN + 0x00A5, //38 #YEN SIGN + 0x00A6, //39 #BROKEN BAR + 0x00A7, //40 #SECTION SIGN + 0x00A8, //41 #DIAERESIS + 0x00A9, //42 #COPYRIGHT SIGN + 0x00 , //43 #UNDEFINED + 0x00AB, //44 #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + 0x00AC, //45 #NOT SIGN + 0x00AD, //46 #SOFT HYPHEN + 0x00AE, //47 #REGISTERED SIGN + 0x2015, //48 #HORIZONTAL BAR + 0x00B0, //49 #DEGREE SIGN + 0x00B1, //50 #PLUS-MINUS SIGN + 0x00B2, //51 #SUPERSCRIPT TWO + 0x00B3, //52 #SUPERSCRIPT THREE + 0x0384, //53 #GREEK TONOS + 0x00B5, //54 #MICRO SIGN + 0x00B6, //55 #PILCROW SIGN + 0x00B7, //56 #MIDDLE DOT + 0x0388, //57 #GREEK CAPITAL LETTER EPSILON WITH TONOS + 0x0389, //58 #GREEK CAPITAL LETTER ETA WITH TONOS + 0x038A, //59 #GREEK CAPITAL LETTER IOTA WITH TONOS + 0x00BB, //60 #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + 0x038C, //61 #GREEK CAPITAL LETTER OMICRON WITH TONOS + 0x00BD, //62 #VULGAR FRACTION ONE HALF + 0x038E, //63 #GREEK CAPITAL LETTER UPSILON WITH TONOS + 0x038F, //64 #GREEK CAPITAL LETTER OMEGA WITH TONOS + 0x0390, //65 #GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS + 0x0391, //66 #GREEK CAPITAL LETTER ALPHA + 0x0392, //67 #GREEK CAPITAL LETTER BETA + 0x0393, //68 #GREEK CAPITAL LETTER GAMMA + 0x0394, //69 #GREEK CAPITAL LETTER DELTA + 0x0395, //70 #GREEK CAPITAL LETTER EPSILON + 0x0396, //71 #GREEK CAPITAL LETTER ZETA + 0x0397, //72 #GREEK CAPITAL LETTER ETA + 0x0398, //73 #GREEK CAPITAL LETTER THETA + 0x0399, //74 #GREEK CAPITAL LETTER IOTA + 0x039A, //75 #GREEK CAPITAL LETTER KAPPA + 0x039B, //76 #GREEK CAPITAL LETTER LAMDA + 0x039C, //77 #GREEK CAPITAL LETTER MU + 0x039D, //78 #GREEK CAPITAL LETTER NU + 0x039E, //79 #GREEK CAPITAL LETTER XI + 0x039F, //80 #GREEK CAPITAL LETTER OMICRON + 0x03A0, //81 #GREEK CAPITAL LETTER PI + 0x03A1, //82 #GREEK CAPITAL LETTER RHO + 0x00 , //83 #UNDEFINED + 0x03A3, //84 #GREEK CAPITAL LETTER SIGMA + 0x03A4, //85 #GREEK CAPITAL LETTER TAU + 0x03A5, //86 #GREEK CAPITAL LETTER UPSILON + 0x03A6, //87 #GREEK CAPITAL LETTER PHI + 0x03A7, //88 #GREEK CAPITAL LETTER CHI + 0x03A8, //89 #GREEK CAPITAL LETTER PSI + 0x03A9, //90 #GREEK CAPITAL LETTER OMEGA + 0x03AA, //91 #GREEK CAPITAL LETTER IOTA WITH DIALYTIKA + 0x03AB, //92 #GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA + 0x03AC, //93 #GREEK SMALL LETTER ALPHA WITH TONOS + 0x03AD, //94 #GREEK SMALL LETTER EPSILON WITH TONOS + 0x03AE, //95 #GREEK SMALL LETTER ETA WITH TONOS + 0x03AF, //96 #GREEK SMALL LETTER IOTA WITH TONOS + 0x03B0, //97 #GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS + 0x03B1, //98 #GREEK SMALL LETTER ALPHA + 0x03B2, //99 #GREEK SMALL LETTER BETA + 0x03B3, //100 #GREEK SMALL LETTER GAMMA + 0x03B4, //101 #GREEK SMALL LETTER DELTA + 0x03B5, //102 #GREEK SMALL LETTER EPSILON + 0x03B6, //103 #GREEK SMALL LETTER ZETA + 0x03B7, //104 #GREEK SMALL LETTER ETA + 0x03B8, //105 #GREEK SMALL LETTER THETA + 0x03B9, //106 #GREEK SMALL LETTER IOTA + 0x03BA, //107 #GREEK SMALL LETTER KAPPA + 0x03BB, //108 #GREEK SMALL LETTER LAMDA + 0x03BC, //109 #GREEK SMALL LETTER MU + 0x03BD, //110 #GREEK SMALL LETTER NU + 0x03BE, //111 #GREEK SMALL LETTER XI + 0x03BF, //112 #GREEK SMALL LETTER OMICRON + 0x03C0, //113 #GREEK SMALL LETTER PI + 0x03C1, //114 #GREEK SMALL LETTER RHO + 0x03C2, //115 #GREEK SMALL LETTER FINAL SIGMA + 0x03C3, //116 #GREEK SMALL LETTER SIGMA + 0x03C4, //117 #GREEK SMALL LETTER TAU + 0x03C5, //118 #GREEK SMALL LETTER UPSILON + 0x03C6, //119 #GREEK SMALL LETTER PHI + 0x03C7, //120 #GREEK SMALL LETTER CHI + 0x03C8, //121 #GREEK SMALL LETTER PSI + 0x03C9, //122 #GREEK SMALL LETTER OMEGA + 0x03CA, //123 #GREEK SMALL LETTER IOTA WITH DIALYTIKA + 0x03CB, //124 #GREEK SMALL LETTER UPSILON WITH DIALYTIKA + 0x03CC, //125 #GREEK SMALL LETTER OMICRON WITH TONOS + 0x03CD, //126 #GREEK SMALL LETTER UPSILON WITH TONOS + 0x03CE, //127 #GREEK SMALL LETTER OMEGA WITH TONOS + 0x00 //128 #UNDEFINED +}; + +//Table 1254 +static const int DRW_Table1254[] = { + 0x20AC, //1 #EURO SIGN + 0x00 , //2 #UNDEFINED + 0x201A, //3 #SINGLE LOW-9 QUOTATION MARK + 0x0192, //4 #LATIN SMALL LETTER F WITH HOOK + 0x201E, //5 #DOUBLE LOW-9 QUOTATION MARK + 0x2026, //6 #HORIZONTAL ELLIPSIS + 0x2020, //7 #DAGGER + 0x2021, //8 #DOUBLE DAGGER + 0x02C6, //9 #MODIFIER LETTER CIRCUMFLEX ACCENT + 0x2030, //10 #PER MILLE SIGN + 0x0160, //11 #LATIN CAPITAL LETTER S WITH CARON + 0x2039, //12 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK + 0x0152, //13 #LATIN CAPITAL LIGATURE OE + 0x00 , //14 #UNDEFINED + 0x00 , //15 #UNDEFINED + 0x00 , //16 #UNDEFINED + 0x00 , //17 #UNDEFINED + 0x2018, //18 #LEFT SINGLE QUOTATION MARK + 0x2019, //19 #RIGHT SINGLE QUOTATION MARK + 0x201C, //20 #LEFT DOUBLE QUOTATION MARK + 0x201D, //21 #RIGHT DOUBLE QUOTATION MARK + 0x2022, //22 #BULLET + 0x2013, //23 #EN DASH + 0x2014, //24 #EM DASH + 0x02DC, //25 #SMALL TILDE + 0x2122, //26 #TRADE MARK SIGN + 0x0161, //27 #LATIN SMALL LETTER S WITH CARON + 0x203A, //28 #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + 0x0153, //29 #LATIN SMALL LIGATURE OE + 0x00 , //30 #UNDEFINED + 0x00 , //31 #UNDEFINED + 0x0178, //32 #LATIN CAPITAL LETTER Y WITH DIAERESIS + 0x00A0, //33 #NO-BREAK SPACE + 0x00A1, //34 #INVERTED EXCLAMATION MARK + 0x00A2, //35 #CENT SIGN + 0x00A3, //36 #POUND SIGN + 0x00A4, //37 #CURRENCY SIGN + 0x00A5, //38 #YEN SIGN + 0x00A6, //39 #BROKEN BAR + 0x00A7, //40 #SECTION SIGN + 0x00A8, //41 #DIAERESIS + 0x00A9, //42 #COPYRIGHT SIGN + 0x00AA, //43 #FEMININE ORDINAL INDICATOR + 0x00AB, //44 #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + 0x00AC, //45 #NOT SIGN + 0x00AD, //46 #SOFT HYPHEN + 0x00AE, //47 #REGISTERED SIGN + 0x00AF, //48 #MACRON + 0x00B0, //49 #DEGREE SIGN + 0x00B1, //50 #PLUS-MINUS SIGN + 0x00B2, //51 #SUPERSCRIPT TWO + 0x00B3, //52 #SUPERSCRIPT THREE + 0x00B4, //53 #ACUTE ACCENT + 0x00B5, //54 #MICRO SIGN + 0x00B6, //55 #PILCROW SIGN + 0x00B7, //56 #MIDDLE DOT + 0x00B8, //57 #CEDILLA + 0x00B9, //58 #SUPERSCRIPT ONE + 0x00BA, //59 #MASCULINE ORDINAL INDICATOR + 0x00BB, //60 #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + 0x00BC, //61 #VULGAR FRACTION ONE QUARTER + 0x00BD, //62 #VULGAR FRACTION ONE HALF + 0x00BE, //63 #VULGAR FRACTION THREE QUARTERS + 0x00BF, //64 #INVERTED QUESTION MARK + 0x00C0, //65 #LATIN CAPITAL LETTER A WITH GRAVE + 0x00C1, //66 #LATIN CAPITAL LETTER A WITH ACUTE + 0x00C2, //67 #LATIN CAPITAL LETTER A WITH CIRCUMFLEX + 0x00C3, //68 #LATIN CAPITAL LETTER A WITH TILDE + 0x00C4, //69 #LATIN CAPITAL LETTER A WITH DIAERESIS + 0x00C5, //70 #LATIN CAPITAL LETTER A WITH RING ABOVE + 0x00C6, //71 #LATIN CAPITAL LETTER AE + 0x00C7, //72 #LATIN CAPITAL LETTER C WITH CEDILLA + 0x00C8, //73 #LATIN CAPITAL LETTER E WITH GRAVE + 0x00C9, //74 #LATIN CAPITAL LETTER E WITH ACUTE + 0x00CA, //75 #LATIN CAPITAL LETTER E WITH CIRCUMFLEX + 0x00CB, //76 #LATIN CAPITAL LETTER E WITH DIAERESIS + 0x00CC, //77 #LATIN CAPITAL LETTER I WITH GRAVE + 0x00CD, //78 #LATIN CAPITAL LETTER I WITH ACUTE + 0x00CE, //79 #LATIN CAPITAL LETTER I WITH CIRCUMFLEX + 0x00CF, //80 #LATIN CAPITAL LETTER I WITH DIAERESIS + 0x011E, //81 #LATIN CAPITAL LETTER G WITH BREVE + 0x00D1, //82 #LATIN CAPITAL LETTER N WITH TILDE + 0x00D2, //83 #LATIN CAPITAL LETTER O WITH GRAVE + 0x00D3, //84 #LATIN CAPITAL LETTER O WITH ACUTE + 0x00D4, //85 #LATIN CAPITAL LETTER O WITH CIRCUMFLEX + 0x00D5, //86 #LATIN CAPITAL LETTER O WITH TILDE + 0x00D6, //87 #LATIN CAPITAL LETTER O WITH DIAERESIS + 0x00D7, //88 #MULTIPLICATION SIGN + 0x00D8, //89 #LATIN CAPITAL LETTER O WITH STROKE + 0x00D9, //90 #LATIN CAPITAL LETTER U WITH GRAVE + 0x00DA, //91 #LATIN CAPITAL LETTER U WITH ACUTE + 0x00DB, //92 #LATIN CAPITAL LETTER U WITH CIRCUMFLEX + 0x00DC, //93 #LATIN CAPITAL LETTER U WITH DIAERESIS + 0x0130, //94 #LATIN CAPITAL LETTER I WITH DOT ABOVE + 0x015E, //95 #LATIN CAPITAL LETTER S WITH CEDILLA + 0x00DF, //96 #LATIN SMALL LETTER SHARP S + 0x00E0, //97 #LATIN SMALL LETTER A WITH GRAVE + 0x00E1, //98 #LATIN SMALL LETTER A WITH ACUTE + 0x00E2, //99 #LATIN SMALL LETTER A WITH CIRCUMFLEX + 0x00E3, //100 #LATIN SMALL LETTER A WITH TILDE + 0x00E4, //101 #LATIN SMALL LETTER A WITH DIAERESIS + 0x00E5, //102 #LATIN SMALL LETTER A WITH RING ABOVE + 0x00E6, //103 #LATIN SMALL LETTER AE + 0x00E7, //104 #LATIN SMALL LETTER C WITH CEDILLA + 0x00E8, //105 #LATIN SMALL LETTER E WITH GRAVE + 0x00E9, //106 #LATIN SMALL LETTER E WITH ACUTE + 0x00EA, //107 #LATIN SMALL LETTER E WITH CIRCUMFLEX + 0x00EB, //108 #LATIN SMALL LETTER E WITH DIAERESIS + 0x00EC, //109 #LATIN SMALL LETTER I WITH GRAVE + 0x00ED, //110 #LATIN SMALL LETTER I WITH ACUTE + 0x00EE, //111 #LATIN SMALL LETTER I WITH CIRCUMFLEX + 0x00EF, //112 #LATIN SMALL LETTER I WITH DIAERESIS + 0x011F, //113 #LATIN SMALL LETTER G WITH BREVE + 0x00F1, //114 #LATIN SMALL LETTER N WITH TILDE + 0x00F2, //115 #LATIN SMALL LETTER O WITH GRAVE + 0x00F3, //116 #LATIN SMALL LETTER O WITH ACUTE + 0x00F4, //117 #LATIN SMALL LETTER O WITH CIRCUMFLEX + 0x00F5, //118 #LATIN SMALL LETTER O WITH TILDE + 0x00F6, //119 #LATIN SMALL LETTER O WITH DIAERESIS + 0x00F7, //120 #DIVISION SIGN + 0x00F8, //121 #LATIN SMALL LETTER O WITH STROKE + 0x00F9, //122 #LATIN SMALL LETTER U WITH GRAVE + 0x00FA, //123 #LATIN SMALL LETTER U WITH ACUTE + 0x00FB, //124 #LATIN SMALL LETTER U WITH CIRCUMFLEX + 0x00FC, //125 #LATIN SMALL LETTER U WITH DIAERESIS + 0x0131, //126 #LATIN SMALL LETTER DOTLESS I + 0x015F, //127 #LATIN SMALL LETTER S WITH CEDILLA + 0x00FF //128 #LATIN SMALL LETTER Y WITH DIAERESIS +}; + +//Table 1255 +static const int DRW_Table1255[] = { + 0x20AC, //1 #EURO SIGN + 0x00 , //2 #UNDEFINED + 0x201A, //3 #SINGLE LOW-9 QUOTATION MARK + 0x0192, //4 #LATIN SMALL LETTER F WITH HOOK + 0x201E, //5 #DOUBLE LOW-9 QUOTATION MARK + 0x2026, //6 #HORIZONTAL ELLIPSIS + 0x2020, //7 #DAGGER + 0x2021, //8 #DOUBLE DAGGER + 0x02C6, //9 #MODIFIER LETTER CIRCUMFLEX ACCENT + 0x2030, //10 #PER MILLE SIGN + 0x00 , //11 #UNDEFINED + 0x2039, //12 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK + 0x00 , //13 #UNDEFINED + 0x00 , //14 #UNDEFINED + 0x00 , //15 #UNDEFINED + 0x00 , //16 #UNDEFINED + 0x00 , //17 #UNDEFINED + 0x2018, //18 #LEFT SINGLE QUOTATION MARK + 0x2019, //19 #RIGHT SINGLE QUOTATION MARK + 0x201C, //20 #LEFT DOUBLE QUOTATION MARK + 0x201D, //21 #RIGHT DOUBLE QUOTATION MARK + 0x2022, //22 #BULLET + 0x2013, //23 #EN DASH + 0x2014, //24 #EM DASH + 0x02DC, //25 #SMALL TILDE + 0x2122, //26 #TRADE MARK SIGN + 0x00 , //27 #UNDEFINED + 0x203A, //28 #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + 0x00 , //29 #UNDEFINED + 0x00 , //30 #UNDEFINED + 0x00 , //31 #UNDEFINED + 0x00 , //32 #UNDEFINED + 0x00A0, //33 #NO-BREAK SPACE + 0x00A1, //34 #INVERTED EXCLAMATION MARK + 0x00A2, //35 #CENT SIGN + 0x00A3, //36 #POUND SIGN + 0x20AA, //37 #NEW SHEQEL SIGN + 0x00A5, //38 #YEN SIGN + 0x00A6, //39 #BROKEN BAR + 0x00A7, //40 #SECTION SIGN + 0x00A8, //41 #DIAERESIS + 0x00A9, //42 #COPYRIGHT SIGN + 0x00D7, //43 #MULTIPLICATION SIGN + 0x00AB, //44 #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + 0x00AC, //45 #NOT SIGN + 0x00AD, //46 #SOFT HYPHEN + 0x00AE, //47 #REGISTERED SIGN + 0x00AF, //48 #MACRON + 0x00B0, //49 #DEGREE SIGN + 0x00B1, //50 #PLUS-MINUS SIGN + 0x00B2, //51 #SUPERSCRIPT TWO + 0x00B3, //52 #SUPERSCRIPT THREE + 0x00B4, //53 #ACUTE ACCENT + 0x00B5, //54 #MICRO SIGN + 0x00B6, //55 #PILCROW SIGN + 0x00B7, //56 #MIDDLE DOT + 0x00B8, //57 #CEDILLA + 0x00B9, //58 #SUPERSCRIPT ONE + 0x00F7, //59 #DIVISION SIGN + 0x00BB, //60 #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + 0x00BC, //61 #VULGAR FRACTION ONE QUARTER + 0x00BD, //62 #VULGAR FRACTION ONE HALF + 0x00BE, //63 #VULGAR FRACTION THREE QUARTERS + 0x00BF, //64 #INVERTED QUESTION MARK + 0x05B0, //65 #HEBREW POINT SHEVA + 0x05B1, //66 #HEBREW POINT HATAF SEGOL + 0x05B2, //67 #HEBREW POINT HATAF PATAH + 0x05B3, //68 #HEBREW POINT HATAF QAMATS + 0x05B4, //69 #HEBREW POINT HIRIQ + 0x05B5, //70 #HEBREW POINT TSERE + 0x05B6, //71 #HEBREW POINT SEGOL + 0x05B7, //72 #HEBREW POINT PATAH + 0x05B8, //73 #HEBREW POINT QAMATS + 0x05B9, //74 #HEBREW POINT HOLAM + 0x00 , //75 #UNDEFINED + 0x05BB, //76 #HEBREW POINT QUBUTS + 0x05BC, //77 #HEBREW POINT DAGESH OR MAPIQ + 0x05BD, //78 #HEBREW POINT METEG + 0x05BE, //79 #HEBREW PUNCTUATION MAQAF + 0x05BF, //80 #HEBREW POINT RAFE + 0x05C0, //81 #HEBREW PUNCTUATION PASEQ + 0x05C1, //82 #HEBREW POINT SHIN DOT + 0x05C2, //83 #HEBREW POINT SIN DOT + 0x05C3, //84 #HEBREW PUNCTUATION SOF PASUQ + 0x05F0, //85 #HEBREW LIGATURE YIDDISH DOUBLE VAV + 0x05F1, //86 #HEBREW LIGATURE YIDDISH VAV YOD + 0x05F2, //87 #HEBREW LIGATURE YIDDISH DOUBLE YOD + 0x05F3, //88 #HEBREW PUNCTUATION GERESH + 0x05F4, //89 #HEBREW PUNCTUATION GERSHAYIM + 0x00 , //90 #UNDEFINED + 0x00 , //91 #UNDEFINED + 0x00 , //92 #UNDEFINED + 0x00 , //93 #UNDEFINED + 0x00 , //94 #UNDEFINED + 0x00 , //95 #UNDEFINED + 0x00 , //96 #UNDEFINED + 0x05D0, //97 #HEBREW LETTER ALEF + 0x05D1, //98 #HEBREW LETTER BET + 0x05D2, //99 #HEBREW LETTER GIMEL + 0x05D3, //100 #HEBREW LETTER DALET + 0x05D4, //101 #HEBREW LETTER HE + 0x05D5, //102 #HEBREW LETTER VAV + 0x05D6, //103 #HEBREW LETTER ZAYIN + 0x05D7, //104 #HEBREW LETTER HET + 0x05D8, //105 #HEBREW LETTER TET + 0x05D9, //106 #HEBREW LETTER YOD + 0x05DA, //107 #HEBREW LETTER FINAL KAF + 0x05DB, //108 #HEBREW LETTER KAF + 0x05DC, //109 #HEBREW LETTER LAMED + 0x05DD, //110 #HEBREW LETTER FINAL MEM + 0x05DE, //111 #HEBREW LETTER MEM + 0x05DF, //112 #HEBREW LETTER FINAL NUN + 0x05E0, //113 #HEBREW LETTER NUN + 0x05E1, //114 #HEBREW LETTER SAMEKH + 0x05E2, //115 #HEBREW LETTER AYIN + 0x05E3, //116 #HEBREW LETTER FINAL PE + 0x05E4, //117 #HEBREW LETTER PE + 0x05E5, //118 #HEBREW LETTER FINAL TSADI + 0x05E6, //119 #HEBREW LETTER TSADI + 0x05E7, //120 #HEBREW LETTER QOF + 0x05E8, //121 #HEBREW LETTER RESH + 0x05E9, //122 #HEBREW LETTER SHIN + 0x05EA, //123 #HEBREW LETTER TAV + 0x00 , //124 #UNDEFINED + 0x00 , //125 #UNDEFINED + 0x200E, //126 #LEFT-TO-RIGHT MARK + 0x200F, //127 #RIGHT-TO-LEFT MARK + 0x00 //128 #UNDEFINED +}; + +//Table 1256 +static const int DRW_Table1256[] = { + 0x20AC, //1 #EURO SIGN + 0x067E, //2 #ARABIC LETTER PEH + 0x201A, //3 #SINGLE LOW-9 QUOTATION MARK + 0x0192, //4 #LATIN SMALL LETTER F WITH HOOK + 0x201E, //5 #DOUBLE LOW-9 QUOTATION MARK + 0x2026, //6 #HORIZONTAL ELLIPSIS + 0x2020, //7 #DAGGER + 0x2021, //8 #DOUBLE DAGGER + 0x02C6, //9 #MODIFIER LETTER CIRCUMFLEX ACCENT + 0x2030, //10 #PER MILLE SIGN + 0x0679, //11 #ARABIC LETTER TTEH + 0x2039, //12 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK + 0x0152, //13 #LATIN CAPITAL LIGATURE OE + 0x0686, //14 #ARABIC LETTER TCHEH + 0x0698, //15 #ARABIC LETTER JEH + 0x0688, //16 #ARABIC LETTER DDAL + 0x06AF, //17 #ARABIC LETTER GAF + 0x2018, //18 #LEFT SINGLE QUOTATION MARK + 0x2019, //19 #RIGHT SINGLE QUOTATION MARK + 0x201C, //20 #LEFT DOUBLE QUOTATION MARK + 0x201D, //21 #RIGHT DOUBLE QUOTATION MARK + 0x2022, //22 #BULLET + 0x2013, //23 #EN DASH + 0x2014, //24 #EM DASH + 0x06A9, //25 #ARABIC LETTER KEHEH + 0x2122, //26 #TRADE MARK SIGN + 0x0691, //27 #ARABIC LETTER RREH + 0x203A, //28 #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + 0x0153, //29 #LATIN SMALL LIGATURE OE + 0x200C, //30 #ZERO WIDTH NON-JOINER + 0x200D, //31 #ZERO WIDTH JOINER + 0x06BA, //32 #ARABIC LETTER NOON GHUNNA + 0x00A0, //33 #NO-BREAK SPACE + 0x060C, //34 #ARABIC COMMA + 0x00A2, //35 #CENT SIGN + 0x00A3, //36 #POUND SIGN + 0x00A4, //37 #CURRENCY SIGN + 0x00A5, //38 #YEN SIGN + 0x00A6, //39 #BROKEN BAR + 0x00A7, //40 #SECTION SIGN + 0x00A8, //41 #DIAERESIS + 0x00A9, //42 #COPYRIGHT SIGN + 0x06BE, //43 #ARABIC LETTER HEH DOACHASHMEE + 0x00AB, //44 #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + 0x00AC, //45 #NOT SIGN + 0x00AD, //46 #SOFT HYPHEN + 0x00AE, //47 #REGISTERED SIGN + 0x00AF, //48 #MACRON + 0x00B0, //49 #DEGREE SIGN + 0x00B1, //50 #PLUS-MINUS SIGN + 0x00B2, //51 #SUPERSCRIPT TWO + 0x00B3, //52 #SUPERSCRIPT THREE + 0x00B4, //53 #ACUTE ACCENT + 0x00B5, //54 #MICRO SIGN + 0x00B6, //55 #PILCROW SIGN + 0x00B7, //56 #MIDDLE DOT + 0x00B8, //57 #CEDILLA + 0x00B9, //58 #SUPERSCRIPT ONE + 0x061B, //59 #ARABIC SEMICOLON + 0x00BB, //60 #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + 0x00BC, //61 #VULGAR FRACTION ONE QUARTER + 0x00BD, //62 #VULGAR FRACTION ONE HALF + 0x00BE, //63 #VULGAR FRACTION THREE QUARTERS + 0x061F, //64 #ARABIC QUESTION MARK + 0x06C1, //65 #ARABIC LETTER HEH GOAL + 0x0621, //66 #ARABIC LETTER HAMZA + 0x0622, //67 #ARABIC LETTER ALEF WITH MADDA ABOVE + 0x0623, //68 #ARABIC LETTER ALEF WITH HAMZA ABOVE + 0x0624, //69 #ARABIC LETTER WAW WITH HAMZA ABOVE + 0x0625, //70 #ARABIC LETTER ALEF WITH HAMZA BELOW + 0x0626, //71 #ARABIC LETTER YEH WITH HAMZA ABOVE + 0x0627, //72 #ARABIC LETTER ALEF + 0x0628, //73 #ARABIC LETTER BEH + 0x0629, //74 #ARABIC LETTER TEH MARBUTA + 0x062A, //75 #ARABIC LETTER TEH + 0x062B, //76 #ARABIC LETTER THEH + 0x062C, //77 #ARABIC LETTER JEEM + 0x062D, //78 #ARABIC LETTER HAH + 0x062E, //79 #ARABIC LETTER KHAH + 0x062F, //80 #ARABIC LETTER DAL + 0x0630, //81 #ARABIC LETTER THAL + 0x0631, //82 #ARABIC LETTER REH + 0x0632, //83 #ARABIC LETTER ZAIN + 0x0633, //84 #ARABIC LETTER SEEN + 0x0634, //85 #ARABIC LETTER SHEEN + 0x0635, //86 #ARABIC LETTER SAD + 0x0636, //87 #ARABIC LETTER DAD + 0x00D7, //88 #MULTIPLICATION SIGN + 0x0637, //89 #ARABIC LETTER TAH + 0x0638, //90 #ARABIC LETTER ZAH + 0x0639, //91 #ARABIC LETTER AIN + 0x063A, //92 #ARABIC LETTER GHAIN + 0x0640, //93 #ARABIC TATWEEL + 0x0641, //94 #ARABIC LETTER FEH + 0x0642, //95 #ARABIC LETTER QAF + 0x0643, //96 #ARABIC LETTER KAF + 0x00E0, //97 #LATIN SMALL LETTER A WITH GRAVE + 0x0644, //98 #ARABIC LETTER LAM + 0x00E2, //99 #LATIN SMALL LETTER A WITH CIRCUMFLEX + 0x0645, //100 #ARABIC LETTER MEEM + 0x0646, //101 #ARABIC LETTER NOON + 0x0647, //102 #ARABIC LETTER HEH + 0x0648, //103 #ARABIC LETTER WAW + 0x00E7, //104 #LATIN SMALL LETTER C WITH CEDILLA + 0x00E8, //105 #LATIN SMALL LETTER E WITH GRAVE + 0x00E9, //106 #LATIN SMALL LETTER E WITH ACUTE + 0x00EA, //107 #LATIN SMALL LETTER E WITH CIRCUMFLEX + 0x00EB, //108 #LATIN SMALL LETTER E WITH DIAERESIS + 0x0649, //109 #ARABIC LETTER ALEF MAKSURA + 0x064A, //110 #ARABIC LETTER YEH + 0x00EE, //111 #LATIN SMALL LETTER I WITH CIRCUMFLEX + 0x00EF, //112 #LATIN SMALL LETTER I WITH DIAERESIS + 0x064B, //113 #ARABIC FATHATAN + 0x064C, //114 #ARABIC DAMMATAN + 0x064D, //115 #ARABIC KASRATAN + 0x064E, //116 #ARABIC FATHA + 0x00F4, //117 #LATIN SMALL LETTER O WITH CIRCUMFLEX + 0x064F, //118 #ARABIC DAMMA + 0x0650, //119 #ARABIC KASRA + 0x00F7, //120 #DIVISION SIGN + 0x0651, //121 #ARABIC SHADDA + 0x00F9, //122 #LATIN SMALL LETTER U WITH GRAVE + 0x0652, //123 #ARABIC SUKUN + 0x00FB, //124 #LATIN SMALL LETTER U WITH CIRCUMFLEX + 0x00FC, //125 #LATIN SMALL LETTER U WITH DIAERESIS + 0x200E, //126 #LEFT-TO-RIGHT MARK + 0x200F, //127 #RIGHT-TO-LEFT MARK + 0x06D2 //128 #ARABIC LETTER YEH BARREE +}; + +//Table 1257 +static const int DRW_Table1257[] = { + 0x20AC, //1 #EURO SIGN + 0x00 , //2 #UNDEFINED + 0x201A, //3 #SINGLE LOW-9 QUOTATION MARK + 0x00 , //4 #UNDEFINED + 0x201E, //5 #DOUBLE LOW-9 QUOTATION MARK + 0x2026, //6 #HORIZONTAL ELLIPSIS + 0x2020, //7 #DAGGER + 0x2021, //8 #DOUBLE DAGGER + 0x00 , //9 #UNDEFINED + 0x2030, //10 #PER MILLE SIGN + 0x00 , //11 #UNDEFINED + 0x2039, //12 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK + 0x00 , //13 #UNDEFINED + 0x00A8, //14 #DIAERESIS + 0x02C7, //15 #CARON + 0x00B8, //16 #CEDILLA + 0x00 , //17 #UNDEFINED + 0x2018, //18 #LEFT SINGLE QUOTATION MARK + 0x2019, //19 #RIGHT SINGLE QUOTATION MARK + 0x201C, //20 #LEFT DOUBLE QUOTATION MARK + 0x201D, //21 #RIGHT DOUBLE QUOTATION MARK + 0x2022, //22 #BULLET + 0x2013, //23 #EN DASH + 0x2014, //24 #EM DASH + 0x00 , //25 #UNDEFINED + 0x2122, //26 #TRADE MARK SIGN + 0x00 , //27 #UNDEFINED + 0x203A, //28 #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + 0x00 , //29 #UNDEFINED + 0x00AF, //30 #MACRON + 0x02DB, //31 #OGONEK + 0x00 , //32 #UNDEFINED + 0x00A0, //33 #NO-BREAK SPACE + 0x00 , //34 #UNDEFINED + 0x00A2, //35 #CENT SIGN + 0x00A3, //36 #POUND SIGN + 0x00A4, //37 #CURRENCY SIGN + 0x00 , //38 #UNDEFINED + 0x00A6, //39 #BROKEN BAR + 0x00A7, //40 #SECTION SIGN + 0x00D8, //41 #LATIN CAPITAL LETTER O WITH STROKE + 0x00A9, //42 #COPYRIGHT SIGN + 0x0156, //43 #LATIN CAPITAL LETTER R WITH CEDILLA + 0x00AB, //44 #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + 0x00AC, //45 #NOT SIGN + 0x00AD, //46 #SOFT HYPHEN + 0x00AE, //47 #REGISTERED SIGN + 0x00C6, //48 #LATIN CAPITAL LETTER AE + 0x00B0, //49 #DEGREE SIGN + 0x00B1, //50 #PLUS-MINUS SIGN + 0x00B2, //51 #SUPERSCRIPT TWO + 0x00B3, //52 #SUPERSCRIPT THREE + 0x00B4, //53 #ACUTE ACCENT + 0x00B5, //54 #MICRO SIGN + 0x00B6, //55 #PILCROW SIGN + 0x00B7, //56 #MIDDLE DOT + 0x00F8, //57 #LATIN SMALL LETTER O WITH STROKE + 0x00B9, //58 #SUPERSCRIPT ONE + 0x0157, //59 #LATIN SMALL LETTER R WITH CEDILLA + 0x00BB, //60 #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + 0x00BC, //61 #VULGAR FRACTION ONE QUARTER + 0x00BD, //62 #VULGAR FRACTION ONE HALF + 0x00BE, //63 #VULGAR FRACTION THREE QUARTERS + 0x00E6, //64 #LATIN SMALL LETTER AE + 0x0104, //65 #LATIN CAPITAL LETTER A WITH OGONEK + 0x012E, //66 #LATIN CAPITAL LETTER I WITH OGONEK + 0x0100, //67 #LATIN CAPITAL LETTER A WITH MACRON + 0x0106, //68 #LATIN CAPITAL LETTER C WITH ACUTE + 0x00C4, //69 #LATIN CAPITAL LETTER A WITH DIAERESIS + 0x00C5, //70 #LATIN CAPITAL LETTER A WITH RING ABOVE + 0x0118, //71 #LATIN CAPITAL LETTER E WITH OGONEK + 0x0112, //72 #LATIN CAPITAL LETTER E WITH MACRON + 0x010C, //73 #LATIN CAPITAL LETTER C WITH CARON + 0x00C9, //74 #LATIN CAPITAL LETTER E WITH ACUTE + 0x0179, //75 #LATIN CAPITAL LETTER Z WITH ACUTE + 0x0116, //76 #LATIN CAPITAL LETTER E WITH DOT ABOVE + 0x0122, //77 #LATIN CAPITAL LETTER G WITH CEDILLA + 0x0136, //78 #LATIN CAPITAL LETTER K WITH CEDILLA + 0x012A, //79 #LATIN CAPITAL LETTER I WITH MACRON + 0x013B, //80 #LATIN CAPITAL LETTER L WITH CEDILLA + 0x0160, //81 #LATIN CAPITAL LETTER S WITH CARON + 0x0143, //82 #LATIN CAPITAL LETTER N WITH ACUTE + 0x0145, //83 #LATIN CAPITAL LETTER N WITH CEDILLA + 0x00D3, //84 #LATIN CAPITAL LETTER O WITH ACUTE + 0x014C, //85 #LATIN CAPITAL LETTER O WITH MACRON + 0x00D5, //86 #LATIN CAPITAL LETTER O WITH TILDE + 0x00D6, //87 #LATIN CAPITAL LETTER O WITH DIAERESIS + 0x00D7, //88 #MULTIPLICATION SIGN + 0x0172, //89 #LATIN CAPITAL LETTER U WITH OGONEK + 0x0141, //90 #LATIN CAPITAL LETTER L WITH STROKE + 0x015A, //91 #LATIN CAPITAL LETTER S WITH ACUTE + 0x016A, //92 #LATIN CAPITAL LETTER U WITH MACRON + 0x00DC, //93 #LATIN CAPITAL LETTER U WITH DIAERESIS + 0x017B, //94 #LATIN CAPITAL LETTER Z WITH DOT ABOVE + 0x017D, //95 #LATIN CAPITAL LETTER Z WITH CARON + 0x00DF, //96 #LATIN SMALL LETTER SHARP S + 0x0105, //97 #LATIN SMALL LETTER A WITH OGONEK + 0x012F, //98 #LATIN SMALL LETTER I WITH OGONEK + 0x0101, //99 #LATIN SMALL LETTER A WITH MACRON + 0x0107, //100 #LATIN SMALL LETTER C WITH ACUTE + 0x00E4, //101 #LATIN SMALL LETTER A WITH DIAERESIS + 0x00E5, //102 #LATIN SMALL LETTER A WITH RING ABOVE + 0x0119, //103 #LATIN SMALL LETTER E WITH OGONEK + 0x0113, //104 #LATIN SMALL LETTER E WITH MACRON + 0x010D, //105 #LATIN SMALL LETTER C WITH CARON + 0x00E9, //106 #LATIN SMALL LETTER E WITH ACUTE + 0x017A, //107 #LATIN SMALL LETTER Z WITH ACUTE + 0x0117, //108 #LATIN SMALL LETTER E WITH DOT ABOVE + 0x0123, //109 #LATIN SMALL LETTER G WITH CEDILLA + 0x0137, //110 #LATIN SMALL LETTER K WITH CEDILLA + 0x012B, //111 #LATIN SMALL LETTER I WITH MACRON + 0x013C, //112 #LATIN SMALL LETTER L WITH CEDILLA + 0x0161, //113 #LATIN SMALL LETTER S WITH CARON + 0x0144, //114 #LATIN SMALL LETTER N WITH ACUTE + 0x0146, //115 #LATIN SMALL LETTER N WITH CEDILLA + 0x00F3, //116 #LATIN SMALL LETTER O WITH ACUTE + 0x014D, //117 #LATIN SMALL LETTER O WITH MACRON + 0x00F5, //118 #LATIN SMALL LETTER O WITH TILDE + 0x00F6, //119 #LATIN SMALL LETTER O WITH DIAERESIS + 0x00F7, //120 #DIVISION SIGN + 0x0173, //121 #LATIN SMALL LETTER U WITH OGONEK + 0x0142, //122 #LATIN SMALL LETTER L WITH STROKE + 0x015B, //123 #LATIN SMALL LETTER S WITH ACUTE + 0x016B, //124 #LATIN SMALL LETTER U WITH MACRON + 0x00FC, //125 #LATIN SMALL LETTER U WITH DIAERESIS + 0x017C, //126 #LATIN SMALL LETTER Z WITH DOT ABOVE + 0x017E, //127 #LATIN SMALL LETTER Z WITH CARON + 0x02D9 //128 #DOT ABOVE +}; + +//Table 1258 +static const int DRW_Table1258[] = { + 0x20AC, //1 #EURO SIGN + 0x00 , //2 #UNDEFINED + 0x201A, //3 #SINGLE LOW-9 QUOTATION MARK + 0x0192, //4 #LATIN SMALL LETTER F WITH HOOK + 0x201E, //5 #DOUBLE LOW-9 QUOTATION MARK + 0x2026, //6 #HORIZONTAL ELLIPSIS + 0x2020, //7 #DAGGER + 0x2021, //8 #DOUBLE DAGGER + 0x02C6, //9 #MODIFIER LETTER CIRCUMFLEX ACCENT + 0x2030, //10 #PER MILLE SIGN + 0x00 , //11 #UNDEFINED + 0x2039, //12 #SINGLE LEFT-POINTING ANGLE QUOTATION MARK + 0x0152, //13 #LATIN CAPITAL LIGATURE OE + 0x00 , //14 #UNDEFINED + 0x00 , //15 #UNDEFINED + 0x00 , //16 #UNDEFINED + 0x00 , //17 #UNDEFINED + 0x2018, //18 #LEFT SINGLE QUOTATION MARK + 0x2019, //19 #RIGHT SINGLE QUOTATION MARK + 0x201C, //20 #LEFT DOUBLE QUOTATION MARK + 0x201D, //21 #RIGHT DOUBLE QUOTATION MARK + 0x2022, //22 #BULLET + 0x2013, //23 #EN DASH + 0x2014, //24 #EM DASH + 0x02DC, //25 #SMALL TILDE + 0x2122, //26 #TRADE MARK SIGN + 0x00 , //27 #UNDEFINED + 0x203A, //28 #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + 0x0153, //29 #LATIN SMALL LIGATURE OE + 0x00 , //30 #UNDEFINED + 0x00 , //31 #UNDEFINED + 0x0178, //32 #LATIN CAPITAL LETTER Y WITH DIAERESIS + 0x00A0, //33 #NO-BREAK SPACE + 0x00A1, //34 #INVERTED EXCLAMATION MARK + 0x00A2, //35 #CENT SIGN + 0x00A3, //36 #POUND SIGN + 0x00A4, //37 #CURRENCY SIGN + 0x00A5, //38 #YEN SIGN + 0x00A6, //39 #BROKEN BAR + 0x00A7, //40 #SECTION SIGN + 0x00A8, //41 #DIAERESIS + 0x00A9, //42 #COPYRIGHT SIGN + 0x00AA, //43 #FEMININE ORDINAL INDICATOR + 0x00AB, //44 #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK + 0x00AC, //45 #NOT SIGN + 0x00AD, //46 #SOFT HYPHEN + 0x00AE, //47 #REGISTERED SIGN + 0x00AF, //48 #MACRON + 0x00B0, //49 #DEGREE SIGN + 0x00B1, //50 #PLUS-MINUS SIGN + 0x00B2, //51 #SUPERSCRIPT TWO + 0x00B3, //52 #SUPERSCRIPT THREE + 0x00B4, //53 #ACUTE ACCENT + 0x00B5, //54 #MICRO SIGN + 0x00B6, //55 #PILCROW SIGN + 0x00B7, //56 #MIDDLE DOT + 0x00B8, //57 #CEDILLA + 0x00B9, //58 #SUPERSCRIPT ONE + 0x00BA, //59 #MASCULINE ORDINAL INDICATOR + 0x00BB, //60 #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK + 0x00BC, //61 #VULGAR FRACTION ONE QUARTER + 0x00BD, //62 #VULGAR FRACTION ONE HALF + 0x00BE, //63 #VULGAR FRACTION THREE QUARTERS + 0x00BF, //64 #INVERTED QUESTION MARK + 0x00C0, //65 #LATIN CAPITAL LETTER A WITH GRAVE + 0x00C1, //66 #LATIN CAPITAL LETTER A WITH ACUTE + 0x00C2, //67 #LATIN CAPITAL LETTER A WITH CIRCUMFLEX + 0x0102, //68 #LATIN CAPITAL LETTER A WITH BREVE + 0x00C4, //69 #LATIN CAPITAL LETTER A WITH DIAERESIS + 0x00C5, //70 #LATIN CAPITAL LETTER A WITH RING ABOVE + 0x00C6, //71 #LATIN CAPITAL LETTER AE + 0x00C7, //72 #LATIN CAPITAL LETTER C WITH CEDILLA + 0x00C8, //73 #LATIN CAPITAL LETTER E WITH GRAVE + 0x00C9, //74 #LATIN CAPITAL LETTER E WITH ACUTE + 0x00CA, //75 #LATIN CAPITAL LETTER E WITH CIRCUMFLEX + 0x00CB, //76 #LATIN CAPITAL LETTER E WITH DIAERESIS + 0x0300, //77 #COMBINING GRAVE ACCENT + 0x00CD, //78 #LATIN CAPITAL LETTER I WITH ACUTE + 0x00CE, //79 #LATIN CAPITAL LETTER I WITH CIRCUMFLEX + 0x00CF, //80 #LATIN CAPITAL LETTER I WITH DIAERESIS + 0x0110, //81 #LATIN CAPITAL LETTER D WITH STROKE + 0x00D1, //82 #LATIN CAPITAL LETTER N WITH TILDE + 0x0309, //83 #COMBINING HOOK ABOVE + 0x00D3, //84 #LATIN CAPITAL LETTER O WITH ACUTE + 0x00D4, //85 #LATIN CAPITAL LETTER O WITH CIRCUMFLEX + 0x01A0, //86 #LATIN CAPITAL LETTER O WITH HORN + 0x00D6, //87 #LATIN CAPITAL LETTER O WITH DIAERESIS + 0x00D7, //88 #MULTIPLICATION SIGN + 0x00D8, //89 #LATIN CAPITAL LETTER O WITH STROKE + 0x00D9, //90 #LATIN CAPITAL LETTER U WITH GRAVE + 0x00DA, //91 #LATIN CAPITAL LETTER U WITH ACUTE + 0x00DB, //92 #LATIN CAPITAL LETTER U WITH CIRCUMFLEX + 0x00DC, //93 #LATIN CAPITAL LETTER U WITH DIAERESIS + 0x01AF, //94 #LATIN CAPITAL LETTER U WITH HORN + 0x0303, //95 #COMBINING TILDE + 0x00DF, //96 #LATIN SMALL LETTER SHARP S + 0x00E0, //97 #LATIN SMALL LETTER A WITH GRAVE + 0x00E1, //98 #LATIN SMALL LETTER A WITH ACUTE + 0x00E2, //99 #LATIN SMALL LETTER A WITH CIRCUMFLEX + 0x0103, //100 #LATIN SMALL LETTER A WITH BREVE + 0x00E4, //101 #LATIN SMALL LETTER A WITH DIAERESIS + 0x00E5, //102 #LATIN SMALL LETTER A WITH RING ABOVE + 0x00E6, //103 #LATIN SMALL LETTER AE + 0x00E7, //104 #LATIN SMALL LETTER C WITH CEDILLA + 0x00E8, //105 #LATIN SMALL LETTER E WITH GRAVE + 0x00E9, //106 #LATIN SMALL LETTER E WITH ACUTE + 0x00EA, //107 #LATIN SMALL LETTER E WITH CIRCUMFLEX + 0x00EB, //108 #LATIN SMALL LETTER E WITH DIAERESIS + 0x0301, //109 #COMBINING ACUTE ACCENT + 0x00ED, //110 #LATIN SMALL LETTER I WITH ACUTE + 0x00EE, //111 #LATIN SMALL LETTER I WITH CIRCUMFLEX + 0x00EF, //112 #LATIN SMALL LETTER I WITH DIAERESIS + 0x0111, //113 #LATIN SMALL LETTER D WITH STROKE + 0x00F1, //114 #LATIN SMALL LETTER N WITH TILDE + 0x0323, //115 #COMBINING DOT BELOW + 0x00F3, //116 #LATIN SMALL LETTER O WITH ACUTE + 0x00F4, //117 #LATIN SMALL LETTER O WITH CIRCUMFLEX + 0x01A1, //118 #LATIN SMALL LETTER O WITH HORN + 0x00F6, //119 #LATIN SMALL LETTER O WITH DIAERESIS + 0x00F7, //120 #DIVISION SIGN + 0x00F8, //121 #LATIN SMALL LETTER O WITH STROKE + 0x00F9, //122 #LATIN SMALL LETTER U WITH GRAVE + 0x00FA, //123 #LATIN SMALL LETTER U WITH ACUTE + 0x00FB, //124 #LATIN SMALL LETTER U WITH CIRCUMFLEX + 0x00FC, //125 #LATIN SMALL LETTER U WITH DIAERESIS + 0x01B0, //126 #LATIN SMALL LETTER U WITH HORN + 0x20AB, //127 #DONG SIGN + 0x00FF //128 #LATIN SMALL LETTER Y WITH DIAERESIS +}; + +#endif // DRW_CPTABLES_H diff --git a/lib_dxf/intern/drw_textcodec.cpp b/lib_dxf/intern/drw_textcodec.cpp new file mode 100644 index 0000000000..6a2c475e26 --- /dev/null +++ b/lib_dxf/intern/drw_textcodec.cpp @@ -0,0 +1,498 @@ +#include "drw_textcodec.h" +#include +#include +#include +#include "../drw_base.h" +#include "drw_cptables.h" +#include "drw_cptable932.h" +#include "drw_cptable936.h" +#include "drw_cptable949.h" +#include "drw_cptable950.h" + +DRW_TextCodec::DRW_TextCodec() { + version = DRW::AC1021; + conv = new DRW_Converter(NULL, 0); +} + +DRW_TextCodec::~DRW_TextCodec() { + delete conv; +} + +void DRW_TextCodec::setVersion(std::string *v){ + std::string versionStr = *v; + if (versionStr == "AC1009" || versionStr == "AC1006") { + version = DRW::AC1009; + cp = "ANSI_1252"; + setCodePage(&cp); + } else if (versionStr == "AC1012" || versionStr == "AC1014" + || versionStr == "AC1015" || versionStr == "AC1018") { + version = DRW::AC1015; + if (cp.empty()) { //codepage not set, initialize + cp = "ANSI_1252"; + setCodePage(&cp); + } + } else { + version = DRW::AC1021; + cp = "ANSI_1252"; + } +} + +void DRW_TextCodec::setCodePage(std::string *c){ + cp = correctCodePage(*c); + delete conv; + if (version == DRW::AC1009 || version == DRW::AC1015) { + if (cp == "ANSI_874") + conv = new DRW_ConvTable(DRW_Table874, CPLENGHTCOMMON); + else if (cp == "ANSI_932") + conv = new DRW_Conv932Table(DRW_Table932, DRW_LeadTable932, + DRW_DoubleTable932, CPLENGHT932); + else if (cp == "ANSI_936") + conv = new DRW_ConvDBCSTable(DRW_Table936, DRW_LeadTable936, + DRW_DoubleTable936, CPLENGHT936); + else if (cp == "ANSI_949") + conv = new DRW_ConvDBCSTable(DRW_Table949, DRW_LeadTable949, + DRW_DoubleTable949, CPLENGHT949); + else if (cp == "ANSI_950") + conv = new DRW_ConvDBCSTable(DRW_Table950, DRW_LeadTable950, + DRW_DoubleTable950, CPLENGHT950); + else if (cp == "ANSI_1250") + conv = new DRW_ConvTable(DRW_Table1250, CPLENGHTCOMMON); + else if (cp == "ANSI_1251") + conv = new DRW_ConvTable(DRW_Table1251, CPLENGHTCOMMON); + else if (cp == "ANSI_1253") + conv = new DRW_ConvTable(DRW_Table1253, CPLENGHTCOMMON); + else if (cp == "ANSI_1254") + conv = new DRW_ConvTable(DRW_Table1254, CPLENGHTCOMMON); + else if (cp == "ANSI_1255") + conv = new DRW_ConvTable(DRW_Table1255, CPLENGHTCOMMON); + else if (cp == "ANSI_1256") + conv = new DRW_ConvTable(DRW_Table1256, CPLENGHTCOMMON); + else if (cp == "ANSI_1257") + conv = new DRW_ConvTable(DRW_Table1257, CPLENGHTCOMMON); + else if (cp == "ANSI_1258") + conv = new DRW_ConvTable(DRW_Table1258, CPLENGHTCOMMON); + else if (cp == "UTF-8") { //DXF older than 2007 are write in win codepages + cp = "ANSI_1252"; + conv = new DRW_Converter(NULL, 0); + } else + conv = new DRW_ConvTable(DRW_Table1252, CPLENGHTCOMMON); + } else { + conv = new DRW_Converter(NULL, 0); + } +} + +std::string DRW_TextCodec::toUtf8(std::string s) { + return conv->toUtf8(&s); +} + +std::string DRW_TextCodec::fromUtf8(std::string s) { + return conv->fromUtf8(&s); +} + +std::string DRW_Converter::toUtf8(std::string *s) { + std::string result; + int j = 0; + unsigned int i= 0; + for (i=0; i < s->length(); i++) { + unsigned char c = s->at(i); + if (c < 0x80) { //ascii check for /U+???? + if (c == '\\' && i+6 < s->length() && s->at(i+1) == 'U' && s->at(i+2) == '+') { + result += s->substr(j,i-j); + result += encodeText(s->substr(i,7)); + i +=6; + j = i+1; + } + } else if (c < 0xE0 ) {//2 bits + i++; + } else if (c < 0xF0 ) {//3 bits + i +=2; + } else if (c < 0xF8 ) {//4 bits + i +=3; + } + } + result += s->substr(j); + + return result; +} + +std::string DRW_ConvTable::fromUtf8(std::string *s) { + std::string result; + bool notFound; + int code; + + int j = 0; + for (unsigned int i=0; i < s->length(); i++) { + unsigned char c = s->at(i); + if (c > 0x7F) { //need to decode + result += s->substr(j,i-j); + std::string part1 = s->substr(i,4); + int l; + code = decodeNum(part1, &l); + j = i+l; + i = j - 1; + notFound = true; + for (int k=0; ksubstr(j); + + return result; +} + +std::string DRW_ConvTable::toUtf8(std::string *s) { + std::string res; + string::iterator it; + for ( it=s->begin() ; it < s->end(); it++ ) { + unsigned char c = *it; + if (c < 0x80) { + //check for \U+ encoded text + if (c == '\\') { + if (it+6 < s->end() && *(it+1) == 'U' && *(it+2) == '+') { + res += encodeText(std::string(it, it+7)); + it +=6; + } else { + res +=c; //no \U+ encoded text write + } + } else + res +=c; //c!='\' ascii char write + } else {//end c < 0x80 + res += encodeNum(table[c-0x80]); //translate from table + } + } //end for + + return res; +} + +std::string DRW_Converter::encodeText(std::string stmp){ + int code; +#if defined(__APPLE__) + int Succeeded = sscanf (&( stmp.substr(3,4)[0]), "%x", &code ); + if ( !Succeeded || Succeeded == EOF ) + code = 0; +#else + std::istringstream sd(stmp.substr(3,4)); + sd >> std::hex >> code; +#endif + return encodeNum(code); +} + +std::string DRW_Converter::decodeText(int c){ + std::string res = "\\U+"; + std::string num; +#if defined(__APPLE__) + std::string str(16, '\0'); + snprintf (&(str[0]), 16, "%04X", c ); + num = str; +#else + std::stringstream ss; + ss << std::uppercase << std::setfill('0') << std::setw(4) << std::hex << c; + ss >> num; +#endif + res += num; + return res; +} + +std::string DRW_Converter::encodeNum(int c){ + unsigned char ret[5]; + if (c < 128) { // 0-7F US-ASCII 7 bits + ret[0] = c; + ret[1] = 0; + } else if (c < 0x800) { //80-07FF 2 bytes + ret[0] = 0xC0 | (c >> 6); + ret[1] = 0x80 | (c & 0x3f); + ret[2] = 0; + } else if (c< 0x10000) { //800-FFFF 3 bytes + ret[0] = 0xe0 | (c >> 12); + ret[1] = 0x80 | ((c >> 6) & 0x3f); + ret[2] = 0x80 | (c & 0x3f); + ret[3] = 0; + } else { //10000-10FFFF 4 bytes + ret[0] = 0xf0 | (c >> 18); + ret[1] = 0x80 | ((c >> 12) & 0x3f); + ret[2] = 0x80 | ((c >> 6) & 0x3f); + ret[3] = 0x80 | (c & 0x3f); + ret[4] = 0; + } + return std::string((char*)ret); +} + +/** 's' is a string with at least 4 bytes lenght +** returned 'b' is byte lenght of encoded char: 2,3 or 4 +**/ +int DRW_Converter::decodeNum(std::string s, int *b){ + int code= 0; + unsigned char c = s.at(0); + if ( (c& 0xE0) == 0xC0) { //2 bytes + code = ( c&0x1F)<<6; + code = (s.at(1) &0x3F) | code; + *b = 2; + } else if ( (c& 0xF0) == 0xE0) { //3 bytes + code = ( c&0x0F)<<12; + code = ((s.at(1) &0x3F)<<6) | code; + code = (s.at(2) &0x3F) | code; + *b = 3; + } else if ( (c& 0xF8) == 0xF0) { //4 bytes + code = ( c&0x07)<<18; + code = ((s.at(1) &0x3F)<<12) | code; + code = ((s.at(2) &0x3F)<<6) | code; + code = (s.at(3) &0x3F) | code; + *b = 4; + } + + return code; +} + + +std::string DRW_ConvDBCSTable::fromUtf8(std::string *s) { + std::string result; + bool notFound; + int code; + + int j = 0; + for (unsigned int i=0; i < s->length(); i++) { + unsigned char c = s->at(i); + if (c > 0x7F) { //need to decode + result += s->substr(j,i-j); + std::string part1 = s->substr(i,4); + int l; + code = decodeNum(part1, &l); + j = i+l; + i = j - 1; + notFound = true; + for (int k=0; k> 8; + d[1] = data & 0xFF; + d[2]= '\0'; + result += d; //translate from table + notFound = false; + break; + } + } + if (notFound) + result += decodeText(code); + } //direct conversion + } + result += s->substr(j); + + return result; +} + +std::string DRW_ConvDBCSTable::toUtf8(std::string *s) { + std::string res; + string::iterator it; + for ( it=s->begin() ; it < s->end(); it++ ) { + bool notFound = true; + unsigned char c = *it; + if (c < 0x80) { + notFound = false; + //check for \U+ encoded text + if (c == '\\') { + if (it+6 < s->end() && *(it+1) == 'U' && *(it+2) == '+') { + res += encodeText(std::string(it, it+7)); + it +=6; + } else { + res +=c; //no \U+ encoded text write + } + } else + res +=c; //c!='\' ascii char write + } else if(c == 0x80 ){//1 byte table + notFound = false; + res += encodeNum(0x20AC);//euro sign + } else {//2 bytes + ++it; + int code = (c << 8) | (unsigned char )(*it); + int sta = leadTable[c-0x81]; + int end = leadTable[c-0x80]; + for (int k=sta; klength(); i++) { + unsigned char c = s->at(i); + if (c > 0x7F) { //need to decode + result += s->substr(j,i-j); + std::string part1 = s->substr(i,4); + int l; + code = decodeNum(part1, &l); + j = i+l; + i = j - 1; + notFound = true; + // 1 byte table + if (code > 0xff60 && code < 0xFFA0) { + result += code - CPOFFSET932; //translate from table + notFound = false; + } + if (notFound && ( code<0xF8 || (code>0x390 && code<0x542) || + (code>0x200F && code<0x9FA1) || code>0xF928 )) { + for (int k=0; k> 8; + d[1] = data & 0xFF; + d[2]= '\0'; + result += d; //translate from table + notFound = false; + break; + } + } + } + if (notFound) + result += decodeText(code); + } //direct conversion + } + result += s->substr(j); + + return result; +} + +std::string DRW_Conv932Table::toUtf8(std::string *s) { + std::string res; + string::iterator it; + for ( it=s->begin() ; it < s->end(); it++ ) { + bool notFound = true; + unsigned char c = *it; + if (c < 0x80) { + notFound = false; + //check for \U+ encoded text + if (c == '\\') { + if (it+6 < s->end() && *(it+1) == 'U' && *(it+2) == '+') { + res += encodeText(std::string(it, it+7)); + it +=6; + } else { + res +=c; //no \U+ encoded text write + } + } else + res +=c; //c!='\' ascii char write + } else if(c > 0xA0 && c < 0xE0 ){//1 byte table + notFound = false; + res += encodeNum(c + CPOFFSET932); //translate from table + } else {//2 bytes + ++it; + int code = (c << 8) | (unsigned char )(*it); + int sta; + int end=0; + if (c > 0x80 && c < 0xA0) { + sta = DRW_LeadTable932[c-0x81]; + end = DRW_LeadTable932[c-0x80]; + } else if (c > 0xDF && c < 0xFD){ + sta = DRW_LeadTable932[c-0xC1]; + end = DRW_LeadTable932[c-0xC0]; + } + if (end > 0) { + for (int k=sta; k + +class DRW_Converter; + +class DRW_TextCodec +{ +public: + DRW_TextCodec(); + ~DRW_TextCodec(); + std::string fromUtf8(std::string s); + std::string toUtf8(std::string s); + int getVersion(){return version;} + void setVersion(std::string *v); + void setVersion(int v){version = v;} + void setCodePage(std::string *c); + void setCodePage(std::string c){setCodePage(&c);} + std::string getCodePage(){return cp;} + +private: + std::string correctCodePage(const std::string& s); + +private: + int version; + std::string cp; + DRW_Converter *conv; +}; + +class DRW_Converter +{ +public: + DRW_Converter(const int *t, int l){table = t; + cpLenght = l;} + virtual ~DRW_Converter(){} + virtual std::string fromUtf8(std::string *s) {return *s;} + virtual std::string toUtf8(std::string *s); + std::string encodeText(std::string stmp); + std::string decodeText(int c); + std::string encodeNum(int c); + int decodeNum(std::string s, int *b); + const int *table; + int cpLenght; +}; + +class DRW_ConvTable : public DRW_Converter { +public: + DRW_ConvTable(const int *t, int l):DRW_Converter(t, l) {} + virtual std::string fromUtf8(std::string *s); + virtual std::string toUtf8(std::string *s); +}; + +class DRW_ConvDBCSTable : public DRW_Converter { +public: + DRW_ConvDBCSTable(const int *t, const int *lt, const int dt[][2], int l):DRW_Converter(t, l) { + leadTable = lt; + doubleTable = dt; + } + + virtual std::string fromUtf8(std::string *s); + virtual std::string toUtf8(std::string *s); +private: + const int *leadTable; + const int (*doubleTable)[2]; + +}; + +class DRW_Conv932Table : public DRW_Converter { +public: + DRW_Conv932Table(const int *t, const int *lt, const int dt[][2], int l):DRW_Converter(t, l) { + leadTable = lt; + doubleTable = dt; + } + + virtual std::string fromUtf8(std::string *s); + virtual std::string toUtf8(std::string *s); +private: + const int *leadTable; + const int (*doubleTable)[2]; + +}; + +#endif // DRW_TEXTCODEC_H diff --git a/lib_dxf/intern/dxfreader.cpp b/lib_dxf/intern/dxfreader.cpp new file mode 100644 index 0000000000..9a6669fa8f --- /dev/null +++ b/lib_dxf/intern/dxfreader.cpp @@ -0,0 +1,263 @@ +/****************************************************************************** +** libDXFrw - Library to read/write DXF files (ascii & binary) ** +** ** +** Copyright (C) 2011 Rallaz, rallazz@gmail.com ** +** ** +** This library is free software, licensed under the terms of the GNU ** +** General Public License as published by the Free Software Foundation, ** +** either version 2 of the License, or (at your option) any later version. ** +** You should have received a copy of the GNU General Public License ** +** along with this program. If not, see . ** +******************************************************************************/ + +#include +#include +#include +#include +#include "dxfreader.h" +#include "drw_textcodec.h" + +#ifdef DRW_DBG +#include //for debug +#define DBG(a) std::cerr << a +#else +#define DBG(a) +#endif + +bool dxfReader::readRec(int *codeData, bool skip) { +// std::string text; + int code; + +#ifdef DRW_DBG + count = count+2; //DBG +/* if (count > 10250) + DBG("line 10256");*/ +#endif + + if (!readCode(&code)) + return false; + *codeData = code; + + if (code < 10) + readString(); + else if (code < 60) + readDouble(); + else if (code < 80) + readInt(); + else if (code > 89 && code < 100) //TODO this is an int 32b + readInt32(); + else if (code == 100 || code == 102 || code == 105) + readString(); + else if (code > 109 && code < 150) //skip not used at the v2012 + readDouble(); + else if (code > 159 && code < 170) //skip not used at the v2012 + readInt64(); + else if (code < 180) + readInt(); + else if (code > 209 && code < 240) //skip not used at the v2012 + readDouble(); + else if (code > 269 && code < 290) //skip not used at the v2012 + readInt(); + else if (code < 300) //TODO this is a boolean indicator, int in Binary? + readBool(); + else if (code < 370) + readString(); + else if (code < 390) + readInt(); + else if (code < 400) + readString(); + else if (code < 410) + readInt(); + else if (code < 420) + readString(); + else if (code < 430) //TODO this is an int 32b + readInt32(); + else if (code < 440) + readString(); + else if (code < 450) //TODO this is an int 32b + readInt32(); + else if (code < 460) //TODO this is long?? + readInt(); + else if (code < 470) //TODO this is a floating point double precision?? + readDouble(); + else if (code < 481) + readString(); + else if (code > 998 && code < 1009) //skip not used at the v2012 + readString(); + else if (code < 1060) //TODO this is a floating point double precision?? + readDouble(); + else if (code < 1071) + readInt(); + else if (code == 1071) //TODO this is an int 32b + readInt32(); + else if (skip) + //skip safely this dxf entry ( ok for ascii dxf) + readString(); + else + //break in binary files because the conduct is unpredictable + return false; + + return (filestr->good()); +} +int dxfReader::getHandleString(){ + int res; +#if defined(__APPLE__) + int Succeeded = sscanf ( strData.c_str(), "%x", &res ); + if ( !Succeeded || Succeeded == EOF ) + res = 0; +#else + std::istringstream Convert(strData); + if ( !(Convert >> std::hex >>res) ) + res = 0; +#endif + return res; +} + +bool dxfReaderBinary::readCode(int *code) { + unsigned short *int16p; + char buffer[2]; + filestr->read(buffer,2); + int16p = (unsigned short *) buffer; +//exist a 32bits int (code 90) with 2 bytes??? + if ((*code == 90) && (*int16p>2000)){ + DBG(*code); DBG(" de 16bits\n"); + filestr->seekg(-4, std::ios_base::cur); + filestr->read(buffer,2); + int16p = (unsigned short *) buffer; + } + *code = *int16p; + DBG(*code); DBG("\n"); + + return (filestr->good()); +} + +bool dxfReaderBinary::readString() { + std::getline(*filestr, strData, '\0'); + DBG(strData); DBG("\n"); + return (filestr->good()); +} + +bool dxfReaderBinary::readString(std::string *text) { + std::getline(*filestr, *text, '\0'); + DBG(*text); DBG("\n"); + return (filestr->good()); +} + +bool dxfReaderBinary::readInt() { + char buffer[2]; + filestr->read(buffer,2); + intData = (int)((buffer[1] << 8) | buffer[0]); + DBG(intData); DBG("\n"); + return (filestr->good()); +} + +bool dxfReaderBinary::readInt32() { + unsigned int *int32p; + char buffer[4]; + filestr->read(buffer,4); + int32p = (unsigned int *) buffer; + intData = *int32p; + DBG(intData); DBG("\n"); + return (filestr->good()); +} + +bool dxfReaderBinary::readInt64() { + unsigned long long int *int64p; //64 bits integer pointer + char buffer[8]; + filestr->read(buffer,8); + int64p = (unsigned long long int *) buffer; + int64 = *int64p; + DBG(int64); DBG(" int64\n"); + return (filestr->good()); +} + +bool dxfReaderBinary::readDouble() { + double *result; + char buffer[8]; + filestr->read(buffer,8); + result = (double *) buffer; + doubleData = *result; + DBG(doubleData); DBG("\n"); + return (filestr->good()); +} + +//saved as int or add a bool member?? +bool dxfReaderBinary::readBool() { + char buffer[1]; + filestr->read(buffer,1); + intData = (int)(buffer[0]); + DBG(intData); DBG("\n"); + return (filestr->good()); +} + +bool dxfReaderAscii::readCode(int *code) { + std::string text; + std::getline(*filestr, text); + *code = atoi(text.c_str()); + DBG(*code); DBG("\n"); + return (filestr->good()); +} +bool dxfReaderAscii::readString(std::string *text) { + std::getline(*filestr, *text); + if (!text->empty() && text->at(text->size()-1) == '\r') + text->erase(text->size()-1); + return (filestr->good()); +} + +bool dxfReaderAscii::readString() { + std::getline(*filestr, strData); + if (!strData.empty() && strData.at(strData.size()-1) == '\r') + strData.erase(strData.size()-1); + DBG(strData); DBG("\n"); + return (filestr->good()); +} + +bool dxfReaderAscii::readInt() { + std::string text; + if (readString(&text)){ + intData = atoi(text.c_str()); + DBG(intData); DBG("\n"); + return true; + } else + return false; +} + +bool dxfReaderAscii::readInt32() { + return readInt(); +} + +bool dxfReaderAscii::readInt64() { + return readInt(); +} + +bool dxfReaderAscii::readDouble() { + std::string text; + if (readString(&text)){ +#if defined(__APPLE__) + int succeeded=sscanf( & (text[0]), "%lg", &doubleData); + if(succeeded != 1) { + DBG("dxfReaderAscii::readDouble(): reading double error: "); + DBG(text); + DBG('\n'); + } +#else + std::istringstream sd(text); + sd >> doubleData; + DBG(doubleData); DBG('\n'); +#endif + return true; + } else + return false; +} + +//saved as int or add a bool member?? +bool dxfReaderAscii::readBool() { + std::string text; + if (readString(&text)){ + intData = atoi(text.c_str()); + DBG(intData); DBG("\n"); + return true; + } else + return false; +} + diff --git a/lib_dxf/intern/dxfreader.h b/lib_dxf/intern/dxfreader.h new file mode 100644 index 0000000000..adfc9f1ae2 --- /dev/null +++ b/lib_dxf/intern/dxfreader.h @@ -0,0 +1,89 @@ +/****************************************************************************** +** libDXFrw - Library to read/write DXF files (ascii & binary) ** +** ** +** Copyright (C) 2011 Rallaz, rallazz@gmail.com ** +** ** +** This library is free software, licensed under the terms of the GNU ** +** General Public License as published by the Free Software Foundation, ** +** either version 2 of the License, or (at your option) any later version. ** +** You should have received a copy of the GNU General Public License ** +** along with this program. If not, see . ** +******************************************************************************/ + +#ifndef DXFREADER_H +#define DXFREADER_H + +#include "drw_textcodec.h" + +class dxfReader { +public: + dxfReader(std::ifstream *stream){ + filestr = stream; +#ifdef DRW_DBG + count =0; +#endif + } + virtual ~dxfReader(){} + virtual bool readCode(int *code) = 0; //return true if sucesful (not EOF) + virtual bool readString(std::string *text) = 0; + virtual bool readString() = 0; + bool readRec(int *code, bool skip); + virtual bool readInt() = 0; + virtual bool readInt32() = 0; + virtual bool readInt64() = 0; + virtual bool readDouble() = 0; + virtual bool readBool() = 0; + std::string getString() {return strData;} + int getHandleString();//Convert hex string to int + std::string toUtf8String(std::string t) {return decoder.toUtf8(t);} + std::string getUtf8String() {return decoder.toUtf8(strData);} + double getDouble() {return doubleData;} + int getInt32() {return intData;} + unsigned long long int getInt64() {return int64;} + bool getBool() { return (intData==0) ? false : true;} + int getVersion(){return decoder.getVersion();} + void setVersion(std::string *v){decoder.setVersion(v);} + void setCodePage(std::string *c){decoder.setCodePage(c);} + std::string getCodePage(){ return decoder.getCodePage();} +#ifdef DRW_DBG + int count;//DBG +#endif +protected: + std::ifstream *filestr; + std::string strData; + double doubleData; + signed short intData; //16 bits integer + unsigned long long int int64; //64 bits integer +private: + DRW_TextCodec decoder; +}; + +class dxfReaderBinary : public dxfReader { +public: + dxfReaderBinary(std::ifstream *stream):dxfReader(stream){ } + virtual ~dxfReaderBinary() {} + virtual bool readCode(int *code); + virtual bool readString(std::string *text); + virtual bool readString(); + virtual bool readInt(); + virtual bool readInt32(); + virtual bool readInt64(); + virtual bool readDouble(); + virtual bool readBool(); +}; + +class dxfReaderAscii : public dxfReader { +public: + dxfReaderAscii(std::ifstream *stream):dxfReader(stream){ } + virtual ~dxfReaderAscii(){} + virtual bool readCode(int *code); + virtual bool readString(std::string *text); + virtual bool readString(); + virtual bool readInt(); + virtual bool readDouble(); + virtual bool readInt32(); + virtual bool readInt64(); + virtual bool readBool(); +}; + +#endif // DXFREADER_H diff --git a/lib_dxf/intern/dxfwriter.cpp b/lib_dxf/intern/dxfwriter.cpp new file mode 100644 index 0000000000..398e9c2868 --- /dev/null +++ b/lib_dxf/intern/dxfwriter.cpp @@ -0,0 +1,281 @@ +/****************************************************************************** +** libDXFrw - Library to read/write DXF files (ascii & binary) ** +** ** +** Copyright (C) 2011 Rallaz, rallazz@gmail.com ** +** ** +** This library is free software, licensed under the terms of the GNU ** +** General Public License as published by the Free Software Foundation, ** +** either version 2 of the License, or (at your option) any later version. ** +** You should have received a copy of the GNU General Public License ** +** along with this program. If not, see . ** +******************************************************************************/ + +#include +#include +#include +#include +#include "dxfwriter.h" + +#ifdef DRW_DBG +#include //for debug +#define DBG(a) std::cerr << a +#else +#define DBG(a) +#endif + +//RLZ TODO change std::endl to x0D x0A (13 10) +/*bool dxfWriter::readRec(int *codeData, bool skip) { +// std::string text; + int code; + +#ifdef DRW_DBG + count = count+2; //DBG +#endif + + if (!readCode(&code)) + return false; + *codeData = code; + + if (code < 10) + readString(); + else if (code < 60) + readDouble(); + else if (code < 80) + readInt(); + else if (code > 89 && code < 100) //TODO this is an int 32b + readInt32(); + else if (code == 100 || code == 102 || code == 105) + readString(); + else if (code > 109 && code < 150) //skip not used at the v2012 + readDouble(); + else if (code > 159 && code < 170) //skip not used at the v2012 + readInt64(); + else if (code < 180) + readInt(); + else if (code > 209 && code < 240) //skip not used at the v2012 + readDouble(); + else if (code > 269 && code < 290) //skip not used at the v2012 + readInt(); + else if (code < 300) //TODO this is a boolean indicator, int in Binary? + readBool(); + else if (code < 370) + readString(); + else if (code < 390) + readInt(); + else if (code < 400) + readString(); + else if (code < 410) + readInt(); + else if (code < 420) + readString(); + else if (code < 430) //TODO this is an int 32b + readInt32(); + else if (code < 440) + readString(); + else if (code < 450) //TODO this is an int 32b + readInt32(); + else if (code < 460) //TODO this is long?? + readInt(); + else if (code < 470) //TODO this is a floating point double precision?? + readDouble(); + else if (code < 481) + readString(); + else if (code > 998 && code < 1009) //skip not used at the v2012 + readString(); + else if (code < 1060) //TODO this is a floating point double precision?? + readDouble(); + else if (code < 1071) + readInt(); + else if (code == 1071) //TODO this is an int 32b + readInt32(); + else if (skip) + //skip safely this dxf entry ( ok for ascii dxf) + readString(); + else + //break in binary files because the conduct is unpredictable + return false; + + return (filestr->good()); +}*/ + +bool dxfWriter::writeUtf8String(int code, std::string text) { + std::string t = encoder.fromUtf8(text); + return writeString(code, t); +} + +bool dxfWriter::writeUtf8Caps(int code, std::string text) { + std::string strname = text; + std::transform(strname.begin(), strname.end(), strname.begin(),::toupper); + std::string t = encoder.fromUtf8(strname); + return writeString(code, t); +} + +bool dxfWriterBinary::writeString(int code, std::string text) { + char bufcode[2]; + bufcode[0] =code & 0xFF; + bufcode[1] =code >> 8; + filestr->write(bufcode, 2); + *filestr << text << '\0'; + return (filestr->good()); +} + +/*bool dxfWriterBinary::readCode(int *code) { + unsigned short *int16p; + char buffer[2]; + filestr->read(buffer,2); + int16p = (unsigned short *) buffer; +//exist a 32bits int (code 90) with 2 bytes??? + if ((*code == 90) && (*int16p>2000)){ + DBG(*code); DBG(" de 16bits\n"); + filestr->seekg(-4, std::ios_base::cur); + filestr->read(buffer,2); + int16p = (unsigned short *) buffer; + } + *code = *int16p; + DBG(*code); DBG("\n"); + + return (filestr->good()); +}*/ + +/*bool dxfWriterBinary::readString() { + std::getline(*filestr, strData, '\0'); + DBG(strData); DBG("\n"); + return (filestr->good()); +}*/ + +/*bool dxfWriterBinary::readString(std::string *text) { + std::getline(*filestr, *text, '\0'); + DBG(*text); DBG("\n"); + return (filestr->good()); +}*/ + +bool dxfWriterBinary::writeInt16(int code, int data) { + char bufcode[2]; + char buffer[2]; + bufcode[0] =code & 0xFF; + bufcode[1] =code >> 8; + buffer[0] =data & 0xFF; + buffer[1] =data >> 8; + filestr->write(bufcode, 2); + filestr->write(buffer, 2); + return (filestr->good()); +} + +bool dxfWriterBinary::writeInt32(int code, int data) { + char buffer[4]; + buffer[0] =code & 0xFF; + buffer[1] =code >> 8; + filestr->write(buffer, 2); + + buffer[0] =data & 0xFF; + buffer[1] =data >> 8; + buffer[2] =data >> 16; + buffer[3] =data >> 24; + filestr->write(buffer, 4); + return (filestr->good()); +} + +bool dxfWriterBinary::writeInt64(int code, unsigned long long int data) { + char buffer[8]; + buffer[0] =code & 0xFF; + buffer[1] =code >> 8; + filestr->write(buffer, 2); + + buffer[0] =data & 0xFF; + buffer[1] =data >> 8; + buffer[2] =data >> 16; + buffer[3] =data >> 24; + buffer[4] =data >> 32; + buffer[5] =data >> 40; + buffer[6] =data >> 48; + buffer[7] =data >> 56; + filestr->write(buffer, 8); + return (filestr->good()); +} + +bool dxfWriterBinary::writeDouble(int code, double data) { + char bufcode[2]; + char buffer[8]; + bufcode[0] =code & 0xFF; + bufcode[1] =code >> 8; + filestr->write(bufcode, 2); + + unsigned char *val; + val = (unsigned char *) &data; + for (int i=0; i<8; i++) { + buffer[i] =val[i]; + } + filestr->write(buffer, 8); + return (filestr->good()); +} + +//saved as int or add a bool member?? +bool dxfWriterBinary::writeBool(int code, bool data) { + char buffer[1]; + char bufcode[2]; + bufcode[0] =code & 0xFF; + bufcode[1] =code >> 8; + filestr->write(bufcode, 2); + buffer[0] = data; + filestr->write(buffer, 1); + return (filestr->good()); +} + +bool dxfWriterAscii::writeString(int code, std::string text) { + *filestr << code << std::endl << text << std::endl ; + /* std::getline(*filestr, strData, '\0'); + DBG(strData); DBG("\n");*/ + return (filestr->good()); +} + +/*bool dxfWriterAscii::readCode(int *code) { + std::string text; + std::getline(*filestr, text); + *code = atoi(text.c_str()); + DBG(*code); DBG("\n"); + return (filestr->good()); +}*/ +/*bool dxfWriterAscii::readString(std::string *text) { + std::getline(*filestr, *text); + if (text->at(text->size()-1) == '\r') + text->erase(text->size()-1); + return (filestr->good()); +}*/ + +/*bool dxfWriterAscii::readString() { + std::getline(*filestr, strData); + if (strData.at(strData.size()-1) == '\r') + strData.erase(strData.size()-1); + DBG(strData); DBG("\n"); + return (filestr->good()); +}*/ + +bool dxfWriterAscii::writeInt16(int code, int data) { +// *filestr << code << "\r\n" << data << "\r\n"; + *filestr << code << std::endl << data << std::endl; + return (filestr->good()); +} + +bool dxfWriterAscii::writeInt32(int code, int data) { + return writeInt16(code, data); +} + +bool dxfWriterAscii::writeInt64(int code, unsigned long long int data) { + *filestr << code << std::endl << data << std::endl; + return (filestr->good()); +} + +bool dxfWriterAscii::writeDouble(int code, double data) { + std::streamsize prec = filestr->precision(); + filestr->precision(12); + *filestr << code << std::endl << data << std::endl; + filestr->precision(prec); + return (filestr->good()); +} + +//saved as int or add a bool member?? +bool dxfWriterAscii::writeBool(int code, bool data) { + *filestr << code << std::endl << data << std::endl; + return (filestr->good()); +} + diff --git a/lib_dxf/intern/dxfwriter.h b/lib_dxf/intern/dxfwriter.h new file mode 100644 index 0000000000..1f398c795d --- /dev/null +++ b/lib_dxf/intern/dxfwriter.h @@ -0,0 +1,64 @@ +/****************************************************************************** +** libDXFrw - Library to read/write DXF files (ascii & binary) ** +** ** +** Copyright (C) 2011 Rallaz, rallazz@gmail.com ** +** ** +** This library is free software, licensed under the terms of the GNU ** +** General Public License as published by the Free Software Foundation, ** +** either version 2 of the License, or (at your option) any later version. ** +** You should have received a copy of the GNU General Public License ** +** along with this program. If not, see . ** +******************************************************************************/ + +#ifndef DXFWRITER_H +#define DXFWRITER_H + +#include "drw_textcodec.h" + +class dxfWriter { +public: + dxfWriter(std::ofstream *stream){filestr = stream; /*count =0;*/} + virtual ~dxfWriter(){} + virtual bool writeString(int code, std::string text) = 0; + bool writeUtf8String(int code, std::string text); + bool writeUtf8Caps(int code, std::string text); + std::string fromUtf8String(std::string t) {return encoder.fromUtf8(t);} + virtual bool writeInt16(int code, int data) = 0; + virtual bool writeInt32(int code, int data) = 0; + virtual bool writeInt64(int code, unsigned long long int data) = 0; + virtual bool writeDouble(int code, double data) = 0; + virtual bool writeBool(int code, bool data) = 0; + void setVersion(std::string *v){encoder.setVersion(v);} + void setCodePage(std::string *c){encoder.setCodePage(c);} + std::string getCodePage(){return encoder.getCodePage();} +protected: + std::ofstream *filestr; +private: + DRW_TextCodec encoder; +}; + +class dxfWriterBinary : public dxfWriter { +public: + dxfWriterBinary(std::ofstream *stream):dxfWriter(stream){ } + virtual ~dxfWriterBinary() {} + virtual bool writeString(int code, std::string text); + virtual bool writeInt16(int code, int data); + virtual bool writeInt32(int code, int data); + virtual bool writeInt64(int code, unsigned long long int data); + virtual bool writeDouble(int code, double data); + virtual bool writeBool(int code, bool data); +}; + +class dxfWriterAscii : public dxfWriter { +public: + dxfWriterAscii(std::ofstream *stream):dxfWriter(stream){ } + virtual ~dxfWriterAscii(){} + virtual bool writeString(int code, std::string text); + virtual bool writeInt16(int code, int data); + virtual bool writeInt32(int code, int data); + virtual bool writeInt64(int code, unsigned long long int data); + virtual bool writeDouble(int code, double data); + virtual bool writeBool(int code, bool data); +}; + +#endif // DXFWRITER_H diff --git a/lib_dxf/libdxfrw.cpp b/lib_dxf/libdxfrw.cpp new file mode 100644 index 0000000000..37201da5d1 --- /dev/null +++ b/lib_dxf/libdxfrw.cpp @@ -0,0 +1,3818 @@ +/****************************************************************************** +** libDXFrw - Library to read/write DXF files (ascii & binary) ** +** ** +** Copyright (C) 2011 Rallaz, rallazz@gmail.com ** +** ** +** This library is free software, licensed under the terms of the GNU ** +** General Public License as published by the Free Software Foundation, ** +** either version 2 of the License, or (at your option) any later version. ** +** You should have received a copy of the GNU General Public License ** +** along with this program. If not, see . ** +******************************************************************************/ + + +#include "libdxfrw.h" +#include +#include +#include +#include "intern/drw_textcodec.h" +#include "intern/dxfreader.h" +#include "intern/dxfwriter.h" +#include + +#ifdef DRW_DBG +#include // for debug +#define DBG( a ) std::cerr << a +#else +#define DBG( a ) +#endif + +#define FIRSTHANDLE 48 + +/*enum sections { + * secUnknown, + * secHeader, + * secTables, + * secBlocks, + * secEntities, + * secObjects + * };*/ + +dxfRW::dxfRW( const char* name ) +{ + fileName = name; + reader = NULL; + writer = NULL; + applyExt = false; + elParts = 128; // parts munber when convert ellipse to polyline +} + + +dxfRW::~dxfRW() +{ + if( reader != NULL ) + delete reader; +} + + +bool dxfRW::read( DRW_Interface* interface_, bool ext ) +{ + assert( fileName.empty() == false ); + bool isOk = false; + applyExt = ext; + std::ifstream filestr; + + if( interface_ == NULL ) + return isOk; + + DBG( "dxfRW::read 1def\n" ); + filestr.open( fileName.c_str(), std::ios_base::in | std::ios::binary ); + + if( !filestr.is_open() ) + return isOk; + + if( !filestr.good() ) + return isOk; + + char line[22]; + char line2[22] = "AutoCAD Binary DXF\r\n"; + line2[20] = (char) 26; + line2[21] = '\0'; + filestr.read( line, 22 ); + filestr.close(); + iface = interface_; + DBG( "dxfRW::read 2\n" ); + + if( strcmp( line, line2 ) == 0 ) + { + filestr.open( fileName.c_str(), std::ios_base::in | std::ios::binary ); + binary = true; + // skip sentinel + filestr.seekg( 22, std::ios::beg ); + reader = new dxfReaderBinary( &filestr ); + DBG( "dxfRW::read binary file\n" ); + } + else + { + binary = false; + filestr.open( fileName.c_str(), std::ios_base::in ); + reader = new dxfReaderAscii( &filestr ); + } + + isOk = processDxf(); + filestr.close(); + delete reader; + reader = NULL; + return isOk; +} + + +bool dxfRW::write( DRW_Interface* interface_, DRW::Version ver, bool bin ) +{ + bool isOk = false; + std::ofstream filestr; + + version = ver; + binary = bin; + iface = interface_; + + if( binary ) + { + filestr.open( fileName.c_str(), std::ios_base::out | std::ios::binary | std::ios::trunc ); + // write sentinel + filestr << "AutoCAD Binary DXF\r\n" << (char) 26 << '\0'; + writer = new dxfWriterBinary( &filestr ); + DBG( "dxfRW::read binary file\n" ); + } + else + { + filestr.open( fileName.c_str(), std::ios_base::out | std::ios::trunc ); + writer = new dxfWriterAscii( &filestr ); + std::string comm = std::string( "dxfrw " ) + std::string( DRW_VERSION ); + writer->writeString( 999, comm ); + } + + DRW_Header header; + iface->writeHeader( header ); + writer->writeString( 0, "SECTION" ); + entCount = FIRSTHANDLE; + header.write( writer, version ); + writer->writeString( 0, "ENDSEC" ); + writer->writeString( 0, "SECTION" ); + writer->writeString( 2, "CLASSES" ); + writer->writeString( 0, "ENDSEC" ); + writer->writeString( 0, "SECTION" ); + writer->writeString( 2, "TABLES" ); + writeTables(); + writer->writeString( 0, "ENDSEC" ); + writer->writeString( 0, "SECTION" ); + writer->writeString( 2, "BLOCKS" ); + writeBlocks(); + writer->writeString( 0, "ENDSEC" ); + + writer->writeString( 0, "SECTION" ); + writer->writeString( 2, "ENTITIES" ); + iface->writeEntities(); + writer->writeString( 0, "ENDSEC" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 0, "SECTION" ); + writer->writeString( 2, "OBJECTS" ); + writeObjects(); + writer->writeString( 0, "ENDSEC" ); + } + + writer->writeString( 0, "EOF" ); + filestr.flush(); + filestr.close(); + isOk = true; + delete writer; + writer = NULL; + return isOk; +} + + +bool dxfRW::writeEntity( DRW_Entity* ent ) +{ + ent->handle = ++entCount; + writer->writeString( 5, toHexStr( ent->handle ) ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbEntity" ); + } + + if( ent->space == 1 ) + writer->writeInt16( 67, 1 ); + + if( version > DRW::AC1009 ) + { + writer->writeUtf8String( 8, ent->layer ); + writer->writeUtf8String( 6, ent->lineType ); + } + else + { + writer->writeUtf8Caps( 8, ent->layer ); + writer->writeUtf8Caps( 6, ent->lineType ); + } + + writer->writeInt16( 62, ent->color ); + + if( version > DRW::AC1015 && ent->color24 >= 0 ) + { + writer->writeInt32( 420, ent->color24 ); + } + + if( version > DRW::AC1014 ) + { + writer->writeInt16( 370, DRW_LW_Conv::lineWidth2dxfInt( ent->lWeight ) ); + } + + return true; +} + + +bool dxfRW::writeLineType( DRW_LType* ent ) +{ + string strname = ent->name; + + transform( strname.begin(), strname.end(), strname.begin(), ::toupper ); + +// do not write linetypes handled by library + if( strname == "BYLAYER" || strname == "BYBLOCK" || strname == "CONTINUOUS" ) + { + return true; + } + + writer->writeString( 0, "LTYPE" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 5, toHexStr( ++entCount ) ); + + if( version > DRW::AC1012 ) + { + writer->writeString( 330, "5" ); + } + + writer->writeString( 100, "AcDbSymbolTableRecord" ); + writer->writeString( 100, "AcDbLinetypeTableRecord" ); + writer->writeUtf8String( 2, ent->name ); + } + else + writer->writeUtf8Caps( 2, ent->name ); + + writer->writeInt16( 70, ent->flags ); + writer->writeUtf8String( 3, ent->desc ); + ent->update(); + writer->writeInt16( 72, 65 ); + writer->writeInt16( 73, ent->size ); + writer->writeDouble( 40, ent->length ); + + for( unsigned int i = 0; i< ent->path.size(); i++ ) + { + writer->writeDouble( 49, ent->path.at( i ) ); + + if( version > DRW::AC1009 ) + { + writer->writeInt16( 74, 0 ); + } + } + + return true; +} + + +bool dxfRW::writeLayer( DRW_Layer* ent ) +{ + writer->writeString( 0, "LAYER" ); + + if( !wlayer0 && ent->name == "0" ) + { + wlayer0 = true; + + if( version > DRW::AC1009 ) + { + writer->writeString( 5, "10" ); + } + } + else + { + if( version > DRW::AC1009 ) + { + writer->writeString( 5, toHexStr( ++entCount ) ); + } + } + + if( version > DRW::AC1012 ) + { + writer->writeString( 330, "2" ); + } + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbSymbolTableRecord" ); + writer->writeString( 100, "AcDbLayerTableRecord" ); + writer->writeUtf8String( 2, ent->name ); + } + else + { + writer->writeUtf8Caps( 2, ent->name ); + } + + writer->writeInt16( 70, ent->flags ); + writer->writeInt16( 62, ent->color ); + + if( version > DRW::AC1015 && ent->color24 >= 0 ) + { + writer->writeInt32( 420, ent->color24 ); + } + + if( version > DRW::AC1009 ) + { + writer->writeUtf8String( 6, ent->lineType ); + + if( !ent->plotF ) + writer->writeBool( 290, ent->plotF ); + + writer->writeInt16( 370, DRW_LW_Conv::lineWidth2dxfInt( ent->lWeight ) ); + writer->writeString( 390, "F" ); + } + else + writer->writeUtf8Caps( 6, ent->lineType ); + +// writer->writeString(347, "10012"); + return true; +} + + +bool dxfRW::writeTextstyle( DRW_Textstyle* ent ) +{ + writer->writeString( 0, "STYLE" ); + + if( !dimstyleStd ) + { + // stringstream cause crash in OS/X, bug#3597944 + std::string name = ent->name; + transform( name.begin(), name.end(), name.begin(), toupper ); + + if( name == "STANDARD" ) + dimstyleStd = true; + } + + if( version > DRW::AC1009 ) + { + writer->writeString( 5, toHexStr( ++entCount ) ); + } + + if( version > DRW::AC1012 ) + { + writer->writeString( 330, "2" ); + } + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbSymbolTableRecord" ); + writer->writeString( 100, "AcDbTextStyleTableRecord" ); + writer->writeUtf8String( 2, ent->name ); + } + else + { + writer->writeUtf8Caps( 2, ent->name ); + } + + writer->writeInt16( 70, ent->flags ); + writer->writeDouble( 40, ent->height ); + writer->writeDouble( 41, ent->width ); + writer->writeDouble( 50, ent->oblique ); + writer->writeInt16( 71, ent->genFlag ); + writer->writeDouble( 42, ent->lastHeight ); + + if( version > DRW::AC1009 ) + { + writer->writeUtf8String( 3, ent->font ); + writer->writeUtf8String( 4, ent->bigFont ); + + if( ent->fontFamily != 0 ) + writer->writeInt32( 1071, ent->fontFamily ); + } + else + { + writer->writeUtf8Caps( 3, ent->font ); + writer->writeUtf8Caps( 4, ent->bigFont ); + } + + return true; +} + + +bool dxfRW::writeVport( DRW_Vport* ent ) +{ + if( !dimstyleStd ) + { + ent->name = "*ACTIVE"; + dimstyleStd = true; + } + + writer->writeString( 0, "VPORT" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 5, toHexStr( ++entCount ) ); + + if( version > DRW::AC1012 ) + writer->writeString( 330, "2" ); + + writer->writeString( 100, "AcDbSymbolTableRecord" ); + writer->writeString( 100, "AcDbViewportTableRecord" ); + writer->writeUtf8String( 2, ent->name ); + } + else + writer->writeUtf8Caps( 2, ent->name ); + + writer->writeInt16( 70, ent->flags ); + writer->writeDouble( 10, ent->lowerLeft.x ); + writer->writeDouble( 20, ent->lowerLeft.y ); + writer->writeDouble( 11, ent->UpperRight.x ); + writer->writeDouble( 21, ent->UpperRight.y ); + writer->writeDouble( 12, ent->center.x ); + writer->writeDouble( 22, ent->center.y ); + writer->writeDouble( 13, ent->snapBase.x ); + writer->writeDouble( 23, ent->snapBase.y ); + writer->writeDouble( 14, ent->snapSpacing.x ); + writer->writeDouble( 24, ent->snapSpacing.y ); + writer->writeDouble( 15, ent->gridSpacing.x ); + writer->writeDouble( 25, ent->gridSpacing.y ); + writer->writeDouble( 16, ent->viewDir.x ); + writer->writeDouble( 26, ent->viewDir.y ); + writer->writeDouble( 36, ent->viewDir.z ); + writer->writeDouble( 17, ent->viewTarget.z ); + writer->writeDouble( 27, ent->viewTarget.z ); + writer->writeDouble( 37, ent->viewTarget.z ); + writer->writeDouble( 40, ent->height ); + writer->writeDouble( 41, ent->ratio ); + writer->writeDouble( 42, ent->lensHeight ); + writer->writeDouble( 43, ent->frontClip ); + writer->writeDouble( 44, ent->backClip ); + writer->writeDouble( 50, ent->snapAngle ); + writer->writeDouble( 51, ent->twistAngle ); + writer->writeInt16( 71, ent->viewMode ); + writer->writeInt16( 72, ent->circleZoom ); + writer->writeInt16( 73, ent->fastZoom ); + writer->writeInt16( 74, ent->ucsIcon ); + writer->writeInt16( 75, ent->snap ); + writer->writeInt16( 76, ent->grid ); + writer->writeInt16( 77, ent->snapStyle ); + writer->writeInt16( 78, ent->snapIsopair ); + + if( version > DRW::AC1014 ) + { + writer->writeInt16( 281, 0 ); + writer->writeInt16( 65, 1 ); + writer->writeDouble( 110, 0.0 ); + writer->writeDouble( 120, 0.0 ); + writer->writeDouble( 130, 0.0 ); + writer->writeDouble( 111, 1.0 ); + writer->writeDouble( 121, 0.0 ); + writer->writeDouble( 131, 0.0 ); + writer->writeDouble( 112, 0.0 ); + writer->writeDouble( 122, 1.0 ); + writer->writeDouble( 132, 0.0 ); + writer->writeInt16( 79, 0 ); + writer->writeDouble( 146, 0.0 ); + + if( version > DRW::AC1018 ) + { + writer->writeString( 348, "10020" ); + writer->writeInt16( 60, ent->gridBehavior ); // v2007 undocummented see DRW_Vport class + writer->writeInt16( 61, 5 ); + writer->writeBool( 292, 1 ); + writer->writeInt16( 282, 1 ); + writer->writeDouble( 141, 0.0 ); + writer->writeDouble( 142, 0.0 ); + writer->writeInt16( 63, 250 ); + writer->writeInt32( 421, 3358443 ); + } + } + + return true; +} + + +bool dxfRW::writeDimstyle( DRW_Dimstyle* ent ) +{ + writer->writeString( 0, "DIMSTYLE" ); + + if( !dimstyleStd ) + { + std::string name = ent->name; + std::transform( name.begin(), name.end(), name.begin(), ::toupper ); + + if( name == "STANDARD" ) + dimstyleStd = true; + } + + if( version > DRW::AC1009 ) + { + writer->writeString( 105, toHexStr( ++entCount ) ); + } + + if( version > DRW::AC1012 ) + { + writer->writeString( 330, "A" ); + } + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbSymbolTableRecord" ); + writer->writeString( 100, "AcDbDimStyleTableRecord" ); + writer->writeUtf8String( 2, ent->name ); + } + else + writer->writeUtf8Caps( 2, ent->name ); + + writer->writeInt16( 70, ent->flags ); + + if( version == DRW::AC1009 || !( ent->dimpost.empty() ) ) + writer->writeUtf8String( 3, ent->dimpost ); + + if( version == DRW::AC1009 || !( ent->dimapost.empty() ) ) + writer->writeUtf8String( 4, ent->dimapost ); + + if( version == DRW::AC1009 || !( ent->dimblk.empty() ) ) + writer->writeUtf8String( 5, ent->dimblk ); + + if( version == DRW::AC1009 || !( ent->dimblk1.empty() ) ) + writer->writeUtf8String( 6, ent->dimblk1 ); + + if( version == DRW::AC1009 || !( ent->dimblk2.empty() ) ) + writer->writeUtf8String( 7, ent->dimblk2 ); + + writer->writeDouble( 40, ent->dimscale ); + writer->writeDouble( 41, ent->dimasz ); + writer->writeDouble( 42, ent->dimexo ); + writer->writeDouble( 43, ent->dimdli ); + writer->writeDouble( 44, ent->dimexe ); + writer->writeDouble( 45, ent->dimrnd ); + writer->writeDouble( 46, ent->dimdle ); + writer->writeDouble( 47, ent->dimtp ); + writer->writeDouble( 48, ent->dimtm ); + writer->writeDouble( 140, ent->dimtxt ); + writer->writeDouble( 141, ent->dimcen ); + writer->writeDouble( 142, ent->dimtsz ); + writer->writeDouble( 143, ent->dimaltf ); + writer->writeDouble( 144, ent->dimlfac ); + writer->writeDouble( 145, ent->dimtvp ); + writer->writeDouble( 146, ent->dimtfac ); + writer->writeDouble( 147, ent->dimgap ); + + if( version > DRW::AC1014 ) + { + writer->writeDouble( 148, ent->dimaltrnd ); + } + + writer->writeInt16( 71, ent->dimtol ); + writer->writeInt16( 72, ent->dimlim ); + writer->writeInt16( 73, ent->dimtih ); + writer->writeInt16( 74, ent->dimtoh ); + writer->writeInt16( 75, ent->dimse1 ); + writer->writeInt16( 76, ent->dimse2 ); + writer->writeInt16( 77, ent->dimtad ); + writer->writeInt16( 78, ent->dimzin ); + + if( version > DRW::AC1014 ) + { + writer->writeInt16( 79, ent->dimazin ); + } + + writer->writeInt16( 170, ent->dimalt ); + writer->writeInt16( 171, ent->dimaltd ); + writer->writeInt16( 172, ent->dimtofl ); + writer->writeInt16( 173, ent->dimsah ); + writer->writeInt16( 174, ent->dimtix ); + writer->writeInt16( 175, ent->dimsoxd ); + writer->writeInt16( 176, ent->dimclrd ); + writer->writeInt16( 177, ent->dimclre ); + writer->writeInt16( 178, ent->dimclrt ); + + if( version > DRW::AC1014 ) + { + writer->writeInt16( 179, ent->dimadec ); + } + + if( version > DRW::AC1009 ) + { + if( version < DRW::AC1015 ) + writer->writeInt16( 270, ent->dimunit ); + + writer->writeInt16( 271, ent->dimdec ); + writer->writeInt16( 272, ent->dimtdec ); + writer->writeInt16( 273, ent->dimaltu ); + writer->writeInt16( 274, ent->dimalttd ); + writer->writeInt16( 275, ent->dimaunit ); + } + + if( version > DRW::AC1014 ) + { + writer->writeInt16( 276, ent->dimfrac ); + writer->writeInt16( 277, ent->dimlunit ); + writer->writeInt16( 278, ent->dimdsep ); + writer->writeInt16( 279, ent->dimtmove ); + } + + if( version > DRW::AC1009 ) + { + writer->writeInt16( 280, ent->dimjust ); + writer->writeInt16( 281, ent->dimsd1 ); + writer->writeInt16( 282, ent->dimsd2 ); + writer->writeInt16( 283, ent->dimtolj ); + writer->writeInt16( 284, ent->dimtzin ); + writer->writeInt16( 285, ent->dimaltz ); + writer->writeInt16( 286, ent->dimaltttz ); + + if( version < DRW::AC1015 ) + writer->writeInt16( 287, ent->dimfit ); + + writer->writeInt16( 288, ent->dimupt ); + } + + if( version > DRW::AC1014 ) + { + writer->writeInt16( 289, ent->dimatfit ); + } + + if( version > DRW::AC1009 ) + { + writer->writeUtf8String( 340, ent->dimtxsty ); + } + + if( version > DRW::AC1014 ) + { + writer->writeUtf8String( 341, ent->dimldrblk ); + writer->writeInt16( 371, ent->dimlwd ); + writer->writeInt16( 372, ent->dimlwe ); + } + + return true; +} + + +bool dxfRW::writePoint( DRW_Point* ent ) +{ + writer->writeString( 0, "POINT" ); + writeEntity( ent ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbPoint" ); + } + + writer->writeDouble( 10, ent->basePoint.x ); + writer->writeDouble( 20, ent->basePoint.y ); + + if( ent->basePoint.z != 0.0 ) + { + writer->writeDouble( 30, ent->basePoint.z ); + } + + return true; +} + + +bool dxfRW::writeLine( DRW_Line* ent ) +{ + writer->writeString( 0, "LINE" ); + writeEntity( ent ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbLine" ); + } + + writer->writeDouble( 10, ent->basePoint.x ); + writer->writeDouble( 20, ent->basePoint.y ); + + if( ent->basePoint.z != 0.0 || ent->secPoint.z != 0.0 ) + { + writer->writeDouble( 30, ent->basePoint.z ); + writer->writeDouble( 11, ent->secPoint.x ); + writer->writeDouble( 21, ent->secPoint.y ); + writer->writeDouble( 31, ent->secPoint.z ); + } + else + { + writer->writeDouble( 11, ent->secPoint.x ); + writer->writeDouble( 21, ent->secPoint.y ); + } + + return true; +} + + +bool dxfRW::writeRay( DRW_Ray* ent ) +{ + writer->writeString( 0, "RAY" ); + writeEntity( ent ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbRay" ); + } + + DRW_Coord crd = ent->secPoint; + crd.unitize(); + writer->writeDouble( 10, ent->basePoint.x ); + writer->writeDouble( 20, ent->basePoint.y ); + + if( ent->basePoint.z != 0.0 || ent->secPoint.z != 0.0 ) + { + writer->writeDouble( 30, ent->basePoint.z ); + writer->writeDouble( 11, crd.x ); + writer->writeDouble( 21, crd.y ); + writer->writeDouble( 31, crd.z ); + } + else + { + writer->writeDouble( 11, crd.x ); + writer->writeDouble( 21, crd.y ); + } + + return true; +} + + +bool dxfRW::writeXline( DRW_Xline* ent ) +{ + writer->writeString( 0, "XLINE" ); + writeEntity( ent ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbXline" ); + } + + DRW_Coord crd = ent->secPoint; + crd.unitize(); + writer->writeDouble( 10, ent->basePoint.x ); + writer->writeDouble( 20, ent->basePoint.y ); + + if( ent->basePoint.z != 0.0 || ent->secPoint.z != 0.0 ) + { + writer->writeDouble( 30, ent->basePoint.z ); + writer->writeDouble( 11, crd.x ); + writer->writeDouble( 21, crd.y ); + writer->writeDouble( 31, crd.z ); + } + else + { + writer->writeDouble( 11, crd.x ); + writer->writeDouble( 21, crd.y ); + } + + return true; +} + + +bool dxfRW::writeCircle( DRW_Circle* ent ) +{ + writer->writeString( 0, "CIRCLE" ); + writeEntity( ent ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbCircle" ); + } + + writer->writeDouble( 10, ent->basePoint.x ); + writer->writeDouble( 20, ent->basePoint.y ); + + if( ent->basePoint.z != 0.0 ) + { + writer->writeDouble( 30, ent->basePoint.z ); + } + + writer->writeDouble( 40, ent->radious ); + return true; +} + + +bool dxfRW::writeArc( DRW_Arc* ent ) +{ + writer->writeString( 0, "ARC" ); + writeEntity( ent ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbCircle" ); + } + + writer->writeDouble( 10, ent->basePoint.x ); + writer->writeDouble( 20, ent->basePoint.y ); + + if( ent->basePoint.z != 0.0 ) + { + writer->writeDouble( 30, ent->basePoint.z ); + } + + writer->writeDouble( 40, ent->radious ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbArc" ); + } + + writer->writeDouble( 50, ent->staangle * ARAD ); + writer->writeDouble( 51, ent->endangle * ARAD ); + return true; +} + + +bool dxfRW::writeEllipse( DRW_Ellipse* ent ) +{ + // verify axis/ratio and params for full ellipse + ent->correctAxis(); + + if( version > DRW::AC1009 ) + { + writer->writeString( 0, "ELLIPSE" ); + writeEntity( ent ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbEllipse" ); + } + + writer->writeDouble( 10, ent->basePoint.x ); + writer->writeDouble( 20, ent->basePoint.y ); + writer->writeDouble( 30, ent->basePoint.z ); + writer->writeDouble( 11, ent->secPoint.x ); + writer->writeDouble( 21, ent->secPoint.y ); + writer->writeDouble( 31, ent->secPoint.z ); + writer->writeDouble( 40, ent->ratio ); + writer->writeDouble( 41, ent->staparam ); + writer->writeDouble( 42, ent->endparam ); + } + else + { + DRW_Polyline pol; + // RLZ: copy properties + ent->toPolyline( &pol, elParts ); + writePolyline( &pol ); + } + + return true; +} + + +bool dxfRW::writeTrace( DRW_Trace* ent ) +{ + writer->writeString( 0, "TRACE" ); + writeEntity( ent ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbTrace" ); + } + + writer->writeDouble( 10, ent->basePoint.x ); + writer->writeDouble( 20, ent->basePoint.y ); + writer->writeDouble( 30, ent->basePoint.z ); + writer->writeDouble( 11, ent->secPoint.x ); + writer->writeDouble( 21, ent->secPoint.y ); + writer->writeDouble( 31, ent->secPoint.z ); + writer->writeDouble( 12, ent->thirdPoint.x ); + writer->writeDouble( 22, ent->thirdPoint.y ); + writer->writeDouble( 32, ent->thirdPoint.z ); + writer->writeDouble( 13, ent->fourPoint.x ); + writer->writeDouble( 23, ent->fourPoint.y ); + writer->writeDouble( 33, ent->fourPoint.z ); + return true; +} + + +bool dxfRW::writeSolid( DRW_Solid* ent ) +{ + writer->writeString( 0, "SOLID" ); + writeEntity( ent ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbTrace" ); + } + + writer->writeDouble( 10, ent->basePoint.x ); + writer->writeDouble( 20, ent->basePoint.y ); + writer->writeDouble( 30, ent->basePoint.z ); + writer->writeDouble( 11, ent->secPoint.x ); + writer->writeDouble( 21, ent->secPoint.y ); + writer->writeDouble( 31, ent->secPoint.z ); + writer->writeDouble( 12, ent->thirdPoint.x ); + writer->writeDouble( 22, ent->thirdPoint.y ); + writer->writeDouble( 32, ent->thirdPoint.z ); + writer->writeDouble( 13, ent->fourPoint.x ); + writer->writeDouble( 23, ent->fourPoint.y ); + writer->writeDouble( 33, ent->fourPoint.z ); + return true; +} + + +bool dxfRW::write3dface( DRW_3Dface* ent ) +{ + writer->writeString( 0, "3DFACE" ); + writeEntity( ent ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbFace" ); + } + + writer->writeDouble( 10, ent->basePoint.x ); + writer->writeDouble( 20, ent->basePoint.y ); + writer->writeDouble( 30, ent->basePoint.z ); + writer->writeDouble( 11, ent->secPoint.x ); + writer->writeDouble( 21, ent->secPoint.y ); + writer->writeDouble( 31, ent->secPoint.z ); + writer->writeDouble( 12, ent->thirdPoint.x ); + writer->writeDouble( 22, ent->thirdPoint.y ); + writer->writeDouble( 32, ent->thirdPoint.z ); + writer->writeDouble( 13, ent->fourPoint.x ); + writer->writeDouble( 23, ent->fourPoint.y ); + writer->writeDouble( 33, ent->fourPoint.z ); + writer->writeInt16( 70, ent->invisibleflag ); + return true; +} + + +bool dxfRW::writeLWPolyline( DRW_LWPolyline* ent ) +{ + if( version > DRW::AC1009 ) + { + writer->writeString( 0, "LWPOLYLINE" ); + writeEntity( ent ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbPolyline" ); + } + + ent->vertexnum = ent->vertlist.size(); + writer->writeInt32( 90, ent->vertexnum ); + writer->writeInt16( 70, ent->flags ); + writer->writeDouble( 43, ent->width ); + + if( ent->elevation != 0 ) + writer->writeDouble( 38, ent->elevation ); + + if( ent->thickness != 0 ) + writer->writeDouble( 39, ent->thickness ); + + for( int i = 0; i< ent->vertexnum; i++ ) + { + DRW_Vertex2D* v = ent->vertlist.at( i ); + writer->writeDouble( 10, v->x ); + writer->writeDouble( 20, v->y ); + + if( v->stawidth != 0 ) + writer->writeDouble( 40, v->stawidth ); + + if( v->endwidth != 0 ) + writer->writeDouble( 41, v->endwidth ); + + if( v->bulge != 0 ) + writer->writeDouble( 42, v->bulge ); + } + } + else + { + // RLZ: TODO convert lwpolyline in polyline (not exist in acad 12) + } + + return true; +} + + +bool dxfRW::writePolyline( DRW_Polyline* ent ) +{ + writer->writeString( 0, "POLYLINE" ); + writeEntity( ent ); + + if( version > DRW::AC1009 ) + { + if( ent->flags & 8 || ent->flags & 16 ) + writer->writeString( 100, "AcDb2dPolyline" ); + else + writer->writeString( 100, "AcDb3dPolyline" ); + } + else + writer->writeInt16( 66, 1 ); + + writer->writeDouble( 10, 0.0 ); + writer->writeDouble( 20, 0.0 ); + writer->writeDouble( 30, ent->basePoint.z ); + + if( ent->thickness != 0 ) + { + writer->writeDouble( 39, ent->thickness ); + } + + writer->writeInt16( 70, ent->flags ); + + if( ent->defstawidth != 0 ) + { + writer->writeDouble( 40, ent->defstawidth ); + } + + if( ent->defendwidth != 0 ) + { + writer->writeDouble( 41, ent->defendwidth ); + } + + if( ent->flags & 16 || ent->flags & 32 ) + { + writer->writeInt16( 71, ent->vertexcount ); + writer->writeInt16( 72, ent->facecount ); + } + + if( ent->smoothM != 0 ) + { + writer->writeInt16( 73, ent->smoothM ); + } + + if( ent->smoothN != 0 ) + { + writer->writeInt16( 74, ent->smoothN ); + } + + if( ent->curvetype != 0 ) + { + writer->writeInt16( 75, ent->curvetype ); + } + + DRW_Coord crd = ent->extPoint; + + if( crd.x != 0 || crd.y != 0 || crd.z != 1 ) + { + writer->writeDouble( 210, crd.x ); + writer->writeDouble( 220, crd.y ); + writer->writeDouble( 230, crd.z ); + } + + int vertexnum = ent->vertlist.size(); + + for( int i = 0; i< vertexnum; i++ ) + { + DRW_Vertex* v = ent->vertlist.at( i ); + writer->writeString( 0, "VERTEX" ); + writeEntity( ent ); + + if( version > DRW::AC1009 ) + writer->writeString( 100, "AcDbVertex" ); + + if( (v->flags & 128) && !(v->flags & 64) ) + { + writer->writeDouble( 10, 0 ); + writer->writeDouble( 20, 0 ); + writer->writeDouble( 30, 0 ); + } + else + { + writer->writeDouble( 10, v->basePoint.x ); + writer->writeDouble( 20, v->basePoint.y ); + writer->writeDouble( 30, v->basePoint.z ); + } + + if( v->stawidth != 0 ) + writer->writeDouble( 40, v->stawidth ); + + if( v->endwidth != 0 ) + writer->writeDouble( 41, v->endwidth ); + + if( v->bulge != 0 ) + writer->writeDouble( 42, v->bulge ); + + if( v->flags != 0 ) + { + writer->writeInt16( 70, ent->flags ); + } + + if( v->flags & 2 ) + { + writer->writeDouble( 50, v->tgdir ); + } + + if( v->flags & 128 ) + { + if( v->vindex1 != 0 ) + { + writer->writeInt16( 71, v->vindex1 ); + } + + if( v->vindex2 != 0 ) + { + writer->writeInt16( 72, v->vindex2 ); + } + + if( v->vindex3 != 0 ) + { + writer->writeInt16( 73, v->vindex3 ); + } + + if( v->vindex4 != 0 ) + { + writer->writeInt16( 74, v->vindex4 ); + } + + if( !(v->flags & 64) ) + { + writer->writeInt32( 91, v->identifier ); + } + } + } + + writer->writeString( 0, "SEQEND" ); + writeEntity( ent ); + return true; +} + + +bool dxfRW::writeSpline( DRW_Spline* ent ) +{ + if( version > DRW::AC1009 ) + { + writer->writeString( 0, "SPLINE" ); + writeEntity( ent ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbSpline" ); + } + + writer->writeDouble( 210, ent->ex ); + writer->writeDouble( 220, ent->ey ); + writer->writeDouble( 230, ent->ez ); + writer->writeInt16( 70, ent->flags ); + writer->writeInt16( 71, ent->degree ); + writer->writeInt16( 72, ent->nknots ); + writer->writeInt16( 73, ent->ncontrol ); + writer->writeInt16( 74, ent->nfit ); + writer->writeDouble( 42, ent->tolknot ); + writer->writeDouble( 43, ent->tolcontrol ); + + // RLZ: warning check if nknots are correct and ncontrol + for( int i = 0; i< ent->nknots; i++ ) + { + writer->writeDouble( 40, ent->knotslist.at( i ) ); + } + + for( int i = 0; i< ent->ncontrol; i++ ) + { + DRW_Coord* crd = ent->controllist.at( i ); + writer->writeDouble( 10, crd->x ); + writer->writeDouble( 20, crd->y ); + writer->writeDouble( 30, crd->z ); + } + } + else + { + // RLZ: TODO convert spline in polyline (not exist in acad 12) + } + + return true; +} + + +bool dxfRW::writeHatch( DRW_Hatch* ent ) +{ + if( version > DRW::AC1009 ) + { + writer->writeString( 0, "HATCH" ); + writeEntity( ent ); + writer->writeString( 100, "AcDbHatch" ); + writer->writeDouble( 10, 0.0 ); + writer->writeDouble( 20, 0.0 ); + writer->writeDouble( 30, ent->basePoint.z ); + writer->writeDouble( 210, ent->extPoint.x ); + writer->writeDouble( 220, ent->extPoint.y ); + writer->writeDouble( 230, ent->extPoint.z ); + writer->writeString( 2, ent->name ); + writer->writeInt16( 70, ent->solid ); + writer->writeInt16( 71, ent->associative ); + ent->loopsnum = ent->looplist.size(); + writer->writeInt16( 91, ent->loopsnum ); + + // write paths data + for( int i = 0; i< ent->loopsnum; i++ ) + { + DRW_HatchLoop* loop = ent->looplist.at( i ); + writer->writeInt16( 92, loop->type ); + + if( (loop->type & 2) == 2 ) + { + // RLZ: polyline boundary writeme + } + else + { + // boundary path + loop->update(); + writer->writeInt16( 93, loop->numedges ); + + for( int j = 0; jnumedges; ++j ) + { + switch( ( loop->objlist.at( j ) )->eType ) + { + case DRW::LINE: + { + writer->writeInt16( 72, 1 ); + DRW_Line* l = (DRW_Line*) loop->objlist.at( j ); + writer->writeDouble( 10, l->basePoint.x ); + writer->writeDouble( 20, l->basePoint.y ); + writer->writeDouble( 11, l->secPoint.x ); + writer->writeDouble( 21, l->secPoint.y ); + break; + } + + case DRW::ARC: + { + writer->writeInt16( 72, 2 ); + DRW_Arc* a = (DRW_Arc*) loop->objlist.at( j ); + writer->writeDouble( 10, a->basePoint.x ); + writer->writeDouble( 20, a->basePoint.y ); + writer->writeDouble( 40, a->radious ); + writer->writeDouble( 50, a->staangle * ARAD ); + writer->writeDouble( 51, a->endangle * ARAD ); + writer->writeInt16( 73, a->isccw ); + break; + } + + case DRW::ELLIPSE: + { + writer->writeInt16( 72, 3 ); + DRW_Ellipse* a = (DRW_Ellipse*) loop->objlist.at( j ); + a->correctAxis(); + writer->writeDouble( 10, a->basePoint.x ); + writer->writeDouble( 20, a->basePoint.y ); + writer->writeDouble( 11, a->secPoint.x ); + writer->writeDouble( 21, a->secPoint.y ); + writer->writeDouble( 40, a->ratio ); + writer->writeDouble( 50, a->staparam * ARAD ); + writer->writeDouble( 51, a->endparam * ARAD ); + writer->writeInt16( 73, a->isccw ); + break; + } + + case DRW::SPLINE: + // RLZ: spline boundary writeme +// writer->writeInt16(72, 4); + break; + + default: + break; + } + } + + writer->writeInt16( 97, 0 ); + } + } + + writer->writeInt16( 75, ent->hstyle ); + writer->writeInt16( 76, ent->hpattern ); + + if( !ent->solid ) + { + writer->writeDouble( 52, ent->angle ); + writer->writeDouble( 41, ent->scale ); + writer->writeInt16( 77, ent->doubleflag ); + writer->writeInt16( 78, ent->deflines ); + } + +/* if (ent->deflines > 0){ + * writer->writeInt16(78, ent->deflines); + * }*/ + writer->writeInt32( 98, 0 ); + } + else + { + // RLZ: TODO verify in acad12 + } + + return true; +} + + +bool dxfRW::writeLeader( DRW_Leader* ent ) +{ + if( version > DRW::AC1009 ) + { + writer->writeString( 0, "LEADER" ); + writeEntity( ent ); + writer->writeString( 100, "AcDbLeader" ); + writer->writeUtf8String( 3, ent->style ); + writer->writeInt16( 71, ent->arrow ); + writer->writeInt16( 72, ent->leadertype ); + writer->writeInt16( 73, ent->flag ); + writer->writeInt16( 74, ent->hookline ); + writer->writeInt16( 75, ent->hookflag ); + writer->writeDouble( 40, ent->textheight ); + writer->writeDouble( 41, ent->textwidth ); + writer->writeDouble( 76, ent->vertnum ); + writer->writeDouble( 76, ent->vertexlist.size() ); + + for( unsigned int i = 0; ivertexlist.size(); i++ ) + { + DRW_Coord* vert = ent->vertexlist.at( i ); + writer->writeDouble( 10, vert->x ); + writer->writeDouble( 20, vert->y ); + writer->writeDouble( 30, vert->z ); + } + } + else + { + // RLZ: todo not supported by acad 12 saved as unnamed block + } + + return true; +} + + +bool dxfRW::writeDimension( DRW_Dimension* ent ) +{ + if( version > DRW::AC1009 ) + { + writer->writeString( 0, "DIMENSION" ); + writeEntity( ent ); + writer->writeString( 100, "AcDbDimension" ); +// writer->writeString(2, ent->name); + writer->writeDouble( 10, ent->getDefPoint().x ); + writer->writeDouble( 20, ent->getDefPoint().y ); + writer->writeDouble( 30, ent->getDefPoint().z ); + writer->writeDouble( 11, ent->getTextPoint().x ); + writer->writeDouble( 21, ent->getTextPoint().y ); + writer->writeDouble( 31, ent->getTextPoint().z ); + + if( !(ent->type & 32) ) + ent->type = ent->type + 32; + + writer->writeInt16( 70, ent->type ); + + if( !( ent->getText().empty() ) ) + writer->writeUtf8String( 1, ent->getText() ); + + writer->writeInt16( 71, ent->getAlign() ); + + if( ent->getTextLineStyle() != 1 ) + writer->writeInt16( 72, ent->getTextLineStyle() ); + + if( ent->getTextLineFactor() != 1 ) + writer->writeDouble( 41, ent->getTextLineFactor() ); + + writer->writeUtf8String( 3, ent->getStyle() ); + + if( ent->getTextLineFactor() != 0 ) + writer->writeDouble( 53, ent->getDir() ); + + writer->writeDouble( 210, ent->getExtrusion().x ); + writer->writeDouble( 220, ent->getExtrusion().y ); + writer->writeDouble( 230, ent->getExtrusion().z ); + + switch( ent->eType ) + { + case DRW::DIMALIGNED: + case DRW::DIMLINEAR: + { + DRW_DimAligned* dd = (DRW_DimAligned*) ent; + writer->writeString( 100, "AcDbAlignedDimension" ); + DRW_Coord crd = dd->getClonepoint(); + + if( crd.x != 0 || crd.y != 0 || crd.z != 0 ) + { + writer->writeDouble( 12, crd.x ); + writer->writeDouble( 22, crd.y ); + writer->writeDouble( 32, crd.z ); + } + + writer->writeDouble( 13, dd->getDef1Point().x ); + writer->writeDouble( 23, dd->getDef1Point().y ); + writer->writeDouble( 33, dd->getDef1Point().z ); + writer->writeDouble( 14, dd->getDef2Point().x ); + writer->writeDouble( 24, dd->getDef2Point().y ); + writer->writeDouble( 34, dd->getDef2Point().z ); + + if( ent->eType == DRW::DIMLINEAR ) + { + DRW_DimLinear* dl = (DRW_DimLinear*) ent; + + if( dl->getAngle() != 0 ) + writer->writeDouble( 50, dl->getAngle() ); + + if( dl->getOblique() != 0 ) + writer->writeDouble( 52, dl->getOblique() ); + + writer->writeString( 100, "AcDbRotatedDimension" ); + } + + break; + } + + case DRW::DIMRADIAL: + { + DRW_DimRadial* dd = (DRW_DimRadial*) ent; + writer->writeString( 100, "AcDbRadialDimension" ); + writer->writeDouble( 15, dd->getDiameterPoint().x ); + writer->writeDouble( 25, dd->getDiameterPoint().y ); + writer->writeDouble( 35, dd->getDiameterPoint().z ); + writer->writeDouble( 40, dd->getLeaderLength() ); + break; + } + + case DRW::DIMDIAMETRIC: + { + DRW_DimDiametric* dd = (DRW_DimDiametric*) ent; + writer->writeString( 100, "AcDbDiametricDimension" ); + writer->writeDouble( 15, dd->getDiameter1Point().x ); + writer->writeDouble( 25, dd->getDiameter1Point().y ); + writer->writeDouble( 35, dd->getDiameter1Point().z ); + writer->writeDouble( 40, dd->getLeaderLength() ); + break; + } + + case DRW::DIMANGULAR: + { + DRW_DimAngular* dd = (DRW_DimAngular*) ent; + writer->writeString( 100, "AcDb2LineAngularDimension" ); + writer->writeDouble( 13, dd->getFirstLine1().x ); + writer->writeDouble( 23, dd->getFirstLine1().y ); + writer->writeDouble( 33, dd->getFirstLine1().z ); + writer->writeDouble( 14, dd->getFirstLine2().x ); + writer->writeDouble( 24, dd->getFirstLine2().y ); + writer->writeDouble( 34, dd->getFirstLine2().z ); + writer->writeDouble( 15, dd->getSecondLine1().x ); + writer->writeDouble( 25, dd->getSecondLine1().y ); + writer->writeDouble( 35, dd->getSecondLine1().z ); + writer->writeDouble( 16, dd->getDimPoint().x ); + writer->writeDouble( 26, dd->getDimPoint().y ); + writer->writeDouble( 36, dd->getDimPoint().z ); + break; + } + + case DRW::DIMANGULAR3P: + { + DRW_DimAngular3p* dd = (DRW_DimAngular3p*) ent; + writer->writeDouble( 13, dd->getFirstLine().x ); + writer->writeDouble( 23, dd->getFirstLine().y ); + writer->writeDouble( 33, dd->getFirstLine().z ); + writer->writeDouble( 14, dd->getSecondLine().x ); + writer->writeDouble( 24, dd->getSecondLine().y ); + writer->writeDouble( 34, dd->getSecondLine().z ); + writer->writeDouble( 15, dd->getVertexPoint().x ); + writer->writeDouble( 25, dd->getVertexPoint().y ); + writer->writeDouble( 35, dd->getVertexPoint().z ); + break; + } + + case DRW::DIMORDINATE: + { + DRW_DimOrdinate* dd = (DRW_DimOrdinate*) ent; + writer->writeString( 100, "AcDbOrdinateDimension" ); + writer->writeDouble( 13, dd->getFirstLine().x ); + writer->writeDouble( 23, dd->getFirstLine().y ); + writer->writeDouble( 33, dd->getFirstLine().z ); + writer->writeDouble( 14, dd->getSecondLine().x ); + writer->writeDouble( 24, dd->getSecondLine().y ); + writer->writeDouble( 34, dd->getSecondLine().z ); + break; + } + + default: + break; + } + } + else + { + // RLZ: todo not supported by acad 12 saved as unnamed block + } + + return true; +} + + +bool dxfRW::writeInsert( DRW_Insert* ent ) +{ + writer->writeString( 0, "INSERT" ); + writeEntity( ent ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbBlockReference" ); + writer->writeUtf8String( 2, ent->name ); + } + else + writer->writeUtf8Caps( 2, ent->name ); + + writer->writeDouble( 10, ent->basePoint.x ); + writer->writeDouble( 20, ent->basePoint.y ); + writer->writeDouble( 30, ent->basePoint.z ); + writer->writeDouble( 41, ent->xscale ); + writer->writeDouble( 42, ent->yscale ); + writer->writeDouble( 43, ent->zscale ); + writer->writeDouble( 50, ent->angle ); + writer->writeInt16( 70, ent->colcount ); + writer->writeInt16( 71, ent->rowcount ); + writer->writeDouble( 44, ent->colspace ); + writer->writeDouble( 45, ent->rowspace ); + return true; +} + + +bool dxfRW::writeText( DRW_Text* ent ) +{ + writer->writeString( 0, "TEXT" ); + writeEntity( ent ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbText" ); + } + +// writer->writeDouble(39, ent->thickness); + writer->writeDouble( 10, ent->basePoint.x ); + writer->writeDouble( 20, ent->basePoint.y ); + writer->writeDouble( 30, ent->basePoint.z ); + writer->writeDouble( 40, ent->height ); + writer->writeUtf8String( 1, ent->text ); + writer->writeDouble( 50, ent->angle ); + writer->writeDouble( 41, ent->widthscale ); + writer->writeDouble( 51, ent->oblique ); + + if( version > DRW::AC1009 ) + writer->writeUtf8String( 7, ent->style ); + else + writer->writeUtf8Caps( 7, ent->style ); + + writer->writeInt16( 71, ent->textgen ); + + if( ent->alignH != DRW_Text::HLeft ) + { + writer->writeInt16( 72, ent->alignH ); + } + + if( ent->alignH != DRW_Text::HLeft || ent->alignV != DRW_Text::VBaseLine ) + { + writer->writeDouble( 11, ent->secPoint.x ); + writer->writeDouble( 21, ent->secPoint.y ); + writer->writeDouble( 31, ent->secPoint.z ); + } + + writer->writeDouble( 210, ent->extPoint.x ); + writer->writeDouble( 220, ent->extPoint.y ); + writer->writeDouble( 230, ent->extPoint.z ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbText" ); + } + + if( ent->alignV != DRW_Text::VBaseLine ) + { + writer->writeInt16( 73, ent->alignV ); + } + + return true; +} + + +bool dxfRW::writeMText( DRW_MText* ent ) +{ + if( version > DRW::AC1009 ) + { + writer->writeString( 0, "MTEXT" ); + writeEntity( ent ); + writer->writeString( 100, "AcDbMText" ); + writer->writeDouble( 10, ent->basePoint.x ); + writer->writeDouble( 20, ent->basePoint.y ); + writer->writeDouble( 30, ent->basePoint.z ); + writer->writeDouble( 40, ent->height ); + writer->writeDouble( 41, ent->widthscale ); + writer->writeInt16( 71, ent->textgen ); + writer->writeInt16( 72, ent->alignH ); + std::string text = writer->fromUtf8String( ent->text ); + + int i; + + for( i = 0; (text.size() - i) > 250; ) + { + writer->writeString( 3, text.substr( i, 250 ) ); + i += 250; + } + + writer->writeString( 1, text.substr( i ) ); + writer->writeString( 7, ent->style ); + writer->writeDouble( 210, ent->extPoint.x ); + writer->writeDouble( 220, ent->extPoint.y ); + writer->writeDouble( 230, ent->extPoint.z ); + writer->writeDouble( 50, ent->angle ); + writer->writeInt16( 73, ent->alignV ); + writer->writeDouble( 44, ent->interlin ); +// RLZ ... 11, 21, 31 needed? + } + else + { + // RLZ: TODO convert mtext in text lines (not exist in acad 12) + } + + return true; +} + + +bool dxfRW::writeViewport( DRW_Viewport* ent ) +{ + writer->writeString( 0, "VIEWPORT" ); + writeEntity( ent ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbViewport" ); + } + + writer->writeDouble( 10, ent->basePoint.x ); + writer->writeDouble( 20, ent->basePoint.y ); + + if( ent->basePoint.z != 0.0 ) + writer->writeDouble( 30, ent->basePoint.z ); + + writer->writeDouble( 40, ent->pswidth ); + writer->writeDouble( 41, ent->psheight ); + writer->writeInt16( 68, ent->vpstatus ); + writer->writeInt16( 69, ent->vpID ); + writer->writeDouble( 12, ent->centerPX ); // RLZ: verify if exist in V12 + writer->writeDouble( 22, ent->centerPY ); // RLZ: verify if exist in V12 + return true; +} + + +DRW_ImageDef* dxfRW::writeImage( DRW_Image* ent, std::string name ) +{ + if( version > DRW::AC1009 ) + { + // search if exist imagedef with this mane (image inserted more than 1 time) + // RLZ: imagedef_reactor seem needed to read in acad + DRW_ImageDef* id = NULL; + + for( unsigned int i = 0; iname == name ) + { + id = imageDef.at( i ); + continue; + } + } + + if( id == NULL ) + { + id = new DRW_ImageDef(); + imageDef.push_back( id ); + id->handle = toHexStr( ++entCount ); + } + + id->name = name; + std::string idReactor = toHexStr( ++entCount ); + + writer->writeString( 0, "IMAGE" ); + writeEntity( ent ); + writer->writeString( 100, "AcDbRasterImage" ); + writer->writeDouble( 10, ent->basePoint.x ); + writer->writeDouble( 20, ent->basePoint.y ); + writer->writeDouble( 30, ent->basePoint.z ); + writer->writeDouble( 11, ent->secPoint.x ); + writer->writeDouble( 21, ent->secPoint.y ); + writer->writeDouble( 31, ent->secPoint.z ); + writer->writeDouble( 12, ent->vx ); + writer->writeDouble( 22, ent->vy ); + writer->writeDouble( 32, ent->vz ); + writer->writeDouble( 13, ent->sizeu ); + writer->writeDouble( 23, ent->sizev ); + writer->writeString( 340, id->handle ); + writer->writeInt16( 70, 1 ); + writer->writeInt16( 280, ent->clip ); + writer->writeInt16( 281, ent->brightness ); + writer->writeInt16( 282, ent->contrast ); + writer->writeInt16( 283, ent->fade ); + writer->writeString( 360, idReactor ); + id->reactors[idReactor] = ent->handle; + return id; + } + + return NULL; // not exist in acad 12 +} + + +bool dxfRW::writeBlockRecord( std::string name ) +{ + if( version > DRW::AC1009 ) + { + writer->writeString( 0, "BLOCK_RECORD" ); + writer->writeString( 5, toHexStr( ++entCount ) ); + + blockMap[name] = entCount; + entCount = 2 + entCount; // reserve 2 for BLOCK & ENDBLOCK + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, "1" ); + } + + writer->writeString( 100, "AcDbSymbolTableRecord" ); + writer->writeString( 100, "AcDbBlockTableRecord" ); + writer->writeUtf8String( 2, name ); + + if( version > DRW::AC1018 ) + { + // writer->writeInt16(340, 22); + writer->writeInt16( 70, 0 ); + writer->writeInt16( 280, 1 ); + writer->writeInt16( 281, 0 ); + } + } + + return true; +} + + +bool dxfRW::writeBlock( DRW_Block* bk ) +{ + if( writingBlock ) + { + writer->writeString( 0, "ENDBLK" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 5, toHexStr( currHandle + 2 ) ); + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, toHexStr( currHandle ) ); + } + + writer->writeString( 100, "AcDbEntity" ); + } + + writer->writeString( 8, "0" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbBlockEnd" ); + } + } + + writingBlock = true; + writer->writeString( 0, "BLOCK" ); + + if( version > DRW::AC1009 ) + { + currHandle = ( *( blockMap.find( bk->name ) ) ).second; + writer->writeString( 5, toHexStr( currHandle + 1 ) ); + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, toHexStr( currHandle ) ); + } + + writer->writeString( 100, "AcDbEntity" ); + } + + writer->writeString( 8, "0" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbBlockBegin" ); + writer->writeUtf8String( 2, bk->name ); + } + else + writer->writeUtf8Caps( 2, bk->name ); + + writer->writeInt16( 70, bk->flags ); + writer->writeDouble( 10, bk->basePoint.x ); + writer->writeDouble( 20, bk->basePoint.y ); + + if( bk->basePoint.z != 0.0 ) + { + writer->writeDouble( 30, bk->basePoint.z ); + } + + if( version > DRW::AC1009 ) + writer->writeUtf8String( 3, bk->name ); + else + writer->writeUtf8Caps( 3, bk->name ); + + writer->writeString( 1, "" ); + + return true; +} + + +bool dxfRW::writeTables() +{ + writer->writeString( 0, "TABLE" ); + writer->writeString( 2, "VPORT" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 5, "8" ); + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, "0" ); + } + + writer->writeString( 100, "AcDbSymbolTable" ); + } + + writer->writeInt16( 70, 1 ); // end table def +/*** VPORT ***/ + dimstyleStd = false; + iface->writeVports(); + + if( !dimstyleStd ) + { + DRW_Vport portact; + portact.name = "*ACTIVE"; + writeVport( &portact ); + } + + writer->writeString( 0, "ENDTAB" ); +/*** LTYPE ***/ + writer->writeString( 0, "TABLE" ); + writer->writeString( 2, "LTYPE" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 5, "5" ); + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, "0" ); + } + + writer->writeString( 100, "AcDbSymbolTable" ); + } + + writer->writeInt16( 70, 4 ); // end table def +// Mandatory linetypes + writer->writeString( 0, "LTYPE" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 5, "14" ); + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, "5" ); + } + + writer->writeString( 100, "AcDbSymbolTableRecord" ); + writer->writeString( 100, "AcDbLinetypeTableRecord" ); + writer->writeString( 2, "ByBlock" ); + } + else + writer->writeString( 2, "BYBLOCK" ); + + writer->writeInt16( 70, 0 ); + writer->writeString( 3, "" ); + writer->writeInt16( 72, 65 ); + writer->writeInt16( 73, 0 ); + writer->writeDouble( 40, 0.0 ); + + writer->writeString( 0, "LTYPE" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 5, "15" ); + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, "5" ); + } + + writer->writeString( 100, "AcDbSymbolTableRecord" ); + writer->writeString( 100, "AcDbLinetypeTableRecord" ); + writer->writeString( 2, "ByLayer" ); + } + else + writer->writeString( 2, "BYLAYER" ); + + writer->writeInt16( 70, 0 ); + writer->writeString( 3, "" ); + writer->writeInt16( 72, 65 ); + writer->writeInt16( 73, 0 ); + writer->writeDouble( 40, 0.0 ); + + writer->writeString( 0, "LTYPE" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 5, "16" ); + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, "5" ); + } + + writer->writeString( 100, "AcDbSymbolTableRecord" ); + writer->writeString( 100, "AcDbLinetypeTableRecord" ); + writer->writeString( 2, "Continuous" ); + } + else + { + writer->writeString( 2, "CONTINUOUS" ); + } + + writer->writeInt16( 70, 0 ); + writer->writeString( 3, "Solid line" ); + writer->writeInt16( 72, 65 ); + writer->writeInt16( 73, 0 ); + writer->writeDouble( 40, 0.0 ); +// Aplication linetypes + iface->writeLTypes(); + writer->writeString( 0, "ENDTAB" ); +/*** LAYER ***/ + writer->writeString( 0, "TABLE" ); + writer->writeString( 2, "LAYER" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 5, "2" ); + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, "0" ); + } + + writer->writeString( 100, "AcDbSymbolTable" ); + } + + writer->writeInt16( 70, 1 ); // end table def + wlayer0 = false; + iface->writeLayers(); + + if( !wlayer0 ) + { + DRW_Layer lay0; + lay0.name = "0"; + writeLayer( &lay0 ); + } + + writer->writeString( 0, "ENDTAB" ); +/*** STYLE ***/ + writer->writeString( 0, "TABLE" ); + writer->writeString( 2, "STYLE" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 5, "3" ); + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, "0" ); + } + + writer->writeString( 100, "AcDbSymbolTable" ); + } + + writer->writeInt16( 70, 3 ); // end table def + dimstyleStd = false; + iface->writeTextstyles(); + + if( !dimstyleStd ) + { + DRW_Textstyle tsty; + tsty.name = "Standard"; + writeTextstyle( &tsty ); + } + + writer->writeString( 0, "ENDTAB" ); + + writer->writeString( 0, "TABLE" ); + writer->writeString( 2, "VIEW" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 5, "6" ); + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, "0" ); + } + + writer->writeString( 100, "AcDbSymbolTable" ); + } + + writer->writeInt16( 70, 0 ); // end table def + writer->writeString( 0, "ENDTAB" ); + + writer->writeString( 0, "TABLE" ); + writer->writeString( 2, "UCS" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 5, "7" ); + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, "0" ); + } + + writer->writeString( 100, "AcDbSymbolTable" ); + } + + writer->writeInt16( 70, 0 ); // end table def + writer->writeString( 0, "ENDTAB" ); + + writer->writeString( 0, "TABLE" ); + writer->writeString( 2, "APPID" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 5, "9" ); + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, "0" ); + } + + writer->writeString( 100, "AcDbSymbolTable" ); + } + + writer->writeInt16( 70, 1 ); // end table def + writer->writeString( 0, "APPID" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 5, "12" ); + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, "9" ); + } + + writer->writeString( 100, "AcDbSymbolTableRecord" ); + writer->writeString( 100, "AcDbRegAppTableRecord" ); + } + + writer->writeString( 2, "ACAD" ); + writer->writeInt16( 70, 0 ); + writer->writeString( 0, "ENDTAB" ); + + writer->writeString( 0, "TABLE" ); + writer->writeString( 2, "DIMSTYLE" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 5, "A" ); + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, "0" ); + } + + writer->writeString( 100, "AcDbSymbolTable" ); + } + + writer->writeInt16( 70, 1 ); // end table def + + if( version > DRW::AC1014 ) + { + writer->writeString( 100, "AcDbDimStyleTable" ); + writer->writeInt16( 71, 1 ); // end table def + } + + dimstyleStd = false; + iface->writeDimstyles(); + + if( !dimstyleStd ) + { + DRW_Dimstyle dsty; + dsty.name = "Standard"; + writeDimstyle( &dsty ); + } + + writer->writeString( 0, "ENDTAB" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 0, "TABLE" ); + writer->writeString( 2, "BLOCK_RECORD" ); + writer->writeString( 5, "1" ); + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, "0" ); + } + + writer->writeString( 100, "AcDbSymbolTable" ); + writer->writeInt16( 70, 2 ); // end table def + writer->writeString( 0, "BLOCK_RECORD" ); + writer->writeString( 5, "1F" ); + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, "1" ); + } + + writer->writeString( 100, "AcDbSymbolTableRecord" ); + writer->writeString( 100, "AcDbBlockTableRecord" ); + writer->writeString( 2, "*Model_Space" ); + + if( version > DRW::AC1018 ) + { + // writer->writeInt16(340, 22); + writer->writeInt16( 70, 0 ); + writer->writeInt16( 280, 1 ); + writer->writeInt16( 281, 0 ); + } + + writer->writeString( 0, "BLOCK_RECORD" ); + writer->writeString( 5, "1E" ); + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, "1" ); + } + + writer->writeString( 100, "AcDbSymbolTableRecord" ); + writer->writeString( 100, "AcDbBlockTableRecord" ); + writer->writeString( 2, "*Paper_Space" ); + + if( version > DRW::AC1018 ) + { + // writer->writeInt16(340, 22); + writer->writeInt16( 70, 0 ); + writer->writeInt16( 280, 1 ); + writer->writeInt16( 281, 0 ); + } + + iface->writeBlockRecords(); + writer->writeString( 0, "ENDTAB" ); + } + + return true; +} + + +bool dxfRW::writeBlocks() +{ + writer->writeString( 0, "BLOCK" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 5, "20" ); + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, "1F" ); + } + + writer->writeString( 100, "AcDbEntity" ); + } + + writer->writeString( 8, "0" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbBlockBegin" ); + writer->writeString( 2, "*Model_Space" ); + } + else + writer->writeString( 2, "$MODEL_SPACE" ); + + writer->writeInt16( 70, 0 ); + writer->writeDouble( 10, 0.0 ); + writer->writeDouble( 20, 0.0 ); + writer->writeDouble( 30, 0.0 ); + + if( version > DRW::AC1009 ) + writer->writeString( 3, "*Model_Space" ); + else + writer->writeString( 3, "$MODEL_SPACE" ); + + writer->writeString( 1, "" ); + writer->writeString( 0, "ENDBLK" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 5, "21" ); + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, "1F" ); + } + + writer->writeString( 100, "AcDbEntity" ); + } + + writer->writeString( 8, "0" ); + + if( version > DRW::AC1009 ) + writer->writeString( 100, "AcDbBlockEnd" ); + + writer->writeString( 0, "BLOCK" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 5, "1C" ); + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, "1B" ); + } + + writer->writeString( 100, "AcDbEntity" ); + } + + writer->writeString( 8, "0" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 100, "AcDbBlockBegin" ); + writer->writeString( 2, "*Paper_Space" ); + } + else + writer->writeString( 2, "$PAPER_SPACE" ); + + writer->writeInt16( 70, 0 ); + writer->writeDouble( 10, 0.0 ); + writer->writeDouble( 20, 0.0 ); + writer->writeDouble( 30, 0.0 ); + + if( version > DRW::AC1009 ) + writer->writeString( 3, "*Paper_Space" ); + else + writer->writeString( 3, "$PAPER_SPACE" ); + + writer->writeString( 1, "" ); + writer->writeString( 0, "ENDBLK" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 5, "1D" ); + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, "1F" ); + } + + writer->writeString( 100, "AcDbEntity" ); + } + + writer->writeString( 8, "0" ); + + if( version > DRW::AC1009 ) + writer->writeString( 100, "AcDbBlockEnd" ); + + writingBlock = false; + iface->writeBlocks(); + + if( writingBlock ) + { + writingBlock = false; + writer->writeString( 0, "ENDBLK" ); + + if( version > DRW::AC1009 ) + { + writer->writeString( 5, toHexStr( currHandle + 2 ) ); + +// writer->writeString(5, "1D"); + if( version > DRW::AC1014 ) + { + writer->writeString( 330, toHexStr( currHandle ) ); + } + + writer->writeString( 100, "AcDbEntity" ); + } + + writer->writeString( 8, "0" ); + + if( version > DRW::AC1009 ) + writer->writeString( 100, "AcDbBlockEnd" ); + } + + return true; +} + + +bool dxfRW::writeObjects() +{ + writer->writeString( 0, "DICTIONARY" ); + std::string imgDictH; + writer->writeString( 5, "C" ); + + if( version > DRW::AC1014 ) + { + writer->writeString( 330, "0" ); + } + + writer->writeString( 100, "AcDbDictionary" ); + writer->writeInt16( 281, 1 ); + writer->writeString( 3, "ACAD_GROUP" ); + writer->writeString( 350, "D" ); + + if( imageDef.size() != 0 ) + { + writer->writeString( 3, "ACAD_IMAGE_DICT" ); + imgDictH = toHexStr( ++entCount ); + writer->writeString( 350, imgDictH ); + } + + writer->writeString( 0, "DICTIONARY" ); + writer->writeString( 5, "D" ); + writer->writeString( 330, "C" ); + writer->writeString( 100, "AcDbDictionary" ); + writer->writeInt16( 281, 1 ); + +// write IMAGEDEF_REACTOR + for( unsigned int i = 0; i::iterator it; + + for( it = id->reactors.begin(); it != id->reactors.end(); it++ ) + { + writer->writeString( 0, "IMAGEDEF_REACTOR" ); + writer->writeString( 5, (*it).first ); + writer->writeString( 330, (*it).second ); + writer->writeString( 100, "AcDbRasterImageDefReactor" ); + writer->writeInt16( 90, 2 ); // version 2=R14 to v2010 + writer->writeString( 330, (*it).second ); + } + } + + if( imageDef.size() != 0 ) + { + writer->writeString( 0, "DICTIONARY" ); + writer->writeString( 5, imgDictH ); + writer->writeString( 330, "C" ); + writer->writeString( 100, "AcDbDictionary" ); + writer->writeInt16( 281, 1 ); + + for( unsigned int i = 0; iname.find_last_of( "/\\" ); + f2 = imageDef.at( i )->name.find_last_of( '.' ); + ++f1; + writer->writeString( 3, imageDef.at( i )->name.substr( f1, f2 - f1 ) ); + writer->writeString( 350, imageDef.at( i )->handle ); + } + } + + for( unsigned int i = 0; iwriteString( 0, "IMAGEDEF" ); + writer->writeString( 5, id->handle ); + + if( version > DRW::AC1014 ) + { +// writer->writeString(330, "0"); handle to DICTIONARY + } + + writer->writeString( 102, "{ACAD_REACTORS" ); + std::map::iterator it; + + for( it = id->reactors.begin(); it != id->reactors.end(); it++ ) + { + writer->writeString( 330, (*it).first ); + } + + writer->writeString( 102, "}" ); + writer->writeString( 100, "AcDbRasterImageDef" ); + writer->writeInt16( 90, 0 ); // version 0=R14 to v2010 + writer->writeUtf8String( 1, id->name ); + writer->writeDouble( 10, id->u ); + writer->writeDouble( 20, id->v ); + writer->writeDouble( 11, id->up ); + writer->writeDouble( 21, id->vp ); + writer->writeInt16( 280, id->loaded ); + writer->writeInt16( 281, id->resolution ); + } + + // no more needed imageDef, delete it + while( !imageDef.empty() ) + { + imageDef.pop_back(); + } + + return true; +} + + +/********* Reader Process *********/ + +bool dxfRW::processDxf() +{ + DBG( "dxfRW::processDxf() start processing dxf\n" ); + int code; + bool more = true; + string sectionstr; + +// section = secUnknown; + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( " processDxf\n" ); + + if( code == 999 ) + { + header.addComment( reader->getString() ); + } + else if( code == 0 ) + { + sectionstr = reader->getString(); + DBG( sectionstr ); DBG( " processDxf\n" ); + + if( sectionstr == "EOF" ) + { + return true; // found EOF terminate + } + + if( sectionstr == "SECTION" ) + { + more = reader->readRec( &code, !binary ); + DBG( code ); DBG( " processDxf\n" ); + + if( !more ) + return false; // wrong dxf file + + if( code == 2 ) + { + sectionstr = reader->getString(); + DBG( sectionstr ); DBG( " processDxf\n" ); + + // found section, process it + if( sectionstr == "HEADER" ) + { + processHeader(); + } + else if( sectionstr == "CLASSES" ) + { +// processClasses(); + } + else if( sectionstr == "TABLES" ) + { + processTables(); + } + else if( sectionstr == "BLOCKS" ) + { + processBlocks(); + } + else if( sectionstr == "ENTITIES" ) + { + processEntities( false ); + } + else if( sectionstr == "OBJECTS" ) + { + processObjects(); + } + } + } + } + +/* if (!more) + * return true;*/ + } + + return true; +} + + +/********* Header Section *********/ + +bool dxfRW::processHeader() +{ + DBG( "dxfRW::processHeader\n" ); + int code; + string sectionstr; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( " processHeader\n" ); + + if( code == 0 ) + { + sectionstr = reader->getString(); + DBG( sectionstr ); DBG( " processHeader\n\n" ); + + if( sectionstr == "ENDSEC" ) + { + iface->addHeader( &header ); + return true; // found ENDSEC terminate + } + } + else + header.parseCode( code, reader ); + } + + return true; +} + + +/********* Tables Section *********/ + +bool dxfRW::processTables() +{ + DBG( "dxfRW::processTables\n" ); + int code; + string sectionstr; + bool more = true; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + if( code == 0 ) + { + sectionstr = reader->getString(); + DBG( sectionstr ); DBG( " processHeader\n\n" ); + + if( sectionstr == "TABLE" ) + { + more = reader->readRec( &code, !binary ); + DBG( code ); DBG( "\n" ); + + if( !more ) + return false; // wrong dxf file + + if( code == 2 ) + { + sectionstr = reader->getString(); + DBG( sectionstr ); DBG( " processHeader\n\n" ); + + // found section, process it + if( sectionstr == "LTYPE" ) + { + processLType(); + } + else if( sectionstr == "LAYER" ) + { + processLayer(); + } + else if( sectionstr == "STYLE" ) + { + processTextStyle(); + } + else if( sectionstr == "VPORT" ) + { + processVports(); + } + else if( sectionstr == "VIEW" ) + { +// processView(); + } + else if( sectionstr == "UCS" ) + { +// processUCS(); + } + else if( sectionstr == "APPID" ) + { +// processAppId(); + } + else if( sectionstr == "DIMSTYLE" ) + { + processDimStyle(); + } + else if( sectionstr == "BLOCK_RECORD" ) + { +// processBlockRecord(); + } + } + } + else if( sectionstr == "ENDSEC" ) + { + return true; // found ENDSEC terminate + } + } + } + + return true; +} + + +bool dxfRW::processLType() +{ + DBG( "dxfRW::processLType\n" ); + int code; + string sectionstr; + bool reading = false; + DRW_LType ltype; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + if( code == 0 ) + { + if( reading ) + { + ltype.update(); + iface->addLType( ltype ); + } + + sectionstr = reader->getString(); + DBG( sectionstr ); DBG( "\n" ); + + if( sectionstr == "LTYPE" ) + { + reading = true; + ltype.reset(); + } + else if( sectionstr == "ENDTAB" ) + { + return true; // found ENDTAB terminate + } + } + else if( reading ) + ltype.parseCode( code, reader ); + } + + return true; +} + + +bool dxfRW::processLayer() +{ + DBG( "dxfRW::processLayer\n" ); + int code; + string sectionstr; + bool reading = false; + DRW_Layer layer; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + if( code == 0 ) + { + if( reading ) + iface->addLayer( layer ); + + sectionstr = reader->getString(); + DBG( sectionstr ); DBG( "\n" ); + + if( sectionstr == "LAYER" ) + { + reading = true; + layer.reset(); + } + else if( sectionstr == "ENDTAB" ) + { + return true; // found ENDTAB terminate + } + } + else if( reading ) + layer.parseCode( code, reader ); + } + + return true; +} + + +bool dxfRW::processDimStyle() +{ + DBG( "dxfRW::processDimStyle" ); + int code; + string sectionstr; + bool reading = false; + DRW_Dimstyle dimSty; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + if( code == 0 ) + { + if( reading ) + iface->addDimStyle( dimSty ); + + sectionstr = reader->getString(); + DBG( sectionstr ); DBG( "\n" ); + + if( sectionstr == "DIMSTYLE" ) + { + reading = true; + dimSty.reset(); + } + else if( sectionstr == "ENDTAB" ) + { + return true; // found ENDTAB terminate + } + } + else if( reading ) + dimSty.parseCode( code, reader ); + } + + return true; +} + + +bool dxfRW::processTextStyle() +{ + DBG( "dxfRW::processTextStyle" ); + int code; + string sectionstr; + bool reading = false; + DRW_Textstyle TxtSty; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + if( code == 0 ) + { + if( reading ) + iface->addTextStyle( TxtSty ); + + sectionstr = reader->getString(); + DBG( sectionstr ); DBG( "\n" ); + + if( sectionstr == "STYLE" ) + { + reading = true; + TxtSty.reset(); + } + else if( sectionstr == "ENDTAB" ) + { + return true; // found ENDTAB terminate + } + } + else if( reading ) + TxtSty.parseCode( code, reader ); + } + + return true; +} + + +bool dxfRW::processVports() +{ + DBG( "dxfRW::processVports" ); + int code; + string sectionstr; + bool reading = false; + DRW_Vport vp; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + if( code == 0 ) + { + if( reading ) + iface->addVport( vp ); + + sectionstr = reader->getString(); + DBG( sectionstr ); DBG( "\n" ); + + if( sectionstr == "VPORT" ) + { + reading = true; + vp.reset(); + } + else if( sectionstr == "ENDTAB" ) + { + return true; // found ENDTAB terminate + } + } + else if( reading ) + vp.parseCode( code, reader ); + } + + return true; +} + + +/********* Block Section *********/ + +bool dxfRW::processBlocks() +{ + DBG( "dxfRW::processBlocks\n" ); + int code; + string sectionstr; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + if( code == 0 ) + { + sectionstr = reader->getString(); + DBG( sectionstr ); DBG( "\n" ); + + if( sectionstr == "BLOCK" ) + { + processBlock(); + } + else if( sectionstr == "ENDSEC" ) + { + return true; // found ENDSEC terminate + } + } + } + + return true; +} + + +bool dxfRW::processBlock() +{ + DBG( "dxfRW::processBlock" ); + int code; + DRW_Block block; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + iface->addBlock( block ); + + if( nextentity == "ENDBLK" ) + { + iface->endBlock(); + return true; // found ENDBLK, terminate + } + else + { + processEntities( true ); + iface->endBlock(); + return true; // found ENDBLK, terminate + } + } + + default: + block.parseCode( code, reader ); + break; + } + } + + return true; +} + + +/********* Entities Section *********/ + +bool dxfRW::processEntities( bool isblock ) +{ + DBG( "dxfRW::processEntities\n" ); + int code; + + if( !reader->readRec( &code, !binary ) ) + { + return false; + } + + bool next = true; + + if( code == 0 ) + { + nextentity = reader->getString(); + } + else if( !isblock ) + { + return false; // first record in entities is 0 + } + + do { + if( nextentity == "ENDSEC" || nextentity == "ENDBLK" ) + { + return true; // found ENDSEC or ENDBLK terminate + } + else if( nextentity == "POINT" ) + { + processPoint(); + } + else if( nextentity == "LINE" ) + { + processLine(); + } + else if( nextentity == "CIRCLE" ) + { + processCircle(); + } + else if( nextentity == "ARC" ) + { + processArc(); + } + else if( nextentity == "ELLIPSE" ) + { + processEllipse(); + } + else if( nextentity == "TRACE" ) + { + processTrace(); + } + else if( nextentity == "SOLID" ) + { + processSolid(); + } + else if( nextentity == "INSERT" ) + { + processInsert(); + } + else if( nextentity == "LWPOLYLINE" ) + { + processLWPolyline(); + } + else if( nextentity == "POLYLINE" ) + { + processPolyline(); + } + else if( nextentity == "TEXT" ) + { + processText(); + } + else if( nextentity == "MTEXT" ) + { + processMText(); + } + else if( nextentity == "HATCH" ) + { + processHatch(); + } + else if( nextentity == "SPLINE" ) + { + processSpline(); + } + else if( nextentity == "3DFACE" ) + { + process3dface(); + } + else if( nextentity == "VIEWPORT" ) + { + processViewport(); + } + else if( nextentity == "IMAGE" ) + { + processImage(); + } + else if( nextentity == "DIMENSION" ) + { + processDimension(); + } + else if( nextentity == "LEADER" ) + { + processLeader(); + } + else if( nextentity == "RAY" ) + { + processRay(); + } + else if( nextentity == "XLINE" ) + { + processXline(); + } + else + { + if( reader->readRec( &code, !binary ) ) + { + if( code == 0 ) + nextentity = reader->getString(); + } + else + return false; // end of file without ENDSEC + } + } while( next ); + + return true; +} + + +bool dxfRW::processEllipse() +{ + DBG( "dxfRW::processEllipse" ); + int code; + DRW_Ellipse ellipse; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + + if( applyExt ) + ellipse.applyExtrusion(); + + iface->addEllipse( ellipse ); + return true; // found new entity or ENDSEC, terminate + } + + default: + ellipse.parseCode( code, reader ); + break; + } + } + + return true; +} + + +bool dxfRW::processTrace() +{ + DBG( "dxfRW::processTrace" ); + int code; + DRW_Trace trace; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + + if( applyExt ) + trace.applyExtrusion(); + + iface->addTrace( trace ); + return true; // found new entity or ENDSEC, terminate + } + + default: + trace.parseCode( code, reader ); + break; + } + } + + return true; +} + + +bool dxfRW::processSolid() +{ + DBG( "dxfRW::processSolid" ); + int code; + DRW_Solid solid; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + + if( applyExt ) + solid.applyExtrusion(); + + iface->addSolid( solid ); + return true; // found new entity or ENDSEC, terminate + } + + default: + solid.parseCode( code, reader ); + break; + } + } + + return true; +} + + +bool dxfRW::process3dface() +{ + DBG( "dxfRW::process3dface" ); + int code; + DRW_3Dface face; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + iface->add3dFace( face ); + return true; // found new entity or ENDSEC, terminate + } + + default: + face.parseCode( code, reader ); + break; + } + } + + return true; +} + + +bool dxfRW::processViewport() +{ + DBG( "dxfRW::processViewport" ); + int code; + DRW_Viewport vp; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + iface->addViewport( vp ); + return true; // found new entity or ENDSEC, terminate + } + + default: + vp.parseCode( code, reader ); + break; + } + } + + return true; +} + + +bool dxfRW::processPoint() +{ + DBG( "dxfRW::processPoint\n" ); + int code; + DRW_Point point; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + iface->addPoint( point ); + return true; // found new entity or ENDSEC, terminate + } + + default: + point.parseCode( code, reader ); + break; + } + } + + return true; +} + + +bool dxfRW::processLine() +{ + DBG( "dxfRW::processLine\n" ); + int code; + DRW_Line line; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + iface->addLine( line ); + return true; // found new entity or ENDSEC, terminate + } + + default: + line.parseCode( code, reader ); + break; + } + } + + return true; +} + + +bool dxfRW::processRay() +{ + DBG( "dxfRW::processRay\n" ); + int code; + DRW_Ray line; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + iface->addRay( line ); + return true; // found new entity or ENDSEC, terminate + } + + default: + line.parseCode( code, reader ); + break; + } + } + + return true; +} + + +bool dxfRW::processXline() +{ + DBG( "dxfRW::processXline\n" ); + int code; + DRW_Xline line; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + iface->addXline( line ); + return true; // found new entity or ENDSEC, terminate + } + + default: + line.parseCode( code, reader ); + break; + } + } + + return true; +} + + +bool dxfRW::processCircle() +{ + DBG( "dxfRW::processPoint\n" ); + int code; + DRW_Circle circle; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + + if( applyExt ) + circle.applyExtrusion(); + + iface->addCircle( circle ); + return true; // found new entity or ENDSEC, terminate + } + + default: + circle.parseCode( code, reader ); + break; + } + } + + return true; +} + + +bool dxfRW::processArc() +{ + DBG( "dxfRW::processPoint\n" ); + int code; + DRW_Arc arc; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + + if( applyExt ) + arc.applyExtrusion(); + + iface->addArc( arc ); + return true; // found new entity or ENDSEC, terminate + } + + default: + arc.parseCode( code, reader ); + break; + } + } + + return true; +} + + +bool dxfRW::processInsert() +{ + DBG( "dxfRW::processInsert" ); + int code; + DRW_Insert insert; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + iface->addInsert( insert ); + return true; // found new entity or ENDSEC, terminate + } + + default: + insert.parseCode( code, reader ); + break; + } + } + + return true; +} + + +bool dxfRW::processLWPolyline() +{ + DBG( "dxfRW::processLWPolyline" ); + int code; + DRW_LWPolyline pl; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + + if( applyExt ) + pl.applyExtrusion(); + + iface->addLWPolyline( pl ); + return true; // found new entity or ENDSEC, terminate + } + + default: + pl.parseCode( code, reader ); + break; + } + } + + return true; +} + + +bool dxfRW::processPolyline() +{ + DBG( "dxfRW::processPolyline" ); + int code; + DRW_Polyline pl; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + + if( nextentity != "VERTEX" ) + { + iface->addPolyline( pl ); + return true; // found new entity or ENDSEC, terminate + } + else + { + processVertex( &pl ); + } + } + + default: + pl.parseCode( code, reader ); + break; + } + } + + return true; +} + + +bool dxfRW::processVertex( DRW_Polyline* pl ) +{ + DBG( "dxfRW::processVertex" ); + int code; + DRW_Vertex* v = new DRW_Vertex(); + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + pl->appendVertex( v ); + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + + if( nextentity == "SEQEND" ) + { + return true; // found SEQEND no more vertex, terminate + } + else if( nextentity == "VERTEX" ) + { + v = new DRW_Vertex(); // another vertex + } + } + + default: + v->parseCode( code, reader ); + break; + } + } + + return true; +} + + +bool dxfRW::processText() +{ + DBG( "dxfRW::processText" ); + int code; + DRW_Text txt; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + iface->addText( txt ); + return true; // found new entity or ENDSEC, terminate + } + + default: + txt.parseCode( code, reader ); + break; + } + } + + return true; +} + + +bool dxfRW::processMText() +{ + DBG( "dxfRW::processMText" ); + int code; + DRW_MText txt; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + txt.updateAngle(); + iface->addMText( txt ); + return true; // found new entity or ENDSEC, terminate + } + + default: + txt.parseCode( code, reader ); + break; + } + } + + return true; +} + + +bool dxfRW::processHatch() +{ + DBG( "dxfRW::processHatch" ); + int code; + DRW_Hatch hatch; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + iface->addHatch( &hatch ); + return true; // found new entity or ENDSEC, terminate + } + + default: + hatch.parseCode( code, reader ); + break; + } + } + + return true; +} + + +bool dxfRW::processSpline() +{ + DBG( "dxfRW::processSpline" ); + int code; + DRW_Spline sp; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + iface->addSpline( &sp ); + return true; // found new entity or ENDSEC, terminate + } + + default: + sp.parseCode( code, reader ); + break; + } + } + + return true; +} + + +bool dxfRW::processImage() +{ + DBG( "dxfRW::processImage" ); + int code; + DRW_Image img; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + iface->addImage( &img ); + return true; // found new entity or ENDSEC, terminate + } + + default: + img.parseCode( code, reader ); + break; + } + } + + return true; +} + + +bool dxfRW::processDimension() +{ + DBG( "dxfRW::processDimension" ); + int code; + DRW_Dimension dim; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + int type = dim.type & 0x0F; + + switch( type ) + { + case 0: + { + DRW_DimLinear d( dim ); + iface->addDimLinear( &d ); + break; + } + + case 1: + { + DRW_DimAligned d( dim ); + iface->addDimAlign( &d ); + break; + } + + case 2: + { + DRW_DimAngular d( dim ); + iface->addDimAngular( &d ); + break; + } + + case 3: + { + DRW_DimDiametric d( dim ); + iface->addDimDiametric( &d ); + break; + } + + case 4: + { + DRW_DimRadial d( dim ); + iface->addDimRadial( &d ); + break; + } + + case 5: + { + DRW_DimAngular3p d( dim ); + iface->addDimAngular3P( &d ); + break; + } + + case 6: + { + DRW_DimOrdinate d( dim ); + iface->addDimOrdinate( &d ); + break; + } + } + + return true; // found new entity or ENDSEC, terminate + } + + default: + dim.parseCode( code, reader ); + break; + } + } + + return true; +} + + +bool dxfRW::processLeader() +{ + DBG( "dxfRW::processLeader" ); + int code; + DRW_Leader leader; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + iface->addLeader( &leader ); + return true; // found new entity or ENDSEC, terminate + } + + default: + leader.parseCode( code, reader ); + break; + } + } + + return true; +} + + +/********* Objects Section *********/ + +bool dxfRW::processObjects() +{ + DBG( "dxfRW::processObjects\n" ); + int code; + + if( !reader->readRec( &code, !binary ) ) + { + return false; + } + + bool next = true; + + if( code == 0 ) + { + nextentity = reader->getString(); + } + else + { + return false; // first record in objects is 0 + } + + do { + if( nextentity == "ENDSEC" ) + { + return true; // found ENDSEC terminate + } + else if( nextentity == "IMAGEDEF" ) + { + processImageDef(); + } + else + { + if( reader->readRec( &code, !binary ) ) + { + if( code == 0 ) + nextentity = reader->getString(); + } + else + return false; // end of file without ENDSEC + } + } while( next ); + + return true; +} + + +bool dxfRW::processImageDef() +{ + DBG( "dxfRW::processImageDef" ); + int code; + DRW_ImageDef img; + + while( reader->readRec( &code, !binary ) ) + { + DBG( code ); DBG( "\n" ); + + switch( code ) + { + case 0: + { + nextentity = reader->getString(); + DBG( nextentity ); DBG( "\n" ); + iface->linkImage( &img ); + return true; // found new entity or ENDSEC, terminate + } + + default: + img.parseCode( code, reader ); + break; + } + } + + return true; +} + + +/** utility function + * convert a int to string in hex + **/ +std::string dxfRW::toHexStr( int n ) +{ +#if defined(__APPLE__) + std::string buffer( 9, '\0' ); + snprintf( &buffer[0], 9, "%X", n ); + return buffer; +#else + std::ostringstream Convert; + Convert << std::uppercase << std::hex << n; + return Convert.str(); +#endif +} diff --git a/lib_dxf/libdxfrw.h b/lib_dxf/libdxfrw.h new file mode 100644 index 0000000000..1ec33ca517 --- /dev/null +++ b/lib_dxf/libdxfrw.h @@ -0,0 +1,143 @@ +/****************************************************************************** +** libDXFrw - Library to read/write DXF files (ascii & binary) ** +** ** +** Copyright (C) 2011 Rallaz, rallazz@gmail.com ** +** ** +** This library is free software, licensed under the terms of the GNU ** +** General Public License as published by the Free Software Foundation, ** +** either version 2 of the License, or (at your option) any later version. ** +** You should have received a copy of the GNU General Public License ** +** along with this program. If not, see . ** +******************************************************************************/ + +#ifndef LIBDXFRW_H +#define LIBDXFRW_H + +#include +#include "drw_entities.h" +#include "drw_objects.h" +#include "drw_interface.h" + + +class dxfReader; +class dxfWriter; + +class dxfRW +{ +public: + dxfRW( const char* name ); + ~dxfRW(); + // / reads the file specified in constructor + /*! + * An interface must be provided. It is used by the class to signal various + * components being added. + * @param interface_ the interface to use + * @param ext should the extrusion be applied to convert in 2D? + * @return true for success + */ + bool read( DRW_Interface* interface_, bool ext ); + + void setBinary( bool b ) { binary = b; } + + bool write( DRW_Interface* interface_, DRW::Version ver, bool bin ); + bool writeLineType( DRW_LType* ent ); + bool writeLayer( DRW_Layer* ent ); + bool writeDimstyle( DRW_Dimstyle* ent ); + bool writeTextstyle( DRW_Textstyle* ent ); + bool writeVport( DRW_Vport* ent ); + bool writePoint( DRW_Point* ent ); + bool writeLine( DRW_Line* ent ); + bool writeRay( DRW_Ray* ent ); + bool writeXline( DRW_Xline* ent ); + bool writeCircle( DRW_Circle* ent ); + bool writeArc( DRW_Arc* ent ); + bool writeEllipse( DRW_Ellipse* ent ); + bool writeTrace( DRW_Trace* ent ); + bool writeSolid( DRW_Solid* ent ); + bool write3dface( DRW_3Dface* ent ); + bool writeLWPolyline( DRW_LWPolyline* ent ); + bool writePolyline( DRW_Polyline* ent ); + bool writeSpline( DRW_Spline* ent ); + bool writeBlockRecord( std::string name ); + bool writeBlock( DRW_Block* ent ); + bool writeInsert( DRW_Insert* ent ); + bool writeMText( DRW_MText* ent ); + bool writeText( DRW_Text* ent ); + bool writeHatch( DRW_Hatch* ent ); + bool writeViewport( DRW_Viewport* ent ); + DRW_ImageDef* writeImage( DRW_Image* ent, std::string name ); + bool writeLeader( DRW_Leader* ent ); + bool writeDimension( DRW_Dimension* ent ); + + void setEllipseParts( int parts ) { elParts = parts; } /*!< set parts munber when convert ellipse to polyline */ +private: + // / used by read() to parse the content of the file + bool processDxf(); + bool processHeader(); + bool processTables(); + bool processBlocks(); + bool processBlock(); + bool processEntities( bool isblock ); + bool processObjects(); + + bool processLType(); + bool processLayer(); + bool processDimStyle(); + bool processTextStyle(); + bool processVports(); + + bool processPoint(); + bool processLine(); + bool processRay(); + bool processXline(); + bool processCircle(); + bool processArc(); + bool processEllipse(); + bool processTrace(); + bool processSolid(); + bool processInsert(); + bool processLWPolyline(); + bool processPolyline(); + bool processVertex( DRW_Polyline* pl ); + bool processText(); + bool processMText(); + bool processHatch(); + bool processSpline(); + bool process3dface(); + bool processViewport(); + bool processImage(); + bool processImageDef(); + bool processDimension(); + bool processLeader(); + +// bool writeHeader(); + bool writeEntity( DRW_Entity* ent ); + bool writeTables(); + bool writeBlocks(); + bool writeObjects(); + std::string toHexStr( int n ); + +private: + DRW::Version version; + std::string fileName; + std::string codePage; + bool binary; + dxfReader* reader; + dxfWriter* writer; + DRW_Interface* iface; + DRW_Header header; +// int section; + string nextentity; + int entCount; + bool wlayer0; + bool dimstyleStd; + bool applyExt; + bool writingBlock; + int elParts; /*!< parts munber when convert ellipse to polyline */ + std::map blockMap; + std::vector imageDef; /*!< imageDef list */ + + int currHandle; +}; + +#endif // LIBDXFRW_H diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 118751b5a9..972542c886 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -26,6 +26,8 @@ include_directories( ../common ../polygon ../common/dialogs + ../lib_dxf + ./import_dxf ${INC_AFTER} ) @@ -114,6 +116,11 @@ set( PCBNEW_DIALOGS dialogs/dialog_footprint_wizard_list.cpp ) +set( PCBNEW_IMPORT_DXF + import_dxf/dialog_dxf_import.cpp + import_dxf/dxf2brd_items.cpp + ) + set( PCBNEW_AUTOROUTER_SRCS autorouter/automove.cpp autorouter/autoplac.cpp @@ -145,6 +152,7 @@ set( PCBNEW_CLASS_SRCS cross-probing.cpp deltrack.cpp ${PCBNEW_DIALOGS} + ${PCBNEW_IMPORT_DXF} dragsegm.cpp drc.cpp drc_clearance_test_functions.cpp @@ -347,6 +355,7 @@ if( KICAD_SCRIPTING_MODULES ) pcbcommon common pcad2kicadpcb + lib_dxf ${GITHUB_PLUGIN_LIBRARIES} polygon bitmaps @@ -515,6 +524,7 @@ target_link_libraries( pcbnew pcad2kicadpcb polygon bitmaps + lib_dxf ${GITHUB_PLUGIN_LIBRARIES} ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 64865106c4..9ca03faa0d 100755 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -51,10 +51,9 @@ #include #include #include - #include - #include +#include // Handles the selection of command events. void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) @@ -1185,6 +1184,11 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) ArchiveModulesOnBoard( wxEmptyString, false ); break; + case ID_GEN_IMPORT_DXF_FILE: + InvokeDXFDialogImport( this ); + m_canvas->Refresh(); + break; + default: wxString msg; msg.Printf( wxT( "PCB_EDIT_FRAME::Process_Special_Functions() unknown event id %d" ), diff --git a/pcbnew/import_dxf/dialog_dxf_import.cpp b/pcbnew/import_dxf/dialog_dxf_import.cpp new file mode 100644 index 0000000000..ee24139604 --- /dev/null +++ b/pcbnew/import_dxf/dialog_dxf_import.cpp @@ -0,0 +1,29 @@ +#include +#include +#include + +bool InvokeDXFDialogImport( PCB_EDIT_FRAME* aCaller ) +{ + wxFileDialog dlg( aCaller, + wxT( "Open File" ), + wxEmptyString, wxEmptyString, + wxT( "dxf Files (*.dxf)|*.dxf|*.DXF" ), + wxFD_OPEN|wxFD_FILE_MUST_EXIST ); + dlg.ShowModal(); + + wxString fileName = dlg.GetPath(); + + if( !fileName.IsEmpty() ) + { + BOARD * brd = aCaller->GetBoard(); + DXF2BRD_CONVERTER dxf_importer; + + // Set coordinates offset for import (offset is given in mm) + double offsetY = - aCaller->GetPageSizeIU().y * MM_PER_IU; + dxf_importer.SetOffset( 0.0, offsetY ); + dxf_importer.SetBrdLayer( DRAW_N ); + dxf_importer.ImportDxfFile( fileName, brd ); + } + + return true; +} diff --git a/pcbnew/import_dxf/dxf2brd_items.cpp b/pcbnew/import_dxf/dxf2brd_items.cpp new file mode 100644 index 0000000000..229d2c1d03 --- /dev/null +++ b/pcbnew/import_dxf/dxf2brd_items.cpp @@ -0,0 +1,557 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr + * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +// The DXF reader lib (libdxfrw) comes from LibreCAD project, a 2D CAD program +// libdxfrw can be found on http://sourceforge.net/projects/libdxfrw/ +// or (latest sources) on +// https://github.com/LibreCAD/LibreCAD/tree/master/libraries/libdxfrw/src +// +// There is no doc to use it, but have a look to +// https://github.com/LibreCAD/LibreCAD/blob/master/librecad/src/lib/filters/rs_filterdxf.cpp +// and https://github.com/LibreCAD/LibreCAD/blob/master/librecad/src/lib/filters/rs_filterdxf.h +// Each time a dxf entity is read, a "call back" fuction is called +// like void DXF2BRD_CONVERTER::addLine( const DRW_Line& data ) when a line is read. +// this function just add the BOARD entity from dxf parameters (start and end point ...) + + +#include "libdxfrw.h" +#include "dxf2brd_items.h" +#include +#include + +#include +#include +#include +#include + +DXF2BRD_CONVERTER::DXF2BRD_CONVERTER() : DRW_Interface() +{ + m_xOffset = 0.0; // X coord offset for conversion (in mm) + m_yOffset = 0.0; // Y coord offset for conversion (in mm) + m_Dfx2mm = 1.0; // The scale factor to convert DXF units to mm + m_dxf = NULL; + m_brd = NULL; + m_version = 0; + m_defaultThickness = 0.1; + m_brdLayer = DRAW_N; +} + + +DXF2BRD_CONVERTER::~DXF2BRD_CONVERTER() +{ +} + + +// coordinate conversions from dxf to internal units +int DXF2BRD_CONVERTER::mapX( double aDxfCoordX ) +{ + return Millimeter2iu( m_xOffset + (aDxfCoordX * m_Dfx2mm) ); +} + + +int DXF2BRD_CONVERTER::mapY( double aDxfCoordY ) +{ + return Millimeter2iu( -m_yOffset - (aDxfCoordY * m_Dfx2mm) ); +} + + +int DXF2BRD_CONVERTER::mapDim( double aDxfValue ) +{ + return Millimeter2iu( aDxfValue * m_Dfx2mm ); +} + + +/** + * Implementation of the method used for communicate + * with this filter. + * + * @param aFile = the full filename. + * @param aLayersList = where to store the list of layer names + */ +bool DXF2BRD_CONVERTER::ImportDxfFile( const wxString& aFile, BOARD* aBoard ) +{ + m_brd = aBoard; + + m_dxf = new dxfRW( aFile.ToUTF8() ); + bool success = m_dxf->read( this, true ); + + if( success==false ) + { + return false; + } + + delete m_dxf; + m_dxf = NULL; + return true; +} + + +/** + * Implementation of the method which handles layers. + */ +void DXF2BRD_CONVERTER::addLayer( const DRW_Layer& data ) +{ +#if 0 + wxString name = wxString::FromUTF8( data.name.c_str() ); + wxLogMessage( name ); +#endif +} + + +/* + * Import line entities. + */ +void DXF2BRD_CONVERTER::addLine( const DRW_Line& data ) +{ + DRAWSEGMENT* segm = new DRAWSEGMENT( m_brd ); + + segm->SetLayer( m_brdLayer ); + wxPoint start( mapX( data.basePoint.x ), mapY( data.basePoint.y ) ); + segm->SetStart( start ); + wxPoint end( mapX( data.secPoint.x ), mapY( data.secPoint.y ) ); + segm->SetEnd( end ); + segm->SetWidth( mapDim( data.thickness == 0 ? m_defaultThickness + : data.thickness ) ); + m_brd->Add( segm ); +} + + +/* + * Import Circle entities. + */ +void DXF2BRD_CONVERTER::addCircle( const DRW_Circle& data ) +{ + DRAWSEGMENT* segm = new DRAWSEGMENT( m_brd ); + + segm->SetLayer( m_brdLayer ); + segm->SetShape( S_CIRCLE ); + wxPoint center( mapX( data.basePoint.x ), mapY( data.basePoint.y ) ); + segm->SetPosition( center ); + wxPoint circle_start( mapX( data.basePoint.x + data.radious ), + mapY( data.basePoint.y ) ); + segm->SetEnd( circle_start ); + segm->SetWidth( mapDim( data.thickness == 0 ? m_defaultThickness + : data.thickness ) ); + m_brd->Add( segm ); +} + + +/* + * Import Arc entities. + */ +void DXF2BRD_CONVERTER::addArc( const DRW_Arc& data ) +{ + DRAWSEGMENT* segm = new DRAWSEGMENT( m_brd ); + + segm->SetLayer( m_brdLayer ); + segm->SetShape( S_ARC ); + + // Init arc centre: + wxPoint center( mapX( data.basePoint.x ), mapY( data.basePoint.y ) ); + segm->SetPosition( center ); + + // Init arc start point + double arcStartx = data.radious; + double arcStarty = 0; + RotatePoint( &arcStartx, &arcStarty, -RAD2DECIDEG( data.staangle ) ); + wxPoint arcStart( mapX( arcStartx + data.basePoint.x ), + mapY( arcStarty + data.basePoint.y ) ); + segm->SetEnd( arcStart ); + + // calculate arc angle (arcs are CCW, and should be < 0 in Pcbnew) + double angle = -RAD2DECIDEG( data.endangle - data.staangle ); + + if( angle > 0.0 ) + angle -= 3600.0; + + segm->SetAngle( angle ); + + segm->SetWidth( mapDim( data.thickness == 0 ? m_defaultThickness + : data.thickness ) ); + m_brd->Add( segm ); +} + +/** + * Import texts (TEXT). + */ +void DXF2BRD_CONVERTER::addText(const DRW_Text& data) +{ + TEXTE_PCB* pcb_text = new TEXTE_PCB( m_brd ); + pcb_text->SetLayer( m_brdLayer ); + + wxPoint refPoint( mapX(data.basePoint.x), mapY(data.basePoint.y) ); + wxPoint secPoint( mapX(data.secPoint.x), mapY(data.secPoint.y) ); + + if (data.alignV !=0 || data.alignH !=0 ||data.alignH ==DRW_Text::HMiddle) + { + if (data.alignH !=DRW_Text::HAligned && data.alignH !=DRW_Text::HFit) + { + wxPoint tmp = secPoint; + secPoint = refPoint; + refPoint = tmp; + } + } + + switch( data.alignV ) + { + case DRW_Text::VBaseLine: // Top + pcb_text->SetVertJustify( GR_TEXT_VJUSTIFY_TOP ); + break; + + case DRW_Text::VBottom: + pcb_text->SetVertJustify( GR_TEXT_VJUSTIFY_BOTTOM ); + break; + + case DRW_Text::VMiddle: + pcb_text->SetVertJustify( GR_TEXT_VJUSTIFY_CENTER ); + break; + + case DRW_Text::VTop: + pcb_text->SetVertJustify( GR_TEXT_VJUSTIFY_TOP ); + break; + } + + switch( data.alignH ) + { + case DRW_Text::HLeft: + pcb_text->SetHorizJustify( GR_TEXT_HJUSTIFY_LEFT ); + break; + + case DRW_Text::HCenter: + pcb_text->SetHorizJustify( GR_TEXT_HJUSTIFY_CENTER ); + break; + + case DRW_Text::HRight: + pcb_text->SetHorizJustify( GR_TEXT_HJUSTIFY_RIGHT ); + break; + + case DRW_Text::HAligned: + // no equivalent options in text pcb. + pcb_text->SetHorizJustify( GR_TEXT_HJUSTIFY_RIGHT ); + break; + + case DRW_Text::HMiddle: + // no equivalent options in text pcb. + pcb_text->SetHorizJustify( GR_TEXT_HJUSTIFY_CENTER ); + break; + + case DRW_Text::HFit: + // no equivalent options in text pcb. + pcb_text->SetHorizJustify( GR_TEXT_HJUSTIFY_RIGHT ); + break; + } + +#if 0 + wxString sty = wxString::FromUTF8(data.style.c_str()); + sty=sty.ToLower(); + + if (data.textgen==2) + { + // Text dir = left to right; + } else if (data.textgen==4) + { + / Text dir = top to bottom; + } else + { + } +#endif + + wxString text = toNativeString( wxString::FromUTF8( data.text.c_str() ) ); + + pcb_text->SetTextPosition( refPoint ); + pcb_text->SetOrientation( data.angle * 10 ); + // The 0.8 factor gives a better height/width ratio with our font + pcb_text->SetWidth( mapDim( data.height * 0.8 ) ); + pcb_text->SetHeight( mapDim( data.height ) ); + pcb_text->SetThickness( mapDim( data.thickness == 0 ? m_defaultThickness + : data.thickness ) ); + pcb_text->SetText( text ); + + m_brd->Add( pcb_text ); +} + + +/** + * Import multi line texts (MTEXT). + */ +void DXF2BRD_CONVERTER::addMText( const DRW_MText& data ) +{ + wxString text = toNativeString( wxString::FromUTF8( data.text.c_str() ) ); + wxString attrib, tmp; + + /* Some texts start by '\' and have formating chars (font name, font option...) + * ending with ';' + * Here are some mtext formatting codes: + * Format code Purpose + * \0...\o Turns overline on and off + * \L...\l Turns underline on and off + * \~ Inserts a nonbreaking space + \\ Inserts a backslash + \\\{...\} Inserts an opening and closing brace + \\ \File name; Changes to the specified font file + \\ \Hvalue; Changes to the text height specified in drawing units + \\ \Hvaluex; Changes the text height to a multiple of the current text height + \\ \S...^...; Stacks the subsequent text at the \, #, or ^ symbol + \\ \Tvalue; Adjusts the space between characters, from.75 to 4 times + \\ \Qangle; Changes obliquing angle + \\ \Wvalue; Changes width factor to produce wide text + \\ \A Sets the alignment value; valid values: 0, 1, 2 (bottom, center, top) while( text.StartsWith( wxT("\\") ) ) + */ + while( text.StartsWith( wxT( "\\" ) ) ) + { + attrib << text.BeforeFirst( ';' ); + tmp = text.AfterFirst( ';' ); + text = tmp; + } + + TEXTE_PCB* pcb_text = new TEXTE_PCB( m_brd ); + pcb_text->SetLayer( m_brdLayer ); + wxPoint textpos( mapX( data.basePoint.x ), mapY( data.basePoint.y ) ); + pcb_text->SetTextPosition( textpos ); + pcb_text->SetOrientation( data.angle * 10 ); + // The 0.8 factor gives a better height/width ratio with our font + pcb_text->SetWidth( mapDim( data.height * 0.8 ) ); + pcb_text->SetHeight( mapDim( data.height ) ); + pcb_text->SetThickness( mapDim( data.thickness == 0 ? m_defaultThickness + : data.thickness ) ); + pcb_text->SetText( text ); + + // Initialize text justifications: + if( data.textgen <= 3 ) + { + pcb_text->SetVertJustify( GR_TEXT_VJUSTIFY_TOP ); + } + else if( data.textgen <= 6 ) + { + pcb_text->SetVertJustify( GR_TEXT_VJUSTIFY_CENTER ); + } + else + { + pcb_text->SetVertJustify( GR_TEXT_VJUSTIFY_BOTTOM ); + } + + if( data.textgen % 3 == 1 ) + { + pcb_text->SetHorizJustify( GR_TEXT_HJUSTIFY_LEFT ); + } + else if( data.textgen % 3 == 2 ) + { + pcb_text->SetHorizJustify( GR_TEXT_HJUSTIFY_CENTER ); + } + else + { + pcb_text->SetHorizJustify( GR_TEXT_HJUSTIFY_RIGHT ); + } + +#if 0 // These setting have no mening in Pcbnew + if( data.alignH==1 ) + { + // Text is left to right; + } + else if( data.alignH == 3 ) + { + // Text is top to bottom; + } + else + { + // use ByStyle; + } + + if( data.alignV==1 ) + { + // use AtLeast; + } + else + { + // useExact; + } +#endif + + m_brd->Add( pcb_text ); +} + + +/** + * Sets the header variables from the DXF file. + */ +void DXF2BRD_CONVERTER::addHeader( const DRW_Header* data ) +{ + std::map::const_iterator it; + + for( it = data->vars.begin(); it != data->vars.end(); it++ ) + { + std::string key = ( (*it).first ).c_str(); + + if( key == "$DWGCODEPAGE" ) + { + DRW_Variant* var = (*it).second; + m_codePage = ( *var->content.s ); + } + } +} + + +/** + * Converts a native unicode string into a DXF encoded string. + * + * DXF endoding includes the following special sequences: + * - %%%c for a diameter sign + * - %%%d for a degree sign + * - %%%p for a plus/minus sign + */ +wxString DXF2BRD_CONVERTER::toDxfString( const wxString& str ) +{ + wxString res; + int j = 0; + + for( unsigned i = 0; i175 || c<11 ) + { + res.append( str.Mid( j, i - j ) ); + j = i; + + switch( c ) + { + case 0x0A: + res += wxT("\\P"); + break; + + // diameter: +#ifdef __WINDOWS_ + // windows, as always, is special. + case 0x00D8: +#else + case 0x2205: +#endif + res += wxT("%%C"); + break; + + // degree: + case 0x00B0: + res += wxT("%%D"); + break; + + // plus/minus + case 0x00B1: + res += wxT("%%P"); + break; + + default: + j--; + break; + } + + j++; + } + } + + res.append( str.Mid( j ) ); + return res; +} + + +/** + * Converts a DXF encoded string into a native Unicode string. + */ +wxString DXF2BRD_CONVERTER::toNativeString( const wxString& data ) +{ + wxString res; + + // Ignore font tags: + int j = 0; + + for( unsigned i = 0; i * Copyright (C) 2013 KiCad Developers, see change_log.txt for contributors. @@ -75,5 +77,14 @@ int InvokePcbLibTableEditor( wxTopLevelWindow* aCaller, FP_LIB_TABLE* aGlobal, F void InvokePluginOptionsEditor( wxTopLevelWindow* aCaller, const wxString& aNickname, const wxString& aOptions, wxString* aResult ); +/** + * Function InvokePcbLibTableEditor + * shows the modal DIALOG_FP_LIB_TABLE for purposes of editing two lib tables. + * + * @param aCaller is the wxTopLevelWindow which is invoking the dialog. + * @return true if the ilport was made. + */ +bool InvokeDXFDialogImport( PCB_EDIT_FRAME* aCaller ); + #endif // INVOKE_A_DIALOG_H_ diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index b4ef6f6407..93ffa03783 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -174,6 +174,11 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() _( "Import a routed \"Specctra Session\" (*.ses) file" ), KiBitmap( import_xpm ) ); + AddMenuItem( submenuImport, ID_GEN_IMPORT_DXF_FILE, + _( "&DXF File" ), + _( "Import a 2D Drawing DXF file to Pcbnew on the Drawings layer" ), + KiBitmap( import_xpm ) ); + AddMenuItem( filesMenu, submenuImport, ID_GEN_IMPORT_FILE, _( "&Import" ), _( "Import files" ), KiBitmap( import_xpm ) ); diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 500c056dd5..03a528d929 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -105,6 +105,7 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_MENU( ID_GEN_IMPORT_SPECCTRA_SESSION,PCB_EDIT_FRAME::ImportSpecctraSession ) EVT_MENU( ID_GEN_IMPORT_SPECCTRA_DESIGN, PCB_EDIT_FRAME::ImportSpecctraDesign ) + EVT_MENU( ID_GEN_IMPORT_DXF_FILE, PCB_EDIT_FRAME::Process_Special_Functions ) EVT_MENU( ID_MENU_ARCHIVE_NEW_MODULES, PCB_EDIT_FRAME::Process_Special_Functions ) EVT_MENU( ID_MENU_ARCHIVE_ALL_MODULES, PCB_EDIT_FRAME::Process_Special_Functions ) diff --git a/pcbnew/pcbnew_id.h b/pcbnew/pcbnew_id.h index 7d698a9718..cdbc60837b 100644 --- a/pcbnew/pcbnew_id.h +++ b/pcbnew/pcbnew_id.h @@ -252,6 +252,7 @@ enum pcbnew_ids ID_GEN_EXPORT_FILE_MODULE_REPORT, ID_GEN_IMPORT_SPECCTRA_SESSION, ID_GEN_IMPORT_SPECCTRA_DESIGN, + ID_GEN_IMPORT_DXF_FILE, ID_TOOLBARH_PCB_MODE_MODULE, ID_TOOLBARH_PCB_MODE_TRACKS, From fe2b9bd444d9565c22da9dd835ae5eab88bf2483 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 25 Oct 2013 14:16:18 +0200 Subject: [PATCH 408/415] Add patch from Baranovskiy Konstantin about vertical justification of multiline texts. Fix issues created by this patch. Note, this fix slightly changes the vertical position of these texts. This is not really a problem in eeschema, but in pcbnew this is perhaps more annoying, if the verical multiline text is critical. Fix a very minor issue for vertical justification of single line texts in dxf import. --- common/eda_text.cpp | 90 ++++++++++++++++++++++++----- include/eda_text.h | 14 ++--- pcbnew/import_dxf/dxf2brd_items.cpp | 9 +-- 3 files changed, 86 insertions(+), 27 deletions(-) diff --git a/common/eda_text.cpp b/common/eda_text.cpp index a08ba35527..1817de2029 100644 --- a/common/eda_text.cpp +++ b/common/eda_text.cpp @@ -32,6 +32,13 @@ #include // RotatePoint #include // EDA_DRAW_PANEL +// until bzr rev 4410, Y position of vertical justification +// of multiline texts was incorrectly calculated for BOTTOM +// and CENTER vertical justification. (Only the first line was justified) +// If this line is left uncommented, the bug is fixed, but +// creates a (very minor) issue for existing texts, mainly in Pcbnew +// because the text position is sometimes critical. +#define FIX_MULTILINE_VERT_JUSTIF // Conversion to application internal units defined at build time. #if defined( PCBNEW ) @@ -90,6 +97,16 @@ int EDA_TEXT::LenSize( const wxString& aLine ) const return ReturnGraphicTextWidth( aLine, m_Size.x, m_Italic, m_Bold ); } +/** + * Function GetInterline + * return the distance between 2 text lines + * has meaning only for multiline texts + */ +int EDA_TEXT::GetInterline( int aTextThickness ) const +{ + int thickness = aTextThickness <= 0 ? m_Thickness : aTextThickness; + return (( m_Size.y * 14 ) / 10) + thickness; +} EDA_RECT EDA_TEXT::GetTextBox( int aLine, int aThickness, bool aInvertY ) const { @@ -98,6 +115,7 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, int aThickness, bool aInvertY ) const wxArrayString* list = NULL; wxString text = m_Text; int thickness = ( aThickness < 0 ) ? m_Thickness : aThickness; + int linecount = 1; if( m_MultilineAllowed ) { @@ -109,12 +127,14 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, int aThickness, bool aInvertY ) const text = list->Item( aLine ); else text = list->Item( 0 ); + + linecount = list->GetCount(); } } // calculate the H and V size int dx = LenSize( text ); - int dy = GetInterline(); + int dy = GetInterline( aThickness ); /* Creates bounding box (rectangle) for an horizontal text */ wxSize textsize = wxSize( dx, dy ); @@ -175,7 +195,7 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, int aThickness, bool aInvertY ) const break; case GR_TEXT_VJUSTIFY_CENTER: - rect.SetY( rect.GetY() - (dy / 2) ); + rect.SetY( rect.GetY() - ( dy / 2) ); break; case GR_TEXT_VJUSTIFY_BOTTOM: @@ -183,6 +203,30 @@ EDA_RECT EDA_TEXT::GetTextBox( int aLine, int aThickness, bool aInvertY ) const break; } + if( linecount > 1 ) + { +#ifdef FIX_MULTILINE_VERT_JUSTIF + int yoffset; + linecount -= 1; + + switch( m_VJustify ) + { + case GR_TEXT_VJUSTIFY_TOP: + break; + + case GR_TEXT_VJUSTIFY_CENTER: + yoffset = linecount * GetInterline() / 2; + rect.SetY( rect.GetY() - yoffset ); + break; + + case GR_TEXT_VJUSTIFY_BOTTOM: + yoffset = linecount * GetInterline( aThickness ); + rect.SetY( rect.GetY() - yoffset ); + break; + } +#endif + } + rect.Inflate( thickness / 2 ); rect.Normalize(); // Make h and v sizes always >= 0 @@ -227,15 +271,31 @@ void EDA_TEXT::Draw( EDA_RECT* aClipBox, wxDC* aDC, const wxPoint& aOffset, offset.y = GetInterline(); +#ifdef FIX_MULTILINE_VERT_JUSTIF + if( list->Count() > 1 ) + { + switch( m_VJustify ) + { + case GR_TEXT_VJUSTIFY_TOP: + break; + + case GR_TEXT_VJUSTIFY_CENTER: + pos.y -= ( list->Count() - 1 ) * offset.y / 2; + break; + + case GR_TEXT_VJUSTIFY_BOTTOM: + pos.y -= ( list->Count() - 1 ) * offset.y; + break; + } + } +#endif RotatePoint( &offset, m_Orient ); for( unsigned i = 0; iCount(); i++ ) { wxString txt = list->Item( i ); drawOneLineOfText( aClipBox, aDC, aOffset, aColor, - aDrawMode, aFillMode, - i ? UNSPECIFIED_COLOR : aAnchor_color, - txt, pos ); + aDrawMode, aFillMode, txt, pos ); pos += offset; } @@ -243,15 +303,21 @@ void EDA_TEXT::Draw( EDA_RECT* aClipBox, wxDC* aDC, const wxPoint& aOffset, } else drawOneLineOfText( aClipBox, aDC, aOffset, aColor, - aDrawMode, aFillMode, - aAnchor_color, m_Text, m_Pos ); + aDrawMode, aFillMode, m_Text, m_Pos ); + + // Draw text anchor, if requested + if( aAnchor_color != UNSPECIFIED_COLOR ) + { + GRDrawAnchor( aClipBox, aDC, + m_Pos.x + aOffset.x, m_Pos.y + aOffset.y, + DIM_ANCRE_TEXTE, aAnchor_color ); + } } void EDA_TEXT::drawOneLineOfText( EDA_RECT* aClipBox, wxDC* aDC, const wxPoint& aOffset, EDA_COLOR_T aColor, GR_DRAWMODE aDrawMode, EDA_DRAW_MODE_T aFillMode, - EDA_COLOR_T aAnchor_color, wxString& aText, wxPoint aPos ) { int width = m_Thickness; @@ -262,14 +328,6 @@ void EDA_TEXT::drawOneLineOfText( EDA_RECT* aClipBox, wxDC* aDC, if( aDrawMode != UNSPECIFIED_DRAWMODE ) GRSetDrawMode( aDC, aDrawMode ); - // Draw text anchor, if requested - if( aAnchor_color != UNSPECIFIED_COLOR ) - { - GRDrawAnchor( aClipBox, aDC, - aPos.x + aOffset.x, aPos.y + aOffset.y, - DIM_ANCRE_TEXTE, aAnchor_color ); - } - if( aFillMode == SKETCH ) width = -width; diff --git a/include/eda_text.h b/include/eda_text.h index 301dda0637..7fca31fdaa 100644 --- a/include/eda_text.h +++ b/include/eda_text.h @@ -236,6 +236,8 @@ public: * for single line text, aLine is unused * If aLine == -1, the full area (considering all lines) is returned * @param aThickness Overrides the current thickness when greater than 0. + * this is needed when the current m_Thickness is 0 and a default line thickness + * is used * @param aInvertY Invert the Y axis when calculating bounding box. */ EDA_RECT GetTextBox( int aLine = -1, int aThickness = -1, bool aInvertY = false ) const; @@ -244,11 +246,11 @@ public: * Function GetInterline * return the distance between 2 text lines * has meaning only for multiline texts + * @param aTextThickness Overrides the current thickness when greater than 0. + * this is needed when the current m_Thickness is 0 and a default line thickness + * is used */ - int GetInterline() const - { - return (( m_Size.y * 14 ) / 10) + m_Thickness; - } + int GetInterline( int aTextThickness = -1 ) const; /** * Function GetTextStyleName @@ -286,15 +288,13 @@ private: * @param aColor = text color * @param aDrawMode = GR_OR, GR_XOR.., -1 to use the current mode. * @param aFillMode = LINE, FILLED or SKETCH - * @param aAnchor_color = anchor color ( UNSPECIFIED_COLOR = do not draw anchor ). * @param aText = the single line of text to draw. * @param aPos = the position of this line ). */ void drawOneLineOfText( EDA_RECT* aClipBox, wxDC* aDC, const wxPoint& aOffset, EDA_COLOR_T aColor, GR_DRAWMODE aDrawMode, EDA_DRAW_MODE_T aFillMode, - EDA_COLOR_T aAnchor_color, wxString& aText, - wxPoint aPos ); + wxString& aText, wxPoint aPos ); }; diff --git a/pcbnew/import_dxf/dxf2brd_items.cpp b/pcbnew/import_dxf/dxf2brd_items.cpp index 229d2c1d03..5d48bb8e2d 100644 --- a/pcbnew/import_dxf/dxf2brd_items.cpp +++ b/pcbnew/import_dxf/dxf2brd_items.cpp @@ -112,6 +112,7 @@ bool DXF2BRD_CONVERTER::ImportDxfFile( const wxString& aFile, BOARD* aBoard ) */ void DXF2BRD_CONVERTER::addLayer( const DRW_Layer& data ) { + // Not yet useful in Pcbnew. #if 0 wxString name = wxString::FromUTF8( data.name.c_str() ); wxLogMessage( name ); @@ -215,8 +216,8 @@ void DXF2BRD_CONVERTER::addText(const DRW_Text& data) switch( data.alignV ) { - case DRW_Text::VBaseLine: // Top - pcb_text->SetVertJustify( GR_TEXT_VJUSTIFY_TOP ); + case DRW_Text::VBaseLine: + pcb_text->SetVertJustify( GR_TEXT_VJUSTIFY_BOTTOM ); break; case DRW_Text::VBottom: @@ -248,7 +249,7 @@ void DXF2BRD_CONVERTER::addText(const DRW_Text& data) case DRW_Text::HAligned: // no equivalent options in text pcb. - pcb_text->SetHorizJustify( GR_TEXT_HJUSTIFY_RIGHT ); + pcb_text->SetHorizJustify( GR_TEXT_HJUSTIFY_LEFT ); break; case DRW_Text::HMiddle: @@ -258,7 +259,7 @@ void DXF2BRD_CONVERTER::addText(const DRW_Text& data) case DRW_Text::HFit: // no equivalent options in text pcb. - pcb_text->SetHorizJustify( GR_TEXT_HJUSTIFY_RIGHT ); + pcb_text->SetHorizJustify( GR_TEXT_HJUSTIFY_LEFT ); break; } From eeddfcbec22178b5aa18a6e01dd32f2f68749daf Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 26 Oct 2013 09:03:06 +0200 Subject: [PATCH 409/415] Pcbnew, dxf import: Add dialog to choose the board import layer, and the position of dxf coordinates origin --- pcbnew/CMakeLists.txt | 1 + pcbnew/import_dxf/dialog_dxf_import.cpp | 159 +++- pcbnew/import_dxf/dialog_dxf_import.fbp | 741 +++++++++++++++++++ pcbnew/import_dxf/dialog_dxf_import_base.cpp | 83 +++ pcbnew/import_dxf/dialog_dxf_import_base.h | 67 ++ pcbnew/import_dxf/dxf2brd_items.cpp | 2 +- pcbnew/import_dxf/dxf2brd_items.h | 2 + 7 files changed, 1042 insertions(+), 13 deletions(-) create mode 100644 pcbnew/import_dxf/dialog_dxf_import.fbp create mode 100644 pcbnew/import_dxf/dialog_dxf_import_base.cpp create mode 100644 pcbnew/import_dxf/dialog_dxf_import_base.h diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 972542c886..41cefc0b66 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -117,6 +117,7 @@ set( PCBNEW_DIALOGS ) set( PCBNEW_IMPORT_DXF + import_dxf/dialog_dxf_import_base.cpp import_dxf/dialog_dxf_import.cpp import_dxf/dxf2brd_items.cpp ) diff --git a/pcbnew/import_dxf/dialog_dxf_import.cpp b/pcbnew/import_dxf/dialog_dxf_import.cpp index ee24139604..4a93aa056a 100644 --- a/pcbnew/import_dxf/dialog_dxf_import.cpp +++ b/pcbnew/import_dxf/dialog_dxf_import.cpp @@ -1,10 +1,99 @@ +/** + * @file dialog_dxf_import.cpp + * @brief Dialog to import a dxf file on a given board layer. + */ + +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr + * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #include #include #include +#include +#include -bool InvokeDXFDialogImport( PCB_EDIT_FRAME* aCaller ) +class DIALOG_DXF_IMPORT : public DIALOG_DXF_IMPORT_BASE { - wxFileDialog dlg( aCaller, +private: + PCB_EDIT_FRAME * m_parent; + static wxString m_dxfFilename; + static int m_offsetSelection; + static LAYER_NUM m_layer; + +public: + + DIALOG_DXF_IMPORT( PCB_EDIT_FRAME* aParent ); + ~DIALOG_DXF_IMPORT(); + +private: + // Virtual event handlers + void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } + void OnOKClick( wxCommandEvent& event ); + void OnBrowseDxfFiles( wxCommandEvent& event ); +}; + +// Static members of DIALOG_DXF_IMPORT, to remember +// the user's choices during the session +wxString DIALOG_DXF_IMPORT::m_dxfFilename; +int DIALOG_DXF_IMPORT::m_offsetSelection = 4; +LAYER_NUM DIALOG_DXF_IMPORT::m_layer = DRAW_N; + + +DIALOG_DXF_IMPORT::DIALOG_DXF_IMPORT( PCB_EDIT_FRAME* aParent ) + : DIALOG_DXF_IMPORT_BASE( aParent ) +{ + m_parent = aParent; + m_textCtrlFileName->SetValue( m_dxfFilename ); + m_rbOffsetOption->SetSelection( m_offsetSelection ); + + // Configure the layers list selector + m_SelLayerBox->SetLayersHotkeys( false ); // Do not display hotkeys + m_SelLayerBox->SetLayerMask( ALL_CU_LAYERS ); // Do not use copper layers + m_SelLayerBox->SetBoardFrame( m_parent ); + m_SelLayerBox->Resync(); + if( m_SelLayerBox->SetLayerSelection( m_layer ) < 0 ) + { + m_layer = DRAW_N; + m_SelLayerBox->SetLayerSelection( m_layer ); + } + + GetSizer()->Fit( this ); + GetSizer()->SetSizeHints( this ); + Centre(); +} + + +DIALOG_DXF_IMPORT::~DIALOG_DXF_IMPORT() +{ + m_offsetSelection = m_rbOffsetOption->GetSelection(); + m_layer = m_SelLayerBox->GetLayerSelection(); +} + + +void DIALOG_DXF_IMPORT::OnBrowseDxfFiles( wxCommandEvent& event ) +{ + wxFileDialog dlg( m_parent, wxT( "Open File" ), wxEmptyString, wxEmptyString, wxT( "dxf Files (*.dxf)|*.dxf|*.DXF" ), @@ -13,17 +102,63 @@ bool InvokeDXFDialogImport( PCB_EDIT_FRAME* aCaller ) wxString fileName = dlg.GetPath(); - if( !fileName.IsEmpty() ) - { - BOARD * brd = aCaller->GetBoard(); - DXF2BRD_CONVERTER dxf_importer; + if( fileName.IsEmpty() ) + return; - // Set coordinates offset for import (offset is given in mm) - double offsetY = - aCaller->GetPageSizeIU().y * MM_PER_IU; - dxf_importer.SetOffset( 0.0, offsetY ); - dxf_importer.SetBrdLayer( DRAW_N ); - dxf_importer.ImportDxfFile( fileName, brd ); + m_dxfFilename = fileName; + m_textCtrlFileName->SetValue( fileName ); +} + +void DIALOG_DXF_IMPORT::OnOKClick( wxCommandEvent& event ) +{ + m_dxfFilename = m_textCtrlFileName->GetValue(); + + if( m_dxfFilename.IsEmpty() ) + return; + + double offsetX = 0; + double offsetY = 0; + + m_offsetSelection = m_rbOffsetOption->GetSelection(); + switch( m_offsetSelection ) + { + case 0: + break; + + case 1: + offsetY = m_parent->GetPageSizeIU().y * MM_PER_IU / 2; + break; + + case 2: + offsetX = m_parent->GetPageSizeIU().x * MM_PER_IU / 2; + offsetY = m_parent->GetPageSizeIU().y * MM_PER_IU / 2; + break; + + case 3: + offsetY = m_parent->GetPageSizeIU().y * MM_PER_IU; + break; } - return true; + BOARD * brd = m_parent->GetBoard(); + DXF2BRD_CONVERTER dxf_importer; + + // Set coordinates offset for import (offset is given in mm) + dxf_importer.SetOffset( offsetX, offsetY ); + m_layer = m_SelLayerBox->GetLayerSelection(); + dxf_importer.SetBrdLayer( m_layer ); + dxf_importer.ImportDxfFile( m_dxfFilename, brd ); + + EndModal( wxID_OK ); +} + + +bool InvokeDXFDialogImport( PCB_EDIT_FRAME* aCaller ) +{ + DIALOG_DXF_IMPORT dlg( aCaller ); + bool success = dlg.ShowModal() == wxID_OK; + + if( success ) + aCaller->OnModify(); + + return success; } diff --git a/pcbnew/import_dxf/dialog_dxf_import.fbp b/pcbnew/import_dxf/dialog_dxf_import.fbp new file mode 100644 index 0000000000..e68140be0f --- /dev/null +++ b/pcbnew/import_dxf/dialog_dxf_import.fbp @@ -0,0 +1,741 @@ + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + connect + dialog_dxf_import_base + 1000 + none + 1 + dialog_dxf_import + + . + + 1 + 1 + 1 + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + DIALOG_DXF_IMPORT_BASE + + 356,273 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + DIALOG_SHIM; dialog_shim.h + Import DXF file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizerMain + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Filename: + + 0 + + + 0 + + 1 + m_staticText37 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM + 0 + + + bSizerFile + wxHORIZONTAL + none + + 5 + wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + 300,-1 + 1 + m_textCtrlFileName + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Browse + + 0 + + + 0 + + 1 + m_buttonBrowse + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnBrowseDxfFiles + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Right top corner" "Middle" "Centered on page" "Right bottom corner" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Origin of DXF Coordinates + 1 + + 0 + + + 0 + + 1 + m_rbOffsetOption + 1 + + + protected + 1 + + Resizable + 3 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Board layer for import: + + 0 + + + 0 + + 1 + m_staticTextBrdlayer + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_SelLayerBox + 1 + + + protected + 1 + + Resizable + -1 + 1 + + + PCB_LAYER_BOX_SELECTOR; class_pcb_layer_box_selector.h + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline8 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_sdbSizer1 + protected + + OnCancelClick + + + + OnOKClick + + + + + + + + diff --git a/pcbnew/import_dxf/dialog_dxf_import_base.cpp b/pcbnew/import_dxf/dialog_dxf_import_base.cpp new file mode 100644 index 0000000000..03e80e26a6 --- /dev/null +++ b/pcbnew/import_dxf/dialog_dxf_import_base.cpp @@ -0,0 +1,83 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Oct 8 2012) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "class_pcb_layer_box_selector.h" + +#include "dialog_dxf_import_base.h" + +/////////////////////////////////////////////////////////////////////////// + +DIALOG_DXF_IMPORT_BASE::DIALOG_DXF_IMPORT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizerMain; + bSizerMain = new wxBoxSizer( wxVERTICAL ); + + m_staticText37 = new wxStaticText( this, wxID_ANY, _("Filename:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText37->Wrap( -1 ); + bSizerMain->Add( m_staticText37, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + wxBoxSizer* bSizerFile; + bSizerFile = new wxBoxSizer( wxHORIZONTAL ); + + m_textCtrlFileName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_textCtrlFileName->SetMinSize( wxSize( 300,-1 ) ); + + bSizerFile->Add( m_textCtrlFileName, 1, wxRIGHT|wxLEFT, 5 ); + + m_buttonBrowse = new wxButton( this, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerFile->Add( m_buttonBrowse, 0, wxRIGHT|wxLEFT, 5 ); + + + bSizerMain->Add( bSizerFile, 0, wxEXPAND|wxBOTTOM, 5 ); + + wxString m_rbOffsetOptionChoices[] = { _("Right top corner"), _("Middle"), _("Centered on page"), _("Right bottom corner") }; + int m_rbOffsetOptionNChoices = sizeof( m_rbOffsetOptionChoices ) / sizeof( wxString ); + m_rbOffsetOption = new wxRadioBox( this, wxID_ANY, _("Origin of DXF Coordinates"), wxDefaultPosition, wxDefaultSize, m_rbOffsetOptionNChoices, m_rbOffsetOptionChoices, 1, wxRA_SPECIFY_COLS ); + m_rbOffsetOption->SetSelection( 3 ); + bSizerMain->Add( m_rbOffsetOption, 0, wxALL|wxEXPAND, 5 ); + + m_staticTextBrdlayer = new wxStaticText( this, wxID_ANY, _("Board layer for import:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextBrdlayer->Wrap( -1 ); + bSizerMain->Add( m_staticTextBrdlayer, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_SelLayerBox = new PCB_LAYER_BOX_SELECTOR( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizerMain->Add( m_SelLayerBox, 0, wxALL|wxEXPAND, 5 ); + + m_staticline8 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bSizerMain->Add( m_staticline8, 0, wxEXPAND | wxALL, 5 ); + + m_sdbSizer1 = new wxStdDialogButtonSizer(); + m_sdbSizer1OK = new wxButton( this, wxID_OK ); + m_sdbSizer1->AddButton( m_sdbSizer1OK ); + m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL ); + m_sdbSizer1->AddButton( m_sdbSizer1Cancel ); + m_sdbSizer1->Realize(); + + bSizerMain->Add( m_sdbSizer1, 0, wxALIGN_RIGHT, 5 ); + + + this->SetSizer( bSizerMain ); + this->Layout(); + + this->Centre( wxBOTH ); + + // Connect Events + m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DXF_IMPORT_BASE::OnBrowseDxfFiles ), NULL, this ); + m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DXF_IMPORT_BASE::OnCancelClick ), NULL, this ); + m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DXF_IMPORT_BASE::OnOKClick ), NULL, this ); +} + +DIALOG_DXF_IMPORT_BASE::~DIALOG_DXF_IMPORT_BASE() +{ + // Disconnect Events + m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DXF_IMPORT_BASE::OnBrowseDxfFiles ), NULL, this ); + m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DXF_IMPORT_BASE::OnCancelClick ), NULL, this ); + m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DXF_IMPORT_BASE::OnOKClick ), NULL, this ); + +} diff --git a/pcbnew/import_dxf/dialog_dxf_import_base.h b/pcbnew/import_dxf/dialog_dxf_import_base.h new file mode 100644 index 0000000000..b0e47c0982 --- /dev/null +++ b/pcbnew/import_dxf/dialog_dxf_import_base.h @@ -0,0 +1,67 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Oct 8 2012) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __DIALOG_DXF_IMPORT_BASE_H__ +#define __DIALOG_DXF_IMPORT_BASE_H__ + +#include +#include +#include +class DIALOG_SHIM; +class PCB_LAYER_BOX_SELECTOR; + +#include "dialog_shim.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_DXF_IMPORT_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_DXF_IMPORT_BASE : public DIALOG_SHIM +{ + private: + + protected: + wxStaticText* m_staticText37; + wxTextCtrl* m_textCtrlFileName; + wxButton* m_buttonBrowse; + wxRadioBox* m_rbOffsetOption; + wxStaticText* m_staticTextBrdlayer; + PCB_LAYER_BOX_SELECTOR* m_SelLayerBox; + wxStaticLine* m_staticline8; + wxStdDialogButtonSizer* m_sdbSizer1; + wxButton* m_sdbSizer1OK; + wxButton* m_sdbSizer1Cancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnBrowseDxfFiles( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnOKClick( wxCommandEvent& event ) { event.Skip(); } + + + public: + + DIALOG_DXF_IMPORT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Import DXF file"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 356,273 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_DXF_IMPORT_BASE(); + +}; + +#endif //__DIALOG_DXF_IMPORT_BASE_H__ diff --git a/pcbnew/import_dxf/dxf2brd_items.cpp b/pcbnew/import_dxf/dxf2brd_items.cpp index 5d48bb8e2d..1b8b7df0c8 100644 --- a/pcbnew/import_dxf/dxf2brd_items.cpp +++ b/pcbnew/import_dxf/dxf2brd_items.cpp @@ -72,7 +72,7 @@ int DXF2BRD_CONVERTER::mapX( double aDxfCoordX ) int DXF2BRD_CONVERTER::mapY( double aDxfCoordY ) { - return Millimeter2iu( -m_yOffset - (aDxfCoordY * m_Dfx2mm) ); + return Millimeter2iu( m_yOffset - (aDxfCoordY * m_Dfx2mm) ); } diff --git a/pcbnew/import_dxf/dxf2brd_items.h b/pcbnew/import_dxf/dxf2brd_items.h index 158c34f2ab..c2316aa326 100644 --- a/pcbnew/import_dxf/dxf2brd_items.h +++ b/pcbnew/import_dxf/dxf2brd_items.h @@ -46,6 +46,8 @@ private: double m_yOffset; // Y coord offset for conversion (in mm) double m_defaultThickness; // default line thickness for conversion (in dxf units) double m_Dfx2mm; // The scale factor to convert DXF units to mm + // Seems DRW_Interface always converts DXF coordinates in mm + // (to be confirmed) int m_brdLayer; // The board layer to place imported dfx items int m_version; std::string m_codePage; From fd1fc0f1d1c1a8806b0dcb577b88ac738a6d8caa Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 26 Oct 2013 20:17:44 +0200 Subject: [PATCH 410/415] Fix typo --- cvpcb/readwrite_dlgs.cpp | 4 ++-- pcbnew/files.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cvpcb/readwrite_dlgs.cpp b/cvpcb/readwrite_dlgs.cpp index 1a153fbe98..f24820d31b 100644 --- a/cvpcb/readwrite_dlgs.cpp +++ b/cvpcb/readwrite_dlgs.cpp @@ -281,7 +281,7 @@ int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName ) fpLibFileName.SetName( FP_LIB_TABLE::GetFileName() ); if( fpLibFileName.FileExists() - && IsOK( this, _( "A footprint library table already exsist in this path.\n\nDo " + && IsOK( this, _( "A footprint library table already exists in this path.\n\nDo " "you want to overwrite it?" ) ) ) { try @@ -292,7 +292,7 @@ int CVPCB_MAINFRAME::SaveCmpLinkFile( const wxString& aFullFileName ) { DisplayError( this, wxString::Format( _( "An error occurred attempting to save the " - "footpirnt library table <%s>\n\n%s" ), + "footprint library table <%s>\n\n%s" ), GetChars( fpLibFileName.GetFullPath() ), GetChars( ioe.errorText ) ) ); } diff --git a/pcbnew/files.cpp b/pcbnew/files.cpp index e5b51689b3..7d979fd584 100644 --- a/pcbnew/files.cpp +++ b/pcbnew/files.cpp @@ -544,7 +544,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF fn.SetName( FP_LIB_TABLE::GetFileName() ); if( fn.FileExists() - && IsOK( this, _( "A footprint library table already exsist in this path.\n\nDo " + && IsOK( this, _( "A footprint library table already exists in this path.\n\nDo " "you want to overwrite it?" ) ) ) { try @@ -555,7 +555,7 @@ bool PCB_EDIT_FRAME::SavePcbFile( const wxString& aFileName, bool aCreateBackupF { DisplayError( this, wxString::Format( _( "An error occurred attempting to save the " - "footpirnt library table <%s>\n\n%s" ), + "footprint library table <%s>\n\n%s" ), GetChars( fn.GetFullPath() ), GetChars( ioe.errorText ) ) ); } From d17c1c57bec77756e35ce0671366ea9b6715869a Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Sun, 27 Oct 2013 14:21:53 -0400 Subject: [PATCH 411/415] Eeschema find/replace bug fixes and improvements (fixes 1208616). * Fix replace bug to handle case sensitivity properly. * Fix replace bug where the item index was getting updated incorrectly. * Fix replace infinite loop bug on replace all. * Make find/replace view update code a separate function. * Rearrange find/replace trace string to add tracing to EDA_ITEM::Replace(). * Add IsComplexHierarchy method to SCH_SHEET_LIST for future find/replace improvements. --- common/base_struct.cpp | 28 +++- common/sch_item_struct.cpp | 2 - eeschema/dialogs/dialog_schematic_find.h | 2 +- eeschema/find.cpp | 157 +++++++++++++---------- eeschema/sch_collectors.cpp | 13 +- eeschema/sch_collectors.h | 29 +++-- eeschema/sch_field.cpp | 9 +- eeschema/sch_sheet_path.cpp | 26 ++++ eeschema/sch_sheet_path.h | 10 ++ include/base_struct.h | 4 + include/sch_item_struct.h | 3 - include/wxEeschemaStruct.h | 2 + 12 files changed, 189 insertions(+), 96 deletions(-) diff --git a/common/base_struct.cpp b/common/base_struct.cpp index 4af6994e9b..06ce8c03c6 100644 --- a/common/base_struct.cpp +++ b/common/base_struct.cpp @@ -38,6 +38,10 @@ #include "../eeschema/dialogs/dialog_schematic_find.h" + +const wxString traceFindReplace( wxT( "KicadFindReplace" ) ); + + enum textbox { ID_TEXTBOX_LIST = 8010 }; @@ -190,8 +194,28 @@ bool EDA_ITEM::Replace( wxFindReplaceData& aSearchData, wxString& aText ) wxCHECK_MSG( IsReplaceable(), false, wxT( "Attempt to replace text in <" ) + GetClass() + wxT( "> item." ) ); - return aText.Replace( aSearchData.GetFindString(), - aSearchData.GetReplaceString(), false ) != 0; + wxString searchString = (aSearchData.GetFlags() & wxFR_MATCHCASE) ? aText.Upper() : aText; + + int result = searchString.Find( (aSearchData.GetFlags() & wxFR_MATCHCASE) ? + aSearchData.GetFindString() : + aSearchData.GetFindString().Upper() ); + + if( result == wxNOT_FOUND ) + return false; + + wxString prefix = aText.Left( result ); + wxString suffix; + + if( aSearchData.GetFindString().length() + result < aText.length() ) + suffix = aText.Right( aText.length() - ( aSearchData.GetFindString().length() + result ) ); + + wxLogTrace( traceFindReplace, wxT( "Replacing '%s', prefix '%s', replace '%s', suffix '%s'." ), + GetChars( aText ), GetChars( prefix ), GetChars( aSearchData.GetReplaceString() ), + GetChars( suffix ) ); + + aText = prefix + aSearchData.GetReplaceString() + suffix; + + return true; } diff --git a/common/sch_item_struct.cpp b/common/sch_item_struct.cpp index a0be20a0db..11f9058131 100644 --- a/common/sch_item_struct.cpp +++ b/common/sch_item_struct.cpp @@ -39,8 +39,6 @@ #include -const wxString traceFindReplace( wxT( "KicadFindReplace" ) ); - const wxString traceFindItem( wxT( "KicadFindItem" ) ); diff --git a/eeschema/dialogs/dialog_schematic_find.h b/eeschema/dialogs/dialog_schematic_find.h index 06b264d9a0..287d347cdc 100644 --- a/eeschema/dialogs/dialog_schematic_find.h +++ b/eeschema/dialogs/dialog_schematic_find.h @@ -48,7 +48,7 @@ */ enum SchematicFindReplaceFlags { - // The last wxFindReplaceFlag enum is wxFR_MATCHCASE. + // The last wxFindReplaceFlag enum is wxFR_MATCHCASE = 0x4. /// Search the current sheet only. FR_CURRENT_SHEET_ONLY = wxFR_MATCHCASE << 1, diff --git a/eeschema/find.cpp b/eeschema/find.cpp index e81ba6c3ff..ed52efe966 100644 --- a/eeschema/find.cpp +++ b/eeschema/find.cpp @@ -288,12 +288,11 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference, void SCH_EDIT_FRAME::OnFindSchematicItem( wxFindDialogEvent& aEvent ) { - static wxPoint itemPosition; // the actual position of the matched item. + static wxPoint itemPosition; // the actual position of the matched item. - SCH_SHEET_LIST schematic; - wxString msg; - SCH_FIND_REPLACE_DATA searchCriteria; - bool warpCursor = !( aEvent.GetFlags() & FR_NO_WARP_CURSOR ); + SCH_SHEET_LIST schematic; + wxString msg; + SCH_FIND_REPLACE_DATA searchCriteria; SCH_FIND_COLLECTOR_DATA data; searchCriteria.SetFlags( aEvent.GetFlags() ); @@ -326,6 +325,88 @@ void SCH_EDIT_FRAME::OnFindSchematicItem( wxFindDialogEvent& aEvent ) m_foundItems.UpdateIndex(); } + updateFindReplaceView( aEvent ); +} + + +void SCH_EDIT_FRAME::OnFindReplace( wxFindDialogEvent& aEvent ) +{ + SCH_ITEM* item; + SCH_SHEET_PATH* sheet; + SCH_SHEET_LIST schematic; + SCH_FIND_COLLECTOR_DATA data; + + if( aEvent.GetEventType() == wxEVT_COMMAND_FIND_REPLACE_ALL ) + { + while( ( item = (SCH_ITEM*) m_foundItems.GetItem( data ) ) != NULL ) + { + SCH_ITEM* undoItem = data.GetParent(); + + // Don't save child items in undo list. + if( undoItem == NULL ) + undoItem = item; + + SetUndoItem( undoItem ); + + sheet = schematic.GetSheet( data.GetSheetPath() ); + + wxCHECK_RET( sheet != NULL, wxT( "Could not find sheet path " ) + data.GetSheetPath() ); + + if( m_foundItems.ReplaceItem( sheet ) ) + { + OnModify(); + SaveUndoItemInUndoList( undoItem ); + updateFindReplaceView( aEvent ); + } + + m_foundItems.IncrementIndex(); + + if( m_foundItems.PassedEnd() ) + break; + } + } + else + { + SCH_ITEM* item = (SCH_ITEM*) m_foundItems.GetItem( data ); + + wxCHECK_RET( item != NULL, wxT( "Invalid replace item in find collector list." ) ); + + SCH_ITEM* undoItem = data.GetParent(); + + if( undoItem == NULL ) + undoItem = item; + + SetUndoItem( undoItem ); + + sheet = schematic.GetSheet( data.GetSheetPath() ); + + wxCHECK_RET( sheet != NULL, wxT( "Could not find sheet path " ) + data.GetSheetPath() ); + + if( m_foundItems.ReplaceItem( sheet ) ) + { + OnModify(); + SaveUndoItemInUndoList( undoItem ); + updateFindReplaceView( aEvent ); + } + + m_foundItems.IncrementIndex(); + } + + // End the replace if we are at the end if the list. This prevents an infinite loop if + // wrap search is selected and all of the items have been replaced with a value that + // still satisfies the search criteria. + if( m_foundItems.PassedEnd() ) + aEvent.SetFlags( aEvent.GetFlags() & ~FR_REPLACE_ITEM_FOUND ); +} + + +void SCH_EDIT_FRAME::updateFindReplaceView( wxFindDialogEvent& aEvent ) +{ + wxString msg; + SCH_SHEET_LIST schematic; + SCH_FIND_COLLECTOR_DATA data; + bool warpCursor = !( aEvent.GetFlags() & FR_NO_WARP_CURSOR ); + if( m_foundItems.GetItem( data ) != NULL ) { wxLogTrace( traceFindReplace, wxT( "Found " ) + m_foundItems.GetText() ); @@ -335,13 +416,15 @@ void SCH_EDIT_FRAME::OnFindSchematicItem( wxFindDialogEvent& aEvent ) wxCHECK_RET( sheet != NULL, wxT( "Could not find sheet path " ) + data.GetSheetPath() ); + SCH_ITEM* item = (SCH_ITEM*)m_foundItems.GetItem( data ); + // Make the item temporarily visible just in case it's hide flag is set. This // has no effect on objects that don't support hiding. If this is a close find // dialog event, clear the temporary visibility flag. if( aEvent.GetEventType() == wxEVT_COMMAND_FIND_CLOSE ) - m_foundItems.GetItem( data )->SetForceVisible( false ); - else - m_foundItems.GetItem( data )->SetForceVisible( true ); + item->SetForceVisible( false ); + else if( item->Type() == SCH_FIELD_T && !( (SCH_FIELD*) item )->IsVisible() ) + item->SetForceVisible( true ); if( sheet->PathHumanReadable() != m_CurrentSheet->PathHumanReadable() ) { @@ -371,61 +454,3 @@ void SCH_EDIT_FRAME::OnFindSchematicItem( wxFindDialogEvent& aEvent ) SetStatusText( msg ); } - - -void SCH_EDIT_FRAME::OnFindReplace( wxFindDialogEvent& aEvent ) -{ - SCH_FIND_COLLECTOR_DATA data; - - bool warpCursor = !( aEvent.GetFlags() & FR_NO_WARP_CURSOR ); - SCH_ITEM* item = (SCH_ITEM*) m_foundItems.GetItem( data ); - - wxCHECK_RET( item != NULL, wxT( "Invalid replace item in find collector list." ) ); - - wxLogTrace( traceFindReplace, wxT( "Replacing %s with %s in item %s" ), - GetChars( aEvent.GetFindString() ), GetChars( aEvent.GetReplaceString() ), - GetChars( m_foundItems.GetText() ) ); - - SCH_ITEM* undoItem = data.GetParent(); - - if( undoItem == NULL ) - undoItem = item; - - SetUndoItem( undoItem ); - - if( m_foundItems.ReplaceItem() ) - { - OnModify(); - SaveUndoItemInUndoList( undoItem ); - RedrawScreen( data.GetPosition(), warpCursor ); - } - - OnFindSchematicItem( aEvent ); - - if( aEvent.GetEventType() == wxEVT_COMMAND_FIND_REPLACE_ALL ) - { - while( ( item = (SCH_ITEM*) m_foundItems.GetItem( data ) ) != NULL ) - { - wxLogTrace( traceFindReplace, wxT( "Replacing %s with %s in item %s" ), - GetChars( aEvent.GetFindString() ), GetChars( aEvent.GetReplaceString() ), - GetChars( m_foundItems.GetText() ) ); - - SCH_ITEM* undoItem = data.GetParent(); - - // Don't save child items in undo list. - if( undoItem == NULL ) - undoItem = item; - - SetUndoItem( undoItem ); - - if( m_foundItems.ReplaceItem() ) - { - OnModify(); - SaveUndoItemInUndoList( undoItem ); - RedrawScreen( data.GetPosition(), warpCursor ); - } - - OnFindSchematicItem( aEvent ); - } - } -} diff --git a/eeschema/sch_collectors.cpp b/eeschema/sch_collectors.cpp index 6313b1dd52..6f8562091e 100644 --- a/eeschema/sch_collectors.cpp +++ b/eeschema/sch_collectors.cpp @@ -347,7 +347,7 @@ bool SCH_FIND_COLLECTOR::PassedEnd() const if( GetCount() == 0 ) return true; - if( !(flags & FR_SEARCH_WRAP) ) + if( !(flags & FR_SEARCH_WRAP) || (flags & FR_SEARCH_REPLACE) ) { if( flags & wxFR_DOWN ) { @@ -454,7 +454,7 @@ EDA_ITEM* SCH_FIND_COLLECTOR::GetItem( SCH_FIND_COLLECTOR_DATA& aData ) } -bool SCH_FIND_COLLECTOR::ReplaceItem() +bool SCH_FIND_COLLECTOR::ReplaceItem( SCH_SHEET_PATH* aSheetPath ) { if( PassedEnd() ) return false; @@ -464,15 +464,10 @@ bool SCH_FIND_COLLECTOR::ReplaceItem() EDA_ITEM* item = m_List[ m_foundIndex ]; - bool replaced = item->Replace( m_findReplaceData ); + bool replaced = item->Replace( m_findReplaceData, aSheetPath ); - // If the replace was successful, remove the item from the find list to prevent - // iterating back over it again. if( replaced ) - { - Remove( m_foundIndex ); - m_data.erase( m_data.begin() + m_foundIndex ); - } + m_forceSearch = true; return replaced; } diff --git a/eeschema/sch_collectors.h b/eeschema/sch_collectors.h index d8851e0d89..299ea9ec62 100644 --- a/eeschema/sch_collectors.h +++ b/eeschema/sch_collectors.h @@ -237,15 +237,6 @@ class SCH_FIND_COLLECTOR : public COLLECTOR /// performed even if the search criteria hasn't changed. bool m_forceSearch; - /** - * Function PassedEnd - * tests if #m_foundIndex is beyond the end of the list give the current - * find/replace criterial in #m_findReplaceData. - * - * @return True if #m_foundIndex has crossed the end of the found item list. - */ - bool PassedEnd() const; - /** * Function dump * is a helper to dump the items in the find list for debugging purposes. @@ -266,8 +257,24 @@ public: m_forceSearch = false; } + void Empty() + { + m_foundIndex = 0; + COLLECTOR::Empty(); + m_data.clear(); + } + void SetForceSearch() { m_forceSearch = true; } + /** + * Function PassedEnd + * tests if #m_foundIndex is beyond the end of the list give the current + * find/replace criterial in #m_findReplaceData. + * + * @return True if #m_foundIndex has crossed the end of the found item list. + */ + bool PassedEnd() const; + /** * Function UpdateIndex * updates the list index according to the current find and replace criteria. @@ -326,7 +333,7 @@ public: * * @return True if the text replace occurred otherwise false. */ - bool ReplaceItem(); + bool ReplaceItem( SCH_SHEET_PATH* aSheetPath = NULL ); SEARCH_RESULT Inspect( EDA_ITEM* aItem, const void* aTestData = NULL ); @@ -340,6 +347,8 @@ public: * value searches the entire schematic hierarchy. */ void Collect( SCH_FIND_REPLACE_DATA& aFindReplaceData, SCH_SHEET_PATH* aSheetPath = NULL ); + + void IncrementIndex() { m_foundIndex += 1; } }; diff --git a/eeschema/sch_field.cpp b/eeschema/sch_field.cpp index 9ed6e461d1..67256b5653 100644 --- a/eeschema/sch_field.cpp +++ b/eeschema/sch_field.cpp @@ -431,8 +431,11 @@ bool SCH_FIELD::Replace( wxFindReplaceData& aSearchData, void* aAuxData ) bool isReplaced; wxString text = GetFullyQualifiedText(); - if( m_id == REFERENCE && aAuxData != NULL ) + if( m_id == REFERENCE ) { + wxCHECK_MSG( aAuxData != NULL, false, + wxT( "Cannot replace reference designator without valid sheet path." ) ); + wxCHECK_MSG( aSearchData.GetFlags() & FR_REPLACE_REFERENCES, false, wxT( "Invalid replace component reference field call." ) ) ; @@ -443,8 +446,8 @@ bool SCH_FIELD::Replace( wxFindReplaceData& aSearchData, void* aAuxData ) text = component->GetRef( (SCH_SHEET_PATH*) aAuxData ); - if( component->GetPartCount() > 1 ) - text << LIB_COMPONENT::ReturnSubReference( component->GetUnit() ); + // if( component->GetPartCount() > 1 ) + // text << LIB_COMPONENT::ReturnSubReference( component->GetUnit() ); isReplaced = EDA_ITEM::Replace( aSearchData, text ); diff --git a/eeschema/sch_sheet_path.cpp b/eeschema/sch_sheet_path.cpp index 71f777dc22..23ef5272c3 100644 --- a/eeschema/sch_sheet_path.cpp +++ b/eeschema/sch_sheet_path.cpp @@ -438,6 +438,7 @@ SCH_SHEET_LIST::SCH_SHEET_LIST( SCH_SHEET* aSheet ) m_index = 0; m_count = 0; m_List = NULL; + m_isRootSheet = false; if( aSheet == NULL ) aSheet = g_RootSheet; @@ -518,6 +519,9 @@ SCH_SHEET_PATH* SCH_SHEET_LIST::GetSheet( const wxString aPath, bool aHumanReada void SCH_SHEET_LIST::BuildSheetList( SCH_SHEET* aSheet ) { + if( aSheet == g_RootSheet ) + m_isRootSheet = true; + if( m_List == NULL ) { int count = aSheet->CountSheets(); @@ -702,3 +706,25 @@ bool SCH_SHEET_LIST::SetComponentFootprint( const wxString& aReference, return found; } + + +bool SCH_SHEET_LIST::IsComplexHierarchy() +{ + wxString fileName; + + for( int i = 0; i < GetCount(); i++ ) + { + fileName = GetSheet( i )->Last()->GetFileName(); + + for( int j = 0; j < GetCount(); j++ ) + { + if( i == j ) + continue; + + if( fileName == GetSheet( j )->Last()->GetFileName() ) + return true; + } + } + + return false; +} diff --git a/eeschema/sch_sheet_path.h b/eeschema/sch_sheet_path.h index 4ab4237064..dcfe9b690a 100644 --- a/eeschema/sch_sheet_path.h +++ b/eeschema/sch_sheet_path.h @@ -292,6 +292,7 @@ private: * returning the next item in m_List. Also used for * internal calculations in BuildSheetList() */ + bool m_isRootSheet; SCH_SHEET_PATH m_currList; public: @@ -442,6 +443,15 @@ public: bool SetComponentFootprint( const wxString& aReference, const wxString& aFootPrint, bool aSetVisible ); + /** + * Function IsComplexHierarchy + * searches all of the sheets for duplicate files names which indicates a complex + * hierarchy. + * + * @return true if the #SCH_SHEET_LIST is a complex hierarchy. + */ + bool IsComplexHierarchy(); + private: /** diff --git a/include/base_struct.h b/include/base_struct.h index 2fce8196a3..eb743d07fe 100644 --- a/include/base_struct.h +++ b/include/base_struct.h @@ -46,6 +46,10 @@ extern std::ostream& operator <<( std::ostream& out, const wxPoint& pt ); #endif +/// Flag to enable find and replace tracing using the WXTRACE environment variable. +extern const wxString traceFindReplace; + + /** * Enum KICAD_T * is the set of class identification values, stored in EDA_ITEM::m_StructType diff --git a/include/sch_item_struct.h b/include/sch_item_struct.h index 6d4d690235..788ef66160 100644 --- a/include/sch_item_struct.h +++ b/include/sch_item_struct.h @@ -56,9 +56,6 @@ typedef vector< SCH_ITEMS_ITR > SCH_ITEMS_ITRS; #define FMT_ANGLE SCH_ITEM::FormatAngle -/// Flag to enable find and replace tracing using the WXTRACE environment variable. -extern const wxString traceFindReplace; - /// Flag to enable find item tracing using the WXTRACE environment variable. This /// flag generates a lot of debug output. extern const wxString traceFindItem; diff --git a/include/wxEeschemaStruct.h b/include/wxEeschemaStruct.h index 8615aae6c4..4b4ca81566 100644 --- a/include/wxEeschemaStruct.h +++ b/include/wxEeschemaStruct.h @@ -194,6 +194,8 @@ protected: */ void addCurrentItemToList( wxDC* aDC ); + void updateFindReplaceView( wxFindDialogEvent& aEvent ); + public: SCH_EDIT_FRAME( wxWindow* aParent, const wxString& aTitle, const wxPoint& aPosition, const wxSize& aSize, From b97769bf5c1d76a90b192ecb1af8f5c5e4c2e1a0 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 28 Oct 2013 09:06:38 +0100 Subject: [PATCH 412/415] dxf import: minor enhancements in dialog. Update libdfxw from git, and uncrustify it. add a test dfx file --- lib_dxf/drw_base.h | 4 +- lib_dxf/drw_entities.h | 74 +- lib_dxf/drw_objects.cpp | 36 +- lib_dxf/drw_objects.h | 28 +- lib_dxf/intern/drw_textcodec.cpp | 844 +- lib_dxf/intern/drw_textcodec.h | 106 +- lib_dxf/intern/dxfreader.cpp | 346 +- lib_dxf/intern/dxfreader.h | 115 +- lib_dxf/intern/dxfwriter.cpp | 446 +- lib_dxf/intern/dxfwriter.h | 75 +- lib_dxf/libdxfrw.cpp | 50 +- lib_dxf/libdxfrw.h | 2 +- pcbnew/import_dxf/dialog_dxf_import.cpp | 35 +- pcbnew/import_dxf/examples/test_outlines.dxf | 7264 ++++++++++++++++++ 14 files changed, 8541 insertions(+), 884 deletions(-) create mode 100644 pcbnew/import_dxf/examples/test_outlines.dxf diff --git a/lib_dxf/drw_base.h b/lib_dxf/drw_base.h index 0be3367524..eb640516c9 100644 --- a/lib_dxf/drw_base.h +++ b/lib_dxf/drw_base.h @@ -18,8 +18,6 @@ #include #include -using std::string; - #define UTF8STRING std::string #define DRW_UNUSED( x ) (void) x @@ -203,7 +201,7 @@ public: // string codepage; private: // DRW_VarContent content; - string data; + std::string data; }; diff --git a/lib_dxf/drw_entities.h b/lib_dxf/drw_entities.h index 7aaf18e7e7..911937c921 100644 --- a/lib_dxf/drw_entities.h +++ b/lib_dxf/drw_entities.h @@ -21,8 +21,6 @@ class dxfReader; class DRW_Polyline; -using std::string; - namespace DRW { // ! Entity's type. enum ETYPE { @@ -123,7 +121,7 @@ public: double ltypeScale; /*!< linetype scale, code 48 */ bool visible; /*!< entity visibility, code 60 */ int color24; /*!< 24-bit color, code 420 */ - string colorName; /*!< color name, code 430 */ + std::string colorName; /*!< color name, code 430 */ int space; /*!< space indicator 0 = model, 1 paper, code 67*/ bool haveExtrusion; /*!< set to true if the entity have extrusion*/ private: @@ -891,17 +889,17 @@ public: void parseCode( int code, dxfReader* reader ); public: - string ref; /*!< Hard reference to imagedef object, code 340 */ - double vx; /*!< V-vector of single pixel, x coordinate, code 12 */ - double vy; /*!< V-vector of single pixel, y coordinate, code 22 */ - double vz; /*!< V-vector of single pixel, z coordinate, code 32 */ - double sizeu; /*!< image size in pixels, U value, code 13 */ - double sizev; /*!< image size in pixels, V value, code 23 */ - double dz; /*!< z coordinate, code 33 */ - int clip; /*!< Clipping state, code 280, 0=off 1=on */ - int brightness; /*!< Brightness value, code 281, (0-100) default 50 */ - int contrast; /*!< Brightness value, code 282, (0-100) default 50 */ - int fade; /*!< Brightness value, code 283, (0-100) default 0 */ + std::string ref; /*!< Hard reference to imagedef object, code 340 */ + double vx; /*!< V-vector of single pixel, x coordinate, code 12 */ + double vy; /*!< V-vector of single pixel, y coordinate, code 22 */ + double vz; /*!< V-vector of single pixel, z coordinate, code 32 */ + double sizeu; /*!< image size in pixels, U value, code 13 */ + double sizev; /*!< image size in pixels, V value, code 23 */ + double dz; /*!< z coordinate, code 33 */ + int clip; /*!< Clipping state, code 280, 0=off 1=on */ + int brightness; /*!< Brightness value, code 281, (0-100) default 50 */ + int contrast; /*!< Brightness value, code 282, (0-100) default 50 */ + int fade; /*!< Brightness value, code 283, (0-100) default 0 */ }; @@ -960,14 +958,14 @@ public: void setDefPoint( const DRW_Coord p ) { defPoint = p; } DRW_Coord getTextPoint() const { return textPoint; } /*!< Middle point of text, code 11, 21 & 31 */ void setTextPoint( const DRW_Coord p ) { textPoint = p; } - string getStyle() const { return style; } /*!< Dimension style, code 3 */ - void setStyle( const string s ) { style = s; } + std::string getStyle() const { return style; } /*!< Dimension style, code 3 */ + void setStyle( const std::string s ) { style = s; } int getAlign() const { return align; } /*!< attachment point, code 71 */ void setAlign( const int a ) { align = a; } int getTextLineStyle() const { return linesty; } /*!< Dimension text line spacing style, code 72, default 1 */ void setTextLineStyle( const int l ) { linesty = l; } - string getText() const { return text; } /*!< Dimension text explicitly entered by the user, code 1 */ - void setText( const string t ) { text = t; } + std::string getText() const { return text; } /*!< Dimension text explicitly entered by the user, code 1 */ + void setText( const std::string t ) { text = t; } double getTextLineFactor() const { return linefactor; } /*!< Dimension text line spacing factor, code 41, default 1? */ void setTextLineFactor( const double l ) { linefactor = l; } double getDir() const { return rot; } /*!< rotation angle of the dimension text, code 53 (optional) default 0 */ @@ -975,8 +973,8 @@ public: DRW_Coord getExtrusion() { return extPoint; } /*!< extrusion, code 210, 220 & 230 */ void setExtrusion( const DRW_Coord p ) { extPoint = p; } - string getName() { return name; } /*!< Name of the block that contains the entities, code 2 */ - void setName( const string s ) { name = s; } + std::string getName() { return name; } /*!< Name of the block that contains the entities, code 2 */ + void setName( const std::string s ) { name = s; } // int getType(){ return type;} /*!< Dimension type, code 70 */ protected: DRW_Coord getPt2() const { return clonePoint; } @@ -998,7 +996,7 @@ protected: public: int type; /*!< Dimension type, code 70 */ private: - string name; /*!< Name of the block that contains the entities, code 2 */ + std::string name; /*!< Name of the block that contains the entities, code 2 */ DRW_Coord defPoint; /*!< definition point, code 10, 20 & 30 (WCS) */ DRW_Coord textPoint; /*!< Middle point of text, code 11, 21 & 31 (OCS) */ UTF8STRING text; /*!< Dimension text explicitly entered by the user, code 1 */ @@ -1243,25 +1241,25 @@ public: void parseCode( int code, dxfReader* reader ); public: - UTF8STRING style; /*!< Dimension style name, code 3 */ - int arrow; /*!< Arrowhead flag, code 71, 0=Disabled; 1=Enabled */ - int leadertype; /*!< Leader path type, code 72, 0=Straight line segments; 1=Spline */ - int flag; /*!< Leader creation flag, code 73, default 3 */ - int hookline; /*!< Hook line direction flag, code 74, default 1 */ - int hookflag; /*!< Hook line flag, code 75 */ - double textheight; /*!< Text annotation height, code 40 */ - double textwidth; /*!< Text annotation width, code 41 */ - int vertnum; /*!< Number of vertices, code 76 */ - int coloruse; /*!< Color to use if leader's DIMCLRD = BYBLOCK, code 77 */ - string handle; /*!< Hard reference to associated annotation, code 340 */ - DRW_Coord extrusionPoint; /*!< Normal vector, code 210, 220 & 230 */ - DRW_Coord horizdir; /*!< "Horizontal" direction for leader, code 211, 221 & 231 */ - DRW_Coord offsetblock; /*!< Offset of last leader vertex from block, code 212, 222 & 232 */ - DRW_Coord offsettext; /*!< Offset of last leader vertex from annotation, code 213, 223 & 233 */ + UTF8STRING style; /*!< Dimension style name, code 3 */ + int arrow; /*!< Arrowhead flag, code 71, 0=Disabled; 1=Enabled */ + int leadertype; /*!< Leader path type, code 72, 0=Straight line segments; 1=Spline */ + int flag; /*!< Leader creation flag, code 73, default 3 */ + int hookline; /*!< Hook line direction flag, code 74, default 1 */ + int hookflag; /*!< Hook line flag, code 75 */ + double textheight; /*!< Text annotation height, code 40 */ + double textwidth; /*!< Text annotation width, code 41 */ + int vertnum; /*!< Number of vertices, code 76 */ + int coloruse; /*!< Color to use if leader's DIMCLRD = BYBLOCK, code 77 */ + std::string handle; /*!< Hard reference to associated annotation, code 340 */ + DRW_Coord extrusionPoint; /*!< Normal vector, code 210, 220 & 230 */ + DRW_Coord horizdir; /*!< "Horizontal" direction for leader, code 211, 221 & 231 */ + DRW_Coord offsetblock; /*!< Offset of last leader vertex from block, code 212, 222 & 232 */ + DRW_Coord offsettext; /*!< Offset of last leader vertex from annotation, code 213, 223 & 233 */ - std::vector vertexlist; /*!< vertex points list, code 10, 20 & 30 */ + std::vector vertexlist; /*!< vertex points list, code 10, 20 & 30 */ private: - DRW_Coord* vertexpoint; /*!< current control point to add data */ + DRW_Coord* vertexpoint; /*!< current control point to add data */ }; // ! Class to handle viewport entity diff --git a/lib_dxf/drw_objects.cpp b/lib_dxf/drw_objects.cpp index 03f644c686..9cccb01731 100644 --- a/lib_dxf/drw_objects.cpp +++ b/lib_dxf/drw_objects.cpp @@ -679,7 +679,7 @@ void DRW_ImageDef::parseCode( int code, dxfReader* reader ) } -void DRW_Header::addComment( string c ) +void DRW_Header::addComment( std::string c ) { if( !comments.empty() ) comments += '\n'; @@ -858,6 +858,9 @@ void DRW_Header::write( dxfWriter* writer, DRW::Version ver ) writer->writeString( 1, varStr ); writer->setVersion( &varStr ); + getStr( "$ACADVER", &varStr ); + getStr( "$ACADMAINTVER", &varStr ); + if( ver > DRW::AC1012 ) { writer->writeString( 9, "$HANDSEED" ); @@ -970,6 +973,18 @@ void DRW_Header::write( dxfWriter* writer, DRW::Version ver ) else writer->writeString( 7, "STANDARD" ); + writer->writeString( 9, "$CLAYER" ); + + if( getStr( "$CLAYER", &varStr ) ) + if( ver == DRW::AC1009 ) + writer->writeUtf8Caps( 8, varStr ); + else + writer->writeUtf8String( 8, varStr ); + + + else + writer->writeString( 8, "0" ); + writer->writeString( 9, "$DIMASZ" ); if( getDouble( "$DIMASZ", &varDouble ) ) @@ -977,6 +992,13 @@ void DRW_Header::write( dxfWriter* writer, DRW::Version ver ) else writer->writeDouble( 40, 2.5 ); + writer->writeString( 9, "$DIMLFAC" ); + + if( getDouble( "$DIMLFAC", &varDouble ) ) + writer->writeDouble( 40, varDouble ); + else + writer->writeDouble( 40, 1.0 ); + writer->writeString( 9, "$DIMSCALE" ); if( getDouble( "$DIMSCALE", &varDouble ) ) @@ -1210,16 +1232,20 @@ void DRW_Header::write( dxfWriter* writer, DRW::Version ver ) writer->writeDouble( 40, 0.0 ); } +#ifdef DRW_DBG std::map::const_iterator it; for( it = vars.begin(); it != vars.end(); it++ ) { +// QString key = QString::fromStdString((*it).first); std::cerr << (*it).first << std::endl; } + +#endif } -bool DRW_Header::getDouble( string key, double* varDouble ) +bool DRW_Header::getDouble( std::string key, double* varDouble ) { bool result = false; std::map::iterator it; @@ -1243,7 +1269,7 @@ bool DRW_Header::getDouble( string key, double* varDouble ) } -bool DRW_Header::getInt( string key, int* varInt ) +bool DRW_Header::getInt( std::string key, int* varInt ) { bool result = false; std::map::iterator it; @@ -1267,7 +1293,7 @@ bool DRW_Header::getInt( string key, int* varInt ) } -bool DRW_Header::getStr( string key, std::string* varStr ) +bool DRW_Header::getStr( std::string key, std::string* varStr ) { bool result = false; std::map::iterator it; @@ -1291,7 +1317,7 @@ bool DRW_Header::getStr( string key, std::string* varStr ) } -bool DRW_Header::getCoord( string key, DRW_Coord* varCoord ) +bool DRW_Header::getCoord( std::string key, DRW_Coord* varCoord ) { bool result = false; std::map::iterator it; diff --git a/lib_dxf/drw_objects.h b/lib_dxf/drw_objects.h index 502a507245..dbdb21435f 100644 --- a/lib_dxf/drw_objects.h +++ b/lib_dxf/drw_objects.h @@ -22,8 +22,6 @@ class dxfReader; class dxfWriter; -using std::string; - namespace DRW { // ! Table entries type. enum TTYPE { @@ -241,8 +239,8 @@ public: int color24; /*!< 24-bit color, code 420 */ bool plotF; /*!< Plot flag, code 290 */ enum DRW_LW_Conv::lineWidth lWeight; /*!< layer lineweight, code 370 */ - string handlePlotS; /*!< Hard-pointer ID/handle of plotstyle, code 390 */ - string handlePlotM; /*!< Hard-pointer ID/handle of materialstyle, code 347 */ + std::string handlePlotS; /*!< Hard-pointer ID/handle of plotstyle, code 390 */ + std::string handlePlotM; /*!< Hard-pointer ID/handle of materialstyle, code 347 */ }; // ! Class to handle text style entries @@ -359,7 +357,7 @@ public: void parseCode( int code, dxfReader* reader ); public: - string handle; /*!< entity identifier, code 5 */ + std::string handle; /*!< entity identifier, code 5 */ UTF8STRING name; /*!< File name of image, code 1 */ int version; /*!< class version, code 90, 0=R14 version */ double u; /*!< image size in pixels U value, code 10 */ @@ -369,7 +367,7 @@ public: int loaded; /*!< image is loaded flag, code 280, 0=unloaded, 1=loaded */ int resolution; /*!< resolution units, code 281, 0=no, 2=centimeters, 5=inch */ - std::map reactors; + std::map reactors; }; @@ -392,20 +390,20 @@ public: void parseCode( int code, dxfReader* reader ); void write( dxfWriter* writer, DRW::Version ver ); - void addComment( string c ); + void addComment( std::string c ); - string getComments() const { return comments; } + std::string getComments() const { return comments; } private: - bool getDouble( string key, double* varDouble ); - bool getInt( string key, int* varInt ); - bool getStr( string key, string* varStr ); - bool getCoord( string key, DRW_Coord* varStr ); + bool getDouble( std::string key, double* varDouble ); + bool getInt( std::string key, int* varInt ); + bool getStr( std::string key, std::string* varStr ); + bool getCoord( std::string key, DRW_Coord* varStr ); public: - std::map vars; + std::map vars; private: - string comments; - string name; + std::string comments; + std::string name; DRW_Variant* curr; int version; // to use on read }; diff --git a/lib_dxf/intern/drw_textcodec.cpp b/lib_dxf/intern/drw_textcodec.cpp index 6a2c475e26..70bdced9dd 100644 --- a/lib_dxf/intern/drw_textcodec.cpp +++ b/lib_dxf/intern/drw_textcodec.cpp @@ -9,488 +9,684 @@ #include "drw_cptable949.h" #include "drw_cptable950.h" -DRW_TextCodec::DRW_TextCodec() { +DRW_TextCodec::DRW_TextCodec() +{ version = DRW::AC1021; - conv = new DRW_Converter(NULL, 0); + conv = new DRW_Converter( NULL, 0 ); } -DRW_TextCodec::~DRW_TextCodec() { + +DRW_TextCodec::~DRW_TextCodec() +{ delete conv; } -void DRW_TextCodec::setVersion(std::string *v){ + +void DRW_TextCodec::setVersion( std::string* v ) +{ std::string versionStr = *v; - if (versionStr == "AC1009" || versionStr == "AC1006") { + + if( versionStr == "AC1009" || versionStr == "AC1006" ) + { version = DRW::AC1009; cp = "ANSI_1252"; - setCodePage(&cp); - } else if (versionStr == "AC1012" || versionStr == "AC1014" - || versionStr == "AC1015" || versionStr == "AC1018") { + setCodePage( &cp ); + } + else if( versionStr == "AC1012" || versionStr == "AC1014" + || versionStr == "AC1015" || versionStr == "AC1018" ) + { version = DRW::AC1015; - if (cp.empty()) { //codepage not set, initialize + + if( cp.empty() ) // codepage not set, initialize + { cp = "ANSI_1252"; - setCodePage(&cp); + setCodePage( &cp ); } - } else { + } + else + { version = DRW::AC1021; cp = "ANSI_1252"; } } -void DRW_TextCodec::setCodePage(std::string *c){ - cp = correctCodePage(*c); + +void DRW_TextCodec::setCodePage( std::string* c ) +{ + cp = correctCodePage( *c ); delete conv; - if (version == DRW::AC1009 || version == DRW::AC1015) { - if (cp == "ANSI_874") - conv = new DRW_ConvTable(DRW_Table874, CPLENGHTCOMMON); - else if (cp == "ANSI_932") - conv = new DRW_Conv932Table(DRW_Table932, DRW_LeadTable932, - DRW_DoubleTable932, CPLENGHT932); - else if (cp == "ANSI_936") - conv = new DRW_ConvDBCSTable(DRW_Table936, DRW_LeadTable936, - DRW_DoubleTable936, CPLENGHT936); - else if (cp == "ANSI_949") - conv = new DRW_ConvDBCSTable(DRW_Table949, DRW_LeadTable949, - DRW_DoubleTable949, CPLENGHT949); - else if (cp == "ANSI_950") - conv = new DRW_ConvDBCSTable(DRW_Table950, DRW_LeadTable950, - DRW_DoubleTable950, CPLENGHT950); - else if (cp == "ANSI_1250") - conv = new DRW_ConvTable(DRW_Table1250, CPLENGHTCOMMON); - else if (cp == "ANSI_1251") - conv = new DRW_ConvTable(DRW_Table1251, CPLENGHTCOMMON); - else if (cp == "ANSI_1253") - conv = new DRW_ConvTable(DRW_Table1253, CPLENGHTCOMMON); - else if (cp == "ANSI_1254") - conv = new DRW_ConvTable(DRW_Table1254, CPLENGHTCOMMON); - else if (cp == "ANSI_1255") - conv = new DRW_ConvTable(DRW_Table1255, CPLENGHTCOMMON); - else if (cp == "ANSI_1256") - conv = new DRW_ConvTable(DRW_Table1256, CPLENGHTCOMMON); - else if (cp == "ANSI_1257") - conv = new DRW_ConvTable(DRW_Table1257, CPLENGHTCOMMON); - else if (cp == "ANSI_1258") - conv = new DRW_ConvTable(DRW_Table1258, CPLENGHTCOMMON); - else if (cp == "UTF-8") { //DXF older than 2007 are write in win codepages + + if( version == DRW::AC1009 || version == DRW::AC1015 ) + { + if( cp == "ANSI_874" ) + conv = new DRW_ConvTable( DRW_Table874, CPLENGHTCOMMON ); + else if( cp == "ANSI_932" ) + conv = new DRW_Conv932Table( DRW_Table932, DRW_LeadTable932, + DRW_DoubleTable932, CPLENGHT932 ); + else if( cp == "ANSI_936" ) + conv = new DRW_ConvDBCSTable( DRW_Table936, DRW_LeadTable936, + DRW_DoubleTable936, CPLENGHT936 ); + else if( cp == "ANSI_949" ) + conv = new DRW_ConvDBCSTable( DRW_Table949, DRW_LeadTable949, + DRW_DoubleTable949, CPLENGHT949 ); + else if( cp == "ANSI_950" ) + conv = new DRW_ConvDBCSTable( DRW_Table950, DRW_LeadTable950, + DRW_DoubleTable950, CPLENGHT950 ); + else if( cp == "ANSI_1250" ) + conv = new DRW_ConvTable( DRW_Table1250, CPLENGHTCOMMON ); + else if( cp == "ANSI_1251" ) + conv = new DRW_ConvTable( DRW_Table1251, CPLENGHTCOMMON ); + else if( cp == "ANSI_1253" ) + conv = new DRW_ConvTable( DRW_Table1253, CPLENGHTCOMMON ); + else if( cp == "ANSI_1254" ) + conv = new DRW_ConvTable( DRW_Table1254, CPLENGHTCOMMON ); + else if( cp == "ANSI_1255" ) + conv = new DRW_ConvTable( DRW_Table1255, CPLENGHTCOMMON ); + else if( cp == "ANSI_1256" ) + conv = new DRW_ConvTable( DRW_Table1256, CPLENGHTCOMMON ); + else if( cp == "ANSI_1257" ) + conv = new DRW_ConvTable( DRW_Table1257, CPLENGHTCOMMON ); + else if( cp == "ANSI_1258" ) + conv = new DRW_ConvTable( DRW_Table1258, CPLENGHTCOMMON ); + else if( cp == "UTF-8" ) // DXF older than 2007 are write in win codepages + { cp = "ANSI_1252"; - conv = new DRW_Converter(NULL, 0); - } else - conv = new DRW_ConvTable(DRW_Table1252, CPLENGHTCOMMON); - } else { - conv = new DRW_Converter(NULL, 0); + conv = new DRW_Converter( NULL, 0 ); + } + else + conv = new DRW_ConvTable( DRW_Table1252, CPLENGHTCOMMON ); + } + else + { + conv = new DRW_Converter( NULL, 0 ); } } -std::string DRW_TextCodec::toUtf8(std::string s) { - return conv->toUtf8(&s); + +std::string DRW_TextCodec::toUtf8( std::string s ) +{ + return conv->toUtf8( &s ); } -std::string DRW_TextCodec::fromUtf8(std::string s) { - return conv->fromUtf8(&s); + +std::string DRW_TextCodec::fromUtf8( std::string s ) +{ + return conv->fromUtf8( &s ); } -std::string DRW_Converter::toUtf8(std::string *s) { - std::string result; - int j = 0; - unsigned int i= 0; - for (i=0; i < s->length(); i++) { - unsigned char c = s->at(i); - if (c < 0x80) { //ascii check for /U+???? - if (c == '\\' && i+6 < s->length() && s->at(i+1) == 'U' && s->at(i+2) == '+') { - result += s->substr(j,i-j); - result += encodeText(s->substr(i,7)); - i +=6; - j = i+1; + +std::string DRW_Converter::toUtf8( std::string* s ) +{ + std::string result; + int j = 0; + unsigned int i = 0; + + for( i = 0; i < s->length(); i++ ) + { + unsigned char c = s->at( i ); + + if( c < 0x80 ) // ascii check for /U+???? + { + if( c == '\\' && i + 6 < s->length() && s->at( i + 1 ) == 'U' && s->at( i + 2 ) == + '+' ) + { + result += s->substr( j, i - j ); + result += encodeText( s->substr( i, 7 ) ); + i += 6; + j = i + 1; } - } else if (c < 0xE0 ) {//2 bits + } + else if( c < 0xE0 ) // 2 bits + { i++; - } else if (c < 0xF0 ) {//3 bits - i +=2; - } else if (c < 0xF8 ) {//4 bits - i +=3; + } + else if( c < 0xF0 ) // 3 bits + { + i += 2; + } + else if( c < 0xF8 ) // 4 bits + { + i += 3; } } - result += s->substr(j); + + result += s->substr( j ); return result; } -std::string DRW_ConvTable::fromUtf8(std::string *s) { - std::string result; - bool notFound; - int code; - int j = 0; - for (unsigned int i=0; i < s->length(); i++) { - unsigned char c = s->at(i); - if (c > 0x7F) { //need to decode - result += s->substr(j,i-j); - std::string part1 = s->substr(i,4); - int l; - code = decodeNum(part1, &l); - j = i+l; +std::string DRW_ConvTable::fromUtf8( std::string* s ) +{ + std::string result; + bool notFound; + int code; + + int j = 0; + + for( unsigned int i = 0; i < s->length(); i++ ) + { + unsigned char c = s->at( i ); + + if( c > 0x7F ) // need to decode + { + result += s->substr( j, i - j ); + std::string part1 = s->substr( i, 4 ); + int l; + code = decodeNum( part1, &l ); + j = i + l; i = j - 1; notFound = true; - for (int k=0; ksubstr(j); + + result += s->substr( j ); return result; } -std::string DRW_ConvTable::toUtf8(std::string *s) { - std::string res; - string::iterator it; - for ( it=s->begin() ; it < s->end(); it++ ) { + +std::string DRW_ConvTable::toUtf8( std::string* s ) +{ + std::string res; + std::string::iterator it; + + for( it = s->begin(); it < s->end(); it++ ) + { unsigned char c = *it; - if (c < 0x80) { - //check for \U+ encoded text - if (c == '\\') { - if (it+6 < s->end() && *(it+1) == 'U' && *(it+2) == '+') { - res += encodeText(std::string(it, it+7)); - it +=6; - } else { - res +=c; //no \U+ encoded text write + + if( c < 0x80 ) + { + // check for \U+ encoded text + if( c == '\\' ) + { + if( it + 6 < s->end() && *(it + 1) == 'U' && *(it + 2) == '+' ) + { + res += encodeText( std::string( it, it + 7 ) ); + it += 6; } - } else - res +=c; //c!='\' ascii char write - } else {//end c < 0x80 - res += encodeNum(table[c-0x80]); //translate from table + else + { + res += c; // no \U+ encoded text write + } + } + else + res += c; // c!='\' ascii char write } - } //end for + else // end c < 0x80 + { + res += encodeNum( table[c - 0x80] ); // translate from table + } + } // end for return res; } -std::string DRW_Converter::encodeText(std::string stmp){ + +std::string DRW_Converter::encodeText( std::string stmp ) +{ int code; + #if defined(__APPLE__) - int Succeeded = sscanf (&( stmp.substr(3,4)[0]), "%x", &code ); - if ( !Succeeded || Succeeded == EOF ) + int Succeeded = sscanf( &( stmp.substr( 3, 4 )[0]), "%x", &code ); + + if( !Succeeded || Succeeded == EOF ) code = 0; + #else - std::istringstream sd(stmp.substr(3,4)); + std::istringstream sd( stmp.substr( 3, 4 ) ); sd >> std::hex >> code; #endif - return encodeNum(code); + return encodeNum( code ); } -std::string DRW_Converter::decodeText(int c){ + +std::string DRW_Converter::decodeText( int c ) +{ std::string res = "\\U+"; std::string num; + #if defined(__APPLE__) - std::string str(16, '\0'); - snprintf (&(str[0]), 16, "%04X", c ); + std::string str( 16, '\0' ); + snprintf( &(str[0]), 16, "%04X", c ); num = str; #else std::stringstream ss; - ss << std::uppercase << std::setfill('0') << std::setw(4) << std::hex << c; + ss << std::uppercase << std::setfill( '0' ) << std::setw( 4 ) << std::hex << c; ss >> num; #endif res += num; return res; } -std::string DRW_Converter::encodeNum(int c){ + +std::string DRW_Converter::encodeNum( int c ) +{ unsigned char ret[5]; - if (c < 128) { // 0-7F US-ASCII 7 bits - ret[0] = c; - ret[1] = 0; - } else if (c < 0x800) { //80-07FF 2 bytes - ret[0] = 0xC0 | (c >> 6); - ret[1] = 0x80 | (c & 0x3f); - ret[2] = 0; - } else if (c< 0x10000) { //800-FFFF 3 bytes - ret[0] = 0xe0 | (c >> 12); - ret[1] = 0x80 | ((c >> 6) & 0x3f); - ret[2] = 0x80 | (c & 0x3f); - ret[3] = 0; - } else { //10000-10FFFF 4 bytes - ret[0] = 0xf0 | (c >> 18); - ret[1] = 0x80 | ((c >> 12) & 0x3f); - ret[2] = 0x80 | ((c >> 6) & 0x3f); - ret[3] = 0x80 | (c & 0x3f); - ret[4] = 0; + + if( c < 128 ) // 0-7F US-ASCII 7 bits + { + ret[0] = c; + ret[1] = 0; } - return std::string((char*)ret); + else if( c < 0x800 ) // 80-07FF 2 bytes + { + ret[0] = 0xC0 | (c >> 6); + ret[1] = 0x80 | (c & 0x3f); + ret[2] = 0; + } + else if( c< 0x10000 ) // 800-FFFF 3 bytes + { + ret[0] = 0xe0 | (c >> 12); + ret[1] = 0x80 | ( (c >> 6) & 0x3f ); + ret[2] = 0x80 | (c & 0x3f); + ret[3] = 0; + } + else // 10000-10FFFF 4 bytes + { + ret[0] = 0xf0 | (c >> 18); + ret[1] = 0x80 | ( (c >> 12) & 0x3f ); + ret[2] = 0x80 | ( (c >> 6) & 0x3f ); + ret[3] = 0x80 | (c & 0x3f); + ret[4] = 0; + } + + return std::string( (char*) ret ); } + /** 's' is a string with at least 4 bytes lenght ** returned 'b' is byte lenght of encoded char: 2,3 or 4 **/ -int DRW_Converter::decodeNum(std::string s, int *b){ - int code= 0; - unsigned char c = s.at(0); - if ( (c& 0xE0) == 0xC0) { //2 bytes - code = ( c&0x1F)<<6; - code = (s.at(1) &0x3F) | code; - *b = 2; - } else if ( (c& 0xF0) == 0xE0) { //3 bytes - code = ( c&0x0F)<<12; - code = ((s.at(1) &0x3F)<<6) | code; - code = (s.at(2) &0x3F) | code; - *b = 3; - } else if ( (c& 0xF8) == 0xF0) { //4 bytes - code = ( c&0x07)<<18; - code = ((s.at(1) &0x3F)<<12) | code; - code = ((s.at(2) &0x3F)<<6) | code; - code = (s.at(3) &0x3F) | code; - *b = 4; +int DRW_Converter::decodeNum( std::string s, int* b ) +{ + int code = 0; + unsigned char c = s.at( 0 ); + + if( (c & 0xE0) == 0xC0 ) // 2 bytes + { + code = ( c & 0x1F) << 6; + code = (s.at( 1 ) & 0x3F) | code; + *b = 2; + } + else if( (c & 0xF0) == 0xE0 ) // 3 bytes + { + code = ( c & 0x0F) << 12; + code = ( (s.at( 1 ) & 0x3F) << 6 ) | code; + code = (s.at( 2 ) & 0x3F) | code; + *b = 3; + } + else if( (c & 0xF8) == 0xF0 ) // 4 bytes + { + code = ( c & 0x07) << 18; + code = ( (s.at( 1 ) & 0x3F) << 12 ) | code; + code = ( (s.at( 2 ) & 0x3F) << 6 ) | code; + code = (s.at( 3 ) & 0x3F) | code; + *b = 4; } return code; } -std::string DRW_ConvDBCSTable::fromUtf8(std::string *s) { +std::string DRW_ConvDBCSTable::fromUtf8( std::string* s ) +{ std::string result; - bool notFound; - int code; + bool notFound; + int code; - int j = 0; - for (unsigned int i=0; i < s->length(); i++) { - unsigned char c = s->at(i); - if (c > 0x7F) { //need to decode - result += s->substr(j,i-j); - std::string part1 = s->substr(i,4); - int l; - code = decodeNum(part1, &l); - j = i+l; + int j = 0; + + for( unsigned int i = 0; i < s->length(); i++ ) + { + unsigned char c = s->at( i ); + + if( c > 0x7F ) // need to decode + { + result += s->substr( j, i - j ); + std::string part1 = s->substr( i, 4 ); + int l; + code = decodeNum( part1, &l ); + j = i + l; i = j - 1; notFound = true; - for (int k=0; k> 8; - d[1] = data & 0xFF; - d[2]= '\0'; - result += d; //translate from table - notFound = false; - break; - } + + for( int k = 0; k> 8; + d[1] = data & 0xFF; + d[2] = '\0'; + result += d; // translate from table + notFound = false; + break; } - if (notFound) - result += decodeText(code); - } //direct conversion + } + + if( notFound ) + result += decodeText( code ); + } // direct conversion } - result += s->substr(j); + + result += s->substr( j ); return result; } -std::string DRW_ConvDBCSTable::toUtf8(std::string *s) { - std::string res; - string::iterator it; - for ( it=s->begin() ; it < s->end(); it++ ) { - bool notFound = true; - unsigned char c = *it; - if (c < 0x80) { + +std::string DRW_ConvDBCSTable::toUtf8( std::string* s ) +{ + std::string res; + std::string::iterator it; + + for( it = s->begin(); it < s->end(); it++ ) + { + bool notFound = true; + unsigned char c = *it; + + if( c < 0x80 ) + { notFound = false; - //check for \U+ encoded text - if (c == '\\') { - if (it+6 < s->end() && *(it+1) == 'U' && *(it+2) == '+') { - res += encodeText(std::string(it, it+7)); - it +=6; - } else { - res +=c; //no \U+ encoded text write + + // check for \U+ encoded text + if( c == '\\' ) + { + if( it + 6 < s->end() && *(it + 1) == 'U' && *(it + 2) == '+' ) + { + res += encodeText( std::string( it, it + 7 ) ); + it += 6; } - } else - res +=c; //c!='\' ascii char write - } else if(c == 0x80 ){//1 byte table + else + { + res += c; // no \U+ encoded text write + } + } + else + res += c; // c!='\' ascii char write + } + else if( c == 0x80 ) // 1 byte table + { notFound = false; - res += encodeNum(0x20AC);//euro sign - } else {//2 bytes + res += encodeNum( 0x20AC ); // euro sign + } + else // 2 bytes + { ++it; - int code = (c << 8) | (unsigned char )(*it); - int sta = leadTable[c-0x81]; - int end = leadTable[c-0x80]; - for (int k=sta; klength(); i++) { - unsigned char c = s->at(i); - if (c > 0x7F) { //need to decode - result += s->substr(j,i-j); - std::string part1 = s->substr(i,4); - int l; - code = decodeNum(part1, &l); - j = i+l; +std::string DRW_Conv932Table::fromUtf8( std::string* s ) +{ + std::string result; + bool notFound; + int code; + + int j = 0; + + for( unsigned int i = 0; i < s->length(); i++ ) + { + unsigned char c = s->at( i ); + + if( c > 0x7F ) // need to decode + { + result += s->substr( j, i - j ); + std::string part1 = s->substr( i, 4 ); + int l; + code = decodeNum( part1, &l ); + j = i + l; i = j - 1; notFound = true; + // 1 byte table - if (code > 0xff60 && code < 0xFFA0) { - result += code - CPOFFSET932; //translate from table + if( code > 0xff60 && code < 0xFFA0 ) + { + result += code - CPOFFSET932; // translate from table notFound = false; } - if (notFound && ( code<0xF8 || (code>0x390 && code<0x542) || - (code>0x200F && code<0x9FA1) || code>0xF928 )) { - for (int k=0; k0x390 && code<0x542) + || (code>0x200F && code<0x9FA1) || code>0xF928 ) ) + { + for( int k = 0; k> 8; d[1] = data & 0xFF; - d[2]= '\0'; - result += d; //translate from table + d[2] = '\0'; + result += d; // translate from table notFound = false; break; } } } - if (notFound) - result += decodeText(code); - } //direct conversion + + if( notFound ) + result += decodeText( code ); + } // direct conversion } - result += s->substr(j); + + result += s->substr( j ); return result; } -std::string DRW_Conv932Table::toUtf8(std::string *s) { - std::string res; - string::iterator it; - for ( it=s->begin() ; it < s->end(); it++ ) { - bool notFound = true; - unsigned char c = *it; - if (c < 0x80) { + +std::string DRW_Conv932Table::toUtf8( std::string* s ) +{ + std::string res; + std::string::iterator it; + + for( it = s->begin(); it < s->end(); it++ ) + { + bool notFound = true; + unsigned char c = *it; + + if( c < 0x80 ) + { notFound = false; - //check for \U+ encoded text - if (c == '\\') { - if (it+6 < s->end() && *(it+1) == 'U' && *(it+2) == '+') { - res += encodeText(std::string(it, it+7)); - it +=6; - } else { - res +=c; //no \U+ encoded text write + + // check for \U+ encoded text + if( c == '\\' ) + { + if( it + 6 < s->end() && *(it + 1) == 'U' && *(it + 2) == '+' ) + { + res += encodeText( std::string( it, it + 7 ) ); + it += 6; + } + else + { + res += c; // no \U+ encoded text write } - } else - res +=c; //c!='\' ascii char write - } else if(c > 0xA0 && c < 0xE0 ){//1 byte table - notFound = false; - res += encodeNum(c + CPOFFSET932); //translate from table - } else {//2 bytes - ++it; - int code = (c << 8) | (unsigned char )(*it); - int sta; - int end=0; - if (c > 0x80 && c < 0xA0) { - sta = DRW_LeadTable932[c-0x81]; - end = DRW_LeadTable932[c-0x80]; - } else if (c > 0xDF && c < 0xFD){ - sta = DRW_LeadTable932[c-0xC1]; - end = DRW_LeadTable932[c-0xC0]; } - if (end > 0) { - for (int k=sta; k 0xA0 && c < 0xE0 ) // 1 byte table + { + notFound = false; + res += encodeNum( c + CPOFFSET932 ); // translate from table + } + else // 2 bytes + { + ++it; + int code = (c << 8) | (unsigned char) (*it); + int sta; + int end = 0; + + if( c > 0x80 && c < 0xA0 ) + { + sta = DRW_LeadTable932[c - 0x81]; + end = DRW_LeadTable932[c - 0x80]; + } + else if( c > 0xDF && c < 0xFD ) + { + sta = DRW_LeadTable932[c - 0xC1]; + end = DRW_LeadTable932[c - 0xC0]; + } + + if( end > 0 ) + { + for( int k = sta; k //for debug -#define DBG(a) std::cerr << a +#include // for debug +#define DBG( a ) std::cerr << a #else -#define DBG(a) +#define DBG( a ) #endif -bool dxfReader::readRec(int *codeData, bool skip) { -// std::string text; +bool dxfReader::readRec( int* codeData, bool skip ) +{ +// std::string text; int code; #ifdef DRW_DBG - count = count+2; //DBG + count = count + 2; // DBG /* if (count > 10250) - DBG("line 10256");*/ + * DBG("line 10256");*/ #endif - if (!readCode(&code)) + if( !readCode( &code ) ) return false; + *codeData = code; - if (code < 10) + if( code < 10 ) readString(); - else if (code < 60) + else if( code < 60 ) readDouble(); - else if (code < 80) + else if( code < 80 ) readInt(); - else if (code > 89 && code < 100) //TODO this is an int 32b + else if( code > 89 && code < 100 ) // TODO this is an int 32b readInt32(); - else if (code == 100 || code == 102 || code == 105) + else if( code == 100 || code == 102 || code == 105 ) readString(); - else if (code > 109 && code < 150) //skip not used at the v2012 + else if( code > 109 && code < 150 ) // skip not used at the v2012 readDouble(); - else if (code > 159 && code < 170) //skip not used at the v2012 + else if( code > 159 && code < 170 ) // skip not used at the v2012 readInt64(); - else if (code < 180) + else if( code < 180 ) readInt(); - else if (code > 209 && code < 240) //skip not used at the v2012 + else if( code > 209 && code < 240 ) // skip not used at the v2012 readDouble(); - else if (code > 269 && code < 290) //skip not used at the v2012 + else if( code > 269 && code < 290 ) // skip not used at the v2012 readInt(); - else if (code < 300) //TODO this is a boolean indicator, int in Binary? + else if( code < 300 ) // TODO this is a boolean indicator, int in Binary? readBool(); - else if (code < 370) + else if( code < 370 ) readString(); - else if (code < 390) + else if( code < 390 ) readInt(); - else if (code < 400) + else if( code < 400 ) readString(); - else if (code < 410) + else if( code < 410 ) readInt(); - else if (code < 420) + else if( code < 420 ) readString(); - else if (code < 430) //TODO this is an int 32b + else if( code < 430 ) // TODO this is an int 32b readInt32(); - else if (code < 440) + else if( code < 440 ) readString(); - else if (code < 450) //TODO this is an int 32b + else if( code < 450 ) // TODO this is an int 32b readInt32(); - else if (code < 460) //TODO this is long?? + else if( code < 460 ) // TODO this is long?? readInt(); - else if (code < 470) //TODO this is a floating point double precision?? + else if( code < 470 ) // TODO this is a floating point double precision?? readDouble(); - else if (code < 481) + else if( code < 481 ) readString(); - else if (code > 998 && code < 1009) //skip not used at the v2012 + else if( code > 998 && code < 1009 ) // skip not used at the v2012 readString(); - else if (code < 1060) //TODO this is a floating point double precision?? + else if( code < 1060 ) // TODO this is a floating point double precision?? readDouble(); - else if (code < 1071) + else if( code < 1071 ) readInt(); - else if (code == 1071) //TODO this is an int 32b + else if( code == 1071 ) // TODO this is an int 32b readInt32(); - else if (skip) - //skip safely this dxf entry ( ok for ascii dxf) + else if( skip ) + // skip safely this dxf entry ( ok for ascii dxf) readString(); else - //break in binary files because the conduct is unpredictable + // break in binary files because the conduct is unpredictable return false; - return (filestr->good()); + return filestr->good(); } -int dxfReader::getHandleString(){ + + +int dxfReader::getHandleString() +{ int res; + #if defined(__APPLE__) - int Succeeded = sscanf ( strData.c_str(), "%x", &res ); - if ( !Succeeded || Succeeded == EOF ) + int Succeeded = sscanf( strData.c_str(), "%x", &res ); + + if( !Succeeded || Succeeded == EOF ) res = 0; + #else - std::istringstream Convert(strData); - if ( !(Convert >> std::hex >>res) ) + std::istringstream Convert( strData ); + + if( !(Convert >> std::hex >> res) ) res = 0; + #endif return res; } -bool dxfReaderBinary::readCode(int *code) { - unsigned short *int16p; - char buffer[2]; - filestr->read(buffer,2); - int16p = (unsigned short *) buffer; -//exist a 32bits int (code 90) with 2 bytes??? - if ((*code == 90) && (*int16p>2000)){ - DBG(*code); DBG(" de 16bits\n"); - filestr->seekg(-4, std::ios_base::cur); - filestr->read(buffer,2); - int16p = (unsigned short *) buffer; + +bool dxfReaderBinary::readCode( int* code ) +{ + unsigned short* int16p; + char buffer[2]; + + filestr->read( buffer, 2 ); + int16p = (unsigned short*) buffer; + +// exist a 32bits int (code 90) with 2 bytes??? + if( (*code == 90) && (*int16p>2000) ) + { + DBG( *code ); DBG( " de 16bits\n" ); + filestr->seekg( -4, std::ios_base::cur ); + filestr->read( buffer, 2 ); + int16p = (unsigned short*) buffer; } + *code = *int16p; - DBG(*code); DBG("\n"); + DBG( *code ); DBG( "\n" ); - return (filestr->good()); + return filestr->good(); } -bool dxfReaderBinary::readString() { - std::getline(*filestr, strData, '\0'); - DBG(strData); DBG("\n"); - return (filestr->good()); + +bool dxfReaderBinary::readString() +{ + std::getline( *filestr, strData, '\0' ); + + DBG( strData ); DBG( "\n" ); + return filestr->good(); } -bool dxfReaderBinary::readString(std::string *text) { - std::getline(*filestr, *text, '\0'); - DBG(*text); DBG("\n"); - return (filestr->good()); + +bool dxfReaderBinary::readString( std::string* text ) +{ + std::getline( *filestr, *text, '\0' ); + + DBG( *text ); DBG( "\n" ); + return filestr->good(); } -bool dxfReaderBinary::readInt() { + +bool dxfReaderBinary::readInt() +{ char buffer[2]; - filestr->read(buffer,2); - intData = (int)((buffer[1] << 8) | buffer[0]); - DBG(intData); DBG("\n"); - return (filestr->good()); + + filestr->read( buffer, 2 ); + intData = (int) ( (buffer[1] << 8) | buffer[0] ); + DBG( intData ); DBG( "\n" ); + return filestr->good(); } -bool dxfReaderBinary::readInt32() { - unsigned int *int32p; - char buffer[4]; - filestr->read(buffer,4); - int32p = (unsigned int *) buffer; + +bool dxfReaderBinary::readInt32() +{ + unsigned int* int32p; + char buffer[4]; + + filestr->read( buffer, 4 ); + int32p = (unsigned int*) buffer; intData = *int32p; - DBG(intData); DBG("\n"); - return (filestr->good()); + DBG( intData ); DBG( "\n" ); + return filestr->good(); } -bool dxfReaderBinary::readInt64() { - unsigned long long int *int64p; //64 bits integer pointer + +bool dxfReaderBinary::readInt64() +{ + unsigned long long int* int64p; // 64 bits integer pointer char buffer[8]; - filestr->read(buffer,8); - int64p = (unsigned long long int *) buffer; - int64 = *int64p; - DBG(int64); DBG(" int64\n"); - return (filestr->good()); + + filestr->read( buffer, 8 ); + int64p = (unsigned long long int*) buffer; + int64 = *int64p; + DBG( int64 ); DBG( " int64\n" ); + return filestr->good(); } -bool dxfReaderBinary::readDouble() { - double *result; - char buffer[8]; - filestr->read(buffer,8); - result = (double *) buffer; - doubleData = *result; - DBG(doubleData); DBG("\n"); - return (filestr->good()); + +bool dxfReaderBinary::readDouble() +{ + double* result; + char buffer[8]; + + filestr->read( buffer, 8 ); + result = (double*) buffer; + doubleData = *result; + DBG( doubleData ); DBG( "\n" ); + return filestr->good(); } -//saved as int or add a bool member?? -bool dxfReaderBinary::readBool() { + +// saved as int or add a bool member?? +bool dxfReaderBinary::readBool() +{ char buffer[1]; - filestr->read(buffer,1); - intData = (int)(buffer[0]); - DBG(intData); DBG("\n"); - return (filestr->good()); + + filestr->read( buffer, 1 ); + intData = (int) (buffer[0]); + DBG( intData ); DBG( "\n" ); + return filestr->good(); } -bool dxfReaderAscii::readCode(int *code) { + +bool dxfReaderAscii::readCode( int* code ) +{ std::string text; - std::getline(*filestr, text); - *code = atoi(text.c_str()); - DBG(*code); DBG("\n"); - return (filestr->good()); -} -bool dxfReaderAscii::readString(std::string *text) { - std::getline(*filestr, *text); - if (!text->empty() && text->at(text->size()-1) == '\r') - text->erase(text->size()-1); - return (filestr->good()); + std::getline( *filestr, text ); + + *code = atoi( text.c_str() ); + DBG( *code ); DBG( "\n" ); + return filestr->good(); } -bool dxfReaderAscii::readString() { - std::getline(*filestr, strData); - if (!strData.empty() && strData.at(strData.size()-1) == '\r') - strData.erase(strData.size()-1); - DBG(strData); DBG("\n"); - return (filestr->good()); + +bool dxfReaderAscii::readString( std::string* text ) +{ + std::getline( *filestr, *text ); + + if( !text->empty() && text->at( text->size() - 1 ) == '\r' ) + text->erase( text->size() - 1 ); + + return filestr->good(); } -bool dxfReaderAscii::readInt() { + +bool dxfReaderAscii::readString() +{ + std::getline( *filestr, strData ); + + if( !strData.empty() && strData.at( strData.size() - 1 ) == '\r' ) + strData.erase( strData.size() - 1 ); + + DBG( strData ); DBG( "\n" ); + return filestr->good(); +} + + +bool dxfReaderAscii::readInt() +{ std::string text; - if (readString(&text)){ - intData = atoi(text.c_str()); - DBG(intData); DBG("\n"); + + if( readString( &text ) ) + { + intData = atoi( text.c_str() ); + DBG( intData ); DBG( "\n" ); return true; - } else + } + else return false; } -bool dxfReaderAscii::readInt32() { + +bool dxfReaderAscii::readInt32() +{ return readInt(); } -bool dxfReaderAscii::readInt64() { + +bool dxfReaderAscii::readInt64() +{ return readInt(); } -bool dxfReaderAscii::readDouble() { + +bool dxfReaderAscii::readDouble() +{ std::string text; - if (readString(&text)){ + + if( readString( &text ) ) + { #if defined(__APPLE__) - int succeeded=sscanf( & (text[0]), "%lg", &doubleData); - if(succeeded != 1) { - DBG("dxfReaderAscii::readDouble(): reading double error: "); - DBG(text); - DBG('\n'); + int succeeded = sscanf( &(text[0]), "%lg", &doubleData ); + + if( succeeded != 1 ) + { + DBG( "dxfReaderAscii::readDouble(): reading double error: " ); + DBG( text ); + DBG( '\n' ); } + #else - std::istringstream sd(text); + std::istringstream sd( text ); sd >> doubleData; - DBG(doubleData); DBG('\n'); + DBG( doubleData ); DBG( '\n' ); #endif return true; - } else + } + else return false; } -//saved as int or add a bool member?? -bool dxfReaderAscii::readBool() { + +// saved as int or add a bool member?? +bool dxfReaderAscii::readBool() +{ std::string text; - if (readString(&text)){ - intData = atoi(text.c_str()); - DBG(intData); DBG("\n"); + + if( readString( &text ) ) + { + intData = atoi( text.c_str() ); + DBG( intData ); DBG( "\n" ); return true; - } else + } + else return false; } - diff --git a/lib_dxf/intern/dxfreader.h b/lib_dxf/intern/dxfreader.h index adfc9f1ae2..a401c33575 100644 --- a/lib_dxf/intern/dxfreader.h +++ b/lib_dxf/intern/dxfreader.h @@ -15,75 +15,82 @@ #include "drw_textcodec.h" -class dxfReader { +class dxfReader +{ public: - dxfReader(std::ifstream *stream){ + dxfReader( std::ifstream* stream ) + { filestr = stream; #ifdef DRW_DBG - count =0; + count = 0; #endif } - virtual ~dxfReader(){} - virtual bool readCode(int *code) = 0; //return true if sucesful (not EOF) - virtual bool readString(std::string *text) = 0; - virtual bool readString() = 0; - bool readRec(int *code, bool skip); - virtual bool readInt() = 0; - virtual bool readInt32() = 0; - virtual bool readInt64() = 0; - virtual bool readDouble() = 0; - virtual bool readBool() = 0; - std::string getString() {return strData;} - int getHandleString();//Convert hex string to int - std::string toUtf8String(std::string t) {return decoder.toUtf8(t);} - std::string getUtf8String() {return decoder.toUtf8(strData);} - double getDouble() {return doubleData;} - int getInt32() {return intData;} - unsigned long long int getInt64() {return int64;} - bool getBool() { return (intData==0) ? false : true;} - int getVersion(){return decoder.getVersion();} - void setVersion(std::string *v){decoder.setVersion(v);} - void setCodePage(std::string *c){decoder.setCodePage(c);} - std::string getCodePage(){ return decoder.getCodePage();} + + virtual ~dxfReader() {} + virtual bool readCode( int* code ) = 0; // return true if sucesful (not EOF) + virtual bool readString( std::string* text ) = 0; + virtual bool readString() = 0; + bool readRec( int* code, bool skip ); + virtual bool readInt() = 0; + virtual bool readInt32() = 0; + virtual bool readInt64() = 0; + virtual bool readDouble() = 0; + virtual bool readBool() = 0; + + std::string getString() { return strData; } + int getHandleString(); // Convert hex string to int + + std::string toUtf8String( std::string t ) { return decoder.toUtf8( t ); } + std::string getUtf8String() { return decoder.toUtf8( strData ); } + double getDouble() { return doubleData; } + int getInt32() { return intData; } + unsigned long long int getInt64() { return int64; } + bool getBool() { return (intData==0) ? false : true; } + int getVersion() { return decoder.getVersion(); } + void setVersion( std::string* v ) { decoder.setVersion( v ); } + void setCodePage( std::string* c ) { decoder.setCodePage( c ); } + std::string getCodePage() { return decoder.getCodePage(); } #ifdef DRW_DBG - int count;//DBG + int count; // DBG #endif protected: - std::ifstream *filestr; - std::string strData; - double doubleData; - signed short intData; //16 bits integer - unsigned long long int int64; //64 bits integer + std::ifstream* filestr; + std::string strData; + double doubleData; + signed int intData; // 32 bits integer + unsigned long long int int64; // 64 bits integer private: - DRW_TextCodec decoder; + DRW_TextCodec decoder; }; -class dxfReaderBinary : public dxfReader { +class dxfReaderBinary : public dxfReader +{ public: - dxfReaderBinary(std::ifstream *stream):dxfReader(stream){ } + dxfReaderBinary( std::ifstream* stream ) : dxfReader( stream ) { } virtual ~dxfReaderBinary() {} - virtual bool readCode(int *code); - virtual bool readString(std::string *text); - virtual bool readString(); - virtual bool readInt(); - virtual bool readInt32(); - virtual bool readInt64(); - virtual bool readDouble(); - virtual bool readBool(); + virtual bool readCode( int* code ); + virtual bool readString( std::string* text ); + virtual bool readString(); + virtual bool readInt(); + virtual bool readInt32(); + virtual bool readInt64(); + virtual bool readDouble(); + virtual bool readBool(); }; -class dxfReaderAscii : public dxfReader { +class dxfReaderAscii : public dxfReader +{ public: - dxfReaderAscii(std::ifstream *stream):dxfReader(stream){ } - virtual ~dxfReaderAscii(){} - virtual bool readCode(int *code); - virtual bool readString(std::string *text); - virtual bool readString(); - virtual bool readInt(); - virtual bool readDouble(); - virtual bool readInt32(); - virtual bool readInt64(); - virtual bool readBool(); + dxfReaderAscii( std::ifstream* stream ) : dxfReader( stream ) { } + virtual ~dxfReaderAscii() {} + virtual bool readCode( int* code ); + virtual bool readString( std::string* text ); + virtual bool readString(); + virtual bool readInt(); + virtual bool readDouble(); + virtual bool readInt32(); + virtual bool readInt64(); + virtual bool readBool(); }; -#endif // DXFREADER_H +#endif // DXFREADER_H diff --git a/lib_dxf/intern/dxfwriter.cpp b/lib_dxf/intern/dxfwriter.cpp index 398e9c2868..fcd9fe7ced 100644 --- a/lib_dxf/intern/dxfwriter.cpp +++ b/lib_dxf/intern/dxfwriter.cpp @@ -17,265 +17,303 @@ #include "dxfwriter.h" #ifdef DRW_DBG -#include //for debug -#define DBG(a) std::cerr << a +#include // for debug +#define DBG( a ) std::cerr << a #else -#define DBG(a) +#define DBG( a ) #endif -//RLZ TODO change std::endl to x0D x0A (13 10) +// RLZ TODO change std::endl to x0D x0A (13 10) /*bool dxfWriter::readRec(int *codeData, bool skip) { -// std::string text; - int code; + * // std::string text; + * int code; + * + * #ifdef DRW_DBG + * count = count+2; //DBG + * #endif + * + * if (!readCode(&code)) + * return false; + * codeData = code; + * + * if (code < 10) + * readString(); + * else if (code < 60) + * readDouble(); + * else if (code < 80) + * readInt(); + * else if (code > 89 && code < 100) //TODO this is an int 32b + * readInt32(); + * else if (code == 100 || code == 102 || code == 105) + * readString(); + * else if (code > 109 && code < 150) //skip not used at the v2012 + * readDouble(); + * else if (code > 159 && code < 170) //skip not used at the v2012 + * readInt64(); + * else if (code < 180) + * readInt(); + * else if (code > 209 && code < 240) //skip not used at the v2012 + * readDouble(); + * else if (code > 269 && code < 290) //skip not used at the v2012 + * readInt(); + * else if (code < 300) //TODO this is a boolean indicator, int in Binary? + * readBool(); + * else if (code < 370) + * readString(); + * else if (code < 390) + * readInt(); + * else if (code < 400) + * readString(); + * else if (code < 410) + * readInt(); + * else if (code < 420) + * readString(); + * else if (code < 430) //TODO this is an int 32b + * readInt32(); + * else if (code < 440) + * readString(); + * else if (code < 450) //TODO this is an int 32b + * readInt32(); + * else if (code < 460) //TODO this is long?? + * readInt(); + * else if (code < 470) //TODO this is a floating point double precision?? + * readDouble(); + * else if (code < 481) + * readString(); + * else if (code > 998 && code < 1009) //skip not used at the v2012 + * readString(); + * else if (code < 1060) //TODO this is a floating point double precision?? + * readDouble(); + * else if (code < 1071) + * readInt(); + * else if (code == 1071) //TODO this is an int 32b + * readInt32(); + * else if (skip) + * //skip safely this dxf entry ( ok for ascii dxf) + * readString(); + * else + * //break in binary files because the conduct is unpredictable + * return false; + * + * return (filestr->good()); + * }*/ -#ifdef DRW_DBG - count = count+2; //DBG -#endif +bool dxfWriter::writeUtf8String( int code, std::string text ) +{ + std::string t = encoder.fromUtf8( text ); - if (!readCode(&code)) - return false; - *codeData = code; - - if (code < 10) - readString(); - else if (code < 60) - readDouble(); - else if (code < 80) - readInt(); - else if (code > 89 && code < 100) //TODO this is an int 32b - readInt32(); - else if (code == 100 || code == 102 || code == 105) - readString(); - else if (code > 109 && code < 150) //skip not used at the v2012 - readDouble(); - else if (code > 159 && code < 170) //skip not used at the v2012 - readInt64(); - else if (code < 180) - readInt(); - else if (code > 209 && code < 240) //skip not used at the v2012 - readDouble(); - else if (code > 269 && code < 290) //skip not used at the v2012 - readInt(); - else if (code < 300) //TODO this is a boolean indicator, int in Binary? - readBool(); - else if (code < 370) - readString(); - else if (code < 390) - readInt(); - else if (code < 400) - readString(); - else if (code < 410) - readInt(); - else if (code < 420) - readString(); - else if (code < 430) //TODO this is an int 32b - readInt32(); - else if (code < 440) - readString(); - else if (code < 450) //TODO this is an int 32b - readInt32(); - else if (code < 460) //TODO this is long?? - readInt(); - else if (code < 470) //TODO this is a floating point double precision?? - readDouble(); - else if (code < 481) - readString(); - else if (code > 998 && code < 1009) //skip not used at the v2012 - readString(); - else if (code < 1060) //TODO this is a floating point double precision?? - readDouble(); - else if (code < 1071) - readInt(); - else if (code == 1071) //TODO this is an int 32b - readInt32(); - else if (skip) - //skip safely this dxf entry ( ok for ascii dxf) - readString(); - else - //break in binary files because the conduct is unpredictable - return false; - - return (filestr->good()); -}*/ - -bool dxfWriter::writeUtf8String(int code, std::string text) { - std::string t = encoder.fromUtf8(text); - return writeString(code, t); + return writeString( code, t ); } -bool dxfWriter::writeUtf8Caps(int code, std::string text) { + +bool dxfWriter::writeUtf8Caps( int code, std::string text ) +{ std::string strname = text; - std::transform(strname.begin(), strname.end(), strname.begin(),::toupper); - std::string t = encoder.fromUtf8(strname); - return writeString(code, t); + std::transform( strname.begin(), strname.end(), strname.begin(), ::toupper ); + std::string t = encoder.fromUtf8( strname ); + + return writeString( code, t ); } -bool dxfWriterBinary::writeString(int code, std::string text) { + +bool dxfWriterBinary::writeString( int code, std::string text ) +{ char bufcode[2]; - bufcode[0] =code & 0xFF; - bufcode[1] =code >> 8; - filestr->write(bufcode, 2); + + bufcode[0] = code & 0xFF; + bufcode[1] = code >> 8; + filestr->write( bufcode, 2 ); *filestr << text << '\0'; - return (filestr->good()); + return filestr->good(); } + /*bool dxfWriterBinary::readCode(int *code) { - unsigned short *int16p; - char buffer[2]; - filestr->read(buffer,2); - int16p = (unsigned short *) buffer; -//exist a 32bits int (code 90) with 2 bytes??? - if ((*code == 90) && (*int16p>2000)){ - DBG(*code); DBG(" de 16bits\n"); - filestr->seekg(-4, std::ios_base::cur); - filestr->read(buffer,2); - int16p = (unsigned short *) buffer; - } - *code = *int16p; - DBG(*code); DBG("\n"); - - return (filestr->good()); -}*/ + * unsigned short *int16p; + * char buffer[2]; + * filestr->read(buffer,2); + * int16p = (unsigned short *) buffer; + * //exist a 32bits int (code 90) with 2 bytes??? + * if ((*code == 90) && (*int16p>2000)){ + * DBG(*code); DBG(" de 16bits\n"); + * filestr->seekg(-4, std::ios_base::cur); + * filestr->read(buffer,2); + * int16p = (unsigned short *) buffer; + * } + * code = *int16p; + * DBG(*code); DBG("\n"); + * + * return (filestr->good()); + * }*/ /*bool dxfWriterBinary::readString() { - std::getline(*filestr, strData, '\0'); - DBG(strData); DBG("\n"); - return (filestr->good()); -}*/ + * std::getline(*filestr, strData, '\0'); + * DBG(strData); DBG("\n"); + * return (filestr->good()); + * }*/ /*bool dxfWriterBinary::readString(std::string *text) { - std::getline(*filestr, *text, '\0'); - DBG(*text); DBG("\n"); - return (filestr->good()); -}*/ + * std::getline(*filestr, *text, '\0'); + * DBG(*text); DBG("\n"); + * return (filestr->good()); + * }*/ -bool dxfWriterBinary::writeInt16(int code, int data) { - char bufcode[2]; - char buffer[2]; - bufcode[0] =code & 0xFF; - bufcode[1] =code >> 8; - buffer[0] =data & 0xFF; - buffer[1] =data >> 8; - filestr->write(bufcode, 2); - filestr->write(buffer, 2); - return (filestr->good()); +bool dxfWriterBinary::writeInt16( int code, int data ) +{ + char bufcode[2]; + char buffer[2]; + + bufcode[0] = code & 0xFF; + bufcode[1] = code >> 8; + buffer[0] = data & 0xFF; + buffer[1] = data >> 8; + filestr->write( bufcode, 2 ); + filestr->write( buffer, 2 ); + return filestr->good(); } -bool dxfWriterBinary::writeInt32(int code, int data) { + +bool dxfWriterBinary::writeInt32( int code, int data ) +{ char buffer[4]; - buffer[0] =code & 0xFF; - buffer[1] =code >> 8; - filestr->write(buffer, 2); - buffer[0] =data & 0xFF; - buffer[1] =data >> 8; - buffer[2] =data >> 16; - buffer[3] =data >> 24; - filestr->write(buffer, 4); - return (filestr->good()); + buffer[0] = code & 0xFF; + buffer[1] = code >> 8; + filestr->write( buffer, 2 ); + + buffer[0] = data & 0xFF; + buffer[1] = data >> 8; + buffer[2] = data >> 16; + buffer[3] = data >> 24; + filestr->write( buffer, 4 ); + return filestr->good(); } -bool dxfWriterBinary::writeInt64(int code, unsigned long long int data) { - char buffer[8]; - buffer[0] =code & 0xFF; - buffer[1] =code >> 8; - filestr->write(buffer, 2); - buffer[0] =data & 0xFF; - buffer[1] =data >> 8; - buffer[2] =data >> 16; - buffer[3] =data >> 24; - buffer[4] =data >> 32; - buffer[5] =data >> 40; - buffer[6] =data >> 48; - buffer[7] =data >> 56; - filestr->write(buffer, 8); - return (filestr->good()); +bool dxfWriterBinary::writeInt64( int code, unsigned long long int data ) +{ + char buffer[8]; + + buffer[0] = code & 0xFF; + buffer[1] = code >> 8; + filestr->write( buffer, 2 ); + + buffer[0] = data & 0xFF; + buffer[1] = data >> 8; + buffer[2] = data >> 16; + buffer[3] = data >> 24; + buffer[4] = data >> 32; + buffer[5] = data >> 40; + buffer[6] = data >> 48; + buffer[7] = data >> 56; + filestr->write( buffer, 8 ); + return filestr->good(); } -bool dxfWriterBinary::writeDouble(int code, double data) { - char bufcode[2]; - char buffer[8]; - bufcode[0] =code & 0xFF; - bufcode[1] =code >> 8; - filestr->write(bufcode, 2); - unsigned char *val; - val = (unsigned char *) &data; - for (int i=0; i<8; i++) { - buffer[i] =val[i]; +bool dxfWriterBinary::writeDouble( int code, double data ) +{ + char bufcode[2]; + char buffer[8]; + + bufcode[0] = code & 0xFF; + bufcode[1] = code >> 8; + filestr->write( bufcode, 2 ); + + unsigned char* val; + val = (unsigned char*) &data; + + for( int i = 0; i<8; i++ ) + { + buffer[i] = val[i]; } - filestr->write(buffer, 8); - return (filestr->good()); + + filestr->write( buffer, 8 ); + return filestr->good(); } -//saved as int or add a bool member?? -bool dxfWriterBinary::writeBool(int code, bool data) { - char buffer[1]; - char bufcode[2]; - bufcode[0] =code & 0xFF; - bufcode[1] =code >> 8; - filestr->write(bufcode, 2); + +// saved as int or add a bool member?? +bool dxfWriterBinary::writeBool( int code, bool data ) +{ + char buffer[1]; + char bufcode[2]; + + bufcode[0] = code & 0xFF; + bufcode[1] = code >> 8; + filestr->write( bufcode, 2 ); buffer[0] = data; - filestr->write(buffer, 1); - return (filestr->good()); + filestr->write( buffer, 1 ); + return filestr->good(); } -bool dxfWriterAscii::writeString(int code, std::string text) { - *filestr << code << std::endl << text << std::endl ; + +bool dxfWriterAscii::writeString( int code, std::string text ) +{ + *filestr << code << std::endl << text << std::endl; /* std::getline(*filestr, strData, '\0'); - DBG(strData); DBG("\n");*/ - return (filestr->good()); + * DBG(strData); DBG("\n");*/ + return filestr->good(); } + /*bool dxfWriterAscii::readCode(int *code) { - std::string text; - std::getline(*filestr, text); - *code = atoi(text.c_str()); - DBG(*code); DBG("\n"); - return (filestr->good()); -}*/ + * std::string text; + * std::getline(*filestr, text); + * code = atoi(text.c_str()); + * DBG(*code); DBG("\n"); + * return (filestr->good()); + * }*/ /*bool dxfWriterAscii::readString(std::string *text) { - std::getline(*filestr, *text); - if (text->at(text->size()-1) == '\r') - text->erase(text->size()-1); - return (filestr->good()); -}*/ + * std::getline(*filestr, *text); + * if (text->at(text->size()-1) == '\r') + * text->erase(text->size()-1); + * return (filestr->good()); + * }*/ /*bool dxfWriterAscii::readString() { - std::getline(*filestr, strData); - if (strData.at(strData.size()-1) == '\r') - strData.erase(strData.size()-1); - DBG(strData); DBG("\n"); - return (filestr->good()); -}*/ + * std::getline(*filestr, strData); + * if (strData.at(strData.size()-1) == '\r') + * strData.erase(strData.size()-1); + * DBG(strData); DBG("\n"); + * return (filestr->good()); + * }*/ -bool dxfWriterAscii::writeInt16(int code, int data) { -// *filestr << code << "\r\n" << data << "\r\n"; +bool dxfWriterAscii::writeInt16( int code, int data ) +{ +// *filestr << code << "\r\n" << data << "\r\n"; *filestr << code << std::endl << data << std::endl; - return (filestr->good()); + return filestr->good(); } -bool dxfWriterAscii::writeInt32(int code, int data) { - return writeInt16(code, data); + +bool dxfWriterAscii::writeInt32( int code, int data ) +{ + return writeInt16( code, data ); } -bool dxfWriterAscii::writeInt64(int code, unsigned long long int data) { + +bool dxfWriterAscii::writeInt64( int code, unsigned long long int data ) +{ *filestr << code << std::endl << data << std::endl; - return (filestr->good()); + return filestr->good(); } -bool dxfWriterAscii::writeDouble(int code, double data) { + +bool dxfWriterAscii::writeDouble( int code, double data ) +{ std::streamsize prec = filestr->precision(); - filestr->precision(12); + + filestr->precision( 12 ); *filestr << code << std::endl << data << std::endl; - filestr->precision(prec); - return (filestr->good()); + filestr->precision( prec ); + return filestr->good(); } -//saved as int or add a bool member?? -bool dxfWriterAscii::writeBool(int code, bool data) { - *filestr << code << std::endl << data << std::endl; - return (filestr->good()); -} +// saved as int or add a bool member?? +bool dxfWriterAscii::writeBool( int code, bool data ) +{ + *filestr << code << std::endl << data << std::endl; + return filestr->good(); +} diff --git a/lib_dxf/intern/dxfwriter.h b/lib_dxf/intern/dxfwriter.h index 1f398c795d..f0da434121 100644 --- a/lib_dxf/intern/dxfwriter.h +++ b/lib_dxf/intern/dxfwriter.h @@ -15,50 +15,55 @@ #include "drw_textcodec.h" -class dxfWriter { +class dxfWriter +{ public: - dxfWriter(std::ofstream *stream){filestr = stream; /*count =0;*/} - virtual ~dxfWriter(){} - virtual bool writeString(int code, std::string text) = 0; - bool writeUtf8String(int code, std::string text); - bool writeUtf8Caps(int code, std::string text); - std::string fromUtf8String(std::string t) {return encoder.fromUtf8(t);} - virtual bool writeInt16(int code, int data) = 0; - virtual bool writeInt32(int code, int data) = 0; - virtual bool writeInt64(int code, unsigned long long int data) = 0; - virtual bool writeDouble(int code, double data) = 0; - virtual bool writeBool(int code, bool data) = 0; - void setVersion(std::string *v){encoder.setVersion(v);} - void setCodePage(std::string *c){encoder.setCodePage(c);} - std::string getCodePage(){return encoder.getCodePage();} + dxfWriter( std::ofstream* stream ) { filestr = stream; /*count =0;*/ } + virtual ~dxfWriter() {} + virtual bool writeString( int code, std::string text ) = 0; + bool writeUtf8String( int code, std::string text ); + bool writeUtf8Caps( int code, std::string text ); + + std::string fromUtf8String( std::string t ) { return encoder.fromUtf8( t ); } + virtual bool writeInt16( int code, int data ) = 0; + virtual bool writeInt32( int code, int data ) = 0; + virtual bool writeInt64( int code, unsigned long long int data ) = 0; + virtual bool writeDouble( int code, double data ) = 0; + virtual bool writeBool( int code, bool data ) = 0; + + void setVersion( std::string* v ) { encoder.setVersion( v ); } + void setCodePage( std::string* c ) { encoder.setCodePage( c ); } + std::string getCodePage() { return encoder.getCodePage(); } protected: - std::ofstream *filestr; + std::ofstream* filestr; private: - DRW_TextCodec encoder; + DRW_TextCodec encoder; }; -class dxfWriterBinary : public dxfWriter { +class dxfWriterBinary : public dxfWriter +{ public: - dxfWriterBinary(std::ofstream *stream):dxfWriter(stream){ } + dxfWriterBinary( std::ofstream* stream ) : dxfWriter( stream ) { } virtual ~dxfWriterBinary() {} - virtual bool writeString(int code, std::string text); - virtual bool writeInt16(int code, int data); - virtual bool writeInt32(int code, int data); - virtual bool writeInt64(int code, unsigned long long int data); - virtual bool writeDouble(int code, double data); - virtual bool writeBool(int code, bool data); + virtual bool writeString( int code, std::string text ); + virtual bool writeInt16( int code, int data ); + virtual bool writeInt32( int code, int data ); + virtual bool writeInt64( int code, unsigned long long int data ); + virtual bool writeDouble( int code, double data ); + virtual bool writeBool( int code, bool data ); }; -class dxfWriterAscii : public dxfWriter { +class dxfWriterAscii : public dxfWriter +{ public: - dxfWriterAscii(std::ofstream *stream):dxfWriter(stream){ } - virtual ~dxfWriterAscii(){} - virtual bool writeString(int code, std::string text); - virtual bool writeInt16(int code, int data); - virtual bool writeInt32(int code, int data); - virtual bool writeInt64(int code, unsigned long long int data); - virtual bool writeDouble(int code, double data); - virtual bool writeBool(int code, bool data); + dxfWriterAscii( std::ofstream* stream ) : dxfWriter( stream ) { } + virtual ~dxfWriterAscii() {} + virtual bool writeString( int code, std::string text ); + virtual bool writeInt16( int code, int data ); + virtual bool writeInt32( int code, int data ); + virtual bool writeInt64( int code, unsigned long long int data ); + virtual bool writeDouble( int code, double data ); + virtual bool writeBool( int code, bool data ); }; -#endif // DXFWRITER_H +#endif // DXFWRITER_H diff --git a/lib_dxf/libdxfrw.cpp b/lib_dxf/libdxfrw.cpp index 37201da5d1..ffbba1161a 100644 --- a/lib_dxf/libdxfrw.cpp +++ b/lib_dxf/libdxfrw.cpp @@ -215,7 +215,7 @@ bool dxfRW::writeEntity( DRW_Entity* ent ) bool dxfRW::writeLineType( DRW_LType* ent ) { - string strname = ent->name; + std::string strname = ent->name; transform( strname.begin(), strname.end(), strname.begin(), ::toupper ); @@ -1322,7 +1322,12 @@ bool dxfRW::writeDimension( DRW_Dimension* ent ) writer->writeString( 0, "DIMENSION" ); writeEntity( ent ); writer->writeString( 100, "AcDbDimension" ); -// writer->writeString(2, ent->name); + + if( !ent->getName().empty() ) + { + writer->writeString( 2, ent->getName() ); + } + writer->writeDouble( 10, ent->getDefPoint().x ); writer->writeDouble( 20, ent->getDefPoint().y ); writer->writeDouble( 30, ent->getDefPoint().z ); @@ -2129,8 +2134,13 @@ bool dxfRW::writeTables() writer->writeInt16( 280, 1 ); writer->writeInt16( 281, 0 ); } + } - iface->writeBlockRecords(); + /* allways call writeBlockRecords to iface for prepare unnamed blocks */ + iface->writeBlockRecords(); + + if( version > DRW::AC1009 ) + { writer->writeString( 0, "ENDTAB" ); } @@ -2312,7 +2322,7 @@ bool dxfRW::writeObjects() for( unsigned int i = 0; i::iterator it; + std::map::iterator it; for( it = id->reactors.begin(); it != id->reactors.end(); it++ ) { @@ -2356,7 +2366,7 @@ bool dxfRW::writeObjects() } writer->writeString( 102, "{ACAD_REACTORS" ); - std::map::iterator it; + std::map::iterator it; for( it = id->reactors.begin(); it != id->reactors.end(); it++ ) { @@ -2390,9 +2400,9 @@ bool dxfRW::writeObjects() bool dxfRW::processDxf() { DBG( "dxfRW::processDxf() start processing dxf\n" ); - int code; - bool more = true; - string sectionstr; + int code; + bool more = true; + std::string sectionstr; // section = secUnknown; while( reader->readRec( &code, !binary ) ) @@ -2468,8 +2478,8 @@ bool dxfRW::processDxf() bool dxfRW::processHeader() { DBG( "dxfRW::processHeader\n" ); - int code; - string sectionstr; + int code; + std::string sectionstr; while( reader->readRec( &code, !binary ) ) { @@ -2499,9 +2509,9 @@ bool dxfRW::processHeader() bool dxfRW::processTables() { DBG( "dxfRW::processTables\n" ); - int code; - string sectionstr; - bool more = true; + int code; + std::string sectionstr; + bool more = true; while( reader->readRec( &code, !binary ) ) { @@ -2579,7 +2589,7 @@ bool dxfRW::processLType() { DBG( "dxfRW::processLType\n" ); int code; - string sectionstr; + std::string sectionstr; bool reading = false; DRW_LType ltype; @@ -2620,7 +2630,7 @@ bool dxfRW::processLayer() { DBG( "dxfRW::processLayer\n" ); int code; - string sectionstr; + std::string sectionstr; bool reading = false; DRW_Layer layer; @@ -2658,7 +2668,7 @@ bool dxfRW::processDimStyle() { DBG( "dxfRW::processDimStyle" ); int code; - string sectionstr; + std::string sectionstr; bool reading = false; DRW_Dimstyle dimSty; @@ -2696,7 +2706,7 @@ bool dxfRW::processTextStyle() { DBG( "dxfRW::processTextStyle" ); int code; - string sectionstr; + std::string sectionstr; bool reading = false; DRW_Textstyle TxtSty; @@ -2734,7 +2744,7 @@ bool dxfRW::processVports() { DBG( "dxfRW::processVports" ); int code; - string sectionstr; + std::string sectionstr; bool reading = false; DRW_Vport vp; @@ -2773,8 +2783,8 @@ bool dxfRW::processVports() bool dxfRW::processBlocks() { DBG( "dxfRW::processBlocks\n" ); - int code; - string sectionstr; + int code; + std::string sectionstr; while( reader->readRec( &code, !binary ) ) { diff --git a/lib_dxf/libdxfrw.h b/lib_dxf/libdxfrw.h index 1ec33ca517..574cfa88f9 100644 --- a/lib_dxf/libdxfrw.h +++ b/lib_dxf/libdxfrw.h @@ -127,7 +127,7 @@ private: DRW_Interface* iface; DRW_Header header; // int section; - string nextentity; + std::string nextentity; int entCount; bool wlayer0; bool dimstyleStd; diff --git a/pcbnew/import_dxf/dialog_dxf_import.cpp b/pcbnew/import_dxf/dialog_dxf_import.cpp index 4a93aa056a..2b55fcc642 100644 --- a/pcbnew/import_dxf/dialog_dxf_import.cpp +++ b/pcbnew/import_dxf/dialog_dxf_import.cpp @@ -27,16 +27,25 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ +#include #include #include #include #include #include + +// Keys to store setup in config +#define DXF_IMPORT_LAYER_OPTION_KEY wxT("DxfImportBrdLayer") +#define DXF_IMPORT_COORD_ORIGIN_KEY wxT("DxfImportCoordOrigin") +#define DXF_IMPORT_LAST_FILE_KEY wxT("DxfImportLastFile") + class DIALOG_DXF_IMPORT : public DIALOG_DXF_IMPORT_BASE { private: PCB_EDIT_FRAME * m_parent; + wxConfig* m_config; // Current config + static wxString m_dxfFilename; static int m_offsetSelection; static LAYER_NUM m_layer; @@ -64,6 +73,15 @@ DIALOG_DXF_IMPORT::DIALOG_DXF_IMPORT( PCB_EDIT_FRAME* aParent ) : DIALOG_DXF_IMPORT_BASE( aParent ) { m_parent = aParent; + m_config = wxGetApp().GetSettings(); + + if( m_config ) + { + m_layer = m_config->Read( DXF_IMPORT_LAYER_OPTION_KEY, (long)DRAW_N ); + m_offsetSelection = m_config->Read( DXF_IMPORT_COORD_ORIGIN_KEY, 3 ); + m_dxfFilename = m_config->Read( DXF_IMPORT_LAST_FILE_KEY, wxEmptyString ); + } + m_textCtrlFileName->SetValue( m_dxfFilename ); m_rbOffsetOption->SetSelection( m_offsetSelection ); @@ -72,6 +90,7 @@ DIALOG_DXF_IMPORT::DIALOG_DXF_IMPORT( PCB_EDIT_FRAME* aParent ) m_SelLayerBox->SetLayerMask( ALL_CU_LAYERS ); // Do not use copper layers m_SelLayerBox->SetBoardFrame( m_parent ); m_SelLayerBox->Resync(); + if( m_SelLayerBox->SetLayerSelection( m_layer ) < 0 ) { m_layer = DRAW_N; @@ -88,14 +107,28 @@ DIALOG_DXF_IMPORT::~DIALOG_DXF_IMPORT() { m_offsetSelection = m_rbOffsetOption->GetSelection(); m_layer = m_SelLayerBox->GetLayerSelection(); + + if( m_config ) + { + m_config->Write( DXF_IMPORT_LAYER_OPTION_KEY, (long)m_layer ); + m_config->Write( DXF_IMPORT_COORD_ORIGIN_KEY, m_offsetSelection ); + m_config->Write( DXF_IMPORT_LAST_FILE_KEY, m_dxfFilename ); + } } void DIALOG_DXF_IMPORT::OnBrowseDxfFiles( wxCommandEvent& event ) { + wxString path; + + if( !m_dxfFilename.IsEmpty() ) + { + wxFileName fn( m_dxfFilename ); + path = fn.GetPath(); + } wxFileDialog dlg( m_parent, wxT( "Open File" ), - wxEmptyString, wxEmptyString, + path, m_dxfFilename, wxT( "dxf Files (*.dxf)|*.dxf|*.DXF" ), wxFD_OPEN|wxFD_FILE_MUST_EXIST ); dlg.ShowModal(); diff --git a/pcbnew/import_dxf/examples/test_outlines.dxf b/pcbnew/import_dxf/examples/test_outlines.dxf new file mode 100644 index 0000000000..c5448b172b --- /dev/null +++ b/pcbnew/import_dxf/examples/test_outlines.dxf @@ -0,0 +1,7264 @@ +999 +dxfrw 0.5.10 +0 +SECTION +2 +HEADER +9 +$ACADVER +1 +AC1021 +9 +$HANDSEED +5 +20000 +9 +$DWGCODEPAGE +3 +ANSI_1252 +9 +$INSBASE +10 +0 +20 +0 +30 +0 +9 +$EXTMIN +10 +8.01510349296 +20 +22.3703927791 +30 +0 +9 +$EXTMAX +10 +160.415103493 +20 +173.677807569 +30 +0 +9 +$LIMMIN +10 +0 +20 +0 +9 +$LIMMAX +10 +210 +20 +297 +9 +$ORTHOMODE +70 +0 +9 +$LTSCALE +40 +1 +9 +$TEXTSTYLE +7 +Standard +9 +$DIMASZ +40 +1.8 +9 +$DIMSCALE +40 +1 +9 +$DIMEXO +40 +0.0625 +9 +$DIMEXE +40 +0.18 +9 +$DIMTXT +40 +0.25 +9 +$DIMTSZ +40 +0 +9 +$DIMAUNIT +70 +0 +9 +$DIMADEC +70 +0 +9 +$DIMLUNIT +70 +2 +9 +$DIMSTYLE +2 +Standard +9 +$DIMGAP +40 +0.09 +9 +$DIMTIH +70 +1 +9 +$LUNITS +70 +2 +9 +$LUPREC +70 +4 +9 +$AUNITS +70 +0 +9 +$AUPREC +70 +0 +9 +$SPLINESEGS +70 +8 +9 +$GRIDMODE +70 +0 +9 +$SNAPSTYLE +70 +0 +9 +$PINSBASE +10 +0 +20 +0 +30 +0 +9 +$PLIMMIN +10 +0 +20 +0 +9 +$PLIMMAX +10 +210 +20 +297 +9 +$INSUNITS +70 +4 +9 +$PSVPSCALE +40 +0 +0 +ENDSEC +0 +SECTION +2 +CLASSES +0 +ENDSEC +0 +SECTION +2 +TABLES +0 +TABLE +2 +VPORT +5 +8 +330 +0 +100 +AcDbSymbolTable +70 +1 +0 +VPORT +5 +31 +330 +2 +100 +AcDbSymbolTableRecord +100 +AcDbViewportTableRecord +2 +*ACTIVE +70 +0 +10 +0 +20 +0 +11 +1 +21 +1 +12 +103.477837818 +22 +82.10741479 +13 +0 +23 +0 +14 +10 +24 +10 +15 +10 +25 +10 +16 +0 +26 +0 +36 +1 +17 +0 +27 +0 +37 +0 +40 +368.920987002 +41 +0.976829268293 +42 +50 +43 +0 +44 +0 +50 +0 +51 +0 +71 +0 +72 +100 +73 +1 +74 +3 +75 +0 +76 +0 +77 +0 +78 +0 +281 +0 +65 +1 +110 +0 +120 +0 +130 +0 +111 +1 +121 +0 +131 +0 +112 +0 +122 +1 +132 +0 +79 +0 +146 +0 +348 +10020 +60 +7 +61 +5 +292 +1 +282 +1 +141 +0 +142 +0 +63 +250 +421 +3358443 +0 +ENDTAB +0 +TABLE +2 +LTYPE +5 +5 +330 +0 +100 +AcDbSymbolTable +70 +4 +0 +LTYPE +5 +14 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +ByBlock +70 +0 +3 + +72 +65 +73 +0 +40 +0 +0 +LTYPE +5 +15 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +ByLayer +70 +0 +3 + +72 +65 +73 +0 +40 +0 +0 +LTYPE +5 +16 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +Continuous +70 +0 +3 +Solid line +72 +65 +73 +0 +40 +0 +0 +LTYPE +5 +32 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DOT +70 +0 +3 +Dot . . . . . . . . . . . . . . . . . . . . . . +72 +65 +73 +2 +40 +6.35 +49 +0 +74 +0 +49 +-6.35 +74 +0 +0 +LTYPE +5 +33 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DOT2 +70 +0 +3 +Dot (.5x) ..................................... +72 +65 +73 +2 +40 +3.175 +49 +0 +74 +0 +49 +-3.175 +74 +0 +0 +LTYPE +5 +34 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DOTX2 +70 +0 +3 +Dot (2x) . . . . . . . . . . . . . +72 +65 +73 +2 +40 +12.7 +49 +0 +74 +0 +49 +-12.7 +74 +0 +0 +LTYPE +5 +35 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DASHED +70 +0 +3 +Dot . . . . . . . . . . . . . . . . . . . . . . +72 +65 +73 +2 +40 +19.05 +49 +12.7 +74 +0 +49 +-6.35 +74 +0 +0 +LTYPE +5 +36 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DASHED2 +70 +0 +3 +Dashed (.5x) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ +72 +65 +73 +2 +40 +9.525 +49 +6.35 +74 +0 +49 +-3.175 +74 +0 +0 +LTYPE +5 +37 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DASHEDX2 +70 +0 +3 +Dashed (2x) ____ ____ ____ ____ ____ ___ +72 +65 +73 +2 +40 +38.1 +49 +25.4 +74 +0 +49 +-12.7 +74 +0 +0 +LTYPE +5 +38 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DASHDOT +70 +0 +3 +Dash dot __ . __ . __ . __ . __ . __ . __ . __ +72 +65 +73 +4 +40 +25.4 +49 +12.7 +74 +0 +49 +-6.35 +74 +0 +49 +0 +74 +0 +49 +-6.35 +74 +0 +0 +LTYPE +5 +39 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DASHDOT2 +70 +0 +3 +Dash dot (.5x) _._._._._._._._._._._._._._._. +72 +65 +73 +4 +40 +12.7 +49 +6.35 +74 +0 +49 +-3.175 +74 +0 +49 +0 +74 +0 +49 +-3.175 +74 +0 +0 +LTYPE +5 +3A +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DASHDOTX2 +70 +0 +3 +Dash dot (2x) ____ . ____ . ____ . ___ +72 +65 +73 +4 +40 +50.8 +49 +25.4 +74 +0 +49 +-12.7 +74 +0 +49 +0 +74 +0 +49 +-12.7 +74 +0 +0 +LTYPE +5 +3B +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DIVIDE +70 +0 +3 +Divide ____ . . ____ . . ____ . . ____ . . ____ +72 +65 +73 +6 +40 +31.75 +49 +12.7 +74 +0 +49 +-6.35 +74 +0 +49 +0 +74 +0 +49 +-6.35 +74 +0 +49 +0 +74 +0 +49 +-6.35 +74 +0 +0 +LTYPE +5 +3C +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DIVIDE2 +70 +0 +3 +Divide (.5x) __..__..__..__..__..__..__..__.._ +72 +65 +73 +6 +40 +15.875 +49 +6.35 +74 +0 +49 +-3.175 +74 +0 +49 +0 +74 +0 +49 +-3.175 +74 +0 +49 +0 +74 +0 +49 +-3.175 +74 +0 +0 +LTYPE +5 +3D +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +DIVIDEX2 +70 +0 +3 +Divide (2x) ________ . . ________ . . _ +72 +65 +73 +6 +40 +63.5 +49 +25.4 +74 +0 +49 +-12.7 +74 +0 +49 +0 +74 +0 +49 +-12.7 +74 +0 +49 +0 +74 +0 +49 +-12.7 +74 +0 +0 +LTYPE +5 +3E +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +BORDER +70 +0 +3 +Border __ __ . __ __ . __ __ . __ __ . __ __ . +72 +65 +73 +6 +40 +44.45 +49 +12.7 +74 +0 +49 +-6.35 +74 +0 +49 +12.7 +74 +0 +49 +-6.35 +74 +0 +49 +0 +74 +0 +49 +-6.35 +74 +0 +0 +LTYPE +5 +3F +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +BORDER2 +70 +0 +3 +Border (.5x) __.__.__.__.__.__.__.__.__.__.__. +72 +65 +73 +6 +40 +22.225 +49 +6.35 +74 +0 +49 +-3.175 +74 +0 +49 +6.35 +74 +0 +49 +-3.175 +74 +0 +49 +0 +74 +0 +49 +-3.175 +74 +0 +0 +LTYPE +5 +40 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +BORDERX2 +70 +0 +3 +Border (2x) ____ ____ . ____ ____ . ___ +72 +65 +73 +6 +40 +88.9 +49 +25.4 +74 +0 +49 +-12.7 +74 +0 +49 +25.4 +74 +0 +49 +-12.7 +74 +0 +49 +0 +74 +0 +49 +-12.7 +74 +0 +0 +LTYPE +5 +41 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +CENTER +70 +0 +3 +Center ____ _ ____ _ ____ _ ____ _ ____ _ ____ +72 +65 +73 +4 +40 +50.8 +49 +31.75 +74 +0 +49 +-6.35 +74 +0 +49 +6.35 +74 +0 +49 +-6.35 +74 +0 +0 +LTYPE +5 +42 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +CENTER2 +70 +0 +3 +Center (.5x) ___ _ ___ _ ___ _ ___ _ ___ _ ___ +72 +65 +73 +4 +40 +28.575 +49 +19.05 +74 +0 +49 +-3.175 +74 +0 +49 +3.175 +74 +0 +49 +-3.175 +74 +0 +0 +LTYPE +5 +43 +330 +5 +100 +AcDbSymbolTableRecord +100 +AcDbLinetypeTableRecord +2 +CENTERX2 +70 +0 +3 +Center (2x) ________ __ ________ __ _____ +72 +65 +73 +4 +40 +101.6 +49 +63.5 +74 +0 +49 +-12.7 +74 +0 +49 +12.7 +74 +0 +49 +-12.7 +74 +0 +0 +ENDTAB +0 +TABLE +2 +LAYER +5 +2 +330 +0 +100 +AcDbSymbolTable +70 +1 +0 +LAYER +5 +10 +330 +2 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord +2 +0 +70 +0 +62 +7 +6 +CONTINUOUS +370 +-3 +390 +F +0 +LAYER +5 +44 +330 +2 +100 +AcDbSymbolTableRecord +100 +AcDbLayerTableRecord +2 +Visible Edges(PEC) +70 +0 +62 +7 +6 +CONTINUOUS +370 +50 +390 +F +0 +ENDTAB +0 +TABLE +2 +STYLE +5 +3 +330 +0 +100 +AcDbSymbolTable +70 +3 +0 +STYLE +5 +45 +330 +2 +100 +AcDbSymbolTableRecord +100 +AcDbTextStyleTableRecord +2 +Standard +70 +0 +40 +0 +41 +1 +50 +0 +71 +0 +42 +1 +3 +txt +4 + +0 +ENDTAB +0 +TABLE +2 +VIEW +5 +6 +330 +0 +100 +AcDbSymbolTable +70 +0 +0 +ENDTAB +0 +TABLE +2 +UCS +5 +7 +330 +0 +100 +AcDbSymbolTable +70 +0 +0 +ENDTAB +0 +TABLE +2 +APPID +5 +9 +330 +0 +100 +AcDbSymbolTable +70 +1 +0 +APPID +5 +12 +330 +9 +100 +AcDbSymbolTableRecord +100 +AcDbRegAppTableRecord +2 +ACAD +70 +0 +0 +ENDTAB +0 +TABLE +2 +DIMSTYLE +5 +A +330 +0 +100 +AcDbSymbolTable +70 +1 +100 +AcDbDimStyleTable +71 +1 +0 +DIMSTYLE +105 +46 +330 +A +100 +AcDbSymbolTableRecord +100 +AcDbDimStyleTableRecord +2 +Standard +70 +0 +40 +1 +41 +1.8 +42 +0.0625 +43 +0.38 +44 +0.18 +45 +0 +46 +0 +47 +0 +48 +0 +140 +0.25 +141 +0.09 +142 +0 +143 +25.4 +144 +1 +145 +0 +146 +1 +147 +0.09 +148 +0 +71 +0 +72 +0 +73 +0 +74 +1 +75 +0 +76 +0 +77 +0 +78 +0 +79 +0 +170 +0 +171 +2 +172 +0 +173 +0 +174 +0 +175 +0 +176 +0 +177 +0 +178 +0 +179 +0 +271 +4 +272 +4 +273 +2 +274 +2 +275 +0 +276 +0 +277 +2 +278 +46 +279 +0 +280 +0 +281 +0 +282 +0 +283 +1 +284 +0 +285 +0 +286 +0 +288 +0 +289 +3 +340 +Standard +341 + +371 +-2 +372 +-2 +0 +ENDTAB +0 +TABLE +2 +BLOCK_RECORD +5 +1 +330 +0 +100 +AcDbSymbolTable +70 +2 +0 +BLOCK_RECORD +5 +1F +330 +1 +100 +AcDbSymbolTableRecord +100 +AcDbBlockTableRecord +2 +*Model_Space +70 +0 +280 +1 +281 +0 +0 +BLOCK_RECORD +5 +1E +330 +1 +100 +AcDbSymbolTableRecord +100 +AcDbBlockTableRecord +2 +*Paper_Space +70 +0 +280 +1 +281 +0 +0 +ENDTAB +0 +ENDSEC +0 +SECTION +2 +BLOCKS +0 +BLOCK +5 +20 +330 +1F +100 +AcDbEntity +8 +0 +100 +AcDbBlockBegin +2 +*Model_Space +70 +0 +10 +0 +20 +0 +30 +0 +3 +*Model_Space +1 + +0 +ENDBLK +5 +21 +330 +1F +100 +AcDbEntity +8 +0 +100 +AcDbBlockEnd +0 +BLOCK +5 +1C +330 +1B +100 +AcDbEntity +8 +0 +100 +AcDbBlockBegin +2 +*Paper_Space +70 +0 +10 +0 +20 +0 +30 +0 +3 +*Paper_Space +1 + +0 +ENDBLK +5 +1D +330 +1F +100 +AcDbEntity +8 +0 +100 +AcDbBlockEnd +0 +ENDSEC +0 +SECTION +2 +ENTITIES +0 +LINE +5 +47 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +54.0015095768 +20 +145.07427149 +11 +57.9407405889 +21 +144.379678779 +0 +LINE +5 +48 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +57.9407405889 +20 +144.379678779 +11 +55.9264217279 +21 +132.955908844 +0 +LINE +5 +49 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +55.9264217279 +20 +132.955908844 +11 +51.9871907159 +21 +133.650501555 +0 +CIRCLE +5 +4A +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +76.6151034931 +20 +128.870392779 +40 +2 +0 +CIRCLE +5 +4B +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +62.3755750957 +20 +142.867767753 +40 +1.6 +0 +CIRCLE +5 +4C +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +60.6112785469 +20 +132.861944812 +40 +1.6 +0 +CIRCLE +5 +4D +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +76.9279747741 +20 +141.354399538 +40 +1.1 +0 +CIRCLE +5 +4E +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +28.165103493 +20 +25.4703927791 +40 +0.7 +0 +CIRCLE +5 +4F +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +44.265103493 +20 +25.4703927791 +40 +0.7 +0 +CIRCLE +5 +50 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +36.965103493 +20 +25.4703927791 +40 +0.7 +0 +ARC +5 +51 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +78.5610437151 +20 +131.847953136 +40 +0.4 +100 +AcDbArc +50 +85.34 +51 +265.34 +0 +LINE +5 +52 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +78.5935407971 +20 +132.246630875 +11 +79.4905657101 +21 +132.173512441 +0 +ARC +5 +53 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +79.4580686281 +20 +131.774834702 +40 +0.4 +100 +AcDbArc +50 +265.34 +51 +85.34 +0 +LINE +5 +54 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +79.4255715461 +20 +131.376156963 +11 +78.5285466331 +21 +131.449275397 +0 +LINE +5 +55 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +79.1866125401 +20 +139.522499614 +11 +80.0836374531 +21 +139.44938118 +0 +ARC +5 +56 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +80.0511403711 +20 +139.050703441 +40 +0.4 +100 +AcDbArc +50 +265.34 +51 +85.34 +0 +LINE +5 +57 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +80.0186432901 +20 +138.652025702 +11 +79.1216183771 +21 +138.725144136 +0 +ARC +5 +58 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +79.1541154581 +20 +139.123821875 +40 +0.4 +100 +AcDbArc +50 +85.34 +51 +265.34 +0 +ARC +5 +59 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +73.8716354151 +20 +139.554408209 +40 +0.4 +100 +AcDbArc +50 +85.34 +51 +265.34 +0 +LINE +5 +5A +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +73.9041324969 +20 +139.953085949 +11 +74.8011574099 +21 +139.879967514 +0 +ARC +5 +5B +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +74.7686603281 +20 +139.481289775 +40 +0.4 +100 +AcDbArc +50 +265.34 +51 +85.34 +0 +LINE +5 +5C +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +74.7361632463 +20 +139.082612036 +11 +73.8391383333 +21 +139.15573047 +0 +ARC +5 +5D +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +73.2785636718 +20 +132.27853947 +40 +0.4 +100 +AcDbArc +50 +85.34 +51 +265.34 +0 +LINE +5 +5E +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +73.3110607536 +20 +132.67721721 +11 +74.2080856666 +21 +132.604098775 +0 +ARC +5 +5F +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +74.1755885848 +20 +132.205421036 +40 +0.4 +100 +AcDbArc +50 +265.34 +51 +85.34 +0 +LINE +5 +60 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +74.143091503 +20 +131.806743297 +11 +73.2460665899 +21 +131.879861731 +0 +LINE +5 +61 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +56.8197279711 +20 +132.003859741 +11 +57.9030164994 +21 +131.812846746 +0 +ARC +5 +62 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +57.8509220461 +20 +131.51740442 +40 +0.3 +100 +AcDbArc +50 +260 +51 +80 +0 +LINE +5 +63 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +57.7988275928 +20 +131.221962094 +11 +56.7155390645 +21 +131.412975089 +0 +ARC +5 +64 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +56.7676335178 +20 +131.708417415 +40 +0.3 +100 +AcDbArc +50 +80 +51 +260 +0 +LINE +5 +65 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +59.2022229169 +20 +145.515660013 +11 +60.2855114452 +21 +145.324647017 +0 +ARC +5 +66 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +60.2334169919 +20 +145.029204691 +40 +0.3 +100 +AcDbArc +50 +260 +51 +80 +0 +LINE +5 +67 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +60.1813225386 +20 +144.733762365 +11 +59.0980340103 +21 +144.924775361 +0 +ARC +5 +68 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +59.1501284636 +20 +145.220217687 +40 +0.3 +100 +AcDbArc +50 +80 +51 +260 +0 +CIRCLE +5 +69 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +17.415103493 +20 +33.7103927791 +40 +0.5 +0 +CIRCLE +5 +6A +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +17.415103493 +20 +36.2503927791 +40 +0.5 +0 +CIRCLE +5 +6B +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +17.415103493 +20 +38.7903927791 +40 +0.5 +0 +CIRCLE +5 +6C +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +17.415103493 +20 +41.3303927791 +40 +0.5 +0 +CIRCLE +5 +6D +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +76.1591754285 +20 +137.461644322 +40 +0.45 +0 +CIRCLE +5 +6E +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +75.8748259626 +20 +133.973214105 +40 +0.45 +0 +CIRCLE +5 +6F +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +68.0851733401 +20 +138.680315907 +40 +0.45 +0 +CIRCLE +5 +70 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +67.6440992029 +20 +136.178860171 +40 +0.45 +0 +CIRCLE +5 +71 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +70.3686653354 +20 +137.003365518 +40 +0.45 +0 +CIRCLE +5 +72 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +69.9275911982 +20 +134.501909782 +40 +0.45 +0 +LINE +5 +73 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +54.388745013 +20 +147.270392779 +11 +54.0015095768 +21 +145.07427149 +0 +LINE +5 +74 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +51.9871907159 +20 +133.650501555 +11 +50.7387765123 +21 +126.570392779 +0 +LINE +5 +75 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +26.115103493 +20 +28.5703927791 +11 +26.115103493 +21 +22.3703927791 +0 +LINE +5 +76 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +26.115103493 +20 +22.3703927791 +11 +46.315103493 +21 +22.3703927791 +0 +LINE +5 +77 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +46.315103493 +20 +22.3703927791 +11 +46.315103493 +21 +28.5703927791 +0 +LINE +5 +78 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +80.1469013801 +20 +126.070392779 +11 +81.4988185711 +21 +142.655860116 +0 +LINE +5 +79 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +54.388745013 +20 +147.270392779 +11 +81.4988185711 +21 +142.655860116 +0 +CIRCLE +5 +7A +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +38.615103493 +20 +36.0703927791 +40 +0.75 +0 +CIRCLE +5 +7B +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +31.115103493 +20 +33.8203927791 +40 +0.75 +0 +CIRCLE +5 +7C +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +141.915103493 +20 +109.820392779 +40 +0.75 +0 +CIRCLE +5 +7D +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +149.415103493 +20 +112.070392779 +40 +0.75 +0 +CIRCLE +5 +7E +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +139.665103493 +20 +71.8203927791 +40 +0.75 +0 +CIRCLE +5 +7F +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +147.165103493 +20 +74.0703927791 +40 +0.75 +0 +CIRCLE +5 +80 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +135.165103493 +20 +52.8203927791 +40 +0.75 +0 +CIRCLE +5 +81 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +142.665103493 +20 +55.0703927791 +40 +0.75 +0 +CIRCLE +5 +82 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +137.415103493 +20 +33.8203927791 +40 +0.75 +0 +CIRCLE +5 +83 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +144.915103493 +20 +36.0703927791 +40 +0.75 +0 +CIRCLE +5 +84 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +114.765103493 +20 +36.0703927791 +40 +0.75 +0 +CIRCLE +5 +85 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +107.265103493 +20 +33.8203927791 +40 +0.75 +0 +CIRCLE +5 +86 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +91.3651034931 +20 +36.0703927791 +40 +0.75 +0 +CIRCLE +5 +87 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +83.8651034931 +20 +33.8203927791 +40 +0.75 +0 +CIRCLE +5 +88 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +67.965103493 +20 +36.0703927791 +40 +0.75 +0 +CIRCLE +5 +89 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +60.465103493 +20 +33.8203927791 +40 +0.75 +0 +CIRCLE +5 +8A +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +104.715103493 +20 +52.8203927791 +40 +0.75 +0 +CIRCLE +5 +8B +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +112.215103493 +20 +55.0703927791 +40 +0.75 +0 +CIRCLE +5 +8C +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +85.5151034931 +20 +52.8203927791 +40 +0.75 +0 +CIRCLE +5 +8D +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +93.0151034931 +20 +55.0703927791 +40 +0.75 +0 +CIRCLE +5 +8E +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +66.315103493 +20 +52.8203927791 +40 +0.75 +0 +CIRCLE +5 +8F +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +73.815103493 +20 +55.0703927791 +40 +0.75 +0 +CIRCLE +5 +90 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +47.115103493 +20 +52.8203927791 +40 +0.75 +0 +CIRCLE +5 +91 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +54.615103493 +20 +55.0703927791 +40 +0.75 +0 +CIRCLE +5 +92 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +35.415103493 +20 +55.0703927791 +40 +0.75 +0 +CIRCLE +5 +93 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +27.915103493 +20 +52.8203927791 +40 +0.75 +0 +CIRCLE +5 +94 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +121.325103493 +20 +74.0703927791 +40 +0.75 +0 +CIRCLE +5 +95 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +113.825103493 +20 +71.8203927791 +40 +0.75 +0 +CIRCLE +5 +96 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +102.235103493 +20 +74.0703927791 +40 +0.75 +0 +CIRCLE +5 +97 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +94.7351034931 +20 +71.8203927791 +40 +0.75 +0 +CIRCLE +5 +98 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +83.1451034931 +20 +74.0703927791 +40 +0.75 +0 +CIRCLE +5 +99 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +75.645103493 +20 +71.8203927791 +40 +0.75 +0 +CIRCLE +5 +9A +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +64.055103493 +20 +74.0703927791 +40 +0.75 +0 +CIRCLE +5 +9B +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +56.555103493 +20 +71.8203927791 +40 +0.75 +0 +CIRCLE +5 +9C +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +44.965103493 +20 +74.0703927791 +40 +0.75 +0 +CIRCLE +5 +9D +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +37.465103493 +20 +71.8203927791 +40 +0.75 +0 +CIRCLE +5 +9E +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +18.375103493 +20 +71.8203927791 +40 +0.75 +0 +CIRCLE +5 +9F +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +25.875103493 +20 +74.0703927791 +40 +0.75 +0 +CIRCLE +5 +A0 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +146.415103493 +20 +90.8203927791 +40 +0.75 +0 +CIRCLE +5 +A1 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +153.915103493 +20 +93.0703927791 +40 +0.75 +0 +CIRCLE +5 +A2 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +127.415103493 +20 +90.8203927791 +40 +0.75 +0 +CIRCLE +5 +A3 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +134.915103493 +20 +93.0703927791 +40 +0.75 +0 +CIRCLE +5 +A4 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +108.415103493 +20 +90.8203927791 +40 +0.75 +0 +CIRCLE +5 +A5 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +115.915103493 +20 +93.0703927791 +40 +0.75 +0 +CIRCLE +5 +A6 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +89.4151034931 +20 +90.8203927791 +40 +0.75 +0 +CIRCLE +5 +A7 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +96.9151034931 +20 +93.0703927791 +40 +0.75 +0 +CIRCLE +5 +A8 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +70.415103493 +20 +90.8203927791 +40 +0.75 +0 +CIRCLE +5 +A9 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +77.9151034931 +20 +93.0703927791 +40 +0.75 +0 +CIRCLE +5 +AA +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +58.915103493 +20 +93.0703927791 +40 +0.75 +0 +CIRCLE +5 +AB +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +32.415103493 +20 +90.8203927791 +40 +0.75 +0 +CIRCLE +5 +AC +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +39.915103493 +20 +93.0703927791 +40 +0.75 +0 +CIRCLE +5 +AD +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +13.415103493 +20 +90.8203927791 +40 +0.75 +0 +CIRCLE +5 +AE +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +20.915103493 +20 +93.0703927791 +40 +0.75 +0 +CIRCLE +5 +AF +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +118.415103493 +20 +109.820392779 +40 +0.75 +0 +CIRCLE +5 +B0 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +125.915103493 +20 +112.070392779 +40 +0.75 +0 +CIRCLE +5 +B1 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +99.4151034931 +20 +109.820392779 +40 +0.75 +0 +CIRCLE +5 +B2 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +106.915103493 +20 +112.070392779 +40 +0.75 +0 +CIRCLE +5 +B3 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +80.4151034931 +20 +109.820392779 +40 +0.75 +0 +CIRCLE +5 +B4 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +87.9151034931 +20 +112.070392779 +40 +0.75 +0 +CIRCLE +5 +B5 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +61.415103493 +20 +109.820392779 +40 +0.75 +0 +CIRCLE +5 +B6 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +68.915103493 +20 +112.070392779 +40 +0.75 +0 +CIRCLE +5 +B7 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +42.415103493 +20 +109.820392779 +40 +0.75 +0 +CIRCLE +5 +B8 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +49.915103493 +20 +112.070392779 +40 +0.75 +0 +CIRCLE +5 +B9 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +23.415103493 +20 +109.820392779 +40 +0.75 +0 +CIRCLE +5 +BA +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +30.915103493 +20 +112.070392779 +40 +0.75 +0 +LINE +5 +BB +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +19.215103493 +20 +114.070392779 +11 +19.215103493 +21 +110.070392779 +0 +LINE +5 +BC +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +19.215103493 +20 +110.070392779 +11 +17.915103493 +21 +110.070392779 +0 +LINE +5 +BD +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +17.915103493 +20 +114.070392779 +11 +19.215103493 +21 +114.070392779 +0 +LINE +5 +BE +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +19.215103493 +20 +122.070392779 +11 +19.215103493 +21 +118.070392779 +0 +LINE +5 +BF +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +19.215103493 +20 +118.070392779 +11 +17.915103493 +21 +118.070392779 +0 +LINE +5 +C0 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +17.915103493 +20 +122.070392779 +11 +19.215103493 +21 +122.070392779 +0 +LINE +5 +C1 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +23.815103493 +20 +64.0703927791 +11 +23.815103493 +21 +60.0703927791 +0 +LINE +5 +C2 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +23.815103493 +20 +60.0703927791 +11 +22.515103493 +21 +60.0703927791 +0 +LINE +5 +C3 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +22.515103493 +20 +64.0703927791 +11 +23.815103493 +21 +64.0703927791 +0 +LINE +5 +C4 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +23.815103493 +20 +57.0703927791 +11 +23.815103493 +21 +53.0703927791 +0 +LINE +5 +C5 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +23.815103493 +20 +53.0703927791 +11 +22.515103493 +21 +53.0703927791 +0 +LINE +5 +C6 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +22.515103493 +20 +57.0703927791 +11 +23.815103493 +21 +57.0703927791 +0 +LINE +5 +C7 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +14.315103493 +20 +76.0703927791 +11 +14.315103493 +21 +72.0703927791 +0 +LINE +5 +C8 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +14.315103493 +20 +72.0703927791 +11 +13.015103493 +21 +72.0703927791 +0 +LINE +5 +C9 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +13.015103493 +20 +76.0703927791 +11 +14.315103493 +21 +76.0703927791 +0 +LINE +5 +CA +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +14.315103493 +20 +83.5703927791 +11 +14.315103493 +21 +79.5703927791 +0 +LINE +5 +CB +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +14.315103493 +20 +79.5703927791 +11 +13.015103493 +21 +79.5703927791 +0 +LINE +5 +CC +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +13.015103493 +20 +83.5703927791 +11 +14.315103493 +21 +83.5703927791 +0 +LINE +5 +CD +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +9.31510349296 +20 +95.0703927791 +11 +9.31510349296 +21 +91.0703927791 +0 +LINE +5 +CE +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +9.31510349296 +20 +91.0703927791 +11 +8.01510349296 +21 +91.0703927791 +0 +LINE +5 +CF +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +8.01510349296 +20 +95.0703927791 +11 +9.31510349296 +21 +95.0703927791 +0 +LINE +5 +D0 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +9.31510349296 +20 +102.070392779 +11 +9.31510349296 +21 +98.0703927791 +0 +LINE +5 +D1 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +9.31510349296 +20 +98.0703927791 +11 +8.01510349296 +21 +98.0703927791 +0 +LINE +5 +D2 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +8.01510349296 +20 +102.070392779 +11 +9.31510349296 +21 +102.070392779 +0 +LINE +5 +D3 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +15.615103493 +20 +28.5703927791 +11 +26.115103493 +21 +28.5703927791 +0 +LINE +5 +D4 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +46.315103493 +20 +28.5703927791 +11 +160.415103493 +21 +28.5703927791 +0 +LINE +5 +D5 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +21.115103493 +20 +126.570392779 +11 +21.115103493 +21 +123.270392779 +0 +LINE +5 +D6 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +21.115103493 +20 +123.270392779 +11 +17.915103493 +21 +123.270392779 +0 +LINE +5 +D7 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +50.7387765123 +20 +126.570392779 +11 +21.115103493 +21 +126.570392779 +0 +LINE +5 +D8 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +31.215103493 +20 +103.570392779 +11 +8.01510349296 +21 +103.570392779 +0 +LINE +5 +D9 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +17.915103493 +20 +108.570392779 +11 +31.215103493 +21 +108.570392779 +0 +LINE +5 +DA +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +31.215103493 +20 +108.570392779 +11 +31.215103493 +21 +103.570392779 +0 +LINE +5 +DB +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +160.415103493 +20 +126.070392779 +11 +80.1469013801 +21 +126.070392779 +0 +LINE +5 +DC +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +31.215103493 +20 +84.5703927791 +11 +13.015103493 +21 +84.5703927791 +0 +LINE +5 +DD +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +31.215103493 +20 +89.5703927791 +11 +31.215103493 +21 +84.5703927791 +0 +LINE +5 +DE +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +8.01510349296 +20 +89.5703927791 +11 +31.215103493 +21 +89.5703927791 +0 +LINE +5 +DF +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +41.715103493 +20 +46.5703927791 +11 +15.615103493 +21 +46.5703927791 +0 +LINE +5 +E0 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +41.715103493 +20 +51.5703927791 +11 +41.715103493 +21 +46.5703927791 +0 +LINE +5 +E1 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +22.515103493 +20 +51.5703927791 +11 +41.715103493 +21 +51.5703927791 +0 +LINE +5 +E2 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +41.715103493 +20 +65.5703927791 +11 +22.515103493 +21 +65.5703927791 +0 +LINE +5 +E3 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +41.715103493 +20 +70.5703927791 +11 +41.715103493 +21 +65.5703927791 +0 +LINE +5 +E4 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +13.015103493 +20 +70.5703927791 +11 +41.715103493 +21 +70.5703927791 +0 +LINE +5 +E5 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +17.915103493 +20 +122.070392779 +11 +17.915103493 +21 +123.270392779 +0 +LINE +5 +E6 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +17.915103493 +20 +108.570392779 +11 +17.915103493 +21 +110.070392779 +0 +LINE +5 +E7 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +8.01510349296 +20 +102.070392779 +11 +8.01510349296 +21 +103.570392779 +0 +LINE +5 +E8 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +8.01510349296 +20 +89.5703927791 +11 +8.01510349296 +21 +91.0703927791 +0 +LINE +5 +E9 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +15.615103493 +20 +28.5703927791 +11 +15.615103493 +21 +46.5703927791 +0 +LINE +5 +EA +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +17.915103493 +20 +114.070392779 +11 +17.915103493 +21 +118.070392779 +0 +LINE +5 +EB +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +8.01510349296 +20 +95.0703927791 +11 +8.01510349296 +21 +98.0703927791 +0 +LINE +5 +EC +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +13.015103493 +20 +83.5703927791 +11 +13.015103493 +21 +84.5703927791 +0 +LINE +5 +ED +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +13.015103493 +20 +76.0703927791 +11 +13.015103493 +21 +79.5703927791 +0 +LINE +5 +EE +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +13.015103493 +20 +70.5703927791 +11 +13.015103493 +21 +72.0703927791 +0 +LINE +5 +EF +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +22.515103493 +20 +64.0703927791 +11 +22.515103493 +21 +65.5703927791 +0 +LINE +5 +F0 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +22.515103493 +20 +57.0703927791 +11 +22.515103493 +21 +60.0703927791 +0 +LINE +5 +F1 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +22.515103493 +20 +51.5703927791 +11 +22.515103493 +21 +53.0703927791 +0 +LINE +5 +F2 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +160.415103493 +20 +126.070392779 +11 +160.415103493 +21 +28.5703927791 +0 +CIRCLE +5 +F3 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +44.915103493 +20 +105.570392779 +40 +2.1 +0 +CIRCLE +5 +F4 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +59.715103493 +20 +67.5703927791 +40 +2.1 +0 +CIRCLE +5 +F5 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +98.1151034931 +20 +67.5703927791 +40 +2.1 +0 +CIRCLE +5 +F6 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +155.415103493 +20 +77.5703927791 +40 +2.1 +0 +CIRCLE +5 +F7 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +111.915103493 +20 +106.570392779 +40 +2.1 +0 +CIRCLE +5 +F8 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +140.415103493 +20 +39.5703927791 +40 +2 +0 +CIRCLE +5 +F9 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +110.265103493 +20 +39.5703927791 +40 +2 +0 +CIRCLE +5 +FA +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +107.715103493 +20 +58.5703927791 +40 +2 +0 +CIRCLE +5 +FB +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +138.165103493 +20 +58.5703927791 +40 +2 +0 +CIRCLE +5 +FC +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +142.665103493 +20 +77.5703927791 +40 +2 +0 +CIRCLE +5 +FD +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +116.825103493 +20 +77.5703927791 +40 +2 +0 +CIRCLE +5 +FE +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +149.415103493 +20 +96.5703927791 +40 +2 +0 +CIRCLE +5 +FF +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +144.915103493 +20 +115.570392779 +40 +2 +0 +CIRCLE +5 +100 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +121.415103493 +20 +115.570392779 +40 +2 +0 +CIRCLE +5 +101 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +102.415103493 +20 +115.570392779 +40 +2 +0 +CIRCLE +5 +102 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +83.4151034931 +20 +115.570392779 +40 +2 +0 +CIRCLE +5 +103 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +64.415103493 +20 +115.570392779 +40 +2 +0 +CIRCLE +5 +104 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +45.415103493 +20 +115.570392779 +40 +2 +0 +CIRCLE +5 +105 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +26.415103493 +20 +115.570392779 +40 +2 +0 +CIRCLE +5 +106 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +130.415103493 +20 +96.5703927791 +40 +2 +0 +CIRCLE +5 +107 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +111.415103493 +20 +96.5703927791 +40 +2 +0 +CIRCLE +5 +108 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +92.4151034931 +20 +96.5703927791 +40 +2 +0 +CIRCLE +5 +109 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +73.415103493 +20 +96.5703927791 +40 +2 +0 +CIRCLE +5 +10A +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +54.415103493 +20 +96.5703927791 +40 +2 +0 +CIRCLE +5 +10B +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +35.415103493 +20 +96.5703927791 +40 +2 +0 +CIRCLE +5 +10C +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +16.415103493 +20 +96.5703927791 +40 +2 +0 +CIRCLE +5 +10D +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +97.7351034931 +20 +77.5703927791 +40 +2 +0 +CIRCLE +5 +10E +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +78.6451034931 +20 +77.5703927791 +40 +2 +0 +CIRCLE +5 +10F +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +59.555103493 +20 +77.5703927791 +40 +2 +0 +CIRCLE +5 +110 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +40.465103493 +20 +77.5703927791 +40 +2 +0 +CIRCLE +5 +111 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +21.375103493 +20 +77.5703927791 +40 +2 +0 +CIRCLE +5 +112 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +88.5151034931 +20 +58.5703927791 +40 +2 +0 +CIRCLE +5 +113 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +69.315103493 +20 +58.5703927791 +40 +2 +0 +CIRCLE +5 +114 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +50.115103493 +20 +58.5703927791 +40 +2 +0 +CIRCLE +5 +115 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +30.915103493 +20 +58.5703927791 +40 +2 +0 +CIRCLE +5 +116 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +34.115103493 +20 +39.5703927791 +40 +2 +0 +CIRCLE +5 +117 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +86.8651034931 +20 +39.5703927791 +40 +2 +0 +CIRCLE +5 +118 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +63.465103493 +20 +39.5703927791 +40 +2 +0 +ARC +5 +119 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +124.426298668 +20 +54.6043548311 +40 +2.37170824513 +100 +AcDbArc +50 +341.565051177 +51 +198.434948823 +0 +LINE +5 +11A +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +122.176298668 +20 +53.8543548311 +11 +123.676298668 +21 +50.8543548311 +0 +LINE +5 +11B +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +126.676298668 +20 +53.8543548311 +11 +125.176298668 +21 +50.8543548311 +0 +ARC +5 +11C +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +124.426298668 +20 +51.2543548311 +40 +0.85 +100 +AcDbArc +50 +208.072486936 +51 +331.927513064 +0 +ARC +5 +11D +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +124.380058759 +20 +41.2642934551 +40 +2.37170824513 +100 +AcDbArc +50 +161.565051177 +51 +18.4349488229 +0 +LINE +5 +11E +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +126.630058759 +20 +42.0142934551 +11 +125.130058759 +21 +45.0142934551 +0 +LINE +5 +11F +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +122.130058759 +20 +42.0142934551 +11 +123.630058759 +21 +45.0142934551 +0 +ARC +5 +120 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +124.380058759 +20 +44.6142934551 +40 +0.85 +100 +AcDbArc +50 +28.0724869359 +51 +151.927513064 +0 +ARC +5 +121 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +117.630058759 +20 +48.1425852101 +40 +2.37170824513 +100 +AcDbArc +50 +71.5650511771 +51 +288.434948823 +0 +LINE +5 +122 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +118.380058759 +20 +45.8925852101 +11 +121.380058759 +21 +47.3925852101 +0 +LINE +5 +123 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +118.380058759 +20 +50.3925852101 +11 +121.380058759 +21 +48.8925852101 +0 +ARC +5 +124 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +120.980058759 +20 +48.1425852101 +40 +0.85 +100 +AcDbArc +50 +298.072486936 +51 +61.9275130641 +0 +ARC +5 +125 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +131.130058759 +20 +48.1425852101 +40 +2.37170824513 +100 +AcDbArc +50 +251.565051177 +51 +108.434948823 +0 +LINE +5 +126 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +130.380058759 +20 +50.3925852101 +11 +127.380058759 +21 +48.8925852101 +0 +LINE +5 +127 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +130.380058759 +20 +45.8925852101 +11 +127.380058759 +21 +47.3925852101 +0 +ARC +5 +128 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +127.780058759 +20 +48.1425852101 +40 +0.85 +100 +AcDbArc +50 +118.072486936 +51 +241.927513064 +0 +ARC +5 +129 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +53.1318556378 +20 +37.0101551811 +40 +0.85 +100 +AcDbArc +50 +73.0724869359 +51 +196.927513064 +0 +ARC +5 +12A +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +45.8640058389 +20 +34.7320634341 +40 +2.37170824513 +100 +AcDbArc +50 +116.565051177 +51 +333.434948823 +0 +LINE +5 +12B +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +47.9853261825 +20 +33.6714032621 +11 +49.0459863543 +21 +36.8533837771 +0 +LINE +5 +12C +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +44.8033456672 +20 +36.8533837771 +11 +47.9853261825 +21 +37.9140439491 +0 +ARC +5 +12D +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +48.2328135559 +20 +37.1008711511 +40 +0.85 +100 +AcDbArc +50 +343.072486936 +51 +106.927513064 +0 +ARC +5 +12E +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +55.4099473849 +20 +44.2780049801 +40 +2.37170824513 +100 +AcDbArc +50 +296.565051177 +51 +153.434948823 +0 +LINE +5 +12F +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +53.2886270414 +20 +45.3386651511 +11 +52.2279668696 +21 +42.1566846361 +0 +LINE +5 +130 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +56.4706075567 +20 +42.1566846361 +11 +53.2886270414 +21 +41.0960244641 +0 +ARC +5 +131 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +53.041139668 +20 +41.9091972631 +40 +0.85 +100 +AcDbArc +50 +163.072486936 +51 +286.927513064 +0 +ARC +5 +132 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +46.1005120477 +20 +44.1068918771 +40 +2.37170824513 +100 +AcDbArc +50 +26.5650511771 +51 +243.434948823 +0 +LINE +5 +133 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +45.0398518759 +20 +41.9855715331 +11 +48.2218323913 +21 +40.9249113611 +0 +LINE +5 +134 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +48.2218323913 +20 +45.1675520491 +11 +49.282492563 +21 +41.9855715331 +0 +ARC +5 +135 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +48.4693197647 +20 +41.7380841601 +40 +0.85 +100 +AcDbArc +50 +253.072486936 +51 +16.9275130641 +0 +ARC +5 +136 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +55.5006633548 +20 +34.6413474641 +40 +2.37170824513 +100 +AcDbArc +50 +206.565051177 +51 +63.4349488229 +0 +LINE +5 +137 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +56.5613235266 +20 +36.7626678071 +11 +53.3793430112 +21 +37.8233279791 +0 +LINE +5 +138 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbLine +10 +53.3793430112 +20 +33.5806872921 +11 +52.3186828395 +21 +36.7626678071 +0 +CIRCLE +5 +139 +100 +AcDbEntity +8 +Visible Edges(PEC) +6 +ByLayer +62 +256 +370 +-1 +100 +AcDbCircle +10 +156.82650113 +20 +63.0606544828 +40 +0.75 +0 +ENDSEC +0 +SECTION +2 +OBJECTS +0 +DICTIONARY +5 +C +330 +0 +100 +AcDbDictionary +281 +1 +3 +ACAD_GROUP +350 +D +0 +DICTIONARY +5 +D +330 +C +100 +AcDbDictionary +281 +1 +0 +ENDSEC +0 +EOF From 1080a4e6f91e9d5e78ae0c64fc6ce071a6118978 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 28 Oct 2013 16:51:56 +0100 Subject: [PATCH 413/415] GAL is not activated by default. Late OpenGL backend initializatization. --- common/gal/opengl/opengl_gal.cpp | 6 ++++-- pcbnew/pcbnew.cpp | 3 --- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index 1da1bd1788..fa4316611c 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -52,11 +52,10 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, nonCachedManager( false ), overlayManager( false ) { - // Create the OpenGL-Context - glContext = new wxGLContext( this ); parentWindow = aParent; mouseListener = aMouseListener; paintListener = aPaintListener; + glContext = NULL; // Initialize the flags isGlewInitialized = false; @@ -113,6 +112,9 @@ OPENGL_GAL::~OPENGL_GAL() void OPENGL_GAL::BeginDrawing() { + if( !glContext ) + glContext = new wxGLContext( this ); + SetCurrent( *glContext ); clientDC = new wxClientDC( this ); diff --git a/pcbnew/pcbnew.cpp b/pcbnew/pcbnew.cpp index 72e1c575b8..4602111ee7 100644 --- a/pcbnew/pcbnew.cpp +++ b/pcbnew/pcbnew.cpp @@ -293,9 +293,6 @@ bool EDA_APP::OnInit() frame->SetFocus(); frame->GetCanvas()->SetFocus(); - // Activate the GAL - frame->UseGalCanvas( true ); - return true; } From 1dcaf135e59656c22e50e5e6fff4022bedd4488d Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 29 Oct 2013 17:28:29 +0100 Subject: [PATCH 414/415] Changed the used framebuffer object extension from ARB_framebuffer_object to EXT_framebuffer_object (compatibility reasons). --- common/gal/opengl/opengl_compositor.cpp | 59 +++++++++++-------------- common/gal/opengl/opengl_gal.cpp | 8 ++-- 2 files changed, 30 insertions(+), 37 deletions(-) diff --git a/common/gal/opengl/opengl_compositor.cpp b/common/gal/opengl/opengl_compositor.cpp index b543dc017f..48559e8aa3 100644 --- a/common/gal/opengl/opengl_compositor.cpp +++ b/common/gal/opengl/opengl_compositor.cpp @@ -56,25 +56,25 @@ void OPENGL_COMPOSITOR::Initialize() // We need framebuffer objects for drawing the screen contents // Generate framebuffer and a depth buffer - glGenFramebuffers( 1, &m_framebuffer ); - glBindFramebuffer( GL_FRAMEBUFFER, m_framebuffer ); + glGenFramebuffersEXT( 1, &m_framebuffer ); + glBindFramebufferEXT( GL_FRAMEBUFFER, m_framebuffer ); m_currentFbo = m_framebuffer; // Allocate memory for the depth buffer // Attach the depth buffer to the framebuffer - glGenRenderbuffers( 1, &m_depthBuffer ); - glBindRenderbuffer( GL_RENDERBUFFER, m_depthBuffer ); + glGenRenderbuffersEXT( 1, &m_depthBuffer ); + glBindRenderbufferEXT( GL_RENDERBUFFER_EXT, m_depthBuffer ); // Use here a size of 24 bits for the depth buffer, 8 bits for the stencil buffer // this is required later for anti-aliasing - glRenderbufferStorage( GL_RENDERBUFFER, GL_DEPTH_STENCIL, m_width, m_height ); - glFramebufferRenderbuffer( GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, - GL_RENDERBUFFER, m_depthBuffer ); - glFramebufferRenderbuffer( GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, - GL_RENDERBUFFER, m_depthBuffer ); + glRenderbufferStorageEXT( GL_RENDERBUFFER_EXT, GL_DEPTH_STENCIL, m_width, m_height ); + glFramebufferRenderbufferEXT( GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT, + GL_RENDERBUFFER_EXT, m_depthBuffer ); + glFramebufferRenderbufferEXT( GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT, + GL_RENDERBUFFER_EXT, m_depthBuffer ); // Unbind the framebuffer, so by default all the rendering goes directly to the display - glBindFramebuffer( GL_FRAMEBUFFER, DIRECT_RENDERING ); + glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, DIRECT_RENDERING ); m_currentFbo = 0; m_initialized = true; @@ -119,50 +119,45 @@ unsigned int OPENGL_COMPOSITOR::CreateBuffer() glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST ); // Bind the texture to the specific attachment point, clear and rebind the screen - glBindFramebuffer( GL_FRAMEBUFFER, m_framebuffer ); + glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, m_framebuffer ); m_currentFbo = m_framebuffer; - glFramebufferTexture2D( GL_FRAMEBUFFER, attachmentPoint, GL_TEXTURE_2D, textureTarget, 0 ); + glFramebufferTexture2DEXT( GL_FRAMEBUFFER_EXT, attachmentPoint, GL_TEXTURE_2D, textureTarget, 0 ); // Check the status, exit if the framebuffer can't be created - GLenum status = glCheckFramebufferStatus( GL_FRAMEBUFFER ); + GLenum status = glCheckFramebufferStatusEXT( GL_FRAMEBUFFER_EXT ); - if( status != GL_FRAMEBUFFER_COMPLETE ) + if( status != GL_FRAMEBUFFER_COMPLETE_EXT ) { switch( status ) { - case GL_FRAMEBUFFER_UNDEFINED: - wxLogFatalError( wxT( "Target is the default framebuffer, " - "but the default framebuffer does not exist." ) ); - break; - - case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT: + case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT: wxLogFatalError( wxT( "Cannot create the framebuffer." ) ); break; - case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: + case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT: wxLogFatalError( wxT( "The framebuffer attachment points are incomplete." ) ); break; - case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER: + case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT: wxLogFatalError( wxT( "The framebuffer does not have at least " "one image attached to it." ) ); break; - case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER: + case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT: wxLogFatalError( wxT( "The framebuffer read buffer is incomplete." ) ); break; - case GL_FRAMEBUFFER_UNSUPPORTED: + case GL_FRAMEBUFFER_UNSUPPORTED_EXT: wxLogFatalError( wxT( "The combination of internal formats of the attached images " "violates an implementation-dependent set of restrictions." ) ); break; - case GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: + case GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT: wxLogFatalError( wxT( "GL_RENDERBUFFER_SAMPLES is not the same " "for all attached renderbuffers" ) ); break; - case GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS: + case GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT: wxLogFatalError( wxT( "Framebuffer incomplete layer targets errors." ) ); break; @@ -177,7 +172,7 @@ unsigned int OPENGL_COMPOSITOR::CreateBuffer() ClearBuffer(); // Return to direct rendering (we were asked only to create a buffer, not switch to one) - glBindFramebuffer( GL_FRAMEBUFFER, DIRECT_RENDERING ); + glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, DIRECT_RENDERING ); m_currentFbo = DIRECT_RENDERING; // Store the new buffer @@ -196,12 +191,12 @@ void OPENGL_COMPOSITOR::SetBuffer( unsigned int aBufferHandle ) // Change the rendering destination to the selected attachment point if( aBufferHandle == DIRECT_RENDERING ) { - glBindFramebuffer( GL_FRAMEBUFFER, DIRECT_RENDERING ); + glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, DIRECT_RENDERING ); m_currentFbo = DIRECT_RENDERING; } else if( m_currentFbo != m_framebuffer ) { - glBindFramebuffer( GL_FRAMEBUFFER, m_framebuffer ); + glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, m_framebuffer ); m_currentFbo = m_framebuffer; } @@ -233,7 +228,7 @@ void OPENGL_COMPOSITOR::DrawBuffer( unsigned int aBufferHandle ) } // Switch to the main framebuffer and blit the scene - glBindFramebuffer( GL_FRAMEBUFFER, DIRECT_RENDERING ); + glBindFramebufferEXT( GL_FRAMEBUFFER, DIRECT_RENDERING ); m_currentFbo = DIRECT_RENDERING; // Depth test has to be disabled to make transparency working @@ -278,8 +273,8 @@ void OPENGL_COMPOSITOR::clean() { wxASSERT( m_initialized ); - glDeleteFramebuffers( 1, &m_framebuffer ); - glDeleteRenderbuffers( 1, &m_depthBuffer ); + glDeleteFramebuffersEXT( 1, &m_framebuffer ); + glDeleteRenderbuffersEXT( 1, &m_depthBuffer ); OPENGL_BUFFERS::const_iterator it; diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index fa4316611c..aa4bc86a39 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -52,10 +52,11 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, nonCachedManager( false ), overlayManager( false ) { + // Create the OpenGL-Context + glContext = new wxGLContext( this ); parentWindow = aParent; mouseListener = aMouseListener; paintListener = aPaintListener; - glContext = NULL; // Initialize the flags isGlewInitialized = false; @@ -112,9 +113,6 @@ OPENGL_GAL::~OPENGL_GAL() void OPENGL_GAL::BeginDrawing() { - if( !glContext ) - glContext = new wxGLContext( this ); - SetCurrent( *glContext ); clientDC = new wxClientDC( this ); @@ -935,7 +933,7 @@ void OPENGL_GAL::initGlew() } // Framebuffers have to be supported - if( !GLEW_ARB_framebuffer_object ) + if( !GLEW_EXT_framebuffer_object ) { wxLogError( wxT( "Framebuffer objects are not supported!" ) ); exit( 1 ); From d6edc898c5f7356ae449afa7bc4479a1e79af3da Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 29 Oct 2013 17:53:47 +0100 Subject: [PATCH 415/415] Fix colorized framebuffer output on some GPUs. --- common/gal/opengl/opengl_gal.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index aa4bc86a39..7f63b79bea 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -215,6 +215,9 @@ void OPENGL_GAL::EndDrawing() compositor.SetBuffer( overlayBuffer ); overlayManager.EndDrawing(); + // Be sure that the framebuffer is not colorized (happens on specific GPU&drivers combinations) + glColor4d( 1.0, 1.0, 1.0, 1.0 ); + // Draw the remaining contents, blit the rendering targets to the screen, swap the buffers compositor.DrawBuffer( mainBuffer ); compositor.DrawBuffer( overlayBuffer ); @@ -980,9 +983,6 @@ void OPENGL_GAL::blitCursor() glVertex2d( cursorBegin.x, cursorCenter.y ); glVertex2d( cursorEnd.x, cursorCenter.y ); glEnd(); - - // Restore the default color, so textures will be drawn properly - glColor4d( 1.0, 1.0, 1.0, 1.0 ); }